commit e8f897f4afef0031fe618a8e94127a0934896aba Author: Linus Torvalds Date: Sun Mar 10 13:38:09 2024 -0700 Linux 6.8 commit fa4b851b4ad632dc673627f38a8a552547568a2c Merge: 210ee636c4ad5 e5d7c1916562f Author: Linus Torvalds Date: Sun Mar 10 11:53:21 2024 -0700 Merge tag 'trace-ring-buffer-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Do not allow large strings (> 4096) as single write to trace_marker The size of a string written into trace_marker was determined by the size of the sub-buffer in the ring buffer. That size is dependent on the PAGE_SIZE of the architecture as it can be mapped into user space. But on PowerPC, where PAGE_SIZE is 64K, that made the limit of the string of writing into trace_marker 64K. One of the selftests looks at the size of the ring buffer sub-buffers and writes that plus more into the trace_marker. The write will take what it can and report back what it consumed so that the user space application (like echo) will write the rest of the string. The string is stored in the ring buffer and can be read via the "trace" or "trace_pipe" files. The reading of the ring buffer uses vsnprintf(), which uses a precision "%.*s" to make sure it only reads what is stored in the buffer, as a bug could cause the string to be non terminated. With the combination of the precision change and the PAGE_SIZE of 64K allowing huge strings to be added into the ring buffer, plus the test that would actually stress that limit, a bug was reported that the precision used was too big for "%.*s" as the string was close to 64K in size and the max precision of vsnprintf is 32K. Linus suggested not to have that precision as it could hide a bug if the string was again stored without a nul byte. Another issue that was brought up is that the trace_seq buffer is also based on PAGE_SIZE even though it is not tied to the architecture limit like the ring buffer sub-buffer is. Having it be 64K * 2 is simply just too big and wasting memory on systems with 64K page sizes. It is now hardcoded to 8K which is what all other architectures with 4K PAGE_SIZE has. Finally, the write to trace_marker is now limited to 4K as there is no reason to write larger strings into trace_marker. - ring_buffer_wait() should not loop. The ring_buffer_wait() does not have the full context (yet) on if it should loop or not. Just exit the loop as soon as its woken up and let the callers decide to loop or not (they already do, so it's a bit redundant). - Fix shortest_full field to be the smallest amount in the ring buffer that a waiter is waiting for. The "shortest_full" field is updated when a new waiter comes in and wants to wait for a smaller amount of data in the ring buffer than other waiters. But after all waiters are woken up, it's not reset, so if another waiter comes in wanting to wait for more data, it will be woken up when the ring buffer has a smaller amount from what the previous waiters were waiting for. - The wake up all waiters on close is incorrectly called frome .release() and not from .flush() so it will never wake up any waiters as the .release() will not get called until all .read() calls are finished. And the wakeup is for the waiters in those .read() calls. * tag 'trace-ring-buffer-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Use .flush() call to wake up readers ring-buffer: Fix resetting of shortest_full ring-buffer: Fix waking up ring buffer readers tracing: Limit trace_marker writes to just 4K tracing: Limit trace_seq size to just 8K and not depend on architecture PAGE_SIZE tracing: Remove precision vsnprintf() check from print event commit 210ee636c4ad5e88a77f858fa460033715ad7d3f Merge: 137e0ec05aeb6 47b412c1ea771 Author: Linus Torvalds Date: Sun Mar 10 11:39:48 2024 -0700 Merge tag 'phy-fixes3-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy fixes from Vinod Koul: - fixes for Qualcomm qmp-combo driver for ordering of drm and type-c switch registartion due to drivers might not probe defer after having registered child devices to avoid triggering a probe deferral loop. This fixes internal display on Lenovo ThinkPad X13s * tag 'phy-fixes3-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: qcom-qmp-combo: fix type-c switch registration phy: qcom-qmp-combo: fix drm bridge registration commit e5d7c1916562f0e856eb3d6f569629fcd535fed2 Author: Steven Rostedt (Google) Date: Fri Mar 8 15:24:05 2024 -0500 tracing: Use .flush() call to wake up readers The .release() function does not get called until all readers of a file descriptor are finished. If a thread is blocked on reading a file descriptor in ring_buffer_wait(), and another thread closes the file descriptor, it will not wake up the other thread as ring_buffer_wake_waiters() is called by .release(), and that will not get called until the .read() is finished. The issue originally showed up in trace-cmd, but the readers are actually other processes with their own file descriptors. So calling close() would wake up the other tasks because they are blocked on another descriptor then the one that was closed(). But there's other wake ups that solve that issue. When a thread is blocked on a read, it can still hang even when another thread closed its descriptor. This is what the .flush() callback is for. Have the .flush() wake up the readers. Link: https://lore.kernel.org/linux-trace-kernel/20240308202432.107909457@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Linus Torvalds Cc: linke li Cc: Rabin Vincent Fixes: f3ddb74ad0790 ("tracing: Wake up ring buffer waiters on closing of the file") Signed-off-by: Steven Rostedt (Google) commit 68282dd930ea38b068ce2c109d12405f40df3f93 Author: Steven Rostedt (Google) Date: Fri Mar 8 15:24:04 2024 -0500 ring-buffer: Fix resetting of shortest_full The "shortest_full" variable is used to keep track of the waiter that is waiting for the smallest amount on the ring buffer before being woken up. When a tasks waits on the ring buffer, it passes in a "full" value that is a percentage. 0 means wake up on any data. 1-100 means wake up from 1% to 100% full buffer. As all waiters are on the same wait queue, the wake up happens for the waiter with the smallest percentage. The problem is that the smallest_full on the cpu_buffer that stores the smallest amount doesn't get reset when all the waiters are woken up. It does get reset when the ring buffer is reset (echo > /sys/kernel/tracing/trace). This means that tasks may be woken up more often then when they want to be. Instead, have the shortest_full field get reset just before waking up all the tasks. If the tasks wait again, they will update the shortest_full before sleeping. Also add locking around setting of shortest_full in the poll logic, and change "work" to "rbwork" to match the variable name for rb_irq_work structures that are used in other places. Link: https://lore.kernel.org/linux-trace-kernel/20240308202431.948914369@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Linus Torvalds Cc: linke li Cc: Rabin Vincent Fixes: 2c2b0a78b3739 ("ring-buffer: Add percentage of ring buffer full to wake up reader") Signed-off-by: Steven Rostedt (Google) commit 137e0ec05aeb657472d2f84dbb3081016160334b Merge: 005f6f34bd47e 5abf6dceb066f Author: Linus Torvalds Date: Sun Mar 10 09:27:39 2024 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "KVM GUEST_MEMFD fixes for 6.8: - Make KVM_MEM_GUEST_MEMFD mutually exclusive with KVM_MEM_READONLY to avoid creating an inconsistent ABI (KVM_MEM_GUEST_MEMFD is not writable from userspace, so there would be no way to write to a read-only guest_memfd). - Update documentation for KVM_SW_PROTECTED_VM to make it abundantly clear that such VMs are purely for development and testing. - Limit KVM_SW_PROTECTED_VM guests to the TDP MMU, as the long term plan is to support confidential VMs with deterministic private memory (SNP and TDX) only in the TDP MMU. - Fix a bug in a GUEST_MEMFD dirty logging test that caused false passes. x86 fixes: - Fix missing marking of a guest page as dirty when emulating an atomic access. - Check for mmu_notifier invalidation events before faulting in the pfn, and before acquiring mmu_lock, to avoid unnecessary work and lock contention with preemptible kernels (including CONFIG_PREEMPT_DYNAMIC in non-preemptible mode). - Disable AMD DebugSwap by default, it breaks VMSA signing and will be re-enabled with a better VM creation API in 6.10. - Do the cache flush of converted pages in svm_register_enc_region() before dropping kvm->lock, to avoid a race with unregistering of the same region and the consequent use-after-free issue" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: SEV: disable SEV-ES DebugSwap by default KVM: x86/mmu: Retry fault before acquiring mmu_lock if mapping is changing KVM: SVM: Flush pages under kvm->lock to fix UAF in svm_register_enc_region() KVM: selftests: Add a testcase to verify GUEST_MEMFD and READONLY are exclusive KVM: selftests: Create GUEST_MEMFD for relevant invalid flags testcases KVM: x86/mmu: Restrict KVM_SW_PROTECTED_VM to the TDP MMU KVM: x86: Update KVM_SW_PROTECTED_VM docs to make it clear they're a WIP KVM: Make KVM_MEM_GUEST_MEMFD mutually exclusive with KVM_MEM_READONLY KVM: x86: Mark target gfn of emulated atomic instruction as dirty commit b3594573681b53316ec0365332681a30463edfd6 Author: Steven Rostedt (Google) Date: Fri Mar 8 15:24:03 2024 -0500 ring-buffer: Fix waking up ring buffer readers A task can wait on a ring buffer for when it fills up to a specific watermark. The writer will check the minimum watermark that waiters are waiting for and if the ring buffer is past that, it will wake up all the waiters. The waiters are in a wait loop, and will first check if a signal is pending and then check if the ring buffer is at the desired level where it should break out of the loop. If a file that uses a ring buffer closes, and there's threads waiting on the ring buffer, it needs to wake up those threads. To do this, a "wait_index" was used. Before entering the wait loop, the waiter will read the wait_index. On wakeup, it will check if the wait_index is different than when it entered the loop, and will exit the loop if it is. The waker will only need to update the wait_index before waking up the waiters. This had a couple of bugs. One trivial one and one broken by design. The trivial bug was that the waiter checked the wait_index after the schedule() call. It had to be checked between the prepare_to_wait() and the schedule() which it was not. The main bug is that the first check to set the default wait_index will always be outside the prepare_to_wait() and the schedule(). That's because the ring_buffer_wait() doesn't have enough context to know if it should break out of the loop. The loop itself is not needed, because all the callers to the ring_buffer_wait() also has their own loop, as the callers have a better sense of what the context is to decide whether to break out of the loop or not. Just have the ring_buffer_wait() block once, and if it gets woken up, exit the function and let the callers decide what to do next. Link: https://lore.kernel.org/all/CAHk-=whs5MdtNjzFkTyaUy=vHi=qwWgPi0JgTe6OYUYMNSRZfg@mail.gmail.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240308202431.792933613@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Linus Torvalds Cc: linke li Cc: Rabin Vincent Fixes: e30f53aad2202 ("tracing: Do not busy wait in buffer splice") Signed-off-by: Steven Rostedt (Google) commit 005f6f34bd47eaa61d939a2727fc648e687b84c1 Merge: 66695e7d94fc4 ac168d6770aa1 Author: Linus Torvalds Date: Sat Mar 9 10:32:03 2024 -0800 Merge tag 'i2c-for-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Two patches from Heiner for the i801 are targeting muxes discovered while working on some other features. Essentially, there is a reordering when adding optional slaves and proper cleanup upon registering a mux device. Christophe fixes the exit path in the wmt driver that was leaving the clocks hanging, and the last fix from Tommy avoids false error reports in IRQ" * tag 'i2c-for-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: aspeed: Fix the dummy irq expected print i2c: wmt: Fix an error handling path in wmt_i2c_probe() i2c: i801: Avoid potential double call to gpiod_remove_lookup_table i2c: i801: Fix using mux_pdev before it's set commit 66695e7d94fc499f26411044e07cc1386e4f3aa7 Merge: 09e5c48fea173 575801663c7dc Author: Linus Torvalds Date: Sat Mar 9 10:25:14 2024 -0800 Merge tag 'firewire-fixes-6.8-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire fix from Takashi Sakamoto: "A fix to suppress a warning about unreleased IRQ for 1394 OHCI hardware when disabling MSI. In Linux kernel v6.5, a PCI driver for 1394 OHCI hardware was optimized into the managed device resources. Edmund Raile points out that the change brings the warning about unreleased IRQ at the call of pci_disable_msi(), since the API expects that the relevant IRQ has already been released in advance. As long as the API is called in .remove callback of PCI device operation, it is prohibited to maintain the IRQ as the part of managed device resource. As a workaround, the IRQ is explicitly released at .remove callback, before the call of pci_disable_msi(). pci_disable_msi() is legacy API nowadays in PCI MSI implementation. I have a plan to replace it with the modern API in the development for the future version of Linux kernel. So at present I keep them as is" * tag 'firewire-fixes-6.8-final' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: ohci: prevent leak of left-over IRQ on unbind commit 5abf6dceb066f2b02b225fd561440c98a8062681 Author: Paolo Bonzini Date: Sat Mar 9 11:24:58 2024 -0500 SEV: disable SEV-ES DebugSwap by default The DebugSwap feature of SEV-ES provides a way for confidential guests to use data breakpoints. However, because the status of the DebugSwap feature is recorded in the VMSA, enabling it by default invalidates the attestation signatures. In 6.10 we will introduce a new API to create SEV VMs that will allow enabling DebugSwap based on what the user tells KVM to do. Contextually, we will change the legacy KVM_SEV_ES_INIT API to never enable DebugSwap. For compatibility with kernels that pre-date the introduction of DebugSwap, as well as with those where KVM_SEV_ES_INIT will never enable it, do not enable the feature by default. If anybody wants to use it, for now they can enable the sev_es_debug_swap_enabled module parameter, but this will result in a warning. Fixes: d1f85fbe836e ("KVM: SEV: Enable data breakpoints in SEV-ES") Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 39fee313fdd489480eb2c453535ab73672c39a27 Merge: 1b6c146df555b 2dfd238303442 Author: Paolo Bonzini Date: Sat Mar 9 11:20:44 2024 -0500 Merge tag 'kvm-x86-guest_memfd_fixes-6.8' of https://github.com/kvm-x86/linux into HEAD KVM GUEST_MEMFD fixes for 6.8: - Make KVM_MEM_GUEST_MEMFD mutually exclusive with KVM_MEM_READONLY to avoid creating ABI that KVM can't sanely support. - Update documentation for KVM_SW_PROTECTED_VM to make it abundantly clear that such VMs are purely a development and testing vehicle, and come with zero guarantees. - Limit KVM_SW_PROTECTED_VM guests to the TDP MMU, as the long term plan is to support confidential VMs with deterministic private memory (SNP and TDX) only in the TDP MMU. - Fix a bug in a GUEST_MEMFD negative test that resulted in false passes when verifying that KVM_MEM_GUEST_MEMFD memslots can't be dirty logged. commit 1b6c146df555bcfb9ad55dbb745ee364a9a0159f Merge: 5ef1d8c1ddbf6 d02c357e5bfa7 Author: Paolo Bonzini Date: Sat Mar 9 11:18:46 2024 -0500 Merge tag 'kvm-x86-fixes-6.8-2' of https://github.com/kvm-x86/linux into HEAD KVM x86 fixes for 6.8, round 2: - When emulating an atomic access, mark the gfn as dirty in the memslot to fix a bug where KVM could fail to mark the slot as dirty during live migration, ultimately resulting in guest data corruption due to a dirty page not being re-copied from the source to the target. - Check for mmu_notifier invalidation events before faulting in the pfn, and before acquiring mmu_lock, to avoid unnecessary work and lock contention. Contending mmu_lock is especially problematic on preemptible kernels, as KVM may yield mmu_lock in response to the contention, which severely degrades overall performance due to vCPUs making it difficult for the task that triggered invalidation to make forward progress. Note, due to another kernel bug, this fix isn't limited to preemtible kernels, as any kernel built with CONFIG_PREEMPT_DYNAMIC=y will yield contended rwlocks and spinlocks. https://lore.kernel.org/all/20240110214723.695930-1-seanjc@google.com commit 09e5c48fea173b72f1c763776136eeb379b1bc47 Merge: 10d48d70e82d7 321e3c3de53c7 Author: Linus Torvalds Date: Fri Mar 8 18:05:21 2024 -0800 Merge tag 'ceph-for-6.8-rc8' of https://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A follow-up for sparse read fixes that went into -rc4 -- msgr2 case was missed and is corrected here" * tag 'ceph-for-6.8-rc8' of https://github.com/ceph/ceph-client: libceph: init the cursor when preparing sparse read in msgr2 commit 10d48d70e82d7d19eb9157fdb599bfce4a5768bc Merge: 563c5b02f299f a0776c214d47e Author: Linus Torvalds Date: Fri Mar 8 13:39:28 2024 -0800 Merge tag 'char-misc-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are a few small char/misc and other driver subsystem fixes for reported issues that have been in my tree. Included in here are fixes for: - iio driver fixes for reported problems - much reported bugfix for a lis3lv02d_i2c regression - comedi driver bugfix - mei new device ids - mei driver fixes - counter core fix All of these have been in linux-next with no reported issues, some for many weeks" * tag 'char-misc-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: mei: gsc_proxy: match component when GSC is on different bus misc: fastrpc: Pass proper arguments to scm call comedi: comedi_test: Prevent timers rescheduling during deletion comedi: comedi_8255: Correct error in subdevice initialization misc: lis3lv02d_i2c: Fix regulators getting en-/dis-abled twice on suspend/resume iio: accel: adxl367: fix I2C FIFO data register iio: accel: adxl367: fix DEVID read after reset iio: pressure: dlhl60d: Initialize empty DLH bytes iio: imu: inv_mpu6050: fix frequency setting when chip is off iio: pressure: Fixes BMP38x and BMP390 SPI support iio: imu: inv_mpu6050: fix FIFO parsing when empty mei: Add Meteor Lake support for IVSC device mei: me: add arrow lake point H DID mei: me: add arrow lake point S DID counter: fix privdata alignment commit 563c5b02f299f4374a157ae6423f8465a2495dd2 Merge: e536e0d44c44f 3d9319c27ceb3 Author: Linus Torvalds Date: Fri Mar 8 13:33:04 2024 -0800 Merge tag 'tty-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial fixes from Greg KH: "Here are some small remaining tty/serial driver fixes. Included in here is fixes for: - vt unicode buffer corruption fix - imx serial driver fixes, again - port suspend fix - 8250_dw driver fix - fsl_lpuart driver fix - revert for the qcom_geni_serial driver to fix a reported regression All of these have been in linux-next with no reported issues" * tag 'tty-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "tty: serial: simplify qcom_geni_serial_send_chunk_fifo()" tty: serial: fsl_lpuart: avoid idle preamble pending if CTS is enabled vt: fix unicode buffer corruption when deleting characters serial: port: Don't suspend if the port is still busy serial: 8250_dw: Do not reclock if already at correct rate tty: serial: imx: Fix broken RS485 commit e536e0d44c44f8854a6c527195c70ce9dd1e0c0b Merge: 49deb2805fdcd b234c70fefa75 Author: Linus Torvalds Date: Fri Mar 8 13:19:01 2024 -0800 Merge tag 'usb-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt fixes from Greg KH: "Here are some small remaining fixes for USB and Thunderbolt drivers. Included in here are fixes for: - thunderbold NULL dereference fix - typec driver fixes - xhci driver regression fix - usb-storage divide-by-0 fix - ncm gadget driver fix All of these have been in linux-next with no reported issues" * tag 'usb-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: xhci: Fix failure to detect ring expansion need. usb: port: Don't try to peer unused USB ports based on location usb: gadget: ncm: Fix handling of zero block length packets usb: typec: altmodes/displayport: create sysfs nodes as driver's default device attribute group usb: typec: tpcm: Fix PORT_RESET behavior for self powered devices usb: typec: ucsi: fix UCSI on SM8550 & SM8650 Qualcomm devices USB: usb-storage: Prevent divide-by-0 error in isd200_ata_command thunderbolt: Fix NULL pointer dereference in tb_port_update_credits() commit 49deb2805fdcd366b7a9123cec7914b93b543f75 Merge: 7a4f31c7765e6 f6443e0177a55 Author: Linus Torvalds Date: Fri Mar 8 13:13:20 2024 -0800 Merge tag 'pinctrl-v6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Fix the PM suspend callback in the STM32 ST32MP257 driver to properly support suspend - Drop an extraneous reference put in the debugfs code, this was confusing the reference counts and causing unsolicited calls to __free() * tag 'pinctrl-v6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: don't put the reference to GPIO device in pinctrl_pins_show() pinctrl: stm32: fix PM support for stm32mp257 commit 7a4f31c7765e63e3219eac1e822ab16df09f318c Merge: 6dfeb04c46782 fbf8d71742557 Author: Linus Torvalds Date: Fri Mar 8 13:06:35 2024 -0800 Merge tag 'input-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a revert of endpoint checks in bcm5974 - the driver is being naughty and pokes at unclaimed USB interface, so the check fails. We need to fix the driver to claim both interfaces, and then re-implement the endpoints check - a fix to Synaptics RMI driver to avoid UAF on driver unload or device unbinding - a few new VID/PIDs added to xpad game controller driver - a change to gpio_keys_polled driver to quiet it when GPIO causes probe deferral. * tag 'input-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal Input: gpio_keys_polled - suppress deferred probe error for gpio Revert "Input: bcm5974 - check endpoint type before starting traffic" Input: xpad - add additional HyperX Controller Identifiers commit 6dfeb04c467826fe6f808827e19abd5c6336a08d Merge: e6fac3c1f3287 21e59fe2f7221 Author: Linus Torvalds Date: Fri Mar 8 13:01:16 2024 -0800 Merge tag 'sound-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes. Half of them are HD-audio quirks while the rest are various device-specific ASoC fixes" * tag 'sound-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll ASoC: wm8962: Enable both SPKOUTR_ENA and SPKOUTL_ENA in mono mode ASoC: wm8962: Enable oscillator if selecting WM8962_FLL_OSC ASoC: dt-bindings: nvidia: Fix 'lge' vendor prefix ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook ASoC: amd: yc: Add HP Pavilion Aero Laptop 13-be2xxx(8BD6) into DMI quirk table ASoC: rcar: adg: correct TIMSEL setting for SSI9 ALSA: hda: cs35l41: Overwrite CS35L41 configuration for ASUS UM5302LA ALSA: hda/realtek: Add quirks for Lenovo Thinkbook 16P laptops ALSA: hda: cs35l41: Support Lenovo Thinkbook 16P ALSA: hda/realtek - Add Headset Mic supported Acer NB platform ALSA: hda: optimize the probe codec process ALSA: hda/realtek - Fix headset Mic no show at resume back for Lenovo ALC897 platform ASoC: Intel: bytcr_rt5640: Add an extra entry for the Chuwi Vi8 tablet ASoC: madera: Fix typo in madera_set_fll_clks shift value commit e6fac3c1f3287735faf1b68e0068f64e6966618d Merge: 3aaa8ce7a3350 b7cc4ff787a57 Author: Linus Torvalds Date: Fri Mar 8 12:44:56 2024 -0800 Merge tag 'drm-fixes-2024-03-08' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Regular fixes (two weeks for i915), scattered across drivers, amdgpu and i915 being the main ones, with nouveau having a couple of fixes. One patch got applied for udl, but reverted soon after as the maintainer has missed some crucial prior discussion. Seems quiet and normal enough for this stage. MAINTAINERS - update email address core: - fix polling in certain configurations buddy: - fix kunit test warning panel: - boe-tv101wum-nl6: timing tuning fixes i915: - Fix to extract HDCP information from primary connector - Check for NULL mmu_interval_notifier before removing - Fix for #10184: Kernel crash on UHD Graphics 730 (Cc stable) - Fix for #10284: Boot delay regresion with PSR - Fix DP connector DSC HW state readout - Selftest fix to convert msecs to jiffies xe: - error path fix amdgpu: - SMU14 fix - Fix possible NULL pointer - VRR fix - pwm fix nouveau: - fix deadlock in new ioctls fail path - fix missing locking around object rbtree udl: - apply and revert format change" * tag 'drm-fixes-2024-03-08' of https://gitlab.freedesktop.org/drm/kernel: (21 commits) nouveau: lock the client object tree. drm/tests/buddy: fix print format drm/xe: Return immediately on tile_init failure drm/amdgpu/pm: Fix the error of pwm1_enable setting drm/amd/display: handle range offsets in VRR ranges drm/amd/display: check dc_link before dereferencing drm/amd/swsmu: modify the gfx activity scaling Revert "drm/udl: Add ARGB8888 as a format" drm/i915/panelreplay: Move out psr_init_dpcd() from init_connector() drm/i915/dp: Fix connector DSC HW state readout drm/i915/selftests: Fix dependency of some timeouts on HZ drm/udl: Add ARGB8888 as a format drm/nouveau: fix stale locked mutex in nouveau_gem_ioctl_pushbuf drm/i915: Don't explode when the dig port we don't have an AUX CH MAINTAINERS: Update email address for Tvrtko Ursulin drm/panel: boe-tv101wum-nl6: Fine tune Himax83102-j02 panel HFP and HBP (again) drm: Fix output poll work for drm_kms_helper_poll=n drm/i915: Check before removing mm notifier drm/i915/hdcp: Extract hdcp structure from correct connector drm/i915/hdcp: Remove additional timing for reading mst hdcp message ... commit ac168d6770aa12ee201c7474e1361810d5fc723a Author: Tommy Huang Date: Tue Mar 5 09:19:06 2024 +0800 i2c: aspeed: Fix the dummy irq expected print When the i2c error condition occurred and master state was not idle, the master irq function will goto complete state without any other interrupt handling. It would cause dummy irq expected print. Under this condition, assign the irq_status into irq_handle. For example, when the abnormal start / stop occurred (bit 5) with normal stop status (bit 4) at same time. Then the normal stop status would not be handled and it would cause irq expected print in the aspeed_i2c_bus_irq. ... aspeed-i2c-bus x. i2c-bus: irq handled != irq. Expected 0x00000030, but was 0x00000020 ... Fixes: 3e9efc3299dd ("i2c: aspeed: Handle master/slave combined irq events properly") Cc: Jae Hyun Yoo Signed-off-by: Tommy Huang Signed-off-by: Andi Shyti commit 97fd62e3269d2d47cefd421ffe144f9eafab8315 Author: Christophe JAILLET Date: Fri Jan 5 15:39:35 2024 +0100 i2c: wmt: Fix an error handling path in wmt_i2c_probe() wmt_i2c_reset_hardware() calls clk_prepare_enable(). So, should an error occur after it, it should be undone by a corresponding clk_disable_unprepare() call, as already done in the remove function. Fixes: 560746eb79d3 ("i2c: vt8500: Add support for I2C bus on Wondermedia SoCs") Signed-off-by: Christophe JAILLET Signed-off-by: Andi Shyti commit ceb013b2d9a2946035de5e1827624edc85ae9484 Author: Heiner Kallweit Date: Mon Mar 4 21:31:06 2024 +0100 i2c: i801: Avoid potential double call to gpiod_remove_lookup_table If registering the platform device fails, the lookup table is removed in the error path. On module removal we would try to remove the lookup table again. Fix this by setting priv->lookup only if registering the platform device was successful. In addition free the memory allocated for the lookup table in the error path. Fixes: d308dfbf62ef ("i2c: mux/i801: Switch to use descriptor passing") Cc: stable@vger.kernel.org Reviewed-by: Andi Shyti Reviewed-by: Linus Walleij Signed-off-by: Heiner Kallweit Signed-off-by: Andi Shyti commit 09f02902eb9cd41d4b88f4a5b93696297b57a3b0 Author: Heiner Kallweit Date: Sun Mar 3 11:45:22 2024 +0100 i2c: i801: Fix using mux_pdev before it's set i801_probe_optional_slaves() is called before i801_add_mux(). This results in mux_pdev being checked before it's set by i801_add_mux(). Fix this by changing the order of the calls. I consider this safe as I see no dependencies. Fixes: 80e56b86b59e ("i2c: i801: Simplify class-based client device instantiation") Cc: stable@vger.kernel.org Signed-off-by: Heiner Kallweit Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti commit 21e59fe2f7221cdc77b2e5ef90a04c302b237053 Merge: a17bd44c0146b 96e202f8c52ac Author: Takashi Iwai Date: Fri Mar 8 08:53:36 2024 +0100 Merge tag 'asoc-fix-v6.8-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.8 Some more driver specific fixes for v6.8, plus one new x86 platform quirk. All good fixes to have if you have systems that use the relevant hardware. commit b7cc4ff787a572edf2c55caeffaa88cd801eb135 Author: Dave Airlie Date: Wed Feb 28 16:19:47 2024 +1000 nouveau: lock the client object tree. It appears the client object tree has no locking unless I've missed something else. Fix races around adding/removing client objects, mostly vram bar mappings. 4562.099306] general protection fault, probably for non-canonical address 0x6677ed422bceb80c: 0000 [#1] PREEMPT SMP PTI [ 4562.099314] CPU: 2 PID: 23171 Comm: deqp-vk Not tainted 6.8.0-rc6+ #27 [ 4562.099324] Hardware name: Gigabyte Technology Co., Ltd. Z390 I AORUS PRO WIFI/Z390 I AORUS PRO WIFI-CF, BIOS F8 11/05/2021 [ 4562.099330] RIP: 0010:nvkm_object_search+0x1d/0x70 [nouveau] [ 4562.099503] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 0f 1f 44 00 00 48 89 f8 48 85 f6 74 39 48 8b 87 a0 00 00 00 48 85 c0 74 12 <48> 8b 48 f8 48 39 ce 73 15 48 8b 40 10 48 85 c0 75 ee 48 c7 c0 fe [ 4562.099506] RSP: 0000:ffffa94cc420bbf8 EFLAGS: 00010206 [ 4562.099512] RAX: 6677ed422bceb814 RBX: ffff98108791f400 RCX: ffff9810f26b8f58 [ 4562.099517] RDX: 0000000000000000 RSI: ffff9810f26b9158 RDI: ffff98108791f400 [ 4562.099519] RBP: ffff9810f26b9158 R08: 0000000000000000 R09: 0000000000000000 [ 4562.099521] R10: ffffa94cc420bc48 R11: 0000000000000001 R12: ffff9810f02a7cc0 [ 4562.099526] R13: 0000000000000000 R14: 00000000000000ff R15: 0000000000000007 [ 4562.099528] FS: 00007f629c5017c0(0000) GS:ffff98142c700000(0000) knlGS:0000000000000000 [ 4562.099534] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4562.099536] CR2: 00007f629a882000 CR3: 000000017019e004 CR4: 00000000003706f0 [ 4562.099541] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4562.099542] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4562.099544] Call Trace: [ 4562.099555] [ 4562.099573] ? die_addr+0x36/0x90 [ 4562.099583] ? exc_general_protection+0x246/0x4a0 [ 4562.099593] ? asm_exc_general_protection+0x26/0x30 [ 4562.099600] ? nvkm_object_search+0x1d/0x70 [nouveau] [ 4562.099730] nvkm_ioctl+0xa1/0x250 [nouveau] [ 4562.099861] nvif_object_map_handle+0xc8/0x180 [nouveau] [ 4562.099986] nouveau_ttm_io_mem_reserve+0x122/0x270 [nouveau] [ 4562.100156] ? dma_resv_test_signaled+0x26/0xb0 [ 4562.100163] ttm_bo_vm_fault_reserved+0x97/0x3c0 [ttm] [ 4562.100182] ? __mutex_unlock_slowpath+0x2a/0x270 [ 4562.100189] nouveau_ttm_fault+0x69/0xb0 [nouveau] [ 4562.100356] __do_fault+0x32/0x150 [ 4562.100362] do_fault+0x7c/0x560 [ 4562.100369] __handle_mm_fault+0x800/0xc10 [ 4562.100382] handle_mm_fault+0x17c/0x3e0 [ 4562.100388] do_user_addr_fault+0x208/0x860 [ 4562.100395] exc_page_fault+0x7f/0x200 [ 4562.100402] asm_exc_page_fault+0x26/0x30 [ 4562.100412] RIP: 0033:0x9b9870 [ 4562.100419] Code: 85 a8 f7 ff ff 8b 8d 80 f7 ff ff 89 08 e9 18 f2 ff ff 0f 1f 84 00 00 00 00 00 44 89 32 e9 90 fa ff ff 0f 1f 84 00 00 00 00 00 <44> 89 32 e9 f8 f1 ff ff 0f 1f 84 00 00 00 00 00 66 44 89 32 e9 e7 [ 4562.100422] RSP: 002b:00007fff9ba2dc70 EFLAGS: 00010246 [ 4562.100426] RAX: 0000000000000004 RBX: 000000000dd65e10 RCX: 000000fff0000000 [ 4562.100428] RDX: 00007f629a882000 RSI: 00007f629a882000 RDI: 0000000000000066 [ 4562.100432] RBP: 00007fff9ba2e570 R08: 0000000000000000 R09: 0000000123ddf000 [ 4562.100434] R10: 0000000000000001 R11: 0000000000000246 R12: 000000007fffffff [ 4562.100436] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 4562.100446] [ 4562.100448] Modules linked in: nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables libcrc32c nfnetlink cmac bnep sunrpc iwlmvm intel_rapl_msr intel_rapl_common snd_sof_pci_intel_cnl x86_pkg_temp_thermal intel_powerclamp snd_sof_intel_hda_common mac80211 coretemp snd_soc_acpi_intel_match kvm_intel snd_soc_acpi snd_soc_hdac_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof_intel_hda_mlink snd_sof_intel_hda snd_sof kvm snd_sof_utils snd_soc_core snd_hda_codec_realtek libarc4 snd_hda_codec_generic snd_compress snd_hda_ext_core vfat fat snd_hda_intel snd_intel_dspcfg irqbypass iwlwifi snd_hda_codec snd_hwdep snd_hda_core btusb btrtl mei_hdcp iTCO_wdt rapl mei_pxp btintel snd_seq iTCO_vendor_support btbcm snd_seq_device intel_cstate bluetooth snd_pcm cfg80211 intel_wmi_thunderbolt wmi_bmof intel_uncore snd_timer mei_me snd ecdh_generic i2c_i801 [ 4562.100541] ecc mei i2c_smbus soundcore rfkill intel_pch_thermal acpi_pad zram nouveau drm_ttm_helper ttm gpu_sched i2c_algo_bit drm_gpuvm drm_exec mxm_wmi drm_display_helper drm_kms_helper drm crct10dif_pclmul crc32_pclmul nvme e1000e crc32c_intel nvme_core ghash_clmulni_intel video wmi pinctrl_cannonlake ip6_tables ip_tables fuse [ 4562.100616] ---[ end trace 0000000000000000 ]--- Signed-off-by: Dave Airlie Cc: stable@vger.kernel.org commit 83c34dcbe0e947495961e5f6efaadb67004071b5 Merge: b3cdb1928fa81 4ece8fc439c37 Author: Dave Airlie Date: Fri Mar 8 13:37:40 2024 +1000 Merge tag 'drm-misc-fixes-2024-03-07' of https://anongit.freedesktop.org/git/drm/drm-misc into drm-fixes A connector status polling fix, a timings fix for the Himax83102-j02 panel, a deadlock fix for nouveau, A controversial format fix for udl that got reverted to allow further discussion, and a build fix for the drm/buddy kunit tests. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240307-quizzical-auburn-starling-0ade8f@houat commit b3cdb1928fa81c3e3d2111f9376c455958f86678 Merge: 3a397b131d163 0dafaf659cc46 Author: Dave Airlie Date: Fri Mar 8 13:24:40 2024 +1000 Merge tag 'amd-drm-fixes-6.8-2024-03-07' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.8-2024-03-07: amdgpu: - SMU14 fix - Fix possible NULL pointer - VRR fix - pwm fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240307143318.2869884-1-alexander.deucher@amd.com commit 3a397b131d16305792dc940057e5df84a5b4247c Merge: 698236f5993fb a4e7596e20978 Author: Dave Airlie Date: Fri Mar 8 13:16:27 2024 +1000 Merge tag 'drm-xe-fixes-2024-03-07' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - An error path fix. Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/Zema9lLEdtMISljc@fedora commit 698236f5993fb138f7b0c9c26cc59a5e36952f82 Merge: d6a209dd76e5c 984318aaf7b65 Author: Dave Airlie Date: Fri Mar 8 11:31:28 2024 +1000 Merge tag 'drm-intel-fixes-2024-03-07' of https://anongit.freedesktop.org/git/drm/drm-intel into drm-fixes - Fix for #10184: Kernel crash on UHD Graphics 730 (Cc stable) . Fix for #10284: Boot delay regresion with PSR - Fix DP connector DSC HW state readout - Selftest fix to convert msecs to jiffies Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/Zel4jMpJ2Fay5VeJ@jlahtine-mobl.ger.corp.intel.com commit 3aaa8ce7a3350d95b241046ae2401103a4384ba2 Merge: c381c89de1801 ded79af42f114 Author: Linus Torvalds Date: Thu Mar 7 17:16:38 2024 -0800 Merge tag 'mm-hotfixes-stable-2024-03-07-16-17' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "6 hotfixes. 4 are cc:stable and the remainder pertain to post-6.7 issues or aren't considered to be needed in earlier kernel versions" * tag 'mm-hotfixes-stable-2024-03-07-16-17' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: scripts/gdb/symbols: fix invalid escape sequence warning mailmap: fix Kishon's email init/Kconfig: lower GCC version check for -Warray-bounds mm, mmap: fix vma_merge() case 7 with vma_ops->close mm: userfaultfd: fix unexpected change to src_folio when UFFDIO_MOVE fails mm, vmscan: prevent infinite loop for costly GFP_NOIO | __GFP_RETRY_MAYFAIL allocations commit ded79af42f114bb89f8e90c8e7337f5b7bb5f015 Author: Andrew Ballance Date: Sun Mar 3 19:25:07 2024 -0600 scripts/gdb/symbols: fix invalid escape sequence warning With python 3.12, '\.' results in this warning SyntaxWarning: invalid escape sequence '\.' Link: https://lkml.kernel.org/r/20240304012507.240380-1-andrewjballance@gmail.com Signed-off-by: Andrew Ballance Cc: Jan Kiszka Cc: Kieran Bingham Cc: Koudai Iwahori Cc: Kuan-Ying Lee Cc: Luis Chamberlain Cc: Pankaj Raghav Cc: Shuah Khan Signed-off-by: Andrew Morton commit fbf8d71742557abaf558d8efb96742d442720cc2 Author: Mathias Krause Date: Thu Feb 22 15:26:54 2024 +0100 Input: synaptics-rmi4 - fix UAF of IRQ domain on driver removal Calling irq_domain_remove() will lead to freeing the IRQ domain prematurely. The domain is still referenced and will be attempted to get used via rmi_free_function_list() -> rmi_unregister_function() -> irq_dispose_mapping() -> irq_get_irq_data()'s ->domain pointer. With PaX's MEMORY_SANITIZE this will lead to an access fault when attempting to dereference embedded pointers, as in Torsten's report that was faulting on the 'domain->ops->unmap' test. Fix this by releasing the IRQ domain only after all related IRQs have been deactivated. Fixes: 24d28e4f1271 ("Input: synaptics-rmi4 - convert irq distribution to irq_domain") Reported-by: Torsten Hilbrich Signed-off-by: Mathias Krause Link: https://lore.kernel.org/r/20240222142654.856566-1-minipli@grsecurity.net Signed-off-by: Dmitry Torokhov commit c381c89de18015fab265d18d2fa2f30b395be216 Merge: d5c6c9f151c4b 177cddaa5bdfc Author: Linus Torvalds Date: Thu Mar 7 12:21:18 2024 -0800 Merge tag 'spi-fix-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One small fix for the newly added cs42l43 driver which would have caused it problems working in some system configurations by needlessly restricting chip select configurations" * tag 'spi-fix-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: cs42l43: Don't limit native CS to the first chip select commit d5c6c9f151c4b3f5a1e8f59c79814d510c78afab Merge: 135288b73cef4 6717ff5533f33 Author: Linus Torvalds Date: Thu Mar 7 12:18:03 2024 -0800 Merge tag 'regulator-fix-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of small fixes for the rk808 driver, the regulator voltage configurations were incorrectly described. The changes are not expected to have practical impact but given that we're dealing with power it's generally better to follow the hardware specification as closely as we can to avoid unexpected stresses" * tag 'regulator-fix-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: rk808: fix LDO range on RK806 regulator: rk808: fix buck range on RK806 commit 135288b73cef4ccc6e0f8bf1f06bad04128b987d Merge: d0e88885b8865 2c79bd34af13d Author: Linus Torvalds Date: Thu Mar 7 09:36:24 2024 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Will Deacon: "A lonely arm64 fix addressing a kprobes regression that we introduced during the merge window: - Fix recursive kprobes regression when probing the stack unwinder" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: prohibit probing on arch_kunwind_consume_entry() commit d0e88885b8865ad1d57d9fd991f85d410175143b Merge: df4793505abd5 4127caee89612 Author: Linus Torvalds Date: Thu Mar 7 09:31:47 2024 -0800 Merge tag 'erofs-for-6.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "The main one is a KMSAN fix which addresses an issue introduced in this cycle so it'd be much better to fix before releasing, and the remaining one fixes VMA alignment for THP. Summary: - Fix a KMSAN uninit-value issue triggered by a crafted image - Fix VMA alignment for memory mapped files on THP" * tag 'erofs-for-6.8-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: apply proper VMA alignment for memory mapped files on THP erofs: fix uninitialized page cache reported by KMSAN commit df4793505abd5df399bc6d9a4d8fe81761f557cd Merge: 67be068d31d42 ba18deddd6d50 Author: Linus Torvalds Date: Thu Mar 7 09:23:33 2024 -0800 Merge tag 'net-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from bpf, ipsec and netfilter. No solution yet for the stmmac issue mentioned in the last PR, but it proved to be a lockdep false positive, not a blocker. Current release - regressions: - dpll: move all dpll<>netdev helpers to dpll code, fix build regression with old compilers Current release - new code bugs: - page_pool: fix netlink dump stop/resume Previous releases - regressions: - bpf: fix verifier to check bpf_func_state->callback_depth when pruning states as otherwise unsafe programs could get accepted - ipv6: avoid possible UAF in ip6_route_mpath_notify() - ice: reconfig host after changing MSI-X on VF - mlx5: - e-switch, change flow rule destination checking - add a memory barrier to prevent a possible null-ptr-deref - switch to using _bh variant of of spinlock where needed Previous releases - always broken: - netfilter: nf_conntrack_h323: add protection for bmp length out of range - bpf: fix to zero-initialise xdp_rxq_info struct before running XDP program in CPU map which led to random xdp_md fields - xfrm: fix UDP encapsulation in TX packet offload - netrom: fix data-races around sysctls - ice: - fix potential NULL pointer dereference in ice_bridge_setlink() - fix uninitialized dplls mutex usage - igc: avoid returning frame twice in XDP_REDIRECT - i40e: disable NAPI right after disabling irqs when handling xsk_pool - geneve: make sure to pull inner header in geneve_rx() - sparx5: fix use after free inside sparx5_del_mact_entry - dsa: microchip: fix register write order in ksz8_ind_write8() Misc: - selftests: mptcp: fixes for diag.sh" * tag 'net-6.8-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (63 commits) net: pds_core: Fix possible double free in error handling path netrom: Fix data-races around sysctl_net_busy_read netrom: Fix a data-race around sysctl_netrom_link_fails_count netrom: Fix a data-race around sysctl_netrom_routing_control netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout netrom: Fix a data-race around sysctl_netrom_transport_requested_window_size netrom: Fix a data-race around sysctl_netrom_transport_busy_delay netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries netrom: Fix a data-race around sysctl_netrom_transport_timeout netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser netrom: Fix a data-race around sysctl_netrom_default_path_quality netfilter: nf_conntrack_h323: Add protection for bmp length out of range netfilter: nf_tables: mark set as dead when unbinding anonymous set with timeout netfilter: nft_ct: fix l3num expectations with inet pseudo family netfilter: nf_tables: reject constant set with timeout netfilter: nf_tables: disallow anonymous set with timeout flag net/rds: fix WARNING in rds_conn_connect_if_down net: dsa: microchip: fix register write order in ksz8_ind_write8() ... commit ba18deddd6d502da71fd6b6143c53042271b82bd Author: Yongzhi Liu Date: Wed Mar 6 18:57:14 2024 +0800 net: pds_core: Fix possible double free in error handling path When auxiliary_device_add() returns error and then calls auxiliary_device_uninit(), Callback function pdsc_auxbus_dev_release calls kfree(padev) to free memory. We shouldn't call kfree(padev) again in the error handling path. Fix this by cleaning up the redundant kfree() and putting the error handling back to where the errors happened. Fixes: 4569cce43bc6 ("pds_core: add auxiliary_bus devices") Signed-off-by: Yongzhi Liu Reviewed-by: Wojciech Drewek Reviewed-by: Shannon Nelson Link: https://lore.kernel.org/r/20240306105714.20597-1-hyperlyzcs@gmail.com Signed-off-by: Paolo Abeni commit d5b8aff73d159b9157db0ad3281a9af3185d59fa Merge: 6d673e86cd651 767146637efc5 Author: Paolo Abeni Date: Thu Mar 7 11:06:13 2024 +0100 Merge tag 'nf-24-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains fixes for net: Patch #1 disallows anonymous sets with timeout, except for dynamic sets. Anonymous sets with timeouts using the pipapo set backend makes no sense from userspace perspective. Patch #2 rejects constant sets with timeout which has no practical usecase. This kind of set, once bound, contains elements that expire but no new elements can be added. Patch #3 restores custom conntrack expectations with NFPROTO_INET, from Florian Westphal. Patch #4 marks rhashtable anonymous set with timeout as dead from the commit path to avoid that async GC collects these elements. Rules that refers to the anonymous set get released with no mutex held from the commit path. Patch #5 fixes a UBSAN shift overflow in H.323 conntrack helper, from Lena Wang. netfilter pull request 24-03-07 * tag 'nf-24-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_conntrack_h323: Add protection for bmp length out of range netfilter: nf_tables: mark set as dead when unbinding anonymous set with timeout netfilter: nft_ct: fix l3num expectations with inet pseudo family netfilter: nf_tables: reject constant set with timeout netfilter: nf_tables: disallow anonymous set with timeout flag ==================== Link: https://lore.kernel.org/r/20240307021545.149386-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 6d673e86cd6514eda76529d2cab9c4fda7bbd5be Merge: 811b3f9b2ab52 d380ce70058a4 Author: Paolo Abeni Date: Thu Mar 7 10:37:00 2024 +0100 Merge branch 'netrom-fix-all-the-data-races-around-sysctls' Jason Xing says: ==================== netrom: Fix all the data-races around sysctls As the title said, in this patchset I fix the data-race issues because the writer and the reader can manipulate the same value concurrently. ==================== Link: https://lore.kernel.org/r/20240304082046.64977-1-kerneljasonxing@gmail.com Signed-off-by: Paolo Abeni commit d380ce70058a4ccddc3e5f5c2063165dc07672c6 Author: Jason Xing Date: Mon Mar 4 16:20:46 2024 +0800 netrom: Fix data-races around sysctl_net_busy_read We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit bc76645ebdd01be9b9994dac39685a3d0f6f7985 Author: Jason Xing Date: Mon Mar 4 16:20:45 2024 +0800 netrom: Fix a data-race around sysctl_netrom_link_fails_count We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit b5dffcb8f71bdd02a4e5799985b51b12f4eeaf76 Author: Jason Xing Date: Mon Mar 4 16:20:44 2024 +0800 netrom: Fix a data-race around sysctl_netrom_routing_control We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit f99b494b40431f0ca416859f2345746199398e2b Author: Jason Xing Date: Mon Mar 4 16:20:43 2024 +0800 netrom: Fix a data-race around sysctl_netrom_transport_no_activity_timeout We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit a2e706841488f474c06e9b33f71afc947fb3bf56 Author: Jason Xing Date: Mon Mar 4 16:20:42 2024 +0800 netrom: Fix a data-race around sysctl_netrom_transport_requested_window_size We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit 43547d8699439a67b78d6bb39015113f7aa360fd Author: Jason Xing Date: Mon Mar 4 16:20:41 2024 +0800 netrom: Fix a data-race around sysctl_netrom_transport_busy_delay We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit 806f462ba9029d41aadf8ec93f2f99c5305deada Author: Jason Xing Date: Mon Mar 4 16:20:40 2024 +0800 netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit e799299aafed417cc1f32adccb2a0e5268b3f6d5 Author: Jason Xing Date: Mon Mar 4 16:20:39 2024 +0800 netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit 60a7a152abd494ed4f69098cf0f322e6bb140612 Author: Jason Xing Date: Mon Mar 4 16:20:38 2024 +0800 netrom: Fix a data-race around sysctl_netrom_transport_timeout We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit 119cae5ea3f9e35cdada8e572cc067f072fa825a Author: Jason Xing Date: Mon Mar 4 16:20:37 2024 +0800 netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit cfd9f4a740f772298308b2e6070d2c744fb5cf79 Author: Jason Xing Date: Mon Mar 4 16:20:36 2024 +0800 netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initialiser We need to protect the reader reading the sysctl value because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit 958d6145a6d9ba9e075c921aead8753fb91c9101 Author: Jason Xing Date: Mon Mar 4 16:20:35 2024 +0800 netrom: Fix a data-race around sysctl_netrom_default_path_quality We need to protect the reader reading sysctl_netrom_default_path_quality because the value can be changed concurrently. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jason Xing Signed-off-by: Paolo Abeni commit 4ece8fc439c370b1aec26a44b9f94fb214068d42 Author: Matthew Auld Date: Thu Feb 29 09:52:26 2024 +0000 drm/tests/buddy: fix print format This will report a build warning once we have: 806cb2270237 ("kunit: Annotate _MSG assertion variants with gnu printf specifiers"). Reported-by: Stephen Rothwell Fixes: c70703320e55 ("drm/tests/drm_buddy: add alloc_range_bias test") Signed-off-by: Matthew Auld Cc: Arunpravin Paneer Selvam Cc: Christian König Reviewed-by: Arunpravin Paneer Selvam Link: https://lore.kernel.org/r/20240229095225.242795-2-matthew.auld@intel.com Signed-off-by: Maxime Ripard commit a4e7596e209783a7be2727d6b947cbd863c2bbcb Author: Rodrigo Vivi Date: Wed Mar 6 15:31:10 2024 -0500 drm/xe: Return immediately on tile_init failure There's no reason to proceed with applying workaround and initing sysfs if we are going to abort the probe upon failure. Fixes: e5a845fd8fa4 ("drm/xe: Add sysfs entry for tile") Cc: Lucas De Marchi Cc: Matt Roper Cc: Matthew Auld Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240306203110.146387-1-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit af7b93d1d7eeeef674681ddea875be6a29857a5d) Signed-off-by: Thomas Hellström commit 811b3f9b2ab529d1b9605290c2231be7f447d59b Merge: d3eee81fd6111 2ce0eae694cfa Author: Jakub Kicinski Date: Wed Mar 6 20:55:21 2024 -0800 Merge tag 'ipsec-2024-03-06' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2024-03-06 1) Clear the ECN bits flowi4_tos in decode_session4(). This was already fixed but the bug was reintroduced when decode_session4() switched to us the flow dissector. From Guillaume Nault. 2) Fix UDP encapsulation in the TX path with packet offload mode. From Leon Romanovsky, 3) Avoid clang fortify warning in copy_to_user_tmpl(). From Nathan Chancellor. 4) Fix inter address family tunnel in packet offload mode. From Mike Yu. * tag 'ipsec-2024-03-06' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec: xfrm: set skb control buffer based on packet offload as well xfrm: fix xfrm child route lookup for packet offload xfrm: Avoid clang fortify warning in copy_to_user_tmpl() xfrm: Pass UDP encapsulation in TX packet offload xfrm: Clear low order bits of ->flowi4_tos in decode_session4(). ==================== Link: https://lore.kernel.org/r/20240306100438.3953516-1-steffen.klassert@secunet.com Signed-off-by: Jakub Kicinski commit d3eee81fd6111eb404318ddbaded3f86c7f21d70 Merge: c055fc00c07be 2487007aa3b9f Author: Jakub Kicinski Date: Wed Mar 6 20:21:01 2024 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2024-03-06 We've added 5 non-merge commits during the last 1 day(s) which contain a total of 5 files changed, 77 insertions(+), 4 deletions(-). The main changes are: 1) Fix BPF verifier to check bpf_func_state->callback_depth when pruning states as otherwise unsafe programs could get accepted, from Eduard Zingerman. 2) Fix to zero-initialise xdp_rxq_info struct before running XDP program in CPU map which led to random xdp_md fields, from Toke Høiland-Jørgensen. 3) Fix bonding XDP feature flags calculation when bonding device has no slave devices anymore, from Daniel Borkmann. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: cpumap: Zero-initialise xdp_rxq_info struct before running XDP program selftests/bpf: Fix up xdp bonding test wrt feature flags xdp, bonding: Fix feature flags when there are no slave devs anymore selftests/bpf: test case for callback_depth states pruning logic bpf: check bpf_func_state->callback_depth when pruning states ==================== Link: https://lore.kernel.org/r/20240306220309.13534-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 4127caee89612a84adedd78c9453089138cd5afe Author: Gao Xiang Date: Wed Mar 6 13:31:38 2024 +0800 erofs: apply proper VMA alignment for memory mapped files on THP There are mainly two reasons that thp_get_unmapped_area() should be used for EROFS as other filesystems: - It's needed to enable PMD mappings as a FSDAX filesystem, see commit 74d2fad1334d ("thp, dax: add thp_get_unmapped_area for pmd mappings"); - It's useful together with large folios and CONFIG_READ_ONLY_THP_FOR_FS which enable THPs for mmapped files (e.g. shared libraries) even without FSDAX. See commit 1854bc6e2420 ("mm/readahead: Align file mappings for non-DAX"). Fixes: 06252e9ce05b ("erofs: dax support for non-tailpacking regular file") Fixes: ce529cc25b18 ("erofs: enable large folios for iomap mode") Fixes: e6687b89225e ("erofs: enable large folios for fscache mode") Reviewed-by: Jingbo Xu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240306053138.2240206-1-hsiangkao@linux.alibaba.com commit 893e5e9b7369a02e7ceaa6d98db6739162005b03 Author: Gao Xiang Date: Mon Mar 4 11:53:39 2024 +0800 erofs: fix uninitialized page cache reported by KMSAN syzbot reports a KMSAN reproducer [1] which generates a crafted filesystem image and causes IMA to read uninitialized page cache. Later, (rq->outputsize > rq->inputsize) will be formally supported after either large uncompressed pclusters (> block size) or big lclusters are landed. However, currently there is no way to generate such filesystems by using mkfs.erofs. Thus, let's mark this condition as unsupported for now. [1] https://lore.kernel.org/r/0000000000002be12a0611ca7ff8@google.com Reported-and-tested-by: syzbot+7bc44a489f0ef0670bd5@syzkaller.appspotmail.com Fixes: 1ca01520148a ("erofs: refine z_erofs_transform_plain() for sub-page block support") Reviewed-by: Sandeep Dhavale Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240304035339.425857-1-hsiangkao@linux.alibaba.com commit 767146637efc528b5e3d31297df115e85a2fd362 Author: Lena Wang Date: Tue Mar 5 11:38:55 2024 +0000 netfilter: nf_conntrack_h323: Add protection for bmp length out of range UBSAN load reports an exception of BRK#5515 SHIFT_ISSUE:Bitwise shifts that are out of bounds for their data type. vmlinux get_bitmap(b=75) + 712 vmlinux decode_seq(bs=0xFFFFFFD008037000, f=0xFFFFFFD008037018, level=134443100) + 1956 vmlinux decode_choice(base=0xFFFFFFD0080370F0, level=23843636) + 1216 vmlinux decode_seq(f=0xFFFFFFD0080371A8, level=134443500) + 812 vmlinux decode_choice(base=0xFFFFFFD008037280, level=0) + 1216 vmlinux DecodeRasMessage() + 304 vmlinux ras_help() + 684 vmlinux nf_confirm() + 188 Due to abnormal data in skb->data, the extension bitmap length exceeds 32 when decoding ras message then uses the length to make a shift operation. It will change into negative after several loop. UBSAN load could detect a negative shift as an undefined behaviour and reports exception. So we add the protection to avoid the length exceeding 32. Or else it will return out of range error and stop decoding. Fixes: 5e35941d9901 ("[NETFILTER]: Add H.323 conntrack/NAT helper") Signed-off-by: Lena Wang Signed-off-by: Pablo Neira Ayuso commit 552705a3650bbf46a22b1adedc1b04181490fc36 Author: Pablo Neira Ayuso Date: Mon Mar 4 14:22:12 2024 +0100 netfilter: nf_tables: mark set as dead when unbinding anonymous set with timeout While the rhashtable set gc runs asynchronously, a race allows it to collect elements from anonymous sets with timeouts while it is being released from the commit path. Mingi Cho originally reported this issue in a different path in 6.1.x with a pipapo set with low timeouts which is not possible upstream since 7395dfacfff6 ("netfilter: nf_tables: use timestamp to check for set element timeout"). Fix this by setting on the dead flag for anonymous sets to skip async gc in this case. According to 08e4c8c5919f ("netfilter: nf_tables: mark newset as dead on transaction abort"), Florian plans to accelerate abort path by releasing objects via workqueue, therefore, this sets on the dead flag for abort path too. Cc: stable@vger.kernel.org Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane") Reported-by: Mingi Cho Signed-off-by: Pablo Neira Ayuso commit 99993789966a6eb4f1295193dc543686899892d3 Author: Florian Westphal Date: Fri Mar 1 13:38:15 2024 +0100 netfilter: nft_ct: fix l3num expectations with inet pseudo family Following is rejected but should be allowed: table inet t { ct expectation exp1 { [..] l3proto ip Valid combos are: table ip t, l3proto ip table ip6 t, l3proto ip6 table inet t, l3proto ip OR l3proto ip6 Disallow inet pseudeo family, the l3num must be a on-wire protocol known to conntrack. Retain NFPROTO_INET case to make it clear its rejected intentionally rather as oversight. Fixes: 8059918a1377 ("netfilter: nft_ct: sanitize layer 3 and 4 protocol number in custom expectations") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 5f4fc4bd5cddb4770ab120ce44f02695c4505562 Author: Pablo Neira Ayuso Date: Fri Mar 1 01:04:11 2024 +0100 netfilter: nf_tables: reject constant set with timeout This set combination is weird: it allows for elements to be added/deleted, but once bound to the rule it cannot be updated anymore. Eventually, all elements expire, leading to an empty set which cannot be updated anymore. Reject this flags combination. Cc: stable@vger.kernel.org Fixes: 761da2935d6e ("netfilter: nf_tables: add set timeout API support") Signed-off-by: Pablo Neira Ayuso commit 16603605b667b70da974bea8216c93e7db043bf1 Author: Pablo Neira Ayuso Date: Fri Mar 1 00:11:10 2024 +0100 netfilter: nf_tables: disallow anonymous set with timeout flag Anonymous sets are never used with timeout from userspace, reject this. Exception to this rule is NFT_SET_EVAL to ensure legacy meters still work. Cc: stable@vger.kernel.org Fixes: 761da2935d6e ("netfilter: nf_tables: add set timeout API support") Reported-by: lonial con Signed-off-by: Pablo Neira Ayuso commit 0dafaf659cc463f2db0af92003313a8bc46781cd Author: Ma Jun Date: Fri Mar 1 15:36:58 2024 +0800 drm/amdgpu/pm: Fix the error of pwm1_enable setting Fix the pwm_mode value error which used for pwm1_enable setting Signed-off-by: Ma Jun Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 937844d661354bf142dc1c621396fdab10ecbacc Author: Alex Deucher Date: Wed Feb 28 15:59:22 2024 -0500 drm/amd/display: handle range offsets in VRR ranges Need to check the offset bits for values greater than 255. v2: also update amdgpu_dm_connector values. Suggested-by: Mano Ségransan Tested-by: Mano Ségransan Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3203 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit e9098cc9aef13bd56e821f628c83f709d3347af1 Author: Melissa Wen Date: Tue Feb 27 16:08:25 2024 -0300 drm/amd/display: check dc_link before dereferencing drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6683 amdgpu_dm_connector_funcs_force() warn: variable dereferenced before check 'dc_link' (see line 6663) Fixes: 967176179215 ("drm/amd/display: fix null-pointer dereference on edid reading") Reported-by: Dan Carpenter Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 6601c15c8a0680edb0d23a13151adb8023959149 Author: Li Ma Date: Wed Feb 28 17:36:28 2024 +0800 drm/amd/swsmu: modify the gfx activity scaling Add an if condition for gfx activity because the scaling has been changed after smu fw version 5d4600. And remove a warning log. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.7.x commit 095fe4891282be510af0db1b03587b512c0de31d Author: Steven Rostedt (Google) Date: Mon Mar 4 22:34:33 2024 -0500 tracing: Limit trace_marker writes to just 4K Limit the max print event of trace_marker to just 4K string size. This must also be less than the amount that can be held by a trace_seq along with the text that is before the output (like the task name, PID, CPU, state, etc). As trace_seq is made to handle large events (some greater than 4K). Make the max size of a trace_marker write event be 4K which is guaranteed to fit in the trace_seq buffer. Link: https://lore.kernel.org/linux-trace-kernel/20240304223433.4ba47dff@gandalf.local.home Suggested-by: Linus Torvalds Reviewed-by: Mathieu Desnoyers Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 6f42249fecb94dfb6514ed241475f748c03d62fb Author: Steven Rostedt (Google) Date: Mon Mar 4 19:13:42 2024 -0500 tracing: Limit trace_seq size to just 8K and not depend on architecture PAGE_SIZE The trace_seq buffer is used to print out entire events. It's typically set to PAGE_SIZE * 2 as there's some events that can be quite large. As a side effect, writes to trace_marker is limited by both the size of the trace_seq buffer as well as the ring buffer's sub-buffer size (which is a power of PAGE_SIZE). By limiting the trace_seq size, it also limits the size of the largest string written to trace_marker. trace_seq does not need to be dependent on PAGE_SIZE like the ring buffer sub-buffers need to be. Hard code it to 8K which is PAGE_SIZE * 2 on most architectures. This will also limit the size of trace_marker on those architectures with greater than 4K PAGE_SIZE. Link: https://lore.kernel.org/all/20240302111244.3a1674be@gandalf.local.home/ Link: https://lore.kernel.org/linux-trace-kernel/20240304191342.56fb1087@gandalf.local.home Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Linus Torvalds Cc: Sachin Sant Signed-off-by: Steven Rostedt (Google) commit 5efd3e2aef91d2d812290dcb25b2058e6f3f532c Author: Steven Rostedt (Google) Date: Mon Mar 4 17:43:41 2024 -0500 tracing: Remove precision vsnprintf() check from print event This reverts 60be76eeabb3d ("tracing: Add size check when printing trace_marker output"). The only reason the precision check was added was because of a bug that miscalculated the write size of the string into the ring buffer and it truncated it removing the terminating nul byte. On reading the trace it crashed the kernel. But this was due to the bug in the code that happened during development and should never happen in practice. If anything, the precision can hide bugs where the string in the ring buffer isn't nul terminated and it will not be checked. Link: https://lore.kernel.org/all/C7E7AF1A-D30F-4D18-B8E5-AF1EF58004F5@linux.ibm.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240227125706.04279ac2@gandalf.local.home Link: https://lore.kernel.org/all/20240302111244.3a1674be@gandalf.local.home/ Link: https://lore.kernel.org/linux-trace-kernel/20240304174341.2a561d9f@gandalf.local.home Cc: Masami Hiramatsu Cc: Linus Torvalds Fixes: 60be76eeabb3d ("tracing: Add size check when printing trace_marker output") Reported-by: Sachin Sant Tested-by: Sachin Sant Reviewed-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (Google) commit 177cddaa5bdfcbc4c3d4594bb44ed8338765fc29 Author: Charles Keepax Date: Wed Mar 6 16:10:04 2024 +0000 spi: cs42l43: Don't limit native CS to the first chip select As the chip selects can be configured through ACPI/OF/swnode, and the set_cs() callback will only be called when a native chip select is being used, there is no reason for the driver to only support the native chip select as the first chip select. Remove the check that introduces this limitation. Fixes: ef75e767167a ("spi: cs42l43: Add SPI controller support") Signed-off-by: Charles Keepax Link: https://msgid.link/r/20240306161004.2205113-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 96e202f8c52ac49452f83317cf3b34cd1ad81e18 Author: Stuart Henderson Date: Wed Mar 6 16:14:39 2024 +0000 ASoC: wm8962: Fix up incorrect error message in wm8962_set_fll Use source instead of ret, which seems to be unrelated and will always be zero. Signed-off-by: Stuart Henderson Link: https://msgid.link/r/20240306161439.1385643-5-stuarth@opensource.cirrus.com Signed-off-by: Mark Brown commit 6fa849e4d78b880e878138bf238e4fd2bac3c4fa Author: Stuart Henderson Date: Wed Mar 6 16:14:36 2024 +0000 ASoC: wm8962: Enable both SPKOUTR_ENA and SPKOUTL_ENA in mono mode Signed-off-by: Stuart Henderson Link: https://msgid.link/r/20240306161439.1385643-2-stuarth@opensource.cirrus.com Signed-off-by: Mark Brown commit 03c7874106ca5032a312626b927b1c35f07b1f35 Author: Stuart Henderson Date: Wed Mar 6 16:14:35 2024 +0000 ASoC: wm8962: Enable oscillator if selecting WM8962_FLL_OSC Signed-off-by: Stuart Henderson Link: https://msgid.link/r/20240306161439.1385643-1-stuarth@opensource.cirrus.com Signed-off-by: Mark Brown commit 67be068d31d423b857ffd8c34dbcc093f8dfff76 Merge: 5274d261404c2 a50026bdb867c Author: Linus Torvalds Date: Wed Mar 6 08:12:27 2024 -0800 Merge tag 'vfs-6.8-release.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Get rid of copy_mc flag in iov_iter which really only makes sense for the core dumping code so move it out of the generic iov iter code and make it coredump's problem. See the detailed commit description. - Revert fs/aio: Make io_cancel() generate completions again The initial fix here was predicated on the assumption that calling ki_cancel() didn't complete aio requests. However, that turned out to be wrong since the two drivers that actually make use of this set a cancellation function that performs the cancellation correctly. So revert this change. - Ensure that the test for IOCB_AIO_RW always happens before the read from ki_ctx. * tag 'vfs-6.8-release.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: iov_iter: get rid of 'copy_mc' flag fs/aio: Check IOCB_AIO_RW before the struct aio_kiocb conversion Revert "fs/aio: Make io_cancel() generate completions again" commit 5274d261404c22b8b966d20c09b2ebea3cad7aaf Merge: 09dcdbac54f4e 1c7cfb6158f66 Author: Linus Torvalds Date: Wed Mar 6 08:01:34 2024 -0800 Merge tag 'arm-fixes-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "These should be the final fixes for the soc tree for 6.8, as usual they mostly deal wtih dts files: - Qualcomm fixes for pcie4 on sc8280xp, a revert of msm8996 mpm support, sm6115 interconnect and sm8650 gpio. - Two fixes for Tegra234 ethernet - A Makefile fix to actually build the allwinner based orange pi zero 2w device tree - Fixes for clocks and reset on imx8mp and a DSI display regression on imx7. The non-DT fixes are: - Firmware fixes addressing a kernel panic in op-tee and a minor regression in microchip/riscv. - A defconfig change to bring back backlight support after a Kconfig change" * tag 'arm-fixes-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: firmware: microchip: Fix over-requested allocation size tee: optee: Fix kernel panic caused by incorrect error handling Revert "arm64: dts: qcom: msm8996: Hook up MPM" arm64: dts: qcom: sc8280xp-x13s: limit pcie4 link speed arm64: dts: qcom: sc8280xp-crd: limit pcie4 link speed arm64: dts: imx8mp: Fix LDB clocks property arm64: dts: imx8mp: Fix TC9595 reset GPIO on DH i.MX8M Plus DHCOM SoM MAINTAINERS: Use a proper mailinglist for NXP i.MX development ARM: dts: imx7: remove DSI port endpoints arm64: dts: allwinner: h616: Add Orange Pi Zero 2W to Makefile ARM: imx_v6_v7_defconfig: Restore CONFIG_BACKLIGHT_CLASS_DEVICE arm64: tegra: Fix Tegra234 MGBE power-domains arm64: tegra: Set the correct PHY mode for MGBE arm64: dts: qcom: sm6115: Fix missing interconnect-names arm64: dts: qcom: sm8650-mtp: add gpio74 as reserved gpio arm64: dts: qcom: sm8650-qrd: add gpio74 as reserved gpio commit 09dcdbac54f4e60c917251fea98a69e46817fe27 Merge: 5847c9777c303 c0afb6b88fbbc Author: Linus Torvalds Date: Wed Mar 6 07:56:16 2024 -0800 Merge tag 'v6.8-p6' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "Fix potential use-after-frees in rk3288 and sun8i-ce" * tag 'v6.8-p6' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: rk3288 - Fix use after free in unprepare crypto: sun8i-ce - Fix use after free in unprepare commit 317f86dc1b8e219e799271042a17d56a95a935bc Author: Douglas Anderson Date: Wed Mar 6 06:37:22 2024 -0800 Revert "drm/udl: Add ARGB8888 as a format" This reverts commit 95bf25bb9ed5dedb7fb39f76489f7d6843ab0475. Apparently there was a previous discussion about emulation of formats and it was decided XRGB8888 was the only format to support for legacy userspace [1]. Remove ARGB8888. Userspace needs to be fixed to accept XRGB8888. [1] https://lore.kernel.org/r/60dc7697-d7a0-4bf4-a22e-32f1bbb792c2@suse.de Acked-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240306063721.1.I4a32475190334e1fa4eef4700ecd2787a43c94b5@changeid commit 47b412c1ea77112f1148b4edd71700a388c7c80f Author: Johan Hovold Date: Sat Feb 17 16:02:28 2024 +0100 phy: qcom-qmp-combo: fix type-c switch registration Due to a long-standing issue in driver core, drivers may not probe defer after having registered child devices to avoid triggering a probe deferral loop (see fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER")). Move registration of the typec switch to after looking up clocks and other resources. Note that PHY creation can in theory also trigger a probe deferral when a 'phy' supply is used. This does not seem to affect the QMP PHY driver but the PHY subsystem should be reworked to address this (i.e. by separating initialisation and registration of the PHY). Fixes: 2851117f8f42 ("phy: qcom-qmp-combo: Introduce orientation switching") Cc: stable@vger.kernel.org # 6.5 Cc: Bjorn Andersson Signed-off-by: Johan Hovold Reviewed-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Acked-by: Vinod Koul Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20240217150228.5788-7-johan+linaro@kernel.org Signed-off-by: Vinod Koul commit d2d7b8e88023b75320662c2305d61779ff060950 Author: Johan Hovold Date: Sat Feb 17 16:02:27 2024 +0100 phy: qcom-qmp-combo: fix drm bridge registration Due to a long-standing issue in driver core, drivers may not probe defer after having registered child devices to avoid triggering a probe deferral loop (see fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER")). This could potentially also trigger a bug in the DRM bridge implementation which does not expect bridges to go away even if device links may avoid triggering this (when enabled). Move registration of the DRM aux bridge to after looking up clocks and other resources. Note that PHY creation can in theory also trigger a probe deferral when a 'phy' supply is used. This does not seem to affect the QMP PHY driver but the PHY subsystem should be reworked to address this (i.e. by separating initialisation and registration of the PHY). Fixes: 35921910bbd0 ("phy: qcom: qmp-combo: switch to DRM_AUX_BRIDGE") Fixes: 1904c3f578dc ("phy: qcom-qmp-combo: Introduce drm_bridge") Cc: stable@vger.kernel.org # 6.5 Cc: Bjorn Andersson Cc: Dmitry Baryshkov Signed-off-by: Johan Hovold Reviewed-by: Neil Armstrong Reviewed-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Acked-by: Vinod Koul Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20240217150228.5788-6-johan+linaro@kernel.org Signed-off-by: Vinod Koul commit 984318aaf7b6516d03a2971a4a37bab4ea648461 Author: Animesh Manna Date: Thu Feb 29 10:07:16 2024 +0530 drm/i915/panelreplay: Move out psr_init_dpcd() from init_connector() Move psr_init_dpcd() from init-connector to connector-detect function. The dpcd probe for checking panel replay capability for external dp connector is causing delay during boot which can be optimized by moving dpcd probe to connector specific detect(). v1: Initial version. v2: Add details in commit description. [Jani] Suggested-by: Ville Syrjälä Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10284 Signed-off-by: Animesh Manna Fixes: cceeaa312d39 ("drm/i915/panelreplay: Enable panel replay dpcd initialization for DP") Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240229043716.4065760-1-animesh.manna@intel.com (cherry picked from commit 1cca19bf296fae0636a637b48d195ac6b4d430c9) Signed-off-by: Joonas Lahtinen commit 575801663c7dc38f826212b39e3b91a4a8661c33 Author: Edmund Raile Date: Thu Feb 29 14:47:59 2024 +0000 firewire: ohci: prevent leak of left-over IRQ on unbind Commit 5a95f1ded28691e6 ("firewire: ohci: use devres for requested IRQ") also removed the call to free_irq() in pci_remove(), leading to a leftover irq of devm_request_irq() at pci_disable_msi() in pci_remove() when unbinding the driver from the device remove_proc_entry: removing non-empty directory 'irq/136', leaking at least 'firewire_ohci' Call Trace: ? remove_proc_entry+0x19c/0x1c0 ? __warn+0x81/0x130 ? remove_proc_entry+0x19c/0x1c0 ? report_bug+0x171/0x1a0 ? console_unlock+0x78/0x120 ? handle_bug+0x3c/0x80 ? exc_invalid_op+0x17/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? remove_proc_entry+0x19c/0x1c0 unregister_irq_proc+0xf4/0x120 free_desc+0x3d/0xe0 ? kfree+0x29f/0x2f0 irq_free_descs+0x47/0x70 msi_domain_free_locked.part.0+0x19d/0x1d0 msi_domain_free_irqs_all_locked+0x81/0xc0 pci_free_msi_irqs+0x12/0x40 pci_disable_msi+0x4c/0x60 pci_remove+0x9d/0xc0 [firewire_ohci 01b483699bebf9cb07a3d69df0aa2bee71db1b26] pci_device_remove+0x37/0xa0 device_release_driver_internal+0x19f/0x200 unbind_store+0xa1/0xb0 remove irq with devm_free_irq() before pci_disable_msi() also remove it in fail_msi: of pci_probe() as this would lead to an identical leak Cc: stable@vger.kernel.org Fixes: 5a95f1ded28691e6 ("firewire: ohci: use devres for requested IRQ") Signed-off-by: Edmund Raile Link: https://lore.kernel.org/r/20240229144723.13047-2-edmund.raile@proton.me Signed-off-by: Takashi Sakamoto commit 0848814aa296ca13e4f03848f35d2d29fc7fc30c Author: Imre Deak Date: Mon Feb 5 15:26:31 2024 +0200 drm/i915/dp: Fix connector DSC HW state readout The DSC HW state of DP connectors is read out during driver loading and system resume in intel_modeset_update_connector_atomic_state(). This function is called for all connectors though and so the state of DSI connectors will also get updated incorrectly, triggering a WARN there wrt. the DSC decompression AUX device. Fix the above by moving the DSC state readout to a new DP connector specific sync_state() hook. This is anyway the logical place to update the connector object's state vs. the connector's atomic state. Fixes: b2608c6b3212 ("drm/i915/dp_mst: Enable MST DSC decompression for all streams") Reported-and-tested-by: Drew Davenport Closes: https://lore.kernel.org/all/Zb0q8IDVXS0HxJyj@chromium.org Reviewed-by: Ankit Nautiyal Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240205132631.1588577-1-imre.deak@intel.com (cherry picked from commit a62e145981500996ea76af3d740ce0c0d74c5be0) Signed-off-by: Joonas Lahtinen commit 26d2b757fff02bbe971abc39071e263aa0cab924 Author: Janusz Krzysztofik Date: Thu Feb 22 12:32:40 2024 +0100 drm/i915/selftests: Fix dependency of some timeouts on HZ Third argument of i915_request_wait() accepts a timeout value in jiffies. Most users pass either a simple HZ based expression, or a result of msecs_to_jiffies(), or MAX_SCHEDULE_TIMEOUT, or a very small number not exceeding 4 if applicable as that value. However, there is one user -- intel_selftest_wait_for_rq() -- that passes a WAIT_FOR_RESET_TIME symbol, defined as a large constant value that most probably represents a desired timeout in ms. While that usage results in the intended value of timeout on usual x86_64 kernel configurations, it is not portable across different architectures and custom kernel configs. Rename the symbol to clearly indicate intended units and convert it to jiffies before use. Fixes: 3a4bfa091c46 ("drm/i915/selftest: Fix workarounds selftest for GuC submission") Signed-off-by: Janusz Krzysztofik Cc: Rahul Kumar Singh Cc: John Harrison Cc: Matthew Brost Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240222113347.648945-2-janusz.krzysztofik@linux.intel.com (cherry picked from commit 6ee3f54b880c91ab2e244eb4ffd4bfed37832b25) Signed-off-by: Joonas Lahtinen commit c055fc00c07be1f0df7375ab0036cebd1106ed38 Author: Edward Adam Davis Date: Tue Mar 5 08:13:08 2024 +0800 net/rds: fix WARNING in rds_conn_connect_if_down If connection isn't established yet, get_mr() will fail, trigger connection after get_mr(). Fixes: 584a8279a44a ("RDS: RDMA: return appropriate error on rdma map failures") Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Signed-off-by: David S. Miller commit 321e3c3de53c7530cd518219d01f04e7e32a9d23 Author: Xiubo Li Date: Wed Mar 6 09:05:44 2024 +0800 libceph: init the cursor when preparing sparse read in msgr2 The cursor is no longer initialized in the OSD client, causing the sparse read state machine to fall into an infinite loop. The cursor should be initialized in IN_S_PREPARE_SPARSE_DATA state. [ idryomov: use msg instead of con->in_msg, changelog ] Link: https://tracker.ceph.com/issues/64607 Fixes: 8e46a2d068c9 ("libceph: just wait for more data to be available on the socket") Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Tested-by: Luis Henriques Signed-off-by: Ilya Dryomov commit f287d6aafda7e59fddc9316fe6f0c46c64847f10 Merge: b7fb7729c94fb ba54b1a276a6b Author: David S. Miller Date: Wed Mar 6 10:28:02 2024 +0000 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-03-05 (idpf, ice, i40e, igc, e1000e) This series contains updates to idpf, ice, i40e, igc and e1000e drivers. Emil disables local BH on NAPI schedule for proper handling of softirqs on idpf. Jake stops reporting of virtchannel RSS option which in unsupported on ice. Rand Deeb adds null check to prevent possible null pointer dereference on ice. Michal Schmidt moves DPLL mutex initialization to resolve uninitialized mutex usage for ice. Jesse fixes incorrect variable usage for calculating Tx stats on ice. Ivan Vecera corrects logic for firmware equals check on i40e. Florian Kauer prevents memory corruption for XDP_REDIRECT on igc. Sasha reverts an incorrect use of FIELD_GET which caused a regression for Wake on LAN on e1000e. ==================== Signed-off-by: David S. Miller commit a50026bdb867c8caf9d29e18f9fe9e1390312619 Author: Linus Torvalds Date: Tue Mar 5 21:33:36 2024 +0800 iov_iter: get rid of 'copy_mc' flag This flag is only set by one single user: the magical core dumping code that looks up user pages one by one, and then writes them out using their kernel addresses (by using a BVEC_ITER). That actually ends up being a huge problem, because while we do use copy_mc_to_kernel() for this case and it is able to handle the possible machine checks involved, nothing else is really ready to handle the failures caused by the machine check. In particular, as reported by Tong Tiangen, we don't actually support fault_in_iov_iter_readable() on a machine check area. As a result, the usual logic for writing things to a file under a filesystem lock, which involves doing a copy with page faults disabled and then if that fails trying to fault pages in without holding the locks with fault_in_iov_iter_readable() does not work at all. We could decide to always just make the MC copy "succeed" (and filling the destination with zeroes), and that would then create a core dump file that just ignores any machine checks. But honestly, this single special case has been problematic before, and means that all the normal iov_iter code ends up slightly more complex and slower. See for example commit c9eec08bac96 ("iov_iter: Don't deal with iter->copy_mc in memcpy_from_iter_mc()") where David Howells re-organized the code just to avoid having to check the 'copy_mc' flags inside the inner iov_iter loops. So considering that we have exactly one user, and that one user is a non-critical special case that doesn't actually ever trigger in real life (Tong found this with manual error injection), the sane solution is to just decide that the onus on handling the machine check lines on that user instead. Ergo, do the copy_mc_to_kernel() in the core dump logic itself, copying the user data to a stable kernel page before writing it out. Fixes: f1982740f5e7 ("iov_iter: Convert iterate*() to inline funcs") Signed-off-by: Linus Torvalds Signed-off-by: Tong Tiangen Link: https://lore.kernel.org/r/20240305133336.3804360-1-tongtiangen@huawei.com Link: https://lore.kernel.org/all/4e80924d-9c85-f13a-722a-6a5d2b1c225a@huawei.com/ Tested-by: David Howells Reviewed-by: David Howells Reviewed-by: Jens Axboe Reported-by: Tong Tiangen Signed-off-by: Christian Brauner commit 2ce0eae694cfa8d0f5e4fa396015fc68c5958e8d Merge: 1a807e46aa93e 8688ab2170a5b Author: Steffen Klassert Date: Wed Mar 6 10:33:24 2024 +0100 Merge branch 'Improve packet offload for dual stack' Mike Yu says: ==================== In the XFRM stack, whether a packet is forwarded to the IPv4 or IPv6 stack depends on the family field of the matched SA. This does not completely work for IPsec packet offload in some scenario, for example, sending an IPv6 packet that will be encrypted and encapsulated as an IPv4 packet in HW. Here are the patches to make IPsec packet offload work on the mentioned scenario. ==================== Signed-off-by: Steffen Klassert commit 1c7cfb6158f6678374ed42393b013b379b4c3964 Merge: 415ba4ed598df af1e0a7d39f98 Author: Arnd Bergmann Date: Wed Mar 6 07:42:07 2024 +0100 Merge tag 'riscv-firmware-for-v6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes RISC-V firmware drivers for v6.9 A single minor fix for an oversized allocation due to sizeof() misuse by yours truly that came in since I sent my last fixes PR. Signed-off-by: Conor Dooley * tag 'riscv-firmware-for-v6.9' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: firmware: microchip: Fix over-requested allocation size Link: https://lore.kernel.org/r/20240305-vicinity-dumpling-8943ef26f004@spud Signed-off-by: Arnd Bergmann commit 415ba4ed598dff761915a2fbe5d0651a8a526674 Merge: 64b9175055a6a 4f423c4cbe26d Author: Arnd Bergmann Date: Wed Mar 6 07:23:49 2024 +0100 Merge tag 'qcom-arm64-fixes-for-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes A few more Qualcomm Arm64 DeviceTree fixes for v6.8 This reduces the link speed of the PCIe bus with WiFi-card connected on the Lenovo ThinkPad X13s and the Qualcomm Compute Reference Device, avoid link errors and initialization issues reported by users. It also reverts the enablement of MPM on MSM8996, which is reported to prevent boards on this platform from booting for some users. * tag 'qcom-arm64-fixes-for-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: Revert "arm64: dts: qcom: msm8996: Hook up MPM" arm64: dts: qcom: sc8280xp-x13s: limit pcie4 link speed arm64: dts: qcom: sc8280xp-crd: limit pcie4 link speed Link: https://lore.kernel.org/r/20240306031208.4218-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit b7fb7729c94fb2d23c79ff44f7a2da089c92d81c Author: Tobias Jakobi (Compleo) Date: Mon Mar 4 16:41:35 2024 +0100 net: dsa: microchip: fix register write order in ksz8_ind_write8() This bug was noticed while re-implementing parts of the kernel driver in userspace using spidev. The goal was to enable some of the errata workarounds that Microchip describes in their errata sheet [1]. Both the errata sheet and the regular datasheet of e.g. the KSZ8795 imply that you need to do this for indirect register accesses: - write a 16-bit value to a control register pair (this value consists of the indirect register table, and the offset inside the table) - either read or write an 8-bit value from the data storage register (indicated by REG_IND_BYTE in the kernel) The current implementation has the order swapped. It can be proven, by reading back some indirect register with known content (the EEE register modified in ksz8_handle_global_errata() is one of these), that this implementation does not work. Private discussion with Oleksij Rempel of Pengutronix has revealed that the workaround was apparantly never tested on actual hardware. [1] https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/Errata/KSZ87xx-Errata-DS80000687C.pdf Signed-off-by: Tobias Jakobi (Compleo) Reviewed-by: Oleksij Rempel Fixes: 7b6e6235b664 ("net: dsa: microchip: ksz8795: handle eee specif erratum") Link: https://lore.kernel.org/r/20240304154135.161332-1-tobias.jakobi.compleo@gmail.com Signed-off-by: Jakub Kicinski commit 289e922582af5b4721ba02e86bde4d9ba918158a Author: Jakub Kicinski Date: Mon Mar 4 17:35:32 2024 -0800 dpll: move all dpll<>netdev helpers to dpll code Older versions of GCC really want to know the full definition of the type involved in rcu_assign_pointer(). struct dpll_pin is defined in a local header, net/core can't reach it. Move all the netdev <> dpll code into dpll, where the type is known. Otherwise we'd need multiple function calls to jump between the compilation units. This is the same problem the commit under fixes was trying to address, but with rcu_assign_pointer() not rcu_dereference(). Some of the exports are not needed, networking core can't be a module, we only need exports for the helpers used by drivers. Reported-by: Geert Uytterhoeven Link: https://lore.kernel.org/all/35a869c8-52e8-177-1d4d-e57578b99b6@linux-m68k.org/ Fixes: 640f41ed33b5 ("dpll: fix build failure due to rcu_dereference_check() on unknown type") Reviewed-by: Jiri Pirko Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240305013532.694866-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 2487007aa3b9fafbd2cb14068f49791ce1d7ede5 Author: Toke Høiland-Jørgensen Date: Tue Mar 5 22:31:32 2024 +0100 cpumap: Zero-initialise xdp_rxq_info struct before running XDP program When running an XDP program that is attached to a cpumap entry, we don't initialise the xdp_rxq_info data structure being used in the xdp_buff that backs the XDP program invocation. Tobias noticed that this leads to random values being returned as the xdp_md->rx_queue_index value for XDP programs running in a cpumap. This means we're basically returning the contents of the uninitialised memory, which is bad. Fix this by zero-initialising the rxq data structure before running the XDP program. Fixes: 9216477449f3 ("bpf: cpumap: Add the possibility to attach an eBPF program to cpumap") Reported-by: Tobias Böhm Signed-off-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20240305213132.11955-1-toke@redhat.com Signed-off-by: Martin KaFai Lau commit 0bfc0336e1348883fdab4689f0c8c56458f36dd8 Author: Daniel Borkmann Date: Tue Mar 5 10:08:29 2024 +0100 selftests/bpf: Fix up xdp bonding test wrt feature flags Adjust the XDP feature flags for the bond device when no bond slave devices are attached. After 9b0ed890ac2a ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY"), the empty bond device must report 0 as flags instead of NETDEV_XDP_ACT_MASK. # ./vmtest.sh -- ./test_progs -t xdp_bond [...] [ 3.983311] bond1 (unregistering): (slave veth1_1): Releasing backup interface [ 3.995434] bond1 (unregistering): Released all slaves [ 4.022311] bond2: (slave veth2_1): Releasing backup interface #507/1 xdp_bonding/xdp_bonding_attach:OK #507/2 xdp_bonding/xdp_bonding_nested:OK #507/3 xdp_bonding/xdp_bonding_features:OK #507/4 xdp_bonding/xdp_bonding_roundrobin:OK #507/5 xdp_bonding/xdp_bonding_activebackup:OK #507/6 xdp_bonding/xdp_bonding_xor_layer2:OK #507/7 xdp_bonding/xdp_bonding_xor_layer23:OK #507/8 xdp_bonding/xdp_bonding_xor_layer34:OK #507/9 xdp_bonding/xdp_bonding_redirect_multi:OK #507 xdp_bonding:OK Summary: 1/9 PASSED, 0 SKIPPED, 0 FAILED [ 4.185255] bond2 (unregistering): Released all slaves [...] Fixes: 9b0ed890ac2a ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY") Signed-off-by: Daniel Borkmann Reviewed-by: Toke Høiland-Jørgensen Message-ID: <20240305090829.17131-2-daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov commit f267f262815033452195f46c43b572159262f533 Author: Daniel Borkmann Date: Tue Mar 5 10:08:28 2024 +0100 xdp, bonding: Fix feature flags when there are no slave devs anymore Commit 9b0ed890ac2a ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY") changed the driver from reporting everything as supported before a device was bonded into having the driver report that no XDP feature is supported until a real device is bonded as it seems to be more truthful given eventually real underlying devices decide what XDP features are supported. The change however did not take into account when all slave devices get removed from the bond device. In this case after 9b0ed890ac2a, the driver keeps reporting a feature mask of 0x77, that is, NETDEV_XDP_ACT_MASK & ~NETDEV_XDP_ACT_XSK_ZEROCOPY whereas it should have reported a feature mask of 0. Fix it by resetting XDP feature flags in the same way as if no XDP program is attached to the bond device. This was uncovered by the XDP bond selftest which let BPF CI fail. After adjusting the starting masks on the latter to 0 instead of NETDEV_XDP_ACT_MASK the test passes again together with this fix. Fixes: 9b0ed890ac2a ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY") Signed-off-by: Daniel Borkmann Cc: Magnus Karlsson Cc: Prashant Batra Cc: Toke Høiland-Jørgensen Cc: Jakub Kicinski Reviewed-by: Toke Høiland-Jørgensen Message-ID: <20240305090829.17131-1-daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov commit 399eca1bd4fc14645dcdf19ee10adf5cde85aecf Merge: 685f7d5312645 5c2bc5e2f81d3 Author: Alexei Starovoitov Date: Thu Feb 22 08:54:47 2024 -0800 Merge branch 'check-bpf_func_state-callback_depth-when-pruning-states' Eduard Zingerman says: ==================== check bpf_func_state->callback_depth when pruning states This patch-set fixes bug in states pruning logic hit in mailing list discussion [0]. The details of the fix are in patch #1. The main idea for the fix belongs to Yonghong Song, mine contribution is merely in review and test cases. There are some changes in verification performance: File Program Insns (DIFF) States (DIFF) ------------------------- ------------- --------------- -------------- pyperf600_bpf_loop.bpf.o on_event +15 (+0.42%) +0 (+0.00%) strobemeta_bpf_loop.bpf.o on_event +857 (+37.95%) +60 (+38.96%) xdp_synproxy_kern.bpf.o syncookie_tc +2892 (+30.39%) +109 (+36.33%) xdp_synproxy_kern.bpf.o syncookie_xdp +2892 (+30.01%) +109 (+36.09%) (when tested on a subset of selftests identified by selftests/bpf/veristat.cfg and Cilium bpf object files from [4]) Changelog: v2 [2] -> v3: - fixes for verifier.c commit message as suggested by Yonghong; - patch-set re-rerouted to 'bpf' tree as suggested in [2]; - patch for test_tcp_custom_syncookie is sent separately to 'bpf-next' [3]. - veristat results updated using 'bpf' tree as baseline and clang 16. v1 [1] -> v2: - patch #2 commit message updated to better reflect verifier behavior with regards to checkpoints tree (suggested by Yonghong); - veristat results added (suggested by Andrii). [0] https://lore.kernel.org/bpf/9b251840-7cb8-4d17-bd23-1fc8071d8eef@linux.dev/ [1] https://lore.kernel.org/bpf/20240212143832.28838-1-eddyz87@gmail.com/ [2] https://lore.kernel.org/bpf/20240216150334.31937-1-eddyz87@gmail.com/ [3] https://lore.kernel.org/bpf/20240222150300.14909-1-eddyz87@gmail.com/ [4] https://github.com/anakryiko/cilium ==================== Link: https://lore.kernel.org/r/20240222154121.6991-1-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 5c2bc5e2f81d3344095ae241032dde20a4ea2b48 Author: Eduard Zingerman Date: Thu Feb 22 17:41:21 2024 +0200 selftests/bpf: test case for callback_depth states pruning logic The test case was minimized from mailing list discussion [0]. It is equivalent to the following C program: struct iter_limit_bug_ctx { __u64 a; __u64 b; __u64 c; }; static __naked void iter_limit_bug_cb(void) { switch (bpf_get_prandom_u32()) { case 1: ctx->a = 42; break; case 2: ctx->b = 42; break; default: ctx->c = 42; break; } } int iter_limit_bug(struct __sk_buff *skb) { struct iter_limit_bug_ctx ctx = { 7, 7, 7 }; bpf_loop(2, iter_limit_bug_cb, &ctx, 0); if (ctx.a == 42 && ctx.b == 42 && ctx.c == 7) asm volatile("r1 /= 0;":::"r1"); return 0; } The main idea is that each loop iteration changes one of the state variables in a non-deterministic manner. Hence it is premature to prune the states that have two iterations left comparing them to states with one iteration left. E.g. {{7,7,7}, callback_depth=0} can reach state {42,42,7}, while {{7,7,7}, callback_depth=1} can't. [0] https://lore.kernel.org/bpf/9b251840-7cb8-4d17-bd23-1fc8071d8eef@linux.dev/ Acked-by: Yonghong Song Signed-off-by: Eduard Zingerman Link: https://lore.kernel.org/r/20240222154121.6991-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit e9a8e5a587ca55fec6c58e4881742705d45bee54 Author: Eduard Zingerman Date: Thu Feb 22 17:41:20 2024 +0200 bpf: check bpf_func_state->callback_depth when pruning states When comparing current and cached states verifier should consider bpf_func_state->callback_depth. Current state cannot be pruned against cached state, when current states has more iterations left compared to cached state. Current state has more iterations left when it's callback_depth is smaller. Below is an example illustrating this bug, minimized from mailing list discussion [0] (assume that BPF_F_TEST_STATE_FREQ is set). The example is not a safe program: if loop_cb point (1) is followed by loop_cb point (2), then division by zero is possible at point (4). struct ctx { __u64 a; __u64 b; __u64 c; }; static void loop_cb(int i, struct ctx *ctx) { /* assume that generated code is "fallthrough-first": * if ... == 1 goto * if ... == 2 goto * */ switch (bpf_get_prandom_u32()) { case 1: /* 1 */ ctx->a = 42; return 0; break; case 2: /* 2 */ ctx->b = 42; return 0; break; default: /* 3 */ ctx->c = 42; return 0; break; } } SEC("tc") __failure __flag(BPF_F_TEST_STATE_FREQ) int test(struct __sk_buff *skb) { struct ctx ctx = { 7, 7, 7 }; bpf_loop(2, loop_cb, &ctx, 0); /* 0 */ /* assume generated checks are in-order: .a first */ if (ctx.a == 42 && ctx.b == 42 && ctx.c == 7) asm volatile("r0 /= 0;":::"r0"); /* 4 */ return 0; } Prior to this commit verifier built the following checkpoint tree for this example: .------------------------------------- Checkpoint / State name | .-------------------------------- Code point number | | .---------------------------- Stack state {ctx.a,ctx.b,ctx.c} | | | .------------------- Callback depth in frame #0 v v v v - (0) {7P,7P,7},depth=0 - (3) {7P,7P,7},depth=1 - (0) {7P,7P,42},depth=1 - (3) {7P,7,42},depth=2 - (0) {7P,7,42},depth=2 loop terminates because of depth limit - (4) {7P,7,42},depth=0 predicted false, ctx.a marked precise - (6) exit (a) - (2) {7P,7,42},depth=2 - (0) {7P,42,42},depth=2 loop terminates because of depth limit - (4) {7P,42,42},depth=0 predicted false, ctx.a marked precise - (6) exit (b) - (1) {7P,7P,42},depth=2 - (0) {42P,7P,42},depth=2 loop terminates because of depth limit - (4) {42P,7P,42},depth=0 predicted false, ctx.{a,b} marked precise - (6) exit - (2) {7P,7,7},depth=1 considered safe, pruned using checkpoint (a) (c) - (1) {7P,7P,7},depth=1 considered safe, pruned using checkpoint (b) Here checkpoint (b) has callback_depth of 2, meaning that it would never reach state {42,42,7}. While checkpoint (c) has callback_depth of 1, and thus could yet explore the state {42,42,7} if not pruned prematurely. This commit makes forbids such premature pruning, allowing verifier to explore states sub-tree starting at (c): (c) - (1) {7,7,7P},depth=1 - (0) {42P,7,7P},depth=1 ... - (2) {42,7,7},depth=2 - (0) {42,42,7},depth=2 loop terminates because of depth limit - (4) {42,42,7},depth=0 predicted true, ctx.{a,b,c} marked precise - (5) division by zero [0] https://lore.kernel.org/bpf/9b251840-7cb8-4d17-bd23-1fc8071d8eef@linux.dev/ Fixes: bb124da69c47 ("bpf: keep track of max number of bpf_loop callback iterations") Suggested-by: Yonghong Song Signed-off-by: Eduard Zingerman Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20240222154121.6991-2-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov commit 5847c9777c303a792202c609bd761dceb60f4eed Merge: 29cd507cbec28 25125a4762835 Author: Linus Torvalds Date: Tue Mar 5 14:00:22 2024 -0800 Merge tag 'cgroup-for-6.8-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "Two cpuset fixes. Both are for bugs in error handling paths and low risk" * tag 'cgroup-for-6.8-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup/cpuset: Fix retval in update_cpumask() cgroup/cpuset: Fix a memory leak in update_exclusive_cpumask() commit 29cd507cbec282e13dcf8f38072a100af96b2bb7 Merge: 127ec4c0b2ac4 85445b9642905 Author: Linus Torvalds Date: Tue Mar 5 13:21:30 2024 -0800 Merge tag 'integrity-v6.8-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity fix from Mimi Zohar: "A single fix to eliminate an unnecessary message" * tag 'integrity-v6.8-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: integrity: eliminate unnecessary "Problem loading X.509 certificate" msg commit 127ec4c0b2ac4821e8de17b9a3d0c0af883770d2 Merge: 1c46d04a0dae3 0314cebb29be2 Author: Linus Torvalds Date: Tue Mar 5 12:48:29 2024 -0800 Merge tag 'platform-drivers-x86-v6.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - Fix P2SB regression causing ACPI errors and high CPU load - Fix error return path in amd_pmf_init_smart_pc() * tag 'platform-drivers-x86-v6.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/amd/pmf: Fix missing error code in amd_pmf_init_smart_pc() platform/x86: p2sb: On Goldmont only cache P2SB and SPI devfn BAR commit 1c46d04a0dae3fcb8d6505de0091499b626cdb35 Merge: 90d35da658da8 aa707b615ce15 Author: Linus Torvalds Date: Tue Mar 5 12:38:50 2024 -0800 Merge tag 'hyperv-fixes-signed-20240303' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: - Multiple fixes, cleanups and documentations for Hyper-V core code and drivers * tag 'hyperv-fixes-signed-20240303' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: vmbus: make hv_bus const x86/hyperv: Allow 15-bit APIC IDs for VTL platforms x86/hyperv: Make encrypted/decrypted changes safe for load_unaligned_zeropad() x86/mm: Regularize set_memory_p() parameters and make non-static x86/hyperv: Use slow_virt_to_phys() in page transition hypervisor callback Documentation: hyperv: Add overview of PCI pass-thru device support Drivers: hv: vmbus: Update indentation in create_gpadl_header() Drivers: hv: vmbus: Remove duplication and cleanup code in create_gpadl_header() fbdev/hyperv_fb: Fix logic error for Gen2 VMs in hvfb_getmem() Drivers: hv: vmbus: Calculate ring buffer size for more efficient use of memory hv_utils: Allow implicit ICTIMESYNCFLAG_SYNC commit 685f7d531264599b3f167f1e94bbd22f120e5fab Author: Eric Dumazet Date: Sun Mar 3 14:48:00 2024 +0000 net/ipv6: avoid possible UAF in ip6_route_mpath_notify() syzbot found another use-after-free in ip6_route_mpath_notify() [1] Commit f7225172f25a ("net/ipv6: prevent use after free in ip6_route_mpath_notify") was not able to fix the root cause. We need to defer the fib6_info_release() calls after ip6_route_mpath_notify(), in the cleanup phase. [1] BUG: KASAN: slab-use-after-free in rt6_fill_node+0x1460/0x1ac0 Read of size 4 at addr ffff88809a07fc64 by task syz-executor.2/23037 CPU: 0 PID: 23037 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-01035-gea7f3cfaa588 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0x167/0x540 mm/kasan/report.c:488 kasan_report+0x142/0x180 mm/kasan/report.c:601 rt6_fill_node+0x1460/0x1ac0 inet6_rt_notify+0x13b/0x290 net/ipv6/route.c:6184 ip6_route_mpath_notify net/ipv6/route.c:5198 [inline] ip6_route_multipath_add net/ipv6/route.c:5404 [inline] inet6_rtm_newroute+0x1d0f/0x2300 net/ipv6/route.c:5517 rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6597 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367 netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f73dd87dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f73de6550c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f73dd9ac050 RCX: 00007f73dd87dda9 RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000005 RBP: 00007f73dd8ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f73dd9ac050 R15: 00007ffdbdeb7858 Allocated by task 23037: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:372 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:389 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:3981 [inline] __kmalloc+0x22e/0x490 mm/slub.c:3994 kmalloc include/linux/slab.h:594 [inline] kzalloc include/linux/slab.h:711 [inline] fib6_info_alloc+0x2e/0xf0 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x445/0x12b0 net/ipv6/route.c:3758 ip6_route_multipath_add net/ipv6/route.c:5298 [inline] inet6_rtm_newroute+0x744/0x2300 net/ipv6/route.c:5517 rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6597 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367 netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 Freed by task 16: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x4e/0x60 mm/kasan/generic.c:640 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:241 __kasan_slab_free+0x34/0x70 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kfree+0x14a/0x380 mm/slub.c:4409 rcu_do_batch kernel/rcu/tree.c:2190 [inline] rcu_core+0xd76/0x1810 kernel/rcu/tree.c:2465 __do_softirq+0x2bb/0x942 kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47 __kasan_record_aux_stack+0xae/0x100 mm/kasan/generic.c:586 __call_rcu_common kernel/rcu/tree.c:2715 [inline] call_rcu+0x167/0xa80 kernel/rcu/tree.c:2829 fib6_info_release include/net/ip6_fib.h:341 [inline] ip6_route_multipath_add net/ipv6/route.c:5344 [inline] inet6_rtm_newroute+0x114d/0x2300 net/ipv6/route.c:5517 rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6597 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367 netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 The buggy address belongs to the object at ffff88809a07fc00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 100 bytes inside of freed 512-byte region [ffff88809a07fc00, ffff88809a07fe00) The buggy address belongs to the physical page: page:ffffea0002681f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9a07c head:ffffea0002681f00 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888014c41c80 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 23028, tgid 23027 (syz-executor.4), ts 2340253595219, free_ts 2339107097036 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0x33ea/0x3580 mm/page_alloc.c:3311 __alloc_pages+0x255/0x680 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page+0x5f/0x160 mm/slub.c:2190 allocate_slab mm/slub.c:2354 [inline] new_slab+0x84/0x2f0 mm/slub.c:2407 ___slab_alloc+0xd17/0x13e0 mm/slub.c:3540 __slab_alloc mm/slub.c:3625 [inline] __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] __do_kmalloc_node mm/slub.c:3980 [inline] __kmalloc+0x2e0/0x490 mm/slub.c:3994 kmalloc include/linux/slab.h:594 [inline] kzalloc include/linux/slab.h:711 [inline] new_dir fs/proc/proc_sysctl.c:956 [inline] get_subdir fs/proc/proc_sysctl.c:1000 [inline] sysctl_mkdir_p fs/proc/proc_sysctl.c:1295 [inline] __register_sysctl_table+0xb30/0x1440 fs/proc/proc_sysctl.c:1376 neigh_sysctl_register+0x416/0x500 net/core/neighbour.c:3859 devinet_sysctl_register+0xaf/0x1f0 net/ipv4/devinet.c:2644 inetdev_init+0x296/0x4d0 net/ipv4/devinet.c:286 inetdev_event+0x338/0x15c0 net/ipv4/devinet.c:1555 notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:1987 [inline] call_netdevice_notifiers net/core/dev.c:2001 [inline] register_netdevice+0x15b2/0x1a20 net/core/dev.c:10340 br_dev_newlink+0x27/0x100 net/bridge/br_netlink.c:1563 rtnl_newlink_create net/core/rtnetlink.c:3497 [inline] __rtnl_newlink net/core/rtnetlink.c:3717 [inline] rtnl_newlink+0x158f/0x20a0 net/core/rtnetlink.c:3730 page last free pid 11583 tgid 11583 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x968/0xa90 mm/page_alloc.c:2346 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2486 kasan_depopulate_vmalloc_pte+0x74/0x90 mm/kasan/shadow.c:415 apply_to_pte_range mm/memory.c:2619 [inline] apply_to_pmd_range mm/memory.c:2663 [inline] apply_to_pud_range mm/memory.c:2699 [inline] apply_to_p4d_range mm/memory.c:2735 [inline] __apply_to_page_range+0x8ec/0xe40 mm/memory.c:2769 kasan_release_vmalloc+0x9a/0xb0 mm/kasan/shadow.c:532 __purge_vmap_area_lazy+0x163f/0x1a10 mm/vmalloc.c:1770 drain_vmap_area_work+0x40/0xd0 mm/vmalloc.c:1804 process_one_work kernel/workqueue.c:2633 [inline] process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706 worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787 kthread+0x2ef/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 Memory state around the buggy address: ffff88809a07fb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809a07fb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809a07fc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809a07fc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809a07fd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 3b1137fe7482 ("net: ipv6: Change notifications for multipath add to RTA_MULTIPATH") Reported-by: syzbot Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240303144801.702646-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit ba54b1a276a6b69d80649942fe5334d19851443e Author: Sasha Neftin Date: Sun Feb 18 09:42:21 2024 +0200 intel: legacy: Partial revert of field get conversion Refactoring of the field get conversion introduced a regression in the legacy Wake On Lan from a magic packet with i219 devices. Rx address copied not correctly from MAC to PHY with FIELD_GET macro. Fixes: b9a452545075 ("intel: legacy: field get conversion") Suggested-by: Vitaly Lifshits Signed-off-by: Sasha Neftin Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit ef27f655b438bed4c83680e4f01e1cde2739854b Author: Florian Kauer Date: Mon Feb 19 10:08:43 2024 +0100 igc: avoid returning frame twice in XDP_REDIRECT When a frame can not be transmitted in XDP_REDIRECT (e.g. due to a full queue), it is necessary to free it by calling xdp_return_frame_rx_napi. However, this is the responsibility of the caller of the ndo_xdp_xmit (see for example bq_xmit_all in kernel/bpf/devmap.c) and thus calling it inside igc_xdp_xmit (which is the ndo_xdp_xmit of the igc driver) as well will lead to memory corruption. In fact, bq_xmit_all expects that it can return all frames after the last successfully transmitted one. Therefore, break for the first not transmitted frame, but do not call xdp_return_frame_rx_napi in igc_xdp_xmit. This is equally implemented in other Intel drivers such as the igb. There are two alternatives to this that were rejected: 1. Return num_frames as all the frames would have been transmitted and release them inside igc_xdp_xmit. While it might work technically, it is not what the return value is meant to represent (i.e. the number of SUCCESSFULLY transmitted packets). 2. Rework kernel/bpf/devmap.c and all drivers to support non-consecutively dropped packets. Besides being complex, it likely has a negative performance impact without a significant gain since it is anyway unlikely that the next frame can be transmitted if the previous one was dropped. The memory corruption can be reproduced with the following script which leads to a kernel panic after a few seconds. It basically generates more traffic than a i225 NIC can transmit and pushes it via XDP_REDIRECT from a virtual interface to the physical interface where frames get dropped. #!/bin/bash INTERFACE=enp4s0 INTERFACE_IDX=`cat /sys/class/net/$INTERFACE/ifindex` sudo ip link add dev veth1 type veth peer name veth2 sudo ip link set up $INTERFACE sudo ip link set up veth1 sudo ip link set up veth2 cat << EOF > redirect.bpf.c SEC("prog") int redirect(struct xdp_md *ctx) { return bpf_redirect($INTERFACE_IDX, 0); } char _license[] SEC("license") = "GPL"; EOF clang -O2 -g -Wall -target bpf -c redirect.bpf.c -o redirect.bpf.o sudo ip link set veth2 xdp obj redirect.bpf.o cat << EOF > pass.bpf.c SEC("prog") int pass(struct xdp_md *ctx) { return XDP_PASS; } char _license[] SEC("license") = "GPL"; EOF clang -O2 -g -Wall -target bpf -c pass.bpf.c -o pass.bpf.o sudo ip link set $INTERFACE xdp obj pass.bpf.o cat << EOF > trafgen.cfg { /* Ethernet Header */ 0xe8, 0x6a, 0x64, 0x41, 0xbf, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, const16(ETH_P_IP), /* IPv4 Header */ 0b01000101, 0, # IPv4 version, IHL, TOS const16(1028), # IPv4 total length (UDP length + 20 bytes (IP header)) const16(2), # IPv4 ident 0b01000000, 0, # IPv4 flags, fragmentation off 64, # IPv4 TTL 17, # Protocol UDP csumip(14, 33), # IPv4 checksum /* UDP Header */ 10, 0, 1, 1, # IP Src - adapt as needed 10, 0, 1, 2, # IP Dest - adapt as needed const16(6666), # UDP Src Port const16(6666), # UDP Dest Port const16(1008), # UDP length (UDP header 8 bytes + payload length) csumudp(14, 34), # UDP checksum /* Payload */ fill('W', 1000), } EOF sudo trafgen -i trafgen.cfg -b3000MB -o veth1 --cpp Fixes: 4ff320361092 ("igc: Add support for XDP_REDIRECT action") Signed-off-by: Florian Kauer Reviewed-by: Maciej Fijalkowski Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 36c824ca3e4fa8d1224c2dcdeaca39d2ca86a42f Author: Ivan Vecera Date: Wed Feb 28 18:26:03 2024 +0100 i40e: Fix firmware version comparison function Helper i40e_is_fw_ver_eq() compares incorrectly given firmware version as it returns true when the major version of running firmware is greater than the given major version that is wrong and results in failure during getting of DCB configuration where this helper is used. Fix the check and return true only if the running FW version is exactly equals to the given version. Reproducer: 1. Load i40e driver 2. Check dmesg output [root@host ~]# modprobe i40e [root@host ~]# dmesg | grep 'i40e.*DCB' [ 74.750642] i40e 0000:02:00.0: Query for DCB configuration failed, err -EIO aq_err I40E_AQ_RC_EINVAL [ 74.759770] i40e 0000:02:00.0: DCB init failed -5, disabled [ 74.966550] i40e 0000:02:00.1: Query for DCB configuration failed, err -EIO aq_err I40E_AQ_RC_EINVAL [ 74.975683] i40e 0000:02:00.1: DCB init failed -5, disabled Fixes: cf488e13221f ("i40e: Add other helpers to check version of running firmware and AQ API") Signed-off-by: Ivan Vecera Signed-off-by: Tony Nguyen commit 6c5b6ca7642f2992502a22dbd8b80927de174b67 Author: Jesse Brandeburg Date: Mon Mar 4 16:37:07 2024 -0800 ice: fix typo in assignment Fix an obviously incorrect assignment, created with a typo or cut-n-paste error. Fixes: 5995ef88e3a8 ("ice: realloc VSI stats arrays") Signed-off-by: Jesse Brandeburg Reviewed-by: Simon Horman Reviewed-by: Paul Menzel Signed-off-by: Tony Nguyen commit 9224fc86f1776193650a33a275cac628952f80a9 Author: Michal Schmidt Date: Fri Mar 1 14:37:08 2024 +0100 ice: fix uninitialized dplls mutex usage The pf->dplls.lock mutex is initialized too late, after its first use. Move it to the top of ice_dpll_init. Note that the "err_exit" error path destroys the mutex. And the mutex is the last thing destroyed in ice_dpll_deinit. This fixes the following warning with CONFIG_DEBUG_MUTEXES: ice 0000:10:00.0: The DDP package was successfully loaded: ICE OS Default Package version 1.3.36.0 ice 0000:10:00.0: 252.048 Gb/s available PCIe bandwidth (16.0 GT/s PCIe x16 link) ice 0000:10:00.0: PTP init successful ------------[ cut here ]------------ DEBUG_LOCKS_WARN_ON(lock->magic != lock) WARNING: CPU: 0 PID: 410 at kernel/locking/mutex.c:587 __mutex_lock+0x773/0xd40 Modules linked in: crct10dif_pclmul crc32_pclmul crc32c_intel polyval_clmulni polyval_generic ice(+) nvme nvme_c> CPU: 0 PID: 410 Comm: kworker/0:4 Not tainted 6.8.0-rc5+ #3 Hardware name: HPE ProLiant DL110 Gen10 Plus/ProLiant DL110 Gen10 Plus, BIOS U56 10/19/2023 Workqueue: events work_for_cpu_fn RIP: 0010:__mutex_lock+0x773/0xd40 Code: c0 0f 84 1d f9 ff ff 44 8b 35 0d 9c 69 01 45 85 f6 0f 85 0d f9 ff ff 48 c7 c6 12 a2 a9 85 48 c7 c7 12 f1 a> RSP: 0018:ff7eb1a3417a7ae0 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000 RDX: 0000000000000002 RSI: ffffffff85ac2bff RDI: 00000000ffffffff RBP: ff7eb1a3417a7b80 R08: 0000000000000000 R09: 00000000ffffbfff R10: ff7eb1a3417a7978 R11: ff32b80f7fd2e568 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: ff32b7f02c50e0d8 FS: 0000000000000000(0000) GS:ff32b80efe800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055b5852cc000 CR3: 000000003c43a004 CR4: 0000000000771ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? __warn+0x84/0x170 ? __mutex_lock+0x773/0xd40 ? report_bug+0x1c7/0x1d0 ? prb_read_valid+0x1b/0x30 ? handle_bug+0x42/0x70 ? exc_invalid_op+0x18/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? __mutex_lock+0x773/0xd40 ? rcu_is_watching+0x11/0x50 ? __kmalloc_node_track_caller+0x346/0x490 ? ice_dpll_lock_status_get+0x28/0x50 [ice] ? __pfx_ice_dpll_lock_status_get+0x10/0x10 [ice] ? ice_dpll_lock_status_get+0x28/0x50 [ice] ice_dpll_lock_status_get+0x28/0x50 [ice] dpll_device_get_one+0x14f/0x2e0 dpll_device_event_send+0x7d/0x150 dpll_device_register+0x124/0x180 ice_dpll_init_dpll+0x7b/0xd0 [ice] ice_dpll_init+0x224/0xa40 [ice] ? _dev_info+0x70/0x90 ice_load+0x468/0x690 [ice] ice_probe+0x75b/0xa10 [ice] ? _raw_spin_unlock_irqrestore+0x4f/0x80 ? process_one_work+0x1a3/0x500 local_pci_probe+0x47/0xa0 work_for_cpu_fn+0x17/0x30 process_one_work+0x20d/0x500 worker_thread+0x1df/0x3e0 ? __pfx_worker_thread+0x10/0x10 kthread+0x103/0x140 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x31/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 irq event stamp: 125197 hardirqs last enabled at (125197): [] finish_task_switch.isra.0+0x12d/0x3d0 hardirqs last disabled at (125196): [] __schedule+0xea4/0x19f0 softirqs last enabled at (105334): [] napi_get_frags_check+0x1a/0x60 softirqs last disabled at (105332): [] napi_get_frags_check+0x1a/0x60 ---[ end trace 0000000000000000 ]--- Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu") Signed-off-by: Michal Schmidt Reviewed-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen commit 06e456a05d669ca30b224b8ed962421770c1496c Author: Rand Deeb Date: Wed Feb 28 18:54:48 2024 +0300 net: ice: Fix potential NULL pointer dereference in ice_bridge_setlink() The function ice_bridge_setlink() may encounter a NULL pointer dereference if nlmsg_find_attr() returns NULL and br_spec is dereferenced subsequently in nla_for_each_nested(). To address this issue, add a check to ensure that br_spec is not NULL before proceeding with the nested attribute iteration. Fixes: b1edc14a3fbf ("ice: Implement ice_bridge_getlink and ice_bridge_setlink") Signed-off-by: Rand Deeb Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen commit 2652b99e43403dc464f3648483ffb38e48872fe4 Author: Jacob Keller Date: Wed Jan 31 13:51:58 2024 -0800 ice: virtchnl: stop pretending to support RSS over AQ or registers The E800 series hardware uses the same iAVF driver as older devices, including the virtchnl negotiation scheme. This negotiation scheme includes a mechanism to determine what type of RSS should be supported, including RSS over PF virtchnl messages, RSS over firmware AdminQ messages, and RSS via direct register access. The PF driver will always prefer VIRTCHNL_VF_OFFLOAD_RSS_PF if its supported by the VF driver. However, if an older VF driver is loaded, it may request only VIRTCHNL_VF_OFFLOAD_RSS_REG or VIRTCHNL_VF_OFFLOAD_RSS_AQ. The ice driver happily agrees to support these methods. Unfortunately, the underlying hardware does not support these mechanisms. The E800 series VFs don't have the appropriate registers for RSS_REG. The mailbox queue used by VFs for VF to PF communication blocks messages which do not have the VF-to-PF opcode. Stop lying to the VF that it could support RSS over AdminQ or registers, as these interfaces do not work when the hardware is operating on an E800 series device. In practice this is unlikely to be hit by any normal user. The iAVF driver has supported RSS over PF virtchnl commands since 2016, and always defaults to using RSS_PF if possible. In principle, nothing actually stops the existing VF from attempting to access the registers or send an AQ command. However a properly coded VF will check the capability flags and will report a more useful error if it detects a case where the driver does not support the RSS offloads that it does. Fixes: 1071a8358a28 ("ice: Implement virtchnl commands for AVF support") Signed-off-by: Jacob Keller Reviewed-by: Alan Brady Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 330068589389ccae3452db15ecacc3e147ac9c1c Author: Emil Tantilov Date: Wed Feb 7 16:42:43 2024 -0800 idpf: disable local BH when scheduling napi for marker packets Fix softirq's not being handled during napi_schedule() call when receiving marker packets for queue disable by disabling local bottom half. The issue can be seen on ifdown: NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!! Using ftrace to catch the failing scenario: ifconfig [003] d.... 22739.830624: softirq_raise: vec=3 [action=NET_RX] -0 [003] ..s.. 22739.831357: softirq_entry: vec=3 [action=NET_RX] No interrupt and CPU is idle. After the patch when disabling local BH before calling napi_schedule: ifconfig [003] d.... 22993.928336: softirq_raise: vec=3 [action=NET_RX] ifconfig [003] ..s1. 22993.928337: softirq_entry: vec=3 [action=NET_RX] Fixes: c2d548cad150 ("idpf: add TX splitq napi poll support") Reviewed-by: Jesse Brandeburg Reviewed-by: Przemek Kitszel Signed-off-by: Emil Tantilov Signed-off-by: Alan Brady Reviewed-by: Simon Horman Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen commit 963465a33141d0d52338e77f80fe543d2c9dc053 Author: Uwe Kleine-König Date: Tue Mar 5 11:10:42 2024 +0100 Input: gpio_keys_polled - suppress deferred probe error for gpio On a PC Engines APU our admins are faced with: $ dmesg | grep -c "gpio-keys-polled gpio-keys-polled: unable to claim gpio 0, err=-517" 261 Such a message always appears when e.g. a new USB device is plugged in. Suppress this message which considerably clutters the kernel log for EPROBE_DEFER (i.e. -517). Signed-off-by: Uwe Kleine-König Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240305101042.10953-2-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov commit 7105e92c60c9cc4112c782d69c172e96b69a43dc Author: Javier Carrasco Date: Tue Mar 5 08:49:21 2024 +0100 Revert "Input: bcm5974 - check endpoint type before starting traffic" This patch intended to fix an well-knonw issue in old drivers where the endpoint type is taken for granted, which is often triggered by fuzzers. That was the case for this driver [1], and although the fix seems to be correct, it uncovered another issue that leads to a regression [2], if the endpoints of the current interface are checked. The driver makes use of endpoints that belong to a different interface rather than the one it binds (it binds to the third interface, but also accesses an endpoint from a different one). The driver should claim the interfaces it requires, but that is still not the case. Given that the regression is more severe than the issue found by syzkaller, the best approach is reverting the patch that causes the regression, and trying to fix the underlying problem before checking the endpoint types again. Note that reverting this patch will probably trigger the syzkaller bug at some point. This reverts commit 2b9c3eb32a699acdd4784d6b93743271b4970899. Link: https://syzkaller.appspot.com/bug?extid=348331f63b034f89b622 [1] Link: https://lore.kernel.org/linux-input/87sf161jjc.wl-tiwai@suse.de/ [2] Fixes: 2b9c3eb32a69 ("Input: bcm5974 - check endpoint type before starting traffic") Reported-by: Jacopo Radice Closes: https://bugzilla.suse.com/show_bug.cgi?id=1220030 Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240305-revert_bcm5974_ep_check-v3-1-527198cf6499@gmail.com Signed-off-by: Dmitry Torokhov commit 95bf25bb9ed5dedb7fb39f76489f7d6843ab0475 Author: Douglas Anderson Date: Tue Feb 27 14:19:29 2024 -0800 drm/udl: Add ARGB8888 as a format Even though the UDL driver converts to RGB565 internally (see pixel32_to_be16() in udl_transfer.c), it advertises XRGB8888 for compatibility. Let's add ARGB8888 to that list. This makes UDL devices work on ChromeOS again after commit c91acda3a380 ("drm/gem: Check for valid formats"). Prior to that commit things were "working" because we'd silently treat the ARGB8888 that ChromeOS wanted as XRGB8888. Fixes: c91acda3a380 ("drm/gem: Check for valid formats") Reviewed-by: Dmitry Baryshkov Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240227141928.1.I24ac8d51544e4624b7e9d438d95880c4283e611b@changeid commit 482c9f3d42ba58a2ae1f69cbfbf3a9f3e251527d Author: Rob Herring Date: Tue Mar 5 09:21:31 2024 -0600 ASoC: dt-bindings: nvidia: Fix 'lge' vendor prefix The documented vendor prefix for LG Electronics is 'lg' not 'lge'. Just change the example to 'lg' as there doesn't appear to be any dependency on the existing compatible string. Signed-off-by: Rob Herring Link: https://msgid.link/r/20240305152131.3424326-1-robh@kernel.org Signed-off-by: Mark Brown commit a0776c214d47ea4f7aaef138095beaa41cff03ef Author: Alexander Usyskin Date: Tue Feb 20 22:00:20 2024 +0200 mei: gsc_proxy: match component when GSC is on different bus On Arrow Lake S systems, MEI is no longer strictly connected to bus 0, while graphics remain exclusively on bus 0. Adapt the component matching logic to accommodate this change: Original behavior: Required both MEI and graphics to be on the same bus 0. New behavior: Only enforces graphics to be on bus 0 (integrated), allowing MEI to reside on any bus. This ensures compatibility with Arrow Lake S and maintains functionality for the legacy systems. Fixes: 1dd924f6885b ("mei: gsc_proxy: add gsc proxy driver") Cc: stable@vger.kernel.org # v6.3+ Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20240220200020.231192-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit a283d7f179ff83976af27bcc71f7474cb4d7c348 Author: Ekansh Gupta Date: Sat Feb 24 11:42:47 2024 +0000 misc: fastrpc: Pass proper arguments to scm call For CMA memory allocation, ownership is assigned to DSP to make it accessible by the PD running on the DSP. With current implementation HLOS VM is stored in the channel structure during rpmsg_probe and this VM is passed to qcom_scm call as the source VM. The qcom_scm call will overwrite the passed source VM with the next VM which would cause a problem in case the scm call is again needed. Adding a local copy of source VM whereever scm call is made to avoid this problem. Fixes: 0871561055e6 ("misc: fastrpc: Add support for audiopd") Cc: stable Signed-off-by: Ekansh Gupta Reviewed-by: Elliot Berman Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20240224114247.85953-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit f53641a6e849034a44bf80f50245a75d7a376025 Author: Ian Abbott Date: Wed Feb 14 10:07:25 2024 +0000 comedi: comedi_test: Prevent timers rescheduling during deletion The comedi_test devices have a couple of timers (ai_timer and ao_timer) that can be started to simulate hardware interrupts. Their expiry functions normally reschedule the timer. The driver code calls either del_timer_sync() or del_timer() to delete the timers from the queue, but does not currently prevent the timers from rescheduling themselves so synchronized deletion may be ineffective. Add a couple of boolean members (one for each timer: ai_timer_enable and ao_timer_enable) to the device private data structure to indicate whether the timers are allowed to reschedule themselves. Set the member to true when adding the timer to the queue, and to false when deleting the timer from the queue in the waveform_ai_cancel() and waveform_ao_cancel() functions. The del_timer_sync() function is also called from the waveform_detach() function, but the timer enable members will already be set to false when that function is called, so no change is needed there. Fixes: 403fe7f34e33 ("staging: comedi: comedi_test: fix timer race conditions") Cc: stable@vger.kernel.org # 4.4+ Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20240214100747.16203-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit cfa9ba1ae0bef0681833a22d326174fe633caab5 Author: Frej Drejhammar Date: Sun Feb 11 18:58:22 2024 +0100 comedi: comedi_8255: Correct error in subdevice initialization The refactoring done in commit 5c57b1ccecc7 ("comedi: comedi_8255: Rework subdevice initialization functions") to the initialization of the io field of struct subdev_8255_private broke all cards using the drivers/comedi/drivers/comedi_8255.c module. Prior to 5c57b1ccecc7, __subdev_8255_init() initialized the io field in the newly allocated struct subdev_8255_private to the non-NULL callback given to the function, otherwise it used a flag parameter to select between subdev_8255_mmio and subdev_8255_io. The refactoring removed that logic and the flag, as subdev_8255_mm_init() and subdev_8255_io_init() now explicitly pass subdev_8255_mmio and subdev_8255_io respectively to __subdev_8255_init(), only __subdev_8255_init() never sets spriv->io to the supplied callback. That spriv->io is NULL leads to a later BUG: BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 0 P4D 0 Oops: 0010 [#1] SMP PTI CPU: 1 PID: 1210 Comm: systemd-udevd Not tainted 6.7.3-x86_64 #1 Hardware name: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX RIP: 0010:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0018:ffffa3f1c02d7b78 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffff91f847aefd00 RCX: 000000000000009b RDX: 0000000000000003 RSI: 0000000000000001 RDI: ffff91f840f6fc00 RBP: ffff91f840f6fc00 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 000000000000005f R12: 0000000000000000 R13: 0000000000000000 R14: ffffffffc0102498 R15: ffff91f847ce6ba8 FS: 00007f72f4e8f500(0000) GS:ffff91f8d5c80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 000000010540e000 CR4: 00000000000406f0 Call Trace: ? __die_body+0x15/0x57 ? page_fault_oops+0x2ef/0x33c ? insert_vmap_area.constprop.0+0xb6/0xd5 ? alloc_vmap_area+0x529/0x5ee ? exc_page_fault+0x15a/0x489 ? asm_exc_page_fault+0x22/0x30 __subdev_8255_init+0x79/0x8d [comedi_8255] pci_8255_auto_attach+0x11a/0x139 [8255_pci] comedi_auto_config+0xac/0x117 [comedi] ? __pfx___driver_attach+0x10/0x10 pci_device_probe+0x88/0xf9 really_probe+0x101/0x248 __driver_probe_device+0xbb/0xed driver_probe_device+0x1a/0x72 __driver_attach+0xd4/0xed bus_for_each_dev+0x76/0xb8 bus_add_driver+0xbe/0x1be driver_register+0x9a/0xd8 comedi_pci_driver_register+0x28/0x48 [comedi_pci] ? __pfx_pci_8255_driver_init+0x10/0x10 [8255_pci] do_one_initcall+0x72/0x183 do_init_module+0x5b/0x1e8 init_module_from_file+0x86/0xac __do_sys_finit_module+0x151/0x218 do_syscall_64+0x72/0xdb entry_SYSCALL_64_after_hwframe+0x6e/0x76 RIP: 0033:0x7f72f50a0cb9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 47 71 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffd47e512d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 RAX: ffffffffffffffda RBX: 0000562dd06ae070 RCX: 00007f72f50a0cb9 RDX: 0000000000000000 RSI: 00007f72f52d32df RDI: 000000000000000e RBP: 0000000000000000 R08: 00007f72f5168b20 R09: 0000000000000000 R10: 0000000000000050 R11: 0000000000000246 R12: 00007f72f52d32df R13: 0000000000020000 R14: 0000562dd06785c0 R15: 0000562dcfd0e9a8 Modules linked in: 8255_pci(+) comedi_8255 comedi_pci comedi intel_gtt e100(+) acpi_cpufreq rtc_cmos usbhid CR2: 0000000000000000 ---[ end trace 0000000000000000 ]--- RIP: 0010:0x0 Code: Unable to access opcode bytes at 0xffffffffffffffd6. RSP: 0018:ffffa3f1c02d7b78 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffff91f847aefd00 RCX: 000000000000009b RDX: 0000000000000003 RSI: 0000000000000001 RDI: ffff91f840f6fc00 RBP: ffff91f840f6fc00 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 000000000000005f R12: 0000000000000000 R13: 0000000000000000 R14: ffffffffc0102498 R15: ffff91f847ce6ba8 FS: 00007f72f4e8f500(0000) GS:ffff91f8d5c80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 000000010540e000 CR4: 00000000000406f0 This patch simply corrects the above mistake by initializing spriv->io to the given io callback. Fixes: 5c57b1ccecc7 ("comedi: comedi_8255: Rework subdevice initialization functions") Signed-off-by: Frej Drejhammar Cc: stable@vger.kernel.org Acked-by: Ian Abbott Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/20240211175822.1357-1-frej.drejhammar@gmail.com Signed-off-by: Greg Kroah-Hartman commit daf8739c3322a762ce84f240f50e0c39181a41ab Author: Karol Herbst Date: Tue Mar 5 14:38:52 2024 +0100 drm/nouveau: fix stale locked mutex in nouveau_gem_ioctl_pushbuf If VM_BIND is enabled on the client the legacy submission ioctl can't be used, however if a client tries to do so regardless it will return an error. In this case the clients mutex remained unlocked leading to a deadlock inside nouveau_drm_postclose or any other nouveau ioctl call. Fixes: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI") Cc: Danilo Krummrich Cc: # v6.6+ Signed-off-by: Karol Herbst Reviewed-by: Lyude Paul Reviewed-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240305133853.2214268-1-kherbst@redhat.com commit b234c70fefa7532d34ebee104de64cc16f1b21e4 Author: Mathias Nyman Date: Tue Mar 5 15:23:12 2024 +0200 xhci: Fix failure to detect ring expansion need. Ring expansion checker may incorrectly assume a completely full ring is empty, missing the need for expansion. This is due to a special empty ring case where the dequeue ends up ahead of the enqueue pointer. This is seen when enqueued TRBs fill up exactly a segment, with enqueue then pointing to the end link TRB. Once those TRBs are handled the dequeue pointer will follow the link TRB and end up pointing to the first entry on the next segment, past the enqueue. This same enqueue - dequeue condition can be true if a ring is full, with enqueue ending on that last link TRB before the dequeue pointer on the next segment. This can be seen when queuing several ~510 small URBs via usbfs in one go before a single one is handled (i.e. dequeue not moved from first entry in segment). Expand the ring already when enqueue reaches the link TRB before the dequeue segment, instead of expanding it when enqueue moves into the dequeue segment. Reported-by: Chris Yokum Closes: https://lore.kernel.org/all/949223224.833962.1709339266739.JavaMail.zimbra@totalphase.com Tested-by: Chris Yokum Fixes: f5af638f0609 ("xhci: Fix transfer ring expansion size calculation") Cc: stable@vger.kernel.org # v6.5+ Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240305132312.955171-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3d9319c27ceb35fa3d2c8b15508967f3fc7e5b78 Author: Douglas Anderson Date: Mon Mar 4 17:49:53 2024 -0800 Revert "tty: serial: simplify qcom_geni_serial_send_chunk_fifo()" This reverts commit 5c7e105cd156fc9adf5294a83623d7a40c15f9b9. As identified by KASAN, the simplification done by the cleanup patch was not legal. >From tracing through the code, it can be seen that we're transmitting from a 4096-byte circular buffer. We copy anywhere from 1-4 bytes from it each time. The simplification runs into trouble when we get near the end of the circular buffer. For instance, we might start out with xmit->tail = 4094 and we want to transfer 4 bytes. With the code before simplification this was no problem. We'd read buf[4094], buf[4095], buf[0], and buf[1]. With the new code we'll do a memcpy(&buf[4094], 4) which reads 2 bytes past the end of the buffer and then skips transmitting what's at buf[0] and buf[1]. KASAN isn't 100% consistent at reporting this for me, but to be extra confident in the analysis, I added traces of the tail and tx_bytes and then wrote a test program: while true; do echo -n "abcdefghijklmnopqrstuvwxyz0" > /dev/ttyMSM0 sleep .1 done I watched the traces over SSH and saw: qcom_geni_serial_send_chunk_fifo: 4093 4 qcom_geni_serial_send_chunk_fifo: 1 3 Which indicated that one byte should be missing. Sure enough the output that should have been: abcdefghijklmnopqrstuvwxyz0 In one case was actually missing a byte: abcdefghijklmnopqrstuvwyz0 Running "ls -al" on large directories also made the missing bytes obvious since columns didn't line up. While the original code may not be the most elegant, we only talking about copying up to 4 bytes here. Let's just go back to the code that worked. Fixes: 5c7e105cd156 ("tty: serial: simplify qcom_geni_serial_send_chunk_fifo()") Cc: stable Signed-off-by: Douglas Anderson Acked-by: Jiri Slaby Tested-by: Johan Hovold Link: https://lore.kernel.org/r/20240304174952.1.I920a314049b345efd1f69d708e7f74d2213d0b49@changeid Signed-off-by: Greg Kroah-Hartman commit 74cb7e0355fae9641f825afa389d3fba3b617714 Author: Sherry Sun Date: Tue Mar 5 09:57:06 2024 +0800 tty: serial: fsl_lpuart: avoid idle preamble pending if CTS is enabled If the remote uart device is not connected or not enabled after booting up, the CTS line is high by default. At this time, if we enable the flow control when opening the device(for example, using “stty -F /dev/ttyLP4 crtscts” command), there will be a pending idle preamble(first writing 0 and then writing 1 to UARTCTRL_TE will queue an idle preamble) that cannot be sent out, resulting in the uart port fail to close(waiting for TX empty), so the user space stty will have to wait for a long time or forever. This is an LPUART IP bug(idle preamble has higher priority than CTS), here add a workaround patch to enable TX CTS after enabling UARTCTRL_TE, so that the idle preamble does not get stuck due to CTS is deasserted. Fixes: 380c966c093e ("tty: serial: fsl_lpuart: add 32-bit register interface support") Cc: stable Signed-off-by: Sherry Sun Reviewed-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20240305015706.1050769-1-sherry.sun@nxp.com Signed-off-by: Greg Kroah-Hartman commit 69c63350e573367f9c8594162288cffa8a26d0d1 Author: Mathias Nyman Date: Fri Feb 23 01:33:43 2024 +0200 usb: port: Don't try to peer unused USB ports based on location Unused USB ports may have bogus location data in ACPI PLD tables. This causes port peering failures as these unused USB2 and USB3 ports location may match. Due to these failures the driver prints a "usb: port power management may be unreliable" warning, and unnecessarily blocks port power off during runtime suspend. This was debugged on a couple DELL systems where the unused ports all returned zeroes in their location data. Similar bugreports exist for other systems. Don't try to peer or match ports that have connect type set to USB_PORT_NOT_USED. Fixes: 3bfd659baec8 ("usb: find internal hub tier mismatch via acpi") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218465 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218486 Tested-by: Paul Menzel Link: https://lore.kernel.org/linux-usb/5406d361-f5b7-4309-b0e6-8c94408f7d75@molgen.mpg.de Cc: stable@vger.kernel.org # v3.16+ Signed-off-by: Mathias Nyman Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218490 Link: https://lore.kernel.org/r/20240222233343.71856-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f90ce1e04cbcc76639d6cba0fdbd820cd80b3c70 Author: Krishna Kurapati Date: Wed Feb 28 17:24:41 2024 +0530 usb: gadget: ncm: Fix handling of zero block length packets While connecting to a Linux host with CDC_NCM_NTB_DEF_SIZE_TX set to 65536, it has been observed that we receive short packets, which come at interval of 5-10 seconds sometimes and have block length zero but still contain 1-2 valid datagrams present. According to the NCM spec: "If wBlockLength = 0x0000, the block is terminated by a short packet. In this case, the USB transfer must still be shorter than dwNtbInMaxSize or dwNtbOutMaxSize. If exactly dwNtbInMaxSize or dwNtbOutMaxSize bytes are sent, and the size is a multiple of wMaxPacketSize for the given pipe, then no ZLP shall be sent. wBlockLength= 0x0000 must be used with extreme care, because of the possibility that the host and device may get out of sync, and because of test issues. wBlockLength = 0x0000 allows the sender to reduce latency by starting to send a very large NTB, and then shortening it when the sender discovers that there’s not sufficient data to justify sending a large NTB" However, there is a potential issue with the current implementation, as it checks for the occurrence of multiple NTBs in a single giveback by verifying if the leftover bytes to be processed is zero or not. If the block length reads zero, we would process the same NTB infintely because the leftover bytes is never zero and it leads to a crash. Fix this by bailing out if block length reads zero. Cc: stable@vger.kernel.org Fixes: 427694cfaafa ("usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call") Signed-off-by: Krishna Kurapati Reviewed-by: Maciej Żenczykowski Link: https://lore.kernel.org/r/20240228115441.2105585-1-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 165376f6b23e9a779850e750fb2eb06622e5a531 Author: RD Babiera Date: Thu Feb 29 00:11:02 2024 +0000 usb: typec: altmodes/displayport: create sysfs nodes as driver's default device attribute group The DisplayPort driver's sysfs nodes may be present to the userspace before typec_altmode_set_drvdata() completes in dp_altmode_probe. This means that a sysfs read can trigger a NULL pointer error by deferencing dp->hpd in hpd_show or dp->lock in pin_assignment_show, as dev_get_drvdata() returns NULL in those cases. Remove manual sysfs node creation in favor of adding attribute group as default for devices bound to the driver. The ATTRIBUTE_GROUPS() macro is not used here otherwise the path to the sysfs nodes is no longer compliant with the ABI. Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode") Cc: stable@vger.kernel.org Signed-off-by: RD Babiera Link: https://lore.kernel.org/r/20240229001101.3889432-2-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman commit 197331b27ac890d0209232d5f669830cd00e8918 Author: Badhri Jagan Sridharan Date: Wed Feb 28 00:05:12 2024 +0000 usb: typec: tpcm: Fix PORT_RESET behavior for self powered devices While commit 69f89168b310 ("usb: typec: tpcm: Fix issues with power being removed during reset") fixes the boot issues for bus powered devices such as LibreTech Renegade Elite/Firefly, it trades off the CC pins NOT being Hi-Zed during errory recovery (i.e PORT_RESET) for devices which are NOT bus powered(a.k.a self powered). This change Hi-Zs the CC pins only for self powered devices, thus preventing brown out for bus powered devices Adhering to spec is gaining more importance due to the Common charger initiative enforced by the European Union. Quoting from the spec: 4.5.2.2.2.1 ErrorRecovery State Requirements The port shall not drive VBUS or VCONN, and shall present a high-impedance to ground (above zOPEN) on its CC1 and CC2 pins. Hi-Zing the CC pins is the inteded behavior for PORT_RESET. CC pins are set to default state after tErrorRecovery in PORT_RESET_WAIT_OFF. 4.5.2.2.2.2 Exiting From ErrorRecovery State A Sink shall transition to Unattached.SNK after tErrorRecovery. A Source shall transition to Unattached.SRC after tErrorRecovery. Fixes: 69f89168b310 ("usb: typec: tpcm: Fix issues with power being removed during reset") Cc: stable@vger.kernel.org Cc: Mark Brown Signed-off-by: Badhri Jagan Sridharan Tested-by: Mark Brown Link: https://lore.kernel.org/r/20240228000512.746252-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 4a30dcac38c2b34f5b4f358630774bc2c2c104b0 Author: Neil Armstrong Date: Fri Feb 23 10:40:40 2024 +0100 usb: typec: ucsi: fix UCSI on SM8550 & SM8650 Qualcomm devices On SM8550 and SM8650 Qualcomm platforms a call to UCSI_GET_PDOS for non-PD partners will cause a firmware crash with no easy way to recover from it. Add UCSI_NO_PARTNER_PDOS quirk for those platform until we find a way to properly handle the crash. Signed-off-by: Neil Armstrong Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240223-topic-sm8550-upstream-ucsi-no-pdos-v1-1-8900ad510944@linaro.org Cc: stable Signed-off-by: Greg Kroah-Hartman commit 8688ab2170a5be0bc922195f7091c38b506bab2e Author: Mike Yu Date: Mon Mar 4 12:24:09 2024 +0000 xfrm: set skb control buffer based on packet offload as well In packet offload, packets are not encrypted in XFRM stack, so the next network layer which the packets will be forwarded to should depend on where the packet came from (either xfrm4_output or xfrm6_output) rather than the matched SA's family type. Test: verified IPv6-in-IPv4 packets on Android device with IPsec packet offload enabled Signed-off-by: Mike Yu Signed-off-by: Steffen Klassert commit d4872d70fc6feabfc8e897edad993a81096ade9f Author: Mike Yu Date: Mon Mar 4 12:24:08 2024 +0000 xfrm: fix xfrm child route lookup for packet offload In current code, xfrm_bundle_create() always uses the matched SA's family type to look up a xfrm child route for the skb. The route returned by xfrm_dst_lookup() will eventually be used in xfrm_output_resume() (skb_dst(skb)->ops->local_out()). If packet offload is used, the above behavior can lead to calling ip_local_out() for an IPv6 packet or calling ip6_local_out() for an IPv4 packet, which is likely to fail. This change fixes the behavior by checking if the matched SA has packet offload enabled. If not, keep the same behavior; if yes, use the matched SP's family type for the lookup. Test: verified IPv6-in-IPv4 packets on Android device with IPsec packet offload enabled Signed-off-by: Mike Yu Signed-off-by: Steffen Klassert commit 961ebd120565cb60cebe21cb634fbc456022db4a Author: Bart Van Assche Date: Mon Mar 4 15:57:15 2024 -0800 fs/aio: Check IOCB_AIO_RW before the struct aio_kiocb conversion The first kiocb_set_cancel_fn() argument may point at a struct kiocb that is not embedded inside struct aio_kiocb. With the current code, depending on the compiler, the req->ki_ctx read happens either before the IOCB_AIO_RW test or after that test. Move the req->ki_ctx read such that it is guaranteed that the IOCB_AIO_RW test happens first. Reported-by: Eric Biggers Cc: Benjamin LaHaise Cc: Eric Biggers Cc: Christoph Hellwig Cc: Avi Kivity Cc: Sandeep Dhavale Cc: Jens Axboe Cc: Greg Kroah-Hartman Cc: Kent Overstreet Cc: stable@vger.kernel.org Fixes: b820de741ae4 ("fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240304235715.3790858-1-bvanassche@acm.org Reviewed-by: Jens Axboe Reviewed-by: Eric Biggers Signed-off-by: Christian Brauner commit 0b385be4c3ccd5636441923d7cad5eda6b4651cb Author: Ville Syrjälä Date: Fri Feb 23 22:32:15 2024 +0200 drm/i915: Don't explode when the dig port we don't have an AUX CH The icl+ power well code currently assumes that every AUX power well maps to an encoder which is using said power well. That is by no menas guaranteed as we: - only register encoders for ports declared in the VBT - combo PHY HDMI-only encoder no longer get an AUX CH since commit 9856308c94ca ("drm/i915: Only populate aux_ch if really needed") However we have places such as intel_power_domains_sanitize_state() that blindly traverse all the possible power wells. So these bits of code may very well encounbter an aux power well with no associated encoder. In this particular case the BIOS seems to have left one AUX power well enabled even though we're dealing with a HDMI only encoder on a combo PHY. We then proceed to turn off said power well and explode when we can't find a matching encoder. As a short term fix we should be able to just skip the PHY related parts of the power well programming since we know this situation can only happen with combo PHYs. Another option might be to go back to always picking an AUX CH for all encoders. However I'm a bit wary about that since we might in theory end up conflicting with the VBT AUX CH assignment. Also that wouldn't help with encoders not declared in the VBT, should we ever need to poke the corresponding power wells. Longer term we need to figure out what the actual relationship is between the PHY vs. AUX CH vs. AUX power well. Currently this is entirely unclear. Cc: stable@vger.kernel.org Fixes: 9856308c94ca ("drm/i915: Only populate aux_ch if really needed") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10184 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240223203216.15210-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak (cherry picked from commit 6a8c66bf0e565c34ad0a18f820e0bb17951f7f91) Signed-off-by: Joonas Lahtinen commit 0314cebb29be2f961abb37bd0b01cb16899868f2 Author: Harshit Mogalapalli Date: Mon Feb 26 06:40:10 2024 -0800 platform/x86/amd/pmf: Fix missing error code in amd_pmf_init_smart_pc() On the error path, assign -ENOMEM to ret when memory allocation of "dev->prev_data" fails. Fixes: e70961505808 ("platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc()") Signed-off-by: Harshit Mogalapalli Reviewed-by: Ilpo Järvinen Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240226144011.2100804-1-harshit.m.mogalapalli@oracle.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit aec7d25b497ce4a8d044e9496de0aa433f7f8f06 Author: Hans de Goede Date: Mon Mar 4 14:43:55 2024 +0100 platform/x86: p2sb: On Goldmont only cache P2SB and SPI devfn BAR On Goldmont p2sb_bar() only ever gets called for 2 devices, the actual P2SB devfn 13,0 and the SPI controller which is part of the P2SB, devfn 13,2. But the current p2sb code tries to cache BAR0 info for all of devfn 13,0 to 13,7 . This involves calling pci_scan_single_device() for device 13 functions 0-7 and the hw does not seem to like pci_scan_single_device() getting called for some of the other hidden devices. E.g. on an ASUS VivoBook D540NV-GQ065T this leads to continuous ACPI errors leading to high CPU usage. Fix this by only caching BAR0 info and thus only calling pci_scan_single_device() for the P2SB and the SPI controller. Fixes: 5913320eb0b3 ("platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe") Reported-by: Danil Rybakov Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218531 Tested-by: Danil Rybakov Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240304134356.305375-2-hdegoede@redhat.com commit a17bd44c0146b00fcaa692915789c16bd1fb2a81 Author: Andy Chi Date: Mon Mar 4 21:40:32 2024 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook The HP EliteBook 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/20240304134033.773348-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai commit 28468cbed92ea5eed19e2cbd2d55758c3c7938ca Author: Bart Van Assche Date: Mon Mar 4 10:29:44 2024 -0800 Revert "fs/aio: Make io_cancel() generate completions again" Patch "fs/aio: Make io_cancel() generate completions again" is based on the assumption that calling kiocb->ki_cancel() does not complete R/W requests. This is incorrect: the two drivers that call kiocb_set_cancel_fn() callers set a cancellation function that calls usb_ep_dequeue(). According to its documentation, usb_ep_dequeue() calls the completion routine with status -ECONNRESET. Hence this revert. Cc: Benjamin LaHaise Cc: Eric Biggers Cc: Christoph Hellwig Cc: Avi Kivity Cc: Sandeep Dhavale Cc: Jens Axboe Cc: Greg Kroah-Hartman Cc: Kent Overstreet Cc: stable@vger.kernel.org Reported-by: syzbot+b91eb2ed18f599dd3c31@syzkaller.appspotmail.com Fixes: 54cbc058d86b ("fs/aio: Make io_cancel() generate completions again") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240304182945.3646109-1-bvanassche@acm.org Acked-by: Eric Biggers Signed-off-by: Christian Brauner commit d6a209dd76e5ceb5d536e0a1a707ffcf64f95cef Merge: 9b467b425710c 01bb1ae35006e Author: Daniel Vetter Date: Tue Mar 5 09:54:11 2024 +0100 Merge tag 'drm-intel-fixes-2024-03-01' of https://anongit.freedesktop.org/git/drm/drm-intel into drm-fixes - Fix to extract HDCP information from primary connector - Check for NULL mmu_interval_notifier before removing Signed-off-by: Daniel Vetter From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZeGOUTfiA0_FNKLg@jlahtine-mobl.ger.corp.intel.com commit 9b467b425710c2af24b78ca4007f6d12c7ec8b78 Author: Tvrtko Ursulin Date: Wed Feb 28 14:22:40 2024 +0000 MAINTAINERS: Update email address for Tvrtko Ursulin I will lose access to my @.*intel.com e-mail addresses soon so let me adjust the maintainers entry and update the mailmap too. While at it consolidate a few other of my old emails to point to the main one. Signed-off-by: Tvrtko Ursulin Cc: Daniel Vetter Cc: Dave Airlie Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Acked-by: Jani Nikula Acked-by: Joonas Lahtinen Acked-by: Rodrigo Vivi Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20240228142240.2539358-1-tvrtko.ursulin@linux.intel.com commit 4daa873133d3db4e17f4ccd9fe1102e4fbab7700 Merge: 47fe2fc1a2257 90502d433c0e7 Author: Jakub Kicinski Date: Mon Mar 4 21:00:27 2024 -0800 Merge tag 'mlx5-fixes-2024-03-01' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2024-03-01 This series provides bug fixes to mlx5 driver. Please pull and let me know if there is any problem. * tag 'mlx5-fixes-2024-03-01' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: Switch to using _bh variant of of spinlock API in port timestamping NAPI poll context net/mlx5e: Use a memory barrier to enforce PTP WQ xmit submission tracking occurs after populating the metadata_map net/mlx5e: Fix MACsec state loss upon state update in offload path net/mlx5e: Change the warning when ignore_flow_level is not supported net/mlx5: Check capability for fw_reset net/mlx5: Fix fw reporter diagnose output net/mlx5: E-switch, Change flow rule destination checking Revert "net/mlx5e: Check the number of elements before walk TC rhashtable" Revert "net/mlx5: Block entering switchdev mode with ns inconsistency" ==================== Link: https://lore.kernel.org/r/20240302070318.62997-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 47fe2fc1a22578cdb1a8c36baffacebcd8d37ed3 Merge: 89d72d4125e94 4035c72dc1ba8 Author: Jakub Kicinski Date: Mon Mar 4 20:56:40 2024 -0800 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-03-01 (ixgbe, i40e, ice) This series contains updates to ixgbe, i40e, and ice drivers. Maciej corrects disable flow for ixgbe, i40e, and ice drivers which could cause non-functional interface with AF_XDP. Michal restores host configuration when changing MSI-X count for VFs on ice driver. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: reconfig host after changing MSI-X on VF ice: reorder disabling IRQ and NAPI in ice_qp_dis i40e: disable NAPI right after disabling irqs when handling xsk_pool ixgbe: {dis, en}able irqs in ixgbe_txrx_ring_{dis, en}able ==================== Link: https://lore.kernel.org/r/20240301192549.2993798-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 89d72d4125e94aa3c2140fedd97ce07ba9e37674 Author: Horatiu Vultur Date: Fri Mar 1 09:06:08 2024 +0100 net: sparx5: Fix use after free inside sparx5_del_mact_entry Based on the static analyzis of the code it looks like when an entry from the MAC table was removed, the entry was still used after being freed. More precise the vid of the mac_entry was used after calling devm_kfree on the mac_entry. The fix consists in first using the vid of the mac_entry to delete the entry from the HW and after that to free it. Fixes: b37a1bae742f ("net: sparx5: add mactable support") Signed-off-by: Horatiu Vultur Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240301080608.3053468-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit f1d088178568a1b6e8bacb3d48e1c51a3b522af8 Author: Niklas Cassel Date: Thu Feb 29 14:43:18 2024 +0100 mailmap: fix Kishon's email Kishon updated his email in commit e6aa4edd2f5b ("MAINTAINERS: Update Kishon's email address in PCI endpoint subsystem"). However, as he is no longer at TI, his TI email now bounces. Add the same email as he has in MAINTAINERS to a mailmap, so that get_maintainer.pl will not output an email that bounces. (This is neeed as get_maintainer.pl will use "git author" to CC people who have significantly modified the same file as you.) Link: https://lkml.kernel.org/r/20240229134318.1201935-1-cassel@kernel.org Signed-off-by: Niklas Cassel Cc: Kishon Vijay Abraham I Cc: Kishon Vijay Abraham I Signed-off-by: Andrew Morton commit 3e00f5802fabf2f504070a591b14b648523ede13 Author: Kees Cook Date: Fri Feb 23 09:08:27 2024 -0800 init/Kconfig: lower GCC version check for -Warray-bounds We continue to see false positives from -Warray-bounds even in GCC 10, which is getting reported in a few places[1] still: security/security.c:811:2: warning: `memcpy' offset 32 is out of the bounds [0, 0] [-Warray-bounds] Lower the GCC version check from 11 to 10. Link: https://lkml.kernel.org/r/20240223170824.work.768-kees@kernel.org Reported-by: Lu Yao Closes: https://lore.kernel.org/lkml/20240117014541.8887-1-yaolu@kylinos.cn/ Link: https://lore.kernel.org/linux-next/65d84438.620a0220.7d171.81a7@mx.google.com [1] Signed-off-by: Kees Cook Reviewed-by: Paul Moore Cc: Ard Biesheuvel Cc: Christophe Leroy Cc: Greg Kroah-Hartman Cc: "Gustavo A. R. Silva" Cc: Johannes Weiner Cc: Marc Aurèle La France Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Nhat Pham Cc: Petr Mladek Cc: Randy Dunlap Cc: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit fc0c8f9089c20d198d8fe51ddc28bfa1af588dce Author: Vlastimil Babka Date: Thu Feb 22 22:59:31 2024 +0100 mm, mmap: fix vma_merge() case 7 with vma_ops->close When debugging issues with a workload using SysV shmem, Michal Hocko has come up with a reproducer that shows how a series of mprotect() operations can result in an elevated shm_nattch and thus leak of the resource. The problem is caused by wrong assumptions in vma_merge() commit 714965ca8252 ("mm/mmap: start distinguishing if vma can be removed in mergeability test"). The shmem vmas have a vma_ops->close callback that decrements shm_nattch, and we remove the vma without calling it. vma_merge() has thus historically avoided merging vma's with vma_ops->close and commit 714965ca8252 was supposed to keep it that way. It relaxed the checks for vma_ops->close in can_vma_merge_after() assuming that it is never called on a vma that would be a candidate for removal. However, the vma_merge() code does also use the result of this check in the decision to remove a different vma in the merge case 7. A robust solution would be to refactor vma_merge() code in a way that the vma_ops->close check is only done for vma's that are actually going to be removed, and not as part of the preliminary checks. That would both solve the existing bug, and also allow additional merges that the checks currently prevent unnecessarily in some cases. However to fix the existing bug first with a minimized risk, and for easier stable backports, this patch only adds a vma_ops->close check to the buggy case 7 specifically. All other cases of vma removal are covered by the can_vma_merge_before() check that includes the test for vma_ops->close. The reproducer code, adapted from Michal Hocko's code: int main(int argc, char *argv[]) { int segment_id; size_t segment_size = 20 * PAGE_SIZE; char * sh_mem; struct shmid_ds shmid_ds; key_t key = 0x1234; segment_id = shmget(key, segment_size, IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR); sh_mem = (char *)shmat(segment_id, NULL, 0); mprotect(sh_mem + 2*PAGE_SIZE, PAGE_SIZE, PROT_NONE); mprotect(sh_mem + PAGE_SIZE, PAGE_SIZE, PROT_WRITE); mprotect(sh_mem + 2*PAGE_SIZE, PAGE_SIZE, PROT_WRITE); shmdt(sh_mem); shmctl(segment_id, IPC_STAT, &shmid_ds); printf("nattch after shmdt(): %lu (expected: 0)\n", shmid_ds.shm_nattch); if (shmctl(segment_id, IPC_RMID, 0)) printf("IPCRM failed %d\n", errno); return (shmid_ds.shm_nattch) ? 1 : 0; } Link: https://lkml.kernel.org/r/20240222215930.14637-2-vbabka@suse.cz Fixes: 714965ca8252 ("mm/mmap: start distinguishing if vma can be removed in mergeability test") Signed-off-by: Vlastimil Babka Reported-by: Michal Hocko Reviewed-by: Lorenzo Stoakes Reviewed-by: Liam R. Howlett Cc: Signed-off-by: Andrew Morton commit d7a08838ab74652f2b53fee9763f0178278c3a4b Author: Qi Zheng Date: Thu Feb 22 16:08:15 2024 +0800 mm: userfaultfd: fix unexpected change to src_folio when UFFDIO_MOVE fails After ptep_clear_flush(), if we find that src_folio is pinned we will fail UFFDIO_MOVE and put src_folio back to src_pte entry, but the change to src_folio->{mapping,index} is not restored in this process. This is not what we expected, so fix it. This can cause the rmap for that page to be invalid, possibly resulting in memory corruption. At least swapout+migration would no longer work, because we might fail to locate the mappings of that folio. Link: https://lkml.kernel.org/r/20240222080815.46291-1-zhengqi.arch@bytedance.com Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Signed-off-by: Qi Zheng Reviewed-by: David Hildenbrand Reviewed-by: Suren Baghdasaryan Cc: Andrea Arcangeli Cc: Signed-off-by: Andrew Morton commit 803de9000f334b771afacb6ff3e78622916668b0 Author: Vlastimil Babka Date: Wed Feb 21 12:43:58 2024 +0100 mm, vmscan: prevent infinite loop for costly GFP_NOIO | __GFP_RETRY_MAYFAIL allocations Sven reports an infinite loop in __alloc_pages_slowpath() for costly order __GFP_RETRY_MAYFAIL allocations that are also GFP_NOIO. Such combination can happen in a suspend/resume context where a GFP_KERNEL allocation can have __GFP_IO masked out via gfp_allowed_mask. Quoting Sven: 1. try to do a "costly" allocation (order > PAGE_ALLOC_COSTLY_ORDER) with __GFP_RETRY_MAYFAIL set. 2. page alloc's __alloc_pages_slowpath tries to get a page from the freelist. This fails because there is nothing free of that costly order. 3. page alloc tries to reclaim by calling __alloc_pages_direct_reclaim, which bails out because a zone is ready to be compacted; it pretends to have made a single page of progress. 4. page alloc tries to compact, but this always bails out early because __GFP_IO is not set (it's not passed by the snd allocator, and even if it were, we are suspending so the __GFP_IO flag would be cleared anyway). 5. page alloc believes reclaim progress was made (because of the pretense in item 3) and so it checks whether it should retry compaction. The compaction retry logic thinks it should try again, because: a) reclaim is needed because of the early bail-out in item 4 b) a zonelist is suitable for compaction 6. goto 2. indefinite stall. (end quote) The immediate root cause is confusing the COMPACT_SKIPPED returned from __alloc_pages_direct_compact() (step 4) due to lack of __GFP_IO to be indicating a lack of order-0 pages, and in step 5 evaluating that in should_compact_retry() as a reason to retry, before incrementing and limiting the number of retries. There are however other places that wrongly assume that compaction can happen while we lack __GFP_IO. To fix this, introduce gfp_compaction_allowed() to abstract the __GFP_IO evaluation and switch the open-coded test in try_to_compact_pages() to use it. Also use the new helper in: - compaction_ready(), which will make reclaim not bail out in step 3, so there's at least one attempt to actually reclaim, even if chances are small for a costly order - in_reclaim_compaction() which will make should_continue_reclaim() return false and we don't over-reclaim unnecessarily - in __alloc_pages_slowpath() to set a local variable can_compact, which is then used to avoid retrying reclaim/compaction for costly allocations (step 5) if we can't compact and also to skip the early compaction attempt that we do in some cases Link: https://lkml.kernel.org/r/20240221114357.13655-2-vbabka@suse.cz Fixes: 3250845d0526 ("Revert "mm, oom: prevent premature OOM killer invocation for high order request"") Signed-off-by: Vlastimil Babka Reported-by: Sven van Ashbrook Closes: https://lore.kernel.org/all/CAG-rBihs_xMKb3wrMO1%2B-%2Bp4fowP9oy1pa_OTkfxBzPUVOZF%2Bg@mail.gmail.com/ Tested-by: Karthikeyan Ramasubramanian Cc: Brian Geffon Cc: Curtis Malainey Cc: Jaroslav Kysela Cc: Mel Gorman Cc: Michal Hocko Cc: Takashi Iwai Cc: Signed-off-by: Andrew Morton commit af1e0a7d39f98c0dea1b186a76fcee7da6a5f7bc Author: Dawei Li Date: Mon Mar 4 18:16:53 2024 +0800 firmware: microchip: Fix over-requested allocation size cocci warnings: (new ones prefixed by >>) >> drivers/firmware/microchip/mpfs-auto-update.c:387:72-78: ERROR: application of sizeof to pointer drivers/firmware/microchip/mpfs-auto-update.c:170:72-78: ERROR: application of sizeof to pointer response_msg is a pointer to u32, so the size of element it points to is supposed to be a multiple of sizeof(u32), rather than sizeof(u32 *). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202403040516.CYxoWTXw-lkp@intel.com/ Signed-off-by: Dawei Li Fixes: ec5b0f1193ad ("firmware: microchip: add PolarFire SoC Auto Update support") Signed-off-by: Conor Dooley commit b3a51137607cee7c814cd3a75d96f78b9ee1dc1f Author: Al Raj Hassain Date: Mon Mar 4 16:09:23 2024 +0530 ASoC: amd: yc: Add HP Pavilion Aero Laptop 13-be2xxx(8BD6) into DMI quirk table The HP Pavilion Aero Laptop 13-be2xxx(8BD6) requires a quirk entry for its internal microphone to function. Signed-off-by: Al Raj Hassain Reviewed-by: Mario Limonciello Link: https://msgid.link/r/20240304103924.13673-1-alrajhassain@gmail.com Signed-off-by: Mark Brown commit cbae1a350e3ceff38242a4905805c80ccbcfbba5 Author: Andreas Pape Date: Fri Mar 1 09:50:03 2024 +0100 ASoC: rcar: adg: correct TIMSEL setting for SSI9 Timing select registers for SRC and CMD are by default referring to the corresponding SSI word select. The calculation rule from HW spec skips SSI8, which has no clock connection. >From section 43.2.18 CMD Output Timing Select Register (CMDOUT_TIMSEL), of R-Car Series, 3rd Generation Hardware User’s Manual Rev.2.20: CMD0_OUT_DIVCLK_ Output Timing SEL [4:0] Signal Select B'0 0110: ssi_ws0 B'0 0111: ssi_ws1 B'0 1000: ssi_ws2 B'0 1001: ssi_ws3 B'0 1010: ssi_ws4 B'0 1011: ssi_ws5 B'0 1100: ssi_ws6 B'0 1101: ssi_ws7 B'0 1110: ssi_ws9 B'0 1111: Setting prohibited Fix the erroneous prohibited setting of timsel value 1111 (0xf) for SSI9 by using timsel value 1110 (0xe) instead. This is possible because SSI8 is not connected as shown by in the table above. [21.695055] rcar_sound ec500000.sound: b adg[0]-CMDOUT_TIMSEL (32):00000f00/00000f1f Correct the timsel assignment. Fixes: 629509c5bc478c ("ASoC: rsnd: add Gen2 SRC and DMAEngine support") Suggested-by: Kuninori Morimoto Signed-off-by: Andreas Pape Signed-off-by: Yeswanth Rayapati Tested-by: Yeswanth Rayapati [erosca: massage commit description] Signed-off-by: Eugeniu Rosca Acked-by: Kuninori Morimoto Link: https://msgid.link/r/20240301085003.3057-1-erosca@de.adit-jv.com Signed-off-by: Mark Brown commit 9dfc46c87cdc8f5a42a71de247a744a6b8188980 Author: Cong Yang Date: Fri Mar 1 14:11:28 2024 +0800 drm/panel: boe-tv101wum-nl6: Fine tune Himax83102-j02 panel HFP and HBP (again) The current measured frame rate is 59.95Hz, which does not meet the requirements of touch-stylus and stylus cannot work normally. After adjustment, the actual measurement is 60.001Hz. Now this panel looks like it's only used by me on the MTK platform, so let's change this set of parameters. [ dianders: Added "(again") to subject and fixed the "Fixes" line ] Fixes: cea7008190ad ("drm/panel: boe-tv101wum-nl6: Fine tune Himax83102-j02 panel HFP and HBP") Signed-off-by: Cong Yang Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240301061128.3145982-1-yangcong5@huaqin.corp-partner.google.com commit 6717ff5533f332ef7294655629b8fa5fb8b132de Author: Quentin Schulz Date: Fri Feb 23 14:11:23 2024 +0100 regulator: rk808: fix LDO range on RK806 The linear ranges aren't really matching what they should be. Indeed, the range is inclusive of the min value, so it makes sense the previous range does NOT include the max step value representing the min value of the range in question. Since 3.4V is represented by the decimal value 232, the previous range max step value should be 231 and not 232. No expected change in behavior since 3.4V was mapped with step 232 from the first range but is now mapped with step 232 from the second range. While at it, remove the incorrect comment from the second range. Fixes: f991a220a447 ("regulator: rk808: add rk806 support") Cc: Quentin Schulz Signed-off-by: Quentin Schulz Link: https://msgid.link/r/20240223-rk806-regulator-ranges-v1-2-3904ab70d250@theobroma-systems.com Signed-off-by: Mark Brown commit 5803b54068435be3a3254f9ecdc1ebd5c18718a8 Author: Quentin Schulz Date: Fri Feb 23 14:11:22 2024 +0100 regulator: rk808: fix buck range on RK806 The linear ranges aren't really matching what they should be. Indeed, the range is inclusive of the min value, so it makes sense the previous range does NOT include the max step value representing the min value of the range in question. Since 1.5V is represented by the decimal value 160, the previous range max step value should be 159 and not 160. Similarly, 3.4V is represented by the decimal value 236, so the previous range max value should be 235 and not 237. The only change in behavior this makes is that this actually modeled the ranges to map step with decimal value 237 with 3.65V instead of 3.4V (the max supported by the HW). Fixes: f991a220a447 ("regulator: rk808: add rk806 support") Cc: Quentin Schulz Signed-off-by: Quentin Schulz Link: https://msgid.link/r/20240223-rk806-regulator-ranges-v1-1-3904ab70d250@theobroma-systems.com Signed-off-by: Mark Brown commit 64b9175055a6a4dd367f92cb2be097fbb8013cb0 Merge: 35edcf68a9990 95915ba4b987c Author: Arnd Bergmann Date: Mon Mar 4 15:26:16 2024 +0100 Merge tag 'optee-fix-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Fix kernel panic in OP-TEE driver * tag 'optee-fix-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: Fix kernel panic caused by incorrect error handling Link: https://lore.kernel.org/r/20240304132727.GA3501807@rayden Signed-off-by: Arnd Bergmann commit 35edcf68a999028d12ef3203e1227d6b8dd650a1 Merge: d20f2a196d280 ff6bd76f4d997 Author: Arnd Bergmann Date: Mon Mar 4 15:25:16 2024 +0100 Merge tag 'tegra-for-6.8-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/fixes arm64: tegra: Device tree fixes for v6.8 This contains two fixes to make the MGBE Ethernet devices found on Tegra234 work properly. * tag 'tegra-for-6.8-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Fix Tegra234 MGBE power-domains arm64: tegra: Set the correct PHY mode for MGBE Link: https://lore.kernel.org/r/20240226144536.1525704-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit d20f2a196d2805ea9c2982489337d4d7a732f603 Merge: 2bb5a9ac88425 65e32301e1a0a Author: Arnd Bergmann Date: Mon Mar 4 15:24:27 2024 +0100 Merge tag 'imx-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.8, round 2: - Update MAINTAINERS to use a public mailing list for NXP i.MX development. - Re-enable CONFIG_BACKLIGHT_CLASS_DEVICE in imx_v6_v7_defconfig to fix a backlight regression. - Remove DSI port endpoints from i.MX7 SoC DTSI to fix a display regression. - Fix LDB clocks property for i.MX8MP device tree. - Fix TC9595 reset GPIO on DH i.MX8M Plus DHCOM SoM. * tag 'imx-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: imx8mp: Fix LDB clocks property arm64: dts: imx8mp: Fix TC9595 reset GPIO on DH i.MX8M Plus DHCOM SoM MAINTAINERS: Use a proper mailinglist for NXP i.MX development ARM: dts: imx7: remove DSI port endpoints ARM: imx_v6_v7_defconfig: Restore CONFIG_BACKLIGHT_CLASS_DEVICE Link: https://lore.kernel.org/r/ZdtPJzdenRybI+Bq@dragon Signed-off-by: Arnd Bergmann commit 2bb5a9ac8842506010e17747632079353375efee Merge: aa8bb984f7867 cb0bbdc4cc327 Author: Arnd Bergmann Date: Mon Mar 4 15:23:41 2024 +0100 Merge tag 'qcom-arm64-fixes-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes Qualcomm ARM64 DeviceTree fixes for 6.8 This marks an additional GPIO as protected on SM8650 devices, to avoid a system reset caused by a security violation with some firmware versions. It also adds the missing interconnect-names, which resolves a regression where one of the I2C busses on SM6115 devices would no longer probe in Linux. * tag 'qcom-arm64-fixes-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: sm6115: Fix missing interconnect-names arm64: dts: qcom: sm8650-mtp: add gpio74 as reserved gpio arm64: dts: qcom: sm8650-qrd: add gpio74 as reserved gpio Link: https://lore.kernel.org/r/20240225025205.479589-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit aa8bb984f7867c3e98ff49dde8416a4001538156 Merge: 90d35da658da8 cbec657208bdd Author: Arnd Bergmann Date: Mon Mar 4 15:22:31 2024 +0100 Merge tag 'sunxi-fixes-for-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes - include Orange Pi Zero 2W DT in Makefile * tag 'sunxi-fixes-for-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h616: Add Orange Pi Zero 2W to Makefile Link: https://lore.kernel.org/r/20240223205450.GA8881@jernej-laptop Signed-off-by: Arnd Bergmann commit 948abb59ebd3892c425165efd8fb2f5954db8de7 Merge: 429679dcf7d91 f05d2283d1118 Author: David S. Miller Date: Mon Mar 4 13:05:15 2024 +0000 Merge branch 'mptcp-test-fixes' Matthieu Baerts says: ==================== selftests: mptcp: fixes for diag.sh Here are two patches fixing issues in MPTCP diag.sh kselftest: - Patch 1 makes sure the exit code is '1' in case of error, and not the test ID, not to return an exit code that would be wrongly interpreted by the ksefltests framework, e.g. '4' means 'skip'. - Patch 2 avoids waiting for unnecessary conditions, which can cause timeouts in some very slow environments. ==================== Signed-off-by: Matthieu Baerts (NGI0) commit f05d2283d11187675569d3a0286dbaf45d8eb70c Author: Matthieu Baerts (NGI0) Date: Fri Mar 1 18:11:23 2024 +0100 selftests: mptcp: diag: avoid extra waiting When creating a lot of listener sockets, it is enough to wait only for the last one, like we are doing before in diag.sh for other subtests. If we do a check for each listener sockets, each time listing all available sockets, it can take a very long time in very slow environments, at the point we can reach some timeout. When using the debug kconfig, the waiting time switches from more than 8 sec to 0.1 sec on my side. In slow/busy environments, and with a poll timeout set to 30 ms, the waiting time could go up to ~100 sec because the listener socket would timeout and stop, while the script would still be checking one by one if all sockets are ready. The result is that after having waited for everything to be ready, all sockets have been stopped due to a timeout, and it is too late for the script to check how many there were. While at it, also removed ss options we don't need: we only need the filtering options, to count how many listener sockets have been created. We don't need to ask ss to display internal TCP information, and the memory if the output is dropped by the 'wc -l' command anyway. Fixes: b4b51d36bbaa ("selftests: mptcp: explicitly trigger the listener diag code-path") Reported-by: Jakub Kicinski Closes: https://lore.kernel.org/r/20240301063754.2ecefecf@kernel.org Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 45bcc0346561daa3f59e19a753cc7f3e08e8dff1 Author: Geliang Tang Date: Fri Mar 1 18:11:22 2024 +0100 selftests: mptcp: diag: return KSFT_FAIL not test_cnt The test counter 'test_cnt' should not be returned in diag.sh, e.g. what if only the 4th test fail? Will do 'exit 4' which is 'exit ${KSFT_SKIP}', the whole test will be marked as skipped instead of 'failed'! So we should do ret=${KSFT_FAIL} instead. Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests") Cc: stable@vger.kernel.org Fixes: 42fb6cddec3b ("selftests: mptcp: more stable diag tests") Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 2c79bd34af13de221ddab29d8dfc9d5eeca8fe9b Author: Puranjay Mohan Date: Thu Feb 29 23:16:20 2024 +0000 arm64: prohibit probing on arch_kunwind_consume_entry() Make arch_kunwind_consume_entry() as __always_inline otherwise the compiler might not inline it and allow attaching probes to it. Without this, just probing arch_kunwind_consume_entry() via /kprobe_events will crash the kernel on arm64. The crash can be reproduced using the following compiler and kernel combination: clang version 19.0.0git (https://github.com/llvm/llvm-project.git d68d29516102252f6bf6dc23fb22cef144ca1cb3) commit 87adedeba51a ("Merge tag 'net-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") [root@localhost ~]# echo 'p arch_kunwind_consume_entry' > /sys/kernel/debug/tracing/kprobe_events [root@localhost ~]# echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable Modules linked in: aes_ce_blk aes_ce_cipher ghash_ce sha2_ce virtio_net sha256_arm64 sha1_ce arm_smccc_trng net_failover failover virtio_mmio uio_pdrv_genirq uio sch_fq_codel dm_mod dax configfs CPU: 3 PID: 1405 Comm: bash Not tainted 6.8.0-rc6+ #14 Hardware name: linux,dummy-virt (DT) pstate: 604003c5 (nZCv DAIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : kprobe_breakpoint_handler+0x17c/0x258 lr : kprobe_breakpoint_handler+0x17c/0x258 sp : ffff800085d6ab60 x29: ffff800085d6ab60 x28: ffff0000066f0040 x27: ffff0000066f0b20 x26: ffff800081fa7b0c x25: 0000000000000002 x24: ffff00000b29bd18 x23: ffff00007904c590 x22: ffff800081fa6590 x21: ffff800081fa6588 x20: ffff00000b29bd18 x19: ffff800085d6ac40 x18: 0000000000000079 x17: 0000000000000001 x16: ffffffffffffffff x15: 0000000000000004 x14: ffff80008277a940 x13: 0000000000000003 x12: 0000000000000003 x11: 00000000fffeffff x10: c0000000fffeffff x9 : aa95616fdf80cc00 x8 : aa95616fdf80cc00 x7 : 205d343137373231 x6 : ffff800080fb48ec x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000000 x1 : ffff800085d6a910 x0 : 0000000000000079 Call trace: kprobes: Failed to recover from reentered kprobes. kprobes: Dump kprobe: .symbol_name = arch_kunwind_consume_entry, .offset = 0, .addr = arch_kunwind_consume_entry+0x0/0x40 ------------[ cut here ]------------ kernel BUG at arch/arm64/kernel/probes/kprobes.c:241! kprobes: Failed to recover from reentered kprobes. kprobes: Dump kprobe: .symbol_name = arch_kunwind_consume_entry, .offset = 0, .addr = arch_kunwind_consume_entry+0x0/0x40 Fixes: 1aba06e7b2b4 ("arm64: stacktrace: factor out kunwind_stack_walk()") Signed-off-by: Puranjay Mohan Reviewed-by: Mark Rutland Link: https://lore.kernel.org/r/20240229231620.24846-1-puranjay12@gmail.com Signed-off-by: Will Deacon commit 72e6d668773fd19f78a6e8017347b08a5cccaaeb Author: Imre Deak Date: Fri Mar 1 17:22:43 2024 +0200 drm: Fix output poll work for drm_kms_helper_poll=n If drm_kms_helper_poll=n the output poll work will only get scheduled from drm_helper_probe_single_connector_modes() to handle a delayed hotplug event. Since polling is disabled the work in this case should just call drm_kms_helper_hotplug_event() w/o detecting the state of connectors and rescheduling the work. After commit d33a54e3991d after a delayed hotplug event above the connectors did get re-detected in the poll work and the work got re-scheduled periodically (since poll_running is also false if drm_kms_helper_poll=n), in effect ignoring the drm_kms_helper_poll=n kernel param. Fix the above by calling only drm_kms_helper_hotplug_event() for a delayed hotplug event if drm_kms_helper_hotplug_event=n, as was done before d33a54e3991d. Cc: Dmitry Baryshkov Reported-by: Ville Syrjälä Fixes: d33a54e3991d ("drm/probe_helper: sort out poll_running vs poll_enabled") Reviewed-by: Dmitry Baryshkov Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240301152243.1670573-1-imre.deak@intel.com commit 429679dcf7d918b7bb523d89bde3307fb02496c3 Author: Jakub Kicinski Date: Thu Feb 29 17:13:31 2024 -0800 page_pool: fix netlink dump stop/resume If message fills up we need to stop writing. 'break' will only get us out of the iteration over pools of a single netdev, we need to also stop walking netdevs. This results in either infinite dump, or missing pools, depending on whether message full happens on the last netdev (infinite dump) or non-last (missing pools). Fixes: 950ab53b77ab ("net: page_pool: implement GET in the netlink API") Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 1ca1ba465e55b9460e4e75dec9fff31e708fec74 Author: Eric Dumazet Date: Thu Feb 29 13:11:52 2024 +0000 geneve: make sure to pull inner header in geneve_rx() syzbot triggered a bug in geneve_rx() [1] Issue is similar to the one I fixed in commit 8d975c15c0cd ("ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv()") We have to save skb->network_header in a temporary variable in order to be able to recompute the network_header pointer after a pskb_inet_may_pull() call. pskb_inet_may_pull() makes sure the needed headers are in skb->head. [1] BUG: KMSAN: uninit-value in IP_ECN_decapsulate include/net/inet_ecn.h:302 [inline] BUG: KMSAN: uninit-value in geneve_rx drivers/net/geneve.c:279 [inline] BUG: KMSAN: uninit-value in geneve_udp_encap_recv+0x36f9/0x3c10 drivers/net/geneve.c:391 IP_ECN_decapsulate include/net/inet_ecn.h:302 [inline] geneve_rx drivers/net/geneve.c:279 [inline] geneve_udp_encap_recv+0x36f9/0x3c10 drivers/net/geneve.c:391 udp_queue_rcv_one_skb+0x1d39/0x1f20 net/ipv4/udp.c:2108 udp_queue_rcv_skb+0x6ae/0x6e0 net/ipv4/udp.c:2186 udp_unicast_rcv_skb+0x184/0x4b0 net/ipv4/udp.c:2346 __udp4_lib_rcv+0x1c6b/0x3010 net/ipv4/udp.c:2422 udp_rcv+0x7d/0xa0 net/ipv4/udp.c:2604 ip_protocol_deliver_rcu+0x264/0x1300 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x2b8/0x440 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] ip_local_deliver+0x21f/0x490 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:461 [inline] ip_rcv_finish net/ipv4/ip_input.c:449 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] ip_rcv+0x46f/0x760 net/ipv4/ip_input.c:569 __netif_receive_skb_one_core net/core/dev.c:5534 [inline] __netif_receive_skb+0x1a6/0x5a0 net/core/dev.c:5648 process_backlog+0x480/0x8b0 net/core/dev.c:5976 __napi_poll+0xe3/0x980 net/core/dev.c:6576 napi_poll net/core/dev.c:6645 [inline] net_rx_action+0x8b8/0x1870 net/core/dev.c:6778 __do_softirq+0x1b7/0x7c5 kernel/softirq.c:553 do_softirq+0x9a/0xf0 kernel/softirq.c:454 __local_bh_enable_ip+0x9b/0xa0 kernel/softirq.c:381 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:820 [inline] __dev_queue_xmit+0x2768/0x51c0 net/core/dev.c:4378 dev_queue_xmit include/linux/netdevice.h:3171 [inline] packet_xmit+0x9c/0x6b0 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3081 [inline] packet_sendmsg+0x8aef/0x9f10 net/packet/af_packet.c:3113 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x735/0xa10 net/socket.c:2191 __do_sys_sendto net/socket.c:2203 [inline] __se_sys_sendto net/socket.c:2199 [inline] __x64_sys_sendto+0x125/0x1c0 net/socket.c:2199 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Uninit was created at: slab_post_alloc_hook mm/slub.c:3819 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc_node+0x5cb/0xbc0 mm/slub.c:3903 kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:560 __alloc_skb+0x352/0x790 net/core/skbuff.c:651 alloc_skb include/linux/skbuff.h:1296 [inline] alloc_skb_with_frags+0xc8/0xbd0 net/core/skbuff.c:6394 sock_alloc_send_pskb+0xa80/0xbf0 net/core/sock.c:2783 packet_alloc_skb net/packet/af_packet.c:2930 [inline] packet_snd net/packet/af_packet.c:3024 [inline] packet_sendmsg+0x70c2/0x9f10 net/packet/af_packet.c:3113 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x735/0xa10 net/socket.c:2191 __do_sys_sendto net/socket.c:2203 [inline] __se_sys_sendto net/socket.c:2199 [inline] __x64_sys_sendto+0x125/0x1c0 net/socket.c:2199 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Fixes: 2d07dc79fe04 ("geneve: add initial netdev driver for GENEVE tunnels") Reported-and-tested-by: syzbot+6a1423ff3f97159aae64@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 51270d573a8d9dd5afdc7934de97d66c0e14b5fd Author: Steven Rostedt (Google) Date: Thu Feb 29 14:34:44 2024 -0500 tracing/net_sched: Fix tracepoints that save qdisc_dev() as a string I'm updating __assign_str() and will be removing the second parameter. To make sure that it does not break anything, I make sure that it matches the __string() field, as that is where the string is actually going to be saved in. To make sure there's nothing that breaks, I added a WARN_ON() to make sure that what was used in __string() is the same that is used in __assign_str(). In doing this change, an error was triggered as __assign_str() now expects the string passed in to be a char * value. I instead had the following warning: include/trace/events/qdisc.h: In function ‘trace_event_raw_event_qdisc_reset’: include/trace/events/qdisc.h:91:35: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Werror=incompatible-pointer-types] 91 | __assign_str(dev, qdisc_dev(q)); That's because the qdisc_enqueue() and qdisc_reset() pass in qdisc_dev(q) to __assign_str() and to __string(). But that function returns a pointer to struct net_device and not a string. It appears that these events are just saving the pointer as a string and then reading it as a string as well. Use qdisc_dev(q)->name to save the device instead. Fixes: a34dac0b90552 ("net_sched: add tracepoints for qdisc_reset() and qdisc_destroy()") Signed-off-by: Steven Rostedt (Google) Reviewed-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 95915ba4b987cf2b222b0f251280228a1ff977ac Author: Sumit Garg Date: Fri Mar 1 20:07:31 2024 +0530 tee: optee: Fix kernel panic caused by incorrect error handling The error path while failing to register devices on the TEE bus has a bug leading to kernel panic as follows: [ 15.398930] Unable to handle kernel paging request at virtual address ffff07ed00626d7c [ 15.406913] Mem abort info: [ 15.409722] ESR = 0x0000000096000005 [ 15.413490] EC = 0x25: DABT (current EL), IL = 32 bits [ 15.418814] SET = 0, FnV = 0 [ 15.421878] EA = 0, S1PTW = 0 [ 15.425031] FSC = 0x05: level 1 translation fault [ 15.429922] Data abort info: [ 15.432813] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 [ 15.438310] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 15.443372] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 15.448697] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000d9e3e000 [ 15.455413] [ffff07ed00626d7c] pgd=1800000bffdf9003, p4d=1800000bffdf9003, pud=0000000000000000 [ 15.464146] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP Commit 7269cba53d90 ("tee: optee: Fix supplicant based device enumeration") lead to the introduction of this bug. So fix it appropriately. Reported-by: Mikko Rapeli Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218542 Fixes: 7269cba53d90 ("tee: optee: Fix supplicant based device enumeration") Cc: stable@vger.kernel.org Signed-off-by: Sumit Garg Signed-off-by: Jens Wiklander commit b603d95692e47dc6f5f733e93c3841dc0c01e624 Author: Stefan Binding Date: Fri Mar 1 16:01:54 2024 +0000 ALSA: hda: cs35l41: Overwrite CS35L41 configuration for ASUS UM5302LA Whilst this laptop contains _DSD inside the BIOS, there is an error in this configuration. Override the _DSD in the BIOS with the correct configuration for this laptop. Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20240301160154.158398-4-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 6214e24cae9b10a7c1572f99552610a24614fffe Author: Stefan Binding Date: Fri Mar 1 16:01:53 2024 +0000 ALSA: hda/realtek: Add quirks for Lenovo Thinkbook 16P laptops These models use 2 CS35L41 amps with HDA using I2C. Both models have _DSD support inside cs35l41_hda_property.c. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218437 Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20240301160154.158398-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 37d9d5ff5216df1908a41e6ddd72460c5d938b8a Author: Stefan Binding Date: Fri Mar 1 16:01:52 2024 +0000 ALSA: hda: cs35l41: Support Lenovo Thinkbook 16P Adds sound support for 2 Lenovo Thinkbook 16P laptops using CS35L41 HDA with External Boost. SSIDs: - 17AA38A9 - 17AA38AB Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218437 Signed-off-by: Stefan Binding Link: https://lore.kernel.org/r/20240301160154.158398-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 34ab5bbc6e82214d7f7393eba26d164b303ebb4e Author: Kailang Yang Date: Fri Mar 1 15:04:02 2024 +0800 ALSA: hda/realtek - Add Headset Mic supported Acer NB platform It will be enable headset Mic for Acer NB platform. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/fe0eb6661ca240f3b7762b5b3257710d@realtek.com Signed-off-by: Takashi Iwai commit ac3e0384073b2408d6cb0d972fee9fcc3776053d Author: Hans de Goede Date: Tue Feb 20 20:00:35 2024 +0100 misc: lis3lv02d_i2c: Fix regulators getting en-/dis-abled twice on suspend/resume When not configured for wakeup lis3lv02d_i2c_suspend() will call lis3lv02d_poweroff() even if the device has already been turned off by the runtime-suspend handler and if configured for wakeup and the device is runtime-suspended at this point then it is not turned back on to serve as a wakeup source. Before commit b1b9f7a49440 ("misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback"), lis3lv02d_poweroff() failed to disable the regulators which as a side effect made calling poweroff() twice ok. Now that poweroff() correctly disables the regulators, doing this twice triggers a WARN() in the regulator core: unbalanced disables for regulator-dummy WARNING: CPU: 1 PID: 92 at drivers/regulator/core.c:2999 _regulator_disable ... Fix lis3lv02d_i2c_suspend() to not call poweroff() a second time if already runtime-suspended and add a poweron() call when necessary to make wakeup work. lis3lv02d_i2c_resume() has similar issues, with an added weirness that it always powers on the device if it is runtime suspended, after which the first runtime-resume will call poweron() again, causing the enabled count for the regulator to increase by 1 every suspend/resume. These unbalanced regulator_enable() calls cause the regulator to never be turned off and trigger the following WARN() on driver unbind: WARNING: CPU: 1 PID: 1724 at drivers/regulator/core.c:2396 _regulator_put Fix this by making lis3lv02d_i2c_resume() mirror the new suspend(). Fixes: b1b9f7a49440 ("misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback") Reported-by: Paul Menzel Closes: https://lore.kernel.org/regressions/5fc6da74-af0a-4aac-b4d5-a000b39a63a5@molgen.mpg.de/ Cc: stable@vger.kernel.org Cc: regressions@lists.linux.dev Signed-off-by: Hans de Goede Tested-by: Paul Menzel # Dell XPS 15 7590 Reviewed-by: Paul Menzel Link: https://lore.kernel.org/r/20240220190035.53402-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 4f423c4cbe26d79d8974936eb01e0d6574c5d2ac Author: Dmitry Baryshkov Date: Wed Feb 21 01:07:21 2024 +0200 Revert "arm64: dts: qcom: msm8996: Hook up MPM" Commit 09896da07315 ("arm64: dts: qcom: msm8996: Hook up MPM") has hooked up the MPM irq chip on the MSM8996 platform. However this causes my Dragonboard 820c crash during bootup (usually when probing IOMMUs). Revert the offending commit for now. Quick debug shows that making tlmm's wakeup-parent point to the MPM is enough to trigger the crash. Fixes: 09896da07315 ("arm64: dts: qcom: msm8996: Hook up MPM") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240221-msm8996-revert-mpm-v1-1-cdca9e30c9b4@linaro.org Signed-off-by: Bjorn Andersson commit dd50f771af20fb02b1aecde04fbd085c872a9139 Author: Max Nguyen Date: Sun Mar 3 14:13:52 2024 -0800 Input: xpad - add additional HyperX Controller Identifiers Add additional HyperX device identifiers to xpad_device and xpad_table. Suggested-by: Chris Toledanes Reviewed-by: Carl Ng Signed-off-by: Max Nguyen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/44ad5ffa-76d8-4046-94ee-2ef171930ed2@gmail.com Signed-off-by: Dmitry Torokhov commit 90d35da658da8cff0d4ecbb5113f5fac9d00eb72 Author: Linus Torvalds Date: Sun Mar 3 13:02:52 2024 -0800 Linux 6.8-rc7 commit 58c806d867bf265c6fd16fc3bc62e2d3c156b5c9 Merge: d57dd2d24ddb4 d4c08d8b23b22 Author: Linus Torvalds Date: Sun Mar 3 09:56:49 2024 -0800 Merge tag 'phy-fixes2-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy fixes from Vinod Koul: - qcom: m31 pointer err fix, eusb2 fix redundant zero-out loop and v3 offset fix on qmp-usb - freescale: fix for dphy alias * tag 'phy-fixes2-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: qcom-qmp-usb: fix v3 offsets data phy: qualcomm: eusb2-repeater: Rework init to drop redundant zero-out loop phy: qcom: phy-qcom-m31: fix wrong pointer pass to PTR_ERR() phy: freescale: phy-fsl-imx8-mipi-dphy: Fix alias name to use dashes commit d57dd2d24ddb4c69635a72c6c36e7dc82142d499 Merge: e4f79000952e8 df2515a17914e Author: Linus Torvalds Date: Sun Mar 3 09:54:03 2024 -0800 Merge tag 'dmaengine-fix2-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: - dw-edma fixes to improve driver and remote HDMA setup - fsl-edma fixes for SoC hange, irq init and byte calculations and sparse fixes - idxd: safe user copy of completion record fix - ptdma: consistent DMA mask fix * tag 'dmaengine-fix2-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: ptdma: use consistent DMA masks dmaengine: fsl-qdma: add __iomem and struct in union to fix sparse warning dmaengine: idxd: Ensure safe user copy of completion record dmaengine: fsl-edma: correct max_segment_size setting dmaengine: idxd: Remove shadow Event Log head stored in idxd dmaengine: fsl-edma: correct calculation of 'nbytes' in multi-fifo scenario dmaengine: fsl-qdma: init irq after reg initialization dmaengine: fsl-qdma: fix SoC may hang on 16 byte unaligned read dmaengine: dw-edma: eDMA: Add sync read before starting the DMA transfer in remote setup dmaengine: dw-edma: HDMA: Add sync read before starting the DMA transfer in remote setup dmaengine: dw-edma: Add HDMA remote interrupt configuration dmaengine: dw-edma: HDMA_V0_REMOTEL_STOP_INT_EN typo fix dmaengine: dw-edma: Fix wrong interrupt bit set for HDMA dmaengine: dw-edma: Fix the ch_count hdma callback commit e4f79000952e819d58b1edf56466413e7081e6ed Merge: 73d35f83354c2 380cb2f4df784 Author: Linus Torvalds Date: Sun Mar 3 09:47:19 2024 -0800 Merge tag 'powerpc-6.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix IOMMU table initialisation when doing kdump over SR-IOV - Fix incorrect RTAS function name for resetting TCE tables - Fix fpu_signal selftest failures since a recent change Thanks to Gaurav Batra and Nathan Lynch. * tag 'powerpc-6.8-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: selftests/powerpc: Fix fpu_signal failures powerpc/rtas: use correct function name for resetting TCE tables powerpc/pseries/iommu: IOMMU table is not initialized for kdump over SR-IOV commit 73d35f83354c2b54a0bf52fef94b40f483680b91 Merge: 04b8076df2534 7fd817c906503 Author: Linus Torvalds Date: Sun Mar 3 09:43:03 2024 -0800 Merge tag 'x86_urgent_for_v6.8_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Do not reserve SETUP_RNG_SEED setup data in the e820 map as it should be used by kexec only - Make sure MKTME feature detection happens at an earlier time in the boot process so that the physical address size supported by the CPU is properly corrected and MTRR masks are programmed properly, leading to TDX systems booting without disable_mtrr_cleanup on the cmdline - Make sure the different address sizes supported by the CPU are read out as early as possible * tag 'x86_urgent_for_v6.8_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/e820: Don't reserve SETUP_RNG_SEED in e820 x86/cpu/intel: Detect TME keyid bits before setting MTRR mask registers x86/cpu: Allow reducing x86_phys_bits during early_identify_cpu() commit aa707b615ce1551c25c5a3500cca2cf620e36b12 Author: Ricardo B. Marliere Date: Sun Feb 4 13:38:02 2024 -0300 Drivers: hv: vmbus: make hv_bus const Now that the driver core can properly handle constant struct bus_type, move the hv_bus variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20240204-bus_cleanup-hv-v1-1-521bd4140673@marliere.net Signed-off-by: Wei Liu Message-ID: <20240204-bus_cleanup-hv-v1-1-521bd4140673@marliere.net> commit 04b8076df2534f08bb4190f90a24e0f7f8930aca Merge: 4640e2be39201 d0b06dc48fb15 Author: Linus Torvalds Date: Sat Mar 2 15:18:02 2024 -0800 Merge tag 'firewire-fixes-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire fixes from Takashi Sakamoto: "A workaround to suppress the continuous bus resets in the case that older devices are connected to the modern 1394 OHCI hardware and devices In IEEE 1394 Amendment (IEEE 1394a-2000), the short bus reset is added to resolve the shortcomings of the long bus reset in IEEE 1394-1995. However, it is well-known that the solution is not necessarily effective in the mixing environment that both IEEE 1394-1995 PHY and IEEE 1394a-2000 (or later) PHY exist, as described in section 8.4.6.2 of IEEE 1394a-2000. The current implementation of firewire stack schedules the short bus reset when attempting to resolve the mismatch of gap count in the certain generation of bus topology. It can cause the continuous bus reset in the issued environment. The workaround simply uses the long bus reset instead of the short bus reset. It is desirable to detect whether the issued environment or not. However, the way to access PHY registers from remote note is firstly defined in IEEE 1394a-2000, thus it is not available in the case" * tag 'firewire-fixes-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: core: use long bus reset on gap count error commit 1581dafaf0d34bc9c428a794a22110d7046d186d Author: Nicolas Pitre Date: Thu Feb 29 17:15:27 2024 -0500 vt: fix unicode buffer corruption when deleting characters This is the same issue that was fixed for the VGA text buffer in commit 39cdb68c64d8 ("vt: fix memory overlapping when deleting chars in the buffer"). The cure is also the same i.e. replace memcpy() with memmove() due to the overlaping buffers. Signed-off-by: Nicolas Pitre Fixes: 81732c3b2fed ("tty vt: Fix line garbage in virtual console on command line edition") Cc: stable Link: https://lore.kernel.org/r/sn184on2-3p0q-0qrq-0218-895349s4753o@syhkavp.arg Signed-off-by: Greg Kroah-Hartman commit 43066e32227ecde674e8ae1fcdd4a1ede67680c2 Author: Yicong Yang Date: Mon Feb 26 23:23:51 2024 +0800 serial: port: Don't suspend if the port is still busy We accidently met the issue that the bash prompt is not shown after the previous command done and until the next input if there's only one CPU (In our issue other CPUs are isolated by isolcpus=). Further analysis shows it's because the port entering runtime suspend even if there's still pending chars in the buffer and the pending chars will only be processed in next device resuming. We are using amba-pl011 and the problematic flow is like below: Bash                                         kworker tty_write()   file_tty_write()     n_tty_write()       uart_write()         __uart_start()           pm_runtime_get() // wakeup waker             queue_work()                                     pm_runtime_work()                                                rpm_resume()                                                 status = RPM_RESUMING                                                 serial_port_runtime_resume()                                                   port->ops->start_tx()                                                     pl011_tx_chars()                                                       uart_write_wakeup()         […]         __uart_start()           pm_runtime_get() < 0 // because runtime status = RPM_RESUMING                                // later data are not commit to the port driver                                                 status = RPM_ACTIVE                                                 rpm_idle() -> rpm_suspend() This patch tries to fix this by checking the port busy before entering runtime suspending. A runtime_suspend callback is added for the port driver. When entering runtime suspend the callback is invoked, if there's still pending chars in the buffer then flush the buffer. Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM") Cc: stable Reviewed-by: Tony Lindgren Reviewed-by: Andy Shevchenko Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/20240226152351.40924-1-yangyicong@huawei.com Signed-off-by: Greg Kroah-Hartman commit e5d6bd25f93d6ae158bb4cd04956cb497a85b8ef Author: Peter Collingbourne Date: Thu Feb 22 11:26:34 2024 -0800 serial: 8250_dw: Do not reclock if already at correct rate When userspace opens the console, we call set_termios() passing a termios with the console's configured baud rate. Currently this causes dw8250_set_termios() to disable and then re-enable the UART clock at the same frequency as it was originally. This can cause corruption of any concurrent console output. Fix it by skipping the reclocking if we are already at the correct rate. Signed-off-by: Peter Collingbourne Fixes: 4e26b134bd17 ("serial: 8250_dw: clock rate handling for all ACPI platforms") Cc: stable@vger.kernel.org Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240222192635.1050502-1-pcc@google.com Signed-off-by: Greg Kroah-Hartman commit 672448ccf9b6a676f96f9352cbf91f4d35f4084a Author: Rickard x Andersson Date: Wed Feb 21 12:53:04 2024 +0100 tty: serial: imx: Fix broken RS485 When about to transmit the function imx_uart_start_tx is called and in some RS485 configurations this function will call imx_uart_stop_rx. The problem is that imx_uart_stop_rx will enable loopback in order to release the RS485 bus, but when loopback is enabled transmitted data will just be looped to RX. This patch fixes the above problem by not enabling loopback when about to transmit. This driver now works well when used for RS485 half duplex master configurations. Fixes: 79d0224f6bf2 ("tty: serial: imx: Handle RS485 DE signal active high") Cc: stable Signed-off-by: Rickard x Andersson Tested-by: Christoph Niedermaier Link: https://lore.kernel.org/r/20240221115304.509811-1-rickaran@axis.com Signed-off-by: Greg Kroah-Hartman commit 014bcf41d946b36a8f0b8e9b5d9529efbb822f49 Author: Alan Stern Date: Thu Feb 29 14:30:06 2024 -0500 USB: usb-storage: Prevent divide-by-0 error in isd200_ata_command The isd200 sub-driver in usb-storage uses the HEADS and SECTORS values in the ATA ID information to calculate cylinder and head values when creating a CDB for READ or WRITE commands. The calculation involves division and modulus operations, which will cause a crash if either of these values is 0. While this never happens with a genuine device, it could happen with a flawed or subversive emulation, as reported by the syzbot fuzzer. Protect against this possibility by refusing to bind to the device if either the ATA_ID_HEADS or ATA_ID_SECTORS value in the device's ID information is 0. This requires isd200_Initialization() to return a negative error code when initialization fails; currently it always returns 0 (even when there is an error). Signed-off-by: Alan Stern Reported-and-tested-by: syzbot+28748250ab47a8f04100@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-usb/0000000000003eb868061245ba7f@google.com/ Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Reviewed-by: PrasannaKumar Muralidharan Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/b1e605ea-333f-4ac0-9511-da04f411763e@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit da85c25cdb6780b9bb5585c443272d3cd5920981 Merge: febbe9b9c0b5f 11dadb6310073 Author: Greg Kroah-Hartman Date: Sat Mar 2 19:54:36 2024 +0100 Merge tag 'iio-fixes-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus Jonathan writes: IIO: 2nd set of fixes for the 6.8 cycle. Given this is very late these can wait for the 6.9 cycle if you would prefer. adi,adxl367 - Sleep for 15ms after reset to avoid reading before the device is awake. - Fix FIFO register address. asc,dlhl60d - Avoid uninitialized data leak to user-space. Also suppress a false positive clang warning by refactoring a loop. bosch,bmp280 - Fix missing extra byte in SPI reads from BMP38x and BMP390 parts invensense,mpu6050 - Fix handing of empty FIFO which can happen due to a race condition. - Make sure frequency can be updated more than once when the FIFO is not enabled. * tag 'iio-fixes-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: accel: adxl367: fix I2C FIFO data register iio: accel: adxl367: fix DEVID read after reset iio: pressure: dlhl60d: Initialize empty DLH bytes iio: imu: inv_mpu6050: fix frequency setting when chip is off iio: pressure: Fixes BMP38x and BMP390 SPI support iio: imu: inv_mpu6050: fix FIFO parsing when empty commit febbe9b9c0b5fd77b03d4c6795ef7b8bcabac984 Merge: daaf5286b6d25 c83ccdc9586b3 Author: Greg Kroah-Hartman Date: Sat Mar 2 19:48:17 2024 +0100 Merge tag 'counter-fixes-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-linus William writes: First set of Counter fixes for 6.8 One fix to ensure private data in struct counter_device_allochelper has minimum alignment for safe DMA operations. * tag 'counter-fixes-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: fix privdata alignment commit 3c4a311c2c15ef0fa07c225ee02197a316e10e00 Merge: d206a76d7d272 d3d17e23d1a0d Author: Greg Kroah-Hartman Date: Sat Mar 2 19:47:01 2024 +0100 Merge tag 'thunderbolt-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v6.8-rc7 This includes one USB4/Thunderbolt fix for v6.8-rc7: - Fix NULL pointer dereference in tb_port_update_credits() on Apple Thunderbolt 1 hardware. This has been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Fix NULL pointer dereference in tb_port_update_credits() commit 4640e2be3920168f6b26512466562accb783423a Merge: 705c72567be6a 27c86d43bcdb9 Author: Linus Torvalds Date: Sat Mar 2 09:38:03 2024 -0800 Merge tag 'xfs-6.8-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Chandan Babu: "Drop experimental warning message when mounting an xfs filesystem on an fsdax device. We now consider xfs on fsdax to be stable" * tag 'xfs-6.8-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: drop experimental warning for FSDAX commit 705c72567be6a31a73ce57fa6a2441498479dd71 Merge: 7838b4656110d ec5c54a9d3c4f Author: Linus Torvalds Date: Sat Mar 2 09:25:12 2024 -0800 Merge tag 'gpio-fixes-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix resource freeing ordering in error path when adding a GPIO chip - only set pins to output after the reset is complete in gpio-74x164 * tag 'gpio-fixes-for-v6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: fix resource unwinding order in error path gpiolib: Fix the error path order in gpiochip_add_data_with_key() gpio: 74x164: Enable output pins after registers are reset commit 7838b4656110d950afdd92a081cc0f33e23e0ea8 Author: Ming Lei Date: Sun Feb 25 11:01:41 2024 +0800 block: define bvec_iter as __packed __aligned(4) In commit 19416123ab3e ("block: define 'struct bvec_iter' as packed"), what we need is to save the 4byte padding, and avoid `bio` to spread on one extra cache line. It is enough to define it as '__packed __aligned(4)', as '__packed' alone means byte aligned, and can cause compiler to generate horrible code on architectures that don't support unaligned access in case that bvec_iter is embedded in other structures. Cc: Mikulas Patocka Suggested-by: Linus Torvalds Fixes: 19416123ab3e ("block: define 'struct bvec_iter' as packed") Signed-off-by: Ming Lei Signed-off-by: Linus Torvalds commit 7fd664466a8f8e50099ce0a7bb40515782cb3569 Merge: 5ad3cb0ed525b ee0017c3ed8a8 Author: Linus Torvalds Date: Sat Mar 2 09:10:00 2024 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small fixes, all in drivers (the more obsolete mpt3sas and the newer mpi3mr)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Prevent sending diag_reset when the controller is ready scsi: mpi3mr: Reduce stack usage in mpi3mr_refresh_sas_ports() commit 90502d433c0e7e5483745a574cb719dd5d05b10c Author: Rahul Rameshbabu Date: Thu Feb 8 15:09:34 2024 -0800 net/mlx5e: Switch to using _bh variant of of spinlock API in port timestamping NAPI poll context The NAPI poll context is a softirq context. Do not use normal spinlock API in this context to prevent concurrency issues. Fixes: 3178308ad4ca ("net/mlx5e: Make tx_port_ts logic resilient to out-of-order CQEs") Signed-off-by: Rahul Rameshbabu Signed-off-by: Saeed Mahameed CC: Vadim Fedorenko commit b7cf07586c40f926063d4d09f7de28ff82f62b2a Author: Rahul Rameshbabu Date: Mon Feb 5 13:12:28 2024 -0800 net/mlx5e: Use a memory barrier to enforce PTP WQ xmit submission tracking occurs after populating the metadata_map Just simply reordering the functions mlx5e_ptp_metadata_map_put and mlx5e_ptpsq_track_metadata in the mlx5e_txwqe_complete context is not good enough since both the compiler and CPU are free to reorder these two functions. If reordering does occur, the issue that was supposedly fixed by 7e3f3ba97e6c ("net/mlx5e: Track xmit submission to PTP WQ after populating metadata map") will be seen. This will lead to NULL pointer dereferences in mlx5e_ptpsq_mark_ts_cqes_undelivered in the NAPI polling context due to the tracking list being populated before the metadata map. Fixes: 7e3f3ba97e6c ("net/mlx5e: Track xmit submission to PTP WQ after populating metadata map") Signed-off-by: Rahul Rameshbabu Signed-off-by: Saeed Mahameed CC: Vadim Fedorenko commit a71f2147b64941efee156bfda54fd6461d0f95df Author: Emeel Hakim Date: Mon Mar 13 17:03:03 2023 +0200 net/mlx5e: Fix MACsec state loss upon state update in offload path The packet number attribute of the SA is incremented by the device rather than the software stack when enabling hardware offload. Because the packet number attribute is managed by the hardware, the software has no insight into the value of the packet number attribute actually written by the device. Previously when MACsec offload was enabled, the hardware object for handling the offload was destroyed when the SA was disabled. Re-enabling the SA would lead to a new hardware object being instantiated. This new hardware object would not have any recollection of the correct packet number for the SA. Instead, destroy the flow steering rule when deactivating the SA and recreate it upon reactivation, preserving the original hardware object. Fixes: 8ff0ac5be144 ("net/mlx5: Add MACsec offload Tx command support") Signed-off-by: Emeel Hakim Signed-off-by: Rahul Rameshbabu Reviewed-by: Gal Pressman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit dd238b702064b21d25b4fc39a19699319746d655 Author: Jianbo Liu Date: Mon Dec 25 01:47:05 2023 +0000 net/mlx5e: Change the warning when ignore_flow_level is not supported Downgrade the print from mlx5_core_warn() to mlx5_core_dbg(), as it is just a statement of fact that firmware doesn't support ignore flow level. And change the wording to "firmware flow level support is missing", to make it more accurate. Fixes: ae2ee3be99a8 ("net/mlx5: CT: Remove warning of ignore_flow_level support for VFs") Signed-off-by: Jianbo Liu Suggested-by: Elliott, Robert (Servers) Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 5e6107b499f3fc4748109e1d87fd9603b34f1e0d Author: Moshe Shemesh Date: Sun Jan 28 20:43:58 2024 +0200 net/mlx5: Check capability for fw_reset Functions which can't access MFRL (Management Firmware Reset Level) register, have no use of fw_reset structures or events. Remove fw_reset structures allocation and registration for fw reset events notifications for these functions. Having the devlink param enable_remote_dev_reset on functions that don't have this capability is misleading as these functions are not allowed to influence the reset flow. Hence, this patch removes this parameter for such functions. In addition, return not supported on devlink reload action fw_activate for these functions. Fixes: 38b9f903f22b ("net/mlx5: Handle sync reset request event") Signed-off-by: Moshe Shemesh Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed commit ac8082a3c7a158640a2c493ec437dd9da881a6a7 Author: Aya Levin Date: Tue Jan 16 20:13:34 2024 +0200 net/mlx5: Fix fw reporter diagnose output Restore fw reporter diagnose to print the syndrome even if it is zero. Following the cited commit, in this case (syndrome == 0) command returns no output at all. This fix restores command output in case syndrome is cleared: $ devlink health diagnose pci/0000:82:00.0 reporter fw Syndrome: 0 Fixes: d17f98bf7cc9 ("net/mlx5: devlink health: use retained error fmsg API") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 85ea2c5c5ef5f24fe6e6e7028ddd90be1cb5d27e Author: Jianbo Liu Date: Thu Jan 11 01:27:47 2024 +0000 net/mlx5: E-switch, Change flow rule destination checking The checking in the cited commit is not accurate. In the common case, VF destination is internal, and uplink destination is external. However, uplink destination with packet reformat is considered as internal because firmware uses LB+hairpin to support it. Update the checking so header rewrite rules with both internal and external destinations are not allowed. Fixes: e0e22d59b47a ("net/mlx5: E-switch, Add checking for flow rule destinations") Signed-off-by: Jianbo Liu Reviewed-by: Rahul Rameshbabu Signed-off-by: Saeed Mahameed commit b7bbd698c90591546d22093181e266785f08c18b Author: Saeed Mahameed Date: Wed Dec 13 17:07:08 2023 -0800 Revert "net/mlx5e: Check the number of elements before walk TC rhashtable" This reverts commit 4e25b661f484df54b6751b65f9ea2434a3b67539. This Commit was mistakenly applied by pulling the wrong tag, remove it. Fixes: 4e25b661f484 ("net/mlx5e: Check the number of elements before walk TC rhashtable") Signed-off-by: Saeed Mahameed commit 8deeefb24786ea7950b37bde4516b286c877db00 Author: Gavin Li Date: Thu Oct 19 04:49:54 2023 +0300 Revert "net/mlx5: Block entering switchdev mode with ns inconsistency" This reverts commit 662404b24a4c4d839839ed25e3097571f5938b9b. The revert is required due to the suspicion it is not good for anything and cause crash. Fixes: 662404b24a4c ("net/mlx5e: Block entering switchdev mode with ns inconsistency") Signed-off-by: Gavin Li Reviewed-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 5ad3cb0ed525b80c7f66c32b49a68c1f3510bec9 Merge: e613c90ddabce 2df70149e73e7 Author: Linus Torvalds Date: Fri Mar 1 17:25:31 2024 -0800 Merge tag 'for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Sebastian Reichel: - Kconfig dependency fix - bq27xxx-i2c: do not free non-existing IRQ * tag 'for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: bq27xxx-i2c: Do not free non existing IRQ power: supply: mm8013: select REGMAP_I2C commit e613c90ddabcef5134ec4daa23b319ad7c99b94b Merge: fb54efc293268 bb04d13353885 Author: Linus Torvalds Date: Fri Mar 1 17:22:46 2024 -0800 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd fixes from Jason Gunthorpe: "Four syzkaller found bugs: - Corruption during error unwind in iommufd_access_change_ioas() - Overlapping IDs in the test suite due to out of order destruction - Missing locking for access->ioas in the test suite - False failures in the test suite validation logic with huge pages" * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: iommufd/selftest: Don't check map/unmap pairing with HUGE_PAGES iommufd: Fix protection fault in iommufd_test_syz_conv_iova iommufd/selftest: Fix mock_dev_num bug iommufd: Fix iopt_access_list_id overwrite bug commit fb54efc2932681dadeca91210007a4d246c49890 Merge: d17468c6f1f49 7cb50f6c9fbaa Author: Linus Torvalds Date: Fri Mar 1 17:18:35 2024 -0800 Merge tag 'devicetree-fixes-for-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fix from Rob Herring: "One fix for a bug in fw_devlink handling of OF graph. This doesn't completely fix the reported problems, but it's with users adding out of tree code" * tag 'devicetree-fixes-for-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing commit 7cb50f6c9fbaa1c0b80100b8971bf13db5d75d06 Author: Saravana Kannan Date: Fri Feb 23 21:24:35 2024 -0800 of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing Introduced a stupid bug in commit 782bfd03c3ae ("of: property: Improve finding the supplier of a remote-endpoint property") due to a last minute incorrect edit of "index !=0" into "!index". This patch fixes it to be "index > 0" to match the comment right next to it. Reported-by: Luca Ceresoli Link: https://lore.kernel.org/lkml/20240223171849.10f9901d@booty/ Fixes: 782bfd03c3ae ("of: property: Improve finding the supplier of a remote-endpoint property") Signed-off-by: Saravana Kannan Reviewed-by: Herve Codina Reviewed-by: Luca Ceresoli Tested-by: Luca Ceresoli Link: https://lore.kernel.org/r/20240224052436.3552333-1-saravanak@google.com Signed-off-by: Rob Herring commit d17468c6f1f49e6259698f6401b8d7a5b90eac68 Merge: 5870ba3dc6e4c a11dd49dcb937 Author: Linus Torvalds Date: Fri Mar 1 12:44:33 2024 -0800 Merge tag 'riscv-for-linus-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - detect ".option arch" support on not-yet-released LLVM builds - fix missing TLB flush when modifying non-leaf PTEs - fixes for T-Head custom extensions - fix for systems with the legacy PMU, that manifests as a crash on kernels built without SBI PMU support - fix for systems that clear *envcfg on suspend, which manifests as cbo.zero trapping after resume - fixes for Svnapot systems, including removing Svnapot support for huge vmalloc/vmap regions * tag 'riscv-for-linus-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Sparse-Memory/vmemmap out-of-bounds fix riscv: Fix pte_leaf_size() for NAPOT Revert "riscv: mm: support Svnapot in huge vmap" riscv: Save/restore envcfg CSR during CPU suspend riscv: Add a custom ISA extension for the [ms]envcfg CSR riscv: Fix enabling cbo.zero when running in M-mode perf: RISCV: Fix panic on pmu overflow handler MAINTAINERS: Update SiFive driver maintainers drivers: perf: ctr_get_width function for legacy is not defined drivers: perf: added capabilities for legacy PMU RISC-V: Ignore V from the riscv,isa DT property on older T-Head CPUs riscv: Fix build error if !CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION riscv: mm: fix NOCACHE_THEAD does not set bit[61] correctly riscv: add CALLER_ADDRx support RISC-V: Drop invalid test from CONFIG_AS_HAS_OPTION_ARCH kbuild: Add -Wa,--fatal-warnings to as-instr invocation riscv: tlb: fix __p*d_free_tlb() commit 5870ba3dc6e4ca4b29a0d1ddd9c3e35b44f0b172 Merge: 7505aa147adb1 51d31149a88b5 Author: Linus Torvalds Date: Fri Mar 1 12:34:23 2024 -0800 Merge tag 'ceph-for-6.8-rc7' of https://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "Catch up with mdsmap encoding rectification which ended up being necessary after all to enable cluster upgrades from problematic v18.2.0 and v18.2.1 releases" * tag 'ceph-for-6.8-rc7' of https://github.com/ceph/ceph-client: ceph: switch to corrected encoding of max_xattr_size in mdsmap commit 7505aa147adb10913c1b72e947006b6070753eb6 Merge: 3aec97e0c7933 e2b54eaf28df0 Author: Linus Torvalds Date: Fri Mar 1 12:29:20 2024 -0800 Merge tag 'for-6.8-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix freeing allocated id for anon dev when snapshot creation fails - fiemap fixes: - followup for a recent deadlock fix, ranges that fiemap can access can still race with ordered extent completion - make sure fiemap with SYNC flag does not race with writes * tag 'for-6.8-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix double free of anonymous device after snapshot creation failure btrfs: ensure fiemap doesn't race with writes when FIEMAP_FLAG_SYNC is given btrfs: fix race between ordered extent completion and fiemap commit 3aec97e0c793353318235b5e9031f91b8f09241e Merge: 1678f8d85d906 3a7845041eb72 Author: Linus Torvalds Date: Fri Mar 1 12:22:30 2024 -0800 Merge tag 'exfat-for-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat fix from Namjae Jeon: - Fix ftruncate failure when allocating non-contiguous clusters * tag 'exfat-for-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: fix appending discontinuous clusters to empty file commit 1678f8d85d906330479d9b03d461096d7b96b266 Merge: 17ba56605bfd1 54cbc058d86be Author: Linus Torvalds Date: Fri Mar 1 12:17:02 2024 -0800 Merge tag 'vfs-6.8-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: "Two small fixes: - Fix an endless loop during afs directory iteration caused by not skipping silly-rename files correctly. - Fix reporting of completion events for aio causing leaks in userspace. This is based on the fix last week as it's now possible to recognize aio events submitted through the old aio interface" * tag 'vfs-6.8-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs/aio: Make io_cancel() generate completions again afs: Fix endless loop in directory parsing commit 17ba56605bfd139dfa5eba183f9f53ab90deea78 Merge: 371e4a1f914af 6384c56c99d98 Author: Linus Torvalds Date: Fri Mar 1 12:01:43 2024 -0800 Merge tag 'iommu-fix-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fix from Joerg Roedel: - Fix SVA handle sharing in multi device case * tag 'iommu-fix-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/sva: Fix SVA handle sharing in multi device case commit 371e4a1f914aff0d128c518895495ef44059ddc6 Merge: fafbad4a201e1 09e23823ae9a3 Author: Linus Torvalds Date: Fri Mar 1 11:55:19 2024 -0800 Merge tag 'mmc-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix eMMC initialization with 1-bit bus connection MMC host: - mmci: Fix DMA API overlapping mappings for the stm32 variant - sdhci-xenon: Fix PHY stability issues" * tag 'mmc-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-xenon: add timeout for PHY init complete mmc: sdhci-xenon: fix PHY init clock stability mmc: mmci: stm32: fix DMA API overlapping mappings warning mmc: core: Fix eMMC initialization with 1-bit bus connection commit fafbad4a201e16c3213d595abda110d5e4261825 Merge: 2bbb54ba1bf73 2a93c6cbd5a70 Author: Linus Torvalds Date: Fri Mar 1 11:52:27 2024 -0800 Merge tag 'pmdomain-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain fixes from Ulf Hansson: - qcom: Fix enabled_corner aggregation for rpmhpd - arm: Fix NULL dereference on scmi_perf_domain removal * tag 'pmdomain-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: pmdomain: qcom: rpmhpd: Fix enabled_corner aggregation pmdomain: arm: Fix NULL dereference on scmi_perf_domain removal commit 2bbb54ba1bf73d0f7db0d218731db721199e0db0 Merge: fbf9e3b6978bb 2ce507f57ba9c Author: Linus Torvalds Date: Fri Mar 1 11:40:29 2024 -0800 Merge tag 'efi-fixes-for-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: "Only the EFI variable name size change is significant, and will be backported once it lands. The others are cleanup. - Fix phys_addr_t size confusion in 32-bit capsule loader - Reduce maximum EFI variable name size to 512 to work around buggy firmware - Drop some redundant code from efivarfs while at it" * tag 'efi-fixes-for-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efivarfs: Drop 'duplicates' bool parameter on efivar_init() efivarfs: Drop redundant cleanup on fill_super() failure efivarfs: Request at most 512 bytes for variable names efi/capsule-loader: fix incorrect allocation size commit fbf9e3b6978bbd350f2a4c81e112431610dd065c Merge: 7187ea0978bb4 17c6a0c986fbe Author: Linus Torvalds Date: Fri Mar 1 11:32:41 2024 -0800 Merge tag 'sound-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The amount of changes wasn't as small as wished, but all reasonably small fixes. There is a PCM core API change, which is for correcting the behavior change we took in 6.8. The rest are device-specific fixes for ASoC AMD, Qualcomm, Cirrus codecs, HD-audio quirks & co" * tag 'sound-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: amd: yc: Fix non-functional mic on Lenovo 21J2 ASoC: amd: yc: add new YC platform variant (0x63) support ALSA: hda/realtek - ALC285 reduce pop noise from Headphone port ASoC: amd: yc: Add Lenovo ThinkBook 21J0 into DMI quirk table ALSA: hda/realtek: Add special fixup for Lenovo 14IRP8 ASoC: soc-card: Fix missing locking in snd_soc_card_get_kcontrol() ALSA: hda/realtek: tas2781: enable subwoofer volume control ALSA: pcm: clarify and fix default msbits value for all formats ASoC: qcom: Fix uninitialized pointer dmactl ALSA: hda/realtek: fix mute/micmute LED For HP mt440 ALSA: Drop leftover snd-rtctimer stuff from Makefile ALSA: ump: Fix the discard error code from snd_ump_legacy_open() ALSA: hda/realtek: Enable Mute LED on HP 840 G8 (MB 8AB8) ASoC: cs35l56: Must clear HALO_STATE before issuing SYSTEM_RESET ALSA: hda/realtek: Fix top speaker connection on Dell Inspiron 16 Plus 7630 ALSA: firewire-lib: fix to check cycle continuity commit 7187ea0978bb4226873b55a065b5dcdda7530b9f Merge: 161671a6ebeec f6ecfdad359a0 Author: Linus Torvalds Date: Fri Mar 1 11:23:08 2024 -0800 Merge tag 'drm-fixes-2024-03-01' of https://gitlab.freedesktop.org/drm/kernel Pull drm fixes from Dave Airlie: "Bunch of fixes, xe, amdgpu, nouveau and tegra all have a few. Then drm/bridge including some drivers/soc fallout fixes. The biggest thing in here is a new unit test for some buddy allocator fixes, otherwise a misc fbcon, ttm unit test and one msm revert. Seems pretty normal for this stage. buddy: - two allocation fixes + unit test fbcon: - font restore syzkaller fix ttm: - kunit test fix bridge: - fix aux-hpd leaks - fix aux-hpd registration - fix use after free in soc/qcom - fix boot on soc/qcom xe: - A couple of tracepoint updates from Priyanka and Lucas - Make sure BINDs are completed before accepting UNBINDs on LR vms - Don't arbitrarily restrict max number of batched binds - Add uapi for dumpable bos (agreed on IRC) - Remove unused uapi flags and a leftover comment - A couple of fixes related to the execlist backend msm: - DP: Revert a change which was causing a HDP regression amdgpu: - Fix potential buffer overflow - Fix power min cap - Suspend/resume fix - SI PM fix - eDP fix nouveau: - fix a misreported VRAM sizing - fix a regression in suspend/resume due to freeing tegra: - host1x reset fix - only remove existing driver if display is possible" * tag 'drm-fixes-2024-03-01' of https://gitlab.freedesktop.org/drm/kernel: (32 commits) drm/nouveau: keep DMA buffers required for suspend/resume nouveau: report byte usage in VRAM usage drm/xe/xe_trace: Add move_lacks_source detail to xe_bo_move trace drm/xe: Deny unbinds if uapi ufence pending drm/xe: Expose user fence from xe_sync_entry drm/xe: Use pointers in trace events drm/xe/xe_bo_move: Enhance xe_bo_move trace drm/xe/mmio: fix build warning for BAR resize on 32-bit drm/xe: get rid of MAX_BINDS drm/xe: Use vmalloc for array of bind allocation in bind IOCTL drm/xe: Don't support execlists in xe_gt_tlb_invalidation layer drm/xe: Fix execlist splat drm/xe/uapi: Remove unused flags drm/xe/uapi: Remove DRM_XE_VM_BIND_FLAG_ASYNC comment left over drm/xe: Add uapi for dumpable bos drm/amd/display: Add monitor patch for specific eDP Revert "drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes" drm/tests/drm_buddy: add alloc_range_bias test drm/buddy: check range allocation matches alignment drm/buddy: fix range bias ... commit 161671a6ebeecdab36ee4b8a6330d99b0f772412 Merge: 2f03fc340cac9 6572786006fa9 Author: Linus Torvalds Date: Fri Mar 1 11:17:23 2024 -0800 Merge tag 'probes-fixes-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull fprobe fix from Masami Hiramatsu: - allocate entry_data_size buffer for each rethook instance. This fixes a buffer overrun bug (which leads a kernel crash) when fprobe user uses its entry_data in the entry_handler. * tag 'probes-fixes-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: fprobe: Fix to allocate entry_data_size buffer with rethook instances commit 2f03fc340cac9ea1dc63cbf8c93dd2eb0f227815 Author: Tetsuo Handa Date: Fri Mar 1 22:04:06 2024 +0900 tomoyo: fix UAF write bug in tomoyo_write_control() Since tomoyo_write_control() updates head->write_buf when write() of long lines is requested, we need to fetch head->write_buf after head->io_sem is held. Otherwise, concurrent write() requests can cause use-after-free-write and double-free problems. Reported-by: Sam Sun Closes: https://lkml.kernel.org/r/CAEkJfYNDspuGxYx5kym8Lvp--D36CMDUErg4rxfWFJuPbbji8g@mail.gmail.com Fixes: bd03a3e4c9a9 ("TOMOYO: Add policy namespace support.") Cc: # Linux 3.1+ Signed-off-by: Tetsuo Handa Signed-off-by: Linus Torvalds commit 7fd817c906503b6813ea3b41f5fdf4192449a707 Author: Jiri Bohac Date: Wed Jan 31 01:04:28 2024 +0100 x86/e820: Don't reserve SETUP_RNG_SEED in e820 SETUP_RNG_SEED in setup_data is supplied by kexec and should not be reserved in the e820 map. Doing so reserves 16 bytes of RAM when booting with kexec. (16 bytes because data->len is zeroed by parse_setup_data so only sizeof(setup_data) is reserved.) When kexec is used repeatedly, each boot adds two entries in the kexec-provided e820 map as the 16-byte range splits a larger range of usable memory. Eventually all of the 128 available entries get used up. The next split will result in losing usable memory as the new entries cannot be added to the e820 map. Fixes: 68b8e9713c8e ("x86/setup: Use rng seeds from setup_data") Signed-off-by: Jiri Bohac Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Dave Hansen Cc: Link: https://lore.kernel.org/r/ZbmOjKnARGiaYBd5@dwarf.suse.cz commit 4035c72dc1ba81a96f94de84dfd5409056c1d9c9 Author: Michal Swiatkowski Date: Fri Feb 23 07:40:24 2024 +0100 ice: reconfig host after changing MSI-X on VF During VSI reconfiguration filters and VSI config which is set in ice_vf_init_host_cfg() are lost. Recall the host configuration function to restore them. Without this config VF on which MSI-X amount was changed might had a connection problems. Fixes: 4d38cb44bd32 ("ice: manage VFs MSI-X using resource tracking") Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 99099c6bc75a30b76bb5d6774a0509ab6f06af05 Author: Maciej Fijalkowski Date: Tue Feb 20 22:45:53 2024 +0100 ice: reorder disabling IRQ and NAPI in ice_qp_dis ice_qp_dis() currently does things in very mixed way. Tx is stopped before disabling IRQ on related queue vector, then it takes care of disabling Rx and finally NAPI is disabled. Let us start with disabling IRQs in the first place followed by turning off NAPI. Then it is safe to handle queues. One subtle change on top of that is that even though ice_qp_ena() looks more sane, clear ICE_CFG_BUSY as the last thing there. Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Acked-by: Magnus Karlsson Signed-off-by: Tony Nguyen commit d562b11c1eac7d73f4c778b4cbe5468f86b1f20d Author: Maciej Fijalkowski Date: Tue Feb 20 22:45:52 2024 +0100 i40e: disable NAPI right after disabling irqs when handling xsk_pool Disable NAPI before shutting down queues that this particular NAPI contains so that the order of actions in i40e_queue_pair_disable() mirrors what we do in i40e_queue_pair_enable(). Fixes: 123cecd427b6 ("i40e: added queue pair disable/enable functions") Signed-off-by: Maciej Fijalkowski Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Acked-by: Magnus Karlsson Signed-off-by: Tony Nguyen commit cbf996f52c4e658b3fb4349a869a62fd2d4c3c1c Author: Maciej Fijalkowski Date: Tue Feb 20 22:45:51 2024 +0100 ixgbe: {dis, en}able irqs in ixgbe_txrx_ring_{dis, en}able Currently routines that are supposed to toggle state of ring pair do not take care of associated interrupt with queue vector that these rings belong to. This causes funky issues such as dead interface due to irq misconfiguration, as per Pavel's report from Closes: tag. Add a function responsible for disabling single IRQ in EIMC register and call this as a very first thing when disabling ring pair during xsk_pool setup. For enable let's reuse ixgbe_irq_enable_queues(). Besides this, disable/enable NAPI as first/last thing when dealing with closing or opening ring pair that xsk_pool is being configured on. Reported-by: Pavel Vazharov Closes: https://lore.kernel.org/netdev/CAJEV1ijxNyPTwASJER1bcZzS9nMoZJqfR86nu_3jFFVXzZQ4NA@mail.gmail.com/ Fixes: 024aa5800f32 ("ixgbe: added Rx/Tx ring disable/enable functions") Signed-off-by: Maciej Fijalkowski Acked-by: Magnus Karlsson Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 7a1c6a8bf47b0b290c79b9cc3ba6ee68be5522e8 Author: Johan Hovold Date: Fri Feb 23 16:21:19 2024 +0100 arm64: dts: qcom: sc8280xp-x13s: limit pcie4 link speed Limit the WiFi PCIe link speed to Gen2 speed (500 MB/s), which is the speed that the boot firmware has brought up the link at (and that Windows uses). This is specifically needed to avoid a large amount of link errors when restarting the link during boot (but which are currently not reported). This also appears to fix intermittent failures to download the ath11k firmware during boot which can be seen when there is a longer delay between restarting the link and loading the WiFi driver (e.g. when using full disk encryption). Fixes: 123b30a75623 ("arm64: dts: qcom: sc8280xp-x13s: enable WiFi controller") Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240223152124.20042-8-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit db8138845cebcdd0c709570b8217bd052757b8df Author: Johan Hovold Date: Fri Feb 23 16:21:18 2024 +0100 arm64: dts: qcom: sc8280xp-crd: limit pcie4 link speed Limit the WiFi PCIe link speed to Gen2 speed (500 MB/s), which is the speed that Windows uses. Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240223152124.20042-7-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 6384c56c99d98c84afea5b9ec7029a6e153ae431 Author: Zhangfei Gao Date: Tue Feb 27 06:48:21 2024 +0000 iommu/sva: Fix SVA handle sharing in multi device case iommu_sva_bind_device will directly goto out in multi-device case when found existing domain, ignoring list_add handle, which causes the handle to fail to be shared. Fixes: 65d4418c5002 ("iommu/sva: Restore SVA handle sharing") Signed-off-by: Zhangfei Gao Reviewed-by: Jason Gunthorpe Reviewed-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240227064821.128-1-zhangfei.gao@linaro.org Signed-off-by: Joerg Roedel commit 380cb2f4df78433f64847cbc655fad2650e4769c Author: Michael Ellerman Date: Fri Mar 1 21:10:35 2024 +1100 selftests/powerpc: Fix fpu_signal failures My recent commit e5d00aaac651 ("selftests/powerpc: Check all FPRs in fpu_preempt") inadvertently broke the fpu_signal test. It needs to take into account that fpu_preempt now loads 32 FPRs, so enlarge darray. Also use the newly added randomise_darray() to properly randomise darray. Finally the checking done in signal_fpu_sig() needs to skip checking f30/f31, because they are used as scratch registers in check_all_fprs(), called by preempt_fpu(), and so could hold other values when the signal is taken. Fixes: e5d00aaac651 ("selftests/powerpc: Check all FPRs in fpu_preempt") Reported-by: Spoorthy Depends-on: 2ba107f6795d ("selftests/powerpc: Generate better bit patterns for FPU tests") Signed-off-by: Michael Ellerman Link: https://msgid.link/20240301101035.1230024-1-mpe@ellerman.id.au commit 642b02b45de51a36f2f3ec9a3584a4df6212b315 Author: songxiebing Date: Fri Mar 1 09:18:41 2024 +0800 ALSA: hda: optimize the probe codec process In azx_probe_codecs function, when bus->codec_mask is becomes to 0(no codecs), execute azx_init_chip, bus->codec_mask will be initialized to a value again, this causes snd_hda_codec_new function to run, the process is as follows: -->snd_hda_codec_new -->snd_hda_codec_device_init -->snd_hdac_device_init---snd_hdac_read_parm(...AC_PAR_VENDOR_ID) 2s ---snd_hdac_read_parm(...AC_PAR_VENDOR_ID) 2s ---snd_hdac_read_parm(...AC_PAR_SUBSYSTEM_ID) 2s ---snd_hdac_read_parm(...AC_PAR_REV_ID) 2s ---snd_hdac_read_parm(...AC_PAR_NODE_COUNT) 2s when no codecs, read communication is error, each command will be polled for 2 second, a total of 10s, it is easy to some problem. like this: 2 [ 14.833404][ 6] [ T164] hda 0006:00: Codec #0 probe error; disabling it... 3 [ 14.844178][ 6] [ T164] hda 0006:00: codec_mask = 0x1 4 [ 14.880532][ 6] [ T164] hda 0006:00: too slow response, last cmd=0x0f0000 5 [ 15.891988][ 6] [ T164] hda 0006:00: too slow response, last cmd=0x0f0000 6 [ 16.978090][ 6] [ T164] hda 0006:00: too slow response, last cmd=0x0f0001 7 [ 18.140895][ 6] [ T164] hda 0006:00: too slow response, last cmd=0x0f0002 8 [ 19.135516][ 6] [ T164] hda 0006:00: too slow response, last cmd=0x0f0004 10 [ 19.900086][ 6] [ T164] hda 0006:00: no codecs initialized 11 [ 45.573398][ 2] [ C2] watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [kworker/2:0:25] Here, when bus->codec_mask is 0, use a direct break to avoid execute snd_hda_codec_new function. Signed-off-by: songxiebing Link: https://lore.kernel.org/r/20240301011841.7247-1-soxiebing@163.com Signed-off-by: Takashi Iwai commit d397b6e56151099cf3b1f7bfccb204a6a8591720 Author: Kailang Yang Date: Fri Mar 1 15:29:50 2024 +0800 ALSA: hda/realtek - Fix headset Mic no show at resume back for Lenovo ALC897 platform Headset Mic will no show at resume back. This patch will fix this issue. Fixes: d7f32791a9fc ("ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform") Cc: Signed-off-by: Kailang Yang Link: https://lore.kernel.org/r/4713d48a372e47f98bba0c6120fd8254@realtek.com Signed-off-by: Takashi Iwai commit c0afb6b88fbbc177fa322a835f874be217bffe45 Author: Herbert Xu Date: Wed Feb 28 17:13:16 2024 +0800 crypto: rk3288 - Fix use after free in unprepare The unprepare call must be carried out before the finalize call as the latter can free the request. Fixes: c66c17a0f69b ("crypto: rk3288 - Remove prepare/unprepare request") Reported-by: Andrey Skvortsov Cc: Signed-off-by: Herbert Xu Reviewed-by: Andrey Skvortsov Signed-off-by: Herbert Xu commit 1c61728be22c1cb49c1be88693e72d8c06b1c81e Author: Masahisa Kojima Date: Fri Mar 1 15:32:14 2024 +0900 MAINTAINERS: net: netsec: add myself as co-maintainer Add myself as co-maintainer for Socionext netsec driver. This commit also removes Jassi from maintainer since he no longer has a Developerbox. Cc: Jassi Brar Cc: Ilias Apalodimas Signed-off-by: Masahisa Kojima Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller commit eb2c11b27c58a62b5027b77f702c15cd0ca38f7d Author: Arnd Bergmann Date: Wed Feb 28 17:06:56 2024 +0100 net: bql: fix building with BQL disabled It is now possible to disable BQL, but that causes the cpsw driver to break: drivers/net/ethernet/ti/am65-cpsw-nuss.c:297:28: error: no member named 'dql' in 'struct netdev_queue' 297 | dql_avail(&netif_txq->dql), There is already a helper function in net/sch_generic.h that could be used to help here. Move its implementation into the common linux/netdevice.h along with the other bql interfaces and change both users over to the new interface. Fixes: ea7f3cfaa588 ("net: bql: allow the config to be disabled") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 1eecc7ab82c42133b748e1895275942a054a7f67 Author: Oleksij Rempel Date: Wed Feb 28 13:45:17 2024 +0100 net: lan78xx: fix runtime PM count underflow on link stop Current driver has some asymmetry in the runtime PM calls. On lan78xx_open() it will call usb_autopm_get() and unconditionally usb_autopm_put(). And on lan78xx_stop() it will call only usb_autopm_put(). So far, it was working only because this driver do not activate autosuspend by default, so it was visible only by warning "Runtime PM usage count underflow!". Since, with current driver, we can't use runtime PM with active link, execute lan78xx_open()->usb_autopm_put() only in error case. Otherwise, keep ref counting high as long as interface is open. Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver") Signed-off-by: Oleksij Rempel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 0d63e4c0ebc2b5c329babde44fd61d3f08db814d Author: Saurabh Sengar Date: Mon Jan 15 09:57:40 2024 -0800 x86/hyperv: Allow 15-bit APIC IDs for VTL platforms The current method for signaling the compatibility of a Hyper-V host with MSIs featuring 15-bit APIC IDs relies on a synthetic cpuid leaf. However, for higher VTLs, this leaf is not reported, due to the absence of an IO-APIC. As an alternative, assume that when running at a high VTL, the host supports 15-bit APIC IDs. This assumption is safe, as Hyper-V does not employ any architectural MSIs at higher VTLs This unblocks startup of VTL2 environments with more than 256 CPUs. Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1705341460-18394-1-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1705341460-18394-1-git-send-email-ssengar@linux.microsoft.com> commit ec5c54a9d3c4f9c15e647b049fea401ee5258696 Author: Bartosz Golaszewski Date: Thu Feb 29 18:25:49 2024 +0100 gpio: fix resource unwinding order in error path Hogs are added *after* ACPI so should be removed *before* in error path. Fixes: a411e81e61df ("gpiolib: add hogs support for machine code") Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 7be40883b1cb734a31a3cbfd5f8f64a97965d26f Author: Niklas Söderlund Date: Fri Feb 23 20:55:26 2024 +0100 dt-bindings: net: renesas,ethertsn: Document default for delays The internal delay properties are not mandatory and should have a documented default value. The device only supports either no delay or a fixed delay and the device reset default is no delay, document the default as no delay. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit 0f34d11234868dc979730a905717c15067a7d205 Author: Michael Kelley Date: Mon Jan 15 18:20:08 2024 -0800 x86/hyperv: Make encrypted/decrypted changes safe for load_unaligned_zeropad() In a CoCo VM, when transitioning memory from encrypted to decrypted, or vice versa, the caller of set_memory_encrypted() or set_memory_decrypted() is responsible for ensuring the memory isn't in use and isn't referenced while the transition is in progress. The transition has multiple steps, and the memory is in an inconsistent state until all steps are complete. A reference while the state is inconsistent could result in an exception that can't be cleanly fixed up. However, the kernel load_unaligned_zeropad() mechanism could cause a stray reference that can't be prevented by the caller of set_memory_encrypted() or set_memory_decrypted(), so there's specific code to handle this case. But a CoCo VM running on Hyper-V may be configured to run with a paravisor, with the #VC or #VE exception routed to the paravisor. There's no architectural way to forward the exceptions back to the guest kernel, and in such a case, the load_unaligned_zeropad() specific code doesn't work. To avoid this problem, mark pages as "not present" while a transition is in progress. If load_unaligned_zeropad() causes a stray reference, a normal page fault is generated instead of #VC or #VE, and the page-fault-based fixup handlers for load_unaligned_zeropad() resolve the reference. When the encrypted/decrypted transition is complete, mark the pages as "present" again. Signed-off-by: Michael Kelley Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/r/20240116022008.1023398-4-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240116022008.1023398-4-mhklinux@outlook.com> commit 030ad7af94371f1faeecfc12dda296d8b5a17ef8 Author: Michael Kelley Date: Mon Jan 15 18:20:07 2024 -0800 x86/mm: Regularize set_memory_p() parameters and make non-static set_memory_p() is currently static. It has parameters that don't match set_memory_p() under arch/powerpc and that aren't congruent with the other set_memory_* functions. There's no good reason for the difference. Fix this by making the parameters consistent, and update the one existing call site. Make the function non-static and add it to include/asm/set_memory.h so that it is completely parallel to set_memory_np() and is usable in other modules. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Rick Edgecombe Acked-by: Kirill A. Shutemov Link: https://lore.kernel.org/r/20240116022008.1023398-3-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240116022008.1023398-3-mhklinux@outlook.com> commit 9fef276f9f416a1e85eb48d3bd38e6018a220bf5 Author: Michael Kelley Date: Mon Jan 15 18:20:06 2024 -0800 x86/hyperv: Use slow_virt_to_phys() in page transition hypervisor callback In preparation for temporarily marking pages not present during a transition between encrypted and decrypted, use slow_virt_to_phys() in the hypervisor callback. As long as the PFN is correct, slow_virt_to_phys() works even if the leaf PTE is not present. The existing functions that depend on vmalloc_to_page() all require that the leaf PTE be marked present, so they don't work. Update the comments for slow_virt_to_phys() to note this broader usage and the requirement to work even if the PTE is not marked present. Signed-off-by: Michael Kelley Acked-by: Kirill A. Shutemov Reviewed-by: Rick Edgecombe Link: https://lore.kernel.org/r/20240116022008.1023398-2-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240116022008.1023398-2-mhklinux@outlook.com> commit 04ed680e76b0d320612601cef46cb7092f860b31 Author: Michael Kelley Date: Thu Feb 22 12:07:10 2024 -0800 Documentation: hyperv: Add overview of PCI pass-thru device support Add documentation topic for PCI pass-thru devices in Linux guests on Hyper-V and for the associated PCI controller driver (pci-hyperv.c). Signed-off-by: Michael Kelley Reviewed-by: Easwar Hariharan Link: https://lore.kernel.org/r/20240222200710.305259-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240222200710.305259-1-mhklinux@outlook.com> commit 9645e74414fb725b0305f4f03035b68207659007 Author: Michael Kelley Date: Thu Jan 11 08:54:51 2024 -0800 Drivers: hv: vmbus: Update indentation in create_gpadl_header() A previous commit left the indentation in create_gpadl_header() unchanged for ease of review. Update the indentation and remove line wrap in two places where it is no longer necessary. No functional change. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/20240111165451.269418-2-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240111165451.269418-2-mhklinux@outlook.com> commit 8db0edc4acb1c654e4c115a3978fb2681c5bfb74 Author: Michael Kelley Date: Thu Jan 11 08:54:50 2024 -0800 Drivers: hv: vmbus: Remove duplication and cleanup code in create_gpadl_header() create_gpadl_header() creates a message header, and one or more message bodies if the number of GPADL entries exceeds what fits in the header. Currently the code for creating the message header is duplicated in the two halves of the main "if" statement governing whether message bodies are created. Eliminate the duplication by making minor tweaks to the logic and associated comments. While here, simplify the handling of memory allocation errors, and use umin() instead of open coding it. For ease of review, the indentation of sizable chunks of code is *not* changed. A follow-on patch updates only the indentation. No functional change. Suggested-by: Dan Carpenter Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/20240111165451.269418-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240111165451.269418-1-mhklinux@outlook.com> commit 20ee2ae8c58990ca9e98954b7ac2b66c53a0310e Author: Michael Kelley Date: Wed Jan 31 22:00:22 2024 -0800 fbdev/hyperv_fb: Fix logic error for Gen2 VMs in hvfb_getmem() A recent commit removing the use of screen_info introduced a logic error. The error causes hvfb_getmem() to always return -ENOMEM for Generation 2 VMs. As a result, the Hyper-V frame buffer device fails to initialize. The error was introduced by removing an "else if" clause, leaving Gen2 VMs to always take the -ENOMEM error path. Fix the problem by removing the error path "else" clause. Gen 2 VMs now always proceed through the MMIO memory allocation code, but with "base" and "size" defaulting to 0. Fixes: 0aa0838c84da ("fbdev/hyperv_fb: Remove firmware framebuffers with aperture helpers") Signed-off-by: Michael Kelley Reviewed-by: Thomas Zimmermann Reviewed-by: Saurabh Sengar Link: https://lore.kernel.org/r/20240201060022.233666-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240201060022.233666-1-mhklinux@outlook.com> commit b8209544296edbd1af186e2ea9c648642c37b18c Author: Michael Kelley Date: Wed Feb 28 16:45:33 2024 -0800 Drivers: hv: vmbus: Calculate ring buffer size for more efficient use of memory The VMBUS_RING_SIZE macro adds space for a ring buffer header to the requested ring buffer size. The header size is always 1 page, and so its size varies based on the PAGE_SIZE for which the kernel is built. If the requested ring buffer size is a large power-of-2 size and the header size is small, the resulting size is inefficient in its use of memory. For example, a 512 Kbyte ring buffer with a 4 Kbyte page size results in a 516 Kbyte allocation, which is rounded to up 1 Mbyte by the memory allocator, and wastes 508 Kbytes of memory. In such situations, the exact size of the ring buffer isn't that important, and it's OK to allocate the 4 Kbyte header at the beginning of the 512 Kbytes, leaving the ring buffer itself with just 508 Kbytes. The memory allocation can be 512 Kbytes instead of 1 Mbyte and nothing is wasted. Update VMBUS_RING_SIZE to implement this approach for "large" ring buffer sizes. "Large" is somewhat arbitrarily defined as 8 times the size of the ring buffer header (which is of size PAGE_SIZE). For example, for 4 Kbyte PAGE_SIZE, ring buffers of 32 Kbytes and larger use the first 4 Kbytes as the ring buffer header. For 64 Kbyte PAGE_SIZE, ring buffers of 512 Kbytes and larger use the first 64 Kbytes as the ring buffer header. In both cases, smaller sizes add space for the header so the ring size isn't reduced too much by using part of the space for the header. For example, with a 64 Kbyte page size, we don't want a 128 Kbyte ring buffer to be reduced to 64 Kbytes by allocating half of the space for the header. In such a case, the memory allocation is less efficient, but it's the best that can be done. While the new algorithm slightly changes the amount of space allocated for ring buffers by drivers that use VMBUS_RING_SIZE, the devices aren't known to be sensitive to small changes in ring buffer size, so there shouldn't be any effect. Fixes: c1135c7fd0e9 ("Drivers: hv: vmbus: Introduce types of GPADL") Fixes: 6941f67ad37d ("hv_netvsc: Calculate correct ring size when PAGE_SIZE is not 4 Kbytes") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218502 Cc: stable@vger.kernel.org Signed-off-by: Michael Kelley Reviewed-by: Saurabh Sengar Reviewed-by: Dexuan Cui Tested-by: Souradeep Chakrabarti Link: https://lore.kernel.org/r/20240229004533.313662-1-mhklinux@outlook.com Signed-off-by: Wei Liu Message-ID: <20240229004533.313662-1-mhklinux@outlook.com> commit adf47524b56a791734ae24da8412c6579e2fab4f Author: Peter Martincic Date: Mon Nov 27 13:35:24 2023 -0800 hv_utils: Allow implicit ICTIMESYNCFLAG_SYNC Hyper-V hosts can omit the _SYNC flag to due a bug on resume from modern suspend. In such a case, the guest may fail to update its time-of-day to account for the period when it was suspended, and could proceed with a significantly wrong time-of-day. In such a case when the guest is significantly behind, fix it by treating a _SAMPLE the same as if _SYNC was received so that the guest time-of-day is updated. This is hidden behind param hv_utils.timesync_implicit. Signed-off-by: Peter Martincic Acked-by: Boqun Feng Link: https://lore.kernel.org/r/20231127213524.52783-1-pmartincic@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <20231127213524.52783-1-pmartincic@linux.microsoft.com> commit e4aec4daa8c009057b5e063db1b7322252c92dc8 Author: Andy Shevchenko Date: Wed Feb 21 21:28:46 2024 +0200 gpiolib: Fix the error path order in gpiochip_add_data_with_key() After shuffling the code, error path wasn't updated correctly. Fix it here. Fixes: 2f4133bb5f14 ("gpiolib: No need to call gpiochip_remove_pin_ranges() twice") Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 530b1dbd97846b110ea8a94c7cc903eca21786e5 Author: Arturas Moskvinas Date: Fri Mar 1 09:12:04 2024 +0200 gpio: 74x164: Enable output pins after registers are reset Chip outputs are enabled[1] before actual reset is performed[2] which might cause pin output value to flip flop if previous pin value was set to 1. Fix that behavior by making sure chip is fully reset before all outputs are enabled. Flip-flop can be noticed when module is removed and inserted again and one of the pins was changed to 1 before removal. 100 microsecond flipping is noticeable on oscilloscope (100khz SPI bus). For a properly reset chip - output is enabled around 100 microseconds (on 100khz SPI bus) later during probing process hence should be irrelevant behavioral change. Fixes: 7ebc194d0fd4 (gpio: 74x164: Introduce 'enable-gpios' property) Link: https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L130 [1] Link: https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L150 [2] Signed-off-by: Arturas Moskvinas Signed-off-by: Bartosz Golaszewski commit f6ecfdad359a01c7fd8a3bcfde3ef0acdf107e6e Author: Sid Pranjale Date: Thu Feb 29 21:52:05 2024 +0530 drm/nouveau: keep DMA buffers required for suspend/resume Nouveau deallocates a few buffers post GPU init which are required for GPU suspend/resume to function correctly. This is likely not as big an issue on systems where the NVGPU is the only GPU, but on multi-GPU set ups it leads to a regression where the kernel module errors and results in a system-wide rendering freeze. This commit addresses that regression by moving the two buffers required for suspend and resume to be deallocated at driver unload instead of post init. Fixes: 042b5f83841fb ("drm/nouveau: fix several DMA buffer leaks") Signed-off-by: Sid Pranjale Signed-off-by: Dave Airlie commit f7916c47f66d778817068d86e5c9b5e511e23c86 Author: Dave Airlie Date: Mon Feb 26 17:16:10 2024 +1000 nouveau: report byte usage in VRAM usage. Turns out usage is always in bytes not shifted. Fixes: 72fa02fdf833 ("nouveau: add an ioctl to report vram usage") Signed-off-by: Dave Airlie commit f060e461ea3ef75fa17fd3f943934fe8af51206d Merge: bba679c06ca2d b7cdccc6a8495 Author: Dave Airlie Date: Fri Mar 1 15:09:40 2024 +1000 Merge tag 'amd-drm-fixes-6.8-2024-02-29' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.8-2024-02-29: amdgpu: - Fix potential buffer overflow - Fix power min cap - Suspend/resume fix - SI PM fix - eDP fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240229152424.6646-1-alexander.deucher@amd.com commit bba679c06ca2d3f22a1fa83bff289e78b6e95139 Merge: aa5fe428d52aa 664bad6af3cbe Author: Dave Airlie Date: Fri Mar 1 14:24:51 2024 +1000 Merge tag 'drm-msm-fixes-2024-02-28' of https://gitlab.freedesktop.org/drm/msm into drm-fixes Fixes for v6.8-rc7 DP: - Revert a change which was causing a HDP regression Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvhWvHiPGQ1pRD2XPAQoHEM2M35kjhrsSAEtzh8AMSRvg@mail.gmail.com commit aa5fe428d52aa65fa1c928c00c4cdb131529736b Merge: 45046af3d0c2d 8188cae3cc3d8 Author: Dave Airlie Date: Fri Mar 1 13:42:24 2024 +1000 Merge tag 'drm-xe-fixes-2024-02-29' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes UAPI Changes: - A couple of tracepoint updates from Priyanka and Lucas. - Make sure BINDs are completed before accepting UNBINDs on LR vms. - Don't arbitrarily restrict max number of batched binds. - Add uapi for dumpable bos (agreed on IRC). - Remove unused uapi flags and a leftover comment. Driver Changes: - A couple of fixes related to the execlist backend. Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/ZeCBg4MA2hd1oggN@fedora commit 45046af3d0c2d6f4f1953f7f07cd1b34ffc86498 Merge: d206a76d7d272 c70703320e557 Author: Dave Airlie Date: Fri Mar 1 13:12:32 2024 +1000 Merge tag 'drm-misc-fixes-2024-02-29' of https://anongit.freedesktop.org/git/drm/drm-misc into drm-fixes A reset fix for host1x, a resource leak fix and a probe fix for aux-hpd, a use-after-free fix and a boot fix for a pmic_glink qcom driver in drivers/soc, a fix for the simpledrm/tegra transition, a kunit fix for the TTM tests, a font handling fix for fbcon, two allocation fixes and a kunit test to cover them for drm/buddy Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240229-angelic-adorable-teal-fbfabb@houat commit 6572786006fa96ad2c35bb31757f1f861298093b Author: Masami Hiramatsu (Google) Date: Fri Mar 1 09:18:24 2024 +0900 fprobe: Fix to allocate entry_data_size buffer with rethook instances Fix to allocate fprobe::entry_data_size buffer with rethook instances. If fprobe doesn't allocate entry_data_size buffer for each rethook instance, fprobe entry handler can cause a buffer overrun when storing entry data in entry handler. Link: https://lore.kernel.org/all/170920576727.107552.638161246679734051.stgit@devnote2/ Reported-by: Jiri Olsa Closes: https://lore.kernel.org/all/Zd9eBn2FTQzYyg7L@krava/ Fixes: 4bbd93455659 ("kprobes: kretprobe scalability improvement") Cc: stable@vger.kernel.org Tested-by: Jiri Olsa Signed-off-by: Masami Hiramatsu (Google) commit e2b54eaf28df0c978626c9736b94f003b523b451 Author: Filipe Manana Date: Fri Feb 23 16:38:43 2024 +0000 btrfs: fix double free of anonymous device after snapshot creation failure When creating a snapshot we may do a double free of an anonymous device in case there's an error committing the transaction. The second free may result in freeing an anonymous device number that was allocated by some other subsystem in the kernel or another btrfs filesystem. The steps that lead to this: 1) At ioctl.c:create_snapshot() we allocate an anonymous device number and assign it to pending_snapshot->anon_dev; 2) Then we call btrfs_commit_transaction() and end up at transaction.c:create_pending_snapshot(); 3) There we call btrfs_get_new_fs_root() and pass it the anonymous device number stored in pending_snapshot->anon_dev; 4) btrfs_get_new_fs_root() frees that anonymous device number because btrfs_lookup_fs_root() returned a root - someone else did a lookup of the new root already, which could some task doing backref walking; 5) After that some error happens in the transaction commit path, and at ioctl.c:create_snapshot() we jump to the 'fail' label, and after that we free again the same anonymous device number, which in the meanwhile may have been reallocated somewhere else, because pending_snapshot->anon_dev still has the same value as in step 1. Recently syzbot ran into this and reported the following trace: ------------[ cut here ]------------ ida_free called for id=51 which is not allocated. WARNING: CPU: 1 PID: 31038 at lib/idr.c:525 ida_free+0x370/0x420 lib/idr.c:525 Modules linked in: CPU: 1 PID: 31038 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-00410-gc02197fc9076 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 RIP: 0010:ida_free+0x370/0x420 lib/idr.c:525 Code: 10 42 80 3c 28 (...) RSP: 0018:ffffc90015a67300 EFLAGS: 00010246 RAX: be5130472f5dd000 RBX: 0000000000000033 RCX: 0000000000040000 RDX: ffffc90009a7a000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffffc90015a673f0 R08: ffffffff81577992 R09: 1ffff92002b4cdb4 R10: dffffc0000000000 R11: fffff52002b4cdb5 R12: 0000000000000246 R13: dffffc0000000000 R14: ffffffff8e256b80 R15: 0000000000000246 FS: 00007fca3f4b46c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f167a17b978 CR3: 000000001ed26000 CR4: 0000000000350ef0 Call Trace: btrfs_get_root_ref+0xa48/0xaf0 fs/btrfs/disk-io.c:1346 create_pending_snapshot+0xff2/0x2bc0 fs/btrfs/transaction.c:1837 create_pending_snapshots+0x195/0x1d0 fs/btrfs/transaction.c:1931 btrfs_commit_transaction+0xf1c/0x3740 fs/btrfs/transaction.c:2404 create_snapshot+0x507/0x880 fs/btrfs/ioctl.c:848 btrfs_mksubvol+0x5d0/0x750 fs/btrfs/ioctl.c:998 btrfs_mksnapshot+0xb5/0xf0 fs/btrfs/ioctl.c:1044 __btrfs_ioctl_snap_create+0x387/0x4b0 fs/btrfs/ioctl.c:1306 btrfs_ioctl_snap_create_v2+0x1ca/0x400 fs/btrfs/ioctl.c:1393 btrfs_ioctl+0xa74/0xd40 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:871 [inline] __se_sys_ioctl+0xfe/0x170 fs/ioctl.c:857 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7fca3e67dda9 Code: 28 00 00 00 (...) RSP: 002b:00007fca3f4b40c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fca3e7abf80 RCX: 00007fca3e67dda9 RDX: 00000000200005c0 RSI: 0000000050009417 RDI: 0000000000000003 RBP: 00007fca3e6ca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fca3e7abf80 R15: 00007fff6bf95658 Where we get an explicit message where we attempt to free an anonymous device number that is not currently allocated. It happens in a different code path from the example below, at btrfs_get_root_ref(), so this change may not fix the case triggered by syzbot. To fix at least the code path from the example above, change btrfs_get_root_ref() and its callers to receive a dev_t pointer argument for the anonymous device number, so that in case it frees the number, it also resets it to 0, so that up in the call chain we don't attempt to do the double free. CC: stable@vger.kernel.org # 5.10+ Link: https://lore.kernel.org/linux-btrfs/000000000000f673a1061202f630@google.com/ Fixes: e03ee2fe873e ("btrfs: do not ASSERT() if the newly created subvolume already got read") Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 418b09027743d9a9fb39116bed46a192f868a3c3 Author: Filipe Manana Date: Thu Feb 22 12:29:34 2024 +0000 btrfs: ensure fiemap doesn't race with writes when FIEMAP_FLAG_SYNC is given When FIEMAP_FLAG_SYNC is given to fiemap the expectation is that that are no concurrent writes and we get a stable view of the inode's extent layout. When the flag is given we flush all IO (and wait for ordered extents to complete) and then lock the inode in shared mode, however that leaves open the possibility that a write might happen right after the flushing and before locking the inode. So fix this by flushing again after locking the inode - we leave the initial flushing before locking the inode to avoid holding the lock and blocking other RO operations while waiting for IO and ordered extents to complete. The second flushing while holding the inode's lock will most of the time do nothing or very little since the time window for new writes to have happened is small. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit a1a4a9ca77f143c00fce69c1239887ff8b813bec Author: Filipe Manana Date: Thu Feb 22 12:29:26 2024 +0000 btrfs: fix race between ordered extent completion and fiemap For fiemap we recently stopped locking the target extent range for the whole duration of the fiemap call, in order to avoid a deadlock in a scenario where the fiemap buffer happens to be a memory mapped range of the same file. This use case is very unlikely to be useful in practice but it may be triggered by fuzz testing (syzbot, etc). However by not locking the target extent range for the whole duration of the fiemap call we can race with an ordered extent. This happens like this: 1) The fiemap task finishes processing a file extent item that covers the file range [512K, 1M[, and that file extent item is the last item in the leaf currently being processed; 2) And ordered extent for the file range [768K, 2M[, in COW mode, completes (btrfs_finish_one_ordered()) and the file extent item covering the range [512K, 1M[ is trimmed to cover the range [512K, 768K[ and then a new file extent item for the range [768K, 2M[ is inserted in the inode's subvolume tree; 3) The fiemap task calls fiemap_next_leaf_item(), which then calls btrfs_next_leaf() to find the next leaf / item. This finds that the the next key following the one we previously processed (its type is BTRFS_EXTENT_DATA_KEY and its offset is 512K), is the key corresponding to the new file extent item inserted by the ordered extent, which has a type of BTRFS_EXTENT_DATA_KEY and an offset of 768K; 4) Later the fiemap code ends up at emit_fiemap_extent() and triggers the warning: if (cache->offset + cache->len > offset) { WARN_ON(1); return -EINVAL; } Since we get 1M > 768K, because the previously emitted entry for the old extent covering the file range [512K, 1M[ ends at an offset that is greater than the new extent's start offset (768K). This makes fiemap fail with -EINVAL besides triggering the warning that produces a stack trace like the following: [1621.677651] ------------[ cut here ]------------ [1621.677656] WARNING: CPU: 1 PID: 204366 at fs/btrfs/extent_io.c:2492 emit_fiemap_extent+0x84/0x90 [btrfs] [1621.677899] Modules linked in: btrfs blake2b_generic (...) [1621.677951] CPU: 1 PID: 204366 Comm: pool Not tainted 6.8.0-rc5-btrfs-next-151+ #1 [1621.677954] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014 [1621.677956] RIP: 0010:emit_fiemap_extent+0x84/0x90 [btrfs] [1621.678033] Code: 2b 4c 89 63 (...) [1621.678035] RSP: 0018:ffffab16089ffd20 EFLAGS: 00010206 [1621.678037] RAX: 00000000004fa000 RBX: ffffab16089ffe08 RCX: 0000000000009000 [1621.678039] RDX: 00000000004f9000 RSI: 00000000004f1000 RDI: ffffab16089ffe90 [1621.678040] RBP: 00000000004f9000 R08: 0000000000001000 R09: 0000000000000000 [1621.678041] R10: 0000000000000000 R11: 0000000000001000 R12: 0000000041d78000 [1621.678043] R13: 0000000000001000 R14: 0000000000000000 R15: ffff9434f0b17850 [1621.678044] FS: 00007fa6e20006c0(0000) GS:ffff943bdfa40000(0000) knlGS:0000000000000000 [1621.678046] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1621.678048] CR2: 00007fa6b0801000 CR3: 000000012d404002 CR4: 0000000000370ef0 [1621.678053] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [1621.678055] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [1621.678056] Call Trace: [1621.678074] [1621.678076] ? __warn+0x80/0x130 [1621.678082] ? emit_fiemap_extent+0x84/0x90 [btrfs] [1621.678159] ? report_bug+0x1f4/0x200 [1621.678164] ? handle_bug+0x42/0x70 [1621.678167] ? exc_invalid_op+0x14/0x70 [1621.678170] ? asm_exc_invalid_op+0x16/0x20 [1621.678178] ? emit_fiemap_extent+0x84/0x90 [btrfs] [1621.678253] extent_fiemap+0x766/0xa30 [btrfs] [1621.678339] btrfs_fiemap+0x45/0x80 [btrfs] [1621.678420] do_vfs_ioctl+0x1e4/0x870 [1621.678431] __x64_sys_ioctl+0x6a/0xc0 [1621.678434] do_syscall_64+0x52/0x120 [1621.678445] entry_SYSCALL_64_after_hwframe+0x6e/0x76 There's also another case where before calling btrfs_next_leaf() we are processing a hole or a prealloc extent and we had several delalloc ranges within that hole or prealloc extent. In that case if the ordered extents complete before we find the next key, we may end up finding an extent item with an offset smaller than (or equals to) the offset in cache->offset. So fix this by changing emit_fiemap_extent() to address these three scenarios like this: 1) For the first case, steps listed above, adjust the length of the previously cached extent so that it does not overlap with the current extent, emit the previous one and cache the current file extent item; 2) For the second case where he had a hole or prealloc extent with multiple delalloc ranges inside the hole or prealloc extent's range, and the current file extent item has an offset that matches the offset in the fiemap cache, just discard what we have in the fiemap cache and assign the current file extent item to the cache, since it's more up to date; 3) For the third case where he had a hole or prealloc extent with multiple delalloc ranges inside the hole or prealloc extent's range and the offset of the file extent item we just found is smaller than what we have in the cache, just skip the current file extent item if its range end at or behind the cached extent's end, because we may have emitted (to the fiemap user space buffer) delalloc ranges that overlap with the current file extent item's range. If the file extent item's range goes beyond the end offset of the cached extent, just emit the cached extent and cache a subrange of the file extent item, that goes from the end offset of the cached extent to the end offset of the file extent item. Dealing with those cases in those ways makes everything consistent by reflecting the current state of file extent items in the btree and without emitting extents that have overlapping ranges (which would be confusing and violating expectations). This issue could be triggered often with test case generic/561, and was also hit and reported by Wang Yugui. Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20240223104619.701F.409509F4@e16-tech.com/ Fixes: b0ad381fa769 ("btrfs: fix deadlock with fiemap and extent locking") Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 87adedeba51a822533649b143232418b9e26d08b Merge: d4f76f8065681 640f41ed33b5a Author: Linus Torvalds Date: Thu Feb 29 12:40:20 2024 -0800 Merge tag 'net-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bluetooth, WiFi and netfilter. We have one outstanding issue with the stmmac driver, which may be a LOCKDEP false positive, not a blocker. Current release - regressions: - netfilter: nf_tables: re-allow NFPROTO_INET in nft_(match/target)_validate() - eth: ionic: fix error handling in PCI reset code Current release - new code bugs: - eth: stmmac: complete meta data only when enabled, fix null-deref - kunit: fix again checksum tests on big endian CPUs Previous releases - regressions: - veth: try harder when allocating queue memory - Bluetooth: - hci_bcm4377: do not mark valid bd_addr as invalid - hci_event: fix handling of HCI_EV_IO_CAPA_REQUEST Previous releases - always broken: - info leak in __skb_datagram_iter() on netlink socket - mptcp: - map v4 address to v6 when destroying subflow - fix potential wake-up event loss due to sndbuf auto-tuning - fix double-free on socket dismantle - wifi: nl80211: reject iftype change with mesh ID change - fix small out-of-bound read when validating netlink be16/32 types - rtnetlink: fix error logic of IFLA_BRIDGE_FLAGS writing back - ipv6: fix potential "struct net" ref-leak in inet6_rtm_getaddr() - ip_tunnel: prevent perpetual headroom growth with huge number of tunnels on top of each other - mctp: fix skb leaks on error paths of mctp_local_output() - eth: ice: fixes for DPLL state reporting - dpll: rely on rcu for netdev_dpll_pin() to prevent UaF - eth: dpaa: accept phy-interface-type = '10gbase-r' in the device tree" * tag 'net-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (73 commits) dpll: fix build failure due to rcu_dereference_check() on unknown type kunit: Fix again checksum tests on big endian CPUs tls: fix use-after-free on failed backlog decryption tls: separate no-async decryption request handling from async tls: fix peeking with sync+async decryption tls: decrement decrypt_pending if no async completion will be called gtp: fix use-after-free and null-ptr-deref in gtp_newlink() net: hsr: Use correct offset for HSR TLV values in supervisory HSR frames igb: extend PTP timestamp adjustments to i211 rtnetlink: fix error logic of IFLA_BRIDGE_FLAGS writing back tools: ynl: fix handling of multiple mcast groups selftests: netfilter: add bridge conntrack + multicast test case netfilter: bridge: confirm multicast packets before passing them up the stack netfilter: nf_tables: allow NFPROTO_INET in nft_(match/target)_validate() Bluetooth: qca: Fix triggering coredump implementation Bluetooth: hci_qca: Set BDA quirk bit if fwnode exists in DT Bluetooth: qca: Fix wrong event type for patch config command Bluetooth: Enforce validation on max value of connection interval Bluetooth: hci_event: Fix handling of HCI_EV_IO_CAPA_REQUEST Bluetooth: mgmt: Fix limited discoverable off timeout ... commit 25125a4762835d62ba1e540c1351d447fc1f6c7c Author: Kamalesh Babulal Date: Thu Feb 29 15:41:14 2024 +0530 cgroup/cpuset: Fix retval in update_cpumask() The update_cpumask(), checks for newly requested cpumask by calling validate_change(), which returns an error on passing an invalid set of cpu(s). Independent of the error returned, update_cpumask() always returns zero, suppressing the error and returning success to the user on writing an invalid cpu range for a cpuset. Fix it by returning retval instead, which is returned by validate_change(). Fixes: 99fe36ba6fc1 ("cgroup/cpuset: Improve temporary cpumasks handling") Signed-off-by: Kamalesh Babulal Reviewed-by: Waiman Long Cc: stable@vger.kernel.org # v6.6+ Signed-off-by: Tejun Heo commit d4f76f8065681f55b3c69073829fe7e4c70c0818 Merge: 805d849d7c3cc d9818b3e906a0 Author: Linus Torvalds Date: Thu Feb 29 12:29:23 2024 -0800 Merge tag 'landlock-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull Landlock fix from Mickaël Salaün: "Fix a potential issue when handling inodes with inconsistent properties" * tag 'landlock-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: landlock: Fix asymmetric private inodes referring commit a11dd49dcb9376776193e15641f84fcc1e5980c9 Author: Dimitris Vlachos Date: Thu Feb 29 21:17:23 2024 +0200 riscv: Sparse-Memory/vmemmap out-of-bounds fix Offset vmemmap so that the first page of vmemmap will be mapped to the first page of physical memory in order to ensure that vmemmap’s bounds will be respected during pfn_to_page()/page_to_pfn() operations. The conversion macros will produce correct SV39/48/57 addresses for every possible/valid DRAM_BASE inside the physical memory limits. v2:Address Alex's comments Suggested-by: Alexandre Ghiti Signed-off-by: Dimitris Vlachos Reported-by: Dimitris Vlachos Closes: https://lore.kernel.org/linux-riscv/20240202135030.42265-1-csd4492@csd.uoc.gr Fixes: d95f1a542c3d ("RISC-V: Implement sparsemem") Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240229191723.32779-1-dvlachos@ics.forth.gr Signed-off-by: Palmer Dabbelt commit 640f41ed33b5a420e05daf395afae85e6b20c003 Author: Eric Dumazet Date: Thu Feb 29 11:05:15 2024 -0800 dpll: fix build failure due to rcu_dereference_check() on unknown type Tasmiya reports that their compiler complains that we deref a pointer to unknown type with rcu_dereference_rtnl(): include/linux/rcupdate.h:439:9: error: dereferencing pointer to incomplete type ‘struct dpll_pin’ Unclear what compiler it is, at the moment, and we can't report but since DPLL can't be a module - move the code from the header into the source file. Fixes: 0d60d8df6f49 ("dpll: rely on rcu for netdev_dpll_pin()") Reported-by: Tasmiya Nalatwad Link: https://lore.kernel.org/all/3fcf3a2c-1c1b-42c1-bacb-78fdcd700389@linux.vnet.ibm.com/ Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20240229190515.2740221-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 2b8acd71544aeba0c12967b584f6069328452f9b Merge: e2b6bc28ec45e e0fe5ab4192c1 Author: Palmer Dabbelt Date: Thu Feb 29 10:21:25 2024 -0800 Merge patch series "NAPOT Fixes" Alexandre Ghiti says: This contains 2 fixes for NAPOT: patch 1 disables the use of NAPOT mapping for vmalloc/vmap and patch 2 implements pte_leaf_size() to report NAPOT size. * b4-shazam-merge: riscv: Fix pte_leaf_size() for NAPOT Revert "riscv: mm: support Svnapot in huge vmap" Link: https://lore.kernel.org/r/20240227205016.121901-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit e0fe5ab4192c171c111976dbe90bbd37d3976be0 Author: Alexandre Ghiti Date: Tue Feb 27 21:50:16 2024 +0100 riscv: Fix pte_leaf_size() for NAPOT pte_leaf_size() must be reimplemented to add support for NAPOT mappings. Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240227205016.121901-3-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 16ab4646c9057e0528b985ad772e3cb88c613db2 Author: Alexandre Ghiti Date: Tue Feb 27 21:50:15 2024 +0100 Revert "riscv: mm: support Svnapot in huge vmap" This reverts commit ce173474cf19fe7fbe8f0fc74e3c81ec9c3d9807. We cannot correctly deal with NAPOT mappings in vmalloc/vmap because if some part of a NAPOT mapping is unmapped, the remaining mapping is not updated accordingly. For example: ptr = vmalloc_huge(64 * 1024, GFP_KERNEL); vunmap_range((unsigned long)(ptr + PAGE_SIZE), (unsigned long)(ptr + 64 * 1024)); leads to the following kernel page table dump: 0xffff8f8000ef0000-0xffff8f8000ef1000 0x00000001033c0000 4K PTE N .. .. D A G . . W R V Meaning the first entry which was not unmapped still has the N bit set, which, if accessed first and cached in the TLB, could allow access to the unmapped range. That's because the logic to break the NAPOT mapping does not exist and likely won't. Indeed, to break a NAPOT mapping, we first have to clear the whole mapping, flush the TLB and then set the new mapping ("break- before-make" equivalent). That works fine in userspace since we can handle any pagefault occurring on the remaining mapping but we can't handle a kernel pagefault on such mapping. So fix this by reverting the commit that introduced the vmap/vmalloc support. Fixes: ce173474cf19 ("riscv: mm: support Svnapot in huge vmap") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240227205016.121901-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit e2b6bc28ec45e2670da4f0c719f9de101bf22bc6 Merge: 34b567868777e 05ab803d1ad8a Author: Palmer Dabbelt Date: Thu Feb 29 10:20:19 2024 -0800 Merge patch series "riscv: cbo.zero fixes" Samuel Holland says: This series fixes a couple of issues related to using the cbo.zero instruction in userspace. The first patch fixes a bug where the wrong enable bit gets set if the kernel is running in M-mode. The remaining patches fix a bug where the enable bit gets reset to its default value after a nonretentive idle state. I have hardware which reproduces this: Before this series: $ tools/testing/selftests/riscv/hwprobe/cbo TAP version 13 1..3 ok 1 Zicboz block size # Zicboz block size: 64 Illegal instruction After applying this series: $ tools/testing/selftests/riscv/hwprobe/cbo TAP version 13 1..3 ok 1 Zicboz block size # Zicboz block size: 64 ok 2 cbo.zero ok 3 cbo.zero check # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 * b4-shazam-merge: riscv: Save/restore envcfg CSR during CPU suspend riscv: Add a custom ISA extension for the [ms]envcfg CSR riscv: Fix enabling cbo.zero when running in M-mode Link: https://lore.kernel.org/r/20240228065559.3434837-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 05ab803d1ad8ac505ade77c6bd3f86b1b4ea0dc4 Author: Samuel Holland Date: Tue Feb 27 22:55:35 2024 -0800 riscv: Save/restore envcfg CSR during CPU suspend The value of the [ms]envcfg CSR is lost when entering a nonretentive idle state, so the CSR must be rewritten when resuming the CPU. Cc: # v6.7+ Fixes: 43c16d51a19b ("RISC-V: Enable cbo.zero in usermode") Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20240228065559.3434837-4-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 4774848fef6041716a4883217eb75f6b10eb183b Author: Samuel Holland Date: Tue Feb 27 22:55:34 2024 -0800 riscv: Add a custom ISA extension for the [ms]envcfg CSR The [ms]envcfg CSR was added in version 1.12 of the RISC-V privileged ISA (aka S[ms]1p12). However, bits in this CSR are defined by several other extensions which may be implemented separately from any particular version of the privileged ISA (for example, some unrelated errata may prevent an implementation from claiming conformance with Ss1p12). As a result, Linux cannot simply use the privileged ISA version to determine if the CSR is present. It must also check if any of these other extensions are implemented. It also cannot probe the existence of the CSR at runtime, because Linux does not require Sstrict, so (in the absence of additional information) it cannot know if a CSR at that address is [ms]envcfg or part of some non-conforming vendor extension. Since there are several standard extensions that imply the existence of the [ms]envcfg CSR, it becomes unwieldy to check for all of them wherever the CSR is accessed. Instead, define a custom Xlinuxenvcfg ISA extension bit that is implied by the other extensions and denotes that the CSR exists as defined in the privileged ISA, containing at least one of the fields common between menvcfg and senvcfg. This extension does not need to be parsed from the devicetree or ISA string because it can only be implemented as a subset of some other standard extension. Cc: # v6.7+ Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20240228065559.3434837-3-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 3fb3f7164edc467450e650dca51dbe4823315a56 Author: Samuel Holland Date: Tue Feb 27 22:55:33 2024 -0800 riscv: Fix enabling cbo.zero when running in M-mode When the kernel is running in M-mode, the CBZE bit must be set in the menvcfg CSR, not in senvcfg. Cc: Fixes: 43c16d51a19b ("RISC-V: Enable cbo.zero in usermode") Reviewed-by: Andrew Jones Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240228065559.3434837-2-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 34b567868777e9fd39ec5333969728a7f0cf179c Author: Fei Wu Date: Wed Feb 28 19:54:25 2024 +0800 perf: RISCV: Fix panic on pmu overflow handler (1 << idx) of int is not desired when setting bits in unsigned long overflowed_ctrs, use BIT() instead. This panic happens when running 'perf record -e branches' on sophgo sg2042. [ 273.311852] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000098 [ 273.320851] Oops [#1] [ 273.323179] Modules linked in: [ 273.326303] CPU: 0 PID: 1475 Comm: perf Not tainted 6.6.0-rc3+ #9 [ 273.332521] Hardware name: Sophgo Mango (DT) [ 273.336878] epc : riscv_pmu_ctr_get_width_mask+0x8/0x62 [ 273.342291] ra : pmu_sbi_ovf_handler+0x2e0/0x34e [ 273.347091] epc : ffffffff80aecd98 ra : ffffffff80aee056 sp : fffffff6e36928b0 [ 273.354454] gp : ffffffff821f82d0 tp : ffffffd90c353200 t0 : 0000002ade4f9978 [ 273.361815] t1 : 0000000000504d55 t2 : ffffffff8016cd8c s0 : fffffff6e3692a70 [ 273.369180] s1 : 0000000000000020 a0 : 0000000000000000 a1 : 00001a8e81800000 [ 273.376540] a2 : 0000003c00070198 a3 : 0000003c00db75a4 a4 : 0000000000000015 [ 273.383901] a5 : ffffffd7ff8804b0 a6 : 0000000000000015 a7 : 000000000000002a [ 273.391327] s2 : 000000000000ffff s3 : 0000000000000000 s4 : ffffffd7ff8803b0 [ 273.398773] s5 : 0000000000504d55 s6 : ffffffd905069800 s7 : ffffffff821fe210 [ 273.406139] s8 : 000000007fffffff s9 : ffffffd7ff8803b0 s10: ffffffd903f29098 [ 273.413660] s11: 0000000080000000 t3 : 0000000000000003 t4 : ffffffff8017a0ca [ 273.421022] t5 : ffffffff8023cfc2 t6 : ffffffd9040780e8 [ 273.426437] status: 0000000200000100 badaddr: 0000000000000098 cause: 000000000000000d [ 273.434512] [] riscv_pmu_ctr_get_width_mask+0x8/0x62 [ 273.441169] [] handle_percpu_devid_irq+0x98/0x1ee [ 273.447562] [] generic_handle_domain_irq+0x28/0x36 [ 273.454151] [] riscv_intc_irq+0x36/0x4e [ 273.459659] [] handle_riscv_irq+0x4a/0x74 [ 273.465442] [] do_irq+0x62/0x92 [ 273.470360] Code: 0420 60a2 6402 5529 0141 8082 0013 0000 0013 0000 (6d5c) b783 [ 273.477921] ---[ end trace 0000000000000000 ]--- [ 273.482630] Kernel panic - not syncing: Fatal exception in interrupt Reviewed-by: Alexandre Ghiti Reviewed-by: Atish Patra Signed-off-by: Fei Wu Link: https://lore.kernel.org/r/20240228115425.2613856-1-fei2.wu@intel.com Signed-off-by: Palmer Dabbelt commit 680945f0aa5084d49bbfb705ca162fc00cc146ae Author: Samuel Holland Date: Thu Feb 15 15:49:11 2024 -0800 MAINTAINERS: Update SiFive driver maintainers Add myself as a maintainer for the various SiFive drivers, since I have been performing cleanup activity on these drivers and reviewing patches to them for a while now. Remove Palmer as a maintainer, as he is focused on overall RISC-V architecture support. Collapse some duplicate entries into the main SiFive drivers entry: - Conor is already maintainer of standalone cache drivers as a whole, and these files are also covered by the "sifive" file name regex. - Paul's git tree has not been updated since 2018, and all file names matching the "fu540" pattern also match the "sifive" pattern. - Green has not been active on the LKML for a couple of years. Signed-off-by: Samuel Holland Acked-by: Paul Walmsley Acked-by: Conor Dooley Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20240215234941.1663791-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 3d6423ef8d517e8924bec3f22c40285a90d652f3 Author: Christophe Leroy Date: Fri Feb 23 11:41:52 2024 +0100 kunit: Fix again checksum tests on big endian CPUs Commit b38460bc463c ("kunit: Fix checksum tests on big endian CPUs") fixed endianness issues with kunit checksum tests, but then commit 6f4c45cbcb00 ("kunit: Add tests for csum_ipv6_magic and ip_fast_csum") introduced new issues on big endian CPUs. Those issues are once again reflected by the warnings reported by sparse. So, fix them with the same approach, perform proper conversion in order to support both little and big endian CPUs. Once the conversions are properly done and the right types used, the sparse warnings are cleared as well. Reported-by: Erhard Furtner Fixes: 6f4c45cbcb00 ("kunit: Add tests for csum_ipv6_magic and ip_fast_csum") Signed-off-by: Christophe Leroy Tested-by: Charlie Jenkins Tested-by: Guenter Roeck Acked-by: Paolo Abeni Acked-by: Palmer Dabbelt Link: https://lore.kernel.org/r/73df3a9e95c2179119398ad1b4c84cdacbd8dfb6.1708684443.git.christophe.leroy@csgroup.eu Signed-off-by: Jakub Kicinski commit 244b96c2310ef7bba7569bbaca1633feea627af9 Merge: 8f5afe41148ce 6abf9dd26bb16 Author: Jakub Kicinski Date: Thu Feb 29 09:10:24 2024 -0800 Merge tag 'for-net-2024-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - mgmt: Fix limited discoverable off timeout - hci_qca: Set BDA quirk bit if fwnode exists in DT - hci_bcm4377: do not mark valid bd_addr as invalid - hci_sync: Check the correct flag before starting a scan - Enforce validation on max value of connection interval - hci_sync: Fix accept_list when attempting to suspend - hci_event: Fix handling of HCI_EV_IO_CAPA_REQUEST - Avoid potential use-after-free in hci_error_reset - rfcomm: Fix null-ptr-deref in rfcomm_check_security - hci_event: Fix wrongly recorded wakeup BD_ADDR - qca: Fix wrong event type for patch config command - qca: Fix triggering coredump implementation * tag 'for-net-2024-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: qca: Fix triggering coredump implementation Bluetooth: hci_qca: Set BDA quirk bit if fwnode exists in DT Bluetooth: qca: Fix wrong event type for patch config command Bluetooth: Enforce validation on max value of connection interval Bluetooth: hci_event: Fix handling of HCI_EV_IO_CAPA_REQUEST Bluetooth: mgmt: Fix limited discoverable off timeout Bluetooth: hci_event: Fix wrongly recorded wakeup BD_ADDR Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security Bluetooth: hci_sync: Fix accept_list when attempting to suspend Bluetooth: Avoid potential use-after-free in hci_error_reset Bluetooth: hci_sync: Check the correct flag before starting a scan Bluetooth: hci_bcm4377: do not mark valid bd_addr as invalid ==================== Link: https://lore.kernel.org/r/20240228145644.2269088-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski commit 8f5afe41148ce6a719864e23c2bf776c88e9212f Merge: 616d82c3cfa2a 13114dc554306 Author: Jakub Kicinski Date: Thu Feb 29 09:07:18 2024 -0800 Merge branch 'tls-a-few-more-fixes-for-async-decrypt' Sabrina Dubroca says: ==================== tls: a few more fixes for async decrypt The previous patchset [1] took care of "full async". This adds a few fixes for cases where only part of the crypto operations go the async route, found by extending my previous debug patch [2] to do N synchronous operations followed by M asynchronous ops (with N and M configurable). [1] https://patchwork.kernel.org/project/netdevbpf/list/?series=823784&state=* [2] https://lore.kernel.org/all/9d664093b1bf7f47497b2c40b3a085b45f3274a2.1694021240.git.sd@queasysnail.net/ ==================== Link: https://lore.kernel.org/r/cover.1709132643.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit 13114dc5543069f7b97991e3b79937b6da05f5b0 Author: Sabrina Dubroca Date: Wed Feb 28 23:44:00 2024 +0100 tls: fix use-after-free on failed backlog decryption When the decrypt request goes to the backlog and crypto_aead_decrypt returns -EBUSY, tls_do_decryption will wait until all async decryptions have completed. If one of them fails, tls_do_decryption will return -EBADMSG and tls_decrypt_sg jumps to the error path, releasing all the pages. But the pages have been passed to the async callback, and have already been released by tls_decrypt_done. The only true async case is when crypto_aead_decrypt returns -EINPROGRESS. With -EBUSY, we already waited so we can tell tls_sw_recvmsg that the data is available for immediate copy, but we need to notify tls_decrypt_sg (via the new ->async_done flag) that the memory has already been released. Fixes: 859054147318 ("net: tls: handle backlogging of crypto requests") Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/4755dd8d9bebdefaa19ce1439b833d6199d4364c.1709132643.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit 41532b785e9d79636b3815a64ddf6a096647d011 Author: Sabrina Dubroca Date: Wed Feb 28 23:43:59 2024 +0100 tls: separate no-async decryption request handling from async If we're not doing async, the handling is much simpler. There's no reference counting, we just need to wait for the completion to wake us up and return its result. We should preferably also use a separate crypto_wait. I'm not seeing a UAF as I did in the past, I think aec7961916f3 ("tls: fix race between async notify and socket close") took care of it. This will make the next fix easier. Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/47bde5f649707610eaef9f0d679519966fc31061.1709132643.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit 6caaf104423d809b49a67ee6500191d063b40dc6 Author: Sabrina Dubroca Date: Wed Feb 28 23:43:58 2024 +0100 tls: fix peeking with sync+async decryption If we peek from 2 records with a currently empty rx_list, and the first record is decrypted synchronously but the second record is decrypted async, the following happens: 1. decrypt record 1 (sync) 2. copy from record 1 to the userspace's msg 3. queue the decrypted record to rx_list for future read(!PEEK) 4. decrypt record 2 (async) 5. queue record 2 to rx_list 6. call process_rx_list to copy data from the 2nd record We currently pass copied=0 as skip offset to process_rx_list, so we end up copying once again from the first record. We should skip over the data we've already copied. Seen with selftest tls.12_aes_gcm.recv_peek_large_buf_mult_recs Fixes: 692d7b5d1f91 ("tls: Fix recvmsg() to be able to peek across multiple records") Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/1b132d2b2b99296bfde54e8a67672d90d6d16e71.1709132643.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit f7fa16d49837f947ee59492958f9e6f0e51d9a78 Author: Sabrina Dubroca Date: Wed Feb 28 23:43:57 2024 +0100 tls: decrement decrypt_pending if no async completion will be called With mixed sync/async decryption, or failures of crypto_aead_decrypt, we increment decrypt_pending but we never do the corresponding decrement since tls_decrypt_done will not be called. In this case, we should decrement decrypt_pending immediately to avoid getting stuck. For example, the prequeue prequeue test gets stuck with mixed modes (one async decrypt + one sync decrypt). Fixes: 94524d8fc965 ("net/tls: Add support for async decryption of tls records") Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/c56d5fc35543891d5319f834f25622360e1bfbec.1709132643.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit f6443e0177a55f78e94ccc1a43eb63a023a0b6fd Author: Bartosz Golaszewski Date: Fri Feb 23 13:32:14 2024 +0100 pinctrl: don't put the reference to GPIO device in pinctrl_pins_show() The call to gpiod_to_gpio_device() does not increase the reference count of the GPIO device struct so it must not be decreased. Remove the buggy __free() decorator. Fixes: 524fc108b895 ("pinctrl: stop using gpiod_to_chip()") Reported-by: David Arcari Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240223123214.288181-1-brgl@bgdev.pl Signed-off-by: Linus Walleij commit d0b06dc48fb15902d7da09c5c0861e7f042a9381 Author: Takashi Sakamoto Date: Thu Feb 29 22:17:37 2024 +0900 firewire: core: use long bus reset on gap count error When resetting the bus after a gap count error, use a long rather than short bus reset. IEEE 1394-1995 uses only long bus resets. IEEE 1394a adds the option of short bus resets. When video or audio transmission is in progress and a device is hot-plugged elsewhere on the bus, the resulting bus reset can cause video frame drops or audio dropouts. Short bus resets reduce or eliminate this problem. Accordingly, short bus resets are almost always preferred. However, on a mixed 1394/1394a bus, a short bus reset can trigger an immediate additional bus reset. This double bus reset can be interpreted differently by different nodes on the bus, resulting in an inconsistent gap count after the bus reset. An inconsistent gap count will cause another bus reset, leading to a neverending bus reset loop. This only happens for some bus topologies, not for all mixed 1394/1394a buses. By instead sending a long bus reset after a gap count inconsistency, we avoid the doubled bus reset, restoring the bus to normal operation. Signed-off-by: Adam Goldman Link: https://sourceforge.net/p/linux1394/mailman/message/58741624/ Signed-off-by: Takashi Sakamoto commit 616d82c3cfa2a2146dd7e3ae47bda7e877ee549e Author: Alexander Ofitserov Date: Wed Feb 28 14:47:03 2024 +0300 gtp: fix use-after-free and null-ptr-deref in gtp_newlink() The gtp_link_ops operations structure for the subsystem must be registered after registering the gtp_net_ops pernet operations structure. Syzkaller hit 'general protection fault in gtp_genl_dump_pdp' bug: [ 1010.702740] gtp: GTP module unloaded [ 1010.715877] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN NOPTI [ 1010.715888] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] [ 1010.715895] CPU: 1 PID: 128616 Comm: a.out Not tainted 6.8.0-rc6-std-def-alt1 #1 [ 1010.715899] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-alt1 04/01/2014 [ 1010.715908] RIP: 0010:gtp_newlink+0x4d7/0x9c0 [gtp] [ 1010.715915] Code: 80 3c 02 00 0f 85 41 04 00 00 48 8b bb d8 05 00 00 e8 ed f6 ff ff 48 89 c2 48 89 c5 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 4f 04 00 00 4c 89 e2 4c 8b 6d 00 48 b8 00 00 00 [ 1010.715920] RSP: 0018:ffff888020fbf180 EFLAGS: 00010203 [ 1010.715929] RAX: dffffc0000000000 RBX: ffff88800399c000 RCX: 0000000000000000 [ 1010.715933] RDX: 0000000000000001 RSI: ffffffff84805280 RDI: 0000000000000282 [ 1010.715938] RBP: 000000000000000d R08: 0000000000000001 R09: 0000000000000000 [ 1010.715942] R10: 0000000000000001 R11: 0000000000000001 R12: ffff88800399cc80 [ 1010.715947] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000400 [ 1010.715953] FS: 00007fd1509ab5c0(0000) GS:ffff88805b300000(0000) knlGS:0000000000000000 [ 1010.715958] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1010.715962] CR2: 0000000000000000 CR3: 000000001c07a000 CR4: 0000000000750ee0 [ 1010.715968] PKRU: 55555554 [ 1010.715972] Call Trace: [ 1010.715985] ? __die_body.cold+0x1a/0x1f [ 1010.715995] ? die_addr+0x43/0x70 [ 1010.716002] ? exc_general_protection+0x199/0x2f0 [ 1010.716016] ? asm_exc_general_protection+0x1e/0x30 [ 1010.716026] ? gtp_newlink+0x4d7/0x9c0 [gtp] [ 1010.716034] ? gtp_net_exit+0x150/0x150 [gtp] [ 1010.716042] __rtnl_newlink+0x1063/0x1700 [ 1010.716051] ? rtnl_setlink+0x3c0/0x3c0 [ 1010.716063] ? is_bpf_text_address+0xc0/0x1f0 [ 1010.716070] ? kernel_text_address.part.0+0xbb/0xd0 [ 1010.716076] ? __kernel_text_address+0x56/0xa0 [ 1010.716084] ? unwind_get_return_address+0x5a/0xa0 [ 1010.716091] ? create_prof_cpu_mask+0x30/0x30 [ 1010.716098] ? arch_stack_walk+0x9e/0xf0 [ 1010.716106] ? stack_trace_save+0x91/0xd0 [ 1010.716113] ? stack_trace_consume_entry+0x170/0x170 [ 1010.716121] ? __lock_acquire+0x15c5/0x5380 [ 1010.716139] ? mark_held_locks+0x9e/0xe0 [ 1010.716148] ? kmem_cache_alloc_trace+0x35f/0x3c0 [ 1010.716155] ? __rtnl_newlink+0x1700/0x1700 [ 1010.716160] rtnl_newlink+0x69/0xa0 [ 1010.716166] rtnetlink_rcv_msg+0x43b/0xc50 [ 1010.716172] ? rtnl_fdb_dump+0x9f0/0x9f0 [ 1010.716179] ? lock_acquire+0x1fe/0x560 [ 1010.716188] ? netlink_deliver_tap+0x12f/0xd50 [ 1010.716196] netlink_rcv_skb+0x14d/0x440 [ 1010.716202] ? rtnl_fdb_dump+0x9f0/0x9f0 [ 1010.716208] ? netlink_ack+0xab0/0xab0 [ 1010.716213] ? netlink_deliver_tap+0x202/0xd50 [ 1010.716220] ? netlink_deliver_tap+0x218/0xd50 [ 1010.716226] ? __virt_addr_valid+0x30b/0x590 [ 1010.716233] netlink_unicast+0x54b/0x800 [ 1010.716240] ? netlink_attachskb+0x870/0x870 [ 1010.716248] ? __check_object_size+0x2de/0x3b0 [ 1010.716254] netlink_sendmsg+0x938/0xe40 [ 1010.716261] ? netlink_unicast+0x800/0x800 [ 1010.716269] ? __import_iovec+0x292/0x510 [ 1010.716276] ? netlink_unicast+0x800/0x800 [ 1010.716284] __sock_sendmsg+0x159/0x190 [ 1010.716290] ____sys_sendmsg+0x712/0x880 [ 1010.716297] ? sock_write_iter+0x3d0/0x3d0 [ 1010.716304] ? __ia32_sys_recvmmsg+0x270/0x270 [ 1010.716309] ? lock_acquire+0x1fe/0x560 [ 1010.716315] ? drain_array_locked+0x90/0x90 [ 1010.716324] ___sys_sendmsg+0xf8/0x170 [ 1010.716331] ? sendmsg_copy_msghdr+0x170/0x170 [ 1010.716337] ? lockdep_init_map_type+0x2c7/0x860 [ 1010.716343] ? lockdep_hardirqs_on_prepare+0x430/0x430 [ 1010.716350] ? debug_mutex_init+0x33/0x70 [ 1010.716360] ? percpu_counter_add_batch+0x8b/0x140 [ 1010.716367] ? lock_acquire+0x1fe/0x560 [ 1010.716373] ? find_held_lock+0x2c/0x110 [ 1010.716384] ? __fd_install+0x1b6/0x6f0 [ 1010.716389] ? lock_downgrade+0x810/0x810 [ 1010.716396] ? __fget_light+0x222/0x290 [ 1010.716403] __sys_sendmsg+0xea/0x1b0 [ 1010.716409] ? __sys_sendmsg_sock+0x40/0x40 [ 1010.716419] ? lockdep_hardirqs_on_prepare+0x2b3/0x430 [ 1010.716425] ? syscall_enter_from_user_mode+0x1d/0x60 [ 1010.716432] do_syscall_64+0x30/0x40 [ 1010.716438] entry_SYSCALL_64_after_hwframe+0x62/0xc7 [ 1010.716444] RIP: 0033:0x7fd1508cbd49 [ 1010.716452] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ef 70 0d 00 f7 d8 64 89 01 48 [ 1010.716456] RSP: 002b:00007fff18872348 EFLAGS: 00000202 ORIG_RAX: 000000000000002e [ 1010.716463] RAX: ffffffffffffffda RBX: 000055f72bf0eac0 RCX: 00007fd1508cbd49 [ 1010.716468] RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000006 [ 1010.716473] RBP: 00007fff18872360 R08: 00007fff18872360 R09: 00007fff18872360 [ 1010.716478] R10: 00007fff18872360 R11: 0000000000000202 R12: 000055f72bf0e1b0 [ 1010.716482] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 1010.716491] Modules linked in: gtp(+) udp_tunnel ib_core uinput af_packet rfkill qrtr joydev hid_generic usbhid hid kvm_intel iTCO_wdt intel_pmc_bxt iTCO_vendor_support kvm snd_hda_codec_generic ledtrig_audio irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel snd_hda_intel nls_utf8 snd_intel_dspcfg nls_cp866 psmouse aesni_intel vfat crypto_simd fat cryptd glue_helper snd_hda_codec pcspkr snd_hda_core i2c_i801 snd_hwdep i2c_smbus xhci_pci snd_pcm lpc_ich xhci_pci_renesas xhci_hcd qemu_fw_cfg tiny_power_button button sch_fq_codel vboxvideo drm_vram_helper drm_ttm_helper ttm vboxsf vboxguest snd_seq_midi snd_seq_midi_event snd_seq snd_rawmidi snd_seq_device snd_timer snd soundcore msr fuse efi_pstore dm_mod ip_tables x_tables autofs4 virtio_gpu virtio_dma_buf drm_kms_helper cec rc_core drm virtio_rng virtio_scsi rng_core virtio_balloon virtio_blk virtio_net virtio_console net_failover failover ahci libahci libata evdev scsi_mod input_leds serio_raw virtio_pci intel_agp [ 1010.716674] virtio_ring intel_gtt virtio [last unloaded: gtp] [ 1010.716693] ---[ end trace 04990a4ce61e174b ]--- Cc: stable@vger.kernel.org Signed-off-by: Alexander Ofitserov Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240228114703.465107-1-oficerovas@altlinux.org Signed-off-by: Paolo Abeni commit f8b0127aca8c60826e7354e504a12d4a46b1c3bb Author: Alban Boyé Date: Wed Feb 28 19:28:41 2024 +0000 ASoC: Intel: bytcr_rt5640: Add an extra entry for the Chuwi Vi8 tablet The bios version can differ depending if it is a dual-boot variant of the tablet. Therefore another DMI match is required. Signed-off-by: Alban Boyé Reviewed-by: Cezary Rojewski Acked-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240228192807.15130-1-alban.boye@protonmail.com Signed-off-by: Mark Brown commit 231bf30c107aaf935cdd02b308757d0823ff1414 Author: Stuart Henderson Date: Thu Feb 29 11:46:37 2024 +0000 ASoC: madera: Fix typo in madera_set_fll_clks shift value Fix a typo in the shift value used in madera_set_fll_clks. Fixes: 3863857dd5ca3 ("ASoC: madera: Enable clocks for input pins when used for the FLL") Signed-off-by: Stuart Henderson Link: https://msgid.link/r/20240229114637.352098-1-stuarth@opensource.cirrus.com Signed-off-by: Mark Brown commit 01bb1ae35006e473138c90711bad1a6b614a1823 Author: Nirmoy Das Date: Mon Feb 19 13:50:47 2024 +0100 drm/i915: Check before removing mm notifier Error in mmu_interval_notifier_insert() can leave a NULL notifier.mm pointer. Catch that and return early. Fixes: ed29c2691188 ("drm/i915: Fix userptr so we do not have to worry about obj->mm.lock, v7.") Cc: # v5.13+ [tursulin: Added Fixes and cc stable.] Cc: Andi Shyti Cc: Shawn Lee Signed-off-by: Nirmoy Das Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240219125047.28906-1-nirmoy.das@intel.com Signed-off-by: Tvrtko Ursulin (cherry picked from commit db7bbd13f08774cde0332c705f042e327fe21e73) Signed-off-by: Joonas Lahtinen commit 8188cae3cc3d8018ec97ca9ab8caa3acc69a056d Author: Priyanka Dandamudi Date: Wed Feb 21 15:49:50 2024 +0530 drm/xe/xe_trace: Add move_lacks_source detail to xe_bo_move trace Add move_lacks_source detail to xe_bo_move trace to make it readable that is to check if it is migrate clear or migrate copy. Cc: Thomas Hellström Signed-off-by: Priyanka Dandamudi Reviewed-by: Thomas Hellström Fixes: a09946a9a903 ("drm/xe/xe_bo_move: Enhance xe_bo_move trace") Signed-off-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240221101950.1019312-1-priyanka.dandamudi@intel.com (cherry picked from commit 8034f6b070cc3716e81b1846f8a4ca5339c3f29b) Signed-off-by: Thomas Hellström commit b611b776a9c89a86e57ea6dbf8adfc99c6e8a62e Merge: 51dd4ee037222 6523cf516c55d Author: Paolo Abeni Date: Thu Feb 29 12:16:07 2024 +0100 Merge tag 'nf-24-02-29' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net Patch #1 restores NFPROTO_INET with nft_compat, from Ignat Korchagin. Patch #2 fixes an issue with bridge netfilter and broadcast/multicast packets. There is a day 0 bug in br_netfilter when used with connection tracking. Conntrack assumes that an nf_conn structure that is not yet added to hash table ("unconfirmed"), is only visible by the current cpu that is processing the sk_buff. For bridge this isn't true, sk_buff can get cloned in between, and clones can be processed in parallel on different cpu. This patch disables NAT and conntrack helpers for multicast packets. Patch #3 adds a selftest to cover for the br_netfilter bug. netfilter pull request 24-02-29 * tag 'nf-24-02-29' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: selftests: netfilter: add bridge conntrack + multicast test case netfilter: bridge: confirm multicast packets before passing them up the stack netfilter: nf_tables: allow NFPROTO_INET in nft_(match/target)_validate() ==================== Link: https://lore.kernel.org/r/20240229000135.8780-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 51dd4ee0372228ffb0f7709fa7aa0678d4199d06 Author: Lukasz Majewski Date: Wed Feb 28 09:56:44 2024 +0100 net: hsr: Use correct offset for HSR TLV values in supervisory HSR frames Current HSR implementation uses following supervisory frame (even for HSRv1 the HSR tag is not is not present): 00000000: 01 15 4e 00 01 2d XX YY ZZ 94 77 10 88 fb 00 01 00000010: 7e 1c 17 06 XX YY ZZ 94 77 10 1e 06 XX YY ZZ 94 00000020: 77 10 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 The current code adds extra two bytes (i.e. sizeof(struct hsr_sup_tlv)) when offset for skb_pull() is calculated. This is wrong, as both 'struct hsrv1_ethhdr_sp' and 'hsrv0_ethhdr_sp' already have 'struct hsr_sup_tag' defined in them, so there is no need for adding extra two bytes. This code was working correctly as with no RedBox support, the check for HSR_TLV_EOT (0x00) was off by two bytes, which were corresponding to zeroed padded bytes for minimal packet size. Fixes: eafaa88b3eb7 ("net: hsr: Add support for redbox supervision frames") Signed-off-by: Lukasz Majewski Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240228085644.3618044-1-lukma@denx.de Signed-off-by: Paolo Abeni commit 785f4cc0689f32ab615f043d7889d17eb4f37061 Author: Mika Kuoppala Date: Thu Feb 15 20:11:52 2024 +0200 drm/xe: Deny unbinds if uapi ufence pending If user fence was provided for MAP in vm_bind_ioctl and it has still not been signalled, deny UNMAP of said vma with EBUSY as long as unsignalled fence exists. This guarantees that MAP vs UNMAP sequences won't escape under the radar if we ever want to track the client's state wrt to completed and accessible MAPs. By means of intercepting the ufence release signalling. v2: find ufence with num_fences > 1 (Matt) v3: careful on clearing vma ufence (Matt) Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1159 Cc: Thomas Hellström Cc: Matthew Brost Cc: Joonas Lahtinen Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Brost Signed-off-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240215181152.450082-3-mika.kuoppala@linux.intel.com (cherry picked from commit 158900ade92cce5ab85a06d618eb51e6c7ffb28a) Signed-off-by: Thomas Hellström commit 86b3cd6d0713b3b1cb4e17dbddd4d4a2bff98d60 Author: Mika Kuoppala Date: Thu Feb 15 20:11:51 2024 +0200 drm/xe: Expose user fence from xe_sync_entry By allowing getting reference to user fence, we can control the lifetime outside of sync entries. This is needed to allow vma to track the associated user fence that was provided with bind ioctl. v2: xe_user_fence can be kept opaque (Jani, Matt) v3: indent fix (Matt) Cc: Thomas Hellström Cc: Matthew Brost Cc: Jani Nikula Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Brost Signed-off-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240215181152.450082-2-mika.kuoppala@linux.intel.com (cherry picked from commit 977e5b82e0901480bc201342d39f855fc0a2ef47) Signed-off-by: Thomas Hellström commit 4ca5c82988e73f51587e2d7564d44f99429c111a Author: Lucas De Marchi Date: Thu Feb 22 06:41:24 2024 -0800 drm/xe: Use pointers in trace events Commit a0df2cc858c3 ("drm/xe/xe_bo_move: Enhance xe_bo_move trace") inadvertently reverted commit 8d038f49c1f3 ("drm/xe: Fix cast on trace variable"), breaking the build on 32bits. As noted by Ville, there's no point in converting the pointers to u64 and add casts everywhere. In fact, it's better to just use %p and let the address be hashed. Convert all the cases in xe_trace.h to use pointers. Cc: Ville Syrjälä Cc: Matt Roper Cc: Priyanka Dandamudi Cc: Oak Zeng Cc: Thomas Hellström Signed-off-by: Lucas De Marchi Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240222144125.2862546-1-lucas.demarchi@intel.com (cherry picked from commit 7a975748d4dc0a524c99a390c6f74b7097ef8cf7) Signed-off-by: Thomas Hellström commit a09946a9a903e809abab9e0fb813dbf5a32084f5 Author: Priyanka Dandamudi Date: Tue Feb 20 10:17:48 2024 +0530 drm/xe/xe_bo_move: Enhance xe_bo_move trace Enhanced xe_bo_move trace to be more readable. It will help to show the migration details. Src and dst details. v2: Modify trace_xe_bo_move(), it takes the integer mem_type rather than a string. Make mem_type_to_name() extern, it will be used by trace.(Thomas) v3: Move mem_type_to_name() to xe_bo.[ch] (Thomas, Matt) v4: Add device details to reduce ambiquity related to vram0/vram1. (Oak) v5: Rename mem_type_to_name to xe_mem_type_to_name. (Thomas) v6: Optimised code to use xe_bo_device(__entry->bo). (Thomas) Cc: Thomas Hellström Cc: Oak Zeng Cc: Kempczynski Zbigniew Cc: Matthew Brost Cc: Brian Welty Signed-off-by: Priyanka Dandamudi Reviewed-by: Oak Zeng Reviewed-by: Thomas Hellström Signed-off-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240220044748.948496-1-priyanka.dandamudi@intel.com (cherry picked from commit a0df2cc858c309a8bc2e87b4274772587aa25e05) Signed-off-by: Thomas Hellström commit 12cb2b21c2d037a4299028fc56ac941185992e5e Author: Arnd Bergmann Date: Mon Feb 26 13:46:37 2024 +0100 drm/xe/mmio: fix build warning for BAR resize on 32-bit clang complains about a nonsensical test on builds with a 32-bit phys_addr_t, which means resizing will always fail: drivers/gpu/drm/xe/xe_mmio.c:109:23: error: result of comparison of constant 4294967296 with expression of type 'resource_size_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] 109 | root_res->start > 0x100000000ull) | ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ Previously, BAR resize was always disallowed on 32-bit kernels, but this apparently changed recently. Since 32-bit machines can in theory support PAE/LPAE for large address spaces, this may end up useful, so change the driver to shut up the warning but still work when phys_addr_t/resource_size_t is 64 bit wide. Fixes: 9a6e6c14bfde ("drm/xe/mmio: Use non-atomic writeq/readq variant for 32b") Signed-off-by: Arnd Bergmann Reviewed-by: Lucas De Marchi Acked-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240226124736.1272949-2-arnd@kernel.org Signed-off-by: Lucas De Marchi (cherry picked from commit f5d3983366c0b88ec388b3407b29c1c0862ee2b8) Signed-off-by: Thomas Hellström commit 14d4d0ad0ab5aa980cf71a82da1297b28b274de1 Author: Paulo Zanoni Date: Wed Feb 14 16:53:53 2024 -0800 drm/xe: get rid of MAX_BINDS Mesa has been issuing a single bind operation per ioctl since xe.ko changed to GPUVA due xe.ko bug #746. If I change Mesa to try again to issue every single bind operation it can in the same ioctl, it hits the MAX_BINDS assertion when running Vulkan conformance tests. Test dEQP-VK.sparse_resources.transfer_queue.3d.rgba32i.1024_128_8 issues 960 bind operations in a single ioctl, it's the most I could find in the conformance suite. I don't see a reason to keep the MAX_BINDS restriction: it doesn't seem to be preventing any specific issue. If the number is too big for the memory allocations, then those will fail. Nothing related to num_binds seems to be using the stack. Let's just get rid of it. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Testcase: dEQP-VK.sparse_resources.transfer_queue.3d.rgba32i.1024_128_8 References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/746 Cc: Matthew Brost Signed-off-by: Paulo Zanoni Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240215005353.1295420-1-paulo.r.zanoni@intel.com (cherry picked from commit ba6bbdc6eaef92998ec7f323c9e1211d344d2556) Signed-off-by: Thomas Hellström commit a41f6b0db58fe3cc2686e4065db48ebf44effa36 Author: Matthew Brost Date: Mon Feb 26 07:55:54 2024 -0800 drm/xe: Use vmalloc for array of bind allocation in bind IOCTL Use vmalloc in effort to allow a user pass in a large number of binds in an IOCTL (mesa use case). Also use array allocations rather open coding the size calculation. v2: Use __GFP_ACCOUNT for allocations (Thomas) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240226155554.103384-1-matthew.brost@intel.com (cherry picked from commit 35ed1d2bfff7b1969e7f99f3641a83ea54f037e2) Signed-off-by: Thomas Hellström commit ccff0b21ebe0cbe3f402edb27b0b1fd22a9d08aa Author: Matthew Brost Date: Thu Feb 22 15:20:21 2024 -0800 drm/xe: Don't support execlists in xe_gt_tlb_invalidation layer The xe_gt_tlb_invalidation layer implements TLB invalidations for a GuC backend. Simply return if in execlists mode. A follow up may properly implement the xe_gt_tlb_invalidation layer for both GuC and execlists. Fixes: a9351846d945 ("drm/xe: Break of TLB invalidation into its own file") Cc: Rodrigo Vivi Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240222232021.3911545-4-matthew.brost@intel.com (cherry picked from commit a9e483dda3efa5b9aae5d9eef94d2c3a878d9bea) Signed-off-by: Thomas Hellström commit dc15bd0aa7b5ba77bb216394b368c6f9aedbf2f4 Author: Matthew Brost Date: Thu Feb 22 15:20:19 2024 -0800 drm/xe: Fix execlist splat Although execlist submission is not supported it should be kept in a basic working state as it can be used for very early hardware bring up. Fix the below splat. WARNING: CPU: 3 PID: 11 at drivers/gpu/drm/xe/xe_execlist.c:217 execlist_run_job+0x1c2/0x220 [xe] Modules linked in: xe drm_kunit_helpers drm_gpuvm drm_ttm_helper ttm drm_exec drm_suballoc_helper drm_buddy gpu_sched mei_pxp mei_hdcp wmi_bmof x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul snd_hda_intel ghash_clmulni_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core video snd_pcm mei_me mei wmi fuse e1000e i2c_i801 ptp i2c_smbus pps_core intel_lpss_pci CPU: 3 PID: 11 Comm: kworker/u16:0 Tainted: G U 6.8.0-rc3-guc+ #1046 Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.3243.A01.2006102133 06/10/2020 Workqueue: rcs0 drm_sched_run_job_work [gpu_sched] RIP: 0010:execlist_run_job+0x1c2/0x220 [xe] Code: 8b f8 03 00 00 4c 89 39 e9 e2 fe ff ff 49 8d 7d 20 be ff ff ff ff e8 ed fd a6 e1 85 c0 0f 85 e1 fe ff ff 0f 0b e9 da fe ff ff <0f> 0b 0f 0b 41 83 fc 03 0f 86 8a fe ff ff 0f 0b e9 83 fe ff ff be RSP: 0018:ffffc9000013bdb8 EFLAGS: 00010246 RAX: ffff888105021a00 RBX: ffff888105078400 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffc9000013bd14 RDI: ffffc90001609090 RBP: ffff88811e3f0040 R08: 0000000000000088 R09: 00000000ffffff81 R10: 0000000000000001 R11: ffff88810c10c000 R12: 00000000fffffffe R13: ffff888109b72c28 R14: ffff8881050784a0 R15: ffff888105078408 FS: 0000000000000000(0000) GS:ffff88849f980000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000563459d130f8 CR3: 000000000563a001 CR4: 0000000000f70ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? __warn+0x7f/0x170 ? execlist_run_job+0x1c2/0x220 [xe] ? report_bug+0x1c7/0x1d0 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x18/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? execlist_run_job+0x1c2/0x220 [xe] ? execlist_run_job+0x2c/0x220 [xe] drm_sched_run_job_work+0x246/0x3f0 [gpu_sched] ? process_one_work+0x18d/0x4e0 process_one_work+0x1f7/0x4e0 worker_thread+0x1da/0x3e0 ? __pfx_worker_thread+0x10/0x10 kthread+0xfe/0x130 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2c/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 Fixes: 9b9529ce379a ("drm/xe: Rename engine to exec_queue") Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240222232021.3911545-2-matthew.brost@intel.com (cherry picked from commit ddadc7120d4be7a40a9745924339c472c5850d14) Signed-off-by: Thomas Hellström commit eaa367a0317ea4cbc7aa60f25829c89c0e12717b Author: Francois Dugast Date: Thu Feb 22 18:23:56 2024 -0500 drm/xe/uapi: Remove unused flags Those cases missed in previous uAPI cleanups were mostly accidentally brought in from i915 or created to exercise the possibilities of gpuvm but they are not used by userspace yet, so let's remove them. They can still be brought back later if needed. v2: - Fix XE_VM_FLAG_FAULT_MODE support in xe_lrc.c (Brian Welty) - Leave DRM_XE_VM_BIND_OP_UNMAP_ALL (José Roberto de Souza) - Ensure invalid flag values are rejected (Rodrigo Vivi) v3: Rebase after removal of persistent exec_queues (Francois Dugast) v4: Rodrigo: Rebase after the new dumpable flag. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Thomas Hellström Cc: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240222232356.175431-1-rodrigo.vivi@intel.com (cherry picked from commit 84a1ed5e67565b09b8fd22a26754d2897de55ce0) Signed-off-by: Thomas Hellström commit b6f4fb397db09024c189834d638abbd21bf00769 Author: José Roberto de Souza Date: Tue Dec 26 08:11:14 2023 -0800 drm/xe/uapi: Remove DRM_XE_VM_BIND_FLAG_ASYNC comment left over This is a comment left over of commit d3d767396a02 ("drm/xe/uapi: Remove sync binds"). Fixes: d3d767396a02 ("drm/xe/uapi: Remove sync binds") Reviewed-by: Rodrigo Vivi Cc: Matthew Brost Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20231226172321.61518-1-jose.souza@intel.com (cherry picked from commit f031c3a7af8ea06790dd0a71872c4f0175084baa) Signed-off-by: Thomas Hellström commit 7e10d87e63f7f9c324d533bb4369e35bb19ab9a9 Author: Maarten Lankhorst Date: Wed Feb 21 14:30:18 2024 +0100 drm/xe: Add uapi for dumpable bos Add the flag XE_VM_BIND_FLAG_DUMPABLE to notify devcoredump that this mapping should be dumped. This is not hooked up, but the uapi should be ready before merging. It's likely easier to dump the contents of the bo's at devcoredump readout time, so it's better if the bos will stay unmodified after a hang. The NEEDS_CPU_MAPPING flag is removed as requirement. Signed-off-by: Maarten Lankhorst Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240221133024.898315-3-maarten.lankhorst@linux.intel.com (cherry picked from commit 76a86b58d2b3de31e88acb487ebfa0c3cc7c41d2) Signed-off-by: Thomas Hellström commit 17c6a0c986fbea2c09010c39ef4b44334f06e390 Merge: b34bf65838f7c ed00a6945dc32 Author: Takashi Iwai Date: Thu Feb 29 08:29:04 2024 +0100 Merge tag 'asoc-fix-v6.8-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.8 A few small fixes, some driver specific and one slightly larger one from Richard which adds a new core helper and updates a small clutch of drivers to deal with the fact that they were using a helper which requires that the lock for the list of controls without holding that lock. We also have some quirks for new AMD based Lenovo systems. commit 0bb7b09392eb74b152719ae87b1ba5e4bf910ef0 Author: Oleksij Rempel Date: Tue Feb 27 10:49:41 2024 -0800 igb: extend PTP timestamp adjustments to i211 The i211 requires the same PTP timestamp adjustments as the i210, according to its datasheet. To ensure consistent timestamping across different platforms, this change extends the existing adjustments to include the i211. The adjustment result are tested and comparable for i210 and i211 based systems. Fixes: 3f544d2a4d5c ("igb: adjust PTP timestamps for Tx/Rx latency") Signed-off-by: Oleksij Rempel Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20240227184942.362710-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 743ad091fb46e622f1b690385bb15e3cd3daf874 Author: Lin Ma Date: Tue Feb 27 20:11:28 2024 +0800 rtnetlink: fix error logic of IFLA_BRIDGE_FLAGS writing back In the commit d73ef2d69c0d ("rtnetlink: let rtnl_bridge_setlink checks IFLA_BRIDGE_MODE length"), an adjustment was made to the old loop logic in the function `rtnl_bridge_setlink` to enable the loop to also check the length of the IFLA_BRIDGE_MODE attribute. However, this adjustment removed the `break` statement and led to an error logic of the flags writing back at the end of this function. if (have_flags) memcpy(nla_data(attr), &flags, sizeof(flags)); // attr should point to IFLA_BRIDGE_FLAGS NLA !!! Before the mentioned commit, the `attr` is granted to be IFLA_BRIDGE_FLAGS. However, this is not necessarily true fow now as the updated loop will let the attr point to the last NLA, even an invalid NLA which could cause overflow writes. This patch introduces a new variable `br_flag` to save the NLA pointer that points to IFLA_BRIDGE_FLAGS and uses it to resolve the mentioned error logic. Fixes: d73ef2d69c0d ("rtnetlink: let rtnl_bridge_setlink checks IFLA_BRIDGE_MODE length") Signed-off-by: Lin Ma Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20240227121128.608110-1-linma@zju.edu.cn Signed-off-by: Jakub Kicinski commit b6c65eb20ffa8e3bd89f551427dbeee2876d72ca Author: Jakub Kicinski Date: Mon Feb 26 13:40:18 2024 -0800 tools: ynl: fix handling of multiple mcast groups We never increment the group number iterator, so all groups get recorded into index 0 of the mcast_groups[] array. As a result YNL can only handle using the last group. For example using the "netdev" sample on kernel with page pool commands results in: $ ./samples/netdev YNL: Multicast group 'mgmt' not found Most families have only one multicast group, so this hasn't been noticed. Plus perhaps developers usually test the last group which would have worked. Fixes: 86878f14d71a ("tools: ynl: user space helpers") Reviewed-by: Donald Hunter Acked-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20240226214019.1255242-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 6523cf516c55db164f8f73306027b1caebb5628e Author: Florian Westphal Date: Mon Feb 26 15:21:48 2024 +0100 selftests: netfilter: add bridge conntrack + multicast test case Add test case for multicast packet confirm race. Without preceding patch, this should result in: WARNING: CPU: 0 PID: 38 at net/netfilter/nf_conntrack_core.c:1198 __nf_conntrack_confirm+0x3ed/0x5f0 Workqueue: events_unbound macvlan_process_broadcast RIP: 0010:__nf_conntrack_confirm+0x3ed/0x5f0 ? __nf_conntrack_confirm+0x3ed/0x5f0 nf_confirm+0x2ad/0x2d0 nf_hook_slow+0x36/0xd0 ip_local_deliver+0xce/0x110 __netif_receive_skb_one_core+0x4f/0x70 process_backlog+0x8c/0x130 [..] Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 62e7151ae3eb465e0ab52a20c941ff33bb6332e9 Author: Florian Westphal Date: Tue Feb 27 16:17:51 2024 +0100 netfilter: bridge: confirm multicast packets before passing them up the stack conntrack nf_confirm logic cannot handle cloned skbs referencing the same nf_conn entry, which will happen for multicast (broadcast) frames on bridges. Example: macvlan0 | br0 / \ ethX ethY ethX (or Y) receives a L2 multicast or broadcast packet containing an IP packet, flow is not yet in conntrack table. 1. skb passes through bridge and fake-ip (br_netfilter)Prerouting. -> skb->_nfct now references a unconfirmed entry 2. skb is broad/mcast packet. bridge now passes clones out on each bridge interface. 3. skb gets passed up the stack. 4. In macvlan case, macvlan driver retains clone(s) of the mcast skb and schedules a work queue to send them out on the lower devices. The clone skb->_nfct is not a copy, it is the same entry as the original skb. The macvlan rx handler then returns RX_HANDLER_PASS. 5. Normal conntrack hooks (in NF_INET_LOCAL_IN) confirm the orig skb. The Macvlan broadcast worker and normal confirm path will race. This race will not happen if step 2 already confirmed a clone. In that case later steps perform skb_clone() with skb->_nfct already confirmed (in hash table). This works fine. But such confirmation won't happen when eb/ip/nftables rules dropped the packets before they reached the nf_confirm step in postrouting. Pablo points out that nf_conntrack_bridge doesn't allow use of stateful nat, so we can safely discard the nf_conn entry and let inet call conntrack again. This doesn't work for bridge netfilter: skb could have a nat transformation. Also bridge nf prevents re-invocation of inet prerouting via 'sabotage_in' hook. Work around this problem by explicit confirmation of the entry at LOCAL_IN time, before upper layer has a chance to clone the unconfirmed entry. The downside is that this disables NAT and conntrack helpers. Alternative fix would be to add locking to all code parts that deal with unconfirmed packets, but even if that could be done in a sane way this opens up other problems, for example: -m physdev --physdev-out eth0 -j SNAT --snat-to 1.2.3.4 -m physdev --physdev-out eth1 -j SNAT --snat-to 1.2.3.5 For multicast case, only one of such conflicting mappings will be created, conntrack only handles 1:1 NAT mappings. Users should set create a setup that explicitly marks such traffic NOTRACK (conntrack bypass) to avoid this, but we cannot auto-bypass them, ruleset might have accept rules for untracked traffic already, so user-visible behaviour would change. Suggested-by: Pablo Neira Ayuso Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217777 Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 7e0f122c65912740327e4c54472acaa5f85868cb Author: Ignat Korchagin Date: Thu Feb 22 10:33:08 2024 +0000 netfilter: nf_tables: allow NFPROTO_INET in nft_(match/target)_validate() Commit d0009effa886 ("netfilter: nf_tables: validate NFPROTO_* family") added some validation of NFPROTO_* families in the nft_compat module, but it broke the ability to use legacy iptables modules in dual-stack nftables. While with legacy iptables one had to independently manage IPv4 and IPv6 tables, with nftables it is possible to have dual-stack tables sharing the rules. Moreover, it was possible to use rules based on legacy iptables match/target modules in dual-stack nftables. As an example, the program from [2] creates an INET dual-stack family table using an xt_bpf based rule, which looks like the following (the actual output was generated with a patched nft tool as the current nft tool does not parse dual stack tables with legacy match rules, so consider it for illustrative purposes only): table inet testfw { chain input { type filter hook prerouting priority filter; policy accept; bytecode counter packets 0 bytes 0 accept } } After d0009effa886 ("netfilter: nf_tables: validate NFPROTO_* family") we get EOPNOTSUPP for the above program. Fix this by allowing NFPROTO_INET for nft_(match/target)_validate(), but also restrict the functions to classic iptables hooks. Changes in v3: * clarify that upstream nft will not display such configuration properly and that the output was generated with a patched nft tool * remove example program from commit description and link to it instead * no code changes otherwise Changes in v2: * restrict nft_(match/target)_validate() to classic iptables hooks * rewrite example program to use unmodified libnftnl Fixes: d0009effa886 ("netfilter: nf_tables: validate NFPROTO_* family") Link: https://lore.kernel.org/all/Zc1PfoWN38UuFJRI@calendula/T/#mc947262582c90fec044c7a3398cc92fac7afea72 [1] Link: https://lore.kernel.org/all/20240220145509.53357-1-ignat@cloudflare.com/ [2] Reported-by: Jordan Griege Signed-off-by: Ignat Korchagin Signed-off-by: Pablo Neira Ayuso commit b7cdccc6a849568775f738b1e233f751a8fed013 Author: Ryan Lin Date: Wed Feb 28 11:39:21 2024 -0700 drm/amd/display: Add monitor patch for specific eDP [WHY] Some eDP panels' ext caps don't write initial values. The value of dpcd_addr (0x317) can be random and the backlight control interface will be incorrect. [HOW] Add new panel patches to remove sink ext caps. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org # 6.5.x Cc: Tsung-hua Lin Cc: Chris Chi Reviewed-by: Wayne Lin Acked-by: Alex Hung Signed-off-by: Ryan Lin Signed-off-by: Alex Deucher commit 805d849d7c3cc1f38efefd48b2480d62b7b5dcb7 Merge: 022d0c6e03171 e0359f1551b8d Author: Linus Torvalds Date: Wed Feb 28 12:20:00 2024 -0800 Merge tag 'acpi-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Revert a recent EC driver change that introduced an unexpected and undesirable user-visible difference in behavior (Rafael Wysocki)" * tag 'acpi-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPI: EC: Use a spin lock without disabing interrupts" commit 022d0c6e03171afef24a80f1dc8bb4edb7b64417 Merge: 5cf7ebef02e43 f0a0fc10abb06 Author: Linus Torvalds Date: Wed Feb 28 12:18:31 2024 -0800 Merge tag 'pm-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix a latent bug in the intel-pstate cpufreq driver that has been exposed by the recent schedutil governor changes (Doug Smythies)" * tag 'pm-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: fix pstate limits enforcement for adjust_perf call back commit 5cf7ebef02e434c75bf8dc72e89dfc50c5bb41b0 Merge: 628e0594fd00f 6415c7fe7cf42 Author: Linus Torvalds Date: Wed Feb 28 11:16:19 2024 -0800 Merge tag 'spi-fix-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "There's two things here - the big one is a batch of fixes for the power management in the Cadence QuadSPI driver which had some serious issues with runtime PM and there's also a revert of one of the last batch of fixes for ppc4xx which has a dependency on -next but was in between two mainline fixes so the -next dependency got missed. The ppc4xx driver is not currently included in any defconfig and has dependencies that exclude it from allmodconfigs so none of the CI systems catch issues with it, hence the need for the earlier fixes series. There's some updates to the PowerPC configs to address this" * tag 'spi-fix-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: Drop mismerged fix spi: cadence-qspi: add system-wide suspend and resume callbacks spi: cadence-qspi: put runtime in runtime PM hooks names spi: cadence-qspi: remove system-wide suspend helper calls from runtime PM hooks spi: cadence-qspi: fix pointer reference in runtime PM hooks commit 628e0594fd00f40b3d24b04174e0cf73cdabd33e Merge: e326df53af002 e5d40e9afd84c Author: Linus Torvalds Date: Wed Feb 28 11:10:27 2024 -0800 Merge tag 'regulator-fix-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Two small fixes, one small update for the max5970 driver bringing the driver and DT binding documentation into sync plus a missed update to the patterns in MAINTAINERS after a DT binding YAML conversion" * tag 'regulator-fix-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: max5970: Fix regulator child node name MAINTAINERS: repair entry for MICROCHIP MCP16502 PMIC DRIVER commit 66f40b926dd249f74334a22162c09e7ec1ec5b07 Author: Waiman Long Date: Tue Feb 27 19:58:01 2024 -0500 cgroup/cpuset: Fix a memory leak in update_exclusive_cpumask() Fix a possible memory leak in update_exclusive_cpumask() by moving the alloc_cpumasks() down after the validate_change() check which can fail and still before the temporary cpumasks are needed. Fixes: e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for v2") Reported-and-tested-by: Mirsad Todorovac Closes: https://lore.kernel.org/lkml/14915689-27a3-4cd8-80d2-9c30d0c768b6@alu.unizg.hr Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # v6.7+ commit e326df53af0021f48a481ce9d489efda636c2dc6 Merge: cf1182944c7cc 1c0cf6d196901 Author: Linus Torvalds Date: Wed Feb 28 09:30:26 2024 -0800 Merge tag 'v6.8-p5' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes a regression in lskcipher and an out-of-bound access in arm64/neonbs" * tag 'v6.8-p5' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: arm64/neonbs - fix out-of-bounds access on short input crypto: lskcipher - Copy IV in lskcipher glue code always commit 2a93c6cbd5a703d44c414a3c3945a87ce11430ba Author: Bjorn Andersson Date: Mon Feb 26 17:49:57 2024 -0800 pmdomain: qcom: rpmhpd: Fix enabled_corner aggregation Commit 'e3e56c050ab6 ("soc: qcom: rpmhpd: Make power_on actually enable the domain")' aimed to make sure that a power-domain that is being enabled without any particular performance-state requested will at least turn the rail on, to avoid filling DeviceTree with otherwise unnecessary required-opps properties. But in the event that aggregation happens on a disabled power-domain, with an enabled peer without performance-state, both the local and peer corner are 0. The peer's enabled_corner is not considered, with the result that the underlying (shared) resource is disabled. One case where this can be observed is when the display stack keeps mmcx enabled (but without a particular performance-state vote) in order to access registers and sync_state happens in the rpmhpd driver. As mmcx_ao is flushed the state of the peer (mmcx) is not considered and mmcx_ao ends up turning off "mmcx.lvl" underneath mmcx. This has been observed several times, but has been painted over in DeviceTree by adding an explicit vote for the lowest non-disabled performance-state. Fixes: e3e56c050ab6 ("soc: qcom: rpmhpd: Make power_on actually enable the domain") Reported-by: Johan Hovold Closes: https://lore.kernel.org/linux-arm-msm/ZdMwZa98L23mu3u6@hovoldconsulting.com/ Cc: Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Tested-by: Johan Hovold Link: https://lore.kernel.org/r/20240226-rpmhpd-enable-corner-fix-v1-1-68c004cec48c@quicinc.com Signed-off-by: Ulf Hansson commit 6abf9dd26bb1699c17d601b9a292577d01827c0e Author: Zijun Hu Date: Fri Jan 26 17:00:24 2024 +0800 Bluetooth: qca: Fix triggering coredump implementation hci_coredump_qca() uses __hci_cmd_sync() to send a vendor-specific command to trigger firmware coredump, but the command does not have any event as its sync response, so it is not suitable to use __hci_cmd_sync(), fixed by using __hci_cmd_send(). Fixes: 06d3fdfcdf5c ("Bluetooth: hci_qca: Add qcom devcoredump support") Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz commit 7dcd3e014aa7faeeaf4047190b22d8a19a0db696 Author: Janaki Ramaiah Thota Date: Wed Jan 24 20:00:42 2024 +0530 Bluetooth: hci_qca: Set BDA quirk bit if fwnode exists in DT BT adapter going into UNCONFIGURED state during BT turn ON when devicetree has no local-bd-address node. Bluetooth will not work out of the box on such devices, to avoid this problem, added check to set HCI_QUIRK_USE_BDADDR_PROPERTY based on local-bd-address node entry. When this quirk is not set, the public Bluetooth address read by host from controller though HCI Read BD Address command is considered as valid. Fixes: e668eb1e1578 ("Bluetooth: hci_core: Don't stop BT if the BD address missing in dts") Signed-off-by: Janaki Ramaiah Thota Signed-off-by: Luiz Augusto von Dentz commit c0dbc56077ae759f2dd602c7561480bc2b1b712c Author: Zijun Hu Date: Fri Jan 19 17:45:30 2024 +0800 Bluetooth: qca: Fix wrong event type for patch config command Vendor-specific command patch config has HCI_Command_Complete event as response, but qca_send_patch_config_cmd() wrongly expects vendor-specific event for the command, fixed by using right event type. Btmon log for the vendor-specific command are shown below: < HCI Command: Vendor (0x3f|0x0000) plen 5 28 01 00 00 00 > HCI Event: Command Complete (0x0e) plen 5 Vendor (0x3f|0x0000) ncmd 1 Status: Success (0x00) 28 Fixes: 4fac8a7ac80b ("Bluetooth: btqca: sequential validation") Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz commit e4b019515f950b4e6e5b74b2e1bb03a90cb33039 Author: Kai-Heng Feng Date: Thu Jan 25 14:50:28 2024 +0800 Bluetooth: Enforce validation on max value of connection interval Right now Linux BT stack cannot pass test case "GAP/CONN/CPUP/BV-05-C 'Connection Parameter Update Procedure Invalid Parameters Central Responder'" in Bluetooth Test Suite revision GAP.TS.p44. [0] That was revoled by commit c49a8682fc5d ("Bluetooth: validate BLE connection interval updates"), but later got reverted due to devices like keyboards and mice may require low connection interval. So only validate the max value connection interval to pass the Test Suite, and let devices to request low connection interval if needed. [0] https://www.bluetooth.org/docman/handlers/DownloadDoc.ashx?doc_id=229869 Fixes: 68d19d7d9957 ("Revert "Bluetooth: validate BLE connection interval updates"") Signed-off-by: Kai-Heng Feng Signed-off-by: Luiz Augusto von Dentz commit 7e74aa53a68bf60f6019bd5d9a9a1406ec4d4865 Author: Luiz Augusto von Dentz Date: Mon Jan 22 09:02:47 2024 -0500 Bluetooth: hci_event: Fix handling of HCI_EV_IO_CAPA_REQUEST If we received HCI_EV_IO_CAPA_REQUEST while HCI_OP_READ_REMOTE_EXT_FEATURES is yet to be responded assume the remote does support SSP since otherwise this event shouldn't be generated. Link: https://lore.kernel.org/linux-bluetooth/CABBYNZ+9UdG1cMZVmdtN3U2aS16AKMCyTARZZyFX7xTEDWcMOw@mail.gmail.com/T/#t Fixes: c7f59461f5a7 ("Bluetooth: Fix a refcnt underflow problem for hci_conn") Signed-off-by: Luiz Augusto von Dentz commit 0bd1fb586235224048c726922db048d1bce6354a Author: Frédéric Danis Date: Mon Jan 22 17:59:55 2024 +0100 Bluetooth: mgmt: Fix limited discoverable off timeout LIMITED_DISCOVERABLE flag is not reset from Class of Device and advertisement on limited discoverable timeout. This prevents to pass PTS test GAP/DISC/LIMM/BV-02-C Calling set_discoverable_sync as when the limited discovery is set correctly update the Class of Device and advertisement. Signed-off-by: Frédéric Danis Signed-off-by: Luiz Augusto von Dentz commit 61a5ab72edea7ebc3ad2c6beea29d966f528ebfb Author: Zijun Hu Date: Tue Jan 9 19:03:23 2024 +0800 Bluetooth: hci_event: Fix wrongly recorded wakeup BD_ADDR hci_store_wake_reason() wrongly parses event HCI_Connection_Request as HCI_Connection_Complete and HCI_Connection_Complete as HCI_Connection_Request, so causes recording wakeup BD_ADDR error and potential stability issue, fix it by using the correct field. Fixes: 2f20216c1d6f ("Bluetooth: Emit controller suspend and resume events") Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz commit 2535b848fa0f42ddff3e5255cf5e742c9b77bb26 Author: Yuxuan Hu <20373622@buaa.edu.cn> Date: Wed Jan 3 17:10:43 2024 +0800 Bluetooth: rfcomm: Fix null-ptr-deref in rfcomm_check_security During our fuzz testing of the connection and disconnection process at the RFCOMM layer, we discovered this bug. By comparing the packets from a normal connection and disconnection process with the testcase that triggered a KASAN report. We analyzed the cause of this bug as follows: 1. In the packets captured during a normal connection, the host sends a `Read Encryption Key Size` type of `HCI_CMD` packet (Command Opcode: 0x1408) to the controller to inquire the length of encryption key.After receiving this packet, the controller immediately replies with a Command Completepacket (Event Code: 0x0e) to return the Encryption Key Size. 2. In our fuzz test case, the timing of the controller's response to this packet was delayed to an unexpected point: after the RFCOMM and L2CAP layers had disconnected but before the HCI layer had disconnected. 3. After receiving the Encryption Key Size Response at the time described in point 2, the host still called the rfcomm_check_security function. However, by this time `struct l2cap_conn *conn = l2cap_pi(sk)->chan->conn;` had already been released, and when the function executed `return hci_conn_security(conn->hcon, d->sec_level, auth_type, d->out);`, specifically when accessing `conn->hcon`, a null-ptr-deref error occurred. To fix this bug, check if `sk->sk_state` is BT_CLOSED before calling rfcomm_recv_frame in rfcomm_process_rx. Signed-off-by: Yuxuan Hu <20373622@buaa.edu.cn> Signed-off-by: Luiz Augusto von Dentz commit e5469adb2a7e930d96813316592302d9f8f1df4e Author: Luiz Augusto von Dentz Date: Fri Jan 5 10:43:26 2024 -0500 Bluetooth: hci_sync: Fix accept_list when attempting to suspend During suspend, only wakeable devices can be in acceptlist, so if the device was previously added it needs to be removed otherwise the device can end up waking up the system prematurely. Fixes: 3b42055388c3 ("Bluetooth: hci_sync: Fix attempting to suspend with unfiltered passive scan") Signed-off-by: Clancy Shang Signed-off-by: Luiz Augusto von Dentz Reviewed-by: Paul Menzel commit 2449007d3f73b2842c9734f45f0aadb522daf592 Author: Ying Hsu Date: Thu Jan 4 11:56:32 2024 +0000 Bluetooth: Avoid potential use-after-free in hci_error_reset While handling the HCI_EV_HARDWARE_ERROR event, if the underlying BT controller is not responding, the GPIO reset mechanism would free the hci_dev and lead to a use-after-free in hci_error_reset. Here's the call trace observed on a ChromeOS device with Intel AX201: queue_work_on+0x3e/0x6c __hci_cmd_sync_sk+0x2ee/0x4c0 [bluetooth ] ? init_wait_entry+0x31/0x31 __hci_cmd_sync+0x16/0x20 [bluetooth ] hci_error_reset+0x4f/0xa4 [bluetooth ] process_one_work+0x1d8/0x33f worker_thread+0x21b/0x373 kthread+0x13a/0x152 ? pr_cont_work+0x54/0x54 ? kthread_blkcg+0x31/0x31 ret_from_fork+0x1f/0x30 This patch holds the reference count on the hci_dev while processing a HCI_EV_HARDWARE_ERROR event to avoid potential crash. Fixes: c7741d16a57c ("Bluetooth: Perform a power cycle when receiving hardware error event") Signed-off-by: Ying Hsu Signed-off-by: Luiz Augusto von Dentz commit 6b3899be24b16ff8ee0cb25f0bd59b01b15ba1d1 Author: Jonas Dreßler Date: Tue Jan 2 19:08:08 2024 +0100 Bluetooth: hci_sync: Check the correct flag before starting a scan There's a very confusing mistake in the code starting a HCI inquiry: We're calling hci_dev_test_flag() to test for HCI_INQUIRY, but hci_dev_test_flag() checks hdev->dev_flags instead of hdev->flags. HCI_INQUIRY is a bit that's set on hdev->flags, not on hdev->dev_flags though. HCI_INQUIRY equals the integer 7, and in hdev->dev_flags, 7 means HCI_BONDABLE, so we were actually checking for HCI_BONDABLE here. The mistake is only present in the synchronous code for starting an inquiry, not in the async one. Also devices are typically bondable while doing an inquiry, so that might be the reason why nobody noticed it so far. Fixes: abfeea476c68 ("Bluetooth: hci_sync: Convert MGMT_OP_START_DISCOVERY") Signed-off-by: Jonas Dreßler Reviewed-by: Simon Horman Signed-off-by: Luiz Augusto von Dentz commit c17d2a7b216e168c3ba62d93482179c01b369ac7 Author: Johan Hovold Date: Wed Dec 27 11:10:03 2023 +0100 Bluetooth: hci_bcm4377: do not mark valid bd_addr as invalid A recent commit restored the original (and still documented) semantics for the HCI_QUIRK_USE_BDADDR_PROPERTY quirk so that the device address is considered invalid unless an address is provided by firmware. This specifically means that this flag must only be set for devices with invalid addresses, but the Broadcom BCM4377 driver has so far been setting this flag unconditionally. Fortunately the driver already checks for invalid addresses during setup and sets the HCI_QUIRK_INVALID_BDADDR flag, which can simply be replaced with HCI_QUIRK_USE_BDADDR_PROPERTY to indicate that the default address is invalid but can be overridden by firmware (long term, this should probably just always be allowed). Fixes: 6945795bc81a ("Bluetooth: fix use-bdaddr-property quirk") Cc: stable@vger.kernel.org # 6.5 Reported-by: Felix Zhang Link: https://lore.kernel.org/r/77419ffacc5b4875e920e038332575a2a5bff29f.camel@mrman314.tech/ Signed-off-by: Johan Hovold Reported-by: Felix Zhang Reviewed-by: Neal Gompa Signed-off-by: Luiz Augusto von Dentz commit 664bad6af3cbe01d6804b7264bee674b3e7dae7e Author: Dmitry Baryshkov Date: Wed Feb 28 00:08:08 2024 +0200 Revert "drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes" This reverts commit e467e0bde881 ("drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes"). The commit changed the way how the MSM DP driver communicates HPD-related events to the userspace. The mentioned commit made some of the HPD events being reported earlier. This way userspace starts poking around. It interacts in a bad way with the dp_bridge_detect and the driver's state machine, ending up either with the very long delays during hotplug detection or even inability of the DP driver to report the display as connected. A proper fix will involve redesigning of the HPD handling in the MSM DP driver. It is underway, but it will be intrusive and can not be thought about as a simple fix for the issue. Thus, revert the offending commit. Fixes: e467e0bde881 ("drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes") Link: https://gitlab.freedesktop.org/drm/msm/-/issues/50 Reported-by: Johan Hovold Link: https://lore.kernel.org/r/Zd3YPGmrprxv-N-O@hovoldconsulting.com/ Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Paloma Arellano Tested-by: Johan Hovold Tested-by: Neil Armstrong # on SM8650-HDK Patchwork: https://patchwork.freedesktop.org/patch/580313/ Link: https://lore.kernel.org/r/20240227220808.50146-1-dmitry.baryshkov@linaro.org commit 09e23823ae9a3e2d5d20f2e1efe0d6e48cef9129 Author: Elad Nachman Date: Thu Feb 22 21:17:14 2024 +0200 mmc: sdhci-xenon: add timeout for PHY init complete AC5X spec says PHY init complete bit must be polled until zero. We see cases in which timeout can take longer than the standard calculation on AC5X, which is expected following the spec comment above. According to the spec, we must wait as long as it takes for that bit to toggle on AC5X. Cap that with 100 delay loops so we won't get stuck forever. Fixes: 06c8b667ff5b ("mmc: sdhci-xenon: Add support to PHYs of Marvell Xenon SDHC") Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Signed-off-by: Elad Nachman Link: https://lore.kernel.org/r/20240222191714.1216470-3-enachman@marvell.com Signed-off-by: Ulf Hansson commit 8e9f25a290ae0016353c9ea13314c95fb3207812 Author: Elad Nachman Date: Thu Feb 22 22:09:30 2024 +0200 mmc: sdhci-xenon: fix PHY init clock stability Each time SD/mmc phy is initialized, at times, in some of the attempts, phy fails to completes its initialization which results into timeout error. Per the HW spec, it is a pre-requisite to ensure a stable SD clock before a phy initialization is attempted. Fixes: 06c8b667ff5b ("mmc: sdhci-xenon: Add support to PHYs of Marvell Xenon SDHC") Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Signed-off-by: Elad Nachman Link: https://lore.kernel.org/r/20240222200930.1277665-1-enachman@marvell.com Signed-off-by: Ulf Hansson commit ed00a6945dc32462c2d3744a3518d2316da66fcc Author: Jiawei Wang Date: Wed Feb 28 15:39:14 2024 +0800 ASoC: amd: yc: Fix non-functional mic on Lenovo 21J2 Like many other models, the Lenovo 21J2 (ThinkBook 16 G5+ APO) needs a quirk entry for the internal microphone to function. Signed-off-by: Jiawei Wang Link: https://msgid.link/r/20240228073914.232204-2-me@jwang.link Signed-off-by: Mark Brown commit 316a784839b21b122e1761cdca54677bb19a47fa Author: Jiawei Wang Date: Wed Feb 28 15:39:13 2024 +0800 ASoC: amd: yc: add new YC platform variant (0x63) support The Lenovo 21J2 (ThinkBook 16 G5+ APO) has this new variant, as detected with lspci: 64:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 63) Signed-off-by: Jiawei Wang Link: https://msgid.link/r/20240228073914.232204-1-me@jwang.link Signed-off-by: Mark Brown commit 4adfc94d4aeca1177e1188ba83c20ed581523fe1 Author: Haiyue Wang Date: Tue Feb 27 01:09:16 2024 +0800 Documentations: correct net_cachelines title for struct inet_sock The fast path usage breakdown describes the detail for 'inet_sock', fix the markup title. Signed-off-by: Haiyue Wang Signed-off-by: David S. Miller commit 8af411bbba1f457c33734795f024d0ef26d0963f Author: Jakub Raczynski Date: Mon Feb 26 17:42:32 2024 +0100 stmmac: Clear variable when destroying workqueue Currently when suspending driver and stopping workqueue it is checked whether workqueue is not NULL and if so, it is destroyed. Function destroy_workqueue() does drain queue and does clear variable, but it does not set workqueue variable to NULL. This can cause kernel/module panic if code attempts to clear workqueue that was not initialized. This scenario is possible when resuming suspended driver in stmmac_resume(), because there is no handling for failed stmmac_hw_setup(), which can fail and return if DMA engine has failed to initialize, and workqueue is initialized after DMA engine. Should DMA engine fail to initialize, resume will proceed normally, but interface won't work and TX queue will eventually timeout, causing 'Reset adapter' error. This then does destroy workqueue during reset process. And since workqueue is initialized after DMA engine and can be skipped, it will cause kernel/module panic. To secure against this possible crash, set workqueue variable to NULL when destroying workqueue. Log/backtrace from crash goes as follows: [88.031977]------------[ cut here ]------------ [88.031985]NETDEV WATCHDOG: eth0 (sxgmac): transmit queue 1 timed out [88.032017]WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:477 dev_watchdog+0x390/0x398 [88.032251]---[ end trace e70de432e4d5c2c0 ]--- [88.032282]sxgmac 16d88000.ethernet eth0: Reset adapter. [88.036359]------------[ cut here ]------------ [88.036519]Call trace: [88.036523] flush_workqueue+0x3e4/0x430 [88.036528] drain_workqueue+0xc4/0x160 [88.036533] destroy_workqueue+0x40/0x270 [88.036537] stmmac_fpe_stop_wq+0x4c/0x70 [88.036541] stmmac_release+0x278/0x280 [88.036546] __dev_close_many+0xcc/0x158 [88.036551] dev_close_many+0xbc/0x190 [88.036555] dev_close.part.0+0x70/0xc0 [88.036560] dev_close+0x24/0x30 [88.036564] stmmac_service_task+0x110/0x140 [88.036569] process_one_work+0x1d8/0x4a0 [88.036573] worker_thread+0x54/0x408 [88.036578] kthread+0x164/0x170 [88.036583] ret_from_fork+0x10/0x20 [88.036588]---[ end trace e70de432e4d5c2c1 ]--- [88.036597]Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 Fixes: 5a5586112b929 ("net: stmmac: support FPE link partner hand-shaking procedure") Signed-off-by: Jakub Raczynski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 995161edfdb830fd83a652495324e26e0a4bd694 Author: Lukasz Majewski Date: Mon Feb 26 16:09:54 2024 +0100 net: hsr: Fix typo in the hsr_forward_do() function comment Correct type in the hsr_forward_do() comment. Signed-off-by: Lukasz Majewski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 943d4bd67950685901addfa7b07aa3408ce17e7f Author: Randy Dunlap Date: Sun Feb 25 23:48:20 2024 -0800 net: ethernet: adi: move PHYLIB from vendor to driver symbol In a previous patch I added "select PHYLIB" at the wrong place for the ADIN1110 driver symbol, so move it to its correct place under the ADIN1110 kconfig symbol. Fixes: a9f80df4f514 ("net: ethernet: adi: requires PHYLIB support") Signed-off-by: Randy Dunlap Reported-by: Michal Kubecek Closes: https://lore.kernel.org/lkml/77012b38-4b49-47f4-9a88-d773d52909ad@infradead.org/T/#m8ba397484738711edc0ad607b2c63ca02244e3c3 Cc: Lennart Franzen Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Cc: Nuno Sa Tested-by: Michal Kubecek Signed-off-by: David S. Miller commit 183420038444547c149a0fc5f58e792c2752860c Author: Andrey Skvortsov Date: Tue Feb 27 00:53:57 2024 +0300 crypto: sun8i-ce - Fix use after free in unprepare sun8i_ce_cipher_unprepare should be called before crypto_finalize_skcipher_request, because client callbacks may immediately free memory, that isn't needed anymore. But it will be used by unprepare after free. Before removing prepare/unprepare callbacks it was handled by crypto engine in crypto_finalize_request. Usually that results in a pointer dereference problem during a in crypto selftest. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000030 Mem abort info: ESR = 0x0000000096000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x04: level 0 translation fault Data abort info: ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=000000004716d000 [0000000000000030] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 0000000096000004 [#1] SMP This problem is detected by KASAN as well. ================================================================== BUG: KASAN: slab-use-after-free in sun8i_ce_cipher_do_one+0x6e8/0xf80 [sun8i_ce] Read of size 8 at addr ffff00000dcdc040 by task 1c15000.crypto-/373 Hardware name: Pine64 PinePhone (1.2) (DT) Call trace: dump_backtrace+0x9c/0x128 show_stack+0x20/0x38 dump_stack_lvl+0x48/0x60 print_report+0xf8/0x5d8 kasan_report+0x90/0xd0 __asan_load8+0x9c/0xc0 sun8i_ce_cipher_do_one+0x6e8/0xf80 [sun8i_ce] crypto_pump_work+0x354/0x620 [crypto_engine] kthread_worker_fn+0x244/0x498 kthread+0x168/0x178 ret_from_fork+0x10/0x20 Allocated by task 379: kasan_save_stack+0x3c/0x68 kasan_set_track+0x2c/0x40 kasan_save_alloc_info+0x24/0x38 __kasan_kmalloc+0xd4/0xd8 __kmalloc+0x74/0x1d0 alg_test_skcipher+0x90/0x1f0 alg_test+0x24c/0x830 cryptomgr_test+0x38/0x60 kthread+0x168/0x178 ret_from_fork+0x10/0x20 Freed by task 379: kasan_save_stack+0x3c/0x68 kasan_set_track+0x2c/0x40 kasan_save_free_info+0x38/0x60 __kasan_slab_free+0x100/0x170 slab_free_freelist_hook+0xd4/0x1e8 __kmem_cache_free+0x15c/0x290 kfree+0x74/0x100 kfree_sensitive+0x80/0xb0 alg_test_skcipher+0x12c/0x1f0 alg_test+0x24c/0x830 cryptomgr_test+0x38/0x60 kthread+0x168/0x178 ret_from_fork+0x10/0x20 The buggy address belongs to the object at ffff00000dcdc000 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 64 bytes inside of freed 256-byte region [ffff00000dcdc000, ffff00000dcdc100) Signed-off-by: Andrey Skvortsov Fixes: 4136212ab18e ("crypto: sun8i-ce - Remove prepare/unprepare request") Cc: Signed-off-by: Herbert Xu commit c70703320e557ff30847915e6a7631a9abdda16b Author: Matthew Auld Date: Mon Feb 19 12:18:54 2024 +0000 drm/tests/drm_buddy: add alloc_range_bias test Sanity check range bias with DRM_BUDDY_RANGE_ALLOCATION. v2: - Be consistent with u32 here. Signed-off-by: Matthew Auld Cc: Arunpravin Paneer Selvam Cc: Christian König Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20240219121851.25774-6-matthew.auld@intel.com Signed-off-by: Christian König commit 2986314aa811c8a23aeb292edd30315495d54966 Author: Matthew Auld Date: Mon Feb 19 12:18:53 2024 +0000 drm/buddy: check range allocation matches alignment Likely not a big deal for real users, but for consistency we should respect the min_page_size here. Main issue is that bias allocations turns into normal range allocation if the range and size matches exactly, and in the next patch we want to add some unit tests for this part of the api. Signed-off-by: Matthew Auld Cc: Arunpravin Paneer Selvam Cc: Christian König Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20240219121851.25774-5-matthew.auld@intel.com Signed-off-by: Christian König commit f41900e4a6ef019d64a70394b0e0c3bd048d4ec8 Author: Matthew Auld Date: Mon Feb 19 12:18:52 2024 +0000 drm/buddy: fix range bias There is a corner case here where start/end is after/before the block range we are currently checking. If so we need to be sure that splitting the block will eventually give use the block size we need. To do that we should adjust the block range to account for the start/end, and only continue with the split if the size/alignment will fit the requested size. Not doing so can result in leaving split blocks unmerged when it eventually fails. Fixes: afea229fe102 ("drm: improve drm_buddy_alloc function") Signed-off-by: Matthew Auld Cc: Arunpravin Paneer Selvam Cc: Christian König Cc: # v5.18+ Reviewed-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20240219121851.25774-4-matthew.auld@intel.com Signed-off-by: Christian König commit ed2c0e4cb6938467174faef07fbba75c47cf69b8 Merge: 6a2008641920a 413dafc8170fc Author: Jakub Kicinski Date: Tue Feb 27 19:19:16 2024 -0800 Merge tag 'wireless-2024-02-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.8-rc7 Few remaining fixes, hopefully the last wireless pull request to v6.8. Two fixes to the stack and two to iwlwifi but no high priority fixes this time. * tag 'wireless-2024-02-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mac80211: only call drv_sta_rc_update for uploaded stations MAINTAINERS: wifi: Add N: ath1*k entries to match .yaml files MAINTAINERS: wifi: update Jeff Johnson e-mail address wifi: iwlwifi: mvm: fix the TXF mapping for BZ devices wifi: iwlwifi: mvm: ensure offloading TID queue exists wifi: nl80211: reject iftype change with mesh ID change ==================== Link: https://lore.kernel.org/r/20240227135751.C5EC6C43390@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 6a2008641920a9c6fe1abbeb9acbec463215d505 Author: Justin Iurman Date: Mon Feb 26 13:49:21 2024 +0100 uapi: in6: replace temporary label with rfc9486 Not really a fix per se, but IPV6_TLV_IOAM is still tagged as "TEMPORARY IANA allocation for IOAM", while RFC 9486 is available for some time now. Just update the reference. Fixes: 9ee11f0fff20 ("ipv6: ioam: Data plane support for Pre-allocated Trace") Signed-off-by: Justin Iurman Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240226124921.9097-1-justin.iurman@uliege.be Signed-off-by: Jakub Kicinski commit e3d5d70cb483df8296dd44e9ae3b6355ef86494c Author: Oleksij Rempel Date: Mon Feb 26 12:08:20 2024 +0100 net: lan78xx: fix "softirq work is pending" error Disable BH around the call to napi_schedule() to avoid following error: NOHZ tick-stop error: local softirq work is pending, handler #08!!! Fixes: ec4c7e12396b ("lan78xx: Introduce NAPI polling support") Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20240226110820.2113584-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit f72a1994698ebe1a9eeadba7bfe2aa01afcde0a4 Author: Kurt Kanzenbach Date: Sun Feb 25 12:38:37 2024 +0100 net: stmmac: Complete meta data only when enabled Currently using plain XDP/ZC sockets on stmmac results in a kernel crash: |[ 255.822584] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 |[...] |[ 255.822764] Call trace: |[ 255.822766] stmmac_tx_clean.constprop.0+0x848/0xc38 The program counter indicates xsk_tx_metadata_complete(). It works on compl->tx_timestamp, which is not set by xsk_tx_metadata_to_compl() due to missing meta data. Therefore, call xsk_tx_metadata_complete() only when meta data is actually used. Tested on imx93 without XDP, with XDP and with XDP/ZC. Fixes: 1347b419318d ("net: stmmac: Add Tx HWTS support to XDP ZC") Suggested-by: Serge Semin Tested-by: Serge Semin Link: https://lore.kernel.org/netdev/87r0h7wg8u.fsf@kurt.kurt.home/ Acked-by: Stanislav Fomichev Signed-off-by: Kurt Kanzenbach Link: https://lore.kernel.org/r/20240222-stmmac_xdp-v2-1-4beee3a037e4@linutronix.de Signed-off-by: Jakub Kicinski commit c68b2c9eba38ec3f60f4894b189090febf4d8d22 Author: Javier Carrasco Date: Sun Feb 25 00:20:06 2024 +0100 net: usb: dm9601: fix wrong return value in dm9601_mdio_read The MII code does not check the return value of mdio_read (among others), and therefore no error code should be sent. A previous fix to the use of an uninitialized variable propagates negative error codes, that might lead to wrong operations by the MII library. An example of such issues is the use of mii_nway_restart by the dm9601 driver. The mii_nway_restart function does not check the value returned by mdio_read, which in this case might be a negative number which could contain the exact bit the function checks (BMCR_ANENABLE = 0x1000). Return zero in case of error, as it is common practice in users of mdio_read to avoid wrong uses of the return value. Fixes: 8f8abb863fa5 ("net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read") Signed-off-by: Javier Carrasco Reviewed-by: Simon Horman Reviewed-by: Peter Korsgaard Link: https://lore.kernel.org/r/20240225-dm9601_ret_err-v1-1-02c1d959ea59@gmail.com Signed-off-by: Jakub Kicinski commit cf1182944c7cc9f1c21a8a44e0d29abe12527412 Merge: 5e10bf6cb4cdc 6d2fb472ea9ea Author: Linus Torvalds Date: Tue Feb 27 17:00:10 2024 -0800 Merge tag 'lsm-pr-20240227' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm fixes from Paul Moore: "Two small patches, one for AppArmor and one for SELinux, to fix potential uninitialized variable problems in the new LSM syscalls we added during the v6.8 merge window. We haven't been able to get a response from John on the AppArmor patch, but considering both the importance of the patch and it's rather simple nature it seems like a good idea to get this merged sooner rather than later. I'm sure John is just taking some much needed vacation; if we need to revise this when he gets back to his email we can" * tag 'lsm-pr-20240227' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: apparmor: fix lsm_get_self_attr() selinux: fix lsm_get_self_attr() commit 5e10bf6cb4cdcc0ede9a83a0d986899dff219bc0 Merge: 45ec2f5f6ed3e 720da1e593b85 Author: Linus Torvalds Date: Tue Feb 27 16:44:15 2024 -0800 Merge tag 'mm-hotfixes-stable-2024-02-27-14-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "Six hotfixes. Three are cc:stable and the remainder address post-6.7 issues or aren't considered appropriate for backporting" * tag 'mm-hotfixes-stable-2024-02-27-14-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: mm/debug_vm_pgtable: fix BUG_ON with pud advanced test mm: cachestat: fix folio read-after-free in cache walk MAINTAINERS: add memory mapping entry with reviewers mm/vmscan: fix a bug calling wakeup_kswapd() with a wrong zone index kasan: revert eviction of stack traces in generic mode stackdepot: use variable size records for non-evictable entries commit 325731481cea11f0d5e771f6d9ba78cf13f08407 Merge: d82f32202e0df 682dc133f83e0 Author: Palmer Dabbelt Date: Tue Feb 27 12:55:47 2024 -0800 Merge patch series "drivers: perf: fix crash with the legacy riscv driver" Vadim Shakirov says: This series fix crash with the legacy riscv driver when configs: CONFIG_RISCV_PMU_LEGACY=y and CONFIG_RISCV_PMU_SBI=n and you try to perf record * b4-shazam-lts: drivers: perf: ctr_get_width function for legacy is not defined drivers: perf: added capabilities for legacy PMU Link: https://lore.kernel.org/r/20240227170002.188671-1-vadim.shakirov@syntacore.com Signed-off-by: Palmer Dabbelt commit 682dc133f83e0194796e6ea72eb642df1c03dfbe Author: Vadim Shakirov Date: Tue Feb 27 20:00:02 2024 +0300 drivers: perf: ctr_get_width function for legacy is not defined With parameters CONFIG_RISCV_PMU_LEGACY=y and CONFIG_RISCV_PMU_SBI=n linux kernel crashes when you try perf record: $ perf record ls [ 46.749286] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 46.750199] Oops [#1] [ 46.750342] Modules linked in: [ 46.750608] CPU: 0 PID: 107 Comm: perf-exec Not tainted 6.6.0 #2 [ 46.750906] Hardware name: riscv-virtio,qemu (DT) [ 46.751184] epc : 0x0 [ 46.751430] ra : arch_perf_update_userpage+0x54/0x13e [ 46.751680] epc : 0000000000000000 ra : ffffffff8072ee52 sp : ff2000000022b8f0 [ 46.751958] gp : ffffffff81505988 tp : ff6000000290d400 t0 : ff2000000022b9c0 [ 46.752229] t1 : 0000000000000001 t2 : 0000000000000003 s0 : ff2000000022b930 [ 46.752451] s1 : ff600000028fb000 a0 : 0000000000000000 a1 : ff600000028fb000 [ 46.752673] a2 : 0000000ae2751268 a3 : 00000000004fb708 a4 : 0000000000000004 [ 46.752895] a5 : 0000000000000000 a6 : 000000000017ffe3 a7 : 00000000000000d2 [ 46.753117] s2 : ff600000028fb000 s3 : 0000000ae2751268 s4 : 0000000000000000 [ 46.753338] s5 : ffffffff8153e290 s6 : ff600000863b9000 s7 : ff60000002961078 [ 46.753562] s8 : ff60000002961048 s9 : ff60000002961058 s10: 0000000000000001 [ 46.753783] s11: 0000000000000018 t3 : ffffffffffffffff t4 : ffffffffffffffff [ 46.754005] t5 : ff6000000292270c t6 : ff2000000022bb30 [ 46.754179] status: 0000000200000100 badaddr: 0000000000000000 cause: 000000000000000c [ 46.754653] Code: Unable to access instruction at 0xffffffffffffffec. [ 46.754939] ---[ end trace 0000000000000000 ]--- [ 46.755131] note: perf-exec[107] exited with irqs disabled [ 46.755546] note: perf-exec[107] exited with preempt_count 4 This happens because in the legacy case the ctr_get_width function was not defined, but it is used in arch_perf_update_userpage. Also remove extra check in riscv_pmu_ctr_get_width_mask Signed-off-by: Vadim Shakirov Reviewed-by: Alexandre Ghiti Reviewed-by: Atish Patra Fixes: cc4c07c89aad ("drivers: perf: Implement perf event mmap support in the SBI backend") Link: https://lore.kernel.org/r/20240227170002.188671-3-vadim.shakirov@syntacore.com Signed-off-by: Palmer Dabbelt commit 65730fe8f4fb039683d76fa8ea7e8d18a53c6cc6 Author: Vadim Shakirov Date: Tue Feb 27 20:00:01 2024 +0300 drivers: perf: added capabilities for legacy PMU Added the PERF_PMU_CAP_NO_INTERRUPT flag because the legacy pmu driver does not provide sampling capabilities Added the PERF_PMU_CAP_NO_EXCLUDE flag because the legacy pmu driver does not provide the ability to disable counter incrementation in different privilege modes Suggested-by: Atish Patra Signed-off-by: Vadim Shakirov Reviewed-by: Atish Patra Fixes: 9b3e150e310e ("RISC-V: Add a simple platform driver for RISC-V legacy perf") Link: https://lore.kernel.org/r/20240227170002.188671-2-vadim.shakirov@syntacore.com Signed-off-by: Palmer Dabbelt commit 955558030954b9637b41c97b730f9b38c92ac488 Author: Alex Deucher Date: Wed Aug 9 15:06:00 2023 -0400 Revert "drm/amd/pm: resolve reboot exception for si oland" This reverts commit e490d60a2f76bff636c68ce4fe34c1b6c34bbd86. This causes hangs on SI when DC is enabled and errors on driver reboot and power off cycles. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3216 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2755 Reviewed-by: Yang Wang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c671ec01311b4744b377f98b0b4c6d033fe569b3 Author: Prike Liang Date: Thu Feb 22 20:56:59 2024 +0800 drm/amdgpu: Enable gpu reset for S3 abort cases on Raven series Currently, GPU resets can now be performed successfully on the Raven series. While GPU reset is required for the S3 suspend abort case. So now can enable gpu reset for S3 abort cases on the Raven series. Signed-off-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7968e9748fbbd7ae49770d9f8a8231d8bce2aebb Author: Ma Jun Date: Thu Feb 22 17:08:42 2024 +0800 drm/amdgpu/pm: Fix the power1_min_cap value It's unreasonable to use 0 as the power1_min_cap when OD is disabled. So, use the same lower limit as the value used when OD is enabled. Fixes: 1958946858a6 ("drm/amd/pm: Support for getting power1_cap_min value") Signed-off-by: Ma Jun Acked-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0f8ca019544a252d1afb468ce840c6dcbac73af4 Author: Srinivasan Shanmugam Date: Tue Feb 20 09:14:25 2024 +0530 drm/amd/display: Prevent potential buffer overflow in map_hw_resources Adds a check in the map_hw_resources function to prevent a potential buffer overflow. The function was accessing arrays using an index that could potentially be greater than the size of the arrays, leading to a buffer overflow. Adds a check to ensure that the index is within the bounds of the arrays. If the index is out of bounds, an error message is printed and break it will continue execution with just ignoring extra data early to prevent the buffer overflow. Reported by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_wrapper.c:79 map_hw_resources() error: buffer overflow 'dml2->v20.scratch.dml_to_dc_pipe_mapping.disp_cfg_to_stream_id' 6 <= 7 drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_wrapper.c:81 map_hw_resources() error: buffer overflow 'dml2->v20.scratch.dml_to_dc_pipe_mapping.disp_cfg_to_plane_id' 6 <= 7 Fixes: 7966f319c66d ("drm/amd/display: Introduce DML2") Cc: Rodrigo Siqueira Cc: Roman Li Cc: Qingqing Zhuo Cc: Aurabindo Pillai Cc: Tom Chung Signed-off-by: Srinivasan Shanmugam Suggested-by: Roman Li Reviewed-by: Roman Li Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1ce7d306ea63f3e379557c79abd88052e0483813 Author: Jakub Kicinski Date: Fri Feb 23 15:59:08 2024 -0800 veth: try harder when allocating queue memory struct veth_rq is pretty large, 832B total without debug options enabled. Since commit under Fixes we try to pre-allocate enough queues for every possible CPU. Miao Wang reports that this may lead to order-5 allocations which will fail in production. Let the allocation fallback to vmalloc() and try harder. These are the same flags we pass to netdev queue allocation. Reported-and-tested-by: Miao Wang Fixes: 9d3684c24a52 ("veth: create by default nr_possible_cpus queues") Link: https://lore.kernel.org/all/5F52CAE2-2FB7-4712-95F1-3312FBBFA8DD@gmail.com/ Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240223235908.693010-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 6415c7fe7cf420fa469095a34d9153f991391116 Author: Mark Brown Date: Tue Feb 27 12:52:51 2024 +0000 spi: Drop mismerged fix One patch of a series of three that was sent fixing issues with the ppc4xx driver was targeted at -next, unfortunately it being sandwiched between two others that targeted mainline tripped up my workflow and caused it to get merged along with the others. The ppc4xx driver is only buildable in very limited configurations so none of the CI catches issues with it. Fixes: de4af897ddf2 ("spi: ppc4xx: Fix fallout from rename in struct spi_bitbang") Signed-off-by: Mark Brown commit 237274fa215753bcb5c4d32fe16f386d6b370e52 Merge: 3980cf1655171 155a1efc9b96a Author: Paolo Abeni Date: Tue Feb 27 13:03:34 2024 +0100 Merge branch 'ionic-pci-error-handling-fixes' Shannon Nelson says: ==================== ionic: PCI error handling fixes These are a few things to make our PCI reset handling better. ==================== Link: https://lore.kernel.org/r/20240223222742.13923-1-shannon.nelson@amd.com Signed-off-by: Paolo Abeni commit 155a1efc9b96a39857714aff49a11ebc93022c8c Author: Shannon Nelson Date: Fri Feb 23 14:27:42 2024 -0800 ionic: restore netdev feature bits after reset When rebuilding the lif after an FLR, be sure to restore the current netdev features, not do the usual first time feature init. This prevents losing user changes to things like TSO or vlan tagging states. Fixes: 45b84188a0a4 ("ionic: keep filters across FLR") Reviewed-by: Brett Creeley Signed-off-by: Shannon Nelson Signed-off-by: Paolo Abeni commit 7662fad348ac54120e9e6443cb0bbe4f3b582219 Author: Shannon Nelson Date: Fri Feb 23 14:27:41 2024 -0800 ionic: check cmd_regs before copying in or out Since we now have potential cases of NULL cmd_regs and info_regs during a reset recovery, and left NULL if a reset recovery has failed, we need to check that they exist before we use them. Most of the cases were covered in the original patch where we verify before doing the ioreadb() for health or cmd status. However, we need to protect a few uses of io mem that could be hit in error recovery or asynchronous threads calls as well (e.g. ethtool or devlink handlers). Fixes: 219e183272b4 ("ionic: no fw read when PCI reset failed") Reviewed-by: Brett Creeley Signed-off-by: Shannon Nelson Signed-off-by: Paolo Abeni commit a36b0787f074d7441f66c172745653570e09c320 Author: Shannon Nelson Date: Fri Feb 23 14:27:40 2024 -0800 ionic: check before releasing pci regions AER recovery handler can trigger a PCI Reset after tearing down the device setup in the error detection handler. The PCI Reset handler will also attempt to tear down the device setup, and this second tear down needs to know that it doesn't need to call pci_release_regions() a second time. We can clear num_bars on tear down and use that to decide later if we need to clear the resources. This prevents a harmless but disturbing warning message resource: Trying to free nonexistent resource <0xXXXXXXXXXX-0xXXXXXXXXXX> Fixes: c3a910e1c47a ("ionic: fill out pci error handlers") Reviewed-by: Brett Creeley Signed-off-by: Shannon Nelson Signed-off-by: Paolo Abeni commit 54cbc058d86beca3515c994039b5c0f0a34f53dd Author: Bart Van Assche Date: Thu Feb 15 12:47:39 2024 -0800 fs/aio: Make io_cancel() generate completions again The following patch accidentally removed the code for delivering completions for cancelled reads and writes to user space: "[PATCH 04/33] aio: remove retry-based AIO" (https://lore.kernel.org/all/1363883754-27966-5-git-send-email-koverstreet@google.com/) >From that patch: - if (kiocbIsCancelled(iocb)) { - ret = -EINTR; - aio_complete(iocb, ret, 0); - /* must not access the iocb after this */ - goto out; - } This leads to a leak in user space of a struct iocb. Hence this patch that restores the code that reports to user space that a read or write has been cancelled successfully. Fixes: 41003a7bcfed ("aio: remove retry-based AIO") Cc: Christoph Hellwig Cc: Avi Kivity Cc: Sandeep Dhavale Cc: Jens Axboe Cc: Greg Kroah-Hartman Cc: Kent Overstreet Cc: stable@vger.kernel.org Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240215204739.2677806-3-bvanassche@acm.org Signed-off-by: Christian Brauner commit 5f7a07646655fb4108da527565dcdc80124b14c4 Author: David Howells Date: Fri Feb 23 13:15:02 2024 +0000 afs: Fix endless loop in directory parsing If a directory has a block with only ".__afsXXXX" files in it (from uncompleted silly-rename), these .__afsXXXX files are skipped but without advancing the file position in the dir_context. This leads to afs_dir_iterate() repeating the block again and again. Fix this by making the code that skips the .__afsXXXX file also manually advance the file position. The symptoms are a soft lookup: watchdog: BUG: soft lockup - CPU#3 stuck for 52s! [check:5737] ... RIP: 0010:afs_dir_iterate_block+0x39/0x1fd ... ? watchdog_timer_fn+0x1a6/0x213 ... ? asm_sysvec_apic_timer_interrupt+0x16/0x20 ? afs_dir_iterate_block+0x39/0x1fd afs_dir_iterate+0x10a/0x148 afs_readdir+0x30/0x4a iterate_dir+0x93/0xd3 __do_sys_getdents64+0x6b/0xd4 This is almost certainly the actual fix for: https://bugzilla.kernel.org/show_bug.cgi?id=218496 Fixes: 57e9d49c5452 ("afs: Hide silly-rename files from userspace") Signed-off-by: David Howells Link: https://lore.kernel.org/r/786185.1708694102@warthog.procyon.org.uk Reviewed-by: Marc Dionne cc: Marc Dionne cc: Markus Suvanto cc: linux-afs@lists.infradead.org Signed-off-by: Christian Brauner commit e567857cb41c4c4f5bb33fd0ff3c282c5c3c4577 Author: Suraj Kandpal Date: Mon Feb 26 12:00:48 2024 +0530 drm/i915/hdcp: Extract hdcp structure from correct connector Currently intel_hdcp is not being extracted from primary connector this patch fixes that. Fixes: 524240b231ea ("drm/i915/hdcp: Propagate aux info in DP HDCP functions") Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Signed-off-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20240226063051.1685326-3-suraj.kandpal@intel.com (cherry picked from commit 909fff3e46c08eb6fcbb52e7a49dfb359007ae79) Signed-off-by: Joonas Lahtinen commit b34bf65838f7c6e785f62681605a538b73c2808c Author: Kailang Yang Date: Fri Feb 23 14:54:34 2024 +0800 ALSA: hda/realtek - ALC285 reduce pop noise from Headphone port It had pop noise from Headphone port when system reboot state. If NID 58h Index 0x0 to fill default value, it will reduce pop noise. Signed-off-by: Kailang Yang Link: https://lore.kernel.org/r/7493e207919a4fb3a0599324fd010e3e@realtek.com Signed-off-by: Takashi Iwai commit 27c86d43bcdb97d00359702713bfff6c006f0d90 Author: Shiyang Ruan Date: Fri Sep 15 14:38:54 2023 +0800 xfs: drop experimental warning for FSDAX FSDAX and reflink can work together now, let's drop this warning. Signed-off-by: Shiyang Ruan Reviewed-by: "Darrick J. Wong" Acked-by: Dan Williams Signed-off-by: Chandan Babu R commit 3980cf16551717f81d90402bc2aa3a8dbc8d4bfd Merge: 0d60d8df6f493 b4b51d36bbaa3 Author: Jakub Kicinski Date: Mon Feb 26 18:42:04 2024 -0800 Merge branch 'mptcp-more-misc-fixes-for-v6-8' Matthieu Baerts says: ==================== mptcp: more misc. fixes for v6.8 This series includes 6 types of fixes: - Patch 1 fixes v4 mapped in v6 addresses support for the userspace PM, when asking to delete a subflow. It was done everywhere else, but not there. Patch 2 validates the modification, thanks to a subtest in mptcp_join.sh. These patches can be backported up to v5.19. - Patch 3 is a small fix for a recent bug-fix patch, just to avoid printing an irrelevant warning (pr_warn()) once. It can be backported up to v5.6, alongside the bug-fix that has been introduced in the v6.8-rc5. - Patches 4 to 6 are fixes for bugs found by Paolo while working on TCP_NOTSENT_LOWAT support for MPTCP. These fixes can improve the performances in some cases. Patches can be backported up to v5.6, v5.11 and v6.7 respectively. - Patch 7 makes sure 'ss -M' is available when starting MPTCP Join selftest as it is required for some subtests since v5.18. - Patch 8 fixes a possible double-free on socket dismantle. The issue always existed, but was unnoticed because it was not causing any problem so far. This fix can be backported up to v5.6. - Patch 9 is a fix for a very recent patch causing lockdep warnings in subflow diag. The patch causing the regression -- which fixes another issue present since v5.7 -- should be part of the future v6.8-rc6. Patch 10 validates the modification, thanks to a new subtest in diag.sh. ==================== Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-0-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit b4b51d36bbaa3ddb93b3e1ca3a1ef0aa629d6521 Author: Paolo Abeni Date: Fri Feb 23 17:14:20 2024 +0100 selftests: mptcp: explicitly trigger the listener diag code-path The mptcp diag interface already experienced a few locking bugs that lockdep and appropriate coverage have detected in advance. Let's add a test-case triggering the relevant code path, to prevent similar issues in the future. Be careful to cope with very slow environments. Note that we don't need an explicit timeout on the mptcp_connect subprocess to cope with eventual bug/hang-up as the final cleanup terminating the child processes will take care of that. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-10-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit d6a9608af9a75d13243d217f6ce1e30e57d56ffe Author: Paolo Abeni Date: Fri Feb 23 17:14:19 2024 +0100 mptcp: fix possible deadlock in subflow diag Syzbot and Eric reported a lockdep splat in the subflow diag: WARNING: possible circular locking dependency detected 6.8.0-rc4-syzkaller-00212-g40b9385dd8e6 #0 Not tainted syz-executor.2/24141 is trying to acquire lock: ffff888045870130 (k-sk_lock-AF_INET6){+.+.}-{0:0}, at: tcp_diag_put_ulp net/ipv4/tcp_diag.c:100 [inline] ffff888045870130 (k-sk_lock-AF_INET6){+.+.}-{0:0}, at: tcp_diag_get_aux+0x738/0x830 net/ipv4/tcp_diag.c:137 but task is already holding lock: ffffc9000135e488 (&h->lhash2[i].lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ffffc9000135e488 (&h->lhash2[i].lock){+.+.}-{2:2}, at: inet_diag_dump_icsk+0x39f/0x1f80 net/ipv4/inet_diag.c:1038 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&h->lhash2[i].lock){+.+.}-{2:2}: lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] __inet_hash+0x335/0xbe0 net/ipv4/inet_hashtables.c:743 inet_csk_listen_start+0x23a/0x320 net/ipv4/inet_connection_sock.c:1261 __inet_listen_sk+0x2a2/0x770 net/ipv4/af_inet.c:217 inet_listen+0xa3/0x110 net/ipv4/af_inet.c:239 rds_tcp_listen_init+0x3fd/0x5a0 net/rds/tcp_listen.c:316 rds_tcp_init_net+0x141/0x320 net/rds/tcp.c:577 ops_init+0x352/0x610 net/core/net_namespace.c:136 __register_pernet_operations net/core/net_namespace.c:1214 [inline] register_pernet_operations+0x2cb/0x660 net/core/net_namespace.c:1283 register_pernet_device+0x33/0x80 net/core/net_namespace.c:1370 rds_tcp_init+0x62/0xd0 net/rds/tcp.c:735 do_one_initcall+0x238/0x830 init/main.c:1236 do_initcall_level+0x157/0x210 init/main.c:1298 do_initcalls+0x3f/0x80 init/main.c:1314 kernel_init_freeable+0x42f/0x5d0 init/main.c:1551 kernel_init+0x1d/0x2a0 init/main.c:1441 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 -> #0 (k-sk_lock-AF_INET6){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18ca/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 lock_sock_fast include/net/sock.h:1723 [inline] subflow_get_info+0x166/0xd20 net/mptcp/diag.c:28 tcp_diag_put_ulp net/ipv4/tcp_diag.c:100 [inline] tcp_diag_get_aux+0x738/0x830 net/ipv4/tcp_diag.c:137 inet_sk_diag_fill+0x10ed/0x1e00 net/ipv4/inet_diag.c:345 inet_diag_dump_icsk+0x55b/0x1f80 net/ipv4/inet_diag.c:1061 __inet_diag_dump+0x211/0x3a0 net/ipv4/inet_diag.c:1263 inet_diag_dump_compat+0x1c1/0x2d0 net/ipv4/inet_diag.c:1371 netlink_dump+0x59b/0xc80 net/netlink/af_netlink.c:2264 __netlink_dump_start+0x5df/0x790 net/netlink/af_netlink.c:2370 netlink_dump_start include/linux/netlink.h:338 [inline] inet_diag_rcv_msg_compat+0x209/0x4c0 net/ipv4/inet_diag.c:1405 sock_diag_rcv_msg+0xe7/0x410 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543 sock_diag_rcv+0x2a/0x40 net/core/sock_diag.c:280 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367 netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 As noted by Eric we can break the lock dependency chain avoid dumping any extended info for the mptcp subflow listener: nothing actually useful is presented there. Fixes: b8adb69a7d29 ("mptcp: fix lockless access in subflow ULP diag") Cc: stable@vger.kernel.org Reported-by: Eric Dumazet Closes: https://lore.kernel.org/netdev/CANn89iJ=Oecw6OZDwmSYc9HJKQ_G32uN11L+oUcMu+TOD5Xiaw@mail.gmail.com/ Suggested-by: Eric Dumazet Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-9-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit 10048689def7e40a4405acda16fdc6477d4ecc5c Author: Davide Caratti Date: Fri Feb 23 17:14:18 2024 +0100 mptcp: fix double-free on socket dismantle when MPTCP server accepts an incoming connection, it clones its listener socket. However, the pointer to 'inet_opt' for the new socket has the same value as the original one: as a consequence, on program exit it's possible to observe the following splat: BUG: KASAN: double-free in inet_sock_destruct+0x54f/0x8b0 Free of addr ffff888485950880 by task swapper/25/0 CPU: 25 PID: 0 Comm: swapper/25 Kdump: loaded Not tainted 6.8.0-rc1+ #609 Hardware name: Supermicro SYS-6027R-72RF/X9DRH-7TF/7F/iTF/iF, BIOS 3.0 07/26/2013 Call Trace: dump_stack_lvl+0x32/0x50 print_report+0xca/0x620 kasan_report_invalid_free+0x64/0x90 __kasan_slab_free+0x1aa/0x1f0 kfree+0xed/0x2e0 inet_sock_destruct+0x54f/0x8b0 __sk_destruct+0x48/0x5b0 rcu_do_batch+0x34e/0xd90 rcu_core+0x559/0xac0 __do_softirq+0x183/0x5a4 irq_exit_rcu+0x12d/0x170 sysvec_apic_timer_interrupt+0x6b/0x80 asm_sysvec_apic_timer_interrupt+0x16/0x20 RIP: 0010:cpuidle_enter_state+0x175/0x300 Code: 30 00 0f 84 1f 01 00 00 83 e8 01 83 f8 ff 75 e5 48 83 c4 18 44 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc fb 45 85 ed <0f> 89 60 ff ff ff 48 c1 e5 06 48 c7 43 18 00 00 00 00 48 83 44 2b RSP: 0018:ffff888481cf7d90 EFLAGS: 00000202 RAX: 0000000000000000 RBX: ffff88887facddc8 RCX: 0000000000000000 RDX: 1ffff1110ff588b1 RSI: 0000000000000019 RDI: ffff88887fac4588 RBP: 0000000000000004 R08: 0000000000000002 R09: 0000000000043080 R10: 0009b02ea273363f R11: ffff88887fabf42b R12: ffffffff932592e0 R13: 0000000000000004 R14: 0000000000000000 R15: 00000022c880ec80 cpuidle_enter+0x4a/0xa0 do_idle+0x310/0x410 cpu_startup_entry+0x51/0x60 start_secondary+0x211/0x270 secondary_startup_64_no_verify+0x184/0x18b Allocated by task 6853: kasan_save_stack+0x1c/0x40 kasan_save_track+0x10/0x30 __kasan_kmalloc+0xa6/0xb0 __kmalloc+0x1eb/0x450 cipso_v4_sock_setattr+0x96/0x360 netlbl_sock_setattr+0x132/0x1f0 selinux_netlbl_socket_post_create+0x6c/0x110 selinux_socket_post_create+0x37b/0x7f0 security_socket_post_create+0x63/0xb0 __sock_create+0x305/0x450 __sys_socket_create.part.23+0xbd/0x130 __sys_socket+0x37/0xb0 __x64_sys_socket+0x6f/0xb0 do_syscall_64+0x83/0x160 entry_SYSCALL_64_after_hwframe+0x6e/0x76 Freed by task 6858: kasan_save_stack+0x1c/0x40 kasan_save_track+0x10/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x12c/0x1f0 kfree+0xed/0x2e0 inet_sock_destruct+0x54f/0x8b0 __sk_destruct+0x48/0x5b0 subflow_ulp_release+0x1f0/0x250 tcp_cleanup_ulp+0x6e/0x110 tcp_v4_destroy_sock+0x5a/0x3a0 inet_csk_destroy_sock+0x135/0x390 tcp_fin+0x416/0x5c0 tcp_data_queue+0x1bc8/0x4310 tcp_rcv_state_process+0x15a3/0x47b0 tcp_v4_do_rcv+0x2c1/0x990 tcp_v4_rcv+0x41fb/0x5ed0 ip_protocol_deliver_rcu+0x6d/0x9f0 ip_local_deliver_finish+0x278/0x360 ip_local_deliver+0x182/0x2c0 ip_rcv+0xb5/0x1c0 __netif_receive_skb_one_core+0x16e/0x1b0 process_backlog+0x1e3/0x650 __napi_poll+0xa6/0x500 net_rx_action+0x740/0xbb0 __do_softirq+0x183/0x5a4 The buggy address belongs to the object at ffff888485950880 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff888485950880, ffff8884859508c0) The buggy address belongs to the physical page: page:0000000056d1e95e refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888485950700 pfn:0x485950 flags: 0x57ffffc0000800(slab|node=1|zone=2|lastcpupid=0x1fffff) page_type: 0xffffffff() raw: 0057ffffc0000800 ffff88810004c640 ffffea00121b8ac0 dead000000000006 raw: ffff888485950700 0000000000200019 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888485950780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888485950800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888485950880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888485950900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888485950980: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc Something similar (a refcount underflow) happens with CALIPSO/IPv6. Fix this by duplicating IP / IPv6 options after clone, so that ip{,6}_sock_destruct() doesn't end up freeing the same memory area twice. Fixes: cf7da0d66cc1 ("mptcp: Create SUBFLOW socket for incoming connections") Cc: stable@vger.kernel.org Signed-off-by: Davide Caratti Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-8-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit 9480f388a2ef54fba911d9325372abd69a328601 Author: Geliang Tang Date: Fri Feb 23 17:14:17 2024 +0100 selftests: mptcp: join: add ss mptcp support check Commands 'ss -M' are used in script mptcp_join.sh to display only MPTCP sockets. So it must be checked if ss tool supports MPTCP in this script. Fixes: e274f7154008 ("selftests: mptcp: add subflow limits test-cases") Cc: stable@vger.kernel.org Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-7-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit b111d8fbd2cbc63e05f3adfbbe0d4df655dfcc5b Author: Paolo Abeni Date: Fri Feb 23 17:14:16 2024 +0100 mptcp: fix potential wake-up event loss After the blamed commit below, the send buffer auto-tuning can happen after that the mptcp_propagate_sndbuf() completes - via the delegated action infrastructure. We must check for write space even after such change or we risk missing the wake-up event. Fixes: 8005184fd1ca ("mptcp: refactor sndbuf auto-tuning") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-6-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit adf1bb78dab55e36d4d557aa2fb446ebcfe9e5ce Author: Paolo Abeni Date: Fri Feb 23 17:14:15 2024 +0100 mptcp: fix snd_wnd initialization for passive socket Such value should be inherited from the first subflow, but passive sockets always used 'rsk_rcv_wnd'. Fixes: 6f8a612a33e4 ("mptcp: keep track of advertised windows right edge") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-5-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit b9cd26f640a308ea314ad23532de9a8592cd09d2 Author: Paolo Abeni Date: Fri Feb 23 17:14:14 2024 +0100 mptcp: push at DSS boundaries when inserting not contiguous data in the subflow write queue, the protocol creates a new skb and prevent the TCP stack from merging it later with already queued skbs by setting the EOR marker. Still no push flag is explicitly set at the end of previous GSO packet, making the aggregation on the receiver side sub-optimal - and packetdrill self-tests less predictable. Explicitly mark the end of not contiguous DSS with the push flag. Fixes: 6d0060f600ad ("mptcp: Write MPTCP DSS headers to outgoing data packets") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-4-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit 5b49c41ac8f27aa3a63a1712b1f54f91015c18f2 Author: Matthieu Baerts (NGI0) Date: Fri Feb 23 17:14:13 2024 +0100 mptcp: avoid printing warning once on client side After the 'Fixes' commit mentioned below, the client side might print the following warning once when a subflow is fully established at the reception of any valid additional ack: MPTCP: bogus mpc option on established client sk That's a normal situation, and no warning should be printed for that. We can then skip the check when the label is used. Fixes: e4a0fa47e816 ("mptcp: corner case locking for rx path fields initialization") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-3-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit 7092dbee23282b6fcf1313fc64e2b92649ee16e8 Author: Geliang Tang Date: Fri Feb 23 17:14:12 2024 +0100 selftests: mptcp: rm subflow with v4/v4mapped addr Now both a v4 address and a v4-mapped address are supported when destroying a userspace pm subflow, this patch adds a second subflow to "userspace pm add & remove address" test, and two subflows could be removed two different ways, one with the v4mapped and one with v4. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/387 Fixes: 48d73f609dcc ("selftests: mptcp: update userspace pm addr tests") Cc: stable@vger.kernel.org Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-2-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit 535d620ea5ff1a033dc64ee3d912acadc7470619 Author: Geliang Tang Date: Fri Feb 23 17:14:11 2024 +0100 mptcp: map v4 address to v6 when destroying subflow Address family of server side mismatches with that of client side, like in "userspace pm add & remove address" test: userspace_pm_add_addr $ns1 10.0.2.1 10 userspace_pm_rm_sf $ns1 "::ffff:10.0.2.1" $SUB_ESTABLISHED That's because on the server side, the family is set to AF_INET6 and the v4 address is mapped in a v6 one. This patch fixes this issue. In mptcp_pm_nl_subflow_destroy_doit(), before checking local address family with remote address family, map an IPv4 address to an IPv6 address if the pair is a v4-mapped address. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/387 Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment") Cc: stable@vger.kernel.org Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-1-162e87e48497@kernel.org Signed-off-by: Jakub Kicinski commit 0d60d8df6f493bb46bf5db40d39dd60a1bafdd4e Author: Eric Dumazet Date: Fri Feb 23 12:32:08 2024 +0000 dpll: rely on rcu for netdev_dpll_pin() This fixes a possible UAF in if_nlmsg_size(), which can run without RTNL. Add rcu protection to "struct dpll_pin" Move netdev_dpll_pin() from netdevice.h to dpll.h to decrease name pollution. Note: This looks possible to no longer acquire RTNL in netdev_dpll_pin_assign() later in net-next. v2: do not force rcu_read_lock() in rtnl_dpll_pin_size() (Jiri Pirko) Fixes: 5f1842692880 ("netdev: expose DPLL pin handle for netdevice") Signed-off-by: Eric Dumazet Cc: Arkadiusz Kubalewski Cc: Vadim Fedorenko Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240223123208.3543319-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 0e67899abfbfdea0c3c0ed3fd263ffc601c5c157 Author: Oleksij Rempel Date: Thu Feb 22 13:38:38 2024 +0100 lan78xx: enable auto speed configuration for LAN7850 if no EEPROM is detected Same as LAN7800, LAN7850 can be used without EEPROM. If EEPROM is not present or not flashed, LAN7850 will fail to sync the speed detected by the PHY with the MAC. In case link speed is 100Mbit, it will accidentally work, otherwise no data can be transferred. Better way would be to implement link_up callback, or set auto speed configuration unconditionally. But this changes would be more intrusive. So, for now, set it only if no EEPROM is found. Fixes: e69647a19c87 ("lan78xx: Set ASD in MAC_CR when EEE is enabled.") Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20240222123839.2816561-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit ee0017c3ed8a8abfa4d40e42f908fb38c31e7515 Author: Ranjan Kumar Date: Wed Feb 21 12:47:24 2024 +0530 scsi: mpt3sas: Prevent sending diag_reset when the controller is ready If the driver detects that the controller is not ready before sending the first IOC facts command, it will wait for a maximum of 10 seconds for it to become ready. However, even if the controller becomes ready within 10 seconds, the driver will still issue a diagnostic reset. Modify the driver to avoid sending a diag reset if the controller becomes ready within the 10-second wait time. Signed-off-by: Ranjan Kumar Link: https://lore.kernel.org/r/20240221071724.14986-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen commit 5cc2da0b60e5b4daf6cf7442ee66f1f91878c0b5 Author: Arnd Bergmann Date: Tue Jan 23 14:07:36 2024 +0100 scsi: mpi3mr: Reduce stack usage in mpi3mr_refresh_sas_ports() Doubling the number of PHYs also doubled the stack usage of this function, exceeding the 32-bit limit of 1024 bytes: drivers/scsi/mpi3mr/mpi3mr_transport.c: In function 'mpi3mr_refresh_sas_ports': drivers/scsi/mpi3mr/mpi3mr_transport.c:1818:1: error: the frame size of 1636 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Since the sas_io_unit_pg0 structure is already allocated dynamically, use the same method here. The size of the allocation can be smaller based on the actual number of phys now, so use this as an upper bound. Fixes: cb5b60894602 ("scsi: mpi3mr: Increase maximum number of PHYs to 64 from 32") Reviewed-by: Johannes Thumshirn Cc: Sathya Prakash Veerichetty Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240123130754.2011469-1-arnd@kernel.org Tested-by: John Garry #build only Signed-off-by: Martin K. Petersen commit bb04d13353885f81c87879b2deb296bd2adb6cab Author: Jason Gunthorpe Date: Fri Feb 23 14:44:08 2024 -0400 iommufd/selftest: Don't check map/unmap pairing with HUGE_PAGES Since MOCK_HUGE_PAGE_SIZE was introduced it allows the core code to invoke mock with large page sizes. This confuses the validation logic that checks that map/unmap are paired. This is because the page size computed for map is based on the physical address and in many cases will always be the base page size, however the entire range generated by iommufd will be passed to map. Randomly iommufd can see small groups of physically contiguous pages, (say 8k unaligned and grouped together), but that group crosses a huge page boundary. The map side will observe this as a contiguous run and mark it accordingly, but there is a chance the unmap side will end up terminating interior huge pages in the middle of that group and trigger a validation failure. Meaning the validation only works if the core code passes the iova/length directly from iommufd to mock. syzkaller randomly hits this with failures like: WARNING: CPU: 0 PID: 11568 at drivers/iommu/iommufd/selftest.c:461 mock_domain_unmap_pages+0x1c0/0x250 Modules linked in: CPU: 0 PID: 11568 Comm: syz-executor.0 Not tainted 6.8.0-rc3+ #4 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 RIP: 0010:mock_domain_unmap_pages+0x1c0/0x250 Code: 2b e8 94 37 0f ff 48 d1 eb 31 ff 48 b8 00 00 00 00 00 00 20 00 48 21 c3 48 89 de e8 aa 32 0f ff 48 85 db 75 07 e8 70 37 0f ff <0f> 0b e8 69 37 0f ff 31 f6 31 ff e8 90 32 0f ff e8 5b 37 0f ff 4c RSP: 0018:ffff88800e707490 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff822dfae6 RDX: ffff88800cf86400 RSI: ffffffff822dfaf0 RDI: 0000000000000007 RBP: ffff88800e7074d8 R08: 0000000000000000 R09: ffffed1001167c90 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000001500000 R13: 0000000000083000 R14: 0000000000000001 R15: 0000000000000800 FS: 0000555556048480(0000) GS:ffff88806d400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2dc23000 CR3: 0000000008cbb000 CR4: 0000000000350eb0 Call Trace: __iommu_unmap+0x281/0x520 iommu_unmap+0xc9/0x180 iopt_area_unmap_domain_range+0x1b1/0x290 iopt_area_unpin_domain+0x590/0x800 __iopt_area_unfill_domain+0x22e/0x650 iopt_area_unfill_domain+0x47/0x60 iopt_unfill_domain+0x187/0x590 iopt_table_remove_domain+0x267/0x2d0 iommufd_hwpt_paging_destroy+0x1f1/0x370 iommufd_object_remove+0x2a3/0x490 iommufd_device_detach+0x23a/0x2c0 iommufd_selftest_destroy+0x7a/0xf0 iommufd_fops_release+0x1d3/0x340 __fput+0x272/0xb50 __fput_sync+0x4b/0x60 __x64_sys_close+0x8b/0x110 do_syscall_64+0x71/0x140 entry_SYSCALL_64_after_hwframe+0x46/0x4e Do the simple thing and just disable the validation when the huge page tests are being run. Fixes: 7db521e23fe9 ("iommufd/selftest: Hugepage mock domain support") Link: https://lore.kernel.org/r/0-v1-1e17e60a5c8a+103fb-iommufd_mock_hugepg_jgg@nvidia.com Reviewed-by: Joao Martins Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit cf7c2789822db8b5efa34f5ebcf1621bc0008d48 Author: Nicolin Chen Date: Thu Feb 22 13:23:47 2024 -0800 iommufd: Fix protection fault in iommufd_test_syz_conv_iova Syzkaller reported the following bug: general protection fault, probably for non-canonical address 0xdffffc0000000038: 0000 [#1] SMP KASAN KASAN: null-ptr-deref in range [0x00000000000001c0-0x00000000000001c7] Call Trace: lock_acquire lock_acquire+0x1ce/0x4f0 down_read+0x93/0x4a0 iommufd_test_syz_conv_iova+0x56/0x1f0 iommufd_test_access_rw.isra.0+0x2ec/0x390 iommufd_test+0x1058/0x1e30 iommufd_fops_ioctl+0x381/0x510 vfs_ioctl __do_sys_ioctl __se_sys_ioctl __x64_sys_ioctl+0x170/0x1e0 do_syscall_x64 do_syscall_64+0x71/0x140 This is because the new iommufd_access_change_ioas() sets access->ioas to NULL during its process, so the lock might be gone in a concurrent racing context. Fix this by doing the same access->ioas sanity as iommufd_access_rw() and iommufd_access_pin_pages() functions do. Cc: stable@vger.kernel.org Fixes: 9227da7816dd ("iommufd: Add iommufd_access_change_ioas(_id) helpers") Link: https://lore.kernel.org/r/3f1932acaf1dd494d404c04364d73ce8f57f3e5e.1708636627.git.nicolinc@nvidia.com Reported-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit fde372df96afddcda3ec94944351f2a14f7cd98d Author: Nicolin Chen Date: Thu Feb 22 13:23:46 2024 -0800 iommufd/selftest: Fix mock_dev_num bug Syzkaller reported the following bug: sysfs: cannot create duplicate filename '/devices/iommufd_mock4' Call Trace: sysfs_warn_dup+0x71/0x90 sysfs_create_dir_ns+0x1ee/0x260 ? sysfs_create_mount_point+0x80/0x80 ? spin_bug+0x1d0/0x1d0 ? do_raw_spin_unlock+0x54/0x220 kobject_add_internal+0x221/0x970 kobject_add+0x11c/0x1e0 ? lockdep_hardirqs_on_prepare+0x273/0x3e0 ? kset_create_and_add+0x160/0x160 ? kobject_put+0x5d/0x390 ? bus_get_dev_root+0x4a/0x60 ? kobject_put+0x5d/0x390 device_add+0x1d5/0x1550 ? __fw_devlink_link_to_consumers.isra.0+0x1f0/0x1f0 ? __init_waitqueue_head+0xcb/0x150 iommufd_test+0x462/0x3b60 ? lock_release+0x1fe/0x640 ? __might_fault+0x117/0x170 ? reacquire_held_locks+0x4b0/0x4b0 ? iommufd_selftest_destroy+0xd0/0xd0 ? __might_fault+0xbe/0x170 iommufd_fops_ioctl+0x256/0x350 ? iommufd_option+0x180/0x180 ? __lock_acquire+0x1755/0x45f0 __x64_sys_ioctl+0xa13/0x1640 The bug is triggered when Syzkaller created multiple mock devices but didn't destroy them in the same sequence, messing up the mock_dev_num counter. Replace the atomic with an mock_dev_ida. Cc: stable@vger.kernel.org Fixes: 23a1b46f15d5 ("iommufd/selftest: Make the mock iommu driver into a real driver") Link: https://lore.kernel.org/r/5af41d5af6d5c013cc51de01427abb8141b3587e.1708636627.git.nicolinc@nvidia.com Reported-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit aeb004c0cd6958e910123a1607634401009c9539 Author: Nicolin Chen Date: Thu Feb 22 13:23:45 2024 -0800 iommufd: Fix iopt_access_list_id overwrite bug Syzkaller reported the following WARN_ON: WARNING: CPU: 1 PID: 4738 at drivers/iommu/iommufd/io_pagetable.c:1360 Call Trace: iommufd_access_change_ioas+0x2fe/0x4e0 iommufd_access_destroy_object+0x50/0xb0 iommufd_object_remove+0x2a3/0x490 iommufd_object_destroy_user iommufd_access_destroy+0x71/0xb0 iommufd_test_staccess_release+0x89/0xd0 __fput+0x272/0xb50 __fput_sync+0x4b/0x60 __do_sys_close __se_sys_close __x64_sys_close+0x8b/0x110 do_syscall_x64 The mismatch between the access pointer in the list and the passed-in pointer is resulting from an overwrite of access->iopt_access_list_id, in iopt_add_access(). Called from iommufd_access_change_ioas() when xa_alloc() succeeds but iopt_calculate_iova_alignment() fails. Add a new_id in iopt_add_access() and only update iopt_access_list_id when returning successfully. Cc: stable@vger.kernel.org Fixes: 9227da7816dd ("iommufd: Add iommufd_access_change_ioas(_id) helpers") Link: https://lore.kernel.org/r/2dda7acb25b8562ec5f1310de828ef5da9ef509c.1708636627.git.nicolinc@nvidia.com Reported-by: Jason Gunthorpe Suggested-by: Jason Gunthorpe Signed-off-by: Nicolin Chen Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit 45ec2f5f6ed3ec3a79ba1329ad585497cdcbe663 Merge: b6c1f1ecb3bf2 e6a30d0c48a1e Author: Linus Torvalds Date: Mon Feb 26 11:06:30 2024 -0800 Merge tag 'mtd/fixes-for-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fixes from Miquel Raynal: "Many NAND page layouts have been added to the Marvell NAND controller but could not be used in practice so they are being removed. Regarding the SPI-NAND area, Gigadevice chips were not using the right buffer for an ECC status check operation. Aside from these driver fixes, there is also a refcount fix in the MTD core nodes parsing logic" * tag 'mtd/fixes-for-6.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: rawnand: marvell: fix layouts mtd: Fix possible refcounting issue when going through partition nodes mtd: spinand: gigadevice: Fix the get ecc status issue commit b6c1f1ecb3bf2dcd8085cc7d927ade623182a26c Merge: c8e314624a166 c7bb26b847e5b Author: Linus Torvalds Date: Mon Feb 26 11:00:54 2024 -0800 Merge tag 'for-6.8-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A more fixes for recently reported or discovered problems: - fix corner case of send that would generate potentially large stream of zeros if there's a hole at the end of the file - fix chunk validation in zoned mode on conventional zones, it was possible to create chunks that would not be allowed on sequential zones - fix validation of dev-replace ioctl filenames - fix KCSAN warnings about access to block reserve struct members" * tag 'for-6.8-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix data race at btrfs_use_block_rsv() when accessing block reserve btrfs: fix data races when accessing the reserved amount of block reserves btrfs: send: don't issue unnecessary zero writes for trailing hole btrfs: dev-replace: properly validate device names btrfs: zoned: don't skip block group profile checks on conventional zones commit 51d31149a88b5c5a8d2d33f06df93f6187a25b4c Author: Xiubo Li Date: Mon Feb 19 13:14:32 2024 +0800 ceph: switch to corrected encoding of max_xattr_size in mdsmap The addition of bal_rank_mask with encoding version 17 was merged into ceph.git in Oct 2022 and made it into v18.2.0 release normally. A few months later, the much delayed addition of max_xattr_size got merged, also with encoding version 17, placed before bal_rank_mask in the encoding -- but it didn't make v18.2.0 release. The way this ended up being resolved on the MDS side is that bal_rank_mask will continue to be encoded in version 17 while max_xattr_size is now encoded in version 18. This does mean that older kernels will misdecode version 17, but this is also true for v18.2.0 and v18.2.1 clients in userspace. The best we can do is backport this adjustment -- see ceph.git commit 78abfeaff27fee343fb664db633de5b221699a73 for details. [ idryomov: changelog ] Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/64440 Fixes: d93231a6bc8a ("ceph: prevent a client from exceeding the MDS maximum xattr size") Signed-off-by: Xiubo Li Reviewed-by: Patrick Donnelly Reviewed-by: Venky Shankar Signed-off-by: Ilya Dryomov commit c8e314624a1666ed2eec28549713021a8ec801e9 Author: Mark O'Donovan Date: Wed Feb 21 10:43:58 2024 +0000 fs/ntfs3: fix build without CONFIG_NTFS3_LZX_XPRESS When CONFIG_NTFS3_LZX_XPRESS is not set then we get the following build error: fs/ntfs3/frecord.c:2460:16: error: unused variable ‘i_size’ Signed-off-by: Mark O'Donovan Fixes: 4fd6c08a16d7 ("fs/ntfs3: Use i_size_read and i_size_write") Tested-by: Chris Clayton Signed-off-by: Linus Torvalds commit d9818b3e906a0ee1ab02ea79e74a2f755fc5461a Author: Mickaël Salaün Date: Mon Feb 19 20:03:45 2024 +0100 landlock: Fix asymmetric private inodes referring When linking or renaming a file, if only one of the source or destination directory is backed by an S_PRIVATE inode, then the related set of layer masks would be used as uninitialized by is_access_to_paths_allowed(). This would result to indeterministic access for one side instead of always being allowed. This bug could only be triggered with a mounted filesystem containing both S_PRIVATE and !S_PRIVATE inodes, which doesn't seem possible. The collect_domain_accesses() calls return early if is_nouser_or_private() returns false, which means that the directory's superblock has SB_NOUSER or its inode has S_PRIVATE. Because rename or link actions are only allowed on the same mounted filesystem, the superblock is always the same for both source and destination directories. However, it might be possible in theory to have an S_PRIVATE parent source inode with an !S_PRIVATE parent destination inode, or vice versa. To make sure this case is not an issue, explicitly initialized both set of layer masks to 0, which means to allow all actions on the related side. If at least on side has !S_PRIVATE, then collect_domain_accesses() and is_access_to_paths_allowed() check for the required access rights. Cc: Arnd Bergmann Cc: Christian Brauner Cc: Günther Noack Cc: Jann Horn Cc: Shervin Oloumi Cc: stable@vger.kernel.org Fixes: b91c3e4ea756 ("landlock: Add support for file reparenting with LANDLOCK_ACCESS_FS_REFER") Link: https://lore.kernel.org/r/20240219190345.2928627-1-mic@digikod.net Signed-off-by: Mickaël Salaün commit 6890cb1ace350b4386c8aee1343dc3b3ddd214da Author: Paolo Bonzini Date: Thu Feb 1 00:09:02 2024 +0100 x86/cpu/intel: Detect TME keyid bits before setting MTRR mask registers MKTME repurposes the high bit of physical address to key id for encryption key and, even though MAXPHYADDR in CPUID[0x80000008] remains the same, the valid bits in the MTRR mask register are based on the reduced number of physical address bits. detect_tme() in arch/x86/kernel/cpu/intel.c detects TME and subtracts it from the total usable physical bits, but it is called too late. Move the call to early_init_intel() so that it is called in setup_arch(), before MTRRs are setup. This fixes boot on TDX-enabled systems, which until now only worked with "disable_mtrr_cleanup". Without the patch, the values written to the MTRRs mask registers were 52-bit wide (e.g. 0x000fffff_80000800) and the writes failed; with the patch, the values are 46-bit wide, which matches the reduced MAXPHYADDR that is shown in /proc/cpuinfo. Reported-by: Zixi Chen Signed-off-by: Paolo Bonzini Signed-off-by: Dave Hansen Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20240131230902.1867092-3-pbonzini%40redhat.com commit 9a458198eba98b7207669a166e64d04b04cb651b Author: Paolo Bonzini Date: Thu Feb 1 00:09:01 2024 +0100 x86/cpu: Allow reducing x86_phys_bits during early_identify_cpu() In commit fbf6449f84bf ("x86/sev-es: Set x86_virt_bits to the correct value straight away, instead of a two-phase approach"), the initialization of c->x86_phys_bits was moved after this_cpu->c_early_init(c). This is incorrect because early_init_amd() expected to be able to reduce the value according to the contents of CPUID leaf 0x8000001f. Fortunately, the bug was negated by init_amd()'s call to early_init_amd(), which does reduce x86_phys_bits in the end. However, this is very late in the boot process and, most notably, the wrong value is used for x86_phys_bits when setting up MTRRs. To fix this, call get_cpu_address_sizes() as soon as X86_FEATURE_CPUID is set/cleared, and c->extended_cpuid_level is retrieved. Fixes: fbf6449f84bf ("x86/sev-es: Set x86_virt_bits to the correct value straight away, instead of a two-phase approach") Signed-off-by: Paolo Bonzini Signed-off-by: Dave Hansen Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20240131230902.1867092-2-pbonzini%40redhat.com commit 00d6a284fcf3fad1b7e1b5bc3cd87cbfb60ce03f Author: Jiri Slaby (SUSE) Date: Thu Feb 8 12:44:11 2024 +0100 fbcon: always restore the old font data in fbcon_do_set_font() Commit a5a923038d70 (fbdev: fbcon: Properly revert changes when vc_resize() failed) started restoring old font data upon failure (of vc_resize()). But it performs so only for user fonts. It means that the "system"/internal fonts are not restored at all. So in result, the very first call to fbcon_do_set_font() performs no restore at all upon failing vc_resize(). This can be reproduced by Syzkaller to crash the system on the next invocation of font_get(). It's rather hard to hit the allocation failure in vc_resize() on the first font_set(), but not impossible. Esp. if fault injection is used to aid the execution/failure. It was demonstrated by Sirius: BUG: unable to handle page fault for address: fffffffffffffff8 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD cb7b067 P4D cb7b067 PUD cb7d067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 8007 Comm: poc Not tainted 6.7.0-g9d1694dc91ce #20 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 RIP: 0010:fbcon_get_font+0x229/0x800 drivers/video/fbdev/core/fbcon.c:2286 Call Trace: con_font_get drivers/tty/vt/vt.c:4558 [inline] con_font_op+0x1fc/0xf20 drivers/tty/vt/vt.c:4673 vt_k_ioctl drivers/tty/vt/vt_ioctl.c:474 [inline] vt_ioctl+0x632/0x2ec0 drivers/tty/vt/vt_ioctl.c:752 tty_ioctl+0x6f8/0x1570 drivers/tty/tty_io.c:2803 vfs_ioctl fs/ioctl.c:51 [inline] ... So restore the font data in any case, not only for user fonts. Note the later 'if' is now protected by 'old_userfont' and not 'old_data' as the latter is always set now. (And it is supposed to be non-NULL. Otherwise we would see the bug above again.) Signed-off-by: Jiri Slaby (SUSE) Fixes: a5a923038d70 ("fbdev: fbcon: Properly revert changes when vc_resize() failed") Reported-and-tested-by: Ubisectech Sirius Cc: Ubisectech Sirius Cc: Daniel Vetter Cc: Helge Deller Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20240208114411.14604-1-jirislaby@kernel.org commit 50ee641643dd0f46702e9a99354398196e1734c2 Author: Johnny Hsieh Date: Mon Feb 26 21:44:50 2024 +0800 ASoC: amd: yc: Add Lenovo ThinkBook 21J0 into DMI quirk table This patch adds Lenovo 21J0 (ThinkBook 16 G5+ ARP) to the DMI quirks table to enable internal microphone array. Cc: linux-sound@vger.kernel.org Signed-off-by: Johnny Hsieh Link: https://msgid.link/r/TYSPR04MB8429D62DFDB6727866ECF1DEC55A2@TYSPR04MB8429.apcprd04.prod.outlook.com Signed-off-by: Mark Brown commit 9d3f8a723c7950e56e0b95ab84b572caee29e065 Author: Christian König Date: Wed Feb 21 08:18:59 2024 +0100 drm/ttm/tests: depend on UML || COMPILE_TEST At least the device test requires that no other driver using TTM is loaded. So make those unit tests depend on UML || COMPILE_TEST to prevent people from trying them on bare metal. Signed-off-by: Christian König Acked-by: Alex Deucher Link: https://lore.kernel.org/all/20240219230116.77b8ad68@yea/ commit 2f910859724b53f1cd3579246e3d9bebb16d78b8 Merge: 86bf8cfda6d2a 72fa02fdf8330 Author: Maxime Ripard Date: Mon Feb 26 15:23:00 2024 +0100 Merge drm/drm-fixes into drm-misc-fixes Sima needs a more recent release to apply a patch. Signed-off-by: Maxime Ripard commit 86bf8cfda6d2a6720fa2e6e676c98f0882c9d3d7 Author: Thierry Reding Date: Fri Feb 23 16:03:33 2024 +0100 drm/tegra: Remove existing framebuffer only if we support display Tegra DRM doesn't support display on Tegra234 and later, so make sure not to remove any existing framebuffers in that case. v2: - add comments explaining how this situation can come about - clear DRIVER_MODESET and DRIVER_ATOMIC feature bits Fixes: 6848c291a54f ("drm/aperture: Convert drivers to aperture interfaces") Signed-off-by: Thierry Reding Reviewed-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20240223150333.1401582-1-thierry.reding@gmail.com commit 10bfd453da64a057bcfd1a49fb6b271c48653cdb Author: Eric Dumazet Date: Thu Feb 22 12:17:47 2024 +0000 ipv6: fix potential "struct net" leak in inet6_rtm_getaddr() It seems that if userspace provides a correct IFA_TARGET_NETNSID value but no IFA_ADDRESS and IFA_LOCAL attributes, inet6_rtm_getaddr() returns -EINVAL with an elevated "struct net" refcount. Fixes: 6ecf4c37eb3e ("ipv6: enable IFA_TARGET_NETNSID for RTM_GETADDR") Signed-off-by: Eric Dumazet Cc: Christian Brauner Cc: David Ahern Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 1a825e4cdf457b7aef7ebbc2f1206654f5beb150 Author: Jakub Kicinski Date: Wed Feb 21 15:12:11 2024 -0800 selftests: net: veth: test syncing GRO and XDP state while device is down Test that we keep GRO flag in sync when XDP is disabled while the device is closed. Signed-off-by: Jakub Kicinski Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit fe9f801355f0b47668419f30f1fac1cf4539e736 Author: Jakub Kicinski Date: Wed Feb 21 15:12:10 2024 -0800 net: veth: clear GRO when clearing XDP even when down veth sets NETIF_F_GRO automatically when XDP is enabled, because both features use the same NAPI machinery. The logic to clear NETIF_F_GRO sits in veth_disable_xdp() which is called both on ndo_stop and when XDP is turned off. To avoid the flag from being cleared when the device is brought down, the clearing is skipped when IFF_UP is not set. Bringing the device down should indeed not modify its features. Unfortunately, this means that clearing is also skipped when XDP is disabled _while_ the device is down. And there's nothing on the open path to bring the device features back into sync. IOW if user enables XDP, disables it and then brings the device up we'll end up with a stray GRO flag set but no NAPI instances. We don't depend on the GRO flag on the datapath, so the datapath won't crash. We will crash (or hang), however, next time features are sync'ed (either by user via ethtool or peer changing its config). The GRO flag will go away, and veth will try to disable the NAPIs. But the open path never created them since XDP was off, the GRO flag was a stray. If NAPI was initialized before we'll hang in napi_disable(). If it never was we'll crash trying to stop uninitialized hrtimer. Move the GRO flag updates to the XDP enable / disable paths, instead of mixing them with the ndo_open / ndo_close paths. Fixes: d3256efd8e8b ("veth: allow enabling NAPI even without XDP") Reported-by: Thomas Gleixner Reported-by: syzbot+039399a9b96297ddedca@syzkaller.appspotmail.com Signed-off-by: Jakub Kicinski Reviewed-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 1a807e46aa93ebad1dfbed4f82dc3bf779423a6e Author: Nathan Chancellor Date: Wed Feb 21 14:46:21 2024 -0700 xfrm: Avoid clang fortify warning in copy_to_user_tmpl() After a couple recent changes in LLVM, there is a warning (or error with CONFIG_WERROR=y or W=e) from the compile time fortify source routines, specifically the memset() in copy_to_user_tmpl(). In file included from net/xfrm/xfrm_user.c:14: ... include/linux/fortify-string.h:438:4: error: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror,-Wattribute-warning] 438 | __write_overflow_field(p_size_field, size); | ^ 1 error generated. While ->xfrm_nr has been validated against XFRM_MAX_DEPTH when its value is first assigned in copy_templates() by calling validate_tmpl() first (so there should not be any issue in practice), LLVM/clang cannot really deduce that across the boundaries of these functions. Without that knowledge, it cannot assume that the loop stops before i is greater than XFRM_MAX_DEPTH, which would indeed result a stack buffer overflow in the memset(). To make the bounds of ->xfrm_nr clear to the compiler and add additional defense in case copy_to_user_tmpl() is ever used in a path where ->xfrm_nr has not been properly validated against XFRM_MAX_DEPTH first, add an explicit bound check and early return, which clears up the warning. Cc: stable@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1985 Signed-off-by: Nathan Chancellor Reviewed-by: Kees Cook Signed-off-by: Steffen Klassert commit 20dfa63d7379408edfcae8bda8ef5ea44d7b357f Author: Suraj Kandpal Date: Fri Feb 23 13:44:49 2024 +0530 drm/i915/hdcp: Remove additional timing for reading mst hdcp message Now that we have moved back to direct reads the additional timing is not required hence this can be removed. --v2 -Add Fixes tag [Ankit] Fixes: 3974f9c17bb9 ("drm/i915/hdcp: Adjust timeout for read in DPMST Scenario") Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Signed-off-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20240223081453.1576918-10-suraj.kandpal@intel.com (cherry picked from commit 429ccbd1c39baefc6114b482ae98c188f007afcd) Signed-off-by: Joonas Lahtinen commit cb2b7d6f8c96414e1ab63c5f6e89d1c66a8b1078 Author: Suraj Kandpal Date: Fri Feb 23 13:44:42 2024 +0530 drm/i915/hdcp: Move to direct reads for HDCP Even for MST scenarios we need to do direct reads only on the immediate downstream device the rest of the authentication is taken care by that device. Remote reads will only be used to check capability of the monitors in MST topology. --v2 -Add fixes tag [Ankit] -Derive aux where needed rather than through a function [Ankit] Fixes: ae4f902bb344 ("drm/i915/hdcp: Send the correct aux for DPMST HDCP scenario") Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Signed-off-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20240223081453.1576918-3-suraj.kandpal@intel.com (cherry picked from commit 287c0de8b29489cdb20957980ca08c33ae4a67b9) Signed-off-by: Joonas Lahtinen commit d206a76d7d2726f3b096037f2079ce0bd3ba329b Author: Linus Torvalds Date: Sun Feb 25 15:46:06 2024 -0800 Linux 6.8-rc6 commit e231dbd452a79b9100846c0552fd9077251c042e Merge: 70ff1fe626a16 5197728f8182a Author: Linus Torvalds Date: Sun Feb 25 15:31:57 2024 -0800 Merge tag 'bcachefs-2024-02-25' of https://evilpiepirate.org/git/bcachefs Pull bcachefs fixes from Kent Overstreet: "Some more mostly boring fixes, but some not User reported ones: - the BTREE_ITER_FILTER_SNAPSHOTS one fixes a really nasty performance bug; user reported an untar initially taking two seconds and then ~2 minutes - kill a __GFP_NOFAIL in the buffered read path; this was a leftover from the trickier fix to kill __GFP_NOFAIL in readahead, where we can't return errors (and have to silently truncate the read ourselves). bcachefs can't use GFP_NOFAIL for folio state unlike iomap based filesystems because our folio state is just barely too big, 2MB hugepages cause us to exceed the 2 page threshhold for GFP_NOFAIL. additionally, the flags argument was just buggy, we weren't supplying GFP_KERNEL previously (!)" * tag 'bcachefs-2024-02-25' of https://evilpiepirate.org/git/bcachefs: bcachefs: fix bch2_save_backtrace() bcachefs: Fix check_snapshot() memcpy bcachefs: Fix bch2_journal_flush_device_pins() bcachefs: fix iov_iter count underflow on sub-block dio read bcachefs: Fix BTREE_ITER_FILTER_SNAPSHOTS on inodes btree bcachefs: Kill __GFP_NOFAIL in buffered read path bcachefs: fix backpointer_to_text() when dev does not exist commit 5197728f8182a93a07e5bf860726456322d3a908 Author: Kent Overstreet Date: Sun Feb 25 15:45:34 2024 -0500 bcachefs: fix bch2_save_backtrace() Missed a call in the previous fix. Signed-off-by: Kent Overstreet commit 70ff1fe626a166dcaadb5a81bfe75e22c91f5dbf Merge: c46ac50ebec33 b7b2ffc3ca59b Author: Linus Torvalds Date: Sun Feb 25 10:58:12 2024 -0800 Merge tag 'docs-6.8-fixes3' of git://git.lwn.net/linux Pull two documentation build fixes from Jonathan Corbet: - The XFS online fsck documentation uses incredibly deeply nested subsection and list nesting; that broke the PDF docs build. Tweak a parameter to tell LaTeX to allow the deeper nesting. - Fix a 6.8 PDF-build regression * tag 'docs-6.8-fixes3' of git://git.lwn.net/linux: docs: translations: use attribute to store current language docs: Instruct LaTeX to cope with deeper nesting commit c46ac50ebec33907e5768012aa39ba1ab2f0ca14 Merge: 1e592e9536843 69f89168b3108 Author: Linus Torvalds Date: Sun Feb 25 10:41:57 2024 -0800 Merge tag 'usb-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for 6.8-rc6 to resolve some reported problems. These include: - regression fixes with typec tpcm code as reported by many - cdnsp and cdns3 driver fixes - usb role setting code bugfixes - build fix for uhci driver - ncm gadget driver bugfix - MAINTAINERS entry update All of these have been in linux-next all week with no reported issues and there is at least one fix in here that is in Thorsten's regression list that is being tracked" * tag 'usb-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: tpcm: Fix issues with power being removed during reset MAINTAINERS: Drop myself as maintainer of TYPEC port controller drivers usb: gadget: ncm: Avoid dropping datagrams of properly parsed NTBs Revert "usb: typec: tcpm: reset counter when enter into unattached state after try role" usb: gadget: omap_udc: fix USB gadget regression on Palm TE usb: dwc3: gadget: Don't disconnect if not started usb: cdns3: fix memory double free when handle zero packet usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable() usb: roles: don't get/set_role() when usb_role_switch is unregistered usb: roles: fix NULL pointer issue when put module's reference usb: cdnsp: fixed issue with incorrect detecting CDNSP family controllers usb: cdnsp: blocked some cdns3 specific code usb: uhci-grlib: Explicitly include linux/platform_device.h commit 1e592e95368433d5e2055de1e43b894408627bcc Merge: 1eee4ef38ca15 3b69e32e151bc Author: Linus Torvalds Date: Sun Feb 25 10:35:41 2024 -0800 Merge tag 'tty-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are three small serial/tty driver fixes for 6.8-rc6 that resolve the following reported errors: - riscv hvc console driver fix that was reported by many - amba-pl011 serial driver fix for RS485 mode - stm32 serial driver fix for RS485 mode All of these have been in linux-next all week with no reported problems" * tag 'tty-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: amba-pl011: Fix DMA transmission in RS485 mode serial: stm32: do not always set SER_RS485_RX_DURING_TX if RS485 is enabled tty: hvc: Don't enable the RISC-V SBI console by default commit 1eee4ef38ca15137379028a5a7b0f859bd1bb9b0 Merge: 8c46ed3740e27 43fb862de8f62 Author: Linus Torvalds Date: Sun Feb 25 10:22:21 2024 -0800 Merge tag 'x86_urgent_for_v6.8_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Make sure clearing CPU buffers using VERW happens at the latest possible point in the return-to-userspace path, otherwise memory accesses after the VERW execution could cause data to land in CPU buffers again * tag 'x86_urgent_for_v6.8_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: KVM/VMX: Move VERW closer to VMentry for MDS mitigation KVM/VMX: Use BT+JNC, i.e. EFLAGS.CF to select VMRESUME vs. VMLAUNCH x86/bugs: Use ALTERNATIVE() instead of mds_user_clear static key x86/entry_32: Add VERW just before userspace transition x86/entry_64: Add VERW just before userspace transition x86/bugs: Add asm helpers for executing VERW commit 8c46ed3740e27aeba30866ea3da4bc41b08f98a4 Merge: 4ca0d9894fd51 ec4308ecfc887 Author: Linus Torvalds Date: Sun Feb 25 10:14:12 2024 -0800 Merge tag 'irq_urgent_for_v6.8_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Borislav Petkov: - Make sure GICv4 always gets initialized to prevent a kexec-ed kernel from silently failing to set it up - Do not call bus_get_dev_root() for the mbigen irqchip as it always returns NULL - use NULL directly - Fix hardware interrupt number truncation when assigning MSI interrupts - Correct sending end-of-interrupt messages to disabled interrupts lines on RISC-V PLIC * tag 'irq_urgent_for_v6.8_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3-its: Do not assume vPE tables are preallocated irqchip/mbigen: Don't use bus_get_dev_root() to find the parent PCI/MSI: Prevent MSI hardware interrupt number truncation irqchip/sifive-plic: Enable interrupt if needed before EOI commit 4ca0d9894fd517a2f2c0c10d26ebe99ab4396fe3 Merge: 66a97c2ec9535 56ee7db31187d Author: Linus Torvalds Date: Sun Feb 25 09:53:13 2024 -0800 Merge tag 'erofs-for-6.8-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fix from Gao Xiang: - Fix page refcount leak when looking up specific inodes introduced by metabuf reworking * tag 'erofs-for-6.8-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: fix refcount on the metabuf used for inode lookup commit 66a97c2ec95359550987078648cf069bdd3e0f53 Merge: 9b24349279d56 9fa8e282c2bfe Author: Linus Torvalds Date: Sun Feb 25 09:29:05 2024 -0800 Merge tag 'pull-fixes.pathwalk-rcu-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull RCU pathwalk fixes from Al Viro: "We still have some races in filesystem methods when exposed to RCU pathwalk. This series is a result of code audit (the second round of it) and it should deal with most of that stuff. Still pending: ntfs3 ->d_hash()/->d_compare() and ceph_d_revalidate(). Up to maintainers (a note for NTFS folks - when documentation says that a method may not block, it *does* imply that blocking allocations are to be avoided. Really)" [ More explanations for people who aren't familiar with the vagaries of RCU path walking: most of it is hidden from filesystems, but if a filesystem actively participates in the low-level path walking it needs to make sure the fields involved in that walk are RCU-safe. That "actively participate in low-level path walking" includes things like having its own ->d_hash()/->d_compare() routines, or by having its own directory permission function that doesn't just use the common helpers. Having a ->d_revalidate() function will also have this issue. Note that instead of making everything RCU safe you can also choose to abort the RCU pathwalk if your operation cannot be done safely under RCU, but that obviously comes with a performance penalty. One common pattern is to allow the simple cases under RCU, and abort only if you need to do something more complicated. So not everything needs to be RCU-safe, and things like the inode etc that the VFS itself maintains obviously already are. But these fixes tend to be about properly RCU-delaying things like ->s_fs_info that are maintained by the filesystem and that got potentially released too early. - Linus ] * tag 'pull-fixes.pathwalk-rcu-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ext4_get_link(): fix breakage in RCU mode cifs_get_link(): bail out in unsafe case fuse: fix UAF in rcu pathwalks procfs: make freeing proc_fs_info rcu-delayed procfs: move dropping pde and pid from ->evict_inode() to ->free_inode() nfs: fix UAF on pathwalk running into umount nfs: make nfs_set_verifier() safe for use in RCU pathwalk afs: fix __afs_break_callback() / afs_drop_open_mmap() race hfsplus: switch to rcu-delayed unloading of nls and freeing ->s_fs_info exfat: move freeing sbi, upcase table and dropping nls into rcu-delayed helper affs: free affs_sb_info with kfree_rcu() rcu pathwalk: prevent bogus hard errors from may_lookup() fs/super.c: don't drop ->s_user_ns until we free struct super_block itself commit 9b24349279d561122d620e63c4467e2715bcfb49 Merge: ab0a97cffa0bb 2c88c16dc20e8 Author: Linus Torvalds Date: Sun Feb 25 09:17:15 2024 -0800 Merge tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "A couple of fixes - revert of regression from this cycle and a fix for erofs failure exit breakage (had been there since way back)" * tag 'pull-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: erofs: fix handling kern_mount() failure Revert "get rid of DCACHE_GENOCIDE" commit 11dadb631007324c7a8bcb2650eda88ed2b9eed0 Author: Cosmin Tanislav Date: Wed Feb 7 05:36:51 2024 +0200 iio: accel: adxl367: fix I2C FIFO data register As specified in the datasheet, the I2C FIFO data register is 0x18, not 0x42. 0x42 was used by mistake when adapting the ADXL372 driver. Fix this mistake. Fixes: cbab791c5e2a ("iio: accel: add ADXL367 driver") Signed-off-by: Cosmin Tanislav Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240207033657.206171-2-demonsingur@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 1b926914bbe4e30cb32f268893ef7d82a85275b8 Author: Cosmin Tanislav Date: Wed Feb 7 05:36:50 2024 +0200 iio: accel: adxl367: fix DEVID read after reset regmap_read_poll_timeout() will not sleep before reading, causing the first read to return -ENXIO on I2C, since the chip does not respond to it while it is being reset. The datasheet specifies that a soft reset operation has a latency of 7.5ms. Add a 15ms sleep between reset and reading the DEVID register, and switch to a simple regmap_read() call. Fixes: cbab791c5e2a ("iio: accel: add ADXL367 driver") Signed-off-by: Cosmin Tanislav Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240207033657.206171-1-demonsingur@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 65e32301e1a0a436bf542674c23030d0dcc1afde Author: Liu Ying Date: Fri Feb 23 17:15:22 2024 +0800 arm64: dts: imx8mp: Fix LDB clocks property The "media_ldb_root_clk" is the gate clock to enable or disable the clock provided by CCM(Clock Control Module) to LDB instead of the "media_ldb" clock which is the parent of the "media_ldb_root_clk" clock as a composite clock. Fix LDB clocks property by referencing the "media_ldb_root_clk" clock instead of the "media_ldb" clock. Fixes: e7567840ecd3 ("arm64: dts: imx8mp: Reorder clock and reg properties") Fixes: 94e6197dadc9 ("arm64: dts: imx8mp: Add LCDIF2 & LDB nodes") Signed-off-by: Liu Ying Reviewed-by: Marek Vasut Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo commit 418a7fc5397719c4b8f50eaeca6694879f89a6ec Author: Marek Vasut Date: Sun Feb 25 04:33:42 2024 +0100 arm64: dts: imx8mp: Fix TC9595 reset GPIO on DH i.MX8M Plus DHCOM SoM The TC9595 reset GPIO is SAI1_RXC / GPIO4_IO01, fix the DT accordingly. The SAI5_RXD0 / GPIO3_IO21 is thus far unused TC9595 interrupt line. Fixes: 20d0b83e712b ("arm64: dts: imx8mp: Add TC9595 bridge on DH electronics i.MX8M Plus DHCOM") Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 892cc217565fcca477c15116c21cf666a3fdbf9d Author: Daniel Baluta Date: Thu Feb 22 15:06:41 2024 +0200 MAINTAINERS: Use a proper mailinglist for NXP i.MX development So far we used an internal linux-imx@nxp.com email address to gather all patches related to NXP i.MX development. Let's switch to an open mailing list that provides ability for people from the community to subscribe and also have a proper archive. List interface at: https://lists.linux.dev. Archive is at: https://lore.kernel.org/imx/ Signed-off-by: Daniel Baluta Signed-off-by: Shawn Guo commit d2f8795d9e50aa33c1e2bc0fcbb98ba4a7795749 Author: Francesco Dolcini Date: Fri Feb 16 11:42:55 2024 +0100 ARM: dts: imx7: remove DSI port endpoints This fixes the display not working on colibri imx7, the driver fails to load with the following error: mxsfb 30730000.lcdif: error -ENODEV: Cannot connect bridge NXP i.MX7 LCDIF is connected to both the Parallel LCD Display and to a MIPI DSI IP block, currently it's not possible to describe the connection to both. Remove the port endpoint from the SOC dtsi to prevent regressions, this would need to be defined on the board DTS. Reported-by: Hiago De Franco Closes: https://lore.kernel.org/r/34yzygh3mbwpqr2re7nxmhyxy3s7qmqy4vhxvoyxnoguktriur@z66m7gvpqlia/ Fixes: edbbae7fba49 ("ARM: dts: imx7: add MIPI-DSI support") Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit a1c9f508db2543aae59ea2378b07a026f6c917cf Author: Kees Cook Date: Fri Feb 23 09:29:39 2024 -0800 iio: pressure: dlhl60d: Initialize empty DLH bytes 3 bytes were being read but 4 were being written. Explicitly initialize the unused bytes to 0 and refactor the loop to use direct array indexing, which appears to silence a Clang false positive warning[1]. Indent improvement included for readability of the fixed code. Link: https://github.com/ClangBuiltLinux/linux/issues/2000 [1] Fixes: ac78c6aa4a5d ("iio: pressure: Add driver for DLH pressure sensors") Signed-off-by: Kees Cook Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240223172936.it.875-kees@kernel.org Cc: Signed-off-by: Jonathan Cameron commit daec424cc57b33a28f8621eb7ac85f8bd327bd6b Author: Jean-Baptiste Maneyrol Date: Mon Feb 19 15:47:41 2024 +0000 iio: imu: inv_mpu6050: fix frequency setting when chip is off Track correctly FIFO state and apply ODR change before starting the chip. Without the fix, you cannot change ODR more than 1 time when data buffering is off. This restriction on a single pending ODR change should only apply when the FIFO is on. Fixes: 111e1abd0045 ("iio: imu: inv_mpu6050: use the common inv_sensors timestamp module") Cc: stable@vger.kernel.org Signed-off-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20240219154741.90601-1-inv.git-commit@tdk.com Signed-off-by: Jonathan Cameron commit 2ce507f57ba9c78c080d4a050ebdc97263239de8 Author: Ard Biesheuvel Date: Sat Feb 24 18:48:14 2024 +0100 efivarfs: Drop 'duplicates' bool parameter on efivar_init() The 'duplicates' bool argument is always true when efivar_init() is called from its only caller so let's just drop it instead. Signed-off-by: Ard Biesheuvel commit 9ca01c7adf3993044f59934082087ebb9f7df6d5 Author: Ard Biesheuvel Date: Sat Feb 24 18:45:41 2024 +0100 efivarfs: Drop redundant cleanup on fill_super() failure Al points out that kill_sb() will be called if efivarfs_fill_super() fails and so there is no point in cleaning up the efivar entry list. Reported-by: Alexander Viro Signed-off-by: Ard Biesheuvel commit f45812cc23fb74bef62d4eb8a69fe7218f4b9f2a Author: Tim Schumacher Date: Fri Jan 26 17:25:23 2024 +0100 efivarfs: Request at most 512 bytes for variable names Work around a quirk in a few old (2011-ish) UEFI implementations, where a call to `GetNextVariableName` with a buffer size larger than 512 bytes will always return EFI_INVALID_PARAMETER. There is some lore around EFI variable names being up to 1024 bytes in size, but this has no basis in the UEFI specification, and the upper bounds are typically platform specific, and apply to the entire variable (name plus payload). Given that Linux does not permit creating files with names longer than NAME_MAX (255) bytes, 512 bytes (== 256 UTF-16 characters) is a reasonable limit. Cc: # 6.1+ Signed-off-by: Tim Schumacher Signed-off-by: Ard Biesheuvel commit 0ac32a396e4f41e88df76ce2282423188a2d2ed0 Author: Willian Wang Date: Sat Feb 24 13:11:49 2024 -0300 ALSA: hda/realtek: Add special fixup for Lenovo 14IRP8 Lenovo Slim/Yoga Pro 9 14IRP8 requires a special fixup because there is a collision of its PCI SSID (17aa:3802) with Lenovo Yoga DuetITL 2021 codec SSID. Fixes: 3babae915f4c ("ALSA: hda/tas2781: Add tas2781 HDA driver") Link: https://bugzilla.kernel.org/show_bug.cgi?id=208555 Link: https://lore.kernel.org/all/d5b42e483566a3815d229270abd668131a0d9f3a.camel@irl.hu Cc: stable@vger.kernel.org Signed-off-by: Willian Wang Reviewed-by: Gergo Koteles Link: https://lore.kernel.org/r/170879111795.8.6687687359006700715.273812184@willian.wang Signed-off-by: Takashi Iwai commit 9fa8e282c2bfe93338e81a620a49f5903a745231 Author: Al Viro Date: Sat Feb 3 01:17:34 2024 -0500 ext4_get_link(): fix breakage in RCU mode 1) errors from ext4_getblk() should not be propagated to caller unless we are really sure that we would've gotten the same error in non-RCU pathwalk. 2) we leak buffer_heads if ext4_getblk() is successful, but bh is not uptodate. Signed-off-by: Al Viro commit 0511fdb4a378183ca18a9678d3d9044c8ec592c2 Author: Al Viro Date: Tue Sep 19 22:28:16 2023 -0400 cifs_get_link(): bail out in unsafe case ->d_revalidate() bails out there, anyway. It's not enough to prevent getting into ->get_link() in RCU mode, but that could happen only in a very contrieved setup. Not worth trying to do anything fancy here unless ->d_revalidate() stops kicking out of RCU mode at least in some cases. Reviewed-by: Christian Brauner Acked-by: Miklos Szeredi Signed-off-by: Al Viro commit 053fc4f755ad43cf35210677bcba798ccdc48d0c Author: Al Viro Date: Thu Sep 28 00:19:39 2023 -0400 fuse: fix UAF in rcu pathwalks ->permission(), ->get_link() and ->inode_get_acl() might dereference ->s_fs_info (and, in case of ->permission(), ->s_fs_info->fc->user_ns as well) when called from rcu pathwalk. Freeing ->s_fs_info->fc is rcu-delayed; we need to make freeing ->s_fs_info and dropping ->user_ns rcu-delayed too. Signed-off-by: Al Viro commit e31f0a57ae1ab2f6e17adb8e602bc120ad722232 Author: Al Viro Date: Wed Sep 20 00:12:00 2023 -0400 procfs: make freeing proc_fs_info rcu-delayed makes proc_pid_ns() safe from rcu pathwalk (put_pid_ns() is still synchronous, but that's not a problem - it does rcu-delay everything that needs to be) Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 47458802f6606f652cd0f6dc38cd52ce60ec0145 Author: Al Viro Date: Tue Sep 19 23:52:58 2023 -0400 procfs: move dropping pde and pid from ->evict_inode() to ->free_inode() that keeps both around until struct inode is freed, making access to them safe from rcu-pathwalk Acked-by: Christian Brauner Signed-off-by: Al Viro commit c1b967d03c5d570ed7b90a88031fa2af34bf5b20 Author: Al Viro Date: Wed Sep 27 22:11:26 2023 -0400 nfs: fix UAF on pathwalk running into umount NFS ->d_revalidate(), ->permission() and ->get_link() need to access some parts of nfs_server when called in RCU mode: server->flags server->caps *(server->io_stats) and, worst of all, call server->nfs_client->rpc_ops->have_delegation (the last one - as NFS_PROTO(inode)->have_delegation()). We really don't want to RCU-delay the entire nfs_free_server() (it would have to be done with schedule_work() from RCU callback, since it can't be made to run from interrupt context), but actual freeing of nfs_server and ->io_stats can be done via call_rcu() just fine. nfs_client part is handled simply by making nfs_free_client() use kfree_rcu(). Acked-by: Christian Brauner Signed-off-by: Al Viro commit 10a973fc4fb22390a8d362dd3265ec2c9a81d84c Author: Al Viro Date: Wed Sep 27 21:50:25 2023 -0400 nfs: make nfs_set_verifier() safe for use in RCU pathwalk nfs_set_verifier() relies upon dentry being pinned; if that's the case, grabbing ->d_lock stabilizes ->d_parent and guarantees that ->d_parent points to a positive dentry. For something we'd run into in RCU mode that is *not* true - dentry might've been through dentry_kill() just as we grabbed ->d_lock, with its parent going through the same just as we get to into nfs_set_verifier_locked(). It might get to detaching inode (and zeroing ->d_inode) before nfs_set_verifier_locked() gets to fetching that; we get an oops as the result. That can happen in nfs{,4} ->d_revalidate(); the call chain in question is nfs_set_verifier_locked() <- nfs_set_verifier() <- nfs_lookup_revalidate_delegated() <- nfs{,4}_do_lookup_revalidate(). We have checked that the parent had been positive, but that's done before we get to nfs_set_verifier() and it's possible for memory pressure to pick our dentry as eviction candidate by that time. If that happens, back-to-back attempts to kill dentry and its parent are quite normal. Sure, in case of eviction we'll fail the ->d_seq check in the caller, but we need to survive until we return there... Acked-by: Christian Brauner Signed-off-by: Al Viro commit 275655d3207b9e65d1561bf21c06a622d9ec1d43 Author: Al Viro Date: Fri Sep 29 20:24:34 2023 -0400 afs: fix __afs_break_callback() / afs_drop_open_mmap() race In __afs_break_callback() we might check ->cb_nr_mmap and if it's non-zero do queue_work(&vnode->cb_work). In afs_drop_open_mmap() we decrement ->cb_nr_mmap and do flush_work(&vnode->cb_work) if it reaches zero. The trouble is, there's nothing to prevent __afs_break_callback() from seeing ->cb_nr_mmap before the decrement and do queue_work() after both the decrement and flush_work(). If that happens, we might be in trouble - vnode might get freed before the queued work runs. __afs_break_callback() is always done under ->cb_lock, so let's make sure that ->cb_nr_mmap can change from non-zero to zero while holding ->cb_lock (the spinlock component of it - it's a seqlock and we don't need to mess with the counter). Acked-by: Christian Brauner Signed-off-by: Al Viro commit af072cf683acd2307e02378cfcf2502c49d2e127 Author: Al Viro Date: Tue Sep 19 20:18:59 2023 -0400 hfsplus: switch to rcu-delayed unloading of nls and freeing ->s_fs_info ->d_hash() and ->d_compare() use those, so we need to delay freeing them. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit a13d1a4de3b0fe3c41d818697d691c886c5585fa Author: Al Viro Date: Tue Sep 19 15:53:32 2023 -0400 exfat: move freeing sbi, upcase table and dropping nls into rcu-delayed helper That stuff can be accessed by ->d_hash()/->d_compare(); as it is, we have a hard-to-hit UAF if rcu pathwalk manages to get into ->d_hash() on a filesystem that is in process of getting shut down. Besides, having nls and upcase table cleanup moved from ->put_super() towards the place where sbi is freed makes for simpler failure exits. Acked-by: Christian Brauner Signed-off-by: Al Viro commit 529f89a9e4531e80c44871d7d0c30df6540c20e5 Author: Al Viro Date: Tue Sep 19 19:36:07 2023 -0400 affs: free affs_sb_info with kfree_rcu() one of the flags in it is used by ->d_hash()/->d_compare() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit cdb67fdeed72248475b1c849699495ef290a1634 Author: Al Viro Date: Fri Sep 29 21:11:41 2023 -0400 rcu pathwalk: prevent bogus hard errors from may_lookup() If lazy call of ->permission() returns a hard error, check that try_to_unlazy() succeeds before returning it. That both makes life easier for ->permission() instances and closes the race in ENOTDIR handling - it is possible that positive d_can_lookup() seen in link_path_walk() applies to the state *after* unlink() + mkdir(), while nd->inode matches the state prior to that. Normally seeing e.g. EACCES from permission check in rcu pathwalk means that with some timings non-rcu pathwalk would've run into the same; however, running into a non-executable regular file in the middle of a pathname would not get to permission check - it would fail with ENOTDIR instead. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 583340de1d8b2d6a474eccd5e7d9f7f42f061e1b Author: Al Viro Date: Thu Feb 1 21:10:01 2024 -0500 fs/super.c: don't drop ->s_user_ns until we free struct super_block itself Avoids fun races in RCU pathwalk... Same goes for freeing LSM shite hanging off super_block's arse. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit c4333eb541b92d91be57f757dccf6d4368516746 Author: Kent Overstreet Date: Sat Feb 24 01:18:45 2024 -0500 bcachefs: Fix check_snapshot() memcpy check_snapshot() copies the bch_snapshot to a temporary to easily handle older versions that don't have all the fields of the current version, but it lacked a min() to correctly handle keys newer and larger than the current version. Signed-off-by: Kent Overstreet commit 097471f9e458dbbe41e25394c1fb1ccd751f0bee Author: Kent Overstreet Date: Sat Feb 17 20:38:47 2024 -0500 bcachefs: Fix bch2_journal_flush_device_pins() If a journal write errored, the list of devices it was written to could be empty - we're not supposed to mark an empty replicas list. Signed-off-by: Kent Overstreet commit b58b1b883b9b702e25204dbe2b221eecc8ecd159 Author: Brian Foster Date: Thu Feb 15 12:16:05 2024 -0500 bcachefs: fix iov_iter count underflow on sub-block dio read bch2_direct_IO_read() checks the request offset and size for sector alignment and then falls through to a couple calculations to shrink the size of the request based on the inode size. The problem is that these checks round up to the fs block size, which runs the risk of underflowing iter->count if the block size happens to be large enough. This is triggered by fstest generic/361 with a 4k block size, which subsequently leads to a crash. To avoid this crash, check that the shorten length doesn't exceed the overall length of the iter. Fixes: Signed-off-by: Brian Foster Reviewed-by: Su Yue Signed-off-by: Kent Overstreet commit 204f45140faa0772d2ca1b3de96d1c0fb3db8e77 Author: Kent Overstreet Date: Sat Feb 24 19:14:36 2024 -0500 bcachefs: Fix BTREE_ITER_FILTER_SNAPSHOTS on inodes btree If we're in FILTER_SNAPSHOTS mode and we start scanning a range of the keyspace where no keys are visible in the current snapshot, we have a problem - we'll scan for a very long time before scanning terminates. Awhile back, this was fixed for most cases with peek_upto() (and assertions that enforce that it's being used). But the fix missed the fact that the inodes btree is different - every key offset is in a different snapshot tree, not just the inode field. Fixes: Signed-off-by: Kent Overstreet commit 04fee68dd99a53dbf0716e99270b66da26519daf Author: Kent Overstreet Date: Thu Feb 22 21:39:13 2024 -0500 bcachefs: Kill __GFP_NOFAIL in buffered read path Recently, we fixed our __GFP_NOFAIL usage in the readahead path, but the easy one in read_single_folio() (where wa can return an error) was missed - oops. Fixes: Signed-off-by: Kent Overstreet commit 1f626223a0c8753f8f5c651bf7bfc9e3cfdef7f7 Author: Kent Overstreet Date: Tue Feb 20 22:16:00 2024 -0500 bcachefs: fix backpointer_to_text() when dev does not exist Fixes: Signed-off-by: Kent Overstreet commit ab0a97cffa0bb3b529ca08b0caea772ddb3e0b5c Merge: 91403d50e9b13 20c8c4dafe93e Author: Linus Torvalds Date: Sat Feb 24 16:49:51 2024 -0800 Merge tag 'powerpc-6.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix a crash when hot adding a PCI device to an LPAR since recent changes - Fix nested KVM level-2 guest reboot failure due to empty 'arch_compat' Thanks to Amit Machhiwal, Aneesh Kumar K.V (IBM), Brian King, Gaurav Batra, and Vaibhav Jain. * tag 'powerpc-6.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat' powerpc/pseries/iommu: DLPAR add doesn't completely initialize pci_controller commit 91403d50e9b133eea5fb48e473c6f7c9968341a4 Merge: ac389bc0ca56e 65d4418c5002e Author: Linus Torvalds Date: Sat Feb 24 15:59:26 2024 -0800 Merge tag 'iommu-fixes-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Intel VT-d fixes for nested domain handling: - Cache invalidation for changes in a parent domain - Dirty tracking setting for parent and nested domains - Fix a constant-out-of-range warning - ARM SMMU fixes: - Fix CD allocation from atomic context when using SVA with SMMUv3 - Revert the conversion of SMMUv2 to domain_alloc_paging(), as it breaks the boot for Qualcomm MSM8996 devices - Restore SVA handle sharing in core code as it turned out there are still drivers relying on it * tag 'iommu-fixes-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/sva: Restore SVA handle sharing iommu/arm-smmu-v3: Do not use GFP_KERNEL under as spinlock iommu/vt-d: Fix constant-out-of-range warning iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking iommu/vt-d: Add missing dirty tracking set for parent domain iommu/vt-d: Wrap the dirty tracking loop to be a helper iommu/vt-d: Remove domain parameter for intel_pasid_setup_dirty_tracking() iommu/vt-d: Add missing device iotlb flush for parent domain iommu/vt-d: Update iotlb in nested domain attach iommu/vt-d: Add missing iotlb flush for parent domain iommu/vt-d: Add __iommu_flush_iotlb_psi() iommu/vt-d: Track nested domains in parent Revert "iommu/arm-smmu: Convert to domain_alloc_paging()" commit ac389bc0ca56e1a2f92b2a17e58298390a3879a8 Merge: f2e367d6ad3bd 5c6224bfabbf7 Author: Linus Torvalds Date: Sat Feb 24 15:53:40 2024 -0800 Merge tag 'cxl-fixes-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull cxl fixes from Dan Williams: "A collection of significant fixes for the CXL subsystem. The largest change in this set, that bordered on "new development", is the fix for the fact that the location of the new qos_class attribute did not match the Documentation. The fix ends up deleting more code than it added, and it has a new unit test to backstop basic errors in this interface going forward. So the "red-diff" and unit test saved the "rip it out and try again" response. In contrast, the new notification path for firmware reported CXL errors (CXL CPER notifications) has a locking context bug that can not be fixed with a red-diff. Given where the release cycle stands, it is not comfortable to squeeze in that fix in these waning days. So, that receives the "back it out and try again later" treatment. There is a regression fix in the code that establishes memory NUMA nodes for platform CXL regions. That has an ack from x86 folks. There are a couple more fixups for Linux to understand (reassemble) CXL regions instantiated by platform firmware. The policy around platforms that do not match host-physical-address with system-physical-address (i.e. systems that have an address translation mechanism between the address range reported in the ACPI CEDT.CFMWS and endpoint decoders) has been softened to abort driver load rather than teardown the memory range (can cause system hangs). Lastly, there is a robustness / regression fix for cases where the driver would previously continue in the face of error, and a fixup for PCI error notification handling. Summary: - Fix NUMA initialization from ACPI CEDT.CFMWS - Fix region assembly failures due to async init order - Fix / simplify export of qos_class information - Fix cxl_acpi initialization vs single-window-init failures - Fix handling of repeated 'pci_channel_io_frozen' notifications - Workaround platforms that violate host-physical-address == system-physical address assumptions - Defer CXL CPER notification handling to v6.9" * tag 'cxl-fixes-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/acpi: Fix load failures due to single window creation failure acpi/ghes: Remove CXL CPER notifications cxl/pci: Fix disabling memory if DVSEC CXL Range does not match a CFMWS window cxl/test: Add support for qos_class checking cxl: Fix sysfs export of qos_class for memdev cxl: Remove unnecessary type cast in cxl_qos_class_verify() cxl: Change 'struct cxl_memdev_state' *_perf_list to single 'struct cxl_dpa_perf' cxl/region: Allow out of order assembly of autodiscovered regions cxl/region: Handle endpoint decoders in cxl_region_find_decoder() x86/numa: Fix the sort compare func used in numa_fill_memblks() x86/numa: Fix the address overlap check in numa_fill_memblks() cxl/pci: Skip to handle RAS errors if CXL.mem device is detached commit a9dd9ba323114f366eb07f1d9630822f8df6cbb2 Author: Vasileios Amoiridis Date: Mon Feb 19 20:13:59 2024 +0100 iio: pressure: Fixes BMP38x and BMP390 SPI support According to the datasheet of BMP38x and BMP390 devices, for an SPI read operation the first byte that is returned needs to be dropped, and the rest of the bytes are the actual data returned from the sensor. Reviewed-by: Andy Shevchenko Fixes: 8d329309184d ("iio: pressure: bmp280: Add support for BMP380 sensor family") Signed-off-by: Vasileios Amoiridis Acked-by: Angel Iglesias Link: https://lore.kernel.org/r/20240219191359.18367-1-vassilisamir@gmail.com Cc: Signed-off-by: Jonathan Cameron commit f2e367d6ad3bdc527c2b14e759c2f010d6b2b7a1 Merge: 6d20acbf3e3a3 66ad2fbcdbeab Author: Linus Torvalds Date: Sat Feb 24 09:55:29 2024 -0800 Merge tag 'for-6.8/dm-fix-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fix from Mike Snitzer: - Fix DM integrity and verity targets to not use excessive stack when they recheck in the error path. * tag 'for-6.8/dm-fix-3' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm-integrity, dm-verity: reduce stack usage for recheck commit 6d20acbf3e3a32d331947dbc3802cf2d1a399e7d Merge: fef85269a19d2 9ddf190a7df77 Author: Linus Torvalds Date: Sat Feb 24 09:49:16 2024 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Six fixes: the four driver ones are pretty trivial. The larger two core changes are to try to fix various USB attached devices which have somewhat eccentric ways of handling the VPD and other mode pages which necessitate multiple revalidates (that were removed in the interests of efficiency) and updating the heuristic for supported VPD pages" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: jazz_esp: Only build if SCSI core is builtin scsi: smartpqi: Fix disable_managed_interrupts scsi: ufs: Uninitialized variable in ufshcd_devfreq_target() scsi: target: pscsi: Fix bio_put() for error case scsi: core: Consult supported VPD page list prior to fetching page scsi: sd: usb_storage: uas: Access media prior to querying device properties commit fef85269a19d277f23fc5ff08a3c356beeb54cb3 Merge: c6a597fcc7ad7 87aec499368d4 Author: Linus Torvalds Date: Sat Feb 24 09:46:05 2024 -0800 Merge tag 'i2c-for-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "A bugfix for host drivers" * tag 'i2c-for-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: imx: when being a target, mark the last read as processed commit c6a597fcc7ad7335a3ecf8f5287a0459f793a257 Merge: 603c04e27c3e9 f0f5c4894f89b Author: Linus Torvalds Date: Sat Feb 24 09:36:35 2024 -0800 Merge tag 'loongarch-fixes-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Fix two cpu-hotplug issues, fix the init sequence about FDT system, fix the coding style of dts, and fix the wrong CPUCFG ID handling of KVM" * tag 'loongarch-fixes-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: KVM: Streamline kvm_check_cpucfg() and improve comments LoongArch: KVM: Rename _kvm_get_cpucfg() to _kvm_get_cpucfg_mask() LoongArch: KVM: Fix input validation of _kvm_get_cpucfg() & kvm_check_cpucfg() LoongArch: dts: Minor whitespace cleanup LoongArch: Call early_init_fdt_scan_reserved_mem() earlier LoongArch: Update cpu_sibling_map when disabling nonboot CPUs LoongArch: Disable IRQ before init_fn() for nonboot CPUs commit 60caa8b33bd682a9ed99d1fc3f91d74e1acc9922 Author: Jean-Baptiste Maneyrol Date: Mon Feb 19 15:48:25 2024 +0000 iio: imu: inv_mpu6050: fix FIFO parsing when empty Now that we are reading the full FIFO in the interrupt handler, it is possible to have an emply FIFO since we are still receiving 1 interrupt per data. Handle correctly this case instead of having an error causing a reset of the FIFO. Fixes: 0829edc43e0a ("iio: imu: inv_mpu6050: read the full fifo when processing data") Cc: stable@vger.kernel.org Signed-off-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20240219154825.90656-1-inv.git-commit@tdk.com Signed-off-by: Jonathan Cameron commit 66ad2fbcdbeab0edfd40c5d94f32f053b98c2320 Author: Arnd Bergmann Date: Sat Feb 24 14:48:03 2024 +0100 dm-integrity, dm-verity: reduce stack usage for recheck The newly added integrity_recheck() function has another larger stack allocation, just like its caller integrity_metadata(). When it gets inlined, the combination of the two exceeds the warning limit for 32-bit architectures and possibly risks an overflow when this is called from a deep call chain through a file system: drivers/md/dm-integrity.c:1767:13: error: stack frame size (1048) exceeds limit (1024) in 'integrity_metadata' [-Werror,-Wframe-larger-than] 1767 | static void integrity_metadata(struct work_struct *w) Since the caller at this point is done using its checksum buffer, just reuse the same buffer in the new function to avoid the double allocation. [Mikulas: add "noinline" to integrity_recheck and verity_recheck. These functions are only called on error, so they shouldn't bloat the stack frame or code size of the caller.] Fixes: c88f5e553fe3 ("dm-integrity: recheck the integrity tag after a failure") Fixes: 9177f3c0dea6 ("dm-verity: recheck the hash after a failure") Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit f0a0fc10abb062d122db5ac4ed42f6d1ca342649 Author: Doug Smythies Date: Sat Feb 17 13:30:10 2024 -0800 cpufreq: intel_pstate: fix pstate limits enforcement for adjust_perf call back There is a loophole in pstate limit clamping for the intel_cpufreq CPU frequency scaling driver (intel_pstate in passive mode), schedutil CPU frequency scaling governor, HWP (HardWare Pstate) control enabled, when the adjust_perf call back path is used. Fix it. Fixes: a365ab6b9dfb cpufreq: intel_pstate: Implement the ->adjust_perf() callback Signed-off-by: Doug Smythies Signed-off-by: Rafael J. Wysocki commit 720da1e593b85a550593b415bf1d79a053133451 Author: Aneesh Kumar K.V (IBM) Date: Mon Jan 29 11:30:22 2024 +0530 mm/debug_vm_pgtable: fix BUG_ON with pud advanced test Architectures like powerpc add debug checks to ensure we find only devmap PUD pte entries. These debug checks are only done with CONFIG_DEBUG_VM. This patch marks the ptes used for PUD advanced test devmap pte entries so that we don't hit on debug checks on architecture like ppc64 as below. WARNING: CPU: 2 PID: 1 at arch/powerpc/mm/book3s64/radix_pgtable.c:1382 radix__pud_hugepage_update+0x38/0x138 .... NIP [c0000000000a7004] radix__pud_hugepage_update+0x38/0x138 LR [c0000000000a77a8] radix__pudp_huge_get_and_clear+0x28/0x60 Call Trace: [c000000004a2f950] [c000000004a2f9a0] 0xc000000004a2f9a0 (unreliable) [c000000004a2f980] [000d34c100000000] 0xd34c100000000 [c000000004a2f9a0] [c00000000206ba98] pud_advanced_tests+0x118/0x334 [c000000004a2fa40] [c00000000206db34] debug_vm_pgtable+0xcbc/0x1c48 [c000000004a2fc10] [c00000000000fd28] do_one_initcall+0x60/0x388 Also kernel BUG at arch/powerpc/mm/book3s64/pgtable.c:202! .... NIP [c000000000096510] pudp_huge_get_and_clear_full+0x98/0x174 LR [c00000000206bb34] pud_advanced_tests+0x1b4/0x334 Call Trace: [c000000004a2f950] [000d34c100000000] 0xd34c100000000 (unreliable) [c000000004a2f9a0] [c00000000206bb34] pud_advanced_tests+0x1b4/0x334 [c000000004a2fa40] [c00000000206db34] debug_vm_pgtable+0xcbc/0x1c48 [c000000004a2fc10] [c00000000000fd28] do_one_initcall+0x60/0x388 Link: https://lkml.kernel.org/r/20240129060022.68044-1-aneesh.kumar@kernel.org Fixes: 27af67f35631 ("powerpc/book3s64/mm: enable transparent pud hugepage") Signed-off-by: Aneesh Kumar K.V (IBM) Cc: Anshuman Khandual Cc: Michael Ellerman Cc: Signed-off-by: Andrew Morton commit 3a75cb05d53f4a6823a32deb078de1366954a804 Author: Nhat Pham Date: Mon Feb 19 19:01:21 2024 -0800 mm: cachestat: fix folio read-after-free in cache walk In cachestat, we access the folio from the page cache's xarray to compute its page offset, and check for its dirty and writeback flags. However, we do not hold a reference to the folio before performing these actions, which means the folio can concurrently be released and reused as another folio/page/slab. Get around this altogether by just using xarray's existing machinery for the folio page offsets and dirty/writeback states. This changes behavior for tmpfs files to now always report zeroes in their dirty and writeback counters. This is okay as tmpfs doesn't follow conventional writeback cache behavior: its pages get "cleaned" during swapout, after which they're no longer resident etc. Link: https://lkml.kernel.org/r/20240220153409.GA216065@cmpxchg.org Fixes: cf264e1329fb ("cachestat: implement cachestat syscall") Reported-by: Jann Horn Suggested-by: Matthew Wilcox Signed-off-by: Nhat Pham Signed-off-by: Johannes Weiner Tested-by: Jann Horn Cc: [6.4+] Signed-off-by: Andrew Morton commit 00130266f67fcf67d8a721f241e90a4b7b1f4cfc Author: Lorenzo Stoakes Date: Tue Feb 20 06:44:10 2024 +0000 MAINTAINERS: add memory mapping entry with reviewers Recently there have been a number of patches which have affected various aspects of the memory mapping logic as implemented in mm/mmap.c where it would have been useful for regular contributors to have been notified. Add an entry for this part of mm in particular with regular contributors tagged as reviewers. Link: https://lkml.kernel.org/r/20240220064410.4639-1-lstoakes@gmail.com Signed-off-by: Lorenzo Stoakes Acked-by: Vlastimil Babka Acked-by: Liam R. Howlett Signed-off-by: Andrew Morton commit 2774f256e7c0219e2b0a0894af1c76bdabc4f974 Author: Byungchul Park Date: Fri Feb 16 20:15:02 2024 +0900 mm/vmscan: fix a bug calling wakeup_kswapd() with a wrong zone index With numa balancing on, when a numa system is running where a numa node doesn't have its local memory so it has no managed zones, the following oops has been observed. It's because wakeup_kswapd() is called with a wrong zone index, -1. Fixed it by checking the index before calling wakeup_kswapd(). > BUG: unable to handle page fault for address: 00000000000033f3 > #PF: supervisor read access in kernel mode > #PF: error_code(0x0000) - not-present page > PGD 0 P4D 0 > Oops: 0000 [#1] PREEMPT SMP NOPTI > CPU: 2 PID: 895 Comm: masim Not tainted 6.6.0-dirty #255 > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS > rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 > RIP: 0010:wakeup_kswapd (./linux/mm/vmscan.c:7812) > Code: (omitted) > RSP: 0000:ffffc90004257d58 EFLAGS: 00010286 > RAX: ffffffffffffffff RBX: ffff88883fff0480 RCX: 0000000000000003 > RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88883fff0480 > RBP: ffffffffffffffff R08: ff0003ffffffffff R09: ffffffffffffffff > R10: ffff888106c95540 R11: 0000000055555554 R12: 0000000000000003 > R13: 0000000000000000 R14: 0000000000000000 R15: ffff88883fff0940 > FS: 00007fc4b8124740(0000) GS:ffff888827c00000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00000000000033f3 CR3: 000000026cc08004 CR4: 0000000000770ee0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 > PKRU: 55555554 > Call Trace: > > ? __die > ? page_fault_oops > ? __pte_offset_map_lock > ? exc_page_fault > ? asm_exc_page_fault > ? wakeup_kswapd > migrate_misplaced_page > __handle_mm_fault > handle_mm_fault > do_user_addr_fault > exc_page_fault > asm_exc_page_fault > RIP: 0033:0x55b897ba0808 > Code: (omitted) > RSP: 002b:00007ffeefa821a0 EFLAGS: 00010287 > RAX: 000055b89983acd0 RBX: 00007ffeefa823f8 RCX: 000055b89983acd0 > RDX: 00007fc2f8122010 RSI: 0000000000020000 RDI: 000055b89983acd0 > RBP: 00007ffeefa821a0 R08: 0000000000000037 R09: 0000000000000075 > R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 > R13: 00007ffeefa82410 R14: 000055b897ba5dd8 R15: 00007fc4b8340000 > Link: https://lkml.kernel.org/r/20240216111502.79759-1-byungchul@sk.com Signed-off-by: Byungchul Park Reported-by: Hyeongtak Ji Fixes: c574bbe917036 ("NUMA balancing: optimize page placement for memory tiering system") Reviewed-by: Oscar Salvador Cc: Baolin Wang Cc: "Huang, Ying" Cc: Johannes Weiner Cc: Signed-off-by: Andrew Morton commit 711d349174fd5cf906955249dd0163635e144a1e Author: Marco Elver Date: Mon Jan 29 11:07:02 2024 +0100 kasan: revert eviction of stack traces in generic mode This partially reverts commits cc478e0b6bdf, 63b85ac56a64, 08d7c94d9635, a414d4286f34, and 773688a6cb24 to make use of variable-sized stack depot records, since eviction of stack entries from stack depot forces fixed- sized stack records. Care was taken to retain the code cleanups by the above commits. Eviction was added to generic KASAN as a response to alleviating the additional memory usage from fixed-sized stack records, but this still uses more memory than previously. With the re-introduction of variable-sized records for stack depot, we can just switch back to non-evictable stack records again, and return back to the previous performance and memory usage baseline. Before (observed after a KASAN kernel boot): pools: 597 refcounted_allocations: 17547 refcounted_frees: 6477 refcounted_in_use: 11070 freelist_size: 3497 persistent_count: 12163 persistent_bytes: 1717008 After: pools: 319 refcounted_allocations: 0 refcounted_frees: 0 refcounted_in_use: 0 freelist_size: 0 persistent_count: 29397 persistent_bytes: 5183536 As can be seen from the counters, with a generic KASAN config, refcounted allocations and evictions are no longer used. Due to using variable-sized records, I observe a reduction of 278 stack depot pools (saving 4448 KiB) with my test setup. Link: https://lkml.kernel.org/r/20240129100708.39460-2-elver@google.com Fixes: cc478e0b6bdf ("kasan: avoid resetting aux_lock") Fixes: 63b85ac56a64 ("kasan: stop leaking stack trace handles") Fixes: 08d7c94d9635 ("kasan: memset free track in qlink_free") Fixes: a414d4286f34 ("kasan: handle concurrent kasan_record_aux_stack calls") Fixes: 773688a6cb24 ("kasan: use stack_depot_put for Generic mode") Signed-off-by: Marco Elver Reviewed-by: Andrey Konovalov Tested-by: Mikhail Gavrilov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Vincenzo Frascino Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 31639fd6cebd4fc3687cceda14814f140c9fd95b Author: Marco Elver Date: Mon Jan 29 11:07:01 2024 +0100 stackdepot: use variable size records for non-evictable entries With the introduction of stack depot evictions, each stack record is now fixed size, so that future reuse after an eviction can safely store differently sized stack traces. In all cases that do not make use of evictions, this wastes lots of space. Fix it by re-introducing variable size stack records (up to the max allowed size) for entries that will never be evicted. We know if an entry will never be evicted if the flag STACK_DEPOT_FLAG_GET is not provided, since a later stack_depot_put() attempt is undefined behavior. With my current kernel config that enables KASAN and also SLUB owner tracking, I observe (after a kernel boot) a whopping reduction of 296 stack depot pools, which translates into 4736 KiB saved. The savings here are from SLUB owner tracking only, because KASAN generic mode still uses refcounting. Before: pools: 893 allocations: 29841 frees: 6524 in_use: 23317 freelist_size: 3454 After: pools: 597 refcounted_allocations: 17547 refcounted_frees: 6477 refcounted_in_use: 11070 freelist_size: 3497 persistent_count: 12163 persistent_bytes: 1717008 [elver@google.com: fix -Wstringop-overflow warning] Link: https://lore.kernel.org/all/20240201135747.18eca98e@canb.auug.org.au/ Link: https://lkml.kernel.org/r/20240201090434.1762340-1-elver@google.com Link: https://lore.kernel.org/all/CABXGCsOzpRPZGg23QqJAzKnqkZPKzvieeg=W7sgjgi3q0pBo0g@mail.gmail.com/ Link: https://lkml.kernel.org/r/20240129100708.39460-1-elver@google.com Link: https://lore.kernel.org/all/CABXGCsOzpRPZGg23QqJAzKnqkZPKzvieeg=W7sgjgi3q0pBo0g@mail.gmail.com/ Fixes: 108be8def46e ("lib/stackdepot: allow users to evict stack traces") Signed-off-by: Marco Elver Reviewed-by: Andrey Konovalov Tested-by: Mikhail Gavrilov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Vincenzo Frascino Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 1c0cf6d19690141002889d72622b90fc01562ce4 Author: Ard Biesheuvel Date: Fri Feb 23 14:20:35 2024 +0100 crypto: arm64/neonbs - fix out-of-bounds access on short input The bit-sliced implementation of AES-CTR operates on blocks of 128 bytes, and will fall back to the plain NEON version for tail blocks or inputs that are shorter than 128 bytes to begin with. It will call straight into the plain NEON asm helper, which performs all memory accesses in granules of 16 bytes (the size of a NEON register). For this reason, the associated plain NEON glue code will copy inputs shorter than 16 bytes into a temporary buffer, given that this is a rare occurrence and it is not worth the effort to work around this in the asm code. The fallback from the bit-sliced NEON version fails to take this into account, potentially resulting in out-of-bounds accesses. So clone the same workaround, and use a temp buffer for short in/outputs. Fixes: fc074e130051 ("crypto: arm64/aes-neonbs-ctr - fallback to plain NEON for final chunk") Cc: Reported-by: syzbot+f1ceaa1a09ab891e1934@syzkaller.appspotmail.com Reviewed-by: Eric Biggers Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7cfc2ab3f0259212ecd130937893cb1d5c25ecc9 Author: Herbert Xu Date: Wed Feb 21 17:07:44 2024 +0800 crypto: lskcipher - Copy IV in lskcipher glue code always The lskcipher glue code for skcipher needs to copy the IV every time rather than only on the first and last request. Otherwise those algorithms that use IV to perform chaining may break, e.g., CBC. This is because crypto_skcipher_import/export do not include the IV as part of the saved state. Reported-by: syzbot+b90b904ef6bdfdafec1d@syzkaller.appspotmail.com Fixes: 662ea18d089b ("crypto: skcipher - Make use of internal state") Signed-off-by: Herbert Xu commit 2a770cdc4382b457ca3d43d03f0f0064f905a0d0 Author: Yunjian Wang Date: Tue Feb 20 11:12:07 2024 +0800 tun: Fix xdp_rxq_info's queue_index when detaching When a queue(tfile) is detached, we only update tfile's queue_index, but do not update xdp_rxq_info's queue_index. This patch fixes it. Fixes: 8bf5c4ee1889 ("tun: setup xdp_rxq_info") Signed-off-by: Yunjian Wang Link: https://lore.kernel.org/r/1708398727-46308-1-git-send-email-wangyunjian@huawei.com Signed-off-by: Jakub Kicinski commit 87aec499368d488c20292952d6d4be7cb9e49c5e Author: Corey Minyard Date: Wed Feb 21 20:27:13 2024 +0100 i2c: imx: when being a target, mark the last read as processed When being a target, NAK from the controller means that all bytes have been transferred. So, the last byte needs also to be marked as 'processed'. Otherwise index registers of backends may not increase. Fixes: f7414cd6923f ("i2c: imx: support slave mode for imx I2C driver") Signed-off-by: Corey Minyard Tested-by: Andrew Manley Reviewed-by: Andrew Manley Reviewed-by: Oleksij Rempel [wsa: fixed comment and commit message to properly describe the case] Signed-off-by: Wolfram Sang Signed-off-by: Andi Shyti commit 6d2fb472ea9ea27f765f10ba65ec73d30f6b7977 Author: Mickaël Salaün Date: Fri Feb 23 20:05:46 2024 +0100 apparmor: fix lsm_get_self_attr() In apparmor_getselfattr() when an invalid AppArmor attribute is requested, or a value hasn't been explicitly set for the requested attribute, the label passed to aa_put_label() is not properly initialized which can cause problems when the pointer value is non-NULL and AppArmor attempts to drop a reference on the bogus label object. Cc: Casey Schaufler Cc: John Johansen Fixes: 223981db9baf ("AppArmor: Add selfattr hooks") Signed-off-by: Mickaël Salaün Reviewed-by: Paul Moore [PM: description changes as discussed with MS] Signed-off-by: Paul Moore commit 86dc9693145bc3b2c21d2bc6a2563376ba8b15ff Author: Mickaël Salaün Date: Fri Feb 23 20:05:45 2024 +0100 selinux: fix lsm_get_self_attr() selinux_getselfattr() doesn't properly initialize the string pointer it passes to selinux_lsm_getattr() which can cause a problem when an attribute hasn't been explicitly set; selinux_lsm_getattr() returns 0/success, but does not set or initialize the string label/attribute. Failure to properly initialize the string causes problems later in selinux_getselfattr() when the function attempts to kfree() the string. Cc: Casey Schaufler Fixes: 762c934317e6 ("SELinux: Add selfattr hooks") Suggested-by: Paul Moore [PM: description changes as discussed in the thread] Signed-off-by: Mickaël Salaün Signed-off-by: Paul Moore commit cbec657208bdd4bff4ff31cac5924aa18817027c Author: Jernej Skrabec Date: Thu Feb 22 22:13:26 2024 +0100 arm64: dts: allwinner: h616: Add Orange Pi Zero 2W to Makefile Orange Pi Zero 2W dts file is not included in Makefile. Fix this. Fixes: c505ee1eae18 ("arm64: dts: allwinner: h616: add Orange Pi Zero 2W support") Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20240222211326.114955-1-jernej.skrabec@gmail.com Signed-off-by: Jernej Skrabec commit 603c04e27c3e9891ce7afa5cd6b496bfacff4206 Merge: e44baca779686 882a2a724ee96 Author: Linus Torvalds Date: Fri Feb 23 10:40:20 2024 -0800 Merge tag 'parisc-for-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture fixes from Helge Deller: "Fixes CPU hotplug, the parisc stack unwinder and two possible build errors in kprobes and ftrace area: - Fix CPU hotplug - Fix unaligned accesses and faults in stack unwinder - Fix potential build errors by always including asm-generic/kprobes.h - Fix build bug by add missing CONFIG_DYNAMIC_FTRACE check" * tag 'parisc-for-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix stack unwinder parisc/kprobes: always include asm-generic/kprobes.h parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check Revert "parisc: Only list existing CPUs in cpu_possible_mask" commit e44baca779686425d0ca02491731b6d688c6711d Merge: 86f01602a41fb dcb8e53e339e5 Author: Linus Torvalds Date: Fri Feb 23 10:31:28 2024 -0800 Merge tag 'arm-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull arm and RISC-V SoC fixes from Arnd Bergmann: "The Rockchip and IMX8 platforms get a number of fixes for dts files in order to address some misconfigurations, including a regression for USB-C support on some boards. The other dts fixes are part of a series by Rob Herring to clean up another class of dtc compiler warnings across all platforms, with a few others helping out as well. With this, we can enable the warning for the coming merge window without introducing regressions. Conor Dooley has collected fixes for RISC-V platforms, both for the dts files and for platofrm specific drivers. The ep93xx platform gets a regression for for its gpio descriptors" * tag 'arm-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (28 commits) ARM: dts: renesas: rcar-gen2: Add missing #interrupt-cells to DA9063 nodes cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback() arm64: dts: qcom: Fix interrupt-map cell sizes arm: dts: Fix dtc interrupt_map warnings arm64: dts: Fix dtc interrupt_provider warnings arm: dts: Fix dtc interrupt_provider warnings arm64: dts: freescale: Disable interrupt_map check ARM: ep93xx: Add terminator to gpiod_lookup_table riscv: dts: sifive: add missing #interrupt-cells to pmic arm64: dts: rockchip: Correct Indiedroid Nova GPIO Names arm64: dts: rockchip: Drop interrupts property from rk3328 pwm-rockchip node arm64: dts: rockchip: set num-cs property for spi on px30 arm64: dts: rockchip: minor rk3588 whitespace cleanup riscv: dts: starfive: replace underscores in node names bus: imx-weim: fix valid range check Revert "arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector" Revert "arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector" arm64: dts: tqma8mpql: fix audio codec iov-supply arm64: dts: rockchip: drop unneeded status from rk3588-jaguar gpio-leds ARM: dts: rockchip: Drop interrupts property from pwm-rockchip nodes ... commit 86f01602a41fb711f992ad6ab6483a4487829b4c Merge: 5efa18e8626aa d7b77a0d565b0 Author: Linus Torvalds Date: Fri Feb 23 10:26:43 2024 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "A simple fix to a definition in the CXL PMU driver, a couple of patches to restore SME control registers on the resume path (since Arm's fast model now clears them) and a revert for our jump label asm constraints after Geert noticed they broke the build with GCC 5.5. There was then the ensuing discussion about raising the minimum GCC (and corresponding binutils) versions at [1], but for now we'll keep things working as they were until that goes ahead. - Revert fix to jump label asm constraints, as it regresses the build with some GCC 5.5 toolchains. - Restore SME control registers when resuming from suspend - Fix incorrect filter definition in CXL PMU driver" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend arm64/sme: Restore SME registers on exit from suspend Revert "arm64: jump_label: use constraints "Si" instead of "i"" perf: CXL: fix CPMU filter value mask length commit d02c357e5bfa7dfd618b7b3015624beb71f58f1f Author: Sean Christopherson Date: Wed Feb 21 17:26:40 2024 -0800 KVM: x86/mmu: Retry fault before acquiring mmu_lock if mapping is changing Retry page faults without acquiring mmu_lock, and without even faulting the page into the primary MMU, if the resolved gfn is covered by an active invalidation. Contending for mmu_lock is especially problematic on preemptible kernels as the mmu_notifier invalidation task will yield mmu_lock (see rwlock_needbreak()), delay the in-progress invalidation, and ultimately increase the latency of resolving the page fault. And in the worst case scenario, yielding will be accompanied by a remote TLB flush, e.g. if the invalidation covers a large range of memory and vCPUs are accessing addresses that were already zapped. Faulting the page into the primary MMU is similarly problematic, as doing so may acquire locks that need to be taken for the invalidation to complete (the primary MMU has finer grained locks than KVM's MMU), and/or may cause unnecessary churn (getting/putting pages, marking them accessed, etc). Alternatively, the yielding issue could be mitigated by teaching KVM's MMU iterators to perform more work before yielding, but that wouldn't solve the lock contention and would negatively affect scenarios where a vCPU is trying to fault in an address that is NOT covered by the in-progress invalidation. Add a dedicated lockess version of the range-based retry check to avoid false positives on the sanity check on start+end WARN, and so that it's super obvious that checking for a racing invalidation without holding mmu_lock is unsafe (though obviously useful). Wrap mmu_invalidate_in_progress in READ_ONCE() to ensure that pre-checking invalidation in a loop won't put KVM into an infinite loop, e.g. due to caching the in-progress flag and never seeing it go to '0'. Force a load of mmu_invalidate_seq as well, even though it isn't strictly necessary to avoid an infinite loop, as doing so improves the probability that KVM will detect an invalidation that already completed before acquiring mmu_lock and bailing anyways. Do the pre-check even for non-preemptible kernels, as waiting to detect the invalidation until mmu_lock is held guarantees the vCPU will observe the worst case latency in terms of handling the fault, and can generate even more mmu_lock contention. E.g. the vCPU will acquire mmu_lock, detect retry, drop mmu_lock, re-enter the guest, retake the fault, and eventually re-acquire mmu_lock. This behavior is also why there are no new starvation issues due to losing the fairness guarantees provided by rwlocks: if the vCPU needs to retry, it _must_ drop mmu_lock, i.e. waiting on mmu_lock doesn't guarantee forward progress in the face of _another_ mmu_notifier invalidation event. Note, adding READ_ONCE() isn't entirely free, e.g. on x86, the READ_ONCE() may generate a load into a register instead of doing a direct comparison (MOV+TEST+Jcc instead of CMP+Jcc), but practically speaking the added cost is a few bytes of code and maaaaybe a cycle or three. Reported-by: Yan Zhao Closes: https://lore.kernel.org/all/ZNnPF4W26ZbAyGto@yzhao56-desk.sh.intel.com Reported-by: Friedrich Weber Cc: Kai Huang Cc: Yan Zhao Cc: Yuan Yao Cc: Xu Yilun Acked-by: Kai Huang Reviewed-by: Yan Zhao Link: https://lore.kernel.org/r/20240222012640.2820927-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 5efa18e8626aa34559b72981ebf5d1af60cb3976 Merge: 95e73fb16ad9c 5ef1dc40ffa6a Author: Linus Torvalds Date: Fri Feb 23 09:54:13 2024 -0800 Merge tag 's390-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Heiko Carstens: - Fix invalid -EBUSY on ccw_device_start() which can lead to failing device initialization - Add missing multiplication by 8 in __iowrite64_copy() to get the correct byte length before calling zpci_memcpy_toio() - Various config updates * tag 's390-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/cio: fix invalid -EBUSY on ccw_device_start s390: use the correct count for __iowrite64_copy() s390/configs: update default configurations s390/configs: enable INIT_STACK_ALL_ZERO in all configurations s390/configs: provide compat topic configuration target commit 95e73fb16ad9c93174f2604e47d98dc3537d8f95 Merge: e7768e65cd777 2597c9947b017 Author: Linus Torvalds Date: Fri Feb 23 09:43:21 2024 -0800 Merge tag 'mm-hotfixes-stable-2024-02-22-15-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "A batch of MM (and one non-MM) hotfixes. Ten are cc:stable and the remainder address post-6.7 issues or aren't considered appropriate for backporting" * tag 'mm-hotfixes-stable-2024-02-22-15-02' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: kasan: guard release_free_meta() shadow access with kasan_arch_is_ready() mm/damon/lru_sort: fix quota status loss due to online tunings mm/damon/reclaim: fix quota stauts loss due to online tunings MAINTAINERS: mailmap: update Shakeel's email address mm/damon/sysfs-schemes: handle schemes sysfs dir removal before commit_schemes_quota_goals mm: memcontrol: clarify swapaccount=0 deprecation warning mm/memblock: add MEMBLOCK_RSRV_NOINIT into flagname[] array mm/zswap: invalidate duplicate entry when !zswap_enabled lib/Kconfig.debug: TEST_IOV_ITER depends on MMU mm/swap: fix race when skipping swapcache mm/swap_state: update zswap LRU's protection range with the folio locked selftests/mm: uffd-unit-test check if huge page size is 0 mm/damon/core: check apply interval in damon_do_apply_schemes() mm: zswap: fix missing folio cleanup in writeback race path commit e7768e65cd777182553b98f5b4eaffb624974976 Merge: 06b7ef70b1f29 0e0c50e85a364 Author: Linus Torvalds Date: Fri Feb 23 09:23:54 2024 -0800 Merge tag 'for-6.8/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Stable fixes for 3 DM targets (integrity, verity and crypt) to address systemic failure that can occur if user provided pages map to the same block. - Fix DM crypt to not allow modifying data that being encrypted for authenticated encryption. - Fix DM crypt and verity targets to align their respective bvec_iter struct members to avoid the need for byte level access (due to __packed attribute) that is costly on some arches (like RISC). * tag 'for-6.8/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm-crypt, dm-integrity, dm-verity: bump target version dm-verity, dm-crypt: align "struct bvec_iter" correctly dm-crypt: recheck the integrity tag after a failure dm-crypt: don't modify the data when using authenticated encryption dm-verity: recheck the hash after a failure dm-integrity: recheck the integrity tag after a failure commit 06b7ef70b1f29de685ea80f0c1b8f0a0b0e16d18 Merge: b6d69282db550 72fa02fdf8330 Author: Linus Torvalds Date: Fri Feb 23 09:17:47 2024 -0800 Merge tag 'drm-fixes-2024-02-23' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This is the weekly drm fixes. Non-drivers there is a fbdev/sparc fix, syncobj, ttm and buddy fixes. On the driver side, ivpu, meson, i915 have a small fix each. Then amdgpu and xe have a bunch. Nouveau has some minor uapi additions to give userspace some useful info along with a Kconfig change to allow the new GSP firmware paths to be used by default on the GPUs it supports. Seems about the usual amount for this time of release cycle. fbdev: - fix sparc undefined reference syncobj: - fix sync obj fence waiting - handle NULL fence in syncobj eventfd code ttm: - fix invalid free buddy: - fix list handling - fix 32-bit build meson: - don't remove bridges from other drivers nouveau: - fix build warnings - add two minor info parameters - add a Kconfig to allow GSP by default on some GPUs ivpu: - allow fw to do initial tile config i915: - fix TV mode amdgpu: - Suspend/resume fixes - Backlight error fix - DCN 3.5 fixes - Misc fixes xe: - Remove support for persistent exec_queues - Drop a reduntant sysfs newline printout - A three-patch fix for a VM_BIND rebind optimization path - Fix a modpost warning on an xe KUNIT module" * tag 'drm-fixes-2024-02-23' of git://anongit.freedesktop.org/drm/drm: (27 commits) nouveau: add an ioctl to report vram usage nouveau: add an ioctl to return vram bar size. nouveau/gsp: add kconfig option to enable GSP paths by default drm/amdgpu: Fix the runtime resume failure issue drm/amd/display: fix null-pointer dereference on edid reading drm/amd/display: Fix memory leak in dm_sw_fini() drm/amd/display: fix input states translation error for dcn35 & dcn351 drm/amd/display: Fix potential null pointer dereference in dc_dmub_srv drm/amd/display: Only allow dig mapping to pwrseq in new asic drm/amd/display: adjust few initialization order in dm drm/syncobj: handle NULL fence in syncobj_eventfd_entry_func drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set drm/ttm: Fix an invalid freeing on already freed page in error path sparc: Fix undefined reference to fb_is_primary_device drm/xe: Fix modpost warning on xe_mocs kunit module drm/xe/xe_gt_idle: Drop redundant newline in name drm/xe: Return 2MB page size for compact 64k PTEs drm/xe: Add XE_VMA_PTE_64K VMA flag drm/xe: Fix xe_vma_set_pte_size drm/xe/uapi: Remove support for persistent exec_queues ... commit b6d69282db550689ab5980e06eedd23b64584a73 Merge: 9cd42be825fa1 9cec467d0502b Author: Linus Torvalds Date: Fri Feb 23 09:05:56 2024 -0800 Merge tag 'ata-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fixes from Niklas Cassel: - Do not try to set a sleeping device to standby. Sleep is a deeper sleep state than standby, and needs a reset to wake up the drive. A system resume will reset the port. Sending a command other than reset to a sleeping device is not wise, as the command will timeout (Damien Le Moal) - Do not try to put a device to standby twice during system shutdown. ata_dev_power_set_standby() is currently called twice during shutdown, once after the scsi device is removed, and another when ata_pci_shutdown_one() executes. Modify ata_dev_power_set_standby() to do nothing if the device is already in standby (Damien Le Moal) - Add a quirk for ASM1064 to fixup the number of implemented ports. We probe all ports that the hardware reports to be implemented. Probing ports that are not implemented causes significantly increased boot time (Andrey Jr. Melnikov) - Fix error handling for the ahci_ceva driver. Ensure that the ahci_ceva driver does a proper cleanup of its resources in the error path (Radhey Shyam Pandey) * tag 'ata-6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: libata-core: Do not call ata_dev_power_set_standby() twice ata: ahci_ceva: fix error handling for Xilinx GT PHY support ahci: asm1064: correct count of reported ports ata: libata-core: Do not try to set sleeping devices to standby commit 9cd42be825fa15609bf0616d70032d90e844282e Merge: 76d885a1e5450 ae366ba8576da Author: Linus Torvalds Date: Fri Feb 23 09:01:35 2024 -0800 Merge tag 'gpio-fixes-for-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fix from Bartosz Golaszewski: - fix a use-case where no pins are mapped to GPIOs in gpiochip_generic_config() * tag 'gpio-fixes-for-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: Handle no pin_ranges in gpiochip_generic_config() commit d82f32202e0df7bf40d4b67c8a4ff9cea32df4d9 Author: Conor Dooley Date: Fri Feb 23 11:31:31 2024 +0000 RISC-V: Ignore V from the riscv,isa DT property on older T-Head CPUs Before attempting to support the pre-ratification version of vector found on older T-Head CPUs, disallow "v" in riscv,isa on these platforms. The deprecated property has no clear way to communicate the specific version of vector that is supported and much of the vendor provided software puts "v" in the isa string. riscv,isa-extensions should be used instead. This should not be too much of a burden for these systems, as the vendor shipped devicetrees and firmware do not work with a mainline kernel and will require updating. We can limit this restriction to only ignore v in riscv,isa on CPUs that report T-Head's vendor ID and a zero marchid. Newer T-Head CPUs that support the ratified version of vector should report non-zero marchid, according to Guo Ren [1]. Link: https://lore.kernel.org/linux-riscv/CAJF2gTRy5eK73=d6s7CVy9m9pB8p4rAoMHM3cZFwzg=AuF7TDA@mail.gmail.com/ [1] Fixes: dc6667a4e7e3 ("riscv: Extending cpufeature.c to detect V-extension") Co-developed-by: Conor Dooley Signed-off-by: Conor Dooley Acked-by: Guo Ren Link: https://lore.kernel.org/r/20240223-tidings-shabby-607f086cb4d7@spud Signed-off-by: Palmer Dabbelt commit 76d885a1e5450d16252fcfc07d51ecdaaf712fa4 Merge: ffd2cb6b718e1 d56e460e19ea8 Author: Linus Torvalds Date: Fri Feb 23 08:58:47 2024 -0800 Merge tag 'hwmon-for-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: "Fix a global-out-of-bounds bug in nct6775 driver" * tag 'hwmon-for-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (nct6775) Fix access to temperature configuration registers commit 65d4418c5002ec5b0e529455bf4152fd43459079 Author: Jason Gunthorpe Date: Thu Feb 22 10:07:41 2024 -0400 iommu/sva: Restore SVA handle sharing Prior to commit 092edaddb660 ("iommu: Support mm PASID 1:n with sva domains") the code allowed a SVA handle to be bound multiple times to the same (mm, device) pair. This was alluded to in the kdoc comment, but we had understood this to be more a remark about allowing multiple devices, not a literal same-driver re-opening the same SVA. It turns out uacce and idxd were both relying on the core code to handle reference counting for same-device same-mm scenarios. As this looks hard to resolve in the drivers bring it back to the core code. The new design has changed the meaning of the domain->users refcount to refer to the number of devices that are sharing that domain for the same mm. This is part of the design to lift the SVA domain de-duplication out of the drivers. Return the old behavior by explicitly de-duplicating the struct iommu_sva handle. The same (mm, device) will return the same handle pointer and the core code will handle tracking this. The last unbind of the handle will destroy it. Fixes: 092edaddb660 ("iommu: Support mm PASID 1:n with sva domains") Reported-by: Zhangfei Gao Closes: https://lore.kernel.org/all/20240221110658.529-1-zhangfei.gao@linaro.org/ Tested-by: Zhangfei Gao Signed-off-by: Jason Gunthorpe Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/0-v1-9455fc497a6f+3b4-iommu_sva_sharing_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 16b1b39126e5d5d49eedb2245f9e781b22bde926 Merge: 4578f989ed6b7 b5bf7778b7221 Author: Joerg Roedel Date: Fri Feb 23 16:43:53 2024 +0100 Merge tag 'arm-smmu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into iommu/fixes Arm SMMU fixes for 6.8 - Fix CD allocation from atomic context when using SVA with SMMUv3 - Revert the conversion of SMMUv2 to domain_alloc_paging(), as it breaks the boot for Qualcomm MSM8996 devices commit f79ee78767ca60e7a2c89eacd2dbdf237d97e838 Author: Rob Clark Date: Sat Feb 17 16:02:26 2024 +0100 soc: qcom: pmic_glink: Fix boot when QRTR=m We need to bail out before adding/removing devices if we are going to -EPROBE_DEFER. Otherwise boot can get stuck in a probe deferral loop due to a long-standing issue in driver core (see commit fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER")). Deregistering the altmode child device can potentially also trigger bugs in the DRM bridge implementation, which does not expect bridges to go away. [DB: slightly fixed commit message by adding the word 'commit'] Suggested-by: Dmitry Baryshkov Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20231213210644.8702-1-robdclark@gmail.com [ johan: rebase on 6.8-rc4, amend commit message and mention DRM ] Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver") Cc: # 6.3 Cc: Bjorn Andersson Signed-off-by: Johan Hovold Reviewed-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240217150228.5788-5-johan+linaro@kernel.org commit b979f2d50a099f3402418d7ff5f26c3952fb08bb Author: Johan Hovold Date: Sat Feb 17 16:02:25 2024 +0100 soc: qcom: pmic_glink_altmode: fix drm bridge use-after-free A recent DRM series purporting to simplify support for "transparent bridges" and handling of probe deferrals ironically exposed a use-after-free issue on pmic_glink_altmode probe deferral. This has manifested itself as the display subsystem occasionally failing to initialise and NULL-pointer dereferences during boot of machines like the Lenovo ThinkPad X13s. Specifically, the dp-hpd bridge is currently registered before all resources have been acquired which means that it can also be deregistered on probe deferrals. In the meantime there is a race window where the new aux bridge driver (or PHY driver previously) may have looked up the dp-hpd bridge and stored a (non-reference-counted) pointer to the bridge which is about to be deallocated. When the display controller is later initialised, this triggers a use-after-free when attaching the bridges: dp -> aux -> dp-hpd (freed) which may, for example, result in the freed bridge failing to attach: [drm:drm_bridge_attach [drm]] *ERROR* failed to attach bridge /soc@0/phy@88eb000 to encoder TMDS-31: -16 or a NULL-pointer dereference: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 ... Call trace: drm_bridge_attach+0x70/0x1a8 [drm] drm_aux_bridge_attach+0x24/0x38 [aux_bridge] drm_bridge_attach+0x80/0x1a8 [drm] dp_bridge_init+0xa8/0x15c [msm] msm_dp_modeset_init+0x28/0xc4 [msm] The DRM bridge implementation is clearly fragile and implicitly built on the assumption that bridges may never go away. In this case, the fix is to move the bridge registration in the pmic_glink_altmode driver to after all resources have been looked up. Incidentally, with the new dp-hpd bridge implementation, which registers child devices, this is also a requirement due to a long-standing issue in driver core that can otherwise lead to a probe deferral loop (see commit fbc35b45f9f6 ("Add documentation on meaning of -EPROBE_DEFER")). [DB: slightly fixed commit message by adding the word 'commit'] Fixes: 080b4e24852b ("soc: qcom: pmic_glink: Introduce altmode support") Fixes: 2bcca96abfbf ("soc: qcom: pmic-glink: switch to DRM_AUX_HPD_BRIDGE") Cc: # 6.3 Cc: Bjorn Andersson Cc: Dmitry Baryshkov Signed-off-by: Johan Hovold Reviewed-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240217150228.5788-4-johan+linaro@kernel.org commit e5ca263508f7e9d2cf711edf3258d11ca087885c Author: Johan Hovold Date: Sat Feb 17 16:02:24 2024 +0100 drm/bridge: aux-hpd: separate allocation and registration Combining allocation and registration is an anti-pattern that should be avoided. Add two new functions for allocating and registering an dp-hpd bridge with a proper 'devm' prefix so that it is clear that these are device managed interfaces. devm_drm_dp_hpd_bridge_alloc() devm_drm_dp_hpd_bridge_add() The new interface will be used to fix a use-after-free bug in the Qualcomm PMIC GLINK driver and may prevent similar issues from being introduced elsewhere. The existing drm_dp_hpd_bridge_register() is reimplemented using the above and left in place for now. Signed-off-by: Johan Hovold Reviewed-by: Bjorn Andersson Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20240217150228.5788-3-johan+linaro@kernel.org commit eba2eb2495f47690400331c722868902784e59de Author: Richard Fitzgerald Date: Wed Feb 21 12:37:10 2024 +0000 ASoC: soc-card: Fix missing locking in snd_soc_card_get_kcontrol() snd_soc_card_get_kcontrol() must be holding a read lock on card->controls_rwsem while walking the controls list. Compare with snd_ctl_find_numid(). The existing function is renamed snd_soc_card_get_kcontrol_locked() so that it can be called from contexts that are already holding card->controls_rwsem (for example, control get/put functions). There are few direct or indirect callers of snd_soc_card_get_kcontrol(), and most are safe. Three require changes, which have been included in this patch: codecs/cs35l45.c: cs35l45_activate_ctl() is called from a control put() function so is changed to call snd_soc_card_get_kcontrol_locked(). codecs/cs35l56.c: cs35l56_sync_asp1_mixer_widgets_with_firmware() is called from control get()/put() functions so is changed to call snd_soc_card_get_kcontrol_locked(). fsl/fsl_xcvr.c: fsl_xcvr_activate_ctl() is called from three places, one of which already holds card->controls_rwsem: 1. fsl_xcvr_mode_put(), a control put function, which will already be holding card->controls_rwsem. 2. fsl_xcvr_startup(), a DAI startup function. 3. fsl_xcvr_shutdown(), a DAI shutdown function. To fix this, fsl_xcvr_activate_ctl() has been changed to call snd_soc_card_get_kcontrol_locked() so that it is safe to call directly from fsl_xcvr_mode_put(). The fsl_xcvr_startup() and fsl_xcvr_shutdown() functions have been changed to take a read lock on card->controls_rsem() around calls to fsl_xcvr_activate_ctl(). While this is not very elegant, it keeps the change small, to avoid this patch creating a large collateral churn in fsl/fsl_xcvr.c. Analysis of other callers of snd_soc_card_get_kcontrol() is that they do not need any changes, they are not holding card->controls_rwsem when they call snd_soc_card_get_kcontrol(). Direct callers of snd_soc_card_get_kcontrol(): fsl/fsl_spdif.c: fsl_spdif_dai_probe() - DAI probe function fsl/fsl_micfil.c: voice_detected_fn() - IRQ handler Indirect callers via soc_component_notify_control(): codecs/cs42l43: cs42l43_mic_shutter() - IRQ handler codecs/cs42l43: cs42l43_spk_shutter() - IRQ handler codecs/ak4118.c: ak4118_irq_handler() - IRQ handler codecs/wm_adsp.c: wm_adsp_write_ctl() - not currently used Indirect callers via snd_soc_limit_volume(): qcom/sc8280xp.c: sc8280xp_snd_init() - DAIlink init function ti/rx51.c: rx51_aic34_init() - DAI init function I don't have hardware to test the fsl/*, qcom/sc828xp.c, ti/rx51.c and ak4118.c changes. Backport note: The fsl/, qcom/, cs35l45, cs35l56 and cs42l43 callers were added since the Fixes commit so won't all be present on older kernels. Signed-off-by: Richard Fitzgerald Fixes: 209c6cdfd283 ("ASoC: soc-card: move snd_soc_card_get_kcontrol() to soc-card") Link: https://lore.kernel.org/r/20240221123710.690224-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit c1947ce61ff4cd4de2fe5f72423abedb6dc83011 Author: Gergo Koteles Date: Fri Feb 23 12:34:30 2024 +0100 ALSA: hda/realtek: tas2781: enable subwoofer volume control The volume of subwoofer channels is always at maximum with the ALC269_FIXUP_THINKPAD_ACPI chain. Use ALC285_FIXUP_THINKPAD_HEADSET_JACK to align it to the master volume. Link: https://bugzilla.kernel.org/show_bug.cgi?id=208555#c827 Fixes: 3babae915f4c ("ALSA: hda/tas2781: Add tas2781 HDA driver") Cc: Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/7ffae10ebba58601d25fe2ff8381a6ae3a926e62.1708687813.git.soyer@irl.hu Signed-off-by: Takashi Iwai commit dcb8e53e339e534eecfd86fb21674d7eef7380eb Merge: 4bd5b4c2eb438 8c987693dc2d2 Author: Arnd Bergmann Date: Fri Feb 23 13:54:36 2024 +0100 Merge tag 'renesas-fixes-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes Renesas fixes for v6.8 - Add missing #interrupt-cells to DA9063 nodes. * tag 'renesas-fixes-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: renesas: rcar-gen2: Add missing #interrupt-cells to DA9063 nodes Link: https://lore.kernel.org/r/cover.1708597150.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 4bd5b4c2eb438d665b376bd3011f9e5de6bae9f8 Merge: fe514e1775322 ce6b6d1513965 Author: Arnd Bergmann Date: Fri Feb 23 13:54:07 2024 +0100 Merge tag 'riscv-dt-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes RISC-V Devicetree fixes for v6.8-rc6 Two fixes for W=2 issues in devicetrees, which should constitute fixes for all reasonable-to-fix W=2 problems on RISC-V. The others are caused by standard USB and MMC property names containing underscores that are not likely to ever change. Signed-off-by: Conor Dooley * tag 'riscv-dt-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: sifive: add missing #interrupt-cells to pmic riscv: dts: starfive: replace underscores in node names Link: https://lore.kernel.org/r/20240221-foil-glade-09dbf1aa3fe2@spud Signed-off-by: Arnd Bergmann commit fe514e1775322ec19bd584a303fba276c9168870 Merge: 4d934f94adc97 6dd9a236042e3 Author: Arnd Bergmann Date: Fri Feb 23 13:53:54 2024 +0100 Merge tag 'riscv-soc-drivers-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes RISC-V SoC driver fixes for v6.8-rc6 A fix for a kconfig symbol whose help text has been unhelpful since its introduction. Signed-off-by: Conor Dooley * tag 'riscv-soc-drivers-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: soc: microchip: Fix POLARFIRE_SOC_SYS_CTRL input prompt Link: https://lore.kernel.org/r/20240221-irate-outrage-cf7f96f83074@spud Signed-off-by: Arnd Bergmann commit 4d934f94adc97673558ba6bc73a325dcd811ba1c Merge: bcb323bd10a1b 0abcac4fe3ca3 Author: Arnd Bergmann Date: Fri Feb 23 13:53:43 2024 +0100 Merge tag 'riscv-firmware-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes Microchip firmware driver fixes for v6.8-rc6 A single fix for me incorrectly using sizeof(). Signed-off-by: Conor Dooley * tag 'riscv-firmware-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: firmware: microchip: fix wrong sizeof argument Link: https://lore.kernel.org/r/20240221-recognize-dust-4bb575f4e67b@spud Signed-off-by: Arnd Bergmann commit bcb323bd10a1b6e2a041f0730e094f522d18c709 Merge: 704dccec0d490 9bd405c48b0ac Author: Arnd Bergmann Date: Fri Feb 23 13:53:30 2024 +0100 Merge tag 'riscv-cache-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes RISC-V Cache driver fixes for v6.8-rc6 A single fix for an inconsistency reported during CIP review by Pavel in the newly added ax45mp cache driver. Signed-off-by: Conor Dooley * tag 'riscv-cache-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback() Link: https://lore.kernel.org/r/20240221-keenness-handheld-b930aaa77708@spud Signed-off-by: Arnd Bergmann commit b0b1210bc150fbd741b4b9fce8a24541306b40fc Author: Geoff Levand Date: Wed Feb 21 11:27:29 2024 +0900 ps3/gelic: Fix SKB allocation Commit 3ce4f9c3fbb3 ("net/ps3_gelic_net: Add gelic_descr structures") of 6.8-rc1 had a copy-and-paste error where the pointer that holds the allocated SKB (struct gelic_descr.skb) was set to NULL after the SKB was allocated. This resulted in a kernel panic when the SKB pointer was accessed. This fix moves the initialization of the gelic_descr to before the SKB is allocated. Reported-by: sambat goson Fixes: 3ce4f9c3fbb3 ("net/ps3_gelic_net: Add gelic_descr structures") Signed-off-by: Geoff Levand Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 734f06db599f66d6a159c78abfdbadfea3b7d43b Author: Vladimir Oltean Date: Wed Feb 21 00:34:42 2024 +0200 net: dpaa: fman_memac: accept phy-interface-type = "10gbase-r" in the device tree Since commit 5d93cfcf7360 ("net: dpaa: Convert to phylink"), we support the "10gbase-r" phy-mode through a driver-based conversion of "xgmii", but we still don't actually support it when the device tree specifies "10gbase-r" proper. This is because boards such as LS1046A-RDB do not define pcs-handle-names (for whatever reason) in the ethernet@f0000 device tree node, and the code enters through this code path: err = of_property_match_string(mac_node, "pcs-handle-names", "xfi"); // code takes neither branch and falls through if (err >= 0) { (...) } else if (err != -EINVAL && err != -ENODATA) { goto _return_fm_mac_free; } (...) /* For compatibility, if pcs-handle-names is missing, we assume this * phy is the first one in pcsphy-handle */ err = of_property_match_string(mac_node, "pcs-handle-names", "sgmii"); if (err == -EINVAL || err == -ENODATA) pcs = memac_pcs_create(mac_node, 0); // code takes this branch else if (err < 0) goto _return_fm_mac_free; else pcs = memac_pcs_create(mac_node, err); // A default PCS is created and saved in "pcs" // This determination fails and mistakenly saves the default PCS // memac->sgmii_pcs instead of memac->xfi_pcs, because at this // stage, mac_dev->phy_if == PHY_INTERFACE_MODE_10GBASER. if (err && mac_dev->phy_if == PHY_INTERFACE_MODE_XGMII) memac->xfi_pcs = pcs; else memac->sgmii_pcs = pcs; In other words, in the absence of pcs-handle-names, the default xfi_pcs assignment logic only works when in the device tree we have PHY_INTERFACE_MODE_XGMII. By reversing the order between the fallback xfi_pcs assignment and the "xgmii" overwrite with "10gbase-r", we are able to support both values in the device tree, with identical behavior. Currently, it is impossible to make the s/xgmii/10gbase-r/ device tree conversion, because it would break forward compatibility (new device tree with old kernel). The only way to modify existing device trees to phy-interface-mode = "10gbase-r" is to fix stable kernels to accept this value and handle it properly. One reason why the conversion is desirable is because with pre-phylink kernels, the Aquantia PHY driver used to warn about the improper use of PHY_INTERFACE_MODE_XGMII [1]. It is best to have a single (latest) device tree that works with all supported stable kernel versions. Note that the blamed commit does not constitute a regression per se. Older stable kernels like 6.1 still do not work with "10gbase-r", but for a different reason. That is a battle for another time. [1] https://lore.kernel.org/netdev/20240214-ls1046-dts-use-10gbase-r-v1-1-8c2d68547393@concurrent-rt.com/ Fixes: 5d93cfcf7360 ("net: dpaa: Convert to phylink") Signed-off-by: Vladimir Oltean Reviewed-by: Sean Anderson Acked-by: Madalin Bucur Signed-off-by: David S. Miller commit 9ee485bdda68d6d3f5728cbe3150eb9013d7d22b Author: Johan Hovold Date: Sat Feb 17 16:02:23 2024 +0100 drm/bridge: aux-hpd: fix OF node leaks The two device node references taken during allocation need to be dropped when the auxiliary device is freed. Fixes: 6914968a0b52 ("drm/bridge: properly refcount DT nodes in aux bridge drivers") Cc: Dmitry Baryshkov Cc: Neil Armstrong Signed-off-by: Johan Hovold Reviewed-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20240217150228.5788-2-johan+linaro@kernel.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240217150228.5788-2-johan+linaro@kernel.org commit 5ef1d8c1ddbf696e47b226e11888eaf8d9e8e807 Author: Sean Christopherson Date: Fri Feb 16 17:34:30 2024 -0800 KVM: SVM: Flush pages under kvm->lock to fix UAF in svm_register_enc_region() Do the cache flush of converted pages in svm_register_enc_region() before dropping kvm->lock to fix use-after-free issues where region and/or its array of pages could be freed by a different task, e.g. if userspace has __unregister_enc_region_locked() already queued up for the region. Note, the "obvious" alternative of using local variables doesn't fully resolve the bug, as region->pages is also dynamically allocated. I.e. the region structure itself would be fine, but region->pages could be freed. Flushing multiple pages under kvm->lock is unfortunate, but the entire flow is a rare slow path, and the manual flush is only needed on CPUs that lack coherency for encrypted memory. Fixes: 19a23da53932 ("Fix unsynchronized access to sev members through svm_register_enc_region") Reported-by: Gabe Kirkpatrick Cc: Josh Eads Cc: Peter Gonda Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20240217013430.2079561-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 85df6b5a6658c788d7e27d52ea334aa83abcbf56 Author: Jaroslav Kysela Date: Thu Feb 22 18:36:49 2024 +0100 ALSA: pcm: clarify and fix default msbits value for all formats Return used most significant bits from sample bit-width rather than the whole physical sample word size. The starting bit offset is defined in the format itself. The behaviour is not changed for 32-bit formats like S32_LE. But with this change - msbits value 24 instead 32 is returned for 24-bit formats like S24_LE etc. Also, commit 2112aa034907 ("ALSA: pcm: Introduce MSBITS subformat interface") compares sample bit-width not physical sample bit-width to reset MSBITS_MAX bit from the subformat bitmask. Probably no applications are using msbits value for other than S32_LE/U32_LE formats, because no drivers are reducing msbits value for other formats (with the msb offset) at the moment. For sanity, increase PCM protocol version, letting the user space to detect the changed behaviour. Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20240222173649.1447549-1-perex@perex.cz Signed-off-by: Takashi Iwai commit 413dafc8170fcb925fb17af8842f06af305f8e0b Author: Felix Fietkau Date: Wed Feb 21 15:05:35 2024 +0100 wifi: mac80211: only call drv_sta_rc_update for uploaded stations When a station has not been uploaded yet, receiving SMPS or channel width notification action frames can lead to rate_control_rate_update calling drv_sta_rc_update with uninitialized driver private data. Fix this by adding a missing check for sta->uploaded. Signed-off-by: Felix Fietkau Link: https://msgid.link/20240221140535.16102-1-nbd@nbd.name Signed-off-by: Johannes Berg commit df2515a17914ecfc2a0594509deaf7fcb8d191ac Author: Tadeusz Struk Date: Thu Feb 22 17:30:53 2024 +0100 dmaengine: ptdma: use consistent DMA masks The PTDMA driver sets DMA masks in two different places for the same device inconsistently. First call is in pt_pci_probe(), where it uses 48bit mask. The second call is in pt_dmaengine_register(), where it uses a 64bit mask. Using 64bit dma mask causes IO_PAGE_FAULT errors on DMA transfers between main memory and other devices. Without the extra call it works fine. Additionally the second call doesn't check the return value so it can silently fail. Remove the superfluous dma_set_mask() call and only use 48bit mask. Cc: stable@vger.kernel.org Fixes: b0b4a6b10577 ("dmaengine: ptdma: register PTDMA controller as a DMA resource") Reviewed-by: Basavaraj Natikar Signed-off-by: Tadeusz Struk Link: https://lore.kernel.org/r/20240222163053.13842-1-tstruk@gigaio.com Signed-off-by: Vinod Koul commit 1878840a0328dac1c85d29fee31456ec26fcc01c Author: Frank Li Date: Mon Feb 19 10:59:39 2024 -0500 dmaengine: fsl-qdma: add __iomem and struct in union to fix sparse warning Fix below sparse warnings. drivers/dma/fsl-qdma.c:645:50: sparse: warning: incorrect type in argument 2 (different address spaces) drivers/dma/fsl-qdma.c:645:50: sparse: expected void [noderef] __iomem *addr drivers/dma/fsl-qdma.c:645:50: sparse: got void drivers/dma/fsl-qdma.c:387:15: sparse: sparse: restricted __le32 degrades to integer drivers/dma/fsl-qdma.c:390:19: sparse: expected restricted __le64 [usertype] data drivers/dma/fsl-qdma.c:392:13: sparse: expected unsigned int [assigned] [usertype] cmd QDMA decriptor have below 3 kind formats. (little endian) Compound Command Descriptor Format ┌──────┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │Offset│3│3│2│2│2│2│2│2│2│2│2│2│1│1│1│1│1│1│1│1│1│1│ │ │ │ │ │ │ │ │ │ │ │ │1│0│9│8│7│6│5│4│3│2│1│0│9│8│7│6│5│4│3│2│1│0│9│8│7│6│5│4│3│2│1│0│ ├──────┼─┴─┼─┴─┴─┼─┴─┴─┼─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─┴─┴─┴─┴─┤ │ 0x0C │DD │ - │QUEUE│ - │ ADDR │ ├──────┼───┴─────┴─────┴───────────────────────────────┴───────────────┤ │ 0x08 │ ADDR │ ├──────┼─────┬─────────────────┬───────────────────────────────────────┤ │ 0x04 │ FMT │ OFFSET │ - │ ├──────┼─┬─┬─┴─────────────────┴───────────────────────┬───────────────┤ │ │ │S│ │ │ │ 0x00 │-│E│ - │ STATUS │ │ │ │R│ │ │ └──────┴─┴─┴───────────────────────────────────────────┴───────────────┘ Compound S/G Table Entry Format ┌──────┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │Offset│3│3│2│2│2│2│2│2│2│2│2│2│1│1│1│1│1│1│1│1│1│1│ │ │ │ │ │ │ │ │ │ │ │ │1│0│9│8│7│6│5│4│3│2│1│0│9│8│7│6│5│4│3│2│1│0│9│8│7│6│5│4│3│2│1│0│ ├──────┼─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┼─┴─┴─┴─┴─┴─┴─┴─┤ │ 0x0C │ - │ ADDR │ ├──────┼───────────────────────────────────────────────┴───────────────┤ │ 0x08 │ ADDR │ ├──────┼─┬─┬───────────────────────────────────────────────────────────┤ │ 0x04 │E│F│ LENGTH │ ├──────┼─┴─┴─────────────────────────────────┬─────────────────────────┤ │ 0x00 │ - │ OFFSET │ └──────┴─────────────────────────────────────┴─────────────────────────┘ Source/Destination Descriptor Format ┌──────┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │Offset│3│3│2│2│2│2│2│2│2│2│2│2│1│1│1│1│1│1│1│1│1│1│ │ │ │ │ │ │ │ │ │ │ │ │1│0│9│8│7│6│5│4│3│2│1│0│9│8│7│6│5│4│3│2│1│0│9│8│7│6│5│4│3│2│1│0│ ├──────┼─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ │ 0x0C │ CMD │ ├──────┼───────────────────────────────────────────────────────────────┤ │ 0x08 │ - │ ├──────┼───────────────┬───────────────────────┬───────────────────────┤ │ 0x04 │ - │ S[D]SS │ S[D]SD │ ├──────┼───────────────┴───────────────────────┴───────────────────────┤ │ 0x00 │ - │ └──────┴───────────────────────────────────────────────────────────────┘ Previous code use 64bit 'data' map to 0x8 and 0xC. In little endian system CMD is high part of 64bit 'data'. It is correct by left shift 32. But in big endian system, shift left 32 will write to 0x8 position. Sparse detect this problem. Add below field ot match 'Source/Destination Descriptor Format'. struct { __le32 __reserved2; __le32 cmd; } __packed; Using ddf(sdf)->cmd save to correct posistion regardless endian. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402081929.mggOTHaZ-lkp@intel.com/ Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240219155939.611237-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit f0f5c4894f89bac9074b45bccc447c3659a0fa6f Author: WANG Xuerui Date: Fri Feb 23 14:36:31 2024 +0800 LoongArch: KVM: Streamline kvm_check_cpucfg() and improve comments All the checks currently done in kvm_check_cpucfg can be realized with early returns, so just do that to avoid extra cognitive burden related to the return value handling. While at it, clean up comments of _kvm_get_cpucfg_mask() and kvm_check_cpucfg(), by removing comments that are merely restatement of the code nearby, and paraphrasing the rest so they read more natural for English speakers (that likely are not familiar with the actual Chinese- influenced grammar). No functional changes intended. Reviewed-by: Bibo Mao Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit ec83f39d2b078d6dd029bbde601835b5368fc886 Author: WANG Xuerui Date: Fri Feb 23 14:36:31 2024 +0800 LoongArch: KVM: Rename _kvm_get_cpucfg() to _kvm_get_cpucfg_mask() The function is not actually a getter of guest CPUCFG, but rather validation of the input CPUCFG ID plus information about the supported bit flags of that CPUCFG leaf. So rename it to avoid confusion. Reviewed-by: Bibo Mao Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit 179af5751af59100305358ee0ee51eec9a7f3953 Author: WANG Xuerui Date: Fri Feb 23 14:36:31 2024 +0800 LoongArch: KVM: Fix input validation of _kvm_get_cpucfg() & kvm_check_cpucfg() The range check for the CPUCFG ID is wrong (should have been a || instead of &&) and useless in effect, so fix the obvious mistake. Furthermore, the juggling of the temp return value is unnecessary, because it is semantically equivalent and more readable to just return at every switch case's end. This is done too to avoid potential bugs in the future related to the unwanted complexity. Also, the return value of _kvm_get_cpucfg is meant to be checked, but this was not done, so bad CPUCFG IDs wrongly fall back to the default case and 0 is incorrectly returned; check the return value to fix the UAPI behavior. While at it, also remove the redundant range check in kvm_check_cpucfg, because out-of-range CPUCFG IDs are already rejected by the -EINVAL as returned by _kvm_get_cpucfg(). Fixes: db1ecca22edf ("LoongArch: KVM: Add LSX (128bit SIMD) support") Fixes: 118e10cd893d ("LoongArch: KVM: Add LASX (256bit SIMD) support") Reviewed-by: Bibo Mao Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit f661ca40787396a3b7f324ae2a215bd67cc92955 Author: Krzysztof Kozlowski Date: Fri Feb 23 14:36:31 2024 +0800 LoongArch: dts: Minor whitespace cleanup The DTS code coding style expects exactly one space before '{' character. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Huacai Chen commit 9fa304b9f8ec440e614af6d35826110c633c4074 Author: Huacai Chen Date: Fri Feb 23 14:36:31 2024 +0800 LoongArch: Call early_init_fdt_scan_reserved_mem() earlier The unflatten_and_copy_device_tree() function contains a call to memblock_alloc(). This means that memblock is allocating memory before any of the reserved memory regions are set aside in the arch_mem_init() function which calls early_init_fdt_scan_reserved_mem(). Therefore, there is a possibility for memblock to allocate from any of the reserved memory regions. Hence, move the call to early_init_fdt_scan_reserved_mem() to be earlier in the init sequence, so that the reserved memory regions are set aside before any allocations are done using memblock. Cc: stable@vger.kernel.org Fixes: 88d4d957edc707e ("LoongArch: Add FDT booting support from efi system table") Signed-off-by: Oreoluwa Babatunde Signed-off-by: Huacai Chen commit 752cd08da320a667a833803a8fd6bb266114cce5 Author: Huacai Chen Date: Fri Feb 23 14:36:31 2024 +0800 LoongArch: Update cpu_sibling_map when disabling nonboot CPUs Update cpu_sibling_map when disabling nonboot CPUs by defining & calling clear_cpu_sibling_map(), otherwise we get such errors on SMT systems: jump label: negative count! WARNING: CPU: 6 PID: 45 at kernel/jump_label.c:263 __static_key_slow_dec_cpuslocked+0xec/0x100 CPU: 6 PID: 45 Comm: cpuhp/6 Not tainted 6.8.0-rc5+ #1340 pc 90000000004c302c ra 90000000004c302c tp 90000001005bc000 sp 90000001005bfd20 a0 000000000000001b a1 900000000224c278 a2 90000001005bfb58 a3 900000000224c280 a4 900000000224c278 a5 90000001005bfb50 a6 0000000000000001 a7 0000000000000001 t0 ce87a4763eb5234a t1 ce87a4763eb5234a t2 0000000000000000 t3 0000000000000000 t4 0000000000000006 t5 0000000000000000 t6 0000000000000064 t7 0000000000001964 t8 000000000009ebf6 u0 9000000001f2a068 s9 0000000000000000 s0 900000000246a2d8 s1 ffffffffffffffff s2 ffffffffffffffff s3 90000000021518c0 s4 0000000000000040 s5 9000000002151058 s6 9000000009828e40 s7 00000000000000b4 s8 0000000000000006 ra: 90000000004c302c __static_key_slow_dec_cpuslocked+0xec/0x100 ERA: 90000000004c302c __static_key_slow_dec_cpuslocked+0xec/0x100 CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) PRMD: 00000004 (PPLV0 +PIE -PWE) EUEN: 00000000 (-FPE -SXE -ASXE -BTE) ECFG: 00071c1c (LIE=2-4,10-12 VS=7) ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0) PRID: 0014d000 (Loongson-64bit, Loongson-3A6000-HV) CPU: 6 PID: 45 Comm: cpuhp/6 Not tainted 6.8.0-rc5+ #1340 Stack : 0000000000000000 900000000203f258 900000000179afc8 90000001005bc000 90000001005bf980 0000000000000000 90000001005bf988 9000000001fe0be0 900000000224c280 900000000224c278 90000001005bf8c0 0000000000000001 0000000000000001 ce87a4763eb5234a 0000000007f38000 90000001003f8cc0 0000000000000000 0000000000000006 0000000000000000 4c206e6f73676e6f 6f4c203a656d616e 000000000009ec99 0000000007f38000 0000000000000000 900000000214b000 9000000001fe0be0 0000000000000004 0000000000000000 0000000000000107 0000000000000009 ffffffffffafdabe 00000000000000b4 0000000000000006 90000000004c302c 9000000000224528 00005555939a0c7c 00000000000000b0 0000000000000004 0000000000000000 0000000000071c1c ... Call Trace: [<9000000000224528>] show_stack+0x48/0x1a0 [<900000000179afc8>] dump_stack_lvl+0x78/0xa0 [<9000000000263ed0>] __warn+0x90/0x1a0 [<90000000017419b8>] report_bug+0x1b8/0x280 [<900000000179c564>] do_bp+0x264/0x420 [<90000000004c302c>] __static_key_slow_dec_cpuslocked+0xec/0x100 [<90000000002b4d7c>] sched_cpu_deactivate+0x2fc/0x300 [<9000000000266498>] cpuhp_invoke_callback+0x178/0x8a0 [<9000000000267f70>] cpuhp_thread_fun+0xf0/0x240 [<90000000002a117c>] smpboot_thread_fn+0x1dc/0x2e0 [<900000000029a720>] kthread+0x140/0x160 [<9000000000222288>] ret_from_kernel_thread+0xc/0xa4 Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen commit 1001db6c42e4012b55e5ee19405490f23e033b5a Author: Huacai Chen Date: Fri Feb 23 14:36:31 2024 +0800 LoongArch: Disable IRQ before init_fn() for nonboot CPUs Disable IRQ before init_fn() for nonboot CPUs when hotplug, in order to silence such warnings (and also avoid potential errors due to unexpected interrupts): WARNING: CPU: 1 PID: 0 at kernel/rcu/tree.c:4503 rcu_cpu_starting+0x214/0x280 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.6.17+ #1198 pc 90000000048e3334 ra 90000000047bd56c tp 900000010039c000 sp 900000010039fdd0 a0 0000000000000001 a1 0000000000000006 a2 900000000802c040 a3 0000000000000000 a4 0000000000000001 a5 0000000000000004 a6 0000000000000000 a7 90000000048e3f4c t0 0000000000000001 t1 9000000005c70968 t2 0000000004000000 t3 000000000005e56e t4 00000000000002e4 t5 0000000000001000 t6 ffffffff80000000 t7 0000000000040000 t8 9000000007931638 u0 0000000000000006 s9 0000000000000004 s0 0000000000000001 s1 9000000006356ac0 s2 9000000007244000 s3 0000000000000001 s4 0000000000000001 s5 900000000636f000 s6 7fffffffffffffff s7 9000000002123940 s8 9000000001ca55f8 ra: 90000000047bd56c tlb_init+0x24c/0x528 ERA: 90000000048e3334 rcu_cpu_starting+0x214/0x280 CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) PRMD: 00000000 (PPLV0 -PIE -PWE) EUEN: 00000000 (-FPE -SXE -ASXE -BTE) ECFG: 00071000 (LIE=12 VS=7) ESTAT: 000c0000 [BRK] (IS= ECode=12 EsubCode=0) PRID: 0014c010 (Loongson-64bit, Loongson-3A5000) CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.6.17+ #1198 Stack : 0000000000000000 9000000006375000 9000000005b61878 900000010039c000 900000010039fa30 0000000000000000 900000010039fa38 900000000619a140 9000000006456888 9000000006456880 900000010039f950 0000000000000001 0000000000000001 cb0cb028ec7e52e1 0000000002b90000 9000000100348700 0000000000000000 0000000000000001 ffffffff916d12f1 0000000000000003 0000000000040000 9000000007930370 0000000002b90000 0000000000000004 9000000006366000 900000000619a140 0000000000000000 0000000000000004 0000000000000000 0000000000000009 ffffffffffc681f2 9000000002123940 9000000001ca55f8 9000000006366000 90000000047a4828 00007ffff057ded8 00000000000000b0 0000000000000000 0000000000000000 0000000000071000 ... Call Trace: [<90000000047a4828>] show_stack+0x48/0x1a0 [<9000000005b61874>] dump_stack_lvl+0x84/0xcc [<90000000047f60ac>] __warn+0x8c/0x1e0 [<9000000005b0ab34>] report_bug+0x1b4/0x280 [<9000000005b63110>] do_bp+0x2d0/0x480 [<90000000047a2e20>] handle_bp+0x120/0x1c0 [<90000000048e3334>] rcu_cpu_starting+0x214/0x280 [<90000000047bd568>] tlb_init+0x248/0x528 [<90000000047a4c44>] per_cpu_trap_init+0x124/0x160 [<90000000047a19f4>] cpu_probe+0x494/0xa00 [<90000000047b551c>] start_secondary+0x3c/0xc0 [<9000000005b66134>] smpboot_entry+0x50/0x58 Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen commit fad87dbd48156ab940538f052f1820f4b6ed2819 Author: Nathan Lynch Date: Thu Feb 22 16:19:14 2024 -0600 powerpc/rtas: use correct function name for resetting TCE tables The PAPR spec spells the function name as "ibm,reset-pe-dma-windows" but in practice firmware uses the singular form: "ibm,reset-pe-dma-window" in the device tree. Since we have the wrong spelling in the RTAS function table, reverse lookups (token -> name) fail and warn: unexpected failed lookup for token 86 WARNING: CPU: 1 PID: 545 at arch/powerpc/kernel/rtas.c:659 __do_enter_rtas_trace+0x2a4/0x2b4 CPU: 1 PID: 545 Comm: systemd-udevd Not tainted 6.8.0-rc4 #30 Hardware name: IBM,9105-22A POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NL1060_028) hv:phyp pSeries NIP [c0000000000417f0] __do_enter_rtas_trace+0x2a4/0x2b4 LR [c0000000000417ec] __do_enter_rtas_trace+0x2a0/0x2b4 Call Trace: __do_enter_rtas_trace+0x2a0/0x2b4 (unreliable) rtas_call+0x1f8/0x3e0 enable_ddw.constprop.0+0x4d0/0xc84 dma_iommu_dma_supported+0xe8/0x24c dma_set_mask+0x5c/0xd8 mlx5_pci_init.constprop.0+0xf0/0x46c [mlx5_core] probe_one+0xfc/0x32c [mlx5_core] local_pci_probe+0x68/0x12c pci_call_probe+0x68/0x1ec pci_device_probe+0xbc/0x1a8 really_probe+0x104/0x570 __driver_probe_device+0xb8/0x224 driver_probe_device+0x54/0x130 __driver_attach+0x158/0x2b0 bus_for_each_dev+0xa8/0x120 driver_attach+0x34/0x48 bus_add_driver+0x174/0x304 driver_register+0x8c/0x1c4 __pci_register_driver+0x68/0x7c mlx5_init+0xb8/0x118 [mlx5_core] do_one_initcall+0x60/0x388 do_init_module+0x7c/0x2a4 init_module_from_file+0xb4/0x108 idempotent_init_module+0x184/0x34c sys_finit_module+0x90/0x114 And oopses are possible when lockdep is enabled or the RTAS tracepoints are active, since those paths dereference the result of the lookup. Use the correct spelling to match firmware's behavior, adjusting the related constants to match. Signed-off-by: Nathan Lynch Fixes: 8252b88294d2 ("powerpc/rtas: improve function information lookups") Reported-by: Gaurav Batra Signed-off-by: Michael Ellerman Link: https://msgid.link/20240222-rtas-fix-ibm-reset-pe-dma-window-v1-1-7aaf235ac63c@linux.ibm.com commit 09a3c1e46142199adcee372a420b024b4fc61051 Author: Gaurav Batra Date: Thu Jan 25 14:30:17 2024 -0600 powerpc/pseries/iommu: IOMMU table is not initialized for kdump over SR-IOV When kdump kernel tries to copy dump data over SR-IOV, LPAR panics due to NULL pointer exception: Kernel attempted to read user page (0) - exploit attempt? (uid: 0) BUG: Kernel NULL pointer dereference on read at 0x00000000 Faulting instruction address: 0xc000000020847ad4 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries Modules linked in: mlx5_core(+) vmx_crypto pseries_wdt papr_scm libnvdimm mlxfw tls psample sunrpc fuse overlay squashfs loop CPU: 12 PID: 315 Comm: systemd-udevd Not tainted 6.4.0-Test102+ #12 Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_008) hv:phyp pSeries NIP: c000000020847ad4 LR: c00000002083b2dc CTR: 00000000006cd18c REGS: c000000029162ca0 TRAP: 0300 Not tainted (6.4.0-Test102+) MSR: 800000000280b033 CR: 48288244 XER: 00000008 CFAR: c00000002083b2d8 DAR: 0000000000000000 DSISR: 40000000 IRQMASK: 1 ... NIP _find_next_zero_bit+0x24/0x110 LR bitmap_find_next_zero_area_off+0x5c/0xe0 Call Trace: dev_printk_emit+0x38/0x48 (unreliable) iommu_area_alloc+0xc4/0x180 iommu_range_alloc+0x1e8/0x580 iommu_alloc+0x60/0x130 iommu_alloc_coherent+0x158/0x2b0 dma_iommu_alloc_coherent+0x3c/0x50 dma_alloc_attrs+0x170/0x1f0 mlx5_cmd_init+0xc0/0x760 [mlx5_core] mlx5_function_setup+0xf0/0x510 [mlx5_core] mlx5_init_one+0x84/0x210 [mlx5_core] probe_one+0x118/0x2c0 [mlx5_core] local_pci_probe+0x68/0x110 pci_call_probe+0x68/0x200 pci_device_probe+0xbc/0x1a0 really_probe+0x104/0x540 __driver_probe_device+0xb4/0x230 driver_probe_device+0x54/0x130 __driver_attach+0x158/0x2b0 bus_for_each_dev+0xa8/0x130 driver_attach+0x34/0x50 bus_add_driver+0x16c/0x300 driver_register+0xa4/0x1b0 __pci_register_driver+0x68/0x80 mlx5_init+0xb8/0x100 [mlx5_core] do_one_initcall+0x60/0x300 do_init_module+0x7c/0x2b0 At the time of LPAR dump, before kexec hands over control to kdump kernel, DDWs (Dynamic DMA Windows) are scanned and added to the FDT. For the SR-IOV case, default DMA window "ibm,dma-window" is removed from the FDT and DDW added, for the device. Now, kexec hands over control to the kdump kernel. When the kdump kernel initializes, PCI busses are scanned and IOMMU group/tables created, in pci_dma_bus_setup_pSeriesLP(). For the SR-IOV case, there is no "ibm,dma-window". The original commit: b1fc44eaa9ba, fixes the path where memory is pre-mapped (direct mapped) to the DDW. When TCEs are direct mapped, there is no need to initialize IOMMU tables. iommu_table_setparms_lpar() only considers "ibm,dma-window" property when initiallizing IOMMU table. In the scenario where TCEs are dynamically allocated for SR-IOV, newly created IOMMU table is not initialized. Later, when the device driver tries to enter TCEs for the SR-IOV device, NULL pointer execption is thrown from iommu_area_alloc(). The fix is to initialize the IOMMU table with DDW property stored in the FDT. There are 2 points to remember: 1. For the dedicated adapter, kdump kernel would encounter both default and DDW in FDT. In this case, DDW property is used to initialize the IOMMU table. 2. A DDW could be direct or dynamic mapped. kdump kernel would initialize IOMMU table and mark the existing DDW as "dynamic". This works fine since, at the time of table initialization, iommu_table_clear() makes some space in the DDW, for some predefined number of TCEs which are needed for kdump to succeed. Fixes: b1fc44eaa9ba ("pseries/iommu/ddw: Fix kdump to work in absence of ibm,dma-window") Signed-off-by: Gaurav Batra Reviewed-by: Brian King Signed-off-by: Michael Ellerman Link: https://msgid.link/20240125203017.61014-1-gbatra@linux.ibm.com commit 3773d65ae5154ed7df404b050fd7387a36ab5ef3 Author: Jeremy Kerr Date: Tue Feb 20 16:10:53 2024 +0800 net: mctp: take ownership of skb in mctp_local_output Currently, mctp_local_output only takes ownership of skb on success, and we may leak an skb if mctp_local_output fails in specific states; the skb ownership isn't transferred until the actual output routing occurs. Instead, make mctp_local_output free the skb on all error paths up to the route action, so it always consumes the passed skb. Fixes: 833ef3b91de6 ("mctp: Populate socket implementation") Signed-off-by: Jeremy Kerr Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240220081053.1439104-1-jk@codeconstruct.com.au Signed-off-by: Jakub Kicinski commit e872469c38b9283ef9de5e43d49286f9533ad848 Merge: 5ae1e9922bbdb 080b0c8d6d261 Author: Jakub Kicinski Date: Thu Feb 22 19:19:37 2024 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-02-20 (ice) This series contains updates to ice driver only. Yochai sets parent device to properly reflect connection state between source DPLL and output pin. Arkadiusz fixes additional issues related to DPLL; proper reporting of phase_adjust value and preventing use/access of data while resetting. Amritha resolves ASSERT_RTNL() being triggered on certain reset/rebuild flows. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ice: Fix ASSERT_RTNL() warning during certain scenarios ice: fix pin phase adjust updates on PF reset ice: fix dpll periodic work data updates on PF reset ice: fix dpll and dpll_pin data access on PF reset ice: fix dpll input pin phase_adjust value updates ice: fix connection state of DPLL and out pin ==================== Reviewed-by: Vadim Fedorenko Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240220214444.1039759-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 5ae1e9922bbdbaeb9cfbe91085ab75927488ac0f Author: Florian Westphal Date: Tue Feb 20 14:56:02 2024 +0100 net: ip_tunnel: prevent perpetual headroom growth syzkaller triggered following kasan splat: BUG: KASAN: use-after-free in __skb_flow_dissect+0x19d1/0x7a50 net/core/flow_dissector.c:1170 Read of size 1 at addr ffff88812fb4000e by task syz-executor183/5191 [..] kasan_report+0xda/0x110 mm/kasan/report.c:588 __skb_flow_dissect+0x19d1/0x7a50 net/core/flow_dissector.c:1170 skb_flow_dissect_flow_keys include/linux/skbuff.h:1514 [inline] ___skb_get_hash net/core/flow_dissector.c:1791 [inline] __skb_get_hash+0xc7/0x540 net/core/flow_dissector.c:1856 skb_get_hash include/linux/skbuff.h:1556 [inline] ip_tunnel_xmit+0x1855/0x33c0 net/ipv4/ip_tunnel.c:748 ipip_tunnel_xmit+0x3cc/0x4e0 net/ipv4/ipip.c:308 __netdev_start_xmit include/linux/netdevice.h:4940 [inline] netdev_start_xmit include/linux/netdevice.h:4954 [inline] xmit_one net/core/dev.c:3548 [inline] dev_hard_start_xmit+0x13d/0x6d0 net/core/dev.c:3564 __dev_queue_xmit+0x7c1/0x3d60 net/core/dev.c:4349 dev_queue_xmit include/linux/netdevice.h:3134 [inline] neigh_connected_output+0x42c/0x5d0 net/core/neighbour.c:1592 ... ip_finish_output2+0x833/0x2550 net/ipv4/ip_output.c:235 ip_finish_output+0x31/0x310 net/ipv4/ip_output.c:323 .. iptunnel_xmit+0x5b4/0x9b0 net/ipv4/ip_tunnel_core.c:82 ip_tunnel_xmit+0x1dbc/0x33c0 net/ipv4/ip_tunnel.c:831 ipgre_xmit+0x4a1/0x980 net/ipv4/ip_gre.c:665 __netdev_start_xmit include/linux/netdevice.h:4940 [inline] netdev_start_xmit include/linux/netdevice.h:4954 [inline] xmit_one net/core/dev.c:3548 [inline] dev_hard_start_xmit+0x13d/0x6d0 net/core/dev.c:3564 ... The splat occurs because skb->data points past skb->head allocated area. This is because neigh layer does: __skb_pull(skb, skb_network_offset(skb)); ... but skb_network_offset() returns a negative offset and __skb_pull() arg is unsigned. IOW, we skb->data gets "adjusted" by a huge value. The negative value is returned because skb->head and skb->data distance is more than 64k and skb->network_header (u16) has wrapped around. The bug is in the ip_tunnel infrastructure, which can cause dev->needed_headroom to increment ad infinitum. The syzkaller reproducer consists of packets getting routed via a gre tunnel, and route of gre encapsulated packets pointing at another (ipip) tunnel. The ipip encapsulation finds gre0 as next output device. This results in the following pattern: 1). First packet is to be sent out via gre0. Route lookup found an output device, ipip0. 2). ip_tunnel_xmit for gre0 bumps gre0->needed_headroom based on the future output device, rt.dev->needed_headroom (ipip0). 3). ip output / start_xmit moves skb on to ipip0. which runs the same code path again (xmit recursion). 4). Routing step for the post-gre0-encap packet finds gre0 as output device to use for ipip0 encapsulated packet. tunl0->needed_headroom is then incremented based on the (already bumped) gre0 device headroom. This repeats for every future packet: gre0->needed_headroom gets inflated because previous packets' ipip0 step incremented rt->dev (gre0) headroom, and ipip0 incremented because gre0 needed_headroom was increased. For each subsequent packet, gre/ipip0->needed_headroom grows until post-expand-head reallocations result in a skb->head/data distance of more than 64k. Once that happens, skb->network_header (u16) wraps around when pskb_expand_head tries to make sure that skb_network_offset() is unchanged after the headroom expansion/reallocation. After this skb_network_offset(skb) returns a different (and negative) result post headroom expansion. The next trip to neigh layer (or anything else that would __skb_pull the network header) makes skb->data point to a memory location outside skb->head area. v2: Cap the needed_headroom update to an arbitarily chosen upperlimit to prevent perpetual increase instead of dropping the headroom increment completely. Reported-and-tested-by: syzbot+bfde3bef047a81b8fde6@syzkaller.appspotmail.com Closes: https://groups.google.com/g/syzkaller-bugs/c/fL9G6GtWskY/m/VKk_PR5FBAAJ Fixes: 243aad830e8a ("ip_gre: include route header_len in max_headroom calculation") Signed-off-by: Florian Westphal Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240220135606.4939-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit 45532b21dc2a692444b6ad5f71c253cca53e8103 Author: Andre Werner Date: Mon Feb 19 06:33:32 2024 +0100 net: smsc95xx: add support for SYS TEC USB-SPEmodule1 This patch adds support for the SYS TEC USB-SPEmodule1 10Base-T1L ethernet device to the existing smsc95xx driver by adding the new USB VID/PID pair. Signed-off-by: Andre Werner Link: https://lore.kernel.org/r/20240219053413.4732-1-andre.werner@systec-electronic.com Signed-off-by: Jakub Kicinski commit 9a0d18853c280f6a0ee99f91619f2442a17a323a Author: Florian Westphal Date: Wed Feb 21 18:27:33 2024 +0100 netlink: add nla be16/32 types to minlen array BUG: KMSAN: uninit-value in nla_validate_range_unsigned lib/nlattr.c:222 [inline] BUG: KMSAN: uninit-value in nla_validate_int_range lib/nlattr.c:336 [inline] BUG: KMSAN: uninit-value in validate_nla lib/nlattr.c:575 [inline] BUG: KMSAN: uninit-value in __nla_validate_parse+0x2e20/0x45c0 lib/nlattr.c:631 nla_validate_range_unsigned lib/nlattr.c:222 [inline] nla_validate_int_range lib/nlattr.c:336 [inline] validate_nla lib/nlattr.c:575 [inline] ... The message in question matches this policy: [NFTA_TARGET_REV] = NLA_POLICY_MAX(NLA_BE32, 255), but because NLA_BE32 size in minlen array is 0, the validation code will read past the malformed (too small) attribute. Note: Other attributes, e.g. BITFIELD32, SINT, UINT.. are also missing: those likely should be added too. Reported-by: syzbot+3f497b07aa3baf2fb4d0@syzkaller.appspotmail.com Reported-by: xingwei lee Closes: https://lore.kernel.org/all/CABOYnLzFYHSnvTyS6zGa-udNX55+izqkOt2sB9WDqUcEGW6n8w@mail.gmail.com/raw Fixes: ecaf75ffd5f5 ("netlink: introduce bigendian integer types") Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20240221172740.5092-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit 661779e1fcafe1b74b3f3fe8e980c1e207fea1fd Author: Ryosuke Yasuoka Date: Wed Feb 21 16:40:48 2024 +0900 netlink: Fix kernel-infoleak-after-free in __skb_datagram_iter syzbot reported the following uninit-value access issue [1]: netlink_to_full_skb() creates a new `skb` and puts the `skb->data` passed as a 1st arg of netlink_to_full_skb() onto new `skb`. The data size is specified as `len` and passed to skb_put_data(). This `len` is based on `skb->end` that is not data offset but buffer offset. The `skb->end` contains data and tailroom. Since the tailroom is not initialized when the new `skb` created, KMSAN detects uninitialized memory area when copying the data. This patch resolved this issue by correct the len from `skb->end` to `skb->len`, which is the actual data offset. BUG: KMSAN: kernel-infoleak-after-free in instrument_copy_to_user include/linux/instrumented.h:114 [inline] BUG: KMSAN: kernel-infoleak-after-free in copy_to_user_iter lib/iov_iter.c:24 [inline] BUG: KMSAN: kernel-infoleak-after-free in iterate_ubuf include/linux/iov_iter.h:29 [inline] BUG: KMSAN: kernel-infoleak-after-free in iterate_and_advance2 include/linux/iov_iter.h:245 [inline] BUG: KMSAN: kernel-infoleak-after-free in iterate_and_advance include/linux/iov_iter.h:271 [inline] BUG: KMSAN: kernel-infoleak-after-free in _copy_to_iter+0x364/0x2520 lib/iov_iter.c:186 instrument_copy_to_user include/linux/instrumented.h:114 [inline] copy_to_user_iter lib/iov_iter.c:24 [inline] iterate_ubuf include/linux/iov_iter.h:29 [inline] iterate_and_advance2 include/linux/iov_iter.h:245 [inline] iterate_and_advance include/linux/iov_iter.h:271 [inline] _copy_to_iter+0x364/0x2520 lib/iov_iter.c:186 copy_to_iter include/linux/uio.h:197 [inline] simple_copy_to_iter+0x68/0xa0 net/core/datagram.c:532 __skb_datagram_iter+0x123/0xdc0 net/core/datagram.c:420 skb_copy_datagram_iter+0x5c/0x200 net/core/datagram.c:546 skb_copy_datagram_msg include/linux/skbuff.h:3960 [inline] packet_recvmsg+0xd9c/0x2000 net/packet/af_packet.c:3482 sock_recvmsg_nosec net/socket.c:1044 [inline] sock_recvmsg net/socket.c:1066 [inline] sock_read_iter+0x467/0x580 net/socket.c:1136 call_read_iter include/linux/fs.h:2014 [inline] new_sync_read fs/read_write.c:389 [inline] vfs_read+0x8f6/0xe00 fs/read_write.c:470 ksys_read+0x20f/0x4c0 fs/read_write.c:613 __do_sys_read fs/read_write.c:623 [inline] __se_sys_read fs/read_write.c:621 [inline] __x64_sys_read+0x93/0xd0 fs/read_write.c:621 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Uninit was stored to memory at: skb_put_data include/linux/skbuff.h:2622 [inline] netlink_to_full_skb net/netlink/af_netlink.c:181 [inline] __netlink_deliver_tap_skb net/netlink/af_netlink.c:298 [inline] __netlink_deliver_tap+0x5be/0xc90 net/netlink/af_netlink.c:325 netlink_deliver_tap net/netlink/af_netlink.c:338 [inline] netlink_deliver_tap_kernel net/netlink/af_netlink.c:347 [inline] netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x10f1/0x1250 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x1238/0x13d0 net/netlink/af_netlink.c:1910 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x9c2/0xd60 net/socket.c:2584 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2638 __sys_sendmsg net/socket.c:2667 [inline] __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg net/socket.c:2674 [inline] __x64_sys_sendmsg+0x307/0x490 net/socket.c:2674 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Uninit was created at: free_pages_prepare mm/page_alloc.c:1087 [inline] free_unref_page_prepare+0xb0/0xa40 mm/page_alloc.c:2347 free_unref_page_list+0xeb/0x1100 mm/page_alloc.c:2533 release_pages+0x23d3/0x2410 mm/swap.c:1042 free_pages_and_swap_cache+0xd9/0xf0 mm/swap_state.c:316 tlb_batch_pages_flush mm/mmu_gather.c:98 [inline] tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu+0x6f5/0x980 mm/mmu_gather.c:300 tlb_finish_mmu+0x101/0x260 mm/mmu_gather.c:392 exit_mmap+0x49e/0xd30 mm/mmap.c:3321 __mmput+0x13f/0x530 kernel/fork.c:1349 mmput+0x8a/0xa0 kernel/fork.c:1371 exit_mm+0x1b8/0x360 kernel/exit.c:567 do_exit+0xd57/0x4080 kernel/exit.c:858 do_group_exit+0x2fd/0x390 kernel/exit.c:1021 __do_sys_exit_group kernel/exit.c:1032 [inline] __se_sys_exit_group kernel/exit.c:1030 [inline] __x64_sys_exit_group+0x3c/0x50 kernel/exit.c:1030 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Bytes 3852-3903 of 3904 are uninitialized Memory access of size 3904 starts at ffff88812ea1e000 Data copied to user address 0000000020003280 CPU: 1 PID: 5043 Comm: syz-executor297 Not tainted 6.7.0-rc5-syzkaller-00047-g5bd7ef53ffe5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Fixes: 1853c9496460 ("netlink, mmap: transform mmap skb into full skb on taps") Reported-and-tested-by: syzbot+34ad5fab48f7bf510349@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=34ad5fab48f7bf510349 [1] Signed-off-by: Ryosuke Yasuoka Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240221074053.1794118-1-ryasuoka@redhat.com Signed-off-by: Jakub Kicinski commit 2b0a5a8a397c0ae8f8cd25e7d3857c749239ceb8 Author: Fabio Estevam Date: Thu Feb 1 15:00:54 2024 -0300 ARM: imx_v6_v7_defconfig: Restore CONFIG_BACKLIGHT_CLASS_DEVICE Since commit bfac19e239a7 ("fbdev: mx3fb: Remove the driver") backlight is no longer functional. The fbdev mx3fb driver used to automatically select CONFIG_BACKLIGHT_CLASS_DEVICE. Now that the mx3fb driver has been removed, enable the CONFIG_BACKLIGHT_CLASS_DEVICE option so that backlight can still work by default. Tested on a imx6dl-sabresd board. Cc: stable@vger.kernel.org Fixes: bfac19e239a7 ("fbdev: mx3fb: Remove the driver") Signed-off-by: Fabio Estevam Reviewed-by: Francesco Dolcini Tested-by: Francesco Dolcini # Toradex Colibri iMX7 Signed-off-by: Shawn Guo commit 2dfd2383034421101300a3b7325cf339a182d218 Author: Sean Christopherson Date: Thu Feb 22 11:06:12 2024 -0800 KVM: selftests: Add a testcase to verify GUEST_MEMFD and READONLY are exclusive Extend set_memory_region_test's invalid flags subtest to verify that GUEST_MEMFD is incompatible with READONLY. GUEST_MEMFD doesn't currently support writes from userspace and KVM doesn't support emulated MMIO on private accesses, and so KVM is supposed to reject the GUEST_MEMFD+READONLY in order to avoid configuration that KVM can't support. Link: https://lore.kernel.org/r/20240222190612.2942589-6-seanjc@google.com Signed-off-by: Sean Christopherson commit 63e5c5a10559077bb5f32edf783084e7164af9c3 Author: Sean Christopherson Date: Thu Feb 22 11:06:11 2024 -0800 KVM: selftests: Create GUEST_MEMFD for relevant invalid flags testcases Actually create a GUEST_MEMFD instance and pass it to KVM when doing negative tests for KVM_SET_USER_MEMORY_REGION2 + KVM_MEM_GUEST_MEMFD. Without a valid GUEST_MEMFD file descriptor, KVM_SET_USER_MEMORY_REGION2 will always fail with -EINVAL, resulting in false passes for any and all tests of illegal combinations of KVM_MEM_GUEST_MEMFD and other flags. Fixes: 5d74316466f4 ("KVM: selftests: Add a memory region subtest to validate invalid flags") Link: https://lore.kernel.org/r/20240222190612.2942589-5-seanjc@google.com Signed-off-by: Sean Christopherson commit a1176ef5c92aa58e63ecf184b7cac2e311b2b233 Author: Sean Christopherson Date: Thu Feb 22 11:06:10 2024 -0800 KVM: x86/mmu: Restrict KVM_SW_PROTECTED_VM to the TDP MMU Advertise and support software-protected VMs if and only if the TDP MMU is enabled, i.e. disallow KVM_SW_PROTECTED_VM if TDP is enabled for KVM's legacy/shadow MMU. TDP support for the shadow MMU is maintenance-only, e.g. support for TDX and SNP will also be restricted to the TDP MMU. Fixes: 89ea60c2c7b5 ("KVM: x86: Add support for "protected VMs" that can utilize private memory") Link: https://lore.kernel.org/r/20240222190612.2942589-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 422692098c4c53a6b65c2ef235621aee6a38721f Author: Sean Christopherson Date: Thu Feb 22 11:06:09 2024 -0800 KVM: x86: Update KVM_SW_PROTECTED_VM docs to make it clear they're a WIP Rewrite the help message for KVM_SW_PROTECTED_VM to make it clear that software-protected VMs are a development and testing vehicle for guest_memfd(), and that attempting to use KVM_SW_PROTECTED_VM for anything remotely resembling a "real" VM will fail. E.g. any memory accesses from KVM will incorrectly access shared memory, nested TDP is wildly broken, and so on and so forth. Update KVM's API documentation with similar warnings to discourage anyone from attempting to run anything but selftests with KVM_X86_SW_PROTECTED_VM. Fixes: 89ea60c2c7b5 ("KVM: x86: Add support for "protected VMs" that can utilize private memory") Link: https://lore.kernel.org/r/20240222190612.2942589-3-seanjc@google.com Signed-off-by: Sean Christopherson commit e563592224e02f87048edee3ce3f0da16cceee88 Author: Sean Christopherson Date: Thu Feb 22 11:06:08 2024 -0800 KVM: Make KVM_MEM_GUEST_MEMFD mutually exclusive with KVM_MEM_READONLY Disallow creating read-only memslots that support GUEST_MEMFD, as GUEST_MEMFD is fundamentally incompatible with KVM's semantics for read-only memslots. Read-only memslots allow the userspace VMM to emulate option ROMs by filling the backing memory with readable, executable code and data, while triggering emulated MMIO on writes. GUEST_MEMFD doesn't currently support writes from userspace and KVM doesn't support emulated MMIO on private accesses, i.e. the guest can only ever read zeros, and writes will always be treated as errors. Cc: Fuad Tabba Cc: Michael Roth Cc: Isaku Yamahata Cc: Yu Zhang Cc: Chao Peng Fixes: a7800aa80ea4 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory") Link: https://lore.kernel.org/r/20240222190612.2942589-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 72fa02fdf83306c52bc1eede28359e3fa32a151a Author: Dave Airlie Date: Wed Jan 24 14:24:25 2024 +1000 nouveau: add an ioctl to report vram usage This reports the currently used vram allocations. userspace using this has been proposed for nvk, but it's a rather trivial uapi addition. Reviewed-by: Faith Ekstrand Signed-off-by: Dave Airlie commit 3f4d8aac6e768c2215ce68275256971c2f54f0c8 Author: Dave Airlie Date: Wed Jan 24 13:50:58 2024 +1000 nouveau: add an ioctl to return vram bar size. This returns the BAR resources size so userspace can make decisions based on rebar support. userspace using this has been proposed for nvk, but it's a rather trivial uapi addition. Reviewed-by: Faith Ekstrand Signed-off-by: Dave Airlie commit 1d492944d3d06047793fa2e7606868f6d7480f87 Author: Dave Airlie Date: Wed Feb 14 14:06:32 2024 +1000 nouveau/gsp: add kconfig option to enable GSP paths by default Turing and Ampere will continue to use the old paths by default, but we should allow distros to decide what the policy is. Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20240214040632.661069-1-airlied@gmail.com commit 7c548869f5f52db65b40d619c833bbafbc5cedba Merge: bfc7746a044c2 6650d23f3e20c Author: Dave Airlie Date: Fri Feb 23 09:44:44 2024 +1000 Merge tag 'drm-xe-fixes-2024-02-22' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes UAPI Changes: - Remove support for persistent exec_queues - Drop a reduntant sysfs newline printout Cross-subsystem Changes: Core Changes: Driver Changes: - A three-patch fix for a VM_BIND rebind optimization path - Fix a modpost warning on an xe KUNIT module Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/ZdcsNrxdWMMM417v@fedora commit bfc7746a044c2648d81522a31089be9b816b8ebc Merge: 741922e7fbfdd bbfaf2aea7164 Author: Dave Airlie Date: Fri Feb 23 08:36:46 2024 +1000 Merge tag 'amd-drm-fixes-6.8-2024-02-22' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.8-2024-02-22: amdgpu: - Suspend/resume fixes - Backlight error fix - DCN 3.5 fixes - Misc fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240222195338.5809-1-alexander.deucher@amd.com commit 741922e7fbfddfd2dff29e24fc24b2b565db3369 Merge: f581dbb34c39d fb1e881273f43 Author: Dave Airlie Date: Fri Feb 23 08:30:20 2024 +1000 Merge tag 'drm-intel-fixes-2024-02-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Fixup for TV mode Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZdcwT9kltvEgJZZE@jlahtine-mobl.ger.corp.intel.com commit f581dbb34c39d23a05d77f09c65915022fafaaeb Merge: b401b621758e4 2aa6f5b0fd052 Author: Dave Airlie Date: Fri Feb 23 08:09:45 2024 +1000 Merge tag 'drm-misc-fixes-2024-02-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A list handling fix and 64bit division on 32bit platform fix for the drm/buddy allocator, a cast warning and an initialization fix for nouveau, a bridge handling fix for meson, an initialisation fix for ivpu, a SPARC build fix for fbdev, a double-free fix for ttm, and two fence handling fixes for syncobj. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/gl2antuifidtzn3dfm426p7xwh5fxj23behagwh26owfnosh2w@gqoa7vj5prnh commit fc325b1a915f6d0c821bfcea21fb3f1354c4323b Author: Alexandre Ghiti Date: Sun Feb 11 09:36:40 2024 +0100 riscv: Fix build error if !CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION The new riscv specific arch_hugetlb_migration_supported() must be guarded with a #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION to avoid the following build error: In file included from include/linux/hugetlb.h:851, from kernel/fork.c:52: >> arch/riscv/include/asm/hugetlb.h:15:42: error: static declaration of 'arch_hugetlb_migration_supported' follows non-static declaration 15 | #define arch_hugetlb_migration_supported arch_hugetlb_migration_supported | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/hugetlb.h:916:20: note: in expansion of macro 'arch_hugetlb_migration_supported' 916 | static inline bool arch_hugetlb_migration_supported(struct hstate *h) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/hugetlb.h:14:6: note: previous declaration of 'arch_hugetlb_migration_supported' with type 'bool(struct hstate *)' {aka '_Bool(struct hstate *)'} 14 | bool arch_hugetlb_migration_supported(struct hstate *h); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402110258.CV51JlEI-lkp@intel.com/ Fixes: ce68c035457b ("riscv: Fix arch_hugetlb_migration_supported() for NAPOT") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240211083640.756583-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit c21f014818600ae017f97ee087e7c136b1916aa7 Author: Yangyu Chen Date: Wed Feb 21 11:02:31 2024 +0800 riscv: mm: fix NOCACHE_THEAD does not set bit[61] correctly Previous commit dbfbda3bd6bf ("riscv: mm: update T-Head memory type definitions") from patch [1] missed a `<` for bit shifting, result in bit(61) does not set in _PAGE_NOCACHE_THEAD and leaves bit(0) set instead. This patch get this fixed. Link: https://lore.kernel.org/linux-riscv/20230912072510.2510-1-jszhang@kernel.org/ [1] Fixes: dbfbda3bd6bf ("riscv: mm: update T-Head memory type definitions") Signed-off-by: Yangyu Chen Reviewed-by: Guo Ren Reviewed-by: Jisheng Zhang Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/tencent_E19FA1A095768063102E654C6FC858A32F06@qq.com Signed-off-by: Palmer Dabbelt commit 680341382da56bd192ebfa4e58eaf4fec2e5bca7 Author: Zong Li Date: Fri Feb 2 01:51:02 2024 +0000 riscv: add CALLER_ADDRx support CALLER_ADDRx returns caller's address at specified level, they are used for several tracers. These macros eventually use __builtin_return_address(n) to get the caller's address if arch doesn't define their own implementation. In RISC-V, __builtin_return_address(n) only works when n == 0, we need to walk the stack frame to get the caller's address at specified level. data.level started from 'level + 3' due to the call flow of getting caller's address in RISC-V implementation. If we don't have additional three iteration, the level is corresponding to follows: callsite -> return_address -> arch_stack_walk -> walk_stackframe | | | | level 3 level 2 level 1 level 0 Fixes: 10626c32e382 ("riscv/ftrace: Add basic support") Cc: stable@vger.kernel.org Reviewed-by: Alexandre Ghiti Signed-off-by: Zong Li Link: https://lore.kernel.org/r/20240202015102.26251-1-zong.li@sifive.com Signed-off-by: Palmer Dabbelt commit 4af24146aa24d06f4594a427354f7ac878118d38 Merge: 58506612bf023 8246601a7d391 Author: Palmer Dabbelt Date: Thu Feb 22 12:16:37 2024 -0800 Merge commit '8246601a7d391ce8207408149d65732f28af81a1' into fixes This single fix is also part of a larger cleanup, so I'm merging it into my fixes branch so it can be shared with for-next. * commit '8246601a7d391ce8207408149d65732f28af81a1': riscv: tlb: fix __p*d_free_tlb() commit ffd2cb6b718e189e7e2d5d0c19c25611f92e061a Merge: 4c36fbb46f132 5429c8de56f6b Author: Linus Torvalds Date: Thu Feb 22 11:57:30 2024 -0800 Merge tag 'block-6.8-2024-02-22' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Mostly just fixlets for md, but also a sed-opal parsing fix" * tag 'block-6.8-2024-02-22' of git://git.kernel.dk/linux: block: sed-opal: handle empty atoms when parsing response md: Don't suspend the array for interrupted reshape md: Don't register sync_thread for reshape directly md: Make sure md_do_sync() will set MD_RECOVERY_DONE md: Don't ignore read-only array in md_check_recovery() md: Don't ignore suspended array in md_check_recovery() md: Fix missing release of 'active_io' for flush commit 4c36fbb46f1326c8a11d81594a710098909eb9bf Merge: c7138f7a354df 510325e5ac5f4 Author: Linus Torvalds Date: Thu Feb 22 11:53:09 2024 -0800 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd fixes from Jason Gunthorpe: - Fix dirty tracking bitmap collection when using reporting bitmaps that are not neatly aligned to u64's or match the IO page table radix tree layout. - Add self tests to cover the cases that were found to be broken. - Add missing enforcement of invalidation type in the uapi. - Fix selftest config generation * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: selftests/iommu: fix the config fragment iommufd: Reject non-zero data_type if no data_len is provided iommufd/iova_bitmap: Consider page offset for the pages to be pinned iommufd/selftest: Add mock IO hugepages tests iommufd/selftest: Hugepage mock domain support iommufd/selftest: Refactor mock_domain_read_and_clear_dirty() iommufd/selftest: Refactor dirty bitmap tests iommufd/iova_bitmap: Handle recording beyond the mapped pages iommufd/selftest: Test u64 unaligned bitmaps iommufd/iova_bitmap: Switch iova_bitmap::bitmap to an u8 array iommufd/iova_bitmap: Bounds check mapped::pages access commit c7138f7a354df7cadccda31173617a7f30c8b6c6 Merge: 88953761b94df 427c70dec7383 Author: Linus Torvalds Date: Thu Feb 22 11:47:07 2024 -0800 Merge tag 'platform-drivers-x86-v6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "Regression fixes: - Fix INT0002 vGPIO events no longer working after 6.8 ACPI SCI changes - AMD-PMF: Fix laptops (e.g. Framework 13 AMD) hanging on suspend - x86-android-tablets: Fix touchscreen no longer working on Lenovo Yogabook - x86-android-tablets: Fix serdev instantiation regression - intel-vbtn: Fix ThinkPad X1 Tablet Gen2 no longer suspending Bug fixes: - think-lmi: Fix changing BIOS settings on Lenovo workstations - touchscreen_dmi: Fix Hi8 Air touchscreen data sometimes missing - AMD-PMF: Fix Smart PC support not working after suspend/resume Other misc small fixes" * tag 'platform-drivers-x86-v6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: thinkpad_acpi: Only update profile if successfully converted platform/x86: intel-vbtn: Stop calling "VBDL" from notify_handler platform/x86: x86-android-tablets: Fix acer_b1_750_goodix_gpios name platform/x86: x86-android-tablets: Fix serdev instantiation no longer working platform/x86: Add new get_serdev_controller() helper platform/x86: x86-android-tablets: Fix keyboard touchscreen on Lenovo Yogabook1 X90 platform/x86/amd/pmf: Fix a potential race with policy binary sideload platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc() platform/x86/amd/pmf: Add debugging message for missing policy data platform/x86/amd/pmf: Fix a suspend hang on Framework 13 platform/x86/amd/pmf: Fix TEE enact command failure after suspend and resume platform/x86/amd/pmf: Remove smart_pc_status enum platform/x86: touchscreen_dmi: Consolidate Goodix upside-down touchscreen data platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACPI names platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq() platform/x86: think-lmi: Fix password opcode ordering for workstations commit 88953761b94df7dc9bfc46591a8975401689b057 Merge: 1c892cdd8fe00 cc976dbc492c2 Author: Linus Torvalds Date: Thu Feb 22 11:44:20 2024 -0800 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "Here are some Samsung clk driver fixes I've been sitting on for far too long. They fix the bindings and clk driver for the Google GS101 SoC" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: samsung: clk-gs101: comply with the new dt cmu_misc clock names dt-bindings: clock: gs101: rename cmu_misc clock-names commit 1c892cdd8fe004ed6cef4501a7141594a1616368 Merge: 6714ebb922ab1 b820de741ae48 Author: Linus Torvalds Date: Thu Feb 22 10:06:29 2024 -0800 Merge tag 'vfs-6.8-rc6.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Fix a memory leak in cachefiles - Restrict aio cancellations to I/O submitted through the aio interfaces as this is otherwise causing issues for I/O submitted via io_uring - Increase buffer for afs volume status to avoid overflow - Fix a missing zero-length check in unbuffered writes in the netfs library. If generic_write_checks() returns zero make netfs_unbuffered_write_iter() return right away - Prevent a leak in i_dio_count caused by netfs_begin_read() operating past i_size. It will return early and leave i_dio_count incremented - Account for ipv4 addresses as well as ipv6 addresses when processing incoming callbacks in afs * tag 'vfs-6.8-rc6.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio afs: Increase buffer size in afs_update_volume_status() afs: Fix ignored callbacks over ipv4 cachefiles: fix memory leak in cachefiles_add_cache() netfs: Fix missing zero-length check in unbuffered write netfs: Fix i_dio_count leak on DIO read past i_size commit 6714ebb922ab15a209dfc3c1ed29d4bb0abc9f02 Merge: efa80dcbb7a3e 359e54a93ab43 Author: Linus Torvalds Date: Thu Feb 22 09:57:58 2024 -0800 Merge tag 'net-6.8.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from bpf and netfilter. Current release - regressions: - af_unix: fix another unix GC hangup Previous releases - regressions: - core: fix a possible AF_UNIX deadlock - bpf: fix NULL pointer dereference in sk_psock_verdict_data_ready() - netfilter: nft_flow_offload: release dst in case direct xmit path is used - bridge: switchdev: ensure MDB events are delivered exactly once - l2tp: pass correct message length to ip6_append_data - dccp/tcp: unhash sk from ehash for tb2 alloc failure after check_estalblished() - tls: fixes for record type handling with PEEK - devlink: fix possible use-after-free and memory leaks in devlink_init() Previous releases - always broken: - bpf: fix an oops when attempting to read the vsyscall page through bpf_probe_read_kernel - sched: act_mirred: use the backlog for mirred ingress - netfilter: nft_flow_offload: fix dst refcount underflow - ipv6: sr: fix possible use-after-free and null-ptr-deref - mptcp: fix several data races - phonet: take correct lock to peek at the RX queue Misc: - handful of fixes and reliability improvements for selftests" * tag 'net-6.8.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (72 commits) l2tp: pass correct message length to ip6_append_data net: phy: realtek: Fix rtl8211f_config_init() for RTL8211F(D)(I)-VD-CG PHY selftests: ioam: refactoring to align with the fix Fix write to cloned skb in ipv6_hop_ioam() phonet/pep: fix racy skb_queue_empty() use phonet: take correct lock to peek at the RX queue net: sparx5: Add spinlock for frame transmission from CPU net/sched: flower: Add lock protection when remove filter handle devlink: fix port dump cmd type net: stmmac: Fix EST offset for dwmac 5.10 tools: ynl: don't leak mcast_groups on init error tools: ynl: make sure we always pass yarg to mnl_cb_run net: mctp: put sock on tag allocation failure netfilter: nf_tables: use kzalloc for hook allocation netfilter: nf_tables: register hooks last when adding new chain/flowtable netfilter: nft_flow_offload: release dst in case direct xmit path is used netfilter: nft_flow_offload: reset dst in route object after setting up flow netfilter: nf_tables: set dormant flag on hook register failure selftests: tls: add test for peeking past a record of a different type selftests: tls: add test for merging of same-type control messages ... commit 1fa8d07ae1a5fa4e87de42c338e8fc27f46d8bb6 Author: Mikko Perttunen Date: Thu Feb 22 03:05:16 2024 +0200 gpu: host1x: Skip reset assert on Tegra186 On Tegra186, secure world applications may need to access host1x during suspend/resume, and rely on the kernel to keep Host1x out of reset during the suspend cycle. As such, as a quirk, skip asserting Host1x's reset on Tegra186. We don't need to keep the clocks enabled, as BPMP ensures the clock stays on while Host1x is being used. On newer SoC's, the reset line is inaccessible, so there is no need for the quirk. Fixes: b7c00cdf6df5 ("gpu: host1x: Enable system suspend callbacks") Signed-off-by: Mikko Perttunen Reviewed-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20240222010517.1573931-1-cyndis@kapsi.fi commit bbfaf2aea7164db59739728d62d9cc91d64ff856 Author: Ma Jun Date: Wed Feb 21 17:16:49 2024 +0800 drm/amdgpu: Fix the runtime resume failure issue Don't set power state flag when system enter runtime suspend, or it may cause runtime resume failure issue. Fixes: 3a9626c816db ("drm/amd: Stop evicting resources on APUs in suspend") Signed-off-by: Ma Jun Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 9671761792156f2339627918bafcd713a8a6f777 Author: Melissa Wen Date: Fri Feb 16 09:23:19 2024 -0300 drm/amd/display: fix null-pointer dereference on edid reading Use i2c adapter when there isn't aux_mode in dc_link to fix a null-pointer derefence that happens when running igt@kms_force_connector_basic in a system with DCN2.1 and HDMI connector detected as below: [ +0.178146] BUG: kernel NULL pointer dereference, address: 00000000000004c0 [ +0.000010] #PF: supervisor read access in kernel mode [ +0.000005] #PF: error_code(0x0000) - not-present page [ +0.000004] PGD 0 P4D 0 [ +0.000006] Oops: 0000 [#1] PREEMPT SMP NOPTI [ +0.000006] CPU: 15 PID: 2368 Comm: kms_force_conne Not tainted 6.5.0-asdn+ #152 [ +0.000005] Hardware name: HP HP ENVY x360 Convertible 13-ay1xxx/8929, BIOS F.01 07/14/2021 [ +0.000004] RIP: 0010:i2c_transfer+0xd/0x100 [ +0.000011] Code: ea fc ff ff 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 41 54 55 53 <48> 8b 47 10 48 89 fb 48 83 38 00 0f 84 b3 00 00 00 83 3d 2f 80 16 [ +0.000004] RSP: 0018:ffff9c4f89c0fad0 EFLAGS: 00010246 [ +0.000005] RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000000080 [ +0.000003] RDX: 0000000000000002 RSI: ffff9c4f89c0fb20 RDI: 00000000000004b0 [ +0.000003] RBP: ffff9c4f89c0fb80 R08: 0000000000000080 R09: ffff8d8e0b15b980 [ +0.000003] R10: 00000000000380e0 R11: 0000000000000000 R12: 0000000000000080 [ +0.000002] R13: 0000000000000002 R14: ffff9c4f89c0fb0e R15: ffff9c4f89c0fb0f [ +0.000004] FS: 00007f9ad2176c40(0000) GS:ffff8d90fe9c0000(0000) knlGS:0000000000000000 [ +0.000003] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000004] CR2: 00000000000004c0 CR3: 0000000121bc4000 CR4: 0000000000750ee0 [ +0.000003] PKRU: 55555554 [ +0.000003] Call Trace: [ +0.000006] [ +0.000006] ? __die+0x23/0x70 [ +0.000011] ? page_fault_oops+0x17d/0x4c0 [ +0.000008] ? preempt_count_add+0x6e/0xa0 [ +0.000008] ? srso_alias_return_thunk+0x5/0x7f [ +0.000011] ? exc_page_fault+0x7f/0x180 [ +0.000009] ? asm_exc_page_fault+0x26/0x30 [ +0.000013] ? i2c_transfer+0xd/0x100 [ +0.000010] drm_do_probe_ddc_edid+0xc2/0x140 [drm] [ +0.000067] ? srso_alias_return_thunk+0x5/0x7f [ +0.000006] ? _drm_do_get_edid+0x97/0x3c0 [drm] [ +0.000043] ? __pfx_drm_do_probe_ddc_edid+0x10/0x10 [drm] [ +0.000042] edid_block_read+0x3b/0xd0 [drm] [ +0.000043] _drm_do_get_edid+0xb6/0x3c0 [drm] [ +0.000041] ? __pfx_drm_do_probe_ddc_edid+0x10/0x10 [drm] [ +0.000043] drm_edid_read_custom+0x37/0xd0 [drm] [ +0.000044] amdgpu_dm_connector_mode_valid+0x129/0x1d0 [amdgpu] [ +0.000153] drm_connector_mode_valid+0x3b/0x60 [drm_kms_helper] [ +0.000000] __drm_helper_update_and_validate+0xfe/0x3c0 [drm_kms_helper] [ +0.000000] ? amdgpu_dm_connector_get_modes+0xb6/0x520 [amdgpu] [ +0.000000] ? srso_alias_return_thunk+0x5/0x7f [ +0.000000] drm_helper_probe_single_connector_modes+0x2ab/0x540 [drm_kms_helper] [ +0.000000] status_store+0xb2/0x1f0 [drm] [ +0.000000] kernfs_fop_write_iter+0x136/0x1d0 [ +0.000000] vfs_write+0x24d/0x440 [ +0.000000] ksys_write+0x6f/0xf0 [ +0.000000] do_syscall_64+0x60/0xc0 [ +0.000000] ? srso_alias_return_thunk+0x5/0x7f [ +0.000000] ? syscall_exit_to_user_mode+0x2b/0x40 [ +0.000000] ? srso_alias_return_thunk+0x5/0x7f [ +0.000000] ? do_syscall_64+0x6c/0xc0 [ +0.000000] ? do_syscall_64+0x6c/0xc0 [ +0.000000] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ +0.000000] RIP: 0033:0x7f9ad46b4b00 [ +0.000000] Code: 40 00 48 8b 15 19 b3 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 80 3d e1 3a 0e 00 00 74 17 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 58 c3 0f 1f 80 00 00 00 00 48 83 ec 28 48 89 [ +0.000000] RSP: 002b:00007ffcbd3bd6d8 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 [ +0.000000] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9ad46b4b00 [ +0.000000] RDX: 0000000000000002 RSI: 00007f9ad48a7417 RDI: 0000000000000009 [ +0.000000] RBP: 0000000000000002 R08: 0000000000000064 R09: 0000000000000000 [ +0.000000] R10: 0000000000000000 R11: 0000000000000202 R12: 00007f9ad48a7417 [ +0.000000] R13: 0000000000000009 R14: 00007ffcbd3bd760 R15: 0000000000000001 [ +0.000000] [ +0.000000] Modules linked in: ctr ccm rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btbcm btintel btmtk bluetooth uvcvideo videobuf2_vmalloc sha3_generic videobuf2_memops uvc jitterentropy_rng videobuf2_v4l2 videodev drbg videobuf2_common ansi_cprng mc ecdh_generic ecc qrtr binfmt_misc hid_sensor_accel_3d hid_sensor_magn_3d hid_sensor_gyro_3d hid_sensor_trigger industrialio_triggered_buffer kfifo_buf industrialio snd_ctl_led joydev hid_sensor_iio_common rtw89_8852ae rtw89_8852a rtw89_pci snd_hda_codec_realtek rtw89_core snd_hda_codec_generic intel_rapl_msr ledtrig_audio intel_rapl_common snd_hda_codec_hdmi mac80211 snd_hda_intel snd_intel_dspcfg kvm_amd snd_hda_codec snd_soc_dmic snd_acp3x_rn snd_acp3x_pdm_dma libarc4 snd_hwdep snd_soc_core kvm snd_hda_core cfg80211 snd_pci_acp6x snd_pcm nls_ascii snd_timer hp_wmi snd_pci_acp5x nls_cp437 snd_rn_pci_acp3x ucsi_acpi sparse_keymap ccp snd platform_profile snd_acp_config typec_ucsi irqbypass vfat sp5100_tco [ +0.000000] snd_soc_acpi fat rapl pcspkr wmi_bmof roles rfkill rng_core snd_pci_acp3x soundcore k10temp watchdog typec battery ac amd_pmc acpi_tad button hid_sensor_hub hid_multitouch evdev serio_raw msr parport_pc ppdev lp parport fuse loop efi_pstore configfs ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 btrfs blake2b_generic dm_crypt dm_mod efivarfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx libcrc32c crc32c_generic xor raid6_pq raid1 raid0 multipath linear md_mod amdgpu amdxcp i2c_algo_bit drm_ttm_helper ttm crc32_pclmul crc32c_intel drm_exec gpu_sched drm_suballoc_helper nvme ghash_clmulni_intel drm_buddy drm_display_helper sha512_ssse3 nvme_core ahci xhci_pci sha512_generic hid_generic xhci_hcd libahci rtsx_pci_sdmmc t10_pi i2c_hid_acpi drm_kms_helper i2c_hid mmc_core libata aesni_intel crc64_rocksoft_generic crypto_simd amd_sfh crc64_rocksoft scsi_mod usbcore cryptd crc_t10dif cec drm crct10dif_generic hid rtsx_pci crct10dif_pclmul scsi_common rc_core crc64 i2c_piix4 [ +0.000000] usb_common crct10dif_common video wmi [ +0.000000] CR2: 00000000000004c0 [ +0.000000] ---[ end trace 0000000000000000 ]--- Fixes: 0e859faf8670 ("drm/amd/display: Remove unwanted drm edid references") Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit bae67893578d608e35691dcdfa90c4957debf1d3 Author: Armin Wolf Date: Tue Feb 13 01:50:50 2024 +0100 drm/amd/display: Fix memory leak in dm_sw_fini() After destroying dmub_srv, the memory associated with it is not freed, causing a memory leak: unreferenced object 0xffff896302b45800 (size 1024): comm "(udev-worker)", pid 222, jiffies 4294894636 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 (crc 6265fd77): [] kmalloc_trace+0x29d/0x340 [] dm_dmub_sw_init+0xb4/0x450 [amdgpu] [] dm_sw_init+0x15/0x2b0 [amdgpu] [] amdgpu_device_init+0x1417/0x24e0 [amdgpu] [] amdgpu_driver_load_kms+0x15/0x190 [amdgpu] [] amdgpu_pci_probe+0x187/0x4e0 [amdgpu] [] local_pci_probe+0x3e/0x90 [] pci_device_probe+0xc3/0x230 [] really_probe+0xe2/0x480 [] __driver_probe_device+0x78/0x160 [] driver_probe_device+0x1f/0x90 [] __driver_attach+0xce/0x1c0 [] bus_for_each_dev+0x70/0xc0 [] bus_add_driver+0x112/0x210 [] driver_register+0x55/0x100 [] do_one_initcall+0x41/0x300 Fix this by freeing dmub_srv after destroying it. Fixes: 743b9786b14a ("drm/amd/display: Hook up the DMUB service in DM") Signed-off-by: Armin Wolf Signed-off-by: Alex Deucher commit 27a6c49394b1a203beeb94752c9a1d6318f24ddf Author: Swapnil Patel Date: Tue Feb 6 11:40:20 2024 -0500 drm/amd/display: fix input states translation error for dcn35 & dcn351 [Why] Currently there is an error while translating input clock sates into output clock states. The highest fclk setting from output sates is being dropped because of this error. [How] For dcn35 and dcn351, make output_states equal to input states. Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Swapnil Patel Signed-off-by: Alex Deucher commit d2b48f340d9e4a8fbeb1cdc84cd8da6ad143a907 Author: Srinivasan Shanmugam Date: Mon Feb 19 11:43:16 2024 +0530 drm/amd/display: Fix potential null pointer dereference in dc_dmub_srv Fixes potential null pointer dereference warnings in the dc_dmub_srv_cmd_list_queue_execute() and dc_dmub_srv_is_hw_pwr_up() functions. In both functions, the 'dc_dmub_srv' variable was being dereferenced before it was checked for null. This could lead to a null pointer dereference if 'dc_dmub_srv' is null. The fix is to check if 'dc_dmub_srv' is null before dereferencing it. Thus moving the null checks for 'dc_dmub_srv' to the beginning of the functions to ensure that 'dc_dmub_srv' is not null when it is dereferenced. Found by smatch & thus fixing the below: drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:133 dc_dmub_srv_cmd_list_queue_execute() warn: variable dereferenced before check 'dc_dmub_srv' (see line 128) drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:1167 dc_dmub_srv_is_hw_pwr_up() warn: variable dereferenced before check 'dc_dmub_srv' (see line 1164) Fixes: 028bac583449 ("drm/amd/display: decouple dmcub execution to reduce lock granularity") Fixes: 65138eb72e1f ("drm/amd/display: Add DCN35 DMUB") Cc: JinZe.Xu Cc: Hersen Wu Cc: Josip Pavic Cc: Roman Li Cc: Qingqing Zhuo Cc: Harry Wentland Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Cc: Tom Chung Signed-off-by: Srinivasan Shanmugam Reviewed-by: Tom Chung Signed-off-by: Alex Deucher commit efa80dcbb7a3ecc4a1b2f54624c49b5a612f92b3 Merge: 39133352cbed6 e78fb4eac8173 Author: Linus Torvalds Date: Thu Feb 22 09:23:22 2024 -0800 Merge tag 'trace-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fix from Steven Rostedt: - While working on the ring buffer I noticed that the counter used for knowing where the end of the data is on a sub-buffer was not a full "int" but just 20 bits. It was masked out to 0xfffff. With the new code that allows the user to change the size of the sub-buffer, it is theoretically possible to ask for a size bigger than 2^20. If that happens, unexpected results may occur as there's no code checking if the counter overflowed the 20 bits of the write mask. There are other checks to make sure events fit in the sub-buffer, but if the sub-buffer itself is too big, that is not checked. Add a check in the resize of the sub-buffer to make sure that it never goes beyond the size of the counter that holds how much data is on it. * tag 'trace-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: ring-buffer: Do not let subbuf be bigger than write mask commit 4e73826089ce899357580bbf6e0afe4e6f9900b7 Author: Lewis Huang Date: Wed Jan 31 17:20:17 2024 +0800 drm/amd/display: Only allow dig mapping to pwrseq in new asic [Why] The old asic only have 1 pwrseq hw. We don't need to map the diginst to pwrseq inst in old asic. [How] 1. Only mapping dig to pwrseq for new asic. 2. Move mapping function into dcn specific panel control component Cc: Stable # v6.6+ Cc: Mario Limonciello Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3122 Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Lewis Huang Signed-off-by: Alex Deucher commit 22e1dc4b2fec17af70f297a4295c5f19a0f3fbeb Author: Wayne Lin Date: Fri Feb 2 17:34:11 2024 +0800 drm/amd/display: adjust few initialization order in dm [Why] Observe error message "Can't retrieve aconnector in hpd_rx_irq_offload_work" when boot up with a mst tbt4 dock connected. After analyzing, there are few parts needed to be adjusted: 1. hpd_rx_offload_wq[].aconnector is not initialzed before the dmub outbox hpd_irq handler get registered which causes the error message. 2. registeration of hpd and hpd_rx_irq event for usb4 dp tunneling is not aligned with legacy interface sequence [How] Put DMUB_NOTIFICATION_HPD and DMUB_NOTIFICATION_HPD_IRQ handler registration into register_hpd_handlers() to align other interfaces and get hpd_rx_offload_wq[].aconnector initialized earlier than that. Leave DMUB_NOTIFICATION_AUX_REPLY registered as it was since we need that while calling dc_link_detect(). USB4 connection status will be proactively detected by dc_link_detect_connection_type() in amdgpu_dm_initialize_drm_device() Cc: Stable Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher commit ff6bd76f4d997642ef390bffe42e93d6f7be87d3 Author: Jon Hunter Date: Fri Feb 16 11:57:48 2024 +0000 arm64: tegra: Fix Tegra234 MGBE power-domains The MGBE power-domains on Tegra234 are mapped to the MGBE controllers as follows: MGBE0 (0x68000000) --> Power-Domain MGBEB MGBE1 (0x69000000) --> Power-Domain MGBEC MGBE2 (0x6a000000) --> Power-Domain MGBED Update the device-tree nodes for Tegra234 to correct this. Fixes: 610cdf3186bc ("arm64: tegra: Add MGBE nodes on Tegra234") Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 5ef1dc40ffa6a6cb968b0fdc43c3a61727a9e950 Author: Peter Oberparleiter Date: Wed Feb 14 16:06:28 2024 +0100 s390/cio: fix invalid -EBUSY on ccw_device_start The s390 common I/O layer (CIO) returns an unexpected -EBUSY return code when drivers try to start I/O while a path-verification (PV) process is pending. This can lead to failed device initialization attempts with symptoms like broken network connectivity after boot. Fix this by replacing the -EBUSY return code with a deferred condition code 1 reply to make path-verification handling consistent from a driver's point of view. The problem can be reproduced semi-regularly using the following process, while repeating steps 2-3 as necessary (example assumes an OSA device with bus-IDs 0.0.a000-0.0.a002 on CHPID 0.02): 1. echo 0.0.a000,0.0.a001,0.0.a002 >/sys/bus/ccwgroup/drivers/qeth/group 2. echo 0 > /sys/bus/ccwgroup/devices/0.0.a000/online 3. echo 1 > /sys/bus/ccwgroup/devices/0.0.a000/online ; \ echo on > /sys/devices/css0/chp0.02/status Background information: The common I/O layer starts path-verification I/Os when it receives indications about changes in a device path's availability. This occurs for example when hardware events indicate a change in channel-path status, or when a manual operation such as a CHPID vary or configure operation is performed. If a driver attempts to start I/O while a PV is running, CIO reports a successful I/O start (ccw_device_start() return code 0). Then, after completion of PV, CIO synthesizes an interrupt response that indicates an asynchronous status condition that prevented the start of the I/O (deferred condition code 1). If a PV indication arrives while a device is busy with driver-owned I/O, PV is delayed until after I/O completion was reported to the driver's interrupt handler. To ensure that PV can be started eventually, CIO reports a device busy condition (ccw_device_start() return code -EBUSY) if a driver tries to start another I/O while PV is pending. In some cases this -EBUSY return code causes device drivers to consider a device not operational, resulting in failed device initialization. Note: The code that introduced the problem was added in 2003. Symptoms started appearing with the following CIO commit that causes a PV indication when a device is removed from the cio_ignore list after the associated parent subchannel device was probed, but before online processing of the CCW device has started: 2297791c92d0 ("s390/cio: dont unregister subchannel from child-drivers") During boot, the cio_ignore list is modified by the cio_ignore dracut module [1] as well as Linux vendor-specific systemd service scripts[2]. When combined, this commit and boot scripts cause a frequent occurrence of the problem during boot. [1] https://github.com/dracutdevs/dracut/tree/master/modules.d/81cio_ignore [2] https://github.com/SUSE/s390-tools/blob/master/cio_ignore.service Cc: stable@vger.kernel.org # v5.15+ Fixes: 2297791c92d0 ("s390/cio: dont unregister subchannel from child-drivers") Tested-By: Thorsten Winkler Reviewed-by: Thorsten Winkler Signed-off-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit d3ea125df37dc37972d581b74a5d3785c3f283ab Author: Fenghua Yu Date: Fri Feb 9 11:14:12 2024 -0800 dmaengine: idxd: Ensure safe user copy of completion record If CONFIG_HARDENED_USERCOPY is enabled, copying completion record from event log cache to user triggers a kernel bug. [ 1987.159822] usercopy: Kernel memory exposure attempt detected from SLUB object 'dsa0' (offset 74, size 31)! [ 1987.170845] ------------[ cut here ]------------ [ 1987.176086] kernel BUG at mm/usercopy.c:102! [ 1987.180946] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 1987.186866] CPU: 17 PID: 528 Comm: kworker/17:1 Not tainted 6.8.0-rc2+ #5 [ 1987.194537] Hardware name: Intel Corporation AvenueCity/AvenueCity, BIOS BHSDCRB1.86B.2492.D03.2307181620 07/18/2023 [ 1987.206405] Workqueue: wq0.0 idxd_evl_fault_work [idxd] [ 1987.212338] RIP: 0010:usercopy_abort+0x72/0x90 [ 1987.217381] Code: 58 65 9c 50 48 c7 c2 17 85 61 9c 57 48 c7 c7 98 fd 6b 9c 48 0f 44 d6 48 c7 c6 b3 08 62 9c 4c 89 d1 49 0f 44 f3 e8 1e 2e d5 ff <0f> 0b 49 c7 c1 9e 42 61 9c 4c 89 cf 4d 89 c8 eb a9 66 66 2e 0f 1f [ 1987.238505] RSP: 0018:ff62f5cf20607d60 EFLAGS: 00010246 [ 1987.244423] RAX: 000000000000005f RBX: 000000000000001f RCX: 0000000000000000 [ 1987.252480] RDX: 0000000000000000 RSI: ffffffff9c61429e RDI: 00000000ffffffff [ 1987.260538] RBP: ff62f5cf20607d78 R08: ff2a6a89ef3fffe8 R09: 00000000fffeffff [ 1987.268595] R10: ff2a6a89eed00000 R11: 0000000000000003 R12: ff2a66934849c89a [ 1987.276652] R13: 0000000000000001 R14: ff2a66934849c8b9 R15: ff2a66934849c899 [ 1987.284710] FS: 0000000000000000(0000) GS:ff2a66b22fe40000(0000) knlGS:0000000000000000 [ 1987.293850] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1987.300355] CR2: 00007fe291a37000 CR3: 000000010fbd4005 CR4: 0000000000f71ef0 [ 1987.308413] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1987.316470] DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400 [ 1987.324527] PKRU: 55555554 [ 1987.327622] Call Trace: [ 1987.330424] [ 1987.332826] ? show_regs+0x6e/0x80 [ 1987.336703] ? die+0x3c/0xa0 [ 1987.339988] ? do_trap+0xd4/0xf0 [ 1987.343662] ? do_error_trap+0x75/0xa0 [ 1987.347922] ? usercopy_abort+0x72/0x90 [ 1987.352277] ? exc_invalid_op+0x57/0x80 [ 1987.356634] ? usercopy_abort+0x72/0x90 [ 1987.360988] ? asm_exc_invalid_op+0x1f/0x30 [ 1987.365734] ? usercopy_abort+0x72/0x90 [ 1987.370088] __check_heap_object+0xb7/0xd0 [ 1987.374739] __check_object_size+0x175/0x2d0 [ 1987.379588] idxd_copy_cr+0xa9/0x130 [idxd] [ 1987.384341] idxd_evl_fault_work+0x127/0x390 [idxd] [ 1987.389878] process_one_work+0x13e/0x300 [ 1987.394435] ? __pfx_worker_thread+0x10/0x10 [ 1987.399284] worker_thread+0x2f7/0x420 [ 1987.403544] ? _raw_spin_unlock_irqrestore+0x2b/0x50 [ 1987.409171] ? __pfx_worker_thread+0x10/0x10 [ 1987.414019] kthread+0x107/0x140 [ 1987.417693] ? __pfx_kthread+0x10/0x10 [ 1987.421954] ret_from_fork+0x3d/0x60 [ 1987.426019] ? __pfx_kthread+0x10/0x10 [ 1987.430281] ret_from_fork_asm+0x1b/0x30 [ 1987.434744] The issue arises because event log cache is created using kmem_cache_create() which is not suitable for user copy. Fix the issue by creating event log cache with kmem_cache_create_usercopy(), ensuring safe user copy. Fixes: c2f156bf168f ("dmaengine: idxd: create kmem cache for event log fault items") Reported-by: Tony Zhu Tested-by: Tony Zhu Signed-off-by: Fenghua Yu Reviewed-by: Lijun Pan Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20240209191412.1050270-1-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 510325e5ac5f45c1180189d3bfc108c54bf64544 Author: Muhammad Usama Anjum Date: Thu Feb 22 12:49:33 2024 +0500 selftests/iommu: fix the config fragment The config fragment doesn't follow the correct format to enable those config options which make the config options getting missed while merging with other configs. ➜ merge_config.sh -m .config tools/testing/selftests/iommu/config Using .config as base Merging tools/testing/selftests/iommu/config ➜ make olddefconfig .config:5295:warning: unexpected data: CONFIG_IOMMUFD .config:5296:warning: unexpected data: CONFIG_IOMMUFD_TEST While at it, add CONFIG_FAULT_INJECTION as well which is needed for CONFIG_IOMMUFD_TEST. If CONFIG_FAULT_INJECTION isn't present in base config (such as x86 defconfig), CONFIG_IOMMUFD_TEST doesn't get enabled. Fixes: 57f0988706fe ("iommufd: Add a selftest") Link: https://lore.kernel.org/r/20240222074934.71380-1-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Signed-off-by: Jason Gunthorpe commit 2aa6f5b0fd052e363bb9d4b547189f0bf6b3d6d3 Author: Erik Kurzinger Date: Wed Feb 21 10:44:28 2024 -0800 drm/syncobj: handle NULL fence in syncobj_eventfd_entry_func During syncobj_eventfd_entry_func, dma_fence_chain_find_seqno may set the fence to NULL if the given seqno is signaled and a later seqno has already been submitted. In that case, the eventfd should be signaled immediately which currently does not happen. This is a similar issue to the one addressed by commit b19926d4f3a6 ("drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence."). As a fix, if the return value of dma_fence_chain_find_seqno indicates success but it sets the fence to NULL, we will assign a stub fence to ensure the following code still signals the eventfd. v1 -> v2: assign a stub fence instead of signaling the eventfd Signed-off-by: Erik Kurzinger Fixes: c7a472297169 ("drm/syncobj: add IOCTL to register an eventfd") Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20240221184527.37667-1-ekurzinger@nvidia.com commit b5bf7778b722105d7a04b1d51e884497b542638b Author: Jason Gunthorpe Date: Wed Feb 21 20:27:02 2024 -0400 iommu/arm-smmu-v3: Do not use GFP_KERNEL under as spinlock If the SMMU is configured to use a two level CD table then arm_smmu_write_ctx_desc() allocates a CD table leaf internally using GFP_KERNEL. Due to recent changes this is being done under a spinlock to iterate over the device list - thus it will trigger a sleeping while atomic warning: arm_smmu_sva_set_dev_pasid() mutex_lock(&sva_lock); __arm_smmu_sva_bind() arm_smmu_mmu_notifier_get() spin_lock_irqsave() arm_smmu_write_ctx_desc() arm_smmu_get_cd_ptr() arm_smmu_alloc_cd_leaf_table() dmam_alloc_coherent(GFP_KERNEL) This is a 64K high order allocation and really should not be done atomically. At the moment the rework of the SVA to follow the new API is half finished. Recently the CD table memory was moved from the domain to the master, however we have the confusing situation where the SVA code is wrongly using the RID domains device's list to track which CD tables the SVA is installed in. Remove the logic to replicate the CD across all the domain's masters during attach. We know which master and which CD table the PASID should be installed in. Right now SVA only works when dma-iommu.c is in control of the RID translation, which means we have a single iommu_domain shared across the entire group and that iommu_domain is not shared outside the group. Critically this means that the iommu_group->devices list and RID's smmu_domain->devices list describe the same set of masters. For PCI cases the core code also insists on singleton groups so there is only one entry in the smmu_domain->devices list that is equal to the master being passed in to arm_smmu_sva_set_dev_pasid(). Only non-PCI cases may have multi-device groups. However, the core code will repeat the calls to arm_smmu_sva_set_dev_pasid() across the entire iommu_group->devices list. Instead of having arm_smmu_mmu_notifier_get() indirectly loop over all the devices in the group via the RID's smmu_domain, rely on __arm_smmu_sva_bind() to be called for each device in the group and install the repeated CD entry that way. This avoids taking the spinlock to access the devices list and permits the arm_smmu_write_ctx_desc() to use a sleeping allocation. Leave the arm_smmu_mm_release() as a confusing situation, this requires tracking attached masters inside the SVA domain. Removing the loop allows arm_smmu_write_ctx_desc() to be called outside the spinlock and thus is safe to use GFP_KERNEL. Move the clearing of the CD into arm_smmu_sva_remove_dev_pasid() so that arm_smmu_mmu_notifier_get/put() remain paired functions. Fixes: 24503148c545 ("iommu/arm-smmu-v3: Refactor write_ctx_desc") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/4e25d161-0cf8-4050-9aa3-dfa21cd63e56@moroto.mountain/ Signed-off-by: Jason Gunthorpe Reviewed-by: Michael Shavit Link: https://lore.kernel.org/r/0-v3-11978fc67151+112-smmu_cd_atomic_jgg@nvidia.com Signed-off-by: Will Deacon commit 078d62de433b4f4556bb676e5dd670f0d4103376 Author: Théo Lebrun Date: Thu Feb 22 11:12:32 2024 +0100 spi: cadence-qspi: add system-wide suspend and resume callbacks Each SPI controller is expected to call the spi_controller_suspend() and spi_controller_resume() callbacks at system-wide suspend and resume. It (1) handles the kthread worker for queued controllers and (2) marks the controller as suspended to have spi_sync() fail while the controller is unavailable. Those two operations do not require the controller to be active, we do not need to increment the runtime PM usage counter. Signed-off-by: Théo Lebrun Link: https://msgid.link/r/20240222-cdns-qspi-pm-fix-v4-4-6b6af8bcbf59@bootlin.com Signed-off-by: Mark Brown commit 4efa1250b59ebf47ce64a7b6b7c3e2e0a2a9d35a Author: Théo Lebrun Date: Thu Feb 22 11:12:31 2024 +0100 spi: cadence-qspi: put runtime in runtime PM hooks names Follow kernel naming convention with regards to power-management callback function names. The convention in the kernel is: - prefix_suspend means the system-wide suspend callback; - prefix_runtime_suspend means the runtime PM suspend callback. The same applies to resume callbacks. Signed-off-by: Théo Lebrun Reviewed-by: Dhruva Gole Link: https://msgid.link/r/20240222-cdns-qspi-pm-fix-v4-3-6b6af8bcbf59@bootlin.com Signed-off-by: Mark Brown commit 959043afe53ae80633e810416cee6076da6e91c6 Author: Théo Lebrun Date: Thu Feb 22 11:12:30 2024 +0100 spi: cadence-qspi: remove system-wide suspend helper calls from runtime PM hooks The ->runtime_suspend() and ->runtime_resume() callbacks are not expected to call spi_controller_suspend() and spi_controller_resume(). Remove calls to those in the cadence-qspi driver. Those helpers have two roles currently: - They stop/start the queue, including dealing with the kworker. - They toggle the SPI controller SPI_CONTROLLER_SUSPENDED flag. It requires acquiring ctlr->bus_lock_mutex. Step one is irrelevant because cadence-qspi is not queued. Step two however has two implications: - A deadlock occurs, because ->runtime_resume() is called in a context where the lock is already taken (in the ->exec_op() callback, where the usage count is incremented). - It would disallow all operations once the device is auto-suspended. Here is a brief call tree highlighting the mutex deadlock: spi_mem_exec_op() ... spi_mem_access_start() mutex_lock(&ctlr->bus_lock_mutex) cqspi_exec_mem_op() pm_runtime_resume_and_get() cqspi_resume() spi_controller_resume() mutex_lock(&ctlr->bus_lock_mutex) ... spi_mem_access_end() mutex_unlock(&ctlr->bus_lock_mutex) ... Fixes: 0578a6dbfe75 ("spi: spi-cadence-quadspi: add runtime pm support") Signed-off-by: Théo Lebrun Link: https://msgid.link/r/20240222-cdns-qspi-pm-fix-v4-2-6b6af8bcbf59@bootlin.com Signed-off-by: Mark Brown commit 32ce3bb57b6b402de2aec1012511e7ac4e7449dc Author: Théo Lebrun Date: Thu Feb 22 11:12:29 2024 +0100 spi: cadence-qspi: fix pointer reference in runtime PM hooks dev_get_drvdata() gets used to acquire the pointer to cqspi and the SPI controller. Neither embed the other; this lead to memory corruption. On a given platform (Mobileye EyeQ5) the memory corruption is hidden inside cqspi->f_pdata. Also, this uninitialised memory is used as a mutex (ctlr->bus_lock_mutex) by spi_controller_suspend(). Fixes: 2087e85bb66e ("spi: cadence-quadspi: fix suspend-resume implementations") Reviewed-by: Dhruva Gole Signed-off-by: Théo Lebrun Link: https://msgid.link/r/20240222-cdns-qspi-pm-fix-v4-1-6b6af8bcbf59@bootlin.com Signed-off-by: Mark Brown commit 3c43177ffb54ea5be97505eb8e2690e99ac96bc9 Author: Erik Kurzinger Date: Fri Jan 19 08:32:06 2024 -0800 drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set When waiting for a syncobj timeline point whose fence has not yet been submitted with the WAIT_FOR_SUBMIT flag, a callback is registered using drm_syncobj_fence_add_wait and the thread is put to sleep until the timeout expires. If the fence is submitted before then, drm_syncobj_add_point will wake up the sleeping thread immediately which will proceed to wait for the fence to be signaled. However, if the WAIT_AVAILABLE flag is used instead, drm_syncobj_fence_add_wait won't get called, meaning the waiting thread will always sleep for the full timeout duration, even if the fence gets submitted earlier. If it turns out that the fence *has* been submitted by the time it eventually wakes up, it will still indicate to userspace that the wait completed successfully (it won't return -ETIME), but it will have taken much longer than it should have. To fix this, we must call drm_syncobj_fence_add_wait if *either* the WAIT_FOR_SUBMIT flag or the WAIT_AVAILABLE flag is set. The only difference being that with WAIT_FOR_SUBMIT we will also wait for the fence to be signaled after it has been submitted while with WAIT_AVAILABLE we will return immediately. IGT test patch: https://lists.freedesktop.org/archives/igt-dev/2024-January/067537.html v1 -> v2: adjust lockdep_assert_none_held_once condition (cherry picked from commit 8c44ea81634a4a337df70a32621a5f3791be23df) Fixes: 01d6c3578379 ("drm/syncobj: add support for timeline point wait v8") Signed-off-by: Erik Kurzinger Signed-off-by: Simon Ser Reviewed-by: Daniel Vetter Reviewed-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20240119163208.3723457-1-ekurzinger@nvidia.com commit c7bb26b847e5b97814f522686068c5628e2b3646 Author: Filipe Manana Date: Mon Feb 19 20:10:07 2024 +0000 btrfs: fix data race at btrfs_use_block_rsv() when accessing block reserve At btrfs_use_block_rsv() we read the size of a block reserve without locking its spinlock, which makes KCSAN complain because the size of a block reserve is always updated while holding its spinlock. The report from KCSAN is the following: [653.313148] BUG: KCSAN: data-race in btrfs_update_delayed_refs_rsv [btrfs] / btrfs_use_block_rsv [btrfs] [653.314755] read to 0x000000017f5871b8 of 8 bytes by task 7519 on cpu 0: [653.314779] btrfs_use_block_rsv+0xe4/0x2f8 [btrfs] [653.315606] btrfs_alloc_tree_block+0xdc/0x998 [btrfs] [653.316421] btrfs_force_cow_block+0x220/0xe38 [btrfs] [653.317242] btrfs_cow_block+0x1ac/0x568 [btrfs] [653.318060] btrfs_search_slot+0xda2/0x19b8 [btrfs] [653.318879] btrfs_del_csums+0x1dc/0x798 [btrfs] [653.319702] __btrfs_free_extent.isra.0+0xc24/0x2028 [btrfs] [653.320538] __btrfs_run_delayed_refs+0xd3c/0x2390 [btrfs] [653.321340] btrfs_run_delayed_refs+0xae/0x290 [btrfs] [653.322140] flush_space+0x5e4/0x718 [btrfs] [653.322958] btrfs_preempt_reclaim_metadata_space+0x102/0x2f8 [btrfs] [653.323781] process_one_work+0x3b6/0x838 [653.323800] worker_thread+0x75e/0xb10 [653.323817] kthread+0x21a/0x230 [653.323836] __ret_from_fork+0x6c/0xb8 [653.323855] ret_from_fork+0xa/0x30 [653.323887] write to 0x000000017f5871b8 of 8 bytes by task 576 on cpu 3: [653.323906] btrfs_update_delayed_refs_rsv+0x1a4/0x250 [btrfs] [653.324699] btrfs_add_delayed_data_ref+0x468/0x6d8 [btrfs] [653.325494] btrfs_free_extent+0x76/0x120 [btrfs] [653.326280] __btrfs_mod_ref+0x6a8/0x6b8 [btrfs] [653.327064] btrfs_dec_ref+0x50/0x70 [btrfs] [653.327849] walk_up_proc+0x236/0xa50 [btrfs] [653.328633] walk_up_tree+0x21c/0x448 [btrfs] [653.329418] btrfs_drop_snapshot+0x802/0x1328 [btrfs] [653.330205] btrfs_clean_one_deleted_snapshot+0x184/0x238 [btrfs] [653.330995] cleaner_kthread+0x2b0/0x2f0 [btrfs] [653.331781] kthread+0x21a/0x230 [653.331800] __ret_from_fork+0x6c/0xb8 [653.331818] ret_from_fork+0xa/0x30 So add a helper to get the size of a block reserve while holding the lock. Reading the field while holding the lock instead of using the data_race() annotation is used in order to prevent load tearing. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit e06cc89475eddc1f3a7a4d471524256152c68166 Author: Filipe Manana Date: Mon Feb 19 19:41:23 2024 +0000 btrfs: fix data races when accessing the reserved amount of block reserves At space_info.c we have several places where we access the ->reserved field of a block reserve without taking the block reserve's spinlock first, which makes KCSAN warn about a data race since that field is always updated while holding the spinlock. The reports from KCSAN are like the following: [117.193526] BUG: KCSAN: data-race in btrfs_block_rsv_release [btrfs] / need_preemptive_reclaim [btrfs] [117.195148] read to 0x000000017f587190 of 8 bytes by task 6303 on cpu 3: [117.195172] need_preemptive_reclaim+0x222/0x2f0 [btrfs] [117.195992] __reserve_bytes+0xbb0/0xdc8 [btrfs] [117.196807] btrfs_reserve_metadata_bytes+0x4c/0x120 [btrfs] [117.197620] btrfs_block_rsv_add+0x78/0xa8 [btrfs] [117.198434] btrfs_delayed_update_inode+0x154/0x368 [btrfs] [117.199300] btrfs_update_inode+0x108/0x1c8 [btrfs] [117.200122] btrfs_dirty_inode+0xb4/0x140 [btrfs] [117.200937] btrfs_update_time+0x8c/0xb0 [btrfs] [117.201754] touch_atime+0x16c/0x1e0 [117.201789] filemap_read+0x674/0x728 [117.201823] btrfs_file_read_iter+0xf8/0x410 [btrfs] [117.202653] vfs_read+0x2b6/0x498 [117.203454] ksys_read+0xa2/0x150 [117.203473] __s390x_sys_read+0x68/0x88 [117.203495] do_syscall+0x1c6/0x210 [117.203517] __do_syscall+0xc8/0xf0 [117.203539] system_call+0x70/0x98 [117.203579] write to 0x000000017f587190 of 8 bytes by task 11 on cpu 0: [117.203604] btrfs_block_rsv_release+0x2e8/0x578 [btrfs] [117.204432] btrfs_delayed_inode_release_metadata+0x7c/0x1d0 [btrfs] [117.205259] __btrfs_update_delayed_inode+0x37c/0x5e0 [btrfs] [117.206093] btrfs_async_run_delayed_root+0x356/0x498 [btrfs] [117.206917] btrfs_work_helper+0x160/0x7a0 [btrfs] [117.207738] process_one_work+0x3b6/0x838 [117.207768] worker_thread+0x75e/0xb10 [117.207797] kthread+0x21a/0x230 [117.207830] __ret_from_fork+0x6c/0xb8 [117.207861] ret_from_fork+0xa/0x30 So add a helper to get the reserved amount of a block reserve while holding the lock. The value may be not be up to date anymore when used by need_preemptive_reclaim() and btrfs_preempt_reclaim_metadata_space(), but that's ok since the worst it can do is cause more reclaim work do be done sooner rather than later. Reading the field while holding the lock instead of using the data_race() annotation is used in order to prevent load tearing. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5897710b28cabab04ea6c7547f27b7989de646ae Author: Filipe Manana Date: Fri Feb 16 22:17:10 2024 +0000 btrfs: send: don't issue unnecessary zero writes for trailing hole If we have a sparse file with a trailing hole (from the last extent's end to i_size) and then create an extent in the file that ends before the file's i_size, then when doing an incremental send we will issue a write full of zeroes for the range that starts immediately after the new extent ends up to i_size. While this isn't incorrect because the file ends up with exactly the same data, it unnecessarily results in using extra space at the destination with one or more extents full of zeroes instead of having a hole. In same cases this results in using megabytes or even gigabytes of unnecessary space. Example, reproducer: $ cat test.sh #!/bin/bash DEV=/dev/sdh MNT=/mnt/sdh mkfs.btrfs -f $DEV mount $DEV $MNT # Create 1G sparse file. xfs_io -f -c "truncate 1G" $MNT/foobar # Create base snapshot. btrfs subvolume snapshot -r $MNT $MNT/mysnap1 # Create send stream (full send) for the base snapshot. btrfs send -f /tmp/1.snap $MNT/mysnap1 # Now write one extent at the beginning of the file and one somewhere # in the middle, leaving a gap between the end of this second extent # and the file's size. xfs_io -c "pwrite -S 0xab 0 128K" \ -c "pwrite -S 0xcd 512M 128K" \ $MNT/foobar # Now create a second snapshot which is going to be used for an # incremental send operation. btrfs subvolume snapshot -r $MNT $MNT/mysnap2 # Create send stream (incremental send) for the second snapshot. btrfs send -p $MNT/mysnap1 -f /tmp/2.snap $MNT/mysnap2 # Now recreate the filesystem by receiving both send streams and # verify we get the same content that the original filesystem had # and file foobar has only two extents with a size of 128K each. umount $MNT mkfs.btrfs -f $DEV mount $DEV $MNT btrfs receive -f /tmp/1.snap $MNT btrfs receive -f /tmp/2.snap $MNT echo -e "\nFile fiemap in the second snapshot:" # Should have: # # 128K extent at file range [0, 128K[ # hole at file range [128K, 512M[ # 128K extent file range [512M, 512M + 128K[ # hole at file range [512M + 128K, 1G[ xfs_io -r -c "fiemap -v" $MNT/mysnap2/foobar # File should be using 256K of data (two 128K extents). echo -e "\nSpace used by the file: $(du -h $MNT/mysnap2/foobar | cut -f 1)" umount $MNT Running the test, we can see with fiemap that we get an extent for the range [512M, 1G[, while in the source filesystem we have an extent for the range [512M, 512M + 128K[ and a hole for the rest of the file (the range [512M + 128K, 1G[): $ ./test.sh (...) File fiemap in the second snapshot: /mnt/sdh/mysnap2/foobar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..255]: 26624..26879 256 0x0 1: [256..1048575]: hole 1048320 2: [1048576..2097151]: 2156544..3205119 1048576 0x1 Space used by the file: 513M This happens because once we finish processing an inode, at finish_inode_if_needed(), we always issue a hole (write operations full of zeros) if there's a gap between the end of the last processed extent and the file's size, even if that range is already a hole in the parent snapshot. Fix this by issuing the hole only if the range is not already a hole. After this change, running the test above, we get the expected layout: $ ./test.sh (...) File fiemap in the second snapshot: /mnt/sdh/mysnap2/foobar: EXT: FILE-OFFSET BLOCK-RANGE TOTAL FLAGS 0: [0..255]: 26624..26879 256 0x0 1: [256..1048575]: hole 1048320 2: [1048576..1048831]: 26880..27135 256 0x1 3: [1048832..2097151]: hole 1048320 Space used by the file: 256K A test case for fstests will follow soon. CC: stable@vger.kernel.org # 6.1+ Reported-by: Dorai Ashok S A Link: https://lore.kernel.org/linux-btrfs/c0bf7818-9c45-46a8-b3d3-513230d0c86e@inix.me/ Reviewed-by: Sweet Tea Dorminy Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9845664b9ee47ce7ee7ea93caf47d39a9d4552c4 Author: David Sterba Date: Wed Feb 14 16:19:24 2024 +0100 btrfs: dev-replace: properly validate device names There's a syzbot report that device name buffers passed to device replace are not properly checked for string termination which could lead to a read out of bounds in getname_kernel(). Add a helper that validates both source and target device name buffers. For devid as the source initialize the buffer to empty string in case something tries to read it later. This was originally analyzed and fixed in a different way by Edward Adam Davis (see links). Link: https://lore.kernel.org/linux-btrfs/000000000000d1a1d1060cc9c5e7@google.com/ Link: https://lore.kernel.org/linux-btrfs/tencent_44CA0665C9836EF9EEC80CB9E7E206DF5206@qq.com/ CC: stable@vger.kernel.org # 4.19+ CC: Edward Adam Davis Reported-and-tested-by: syzbot+33f23b49ac24f986c9e8@syzkaller.appspotmail.com Reviewed-by: Boris Burkov Signed-off-by: David Sterba commit 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174 Author: Johannes Thumshirn Date: Mon Feb 12 11:59:52 2024 +0100 btrfs: zoned: don't skip block group profile checks on conventional zones On a zoned filesystem with conventional zones, we're skipping the block group profile checks for the conventional zones. This allows converting a zoned filesystem's data block groups to RAID when all of the zones backing the chunk are on conventional zones. But this will lead to problems, once we're trying to allocate chunks backed by sequential zones. So also check for conventional zones when loading a block group's profile on them. Reported-by: HAN Yuwei Link: https://lore.kernel.org/all/1ACD2E3643008A17+da260584-2c7f-432a-9e22-9d390aae84cc@bupt.moe/#t Reviewed-by: Boris Burkov Reviewed-by: Naohiro Aota Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 40510a941d27d405a82dc3320823d875f94625df Author: Thomas Hellström Date: Wed Feb 21 08:33:24 2024 +0100 drm/ttm: Fix an invalid freeing on already freed page in error path If caching mode change fails due to, for example, OOM we free the allocated pages in a two-step process. First the pages for which the caching change has already succeeded. Secondly the pages for which a caching change did not succeed. However the second step was incorrectly freeing the pages already freed in the first step. Fix. Signed-off-by: Thomas Hellström Fixes: 379989e7cbdc ("drm/ttm/pool: Fix ttm_pool_alloc error path") Cc: Christian König Cc: Dave Airlie Cc: Christian Koenig Cc: Huang Rui Cc: dri-devel@lists.freedesktop.org Cc: # v6.4+ Reviewed-by: Matthew Auld Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20240221073324.3303-1-thomas.hellstrom@linux.intel.com commit 8c987693dc2d292d777f1be63cb35233049ae25e Author: Geert Uytterhoeven Date: Wed Feb 14 15:57:42 2024 +0100 ARM: dts: renesas: rcar-gen2: Add missing #interrupt-cells to DA9063 nodes make dtbs_check W=2: arch/arm/boot/dts/renesas/r8a7790-lager.dts:444.11-458.5: Warning (interrupt_provider): /i2c-mux4/pmic@58: Missing '#interrupt-cells' in interrupt provider ... Fix this by adding the missing #interrupt-cells properties. Reported-by: Rob Herring Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/a351e503ea97fb1af68395843f513925ff1bdf26.1707922460.git.geert+renesas@glider.be commit 359e54a93ab43d32ee1bff3c2f9f10cb9f6b6e79 Author: Tom Parkin Date: Tue Feb 20 12:21:56 2024 +0000 l2tp: pass correct message length to ip6_append_data l2tp_ip6_sendmsg needs to avoid accounting for the transport header twice when splicing more data into an already partially-occupied skbuff. To manage this, we check whether the skbuff contains data using skb_queue_empty when deciding how much data to append using ip6_append_data. However, the code which performed the calculation was incorrect: ulen = len + skb_queue_empty(&sk->sk_write_queue) ? transhdrlen : 0; ...due to C operator precedence, this ends up setting ulen to transhdrlen for messages with a non-zero length, which results in corrupted packets on the wire. Add parentheses to correct the calculation in line with the original intent. Fixes: 9d4c75800f61 ("ipv4, ipv6: Fix handling of transhdrlen in __ip{,6}_append_data()") Cc: David Howells Cc: stable@vger.kernel.org Signed-off-by: Tom Parkin Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240220122156.43131-1-tparkin@katalix.com Signed-off-by: Paolo Abeni commit e0359f1551b8d4a8d00704699c07fabb11a07cf1 Author: Rafael J. Wysocki Date: Thu Feb 22 10:35:54 2024 +0100 Revert "ACPI: EC: Use a spin lock without disabing interrupts" Commit eb9299beadbd ("ACPI: EC: Use a spin lock without disabing interrupts") introduced an unexpected user-visible change in behavior, which is a significant CPU load increase when the EC is in use. This most likely happens due to increased spinlock contention and so reducing this effect would require a major rework of the EC driver locking. There is no time for this in the current cycle, so revert commit eb9299beadbd. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218511 Reported-by: Dieter Mummenschanz Signed-off-by: Rafael J. Wysocki commit 9ff27943060c0282ca14e40f05c2b907edc85a42 Merge: fdcd4467ba154 195e5f88c2e48 Author: Paolo Abeni Date: Thu Feb 22 10:20:50 2024 +0100 Merge tag 'nf-24-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) If user requests to wake up a table and hook fails, restore the dormant flag from the error path, from Florian Westphal. 2) Reset dst after transferring it to the flow object, otherwise dst gets released twice from the error path. 3) Release dst in case the flowtable selects a direct xmit path, eg. transmission to bridge port. Otherwise, dst is memleaked. 4) Register basechain and flowtable hooks at the end of the command. Error path releases these datastructure without waiting for the rcu grace period. 5) Use kzalloc() to initialize struct nft_hook to fix a KMSAN report on access to hook type, also from Florian Westphal. netfilter pull request 24-02-22 * tag 'nf-24-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: use kzalloc for hook allocation netfilter: nf_tables: register hooks last when adding new chain/flowtable netfilter: nft_flow_offload: release dst in case direct xmit path is used netfilter: nft_flow_offload: reset dst in route object after setting up flow netfilter: nf_tables: set dormant flag on hook register failure ==================== Link: https://lore.kernel.org/r/20240222000843.146665-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit fdcd4467ba154465402432888f9ba9ad2122a37a Merge: 3489182b11d35 4cd12c6065dfc Author: Paolo Abeni Date: Thu Feb 22 10:04:46 2024 +0100 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2024-02-22 The following pull-request contains BPF updates for your *net* tree. We've added 11 non-merge commits during the last 24 day(s) which contain a total of 15 files changed, 217 insertions(+), 17 deletions(-). The main changes are: 1) Fix a syzkaller-triggered oops when attempting to read the vsyscall page through bpf_probe_read_kernel and friends, from Hou Tao. 2) Fix a kernel panic due to uninitialized iter position pointer in bpf_iter_task, from Yafang Shao. 3) Fix a race between bpf_timer_cancel_and_free and bpf_timer_cancel, from Martin KaFai Lau. 4) Fix a xsk warning in skb_add_rx_frag() (under CONFIG_DEBUG_NET) due to incorrect truesize accounting, from Sebastian Andrzej Siewior. 5) Fix a NULL pointer dereference in sk_psock_verdict_data_ready, from Shigeru Yoshida. 6) Fix a resolve_btfids warning when bpf_cpumask symbol cannot be resolved, from Hari Bathini. bpf-for-netdev * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready() selftests/bpf: Add negtive test cases for task iter bpf: Fix an issue due to uninitialized bpf_iter_task selftests/bpf: Test racing between bpf_timer_cancel_and_free and bpf_timer_cancel bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel selftest/bpf: Test the read of vsyscall page under x86-64 x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault() x86/mm: Move is_vsyscall_vaddr() into asm/vsyscall.h bpf, scripts: Correct GPL license name xsk: Add truesize to skb_add_rx_frag(). bpf: Fix warning for bpf_cpumask in verifier ==================== Link: https://lore.kernel.org/r/20240221231826.1404-1-daniel@iogearbox.net Signed-off-by: Paolo Abeni commit 3489182b11d35f1944c1245fc9c4867cf622c50f Author: Siddharth Vadapalli Date: Tue Feb 20 12:30:07 2024 +0530 net: phy: realtek: Fix rtl8211f_config_init() for RTL8211F(D)(I)-VD-CG PHY Commit bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG") extended support of the driver from the existing support for RTL8211F(D)(I)-CG PHY to the newer RTL8211F(D)(I)-VD-CG PHY. While that commit indicated that the RTL8211F_PHYCR2 register is not supported by the "VD-CG" PHY model and therefore updated the corresponding section in rtl8211f_config_init() to be invoked conditionally, the call to "genphy_soft_reset()" was left as-is, when it should have also been invoked conditionally. This is because the call to "genphy_soft_reset()" was first introduced by the commit 0a4355c2b7f8 ("net: phy: realtek: add dt property to disable CLKOUT clock") since the RTL8211F guide indicates that a PHY reset should be issued after setting bits in the PHYCR2 register. As the PHYCR2 register is not applicable to the "VD-CG" PHY model, fix the rtl8211f_config_init() function by invoking "genphy_soft_reset()" conditionally based on the presence of the "PHYCR2" register. Fixes: bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG") Signed-off-by: Siddharth Vadapalli Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240220070007.968762-1-s-vadapalli@ti.com Signed-off-by: Paolo Abeni commit 39a4cd5a3a32fe61716cfcaae1a01f9e5ee4971c Merge: 7d2a894d7f487 187bbb6968af5 Author: Paolo Abeni Date: Thu Feb 22 09:28:06 2024 +0100 Merge branch 'ioam6-fix-write-to-cloned-skb-s' Justin Iurman says: ==================== ioam6: fix write to cloned skb's Make sure the IOAM data insertion is not applied on cloned skb's. As a consequence, ioam selftests needed a refactoring. ==================== Link: https://lore.kernel.org/r/20240219135255.15429-1-justin.iurman@uliege.be Signed-off-by: Paolo Abeni commit 187bbb6968af5400e436c193765c5d845a07364f Author: Justin Iurman Date: Mon Feb 19 14:52:55 2024 +0100 selftests: ioam: refactoring to align with the fix ioam6_parser uses a packet socket. After the fix to prevent writing to cloned skb's, the receiver does not see its IOAM data anymore, which makes input/forward ioam-selftests to fail. As a workaround, ioam6_parser now uses an IPv6 raw socket and leverages ancillary data to get hop-by-hop options. As a consequence, the hook is "after" the IOAM data insertion by the receiver and all tests are working again. Signed-off-by: Justin Iurman Signed-off-by: Paolo Abeni commit f198d933c2e4f8f89e0620fbaf1ea7eac384a0eb Author: Justin Iurman Date: Mon Feb 19 14:52:54 2024 +0100 Fix write to cloned skb in ipv6_hop_ioam() ioam6_fill_trace_data() writes inside the skb payload without ensuring it's writeable (e.g., not cloned). This function is called both from the input and output path. The output path (ioam6_iptunnel) already does the check. This commit provides a fix for the input path, inside ipv6_hop_ioam(). It also updates ip6_parse_tlv() to refresh the network header pointer ("nh") when returning from ipv6_hop_ioam(). Fixes: 9ee11f0fff20 ("ipv6: ioam: Data plane support for Pre-allocated Trace") Reported-by: Paolo Abeni Signed-off-by: Justin Iurman Signed-off-by: Paolo Abeni commit 7d2a894d7f487dcb894df023e9d3014cf5b93fe5 Author: Rémi Denis-Courmont Date: Sun Feb 18 10:12:14 2024 +0200 phonet/pep: fix racy skb_queue_empty() use The receive queues are protected by their respective spin-lock, not the socket lock. This could lead to skb_peek() unexpectedly returning NULL or a pointer to an already dequeued socket buffer. Fixes: 9641458d3ec4 ("Phonet: Pipe End Point for Phonet Pipes protocol") Signed-off-by: Rémi Denis-Courmont Link: https://lore.kernel.org/r/20240218081214.4806-2-remi@remlab.net Signed-off-by: Paolo Abeni commit 3b2d9bc4d4acdf15a876eae2c0d83149250e85ba Author: Rémi Denis-Courmont Date: Sun Feb 18 10:12:13 2024 +0200 phonet: take correct lock to peek at the RX queue The receive queue is protected by its embedded spin-lock, not the socket lock, so we need the former lock here (and only that one). Fixes: 107d0d9b8d9a ("Phonet: Phonet datagram transport protocol") Reported-by: Luosili Signed-off-by: Rémi Denis-Courmont Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240218081214.4806-1-remi@remlab.net Signed-off-by: Paolo Abeni commit 56ee7db31187dc36d501622cb5f1415e88e01c2a Author: Sandeep Dhavale Date: Wed Feb 21 13:03:47 2024 -0800 erofs: fix refcount on the metabuf used for inode lookup In erofs_find_target_block() when erofs_dirnamecmp() returns 0, we do not assign the target metabuf. This causes the caller erofs_namei()'s erofs_put_metabuf() at the end to be not effective leaving the refcount on the page. As the page from metabuf (buf->page) is never put, such page cannot be migrated or reclaimed. Fix it now by putting the metabuf from previous loop and assigning the current metabuf to target before returning so caller erofs_namei() can do the final put as it was intended. Fixes: 500edd095648 ("erofs: use meta buffers for inode lookup") Cc: # 5.18+ Signed-off-by: Sandeep Dhavale Reviewed-by: Gao Xiang Reviewed-by: Jingbo Xu Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20240221210348.3667795-1-dhavale@google.com Signed-off-by: Gao Xiang commit 603ead96582d85903baec2d55f021b8dac5c25d2 Author: Horatiu Vultur Date: Mon Feb 19 09:00:43 2024 +0100 net: sparx5: Add spinlock for frame transmission from CPU Both registers used when doing manual injection or fdma injection are shared between all the net devices of the switch. It was noticed that when having two process which each of them trying to inject frames on different ethernet ports, that the HW started to behave strange, by sending out more frames then expected. When doing fdma injection it is required to set the frame in the DCB and then make sure that the next pointer of the last DCB is invalid. But because there is no locks for this, then easily this pointer between the DCB can be broken and then it would create a loop of DCBs. And that means that the HW will continuously transmit these frames in a loop. Until the SW will break this loop. Therefore to fix this issue, add a spin lock for when accessing the registers for manual or fdma injection. Signed-off-by: Horatiu Vultur Reviewed-by: Daniel Machon Fixes: f3cad2611a77 ("net: sparx5: add hostmode with phylink support") Link: https://lore.kernel.org/r/20240219080043.1561014-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit 1fde0ca3a0de7e9f917668941156959dd5e9108b Author: Jianbo Liu Date: Tue Feb 20 08:59:28 2024 +0000 net/sched: flower: Add lock protection when remove filter handle As IDR can't protect itself from the concurrent modification, place idr_remove() under the protection of tp->lock. Fixes: 08a0063df3ae ("net/sched: flower: Move filter handle initialization earlier") Signed-off-by: Jianbo Liu Reviewed-by: Cosmin Ratiu Reviewed-by: Gal Pressman Reviewed-by: Jiri Pirko Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20240220085928.9161-1-jianbol@nvidia.com Signed-off-by: Jakub Kicinski commit 61c43780e9444123410cd48c2483e01d2b8f75e8 Author: Jiri Pirko Date: Tue Feb 20 08:52:45 2024 +0100 devlink: fix port dump cmd type Unlike other commands, due to a c&p error, port dump fills-up cmd with wrong value, different from port-get request cmd, port-get doit reply and port notification. Fix it by filling cmd with value DEVLINK_CMD_PORT_NEW. Skimmed through devlink userspace implementations, none of them cares about this cmd value. Only ynl, for which, this is actually a fix, as it expects doit and dumpit ops rsp_value to be the same. Omit the fixes tag, even thought this is fix, better to target this for next release. Fixes: bfcd3a466172 ("Introduce devlink infrastructure") Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/r/20240220075245.75416-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 90d07e36d40079a22ca99edd2412e7e9c2382968 Author: Kurt Kanzenbach Date: Tue Feb 20 09:22:46 2024 +0100 net: stmmac: Fix EST offset for dwmac 5.10 Fix EST offset for dwmac 5.10. Currently configuring Qbv doesn't work as expected. The schedule is configured, but never confirmed: |[ 128.250219] imx-dwmac 428a0000.ethernet eth1: configured EST The reason seems to be the refactoring of the EST code which set the wrong EST offset for the dwmac 5.10. After fixing this it works as before: |[ 106.359577] imx-dwmac 428a0000.ethernet eth1: configured EST |[ 128.430715] imx-dwmac 428a0000.ethernet eth1: EST: SWOL has been switched Tested on imx93. Fixes: c3f3b97238f6 ("net: stmmac: Refactor EST implementation") Signed-off-by: Kurt Kanzenbach Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/20240220-stmmac_est-v1-1-c41f9ae2e7b7@linutronix.de Signed-off-by: Jakub Kicinski commit 1e07900d87f16ead22ffd9f8d27f2655055bf30c Merge: 9990889be1428 5d78b73e85145 Author: Jakub Kicinski Date: Wed Feb 21 17:02:30 2024 -0800 Merge branch 'tools-ynl-fix-impossible-errors' Jakub Kicinski says: ==================== tools: ynl: fix impossible errors Fix bugs discovered while I was hacking in low level stuff in YNL and kept breaking the socket, exercising the "impossible" error paths. v1: https://lore.kernel.org/all/20240217001742.2466993-1-kuba@kernel.org/ ==================== Link: https://lore.kernel.org/r/20240220161112.2735195-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 5d78b73e851455d525a064f3b042b29fdc0c1a4a Author: Jakub Kicinski Date: Tue Feb 20 08:11:12 2024 -0800 tools: ynl: don't leak mcast_groups on init error Make sure to free the already-parsed mcast_groups if we don't get an ack from the kernel when reading family info. This is part of the ynl_sock_create() error path, so we won't get a call to ynl_sock_destroy() to free them later. Fixes: 86878f14d71a ("tools: ynl: user space helpers") Acked-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20240220161112.2735195-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e4fe082c38cd74a8fa384bc7542cf3edf1cb7318 Author: Jakub Kicinski Date: Tue Feb 20 08:11:11 2024 -0800 tools: ynl: make sure we always pass yarg to mnl_cb_run There is one common error handler in ynl - ynl_cb_error(). It expects priv to be a pointer to struct ynl_parse_arg AKA yarg. To avoid potential crashes if we encounter a stray NLMSG_ERROR always pass yarg as priv (or a struct which has it as the first member). ynl_cb_null() has a similar problem directly - it expects yarg but priv passed by the caller is ys. Found by code inspection. Fixes: 86878f14d71a ("tools: ynl: user space helpers") Acked-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20240220161112.2735195-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 9990889be14288d4f1743e4768222d5032a79c27 Author: Jeremy Kerr Date: Thu Feb 15 15:53:08 2024 +0800 net: mctp: put sock on tag allocation failure We may hold an extra reference on a socket if a tag allocation fails: we optimistically allocate the sk_key, and take a ref there, but do not drop if we end up not using the allocated key. Ensure we're dropping the sock on this failure by doing a proper unref rather than directly kfree()ing. Fixes: de8a6b15d965 ("net: mctp: add an explicit reference from a mctp_sk_key to sock") Signed-off-by: Jeremy Kerr Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/ce9b61e44d1cdae7797be0c5e3141baf582d23a0.1707983487.git.jk@codeconstruct.com.au Signed-off-by: Jakub Kicinski commit 195e5f88c2e48330ba5483e0bad2de3b3fad484f Author: Florian Westphal Date: Wed Feb 21 18:38:45 2024 +0100 netfilter: nf_tables: use kzalloc for hook allocation KMSAN reports unitialized variable when registering the hook, reg->hook_ops_type == NF_HOOK_OP_BPF) ~~~~~~~~~~~ undefined This is a small structure, just use kzalloc to make sure this won't happen again when new fields get added to nf_hook_ops. Fixes: 7b4b2fa37587 ("netfilter: annotate nf_tables base hook ops") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d472e9853d7b46a6b094224d131d09ccd3a03daf Author: Pablo Neira Ayuso Date: Mon Feb 19 19:43:53 2024 +0100 netfilter: nf_tables: register hooks last when adding new chain/flowtable Register hooks last when adding chain/flowtable to ensure that packets do not walk over datastructure that is being released in the error path without waiting for the rcu grace period. Fixes: 91c7b38dc9f0 ("netfilter: nf_tables: use new transaction infrastructure to handle chain") Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend") Signed-off-by: Pablo Neira Ayuso commit 8762785f459be1cfe6fcf7285c123aad6a3703f0 Author: Pablo Neira Ayuso Date: Tue Feb 20 21:36:39 2024 +0100 netfilter: nft_flow_offload: release dst in case direct xmit path is used Direct xmit does not use it since it calls dev_queue_xmit() to send packets, hence it calls dst_release(). kmemleak reports: unreferenced object 0xffff88814f440900 (size 184): comm "softirq", pid 0, jiffies 4294951896 hex dump (first 32 bytes): 00 60 5b 04 81 88 ff ff 00 e6 e8 82 ff ff ff ff .`[............. 21 0b 50 82 ff ff ff ff 00 00 00 00 00 00 00 00 !.P............. backtrace (crc cb2bf5d6): [<000000003ee17107>] kmem_cache_alloc+0x286/0x340 [<0000000021a5de2c>] dst_alloc+0x43/0xb0 [<00000000f0671159>] rt_dst_alloc+0x2e/0x190 [<00000000fe5092c9>] __mkroute_output+0x244/0x980 [<000000005fb96fb0>] ip_route_output_flow+0xc0/0x160 [<0000000045367433>] nf_ip_route+0xf/0x30 [<0000000085da1d8e>] nf_route+0x2d/0x60 [<00000000d1ecd1cb>] nft_flow_route+0x171/0x6a0 [nft_flow_offload] [<00000000d9b2fb60>] nft_flow_offload_eval+0x4e8/0x700 [nft_flow_offload] [<000000009f447dbb>] expr_call_ops_eval+0x53/0x330 [nf_tables] [<00000000072e1be6>] nft_do_chain+0x17c/0x840 [nf_tables] [<00000000d0551029>] nft_do_chain_inet+0xa1/0x210 [nf_tables] [<0000000097c9d5c6>] nf_hook_slow+0x5b/0x160 [<0000000005eccab1>] ip_forward+0x8b6/0x9b0 [<00000000553a269b>] ip_rcv+0x221/0x230 [<00000000412872e5>] __netif_receive_skb_one_core+0xfe/0x110 Fixes: fa502c865666 ("netfilter: flowtable: simplify route logic") Reported-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 9e0f0430389be7696396c62f037be4bf72cf93e3 Author: Pablo Neira Ayuso Date: Wed Feb 21 12:32:58 2024 +0100 netfilter: nft_flow_offload: reset dst in route object after setting up flow dst is transferred to the flow object, route object does not own it anymore. Reset dst in route object, otherwise if flow_offload_add() fails, error path releases dst twice, leading to a refcount underflow. Fixes: a3c90f7a2323 ("netfilter: nf_tables: flow offload expression") Signed-off-by: Pablo Neira Ayuso commit bccebf64701735533c8db37773eeacc6566cc8ec Author: Florian Westphal Date: Mon Feb 19 16:58:04 2024 +0100 netfilter: nf_tables: set dormant flag on hook register failure We need to set the dormant flag again if we fail to register the hooks. During memory pressure hook registration can fail and we end up with a table marked as active but no registered hooks. On table/base chain deletion, nf_tables will attempt to unregister the hook again which yields a warn splat from the nftables core. Reported-and-tested-by: syzbot+de4025c006ec68ac56fc@syzkaller.appspotmail.com Fixes: 179d9ba5559a ("netfilter: nf_tables: fix table flag updates") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 58506612bf023f03ab73a7237c09e1618b66b399 Merge: 3951f6add519a 3aff0c459e77a Author: Palmer Dabbelt Date: Fri Feb 16 16:07:10 2024 -0800 Merge patch series "RISC-V: Fix CONFIG_AS_HAS_OPTION_ARCH with tip of tree LLVM" Nathan Chancellor says: Eric reported that builds of LLVM with [1] (close to tip of tree) have CONFIG_AS_HAS_OPTION_ARCH=n because the test for expected failure on invalid input has started succeeding. This Kconfig test was added because '.option arch' only causes an assembler warning when it is unsupported, rather than a hard error, which is what users of as-instr expect when something is unsupported. This can be resolved by turning assembler warnings into errors with '-Wa,--fatal-warnings' like we do with the compiler with '-Werror', which is what the first patch does. The second patch removes the invalid test, as the valid test is good enough with fatal warnings. I have diffed several configurations for the different architectures that use as-instr and I have found no issues. [1]: https://github.com/llvm/llvm-project/commit/3ac9fe69f70a2b3541266daedbaaa7dc9c007a2a * b4-shazam-merge: RISC-V: Drop invalid test from CONFIG_AS_HAS_OPTION_ARCH kbuild: Add -Wa,--fatal-warnings to as-instr invocation Link: https://lore.kernel.org/r/20240125-fix-riscv-option-arch-llvm-18-v1-0-390ac9cc3cd0@kernel.org Signed-off-by: Palmer Dabbelt commit f76d5f65805695afc65e4c265bd119b7e2e88442 Merge: 136cfaca22567 2bf6172632e1d Author: Jakub Kicinski Date: Wed Feb 21 14:25:53 2024 -0800 Merge branch 'tls-fixes-for-record-type-handling-with-peek' Sabrina Dubroca says: ==================== tls: fixes for record type handling with PEEK There are multiple bugs in tls_sw_recvmsg's handling of record types when MSG_PEEK flag is used, which can lead to incorrectly merging two records: - consecutive non-DATA records shouldn't be merged, even if they're the same type (partly handled by the test at the end of the main loop) - records of the same type (even DATA) shouldn't be merged if one record of a different type comes in between ==================== Link: https://lore.kernel.org/r/cover.1708007371.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit 2bf6172632e1d4a6ec7ee7e734d53a43a145f5c6 Author: Sabrina Dubroca Date: Thu Feb 15 17:17:33 2024 +0100 selftests: tls: add test for peeking past a record of a different type If we queue 3 records: - record 1, type DATA - record 2, some other type - record 3, type DATA the current code can look past the 2nd record and merge the 2 data records. Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/4623550f8617c239581030c13402d3262f2bd14f.1708007371.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit 7b2a4c2a623a9f9c5fd9cff499bb9457fa2192ec Author: Sabrina Dubroca Date: Thu Feb 15 17:17:32 2024 +0100 selftests: tls: add test for merging of same-type control messages Two consecutive control messages of the same type should never be merged into one large received blob of data. Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/018f1633d5471684c65def5fe390de3b15c3d683.1708007371.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit ec823bf3a479d42c589dc0f28ef4951c49cd2d2a Author: Sabrina Dubroca Date: Thu Feb 15 17:17:31 2024 +0100 tls: don't skip over different type records from the rx_list If we queue 3 records: - record 1, type DATA - record 2, some other type - record 3, type DATA and do a recv(PEEK), the rx_list will contain the first two records. The next large recv will walk through the rx_list and copy data from record 1, then stop because record 2 is a different type. Since we haven't filled up our buffer, we will process the next available record. It's also DATA, so we can merge it with the current read. We shouldn't do that, since there was a record in between that we ignored. Add a flag to let process_rx_list inform tls_sw_recvmsg that it had more data available. Fixes: 692d7b5d1f91 ("tls: Fix recvmsg() to be able to peek across multiple records") Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/f00c0c0afa080c60f016df1471158c1caf983c34.1708007371.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit fdfbaec5923d9359698cbb286bc0deadbb717504 Author: Sabrina Dubroca Date: Thu Feb 15 17:17:30 2024 +0100 tls: stop recv() if initial process_rx_list gave us non-DATA If we have a non-DATA record on the rx_list and another record of the same type still on the queue, we will end up merging them: - process_rx_list copies the non-DATA record - we start the loop and process the first available record since it's of the same type - we break out of the loop since the record was not DATA Just check the record type and jump to the end in case process_rx_list did some work. Fixes: 692d7b5d1f91 ("tls: Fix recvmsg() to be able to peek across multiple records") Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/bd31449e43bd4b6ff546f5c51cf958c31c511deb.1708007371.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit 10f41d0710fc81b7af93fa6106678d57b1ff24a7 Author: Sabrina Dubroca Date: Thu Feb 15 17:17:29 2024 +0100 tls: break out of main loop when PEEK gets a non-data record PEEK needs to leave decrypted records on the rx_list so that we can receive them later on, so it jumps back into the async code that queues the skb. Unfortunately that makes us skip the TLS_RECORD_TYPE_DATA check at the bottom of the main loop, so if two records of the same (non-DATA) type are queued, we end up merging them. Add the same record type check, and make it unlikely to not penalize the async fastpath. Async decrypt only applies to data record, so this check is only needed for PEEK. process_rx_list also has similar issues. Fixes: 692d7b5d1f91 ("tls: Fix recvmsg() to be able to peek across multiple records") Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/r/3df2eef4fdae720c55e69472b5bea668772b45a2.1708007371.git.sd@queasysnail.net Signed-off-by: Jakub Kicinski commit 136cfaca22567a03bbb3bf53a43d8cb5748b80ec Author: Vasiliy Kovalev Date: Wed Feb 14 19:27:33 2024 +0300 gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp() The gtp_net_ops pernet operations structure for the subsystem must be registered before registering the generic netlink family. Syzkaller hit 'general protection fault in gtp_genl_dump_pdp' bug: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] CPU: 1 PID: 5826 Comm: gtp Not tainted 6.8.0-rc3-std-def-alt1 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-alt1 04/01/2014 RIP: 0010:gtp_genl_dump_pdp+0x1be/0x800 [gtp] Code: c6 89 c6 e8 64 e9 86 df 58 45 85 f6 0f 85 4e 04 00 00 e8 c5 ee 86 df 48 8b 54 24 18 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 de 05 00 00 48 8b 44 24 18 4c 8b 30 4c 39 f0 74 RSP: 0018:ffff888014107220 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000002 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88800fcda588 R14: 0000000000000001 R15: 0000000000000000 FS: 00007f1be4eb05c0(0000) GS:ffff88806ce80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1be4e766cf CR3: 000000000c33e000 CR4: 0000000000750ef0 PKRU: 55555554 Call Trace: ? show_regs+0x90/0xa0 ? die_addr+0x50/0xd0 ? exc_general_protection+0x148/0x220 ? asm_exc_general_protection+0x22/0x30 ? gtp_genl_dump_pdp+0x1be/0x800 [gtp] ? __alloc_skb+0x1dd/0x350 ? __pfx___alloc_skb+0x10/0x10 genl_dumpit+0x11d/0x230 netlink_dump+0x5b9/0xce0 ? lockdep_hardirqs_on_prepare+0x253/0x430 ? __pfx_netlink_dump+0x10/0x10 ? kasan_save_track+0x10/0x40 ? __kasan_kmalloc+0x9b/0xa0 ? genl_start+0x675/0x970 __netlink_dump_start+0x6fc/0x9f0 genl_family_rcv_msg_dumpit+0x1bb/0x2d0 ? __pfx_genl_family_rcv_msg_dumpit+0x10/0x10 ? genl_op_from_small+0x2a/0x440 ? cap_capable+0x1d0/0x240 ? __pfx_genl_start+0x10/0x10 ? __pfx_genl_dumpit+0x10/0x10 ? __pfx_genl_done+0x10/0x10 ? security_capable+0x9d/0xe0 Cc: stable@vger.kernel.org Signed-off-by: Vasiliy Kovalev Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Link: https://lore.kernel.org/r/20240214162733.34214-1-kovalev@altlinux.org Signed-off-by: Jakub Kicinski commit d56e460e19ea8382f813eb489730248ec8d7eb73 Author: Guenter Roeck Date: Wed Feb 21 06:01:20 2024 -0800 hwmon: (nct6775) Fix access to temperature configuration registers The number of temperature configuration registers does not always match the total number of temperature registers. This can result in access errors reported if KASAN is enabled. BUG: KASAN: global-out-of-bounds in nct6775_probe+0x5654/0x6fe9 nct6775_core Reported-by: Erhard Furtner Closes: https://lore.kernel.org/linux-hwmon/d51181d1-d26b-42b2-b002-3f5a4037721f@roeck-us.net/ Fixes: b7f1f7b2523a ("hwmon: (nct6775) Additional TEMP registers for nct6799") Cc: Ahmad Khalifa Tested-by: Ahmad Khalifa Signed-off-by: Guenter Roeck commit b7b2ffc3ca59b06397550f96febe95f3f153eb1e Author: Vegard Nossum Date: Thu Feb 15 07:41:09 2024 +0100 docs: translations: use attribute to store current language Akira Yokosawa reported [1] that the "translations" extension we added in commit 7418ec5b151f ("docs: translations: add translations links when they exist") broke the build on Sphinx versions v6.1.3 through 7.1.2 (possibly others) with the following error: Exception occurred: File "/usr/lib/python3.12/site-packages/sphinx/util/nodes.py", line 624, in _copy_except__document newnode = self.__class__(rawsource=self.rawsource, **self.attributes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: LanguagesNode.__init__() missing 1 required positional argument: 'current_language' The full traceback has been saved in /tmp/sphinx-err-7xmwytuu.log, if you want to report the issue to the developers. Solve this problem by making 'current_language' a true element attribute of the LanguagesNode element, which is probably the more correct way to do it anyway. Tested on Sphinx 2.x, 3.x, 6.x, and 7.x. [1]: https://lore.kernel.org/all/54a56c2e-a27c-45a0-b712-02a7bc7d2673@gmail.com/ Fixes: 7418ec5b151f ("docs: translations: add translations links when they exist") Reported-by: Akira Yokosawa Signed-off-by: Vegard Nossum Closes: https://lore.kernel.org/all/54a56c2e-a27c-45a0-b712-02a7bc7d2673@gmail.com/ Tested-by: Akira Yokosawa # Sphinx 4.3.2, 5.3.0 and 6.2.1 Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240215064109.1193556-1-vegard.nossum@oracle.com commit ec4308ecfc887128a468f03fb66b767559c57c23 Author: Oliver Upton Date: Mon Feb 19 18:58:06 2024 +0000 irqchip/gic-v3-its: Do not assume vPE tables are preallocated The GIC/ITS code is designed to ensure to pick up any preallocated LPI tables on the redistributors, as enabling LPIs is a one-way switch. There is no such restriction for vLPIs, and for GICv4.1 it is expected to allocate a new vPE table at boot. This works as intended when initializing an ITS, however when setting up a redistributor in cpu_init_lpis() the early return for preallocated RD tables skips straight past the GICv4 setup. This all comes to a head when trying to kexec() into a new kernel, as the new kernel silently fails to set up GICv4, leading to a complete loss of SGIs and LPIs for KVM VMs. Slap a band-aid on the problem by ensuring its_cpu_init_lpis() always initializes GICv4 on the way out, even if the other RD tables were preallocated. Fixes: 6479450f72c1 ("irqchip/gic-v4: Fix occasional VLPI drop") Reported-by: George Cherian Co-developed-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oliver Upton Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240219185809.286724-2-oliver.upton@linux.dev commit 1b7d9ab3e66655f19ee0c60cc667913da19a41f0 Author: Jeff Johnson Date: Sat Feb 17 12:47:02 2024 -0800 MAINTAINERS: wifi: Add N: ath1*k entries to match .yaml files In [1] it was observed that the ath12k maintainers were not added to the review of a new ath12k YAML file. Bartosz suggested "adding an N: ath12k entry to MAINTAINERS" to prevent this in the future. In the process it was noticed that one of the ath11k YAML files was also not explicitly referenced, so add N: entries to ath10k, ath11k, and ath12k, and remove the explicit F: entries. Link: https://lore.kernel.org/linux-wireless/20240216203215.40870-7-brgl@bgdev.pl/ [1] Suggested-by: Bartosz Golaszewski Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240217-update-maintainer-v1-2-1426cf7a8bb1@quicinc.com commit 27dc4c6ee5feb87fd4967eb9978fd38e5711cb8b Author: Jeff Johnson Date: Sat Feb 17 12:47:01 2024 -0800 MAINTAINERS: wifi: update Jeff Johnson e-mail address I now have a @kernel.org e-mail address, so use that for my maintenance activities. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240217-update-maintainer-v1-1-1426cf7a8bb1@quicinc.com commit 9cec467d0502b24660f413a0e8fc782903b46d5b Author: Damien Le Moal Date: Mon Feb 19 16:44:30 2024 +0100 ata: libata-core: Do not call ata_dev_power_set_standby() twice For regular system shutdown, ata_dev_power_set_standby() will be executed twice: once the scsi device is removed and another when ata_pci_shutdown_one() executes and EH completes unloading the devices. Make the second call to ata_dev_power_set_standby() do nothing by using ata_dev_power_is_active() and return if the device is already in standby. Fixes: 2da4c5e24e86 ("ata: libata-core: Improve ata_dev_power_set_active()") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel commit fb33a46cd75e18773dd5a414744507d84ae90870 Author: Chen Jun Date: Tue Feb 20 19:14:29 2024 +0800 irqchip/mbigen: Don't use bus_get_dev_root() to find the parent bus_get_dev_root() returns sp->dev_root which is set in subsys_register(), but subsys_register() is not called by platform_bus_init(). Therefor for the platform_bus_type, bus_get_dev_root() always returns NULL. This makes mbigen_of_create_domain() always return -ENODEV. Don't try to retrieve the parent via bus_get_dev_root() and unconditionally hand a NULL pointer to of_platform_device_create() to fix this. Fixes: fea087fc291b ("irqchip/mbigen: move to use bus_get_dev_root()") Signed-off-by: Chen Jun Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240220111429.110666-1-chenjun102@huawei.com commit 39133352cbed6626956d38ed72012f49b0421e7b Merge: 8da8d88455ebb c48617fbbe831 Author: Linus Torvalds Date: Wed Feb 21 09:13:27 2024 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Two fixes for ARM ITS emulation. Unmapped interrupts were used instead of ignored, causing NULL pointer dereferences" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table() commit 8da8d88455ebbb4e05423cf60cff985e92d43754 Merge: d8be5a55b8e3f b0ad381fa7690 Author: Linus Torvalds Date: Wed Feb 21 08:45:07 2024 -0800 Merge tag 'for-6.8-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - Fix a deadlock in fiemap. There was a big lock around the whole operation that can interfere with a page fault and mkwrite. Reducing the lock scope can also speed up fiemap - Fix range condition for extent defragmentation which could lead to worse layout in some cases * tag 'for-6.8-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix deadlock with fiemap and extent locking btrfs: defrag: avoid unnecessary defrag caused by incorrect extent size commit d8be5a55b8e3f7eab8f36ceed2512f457f914318 Merge: 9fc1ccccfd8d5 c0ec2a712daf1 Author: Linus Torvalds Date: Wed Feb 21 08:37:49 2024 -0800 Merge tag 'v6.8-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix a stack overflow in virtio" * tag 'v6.8-p4' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: virtio/akcipher - Fix stack overflow on memcpy commit 9bd405c48b0ac4de087c0c4440fd79597201b8a7 Author: Lad Prabhakar Date: Sat Feb 3 21:26:40 2024 +0000 cache: ax45mp_cache: Align end size to cache boundary in ax45mp_dma_cache_wback() Align the end size to cache boundary size in ax45mp_dma_cache_wback() callback likewise done in ax45mp_dma_cache_inv() callback. Additionally return early in case of start == end. Fixes: d34599bcd2e4 ("cache: Add L2 cache management for Andes AX45MP RISC-V core") Reported-by: Pavel Machek Link: https://lore.kernel.org/cip-dev/ZYsdKDiw7G+kxQ3m@duo.ucw.cz/ Signed-off-by: Lad Prabhakar Signed-off-by: Conor Dooley commit 4cd12c6065dfcdeba10f49949bffcf383b3952d8 Author: Shigeru Yoshida Date: Mon Feb 19 00:09:33 2024 +0900 bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready() syzbot reported the following NULL pointer dereference issue [1]: BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] RIP: 0010:0x0 [...] Call Trace: sk_psock_verdict_data_ready+0x232/0x340 net/core/skmsg.c:1230 unix_stream_sendmsg+0x9b4/0x1230 net/unix/af_unix.c:2293 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 If sk_psock_verdict_data_ready() and sk_psock_stop_verdict() are called concurrently, psock->saved_data_ready can be NULL, causing the above issue. This patch fixes this issue by calling the appropriate data ready function using the sk_psock_data_ready() helper and protecting it from concurrency with sk->sk_callback_lock. Fixes: 6df7f764cd3c ("bpf, sockmap: Wake up polling after data copy") Reported-by: syzbot+fd7b34375c1c8ce29c93@syzkaller.appspotmail.com Signed-off-by: Shigeru Yoshida Signed-off-by: Daniel Borkmann Tested-by: syzbot+fd7b34375c1c8ce29c93@syzkaller.appspotmail.com Acked-by: John Fastabend Closes: https://syzkaller.appspot.com/bug?extid=fd7b34375c1c8ce29c93 [1] Link: https://lore.kernel.org/bpf/20240218150933.6004-1-syoshida@redhat.com commit b820de741ae48ccf50dd95e297889c286ff4f760 Author: Bart Van Assche Date: Thu Feb 15 12:47:38 2024 -0800 fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio If kiocb_set_cancel_fn() is called for I/O submitted via io_uring, the following kernel warning appears: WARNING: CPU: 3 PID: 368 at fs/aio.c:598 kiocb_set_cancel_fn+0x9c/0xa8 Call trace: kiocb_set_cancel_fn+0x9c/0xa8 ffs_epfile_read_iter+0x144/0x1d0 io_read+0x19c/0x498 io_issue_sqe+0x118/0x27c io_submit_sqes+0x25c/0x5fc __arm64_sys_io_uring_enter+0x104/0xab0 invoke_syscall+0x58/0x11c el0_svc_common+0xb4/0xf4 do_el0_svc+0x2c/0xb0 el0_svc+0x2c/0xa4 el0t_64_sync_handler+0x68/0xb4 el0t_64_sync+0x1a4/0x1a8 Fix this by setting the IOCB_AIO_RW flag for read and write I/O that is submitted by libaio. Suggested-by: Jens Axboe Cc: Christoph Hellwig Cc: Avi Kivity Cc: Sandeep Dhavale Cc: Jens Axboe Cc: Greg Kroah-Hartman Cc: Kent Overstreet Cc: stable@vger.kernel.org Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240215204739.2677806-2-bvanassche@acm.org Signed-off-by: Christian Brauner commit e78fb4eac817308027da88d02e5d0213462a7562 Author: Steven Rostedt (Google) Date: Tue Feb 20 09:51:12 2024 -0500 ring-buffer: Do not let subbuf be bigger than write mask The data on the subbuffer is measured by a write variable that also contains status flags. The counter is just 20 bits in length. If the subbuffer is bigger than then counter, it will fail. Make sure that the subbuffer can not be set to greater than the counter that keeps track of the data on the subbuffer. Link: https://lore.kernel.org/linux-trace-kernel/20240220095112.77e9cb81@gandalf.local.home Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Fixes: 2808e31ec12e5 ("ring-buffer: Add interface for configuring trace sub buffer size") Signed-off-by: Steven Rostedt (Google) commit 723a2cc8d69d4342b47dfddbfe6c19f1b135f09b Author: Jason Gunthorpe Date: Fri Feb 16 20:48:14 2024 -0400 s390: use the correct count for __iowrite64_copy() The signature for __iowrite64_copy() requires the number of 64 bit quantities, not bytes. Multiple by 8 to get to a byte length before invoking zpci_memcpy_toio() Fixes: 87bc359b9822 ("s390/pci: speed up __iowrite64_copy by using pci store block insn") Acked-by: Niklas Schnelle Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-9223d11a7662+1d7785-s390_iowrite64_jgg@nvidia.com Signed-off-by: Heiko Carstens commit 1382d8b55129875b2e07c4d2a7ebc790183769ee Author: Colin Ian King Date: Wed Feb 21 13:48:04 2024 +0000 ASoC: qcom: Fix uninitialized pointer dmactl In the case where __lpass_get_dmactl_handle is called and the driver id dai_id is invalid the pointer dmactl is not being assigned a value, and dmactl contains a garbage value since it has not been initialized and so the null check may not work. Fix this to initialize dmactl to NULL. One could argue that modern compilers will set this to zero, but it is useful to keep this initialized as per the same way in functions __lpass_platform_codec_intf_init and lpass_cdc_dma_daiops_hw_params. Cleans up clang scan build warning: sound/soc/qcom/lpass-cdc-dma.c:275:7: warning: Branch condition evaluates to a garbage value [core.uninitialized.Branch] Fixes: b81af585ea54 ("ASoC: qcom: Add lpass CPU driver for codec dma control") Signed-off-by: Colin Ian King Link: https://msgid.link/r/20240221134804.3475989-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit d3433d1bb7bde449035f54b7000361ce151bad07 Author: Emmanuel Grumbach Date: Sun Feb 18 19:51:50 2024 +0200 wifi: iwlwifi: mvm: fix the TXF mapping for BZ devices Those devices' fifos are numbered differently. Because of that, we were looking at the size of the VO fifo size to determine the size of the A-MSDU which led to a lower throughput. Note that for those devices the only user of the AC -> fifo mapping is the size limitation of A-MSDU. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240218194912.da336ca2fa0a.I73e44d5fc474ebb6f275b9008950e59c012f33b2@changeid Signed-off-by: Johannes Berg commit 78f65fbf421a61894c14a1b91fe2fb4437b3fe5f Author: Benjamin Berg Date: Sun Feb 18 19:51:47 2024 +0200 wifi: iwlwifi: mvm: ensure offloading TID queue exists The resume code path assumes that the TX queue for the offloading TID has been configured. At resume time it then tries to sync the write pointer as it may have been updated by the firmware. In the unusual event that no packets have been send on TID 0, the queue will not have been allocated and this causes a crash. Fix this by ensuring the queue exist at suspend time. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240218194912.6632e6dc7b35.Ie6e6a7488c9c7d4529f13d48f752b5439d8ac3c4@changeid Signed-off-by: Johannes Berg commit 7adc0c1cfa7732b81bf7bf2ed16ffb99719ceebf Author: Jason Gunthorpe Date: Tue Feb 20 14:43:54 2024 -0400 iommufd: Reject non-zero data_type if no data_len is provided Since the current design doesn't forward the data_type to the driver to check unless there is a data_len/uptr for a driver specific struct we should check and ensure that data_type is 0 if data_len is 0. Otherwise any value is permitted. Fixes: bd529dbb661d ("iommufd: Add a nested HW pagetable object") Link: https://lore.kernel.org/r/0-v1-9b1ea6869554+110c60-iommufd_ck_data_type_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit ed683b9bb91fc274383e222ba5873a9ee9033462 Author: Javier Martinez Canillas Date: Tue Feb 20 10:54:12 2024 +0100 sparc: Fix undefined reference to fb_is_primary_device Commit 55bffc8170bb ("fbdev: Split frame buffer support in FB and FB_CORE symbols") added a new FB_CORE Kconfig symbol, that can be enabled to only have fbcon/VT and DRM fbdev emulation, but without support for any legacy fbdev driver. Unfortunately, it missed to change the CONFIG_FB in arch/sparc makefiles, which leads to the following linking error in some sparc64 configurations: sparc64-linux-ld: drivers/video/fbdev/core/fbcon.o: in function `fbcon_fb_registered': >> fbcon.c:(.text+0x4f60): undefined reference to `fb_is_primary_device' Fixes: 55bffc8170bb ("fbdev: Split frame buffer support in FB and FB_CORE symbols") Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202401290306.IV8rhJ02-lkp@intel.com/ Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Acked-by: Arnd Bergmann Cc: # v6.6+ Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20240220095428.3341195-1-javierm@redhat.com commit 14dec56fdd4c70a0ebe40077368e367421ea6fef Author: Simon Horman Date: Mon Feb 19 17:55:31 2024 +0000 MAINTAINERS: Add framer headers to NETWORKING [GENERAL] The cited commit [1] added framer support under drivers/net/wan, which is covered by NETWORKING [GENERAL]. And it is implied that framer-provider.h and framer.h, which were also added buy the same patch, are also maintained as part of NETWORKING [GENERAL]. Make this explicit by adding these files to the corresponding section in MAINTAINERS. [1] 82c944d05b1a ("net: wan: Add framer framework support") Signed-off-by: Simon Horman Reviewed-by: Herve Codina Signed-off-by: David S. Miller commit aa82ac51d63328714645c827775d64dbfd9941f3 Author: Kuniyuki Iwashima Date: Mon Feb 19 09:46:57 2024 -0800 af_unix: Drop oob_skb ref before purging queue in GC. syzbot reported another task hung in __unix_gc(). [0] The current while loop assumes that all of the left candidates have oob_skb and calling kfree_skb(oob_skb) releases the remaining candidates. However, I missed a case that oob_skb has self-referencing fd and another fd and the latter sk is placed before the former in the candidate list. Then, the while loop never proceeds, resulting the task hung. __unix_gc() has the same loop just before purging the collected skb, so we can call kfree_skb(oob_skb) there and let __skb_queue_purge() release all inflight sockets. [0]: Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 2784 Comm: kworker/u4:8 Not tainted 6.8.0-rc4-syzkaller-01028-g71b605d32017 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Workqueue: events_unbound __unix_gc RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x70 kernel/kcov.c:200 Code: 89 fb e8 23 00 00 00 48 8b 3d 84 f5 1a 0c 48 89 de 5b e9 43 26 57 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1e fa 48 8b 04 24 65 48 8b 0d 90 52 70 7e 65 8b 15 91 52 70 RSP: 0018:ffffc9000a17fa78 EFLAGS: 00000287 RAX: ffffffff8a0a6108 RBX: ffff88802b6c2640 RCX: ffff88802c0b3b80 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000 RBP: ffffc9000a17fbf0 R08: ffffffff89383f1d R09: 1ffff1100ee5ff84 R10: dffffc0000000000 R11: ffffed100ee5ff85 R12: 1ffff110056d84ee R13: ffffc9000a17fae0 R14: 0000000000000000 R15: ffffffff8f47b840 FS: 0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffef5687ff8 CR3: 0000000029b34000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __unix_gc+0xe69/0xf40 net/unix/garbage.c:343 process_one_work kernel/workqueue.c:2633 [inline] process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706 worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787 kthread+0x2ef/0x390 kernel/kthread.c:388 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 Reported-and-tested-by: syzbot+ecab4d36f920c3574bf9@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=ecab4d36f920c3574bf9 Fixes: 25236c91b5ab ("af_unix: Fix task hung while purging oob_skb in GC.") Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit d80f8e96d47d7374794a30fbed69be43f3388afc Author: Alex Elder Date: Mon Feb 19 08:40:15 2024 -0600 net: ipa: don't overrun IPA suspend interrupt registers In newer hardware, IPA supports more than 32 endpoints. Some registers--such as IPA interrupt registers--represent endpoints as bits in a 4-byte register, and such registers are repeated as needed to represent endpoints beyond the first 32. In ipa_interrupt_suspend_clear_all(), we clear all pending IPA suspend interrupts by reading all status register(s) and writing corresponding registers to clear interrupt conditions. Unfortunately the number of registers to read/write is calculated incorrectly, and as a result we access *many* more registers than intended. This bug occurs only when the IPA hardware signals a SUSPEND interrupt, which happens when a packet is received for an endpoint (or its underlying GSI channel) that is suspended. This situation is difficult to reproduce, but possible. Fix this by correctly computing the number of interrupt registers to read and write. This is the only place in the code where registers that map endpoints or channels this way perform this calculation. Fixes: f298ba785e2d ("net: ipa: add a parameter to suspend registers") Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 56667da7399eb19af857e30f41bea89aa6fa812c Author: Eric Dumazet Date: Mon Feb 19 14:12:20 2024 +0000 net: implement lockless setsockopt(SO_PEEK_OFF) syzbot reported a lockdep violation [1] involving af_unix support of SO_PEEK_OFF. Since SO_PEEK_OFF is inherently not thread safe (it uses a per-socket sk_peek_off field), there is really no point to enforce a pointless thread safety in the kernel. After this patch : - setsockopt(SO_PEEK_OFF) no longer acquires the socket lock. - skb_consume_udp() no longer has to acquire the socket lock. - af_unix no longer needs a special version of sk_set_peek_off(), because it does not lock u->iolock anymore. As a followup, we could replace prot->set_peek_off to be a boolean and avoid an indirect call, since we always use sk_set_peek_off(). [1] WARNING: possible circular locking dependency detected 6.8.0-rc4-syzkaller-00267-g0f1dd5e91e2b #0 Not tainted syz-executor.2/30025 is trying to acquire lock: ffff8880765e7d80 (&u->iolock){+.+.}-{3:3}, at: unix_set_peek_off+0x26/0xa0 net/unix/af_unix.c:789 but task is already holding lock: ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1691 [inline] ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: sockopt_lock_sock net/core/sock.c:1060 [inline] ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: sk_setsockopt+0xe52/0x3360 net/core/sock.c:1193 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_UNIX){+.+.}-{0:0}: lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 lock_sock_nested+0x48/0x100 net/core/sock.c:3524 lock_sock include/net/sock.h:1691 [inline] __unix_dgram_recvmsg+0x1275/0x12c0 net/unix/af_unix.c:2415 sock_recvmsg_nosec+0x18e/0x1d0 net/socket.c:1046 ____sys_recvmsg+0x3c0/0x470 net/socket.c:2801 ___sys_recvmsg net/socket.c:2845 [inline] do_recvmmsg+0x474/0xae0 net/socket.c:2939 __sys_recvmmsg net/socket.c:3018 [inline] __do_sys_recvmmsg net/socket.c:3041 [inline] __se_sys_recvmmsg net/socket.c:3034 [inline] __x64_sys_recvmmsg+0x199/0x250 net/socket.c:3034 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 -> #0 (&u->iolock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18ca/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 unix_set_peek_off+0x26/0xa0 net/unix/af_unix.c:789 sk_setsockopt+0x207e/0x3360 do_sock_setsockopt+0x2fb/0x720 net/socket.c:2307 __sys_setsockopt+0x1ad/0x250 net/socket.c:2334 __do_sys_setsockopt net/socket.c:2343 [inline] __se_sys_setsockopt net/socket.c:2340 [inline] __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2340 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_UNIX); lock(&u->iolock); lock(sk_lock-AF_UNIX); lock(&u->iolock); *** DEADLOCK *** 1 lock held by syz-executor.2/30025: #0: ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1691 [inline] #0: ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: sockopt_lock_sock net/core/sock.c:1060 [inline] #0: ffff8880765e7930 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: sk_setsockopt+0xe52/0x3360 net/core/sock.c:1193 stack backtrace: CPU: 0 PID: 30025 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-00267-g0f1dd5e91e2b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x18ca/0x58e0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x136/0xd70 kernel/locking/mutex.c:752 unix_set_peek_off+0x26/0xa0 net/unix/af_unix.c:789 sk_setsockopt+0x207e/0x3360 do_sock_setsockopt+0x2fb/0x720 net/socket.c:2307 __sys_setsockopt+0x1ad/0x250 net/socket.c:2334 __do_sys_setsockopt net/socket.c:2343 [inline] __se_sys_setsockopt net/socket.c:2340 [inline] __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2340 do_syscall_64+0xf9/0x240 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f78a1c7dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f78a0fde0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f78a1dac050 RCX: 00007f78a1c7dda9 RDX: 000000000000002a RSI: 0000000000000001 RDI: 0000000000000006 RBP: 00007f78a1cca47a R08: 0000000000000004 R09: 0000000000000000 R10: 0000000020000180 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f78a1dac050 R15: 00007ffe5cd81ae8 Fixes: 859051dd165e ("bpf: Implement cgroup sockaddr hooks for unix sockets") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Cc: Daan De Meyer Cc: Kuniyuki Iwashima Cc: Martin KaFai Lau Cc: David Ahern Reviewed-by: Willem de Bruijn Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit 3b1ae9b71c2a97f848b00fb085a2bd29bddbe8d9 Author: Subbaraya Sundeep Date: Mon Feb 19 18:25:14 2024 +0530 octeontx2-af: Consider the action set by PF AF reserves MCAM entries for each PF, VF present in the system and populates the entry with DMAC and action with default RSS so that basic packet I/O works. Since PF/VF is not aware of the RSS action installed by AF, AF only fixup the actions of the rules installed by PF/VF with corresponding default RSS action. This worked well for rules installed by PF/VF for features like RX VLAN offload and DMAC filters but rules involving action like drop/forward to queue are also getting modified by AF. Hence fix it by setting the default RSS action only if requested by PF/VF. Fixes: 967db3529eca ("octeontx2-af: add support for multicast/promisc packet replication feature") Signed-off-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit c48617fbbe831d4c80fe84056033f17b70a31136 Merge: 9895ceeb5cd61 85a71ee9a0700 Author: Paolo Bonzini Date: Wed Feb 21 05:18:56 2024 -0500 Merge tag 'kvmarm-fixes-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.8, take #3 - Check for the validity of interrupts handled by a MOVALL command - Check for the validity of interrupts while reading the pending state on enabling LPIs. commit 67c3d7717efbd46092f217b1f811df1b205cce06 Author: Eniac Zhang Date: Tue Feb 20 17:58:12 2024 +0000 ALSA: hda/realtek: fix mute/micmute LED For HP mt440 The HP mt440 Thin Client uses an ALC236 codec and needs the ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make the mute and micmute LEDs work. There are two variants of the USB-C PD chip on this device. Each uses a different BIOS and board ID, hence the two entries. Signed-off-by: Eniac Zhang Signed-off-by: Alexandru Gagniuc Cc: Link: https://lore.kernel.org/r/20240220175812.782687-1-alexandru.gagniuc@hp.com Signed-off-by: Takashi Iwai commit 6650d23f3e20ca00482a71a4ef900f0ea776fb15 Author: Ashutosh Dixit Date: Mon Feb 12 19:35:48 2024 -0800 drm/xe: Fix modpost warning on xe_mocs kunit module $ make W=1 -j100 M=drivers/gpu/drm/xe MODPOST drivers/gpu/drm/xe/Module.symvers WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/xe/tests/xe_mocs_test.o Fix is identical to '1d425066f15f ("drm/xe: Fix modpost warning on kunit modules")'. Fixes: a6a4ea6d7d37 ("drm/xe: Add mocs kunit") Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi (cherry picked from commit bb619d71224ea85ec94e0a83b2bb82ebe7df2a41) Link: https://patchwork.freedesktop.org/patch/msgid/20240213033548.76219-1-ashutosh.dixit@intel.com Signed-off-by: Thomas Hellström commit 85a71ee9a0700f6c18862ef3b0011ed9dad99aca Author: Oliver Upton Date: Wed Feb 21 09:27:32 2024 +0000 KVM: arm64: vgic-its: Test for valid IRQ in MOVALL handler It is possible that an LPI mapped in a different ITS gets unmapped while handling the MOVALL command. If that is the case, there is no state that can be migrated to the destination. Silently ignore it and continue migrating other LPIs. Cc: stable@vger.kernel.org Fixes: ff9c114394aa ("KVM: arm/arm64: GICv4: Handle MOVALL applied to a vPE") Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20240221092732.4126848-3-oliver.upton@linux.dev Signed-off-by: Marc Zyngier commit 8d3a7dfb801d157ac423261d7cd62c33e95375f8 Author: Oliver Upton Date: Wed Feb 21 09:27:31 2024 +0000 KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table() vgic_get_irq() may not return a valid descriptor if there is no ITS that holds a valid translation for the specified INTID. If that is the case, it is safe to silently ignore it and continue processing the LPI pending table. Cc: stable@vger.kernel.org Fixes: 33d3bc9556a7 ("KVM: arm64: vgic-its: Read initial LPI pending table") Signed-off-by: Oliver Upton Link: https://lore.kernel.org/r/20240221092732.4126848-2-oliver.upton@linux.dev Signed-off-by: Marc Zyngier commit e2941a482a5de088b6dd75a985a76ff486383b7e Author: Ashutosh Dixit Date: Tue Feb 6 11:27:31 2024 -0800 drm/xe/xe_gt_idle: Drop redundant newline in name Newline in name is redunant and produces an unnecessary empty line during 'cat name'. Newline is added during sysfs_emit. See '27a1a1e2e47d ("drm/xe: stringify the argument to avoid potential vulnerability")'. v2: Add Fixes tag (Riana) Fixes: 7b076d14f21a ("drm/xe/mtl: Add support to get C6 residency/status of MTL") Reviewed-by: Riana Tauro Signed-off-by: Ashutosh Dixit (cherry picked from commit e5626eb80026c4b63f8682cdeca1456303c65791) Link: https://patchwork.freedesktop.org/patch/msgid/20240206192731.3533608-1-ashutosh.dixit@intel.com Signed-off-by: Thomas Hellström commit 5b672ec3f5e15062b76d280f8a4df15e763f6abe Author: Matthew Brost Date: Mon Feb 19 13:19:42 2024 -0800 drm/xe: Return 2MB page size for compact 64k PTEs Compact 64k PTEs are only intended to be used within a single VMA which covers the entire 2MB range of the compact 64k PTEs. Add XE_VMA_PTE_COMPACT VMA flag to indicate compact 64k PTEs are used and update xe_vma_max_pte_size to return at least 2MB if set. v2: Include missing changes Fixes: 8f33b4f054fc ("drm/xe: Avoid doing rebinds") Fixes: c47794bdd63d ("drm/xe: Set max pte size when skipping rebinds") Reported-by: Paulo Zanoni Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/758 Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240219211942.3633795-4-matthew.brost@intel.com (cherry picked from commit 0f688c0eb63a643ef0568b29b12cefbb23181e1a) Signed-off-by: Thomas Hellström commit 4cf8ffeb6625b7afd97b8d6698f1887071335c32 Author: Matthew Brost Date: Mon Feb 19 13:19:41 2024 -0800 drm/xe: Add XE_VMA_PTE_64K VMA flag Add XE_VMA_PTE_64K VMA flag to ensure skipping rebinds does not cross 64k page boundaries. Fixes: 8f33b4f054fc ("drm/xe: Avoid doing rebinds") Fixes: c47794bdd63d ("drm/xe: Set max pte size when skipping rebinds") Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240219211942.3633795-3-matthew.brost@intel.com (cherry picked from commit 15f0e0c2c46dddd8ee56d9b3db679fd302cc4b91) Signed-off-by: Thomas Hellström commit ecfac05f962f3aa567ae1796b2586a64fb97fe24 Author: Matthew Brost Date: Mon Feb 19 13:19:40 2024 -0800 drm/xe: Fix xe_vma_set_pte_size xe_vma_set_pte_size had a return value and did not set the 4k VMA flag. Both of these were incorrect. Fix these. Fixes: c47794bdd63d ("drm/xe: Set max pte size when skipping rebinds") Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240219211942.3633795-2-matthew.brost@intel.com (cherry picked from commit 19adaccef8b246182dc89a7470aa7758245efd5d) Signed-off-by: Thomas Hellström commit 4578f989ed6b77c14af86bb882cc5ff0a46a69eb Author: Arnd Bergmann Date: Mon Feb 19 19:16:01 2024 +0800 iommu/vt-d: Fix constant-out-of-range warning On 32-bit builds, the vt-d driver causes a warning with clang: drivers/iommu/intel/nested.c:112:13: error: result of comparison of constant 18446744073709551615 with expression of type 'unsigned long' is always false [-Werror,-Wtautological-constant-out-of-range-compare] 112 | if (npages == U64_MAX) | ~~~~~~ ^ ~~~~~~~ Make the variable a 64-bit type, which matches both the caller and the use anyway. Fixes: f6f3721244a8 ("iommu/vt-d: Add iotlb flush for nested domain") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240213095832.455245-1-arnd@kernel.org Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 1f0198fce68340e0da2d438f4ea9fc20d2c958da Author: Yi Liu Date: Mon Feb 19 19:16:00 2024 +0800 iommu/vt-d: Set SSADE when attaching to a parent with dirty tracking Should set the SSADE (Second Stage Access/Dirty bit Enable) bit of the pasid entry when attaching a device to a nested domain if its parent has already enabled dirty tracking. Fixes: 111bf85c68f6 ("iommu/vt-d: Add helper to setup pasid nested translation") Signed-off-by: Yi Liu Reviewed-by: Joao Martins Link: https://lore.kernel.org/r/20240208091414.28133-1-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit f1e1610950eac0af5e40f6ee02315952f78192f7 Author: Yi Liu Date: Mon Feb 19 19:15:59 2024 +0800 iommu/vt-d: Add missing dirty tracking set for parent domain Setting dirty tracking for a s2 domain requires to loop all the related devices and set the dirty tracking enable bit in the PASID table entry. This includes the devices that are attached to the nested domains of a s2 domain if this s2 domain is used as parent. However, the existing dirty tracking set only loops s2 domain's own devices. It will miss dirty page logs in the parent domain. Now, the parent domain tracks the nested domains, so it can loop the nested domains and the devices attached to the nested domains to ensure dirty tracking on the parent is set completely. Fixes: b41e38e22539 ("iommu/vt-d: Add nested domain allocation") Signed-off-by: Yi Sun Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240208082307.15759-9-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 0c7f2497b39da44253d7bcf2b41f52b0048859ad Author: Yi Liu Date: Mon Feb 19 19:15:58 2024 +0800 iommu/vt-d: Wrap the dirty tracking loop to be a helper Add device_set_dirty_tracking() to loop all the devices and set the dirty tracking per the @enable parameter. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Reviewed-by: Joao Martins Link: https://lore.kernel.org/r/20240208082307.15759-8-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 56ecaf6c5834ace14941d7f13dceb48bc3327111 Author: Yi Liu Date: Mon Feb 19 19:15:57 2024 +0800 iommu/vt-d: Remove domain parameter for intel_pasid_setup_dirty_tracking() The only usage of input @domain is to get the domain id (DID) to flush cache after setting dirty tracking. However, DID can be obtained from the pasid entry. So no need to pass in domain. This can make this helper cleaner when adding the missing dirty tracking for the parent domain, which needs to use the DID of nested domain. Signed-off-by: Yi Liu Reviewed-by: Joao Martins Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240208082307.15759-7-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 5e54e861f16f37c84ae68d6d4bbd3de54b668317 Author: Yi Liu Date: Mon Feb 19 19:15:56 2024 +0800 iommu/vt-d: Add missing device iotlb flush for parent domain ATS-capable devices cache the result of nested translation. This result relies on the mappings in s2 domain (a.k.a. parent). When there are modifications in the s2 domain, the related nested translation caches on the device should be flushed. This includes the devices that are attached to the s1 domain. However, the existing code ignores this fact to only loops its own devices. As there is no easy way to identify the exact set of nested translations affected by the change of s2 domain. So, this just flushes the entire device iotlb on the device. As above, driver loops the s2 domain's s1_domains list and loops the devices list of each s1_domain to flush the entire device iotlb on the devices. Fixes: b41e38e22539 ("iommu/vt-d: Add nested domain allocation") Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240208082307.15759-6-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 29e10487d6df050afeee886b7c1da208f389cb5b Author: Yi Liu Date: Mon Feb 19 19:15:55 2024 +0800 iommu/vt-d: Update iotlb in nested domain attach Should call domain_update_iotlb() to update the has_iotlb_device flag of the domain after attaching device to nested domain. Without it, this flag is not set properly and would result in missing device TLB flush. Fixes: 9838f2bb6b6b ("iommu/vt-d: Set the nested domain to a device") Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240208082307.15759-5-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 821985301124c0a5e7ca15fc69a9a531e9442d70 Author: Yi Liu Date: Mon Feb 19 19:15:54 2024 +0800 iommu/vt-d: Add missing iotlb flush for parent domain If a domain is used as the parent in nested translation its mappings might be cached using DID of the nested domain. But the existing code ignores this fact to only invalidate the iotlb entries tagged by the domain's own DID. Loop the s1_domains list, if any, to invalidate all iotlb entries related to the target s2 address range. According to VT-d spec there is no need for software to explicitly flush the affected s1 cache. It's implicitly done by HW when s2 cache is invalidated. Fixes: b41e38e22539 ("iommu/vt-d: Add nested domain allocation") Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240208082307.15759-4-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 0455d317f533e4427ddaa805563ff48711f05810 Author: Yi Liu Date: Mon Feb 19 19:15:53 2024 +0800 iommu/vt-d: Add __iommu_flush_iotlb_psi() Add __iommu_flush_iotlb_psi() to do the psi iotlb flush with a DID input rather than calculating it within the helper. This is useful when flushing cache for parent domain which reuses DIDs of its nested domains. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240208082307.15759-3-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 85ce8e1d6d73e8d54cb244d10dd4021771231746 Author: Yi Liu Date: Mon Feb 19 19:15:52 2024 +0800 iommu/vt-d: Track nested domains in parent Today the parent domain (s2_domain) is unaware of which DID's are used by and which devices are attached to nested domains (s1_domain) nested on it. This leads to a problem that some operations (flush iotlb/devtlb and enable dirty tracking) on parent domain only apply to DID's and devices directly tracked in the parent domain hence are incomplete. This tracks the nested domains in list in parent domain. With this, operations on parent domain can loop the nested domains and refer to the devices and iommu_array to ensure the operations on parent domain take effect on all the affected devices and iommus. Signed-off-by: Yi Liu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240208082307.15759-2-yi.l.liu@intel.com Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 77aebae1ea12de6eae5ce70d05b3d4724eec4023 Author: Thomas Hellström Date: Fri Feb 9 12:34:44 2024 +0100 drm/xe/uapi: Remove support for persistent exec_queues Persistent exec_queues delays explicit destruction of exec_queues until they are done executing, but destruction on process exit is still immediate. It turns out no UMD is relying on this functionality, so remove it. If there turns out to be a use-case in the future, let's re-add. Persistent exec_queues were never used for LR VMs v2: - Don't add an "UNUSED" define for the missing property (Lucas, Rodrigo) v3: - Remove the remaining struct xe_exec_queue::persistent state (Niranjana, Lucas) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Rodrigo Vivi Cc: Matthew Brost Cc: David Airlie Cc: Daniel Vetter Cc: Lucas De Marchi Cc: Francois Dugast Signed-off-by: Thomas Hellström Reviewed-by: Lucas De Marchi Acked-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20240209113444.8396-1-thomas.hellstrom@linux.intel.com (cherry picked from commit f1a9abc0cf311375695bede1590364864c05976d) Signed-off-by: Thomas Hellström commit 4df49712eb54141be00a9312547436d55677f092 Author: Takashi Iwai Date: Wed Feb 21 10:21:56 2024 +0100 ALSA: Drop leftover snd-rtctimer stuff from Makefile We forgot to remove the line for snd-rtctimer from Makefile while dropping the functionality. Get rid of the stale line. Fixes: 34ce71a96dcb ("ALSA: timer: remove legacy rtctimer") Link: https://lore.kernel.org/r/20240221092156.28695-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit fb1e881273f432e593f8789f99e725b09304cc97 Author: Maxime Ripard Date: Tue Feb 20 14:12:51 2024 +0100 drm/i915/tv: Fix TV mode Commit 1fd4a5a36f9f ("drm/connector: Rename legacy TV property") failed to update all the users of the struct drm_tv_connector_state mode field, which resulted in a build failure in i915. However, a subsequent commit in the same series reintroduced a mode field in that structure, with a different semantic but the same type, with the assumption that all previous users were updated. Since that didn't happen, the i915 driver now compiles, but mixes accesses to the legacy_mode field and the newer mode field, but with the previous semantics. This obviously doesn't work very well, so we need to update the accesses that weren't in the legacy renaming commit. Fixes: 1fd4a5a36f9f ("drm/connector: Rename legacy TV property") Reported-by: Ville Syrjälä Signed-off-by: Maxime Ripard Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240220131251.453060-1-mripard@kernel.org (cherry picked from commit bf7626f19d6ff14b9722273e23700400cc4d78ba) Signed-off-by: Joonas Lahtinen commit 5c6224bfabbf7f3e491c51ab50fd2c6f92ba1141 Author: Dan Williams Date: Fri Feb 16 19:11:34 2024 -0800 cxl/acpi: Fix load failures due to single window creation failure The expectation is that cxl_parse_cfwms() continues in the face the of failure as evidenced by code like: cxlrd = cxl_root_decoder_alloc(root_port, ways, cxl_calc_hb); if (IS_ERR(cxlrd)) return 0; There are other error paths in that function which mistakenly follow idiomatic expectations and return an error when they should not. Most of those mistakes are innocuous checks that hardly ever fail in practice. However, a recent change succeed in making the implementation more fragile by applying an idiomatic, but still wrong "fix" [1]. In this failure case the kernel reports: cxl root0: Failed to populate active decoder targets cxl_acpi ACPI0017:00: Failed to add decode range: [mem 0x00000000-0x7fffffff flags 0x200] ...which is a real issue with that one window (to be fixed separately), but ends up failing the entirety of cxl_acpi_probe(). Undo that recent breakage while also removing the confusion about ignoring errors. Update all exits paths to return an error per typical expectations and let an outer wrapper function handle dropping the error. Fixes: 91019b5bc7c2 ("cxl/acpi: Return 'rc' instead of '0' in cxl_parse_cfmws()") [1] Cc: Cc: Breno Leitao Cc: Alison Schofield Cc: Vishal Verma Signed-off-by: Dan Williams commit 40de53fd002c6ba087a623722915e8006ed68a02 Merge: 0cab687205986 f3e6b3ae9cfc1 Author: Dan Williams Date: Tue Feb 20 22:57:35 2024 -0800 Merge branch 'for-6.8/cxl-cper' into for-6.8/cxl Pick up CXL CPER notification removal for v6.8-rc6, to return in a later merge window. commit f3e6b3ae9cfc128af11b665c6ef4022ba2683778 Author: Dan Williams Date: Sun Feb 18 14:28:57 2024 -0800 acpi/ghes: Remove CXL CPER notifications Initial tests with the CXL CPER implementation identified that error reports were being duplicated in the log and the trace event [1]. Then it was discovered that the notification handler took sleeping locks while the GHES event handling runs in spin_lock_irqsave() context [2] While the duplicate reporting was fixed in v6.8-rc4, the fix for the sleeping-lock-vs-atomic collision would enjoy more time to settle and gain some test cycles. Given how late it is in the development cycle, remove the CXL hookup for now and try again during the next merge window. Note that end result is that v6.8 does not emit CXL CPER payloads to the kernel log, but this is in line with the CXL trend to move error reporting to trace events instead of the kernel log. Cc: Ard Biesheuvel Cc: Rafael J. Wysocki Cc: Jonathan Cameron Reviewed-by: Ira Weiny Link: http://lore.kernel.org/r/20240108165855.00002f5a@Huawei.com [1] Closes: http://lore.kernel.org/r/b963c490-2c13-4b79-bbe7-34c6568423c7@moroto.mountain [2] Signed-off-by: Dan Williams commit 9fc1ccccfd8d53dc7936fe6d633f2373fc9f62e8 Merge: fca7526b7d891 eb5c7465c3240 Author: Linus Torvalds Date: Tue Feb 20 17:00:26 2024 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Mostly irdma and bnxt_re fixes: - Missing error unwind in hf1 - For bnxt - fix fenching behavior to work on new chips, fail unsupported SRQ resize back to userspace, propogate SRQ FW failure back to userspace. - Correctly fail unsupported SRQ resize back to userspace in bnxt - Adjust a memcpy in mlx5 to not overflow a struct field. - Prevent userspace from triggering mlx5 fw syndrome logging from sysfs - Use the correct access mode for MLX5_IB_METHOD_DEVX_OBJ_MODIFY to avoid a userspace failure on modify - For irdma - Don't UAF a concurrent tasklet during destroy, prevent userspace from issuing invalid QP attrs, fix a possible CQ overflow, capture a missing HW async error event - sendmsg() triggerable memory access crash in hfi1 - Fix the srpt_service_guid parameter to not crash due to missing function pointer - Don't leak objects in error unwind in qedr - Don't weirdly cast function pointers in srpt" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/srpt: fix function pointer cast warnings RDMA/qedr: Fix qedr_create_user_qp error flow RDMA/srpt: Support specifying the srpt_service_guid parameter IB/hfi1: Fix sdma.h tx->num_descs off-by-one error RDMA/irdma: Add AE for too many RNRS RDMA/irdma: Set the CQ read threshold for GEN 1 RDMA/irdma: Validate max_send_wr and max_recv_wr RDMA/irdma: Fix KASAN issue with tasklet RDMA/mlx5: Relax DEVX access upon modify commands IB/mlx5: Don't expose debugfs entries for RRoCE general parameters if not supported RDMA/mlx5: Fix fortify source warning while accessing Eth segment RDMA/bnxt_re: Add a missing check in bnxt_qplib_query_srq RDMA/bnxt_re: Return error for SRQ resize RDMA/bnxt_re: Fix unconditional fence for newer adapters RDMA/bnxt_re: Remove a redundant check inside bnxt_re_vf_res_config RDMA/bnxt_re: Avoid creating fence MR for newer adapters IB/hfi1: Fix a memleak in init_credit_return commit 2597c9947b0174fcc71bdd7ab6cb49c2b4291e95 Author: Benjamin Gray Date: Tue Feb 13 14:39:58 2024 +1100 kasan: guard release_free_meta() shadow access with kasan_arch_is_ready() release_free_meta() accesses the shadow directly through the path kasan_slab_free __kasan_slab_free kasan_release_object_meta release_free_meta kasan_mem_to_shadow There are no kasan_arch_is_ready() guards here, allowing an oops when the shadow is not initialized. The oops can be seen on a Power8 KVM guest. This patch adds the guard to release_free_meta(), as it's the first level that specifically requires the shadow. It is safe to put the guard at the start of this function, before the stack put: only kasan_save_free_info() can initialize the saved stack, which itself is guarded with kasan_arch_is_ready() by its caller poison_slab_object(). If the arch becomes ready before release_free_meta() then we will not observe KASAN_SLAB_FREE_META in the object's shadow, so we will not put an uninitialized stack either. Link: https://lkml.kernel.org/r/20240213033958.139383-1-bgray@linux.ibm.com Fixes: 63b85ac56a64 ("kasan: stop leaking stack trace handles") Signed-off-by: Benjamin Gray Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Michael Ellerman Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 13d0599ab3b2ff17f798353f24bcbef1659d3cfc Author: SeongJae Park Date: Fri Feb 16 11:40:25 2024 -0800 mm/damon/lru_sort: fix quota status loss due to online tunings For online parameters change, DAMON_LRU_SORT creates new schemes based on latest values of the parameters and replaces the old schemes with the new one. When creating it, the internal status of the quotas of the old schemes is not preserved. As a result, charging of the quota starts from zero after the online tuning. The data that collected to estimate the throughput of the scheme's action is also reset, and therefore the estimation should start from the scratch again. Because the throughput estimation is being used to convert the time quota to the effective size quota, this could result in temporal time quota inaccuracy. It would be recovered over time, though. In short, the quota accuracy could be temporarily degraded after online parameters update. Fix the problem by checking the case and copying the internal fields for the status. Link: https://lkml.kernel.org/r/20240216194025.9207-3-sj@kernel.org Fixes: 40e983cca927 ("mm/damon: introduce DAMON-based LRU-lists Sorting") Signed-off-by: SeongJae Park Cc: [6.0+] Signed-off-by: Andrew Morton commit 1b0ca4e4ff10a2c8402e2cf70132c683e1c772e4 Author: SeongJae Park Date: Fri Feb 16 11:40:24 2024 -0800 mm/damon/reclaim: fix quota stauts loss due to online tunings Patch series "mm/damon: fix quota status loss due to online tunings". DAMON_RECLAIM and DAMON_LRU_SORT is not preserving internal quota status when applying new user parameters, and hence could cause temporal quota accuracy degradation. Fix it by preserving the status. This patch (of 2): For online parameters change, DAMON_RECLAIM creates new scheme based on latest values of the parameters and replaces the old scheme with the new one. When creating it, the internal status of the quota of the old scheme is not preserved. As a result, charging of the quota starts from zero after the online tuning. The data that collected to estimate the throughput of the scheme's action is also reset, and therefore the estimation should start from the scratch again. Because the throughput estimation is being used to convert the time quota to the effective size quota, this could result in temporal time quota inaccuracy. It would be recovered over time, though. In short, the quota accuracy could be temporarily degraded after online parameters update. Fix the problem by checking the case and copying the internal fields for the status. Link: https://lkml.kernel.org/r/20240216194025.9207-1-sj@kernel.org Link: https://lkml.kernel.org/r/20240216194025.9207-2-sj@kernel.org Fixes: e035c280f6df ("mm/damon/reclaim: support online inputs update") Signed-off-by: SeongJae Park Cc: [5.19+] Signed-off-by: Andrew Morton commit 379c5aaa14351aa9faf1f569fe9e3c4f4b02f6a0 Author: Shakeel Butt Date: Mon Feb 19 12:50:50 2024 -0800 MAINTAINERS: mailmap: update Shakeel's email address Moving to linux.dev based email for kernel work. Link: https://lkml.kernel.org/r/20240219205050.887810-1-shakeel.butt@linux.dev Signed-off-by: Shakeel Butt Signed-off-by: Andrew Morton commit 0721a614ef798053a4a54c74e2501b8d15b0eff3 Author: SeongJae Park Date: Mon Feb 12 18:36:32 2024 -0800 mm/damon/sysfs-schemes: handle schemes sysfs dir removal before commit_schemes_quota_goals 'commit_schemes_quota_goals' command handler, damos_sysfs_set_quota_scores() assumes the number of schemes sysfs directory will be same to the number of schemes of the DAMON context. The assumption is wrong since users can remove schemes sysfs directories while DAMON is running. In the case, illegal memory accesses can happen. Fix it by checking the case. Link: https://lkml.kernel.org/r/20240213023633.124928-1-sj@kernel.org Fixes: d91beaa505a0 ("mm/damon/sysfs-schemes: implement a command for scheme quota goals only commit") Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton commit 118642d7f606fc9b9c92ee611275420320290ffb Author: Johannes Weiner Date: Tue Feb 13 03:16:34 2024 -0500 mm: memcontrol: clarify swapaccount=0 deprecation warning The swapaccount deprecation warning is throwing false positives. Since we deprecated the knob and defaulted to enabling, the only reports we've been getting are from folks that set swapaccount=1. While this is a nice affirmation that always-enabling was the right choice, we certainly don't want to warn when users request the supported mode. Only warn when disabling is requested, and clarify the warning. [colin.i.king@gmail.com: spelling: "commdandline" -> "commandline"] Link: https://lkml.kernel.org/r/20240215090544.1649201-1-colin.i.king@gmail.com Link: https://lkml.kernel.org/r/20240213081634.3652326-1-hannes@cmpxchg.org Fixes: b25806dcd3d5 ("mm: memcontrol: deprecate swapaccounting=0 mode") Signed-off-by: Colin Ian King Reported-by: "Jonas Schäfer" Reported-by: Narcis Garcia Suggested-by: Yosry Ahmed Signed-off-by: Johannes Weiner Reviewed-by: Yosry Ahmed Acked-by: Michal Hocko Acked-by: Shakeel Butt Cc: Roman Gushchin Cc: Signed-off-by: Andrew Morton commit 4f155af0ae4464134bfcfd9f043b6b727c84e947 Author: Anshuman Khandual Date: Fri Feb 9 08:39:12 2024 +0530 mm/memblock: add MEMBLOCK_RSRV_NOINIT into flagname[] array The commit 77e6c43e137c ("memblock: introduce MEMBLOCK_RSRV_NOINIT flag") skipped adding this newly introduced memblock flag into flagname[] array, thus preventing a correct memblock flags output for applicable memblock regions. Link: https://lkml.kernel.org/r/20240209030912.1382251-1-anshuman.khandual@arm.com Fixes: 77e6c43e137c ("memblock: introduce MEMBLOCK_RSRV_NOINIT flag") Signed-off-by: Anshuman Khandual Reviewed-by: Mike Rapoport Cc: Signed-off-by: Andrew Morton commit 678e54d4bb9a4822f8ae99690ac131c5d490cdb1 Author: Chengming Zhou Date: Thu Feb 8 02:32:54 2024 +0000 mm/zswap: invalidate duplicate entry when !zswap_enabled We have to invalidate any duplicate entry even when !zswap_enabled since zswap can be disabled anytime. If the folio store success before, then got dirtied again but zswap disabled, we won't invalidate the old duplicate entry in the zswap_store(). So later lru writeback may overwrite the new data in swapfile. Link: https://lkml.kernel.org/r/20240208023254.3873823-1-chengming.zhou@linux.dev Fixes: 42c06a0e8ebe ("mm: kill frontswap") Signed-off-by: Chengming Zhou Acked-by: Johannes Weiner Cc: Nhat Pham Cc: Yosry Ahmed Cc: Signed-off-by: Andrew Morton commit 1eb1e984379e2da04361763f66eec90dd75cf63e Author: Guenter Roeck Date: Thu Feb 8 07:30:10 2024 -0800 lib/Kconfig.debug: TEST_IOV_ITER depends on MMU Trying to run the iov_iter unit test on a nommu system such as the qemu kc705-nommu emulation results in a crash. KTAP version 1 # Subtest: iov_iter # module: kunit_iov_iter 1..9 BUG: failure at mm/nommu.c:318/vmap()! Kernel panic - not syncing: BUG! The test calls vmap() directly, but vmap() is not supported on nommu systems, causing the crash. TEST_IOV_ITER therefore needs to depend on MMU. Link: https://lkml.kernel.org/r/20240208153010.1439753-1-linux@roeck-us.net Fixes: 2d71340ff1d4 ("iov_iter: Kunit tests for copying to/from an iterator") Signed-off-by: Guenter Roeck Cc: David Howells Cc: Signed-off-by: Andrew Morton commit 13ddaf26be324a7f951891ecd9ccd04466d27458 Author: Kairui Song Date: Wed Feb 7 02:25:59 2024 +0800 mm/swap: fix race when skipping swapcache When skipping swapcache for SWP_SYNCHRONOUS_IO, if two or more threads swapin the same entry at the same time, they get different pages (A, B). Before one thread (T0) finishes the swapin and installs page (A) to the PTE, another thread (T1) could finish swapin of page (B), swap_free the entry, then swap out the possibly modified page reusing the same entry. It breaks the pte_same check in (T0) because PTE value is unchanged, causing ABA problem. Thread (T0) will install a stalled page (A) into the PTE and cause data corruption. One possible callstack is like this: CPU0 CPU1 ---- ---- do_swap_page() do_swap_page() with same entry swap_read_folio() <- read to page A swap_read_folio() <- read to page B ... set_pte_at() swap_free() <- entry is free pte_same() <- Check pass, PTE seems unchanged, but page A is stalled! swap_free() <- page B content lost! set_pte_at() <- staled page A installed! And besides, for ZRAM, swap_free() allows the swap device to discard the entry content, so even if page (B) is not modified, if swap_read_folio() on CPU0 happens later than swap_free() on CPU1, it may also cause data loss. To fix this, reuse swapcache_prepare which will pin the swap entry using the cache flag, and allow only one thread to swap it in, also prevent any parallel code from putting the entry in the cache. Release the pin after PT unlocked. Racers just loop and wait since it's a rare and very short event. A schedule_timeout_uninterruptible(1) call is added to avoid repeated page faults wasting too much CPU, causing livelock or adding too much noise to perf statistics. A similar livelock issue was described in commit 029c4628b2eb ("mm: swap: get rid of livelock in swapin readahead") Reproducer: This race issue can be triggered easily using a well constructed reproducer and patched brd (with a delay in read path) [1]: With latest 6.8 mainline, race caused data loss can be observed easily: $ gcc -g -lpthread test-thread-swap-race.c && ./a.out Polulating 32MB of memory region... Keep swapping out... Starting round 0... Spawning 65536 workers... 32746 workers spawned, wait for done... Round 0: Error on 0x5aa00, expected 32746, got 32743, 3 data loss! Round 0: Error on 0x395200, expected 32746, got 32743, 3 data loss! Round 0: Error on 0x3fd000, expected 32746, got 32737, 9 data loss! Round 0 Failed, 15 data loss! This reproducer spawns multiple threads sharing the same memory region using a small swap device. Every two threads updates mapped pages one by one in opposite direction trying to create a race, with one dedicated thread keep swapping out the data out using madvise. The reproducer created a reproduce rate of about once every 5 minutes, so the race should be totally possible in production. After this patch, I ran the reproducer for over a few hundred rounds and no data loss observed. Performance overhead is minimal, microbenchmark swapin 10G from 32G zram: Before: 10934698 us After: 11157121 us Cached: 13155355 us (Dropping SWP_SYNCHRONOUS_IO flag) [kasong@tencent.com: v4] Link: https://lkml.kernel.org/r/20240219082040.7495-1-ryncsn@gmail.com Link: https://lkml.kernel.org/r/20240206182559.32264-1-ryncsn@gmail.com Fixes: 0bcac06f27d7 ("mm, swap: skip swapcache for swapin of synchronous device") Reported-by: "Huang, Ying" Closes: https://lore.kernel.org/lkml/87bk92gqpx.fsf_-_@yhuang6-desk2.ccr.corp.intel.com/ Link: https://github.com/ryncsn/emm-test-project/tree/master/swap-stress-race [1] Signed-off-by: Kairui Song Reviewed-by: "Huang, Ying" Acked-by: Yu Zhao Acked-by: David Hildenbrand Acked-by: Chris Li Cc: Hugh Dickins Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Minchan Kim Cc: Yosry Ahmed Cc: Yu Zhao Cc: Barry Song <21cnbao@gmail.com> Cc: SeongJae Park Cc: Signed-off-by: Andrew Morton commit 16e96ba5e92ce06b54f0862d44bb27bfa00d6c23 Author: Nhat Pham Date: Mon Feb 5 15:24:42 2024 -0800 mm/swap_state: update zswap LRU's protection range with the folio locked When a folio is swapped in, the protection size of the corresponding zswap LRU is incremented, so that the zswap shrinker is more conservative with its reclaiming action. This field is embedded within the struct lruvec, so updating it requires looking up the folio's memcg and lruvec. However, currently this lookup can happen after the folio is unlocked, for instance if a new folio is allocated, and swap_read_folio() unlocks the folio before returning. In this scenario, there is no stability guarantee for the binding between a folio and its memcg and lruvec: * A folio's memcg and lruvec can be freed between the lookup and the update, leading to a UAF. * Folio migration can clear the now-unlocked folio's memcg_data, which directs the zswap LRU protection size update towards the root memcg instead of the original memcg. This was recently picked up by the syzbot thanks to a warning in the inlined folio_lruvec() call. Move the zswap LRU protection range update above the swap_read_folio() call, and only when a new page is allocated, to prevent this. [nphamcs@gmail.com: add VM_WARN_ON_ONCE() to zswap_folio_swapin()] Link: https://lkml.kernel.org/r/20240206180855.3987204-1-nphamcs@gmail.com [nphamcs@gmail.com: remove unneeded if (folio) checks] Link: https://lkml.kernel.org/r/20240206191355.83755-1-nphamcs@gmail.com Link: https://lkml.kernel.org/r/20240205232442.3240571-1-nphamcs@gmail.com Fixes: b5ba474f3f51 ("zswap: shrink zswap pool based on memory pressure") Reported-by: syzbot+17a611d10af7d18a7092@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000ae47f90610803260@google.com/ Signed-off-by: Nhat Pham Reviewed-by: Chengming Zhou Acked-by: Johannes Weiner Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 7efa6f2c803366f84c3c362f01e822490669d72b Author: Terry Tritton Date: Mon Feb 5 14:50:56 2024 +0000 selftests/mm: uffd-unit-test check if huge page size is 0 If HUGETLBFS is not enabled then the default_huge_page_size function will return 0 and cause a divide by 0 error. Add a check to see if the huge page size is 0 and skip the hugetlb tests if it is. Link: https://lkml.kernel.org/r/20240205145055.3545806-2-terry.tritton@linaro.org Fixes: 16a45b57cbf2 ("selftests/mm: add framework for uffd-unit-test") Signed-off-by: Terry Tritton Cc: Peter Griffin Cc: Shuah Khan Cc: Peter Xu Cc: Signed-off-by: Andrew Morton commit e9e3db69966d5e9e6f7e7d017b407c0025180fe5 Author: SeongJae Park Date: Mon Feb 5 12:13:06 2024 -0800 mm/damon/core: check apply interval in damon_do_apply_schemes() kdamond_apply_schemes() checks apply intervals of schemes and avoid further applying any schemes if no scheme passed its apply interval. However, the following schemes applying function, damon_do_apply_schemes() iterates all schemes without the apply interval check. As a result, the shortest apply interval is applied to all schemes. Fix the problem by checking the apply interval in damon_do_apply_schemes(). Link: https://lkml.kernel.org/r/20240205201306.88562-1-sj@kernel.org Fixes: 42f994b71404 ("mm/damon/core: implement scheme-specific apply interval") Signed-off-by: SeongJae Park Cc: [6.7.x] Signed-off-by: Andrew Morton commit e3b63e966cac0bf78aaa1efede1827a252815a1d Author: Yosry Ahmed Date: Thu Jan 25 08:51:27 2024 +0000 mm: zswap: fix missing folio cleanup in writeback race path In zswap_writeback_entry(), after we get a folio from __read_swap_cache_async(), we grab the tree lock again to check that the swap entry was not invalidated and recycled. If it was, we delete the folio we just added to the swap cache and exit. However, __read_swap_cache_async() returns the folio locked when it is newly allocated, which is always true for this path, and the folio is ref'd. Make sure to unlock and put the folio before returning. This was discovered by code inspection, probably because this path handles a race condition that should not happen often, and the bug would not crash the system, it will only strand the folio indefinitely. Link: https://lkml.kernel.org/r/20240125085127.1327013-1-yosryahmed@google.com Fixes: 04fc7816089c ("mm: fix zswap writeback race condition") Signed-off-by: Yosry Ahmed Reviewed-by: Chengming Zhou Acked-by: Johannes Weiner Reviewed-by: Nhat Pham Cc: Domenico Cerasuolo Cc: Signed-off-by: Andrew Morton commit 0df8669f69a8638f04c6a3d1f3b7056c2c18f62c Author: Jonathan Corbet Date: Mon Feb 19 09:05:38 2024 -0700 docs: Instruct LaTeX to cope with deeper nesting The addition of the XFS online fsck documentation starting with commit a8f6c2e54ddc ("xfs: document the motivation for online fsck design") added a deeper level of nesting than LaTeX is prepared to deal with. That caused a pdfdocs build failure with the helpful "Too deeply nested" error message buried deeply in Documentation/output/filesystems.log. Increase the "maxlistdepth" parameter to instruct LaTeX that it needs to deal with the deeper nesting whether it wants to or not. Suggested-by: Akira Yokosawa Tested-by: Akira Yokosawa Cc: stable@vger.kernel.org # v6.4+ Link: https://lore.kernel.org/linux-doc/67f6ac60-7957-4b92-9d72-a08fbad0e028@gmail.com/ Signed-off-by: Jonathan Corbet commit 080b0c8d6d261b400f24bb1075fbab8c6daaf69e Author: Amritha Nambiar Date: Tue Feb 13 11:48:50 2024 -0800 ice: Fix ASSERT_RTNL() warning during certain scenarios Commit 91fdbce7e8d6 ("ice: Add support in the driver for associating queue with napi") invoked the netif_queue_set_napi() call. This kernel function requires to be called with rtnl_lock taken, otherwise ASSERT_RTNL() warning will be triggered. ice_vsi_rebuild() initiating this call is under rtnl_lock when the rebuild is in response to configuration changes from external interfaces (such as tc, ethtool etc. which holds the lock). But, the VSI rebuild generated from service tasks and resets (PFR/CORER/GLOBR) is not under rtnl lock protection. Handle these cases as well to hold lock before the kernel call (by setting the 'locked' boolean to false). netif_queue_set_napi() is also used to clear previously set napi in the q_vector unroll flow. Handle this for locked/lockless execution paths. Fixes: 91fdbce7e8d6 ("ice: Add support in the driver for associating queue with napi") Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 704dccec0d490f2ad06f3f16ebed254d81906c3a Author: Rob Herring Date: Tue Feb 13 13:34:29 2024 -0600 arm64: dts: qcom: Fix interrupt-map cell sizes The PCI node interrupt-map properties have the wrong size as #address-cells in the interrupt parent are not accounted for. The dtc interrupt_map check catches this, but the warning is off because its dependency, interrupt_provider, is off by default. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20240213-arm-dt-cleanups-v1-5-f2dee1292525@kernel.org Signed-off-by: Arnd Bergmann commit f02b0f0dc26fbb77fe47b6e47cc5c211f0432c37 Author: Rob Herring Date: Tue Feb 13 13:34:28 2024 -0600 arm: dts: Fix dtc interrupt_map warnings The dtc interrupt_map warning is off because its dependency, interrupt_provider, is off by default. Fix all the warnings so it can be enabled. Signed-off-by: Rob Herring Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20240213-arm-dt-cleanups-v1-4-f2dee1292525@kernel.org Signed-off-by: Arnd Bergmann commit 91adecf911e5df78ea3e8f866e69db2c33416a5c Author: Rob Herring Date: Tue Feb 13 13:34:27 2024 -0600 arm64: dts: Fix dtc interrupt_provider warnings The dtc interrupt_provider warning is off by default. Fix all the warnings so it can be enabled. Signed-off-by: Rob Herring Reviewed-By: AngeloGioacchino Del Regno # Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Acked-by: Florian Fainelli #Broadcom Acked-by: Chanho Min Link: https://lore.kernel.org/r/20240213-arm-dt-cleanups-v1-3-f2dee1292525@kernel.org Signed-off-by: Arnd Bergmann commit 96fd598e9c34cfa68402a4da3020c9236cfacf35 Author: Rob Herring Date: Tue Feb 13 13:34:26 2024 -0600 arm: dts: Fix dtc interrupt_provider warnings The dtc interrupt_provider warning is off by default. Fix all the warnings so it can be enabled. Signed-off-by: Rob Herring Reviewed-by: Andrew Jeffery Reviewed-by: Alexandre Torgue Acked-by: Florian Fainelli #Broadcom Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20240213-arm-dt-cleanups-v1-2-f2dee1292525@kernel.org Signed-off-by: Arnd Bergmann commit e08f65491c0e467127310b13333dd61e89c14bc1 Author: Rob Herring Date: Tue Feb 13 13:34:25 2024 -0600 arm64: dts: freescale: Disable interrupt_map check Several Freescale Layerscape platforms extirq binding use a malformed interrupt-map property missing parent address cells. These are documented in of_irq_imap_abusers list in drivers/of/irq.c. In order to enable dtc interrupt_map check tree wide, we need to disable it for these platforms which will not be fixed (as that would break compatibility). Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20240213-arm-dt-cleanups-v1-1-f2dee1292525@kernel.org Signed-off-by: Arnd Bergmann commit 0cf54e404d4f80470e81c42ca614264579c34acc Merge: d0a59944e34f9 c22d03a95b0d8 Author: Arnd Bergmann Date: Tue Feb 20 21:32:49 2024 +0100 Merge tag 'v6.8-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes Some fixes to make devicetrees conform to bindings better (pwm irqs), dt styling fixes (unneeded jaguar status, whitespaces, Cool Pi regulator naming) and functionality fixes (px30 spi chipselect number, allowing rk3588-evb1 to turn off, pcie lane numbers on CoolPi, wrong gpio-names on Indidroid Nova and some CoolPi sdmmc aliases to match what uboot uses). * tag 'v6.8-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Correct Indiedroid Nova GPIO Names arm64: dts: rockchip: Drop interrupts property from rk3328 pwm-rockchip node arm64: dts: rockchip: set num-cs property for spi on px30 arm64: dts: rockchip: minor rk3588 whitespace cleanup arm64: dts: rockchip: drop unneeded status from rk3588-jaguar gpio-leds ARM: dts: rockchip: Drop interrupts property from pwm-rockchip nodes arm64: dts: rockchip: Fix the num-lanes of pcie3x4 on Cool Pi CM5 EVB arm64: dts: rockchip: rename vcc5v0_usb30_host regulator for Cool Pi CM5 EVB arm64: dts: rockchip: aliase sdmmc as mmc1 for Cool Pi CM5 EVB arm64: dts: rockchip: aliase sdmmc as mmc1 for Cool Pi 4B arm64: dts: rockchip: mark system power controller on rk3588-evb1 Link: https://lore.kernel.org/r/2450634.jE0xQCEvom@phil Signed-off-by: Arnd Bergmann commit fca7526b7d8910c6125cb1ebc3e78ccd5f50ec52 Author: Linus Torvalds Date: Tue Feb 20 12:16:47 2024 -0800 drm/tests/drm_buddy: fix build failure on 32-bit targets Guenter Roeck reports that commit a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test") causes build failures on 32-bit targets: "This patch breaks the build on all 32-bit systems since it introduces an unhandled direct 64-bit divide operation. ERROR: modpost: "__umoddi3" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined! ERROR: modpost: "__moddi3" [drivers/gpu/drm/tests/drm_buddy_test.ko] undefined!" and the uses of 'u64' are all entirely pointless. Yes, the arguments to drm_buddy_init() and drm_buddy_alloc_blocks() are in fact of type 'u64', but none of the values here are remotely relevant, and the compiler will happily just do the type expansion. Of course, in a perfect world the compiler would also have just noticed that all the values in question are tiny, and range analysis would have shown that doing a 64-bit divide is pointless, but that is admittedly expecting a fair amount of the compiler. IOW, we shouldn't write code that the compiler then has to notice is unnecessarily complicated just to avoid extra work. We do have fairly high expectations of compilers, but kernel code should be reasonable to begin with. It turns out that there are also other issues with this code: the KUnit assertion messages have incorrect types in the format strings, but that's a widely spread issue caused by the KUnit infrastructure not having enabled format string verification. We'll get that sorted out separately. Reported-by: Guenter Roeck Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test") Link: https://lore.kernel.org/all/538327ff-8d34-41d5-a9ae-1a334744f5ae@roeck-us.net/ Cc: Matthew Auld Cc: Arunpravin Paneer Selvam Cc: Christian König Signed-off-by: Linus Torvalds commit 0e0c50e85a364bb7f1c52c84affe7f9e88c57da7 Author: Mike Snitzer Date: Tue Feb 20 13:32:52 2024 -0500 dm-crypt, dm-integrity, dm-verity: bump target version Signed-off-by: Mike Snitzer commit 787f1b2800464aa277236a66eb3c279535edd460 Author: Mikulas Patocka Date: Tue Feb 20 19:11:51 2024 +0100 dm-verity, dm-crypt: align "struct bvec_iter" correctly "struct bvec_iter" is defined with the __packed attribute, so it is aligned on a single byte. On X86 (and on other architectures that support unaligned addresses in hardware), "struct bvec_iter" is accessed using the 8-byte and 4-byte memory instructions, however these instructions are less efficient if they operate on unaligned addresses. (on RISC machines that don't have unaligned access in hardware, GCC generates byte-by-byte accesses that are very inefficient - see [1]) This commit reorders the entries in "struct dm_verity_io" and "struct convert_context", so that "struct bvec_iter" is aligned on 8 bytes. [1] https://lore.kernel.org/all/ZcLuWUNRZadJr0tQ@fedora/T/ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 42e15d12070b4ff9af2b980f1b65774c2dab0507 Author: Mikulas Patocka Date: Mon Feb 19 21:31:11 2024 +0100 dm-crypt: recheck the integrity tag after a failure If a userspace process reads (with O_DIRECT) multiple blocks into the same buffer, dm-crypt reports an authentication error [1]. The error is reported in a log and it may cause RAID leg being kicked out of the array. This commit fixes dm-crypt, so that if integrity verification fails, the data is read again into a kernel buffer (where userspace can't modify it) and the integrity tag is rechecked. If the recheck succeeds, the content of the kernel buffer is copied into the user buffer; if the recheck fails, an integrity error is reported. [1] https://people.redhat.com/~mpatocka/testcases/blk-auth-modify/read2.c Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 50c70240097ce41fe6bce6478b80478281e4d0f7 Author: Mikulas Patocka Date: Mon Feb 19 21:30:10 2024 +0100 dm-crypt: don't modify the data when using authenticated encryption It was said that authenticated encryption could produce invalid tag when the data that is being encrypted is modified [1]. So, fix this problem by copying the data into the clone bio first and then encrypt them inside the clone bio. This may reduce performance, but it is needed to prevent the user from corrupting the device by writing data with O_DIRECT and modifying them at the same time. [1] https://lore.kernel.org/all/20240207004723.GA35324@sol.localdomain/T/ Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 9177f3c0dea6143d05cac1bbd28668fd0e216d11 Author: Mikulas Patocka Date: Mon Feb 19 21:28:09 2024 +0100 dm-verity: recheck the hash after a failure If a userspace process reads (with O_DIRECT) multiple blocks into the same buffer, dm-verity reports an error [1]. This commit fixes dm-verity, so that if hash verification fails, the data is read again into a kernel buffer (where userspace can't modify it) and the hash is rechecked. If the recheck succeeds, the content of the kernel buffer is copied into the user buffer; if the recheck fails, an error is reported. [1] https://people.redhat.com/~mpatocka/testcases/blk-auth-modify/read2.c Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit c88f5e553fe38b2ffc4c33d08654e5281b297677 Author: Mikulas Patocka Date: Mon Feb 19 21:27:39 2024 +0100 dm-integrity: recheck the integrity tag after a failure If a userspace process reads (with O_DIRECT) multiple blocks into the same buffer, dm-integrity reports an error [1]. The error is reported in a log and it may cause RAID leg being kicked out of the array. This commit fixes dm-integrity, so that if integrity verification fails, the data is read again into a kernel buffer (where userspace can't modify it) and the integrity tag is rechecked. If the recheck succeeds, the content of the kernel buffer is copied into the user buffer; if the recheck fails, an integrity error is reported. [1] https://people.redhat.com/~mpatocka/testcases/blk-auth-modify/read2.c Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit ee89921da471edcb4b1e67f5bbfedddf39749782 Author: Arkadiusz Kubalewski Date: Fri Feb 9 22:24:32 2024 +0100 ice: fix pin phase adjust updates on PF reset Do not allow to set phase adjust value for a pin if PF reset is in progress, this would cause confusing netlink extack errors as the firmware cannot process the request properly during the reset time. Return (-EBUSY) and report extack error for the user who tries configure pin phase adjust during the reset time. Test by looping execution of below steps until netlink error appears: - perform PF reset $ echo 1 > /sys/class/net//device/reset - change pin phase adjust value: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/dpll.yaml \ --do pin-set --json '{"id":0, "phase-adjust":1000}' Fixes: 90e1c90750d7 ("ice: dpll: implement phase related callbacks") Reviewed-by: Igor Bagnucki Signed-off-by: Arkadiusz Kubalewski Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 9a8385fe14bcb250a3889e744dc54e9c411d8400 Author: Arkadiusz Kubalewski Date: Fri Feb 9 22:24:31 2024 +0100 ice: fix dpll periodic work data updates on PF reset Do not allow dpll periodic work function to acquire data from firmware if PF reset is in progress. Acquiring data will cause dmesg errors as the firmware cannot respond or process the request properly during the reset time. Test by looping execution of below step until dmesg error appears: - perform PF reset $ echo 1 > /sys/class/net//device/reset Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu") Reviewed-by: Igor Bagnucki Signed-off-by: Arkadiusz Kubalewski Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit fc7fd1a10a9d2d38378b42e9a508da4c68018453 Author: Arkadiusz Kubalewski Date: Fri Feb 9 22:24:30 2024 +0100 ice: fix dpll and dpll_pin data access on PF reset Do not allow to acquire data or alter configuration of dpll and pins through firmware if PF reset is in progress, this would cause confusing netlink extack errors as the firmware cannot respond or process the request properly during the reset time. Return (-EBUSY) and extack error for the user who tries access/modify the config of dpll/pin through firmware during the reset time. The PF reset and kernel access to dpll data are both asynchronous. It is not possible to guard all the possible reset paths with any determinictic approach. I.e., it is possible that reset starts after reset check is performed (or if the reset would be checked after mutex is locked), but at the same time it is not possible to wait for dpll mutex unlock in the reset flow. This is best effort solution to at least give a clue to the user what is happening in most of the cases, knowing that there are possible race conditions where the user could see a different error received from firmware due to reset unexpectedly starting. Test by looping execution of below steps until netlink error appears: - perform PF reset $ echo 1 > /sys/class/net//device/reset - i.e. try to alter/read dpll/pin config: $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/dpll.yaml \ --dump pin-get Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu") Reviewed-by: Aleksandr Loktionov Reviewed-by: Przemek Kitszel Signed-off-by: Arkadiusz Kubalewski Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 3b14430c65b4f510b2a310ca4f18ed6ca7184b00 Author: Arkadiusz Kubalewski Date: Thu Feb 8 23:56:31 2024 +0100 ice: fix dpll input pin phase_adjust value updates The value of phase_adjust for input pin shall be updated in ice_dpll_pin_state_update(..). Fix by adding proper argument to the firmware query function call - a pin's struct field pointer where the phase_adjust value during driver runtime is stored. Previously the phase_adjust used to misinform user about actual phase_adjust value. I.e., if phase_adjust was set to a non zero value and if driver was reloaded, the user would see the value equal 0, which is not correct - the actual value is equal to value set before driver reload. Fixes: 90e1c90750d7 ("ice: dpll: implement phase related callbacks") Reviewed-by: Alan Brady Signed-off-by: Arkadiusz Kubalewski Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit e8335ef57c6816d81b24173ba88cc9b3f043687f Author: Yochai Hagvi Date: Thu Jan 25 15:40:55 2024 +0200 ice: fix connection state of DPLL and out pin Fix the connection state between source DPLL and output pin, updating the attribute 'state' of 'parent_device'. Previously, the connection state was broken, and didn't reflect the correct state. When 'state_on_dpll_set' is called with the value 'DPLL_PIN_STATE_CONNECTED' (1), the output pin will switch to the given DPLL, and the state of the given DPLL will be set to connected. E.g.: --do pin-set --json '{"id":2, "parent-device":{"parent-id":1, "state": 1 }}' This command will connect DPLL device with id 1 to output pin with id 2. When 'state_on_dpll_set' is called with the value 'DPLL_PIN_STATE_DISCONNECTED' (2) and the given DPLL is currently connected, then the output pin will be disabled. E.g: --do pin-set --json '{"id":2, "parent-device":{"parent-id":1, "state": 2 }}' This command will disable output pin with id 2 if DPLL device with ID 1 is connected to it; otherwise, the command is ignored. Fixes: d7999f5ea64b ("ice: implement dpll interface to control cgu") Reviewed-by: Wojciech Drewek Reviewed-by: Arkadiusz Kubalewski Signed-off-by: Yochai Hagvi Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 944d5fe50f3f03daacfea16300e656a1691c4a23 Author: Linus Torvalds Date: Sun Feb 4 15:25:12 2024 +0000 sched/membarrier: reduce the ability to hammer on sys_membarrier On some systems, sys_membarrier can be very expensive, causing overall slowdowns for everything. So put a lock on the path in order to serialize the accesses to prevent the ability for this to be called at too high of a frequency and saturate the machine. Signed-off-by: Greg Kroah-Hartman Reviewed-and-tested-by: Mathieu Desnoyers Acked-by: Borislav Petkov Fixes: 22e4ebb97582 ("membarrier: Provide expedited private command") Fixes: c5f58bd58f43 ("membarrier: Provide GLOBAL_EXPEDITED command") Signed-off-by: Linus Torvalds commit d0a59944e34f915cdd8cc4d41e91376c29843d8f Merge: fdf87a0dc26d0 7bca405c98607 Author: Arnd Bergmann Date: Tue Feb 20 17:20:12 2024 +0100 Merge tag 'imx-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 6.8: - A tqma8mpql device tree fix to correct audio codec iov-supply. - A couple of USB-C connector DT description revert to fix regression on imx8mp-dhcom-pdk3 and imx8mn-var-som-symphony board. - Fix valid range check for imx-weim bus driver. - Disable UART4 on Data Modul i.MX8M Plus eDM SBC to avoid boot hang in case that RDC protection is in place. * tag 'imx-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: bus: imx-weim: fix valid range check Revert "arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector" Revert "arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector" arm64: dts: tqma8mpql: fix audio codec iov-supply arm64: dts: imx8mp: Disable UART4 by default on Data Modul i.MX8M Plus eDM SBC Link: https://lore.kernel.org/r/20240206151744.2459-1-shawnguo2@yeah.net Signed-off-by: Arnd Bergmann commit fdf87a0dc26d0550c60edc911cda42f9afec3557 Author: Nikita Shubin Date: Mon Feb 5 11:23:34 2024 +0100 ARM: ep93xx: Add terminator to gpiod_lookup_table Without the terminator, if a con_id is passed to gpio_find() that does not exist in the lookup table the function will not stop looping correctly, and eventually cause an oops. Cc: stable@vger.kernel.org Fixes: b2e63555592f ("i2c: gpio: Convert to use descriptors") Reported-by: Andy Shevchenko Signed-off-by: Nikita Shubin Reviewed-by: Linus Walleij Acked-by: Alexander Sverdlin Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20240205102337.439002-1-alexander.sverdlin@gmail.com Signed-off-by: Arnd Bergmann commit 49cbb7b7d36ec3ba73ce1daf7ae1d71d435453b8 Author: Takashi Iwai Date: Tue Feb 20 16:08:43 2024 +0100 ALSA: ump: Fix the discard error code from snd_ump_legacy_open() snd_ump_legacy_open() didn't return the error code properly even if it couldn't open. Fix it. Fixes: 0b5288f5fe63 ("ALSA: ump: Add legacy raw MIDI support") Cc: Link: https://lore.kernel.org/r/20240220150843.28630-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit eb0d253ff9c74dee30aa92fe460b825eb28acd73 Author: Andrzej Kacprowski Date: Tue Feb 20 14:16:24 2024 +0100 accel/ivpu: Don't enable any tiles by default on VPU40xx There is no point in requesting 1 tile on VPU40xx as the FW will probably need more tiles to run workloads, so it will have to reconfigure PLL anyway. Don't enable any tiles and allow the FW to perform initial tile configuration. This improves NPU boot stability as the tiles are always enabled only by the FW from the same initial state. Fixes: 79cdc56c4a54 ("accel/ivpu: Add initial support for VPU 4") Cc: stable@vger.kernel.org Signed-off-by: Andrzej Kacprowski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240220131624.1447813-1-jacek.lawrynowicz@linux.intel.com commit 427c70dec738318b7f71e1b9d829ff0e9771d493 Author: Mario Limonciello Date: Fri Feb 16 20:23:11 2024 -0600 platform/x86: thinkpad_acpi: Only update profile if successfully converted Randomly a Lenovo Z13 will trigger a kernel warning traceback from this condition: ``` if (WARN_ON((profile < 0) || (profile >= ARRAY_SIZE(profile_names)))) ``` This happens because thinkpad-acpi always assumes that convert_dytc_to_profile() successfully updated the profile. On the contrary a condition can occur that when dytc_profile_refresh() is called the profile doesn't get updated as there is a -EOPNOTSUPP branch. Catch this situation and avoid updating the profile. Also log this into dynamic debugging in case any other modes should be added in the future. Fixes: c3bfcd4c6762 ("platform/x86: thinkpad_acpi: Add platform profile support") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20240217022311.113879-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 84c16d01ff219bc0a5dca5219db6b8b86a6854fb Author: Hans de Goede Date: Fri Feb 16 21:33:00 2024 +0100 platform/x86: intel-vbtn: Stop calling "VBDL" from notify_handler Commit 14c200b7ca46 ("platform/x86: intel-vbtn: Fix missing tablet-mode-switch events") causes 2 issues on the ThinkPad X1 Tablet Gen2: 1. The ThinkPad will wake up immediately from suspend 2. When put in tablet mode SW_TABLET_MODE reverts to 0 after about 1 second Both these issues are caused by the "VBDL" ACPI method call added at the end of the notify_handler. And it never became entirely clear if this call is even necessary to fix the issue of missing tablet-mode-switch events on the Dell Inspiron 7352. Drop the "VBDL" ACPI method call again to fix the 2 issues this is causing on the ThinkPad X1 Tablet Gen2. Fixes: 14c200b7ca46 ("platform/x86: intel-vbtn: Fix missing tablet-mode-switch events") Reported-by: Alexander Kobel Closes: https://lore.kernel.org/platform-driver-x86/295984ce-bd4b-49bd-adc5-ffe7c898d7f0@a-kobel.de/ Cc: regressions@lists.linux.dev Cc: Arnold Gozum Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Tested-by: Alexander Kobel Link: https://lore.kernel.org/r/20240216203300.245826-1-hdegoede@redhat.com commit 8215ca518164d35f10c0b5545c8bb80f538638b8 Author: Hans de Goede Date: Fri Feb 16 21:17:21 2024 +0100 platform/x86: x86-android-tablets: Fix acer_b1_750_goodix_gpios name The Acer B1 750 tablet used a Novatek NVT-ts touchscreen, not a Goodix touchscreen. Rename acer_b1_750_goodix_gpios to acer_b1_750_nvt_ts_gpios to correctly reflect this. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240216201721.239791-5-hdegoede@redhat.com commit 812a79b52b92345d777b6377fa538747d366b6ce Author: Hans de Goede Date: Fri Feb 16 21:17:20 2024 +0100 platform/x86: x86-android-tablets: Fix serdev instantiation no longer working After commit b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") x86_instantiate_serdev() no longer works due to the serdev-controller-device moving in the device hierarchy from (e.g.) /sys/devices/pci0000:00/8086228A:00/serial0 to /sys/devices/pci0000:00/8086228A:00/8086228A:00:0/8086228A:00:0.0/serial0 Use the new get_serdev_controller() helper function to fix this. Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") Cc: Tony Lindgren Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240216201721.239791-4-hdegoede@redhat.com commit dc5afd720f84de3c1f5d700eb0b858006a2dc468 Author: Hans de Goede Date: Fri Feb 16 21:17:19 2024 +0100 platform/x86: Add new get_serdev_controller() helper In some cases UART attached devices which require an in kernel driver, e.g. UART attached Bluetooth HCIs are described in the ACPI tables by an ACPI device with a broken or missing UartSerialBusV2() resource. This causes the kernel to create a /dev/ttyS# char-device for the UART instead of creating an in kernel serdev-controller + serdev-device pair for the in kernel driver. The quirk handling in acpi_quirk_skip_serdev_enumeration() makes the kernel create a serdev-controller device for these UARTs instead of a /dev/ttyS#. Instantiating the actual serdev-device to bind to is up to pdx86 code, so far this was handled by the x86-android-tablets code. But since commit b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") the serdev-controller device has moved in the device hierarchy from (e.g.) /sys/devices/pci0000:00/8086228A:00/serial0 to /sys/devices/pci0000:00/8086228A:00/8086228A:00:0/8086228A:00:0.0/serial0 . This makes this a bit trickier to do and another driver is in the works which will also need this functionality. Add a new helper to get the serdev-controller device, so that the new code for this can be shared. Fixes: b286f4e87e32 ("serial: core: Move tty and serdev to be children of serial core port device") Cc: Tony Lindgren Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240216201721.239791-3-hdegoede@redhat.com commit bd8905d70944aae5063fd91c667e6f846ee92718 Author: Hans de Goede Date: Fri Feb 16 21:17:18 2024 +0100 platform/x86: x86-android-tablets: Fix keyboard touchscreen on Lenovo Yogabook1 X90 After commit 4014ae236b1d ("platform/x86: x86-android-tablets: Stop using gpiolib private APIs") the touchscreen in the keyboard half of the Lenovo Yogabook1 X90 stopped working with the following error: Goodix-TS i2c-goodix_ts: error -EBUSY: Failed to get irq GPIO The problem is that when getting the IRQ for instantiated i2c_client-s from a GPIO (rather then using an IRQ directly from the IOAPIC), x86_acpi_irq_helper_get() now properly requests the GPIO, which disallows other drivers from requesting it. Normally this is a good thing, but the goodix touchscreen also uses the IRQ as an output during reset to select which of its 2 possible I2C addresses should be used. Add a new free_gpio flag to struct x86_acpi_irq_data to deal with this and release the GPIO after getting the IRQ in this special case. Fixes: 4014ae236b1d ("platform/x86: x86-android-tablets: Stop using gpiolib private APIs") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240216201721.239791-2-hdegoede@redhat.com commit d7b77a0d565b048cb0808fa8a4fb031352b22a01 Author: Mark Brown Date: Tue Feb 13 23:06:33 2024 +0000 arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend The fields in SMCR_EL1 reset to an architecturally UNKNOWN value. Since we do not otherwise manage the traps configured in this register at runtime we need to reconfigure them after a suspend in case nothing else was kind enough to preserve them for us. Do so for SMCR_EL1.EZT0. Fixes: d4913eee152d ("arm64/sme: Add basic enumeration for SME2") Reported-by: Jackson Cooper-Driver Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20240213-arm64-sme-resume-v3-2-17e05e493471@kernel.org Signed-off-by: Will Deacon commit 9533864816fb4a6207c63b7a98396351ce1a9fae Author: Mark Brown Date: Tue Feb 13 23:06:32 2024 +0000 arm64/sme: Restore SME registers on exit from suspend The fields in SMCR_EL1 and SMPRI_EL1 reset to an architecturally UNKNOWN value. Since we do not otherwise manage the traps configured in this register at runtime we need to reconfigure them after a suspend in case nothing else was kind enough to preserve them for us. The vector length will be restored as part of restoring the SME state for the next SME using task. Fixes: a1f4ccd25cc2 ("arm64/sme: Provide Kconfig for SME") Reported-by: Jackson Cooper-Driver Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20240213-arm64-sme-resume-v3-1-17e05e493471@kernel.org Signed-off-by: Will Deacon commit a6b3eb304a82c29665a0ab947cfe276f6d29f523 Author: Will Deacon Date: Tue Feb 20 12:05:47 2024 +0000 Revert "arm64: jump_label: use constraints "Si" instead of "i"" This reverts commit f9daab0ad01cf9d165dbbbf106ca4e61d06e7fe8. Geert reports that his particular GCC 5.5 vintage toolchain fails to build an arm64 defconfig because of this change: | arch/arm64/include/asm/jump_label.h:25:2: error: invalid 'asm': | invalid operand | asm goto( ^ Aopparently, this is something we claim to support, so let's revert back to the old jump label constraint for now while discussions about raising the minimum GCC version are ongoing. Reported-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/CAMuHMdX+6fnAf8Hm6EqYJPAjrrLO9T7c=Gu3S8V_pqjSDowJ6g@mail.gmail.com Signed-off-by: Will Deacon commit 802379b8f9e169293e9ba7089e5f1a6340e2e7a3 Author: Hojin Nam Date: Fri Feb 16 10:45:22 2024 +0900 perf: CXL: fix CPMU filter value mask length CPMU filter value is described as 4B length in CXL r3.0 8.2.7.2.2. However, it is used as 2B length in code and comments. Reviewed-by: Jonathan Cameron Signed-off-by: Hojin Nam Link: https://lore.kernel.org/r/20240216014522.32321-1-hj96.nam@samsung.com Signed-off-by: Will Deacon commit ae366ba8576da0135d7d3db2dfa6304f3338d0c2 Author: Emil Renner Berthing Date: Mon Feb 19 18:25:13 2024 +0100 gpiolib: Handle no pin_ranges in gpiochip_generic_config() Similar to gpiochip_generic_request() and gpiochip_generic_free() the gpiochip_generic_config() function needs to handle the case where there are no pinctrl pins mapped to the GPIOs, usually through the gpio-ranges device tree property. Commit f34fd6ee1be8 ("gpio: dwapb: Use generic request, free and set_config") set the .set_config callback to gpiochip_generic_config() in the dwapb GPIO driver so the GPIO API can set pinctrl configuration for the corresponding pins. Most boards using the dwapb driver do not set the gpio-ranges device tree property though, and in this case gpiochip_generic_config() would return -EPROPE_DEFER rather than the previous -ENOTSUPP return value. This in turn makes gpio_set_config_with_argument_optional() fail and propagate the error to any driver requesting GPIOs. Fixes: 2956b5d94a76 ("pinctrl / gpio: Introduce .set_config() callback for GPIO chips") Reported-by: Jisheng Zhang Closes: https://lore.kernel.org/linux-gpio/ZdC_g3U4l0CJIWzh@xhacker/ Tested-by: Jisheng Zhang Signed-off-by: Emil Renner Berthing Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 20c8c4dafe93e82441583e93bd68c0d256d7bed4 Author: Amit Machhiwal Date: Wed Feb 7 11:15:26 2024 +0530 KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat' Currently, rebooting a pseries nested qemu-kvm guest (L2) results in below error as L1 qemu sends PVR value 'arch_compat' == 0 via ppc_set_compat ioctl. This triggers a condition failure in kvmppc_set_arch_compat() resulting in an EINVAL. qemu-system-ppc64: Unable to set CPU compatibility mode in KVM: Invalid argument Also, a value of 0 for arch_compat generally refers the default compatibility of the host. But, arch_compat, being a Guest Wide Element in nested API v2, cannot be set to 0 in GSB as PowerVM (L0) expects a non-zero value. A value of 0 triggers a kernel trap during a reboot and consequently causes it to fail: [ 22.106360] reboot: Restarting system KVM: unknown exit, hardware reason ffffffffffffffea NIP 0000000000000100 LR 000000000000fe44 CTR 0000000000000000 XER 0000000020040092 CPU#0 MSR 0000000000001000 HID0 0000000000000000 HF 6c000000 iidx 3 didx 3 TB 00000000 00000000 DECR 0 GPR00 0000000000000000 0000000000000000 c000000002a8c300 000000007fe00000 GPR04 0000000000000000 0000000000000000 0000000000001002 8000000002803033 GPR08 000000000a000000 0000000000000000 0000000000000004 000000002fff0000 GPR12 0000000000000000 c000000002e10000 0000000105639200 0000000000000004 GPR16 0000000000000000 000000010563a090 0000000000000000 0000000000000000 GPR20 0000000105639e20 00000001056399c8 00007fffe54abab0 0000000105639288 GPR24 0000000000000000 0000000000000001 0000000000000001 0000000000000000 GPR28 0000000000000000 0000000000000000 c000000002b30840 0000000000000000 CR 00000000 [ - - - - - - - - ] RES 000@ffffffffffffffff SRR0 0000000000000000 SRR1 0000000000000000 PVR 0000000000800200 VRSAVE 0000000000000000 SPRG0 0000000000000000 SPRG1 0000000000000000 SPRG2 0000000000000000 SPRG3 0000000000000000 SPRG4 0000000000000000 SPRG5 0000000000000000 SPRG6 0000000000000000 SPRG7 0000000000000000 HSRR0 0000000000000000 HSRR1 0000000000000000 CFAR 0000000000000000 LPCR 0000000000020400 PTCR 0000000000000000 DAR 0000000000000000 DSISR 0000000000000000 kernel:trap=0xffffffea | pc=0x100 | msr=0x1000 This patch updates kvmppc_set_arch_compat() to use the host PVR value if 'compat_pvr' == 0 indicating that qemu doesn't want to enforce any specific PVR compat mode. The relevant part of the code might need a rework if PowerVM implements a support for `arch_compat == 0` in nestedv2 API. Fixes: 19d31c5f1157 ("KVM: PPC: Add support for nestedv2 guests") Reviewed-by: "Aneesh Kumar K.V (IBM)" Reviewed-by: Vaibhav Jain Signed-off-by: Amit Machhiwal Signed-off-by: Michael Ellerman Link: https://msgid.link/20240207054526.3720087-1-amachhiw@linux.ibm.com commit 23f9c2c066e7e5052406fb8f04a115d3d0260b22 Author: Jakub Kicinski Date: Fri Feb 16 08:19:45 2024 -0800 docs: netdev: update the link to the CI repo Netronome graciously transferred the original NIPA repo to our new netdev umbrella org. Link to that instead of my private fork. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240216161945.2208842-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit a7d6027790acea24446ddd6632d394096c0f4667 Author: Kuniyuki Iwashima Date: Thu Feb 15 15:05:16 2024 -0800 arp: Prevent overflow in arp_req_get(). syzkaller reported an overflown write in arp_req_get(). [0] When ioctl(SIOCGARP) is issued, arp_req_get() looks up an neighbour entry and copies neigh->ha to struct arpreq.arp_ha.sa_data. The arp_ha here is struct sockaddr, not struct sockaddr_storage, so the sa_data buffer is just 14 bytes. In the splat below, 2 bytes are overflown to the next int field, arp_flags. We initialise the field just after the memcpy(), so it's not a problem. However, when dev->addr_len is greater than 22 (e.g. MAX_ADDR_LEN), arp_netmask is overwritten, which could be set as htonl(0xFFFFFFFFUL) in arp_ioctl() before calling arp_req_get(). To avoid the overflow, let's limit the max length of memcpy(). Note that commit b5f0de6df6dc ("net: dev: Convert sa_data to flexible array in struct sockaddr") just silenced syzkaller. [0]: memcpy: detected field-spanning write (size 16) of single field "r->arp_ha.sa_data" at net/ipv4/arp.c:1128 (size 14) WARNING: CPU: 0 PID: 144638 at net/ipv4/arp.c:1128 arp_req_get+0x411/0x4a0 net/ipv4/arp.c:1128 Modules linked in: CPU: 0 PID: 144638 Comm: syz-executor.4 Not tainted 6.1.74 #31 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-5 04/01/2014 RIP: 0010:arp_req_get+0x411/0x4a0 net/ipv4/arp.c:1128 Code: fd ff ff e8 41 42 de fb b9 0e 00 00 00 4c 89 fe 48 c7 c2 20 6d ab 87 48 c7 c7 80 6d ab 87 c6 05 25 af 72 04 01 e8 5f 8d ad fb <0f> 0b e9 6c fd ff ff e8 13 42 de fb be 03 00 00 00 4c 89 e7 e8 a6 RSP: 0018:ffffc900050b7998 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff88803a815000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff8641a44a RDI: 0000000000000001 RBP: ffffc900050b7a98 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 203a7970636d656d R12: ffff888039c54000 R13: 1ffff92000a16f37 R14: ffff88803a815084 R15: 0000000000000010 FS: 00007f172bf306c0(0000) GS:ffff88805aa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f172b3569f0 CR3: 0000000057f12005 CR4: 0000000000770ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: arp_ioctl+0x33f/0x4b0 net/ipv4/arp.c:1261 inet_ioctl+0x314/0x3a0 net/ipv4/af_inet.c:981 sock_do_ioctl+0xdf/0x260 net/socket.c:1204 sock_ioctl+0x3ef/0x650 net/socket.c:1321 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x18e/0x220 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x37/0x90 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x64/0xce RIP: 0033:0x7f172b262b8d Code: 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f172bf300b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f172b3abf80 RCX: 00007f172b262b8d RDX: 0000000020000000 RSI: 0000000000008954 RDI: 0000000000000003 RBP: 00007f172b2d3493 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f172b3abf80 R15: 00007f172bf10000 Reported-by: syzkaller Reported-by: Bjoern Doebel Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20240215230516.31330-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit def689fc26b9a9622d2e2cb0c4933dd3b1c8071c Author: Vasiliy Kovalev Date: Thu Feb 15 23:34:00 2024 +0300 devlink: fix possible use-after-free and memory leaks in devlink_init() The pernet operations structure for the subsystem must be registered before registering the generic netlink family. Make an unregister in case of unsuccessful registration. Fixes: 687125b5799c ("devlink: split out core code") Signed-off-by: Vasiliy Kovalev Link: https://lore.kernel.org/r/20240215203400.29976-1-kovalev@altlinux.org Signed-off-by: Paolo Abeni commit 5559cea2d5aa3018a5f00dd2aca3427ba09b386b Author: Vasiliy Kovalev Date: Thu Feb 15 23:27:17 2024 +0300 ipv6: sr: fix possible use-after-free and null-ptr-deref The pernet operations structure for the subsystem must be registered before registering the generic netlink family. Fixes: 915d7e5e5930 ("ipv6: sr: add code base for control plane support of SR-IPv6") Signed-off-by: Vasiliy Kovalev Link: https://lore.kernel.org/r/20240215202717.29815-1-kovalev@altlinux.org Signed-off-by: Paolo Abeni commit 6ea38e2aeb72349cad50e38899b0ba6fbcb2af3d Author: Daniil Dulov Date: Mon Feb 19 14:39:03 2024 +0000 afs: Increase buffer size in afs_update_volume_status() The max length of volume->vid value is 20 characters. So increase idbuf[] size up to 24 to avoid overflow. Found by Linux Verification Center (linuxtesting.org) with SVACE. [DH: Actually, it's 20 + NUL, so increase it to 24 and use snprintf()] Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: Daniil Dulov Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240211150442.3416-1-d.dulov@aladdin.ru/ # v1 Link: https://lore.kernel.org/r/20240212083347.10742-1-d.dulov@aladdin.ru/ # v2 Link: https://lore.kernel.org/r/20240219143906.138346-3-dhowells@redhat.com Signed-off-by: Christian Brauner commit bfacaf71a1482d936804213a3ffa6de73558280e Author: Marc Dionne Date: Mon Feb 19 14:39:02 2024 +0000 afs: Fix ignored callbacks over ipv4 When searching for a matching peer, all addresses need to be searched, not just the ipv6 ones in the fs_addresses6 list. Given that the lists no longer contain addresses, there is little reason to splitting things between separate lists, so unify them into a single list. When processing an incoming callback from an ipv4 address, this would lead to a failure to set call->server, resulting in the callback being ignored and the client seeing stale contents. Fixes: 72904d7b9bfb ("rxrpc, afs: Allow afs to pin rxrpc_peer objects") Reported-by: Markus Suvanto Link: https://lists.infradead.org/pipermail/linux-afs/2024-February/008035.html Signed-off-by: Marc Dionne Signed-off-by: David Howells Link: https://lists.infradead.org/pipermail/linux-afs/2024-February/008037.html # v1 Link: https://lists.infradead.org/pipermail/linux-afs/2024-February/008066.html # v2 Link: https://lore.kernel.org/r/20240219143906.138346-2-dhowells@redhat.com Signed-off-by: Christian Brauner commit e21a2f17566cbd64926fb8f16323972f7a064444 Author: Baokun Li Date: Sat Feb 17 16:14:31 2024 +0800 cachefiles: fix memory leak in cachefiles_add_cache() The following memory leak was reported after unbinding /dev/cachefiles: ================================================================== unreferenced object 0xffff9b674176e3c0 (size 192): comm "cachefilesd2", pid 680, jiffies 4294881224 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 00 00 00 00 00 00 00 00 ................ backtrace (crc ea38a44b): [] kmem_cache_alloc+0x2d5/0x370 [] prepare_creds+0x26/0x2e0 [] cachefiles_determine_cache_security+0x1f/0x120 [] cachefiles_add_cache+0x13c/0x3a0 [] cachefiles_daemon_write+0x146/0x1c0 [] vfs_write+0xcb/0x520 [] ksys_write+0x69/0xf0 [] do_syscall_64+0x72/0x140 [] entry_SYSCALL_64_after_hwframe+0x6e/0x76 ================================================================== Put the reference count of cache_cred in cachefiles_daemon_unbind() to fix the problem. And also put cache_cred in cachefiles_add_cache() error branch to avoid memory leaks. Fixes: 9ae326a69004 ("CacheFiles: A cache that backs onto a mounted filesystem") CC: stable@vger.kernel.org Signed-off-by: Baokun Li Link: https://lore.kernel.org/r/20240217081431.796809-1-libaokun1@huawei.com Acked-by: David Howells Reviewed-by: Jingbo Xu Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit 69f89168b310878be82d7d97bc0d22068ad858c0 Author: Mark Brown Date: Mon Feb 12 18:42:13 2024 +0000 usb: typec: tpcm: Fix issues with power being removed during reset Since the merge of b717dfbf73e8 ("Revert "usb: typec: tcpm: fix cc role at port reset"") into mainline the LibreTech Renegade Elite/Firefly has died during boot, the main symptom observed in testing is a sudden stop in console output. Gábor Stefanik identified in review that the patch would cause power to be removed from devices without batteries (like this board), observing that while the patch is correct according to the spec this appears to be an oversight in the spec. Given that the change makes previously working systems unusable let's revert it, there was some discussion of identifying systems that have alternative power and implementing the standards conforming behaviour in only that case. Fixes: b717dfbf73e8 ("Revert "usb: typec: tcpm: fix cc role at port reset"") Cc: stable Cc: Badhri Jagan Sridharan Signed-off-by: Mark Brown Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240212-usb-fix-renegade-v1-1-22c43c88d635@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2c88c16dc20e88dd54d2f6f4d01ae1dce6cc9654 Author: Al Viro Date: Mon Feb 12 22:44:11 2024 -0500 erofs: fix handling kern_mount() failure if you have a variable that holds NULL or a pointer to live struct mount, do not shove ERR_PTR() into it - not if you later treat "not NULL" as "holds a pointer to object". Signed-off-by: Al Viro commit 43fb862de8f628c5db5e96831c915b9aebf62d33 Author: Pawan Gupta Date: Tue Feb 13 18:22:56 2024 -0800 KVM/VMX: Move VERW closer to VMentry for MDS mitigation During VMentry VERW is executed to mitigate MDS. After VERW, any memory access like register push onto stack may put host data in MDS affected CPU buffers. A guest can then use MDS to sample host data. Although likelihood of secrets surviving in registers at current VERW callsite is less, but it can't be ruled out. Harden the MDS mitigation by moving the VERW mitigation late in VMentry path. Note that VERW for MMIO Stale Data mitigation is unchanged because of the complexity of per-guest conditional VERW which is not easy to handle that late in asm with no GPRs available. If the CPU is also affected by MDS, VERW is unconditionally executed late in asm regardless of guest having MMIO access. Signed-off-by: Pawan Gupta Signed-off-by: Dave Hansen Acked-by: Sean Christopherson Link: https://lore.kernel.org/all/20240213-delay-verw-v8-6-a6216d83edb7%40linux.intel.com commit 706a189dcf74d3b3f955e9384785e726ed6c7c80 Author: Sean Christopherson Date: Tue Feb 13 18:22:40 2024 -0800 KVM/VMX: Use BT+JNC, i.e. EFLAGS.CF to select VMRESUME vs. VMLAUNCH Use EFLAGS.CF instead of EFLAGS.ZF to track whether to use VMRESUME versus VMLAUNCH. Freeing up EFLAGS.ZF will allow doing VERW, which clobbers ZF, for MDS mitigations as late as possible without needing to duplicate VERW for both paths. Signed-off-by: Sean Christopherson Signed-off-by: Pawan Gupta Signed-off-by: Dave Hansen Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/all/20240213-delay-verw-v8-5-a6216d83edb7%40linux.intel.com commit 6613d82e617dd7eb8b0c40b2fe3acea655b1d611 Author: Pawan Gupta Date: Tue Feb 13 18:22:24 2024 -0800 x86/bugs: Use ALTERNATIVE() instead of mds_user_clear static key The VERW mitigation at exit-to-user is enabled via a static branch mds_user_clear. This static branch is never toggled after boot, and can be safely replaced with an ALTERNATIVE() which is convenient to use in asm. Switch to ALTERNATIVE() to use the VERW mitigation late in exit-to-user path. Also remove the now redundant VERW in exc_nmi() and arch_exit_to_user_mode(). Signed-off-by: Pawan Gupta Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240213-delay-verw-v8-4-a6216d83edb7%40linux.intel.com commit a0e2dab44d22b913b4c228c8b52b2a104434b0b3 Author: Pawan Gupta Date: Tue Feb 13 18:22:08 2024 -0800 x86/entry_32: Add VERW just before userspace transition As done for entry_64, add support for executing VERW late in exit to user path for 32-bit mode. Signed-off-by: Pawan Gupta Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240213-delay-verw-v8-3-a6216d83edb7%40linux.intel.com commit 3c7501722e6b31a6e56edd23cea5e77dbb9ffd1a Author: Pawan Gupta Date: Tue Feb 13 18:21:52 2024 -0800 x86/entry_64: Add VERW just before userspace transition Mitigation for MDS is to use VERW instruction to clear any secrets in CPU Buffers. Any memory accesses after VERW execution can still remain in CPU buffers. It is safer to execute VERW late in return to user path to minimize the window in which kernel data can end up in CPU buffers. There are not many kernel secrets to be had after SWITCH_TO_USER_CR3. Add support for deploying VERW mitigation after user register state is restored. This helps minimize the chances of kernel data ending up into CPU buffers after executing VERW. Note that the mitigation at the new location is not yet enabled. Corner case not handled ======================= Interrupts returning to kernel don't clear CPUs buffers since the exit-to-user path is expected to do that anyways. But, there could be a case when an NMI is generated in kernel after the exit-to-user path has cleared the buffers. This case is not handled and NMI returning to kernel don't clear CPU buffers because: 1. It is rare to get an NMI after VERW, but before returning to userspace. 2. For an unprivileged user, there is no known way to make that NMI less rare or target it. 3. It would take a large number of these precisely-timed NMIs to mount an actual attack. There's presumably not enough bandwidth. 4. The NMI in question occurs after a VERW, i.e. when user state is restored and most interesting data is already scrubbed. Whats left is only the data that NMI touches, and that may or may not be of any interest. Suggested-by: Dave Hansen Signed-off-by: Pawan Gupta Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240213-delay-verw-v8-2-a6216d83edb7%40linux.intel.com commit baf8361e54550a48a7087b603313ad013cc13386 Author: Pawan Gupta Date: Tue Feb 13 18:21:35 2024 -0800 x86/bugs: Add asm helpers for executing VERW MDS mitigation requires clearing the CPU buffers before returning to user. This needs to be done late in the exit-to-user path. Current location of VERW leaves a possibility of kernel data ending up in CPU buffers for memory accesses done after VERW such as: 1. Kernel data accessed by an NMI between VERW and return-to-user can remain in CPU buffers since NMI returning to kernel does not execute VERW to clear CPU buffers. 2. Alyssa reported that after VERW is executed, CONFIG_GCC_PLUGIN_STACKLEAK=y scrubs the stack used by a system call. Memory accesses during stack scrubbing can move kernel stack contents into CPU buffers. 3. When caller saved registers are restored after a return from function executing VERW, the kernel stack accesses can remain in CPU buffers(since they occur after VERW). To fix this VERW needs to be moved very late in exit-to-user path. In preparation for moving VERW to entry/exit asm code, create macros that can be used in asm. Also make VERW patching depend on a new feature flag X86_FEATURE_CLEAR_CPU_BUF. Reported-by: Alyssa Milburn Suggested-by: Andrew Cooper Suggested-by: Peter Zijlstra Signed-off-by: Pawan Gupta Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20240213-delay-verw-v8-1-a6216d83edb7%40linux.intel.com commit 882a2a724ee964c1ebe7268a91d5c8c8ddc796bf Author: Guenter Roeck Date: Thu Feb 15 13:51:45 2024 -0800 parisc: Fix stack unwinder Debugging shows a large number of unaligned access traps in the unwinder code. Code analysis reveals a number of issues with this code: - handle_interruption is passed twice through dereference_kernel_function_descriptor() - ret_from_kernel_thread, syscall_exit, intr_return, _switch_to_ret, and _call_on_stack are passed through dereference_kernel_function_descriptor() even though they are not declared as function pointers. To fix the problems, drop one of the calls to dereference_kernel_function_descriptor() for handle_interruption, and compare the other pointers directly. Fixes: 6414b30b39f9 ("parisc: unwind: Avoid missing prototype warning for handle_interruption()") Fixes: 8e0ba125c2bf ("parisc/unwind: fix unwinder when CONFIG_64BIT is enabled") Cc: Helge Deller Cc: Sven Schnelle Cc: John David Anglin Cc: Charlie Jenkins Cc: David Laight Signed-off-by: Guenter Roeck Signed-off-by: Helge Deller commit 1fdf4e8be7059e7784fec11d30cd32784f0bdc83 Author: Hans Peter Date: Mon Feb 19 17:38:49 2024 +0100 ALSA: hda/realtek: Enable Mute LED on HP 840 G8 (MB 8AB8) On my EliteBook 840 G8 Notebook PC (ProdId 5S7R6EC#ABD; built 2022 for german market) the Mute LED is always on. The mute button itself works as expected. alsa-info.sh shows a different subsystem-id 0x8ab9 for Realtek ALC285 Codec, thus the existing quirks for HP 840 G8 don't work. Therefore, add a new quirk for this type of EliteBook. Signed-off-by: Hans Peter Cc: Link: https://lore.kernel.org/r/20240219164518.4099-1-flurry123@gmx.ch Signed-off-by: Takashi Iwai commit e33625c84b75e4f078d7f9bf58f01fe71ab99642 Author: Richard Fitzgerald Date: Fri Feb 16 14:05:35 2024 +0000 ASoC: cs35l56: Must clear HALO_STATE before issuing SYSTEM_RESET The driver must write 0 to HALO_STATE before sending the SYSTEM_RESET command to the firmware. HALO_STATE is in DSP memory, which is preserved across a soft reset. The SYSTEM_RESET command does not change the value of HALO_STATE. There is period of time while the CS35L56 is resetting, before the firmware has started to boot, where a read of HALO_STATE will return the value it had before the SYSTEM_RESET. If the driver does not clear HALO_STATE, this would return BOOT_DONE status even though the firmware has not booted. Signed-off-by: Richard Fitzgerald Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file") Link: https://msgid.link/r/20240216140535.1434933-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit db744ddd59be798c2627efbfc71f707f5a935a40 Author: Vidya Sagar Date: Mon Jan 15 19:26:49 2024 +0530 PCI/MSI: Prevent MSI hardware interrupt number truncation While calculating the hardware interrupt number for a MSI interrupt, the higher bits (i.e. from bit-5 onwards a.k.a domain_nr >= 32) of the PCI domain number gets truncated because of the shifted value casting to return type of pci_domain_nr() which is 'int'. This for example is resulting in same hardware interrupt number for devices 0019:00:00.0 and 0039:00:00.0. To address this cast the PCI domain number to 'irq_hw_number_t' before left shifting it to calculate the hardware interrupt number. Please note that this fixes the issue only on 64-bit systems and doesn't change the behavior for 32-bit systems i.e. the 32-bit systems continue to have the issue. Since the issue surfaces only if there are too many PCIe controllers in the system which usually is the case in modern server systems and they don't tend to run 32-bit kernels. Fixes: 3878eaefb89a ("PCI/MSI: Enhance core to support hierarchy irqdomain") Signed-off-by: Vidya Sagar Signed-off-by: Thomas Gleixner Tested-by: Shanker Donthineni Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240115135649.708536-1-vidyas@nvidia.com commit 9c92006b896c767218aabe8947b62026a571cfd0 Author: Nam Cao Date: Wed Jan 31 09:19:33 2024 +0100 irqchip/sifive-plic: Enable interrupt if needed before EOI RISC-V PLIC cannot "end-of-interrupt" (EOI) disabled interrupts, as explained in the description of Interrupt Completion in the PLIC spec: "The PLIC signals it has completed executing an interrupt handler by writing the interrupt ID it received from the claim to the claim/complete register. The PLIC does not check whether the completion ID is the same as the last claim ID for that target. If the completion ID does not match an interrupt source that *is currently enabled* for the target, the completion is silently ignored." Commit 69ea463021be ("irqchip/sifive-plic: Fixup EOI failed when masked") ensured that EOI is successful by enabling interrupt first, before EOI. Commit a1706a1c5062 ("irqchip/sifive-plic: Separate the enable and mask operations") removed the interrupt enabling code from the previous commit, because it assumes that interrupt should already be enabled at the point of EOI. However, this is incorrect: there is a window after a hart claiming an interrupt and before irq_desc->lock getting acquired, interrupt can be disabled during this window. Thus, EOI can be invoked while the interrupt is disabled, effectively nullify this EOI. This results in the interrupt never gets asserted again, and the device who uses this interrupt appears frozen. Make sure that interrupt is really enabled before EOI. Fixes: a1706a1c5062 ("irqchip/sifive-plic: Separate the enable and mask operations") Signed-off-by: Nam Cao Signed-off-by: Thomas Gleixner Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Samuel Holland Cc: Marc Zyngier Cc: Guo Ren Cc: linux-riscv@lists.infradead.org Cc: Link: https://lore.kernel.org/r/20240131081933.144512-1-namcao@linutronix.de commit 76d41fb063338781e936765b7ed74224215ca178 Author: Mario Limonciello Date: Fri Feb 16 19:56:42 2024 -0600 platform/x86/amd/pmf: Fix a potential race with policy binary sideload The debugfs `update_policy` file is created before amd_pmf_start_policy_engine() has completed, and thus there could be a possible (albeit unlikely) race between sideloading a policy and the BIOS policy getting setup. Move the debugfs file creation after all BIOS policy is setup. Fixes: 10817f28e533 ("platform/x86/amd/pmf: Add capability to sideload of policy binary") Reported-by: Hans de Goede Closes: https://lore.kernel.org/platform-driver-x86/15df7d02-b0aa-457a-954a-9d280a592843@redhat.com/T/#m2c445f135e5ef9b53184be7fc9df84e15f89d4d9 Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20240217015642.113806-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit e7096150580849429ff3d43dd69a718bb2036be4 Author: Mario Limonciello Date: Fri Feb 16 19:41:07 2024 -0600 platform/x86/amd/pmf: Fixup error handling for amd_pmf_init_smart_pc() amd_pmf_init_smart_pc() calls out to amd_pmf_get_bios_buffer() but the error handling flow doesn't clean everything up allocated memory. As amd_pmf_get_bios_buffer() is only called by amd_pmf_init_smart_pc(), fold it into the function and add labels to clean up any step that can fail along the way. Explicitly set everything allocated to NULL as there are other features that may access some of the same variables. Fixes: 7c45534afa44 ("platform/x86/amd/pmf: Add support for PMF Policy Binary") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20240217014107.113749-3-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 20545af302bb1f6a67c0348b64032c11ecfa77ba Author: Mario Limonciello Date: Fri Feb 16 19:41:06 2024 -0600 platform/x86/amd/pmf: Add debugging message for missing policy data If a machine advertises Smart PC support but is missing policy data show a debugging message to help clarify why Smart PC wasn't enabled. Reviewed-by: Hans de Goede Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20240217014107.113749-2-mario.limonciello@amd.com Signed-off-by: Hans de Goede commit b2b6fa6f5c57848c95ca7bf1f0a7d1bb340c3460 Author: Mario Limonciello Date: Fri Feb 16 18:52:16 2024 -0600 platform/x86/amd/pmf: Fix a suspend hang on Framework 13 The buffer is cleared in the suspend handler but used in the delayed work for amd_pmf_get_metrics(). Stop clearing it to fix the hang. Reported-by: Trolli Schmittlauch Closes: https://lore.kernel.org/regressions/ed2226ff-257b-4cfd-afd6-bf3be9785474@localhost/ Closes: https://community.frame.work/t/kernel-6-8-rc-system-freezes-after-resuming-from-suspend-reproducers-wanted/45381 Fixes: 2b3a7f06caaf ("platform/x86/amd/pmf: Change return type of amd_pmf_set_dram_addr()") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20240217005216.113408-1-mario.limonciello@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 11e298f3548a6fe5e6ad78f811abfba15e6ebbc1 Author: Shyam Sundar S K Date: Fri Feb 16 12:11:12 2024 +0530 platform/x86/amd/pmf: Fix TEE enact command failure after suspend and resume TEE enact command failures are seen after each suspend/resume cycle; fix this by cancelling the policy builder workqueue before going into suspend and reschedule the workqueue after resume. [ 629.516792] ccp 0000:c2:00.2: tee: command 0x5 timed out, disabling PSP [ 629.516835] amd-pmf AMDI0102:00: TEE enact cmd failed. err: ffff000e, ret:0 [ 630.550464] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_RESPONSE:1 [ 630.550511] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_ARGUMENT:7 [ 630.550548] amd-pmf AMDI0102:00: AMD_PMF_REGISTER_MESSAGE:16 Fixes: ae82cef7d9c5 ("platform/x86/amd/pmf: Add support for PMF-TA interaction") Co-developed-by: Patil Rajesh Reddy Signed-off-by: Patil Rajesh Reddy Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240216064112.962582-2-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3da01394c0f727baaee728de290eb1ecaad099fb Author: Shyam Sundar S K Date: Fri Feb 16 12:11:11 2024 +0530 platform/x86/amd/pmf: Remove smart_pc_status enum Improve code readability by removing smart_pc_status enum, as the same can be done with a simple true/false check; Update the code checks accordingly. Also add a missing return on amd_pmf_init_smart_pc() success, to skip trying to setup the auto / slider modes which should not be used in this case. Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240216064112.962582-1-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit f0ddb8a9021305e4e4e4179a2e47ecea6170d55d Author: Hans de Goede Date: Mon Feb 12 13:06:08 2024 +0100 platform/x86: touchscreen_dmi: Consolidate Goodix upside-down touchscreen data Now that prefix matches for ACPI names are supported, the ts_dmi_data structs for "GDIX1001:00" and "GDIX1001:01" can be consolidated into a single match matching on "GDIX1001". For consistency also change gdix1002_00_upside_down_data to match. Reviewed-by: Kuppuswamy Sathyanarayanan Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240212120608.30469-2-hdegoede@redhat.com commit dbcbfd662a725641d118fb3ae5ffb7be4e3d0fb0 Author: Hans de Goede Date: Mon Feb 12 13:06:07 2024 +0100 platform/x86: touchscreen_dmi: Allow partial (prefix) matches for ACPI names On some devices the ACPI name of the touchscreen is e.g. either MSSL1680:00 or MSSL1680:01 depending on the BIOS version. This happens for example on the "Chuwi Hi8 Air" tablet where the initial commit's ts_data uses "MSSL1680:00" but the tablets from the github issue and linux-hardware.org probe linked below both use "MSSL1680:01". Replace the strcmp() match on ts_data->acpi_name with a strstarts() check to allow using a partial match on just the ACPI HID of "MSSL1680" and change the ts_data->acpi_name for the "Chuwi Hi8 Air" accordingly to fix the touchscreen not working on models where it is "MSSL1680:01". Note this drops the length check for I2C_NAME_SIZE. This never was necessary since the ACPI names used are never more then 11 chars and I2C_NAME_SIZE is 20 so the replaced strncmp() would always stop long before reaching I2C_NAME_SIZE. Link: https://linux-hardware.org/?computer=AC4301C0542A Fixes: bbb97d728f77 ("platform/x86: touchscreen_dmi: Add info for the Chuwi Hi8 Air tablet") Closes: https://github.com/onitake/gsl-firmware/issues/91 Cc: stable@vger.kernel.org Reviewed-by: Kuppuswamy Sathyanarayanan Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240212120608.30469-1-hdegoede@redhat.com commit 8f812373d195810c68e1beeabe2317f8c6a31012 Author: Hans de Goede Date: Sat Feb 10 12:01:49 2024 +0100 platform/x86: intel: int0002_vgpio: Pass IRQF_ONESHOT to request_irq() Since commit 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI") the ACPI OSL code passes IRQF_ONESHOT when requesting the SCI. Since the INT0002 GPIO is typically shared with the ACPI SCI the INT0002 driver must pass the same flags. This fixes the INT0002 driver failing to probe due to following error + as well as removing the backtrace that follows this error: "genirq: Flags mismatch irq 9. 00000084 (INT0002) vs. 00002080 (acpi)" Fixes: 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240210110149.12803-1-hdegoede@redhat.com commit 6f7d0f5fd8e440c3446560100ac4ff9a55eec340 Author: Mark Pearson Date: Fri Feb 9 10:23:47 2024 -0500 platform/x86: think-lmi: Fix password opcode ordering for workstations The Lenovo workstations require the password opcode to be run before the attribute value is changed (if Admin password is enabled). Tested on some Thinkpads to confirm they are OK with this order too. Signed-off-by: Mark Pearson Fixes: 640a5fa50a42 ("platform/x86: think-lmi: Opcode support") Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240209152359.528919-1-mpearson-lenovo@squebb.ca Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5c138a8a4abe152fcbef1ed40a6a4b5727b2991b Author: Yafang Shao Date: Sat Feb 17 19:41:52 2024 +0800 selftests/bpf: Add negtive test cases for task iter Incorporate a test case to assess the handling of invalid flags or task__nullable parameters passed to bpf_iter_task_new(). Prior to the preceding commit, this scenario could potentially trigger a kernel panic. However, with the previous commit, this test case is expected to function correctly. Signed-off-by: Yafang Shao Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20240217114152.1623-3-laoar.shao@gmail.com commit 5f2ae606cb5a90839a9be9d22388c4200f820e75 Author: Yafang Shao Date: Sat Feb 17 19:41:51 2024 +0800 bpf: Fix an issue due to uninitialized bpf_iter_task Failure to initialize it->pos, coupled with the presence of an invalid value in the flags variable, can lead to it->pos referencing an invalid task, potentially resulting in a kernel panic. To mitigate this risk, it's crucial to ensure proper initialization of it->pos to NULL. Fixes: ac8148d957f5 ("bpf: bpf_iter_task_next: use next_task(kit->task) rather than next_task(kit->pos)") Signed-off-by: Yafang Shao Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Oleg Nesterov Link: https://lore.kernel.org/bpf/20240217114152.1623-2-laoar.shao@gmail.com commit 3f00e4a9c96f4488a924aff4e35b77c8eced897e Author: Martin KaFai Lau Date: Thu Feb 15 13:12:18 2024 -0800 selftests/bpf: Test racing between bpf_timer_cancel_and_free and bpf_timer_cancel This selftest is based on a Alexei's test adopted from an internal user to troubleshoot another bug. During this exercise, a separate racing bug was discovered between bpf_timer_cancel_and_free and bpf_timer_cancel. The details can be found in the previous patch. This patch is to add a selftest that can trigger the bug. I can trigger the UAF everytime in my qemu setup with KASAN. The idea is to have multiple user space threads running in a tight loop to exercise both bpf_map_update_elem (which calls into bpf_timer_cancel_and_free) and bpf_timer_cancel. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Hou Tao Link: https://lore.kernel.org/bpf/20240215211218.990808-2-martin.lau@linux.dev commit 0281b919e175bb9c3128bd3872ac2903e9436e3f Author: Martin KaFai Lau Date: Thu Feb 15 13:12:17 2024 -0800 bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel The following race is possible between bpf_timer_cancel_and_free and bpf_timer_cancel. It will lead a UAF on the timer->timer. bpf_timer_cancel(); spin_lock(); t = timer->time; spin_unlock(); bpf_timer_cancel_and_free(); spin_lock(); t = timer->timer; timer->timer = NULL; spin_unlock(); hrtimer_cancel(&t->timer); kfree(t); /* UAF on t */ hrtimer_cancel(&t->timer); In bpf_timer_cancel_and_free, this patch frees the timer->timer after a rcu grace period. This requires a rcu_head addition to the "struct bpf_hrtimer". Another kfree(t) happens in bpf_timer_init, this does not need a kfree_rcu because it is still under the spin_lock and timer->timer has not been visible by others yet. In bpf_timer_cancel, rcu_read_lock() is added because this helper can be used in a non rcu critical section context (e.g. from a sleepable bpf prog). Other timer->timer usages in helpers.c have been audited, bpf_timer_cancel() is the only place where timer->timer is used outside of the spin_lock. Another solution considered is to mark a t->flag in bpf_timer_cancel and clear it after hrtimer_cancel() is done. In bpf_timer_cancel_and_free, it busy waits for the flag to be cleared before kfree(t). This patch goes with a straight forward solution and frees timer->timer after a rcu grace period. Fixes: b00628b1c7d5 ("bpf: Introduce bpf timers.") Suggested-by: Alexei Starovoitov Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Hou Tao Link: https://lore.kernel.org/bpf/20240215211218.990808-1-martin.lau@linux.dev commit 40b9385dd8e6a0515e1c9cd06a277483556b7286 Author: Kees Cook Date: Fri Feb 16 15:30:05 2024 -0800 enic: Avoid false positive under FORTIFY_SOURCE FORTIFY_SOURCE has been ignoring 0-sized destinations while the kernel code base has been converted to flexible arrays. In order to enforce the 0-sized destinations (e.g. with __counted_by), the remaining 0-sized destinations need to be handled. Unfortunately, struct vic_provinfo resists full conversion, as it contains a flexible array of flexible arrays, which is only possible with the 0-sized fake flexible array. Use unsafe_memcpy() to avoid future false positives under CONFIG_FORTIFY_SOURCE. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 89a0dff6105e06067bdc57595982dbf6d6dd4959 Author: Jay Ajit Mate Date: Mon Feb 19 15:34:04 2024 +0530 ALSA: hda/realtek: Fix top speaker connection on Dell Inspiron 16 Plus 7630 The Dell Inspiron 16 Plus 7630, similar to its predecessors (7620 models), experiences an issue with unconnected top speakers. Since the controller remains unchanged, this commit addresses the problem by correctly connecting the speakers on NID 0X17 to the DAC on NIC 0x03. Signed-off-by: Jay Ajit Mate Cc: Link: https://lore.kernel.org/r/20240219100404.9573-1-jay.mate15@gmail.com Signed-off-by: Takashi Iwai commit daaf5286b6d2528a73c651aa2d4059bc1bd67c2e Author: Wentong Wu Date: Wed Feb 7 08:43:04 2024 +0800 mei: Add Meteor Lake support for IVSC device Add IVSC device support on Meteor Lake platform. Signed-off-by: Wentong Wu Cc: stable Reviewed-by: Sakari Ailus Acked-by: Tomas Winkler Link: https://lore.kernel.org/r/20240207004304.31862-1-wentong.wu@intel.com Signed-off-by: Greg Kroah-Hartman commit 8436f25802ec028ac7254990893f3e01926d9b79 Author: Alexander Usyskin Date: Sun Feb 11 12:39:12 2024 +0200 mei: me: add arrow lake point H DID Add Arrow Lake H device id. Cc: stable@vger.kernel.org Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20240211103912.117105-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 7a9b9012043e126f6d6f4683e67409312d1b707b Author: Alexander Usyskin Date: Sun Feb 11 12:39:11 2024 +0200 mei: me: add arrow lake point S DID Add Arrow Lake S device id. Cc: stable@vger.kernel.org Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20240211103912.117105-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 121e4dcba3700b30e63f25203d09ddfccbab4a09 Author: Shannon Nelson Date: Fri Feb 16 14:52:59 2024 -0800 ionic: use pci_is_enabled not open code Since there is a utility available for this, use the API rather than open code. Fixes: 13943d6c8273 ("ionic: prevent pci disable of already disabled device") Reviewed-by: Brett Creeley Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit b0ad381fa7690244802aed119b478b4bdafc31dd Author: Josef Bacik Date: Mon Feb 12 11:56:02 2024 -0500 btrfs: fix deadlock with fiemap and extent locking While working on the patchset to remove extent locking I got a lockdep splat with fiemap and pagefaulting with my new extent lock replacement lock. This deadlock exists with our normal code, we just don't have lockdep annotations with the extent locking so we've never noticed it. Since we're copying the fiemap extent to user space on every iteration we have the chance of pagefaulting. Because we hold the extent lock for the entire range we could mkwrite into a range in the file that we have mmap'ed. This would deadlock with the following stack trace [<0>] lock_extent+0x28d/0x2f0 [<0>] btrfs_page_mkwrite+0x273/0x8a0 [<0>] do_page_mkwrite+0x50/0xb0 [<0>] do_fault+0xc1/0x7b0 [<0>] __handle_mm_fault+0x2fa/0x460 [<0>] handle_mm_fault+0xa4/0x330 [<0>] do_user_addr_fault+0x1f4/0x800 [<0>] exc_page_fault+0x7c/0x1e0 [<0>] asm_exc_page_fault+0x26/0x30 [<0>] rep_movs_alternative+0x33/0x70 [<0>] _copy_to_user+0x49/0x70 [<0>] fiemap_fill_next_extent+0xc8/0x120 [<0>] emit_fiemap_extent+0x4d/0xa0 [<0>] extent_fiemap+0x7f8/0xad0 [<0>] btrfs_fiemap+0x49/0x80 [<0>] __x64_sys_ioctl+0x3e1/0xb50 [<0>] do_syscall_64+0x94/0x1a0 [<0>] entry_SYSCALL_64_after_hwframe+0x6e/0x76 I wrote an fstest to reproduce this deadlock without my replacement lock and verified that the deadlock exists with our existing locking. To fix this simply don't take the extent lock for the entire duration of the fiemap. This is safe in general because we keep track of where we are when we're searching the tree, so if an ordered extent updates in the middle of our fiemap call we'll still emit the correct extents because we know what offset we were on before. The only place we maintain the lock is searching delalloc. Since the delalloc stuff can change during writeback we want to lock the extent range so we have a consistent view of delalloc at the time we're checking to see if we need to set the delalloc flag. With this patch applied we no longer deadlock with my testcase. CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit e42b9d8b9ea2672811285e6a7654887ff64d23f3 Author: Qu Wenruo Date: Wed Feb 7 10:00:42 2024 +1030 btrfs: defrag: avoid unnecessary defrag caused by incorrect extent size [BUG] With the following file extent layout, defrag would do unnecessary IO and result more on-disk space usage. # mkfs.btrfs -f $dev # mount $dev $mnt # xfs_io -f -c "pwrite 0 40m" $mnt/foobar # sync # xfs_io -f -c "pwrite 40m 16k" $mnt/foobar # sync Above command would lead to the following file extent layout: item 6 key (257 EXTENT_DATA 0) itemoff 15816 itemsize 53 generation 7 type 1 (regular) extent data disk byte 298844160 nr 41943040 extent data offset 0 nr 41943040 ram 41943040 extent compression 0 (none) item 7 key (257 EXTENT_DATA 41943040) itemoff 15763 itemsize 53 generation 8 type 1 (regular) extent data disk byte 13631488 nr 16384 extent data offset 0 nr 16384 ram 16384 extent compression 0 (none) Which is mostly fine. We can allow the final 16K to be merged with the previous 40M, but it's upon the end users' preference. But if we defrag the file using the default parameters, it would result worse file layout: # btrfs filesystem defrag $mnt/foobar # sync item 6 key (257 EXTENT_DATA 0) itemoff 15816 itemsize 53 generation 7 type 1 (regular) extent data disk byte 298844160 nr 41943040 extent data offset 0 nr 8650752 ram 41943040 extent compression 0 (none) item 7 key (257 EXTENT_DATA 8650752) itemoff 15763 itemsize 53 generation 9 type 1 (regular) extent data disk byte 340787200 nr 33292288 extent data offset 0 nr 33292288 ram 33292288 extent compression 0 (none) item 8 key (257 EXTENT_DATA 41943040) itemoff 15710 itemsize 53 generation 8 type 1 (regular) extent data disk byte 13631488 nr 16384 extent data offset 0 nr 16384 ram 16384 extent compression 0 (none) Note the original 40M extent is still there, but a new 32M extent is created for no benefit at all. [CAUSE] There is an existing check to make sure we won't defrag a large enough extent (the threshold is by default 32M). But the check is using the length to the end of the extent: range_len = em->len - (cur - em->start); /* Skip too large extent */ if (range_len >= extent_thresh) goto next; This means, for the first 8MiB of the extent, the range_len is always smaller than the default threshold, and would not be defragged. But after the first 8MiB, the remaining part would fit the requirement, and be defragged. Such different behavior inside the same extent caused the above problem, and we should avoid different defrag decision inside the same extent. [FIX] Instead of using @range_len, just use @em->len, so that we have a consistent decision among the same file extent. Now with this fix, we won't touch the extent, thus not making it any worse. Reported-by: Filipe Manana Fixes: 0cb5950f3f3b ("btrfs: fix deadlock when reserving space during defrag") CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Boris Burkov Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 335126937753844d36036984e96a8f343538a778 Author: Matthew Auld Date: Thu Feb 15 17:44:32 2024 +0000 drm/tests/drm_buddy: fix 32b build Doesn't seem to compile on 32b, presumably due to u64 mod/division. Simplest is to just switch over to u32 here. Also make print modifiers consistent with that. Fixes: a64056bb5a32 ("drm/tests/drm_buddy: add alloc_contiguous test") Reported-by: Geert Uytterhoeven Signed-off-by: Matthew Auld Cc: Arunpravin Paneer Selvam Cc: Christian König Cc: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240215174431.285069-7-matthew.auld@intel.com Signed-off-by: Christian König commit 26c8404e162b43dddcb037ba2d0cb58c0ed60aab Author: Radhey Shyam Pandey Date: Fri Feb 16 23:44:57 2024 +0530 ata: ahci_ceva: fix error handling for Xilinx GT PHY support Platform clock and phy error resources are not cleaned up in Xilinx GT PHY error path. To fix introduce the function ceva_ahci_platform_enable_resources() which is a customized version of ahci_platform_enable_resources() and inline with SATA IP programming sequence it does: - Assert SATA reset - Program PS GTR phy - Bring SATA by de-asserting the reset - Wait for GT lane PLL to be locked ceva_ahci_platform_enable_resources() is also used in the resume path as the same SATA programming sequence (as in probe) should be followed. Also cleanup the mixed usage of ahci_platform_enable_resources() and custom implementation in the probe function as both are not required. Fixes: 9a9d3abe24bb ("ata: ahci: ceva: Update the driver to support xilinx GT phy") Signed-off-by: Radhey Shyam Pandey Reviewed-by: Damien Le Moal Signed-off-by: Niklas Cassel commit 9815e39617541ef52d0dfac4be274ad378c6dc09 Author: Andrey Jr. Melnikov Date: Wed Feb 14 17:57:57 2024 +0100 ahci: asm1064: correct count of reported ports The ASM1064 SATA host controller always reports wrongly, that it has 24 ports. But in reality, it only has four ports. before: ahci 0000:04:00.0: SSS flag set, parallel bus scan disabled ahci 0000:04:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xffff0f impl SATA mode ahci 0000:04:00.0: flags: 64bit ncq sntf stag pm led only pio sxs deso sadm sds apst after: ahci 0000:04:00.0: ASM1064 has only four ports ahci 0000:04:00.0: forcing port_map 0xffff0f -> 0xf ahci 0000:04:00.0: SSS flag set, parallel bus scan disabled ahci 0000:04:00.0: AHCI 0001.0301 32 slots 24 ports 6 Gbps 0xf impl SATA mode ahci 0000:04:00.0: flags: 64bit ncq sntf stag pm led only pio sxs deso sadm sds apst Signed-off-by: "Andrey Jr. Melnikov" Signed-off-by: Niklas Cassel commit cd65c48d66920457129584553f217005d09b1edb Author: Hangbin Liu Date: Thu Feb 15 10:33:25 2024 +0800 selftests: bonding: set active slave to primary eth1 specifically In bond priority testing, we set the primary interface to eth1 and add eth0,1,2 to bond in serial. This is OK in normal times. But when in debug kernel, the bridge port that eth0,1,2 connected would start slowly (enter blocking, forwarding state), which caused the primary interface down for a while after enslaving and active slave changed. Here is a test log from Jakub's debug test[1]. [ 400.399070][ T50] br0: port 1(s0) entered disabled state [ 400.400168][ T50] br0: port 4(s2) entered disabled state [ 400.941504][ T2791] bond0: (slave eth0): making interface the new active one [ 400.942603][ T2791] bond0: (slave eth0): Enslaving as an active interface with an up link [ 400.943633][ T2766] br0: port 1(s0) entered blocking state [ 400.944119][ T2766] br0: port 1(s0) entered forwarding state [ 401.128792][ T2792] bond0: (slave eth1): making interface the new active one [ 401.130771][ T2792] bond0: (slave eth1): Enslaving as an active interface with an up link [ 401.131643][ T69] br0: port 2(s1) entered blocking state [ 401.132067][ T69] br0: port 2(s1) entered forwarding state [ 401.346201][ T2793] bond0: (slave eth2): Enslaving as a backup interface with an up link [ 401.348414][ T50] br0: port 4(s2) entered blocking state [ 401.348857][ T50] br0: port 4(s2) entered forwarding state [ 401.519669][ T250] bond0: (slave eth0): link status definitely down, disabling slave [ 401.526522][ T250] bond0: (slave eth1): link status definitely down, disabling slave [ 401.526986][ T250] bond0: (slave eth2): making interface the new active one [ 401.629470][ T250] bond0: (slave eth0): link status definitely up [ 401.630089][ T250] bond0: (slave eth1): link status definitely up [...] # TEST: prio (active-backup ns_ip6_target primary_reselect 1) [FAIL] # Current active slave is eth2 but not eth1 Fix it by setting active slave to primary slave specifically before testing. [1] https://netdev-3.bots.linux.dev/vmksft-bonding-dbg/results/464301/1-bond-options-sh/stdout Fixes: 481b56e0391e ("selftests: bonding: re-format bond option tests") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 3b69e32e151bc4a4e3c785cbdb1f918d5ee337ed Author: Lino Sanfilippo Date: Fri Feb 16 23:47:08 2024 +0100 serial: amba-pl011: Fix DMA transmission in RS485 mode When DMA is used in RS485 mode make sure that the UARTs tx section is enabled before the DMA buffers are queued for transmission. Cc: stable@vger.kernel.org Fixes: 8d479237727c ("serial: amba-pl011: add RS485 support") Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20240216224709.9928-2-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman commit f418ae73311deb901c0110b08d1bbafc20c1820e Author: Lino Sanfilippo Date: Fri Feb 16 23:47:07 2024 +0100 serial: stm32: do not always set SER_RS485_RX_DURING_TX if RS485 is enabled Before commit 07c30ea5861f ("serial: Do not hold the port lock when setting rx-during-tx GPIO") the SER_RS485_RX_DURING_TX flag was only set if the rx-during-tx mode was not controlled by a GPIO. Now the flag is set unconditionally when RS485 is enabled. This results in an incorrect setting if the rx-during-tx GPIO is not asserted. Fix this by setting the flag only if the rx-during-tx mode is not controlled by a GPIO and thus restore the correct behaviour. Cc: stable@vger.kernel.org # 6.6+ Fixes: 07c30ea5861f ("serial: Do not hold the port lock when setting rx-during-tx GPIO") Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20240216224709.9928-1-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman commit 8b79d4e994074a058b6876dce843ee112656258d Author: Palmer Dabbelt Date: Wed Feb 14 07:34:30 2024 -0800 tty: hvc: Don't enable the RISC-V SBI console by default The new SBI console has the same problem as the old one: there's only one shared backing hardware and no synchronization, so the two drivers end up stepping on each other. This was the same issue the old SBI-0.1 console drivers had, but that was disabled by default when SBI-0.1 was. So just mark the new driver as nonportable. Reported-by: Emil Renner Berthing Fixes: 88ead68e764c ("tty: Add SBI debug console support to HVC SBI driver") Signed-off-by: Palmer Dabbelt Reviewed-by: Paul Walmsley Reviewed-by: Anup Patel Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240214153429.16484-2-palmer@rivosinc.com Signed-off-by: Greg Kroah-Hartman commit bd915ae73a2d78559b376ad2caf5e4ef51de2455 Author: Martin Blumenstingl Date: Thu Feb 15 23:04:42 2024 +0100 drm/meson: Don't remove bridges which are created by other drivers Stop calling drm_bridge_remove() for bridges allocated/managed by other drivers in the remove paths of meson_encoder_{cvbs,dsi,hdmi}. drm_bridge_remove() unregisters the bridge so it cannot be used anymore. Doing so for bridges we don't own can lead to the video pipeline not being able to come up after -EPROBE_DEFER of the VPU because we're unregistering a bridge that's managed by another driver. The other driver doesn't know that we have unregistered it's bridge and on subsequent .probe() we're not able to find those bridges anymore (since nobody re-creates them). This fixes probe errors on Meson8b boards with the CVBS outputs enabled. Fixes: 09847723c12f ("drm/meson: remove drm bridges at aggregate driver unbind time") Fixes: 42dcf15f901c ("drm/meson: add DSI encoder") Cc: Reported-by: Steve Morvai Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Tested-by: Steve Morvai Link: https://lore.kernel.org/r/20240215220442.1343152-1-martin.blumenstingl@googlemail.com Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240215220442.1343152-1-martin.blumenstingl@googlemail.com commit 84b6238aff3db8f4fa72bc5e451ba34ce288d30a Author: Guenter Roeck Date: Thu Feb 15 12:20:39 2024 -0800 MAINTAINERS: Drop myself as maintainer of TYPEC port controller drivers I am no longer involved in Type-C development and not really current on its status and progress. Recently I have been doing more damage than good. It is time to go. Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20240215202039.1982539-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 76c51146820c5dac629f21deafab0a7039bc3ccd Author: Krishna Kurapati Date: Mon Feb 5 13:16:50 2024 +0530 usb: gadget: ncm: Avoid dropping datagrams of properly parsed NTBs It is observed sometimes when tethering is used over NCM with Windows 11 as host, at some instances, the gadget_giveback has one byte appended at the end of a proper NTB. When the NTB is parsed, unwrap call looks for any leftover bytes in SKB provided by u_ether and if there are any pending bytes, it treats them as a separate NTB and parses it. But in case the second NTB (as per unwrap call) is faulty/corrupt, all the datagrams that were parsed properly in the first NTB and saved in rx_list are dropped. Adding a few custom traces showed the following: [002] d..1 7828.532866: dwc3_gadget_giveback: ep1out: req 000000003868811a length 1025/16384 zsI ==> 0 [002] d..1 7828.532867: ncm_unwrap_ntb: K: ncm_unwrap_ntb toprocess: 1025 [002] d..1 7828.532867: ncm_unwrap_ntb: K: ncm_unwrap_ntb nth: 1751999342 [002] d..1 7828.532868: ncm_unwrap_ntb: K: ncm_unwrap_ntb seq: 0xce67 [002] d..1 7828.532868: ncm_unwrap_ntb: K: ncm_unwrap_ntb blk_len: 0x400 [002] d..1 7828.532868: ncm_unwrap_ntb: K: ncm_unwrap_ntb ndp_len: 0x10 [002] d..1 7828.532869: ncm_unwrap_ntb: K: Parsed NTB with 1 frames In this case, the giveback is of 1025 bytes and block length is 1024. The rest 1 byte (which is 0x00) won't be parsed resulting in drop of all datagrams in rx_list. Same is case with packets of size 2048: [002] d..1 7828.557948: dwc3_gadget_giveback: ep1out: req 0000000011dfd96e length 2049/16384 zsI ==> 0 [002] d..1 7828.557949: ncm_unwrap_ntb: K: ncm_unwrap_ntb nth: 1751999342 [002] d..1 7828.557950: ncm_unwrap_ntb: K: ncm_unwrap_ntb blk_len: 0x800 Lecroy shows one byte coming in extra confirming that the byte is coming in from PC: Transfer 2959 - Bytes Transferred(1025) Timestamp((18.524 843 590) - Transaction 8391 - Data(1025 bytes) Timestamp(18.524 843 590) --- Packet 4063861 Data(1024 bytes) Duration(2.117us) Idle(14.700ns) Timestamp(18.524 843 590) --- Packet 4063863 Data(1 byte) Duration(66.160ns) Time(282.000ns) Timestamp(18.524 845 722) According to Windows driver, no ZLP is needed if wBlockLength is non-zero, because the non-zero wBlockLength has already told the function side the size of transfer to be expected. However, there are in-market NCM devices that rely on ZLP as long as the wBlockLength is multiple of wMaxPacketSize. To deal with such devices, it pads an extra 0 at end so the transfer is no longer multiple of wMaxPacketSize. Cc: Fixes: 9f6ce4240a2b ("usb: gadget: f_ncm.c added") Signed-off-by: Krishna Kurapati Reviewed-by: Maciej Żenczykowski Link: https://lore.kernel.org/r/20240205074650.200304-1-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 23b1d2d99b0f55326f05e7d757fa197c4a95dc5c Author: Ondrej Jirman Date: Sat Feb 17 17:20:21 2024 +0100 Revert "usb: typec: tcpm: reset counter when enter into unattached state after try role" The reverted commit makes the state machine only ever go from SRC_ATTACH_WAIT to SNK_TRY in endless loop when toggling. After revert it goes to SRC_ATTACHED after initially trying SNK_TRY earlier, as it should for toggling to ever detect the power source mode and the port is again able to provide power to attached power sinks. This reverts commit 2d6d80127006ae3da26b1f21a65eccf957f2d1e5. Cc: stable@vger.kernel.org Fixes: 2d6d80127006 ("usb: typec: tcpm: reset counter when enter into unattached state after try role") Signed-off-by: Ondrej Jirman Link: https://lore.kernel.org/r/20240217162023.1719738-1-megi@xff.cz Signed-off-by: Greg Kroah-Hartman commit 858a74cb512833e276d96a72acb560ce8c138bec Author: Aaro Koskinen Date: Sat Feb 17 21:20:42 2024 +0200 usb: gadget: omap_udc: fix USB gadget regression on Palm TE When upgrading from 6.1 LTS to 6.6 LTS, I noticed the ethernet gadget stopped working on Palm TE. Commit 8825acd7cc8a ("ARM: omap1: remove dead code") deleted Palm TE from machine_without_vbus_sense(), although the board is still used. Fix that. Fixes: 8825acd7cc8a ("ARM: omap1: remove dead code") Cc: stable Signed-off-by: Aaro Koskinen Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240217192042.GA372205@darkstar.musicnaut.iki.fi Signed-off-by: Greg Kroah-Hartman commit b191a18cb5c47109ca696370a74a5062a70adfd0 Author: Thinh Nguyen Date: Fri Feb 16 00:41:02 2024 +0000 usb: dwc3: gadget: Don't disconnect if not started Don't go through soft-disconnection sequence if the controller hasn't started. Otherwise, there will be timeout and warning reports from the soft-disconnection flow. Cc: stable@vger.kernel.org Fixes: 61a348857e86 ("usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend") Reported-by: Marek Szyprowski Closes: https://lore.kernel.org/linux-usb/20240215233536.7yejlj3zzkl23vjd@synopsys.com/T/#mb0661cd5f9272602af390c18392b9a36da4f96e6 Tested-by: Marek Szyprowski Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/e3be9b929934e0680a6f4b8f6eb11b18ae9c7e07.1708043922.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 5fd9e45f1ebcd57181358af28506e8a661a260b3 Author: Frank Li Date: Fri Feb 2 10:42:17 2024 -0500 usb: cdns3: fix memory double free when handle zero packet 829 if (request->complete) { 830 spin_unlock(&priv_dev->lock); 831 usb_gadget_giveback_request(&priv_ep->endpoint, 832 request); 833 spin_lock(&priv_dev->lock); 834 } 835 836 if (request->buf == priv_dev->zlp_buf) 837 cdns3_gadget_ep_free_request(&priv_ep->endpoint, request); Driver append an additional zero packet request when queue a packet, which length mod max packet size is 0. When transfer complete, run to line 831, usb_gadget_giveback_request() will free this requestion. 836 condition is true, so cdns3_gadget_ep_free_request() free this request again. Log: [ 1920.140696][ T150] BUG: KFENCE: use-after-free read in cdns3_gadget_giveback+0x134/0x2c0 [cdns3] [ 1920.140696][ T150] [ 1920.151837][ T150] Use-after-free read at 0x000000003d1cd10b (in kfence-#36): [ 1920.159082][ T150] cdns3_gadget_giveback+0x134/0x2c0 [cdns3] [ 1920.164988][ T150] cdns3_transfer_completed+0x438/0x5f8 [cdns3] Add check at line 829, skip call usb_gadget_giveback_request() if it is additional zero length packet request. Needn't call usb_gadget_giveback_request() because it is allocated in this driver. Cc: stable@vger.kernel.org Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Frank Li Reviewed-by: Roger Quadros Acked-by: Peter Chen Link: https://lore.kernel.org/r/20240202154217.661867-2-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit cd45f99034b0c8c9cb346dd0d6407a95ca3d36f6 Author: Frank Li Date: Fri Feb 2 10:42:16 2024 -0500 usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable() ... cdns3_gadget_ep_free_request(&priv_ep->endpoint, &priv_req->request); list_del_init(&priv_req->list); ... 'priv_req' actually free at cdns3_gadget_ep_free_request(). But list_del_init() use priv_req->list after it. [ 1542.642868][ T534] BUG: KFENCE: use-after-free read in __list_del_entry_valid+0x10/0xd4 [ 1542.642868][ T534] [ 1542.653162][ T534] Use-after-free read at 0x000000009ed0ba99 (in kfence-#3): [ 1542.660311][ T534] __list_del_entry_valid+0x10/0xd4 [ 1542.665375][ T534] cdns3_gadget_ep_disable+0x1f8/0x388 [cdns3] [ 1542.671571][ T534] usb_ep_disable+0x44/0xe4 [ 1542.675948][ T534] ffs_func_eps_disable+0x64/0xc8 [ 1542.680839][ T534] ffs_func_set_alt+0x74/0x368 [ 1542.685478][ T534] ffs_func_disable+0x18/0x28 Move list_del_init() before cdns3_gadget_ep_free_request() to resolve this problem. Cc: stable@vger.kernel.org Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Frank Li Reviewed-by: Roger Quadros Acked-by: Peter Chen Link: https://lore.kernel.org/r/20240202154217.661867-1-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit b787a3e781759026a6212736ef8e52cf83d1821a Author: Xu Yang Date: Mon Jan 29 17:37:39 2024 +0800 usb: roles: don't get/set_role() when usb_role_switch is unregistered There is a possibility that usb_role_switch device is unregistered before the user put usb_role_switch. In this case, the user may still want to get/set_role() since the user can't sense the changes of usb_role_switch. This will add a flag to show if usb_role_switch is already registered and avoid unwanted behaviors. Fixes: fde0aa6c175a ("usb: common: Small class for USB role switches") cc: stable@vger.kernel.org Signed-off-by: Xu Yang Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240129093739.2371530-2-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 1c9be13846c0b2abc2480602f8ef421360e1ad9e Author: Xu Yang Date: Mon Jan 29 17:37:38 2024 +0800 usb: roles: fix NULL pointer issue when put module's reference In current design, usb role class driver will get usb_role_switch parent's module reference after the user get usb_role_switch device and put the reference after the user put the usb_role_switch device. However, the parent device of usb_role_switch may be removed before the user put the usb_role_switch. If so, then, NULL pointer issue will be met when the user put the parent module's reference. This will save the module pointer in structure of usb_role_switch. Then, we don't need to find module by iterating long relations. Fixes: 5c54fcac9a9d ("usb: roles: Take care of driver module reference counting") cc: stable@vger.kernel.org Signed-off-by: Xu Yang Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240129093739.2371530-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 47625b018c6bc788bc10dd654c82696eb0a5ef11 Author: Pawel Laszczak Date: Thu Feb 15 13:16:09 2024 +0100 usb: cdnsp: fixed issue with incorrect detecting CDNSP family controllers Cadence have several controllers from 0x000403xx family but current driver suuport detecting only one with DID equal 0x0004034E. It causes that if someone uses different CDNSP controller then driver will use incorrect version and register space. Patch fix this issue. cc: stable@vger.kernel.org Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20240215121609.259772-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman commit 18a6be674306c9acb05c08e5c3fd376ef50a917c Author: Pawel Laszczak Date: Tue Feb 6 11:40:18 2024 +0100 usb: cdnsp: blocked some cdns3 specific code host.c file has some parts of code that were introduced for CDNS3 driver and should not be used with CDNSP driver. This patch blocks using these parts of codes by CDNSP driver. These elements include: - xhci_plat_cdns3_xhci object - cdns3 specific XECP_PORT_CAP_REG register - cdns3 specific XECP_AUX_CTRL_REG1 register cc: stable@vger.kernel.org Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20240206104018.48272-1-pawell@cadence.com Signed-off-by: Greg Kroah-Hartman commit 77ce96543b03f437c6b45f286d8110db2b6622a3 Author: Takashi Sakamoto Date: Sun Feb 18 12:30:26 2024 +0900 ALSA: firewire-lib: fix to check cycle continuity The local helper function to compare the given pair of cycle count evaluates them. If the left value is less than the right value, the function returns negative value. If the safe cycle is less than the current cycle, it is the case of cycle lost. However, it is not currently handled properly. This commit fixes the bug. Cc: Fixes: 705794c53b00 ("ALSA: firewire-lib: check cycle continuity") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20240218033026.72577-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit d70c7a6614ac2e1340a9fed044aec04d695c6645 Author: Andreas Larsson Date: Mon Jan 29 08:50:56 2024 +0100 usb: uhci-grlib: Explicitly include linux/platform_device.h This fixes relying upon linux/of_platform.h to include linux/platform_device.h, which it no longer does, thereby fixing compilation problems like: In file included from drivers/usb/host/uhci-hcd.c:850: drivers/usb/host/uhci-grlib.c: In function 'uhci_hcd_grlib_probe': drivers/usb/host/uhci-grlib.c:92:29: error: invalid use of undefined type 'struct platform_device' 92 | struct device_node *dn = op->dev.of_node; | ^~ Fixes: ef175b29a242 ("of: Stop circularly including of_device.h and of_platform.h") Signed-off-by: Andreas Larsson Link: https://lore.kernel.org/r/20240129075056.1511630-1-andreas@gaisler.com Signed-off-by: Greg Kroah-Hartman commit a5c57fd2e9bd1c8ea8613a8f94fd0be5eccbf321 Author: Gaurav Batra Date: Thu Feb 15 16:18:33 2024 -0600 powerpc/pseries/iommu: DLPAR add doesn't completely initialize pci_controller When a PCI device is dynamically added, the kernel oopses with a NULL pointer dereference: BUG: Kernel NULL pointer dereference on read at 0x00000030 Faulting instruction address: 0xc0000000006bbe5c Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries Modules linked in: rpadlpar_io rpaphp rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs xsk_diag bonding nft_compat nf_tables nfnetlink rfkill binfmt_misc dm_multipath rpcrdma sunrpc rdma_ucm ib_srpt ib_isert iscsi_target_mod target_core_mod ib_umad ib_iser libiscsi scsi_transport_iscsi ib_ipoib rdma_cm iw_cm ib_cm mlx5_ib ib_uverbs ib_core pseries_rng drm drm_panel_orientation_quirks xfs libcrc32c mlx5_core mlxfw sd_mod t10_pi sg tls ibmvscsi ibmveth scsi_transport_srp vmx_crypto pseries_wdt psample dm_mirror dm_region_hash dm_log dm_mod fuse CPU: 17 PID: 2685 Comm: drmgr Not tainted 6.7.0-203405+ #66 Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_008) hv:phyp pSeries NIP: c0000000006bbe5c LR: c000000000a13e68 CTR: c0000000000579f8 REGS: c00000009924f240 TRAP: 0300 Not tainted (6.7.0-203405+) MSR: 8000000000009033 CR: 24002220 XER: 20040006 CFAR: c000000000a13e64 DAR: 0000000000000030 DSISR: 40000000 IRQMASK: 0 ... NIP sysfs_add_link_to_group+0x34/0x94 LR iommu_device_link+0x5c/0x118 Call Trace: iommu_init_device+0x26c/0x318 (unreliable) iommu_device_link+0x5c/0x118 iommu_init_device+0xa8/0x318 iommu_probe_device+0xc0/0x134 iommu_bus_notifier+0x44/0x104 notifier_call_chain+0xb8/0x19c blocking_notifier_call_chain+0x64/0x98 bus_notify+0x50/0x7c device_add+0x640/0x918 pci_device_add+0x23c/0x298 of_create_pci_dev+0x400/0x884 of_scan_pci_dev+0x124/0x1b0 __of_scan_bus+0x78/0x18c pcibios_scan_phb+0x2a4/0x3b0 init_phb_dynamic+0xb8/0x110 dlpar_add_slot+0x170/0x3b8 [rpadlpar_io] add_slot_store.part.0+0xb4/0x130 [rpadlpar_io] kobj_attr_store+0x2c/0x48 sysfs_kf_write+0x64/0x78 kernfs_fop_write_iter+0x1b0/0x290 vfs_write+0x350/0x4a0 ksys_write+0x84/0x140 system_call_exception+0x124/0x330 system_call_vectored_common+0x15c/0x2ec Commit a940904443e4 ("powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains") broke DLPAR add of PCI devices. The above added iommu_device structure to pci_controller. During system boot, PCI devices are discovered and this newly added iommu_device structure is initialized by a call to iommu_device_register(). During DLPAR add of a PCI device, a new pci_controller structure is allocated but there are no calls made to iommu_device_register() interface. Fix is to register the iommu device during DLPAR add as well. Fixes: a940904443e4 ("powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains") Signed-off-by: Gaurav Batra Reviewed-by: Brian King Signed-off-by: Michael Ellerman Link: https://msgid.link/20240215221833.4817-1-gbatra@linux.ibm.com commit b401b621758e46812da61fa58a67c3fd8d91de0d Author: Linus Torvalds Date: Sun Feb 18 12:56:25 2024 -0800 Linux 6.8-rc5 commit 6c160f16be5df1f66f6afe186c961ad446d7f94b Merge: ddac3d8b8a48d a951884d82886 Author: Linus Torvalds Date: Sun Feb 18 10:09:25 2024 -0800 Merge tag 'kbuild-fixes-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Reformat nested if-conditionals in Makefiles with 4 spaces - Fix CONFIG_DEBUG_INFO_BTF builds for big endian - Fix modpost for module srcversion - Fix an escape sequence warning in gen_compile_commands.py - Fix kallsyms to ignore ARMv4 thunk symbols * tag 'kbuild-fixes-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kallsyms: ignore ARMv4 thunks along with others modpost: trim leading spaces when processing source files list gen_compile_commands: fix invalid escape sequence warning kbuild: Fix changing ELF file type for output of gen_btf for big endian docs: kconfig: Fix grammar and formatting kbuild: use 4-space indentation when followed by conditionals commit ddac3d8b8a48dda6447a7f7a15f8124020a5add2 Merge: 7cb7c32d60ad2 d794734c9bbfe Author: Linus Torvalds Date: Sun Feb 18 09:22:48 2024 -0800 Merge tag 'x86_urgent_for_v6.8_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Borislav Petkov: - Use a GB page for identity mapping only when memory of this size is requested so that mapping of reserved regions is prevented which would otherwise lead to system crashes on UV machines * tag 'x86_urgent_for_v6.8_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/ident_map: Use gbpages only where full GB page should be mapped. commit 7cb7c32d60ad2dea48b7ac2845d86f10b0be089e Merge: 626721edeebd9 af9acbfc2c4b7 Author: Linus Torvalds Date: Sun Feb 18 09:14:12 2024 -0800 Merge tag 'irq_urgent_for_v6.8_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Borislav Petkov: - Fix GICv4.1 affinity update - Restore a quirk for ACPI-based GICv4 systems - Handle non-coherent GICv4 redistributors properly - Prevent spurious interrupts on Broadcom devices using GIC v3 architecture - Other minor fixes * tag 'irq_urgent_for_v6.8_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3-its: Fix GICv4.1 VPE affinity update irqchip/gic-v3-its: Restore quirk probing for ACPI-based systems irqchip/gic-v3-its: Handle non-coherent GICv4 redistributors irqchip/qcom-mpm: Fix IS_ERR() vs NULL check in qcom_mpm_init() irqchip/loongson-eiointc: Use correct struct type in eiointc_domain_alloc() irqchip/irq-brcmstb-l2: Add write memory barrier before exit commit 626721edeebd90df65691aed0df251b63c4ca4e2 Merge: c02197fc9076e 67ec505fae324 Author: Linus Torvalds Date: Sun Feb 18 09:08:57 2024 -0800 Merge tag 'i2c-for-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Two fixes for i801 and qcom-geni devices. Meanwhile, a fix from Arnd addresses a compilation error encountered during compile test on powerpc" * tag 'i2c-for-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: i801: Fix block process call transactions i2c: pasemi: split driver into two separate modules i2c: qcom-geni: Correct I2C TRE sequence commit ee710bbcad48fa930bd563340e7845f5051db40e Merge: 398b7c3770c23 f120e62e37f0a Author: David S. Miller Date: Sun Feb 18 11:32:10 2024 +0000 Merge branch 'bcmasp-fixes' Justin Chen says: ==================== net: bcmasp: bug fixes for bcmasp Fix two bugs. - Indicate that PM is managed by mac to prevent double pm calls. This doesn't lead to a crash, but waste a noticable amount of time suspending/resuming. - Sanity check for OOB write was off by one. Leading to a false error when using the full array. ==================== Signed-off-by: David S. Miller commit f120e62e37f0af4c4cbe08e5a88ea60a6a17c858 Author: Justin Chen Date: Thu Feb 15 10:27:32 2024 -0800 net: bcmasp: Sanity check is off by one A sanity check for OOB write is off by one leading to a false positive when the array is full. Fixes: 9b90aca97f6d ("net: ethernet: bcmasp: fix possible OOB write in bcmasp_netfilt_get_all_active()") Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5b76d928f8b779a1b19c5842e7cabee4cbb610c3 Author: Florian Fainelli Date: Thu Feb 15 10:27:31 2024 -0800 net: bcmasp: Indicate MAC is in charge of PHY PM Avoid the PHY library call unnecessarily into the suspend/resume functions by setting phydev->mac_managed_pm to true. The ASP driver essentially does exactly what mdio_bus_phy_resume() does. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Signed-off-by: Florian Fainelli Signed-off-by: Justin Chen Signed-off-by: David S. Miller commit 398b7c3770c23de9a7d1a680960025fa8b014784 Merge: 59a646d6c7e42 4103d8480866f Author: David S. Miller Date: Sun Feb 18 10:25:01 2024 +0000 Merge branch 'mptcp-fixes' Matthieu Baerts says: ==================== mptcp: misc. fixes for v6.8 This series includes 4 types of fixes: Patches 1 and 2 force the path-managers not to allocate a new address entry when dealing with the "special" ID 0, reserved to the address of the initial subflow. These patches can be backported up to v5.19 and v5.12 respectively. Patch 3 to 6 fix the in-kernel path-manager not to create duplicated subflows. Patch 6 is the main fix, but patches 3 to 5 are some kind of pre-requisities: they fix some data races that could also lead to the creation of unexpected subflows. These patches can be backported up to v5.7, v5.10, v6.0, and v5.15 respectively. Note that patch 3 modifies the existing ULP API. No better solutions have been found for -net, and there is some similar prior art, see commit 0df48c26d841 ("tcp: add tcpi_bytes_acked to tcp_info"). Please also note that TLS ULP Diag has likely the same issue. Patches 7 to 9 fix issues in the selftests, when executing them on older kernels, e.g. when testing the last version of these kselftests on the v5.15.148 kernel as it is done by LKFT when validating stable kernels. These patches only avoid printing expected errors the console and marking some tests as "OK" while they have been skipped. Patches 7 and 8 can be backported up to v6.6. Patches 10 to 13 make sure all MPTCP selftests subtests have a unique name. It is important to have a unique (sub)test name in TAP, because that's the test identifier. Some CI environments might drop tests with duplicated names. Patches 10 to 12 can be backported up to v6.6. ==================== Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 4103d8480866fe5abb71ef0ed8af3a3b7b9625bf Author: Matthieu Baerts (NGI0) Date: Thu Feb 15 19:25:40 2024 +0100 selftests: mptcp: diag: unique 'cestab' subtest names It is important to have a unique (sub)test name in TAP, because some CI environments drop tests with duplicated name. Some 'cestab' subtests from the diag selftest had the same names, e.g.: ....chk 0 cestab Now the previous value is taken, to have different names, e.g.: ....chk 2->0 cestab after flush While at it, the 'after flush' info is added, similar to what is done with the 'in use' subtests. Also inspired by these 'in use' subtests, 'many' is displayed instead of a large number: many msk socket present [ ok ] ....chk many msk in use [ ok ] ....chk many cestab [ ok ] ....chk many->0 msk in use after flush [ ok ] ....chk many->0 cestab after flush [ ok ] Fixes: 81ab772819da ("selftests: mptcp: diag: check CURRESTAB counters") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 645c1dc965ef6b5554e5e69737bb179c7a0f872f Author: Matthieu Baerts (NGI0) Date: Thu Feb 15 19:25:39 2024 +0100 selftests: mptcp: diag: unique 'in use' subtest names It is important to have a unique (sub)test name in TAP, because some CI environments drop tests with duplicated name. Some 'in use' subtests from the diag selftest had the same names, e.g.: chk 0 msk in use after flush Now the previous value is taken, to have different names, e.g.: chk 2->0 msk in use after flush While at it, avoid repeating the full message, declare it once in the helper. Fixes: ce9902573652 ("selftests: mptcp: diag: format subtests results in TAP") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 2ef0d804c090658960c008446523863fd7e3541e Author: Matthieu Baerts (NGI0) Date: Thu Feb 15 19:25:38 2024 +0100 selftests: mptcp: userspace_pm: unique subtest names It is important to have a unique (sub)test name in TAP, because some CI environments drop tests with duplicated names. Some subtests from the userspace_pm selftest had the same names. That's because different subflows are created (and deleted) between the same pair of IP addresses. Simply adding the destination port in the name is then enough to have different names, because the destination port is always different. Note that adding such info takes a bit more space, so we need to increase a bit the width to print the name, simply to keep all the '[ OK ]' aligned as before. Fixes: f589234e1af0 ("selftests: mptcp: userspace_pm: format subtests results in TAP") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 4d8e0dde0403b5a86aa83e243f020711a9c3e31f Author: Matthieu Baerts (NGI0) Date: Thu Feb 15 19:25:37 2024 +0100 selftests: mptcp: simult flows: fix some subtest names The selftest was correctly recording all the results, but the 'reverse direction' part was missing in the name when needed. It is important to have a unique (sub)test name in TAP, because some CI environments drop tests with duplicated name. Fixes: 675d99338e7a ("selftests: mptcp: simult flows: format subtests results in TAP") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 694bd45980a61045eb5ec07799e3b94c76db830e Author: Matthieu Baerts (NGI0) Date: Thu Feb 15 19:25:36 2024 +0100 selftests: mptcp: diag: fix bash warnings on older kernels Since the 'Fixes' commit mentioned below, the command that is executed in __chk_nr() helper can return nothing if the feature is not supported. This is the case when the MPTCP CURRESTAB counter is not supported. To avoid this warning ... ./diag.sh: line 65: [: !=: unary operator expected ... we just need to surround '$nr' with double quotes, to support an empty string when the feature is not supported. Fixes: 81ab772819da ("selftests: mptcp: diag: check CURRESTAB counters") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 662f084f3396d8a804d56cb53ac05c9e39902a7b Author: Matthieu Baerts (NGI0) Date: Thu Feb 15 19:25:35 2024 +0100 selftests: mptcp: pm nl: avoid error msg on older kernels Since the 'Fixes' commit mentioned below, and if the kernel being tested doesn't support the 'fullmesh' flag, this error will be printed: netlink error -22 (Invalid argument) ./pm_nl_ctl: bailing out due to netlink error[s] But that can be normal if the kernel doesn't support the feature, no need to print this worrying error message while everything else looks OK. So we can mute stderr. Failures will still be detected if any. Fixes: 1dc88d241f92 ("selftests: mptcp: pm_nl_ctl: always look for errors") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit d2a2547565a9f1ad7989f7e21f97cbf065a9390d Author: Matthieu Baerts (NGI0) Date: Thu Feb 15 19:25:34 2024 +0100 selftests: mptcp: pm nl: also list skipped tests If the feature is not supported by older kernels, and instead of just ignoring some tests, we should mark them as skipped, so we can still track them. Fixes: d85555ac11f9 ("selftests: mptcp: pm_netlink: format subtests results in TAP") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 045e9d812868a2d80b7a57b224ce8009444b7bbc Author: Paolo Abeni Date: Thu Feb 15 19:25:33 2024 +0100 mptcp: fix duplicate subflow creation Fullmesh endpoints could end-up unexpectedly generating duplicate subflows - same local and remote addresses - when multiple incoming ADD_ADDR are processed before the PM creates the subflow for the local endpoints. Address the issue explicitly checking for duplicates at subflow creation time. To avoid a quadratic computational complexity, track the unavailable remote address ids in a temporary bitmap and initialize such bitmap with the remote ids of all the existing subflows matching the local address currently processed. The above allows additionally replacing the existing code checking for duplicate entry in the current set with a simple bit test operation. Fixes: 2843ff6f36db ("mptcp: remote addresses fullmesh") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/435 Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 967d3c27127e71a10ff5c083583a038606431b61 Author: Paolo Abeni Date: Thu Feb 15 19:25:32 2024 +0100 mptcp: fix data races on remote_id Similar to the previous patch, address the data race on remote_id, adding the suitable ONCE annotations. Fixes: bedee0b56113 ("mptcp: address lookup improvements") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit a7cfe776637004a4c938fde78be4bd608c32c3ef Author: Paolo Abeni Date: Thu Feb 15 19:25:31 2024 +0100 mptcp: fix data races on local_id The local address id is accessed lockless by the NL PM, add all the required ONCE annotation. There is a caveat: the local id can be initialized late in the subflow life-cycle, and its validity is controlled by the local_id_valid flag. Remove such flag and encode the validity in the local_id field itself with negative value before initialization. That allows accessing the field consistently with a single read operation. Fixes: 0ee4261a3681 ("mptcp: implement mptcp_pm_remove_subflow") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit b8adb69a7d29c2d33eb327bca66476fb6066516b Author: Paolo Abeni Date: Thu Feb 15 19:25:30 2024 +0100 mptcp: fix lockless access in subflow ULP diag Since the introduction of the subflow ULP diag interface, the dump callback accessed all the subflow data with lockless. We need either to annotate all the read and write operation accordingly, or acquire the subflow socket lock. Let's do latter, even if slower, to avoid a diffstat havoc. Fixes: 5147dfb50832 ("mptcp: allow dumping subflow context to userspace") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 584f3894262634596532cf43a5e782e34a0ce374 Author: Geliang Tang Date: Thu Feb 15 19:25:29 2024 +0100 mptcp: add needs_id for netlink appending addr Just the same as userspace PM, a new parameter needs_id is added for in-kernel PM mptcp_pm_nl_append_new_local_addr() too. Add a new helper mptcp_pm_has_addr_attr_id() to check whether an address ID is set from PM or not. In mptcp_pm_nl_get_local_id(), needs_id is always true, but in mptcp_pm_nl_add_addr_doit(), pass mptcp_pm_has_addr_attr_id() to needs_it. Fixes: efd5a4c04e18 ("mptcp: add the address ID assignment bitmap") Cc: stable@vger.kernel.org Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 6c347be62ae963b301ead8e7fa7b9973e6e0d6e1 Author: Geliang Tang Date: Thu Feb 15 19:25:28 2024 +0100 mptcp: add needs_id for userspace appending addr When userspace PM requires to create an ID 0 subflow in "userspace pm create id 0 subflow" test like this: userspace_pm_add_sf $ns2 10.0.3.2 0 An ID 1 subflow, in fact, is created. Since in mptcp_pm_nl_append_new_local_addr(), 'id 0' will be treated as no ID is set by userspace, and will allocate a new ID immediately: if (!e->addr.id) e->addr.id = find_next_zero_bit(pernet->id_bitmap, MPTCP_PM_MAX_ADDR_ID + 1, 1); To solve this issue, a new parameter needs_id is added for mptcp_userspace_pm_append_new_local_addr() to distinguish between whether userspace PM has set an ID 0 or whether userspace PM has not set any address. needs_id is true in mptcp_userspace_pm_get_local_id(), but false in mptcp_pm_nl_announce_doit() and mptcp_pm_nl_subflow_create_doit(). Fixes: e5ed101a6028 ("mptcp: userspace pm allow creating id 0 subflow") Cc: stable@vger.kernel.org Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 59a646d6c7e426c9ac8cd9f1cd13fe2096aa9dfc Merge: 97dde84026339 e898e4cd1aab2 Author: David S. Miller Date: Sun Feb 18 10:22:27 2024 +0000 Merge branch 'inet-fix-NLM_F_DUMP_INTR-logic' Eric Dumazet says: ==================== inet: fix NLM_F_DUMP_INTR logic Make sure NLM_F_DUMP_INTR is generated if dev_base_seq and dev_addr_genid are changed by the same amount. ==================== Signed-off-by: David S. Miller commit e898e4cd1aab271ca414f9ac6e08e4c761f6913c Author: Eric Dumazet Date: Thu Feb 15 17:21:07 2024 +0000 ipv6: properly combine dev_base_seq and ipv6.dev_addr_genid net->dev_base_seq and ipv6.dev_addr_genid are monotonically increasing. If we XOR their values, we could miss to detect if both values were changed with the same amount. Fixes: 63998ac24f83 ("ipv6: provide addr and netconf dump consistency info") Signed-off-by: Eric Dumazet Cc: Nicolas Dichtel Signed-off-by: Eric Dumazet Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 081a0e3b0d4c061419d3f4679dec9f68725b17e4 Author: Eric Dumazet Date: Thu Feb 15 17:21:06 2024 +0000 ipv4: properly combine dev_base_seq and ipv4.dev_addr_genid net->dev_base_seq and ipv4.dev_addr_genid are monotonically increasing. If we XOR their values, we could miss to detect if both values were changed with the same amount. Fixes: 0465277f6b3f ("ipv4: provide addr and netconf dump consistency info") Signed-off-by: Eric Dumazet Cc: Nicolas Dichtel Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 3a7845041eb7235f2fb00ef0960995da5be63b11 Author: Yuezhang Mo Date: Fri Feb 16 20:19:55 2024 +0800 exfat: fix appending discontinuous clusters to empty file Eric Hong found that when using ftruncate to expand an empty file, exfat_ent_set() will fail if discontinuous clusters are allocated. The reason is that the empty file does not have a cluster chain, but exfat_ent_set() attempts to append the newly allocated cluster to the cluster chain. In addition, exfat_find_last_cluster() only supports finding the last cluster in a non-empty file. So this commit adds a check whether the file is empty. If the file is empty, exfat_find_last_cluster() and exfat_ent_set() are no longer called as they do not need to be called. Fixes: f55c096f62f1 ("exfat: do not zero the extended part") Reported-by: Eric Hong Signed-off-by: Yuezhang Mo Signed-off-by: Namjae Jeon commit c02197fc9076e7d991c8f6adc11759c5ba52ddc6 Merge: f2667e0c32404 0846dd77c8349 Author: Linus Torvalds Date: Sat Feb 17 16:59:31 2024 -0800 Merge tag 'powerpc-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "This is a bit of a big batch for rc4, but just due to holiday hangover and because I didn't send any fixes last week due to a late revert request. I think next week should be back to normal. - Fix ftrace bug on boot caused by exit text sections with '-fpatchable-function-entry' - Fix accuracy of stolen time on pseries since the switch to VIRT_CPU_ACCOUNTING_GEN - Fix a crash in the IOMMU code when doing DLPAR remove - Set pt_regs->link on scv entry to fix BPF stack unwinding - Add missing PPC_FEATURE_BOOKE on 64-bit e5500/e6500, which broke gdb - Fix boot on some 6xx platforms with STRICT_KERNEL_RWX enabled - Fix build failures with KASAN enabled and 32KB stack size - Some other minor fixes Thanks to Arnd Bergmann, Benjamin Gray, Christophe Leroy, David Engraf, Gaurav Batra, Jason Gunthorpe, Jiangfeng Xiao, Matthias Schiffer, Nathan Lynch, Naveen N Rao, Nicholas Piggin, Nysal Jan K.A, R Nageswara Sastry, Shivaprasad G Bhat, Shrikanth Hegde, Spoorthy, Srikar Dronamraju, and Venkat Rao Bagalkote" * tag 'powerpc-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach powerpc/pseries: fix accuracy of stolen time powerpc/ftrace: Ignore ftrace locations in exit text sections powerpc/cputable: Add missing PPC_FEATURE_BOOKE on PPC64 Book-E powerpc/kasan: Limit KASAN thread size increase to 32KB Revert "powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add" powerpc: 85xx: mark local functions static powerpc: udbg_memcons: mark functions static powerpc/kasan: Fix addr error caused by page alignment powerpc/6xx: set High BAT Enable flag on G2_LE cores selftests/powerpc/papr_vpd: Check devfd before get_system_loc_code() powerpc/64: Set task pt_regs->link to the LR value on scv entry powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add powerpc/pseries/papr-sysparm: use u8 arrays for payloads commit f2667e0c32404a68496891b2d2015825de189b06 Merge: ced5905231561 816054f40a5fd Author: Linus Torvalds Date: Sat Feb 17 13:17:32 2024 -0800 Merge tag 'bcachefs-2024-02-17' of https://evilpiepirate.org/git/bcachefs Pull bcachefs fixes from Kent Overstreet: "Mostly pretty trivial, the user visible ones are: - don't barf when replicas_required > replicas - fix check_version_upgrade() so it doesn't do something nonsensical when we're downgrading" * tag 'bcachefs-2024-02-17' of https://evilpiepirate.org/git/bcachefs: bcachefs: Fix missing va_end() bcachefs: Fix check_version_upgrade() bcachefs: Clamp replicas_required to replicas bcachefs: fix missing endiannes conversion in sb_members bcachefs: fix kmemleak in __bch2_read_super error handling path bcachefs: Fix missing bch2_err_class() calls commit 97dde84026339e4b4af9a6301f825d1828d7874b Author: Pavel Sakharov Date: Wed Feb 14 12:27:17 2024 +0300 net: stmmac: Fix incorrect dereference in interrupt handlers If 'dev' or 'data' is NULL, the 'priv' variable has an incorrect address when dereferencing calling netdev_err(). Since we get as 'dev_id' or 'data' what was passed as the 'dev' argument to request_irq() during interrupt initialization (that is, the net_device and rx/tx queue pointers initialized at the time of the call) and since there are usually no checks for the 'dev_id' argument in such handlers in other drivers, remove these checks from the handlers in stmmac driver. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 8532f613bc78 ("net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX") Signed-off-by: Pavel Sakharov Reviewed-by: Serge Semin Signed-off-by: David S. Miller commit ced59052315615ffb3c39eb96e7b33f2cff6f781 Merge: 7efc0eb825084 5928d411557ec Author: Linus Torvalds Date: Sat Feb 17 08:56:41 2024 -0800 Merge tag 'driver-core-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are some driver core fixes, a kobject fix, and a documentation update for 6.8-rc5. In detail these changes are: - devlink fixes for reported issues with 6.8-rc1 - topology scheduling regression fix that has been reported by many - kobject loosening of checks change in -rc1 is now reverted as some codepaths seemed to need the checks - documentation update for the CVE process. Has been reviewed by many, the last minute change to the document was to bring the .rst format back into the the new style rules, the contents did not change. All of these, except for the documentation update, have been in linux-next for over a week. The documentation update has been reviewed for weeks by a group of developers, and in public for a week and the wording has stabilized for now. If future changes are needed, we can do so before 6.8-final is out (or anytime after that)" * tag 'driver-core-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Documentation: Document the Linux Kernel CVE process Revert "kobject: Remove redundant checks for whether ktype is NULL" driver core: fw_devlink: Improve logs for cycle detection driver core: fw_devlink: Improve detection of overlapping cycles driver core: Fix device_link_flag_is_sync_state_only() topology: Set capacity_freq_ref in all cases commit 7efc0eb8250845916a157580a42e23fe1914b738 Merge: 4b2981b2270d7 e20f378d993b1 Author: Linus Torvalds Date: Sat Feb 17 08:52:38 2024 -0800 Merge tag 'char-misc-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / miscdriver fixes from Greg KH: "Here is a small set of char/misc and IIO driver fixes for 6.8-rc5. Included in here are: - lots of iio driver fixes for reported issues - nvmem device naming fixup for reported problem - interconnect driver fixes for reported issues All of these have been in linux-next for a while with no reported the issues (the nvmem patch was included in a different branch in linux-next before sent to me for inclusion here)" * tag 'char-misc-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits) nvmem: include bit index in cell sysfs file name iio: adc: ad4130: only set GPIO_CTRL if pin is unused iio: adc: ad4130: zero-initialize clock init data interconnect: qcom: x1e80100: Add missing ACV enable_mask interconnect: qcom: sm8650: Use correct ACV enable_mask iio: accel: bma400: Fix a compilation problem iio: commom: st_sensors: ensure proper DMA alignment iio: hid-sensor-als: Return 0 for HID_USAGE_SENSOR_TIME_TIMESTAMP iio: move LIGHT_UVA and LIGHT_UVB to the end of iio_modifier staging: iio: ad5933: fix type mismatch regression iio: humidity: hdc3020: fix temperature offset iio: adc: ad7091r8: Fix error code in ad7091r8_gpio_setup() iio: adc: ad_sigma_delta: ensure proper DMA alignment iio: imu: adis: ensure proper DMA alignment iio: humidity: hdc3020: Add Makefile, Kconfig and MAINTAINERS entry iio: imu: bno055: serdev requires REGMAP iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC iio: pressure: bmp280: Add missing bmp085 to SPI id table iio: core: fix memleak in iio_device_register_sysfs interconnect: qcom: sm8550: Enable sync_state ... commit 4b2981b2270d7b9be6c15f80d5c4b838ad93ceef Merge: a3a7d16274295 7be50f2e8f20f Author: Linus Torvalds Date: Sat Feb 17 08:46:57 2024 -0800 Merge tag 'tty-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial fixes from Greg KH: "Here are three small tty and serial driver fixes for 6.8-rc5: - revert a 8250_pci1xxxx off-by-one change that was incorrect - two changes to fix the transmit path of the mxs-auart driver, fixing a regression in the 6.2 release All of these have been in linux-next for over a week with no reported issues" * tag 'tty-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: mxs-auart: fix tx serial: core: introduce uart_port_tx_flags() serial: 8250_pci1xxxx: partially revert off by one patch commit a3a7d1627429545cddcc60314f1596912138daf1 Merge: ac00b6546d390 7d708c145b263 Author: Linus Torvalds Date: Sat Feb 17 08:44:55 2024 -0800 Merge tag 'usb-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt fixes from Greg KH: "Here are two small fixes for 6.8-rc5: - thunderbolt to fix a reported issue on many platforms - dwc3 driver revert of a commit that caused problems in -rc1 Both of these changes have been in linux-next for over a week with no reported issues" * tag 'usb-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: Revert "usb: dwc3: Support EBC feature of DWC_usb31" thunderbolt: Fix setting the CNS bit in ROUTER_CS_5 commit ac00b6546d390bc12d1d2824c2b5d95046097eb2 Merge: 4a7571485c467 346c84e281a96 Author: Linus Torvalds Date: Sat Feb 17 08:13:32 2024 -0800 Merge tag 'media/v6.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - regression fix for rkisp1 shared IRQ logic - fix atomisp breakage due to a kAPI change - permission fix for remote controller BPF support - memleak fix in ir_toy driver - Kconfig dependency fix for pwm-ir-rx * tag 'media/v6.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: pwm-ir-tx: Depend on CONFIG_HIGH_RES_TIMERS media: ir_toy: fix a memleak in irtoy_tx media: rc: bpf attach/detach requires write permission media: atomisp: Adjust for v4l2_subdev_state handling changes in 6.8 media: rkisp1: Fix IRQ handling due to shared interrupts media: Revert "media: rkisp1: Drop IRQF_SHARED" commit 4a7571485c467b76cc19fae304452fd56921c789 Merge: ad645dea35c13 172c0cf519fb5 Author: Linus Torvalds Date: Sat Feb 17 08:06:20 2024 -0800 Merge tag 'pci-v6.8-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fixes from Bjorn Helgaas: - Keep bridges in D0 if we need to poll downstream devices for PME to resolve a v6.6 regression where we failed to enumerate devices below bridges put in D3hot by runtime PM, e.g., NVMe drives connected via Thunderbolt or USB4 docks (Alex Williamson) - Add Siddharth Vadapalli as PCI TI DRA7XX/J721E reviewer * tag 'pci-v6.8-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: MAINTAINERS: Add Siddharth Vadapalli as PCI TI DRA7XX/J721E reviewer PCI: Fix active state requirement in PME polling commit ad645dea35c1381890bb190f208f8e62c61e3cbd Merge: 55f626f2d0c81 9704669c386f9 Author: Linus Torvalds Date: Sat Feb 17 07:59:47 2024 -0800 Merge tag 'probes-fixes-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes fix from Masami Hiramatsu: - tracing/probes: Fix BTF structure member finder to find the members which are placed after any anonymous union member correctly. * tag 'probes-fixes-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing/probes: Fix to search structure fields correctly commit 55f626f2d0c81b33552ce0e59b63a0110807bad2 Merge: c1ca10ceffbb2 4860abb91f3d7 Author: Linus Torvalds Date: Sat Feb 17 07:56:10 2024 -0800 Merge tag '6.8-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: "Five smb3 client fixes, most also for stable: - Two multichannel fixes (one to fix potential handle leak on retry) - Work around possible serious data corruption (due to change in folios in 6.3, for cases when non standard maximum write size negotiated) - Symlink creation fix - Multiuser automount fix" * tag '6.8-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb: Fix regression in writes when non-standard maximum write size negotiated smb: client: handle path separator of created SMB symlinks smb: client: set correct id, uid and cruid for multiuser automounts cifs: update the same create_guid on replay cifs: fix underflow in parse_server_interfaces() commit 5928d411557ec5d53832cdd39fc443704a3e5b77 Author: Greg Kroah-Hartman Date: Sat Feb 17 13:55:31 2024 +0100 Documentation: Document the Linux Kernel CVE process The Linux kernel project now has the ability to assign CVEs to fixed issues, so document the process and how individual developers can get a CVE if one is not automatically assigned for their fixes. Reviewed-by: Kees Cook Reviewed-by: Konstantin Ryabitsev Reviewed-by: Krzysztof Kozlowski Reviewed-by: Lukas Bulwahn Signed-off-by: Sasha Levin Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/2024021731-essence-sadness-28fd@gregkh Signed-off-by: Greg Kroah-Hartman commit 9704669c386f9bbfef2e002e7e690c56b7dcf5de Author: Masami Hiramatsu (Google) Date: Sat Feb 17 21:25:42 2024 +0900 tracing/probes: Fix to search structure fields correctly Fix to search a field from the structure which has anonymous union correctly. Since the reference `type` pointer was updated in the loop, the search loop suddenly aborted where it hits an anonymous union. Thus it can not find the field after the anonymous union. This avoids updating the cursor `type` pointer in the loop. Link: https://lore.kernel.org/all/170791694361.389532.10047514554799419688.stgit@devnote2/ Fixes: 302db0f5b3d8 ("tracing/probes: Add a function to search a member of a struct/union") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) commit 67ec505fae32419354f4172c06c853def2541300 Merge: 841c35169323c c1c9d0f6f7f1d Author: Wolfram Sang Date: Sat Feb 17 13:13:33 2024 +0100 Merge tag 'i2c-host-fixes-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current Three fixes are included here. Two are strictly hardware-related for the i801 and qcom-geni devices. Meanwhile, a fix from Arnd addresses a compilation error encountered during compile test on powerpc. commit 0cab687205986491302cd2e440ef1d253031c221 Author: Robert Richter Date: Fri Feb 16 17:01:13 2024 +0100 cxl/pci: Fix disabling memory if DVSEC CXL Range does not match a CFMWS window The Linux CXL subsystem is built on the assumption that HPA == SPA. That is, the host physical address (HPA) the HDM decoder registers are programmed with are system physical addresses (SPA). During HDM decoder setup, the DVSEC CXL range registers (cxl-3.1, 8.1.3.8) are checked if the memory is enabled and the CXL range is in a HPA window that is described in a CFMWS structure of the CXL host bridge (cxl-3.1, 9.18.1.3). Now, if the HPA is not an SPA, the CXL range does not match a CFMWS window and the CXL memory range will be disabled then. The HDM decoder stops working which causes system memory being disabled and further a system hang during HDM decoder initialization, typically when a CXL enabled kernel boots. Prevent a system hang and do not disable the HDM decoder if the decoder's CXL range is not found in a CFMWS window. Note the change only fixes a hardware hang, but does not implement HPA/SPA translation. Support for this can be added in a follow on patch series. Signed-off-by: Robert Richter Fixes: 34e37b4c432c ("cxl/port: Enable HDM Capability after validating DVSEC Ranges") Cc: Link: https://lore.kernel.org/r/20240216160113.407141-1-rrichter@amd.com Signed-off-by: Dan Williams commit 117132edc6900621337b77d29e953d0d01f32a5f Author: Dave Jiang Date: Tue Feb 6 12:03:40 2024 -0700 cxl/test: Add support for qos_class checking Set a fake qos_class to a unique value in order to do simple testing of qos_class for root decoders and mem devs via user cxl_test. A mock function is added to set the fake qos_class values for memory device and overrides cxl_endpoint_parse_cdat() in cxl driver code. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/20240206190431.1810289-5-dave.jiang@intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams commit cc214417f06f6b0a8f6da09220c8bcdb742210b9 Author: Dave Jiang Date: Tue Feb 6 12:03:39 2024 -0700 cxl: Fix sysfs export of qos_class for memdev Current implementation exports only to /sys/bus/cxl/devices/.../memN/qos_class. With both ram and pmem exposed, the second registered sysfs attribute is rejected as duplicate. It's not possible to create qos_class under the dev_groups via the driver due to the ram and pmem sysfs sub-directories already created by the device sysfs groups. Move the ram and pmem qos_class to the device sysfs groups and add a call to sysfs_update() after the perf data are validated so the qos_class can be visible. The end results should be /sys/bus/cxl/devices/.../memN/ram/qos_class and /sys/bus/cxl/devices/.../memN/pmem/qos_class. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/20240206190431.1810289-4-dave.jiang@intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams commit 10cb393d769bed9473e1fa8d34e4d6d389db9155 Author: Dave Jiang Date: Tue Feb 6 12:03:38 2024 -0700 cxl: Remove unnecessary type cast in cxl_qos_class_verify() The passed in host bridge parameter for device_for_each_child() has unnecessary void * type cast. Remove the type cast. Suggested-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/20240206190431.1810289-3-dave.jiang@intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams commit 00413c15068276f6e5a50215849a8d4bd812b443 Author: Dave Jiang Date: Tue Feb 6 12:03:37 2024 -0700 cxl: Change 'struct cxl_memdev_state' *_perf_list to single 'struct cxl_dpa_perf' In order to address the issue with being able to expose qos_class sysfs attributes under 'ram' and 'pmem' sub-directories, the attributes must be defined as static attributes rather than under driver->dev_groups. To avoid implementing locking for accessing the 'struct cxl_dpa_perf` lists, convert the list to a single 'struct cxl_dpa_perf' entry in preparation to move the attributes to statically defined. While theoretically a partition may have multiple qos_class via CDAT, this has not been encountered with testing on available hardware. The code is simplified for now to not support the complex case until a use case is needed to support that. Link: https://lore.kernel.org/linux-cxl/65b200ba228f_2d43c29468@dwillia2-mobl3.amr.corp.intel.com.notmuch/ Suggested-by: Dan Williams Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/20240206190431.1810289-2-dave.jiang@intel.com Reviewed-by: Jonathan Cameron Signed-off-by: Dan Williams commit cb66b1d60c283bb340a2fc19deff7de8acea74b1 Author: Alison Schofield Date: Wed Jan 31 13:59:31 2024 -0800 cxl/region: Allow out of order assembly of autodiscovered regions Autodiscovered regions can fail to assemble if they are not discovered in HPA decode order. The user will see failure messages like: [] cxl region0: endpoint5: HPA order violation region1 [] cxl region0: endpoint5: failed to allocate region reference The check that is causing the failure helps the CXL driver enforce a CXL spec mandate that decoders be committed in HPA order. The check is needless for autodiscovered regions since their decoders are already programmed. Trying to enforce order in the assembly of these regions is useless because they are assembled once all their member endpoints arrive, and there is no guarantee on the order in which endpoints are discovered during probe. Keep the existing check, but for autodiscovered regions, allow the out of order assembly after a sanity check that the lesser numbered decoder has the lesser HPA starting address. Signed-off-by: Alison Schofield Tested-by: Wonjae Lee Link: https://lore.kernel.org/r/3dec69ee97524ab229a20c6739272c3000b18408.1706736863.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 453a7fde8031a5192ed2f9646ad048c1a5e930dc Author: Alison Schofield Date: Wed Jan 31 13:59:30 2024 -0800 cxl/region: Handle endpoint decoders in cxl_region_find_decoder() In preparation for adding a new caller of cxl_region_find_decoders() teach it to find a decoder from a cxl_endpoint_decoder structure. Combining switch and endpoint decoder lookup in one function prevents code duplication in call sites. Update the existing caller. Signed-off-by: Alison Schofield Tested-by: Wonjae Lee Link: https://lore.kernel.org/r/79ae6d72978ef9f3ceec9722e1cb793820553c8e.1706736863.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit b626070ffc14acca5b87a2aa5f581db98617584c Author: Alison Schofield Date: Fri Jan 12 12:09:51 2024 -0800 x86/numa: Fix the sort compare func used in numa_fill_memblks() The compare function used to sort memblks into starting address order fails when the result of its u64 address subtraction gets truncated to an int upon return. The impact of the bad sort is that memblks will be filled out incorrectly. Depending on the set of memblks, a user may see no errors at all but still have a bad fill, or see messages reporting a node overlap that leads to numa init failure: [] node 0 [mem: ] overlaps with node 1 [mem: ] [] No NUMA configuration found Replace with a comparison that can only result in: 1, 0, -1. Fixes: 8f012db27c95 ("x86/numa: Introduce numa_fill_memblks()") Signed-off-by: Alison Schofield Acked-by: Dave Hansen Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/99dcb3ae87e04995e9f293f6158dc8fa0749a487.1705085543.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 9b99c17f7510bed2adbe17751fb8abddba5620bc Author: Alison Schofield Date: Fri Jan 12 12:09:50 2024 -0800 x86/numa: Fix the address overlap check in numa_fill_memblks() numa_fill_memblks() fills in the gaps in numa_meminfo memblks over a physical address range. To do so, it first creates a list of existing memblks that overlap that address range. The issue is that it is off by one when comparing to the end of the address range, so memblks that do not overlap are selected. The impact of selecting a memblk that does not actually overlap is that an existing memblk may be filled when the expected action is to do nothing and return NUMA_NO_MEMBLK to the caller. The caller can then add a new NUMA node and memblk. Replace the broken open-coded search for address overlap with the memblock helper memblock_addrs_overlap(). Update the kernel doc and in code comments. Suggested by: "Huang, Ying" Fixes: 8f012db27c95 ("x86/numa: Introduce numa_fill_memblks()") Signed-off-by: Alison Schofield Acked-by: Mike Rapoport (IBM) Acked-by: Dave Hansen Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/10a3e6109c34c21a8dd4c513cf63df63481a2b07.1705085543.git.alison.schofield@intel.com Signed-off-by: Dan Williams commit 910c57dfa4d113aae6571c2a8b9ae8c430975902 Author: Sean Christopherson Date: Wed Feb 14 17:00:03 2024 -0800 KVM: x86: Mark target gfn of emulated atomic instruction as dirty When emulating an atomic access on behalf of the guest, mark the target gfn dirty if the CMPXCHG by KVM is attempted and doesn't fault. This fixes a bug where KVM effectively corrupts guest memory during live migration by writing to guest memory without informing userspace that the page is dirty. Marking the page dirty got unintentionally dropped when KVM's emulated CMPXCHG was converted to do a user access. Before that, KVM explicitly mapped the guest page into kernel memory, and marked the page dirty during the unmap phase. Mark the page dirty even if the CMPXCHG fails, as the old data is written back on failure, i.e. the page is still written. The value written is guaranteed to be the same because the operation is atomic, but KVM's ABI is that all writes are dirty logged regardless of the value written. And more importantly, that's what KVM did before the buggy commit. Huge kudos to the folks on the Cc list (and many others), who did all the actual work of triaging and debugging. Fixes: 1c2361f667f3 ("KVM: x86: Use __try_cmpxchg_user() to emulate atomic accesses") Cc: stable@vger.kernel.org Cc: David Matlack Cc: Pasha Tatashin Cc: Michael Krebs base-commit: 6769ea8da8a93ed4630f1ce64df6aafcaabfce64 Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20240215010004.1456078-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 3aff0c459e77ac0fb1c4d6884433467f797f7357 Author: Nathan Chancellor Date: Thu Jan 25 10:32:12 2024 -0700 RISC-V: Drop invalid test from CONFIG_AS_HAS_OPTION_ARCH Commit e4bb020f3dbb ("riscv: detect assembler support for .option arch") added two tests, one for a valid value to '.option arch' that should succeed and one for an invalid value that is expected to fail to make sure that support for '.option arch' is properly detected because Clang does not error when '.option arch' is not supported: $ clang --target=riscv64-linux-gnu -Werror -x assembler -c -o /dev/null <(echo '.option arch, +m') /dev/fd/63:1:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'relax' or 'norelax' .option arch, +m ^ $ echo $? 0 Unfortunately, the invalid test started being accepted by Clang after the linked llvm-project change, which causes CONFIG_AS_HAS_OPTION_ARCH and configurations that depend on it to be silently disabled, even though those versions do support '.option arch'. The invalid test can be avoided altogether by using '-Wa,--fatal-warnings', which will turn all assembler warnings into errors, like '-Werror' does for the compiler: $ clang --target=riscv64-linux-gnu -Werror -Wa,--fatal-warnings -x assembler -c -o /dev/null <(echo '.option arch, +m') /dev/fd/63:1:9: error: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'relax' or 'norelax' .option arch, +m ^ $ echo $? 1 The as-instr macros have been updated to make use of this flag, so remove the invalid test, which allows CONFIG_AS_HAS_OPTION_ARCH to work for all compiler versions. Cc: stable@vger.kernel.org Fixes: e4bb020f3dbb ("riscv: detect assembler support for .option arch") Link: https://github.com/llvm/llvm-project/commit/3ac9fe69f70a2b3541266daedbaaa7dc9c007a2a Reported-by: Eric Biggers Closes: https://lore.kernel.org/r/20240121011341.GA97368@sol.localdomain/ Signed-off-by: Nathan Chancellor Tested-by: Eric Biggers Tested-by: Andy Chiu Reviewed-by: Andy Chiu Tested-by: Conor Dooley Reviewed-by: Conor Dooley Acked-by: Masahiro Yamada Link: https://lore.kernel.org/r/20240125-fix-riscv-option-arch-llvm-18-v1-2-390ac9cc3cd0@kernel.org Signed-off-by: Palmer Dabbelt commit 0ee695a471a750cad4fff22286d91e038b1ef62f Author: Nathan Chancellor Date: Thu Jan 25 10:32:11 2024 -0700 kbuild: Add -Wa,--fatal-warnings to as-instr invocation Certain assembler instruction tests may only induce warnings from the assembler on an unsupported instruction or option, which causes as-instr to succeed when it was expected to fail. Some tests workaround this limitation by additionally testing that invalid input fails as expected. However, this is fragile if the assembler is changed to accept the invalid input, as it will cause the instruction/option to be unavailable like it was unsupported even when it is. Use '-Wa,--fatal-warnings' in the as-instr macro to turn these warnings into hard errors, which avoids this fragility and makes tests more robust and well formed. Cc: stable@vger.kernel.org Suggested-by: Eric Biggers Signed-off-by: Nathan Chancellor Tested-by: Eric Biggers Tested-by: Andy Chiu Reviewed-by: Andy Chiu Tested-by: Conor Dooley Reviewed-by: Conor Dooley Acked-by: Masahiro Yamada Link: https://lore.kernel.org/r/20240125-fix-riscv-option-arch-llvm-18-v1-1-390ac9cc3cd0@kernel.org Signed-off-by: Palmer Dabbelt commit c83ccdc9586b3e9882da9e27507c046751999d59 Author: Nuno Sa Date: Fri Feb 9 16:50:34 2024 +0100 counter: fix privdata alignment Aligning to the L1 cache does not guarantee the same alignment as kmallocing an object [1]. Furthermore, in some platforms, that alignment is not sufficient for DMA safety (in case someone wants to have a DMA safe buffer in privdata) [2]. Sometime ago, we had the same fixes in IIO. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/base/devres.c#n35 [2]: https://lore.kernel.org/linux-iio/20220508175712.647246-2-jic23@kernel.org/ Fixes: c18e2760308e ("counter: Provide alternative counter registration functions") Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240209-counter-align-fix-v2-1-5777ea0a2722@analog.com Signed-off-by: William Breathitt Gray commit 5429c8de56f6b2bd8f537df3a1e04e67b9c04282 Author: Greg Joyce Date: Fri Feb 16 15:04:17 2024 -0600 block: sed-opal: handle empty atoms when parsing response The SED Opal response parsing function response_parse() does not handle the case of an empty atom in the response. This causes the entry count to be too high and the response fails to be parsed. Recognizing, but ignoring, empty atoms allows response handling to succeed. Signed-off-by: Greg Joyce Link: https://lore.kernel.org/r/20240216210417.3526064-2-gjoyce@linux.ibm.com Signed-off-by: Jens Axboe commit 172c0cf519fb52860157c57067f1a58cfc0aa861 Author: Siddharth Vadapalli Date: Fri Feb 16 12:29:26 2024 +0530 MAINTAINERS: Add Siddharth Vadapalli as PCI TI DRA7XX/J721E reviewer Since I have been contributing to the driver for a while and wish to help with the review process, add myself as a reviewer. Link: https://lore.kernel.org/r/20240216065926.473805-1-s-vadapalli@ti.com Signed-off-by: Siddharth Vadapalli Signed-off-by: Bjorn Helgaas commit 2df70149e73e79783bcbc7db4fa51ecef0e2022c Author: Hans de Goede Date: Thu Feb 15 16:51:33 2024 +0100 power: supply: bq27xxx-i2c: Do not free non existing IRQ The bq27xxx i2c-client may not have an IRQ, in which case client->irq will be 0. bq27xxx_battery_i2c_probe() already has an if (client->irq) check wrapping the request_threaded_irq(). But bq27xxx_battery_i2c_remove() unconditionally calls free_irq(client->irq) leading to: [ 190.310742] ------------[ cut here ]------------ [ 190.310843] Trying to free already-free IRQ 0 [ 190.310861] WARNING: CPU: 2 PID: 1304 at kernel/irq/manage.c:1893 free_irq+0x1b8/0x310 Followed by a backtrace when unbinding the driver. Add an if (client->irq) to bq27xxx_battery_i2c_remove() mirroring probe() to fix this. Fixes: 444ff00734f3 ("power: supply: bq27xxx: Fix I2C IRQ race on remove") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240215155133.70537-1-hdegoede@redhat.com Signed-off-by: Sebastian Reichel commit 15afd3d332b845b54ff09d7522b552457162fe7c Merge: 9c10f2b172eb2 9e46c70e829bd Author: Jens Axboe Date: Fri Feb 16 15:42:01 2024 -0700 Merge tag 'md-6.8-20240216' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.8 Pull MD fixes from Song: "1. Fix issues reported for dm-raid [1], by Yu Kuai. Please note that this PR only contains the first half of the set [2]. We still need more fixes in dm and md code (the rest of the set, or alternative fixes). 2. Fix active_io leak, by Yu Kuai. The fix was posted in the same set [2]. But it actually fixes a separate issue [3]. [1] https://lore.kernel.org/linux-raid/e5e8afe2-e9a8-49a2-5ab0-958d4065c55e@redhat.com/ [2] https://lore.kernel.org/linux-raid/20240201092559.910982-1-yukuai1@huaweicloud.com/ [3] https://lore.kernel.org/linux-raid/20240130172524.0000417b@linux.intel.com/ " * tag 'md-6.8-20240216' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: Don't suspend the array for interrupted reshape md: Don't register sync_thread for reshape directly md: Make sure md_do_sync() will set MD_RECOVERY_DONE md: Don't ignore read-only array in md_check_recovery() md: Don't ignore suspended array in md_check_recovery() md: Fix missing release of 'active_io' for flush commit c1ca10ceffbb289ed02feaf005bc9ee6095b4507 Merge: 975b26ab307e3 379a58caa1993 Author: Linus Torvalds Date: Fri Feb 16 14:05:02 2024 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three fixes: the two fnic ones are a revert and a refix, which is why the diffstat is a bit big. The target one also extracts a function to add a check for configuration and so looks bigger than it is" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fnic: Move fnic_fnic_flush_tx() to a work queue scsi: Revert "scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock" scsi: target: Fix unmap setup during configuration commit 975b26ab307e30e7ccec2a83eae6c017622a9125 Merge: 7edfe0aaa6e74 aac8a59537dfc Author: Linus Torvalds Date: Fri Feb 16 14:00:19 2024 -0800 Merge tag 'wq-for-6.8-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "Just one patch to revert commit ca10d851b9ad ("workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()"). This commit could break ordering guarantees for ordered workqueues. The problem that the commit tried to resolve partially - making ordered workqueues follow unbound cpumask - is fully solved in wq/for-6.9 branch" * tag 'wq-for-6.8-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: Revert "workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()" commit 7edfe0aaa6e74b8fb2aa178d3b140e1468cf85ff Merge: 8096015082592 9c10f2b172eb2 Author: Linus Torvalds Date: Fri Feb 16 13:55:02 2024 -0800 Merge tag 'block-6.8-2024-02-16' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: "Just an nvme pull request via Keith: - Fabrics connection error handling (Chaitanya) - Use relaxed effects to reduce unnecessary queue freezes (Keith)" * tag 'block-6.8-2024-02-16' of git://git.kernel.dk/linux: nvmet: remove superfluous initialization nvme: implement support for relaxed effects nvme-fabrics: fix I/O connect error handling commit 8096015082592cf282fdee9d052aa1d3bbadb805 Merge: 3f9c1b315d65f a37ee9e117ef7 Author: Linus Torvalds Date: Fri Feb 16 13:51:20 2024 -0800 Merge tag 'io_uring-6.8-2024-02-16' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a single fix for a regression in how overflow is handled for multishot accept requests" * tag 'io_uring-6.8-2024-02-16' of git://git.kernel.dk/linux: io_uring/net: fix multishot accept overflow handling commit 3f9c1b315d65fb4b3a2352d579c35d662b0c2ae0 Merge: 683b783c2093e dbc347ef7f0c5 Author: Linus Torvalds Date: Fri Feb 16 13:37:15 2024 -0800 Merge tag 'ceph-for-6.8-rc5' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Additional cap handling fixes from Xiubo to avoid "client isn't responding to mclientcaps(revoke)" stalls on the MDS side" * tag 'ceph-for-6.8-rc5' of https://github.com/ceph/ceph-client: ceph: add ceph_cap_unlink_work to fire check_caps() immediately ceph: always queue a writeback when revoking the Fb caps commit f945a404ed8a6eeb9907ef122a8382df56c2a714 Author: Max Kellermann Date: Mon Feb 12 00:09:45 2024 +0100 parisc/kprobes: always include asm-generic/kprobes.h The NOKPROBE_SYMBOL macro (and others) were moved to asm-generic/kprobes.h in 2017 by commit 7d134b2ce639 ("kprobes: move kprobe declarations to asm-generic/kprobes.h"), and this new header was included by asm/kprobes.h unconditionally on all architectures. When kprobe support was added to parisc in 2017 by commit 8858ac8e9e9b1 ("parisc: Implement kprobes"), that header was only included when CONFIG_KPROBES was enabled. This can lead to build failures when NOKPROBE_SYMBOL is used, but CONFIG_KPROBES is disabled. This mistake however was never actually noticed because linux/kprobes.h also includes asm-generic/kprobes.h (though I do not understand why that is, because it also includes asm/kprobes.h). To prevent eventual build failures, I suggest to always include asm-generic/kprobes.h on parisc, just like all the other architectures do. This way, including asm/kprobes.h suffices, and nobody (outside of arch/) ever needs to explicitly include asm-generic/kprobes.h. Signed-off-by: Max Kellermann Signed-off-by: Helge Deller commit 250f5402e636a5cec9e0e95df252c3d54307210f Author: Max Kellermann Date: Sun Feb 11 23:43:14 2024 +0100 parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check Fixes a bug revealed by -Wmissing-prototypes when CONFIG_FUNCTION_GRAPH_TRACER is enabled but not CONFIG_DYNAMIC_FTRACE: arch/parisc/kernel/ftrace.c:82:5: error: no previous prototype for 'ftrace_enable_ftrace_graph_caller' [-Werror=missing-prototypes] 82 | int ftrace_enable_ftrace_graph_caller(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/parisc/kernel/ftrace.c:88:5: error: no previous prototype for 'ftrace_disable_ftrace_graph_caller' [-Werror=missing-prototypes] 88 | int ftrace_disable_ftrace_graph_caller(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Max Kellermann Signed-off-by: Helge Deller commit 683b783c2093e0172738f899ba188bc406b0595f Merge: 4b6f7c624e709 9895ceeb5cd61 Author: Linus Torvalds Date: Fri Feb 16 10:48:14 2024 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "ARM: - Avoid dropping the page refcount twice when freeing an unlinked page-table subtree. - Don't source the VFIO Kconfig twice - Fix protected-mode locking order between kvm and vcpus RISC-V: - Fix steal-time related sparse warnings x86: - Cleanup gtod_is_based_on_tsc() to return "bool" instead of an "int" - Make a KVM_REQ_NMI request while handling KVM_SET_VCPU_EVENTS if and only if the incoming events->nmi.pending is non-zero. If the target vCPU is in the UNITIALIZED state, the spurious request will result in KVM exiting to userspace, which in turn causes QEMU to constantly acquire and release QEMU's global mutex, to the point where the BSP is unable to make forward progress. - Fix a type (u8 versus u64) goof that results in pmu->fixed_ctr_ctrl being incorrectly truncated, and ultimately causes KVM to think a fixed counter has already been disabled (KVM thinks the old value is '0'). - Fix a stack leak in KVM_GET_MSRS where a failed MSR read from userspace that is ultimately ignored due to ignore_msrs=true doesn't zero the output as intended. Selftests cleanups and fixes: - Remove redundant newlines from error messages. - Delete an unused variable in the AMX test (which causes build failures when compiling with -Werror). - Fail instead of skipping tests if open(), e.g. of /dev/kvm, fails with an error code other than ENOENT (a Hyper-V selftest bug resulted in an EMFILE, and the test eventually got skipped). - Fix TSC related bugs in several Hyper-V selftests. - Fix a bug in the dirty ring logging test where a sem_post() could be left pending across multiple runs, resulting in incorrect synchronization between the main thread and the vCPU worker thread. - Relax the dirty log split test's assertions on 4KiB mappings to fix false positives due to the number of mappings for memslot 0 (used for code and data that is NOT being dirty logged) changing, e.g. due to NUMA balancing" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (25 commits) KVM: arm64: Fix double-free following kvm_pgtable_stage2_free_unlinked() RISC-V: KVM: Use correct restricted types RISC-V: paravirt: Use correct restricted types RISC-V: paravirt: steal_time should be static KVM: selftests: Don't assert on exact number of 4KiB in dirty log split test KVM: selftests: Fix a semaphore imbalance in the dirty ring logging test KVM: x86: Fix KVM_GET_MSRS stack info leak KVM: arm64: Do not source virt/lib/Kconfig twice KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl KVM: x86: Make gtod_is_based_on_tsc() return 'bool' KVM: selftests: Make hyperv_clock require TSC based system clocksource KVM: selftests: Run clocksource dependent tests with hyperv_clocksource_tsc_page too KVM: selftests: Use generic sys_clocksource_is_tsc() in vmx_nested_tsc_scaling_test KVM: selftests: Generalize check_clocksource() from kvm_clock_test KVM: x86: make KVM_REQ_NMI request iff NMI pending for vcpu KVM: arm64: Fix circular locking dependency KVM: selftests: Fail tests when open() fails with !ENOENT KVM: selftests: Avoid infinite loop in hyperv_features when invtsc is missing KVM: selftests: Delete superfluous, unused "stage" variable in AMX test KVM: selftests: x86_64: Remove redundant newlines ... commit 4b6f7c624e7094437df707d3fa0a39970a546624 Merge: 3f3f64cb60eef 6efe4d1879693 Author: Linus Torvalds Date: Fri Feb 16 10:33:51 2024 -0800 Merge tag 'trace-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix the #ifndef that didn't have the 'CONFIG_' prefix on HAVE_DYNAMIC_FTRACE_WITH_REGS The fix to have dynamic trampolines work with x86 broke arm64 as the config used in the #ifdef was HAVE_DYNAMIC_FTRACE_WITH_REGS and not CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS which removed the fix that the previous fix was to fix. - Fix tracing_on state The code to test if "tracing_on" is set incorrectly used ring_buffer_record_is_on() which returns false if the ring buffer isn't able to be written to. But the ring buffer disable has several bits that disable it. One is internal disabling which is used for resizing and other modifications of the ring buffer. But the "tracing_on" user space visible flag should only report if tracing is actually on and not internally disabled, as this can cause confusion as writing "1" when it is disabled will not enable it. Instead use ring_buffer_record_is_set_on() which shows the user space visible settings. - Fix a false positive kmemleak on saved cmdlines Now that the saved_cmdlines structure is allocated via alloc_page() and not via kmalloc() it has become invisible to kmemleak. The allocation done to one of its pointers was flagged as a dangling allocation leak. Make kmemleak aware of this allocation and free. - Fix synthetic event dynamic strings An update that cleaned up the synthetic event code removed the return value of trace_string(), and had it return zero instead of the length, causing dynamic strings in the synthetic event to always have zero size. - Clean up documentation and header files for seq_buf * tag 'trace-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: seq_buf: Fix kernel documentation seq_buf: Don't use "proxy" headers tracing/synthetic: Fix trace_string() return value tracing: Inform kmemleak of saved_cmdlines allocation tracing: Use ring_buffer_record_is_set_on() in tracer_tracing_is_on() tracing: Fix HAVE_DYNAMIC_FTRACE_WITH_REGS ifdef commit 3f3f64cb60eef5bf3a787573cd05803171eb99ec Merge: efb0b63afce6a 2813926261e43 Author: Linus Torvalds Date: Fri Feb 16 10:28:29 2024 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "It's a little busier than normal, but it's still not a lot of code and things seem fairly quiet in general: - Fix allocation failure during SVE coredumps - Fix handling of SVE context on signal delivery - Enable Neoverse N2 CPU errata workarounds for Microsoft's "Azure Cobalt 100" clone - Work around CMN PMU erratum in AmpereOneX implementation - Fix typo in CXL PMU event definition - Fix jump label asm constraints" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/sve: Lower the maximum allocation for the SVE ptrace regset arm64: Subscribe Microsoft Azure Cobalt 100 to ARM Neoverse N2 errata perf/arm-cmn: Workaround AmpereOneX errata AC04_MESH_1 (incorrect child count) arm64: jump_label: use constraints "Si" instead of "i" arm64: fix typo in comments perf: CXL: fix mismatched cpmu event opcode arm64/signal: Don't assume that TIF_SVE means we saved SVE state commit 65323796debe49a1922ba507020f7530a4b3f9af Author: Dan Carpenter Date: Tue Feb 13 21:09:57 2024 +0300 drm/nouveau/mmu/r535: uninitialized variable in r535_bar_new_() If gf100_bar_new_() fails then "bar" is not initialized. Fixes: 5bf0257136a2 ("drm/nouveau/mmu/r535: initial support") Signed-off-by: Dan Carpenter Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/dab21df7-4d90-4479-97d8-97e5d228c714@moroto.mountain commit 0affdba22aca5573f9d989bcb1d71d32a6a03efe Author: Arnd Bergmann Date: Tue Feb 13 10:57:37 2024 +0100 nouveau: fix function cast warnings clang-16 warns about casting between incompatible function types: drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadow.c:161:10: error: cast from 'void (*)(const struct firmware *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 161 | .fini = (void(*)(void *))release_firmware, This one was done to use the generic shadow_fw_release() function as a callback for struct nvbios_source. Change it to use the same prototype as the other five instances, with a trivial helper function that actually calls release_firmware. Fixes: 70c0f263cc2e ("drm/nouveau/bios: pull in basic vbios subdev, more to come later") Signed-off-by: Arnd Bergmann Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240213095753.455062-1-arnd@kernel.org commit efb0b63afce6a6f470ee8eda5abe70d1e8aa558a Merge: 0f1dd5e91e2ba 14db5f64a971f Author: Linus Torvalds Date: Fri Feb 16 09:29:26 2024 -0800 Merge tag 'zonefs-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fix from Damien Le Moal: - Fix direct write error handling to avoid a race between failed IO completion and the submission path itself which can result in an invalid file size exposed to the user after the failed IO. * tag 'zonefs-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: Improve error handling commit 9895ceeb5cd61092f147f8d611e2df575879dd6f Merge: 8046fa5fc2f71 c60d847be7b8e Author: Paolo Bonzini Date: Fri Feb 16 12:02:38 2024 -0500 Merge tag 'kvmarm-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.8, take #2 - Avoid dropping the page refcount twice when freeing an unlinked page-table subtree. commit 8046fa5fc2f7155cbccf56a9598d2263b156afd9 Merge: e67391ca7aa6c 42dfa94d802a4 Author: Paolo Bonzini Date: Fri Feb 16 12:02:31 2024 -0500 Merge tag 'kvmarm-fixes-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 6.8, take #1 - Don't source the VFIO Kconfig twice - Fix protected-mode locking order between kvm and vcpus commit 0f1dd5e91e2ba3990143645faff2bcce2d99778e Merge: beda9c23ad82a 41c25e193b2be Author: Linus Torvalds Date: Fri Feb 16 09:02:19 2024 -0800 Merge tag 'sound-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of device-specific fixes. It became a bit bigger than wished, but all look reasonably small and safe to apply. - A few Cirrus Logic CS35L56 and CS42L43 driver fixes - ASoC SOF fixes and workarounds - Various ASoC Intel fixes - Lots of HD-, USB-audio and AMD ACP quirks" * tag 'sound-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (33 commits) ALSA: usb-audio: More relaxed check of MIDI jack names ALSA: hda/realtek: fix mute/micmute LED For HP mt645 ALSA: hda/realtek: cs35l41: Fix order and duplicates in quirks table ALSA: hda/realtek: cs35l41: Fix device ID / model name ALSA: hda/realtek: cs35l41: Add internal speaker support for ASUS UM3402 with missing DSD ASoC: cs35l56: Workaround for ACPI with broken spk-id-gpios property ALSA: hda: Add Lenovo Legion 7i gen7 sound quirk ASoC: SOF: IPC3: fix message bounds on ipc ops ASoC: SOF: ipc4-pcm: Workaround for crashed firmware on system suspend ASoC: q6dsp: fix event handler prototype ASoC: SOF: Intel: pci-lnl: Change the topology path to intel/sof-ipc4-tplg ASoC: SOF: Intel: pci-tgl: Change the default paths and firmware names ASoC: amd: yc: Fix non-functional mic on Lenovo 82UU ASoC: rt5645: Add DMI quirk for inverted jack-detect on MeeGoPad T8 ASoC: rt5645: Make LattePanda board DMI match more precise ASoC: SOF: amd: Fix locking in ACP IRQ handler ASoC: rt5645: Fix deadlock in rt5645_jack_detect_work() ASoC: Intel: cht_bsw_rt5645: Cleanup codec_name handling ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards ASoC: cs35l56: Remove default from IRQ1_CFG register ... commit beda9c23ad82aa37be7f4a457e9b9544d04b84fd Merge: ca6a62f9fe237 2df8aa3cad407 Author: Linus Torvalds Date: Fri Feb 16 08:55:46 2024 -0800 Merge tag 'gpio-fixes-for-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - add missing stubs for functions that are not built with GPIOLIB disabled * tag 'gpio-fixes-for-v6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: add gpio_device_get_label() stub for !GPIOLIB gpiolib: add gpio_device_get_base() stub for !GPIOLIB gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB commit ca6a62f9fe23713ea2b58a256a1ab27b9cc5a05a Merge: b8ef920168141 ea69f782d0e37 Author: Linus Torvalds Date: Fri Feb 16 08:05:30 2024 -0800 Merge tag 'drm-fixes-2024-02-16' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular weekly fixes, nothing too major, mostly amdgpu, then i915, xe, msm and nouveau with some scattered bits elsewhere. crtc: - fix uninit variable prime: - support > 4GB page arrays buddy: - fix error handling in allocations i915: - fix blankscreen on JSL chromebooks - stable fix to limit DP sst link rates xe: - Fix an out-of-bounds shift. - Fix the display code thinking xe uses shmem - Fix a warning about index out-of-bound - Fix a clang-16 compilation warning amdgpu: - PSR fixes - Suspend/resume fixes - Link training fix - Aspect ratio fix - DCN 3.5 fixes - VCN 4.x fix - GFX 11 fix - Misc display fixes - Misc small fixes amdkfd: - Cache size reporting fix - SIMD distribution fix msm: - GPU: - dmabuf vmap fix - a610 UBWC corruption fix (incorrect hbb) - revert a commit that was making GPU recovery unreliable - tlb invalidation fix ivpu: - suspend/resume fix nouveau: - fix scheduler cleanup path - fix pointless scheduler creation - fix kvalloc argument order rockchip: - vop2 locking fix" * tag 'drm-fixes-2024-02-16' of git://anongit.freedesktop.org/drm/drm: (38 commits) drm/amdgpu: Fix implicit assumtion in gfx11 debug flags drm/amdkfd: update SIMD distribution algo for GFXIP 9.4.2 onwards drm/amd/display: Increase ips2_eval delay for DCN35 drm/amdgpu/display: Initialize gamma correction mode variable in dcn30_get_gamcor_current() drm/amdgpu/soc21: update VCN 4 max HEVC encoding resolution drm/amd/display: fixed integer types and null check locations drm/amd/display: Fix array-index-out-of-bounds in dcn35_clkmgr drm/amd/display: Preserve original aspect ratio in create stream drm/amd/display: Fix possible NULL dereference on device remove/driver unload Revert "drm/amd/display: increased min_dcfclk_mhz and min_fclk_mhz" drm/amd/display: Add align done check Revert "drm/amd: flush any delayed gfxoff on suspend entry" drm/amd: Stop evicting resources on APUs in suspend drm/amd/display: Fix possible buffer overflow in 'find_dcfclk_for_voltage()' drm/amd/display: Fix possible use of uninitialized 'max_chunks_fbc_mode' in 'calculate_bandwidth()' drm/amd/display: Initialize 'wait_time_microsec' variable in link_dp_training_dpia.c drm/amd/display: Fix && vs || typos drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3 drm/amdgpu: make damage clips support configurable drm/msm: Wire up tlb ops ... commit b8ef920168141b09927ca840b767fda0f227080a Merge: 4f5e5092fdbf5 d8bdd795d383a Author: Linus Torvalds Date: Fri Feb 16 07:58:43 2024 -0800 Merge tag 'lsm-pr-20240215' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm fix from Paul Moore: "One small LSM patch to fix a potential integer overflow in the newly added lsm_set_self_attr() syscall" * tag 'lsm-pr-20240215' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: lsm: fix integer overflow in lsm_set_self_attr() syscall commit 85445b96429057d87446bcb24ec0cac9ea9c7fdf Author: Coiby Xu Date: Tue Jan 9 08:24:28 2024 +0800 integrity: eliminate unnecessary "Problem loading X.509 certificate" msg Currently when the kernel fails to add a cert to the .machine keyring, it will throw an error immediately in the function integrity_add_key. Since the kernel will try adding to the .platform keyring next or throw an error (in the caller of integrity_add_key i.e. add_to_machine_keyring), so there is no need to throw an error immediately in integrity_add_key. Reported-by: itrymybest80@protonmail.com Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2239331 Fixes: d19967764ba8 ("integrity: Introduce a Linux keyring called machine") Reviewed-by: Eric Snowberg Signed-off-by: Coiby Xu Signed-off-by: Mimi Zohar commit a79f949a5ce1d45329d63742c2a995f2b47f9852 Author: Frank Li Date: Wed Feb 7 14:47:32 2024 -0500 dmaengine: fsl-edma: correct max_segment_size setting Correcting the previous setting of 0x3fff to the actual value of 0x7fff. Introduced new macro 'EDMA_TCD_ITER_MASK' for improved code clarity and utilization of FIELD_GET to obtain the accurate maximum value. Cc: stable@vger.kernel.org Fixes: e06748539432 ("dmaengine: fsl-edma: support edma memcpy") Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240207194733.2112870-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit ecec7c9f29a7114a3e23a14020b1149ea7dffb4f Author: Fenghua Yu Date: Wed Feb 14 18:49:31 2024 -0800 dmaengine: idxd: Remove shadow Event Log head stored in idxd head is defined in idxd->evl as a shadow of head in the EVLSTATUS register. There are two issues related to the shadow head: 1. Mismatch between the shadow head and the state of the EVLSTATUS register: If Event Log is supported, upon completion of the Enable Device command, the Event Log head in the variable idxd->evl->head should be cleared to match the state of the EVLSTATUS register. But the variable is not reset currently, leading mismatch between the variable and the register state. The mismatch causes incorrect processing of Event Log entries. 2. Unnecessary shadow head definition: The shadow head is unnecessary as head can be read directly from the EVLSTATUS register. Reading head from the register incurs no additional cost because event log head and tail are always read together and tail is already read directly from the register as required by hardware. Remove the shadow Event Log head stored in idxd->evl to address the mentioned issues. Fixes: 244da66cda35 ("dmaengine: idxd: setup event log configuration") Signed-off-by: Fenghua Yu Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20240215024931.1739621-1-fenghua.yu@intel.com Signed-off-by: Vinod Koul commit 02f76a9cd4494719600baf1ab278930df39431ab Author: Arunpravin Paneer Selvam Date: Fri Feb 16 15:30:48 2024 +0530 drm/buddy: Modify duplicate list_splice_tail call Remove the duplicate list_splice_tail call when the total_allocated < size condition is true. Cc: # 6.7+ Fixes: 8746c6c9dfa3 ("drm/buddy: Fix alloc_range() error handling code") Reported-by: Bert Karwatzki Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240216100048.4101-1-Arunpravin.PaneerSelvam@amd.com Signed-off-by: Christian König commit d4c08d8b23b22807c712208cd05cb047e92e7672 Author: Dmitry Baryshkov Date: Tue Feb 13 15:38:24 2024 +0200 phy: qcom-qmp-usb: fix v3 offsets data The MSM8996 platform has registers setup different to the rest of QMP v3 USB platforms. It has PCS region at 0x600 and no PCS_MISC region, while other platforms have PCS region at 0x800 and PCS_MISC at 0x600. This results in the malfunctioning USB host on some of the platforms. The commit f74c35b630d4 ("phy: qcom-qmp-usb: fix register offsets for ipq8074/ipq6018") fixed the issue for IPQ platforms, but missed the SDM845 which has the same register layout. To simplify future platform addition and to make the driver more future proof, rename qmp_usb_offsets_v3 to qmp_usb_offsets_v3_msm8996 (to mark its peculiarity), rename qmp_usb_offsets_ipq8074 to qmp_usb_offsets_v3 and use it for SDM845 platform. Fixes: 2be22aae6b18 ("phy: qcom-qmp-usb: populate offsets configuration") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20240213133824.2218916-1-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 4c892121d43bc2b45896ca207b54f39a8fa6b852 Author: Thierry Reding Date: Fri Feb 2 11:08:12 2024 +0100 arm64: tegra: Set the correct PHY mode for MGBE The PHY is configured in 10GBASE-R, so make sure to reflect that in DT. Reviewed-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Thierry Reding commit 166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210 Author: Jakub Kicinski Date: Thu Feb 15 06:33:46 2024 -0800 net/sched: act_mirred: don't override retval if we already lost the skb If we're redirecting the skb, and haven't called tcf_mirred_forward(), yet, we need to tell the core to drop the skb by setting the retcode to SHOT. If we have called tcf_mirred_forward(), however, the skb is out of our hands and returning SHOT will lead to UaF. Move the retval override to the error path which actually need it. Reviewed-by: Michal Swiatkowski Fixes: e5cf1baf92cb ("act_mirred: use TC_ACT_REINSERT when possible") Signed-off-by: Jakub Kicinski Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 52f671db18823089a02f07efc04efdb2272ddc17 Author: Jakub Kicinski Date: Thu Feb 15 06:33:45 2024 -0800 net/sched: act_mirred: use the backlog for mirred ingress The test Davide added in commit ca22da2fbd69 ("act_mirred: use the backlog for nested calls to mirred ingress") hangs our testing VMs every 10 or so runs, with the familiar tcp_v4_rcv -> tcp_v4_rcv deadlock reported by lockdep. The problem as previously described by Davide (see Link) is that if we reverse flow of traffic with the redirect (egress -> ingress) we may reach the same socket which generated the packet. And we may still be holding its socket lock. The common solution to such deadlocks is to put the packet in the Rx backlog, rather than run the Rx path inline. Do that for all egress -> ingress reversals, not just once we started to nest mirred calls. In the past there was a concern that the backlog indirection will lead to loss of error reporting / less accurate stats. But the current workaround does not seem to address the issue. Fixes: 53592b364001 ("net/sched: act_mirred: Implement ingress actions") Cc: Marcelo Ricardo Leitner Suggested-by: Davide Caratti Link: https://lore.kernel.org/netdev/33dc43f587ec1388ba456b4915c75f02a8aae226.1663945716.git.dcaratti@redhat.com/ Signed-off-by: Jakub Kicinski Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit a9f80df4f51440303d063b55bb98720857693821 Author: Randy Dunlap Date: Wed Feb 14 23:00:50 2024 -0800 net: ethernet: adi: requires PHYLIB support This driver uses functions that are supplied by the Kconfig symbol PHYLIB, so select it to ensure that they are built as needed. When CONFIG_ADIN1110=y and CONFIG_PHYLIB=m, there are multiple build (linker) errors that are resolved by this Kconfig change: ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_open': drivers/net/ethernet/adi/adin1110.c:933: undefined reference to `phy_start' ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_probe_netdevs': drivers/net/ethernet/adi/adin1110.c:1603: undefined reference to `get_phy_device' ld: drivers/net/ethernet/adi/adin1110.c:1609: undefined reference to `phy_connect' ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy': drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect' ld: drivers/net/ethernet/adi/adin1110.o: in function `devm_mdiobus_alloc': include/linux/phy.h:455: undefined reference to `devm_mdiobus_alloc_size' ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_register_mdiobus': drivers/net/ethernet/adi/adin1110.c:529: undefined reference to `__devm_mdiobus_register' ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_net_stop': drivers/net/ethernet/adi/adin1110.c:958: undefined reference to `phy_stop' ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_disconnect_phy': drivers/net/ethernet/adi/adin1110.c:1226: undefined reference to `phy_disconnect' ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_adjust_link': drivers/net/ethernet/adi/adin1110.c:1077: undefined reference to `phy_print_status' ld: drivers/net/ethernet/adi/adin1110.o: in function `adin1110_ioctl': drivers/net/ethernet/adi/adin1110.c:790: undefined reference to `phy_do_ioctl' ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf60): undefined reference to `phy_ethtool_get_link_ksettings' ld: drivers/net/ethernet/adi/adin1110.o:(.rodata+0xf68): undefined reference to `phy_ethtool_set_link_ksettings' Fixes: bc93e19d088b ("net: ethernet: adi: Add ADIN1110 support") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402070626.eZsfVHG5-lkp@intel.com/ Cc: Lennart Franzen Cc: Alexandru Tachici Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Reviewed-by: Nuno Sa Signed-off-by: David S. Miller commit 66b60b0c8c4a163b022a9f0ad6769b0fd3dc662f Author: Kuniyuki Iwashima Date: Wed Feb 14 11:13:08 2024 -0800 dccp/tcp: Unhash sk from ehash for tb2 alloc failure after check_estalblished(). syzkaller reported a warning [0] in inet_csk_destroy_sock() with no repro. WARN_ON(inet_sk(sk)->inet_num && !inet_csk(sk)->icsk_bind_hash); However, the syzkaller's log hinted that connect() failed just before the warning due to FAULT_INJECTION. [1] When connect() is called for an unbound socket, we search for an available ephemeral port. If a bhash bucket exists for the port, we call __inet_check_established() or __inet6_check_established() to check if the bucket is reusable. If reusable, we add the socket into ehash and set inet_sk(sk)->inet_num. Later, we look up the corresponding bhash2 bucket and try to allocate it if it does not exist. Although it rarely occurs in real use, if the allocation fails, we must revert the changes by check_established(). Otherwise, an unconnected socket could illegally occupy an ehash entry. Note that we do not put tw back into ehash because sk might have already responded to a packet for tw and it would be better to free tw earlier under such memory presure. [0]: WARNING: CPU: 0 PID: 350830 at net/ipv4/inet_connection_sock.c:1193 inet_csk_destroy_sock (net/ipv4/inet_connection_sock.c:1193) Modules linked in: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 RIP: 0010:inet_csk_destroy_sock (net/ipv4/inet_connection_sock.c:1193) Code: 41 5c 41 5d 41 5e e9 2d 4a 3d fd e8 28 4a 3d fd 48 89 ef e8 f0 cd 7d ff 5b 5d 41 5c 41 5d 41 5e e9 13 4a 3d fd e8 0e 4a 3d fd <0f> 0b e9 61 fe ff ff e8 02 4a 3d fd 4c 89 e7 be 03 00 00 00 e8 05 RSP: 0018:ffffc9000b21fd38 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000009e78 RCX: ffffffff840bae40 RDX: ffff88806e46c600 RSI: ffffffff840bb012 RDI: ffff88811755cca8 RBP: ffff88811755c880 R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000009e78 R11: 0000000000000000 R12: ffff88811755c8e0 R13: ffff88811755c892 R14: ffff88811755c918 R15: 0000000000000000 FS: 00007f03e5243800(0000) GS:ffff88811ae00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b32f21000 CR3: 0000000112ffe001 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: ? inet_csk_destroy_sock (net/ipv4/inet_connection_sock.c:1193) dccp_close (net/dccp/proto.c:1078) inet_release (net/ipv4/af_inet.c:434) __sock_release (net/socket.c:660) sock_close (net/socket.c:1423) __fput (fs/file_table.c:377) __fput_sync (fs/file_table.c:462) __x64_sys_close (fs/open.c:1557 fs/open.c:1539 fs/open.c:1539) do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:129) RIP: 0033:0x7f03e53852bb Code: 03 00 00 00 0f 05 48 3d 00 f0 ff ff 77 41 c3 48 83 ec 18 89 7c 24 0c e8 43 c9 f5 ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 c9 f5 ff 8b 44 RSP: 002b:00000000005dfba0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f03e53852bb RDX: 0000000000000002 RSI: 0000000000000002 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000167c R10: 0000000008a79680 R11: 0000000000000293 R12: 00007f03e4e43000 R13: 00007f03e4e43170 R14: 00007f03e4e43178 R15: 00007f03e4e43170 [1]: FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 350833 Comm: syz-executor.1 Not tainted 6.7.0-12272-g2121c43f88f5 #9 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl (lib/dump_stack.c:107 (discriminator 1)) should_fail_ex (lib/fault-inject.c:52 lib/fault-inject.c:153) should_failslab (mm/slub.c:3748) kmem_cache_alloc (mm/slub.c:3763 mm/slub.c:3842 mm/slub.c:3867) inet_bind2_bucket_create (net/ipv4/inet_hashtables.c:135) __inet_hash_connect (net/ipv4/inet_hashtables.c:1100) dccp_v4_connect (net/dccp/ipv4.c:116) __inet_stream_connect (net/ipv4/af_inet.c:676) inet_stream_connect (net/ipv4/af_inet.c:747) __sys_connect_file (net/socket.c:2048 (discriminator 2)) __sys_connect (net/socket.c:2065) __x64_sys_connect (net/socket.c:2072) do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:129) RIP: 0033:0x7f03e5284e5d Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 73 9f 1b 00 f7 d8 64 89 01 48 RSP: 002b:00007f03e4641cc8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 00000000004bbf80 RCX: 00007f03e5284e5d RDX: 0000000000000010 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00000000004bbf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 000000000000000b R14: 00007f03e52e5530 R15: 0000000000000000 Reported-by: syzkaller Fixes: 28044fc1d495 ("net: Add a bhash2 table hashed by port and address") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 82a678e22d0bbfd8fd2b4581bd4cc848fe930abc Merge: b4ea9b6a18ebf f7a70d650b0b6 Author: David S. Miller Date: Fri Feb 16 09:36:38 2024 +0000 Merge branch 'bridge-mdb-events' Tobias Waldekranz says: ==================== net: bridge: switchdev: Ensure MDB events are delivered exactly once When a device is attached to a bridge, drivers will request a replay of objects that were created before the device joined the bridge, that are still of interest to the joining port. Typical examples include FDB entries and MDB memberships on other ports ("foreign interfaces") or on the bridge itself. Conversely when a device is detached, the bridge will synthesize deletion events for all those objects that are still live, but no longer applicable to the device in question. This series eliminates two races related to the synching and unsynching phases of a bridge's MDB with a joining or leaving device, that would cause notifications of such objects to be either delivered twice (1/2), or not at all (2/2). A similar race to the one solved by 1/2 still remains for the FDB. This is much harder to solve, due to the lockless operation of the FDB's rhashtable, and is therefore knowingly left out of this series. v1 -> v2: - Squash the previously separate addition of switchdev_port_obj_act_is_deferred into first consumer. - Use ether_addr_equal to compare MAC addresses. - Document switchdev_port_obj_act_is_deferred (renamed from switchdev_port_obj_is_deferred in v1, to indicate that we also match on the action). - Delay allocations of MDB objects until we know they're needed. - Use non-RCU version of the hash list iterator, now that the MDB is not scanned while holding the RCU read lock. - Add Fixes tag to commit message v2 -> v3: - Fix unlocking in error paths - Access RCU protected port list via mlock_dereference, since MDB is guaranteed to remain constant for the duration of the scan. v3 -> v4: - Limit the search for exiting deferred events in 1/2 to only apply to additions, since the problem does not exist in the deletion case. - Add 2/2, to plug a related race when unoffloading an indirectly associated device. v4 -> v5: - Fix grammatical errors in kerneldoc of switchdev_port_obj_act_is_deferred ==================== Signed-off-by: David S. Miller commit f7a70d650b0b6b0134ccba763d672c8439d9f09b Author: Tobias Waldekranz Date: Wed Feb 14 22:40:04 2024 +0100 net: bridge: switchdev: Ensure deferred event delivery on unoffload When unoffloading a device, it is important to ensure that all relevant deferred events are delivered to it before it disassociates itself from the bridge. Before this change, this was true for the normal case when a device maps 1:1 to a net_bridge_port, i.e. br0 / swp0 When swp0 leaves br0, the call to switchdev_deferred_process() in del_nbp() makes sure to process any outstanding events while the device is still associated with the bridge. In the case when the association is indirect though, i.e. when the device is attached to the bridge via an intermediate device, like a LAG... br0 / lag0 / swp0 ...then detaching swp0 from lag0 does not cause any net_bridge_port to be deleted, so there was no guarantee that all events had been processed before the device disassociated itself from the bridge. Fix this by always synchronously processing all deferred events before signaling completion of unoffloading back to the driver. Fixes: 4e51bf44a03a ("net: bridge: move the switchdev object replay helpers to "push" mode") Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit dc489f86257cab5056e747344f17a164f63bff4b Author: Tobias Waldekranz Date: Wed Feb 14 22:40:03 2024 +0100 net: bridge: switchdev: Skip MDB replays of deferred events on offload Before this change, generation of the list of MDB events to replay would race against the creation of new group memberships, either from the IGMP/MLD snooping logic or from user configuration. While new memberships are immediately visible to walkers of br->mdb_list, the notification of their existence to switchdev event subscribers is deferred until a later point in time. So if a replay list was generated during a time that overlapped with such a window, it would also contain a replay of the not-yet-delivered event. The driver would thus receive two copies of what the bridge internally considered to be one single event. On destruction of the bridge, only a single membership deletion event was therefore sent. As a consequence of this, drivers which reference count memberships (at least DSA), would be left with orphan groups in their hardware database when the bridge was destroyed. This is only an issue when replaying additions. While deletion events may still be pending on the deferred queue, they will already have been removed from br->mdb_list, so no duplicates can be generated in that scenario. To a user this meant that old group memberships, from a bridge in which a port was previously attached, could be reanimated (in hardware) when the port joined a new bridge, without the new bridge's knowledge. For example, on an mv88e6xxx system, create a snooping bridge and immediately add a port to it: root@infix-06-0b-00:~$ ip link add dev br0 up type bridge mcast_snooping 1 && \ > ip link set dev x3 up master br0 And then destroy the bridge: root@infix-06-0b-00:~$ ip link del dev br0 root@infix-06-0b-00:~$ mvls atu ADDRESS FID STATE Q F 0 1 2 3 4 5 6 7 8 9 a DEV:0 Marvell 88E6393X 33:33:00:00:00:6a 1 static - - 0 . . . . . . . . . . 33:33:ff:87:e4:3f 1 static - - 0 . . . . . . . . . . ff:ff:ff:ff:ff:ff 1 static - - 0 1 2 3 4 5 6 7 8 9 a root@infix-06-0b-00:~$ The two IPv6 groups remain in the hardware database because the port (x3) is notified of the host's membership twice: once via the original event and once via a replay. Since only a single delete notification is sent, the count remains at 1 when the bridge is destroyed. Then add the same port (or another port belonging to the same hardware domain) to a new bridge, this time with snooping disabled: root@infix-06-0b-00:~$ ip link add dev br1 up type bridge mcast_snooping 0 && \ > ip link set dev x3 up master br1 All multicast, including the two IPv6 groups from br0, should now be flooded, according to the policy of br1. But instead the old memberships are still active in the hardware database, causing the switch to only forward traffic to those groups towards the CPU (port 0). Eliminate the race in two steps: 1. Grab the write-side lock of the MDB while generating the replay list. This prevents new memberships from showing up while we are generating the replay list. But it leaves the scenario in which a deferred event was already generated, but not delivered, before we grabbed the lock. Therefore: 2. Make sure that no deferred version of a replay event is already enqueued to the switchdev deferred queue, before adding it to the replay list, when replaying additions. Fixes: 4f2673b3a2b6 ("net: bridge: add helper to replay port and host-joined mdb entries") Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit b4ea9b6a18ebf7f9f3a7a60f82e925186978cfcf Author: Alexander Gordeev Date: Wed Feb 14 17:32:40 2024 +0100 net/iucv: fix the allocation size of iucv_path_table array iucv_path_table is a dynamically allocated array of pointers to struct iucv_path items. Yet, its size is calculated as if it was an array of struct iucv_path items. Signed-off-by: Alexander Gordeev Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit d3d17e23d1a0d1f959b4fa55b35f1802d9c584fa Author: Mika Westerberg Date: Mon Feb 12 13:03:34 2024 +0200 thunderbolt: Fix NULL pointer dereference in tb_port_update_credits() Olliver reported that his system crashes when plugging in Thunderbolt 1 device: BUG: kernel NULL pointer dereference, address: 0000000000000020 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI RIP: 0010:tb_port_do_update_credits+0x1b/0x130 [thunderbolt] Call Trace: ? __die+0x23/0x70 ? page_fault_oops+0x171/0x4e0 ? exc_page_fault+0x7f/0x180 ? asm_exc_page_fault+0x26/0x30 ? tb_port_do_update_credits+0x1b/0x130 ? tb_switch_update_link_attributes+0x83/0xd0 tb_switch_add+0x7a2/0xfe0 tb_scan_port+0x236/0x6f0 tb_handle_hotplug+0x6db/0x900 process_one_work+0x171/0x340 worker_thread+0x27b/0x3a0 ? __pfx_worker_thread+0x10/0x10 kthread+0xe5/0x120 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x31/0x50 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 This is due the fact that some Thunderbolt 1 devices only have one lane adapter. Fix this by checking for the lane 1 before we read its credits. Reported-by: Olliver Schinagl Closes: https://lore.kernel.org/linux-usb/c24c7882-6254-4e68-8f22-f3e8f65dc84f@schinagl.nl/ Fixes: 81af2952e606 ("thunderbolt: Add support for asymmetric link") Cc: stable@vger.kernel.org Cc: Gil Fine Signed-off-by: Mika Westerberg commit ea69f782d0e37d9658d4b7df241661e651c43af5 Merge: 44395701ad85f 8c7bfd8262319 Author: Dave Airlie Date: Fri Feb 16 15:47:13 2024 +1000 Merge tag 'drm-msm-fixes-2024-02-15' of https://gitlab.freedesktop.org/drm/msm into drm-fixes Fixes for v6.8-rc5 GPU: - dmabuf vmap fix - a610 UBWC corruption fix (incorrect hbb) - revert a commit that was making GPU recovery unreliable - tlb invalidation fix Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGszDSiw66+a=ttBr-hat+zrcBtfc_cZ4LQqXu89DJ0UeQ@mail.gmail.com commit 44395701ad85f7cfc57858235dbbb2853656743c Merge: 427e337f7ad96 a8ac4bcaeb660 Author: Dave Airlie Date: Fri Feb 16 15:46:04 2024 +1000 Merge tag 'amd-drm-fixes-6.8-2024-02-15-2' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.8-2024-02-15-2: amdgpu: - PSR fixes - Suspend/resume fixes - Link training fix - Aspect ratio fix - DCN 3.5 fixes - VCN 4.x fix - GFX 11 fix - Misc display fixes - Misc small fixes amdkfd: - Cache size reporting fix - SIMD distribution fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240215192452.11805-1-alexander.deucher@amd.com commit 427e337f7ad96530027a4a31367cec1cacf19bb3 Merge: 7e1c3be3f9cd1 455dae7549aed Author: Dave Airlie Date: Fri Feb 16 15:45:03 2024 +1000 Merge tag 'drm-xe-fixes-2024-02-15' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Fix an out-of-bounds shift. - Fix the display code thinking xe uses shmem - Fix a warning about index out-of-bound - Fix a clang-16 compilation warning Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/Zc4GpcrbFVqdK9Ws@fedora commit 7e1c3be3f9cd1960cd0a660abfc164d0a37c20f1 Merge: 38df7e5e6cb5d ad26d56d08078 Author: Dave Airlie Date: Fri Feb 16 15:44:36 2024 +1000 Merge tag 'drm-intel-fixes-2024-02-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes Fix for #10172: Blank screen on JSL Chromebooks. Stable fix to limit DP SST link rate to <=8.1Gbps. Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/Zc37W27F5OvoeSkG@jlahtine-mobl.ger.corp.intel.com commit 38df7e5e6cb5d2572e0edadc21adc81470b3f664 Merge: 841c35169323c a64056bb5a321 Author: Dave Airlie Date: Fri Feb 16 14:33:09 2024 +1000 Merge tag 'drm-misc-fixes-2024-02-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A suspend/resume error fix for ivpu, a couple of scheduler fixes for nouveau, a patch to support large page arrays in prime, a uninitialized variable fix in crtc, a locking fix in rockchip/vop2 and a buddy allocator error reporting fix. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/b4ffqzigtfh6cgzdpwuk6jlrv3dnk4hu6etiizgvibysqgtl2p@42n2gdfdd5eu commit 4860abb91f3d7fbaf8147d54782149bb1fc45892 Author: Steve French Date: Tue Feb 6 16:34:22 2024 -0600 smb: Fix regression in writes when non-standard maximum write size negotiated The conversion to netfs in the 6.3 kernel caused a regression when maximum write size is set by the server to an unexpected value which is not a multiple of 4096 (similarly if the user overrides the maximum write size by setting mount parm "wsize", but sets it to a value that is not a multiple of 4096). When negotiated write size is not a multiple of 4096 the netfs code can skip the end of the final page when doing large sequential writes, causing data corruption. This section of code is being rewritten/removed due to a large netfs change, but until that point (ie for the 6.3 kernel until now) we can not support non-standard maximum write sizes. Add a warning if a user specifies a wsize on mount that is not a multiple of 4096 (and round down), also add a change where we round down the maximum write size if the server negotiates a value that is not a multiple of 4096 (we also have to check to make sure that we do not round it down to zero). Reported-by: R. Diez" Fixes: d08089f649a0 ("cifs: Change the I/O paths to use an iterator rather than a page list") Suggested-by: Ronnie Sahlberg Acked-by: Ronnie Sahlberg Tested-by: Matthew Ruffell Reviewed-by: Shyam Prasad N Cc: stable@vger.kernel.org # v6.3+ Cc: David Howells Signed-off-by: Steve French commit 54d46c9f581d16ac6adad3c3e61766e02bbfcb60 Merge: e37243b65d528 be66d79189ec8 Author: Alexei Starovoitov Date: Thu Feb 15 19:21:39 2024 -0800 Merge branch 'fix-the-read-of-vsyscall-page-through-bpf' Hou Tao says: ==================== Fix the read of vsyscall page through bpf From: Hou Tao Hi, As reported by syzboot [1] and [2], when trying to read vsyscall page by using bpf_probe_read_kernel() or bpf_probe_read(), oops may happen. Thomas Gleixner had proposed a test patch [3], but it seems that no formal patch is posted after about one month [4], so I post it instead and add an Originally-by tag in patch #2. Patch #1 makes is_vsyscall_vaddr() being a common helper. Patch #2 fixes the problem by disallowing vsyscall page read for copy_from_kernel_nofault(). Patch #3 adds one test case to ensure the read of vsyscall page through bpf is rejected. Please see individual patches for more details. Comments are always welcome. [1]: https://lore.kernel.org/bpf/CAG48ez06TZft=ATH1qh2c5mpS5BT8UakwNkzi6nvK5_djC-4Nw@mail.gmail.com/ [2]: https://lore.kernel.org/bpf/CABOYnLynjBoFZOf3Z4BhaZkc5hx_kHfsjiW+UWLoB=w33LvScw@mail.gmail.com/ [3]: https://lore.kernel.org/bpf/87r0jwquhv.ffs@tglx/ [4]: https://lore.kernel.org/bpf/e24b125c-8ff4-9031-6c53-67ff2e01f316@huaweicloud.com/ Change Log: v3: * rephrase commit message for patch #1 & #2 (Sohil) * reword comments in copy_from_kernel_nofault_allowed() (Sohil) * add Rvb tag for patch #1 and Acked-by tag for patch #3 (Sohil, Yonghong) v2: https://lore.kernel.org/bpf/20240126115423.3943360-1-houtao@huaweicloud.com/ * move is_vsyscall_vaddr to asm/vsyscall.h instead (Sohil) * elaborate on the reason for disallowing of vsyscall page read in copy_from_kernel_nofault_allowed() (Sohil) * update the commit message of patch #2 to more clearly explain how the oops occurs. (Sohil) * update the commit message of patch #3 to explain the expected return values of various bpf helpers (Yonghong) v1: https://lore.kernel.org/bpf/20240119073019.1528573-1-houtao@huaweicloud.com/ ==================== Link: https://lore.kernel.org/r/20240202103935.3154011-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit be66d79189ec8a1006ec6ec302bb27b160b3e6ce Author: Hou Tao Date: Fri Feb 2 18:39:35 2024 +0800 selftest/bpf: Test the read of vsyscall page under x86-64 Under x86-64, when using bpf_probe_read_kernel{_str}() or bpf_probe_read{_str}() to read vsyscall page, the read may trigger oops, so add one test case to ensure that the problem is fixed. Beside those four bpf helpers mentioned above, testing the read of vsyscall page by using bpf_probe_read_user{_str} and bpf_copy_from_user{_task}() as well. The test case passes the address of vsyscall page to these six helpers and checks whether the returned values are expected: 1) For bpf_probe_read_kernel{_str}()/bpf_probe_read{_str}(), the expected return value is -ERANGE as shown below: bpf_probe_read_kernel_common copy_from_kernel_nofault // false, return -ERANGE copy_from_kernel_nofault_allowed 2) For bpf_probe_read_user{_str}(), the expected return value is -EFAULT as show below: bpf_probe_read_user_common copy_from_user_nofault // false, return -EFAULT __access_ok 3) For bpf_copy_from_user(), the expected return value is -EFAULT: // return -EFAULT bpf_copy_from_user copy_from_user _copy_from_user // return false access_ok 4) For bpf_copy_from_user_task(), the expected return value is -EFAULT: // return -EFAULT bpf_copy_from_user_task access_process_vm // return 0 vma_lookup() // return 0 expand_stack() The occurrence of oops depends on the availability of CPU SMAP [1] feature and there are three possible configurations of vsyscall page in the boot cmd-line: vsyscall={xonly|none|emulate}, so there are a total of six possible combinations. Under all these combinations, the test case runs successfully. [1]: https://en.wikipedia.org/wiki/Supervisor_Mode_Access_Prevention Acked-by: Yonghong Song Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20240202103935.3154011-4-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 32019c659ecfe1d92e3bf9fcdfbb11a7c70acd58 Author: Hou Tao Date: Fri Feb 2 18:39:34 2024 +0800 x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault() When trying to use copy_from_kernel_nofault() to read vsyscall page through a bpf program, the following oops was reported: BUG: unable to handle page fault for address: ffffffffff600000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 3231067 P4D 3231067 PUD 3233067 PMD 3235067 PTE 0 Oops: 0000 [#1] PREEMPT SMP PTI CPU: 1 PID: 20390 Comm: test_progs ...... 6.7.0+ #58 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) ...... RIP: 0010:copy_from_kernel_nofault+0x6f/0x110 ...... Call Trace: ? copy_from_kernel_nofault+0x6f/0x110 bpf_probe_read_kernel+0x1d/0x50 bpf_prog_2061065e56845f08_do_probe_read+0x51/0x8d trace_call_bpf+0xc5/0x1c0 perf_call_bpf_enter.isra.0+0x69/0xb0 perf_syscall_enter+0x13e/0x200 syscall_trace_enter+0x188/0x1c0 do_syscall_64+0xb5/0xe0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 ...... ---[ end trace 0000000000000000 ]--- The oops is triggered when: 1) A bpf program uses bpf_probe_read_kernel() to read from the vsyscall page and invokes copy_from_kernel_nofault() which in turn calls __get_user_asm(). 2) Because the vsyscall page address is not readable from kernel space, a page fault exception is triggered accordingly. 3) handle_page_fault() considers the vsyscall page address as a user space address instead of a kernel space address. This results in the fix-up setup by bpf not being applied and a page_fault_oops() is invoked due to SMAP. Considering handle_page_fault() has already considered the vsyscall page address as a userspace address, fix the problem by disallowing vsyscall page read for copy_from_kernel_nofault(). Originally-by: Thomas Gleixner Reported-by: syzbot+72aa0161922eba61b50e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/bpf/CAG48ez06TZft=ATH1qh2c5mpS5BT8UakwNkzi6nvK5_djC-4Nw@mail.gmail.com Reported-by: xingwei lee Closes: https://lore.kernel.org/bpf/CABOYnLynjBoFZOf3Z4BhaZkc5hx_kHfsjiW+UWLoB=w33LvScw@mail.gmail.com Signed-off-by: Hou Tao Reviewed-by: Sohil Mehta Acked-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240202103935.3154011-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit ee0e39a63b78849f8abbef268b13e4838569f646 Author: Hou Tao Date: Fri Feb 2 18:39:33 2024 +0800 x86/mm: Move is_vsyscall_vaddr() into asm/vsyscall.h Move is_vsyscall_vaddr() into asm/vsyscall.h to make it available for copy_from_kernel_nofault_allowed() in arch/x86/mm/maccess.c. Reviewed-by: Sohil Mehta Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20240202103935.3154011-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 14db5f64a971fce3d8ea35de4dfc7f443a3efb92 Author: Damien Le Moal Date: Thu Feb 8 17:26:59 2024 +0900 zonefs: Improve error handling Write error handling is racy and can sometime lead to the error recovery path wrongly changing the inode size of a sequential zone file to an incorrect value which results in garbage data being readable at the end of a file. There are 2 problems: 1) zonefs_file_dio_write() updates a zone file write pointer offset after issuing a direct IO with iomap_dio_rw(). This update is done only if the IO succeed for synchronous direct writes. However, for asynchronous direct writes, the update is done without waiting for the IO completion so that the next asynchronous IO can be immediately issued. However, if an asynchronous IO completes with a failure right before the i_truncate_mutex lock protecting the update, the update may change the value of the inode write pointer offset that was corrected by the error path (zonefs_io_error() function). 2) zonefs_io_error() is called when a read or write error occurs. This function executes a report zone operation using the callback function zonefs_io_error_cb(), which does all the error recovery handling based on the current zone condition, write pointer position and according to the mount options being used. However, depending on the zoned device being used, a report zone callback may be executed in a context that is different from the context of __zonefs_io_error(). As a result, zonefs_io_error_cb() may be executed without the inode truncate mutex lock held, which can lead to invalid error processing. Fix both problems as follows: - Problem 1: Perform the inode write pointer offset update before a direct write is issued with iomap_dio_rw(). This is safe to do as partial direct writes are not supported (IOMAP_DIO_PARTIAL is not set) and any failed IO will trigger the execution of zonefs_io_error() which will correct the inode write pointer offset to reflect the current state of the one on the device. - Problem 2: Change zonefs_io_error_cb() into zonefs_handle_io_error() and call this function directly from __zonefs_io_error() after obtaining the zone information using blkdev_report_zones() with a simple callback function that copies to a local stack variable the struct blk_zone obtained from the device. This ensures that error handling is performed holding the inode truncate mutex. This change also simplifies error handling for conventional zone files by bypassing the execution of report zones entirely. This is safe to do because the condition of conventional zones cannot be read-only or offline and conventional zone files are always fully mapped with a constant file size. Reported-by: Shin'ichiro Kawasaki Fixes: 8dcc1a9d90c1 ("fs: New zonefs file system") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Tested-by: Shin'ichiro Kawasaki Reviewed-by: Johannes Thumshirn Reviewed-by: Himanshu Madhani commit 9e46c70e829bddc24e04f963471e9983a11598b7 Author: Yu Kuai Date: Thu Feb 1 17:25:50 2024 +0800 md: Don't suspend the array for interrupted reshape md_start_sync() will suspend the array if there are spares that can be added or removed from conf, however, if reshape is still in progress, this won't happen at all or data will be corrupted(remove_and_add_spares won't be called from md_choose_sync_action for reshape), hence there is no need to suspend the array if reshape is not done yet. Meanwhile, there is a potential deadlock for raid456: 1) reshape is interrupted; 2) set one of the disk WantReplacement, and add a new disk to the array, however, recovery won't start until the reshape is finished; 3) then issue an IO across reshpae position, this IO will wait for reshape to make progress; 4) continue to reshape, then md_start_sync() found there is a spare disk that can be added to conf, mddev_suspend() is called; Step 4 and step 3 is waiting for each other, deadlock triggered. Noted this problem is found by code review, and it's not reporduced yet. Fix this porblem by don't suspend the array for interrupted reshape, this is safe because conf won't be changed until reshape is done. Fixes: bc08041b32ab ("md: suspend array in md_start_sync() if array need reconfiguration") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240201092559.910982-6-yukuai1@huaweicloud.com commit ad39c08186f8a0f221337985036ba86731d6aafe Author: Yu Kuai Date: Thu Feb 1 17:25:49 2024 +0800 md: Don't register sync_thread for reshape directly Currently, if reshape is interrupted, then reassemble the array will register sync_thread directly from pers->run(), in this case 'MD_RECOVERY_RUNNING' is set directly, however, there is no guarantee that md_do_sync() will be executed, hence stop_sync_thread() will hang because 'MD_RECOVERY_RUNNING' can't be cleared. Last patch make sure that md_do_sync() will set MD_RECOVERY_DONE, however, following hang can still be triggered by dm-raid test shell/lvconvert-raid-reshape.sh occasionally: [root@fedora ~]# cat /proc/1982/stack [<0>] stop_sync_thread+0x1ab/0x270 [md_mod] [<0>] md_frozen_sync_thread+0x5c/0xa0 [md_mod] [<0>] raid_presuspend+0x1e/0x70 [dm_raid] [<0>] dm_table_presuspend_targets+0x40/0xb0 [dm_mod] [<0>] __dm_destroy+0x2a5/0x310 [dm_mod] [<0>] dm_destroy+0x16/0x30 [dm_mod] [<0>] dev_remove+0x165/0x290 [dm_mod] [<0>] ctl_ioctl+0x4bb/0x7b0 [dm_mod] [<0>] dm_ctl_ioctl+0x11/0x20 [dm_mod] [<0>] vfs_ioctl+0x21/0x60 [<0>] __x64_sys_ioctl+0xb9/0xe0 [<0>] do_syscall_64+0xc6/0x230 [<0>] entry_SYSCALL_64_after_hwframe+0x6c/0x74 Meanwhile mddev->recovery is: MD_RECOVERY_RUNNING | MD_RECOVERY_INTR | MD_RECOVERY_RESHAPE | MD_RECOVERY_FROZEN Fix this problem by remove the code to register sync_thread directly from raid10 and raid5. And let md_check_recovery() to register sync_thread. Fixes: f67055780caa ("[PATCH] md: Checkpoint and allow restart of raid5 reshape") Fixes: f52f5c71f3d4 ("md: fix stopping sync thread") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240201092559.910982-5-yukuai1@huaweicloud.com commit 82ec0ae59d02e89164b24c0cc8e4e50de78b5fd6 Author: Yu Kuai Date: Thu Feb 1 17:25:48 2024 +0800 md: Make sure md_do_sync() will set MD_RECOVERY_DONE stop_sync_thread() will interrupt md_do_sync(), and md_do_sync() must set MD_RECOVERY_DONE, so that follow up md_check_recovery() will unregister sync_thread, clear MD_RECOVERY_RUNNING and wake up stop_sync_thread(). If MD_RECOVERY_WAIT is set or the array is read-only, md_do_sync() will return without setting MD_RECOVERY_DONE, and after commit f52f5c71f3d4 ("md: fix stopping sync thread"), dm-raid switch from md_reap_sync_thread() to stop_sync_thread() to unregister sync_thread from md_stop() and md_stop_writes(), causing the test shell/lvconvert-raid-reshape.sh hang. We shouldn't switch back to md_reap_sync_thread() because it's problematic in the first place. Fix the problem by making sure md_do_sync() will set MD_RECOVERY_DONE. Reported-by: Mikulas Patocka Closes: https://lore.kernel.org/all/ece2b06f-d647-6613-a534-ff4c9bec1142@redhat.com/ Fixes: d5d885fd514f ("md: introduce new personality funciton start()") Fixes: 5fd6c1dce06e ("[PATCH] md: allow checkpoint of recovery with version-1 superblock") Fixes: f52f5c71f3d4 ("md: fix stopping sync thread") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240201092559.910982-4-yukuai1@huaweicloud.com commit 55a48ad2db64737f7ffc0407634218cc6e4c513b Author: Yu Kuai Date: Thu Feb 1 17:25:47 2024 +0800 md: Don't ignore read-only array in md_check_recovery() Usually if the array is not read-write, md_check_recovery() won't register new sync_thread in the first place. And if the array is read-write and sync_thread is registered, md_set_readonly() will unregister sync_thread before setting the array read-only. md/raid follow this behavior hence there is no problem. After commit f52f5c71f3d4 ("md: fix stopping sync thread"), following hang can be triggered by test shell/integrity-caching.sh: 1) array is read-only. dm-raid update super block: rs_update_sbs ro = mddev->ro mddev->ro = 0 -> set array read-write md_update_sb 2) register new sync thread concurrently. 3) dm-raid set array back to read-only: rs_update_sbs mddev->ro = ro 4) stop the array: raid_dtr md_stop stop_sync_thread set_bit(MD_RECOVERY_INTR, &mddev->recovery); md_wakeup_thread_directly(mddev->sync_thread); wait_event(..., !test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) 5) sync thread done: md_do_sync set_bit(MD_RECOVERY_DONE, &mddev->recovery); md_wakeup_thread(mddev->thread); 6) daemon thread can't unregister sync thread: md_check_recovery if (!md_is_rdwr(mddev) && !test_bit(MD_RECOVERY_NEEDED, &mddev->recovery)) return; -> -> MD_RECOVERY_RUNNING can't be cleared, hence step 4 hang; The root cause is that dm-raid manipulate 'mddev->ro' by itself, however, dm-raid really should stop sync thread before setting the array read-only. Unfortunately, I need to read more code before I can refacter the handler of 'mddev->ro' in dm-raid, hence let's fix the problem the easy way for now to prevent dm-raid regression. Reported-by: Mikulas Patocka Closes: https://lore.kernel.org/all/9801e40-8ac7-e225-6a71-309dcf9dc9aa@redhat.com/ Fixes: ecbfb9f118bc ("dm raid: add raid level takeover support") Fixes: f52f5c71f3d4 ("md: fix stopping sync thread") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240201092559.910982-3-yukuai1@huaweicloud.com commit 1baae052cccd08daf9a9d64c3f959d8cdb689757 Author: Yu Kuai Date: Thu Feb 1 17:25:46 2024 +0800 md: Don't ignore suspended array in md_check_recovery() mddev_suspend() never stop sync_thread, hence it doesn't make sense to ignore suspended array in md_check_recovery(), which might cause sync_thread can't be unregistered. After commit f52f5c71f3d4 ("md: fix stopping sync thread"), following hang can be triggered by test shell/integrity-caching.sh: 1) suspend the array: raid_postsuspend mddev_suspend 2) stop the array: raid_dtr md_stop __md_stop_writes stop_sync_thread set_bit(MD_RECOVERY_INTR, &mddev->recovery); md_wakeup_thread_directly(mddev->sync_thread); wait_event(..., !test_bit(MD_RECOVERY_RUNNING, &mddev->recovery)) 3) sync thread done: md_do_sync set_bit(MD_RECOVERY_DONE, &mddev->recovery); md_wakeup_thread(mddev->thread); 4) daemon thread can't unregister sync thread: md_check_recovery if (mddev->suspended) return; -> return directly md_read_sync_thread clear_bit(MD_RECOVERY_RUNNING, &mddev->recovery); -> MD_RECOVERY_RUNNING can't be cleared, hence step 2 hang; This problem is not just related to dm-raid, fix it by ignoring suspended array in md_check_recovery(). And follow up patches will improve dm-raid better to frozen sync thread during suspend. Reported-by: Mikulas Patocka Closes: https://lore.kernel.org/all/8fb335e-6d2c-dbb5-d7-ded8db5145a@redhat.com/ Fixes: 68866e425be2 ("MD: no sync IO while suspended") Fixes: f52f5c71f3d4 ("md: fix stopping sync thread") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240201092559.910982-2-yukuai1@huaweicloud.com commit 9ddf190a7df77b77817f955fdb9c2ae9d1c9c9a3 Author: Randy Dunlap Date: Tue Feb 13 21:59:53 2024 -0800 scsi: jazz_esp: Only build if SCSI core is builtin JAZZ_ESP is a bool kconfig symbol that selects SCSI_SPI_ATTRS. When CONFIG_SCSI=m, this results in SCSI_SPI_ATTRS=m while JAZZ_ESP=y, which causes many undefined symbol linker errors. Fix this by only offering to build this driver when CONFIG_SCSI=y. [mkp: JAZZ_ESP is unique in that it does not support being compiled as a module unlike the remaining SPI SCSI HBA drivers] Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20240214055953.9612-1-rdunlap@infradead.org Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Cc: Arnd Bergmann Cc: Masahiro Yamada Cc: Nicolas Schier Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: linux-scsi@vger.kernel.org Cc: Geert Uytterhoeven Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402112222.Gl0udKyU-lkp@intel.com/ Signed-off-by: Martin K. Petersen commit 5761eb9761d2d5fe8248a9b719efc4d8baf1f24a Author: Don Brace Date: Tue Feb 13 10:22:00 2024 -0600 scsi: smartpqi: Fix disable_managed_interrupts Correct blk-mq registration issue with module parameter disable_managed_interrupts enabled. When we turn off the default PCI_IRQ_AFFINITY flag, the driver needs to register with blk-mq using blk_mq_map_queues(). The driver is currently calling blk_mq_pci_map_queues() which results in a stack trace and possibly undefined behavior. Stack Trace: [ 7.860089] scsi host2: smartpqi [ 7.871934] WARNING: CPU: 0 PID: 238 at block/blk-mq-pci.c:52 blk_mq_pci_map_queues+0xca/0xd0 [ 7.889231] Modules linked in: sd_mod t10_pi sg uas smartpqi(+) crc32c_intel scsi_transport_sas usb_storage dm_mirror dm_region_hash dm_log dm_mod ipmi_devintf ipmi_msghandler fuse [ 7.924755] CPU: 0 PID: 238 Comm: kworker/0:3 Not tainted 4.18.0-372.88.1.el8_6_smartpqi_test.x86_64 #1 [ 7.944336] Hardware name: HPE ProLiant DL380 Gen10/ProLiant DL380 Gen10, BIOS U30 03/08/2022 [ 7.963026] Workqueue: events work_for_cpu_fn [ 7.978275] RIP: 0010:blk_mq_pci_map_queues+0xca/0xd0 [ 7.978278] Code: 48 89 de 89 c7 e8 f6 0f 4f 00 3b 05 c4 b7 8e 01 72 e1 5b 31 c0 5d 41 5c 41 5d 41 5e 41 5f e9 7d df 73 00 31 c0 e9 76 df 73 00 <0f> 0b eb bc 90 90 0f 1f 44 00 00 41 57 49 89 ff 41 56 41 55 41 54 [ 7.978280] RSP: 0018:ffffa95fc3707d50 EFLAGS: 00010216 [ 7.978283] RAX: 00000000ffffffff RBX: 0000000000000000 RCX: 0000000000000010 [ 7.978284] RDX: 0000000000000004 RSI: 0000000000000000 RDI: ffff9190c32d4310 [ 7.978286] RBP: 0000000000000000 R08: ffffa95fc3707d38 R09: ffff91929b81ac00 [ 7.978287] R10: 0000000000000001 R11: ffffa95fc3707ac0 R12: 0000000000000000 [ 7.978288] R13: ffff9190c32d4000 R14: 00000000ffffffff R15: ffff9190c4c950a8 [ 7.978290] FS: 0000000000000000(0000) GS:ffff9193efc00000(0000) knlGS:0000000000000000 [ 7.978292] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 8.172814] CR2: 000055d11166c000 CR3: 00000002dae10002 CR4: 00000000007706f0 [ 8.172816] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 8.172817] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 8.172818] PKRU: 55555554 [ 8.172819] Call Trace: [ 8.172823] blk_mq_alloc_tag_set+0x12e/0x310 [ 8.264339] scsi_add_host_with_dma.cold.9+0x30/0x245 [ 8.279302] pqi_ctrl_init+0xacf/0xc8e [smartpqi] [ 8.294085] ? pqi_pci_probe+0x480/0x4c8 [smartpqi] [ 8.309015] pqi_pci_probe+0x480/0x4c8 [smartpqi] [ 8.323286] local_pci_probe+0x42/0x80 [ 8.337855] work_for_cpu_fn+0x16/0x20 [ 8.351193] process_one_work+0x1a7/0x360 [ 8.364462] ? create_worker+0x1a0/0x1a0 [ 8.379252] worker_thread+0x1ce/0x390 [ 8.392623] ? create_worker+0x1a0/0x1a0 [ 8.406295] kthread+0x10a/0x120 [ 8.418428] ? set_kthread_struct+0x50/0x50 [ 8.431532] ret_from_fork+0x1f/0x40 [ 8.444137] ---[ end trace 1bf0173d39354506 ]--- Fixes: cf15c3e734e8 ("scsi: smartpqi: Add module param to disable managed ints") Tested-by: Yogesh Chandra Pandey Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mahesh Rajashekhara Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20240213162200.1875970-2-don.brace@microchip.com Reviewed-by: Tomas Henzl Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit f2dced9d1992824d677593072bc20eccf66ac5d5 Author: Dan Carpenter Date: Tue Feb 13 21:08:09 2024 +0300 scsi: ufs: Uninitialized variable in ufshcd_devfreq_target() There is one goto where "sched_clk_scaling_suspend_work" is true but "scale_up" is uninitialized. It leads to a Smatch uninitialized variable warning: drivers/ufs/core/ufshcd.c:1589 ufshcd_devfreq_target() error: uninitialized symbol 'scale_up'. Fixes: 1d969731b87f ("scsi: ufs: core: Only suspend clock scaling if scaling down") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/c787d37f-1107-4512-8991-bccf80e74a35@moroto.mountain Reviewed-by: Peter Wang Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit de959094eb2197636f7c803af0943cb9d3b35804 Author: Naohiro Aota Date: Wed Feb 14 23:43:56 2024 +0900 scsi: target: pscsi: Fix bio_put() for error case As of commit 066ff571011d ("block: turn bio_kmalloc into a simple kmalloc wrapper"), a bio allocated by bio_kmalloc() must be freed by bio_uninit() and kfree(). That is not done properly for the error case, hitting WARN and NULL pointer dereference in bio_free(). Fixes: 066ff571011d ("block: turn bio_kmalloc into a simple kmalloc wrapper") CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Naohiro Aota Link: https://lore.kernel.org/r/20240214144356.101814-1-naohiro.aota@wdc.com Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit b5fc07a5fb56216a49e6c1d0b172d5464d99a89b Author: Martin K. Petersen Date: Wed Feb 14 17:14:11 2024 -0500 scsi: core: Consult supported VPD page list prior to fetching page Commit c92a6b5d6335 ("scsi: core: Query VPD size before getting full page") removed the logic which checks whether a VPD page is present on the supported pages list before asking for the page itself. That was done because SPC helpfully states "The Supported VPD Pages VPD page list may or may not include all the VPD pages that are able to be returned by the device server". Testing had revealed a few devices that supported some of the 0xBn pages but didn't actually list them in page 0. Julian Sikorski bisected a problem with his drive resetting during discovery to the commit above. As it turns out, this particular drive firmware will crash if we attempt to fetch page 0xB9. Various approaches were attempted to work around this. In the end, reinstating the logic that consults VPD page 0 before fetching any other page was the path of least resistance. A firmware update for the devices which originally compelled us to remove the check has since been released. Link: https://lore.kernel.org/r/20240214221411.2888112-1-martin.petersen@oracle.com Fixes: c92a6b5d6335 ("scsi: core: Query VPD size before getting full page") Cc: stable@vger.kernel.org Cc: Bart Van Assche Reported-by: Julian Sikorski Tested-by: Julian Sikorski Reviewed-by: Lee Duncan Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 4f5e5092fdbf5cec6bedc19fbe69cce4f5f08372 Merge: cc9c4f0b3113d c40c0d3a768c7 Author: Linus Torvalds Date: Thu Feb 15 11:39:27 2024 -0800 Merge tag 'net-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from can, wireless and netfilter. Current release - regressions: - af_unix: fix task hung while purging oob_skb in GC - pds_core: do not try to run health-thread in VF path Current release - new code bugs: - sched: act_mirred: don't zero blockid when net device is being deleted Previous releases - regressions: - netfilter: - nat: restore default DNAT behavior - nf_tables: fix bidirectional offload, broken when unidirectional offload support was added - openvswitch: limit the number of recursions from action sets - eth: i40e: do not allow untrusted VF to remove administratively set MAC address Previous releases - always broken: - tls: fix races and bugs in use of async crypto - mptcp: prevent data races on some of the main socket fields, fix races in fastopen handling - dpll: fix possible deadlock during netlink dump operation - dsa: lan966x: fix crash when adding interface under a lag when some of the ports are disabled - can: j1939: prevent deadlock by changing j1939_socks_lock to rwlock Misc: - a handful of fixes and reliability improvements for selftests - fix sysfs documentation missing net/ in paths - finish the work of squashing the missing MODULE_DESCRIPTION() warnings in networking" * tag 'net-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (92 commits) net: fill in MODULE_DESCRIPTION()s for missing arcnet net: fill in MODULE_DESCRIPTION()s for mdio_devres net: fill in MODULE_DESCRIPTION()s for ppp net: fill in MODULE_DESCRIPTION()s for fddik/skfp net: fill in MODULE_DESCRIPTION()s for plip net: fill in MODULE_DESCRIPTION()s for ieee802154/fakelb net: fill in MODULE_DESCRIPTION()s for xen-netback net: ravb: Count packets instead of descriptors in GbEth RX path pppoe: Fix memory leak in pppoe_sendmsg() net: sctp: fix skb leak in sctp_inq_free() net: bcmasp: Handle RX buffer allocation failure net-timestamp: make sk_tskey more predictable in error path selftests: tls: increase the wait in poll_partial_rec_async ice: Add check for lport extraction to LAG init netfilter: nf_tables: fix bidirectional offload regression netfilter: nat: restore default DNAT behavior netfilter: nft_set_pipapo: fix missing : in kdoc igc: Remove temporary workaround igb: Fix string truncation warnings in igb_set_fw_version can: netlink: Fix TDCO calculation using the old data bittiming ... commit cc9c4f0b3113d513a94bcf489f2fa8cb9cc7c679 Merge: 68fb3ca0e408e fa765c4b4aed2 Author: Linus Torvalds Date: Thu Feb 15 11:33:35 2024 -0800 Merge tag 'for-linus-6.8a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Fixes and simple cleanups: - use a proper flexible array instead of a one-element array in order to avoid array-bounds sanitizer errors - add NULL pointer checks after allocating memory - use memdup_array_user() instead of open-coding it - fix a rare race condition in Xen event channel allocation code - make struct bus_type instances const - make kerneldoc inline comments match reality" * tag 'for-linus-6.8a-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/events: close evtchn after mapping cleanup xen/gntalloc: Replace UAPI 1-element array xen: balloon: make balloon_subsys const xen: pcpu: make xen_pcpu_subsys const xen/privcmd: Use memdup_array_user() in alloc_ioreq() x86/xen: Add some null pointer checking to smp.c xen/xenbus: document will_handle argument for xenbus_watch_path() commit a8ac4bcaeb660c5eeb273507e8dbf713ba56de44 Author: Rajneesh Bhardwaj Date: Fri Feb 9 20:23:19 2024 -0500 drm/amdgpu: Fix implicit assumtion in gfx11 debug flags Gfx11 debug flags mask is currently set with an implicit assumption that no other mqd update flags exist. This needs to be fixed with newly introduced flag UPDATE_FLAG_IS_GWS by the previous patch. Reviewed-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit e3de58f8fd5bda8685bb87bf7457bbc10479765b Author: Rajneesh Bhardwaj Date: Wed Jan 31 19:33:49 2024 -0500 drm/amdkfd: update SIMD distribution algo for GFXIP 9.4.2 onwards In certain cooperative group dispatch scenarios the default SPI resource allocation may cause reduced per-CU workgroup occupancy. Set COMPUTE_RESOURCE_LIMITS.FORCE_SIMD_DIST=1 to mitigate soft hang scenarions. Reviewed-by: Felix Kuehling Suggested-by: Joseph Greathouse Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit 0d555e481c1333c8ae170198ca111947c22fc9c9 Author: Nicholas Kazlauskas Date: Tue Jan 23 12:20:06 2024 -0500 drm/amd/display: Increase ips2_eval delay for DCN35 [Why] New worst-case measurement observed at 1897us. [How] Increase to 2000us to cover the new worst case + margin. Reviewed-by: Ovidiu Bunea Acked-by: Aurabindo Pillai Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a82197e3a5f45450cbaf92095d8a51249dc44c79 Author: Srinivasan Shanmugam Date: Sun Feb 11 09:04:19 2024 +0530 drm/amdgpu/display: Initialize gamma correction mode variable in dcn30_get_gamcor_current() The dcn30_get_gamcor_current() function is responsible for determining the current gamma correction mode used by the display controller. However, the 'mode' variable, which stores the gamma correction mode, was not initialized before its first usage, leading to an uninitialized symbol error. Thus initializes the 'mode' variable with a default value of LUT_BYPASS before the conditional statements in the function, improves code clarity and stability, ensuring correct behavior of the dcn30_get_gamcor_current() function in determining the gamma correction mode. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp_cm.c:77 dpp30_get_gamcor_current() error: uninitialized symbol 'mode'. Fixes: 03f54d7d3448 ("drm/amd/display: Add DCN3 DPP") Cc: Bhawanpreet Lakha Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Cc: Tom Chung Signed-off-by: Srinivasan Shanmugam Suggested-by: Roman Li Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 2f542421a47e8246e9b7d2c6508fe3a6e6c63078 Author: Thong Date: Tue Feb 6 18:05:16 2024 -0500 drm/amdgpu/soc21: update VCN 4 max HEVC encoding resolution Update the maximum resolution reported for HEVC encoding on VCN 4 devices to reflect its 8K encoding capability. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3159 Signed-off-by: Thong Reviewed-by: Ruijing Dong Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0484e05d048b66d01d1f3c1d2306010bb57d8738 Author: Sohaib Nadeem Date: Wed Jan 31 16:40:37 2024 -0500 drm/amd/display: fixed integer types and null check locations [why]: issues fixed: - comparison with wider integer type in loop condition which can cause infinite loops - pointer dereference before null check Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Josip Pavic Acked-by: Aurabindo Pillai Signed-off-by: Sohaib Nadeem Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 46806e59a87790760870d216f54951a5b4d545bc Author: Roman Li Date: Tue Jan 30 18:07:24 2024 -0500 drm/amd/display: Fix array-index-out-of-bounds in dcn35_clkmgr [Why] There is a potential memory access violation while iterating through array of dcn35 clks. [How] Limit iteration per array size. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit deb110292180cd501f6fde2a0178d65fcbcabb0c Author: Tom Chung Date: Tue Jan 30 15:34:08 2024 +0800 drm/amd/display: Preserve original aspect ratio in create stream [Why] The original picture aspect ratio in mode struct may have chance be overwritten with wrong aspect ratio data in create_stream_for_sink(). It will create a different VIC output and cause HDMI compliance test failed. [How] Preserve the original picture aspect ratio data during create the stream. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Aurabindo Pillai Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a589fa17cc4456df75f16fa3b49e8da0112e5100 Author: Srinivasan Shanmugam Date: Tue Feb 6 09:34:25 2024 +0530 drm/amd/display: Fix possible NULL dereference on device remove/driver unload As part of a cleanup amdgpu_dm_fini() function, which is typically called when a device is being shut down or a driver is being unloaded The below error message suggests that there is a potential null pointer dereference issue with adev->dm.dc. In the below, line of code where adev->dm.dc is used without a preceding null check: for (i = 0; i < adev->dm.dc->caps.max_links; i++) { To fix this issue, add a null check for adev->dm.dc before this line. Reported by smatch: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1959 amdgpu_dm_fini() error: we previously assumed 'adev->dm.dc' could be null (see line 1943) Fixes: 006c26a0f1c8 ("drm/amd/display: Fix crash on device remove/driver unload") Cc: Andrey Grodzovsky Cc: Harry Wentland Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Roman Li Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a538dabf772c169641e151834e161e241802ab33 Author: Sohaib Nadeem Date: Mon Jan 29 17:33:40 2024 -0500 Revert "drm/amd/display: increased min_dcfclk_mhz and min_fclk_mhz" [why]: This reverts commit 2ff33c759a4247c84ec0b7815f1f223e155ba82a. The commit caused corruption when running some applications in fullscreen Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Alvin Lee Acked-by: Aurabindo Pillai Signed-off-by: Sohaib Nadeem Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 94b38b895dec8c0ef093140a141e191b60ff614c Author: Zhikai Zhai Date: Mon Jan 29 17:02:18 2024 +0800 drm/amd/display: Add align done check [WHY] We Double-check link status if training successful, but miss the lane align status. [HOW] Add the lane align status check Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Signed-off-by: Zhikai Zhai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 916361685319098f696b798ef1560f69ed96e934 Author: Mario Limonciello Date: Wed Feb 7 23:52:54 2024 -0600 Revert "drm/amd: flush any delayed gfxoff on suspend entry" commit ab4750332dbe ("drm/amdgpu/sdma5.2: add begin/end_use ring callbacks") caused GFXOFF control to be used more heavily and the codepath that was removed from commit 0dee72639533 ("drm/amd: flush any delayed gfxoff on suspend entry") now can be exercised at suspend again. Users report that by using GNOME to suspend the lockscreen trigger will cause SDMA traffic and the system can deadlock. This reverts commit 0dee726395333fea833eaaf838bc80962df886c8. Acked-by: Alex Deucher Fixes: ab4750332dbe ("drm/amdgpu/sdma5.2: add begin/end_use ring callbacks") Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 3a9626c816db901def438dc2513622e281186d39 Author: Mario Limonciello Date: Wed Feb 7 23:52:55 2024 -0600 drm/amd: Stop evicting resources on APUs in suspend commit 5095d5418193 ("drm/amd: Evict resources during PM ops prepare() callback") intentionally moved the eviction of resources to earlier in the suspend process, but this introduced a subtle change that it occurs before adev->in_s0ix or adev->in_s3 are set. This meant that APUs actually started to evict resources at suspend time as well. Explicitly set s0ix or s3 in the prepare() stage, and unset them if the prepare() stage failed. v2: squash in warning fix from Stephen Rothwell Reported-by: Jürg Billeter Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3132#note_2271038 Fixes: 5095d5418193 ("drm/amd: Evict resources during PM ops prepare() callback") Acked-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit ccc514b7e7acbd301219cbaec0fc0bfe5741acee Author: Srinivasan Shanmugam Date: Mon Feb 5 16:54:10 2024 +0530 drm/amd/display: Fix possible buffer overflow in 'find_dcfclk_for_voltage()' when 'find_dcfclk_for_voltage()' function is looping over VG_NUM_SOC_VOLTAGE_LEVELS (which is 8), but the size of the DcfClocks array is VG_NUM_DCFCLK_DPM_LEVELS (which is 7). When the loop variable i reaches 7, the function tries to access clock_table->DcfClocks[7]. However, since the size of the DcfClocks array is 7, the valid indices are 0 to 6. Index 7 is beyond the size of the array, leading to a buffer overflow. Reported by smatch & thus fixing the below: drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/vg_clk_mgr.c:550 find_dcfclk_for_voltage() error: buffer overflow 'clock_table->DcfClocks' 7 <= 7 Fixes: 3a83e4e64bb1 ("drm/amd/display: Add dcn3.01 support to DC (v2)") Cc: Roman Li Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 88c6d84dd8f70e498f89972449e6ebb7aa1309c0 Author: Srinivasan Shanmugam Date: Mon Feb 5 15:07:02 2024 +0530 drm/amd/display: Fix possible use of uninitialized 'max_chunks_fbc_mode' in 'calculate_bandwidth()' 'max_chunks_fbc_mode' is only declared and assigned a value under a specific condition in the following lines: if (data->fbc_en[i] == 1) { max_chunks_fbc_mode = 128 - dmif_chunk_buff_margin; } If 'data->fbc_en[i]' is not equal to 1 for any i, max_chunks_fbc_mode will not be initialized if it's used outside of this for loop. Ensure that 'max_chunks_fbc_mode' is properly initialized before it's used. Initialize it to a default value right after its declaration to ensure that it gets a value assigned under all possible control flow paths. Thus fixing the below: drivers/gpu/drm/amd/amdgpu/../display/dc/basics/dce_calcs.c:914 calculate_bandwidth() error: uninitialized symbol 'max_chunks_fbc_mode'. drivers/gpu/drm/amd/amdgpu/../display/dc/basics/dce_calcs.c:917 calculate_bandwidth() error: uninitialized symbol 'max_chunks_fbc_mode'. Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Cc: Harry Wentland Cc: Alex Deucher Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 7edb5830ecb0033184ee2fa01ae8af17d56450ec Author: Srinivasan Shanmugam Date: Mon Feb 5 16:07:36 2024 +0530 drm/amd/display: Initialize 'wait_time_microsec' variable in link_dp_training_dpia.c wait_time_microsec = max(wait_time_microsec, (uint32_t) DPIA_CLK_SYNC_DELAY); Above line is trying to assign the maximum value between 'wait_time_microsec' and 'DPIA_CLK_SYNC_DELAY' to wait_time_microsec. However, 'wait_time_microsec' has not been assigned a value before this line, initialize 'wait_time_microsec' at the point of declaration. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_dpia.c:697 dpia_training_eq_non_transparent() error: uninitialized symbol 'wait_time_microsec'. Fixes: 630168a97314 ("drm/amd/display: move dp link training logic to link_dp_training") Cc: Wenjing Liu Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 17ba9cde11c2bfebbd70867b0a2ac4a22e573379 Author: Dan Carpenter Date: Fri Feb 9 16:02:42 2024 +0300 drm/amd/display: Fix && vs || typos These ANDs should be ORs or it will lead to a NULL dereference. Fixes: fb5a3d037082 ("drm/amd/display: Add NULL test for 'timing generator' in 'dcn21_set_pipe()'") Fixes: 886571d217d7 ("drm/amd/display: Fix 'panel_cntl' could be null in 'dcn21_set_backlight_level()'") Reviewed-by: Anthony Koo Signed-off-by: Dan Carpenter Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit a0c9956a8d5a808c173028f1e388377a890a2fdb Author: Kent Russell Date: Tue Feb 6 12:45:44 2024 -0500 drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3 Its currently incorrectly multiplied by number of XCCs in the partition Fixes: be457b2252b6 ("drm/amdkfd: Update cache info for GFX 9.4.3") Signed-off-by: Kent Russell Reviewed-by: Mukul Joshi Signed-off-by: Alex Deucher commit d16df040c8dad25c962b4404d2d534bfea327c6a Author: Hamza Mahfooz Date: Thu Feb 8 16:23:29 2024 -0500 drm/amdgpu: make damage clips support configurable We have observed that there are quite a number of PSR-SU panels on the market that are unable to keep up with what user space throws at them, resulting in hangs and random black screens. So, make damage clips support configurable and disable it by default for PSR-SU displays. Cc: stable@vger.kernel.org Reviewed-by: Mario Limonciello Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 68fb3ca0e408e00db1c3f8fccdfa19e274c033be Author: Linus Torvalds Date: Thu Feb 15 11:14:33 2024 -0800 update workarounds for gcc "asm goto" issue In commit 4356e9f841f7 ("work around gcc bugs with 'asm goto' with outputs") I did the gcc workaround unconditionally, because the cause of the bad code generation wasn't entirely clear. In the meantime, Jakub Jelinek debugged the issue, and has come up with a fix in gcc [2], which also got backported to the still maintained branches of gcc-11, gcc-12 and gcc-13. Note that while the fix technically wasn't in the original gcc-14 branch, Jakub says: "while it is true that no GCC 14 snapshots until today (or whenever the fix will be committed) have the fix, for GCC trunk it is up to the distros to use the latest snapshot if they use it at all and would allow better testing of the kernel code without the workaround, so that if there are other issues they won't be discovered years later. Most userland code doesn't actually use asm goto with outputs..." so we will consider gcc-14 to be fixed - if somebody is using gcc snapshots of the gcc-14 before the fix, they should upgrade. Note that while the bug goes back to gcc-11, in practice other gcc changes seem to have effectively hidden it since gcc-12.1 as per a bisect by Jakub. So even a gcc-14 snapshot without the fix likely doesn't show actual problems. Also, make the default 'asm_goto_output()' macro mark the asm as volatile by hand, because of an unrelated gcc issue [1] where it doesn't match the documented behavior ("asm goto is always volatile"). Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103979 [1] Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921 [2] Link: https://lore.kernel.org/all/20240208220604.140859-1-seanjc@google.com/ Requested-by: Jakub Jelinek Cc: Uros Bizjak Cc: Nick Desaulniers Cc: Sean Christopherson Cc: Andrew Pinski Signed-off-by: Linus Torvalds commit 339e2fca02141ee74bd705b3d409aa81d9ca3d0a Merge: a00cf1988a135 4e06ec0774f5b Author: Linus Torvalds Date: Thu Feb 15 10:19:55 2024 -0800 Merge tag 'devicetree-fixes-for-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Improve devlink dependency parsing for DT graphs - Fix devlink handling of io-channels dependencies - Fix PCI addressing in marvell,prestera example - A few schema fixes for property constraints - Improve performance of DT unprobed devices kselftest - Fix regression in DT_SCHEMA_FILES handling - Fix compile error in unittest for !OF_DYNAMIC * tag 'devicetree-fixes-for-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: ufs: samsung,exynos-ufs: Add size constraints on "samsung,sysreg" of: property: Add in-ports/out-ports support to of_graph_get_port_parent() of: property: Improve finding the supplier of a remote-endpoint property of: property: Improve finding the consumer of a remote-endpoint property net: marvell,prestera: Fix example PCI bus addressing of: unittest: Fix compile in the non-dynamic case of: property: fix typo in io-channels dt-bindings: tpm: Drop type from "resets" dt-bindings: display: nxp,tda998x: Fix 'audio-ports' constraints dt-bindings: xilinx: replace Piyush Mehta maintainership kselftest: dt: Stop relying on dirname to improve performance dt-bindings: don't anchor DT_SCHEMA_FILES to bindings directory commit 6efe4d18796934b8ada66c1c446510e7f2d9b972 Author: Andy Shevchenko Date: Thu Feb 15 17:25:06 2024 +0200 seq_buf: Fix kernel documentation There are plenty of issues with the kernel documentation here: - misspelled word "sequence" - different style of returned value descriptions - missed Return sections - unaligned style of ASCII / NUL-terminated / etc - wrong function references Fix all these. Link: https://lkml.kernel.org/r/20240215152506.598340-1-andriy.shevchenko@linux.intel.com Cc: Andrew Morton Signed-off-by: Andy Shevchenko Reviewed-by: Randy Dunlap Signed-off-by: Steven Rostedt (Google) commit 8a566f94104df87a067458351675129bb4e1ece2 Author: Andy Shevchenko Date: Thu Feb 15 16:22:55 2024 +0200 seq_buf: Don't use "proxy" headers Update header inclusions to follow IWYU (Include What You Use) principle. Link: https://lkml.kernel.org/r/20240215142255.400264-1-andriy.shevchenko@linux.intel.com Cc: "Matthew Wilcox (Oracle)" Cc: Andrew Morton Signed-off-by: Andy Shevchenko Signed-off-by: Steven Rostedt (Google) commit a00cf1988a1359452cb4fe64d75e7a1da12dba4a Merge: 2c460834f6034 269e31aecdd0b Author: Linus Torvalds Date: Thu Feb 15 09:13:12 2024 -0800 Merge tag 'spi-fix-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A smallish collection of fixes for SPI, all driver specific, plus one device ID addition for a new Intel part. The ppc4xx isn't routinely covered by most of the automated testing so there were some errors that were missed in some of the recent API conversions, otherwise there's nothing super remarkable here" * tag 'spi-fix-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi-mxs: Fix chipselect glitch spi: intel-pci: Add support for Lunar Lake-M SPI serial flash spi: omap2-mcspi: Revert FIFO support without DMA spi: ppc4xx: Drop write-only variable spi: ppc4xx: Fix fallout from rename in struct spi_bitbang spi: ppc4xx: Fix fallout from include cleanup spi: spi-ppc4xx: include missing platform_device.h spi: imx: fix the burst length at DMA mode and CPU mode commit 2c460834f6034e0b614f644694c226b55037c056 Merge: 9207fe7572f92 2f0dbb24f78a3 Author: Linus Torvalds Date: Thu Feb 15 09:11:06 2024 -0800 Merge tag 'regmap-fix-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap test fixes from Mark Brown: "Guenter runs a lot of KUnit tests so noticed that there were a couple of the regmap tests, including the newly added noinc test, which could show spurious failures due to the use of randomly generated test values. These changes handle the randomly generated data properly" * tag 'regmap-fix-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: kunit: Ensure that changed bytes are actually different regmap: kunit: fix raw noinc write test wrapping commit 9207fe7572f92b564c84f23e895213e6eaf98c01 Merge: 8d3dea210042f ab41a31dd5e26 Author: Linus Torvalds Date: Thu Feb 15 09:08:19 2024 -0800 Merge tag 'hid-for-linus-2024021501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - fix for 'MSC_SERIAL = 0' corner case handling in wacom driver (Jason Gerecke) - ACPI S3 suspend/resume fix for intel-ish-hid (Even Xu) - race condition fix preventing Wacom driver from losing events shortly after initialization (Jason Gerecke) - fix preventing certain Logitech HID++ devices from spamming kernel log (Oleksandr Natalenko) * tag 'hid-for-linus-2024021501' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: wacom: generic: Avoid reporting a serial of '0' to userspace HID: Intel-ish-hid: Ishtp: Fix sensor reads after ACPI S3 suspend HID: multitouch: Add required quirk for Synaptics 0xcddc device HID: wacom: Do not register input devices until after hid_hw_start HID: logitech-hidpp: Do not flood kernel log commit 8c7bfd8262319fd3f127a5380f593ea76f1b88a2 Author: Rob Clark Date: Tue Feb 13 09:23:40 2024 -0800 drm/msm: Wire up tlb ops The brute force iommu_flush_iotlb_all() was good enough for unmap, but in some cases a map operation could require removing a table pte entry to replace with a block entry. This also requires tlb invalidation. Missing this was resulting an obscure iova fault on what should be a valid buffer address. Thanks to Robin Murphy for helping me understand the cause of the fault. Cc: Robin Murphy Cc: stable@vger.kernel.org Fixes: b145c6e65eb0 ("drm/msm: Add support to create a local pagetable") Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/578117/ commit 9c10f2b172eb26007e9b641271798234911d24c2 Merge: 5f63a493b99c8 8d30528a17090 Author: Jens Axboe Date: Thu Feb 15 09:42:03 2024 -0700 Merge tag 'nvme-6.8-2024-02-15' of git://git.infradead.org/nvme into block-6.8 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.8 - Fabrics connection error handling (Chaitanya) - Use relaxed effects to reduce unnecessary queue freezes (Keith)" * tag 'nvme-6.8-2024-02-15' of git://git.infradead.org/nvme: nvmet: remove superfluous initialization nvme: implement support for relaxed effects nvme-fabrics: fix I/O connect error handling commit 9b6326354cf9a41521b79287da3bfab022ae0b6d Author: Thorsten Blum Date: Wed Feb 14 23:05:56 2024 +0100 tracing/synthetic: Fix trace_string() return value Fix trace_string() by assigning the string length to the return variable which got lost in commit ddeea494a16f ("tracing/synthetic: Use union instead of casts") and caused trace_string() to always return 0. Link: https://lore.kernel.org/linux-trace-kernel/20240214220555.711598-1-thorsten.blum@toblux.com Cc: stable@vger.kernel.org Cc: Mathieu Desnoyers Fixes: ddeea494a16f ("tracing/synthetic: Use union instead of casts") Acked-by: Masami Hiramatsu (Google) Signed-off-by: Thorsten Blum Signed-off-by: Steven Rostedt (Google) commit c40c0d3a768c78a023a72fb2ceea00743e3a695d Merge: b2c6c52911244 55ea989977f4e Author: Jakub Kicinski Date: Thu Feb 15 08:06:50 2024 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-02-06 (igb, igc) This series contains updates to igb and igc drivers. Kunwu Chan adjusts firmware version string implementation to resolve possible NULL pointer issue for igb. Sasha removes workaround on igc. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: igc: Remove temporary workaround igb: Fix string truncation warnings in igb_set_fw_version ==================== Link: https://lore.kernel.org/r/20240214180347.3219650-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit b2c6c5291124451729d40f5adda22452512e7068 Merge: ed4adc07207d9 538b22e742878 Author: Jakub Kicinski Date: Thu Feb 15 08:03:49 2024 -0800 Merge branch 'fix-module_description-for-net-p6' Breno Leitao says: ==================== Fix MODULE_DESCRIPTION() for net (p6) There are a few network modules left that misses MODULE_DESCRIPTION(), causing a warnning when compiling with W=1. Example: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/.... This last patchset solves the problem for all the missing driver. It is not expect to see any warning for the driver/net and net/ directory once all these patches have landed. v1: https://lore.kernel.org/all/20240213112122.404045-1-leitao@debian.org/ ==================== Link: https://lore.kernel.org/r/20240214152741.670178-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 538b22e74287864014b3be7481042fb904a0cc0d Author: Breno Leitao Date: Wed Feb 14 07:27:41 2024 -0800 net: fill in MODULE_DESCRIPTION()s for missing arcnet W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the ARC modules. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240214152741.670178-8-leitao@debian.org Signed-off-by: Jakub Kicinski commit 9de69f0e99585d84baab4fbb0b3b97c02cf069f1 Author: Breno Leitao Date: Wed Feb 14 07:27:40 2024 -0800 net: fill in MODULE_DESCRIPTION()s for mdio_devres W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the PHY MDIO helpers. Suggested-by: Andrew Lunn Signed-off-by: Breno Leitao Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20240214152741.670178-7-leitao@debian.org Signed-off-by: Jakub Kicinski commit e1e5ef2aefc2ab77dacf77626f9f25f332ba91b7 Author: Breno Leitao Date: Wed Feb 14 07:27:39 2024 -0800 net: fill in MODULE_DESCRIPTION()s for ppp W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the PPP modules. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240214152741.670178-6-leitao@debian.org Signed-off-by: Jakub Kicinski commit 4ad9e85874393eec74edf2d2c7b7c7ba11f78d20 Author: Breno Leitao Date: Wed Feb 14 07:27:38 2024 -0800 net: fill in MODULE_DESCRIPTION()s for fddik/skfp W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the SysKonnect FDDI PCI module. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240214152741.670178-5-leitao@debian.org Signed-off-by: Jakub Kicinski commit 44c1197bcef49bdf1021bef7cdb32520b2bc1ce4 Author: Breno Leitao Date: Wed Feb 14 07:27:37 2024 -0800 net: fill in MODULE_DESCRIPTION()s for plip W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the PLIP (parallel port) network module Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240214152741.670178-4-leitao@debian.org Signed-off-by: Jakub Kicinski commit c0872309ac8432e309824ece24238e8fd2768ef8 Author: Breno Leitao Date: Wed Feb 14 07:27:36 2024 -0800 net: fill in MODULE_DESCRIPTION()s for ieee802154/fakelb W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the IEEE 802.15.4 loopback driver. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240214152741.670178-3-leitao@debian.org Signed-off-by: Jakub Kicinski commit 5b8e3464071a4401978a91d2e9f0beca308996c2 Author: Breno Leitao Date: Wed Feb 14 07:27:35 2024 -0800 net: fill in MODULE_DESCRIPTION()s for xen-netback W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Xen backend network module. Signed-off-by: Breno Leitao Acked-by: Paul Durrant Link: https://lore.kernel.org/r/20240214152741.670178-2-leitao@debian.org Signed-off-by: Jakub Kicinski commit 41c25e193b2befc22462aa41591d397fab174ca1 Author: Takashi Iwai Date: Thu Feb 15 16:31:44 2024 +0100 ALSA: usb-audio: More relaxed check of MIDI jack names The USB audio driver tries to retrieve MIDI jack name strings that can be used for rawmidi substream names and sequencer port names, but its checking is too strict: often the firmware provides the jack info for unexpected directions, and then we miss the info although it's present. In this patch, the code to extract the jack info is changed to allow both in and out directions in a single loop. That is, the former two functions to obtain the descriptor pointers for jack in and out are changed to a single function that returns iJack of the corresponding jack ID, no matter which direction is used. It's a code simplification at the same time as well as the fix. Fixes: eb596e0fd13c ("ALSA: usb-audio: generate midi streaming substream names from jack names") Link: https://lore.kernel.org/r/20240215153144.26047-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 32f03f4002c5df837fb920eb23fcd2f4af9b0b23 Author: Eniac Zhang Date: Thu Feb 15 15:49:22 2024 +0000 ALSA: hda/realtek: fix mute/micmute LED For HP mt645 The HP mt645 G7 Thin Client uses an ALC236 codec and needs the ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make the mute and micmute LEDs work. There are two variants of the USB-C PD chip on this device. Each uses a different BIOS and board ID, hence the two entries. Signed-off-by: Eniac Zhang Signed-off-by: Alexandru Gagniuc Cc: Link: https://lore.kernel.org/r/20240215154922.778394-1-alexandru.gagniuc@hp.com Signed-off-by: Takashi Iwai commit ed4adc07207d9165a4b3b36199231a22e9f51a55 Author: Paul Barker Date: Wed Feb 14 15:12:04 2024 +0000 net: ravb: Count packets instead of descriptors in GbEth RX path The units of "work done" in the RX path should be packets instead of descriptors, as large packets can be spread over multiple descriptors. Fixes: 1c59eb678cbd ("ravb: Fillup ravb_rx_gbeth() stub") Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20240214151204.2976-1-paul.barker.ct@bp.renesas.com Signed-off-by: Jakub Kicinski commit dc34ebd5c018b0edf47f39d11083ad8312733034 Author: Gavrilov Ilia Date: Wed Feb 14 09:01:50 2024 +0000 pppoe: Fix memory leak in pppoe_sendmsg() syzbot reports a memory leak in pppoe_sendmsg [1]. The problem is in the pppoe_recvmsg() function that handles errors in the wrong order. For the skb_recv_datagram() function, check the pointer to skb for NULL first, and then check the 'error' variable, because the skb_recv_datagram() function can set 'error' to -EAGAIN in a loop but return a correct pointer to socket buffer after a number of attempts, though 'error' remains set to -EAGAIN. skb_recv_datagram __skb_recv_datagram // Loop. if (err == -EAGAIN) then // go to the next loop iteration __skb_try_recv_datagram // if (skb != NULL) then return 'skb' // else if a signal is received then // return -EAGAIN Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with Syzkaller. Link: https://syzkaller.appspot.com/bug?extid=6bdfd184eac7709e5cc9 [1] Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+6bdfd184eac7709e5cc9@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=6bdfd184eac7709e5cc9 Signed-off-by: Gavrilov Ilia Reviewed-by: Guillaume Nault Link: https://lore.kernel.org/r/20240214085814.3894917-1-Ilia.Gavrilov@infotecs.ru Signed-off-by: Jakub Kicinski commit 4e45170d9acc2d5ae8f545bf3f2f67504a361338 Author: Dmitry Antipov Date: Wed Feb 14 11:22:24 2024 +0300 net: sctp: fix skb leak in sctp_inq_free() In case of GSO, 'chunk->skb' pointer may point to an entry from fraglist created in 'sctp_packet_gso_append()'. To avoid freeing random fraglist entry (and so undefined behavior and/or memory leak), introduce 'sctp_inq_chunk_free()' helper to ensure that 'chunk->skb' is set to 'chunk->head_skb' (i.e. fraglist head) before calling 'sctp_chunk_free()', and use the aforementioned helper in 'sctp_inq_pop()' as well. Reported-by: syzbot+8bb053b5d63595ab47db@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?id=0d8351bbe54fd04a492c2daab0164138db008042 Fixes: 90017accff61 ("sctp: Add GSO support") Suggested-by: Xin Long Signed-off-by: Dmitry Antipov Acked-by: Xin Long Link: https://lore.kernel.org/r/20240214082224.10168-1-dmantipov@yandex.ru Signed-off-by: Jakub Kicinski commit 3db9d4b395190103969707ed7ea6513f1162b9e3 Merge: 852d432a14dbc 0db0c1770834f Author: Takashi Iwai Date: Thu Feb 15 15:00:31 2024 +0100 Merge tag 'asoc-fix-v6.8-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.8 A relatively large set of fixes and quirk additions here but they're all driver specific, people seem to be back into the swing of things after the holidays. This is all driver specific and much of it fairly minor. commit a951884d82886d8453d489f84f20ac168d062b38 Author: Arnd Bergmann Date: Thu Feb 15 09:32:08 2024 +0100 kallsyms: ignore ARMv4 thunks along with others lld is now able to build ARMv4 and ARMv4T kernels, which means it can generate thunks for those (__ARMv4PILongThunk_*, __ARMv4PILongBXThunk_*) that can interfere with kallsyms table generation since they do not get ignore like the corresponding ARMv5+ ones are: Inconsistent kallsyms data Try "make KALLSYMS_EXTRA_PASS=1" as a workaround Replace the hardcoded list of thunk symbols with a more general regex that covers this one along with future symbols that follow the same pattern. Fixes: 5eb6e280432d ("ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.0.0 and newer") Fixes: efe6e3068067 ("kallsyms: fix nonconverging kallsyms table with lld") Suggested-by: Masahiro Yamada Signed-off-by: Arnd Bergmann Reviewed-by: Ard Biesheuvel Signed-off-by: Masahiro Yamada commit e5b2e810daf9f2d87fe132eb4d2a85fb08a0db98 Author: Florian Fainelli Date: Tue Feb 13 09:33:39 2024 -0800 net: bcmasp: Handle RX buffer allocation failure The buffer_pg variable needs to hold an order-5 allocation (32 x PAGE_SIZE) which, under memory pressure may fail to be allocated. Deal with that error condition properly to avoid doing a NULL pointer de-reference in the subsequent call to dma_map_page(). In addition, the err_reclaim_tx error label in bcmasp_netif_init() needs to ensure that the TX NAPI object is properly deleted, otherwise unregister_netdev() will spin forever attempting to test and clear the NAPI_STATE_HASHED bit. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Signed-off-by: Florian Fainelli Reviewed-by: Justin Chen Link: https://lore.kernel.org/r/20240213173339.3438713-1-florian.fainelli@broadcom.com Signed-off-by: Paolo Abeni commit d74b23d0c29cb3498642e8673c51e5978ce03496 Merge: f3ac28e1f8ae8 84443741faab9 Author: Paolo Abeni Date: Thu Feb 15 12:48:56 2024 +0100 Merge tag 'nf-24-02-15' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following batch contains Netfilter fixes for net: 1) Missing : in kdoc field in nft_set_pipapo. 2) Restore default DNAT behavior When a DNAT rule is configured via iptables with different port ranges, from Kyle Swenson. 3) Restore flowtable hardware offload for bidirectional flows by setting NF_FLOW_HW_BIDIRECTIONAL flag, from Felix Fietkau. netfilter pull request 24-02-15 * tag 'nf-24-02-15' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: fix bidirectional offload regression netfilter: nat: restore default DNAT behavior netfilter: nft_set_pipapo: fix missing : in kdoc ==================== Link: https://lore.kernel.org/r/20240214233818.7946-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 2813926261e436d33bc74486b51cce60b76edf78 Author: Mark Brown Date: Tue Feb 13 18:24:38 2024 +0000 arm64/sve: Lower the maximum allocation for the SVE ptrace regset Doug Anderson observed that ChromeOS crashes are being reported which include failing allocations of order 7 during core dumps due to ptrace allocating storage for regsets: chrome: page allocation failure: order:7, mode:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null),cpuset=urgent,mems_allowed=0 ... regset_get_alloc+0x1c/0x28 elf_core_dump+0x3d8/0xd8c do_coredump+0xeb8/0x1378 with further investigation showing that this is: [ 66.957385] DOUG: Allocating 279584 bytes which is the maximum size of the SVE regset. As Doug observes it is not entirely surprising that such a large allocation of contiguous memory might fail on a long running system. The SVE regset is currently sized to hold SVE registers with a VQ of SVE_VQ_MAX which is 512, substantially more than the architectural maximum of 16 which we might see even in a system emulating the limits of the architecture. Since we don't expose the size we tell the regset core externally let's define ARCH_SVE_VQ_MAX with the actual architectural maximum and use that for the regset, we'll still overallocate most of the time but much less so which will be helpful even if the core is fixed to not require contiguous allocations. Specify ARCH_SVE_VQ_MAX in terms of the maximum value that can be written into ZCR_ELx.LEN (where this is set in the hardware). For consistency update the maximum SME vector length to be specified in the same style while we are at it. We could also teach the ptrace core about runtime discoverable regset sizes but that would be a more invasive change and this is being observed in practical systems. Reported-by: Doug Anderson Signed-off-by: Mark Brown Tested-by: Douglas Anderson Link: https://lore.kernel.org/r/20240213-arm64-sve-ptrace-regset-size-v2-1-c7600ca74b9b@kernel.org Signed-off-by: Will Deacon commit fb091ff394792c018527b3211bbdfae93ea4ac02 Author: Easwar Hariharan Date: Wed Feb 14 17:55:18 2024 +0000 arm64: Subscribe Microsoft Azure Cobalt 100 to ARM Neoverse N2 errata Add the MIDR value of Microsoft Azure Cobalt 100, which is a Microsoft implemented CPU based on r0p0 of the ARM Neoverse N2 CPU, and therefore suffers from all the same errata. CC: stable@vger.kernel.org # 5.15+ Signed-off-by: Easwar Hariharan Reviewed-by: Anshuman Khandual Acked-by: Mark Rutland Acked-by: Marc Zyngier Reviewed-by: Oliver Upton Link: https://lore.kernel.org/r/20240214175522.2457857-1-eahariha@linux.microsoft.com Signed-off-by: Will Deacon commit f3ac28e1f8ae8e3dc18323d4fdf3b0a4f6c77f54 Merge: 488b6d91b0711 2aa0a5e65eae2 Author: Paolo Abeni Date: Thu Feb 15 12:31:22 2024 +0100 Merge tag 'linux-can-fixes-for-6.8-20240214' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2024-02-14 this is a pull request of 3 patches for net/master. the first patch is by Ziqi Zhao and targets the CAN J1939 protocol, it fixes a potential deadlock by replacing the spinlock by an rwlock. Oleksij Rempel's patch adds a missing spin_lock_bh() to prevent a potential Use-After-Free in the CAN J1939's setsockopt(SO_J1939_FILTER). Maxime Jayat contributes a patch to fix the transceiver delay compensation (TDCO) calculation, which is needed for higher CAN-FD bit rates (usually 2Mbit/s). * tag 'linux-can-fixes-for-6.8-20240214' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: netlink: Fix TDCO calculation using the old data bittiming can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER) can: j1939: prevent deadlock by changing j1939_socks_lock to rwlock ==================== Link: https://lore.kernel.org/r/20240214140348.2412776-1-mkl@pengutronix.de Signed-off-by: Paolo Abeni commit 488b6d91b07112eaaaa4454332c1480894d4e06e Author: Vadim Fedorenko Date: Tue Feb 13 03:04:28 2024 -0800 net-timestamp: make sk_tskey more predictable in error path When SOF_TIMESTAMPING_OPT_ID is used to ambiguate timestamped datagrams, the sk_tskey can become unpredictable in case of any error happened during sendmsg(). Move increment later in the code and make decrement of sk_tskey in error path. This solution is still racy in case of multiple threads doing snedmsg() over the very same socket in parallel, but still makes error path much more predictable. Fixes: 09c2d251b707 ("net-timestamp: add key to disambiguate concurrent datagrams") Reported-by: Andy Lutomirski Signed-off-by: Vadim Fedorenko Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20240213110428.1681540-1-vadfed@meta.com Signed-off-by: Paolo Abeni commit f78c1375339a291cba492a70eaf12ec501d28a8e Author: Johannes Berg Date: Wed Feb 14 20:08:35 2024 +0100 wifi: nl80211: reject iftype change with mesh ID change It's currently possible to change the mesh ID when the interface isn't yet in mesh mode, at the same time as changing it into mesh mode. This leads to an overwrite of data in the wdev->u union for the interface type it currently has, causing cfg80211_change_iface() to do wrong things when switching. We could probably allow setting an interface to mesh while setting the mesh ID at the same time by doing a different order of operations here, but realistically there's no userspace that's going to do this, so just disallow changes in iftype when setting mesh ID. Cc: stable@vger.kernel.org Fixes: 29cbe68c516a ("cfg80211/mac80211: add mesh join/leave commands") Reported-by: syzbot+dd4779978217b1973180@syzkaller.appspotmail.com Signed-off-by: Johannes Berg commit 455dae7549aed709707feda5d6b3e085b37d33f7 Author: Arnd Bergmann Date: Tue Feb 13 10:56:48 2024 +0100 drm/xe: avoid function cast warnings clang-16 warns about a cast between incompatible function types: drivers/gpu/drm/xe/xe_range_fence.c:155:10: error: cast from 'void (*)(const void *)' to 'void (*)(struct xe_range_fence *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 155 | .free = (void (*)(struct xe_range_fence *rfence)) kfree, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Avoid this with a trivial helper function that calls kfree() here. v2: - s/* rfence/*rfence/ (Thomas) Fixes: 845f64bdbfc9 ("drm/xe: Introduce a range-fence utility") Signed-off-by: Arnd Bergmann Reviewed-by: Thomas Hellström Signed-off-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240213095719.454865-1-arnd@kernel.org (cherry picked from commit f2c9364db57992b1496db4ae5e67ab14926be3ec) Signed-off-by: Thomas Hellström commit 8cb92dc730d8ae5f803dae1a6eb91fb9603f4237 Author: Thomas Hellström Date: Fri Feb 9 12:26:55 2024 +0100 drm/xe/pt: Allow for stricter type- and range checking Distinguish between xe_pt and the xe_pt_dir subclass when allocating and freeing. Also use a fixed-size array for the xe_pt_dir page entries to make life easier for dynamic range- checkers. Finally rename the page-directory child pointer array to "children". While no functional change, this fixes ubsan splats similar to: [ 51.463021] ------------[ cut here ]------------ [ 51.463022] UBSAN: array-index-out-of-bounds in drivers/gpu/drm/xe/xe_pt.c:47:9 [ 51.463023] index 0 is out of range for type 'xe_ptw *[*]' [ 51.463024] CPU: 5 PID: 2778 Comm: xe_vm Tainted: G U 6.8.0-rc1+ #218 [ 51.463026] Hardware name: ASUS System Product Name/PRIME B560M-A AC, BIOS 2001 02/01/2023 [ 51.463027] Call Trace: [ 51.463028] [ 51.463029] dump_stack_lvl+0x47/0x60 [ 51.463030] __ubsan_handle_out_of_bounds+0x95/0xd0 [ 51.463032] xe_pt_destroy+0xa5/0x150 [xe] [ 51.463088] __xe_pt_unbind_vma+0x36c/0x9b0 [xe] [ 51.463144] xe_vm_unbind+0xd8/0x580 [xe] [ 51.463204] ? drm_exec_prepare_obj+0x3f/0x60 [drm_exec] [ 51.463208] __xe_vma_op_execute+0x5da/0x910 [xe] [ 51.463268] ? __drm_gpuvm_sm_unmap+0x1cb/0x220 [drm_gpuvm] [ 51.463272] ? radix_tree_node_alloc.constprop.0+0x89/0xc0 [ 51.463275] ? drm_gpuva_it_remove+0x1f3/0x2a0 [drm_gpuvm] [ 51.463279] ? drm_gpuva_remove+0x2f/0xc0 [drm_gpuvm] [ 51.463283] xe_vm_bind_ioctl+0x1a55/0x20b0 [xe] [ 51.463344] ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] [ 51.463414] drm_ioctl_kernel+0xb6/0x120 [ 51.463416] drm_ioctl+0x287/0x4e0 [ 51.463418] ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] [ 51.463481] __x64_sys_ioctl+0x94/0xd0 [ 51.463484] do_syscall_64+0x86/0x170 [ 51.463486] ? syscall_exit_to_user_mode+0x7d/0x200 [ 51.463488] ? do_syscall_64+0x96/0x170 [ 51.463490] ? do_syscall_64+0x96/0x170 [ 51.463492] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 51.463494] RIP: 0033:0x7f246bfe817d [ 51.463498] Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00 [ 51.463501] RSP: 002b:00007ffc1bd19ad0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 51.463502] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f246bfe817d [ 51.463504] RDX: 00007ffc1bd19b60 RSI: 0000000040886445 RDI: 0000000000000003 [ 51.463505] RBP: 00007ffc1bd19b20 R08: 0000000000000000 R09: 0000000000000000 [ 51.463506] R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffc1bd19b60 [ 51.463508] R13: 0000000040886445 R14: 0000000000000003 R15: 0000000000010000 [ 51.463510] [ 51.463517] ---[ end trace ]--- v2 - Fix kerneldoc warning (Matthew Brost) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Rodrigo Vivi Cc: Matthew Brost Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240209112655.4872-1-thomas.hellstrom@linux.intel.com (cherry picked from commit 157261c58b283f5c83e3f9087eca63be8d591ab8) Signed-off-by: Thomas Hellström commit c2626b7387210cff741be9fb91d317f02a70347c Author: Matthew Auld Date: Mon Feb 5 15:31:11 2024 +0000 drm/xe/display: fix i915_gem_object_is_shmem() wrapper shmem ensures the memory is cleared on allocation, however here we are using TTM, which doesn't natively support shmem (other than for swap), but instead just allocates normal system memory. And we only zero such memory for userspace allocations. In the case of intel_fbdev we are missing the memset_io() since display path incorrectly thinks object is shmem based. Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Signed-off-by: Matthew Auld Reviewed-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20240205153110.38340-2-matthew.auld@intel.com (cherry picked from commit 63fb531fbfda81bda652546a39333b565aea324d) Signed-off-by: Thomas Hellström commit 9377de4cb3e8fb6c494fa2f5ae2c3780d3e73822 Author: Thomas Hellström Date: Thu Feb 8 14:21:15 2024 +0100 drm/xe/vm: Avoid reserving zero fences The function xe_vm_prepare_vma was blindly accepting zero as the number of fences and forwarded that to drm_exec_prepare_obj. However, that leads to an out-of-bounds shift in the dma_resv_reserve_fences() and while one could argue that the dma_resv code should be robust against that, avoid attempting to reserve zero fences. Relevant stack trace: [773.183188] ------------[ cut here ]------------ [773.183199] UBSAN: shift-out-of-bounds in ../include/linux/log2.h:57:13 [773.183241] shift exponent 64 is too large for 64-bit type 'long unsigned int' [773.183254] CPU: 2 PID: 1816 Comm: xe_evict Tainted: G U 6.8.0-rc3-xe #1 [773.183256] Hardware name: ASUS System Product Name/PRIME Z690-P D4, BIOS 2014 10/14/2022 [773.183257] Call Trace: [773.183258] [773.183260] dump_stack_lvl+0xaf/0xd0 [773.183266] dump_stack+0x10/0x20 [773.183283] ubsan_epilogue+0x9/0x40 [773.183286] __ubsan_handle_shift_out_of_bounds+0x10f/0x170 [773.183293] dma_resv_reserve_fences.cold+0x2b/0x48 [773.183295] ? ww_mutex_lock+0x3c/0x110 [773.183301] drm_exec_prepare_obj+0x45/0x60 [drm_exec] [773.183313] xe_vm_prepare_vma+0x33/0x70 [xe] [773.183375] xe_vma_destroy_unlocked+0x55/0xa0 [xe] [773.183427] xe_vm_close_and_put+0x526/0x940 [xe] Fixes: 2714d5093620 ("drm/xe: Convert pagefaulting code to use drm_exec") Cc: Thomas Hellström Cc: Matthew Brost Cc: Rodrigo Vivi Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240208132115.3132-1-thomas.hellstrom@linux.intel.com (cherry picked from commit eb538b5574251a449f40b1ee35efc631228c8992) Signed-off-by: Thomas Hellström commit 2ec197fda25f57afccac7f2846e509471488614c Author: Jakub Kicinski Date: Tue Feb 13 06:20:55 2024 -0800 selftests: tls: increase the wait in poll_partial_rec_async Test runners on debug kernels occasionally fail with: # # RUN tls_err.13_aes_gcm.poll_partial_rec_async ... # # tls.c:1883:poll_partial_rec_async:Expected poll(&pfd, 1, 5) (0) == 1 (1) # # tls.c:1870:poll_partial_rec_async:Expected status (256) == 0 (0) # # poll_partial_rec_async: Test failed at step #17 # # FAIL tls_err.13_aes_gcm.poll_partial_rec_async # not ok 699 tls_err.13_aes_gcm.poll_partial_rec_async # # FAILED: 698 / 699 tests passed. This points to the second poll() in the test which is expected to wait for the sender to send the rest of the data. Apparently under some conditions that doesn't happen within 5ms, bump the timeout to 20ms. Fixes: 23fcb62bc19c ("selftests: tls: add tests for poll behavior") Link: https://lore.kernel.org/r/20240213142055.395564-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit dadd1701ae11a204dd4bea8086905a9576c4b63c Author: Dave Ertman Date: Tue Feb 13 10:39:55 2024 -0800 ice: Add check for lport extraction to LAG init To fully support initializing the LAG support code, a DDP package that extracts the logical port from the metadata is required. If such a package is not present, there could be difficulties in supporting some bond types. Add a check into the initialization flow that will bypass the new paths if any of the support pieces are missing. Reviewed-by: Przemek Kitszel Fixes: df006dd4b1dc ("ice: Add initial support framework for LAG") Signed-off-by: Dave Ertman Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20240213183957.1483857-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 63a3dd6e62c8c4e7a80d8531da2a7faa94772178 Merge: 9b23fceb4158a b7198383ef2de Author: Jakub Kicinski Date: Wed Feb 14 17:32:37 2024 -0800 Merge tag 'wireless-2024-02-14' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Valentine's day edition, with just few fixes because that's how we love it ;-) iwlwifi: - correct A3 in A-MSDUs - fix crash when operating as AP and running out of station slots to use - clear link ID to correct some later checks against it - fix error codes in SAR table loading - fix error path in PPAG table read mac80211: - reload a pointer after SKB may have changed (only in certain monitor inject mode scenarios) * tag 'wireless-2024-02-14' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: iwlwifi: mvm: fix a crash when we run out of stations wifi: iwlwifi: uninitialized variable in iwl_acpi_get_ppag_table() wifi: iwlwifi: Fix some error codes wifi: iwlwifi: clear link_id in time_event wifi: iwlwifi: mvm: use correct address 3 in A-MSDU wifi: mac80211: reload info pointer in ieee80211_tx_dequeue() ==================== Link: https://lore.kernel.org/r/20240214184326.132813-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit a37ee9e117ef73bbc2f5c0b31911afd52d229861 Author: Jens Axboe Date: Wed Feb 14 08:23:05 2024 -0700 io_uring/net: fix multishot accept overflow handling If we hit CQ ring overflow when attempting to post a multishot accept completion, we don't properly save the result or return code. This results in losing the accepted fd value. Instead, we return the result from the poll operation that triggered the accept retry. This is generally POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND which is 0xc3, or 195, which looks like a valid file descriptor, but it really has no connection to that. Handle this like we do for other multishot completions - assign the result, and return IOU_STOP_MULTISHOT to cancel any further completions from this request when overflow is hit. This preserves the result, as we should, and tells the application that the request needs to be re-armed. Cc: stable@vger.kernel.org Fixes: 515e26961295 ("io_uring: revert "io_uring fix multishot accept ordering"") Link: https://github.com/axboe/liburing/issues/1062 Signed-off-by: Jens Axboe commit 8d3dea210042f54b952b481838c1e7dfc4ec751d Merge: 6004b044f7712 8fa5070833886 Author: Linus Torvalds Date: Wed Feb 14 16:06:31 2024 -0800 Merge tag 'mips-fixes_6.8_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - Fix for broken ipv6 checksums - Fix handling of exceptions in delay slots * tag 'mips-fixes_6.8_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mm/memory: Use exception ip to search exception tables MIPS: Clear Cause.BD in instruction_pointer_set ptrace: Introduce exception_ip arch hook MIPS: Add 'memory' clobber to csum_ipv6_magic() inline assembler commit 6004b044f77121d09cacf47073c19dc106da0e9d Merge: 1f3a3e2aaeb4e bb6f4dbe2639d Author: Linus Torvalds Date: Wed Feb 14 16:02:36 2024 -0800 Merge tag 'landlock-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull landlock test fixes from Mickaël Salaün: "Fix build issues for tests, and improve test compatibility" * tag 'landlock-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: selftests/landlock: Fix capability for net_test selftests/landlock: Fix fs_test build with old libc selftests/landlock: Fix net_test build with old libc commit 1f3a3e2aaeb4e6ba9b6df6f2e720131765b23b82 Merge: 91f842ffe6ca1 2f6397e448e68 Author: Linus Torvalds Date: Wed Feb 14 15:47:02 2024 -0800 Merge tag 'for-6.8-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few regular fixes and one fix for space reservation regression since 6.7 that users have been reporting: - fix over-reservation of metadata chunks due to not keeping proper balance between global block reserve and delayed refs reserve; in practice this leaves behind empty metadata block groups, the workaround is to reclaim them by using the '-musage=1' balance filter - other space reservation fixes: - do not delete unused block group if it may be used soon - do not reserve space for checksums for NOCOW files - fix extent map assertion failure when writing out free space inode - reject encoded write if inode has nodatasum flag set - fix chunk map leak when loading block group zone info" * tag 'for-6.8-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: don't refill whole delayed refs block reserve when starting transaction btrfs: zoned: fix chunk map leak when loading block group zone info btrfs: reject encoded write if inode has nodatasum flag set btrfs: don't reserve space for checksums when writing to nocow files btrfs: add new unused block groups to the list of unused block groups btrfs: do not delete unused block group if it may be used soon btrfs: add and use helper to check if block group is used btrfs: don't drop extent_map for free space inode on write error commit 91f842ffe6ca1e97a3966e9e499c3ac6fbcc4bc4 Merge: 7e90b5c295ec1 829388b725f8d Author: Linus Torvalds Date: Wed Feb 14 15:34:03 2024 -0800 Merge tag 'linux_kselftest-kunit-fixes-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit fix from Shuah Khan: "One important fix to unregister kunit_bus when KUnit module is unloaded. Not doing so causes an error when KUnit module tries to re-register the bus when it gets reloaded" * tag 'linux_kselftest-kunit-fixes-6.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: device: Unregister the kunit_bus on shutdown commit 84443741faab9045d53f022a9ac6a6633067a481 Author: Felix Fietkau Date: Wed Feb 14 15:42:35 2024 +0100 netfilter: nf_tables: fix bidirectional offload regression Commit 8f84780b84d6 ("netfilter: flowtable: allow unidirectional rules") made unidirectional flow offload possible, while completely ignoring (and breaking) bidirectional flow offload for nftables. Add the missing flag that was left out as an exercise for the reader :) Cc: Vlad Buslov Fixes: 8f84780b84d6 ("netfilter: flowtable: allow unidirectional rules") Reported-by: Daniel Golle Signed-off-by: Felix Fietkau Signed-off-by: Pablo Neira Ayuso commit 0f1ae2821fa4b13ab0f5ad7ff89fa57efcb04fe0 Author: Kyle Swenson Date: Thu Feb 8 23:56:31 2024 +0000 netfilter: nat: restore default DNAT behavior When a DNAT rule is configured via iptables with different port ranges, iptables -t nat -A PREROUTING -p tcp -d 10.0.0.2 -m tcp --dport 32000:32010 -j DNAT --to-destination 192.168.0.10:21000-21010 we seem to be DNATing to some random port on the LAN side. While this is expected if --random is passed to the iptables command, it is not expected without passing --random. The expected behavior (and the observed behavior prior to the commit in the "Fixes" tag) is the traffic will be DNAT'd to 192.168.0.10:21000 unless there is a tuple collision with that destination. In that case, we expect the traffic to be instead DNAT'd to 192.168.0.10:21001, so on so forth until the end of the range. This patch intends to restore the behavior observed prior to the "Fixes" tag. Fixes: 6ed5943f8735 ("netfilter: nat: remove l4 protocol port rovers") Signed-off-by: Kyle Swenson Signed-off-by: Pablo Neira Ayuso commit f6374a82fc85bf911d033e2fa791372ce3356270 Author: Pablo Neira Ayuso Date: Thu Feb 8 15:46:03 2024 +0100 netfilter: nft_set_pipapo: fix missing : in kdoc Add missing : in kdoc field names. Fixes: 8683f4b9950d ("nft_set_pipapo: Prepare for vectorised implementation: helpers") Reported-by: Paolo Abeni Signed-off-by: Pablo Neira Ayuso commit 5d9a16b2a4d9e8fa028892ded43f6501bc2969e5 Author: Radek Krejci Date: Wed Feb 14 10:14:07 2024 +0100 modpost: trim leading spaces when processing source files list get_line() does not trim the leading spaces, but the parse_source_files() expects to get lines with source files paths where the first space occurs after the file path. Fixes: 70f30cfe5b89 ("modpost: use read_text_file() and get_line() for reading text files") Signed-off-by: Radek Krejci Signed-off-by: Masahiro Yamada commit dae4a0171e25884787da32823b3081b4c2acebb2 Author: Andrew Ballance Date: Tue Feb 13 19:23:05 2024 -0600 gen_compile_commands: fix invalid escape sequence warning With python 3.12, '\#' results in this warning SyntaxWarning: invalid escape sequence '\#' Signed-off-by: Andrew Ballance Reviewed-by: Justin Stitt Signed-off-by: Masahiro Yamada commit e3a9ee963ad8ba677ca925149812c5932b49af69 Author: Nathan Chancellor Date: Mon Feb 12 19:05:10 2024 -0700 kbuild: Fix changing ELF file type for output of gen_btf for big endian Commit 90ceddcb4950 ("bpf: Support llvm-objcopy for vmlinux BTF") changed the ELF type of .btf.vmlinux.bin.o to ET_REL via dd, which works fine for little endian platforms: 00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............| -00000010 03 00 b7 00 01 00 00 00 00 00 00 80 00 80 ff ff |................| +00000010 01 00 b7 00 01 00 00 00 00 00 00 80 00 80 ff ff |................| However, for big endian platforms, it changes the wrong byte, resulting in an invalid ELF file type, which ld.lld rejects: 00000000 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00 |.ELF............| -00000010 00 03 00 16 00 00 00 01 00 00 00 00 00 10 00 00 |................| +00000010 01 03 00 16 00 00 00 01 00 00 00 00 00 10 00 00 |................| Type: : 103 ld.lld: error: .btf.vmlinux.bin.o: unknown file type Fix this by updating the entire 16-bit e_type field rather than just a single byte, so that everything works correctly for all platforms and linkers. 00000000 7f 45 4c 46 02 02 01 00 00 00 00 00 00 00 00 00 |.ELF............| -00000010 00 03 00 16 00 00 00 01 00 00 00 00 00 10 00 00 |................| +00000010 00 01 00 16 00 00 00 01 00 00 00 00 00 10 00 00 |................| Type: REL (Relocatable file) While in the area, update the comment to mention that binutils 2.35+ matches LLD's behavior of rejecting an ET_EXEC input, which occurred after the comment was added. Cc: stable@vger.kernel.org Fixes: 90ceddcb4950 ("bpf: Support llvm-objcopy for vmlinux BTF") Link: https://github.com/llvm/llvm-project/pull/75643 Suggested-by: Masahiro Yamada Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song Reviewed-by: Nicolas Schier Reviewed-by: Kees Cook Reviewed-by: Justin Stitt Signed-off-by: Masahiro Yamada commit 6388cfd0e69b56ca640610f1bf29334619d18142 Author: Thorsten Blum Date: Sat Feb 10 16:20:04 2024 +0100 docs: kconfig: Fix grammar and formatting - Remove unnecessary spaces - Fix grammar s/to solution/solution/ Signed-off-by: Thorsten Blum Reviewed-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit c1c9d0f6f7f1dbf29db996bd8e166242843a5f21 Author: Jean Delvare Date: Wed Feb 14 15:59:39 2024 +0100 i2c: i801: Fix block process call transactions According to the Intel datasheets, software must reset the block buffer index twice for block process call transactions: once before writing the outgoing data to the buffer, and once again before reading the incoming data from the buffer. The driver is currently missing the second reset, causing the wrong portion of the block buffer to be read. Signed-off-by: Jean Delvare Reported-by: Piotr Zakowski Closes: https://lore.kernel.org/linux-i2c/20240213120553.7b0ab120@endymion.delvare/ Fixes: 315cd67c9453 ("i2c: i801: Add Block Write-Block Read Process Call support") Reviewed-by: Alexander Sverdlin Signed-off-by: Andi Shyti commit f44bff19268517ee98e80e944cad0f04f1db72e3 Author: Arnd Bergmann Date: Mon Feb 12 12:19:04 2024 +0100 i2c: pasemi: split driver into two separate modules On powerpc, it is possible to compile test both the new apple (arm) and old pasemi (powerpc) drivers for the i2c hardware at the same time, which leads to a warning about linking the same object file twice: scripts/Makefile.build:244: drivers/i2c/busses/Makefile: i2c-pasemi-core.o is added to multiple modules: i2c-apple i2c-pasemi Rework the driver to have an explicit helper module, letting Kbuild take care of whether this should be built-in or a loadable driver. Fixes: 9bc5f4f660ff ("i2c: pasemi: Split pci driver to its own file") Signed-off-by: Arnd Bergmann Reviewed-by: Sven Peter Signed-off-by: Andi Shyti commit 3b9ab248bc45abf8c2365ed3eec86cdefd4d626a Author: Masahiro Yamada Date: Fri Feb 2 10:31:42 2024 +0900 kbuild: use 4-space indentation when followed by conditionals GNU Make manual [1] clearly forbids a tab at the beginning of the conditional directive line: "Extra spaces are allowed and ignored at the beginning of the conditional directive line, but a tab is not allowed." This will not work for the next release of GNU Make, hence commit 82175d1f9430 ("kbuild: Replace tabs with spaces when followed by conditionals") replaced the inappropriate tabs with 8 spaces. However, the 8-space indentation cannot be visually distinguished. Linus suggested 2-4 spaces for those nested if-statements. [2] This commit redoes the replacement with 4 spaces. [1]: https://www.gnu.org/software/make/manual/make.html#Conditional-Syntax [2]: https://lore.kernel.org/all/CAHk-=whJKZNZWsa-VNDKafS_VfY4a5dAjG-r8BZgWk_a-xSepw@mail.gmail.com/ Suggested-by: Linus Torvalds Signed-off-by: Masahiro Yamada commit d8bdd795d383a23e38ac48a40d3d223caf47b290 Author: Jann Horn Date: Wed Feb 14 17:05:38 2024 +0100 lsm: fix integer overflow in lsm_set_self_attr() syscall security_setselfattr() has an integer overflow bug that leads to out-of-bounds access when userspace provides bogus input: `lctx->ctx_len + sizeof(*lctx)` is checked against `lctx->len` (and, redundantly, also against `size`), but there are no checks on `lctx->ctx_len`. Therefore, userspace can provide an `lsm_ctx` with `->ctx_len` set to a value between `-sizeof(struct lsm_ctx)` and -1, and this bogus `->ctx_len` will then be passed to an LSM module as a buffer length, causing LSM modules to perform out-of-bounds accesses. The following reproducer will demonstrate this under ASAN (if AppArmor is loaded as an LSM): ``` struct lsm_ctx { uint64_t id; uint64_t flags; uint64_t len; uint64_t ctx_len; char ctx[]; }; int main(void) { size_t size = sizeof(struct lsm_ctx); struct lsm_ctx *ctx = malloc(size); ctx->id = 104/*LSM_ID_APPARMOR*/; ctx->flags = 0; ctx->len = size; ctx->ctx_len = -sizeof(struct lsm_ctx); syscall( 460/*__NR_lsm_set_self_attr*/, /*attr=*/ 100/*LSM_ATTR_CURRENT*/, /*ctx=*/ ctx, /*size=*/ size, /*flags=*/ 0 ); } ``` Fixes: a04a1198088a ("LSM: syscalls for current process attributes") Signed-off-by: Jann Horn Acked-by: Casey Schaufler [PM: subj tweak, removed ref to ASAN splat that isn't included] Signed-off-by: Paul Moore commit 321da3dc1f3c92a12e3c5da934090d2992a8814c Author: Martin K. Petersen Date: Tue Feb 13 09:33:06 2024 -0500 scsi: sd: usb_storage: uas: Access media prior to querying device properties It has been observed that some USB/UAS devices return generic properties hardcoded in firmware for mode pages for a period of time after a device has been discovered. The reported properties are either garbage or they do not accurately reflect the characteristics of the physical storage device attached in the case of a bridge. Prior to commit 1e029397d12f ("scsi: sd: Reorganize DIF/DIX code to avoid calling revalidate twice") we would call revalidate several times during device discovery. As a result, incorrect values would eventually get replaced with ones accurately describing the attached storage. When we did away with the redundant revalidate pass, several cases were reported where devices reported nonsensical values or would end up in write-protected state. An initial attempt at addressing this issue involved introducing a delayed second revalidate invocation. However, this approach still left some devices reporting incorrect characteristics. Tasos Sahanidis debugged the problem further and identified that introducing a READ operation prior to MODE SENSE fixed the problem and that it wasn't a timing issue. Issuing a READ appears to cause the devices to update their state to reflect the actual properties of the storage media. Device properties like vendor, model, and storage capacity appear to be correctly reported from the get-go. It is unclear why these devices defer populating the remaining characteristics. Match the behavior of a well known commercial operating system and trigger a READ operation prior to querying device characteristics to force the device to populate the mode pages. The additional READ is triggered by a flag set in the USB storage and UAS drivers. We avoid issuing the READ for other transport classes since some storage devices identify Linux through our particular discovery command sequence. Link: https://lore.kernel.org/r/20240213143306.2194237-1-martin.petersen@oracle.com Fixes: 1e029397d12f ("scsi: sd: Reorganize DIF/DIX code to avoid calling revalidate twice") Cc: stable@vger.kernel.org Reported-by: Tasos Sahanidis Reviewed-by: Ewan D. Milne Reviewed-by: Bart Van Assche Tested-by: Tasos Sahanidis Signed-off-by: Martin K. Petersen commit 55ea989977f4e11a1c3bdfabb51295090bb0f7d6 Author: Sasha Neftin Date: Wed Jan 24 07:57:00 2024 +0200 igc: Remove temporary workaround PHY_CONTROL register works as defined in the IEEE 802.3 specification (IEEE 802.3-2008 22.2.4.1). Tidy up the temporary workaround. User impact: PHY can now be powered down when the ethernet link is down. Testing hints: ip link set down (or just disconnect the ethernet cable). Oldest tested NVM version is: 1045:740. Fixes: 5586838fe9ce ("igc: Add code for PHY support") Signed-off-by: Sasha Neftin Reviewed-by: Paul Menzel Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit c56d055893cbe97848611855d1c97d0ab171eccc Author: Kunwu Chan Date: Mon Jan 15 16:28:25 2024 +0800 igb: Fix string truncation warnings in igb_set_fw_version Commit 1978d3ead82c ("intel: fix string truncation warnings") fixes '-Wformat-truncation=' warnings in igb_main.c by using kasprintf. drivers/net/ethernet/intel/igb/igb_main.c:3092:53: warning:‘%d’ directive output may be truncated writing between 1 and 5 bytes into a region of size between 1 and 13 [-Wformat-truncation=] 3092 | "%d.%d, 0x%08x, %d.%d.%d", | ^~ drivers/net/ethernet/intel/igb/igb_main.c:3092:34: note:directive argument in the range [0, 65535] 3092 | "%d.%d, 0x%08x, %d.%d.%d", | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/intel/igb/igb_main.c:3092:34: note:directive argument in the range [0, 65535] drivers/net/ethernet/intel/igb/igb_main.c:3090:25: note:‘snprintf’ output between 23 and 43 bytes into a destination of size 32 kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fix this warning by using a larger space for adapter->fw_version, and then fall back and continue to use snprintf. Fixes: 1978d3ead82c ("intel: fix string truncation warnings") Signed-off-by: Kunwu Chan Cc: Kunwu Chan Suggested-by: Jakub Kicinski Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 2394ac4145ea91b92271e675a09af2a9ea6840b7 Author: Steven Rostedt (Google) Date: Wed Feb 14 11:20:46 2024 -0500 tracing: Inform kmemleak of saved_cmdlines allocation The allocation of the struct saved_cmdlines_buffer structure changed from: s = kmalloc(sizeof(*s), GFP_KERNEL); s->saved_cmdlines = kmalloc_array(TASK_COMM_LEN, val, GFP_KERNEL); to: orig_size = sizeof(*s) + val * TASK_COMM_LEN; order = get_order(orig_size); size = 1 << (order + PAGE_SHIFT); page = alloc_pages(GFP_KERNEL, order); if (!page) return NULL; s = page_address(page); memset(s, 0, sizeof(*s)); s->saved_cmdlines = kmalloc_array(TASK_COMM_LEN, val, GFP_KERNEL); Where that s->saved_cmdlines allocation looks to be a dangling allocation to kmemleak. That's because kmemleak only keeps track of kmalloc() allocations. For allocations that use page_alloc() directly, the kmemleak needs to be explicitly informed about it. Add kmemleak_alloc() and kmemleak_free() around the page allocation so that it doesn't give the following false positive: unreferenced object 0xffff8881010c8000 (size 32760): comm "swapper", pid 0, jiffies 4294667296 hex dump (first 32 bytes): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ backtrace (crc ae6ec1b9): [] kmemleak_alloc+0x45/0x80 [] __kmalloc_large_node+0x10d/0x190 [] __kmalloc+0x3b1/0x4c0 [] allocate_cmdlines_buffer+0x113/0x230 [] tracer_alloc_buffers.isra.0+0x124/0x460 [] early_trace_init+0x14/0xa0 [] start_kernel+0x12e/0x3c0 [] x86_64_start_reservations+0x18/0x30 [] x86_64_start_kernel+0x7b/0x80 [] secondary_startup_64_no_verify+0x15e/0x16b Link: https://lore.kernel.org/linux-trace-kernel/87r0hfnr9r.fsf@kernel.org/ Link: https://lore.kernel.org/linux-trace-kernel/20240214112046.09a322d6@gandalf.local.home Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Catalin Marinas Fixes: 44dc5c41b5b1 ("tracing: Fix wasted memory in saved_cmdlines logic") Reported-by: Kalle Valo Tested-by: Kalle Valo Signed-off-by: Steven Rostedt (Google) commit e67391ca7aa6c96d32061260ffd68d5790765230 Merge: 2f8ebe43a0259 f072b272aa27d Author: Paolo Bonzini Date: Wed Feb 14 12:35:40 2024 -0500 Merge tag 'kvm-riscv-fixes-6.8-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv fixes for 6.8, take #1 - Fix steal-time related sparse warnings commit 2f8ebe43a02596f0a73866e506d2a5b4a5e1d8c2 Merge: 22d0bc0721022 6fd78beed0213 Author: Paolo Bonzini Date: Wed Feb 14 12:34:58 2024 -0500 Merge tag 'kvm-x86-selftests-6.8-rcN' of https://github.com/kvm-x86/linux into HEAD KVM selftests fixes/cleanups (and one KVM x86 cleanup) for 6.8: - Remove redundant newlines from error messages. - Delete an unused variable in the AMX test (which causes build failures when compiling with -Werror). - Fail instead of skipping tests if open(), e.g. of /dev/kvm, fails with an error code other than ENOENT (a Hyper-V selftest bug resulted in an EMFILE, and the test eventually got skipped). - Fix TSC related bugs in several Hyper-V selftests. - Fix a bug in the dirty ring logging test where a sem_post() could be left pending across multiple runs, resulting in incorrect synchronization between the main thread and the vCPU worker thread. - Relax the dirty log split test's assertions on 4KiB mappings to fix false positives due to the number of mappings for memslot 0 (used for code and data that is NOT being dirty logged) changing, e.g. due to NUMA balancing. - Have KVM's gtod_is_based_on_tsc() return "bool" instead of an "int" (the function generates boolean values, and all callers treat the return value as a bool). commit 22d0bc072102233f94006907f15d97ca6352adc4 Merge: 841c35169323c 3376ca3f1a207 Author: Paolo Bonzini Date: Wed Feb 14 12:34:43 2024 -0500 Merge tag 'kvm-x86-fixes-6.8-rcN' of https://github.com/kvm-x86/linux into HEAD KVM x86 fixes for 6.8: - Make a KVM_REQ_NMI request while handling KVM_SET_VCPU_EVENTS if and only if the incoming events->nmi.pending is non-zero. If the target vCPU is in the UNITIALIZED state, the spurious request will result in KVM exiting to userspace, which in turn causes QEMU to constantly acquire and release QEMU's global mutex, to the point where the BSP is unable to make forward progress. - Fix a type (u8 versus u64) goof that results in pmu->fixed_ctr_ctrl being incorrectly truncated, and ultimately causes KVM to think a fixed counter has already been disabled (KVM thinks the old value is '0'). - Fix a stack leak in KVM_GET_MSRS where a failed MSR read from userspace that is ultimately ignored due to ignore_msrs=true doesn't zero the output as intended. commit e37243b65d528a8a9f8b9a57a43885f8e8dfc15c Author: Gianmarco Lusvardi Date: Tue Feb 13 23:05:46 2024 +0000 bpf, scripts: Correct GPL license name The bpf_doc script refers to the GPL as the "GNU Privacy License". I strongly suspect that the author wanted to refer to the GNU General Public License, under which the Linux kernel is released, as, to the best of my knowledge, there is no license named "GNU Privacy License". This patch corrects the license name in the script accordingly. Fixes: 56a092c89505 ("bpf: add script and prepare bpf.h for new helpers documentation") Signed-off-by: Gianmarco Lusvardi Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20240213230544.930018-3-glusvardi@posteo.net commit e20f378d993b1034eebe3ae78e67f3ed10e75356 Author: Arnd Bergmann Date: Fri Feb 9 16:34:54 2024 +0000 nvmem: include bit index in cell sysfs file name Creating sysfs files for all Cells caused a boot failure for linux-6.8-rc1 on Apple M1, which (in downstream dts files) has multiple nvmem cells that use the same byte address. This causes the device probe to fail with [ 0.605336] sysfs: cannot create duplicate filename '/devices/platform/soc@200000000/2922bc000.efuse/apple_efuses_nvmem0/cells/efuse@a10' [ 0.605347] CPU: 7 PID: 1 Comm: swapper/0 Tainted: G S 6.8.0-rc1-arnd-5+ #133 [ 0.605355] Hardware name: Apple Mac Studio (M1 Ultra, 2022) (DT) [ 0.605362] Call trace: [ 0.605365] show_stack+0x18/0x2c [ 0.605374] dump_stack_lvl+0x60/0x80 [ 0.605383] dump_stack+0x18/0x24 [ 0.605388] sysfs_warn_dup+0x64/0x80 [ 0.605395] sysfs_add_bin_file_mode_ns+0xb0/0xd4 [ 0.605402] internal_create_group+0x268/0x404 [ 0.605409] sysfs_create_groups+0x38/0x94 [ 0.605415] devm_device_add_groups+0x50/0x94 [ 0.605572] nvmem_populate_sysfs_cells+0x180/0x1b0 [ 0.605682] nvmem_register+0x38c/0x470 [ 0.605789] devm_nvmem_register+0x1c/0x6c [ 0.605895] apple_efuses_probe+0xe4/0x120 [ 0.606000] platform_probe+0xa8/0xd0 As far as I can tell, this is a problem for any device with multiple cells on different bits of the same address. Avoid the issue by changing the file name to include the first bit number. Fixes: 0331c611949f ("nvmem: core: Expose cells through sysfs") Link: https://github.com/AsahiLinux/linux/blob/bd0a1a7d4/arch/arm64/boot/dts/apple/t600x-dieX.dtsi#L156 Cc: Cc: Miquel Raynal Cc: Rafał Miłecki Cc: Chen-Yu Tsai Cc: Srinivas Kandagatla Cc: Greg Kroah-Hartman Cc: Cc: Sven Peter Signed-off-by: Arnd Bergmann Signed-off-by: Srinivas Kandagatla Reviewed-by: Eric Curtin Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20240209163454.98051-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 23d62fb5d368b56fbfede3757c061d5de410a9b8 Merge: 51c161008e042 78367c32bebfe Author: Greg Kroah-Hartman Date: Wed Feb 14 16:19:17 2024 +0100 Merge tag 'iio-fixes-for-6.8a' of http://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-linus Jonathan writes: IIO: 1st set of fixes for the 6.8 cycle Usual mixed bag of issues introduced this cycle and fixes for long term issues that have been identified recently + one case where I messed up a merge resolution and dropped the build file changes. Most important is the userspace ABI fix for the iio_modifier enum where we accidentally added new entries in the middle rather than at the end. IIO Core - Close a memory leak in an error path. - Move LIGHT_UVA and LIGHT_UVB definitions to end of the iio_modifier enum to avoid breaking older userspace. (not yet in a released kernel thankfully). adi,adis - Fix a DMA buffer alignment issue that was missing in series that fixed these across IIO. adi,ad-sigma-delta - Fix a DMA buffer alignment issue that was missing in series that fixed these across IIO. adi,ad4130 - Zero init remaining fields of clock init data. - Only set GPIO control bits on pins that aren't in use for anything else. adi,ad5933 - Fix an old bug due to type mismatch. This is a rare device so good to get some new test coverage. adi,ad7091r - Use right variable for an error return code. bosch,bma400 - Add missing CONFIG_REGMAP_I2C dependency. bosch,bmp280: - Add missing bmp085 ID to the SPI table to avoid mismatch with the of_device_id table. hid-sensors: - Avoid returning an error for timestamp read back that succeeds. pni,rm3100 - Check value read from RM31000_REG_TMRC register is valid before using it. Hardening to avoid a real world issue seen on some faulty hardware. st,st-sensors - Fix a DMA buffer alignment issue that was missing in series that fixed these across IIO. ti,hdc3020 - Add missing Kconfig and Makefile entrees accidentally dropped when patches were applied. - Fix wrong temperature offset (negated) * tag 'iio-fixes-for-6.8a' of http://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: ad4130: only set GPIO_CTRL if pin is unused iio: adc: ad4130: zero-initialize clock init data iio: accel: bma400: Fix a compilation problem iio: commom: st_sensors: ensure proper DMA alignment iio: hid-sensor-als: Return 0 for HID_USAGE_SENSOR_TIME_TIMESTAMP iio: move LIGHT_UVA and LIGHT_UVB to the end of iio_modifier staging: iio: ad5933: fix type mismatch regression iio: humidity: hdc3020: fix temperature offset iio: adc: ad7091r8: Fix error code in ad7091r8_gpio_setup() iio: adc: ad_sigma_delta: ensure proper DMA alignment iio: imu: adis: ensure proper DMA alignment iio: humidity: hdc3020: Add Makefile, Kconfig and MAINTAINERS entry iio: imu: bno055: serdev requires REGMAP iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC iio: pressure: bmp280: Add missing bmp085 to SPI id table iio: core: fix memleak in iio_device_register_sysfs commit a64056bb5a3215bd31c8ce17d609ba0f4d5c55ea Author: Matthew Auld Date: Wed Feb 14 18:48:53 2024 +0530 drm/tests/drm_buddy: add alloc_contiguous test Sanity check DRM_BUDDY_CONTIGUOUS_ALLOCATION. v2: Fix checkpatch warnings. Signed-off-by: Matthew Auld Reviewed-by: Arunpravin Paneer Selvam Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20240214131853.5934-2-Arunpravin.PaneerSelvam@amd.com Signed-off-by: Christian König commit 8746c6c9dfa31d269c65dd52ab42fde0720b7d91 Author: Arunpravin Paneer Selvam Date: Wed Feb 14 18:48:52 2024 +0530 drm/buddy: Fix alloc_range() error handling code Few users have observed display corruption when they boot the machine to KDE Plasma or playing games. We have root caused the problem that whenever alloc_range() couldn't find the required memory blocks the function was returning SUCCESS in some of the corner cases. The right approach would be if the total allocated size is less than the required size, the function should return -ENOSPC. Cc: # 6.7+ Fixes: 0a1844bf0b53 ("drm/buddy: Improve contiguous memory allocation") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3097 Tested-by: Mario Limonciello Link: https://patchwork.kernel.org/project/dri-devel/patch/20240207174456.341121-1-Arunpravin.PaneerSelvam@amd.com/ Acked-by: Christian König Reviewed-by: Matthew Auld Signed-off-by: Arunpravin Paneer Selvam Link: https://patchwork.freedesktop.org/patch/msgid/20240214131853.5934-1-Arunpravin.PaneerSelvam@amd.com Signed-off-by: Christian König commit 0846dd77c8349ec92ca0079c9c71d130f34cb192 Author: Shivaprasad G Bhat Date: Tue Feb 13 10:05:22 2024 -0600 powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach The function spapr_tce_platform_iommu_attach_dev() is missing to call iommu_group_put() when the domain is already set. This refcount leak shows up with BUG_ON() during DLPAR remove operation as: KernelBug: Kernel bug in state 'None': kernel BUG at arch/powerpc/platforms/pseries/iommu.c:100! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=8192 NUMA pSeries Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_016) hv:phyp pSeries NIP: c0000000000ff4d4 LR: c0000000000ff4cc CTR: 0000000000000000 REGS: c0000013aed5f840 TRAP: 0700 Tainted: G I (6.8.0-rc3-autotest-g99bd3cb0d12e) MSR: 8000000000029033 CR: 44002402 XER: 20040000 CFAR: c000000000a0d170 IRQMASK: 0 ... NIP iommu_reconfig_notifier+0x94/0x200 LR iommu_reconfig_notifier+0x8c/0x200 Call Trace: iommu_reconfig_notifier+0x8c/0x200 (unreliable) notifier_call_chain+0xb8/0x19c blocking_notifier_call_chain+0x64/0x98 of_reconfig_notify+0x44/0xdc of_detach_node+0x78/0xb0 ofdt_write.part.0+0x86c/0xbb8 proc_reg_write+0xf4/0x150 vfs_write+0xf8/0x488 ksys_write+0x84/0x140 system_call_exception+0x138/0x330 system_call_vectored_common+0x15c/0x2ec The patch adds the missing iommu_group_put() call. Fixes: a8ca9fc9134c ("powerpc/iommu: Do not do platform domain attach atctions after probe") Reported-by: Venkat Rao Bagalkote Closes: https://lore.kernel.org/all/274e0d2b-b5cc-475e-94e6-8427e88e271d@linux.vnet.ibm.com/ Signed-off-by: Shivaprasad G Bhat Tested-by: Venkat Rao Bagalkote Reviewed-by: Jason Gunthorpe Signed-off-by: Michael Ellerman Link: https://msgid.link/170784021983.6249.10039296655906636112.stgit@linux.ibm.com commit 2aa0a5e65eae27dbd96faca92c84ecbf6f492d42 Author: Maxime Jayat Date: Mon Nov 6 19:01:58 2023 +0100 can: netlink: Fix TDCO calculation using the old data bittiming The TDCO calculation was done using the currently applied data bittiming, instead of the newly computed data bittiming, which means that the TDCO had an invalid value unless setting the same data bittiming twice. Fixes: d99755f71a80 ("can: netlink: add interface for CAN-FD Transmitter Delay Compensation (TDC)") Signed-off-by: Maxime Jayat Reviewed-by: Vincent Mailhol Link: https://lore.kernel.org/all/40579c18-63c0-43a4-8d4c-f3a6c1c0b417@munic.io Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit efe7cf828039aedb297c1f9920b638fffee6aabc Author: Oleksij Rempel Date: Fri Oct 20 15:38:14 2023 +0200 can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER) Lock jsk->sk to prevent UAF when setsockopt(..., SO_J1939_FILTER, ...) modifies jsk->filters while receiving packets. Following trace was seen on affected system: ================================================================== BUG: KASAN: slab-use-after-free in j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939] Read of size 4 at addr ffff888012144014 by task j1939/350 CPU: 0 PID: 350 Comm: j1939 Tainted: G W OE 6.5.0-rc5 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: print_report+0xd3/0x620 ? kasan_complete_mode_report_info+0x7d/0x200 ? j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939] kasan_report+0xc2/0x100 ? j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939] __asan_load4+0x84/0xb0 j1939_sk_recv_match_one+0x1af/0x2d0 [can_j1939] j1939_sk_recv+0x20b/0x320 [can_j1939] ? __kasan_check_write+0x18/0x20 ? __pfx_j1939_sk_recv+0x10/0x10 [can_j1939] ? j1939_simple_recv+0x69/0x280 [can_j1939] ? j1939_ac_recv+0x5e/0x310 [can_j1939] j1939_can_recv+0x43f/0x580 [can_j1939] ? __pfx_j1939_can_recv+0x10/0x10 [can_j1939] ? raw_rcv+0x42/0x3c0 [can_raw] ? __pfx_j1939_can_recv+0x10/0x10 [can_j1939] can_rcv_filter+0x11f/0x350 [can] can_receive+0x12f/0x190 [can] ? __pfx_can_rcv+0x10/0x10 [can] can_rcv+0xdd/0x130 [can] ? __pfx_can_rcv+0x10/0x10 [can] __netif_receive_skb_one_core+0x13d/0x150 ? __pfx___netif_receive_skb_one_core+0x10/0x10 ? __kasan_check_write+0x18/0x20 ? _raw_spin_lock_irq+0x8c/0xe0 __netif_receive_skb+0x23/0xb0 process_backlog+0x107/0x260 __napi_poll+0x69/0x310 net_rx_action+0x2a1/0x580 ? __pfx_net_rx_action+0x10/0x10 ? __pfx__raw_spin_lock+0x10/0x10 ? handle_irq_event+0x7d/0xa0 __do_softirq+0xf3/0x3f8 do_softirq+0x53/0x80 __local_bh_enable_ip+0x6e/0x70 netif_rx+0x16b/0x180 can_send+0x32b/0x520 [can] ? __pfx_can_send+0x10/0x10 [can] ? __check_object_size+0x299/0x410 raw_sendmsg+0x572/0x6d0 [can_raw] ? __pfx_raw_sendmsg+0x10/0x10 [can_raw] ? apparmor_socket_sendmsg+0x2f/0x40 ? __pfx_raw_sendmsg+0x10/0x10 [can_raw] sock_sendmsg+0xef/0x100 sock_write_iter+0x162/0x220 ? __pfx_sock_write_iter+0x10/0x10 ? __rtnl_unlock+0x47/0x80 ? security_file_permission+0x54/0x320 vfs_write+0x6ba/0x750 ? __pfx_vfs_write+0x10/0x10 ? __fget_light+0x1ca/0x1f0 ? __rcu_read_unlock+0x5b/0x280 ksys_write+0x143/0x170 ? __pfx_ksys_write+0x10/0x10 ? __kasan_check_read+0x15/0x20 ? fpregs_assert_state_consistent+0x62/0x70 __x64_sys_write+0x47/0x60 do_syscall_64+0x60/0x90 ? do_syscall_64+0x6d/0x90 ? irqentry_exit+0x3f/0x50 ? exc_page_fault+0x79/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Allocated by task 348: kasan_save_stack+0x2a/0x50 kasan_set_track+0x29/0x40 kasan_save_alloc_info+0x1f/0x30 __kasan_kmalloc+0xb5/0xc0 __kmalloc_node_track_caller+0x67/0x160 j1939_sk_setsockopt+0x284/0x450 [can_j1939] __sys_setsockopt+0x15c/0x2f0 __x64_sys_setsockopt+0x6b/0x80 do_syscall_64+0x60/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Freed by task 349: kasan_save_stack+0x2a/0x50 kasan_set_track+0x29/0x40 kasan_save_free_info+0x2f/0x50 __kasan_slab_free+0x12e/0x1c0 __kmem_cache_free+0x1b9/0x380 kfree+0x7a/0x120 j1939_sk_setsockopt+0x3b2/0x450 [can_j1939] __sys_setsockopt+0x15c/0x2f0 __x64_sys_setsockopt+0x6b/0x80 do_syscall_64+0x60/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Fixes: 9d71dd0c70099 ("can: add support of SAE J1939 protocol") Reported-by: Sili Luo Suggested-by: Sili Luo Acked-by: Oleksij Rempel Cc: stable@vger.kernel.org Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/all/20231020133814.383996-1-o.rempel@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 6cdedc18ba7b9dacc36466e27e3267d201948c8d Author: Ziqi Zhao Date: Fri Jul 21 09:22:26 2023 -0700 can: j1939: prevent deadlock by changing j1939_socks_lock to rwlock The following 3 locks would race against each other, causing the deadlock situation in the Syzbot bug report: - j1939_socks_lock - active_session_list_lock - sk_session_queue_lock A reasonable fix is to change j1939_socks_lock to an rwlock, since in the rare situations where a write lock is required for the linked list that j1939_socks_lock is protecting, the code does not attempt to acquire any more locks. This would break the circular lock dependency, where, for example, the current thread already locks j1939_socks_lock and attempts to acquire sk_session_queue_lock, and at the same time, another thread attempts to acquire j1939_socks_lock while holding sk_session_queue_lock. NOTE: This patch along does not fix the unregister_netdevice bug reported by Syzbot; instead, it solves a deadlock situation to prepare for one or more further patches to actually fix the Syzbot bug, which appears to be a reference counting problem within the j1939 codebase. Reported-by: Signed-off-by: Ziqi Zhao Reviewed-by: Oleksij Rempel Acked-by: Oleksij Rempel Link: https://lore.kernel.org/all/20230721162226.8639-1-astrajoan@yahoo.com [mkl: remove unrelated newline change] Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde commit 9b23fceb4158a3636ce4a2bda28ab03dcfa6a26f Author: Arnd Bergmann Date: Tue Feb 13 11:16:34 2024 +0100 ethernet: cpts: fix function pointer cast warnings clang-16 warns about the mismatched prototypes for the devm_* callbacks: drivers/net/ethernet/ti/cpts.c:691:12: error: cast from 'void (*)(struct clk_hw *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 691 | (void(*)(void *))clk_hw_unregister_mux, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/device.h:406:34: note: expanded from macro 'devm_add_action_or_reset' 406 | __devm_add_action_or_reset(dev, action, data, #action) | ^~~~~~ drivers/net/ethernet/ti/cpts.c:703:12: error: cast from 'void (*)(struct device_node *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 703 | (void(*)(void *))of_clk_del_provider, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/device.h:406:34: note: expanded from macro 'devm_add_action_or_reset' 406 | __devm_add_action_or_reset(dev, action, data, #action) Use separate helper functions for this instead, using the expected prototypes with a void* argument. Fixes: a3047a81ba13 ("net: ethernet: ti: cpts: add support for ext rftclk selection") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 5d07e432cb387b9f7d4f0e07245705744c7fb05b Author: Arnd Bergmann Date: Tue Feb 13 11:07:50 2024 +0100 bnad: fix work_queue type mismatch clang-16 warns about a function pointer cast: drivers/net/ethernet/brocade/bna/bnad.c:1995:4: error: cast from 'void (*)(struct delayed_work *)' to 'work_func_t' (aka 'void (*)(struct work_struct *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 1995 | (work_func_t)bnad_tx_cleanup); drivers/net/ethernet/brocade/bna/bnad.c:2252:4: error: cast from 'void (*)(void *)' to 'work_func_t' (aka 'void (*)(struct work_struct *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 2252 | (work_func_t)(bnad_rx_cleanup)); The problem here is mixing up work_struct and delayed_work, which relies the former being the first member of the latter. Change the code to use consistent types here to address the warning and make it more robust against workqueue interface changes. Side note: the use of a delayed workqueue for cleaning up TX descriptors is probably a bad idea since this introduces a noticeable delay. The driver currently does not appear to use BQL, but if one wanted to add that, this would have to be changed as well. Fixes: 01b54b145185 ("bna: tx rx cleanup fix") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 6cf9ff463317217d95732a6cce6fbdd12508921a Author: Dmitry Antipov Date: Mon Feb 12 17:34:02 2024 +0300 net: smc: fix spurious error message from __sock_release() Commit 67f562e3e147 ("net/smc: transfer fasync_list in case of fallback") leaves the socket's fasync list pointer within a container socket as well. When the latter is destroyed, '__sock_release()' warns about its non-empty fasync list, which is a dangling pointer to previously freed fasync list of an underlying TCP socket. Fix this spurious warning by nullifying fasync list of a container socket. Fixes: 67f562e3e147 ("net/smc: transfer fasync_list in case of fallback") Signed-off-by: Dmitry Antipov Signed-off-by: David S. Miller commit d9a31cdab78932d9565d41812142dd1d415fc813 Merge: 858b31133dbec 6ed8187bb36c1 Author: David S. Miller Date: Wed Feb 14 10:37:33 2024 +0000 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-02-12 (i40e) This series contains updates to i40e driver only. Ivan Vecera corrects the looping value used while waiting for queues to be disabled as well as an incorrect mask being used for DCB configuration. Maciej resolves an issue related to XDP traffic; removing a double call to i40e_pf_rxq_wait() and accounting for XDP rings when stopping rings. ==================== Signed-off-by: David S. Miller commit 6b1ba3f9040be5efc4396d86c9752cdc564730be Author: Christophe Kerello Date: Wed Feb 7 15:39:51 2024 +0100 mmc: mmci: stm32: fix DMA API overlapping mappings warning Turning on CONFIG_DMA_API_DEBUG_SG results in the following warning: DMA-API: mmci-pl18x 48220000.mmc: cacheline tracking EEXIST, overlapping mappings aren't supported WARNING: CPU: 1 PID: 51 at kernel/dma/debug.c:568 add_dma_entry+0x234/0x2f4 Modules linked in: CPU: 1 PID: 51 Comm: kworker/1:2 Not tainted 6.1.28 #1 Hardware name: STMicroelectronics STM32MP257F-EV1 Evaluation Board (DT) Workqueue: events_freezable mmc_rescan Call trace: add_dma_entry+0x234/0x2f4 debug_dma_map_sg+0x198/0x350 __dma_map_sg_attrs+0xa0/0x110 dma_map_sg_attrs+0x10/0x2c sdmmc_idma_prep_data+0x80/0xc0 mmci_prep_data+0x38/0x84 mmci_start_data+0x108/0x2dc mmci_request+0xe4/0x190 __mmc_start_request+0x68/0x140 mmc_start_request+0x94/0xc0 mmc_wait_for_req+0x70/0x100 mmc_send_tuning+0x108/0x1ac sdmmc_execute_tuning+0x14c/0x210 mmc_execute_tuning+0x48/0xec mmc_sd_init_uhs_card.part.0+0x208/0x464 mmc_sd_init_card+0x318/0x89c mmc_attach_sd+0xe4/0x180 mmc_rescan+0x244/0x320 DMA API debug brings to light leaking dma-mappings as dma_map_sg and dma_unmap_sg are not correctly balanced. If an error occurs in mmci_cmd_irq function, only mmci_dma_error function is called and as this API is not managed on stm32 variant, dma_unmap_sg is never called in this error path. Signed-off-by: Christophe Kerello Fixes: 46b723dd867d ("mmc: mmci: add stm32 sdmmc variant") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240207143951.938144-1-christophe.kerello@foss.st.com Signed-off-by: Ulf Hansson commit 4b085736e44dbbe69b5eea1a8a294f404678a1f4 Author: Damien Le Moal Date: Thu Jan 11 20:51:22 2024 +0900 ata: libata-core: Do not try to set sleeping devices to standby In ata ata_dev_power_set_standby(), check that the target device is not sleeping. If it is, there is no need to do anything. Fixes: aa3998dbeb3a ("ata: libata-scsi: Disable scsi device manage_system_start_stop") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Niklas Cassel commit 858b31133dbec88465bcc0a006f4dc43173662b8 Author: Subbaraya Sundeep Date: Mon Feb 12 00:30:38 2024 +0530 octeontx2-af: Remove the PF_FUNC validation for NPC transmit rules NPC transmit side mcam rules can use the pcifunc (in packet metadata added by hardware) of transmitting device for mcam lookup similar to the channel of receiving device at receive side. The commit 18603683d766 ("octeontx2-af: Remove channel verification while installing MCAM rules") removed the receive side channel verification to save hardware MCAM filters while switching packets across interfaces but missed removing transmit side checks. This patch removes transmit side rules validation. Fixes: 18603683d766 ("octeontx2-af: Remove channel verification while installing MCAM rules") Signed-off-by: Subbaraya Sundeep Signed-off-by: David S. Miller commit eb5c7465c3240151cd42a55c7ace9da0026308a1 Author: Arnd Bergmann Date: Tue Feb 13 11:07:13 2024 +0100 RDMA/srpt: fix function pointer cast warnings clang-16 notices that srpt_qp_event() gets called through an incompatible pointer here: drivers/infiniband/ulp/srpt/ib_srpt.c:1815:5: error: cast from 'void (*)(struct ib_event *, struct srpt_rdma_ch *)' to 'void (*)(struct ib_event *, void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 1815 | = (void(*)(struct ib_event *, void*))srpt_qp_event; Change srpt_qp_event() to use the correct prototype and adjust the argument inside of it. Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240213100728.458348-1-arnd@kernel.org Reviewed-by: Bart Van Assche Signed-off-by: Leon Romanovsky commit 852d432a14dbcd34e15a3a3910c5c6869a6d1929 Author: Jean-Loïc Charroud Date: Wed Feb 14 00:44:24 2024 +0100 ALSA: hda/realtek: cs35l41: Fix order and duplicates in quirks table Move entry {0x1043, 0x16a3, "ASUS UX3402VA"} following device ID order. Remove duplicate entry for device {0x1043, 0x1f62, "ASUS UX7602ZM"}. Fixes: 51d976079976 ("ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 Models") Signed-off-by: Jean-Loïc Charroud Link: https://lore.kernel.org/r/1969151851.650354669.1707867864074.JavaMail.zimbra@free.fr Signed-off-by: Takashi Iwai commit b91050448897663b60b6d15525c8c3ecae28a368 Author: Jean-Loïc Charroud Date: Wed Feb 14 00:42:12 2024 +0100 ALSA: hda/realtek: cs35l41: Fix device ID / model name The patch 51d976079976c800ef19ed1b542602fcf63f0edb ("ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 Models") modified the entry 1043:1e2e from "ASUS UM3402" to "ASUS UM6702RA/RC" and added another entry for "ASUS UM3402" with 104e:1ee2. The first entry was correct, while the new one corresponds to model "ASUS UM6702RA/RC" Fix the model names for both devices. Fixes: 51d976079976 ("ALSA: hda/realtek: Add quirks for ASUS Zenbook 2022 Models") Signed-off-by: Jean-Loïc Charroud Link: https://lore.kernel.org/r/1656546983.650349575.1707867732866.JavaMail.zimbra@free.fr Signed-off-by: Takashi Iwai commit 706c1fa1ab09f11a131fc4d699ce4c0224b1cb2d Author: Jean-Loïc Charroud Date: Wed Feb 14 00:38:31 2024 +0100 ALSA: hda/realtek: cs35l41: Add internal speaker support for ASUS UM3402 with missing DSD Add the values for the missing DSD properties to the cs35l41 config table. Signed-off-by: Jean-Loïc Charroud Link: https://lore.kernel.org/r/1435594585.650325975.1707867511062.JavaMail.zimbra@free.fr Signed-off-by: Takashi Iwai commit ce6b6d1513965f500a05f3facf223fa01fd74920 Author: Conor Dooley Date: Tue Feb 13 19:45:40 2024 +0000 riscv: dts: sifive: add missing #interrupt-cells to pmic At W=2 dtc complains: hifive-unmatched-a00.dts:120.10-238.4: Warning (interrupt_provider): /soc/i2c@10030000/pmic@58: Missing '#interrupt-cells' in interrupt provider Add the missing property. Reviewed-by: Samuel Holland Signed-off-by: Conor Dooley commit cbecc9fcbbec60136b0180ba0609c829afed5c81 Author: Shrikanth Hegde Date: Tue Feb 13 10:56:35 2024 +0530 powerpc/pseries: fix accuracy of stolen time powerVM hypervisor updates the VPA fields with stolen time data. It currently reports enqueue_dispatch_tb and ready_enqueue_tb for this purpose. In linux these two fields are used to report the stolen time. The VPA fields are updated at the TB frequency. On powerPC its mostly set at 512Mhz. Hence this needs a conversion to ns when reporting it back as rest of the kernel timings are in ns. This conversion is already handled in tb_to_ns function. So use that function to report accurate stolen time. Observed this issue and used an Capped Shared Processor LPAR(SPLPAR) to simplify the experiments. In all these cases, 100% VP Load is run using stress-ng workload. Values of stolen time is in percentages as reported by mpstat. With the patch values are close to expected. 6.8.rc1 +Patch 12EC/12VP 0.0 0.0 12EC/24VP 25.7 50.2 12EC/36VP 37.3 69.2 12EC/48VP 38.5 78.3 Fixes: 0e8a63132800 ("powerpc/pseries: Implement CONFIG_PARAVIRT_TIME_ACCOUNTING") Cc: stable@vger.kernel.org # v6.1+ Signed-off-by: Shrikanth Hegde Reviewed-by: Nicholas Piggin Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://msgid.link/20240213052635.231597-1-sshegde@linux.ibm.com commit ea73179e64131bcd29ba6defd33732abdf8ca14b Author: Naveen N Rao Date: Tue Feb 13 23:24:10 2024 +0530 powerpc/ftrace: Ignore ftrace locations in exit text sections Michael reported that we are seeing an ftrace bug on bootup when KASAN is enabled and we are using -fpatchable-function-entry: ftrace: allocating 47780 entries in 18 pages ftrace-powerpc: 0xc0000000020b3d5c: No module provided for non-kernel address ------------[ ftrace bug ]------------ ftrace faulted on modifying [] 0xc0000000020b3d5c Initializing ftrace call sites ftrace record flags: 0 (0) expected tramp: c00000000008cef4 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/trace/ftrace.c:2180 ftrace_bug+0x3c0/0x424 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 6.5.0-rc3-00120-g0f71dcfb4aef #860 Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1202 0xf000005 of:SLOF,HEAD hv:linux,kvm pSeries NIP: c0000000003aa81c LR: c0000000003aa818 CTR: 0000000000000000 REGS: c0000000033cfab0 TRAP: 0700 Not tainted (6.5.0-rc3-00120-g0f71dcfb4aef) MSR: 8000000002021033 CR: 28028240 XER: 00000000 CFAR: c0000000002781a8 IRQMASK: 3 ... NIP [c0000000003aa81c] ftrace_bug+0x3c0/0x424 LR [c0000000003aa818] ftrace_bug+0x3bc/0x424 Call Trace: ftrace_bug+0x3bc/0x424 (unreliable) ftrace_process_locs+0x5f4/0x8a0 ftrace_init+0xc0/0x1d0 start_kernel+0x1d8/0x484 With CONFIG_FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY=y and CONFIG_KASAN=y, compiler emits nops in functions that it generates for registering and unregistering global variables (unlike with -pg and -mprofile-kernel where calls to _mcount() are not generated in those functions). Those functions then end up in INIT_TEXT and EXIT_TEXT respectively. We don't expect to see any profiled functions in EXIT_TEXT, so ftrace_init_nop() assumes that all addresses that aren't in the core kernel text belongs to a module. Since these functions do not match that criteria, we see the above bug. Address this by having ftrace ignore all locations in the text exit sections of vmlinux. Fixes: 0f71dcfb4aef ("powerpc/ftrace: Add support for -fpatchable-function-entry") Cc: stable@vger.kernel.org # v6.6+ Reported-by: Michael Ellerman Signed-off-by: Naveen N Rao Reviewed-by: Benjamin Gray Signed-off-by: Michael Ellerman Link: https://msgid.link/20240213175410.1091313-1-naveen@kernel.org commit eb6d871f4ba49ac8d0537e051fe983a3a4027f61 Author: David Engraf Date: Wed Feb 7 10:27:58 2024 +0100 powerpc/cputable: Add missing PPC_FEATURE_BOOKE on PPC64 Book-E Commit e320a76db4b0 ("powerpc/cputable: Split cpu_specs[] out of cputable.h") moved the cpu_specs to separate header files. Previously PPC_FEATURE_BOOKE was enabled by CONFIG_PPC_BOOK3E_64. The definition in cpu_specs_e500mc.h for PPC64 no longer enables PPC_FEATURE_BOOKE. This breaks user space reading the ELF hwcaps and expect PPC_FEATURE_BOOKE. Debugging an application with gdb is no longer working on e5500/e6500 because the 64-bit detection relies on PPC_FEATURE_BOOKE for Book-E. Fixes: e320a76db4b0 ("powerpc/cputable: Split cpu_specs[] out of cputable.h") Cc: stable@vger.kernel.org # v6.1+ Signed-off-by: David Engraf Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20240207092758.1058893-1-david.engraf@sysgo.com commit f1acb109505d983779bbb7e20a1ee6244d2b5736 Author: Michael Ellerman Date: Mon Feb 12 17:42:44 2024 +1100 powerpc/kasan: Limit KASAN thread size increase to 32KB KASAN is seen to increase stack usage, to the point that it was reported to lead to stack overflow on some 32-bit machines (see link). To avoid overflows the stack size was doubled for KASAN builds in commit 3e8635fb2e07 ("powerpc/kasan: Force thread size increase with KASAN"). However with a 32KB stack size to begin with, the doubling leads to a 64KB stack, which causes build errors: arch/powerpc/kernel/switch.S:249: Error: operand out of range (0x000000000000fe50 is not between 0xffffffffffff8000 and 0x0000000000007fff) Although the asm could be reworked, in practice a 32KB stack seems sufficient even for KASAN builds - the additional usage seems to be in the 2-3KB range for a 64-bit KASAN build. So only increase the stack for KASAN if the stack size is < 32KB. Fixes: 18f14afe2816 ("powerpc/64s: Increase default stack size to 32KB") Reported-by: Spoorthy Reported-by: Benjamin Gray Reviewed-by: Benjamin Gray Link: https://lore.kernel.org/linuxppc-dev/bug-207129-206035@https.bugzilla.kernel.org%2F/ Signed-off-by: Michael Ellerman Link: https://msgid.link/20240212064244.3924505-1-mpe@ellerman.id.au commit 1fba2bf8e9d5a27b7394856181b6200de7260b79 Author: Michael Ellerman Date: Wed Feb 14 11:00:41 2024 +1100 Revert "powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add" This reverts commit ed8b94f6e0acd652ce69bd69d678a0c769172df8. Gaurav reported that there are still problems with the patch and it should be reverted pending a fuller fix. Link: https://lore.kernel.org/all/4f6fc1ac-7a76-4447-9d0e-f55c0be373f8@linux.ibm.com/ Signed-off-by: Michael Ellerman commit 816054f40a5fdaaed05d9e7f603d2824eeee7e62 Author: Kent Overstreet Date: Tue Feb 13 20:26:09 2024 -0500 bcachefs: Fix missing va_end() Fixes: https://lore.kernel.org/linux-bcachefs/202402131603.E953E2CF@keescook/T/#u Reported-by: coverity scan Signed-off-by: Kent Overstreet commit 2eeccee86dc75a584a8c7e67a8b824d5168c978f Author: Kent Overstreet Date: Mon Feb 12 20:05:48 2024 -0500 bcachefs: Fix check_version_upgrade() When also downgrading, check_version_upgrade() could pick a new version greater than the latest supported version. Fixes: Signed-off-by: Kent Overstreet commit 4e07447503f01766ae976207eb3b947437ed8dbc Author: Kent Overstreet Date: Sat Feb 10 21:01:40 2024 -0500 bcachefs: Clamp replicas_required to replicas This prevents going emergency read only when the user has specified replicas_required > replicas. Signed-off-by: Kent Overstreet commit 8d30528a170905ede9ab6ab81f229e441808590b Author: Chaitanya Kulkarni Date: Mon Feb 12 23:58:24 2024 -0800 nvmet: remove superfluous initialization Remove superfluous initialization of status variable in nvmet_execute_admin_connect() and nvmet_execute_io_connect(), since it will get overwritten by nvmet_copy_from_sgl(). Signed-off-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit ff3206d2186d84e4f77e1378ba1d225633f17b9b Author: Ivan Semenov Date: Tue Feb 6 19:28:45 2024 +0200 mmc: core: Fix eMMC initialization with 1-bit bus connection Initializing an eMMC that's connected via a 1-bit bus is current failing, if the HW (DT) informs that 4-bit bus is supported. In fact this is a regression, as we were earlier capable of falling back to 1-bit mode, when switching to 4/8-bit bus failed. Therefore, let's restore the behaviour. Log for Samsung eMMC 5.1 chip connected via 1bit bus (only D0 pin) Before patch: [134509.044225] mmc0: switch to bus width 4 failed [134509.044509] mmc0: new high speed MMC card at address 0001 [134509.054594] mmcblk0: mmc0:0001 BGUF4R 29.1 GiB [134509.281602] mmc0: switch to bus width 4 failed [134509.282638] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 [134509.282657] Buffer I/O error on dev mmcblk0, logical block 0, async page read [134509.284598] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 [134509.284602] Buffer I/O error on dev mmcblk0, logical block 0, async page read [134509.284609] ldm_validate_partition_table(): Disk read failed. [134509.286495] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 [134509.286500] Buffer I/O error on dev mmcblk0, logical block 0, async page read [134509.288303] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 [134509.288308] Buffer I/O error on dev mmcblk0, logical block 0, async page read [134509.289540] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 [134509.289544] Buffer I/O error on dev mmcblk0, logical block 0, async page read [134509.289553] mmcblk0: unable to read partition table [134509.289728] mmcblk0boot0: mmc0:0001 BGUF4R 31.9 MiB [134509.290283] mmcblk0boot1: mmc0:0001 BGUF4R 31.9 MiB [134509.294577] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2 [134509.295835] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 [134509.295841] Buffer I/O error on dev mmcblk0, logical block 0, async page read After patch: [134551.089613] mmc0: switch to bus width 4 failed [134551.090377] mmc0: new high speed MMC card at address 0001 [134551.102271] mmcblk0: mmc0:0001 BGUF4R 29.1 GiB [134551.113365] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 [134551.114262] mmcblk0boot0: mmc0:0001 BGUF4R 31.9 MiB [134551.114925] mmcblk0boot1: mmc0:0001 BGUF4R 31.9 MiB Fixes: 577fb13199b1 ("mmc: rework selection of bus speed mode") Cc: stable@vger.kernel.org Signed-off-by: Ivan Semenov Link: https://lore.kernel.org/r/20240206172845.34316-1-ivan@semenov.dev Signed-off-by: Ulf Hansson commit 2127c604383666675789fd4a5fc2aead46c73aad Author: Sebastian Andrzej Siewior Date: Fri Feb 2 17:32:20 2024 +0100 xsk: Add truesize to skb_add_rx_frag(). xsk_build_skb() allocates a page and adds it to the skb via skb_add_rx_frag() and specifies 0 for truesize. This leads to a warning in skb_add_rx_frag() with CONFIG_DEBUG_NET enabled because size is larger than truesize. Increasing truesize requires to add the same amount to socket's sk_wmem_alloc counter in order not to underflow the counter during release in the destructor (sock_wfree()). Pass the size of the allocated page as truesize to skb_add_rx_frag(). Add this mount to socket's sk_wmem_alloc counter. Fixes: cf24f5a5feea ("xsk: add support for AF_XDP multi-buffer on Tx path") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Daniel Borkmann Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20240202163221.2488589-1-bigeasy@linutronix.de commit 0db0c1770834f39e11a2902e20e1f11a482f4465 Author: Richard Fitzgerald Date: Fri Feb 9 11:18:40 2024 +0000 ASoC: cs35l56: Workaround for ACPI with broken spk-id-gpios property The ACPI in some SoundWire laptops has a spk-id-gpios property but it points to the wrong Device node. This patch adds a workaround to try to get the GPIO directly from the correct Device node. If the attempt to get the GPIOs from the property fails, the workaround looks for the SDCA node "AF01", which is where the GpioIo resource is defined. If this exists, a spk-id-gpios mapping is added to that node and then the GPIO is got from that node using the property. Signed-off-by: Richard Fitzgerald Link: https://msgid.link/r/20240209111840.1543630-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit b6ddaa63f728d26c12048aed76be99c24f435c41 Author: Harshit Mogalapalli Date: Fri Jan 19 11:08:40 2024 -0800 drm/rockchip: vop2: add a missing unlock in vop2_crtc_atomic_enable() Unlock before returning on the error path. Fixes: 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588") Signed-off-by: Harshit Mogalapalli Reviewed-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20240119190841.1619443-1-harshit.m.mogalapalli@oracle.com commit c22d03a95b0d815cd186302fdd93f74d99f1c914 Author: Chris Morgan Date: Thu Jan 25 14:19:42 2024 -0600 arm64: dts: rockchip: Correct Indiedroid Nova GPIO Names Correct the names given to a few of the GPIO pins. The original names were unknowingly based on the header from a pre-production board. The production board has a slightly different pin assignment for the 40-pin GPIO header. Fixes: 3900160e164b ("arm64: dts: rockchip: Add Indiedroid Nova board") Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20240125201943.90476-2-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit c60d847be7b8e69e419e02a2b3d19c2842a3c35d Author: Will Deacon Date: Mon Feb 12 19:30:52 2024 +0000 KVM: arm64: Fix double-free following kvm_pgtable_stage2_free_unlinked() kvm_pgtable_stage2_free_unlinked() does the final put_page() on the root page of the sub-tree before returning, so remove the additional put_page() invocations in the callers. Cc: Ricardo Koller Fixes: f6a27d6dc51b2 ("KVM: arm64: Drop last page ref in kvm_pgtable_stage2_free_removed()") Signed-off-by: Will Deacon Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240212193052.27765-1-will@kernel.org commit 11f522256e9043b0fcd2f994278645d3e201d20c Author: Hari Bathini Date: Thu Feb 8 15:31:15 2024 +0530 bpf: Fix warning for bpf_cpumask in verifier Compiling with CONFIG_BPF_SYSCALL & !CONFIG_BPF_JIT throws the below warning: "WARN: resolve_btfids: unresolved symbol bpf_cpumask" Fix it by adding the appropriate #ifdef. Signed-off-by: Hari Bathini Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Acked-by: Stanislav Fomichev Acked-by: David Vernet Link: https://lore.kernel.org/bpf/20240208100115.602172-1-hbathini@linux.ibm.com commit 1bbd894e2ae67faf52632bc9290ff926d9b741ea Author: Johan Jonker Date: Mon Feb 5 00:16:43 2024 +0100 arm64: dts: rockchip: Drop interrupts property from rk3328 pwm-rockchip node The binding doesn't define interrupts and adding such a definition was refused because it's unclear how they should ever be used and the relevant registers are outside the PWM range. So drop them fixing several dtbs_check warnings. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/5551846d-62cd-4b72-94f4-07541e726c37@gmail.com Signed-off-by: Heiko Stuebner commit 334bf0710c98d391f4067b72f535d6c4c84dfb6f Author: Heiko Stuebner Date: Fri Jan 19 11:16:56 2024 +0100 arm64: dts: rockchip: set num-cs property for spi on px30 The px30 has two spi controllers with two chip-selects each. The num-cs property is specified as the total number of chip selects a controllers has and is used since 2020 to find uses of chipselects outside that range in the Rockchip spi driver. Without the property set, the default is 1, so spi devices using the second chipselect will not be created. Fixes: eb1262e3cc8b ("spi: spi-rockchip: use num-cs property and ctlr->enable_gpiods") Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz Link: https://lore.kernel.org/r/20240119101656.965744-1-heiko@sntech.de Signed-off-by: Heiko Stuebner commit 00890f5d15f50bd386bf222ddee355cec6c6d53a Author: Krzysztof Kozlowski Date: Thu Feb 8 11:51:29 2024 +0100 arm64: dts: rockchip: minor rk3588 whitespace cleanup The DTS code coding style expects exactly one space before '{' character. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240208105129.128561-1-krzysztof.kozlowski@linaro.org Signed-off-by: Heiko Stuebner commit 1e41f11f08bcc38609d83a8b35fa15bf148f7144 Merge: a7ee79b9c4553 20622dc934e17 Author: Jakub Kicinski Date: Tue Feb 13 10:19:07 2024 -0800 Merge branch 'selftests-net-more-pmtu-sh-fixes' Paolo Abeni says: ==================== selftests: net: more pmtu.sh fixes The mentioned test is still flaky, unusally enough in 'fast' environments. Patch 2/2 [try to] address the existing issues, while patch 1/2 introduces more strict tests for the existing net helpers, to hopefully prevent future pain. ==================== Link: https://lore.kernel.org/r/cover.1707731086.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 20622dc934e178ef11fad396eb272597f21bffe2 Author: Paolo Abeni Date: Mon Feb 12 11:19:24 2024 +0100 selftests: net: more pmtu.sh fixes The netdev CI is reporting failures for the pmtu test: [ 115.929264] br0: port 2(vxlan_a) entered forwarding state # 2024/02/08 17:33:22 socat[7871] E bind(7, {AF=10 [0000:0000:0000:0000:0000:0000:0000:0000]:50000}, 28): Address already in use # 2024/02/08 17:33:22 socat[7877] E write(7, 0x5598fb6ff000, 8192): Connection refused # TEST: IPv6, bridged vxlan4: PMTU exceptions [FAIL] # File size 0 mismatches exepcted value in locally bridged vxlan test The root cause is apparently a socket created by a previous iteration of the relevant loop still lasting in LAST_ACK state. Note that even the file size check is racy, the receiver process dumping the file could still be running in background Allow the listener to bound on the same local port via SO_REUSEADDR and collect file output file size only after the listener completion. Fixes: 136a1b434bbb ("selftests: net: test vxlan pmtu exceptions with tcp") Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/4f51c11a1ce7ca7a4dabd926cffff63dadac9ba1.1707731086.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit a71d0908e32f3dd41e355d83eeadd44d94811fd6 Author: Paolo Abeni Date: Mon Feb 12 11:19:23 2024 +0100 selftests: net: more strict check in net_helper The helper waiting for a listener port can match any socket whose hexadecimal representation of source or destination addresses matches that of the given port. Additionally, any socket state is accepted. All the above can let the helper return successfully before the relevant listener is actually ready, with unexpected results. So far I could not find any related failure in the netdev CI, but the next patch is going to make the critical event more easily reproducible. Address the issue matching the port hex only vs the relevant socket field and additionally checking the socket state for TCP sockets. Fixes: 3bdd9fd29cb0 ("selftests/net: synchronize udpgro tests' tx and rx connection") Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/192b3dbc443d953be32991d1b0ca432bd4c65008.1707731086.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit a7ee79b9c4553498c78552d12321d85b645f02ca Author: Paolo Abeni Date: Mon Feb 12 10:43:31 2024 +0100 selftests: net: cope with slow env in so_txtime.sh test The mentioned test is failing in slow environments: # SO_TXTIME ipv4 clock monotonic # ./so_txtime: recv: timeout: Resource temporarily unavailable not ok 1 selftests: net: so_txtime.sh # exit=1 Tuning the tolerance in the test binary is error-prone and doomed to failures is slow-enough environment. Just resort to suppress any error in such cases. Note to suppress them we need first to refactor a bit the code moving it to explicit error handling. Fixes: af5136f95045 ("selftests/net: SO_TXTIME with ETF and FQ") Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/2142d9ed4b5c5aa07dd1b455779625d91b175373.1707730902.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit e58779f47e5eeb4fc9e3707951b81fbe31de5e3b Author: Paolo Abeni Date: Mon Feb 12 10:39:41 2024 +0100 selftests: net: cope with slow env in gro.sh test The gro self-tests sends the packets to be aggregated with multiple write operations. When running is slow environment, it's hard to guarantee that the GRO engine will wait for the last packet in an intended train. The above causes almost deterministic failures in our CI for the 'large' test-case. Address the issue explicitly ignoring failures for such case in slow environments (KSFT_MACHINE_SLOW==true). Fixes: 7d1575014a63 ("selftests/net: GRO coalesce test") Reviewed-by: Willem de Bruijn Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/97d3ba83f5a2bfeb36f6bc0fb76724eb3dafb608.1707729403.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 2f6397e448e689adf57e6788c90f913abd7e1af8 Author: Filipe Manana Date: Fri Feb 2 14:32:17 2024 +0000 btrfs: don't refill whole delayed refs block reserve when starting transaction Since commit 28270e25c69a ("btrfs: always reserve space for delayed refs when starting transaction") we started not only to reserve metadata space for the delayed refs a caller of btrfs_start_transaction() might generate but also to try to fully refill the delayed refs block reserve, because there are several case where we generate delayed refs and haven't reserved space for them, relying on the global block reserve. Relying too much on the global block reserve is not always safe, and can result in hitting -ENOSPC during transaction commits or worst, in rare cases, being unable to mount a filesystem that needs to do orphan cleanup or anything that requires modifying the filesystem during mount, and has no more unallocated space and the metadata space is nearly full. This was explained in detail in that commit's change log. However the gap between the reserved amount and the size of the delayed refs block reserve can be huge, so attempting to reserve space for such a gap can result in allocating many metadata block groups that end up not being used. After a recent patch, with the subject: "btrfs: add new unused block groups to the list of unused block groups" We started to add new block groups that are unused to the list of unused block groups, to avoid having them around for a very long time in case they are never used, because a block group is only added to the list of unused block groups when we deallocate the last extent or when mounting the filesystem and the block group has 0 bytes used. This is not a problem introduced by the commit mentioned earlier, it always existed as our metadata space reservations are, most of the time, pessimistic and end up not using all the space they reserved, so we can occasionally end up with one or two unused metadata block groups for a long period. However after that commit mentioned earlier, we are just more pessimistic in the metadata space reservations when starting a transaction and therefore the issue is more likely to happen. This however is not always enough because we might create unused metadata block groups when reserving metadata space at a high rate if there's always a gap in the delayed refs block reserve and the cleaner kthread isn't triggered often enough or is busy with other work (running delayed iputs, cleaning deleted roots, etc), not to mention the block group's allocated space is only usable for a new block group after the transaction used to remove it is committed. A user reported that he's getting a lot of allocated metadata block groups but the usage percentage of metadata space was very low compared to the total allocated space, specially after running a series of block group relocations. So for now stop trying to refill the gap in the delayed refs block reserve and reserve space only for the delayed refs we are expected to generate when starting a transaction. CC: stable@vger.kernel.org # 6.7+ Reported-by: Ivan Shapovalov Link: https://lore.kernel.org/linux-btrfs/9cdbf0ca9cdda1b4c84e15e548af7d7f9f926382.camel@intelfx.name/ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H6802ayLHUJFztzZAVzBLJAGdFx=6FHNNy87+obZXXZpQ@mail.gmail.com/ Tested-by: Ivan Shapovalov Reported-by: Heddxh Link: https://lore.kernel.org/linux-btrfs/CAE93xANEby6RezOD=zcofENYZOT-wpYygJyauyUAZkLv6XVFOA@mail.gmail.com/ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 88e81a67773017a2b93f6d5fe7c78bb0c5a6e4dd Author: Filipe Manana Date: Mon Feb 12 21:50:53 2024 +0000 btrfs: zoned: fix chunk map leak when loading block group zone info At btrfs_load_block_group_zone_info() we never drop a reference on the chunk map we have looked up, therefore leaking a reference on it. So add the missing btrfs_free_chunk_map() at the end of the function. Fixes: 7dc66abb5a47 ("btrfs: use a dedicated data structure for chunk maps") Reported-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Tested-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1bd96c92c6a0a4d43815eb685c15aa4b78879dc9 Author: Filipe Manana Date: Fri Feb 2 12:09:22 2024 +0000 btrfs: reject encoded write if inode has nodatasum flag set Currently we allow an encoded write against inodes that have the NODATASUM flag set, either because they are NOCOW files or they were created while the filesystem was mounted with "-o nodatasum". This results in having compressed extents without corresponding checksums, which is a filesystem inconsistency reported by 'btrfs check'. For example, running btrfs/281 with MOUNT_OPTIONS="-o nodatacow" triggers this and 'btrfs check' errors out with: [1/7] checking root items [2/7] checking extents [3/7] checking free space tree [4/7] checking fs roots root 256 inode 257 errors 1040, bad file extent, some csum missing root 256 inode 258 errors 1040, bad file extent, some csum missing ERROR: errors found in fs roots (...) So reject encoded writes if the target inode has NODATASUM set. CC: stable@vger.kernel.org # 6.1+ Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit feefe1f49d26bad9d8997096e3a200280fa7b1c5 Author: Filipe Manana Date: Wed Jan 31 17:18:04 2024 +0000 btrfs: don't reserve space for checksums when writing to nocow files Currently when doing a write to a file we always reserve metadata space for inserting data checksums. However we don't need to do it if we have a nodatacow file (-o nodatacow mount option or chattr +C) or if checksums are disabled (-o nodatasum mount option), as in that case we are only adding unnecessary pressure to metadata reservations. For example on x86_64, with the default node size of 16K, a 4K buffered write into a nodatacow file is reserving 655360 bytes of metadata space, as it's accounting for checksums. After this change, which stops reserving space for checksums if we have a nodatacow file or checksums are disabled, we only need to reserve 393216 bytes of metadata. CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9dbe95e28ff1473837a2838d621c75d365a13822 Merge: fcbe4873089c8 b029482011bff Author: Mark Brown Date: Tue Feb 13 17:12:51 2024 +0000 ASoC: SOF: Intel: pci-tgl/lnl: Change default paths Merge series from Peter Ujfalusi : Hi, Align the IPC4 firmware path/name and the topology path to the documentation: default_fw_path: intel/sof-ipc4/{platform_name} default_lib_path: intel/sof-ipc4-lib/{platform_name} default_tplg_path: intel/sof-ipc4-tplg default_fw_filename: sof-{platform_name}.ri Tiger Lake and Lunar Lake support is not yet available via the official firmware release, the paths can be changed now to avoid misalignment in the future. Regards, Peter --- Peter Ujfalusi (2): ASoC: SOF: Intel: pci-tgl: Change the default paths and firmware names ASoC: SOF: Intel: pci-lnl: Change the topology path to intel/sof-ipc4-tplg sound/soc/sof/intel/pci-lnl.c | 2 +- sound/soc/sof/intel/pci-tgl.c | 64 +++++++++++++++++------------------ 2 files changed, 33 insertions(+), 33 deletions(-) -- 2.43.0 commit a6eaa24f1cc2c7aecec6047556bdfe32042094c3 Author: Sven Schnelle Date: Mon Feb 5 07:53:40 2024 +0100 tracing: Use ring_buffer_record_is_set_on() in tracer_tracing_is_on() tracer_tracing_is_on() checks whether record_disabled is not zero. This checks both the record_disabled counter and the RB_BUFFER_OFF flag. Reading the source it looks like this function should only check for the RB_BUFFER_OFF flag. Therefore use ring_buffer_record_is_set_on(). This fixes spurious fails in the 'test for function traceon/off triggers' test from the ftrace testsuite when the system is under load. Link: https://lore.kernel.org/linux-trace-kernel/20240205065340.2848065-1-svens@linux.ibm.com Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Tested-By: Mete Durlu Signed-off-by: Sven Schnelle Signed-off-by: Steven Rostedt (Google) commit bdbddb109c75365d22ec4826f480c5e75869e1cb Author: Petr Pavlu Date: Tue Feb 13 14:24:34 2024 +0100 tracing: Fix HAVE_DYNAMIC_FTRACE_WITH_REGS ifdef Commit a8b9cf62ade1 ("ftrace: Fix DIRECT_CALLS to use SAVE_REGS by default") attempted to fix an issue with direct trampolines on x86, see its description for details. However, it wrongly referenced the HAVE_DYNAMIC_FTRACE_WITH_REGS config option and the problem is still present. Add the missing "CONFIG_" prefix for the logic to work as intended. Link: https://lore.kernel.org/linux-trace-kernel/20240213132434.22537-1-petr.pavlu@suse.com Fixes: a8b9cf62ade1 ("ftrace: Fix DIRECT_CALLS to use SAVE_REGS by default") Signed-off-by: Petr Pavlu Signed-off-by: Steven Rostedt (Google) commit 29f6975332479f92233594901c649ff4d71f8cb6 Author: Keith Busch Date: Mon Feb 5 11:10:25 2024 -0800 nvme: implement support for relaxed effects NVM Express TP4167 provides a way for controllers to report a relaxed execution constraint. Specifically, it notifies of exclusivity for IO vs. admin commands instead of grouping these together. If set, then we don't need to freeze IO in order to execute that admin command. The freezing distrupts IO processes, so it's nice to avoid that if the controller tells us it's not necessary. Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit f03606470886e781e68b5d7acf2afb23b86cd7fa Author: Krzysztof Kozlowski Date: Tue Feb 13 15:46:38 2024 +0100 riscv: dts: starfive: replace underscores in node names Underscores should not be used in node names (dtc with W=2 warns about them), so replace them with hyphens. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Conor Dooley commit 7e90b5c295ec1e47c8ad865429f046970c549a66 Merge: c664e16bb1ba1 b5f3193603710 Author: Linus Torvalds Date: Tue Feb 13 08:38:57 2024 -0800 Merge tag 'trace-tools-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing tooling fixes from Steven Rostedt: "RTLA: - rtla tools are exiting with a positive value when usage() is called. Make them return 0 if the usage was called via -h/--help - the -P priority sets the sched priority for rtla workload. When the SCHED_OTHER scheduler is selected, it sets the rt_priority instead of the nice parameter. Setting the nice value is the correct thing, so fix it - rtla is failing to compile with clang due to unsupported options from gcc. Adjusting the compiler/linker options makes clang work properly - Remove the sched_getattr() unused function on utils.c - Fixes for variable initialization and size, reported by clang Verification: - rv is failing to compile with clang due to unsupported options from gcc. Adjusting the compiler/linker options makes clang work properly - Fix an uninitialized variable on in_kernel.c reported by clang" * tag 'trace-tools-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tools/rtla: Exit with EXIT_SUCCESS when help is invoked tools/rtla: Replace setting prio with nice for SCHED_OTHER tools/rv: Fix curr_reactor uninitialized variable tools/rv: Fix Makefile compiler options for clang tools/rtla: Remove unused sched_getattr() function tools/rtla: Fix clang warning about mount_point var size tools/rtla: Fix uninitialized bucket/data->bucket_size warning tools/rtla: Fix Makefile compiler options for clang commit 4e06ec0774f5bebf10e27bc7a5ace4b48ae0fa56 Author: Rob Herring Date: Wed Jan 24 13:07:33 2024 -0600 dt-bindings: ufs: samsung,exynos-ufs: Add size constraints on "samsung,sysreg" The 'phandle-array' type is a bit ambiguous. It can be either just an array of phandles or an array of phandles plus args. "samsung,sysreg" is the latter and needs to be constrained to a single entry with a phandle and offset. Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240124190733.1554314-1-robh@kernel.org Signed-off-by: Rob Herring commit 79bd7eab8366b29eaa099908d5694cb473684b9d Author: Chaitanya Kulkarni Date: Tue Feb 13 00:26:46 2024 -0800 nvme-fabrics: fix I/O connect error handling In nvmf_connect_io_queue(), if connect I/O command fails, we log the error and continue for authentication. This overrides error captured from __nvme_submit_sync_cmd(), causing wrong return value. Add goto out_free_data after logging connect error to fix the issue. Fixes: f50fff73d620c ("nvme: implement In-Band authentication") Signed-off-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Signed-off-by: Keith Busch commit b6802b61a9d0e99dcfa6fff7c50db7c48a9623d3 Author: Rob Clark Date: Mon Feb 12 13:55:34 2024 -0800 drm/crtc: fix uninitialized variable use even harder DRM_MODESET_LOCK_ALL_BEGIN() has a hidden trap-door (aka retry loop), which means we can't rely too much on variable initializers. Fixes: 6e455f5dcdd1 ("drm/crtc: fix uninitialized variable use") Signed-off-by: Rob Clark Reviewed-by: Daniel Vetter Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov # sc7180, sdm845 Link: https://patchwork.freedesktop.org/patch/msgid/20240212215534.190682-1-robdclark@gmail.com Signed-off-by: Dmitry Baryshkov commit 269e31aecdd0b70f53a05def79480f15cbcc0fd6 Author: Ralf Schlatterbeck Date: Fri Feb 2 12:53:30 2024 +0100 spi-mxs: Fix chipselect glitch There was a change in the mxs-dma engine that uses a new custom flag. The change was not applied to the mxs spi driver. This results in chipselect being deasserted too early. This fixes the chipselect problem by using the new flag in the mxs-spi driver. Fixes: ceeeb99cd821 ("dmaengine: mxs: rename custom flag") Signed-off-by: Ralf Schlatterbeck Link: https://msgid.link/r/20240202115330.wxkbfmvd76sy3a6a@runtux.com Signed-off-by: Mark Brown commit e5d40e9afd84cec01cdbbbfe62d52f89959ab3ee Author: Naresh Solanki Date: Tue Feb 13 20:28:00 2024 +0530 regulator: max5970: Fix regulator child node name Update regulator child node name to lower case i.e., sw0 & sw1 as descibed in max5970 dt binding. Signed-off-by: Naresh Solanki Link: https://msgid.link/r/20240213145801.2564518-1-naresh.solanki@9elements.com Signed-off-by: Mark Brown commit b671cd3d456315f63171a670769356a196cf7fd0 Author: Philip Yang Date: Mon Aug 21 16:02:01 2023 -0400 drm/prime: Support page array >= 4GB Without unsigned long typecast, the size is passed in as zero if page array size >= 4GB, nr_pages >= 0x100000, then sg list converted will have the first and the last chunk lost. Signed-off-by: Philip Yang Acked-by: Felix Kuehling Reviewed-by: Christian König CC: stable@vger.kernel.org Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20230821200201.24685-1-Philip.Yang@amd.com commit fccfa646ef3628097d59f7d9c1a3e84d4b6bb45e Author: Arnd Bergmann Date: Mon Feb 12 12:24:40 2024 +0100 efi/capsule-loader: fix incorrect allocation size gcc-14 notices that the allocation with sizeof(void) on 32-bit architectures is not enough for a 64-bit phys_addr_t: drivers/firmware/efi/capsule-loader.c: In function 'efi_capsule_open': drivers/firmware/efi/capsule-loader.c:295:24: error: allocation of insufficient size '4' for type 'phys_addr_t' {aka 'long long unsigned int'} with size '8' [-Werror=alloc-size] 295 | cap_info->phys = kzalloc(sizeof(void *), GFP_KERNEL); | ^ Use the correct type instead here. Fixes: f24c4d478013 ("efi/capsule-loader: Reinstate virtual capsule mapping") Signed-off-by: Arnd Bergmann Signed-off-by: Ard Biesheuvel commit 24b6332c2d4ff08fb7601ac8f751a5ba51e0ebd3 Author: Tomasz Kudela Date: Tue Feb 13 12:56:14 2024 +0100 ALSA: hda: Add Lenovo Legion 7i gen7 sound quirk Add sound support for the Legion 7i gen7 laptop (16IAX7). Signed-off-by: Tomasz Kudela Link: https://lore.kernel.org/r/20240213115614.10420-1-ramzes005@gmail.com Signed-off-by: Takashi Iwai commit fcbe4873089c84da641df75cda9cac2e9addbb4b Author: Curtis Malainey Date: Tue Feb 13 14:38:34 2024 +0200 ASoC: SOF: IPC3: fix message bounds on ipc ops commit 74ad8ed65121 ("ASoC: SOF: ipc3: Implement rx_msg IPC ops") introduced a new allocation before the upper bounds check in do_rx_work. As a result A DSP can cause bad allocations if spewing garbage. Fixes: 74ad8ed65121 ("ASoC: SOF: ipc3: Implement rx_msg IPC ops") Reported-by: Tim Van Patten Cc: stable@vger.kernel.org Signed-off-by: Curtis Malainey Reviewed-by: Péter Ujfalusi Reviewed-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://msgid.link/r/20240213123834.4827-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit c40aad7c81e5fba34b70123ed7ce3397fa62a4d2 Author: Peter Ujfalusi Date: Tue Feb 13 13:52:33 2024 +0200 ASoC: SOF: ipc4-pcm: Workaround for crashed firmware on system suspend When the system is suspended while audio is active, the sof_ipc4_pcm_hw_free() is invoked to reset the pipelines since during suspend the DSP is turned off, streams will be re-started after resume. If the firmware crashes during while audio is running (or when we reset the stream before suspend) then the sof_ipc4_set_multi_pipeline_state() will fail with IPC error and the state change is interrupted. This will cause misalignment between the kernel and firmware state on next DSP boot resulting errors returned by firmware for IPC messages, eventually failing the audio resume. On stream close the errors are ignored so the kernel state will be corrected on the next DSP boot, so the second boot after the DSP panic. If sof_ipc4_trigger_pipelines() is called from sof_ipc4_pcm_hw_free() then state parameter is SOF_IPC4_PIPE_RESET and only in this case. Treat a forced pipeline reset similarly to how we treat a pcm_free by ignoring error on state sending to allow the kernel's state to be consistent with the state the firmware will have after the next boot. Link: https://github.com/thesofproject/sof/issues/8721 Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://msgid.link/r/20240213115233.15716-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 5b5089e2a1e753ffe9ee2bf101a9e06784ec5e1a Author: Arnd Bergmann Date: Tue Feb 13 11:10:46 2024 +0100 ASoC: q6dsp: fix event handler prototype clang-16 points out a mismatch in function types that was hidden by a typecast: sound/soc/qcom/qdsp6/q6apm-dai.c:355:38: error: cast from 'void (*)(uint32_t, uint32_t, uint32_t *, void *)' (aka 'void (*)(unsigned int, unsigned int, unsigned int *, void *)') to 'q6apm_cb' (aka 'void (*)(unsigned int, unsigned int, void *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 355 | prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler, prtd, graph_id); sound/soc/qcom/qdsp6/q6apm-dai.c:499:38: error: cast from 'void (*)(uint32_t, uint32_t, uint32_t *, void *)' (aka 'void (*)(unsigned int, unsigned int, unsigned int *, void *)') to 'q6apm_cb' (aka 'void (*)(unsigned int, unsigned int, void *, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict] 499 | prtd->graph = q6apm_graph_open(dev, (q6apm_cb)event_handler_compr, prtd, graph_id); The only difference here is the 'payload' argument, which is not even used in this function, so just fix its type and remove the cast. Fixes: 88b60bf047fd ("ASoC: q6dsp: q6apm-dai: Add open/free compress DAI callbacks") Signed-off-by: Arnd Bergmann Link: https://msgid.link/r/20240213101105.459402-1-arnd@kernel.org Signed-off-by: Mark Brown commit b029482011bffd57319507c2bf4c5a7e06eca756 Author: Peter Ujfalusi Date: Tue Feb 13 10:04:18 2024 +0200 ASoC: SOF: Intel: pci-lnl: Change the topology path to intel/sof-ipc4-tplg The firmware release which going to introduce support for Lunar Lake will use the documented default topology directory for IPC4: intel/sof-ipc4-tplg Change the default path accordingly before sof-bin (sof-firmware) release includes Lunar Lake firmware and topologies. Link: https://github.com/thesofproject/sof-docs/blob/master/getting_started/intel_debug/introduction.rst#2-topology-file Signed-off-by: Peter Ujfalusi Reviewed-by: Mengdong Lin Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Link: https://msgid.link/r/20240213080418.21256-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit d463bcd7eb341b5b6e6d9263a3bce9f405c2af98 Author: Peter Ujfalusi Date: Tue Feb 13 10:04:17 2024 +0200 ASoC: SOF: Intel: pci-tgl: Change the default paths and firmware names The currently used paths and firmware name reflects the reference firmware convention: default_fw_path: intel/avs/{platform_name} default_lib_path: intel/avs-lib/{platform_name} default_tplg_path: intel/avs-tplg default_fw_filename: dsp_basefw.bin The SOF supports building the firmware for cAVS2.5 platforms using IPC4 and it is the preferred IPC4 implementation to be used on these devices. Change the paths and firmware names to reflect this: default_fw_path: intel/sof-ipc4/{platform_name} default_lib_path: intel/sof-ipc4-lib/{platform_name} default_tplg_path: intel/sof-ipc4-tplg default_fw_filename: sof-{platform_name}.ri Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240213080418.21256-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e083dd032eeba9e28e4703cd5aaf4a409ebc3837 Author: Randy Dunlap Date: Sat Feb 10 22:11:52 2024 -0800 net: ti: icssg-prueth: add dependency for PTP When CONFIG_PTP_1588_CLOCK=m and CONFIG_TI_ICSSG_PRUETH=y, there are kconfig dependency warnings and build errors referencing PTP functions. Fix these by making TI_ICSSG_PRUETH depend on PTP_1588_CLOCK_OPTIONAL. Fixes these build errors and warnings: WARNING: unmet direct dependencies detected for TI_ICSS_IEP Depends on [m]: NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_TI [=y] && PTP_1588_CLOCK_OPTIONAL [=m] && TI_PRUSS [=y] Selected by [y]: - TI_ICSSG_PRUETH [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_TI [=y] && PRU_REMOTEPROC [=y] && ARCH_K3 [=y] && OF [=y] && TI_K3_UDMA_GLUE_LAYER [=y] aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_get_ptp_clock_idx': icss_iep.c:(.text+0x1d4): undefined reference to `ptp_clock_index' aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_exit': icss_iep.c:(.text+0xde8): undefined reference to `ptp_clock_unregister' aarch64-linux-ld: drivers/net/ethernet/ti/icssg/icss_iep.o: in function `icss_iep_init': icss_iep.c:(.text+0x176c): undefined reference to `ptp_clock_register' Fixes: 186734c15886 ("net: ti: icssg-prueth: add packet timestamping and ptp support") Signed-off-by: Randy Dunlap Cc: Roger Quadros Cc: Md Danish Anwar Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Reviewed-by: MD Danish Anwar Link: https://lore.kernel.org/r/20240211061152.14696-1-rdunlap@infradead.org Signed-off-by: Paolo Abeni commit b419c5e2d9787a98c1410dbe1d4a25906b96f000 Author: Dmitry Baryshkov Date: Tue Feb 13 13:31:56 2024 +0200 Revert "iommu/arm-smmu: Convert to domain_alloc_paging()" This reverts commit 9b3febc3a3da ("iommu/arm-smmu: Convert to domain_alloc_paging()"). It breaks Qualcomm MSM8996 platform. Calling arm_smmu_write_context_bank() from new codepath results in the platform being reset because of the unclocked hardware access. Fixes: 9b3febc3a3da ("iommu/arm-smmu: Convert to domain_alloc_paging()") Signed-off-by: Dmitry Baryshkov Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20240213-iommu-revert-domain-alloc-v1-1-325ff55dece4@linaro.org Signed-off-by: Will Deacon commit eb5555d422d0fc325e1574a7353d3c616f82d8b5 Author: Cristian Marussi Date: Thu Jan 25 19:17:56 2024 +0000 pmdomain: arm: Fix NULL dereference on scmi_perf_domain removal On unloading of the scmi_perf_domain module got the below splat, when in the DT provided to the system under test the '#power-domain-cells' property was missing. Indeed, this particular setup causes the probe to bail out early without giving any error, which leads to the ->remove() callback gets to run too, but without all the expected initialized structures in place. Add a check and bail out early on remove too. Call trace: scmi_perf_domain_remove+0x28/0x70 [scmi_perf_domain] scmi_dev_remove+0x28/0x40 [scmi_core] device_remove+0x54/0x90 device_release_driver_internal+0x1dc/0x240 driver_detach+0x58/0xa8 bus_remove_driver+0x78/0x108 driver_unregister+0x38/0x70 scmi_driver_unregister+0x28/0x180 [scmi_core] scmi_perf_domain_driver_exit+0x18/0xb78 [scmi_perf_domain] __arm64_sys_delete_module+0x1a8/0x2c0 invoke_syscall+0x50/0x128 el0_svc_common.constprop.0+0x48/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x34/0xb8 el0t_64_sync_handler+0x100/0x130 el0t_64_sync+0x190/0x198 Code: a90153f3 f9403c14 f9414800 955f8a05 (b9400a80) ---[ end trace 0000000000000000 ]--- Fixes: 2af23ceb8624 ("pmdomain: arm: Add the SCMI performance domain") Signed-off-by: Cristian Marussi Reviewed-by: Sudeep Holla Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240125191756.868860-1-cristian.marussi@arm.com Signed-off-by: Ulf Hansson commit ab41a31dd5e2681803642b6d08590b61867840ec Author: Tatsunosuke Tobita Date: Thu Feb 1 13:40:55 2024 +0900 HID: wacom: generic: Avoid reporting a serial of '0' to userspace The xf86-input-wacom driver does not treat '0' as a valid serial number and will drop any input report which contains an MSC_SERIAL = 0 event. The kernel driver already takes care to avoid sending any MSC_SERIAL event if the value of serial[0] == 0 (which is the case for devices that don't actually report a serial number), but this is not quite sufficient. Only the lower 32 bits of the serial get reported to userspace, so if this portion of the serial is zero then there can still be problems. This commit allows the driver to report either the lower 32 bits if they are non-zero or the upper 32 bits otherwise. Signed-off-by: Jason Gerecke Signed-off-by: Tatsunosuke Tobita Fixes: f85c9dc678a5 ("HID: wacom: generic: Support tool ID and additional tool types") CC: stable@vger.kernel.org # v4.10 Signed-off-by: Jiri Kosina commit 25236c91b5ab4a26a56ba2e79b8060cf4e047839 Author: Kuniyuki Iwashima Date: Fri Feb 9 14:04:53 2024 -0800 af_unix: Fix task hung while purging oob_skb in GC. syzbot reported a task hung; at the same time, GC was looping infinitely in list_for_each_entry_safe() for OOB skb. [0] syzbot demonstrated that the list_for_each_entry_safe() was not actually safe in this case. A single skb could have references for multiple sockets. If we free such a skb in the list_for_each_entry_safe(), the current and next sockets could be unlinked in a single iteration. unix_notinflight() uses list_del_init() to unlink the socket, so the prefetched next socket forms a loop itself and list_for_each_entry_safe() never stops. Here, we must use while() and make sure we always fetch the first socket. [0]: Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 5065 Comm: syz-executor236 Not tainted 6.8.0-rc3-syzkaller-00136-g1f719a2f3fa6 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:26 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:173 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0xd/0x60 kernel/kcov.c:207 Code: cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 65 48 8b 14 25 40 c2 03 00 <65> 8b 05 b4 7c 78 7e a9 00 01 ff 00 48 8b 34 24 74 0f f6 c4 01 74 RSP: 0018:ffffc900033efa58 EFLAGS: 00000283 RAX: ffff88807b077800 RBX: ffff88807b077800 RCX: 1ffffffff27b1189 RDX: ffff88802a5a3b80 RSI: ffffffff8968488d RDI: ffff88807b077f70 RBP: ffffc900033efbb0 R08: 0000000000000001 R09: fffffbfff27a900c R10: ffffffff93d48067 R11: ffffffff8ae000eb R12: ffff88807b077800 R13: dffffc0000000000 R14: ffff88807b077e40 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000564f4fc1e3a8 CR3: 000000000d57a000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: unix_gc+0x563/0x13b0 net/unix/garbage.c:319 unix_release_sock+0xa93/0xf80 net/unix/af_unix.c:683 unix_release+0x91/0xf0 net/unix/af_unix.c:1064 __sock_release+0xb0/0x270 net/socket.c:659 sock_close+0x1c/0x30 net/socket.c:1421 __fput+0x270/0xb80 fs/file_table.c:376 task_work_run+0x14f/0x250 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa8a/0x2ad0 kernel/exit.c:871 do_group_exit+0xd4/0x2a0 kernel/exit.c:1020 __do_sys_exit_group kernel/exit.c:1031 [inline] __se_sys_exit_group kernel/exit.c:1029 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 RIP: 0033:0x7f9d6cbdac09 Code: Unable to access opcode bytes at 0x7f9d6cbdabdf. RSP: 002b:00007fff5952feb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9d6cbdac09 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 00007f9d6cc552b0 R08: ffffffffffffffb8 R09: 0000000000000006 R10: 0000000000000006 R11: 0000000000000246 R12: 00007f9d6cc552b0 R13: 0000000000000000 R14: 00007f9d6cc55d00 R15: 00007f9d6cbabe70 Reported-by: syzbot+4fa4a2d1f5a5ee06f006@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=4fa4a2d1f5a5ee06f006 Fixes: 1279f9d9dec2 ("af_unix: Call kfree_skb() for dead unix_(sk)->oob_skb in GC.") Signed-off-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20240209220453.96053-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit bdab6c94bb24758081625e619330b04cfd56570a Author: Even Xu Date: Fri Feb 9 14:52:32 2024 +0800 HID: Intel-ish-hid: Ishtp: Fix sensor reads after ACPI S3 suspend After legacy suspend/resume via ACPI S3, sensor read operation fails with timeout. Also, it will cause delay in resume operation as there will be retries on failure. This is caused by commit f645a90e8ff7 ("HID: intel-ish-hid: ishtp-hid-client: use helper functions for connection"), which used helper functions to simplify connect, reset and disconnect process. Also avoid freeing and allocating client buffers again during reconnect process. But there is a case, when ISH firmware resets after ACPI S3 suspend, ishtp bus driver frees client buffers. Since there is no realloc again during reconnect, there are no client buffers available to send connection requests to the firmware. Without successful connection to the firmware, subsequent sensor reads will timeout. To address this issue, ishtp bus driver does not free client buffers on warm reset after S3 resume. Simply add the buffers from the read list to free list of buffers. Fixes: f645a90e8ff7 ("HID: intel-ish-hid: ishtp-hid-client: use helper functions for connection") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218442 Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit af9acbfc2c4b72c378d0b9a2ee023ed01055d3e2 Author: Marc Zyngier Date: Tue Feb 13 10:12:06 2024 +0000 irqchip/gic-v3-its: Fix GICv4.1 VPE affinity update When updating the affinity of a VPE, the VMOVP command is currently skipped if the two CPUs are part of the same VPE affinity. But this is wrong, as the doorbell corresponding to this VPE is still delivered on the 'old' CPU, which screws up the balancing. Furthermore, offlining that 'old' CPU results in doorbell interrupts generated for this VPE being discarded. The harsh reality is that VMOVP cannot be elided when a set_affinity() request occurs. It needs to be obeyed, and if an optimisation is to be made, it is at the point where the affinity change request is made (such as in KVM). Drop the VMOVP elision altogether, and only use the vpe_table_mask to try and stay within the same ITS affinity group if at all possible. Fixes: dd3f050a216e (irqchip/gic-v4.1: Implement the v4.1 flavour of VMOVP) Reported-by: Kunkun Jiang Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240213101206.2137483-4-maz@kernel.org commit 8b02da04ad978827e5ccd675acf170198f747a7a Author: Marc Zyngier Date: Tue Feb 13 10:12:05 2024 +0000 irqchip/gic-v3-its: Restore quirk probing for ACPI-based systems While refactoring the way the ITSs are probed, the handling of quirks applicable to ACPI-based platforms was lost. As a result, systems such as HIP07 lose their GICv4 functionnality, and some other may even fail to boot, unless they are configured to boot with DT. Move the enabling of quirks into its_probe_one(), making it common to all firmware implementations. Fixes: 9585a495ac93 ("irqchip/gic-v3-its: Split allocation from initialisation of its_node") Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Reviewed-by: Lorenzo Pieralisi Reviewed-by: Zenghui Yu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240213101206.2137483-3-maz@kernel.org commit 846297e11e8ae428f8b00156a0cfe2db58100702 Author: Marc Zyngier Date: Tue Feb 13 10:12:04 2024 +0000 irqchip/gic-v3-its: Handle non-coherent GICv4 redistributors Although the GICv3 code base has gained some handling of systems failing to handle the shareability attributes, the GICv4 side of things has been firmly ignored. This is unfortunate, as the new recent addition of the "dma-noncoherent" is supposed to apply to all of the GICR tables, and not just the ones that are common to v3 and v4. Add some checks to handle the VPROPBASE/VPENDBASE shareability and cacheability attributes in the same way we deal with the other GICR_BASE registers, wrapping the flag check in a helper for improved readability. Note that this has been found by inspection only, as I don't have access to HW that suffers from this particular issue. Fixes: 3a0fff0fb6a3 ("irqchip/gic-v3: Enable non-coherent redistributors/ITSes DT probing") Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Reviewed-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20240213101206.2137483-2-maz@kernel.org commit 1741a8269e1c51fa08d4bfdf34667387a6eb10ec Author: Manuel Fombuena Date: Sun Feb 11 19:04:29 2024 +0000 HID: multitouch: Add required quirk for Synaptics 0xcddc device Add support for the pointing stick (Accupoint) and 2 mouse buttons. Present on some Toshiba/dynabook Portege X30 and X40 laptops. It should close https://bugzilla.kernel.org/show_bug.cgi?id=205817 Signed-off-by: Manuel Fombuena Signed-off-by: Jiri Kosina commit dbc347ef7f0c53aa4a5383238a804d7ebbb0b5ca Author: Xiubo Li Date: Thu Sep 14 10:29:16 2023 +0800 ceph: add ceph_cap_unlink_work to fire check_caps() immediately When unlinking a file the check caps could be delayed for more than 5 seconds, but in MDS side it maybe waiting for the clients to release caps. This will use the cap_wq work queue and a dedicated list to help fire the check_caps() and dirty buffer flushing immediately. Link: https://tracker.ceph.com/issues/50223 Signed-off-by: Xiubo Li Reviewed-by: Milind Changire Signed-off-by: Ilya Dryomov commit 902d6d013f75b68f31d208c6f3ff9cdca82648a7 Author: Xiubo Li Date: Wed Sep 13 16:18:34 2023 +0800 ceph: always queue a writeback when revoking the Fb caps In case there is 'Fw' dirty caps and 'CHECK_CAPS_FLUSH' is set we will always ignore queue a writeback. Queue a writeback is very important because it will block kclient flushing the snapcaps to MDS and which will block MDS waiting for revoking the 'Fb' caps. Link: https://tracker.ceph.com/issues/50223 Signed-off-by: Xiubo Li Reviewed-by: Milind Changire Signed-off-by: Ilya Dryomov commit 8929f95b2b587791a7dcd04cc91520194a76d3a6 Author: Keqi Wang Date: Fri Feb 9 17:16:59 2024 +0800 connector/cn_proc: revert "connector: Fix proc_event_num_listeners count not cleared" This reverts commit c46bfba1337d ("connector: Fix proc_event_num_listeners count not cleared"). It is not accurate to reset proc_event_num_listeners according to cn_netlink_send_mult() return value -ESRCH. In the case of stress-ng netlink-proc, -ESRCH will always be returned, because netlink_broadcast_filtered will return -ESRCH, which may cause stress-ng netlink-proc performance degradation. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202401112259.b23a1567-oliver.sang@intel.com Fixes: c46bfba1337d ("connector: Fix proc_event_num_listeners count not cleared") Signed-off-by: Keqi Wang Link: https://lore.kernel.org/r/20240209091659.68723-1-wangkeqi_chris@163.com Signed-off-by: Paolo Abeni commit 2df8aa3cad407044f2febdbbdf220c6dae839c79 Author: Krzysztof Kozlowski Date: Thu Jan 25 09:16:01 2024 +0100 gpiolib: add gpio_device_get_label() stub for !GPIOLIB Add empty stub of gpio_device_get_label() when GPIOLIB is not enabled. Cc: Fixes: d1f7728259ef ("gpiolib: provide gpio_device_get_label()") Suggested-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit ebe0c15b135b1e4092c25b95d89e9a5899467499 Author: Krzysztof Kozlowski Date: Thu Jan 25 09:16:00 2024 +0100 gpiolib: add gpio_device_get_base() stub for !GPIOLIB Add empty stub of gpio_device_get_base() when GPIOLIB is not enabled. Cc: Fixes: 8c85a102fc4e ("gpiolib: provide gpio_device_get_base()") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 6ac86372102b477083db99a9af8246fb916271b5 Author: Krzysztof Kozlowski Date: Thu Jan 25 09:15:59 2024 +0100 gpiolib: add gpiod_to_gpio_device() stub for !GPIOLIB Add empty stub of gpiod_to_gpio_device() when GPIOLIB is not enabled. Cc: Fixes: 370232d096e3 ("gpiolib: provide gpiod_to_gpio_device()") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 8ad032cc8c499af6f3289c796f411e8874b50fdb Author: Dan Carpenter Date: Thu Feb 1 15:17:50 2024 +0300 irqchip/qcom-mpm: Fix IS_ERR() vs NULL check in qcom_mpm_init() devm_ioremap() doesn't return error pointers, it returns NULL on error. Update the check accordingly. Fixes: 221b110d87c2 ("irqchip/qcom-mpm: Support passing a slice of SRAM as reg space") Signed-off-by: Dan Carpenter Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/22e1f4de-edce-4791-bd2d-2b2e98529492@moroto.mountain commit f1c2765c6afcd1f71f76ed8c9bf94acedab4cecb Author: Bibo Mao Date: Tue Jan 30 16:27:20 2024 +0800 irqchip/loongson-eiointc: Use correct struct type in eiointc_domain_alloc() eiointc_domain_alloc() uses struct eiointc, which is not defined, for a pointer. Older compilers treat that as a forward declaration and due to assignment of a void pointer there is no warning emitted. As the variable is then handed in as a void pointer argument to irq_domain_set_info() the code is functional. Use struct eiointc_priv instead. [ tglx: Rewrote changelog ] Fixes: dd281e1a1a93 ("irqchip: Add Loongson Extended I/O interrupt controller support") Signed-off-by: Bibo Mao Signed-off-by: Thomas Gleixner Acked-by: Huacai Chen Link: https://lore.kernel.org/r/20240130082722.2912576-2-maobibo@loongson.cn commit f1acf1ac84d2ae97b7889b87223c1064df850069 Author: Allison Henderson Date: Thu Feb 8 19:28:54 2024 -0700 net:rds: Fix possible deadlock in rds_message_put Functions rds_still_queued and rds_clear_recv_queue lock a given socket in order to safely iterate over the incoming rds messages. However calling rds_inc_put while under this lock creates a potential deadlock. rds_inc_put may eventually call rds_message_purge, which will lock m_rs_lock. This is the incorrect locking order since m_rs_lock is meant to be locked before the socket. To fix this, we move the message item to a local list or variable that wont need rs_recv_lock protection. Then we can safely call rds_inc_put on any item stored locally after rs_recv_lock is released. Fixes: bdbe6fbc6a2f ("RDS: recv.c") Reported-by: syzbot+f9db6ff27b9bfdcfeca0@syzkaller.appspotmail.com Reported-by: syzbot+dcd73ff9291e6d34b3ab@syzkaller.appspotmail.com Signed-off-by: Allison Henderson Link: https://lore.kernel.org/r/20240209022854.200292-1-allison.henderson@oracle.com Signed-off-by: Paolo Abeni commit fa765c4b4aed2d64266b694520ecb025c862c5a9 Author: Maximilian Heyne Date: Wed Jan 24 16:31:28 2024 +0000 xen/events: close evtchn after mapping cleanup shutdown_pirq and startup_pirq are not taking the irq_mapping_update_lock because they can't due to lock inversion. Both are called with the irq_desc->lock being taking. The lock order, however, is first irq_mapping_update_lock and then irq_desc->lock. This opens multiple races: - shutdown_pirq can be interrupted by a function that allocates an event channel: CPU0 CPU1 shutdown_pirq { xen_evtchn_close(e) __startup_pirq { EVTCHNOP_bind_pirq -> returns just freed evtchn e set_evtchn_to_irq(e, irq) } xen_irq_info_cleanup() { set_evtchn_to_irq(e, -1) } } Assume here event channel e refers here to the same event channel number. After this race the evtchn_to_irq mapping for e is invalid (-1). - __startup_pirq races with __unbind_from_irq in a similar way. Because __startup_pirq doesn't take irq_mapping_update_lock it can grab the evtchn that __unbind_from_irq is currently freeing and cleaning up. In this case even though the event channel is allocated, its mapping can be unset in evtchn_to_irq. The fix is to first cleanup the mappings and then close the event channel. In this way, when an event channel gets allocated it's potential previous evtchn_to_irq mappings are guaranteed to be unset already. This is also the reverse order of the allocation where first the event channel is allocated and then the mappings are setup. On a 5.10 kernel prior to commit 3fcdaf3d7634 ("xen/events: modify internal [un]bind interfaces"), we hit a BUG like the following during probing of NVMe devices. The issue is that during nvme_setup_io_queues, pci_free_irq is called for every device which results in a call to shutdown_pirq. With many nvme devices it's therefore likely to hit this race during boot because there will be multiple calls to shutdown_pirq and startup_pirq are running potentially in parallel. ------------[ cut here ]------------ blkfront: xvda: barrier or flush: disabled; persistent grants: enabled; indirect descriptors: enabled; bounce buffer: enabled kernel BUG at drivers/xen/events/events_base.c:499! invalid opcode: 0000 [#1] SMP PTI CPU: 44 PID: 375 Comm: kworker/u257:23 Not tainted 5.10.201-191.748.amzn2.x86_64 #1 Hardware name: Xen HVM domU, BIOS 4.11.amazon 08/24/2006 Workqueue: nvme-reset-wq nvme_reset_work RIP: 0010:bind_evtchn_to_cpu+0xdf/0xf0 Code: 5d 41 5e c3 cc cc cc cc 44 89 f7 e8 2b 55 ad ff 49 89 c5 48 85 c0 0f 84 64 ff ff ff 4c 8b 68 30 41 83 fe ff 0f 85 60 ff ff ff <0f> 0b 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44 00 00 RSP: 0000:ffffc9000d533b08 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000006 RDX: 0000000000000028 RSI: 00000000ffffffff RDI: 00000000ffffffff RBP: ffff888107419680 R08: 0000000000000000 R09: ffffffff82d72b00 R10: 0000000000000000 R11: 0000000000000000 R12: 00000000000001ed R13: 0000000000000000 R14: 00000000ffffffff R15: 0000000000000002 FS: 0000000000000000(0000) GS:ffff88bc8b500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000002610001 CR4: 00000000001706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? show_trace_log_lvl+0x1c1/0x2d9 ? show_trace_log_lvl+0x1c1/0x2d9 ? set_affinity_irq+0xdc/0x1c0 ? __die_body.cold+0x8/0xd ? die+0x2b/0x50 ? do_trap+0x90/0x110 ? bind_evtchn_to_cpu+0xdf/0xf0 ? do_error_trap+0x65/0x80 ? bind_evtchn_to_cpu+0xdf/0xf0 ? exc_invalid_op+0x4e/0x70 ? bind_evtchn_to_cpu+0xdf/0xf0 ? asm_exc_invalid_op+0x12/0x20 ? bind_evtchn_to_cpu+0xdf/0xf0 ? bind_evtchn_to_cpu+0xc5/0xf0 set_affinity_irq+0xdc/0x1c0 irq_do_set_affinity+0x1d7/0x1f0 irq_setup_affinity+0xd6/0x1a0 irq_startup+0x8a/0xf0 __setup_irq+0x639/0x6d0 ? nvme_suspend+0x150/0x150 request_threaded_irq+0x10c/0x180 ? nvme_suspend+0x150/0x150 pci_request_irq+0xa8/0xf0 ? __blk_mq_free_request+0x74/0xa0 queue_request_irq+0x6f/0x80 nvme_create_queue+0x1af/0x200 nvme_create_io_queues+0xbd/0xf0 nvme_setup_io_queues+0x246/0x320 ? nvme_irq_check+0x30/0x30 nvme_reset_work+0x1c8/0x400 process_one_work+0x1b0/0x350 worker_thread+0x49/0x310 ? process_one_work+0x350/0x350 kthread+0x11b/0x140 ? __kthread_bind_mask+0x60/0x60 ret_from_fork+0x22/0x30 Modules linked in: ---[ end trace a11715de1eee1873 ]--- Fixes: d46a78b05c0e ("xen: implement pirq type event channels") Cc: stable@vger.kernel.org Co-debugged-by: Andrew Panyakin Signed-off-by: Maximilian Heyne Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20240124163130.31324-1-mheyne@amazon.de Signed-off-by: Juergen Gross commit cb4443f26b43efa54494b8de8a50457febb06940 Author: Antonio Borneo Date: Wed Feb 7 11:46:04 2024 +0100 pinctrl: stm32: fix PM support for stm32mp257 The driver for stm32mp257 is missing the suspend callback in struct dev_pm_ops. Add the callback, using the common stm32_pinctrl_suspend() function. Signed-off-by: Antonio Borneo Fixes: 619f8ca4a73d ("pinctrl: stm32: add stm32mp257 pinctrl support") Link: https://lore.kernel.org/r/20240207104604.174843-1-antonio.borneo@foss.st.com Signed-off-by: Linus Walleij commit b0344d6854d25a8b3b901c778b1728885dd99007 Author: Doug Berger Date: Fri Feb 9 17:24:49 2024 -0800 irqchip/irq-brcmstb-l2: Add write memory barrier before exit It was observed on Broadcom devices that use GIC v3 architecture L1 interrupt controllers as the parent of brcmstb-l2 interrupt controllers that the deactivation of the parent interrupt could happen before the brcmstb-l2 deasserted its output. This would lead the GIC to reactivate the interrupt only to find that no L2 interrupt was pending. The result was a spurious interrupt invoking handle_bad_irq() with its associated messaging. While this did not create a functional problem it is a waste of cycles. The hazard exists because the memory mapped bus writes to the brcmstb-l2 registers are buffered and the GIC v3 architecture uses a very efficient system register write to deactivate the interrupt. Add a write memory barrier prior to invoking chained_irq_exit() to introduce a dsb(st) on those systems to ensure the system register write cannot be executed until the memory mapped writes are visible to the system. [ florian: Added Fixes tag ] Fixes: 7f646e92766e ("irqchip: brcmstb-l2: Add Broadcom Set Top Box Level-2 interrupt controller") Signed-off-by: Doug Berger Signed-off-by: Florian Fainelli Signed-off-by: Thomas Gleixner Acked-by: Florian Fainelli Acked-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240210012449.3009125-1-florian.fainelli@broadcom.com commit bf5802238dc181b1f7375d358af1d01cd72d1c11 Author: Kees Cook Date: Tue Feb 6 09:03:24 2024 -0800 xen/gntalloc: Replace UAPI 1-element array Without changing the structure size (since it is UAPI), add a proper flexible array member, and reference it in the kernel so that it will not be trip the array-bounds sanitizer[1]. Link: https://github.com/KSPP/linux/issues/113 [1] Cc: Juergen Gross Cc: Stefano Stabellini Cc: Oleksandr Tyshchenko Cc: Gustavo A. R. Silva Cc: xen-devel@lists.xenproject.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20240206170320.work.437-kees@kernel.org Signed-off-by: Juergen Gross commit b0f2f82c9c16427722b8782371c2efe82b1f815c Author: Ricardo B. Marliere Date: Sat Feb 3 15:53:38 2024 -0300 xen: balloon: make balloon_subsys const Now that the driver core can properly handle constant struct bus_type, move the balloon_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240203-bus_cleanup-xen-v1-2-c2f5fe89ed95@marliere.net Signed-off-by: Juergen Gross commit 2528dcbea94496f080aad9311327baedc11831d7 Author: Ricardo B. Marliere Date: Sat Feb 3 15:53:37 2024 -0300 xen: pcpu: make xen_pcpu_subsys const Now that the driver core can properly handle constant struct bus_type, move the xen_pcpu_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20240203-bus_cleanup-xen-v1-1-c2f5fe89ed95@marliere.net Signed-off-by: Juergen Gross commit b2c52b8c128ea07f1632c516cec0d72cb63b5599 Author: Markus Elfring Date: Sun Jan 28 17:50:43 2024 +0100 xen/privcmd: Use memdup_array_user() in alloc_ioreq() * The function “memdup_array_user” was added with the commit 313ebe47d75558511aa1237b6e35c663b5c0ec6f ("string.h: add array-wrappers for (v)memdup_user()"). Thus use it accordingly. This issue was detected by using the Coccinelle software. * Delete a label which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/41e333f7-1f3a-41b6-a121-a3c0ae54e36f@web.de Signed-off-by: Juergen Gross commit 379a58caa19930e010b7efa1c1f3b9411d3d2ca3 Author: Lee Duncan Date: Fri Feb 9 10:07:35 2024 -0800 scsi: fnic: Move fnic_fnic_flush_tx() to a work queue Rather than call 'fnic_flush_tx()' from interrupt context we should be moving it onto a work queue to avoid any locking issues. Fixes: 1a1975551943 ("scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock") Co-developed-by: Hannes Reinecke Signed-off-by: Hannes Reinecke Signed-off-by: Lee Duncan Link: https://lore.kernel.org/r/ce5ffa5d0ff82c2b2e283b3b4bff23291d49b05c.1707500786.git.lduncan@suse.com Signed-off-by: Martin K. Petersen commit 977fe773dcc7098d8eaf4ee6382cb51e13e784cb Author: Lee Duncan Date: Fri Feb 9 10:07:34 2024 -0800 scsi: Revert "scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock" This reverts commit 1a1975551943f681772720f639ff42fbaa746212. This commit causes interrupts to be lost for FCoE devices, since it changed sping locks from "bh" to "irqsave". Instead, a work queue should be used, and will be addressed in a separate commit. Fixes: 1a1975551943 ("scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock") Signed-off-by: Lee Duncan Link: https://lore.kernel.org/r/c578cdcd46b60470535c4c4a953e6a1feca0dffd.1707500786.git.lduncan@suse.com Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 4cbec7e89a416294c46e71c967b57b9119fe0054 Author: Mike Christie Date: Fri Feb 9 15:52:47 2024 -0600 scsi: target: Fix unmap setup during configuration This issue was found and also debugged by Carl Lei . If the device is not enabled, iblock/file will have not setup their se_device to bdev/file mappings. If a user tries to config the unmap settings at this time, we will then crash trying to access a NULL pointer where the bdev/file should be. This patch adds a check to make sure the device is configured before we try to call the configure_unmap callout. Fixes: 34bd1dcacf0d ("scsi: target: Detect UNMAP support post configuration") Reported-by: Carl Lei Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/20240209215247.5213-1-michael.christie@oracle.com Reviewed-by: Maurizio Lombardi Signed-off-by: Martin K. Petersen commit 9f30831390ede02d9fcd54fd9ea5a585ab649f4a Author: Eric Dumazet Date: Fri Feb 9 18:12:48 2024 +0000 net: add rcu safety to rtnl_prop_list_size() rtnl_prop_list_size() can be called while alternative names are added or removed concurrently. if_nlmsg_size() / rtnl_calcit() can indeed be called without RTNL held. Use explicit RCU protection to avoid UAF. Fixes: 88f4fb0c7496 ("net: rtnetlink: put alternative names to getlink message") Signed-off-by: Eric Dumazet Cc: Jiri Pirko Link: https://lore.kernel.org/r/20240209181248.96637-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 3e36031cc0540ca97b615cbb940331892cbd3d21 Author: Shannon Nelson Date: Fri Feb 9 16:20:02 2024 -0800 pds_core: no health-thread in VF path The VFs don't run the health thread, so don't try to stop or restart the non-existent timer or work item. Fixes: d9407ff11809 ("pds_core: Prevent health thread from running during reset/remove") Reviewed-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240210002002.49483-1-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 2f74258d997c8b93627041d94daa265b5f0d1b4d Author: Shannon Nelson Date: Fri Feb 9 16:13:07 2024 -0800 ionic: minimal work with 0 budget We should be doing as little as possible besides freeing Tx space when our napi routines are called with budget of 0, so jump out before doing anything besides Tx cleaning. See commit afbed3f74830 ("net/mlx5e: do as little as possible in napi poll when budget is 0") for more info. Fixes: fe8c30b50835 ("ionic: separate interrupt for Tx and Rx") Reviewed-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20240210001307.48450-1-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 1692b9775e745f84b69dc8ad0075b0855a43db4e Author: Simon Horman Date: Thu Feb 8 09:48:27 2024 +0000 net: stmmac: xgmac: use #define for string constants The cited commit introduces and uses the string constants dpp_tx_err and dpp_rx_err. These are assigned to constant fields of the array dwxgmac3_error_desc. It has been reported that on GCC 6 and 7.5.0 this results in warnings such as: .../dwxgmac2_core.c:836:20: error: initialiser element is not constant { true, "TDPES0", dpp_tx_err }, I have been able to reproduce this using: GCC 7.5.0, 8.4.0, 9.4.0 and 10.5.0. But not GCC 13.2.0. So it seems this effects older compilers but not newer ones. As Jon points out in his report, the minimum compiler supported by the kernel is GCC 5.1, so it does seem that this ought to be fixed. It is not clear to me what combination of 'const', if any, would address this problem. So this patch takes of using #defines for the string constants Compile tested only. Fixes: 46eba193d04f ("net: stmmac: xgmac: fix handling of DPP safety error for DMA channels") Reported-by: Jon Hunter Closes: https://lore.kernel.org/netdev/c25eb595-8d91-40ea-9f52-efa15ebafdbc@nvidia.com/ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402081135.lAxxBXHk-lkp@intel.com/ Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20240208-xgmac-const-v1-1-e69a1eeabfc8@kernel.org Signed-off-by: Jakub Kicinski commit 6ed8187bb36c14f5ea91be0bf20117379df2d25a Author: Maciej Fijalkowski Date: Tue Feb 6 13:41:32 2024 +0100 i40e: take into account XDP Tx queues when stopping rings Seth reported that on his side XDP traffic can not survive a round of down/up against i40e interface. Dmesg output was telling us that we were not able to disable the very first XDP ring. That was due to the fact that in i40e_vsi_stop_rings() in a pre-work that is done before calling i40e_vsi_wait_queues_disabled(), XDP Tx queues were not taken into the account. To fix this, let us distinguish between Rx and Tx queue boundaries and take into the account XDP queues for Tx side. Reported-by: Seth Forshee Closes: https://lore.kernel.org/netdev/ZbkE7Ep1N1Ou17sA@do-x1extreme/ Fixes: 65662a8dcdd0 ("i40e: Fix logic of disabling queues") Tested-by: Seth Forshee Reviewed-by: Simon Horman Signed-off-by: Maciej Fijalkowski Reviewed-by: Ivan Vecera Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 89a373e9131d4200038a0ef232dad80212209de0 Author: Maciej Fijalkowski Date: Tue Feb 6 13:41:31 2024 +0100 i40e: avoid double calling i40e_pf_rxq_wait() Currently, when interface is being brought down and i40e_vsi_stop_rings() is called, i40e_pf_rxq_wait() is called two times, which is wrong. To showcase this scenario, simplified call stack looks as follows: i40e_vsi_stop_rings() i40e_control wait rx_q() i40e_control_rx_q() i40e_pf_rxq_wait() i40e_vsi_wait_queues_disabled() i40e_pf_rxq_wait() // redundant call To fix this, let us s/i40e_control_wait_rx_q/i40e_control_rx_q within i40e_vsi_stop_rings(). Fixes: 65662a8dcdd0 ("i40e: Fix logic of disabling queues") Reviewed-by: Simon Horman Signed-off-by: Maciej Fijalkowski Reviewed-by: Ivan Vecera Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Tony Nguyen commit 343bb39e1f25a73a38a03d98ca383495c0ed6e92 Author: Ivan Vecera Date: Thu Nov 30 20:31:34 2023 +0100 i40e: Fix wrong mask used during DCB config Mask used for clearing PRTDCB_RETSTCC register in function i40e_dcb_hw_rx_ets_bw_config() is incorrect as there is used define I40E_PRTDCB_RETSTCC_ETSTC_SHIFT instead of define I40E_PRTDCB_RETSTCC_ETSTC_MASK. The PRTDCB_RETSTCC register is used to configure whether ETS or strict priority is used as TSA in Rx for particular TC. In practice it means that once the register is set to use ETS as TSA then it is not possible to switch back to strict priority without CoreR reset. Fix the value in the clearing mask. Fixes: 90bc8e003be2 ("i40e: Add hardware configuration for software based DCB") Signed-off-by: Ivan Vecera Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit c73729b64bb692186da080602cd13612783f52ac Author: Ivan Vecera Date: Wed Nov 8 17:01:03 2023 +0100 i40e: Fix waiting for queues of all VSIs to be disabled The function i40e_pf_wait_queues_disabled() iterates all PF's VSIs up to 'pf->hw.func_caps.num_vsis' but this is incorrect because the real number of VSIs can be up to 'pf->num_alloc_vsi' that can be higher. Fix this loop. Fixes: 69129dc39fac ("i40e: Modify Tx disable wait flow in case of DCB reconfiguration") Signed-off-by: Ivan Vecera Reviewed-by: Jacob Keller Reviewed-by: Wojciech Drewek Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit c2b3ec36b422a331e153a9e40d14adcf82685cee Author: Maxim Galaganov Date: Fri Feb 9 16:25:11 2024 +0300 selftests: net: ip_local_port_range: define IPPROTO_MPTCP Older glibc's netinet/in.h may leave IPPROTO_MPTCP undefined when building ip_local_port_range.c, that leads to "error: use of undeclared identifier 'IPPROTO_MPTCP'". Define IPPROTO_MPTCP in such cases, just like in other MPTCP selftests. Fixes: 122db5e3634b ("selftests/net: add MPTCP coverage for IP_LOCAL_PORT_RANGE") Reported-by: Linux Kernel Functional Testing Closes: https://lore.kernel.org/netdev/CA+G9fYvGO5q4o_Td_kyQgYieXWKw6ktMa-Q0sBu6S-0y3w2aEQ@mail.gmail.com/ Signed-off-by: Maxim Galaganov Tested-by: Linux Kernel Functional Testing Link: https://lore.kernel.org/r/20240209132512.254520-1-max@internet.ru Signed-off-by: Jakub Kicinski commit 73d9629e1c8c1982f13688c4d1019c3994647ccc Author: Ivan Vecera Date: Thu Feb 8 10:03:33 2024 -0800 i40e: Do not allow untrusted VF to remove administratively set MAC Currently when PF administratively sets VF's MAC address and the VF is put down (VF tries to delete all MACs) then the MAC is removed from MAC filters and primary VF MAC is zeroed. Do not allow untrusted VF to remove primary MAC when it was set administratively by PF. Reproducer: 1) Create VF 2) Set VF interface up 3) Administratively set the VF's MAC 4) Put VF interface down [root@host ~]# echo 1 > /sys/class/net/enp2s0f0/device/sriov_numvfs [root@host ~]# ip link set enp2s0f0v0 up [root@host ~]# ip link set enp2s0f0 vf 0 mac fe:6c:b5:da:c7:7d [root@host ~]# ip link show enp2s0f0 23: enp2s0f0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 3c:ec:ef:b7:dd:04 brd ff:ff:ff:ff:ff:ff vf 0 link/ether fe:6c:b5:da:c7:7d brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust off [root@host ~]# ip link set enp2s0f0v0 down [root@host ~]# ip link show enp2s0f0 23: enp2s0f0: mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000 link/ether 3c:ec:ef:b7:dd:04 brd ff:ff:ff:ff:ff:ff vf 0 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff, spoof checking on, link-state auto, trust off Fixes: 700bbf6c1f9e ("i40e: allow VF to remove any MAC filter") Fixes: ceb29474bbbc ("i40e: Add support for VF to specify its primary MAC address") Signed-off-by: Ivan Vecera Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20240208180335.1844996-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit d794734c9bbfe22f86686dc2909c25f5ffe1a572 Author: Steve Wahl Date: Fri Jan 26 10:48:41 2024 -0600 x86/mm/ident_map: Use gbpages only where full GB page should be mapped. When ident_pud_init() uses only gbpages to create identity maps, large ranges of addresses not actually requested can be included in the resulting table; a 4K request will map a full GB. On UV systems, this ends up including regions that will cause hardware to halt the system if accessed (these are marked "reserved" by BIOS). Even processor speculation into these regions is enough to trigger the system halt. Only use gbpages when map creation requests include the full GB page of space. Fall back to using smaller 2M pages when only portions of a GB page are included in the request. No attempt is made to coalesce mapping requests. If a request requires a map entry at the 2M (pmd) level, subsequent mapping requests within the same 1G region will also be at the pmd level, even if adjacent or overlapping such requests could have been combined to map a full gbpage. Existing usage starts with larger regions and then adds smaller regions, so this should not have any great consequence. [ dhansen: fix up comment formatting, simplifty changelog ] Signed-off-by: Steve Wahl Signed-off-by: Dave Hansen Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20240126164841.170866-1-steve.wahl%40hpe.com commit c664e16bb1ba1c8cf1d7ecf3df5fd83bbb8ac15a Merge: 716f4aaa7b48a c23de7ceae59e Author: Linus Torvalds Date: Mon Feb 12 14:11:30 2024 -0800 Merge tag 'docs-6.8-fixes2' of git://git.lwn.net/linux Pull documentation fix from Jonathan Corbet: "A single fix to the kernel_feat extension for a bug that will crash the docs build in some situations" * tag 'docs-6.8-fixes2' of git://git.lwn.net/linux: docs: kernel_feat.py: fix build error for missing files commit 8fa5070833886268e4fb646daaca99f725b378e9 Author: Jiaxun Yang Date: Fri Feb 2 12:30:28 2024 +0000 mm/memory: Use exception ip to search exception tables On architectures with delay slot, instruction_pointer() may differ from where exception was triggered. Use exception_ip we just introduced to search exception tables to get rid of the problem. Fixes: 4bce37a68ff8 ("mips/mm: Convert to using lock_mm_and_find_vma()") Reported-by: Xi Ruoyao Link: https://lore.kernel.org/r/75e9fd7b08562ad9b456a5bdaacb7cc220311cc9.camel@xry111.site/ Suggested-by: Linus Torvalds Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 9d6e21ddf20293b3880ae55b9d14de91c5891c59 Author: Jiaxun Yang Date: Fri Feb 2 12:30:27 2024 +0000 MIPS: Clear Cause.BD in instruction_pointer_set Clear Cause.BD after we use instruction_pointer_set to override EPC. This can prevent exception_epc check against instruction code at new return address. It won't be considered as "in delay slot" after epc being overridden anyway. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 11ba1728be3edb6928791f4c622f154ebe228ae6 Author: Jiaxun Yang Date: Fri Feb 2 12:30:26 2024 +0000 ptrace: Introduce exception_ip arch hook On architectures with delay slot, architecture level instruction pointer (or program counter) in pt_regs may differ from where exception was triggered. Introduce exception_ip hook to invoke architecture code and determine actual instruction pointer to the exception. Link: https://lore.kernel.org/lkml/00d1b813-c55f-4365-8d81-d70258e10b16@app.fastmail.com/ Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit d55347bfe4e66dce2e1e7501e5492f4af3e315f8 Author: Guenter Roeck Date: Sun Feb 11 08:08:37 2024 -0800 MIPS: Add 'memory' clobber to csum_ipv6_magic() inline assembler After 'lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests' was applied, the test_csum_ipv6_magic unit test started failing for all mips platforms, both little and bit endian. Oddly enough, adding debug code into test_csum_ipv6_magic() made the problem disappear. The gcc manual says: "The "memory" clobber tells the compiler that the assembly code performs memory reads or writes to items other than those listed in the input and output operands (for example, accessing the memory pointed to by one of the input parameters) " This is definitely the case for csum_ipv6_magic(). Indeed, adding the 'memory' clobber fixes the problem. Cc: Charlie Jenkins Cc: Palmer Dabbelt Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Guenter Roeck Reviewed-by: Charlie Jenkins Signed-off-by: Thomas Bogendoerfer commit 3693bb4465e6e32a204a5b86d3ec7e6b9f7e67c2 Author: Kunwu Chan Date: Fri Jan 19 17:49:48 2024 +0800 x86/xen: Add some null pointer checking to smp.c kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401161119.iof6BQsf-lkp@intel.com/ Suggested-by: Markus Elfring Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20240119094948.275390-1-chentao@kylinos.cn Signed-off-by: Juergen Gross commit 8bde59b20de06339d598e8b05e5195f7c631c38b Author: Paulo Alcantara Date: Sun Feb 11 20:19:31 2024 -0300 smb: client: handle path separator of created SMB symlinks Convert path separator to CIFS_DIR_SEP(cifs_sb) from symlink target before sending it over the wire otherwise the created SMB symlink may become innaccesible from server side. Fixes: 514d793e27a3 ("smb: client: allow creating symlinks via reparse points") Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 4508ec17357094e2075f334948393ddedbb75157 Author: Paulo Alcantara Date: Sun Feb 11 20:19:30 2024 -0300 smb: client: set correct id, uid and cruid for multiuser automounts When uid, gid and cruid are not specified, we need to dynamically set them into the filesystem context used for automounting otherwise they'll end up reusing the values from the parent mount. Fixes: 9fd29a5bae6e ("cifs: use fs_context for automounts") Reported-by: Shane Nehring Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2259257 Cc: stable@vger.kernel.org # 6.2+ Signed-off-by: Paulo Alcantara (Red Hat) Signed-off-by: Steve French commit 7d8c67dd5d4f2ed1907e192c73dd948d35145641 Author: SeongJae Park Date: Fri Jan 12 10:59:03 2024 -0800 xen/xenbus: document will_handle argument for xenbus_watch_path() Commit 2e85d32b1c86 ("xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path()") added will_handle argument to xenbus_watch_path() and its wrapper, xenbus_watch_pathfmt(), but didn't document it on the kerneldoc comments of the function. This is causing warnings that reported by kernel test robot. Add the documentation to fix it. Fixes: 2e85d32b1c86 ("xen/xenbus: Add 'will_handle' callback support in xenbus_watch_path()") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401121154.FI8jDGun-lkp@intel.com/ Signed-off-by: SeongJae Park Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20240112185903.83737-1-sj@kernel.org Signed-off-by: Juergen Gross commit 83ef106fa732aea8558253641cd98e8a895604d7 Author: Viken Dadhaniya Date: Mon Feb 12 18:22:39 2024 +0530 i2c: qcom-geni: Correct I2C TRE sequence For i2c read operation in GSI mode, we are getting timeout due to malformed TRE basically incorrect TRE sequence in gpi(drivers/dma/qcom/gpi.c) driver. I2C driver has geni_i2c_gpi(I2C_WRITE) function which generates GO TRE and geni_i2c_gpi(I2C_READ)generates DMA TRE. Hence to generate GO TRE before DMA TRE, we should move geni_i2c_gpi(I2C_WRITE) before geni_i2c_gpi(I2C_READ) inside the I2C GSI mode transfer function i.e. geni_i2c_gpi_xfer(). TRE stands for Transfer Ring Element - which is basically an element with size of 4 words. It contains all information like slave address, clk divider, dma address value data size etc). Mainly we have 3 TREs(Config, GO and DMA tre). - CONFIG TRE : consists of internal register configuration which is required before start of the transfer. - DMA TRE : contains DDR/Memory address, called as DMA descriptor. - GO TRE : contains Transfer directions, slave ID, Delay flags, Length of the transfer. I2c driver calls GPI driver API to config each TRE depending on the protocol. For read operation tre sequence will be as below which is not aligned to hardware programming guide. - CONFIG tre - DMA tre - GO tre As per Qualcomm's internal Hardware Programming Guide, we should configure TREs in below sequence for any RX only transfer. - CONFIG tre - GO tre - DMA tre Fixes: d8703554f4de ("i2c: qcom-geni: Add support for GPI DMA") Reviewed-by: Andi Shyti Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue # qrb5165-rb5 Co-developed-by: Mukesh Kumar Savaliya Signed-off-by: Mukesh Kumar Savaliya Signed-off-by: Viken Dadhaniya Reviewed-by: Dmitry Baryshkov Signed-off-by: Andi Shyti commit f7fe85b229bc30cb5dc95b4e9015a601c9e3a8cd Author: Attila Tőkés Date: Sat Feb 10 21:36:38 2024 +0200 ASoC: amd: yc: Fix non-functional mic on Lenovo 82UU Like many other models, the Lenovo 82UU (Yoga Slim 7 Pro 14ARH7) needs a quirk entry for the internal microphone to function. Signed-off-by: Attila Tőkés Link: https://msgid.link/r/20240210193638.144028-1-attitokes@gmail.com Signed-off-by: Mark Brown commit 716f4aaa7b48a55c73d632d0657b35342b1fefd7 Merge: 841c35169323c 46f5ab762d048 Author: Linus Torvalds Date: Mon Feb 12 07:15:45 2024 -0800 Merge tag 'vfs-6.8-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: - Fix performance regression introduced by moving the security permission hook out of do_clone_file_range() and into its caller vfs_clone_file_range(). This causes the security hook to be called in situation were it wasn't called before as the fast permission checks were left in do_clone_file_range(). Fix this by merging the two implementations back together and restoring the old ordering: fast permission checks first, expensive ones later. - Tweak mount_setattr() permission checking so that mount properties on the real rootfs can be changed. When we added mount_setattr() we added additional checks compared to legacy mount(2). If the mount had a parent then verify that the caller and the mount namespace the mount is attached to match and if not make sure that it's an anonymous mount. But the real rootfs falls into neither category. It is neither an anoymous mount because it is obviously attached to the initial mount namespace but it also obviously doesn't have a parent mount. So that means legacy mount(2) allows changing mount properties on the real rootfs but mount_setattr(2) blocks this. This causes regressions (See the commit for details). Fix this by relaxing the check. If the mount has a parent or if it isn't a detached mount, verify that the mount namespaces of the caller and the mount are the same. Technically, we could probably write this even simpler and check that the mount namespaces match if it isn't a detached mount. But the slightly longer check makes it clearer what conditions one needs to think about. * tag 'vfs-6.8-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: fs: relax mount_setattr() permission checks remap_range: merge do_clone_file_range() into vfs_clone_file_range() commit 2c80a2b715df75881359d07dbaacff8ad411f40e Author: Arnd Bergmann Date: Mon Feb 12 12:22:17 2024 +0100 nouveau/svm: fix kvcalloc() argument order The conversion to kvcalloc() mixed up the object size and count arguments, causing a warning: drivers/gpu/drm/nouveau/nouveau_svm.c: In function 'nouveau_svm_fault_buffer_ctor': drivers/gpu/drm/nouveau/nouveau_svm.c:1010:40: error: 'kvcalloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 1010 | buffer->fault = kvcalloc(sizeof(*buffer->fault), buffer->entries, GFP_KERNEL); | ^ drivers/gpu/drm/nouveau/nouveau_svm.c:1010:40: note: earlier argument should specify number of elements, later size of each element The behavior is still correct aside from the warning, but fixing it avoids the warnings and can help the compiler track the individual objects better. Fixes: 71e4bbca070e ("nouveau/svm: Use kvcalloc() instead of kvzalloc()") Signed-off-by: Arnd Bergmann Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240212112230.1117284-1-arnd@kernel.org commit 2f0dbb24f78a333433a2b875c0b76bf55c119cd4 Author: Mark Brown Date: Sun Feb 11 16:58:17 2024 +0000 regmap: kunit: Ensure that changed bytes are actually different During the cache sync test we verify that values we expect to have been written only to the cache do not appear in the hardware. This works most of the time but since we randomly generate both the original and new values there is a low probability that these values may actually be the same. Wrap get_random_bytes() to ensure that the values are different, there are other tests which should have similar verification that we actually changed something. While we're at it refactor the test to use three changed values rather than attempting to use one of them twice, that just complicates checking that our new values are actually new. We use random generation to try to avoid data dependencies in the tests. Reported-by: Guenter Roeck Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Mark Brown Link: https://msgid.link/r/20240211-regmap-kunit-random-change-v3-1-e387a9ea4468@kernel.org Signed-off-by: Mark Brown commit 8f44e3808200c1434c26ef459722f88f48b306df Author: Mika Westerberg Date: Mon Feb 12 10:20:27 2024 +0200 spi: intel-pci: Add support for Lunar Lake-M SPI serial flash Add Intel Lunar Lake-M PCI ID to the driver list of supported devices. This is the same controller found in previous generations. Signed-off-by: Mika Westerberg Link: https://msgid.link/r/20240212082027.2462849-1-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown commit e56c671c2272d939d48a66be7e73b92b74c560c2 Author: Vaishnav Achath Date: Mon Feb 12 17:30:49 2024 +0530 spi: omap2-mcspi: Revert FIFO support without DMA MCSPI controller have few limitations regarding the transaction size when the FIFO buffer is enabled and the WCNT feature is used to find the end of word, in this case if WCNT is not a multiple of the FIFO Almost Empty Level (AEL), then the FIFO empty event is not generated correctly. In addition to this limitation, few other unknown sequence of events that causes the FIFO empty status to not reflect the exact status were found when FIFO is being used without DMA enabled during extended testing in AM65x platform. Till the exact root cause is found and fixed, revert the FIFO support without DMA. See J721E Technical Reference Manual (SPRUI1C), section 12.1.5 for further details: http://www.ti.com/lit/pdf/spruil1 This reverts commit 75223bbea840e ("spi: omap2-mcspi: Add FIFO support without DMA") Signed-off-by: Vaishnav Achath Link: https://msgid.link/r/20240212120049.438495-1-vaishnav.a@ti.com Signed-off-by: Mark Brown commit d6755a53b8dde434220a164c756190345772843a Author: Hans de Goede Date: Sun Feb 11 22:27:36 2024 +0100 ASoC: rt5645: Add DMI quirk for inverted jack-detect on MeeGoPad T8 The MeeGoPad T8 uses the standard rt5645 jd_mode=3 setting for jack-detect, but the used jack connector outputs an inverted jack-detect signal. Add a DMI quirk for this. Signed-off-by: Hans de Goede Link: https://msgid.link/r/20240211212736.179605-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit 551539a8606e28cb2a130f8ef3e9834235b456c4 Author: Hans de Goede Date: Sun Feb 11 22:27:35 2024 +0100 ASoC: rt5645: Make LattePanda board DMI match more precise The DMI strings used for the LattePanda board DMI quirks are very generic. Using the dmidecode database from https://linux-hardware.org/ shows that the chosen DMI strings also match the following 2 laptops which also have a rt5645 codec: Insignia NS-P11W7100 https://linux-hardware.org/?computer=E092FFF8BA04 Insignia NS-P10W8100 https://linux-hardware.org/?computer=AFB6C0BF7934 All 4 hw revisions of the LattePanda board have "S70CR" in their BIOS version DMI strings: DF-BI-7-S70CR100-* DF-BI-7-S70CR110-* DF-BI-7-S70CR200-* LP-BS-7-S70CR700-* See e.g. https://linux-hardware.org/?computer=D98250A817C0 Add a partial (non exact) DMI match on this string to make the LattePanda board DMI match more precise to avoid false-positive matches. Signed-off-by: Hans de Goede Link: https://msgid.link/r/20240211212736.179605-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 5b3fbd61b9d1f4ed2db95aaf03f9adae0373784d Author: Breno Leitao Date: Fri Feb 9 01:55:18 2024 -0800 net: sysfs: Fix /sys/class/net/ path for statistics The Documentation/ABI/testing/sysfs-class-net-statistics documentation is pointing to the wrong path for the interface. Documentation is pointing to /sys/class/, instead of /sys/class/net/. Fix it by adding the `net/` directory before the interface. Fixes: 6044f9700645 ("net: sysfs: document /sys/class/net/statistics/*") Signed-off-by: Breno Leitao Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5ba4e6d5863c53e937f49932dee0ecb004c65928 Author: Kamal Heib Date: Thu Feb 8 17:36:28 2024 -0500 RDMA/qedr: Fix qedr_create_user_qp error flow Avoid the following warning by making sure to free the allocated resources in case that qedr_init_user_queue() fail. -----------[ cut here ]----------- WARNING: CPU: 0 PID: 143192 at drivers/infiniband/core/rdma_core.c:874 uverbs_destroy_ufile_hw+0xcf/0xf0 [ib_uverbs] Modules linked in: tls target_core_user uio target_core_pscsi target_core_file target_core_iblock ib_srpt ib_srp scsi_transport_srp nfsd nfs_acl rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs 8021q garp mrp stp llc ext4 mbcache jbd2 opa_vnic ib_umad ib_ipoib sunrpc rdma_ucm ib_isert iscsi_target_mod target_core_mod ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_cm hfi1 intel_rapl_msr intel_rapl_common mgag200 qedr sb_edac drm_shmem_helper rdmavt x86_pkg_temp_thermal drm_kms_helper intel_powerclamp ib_uverbs coretemp i2c_algo_bit kvm_intel dell_wmi_descriptor ipmi_ssif sparse_keymap kvm ib_core rfkill syscopyarea sysfillrect video sysimgblt irqbypass ipmi_si ipmi_devintf fb_sys_fops rapl iTCO_wdt mxm_wmi iTCO_vendor_support intel_cstate pcspkr dcdbas intel_uncore ipmi_msghandler lpc_ich acpi_power_meter mei_me mei fuse drm xfs libcrc32c qede sd_mod ahci libahci t10_pi sg crct10dif_pclmul crc32_pclmul crc32c_intel qed libata tg3 ghash_clmulni_intel megaraid_sas crc8 wmi [last unloaded: ib_srpt] CPU: 0 PID: 143192 Comm: fi_rdm_tagged_p Kdump: loaded Not tainted 5.14.0-408.el9.x86_64 #1 Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 2.14.0 01/25/2022 RIP: 0010:uverbs_destroy_ufile_hw+0xcf/0xf0 [ib_uverbs] Code: 5d 41 5c 41 5d 41 5e e9 0f 26 1b dd 48 89 df e8 67 6a ff ff 49 8b 86 10 01 00 00 48 85 c0 74 9c 4c 89 e7 e8 83 c0 cb dd eb 92 <0f> 0b eb be 0f 0b be 04 00 00 00 48 89 df e8 8e f5 ff ff e9 6d ff RSP: 0018:ffffb7c6cadfbc60 EFLAGS: 00010286 RAX: ffff8f0889ee3f60 RBX: ffff8f088c1a5200 RCX: 00000000802a0016 RDX: 00000000802a0017 RSI: 0000000000000001 RDI: ffff8f0880042600 RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000 R10: ffff8f11fffd5000 R11: 0000000000039000 R12: ffff8f0d5b36cd80 R13: ffff8f088c1a5250 R14: ffff8f1206d91000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8f11d7c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000147069200e20 CR3: 00000001c7210002 CR4: 00000000001706f0 Call Trace: ? show_trace_log_lvl+0x1c4/0x2df ? show_trace_log_lvl+0x1c4/0x2df ? ib_uverbs_close+0x1f/0xb0 [ib_uverbs] ? uverbs_destroy_ufile_hw+0xcf/0xf0 [ib_uverbs] ? __warn+0x81/0x110 ? uverbs_destroy_ufile_hw+0xcf/0xf0 [ib_uverbs] ? report_bug+0x10a/0x140 ? handle_bug+0x3c/0x70 ? exc_invalid_op+0x14/0x70 ? asm_exc_invalid_op+0x16/0x20 ? uverbs_destroy_ufile_hw+0xcf/0xf0 [ib_uverbs] ib_uverbs_close+0x1f/0xb0 [ib_uverbs] __fput+0x94/0x250 task_work_run+0x5c/0x90 do_exit+0x270/0x4a0 do_group_exit+0x2d/0x90 get_signal+0x87c/0x8c0 arch_do_signal_or_restart+0x25/0x100 ? ib_uverbs_ioctl+0xc2/0x110 [ib_uverbs] exit_to_user_mode_loop+0x9c/0x130 exit_to_user_mode_prepare+0xb6/0x100 syscall_exit_to_user_mode+0x12/0x40 do_syscall_64+0x69/0x90 ? syscall_exit_work+0x103/0x130 ? syscall_exit_to_user_mode+0x22/0x40 ? do_syscall_64+0x69/0x90 ? syscall_exit_work+0x103/0x130 ? syscall_exit_to_user_mode+0x22/0x40 ? do_syscall_64+0x69/0x90 ? do_syscall_64+0x69/0x90 ? common_interrupt+0x43/0xa0 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x1470abe3ec6b Code: Unable to access opcode bytes at RIP 0x1470abe3ec41. RSP: 002b:00007fff13ce9108 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: fffffffffffffffc RBX: 00007fff13ce9218 RCX: 00001470abe3ec6b RDX: 00007fff13ce9200 RSI: 00000000c0181b01 RDI: 0000000000000004 RBP: 00007fff13ce91e0 R08: 0000558d9655da10 R09: 0000558d9655dd00 R10: 00007fff13ce95c0 R11: 0000000000000246 R12: 00007fff13ce9358 R13: 0000000000000013 R14: 0000558d9655db50 R15: 00007fff13ce9470 --[ end trace 888a9b92e04c5c97 ]-- Fixes: df15856132bc ("RDMA/qedr: restructure functions that create/destroy QPs") Signed-off-by: Kamal Heib Link: https://lore.kernel.org/r/20240208223628.2040841-1-kheib@redhat.com Signed-off-by: Leon Romanovsky commit a1d8700d906444167899e5a3c64a11ba50c0badd Author: Danilo Krummrich Date: Fri Feb 2 01:05:51 2024 +0100 drm/nouveau: omit to create schedulers using the legacy uAPI Omit to create scheduler instances when using the legacy uAPI. When using the legacy NOUVEAU_GEM_PUSHBUF ioctl no scheduler instance is required, hence omit creating scheduler instances in nouveau_abi16_ioctl_channel_alloc(). Tested-by: Timur Tabi Reviewed-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240202000606.3526-2-dakr@redhat.com commit 9a0c32d698c1d0c4a6f5642ac017da31febad1eb Author: Danilo Krummrich Date: Fri Feb 2 01:05:50 2024 +0100 drm/nouveau: don't fini scheduler if not initialized nouveau_abi16_ioctl_channel_alloc() and nouveau_cli_init() simply call their corresponding *_fini() counterpart. This can lead to nouveau_sched_fini() being called without struct nouveau_sched ever being initialized in the first place. Instead of embedding struct nouveau_sched into struct nouveau_cli and struct nouveau_chan_abi16, allocate struct nouveau_sched separately, such that we can check for the corresponding pointer to be NULL in the particular *_fini() functions. It makes sense to allocate struct nouveau_sched separately anyway, since in a subsequent commit we can also avoid to allocate a struct nouveau_sched in nouveau_abi16_ioctl_channel_alloc() at all, if the VM_BIND uAPI has been disabled due to the legacy uAPI being used. Fixes: 5f03a507b29e ("drm/nouveau: implement 1:1 scheduler - entity relationship") Reported-by: Timur Tabi Tested-by: Timur Tabi Closes: https://lore.kernel.org/nouveau/20240131213917.1545604-1-ttabi@nvidia.com/ Reviewed-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240202000606.3526-1-dakr@redhat.com commit 603604c8be421b88ff594c8ea696d6c8a9165cb5 Merge: bab091d54600b 68990d006d42b Author: David S. Miller Date: Mon Feb 12 10:08:13 2024 +0000 Merge branch 'mptcp-misc-fixes' Matthieu Baerts says: ==================== mptcp: locking cleanup & misc. fixes Patches 1-4 are fixes for issues found by Paolo while working on adding TCP_NOTSENT_LOWAT support. The latter will need to track more states under the msk data lock. Since the locking msk locking schema is already quite complex, do a long awaited clean-up step by moving several confusing lockless initialization under the relevant locks. Note that it is unlikely a real race could happen even prior to such patches as the MPTCP-level state machine implicitly ensures proper serialization of the write accesses, even lacking explicit lock. But still, simplification is welcome and this will help for the maintenance. This can be backported up to v5.6. Patch 5 is a fix for the userspace PM, not to add new local address entries if the address is already in the list. This behaviour can be seen since v5.19. Patch 6 fixes an issue when Fastopen is used. The issue can happen since v6.2. A previous fix has already been applied, but not taking care of all cases according to syzbot. Patch 7 updates Geliang's email address in the MAINTAINERS file. ==================== Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 68990d006d42b6ef7910fa263f87e9e0d812113b Author: Geliang Tang Date: Thu Feb 8 19:03:55 2024 +0100 MAINTAINERS: update Geliang's email address Update my email-address in MAINTAINERS and .mailmap entries to my kernel.org account. Suggested-by: Mat Martineau Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts (NGI0) Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 337cebbd850f94147cee05252778f8f78b8c337f Author: Paolo Abeni Date: Thu Feb 8 19:03:54 2024 +0100 mptcp: really cope with fastopen race Fastopen and PM-trigger subflow shutdown can race, as reported by syzkaller. In my first attempt to close such race, I missed the fact that the subflow status can change again before the subflow_state_change callback is invoked. Address the issue additionally copying with all the states directly reachable from TCP_FIN_WAIT1. Fixes: 1e777f39b4d7 ("mptcp: add MSG_FASTOPEN sendmsg flag support") Fixes: 4fd19a307016 ("mptcp: fix inconsistent state on fastopen race") Cc: stable@vger.kernel.org Reported-by: syzbot+c53d4d3ddb327e80bc51@syzkaller.appspotmail.com Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/458 Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit f012d796a6de662692159c539689e47e662853a8 Author: Geliang Tang Date: Thu Feb 8 19:03:53 2024 +0100 mptcp: check addrs list in userspace_pm_get_local_id Before adding a new entry in mptcp_userspace_pm_get_local_id(), it's better to check whether this address is already in userspace pm local address list. If it's in the list, no need to add a new entry, just return it's address ID and use this address. Fixes: 8b20137012d9 ("mptcp: read attributes of addr entries managed by userspace PMs") Cc: stable@vger.kernel.org Signed-off-by: Geliang Tang Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit e4a0fa47e816e186f6b4c0055d07eeec42d11871 Author: Paolo Abeni Date: Thu Feb 8 19:03:52 2024 +0100 mptcp: corner case locking for rx path fields initialization Most MPTCP-level related fields are under the mptcp data lock protection, but are written one-off without such lock at MPC complete time, both for the client and the server Leverage the mptcp_propagate_state() infrastructure to move such initialization under the proper lock client-wise. The server side critical init steps are done by mptcp_subflow_fully_established(): ensure the caller properly held the relevant lock, and avoid acquiring the same lock in the nested scopes. There are no real potential races, as write access to such fields is implicitly serialized by the MPTCP state machine; the primary goal is consistency. Fixes: d22f4988ffec ("mptcp: process MP_CAPABLE data option") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 3f83d8a77eeeb47011b990fd766a421ee64f1d73 Author: Paolo Abeni Date: Thu Feb 8 19:03:51 2024 +0100 mptcp: fix more tx path fields initialization The 'msk->write_seq' and 'msk->snd_nxt' are always updated under the msk socket lock, except at MPC handshake completiont time. Builds-up on the previous commit to move such init under the relevant lock. There are no known problems caused by the potential race, the primary goal is consistency. Fixes: 6d0060f600ad ("mptcp: Write MPTCP DSS headers to outgoing data packets") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit 013e3179dbd2bc756ce1dd90354abac62f65b739 Author: Paolo Abeni Date: Thu Feb 8 19:03:50 2024 +0100 mptcp: fix rcv space initialization mptcp_rcv_space_init() is supposed to happen under the msk socket lock, but active msk socket does that without such protection. Leverage the existing mptcp_propagate_state() helper to that extent. We need to ensure mptcp_rcv_space_init will happen before mptcp_rcv_space_adjust(), and the release_cb does not assure that: explicitly check for such condition. While at it, move the wnd_end initialization out of mptcp_rcv_space_init(), it never belonged there. Note that the race does not produce ill effect in practice, but change allows cleaning-up and defying better the locking model. Fixes: a6b118febbab ("mptcp: add receive buffer auto-tuning") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit bdd70eb68913c960acb895b00a8c62eb64715b1f Author: Paolo Abeni Date: Thu Feb 8 19:03:49 2024 +0100 mptcp: drop the push_pending field Such field is there to avoid acquiring the data lock in a few spots, but it adds complexity to the already non trivial locking schema. All the relevant call sites (mptcp-level re-injection, set socket options), are slow-path, drop such field in favor of 'cb_flags', adding the relevant locking. This patch could be seen as an improvement, instead of a fix. But it simplifies the next patch. The 'Fixes' tag has been added to help having this series backported to stable. Fixes: e9d09baca676 ("mptcp: avoid atomic bit manipulation when possible") Cc: stable@vger.kernel.org Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: David S. Miller commit b5f319360371087d52070d8f3fc7789e80ce69a6 Author: John Kacur Date: Fri Feb 2 19:16:07 2024 -0500 tools/rtla: Exit with EXIT_SUCCESS when help is invoked Fix rtla so that the following commands exit with 0 when help is invoked rtla osnoise top -h rtla osnoise hist -h rtla timerlat top -h rtla timerlat hist -h Link: https://lore.kernel.org/linux-trace-devel/20240203001607.69703-1-jkacur@redhat.com Cc: stable@vger.kernel.org Fixes: 1eeb6328e8b3 ("rtla/timerlat: Add timerlat hist mode") Signed-off-by: John Kacur Signed-off-by: Daniel Bristot de Oliveira commit 14f08c976ffe0d2117c6199c32663df1cbc45c65 Author: limingming3 Date: Wed Feb 7 14:51:42 2024 +0800 tools/rtla: Replace setting prio with nice for SCHED_OTHER Since the sched_priority for SCHED_OTHER is always 0, it makes no sence to set it. Setting nice for SCHED_OTHER seems more meaningful. Link: https://lkml.kernel.org/r/20240207065142.1753909-1-limingming3@lixiang.com Cc: stable@vger.kernel.org Fixes: b1696371d865 ("rtla: Helper functions for rtla") Signed-off-by: limingming3 Signed-off-by: Daniel Bristot de Oliveira commit bab091d54600b62c1246caa6075d98a24b2c9e03 Merge: 78e563f2d6290 c353c7b7ffb7a Author: David S. Miller Date: Mon Feb 12 09:51:27 2024 +0000 Merge branch 'net-misplaced-fields' Eric Dumazet says: ==================== net: more three misplaced fields We recently reorganized some structures for better data locality in networking fast paths. This series moves three fields that were not correctly classified. There probably more to come. Reference : https://lwn.net/Articles/951321/ ==================== Signed-off-by: David S. Miller commit c353c7b7ffb7ae6ed8f3339906fe33c8be6cf344 Author: Eric Dumazet Date: Thu Feb 8 14:43:23 2024 +0000 net-device: move lstats in net_device_read_txrx dev->lstats is notably used from loopback ndo_start_xmit() and other virtual drivers. Per cpu stats updates are dirtying per-cpu data, but the pointer itself is read-only. Fixes: 43a71cd66b9c ("net-device: reorganize net_device fast path variables") Signed-off-by: Eric Dumazet Cc: Coco Li Cc: Simon Horman Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 666a877deab2bcf8fd11c962d69e687e18168a6f Author: Eric Dumazet Date: Thu Feb 8 14:43:22 2024 +0000 tcp: move tp->tcp_usec_ts to tcp_sock_read_txrx group tp->tcp_usec_ts is a read mostly field, used in rx and tx fast paths. Fixes: d5fed5addb2b ("tcp: reorganize tcp_sock fast path variables") Signed-off-by: Eric Dumazet Cc: Coco Li Cc: Wei Wang Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 119ff04864a24470b1e531bb53e5c141aa8fefb0 Author: Eric Dumazet Date: Thu Feb 8 14:43:21 2024 +0000 tcp: move tp->scaling_ratio to tcp_sock_read_txrx group tp->scaling_ratio is a read mostly field, used in rx and tx fast paths. Fixes: d5fed5addb2b ("tcp: reorganize tcp_sock fast path variables") Signed-off-by: Eric Dumazet Cc: Coco Li Cc: Wei Wang Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ad26d56d080780bbfcc1696ca0c0cce3e2124ef6 Author: Ville Syrjälä Date: Thu Feb 8 17:45:52 2024 +0200 drm/i915/dp: Limit SST link rate to <=8.1Gbps Limit the link rate to HBR3 or below (<=8.1Gbps) in SST mode. UHBR (10Gbps+) link rates require 128b/132b channel encoding which we have not yet hooked up into the SST/no-sideband codepaths. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240208154552.14545-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula (cherry picked from commit 6061811d72e14f41f71b6a025510920b187bfcca) Signed-off-by: Joonas Lahtinen commit 962ac2dce56bb3aad1f82a4bbe3ada57a020287c Author: Manasi Navare Date: Mon Feb 5 20:46:19 2024 +0000 drm/i915/dsc: Fix the macro that calculates DSCC_/DSCA_ PPS reg address Commit bd077259d0a9 ("drm/i915/vdsc: Add function to read any PPS register") defines a new macro to calculate the DSC PPS register addresses with PPS number as an input. This macro correctly calculates the addresses till PPS 11 since the addresses increment by 4. So in that case the following macro works correctly to give correct register address: _MMIO(_DSCA_PPS_0 + (pps) * 4) However after PPS 11, the register address for PPS 12 increments by 12 because of RC Buffer memory allocation in between. Because of this discontinuity in the address space, the macro calculates wrong addresses for PPS 12 - 16 resulting into incorrect DSC PPS parameter value read/writes causing DSC corruption. This fixes it by correcting this macro to add the offset of 12 for PPS >=12. v3: Add correct paranthesis for pps argument (Jani Nikula) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10172 Fixes: bd077259d0a9 ("drm/i915/vdsc: Add function to read any PPS register") Cc: Suraj Kandpal Cc: Ankit Nautiyal Cc: Animesh Manna Cc: Jani Nikula Cc: Sean Paul Cc: Drew Davenport Signed-off-by: Manasi Navare Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240205204619.1991673-1-navaremanasi@chromium.org (cherry picked from commit 6074be620c31dc2ae11af96a1a5ea95580976fb5) Signed-off-by: Joonas Lahtinen commit 61ec586bc0815959d3314cf7ce242529c977b357 Author: Daniel Bristot de Oliveira Date: Tue Feb 6 12:05:34 2024 +0100 tools/rv: Fix curr_reactor uninitialized variable clang is reporting: $ make HOSTCC=clang CC=clang LLVM_IAS=1 clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -I include -c -o src/in_kernel.o src/in_kernel.c [...] src/in_kernel.c:227:6: warning: variable 'curr_reactor' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] 227 | if (!end) | ^~~~ src/in_kernel.c:242:9: note: uninitialized use occurs here 242 | return curr_reactor; | ^~~~~~~~~~~~ src/in_kernel.c:227:2: note: remove the 'if' if its condition is always false 227 | if (!end) | ^~~~~~~~~ 228 | goto out_free; | ~~~~~~~~~~~~~ src/in_kernel.c:221:6: warning: variable 'curr_reactor' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] 221 | if (!start) | ^~~~~~ src/in_kernel.c:242:9: note: uninitialized use occurs here 242 | return curr_reactor; | ^~~~~~~~~~~~ src/in_kernel.c:221:2: note: remove the 'if' if its condition is always false 221 | if (!start) | ^~~~~~~~~~~ 222 | goto out_free; | ~~~~~~~~~~~~~ src/in_kernel.c:215:20: note: initialize the variable 'curr_reactor' to silence this warning 215 | char *curr_reactor; | ^ | = NULL 2 warnings generated. Which is correct. Setting curr_reactor to NULL avoids the problem. Link: https://lkml.kernel.org/r/3a35551149e5ee0cb0950035afcb8082c3b5d05b.1707217097.git.bristot@kernel.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Cc: Donald Zickus Fixes: 6d60f89691fc ("tools/rv: Add in-kernel monitor interface") Signed-off-by: Daniel Bristot de Oliveira commit f9b2c87105c989a7b259c6da87673ada96dce2f8 Author: Daniel Bristot de Oliveira Date: Tue Feb 6 12:05:33 2024 +0100 tools/rv: Fix Makefile compiler options for clang The following errors are showing up when compiling rv with clang: $ make HOSTCC=clang CC=clang LLVM_IAS=1 [...] clang -O -g -DVERSION=\"6.8.0-rc1\" -flto=auto -ffat-lto-objects -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized $(pkg-config --cflags libtracefs) -I include -c -o src/utils.o src/utils.c clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument] warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option] 1 warning generated. clang -o rv -ggdb src/in_kernel.o src/rv.o src/trace.o src/utils.o $(pkg-config --libs libtracefs) src/in_kernel.o: file not recognized: file format not recognized clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:110: rv] Error 1 Solve these issues by: - removing -ffat-lto-objects and -Wno-maybe-uninitialized if using clang - informing the linker about -flto=auto Link: https://lkml.kernel.org/r/ed94a8ddc2ca8c8ef663cfb7ae9dd196c4a66b33.1707217097.git.bristot@kernel.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Fixes: 4bc4b131d44c ("rv: Add rv tool") Suggested-by: Donald Zickus Signed-off-by: Daniel Bristot de Oliveira commit 084ce16df0f060efd371092a09a7ae74a536dc11 Author: Daniel Bristot de Oliveira Date: Tue Feb 6 12:05:32 2024 +0100 tools/rtla: Remove unused sched_getattr() function Clang is reporting: $ make HOSTCC=clang CC=clang LLVM_IAS=1 [...] clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -c -o src/utils.o src/utils.c src/utils.c:241:19: warning: unused function 'sched_getattr' [-Wunused-function] 241 | static inline int sched_getattr(pid_t pid, struct sched_attr *attr, | ^~~~~~~~~~~~~ 1 warning generated. Which is correct, so remove the unused function. Link: https://lkml.kernel.org/r/eaed7ba122c4ae88ce71277c824ef41cbf789385.1707217097.git.bristot@kernel.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Cc: Donald Zickus Fixes: b1696371d865 ("rtla: Helper functions for rtla") Signed-off-by: Daniel Bristot de Oliveira commit 30369084ac6e27479a347899e74f523e6ca29b89 Author: Daniel Bristot de Oliveira Date: Tue Feb 6 12:05:31 2024 +0100 tools/rtla: Fix clang warning about mount_point var size clang is reporting this warning: $ make HOSTCC=clang CC=clang LLVM_IAS=1 [...] clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -c -o src/utils.o src/utils.c src/utils.c:548:66: warning: 'fscanf' may overflow; destination buffer in argument 3 has size 1024, but the corresponding specifier may require size 1025 [-Wfortify-source] 548 | while (fscanf(fp, "%*s %" STR(MAX_PATH) "s %99s %*s %*d %*d\n", mount_point, type) == 2) { | ^ Increase mount_point variable size to MAX_PATH+1 to avoid the overflow. Link: https://lkml.kernel.org/r/1b46712e93a2f4153909514a36016959dcc4021c.1707217097.git.bristot@kernel.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Cc: Donald Zickus Fixes: a957cbc02531 ("rtla: Add -C cgroup support") Signed-off-by: Daniel Bristot de Oliveira commit 64dc40f7523369912d7adb22c8cb655f71610505 Author: Daniel Bristot de Oliveira Date: Tue Feb 6 12:05:30 2024 +0100 tools/rtla: Fix uninitialized bucket/data->bucket_size warning When compiling rtla with clang, I am getting the following warnings: $ make HOSTCC=clang CC=clang LLVM_IAS=1 [..] clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -c -o src/osnoise_hist.o src/osnoise_hist.c src/osnoise_hist.c:138:6: warning: variable 'bucket' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 138 | if (data->bucket_size) | ^~~~~~~~~~~~~~~~~ src/osnoise_hist.c:149:6: note: uninitialized use occurs here 149 | if (bucket < entries) | ^~~~~~ src/osnoise_hist.c:138:2: note: remove the 'if' if its condition is always true 138 | if (data->bucket_size) | ^~~~~~~~~~~~~~~~~~~~~~ 139 | bucket = duration / data->bucket_size; src/osnoise_hist.c:132:12: note: initialize the variable 'bucket' to silence this warning 132 | int bucket; | ^ | = 0 1 warning generated. [...] clang -O -g -DVERSION=\"6.8.0-rc3\" -flto=auto -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS $(pkg-config --cflags libtracefs) -c -o src/timerlat_hist.o src/timerlat_hist.c src/timerlat_hist.c:181:6: warning: variable 'bucket' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] 181 | if (data->bucket_size) | ^~~~~~~~~~~~~~~~~ src/timerlat_hist.c:204:6: note: uninitialized use occurs here 204 | if (bucket < entries) | ^~~~~~ src/timerlat_hist.c:181:2: note: remove the 'if' if its condition is always true 181 | if (data->bucket_size) | ^~~~~~~~~~~~~~~~~~~~~~ 182 | bucket = latency / data->bucket_size; src/timerlat_hist.c:175:12: note: initialize the variable 'bucket' to silence this warning 175 | int bucket; | ^ | = 0 1 warning generated. This is a legit warning, but data->bucket_size is always > 0 (see timerlat_hist_parse_args()), so the if is not necessary. Remove the unneeded if (data->bucket_size) to avoid the warning. Link: https://lkml.kernel.org/r/6e1b1665cd99042ae705b3e0fc410858c4c42346.1707217097.git.bristot@kernel.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Cc: Donald Zickus Fixes: 1eeb6328e8b3 ("rtla/timerlat: Add timerlat hist mode") Fixes: 829a6c0b5698 ("rtla/osnoise: Add the hist mode") Signed-off-by: Daniel Bristot de Oliveira commit bc4cbc9d260ba8358ca63662919f4bb223cb603b Author: Daniel Bristot de Oliveira Date: Tue Feb 6 12:05:29 2024 +0100 tools/rtla: Fix Makefile compiler options for clang The following errors are showing up when compiling rtla with clang: $ make HOSTCC=clang CC=clang LLVM_IAS=1 [...] clang -O -g -DVERSION=\"6.8.0-rc1\" -flto=auto -ffat-lto-objects -fexceptions -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -Wno-maybe-uninitialized $(pkg-config --cflags libtracefs) -c -o src/utils.o src/utils.c clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument] warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean '-Wno-uninitialized'? [-Wunknown-warning-option] 1 warning generated. clang -o rtla -ggdb src/osnoise.o src/osnoise_hist.o src/osnoise_top.o src/rtla.o src/timerlat_aa.o src/timerlat.o src/timerlat_hist.o src/timerlat_top.o src/timerlat_u.o src/trace.o src/utils.o $(pkg-config --libs libtracefs) src/osnoise.o: file not recognized: file format not recognized clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:110: rtla] Error 1 Solve these issues by: - removing -ffat-lto-objects and -Wno-maybe-uninitialized if using clang - informing the linker about -flto=auto Link: https://lore.kernel.org/linux-trace-kernel/567ac1b94effc228ce9a0225b9df7232a9b35b55.1707217097.git.bristot@kernel.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Bill Wendling Cc: Justin Stitt Fixes: 1a7b22ab15eb ("tools/rtla: Build with EXTRA_{C,LD}FLAGS") Suggested-by: Donald Zickus Signed-off-by: Daniel Bristot de Oliveira commit 28083ff18d3f65ecd64857f4495623135dd1f132 Author: Jacek Lawrynowicz Date: Wed Feb 7 11:24:46 2024 +0100 accel/ivpu: Fix DevTLB errors on suspend/resume and recovery Issue IP reset before shutdown in order to complete all upstream requests to the SOC. Without this DevTLB is complaining about incomplete transactions and NPU cannot resume from suspend. This problem is only happening on recent IFWI releases. IP reset in rare corner cases can mess up PCI configuration, so save it before the reset. After this happens it is also impossible to issue PLL requests and D0->D3->D0 cycle is needed to recover the NPU. Add WP 0 request on power up, so the PUNIT is always notified about NPU reset. Use D0/D3 cycle for recovery as it can recover from failed IP reset and FLR cannot. Fixes: 3f7c0634926d ("accel/ivpu/37xx: Fix hangs related to MMIO reset") Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240207102446.3126981-1-jacek.lawrynowicz@linux.intel.com commit 8c41be259973c9b8e283c7c28d385c7651e4a729 Merge: c4b603c6e2df3 930375d34de67 Author: Mark Brown Date: Mon Feb 12 01:11:19 2024 +0000 ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT Merge series from Hans de Goede : While testing 6.8 on a Bay Trail device with a ALC5640 codec I noticed a regression in 6.8 which causes a NULL pointer deref in probe(). All BYT/CHT Intel machine drivers are affected. Patch 1/2 of this series fixes all of them. Patch 2/2 adds some small cleanups to cht_bsw_rt5645.c for issues which I noticed while working on 1/2. commit 79520587fe42cd4988aff8695d60621e689109cb Author: Shyam Prasad N Date: Fri Feb 9 11:25:42 2024 +0000 cifs: update the same create_guid on replay File open requests made to the server contain a CreateGuid, which is used by the server to identify the open request. If the same request needs to be replayed, it needs to be sent with the same CreateGuid in the durable handle v2 context. Without doing so, we could end up leaking handles on the server when: 1. multichannel is used AND 2. connection goes down, but not for all channels This is because the replayed open request would have a new CreateGuid and the server will treat this as a new request and open a new handle. This change fixes this by reusing the existing create_guid stored in the cached fid struct. REF: MS-SMB2 4.9 Replay Create Request on an Alternate Channel Fixes: 4f1fffa23769 ("cifs: commands that are retried should have replay flag set") Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit cffe487026be13eaf37ea28b783d9638ab147204 Author: Dan Carpenter Date: Thu Feb 8 13:18:46 2024 +0300 cifs: fix underflow in parse_server_interfaces() In this loop, we step through the buffer and after each item we check if the size_left is greater than the minimum size we need. However, the problem is that "bytes_left" is type ssize_t while sizeof() is type size_t. That means that because of type promotion, the comparison is done as an unsigned and if we have negative bytes left the loop continues instead of ending. Fixes: fe856be475f7 ("CIFS: parse and store info on iface queries") Signed-off-by: Dan Carpenter Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 30d5297862410418bb8f8b4c0a87fa55c3063dd7 Author: Thomas Weißschuh Date: Sun Feb 4 18:30:43 2024 +0100 power: supply: mm8013: select REGMAP_I2C The driver uses regmap APIs so it should make sure they are available. Fixes: c75f4bf6800b ("power: supply: Introduce MM8013 fuel gauge driver") Cc: Signed-off-by: Thomas Weißschuh Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240204-mm8013-regmap-v1-1-7cc6b619b7d3@weissschuh.net Signed-off-by: Sebastian Reichel commit 841c35169323cd833294798e58b9bf63fa4fa1de Author: Linus Torvalds Date: Sun Feb 11 12:18:13 2024 -0800 Linux 6.8-rc4 commit 2766f59ca44e517a1d6226979c784b026f0e89c2 Merge: c021e191cf3da dad6a09f31482 Author: Linus Torvalds Date: Sun Feb 11 11:44:14 2024 -0800 Merge tag 'timers_urgent_for_v6.8_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Borislav Petkov: - Make sure a warning is issued when a hrtimer gets queued after the timers have been migrated on the CPU down path and thus said timer will get ignored * tag 'timers_urgent_for_v6.8_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: hrtimer: Report offline hrtimer enqueue commit c021e191cf3da2fea766d784546f4c5acbfcd137 Merge: 7521f258ea303 f6a1892585cd1 Author: Linus Torvalds Date: Sun Feb 11 11:41:51 2024 -0800 Merge tag 'x86_urgent_for_v6.8_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Correct the minimum CPU family for Transmeta Crusoe in Kconfig so that such hw can boot again - Do not take into accout XSTATE buffer size info supplied by userspace when constructing a sigreturn frame - Switch get_/put_user* to EX_TYPE_UACCESS exception handling when an MCE is encountered so that it can be properly recovered from instead of simply panicking * tag 'x86_urgent_for_v6.8_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 x86/fpu: Stop relying on userspace for info to fault in xsave buffer x86/lib: Revert to _ASM_EXTABLE_UA() for {get,put}_user() fixups commit c4b603c6e2df3a17831731d8bbec5c16fa7bbdf8 Author: Cristian Ciocaltea Date: Fri Feb 9 01:43:14 2024 +0200 ASoC: SOF: amd: Fix locking in ACP IRQ handler A recent change in acp_irq_thread() was meant to address a potential race condition while trying to acquire the hardware semaphore responsible for the synchronization between firmware and host IPC interrupts. This resulted in an improper use of the IPC spinlock, causing normal kernel memory allocations (which may sleep) inside atomic contexts: 1707255557.133976 kernel: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:315 ... 1707255557.134757 kernel: sof_ipc3_rx_msg+0x70/0x130 [snd_sof] 1707255557.134793 kernel: acp_sof_ipc_irq_thread+0x1e0/0x550 [snd_sof_amd_acp] 1707255557.134855 kernel: acp_irq_thread+0xa3/0x130 [snd_sof_amd_acp] 1707255557.134904 kernel: ? irq_thread+0xb5/0x1e0 1707255557.134947 kernel: ? __pfx_irq_thread_fn+0x10/0x10 1707255557.134985 kernel: irq_thread_fn+0x23/0x60 Moreover, there are attempts to lock a mutex from the same atomic context: 1707255557.136357 kernel: ============================= 1707255557.136393 kernel: [ BUG: Invalid wait context ] 1707255557.136413 kernel: 6.8.0-rc3-next-20240206-audio-next #9 Tainted: G W 1707255557.136432 kernel: ----------------------------- 1707255557.136451 kernel: irq/66-AudioDSP/502 is trying to lock: 1707255557.136470 kernel: ffff965152f26af8 (&sb->s_type->i_mutex_key#2){+.+.}-{3:3}, at: start_creating.part.0+0x5f/0x180 ... 1707255557.137429 kernel: start_creating.part.0+0x5f/0x180 1707255557.137457 kernel: __debugfs_create_file+0x61/0x210 1707255557.137475 kernel: snd_sof_debugfs_io_item+0x75/0xc0 [snd_sof] 1707255557.137494 kernel: sof_ipc3_do_rx_work+0x7cf/0x9f0 [snd_sof] 1707255557.137513 kernel: sof_ipc3_rx_msg+0xb3/0x130 [snd_sof] 1707255557.137532 kernel: acp_sof_ipc_irq_thread+0x1e0/0x550 [snd_sof_amd_acp] 1707255557.137551 kernel: acp_irq_thread+0xa3/0x130 [snd_sof_amd_acp] Fix the issues by reducing the lock scope in acp_irq_thread(), so that it guards only the hardware semaphore acquiring attempt. Additionally, restore the initial locking in acp_sof_ipc_irq_thread() to synchronize the handling of immediate replies from DSP core. Fixes: 802134c8c2c8 ("ASoC: SOF: amd: Refactor spinlock_irq(&sdev->ipc_lock) sequence in irq_handler") Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20240208234315.2182048-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 6ef5d5b92f7117b324efaac72b3db27ae8bb3082 Author: Alexey Khoroshilov Date: Sun Feb 11 12:58:34 2024 +0300 ASoC: rt5645: Fix deadlock in rt5645_jack_detect_work() There is a path in rt5645_jack_detect_work(), where rt5645->jd_mutex is left locked forever. That may lead to deadlock when rt5645_jack_detect_work() is called for the second time. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: cdba4301adda ("ASoC: rt5650: add mutex to avoid the jack detection failure") Signed-off-by: Alexey Khoroshilov Link: https://lore.kernel.org/r/1707645514-21196-1-git-send-email-khoroshilov@ispras.ru Signed-off-by: Mark Brown commit b3aa619a8b4706f35cb62f780c14e68796b37f3f Author: Uwe Kleine-König Date: Sat Feb 10 17:40:08 2024 +0100 spi: ppc4xx: Drop write-only variable Since commit 24778be20f87 ("spi: convert drivers to use bits_per_word_mask") the bits_per_word variable is only written to. The check that was there before isn't needed any more as the spi core ensures that only 8 bit transfers are used, so the variable can go away together with all assignments to it. Fixes: 24778be20f87 ("spi: convert drivers to use bits_per_word_mask") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240210164006.208149-8-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit de4af897ddf242aea18ee90d3ad2e21b4e64359c Author: Uwe Kleine-König Date: Sat Feb 10 17:40:07 2024 +0100 spi: ppc4xx: Fix fallout from rename in struct spi_bitbang I failed to adapt this driver because it's not enabled in a powerpc allmodconfig build and also wasn't hit by my grep expertise. Fix accordingly. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202402100815.XQXw9XCF-lkp@intel.com/ Fixes: 2259233110d9 ("spi: bitbang: Follow renaming of SPI "master" to "controller"") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240210164006.208149-7-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6f98e44984d5eff599906c0376c027df985bf38b Author: Uwe Kleine-König Date: Sat Feb 10 17:40:06 2024 +0100 spi: ppc4xx: Fix fallout from include cleanup The driver uses several symbols declared in , e.g module_platform_driver(). Include this header explicitly now that doesn't include any more. Fixes: ef175b29a242 ("of: Stop circularly including of_device.h and of_platform.h") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240210164006.208149-6-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 930375d34de67e129566caca008de0bbc54a4646 Author: Hans de Goede Date: Sat Feb 10 14:44:00 2024 +0100 ASoC: Intel: cht_bsw_rt5645: Cleanup codec_name handling 4 fixes / cleanups to the rt5645 mc driver's codec_name handling: 1. In the for loop looking for the dai_index for the codec, replace card->dai_link[i] with cht_dailink[i]. The for loop already uses ARRAY_SIZE(cht_dailink) as bound and card->dai_link is just a pointer to cht_dailink using card->dai_link only obfuscates that cht_dailink is being modified directly rather then say a copy of cht_dailink. Using cht_dailink[i] also makes the code consistent with other machine drivers. 2. Don't set cht_dailink[dai_index].codecs->name in the for loop, this immediately gets overridden using acpi_dev_name(adev) directly below the loop. 3. Add a missing break to the loop. 4. Remove the now no longer used (only set, never read) codec_name field from struct cht_mc_private. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240210134400.24913-3-hdegoede@redhat.com Signed-off-by: Mark Brown commit 7d99a70b65951108d82e1618c67abe69c3ed7720 Author: Hans de Goede Date: Sat Feb 10 14:43:59 2024 +0100 ASoC: Intel: Boards: Fix NULL pointer deref in BYT/CHT boards Since commit 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") dummy snd_soc_dai_link.codecs entries no longer have a name set. This means that when looking for the codec dai_link the machine driver can no longer unconditionally run strcmp() on snd_soc_dai_link.codecs[0].name since this may now be NULL. Add a check for snd_soc_dai_link.codecs[0].name being NULL to all BYT/CHT machine drivers to avoid NULL pointer dereferences in their probe() methods. Fixes: 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") Cc: Kuninori Morimoto Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240210134400.24913-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit 7521f258ea303c827434c101884b62a2b137a942 Merge: a5b6244cf87c5 5bc09b397cbf1 Author: Linus Torvalds Date: Sat Feb 10 15:28:07 2024 -0800 Merge tag 'mm-hotfixes-stable-2024-02-10-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "21 hotfixes. 12 are cc:stable and the remainder pertain to post-6.7 issues or aren't considered to be needed in earlier kernel versions" * tag 'mm-hotfixes-stable-2024-02-10-11-16' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (21 commits) nilfs2: fix potential bug in end_buffer_async_write mm/damon/sysfs-schemes: fix wrong DAMOS tried regions update timeout setup nilfs2: fix hang in nilfs_lookup_dirty_data_buffers() MAINTAINERS: Leo Yan has moved mm/zswap: don't return LRU_SKIP if we have dropped lru lock fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super mailmap: switch email address for John Moon mm: zswap: fix objcg use-after-free in entry destruction mm/madvise: don't forget to leave lazy MMU mode in madvise_cold_or_pageout_pte_range() arch/arm/mm: fix major fault accounting when retrying under per-VMA lock selftests: core: include linux/close_range.h for CLOSE_RANGE_* macros mm/memory-failure: fix crash in split_huge_page_to_list from soft_offline_page mm: memcg: optimize parent iteration in memcg_rstat_updated() nilfs2: fix data corruption in dsync block recovery for small block sizes mm/userfaultfd: UFFDIO_MOVE implementation should use ptep_get() exit: wait_task_zombie: kill the no longer necessary spin_lock_irq(siglock) fs/proc: do_task_stat: use sig->stats_lock to gather the threads/children stats fs/proc: do_task_stat: move thread_group_cputime_adjusted() outside of lock_task_sighand() getrusage: use sig->stats_lock rather than lock_task_sighand() getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand() ... commit 04eb57930e4e471d8f16455a748df2009d43c139 Author: Kent Overstreet Date: Sat Feb 10 16:28:52 2024 -0500 bcachefs: fix missing endiannes conversion in sb_members Signed-off-by: Kent Overstreet commit 7dcfb87af9731d051decb9f99ec3cc35cf684865 Author: Su Yue Date: Fri Feb 9 21:41:31 2024 +0800 bcachefs: fix kmemleak in __bch2_read_super error handling path During xfstest tests, there are some kmemleak reports e.g. generic/051 with if USE_KMEMLEAK=yes: ==================================================================== EXPERIMENTAL kmemleak reported some memory leaks! Due to the way kmemleak works, the leak might be from an earlier test, or something totally unrelated. unreferenced object 0xffff9ef905aaf778 (size 8): comm "mount.bcachefs", pid 169844, jiffies 4295281209 (age 87.040s) hex dump (first 8 bytes): a5 cc cc cc cc cc cc cc ........ backtrace: [] __kmem_cache_alloc_node+0x1f3/0x2c0 [] kmalloc_trace+0x26/0xb0 [] __bch2_read_super+0xfe/0x4e0 [bcachefs] [] bch2_fs_open+0x262/0x1710 [bcachefs] [] bch2_mount+0x4c4/0x640 [bcachefs] [] legacy_get_tree+0x30/0x60 [] vfs_get_tree+0x28/0xf0 [] path_mount+0x475/0xb60 [] __x64_sys_mount+0x105/0x140 [] do_syscall_64+0x42/0xf0 [] entry_SYSCALL_64_after_hwframe+0x6e/0x76 unreferenced object 0xffff9ef96cdc4fc0 (size 32): comm "mount.bcachefs", pid 169844, jiffies 4295281209 (age 87.040s) hex dump (first 32 bytes): 2f 64 65 76 2f 6d 61 70 70 65 72 2f 74 65 73 74 /dev/mapper/test 2d 31 00 cc cc cc cc cc cc cc cc cc cc cc cc cc -1.............. backtrace: [] __kmem_cache_alloc_node+0x1f3/0x2c0 [] __kmalloc_node_track_caller+0x51/0x150 [] kstrdup+0x32/0x60 [] __bch2_read_super+0x11a/0x4e0 [bcachefs] [] bch2_fs_open+0x262/0x1710 [bcachefs] [] bch2_mount+0x4c4/0x640 [bcachefs] [] legacy_get_tree+0x30/0x60 [] vfs_get_tree+0x28/0xf0 [] path_mount+0x475/0xb60 [] __x64_sys_mount+0x105/0x140 [] do_syscall_64+0x42/0xf0 [] entry_SYSCALL_64_after_hwframe+0x6e/0x76 ==================================================================== The leak happens if bdev_open_by_path() failed to open a block device then it goes label 'out' directly without call of bch2_free_super(). Fix it by going to label 'err' instead of 'out' if bdev_open_by_path() fails. Signed-off-by: Su Yue Signed-off-by: Kent Overstreet commit 1a1c93e7f8141749ecb10165a95e95ad484bb85f Author: Kent Overstreet Date: Fri Feb 9 18:34:05 2024 -0500 bcachefs: Fix missing bch2_err_class() calls We aren't supposed to be leaking our private error codes outside of fs/bcachefs/. Fixes: Signed-off-by: Kent Overstreet commit 78e563f2d6290b9f14e7a54522b66a4265d70328 Merge: 2fbdc5c6b1306 ac437a51ce662 Author: David S. Miller Date: Sat Feb 10 21:38:20 2024 +0000 Merge branch 'tls-fixes' Jakub Kicinski says: ==================== net: tls: fix some issues with async encryption valis was reporting a race on socket close so I sat down to try to fix it. I used Sabrina's async crypto debug patch to test... and in the process run into some of the same issues, and created very similar fixes :( I didn't realize how many of those patches weren't applied. Once I found Sabrina's code [1] it turned out to be so similar in fact that I added her S-o-b's and Co-develop'eds in a semi-haphazard way. With this series in place all expected tests pass with async crypto. Sabrina had a few more fixes, but I'll leave those to her, things are not crashing anymore. [1] https://lore.kernel.org/netdev/cover.1694018970.git.sd@queasysnail.net/ ==================== Signed-off-by: David S. Miller commit ac437a51ce662364062f704e321227f6728e6adc Author: Jakub Kicinski Date: Tue Feb 6 17:18:24 2024 -0800 net: tls: fix returned read length with async decrypt We double count async, non-zc rx data. The previous fix was lucky because if we fully zc async_copy_bytes is 0 so we add 0. Decrypted already has all the bytes we handled, in all cases. We don't have to adjust anything, delete the erroneous line. Fixes: 4d42cd6bc2ac ("tls: rx: fix return value for async crypto") Co-developed-by: Sabrina Dubroca Signed-off-by: Sabrina Dubroca Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 49d821064c44cb5ffdf272905236012ea9ce50e3 Author: Jakub Kicinski Date: Tue Feb 6 17:18:23 2024 -0800 selftests: tls: use exact comparison in recv_partial This exact case was fail for async crypto and we weren't catching it. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 32b55c5ff9103b8508c1e04bfa5a08c64e7a925f Author: Sabrina Dubroca Date: Tue Feb 6 17:18:22 2024 -0800 net: tls: fix use-after-free with partial reads and async decrypt tls_decrypt_sg doesn't take a reference on the pages from clear_skb, so the put_page() in tls_decrypt_done releases them, and we trigger a use-after-free in process_rx_list when we try to read from the partially-read skb. Fixes: fd31f3996af2 ("tls: rx: decrypt into a fresh skb") Signed-off-by: Sabrina Dubroca Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 8590541473188741055d27b955db0777569438e3 Author: Jakub Kicinski Date: Tue Feb 6 17:18:21 2024 -0800 net: tls: handle backlogging of crypto requests Since we're setting the CRYPTO_TFM_REQ_MAY_BACKLOG flag on our requests to the crypto API, crypto_aead_{encrypt,decrypt} can return -EBUSY instead of -EINPROGRESS in valid situations. For example, when the cryptd queue for AESNI is full (easy to trigger with an artificially low cryptd.cryptd_max_cpu_qlen), requests will be enqueued to the backlog but still processed. In that case, the async callback will also be called twice: first with err == -EINPROGRESS, which it seems we can just ignore, then with err == 0. Compared to Sabrina's original patch this version uses the new tls_*crypt_async_wait() helpers and converts the EBUSY to EINPROGRESS to avoid having to modify all the error handling paths. The handling is identical. Fixes: a54667f6728c ("tls: Add support for encryption using async offload accelerator") Fixes: 94524d8fc965 ("net/tls: Add support for async decryption of tls records") Co-developed-by: Sabrina Dubroca Signed-off-by: Sabrina Dubroca Link: https://lore.kernel.org/netdev/9681d1febfec295449a62300938ed2ae66983f28.1694018970.git.sd@queasysnail.net/ Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e01e3934a1b2d122919f73bc6ddbe1cdafc4bbdb Author: Jakub Kicinski Date: Tue Feb 6 17:18:20 2024 -0800 tls: fix race between tx work scheduling and socket close Similarly to previous commit, the submitting thread (recvmsg/sendmsg) may exit as soon as the async crypto handler calls complete(). Reorder scheduling the work before calling complete(). This seems more logical in the first place, as it's the inverse order of what the submitting thread will do. Reported-by: valis Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit aec7961916f3f9e88766e2688992da6980f11b8d Author: Jakub Kicinski Date: Tue Feb 6 17:18:19 2024 -0800 tls: fix race between async notify and socket close The submitting thread (one which called recvmsg/sendmsg) may exit as soon as the async crypto handler calls complete() so any code past that point risks touching already freed data. Try to avoid the locking and extra flags altogether. Have the main thread hold an extra reference, this way we can depend solely on the atomic ref counter for synchronization. Don't futz with reiniting the completion, either, we are now tightly controlling when completion fires. Reported-by: valis Fixes: 0cada33241d9 ("net/tls: fix race condition causing kernel panic") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit c57ca512f3b68ddcd62bda9cc24a8f5584ab01b1 Author: Jakub Kicinski Date: Tue Feb 6 17:18:18 2024 -0800 net: tls: factor out tls_*crypt_async_wait() Factor out waiting for async encrypt and decrypt to finish. There are already multiple copies and a subsequent fix will need more. No functional changes. Note that crypto_wait_req() returns wait->err Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 78367c32bebfe833cd30c855755d863a4ff3fdee Author: Cosmin Tanislav Date: Wed Feb 7 15:20:06 2024 +0200 iio: adc: ad4130: only set GPIO_CTRL if pin is unused Currently, GPIO_CTRL bits are set even if the pins are used for measurements. GPIO_CTRL bits should only be set if the pin is not used for other functionality. Fix this by only setting the GPIO_CTRL bits if the pin has no other function. Fixes: 62094060cf3a ("iio: adc: ad4130: add AD4130 driver") Signed-off-by: Cosmin Tanislav Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240207132007.253768-2-demonsingur@gmail.com Signed-off-by: Jonathan Cameron commit a22b0a2be69a36511cb5b37d948b651ddf7debf3 Author: Cosmin Tanislav Date: Wed Feb 7 15:20:05 2024 +0200 iio: adc: ad4130: zero-initialize clock init data The clk_init_data struct does not have all its members initialized, causing issues when trying to expose the internal clock on the CLK pin. Fix this by zero-initializing the clk_init_data struct. Fixes: 62094060cf3a ("iio: adc: ad4130: add AD4130 driver") Signed-off-by: Cosmin Tanislav Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20240207132007.253768-1-demonsingur@gmail.com Signed-off-by: Jonathan Cameron commit a5b6244cf87c50358f5562b8f07f7ac35fc7f6b0 Merge: a38ff5bbf9799 5f63a493b99c8 Author: Linus Torvalds Date: Sat Feb 10 08:02:48 2024 -0800 Merge tag 'block-6.8-2024-02-10' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Keith: - Update a potentially stale firmware attribute (Maurizio) - Fixes for the recent verbose error logging (Keith, Chaitanya) - Protection information payload size fix for passthrough (Francis) - Fix for a queue freezing issue in virtblk (Yi) - blk-iocost underflow fix (Tejun) - blk-wbt task detection fix (Jan) * tag 'block-6.8-2024-02-10' of git://git.kernel.dk/linux: virtio-blk: Ensure no requests in virtqueues before deleting vqs. blk-iocost: Fix an UBSAN shift-out-of-bounds warning nvme: use ns->head->pi_size instead of t10_pi_tuple structure size nvme-core: fix comment to reflect right functions nvme: move passthrough logging attribute to head blk-wbt: Fix detection of dirty-throttled tasks nvme-host: fix the updating of the firmware version commit a38ff5bbf9799dd944c762412aaebc54818407f5 Merge: 5a7ec87063c0f 7ed4380009e96 Author: Linus Torvalds Date: Sat Feb 10 07:56:39 2024 -0800 Merge tag 'firewire-fixes-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire fix from Takashi Sakamoto: "A change to accelerate the device detection step in some cases. In the self-identification step after bus-reset, all nodes in the same bus broadcast selfID packet including the value of gap count. The value is related to the cable hops between nodes, and used to calculate the subaction gap and the arbitration reset gap. When each node has the different value of the gap count, the asynchronous communication between them is unreliable, since an asynchronous transaction could be interrupted by another asynchronous transaction before completion. The gap count inconsistency can be resolved by several ways; e.g. the transfer of PHY configuration packet and generation of bus-reset. The current implementation of firewire stack can correctly detect the gap count inconsistency, however the recovery action from the inconsistency tends to be delayed after reading configuration ROM of root node. This results in the long time to probe devices in some combinations of hardware. Here the stack is changed to schedule the action as soon as possible" * tag 'firewire-fixes-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: core: send bus reset promptly on gap count error commit 5a7ec87063c0fbb7706fdccb0cc890757da6f4a1 Merge: 4a7bbe7519b6a 108a020c64434 Author: Linus Torvalds Date: Sat Feb 10 07:53:41 2024 -0800 Merge tag '6.8-rc3-ksmbd-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: "Two ksmbd server fixes: - memory leak fix - a minor kernel-doc fix" * tag '6.8-rc3-ksmbd-server-fixes' of git://git.samba.org/ksmbd: ksmbd: free aux buffer if ksmbd_iov_pin_rsp_read fails ksmbd: Add kernel-doc for ksmbd_extract_sharename() function commit 7e4a205fe56b9092f0143dad6aa5fee081139b09 Author: Al Viro Date: Sat Feb 3 23:53:05 2024 -0500 Revert "get rid of DCACHE_GENOCIDE" This reverts commit 57851607326a2beef21e67f83f4f53a90df8445a. Unfortunately, while we only call that thing once, the callback *can* be called more than once for the same dentry - all it takes is rename_lock being touched while we are in d_walk(). For now let's revert it. Signed-off-by: Al Viro commit 4a7bbe7519b6a5d189feeba1d417c8ce9f7e852b Merge: ca00c700c5219 17e94b2585417 Author: Linus Torvalds Date: Fri Feb 9 17:15:26 2024 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three small driver fixes and one core fix. The core fix being a fixup to the one in the last pull request which didn't entirely move checking of scsi_host_busy() out from under the host lock" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: Remove the ufshcd_release() in ufshcd_err_handling_prepare() scsi: ufs: core: Fix shift issue in ufshcd_clear_cmd() scsi: lpfc: Use unsigned type for num_sge scsi: core: Move scsi_host_busy() out of host lock if it is for per-command commit ca00c700c521916bacf7d490a2a5fd908059a927 Merge: e1e3f530a17f8 a5cc98eba2592 Author: Linus Torvalds Date: Fri Feb 9 17:09:30 2024 -0800 Merge tag '6.8-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: - reconnect fix - multichannel channel selection fix - minor mount warning fix - reparse point fix - null pointer check improvement * tag '6.8-rc3-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb3: clarify mount warning cifs: handle cases where multiple sessions share connection cifs: change tcon status when need_reconnect is set on it smb: client: set correct d_type for reparse points under DFS mounts smb3: add missing null server pointer check commit e1e3f530a17f808c70f506f11ba7dabbfd8eb14a Merge: a2343df3fb1e6 07045648c07c5 Author: Linus Torvalds Date: Fri Feb 9 17:05:02 2024 -0800 Merge tag 'ceph-for-6.8-rc4' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Some fscrypt-related fixups (sparse reads are used only for encrypted files) and two cap handling fixes from Xiubo and Rishabh" * tag 'ceph-for-6.8-rc4' of https://github.com/ceph/ceph-client: ceph: always check dir caps asynchronously ceph: prevent use-after-free in encode_cap_msg() ceph: always set initial i_blkbits to CEPH_FSCRYPT_BLOCK_SHIFT libceph: just wait for more data to be available on the socket libceph: rename read_sparse_msg_*() to read_partial_sparse_msg_*() libceph: fail sparse-read if the data length doesn't match commit a2343df3fb1e62ef7c5c0a65c06621980f257d5b Merge: 4356e9f841f7f 622cd3daa8eae Author: Linus Torvalds Date: Fri Feb 9 16:59:49 2024 -0800 Merge tag 'ntfs3_for_6.8' of https://github.com/Paragon-Software-Group/linux-ntfs3 Pull ntfs3 fixes from Konstantin Komarov: "Fixed: - size update for compressed file - some logic errors, overflows - memory leak - some code was refactored Added: - implement super_operations::shutdown Improved: - alternative boot processing - reduced stack usage" * tag 'ntfs3_for_6.8' of https://github.com/Paragon-Software-Group/linux-ntfs3: (28 commits) fs/ntfs3: Slightly simplify ntfs_inode_printk() fs/ntfs3: Add ioctl operation for directories (FITRIM) fs/ntfs3: Fix oob in ntfs_listxattr fs/ntfs3: Fix an NULL dereference bug fs/ntfs3: Update inode->i_size after success write into compressed file fs/ntfs3: Fixed overflow check in mi_enum_attr() fs/ntfs3: Correct function is_rst_area_valid fs/ntfs3: Use i_size_read and i_size_write fs/ntfs3: Prevent generic message "attempt to access beyond end of device" fs/ntfs3: use non-movable memory for ntfs3 MFT buffer cache fs/ntfs3: Use kvfree to free memory allocated by kvmalloc fs/ntfs3: Disable ATTR_LIST_ENTRY size check fs/ntfs3: Fix c/mtime typo fs/ntfs3: Add NULL ptr dereference checking at the end of attr_allocate_frame() fs/ntfs3: Add and fix comments fs/ntfs3: ntfs3_forced_shutdown use int instead of bool fs/ntfs3: Implement super_operations::shutdown fs/ntfs3: Drop suid and sgid bits as a part of fpunch fs/ntfs3: Add file_modified fs/ntfs3: Correct use bh_read ... commit 4356e9f841f7fbb945521cef3577ba394c65f3fc Author: Linus Torvalds Date: Fri Feb 9 12:39:31 2024 -0800 work around gcc bugs with 'asm goto' with outputs We've had issues with gcc and 'asm goto' before, and we created a 'asm_volatile_goto()' macro for that in the past: see commits 3f0116c3238a ("compiler/gcc4: Add quirk for 'asm goto' miscompilation bug") and a9f180345f53 ("compiler/gcc4: Make quirk for asm_volatile_goto() unconditional"). Then, much later, we ended up removing the workaround in commit 43c249ea0b1e ("compiler-gcc.h: remove ancient workaround for gcc PR 58670") because we no longer supported building the kernel with the affected gcc versions, but we left the macro uses around. Now, Sean Christopherson reports a new version of a very similar problem, which is fixed by re-applying that ancient workaround. But the problem in question is limited to only the 'asm goto with outputs' cases, so instead of re-introducing the old workaround as-is, let's rename and limit the workaround to just that much less common case. It looks like there are at least two separate issues that all hit in this area: (a) some versions of gcc don't mark the asm goto as 'volatile' when it has outputs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98619 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110420 which is easy to work around by just adding the 'volatile' by hand. (b) Internal compiler errors: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110422 which are worked around by adding the extra empty 'asm' as a barrier, as in the original workaround. but the problem Sean sees may be a third thing since it involves bad code generation (not an ICE) even with the manually added 'volatile'. but the same old workaround works for this case, even if this feels a bit like voodoo programming and may only be hiding the issue. Reported-and-tested-by: Sean Christopherson Link: https://lore.kernel.org/all/20240208220604.140859-1-seanjc@google.com/ Cc: Nick Desaulniers Cc: Uros Bizjak Cc: Jakub Jelinek Cc: Andrew Pinski Signed-off-by: Linus Torvalds commit 2fbdc5c6b130661854dc5923f0870770410acce2 Merge: 15faa1f67ab40 6034e059f5d34 Author: Jakub Kicinski Date: Fri Feb 9 14:12:03 2024 -0800 Merge branch 'net-fix-module_description-for-net-p5' Breno Leitao says: ==================== net: Fix MODULE_DESCRIPTION() for net (p5) There are hundreds of network modules that misses MODULE_DESCRIPTION(), causing a warning when compiling with W=1. Example: WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/em_cmp.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/em_nbyte.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/em_u32.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/em_meta.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/em_text.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/sched/em_canid.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/ip_tunnel.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/ipip.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/ip_gre.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/udp_tunnel.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/ip_vti.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/ah4.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/esp4.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/xfrm4_tunnel.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv4/tunnel4.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/xfrm/xfrm_algo.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/xfrm/xfrm_user.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv6/ah6.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv6/esp6.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv6/xfrm6_tunnel.o WARNING: modpost: missing MODULE_DESCRIPTION() in net/ipv6/tunnel6.o This part5 of the patchset focus on the missing net/ module, which are now warning free. v1: https://lore.kernel.org/all/20240205101400.1480521-1-leitao@debian.org/ v2: https://lore.kernel.org/all/20240207101929.484681-1-leitao@debian.org/ ==================== Link: https://lore.kernel.org/r/20240208164244.3818498-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit 6034e059f5d34bceb4adefc3409043bf65c896ea Author: Breno Leitao Date: Thu Feb 8 08:42:44 2024 -0800 net: fill in MODULE_DESCRIPTION()s for dsa_loop_bdinfo W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the DSA loopback fixed PHY module. Suggested-by: Florian Fainelli Signed-off-by: Breno Leitao Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20240208164244.3818498-10-leitao@debian.org Signed-off-by: Jakub Kicinski commit 830bd88cc151412f467423c3db0b29fe623c6487 Author: Breno Leitao Date: Thu Feb 8 08:42:43 2024 -0800 net: fill in MODULE_DESCRIPTION()s for ipvtap W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the IP-VLAN based tap driver. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240208164244.3818498-9-leitao@debian.org Signed-off-by: Jakub Kicinski commit a46c31bf2744b9807ba5e3ac8fdae2368d8bb3fa Author: Breno Leitao Date: Thu Feb 8 08:42:42 2024 -0800 net: fill in MODULE_DESCRIPTION()s for net/sched W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the network schedulers. Suggested-by: Jamal Hadi Salim Signed-off-by: Breno Leitao Reviewed-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20240208164244.3818498-8-leitao@debian.org Signed-off-by: Jakub Kicinski commit b058a5d25d921af2be83d70844d389ecfd4a0497 Author: Breno Leitao Date: Thu Feb 8 08:42:41 2024 -0800 net: fill in MODULE_DESCRIPTION()s for ipv4 modules W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the IPv4 modules. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240208164244.3818498-7-leitao@debian.org Signed-off-by: Jakub Kicinski commit 92ab08eb63bbf54caebb425ed8908758c98ae8f2 Author: Breno Leitao Date: Thu Feb 8 08:42:40 2024 -0800 net: fill in MODULE_DESCRIPTION()s for ipv6 modules W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the IPv6 modules. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240208164244.3818498-6-leitao@debian.org Signed-off-by: Jakub Kicinski commit 2898f3075e6a0b0584781272aac88377e5ced0a0 Author: Breno Leitao Date: Thu Feb 8 08:42:39 2024 -0800 net: fill in MODULE_DESCRIPTION()s for 6LoWPAN W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to IPv6 over Low power Wireless Personal Area Network. Signed-off-by: Breno Leitao Acked-by: Alexander Aring Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240208164244.3818498-5-leitao@debian.org Signed-off-by: Jakub Kicinski commit 6e2cf0eb6926a5c51bba0aca819e91d7265c849c Author: Breno Leitao Date: Thu Feb 8 08:42:38 2024 -0800 net: fill in MODULE_DESCRIPTION()s for af_key W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the PF_KEY socket helpers. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240208164244.3818498-4-leitao@debian.org Signed-off-by: Jakub Kicinski commit f73f55b0fcff575fef1854c66d18767a341ebbe2 Author: Breno Leitao Date: Thu Feb 8 08:42:37 2024 -0800 net: fill in MODULE_DESCRIPTION()s for mpoa W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Multi-Protocol Over ATM (MPOA) driver. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240208164244.3818498-3-leitao@debian.org Signed-off-by: Jakub Kicinski commit 2599bb5e0c742ba3de1af2abb56b8a103a671a22 Author: Breno Leitao Date: Thu Feb 8 08:42:36 2024 -0800 net: fill in MODULE_DESCRIPTION()s for xfrm W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the XFRM interface drivers. Signed-off-by: Breno Leitao Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240208164244.3818498-2-leitao@debian.org Signed-off-by: Jakub Kicinski commit 15faa1f67ab405d47789d4702f587ec7df7ef03e Author: Horatiu Vultur Date: Tue Feb 6 13:30:54 2024 +0100 lan966x: Fix crash when adding interface under a lag There is a crash when adding one of the lan966x interfaces under a lag interface. The issue can be reproduced like this: ip link add name bond0 type bond miimon 100 mode balance-xor ip link set dev eth0 master bond0 The reason is because when adding a interface under the lag it would go through all the ports and try to figure out which other ports are under that lag interface. And the issue is that lan966x can have ports that are NULL pointer as they are not probed. So then iterating over these ports it would just crash as they are NULL pointers. The fix consists in actually checking for NULL pointers before accessing something from the ports. Like we do in other places. Fixes: cabc9d49333d ("net: lan966x: Add lag support for lan966x") Signed-off-by: Horatiu Vultur Reviewed-by: Michal Swiatkowski Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240206123054.3052966-1-horatiu.vultur@microchip.com Signed-off-by: Jakub Kicinski commit aae09a6c7783e28d1bcafee85e172fe411923b22 Author: Victor Nogueira Date: Wed Feb 7 19:29:02 2024 -0300 net/sched: act_mirred: Don't zero blockid when net device is being deleted While testing tdc with parallel tests for mirred to block we caught an intermittent bug. The blockid was being zeroed out when a net device was deleted and, thus, giving us an incorrect blockid value whenever we tried to dump the mirred action. Since we don't increment the block refcount in the control path (and only use the ID), we don't need to zero the blockid field whenever a net device is going down. Fixes: 42f39036cda8 ("net/sched: act_mirred: Allow mirred to block") Signed-off-by: Victor Nogueira Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20240207222902.1469398-1-victor@mojatatu.com Signed-off-by: Jakub Kicinski commit 6a12401b65a5ba57cfe1361c9a3e054ffde68611 Merge: d02bfae3646a6 bd128f62c3655 Author: Jakub Kicinski Date: Fri Feb 9 12:54:39 2024 -0800 Merge branch 'net-openvswitch-limit-the-recursions-from-action-sets' Aaron Conole says: ==================== net: openvswitch: limit the recursions from action sets Open vSwitch module accepts actions as a list from the netlink socket and then creates a copy which it uses in the action set processing. During processing of the action list on a packet, the module keeps a count of the execution depth and exits processing if the action depth goes too high. However, during netlink processing the recursion depth isn't checked anywhere, and the copy trusts that kernel has large enough stack to accommodate it. The OVS sample action was the original action which could perform this kinds of recursion, and it originally checked that it didn't exceed the sample depth limit. However, when sample became optimized to provide the clone() semantics, the recursion limit was dropped. This series adds a depth limit during the __ovs_nla_copy_actions() call that will ensure we don't exceed the max that the OVS userspace could generate for a clone(). Additionally, this series provides a selftest in 2/2 that can be used to determine if the OVS module is allowing unbounded access. It can be safely omitted where the ovs selftest framework isn't available. ==================== Link: https://lore.kernel.org/r/20240207132416.1488485-1-aconole@redhat.com Signed-off-by: Jakub Kicinski commit bd128f62c365504e1268dc09fcccdfb1f091e93a Author: Aaron Conole Date: Wed Feb 7 08:24:16 2024 -0500 selftests: openvswitch: Add validation for the recursion test Add a test case into the netlink checks that will show the number of nested action recursions won't exceed 16. Going to 17 on a small clone call isn't enough to exhaust the stack on (most) systems, so it should be safe to run even on systems that don't have the fix applied. Signed-off-by: Aaron Conole Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240207132416.1488485-3-aconole@redhat.com Signed-off-by: Jakub Kicinski commit 6e2f90d31fe09f2b852de25125ca875aabd81367 Author: Aaron Conole Date: Wed Feb 7 08:24:15 2024 -0500 net: openvswitch: limit the number of recursions from action sets The ovs module allows for some actions to recursively contain an action list for complex scenarios, such as sampling, checking lengths, etc. When these actions are copied into the internal flow table, they are evaluated to validate that such actions make sense, and these calls happen recursively. The ovs-vswitchd userspace won't emit more than 16 recursion levels deep. However, the module has no such limit and will happily accept limits larger than 16 levels nested. Prevent this by tracking the number of recursions happening and manually limiting it to 16 levels nested. The initial implementation of the sample action would track this depth and prevent more than 3 levels of recursion, but this was removed to support the clone use case, rather than limited at the current userspace limit. Fixes: 798c166173ff ("openvswitch: Optimize sample action for the clone use cases") Signed-off-by: Aaron Conole Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240207132416.1488485-2-aconole@redhat.com Signed-off-by: Jakub Kicinski commit a5cc98eba2592d6e3c5a4351319595ddde2a5901 Author: Steve French Date: Tue Feb 6 23:57:18 2024 -0600 smb3: clarify mount warning When a user tries to use the "sec=krb5p" mount parameter to encrypt data on connection to a server (when authenticating with Kerberos), we indicate that it is not supported, but do not note the equivalent recommended mount parameter ("sec=krb5,seal") which turns on encryption for that mount (and uses Kerberos for auth). Update the warning message. Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit a39c757bf0596b17482a507f31c3ef0af0d1d2b4 Author: Shyam Prasad N Date: Tue Feb 6 15:00:47 2024 +0000 cifs: handle cases where multiple sessions share connection Based on our implementation of multichannel, it is entirely possible that a server struct may not be found in any channel of an SMB session. In such cases, we should be prepared to move on and search for the server struct in the next session. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit c6e02eefd6ace3da3369c764f15429f5647056af Author: Shyam Prasad N Date: Tue Feb 6 15:00:46 2024 +0000 cifs: change tcon status when need_reconnect is set on it When a tcon is marked for need_reconnect, the intention is to have it reconnected. This change adjusts tcon->status in cifs_tree_connect when need_reconnect is set. Also, this change has a minor correction in resetting need_reconnect on success. It makes sure that it is done with tc_lock held. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit d02bfae3646a679ed8ca0660d12336ef54d44817 Merge: 38ee0cb2a2e2a f97f1fcc96908 Author: Jakub Kicinski Date: Fri Feb 9 11:32:16 2024 -0800 Merge branch 'selftests-forwarding-various-fixes' Ido Schimmel says: ==================== selftests: forwarding: Various fixes Fix various problems in the forwarding selftests so that they will pass in the netdev CI instead of being ignored. See commit messages for details. ==================== Link: https://lore.kernel.org/r/20240208155529.1199729-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit f97f1fcc96908c97a240ff6cb4474e155abfa0d7 Author: Ido Schimmel Date: Thu Feb 8 17:55:29 2024 +0200 selftests: forwarding: Fix bridge locked port test flakiness The redirection test case fails in the netdev CI on debug kernels because an FDB entry is learned despite the presence of a tc filter that redirects incoming traffic [1]. I am unable to reproduce the failure locally, but I can see how it can happen given that learning is first enabled and only then the ingress tc filter is configured. On debug kernels the time window between these two operations is longer compared to regular kernels, allowing random packets to be transmitted and trigger learning. Fix by reversing the order and configure the ingress tc filter before enabling learning. [1] [...] # TEST: Locked port MAB redirect [FAIL] # Locked entry created for redirected traffic Fixes: 38c43a1ce758 ("selftests: forwarding: Add test case for traffic redirection from a locked port") Signed-off-by: Ido Schimmel Reviewed-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20240208155529.1199729-5-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit dd6b34589441f2ad4698dd88a664811550148b41 Author: Ido Schimmel Date: Thu Feb 8 17:55:28 2024 +0200 selftests: forwarding: Suppress grep warnings Suppress the following grep warnings: [...] INFO: # Port group entries configuration tests - (*, G) TEST: Common port group entries configuration tests (IPv4 (*, G)) [ OK ] TEST: Common port group entries configuration tests (IPv6 (*, G)) [ OK ] grep: warning: stray \ before / grep: warning: stray \ before / grep: warning: stray \ before / TEST: IPv4 (*, G) port group entries configuration tests [ OK ] grep: warning: stray \ before / grep: warning: stray \ before / grep: warning: stray \ before / TEST: IPv6 (*, G) port group entries configuration tests [ OK ] [...] They do not fail the test, but do clutter the output. Fixes: b6d00da08610 ("selftests: forwarding: Add bridge MDB test") Signed-off-by: Ido Schimmel Reviewed-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20240208155529.1199729-4-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 7399e2ce4d424f426417496eb289458780eea985 Author: Ido Schimmel Date: Thu Feb 8 17:55:27 2024 +0200 selftests: forwarding: Fix bridge MDB test flakiness After enabling a multicast querier on the bridge (like the test is doing), the bridge will wait for the Max Response Delay before starting to forward according to its MDB in order to let Membership Reports enough time to be received and processed. Currently, the test is waiting for exactly the default Max Response Delay (10 seconds) which is racy and leads to failures [1]. Fix by reducing the Max Response Delay to 1 second. [1] [...] # TEST: IPv4 host entries forwarding tests [FAIL] # Packet locally received after flood Fixes: b6d00da08610 ("selftests: forwarding: Add bridge MDB test") Signed-off-by: Ido Schimmel Reviewed-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20240208155529.1199729-3-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 93590849a05edffaefa11695fab98f621259ded2 Author: Ido Schimmel Date: Thu Feb 8 17:55:26 2024 +0200 selftests: forwarding: Fix layer 2 miss test flakiness After enabling a multicast querier on the bridge (like the test is doing), the bridge will wait for the Max Response Delay before starting to forward according to its MDB in order to let Membership Reports enough time to be received and processed. Currently, the test is waiting for exactly the default Max Response Delay (10 seconds) which is racy and leads to failures [1]. Fix by reducing the Max Response Delay to 1 second. [1] [...] # TEST: L2 miss - Multicast (IPv4) [FAIL] # Unregistered multicast filter was hit after adding MDB entry Fixes: 8c33266ae26a ("selftests: forwarding: Add layer 2 miss test cases") Signed-off-by: Ido Schimmel Reviewed-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20240208155529.1199729-2-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 38ee0cb2a2e2ade077442085638eb181b0562971 Author: Ido Schimmel Date: Thu Feb 8 14:31:10 2024 +0200 selftests: net: Fix bridge backup port test flakiness The test toggles the carrier of a bridge port in order to test the bridge backup port feature. Due to the linkwatch delayed work the carrier change is not always reflected fast enough to the bridge driver and packets are not forwarded as the test expects, resulting in failures [1]. Fix by busy waiting on the bridge port state until it changes to the desired state following the carrier change. [1] # Backup port # ----------- [...] # TEST: swp1 carrier off [ OK ] # TEST: No forwarding out of swp1 [FAIL] [ 641.995910] br0: port 1(swp1) entered disabled state # TEST: No forwarding out of vx0 [ OK ] Fixes: b408453053fb ("selftests: net: Add bridge backup port and backup nexthop ID test") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Paolo Abeni Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20240208123110.1063930-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit 12c5128f101bfa47a08e4c0e1a75cfa2d0872bcd Author: Filipe Manana Date: Thu Jan 25 09:53:19 2024 +0000 btrfs: add new unused block groups to the list of unused block groups Space reservations for metadata are, most of the time, pessimistic as we reserve space for worst possible cases - where tree heights are at the maximum possible height (8), we need to COW every extent buffer in a tree path, need to split extent buffers, etc. For data, we generally reserve the exact amount of space we are going to allocate. The exception here is when using compression, in which case we reserve space matching the uncompressed size, as the compression only happens at writeback time and in the worst possible case we need that amount of space in case the data is not compressible. This means that when there's not available space in the corresponding space_info object, we may need to allocate a new block group, and then that block group might not be used after all. In this case the block group is never added to the list of unused block groups and ends up never being deleted - except if we unmount and mount again the fs, as when reading block groups from disk we add unused ones to the list of unused block groups (fs_info->unused_bgs). Otherwise a block group is only added to the list of unused block groups when we deallocate the last extent from it, so if no extent is ever allocated, the block group is kept around forever. This also means that if we have a bunch of tasks reserving space in parallel we can end up allocating many block groups that end up never being used or kept around for too long without being used, which has the potential to result in ENOSPC failures in case for example we over allocate too many metadata block groups and then end up in a state without enough unallocated space to allocate a new data block group. This is more likely to happen with metadata reservations as of kernel 6.7, namely since commit 28270e25c69a ("btrfs: always reserve space for delayed refs when starting transaction"), because we started to always reserve space for delayed references when starting a transaction handle for a non-zero number of items, and also to try to reserve space to fill the gap between the delayed block reserve's reserved space and its size. So to avoid this, when finishing the creation a new block group, add the block group to the list of unused block groups if it's still unused at that time. This way the next time the cleaner kthread runs, it will delete the block group if it's still unused and not needed to satisfy existing space reservations. Reported-by: Ivan Shapovalov Link: https://lore.kernel.org/linux-btrfs/9cdbf0ca9cdda1b4c84e15e548af7d7f9f926382.camel@intelfx.name/ CC: stable@vger.kernel.org # 6.7+ Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit f4a9f219411f318ae60d6ff7f129082a75686c6c Author: Filipe Manana Date: Thu Jan 25 09:53:14 2024 +0000 btrfs: do not delete unused block group if it may be used soon Before deleting a block group that is in the list of unused block groups (fs_info->unused_bgs), we check if the block group became used before deleting it, as extents from it may have been allocated after it was added to the list. However even if the block group was not yet used, there may be tasks that have only reserved space and have not yet allocated extents, and they might be relying on the availability of the unused block group in order to allocate extents. The reservation works first by increasing the "bytes_may_use" field of the corresponding space_info object (which may first require flushing delayed items, allocating a new block group, etc), and only later a task does the actual allocation of extents. For metadata we usually don't end up using all reserved space, as we are pessimistic and typically account for the worst cases (need to COW every single node in a path of a tree at maximum possible height, etc). For data we usually reserve the exact amount of space we're going to allocate later, except when using compression where we always reserve space based on the uncompressed size, as compression is only triggered when writeback starts so we don't know in advance how much space we'll actually need, or if the data is compressible. So don't delete an unused block group if the total size of its space_info object minus the block group's size is less then the sum of used space and space that may be used (space_info->bytes_may_use), as that means we have tasks that reserved space and may need to allocate extents from the block group. In this case, besides skipping the deletion, re-add the block group to the list of unused block groups so that it may be reconsidered later, in case the tasks that reserved space end up not needing to allocate extents from it. Allowing the deletion of the block group while we have reserved space, can result in tasks failing to allocate metadata extents (-ENOSPC) while under a transaction handle, resulting in a transaction abort, or failure during writeback for the case of data extents. CC: stable@vger.kernel.org # 6.0+ Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1693d5442c458ae8d5b0d58463b873cd879569ed Author: Filipe Manana Date: Thu Jan 25 09:53:06 2024 +0000 btrfs: add and use helper to check if block group is used Add a helper function to determine if a block group is being used and make use of it at btrfs_delete_unused_bgs(). This helper will also be used in future code changes. Reviewed-by: Johannes Thumshirn Reviewed-by: Josef Bacik Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5571e41ec6e56e35f34ae9f5b3a335ef510e0ade Author: Josef Bacik Date: Wed Jan 31 14:27:25 2024 -0500 btrfs: don't drop extent_map for free space inode on write error While running the CI for an unrelated change I hit the following panic with generic/648 on btrfs_holes_spacecache. assertion failed: block_start != EXTENT_MAP_HOLE, in fs/btrfs/extent_io.c:1385 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent_io.c:1385! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 2695096 Comm: fsstress Kdump: loaded Tainted: G W 6.8.0-rc2+ #1 RIP: 0010:__extent_writepage_io.constprop.0+0x4c1/0x5c0 Call Trace: extent_write_cache_pages+0x2ac/0x8f0 extent_writepages+0x87/0x110 do_writepages+0xd5/0x1f0 filemap_fdatawrite_wbc+0x63/0x90 __filemap_fdatawrite_range+0x5c/0x80 btrfs_fdatawrite_range+0x1f/0x50 btrfs_write_out_cache+0x507/0x560 btrfs_write_dirty_block_groups+0x32a/0x420 commit_cowonly_roots+0x21b/0x290 btrfs_commit_transaction+0x813/0x1360 btrfs_sync_file+0x51a/0x640 __x64_sys_fdatasync+0x52/0x90 do_syscall_64+0x9c/0x190 entry_SYSCALL_64_after_hwframe+0x6e/0x76 This happens because we fail to write out the free space cache in one instance, come back around and attempt to write it again. However on the second pass through we go to call btrfs_get_extent() on the inode to get the extent mapping. Because this is a new block group, and with the free space inode we always search the commit root to avoid deadlocking with the tree, we find nothing and return a EXTENT_MAP_HOLE for the requested range. This happens because the first time we try to write the space cache out we hit an error, and on an error we drop the extent mapping. This is normal for normal files, but the free space cache inode is special. We always expect the extent map to be correct. Thus the second time through we end up with a bogus extent map. Since we're deprecating this feature, the most straightforward way to fix this is to simply skip dropping the extent map range for this failed range. I shortened the test by using error injection to stress the area to make it easier to reproduce. With this patch in place we no longer panic with my error injection test. CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 9ed18b0b7765ec3aa5f10843d1c3daaa1a225337 Merge: ca8a66738a444 3951f6add519a Author: Linus Torvalds Date: Fri Feb 9 11:19:36 2024 -0800 Merge tag 'riscv-for-linus-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - fix missing TLB flush during early boot on SPARSEMEM_VMEMMAP configurations - fixes to correctly implement the break-before-make behavior requried by the ISA for NAPOT mappings - fix a missing TLB flush on intermediate mapping changes - fix build warning about a missing declaration of overflow_stack - fix performace regression related to incorrect tracking of completed batch TLB flushes * tag 'riscv-for-linus-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix arch_tlbbatch_flush() by clearing the batch cpumask riscv: declare overflow_stack as exported from traps.c riscv: Fix arch_hugetlb_migration_supported() for NAPOT riscv: Flush the tlb when a page directory is freed riscv: Fix hugetlb_mask_last_page() when NAPOT is enabled riscv: Fix set_huge_pte_at() for NAPOT mapping riscv: mm: execute local TLB flush after populating vmemmap commit ca8a66738a444e05fb256ca0081224d066318401 Merge: 6dc512a0a22e8 44dc5c41b5b12 Author: Linus Torvalds Date: Fri Feb 9 11:13:19 2024 -0800 Merge tag 'trace-v6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: - Fix broken direct trampolines being called when another callback is attached the same function. ARM 64 does not support FTRACE_WITH_REGS, and when it added direct trampoline calls from ftrace, it removed the "WITH_REGS" flag from the ftrace_ops for direct trampolines. This broke x86 as x86 requires direct trampolines to have WITH_REGS. This wasn't noticed because direct trampolines work as long as the function it is attached to is not shared with other callbacks (like the function tracer). When there are other callbacks, a helper trampoline is called, to call all the non direct callbacks and when it returns, the direct trampoline is called. For x86, the direct trampoline sets a flag in the regs field to tell the x86 specific code to call the direct trampoline. But this only works if the ftrace_ops had WITH_REGS set. ARM does things differently that does not require this. For now, set WITH_REGS if the arch supports WITH_REGS (which ARM does not), and this makes it work for both ARM64 and x86. - Fix wasted memory in the saved_cmdlines logic. The saved_cmdlines is a cache that maps PIDs to COMMs that tracing can use. Most trace events only save the PID in the event. The saved_cmdlines file lists PIDs to COMMs so that the tracing tools can show an actual name and not just a PID for each event. There's an array of PIDs that map to a small set of saved COMM strings. The array is set to PID_MAX_DEFAULT which is usually set to 32768. When a PID comes in, it will add itself to this array along with the index into the COMM array (note if the system allows more than PID_MAX_DEFAULT, this cache is similar to cache lines as an update of a PID that has the same PID_MAX_DEFAULT bits set will flush out another task with the same matching bits set). A while ago, the size of this cache was changed to be dynamic and the array was moved into a structure and created with kmalloc(). But this new structure had the size of 131104 bytes, or 0x20020 in hex. As kmalloc allocates in powers of two, it was actually allocating 0x40000 bytes (262144) leaving 131040 bytes of wasted memory. The last element of this structure was a pointer to the COMM string array which defaulted to just saving 128 COMMs. By changing the last field of this structure to a variable length string, and just having it round up to fill the allocated memory, the default size of the saved COMM cache is now 8190. This not only uses the wasted space, but actually saves space by removing the extra allocation for the COMM names. * tag 'trace-v6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracing: Fix wasted memory in saved_cmdlines logic ftrace: Fix DIRECT_CALLS to use SAVE_REGS by default commit 6dc512a0a22e817100a0522d8f0985c8ffc86456 Merge: e6f39a90de921 9efd24ec5599e Author: Linus Torvalds Date: Fri Feb 9 11:04:26 2024 -0800 Merge tag 'probes-fixes-v6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes fixes from Masami Hiramatsu: - remove unnecessary initial values of kprobes local variables - probe-events parser bug fixes: - calculate the argument size and format string after setting type information from BTF, because BTF can change the size and format string. - show $comm parse error correctly instead of failing silently. * tag 'probes-fixes-v6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: kprobes: Remove unnecessary initial values of variables tracing/probes: Fix to set arg size and fmt after setting type from BTF tracing/probes: Fix to show a parse error for bad type for $comm commit 41044d5360685e78a869d40a168491a70cdb7e73 Author: Alex Williamson Date: Tue Jan 23 11:55:31 2024 -0700 PCI: Fix active state requirement in PME polling The commit noted in fixes added a bogus requirement that runtime PM managed devices need to be in the RPM_ACTIVE state for PME polling. In fact, only devices in low power states should be polled. However there's still a requirement that the device config space must be accessible, which has implications for both the current state of the polled device and the parent bridge, when present. It's not sufficient to assume the bridge remains in D0 and cases have been observed where the bridge passes the D0 test, but the PM state indicates RPM_SUSPENDING and config space of the polled device becomes inaccessible during pci_pme_wakeup(). Therefore, since the bridge is already effectively required to be in the RPM_ACTIVE state, formalize this in the code and elevate the PM usage count to maintain the state while polling the subordinate device. This resolves a regression reported in the bugzilla below where a Thunderbolt/USB4 hierarchy fails to scan for an attached NVMe endpoint downstream of a bridge in a D3hot power state. Link: https://lore.kernel.org/r/20240123185548.1040096-1-alex.williamson@redhat.com Fixes: d3fcd7360338 ("PCI: Fix runtime PM race with PME polling") Reported-by: Sanath S Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218360 Signed-off-by: Alex Williamson Signed-off-by: Bjorn Helgaas Tested-by: Sanath S Reviewed-by: Rafael J. Wysocki Cc: Lukas Wunner Cc: Mika Westerberg commit e6f39a90de9213693db19aeb2ddea54163f104d7 Merge: 5ddfc24606115 1ad55cecf22f0 Author: Linus Torvalds Date: Fri Feb 9 10:40:50 2024 -0800 Merge tag 'efi-fixes-for-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI fixes from Ard Biesheuvel: "The only notable change here is the patch that changes the way we deal with spurious errors from the EFI memory attribute protocol. This will be backported to v6.6, and is intended to ensure that we will not paint ourselves into a corner when we tighten this further in order to comply with MS requirements on signed EFI code. Note that this protocol does not currently exist in x86 production systems in the field, only in Microsoft's fork of OVMF, but it will be mandatory for Windows logo certification for x86 PCs in the future. - Tighten ELF relocation checks on the RISC-V EFI stub - Give up if the new EFI memory attributes protocol fails spuriously on x86 - Take care not to place the kernel in the lowest 16 MB of DRAM on x86 - Omit special purpose EFI memory from memblock - Some fixes for the CXL CPER reporting code - Make the PE/COFF layout of mixed-mode capable images comply with a strict interpretation of the spec" * tag 'efi-fixes-for-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section cxl/trace: Remove unnecessary memcpy's cxl/cper: Fix errant CPER prints for CXL events efi: Don't add memblocks for soft-reserved memory efi: runtime: Fix potential overflow of soft-reserved region size efi/libstub: Add one kernel-doc comment x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDR x86/efistub: Give up if memory attribute protocol returns an error riscv/efistub: Tighten ELF relocation check riscv/efistub: Ensure GP-relative addressing is not used commit 5ddfc2460611567cea5ed097f9534e7e8e84744b Merge: 5ca243c23ee12 67057f48df79a Author: Linus Torvalds Date: Fri Feb 9 10:37:59 2024 -0800 Merge tag 'pci-v6.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fixes from Bjorn Helgaas: - Fix an unintentional truncation of DWC MSI-X address to 32 bits and update similar MSI code to match (Dan Carpenter) * tag 'pci-v6.8-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: PCI: dwc: Clean up dw_pcie_ep_raise_msi_irq() alignment PCI: dwc: Fix a 64bit bug in dw_pcie_ep_raise_msix_irq() commit 5ca243c23ee122ed983a2af3d454a4b58677d2f5 Merge: eb747bcc3611c 34cf8c657cf03 Author: Linus Torvalds Date: Fri Feb 9 10:35:39 2024 -0800 Merge tag 'hwmon-for-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - coretemp: Various fixes, and increase number of supported CPU cores - aspeed-pwm-tacho: Add missing mutex protection * tag 'hwmon-for-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (coretemp) Enlarge per package core count limit hwmon: (coretemp) Fix bogus core_id to attr name mapping hwmon: (coretemp) Fix out-of-bounds memory access hwmon: (aspeed-pwm-tacho) mutex for tach reading commit eb747bcc3611c7b3df6c8e5826f5003daeea6e9f Merge: 3760081ff414c cc9432c4fb159 Author: Linus Torvalds Date: Fri Feb 9 10:33:54 2024 -0800 Merge tag 'mmc-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Allow non-sleeping read-only slot-gpio MMC host: - sdhci-pci-o2micro: Fix a warm reboot BIOS issue" * tag 'mmc-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: slot-gpio: Allow non-sleeping GPIO ro mmc: sdhci-pci-o2micro: Fix a warm reboot issue that disk can't be detected by BIOS commit 3760081ff414c4fec37396499f5b298464583b03 Merge: 4a8e4b3c2741a c41336f4d6905 Author: Linus Torvalds Date: Fri Feb 9 10:29:50 2024 -0800 Merge tag 'pmdomain-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain fixes from Ulf Hansson: "Core: - Move the unused cleanup to a _sync initcall Providers: - mediatek: Fix race conditions at probe/remove with genpd - renesas: r8a77980-sysc: CR7 must be always on" * tag 'pmdomain-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: pmdomain: mediatek: fix race conditions with genpd pmdomain: renesas: r8a77980-sysc: CR7 must be always on pmdomain: core: Move the unused cleanup to a _sync initcall commit 4a8e4b3c2741a46c7c03c1726a124a750ba06905 Merge: c76b766ec50d3 2526dffc6d65c Author: Linus Torvalds Date: Fri Feb 9 10:27:56 2024 -0800 Merge tag 'gpio-fixes-for-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fix from Bartosz Golaszewski: - remove the new GPIO device from the global list unconditionally in error path in core GPIOLIB * tag 'gpio-fixes-for-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: remove GPIO device from the list unconditionally in error path commit c76b766ec50d3d43e2dacea53a733b285f4b730d Merge: 1f719a2f3fa67 311520887d7ca Author: Linus Torvalds Date: Fri Feb 9 09:57:12 2024 -0800 Merge tag 'drm-fixes-2024-02-09' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular weekly fixes, xe, amdgpu and msm are most of them, with some misc in i915, ivpu and nouveau, scattered but nothing too intense at this point. i915: - gvt: docs fix, uninit var, MAINTAINERS ivpu: - add aborted job status - disable d3 hot delay - mmu fixes nouveau: - fix gsp rpc size request - fix dma buffer leaks - use common code for gsp mem ctor xe: - Fix a loop in an error path - Fix a missing dma-fence reference - Fix a retry path on userptr REMAP - Workaround for a false gcc warning - Fix missing map of the usm batch buffer in the migrate vm. - Fix a memory leak. - Fix a bad assumption of used page size - Fix hitting a BUG() due to zero pages to map. - Remove some leftover async bind queue relics amdgpu: - Misc NULL/bounds check fixes - ODM pipe policy fix - Aborted suspend fixes - JPEG 4.0.5 fix - DCN 3.5 fixes - PSP fix - DP MST fix - Phantom pipe fix - VRAM vendor fix - Clang fix - SR-IOV fix msm: - DPU: - fix for kernel doc warnings and smatch warnings in dpu_encoder - fix for smatch warning in dpu_encoder - fix the bus bandwidth value for SDM670 - DP: - fixes to handle unknown bpc case correctly for DP - fix for MISC0 programming - GPU: - dmabuf vmap fix - a610 UBWC corruption fix (incorrect hbb) - revert a commit that was making GPU recovery unreliable" * tag 'drm-fixes-2024-02-09' of git://anongit.freedesktop.org/drm/drm: (43 commits) drm/xe: Remove TEST_VM_ASYNC_OPS_ERROR drm/xe/vm: don't ignore error when in_kthread drm/xe: Assume large page size if VMA not yet bound drm/xe/display: Fix memleak in display initialization drm/xe: Map both mem.kernel_bb_pool and usm.bb_pool drm/xe: circumvent bogus stringop-overflow warning drm/xe: Pick correct userptr VMA to repin on REMAP op failure drm/xe: Take a reference in xe_exec_queue_last_fence_get() drm/xe: Fix loop in vm_bind_ioctl_ops_unwind drm/amdgpu: Fix HDP flush for VFs on nbio v7.9 drm/amd/display: Implement bounds check for stream encoder creation in DCN301 drm/amd/display: Increase frame-larger-than for all display_mode_vba files drm/amd/display: Clear phantom stream count and plane count drm/amdgpu: Avoid fetching VRAM vendor info drm/amd/display: Disable ODM by default for DCN35 drm/amd/display: Update phantom pipe enable / disable sequence drm/amd/display: Fix MST Null Ptr for RV drm/amdgpu: Fix shared buff copy to user drm/amd/display: Increase eval/entry delay for DCN35 drm/amdgpu: remove asymmetrical irq disabling in jpeg 4.0.5 suspend ... commit 50572064ec7109b00eef8880e905f55861c8b3de Author: Ilkka Koskinen Date: Fri Feb 9 17:11:09 2024 +0000 perf/arm-cmn: Workaround AmpereOneX errata AC04_MESH_1 (incorrect child count) AmpereOneX mesh implementation has a bug in HN-P nodes that makes them report incorrect child count. The failing crosspoints report 8 children while they only have two. When the driver tries to access the inexistent child nodes, it believes it has reached an invalid node type and probing fails. The workaround is to ignore those incorrect child nodes and continue normally. Signed-off-by: Ilkka Koskinen [ rm: rewrote simpler generalised version ] Tested-by: Ilkka Koskinen Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/ce4b1442135fe03d0de41859b04b268c88c854a3.1707498577.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit f9daab0ad01cf9d165dbbbf106ca4e61d06e7fe8 Author: Fangrui Song Date: Mon Feb 5 23:45:52 2024 -0800 arm64: jump_label: use constraints "Si" instead of "i" The generic constraint "i" seems to be copied from x86 or arm (and with a redundant generic operand modifier "c"). It works with -fno-PIE but not with -fPIE/-fPIC in GCC's aarch64 port. The machine constraint "S", which denotes a symbol or label reference with a constant offset, supports PIC and has been available in GCC since 2012 and in Clang since 7.0. However, Clang before 19 does not support "S" on a symbol with a constant offset [1] (e.g. `static_key_false(&nf_hooks_needed[pf][hook])` in include/linux/netfilter.h), so we use "i" as a fallback. Suggested-by: Ard Biesheuvel Signed-off-by: Fangrui Song Link: https://github.com/llvm/llvm-project/pull/80255 [1] Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20240206074552.541154-1-maskray@google.com Signed-off-by: Will Deacon commit c0b26c06ed008c0898829dda4c2783b8ec478350 Author: Seongsu Park Date: Fri Feb 2 10:33:06 2024 +0900 arm64: fix typo in comments fix typo in comments thath -> that Signed-off-by: Seongsu Park Link: https://lore.kernel.org/r/20240202013306.883777-1-sgsu.park@samsung.com Signed-off-by: Will Deacon commit 719da04f2d1285922abca72b074fb6fa75d464ea Author: Hojin Nam Date: Thu Feb 8 10:34:15 2024 +0900 perf: CXL: fix mismatched cpmu event opcode S2M NDR BI-ConflictAck opcode is described as 4 in the CXL r3.0 3.3.9 Table 3.43. However, it is defined as 3 in macro definition. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Signed-off-by: Hojin Nam Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240208013415epcms2p2904187c8a863f4d0d2adc980fb91a2dc@epcms2p2 Signed-off-by: Will Deacon commit 61da7c8e2a602f66be578cbbcebe8638c10e0f48 Author: Mark Brown Date: Tue Jan 30 15:43:53 2024 +0000 arm64/signal: Don't assume that TIF_SVE means we saved SVE state When we are in a syscall we will only save the FPSIMD subset even though the task still has access to the full register set, and on context switch we will only remove TIF_SVE when loading the register state. This means that the signal handling code should not assume that TIF_SVE means that the register state is stored in SVE format, it should instead check the format that was recorded during save. Fixes: 8c845e273104 ("arm64/sve: Leave SVE enabled on syscall if we don't context switch") Signed-off-by: Mark Brown Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240130-arm64-sve-signal-regs-v2-1-9fc6f9502782@kernel.org Signed-off-by: Will Deacon commit f6a1892585cd19e63c4ef2334e26cd536d5b678d Author: Aleksander Mazur Date: Tue Jan 23 14:43:00 2024 +0100 x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 The kernel built with MCRUSOE is unbootable on Transmeta Crusoe. It shows the following error message: This kernel requires an i686 CPU, but only detected an i586 CPU. Unable to boot - please use a kernel appropriate for your CPU. Remove MCRUSOE from the condition introduced in commit in Fixes, effectively changing X86_MINIMUM_CPU_FAMILY back to 5 on that machine, which matches the CPU family given by CPUID. [ bp: Massage commit message. ] Fixes: 25d76ac88821 ("x86/Kconfig: Explicitly enumerate i686-class CPUs in Kconfig") Signed-off-by: Aleksander Mazur Signed-off-by: Borislav Petkov (AMD) Acked-by: H. Peter Anvin Cc: Link: https://lore.kernel.org/r/20240123134309.1117782-1-deweloper@wp.pl commit 9f208e097801f9c2088eb339a1162fff81c08b4e Author: Christian Lamparter Date: Fri Feb 9 15:59:07 2024 +0100 spi: spi-ppc4xx: include missing platform_device.h the driver currently fails to compile on 6.8-rc3 due to: | spi-ppc4xx.c: In function ‘spi_ppc4xx_of_probe’: | @346:36: error: invalid use of undefined type ‘struct platform_device’ | 346 | struct device_node *np = op->dev.of_node; | | ^~ | ... (more similar errors) it was working with 6.7. Looks like it only needed the include and its compiling fine! Signed-off-by: Christian Lamparter Link: https://lore.kernel.org/r/3eb3f9c4407ba99d1cd275662081e46b9e839173.1707490664.git.chunkeey@gmail.com Signed-off-by: Mark Brown commit 727b943263dc98a7aca355cc0302158218f71543 Author: Richard Fitzgerald Date: Fri Feb 9 14:57:00 2024 +0000 ASoC: cs35l56: Remove default from IRQ1_CFG register The driver never uses the IRQ1_CFG register so there's no need to provide a default value. It's set as a readable register only for debugging through the regmap registers file. A system-specific firmware could overwrite this register with a non-default value. Therefore the driver can't hardcode what the initial value actually is. As the register is only for debugging the value can be left unknown until someone wants to read it through debugfs. Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20240209145700.1555950-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 124468af7e769a52d27c3290007ac6e2ba346ccd Author: Heiko Carstens Date: Tue Feb 6 14:58:51 2024 +0100 s390/configs: update default configurations Signed-off-by: Heiko Carstens commit 027790f611321acabbd3c938c1c8ebc08dddd71e Author: Heiko Carstens Date: Tue Feb 6 14:58:50 2024 +0100 s390/configs: enable INIT_STACK_ALL_ZERO in all configurations It looks like all distributions will enable INIT_STACK_ALL_ZERO. Reflect that in the default configurations. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 7f8b81ca35f909747842b649025af541ec172b8f Author: Heiko Carstens Date: Tue Feb 6 14:58:49 2024 +0100 s390/configs: provide compat topic configuration target CONFIG_COMPAT is disabled by default, however compat code still needs to be compile tested. Add a compat topic configuration target which allows to enable it easily. Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit e5aa6d51a2ef8c7ef7e3fe76bebe530fb68e7f08 Author: Lukas Bulwahn Date: Fri Feb 9 09:20:44 2024 +0100 ALSA: hda/cs35l56: select intended config FW_CS_DSP Commit 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") adds configs SND_HDA_SCODEC_CS35L56_{I2C,SPI}, which selects the non-existing config CS_DSP. Note the renaming in commit d7cfdf17cb9d ("firmware: cs_dsp: Rename KConfig symbol CS_DSP -> FW_CS_DSP"), though. Select the intended config FW_CS_DSP. This broken select command probably was not noticed as the configs also select SND_HDA_CS_DSP_CONTROLS and this then selects FW_CS_DSP. So, the select FW_CS_DSP could actually be dropped, but we will keep this redundancy in place as the author originally also intended to have this redundancy of selects in place. Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") Signed-off-by: Lukas Bulwahn Reviewed-by: Simon Trimmer Link: https://lore.kernel.org/r/20240209082044.3981-1-lukas.bulwahn@gmail.com Signed-off-by: Takashi Iwai commit 44dc5c41b5b1267d4dd037d26afc0c4d3a568acb Author: Steven Rostedt (Google) Date: Fri Feb 9 06:36:22 2024 -0500 tracing: Fix wasted memory in saved_cmdlines logic While looking at improving the saved_cmdlines cache I found a huge amount of wasted memory that should be used for the cmdlines. The tracing data saves pids during the trace. At sched switch, if a trace occurred, it will save the comm of the task that did the trace. This is saved in a "cache" that maps pids to comms and exposed to user space via the /sys/kernel/tracing/saved_cmdlines file. Currently it only caches by default 128 comms. The structure that uses this creates an array to store the pids using PID_MAX_DEFAULT (which is usually set to 32768). This causes the structure to be of the size of 131104 bytes on 64 bit machines. In hex: 131104 = 0x20020, and since the kernel allocates generic memory in powers of two, the kernel would allocate 0x40000 or 262144 bytes to store this structure. That leaves 131040 bytes of wasted space. Worse, the structure points to an allocated array to store the comm names, which is 16 bytes times the amount of names to save (currently 128), which is 2048 bytes. Instead of allocating a separate array, make the structure end with a variable length string and use the extra space for that. This is similar to a recommendation that Linus had made about eventfs_inode names: https://lore.kernel.org/all/20240130190355.11486-5-torvalds@linux-foundation.org/ Instead of allocating a separate string array to hold the saved comms, have the structure end with: char saved_cmdlines[]; and round up to the next power of two over sizeof(struct saved_cmdline_buffers) + num_cmdlines * TASK_COMM_LEN It will use this extra space for the saved_cmdline portion. Now, instead of saving only 128 comms by default, by using this wasted space at the end of the structure it can save over 8000 comms and even saves space by removing the need for allocating the other array. Link: https://lore.kernel.org/linux-trace-kernel/20240209063622.1f7b6d5f@rorschach.local.home Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Vincent Donnefort Cc: Sven Schnelle Cc: Mete Durlu Fixes: 939c7a4f04fcd ("tracing: Introduce saved_cmdlines_size file") Signed-off-by: Steven Rostedt (Google) commit 8f1e0d791b5281f3a38620bc7c57763dc551be15 Author: Saravana Kannan Date: Tue Feb 6 17:18:02 2024 -0800 of: property: Add in-ports/out-ports support to of_graph_get_port_parent() Similar to the existing "ports" node name, coresight device tree bindings have added "in-ports" and "out-ports" as standard node names for a collection of ports. Add support for these name to of_graph_get_port_parent() so that remote-endpoint parsing can find the correct parent node for these coresight ports too. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20240207011803.2637531-4-saravanak@google.com Signed-off-by: Rob Herring commit 782bfd03c3ae2c0e6e01b661b8e18f1de50357be Author: Saravana Kannan Date: Tue Feb 6 17:18:01 2024 -0800 of: property: Improve finding the supplier of a remote-endpoint property After commit 4a032827daa8 ("of: property: Simplify of_link_to_phandle()"), remote-endpoint properties created a fwnode link from the consumer device to the supplier endpoint. This is a tiny bit inefficient (not buggy) when trying to create device links or detecting cycles. So, improve this the same way we improved finding the consumer of a remote-endpoint property. Fixes: 4a032827daa8 ("of: property: Simplify of_link_to_phandle()") Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20240207011803.2637531-3-saravanak@google.com Signed-off-by: Rob Herring commit f4653ec9861cd96a1a6a3258c4a807898ee8cf3c Author: Saravana Kannan Date: Tue Feb 6 17:18:00 2024 -0800 of: property: Improve finding the consumer of a remote-endpoint property We have a more accurate function to find the right consumer of a remote-endpoint property instead of searching for a parent with compatible string property. So, use that instead. While at it, make the code to find the consumer a bit more flexible and based on the property being parsed. Fixes: f7514a663016 ("of: property: fw_devlink: Add support for remote-endpoint") Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20240207011803.2637531-2-saravanak@google.com Signed-off-by: Rob Herring commit 7d708c145b2631941b8b0b4a740dc2990818c39c Author: Thinh Nguyen Date: Fri Feb 9 01:24:54 2024 +0000 Revert "usb: dwc3: Support EBC feature of DWC_usb31" This reverts commit 398aa9a7e77cf23c2a6f882ddd3dcd96f21771dc. The update to the gadget API to support EBC feature is incomplete. It's missing at least the following: * New usage documentation * Gadget capability check * Condition for the user to check how many and which endpoints can be used as "fifo_mode" * Description of how it can affect completed request (e.g. dwc3 won't update TRB on completion -- ie. how it can affect request's actual length report) Let's revert this until it's ready. Fixes: 398aa9a7e77c ("usb: dwc3: Support EBC feature of DWC_usb31") Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/3042f847ff904b4dd4e4cf66a1b9df470e63439e.1707441690.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit a8b9cf62ade1bf17261a979fc97e40c2d7842353 Author: Masami Hiramatsu (Google) Date: Wed Jan 10 09:13:06 2024 +0900 ftrace: Fix DIRECT_CALLS to use SAVE_REGS by default The commit 60c8971899f3 ("ftrace: Make DIRECT_CALLS work WITH_ARGS and !WITH_REGS") changed DIRECT_CALLS to use SAVE_ARGS when there are multiple ftrace_ops at the same function, but since the x86 only support to jump to direct_call from ftrace_regs_caller, when we set the function tracer on the same target function on x86, ftrace-direct does not work as below (this actually works on arm64.) At first, insmod ftrace-direct.ko to put a direct_call on 'wake_up_process()'. # insmod kernel/samples/ftrace/ftrace-direct.ko # less trace ... -0 [006] ..s1. 564.686958: my_direct_func: waking up rcu_preempt-17 -0 [007] ..s1. 564.687836: my_direct_func: waking up kcompactd0-63 -0 [006] ..s1. 564.690926: my_direct_func: waking up rcu_preempt-17 -0 [006] ..s1. 564.696872: my_direct_func: waking up rcu_preempt-17 -0 [007] ..s1. 565.191982: my_direct_func: waking up kcompactd0-63 Setup a function filter to the 'wake_up_process' too, and enable it. # cd /sys/kernel/tracing/ # echo wake_up_process > set_ftrace_filter # echo function > current_tracer # less trace ... -0 [006] ..s3. 686.180972: wake_up_process <-call_timer_fn -0 [006] ..s3. 686.186919: wake_up_process <-call_timer_fn -0 [002] ..s3. 686.264049: wake_up_process <-call_timer_fn -0 [002] d.h6. 686.515216: wake_up_process <-kick_pool -0 [002] d.h6. 686.691386: wake_up_process <-kick_pool Then, only function tracer is shown on x86. But if you enable 'kprobe on ftrace' event (which uses SAVE_REGS flag) on the same function, it is shown again. # echo 'p wake_up_process' >> dynamic_events # echo 1 > events/kprobes/p_wake_up_process_0/enable # echo > trace # less trace ... -0 [006] ..s2. 2710.345919: p_wake_up_process_0: (wake_up_process+0x4/0x20) -0 [006] ..s3. 2710.345923: wake_up_process <-call_timer_fn -0 [006] ..s1. 2710.345928: my_direct_func: waking up rcu_preempt-17 -0 [006] ..s2. 2710.349931: p_wake_up_process_0: (wake_up_process+0x4/0x20) -0 [006] ..s3. 2710.349934: wake_up_process <-call_timer_fn -0 [006] ..s1. 2710.349937: my_direct_func: waking up rcu_preempt-17 To fix this issue, use SAVE_REGS flag for multiple ftrace_ops flag of direct_call by default. Link: https://lore.kernel.org/linux-trace-kernel/170484558617.178953.1590516949390270842.stgit@devnote2 Fixes: 60c8971899f3 ("ftrace: Make DIRECT_CALLS work WITH_ARGS and !WITH_REGS") Cc: stable@vger.kernel.org Cc: Florent Revest Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Mark Rutland Tested-by: Mark Rutland [arm64] Acked-by: Jiri Olsa Signed-off-by: Steven Rostedt (Google) commit f072b272aa27d57cf7fe6fdedb30fb50f391974e Author: Andrew Jones Date: Wed Jan 31 13:05:15 2024 +0100 RISC-V: KVM: Use correct restricted types __le32 and __le64 types should be used with le32_to_cpu() and le64_to_cpu() and __user is needed for pointers referencing guest memory, as sparse helpfully points out. Fixes: e9f12b5fff8a ("RISC-V: KVM: Implement SBI STA extension") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401020142.lwFEDK5v-lkp@intel.com/ Signed-off-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel commit 3752219b6007ee0421cc228f442f33b31f85addd Author: Andrew Jones Date: Wed Jan 31 13:05:14 2024 +0100 RISC-V: paravirt: Use correct restricted types __le32 and __le64 types should be used with le32_to_cpu() and le64_to_cpu(), as sparse helpfully points out. Fixes: fdf68acccfc6 ("RISC-V: paravirt: Implement steal-time support") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401011933.hL9zqmKo-lkp@intel.com/ Signed-off-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel commit 17c8e9ac95d81d10e9619a845a68b83c9384be64 Author: Andrew Jones Date: Wed Jan 31 13:05:13 2024 +0100 RISC-V: paravirt: steal_time should be static steal_time is not used outside paravirt.c, make it static, as sparse suggested. Fixes: fdf68acccfc6 ("RISC-V: paravirt: Implement steal-time support") Signed-off-by: Andrew Jones Reviewed-by: Atish Patra Signed-off-by: Anup Patel commit c0ec2a712daf133d9996a8a1b7ee2d4996080363 Author: zhenwei pi Date: Tue Jan 30 19:27:40 2024 +0800 crypto: virtio/akcipher - Fix stack overflow on memcpy sizeof(struct virtio_crypto_akcipher_session_para) is less than sizeof(struct virtio_crypto_op_ctrl_req::u), copying more bytes from stack variable leads stack overflow. Clang reports this issue by commands: make -j CC=clang-14 mrproper >/dev/null 2>&1 make -j O=/tmp/crypto-build CC=clang-14 allmodconfig >/dev/null 2>&1 make -j O=/tmp/crypto-build W=1 CC=clang-14 drivers/crypto/virtio/ virtio_crypto_akcipher_algs.o Fixes: 59ca6c93387d ("virtio-crypto: implement RSA algorithm") Link: https://lore.kernel.org/all/0a194a79-e3a3-45e7-be98-83abd3e1cb7e@roeck-us.net/ Cc: Signed-off-by: zhenwei pi Tested-by: Nathan Chancellor # build Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: Herbert Xu commit 02d9009f4e8c27dcf10c3e39bc0666436686a219 Author: Paolo Abeni Date: Wed Feb 7 18:31:10 2024 +0100 selftests: net: add more missing kernel config The reuseport_addr_any.sh is currently skipping DCCP tests and pmtu.sh is skipping all the FOU/GUE related cases: add the missing options. Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/38d3ca7f909736c1aef56e6244d67c82a9bba6ff.1707326987.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 4ab18af47a2c2a80ac11674122935700caf80cc6 Author: Parav Pandit Date: Tue Feb 6 18:17:17 2024 +0200 devlink: Fix command annotation documentation Command example string is not read as command. Fix command annotation. Fixes: a8ce7b26a51e ("devlink: Expose port function commands to control migratable") Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240206161717.466653-1-parav@nvidia.com Signed-off-by: Jakub Kicinski commit 9b0ed890ac2ae233efd8b27d11aee28a19437bb8 Author: Magnus Karlsson Date: Wed Feb 7 09:47:36 2024 +0100 bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY Do not report the XDP capability NETDEV_XDP_ACT_XSK_ZEROCOPY as the bonding driver does not support XDP and AF_XDP in zero-copy mode even if the real NIC drivers do. Note that the driver used to report everything as supported before a device was bonded. Instead of just masking out the zero-copy support from this, have the driver report that no XDP feature is supported until a real device is bonded. This seems to be more truthful as it is the real drivers that decide what XDP features are supported. Fixes: cb9e6e584d58 ("bonding: add xdp_features support") Reported-by: Prashant Batra Link: https://lore.kernel.org/all/CAJ8uoz2ieZCopgqTvQ9ZY6xQgTbujmC6XkMTamhp68O-h_-rLg@mail.gmail.com/T/ Signed-off-by: Magnus Karlsson Reviewed-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20240207084737.20890-1-magnus.karlsson@gmail.com Signed-off-by: Jakub Kicinski commit 4e1d71cabb19ec2586827adfc60d68689c68c194 Author: Chuck Lever Date: Tue Feb 6 14:16:31 2024 -0500 net/handshake: Fix handshake_req_destroy_test1 Recently, handshake_req_destroy_test1 started failing: Expected handshake_req_destroy_test == req, but handshake_req_destroy_test == 0000000000000000 req == 0000000060f99b40 not ok 11 req_destroy works This is because "sock_release(sock)" was replaced with "fput(filp)" to address a memory leak. Note that sock_release() is synchronous but fput() usually delays the final close and clean-up. The delay is not consequential in the other cases that were changed but handshake_req_destroy_test1 is testing that handshake_req_cancel() followed by closing the file actually does call the ->hp_destroy method. Thus the PTR_EQ test at the end has to be sure that the final close is complete before it checks the pointer. We cannot use a completion here because if ->hp_destroy is never called (ie, there is an API bug) then the test will hang. Reported by: Guenter Roeck Closes: https://lore.kernel.org/netdev/ZcKDd1to4MPANCrn@tissot.1015granger.net/T/#mac5c6299f86799f1c71776f3a07f9c566c7c3c40 Fixes: 4a0f07d71b04 ("net/handshake: Fix memory leak in __sock_create() and sock_alloc_file()") Signed-off-by: Chuck Lever Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/170724699027.91401.7839730697326806733.stgit@oracle-102.nfsv4bat.org Signed-off-by: Jakub Kicinski commit aa1eec2f546f2afa8c98ec41e5d8ee488165d685 Author: Jiri Pirko Date: Tue Feb 6 17:43:28 2024 +0100 net/mlx5: DPLL, Fix possible use after free after delayed work timer triggers I managed to hit following use after free warning recently: [ 2169.711665] ================================================================== [ 2169.714009] BUG: KASAN: slab-use-after-free in __run_timers.part.0+0x179/0x4c0 [ 2169.716293] Write of size 8 at addr ffff88812b326a70 by task swapper/4/0 [ 2169.719022] CPU: 4 PID: 0 Comm: swapper/4 Not tainted 6.8.0-rc2jiri+ #2 [ 2169.720974] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 2169.722457] Call Trace: [ 2169.722756] [ 2169.723024] dump_stack_lvl+0x58/0xb0 [ 2169.723417] print_report+0xc5/0x630 [ 2169.723807] ? __virt_addr_valid+0x126/0x2b0 [ 2169.724268] kasan_report+0xbe/0xf0 [ 2169.724667] ? __run_timers.part.0+0x179/0x4c0 [ 2169.725116] ? __run_timers.part.0+0x179/0x4c0 [ 2169.725570] __run_timers.part.0+0x179/0x4c0 [ 2169.726003] ? call_timer_fn+0x320/0x320 [ 2169.726404] ? lock_downgrade+0x3a0/0x3a0 [ 2169.726820] ? kvm_clock_get_cycles+0x14/0x20 [ 2169.727257] ? ktime_get+0x92/0x150 [ 2169.727630] ? lapic_next_deadline+0x35/0x60 [ 2169.728069] run_timer_softirq+0x40/0x80 [ 2169.728475] __do_softirq+0x1a1/0x509 [ 2169.728866] irq_exit_rcu+0x95/0xc0 [ 2169.729241] sysvec_apic_timer_interrupt+0x6b/0x80 [ 2169.729718] [ 2169.729993] [ 2169.730259] asm_sysvec_apic_timer_interrupt+0x16/0x20 [ 2169.730755] RIP: 0010:default_idle+0x13/0x20 [ 2169.731190] Code: c0 08 00 00 00 4d 29 c8 4c 01 c7 4c 29 c2 e9 72 ff ff ff cc cc cc cc 8b 05 9a 7f 1f 02 85 c0 7e 07 0f 00 2d cf 69 43 00 fb f4 c3 66 66 2e 0f 1f 84 00 00 00 00 00 65 48 8b 04 25 c0 93 04 00 [ 2169.732759] RSP: 0018:ffff888100dbfe10 EFLAGS: 00000242 [ 2169.733264] RAX: 0000000000000001 RBX: ffff888100d9c200 RCX: ffffffff8241bd62 [ 2169.733925] RDX: ffffed109a848b15 RSI: 0000000000000004 RDI: ffffffff8127ac55 [ 2169.734566] RBP: 0000000000000004 R08: 0000000000000000 R09: ffffed109a848b14 [ 2169.735200] R10: ffff8884d42458a3 R11: 000000000000ba7e R12: ffffffff83d7d3a0 [ 2169.735835] R13: 1ffff110201b7fc6 R14: 0000000000000000 R15: ffff888100d9c200 [ 2169.736478] ? ct_kernel_exit.constprop.0+0xa2/0xc0 [ 2169.736954] ? do_idle+0x285/0x290 [ 2169.737323] default_idle_call+0x63/0x90 [ 2169.737730] do_idle+0x285/0x290 [ 2169.738089] ? arch_cpu_idle_exit+0x30/0x30 [ 2169.738511] ? mark_held_locks+0x1a/0x80 [ 2169.738917] ? lockdep_hardirqs_on_prepare+0x12e/0x200 [ 2169.739417] cpu_startup_entry+0x30/0x40 [ 2169.739825] start_secondary+0x19a/0x1c0 [ 2169.740229] ? set_cpu_sibling_map+0xbd0/0xbd0 [ 2169.740673] secondary_startup_64_no_verify+0x15d/0x16b [ 2169.741179] [ 2169.741686] Allocated by task 1098: [ 2169.742058] kasan_save_stack+0x1c/0x40 [ 2169.742456] kasan_save_track+0x10/0x30 [ 2169.742852] __kasan_kmalloc+0x83/0x90 [ 2169.743246] mlx5_dpll_probe+0xf5/0x3c0 [mlx5_dpll] [ 2169.743730] auxiliary_bus_probe+0x62/0xb0 [ 2169.744148] really_probe+0x127/0x590 [ 2169.744534] __driver_probe_device+0xd2/0x200 [ 2169.744973] device_driver_attach+0x6b/0xf0 [ 2169.745402] bind_store+0x90/0xe0 [ 2169.745761] kernfs_fop_write_iter+0x1df/0x2a0 [ 2169.746210] vfs_write+0x41f/0x790 [ 2169.746579] ksys_write+0xc7/0x160 [ 2169.746947] do_syscall_64+0x6f/0x140 [ 2169.747333] entry_SYSCALL_64_after_hwframe+0x46/0x4e [ 2169.748049] Freed by task 1220: [ 2169.748393] kasan_save_stack+0x1c/0x40 [ 2169.748789] kasan_save_track+0x10/0x30 [ 2169.749188] kasan_save_free_info+0x3b/0x50 [ 2169.749621] poison_slab_object+0x106/0x180 [ 2169.750044] __kasan_slab_free+0x14/0x50 [ 2169.750451] kfree+0x118/0x330 [ 2169.750792] mlx5_dpll_remove+0xf5/0x110 [mlx5_dpll] [ 2169.751271] auxiliary_bus_remove+0x2e/0x40 [ 2169.751694] device_release_driver_internal+0x24b/0x2e0 [ 2169.752191] unbind_store+0xa6/0xb0 [ 2169.752563] kernfs_fop_write_iter+0x1df/0x2a0 [ 2169.753004] vfs_write+0x41f/0x790 [ 2169.753381] ksys_write+0xc7/0x160 [ 2169.753750] do_syscall_64+0x6f/0x140 [ 2169.754132] entry_SYSCALL_64_after_hwframe+0x46/0x4e [ 2169.754847] Last potentially related work creation: [ 2169.755315] kasan_save_stack+0x1c/0x40 [ 2169.755709] __kasan_record_aux_stack+0x9b/0xf0 [ 2169.756165] __queue_work+0x382/0x8f0 [ 2169.756552] call_timer_fn+0x126/0x320 [ 2169.756941] __run_timers.part.0+0x2ea/0x4c0 [ 2169.757376] run_timer_softirq+0x40/0x80 [ 2169.757782] __do_softirq+0x1a1/0x509 [ 2169.758387] Second to last potentially related work creation: [ 2169.758924] kasan_save_stack+0x1c/0x40 [ 2169.759322] __kasan_record_aux_stack+0x9b/0xf0 [ 2169.759773] __queue_work+0x382/0x8f0 [ 2169.760156] call_timer_fn+0x126/0x320 [ 2169.760550] __run_timers.part.0+0x2ea/0x4c0 [ 2169.760978] run_timer_softirq+0x40/0x80 [ 2169.761381] __do_softirq+0x1a1/0x509 [ 2169.761998] The buggy address belongs to the object at ffff88812b326a00 which belongs to the cache kmalloc-256 of size 256 [ 2169.763061] The buggy address is located 112 bytes inside of freed 256-byte region [ffff88812b326a00, ffff88812b326b00) [ 2169.764346] The buggy address belongs to the physical page: [ 2169.764866] page:000000000f2b1e89 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12b324 [ 2169.765731] head:000000000f2b1e89 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 2169.766484] anon flags: 0x200000000000840(slab|head|node=0|zone=2) [ 2169.767048] page_type: 0xffffffff() [ 2169.767422] raw: 0200000000000840 ffff888100042b40 0000000000000000 dead000000000001 [ 2169.768183] raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 [ 2169.768899] page dumped because: kasan: bad access detected [ 2169.769649] Memory state around the buggy address: [ 2169.770116] ffff88812b326900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 2169.770805] ffff88812b326980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 2169.771485] >ffff88812b326a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 2169.772173] ^ [ 2169.772787] ffff88812b326a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 2169.773477] ffff88812b326b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 2169.774160] ================================================================== [ 2169.774845] ================================================================== I didn't manage to reproduce it. Though the issue seems to be obvious. There is a chance that the mlx5_dpll_remove() calls cancel_delayed_work() when the work runs and manages to re-arm itself. In that case, after delay timer triggers next attempt to queue it, it works with freed memory. Fix this by using cancel_delayed_work_sync() instead which makes sure that work is done when it returns. Fixes: 496fd0a26bbf ("mlx5: Implement SyncE support using DPLL infrastructure") Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240206164328.360313-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 53c0441dd2c44ee93fddb5473885fd41e4bc2361 Author: Jiri Pirko Date: Wed Feb 7 12:59:02 2024 +0100 dpll: fix possible deadlock during netlink dump operation Recently, I've been hitting following deadlock warning during dpll pin dump: [52804.637962] ====================================================== [52804.638536] WARNING: possible circular locking dependency detected [52804.639111] 6.8.0-rc2jiri+ #1 Not tainted [52804.639529] ------------------------------------------------------ [52804.640104] python3/2984 is trying to acquire lock: [52804.640581] ffff88810e642678 (nlk_cb_mutex-GENERIC){+.+.}-{3:3}, at: netlink_dump+0xb3/0x780 [52804.641417] but task is already holding lock: [52804.642010] ffffffff83bde4c8 (dpll_lock){+.+.}-{3:3}, at: dpll_lock_dumpit+0x13/0x20 [52804.642747] which lock already depends on the new lock. [52804.643551] the existing dependency chain (in reverse order) is: [52804.644259] -> #1 (dpll_lock){+.+.}-{3:3}: [52804.644836] lock_acquire+0x174/0x3e0 [52804.645271] __mutex_lock+0x119/0x1150 [52804.645723] dpll_lock_dumpit+0x13/0x20 [52804.646169] genl_start+0x266/0x320 [52804.646578] __netlink_dump_start+0x321/0x450 [52804.647056] genl_family_rcv_msg_dumpit+0x155/0x1e0 [52804.647575] genl_rcv_msg+0x1ed/0x3b0 [52804.648001] netlink_rcv_skb+0xdc/0x210 [52804.648440] genl_rcv+0x24/0x40 [52804.648831] netlink_unicast+0x2f1/0x490 [52804.649290] netlink_sendmsg+0x36d/0x660 [52804.649742] __sock_sendmsg+0x73/0xc0 [52804.650165] __sys_sendto+0x184/0x210 [52804.650597] __x64_sys_sendto+0x72/0x80 [52804.651045] do_syscall_64+0x6f/0x140 [52804.651474] entry_SYSCALL_64_after_hwframe+0x46/0x4e [52804.652001] -> #0 (nlk_cb_mutex-GENERIC){+.+.}-{3:3}: [52804.652650] check_prev_add+0x1ae/0x1280 [52804.653107] __lock_acquire+0x1ed3/0x29a0 [52804.653559] lock_acquire+0x174/0x3e0 [52804.653984] __mutex_lock+0x119/0x1150 [52804.654423] netlink_dump+0xb3/0x780 [52804.654845] __netlink_dump_start+0x389/0x450 [52804.655321] genl_family_rcv_msg_dumpit+0x155/0x1e0 [52804.655842] genl_rcv_msg+0x1ed/0x3b0 [52804.656272] netlink_rcv_skb+0xdc/0x210 [52804.656721] genl_rcv+0x24/0x40 [52804.657119] netlink_unicast+0x2f1/0x490 [52804.657570] netlink_sendmsg+0x36d/0x660 [52804.658022] __sock_sendmsg+0x73/0xc0 [52804.658450] __sys_sendto+0x184/0x210 [52804.658877] __x64_sys_sendto+0x72/0x80 [52804.659322] do_syscall_64+0x6f/0x140 [52804.659752] entry_SYSCALL_64_after_hwframe+0x46/0x4e [52804.660281] other info that might help us debug this: [52804.661077] Possible unsafe locking scenario: [52804.661671] CPU0 CPU1 [52804.662129] ---- ---- [52804.662577] lock(dpll_lock); [52804.662924] lock(nlk_cb_mutex-GENERIC); [52804.663538] lock(dpll_lock); [52804.664073] lock(nlk_cb_mutex-GENERIC); [52804.664490] The issue as follows: __netlink_dump_start() calls control->start(cb) with nlk->cb_mutex held. In control->start(cb) the dpll_lock is taken. Then nlk->cb_mutex is released and taken again in netlink_dump(), while dpll_lock still being held. That leads to ABBA deadlock when another CPU races with the same operation. Fix this by moving dpll_lock taking into dumpit() callback which ensures correct lock taking order. Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions") Signed-off-by: Jiri Pirko Reviewed-by: Arkadiusz Kubalewski Link: https://lore.kernel.org/r/20240207115902.371649-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 311520887d7cad2d5494933bd19bf85eb5398ffc Merge: b30bed9d0012f 8d35217149daa Author: Dave Airlie Date: Fri Feb 9 11:32:38 2024 +1000 Merge tag 'drm-msm-fixes-2024-02-07' of https://gitlab.freedesktop.org/drm/msm into drm-fixes Fixes for v6.8-rc4 DPU: - fix for kernel doc warnings and smatch warnings in dpu_encoder - fix for smatch warning in dpu_encoder - fix the bus bandwidth value for SDM670 DP: - fixes to handle unknown bpc case correctly for DP. The current code was spilling over into other bits of DP configuration register, had to be fixed to avoid the extra shifts which were causing the spill over - fix for MISC0 programming in DP driver to program the correct colorimetry value GPU: - dmabuf vmap fix - a610 UBWC corruption fix (incorrect hbb) - revert a commit that was making GPU recovery unreliable Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGv+tb1+_cp7ftxcMZbbxE9810rvxeaC50eL=msQ+zkm0g@mail.gmail.com commit b30bed9d0012f295843f57058b8927e80eac5c54 Merge: 9da93fe430aac 534c8a5b9d5d4 Author: Dave Airlie Date: Fri Feb 9 11:21:16 2024 +1000 Merge tag 'amd-drm-fixes-6.8-2024-02-08' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.8-2024-02-08: amdgpu: - Misc NULL/bounds check fixes - ODM pipe policy fix - Aborted suspend fixes - JPEG 4.0.5 fix - DCN 3.5 fixes - PSP fix - DP MST fix - Phantom pipe fix - VRAM vendor fix - Clang fix - SR-IOV fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240208165500.4887-1-alexander.deucher@amd.com commit 9da93fe430aac36fb7342a61434f305c4d791a43 Merge: 60c16201b6805 a99682e839af7 Author: Dave Airlie Date: Fri Feb 9 11:17:57 2024 +1000 Merge tag 'drm-intel-fixes-2024-02-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - Just includes gvt-fixes-2024-02-05 Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZcTETgXsejwVwat6@jlahtine-mobl.ger.corp.intel.com commit 60c16201b680598951b920ae9b6a6eba9164216f Merge: 6c2bf9ca24a41 bf4c27b8267d7 Author: Dave Airlie Date: Fri Feb 9 11:12:01 2024 +1000 Merge tag 'drm-xe-fixes-2024-02-08' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Fix a loop in an error path - Fix a missing dma-fence reference - Fix a retry path on userptr REMAP - Workaround for a false gcc warning - Fix missing map of the usm batch buffer in the migrate vm. - Fix a memory leak. - Fix a bad assumption of used page size - Fix hitting a BUG() due to zero pages to map. - Remove some leftover async bind queue relics Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/ZcS2LllawGifubsk@fedora commit 6c2bf9ca24a4168558420fd9e95d375e66bd1d78 Merge: d0399da9fb5f8 5f8408aca6677 Author: Dave Airlie Date: Fri Feb 9 10:52:43 2024 +1000 Merge tag 'drm-misc-fixes-2024-02-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A null pointer dereference fix for v3d, a TTM pool initialization fix, several fixes for nouveau around register size, DMA buffer leaks and API consistency, a multiple fixes for ivpu around MMU setup, initialization and firmware interactions. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/4wsi2i6kgkqdu7nzp4g7hxasbswnrmc5cakgf5zzvnix53u7lr@4rmp7hwblow3 commit 1f719a2f3fa67665578c759ac34fd3d3690c1a20 Merge: b0d5d0f737611 63e4b9d693e0f Author: Linus Torvalds Date: Thu Feb 8 15:09:29 2024 -0800 Merge tag 'net-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from WiFi and netfilter. Current release - regressions: - nic: intel: fix old compiler regressions - netfilter: ipset: missing gc cancellations fixed Current release - new code bugs: - netfilter: ctnetlink: fix filtering for zone 0 Previous releases - regressions: - core: fix from address in memcpy_to_iter_csum() - netfilter: nfnetlink_queue: un-break NF_REPEAT - af_unix: fix memory leak for dead unix_(sk)->oob_skb in GC. - devlink: avoid potential loop in devlink_rel_nested_in_notify_work() - iwlwifi: - mvm: fix a battery life regression - fix double-free bug - mac80211: fix waiting for beacons logic - nic: nfp: flower: prevent re-adding mac index for bonded port Previous releases - always broken: - rxrpc: fix generation of serial numbers to skip zero - tipc: check the bearer type before calling tipc_udp_nl_bearer_add() - tunnels: fix out of bounds access when building IPv6 PMTU error - nic: hv_netvsc: register VF in netvsc_probe if NET_DEVICE_REGISTER missed - nic: atlantic: fix DMA mapping for PTP hwts ring Misc: - selftests: more fixes to deal with very slow hosts" * tag 'net-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (80 commits) netfilter: nft_set_pipapo: remove scratch_aligned pointer netfilter: nft_set_pipapo: add helper to release pcpu scratch area netfilter: nft_set_pipapo: store index in scratch maps netfilter: nft_set_rbtree: skip end interval element from gc netfilter: nfnetlink_queue: un-break NF_REPEAT netfilter: nf_tables: use timestamp to check for set element timeout netfilter: nft_ct: reject direction for ct id netfilter: ctnetlink: fix filtering for zone 0 s390/qeth: Fix potential loss of L3-IP@ in case of network issues netfilter: ipset: Missing gc cancellations fixed octeontx2-af: Initialize maps. net: ethernet: ti: cpsw: enable mac_managed_pm to fix mdio net: ethernet: ti: cpsw_new: enable mac_managed_pm to fix mdio netfilter: nft_set_pipapo: remove static in nft_pipapo_get() netfilter: nft_compat: restrict match/target protocol to u16 netfilter: nft_compat: reject unused compat flag netfilter: nft_compat: narrow down revision to unsigned 8-bits net: intel: fix old compiler regressions MAINTAINERS: Maintainer change for rds selftests: cmsg_ipv6: repeat the exact packet ... commit b0d5d0f73761124f0ece33f5fec421e76a22a9fd Merge: 047371968ffc4 4451e8e8415e4 Author: Linus Torvalds Date: Thu Feb 8 15:07:06 2024 -0800 Merge tag 'pinctrl-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pinctrl fix from Linus Walleij: "A single fix for the AMD driver which affects developer laptops, the pinctrl/GPIO driver won't probe on some systems" * tag 'pinctrl-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: amd: Add IRQF_ONESHOT to the interrupt request commit 5f63a493b99c848ad5200402bebe26211e00025a Merge: 4ce6e2db00de8 4054705215ad7 Author: Jens Axboe Date: Thu Feb 8 15:05:18 2024 -0700 Merge tag 'nvme-6.8-2023-02-08' of git://git.infradead.org/nvme into block-6.8 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.8 - Update a potentially stale firmware attribute (Maurizio) - Fixes for the recent verbose error logging (Keith, Chaitanya) - Protection information payload size fix for passthrough (Francis)" * tag 'nvme-6.8-2023-02-08' of git://git.infradead.org/nvme: nvme: use ns->head->pi_size instead of t10_pi_tuple structure size nvme-core: fix comment to reflect right functions nvme: move passthrough logging attribute to head nvme-host: fix the updating of the firmware version commit 4ce6e2db00de8103a0687fb0f65fd17124a51aaa Author: Yi Sun Date: Mon Jan 29 16:52:50 2024 +0800 virtio-blk: Ensure no requests in virtqueues before deleting vqs. Ensure no remaining requests in virtqueues before resetting vdev and deleting virtqueues. Otherwise these requests will never be completed. It may cause the system to become unresponsive. Function blk_mq_quiesce_queue() can ensure that requests have become in_flight status, but it cannot guarantee that requests have been processed by the device. Virtqueues should never be deleted before all requests become complete status. Function blk_mq_freeze_queue() ensure that all requests in virtqueues become complete status. And no requests can enter in virtqueues. Signed-off-by: Yi Sun Reviewed-by: Stefan Hajnoczi Link: https://lore.kernel.org/r/20240129085250.1550594-1-yi.sun@unisoc.com Signed-off-by: Jens Axboe commit c23de7ceae59e4ca5894c3ecf4f785c50c0fa428 Author: Vegard Nossum Date: Mon Feb 5 18:51:26 2024 +0100 docs: kernel_feat.py: fix build error for missing files If the directory passed to the '.. kernel-feat::' directive does not exist or the get_feat.pl script does not find any files to extract features from, Sphinx will report the following error: Sphinx parallel build error: UnboundLocalError: local variable 'fname' referenced before assignment make[2]: *** [Documentation/Makefile:102: htmldocs] Error 2 This is due to how I changed the script in c48a7c44a1d0 ("docs: kernel_feat.py: fix potential command injection"). Before that, the filename passed along to self.nestedParse() in this case was weirdly just the whole get_feat.pl invocation. We can fix it by doing what kernel_abi.py does -- just pass self.arguments[0] as 'fname'. Fixes: c48a7c44a1d0 ("docs: kernel_feat.py: fix potential command injection") Cc: Justin Forbes Cc: Salvatore Bonaccorso Cc: Jani Nikula Cc: Mauro Carvalho Chehab Cc: stable@vger.kernel.org Signed-off-by: Vegard Nossum Link: https://lore.kernel.org/r/20240205175133.774271-2-vegard.nossum@oracle.com Signed-off-by: Jonathan Corbet commit 2a427b49d02995ea4a6ff93a1432c40fa4d36821 Author: Tejun Heo Date: Mon Nov 20 12:25:56 2023 -1000 blk-iocost: Fix an UBSAN shift-out-of-bounds warning When iocg_kick_delay() is called from a CPU different than the one which set the delay, @now may be in the past of @iocg->delay_at leading to the following warning: UBSAN: shift-out-of-bounds in block/blk-iocost.c:1359:23 shift exponent 18446744073709 is too large for 64-bit type 'u64' (aka 'unsigned long long') ... Call Trace: dump_stack_lvl+0x79/0xc0 __ubsan_handle_shift_out_of_bounds+0x2ab/0x300 iocg_kick_delay+0x222/0x230 ioc_rqos_merge+0x1d7/0x2c0 __rq_qos_merge+0x2c/0x80 bio_attempt_back_merge+0x83/0x190 blk_attempt_plug_merge+0x101/0x150 blk_mq_submit_bio+0x2b1/0x720 submit_bio_noacct_nocheck+0x320/0x3e0 __swap_writepage+0x2ab/0x9d0 The underflow itself doesn't really affect the behavior in any meaningful way; however, the past timestamp may exaggerate the delay amount calculated later in the code, which shouldn't be a material problem given the nature of the delay mechanism. If @now is in the past, this CPU is racing another CPU which recently set up the delay and there's nothing this CPU can contribute w.r.t. the delay. Let's bail early from iocg_kick_delay() in such cases. Reported-by: Breno Leitão Signed-off-by: Tejun Heo Fixes: 5160a5a53c0c ("blk-iocost: implement delay adjustment hysteresis") Link: https://lore.kernel.org/r/ZVvc9L_CYk5LO1fT@slm.duckdns.org Signed-off-by: Jens Axboe commit 55c7788c37242702868bfac7861cdf0c358d6c3d Author: Paulo Alcantara Date: Fri Feb 2 12:38:24 2024 -0300 smb: client: set correct d_type for reparse points under DFS mounts Send query dir requests with an info level of SMB_FIND_FILE_FULL_DIRECTORY_INFO rather than SMB_FIND_FILE_DIRECTORY_INFO when the client is generating its own inode numbers (e.g. noserverino) so that reparse tags still can be parsed directly from the responses, but server won't send UniqueId (server inode number) Signed-off-by: Paulo Alcantara Signed-off-by: Steve French commit 45be0882c5f91e1b92e645001dd1a53b3bd58c97 Author: Steve French Date: Mon Feb 5 14:43:17 2024 -0600 smb3: add missing null server pointer check Address static checker warning in cifs_ses_get_chan_index(): warn: variable dereferenced before check 'server' To be consistent, and reduce risk, we should add another check for null server pointer. Fixes: 88675b22d34e ("cifs: do not search for channel if server is terminating") Reported-by: Dan Carpenter Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 3ca8fbabcceb8bfe44f7f50640092fd8f1de375c Author: Greg Kroah-Hartman Date: Thu Feb 8 16:02:50 2024 +0000 Revert "kobject: Remove redundant checks for whether ktype is NULL" This reverts commit 1b28cb81dab7c1eedc6034206f4e8d644046ad31. It is reported to cause problems, so revert it for now until the root cause can be found. Reported-by: kernel test robot Fixes: 1b28cb81dab7 ("kobject: Remove redundant checks for whether ktype is NULL") Cc: Zhen Lei Closes: https://lore.kernel.org/oe-lkp/202402071403.e302e33a-oliver.sang@intel.com Link: https://lore.kernel.org/r/2024020849-consensus-length-6264@gregkh Signed-off-by: Greg Kroah-Hartman commit 9efd24ec5599ed485b7c4d9aeb731141f6285167 Author: Li zeming Date: Tue Sep 19 09:28:23 2023 +0800 kprobes: Remove unnecessary initial values of variables ri and sym is assigned first, so it does not need to initialize the assignment. Link: https://lore.kernel.org/all/20230919012823.7815-1-zeming@nfschina.com/ Signed-off-by: Li zeming Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit 9a571c1e275cedacd48c66a6bddd0c23f1dffdbf Author: Masami Hiramatsu (Google) Date: Wed Jan 24 00:03:02 2024 +0900 tracing/probes: Fix to set arg size and fmt after setting type from BTF Since the BTF type setting updates probe_arg::type, the type size calculation and setting print-fmt should be done after that. Without this fix, the argument size and print-fmt can be wrong. Link: https://lore.kernel.org/all/170602218196.215583.6417859469540955777.stgit@devnote2/ Fixes: b576e09701c7 ("tracing/probes: Support function parameters if BTF is available") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) commit 8c427cc2fa73684ea140999e121b7b6c1c717632 Author: Masami Hiramatsu (Google) Date: Wed Jan 24 00:02:34 2024 +0900 tracing/probes: Fix to show a parse error for bad type for $comm Fix to show a parse error for bad type (non-string) for $comm/$COMM and immediate-string. With this fix, error_log file shows appropriate error message as below. /sys/kernel/tracing # echo 'p vfs_read $comm:u32' >> kprobe_events sh: write error: Invalid argument /sys/kernel/tracing # echo 'p vfs_read \"hoge":u32' >> kprobe_events sh: write error: Invalid argument /sys/kernel/tracing # cat error_log [ 30.144183] trace_kprobe: error: $comm and immediate-string only accepts string type Command: p vfs_read $comm:u32 ^ [ 62.618500] trace_kprobe: error: $comm and immediate-string only accepts string type Command: p vfs_read \"hoge":u32 ^ Link: https://lore.kernel.org/all/170602215411.215583.2238016352271091852.stgit@devnote2/ Fixes: 3dd1f7f24f8c ("tracing: probeevent: Fix to make the type of $comm string") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) commit d7332c4a4f1a7d16f054c6357fb65c597b6a86a7 Author: Ranjani Sridharan Date: Thu Feb 8 15:34:32 2024 +0200 ASoC: SOF: ipc3-topology: Fix pipeline tear down logic With the change in the widget free logic to power down the cores only when the scheduler widgets are freed, we need to ensure that the scheduler widget is freed only after all the widgets associated with the scheduler are freed. This is to ensure that the secondary core that the scheduler is scheduled to run on is kept powered on until all widgets that need them are in use. While this works well for dynamic pipelines, in the case of static pipelines the current logic does not take this into account and frees all widgets in the order they occur in the widget_list. So, modify this to ensure that the scheduler widgets are freed only after all other types of widgets in the widget_list are freed. Link: https://github.com/thesofproject/linux/issues/4807 Fixes: 31ed8da1c8e5 ("ASoC: SOF: sof-audio: Modify logic for enabling/disabling topology cores") Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20240208133432.1688-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit c14f09f010cc569ae7e2f6ef02374f6bfef9917e Author: Richard Fitzgerald Date: Thu Feb 8 12:37:42 2024 +0000 ASoC: cs35l56: Fix deadlock in ASP1 mixer register initialization Rewrite the handling of ASP1 TX mixer mux initialization to prevent a deadlock during component_remove(). The firmware can overwrite the ASP1 TX mixer registers with system-specific settings. This is mainly for hardware that uses the ASP as a chip-to-chip link controlled by the firmware. Because of this the driver cannot know the starting state of the ASP1 mixer muxes until the firmware has been downloaded and rebooted. The original workaround for this was to queue a work function from the dsp_work() job. This work then read the register values (populating the regmap cache the first time around) and then called snd_soc_dapm_mux_update_power(). The problem with this is that it was ultimately triggered by cs35l56_component_probe() queueing dsp_work, which meant that it would be running in parallel with the rest of the ASoC component and card initialization. To prevent accessing DAPM before it was fully initialized the work function took the card mutex. But this would deadlock if cs35l56_component_remove() was called before the work job had completed, because ASoC calls component_remove() with the card mutex held. This new version removes the work function. Instead the regmap cache and DAPM mux widgets are initialized the first time any of the associated ALSA controls is read or written. Signed-off-by: Richard Fitzgerald Fixes: 07f7d6e7a124 ("ASoC: cs35l56: Fix for initializing ASP1 mixer registers") Link: https://lore.kernel.org/r/20240208123742.1278104-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit b7198383ef2debe748118996f627452281cf27d7 Author: Emmanuel Grumbach Date: Tue Feb 6 18:02:04 2024 +0200 wifi: iwlwifi: mvm: fix a crash when we run out of stations A DoS tool that injects loads of authentication frames made our AP crash. The iwl_mvm_is_dup() function couldn't find the per-queue dup_data which was not allocated. The root cause for that is that we ran out of stations in the firmware and we didn't really add the station to the firmware, yet we didn't return an error to mac80211. Mac80211 was thinking that we have the station and because of that, sta_info::uploaded was set to 1. This allowed ieee80211_find_sta_by_ifaddr() to return a valid station object, but that ieee80211_sta didn't have any iwl_mvm_sta object initialized and that caused the crash mentioned earlier when we got Rx on that station. Cc: stable@vger.kernel.org Fixes: 57974a55d995 ("wifi: iwlwifi: mvm: refactor iwl_mvm_mac_sta_state_common()") Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240206175739.1f76c44b2486.I6a00955e2842f15f0a089db2f834adb9d10fbe35@changeid Signed-off-by: Johannes Berg commit 65c6ee90455053cfd3067c17aaa4a42b0c766543 Author: Dan Carpenter Date: Thu Feb 8 13:17:31 2024 +0300 wifi: iwlwifi: uninitialized variable in iwl_acpi_get_ppag_table() This is an error path and Smatch complains that "tbl_rev" is uninitialized on this path. All the other functions follow this same patter where they set the error code and goto out_free so that's probably what was intended here as well. Fixes: e8e10a37c51c ("iwlwifi: acpi: move ppag code from mvm to fw/acpi") Signed-off-by: Dan Carpenter Link: https://msgid.link/09900c01-6540-4a32-9451-563da0029cb6@moroto.mountain Signed-off-by: Johannes Berg commit c6ebb5b67641994de8bc486b33457fe0b681d6fe Author: Dan Carpenter Date: Thu Feb 8 13:17:06 2024 +0300 wifi: iwlwifi: Fix some error codes This saves the error as PTR_ERR(wifi_pkg). The problem is that "wifi_pkg" is a valid pointer, not an error pointer. Set the error code to -EINVAL instead. Fixes: 2a8084147bff ("iwlwifi: acpi: support reading and storing WRDS revision 1 and 2") Signed-off-by: Dan Carpenter Link: https://msgid.link/9620bb77-2d7c-4d76-b255-ad824ebf8e35@moroto.mountain Signed-off-by: Johannes Berg commit 3012477cd510044d346c5e0465ead4732aef8349 Author: Miri Korenblit Date: Mon Feb 5 00:06:16 2024 +0200 wifi: iwlwifi: clear link_id in time_event Before sending a SESSION PROTECTION cmd the driver checks if the link_id indicated in the time event (and for which the cmd will be sent) is valid and exists. Clear the te_data::link_id when FW notifies that a session protection ended, so the check will actually fail when it should. Fixes: 135065837310 ("wifi: iwlwifi: support link_id in SESSION_PROTECTION cmd") Signed-off-by: Miri Korenblit Link: https://msgid.link/20240204235836.c64a6b3606c2.I35cdc08e8a3be282563163690f8ca3edb51a3854@changeid Signed-off-by: Johannes Berg commit 2e57b77583ca34fdb6e14f253172636c52f81cf2 Author: Daniel Gabay Date: Mon Feb 5 00:06:03 2024 +0200 wifi: iwlwifi: mvm: use correct address 3 in A-MSDU As described in IEEE sta 802.11-2020, table 9-30 (Address field contents), A-MSDU address 3 should contain the BSSID address. In TX_CMD we copy the MAC header from skb, and skb address 3 holds the destination address, but it may not be identical to the BSSID. Using the wrong destination address appears to work with (most) receivers without MLO, but in MLO some devices are checking for it carefully, perhaps as a consequence of link to MLD address translation. Replace address 3 in the TX_CMD MAC header with the correct address while retaining the skb address 3 unchanged. This ensures that skb address 3 will be utilized later for constructing the A-MSDU subframes. Note that we fill in the MLD address, but the firmware will do the necessary translation to link address after encryption. Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit Link: https://msgid.link/20240204235836.4583a1bf9188.I3f8e7892bdf8f86b4daa28453771a8c9817b2416@changeid Signed-off-by: Johannes Berg commit c98d8836b817d11fdff4ca7749cbbe04ff7f0c64 Author: Johannes Berg Date: Wed Jan 31 16:49:10 2024 +0100 wifi: mac80211: reload info pointer in ieee80211_tx_dequeue() This pointer can change here since the SKB can change, so we actually later open-coded IEEE80211_SKB_CB() again. Reload the pointer where needed, so the monitor-mode case using it gets fixed, and then use info-> later as well. Cc: stable@vger.kernel.org Fixes: 531682159092 ("mac80211: fix VLAN handling with TXQs") Link: https://msgid.link/20240131164910.b54c28d583bc.I29450cec84ea6773cff5d9c16ff92b836c331471@changeid Signed-off-by: Johannes Berg commit 63e4b9d693e0f8c28359c7ea81e1ee510864c37b Merge: 2fe8a236436fe 5a8cdf6fd860a Author: Paolo Abeni Date: Thu Feb 8 12:56:39 2024 +0100 Merge tag 'nf-24-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Narrow down target/match revision to u8 in nft_compat. 2) Bail out with unused flags in nft_compat. 3) Restrict layer 4 protocol to u16 in nft_compat. 4) Remove static in pipapo get command that slipped through when reducing set memory footprint. 5) Follow up incremental fix for the ipset performance regression, this includes the missing gc cancellation, from Jozsef Kadlecsik. 6) Allow to filter by zone 0 in ctnetlink, do not interpret zone 0 as no filtering, from Felix Huettner. 7) Reject direction for NFT_CT_ID. 8) Use timestamp to check for set element expiration while transaction is handled to prevent garbage collection from removing set elements that were just added by this transaction. Packet path and netlink dump/get path still use current time to check for expiration. 9) Restore NF_REPEAT in nfnetlink_queue, from Florian Westphal. 10) map_index needs to be percpu and per-set, not just percpu. At this time its possible for a pipapo set to fill the all-zero part with ones and take the 'might have bits set' as 'start-from-zero' area. From Florian Westphal. This includes three patches: - Change scratchpad area to a structure that provides space for a per-set-and-cpu toggle and uses it of the percpu one. - Add a new free helper to prepare for the next patch. - Remove the scratch_aligned pointer and makes AVX2 implementation use the exact same memory addresses for read/store of the matching state. netfilter pull request 24-02-08 * tag 'nf-24-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nft_set_pipapo: remove scratch_aligned pointer netfilter: nft_set_pipapo: add helper to release pcpu scratch area netfilter: nft_set_pipapo: store index in scratch maps netfilter: nft_set_rbtree: skip end interval element from gc netfilter: nfnetlink_queue: un-break NF_REPEAT netfilter: nf_tables: use timestamp to check for set element timeout netfilter: nft_ct: reject direction for ct id netfilter: ctnetlink: fix filtering for zone 0 netfilter: ipset: Missing gc cancellations fixed netfilter: nft_set_pipapo: remove static in nft_pipapo_get() netfilter: nft_compat: restrict match/target protocol to u16 netfilter: nft_compat: reject unused compat flag netfilter: nft_compat: narrow down revision to unsigned 8-bits ==================== Link: https://lore.kernel.org/r/20240208112834.1433-1-pablo@netfilter.org Signed-off-by: Paolo Abeni commit 5a8cdf6fd860ac5e6d08d72edbcecee049a7fec4 Author: Florian Westphal Date: Thu Feb 8 10:31:29 2024 +0100 netfilter: nft_set_pipapo: remove scratch_aligned pointer use ->scratch for both avx2 and the generic implementation. After previous change the scratch->map member is always aligned properly for AVX2, so we can just use scratch->map in AVX2 too. The alignoff delta is stored in the scratchpad so we can reconstruct the correct address to free the area again. Fixes: 7400b063969b ("nft_set_pipapo: Introduce AVX2-based lookup implementation") Reviewed-by: Stefano Brivio Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 47b1c03c3c1a119435480a1e73f27197dc59131d Author: Florian Westphal Date: Wed Feb 7 21:52:47 2024 +0100 netfilter: nft_set_pipapo: add helper to release pcpu scratch area After next patch simple kfree() is not enough anymore, so add a helper for it. Reviewed-by: Stefano Brivio Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 76313d1a4aa9e30d5b43dee5efd8bcd4d8250006 Author: Florian Westphal Date: Wed Feb 7 21:52:46 2024 +0100 netfilter: nft_set_pipapo: store index in scratch maps Pipapo needs a scratchpad area to keep state during matching. This state can be large and thus cannot reside on stack. Each set preallocates percpu areas for this. On each match stage, one scratchpad half starts with all-zero and the other is inited to all-ones. At the end of each stage, the half that starts with all-ones is always zero. Before next field is tested, pointers to the two halves are swapped, i.e. resmap pointer turns into fill pointer and vice versa. After the last field has been processed, pipapo stashes the index toggle in a percpu variable, with assumption that next packet will start with the all-zero half and sets all bits in the other to 1. This isn't reliable. There can be multiple sets and we can't be sure that the upper and lower half of all set scratch map is always in sync (lookups can be conditional), so one set might have swapped, but other might not have been queried. Thus we need to keep the index per-set-and-cpu, just like the scratchpad. Note that this bug fix is incomplete, there is a related issue. avx2 and normal implementation might use slightly different areas of the map array space due to the avx2 alignment requirements, so m->scratch (generic/fallback implementation) and ->scratch_aligned (avx) may partially overlap. scratch and scratch_aligned are not distinct objects, the latter is just the aligned address of the former. After this change, write to scratch_align->map_index may write to scratch->map, so this issue becomes more prominent, we can set to 1 a bit in the supposedly-all-zero area of scratch->map[]. A followup patch will remove the scratch_aligned and makes generic and avx code use the same (aligned) area. Its done in a separate change to ease review. Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Reviewed-by: Stefano Brivio Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 60c0c230c6f046da536d3df8b39a20b9a9fd6af0 Author: Pablo Neira Ayuso Date: Wed Feb 7 18:49:51 2024 +0100 netfilter: nft_set_rbtree: skip end interval element from gc rbtree lazy gc on insert might collect an end interval element that has been just added in this transactions, skip end interval elements that are not yet active. Fixes: f718863aca46 ("netfilter: nft_set_rbtree: fix overlap expiration walk") Cc: stable@vger.kernel.org Reported-by: lonial con Signed-off-by: Pablo Neira Ayuso commit f82777e8ce6c039cdcacbcf1eb8619b99a20c06d Author: Florian Westphal Date: Tue Feb 6 17:54:18 2024 +0100 netfilter: nfnetlink_queue: un-break NF_REPEAT Only override userspace verdict if the ct hook returns something other than ACCEPT. Else, this replaces NF_REPEAT (run all hooks again) with NF_ACCEPT (move to next hook). Fixes: 6291b3a67ad5 ("netfilter: conntrack: convert nf_conntrack_update to netfilter verdicts") Reported-by: l.6diay@passmail.com Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 7395dfacfff65e9938ac0889dafa1ab01e987d15 Author: Pablo Neira Ayuso Date: Tue Feb 6 00:11:40 2024 +0100 netfilter: nf_tables: use timestamp to check for set element timeout Add a timestamp field at the beginning of the transaction, store it in the nftables per-netns area. Update set backend .insert, .deactivate and sync gc path to use the timestamp, this avoids that an element expires while control plane transaction is still unfinished. .lookup and .update, which are used from packet path, still use the current time to check if the element has expired. And .get path and dump also since this runs lockless under rcu read size lock. Then, there is async gc which also needs to check the current time since it runs asynchronously from a workqueue. Fixes: c3e1b005ed1c ("netfilter: nf_tables: add set element timeout support") Signed-off-by: Pablo Neira Ayuso commit 38ed1c7062ada30d7c11e7a7acc749bf27aa14aa Author: Pablo Neira Ayuso Date: Mon Feb 5 14:59:24 2024 +0100 netfilter: nft_ct: reject direction for ct id Direction attribute is ignored, reject it in case this ever needs to be supported Fixes: 3087c3f7c23b ("netfilter: nft_ct: Add ct id support") Signed-off-by: Pablo Neira Ayuso commit fa173a1b4e3fd1ab5451cbc57de6fc624c824b0a Author: Felix Huettner Date: Mon Feb 5 09:59:59 2024 +0000 netfilter: ctnetlink: fix filtering for zone 0 previously filtering for the default zone would actually skip the zone filter and flush all zones. Fixes: eff3c558bb7e ("netfilter: ctnetlink: support filtering by zone") Reported-by: Ilya Maximets Closes: https://lore.kernel.org/netdev/2032238f-31ac-4106-8f22-522e76df5a12@ovn.org/ Signed-off-by: Felix Huettner Signed-off-by: Pablo Neira Ayuso commit 2fe8a236436fe40d8d26a1af8d150fc80f04ee1a Author: Alexandra Winter Date: Tue Feb 6 09:58:49 2024 +0100 s390/qeth: Fix potential loss of L3-IP@ in case of network issues Symptom: In case of a bad cable connection (e.g. dirty optics) a fast sequence of network DOWN-UP-DOWN-UP could happen. UP triggers recovery of the qeth interface. In case of a second DOWN while recovery is still ongoing, it can happen that the IP@ of a Layer3 qeth interface is lost and will not be recovered by the second UP. Problem: When registration of IP addresses with Layer 3 qeth devices fails, (e.g. because of bad address format) the respective IP address is deleted from its hash-table in the driver. If registration fails because of a ENETDOWN condition, the address should stay in the hashtable, so a subsequent recovery can restore it. 3caa4af834df ("qeth: keep ip-address after LAN_OFFLINE failure") fixes this for registration failures during normal operation, but not during recovery. Solution: Keep L3-IP address in case of ENETDOWN in qeth_l3_recover_ip(). For consistency with qeth_l3_add_ip() we also keep it in case of EADDRINUSE, i.e. for some reason the card already/still has this address registered. Fixes: 4a71df50047f ("qeth: new qeth device driver") Cc: stable@vger.kernel.org Signed-off-by: Alexandra Winter Link: https://lore.kernel.org/r/20240206085849.2902775-1-wintera@linux.ibm.com Signed-off-by: Paolo Abeni commit 27c5a095e2518975e20a10102908ae8231699879 Author: Jozsef Kadlecsik Date: Sun Feb 4 16:26:42 2024 +0100 netfilter: ipset: Missing gc cancellations fixed The patch fdb8e12cc2cc ("netfilter: ipset: fix performance regression in swap operation") missed to add the calls to gc cancellations at the error path of create operations and at module unload. Also, because the half of the destroy operations now executed by a function registered by call_rcu(), neither NFNL_SUBSYS_IPSET mutex or rcu read lock is held and therefore the checking of them results false warnings. Fixes: 97f7cf1cd80e ("netfilter: ipset: fix performance regression in swap operation") Reported-by: syzbot+52bbc0ad036f6f0d4a25@syzkaller.appspotmail.com Reported-by: Brad Spengler Reported-by: Стас Ничипорович Tested-by: Brad Spengler Tested-by: Стас Ничипорович Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit db010ff6700f24f96e91ed56ca29cb69335008ef Author: Ratheesh Kannoth Date: Tue Feb 6 08:10:00 2024 +0530 octeontx2-af: Initialize maps. kmalloc_array() without __GFP_ZERO flag does not initialize memory to zero. This causes issues. Use kcalloc() for maps and bitmap_zalloc() for bitmaps. Fixes: dd7842878633 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs") Signed-off-by: Ratheesh Kannoth Reviewed-by: Brett Creeley Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240206024000.1070260-1-rkannoth@marvell.com Signed-off-by: Paolo Abeni commit 03fa49a386b298d357b90c9c5599f8d00dfc425c Merge: 335bac1daae3f bc4ce46b1e3d1 Author: Paolo Abeni Date: Thu Feb 8 11:33:22 2024 +0100 Merge branch 'cpsw-enable-mac_managed_pm-to-fix-mdio' Sinthu Raja says: ==================== CPSW: enable mac_managed_pm to fix mdio This patch fix the resume/suspend issue on CPSW interface. Reference from the foloowing patchwork: https://lore.kernel.org/netdev/20221014144729.1159257-2-shenwei.wang@nxp.com/T/ V1: https://patchwork.kernel.org/project/netdevbpf/patch/20240122083414.6246-1-sinthu.raja@ti.com/ V2: https://patchwork.kernel.org/project/netdevbpf/patch/20240122093326.7618-1-sinthu.raja@ti.com/ ==================== Link: https://lore.kernel.org/r/20240206005928.15703-1-sinthu.raja@ti.com Signed-off-by: Paolo Abeni commit bc4ce46b1e3d1da4309405cd4afc7c0fcddd0b90 Author: Sinthu Raja Date: Tue Feb 6 06:29:28 2024 +0530 net: ethernet: ti: cpsw: enable mac_managed_pm to fix mdio The below commit introduced a WARN when phy state is not in the states: PHY_HALTED, PHY_READY and PHY_UP. commit 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state") When cpsw resumes, there have port in PHY_NOLINK state, so the below warning comes out. Set mac_managed_pm be true to tell mdio that the phy resume/suspend is managed by the mac, to fix the following warning: WARNING: CPU: 0 PID: 965 at drivers/net/phy/phy_device.c:326 mdio_bus_phy_resume+0x140/0x144 CPU: 0 PID: 965 Comm: sh Tainted: G O 6.1.46-g247b2535b2 #1 Hardware name: Generic AM33XX (Flattened Device Tree) unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x24/0x2c dump_stack_lvl from __warn+0x84/0x15c __warn from warn_slowpath_fmt+0x1a8/0x1c8 warn_slowpath_fmt from mdio_bus_phy_resume+0x140/0x144 mdio_bus_phy_resume from dpm_run_callback+0x3c/0x140 dpm_run_callback from device_resume+0xb8/0x2b8 device_resume from dpm_resume+0x144/0x314 dpm_resume from dpm_resume_end+0x14/0x20 dpm_resume_end from suspend_devices_and_enter+0xd0/0x924 suspend_devices_and_enter from pm_suspend+0x2e0/0x33c pm_suspend from state_store+0x74/0xd0 state_store from kernfs_fop_write_iter+0x104/0x1ec kernfs_fop_write_iter from vfs_write+0x1b8/0x358 vfs_write from ksys_write+0x78/0xf8 ksys_write from ret_fast_syscall+0x0/0x54 Exception stack(0xe094dfa8 to 0xe094dff0) dfa0: 00000004 005c3fb8 00000001 005c3fb8 00000004 00000001 dfc0: 00000004 005c3fb8 b6f6bba0 00000004 00000004 0059edb8 00000000 00000000 dfe0: 00000004 bed918f0 b6f09bd3 b6e89a66 Cc: # v6.0+ Fixes: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state") Fixes: fba863b81604 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM") Signed-off-by: Sinthu Raja Signed-off-by: Paolo Abeni commit 9def04e759caa5a3d741891037ae99f81e2fff01 Author: Sinthu Raja Date: Tue Feb 6 06:29:27 2024 +0530 net: ethernet: ti: cpsw_new: enable mac_managed_pm to fix mdio The below commit introduced a WARN when phy state is not in the states: PHY_HALTED, PHY_READY and PHY_UP. commit 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state") When cpsw_new resumes, there have port in PHY_NOLINK state, so the below warning comes out. Set mac_managed_pm be true to tell mdio that the phy resume/suspend is managed by the mac, to fix the following warning: WARNING: CPU: 0 PID: 965 at drivers/net/phy/phy_device.c:326 mdio_bus_phy_resume+0x140/0x144 CPU: 0 PID: 965 Comm: sh Tainted: G O 6.1.46-g247b2535b2 #1 Hardware name: Generic AM33XX (Flattened Device Tree) unwind_backtrace from show_stack+0x18/0x1c show_stack from dump_stack_lvl+0x24/0x2c dump_stack_lvl from __warn+0x84/0x15c __warn from warn_slowpath_fmt+0x1a8/0x1c8 warn_slowpath_fmt from mdio_bus_phy_resume+0x140/0x144 mdio_bus_phy_resume from dpm_run_callback+0x3c/0x140 dpm_run_callback from device_resume+0xb8/0x2b8 device_resume from dpm_resume+0x144/0x314 dpm_resume from dpm_resume_end+0x14/0x20 dpm_resume_end from suspend_devices_and_enter+0xd0/0x924 suspend_devices_and_enter from pm_suspend+0x2e0/0x33c pm_suspend from state_store+0x74/0xd0 state_store from kernfs_fop_write_iter+0x104/0x1ec kernfs_fop_write_iter from vfs_write+0x1b8/0x358 vfs_write from ksys_write+0x78/0xf8 ksys_write from ret_fast_syscall+0x0/0x54 Exception stack(0xe094dfa8 to 0xe094dff0) dfa0: 00000004 005c3fb8 00000001 005c3fb8 00000004 00000001 dfc0: 00000004 005c3fb8 b6f6bba0 00000004 00000004 0059edb8 00000000 00000000 dfe0: 00000004 bed918f0 b6f09bd3 b6e89a66 Cc: # v6.0+ Fixes: 744d23c71af3 ("net: phy: Warn about incorrect mdio_bus_phy_resume() state") Fixes: fba863b81604 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM") Signed-off-by: Sinthu Raja Signed-off-by: Paolo Abeni commit 2526dffc6d65cffa32b88556bd68e4e72e889a55 Author: Bartosz Golaszewski Date: Mon Feb 5 11:22:29 2024 +0100 gpio: remove GPIO device from the list unconditionally in error path Since commit 48e1b4d369cf ("gpiolib: remove the GPIO device from the list when it's unregistered") we remove the GPIO device entry from the global list (used to order devices by their GPIO ranges) when unregistering the chip, not when releasing the device. It will not happen when the last reference is put anymore. This means, we need to remove it in error path in gpiochip_add_data_with_key() unconditionally, without checking if the device's .release() callback is set. Fixes: 48e1b4d369cf ("gpiolib: remove the GPIO device from the list when it's unregistered") Signed-off-by: Bartosz Golaszewski commit ab0beafd52b98dfb8b8244b2c6794efbc87478db Author: Pablo Neira Ayuso Date: Fri Feb 2 10:09:34 2024 +0100 netfilter: nft_set_pipapo: remove static in nft_pipapo_get() This has slipped through when reducing memory footprint for set elements, remove it. Fixes: 9dad402b89e8 ("netfilter: nf_tables: expose opaque set element as struct nft_elem_priv") Reported-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit bf4c27b8267d7848bb81fd41e6aa07aa662f07fb Author: Matthew Brost Date: Mon Feb 5 20:50:10 2024 -0800 drm/xe: Remove TEST_VM_ASYNC_OPS_ERROR TEST_VM_ASYNC_OPS_ERROR is broken and unused. Remove for now and will pull back in a later time when it is used, fixed, and properly hidden behind a Kconfig option. Also fixup the supported flags value. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20240206045010.2981051-1-matthew.brost@intel.com (cherry picked from commit d9890c028d66a9e1ee3cccaa081ab5aedcbfe431) Signed-off-by: Thomas Hellström commit 9e3fc1d65d4e8cf302e289847ab165ad9358fdb2 Author: Matthew Auld Date: Fri Feb 2 17:14:36 2024 +0000 drm/xe/vm: don't ignore error when in_kthread If GUP fails and we are in_kthread, we can have pinned = 0 and ret = 0. If that happens we call sg_alloc_append_table_from_pages() with n_pages = 0, which is not well behaved and can trigger: kernel BUG at include/linux/scatterlist.h:115! depending on if the pages array happens to be zeroed or not. Even if we don't hit that it crashes later when trying to dma_map the returned table. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240202171435.427630-2-matthew.auld@intel.com (cherry picked from commit 8087199cd5951c1eba26003b3e4296dbb2110adf) Signed-off-by: Thomas Hellström commit 95c058c8ef1d5d9e39ab2039a5eea4d5b93f4117 Author: Matthew Brost Date: Mon Feb 5 15:17:14 2024 -0800 drm/xe: Assume large page size if VMA not yet bound The calculation to determine max page size of a VMA during a REMAP operations assumes the VMA has been bound. This assumption is not true if the VMA is from an eariler operation in an array of binds. If a VMA has not been bound use the maximum page size which will ensure the previous / next REMAP operations are not incorrectly skipped. Fixes: 8f33b4f054fc ("drm/xe: Avoid doing rebinds") Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240205231714.2956225-1-matthew.brost@intel.com (cherry picked from commit 5ad6af5c91e9b942c44b657122270d935db3a813) Signed-off-by: Thomas Hellström commit 11572b3f68d9933fef5c1afef4c20041701d8025 Author: Xiaoming Wang Date: Fri Feb 2 13:56:58 2024 -0800 drm/xe/display: Fix memleak in display initialization intel_power_domains_init is called twice in xe_device_probe: 1) intel_power_domains_init() xe_display_init_nommio() xe_device_probe() 2) intel_power_domains_init() intel_display_driver_probe_noirq() xe_display_init_noirq() xe_device_probe() It needs remove one to avoid power_domains->power_wells double malloc. unreferenced object 0xffff88811150ee00 (size 512): comm "systemd-udevd", pid 506, jiffies 4294674198 (age 3605.560s) hex dump (first 32 bytes): 10 b4 9d a0 ff ff ff ff ff ff ff ff ff ff ff ff ................ ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [] __kmem_cache_alloc_node+0x1c1/0x2b0 [] __kmalloc+0x52/0x150 [] __set_power_wells+0xc3/0x360 [xe] [] xe_display_init_nommio+0x4c/0x70 [xe] [] xe_device_probe+0x3c/0x5a0 [xe] [] xe_pci_probe+0x33f/0x5a0 [xe] [] local_pci_probe+0x47/0xa0 [] pci_device_probe+0xc3/0x1f0 [] really_probe+0x1a2/0x410 [] __driver_probe_device+0x78/0x160 [] driver_probe_device+0x1e/0x90 [] __driver_attach+0xda/0x1d0 [] bus_for_each_dev+0x7c/0xd0 [] bus_add_driver+0x119/0x220 [] driver_register+0x60/0x120 [] 0xffffffffa05e50a0 The call to intel_power_domains_cleanup() needs to stay where it is for now. The main issue is that while the init is called by the display side, shared by i915 and xe, the cleanup is called by a non-shared code path. Fixing that will be done as a separate commit. Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Signed-off-by: Xiaoming Wang [ reword commit message and explain why the fini needs to stay where it is ] Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240202215658.561298-1-lucas.demarchi@intel.com (cherry picked from commit 86c99abb5f1b6fcd69fb268eeb2e34cb7c4f355c) Signed-off-by: Thomas Hellström commit 3aa3c5c249086ffc920e8f6d6a15bdd441153d45 Author: Matthew Brost Date: Thu Feb 1 19:34:40 2024 -0800 drm/xe: Map both mem.kernel_bb_pool and usm.bb_pool For integrated devices we need to map both mem.kernel_bb_pool and usm.bb_pool to be able to run batches from both pools. Fixes: a682b6a42d4d ("drm/xe: Support device page faults on integrated platforms") Tested-by: Brian Welty Signed-off-by: Matthew Brost Reviewed-by: Brian Welty Link: https://patchwork.freedesktop.org/patch/msgid/20240202033440.2351862-1-matthew.brost@intel.com (cherry picked from commit 72f86ed3c88933d6fa09b036de93621ea71097a7) Signed-off-by: Thomas Hellström commit 90773aaf9129ea6f47915bd3c47da261abe6a447 Author: Arnd Bergmann Date: Wed Jan 3 12:48:02 2024 +0100 drm/xe: circumvent bogus stringop-overflow warning gcc-13 warns about an array overflow that it sees but that is prevented by the "asid % NUM_PF_QUEUE" calculation: drivers/gpu/drm/xe/xe_gt_pagefault.c: In function 'xe_guc_pagefault_handler': include/linux/fortify-string.h:57:33: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=] include/linux/fortify-string.h:689:26: note: in expansion of macro '__fortify_memcpy_chk' 689 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/xe/xe_gt_pagefault.c:341:17: note: in expansion of macro 'memcpy' 341 | memcpy(pf_queue->data + pf_queue->tail, msg, len * sizeof(u32)); | ^~~~~~ drivers/gpu/drm/xe/xe_gt_types.h:102:25: note: at offset [1144, 265324] into destination object 'tile' of size 8 I found that rewriting the assignment using pointer addition rather than the equivalent array index calculation prevents the warning, so use that instead. I sent a bug report against gcc for the false positive warning. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113214 Signed-off-by: Arnd Bergmann Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240103114819.2913937-1-arnd@kernel.org (cherry picked from commit 774ef5dfc95578a9079426d5106076dcd59c4dfa) Signed-off-by: Thomas Hellström commit 21abf108a062fa0323077b5ba3d26e2c0bba9232 Author: Matthew Brost Date: Wed Jan 31 16:48:49 2024 -0800 drm/xe: Pick correct userptr VMA to repin on REMAP op failure A REMAP op is composed of 3 VMA's - unmap, prev map, and next map. When op_execute fails with -EAGAIN we need to update the local VMA pointer to the current op state and then repin the VMA if it is a userptr. Fixes a failure seen in xe_vm.munmap-style-unbind-userptr-one-partial. Fixes: b06d47be7c83 ("drm/xe: Port Xe to GPUVA") Signed-off-by: Matthew Brost Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20240201004849.2219558-3-matthew.brost@intel.com (cherry picked from commit 447f74d223b4f6cbab74963bf1099050c15374ce) Signed-off-by: Thomas Hellström commit fc29b6d5ab5395dcb9f35de71e0347f3a6bca542 Author: Matthew Brost Date: Wed Jan 31 16:48:48 2024 -0800 drm/xe: Take a reference in xe_exec_queue_last_fence_get() Take a reference in xe_exec_queue_last_fence_get(). Also fix a reference counting underflow bug VM bind and unbind. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Matthew Brost Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20240201004849.2219558-2-matthew.brost@intel.com (cherry picked from commit a856b67a84169e065ebbeee50258936b1eacc9eb) Signed-off-by: Thomas Hellström commit ddc7d4c584704666fe7088bbd9ec2d72d0f63e65 Author: Matthew Brost Date: Thu Feb 1 09:55:32 2024 -0800 drm/xe: Fix loop in vm_bind_ioctl_ops_unwind The logic for the unwind loop is incorrect resulting in an infinite loop. Fix to unwind to go from the last operations list to he first. Fixes: 617eebb9c480 ("drm/xe: Fix array of binds") Signed-off-by: Matthew Brost Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20240201175532.2303168-1-matthew.brost@intel.com (cherry picked from commit 3acc1ff1a72fce00cdbd3ef1c27108a967fd5616) Signed-off-by: Thomas Hellström commit 855678ed8534518e2b428bcbcec695de9ba248e8 Author: Yu Kuai Date: Thu Feb 1 17:25:51 2024 +0800 md: Fix missing release of 'active_io' for flush submit_flushes atomic_set(&mddev->flush_pending, 1); rdev_for_each_rcu(rdev, mddev) atomic_inc(&mddev->flush_pending); bi->bi_end_io = md_end_flush submit_bio(bi); /* flush io is done first */ md_end_flush if (atomic_dec_and_test(&mddev->flush_pending)) percpu_ref_put(&mddev->active_io) -> active_io is not released if (atomic_dec_and_test(&mddev->flush_pending)) -> missing release of active_io For consequence, mddev_suspend() will wait for 'active_io' to be zero forever. Fix this problem by releasing 'active_io' in submit_flushes() if 'flush_pending' is decreased to zero. Fixes: fa2bbff7b0b4 ("md: synchronize flush io with array reconfiguration") Cc: stable@vger.kernel.org # v6.1+ Reported-by: Blazej Kucman Closes: https://lore.kernel.org/lkml/20240130172524.0000417b@linux.intel.com/ Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240201092559.910982-7-yukuai1@huaweicloud.com commit 047371968ffc470769f541d6933e262dc7085456 Merge: 860d7dcb20105 24c890dd712f6 Author: Linus Torvalds Date: Thu Feb 8 06:12:14 2024 +0000 Merge tag 'v6.8-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "Fix regressions in cbc and algif_hash, as well as an older NULL-pointer dereference in ccp" * tag 'v6.8-p3' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_hash - Remove bogus SGL free on zero-length error path crypto: cbc - Ensure statesize is zero crypto: ccp - Fix null pointer dereference in __sev_platform_shutdown_locked commit 860d7dcb20105af1fc7228a162886c421296cd86 Merge: 547ab8fc4cb04 ebd4acc0cbeae Author: Linus Torvalds Date: Thu Feb 8 06:08:37 2024 +0000 Merge tag 'percpu-for-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu fix from Dennis Zhou: - fix riscv wrong size passed to local_flush_tlb_range_asid() * tag 'percpu-for-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: riscv: Fix wrong size passed to local_flush_tlb_range_asid() commit 5bc09b397cbf1221f8a8aacb1152650c9195b02b Author: Ryusuke Konishi Date: Sun Feb 4 01:16:45 2024 +0900 nilfs2: fix potential bug in end_buffer_async_write According to a syzbot report, end_buffer_async_write(), which handles the completion of block device writes, may detect abnormal condition of the buffer async_write flag and cause a BUG_ON failure when using nilfs2. Nilfs2 itself does not use end_buffer_async_write(). But, the async_write flag is now used as a marker by commit 7f42ec394156 ("nilfs2: fix issue with race condition of competition between segments for dirty blocks") as a means of resolving double list insertion of dirty blocks in nilfs_lookup_dirty_data_buffers() and nilfs_lookup_node_buffers() and the resulting crash. This modification is safe as long as it is used for file data and b-tree node blocks where the page caches are independent. However, it was irrelevant and redundant to also introduce async_write for segment summary and super root blocks that share buffers with the backing device. This led to the possibility that the BUG_ON check in end_buffer_async_write would fail as described above, if independent writebacks of the backing device occurred in parallel. The use of async_write for segment summary buffers has already been removed in a previous change. Fix this issue by removing the manipulation of the async_write flag for the remaining super root block buffer. Link: https://lkml.kernel.org/r/20240203161645.4992-1-konishi.ryusuke@gmail.com Fixes: 7f42ec394156 ("nilfs2: fix issue with race condition of competition between segments for dirty blocks") Signed-off-by: Ryusuke Konishi Reported-by: syzbot+5c04210f7c7f897c1e7f@syzkaller.appspotmail.com Closes: https://lkml.kernel.org/r/00000000000019a97c05fd42f8c8@google.com Cc: Signed-off-by: Andrew Morton commit b9e4bc1046d20e0623a80660ef8627448056f817 Author: SeongJae Park Date: Fri Feb 2 11:19:56 2024 -0800 mm/damon/sysfs-schemes: fix wrong DAMOS tried regions update timeout setup DAMON sysfs interface's update_schemes_tried_regions command has a timeout of two apply intervals of the DAMOS scheme. Having zero value DAMOS scheme apply interval means it will use the aggregation interval as the value. However, the timeout setup logic is mistakenly using the sampling interval insted of the aggregartion interval for the case. This could cause earlier-than-expected timeout of the command. Fix it. Link: https://lkml.kernel.org/r/20240202191956.88791-1-sj@kernel.org Fixes: 7d6fa31a2fd7 ("mm/damon/sysfs-schemes: add timeout for update_schemes_tried_regions") Signed-off-by: SeongJae Park Cc: # 6.7.x Signed-off-by: Andrew Morton commit 38296afe3c6ee07319e01bb249aa4bb47c07b534 Author: Ryusuke Konishi Date: Wed Jan 31 23:56:57 2024 +0900 nilfs2: fix hang in nilfs_lookup_dirty_data_buffers() Syzbot reported a hang issue in migrate_pages_batch() called by mbind() and nilfs_lookup_dirty_data_buffers() called in the log writer of nilfs2. While migrate_pages_batch() locks a folio and waits for the writeback to complete, the log writer thread that should bring the writeback to completion picks up the folio being written back in nilfs_lookup_dirty_data_buffers() that it calls for subsequent log creation and was trying to lock the folio. Thus causing a deadlock. In the first place, it is unexpected that folios/pages in the middle of writeback will be updated and become dirty. Nilfs2 adds a checksum to verify the validity of the log being written and uses it for recovery at mount, so data changes during writeback are suppressed. Since this is broken, an unclean shutdown could potentially cause recovery to fail. Investigation revealed that the root cause is that the wait for writeback completion in nilfs_page_mkwrite() is conditional, and if the backing device does not require stable writes, data may be modified without waiting. Fix these issues by making nilfs_page_mkwrite() wait for writeback to finish regardless of the stable write requirement of the backing device. Link: https://lkml.kernel.org/r/20240131145657.4209-1-konishi.ryusuke@gmail.com Fixes: 1d1d1a767206 ("mm: only enforce stable page writes if the backing device requires it") Signed-off-by: Ryusuke Konishi Reported-by: syzbot+ee2ae68da3b22d04cd8d@syzkaller.appspotmail.com Closes: https://lkml.kernel.org/r/00000000000047d819061004ad6c@google.com Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 6f1f15a5e492082c8082bea56d87852b65588b5c Author: Leo Yan Date: Thu Feb 1 10:10:08 2024 +0800 MAINTAINERS: Leo Yan has moved I will lose access to my @linaro.org email address next week, update the MAINTAINERS file and map it in .mailmap with the new email address. Link: https://lkml.kernel.org/r/20240201021022.886-1-leo.yan@linux.dev Signed-off-by: Leo Yan Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: James Clark Cc: Mike Leach Cc: Namhyung Kim Signed-off-by: Andrew Morton commit 27d3969b47cc38810b3fd65d72231940e8671e6c Author: Chengming Zhou Date: Sun Jan 28 13:28:49 2024 +0000 mm/zswap: don't return LRU_SKIP if we have dropped lru lock LRU_SKIP can only be returned if we don't ever dropped lru lock, or we need to return LRU_RETRY to restart from the head of lru list. Otherwise, the iteration might continue from a cursor position that was freed while the locks were dropped. Actually we may need to introduce another LRU_STOP to really terminate the ongoing shrinking scan process, when we encounter a warm page already in the swap cache. The current list_lru implementation doesn't have this function to early break from __list_lru_walk_one. Link: https://lkml.kernel.org/r/20240126-zswap-writeback-race-v2-1-b10479847099@bytedance.com Fixes: b5ba474f3f51 ("zswap: shrink zswap pool based on memory pressure") Signed-off-by: Chengming Zhou Acked-by: Johannes Weiner Reviewed-by: Nhat Pham Cc: Chris Li Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 79d72c68c58784a3e1cd2378669d51bfd0cb7498 Author: Oscar Salvador Date: Tue Jan 30 22:04:18 2024 +0100 fs,hugetlb: fix NULL pointer dereference in hugetlbs_fill_super When configuring a hugetlb filesystem via the fsconfig() syscall, there is a possible NULL dereference in hugetlbfs_fill_super() caused by assigning NULL to ctx->hstate in hugetlbfs_parse_param() when the requested pagesize is non valid. E.g: Taking the following steps: fd = fsopen("hugetlbfs", FSOPEN_CLOEXEC); fsconfig(fd, FSCONFIG_SET_STRING, "pagesize", "1024", 0); fsconfig(fd, FSCONFIG_CMD_CREATE, NULL, NULL, 0); Given that the requested "pagesize" is invalid, ctxt->hstate will be replaced with NULL, losing its previous value, and we will print an error: ... ... case Opt_pagesize: ps = memparse(param->string, &rest); ctx->hstate = h; if (!ctx->hstate) { pr_err("Unsupported page size %lu MB\n", ps / SZ_1M); return -EINVAL; } return 0; ... ... This is a problem because later on, we will dereference ctxt->hstate in hugetlbfs_fill_super() ... ... sb->s_blocksize = huge_page_size(ctx->hstate); ... ... Causing below Oops. Fix this by replacing cxt->hstate value only when then pagesize is known to be valid. kernel: hugetlbfs: Unsupported page size 0 MB kernel: BUG: kernel NULL pointer dereference, address: 0000000000000028 kernel: #PF: supervisor read access in kernel mode kernel: #PF: error_code(0x0000) - not-present page kernel: PGD 800000010f66c067 P4D 800000010f66c067 PUD 1b22f8067 PMD 0 kernel: Oops: 0000 [#1] PREEMPT SMP PTI kernel: CPU: 4 PID: 5659 Comm: syscall Tainted: G E 6.8.0-rc2-default+ #22 5a47c3fef76212addcc6eb71344aabc35190ae8f kernel: Hardware name: Intel Corp. GROVEPORT/GROVEPORT, BIOS GVPRCRB1.86B.0016.D04.1705030402 05/03/2017 kernel: RIP: 0010:hugetlbfs_fill_super+0xb4/0x1a0 kernel: Code: 48 8b 3b e8 3e c6 ed ff 48 85 c0 48 89 45 20 0f 84 d6 00 00 00 48 b8 ff ff ff ff ff ff ff 7f 4c 89 e7 49 89 44 24 20 48 8b 03 <8b> 48 28 b8 00 10 00 00 48 d3 e0 49 89 44 24 18 48 8b 03 8b 40 28 kernel: RSP: 0018:ffffbe9960fcbd48 EFLAGS: 00010246 kernel: RAX: 0000000000000000 RBX: ffff9af5272ae780 RCX: 0000000000372004 kernel: RDX: ffffffffffffffff RSI: ffffffffffffffff RDI: ffff9af555e9b000 kernel: RBP: ffff9af52ee66b00 R08: 0000000000000040 R09: 0000000000370004 kernel: R10: ffffbe9960fcbd48 R11: 0000000000000040 R12: ffff9af555e9b000 kernel: R13: ffffffffa66b86c0 R14: ffff9af507d2f400 R15: ffff9af507d2f400 kernel: FS: 00007ffbc0ba4740(0000) GS:ffff9b0bd7000000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000000028 CR3: 00000001b1ee0000 CR4: 00000000001506f0 kernel: Call Trace: kernel: kernel: ? __die_body+0x1a/0x60 kernel: ? page_fault_oops+0x16f/0x4a0 kernel: ? search_bpf_extables+0x65/0x70 kernel: ? fixup_exception+0x22/0x310 kernel: ? exc_page_fault+0x69/0x150 kernel: ? asm_exc_page_fault+0x22/0x30 kernel: ? __pfx_hugetlbfs_fill_super+0x10/0x10 kernel: ? hugetlbfs_fill_super+0xb4/0x1a0 kernel: ? hugetlbfs_fill_super+0x28/0x1a0 kernel: ? __pfx_hugetlbfs_fill_super+0x10/0x10 kernel: vfs_get_super+0x40/0xa0 kernel: ? __pfx_bpf_lsm_capable+0x10/0x10 kernel: vfs_get_tree+0x25/0xd0 kernel: vfs_cmd_create+0x64/0xe0 kernel: __x64_sys_fsconfig+0x395/0x410 kernel: do_syscall_64+0x80/0x160 kernel: ? syscall_exit_to_user_mode+0x82/0x240 kernel: ? do_syscall_64+0x8d/0x160 kernel: ? syscall_exit_to_user_mode+0x82/0x240 kernel: ? do_syscall_64+0x8d/0x160 kernel: ? exc_page_fault+0x69/0x150 kernel: entry_SYSCALL_64_after_hwframe+0x6e/0x76 kernel: RIP: 0033:0x7ffbc0cb87c9 kernel: Code: 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 97 96 0d 00 f7 d8 64 89 01 48 kernel: RSP: 002b:00007ffc29d2f388 EFLAGS: 00000206 ORIG_RAX: 00000000000001af kernel: RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ffbc0cb87c9 kernel: RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000003 kernel: RBP: 00007ffc29d2f3b0 R08: 0000000000000000 R09: 0000000000000000 kernel: R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 kernel: R13: 00007ffc29d2f4c0 R14: 0000000000000000 R15: 0000000000000000 kernel: kernel: Modules linked in: rpcsec_gss_krb5(E) auth_rpcgss(E) nfsv4(E) dns_resolver(E) nfs(E) lockd(E) grace(E) sunrpc(E) netfs(E) af_packet(E) bridge(E) stp(E) llc(E) iscsi_ibft(E) iscsi_boot_sysfs(E) intel_rapl_msr(E) intel_rapl_common(E) iTCO_wdt(E) intel_pmc_bxt(E) sb_edac(E) iTCO_vendor_support(E) x86_pkg_temp_thermal(E) intel_powerclamp(E) coretemp(E) kvm_intel(E) rfkill(E) ipmi_ssif(E) kvm(E) acpi_ipmi(E) irqbypass(E) pcspkr(E) igb(E) ipmi_si(E) mei_me(E) i2c_i801(E) joydev(E) intel_pch_thermal(E) i2c_smbus(E) dca(E) lpc_ich(E) mei(E) ipmi_devintf(E) ipmi_msghandler(E) acpi_pad(E) tiny_power_button(E) button(E) fuse(E) efi_pstore(E) configfs(E) ip_tables(E) x_tables(E) ext4(E) mbcache(E) jbd2(E) hid_generic(E) usbhid(E) sd_mod(E) t10_pi(E) crct10dif_pclmul(E) crc32_pclmul(E) crc32c_intel(E) polyval_clmulni(E) ahci(E) xhci_pci(E) polyval_generic(E) gf128mul(E) ghash_clmulni_intel(E) sha512_ssse3(E) sha256_ssse3(E) xhci_pci_renesas(E) libahci(E) ehci_pci(E) sha1_ssse3(E) xhci_hcd(E) ehci_hcd(E) libata(E) kernel: mgag200(E) i2c_algo_bit(E) usbcore(E) wmi(E) sg(E) dm_multipath(E) dm_mod(E) scsi_dh_rdac(E) scsi_dh_emc(E) scsi_dh_alua(E) scsi_mod(E) scsi_common(E) aesni_intel(E) crypto_simd(E) cryptd(E) kernel: Unloaded tainted modules: acpi_cpufreq(E):1 fjes(E):1 kernel: CR2: 0000000000000028 kernel: ---[ end trace 0000000000000000 ]--- kernel: RIP: 0010:hugetlbfs_fill_super+0xb4/0x1a0 kernel: Code: 48 8b 3b e8 3e c6 ed ff 48 85 c0 48 89 45 20 0f 84 d6 00 00 00 48 b8 ff ff ff ff ff ff ff 7f 4c 89 e7 49 89 44 24 20 48 8b 03 <8b> 48 28 b8 00 10 00 00 48 d3 e0 49 89 44 24 18 48 8b 03 8b 40 28 kernel: RSP: 0018:ffffbe9960fcbd48 EFLAGS: 00010246 kernel: RAX: 0000000000000000 RBX: ffff9af5272ae780 RCX: 0000000000372004 kernel: RDX: ffffffffffffffff RSI: ffffffffffffffff RDI: ffff9af555e9b000 kernel: RBP: ffff9af52ee66b00 R08: 0000000000000040 R09: 0000000000370004 kernel: R10: ffffbe9960fcbd48 R11: 0000000000000040 R12: ffff9af555e9b000 kernel: R13: ffffffffa66b86c0 R14: ffff9af507d2f400 R15: ffff9af507d2f400 kernel: FS: 00007ffbc0ba4740(0000) GS:ffff9b0bd7000000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000000028 CR3: 00000001b1ee0000 CR4: 00000000001506f0 Link: https://lkml.kernel.org/r/20240130210418.3771-1-osalvador@suse.de Fixes: 32021982a324 ("hugetlbfs: Convert to fs_context") Signed-off-by: Michal Hocko Signed-off-by: Oscar Salvador Acked-by: Muchun Song Cc: Signed-off-by: Andrew Morton commit f2076032096775d1bb1af16b6eddbc6534575328 Author: John Moon Date: Wed Jan 31 03:43:18 2024 +0000 mailmap: switch email address for John Moon Add current email address as QUIC email is no longer active. Link: https://lkml.kernel.org/r/20240131034311.46706-1-john@jmoon.dev Signed-off-by: John Moon Acked-by: Trilok Soni Cc: Elliot Berman Signed-off-by: Andrew Morton commit 2e601e1e8e4b330020a346c55ba111d49e0b188e Author: Johannes Weiner Date: Mon Jan 29 20:34:38 2024 -0500 mm: zswap: fix objcg use-after-free in entry destruction In the per-memcg LRU universe, LRU removal uses entry->objcg to determine which list count needs to be decreased. Drop the objcg reference after updating the LRU, to fix a possible use-after-free. Link: https://lkml.kernel.org/r/20240130013438.565167-1-hannes@cmpxchg.org Fixes: a65b0e7607cc ("zswap: make shrinking memcg-aware") Signed-off-by: Johannes Weiner Acked-by: Yosry Ahmed Reviewed-by: Nhat Pham Reviewed-by: Chengming Zhou Signed-off-by: Andrew Morton commit 4c2da3188b848d33c26d7f0f8b14f3150331c923 Author: Sergey Senozhatsky Date: Fri Jan 26 12:25:48 2024 +0900 mm/madvise: don't forget to leave lazy MMU mode in madvise_cold_or_pageout_pte_range() We need to leave lazy MMU mode before unlocking. Link: https://lkml.kernel.org/r/20240126032608.355899-1-senozhatsky@chromium.org Fixes: b2f557a21bc8 ("mm/madvise: add cond_resched() in madvise_cold_or_pageout_pte_range()") Signed-off-by: Sergey Senozhatsky Cc: Jiexun Wang Signed-off-by: Andrew Morton commit e870920bbe68e52335a4c31a059e6af6a9a59dbb Author: Suren Baghdasaryan Date: Mon Jan 22 22:43:05 2024 -0800 arch/arm/mm: fix major fault accounting when retrying under per-VMA lock The change [1] missed ARM architecture when fixing major fault accounting for page fault retry under per-VMA lock. The user-visible effects is that it restores correct major fault accounting that was broken after [2] was merged in 6.7 kernel. The more detailed description is in [3] and this patch simply adds the same fix to ARM architecture which I missed in [3]. Add missing code to fix ARM architecture fault accounting. [1] 46e714c729c8 ("arch/mm/fault: fix major fault accounting when retrying under per-VMA lock") [2] https://lore.kernel.org/all/20231006195318.4087158-6-willy@infradead.org/ [3] https://lore.kernel.org/all/20231226214610.109282-1-surenb@google.com/ Link: https://lkml.kernel.org/r/20240123064305.2829244-1-surenb@google.com Fixes: 12214eba1992 ("mm: handle read faults under the VMA lock") Reported-by: Russell King (Oracle) Signed-off-by: Suren Baghdasaryan Cc: Alexander Gordeev Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Christophe Leroy Cc: Dave Hansen Cc: Gerald Schaefer Cc: Matthew Wilcox (Oracle) Cc: Michael Ellerman Cc: Palmer Dabbelt Cc: Peter Zijlstra Cc: Will Deacon Cc: Signed-off-by: Andrew Morton commit 01c1484ac04790fe27a37f89dd3a350f99646815 Author: Muhammad Usama Anjum Date: Tue Oct 24 20:51:25 2023 +0500 selftests: core: include linux/close_range.h for CLOSE_RANGE_* macros Correct header file is needed for getting CLOSE_RANGE_* macros. Previously it was tested with newer glibc which didn't show the need to include the header which was a mistake. Link: https://lkml.kernel.org/r/20231024155137.219700-1-usama.anjum@collabora.com Fixes: ec54424923cf ("selftests: core: remove duplicate defines") Reported-by: Aishwarya TCV Link: https://lore.kernel.org/all/7161219e-0223-d699-d6f3-81abd9abf13b@arm.com Signed-off-by: Muhammad Usama Anjum Cc: Shuah Khan Signed-off-by: Andrew Morton commit 2fde9e7f9e6dc38e1d7091b9705c22be945c8697 Author: Miaohe Lin Date: Wed Jan 24 16:40:14 2024 +0800 mm/memory-failure: fix crash in split_huge_page_to_list from soft_offline_page When I did soft offline stress test, a machine was observed to crash with the following message: kernel BUG at include/linux/memcontrol.h:554! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 5 PID: 3837 Comm: hwpoison.sh Not tainted 6.7.0-next-20240112-00001-g8ecf3e7fb7c8-dirty #97 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:folio_memcg+0xaf/0xd0 Code: 10 5b 5d c3 cc cc cc cc 48 c7 c6 08 b1 f2 b2 48 89 ef e8 b4 c5 f8 ff 90 0f 0b 48 c7 c6 d0 b0 f2 b2 48 89 ef e8 a2 c5 f8 ff 90 <0f> 0b 48 c7 c6 08 b1 f2 b2 48 89 ef e8 90 c5 f8 ff 90 0f 0b 66 66 RSP: 0018:ffffb6c043657c98 EFLAGS: 00000296 RAX: 000000000000004b RBX: ffff932bc1d1e401 RCX: ffff933abfb5c908 RDX: 0000000000000000 RSI: 0000000000000027 RDI: ffff933abfb5c900 RBP: ffffea6f04019080 R08: ffffffffb3338ce8 R09: 0000000000009ffb R10: 00000000000004dd R11: ffffffffb3308d00 R12: ffffea6f04019080 R13: ffffea6f04019080 R14: 0000000000000001 R15: ffffb6c043657da0 FS: 00007f6c60f6b740(0000) GS:ffff933abfb40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000559c3bc8b980 CR3: 0000000107f1c000 CR4: 00000000000006f0 Call Trace: split_huge_page_to_list+0x4d/0x1380 try_to_split_thp_page+0x3a/0xf0 soft_offline_page+0x1ea/0x8a0 soft_offline_page_store+0x52/0x90 kernfs_fop_write_iter+0x118/0x1b0 vfs_write+0x30b/0x430 ksys_write+0x5e/0xe0 do_syscall_64+0xb0/0x1b0 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7f6c60d14697 Code: 10 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 RSP: 002b:00007ffe9b72b8d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000000c RCX: 00007f6c60d14697 RDX: 000000000000000c RSI: 0000559c3bc8b980 RDI: 0000000000000001 RBP: 0000559c3bc8b980 R08: 00007f6c60dd1460 R09: 000000007fffffff R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000c R13: 00007f6c60e1a780 R14: 00007f6c60e16600 R15: 00007f6c60e15a00 The problem is that page->mapping is overloaded with slab->slab_list or slabs fields now, so slab pages could be taken as non-LRU movable pages if field slabs contains PAGE_MAPPING_MOVABLE or slab_list->prev is set to LIST_POISON2. These slab pages will be treated as thp later leading to crash in split_huge_page_to_list(). Link: https://lkml.kernel.org/r/20240126065837.2100184-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20240124084014.1772906-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Fixes: 130d4df57390 ("mm/sl[au]b: rearrange struct slab fields to allow larger rcu_head") Reviewed-by: Matthew Wilcox (Oracle) Cc: Miaohe Lin Cc: Naoya Horiguchi Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 9cee7e8ef3e31ca25b40ca52b8585dc6935deff2 Author: Yosry Ahmed Date: Wed Jan 24 10:00:22 2024 +0000 mm: memcg: optimize parent iteration in memcg_rstat_updated() In memcg_rstat_updated(), we iterate the memcg being updated and its parents to update memcg->vmstats_percpu->stats_updates in the fast path (i.e. no atomic updates). According to my math, this is 3 memory loads (and potentially 3 cache misses) per memcg: - Load the address of memcg->vmstats_percpu. - Load vmstats_percpu->stats_updates (based on some percpu calculation). - Load the address of the parent memcg. Avoid most of the cache misses by caching a pointer from each struct memcg_vmstats_percpu to its parent on the corresponding CPU. In this case, for the first memcg we have 2 memory loads (same as above): - Load the address of memcg->vmstats_percpu. - Load vmstats_percpu->stats_updates (based on some percpu calculation). Then for each additional memcg, we need a single load to get the parent's stats_updates directly. This reduces the number of loads from O(3N) to O(2+N) -- where N is the number of memcgs we need to iterate. Additionally, stash a pointer to memcg->vmstats in each struct memcg_vmstats_percpu such that we can access the atomic counter that all CPUs fold into, memcg->vmstats->stats_updates. memcg_should_flush_stats() is changed to memcg_vmstats_needs_flush() to accept a struct memcg_vmstats pointer accordingly. In struct memcg_vmstats_percpu, make sure both pointers together with stats_updates live on the same cacheline. Finally, update mem_cgroup_alloc() to take in a parent pointer and initialize the new cache pointers on each CPU. The percpu loop in mem_cgroup_alloc() may look concerning, but there are multiple similar loops in the cgroup creation path (e.g. cgroup_rstat_init()), most of which are hidden within alloc_percpu(). According to Oliver's testing [1], this fixes multiple 30-38% regressions in vm-scalability, will-it-scale-tlb_flush2, and will-it-scale-fallocate1. This comes at a cost of 2 more pointers per CPU (<2KB on a machine with 128 CPUs). [1] https://lore.kernel.org/lkml/ZbDJsfsZt2ITyo61@xsang-OptiPlex-9020/ [yosryahmed@google.com: fix struct memcg_vmstats_percpu size and alignment] Link: https://lkml.kernel.org/r/20240203044612.1234216-1-yosryahmed@google.com Link: https://lkml.kernel.org/r/20240124100023.660032-1-yosryahmed@google.com Signed-off-by: Yosry Ahmed Fixes: 8d59d2214c23 ("mm: memcg: make stats flushing threshold per-memcg") Tested-by: kernel test robot Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202401221624.cb53a8ca-oliver.sang@intel.com Acked-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Greg Thelen Signed-off-by: Andrew Morton commit 67b8bcbaed4777871bb0dcc888fb02a614a98ab1 Author: Ryusuke Konishi Date: Wed Jan 24 21:19:36 2024 +0900 nilfs2: fix data corruption in dsync block recovery for small block sizes The helper function nilfs_recovery_copy_block() of nilfs_recovery_dsync_blocks(), which recovers data from logs created by data sync writes during a mount after an unclean shutdown, incorrectly calculates the on-page offset when copying repair data to the file's page cache. In environments where the block size is smaller than the page size, this flaw can cause data corruption and leak uninitialized memory bytes during the recovery process. Fix these issues by correcting this byte offset calculation on the page. Link: https://lkml.kernel.org/r/20240124121936.10575-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Tested-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton commit 56ae10cf628b02279980d17439c6241a643959c2 Author: Ryan Roberts Date: Tue Jan 23 14:17:55 2024 +0000 mm/userfaultfd: UFFDIO_MOVE implementation should use ptep_get() Commit c33c794828f2 ("mm: ptep_get() conversion") converted all (non-arch) call sites to use ptep_get() instead of doing a direct dereference of the pte. Full rationale can be found in that commit's log. Since then, UFFDIO_MOVE has been implemented which does 7 direct pte dereferences. Let's fix those up to use ptep_get(). I've asserted in the past that there is no reliable automated mechanism to catch these; I'm relying on a combination of Coccinelle (which throws up a lot of false positives) and some compiler magic to force a compiler error on dereference. But given the frequency with which new issues are coming up, I'll add it to my todo list to try to find an automated solution. Link: https://lkml.kernel.org/r/20240123141755.3836179-1-ryan.roberts@arm.com Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Signed-off-by: Ryan Roberts Reviewed-by: Suren Baghdasaryan Cc: Andrea Arcangeli Cc: David Hildenbrand Signed-off-by: Andrew Morton commit c1be35a16b2f1fe21f4f26f9de030ad6eaaf6a25 Author: Oleg Nesterov Date: Tue Jan 23 16:34:00 2024 +0100 exit: wait_task_zombie: kill the no longer necessary spin_lock_irq(siglock) After the recent changes nobody use siglock to read the values protected by stats_lock, we can kill spin_lock_irq(¤t->sighand->siglock) and update the comment. With this patch only __exit_signal() and thread_group_start_cputime() take stats_lock under siglock. Link: https://lkml.kernel.org/r/20240123153359.GA21866@redhat.com Signed-off-by: Oleg Nesterov Signed-off-by: Dylan Hatch Cc: Eric W. Biederman Cc: Signed-off-by: Andrew Morton commit 7601df8031fd67310af891897ef6cc0df4209305 Author: Oleg Nesterov Date: Tue Jan 23 16:33:57 2024 +0100 fs/proc: do_task_stat: use sig->stats_lock to gather the threads/children stats lock_task_sighand() can trigger a hard lockup. If NR_CPUS threads call do_task_stat() at the same time and the process has NR_THREADS, it will spin with irqs disabled O(NR_CPUS * NR_THREADS) time. Change do_task_stat() to use sig->stats_lock to gather the statistics outside of ->siglock protected section, in the likely case this code will run lockless. Link: https://lkml.kernel.org/r/20240123153357.GA21857@redhat.com Signed-off-by: Oleg Nesterov Signed-off-by: Dylan Hatch Cc: Eric W. Biederman Cc: Signed-off-by: Andrew Morton commit 60f92acb60a989b14e4b744501a0df0f82ef30a3 Author: Oleg Nesterov Date: Tue Jan 23 16:33:55 2024 +0100 fs/proc: do_task_stat: move thread_group_cputime_adjusted() outside of lock_task_sighand() Patch series "fs/proc: do_task_stat: use sig->stats_". do_task_stat() has the same problem as getrusage() had before "getrusage: use sig->stats_lock rather than lock_task_sighand()": a hard lockup. If NR_CPUS threads call lock_task_sighand() at the same time and the process has NR_THREADS, spin_lock_irq will spin with irqs disabled O(NR_CPUS * NR_THREADS) time. This patch (of 3): thread_group_cputime() does its own locking, we can safely shift thread_group_cputime_adjusted() which does another for_each_thread loop outside of ->siglock protected section. Not only this removes for_each_thread() from the critical section with irqs disabled, this removes another case when stats_lock is taken with siglock held. We want to remove this dependency, then we can change the users of stats_lock to not disable irqs. Link: https://lkml.kernel.org/r/20240123153313.GA21832@redhat.com Link: https://lkml.kernel.org/r/20240123153355.GA21854@redhat.com Signed-off-by: Oleg Nesterov Signed-off-by: Dylan Hatch Cc: Eric W. Biederman Cc: Signed-off-by: Andrew Morton commit f7ec1cd5cc7ef3ad964b677ba82b8b77f1c93009 Author: Oleg Nesterov Date: Mon Jan 22 16:50:53 2024 +0100 getrusage: use sig->stats_lock rather than lock_task_sighand() lock_task_sighand() can trigger a hard lockup. If NR_CPUS threads call getrusage() at the same time and the process has NR_THREADS, spin_lock_irq will spin with irqs disabled O(NR_CPUS * NR_THREADS) time. Change getrusage() to use sig->stats_lock, it was specifically designed for this type of use. This way it runs lockless in the likely case. TODO: - Change do_task_stat() to use sig->stats_lock too, then we can remove spin_lock_irq(siglock) in wait_task_zombie(). - Turn sig->stats_lock into seqcount_rwlock_t, this way the readers in the slow mode won't exclude each other. See https://lore.kernel.org/all/20230913154907.GA26210@redhat.com/ - stats_lock has to disable irqs because ->siglock can be taken in irq context, it would be very nice to change __exit_signal() to avoid the siglock->stats_lock dependency. Link: https://lkml.kernel.org/r/20240122155053.GA26214@redhat.com Signed-off-by: Oleg Nesterov Reported-by: Dylan Hatch Tested-by: Dylan Hatch Cc: Eric W. Biederman Cc: Signed-off-by: Andrew Morton commit daa694e4137571b4ebec330f9a9b4d54aa8b8089 Author: Oleg Nesterov Date: Mon Jan 22 16:50:50 2024 +0100 getrusage: move thread_group_cputime_adjusted() outside of lock_task_sighand() Patch series "getrusage: use sig->stats_lock", v2. This patch (of 2): thread_group_cputime() does its own locking, we can safely shift thread_group_cputime_adjusted() which does another for_each_thread loop outside of ->siglock protected section. This is also preparation for the next patch which changes getrusage() to use stats_lock instead of siglock, thread_group_cputime() takes the same lock. With the current implementation recursive read_seqbegin_or_lock() is fine, thread_group_cputime() can't enter the slow mode if the caller holds stats_lock, yet this looks more safe and better performance-wise. Link: https://lkml.kernel.org/r/20240122155023.GA26169@redhat.com Link: https://lkml.kernel.org/r/20240122155050.GA26205@redhat.com Signed-off-by: Oleg Nesterov Reported-by: Dylan Hatch Tested-by: Dylan Hatch Cc: Eric W. Biederman Cc: Signed-off-by: Andrew Morton commit e656c7a9e59607d1672d85ffa9a89031876ffe67 Author: Prakash Sangappa Date: Tue Jan 23 12:04:42 2024 -0800 mm: hugetlb pages should not be reserved by shmat() if SHM_NORESERVE For shared memory of type SHM_HUGETLB, hugetlb pages are reserved in shmget() call. If SHM_NORESERVE flags is specified then the hugetlb pages are not reserved. However when the shared memory is attached with the shmat() call the hugetlb pages are getting reserved incorrectly for SHM_HUGETLB shared memory created with SHM_NORESERVE which is a bug. ------------------------------- Following test shows the issue. $cat shmhtb.c int main() { int shmflags = 0660 | IPC_CREAT | SHM_HUGETLB | SHM_NORESERVE; int shmid; shmid = shmget(SKEY, SHMSZ, shmflags); if (shmid < 0) { printf("shmat: shmget() failed, %d\n", errno); return 1; } printf("After shmget()\n"); system("cat /proc/meminfo | grep -i hugepages_"); shmat(shmid, NULL, 0); printf("\nAfter shmat()\n"); system("cat /proc/meminfo | grep -i hugepages_"); shmctl(shmid, IPC_RMID, NULL); return 0; } #sysctl -w vm.nr_hugepages=20 #./shmhtb After shmget() HugePages_Total: 20 HugePages_Free: 20 HugePages_Rsvd: 0 HugePages_Surp: 0 After shmat() HugePages_Total: 20 HugePages_Free: 20 HugePages_Rsvd: 5 <-- HugePages_Surp: 0 -------------------------------- Fix is to ensure that hugetlb pages are not reserved for SHM_HUGETLB shared memory in the shmat() call. Link: https://lkml.kernel.org/r/1706040282-12388-1-git-send-email-prakash.sangappa@oracle.com Signed-off-by: Prakash Sangappa Acked-by: Muchun Song Cc: Signed-off-by: Andrew Morton commit 108a020c64434fed4b69762879d78cd24088b4c7 Author: Fedor Pchelkin Date: Mon Feb 5 14:19:16 2024 +0300 ksmbd: free aux buffer if ksmbd_iov_pin_rsp_read fails ksmbd_iov_pin_rsp_read() doesn't free the provided aux buffer if it fails. Seems to be the caller's responsibility to clear the buffer in error case. Found by Linux Verification Center (linuxtesting.org). Fixes: e2b76ab8b5c9 ("ksmbd: add support for read compound") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Acked-by: Namjae Jeon Signed-off-by: Steve French commit a12bc36032a2f7917068f9ce9eb26d869e54b31a Author: Yang Li Date: Fri Feb 2 16:13:17 2024 +0800 ksmbd: Add kernel-doc for ksmbd_extract_sharename() function The ksmbd_extract_sharename() function lacked a complete kernel-doc comment. This patch adds parameter descriptions and detailed function behavior to improve code readability and maintainability. Signed-off-by: Yang Li Acked-by: Randy Dunlap Acked-by: Namjae Jeon Signed-off-by: Steve French commit 4054705215ad7e6dd8e4e6ff27c39abd7667f700 Author: Francis Pravin Date: Wed Feb 7 05:04:17 2024 +0530 nvme: use ns->head->pi_size instead of t10_pi_tuple structure size Currently kernel supports 8 byte and 16 byte protection information. So, use ns->head->pi_size instead of sizeof(struct t10_pi_tuple). Signed-off-by: Francis Pravin Signed-off-by: Sathyavathi M Signed-off-by: Keith Busch commit 534c8a5b9d5d41d30cdcac93cfa1bca5e17be009 Author: Lijo Lazar Date: Fri Dec 8 13:48:22 2023 +0530 drm/amdgpu: Fix HDP flush for VFs on nbio v7.9 HDP flush remapping is not done for VFs. Keep the original offsets in VF environment. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 58fca355ad37dcb5f785d9095db5f748b79c5dc2 Author: Srinivasan Shanmugam Date: Wed Feb 7 10:20:57 2024 +0530 drm/amd/display: Implement bounds check for stream encoder creation in DCN301 'stream_enc_regs' array is an array of dcn10_stream_enc_registers structures. The array is initialized with four elements, corresponding to the four calls to stream_enc_regs() in the array initializer. This means that valid indices for this array are 0, 1, 2, and 3. The error message 'stream_enc_regs' 4 <= 5 below, is indicating that there is an attempt to access this array with an index of 5, which is out of bounds. This could lead to undefined behavior Here, eng_id is used as an index to access the stream_enc_regs array. If eng_id is 5, this would result in an out-of-bounds access on the stream_enc_regs array. Thus fixing Buffer overflow error in dcn301_stream_encoder_create reported by Smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn301/dcn301_resource.c:1011 dcn301_stream_encoder_create() error: buffer overflow 'stream_enc_regs' 4 <= 5 Fixes: 3a83e4e64bb1 ("drm/amd/display: Add dcn3.01 support to DC (v2)") Cc: Roman Li Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit e63e35f0164c43fbc1adb481d6604f253b9f9667 Author: Nathan Chancellor Date: Mon Feb 5 14:54:05 2024 -0700 drm/amd/display: Increase frame-larger-than for all display_mode_vba files After a recent change in LLVM, allmodconfig (which has CONFIG_KCSAN=y and CONFIG_WERROR=y enabled) has a few new instances of -Wframe-larger-than for the mode support and system configuration functions: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20v2.c:3393:6: error: stack frame size (2144) exceeds limit (2048) in 'dml20v2_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] 3393 | void dml20v2_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) | ^ 1 error generated. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn21/display_mode_vba_21.c:3520:6: error: stack frame size (2192) exceeds limit (2048) in 'dml21_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] 3520 | void dml21_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) | ^ 1 error generated. drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn20/display_mode_vba_20.c:3286:6: error: stack frame size (2128) exceeds limit (2048) in 'dml20_ModeSupportAndSystemConfigurationFull' [-Werror,-Wframe-larger-than] 3286 | void dml20_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_lib) | ^ 1 error generated. Without the sanitizers enabled, there are no warnings. This was the catalyst for commit 6740ec97bcdb ("drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml2") and that same change was made to dml in commit 5b750b22530f ("drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml") but the frame_warn_flag variable was not applied to all files. Do so now to clear up the warnings and make all these files consistent. Cc: stable@vger.kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issue/1990 Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit da48914e1fcdbf57f6b95d4552fcc088e6547ce4 Author: Mario Limonciello Date: Fri Feb 2 18:30:59 2024 -0600 drm/amd/display: Clear phantom stream count and plane count When dc_state_destruct() was refactored the new phantom_stream_count and phantom_plane_count members weren't cleared. Fixes: 012a04b1d6af ("drm/amd/display: Refactor phantom resource allocation") Acked-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 55173942a63668bdc1d61812c7c9e0406aefb5bf Author: Lijo Lazar Date: Wed Jan 31 16:34:32 2024 +0530 drm/amdgpu: Avoid fetching VRAM vendor info The present way to fetch VRAM vendor information turns out to be not reliable on GFX 9.4.3 dGPUs as well. Avoid using the data. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 29c5da1a124671caa87c4a936c625432c16ad8ca Author: Rodrigo Siqueira Date: Thu Jan 11 14:25:27 2024 -0700 drm/amd/display: Disable ODM by default for DCN35 Just ensure that ODM optimization is disabled by default. Acked-by: Hamza Mahfooz Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ca8179ba11f211cdcb6c12ddd83814eaec999738 Author: Alvin Lee Date: Fri Jan 26 16:47:20 2024 -0500 drm/amd/display: Update phantom pipe enable / disable sequence Previously we would call apply_ctx_to_hw to enable and disable phantom pipes. However, apply_ctx_to_hw can potentially update non-phantom pipes as well which is undesired. Instead of calling apply_ctx_to_hw as a whole, call the relevant helpers for each phantom pipe when enabling / disabling which will avoid us modifying hardware state for non-phantom pipes unknowingly. The use case is for an FRL display where FRL_Update is requested by the display. In this case link_state_valid flag is cleared in a passive callback thread and should be handled in the next stream / link update. However, due to the call to apply_ctx_to_hw for the phantom pipes during a flip, the main pipes were modified outside of the desired sequence (driver does not handle link_state_valid = 0 on flips). Cc: stable@vger.kernel.org # 6.6+ Reviewed-by: Samson Tam Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit e6a7df96facdcf5b1f71eb3ec26f2f9f6ad61e57 Author: Fangzhi Zuo Date: Mon Jan 22 13:43:46 2024 -0500 drm/amd/display: Fix MST Null Ptr for RV The change try to fix below error specific to RV platform: BUG: kernel NULL pointer dereference, address: 0000000000000008 PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 4 PID: 917 Comm: sway Not tainted 6.3.9-arch1-1 #1 124dc55df4f5272ccb409f39ef4872fc2b3376a2 Hardware name: LENOVO 20NKS01Y00/20NKS01Y00, BIOS R12ET61W(1.31 ) 07/28/2022 RIP: 0010:drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper] Code: 01 00 00 48 8b 85 60 05 00 00 48 63 80 88 00 00 00 3b 43 28 0f 8d 2e 01 00 00 48 8b 53 30 48 8d 04 80 48 8d 04 c2 48 8b 40 18 <48> 8> RSP: 0018:ffff960cc2df77d8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff8afb87e81280 RCX: 0000000000000224 RDX: ffff8afb9ee37c00 RSI: ffff8afb8da1a578 RDI: ffff8afb87e81280 RBP: ffff8afb83d67000 R08: 0000000000000001 R09: ffff8afb9652f850 R10: ffff960cc2df7908 R11: 0000000000000002 R12: 0000000000000000 R13: ffff8afb8d7688a0 R14: ffff8afb8da1a578 R15: 0000000000000224 FS: 00007f4dac35ce00(0000) GS:ffff8afe30b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 000000010ddc6000 CR4: 00000000003506e0 Call Trace: ? __die+0x23/0x70 ? page_fault_oops+0x171/0x4e0 ? plist_add+0xbe/0x100 ? exc_page_fault+0x7c/0x180 ? asm_exc_page_fault+0x26/0x30 ? drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper 0e67723696438d8e02b741593dd50d80b44c2026] ? drm_dp_atomic_find_time_slots+0x28/0x260 [drm_display_helper 0e67723696438d8e02b741593dd50d80b44c2026] compute_mst_dsc_configs_for_link+0x2ff/0xa40 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] ? fill_plane_buffer_attributes+0x419/0x510 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] compute_mst_dsc_configs_for_state+0x1e1/0x250 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] amdgpu_dm_atomic_check+0xecd/0x1190 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] drm_atomic_check_only+0x5c5/0xa40 drm_mode_atomic_ioctl+0x76e/0xbc0 ? _copy_to_user+0x25/0x30 ? drm_ioctl+0x296/0x4b0 ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 drm_ioctl_kernel+0xcd/0x170 drm_ioctl+0x26d/0x4b0 ? __pfx_drm_mode_atomic_ioctl+0x10/0x10 amdgpu_drm_ioctl+0x4e/0x90 [amdgpu 62e600d2a75e9158e1cd0a243bdc8e6da040c054] __x64_sys_ioctl+0x94/0xd0 do_syscall_64+0x60/0x90 ? do_syscall_64+0x6c/0x90 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7f4dad17f76f Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c> RSP: 002b:00007ffd9ae859f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 000055e255a55900 RCX: 00007f4dad17f76f RDX: 00007ffd9ae85a90 RSI: 00000000c03864bc RDI: 000000000000000b RBP: 00007ffd9ae85a90 R08: 0000000000000003 R09: 0000000000000003 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000c03864bc R13: 000000000000000b R14: 000055e255a7fc60 R15: 000055e255a01eb0 Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device ccm cmac algif_hash algif_skcipher af_alg joydev mousedev bnep > typec libphy k10temp ipmi_msghandler roles i2c_scmi acpi_cpufreq mac_hid nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_mas> CR2: 0000000000000008 ---[ end trace 0000000000000000 ]--- RIP: 0010:drm_dp_atomic_find_time_slots+0x5e/0x260 [drm_display_helper] Code: 01 00 00 48 8b 85 60 05 00 00 48 63 80 88 00 00 00 3b 43 28 0f 8d 2e 01 00 00 48 8b 53 30 48 8d 04 80 48 8d 04 c2 48 8b 40 18 <48> 8> RSP: 0018:ffff960cc2df77d8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff8afb87e81280 RCX: 0000000000000224 RDX: ffff8afb9ee37c00 RSI: ffff8afb8da1a578 RDI: ffff8afb87e81280 RBP: ffff8afb83d67000 R08: 0000000000000001 R09: ffff8afb9652f850 R10: ffff960cc2df7908 R11: 0000000000000002 R12: 0000000000000000 R13: ffff8afb8d7688a0 R14: ffff8afb8da1a578 R15: 0000000000000224 FS: 00007f4dac35ce00(0000) GS:ffff8afe30b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000008 CR3: 000000010ddc6000 CR4: 00000000003506e0 With a second DP monitor connected, drm_atomic_state in dm atomic check sequence does not include the connector state for the old/existing/first DP monitor. In such case, dsc determination policy would hit a null ptr when it tries to iterate the old/existing stream that does not have a valid connector state attached to it. When that happens, dm atomic check should call drm_atomic_get_connector_state for a new connector state. Existing dm has already done that, except for RV due to it does not have official support of dsc where .num_dsc is not defined in dcn10 resource cap, that prevent from getting drm_atomic_get_connector_state called. So, skip dsc determination policy for ASICs that don't have DSC support. Cc: stable@vger.kernel.org # 6.1+ Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2314 Reviewed-by: Wayne Lin Acked-by: Hamza Mahfooz Signed-off-by: Fangzhi Zuo Signed-off-by: Alex Deucher commit 2dcf82a8e8dc930655787797ef8a3692b527c7a9 Author: Stanley.Yang Date: Mon Feb 5 15:55:48 2024 +0800 drm/amdgpu: Fix shared buff copy to user ta if invoke node buffer |-------- ta type ----------| |-------- ta id ----------| |-------- cmd id ----------| |------ shared buf len -----| |------ shared buffer ------| ta if invoke node buffer is as above, copy shared buffer data to correct location Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 280df4996c2bfc0e340ae758ab6da35748853a7e Author: Nicholas Kazlauskas Date: Tue Jan 23 12:20:06 2024 -0500 drm/amd/display: Increase eval/entry delay for DCN35 [Why] To match firmware measurements and avoid hanging when accessing HW that's in idle. [How] Increase the delays to what we've measured. Reviewed-by: Ovidiu Bunea Acked-by: Hamza Mahfooz Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 897925dcc5dfff5b3b23ba991a89fe3ebaca6ef8 Author: Li Ma Date: Thu Feb 1 19:31:06 2024 +0800 drm/amdgpu: remove asymmetrical irq disabling in jpeg 4.0.5 suspend A supplement to commit: 615dd56ac5379f4239940be69139a33e79e59c67 There is an irq warning of jpeg during resume in s2idle process. No irq enabled in jpeg 4.0.5 resume. Fixes: 615dd56ac537 ("drm/amdgpu: remove asymmetrical irq disabling in vcn 4.0.5 suspend") Signed-off-by: Li Ma Acked-By: Saleemkhan Jamadar Reviewed-by: Yifan Zhang Reviewed-by: Veerabadhran Gopalakrishnan Signed-off-by: Alex Deucher commit 6ef82ac664bb9568ca3956e0d9c9c478e25077ff Author: Prike Liang Date: Wed Jan 17 13:39:37 2024 +0800 drm/amdgpu: reset gpu for s3 suspend abort case In the s3 suspend abort case some type of gfx9 power rail not turn off from FCH side and this will put the GPU in an unknown power status, so let's reset the gpu to a known good power state before reinitialize gpu device. Signed-off-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 93bafa32a6918154aa0caf9f66679a32c2431357 Author: Prike Liang Date: Tue Jan 16 19:10:45 2024 +0800 drm/amdgpu: skip to program GFXDEC registers for suspend abort In the suspend abort cases, the gfx power rail doesn't turn off so some GFXDEC registers/CSB can't reset to default value and at this moment reinitialize GFXDEC/CSB will result in an unexpected error. So let skip those program sequence for the suspend abort case. Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2103370afba74dda39ff5d2d69163c86644ce528 Author: Wenjing Liu Date: Thu Jan 18 18:12:15 2024 -0500 drm/amd/display: set odm_combine_policy based on context in dcn32 resource [why] When populating dml pipes, odm combine policy should be assigned based on the pipe topology of the context passed in. DML pipes could be repopulated multiple times during single validate bandwidth attempt. We need to make sure that whenever we repopulate the dml pipes it is always aligned with the updated context. There is a case where DML pipes get repopulated during FPO optimization after ODM combine policy is changed. Since in the current code we reinitlaize ODM combine policy, even though the current context has ODM combine enabled, we overwrite it despite the pipes are already split. This causes DML to think that MPC combine is used so we mistakenly enable MPC combine because we apply pipe split with ODM combine policy reset. This issue doesn't impact non windowed MPO with ODM case because the legacy policy has restricted use cases. We don't encounter the case where both ODM and FPO optimizations are enabled together. So we decide to leave it as is because it is about to be replaced anyway. Cc: stable@vger.kernel.org # 6.6+ Reviewed-by: Chaitanya Dhere Reviewed-by: Alvin Lee Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 66951d98d9bf45ba25acf37fe0747253fafdf298 Author: Srinivasan Shanmugam Date: Wed Jan 31 08:49:41 2024 +0530 drm/amd/display: Add NULL test for 'timing generator' in 'dcn21_set_pipe()' In "u32 otg_inst = pipe_ctx->stream_res.tg->inst;" pipe_ctx->stream_res.tg could be NULL, it is relying on the caller to ensure the tg is not NULL. Fixes: 474ac4a875ca ("drm/amd/display: Implement some asic specific abm call backs.") Cc: Yongqiang Sun Cc: Anthony Koo Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher commit e96fddb32931d007db12b1fce9b5e8e4c080401b Author: Srinivasan Shanmugam Date: Sat Jan 27 18:34:01 2024 +0530 drm/amd/display: Fix 'panel_cntl' could be null in 'dcn21_set_backlight_level()' 'panel_cntl' structure used to control the display panel could be null, dereferencing it could lead to a null pointer access. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn21/dcn21_hwseq.c:269 dcn21_set_backlight_level() error: we previously assumed 'panel_cntl' could be null (see line 250) Fixes: 474ac4a875ca ("drm/amd/display: Implement some asic specific abm call backs.") Cc: Yongqiang Sun Cc: Anthony Koo Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher commit d694b754894c93fb4d71a7f3699439dec111decc Author: Pablo Neira Ayuso Date: Fri Feb 2 00:05:23 2024 +0100 netfilter: nft_compat: restrict match/target protocol to u16 xt_check_{match,target} expects u16, but NFTA_RULE_COMPAT_PROTO is u32. NLA_POLICY_MAX(NLA_BE32, 65535) cannot be used because .max in nla_policy is s16, see 3e48be05f3c7 ("netlink: add attribute range validation to policy"). Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Signed-off-by: Pablo Neira Ayuso commit 292781c3c5485ce33bd22b2ef1b2bed709b4d672 Author: Pablo Neira Ayuso Date: Thu Feb 1 23:33:29 2024 +0100 netfilter: nft_compat: reject unused compat flag Flag (1 << 0) is ignored is set, never used, reject it it with EINVAL instead. Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Signed-off-by: Pablo Neira Ayuso commit 36fa8d697132b4bed2312d700310e8a78b000c84 Author: Pablo Neira Ayuso Date: Thu Feb 1 22:58:36 2024 +0100 netfilter: nft_compat: narrow down revision to unsigned 8-bits xt_find_revision() expects u8, restrict it to this datatype. Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Signed-off-by: Pablo Neira Ayuso commit 46f5ab762d048dad224436978315cbc2fa79c630 Author: Christian Brauner Date: Tue Feb 6 11:22:09 2024 +0100 fs: relax mount_setattr() permission checks When we added mount_setattr() I added additional checks compared to the legacy do_reconfigure_mnt() and do_change_type() helpers used by regular mount(2). If that mount had a parent then verify that the caller and the mount namespace the mount is attached to match and if not make sure that it's an anonymous mount. The real rootfs falls into neither category. It is neither an anoymous mount because it is obviously attached to the initial mount namespace but it also obviously doesn't have a parent mount. So that means legacy mount(2) allows changing mount properties on the real rootfs but mount_setattr(2) blocks this. I never thought much about this but of course someone on this planet of earth changes properties on the real rootfs as can be seen in [1]. Since util-linux finally switched to the new mount api in 2.39 not so long ago it also relies on mount_setattr() and that surfaced this issue when Fedora 39 finally switched to it. Fix this. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2256843 Link: https://lore.kernel.org/r/20240206-vfs-mount-rootfs-v1-1-19b335eee133@kernel.org Reviewed-by: Jan Kara Reported-by: Karel Zak Cc: stable@vger.kernel.org # v5.12+ Signed-off-by: Christian Brauner commit 67057f48df79a3d73683385f521215146861684b Author: Dan Carpenter Date: Fri Jan 26 11:41:01 2024 +0300 PCI: dwc: Clean up dw_pcie_ep_raise_msi_irq() alignment I recently changed the alignment code in dw_pcie_ep_raise_msix_irq(). The code in dw_pcie_ep_raise_msi_irq() is similar, so update it to match, just for consistency. (No effect on runtime, just a cleanup). Link: https://lore.kernel.org/r/184097e0-c728-42c7-9e8a-556bd33fb612@moroto.mountain Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel Reviewed-by: Ilpo Järvinen Reviewed-by: Manivannan Sadhasivam commit b5d1b4b46f856da1473c7ba9a5cdfcb55c9b2478 Author: Dan Carpenter Date: Fri Jan 26 11:40:37 2024 +0300 PCI: dwc: Fix a 64bit bug in dw_pcie_ep_raise_msix_irq() The "msg_addr" variable is u64. However, the "aligned_offset" is an unsigned int. This means that when the code does: msg_addr &= ~aligned_offset; it will unintentionally zero out the high 32 bits. Use ALIGN_DOWN() to do the alignment instead. Fixes: 2217fffcd63f ("PCI: dwc: endpoint: Fix dw_pcie_ep_raise_msix_irq() alignment support") Link: https://lore.kernel.org/r/af59c7ad-ab93-40f7-ad4a-7ac0b14d37f5@moroto.mountain Signed-off-by: Dan Carpenter Signed-off-by: Bjorn Helgaas Reviewed-by: Niklas Cassel Reviewed-by: Ilpo Järvinen Reviewed-by: Manivannan Sadhasivam Cc: commit e8c263ed6de8183e670fbd127c2512292a2ad8eb Author: Chaitanya Kulkarni Date: Mon Feb 5 16:30:21 2024 -0800 nvme-core: fix comment to reflect right functions The functions and the attribute listed in the comment doesn't exists in the code, (ns->logging_enabled, nvme_passthru_err_log_enabled_store() and nvme_passthru_err_log_enabled_show()) Update the comment with right function names and a comment ns->head->passthru_err_log_enabled, nvme_io_passthru_err_log_enabled_store() and nvme_io_passthru_err_log_enabled_show(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Alan Adamson Signed-off-by: Keith Busch commit 335bac1daae3fd9070d0f9f34d7d7ba708729256 Merge: 75428f537d7ca 0647903efbc84 Author: Jakub Kicinski Date: Wed Feb 7 10:34:51 2024 -0800 Merge tag 'wireless-2024-02-06' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.8-rc4 This time we have unusually large wireless pull request. Several functionality fixes to both stack and iwlwifi. Lots of fixes to warnings, especially to MODULE_DESCRIPTION(). * tag 'wireless-2024-02-06' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (31 commits) wifi: mt76: mt7996: fix fortify warning wifi: brcmfmac: Adjust n_channels usage for __counted_by wifi: iwlwifi: do not announce EPCS support wifi: iwlwifi: exit eSR only after the FW does wifi: iwlwifi: mvm: fix a battery life regression wifi: mac80211: accept broadcast probe responses on 6 GHz wifi: mac80211: adding missing drv_mgd_complete_tx() call wifi: mac80211: fix waiting for beacons logic wifi: mac80211: fix unsolicited broadcast probe config wifi: mac80211: initialize SMPS mode correctly wifi: mac80211: fix driver debugfs for vif type change wifi: mac80211: set station RX-NSS on reconfig wifi: mac80211: fix RCU use in TDLS fast-xmit wifi: mac80211: improve CSA/ECSA connection refusal wifi: cfg80211: detect stuck ECSA element in probe resp wifi: iwlwifi: remove extra kernel-doc wifi: fill in MODULE_DESCRIPTION()s for mt76 drivers wifi: fill in MODULE_DESCRIPTION()s for wilc1000 wifi: fill in MODULE_DESCRIPTION()s for wl18xx wifi: fill in MODULE_DESCRIPTION()s for p54spi ... ==================== Link: https://lore.kernel.org/r/20240206095722.CD9D2C433F1@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 1f4137e882c621f8ed4bd4da9b10cf91d059e52a Author: Keith Busch Date: Tue Feb 6 09:47:21 2024 -0800 nvme: move passthrough logging attribute to head The namespace does not have attributes, but the head does. Move the new logging attribute to that structure instead of dereferencing the wrong type. And while we're here, fix the reverse-tree coding style. Fixes: 9f079dda14339e ("nvme: allow passthru cmd error logging") Reported-by: Tasmiya Nalatwad Tested-by: Tasmiya Nalatwad Reviewed-by: Chaitanya Kulkarni Reviewed-by: Alan Adamson Signed-off-by: Keith Busch commit 3951f6add519a8e954bf78691a412f65b24f4715 Author: Alexandre Ghiti Date: Tue Jan 30 12:55:08 2024 +0100 riscv: Fix arch_tlbbatch_flush() by clearing the batch cpumask We must clear the cpumask once we have flushed the batch, otherwise cpus get accumulated and we end sending IPIs to more cpus than needed. Fixes: 54d7431af73e ("riscv: Add support for BATCHED_UNMAP_TLB_FLUSH") Signed-off-by: Alexandre Ghiti Reviewed-by: Charlie Jenkins Reviewed-by: Jisheng Zhang Link: https://lore.kernel.org/r/20240130115508.105386-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 547ab8fc4cb04a1a6b34377dd8fad34cd2c8a8e3 Merge: 5c24ba20555ac cca5efe77a6a2 Author: Linus Torvalds Date: Wed Feb 7 18:06:16 2024 +0000 Merge tag 'loongarch-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Fix acpi_core_pic[] array overflow, fix earlycon parameter if KASAN enabled, disable UBSAN instrumentation for vDSO build, and two Kconfig cleanups" * tag 'loongarch-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: vDSO: Disable UBSAN instrumentation LoongArch: Fix earlycon parameter if KASAN enabled LoongArch: Change acpi_core_pic[NR_CPUS] to acpi_core_pic[MAX_CORE_PIC] LoongArch: Select HAVE_ARCH_SECCOMP to use the common SECCOMP menu LoongArch: Select ARCH_ENABLE_THP_MIGRATION instead of redefining it commit 2cf963787529f615f7c93bdcf13a5e82029e7f38 Author: Ben Dooks Date: Thu Nov 23 13:42:14 2023 +0000 riscv: declare overflow_stack as exported from traps.c The percpu area overflow_stacks is exported from arch/riscv/kernel/traps.c for use in the entry code, but is not declared anywhere. Add the relevant declaration to arch/riscv/include/asm/stacktrace.h to silence the following sparse warning: arch/riscv/kernel/traps.c:395:1: warning: symbol '__pcpu_scope_overflow_stack' was not declared. Should it be static? We don't add the stackinfo_get_overflow() call as for some of the other architectures as this doesn't seem to be used yet, so just silence the warning. Signed-off-by: Ben Dooks Reviewed-by: Conor Dooley Fixes: be97d0db5f44 ("riscv: VMAP_STACK overflow detection thread-safe") Link: https://lore.kernel.org/r/20231123134214.81481-1-ben.dooks@codethink.co.uk Signed-off-by: Palmer Dabbelt commit ce68c035457bdd025a9961e0ba2157323090c581 Author: Alexandre Ghiti Date: Tue Jan 30 13:01:14 2024 +0100 riscv: Fix arch_hugetlb_migration_supported() for NAPOT arch_hugetlb_migration_supported() must be reimplemented to add support for NAPOT hugepages, which is done here. Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240130120114.106003-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 5c24ba20555acd68537be26f05296649e171a27d Merge: c8d80f83de47f e459647710070 Author: Linus Torvalds Date: Wed Feb 7 17:52:16 2024 +0000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "x86 guest: - Avoid false positive for check that only matters on AMD processors x86: - Give a hint when Win2016 might fail to boot due to XSAVES && !XSAVEC configuration - Do not allow creating an in-kernel PIT unless an IOAPIC already exists RISC-V: - Allow ISA extensions that were enabled for bare metal in 6.8 (Zbc, scalar and vector crypto, Zfh[min], Zihintntl, Zvfh[min], Zfa) S390: - fix CC for successful PQAP instruction - fix a race when creating a shadow page" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: x86/coco: Define cc_vendor without CONFIG_ARCH_HAS_CC_PLATFORM x86/kvm: Fix SEV check in sev_map_percpu_data() KVM: x86: Give a hint when Win2016 might fail to boot due to XSAVES erratum KVM: x86: Check irqchip mode before create PIT KVM: riscv: selftests: Add Zfa extension to get-reg-list test RISC-V: KVM: Allow Zfa extension for Guest/VM KVM: riscv: selftests: Add Zvfh[min] extensions to get-reg-list test RISC-V: KVM: Allow Zvfh[min] extensions for Guest/VM KVM: riscv: selftests: Add Zihintntl extension to get-reg-list test RISC-V: KVM: Allow Zihintntl extension for Guest/VM KVM: riscv: selftests: Add Zfh[min] extensions to get-reg-list test RISC-V: KVM: Allow Zfh[min] extensions for Guest/VM KVM: riscv: selftests: Add vector crypto extensions to get-reg-list test RISC-V: KVM: Allow vector crypto extensions for Guest/VM KVM: riscv: selftests: Add scaler crypto extensions to get-reg-list test RISC-V: KVM: Allow scalar crypto extensions for Guest/VM KVM: riscv: selftests: Add Zbc extension to get-reg-list test RISC-V: KVM: Allow Zbc extension for Guest/VM KVM: s390: fix cc for successful PQAP KVM: s390: vsie: fix race during shadow creation commit c8d80f83de47fd183a0eef2d6b1085d4fdecea37 Merge: 6d280f4d760e3 5ea9a7c5fe414 Author: Linus Torvalds Date: Wed Feb 7 17:48:15 2024 +0000 Merge tag 'nfsd-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: - Address a deadlock regression in RELEASE_LOCKOWNER * tag 'nfsd-6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: don't take fi_lock in nfsd_break_deleg_cb() commit 75428f537d7cae33c7e4dd726144074f78622c09 Author: Jesse Brandeburg Date: Mon Feb 5 18:29:06 2024 -0800 net: intel: fix old compiler regressions The kernel build regressions/improvements email contained a couple of issues with old compilers (in fact all the reports were on different architectures, but all gcc 5.5) and the FIELD_PREP() and FIELD_GET() conversions. They're all because an integer #define that should have been declared as unsigned, was shifted to the point that it could set the sign bit. The fix just involves making sure the defines use the "U" identifier on the constants to make sure they're unsigned. Should make the checkers happier. Confirmed with objdump before/after that there is no change to the binaries. Issues were reported as follows: ./drivers/net/ethernet/intel/ice/ice_base.c:238:7: note: in expansion of macro 'FIELD_GET' (FIELD_GET(GLINT_CTL_ITR_GRAN_25_M, regval) == ICE_ITR_GRAN_US)) ^ ./include/linux/compiler_types.h:435:38: error: call to '__compiletime_assert_1093' declared with attribute error: FIELD_GET: mask is not constant drivers/net/ethernet/intel/ice/ice_nvm.c:709:16: note: in expansion of macro ‘FIELD_GET’ orom->major = FIELD_GET(ICE_OROM_VER_MASK, combo_ver); ^ ./include/linux/compiler_types.h:435:38: error: call to ‘__compiletime_assert_796’ declared with attribute error: FIELD_GET: mask is not constant drivers/net/ethernet/intel/ice/ice_common.c:945:18: note: in expansion of macro ‘FIELD_GET’ u8 max_agg_bw = FIELD_GET(GL_PWR_MODE_CTL_CAR_MAX_BW_M, ^ ./include/linux/compiler_types.h:435:38: error: call to ‘__compiletime_assert_420’ declared with attribute error: FIELD_GET: mask is not constant drivers/net/ethernet/intel/i40e/i40e_dcb.c:458:8: note: in expansion of macro ‘FIELD_GET’ oui = FIELD_GET(I40E_LLDP_TLV_OUI_MASK, ouisubtype); ^ Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/lkml/d03e90ca-8485-4d1b-5ec1-c3398e0e8da@linux-m68k.org/ #i40e #ice Fixes: 62589808d73b ("i40e: field get conversion") Fixes: 5a259f8e0baf ("ice: field get conversion") Signed-off-by: Jesse Brandeburg Link: https://lore.kernel.org/r/20240206022906.2194214-1-jesse.brandeburg@intel.com Signed-off-by: Jakub Kicinski commit 5001bfe927b594470f3a2484cb410b8b42a47903 Author: Allison Henderson Date: Mon Feb 5 12:03:43 2024 -0700 MAINTAINERS: Maintainer change for rds At this point, Santosh has moved onto other things and I am happy to take over the role of rds maintainer. Update the MAINTAINERS accordingly. Signed-off-by: Allison Henderson Link: https://lore.kernel.org/r/20240205190343.112436-1-allison.henderson@oracle.com Signed-off-by: Jakub Kicinski commit 44d3b8a19b91cd2af11f918b2fd05628383172de Author: Amadeusz Sławiński Date: Wed Feb 7 12:26:24 2024 +0100 ASoC: Intel: avs: Fix dynamic port assignment when TDM is set In case TDM is set in topology on SSP0, parser will overwrite vindex value, because it only checks if port is set. Fix this by checking whole field value. Fixes: e6d50e474e45 ("ASoC: Intel: avs: Improve topology parsing of dynamic strings") Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20240207112624.2132821-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 46d5baf046abeffcb3754321fbc2551027fe7de9 Author: Lukas Bulwahn Date: Wed Feb 7 14:22:31 2024 +0100 MAINTAINERS: repair entry for MICROCHIP MCP16502 PMIC DRIVER Commit 64db3e8d7be0 ("regulator: dt-bindings: microchip,mcp16502: convert to YAML") converts mcp16502-regulator.txt to microchip,mcp16502.yaml, but misses to adjust its reference in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file reference in MICROCHIP MCP16502 PMIC DRIVER. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20240207132231.16392-1-lukas.bulwahn@gmail.com Signed-off-by: Mark Brown commit 07045648c07c5632e0dfd5ce084d3cd0cec0258a Author: Xiubo Li Date: Thu Jan 4 09:21:30 2024 +0800 ceph: always check dir caps asynchronously The MDS will issue the 'Fr' caps for async dirop, while there is buggy in kclient and it could miss releasing the async dirop caps, which is 'Fsxr'. And then the MDS will complain with: "[WRN] client.xxx isn't responding to mclientcaps(revoke) ..." So when releasing the dirop async requests or when they fail we should always make sure that being revoked caps could be released. Link: https://tracker.ceph.com/issues/50223 Signed-off-by: Xiubo Li Reviewed-by: Milind Changire Signed-off-by: Ilya Dryomov commit cda4672da1c26835dcbd7aec2bfed954eda9b5ef Author: Rishabh Dave Date: Thu Feb 1 17:07:16 2024 +0530 ceph: prevent use-after-free in encode_cap_msg() In fs/ceph/caps.c, in encode_cap_msg(), "use after free" error was caught by KASAN at this line - 'ceph_buffer_get(arg->xattr_buf);'. This implies before the refcount could be increment here, it was freed. In same file, in "handle_cap_grant()" refcount is decremented by this line - 'ceph_buffer_put(ci->i_xattrs.blob);'. It appears that a race occurred and resource was freed by the latter line before the former line could increment it. encode_cap_msg() is called by __send_cap() and __send_cap() is called by ceph_check_caps() after calling __prep_cap(). __prep_cap() is where arg->xattr_buf is assigned to ci->i_xattrs.blob. This is the spot where the refcount must be increased to prevent "use after free" error. Cc: stable@vger.kernel.org Link: https://tracker.ceph.com/issues/59259 Signed-off-by: Rishabh Dave Reviewed-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 51c161008e0429eb40f78eff703bc5b8bfd572db Merge: 54be6c6c5ae8e 5464e7acea4a6 Author: Greg Kroah-Hartman Date: Wed Feb 7 13:47:21 2024 +0000 Merge tag 'icc-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Georgi writes: interconnect fixes for v6.8-rc These are tiny fixes for reported issues in driver code for a few platforms. One of them sorts out a hang issue, the other improves the power consumption and the rest are fixing some bitmasks to make sure the hardware does thing right. - interconnect: qcom: sc8180x: Mark CO0 BCM keepalive - interconnect: qcom: sm8550: Enable sync_state - interconnect: qcom: sm8650: Use correct ACV enable_mask - interconnect: qcom: x1e80100: Add missing ACV enable_mask Signed-off-by: Georgi Djakov * tag 'icc-6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: x1e80100: Add missing ACV enable_mask interconnect: qcom: sm8650: Use correct ACV enable_mask interconnect: qcom: sm8550: Enable sync_state interconnect: qcom: sc8180x: Mark CO0 BCM keepalive commit bbb20ea993f46743f7429092ddc52f1a5c5428ef Author: Xiubo Li Date: Thu Jan 18 14:24:41 2024 +0800 ceph: always set initial i_blkbits to CEPH_FSCRYPT_BLOCK_SHIFT The fscrypt code will use i_blkbits to setup ci_data_unit_bits when allocating the new inode, but ceph will initiate i_blkbits ater when filling the inode, which is too late. Since ci_data_unit_bits will only be used by the fscrypt framework so initiating i_blkbits with CEPH_FSCRYPT_BLOCK_SHIFT is safe. Link: https://tracker.ceph.com/issues/64035 Fixes: 5b1188847180 ("fscrypt: support crypto data unit size less than filesystem block size") Signed-off-by: Xiubo Li Reviewed-by: Eric Biggers Signed-off-by: Ilya Dryomov commit 8e46a2d068c92a905d01cbb018b00d66991585ab Author: Xiubo Li Date: Thu Dec 14 16:01:03 2023 +0800 libceph: just wait for more data to be available on the socket A short read may occur while reading the message footer from the socket. Later, when the socket is ready for another read, the messenger invokes all read_partial_*() handlers, including read_partial_sparse_msg_data(). The expectation is that read_partial_sparse_msg_data() would bail, allowing the messenger to invoke read_partial() for the footer and pick up where it left off. However read_partial_sparse_msg_data() violates that and ends up calling into the state machine in the OSD client. The sparse-read state machine assumes that it's a new op and interprets some piece of the footer as the sparse-read header and returns bogus extents/data length, etc. To determine whether read_partial_sparse_msg_data() should bail, let's reuse cursor->total_resid. Because once it reaches to zero that means all the extents and data have been successfully received in last read, else it could break out when partially reading any of the extents and data. And then osd_sparse_read() could continue where it left off. [ idryomov: changelog ] Link: https://tracker.ceph.com/issues/63586 Fixes: d396f89db39a ("libceph: add sparse read support to msgr1") Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit ee97302fbc0c98a25732d736fc73aaf4d62c4128 Author: Xiubo Li Date: Thu Dec 14 09:21:15 2023 +0800 libceph: rename read_sparse_msg_*() to read_partial_sparse_msg_*() These functions are supposed to behave like other read_partial_*() handlers: the contract with messenger v1 is that the handler bails if the area of the message it's responsible for is already processed. This comes up when handling short reads from the socket. [ idryomov: changelog ] Signed-off-by: Xiubo Li Acked-by: Jeff Layton Signed-off-by: Ilya Dryomov commit cd7d469c25704d414d71bf3644f163fb74e7996b Author: Xiubo Li Date: Fri Oct 13 13:55:44 2023 +0800 libceph: fail sparse-read if the data length doesn't match Once this happens that means there have bugs. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 4b00d0c513da58b68df015968721b11396fe4ab3 Author: Jakub Kicinski Date: Sun Feb 4 08:56:18 2024 -0800 selftests: cmsg_ipv6: repeat the exact packet cmsg_ipv6 test requests tcpdump to capture 4 packets, and sends until tcpdump quits. Only the first packet is "real", however, and the rest are basic UDP packets. So if tcpdump doesn't start in time it will miss the real packet and only capture the UDP ones. This makes the test fail on slow machine (no KVM or with debug enabled) 100% of the time, while it passes in fast environments. Repeat the "real" / expected packet. Fixes: 9657ad09e1fa ("selftests: net: test IPV6_TCLASS") Fixes: 05ae83d5a4a2 ("selftests: net: test IPV6_HOPLIMIT") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 7011b51f13b391ee06708bb1f82653a2953f8cfc Author: Ben Wolsieffer Date: Tue Feb 6 10:10:05 2024 -0500 regmap: kunit: fix raw noinc write test wrapping The raw noinc write test places a known value in the register following the noinc register to verify that it is not disturbed by the noinc write. This test ensures this value is distinct by adding 100 to the second element of the noinc write data. The regmap registers are 16-bit, while the test value is stored in an unsigned int. Therefore, adding 100 may cause the register to wrap while the test value does not, causing the test to fail. This patch fixes this by changing val_test and val_last from unsigned int to u16. Signed-off-by: Ben Wolsieffer Reported-by: Guenter Roeck Closes: https://lore.kernel.org/linux-kernel/745d3a11-15bc-48b6-84c8-c8761c943bed@roeck-us.net/T/ Tested-by: Guenter Roeck Link: https://lore.kernel.org/r/20240206151004.1636761-2-ben.wolsieffer@hefring.com Signed-off-by: Mark Brown commit 734550d60cdf634299f0eac7f7fe15763ed990bb Author: Abel Vesa Date: Thu Feb 1 10:39:33 2024 +0200 phy: qualcomm: eusb2-repeater: Rework init to drop redundant zero-out loop Instead of incrementing the base of the global reg fields, which renders the second instance of the repeater broken due to wrong offsets, use regmap with base and offset. As for zeroing out the rest of the tuning regs, avoid looping though the table and just use the table as is, as it is already zero initialized. Fixes: 99a517a582fc ("phy: qualcomm: phy-qcom-eusb2-repeater: Zero out untouched tuning regs") Tested-by: Elliot Berman # sm8650-qrd Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20240201-phy-qcom-eusb2-repeater-fixes-v4-1-cf18c8cef6d7@linaro.org Signed-off-by: Vinod Koul commit 64353af49fecbdec1de9aadf2369d54fc00f1899 Author: Charles Keepax Date: Tue Feb 6 11:38:50 2024 +0000 ASoC: cs42l43: Add system suspend ops to disable IRQ The IRQ should be disabled whilst entering and exiting system suspend to avoid the IRQ handler being called whilst the PM runtime is disabled. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20240206113850.719888-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit d1722057477a3786b8c0d60c28fc281f6ecf1cc3 Author: Charles Keepax Date: Tue Feb 6 11:38:49 2024 +0000 ASoC: cs42l43: Handle error from devm_pm_runtime_enable As devm_pm_runtime_enable can fail due to memory allocations, it is best to handle the error. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20240206113850.719888-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 95055beb067cb30f626fb10f7019737ca7681df0 Author: Yang Yingliang Date: Thu Aug 24 17:13:45 2023 +0800 phy: qcom: phy-qcom-m31: fix wrong pointer pass to PTR_ERR() It should be 'qphy->vreg' passed to PTR_ERR() when devm_regulator_get() fails. Fixes: 08e49af50701 ("phy: qcom: Introduce M31 USB PHY driver") Signed-off-by: Yang Yingliang Reviewed-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/20230824091345.1072650-1-yangyingliang@huawei.com Signed-off-by: Vinod Koul commit 7936378cb6d87073163130e1e1fc1e5f76a597cf Author: Alexander Stein Date: Wed Jan 10 10:33:43 2024 +0100 phy: freescale: phy-fsl-imx8-mipi-dphy: Fix alias name to use dashes Devicetree spec lists only dashes as valid characters for alias names. Table 3.2: Valid characters for alias names, Devicee Specification, Release v0.4 Signed-off-by: Alexander Stein Fixes: 3fbae284887de ("phy: freescale: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode support") Link: https://lore.kernel.org/r/20240110093343.468810-1-alexander.stein@ew.tq-group.com Signed-off-by: Vinod Koul commit 38cc3c6dcc09dc3a1800b5ec22aef643ca11eab8 Author: Petr Tesarik Date: Sat Feb 3 20:09:27 2024 +0100 net: stmmac: protect updates of 64-bit statistics counters As explained by a comment in , write side of struct u64_stats_sync must ensure mutual exclusion, or one seqcount update could be lost on 32-bit platforms, thus blocking readers forever. Such lockups have been observed in real world after stmmac_xmit() on one CPU raced with stmmac_napi_poll_tx() on another CPU. To fix the issue without introducing a new lock, split the statics into three parts: 1. fields updated only under the tx queue lock, 2. fields updated only during NAPI poll, 3. fields updated only from interrupt context, Updates to fields in the first two groups are already serialized through other locks. It is sufficient to split the existing struct u64_stats_sync so that each group has its own. Note that tx_set_ic_bit is updated from both contexts. Split this counter so that each context gets its own, and calculate their sum to get the total value in stmmac_get_ethtool_stats(). For the third group, multiple interrupts may be processed by different CPUs at the same time, but interrupts on the same CPU will not nest. Move fields from this group to a newly created per-cpu struct stmmac_pcpu_stats. Fixes: 133466c3bbe1 ("net: stmmac: use per-queue 64 bit statistics where necessary") Link: https://lore.kernel.org/netdev/Za173PhviYg-1qIn@torres.zugschlus.de/t/ Cc: stable@vger.kernel.org Signed-off-by: Petr Tesarik Reviewed-by: Jisheng Zhang Signed-off-by: David S. Miller commit 9ba17defd9edd87970b701085402bc8ecc3a11d4 Author: Joy Zou Date: Wed Jan 31 11:33:18 2024 -0500 dmaengine: fsl-edma: correct calculation of 'nbytes' in multi-fifo scenario The 'nbytes' should be equivalent to burst * width in audio multi-fifo setups. Given that the FIFO width is fixed at 32 bits, adjusts the burst size for multi-fifo configurations to match the slave maxburst in the configuration. Cc: stable@vger.kernel.org Fixes: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support") Signed-off-by: Joy Zou Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240131163318.360315-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit 87a39071e0b639f45e05d296cc0538eef44ec0bd Author: Curtis Klein Date: Thu Feb 1 17:04:06 2024 -0500 dmaengine: fsl-qdma: init irq after reg initialization Initialize the qDMA irqs after the registers are configured so that interrupts that may have been pending from a primary kernel don't get processed by the irq handler before it is ready to and cause panic with the following trace: Call trace: fsl_qdma_queue_handler+0xf8/0x3e8 __handle_irq_event_percpu+0x78/0x2b0 handle_irq_event_percpu+0x1c/0x68 handle_irq_event+0x44/0x78 handle_fasteoi_irq+0xc8/0x178 generic_handle_irq+0x24/0x38 __handle_domain_irq+0x90/0x100 gic_handle_irq+0x5c/0xb8 el1_irq+0xb8/0x180 _raw_spin_unlock_irqrestore+0x14/0x40 __setup_irq+0x4bc/0x798 request_threaded_irq+0xd8/0x190 devm_request_threaded_irq+0x74/0xe8 fsl_qdma_probe+0x4d4/0xca8 platform_drv_probe+0x50/0xa0 really_probe+0xe0/0x3f8 driver_probe_device+0x64/0x130 device_driver_attach+0x6c/0x78 __driver_attach+0xbc/0x158 bus_for_each_dev+0x5c/0x98 driver_attach+0x20/0x28 bus_add_driver+0x158/0x220 driver_register+0x60/0x110 __platform_driver_register+0x44/0x50 fsl_qdma_driver_init+0x18/0x20 do_one_initcall+0x48/0x258 kernel_init_freeable+0x1a4/0x23c kernel_init+0x10/0xf8 ret_from_fork+0x10/0x18 Cc: stable@vger.kernel.org Fixes: b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs") Signed-off-by: Curtis Klein Signed-off-by: Yi Zhao Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240201220406.440145-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit 9d739bccf261dd93ec1babf82f5c5d71dd4caa3e Author: Peng Ma Date: Thu Feb 1 16:50:07 2024 -0500 dmaengine: fsl-qdma: fix SoC may hang on 16 byte unaligned read There is chip (ls1028a) errata: The SoC may hang on 16 byte unaligned read transactions by QDMA. Unaligned read transactions initiated by QDMA may stall in the NOC (Network On-Chip), causing a deadlock condition. Stalled transactions will trigger completion timeouts in PCIe controller. Workaround: Enable prefetch by setting the source descriptor prefetchable bit ( SD[PF] = 1 ). Implement this workaround. Cc: stable@vger.kernel.org Fixes: b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs") Signed-off-by: Peng Ma Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240201215007.439503-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit bbcc1c83f343e580c3aa1f2a8593343bf7b55bba Author: Kory Maincent Date: Mon Jan 29 17:26:02 2024 +0100 dmaengine: dw-edma: eDMA: Add sync read before starting the DMA transfer in remote setup The Linked list element and pointer are not stored in the same memory as the eDMA controller register. If the doorbell register is toggled before the full write of the linked list a race condition error will occur. In remote setup we can only use a readl to the memory to assure the full write has occurred. Fixes: 7e4b8a4fbe2c ("dmaengine: Add Synopsys eDMA IP version 0 support") Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kory Maincent Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-6-8e8c1acb7a46@bootlin.com Signed-off-by: Vinod Koul commit 712a92a48158e02155b4b6b21e03a817f78c9b7e Author: Kory Maincent Date: Mon Jan 29 17:26:01 2024 +0100 dmaengine: dw-edma: HDMA: Add sync read before starting the DMA transfer in remote setup The Linked list element and pointer are not stored in the same memory as the HDMA controller register. If the doorbell register is toggled before the full write of the linked list a race condition error will occur. In remote setup we can only use a readl to the memory to assure the full write has occurred. Fixes: e74c39573d35 ("dmaengine: dw-edma: Add support for native HDMA") Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kory Maincent Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-5-8e8c1acb7a46@bootlin.com Signed-off-by: Vinod Koul commit e2f6a5789051ee9c632f27a12d0f01f0cbf78aac Author: Kory Maincent Date: Mon Jan 29 17:26:00 2024 +0100 dmaengine: dw-edma: Add HDMA remote interrupt configuration Only the local interruption was configured, remote interrupt was left behind. This patch fix it by setting stop and abort remote interrupts when the DW_EDMA_CHIP_LOCAL flag is not set. Fixes: e74c39573d35 ("dmaengine: dw-edma: Add support for native HDMA") Signed-off-by: Kory Maincent Reviewed-by: Serge Semin Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-4-8e8c1acb7a46@bootlin.com Signed-off-by: Vinod Koul commit 930a8a015dcfde4b8906351ff081066dc277748c Author: Kory Maincent Date: Mon Jan 29 17:25:59 2024 +0100 dmaengine: dw-edma: HDMA_V0_REMOTEL_STOP_INT_EN typo fix Fix "HDMA_V0_REMOTEL_STOP_INT_EN" typo error Fixes: e74c39573d35 ("dmaengine: dw-edma: Add support for native HDMA") Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kory Maincent Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-3-8e8c1acb7a46@bootlin.com Signed-off-by: Vinod Koul commit 7b52ba8616e978bf4f38f207f11a8176517244d0 Author: Kory Maincent Date: Mon Jan 29 17:25:58 2024 +0100 dmaengine: dw-edma: Fix wrong interrupt bit set for HDMA Instead of setting HDMA_V0_LOCAL_ABORT_INT_EN bit, HDMA_V0_LOCAL_STOP_INT_EN bit got set twice, due to which the abort interrupt is not getting generated for HDMA. Fix it by setting the correct interrupt enable bit. Fixes: e74c39573d35 ("dmaengine: dw-edma: Add support for native HDMA") Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Signed-off-by: Kory Maincent Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-2-8e8c1acb7a46@bootlin.com Signed-off-by: Vinod Koul commit cd665bfc757c71e9b7e0abff0f362d8abd38a805 Author: Kory Maincent Date: Mon Jan 29 17:25:57 2024 +0100 dmaengine: dw-edma: Fix the ch_count hdma callback The current check of ch_en enabled to know the maximum number of available hardware channels is wrong as it check the number of ch_en register set but all of them are unset at probe. This register is set at the dw_hdma_v0_core_start function which is run lately before a DMA transfer. The HDMA IP have no way to know the number of hardware channels available like the eDMA IP, then let set it to maximum channels and let the platform set the right number of channels. Fixes: e74c39573d35 ("dmaengine: dw-edma: Add support for native HDMA") Acked-by: Manivannan Sadhasivam Reviewed-by: Serge Semin Signed-off-by: Kory Maincent Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-1-8e8c1acb7a46@bootlin.com Signed-off-by: Vinod Koul commit 6d280f4d760e3bcb4a8df302afebf085b65ec982 Merge: 99bd3cb0d12e8 e03ee2fe873eb Author: Linus Torvalds Date: Wed Feb 7 08:21:32 2024 +0000 Merge tag 'for-6.8-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - two fixes preventing deletion and manual creation of subvolume qgroup - unify error code returned for unknown send flags - fix assertion during subvolume creation when anonymous device could be allocated by other thread (e.g. due to backref walk) * tag 'for-6.8-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: do not ASSERT() if the newly created subvolume already got read btrfs: forbid deleting live subvol qgroup btrfs: forbid creating subvol qgroups btrfs: send: return EOPNOTSUPP on unknown flags commit cb88cb53badb8aeb3955ad6ce80b07b598e310b8 Author: Eric Dumazet Date: Mon Feb 5 17:10:04 2024 +0000 ppp_async: limit MRU to 64K syzbot triggered a warning [1] in __alloc_pages(): WARN_ON_ONCE_GFP(order > MAX_PAGE_ORDER, gfp) Willem fixed a similar issue in commit c0a2a1b0d631 ("ppp: limit MRU to 64K") Adopt the same sanity check for ppp_async_ioctl(PPPIOCSMRU) [1]: WARNING: CPU: 1 PID: 11 at mm/page_alloc.c:4543 __alloc_pages+0x308/0x698 mm/page_alloc.c:4543 Modules linked in: CPU: 1 PID: 11 Comm: kworker/u4:0 Not tainted 6.8.0-rc2-syzkaller-g41bccc98fb79 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Workqueue: events_unbound flush_to_ldisc pstate: 204000c5 (nzCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __alloc_pages+0x308/0x698 mm/page_alloc.c:4543 lr : __alloc_pages+0xc8/0x698 mm/page_alloc.c:4537 sp : ffff800093967580 x29: ffff800093967660 x28: ffff8000939675a0 x27: dfff800000000000 x26: ffff70001272ceb4 x25: 0000000000000000 x24: ffff8000939675c0 x23: 0000000000000000 x22: 0000000000060820 x21: 1ffff0001272ceb8 x20: ffff8000939675e0 x19: 0000000000000010 x18: ffff800093967120 x17: ffff800083bded5c x16: ffff80008ac97500 x15: 0000000000000005 x14: 1ffff0001272cebc x13: 0000000000000000 x12: 0000000000000000 x11: ffff70001272cec1 x10: 1ffff0001272cec0 x9 : 0000000000000001 x8 : ffff800091c91000 x7 : 0000000000000000 x6 : 000000000000003f x5 : 00000000ffffffff x4 : 0000000000000000 x3 : 0000000000000020 x2 : 0000000000000008 x1 : 0000000000000000 x0 : ffff8000939675e0 Call trace: __alloc_pages+0x308/0x698 mm/page_alloc.c:4543 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] __kmalloc_large_node+0xbc/0x1fc mm/slub.c:3926 __do_kmalloc_node mm/slub.c:3969 [inline] __kmalloc_node_track_caller+0x418/0x620 mm/slub.c:4001 kmalloc_reserve+0x17c/0x23c net/core/skbuff.c:590 __alloc_skb+0x1c8/0x3d8 net/core/skbuff.c:651 __netdev_alloc_skb+0xb8/0x3e8 net/core/skbuff.c:715 netdev_alloc_skb include/linux/skbuff.h:3235 [inline] dev_alloc_skb include/linux/skbuff.h:3248 [inline] ppp_async_input drivers/net/ppp/ppp_async.c:863 [inline] ppp_asynctty_receive+0x588/0x186c drivers/net/ppp/ppp_async.c:341 tty_ldisc_receive_buf+0x12c/0x15c drivers/tty/tty_buffer.c:390 tty_port_default_receive_buf+0x74/0xac drivers/tty/tty_port.c:37 receive_buf drivers/tty/tty_buffer.c:444 [inline] flush_to_ldisc+0x284/0x6e4 drivers/tty/tty_buffer.c:494 process_one_work+0x694/0x1204 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:2787 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-and-tested-by: syzbot+c5da1f087c9e4ec6c933@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20240205171004.1059724-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 58086721b7781c3e35b19c9b78c8f5a791070ba3 Author: Jiri Pirko Date: Mon Feb 5 18:11:14 2024 +0100 devlink: avoid potential loop in devlink_rel_nested_in_notify_work() In case devlink_rel_nested_in_notify_work() can not take the devlink lock mutex. Convert the work to delayed work and in case of reschedule do it jiffie later and avoid potential looping. Suggested-by: Paolo Abeni Fixes: c137743bce02 ("devlink: introduce object and nested devlink relationship infra") Signed-off-by: Jiri Pirko Link: https://lore.kernel.org/r/20240205171114.338679-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 1279f9d9dec2d7462823a18c29ad61359e0a007d Author: Kuniyuki Iwashima Date: Sat Feb 3 10:31:49 2024 -0800 af_unix: Call kfree_skb() for dead unix_(sk)->oob_skb in GC. syzbot reported a warning [0] in __unix_gc() with a repro, which creates a socketpair and sends one socket's fd to itself using the peer. socketpair(AF_UNIX, SOCK_STREAM, 0, [3, 4]) = 0 sendmsg(4, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\360", iov_len=1}], msg_iovlen=1, msg_control=[{cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[3]}], msg_controllen=24, msg_flags=0}, MSG_OOB|MSG_PROBE|MSG_DONTWAIT|MSG_ZEROCOPY) = 1 This forms a self-cyclic reference that GC should finally untangle but does not due to lack of MSG_OOB handling, resulting in memory leak. Recently, commit 11498715f266 ("af_unix: Remove io_uring code for GC.") removed io_uring's dead code in GC and revealed the problem. The code was executed at the final stage of GC and unconditionally moved all GC candidates from gc_candidates to gc_inflight_list. That papered over the reported problem by always making the following WARN_ON_ONCE(!list_empty(&gc_candidates)) false. The problem has been there since commit 2aab4b969002 ("af_unix: fix struct pid leaks in OOB support") added full scm support for MSG_OOB while fixing another bug. To fix this problem, we must call kfree_skb() for unix_sk(sk)->oob_skb if the socket still exists in gc_candidates after purging collected skb. Then, we need to set NULL to oob_skb before calling kfree_skb() because it calls last fput() and triggers unix_release_sock(), where we call duplicate kfree_skb(u->oob_skb) if not NULL. Note that the leaked socket remained being linked to a global list, so kmemleak also could not detect it. We need to check /proc/net/protocol to notice the unfreed socket. [0]: WARNING: CPU: 0 PID: 2863 at net/unix/garbage.c:345 __unix_gc+0xc74/0xe80 net/unix/garbage.c:345 Modules linked in: CPU: 0 PID: 2863 Comm: kworker/u4:11 Not tainted 6.8.0-rc1-syzkaller-00583-g1701940b1a02 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Workqueue: events_unbound __unix_gc RIP: 0010:__unix_gc+0xc74/0xe80 net/unix/garbage.c:345 Code: 8b 5c 24 50 e9 86 f8 ff ff e8 f8 e4 22 f8 31 d2 48 c7 c6 30 6a 69 89 4c 89 ef e8 97 ef ff ff e9 80 f9 ff ff e8 dd e4 22 f8 90 <0f> 0b 90 e9 7b fd ff ff 48 89 df e8 5c e7 7c f8 e9 d3 f8 ff ff e8 RSP: 0018:ffffc9000b03fba0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffffc9000b03fc10 RCX: ffffffff816c493e RDX: ffff88802c02d940 RSI: ffffffff896982f3 RDI: ffffc9000b03fb30 RBP: ffffc9000b03fce0 R08: 0000000000000001 R09: fffff52001607f66 R10: 0000000000000003 R11: 0000000000000002 R12: dffffc0000000000 R13: ffffc9000b03fc10 R14: ffffc9000b03fc10 R15: 0000000000000001 FS: 0000000000000000(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005559c8677a60 CR3: 000000000d57a000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: process_one_work+0x889/0x15e0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x12a0 kernel/workqueue.c:2787 kthread+0x2c6/0x3b0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242 Reported-by: syzbot+fa3ef895554bdbfd1183@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=fa3ef895554bdbfd1183 Fixes: 2aab4b969002 ("af_unix: fix struct pid leaks in OOB support") Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240203183149.63573-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 97cf301fa42e8ea6e0a24de97bc0abcdc87d9504 Author: Alexandre Ghiti Date: Sun Jan 28 13:04:05 2024 +0100 riscv: Flush the tlb when a page directory is freed The riscv privileged specification mandates to flush the TLB whenever a page directory is modified, so add that to tlb_flush(). Fixes: c5e9b2c2ae82 ("riscv: Improve tlb_flush()") Signed-off-by: Alexandre Ghiti Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240128120405.25876-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 829388b725f8d266ccec32a2f446717d8693eaba Author: David Gow Date: Thu Feb 1 14:04:36 2024 +0800 kunit: device: Unregister the kunit_bus on shutdown If KUnit is built as a module, and it's unloaded, the kunit_bus is not unregistered. This causes an error if it's then re-loaded later, as we try to re-register the bus. Unregister the bus and root_device on shutdown, if it looks valid. In addition, be more specific about the value of kunit_bus_device. It is: - a valid struct device* if the kunit_bus initialised correctly. - an ERR_PTR if it failed to initialise. - NULL before initialisation and after shutdown. Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") Signed-off-by: David Gow Reviewed-by: Rae Moar Signed-off-by: Shuah Khan commit 7ed4380009e96d9e9c605e12822e987b35b05648 Author: Takashi Sakamoto Date: Wed Feb 7 08:01:17 2024 +0900 firewire: core: send bus reset promptly on gap count error If we are bus manager and the bus has inconsistent gap counts, send a bus reset immediately instead of trying to read the root node's config ROM first. Otherwise, we could spend a lot of time trying to read the config ROM but never succeeding. This eliminates a 50+ second delay before the FireWire bus is usable after a newly connected device is powered on in certain circumstances. The delay occurs if a gap count inconsistency occurs, we are not the root node, and we become bus manager. One scenario that causes this is with a TI XIO2213B OHCI, the first time a Sony DSR-25 is powered on after being connected to the FireWire cable. In this configuration, the Linux box will not receive the initial PHY configuration packet sent by the DSR-25 as IRM, resulting in the DSR-25 having a gap count of 44 while the Linux box has a gap count of 63. FireWire devices have a gap count parameter, which is set to 63 on power-up and can be changed with a PHY configuration packet. This determines the duration of the subaction and arbitration gaps. For reliable communication, all nodes on a FireWire bus must have the same gap count. A node may have zero or more of the following roles: root node, bus manager (BM), isochronous resource manager (IRM), and cycle master. Unless a root node was forced with a PHY configuration packet, any node might become root node after a bus reset. Only the root node can become cycle master. If the root node is not cycle master capable, the BM or IRM should force a change of root node. After a bus reset, each node sends a self-ID packet, which contains its current gap count. A single bus reset does not change the gap count, but two bus resets in a row will set the gap count to 63. Because a consistent gap count is required for reliable communication, IEEE 1394a-2000 requires that the bus manager generate a bus reset if it detects that the gap count is inconsistent. When the gap count is inconsistent, build_tree() will notice this after the self identification process. It will set card->gap_count to the invalid value 0. If we become bus master, this will force bm_work() to send a bus reset when it performs gap count optimization. After a bus reset, there is no bus manager. We will almost always try to become bus manager. Once we become bus manager, we will first determine whether the root node is cycle master capable. Then, we will determine if the gap count should be changed. If either the root node or the gap count should be changed, we will generate a bus reset. To determine if the root node is cycle master capable, we read its configuration ROM. bm_work() will wait until we have finished trying to read the configuration ROM. However, an inconsistent gap count can make this take a long time. read_config_rom() will read the first few quadlets from the config ROM. Due to the gap count inconsistency, eventually one of the reads will time out. When read_config_rom() fails, fw_device_init() calls it again until MAX_RETRIES is reached. This takes 50+ seconds. Once we give up trying to read the configuration ROM, bm_work() will wake up, assume that the root node is not cycle master capable, and do a bus reset. Hopefully, this will resolve the gap count inconsistency. This change makes bm_work() check for an inconsistent gap count before waiting for the root node's configuration ROM. If the gap count is inconsistent, bm_work() will immediately do a bus reset. This eliminates the 50+ second delay and rapidly brings the bus to a working state. I considered that if the gap count is inconsistent, a PHY configuration packet might not be successful, so it could be desirable to skip the PHY configuration packet before the bus reset in this case. However, IEEE 1394a-2000 and IEEE 1394-2008 say that the bus manager may transmit a PHY configuration packet before a bus reset when correcting a gap count error. Since the standard endorses this, I decided it's safe to retain the PHY configuration packet transmission. Normally, after a topology change, we will reset the bus a maximum of 5 times to change the root node and perform gap count optimization. However, if there is a gap count inconsistency, we must always generate a bus reset. Otherwise the gap count inconsistency will persist and communication will be unreliable. For that reason, if there is a gap count inconstency, we generate a bus reset even if we already reached the 5 reset limit. Signed-off-by: Adam Goldman Reference: https://sourceforge.net/p/linux1394/mailman/message/58727806/ Signed-off-by: Takashi Sakamoto commit 82b143aeb169b8b55798d7d2063032e1a6ceeeb0 Author: Helge Deller Date: Mon Feb 5 10:39:20 2024 +0100 Revert "parisc: Only list existing CPUs in cpu_possible_mask" This reverts commit 0921244f6f4f0d05698b953fe632a99b38907226. It broke CPU hotplugging because it modifies the __cpu_possible_mask after bootup, so that it will be different than nr_cpu_ids, which then effictively breaks the workqueue setup code and triggers crashes when shutting down CPUs at runtime. Guenter was the first who noticed the wrong values in __cpu_possible_mask, since the cpumask Kunit tests were failig. Reverting this commit fixes both issues, but sadly brings back this uncritical runtime warning: register_cpu_capacity_sysctl: too early to get CPU4 device! Signed-off-by: Helge Deller Reported-by: Guenter Roeck Link: https://lkml.org/lkml/2024/2/4/146 Link: https://lore.kernel.org/lkml/Zb0mbHlIud_bqftx@slm.duckdns.org/t/ Cc: stable@vger.kernel.org # 6.0+ commit 6fd78beed0213655c16ef728af0caec6d5ae4c73 Author: Sean Christopherson Date: Wed Jan 31 14:27:28 2024 -0800 KVM: selftests: Don't assert on exact number of 4KiB in dirty log split test Drop dirty_log_page_splitting_test's assertion that the number of 4KiB pages remains the same across dirty logging being enabled and disabled, as the test doesn't guarantee that mappings outside of the memslots being dirty logged are stable, e.g. KVM's mappings for code and pages in memslot0 can be zapped by things like NUMA balancing. To preserve the spirit of the check, assert that (a) the number of 4KiB pages after splitting is _at least_ the number of 4KiB pages across all memslots under test, and (b) the number of hugepages before splitting adds up to the number of pages across all memslots under test. (b) is a little tenuous as it relies on memslot0 being incompatible with transparent hugepages, but that holds true for now as selftests explicitly madvise() MADV_NOHUGEPAGE for memslot0 (__vm_create() unconditionally specifies the backing type as VM_MEM_SRC_ANONYMOUS). Reported-by: Yi Lai Reported-by: Tao Su Reviewed-by: Tao Su Link: https://lore.kernel.org/r/20240131222728.4100079-1-seanjc@google.com Signed-off-by: Sean Christopherson commit ba58f873cdeec30b6da48e28dd5782c5a3e1371b Author: Sean Christopherson Date: Fri Feb 2 15:18:31 2024 -0800 KVM: selftests: Fix a semaphore imbalance in the dirty ring logging test When finishing the final iteration of dirty_log_test testcase, set host_quit _before_ the final "continue" so that the vCPU worker doesn't run an extra iteration, and delete the hack-a-fix of an extra "continue" from the dirty ring testcase. This fixes a bug where the extra post to sem_vcpu_cont may not be consumed, which results in failures in subsequent runs of the testcases. The bug likely was missed during development as x86 supports only a single "guest mode", i.e. there aren't any subsequent testcases after the dirty ring test, because for_each_guest_mode() only runs a single iteration. For the regular dirty log testcases, letting the vCPU run one extra iteration is a non-issue as the vCPU worker waits on sem_vcpu_cont if and only if the worker is explicitly told to stop (vcpu_sync_stop_requested). But for the dirty ring test, which needs to periodically stop the vCPU to reap the dirty ring, letting the vCPU resume the guest _after_ the last iteration means the vCPU will get stuck without an extra "continue". However, blindly firing off an post to sem_vcpu_cont isn't guaranteed to be consumed, e.g. if the vCPU worker sees host_quit==true before resuming the guest. This results in a dangling sem_vcpu_cont, which leads to subsequent iterations getting out of sync, as the vCPU worker will continue on before the main task is ready for it to resume the guest, leading to a variety of asserts, e.g. ==== Test Assertion Failure ==== dirty_log_test.c:384: dirty_ring_vcpu_ring_full pid=14854 tid=14854 errno=22 - Invalid argument 1 0x00000000004033eb: dirty_ring_collect_dirty_pages at dirty_log_test.c:384 2 0x0000000000402d27: log_mode_collect_dirty_pages at dirty_log_test.c:505 3 (inlined by) run_test at dirty_log_test.c:802 4 0x0000000000403dc7: for_each_guest_mode at guest_modes.c:100 5 0x0000000000401dff: main at dirty_log_test.c:941 (discriminator 3) 6 0x0000ffff9be173c7: ?? ??:0 7 0x0000ffff9be1749f: ?? ??:0 8 0x000000000040206f: _start at ??:? Didn't continue vcpu even without ring full Alternatively, the test could simply reset the semaphores before each testcase, but papering over hacks with more hacks usually ends in tears. Reported-by: Shaoqin Huang Fixes: 84292e565951 ("KVM: selftests: Add dirty ring buffer test") Reviewed-by: Peter Xu Reviewed-by: Shaoqin Huang Link: https://lore.kernel.org/r/20240202231831.354848-1-seanjc@google.com Signed-off-by: Sean Christopherson commit f814bdda774c183b0cc15ec8f3b6e7c6f4527ba5 Author: Jan Kara Date: Tue Jan 23 18:58:26 2024 +0100 blk-wbt: Fix detection of dirty-throttled tasks The detection of dirty-throttled tasks in blk-wbt has been subtly broken since its beginning in 2016. Namely if we are doing cgroup writeback and the throttled task is not in the root cgroup, balance_dirty_pages() will set dirty_sleep for the non-root bdi_writeback structure. However blk-wbt checks dirty_sleep only in the root cgroup bdi_writeback structure. Thus detection of recently throttled tasks is not working in this case (we noticed this when we switched to cgroup v2 and suddently writeback was slow). Since blk-wbt has no easy way to get to proper bdi_writeback and furthermore its intention has always been to work on the whole device rather than on individual cgroups, just move the dirty_sleep timestamp from bdi_writeback to backing_dev_info. That fixes the checking for recently throttled task and saves memory for everybody as a bonus. CC: stable@vger.kernel.org Fixes: b57d74aff9ab ("writeback: track if we're sleeping on progress in balance_dirty_pages()") Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20240123175826.21452-1-jack@suse.cz [axboe: fixup indentation errors] Signed-off-by: Jens Axboe commit 853b8d7597eea4ccaaefbcf0942cd42fc86d542a Author: Amir Goldstein Date: Fri Feb 2 12:22:58 2024 +0200 remap_range: merge do_clone_file_range() into vfs_clone_file_range() commit dfad37051ade ("remap_range: move permission hooks out of do_clone_file_range()") moved the permission hooks from do_clone_file_range() out to its caller vfs_clone_file_range(), but left all the fast sanity checks in do_clone_file_range(). This makes the expensive security hooks be called in situations that they would not have been called before (e.g. fs does not support clone). The only reason for the do_clone_file_range() helper was that overlayfs did not use to be able to call vfs_clone_file_range() from copy up context with sb_writers lock held. However, since commit c63e56a4a652 ("ovl: do not open/llseek lower file with upper sb_writers held"), overlayfs just uses an open coded version of vfs_clone_file_range(). Merge_clone_file_range() into vfs_clone_file_range(), restoring the original order of checks as it was before the regressing commit and adapt the overlayfs code to call vfs_clone_file_range() before the permission hooks that were added by commit ca7ab482401c ("ovl: add permission hooks outside of do_splice_direct()"). Note that in the merge of do_clone_file_range(), the file_start_write() context was reduced to cover ->remap_file_range() without holding it over the permission hooks, which was the reason for doing the regressing commit in the first place. Reported-and-tested-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202401312229.eddeb9a6-oliver.sang@intel.com Fixes: dfad37051ade ("remap_range: move permission hooks out of do_clone_file_range()") Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20240202102258.1582671-1-amir73il@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 4bbcbc6ea2fa379632a24c14cfb47aa603816ac6 Author: Joao Martins Date: Fri Feb 2 13:34:15 2024 +0000 iommufd/iova_bitmap: Consider page offset for the pages to be pinned For small bitmaps that aren't PAGE_SIZE aligned *and* that are less than 512 pages in bitmap length, use an extra page to be able to cover the entire range e.g. [1M..3G] which would be iterated more efficiently in a single iteration, rather than two. Fixes: b058ea3ab5af ("vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries") Link: https://lore.kernel.org/r/20240202133415.23819-10-joao.m.martins@oracle.com Signed-off-by: Joao Martins Tested-by: Avihai Horon Signed-off-by: Jason Gunthorpe commit fe13166f0562117c42fc60a109e664a914523e63 Author: Joao Martins Date: Fri Feb 2 13:34:14 2024 +0000 iommufd/selftest: Add mock IO hugepages tests Leverage previously added MOCK_FLAGS_DEVICE_HUGE_IOVA flag to create an IOMMU domain with more than MOCK_IO_PAGE_SIZE supported. Plumb the hugetlb backing memory for buffer allocation and change the expected page size to MOCK_HUGE_PAGE_SIZE (1M) when hugepage variant test cases are used. These so far are limited to 128M and 256M IOVA range tests cases which is when 1M hugepages can be used. Link: https://lore.kernel.org/r/20240202133415.23819-9-joao.m.martins@oracle.com Signed-off-by: Joao Martins Signed-off-by: Jason Gunthorpe commit 7db521e23fe9e36855b61b01a67291281118570e Author: Joao Martins Date: Fri Feb 2 13:34:13 2024 +0000 iommufd/selftest: Hugepage mock domain support Add support to mock iommu hugepages of 1M (for a 2K mock io page size). To avoid breaking test suite defaults, the way this is done is by explicitly creating a iommu mock device which has hugepage support (i.e. through MOCK_FLAGS_DEVICE_HUGE_IOVA). The same scheme is maintained of mock base page index tracking in the XArray, except that an extra bit is added to mark it as a hugepage. One subpage containing the dirty bit, means that the whole hugepage is dirty (similar to AMD IOMMU non-standard page sizes). For clearing, same thing applies, and it must clear all dirty subpages. This is in preparation for dirty tracking to mark mock hugepages as dirty to exercise all the iova-bitmap fixes. Link: https://lore.kernel.org/r/20240202133415.23819-8-joao.m.martins@oracle.com Signed-off-by: Joao Martins Signed-off-by: Jason Gunthorpe commit 02a8c61a8b06a4a082b58c3e643b28036c6be60f Author: Joao Martins Date: Fri Feb 2 13:34:12 2024 +0000 iommufd/selftest: Refactor mock_domain_read_and_clear_dirty() Move the clearing of the dirty bit of the mock domain into mock_domain_test_and_clear_dirty() helper, simplifying the caller function. Additionally, rework the mock_domain_read_and_clear_dirty() loop to iterate over a potentially variable IO page size. No functional change intended with the loop refactor. This is in preparation for dirty tracking support for IOMMU hugepage mock domains. Link: https://lore.kernel.org/r/20240202133415.23819-7-joao.m.martins@oracle.com Signed-off-by: Joao Martins Signed-off-by: Jason Gunthorpe commit 407fc184f0e0bfde61026d6ce3fb1e70a15159a3 Author: Joao Martins Date: Fri Feb 2 13:34:11 2024 +0000 iommufd/selftest: Refactor dirty bitmap tests Rework the functions that test and set the bitmaps to receive a new parameter (the pte_page_size) that reflects the expected PTE size in the page tables. The same scheme is still used i.e. even bits are dirty and odd page indexes aren't dirty. Here it just refactors to consider the size of the PTE rather than hardcoded to IOMMU mock base page assumptions. While at it, refactor dirty bitmap tests to use the idev_id created by the fixture instead of creating a new one. This is in preparation for doing tests with IOMMU hugepages where multiple bits set as part of recording a whole hugepage as dirty and thus the pte_page_size will vary depending on io hugepages or io base pages. Link: https://lore.kernel.org/r/20240202133415.23819-6-joao.m.martins@oracle.com Signed-off-by: Joao Martins Signed-off-by: Jason Gunthorpe commit 2780025e01e2e1c92f83ee7da91d9727c2e58a3e Author: Joao Martins Date: Fri Feb 2 13:34:10 2024 +0000 iommufd/iova_bitmap: Handle recording beyond the mapped pages IOVA bitmap is a zero-copy scheme of recording dirty bits that iterate the different bitmap user pages at chunks of a maximum of PAGE_SIZE/sizeof(struct page*) pages. When the iterations are split up into 64G, the end of the range may be broken up in a way that's aligned with a non base page PTE size. This leads to only part of the huge page being recorded in the bitmap. Note that in pratice this is only a problem for IOMMU dirty tracking i.e. when the backing PTEs are in IOMMU hugepages and the bitmap is in base page granularity. So far this not something that affects VF dirty trackers (which reports and records at the same granularity). To fix that, if there is a remainder of bits left to set in which the current IOVA bitmap doesn't cover, make a copy of the bitmap structure and iterate-and-set the rest of the bits remaining. Finally, when advancing the iterator, skip all the bits that were set ahead. Link: https://lore.kernel.org/r/20240202133415.23819-5-joao.m.martins@oracle.com Reported-by: Avihai Horon Fixes: f35f22cc760e ("iommu/vt-d: Access/Dirty bit support for SS domains") Fixes: 421a511a293f ("iommu/amd: Access/Dirty bit support in IOPTEs") Signed-off-by: Joao Martins Tested-by: Avihai Horon Signed-off-by: Jason Gunthorpe commit 42af95114535dd94c39714b97ad720602d406b9a Author: Joao Martins Date: Fri Feb 2 13:34:09 2024 +0000 iommufd/selftest: Test u64 unaligned bitmaps Exercise the dirty tracking bitmaps with byte unaligned addresses in addition to the PAGE_SIZE unaligned bitmaps, using a address towards the end of the page boundary. In doing so, increase the tailroom we allocate for the bitmap from MOCK_PAGE_SIZE(2K) into PAGE_SIZE(4K), such that we can test end of bitmap boundary. Link: https://lore.kernel.org/r/20240202133415.23819-4-joao.m.martins@oracle.com Signed-off-by: Joao Martins Signed-off-by: Jason Gunthorpe commit d18411ec305728c6371806c4fb09be07016aad0b Author: Joao Martins Date: Fri Feb 2 13:34:08 2024 +0000 iommufd/iova_bitmap: Switch iova_bitmap::bitmap to an u8 array iova_bitmap_mapped_length() don't deal correctly with the small bitmaps (< 2M bitmaps) when the starting address isn't u64 aligned, leading to skipping a tiny part of the IOVA range. This is materialized as not marking data dirty that should otherwise have been. Fix that by using a u8 * in the internal state of IOVA bitmap. Most of the data structures use the type of the bitmap to adjust its indexes, thus changing the type of the bitmap decreases the granularity of the bitmap indexes. Fixes: b058ea3ab5af ("vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries") Link: https://lore.kernel.org/r/20240202133415.23819-3-joao.m.martins@oracle.com Signed-off-by: Joao Martins Tested-by: Avihai Horon Signed-off-by: Jason Gunthorpe commit a4ab7dedaee0e39b15653c5fd0367e420739f7ef Author: Joao Martins Date: Fri Feb 2 13:34:07 2024 +0000 iommufd/iova_bitmap: Bounds check mapped::pages access Dirty IOMMU hugepages reported on a base page page-size granularity can lead to an attempt to set dirty pages in the bitmap beyond the limits that are pinned. Bounds check the page index of the array we are trying to access is within the limits before we kmap() and return otherwise. While it is also a defensive check, this is also in preparation to defer setting bits (outside the mapped range) to the next iteration(s) when the pages become available. Fixes: b058ea3ab5af ("vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries") Link: https://lore.kernel.org/r/20240202133415.23819-2-joao.m.martins@oracle.com Signed-off-by: Joao Martins Tested-by: Avihai Horon Signed-off-by: Jason Gunthorpe commit c1d6708bf0d3dd976460d435373cf5abf21ce258 Author: Jason Gerecke Date: Mon Jan 29 14:35:45 2024 -0800 HID: wacom: Do not register input devices until after hid_hw_start If a input device is opened before hid_hw_start is called, events may not be received from the hardware. In the case of USB-backed devices, for example, the hid_hw_start function is responsible for filling in the URB which is submitted when the input device is opened. If a device is opened prematurely, polling will never start because the device will not have been in the correct state to send the URB. Because the wacom driver registers its input devices before calling hid_hw_start, there is a window of time where a device can be opened and end up in an inoperable state. Some ARM-based Chromebooks in particular reliably trigger this bug. This commit splits the wacom_register_inputs function into two pieces. One which is responsible for setting up the allocated inputs (and runs prior to hid_hw_start so that devices are ready for any input events they may end up receiving) and another which only registers the devices (and runs after hid_hw_start to ensure devices can be immediately opened without issue). Note that the functions to initialize the LEDs and remotes are also moved after hid_hw_start to maintain their own dependency chains. Fixes: 7704ac937345 ("HID: wacom: implement generic HID handling for pen generic devices") Cc: stable@vger.kernel.org # v3.18+ Suggested-by: Dmitry Torokhov Signed-off-by: Jason Gerecke Tested-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit 411a20db905b44e18cc9129b745f1d5deba4eae5 Author: Oleksandr Natalenko Date: Mon Jan 29 17:49:31 2024 +0100 HID: logitech-hidpp: Do not flood kernel log Since commit 680ee411a98e ("HID: logitech-hidpp: Fix connect event race") the following messages appear in the kernel log from time to time: logitech-hidpp-device 0003:046D:408A.0005: HID++ 4.5 device connected. logitech-hidpp-device 0003:046D:408A.0005: HID++ 4.5 device connected. logitech-hidpp-device 0003:046D:4051.0006: Disconnected logitech-hidpp-device 0003:046D:408A.0005: Disconnected As discussed, print the first per-device "device connected" message at info level, demoting subsequent messages to debug level. Also, demote the "Disconnected message" to debug level unconditionally. Link: https://lore.kernel.org/lkml/3277085.44csPzL39Z@natalenko.name/ Signed-off-by: Oleksandr Natalenko Reviewed-by: Hans de Goede Signed-off-by: Jiri Kosina commit b55fe36efc22f1f1c8f69e1cdf12c9f5d6ca371e Merge: 54be6c6c5ae8e ec4d82f855ce3 Author: Greg Kroah-Hartman Date: Tue Feb 6 14:51:40 2024 +0000 Merge tag 'thunderbolt-for-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v6.8-rc4 This includes one USB4/Thunderbolt fix for v6.8-rc4: - Correct the CNS (CM TBT3 Not Supported) bit setting for USB4 routers. This has been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Fix setting the CNS bit in ROUTER_CS_5 commit 7be50f2e8f20fc2299069b28dea59a28e3abe20a Author: Jiri Slaby (SUSE) Date: Thu Feb 1 11:55:57 2024 +0100 serial: mxs-auart: fix tx Emil reports: After updating Linux on an i.MX28 board, serial communication over AUART broke. When I TX from the board and measure on the TX pin, it seems like the HW fifo is not emptied before the transmission is stopped. MXS performs weird things with stop_tx(). The driver makes it conditional on uart_tx_stopped(). So the driver needs special handling. Pass the brand new UART_TX_NOSTOP to uart_port_tx_flags() and handle the stop on its own. Signed-off-by: "Jiri Slaby (SUSE)" Reported-by: Emil Kronborg Cc: stable Fixes: 2d141e683e9a ("tty: serial: use uart_port_tx() helper") Closes: https://lore.kernel.org/all/miwgbnvy3hjpnricubg76ytpn7xoceehwahupy25bubbduu23s@om2lptpa26xw/ Tested-by: Stefan Wahren Tested-by: Emil Kronborg Link: https://lore.kernel.org/r/20240201105557.28043-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3ee07964d407411fd578a3bc998de44fd64d266a Author: Jiri Slaby (SUSE) Date: Thu Feb 1 11:55:56 2024 +0100 serial: core: introduce uart_port_tx_flags() And an enum with a flag: UART_TX_NOSTOP. To NOT call __port->ops->stop_tx() when the circular buffer is empty. mxs-uart needs this (see the next patch). Signed-off-by: "Jiri Slaby (SUSE)" Cc: stable Tested-by: Emil Kronborg Link: https://lore.kernel.org/r/20240201105557.28043-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 720e78d7fa0f1df905a42ae68e7e3b0f95e53946 Author: Dan Carpenter Date: Wed Jan 31 11:24:59 2024 +0300 serial: 8250_pci1xxxx: partially revert off by one patch I was reviewing this code again and I realized I made a mistake here. It should have been > instead of >=. The subtract ensures that we don't go out of bounds. My patch meant that we don't read the last chunk of the buffer. Fixes: 86ee55e9bc7f ("serial: 8250_pci1xxxx: fix off by one in pci1xxxx_process_read_data()") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/bd6fb361-bbb9-427d-90e8-a5df4de76221@moroto.mountain Signed-off-by: Greg Kroah-Hartman commit 1ce2654d87e2fb91fea83b288bd9b2641045e42a Author: Furong Xu <0x1207@gmail.com> Date: Sat Feb 3 13:31:33 2024 +0800 net: stmmac: xgmac: fix a typo of register name in DPP safety handling DDPP is copied from Synopsys Data book: DDPP: Disable Data path Parity Protection. When it is 0x0, Data path Parity Protection is enabled. When it is 0x1, Data path Parity Protection is disabled. The macro name should be XGMAC_DPP_DISABLE. Fixes: 46eba193d04f ("net: stmmac: xgmac: fix handling of DPP safety error for DMA channels") Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/20240203053133.1129236-1-0x1207@gmail.com Signed-off-by: Paolo Abeni commit 5f8408aca66772d3aa9b4831577b2ac5ec41bcd9 Author: Grzegorz Trzebiatowski Date: Fri Jan 26 13:28:04 2024 +0100 accel/ivpu: Add job status for jobs aborted by the driver Add DRM_IVPU_JOB_STATUS_ABORTED to indicate that the job was aborted by the driver due to e.g. TDR or user context MMU faults. This will help UMD and tests distinguish if job was aborted by the FW or the driver. Signed-off-by: Grzegorz Trzebiatowski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240126122804.2169129-8-jacek.lawrynowicz@linux.intel.com commit 553099da45397914a995dce6307d6c26523c2567 Author: Krystian Pradzynski Date: Fri Jan 26 13:28:03 2024 +0100 accel/ivpu/40xx: Stop passing SKU boot parameters to FW This parameter was never used by the 40xx FW. Signed-off-by: Krystian Pradzynski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240126122804.2169129-7-jacek.lawrynowicz@linux.intel.com commit a939c03d37788e4a9a645c88d5e5b6a475ba0fd5 Author: Krystian Pradzynski Date: Fri Jan 26 13:28:02 2024 +0100 accel/ivpu/40xx: Enable D0i3 message All recent 40xx firmware already supports D0i3 entry message and this WA is no longer needed. Signed-off-by: Krystian Pradzynski Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240126122804.2169129-6-jacek.lawrynowicz@linux.intel.com commit a7f31091ddf457352e3dd7ac183fdbd26b4dcd04 Author: Jacek Lawrynowicz Date: Fri Jan 26 13:28:00 2024 +0100 accel/ivpu: Disable d3hot_delay on all NPU generations NPU does not require this delay regardless of the generation. All generations are integrated into the SOC. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240126122804.2169129-4-jacek.lawrynowicz@linux.intel.com commit b039f1c4d3727c3e44a7e89ff79e7e8533e1beec Author: Wachowski, Karol Date: Fri Jan 26 13:27:59 2024 +0100 accel/ivpu: Correct MMU queue size checking functions Do not use kernel CIRC_SPACE and CIRC_CNT that incorrectly return space of a queue when wrap bit was set. Use correct implementation that compares producer, consumer and wrap bit values. Without this fix it was possible to lose events in case when event queue was full. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240126122804.2169129-3-jacek.lawrynowicz@linux.intel.com commit c9da9a1f17bf4fa96b115950fd389c917b583c1c Author: Wachowski, Karol Date: Fri Jan 26 13:27:58 2024 +0100 accel/ivpu: Force snooping for MMU writes Set AW_SNOOP_OVERRIDE bit in VPU_37/40XX_HOST_IF_TCU_PTW_OVERRIDES to force snooping for MMU write accesses (setting event queue events). MMU event queue buffer is the only buffer written by MMU and mapped as write-back which break cache coherency. Force write transactions to be snooped solving the problem. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240126122804.2169129-2-jacek.lawrynowicz@linux.intel.com commit cc9432c4fb159a3913e0ce3173b8218cd5bad2e0 Author: Alexander Stein Date: Tue Feb 6 09:39:12 2024 +0100 mmc: slot-gpio: Allow non-sleeping GPIO ro This change uses the appropriate _cansleep or non-sleeping API for reading GPIO read-only state. This allows users with GPIOs that never sleepbeing called in atomic context. Implement the same mechanism as in commit 52af318c93e97 ("mmc: Allow non-sleeping GPIO cd"). Signed-off-by: Alexander Stein Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240206083912.2543142-1-alexander.stein@ew.tq-group.com Signed-off-by: Ulf Hansson commit 58aeb5623c2ebdadefe6352b14f8076a7073fea0 Author: Fred Ai Date: Sat Feb 3 02:29:08 2024 -0800 mmc: sdhci-pci-o2micro: Fix a warm reboot issue that disk can't be detected by BIOS Driver shall switch clock source from DLL clock to OPE clock when power off card to ensure that card can be identified with OPE clock by BIOS. Signed-off-by: Fred Ai Fixes:4be33cf18703 ("mmc: sdhci-pci-o2micro: Improve card input timing at SDR104/HS200 mode") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240203102908.4683-1-fredaibayhubtech@126.com Signed-off-by: Ulf Hansson commit 1c57b9f63ab34f01b8c73731cc0efacb5a9a2f16 Author: Arnd Bergmann Date: Tue Jan 23 13:51:42 2024 +0100 powerpc: 85xx: mark local functions static These functions are either used in only one file and can just be made static or need an #include statement to avoid a warning: arch/powerpc/platforms/85xx/mpc8536_ds.c:30:13: error: no previous prototype for 'mpc8536_ds_pic_init' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/p1010rdb.c:27:13: error: no previous prototype for 'p1010_rdb_pic_init' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/p1022_ds.c:373:6: error: no previous prototype for 'p1022ds_set_pixel_clock' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/p1022_ds.c:422:1: error: no previous prototype for 'p1022ds_valid_monitor_port' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/p1022_ds.c:435:13: error: no previous prototype for 'p1022_ds_pic_init' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/p1022_rdk.c:43:6: error: no previous prototype for 'p1022rdk_set_pixel_clock' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/p1022_rdk.c:92:1: error: no previous prototype for 'p1022rdk_valid_monitor_port' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/p1022_rdk.c:99:13: error: no previous prototype for 'p1022_rdk_pic_init' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/socrates_fpga_pic.c:273:13: error: no previous prototype for 'socrates_fpga_pic_init' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/xes_mpc85xx.c:40:13: error: no previous prototype for 'xes_mpc85xx_pic_init' [-Werror=missing-prototypes] arch/powerpc/platforms/85xx/mvme2500.c:24:13: error: no previous prototype for 'mvme2500_pic_init' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://msgid.link/20240123125148.2004648-2-arnd@kernel.org commit 5c84bc8b617bf90e722cc57d447abd9a468d3a52 Author: Arnd Bergmann Date: Tue Jan 23 13:51:41 2024 +0100 powerpc: udbg_memcons: mark functions static ppc64_book3e_allmodconfig has one more driver that triggeres a few missing-prototypes warnings: arch/powerpc/sysdev/udbg_memcons.c:44:6: error: no previous prototype for 'memcons_putc' [-Werror=missing-prototypes] arch/powerpc/sysdev/udbg_memcons.c:57:5: error: no previous prototype for 'memcons_getc_poll' [-Werror=missing-prototypes] arch/powerpc/sysdev/udbg_memcons.c:80:5: error: no previous prototype for 'memcons_getc' [-Werror=missing-prototypes] Mark all these function static as there are no other users. Signed-off-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://msgid.link/20240123125148.2004648-1-arnd@kernel.org commit dad6a09f3148257ac1773cd90934d721d68ab595 Author: Frederic Weisbecker Date: Mon Jan 29 15:56:36 2024 -0800 hrtimer: Report offline hrtimer enqueue The hrtimers migration on CPU-down hotplug process has been moved earlier, before the CPU actually goes to die. This leaves a small window of opportunity to queue an hrtimer in a blind spot, leaving it ignored. For example a practical case has been reported with RCU waking up a SCHED_FIFO task right before the CPUHP_AP_IDLE_DEAD stage, queuing that way a sched/rt timer to the local offline CPU. Make sure such situations never go unnoticed and warn when that happens. Fixes: 5c0930ccaad5 ("hrtimers: Push pending hrtimers away from outgoing CPU earlier") Reported-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240129235646.3171983-4-boqun.feng@gmail.com commit 610010737f74482a61896596a0116876ecf9e65c Author: Mario Limonciello Date: Mon Feb 5 15:48:53 2024 -0600 ASoC: amd: yc: Add DMI quirk for Lenovo Ideapad Pro 5 16ARP8 The laptop requires a quirk ID to enable its internal microphone. Add it to the DMI quirk table. Reported-by: Stanislav Petrov Closes: https://bugzilla.kernel.org/show_bug.cgi?id=216925 Cc: stable@vger.kernel.org Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20240205214853.2689-1-mario.limonciello@amd.com Signed-off-by: Mark Brown commit b083d24fcf57580cc0b45dd7b0b4f84d8c4624f4 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Feb 2 02:24:59 2024 +0000 selftests/net: Amend per-netns counter checks Selftests here check not only that connect()/accept() for TCP-AO/TCP-MD5/non-signed-TCP combinations do/don't establish connections, but also counters: those are per-AO-key, per-socket and per-netns. The counters are checked on the server's side, as the server listener has TCP-AO/TCP-MD5/no keys for different peers. All tests run in the same namespaces with the same veth pair, created in test_init(). After close() in both client and server, the sides go through the regular FIN/ACK + FIN/ACK sequence, which goes in the background. If the selftest has already started a new testing scenario, read per-netns counters - it may fail in the end iff it doesn't expect the TCPAOGood per-netns counters go up during the test. Let's just kill both TCP-AO sides - that will avoid any asynchronous background TCP-AO segments going to either sides. Reported-by: Jakub Kicinski Closes: https://lore.kernel.org/all/20240201132153.4d68f45e@kernel.org/T/#u Fixes: 6f0c472a6815 ("selftests/net: Add TCP-AO + TCP-MD5 + no sign listen socket tests") Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20240202-unsigned-md5-netns-counters-v1-1-8b90c37c0566@arista.com Signed-off-by: Paolo Abeni commit e459647710070684a48384d67742822379de8c1c Author: Nathan Chancellor Date: Fri Feb 2 16:53:21 2024 -0700 x86/coco: Define cc_vendor without CONFIG_ARCH_HAS_CC_PLATFORM After commit a9ef277488cf ("x86/kvm: Fix SEV check in sev_map_percpu_data()"), there is a build error when building x86_64_defconfig with GCOV using LLVM: ld.lld: error: undefined symbol: cc_vendor >>> referenced by kvm.c >>> arch/x86/kernel/kvm.o:(kvm_smp_prepare_boot_cpu) in archive vmlinux.a which corresponds to if (cc_vendor != CC_VENDOR_AMD || !cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) return; Without GCOV, clang is able to eliminate the use of cc_vendor because cc_platform_has() evaluates to false when CONFIG_ARCH_HAS_CC_PLATFORM is not set, meaning that if statement will be true no matter what value cc_vendor has. With GCOV, the instrumentation keeps the use of cc_vendor around for code coverage purposes but cc_vendor is only declared, not defined, without CONFIG_ARCH_HAS_CC_PLATFORM, leading to the build error above. Provide a macro definition of cc_vendor when CONFIG_ARCH_HAS_CC_PLATFORM is not set with a value of CC_VENDOR_NONE, so that the first condition can always be evaluated/eliminated at compile time, avoiding the build error altogether. This is very similar to the situation prior to commit da86eb961184 ("x86/coco: Get rid of accessor functions"). Signed-off-by: Nathan Chancellor Acked-by: Borislav Petkov (AMD) Message-Id: <20240202-provide-cc_vendor-without-arch_has_cc_platform-v1-1-09ad5f2a3099@kernel.org> Fixes: a9ef277488cf ("x86/kvm: Fix SEV check in sev_map_percpu_data()", 2024-01-31) Signed-off-by: Paolo Bonzini commit 3871aa01e1a779d866fa9dfdd5a836f342f4eb87 Author: Shigeru Yoshida Date: Thu Feb 1 00:23:09 2024 +0900 tipc: Check the bearer type before calling tipc_udp_nl_bearer_add() syzbot reported the following general protection fault [1]: general protection fault, probably for non-canonical address 0xdffffc0000000010: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000080-0x0000000000000087] ... RIP: 0010:tipc_udp_is_known_peer+0x9c/0x250 net/tipc/udp_media.c:291 ... Call Trace: tipc_udp_nl_bearer_add+0x212/0x2f0 net/tipc/udp_media.c:646 tipc_nl_bearer_add+0x21e/0x360 net/tipc/bearer.c:1089 genl_family_rcv_msg_doit+0x1fc/0x2e0 net/netlink/genetlink.c:972 genl_family_rcv_msg net/netlink/genetlink.c:1052 [inline] genl_rcv_msg+0x561/0x800 net/netlink/genetlink.c:1067 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2544 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1076 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x53b/0x810 net/netlink/af_netlink.c:1367 netlink_sendmsg+0x8b7/0xd70 net/netlink/af_netlink.c:1909 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2584 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2638 __sys_sendmsg+0x117/0x1e0 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b The cause of this issue is that when tipc_nl_bearer_add() is called with the TIPC_NLA_BEARER_UDP_OPTS attribute, tipc_udp_nl_bearer_add() is called even if the bearer is not UDP. tipc_udp_is_known_peer() called by tipc_udp_nl_bearer_add() assumes that the media_ptr field of the tipc_bearer has an udp_bearer type object, so the function goes crazy for non-UDP bearers. This patch fixes the issue by checking the bearer type before calling tipc_udp_nl_bearer_add() in tipc_nl_bearer_add(). Fixes: ef20cd4dd163 ("tipc: introduce UDP replicast") Reported-and-tested-by: syzbot+5142b87a9abc510e14fa@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=5142b87a9abc510e14fa [1] Signed-off-by: Shigeru Yoshida Reviewed-by: Tung Nguyen Link: https://lore.kernel.org/r/20240131152310.4089541-1-syoshida@redhat.com Signed-off-by: Paolo Abeni commit 99bd3cb0d12e85d5114425353552121ec8f93adc Merge: 54be6c6c5ae8e 7b508b323b2ec Author: Linus Torvalds Date: Tue Feb 6 07:38:31 2024 +0000 Merge tag 'bcachefs-2024-02-05' of https://evilpiepirate.org/git/bcachefs Pull bcachefs fixes from Kent Overstreet: "Two serious ones here that we'll want to backport to stable: a fix for a race in the thread_with_file code, and another locking fixup in the subvolume deletion path" * tag 'bcachefs-2024-02-05' of https://evilpiepirate.org/git/bcachefs: bcachefs: time_stats: Check for last_event == 0 when updating freq stats bcachefs: install fd later to avoid race with close bcachefs: unlock parent dir if entry is not found in subvolume deletion bcachefs: Fix build on parisc by avoiding __multi3() commit 7bca405c986075c99b9f729d3587b5c45db39d01 Author: Lucas Stach Date: Fri Jan 19 19:50:26 2024 +0100 bus: imx-weim: fix valid range check When the range parsing was open-coded the number of u32 entries to parse had to be a multiple of 4 and the driver checks this. With the range parsing converted to the range parser the counting changes from individual u32 entries to a complete range, so the check must not reject counts not divisible by 4. Fixes: 2a88e4792c6d ("bus: imx-weim: Remove open coded "ranges" parsing") Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit cca5efe77a6a2d02b3da4960f799fa233e460ab1 Author: Kees Cook Date: Tue Feb 6 12:32:05 2024 +0800 LoongArch: vDSO: Disable UBSAN instrumentation The vDSO executes in userspace, so the kernel's UBSAN should not instrument it. Solves these kind of build errors: loongarch64-linux-ld: arch/loongarch/vdso/vgettimeofday.o: in function `vdso_shift_ns': lib/vdso/gettimeofday.c:23:(.text+0x3f8): undefined reference to `__ubsan_handle_shift_out_of_bounds' Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401310530.lZHCj1Zl-lkp@intel.com/ Cc: Huacai Chen Cc: WANG Xuerui Cc: Vincenzo Frascino Cc: Nathan Chancellor Cc: Masahiro Yamada Cc: Fangrui Song Cc: loongarch@lists.linux.dev Signed-off-by: Kees Cook Signed-off-by: Huacai Chen commit 639420e9f6cd9ca074732b17ac450d2518d5937f Author: Huacai Chen Date: Tue Feb 6 12:32:05 2024 +0800 LoongArch: Fix earlycon parameter if KASAN enabled The earlycon parameter is based on fixmap, and fixmap addresses are not supposed to be shadowed by KASAN. So return the kasan_early_shadow_page in kasan_mem_to_shadow() if the input address is above FIXADDR_START. Otherwise earlycon cannot work after kasan_init(). Cc: stable@vger.kernel.org Fixes: 5aa4ac64e6add3e ("LoongArch: Add KASAN (Kernel Address Sanitizer) support") Signed-off-by: Huacai Chen commit 4551b30525cf3d2f026b92401ffe241eb04dfebe Author: Huacai Chen Date: Tue Feb 6 12:32:05 2024 +0800 LoongArch: Change acpi_core_pic[NR_CPUS] to acpi_core_pic[MAX_CORE_PIC] With default config, the value of NR_CPUS is 64. When HW platform has more then 64 cpus, system will crash on these platforms. MAX_CORE_PIC is the maximum cpu number in MADT table (max physical number) which can exceed the supported maximum cpu number (NR_CPUS, max logical number), but kernel should not crash. Kernel should boot cpus with NR_CPUS, let the remainder cpus stay in BIOS. The potential crash reason is that the array acpi_core_pic[NR_CPUS] can be overflowed when parsing MADT table, and it is obvious that CORE_PIC should be corresponding to physical core rather than logical core, so it is better to define the array as acpi_core_pic[MAX_CORE_PIC]. With the patch, system can boot up 64 vcpus with qemu parameter -smp 128, otherwise system will crash with the following message. [ 0.000000] CPU 0 Unable to handle kernel paging request at virtual address 0000420000004259, era == 90000000037a5f0c, ra == 90000000037a46ec [ 0.000000] Oops[#1]: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.8.0-rc2+ #192 [ 0.000000] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022 [ 0.000000] pc 90000000037a5f0c ra 90000000037a46ec tp 9000000003c90000 sp 9000000003c93d60 [ 0.000000] a0 0000000000000019 a1 9000000003d93bc0 a2 0000000000000000 a3 9000000003c93bd8 [ 0.000000] a4 9000000003c93a74 a5 9000000083c93a67 a6 9000000003c938f0 a7 0000000000000005 [ 0.000000] t0 0000420000004201 t1 0000000000000000 t2 0000000000000001 t3 0000000000000001 [ 0.000000] t4 0000000000000003 t5 0000000000000000 t6 0000000000000030 t7 0000000000000063 [ 0.000000] t8 0000000000000014 u0 ffffffffffffffff s9 0000000000000000 s0 9000000003caee98 [ 0.000000] s1 90000000041b0480 s2 9000000003c93da0 s3 9000000003c93d98 s4 9000000003c93d90 [ 0.000000] s5 9000000003caa000 s6 000000000a7fd000 s7 000000000f556b60 s8 000000000e0a4330 [ 0.000000] ra: 90000000037a46ec platform_init+0x214/0x250 [ 0.000000] ERA: 90000000037a5f0c efi_runtime_init+0x30/0x94 [ 0.000000] CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) [ 0.000000] PRMD: 00000000 (PPLV0 -PIE -PWE) [ 0.000000] EUEN: 00000000 (-FPE -SXE -ASXE -BTE) [ 0.000000] ECFG: 00070800 (LIE=11 VS=7) [ 0.000000] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0) [ 0.000000] BADV: 0000420000004259 [ 0.000000] PRID: 0014c010 (Loongson-64bit, Loongson-3A5000) [ 0.000000] Modules linked in: [ 0.000000] Process swapper (pid: 0, threadinfo=(____ptrval____), task=(____ptrval____)) [ 0.000000] Stack : 9000000003c93a14 9000000003800898 90000000041844f8 90000000037a46ec [ 0.000000] 000000000a7fd000 0000000008290000 0000000000000000 0000000000000000 [ 0.000000] 0000000000000000 0000000000000000 00000000019d8000 000000000f556b60 [ 0.000000] 000000000a7fd000 000000000f556b08 9000000003ca7700 9000000003800000 [ 0.000000] 9000000003c93e50 9000000003800898 9000000003800108 90000000037a484c [ 0.000000] 000000000e0a4330 000000000f556b60 000000000a7fd000 000000000f556b08 [ 0.000000] 9000000003ca7700 9000000004184000 0000000000200000 000000000e02b018 [ 0.000000] 000000000a7fd000 90000000037a0790 9000000003800108 0000000000000000 [ 0.000000] 0000000000000000 000000000e0a4330 000000000f556b60 000000000a7fd000 [ 0.000000] 000000000f556b08 000000000eaae298 000000000eaa5040 0000000000200000 [ 0.000000] ... [ 0.000000] Call Trace: [ 0.000000] [<90000000037a5f0c>] efi_runtime_init+0x30/0x94 [ 0.000000] [<90000000037a46ec>] platform_init+0x214/0x250 [ 0.000000] [<90000000037a484c>] setup_arch+0x124/0x45c [ 0.000000] [<90000000037a0790>] start_kernel+0x90/0x670 [ 0.000000] [<900000000378b0d8>] kernel_entry+0xd8/0xdc Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 6b79ecd084c99b31c8b4d0beda08893716d5558e Author: Masahiro Yamada Date: Tue Feb 6 12:32:05 2024 +0800 LoongArch: Select HAVE_ARCH_SECCOMP to use the common SECCOMP menu LoongArch missed the refactoring made by commit 282a181b1a0d ("seccomp: Move config option SECCOMP to arch/Kconfig") because LoongArch was not mainlined at that time. The 'depends on PROC_FS' statement is stale as described in that commit. Select HAVE_ARCH_SECCOMP, and remove the duplicated config entry. Signed-off-by: Masahiro Yamada Signed-off-by: Huacai Chen commit b3ff2d9c3a9c64cd0a011cdd407ffc38a6ea8788 Author: Masahiro Yamada Date: Tue Feb 6 12:32:05 2024 +0800 LoongArch: Select ARCH_ENABLE_THP_MIGRATION instead of redefining it ARCH_ENABLE_THP_MIGRATION is supposed to be selected by arch Kconfig. Signed-off-by: Masahiro Yamada Signed-off-by: Huacai Chen commit d0399da9fb5f8e3d897b9776bffee2d3bfe20210 Author: Matthew Brost Date: Mon Jan 29 19:04:13 2024 -0800 drm/sched: Re-queue run job worker when drm_sched_entity_pop_job() returns NULL Rather then loop over entities until one with a ready job is found, re-queue the run job worker when drm_sched_entity_pop_job() returns NULL. Signed-off-by: Matthew Brost Reviewed-by: Christian König Fixes: 66dbd9004a55 ("drm/sched: Drain all entities in DRM sched run job worker") Reviewed-by: Luben Tuikov Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20240130030413.2031009-1-matthew.brost@intel.com commit aac8a59537dfc704ff344f1aacfd143c089ee20f Author: Tejun Heo Date: Mon Feb 5 15:43:41 2024 -1000 Revert "workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()" This reverts commit ca10d851b9ad0338c19e8e3089e24d565ebfffd7. The commit allowed workqueue_apply_unbound_cpumask() to clear __WQ_ORDERED on now removed implicitly ordered workqueues. This was incorrect in that system-wide config change shouldn't break ordering properties of all workqueues. The reason why apply_workqueue_attrs() path was allowed to do so was because it was targeting the specific workqueue - either the workqueue had WQ_SYSFS set or the workqueue user specifically tried to change max_active, both of which indicate that the workqueue doesn't need to be ordered. The implicitly ordered workqueue promotion was removed by the previous commit 3bc1e711c26b ("workqueue: Don't implicitly make UNBOUND workqueues w/ @max_active==1 ordered"). However, it didn't update this path and broke build. Let's revert the commit which was incorrect in the first place which also fixes build. Signed-off-by: Tejun Heo Fixes: 3bc1e711c26b ("workqueue: Don't implicitly make UNBOUND workqueues w/ @max_active==1 ordered") Fixes: ca10d851b9ad ("workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()") Cc: stable@vger.kernel.org # v6.6+ Signed-off-by: Tejun Heo commit 17e94b2585417e04dabc2f13bc03b4665ae687f3 Author: SEO HOYOUNG Date: Mon Jan 22 17:33:24 2024 +0900 scsi: ufs: core: Remove the ufshcd_release() in ufshcd_err_handling_prepare() If ufshcd_err_handler() is called in a suspend/resume situation, ufs_release() can be called twice and active_reqs end up going negative. This is because ufshcd_err_handling_prepare() and ufshcd_err_handling_unprepare() both call ufshcd_release(). Remove superfluous call to ufshcd_release(). Signed-off-by: SEO HOYOUNG Link: https://lore.kernel.org/r/20240122083324.11797-1-hy50.seo@samsung.com Reviewed-by: Bart Van Assche Reviewed-by: Can Guo Signed-off-by: Martin K. Petersen commit b513d30d59bb383a6a5d6b533afcab2cee99a8f8 Author: Alice Chao Date: Mon Feb 5 18:49:04 2024 +0800 scsi: ufs: core: Fix shift issue in ufshcd_clear_cmd() When task_tag >= 32 (in MCQ mode) and sizeof(unsigned int) == 4, 1U << task_tag will out of bounds for a u32 mask. Fix this up to prevent SHIFT_ISSUE (bitwise shifts that are out of bounds for their data type). [name:debug_monitors&]Unexpected kernel BRK exception at EL1 [name:traps&]Internal error: BRK handler: 00000000f2005514 [#1] PREEMPT SMP [name:mediatek_cpufreq_hw&]cpufreq stop DVFS log done [name:mrdump&]Kernel Offset: 0x1ba5800000 from 0xffffffc008000000 [name:mrdump&]PHYS_OFFSET: 0x80000000 [name:mrdump&]pstate: 22400005 (nzCv daif +PAN -UAO) [name:mrdump&]pc : [0xffffffdbaf52bb2c] ufshcd_clear_cmd+0x280/0x288 [name:mrdump&]lr : [0xffffffdbaf52a774] ufshcd_wait_for_dev_cmd+0x3e4/0x82c [name:mrdump&]sp : ffffffc0081471b0 Workqueue: ufs_eh_wq_0 ufshcd_err_handler Call trace: dump_backtrace+0xf8/0x144 show_stack+0x18/0x24 dump_stack_lvl+0x78/0x9c dump_stack+0x18/0x44 mrdump_common_die+0x254/0x480 [mrdump] ipanic_die+0x20/0x30 [mrdump] notify_die+0x15c/0x204 die+0x10c/0x5f8 arm64_notify_die+0x74/0x13c do_debug_exception+0x164/0x26c el1_dbg+0x64/0x80 el1h_64_sync_handler+0x3c/0x90 el1h_64_sync+0x68/0x6c ufshcd_clear_cmd+0x280/0x288 ufshcd_wait_for_dev_cmd+0x3e4/0x82c ufshcd_exec_dev_cmd+0x5bc/0x9ac ufshcd_verify_dev_init+0x84/0x1c8 ufshcd_probe_hba+0x724/0x1ce0 ufshcd_host_reset_and_restore+0x260/0x574 ufshcd_reset_and_restore+0x138/0xbd0 ufshcd_err_handler+0x1218/0x2f28 process_one_work+0x5fc/0x1140 worker_thread+0x7d8/0xe20 kthread+0x25c/0x468 ret_from_fork+0x10/0x20 Signed-off-by: Alice Chao Link: https://lore.kernel.org/r/20240205104905.24929-1-alice.chao@mediatek.com Reviewed-by: Stanley Jhu Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit d6c1b19153f92e95e5e1801d540e98771053afae Author: Hannes Reinecke Date: Wed Dec 20 17:26:58 2023 +0100 scsi: lpfc: Use unsigned type for num_sge LUNs going into "failed ready running" state observed on >1T and on even numbers of size (2T, 4T, 6T, 8T and 10T). The issue occurs when DIF is enabled at the host. The kernel logs: Cannot setup S/G List for HBAIO segs 1/1 SGL 512 SCSI 256: 3 0 The host lpfc driver is failing to setup scatter/gather list (protection data) for the I/Os. The return type lpfc_bg_setup_sgl()/lpfc_bg_setup_sgl_prot() causes the compiler to remove the most significant bit. Use an unsigned type instead. Signed-off-by: Hannes Reinecke [dwagner: added commit message] Signed-off-by: Daniel Wagner Link: https://lore.kernel.org/r/20231220162658.12392-1-dwagner@suse.de Signed-off-by: Martin K. Petersen commit 4e6c9011990726f4d175e2cdfebe5b0b8cce4839 Author: Ming Lei Date: Sat Feb 3 10:45:21 2024 +0800 scsi: core: Move scsi_host_busy() out of host lock if it is for per-command Commit 4373534a9850 ("scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler") intended to fix a hard lockup issue triggered by EH. The core idea was to move scsi_host_busy() out of the host lock when processing individual commands for EH. However, a suggested style change inadvertently caused scsi_host_busy() to remain under the host lock. Fix this by calling scsi_host_busy() outside the lock. Fixes: 4373534a9850 ("scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler") Cc: Sathya Prakash Veerichetty Cc: Bart Van Assche Cc: Ewan D. Milne Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20240203024521.2006455-1-ming.lei@redhat.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 3376ca3f1a2075eaa23c5576c47d04d7e8a4adda Author: Mathias Krause Date: Sat Feb 3 13:45:20 2024 +0100 KVM: x86: Fix KVM_GET_MSRS stack info leak Commit 6abe9c1386e5 ("KVM: X86: Move ignore_msrs handling upper the stack") changed the 'ignore_msrs' handling, including sanitizing return values to the caller. This was fine until commit 12bc2132b15e ("KVM: X86: Do the same ignore_msrs check for feature msrs") which allowed non-existing feature MSRs to be ignored, i.e. to not generate an error on the ioctl() level. It even tried to preserve the sanitization of the return value. However, the logic is flawed, as '*data' will be overwritten again with the uninitialized stack value of msr.data. Fix this by simplifying the logic and always initializing msr.data, vanishing the need for an additional error exit path. Fixes: 12bc2132b15e ("KVM: X86: Do the same ignore_msrs check for feature msrs") Signed-off-by: Mathias Krause Reviewed-by: Xiaoyao Li Link: https://lore.kernel.org/r/20240203124522.592778-2-minipli@grsecurity.net Signed-off-by: Sean Christopherson commit 0647903efbc84b772325b4d24d9487e24d6d1e03 Author: Felix Fietkau Date: Sat Feb 3 14:24:46 2024 +0100 wifi: mt76: mt7996: fix fortify warning Copy cck and ofdm separately in order to avoid __read_overflow2_field warning. Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support") Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://msgid.link/20240203132446.54790-1-nbd@nbd.name commit 34e659f34a7559ecfd9c1f5b24d4c291f3f54711 Author: Timur Tabi Date: Fri Feb 2 17:06:08 2024 -0600 drm/nouveau: nvkm_gsp_radix3_sg() should use nvkm_gsp_mem_ctor() Function nvkm_gsp_radix3_sg() uses nvkm_gsp_mem objects to allocate the radix3 tables, but it unnecessarily creates those objects manually instead of using the standard nvkm_gsp_mem_ctor() function like the rest of the code does. Signed-off-by: Timur Tabi Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240202230608.1981026-2-ttabi@nvidia.com commit 042b5f83841fbf7ce39474412db3b5e4765a7ea7 Author: Timur Tabi Date: Fri Feb 2 17:06:07 2024 -0600 drm/nouveau: fix several DMA buffer leaks Nouveau manages GSP-RM DMA buffers with nvkm_gsp_mem objects. Several of these buffers are never dealloced. Some of them can be deallocated right after GSP-RM is initialized, but the rest need to stay until the driver unloads. Also futher bullet-proof these objects by poisoning the buffer and clearing the nvkm_gsp_mem object when it is deallocated. Poisoning the buffer should trigger an error (or crash) from GSP-RM if it tries to access the buffer after we've deallocated it, because we were wrong about when it is safe to deallocate. Finally, change the mem->size field to a size_t because that's the same type that dma_alloc_coherent expects. Cc: # v6.7 Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") Signed-off-by: Timur Tabi Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240202230608.1981026-1-ttabi@nvidia.com commit 61712c94782ce105253ee1939cda0c5c025b2c0c Author: Dave Airlie Date: Tue Jan 30 13:26:43 2024 +1000 nouveau/gsp: use correct size for registry rpc. Timur pointed this out before, and it just slipped my mind, but this might help some things work better, around pcie power management. Cc: # v6.7 Fixes: 8d55b0a940bb ("nouveau/gsp: add some basic registry entries.") Signed-off-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20240130032643.2498315-1-airlied@gmail.com commit 17adc3f329e922bd1dd5aee45f43d9dab351c1e9 Author: Rob Herring Date: Mon Jan 22 11:35:14 2024 -0600 net: marvell,prestera: Fix example PCI bus addressing The example for PCI devices has some addressing errors. 'reg' is written as if the parent bus is PCI, but the default bus for examples is 1 address and size cell. 'ranges' is defining config space with a size of 0. Generally, config space should not be defined in 'ranges', only PCI memory and I/O spaces. Fix these issues by updating the values with made-up, but valid values. This was uncovered with recent dtschema changes. Link: https://lore.kernel.org/r/20240122173514.935742-1-robh@kernel.org Signed-off-by: Rob Herring commit e6a30d0c48a1e8a68f1cc413bee65302ab03ddfb Author: Elad Nachman Date: Mon Feb 5 15:44:35 2024 +0200 mtd: rawnand: marvell: fix layouts The check in nand_base.c, nand_scan_tail() : has the following code: (ecc->steps * ecc->size != mtd->writesize) which fails for some NAND chips. Remove ECC entries in this driver which are not integral multiplications, and adjust the number of chunks for entries which fails the above calculation so it will calculate correctly (this was previously done automatically before the check and was removed in a later commit). Fixes: 68c18dae6888 ("mtd: rawnand: marvell: add missing layouts") Cc: stable@vger.kernel.org Signed-off-by: Elad Nachman Signed-off-by: Miquel Raynal commit 5ea9a7c5fe4149f165f0e3b624fe08df02b6c301 Author: NeilBrown Date: Mon Feb 5 13:22:39 2024 +1100 nfsd: don't take fi_lock in nfsd_break_deleg_cb() A recent change to check_for_locks() changed it to take ->flc_lock while holding ->fi_lock. This creates a lock inversion (reported by lockdep) because there is a case where ->fi_lock is taken while holding ->flc_lock. ->flc_lock is held across ->fl_lmops callbacks, and nfsd_break_deleg_cb() is one of those and does take ->fi_lock. However it doesn't need to. Prior to v4.17-rc1~110^2~22 ("nfsd: create a separate lease for each delegation") nfsd_break_deleg_cb() would walk the ->fi_delegations list and so needed the lock. Since then it doesn't walk the list and doesn't need the lock. Two actions are performed under the lock. One is to call nfsd_break_one_deleg which calls nfsd4_run_cb(). These doesn't act on the nfs4_file at all, so don't need the lock. The other is to set ->fi_had_conflict which is in the nfs4_file. This field is only ever set here (except when initialised to false) so there is no possible problem will multiple threads racing when setting it. The field is tested twice in nfs4_set_delegation(). The first test does not hold a lock and is documented as an opportunistic optimisation, so it doesn't impose any need to hold ->fi_lock while setting ->fi_had_conflict. The second test in nfs4_set_delegation() *is* make under ->fi_lock, so removing the locking when ->fi_had_conflict is set could make a change. The change could only be interesting if ->fi_had_conflict tested as false even though nfsd_break_one_deleg() ran before ->fi_lock was unlocked. i.e. while hash_delegation_locked() was running. As hash_delegation_lock() doesn't interact in any way with nfs4_run_cb() there can be no importance to this interaction. So this patch removes the locking from nfsd_break_one_deleg() and moves the final test on ->fi_had_conflict out of the locked region to make it clear that locking isn't important to the test. It is still tested *after* vfs_setlease() has succeeded. This might be significant and as vfs_setlease() takes ->flc_lock, and nfsd_break_one_deleg() is called under ->flc_lock this "after" is a true ordering provided by a spinlock. Fixes: edcf9725150e ("nfsd: fix RELEASE_LOCKOWNER") Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit c712c05e46c8ce550842951e9e2606e24dbf0475 Author: Carlos Song Date: Sun Feb 4 17:19:12 2024 +0800 spi: imx: fix the burst length at DMA mode and CPU mode For DMA mode, the bus width of the DMA is equal to the size of data word, so burst length should be configured as bits per word. For CPU mode, because of the spi transfer len is in byte, so calculate the total number of words according to spi transfer len and bits per word, burst length should be configured as total data bits. Signed-off-by: Carlos Song Reviewed-by: Clark Wang Fixes: e9b220aeacf1 ("spi: spi-imx: correctly configure burst length when using dma") Fixes: 5f66db08cbd3 ("spi: imx: Take in account bits per word instead of assuming 8-bits") Link: https://lore.kernel.org/r/20240204091912.36488-1-carlos.song@nxp.com Signed-off-by: Mark Brown commit 34a1066981a967eab619938e7b35a9be6b4c34e1 Author: Gergo Koteles Date: Sun Feb 4 21:01:17 2024 +0100 ASoC: tas2781: add module parameter to tascodec_init() The tascodec_init() of the snd-soc-tas2781-comlib module is called from snd-soc-tas2781-i2c and snd-hda-scodec-tas2781-i2c modules. It calls request_firmware_nowait() with parameter THIS_MODULE and a cont/callback from the latter modules. The latter modules can be removed while their callbacks are running, resulting in a general protection failure. Add module parameter to tascodec_init() so request_firmware_nowait() can be called with the module of the callback. Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver") CC: stable@vger.kernel.org Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/118dad922cef50525e5aab09badef2fa0eb796e5.1707076603.git.soyer@irl.hu Signed-off-by: Mark Brown commit b5fbde22684af5456d1de60758950944d69d69ad Author: Cezary Rojewski Date: Fri Feb 2 12:49:01 2024 +0100 ASoC: Intel: avs: Fix pci_probe() error path Recent changes modified operation-order in the probe() function without updating its error path accordingly. If snd_hdac_i915_init() exists with status EPROBE_DEFER the error path must cleanup allocated IRQs before leaving the scope. Fixes: 2dddc514b6e4 ("ASoC: Intel: avs: Move snd_hdac_i915_init to before probe_work.") Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20240202114901.1002127-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit ac670505d825151ce47c1e75b9964485991954dd Author: Jeffrey Hugo Date: Fri Feb 2 10:43:13 2024 -0700 ASoC: dt-bindings: google,sc7280-herobrine: Drop bouncing @codeaurora The servers for the @codeaurora domain have long been retired and any messages sent there bounce. Srinivasa Rao Mandadapu has left the company and there does not appear to be an updated address to suggest, so drop Srinivasa as maintainer of the binding. The binding still appears to be maintined as Judy is listed. Signed-off-by: Jeffrey Hugo Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240202174313.4113670-1-quic_jhugo@quicinc.com Signed-off-by: Mark Brown commit 4703b014f28bf7a2e56d1da238ee95ef6c5ce76b Author: Dan Carpenter Date: Mon Feb 5 15:44:30 2024 +0300 ASoC: cs35l56: fix reversed if statement in cs35l56_dspwait_asp1tx_put() It looks like the "!" character was added accidentally. The regmap_update_bits_check() function is normally going to succeed. This means the rest of the function is unreachable and we don't handle the situation where "changed" is true correctly. Fixes: 07f7d6e7a124 ("ASoC: cs35l56: Fix for initializing ASP1 mixer registers") Signed-off-by: Dan Carpenter Reviewed-by: Richard Fitzgerald Link: https://lore.kernel.org/r/0c254c07-d1c0-4a5c-a22b-7e135cab032c@moroto.mountain Signed-off-by: Mark Brown commit a99682e839af7be11a606bf802cba5b2bf93b8e9 Merge: 54be6c6c5ae8e 44e4192f88978 Author: Joonas Lahtinen Date: Mon Feb 5 15:56:47 2024 +0200 Merge tag 'gvt-fixes-2024-02-05' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2024-02-05 - Fix broken gvt doc link (Zhenyu) - Fix one uninitialized variable bug in warning (Dan) - Update Zhi's new email address in MAINTAINERS file. (Zhi) Signed-off-by: Joonas Lahtinen From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/ZcBULqJAL2CWJoHh@debian-scheme commit 5ab9bbf6c678444dd99afabd44665e7f04047cc5 Author: Miquel Raynal Date: Thu Jan 4 09:14:46 2024 +0100 mtd: Fix possible refcounting issue when going through partition nodes Under normal conditions, the loop goes over all child partitions, and 'breaks' when the relevant partition is found. In this case we get a reference to the partition node without ever releasing it. Indeed, right after the mtd_check_of_node() function returns, we call of_node_get() again over this very same node. It is probably safer to keep the counters even in this helper and call of_node_put() before break-ing. Reported-by: kernel test robot Reported-by: Julia Lawall Closes: https://lore.kernel.org/r/202312250546.ISzglvM2-lkp@intel.com/ Cc: Christian Marangi Cc: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240104081446.126540-1-miquel.raynal@bootlin.com commit a19747c3b9bf6476cc36d0a3a5ef0ff92999169e Author: Paolo Abeni Date: Fri Feb 2 17:06:59 2024 +0100 selftests: net: let big_tcp test cope with slow env In very slow environments, most big TCP cases including segmentation and reassembly of big TCP packets have a good chance to fail: by default the TCP client uses write size well below 64K. If the host is low enough autocorking is unable to build real big TCP packets. Address the issue using much larger write operations. Note that is hard to observe the issue without an extremely slow and/or overloaded environment; reduce the TCP transfer time to allow for much easier/faster reproducibility. Fixes: 6bb382bcf742 ("selftests: add a selftest for big tcp") Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Acked-by: Xin Long Signed-off-by: David S. Miller commit 645eb54331edb0dc0297c7e37162a3846bf99300 Merge: fdeba0b57d61b 41b7fa157ea1c Author: David S. Miller Date: Mon Feb 5 12:34:07 2024 +0000 Merge branch 'rxrpc-fixes' David Howells says: ==================== rxrpc: Miscellaneous fixes Here some miscellaneous fixes for AF_RXRPC: (1) The zero serial number has a special meaning in an ACK packet serial reference, so skip it when assigning serial numbers to transmitted packets. (2) Don't set the reference serial number in a delayed ACK as the ACK cannot be used for RTT calculation. (3) Don't emit a DUP ACK response to a PING RESPONSE ACK coming back to a call that completed in the meantime. (4) Fix the counting of acks and nacks in ACK packet to better drive congestion management. We want to know if there have been new acks/nacks since the last ACK packet, not that there are still acks/nacks. This is more complicated as we have to save the old SACK table and compare it. ==================== Signed-off-by: David S. Miller commit 41b7fa157ea1c8c3a575ca7f5f32034de9bee3ae Author: David Howells Date: Fri Feb 2 15:19:16 2024 +0000 rxrpc: Fix counting of new acks and nacks Fix the counting of new acks and nacks when parsing a packet - something that is used in congestion control. As the code stands, it merely notes if there are any nacks whereas what we really should do is compare the previous SACK table to the new one, assuming we get two successive ACK packets with nacks in them. However, we really don't want to do that if we can avoid it as the tables might not correspond directly as one may be shifted from the other - something that will only get harder to deal with once extended ACK tables come into full use (with a capacity of up to 8192). Instead, count the number of nacks shifted out of the old SACK, the number of nacks retained in the portion still active and the number of new acks and nacks in the new table then calculate what we need. Note this ends up a bit of an estimate as the Rx protocol allows acks to be withdrawn by the receiver and packets requested to be retransmitted. Fixes: d57a3a151660 ("rxrpc: Save last ACK's SACK table rather than marking txbufs") Signed-off-by: David Howells cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit 6f769f22822aa4124b556339781b04d810f0e038 Author: David Howells Date: Fri Feb 2 15:19:15 2024 +0000 rxrpc: Fix response to PING RESPONSE ACKs to a dead call Stop rxrpc from sending a DUP ACK in response to a PING RESPONSE ACK on a dead call. We may have initiated the ping but the call may have beaten the response to completion. Fixes: 18bfeba50dfd ("rxrpc: Perform terminal call ACK/ABORT retransmission from conn processor") Signed-off-by: David Howells cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit e7870cf13d20f56bfc19f9c3e89707c69cf104ef Author: David Howells Date: Fri Feb 2 15:19:14 2024 +0000 rxrpc: Fix delayed ACKs to not set the reference serial number Fix the construction of delayed ACKs to not set the reference serial number as they can't be used as an RTT reference. Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Signed-off-by: David Howells cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit f31041417bf7f4a4df8b3bfb52cb31bbe805b934 Author: David Howells Date: Fri Feb 2 15:19:13 2024 +0000 rxrpc: Fix generation of serial numbers to skip zero In the Rx protocol, every packet generated is marked with a per-connection monotonically increasing serial number. This number can be referenced in an ACK packet generated in response to an incoming packet - thereby allowing the sender to use this for RTT determination, amongst other things. However, if the reference field in the ACK is zero, it doesn't refer to any incoming packet (it could be a ping to find out if a packet got lost, for example) - so we shouldn't generate zero serial numbers. Fix the generation of serial numbers to retry if it comes up with a zero. Furthermore, since the serial numbers are only ever allocated within the I/O thread this connection is bound to, there's no need for atomics so remove that too. Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Signed-off-by: David Howells cc: Marc Dionne cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit 4a7aee96200ad281a5cc4cf5c7a2e2a49d2b97b0 Author: Jiangfeng Xiao Date: Tue Jan 23 09:45:59 2024 +0800 powerpc/kasan: Fix addr error caused by page alignment In kasan_init_region, when k_start is not page aligned, at the begin of for loop, k_cur = k_start & PAGE_MASK is less than k_start, and then `va = block + k_cur - k_start` is less than block, the addr va is invalid, because the memory address space from va to block is not alloced by memblock_alloc, which will not be reserved by memblock_reserve later, it will be used by other places. As a result, memory overwriting occurs. for example: int __init __weak kasan_init_region(void *start, size_t size) { [...] /* if say block(dcd97000) k_start(feef7400) k_end(feeff3fe) */ block = memblock_alloc(k_end - k_start, PAGE_SIZE); [...] for (k_cur = k_start & PAGE_MASK; k_cur < k_end; k_cur += PAGE_SIZE) { /* at the begin of for loop * block(dcd97000) va(dcd96c00) k_cur(feef7000) k_start(feef7400) * va(dcd96c00) is less than block(dcd97000), va is invalid */ void *va = block + k_cur - k_start; [...] } [...] } Therefore, page alignment is performed on k_start before memblock_alloc() to ensure the validity of the VA address. Fixes: 663c0c9496a6 ("powerpc/kasan: Fix shadow area set up for modules.") Signed-off-by: Jiangfeng Xiao Signed-off-by: Michael Ellerman Link: https://msgid.link/1705974359-43790-1-git-send-email-xiaojiangfeng@huawei.com commit a038a3ff8c6582404834852c043dadc73a5b68b4 Author: Matthias Schiffer Date: Wed Jan 24 11:38:38 2024 +0100 powerpc/6xx: set High BAT Enable flag on G2_LE cores MMU_FTR_USE_HIGH_BATS is set for G2_LE cores and derivatives like e300cX, but the high BATs need to be enabled in HID2 to work. Add register definitions and add the needed setup to __setup_cpu_603. This fixes boot on CPUs like the MPC5200B with STRICT_KERNEL_RWX enabled on systems where the flag has not been set by the bootloader already. Fixes: e4d6654ebe6e ("powerpc/mm/32s: rework mmu_mapin_ram()") Signed-off-by: Matthias Schiffer Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20240124103838.43675-1-matthias.schiffer@ew.tq-group.com commit f09696279b5dd1770a3de2e062f1c5d1449213ff Author: R Nageswara Sastry Date: Wed Jan 31 18:38:59 2024 +0530 selftests/powerpc/papr_vpd: Check devfd before get_system_loc_code() Calling get_system_loc_code before checking devfd and errno fails the test when the device is not available, the expected behaviour is a SKIP. Change the order of 'SKIP_IF_MSG' to correctly SKIP when the /dev/ papr-vpd device is not available. Test output before: Test FAILED on line 271 Test output after: [SKIP] Test skipped on line 266: /dev/papr-vpd not present Signed-off-by: R Nageswara Sastry Signed-off-by: Michael Ellerman Link: https://msgid.link/20240131130859.14968-1-rnsastry@linux.ibm.com commit aad98efd0b121f63a2e1c221dcb4d4850128c697 Author: Naveen N Rao Date: Fri Feb 2 21:13:16 2024 +0530 powerpc/64: Set task pt_regs->link to the LR value on scv entry Nysal reported that userspace backtraces are missing in offcputime bcc tool. As an example: $ sudo ./bcc/tools/offcputime.py -uU Tracing off-CPU time (us) of user threads by user stack... Hit Ctrl-C to end. ^C write - python (9107) 8 write - sudo (9105) 9 mmap - python (9107) 16 clock_nanosleep - multipathd (697) 3001604 The offcputime bcc tool attaches a bpf program to a kprobe on finish_task_switch(), which is usually hit on a syscall from userspace. With the switch to system call vectored, we started setting pt_regs->link to zero. This is because system call vectored behaves like a function call with LR pointing to the system call return address, and with no modification to SRR0/SRR1. The LR value does indicate our next instruction, so it is being saved as pt_regs->nip, and pt_regs->link is being set to zero. This is not a problem by itself, but BPF uses perf callchain infrastructure for capturing stack traces, and that stores LR as the second entry in the stack trace. perf has code to cope with the second entry being zero, and skips over it. However, generic userspace unwinders assume that a zero entry indicates end of the stack trace, resulting in a truncated userspace stack trace. Rather than fixing all userspace unwinders to ignore/skip past the second entry, store the real LR value in pt_regs->link so that there continues to be a valid, though duplicate entry in the stack trace. With this change: $ sudo ./bcc/tools/offcputime.py -uU Tracing off-CPU time (us) of user threads by user stack... Hit Ctrl-C to end. ^C write write [unknown] [unknown] [unknown] [unknown] [unknown] PyObject_VectorcallMethod [unknown] [unknown] PyObject_CallOneArg PyFile_WriteObject PyFile_WriteString [unknown] [unknown] PyObject_Vectorcall _PyEval_EvalFrameDefault PyEval_EvalCode [unknown] [unknown] [unknown] _PyRun_SimpleFileObject _PyRun_AnyFileObject Py_RunMain [unknown] Py_BytesMain [unknown] __libc_start_main - python (1293) 7 write write [unknown] sudo_ev_loop_v1 sudo_ev_dispatch_v1 [unknown] [unknown] [unknown] [unknown] __libc_start_main - sudo (1291) 7 syscall syscall bpf_open_perf_buffer_opts [unknown] [unknown] [unknown] [unknown] _PyObject_MakeTpCall PyObject_Vectorcall _PyEval_EvalFrameDefault PyEval_EvalCode [unknown] [unknown] [unknown] _PyRun_SimpleFileObject _PyRun_AnyFileObject Py_RunMain [unknown] Py_BytesMain [unknown] __libc_start_main - python (1293) 11 clock_nanosleep clock_nanosleep nanosleep sleep [unknown] [unknown] __clone - multipathd (698) 3001661 Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv instructions") Cc: stable@vger.kernel.org Reported-by: "Nysal Jan K.A" Signed-off-by: Naveen N Rao Signed-off-by: Michael Ellerman Link: https://msgid.link/20240202154316.395276-1-naveen@kernel.org commit ed8b94f6e0acd652ce69bd69d678a0c769172df8 Author: Gaurav Batra Date: Mon Jan 22 16:24:07 2024 -0600 powerpc/pseries/iommu: Fix iommu initialisation during DLPAR add When a PCI device is dynamically added, the kernel oopses with a NULL pointer dereference: BUG: Kernel NULL pointer dereference on read at 0x00000030 Faulting instruction address: 0xc0000000006bbe5c Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries Modules linked in: rpadlpar_io rpaphp rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs xsk_diag bonding nft_compat nf_tables nfnetlink rfkill binfmt_misc dm_multipath rpcrdma sunrpc rdma_ucm ib_srpt ib_isert iscsi_target_mod target_core_mod ib_umad ib_iser libiscsi scsi_transport_iscsi ib_ipoib rdma_cm iw_cm ib_cm mlx5_ib ib_uverbs ib_core pseries_rng drm drm_panel_orientation_quirks xfs libcrc32c mlx5_core mlxfw sd_mod t10_pi sg tls ibmvscsi ibmveth scsi_transport_srp vmx_crypto pseries_wdt psample dm_mirror dm_region_hash dm_log dm_mod fuse CPU: 17 PID: 2685 Comm: drmgr Not tainted 6.7.0-203405+ #66 Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_008) hv:phyp pSeries NIP: c0000000006bbe5c LR: c000000000a13e68 CTR: c0000000000579f8 REGS: c00000009924f240 TRAP: 0300 Not tainted (6.7.0-203405+) MSR: 8000000000009033 CR: 24002220 XER: 20040006 CFAR: c000000000a13e64 DAR: 0000000000000030 DSISR: 40000000 IRQMASK: 0 ... NIP sysfs_add_link_to_group+0x34/0x94 LR iommu_device_link+0x5c/0x118 Call Trace: iommu_init_device+0x26c/0x318 (unreliable) iommu_device_link+0x5c/0x118 iommu_init_device+0xa8/0x318 iommu_probe_device+0xc0/0x134 iommu_bus_notifier+0x44/0x104 notifier_call_chain+0xb8/0x19c blocking_notifier_call_chain+0x64/0x98 bus_notify+0x50/0x7c device_add+0x640/0x918 pci_device_add+0x23c/0x298 of_create_pci_dev+0x400/0x884 of_scan_pci_dev+0x124/0x1b0 __of_scan_bus+0x78/0x18c pcibios_scan_phb+0x2a4/0x3b0 init_phb_dynamic+0xb8/0x110 dlpar_add_slot+0x170/0x3b8 [rpadlpar_io] add_slot_store.part.0+0xb4/0x130 [rpadlpar_io] kobj_attr_store+0x2c/0x48 sysfs_kf_write+0x64/0x78 kernfs_fop_write_iter+0x1b0/0x290 vfs_write+0x350/0x4a0 ksys_write+0x84/0x140 system_call_exception+0x124/0x330 system_call_vectored_common+0x15c/0x2ec Commit a940904443e4 ("powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains") broke DLPAR add of PCI devices. The above added iommu_device structure to pci_controller. During system boot, PCI devices are discovered and this newly added iommu_device structure is initialized by a call to iommu_device_register(). During DLPAR add of a PCI device, a new pci_controller structure is allocated but there are no calls made to iommu_device_register() interface. Fix is to register the iommu device during DLPAR add as well. Fixes: a940904443e4 ("powerpc/iommu: Add iommu_ops to report capabilities and allow blocking domains") Signed-off-by: Gaurav Batra [mpe: Trim oops and tweak some change log wording] Signed-off-by: Michael Ellerman Link: https://msgid.link/20240122222407.39603-1-gbatra@linux.ibm.com commit 4856380063b18d2ac07a58e816f226a5c1b7ba42 Merge: 1c1914d6e8c6e 1f1626ac04288 Author: Maxime Ripard Date: Mon Feb 5 12:20:52 2024 +0100 Merge drm-misc-next-fixes-2024-01-19 into drm-misc-fixes Merge the last drm-misc-next-fixes tag that fell through the cracks. Signed-off-by: Maxime Ripard commit fdeba0b57d61b40a708de361294fde3e1495588d Merge: eef00a82c5689 0f4d6f011bca0 Author: David S. Miller Date: Mon Feb 5 11:11:09 2024 +0000 Merge branch 'nfp-fixes' Louis Peens says: ==================== nfp: a few simple driver fixes This is combining a few unrelated one-liner fixes which have been floating around internally into a single series. I'm not sure what is the least amount of overhead for reviewers, this or a separate submission per-patch? I guess it probably depends on personal preference, but please let me know if there is a strong preference to rather split these in the future. Summary: Patch1: Fixes an old issue which was hidden because 0 just so happens to be the correct value. Patch2: Fixes a corner case for flower offloading with bond ports Patch3: Re-enables the 'NETDEV_XDP_ACT_REDIRECT', which was accidentally disabled after a previous refactor. ==================== Signed-off-by: David S. Miller commit 0f4d6f011bca0df2051532b41b596366aa272019 Author: James Hershaw Date: Fri Feb 2 13:37:19 2024 +0200 nfp: enable NETDEV_XDP_ACT_REDIRECT feature flag Enable previously excluded xdp feature flag for NFD3 devices. This feature flag is required in order to bind nfp interfaces to an xdp socket and the nfp driver does in fact support the feature. Fixes: 66c0e13ad236 ("drivers: net: turn on XDP features") Cc: stable@vger.kernel.org # 6.3+ Signed-off-by: James Hershaw Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit 1a1c13303ff6d64e6f718dc8aa614e580ca8d9b4 Author: Daniel de Villiers Date: Fri Feb 2 13:37:18 2024 +0200 nfp: flower: prevent re-adding mac index for bonded port When physical ports are reset (either through link failure or manually toggled down and up again) that are slaved to a Linux bond with a tunnel endpoint IP address on the bond device, not all tunnel packets arriving on the bond port are decapped as expected. The bond dev assigns the same MAC address to itself and each of its slaves. When toggling a slave device, the same MAC address is therefore offloaded to the NFP multiple times with different indexes. The issue only occurs when re-adding the shared mac. The nfp_tunnel_add_shared_mac() function has a conditional check early on that checks if a mac entry already exists and if that mac entry is global: (entry && nfp_tunnel_is_mac_idx_global(entry->index)). In the case of a bonded device (For example br-ex), the mac index is obtained, and no new index is assigned. We therefore modify the conditional in nfp_tunnel_add_shared_mac() to check if the port belongs to the LAG along with the existing checks to prevent a new global mac index from being re-assigned to the slave port. Fixes: 20cce8865098 ("nfp: flower: enable MAC address sharing for offloadable devs") CC: stable@vger.kernel.org # 5.1+ Signed-off-by: Daniel de Villiers Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit b3d4f7f2288901ed2392695919b3c0e24c1b4084 Author: Daniel Basilio Date: Fri Feb 2 13:37:17 2024 +0200 nfp: use correct macro for LengthSelect in BAR config The 1st and 2nd expansion BAR configuration registers are configured, when the driver starts up, in variables 'barcfg_msix_general' and 'barcfg_msix_xpb', respectively. The 'LengthSelect' field is ORed in from bit 0, which is incorrect. The 'LengthSelect' field should start from bit 27. This has largely gone un-noticed because NFP_PCIE_BAR_PCIE2CPP_LengthSelect_32BIT happens to be 0. Fixes: 4cb584e0ee7d ("nfp: add CPP access core") Cc: stable@vger.kernel.org # 4.11+ Signed-off-by: Daniel Basilio Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit 59950610c0c00c7a06d8a75d2ee5d73dba4274cf Author: Han Xu Date: Wed Nov 8 09:07:01 2023 -0600 mtd: spinand: gigadevice: Fix the get ecc status issue Some GigaDevice ecc_get_status functions use on-stack buffer for spi_mem_op causes spi_mem_check_op failing, fix the issue by using spinand scratchbuf. Fixes: c40c7a990a46 ("mtd: spinand: Add support for GigaDevice GD5F1GQ4UExxG") Signed-off-by: Han Xu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231108150701.593912-1-han.xu@nxp.com commit 1ad55cecf22f05f1c884adf63cc09d3c3e609ebf Author: Ard Biesheuvel Date: Mon Feb 5 09:11:07 2024 +0100 x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section The .compat section is a dummy PE section that contains the address of the 32-bit entrypoint of the 64-bit kernel image if it is bootable from 32-bit firmware (i.e., CONFIG_EFI_MIXED=y) This section is only 8 bytes in size and is only referenced from the loader, and so it is placed at the end of the memory view of the image, to avoid the need for padding it to 4k, which is required for sections appearing in the middle of the image. Unfortunately, this violates the PE/COFF spec, and even if most EFI loaders will work correctly (including the Tianocore reference implementation), PE loaders do exist that reject such images, on the basis that both the file and memory views of the file contents should be described by the section headers in a monotonically increasing manner without leaving any gaps. So reorganize the sections to avoid this issue. This results in a slight padding overhead (< 4k) which can be avoided if desired by disabling CONFIG_EFI_MIXED (which is only needed in rare cases these days) Fixes: 3e3eabe26dc8 ("x86/boot: Increase section and file alignment to 4k/512") Reported-by: Mike Beaton Link: https://lkml.kernel.org/r/CAHzAAWQ6srV6LVNdmfbJhOwhBw5ZzxxZZ07aHt9oKkfYAdvuQQ%40mail.gmail.com Signed-off-by: Ard Biesheuvel commit 690085d866f08cc72ae4d601821564a0b63e32f3 Author: Fabio Estevam Date: Sat Jan 13 19:43:33 2024 -0300 Revert "arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector" This reverts commit 095b96b2b8c6dcabf40bbfe4bb99a95fe55c7463. Marek reported the similar change in imx8mp-dhcom-pdk3.dts caused a regression: "This patch breaks USB-C port on this board. If I plug in USB-C storage device, it is not detected. If I revert this patch, it is detected. Please drop this patch for now." Revert it here as well. Fixes: 095b96b2b8c6 ("arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit f954785a124e77d4e6bb52cab689a8de447999aa Author: Fabio Estevam Date: Sat Jan 13 19:43:32 2024 -0300 Revert "arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector" This reverts commit a4dca89fe8a1585af73e362f5f4e3189a00abf8e. Marek reported: "This patch breaks USB-C port on this board. If I plug in USB-C storage device, it is not detected. If I revert this patch, it is detected. Please drop this patch for now." Revert it to avoid the regression. Reported-by: Marek Vasut Closes: https://lore.kernel.org/linux-arm-kernel/623c294a-5c53-4e01-acbf-104acc180e14@denx.de/T/#u Fixes: a4dca89fe8a1 ("arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit a620a7f2ae8b08c5beea6369f61e87064ee222dc Author: Alexander Stein Date: Wed Jan 10 10:08:49 2024 +0100 arm64: dts: tqma8mpql: fix audio codec iov-supply IOVDD is supplied by 1.8V, fix the referenced regulator. Fixes: d8f9d8126582d ("arm64: dts: imx8mp: Add analog audio output on i.MX8MP TQMa8MPxL/MBa8MPxL") Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit fdfa083549de5d50ebf7f6811f33757781e838c0 Author: Bart Van Assche Date: Sun Feb 4 16:42:07 2024 -0800 RDMA/srpt: Support specifying the srpt_service_guid parameter Make loading ib_srpt with this parameter set work. The current behavior is that setting that parameter while loading the ib_srpt kernel module triggers the following kernel crash: BUG: kernel NULL pointer dereference, address: 0000000000000000 Call Trace: parse_one+0x18c/0x1d0 parse_args+0xe1/0x230 load_module+0x8de/0xa60 init_module_from_file+0x8b/0xd0 idempotent_init_module+0x181/0x240 __x64_sys_finit_module+0x5a/0xb0 do_syscall_64+0x5f/0xe0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 Cc: LiHonggang Reported-by: LiHonggang Fixes: a42d985bd5b2 ("ib_srpt: Initial SRP Target merge for v3.3-rc1") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240205004207.17031-1-bvanassche@acm.org Signed-off-by: Leon Romanovsky commit fddab35fd064414c677e9488c4fb3a1f67725d37 Author: Shuming Fan Date: Mon Feb 5 15:22:52 2024 +0800 ALSA: hda/realtek: add IDs for Dell dual spk platform This patch adds another two IDs for the Dell dual speaker platform. Signed-off-by: Shuming Fan Cc: Link: https://lore.kernel.org/r/20240205072252.3791500-1-shumingf@realtek.com Signed-off-by: Takashi Iwai commit 4639c5021029d49fd2f97fa8d74731f167f98919 Author: bo liu Date: Mon Feb 5 09:38:02 2024 +0800 ALSA: hda/conexant: Add quirk for SWS JS201D The SWS JS201D need a different pinconfig from windows driver. Add a quirk to use a specific pinconfig to SWS JS201D. Signed-off-by: bo liu Cc: Link: https://lore.kernel.org/r/20240205013802.51907-1-bo.liu@senarytech.com Signed-off-by: Takashi Iwai commit 7b508b323b2ec45be59769bd4e4aeba729c52cf6 Author: Kent Overstreet Date: Thu Feb 1 21:01:02 2024 -0500 bcachefs: time_stats: Check for last_event == 0 when updating freq stats This fixes spurious outliers in the frequency stats. Signed-off-by: Kent Overstreet commit dd839f31d7cd5e04f4111a219024268c6f6973f0 Author: Mathias Krause Date: Sun Feb 4 08:51:52 2024 +0100 bcachefs: install fd later to avoid race with close Calling fd_install() makes a file reachable for userland, including the possibility to close the file descriptor, which leads to calling its 'release' hook. If that happens before the code had a chance to bump the reference of the newly created task struct, the release callback will call put_task_struct() too early, leading to the premature destruction of the kernel thread. Avoid that race by calling fd_install() later, after all the setup is done. Fixes: 1c6fdbd8f246 ("bcachefs: Initial commit") Signed-off-by: Mathias Krause Signed-off-by: Kent Overstreet commit 8ded03ae48b3657e0fbca99d8a9d8fa1bfb8c9be Author: Nathan Lynch Date: Fri Feb 2 18:26:46 2024 -0600 powerpc/pseries/papr-sysparm: use u8 arrays for payloads Some PAPR system parameter values are formatted by firmware as nul-terminated strings (e.g. LPAR name, shared processor attributes). But the values returned for other parameters, such as processor module info and TLB block invalidate characteristics, are binary data with parameter-specific layouts. So char[] isn't the appropriate type for the general case. Use u8/__u8. Signed-off-by: Nathan Lynch Fixes: 905b9e48786e ("powerpc/pseries/papr-sysparm: Expose character device to user space") Signed-off-by: Michael Ellerman Link: https://msgid.link/20240202-papr-sysparm-ioblock-data-use-u8-v1-1-f5c6c89f65ec@linux.ibm.com commit 44e4192f88978e32e4ac08b27141f3767366f79b Author: Zhi Wang Date: Tue Jan 30 21:27:43 2024 +0000 MAINTAINERS: Update Zhi Wang's email address Update my email address to zhi.wang.linux@gmail.com. CC: Zhenyu Wang Acked-by: Zhenyu Wang Signed-off-by: Zhi Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20240130212743.7727-1-zhi.wang.linux@gmail.com commit 47caa96478b99d6d1199b89467cc3e5a6cc754ee Author: Dan Carpenter Date: Fri Jan 26 11:41:47 2024 +0300 drm/i915/gvt: Fix uninitialized variable in handle_mmio() This code prints the wrong variable in the warning message. It should print "i" instead of "info->offset". On the first iteration "info" is uninitialized leading to a crash and on subsequent iterations it prints the previous offset instead of the current one. Fixes: e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g") Signed-off-by: Dan Carpenter Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/11957c20-b178-4027-9b0a-e32e9591dd7c@moroto.mountain Reviewed-by: Zhenyu Wang commit 1a00897e5e96c29b21580dfcfec168dc16c67469 Author: Zhenyu Wang Date: Fri Aug 4 12:05:44 2023 +0800 drm/i915: Replace dead 01.org link 01.org is dead so replace old gvt link with current wiki page. Acked-by: Jani Nikula Reviewed-by: Zhi Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20230804040544.1972958-1-zhenyuw@linux.intel.com commit c8bdef1560d976340e421d5e188f94789e4cfa28 Merge: 349bd87f6091a 54be6c6c5ae8e Author: Andrew Morton Date: Sun Feb 4 14:09:33 2024 -0800 Merge branch 'master' into mm-hotfixes-stable commit 5464e7acea4a6c56b3c5c2d7aeef2eda92227b33 Author: Mike Tipton Date: Thu Feb 1 17:48:06 2024 -0800 interconnect: qcom: x1e80100: Add missing ACV enable_mask The ACV BCM is voted using bitmasks. Add the proper mask for this target. Fixes: 9f196772841e ("interconnect: qcom: Add X1E80100 interconnect provider driver") Signed-off-by: Mike Tipton Reviewed-by: Konrad Dybcio Tested-by: Abel Vesa Link: https://lore.kernel.org/r/20240202014806.7876-3-quic_mdtipton@quicinc.com Signed-off-by: Georgi Djakov commit a40f93e9286968863c661f2b9e314d97adc2f84e Author: Mike Tipton Date: Thu Feb 1 17:48:05 2024 -0800 interconnect: qcom: sm8650: Use correct ACV enable_mask The ACV enable_mask is historically BIT(3), but it's BIT(0) on this target. Fix it. Fixes: c062bcab5924 ("interconnect: qcom: introduce RPMh Network-On-Chip Interconnect on SM8650 SoC") Signed-off-by: Mike Tipton Reviewed-by: Konrad Dybcio Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20240202014806.7876-2-quic_mdtipton@quicinc.com Signed-off-by: Georgi Djakov commit eef00a82c568944f113f2de738156ac591bbd5cd Author: Eric Dumazet Date: Fri Feb 2 09:54:04 2024 +0000 inet: read sk->sk_family once in inet_recv_error() inet_recv_error() is called without holding the socket lock. IPv6 socket could mutate to IPv4 with IPV6_ADDRFORM socket option and trigger a KCSAN warning. Fixes: f4713a3dfad0 ("net-timestamp: make tcp_recvmsg call ipv6_recv_error for AF_INET6 socks") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 4cb81840d8f29b66d9d05c6d7f360c9560f7e2f4 Author: Mario Limonciello Date: Wed Jan 31 16:52:46 2024 -0600 iio: accel: bma400: Fix a compilation problem The kernel fails when compiling without `CONFIG_REGMAP_I2C` but with `CONFIG_BMA400`. ``` ld: drivers/iio/accel/bma400_i2c.o: in function `bma400_i2c_probe': bma400_i2c.c:(.text+0x23): undefined reference to `__devm_regmap_init_i2c' ``` Link: https://download.01.org/0day-ci/archive/20240131/202401311634.FE5CBVwe-lkp@intel.com/config Fixes: 465c811f1f20 ("iio: accel: Add driver for the BMA400") Fixes: 9bea10642396 ("iio: accel: bma400: add support for bma400 spi") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20240131225246.14169-1-mario.limonciello@amd.com Cc: Signed-off-by: Jonathan Cameron commit 862cf85fef85becc55a173387527adb4f076fab0 Author: Nuno Sa Date: Wed Jan 31 10:16:47 2024 +0100 iio: commom: st_sensors: ensure proper DMA alignment Aligning the buffer to the L1 cache is not sufficient in some platforms as they might have larger cacheline sizes for caches after L1 and thus, we can't guarantee DMA safety. That was the whole reason to introduce IIO_DMA_MINALIGN in [1]. Do the same for st_sensors common buffer. While at it, moved the odr_lock before buffer_data as we definitely don't want any other data to share a cacheline with the buffer. [1]: https://lore.kernel.org/linux-iio/20220508175712.647246-2-jic23@kernel.org/ Fixes: e031d5f558f1 ("iio:st_sensors: remove buffer allocation at each buffer enable") Signed-off-by: Nuno Sa Cc: Link: https://lore.kernel.org/r/20240131-dev_dma_safety_stm-v2-1-580c07fae51b@analog.com Signed-off-by: Jonathan Cameron commit 34cf8c657cf0365791cdc658ddbca9cc907726ce Author: Zhang Rui Date: Fri Feb 2 17:21:36 2024 +0800 hwmon: (coretemp) Enlarge per package core count limit Currently, coretemp driver supports only 128 cores per package. This loses some core temperature information on systems that have more than 128 cores per package. [ 58.685033] coretemp coretemp.0: Adding Core 128 failed [ 58.692009] coretemp coretemp.0: Adding Core 129 failed ... Enlarge the limitation to 512 because there are platforms with more than 256 cores per package. Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20240202092144.71180-4-rui.zhang@intel.com Signed-off-by: Guenter Roeck commit fdaf0c8629d4524a168cb9e4ad4231875749b28c Author: Zhang Rui Date: Fri Feb 2 17:21:35 2024 +0800 hwmon: (coretemp) Fix bogus core_id to attr name mapping Before commit 7108b80a542b ("hwmon/coretemp: Handle large core ID value"), there is a fixed mapping between 1. cpu_core_id 2. the index in pdata->core_data[] array 3. the sysfs attr name, aka "tempX_" The later two always equal cpu_core_id + 2. After the commit, pdata->core_data[] index is got from ida so that it can handle sparse core ids and support more cores within a package. However, the commit erroneously maps the sysfs attr name to pdata->core_data[] index instead of cpu_core_id + 2. As a result, the code is not aligned with the comments, and brings user visible changes in hwmon sysfs on systems with sparse core id. For example, before commit 7108b80a542b ("hwmon/coretemp: Handle large core ID value"), /sys/class/hwmon/hwmon2/temp2_label:Core 0 /sys/class/hwmon/hwmon2/temp3_label:Core 1 /sys/class/hwmon/hwmon2/temp4_label:Core 2 /sys/class/hwmon/hwmon2/temp5_label:Core 3 /sys/class/hwmon/hwmon2/temp6_label:Core 4 /sys/class/hwmon/hwmon3/temp10_label:Core 8 /sys/class/hwmon/hwmon3/temp11_label:Core 9 after commit, /sys/class/hwmon/hwmon2/temp2_label:Core 0 /sys/class/hwmon/hwmon2/temp3_label:Core 1 /sys/class/hwmon/hwmon2/temp4_label:Core 2 /sys/class/hwmon/hwmon2/temp5_label:Core 3 /sys/class/hwmon/hwmon2/temp6_label:Core 4 /sys/class/hwmon/hwmon2/temp7_label:Core 8 /sys/class/hwmon/hwmon2/temp8_label:Core 9 Restore the previous behavior and rework the code, comments and variable names to avoid future confusions. Fixes: 7108b80a542b ("hwmon/coretemp: Handle large core ID value") Signed-off-by: Zhang Rui Link: https://lore.kernel.org/r/20240202092144.71180-3-rui.zhang@intel.com Signed-off-by: Guenter Roeck commit 4e440abc894585a34c2904a32cd54af1742311b3 Author: Zhang Rui Date: Fri Feb 2 17:21:34 2024 +0800 hwmon: (coretemp) Fix out-of-bounds memory access Fix a bug that pdata->cpu_map[] is set before out-of-bounds check. The problem might be triggered on systems with more than 128 cores per package. Fixes: 7108b80a542b ("hwmon/coretemp: Handle large core ID value") Signed-off-by: Zhang Rui Cc: Link: https://lore.kernel.org/r/20240202092144.71180-2-rui.zhang@intel.com Signed-off-by: Guenter Roeck commit 1168491e7f53581ba7b6014a39a49cfbbb722feb Author: Loic Prylli Date: Fri Nov 3 11:30:55 2023 +0100 hwmon: (aspeed-pwm-tacho) mutex for tach reading the ASPEED_PTCR_RESULT Register can only hold the result for a single fan input. Adding a mutex to protect the register until the reading is done. Signed-off-by: Loic Prylli Signed-off-by: Alexander Hansen Fixes: 2d7a548a3eff ("drivers: hwmon: Support for ASPEED PWM/Fan tach") Link: https://lore.kernel.org/r/121d888762a1232ef403cf35230ccf7b3887083a.1699007401.git.alexander.hansen@9elements.com Signed-off-by: Guenter Roeck commit 621c6257128149e45b36ffb973a01c3f3461b893 Author: Srinivas Pandruvada Date: Sun Feb 4 04:56:17 2024 -0800 iio: hid-sensor-als: Return 0 for HID_USAGE_SENSOR_TIME_TIMESTAMP When als_capture_sample() is called with usage ID HID_USAGE_SENSOR_TIME_TIMESTAMP, return 0. The HID sensor core ignores the return value for capture_sample() callback, so return value doesn't make difference. But correct the return value to return success instead of -EINVAL. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240204125617.2635574-1-srinivas.pandruvada@linux.intel.com Cc: Signed-off-by: Jonathan Cameron commit 9cae43da9867412f8bd09aee5c8a8dc5e8dc3dc2 Author: Shradha Gupta Date: Thu Feb 1 20:40:38 2024 -0800 hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed If hv_netvsc driver is unloaded and reloaded, the NET_DEVICE_REGISTER handler cannot perform VF register successfully as the register call is received before netvsc_probe is finished. This is because we register register_netdevice_notifier() very early( even before vmbus_driver_register()). To fix this, we try to register each such matching VF( if it is visible as a netdevice) at the end of netvsc_probe. Cc: stable@vger.kernel.org Fixes: 85520856466e ("hv_netvsc: Fix race of register_netdevice_notifier and VF register") Suggested-by: Dexuan Cui Signed-off-by: Shradha Gupta Reviewed-by: Haiyang Zhang Reviewed-by: Dexuan Cui Signed-off-by: David S. Miller commit 42dfa94d802a48c871e2017cbf86153270c86632 Author: Masahiro Yamada Date: Sun Feb 4 16:43:05 2024 +0900 KVM: arm64: Do not source virt/lib/Kconfig twice For ARCH=arm64, virt/lib/Kconfig is sourced twice, from arch/arm64/kvm/Kconfig and from drivers/vfio/Kconfig. There is no good reason to parse virt/lib/Kconfig twice. Commit 2412405b3141 ("KVM: arm/arm64: register irq bypass consumer on ARM/ARM64") should not have added this 'source' directive. Signed-off-by: Masahiro Yamada Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240204074305.31492-1-masahiroy@kernel.org commit 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478 Author: Linus Torvalds Date: Sun Feb 4 12:20:36 2024 +0000 Linux 6.8-rc3 commit bab7ec1d80fe5998ce5ab4480f15e7cce43e2cdf Author: Heiko Stuebner Date: Mon Jan 29 12:48:51 2024 +0100 arm64: dts: rockchip: drop unneeded status from rk3588-jaguar gpio-leds The default status is okay, so it is definitly not necessary to set it on a newly added node. Fixes: d1b8b36a2cc5 ("arm64: dts: rockchip: add Theobroma Jaguar SBC") Signed-off-by: Heiko Stuebner Reviewed-by: Quentin Schulz Link: https://lore.kernel.org/r/20240129114851.2019861-1-heiko@sntech.de commit f98643d8daf3443e3b414a82d0cb3d745f8c8bbc Author: Uwe Kleine-König Date: Mon Jan 29 12:32:02 2024 +0100 ARM: dts: rockchip: Drop interrupts property from pwm-rockchip nodes The binding doesn't define interrupts and adding such a definition was refused because it's unclear how they should ever be used and the relevant registers are outside the PWM range. So drop them fixing several dtbs_check warnings like: arch/arm/boot/dts/rockchip/rv1108-elgin-r1.dtb: pwm@10280030: 'interrupts' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/pwm/pwm-rockchip.yaml# Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240129113205.2453029-2-u.kleine-koenig@pengutronix.de Signed-off-by: Heiko Stuebner commit 5556a8c3af8b4ee648b0fd4cdb4a1356d92de07b Author: Andy Yan Date: Thu Feb 1 20:11:06 2024 +0800 arm64: dts: rockchip: Fix the num-lanes of pcie3x4 on Cool Pi CM5 EVB The 4 lane pcie30 phy is shared by pcie3x4 and pcie3x2, so the num-lanes of pcie3x4 should be 2. Fixes: 791c154c3982 ("arm64: dts: rockchip: Add support for rk3588 based board Cool Pi CM5 EVB") Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20240201121106.1471301-4-andyshrk@163.com Signed-off-by: Heiko Stuebner commit c7e8dbb3bc12f389d617e6c0e9537f11a1fa6eb1 Author: Andy Yan Date: Thu Feb 1 20:11:05 2024 +0800 arm64: dts: rockchip: rename vcc5v0_usb30_host regulator for Cool Pi CM5 EVB According to the schematic, USB20 HOST0 and HOST1 each have their own independent power supply, but these two regulators controlled by a same GPIO, so give it a more appropriate name. Fixes: 791c154c3982 ("arm64: dts: rockchip: Add support for rk3588 based board Cool Pi CM5 EVB") Signed-off-by: Andy Yan Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20240201121106.1471301-3-andyshrk@163.com Signed-off-by: Heiko Stuebner commit cebda3dd36bebb11d3e6df4d1944a1cdcf3cd4cf Author: Andy Yan Date: Thu Feb 1 20:11:04 2024 +0800 arm64: dts: rockchip: aliase sdmmc as mmc1 for Cool Pi CM5 EVB Follow others rk3588 based boards, and u-boot only use mmc0/1 as mmc boot targets, so aliase sdmmc as mmc1. Fixes: 791c154c3982 ("arm64: dts: rockchip: Add support for rk3588 based board Cool Pi CM5 EVB") Signed-off-by: Andy Yan Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20240201121106.1471301-2-andyshrk@163.com Signed-off-by: Heiko Stuebner commit a41f91b4da1490b90ae5859f3464e94d418fea2c Author: Andy Yan Date: Thu Feb 1 20:11:03 2024 +0800 arm64: dts: rockchip: aliase sdmmc as mmc1 for Cool Pi 4B Follow others rk3588 based boards, and u-boot only use mmc0/1 as mmc boot targets, so aliase sdmmc as mmc1. Fixes: 3f5d336d64d6 ("arm64: dts: rockchip: Add support for rk3588s based board Cool Pi 4B") Signed-off-by: Andy Yan Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20240201121106.1471301-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit e6f57c6881916df39db7d95981a8ad2b9c3458d6 Author: Daniel Vacek Date: Thu Feb 1 09:10:08 2024 +0100 IB/hfi1: Fix sdma.h tx->num_descs off-by-one error Unfortunately the commit `fd8958efe877` introduced another error causing the `descs` array to overflow. This reults in further crashes easily reproducible by `sendmsg` system call. [ 1080.836473] general protection fault, probably for non-canonical address 0x400300015528b00a: 0000 [#1] PREEMPT SMP PTI [ 1080.869326] RIP: 0010:hfi1_ipoib_build_ib_tx_headers.constprop.0+0xe1/0x2b0 [hfi1] -- [ 1080.974535] Call Trace: [ 1080.976990] [ 1081.021929] hfi1_ipoib_send_dma_common+0x7a/0x2e0 [hfi1] [ 1081.027364] hfi1_ipoib_send_dma_list+0x62/0x270 [hfi1] [ 1081.032633] hfi1_ipoib_send+0x112/0x300 [hfi1] [ 1081.042001] ipoib_start_xmit+0x2a9/0x2d0 [ib_ipoib] [ 1081.046978] dev_hard_start_xmit+0xc4/0x210 -- [ 1081.148347] __sys_sendmsg+0x59/0xa0 crash> ipoib_txreq 0xffff9cfeba229f00 struct ipoib_txreq { txreq = { list = { next = 0xffff9cfeba229f00, prev = 0xffff9cfeba229f00 }, descp = 0xffff9cfeba229f40, coalesce_buf = 0x0, wait = 0xffff9cfea4e69a48, complete = 0xffffffffc0fe0760 , packet_len = 0x46d, tlen = 0x0, num_desc = 0x0, desc_limit = 0x6, next_descq_idx = 0x45c, coalesce_idx = 0x0, flags = 0x0, descs = {{ qw = {0x8024000120dffb00, 0x4} # SDMA_DESC0_FIRST_DESC_FLAG (bit 63) }, { qw = { 0x3800014231b108, 0x4} }, { qw = { 0x310000e4ee0fcf0, 0x8} }, { qw = { 0x3000012e9f8000, 0x8} }, { qw = { 0x59000dfb9d0000, 0x8} }, { qw = { 0x78000e02e40000, 0x8} }} }, sdma_hdr = 0x400300015528b000, <<< invalid pointer in the tx request structure sdma_status = 0x0, SDMA_DESC0_LAST_DESC_FLAG (bit 62) complete = 0x0, priv = 0x0, txq = 0xffff9cfea4e69880, skb = 0xffff9d099809f400 } If an SDMA send consists of exactly 6 descriptors and requires dword padding (in the 7th descriptor), the sdma_txreq descriptor array is not properly expanded and the packet will overflow into the container structure. This results in a panic when the send completion runs. The exact panic varies depending on what elements of the container structure get corrupted. The fix is to use the correct expression in _pad_sdma_tx_descs() to test the need to expand the descriptor array. With this patch the crashes are no longer reproducible and the machine is stable. Fixes: fd8958efe877 ("IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors") Cc: stable@vger.kernel.org Reported-by: Mats Kronberg Tested-by: Mats Kronberg Signed-off-by: Daniel Vacek Link: https://lore.kernel.org/r/20240201081009.1109442-1-neelx@redhat.com Signed-off-by: Leon Romanovsky commit 630bdb6f28ca9e5ff79e244030170ac788478332 Author: Mustafa Ismail Date: Wed Jan 31 17:38:49 2024 -0600 RDMA/irdma: Add AE for too many RNRS Add IRDMA_AE_LLP_TOO_MANY_RNRS to the list of AE's processed as an abnormal asyncronous event. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale Link: https://lore.kernel.org/r/20240131233849.400285-5-sindhu.devale@intel.com Signed-off-by: Leon Romanovsky commit 666047f3ece9f991774c1fe9b223139a9ef8908d Author: Mustafa Ismail Date: Wed Jan 31 17:38:48 2024 -0600 RDMA/irdma: Set the CQ read threshold for GEN 1 The CQ shadow read threshold is currently not set for GEN 2. This could cause an invalid CQ overflow condition, so remove the GEN check that exclused GEN 1. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale Link: https://lore.kernel.org/r/20240131233849.400285-4-sindhu.devale@intel.com Signed-off-by: Leon Romanovsky commit ee107186bcfd25d7873258f3f75440e20f5e6416 Author: Shiraz Saleem Date: Wed Jan 31 17:38:47 2024 -0600 RDMA/irdma: Validate max_send_wr and max_recv_wr Validate that max_send_wr and max_recv_wr is within the supported range. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Change-Id: I2fc8b10292b641fddd20b36986a9dae90a93f4be Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale Link: https://lore.kernel.org/r/20240131233849.400285-3-sindhu.devale@intel.com Signed-off-by: Leon Romanovsky commit bd97cea7b18a0a553773af806dfbfac27a7c4acb Author: Mike Marciniszyn Date: Wed Jan 31 17:38:46 2024 -0600 RDMA/irdma: Fix KASAN issue with tasklet KASAN testing revealed the following issue assocated with freeing an IRQ. [50006.466686] Call Trace: [50006.466691] [50006.489538] dump_stack+0x5c/0x80 [50006.493475] print_address_description.constprop.6+0x1a/0x150 [50006.499872] ? irdma_sc_process_ceq+0x483/0x790 [irdma] [50006.505742] ? irdma_sc_process_ceq+0x483/0x790 [irdma] [50006.511644] kasan_report.cold.11+0x7f/0x118 [50006.516572] ? irdma_sc_process_ceq+0x483/0x790 [irdma] [50006.522473] irdma_sc_process_ceq+0x483/0x790 [irdma] [50006.528232] irdma_process_ceq+0xb2/0x400 [irdma] [50006.533601] ? irdma_hw_flush_wqes_callback+0x370/0x370 [irdma] [50006.540298] irdma_ceq_dpc+0x44/0x100 [irdma] [50006.545306] tasklet_action_common.isra.14+0x148/0x2c0 [50006.551096] __do_softirq+0x1d0/0xaf8 [50006.555396] irq_exit_rcu+0x219/0x260 [50006.559670] irq_exit+0xa/0x20 [50006.563320] smp_apic_timer_interrupt+0x1bf/0x690 [50006.568645] apic_timer_interrupt+0xf/0x20 [50006.573341] The issue is that a tasklet could be pending on another core racing the delete of the irq. Fix by insuring any scheduled tasklet is killed after deleting the irq. Fixes: 44d9e52977a1 ("RDMA/irdma: Implement device initialization definitions") Signed-off-by: Mike Marciniszyn Signed-off-by: Shiraz Saleem Signed-off-by: Sindhu Devale Link: https://lore.kernel.org/r/20240131233849.400285-2-sindhu.devale@intel.com Signed-off-by: Leon Romanovsky commit 3f24fcdacd40c70dd2949c1cfd8cc2e75942a9e3 Merge: 9e28c7a23bac7 ec9d669eba4c2 Author: Linus Torvalds Date: Sun Feb 4 07:33:01 2024 +0000 Merge tag 'for-linus-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Miscellaneous bug fixes and cleanups in ext4's multi-block allocator and extent handling code" * tag 'for-linus-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (23 commits) ext4: make ext4_set_iomap() recognize IOMAP_DELALLOC map type ext4: make ext4_map_blocks() distinguish delalloc only extent ext4: add a hole extent entry in cache after punch ext4: correct the hole length returned by ext4_map_blocks() ext4: convert to exclusive lock while inserting delalloc extents ext4: refactor ext4_da_map_blocks() ext4: remove 'needed' in trace_ext4_discard_preallocations ext4: remove unnecessary parameter "needed" in ext4_discard_preallocations ext4: remove unused return value of ext4_mb_release_group_pa ext4: remove unused return value of ext4_mb_release_inode_pa ext4: remove unused return value of ext4_mb_release ext4: remove unused ext4_allocation_context::ac_groups_considered ext4: remove unneeded return value of ext4_mb_release_context ext4: remove unused parameter ngroup in ext4_mb_choose_next_group_*() ext4: remove unused return value of __mb_check_buddy ext4: mark the group block bitmap as corrupted before reporting an error ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal() ext4: avoid allocating blocks from corrupted group in ext4_mb_try_best_found() ext4: avoid dividing by 0 in mb_update_avg_fragment_size() when block bitmap corrupt ext4: avoid bb_free and bb_fragments inconsistency in mb_free_blocks() ... commit 9e28c7a23bac7452935d1768fbfedad113586f9b Merge: fc86e5c9909b1 11d4d1dba3315 Author: Linus Torvalds Date: Sun Feb 4 07:26:19 2024 +0000 Merge tag 'v6.8-rc3-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: "Five smb3 client fixes, mostly multichannel related: - four multichannel fixes including fix for channel allocation when multiple inactive channels, fix for unneeded race in channel deallocation, correct redundant channel scaling, and redundant multichannel disabling scenarios - add warning if max compound requests reached" * tag 'v6.8-rc3-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: smb: client: increase number of PDUs allowed in a compound request cifs: failure to add channel on iface should bump up weight cifs: do not search for channel if server is terminating cifs: avoid redundant calls to disable multichannel cifs: make sure that channel scaling is done only once commit fc86e5c9909b1b9a80ff0e7946279dfae6b96ded Merge: 3a0e922079408 881f78f472556 Author: Linus Torvalds Date: Sun Feb 4 07:22:51 2024 +0000 Merge tag 'xfs-6.8-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Chandan Babu: - Clear XFS_ATTR_INCOMPLETE filter on removing xattr from a node format attribute fork - Remove conditional compilation of realtime geometry validator functions to prevent confusing error messages from being printed on the console during the mount operation * tag 'xfs-6.8-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: remove conditional building of rt geometry validator functions xfs: reset XFS_ATTR_INCOMPLETE filter on node removal commit 3a0e922079408c6749770f38a2f4db10dd4d0927 Merge: 0214960971939 97830f3c30886 Author: Linus Torvalds Date: Sun Feb 4 07:01:39 2024 +0000 Merge tag 'char-misc-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are three tiny driver fixes for 6.8-rc3. They include: - Android binder long-term bug with epoll finally being fixed - fastrpc driver shutdown bugfix - open-dice lockdep fix All of these have been in linux-next this week with no reported issues" * tag 'char-misc-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: binder: signal epoll threads of self-work misc: open-dice: Fix spurious lockdep warning misc: fastrpc: Mark all sessions as invalid in cb_remove commit 0214960971939697f1499239398874cfc3a52d69 Merge: 809be620dc070 b35f8dbbce818 Author: Linus Torvalds Date: Sun Feb 4 06:58:23 2024 +0000 Merge tag 'tty-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty and serial driver fixes from Greg KH: "Here are some small tty and serial driver fixes for 6.8-rc3 that resolve a number of reported issues. Included in here are: - rs485 flag definition fix that affected the user/kernel abi in -rc1 - max310x driver fixes - 8250_pci1xxxx driver off-by-one fix - uart_tiocmget locking race fix All of these have been in linux-next for over a week with no reported issues" * tag 'tty-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: max310x: prevent infinite while() loop in port startup serial: max310x: fail probe if clock crystal is unstable serial: max310x: improve crystal stable clock detection serial: max310x: set default value when reading clock ready bit serial: core: Fix atomicity violation in uart_tiocmget serial: 8250_pci1xxxx: fix off by one in pci1xxxx_process_read_data() tty: serial: Fix bit order in RS485 flag definitions commit 809be620dc070c02a6e0daee0dcb0479c6296891 Merge: bdda52cc664ca ad834c7c8e4a7 Author: Linus Torvalds Date: Sun Feb 4 06:52:29 2024 +0000 Merge tag 'usb-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB driver fixes from Greg KH: "Here are a bunch of small USB driver fixes for 6.8-rc3. Included in here are: - new usb-serial driver ids - new dwc3 driver id added - typec driver change revert - ncm gadget driver endian bugfix - xhci bugfixes for a number of reported issues - usb hub bugfix for alternate settings - ulpi driver debugfs memory leak fix - chipidea driver bugfix - usb gadget driver fixes All of these have been in linux-next for a while with no reported issues" * tag 'usb-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (24 commits) USB: serial: option: add Fibocom FM101-GL variant USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e USB: serial: cp210x: add ID for IMST iM871A-USB usb: typec: tcpm: fix the PD disabled case usb: ucsi_acpi: Quirk to ack a connector change ack cmd usb: ucsi_acpi: Fix command completion handling usb: ucsi: Add missing ppm_lock usb: ulpi: Fix debugfs directory leak Revert "usb: typec: tcpm: fix cc role at port reset" usb: gadget: pch_udc: fix an Excess kernel-doc warning usb: f_mass_storage: forbid async queue when shutdown happen USB: hub: check for alternate port before enabling A_ALT_HNP_SUPPORT usb: chipidea: core: handle power lost in workqueue usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend usb: dwc3: pci: add support for the Intel Arrow Lake-H usb: core: Prevent null pointer dereference in update_port_device_state xhci: handle isoc Babble and Buffer Overrun events properly xhci: process isoc TD properly when there was a transaction error mid TD. xhci: fix off by one check when adding a secondary interrupter. xhci: fix possible null pointer dereference at secondary interrupter removal ... commit bdda52cc664caaf030fdaf51dd715ef5d1f14a26 Merge: 8a0c60a0e47af 957bd221ac7b2 Author: Linus Torvalds Date: Sun Feb 4 06:47:45 2024 +0000 Merge tag 'i2c-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixlet from Wolfram Sang: "MAINTAINERS update to point people to the new tree for i2c host driver changes" * tag 'i2c-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: MAINTAINERS: Update i2c host drivers repository commit 8a0c60a0e47aff4b414708a66fb11edeba6df7ae Merge: 843a33d63b458 bd6081be2251c Author: Linus Torvalds Date: Sun Feb 4 06:37:38 2024 +0000 Merge tag 'dmaengine-fix-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "Core: - fix return value of is_slave_direction() for D2D dma Driver fixes for: - Documentaion fixes to resolve warnings for at_hdmac driver - bunch of fsl driver fixes for memory leaks, and useless kfree - TI edma and k3 fixes for packet error and null pointer checks" * tag 'dmaengine-fix-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: at_hdmac: add missing kernel-doc style description dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV dmaengine: fsl-qdma: Remove a useless devm_kfree() dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA dmaengine: fsl-qdma: Fix a memory leak related to the status queue DMA dmaengine: ti: k3-udma: Report short packet errors dmaengine: ti: edma: Add some null pointer checks to the edma_probe dmaengine: fsl-dpaa2-qdma: Fix the size of dma pools dmaengine: at_hdmac: fix some kernel-doc warnings commit 843a33d63b458f652fe9cb293e7a870088273093 Merge: b555d191561a7 7104ba0f1958a Author: Linus Torvalds Date: Sun Feb 4 06:35:00 2024 +0000 Merge tag 'phy-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy driver fixes from Vinod Koul: - TI null pointer dereference - missing erdes mux entry in lan966x driver - Return of error code in renesas driver - Serdes init sequence and register offsets for IPQ drivers * tag 'phy-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP phy: lan966x: Add missing serdes mux entry phy: renesas: rcar-gen3-usb2: Fix returning wrong error code phy: qcom-qmp-usb: fix serdes init sequence for IPQ6018 phy: qcom-qmp-usb: fix register offsets for ipq8074/ipq6018 commit 957bd221ac7b2b56cbdf56739e3a94d4f479209e Merge: 41bccc98fb793 9189526c46f2a Author: Wolfram Sang Date: Sat Feb 3 19:23:41 2024 +0100 Merge tag 'i2c-host-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current Just a maintenance patch that updates the repository where the i2c host and muxes related patches will be collected. commit cb0bbdc4cc327ee91ba21ff744adbe07885db2b8 Author: Konrad Dybcio Date: Fri Feb 2 00:29:58 2024 +0100 arm64: dts: qcom: sm6115: Fix missing interconnect-names Commit b3eaa47395b9 ("arm64: dts: qcom: sm6115: Hook up interconnects") did indeed hook up interconnects, but apparently not interconnect-names on I2C1, making it return -EINVAL due to an error getting icc paths.. Fix it! Fixes: b3eaa47395b9 ("arm64: dts: qcom: sm6115: Hook up interconnects") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240202-topic-6115_i2c-v1-1-ecfe06f5f2ef@linaro.org Signed-off-by: Bjorn Andersson commit dbea519d6878c298dd0f48e6ec2dbacebe4bbb2a Author: Ira Weiny Date: Wed Jan 31 15:55:39 2024 -0800 cxl/trace: Remove unnecessary memcpy's CPER events don't have UUIDs. Therefore UUIDs were removed from the records passed to trace events and replaced with hard coded values. As pointed out by Jonathan, the new defines for the UUIDs present a more efficient way to assign UUID in trace records.[1] Replace memcpy's with the use of static data. [1] https://lore.kernel.org/all/20240108132325.00000e9c@Huawei.com/ Suggested-by: Jonathan Cameron Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Reviewed-by: Jonathan Cameron Signed-off-by: Ard Biesheuvel commit 54ce1927eb787f7bbb7ee664841c8f5932703f39 Author: Ira Weiny Date: Wed Jan 31 15:55:38 2024 -0800 cxl/cper: Fix errant CPER prints for CXL events Jonathan reports that CXL CPER events dump an extra generic error message. {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1 {1}[Hardware Error]: event severity: recoverable {1}[Hardware Error]: Error 0, type: recoverable {1}[Hardware Error]: section type: unknown, fbcd0a77-c260-417f-85a9-088b1621eba6 {1}[Hardware Error]: section length: 0x90 {1}[Hardware Error]: 00000000: 00000090 00000007 00000000 0d938086 ................ {1}[Hardware Error]: 00000010: 00100000 00000000 00040000 00000000 ................ ... CXL events were rerouted though the CXL subsystem for additional processing. However, when that work was done it was missed that cper_estatus_print_section() continued with a generic error message which is confusing. Teach CPER print code to ignore printing details of some section types. Assign the CXL event GUIDs to this set to prevent confusing unknown prints. Reported-by: Jonathan Cameron Suggested-by: Jonathan Cameron Signed-off-by: Ira Weiny Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: Alison Schofield Signed-off-by: Ard Biesheuvel commit f03869698bc3bd6d9d2d9f216b20da08a8c2508a Author: Marek Vasut Date: Wed Dec 20 01:02:42 2023 +0100 arm64: dts: imx8mp: Disable UART4 by default on Data Modul i.MX8M Plus eDM SBC UART4 is used as CM7 coprocessor debug UART and may not be accessible from Linux in case it is protected by RDC. The RDC protection is set up by the platform firmware. UART4 is not used on this platform by Linux. Disable UART4 by default to prevent boot hangs, which occur when the RDC protection is in place. Fixes: 562d222f23f0 ("arm64: dts: imx8mp: Add support for Data Modul i.MX8M Plus eDM SBC") Signed-off-by: Marek Vasut Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit b555d191561a7f89b8d2108dff687d9bc4284e48 Merge: 56897d51886fa fdd0ae72b34e5 Author: Linus Torvalds Date: Sat Feb 3 12:52:36 2024 +0000 Merge tag 'perf-tools-fixes-for-v6.8-1-2024-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools fixes from Arnaldo Carvalho de Melo: "Vendor events: - Intel Alderlake/Sapphire Rapids metric fixes, the CPU type ("cpu_atom", "cpu_core") needs to be used as a prefix to be considered on a metric formula, detected via one of the 'perf test' entries. 'perf test' fixes: - Fix the creation of event selector lists on 'perf test' entries, by initializing the sample ID flag, which is done by 'perf record', so this fix affects only the tests, the common case isn't affected - Make 'perf list' respect debug settings (-v) to fix its 'perf test' entry - Fix 'perf script' test when python support isn't enabled - Special case 'perf script' tests on s390, where only DWARF call graphs are supported and only on software events - Make 'perf daemon' signal test less racy Compiler warnings/errors: - Remove needless malloc(0) call in 'perf top' that triggers -Walloc-size - Fix calloc() argument order to address error introduced in gcc-14 Build: - Make minimal shellcheck version to v0.6.0, avoiding the build to fail with older versions Sync kernel header copies: - stat.h to pick STATX_MNT_ID_UNIQUE - msr-index.h to pick IA32_MKTME_KEYID_PARTITIONING - drm.h to pick DRM_IOCTL_MODE_CLOSEFB - unistd.h to pick {list,stat}mount, lsm_{[gs]et_self_attr,list_modules} syscall numbers - x86 cpufeatures to pick TDX, Zen, APIC MSR fence changes - x86's mem{cpy,set}_64.S used in 'perf bench' - Also, without tooling effects: asm-generic/unaligned.h, mount.h, fcntl.h, kvm headers" * tag 'perf-tools-fixes-for-v6.8-1-2024-02-01' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (21 commits) perf tools headers: update the asm-generic/unaligned.h copy with the kernel sources tools include UAPI: Sync linux/mount.h copy with the kernel sources perf evlist: Fix evlist__new_default() for > 1 core PMU tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' tools headers x86 cpufeatures: Sync with the kernel sources to pick TDX, Zen, APIC MSR fence changes tools headers UAPI: Sync unistd.h to pick {list,stat}mount, lsm_{[gs]et_self_attr,list_modules} syscall numbers perf vendor events intel: Alderlake/sapphirerapids metric fixes tools headers UAPI: Sync kvm headers with the kernel sources perf tools: Fix calloc() arguments to address error introduced in gcc-14 perf top: Remove needless malloc(0) call that triggers -Walloc-size perf build: Make minimal shellcheck version to v0.6.0 tools headers UAPI: Update tools's copy of drm.h headers to pick DRM_IOCTL_MODE_CLOSEFB perf test shell daemon: Make signal test less racy perf test shell script: Fix test for python being disabled perf test: Workaround debug output in list test perf list: Add output file option perf list: Switch error message to pr_err() to respect debug settings (-v) perf test: Fix 'perf script' tests on s390 tools headers UAPI: Sync linux/fcntl.h with the kernel sources tools arch x86: Sync the msr-index.h copy with the kernel sources to pick IA32_MKTME_KEYID_PARTITIONING ... commit b09b58e31b0f43d76f79b9943da3fb7c2843dcbb Author: Zhipeng Lu Date: Thu Feb 1 20:47:13 2024 +0800 octeontx2-pf: Fix a memleak otx2_sq_init When qmem_alloc and pfvf->hw_ops->sq_aq_init fails, sq->sg should be freed to prevent memleak. Fixes: c9c12d339d93 ("octeontx2-pf: Add support for PTP clock") Signed-off-by: Zhipeng Lu Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit f3616173bf9be9bf39d131b120d6eea4e6324cb5 Author: Zhipeng Lu Date: Thu Feb 1 20:41:05 2024 +0800 atm: idt77252: fix a memleak in open_card_ubr0 When alloc_scq fails, card->vcs[0] (i.e. vc) should be freed. Otherwise, in the following call chain: idt77252_init_one |-> idt77252_dev_open |-> open_card_ubr0 |-> alloc_scq [failed] |-> deinit_card |-> vfree(card->vcs); card->vcs is freed and card->vcs[0] is leaked. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Zhipeng Lu Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit d75abeec401f8c86b470e7028a13fcdc87e5dd06 Author: Antoine Tenart Date: Thu Feb 1 09:38:15 2024 +0100 tunnels: fix out of bounds access when building IPv6 PMTU error If the ICMPv6 error is built from a non-linear skb we get the following splat, BUG: KASAN: slab-out-of-bounds in do_csum+0x220/0x240 Read of size 4 at addr ffff88811d402c80 by task netperf/820 CPU: 0 PID: 820 Comm: netperf Not tainted 6.8.0-rc1+ #543 ... kasan_report+0xd8/0x110 do_csum+0x220/0x240 csum_partial+0xc/0x20 skb_tunnel_check_pmtu+0xeb9/0x3280 vxlan_xmit_one+0x14c2/0x4080 vxlan_xmit+0xf61/0x5c00 dev_hard_start_xmit+0xfb/0x510 __dev_queue_xmit+0x7cd/0x32a0 br_dev_queue_push_xmit+0x39d/0x6a0 Use skb_checksum instead of csum_partial who cannot deal with non-linear SKBs. Fixes: 4cb47a8644cc ("tunnels: PMTU discovery support for directly bridged IP packets") Signed-off-by: Antoine Tenart Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit d7f5fb33cf77247b7bf9a871aaeea72ca4f51ad7 Author: Gerhard Engleder Date: Wed Jan 31 21:14:13 2024 +0100 tsnep: Fix mapping for zero copy XDP_TX action For XDP_TX action xdp_buff is converted to xdp_frame. The conversion is done by xdp_convert_buff_to_frame(). The memory type of the resulting xdp_frame depends on the memory type of the xdp_buff. For page pool based xdp_buff it produces xdp_frame with memory type MEM_TYPE_PAGE_POOL. For zero copy XSK pool based xdp_buff it produces xdp_frame with memory type MEM_TYPE_PAGE_ORDER0. tsnep_xdp_xmit_back() is not prepared for that and uses always the page pool buffer type TSNEP_TX_TYPE_XDP_TX. This leads to invalid mappings and the transmission of undefined data. Improve tsnep_xdp_xmit_back() to use the generic buffer type TSNEP_TX_TYPE_XDP_NDO for zero copy XDP_TX. Fixes: 3fc2333933fd ("tsnep: Add XDP socket zero-copy RX support") Signed-off-by: Gerhard Engleder Signed-off-by: David S. Miller commit 010e03db4dca1c6e53d973b9fbf7ac764de3cbc8 Merge: 2e7d3b67630df 691bb4e49c98a Author: Jakub Kicinski Date: Fri Feb 2 21:10:39 2024 -0800 Merge branch 'selftests-net-more-fixes' Paolo Abeni says: ==================== selftests: net: more fixes Another small bunch of fixes, addressing issues outlined by the netdev CI. The first 2 patches are just rebased. The following 2 are new fixes, for even more problems that surfaced meanwhile. ==================== Link: https://lore.kernel.org/r/cover.1706812005.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 691bb4e49c98a47bc643dd808453136ce78b15b4 Author: Paolo Abeni Date: Thu Feb 1 19:42:41 2024 +0100 selftests: net: avoid just another constant wait Using hard-coded constant timeout to wait for some expected event is deemed to fail sooner or later, especially in slow env. Our CI has spotted another of such race: # TEST: ipv6: cleanup of cached exceptions - nexthop objects [FAIL] # can't delete veth device in a timely manner, PMTU dst likely leaked Replace the crude sleep with a loop looking for the expected condition at low interval for a much longer range. Fixes: b3cc4f8a8a41 ("selftests: pmtu: add explicit tests for PMTU exceptions cleanup") Signed-off-by: Paolo Abeni Reviewed-by: David Ahern Link: https://lore.kernel.org/r/fd5c745e9bb665b724473af6a9373a8c2a62b247.1706812005.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit e71e016ad0f6e641a7898b8cda5f62f8e2beb2f1 Author: Paolo Abeni Date: Thu Feb 1 19:42:40 2024 +0100 selftests: net: fix tcp listener handling in pmtu.sh The pmtu.sh test uses a few TCP listener in a problematic way: It hard-codes a constant timeout to wait for the listener starting-up in background. That introduces unneeded latency and on very slow and busy host it can fail. Additionally the test starts again the same listener in the same namespace on the same port, just after the previous connection completed. Fast host can attempt starting the new server before the old one really closed the socket. Address the issues using the wait_local_port_listen helper and explicitly waiting for the background listener process exit. Fixes: 136a1b434bbb ("selftests: net: test vxlan pmtu exceptions with tcp") Signed-off-by: Paolo Abeni Reviewed-by: David Ahern Link: https://lore.kernel.org/r/f8e8f6d44427d8c45e9f6a71ee1a321047452087.1706812005.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit d75df752647728c6d65e594e5e4493448bea6cda Author: Paolo Abeni Date: Thu Feb 1 19:42:39 2024 +0100 selftests: net: fix setup_ns usage in rtnetlink.sh The setup_ns helper marks the testns global variable as readonly. Later attempts to set such variable are unsuccessful, causing a couple test failures. Avoid completely the variable re-initialization and let the function access the global value. Fixes: e9ce7ededf14 ("selftests: rtnetlink: use setup_ns in bonding test") Signed-off-by: Paolo Abeni Reviewed-by: David Ahern Link: https://lore.kernel.org/r/6e7c937c8ff73ca52a21a4a536a13a76ec0173a8.1706812005.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit cb9f4a30fb85e1f4f149ada595a67899adb3db19 Author: Paolo Abeni Date: Thu Feb 1 19:42:38 2024 +0100 selftests: net: cut more slack for gro fwd tests. The udpgro_fwd.sh self-tests are somewhat unstable. There are a few timing constraints the we struggle to meet on very slow environments. Instead of skipping the whole tests in such envs, increase the test resilience WRT very slow hosts: increase the inter-packets timeouts, avoid resetting the counters every second and finally disable reduce the background traffic noise. Tested with: for I in $(seq 1 100); do ./tools/testing/selftests/kselftest_install/run_kselftest.sh \ -t net:udpgro_fwd.sh || exit -1 done in a slow environment. Fixes: a062260a9d5f ("selftests: net: add UDP GRO forwarding self-tests") Signed-off-by: Paolo Abeni Reviewed-by: David Ahern Link: https://lore.kernel.org/r/f4b6b11064a0d39182a9ae6a853abae3e9b4426a.1706812005.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 2e7d3b67630dfd8f178c41fa2217aa00e79a5887 Author: Ivan Vecera Date: Thu Feb 1 10:47:51 2024 +0100 net: atlantic: Fix DMA mapping for PTP hwts ring Function aq_ring_hwts_rx_alloc() maps extra AQ_CFG_RXDS_DEF bytes for PTP HWTS ring but then generic aq_ring_free() does not take this into account. Create and use a specific function to free HWTS ring to fix this issue. Trace: [ 215.351607] ------------[ cut here ]------------ [ 215.351612] DMA-API: atlantic 0000:4b:00.0: device driver frees DMA memory with different size [device address=0x00000000fbdd0000] [map size=34816 bytes] [unmap size=32768 bytes] [ 215.351635] WARNING: CPU: 33 PID: 10759 at kernel/dma/debug.c:988 check_unmap+0xa6f/0x2360 ... [ 215.581176] Call Trace: [ 215.583632] [ 215.585745] ? show_trace_log_lvl+0x1c4/0x2df [ 215.590114] ? show_trace_log_lvl+0x1c4/0x2df [ 215.594497] ? debug_dma_free_coherent+0x196/0x210 [ 215.599305] ? check_unmap+0xa6f/0x2360 [ 215.603147] ? __warn+0xca/0x1d0 [ 215.606391] ? check_unmap+0xa6f/0x2360 [ 215.610237] ? report_bug+0x1ef/0x370 [ 215.613921] ? handle_bug+0x3c/0x70 [ 215.617423] ? exc_invalid_op+0x14/0x50 [ 215.621269] ? asm_exc_invalid_op+0x16/0x20 [ 215.625480] ? check_unmap+0xa6f/0x2360 [ 215.629331] ? mark_lock.part.0+0xca/0xa40 [ 215.633445] debug_dma_free_coherent+0x196/0x210 [ 215.638079] ? __pfx_debug_dma_free_coherent+0x10/0x10 [ 215.643242] ? slab_free_freelist_hook+0x11d/0x1d0 [ 215.648060] dma_free_attrs+0x6d/0x130 [ 215.651834] aq_ring_free+0x193/0x290 [atlantic] [ 215.656487] aq_ptp_ring_free+0x67/0x110 [atlantic] ... [ 216.127540] ---[ end trace 6467e5964dd2640b ]--- [ 216.132160] DMA-API: Mapped at: [ 216.132162] debug_dma_alloc_coherent+0x66/0x2f0 [ 216.132165] dma_alloc_attrs+0xf5/0x1b0 [ 216.132168] aq_ring_hwts_rx_alloc+0x150/0x1f0 [atlantic] [ 216.132193] aq_ptp_ring_alloc+0x1bb/0x540 [atlantic] [ 216.132213] aq_nic_init+0x4a1/0x760 [atlantic] Fixes: 94ad94558b0f ("net: aquantia: add PTP rings infrastructure") Signed-off-by: Ivan Vecera Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240201094752.883026-1-ivecera@redhat.com Signed-off-by: Jakub Kicinski commit 56897d51886fa7e9f034ff26128eb09f1b811594 Merge: 6b89b6af459fd ca185770db914 Author: Linus Torvalds Date: Fri Feb 2 15:32:58 2024 -0800 Merge tag 'trace-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing and eventfs fixes from Steven Rostedt: - Fix the return code for ring_buffer_poll_wait() It was returing a -EINVAL instead of EPOLLERR. - Zero out the tracefs_inode so that all fields are initialized. The ti->private could have had stale data, but instead of just initializing it to NULL, clear out the entire structure when it is allocated. - Fix a crash in timerlat The hrtimer was initialized at read and not open, but is canceled at close. If the file was opened and never read the close will pass a NULL pointer to hrtime_cancel(). - Rewrite of eventfs. Linus wrote a patch series to remove the dentry references in the eventfs_inode and to use ref counting and more of proper VFS interfaces to make it work. - Add warning to put_ei() if ei is not set to free. That means something is about to free it when it shouldn't. - Restructure the eventfs_inode to make it more compact, and remove the unused llist field. - Remove the fsnotify*() funtions for when the inodes were being created in the lookup code. It doesn't make sense to notify about creation just because something is being looked up. - The inode hard link count was not accurate. It was being updated when a file was looked up. The inodes of directories were updating their parent inode hard link count every time the inode was created. That means if memory reclaim cleaned a stale directory inode and the inode was lookup up again, it would increment the parent inode again as well. Al Viro said to just have all eventfs directories have a hard link count of 1. That tells user space not to trust it. * tag 'trace-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: eventfs: Keep all directory links at 1 eventfs: Remove fsnotify*() functions from lookup() eventfs: Restructure eventfs_inode structure to be more condensed eventfs: Warn if an eventfs_inode is freed without is_freed being set tracing/timerlat: Move hrtimer_init to timerlat_fd open() eventfs: Get rid of dentry pointers without refcounts eventfs: Clean up dentry ops and add revalidate function eventfs: Remove unused d_parent pointer field tracefs: dentry lookup crapectomy tracefs: Avoid using the ei->dentry pointer unnecessarily eventfs: Initialize the tracefs inode properly tracefs: Zero out the tracefs_inode when allocating it ring-buffer: Clean ring_buffer_poll_wait() error return commit 6b89b6af459fdd6f2741d0c2e33c67af8193697e Merge: b1dd6c26bca4a e9f1e6bb55bea Author: Linus Torvalds Date: Fri Feb 2 15:30:33 2024 -0800 Merge tag 'gfs2-v6.8-rc2-revert' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 revert from Andreas Gruenbacher: "It turns out that the commit to use GL_NOBLOCK flag for non-blocking lookups has several issues, and not all of them have a simple fix" * tag 'gfs2-v6.8-rc2-revert' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: Revert "gfs2: Use GL_NOBLOCK flag for non-blocking lookups" commit 05519c86d6997cfb9bb6c82ce1595d1015b718dc Author: Mingwei Zhang Date: Tue Jan 23 22:12:20 2024 +0000 KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl Use a u64 instead of a u8 when taking a snapshot of pmu->fixed_ctr_ctrl when reprogramming fixed counters, as truncating the value results in KVM thinking fixed counter 2 is already disabled (the bug also affects fixed counters 3+, but KVM doesn't yet support those). As a result, if the guest disables fixed counter 2, KVM will get a false negative and fail to reprogram/disable emulation of the counter, which can leads to incorrect counts and spurious PMIs in the guest. Fixes: 76d287b2342e ("KVM: x86/pmu: Drop "u8 ctrl, int idx" for reprogram_fixed_counter()") Cc: stable@vger.kernel.org Signed-off-by: Mingwei Zhang Link: https://lore.kernel.org/r/20240123221220.3911317-1-mizhang@google.com [sean: rewrite changelog to call out the effects of the bug] Signed-off-by: Sean Christopherson commit b1dd6c26bca4acc145c61f98febadba64eba1877 Merge: 9c2f0338bbd13 925bd5e08106b Author: Linus Torvalds Date: Fri Feb 2 12:56:56 2024 -0800 Merge tag 'pci-v6.8-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci fixes from Bjorn Helgaas: - Fix a potential deadlock that was reintroduced by an ASPM revert merged for v6.8 (Johan Hovold) - Add Manivannan Sadhasivam as PCI Endpoint maintainer (Lorenzo Pieralisi) * tag 'pci-v6.8-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: MAINTAINERS: Add Manivannan Sadhasivam as PCI Endpoint maintainer PCI/ASPM: Fix deadlock when enabling ASPM commit 9c2f0338bbd132a4b12b988004d796798609d297 Merge: eab5c86d2413d 39126abc5e206 Author: Linus Torvalds Date: Fri Feb 2 12:54:46 2024 -0800 Merge tag 'drm-fixes-2024-02-03' of git://anongit.freedesktop.org/drm/drm Pul drm fixes from Dave Airlie: "Regular weekly fixes, mostly amdgpu and xe. One nouveau fix is a better fix for the deadlock and also helps with a sync race we were seeing. dma-buf: - heaps CMA page accounting fix virtio-gpu: - fix segment size xe: - A crash fix - A fix for an assert due to missing mem_acces ref - Only allow a single user-fence per exec / bind. - Some sparse warning fixes - Two fixes for compilation failures on various odd combinations of gcc / arch pointed out on LKML. - Fix a fragile partial allocation pointed out on LKML. - A sysfs ABI documentation warning fix amdgpu: - Fix reboot issue seen on some 7000 series dGPUs - Fix client init order for KFD - Misc display fixes - USB-C fix - DCN 3.5 fixes - Fix issues with GPU scheduler and GPU reset - GPU firmware loading fix - Misc fixes - GC 11.5 fix - VCN 4.0.5 fix - IH overflow fix amdkfd: - SVM fixes - Trap handler fix - Fix device permission lookup - Properly reserve BO before validating it nouveau: - fence/irq lock deadlock fix (second attempt) - gsp command size fix * tag 'drm-fixes-2024-02-03' of git://anongit.freedesktop.org/drm/drm: (35 commits) nouveau: offload fence uevents work to workqueue nouveau/gsp: use correct size for registry rpc. drm/amdgpu/pm: Use inline function for IP version check drm/hwmon: Fix abi doc warnings drm/xe: Make all GuC ABI shift values unsigned drm/xe/vm: Subclass userptr vmas drm/xe: Use LRC prefix rather than CTX prefix in lrc desc defines drm/xe: Don't use __user error pointers drm/xe: Annotate mcr_[un]lock() drm/xe: Only allow 1 ufence per exec / bind IOCTL drm/xe: Grab mem_access when disabling C6 on skip_guc_pc platforms drm/xe: Fix crash in trace_dma_fence_init() drm/amdgpu: Reset IH OVERFLOW_CLEAR bit drm/amdgpu: remove asymmetrical irq disabling in vcn 4.0.5 suspend drm/amdgpu: drm/amdgpu: remove golden setting for gfx 11.5.0 drm/amdkfd: reserve the BO before validating it drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()' drm/amd/display: Fix buffer overflow in 'get_host_router_total_dp_tunnel_bw()' drm/amd/display: Add NULL check for kzalloc in 'amdgpu_dm_atomic_commit_tail()' drm/amd: Don't init MEC2 firmware when it fails to load ... commit eab5c86d2413dd92fe94a735673141e8ee873f7a Merge: 01370ceb2ae66 4255447ad34c5 Author: Linus Torvalds Date: Fri Feb 2 12:52:44 2024 -0800 Merge tag 'input-for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a fix for the fix to deal with newer laptops which get confused by the "GET ID" command when probing for PS/2 keyboards - a couple of tweaks to i8042 to handle Clevo NS70PU and Lifebook U728 laptops - a change to bcm5974 to validate that the device has appropriate endpoints - an addition of new product ID to xpad driver to recognize Lenovo Legion Go controllers - a quirk to Goodix controller to deal with extra GPIO described in ACPI tables on some devices. * tag 'input-for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add Fujitsu Lifebook U728 to i8042 quirk table Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID Input: bcm5974 - check endpoint type before starting traffic Input: xpad - add Lenovo Legion Go controllers Input: goodix - accept ACPI resources with gpio_count == 3 && gpio_int_idx == 0 commit 01370ceb2ae66ffc1b35dd4907bf1f6009bac200 Merge: 43e7ef642ef2e d4ea2bd1bb502 Author: Linus Torvalds Date: Fri Feb 2 12:50:44 2024 -0800 Merge tag 'sound-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of fixes, mostly device-specific ones: - Minor PCM core fix for name strings - ASoC Qualcomm fixes, including DAI support extensions - ASoC AMD platform updates - ASoC Allwinner platform updates - Various ASoC codec fixes for WSA, WCD, ES8326 drivers - Various HD-audio and USB-audio fixes and quirks - A series of fixes for Cirrus CS35L56 codecs" * tag 'sound-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (63 commits) ALSA: usb-audio: Ignore clock selector errors for single connection ALSA: hda/realtek: Enable headset mic on Vaio VJFE-ADL ALSA: hda: cs35l56: Remove unused test stub function ALSA: hda: cs35l56: Firmware file must match the version of preloaded firmware ALSA: hda: cs35l56: Fix filename string field layout ALSA: hda: cs35l56: Fix order of searching for firmware files ASoC: cs35l56: Allow more time for firmware to boot ASoC: cs35l56: Load tunings for the correct speaker models ASoC: cs35l56: Firmware file must match the version of preloaded firmware ASoC: cs35l56: Fix misuse of wm_adsp 'part' string for silicon revision ASoC: cs35l56: Fix for initializing ASP1 mixer registers ALSA: hda: cs35l56: Initialize all ASP1 registers ASoC: cs35l56: Fix default SDW TX mixer registers ASoC: cs35l56: Fix to ensure ASP1 registers match cache ASoC: cs35l56: Remove buggy checks from cs35l56_is_fw_reload_needed() ASoC: cs35l56: Don't add the same register patch multiple times ASoC: cs35l56: cs35l56_component_remove() must clean up wm_adsp ASoC: cs35l56: cs35l56_component_remove() must clear cs35l56->component ASoC: wm_adsp: Don't overwrite fwf_name with the default ASoC: wm_adsp: Fix firmware file search order ... commit 43e7ef642ef2e3a26bf1118e27c992ebba3d2d6b Merge: 79837a7c0f423 915644189c22d Author: Linus Torvalds Date: Fri Feb 2 12:48:33 2024 -0800 Merge tag 'hwmon-for-v6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - pmbus/mp2975: Fix driver initialization - gigabyte_waterforce: Add missing unlock in error handling path * tag 'hwmon-for-v6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (pmbus/mp2975) Correct comment inside 'mp2975_read_byte_data' hwmon: (pmbus/mp2975) Fix driver initialization for MP2975 device hwmon: gigabyte_waterforce: Fix locking bug in waterforce_get_status() commit 79837a7c0f4236fa898b948db4c1c978e21175aa Merge: 4f18d3fd2975c d0266d7ab1618 Author: Linus Torvalds Date: Fri Feb 2 12:46:35 2024 -0800 Merge tag 'for-v6.8-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fix from Sebastian Reichel: - qcom_battmgr: revert broken fix * tag 'for-v6.8-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: Revert "power: supply: qcom_battmgr: Register the power supplies after PDR is up" commit 4f18d3fd2975c943be91522d86257806374881b9 Merge: 6897cea718376 d2d00e15808c3 Author: Linus Torvalds Date: Fri Feb 2 12:43:51 2024 -0800 Merge tag 'iommu-fixes-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pul iommu fixes from Joerg Roedel: - Make iommu_ops->default_domain work without CONFIG_IOMMU_DMA to fix initialization of FSL-PAMU devices - Fix for Tegra fbdev initialization failure - Fix for a VFIO device unbinding failure on PowerPC * tag 'iommu-fixes-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: powerpc: iommu: Bring back table group release_ownership() call drm/tegra: Do not assume that a NULL domain means no DMA IOMMU iommu: Allow ops->default_domain to work when !CONFIG_IOMMU_DMA commit ba5e1272142d051dcc57ca1d3225ad8a089f9858 Author: Eric Dumazet Date: Thu Feb 1 17:53:24 2024 +0000 netdevsim: avoid potential loop in nsim_dev_trap_report_work() Many syzbot reports include the following trace [1] If nsim_dev_trap_report_work() can not grab the mutex, it should rearm itself at least one jiffie later. [1] Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 32383 Comm: kworker/0:2 Not tainted 6.8.0-rc2-syzkaller-00031-g861c0981648f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Workqueue: events nsim_dev_trap_report_work RIP: 0010:bytes_is_nonzero mm/kasan/generic.c:89 [inline] RIP: 0010:memory_is_nonzero mm/kasan/generic.c:104 [inline] RIP: 0010:memory_is_poisoned_n mm/kasan/generic.c:129 [inline] RIP: 0010:memory_is_poisoned mm/kasan/generic.c:161 [inline] RIP: 0010:check_region_inline mm/kasan/generic.c:180 [inline] RIP: 0010:kasan_check_range+0x101/0x190 mm/kasan/generic.c:189 Code: 07 49 39 d1 75 0a 45 3a 11 b8 01 00 00 00 7c 0b 44 89 c2 e8 21 ed ff ff 83 f0 01 5b 5d 41 5c c3 48 85 d2 74 4f 48 01 ea eb 09 <48> 83 c0 01 48 39 d0 74 41 80 38 00 74 f2 eb b6 41 bc 08 00 00 00 RSP: 0018:ffffc90012dcf998 EFLAGS: 00000046 RAX: fffffbfff258af1e RBX: fffffbfff258af1f RCX: ffffffff8168eda3 RDX: fffffbfff258af1f RSI: 0000000000000004 RDI: ffffffff92c578f0 RBP: fffffbfff258af1e R08: 0000000000000000 R09: fffffbfff258af1e R10: ffffffff92c578f3 R11: ffffffff8acbcbc0 R12: 0000000000000002 R13: ffff88806db38400 R14: 1ffff920025b9f42 R15: ffffffff92c578e8 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c00994e078 CR3: 000000002c250000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: instrument_atomic_read include/linux/instrumented.h:68 [inline] atomic_read include/linux/atomic/atomic-instrumented.h:32 [inline] queued_spin_is_locked include/asm-generic/qspinlock.h:57 [inline] debug_spin_unlock kernel/locking/spinlock_debug.c:101 [inline] do_raw_spin_unlock+0x53/0x230 kernel/locking/spinlock_debug.c:141 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:150 [inline] _raw_spin_unlock_irqrestore+0x22/0x70 kernel/locking/spinlock.c:194 debug_object_activate+0x349/0x540 lib/debugobjects.c:726 debug_work_activate kernel/workqueue.c:578 [inline] insert_work+0x30/0x230 kernel/workqueue.c:1650 __queue_work+0x62e/0x11d0 kernel/workqueue.c:1802 __queue_delayed_work+0x1bf/0x270 kernel/workqueue.c:1953 queue_delayed_work_on+0x106/0x130 kernel/workqueue.c:1989 queue_delayed_work include/linux/workqueue.h:563 [inline] schedule_delayed_work include/linux/workqueue.h:677 [inline] nsim_dev_trap_report_work+0x9c0/0xc80 drivers/net/netdevsim/dev.c:842 process_one_work+0x886/0x15d0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2787 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Fixes: 012ec02ae441 ("netdevsim: convert driver to use unlocked devlink API during init/fini") Reported-by: syzbot Signed-off-by: Eric Dumazet Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240201175324.3752746-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 6897cea7183762b4bc97b0ed1b75274ece9d518b Merge: 035032753bfcf 0a9bab391e336 Author: Linus Torvalds Date: Fri Feb 2 10:58:25 2024 -0800 Merge tag 'for-6.8/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix DM ioctl interface to avoid INT_MAX overflow warnings from kvmalloc by limiting the number of targets and parameter size area. - Fix DM stats to avoid INT_MAX overflow warnings from kvmalloc by limiting the number of entries supported. - Fix DM writecache to support mapping devices larger than 1 TiB by switching from using kvmalloc_array to vmalloc_array -- which avoids INT_MAX overflow in kvmalloc_node and associated warnings. - Remove the (ab)use of tasklets from both the DM crypt and verity targets. They will be converted to use BH workqueue in future. * tag 'for-6.8/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm-crypt, dm-verity: disable tasklets dm writecache: allow allocations larger than 2GiB dm stats: limit the number of entries dm: limit the number of targets and parameter size area commit 035032753bfcf0a1bb8875de79449ad996dd96eb Merge: 815a76b9644eb 51af8f255bdac Author: Linus Torvalds Date: Fri Feb 2 10:52:56 2024 -0800 Merge tag 'ata-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fix from Niklas Cassel: - Following up on last week's ASMedia ASM1061 43-bit dma_mask quirk, we sent an email to ASMedia developers that have previously been active on the mailing list, asking exactly which SATA controllers that are affected by this hardware limitation. We got a reply that it affects all the SATA controllers in the ASM106x family, thus extend the existing 43-bit dma_mask quirk to apply to all the affected ASMedia SATA controllers. * tag 'ata-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ahci: Extend ASM1061 43-bit DMA address quirk to other ASM106x parts commit 4255447ad34c5c3785fcdcf76cfa0271d6e5ed39 Author: Szilard Fabian Date: Fri Feb 2 10:28:59 2024 -0800 Input: i8042 - add Fujitsu Lifebook U728 to i8042 quirk table Another Fujitsu-related patch. In the initial boot stage the integrated keyboard of Fujitsu Lifebook U728 refuses to work and it's not possible to type for example a dm-crypt passphrase without the help of an external keyboard. i8042.nomux kernel parameter resolves this issue but using that a PS/2 mouse is detected. This input device is unused even when the i2c-hid-acpi kernel module is blacklisted making the integrated ELAN touchpad (04F3:3092) not working at all. So this notebook uses a hid-over-i2c touchpad which is managed by the i2c_designware input driver. Since you can't find a PS/2 mouse port on this computer and you can't connect a PS/2 mouse to it even with an official port replicator I think it's safe to not use the PS/2 mouse port at all. Signed-off-by: Szilard Fabian Link: https://lore.kernel.org/r/20240103014717.127307-2-szfabian@bluemarch.art Signed-off-by: Dmitry Torokhov commit 815a76b9644eb91d005c56773e344bfcaa4971c9 Merge: 717ca0b8e55ee f3c89983cb4fc Author: Linus Torvalds Date: Fri Feb 2 10:49:28 2024 -0800 Merge tag 'block-6.8-2024-02-01' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Keith: - Remove duplicated enums (Guixen) - Use appropriate controller state accessors (Keith) - Retryable authentication (Hannes) - Add missing module descriptions (Chaitanya) - Fibre-channel fixes for blktests (Daniel) - Various type correctness updates (Caleb) - Improve fabrics connection debugging prints (Nitin) - Passthrough command verbose error logging (Adam) - Fix for where we set IO priority in the bio for drivers that use fops->submit_bio() to queue IO, like md/dm etc. * tag 'block-6.8-2024-02-01' of git://git.kernel.dk/linux: (32 commits) block: Fix where bio IO priority gets set nvme: allow passthru cmd error logging nvme-fc: show hostnqn when connecting to fc target nvme-rdma: show hostnqn when connecting to rdma target nvme-tcp: show hostnqn when connecting to tcp target nvmet-fc: use RCU list iterator for assoc_list nvmet-fc: take ref count on tgtport before delete assoc nvmet-fc: avoid deadlock on delete association path nvmet-fc: abort command when there is no binding nvmet-fc: do not tack refs on tgtports from assoc nvmet-fc: remove null hostport pointer check nvmet-fc: hold reference on hostport match nvmet-fc: free queue and assoc directly nvmet-fc: defer cleanup using RCU properly nvmet-fc: release reference on target port nvmet-fcloop: swap the list_add_tail arguments nvme-fc: do not wait in vain when unloading module nvme-fc: log human-readable opcode on timeout nvme: split out fabrics version of nvme_opcode_str() nvme: take const cmd pointer in read-only helpers ... commit 717ca0b8e55eea49c5d71c026eafbe1e64d4b556 Merge: ec86369c88f67 72bd80252feeb Author: Linus Torvalds Date: Fri Feb 2 10:45:17 2024 -0800 Merge tag 'io_uring-6.8-2024-02-01' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: - Fix for missing retry for read multishot. If we trigger the execution of it and there's more than one buffer to be read, then we don't always read more than the first one. As it's edge triggered, this can lead to stalls. - Limit inline receive multishot retries for fairness reasons. If we have a very bursty socket receiving data, we still need to ensure we process other requests as well. This is really two minor cleanups, then adding a way for poll reissue to trigger a requeue, and then finally having multishot receive utilize that. - Fix for a weird corner case for non-multishot receive with MSG_WAITALL, using provided buffers, and setting the length to zero (to let the buffer dictate the receive size). * tag 'io_uring-6.8-2024-02-01' of git://git.kernel.dk/linux: io_uring/net: fix sr->len for IORING_OP_RECV with MSG_WAITALL and buffers io_uring/net: limit inline multishot retries io_uring/poll: add requeue return code from poll multishot handling io_uring/net: un-indent mshot retry path in io_recv_finish() io_uring/poll: move poll execution helpers higher up io_uring/rw: ensure poll based multishot read retries appropriately commit ec86369c88f6794a6cfa0383f715f276305399ed Merge: 0215331944760 c7767f5c43df2 Author: Linus Torvalds Date: Fri Feb 2 10:40:50 2024 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Two small fixes. The first one is an alternative fix for the SCS patching problem we thought we'd fixed in -rc1; it turned out not to be robust with all toolchains/configs, so this is a revert+retry which has seen some more testing. The other one simply removes an unused header file, but I couldn't resist the negative diffstat. - Really fix shadow call stack patching with LTO=full - Remove unused (empty) header file generated from the compat vDSO" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: vdso32: Remove unused vdso32-offsets.h arm64: scs: Disable LTO for SCS patching code arm64: Revert "scs: Work around full LTO issue with dynamic SCS" commit 0bcff59ef7a652fcdc6d535554b63278c2406c8f Author: Andrew Bresticker Date: Fri Feb 2 10:07:04 2024 -0800 efi: Don't add memblocks for soft-reserved memory Adding memblocks for soft-reserved regions prevents them from later being hotplugged in by dax_kmem. Signed-off-by: Andrew Bresticker Signed-off-by: Ard Biesheuvel commit de1034b38a346ef6be25fe8792f5d1e0684d5ff4 Author: Andrew Bresticker Date: Fri Feb 2 10:07:03 2024 -0800 efi: runtime: Fix potential overflow of soft-reserved region size md_size will have been narrowed if we have >= 4GB worth of pages in a soft-reserved region. Signed-off-by: Andrew Bresticker Signed-off-by: Ard Biesheuvel commit a60e6c3918d20848906ffcdfcf72ca6a8cfbcf2e Author: Werner Sembach Date: Tue Dec 5 17:36:01 2023 +0100 Input: i8042 - fix strange behavior of touchpad on Clevo NS70PU When closing the laptop lid with an external screen connected, the mouse pointer has a constant movement to the lower right corner. Opening the lid again stops this movement, but after that the touchpad does no longer register clicks. The touchpad is connected both via i2c-hid and PS/2, the predecessor of this device (NS70MU) has the same layout in this regard and also strange behaviour caused by the psmouse and the i2c-hid driver fighting over touchpad control. This fix is reusing the same workaround by just disabling the PS/2 aux port, that is only used by the touchpad, to give the i2c-hid driver the lone control over the touchpad. v2: Rebased on current master Signed-off-by: Werner Sembach Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20231205163602.16106-1-wse@tuxedocomputers.com Signed-off-by: Dmitry Torokhov commit 0a9bab391e336489169b95cb0d4553d921302189 Author: Mikulas Patocka Date: Wed Jan 31 21:57:27 2024 +0100 dm-crypt, dm-verity: disable tasklets Tasklets have an inherent problem with memory corruption. The function tasklet_action_common calls tasklet_trylock, then it calls the tasklet callback and then it calls tasklet_unlock. If the tasklet callback frees the structure that contains the tasklet or if it calls some code that may free it, tasklet_unlock will write into free memory. The commits 8e14f610159d and d9a02e016aaf try to fix it for dm-crypt, but it is not a sufficient fix and the data corruption can still happen [1]. There is no fix for dm-verity and dm-verity will write into free memory with every tasklet-processed bio. There will be atomic workqueues implemented in the kernel 6.9 [2]. They will have better interface and they will not suffer from the memory corruption problem. But we need something that stops the memory corruption now and that can be backported to the stable kernels. So, I'm proposing this commit that disables tasklets in both dm-crypt and dm-verity. This commit doesn't remove the tasklet support, because the tasklet code will be reused when atomic workqueues will be implemented. [1] https://lore.kernel.org/all/d390d7ee-f142-44d3-822a-87949e14608b@suse.de/T/ [2] https://lore.kernel.org/lkml/20240130091300.2968534-1-tj@kernel.org/ Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Fixes: 39d42fa96ba1b ("dm crypt: add flags to optionally bypass kcryptd workqueues") Fixes: 5721d4e5a9cdb ("dm verity: Add optional "try_verify_in_tasklet" feature") Signed-off-by: Mike Snitzer commit 5bdda0048c8d1bbe2019513b2d6200cc0d09c7bd Author: Kees Cook Date: Fri Jan 26 14:31:53 2024 -0800 wifi: brcmfmac: Adjust n_channels usage for __counted_by After commit e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by"), the compiler may enforce dynamic array indexing of req->channels to stay below n_channels. As a result, n_channels needs to be increased _before_ accessing the newly added array index. Increment it first, then use "i" for the prior index. Solves this warning in the coming GCC that has __counted_by support: ../drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c: In function 'brcmf_internal_escan_add_info': ../drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c:3783:46: warning: operation on 'req-> n_channels' may be undefined [-Wsequence-point] 3783 | req->channels[req->n_channels++] = chan; | ~~~~~~~~~~~~~~~^~ Fixes: e3eac9f32ec0 ("wifi: cfg80211: Annotate struct cfg80211_scan_request with __counted_by") Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Kalle Valo Cc: Chi-hsien Lin Cc: Ian Lin Cc: Johannes Berg Cc: Wright Feng Cc: Hector Martin Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Signed-off-by: Kees Cook Reviewed-by: Hans de Goede Reviewed-by: Linus Walleij Reviewed-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://msgid.link/20240126223150.work.548-kees@kernel.org commit ad834c7c8e4a74dd6cd4397848aa255e473d4a63 Merge: f2e5d3de7e1fb b4a1f4eaf1d79 Author: Greg Kroah-Hartman Date: Fri Feb 2 08:36:38 2024 -0800 Merge tag 'usb-serial-6.8-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial device ids for 6.8-rc3 Here are some new device ids for 6.8-rc3. All have been in linux-next with no reported issues. * tag 'usb-serial-6.8-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: add Fibocom FM101-GL variant USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e USB: serial: cp210x: add ID for IMST iM871A-USB commit e9f1e6bb55bea4f8cb48f8f7443bbac99b60d285 Author: Andreas Gruenbacher Date: Fri Feb 2 17:11:25 2024 +0100 Revert "gfs2: Use GL_NOBLOCK flag for non-blocking lookups" Commit "gfs2: Use GL_NOBLOCK flag for non-blocking lookups" has several issues, some of which are non-trivial to fix, so revert it for now: https://lore.kernel.org/gfs2/20240202050230.GA875515@ZenIV/T/ This reverts commit dd00aaeb343255a8a30de671bd27bde79a47c8e5. Signed-off-by: Andreas Gruenbacher commit bd6081be2251c3700eca8a7bbe071e1bb8cd2af4 Author: Vinod Koul Date: Tue Jan 30 22:02:16 2024 +0530 dmaengine: at_hdmac: add missing kernel-doc style description We get following warning with W=1: drivers/dma/at_hdmac.c:243: warning: Function parameter or struct member 'boundary' not described in 'at_desc' drivers/dma/at_hdmac.c:243: warning: Function parameter or struct member 'dst_hole' not described in 'at_desc' drivers/dma/at_hdmac.c:243: warning: Function parameter or struct member 'src_hole' not described in 'at_desc' drivers/dma/at_hdmac.c:243: warning: Function parameter or struct member 'memset_buffer' not described in 'at_desc' drivers/dma/at_hdmac.c:243: warning: Function parameter or struct member 'memset_paddr' not described in 'at_desc' drivers/dma/at_hdmac.c:243: warning: Function parameter or struct member 'memset_vaddr' not described in 'at_desc' drivers/dma/at_hdmac.c:255: warning: Enum value 'ATC_IS_PAUSED' not described in enum 'atc_status' drivers/dma/at_hdmac.c:255: warning: Enum value 'ATC_IS_CYCLIC' not described in enum 'atc_status' drivers/dma/at_hdmac.c:287: warning: Function parameter or struct member 'cyclic' not described in 'at_dma_chan' drivers/dma/at_hdmac.c:350: warning: Function parameter or struct member 'memset_pool' not described in 'at_dma' Fix this by adding the required description and also drop unused struct member 'cyclic' in 'at_dma_chan' Reviewed-by: Tudor Ambarus Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20240130163216.633034-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 6e7ad1aebb4fc9fed0217dd50ef6e58a53f17d81 Author: Saravana Kannan Date: Fri Feb 2 01:56:35 2024 -0800 driver core: fw_devlink: Improve logs for cycle detection The links in a cycle are not all logged in a consistent manner or not logged at all. Make them consistent by adding a "cycle:" string and log all the link in the cycles (even the child ==> parent dependency) so that it's easier to debug cycle detection code. Also, mark the start and end of a cycle so it's easy to tell when multiple cycles are logged back to back. Signed-off-by: Saravana Kannan Tested-by: Xu Yang Link: https://lore.kernel.org/r/20240202095636.868578-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 6442d79d880cf7a2fff18779265d657fef0cce4c Author: Saravana Kannan Date: Fri Feb 2 01:56:34 2024 -0800 driver core: fw_devlink: Improve detection of overlapping cycles fw_devlink can detect most overlapping/intersecting cycles. However it was missing a few corner cases because of an incorrect optimization logic that tries to avoid repeating cycle detection for devices that are already marked as part of a cycle. Here's an example provided by Xu Yang (edited for clarity): usb +-----+ tcpc | | +-----+ | +--| | |----------->|EP| |--+ | | +--| |EP|<-----------| | |--+ | | B | | | +-----+ | A | | +-----+ | ^ +-----+ | | | | | +-----| C |<--+ | | +-----+ usb-phy Node A (tcpc) will be populated as device 1-0050. Node B (usb) will be populated as device 38100000.usb. Node C (usb-phy) will be populated as device 381f0040.usb-phy. The description below uses the notation: consumer --> supplier child ==> parent 1. Node C is populated as device C. No cycles detected because cycle detection is only run when a fwnode link is converted to a device link. 2. Node B is populated as device B. As we convert B --> C into a device link we run cycle detection and find and mark the device link/fwnode link cycle: C--> A --> B.EP ==> B --> C 3. Node A is populated as device A. As we convert C --> A into a device link, we see it's already part of a cycle (from step 2) and don't run cycle detection. Thus we miss detecting the cycle: A --> B.EP ==> B --> A.EP ==> A Looking at it another way, A depends on B in one way: A --> B.EP ==> B But B depends on A in two ways and we only detect the first: B --> C --> A B --> A.EP ==> A To detect both of these, we remove the incorrect optimization attempt in step 3 and run cycle detection even if the fwnode link from which the device link is being created has already been marked as part of a cycle. Reported-by: Xu Yang Closes: https://lore.kernel.org/lkml/DU2PR04MB8822693748725F85DC0CB86C8C792@DU2PR04MB8822.eurprd04.prod.outlook.com/ Fixes: 3fb16866b51d ("driver core: fw_devlink: Make cycle detection more robust") Signed-off-by: Saravana Kannan Tested-by: Xu Yang Link: https://lore.kernel.org/r/20240202095636.868578-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 7fddac12c38237252431d5b8af7b6d5771b6d125 Author: Saravana Kannan Date: Fri Feb 2 01:56:33 2024 -0800 driver core: Fix device_link_flag_is_sync_state_only() device_link_flag_is_sync_state_only() correctly returns true on the flags of an existing device link that only implements sync_state() functionality. However, it incorrectly and confusingly returns false if it's called with DL_FLAG_SYNC_STATE_ONLY. This bug doesn't manifest in any of the existing calls to this function, but fix this confusing behavior to avoid future bugs. Fixes: 67cad5c67019 ("driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links") Signed-off-by: Saravana Kannan Tested-by: Xu Yang Link: https://lore.kernel.org/r/20240202095636.868578-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit a23c0af103e184bb1252dddddda040f6641bea7b Author: Benjamin Berg Date: Thu Feb 1 16:17:30 2024 +0200 wifi: iwlwifi: do not announce EPCS support mac80211 does not have proper support for EPCS currently as that would require changing the ECDA parameters if EPCS (Emergency Preparedness Communications Service) is in use. As such, do not announce support for it in the capabilities. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240201155157.59d71656addc.Idde91b3018239c49fc6ed231b411d05354fb9fb1@changeid Signed-off-by: Johannes Berg commit 16867c38bcd3be2eb9016a3198a096f93959086e Author: Miri Korenblit Date: Thu Feb 1 16:17:39 2024 +0200 wifi: iwlwifi: exit eSR only after the FW does Currently the driver exits eSR by calling iwl_mvm_esr_mode_inactive() before updating the FW (by deactivating one of the links), and therefore before sending the EML frame notifying that we are no longer in eSR. This is wrong for several reasons: 1. The driver sends SMPS activation frames when we are still in eSR and SMPS should be disabled when in eSR 2. The driver restores RLC configuration as it was before eSR entering, and RLC command shouldn't be sent in eSR Fix this by calling iwl_mvm_esr_mode_inactive() after FW update Fixes: 12bacfc2c065 ("wifi: iwlwifi: handle eSR transitions") Signed-off-by: Miri Korenblit Reviewed-by: Ilan Peer Reviewed-by: Gregory Greenman Link: https://msgid.link/20240201155157.d8d9dc277d4e.Ib5aee0fd05e35b1da7f18753eb3c8fa0a3f872f3@changeid Signed-off-by: Johannes Berg commit 1fa942f31665ea5dc5d4d95893dd13723eaa97cc Author: Emmanuel Grumbach Date: Sun Jan 28 08:53:57 2024 +0200 wifi: iwlwifi: mvm: fix a battery life regression Fix the DBG_CONFIG_TOKEN to not enable debug components that would prevent the device to save power. Fixes: fc2fe0a5e856 ("wifi: iwlwifi: fw: disable firmware debug asserts") Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Reviewed-by: Eilon Rinat Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20240128084842.90d2600edc27.Id657ea2f0ddb131f5f9d0ac39aeb8c88754fe54b@changeid Signed-off-by: Johannes Berg commit fe92f874f09145a6951deacaa4961390238bbe0d Author: Michael Lass Date: Wed Jan 31 16:52:20 2024 +0100 net: Fix from address in memcpy_to_iter_csum() While inlining csum_and_memcpy() into memcpy_to_iter_csum(), the from address passed to csum_partial_copy_nocheck() was accidentally changed. This causes a regression in applications using UDP, as for example OpenAFS, causing loss of datagrams. Fixes: dc32bff195b4 ("iov_iter, net: Fold in csum_and_memcpy()") Cc: David Howells Cc: stable@vger.kernel.org Cc: regressions@lists.linux.dev Signed-off-by: Michael Lass Reviewed-by: Jeffrey Altman Acked-by: David Howells Signed-off-by: David S. Miller commit 62a6183c13319e4d2227473a04abd104c4f56dcf Author: Johannes Berg Date: Mon Jan 29 20:09:07 2024 +0100 wifi: mac80211: accept broadcast probe responses on 6 GHz On the 6 GHz band, probe responses are sent as broadcast to optimise medium usage. However, without OCE configuration we weren't accepting them, which is wrong, even if wpa_s is by default enabling OCE. Accept them without the OCE config as well. Link: https://msgid.link/20240129200907.5a89c2821897.I92e9dfa0f9b350bc7f37dd4bb38031d156d78d8a@changeid Signed-off-by: Johannes Berg commit c042600c17d8c490279f0ae2baee29475fe8047d Author: Johannes Berg Date: Wed Jan 31 16:48:23 2024 +0100 wifi: mac80211: adding missing drv_mgd_complete_tx() call There's a call to drv_mgd_prepare_tx() and so there should be one to drv_mgd_complete_tx(), but on this path it's not. Add it. Link: https://msgid.link/20240131164824.2f0922a514e1.I5aac89b93bcead88c374187d70cad0599d29d2c8@changeid Signed-off-by: Johannes Berg commit a0b4f2291319c5d47ecb196b90400814fdcfd126 Author: Johannes Berg Date: Wed Jan 31 16:48:56 2024 +0100 wifi: mac80211: fix waiting for beacons logic This should be waiting if we don't have a beacon yet, but somehow I managed to invert the logic. Fix that. Fixes: 74e1309acedc ("wifi: mac80211: mlme: look up beacon elems only if needed") Link: https://msgid.link/20240131164856.922701229546.I239b379e7cee04608e73c016b737a5245e5b23dd@changeid Signed-off-by: Johannes Berg commit 178e9d6adc4356c2f1659f575ecea626e7fbd05a Author: Johannes Berg Date: Mon Jan 29 19:57:30 2024 +0100 wifi: mac80211: fix unsolicited broadcast probe config There's a bug in ieee80211_set_unsol_bcast_probe_resp(), it tries to return BSS_CHANGED_UNSOL_BCAST_PROBE_RESP (which has the value 1<<31) in an int, which makes it negative and considered an error. Fix this by passing the changed flags to set separately. Fixes: 3b1c256eb4ae ("wifi: mac80211: fixes in FILS discovery updates") Reviewed-by: Jeff Johnson Link: https://msgid.link/20240129195729.965b0740bf80.I6bc6f5236863f686c17d689be541b1dd2633c417@changeid Signed-off-by: Johannes Berg commit 86b2dac224f963be92634a878888222e1e938f48 Author: Johannes Berg Date: Mon Jan 29 19:54:05 2024 +0100 wifi: mac80211: initialize SMPS mode correctly The SMPS mode is currently re-initialized too late, since ieee80211_prep_channel() can be called again after we've already done ieee80211_setup_assoc_link(), in case there's some override of the channel configuration. Fix this. Link: https://msgid.link/20240129195405.d6d74508be18.I0a7303b1ce4d8e5436011951ab624372a445c069@changeid Signed-off-by: Johannes Berg commit 733c498a80853acbafe284a40468b91f4d41f0b4 Author: Johannes Berg Date: Mon Jan 29 15:54:02 2024 +0100 wifi: mac80211: fix driver debugfs for vif type change If a driver implements the change_interface() method, we switch interface type without taking the interface down, but still will recreate the debugfs for it since it's a new type. As such, we should use the ieee80211_debugfs_recreate_netdev() function here to also recreate the driver's files, if it is indeed from a type change while up. Link: https://msgid.link/20240129155402.7311a36ffeeb.I18df02bbeb685d4250911de5ffbaf090f60c3803@changeid Signed-off-by: Johannes Berg commit dd6c064cfc3fc18d871107c6f5db8837e88572e4 Author: Johannes Berg Date: Mon Jan 29 15:53:55 2024 +0100 wifi: mac80211: set station RX-NSS on reconfig When a station is added/reconfigured by userspace, e.g. a TDLS peer or a SoftAP client STA, rx_nss is currently not always set, so that it might be left zero. Set it up properly. Link: https://msgid.link/20240129155354.98f148a3d654.I193a02155f557ea54dc9d0232da66cf96734119a@changeid Signed-off-by: Johannes Berg commit 9480adfe4e0f0319b9da04b44e4eebd5ad07e0cd Author: Johannes Berg Date: Mon Jan 29 15:53:48 2024 +0100 wifi: mac80211: fix RCU use in TDLS fast-xmit This looks up the link under RCU protection, but isn't guaranteed to actually have protection. Fix that. Fixes: 8cc07265b691 ("wifi: mac80211: handle TDLS data frames with MLO") Link: https://msgid.link/20240129155348.8a9c0b1e1d89.I553f96ce953bb41b0b877d592056164dec20d01c@changeid Signed-off-by: Johannes Berg commit 35e2385dbe787936c793d70755a5177d267a40aa Author: Johannes Berg Date: Mon Jan 29 13:14:14 2024 +0100 wifi: mac80211: improve CSA/ECSA connection refusal As mentioned in the previous commit, we pretty quickly found that some APs have ECSA elements stuck in their probe response, so using that to not attempt to connect while CSA is happening we never connect to such an AP. Improve this situation by checking more carefully and ignoring the ECSA if cfg80211 has previously detected the ECSA element being stuck in the probe response. Additionally, allow connecting to an AP that's switching to a channel it's already using, unless it's using quiet mode. In this case, we may just have to adjust bandwidth later. If it's actually switching channels, it's better not to try to connect in the middle of that. Reported-by: coldolt Closes: https://lore.kernel.org/linux-wireless/CAJvGw+DQhBk_mHXeu6RTOds5iramMW2FbMB01VbKRA4YbHHDTA@mail.gmail.com/ Fixes: c09c4f31998b ("wifi: mac80211: don't connect to an AP while it's in a CSA process") Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240129131413.cc2d0a26226e.I682c016af76e35b6c47007db50e8554c5a426910@changeid Signed-off-by: Johannes Berg commit 177fbbcb4ed6b306c1626a277fac3fb1c495a4c7 Author: Johannes Berg Date: Mon Jan 29 13:14:13 2024 +0100 wifi: cfg80211: detect stuck ECSA element in probe resp We recently added some validation that we don't try to connect to an AP that is currently in a channel switch process, since that might want the channel to be quiet or we might not be able to connect in time to hear the switching in a beacon. This was in commit c09c4f31998b ("wifi: mac80211: don't connect to an AP while it's in a CSA process"). However, we promptly got a report that this caused new connection failures, and it turns out that the AP that we now cannot connect to is permanently advertising an extended channel switch announcement, even with quiet. The AP in question was an Asus RT-AC53, with firmware 3.0.0.4.380_10760-g21a5898. As a first step, attempt to detect that we're dealing with such a situation, so mac80211 can use this later. Reported-by: coldolt Closes: https://lore.kernel.org/linux-wireless/CAJvGw+DQhBk_mHXeu6RTOds5iramMW2FbMB01VbKRA4YbHHDTA@mail.gmail.com/ Fixes: c09c4f31998b ("wifi: mac80211: don't connect to an AP while it's in a CSA process") Reviewed-by: Miriam Rachel Korenblit Link: https://msgid.link/20240129131413.246972c8775e.Ibf834d7f52f9951a353b6872383da710a7358338@changeid Signed-off-by: Johannes Berg commit 349bd87f6091ac68b8eab368ce30bcaf6d45c50e Merge: 96204e15310c2 41bccc98fb793 Author: Andrew Morton Date: Fri Feb 2 03:11:07 2024 -0800 Merge branch 'master' into mm-hotfixes-stable commit 24c890dd712f6345e382256cae8c97abb0406b70 Author: Herbert Xu Date: Thu Feb 1 13:49:09 2024 +0800 crypto: algif_hash - Remove bogus SGL free on zero-length error path When a zero-length message is hashed by algif_hash, and an error is triggered, it tries to free an SG list that was never allocated in the first place. Fix this by not freeing the SG list on the zero-length error path. Reported-by: Shigeru Yoshida Reported-by: xingwei lee Fixes: b6d972f68983 ("crypto: af_alg/hash: Fix recvmsg() after sendmsg(MSG_MORE)") Cc: Signed-off-by: Herbert Xu Reported-by: syzbot+3266db0c26d1fbbe3abb@syzkaller.appspotmail.com Signed-off-by: Herbert Xu commit 69fba378edcaffba7bc7d299fdee02e377069d30 Author: Herbert Xu Date: Mon Jan 29 22:17:11 2024 +0800 crypto: cbc - Ensure statesize is zero The cbc template should not be applied on stream ciphers, especially ones that have internal state. Enforce this by checking the state size when the instance is created. Reported-by: syzbot+050eeedd6c285d8c42f2@syzkaller.appspotmail.com Fixes: 47309ea13591 ("crypto: arc4 - Add internal state") Signed-off-by: Herbert Xu commit ccb88e9549e7cfd8bcd511c538f437e20026e983 Author: Kim Phillips Date: Thu Jan 25 17:12:53 2024 -0600 crypto: ccp - Fix null pointer dereference in __sev_platform_shutdown_locked The SEV platform device can be shutdown with a null psp_master, e.g., using DEBUG_TEST_DRIVER_REMOVE. Found using KASAN: [ 137.148210] ccp 0000:23:00.1: enabling device (0000 -> 0002) [ 137.162647] ccp 0000:23:00.1: no command queues available [ 137.170598] ccp 0000:23:00.1: sev enabled [ 137.174645] ccp 0000:23:00.1: psp enabled [ 137.178890] general protection fault, probably for non-canonical address 0xdffffc000000001e: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN NOPTI [ 137.182693] KASAN: null-ptr-deref in range [0x00000000000000f0-0x00000000000000f7] [ 137.182693] CPU: 93 PID: 1 Comm: swapper/0 Not tainted 6.8.0-rc1+ #311 [ 137.182693] RIP: 0010:__sev_platform_shutdown_locked+0x51/0x180 [ 137.182693] Code: 08 80 3c 08 00 0f 85 0e 01 00 00 48 8b 1d 67 b6 01 08 48 b8 00 00 00 00 00 fc ff df 48 8d bb f0 00 00 00 48 89 f9 48 c1 e9 03 <80> 3c 01 00 0f 85 fe 00 00 00 48 8b 9b f0 00 00 00 48 85 db 74 2c [ 137.182693] RSP: 0018:ffffc900000cf9b0 EFLAGS: 00010216 [ 137.182693] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 000000000000001e [ 137.182693] RDX: 0000000000000000 RSI: 0000000000000008 RDI: 00000000000000f0 [ 137.182693] RBP: ffffc900000cf9c8 R08: 0000000000000000 R09: fffffbfff58f5a66 [ 137.182693] R10: ffffc900000cf9c8 R11: ffffffffac7ad32f R12: ffff8881e5052c28 [ 137.182693] R13: ffff8881e5052c28 R14: ffff8881758e43e8 R15: ffffffffac64abf8 [ 137.182693] FS: 0000000000000000(0000) GS:ffff889de7000000(0000) knlGS:0000000000000000 [ 137.182693] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 137.182693] CR2: 0000000000000000 CR3: 0000001cf7c7e000 CR4: 0000000000350ef0 [ 137.182693] Call Trace: [ 137.182693] [ 137.182693] ? show_regs+0x6c/0x80 [ 137.182693] ? __die_body+0x24/0x70 [ 137.182693] ? die_addr+0x4b/0x80 [ 137.182693] ? exc_general_protection+0x126/0x230 [ 137.182693] ? asm_exc_general_protection+0x2b/0x30 [ 137.182693] ? __sev_platform_shutdown_locked+0x51/0x180 [ 137.182693] sev_firmware_shutdown.isra.0+0x1e/0x80 [ 137.182693] sev_dev_destroy+0x49/0x100 [ 137.182693] psp_dev_destroy+0x47/0xb0 [ 137.182693] sp_destroy+0xbb/0x240 [ 137.182693] sp_pci_remove+0x45/0x60 [ 137.182693] pci_device_remove+0xaa/0x1d0 [ 137.182693] device_remove+0xc7/0x170 [ 137.182693] really_probe+0x374/0xbe0 [ 137.182693] ? srso_return_thunk+0x5/0x5f [ 137.182693] __driver_probe_device+0x199/0x460 [ 137.182693] driver_probe_device+0x4e/0xd0 [ 137.182693] __driver_attach+0x191/0x3d0 [ 137.182693] ? __pfx___driver_attach+0x10/0x10 [ 137.182693] bus_for_each_dev+0x100/0x190 [ 137.182693] ? __pfx_bus_for_each_dev+0x10/0x10 [ 137.182693] ? __kasan_check_read+0x15/0x20 [ 137.182693] ? srso_return_thunk+0x5/0x5f [ 137.182693] ? _raw_spin_unlock+0x27/0x50 [ 137.182693] driver_attach+0x41/0x60 [ 137.182693] bus_add_driver+0x2a8/0x580 [ 137.182693] driver_register+0x141/0x480 [ 137.182693] __pci_register_driver+0x1d6/0x2a0 [ 137.182693] ? srso_return_thunk+0x5/0x5f [ 137.182693] ? esrt_sysfs_init+0x1cd/0x5d0 [ 137.182693] ? __pfx_sp_mod_init+0x10/0x10 [ 137.182693] sp_pci_init+0x22/0x30 [ 137.182693] sp_mod_init+0x14/0x30 [ 137.182693] ? __pfx_sp_mod_init+0x10/0x10 [ 137.182693] do_one_initcall+0xd1/0x470 [ 137.182693] ? __pfx_do_one_initcall+0x10/0x10 [ 137.182693] ? parameq+0x80/0xf0 [ 137.182693] ? srso_return_thunk+0x5/0x5f [ 137.182693] ? __kmalloc+0x3b0/0x4e0 [ 137.182693] ? kernel_init_freeable+0x92d/0x1050 [ 137.182693] ? kasan_populate_vmalloc_pte+0x171/0x190 [ 137.182693] ? srso_return_thunk+0x5/0x5f [ 137.182693] kernel_init_freeable+0xa64/0x1050 [ 137.182693] ? __pfx_kernel_init+0x10/0x10 [ 137.182693] kernel_init+0x24/0x160 [ 137.182693] ? __switch_to_asm+0x3e/0x70 [ 137.182693] ret_from_fork+0x40/0x80 [ 137.182693] ? __pfx_kernel_init+0x10/0x10 [ 137.182693] ret_from_fork_asm+0x1b/0x30 [ 137.182693] [ 137.182693] Modules linked in: [ 137.538483] ---[ end trace 0000000000000000 ]--- Fixes: 1b05ece0c931 ("crypto: ccp - During shutdown, check SEV data pointer before using") Cc: stable@vger.kernel.org Reviewed-by: Mario Limonciello Signed-off-by: Kim Phillips Reviewed-by: Liam Merwick Acked-by: John Allen Signed-off-by: Herbert Xu commit 46eba193d04f8bd717e525eb4110f3c46c12aec3 Author: Furong Xu <0x1207@gmail.com> Date: Wed Jan 31 10:08:28 2024 +0800 net: stmmac: xgmac: fix handling of DPP safety error for DMA channels Commit 56e58d6c8a56 ("net: stmmac: Implement Safety Features in XGMAC core") checks and reports safety errors, but leaves the Data Path Parity Errors for each channel in DMA unhandled at all, lead to a storm of interrupt. Fix it by checking and clearing the DMA_DPP_Interrupt_Status register. Fixes: 56e58d6c8a56 ("net: stmmac: Implement Safety Features in XGMAC core") Signed-off-by: Furong Xu <0x1207@gmail.com> Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit bb6f4dbe2639d5b8a9fde4bfb6fefecfd3f18df3 Author: Mickaël Salaün Date: Thu Jan 25 16:32:29 2024 +0100 selftests/landlock: Fix capability for net_test CAP_NET_ADMIN allows to configure network interfaces, not CAP_SYS_ADMIN which only allows to call unshare(2). Without this change, running network tests as a non-root user but with all capabilities would fail at the setup_loopback() step with "RTNETLINK answers: Operation not permitted". The issue is only visible when running tests with non-root users (i.e. only relying on ambient capabilities). Indeed, when configuring the network interface, the "ip" command is called, which may lead to the special handling of capabilities for the root user by execve(2). If root is the caller, then the inherited, permitted and effective capabilities are all reset, which then includes CAP_NET_ADMIN. However, if a non-root user is the caller, then ambient capabilities are masked by the inherited ones, which were explicitly dropped. To make execution deterministic whatever users are running the tests, set the noroot secure bit for each test, and set the inheritable and ambient capabilities to CAP_NET_ADMIN, the only capability that may be required after an execve(2). Factor out _effective_cap() into _change_cap(), and use it to manage ambient capabilities with the new set_ambient_cap() and clear_ambient_cap() helpers. This makes it possible to run all Landlock tests with check-linux.sh from https://github.com/landlock-lsm/landlock-test-tools Cc: Konstantin Meskhidze Fixes: a549d055a22e ("selftests/landlock: Add network tests") Link: https://lore.kernel.org/r/20240125153230.3817165-2-mic@digikod.net [mic: Make sure SECBIT_NOROOT_LOCKED is set] Signed-off-by: Mickaël Salaün commit d2d00e15808c37ec476a5c040ee2cdd23854ef18 Author: Shivaprasad G Bhat Date: Fri Jan 26 09:09:18 2024 -0600 powerpc: iommu: Bring back table group release_ownership() call The commit 2ad56efa80db ("powerpc/iommu: Setup a default domain and remove set_platform_dma_ops") refactored the code removing the set_platform_dma_ops(). It missed out the table group release_ownership() call which would have got called otherwise during the guest shutdown via vfio_group_detach_container(). On PPC64, this particular call actually sets up the 32-bit TCE table, and enables the 64-bit DMA bypass etc. Now after guest shutdown, the subsequent host driver (e.g megaraid-sas) probe post unbind from vfio-pci fails like, megaraid_sas 0031:01:00.0: Warning: IOMMU dma not supported: mask 0x7fffffffffffffff, table unavailable megaraid_sas 0031:01:00.0: Warning: IOMMU dma not supported: mask 0xffffffff, table unavailable megaraid_sas 0031:01:00.0: Failed to set DMA mask megaraid_sas 0031:01:00.0: Failed from megasas_init_fw 6539 The patch brings back the call to table_group release_ownership() call when switching back to PLATFORM domain from BLOCKED, while also separates the domain_ops for both. Fixes: 2ad56efa80db ("powerpc/iommu: Setup a default domain and remove set_platform_dma_ops") Signed-off-by: Shivaprasad G Bhat Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/170628173462.3742.18330000394415935845.stgit@ltcd48-lp2.aus.stglab.ibm.com Signed-off-by: Joerg Roedel commit 39126abc5e20611579602f03b66627d7cd1422f0 Author: Dave Airlie Date: Mon Jan 29 11:26:45 2024 +1000 nouveau: offload fence uevents work to workqueue This should break the deadlock between the fctx lock and the irq lock. This offloads the processing off the work from the irq into a workqueue. Cc: linux-stable@vger.kernel.org Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/576237/ commit b5e69be185495696652405088a27ab0b21812147 Author: Dave Airlie Date: Tue Jan 30 13:24:40 2024 +1000 nouveau/gsp: use correct size for registry rpc. Timur pointed this out before, and it just slipped my mind, but this might help some things work better, around pcie power management. Fixes: 8d55b0a940bb ("nouveau/gsp: add some basic registry entries.") Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/576336/ commit a639525686c57f6c8da76c4893f90dd33ec5e412 Merge: 111a3f0afb88e 6813cdca4ab94 Author: Dave Airlie Date: Fri Feb 2 15:30:16 2024 +1000 Merge tag 'amd-drm-fixes-6.8-2024-02-01' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.8-2024-02-01: amdgpu: - Fix reboot issue seen on some 7000 series dGPUs - Fix client init order for KFD - Misc display fixes - USB-C fix - DCN 3.5 fixes - Fix issues with GPU scheduler and GPU reset - GPU firmware loading fix - Misc fixes - GC 11.5 fix - VCN 4.0.5 fix - IH overflow fix amdkfd: - SVM fixes - Trap handler fix - Fix device permission lookup - Properly reserve BO before validating it Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240201184108.4923-1-alexander.deucher@amd.com commit ec9d669eba4c276d00af88951947fe0e82a6b84c Author: Zhang Yi Date: Sat Jan 27 09:58:05 2024 +0800 ext4: make ext4_set_iomap() recognize IOMAP_DELALLOC map type Since ext4_map_blocks() can recognize a delayed allocated only extent, make ext4_set_iomap() can also recognize it, and remove the useless separate check in ext4_iomap_begin_report(). Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240127015825.1608160-7-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 874eaba96d39334fe9c729ff631e65523616d4d8 Author: Zhang Yi Date: Sat Jan 27 09:58:04 2024 +0800 ext4: make ext4_map_blocks() distinguish delalloc only extent Add a new map flag EXT4_MAP_DELAYED to indicate the mapping range is a delayed allocated only (not unwritten) one, and making ext4_map_blocks() can distinguish it, no longer mixing it with holes. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240127015825.1608160-6-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 9f1118223aa080021fe9751fa221590654d27669 Author: Zhang Yi Date: Sat Jan 27 09:58:03 2024 +0800 ext4: add a hole extent entry in cache after punch In order to cache hole extents in the extent status tree and keep the hole length as long as possible, re-add a hole entry to the cache just after punching a hole. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240127015825.1608160-5-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 9cf6e24c9fbf17e52de9fff07f12be7565ea6d61 Author: Hans de Goede Date: Fri Jan 26 17:07:24 2024 +0100 Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID After commit 936e4d49ecbc ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") not only the getid command is skipped, but also the de-activating of the keyboard at the end of atkbd_probe(), potentially re-introducing the problem fixed by commit be2d7e4233a4 ("Input: atkbd - fix multi-byte scancode handling on reconnect"). Make sure multi-byte scancode handling on reconnect is still handled correctly by not skipping the atkbd_deactivate() call. Fixes: 936e4d49ecbc ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") Tested-by: Paul Menzel Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240126160724.13278-3-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 683cd8259a9b883a51973511f860976db2550a6e Author: Hans de Goede Date: Fri Jan 26 17:07:23 2024 +0100 Input: atkbd - skip ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID After commit 936e4d49ecbc ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") the keyboard on Dell XPS 13 9350 / 9360 / 9370 models has stopped working after a suspend/resume. The problem appears to be that atkbd_probe() fails when called from atkbd_reconnect() on resume, which on systems where ATKBD_CMD_GETID is skipped can only happen by ATKBD_CMD_SETLEDS failing. ATKBD_CMD_SETLEDS failing because ATKBD_CMD_GETID was skipped is weird, but apparently that is what is happening. Fix this by also skipping ATKBD_CMD_SETLEDS when skipping ATKBD_CMD_GETID. Fixes: 936e4d49ecbc ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") Reported-by: Paul Menzel Closes: https://lore.kernel.org/linux-input/0aa4a61f-c939-46fe-a572-08022e8931c7@molgen.mpg.de/ Closes: https://bbs.archlinux.org/viewtopic.php?pid=2146300 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218424 Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2260517 Tested-by: Paul Menzel Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240126160724.13278-2-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 6430dea07e85958fa87d0276c0c4388dd51e630b Author: Zhang Yi Date: Sat Jan 27 09:58:02 2024 +0800 ext4: correct the hole length returned by ext4_map_blocks() In ext4_map_blocks(), if we can't find a range of mapping in the extents cache, we are calling ext4_ext_map_blocks() to search the real path and ext4_ext_determine_hole() to determine the hole range. But if the querying range was partially or completely overlaped by a delalloc extent, we can't find it in the real extent path, so the returned hole length could be incorrect. Fortunately, ext4_ext_put_gap_in_cache() have already handle delalloc extent, but it searches start from the expanded hole_start, doesn't start from the querying range, so the delalloc extent found could not be the one that overlaped the querying range, plus, it also didn't adjust the hole length. Let's just remove ext4_ext_put_gap_in_cache(), handle delalloc and insert adjusted hole extent in ext4_ext_determine_hole(). Signed-off-by: Zhang Yi Suggested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240127015825.1608160-4-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit acf795dc161f3cf481db20f05db4250714e375e5 Author: Zhang Yi Date: Sat Jan 27 09:58:01 2024 +0800 ext4: convert to exclusive lock while inserting delalloc extents ext4_da_map_blocks() only hold i_data_sem in shared mode and i_rwsem when inserting delalloc extents, it could be raced by another querying path of ext4_map_blocks() without i_rwsem, .e.g buffered read path. Suppose we buffered read a file containing just a hole, and without any cached extents tree, then it is raced by another delayed buffered write to the same area or the near area belongs to the same hole, and the new delalloc extent could be overwritten to a hole extent. pread() pwrite() filemap_read_folio() ext4_mpage_readpages() ext4_map_blocks() down_read(i_data_sem) ext4_ext_determine_hole() //find hole ext4_ext_put_gap_in_cache() ext4_es_find_extent_range() //no delalloc extent ext4_da_map_blocks() down_read(i_data_sem) ext4_insert_delayed_block() //insert delalloc extent ext4_es_insert_extent() //overwrite delalloc extent to hole This race could lead to inconsistent delalloc extents tree and incorrect reserved space counter. Fix this by converting to hold i_data_sem in exclusive mode when adding a new delalloc extent in ext4_da_map_blocks(). Cc: stable@vger.kernel.org Signed-off-by: Zhang Yi Suggested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240127015825.1608160-3-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 3fcc2b887a1ba4c1f45319cd8c54daa263ecbc36 Author: Zhang Yi Date: Sat Jan 27 09:58:00 2024 +0800 ext4: refactor ext4_da_map_blocks() Refactor and cleanup ext4_da_map_blocks(), reduce some unnecessary parameters and branches, no logic changes. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240127015825.1608160-2-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o commit 111a3f0afb88e31a6a7b5768d23288e982f12496 Merge: 419d8a93757f1 5f16ee27cd5ab Author: Dave Airlie Date: Fri Feb 2 13:52:03 2024 +1000 Merge tag 'drm-xe-fixes-2024-02-01' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes UAPI Changes: - Only allow a single user-fence per exec / bind. The reason for this clarification fix is a limitation in the implementation which can be lifted moving forward, if needed. Driver Changes: - A crash fix - A fix for an assert due to missing mem_acces ref - Only allow a single user-fence per exec / bind. - Some sparse warning fixes - Two fixes for compilation failures on various odd combinations of gcc / arch pointed out on LKML. - Fix a fragile partial allocation pointed out on LKML. Cross-driver Change: - A sysfs ABI documentation warning fix This also touches i915 and is acked by i915 maintainers. Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/ZbuCYdMDVK-kAWC5@fedora commit 419d8a93757f1fb4a0bd10e9c462a2f6da077ca7 Merge: 41bccc98fb793 1c1914d6e8c6e Author: Dave Airlie Date: Fri Feb 2 12:13:01 2024 +1000 Merge tag 'drm-misc-fixes-2024-02-01' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A quiet week: one fix for CMA dma-buf pages accounting, and one to virtio to set the segment size of the virtio_gpu device. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/obnofpccz73c3uiqfyipxmjta5fgm4cle55dmtnissgtgxfgv7@22o7kb62efri commit 917e9b7c2350e3e53162fcf5035e5f2d68e2cbed Author: Rob Clark Date: Tue Jan 9 10:22:17 2024 -0800 Revert "drm/msm/gpu: Push gpu lock down past runpm" This reverts commit abe2023b4cea192ab266b351fd38dc9dbd846df0. Changing the locking order means that scheduler/msm_job_run() can race with the recovery kthread worker, with the result that the GPU gets an extra runpm get when we are trying to power it off. Leaving the GPU in an unrecovered state. I'll need to come up with a different scheme for appeasing lockdep. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/573835/ commit 6a0dbcd20ef252ebf98af94186a2e53da7167bed Author: Dmitry Baryshkov Date: Tue Jan 9 22:41:08 2024 +0200 drm/msm/a6xx: set highest_bank_bit to 13 for a610 During the testing of Gnome on Qualcomm Robotics platform screen corruption has been observed. Lowering GPU's highest_bank_bit from 14 to 13 seems to fix the screen corruption. Note, the MDSS and DPU drivers use HBB=1 (which maps to the highest_bank_bit = 14). So this change merely works around the UBWC swizzling issue on this platform until the real cause is found. Fixes: e7fc9398e608 ("drm/msm/a6xx: Add A610 support") Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/573838/ Signed-off-by: Rob Clark commit 03facb39d6c6433a78d0f79c7a146b1e6a61943e Author: Rob Clark Date: Wed Jan 31 07:08:54 2024 -0800 drm/msm/gem: Fix double resv lock aquire Since commit 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations"), the resv lock is already held in the prime vmap path, so don't try to grab it again. v2: This applies to vunmap path as well v3: Fix fixes commit Fixes: 79e2cf2e7a19 ("drm/gem: Take reservation lock for vmap/vunmap operations") Signed-off-by: Rob Clark Acked-by: Christian König Patchwork: https://patchwork.freedesktop.org/patch/576642/ commit 021533194476035883300d60fbb3136426ac8ea5 Author: Linus Torvalds Date: Thu Feb 1 14:57:17 2024 -0800 Kconfig: Disable -Wstringop-overflow for GCC globally It turns out it was never just gcc-11 that was broken. Apparently it just happens to work on x86-64 with other gcc versions. On arm64, I see warnings with gcc version 13.2.1, and the kernel test robot reports the same problem on s390 with gcc 13.2.0. Admittedly it seems to be just the new Xe drm driver, but this is keeping me from doing my normal arm64 build testing. So it gets reverted until somebody figures out what causes the problem (and why it doesn't show on x86-64, which is what makes me suspect it was never just about gcc-11, and more about just random happenstance). This also changes the Kconfig naming a bit - just make the "disable this for GCC" conditional be one simple Kconfig entry, and we can put the gcc version dependencies in that entry once we figure out what the correct rules are. The version dependency _may_ still end up being "gcc version larger than 11" if the issue is purely in the Xe driver, but even if that ends up the case, let's make that all part of the "GCC_NO_STRINGOP_OVERFLOW" logic. For now, we just disable it for all gcc versions while the exact cause is unknown. Link: https://lore.kernel.org/all/202401161031.hjGJHMiJ-lkp@intel.com/T/ Cc: Gustavo A. R. Silva Cc: Kees Cook Signed-off-by: Linus Torvalds commit 168b849728c2c47ddaab1408049561100bb7ea51 Merge: d9807d60c1458 a179a4bfb694f Author: Palmer Dabbelt Date: Thu Feb 1 13:25:57 2024 -0800 Merge patch series "svnapot fixes" Alexandre Ghiti says: While merging riscv napot and arm64 contpte support, I noticed we did not abide by the specification which states that we should clear a napot mapping before setting a new one, called "break before make" in arm64 (patch 1). And also that we did not add the new hugetlb page size added by napot in hugetlb_mask_last_page() (patch 2). * b4-shazam-merge: riscv: Fix hugetlb_mask_last_page() when NAPOT is enabled riscv: Fix set_huge_pte_at() for NAPOT mapping Link: https://lore.kernel.org/r/20240117195741.1926459-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit a179a4bfb694f80f2709a1d0398469e787acb974 Author: Alexandre Ghiti Date: Wed Jan 17 20:57:41 2024 +0100 riscv: Fix hugetlb_mask_last_page() when NAPOT is enabled When NAPOT is enabled, a new hugepage size is available and then we need to make hugetlb_mask_last_page() aware of that. Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240117195741.1926459-3-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 1458eb2c9d88ad4b35eb6d6a4aa1d43d8fbf7f62 Author: Alexandre Ghiti Date: Wed Jan 17 20:57:40 2024 +0100 riscv: Fix set_huge_pte_at() for NAPOT mapping As stated by the privileged specification, we must clear a NAPOT mapping and emit a sfence.vma before setting a new translation. Fixes: 82a1a1f3bfb6 ("riscv: mm: support Svnapot in hugetlb page") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240117195741.1926459-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 41b9fb381a486360b2daaec0c7480f8e3ff72bc7 Merge: 91481c9092465 4e192be1a225b Author: Linus Torvalds Date: Thu Feb 1 12:39:54 2024 -0800 Merge tag 'net-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from netfilter. As Paolo promised we continue to hammer out issues in our selftests. This is not the end but probably the peak. Current release - regressions: - smc: fix incorrect SMC-D link group matching logic Current release - new code bugs: - eth: bnxt: silence WARN() when device skips a timestamp, it happens Previous releases - regressions: - ipmr: fix null-deref when forwarding mcast packets - conntrack: evaluate window negotiation only for packets in the REPLY direction, otherwise SYN retransmissions trigger incorrect window scale negotiation - ipset: fix performance regression in swap operation Previous releases - always broken: - tcp: add sanity checks to types of pages getting into the rx zerocopy path, we only support basic NIC -> user, no page cache pages etc. - ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv() - nt_tables: more input sanitization changes - dsa: mt7530: fix 10M/100M speed on MediaTek MT7988 switch - bridge: mcast: fix loss of snooping after long uptime, jiffies do wrap on 32bit - xen-netback: properly sync TX responses, protect with locking - phy: mediatek-ge-soc: sync calibration values with MediaTek SDK, increase connection stability - eth: pds: fixes for various teardown, and reset races Misc: - hsr: silence WARN() if we can't alloc supervision frame, it happens" * tag 'net-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (82 commits) doc/netlink/specs: Add missing attr in rt_link spec idpf: avoid compiler padding in virtchnl2_ptype struct selftests: mptcp: join: stop transfer when check is done (part 2) selftests: mptcp: join: stop transfer when check is done (part 1) selftests: mptcp: allow changing subtests prefix selftests: mptcp: decrease BW in simult flows selftests: mptcp: increase timeout to 30 min selftests: mptcp: add missing kconfig for NF Mangle selftests: mptcp: add missing kconfig for NF Filter in v6 selftests: mptcp: add missing kconfig for NF Filter mptcp: fix data re-injection from stale subflow selftests: net: enable some more knobs selftests: net: add missing config for NF_TARGET_TTL selftests: forwarding: List helper scripts in TEST_FILES Makefile variable selftests: net: List helper scripts in TEST_FILES Makefile variable selftests: net: Remove executable bits from library scripts selftests: bonding: Check initial state selftests: team: Add missing config options hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove xen-netback: properly sync TX responses ... commit 91481c9092465d68bcb4540ac0dbfd65024a0170 Merge: a412682659b38 913b9d443a018 Author: Linus Torvalds Date: Thu Feb 1 12:32:43 2024 -0800 Merge tag 'parisc-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture fixes from Helge Deller: "The current exception handler, which helps on kernel accesses to userspace, may exhibit data corruption. The problem is that it is not guaranteed that the compiler will use the processor register we specified in the source code, but may choose another register which then will lead to silent register- and data corruption. To fix this issue we now use another strategy to help the exception handler to always find and set the error code into the correct CPU register. The other fixes are small: fixing CPU hotplug bringup, fix the page alignment of the RO_DATA section, added a check for the calculated cache stride and fix possible hangups when printing longer output at bootup when running on serial console. Most of the patches are tagged for stable series. - Fix random data corruption triggered by exception handler - Fix crash when setting up BTLB at CPU bringup - Prevent hung tasks when printing inventory on serial console - Make RO_DATA page aligned in vmlinux.lds.S - Add check for valid cache stride size" * tag 'parisc-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: BTLB: Fix crash when setting up BTLB at CPU bringup parisc: Fix random data corruption from exception handler parisc: Drop unneeded semicolon in parse_tree_node() parisc: Prevent hung tasks when printing inventory on serial console parisc: Check for valid stride size for cache flushes parisc: Make RO_DATA page aligned in vmlinux.lds.S commit a412682659b3832ac6f1a301e1c147027926f605 Merge: cfdf0c09a68b6 bfef491df6702 Author: Linus Torvalds Date: Thu Feb 1 11:57:42 2024 -0800 Merge tag 'kbuild-fixes-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix UML build with clang-18 and newer - Avoid using the alias attribute in host programs - Replace tabs with spaces when followed by conditionals for future GNU Make versions - Fix rpm-pkg for the systemd-provided kernel-install tool - Fix the undefined behavior in Kconfig for a 'int' symbol used in a conditional * tag 'kbuild-fixes-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: initialize sym->curr.tri to 'no' for all symbol types again kbuild: rpm-pkg: simplify installkernel %post kbuild: Replace tabs with spaces when followed by conditionals modpost: avoid using the alias attribute kbuild: fix W= flags in the help message modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS um: Fix adding '-no-pie' for clang kbuild: defconf: use SRCARCH to find merged configs commit cfdf0c09a68b6026c0b214b484f1dab60b8b78ba Merge: 49a4be2c845e3 ccbca118ef1a7 Author: Linus Torvalds Date: Thu Feb 1 11:48:13 2024 -0800 Merge tag 'nfsd-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fix from Chuck Lever: - Fix a recent backchannel timeout fix * tag 'nfsd-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: NFSv4.1: Assign the right value for initval and retries for rpc timeout commit 49a4be2c845e3a9efebb1e16a7ef379c1fd37664 Merge: 5c24e4e9e7082 0991abeddefa1 Author: Linus Torvalds Date: Thu Feb 1 11:45:53 2024 -0800 Merge tag 'exfat-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat fix from Namjae Jeon: - Fix BUG in iov_iter_revert reported from syzbot * tag 'exfat-for-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: fix zero the unwritten part for dio read commit d4ea2bd1bb502c54380cc44a4130660494679bb8 Merge: eaa1b01fe709d e81fdba020866 Author: Takashi Iwai Date: Thu Feb 1 19:40:42 2024 +0100 Merge tag 'asoc-fix-v6.8-rc2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.8 This pull request adds Richard Fitzgerald's series with extensive fixes for the CS35L56, he said: These patches fix various things that were undocumented, unknown or uncertain when the original driver code was written. And also a few things that were just bugs. commit 5c24e4e9e70822cf49955fc8174bc5efaa93d17f Merge: f6cdd897cc703 764ad6b02777d Author: Linus Torvalds Date: Thu Feb 1 10:19:34 2024 -0800 Merge tag 'hid-for-linus-2024020101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Benjamin Tissoires: - cleanups in the error path in hid-steam (Dan Carpenter) - fixes for Wacom tablets selftests that sneaked in while the CI was taking a break during the year end holidays (Benjamin Tissoires) - null pointer check in nvidia-shield (Kunwu Chan) - memory leak fix in hidraw (Su Hui) - another null pointer fix in i2c-hid-of (Johan Hovold) - another memory leak fix in HID-BPF this time, as well as a double fdget() fix reported by Dan Carpenter (Benjamin Tissoires) - fix for Cirque touchpad when they go on suspend (Kai-Heng Feng) - new device ID in hid-logitech-hidpp: "Logitech G Pro X SuperLight 2" (Jiri Kosina) * tag 'hid-for-linus-2024020101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: bpf: use __bpf_kfunc instead of noinline HID: bpf: actually free hdev memory after attaching a HID-BPF program HID: bpf: remove double fdget() HID: i2c-hid-of: fix NULL-deref on failed power up HID: hidraw: fix a problem of memory leak in hidraw_release() HID: i2c-hid: Skip SET_POWER SLEEP for Cirque touchpad on system suspend HID: nvidia-shield: Add missing null pointer checks to LED initialization HID: logitech-hidpp: add support for Logitech G Pro X Superlight 2 selftests/hid: wacom: fix confidence tests HID: hid-steam: Fix cleanup in probe() HID: hid-steam: remove pointless error message commit 11d4d1dba3315f73d2d1d386f5bf4811a8241d45 Author: Paulo Alcantara Date: Mon Jan 29 21:04:44 2024 -0300 smb: client: increase number of PDUs allowed in a compound request With the introduction of SMB2_OP_QUERY_WSL_EA, the client may now send 5 commands in a single compound request in order to query xattrs from potential WSL reparse points, which should be fine as we currently allow up to 5 PDUs in a single compound request. However, if encryption is enabled (e.g. 'seal' mount option) or enforced by the server, current MAX_COMPOUND(5) won't be enough as we require an extra PDU for the transform header. Fix this by increasing MAX_COMPOUND to 7 and, while we're at it, add an WARN_ON_ONCE() and return -EIO instead of -ENOMEM in case we attempt to send a compound request that couldn't include the extra transform header. Signed-off-by: Paulo Alcantara Signed-off-by: Steve French commit 6aac002bcfd554aff6d3ebb55e1660d078d70ab0 Author: Shyam Prasad N Date: Thu Feb 1 11:15:29 2024 +0000 cifs: failure to add channel on iface should bump up weight After the interface selection policy change to do a weighted round robin, each iface maintains a weight_fulfilled. When the weight_fulfilled reaches the total weight for the iface, we know that the weights can be reset and ifaces can be allocated from scratch again. During channel allocation failures on a particular channel, weight_fulfilled is not incremented. If a few interfaces are inactive, we could end up in a situation where the active interfaces are all allocated for the total_weight, and inactive ones are all that remain. This can cause a situation where no more channels can be allocated further. This change fixes it by increasing weight_fulfilled, even when channel allocation failure happens. This could mean that if there are temporary failures in channel allocation, the iface weights may not strictly be adhered to. But that's still okay. Fixes: a6d8fb54a515 ("cifs: distribute channels across interfaces based on speed") Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit f6cdd897cc7030a573f56ab1e9ebaece26c7c10c Merge: 6a864c09ea6ef 47dc55181dcbe Author: Linus Torvalds Date: Thu Feb 1 10:12:53 2024 -0800 Merge tag 'firewire-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire fixes from Takashi Sakamoto: "FireWire subsystem now supports the legacy layout of configuration ROM, while it appears that some of DV devices in the early 2000's have the legacy layout with a quirk. This includes some changes to handle the quirk" * tag 'firewire-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: core: search descriptor leaf just after vendor directory entry in root directory firewire: core: correct documentation of fw_csr_string() kernel API commit 88675b22d34e6e815ad4bde09c590ccb2d50c59d Author: Shyam Prasad N Date: Thu Feb 1 11:15:28 2024 +0000 cifs: do not search for channel if server is terminating In order to scale down the channels, the following sequence of operations happen: 1. server struct is marked for terminate 2. the channel is deallocated in the ses->chans array 3. at a later point the cifsd thread actually terminates the server Between 2 and 3, there can be calls to find the channel for a server struct. When that happens, there can be an ugly warning that's logged. But this is expected. So this change does two things: 1. in cifs_ses_get_chan_index, if server->terminate is set, return 2. always make sure server->terminate is set with chan_lock held Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit e77e15fa5eb1c830597c5ca53ea7af973bae2f78 Author: Shyam Prasad N Date: Thu Feb 1 11:15:26 2024 +0000 cifs: avoid redundant calls to disable multichannel When the server reports query network interface info call as unsupported following a tree connect, it means that multichannel is unsupported, even if the server capabilities report otherwise. When this happens, cifs_chan_skip_or_disable is called to disable multichannel on the client. However, we only need to call this when multichannel is currently setup. Fixes: f591062bdbf4 ("cifs: handle servers that still advertise multichannel after disabling") Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 6a864c09ea6ef3f8721f2a36f21f0d4316340efc Merge: 4b561d1001921 6500ad28fd5d6 Author: Linus Torvalds Date: Thu Feb 1 10:10:17 2024 -0800 Merge tag 'spi-fix-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One simple fix for a minor but valid issue with constants overflowing identified via cppcheck" * tag 'spi-fix-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: sh-msiof: avoid integer overflow in constants commit 4b561d10019214fc0a0c38254e71859db2cd760b Merge: 8a2514c0c61f7 a3fa9838e8140 Author: Linus Torvalds Date: Thu Feb 1 10:06:55 2024 -0800 Merge tag 'regulator-fix-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "The main set of fixes here are for the PWM regulator, fixing bootstrapping issues on some platforms where the hardware setup looked like it was out of spec for the constraints we have for the regulator causing us to make spurious and unhelpful changes to try to bring things in line with the constraints. There's also a couple of other driver specific fixes" * tag 'regulator-fix-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator (max5970): Fix IRQ handler regulator: ti-abb: don't use devm_platform_ioremap_resource_byname for shared interrupt register regulator: pwm-regulator: Manage boot-on with disabled PWM channels regulator: pwm-regulator: Calculate the output voltage for disabled PWMs regulator: pwm-regulator: Add validity checks in continuous .get_voltage commit 8a2514c0c61f7d4587071b96b4be7481350b5bc9 Merge: 6d805afaf02e6 c5a2f74db71a8 Author: Linus Torvalds Date: Thu Feb 1 10:02:40 2024 -0800 Merge tag 'v6.8-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "Fix regressions in caam and qat" * tag 'v6.8-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: caam - fix asynchronous hash crypto: qat - fix arbiter mapping generation algorithm for QAT 402xx commit 6d805afaf02e64e83a687182dd1214a703d4cf0f Merge: 6764c317b6bb9 5a287d3d2b9de Author: Linus Torvalds Date: Thu Feb 1 10:00:28 2024 -0800 Merge tag 'lsm-pr-20240131' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull lsm fixes from Paul Moore: "Two small patches to fix some problems relating to LSM hook return values and how the individual LSMs interact" * tag 'lsm-pr-20240131' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: lsm: fix default return value of the socket_getpeersec_*() hooks lsm: fix the logic in security_inode_getsecctx() commit f3c89983cb4fc00be64eb0d5cbcfcdf2cacb965e Author: Hongyu Jin Date: Tue Jan 30 15:26:34 2024 -0500 block: Fix where bio IO priority gets set Commit 82b74cac2849 ("blk-ioprio: Convert from rqos policy to direct call") pushed setting bio I/O priority down into blk_mq_submit_bio() -- which is too low within block core's submit_bio() because it skips setting I/O priority for block drivers that implement fops->submit_bio() (e.g. DM, MD, etc). Fix this by moving bio_set_ioprio() up from blk-mq.c to blk-core.c and call it from submit_bio(). This ensures all block drivers call bio_set_ioprio() during initial bio submission. Fixes: a78418e6a04c ("block: Always initialize bio IO priority on submit") Co-developed-by: Yibin Ding Signed-off-by: Yibin Ding Signed-off-by: Hongyu Jin Reviewed-by: Eric Biggers Reviewed-by: Mikulas Patocka [snitzer: revised commit header] Signed-off-by: Mike Snitzer Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20240130202638.62600-2-snitzer@kernel.org Signed-off-by: Jens Axboe commit e81fdba0208666b65bafeaba814874b4d6e5edde Merge: 5513c5d0fb3d5 28876c1ae8b8c Author: Mark Brown Date: Thu Feb 1 17:45:32 2024 +0000 ALSA: Various fixes for Cirrus Logic CS35L56 support Merge series from Richard Fitzgerald : These patches fixe various things that were undocumented, unknown or uncertain when the original driver code was written. And also a few things that were just bugs. commit 4e192be1a225b7b1c4e315a44754312347628859 Merge: 069a6ed2992df 0a186b49bba59 Author: Jakub Kicinski Date: Thu Feb 1 09:25:53 2024 -0800 Merge tag 'batadv-net-pullrequest-20240201' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - fix a timeout issue and a memory leak in batman-adv multicast, by Linus Lüssing (2 patches) * tag 'batadv-net-pullrequest-20240201' of git://git.open-mesh.org/linux-merge: batman-adv: mcast: fix memory leak on deleting a batman-adv interface batman-adv: mcast: fix mcast packet type counter on timeouted nodes ==================== Link: https://lore.kernel.org/r/20240201110110.29129-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski commit f0377ff97509f5a4921993d5d61da000361bd884 Author: Maurizio Lombardi Date: Thu Jan 18 12:48:54 2024 +0100 nvme-host: fix the updating of the firmware version The original code didn't update the firmware version if the "next slot" of the AFI register isn't zero or if the "current slot" field is zero; in those cases it assumed that a reset was needed. However, the NVMe specification doesn't exclude the possibility that the "next slot" value is equal to the "current slot" value, meaning that the same firmware slot will be activated after performing a controller level reset; in this case a reset is clearly not necessary and we can safely update the firmware version. Modify the code so the kernel will report that a Controller Level Reset is needed only in the following cases: 1) If the "current slot" field is zero. This is invalid and means that something is wrong, a reset is needed. or 2) if the "next slot" field isn't zero AND it's not equal to the "current slot" value. This means that at the next reset a different firmware slot will be activated. Fixes: 983a338b96c8 ("nvme: update firmware version after commit") Signed-off-by: Maurizio Lombardi Reviewed-by: Daniel Wagner Signed-off-by: Keith Busch commit 069a6ed2992df8eaae90d69d7770de8d545327d9 Author: Donald Hunter Date: Thu Feb 1 11:38:53 2024 +0000 doc/netlink/specs: Add missing attr in rt_link spec IFLA_DPLL_PIN was added to rt_link messages but not to the spec, which breaks ynl. Add the missing definitions to the rt_link ynl spec. Fixes: 5f1842692880 ("netdev: expose DPLL pin handle for netdevice") Signed-off-by: Donald Hunter Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240201113853.37432-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 93561eefbf87c0a57e15ebf647895e9ca83911c7 Merge: f0588b157f48b 8059918a1377f Author: Jakub Kicinski Date: Thu Feb 1 09:14:13 2024 -0800 Merge tag 'nf-24-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) TCP conntrack now only evaluates window negotiation for packets in the REPLY direction, from Ryan Schaefer. Otherwise SYN retransmissions trigger incorrect window scale negotiation. From Ryan Schaefer. 2) Restrict tunnel objects to NFPROTO_NETDEV which is where it makes sense to use this object type. 3) Fix conntrack pick up from the middle of SCTP_CID_SHUTDOWN_ACK packets. From Xin Long. 4) Another attempt from Jozsef Kadlecsik to address the slow down of the swap command in ipset. 5) Replace a BUG_ON by WARN_ON_ONCE in nf_log, and consolidate check for the case that the logger is NULL from the read side lock section. 6) Address lack of sanitization for custom expectations. Restrict layer 3 and 4 families to what it is supported by userspace. * tag 'nf-24-01-31' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nft_ct: sanitize layer 3 and 4 protocol number in custom expectations netfilter: nf_log: replace BUG_ON by WARN_ON_ONCE when putting logger netfilter: ipset: fix performance regression in swap operation netfilter: conntrack: check SCTP_CID_SHUTDOWN_ACK for vtag setting in sctp_new netfilter: nf_tables: restrict tunnel object to NFPROTO_NETDEV netfilter: conntrack: correct window scaling with retransmitted SYN ==================== Link: https://lore.kernel.org/r/20240131225943.7536-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit f0588b157f48b9c6277a75c9f14650e86d969e03 Author: Pavan Kumar Linga Date: Wed Jan 31 14:22:40 2024 -0800 idpf: avoid compiler padding in virtchnl2_ptype struct In the arm random config file, kconfig option 'CONFIG_AEABI' is disabled which results in adding the compiler flag '-mabi=apcs-gnu'. This causes the compiler to add padding in virtchnl2_ptype structure to align it to 8 bytes, resulting in the following size check failure: include/linux/build_bug.h:78:41: error: static assertion failed: "(6) == sizeof(struct virtchnl2_ptype)" 78 | #define __static_assert(expr, msg, ...) _Static_assert(expr, msg) | ^~~~~~~~~~~~~~ include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert' 77 | #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr) | ^~~~~~~~~~~~~~~ drivers/net/ethernet/intel/idpf/virtchnl2.h:26:9: note: in expansion of macro 'static_assert' 26 | static_assert((n) == sizeof(struct X)) | ^~~~~~~~~~~~~ drivers/net/ethernet/intel/idpf/virtchnl2.h:982:1: note: in expansion of macro 'VIRTCHNL2_CHECK_STRUCT_LEN' 982 | VIRTCHNL2_CHECK_STRUCT_LEN(6, virtchnl2_ptype); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Avoid the compiler padding by using "__packed" structure attribute for the virtchnl2_ptype struct. Also align the structure by using "__aligned(2)" for better code optimization. Fixes: 0d7502a9b4a7 ("virtchnl: add virtchnl version 2 ops") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312220250.ufEm8doQ-lkp@intel.com Reviewed-by: Przemek Kitszel Reviewed-by: Paul Menzel Reviewed-by: Simon Horman Signed-off-by: Pavan Kumar Linga Tested-by: Krishneil Singh Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20240131222241.2087516-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 79144a818a8051cdb5bfd9c5a7201c705a7aae96 Merge: c15a729c9d45a 04b57c9e096a9 Author: Jakub Kicinski Date: Thu Feb 1 09:06:40 2024 -0800 Merge branch 'mptcp-fixes-for-recent-issues-reported-by-ci-s' Matthieu Baerts says: ==================== mptcp: fixes for recent issues reported by CI's This series of 9 patches fixes issues mostly identified by CI's not managed by the MPTCP maintainers. Thank you Linero (LKFT) and Netdev maintainers (NIPA) for running our kunit and selftests tests! For the first patch, it took a bit of time to identify the root cause. Some MPTCP Join selftest subtests have been "flaky", mostly in slow environments. It appears to be due to the use of a TCP-specific helper on an MPTCP socket. A fix for kernels >= v5.15. Patches 2 to 4 add missing kernel config to support NetFilter tables needed for IPTables commands. These kconfigs are usually enabled in default configurations, but apparently not for all architectures. Patches 2 and 3 can be backported up to v5.11 and the 4th one up to v5.19. Patch 5 increases the time limit for MPTCP selftests. It appears that many CI's execute tests in a VM without acceleration supports, e.g. QEmu without KVM. As a result, the tests take longer. Plus, there are more and more tests. This patch modifies the timeout added in v5.18. Patch 6 reduces the maximum rate and delay of the different links in some Simult Flows selftest subtests. The goal is to let slow VMs reach the maximum speed. The original rate was introduced in v5.11. Patch 7 lets CI changing the prefix of the subtests titles, to be able to run the same selftest multiple times with different parameters. With different titles, tests will be considered as different and not override previous results as it is the case with some CI envs. Subtests have been introduced in v6.6. Patch 8 and 9 make some MPTCP Join selftest subtests quicker by stopping the transfer when the expected events have been seen. Patch 8 can be backported up to v6.5. Signed-off-by: Matthieu Baerts (NGI0) ==================== Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-0-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski commit 04b57c9e096a9479fe0ad31e3956e336fa589cb2 Author: Matthieu Baerts (NGI0) Date: Wed Jan 31 22:49:54 2024 +0100 selftests: mptcp: join: stop transfer when check is done (part 2) Since the "Fixes" commits mentioned below, the newly added "userspace pm" subtests of mptcp_join selftests are launching the whole transfer in the background, do the required checks, then wait for the end of transfer. There is no need to wait longer, especially because the checks at the end of the transfer are ignored (which is fine). This saves quite a few seconds on slow environments. While at it, use 'mptcp_lib_kill_wait()' helper everywhere, instead of on a specific one with 'kill_tests_wait()'. Fixes: b2e2248f365a ("selftests: mptcp: userspace pm create id 0 subflow") Fixes: e3b47e460b4b ("selftests: mptcp: userspace pm remove initial subflow") Fixes: b9fb176081fb ("selftests: mptcp: userspace pm send RM_ADDR for ID 0") Cc: stable@vger.kernel.org Reviewed-and-tested-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-9-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski commit 31ee4ad86afd6ed6f4bb1b38c43011216080c42a Author: Matthieu Baerts (NGI0) Date: Wed Jan 31 22:49:53 2024 +0100 selftests: mptcp: join: stop transfer when check is done (part 1) Since the "Fixes" commit mentioned below, "userspace pm" subtests of mptcp_join selftests introduced in v6.5 are launching the whole transfer in the background, do the required checks, then wait for the end of transfer. There is no need to wait longer, especially because the checks at the end of the transfer are ignored (which is fine). This saves quite a few seconds in slow environments. Note that old versions will need commit bdbef0a6ff10 ("selftests: mptcp: add mptcp_lib_kill_wait") as well to get 'mptcp_lib_kill_wait()' helper. Fixes: 4369c198e599 ("selftests: mptcp: test userspace pm out of transfer") Cc: stable@vger.kernel.org # 6.5.x: bdbef0a6ff10: selftests: mptcp: add mptcp_lib_kill_wait Cc: stable@vger.kernel.org # 6.5.x Reviewed-and-tested-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-8-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski commit de46d138e7735eded9756906747fd3a8c3a42225 Author: Matthieu Baerts (NGI0) Date: Wed Jan 31 22:49:52 2024 +0100 selftests: mptcp: allow changing subtests prefix If a CI executes the same selftest multiple times with different options, all results from the same subtests will have the same title, which confuse the CI. With the same title printed in TAP, the tests are considered as the same ones. Now, it is possible to override this prefix by using MPTCP_LIB_KSFT_TEST env var, and have a different title. While at it, use 'basename' to remove the suffix as well instead of using an extra 'sed'. Fixes: c4192967e62f ("selftests: mptcp: lib: format subtests results in TAP") Cc: stable@vger.kernel.org Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-7-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski commit 5e2f3c65af47e527ccac54060cf909e3306652ff Author: Matthieu Baerts (NGI0) Date: Wed Jan 31 22:49:51 2024 +0100 selftests: mptcp: decrease BW in simult flows When running the simult_flow selftest in slow environments -- e.g. QEmu without KVM support --, the results can be unstable. This selftest checks if the aggregated bandwidth is (almost) fully used as expected. To help improving the stability while still keeping the same validation in place, the BW and the delay are reduced to lower the pressure on the CPU. Fixes: 1a418cb8e888 ("mptcp: simult flow self-tests") Fixes: 219d04992b68 ("mptcp: push pending frames when subflow has free space") Cc: stable@vger.kernel.org Suggested-by: Paolo Abeni Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-6-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski commit 4d4dfb2019d7010efb65926d9d1c1793f9a367c6 Author: Matthieu Baerts (NGI0) Date: Wed Jan 31 22:49:50 2024 +0100 selftests: mptcp: increase timeout to 30 min On very slow environments -- e.g. when QEmu is used without KVM --, mptcp_join.sh selftest can take a bit more than 20 minutes. Bump the default timeout by 50% as it seems normal to take that long on some environments. When a debug kernel config is used, this selftest will take even longer, but that's certainly not a common test env to consider for the timeout. The Fixes tag that has been picked here is there simply to help having this patch backported to older stable versions. It is difficult to point to the exact commit that made some env reaching the timeout from time to time. Fixes: d17b968b9876 ("selftests: mptcp: increase timeout to 20 minutes") Cc: stable@vger.kernel.org Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-5-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski commit 2d41f10fa497182df9012d3e95d9cea24eb42e61 Author: Matthieu Baerts (NGI0) Date: Wed Jan 31 22:49:49 2024 +0100 selftests: mptcp: add missing kconfig for NF Mangle Since the commit mentioned below, 'mptcp_join' selftests is using IPTables to add rules to the Mangle table, only in IPv4. This KConfig is usually enabled by default in many defconfig, but we recently noticed that some CI were running our selftests without them enabled. Fixes: b6e074e171bc ("selftests: mptcp: add infinite map testcase") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-4-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski commit 8c86fad2cecdc6bf7283ecd298b4d0555bd8b8aa Author: Matthieu Baerts (NGI0) Date: Wed Jan 31 22:49:48 2024 +0100 selftests: mptcp: add missing kconfig for NF Filter in v6 Since the commit mentioned below, 'mptcp_join' selftests is using IPTables to add rules to the Filter table for IPv6. It is then required to have IP6_NF_FILTER KConfig. This KConfig is usually enabled by default in many defconfig, but we recently noticed that some CI were running our selftests without them enabled. Fixes: 523514ed0a99 ("selftests: mptcp: add ADD_ADDR IPv6 test cases") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-3-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski commit 3645c844902bd4e173d6704fc2a37e8746904d67 Author: Matthieu Baerts (NGI0) Date: Wed Jan 31 22:49:47 2024 +0100 selftests: mptcp: add missing kconfig for NF Filter Since the commit mentioned below, 'mptcp_join' selftests is using IPTables to add rules to the Filter table. It is then required to have IP_NF_FILTER KConfig. This KConfig is usually enabled by default in many defconfig, but we recently noticed that some CI were running our selftests without them enabled. Fixes: 8d014eaa9254 ("selftests: mptcp: add ADD_ADDR timeout test case") Cc: stable@vger.kernel.org Reviewed-by: Geliang Tang Signed-off-by: Matthieu Baerts (NGI0) Signed-off-by: Jakub Kicinski commit b6c620dc43ccb4e802894e54b651cf81495e9598 Author: Paolo Abeni Date: Wed Jan 31 22:49:46 2024 +0100 mptcp: fix data re-injection from stale subflow When the MPTCP PM detects that a subflow is stale, all the packet scheduler must re-inject all the mptcp-level unacked data. To avoid acquiring unneeded locks, it first try to check if any unacked data is present at all in the RTX queue, but such check is currently broken, as it uses TCP-specific helper on an MPTCP socket. Funnily enough fuzzers and static checkers are happy, as the accessed memory still belongs to the mptcp_sock struct, and even from a functional perspective the recovery completed successfully, as the short-cut test always failed. A recent unrelated TCP change - commit d5fed5addb2b ("tcp: reorganize tcp_sock fast path variables") - exposed the issue, as the tcp field reorganization makes the mptcp code always skip the re-inection. Fix the issue dropping the bogus call: we are on a slow path, the early optimization proved once again to be evil. Fixes: 1e1d9d6f119c ("mptcp: handle pending data on closed subflow") Cc: stable@vger.kernel.org Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/468 Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-1-4c1c11e571ff@kernel.org Signed-off-by: Jakub Kicinski commit 9e62797fd7e8eef9c8a3f7b54b57fbc9caf6a20a Author: Vitaly Kuznetsov Date: Tue Jan 9 15:11:21 2024 +0100 KVM: x86: Make gtod_is_based_on_tsc() return 'bool' gtod_is_based_on_tsc() is boolean in nature, i.e. it returns '1' for good clocksources and '0' otherwise. Moreover, its result is used raw by kvm_get_time_and_clockread()/kvm_get_walltime_and_clockread() which are 'bool'. No functional change intended. Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20240109141121.1619463-6-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit b6831a108be1206cd9f0e7905b48677b4147d5f9 Author: Vitaly Kuznetsov Date: Tue Jan 9 15:11:20 2024 +0100 KVM: selftests: Make hyperv_clock require TSC based system clocksource KVM sets up Hyper-V TSC page clocksource for its guests when system clocksource is 'based on TSC' (see gtod_is_based_on_tsc()), running hyperv_clock with any other clocksource leads to imminent failure. Add the missing requirement to make the test skip gracefully. Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20240109141121.1619463-5-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 09951bf2cbb3a7893f76d1364b0ae6e3007ff1de Author: Vitaly Kuznetsov Date: Tue Jan 9 15:11:19 2024 +0100 KVM: selftests: Run clocksource dependent tests with hyperv_clocksource_tsc_page too KVM's 'gtod_is_based_on_tsc()' recognizes two clocksources: 'tsc' and 'hyperv_clocksource_tsc_page' and enables kvmclock in 'masterclock' mode when either is in use. Transform 'sys_clocksource_is_tsc()' into 'sys_clocksource_is_based_on_tsc()' to support the later. This affects two tests: kvm_clock_test and vmx_nested_tsc_scaling_test, both seem to work well when system clocksource is 'hyperv_clocksource_tsc_page'. Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20240109141121.1619463-4-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 410cb01ead5bcec500c0654f361d620553f930aa Author: Vitaly Kuznetsov Date: Tue Jan 9 15:11:18 2024 +0100 KVM: selftests: Use generic sys_clocksource_is_tsc() in vmx_nested_tsc_scaling_test Despite its name, system_has_stable_tsc() just checks that system clocksource is 'tsc'; this can now be done with generic sys_clocksource_is_tsc(). No functional change intended. Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20240109141121.1619463-3-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit e440c5f2e3e6893aeb39bbba6dd181207840a795 Author: Vitaly Kuznetsov Date: Tue Jan 9 15:11:17 2024 +0100 KVM: selftests: Generalize check_clocksource() from kvm_clock_test Several existing x86 selftests need to check that the underlying system clocksource is TSC or based on TSC but every test implements its own check. As a first step towards unification, extract check_clocksource() from kvm_clock_test and split it into two functions: arch-neutral 'sys_get_cur_clocksource()' and x86-specific 'sys_clocksource_is_tsc()'. Fix a couple of pre-existing issues in kvm_clock_test: memory leakage in check_clocksource() and using TEST_ASSERT() instead of TEST_REQUIRE(). The change also makes the test fail when system clocksource can't be read from sysfs. Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20240109141121.1619463-2-vkuznets@redhat.com [sean: eliminate if-elif pattern just to set a bool true] Signed-off-by: Sean Christopherson commit ca185770db914869ff9fe773bac5e0e5e4165b83 Author: Steven Rostedt (Google) Date: Thu Feb 1 10:34:50 2024 -0500 eventfs: Keep all directory links at 1 The directory link count in eventfs was somewhat bogus. It was only being updated when a directory child was being looked up and not on creation. One solution would be to update in get_attr() the link count by iterating the ei->children list and then adding 2. But that could slow down simple stat() calls, especially if it's done on all directories in eventfs. Another solution would be to add a parent pointer to the eventfs_inode and keep track of the number of sub directories it has on creation. But this adds overhead for something not really worthwhile. The solution decided upon is to keep all directory links in eventfs as 1. This tells user space not to rely on the hard links of directories. Which in this case it shouldn't. Link: https://lore.kernel.org/linux-trace-kernel/20240201002719.GS2087318@ZenIV/ Link: https://lore.kernel.org/linux-trace-kernel/20240201161617.339968298@goodmis.org Cc: stable@vger.kernel.org Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Fixes: c1504e510238 ("eventfs: Implement eventfs dir creation functions") Suggested-by: Al Viro Signed-off-by: Steven Rostedt (Google) commit 12d823b31fadf47c8f36ecada7abac5f903cac33 Author: Steven Rostedt (Google) Date: Thu Feb 1 10:34:49 2024 -0500 eventfs: Remove fsnotify*() functions from lookup() The dentries and inodes are created when referenced in the lookup code. There's no reason to call fsnotify_*() functions when they are created by a reference. It doesn't make any sense. Link: https://lore.kernel.org/linux-trace-kernel/20240201002719.GS2087318@ZenIV/ Link: https://lore.kernel.org/linux-trace-kernel/20240201161617.166973329@goodmis.org Cc: stable@vger.kernel.org Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Fixes: a376007917776 ("eventfs: Implement functions to create files and dirs when accessed"); Suggested-by: Al Viro Signed-off-by: Steven Rostedt (Google) commit 264424dfdd5cbd92bc5b5ddf93944929fc877fac Author: Steven Rostedt (Google) Date: Thu Feb 1 10:34:48 2024 -0500 eventfs: Restructure eventfs_inode structure to be more condensed Some of the eventfs_inode structure has holes in it. Rework the structure to be a bit more condensed, and also remove the no longer used llist field. Link: https://lore.kernel.org/linux-trace-kernel/20240201161617.002321438@goodmis.org Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Signed-off-by: Steven Rostedt (Google) commit 5a49f996046ba947466bc7461e4b19c4d1daf978 Author: Steven Rostedt (Google) Date: Thu Feb 1 10:34:47 2024 -0500 eventfs: Warn if an eventfs_inode is freed without is_freed being set There should never be a case where an evenfs_inode is being freed without is_freed being set. Add a WARN_ON_ONCE() if it ever happens. That would mean there was one too many put_ei()s. Link: https://lore.kernel.org/linux-trace-kernel/20240201161616.843551963@goodmis.org Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Signed-off-by: Steven Rostedt (Google) commit 1389358bb008e7625942846e9f03554319b7fecc Author: Daniel Bristot de Oliveira Date: Thu Feb 1 16:13:39 2024 +0100 tracing/timerlat: Move hrtimer_init to timerlat_fd open() Currently, the timerlat's hrtimer is initialized at the first read of timerlat_fd, and destroyed at close(). It works, but it causes an error if the user program open() and close() the file without reading. Here's an example: # echo NO_OSNOISE_WORKLOAD > /sys/kernel/debug/tracing/osnoise/options # echo timerlat > /sys/kernel/debug/tracing/current_tracer # cat < ./timerlat_load.py # !/usr/bin/env python3 timerlat_fd = open("/sys/kernel/tracing/osnoise/per_cpu/cpu0/timerlat_fd", 'r') timerlat_fd.close(); EOF # ./taskset -c 0 ./timerlat_load.py BUG: kernel NULL pointer dereference, address: 0000000000000010 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 2673 Comm: python3 Not tainted 6.6.13-200.fc39.x86_64 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-1.fc39 04/01/2014 RIP: 0010:hrtimer_active+0xd/0x50 Code: 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 48 8b 57 30 <8b> 42 10 a8 01 74 09 f3 90 8b 42 10 a8 01 75 f7 80 7f 38 00 75 1d RSP: 0018:ffffb031009b7e10 EFLAGS: 00010286 RAX: 000000000002db00 RBX: ffff9118f786db08 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff9117a0e64400 RDI: ffff9118f786db08 RBP: ffff9118f786db80 R08: ffff9117a0ddd420 R09: ffff9117804d4f70 R10: 0000000000000000 R11: 0000000000000000 R12: ffff9118f786db08 R13: ffff91178fdd5e20 R14: ffff9117840978c0 R15: 0000000000000000 FS: 00007f2ffbab1740(0000) GS:ffff9118f7840000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 00000001b402e000 CR4: 0000000000750ee0 PKRU: 55555554 Call Trace: ? __die+0x23/0x70 ? page_fault_oops+0x171/0x4e0 ? srso_alias_return_thunk+0x5/0x7f ? avc_has_extended_perms+0x237/0x520 ? exc_page_fault+0x7f/0x180 ? asm_exc_page_fault+0x26/0x30 ? hrtimer_active+0xd/0x50 hrtimer_cancel+0x15/0x40 timerlat_fd_release+0x48/0xe0 __fput+0xf5/0x290 __x64_sys_close+0x3d/0x80 do_syscall_64+0x60/0x90 ? srso_alias_return_thunk+0x5/0x7f ? __x64_sys_ioctl+0x72/0xd0 ? srso_alias_return_thunk+0x5/0x7f ? syscall_exit_to_user_mode+0x2b/0x40 ? srso_alias_return_thunk+0x5/0x7f ? do_syscall_64+0x6c/0x90 ? srso_alias_return_thunk+0x5/0x7f ? exit_to_user_mode_prepare+0x142/0x1f0 ? srso_alias_return_thunk+0x5/0x7f ? syscall_exit_to_user_mode+0x2b/0x40 ? srso_alias_return_thunk+0x5/0x7f ? do_syscall_64+0x6c/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7f2ffb321594 Code: 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 80 3d d5 cd 0d 00 00 74 13 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 3c c3 0f 1f 00 55 48 89 e5 48 83 ec 10 89 7d RSP: 002b:00007ffe8d8eef18 EFLAGS: 00000202 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 00007f2ffba4e668 RCX: 00007f2ffb321594 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00007ffe8d8eef40 R08: 0000000000000000 R09: 0000000000000000 R10: 55c926e3167eae79 R11: 0000000000000202 R12: 0000000000000003 R13: 00007ffe8d8ef030 R14: 0000000000000000 R15: 00007f2ffba4e668 CR2: 0000000000000010 ---[ end trace 0000000000000000 ]--- Move hrtimer_init to timerlat_fd open() to avoid this problem. Link: https://lore.kernel.org/linux-trace-kernel/7324dd3fc0035658c99b825204a66049389c56e3.1706798888.git.bristot@kernel.org Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: stable@vger.kernel.org Fixes: e88ed227f639 ("tracing/timerlat: Add user-space interface") Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Steven Rostedt (Google) commit c15a729c9d45aa142fb01a3afee822ab1f0e62a8 Author: Paolo Abeni Date: Wed Jan 31 18:52:29 2024 +0100 selftests: net: enable some more knobs The rtnetlink tests require additional options currently off by default. Fixes: 2766a11161cc ("selftests: rtnetlink: add ipsec offload API test") Fixes: 5e596ee171ba ("selftests: add xfrm state-policy-monitor to rtnetlink.sh") Signed-off-by: Paolo Abeni Link: https://lore.kernel.org/r/9048ca58e49b962f35dba1dfb2beaf3dab3e0411.1706723341.git.pabeni@redhat.com/ Signed-off-by: Jakub Kicinski commit 1939f738c73dfdb8389839bdc9624c765e3326e6 Author: Jakub Kicinski Date: Wed Jan 31 08:56:05 2024 -0800 selftests: net: add missing config for NF_TARGET_TTL amt test uses the TTL iptables module: ip netns exec "${RELAY}" iptables -t mangle -I PREROUTING \ -d 239.0.0.1 -j TTL --ttl-set 2 Fixes: c08e8baea78e ("selftests: add amt interface selftest script") Link: https://lore.kernel.org/r/20240131165605.4051645-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit cf6601e289a2b975fac09d1bcb97d0ee1029cb84 Merge: e0526ec5360a4 96cd5ac4c0e6b Author: Jakub Kicinski Date: Thu Feb 1 08:36:39 2024 -0800 Merge branch 'selftests-net-more-small-fixes' Benjamin Poirier says: ==================== selftests: net: More small fixes Some small fixes for net selftests which follow from these recent commits: dd2d40acdbb2 ("selftests: bonding: Add more missing config options") 49078c1b80b6 ("selftests: forwarding: Remove executable bits from lib.sh") ==================== Link: https://lore.kernel.org/r/20240131140848.360618-1-bpoirier@nvidia.com Signed-off-by: Jakub Kicinski commit 96cd5ac4c0e6b91b74c8fbfcaa7e5c943dfa4835 Author: Benjamin Poirier Date: Wed Jan 31 09:08:48 2024 -0500 selftests: forwarding: List helper scripts in TEST_FILES Makefile variable Some scripts are not tests themselves; they contain utility functions used by other tests. According to Documentation/dev-tools/kselftest.rst, such files should be listed in TEST_FILES. Currently they are incorrectly listed in TEST_PROGS_EXTENDED so rename the variable. Fixes: c085dbfb1cfc ("selftests/net/forwarding: define libs as TEST_PROGS_EXTENDED") Suggested-by: Petr Machata Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20240131140848.360618-6-bpoirier@nvidia.com Signed-off-by: Jakub Kicinski commit 06efafd8608dac0c3a480539acc66ee41d2fb430 Author: Benjamin Poirier Date: Wed Jan 31 09:08:47 2024 -0500 selftests: net: List helper scripts in TEST_FILES Makefile variable Some scripts are not tests themselves; they contain utility functions used by other tests. According to Documentation/dev-tools/kselftest.rst, such files should be listed in TEST_FILES. Move those utility scripts to TEST_FILES. Fixes: 1751eb42ddb5 ("selftests: net: use TEST_PROGS_EXTENDED") Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Fixes: b99ac1841147 ("kselftests/net: add missed setup_loopback.sh/setup_veth.sh to Makefile") Fixes: f5173fe3e13b ("selftests: net: included needed helper in the install targets") Suggested-by: Petr Machata Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20240131140848.360618-5-bpoirier@nvidia.com Signed-off-by: Jakub Kicinski commit 9d851dd4dab63e95c1911a2fa847796d1ec5d58d Author: Benjamin Poirier Date: Wed Jan 31 09:08:46 2024 -0500 selftests: net: Remove executable bits from library scripts setup_loopback.sh and net_helper.sh are meant to be sourced from other scripts, not executed directly. Therefore, remove the executable bits from those files' permissions. This change is similar to commit 49078c1b80b6 ("selftests: forwarding: Remove executable bits from lib.sh") Fixes: 7d1575014a63 ("selftests/net: GRO coalesce test") Fixes: 3bdd9fd29cb0 ("selftests/net: synchronize udpgro tests' tx and rx connection") Suggested-by: Paolo Abeni Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20240131140848.360618-4-bpoirier@nvidia.com Signed-off-by: Jakub Kicinski commit 8cc063ae1b3dbe416ce62a15d49af4c2314b45fe Author: Benjamin Poirier Date: Wed Jan 31 09:08:45 2024 -0500 selftests: bonding: Check initial state The purpose of the test_LAG_cleanup() function is to check that some hardware addresses are removed from underlying devices after they have been unenslaved. The test function simply checks that those addresses are not present at the end. However, if the addresses were never added to begin with due to some error in device setup, the test function currently passes. This is a false positive since in that situation the test did not actually exercise the intended functionality. Add a check that the expected addresses are indeed present after device setup. This makes the test function more robust. I noticed this problem when running the team/dev_addr_lists.sh test on a system without support for dummy and ipv6: tools/testing/selftests/drivers/net/team# ./dev_addr_lists.sh Error: Unknown device type. Error: Unknown device type. This program is not intended to be run as root. RTNETLINK answers: Operation not supported TEST: team cleanup mode lacp [ OK ] Fixes: bbb774d921e2 ("net: Add tests for bonding and team address list management") Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20240131140848.360618-3-bpoirier@nvidia.com Signed-off-by: Jakub Kicinski commit 7b6fb3050d8f5e2b6858eef344e47ac1f5442827 Author: Benjamin Poirier Date: Wed Jan 31 09:08:44 2024 -0500 selftests: team: Add missing config options Similar to commit dd2d40acdbb2 ("selftests: bonding: Add more missing config options"), add more networking-specific config options which are needed for team device tests. For testing, I used the minimal config generated by virtme-ng and I added the options in the config file. Afterwards, the team device test passed. Fixes: bbb774d921e2 ("net: Add tests for bonding and team address list management") Reviewed-by: Petr Machata Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20240131140848.360618-2-bpoirier@nvidia.com Signed-off-by: Jakub Kicinski commit e0526ec5360a48ad3ab2e26e802b0532302a7e11 Author: Souradeep Chakrabarti Date: Tue Jan 30 23:35:51 2024 -0800 hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove In commit ac5047671758 ("hv_netvsc: Disable NAPI before closing the VMBus channel"), napi_disable was getting called for all channels, including all subchannels without confirming if they are enabled or not. This caused hv_netvsc getting hung at napi_disable, when netvsc_probe() has finished running but nvdev->subchan_work has not started yet. netvsc_subchan_work() -> rndis_set_subchannel() has not created the sub-channels and because of that netvsc_sc_open() is not running. netvsc_remove() calls cancel_work_sync(&nvdev->subchan_work), for which netvsc_subchan_work did not run. netif_napi_add() sets the bit NAPI_STATE_SCHED because it ensures NAPI cannot be scheduled. Then netvsc_sc_open() -> napi_enable will clear the NAPIF_STATE_SCHED bit, so it can be scheduled. napi_disable() does the opposite. Now during netvsc_device_remove(), when napi_disable is called for those subchannels, napi_disable gets stuck on infinite msleep. This fix addresses this problem by ensuring that napi_disable() is not getting called for non-enabled NAPI struct. But netif_napi_del() is still necessary for these non-enabled NAPI struct for cleanup purpose. Call trace: [ 654.559417] task:modprobe state:D stack: 0 pid: 2321 ppid: 1091 flags:0x00004002 [ 654.568030] Call Trace: [ 654.571221] [ 654.573790] __schedule+0x2d6/0x960 [ 654.577733] schedule+0x69/0xf0 [ 654.581214] schedule_timeout+0x87/0x140 [ 654.585463] ? __bpf_trace_tick_stop+0x20/0x20 [ 654.590291] msleep+0x2d/0x40 [ 654.593625] napi_disable+0x2b/0x80 [ 654.597437] netvsc_device_remove+0x8a/0x1f0 [hv_netvsc] [ 654.603935] rndis_filter_device_remove+0x194/0x1c0 [hv_netvsc] [ 654.611101] ? do_wait_intr+0xb0/0xb0 [ 654.615753] netvsc_remove+0x7c/0x120 [hv_netvsc] [ 654.621675] vmbus_remove+0x27/0x40 [hv_vmbus] Cc: stable@vger.kernel.org Fixes: ac5047671758 ("hv_netvsc: Disable NAPI before closing the VMBus channel") Signed-off-by: Souradeep Chakrabarti Reviewed-by: Dexuan Cui Reviewed-by: Haiyang Zhang Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/1706686551-28510-1-git-send-email-schakrabarti@linux.microsoft.com Signed-off-by: Jakub Kicinski commit 7b55984c96ffe9e236eb9c82a2196e0b1f84990d Author: Jan Beulich Date: Mon Jan 29 14:03:08 2024 +0100 xen-netback: properly sync TX responses Invoking the make_tx_response() / push_tx_responses() pair with no lock held would be acceptable only if all such invocations happened from the same context (NAPI instance or dealloc thread). Since this isn't the case, and since the interface "spec" also doesn't demand that multicast operations may only be performed with no in-flight transmits, MCAST_{ADD,DEL} processing also needs to acquire the response lock around the invocations. To prevent similar mistakes going forward, "downgrade" the present functions to private helpers of just the two remaining ones using them directly, with no forward declarations anymore. This involves renaming what so far was make_tx_response(), for the new function of that name to serve the new (wrapper) purpose. While there, - constify the txp parameters, - correct xenvif_idx_release()'s status parameter's type, - rename {,_}make_tx_response()'s status parameters for consistency with xenvif_idx_release()'s. Fixes: 210c34dcd8d9 ("xen-netback: add support for multicast control") Cc: stable@vger.kernel.org Signed-off-by: Jan Beulich Reviewed-by: Paul Durrant Link: https://lore.kernel.org/r/980c6c3d-e10e-4459-8565-e8fbde122f00@suse.com Signed-off-by: Jakub Kicinski commit ae3f4b44641dfff969604735a0dcbf931f383285 Author: Breno Leitao Date: Wed Jan 31 02:21:49 2024 -0800 net: sysfs: Fix /sys/class/net/ path The documentation is pointing to the wrong path for the interface. Documentation is pointing to /sys/class/, instead of /sys/class/net/. Fix it by adding the `net/` directory before the interface. Fixes: 1a02ef76acfa ("net: sysfs: add documentation entries for /sys/class//queues") Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240131102150.728960-2-leitao@debian.org Signed-off-by: Jakub Kicinski commit 373581643d3d6f34f16389b481b1462c8cbd37c7 Merge: 5af2c3f44e004 9f079dda14339 Author: Jens Axboe Date: Thu Feb 1 09:11:02 2024 -0700 Merge tag 'nvme-6.8-2024-02-01' of git://git.infradead.org/nvme into block-6.8 Pull NVMe fixes from Keith: "nvme fixes for Linux 6.8 - Remove duplicated enums (Guixen) - Use appropriate controller state accessors (Keith) - Retryable authentication (Hannes) - Add missing module descriptions (Chaitanya) - Fibre-channel fixes for blktests (Daniel) - Various type correctness updates (Caleb) - Improve fabrics connection debugging prints (Nitin) - Passthrough command verbose error logging (Adam)" * tag 'nvme-6.8-2024-02-01' of git://git.infradead.org/nvme: (31 commits) nvme: allow passthru cmd error logging nvme-fc: show hostnqn when connecting to fc target nvme-rdma: show hostnqn when connecting to rdma target nvme-tcp: show hostnqn when connecting to tcp target nvmet-fc: use RCU list iterator for assoc_list nvmet-fc: take ref count on tgtport before delete assoc nvmet-fc: avoid deadlock on delete association path nvmet-fc: abort command when there is no binding nvmet-fc: do not tack refs on tgtports from assoc nvmet-fc: remove null hostport pointer check nvmet-fc: hold reference on hostport match nvmet-fc: free queue and assoc directly nvmet-fc: defer cleanup using RCU properly nvmet-fc: release reference on target port nvmet-fcloop: swap the list_add_tail arguments nvme-fc: do not wait in vain when unloading module nvme-fc: log human-readable opcode on timeout nvme: split out fabrics version of nvme_opcode_str() nvme: take const cmd pointer in read-only helpers nvme: remove redundant status mask ... commit 9f079dda14339ee87d864306a9dc8c6b4e4da40b Author: Alan Adamson Date: Mon Jan 29 16:19:38 2024 -0800 nvme: allow passthru cmd error logging Commit d7ac8dca938c ("nvme: quiet user passthrough command errors") disabled error logging for user passthrough commands. This commit adds the ability to opt-in to passthrough admin error logging. IO commands initiated as passthrough will always be logged. The logging output for passthrough commands (Admin and IO) has been changed to include CDWXX fields. nvme0n1: Read(0x2), LBA Out of Range (sct 0x0 / sc 0x80) DNR cdw10=0x0 cdw11=0x1 cdw12=0x70000 cdw13=0x0 cdw14=0x0 cdw15=0x0 Add a helper function nvme_log_err_passthru() which allows us to log error for passthru commands by decoding cdw10-cdw15 values of nvme command. Add a new sysfs attr passthru_err_log_enabled that allows user to conditionally enable passthrough command logging for either passthrough Admin commands sent to the controller or passthrough IO commands sent to a namespace. By default, passthrough error logging is disabled. To enable passthrough admin error logging: echo 1 > /sys/class/nvme/nvme0/passthru_err_log_enabled To disable passthrough admin error logging: echo 0 > /sys/class/nvme/nvme0/passthru_err_log_enabled To enable passthrough io error logging: echo 1 > /sys/class/nvme/nvme0/nvme0n1/passthru_err_log_enabled To disable passthrough io error logging: echo 0 > /sys/class/nvme/nvme0/nvme0n1/passthru_err_log_enabled Signed-off-by: Alan Adamson Signed-off-by: Chaitanya Kulkarni Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit c3a846fe4bf3ecbdf48e561b90fea6cc27ac6423 Author: Nitin U. Yewale Date: Mon Jan 29 16:36:39 2024 +0530 nvme-fc: show hostnqn when connecting to fc target Log hostnqn when connecting to nvme target. As hostnqn could be changed, logging this information in syslog at appropriate time may help in troubleshooting. Signed-off-by: Nitin U. Yewale Reviewed-by: John Meneghini Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit d2045e6a4e2f3bcb3a2dab6684f8fbc95239d566 Author: Nitin U. Yewale Date: Mon Jan 29 16:36:38 2024 +0530 nvme-rdma: show hostnqn when connecting to rdma target Log hostnqn when connecting to nvme target. As hostnqn could be changed, logging this information in syslog at appropriate time may help in troubleshooting. Signed-off-by: Nitin U. Yewale Reviewed-by: John Meneghini Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 524719b4c60dc5c5edff0cdfd715b4e2d6c16ede Author: Nitin U. Yewale Date: Mon Jan 29 16:36:37 2024 +0530 nvme-tcp: show hostnqn when connecting to tcp target Log hostnqn when connecting to nvme target. As hostnqn could be changed, logging this information in syslog at appropriate time may help in troubleshooting. Signed-off-by: Nitin U. Yewale Reviewed-by: John Meneghini Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit a90ac7b348770ff3d246fac575306783de381e51 Author: Daniel Wagner Date: Wed Jan 31 09:51:12 2024 +0100 nvmet-fc: use RCU list iterator for assoc_list The assoc_list is a RCU protected list, thus use the RCU flavor of list functions. Let's use this opportunity and refactor this code and move the lookup into a helper and give it a descriptive name. Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit fe506a74589326183297d5abdda02d0c76ae5a8b Author: Daniel Wagner Date: Wed Jan 31 09:51:11 2024 +0100 nvmet-fc: take ref count on tgtport before delete assoc We have to ensure that the tgtport is not going away before be have remove all the associations. Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 710c69dbaccdac312e32931abcb8499c1525d397 Author: Daniel Wagner Date: Wed Jan 31 09:51:10 2024 +0100 nvmet-fc: avoid deadlock on delete association path When deleting an association the shutdown path is deadlocking because we try to flush the nvmet_wq nested. Avoid this by deadlock by deferring the put work into its own work item. Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 3146345c2e9c2f661527054e402b0cfad80105a4 Author: Daniel Wagner Date: Wed Jan 31 09:51:09 2024 +0100 nvmet-fc: abort command when there is no binding When the target port has not active port binding, there is no point in trying to process the command as it has to fail anyway. Instead adding checks to all commands abort the command early. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 1c110588dd95d21782397ff3cbaa55820b4e1fad Author: Daniel Wagner Date: Wed Jan 31 09:51:08 2024 +0100 nvmet-fc: do not tack refs on tgtports from assoc The association life time is tied to the life time of the target port. That means we should not take extra a refcount when creating a association. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 50b474e1faff50f770410f402ebbdf48bf8cc9b0 Author: Daniel Wagner Date: Wed Jan 31 09:51:07 2024 +0100 nvmet-fc: remove null hostport pointer check An association has always a valid hostport pointer. Remove useless null pointer check. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit ca121a0f7515591dba0eb5532bfa7ace4dc153ce Author: Daniel Wagner Date: Wed Jan 31 09:51:06 2024 +0100 nvmet-fc: hold reference on hostport match The hostport data structure is shared between the association, this why we keep track of the users via a refcount. So we should not decrement the refcount on a match and free the hostport several times. Reported by KASAN. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit c5e27b1a779ec25779d04c3af65aebaee6bd4304 Author: Daniel Wagner Date: Wed Jan 31 09:51:05 2024 +0100 nvmet-fc: free queue and assoc directly Neither struct nvmet_fc_tgt_queue nor struct nvmet_fc_tgt_assoc are data structure which are used in a RCU context. So there is no reason to delay the free operation. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 4049dc96b8de7aeb3addcea039446e464726a525 Author: Daniel Wagner Date: Wed Jan 31 09:51:04 2024 +0100 nvmet-fc: defer cleanup using RCU properly When the target executes a disconnect and the host triggers a reconnect immediately, the reconnect command still finds an existing association. The reconnect crashes later on because nvmet_fc_delete_target_assoc blindly removes resources while the reconnect code wants to use it. To address this, nvmet_fc_find_target_assoc should not be able to lookup an association which is being removed. The association list is already under RCU lifetime management, so let's properly use it and remove the association from the list and wait for a grace period before cleaning up all. This means we also can drop the RCU management on the queues, because this is now handled via the association itself. A second step split the execution context so that the initial disconnect command can complete without running the reconnect code in the same context. As usual, this is done by deferring the ->done to a workqueue. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit c691e6d7e13dab81ac8c7489c83b5dea972522a5 Author: Daniel Wagner Date: Wed Jan 31 09:51:03 2024 +0100 nvmet-fc: release reference on target port In case we return early out of __nvmet_fc_finish_ls_req() we still have to release the reference on the target port. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit dcfad4ab4d6733f2861cd241d8532a0004fc835a Author: Daniel Wagner Date: Wed Jan 31 09:51:02 2024 +0100 nvmet-fcloop: swap the list_add_tail arguments The first argument of list_add_tail function is the new element which should be added to the list which is the second argument. Swap the arguments to allow processing more than one element at a time. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 70fbfc47a392b98e5f8dba70c6efc6839205c982 Author: Daniel Wagner Date: Wed Jan 31 09:51:01 2024 +0100 nvme-fc: do not wait in vain when unloading module The module exit path has race between deleting all controllers and freeing 'left over IDs'. To prevent double free a synchronization between nvme_delete_ctrl and ida_destroy has been added by the initial commit. There is some logic around trying to prevent from hanging forever in wait_for_completion, though it does not handling all cases. E.g. blktests is able to reproduce the situation where the module unload hangs forever. If we completely rely on the cleanup code executed from the nvme_delete_ctrl path, all IDs will be freed eventually. This makes calling ida_destroy unnecessary. We only have to ensure that all nvme_delete_ctrl code has been executed before we leave nvme_fc_exit_module. This is done by flushing the nvme_delete_wq workqueue. While at it, remove the unused nvme_fc_wq workqueue too. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 43aa6f97c2d03a52c1ddb86768575fc84344bdbb Author: Linus Torvalds Date: Wed Jan 31 13:49:25 2024 -0500 eventfs: Get rid of dentry pointers without refcounts The eventfs inode had pointers to dentries (and child dentries) without actually holding a refcount on said pointer. That is fundamentally broken, and while eventfs tried to then maintain coherence with dentries going away by hooking into the '.d_iput' callback, that doesn't actually work since it's not ordered wrt lookups. There were two reasonms why eventfs tried to keep a pointer to a dentry: - the creation of a 'events' directory would actually have a stable dentry pointer that it created with tracefs_start_creating(). And it needed that dentry when tearing it all down again in eventfs_remove_events_dir(). This use is actually ok, because the special top-level events directory dentries are actually stable, not just a temporary cache of the eventfs data structures. - the 'eventfs_inode' (aka ei) needs to stay around as long as there are dentries that refer to it. It then used these dentry pointers as a replacement for doing reference counting: it would try to make sure that there was only ever one dentry associated with an event_inode, and keep a child dentry array around to see which dentries might still refer to the parent ei. This gets rid of the invalid dentry pointer use, and renames the one valid case to a different name to make it clear that it's not just any random dentry. The magic child dentry array that is kind of a "reverse reference list" is simply replaced by having child dentries take a ref to the ei. As does the directory dentries. That makes the broken use case go away. Link: https://lore.kernel.org/linux-trace-kernel/202401291043.e62e89dc-oliver.sang@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240131185513.280463000@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Cc: Greg Kroah-Hartman Fixes: c1504e510238 ("eventfs: Implement eventfs dir creation functions") Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit 8dce06e98c70a7fcbb4bca7d90faf40522e65c58 Author: Linus Torvalds Date: Wed Jan 31 13:49:24 2024 -0500 eventfs: Clean up dentry ops and add revalidate function In order for the dentries to stay up-to-date with the eventfs changes, just add a 'd_revalidate' function that checks the 'is_freed' bit. Also, clean up the dentry release to actually use d_release() rather than the slightly odd d_iput() function. We don't care about the inode, all we want to do is to get rid of the refcount to the eventfs data added by dentry->d_fsdata. It would probably be cleaner to make eventfs its own filesystem, or at least set its own dentry ops when looking up eventfs files. But as it is, only eventfs dentries use d_fsdata, so we don't really need to split these things up by use. Another thing that might be worth doing is to make all eventfs lookups mark their dentries as not worth caching. We could do that with d_delete(), but the DCACHE_DONTCACHE flag would likely be even better. As it is, the dentries are all freeable, but they only tend to get freed at memory pressure rather than more proactively. But that's a separate issue. Link: https://lore.kernel.org/linux-trace-kernel/202401291043.e62e89dc-oliver.sang@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240131185513.124644253@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Cc: Greg Kroah-Hartman Fixes: c1504e510238 ("eventfs: Implement eventfs dir creation functions") Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit 408600be78cdb8c650a97ecc7ff411cb216811b5 Author: Linus Torvalds Date: Wed Jan 31 13:49:23 2024 -0500 eventfs: Remove unused d_parent pointer field It's never used Link: https://lore.kernel.org/linux-trace-kernel/202401291043.e62e89dc-oliver.sang@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240131185512.961772428@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Cc: Greg Kroah-Hartman Fixes: c1504e510238 ("eventfs: Implement eventfs dir creation functions") Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit 49304c2b93e4f7468b51ef717cbe637981397115 Author: Linus Torvalds Date: Wed Jan 31 23:32:27 2024 -0500 tracefs: dentry lookup crapectomy The dentry lookup for eventfs files was very broken, and had lots of signs of the old situation where the filesystem names were all created statically in the dentry tree, rather than being looked up dynamically based on the eventfs data structures. You could see it in the naming - how it claimed to "create" dentries rather than just look up the dentries that were given it. You could see it in various nonsensical and very incorrect operations, like using "simple_lookup()" on the dentries that were passed in, which only results in those dentries becoming negative dentries. Which meant that any other lookup would possibly return ENOENT if it saw that negative dentry before the data was then later filled in. You could see it in the immense amount of nonsensical code that didn't actually just do lookups. Link: https://lore.kernel.org/linux-trace-kernel/202401291043.e62e89dc-oliver.sang@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240131233227.73db55e1@gandalf.local.home Cc: stable@vger.kernel.org Cc: Al Viro Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Greg Kroah-Hartman Cc: Ajay Kaher Cc: Mark Rutland Fixes: c1504e510238 ("eventfs: Implement eventfs dir creation functions") Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit eaa1b01fe709d6a236a9cec74813e0400601fd23 Author: Alexander Tsoy Date: Thu Feb 1 14:53:08 2024 +0300 ALSA: usb-audio: Ignore clock selector errors for single connection For devices with multiple clock sources connected to a selector, we need to check what a clock selector control request has returned. This is needed to ensure that a requested clock source is indeed selected and for autoclock feature to work. For devices with single clock source connected, if we get an error there is nothing else we can do about it. We can't skip clock selector setup as it is required by some devices. So lets just ignore error in this case. This should fix various buggy Mackie devices: [ 649.109785] usb 1-1.3: parse_audio_format_rates_v2v3(): unable to find clock source (clock -32) [ 649.111946] usb 1-1.3: parse_audio_format_rates_v2v3(): unable to find clock source (clock -32) [ 649.113822] usb 1-1.3: parse_audio_format_rates_v2v3(): unable to find clock source (clock -32) There is also interesting info from the Windows documentation [1] (this is probably why manufacturers dont't even test this feature): "The USB Audio 2.0 driver doesn't support clock selection. The driver uses the Clock Source Entity, which is selected by default and never issues a Clock Selector Control SET CUR request." Link: https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/usb-2-0-audio-drivers [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=217314 Link: https://bugzilla.kernel.org/show_bug.cgi?id=218175 Link: https://bugzilla.kernel.org/show_bug.cgi?id=218342 Signed-off-by: Alexander Tsoy Link: https://lore.kernel.org/r/20240201115308.17838-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit 04f647c8e456fcfabe9c252a4dcaee03b586fa4f Author: Geetha sowjanya Date: Tue Jan 30 17:36:10 2024 +0530 octeontx2-pf: Remove xdp queues on program detach XDP queues are created/destroyed when a XDP program is attached/detached. In current driver xdp_queues are not getting destroyed on program exit due to incorrect xdp_queue and tot_tx_queue count values. This patch fixes the issue by setting tot_tx_queue and xdp_queue count to correct values. It also fixes xdp.data_hard_start address. Fixes: 06059a1a9a4a ("octeontx2-pf: Add XDP support to netdev PF") Signed-off-by: Geetha sowjanya Link: https://lore.kernel.org/r/20240130120610.16673-1-gakula@marvell.com Signed-off-by: Paolo Abeni commit 6813cdca4ab94a238f8eb0cef3d3f3fcbdfb0ee0 Author: Ma Jun Date: Wed Jan 31 10:19:20 2024 +0800 drm/amdgpu/pm: Use inline function for IP version check Use existing inline function for IP version check. Signed-off-by: Ma Jun Reviewed-by: Yang Wang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 72bd80252feeb3bef8724230ee15d9f7ab541c6e Author: Jens Axboe Date: Thu Feb 1 06:42:36 2024 -0700 io_uring/net: fix sr->len for IORING_OP_RECV with MSG_WAITALL and buffers If we use IORING_OP_RECV with provided buffers and pass in '0' as the length of the request, the length is retrieved from the selected buffer. If MSG_WAITALL is also set and we get a short receive, then we may hit the retry path which decrements sr->len and increments the buffer for a retry. However, the length is still zero at this point, which means that sr->len now becomes huge and import_ubuf() will cap it to MAX_RW_COUNT and subsequently return -EFAULT for the range as a whole. Fix this by always assigning sr->len once the buffer has been selected. Cc: stable@vger.kernel.org Fixes: 7ba89d2af17a ("io_uring: ensure recv and recvmsg handle MSG_WAITALL correctly") Signed-off-by: Jens Axboe commit c7de2d9bb68a5fc71c25ff96705a80a76c8436eb Author: Edson Juliano Drosdeck Date: Thu Feb 1 09:21:14 2024 -0300 ALSA: hda/realtek: Enable headset mic on Vaio VJFE-ADL Vaio VJFE-ADL is equipped with ALC269VC, and it needs ALC298_FIXUP_SPK_VOLUME quirk to make its headset mic work. Signed-off-by: Edson Juliano Drosdeck Cc: Link: https://lore.kernel.org/r/20240201122114.30080-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai commit 28876c1ae8b8cd1dacef50bd6c0555824774f0d2 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:37 2024 +0000 ALSA: hda: cs35l56: Remove unused test stub function Remove an unused stub function that calls a non-existant function. This function was accidentally added as part of commit 2144833e7b41 ("ALSA: hda: cirrus_scodec: Add KUnit test"). It was a relic of an earlier version of the test that should have been removed. Signed-off-by: Richard Fitzgerald Fixes: 2144833e7b41 ("ALSA: hda: cirrus_scodec: Add KUnit test") Link: https://msgid.link/r/20240129162737.497-19-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 6f8ad0480d82245961dae4d3280908611633872d Author: Richard Fitzgerald Date: Mon Jan 29 16:27:36 2024 +0000 ALSA: hda: cs35l56: Firmware file must match the version of preloaded firmware Check whether the firmware is already patched. If so, include the firmware version in the firmware file name. If the firmware has already been patched by the BIOS the driver can only replace it if it has control of hard RESET. If the driver cannot replace the firmware, it can still load a wmfw (for ALSA control definitions) and/or a bin (for additional tunings). But these must match the version of firmware that is running on the CS35L56. The firmware is pre-patched if either: - FIRMWARE_MISSING == 0, or - it is a secured CS35L56 (which implies that is was already patched), cs35l56_hw_init() will set preloaded_fw_ver to the (non-zero) firmware version if either of these conditions is true. Normal (unpatched or replaceable firmware): cs35l56-rev-dsp1-misc[-system_name].[wmfw|bin] Preloaded firmware: cs35l56-rev[-s]-VVVVVV-dsp1-misc[-system_name].[wmfw|bin] Where: [-s] is an optional -s added into the name for a secured CS35L56 VVVVVV is the 24-bit firmware version in hexadecimal. Backport note: This won't apply to kernel versions older than v6.6. Signed-off-by: Richard Fitzgerald Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") Link: https://msgid.link/r/20240129162737.497-18-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit e82bc517c6ef5d5c04b845420406e694c31bdb8a Author: Richard Fitzgerald Date: Mon Jan 29 16:27:35 2024 +0000 ALSA: hda: cs35l56: Fix filename string field layout Change the filename field layout to: cs35l56-rev[-s]-dsp1-misc[-sub].[wmfw|bin] This is to keep the same firmware file naming scheme as the CS35L56 ASoC driver. This is not a compatibility break because no firmware files have been published. The original field layout matched the ASoC driver, but the way the ASoC driver used the wm_adsp driver config to form this filename was bugged. Fixing the ASoC driver to use the correct wm_adsp config strings means that the 's' flag (to indicate a secured part) has to move to somewhere after the first '-'. Signed-off-by: Richard Fitzgerald Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") Link: https://msgid.link/r/20240129162737.497-17-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 77c60722ded7d6739805e045e9648cda82dde5ed Author: Richard Fitzgerald Date: Mon Jan 29 16:27:34 2024 +0000 ALSA: hda: cs35l56: Fix order of searching for firmware files Check for the cases of system-specific bin file without a wmfw before falling back to looking for a generic wmfw. All system-specific options should be tried before falling back to loading a generic wmfw/bin. With the original code, the presence of a fallback generic wmfw on the filesystem would prevent using a system-specific tuning with a ROM firmware. Signed-off-by: Richard Fitzgerald Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") Link: https://msgid.link/r/20240129162737.497-16-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 9e92b77ceb6f362eb2e7995dad6c7f9863053d97 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:33 2024 +0000 ASoC: cs35l56: Allow more time for firmware to boot The original 50ms timeout for firmware boot is not long enough for worst-case time to reboot after a firmware download. Increase the timeout to 250ms. Signed-off-by: Richard Fitzgerald Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://msgid.link/r/20240129162737.497-15-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 245eeff18d7a37693815250ae15979ce98c3d190 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:32 2024 +0000 ASoC: cs35l56: Load tunings for the correct speaker models If the "spk-id-gpios" property is present it points to GPIOs whose value must be used to select the correct bin file to match the speakers. Some manufacturers use multiple sources of speakers, which need different tunings for best performance. On these models the type of speaker fitted is indicated by the values of one or more GPIOs. The number formed by the GPIOs identifies the tuning required. The speaker ID must be used in combination with the subsystem ID (either from PCI SSID or cirrus,firmware-uid property), because the GPIOs can only indicate variants of a specific model. Signed-off-by: Richard Fitzgerald Fixes: 1a1c3d794ef6 ("ASoC: cs35l56: Use PCI SSID as the firmware UID") Link: https://msgid.link/r/20240129162737.497-14-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit f4ef5149953f2fc04907ca5b34db3df667dcddef Author: Richard Fitzgerald Date: Mon Jan 29 16:27:31 2024 +0000 ASoC: cs35l56: Firmware file must match the version of preloaded firmware Check during initialization whether the firmware is already patched. If so, include the firmware version in the wm_adsp fwf_name string. If the firmware has already been patched by the BIOS the driver can only replace it if it has control of hard RESET. If the driver cannot replace the firmware, it can still load a wmfw (for ALSA control definitions) and/or a bin (for additional tunings). But these must match the version of firmware that is running on the CS35L56. The firmware is pre-patched if FIRMWARE_MISSING == 0. Including the firmware version in the fwf_name string will qualify the firmware file name: Normal (unpatched or replaceable firmware): cs35l56-rev-dsp1-misc[-system_name].[wmfw|bin] Preloaded firmware: cs35l56-rev[-s]-VVVVVV-dsp1-misc[-system_name].[wmfw|bin] Where: [-s] is an optional -s added into the name for a secured CS35L56 VVVVVV is the 24-bit firmware version in hexadecimal. Signed-off-by: Richard Fitzgerald Fixes: 608f1b0dbdde ("ASoC: cs35l56: Move DSP part string generation so that it is done only once") Link: https://msgid.link/r/20240129162737.497-13-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit f6c967941c5d6fa526fdd64733a8d86bf2bfab31 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:30 2024 +0000 ASoC: cs35l56: Fix misuse of wm_adsp 'part' string for silicon revision Put the silicon revision and secured flag in the wm_adsp fwf_name string instead of including them in the part string. This changes the format of the firmware name string from cs35l56[s]-rev-misc[-system_name] to cs35l56-rev[-s]-misc[-system_name] No firmware files have been published, so this doesn't cause a compatibility break. Silicon revision and secured flag are included in the firmware filename to pick a firmware compatible with the part. These strings were being added to the part string, but that is a misuse of the string. The correct place for these is the fwf_name string, which is specifically intended to select between multiple firmware files for the same part. Backport note: This won't apply to kernels older than v6.6. Signed-off-by: Richard Fitzgerald Fixes: 608f1b0dbdde ("ASoC: cs35l56: Move DSP part string generation so that it is done only once") Link: https://msgid.link/r/20240129162737.497-12-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 07f7d6e7a124d3e4de36771e2a4926d0e31c2258 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:29 2024 +0000 ASoC: cs35l56: Fix for initializing ASP1 mixer registers Defer initializing the state of the ASP1 mixer registers until the firmware has been downloaded and rebooted. On a SoundWire system the ASP is free for use as a chip-to-chip interconnect. This can be either for the firmware on multiple CS35L56 to share reference audio; or as a bridge to another device. If it is a firmware interconnect it is owned by the firmware and the Linux driver should avoid writing the registers. However, if it is a bridge then Linux may take over and handle it as a normal codec-to-codec link. Even if the ASP is used as a firmware-firmware interconnect it is useful to have ALSA controls for the ASP mixer. They are at least useful for debugging. CS35L56 is designed for SDCA and a generic SDCA driver would know nothing about these chip-specific registers. So if the ASP is being used on a SoundWire system the firmware sets up the ASP mixer registers. This means that we can't assume the default state of these registers. But we don't know the initial state that the firmware set them to until after the firmware has been downloaded and booted, which can take several seconds when downloading multiple amps. DAPM normally reads the initial state of mux registers during probe() but this would mean blocking probe() for several seconds until the firmware has initialized them. To avoid this, the mixer muxes are set SND_SOC_NOPM to prevent DAPM trying to read the register state. Custom get/set callbacks are implemented for ALSA control access, and these can safely block waiting for the firmware download. After the firmware download has completed, the state of the mux registers is known so a work job is queued to call snd_soc_dapm_mux_update_power() on each of the mux widgets. Backport note: This won't apply cleanly to kernels older than v6.6. Signed-off-by: Richard Fitzgerald Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://msgid.link/r/20240129162737.497-11-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 856ce8982169acb31a25c5f2ecd2570ab8a6af46 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:28 2024 +0000 ALSA: hda: cs35l56: Initialize all ASP1 registers Add ASP1_FRAME_CONTROL1, ASP1_FRAME_CONTROL5 and the ASP1_TX?_INPUT registers to the sequence used to initialize the ASP configuration. Write this sequence to the cache and directly to the registers to ensure that they match. A system-specific firmware can patch these registers to values that are not the silicon default, so that the CS35L56 boots already in the configuration used by Windows or by "driverless" Windows setups such as factory tuning. These may not match how Linux is configuring the HDA codec. And anyway on Linux the ALSA controls are used to configure routing options. Signed-off-by: Richard Fitzgerald Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") Link: https://msgid.link/r/20240129162737.497-10-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 782e6c538be43a17e34f552ab49e8c713cac7883 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:27 2024 +0000 ASoC: cs35l56: Fix default SDW TX mixer registers Patch the SDW TX mixer registers to silicon defaults. CS35L56 is designed for SDCA and a generic SDCA driver would know nothing about these chip-specific registers. So the firmware sets up the SDW TX mixer registers to whatever audio is relevant on a specific system. This means that the driver cannot assume the initial values of these registers. But Linux has ALSA controls to configure routing, so the registers can be patched to silicon default and the ALSA controls used to select what audio to feed back to the host capture path. Backport note: This won't apply to kernels older than v6.6. Signed-off-by: Richard Fitzgerald Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://msgid.link/r/20240129162737.497-9-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 72a77d7631c6e392677c0134343cf5edcd3a4572 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:26 2024 +0000 ASoC: cs35l56: Fix to ensure ASP1 registers match cache Add a dummy SUPPLY widget connected to the ASP that forces the chip registers to match the regmap cache when the ASP is powered-up. On a SoundWire system the ASP is free for use as a chip-to-chip interconnect. This can be either for the firmware on multiple CS35L56 to share reference audio; or as a bridge to another device. If it is a firmware interconnect it is owned by the firmware and the Linux driver should avoid writing the registers. However. If it is a bridge then Linux may take over and handle it as a normal codec-to-codec link. CS35L56 is designed for SDCA and a generic SDCA driver would know nothing about these chip-specific registers. So if the ASP is being used on a SoundWire system the firmware sets up the ASP registers. This means that we can't assume the default state of the ASP registers. But we don't know the initial state that the firmware set them to until after the firmware has been downloaded and booted, which can take several seconds when downloading multiple amps. To avoid blocking probe() for several seconds waiting for the firmware, the silicon defaults are assumed. This allows the machine driver to setup the ASP configuration during probe() without being blocked. If the ASP is hooked up and used, the SUPPLY widget ensures that the chip registers match what was configured in the regmap cache. If the machine driver does not hook up the ASP, it is assumed that it won't call any functions to configure the ASP DAI. Therefore the regmap cache will be clean for these registers so a regcache_sync() will not overwrite the chip registers. If the DAI is not hooked up, the dummy SUPPLY widget will not be invoked so it will never force-overwrite the chip registers. Backport note: This won't apply cleanly to kernels older than v6.6. Signed-off-by: Richard Fitzgerald Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://msgid.link/r/20240129162737.497-8-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 3739cc0733ba7eeafc08d4d4208d1f3c2451eabd Author: Richard Fitzgerald Date: Mon Jan 29 16:27:25 2024 +0000 ASoC: cs35l56: Remove buggy checks from cs35l56_is_fw_reload_needed() Remove the check of fw_patched from cs35l56_is_fw_reload_needed(). Also remove the redundant check for control of the reset GPIO. The fw_patched flag is set when cs35l56_dsp_work() has completed its steps to download firmware and power-up wm_adsp. There was a check in cs35l56_is_fw_reload_needed() to make a quick exit of 'false' if !fw_patched. The original idea was that the system might be suspended before the driver has ever made any attempt to download firmware, and in that case the driver doesn't need to return to a patched state because it was never in a patched state. This check of fw_patched is buggy because it prevented ever recovering from a failed patch. If a previous attempt to patch and reboot the silicon had failed it would leave fw_patched==false. This would mean the driver never attempted another download even though the fault may have been cleared (by a hard reset, for example). It is also a redundant check because the calling code already makes a quick exit if cs35l56_component_probe() has not been called, which deals with the original intent of this check but in a safer way. The check for reset GPIO is redundant: if the silicon was hard-reset the FIRMWARE_MISSING flag will be 1. But this check created an expectation that the suspend/resume code toggles reset. This can't easily be protected against accidental code breakage. The only reason for the check was to skip runtime-resuming the driver to read the PROTECTION_STATUS register when it already knows it reset the silicon. But in that case the driver will have to be runtime-resumed to do the firmware download. So it created an assumption for no benefit. Signed-off-by: Richard Fitzgerald Fixes: 8a731fd37f8b ("ASoC: cs35l56: Move utility functions to shared file") Link: https://msgid.link/r/20240129162737.497-7-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 07687cd0539f8185b6ba0c0afba8473517116d6a Author: Richard Fitzgerald Date: Mon Jan 29 16:27:24 2024 +0000 ASoC: cs35l56: Don't add the same register patch multiple times Move the call to cs35l56_set_patch() earlier in cs35l56_init() so that it only adds the register patch on first-time initialization. The call was after the post_soft_reset label, so every time this function was run to re-initialize the hardware after a reset it would call regmap_register_patch() and add the same reg_sequence again. Signed-off-by: Richard Fitzgerald Fixes: 898673b905b9 ("ASoC: cs35l56: Move shared data into a common data structure") Link: https://msgid.link/r/20240129162737.497-6-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit cd38ccbecdace1469b4e0cfb3ddeec72a3fad226 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:23 2024 +0000 ASoC: cs35l56: cs35l56_component_remove() must clean up wm_adsp cs35l56_component_remove() must call wm_adsp_power_down() and wm_adsp2_component_remove(). Signed-off-by: Richard Fitzgerald Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://msgid.link/r/20240129162737.497-5-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit ae861c466ee57e15a29d97629e1c564e3f714a4f Author: Richard Fitzgerald Date: Mon Jan 29 16:27:22 2024 +0000 ASoC: cs35l56: cs35l56_component_remove() must clear cs35l56->component The cs35l56->component pointer is used by the suspend-resume handling to know whether the driver is fully instantiated. This is to prevent it queuing dsp_work which would result in calling wm_adsp when the driver is not an instantiated ASoC component. So this pointer must be cleared by cs35l56_component_remove(). Signed-off-by: Richard Fitzgerald Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://msgid.link/r/20240129162737.497-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit daf3f0f99cde93a066240462b7a87cdfeedc04c0 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:21 2024 +0000 ASoC: wm_adsp: Don't overwrite fwf_name with the default There's no need to overwrite fwf_name with a kstrdup() of the cs_dsp part name. It is trivial to select either fwf_name or cs_dsp.part as the string to use when building the filename in wm_adsp_request_firmware_file(). This leaves fwf_name entirely owned by the codec driver. It also avoids problems with freeing the pointer. With the original code fwf_name was either a pointer owned by the codec driver, or a kstrdup() created by wm_adsp. This meant wm_adsp must free it if it set it, but not if the codec driver set it. The code was handling this by using devm_kstrdup(). But there is no absolute requirement that wm_adsp_common_init() must be called from probe(), so this was a pseudo-memory leak - each new call to wm_adsp_common_init() would allocate another block of memory but these would only be freed if the owning codec driver was removed. Signed-off-by: Richard Fitzgerald Link: https://msgid.link/r/20240129162737.497-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 3657e4cb5a8abd9edf6c944e022fe9ef06989960 Author: Richard Fitzgerald Date: Mon Jan 29 16:27:20 2024 +0000 ASoC: wm_adsp: Fix firmware file search order Check for the cases of system-specific bin file without a wmfw before falling back to looking for a generic wmfw. All system-specific options should be tried before falling back to loading a generic wmfw/bin. With the original code, the presence of a fallback generic wmfw on the filesystem would prevent using a system-specific tuning with a ROM firmware. Signed-off-by: Richard Fitzgerald Fixes: 0e7d82cbea8b ("ASoC: wm_adsp: Add support for loading bin files without wmfw") Link: https://msgid.link/r/20240129162737.497-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit e4af312177d98444ab026f7a26fafaf40189f894 Merge: 2468e8922d2f6 5513c5d0fb3d5 Author: Takashi Iwai Date: Thu Feb 1 13:51:45 2024 +0100 Merge tag 'asoc-fix-v6.8-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.8 Quite a lot of fixes that came in since the merge window, a large portion for for Qualcomm and ES8326. The 8 DAI support for Qualcomm is just raising a constant to allow for devies that otherwise only need DTs, and there's a few other device ID updates for sunxi (Allwinner) and AMD platforms. commit 346c84e281a963437b9fe9dfcd92c531630289de Author: Sean Young Date: Tue Jan 30 09:55:25 2024 +0100 media: pwm-ir-tx: Depend on CONFIG_HIGH_RES_TIMERS Since commit 363d0e56285e ("media: pwm-ir-tx: Trigger edges from hrtimer interrupt context"), pwm-ir-tx uses high resolution timers for IR signal generation when the pwm can be used from atomic context. Ensure they are available. Fixes: 363d0e56285e ("media: pwm-ir-tx: Trigger edges from hrtimer interrupt context") Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit dc9ceb90c4b42c6e5c6757df1d6257110433788e Author: Zhipeng Lu Date: Wed Jan 17 09:14:19 2024 +0100 media: ir_toy: fix a memleak in irtoy_tx When irtoy_command fails, buf should be freed since it is allocated by irtoy_tx, or there is a memleak. Fixes: 4114978dcd24 ("media: ir_toy: prevent device from hanging during transmit") Signed-off-by: Zhipeng Lu Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6a9d552483d50953320b9d3b57abdee8d436f23f Author: Sean Young Date: Thu Apr 13 10:50:32 2023 +0200 media: rc: bpf attach/detach requires write permission Note that bpf attach/detach also requires CAP_NET_ADMIN. Cc: stable@vger.kernel.org Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit f66556c1333b3bd4806fc98ee07c419ab545e6ee Author: Hans de Goede Date: Thu Dec 28 22:43:25 2023 +0100 media: atomisp: Adjust for v4l2_subdev_state handling changes in 6.8 The atomisp driver emulates a standard v4l2 device, which also works for non media-controller aware applications. Part of this requires making try_fmt calls on the sensor when a normal v4l2 app is making try_fmt calls on the /dev/video# mode. With the recent v4l2_subdev_state handling changes in 6.8 this no longer works, fixing this requires 2 changes: 1. The atomisp code was using its own internal v4l2_subdev_pad_config for this. Replace the internal v4l2_subdev_pad_config with allocating a full v4l2_subdev_state for storing the full try_fmt state. 2. The paths actually setting the fmt or crop selection now need to be passed the v4l2_subdev's active state, so that sensor drivers which are using the v4l2_subdev's active state to store their state keep working. Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit fae6e669cdc52fdbb843e7fb1b8419642b6b8cba Author: Jason Gunthorpe Date: Tue Jan 30 12:14:54 2024 -0400 drm/tegra: Do not assume that a NULL domain means no DMA IOMMU Previously with tegra-smmu, even with CONFIG_IOMMU_DMA, the default domain could have been left as NULL. The NULL domain is specially recognized by host1x_client_iommu_attach() as meaning it is not the DMA domain and should be replaced with the special shared domain. This happened prior to the below commit because tegra-smmu was using the NULL domain to mean IDENTITY. Now that the domain is properly labled the test in DRM doesn't see NULL. Check for IDENTITY as well to enable the special domains. Fixes: c8cc2655cc6c ("iommu/tegra-smmu: Implement an IDENTITY domain") Reported-by: diogo.ivo@tecnico.ulisboa.pt Closes: https://lore.kernel.org/all/bbmhcoghrprmbdibnjum6lefix2eoquxrde7wyqeulm4xabmlm@b6jy32saugqh/ Tested-by: diogo.ivo@tecnico.ulisboa.pt Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-3049f92c4812+16691-host1x_def_dom_fix_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 83b3836bf83f09beea5f592b126cfdd1bc921e48 Author: Jason Gunthorpe Date: Tue Jan 30 12:12:53 2024 -0400 iommu: Allow ops->default_domain to work when !CONFIG_IOMMU_DMA The ops->default_domain flow used a 0 req_type to select the default domain and this was enforced by iommu_group_alloc_default_domain(). When !CONFIG_IOMMU_DMA started forcing the old ARM32 drivers into IDENTITY it also overroad the 0 req_type of the ops->default_domain drivers to IDENTITY which ends up causing failures during device probe. Make iommu_group_alloc_default_domain() accept a req_type that matches the ops->default_domain and have iommu_group_alloc_default_domain() generate a req_type that matches the default_domain. This way the req_type always describes what kind of domain should be attached and ops->default_domain overrides all other mechanisms to choose the default domain. Fixes: 2ad56efa80db ("powerpc/iommu: Setup a default domain and remove set_platform_dma_ops") Fixes: 0f6a90436a57 ("iommu: Do not use IOMMU_DOMAIN_DMA if CONFIG_IOMMU_DMA is not enabled") Reported-by: Ovidiu Panait Closes: https://lore.kernel.org/linux-iommu/20240123165829.630276-1-ovidiu.panait@windriver.com/ Reported-by: Shivaprasad G Bhat Closes: https://lore.kernel.org/linux-iommu/170618452753.3805.4425669653666211728.stgit@ltcd48-lp2.aus.stglab.ibm.com/ Tested-by: Ovidiu Panait Tested-by: Shivaprasad G Bhat Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/0-v1-755bd21c4a64+525b8-iommu_def_dom_fix_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 47dc55181dcbee69fc84c902e7fb060213b9b8a5 Author: Takashi Sakamoto Date: Thu Feb 1 20:53:18 2024 +0900 firewire: core: search descriptor leaf just after vendor directory entry in root directory It appears that Sony DVMC-DA1 has a quirk that the descriptor leaf entry locates just after the vendor directory entry in root directory. This is not conformant to the legacy layout of configuration ROM described in Configuration ROM for AV/C Devices 1.0 (1394 Trading Association, Dec 2000, TA Document 1999027). This commit changes current implementation to parse configuration ROM for device attributes so that the descriptor leaf entry can be detected for the vendor name. $ config-rom-pretty-printer < Sony-DVMC-DA1.img ROM header and bus information block ----------------------------------------------------------------- 1024 041ee7fb bus_info_length 4, crc_length 30, crc 59387 1028 31333934 bus_name "1394" 1032 e0644000 irmc 1, cmc 1, isc 1, bmc 0, cyc_clk_acc 100, max_rec 4 (32) 1036 08004603 company_id 080046 | 1040 0014193c device_id 12886219068 | EUI-64 576537731003586876 root directory ----------------------------------------------------------------- 1044 0006b681 directory_length 6, crc 46721 1048 03080046 vendor 1052 0c0083c0 node capabilities: per IEEE 1394 1056 8d00000a --> eui-64 leaf at 1096 1060 d1000003 --> unit directory at 1072 1064 c3000005 --> vendor directory at 1084 1068 8100000a --> descriptor leaf at 1108 unit directory at 1072 ----------------------------------------------------------------- 1072 0002cdbf directory_length 2, crc 52671 1076 1200a02d specifier id 1080 13010000 version vendor directory at 1084 ----------------------------------------------------------------- 1084 00020cfe directory_length 2, crc 3326 1088 17fa0000 model 1092 81000008 --> descriptor leaf at 1124 eui-64 leaf at 1096 ----------------------------------------------------------------- 1096 0002c66e leaf_length 2, crc 50798 1100 08004603 company_id 080046 | 1104 0014193c device_id 12886219068 | EUI-64 576537731003586876 descriptor leaf at 1108 ----------------------------------------------------------------- 1108 00039e26 leaf_length 3, crc 40486 1112 00000000 textual descriptor 1116 00000000 minimal ASCII 1120 536f6e79 "Sony" descriptor leaf at 1124 ----------------------------------------------------------------- 1124 0005001d leaf_length 5, crc 29 1128 00000000 textual descriptor 1132 00000000 minimal ASCII 1136 44564d43 "DVMC" 1140 2d444131 "-DA1" 1144 00000000 Suggested-by: Adam Goldman Tested-by: Adam Goldman Link: https://lore.kernel.org/r/20240130100409.30128-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 5f9ab17394f831cb7986ec50900fa37507a127f1 Author: Takashi Sakamoto Date: Thu Feb 1 20:53:18 2024 +0900 firewire: core: correct documentation of fw_csr_string() kernel API Against its current description, the kernel API can accepts all types of directory entries. This commit corrects the documentation. Cc: stable@vger.kernel.org Fixes: 3c2c58cb33b3 ("firewire: core: fw_csr_string addendum") Link: https://lore.kernel.org/r/20240130100409.30128-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 5f16ee27cd5abd5166e28b2311ac693c204063ff Author: Badal Nilawar Date: Sat Jan 27 22:20:40 2024 +0530 drm/hwmon: Fix abi doc warnings This fixes warnings in xe, i915 hwmon docs: Warning: /sys/devices/.../hwmon/hwmon/curr1_crit is defined 2 times: Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon:35 Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon:52 Warning: /sys/devices/.../hwmon/hwmon/energy1_input is defined 2 times: Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon:54 Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon:65 Warning: /sys/devices/.../hwmon/hwmon/in0_input is defined 2 times: Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon:46 Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon:0 Warning: /sys/devices/.../hwmon/hwmon/power1_crit is defined 2 times: Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon:22 Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon:39 Warning: /sys/devices/.../hwmon/hwmon/power1_max is defined 2 times: Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon:0 Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon:8 Warning: /sys/devices/.../hwmon/hwmon/power1_max_interval is defined 2 times: Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon:62 Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon:30 Warning: /sys/devices/.../hwmon/hwmon/power1_rated_max is defined 2 times: Documentation/ABI/testing/sysfs-driver-intel-xe-hwmon:14 Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon:22 Use a path containing the driver name to differentiate the documentation of each entry. Fixes: fb1b70607f73 ("drm/xe/hwmon: Expose power attributes") Fixes: 92d44a422d0d ("drm/xe/hwmon: Expose card reactive critical power") Fixes: fbcdc9d3bf58 ("drm/xe/hwmon: Expose input voltage attribute") Fixes: 71d0a32524f9 ("drm/xe/hwmon: Expose hwmon energy attribute") Fixes: 4446fcf220ce ("drm/xe/hwmon: Expose power1_max_interval") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/all/20240125113345.291118ff@canb.auug.org.au/ Signed-off-by: Badal Nilawar Reviewed-by: Ashutosh Dixit Reviewed-by: Lucas De Marchi Acked-by: Rodrigo Vivi Acked-by: Jani Nikula Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240127165040.2348009-1-badal.nilawar@intel.com (cherry picked from commit 20485e3a810c480cef60caf53988619f61127e7b) Signed-off-by: Thomas Hellström commit c9cfed29f5fe13f97e46c3879517d8c41ae251d6 Author: Matthew Brost Date: Tue Jan 30 18:54:24 2024 -0800 drm/xe: Make all GuC ABI shift values unsigned All GuC ABI definitions are unsigned and not defining as unsigned is causing build errors [1]. [1] https://lore.kernel.org/all/20240123111235.3097079-1-geert@linux-m68k.org/ Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Thomas Hellström Cc: Lucas De Marchi Cc: Michal Wajdeczko Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240131025424.2087936-1-matthew.brost@intel.com (cherry picked from commit d83d8ae275c6bf87506b71b8a1acd98452137dc5) Signed-off-by: Thomas Hellström commit ed2bdf3b264d627e1c2f26272660e1d7c2115000 Author: Thomas Hellström Date: Wed Jan 31 10:16:28 2024 +0100 drm/xe/vm: Subclass userptr vmas The construct allocating only parts of the vma structure when the userptr part is not needed is very fragile. A developer could add additional fields below the userptr part, and the code could easily attempt to access the userptr part even if its not persent. So introduce xe_userptr_vma which subclasses struct xe_vma the proper way, and accordingly modify a couple of interfaces. This should also help if adding userptr helpers to drm_gpuvm. v2: - Fix documentation of to_userptr_vma() (Matthew Brost) - Fix allocation and freeing of vmas to clearer distinguish between the types. Closes: https://lore.kernel.org/intel-xe/0c4cc1a7-f409-4597-b110-81f9e45d1ffe@embeddedor.com/T/#u Fixes: a4cc60a55fd9 ("drm/xe: Only alloc userptr part of xe_vma for userptrs") Cc: Rodrigo Vivi Cc: Matthew Brost Cc: Lucas De Marchi Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240131091628.12318-1-thomas.hellstrom@linux.intel.com (cherry picked from commit 5bd24e78829ad569fa1c3ce9a05b59bb97b91f3d) Signed-off-by: Thomas Hellström commit 89642db3b28849c23f42baadc88b40435ba6c5c6 Author: Matthew Brost Date: Tue Jan 23 13:26:38 2024 -0800 drm/xe: Use LRC prefix rather than CTX prefix in lrc desc defines The sparc build fails [1] due to CTX_VALID being redefined. Fix this by using a better naming convention of LRC_VALID as this define is used in setting bits in the lrc descriptor. To be uniform, change other define with LRC prefix too. [1] https://lore.kernel.org/all/20240123111235.3097079-1-geert@linux-m68k.org/ v2: - s/LEGACY_64B_CONTEXT/LRC_LEGACY_64B_CONTEXT (Lucas) Fixes: 0bc519d20ffa ("drm/xe: Remove GEN[0-9]*_ prefixes") Cc: Thomas Hellström Cc: Lucas De Marchi Signed-off-by: Matthew Brost Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240123212638.1605626-1-matthew.brost@intel.com (cherry picked from commit 152ca51d8db03f08a71c25e999812e263839fdce) Signed-off-by: Thomas Hellström commit ef87557928d1ab3a1487520962f55cd7163e621b Author: Thomas Hellström Date: Wed Jan 17 14:40:47 2024 +0100 drm/xe: Don't use __user error pointers The error pointer macros are not aware of __user pointers and as a consequence sparse warns. Have the copy_mask() function return an integer instead of a __user pointer. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Rodrigo Vivi Cc: Matthew Brost Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240117134048.165425-5-thomas.hellstrom@linux.intel.com (cherry picked from commit 78366eed6853aa6a5deccb2eb182f9334d2bd208) Signed-off-by: Thomas Hellström commit 3ecf036b04b9dc72ca5bd62359748e14568fcf3f Author: Thomas Hellström Date: Wed Jan 17 14:40:46 2024 +0100 drm/xe: Annotate mcr_[un]lock() These functions acquire and release the gt::mcr_lock. Annotate accordingly. Fix the corresponding sparse warning. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Fixes: fb1d55efdfcb ("drm/xe: Cleanup OPEN_BRACE style issues") Cc: Francois Dugast Cc: Rodrigo Vivi Cc: Matthew Brost Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240117134048.165425-4-thomas.hellstrom@linux.intel.com (cherry picked from commit 97fd7a7e4e877676a2ab1a687ba958b70931abcc) Signed-off-by: Thomas Hellström commit efeff7b38ef62fc65069bd2200d151a9d5d38907 Author: Matthew Brost Date: Wed Jan 24 15:44:13 2024 -0800 drm/xe: Only allow 1 ufence per exec / bind IOCTL The way exec ufences are coded only 1 ufence per IOCTL will be signaled. It is possible to fix this but for current use cases 1 ufence per IOCTL is sufficient. Enforce a limit of 1 ufence per IOCTL (both exec and bind to be uniform). v2: - Add fixes tag (Thomas) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Mika Kahola Cc: Thomas Hellström Signed-off-by: Matthew Brost Reviewed-by: Brian Welty Link: https://patchwork.freedesktop.org/patch/msgid/20240124234413.1640825-1-matthew.brost@intel.com (cherry picked from commit d1df9bfbf68c65418f30917f406b6d5bd597714e) Signed-off-by: Thomas Hellström commit 6d2096239af11f1c9fa03e8fc74400ce048078b0 Author: Matt Roper Date: Fri Jan 26 14:06:14 2024 -0800 drm/xe: Grab mem_access when disabling C6 on skip_guc_pc platforms If skip_guc_pc is set for a platform, C6 is disabled directly without acquiring a mem_access reference, triggering an assertion inside xe_gt_idle_disable_c6. Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is set") Cc: Rodrigo Vivi Cc: Vinay Belgaumkar Signed-off-by: Matt Roper Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240126220613.865939-2-matthew.d.roper@intel.com (cherry picked from commit 9f5971bdf78e0937206556534247243ad56cd735) Signed-off-by: Thomas Hellström commit f9c15a678db3acbe769635e3c49f979e2f88a514 Author: José Roberto de Souza Date: Wed Jan 24 09:18:30 2024 -0800 drm/xe: Fix crash in trace_dma_fence_init() trace_dma_fence_init() uses dma_fence_ops functions like get_driver_name() and get_timeline_name() to generate trace information but the Xe KMD implementation of those functions makes use of xe_hw_fence_ctx that was being set after dma_fence_init(). So here just inverting the order to fix the crash. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: José Roberto de Souza Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20240124171830.95774-1-jose.souza@intel.com (cherry picked from commit c6878e47431c72168da08dfbc1496c09b2d3c246) Signed-off-by: Thomas Hellström commit aa125f229076a8230a171d519dbdb2a862145d33 Author: Johannes Berg Date: Sun Jan 28 10:23:09 2024 +0200 wifi: iwlwifi: remove extra kernel-doc This no longer exists, remove the kernel-doc. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Signed-off-by: Kalle Valo Link: https://msgid.link/20240128102209.d2192d79bc09.Id9551728d618248dd471382a5283503a8976237a@changeid commit ffb635bb398fc07cb38f8a7b4a82cbe5f412f08e Author: Tomi Valkeinen Date: Mon Dec 18 08:54:01 2023 +0100 media: rkisp1: Fix IRQ handling due to shared interrupts The driver requests the interrupts as IRQF_SHARED, so the interrupt handlers can be called at any time. If such a call happens while the ISP is powered down, the SoC will hang as the driver tries to access the ISP registers. This can be reproduced even without the platform sharing the IRQ line: Enable CONFIG_DEBUG_SHIRQ and unload the driver, and the board will hang. Fix this by adding a new field, 'irqs_enabled', which is used to bail out from the interrupt handler when the ISP is not operational. Link: https://lore.kernel.org/r/20231218-rkisp-shirq-fix-v1-2-173007628248@ideasonboard.com Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit a107d643b2a3382e0a2d2c4ef08bf8c6bff4561d Author: Tomi Valkeinen Date: Mon Dec 18 08:54:00 2023 +0100 media: Revert "media: rkisp1: Drop IRQF_SHARED" This reverts commit 85d2a31fe4d9be1555f621ead7a520d8791e0f74. The rkisp1 does share interrupt lines on some platforms, after all. Thus we need to revert this, and implement a fix for the rkisp1 shared irq handling in a follow-up patch. Closes: https://lore.kernel.org/all/87o7eo8vym.fsf@gmail.com/ Link: https://lore.kernel.org/r/20231218-rkisp-shirq-fix-v1-1-173007628248@ideasonboard.com Reported-by: Mikhail Rudenko Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit b59af3045a6605c6a23ca436f532eec481a54c36 Merge: ebe3121400f24 bc0970d5ac1d1 Author: Jakub Kicinski Date: Wed Jan 31 21:08:11 2024 -0800 Merge branch 'selftests-net-a-few-pmtu-sh-fixes' Paolo Abeni says: ==================== selftests: net: a few pmtu.sh fixes This series try to address CI failures for the pmtu.sh tests. It does _not_ attempt to enable all the currently skipped cases, to avoid adding more entropy. Tested with: make -C tools/testing/selftests/ TARGETS=net install vng --build --config tools/testing/selftests/net/config vng --run . --user root -- \ ./tools/testing/selftests/kselftest_install/run_kselftest.sh \ -t net:pmtu.sh ==================== Link: https://lore.kernel.org/r/cover.1706635101.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit bc0970d5ac1d1317e212bdf55533935ecb6ae95c Author: Paolo Abeni Date: Tue Jan 30 18:47:18 2024 +0100 selftests: net: don't access /dev/stdout in pmtu.sh When running the pmtu.sh via the kselftest infra, accessing /dev/stdout gives unexpected results: # dd: failed to open '/dev/stdout': Device or resource busy # TEST: IPv4, bridged vxlan4: PMTU exceptions [FAIL] Let dd use directly the standard output to fix the above: # TEST: IPv4, bridged vxlan4: PMTU exceptions - nexthop objects [ OK ] Fixes: 136a1b434bbb ("selftests: net: test vxlan pmtu exceptions with tcp") Signed-off-by: Paolo Abeni Reviewed-by: Guillaume Nault Reviewed-by: David Ahern Link: https://lore.kernel.org/r/23d7592c5d77d75cff9b34f15c227f92e911c2ae.1706635101.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit e4e4b6d568d2549583cbda3f8ce567e586cb05da Author: Paolo Abeni Date: Tue Jan 30 18:47:17 2024 +0100 selftests: net: fix available tunnels detection The pmtu.sh test tries to detect the tunnel protocols available in the running kernel and properly skip the unsupported cases. In a few more complex setup, such detection is unsuccessful, as the script currently ignores some intermediate error code at setup time. Before: # which: no nettest in (/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin) # TEST: vti6: PMTU exceptions (ESP-in-UDP) [FAIL] # PMTU exception wasn't created after creating tunnel exceeding link layer MTU # ./pmtu.sh: line 931: kill: (7543) - No such process # ./pmtu.sh: line 931: kill: (7544) - No such process After: # xfrm4 not supported # TEST: vti4: PMTU exceptions [SKIP] Fixes: ece1278a9b81 ("selftests: net: add ESP-in-UDP PMTU test") Signed-off-by: Paolo Abeni Reviewed-by: Guillaume Nault Reviewed-by: David Ahern Link: https://lore.kernel.org/r/cab10e75fda618e6fff8c595b632f47db58b9309.1706635101.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit f7c25d8e17dd759d97ca093faf92eeb7da7b3890 Author: Paolo Abeni Date: Tue Jan 30 18:47:16 2024 +0100 selftests: net: add missing config for pmtu.sh tests The mentioned test uses a few Kconfig still missing the net config, add them. Before: # Error: Specified qdisc kind is unknown. # Error: Specified qdisc kind is unknown. # Error: Qdisc not classful. # We have an error talking to the kernel # Error: Qdisc not classful. # We have an error talking to the kernel # policy_routing not supported # TEST: ICMPv4 with DSCP and ECN: PMTU exceptions [SKIP] After: # TEST: ICMPv4 with DSCP and ECN: PMTU exceptions [ OK ] Fixes: ec730c3e1f0e ("selftest: net: Test IPv4 PMTU exceptions with DSCP and ECN") Signed-off-by: Paolo Abeni Reviewed-by: Guillaume Nault Reviewed-by: David Ahern Link: https://lore.kernel.org/r/8d27bf6762a5c7b3acc457d6e6872c533040f9c1.1706635101.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit ebe3121400f242e215687f81f7cf533e25fab81d Merge: 4d322dce82a1d bc90fbe0c3182 Author: Jakub Kicinski Date: Wed Jan 31 18:27:01 2024 -0800 Merge branch 'pds_core-various-fixes' Brett Creeley says: ==================== pds_core: Various fixes This series includes the following changes: There can be many users of the pds_core's adminq. This includes pds_core's uses and any clients that depend on it. When the pds_core device goes through a reset for any reason the adminq is freed and reconfigured. There are some gaps in the current implementation that will cause crashes during reset if any of the previously mentioned users of the adminq attempt to use it after it's been freed. Issues around how resets are handled, specifically regarding the driver's error handlers. Originally these patches were aimed at net-next, but it was requested to push the fixes patches to net. The original patches can be found here: https://lore.kernel.org/netdev/20240126174255.17052-1-brett.creeley@amd.com/ Also, the Reviewed-by tags were left in place from net-next reviews as the patches didn't change. ==================== Link: https://lore.kernel.org/r/20240129234035.69802-1-brett.creeley@amd.com Signed-off-by: Jakub Kicinski commit bc90fbe0c3182157d2be100a2f6c2edbb1820677 Author: Brett Creeley Date: Mon Jan 29 15:40:35 2024 -0800 pds_core: Rework teardown/setup flow to be more common Currently the teardown/setup flow for driver probe/remove is quite a bit different from the reset flows in pdsc_fw_down()/pdsc_fw_up(). One key piece that's missing are the calls to pci_alloc_irq_vectors() and pci_free_irq_vectors(). The pcie reset case is calling pci_free_irq_vectors() on reset_prepare, but not calling the corresponding pci_alloc_irq_vectors() on reset_done. This is causing unexpected/unwanted interrupt behavior due to the adminq interrupt being accidentally put into legacy interrupt mode. Also, the pci_alloc_irq_vectors()/pci_free_irq_vectors() functions are being called directly in probe/remove respectively. Fix this inconsistency by making the following changes: 1. Always call pdsc_dev_init() in pdsc_setup(), which calls pci_alloc_irq_vectors() and get rid of the now unused pds_dev_reinit(). 2. Always free/clear the pdsc->intr_info in pdsc_teardown() since this structure will get re-alloced in pdsc_setup(). 3. Move the calls of pci_free_irq_vectors() to pdsc_teardown() since pci_alloc_irq_vectors() will always be called in pdsc_setup()->pdsc_dev_init() for both the probe/remove and reset flows. 4. Make sure to only create the debugfs "identity" entry when it doesn't already exist, which it will in the reset case because it's already been created in the initial call to pdsc_dev_init(). Fixes: ffa55858330f ("pds_core: implement pci reset handlers") Signed-off-by: Brett Creeley Reviewed-by: Shannon Nelson Link: https://lore.kernel.org/r/20240129234035.69802-7-brett.creeley@amd.com Signed-off-by: Jakub Kicinski commit e96094c1d11cce4deb5da3c0500d49041ab845b8 Author: Brett Creeley Date: Mon Jan 29 15:40:34 2024 -0800 pds_core: Clear BARs on reset During reset the BARs might be accessed when they are unmapped. This can cause unexpected issues, so fix it by clearing the cached BAR values so they are not accessed until they are re-mapped. Also, make sure any places that can access the BARs when they are NULL are prevented. Fixes: 49ce92fbee0b ("pds_core: add FW update feature to devlink") Signed-off-by: Brett Creeley Reviewed-by: Shannon Nelson Reviewed-by: Przemek Kitszel Link: https://lore.kernel.org/r/20240129234035.69802-6-brett.creeley@amd.com Signed-off-by: Jakub Kicinski commit 7e82a8745b951b1e794cc780d46f3fbee5e93447 Author: Brett Creeley Date: Mon Jan 29 15:40:33 2024 -0800 pds_core: Prevent race issues involving the adminq There are multiple paths that can result in using the pdsc's adminq. [1] pdsc_adminq_isr and the resulting work from queue_work(), i.e. pdsc_work_thread()->pdsc_process_adminq() [2] pdsc_adminq_post() When the device goes through reset via PCIe reset and/or a fw_down/fw_up cycle due to bad PCIe state or bad device state the adminq is destroyed and recreated. A NULL pointer dereference can happen if [1] or [2] happens after the adminq is already destroyed. In order to fix this, add some further state checks and implement reference counting for adminq uses. Reference counting was used because multiple threads can attempt to access the adminq at the same time via [1] or [2]. Additionally, multiple clients (i.e. pds-vfio-pci) can be using [2] at the same time. The adminq_refcnt is initialized to 1 when the adminq has been allocated and is ready to use. Users/clients of the adminq (i.e. [1] and [2]) will increment the refcnt when they are using the adminq. When the driver goes into a fw_down cycle it will set the PDSC_S_FW_DEAD bit and then wait for the adminq_refcnt to hit 1. Setting the PDSC_S_FW_DEAD before waiting will prevent any further adminq_refcnt increments. Waiting for the adminq_refcnt to hit 1 allows for any current users of the adminq to finish before the driver frees the adminq. Once the adminq_refcnt hits 1 the driver clears the refcnt to signify that the adminq is deleted and cannot be used. On the fw_up cycle the driver will once again initialize the adminq_refcnt to 1 allowing the adminq to be used again. Fixes: 01ba61b55b20 ("pds_core: Add adminq processing and commands") Signed-off-by: Brett Creeley Reviewed-by: Shannon Nelson Reviewed-by: Przemek Kitszel Link: https://lore.kernel.org/r/20240129234035.69802-5-brett.creeley@amd.com Signed-off-by: Jakub Kicinski commit 951705151e50f9022bc96ec8b3fd5697380b1df6 Author: Brett Creeley Date: Mon Jan 29 15:40:32 2024 -0800 pds_core: Use struct pdsc for the pdsc_adminq_isr private data The initial design for the adminq interrupt was done based on client drivers having their own adminq and adminq interrupt. So, each client driver's adminq isr would use their specific adminqcq for the private data struct. For the time being the design has changed to only use a single adminq for all clients. So, instead use the struct pdsc for the private data to simplify things a bit. This also has the benefit of not dereferencing the adminqcq to access the pdsc struct when the PDSC_S_STOPPING_DRIVER bit is set and the adminqcq has actually been cleared/freed. Fixes: 01ba61b55b20 ("pds_core: Add adminq processing and commands") Signed-off-by: Brett Creeley Reviewed-by: Shannon Nelson Reviewed-by: Przemek Kitszel Link: https://lore.kernel.org/r/20240129234035.69802-4-brett.creeley@amd.com Signed-off-by: Jakub Kicinski commit d321067e2cfa4d5e45401a00912ca9da8d1af631 Author: Brett Creeley Date: Mon Jan 29 15:40:31 2024 -0800 pds_core: Cancel AQ work on teardown There is a small window where pdsc_work_thread() calls pdsc_process_adminq() and pdsc_process_adminq() passes the PDSC_S_STOPPING_DRIVER check and starts to process adminq/notifyq work and then the driver starts a fw_down cycle. This could cause some undefined behavior if the notifyqcq/adminqcq are free'd while pdsc_process_adminq() is running. Use cancel_work_sync() on the adminqcq's work struct to make sure any pending work items are cancelled and any in progress work items are completed. Also, make sure to not call cancel_work_sync() if the work item has not be initialized. Without this, traces will happen in cases where a reset fails and teardown is called again or if reset fails and the driver is removed. Fixes: 01ba61b55b20 ("pds_core: Add adminq processing and commands") Signed-off-by: Brett Creeley Reviewed-by: Shannon Nelson Reviewed-by: Przemek Kitszel Link: https://lore.kernel.org/r/20240129234035.69802-3-brett.creeley@amd.com Signed-off-by: Jakub Kicinski commit d9407ff11809c6812bb84fe7be9c1367d758e5c8 Author: Brett Creeley Date: Mon Jan 29 15:40:30 2024 -0800 pds_core: Prevent health thread from running during reset/remove The PCIe reset handlers can run at the same time as the health thread. This can cause the health thread to stomp on the PCIe reset. Fix this by preventing the health thread from running while a PCIe reset is happening. As part of this use timer_shutdown_sync() during reset and remove to make sure the timer doesn't ever get rearmed. Fixes: ffa55858330f ("pds_core: implement pci reset handlers") Signed-off-by: Brett Creeley Reviewed-by: Shannon Nelson Reviewed-by: Przemek Kitszel Link: https://lore.kernel.org/r/20240129234035.69802-2-brett.creeley@amd.com Signed-off-by: Jakub Kicinski commit 4d322dce82a1d44f8c83f0f54f95dd1b8dcf46c9 Author: Eric Dumazet Date: Tue Jan 30 18:42:35 2024 +0000 af_unix: fix lockdep positive in sk_diag_dump_icons() syzbot reported a lockdep splat [1]. Blamed commit hinted about the possible lockdep violation, and code used unix_state_lock_nested() in an attempt to silence lockdep. It is not sufficient, because unix_state_lock_nested() is already used from unix_state_double_lock(). We need to use a separate subclass. This patch adds a distinct enumeration to make things more explicit. Also use swap() in unix_state_double_lock() as a clean up. v2: add a missing inline keyword to unix_state_lock_nested() [1] WARNING: possible circular locking dependency detected 6.8.0-rc1-syzkaller-00356-g8a696a29c690 #0 Not tainted syz-executor.1/2542 is trying to acquire lock: ffff88808b5df9e8 (rlock-AF_UNIX){+.+.}-{2:2}, at: skb_queue_tail+0x36/0x120 net/core/skbuff.c:3863 but task is already holding lock: ffff88808b5dfe70 (&u->lock/1){+.+.}-{2:2}, at: unix_dgram_sendmsg+0xfc7/0x2200 net/unix/af_unix.c:2089 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&u->lock/1){+.+.}-{2:2}: lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 sk_diag_dump_icons net/unix/diag.c:87 [inline] sk_diag_fill+0x6ea/0xfe0 net/unix/diag.c:157 sk_diag_dump net/unix/diag.c:196 [inline] unix_diag_dump+0x3e9/0x630 net/unix/diag.c:220 netlink_dump+0x5c1/0xcd0 net/netlink/af_netlink.c:2264 __netlink_dump_start+0x5d7/0x780 net/netlink/af_netlink.c:2370 netlink_dump_start include/linux/netlink.h:338 [inline] unix_diag_handler_dump+0x1c3/0x8f0 net/unix/diag.c:319 sock_diag_rcv_msg+0xe3/0x400 netlink_rcv_skb+0x1df/0x430 net/netlink/af_netlink.c:2543 sock_diag_rcv+0x2a/0x40 net/core/sock_diag.c:280 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x7e6/0x980 net/netlink/af_netlink.c:1367 netlink_sendmsg+0xa37/0xd70 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] sock_write_iter+0x39a/0x520 net/socket.c:1160 call_write_iter include/linux/fs.h:2085 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0xa74/0xca0 fs/read_write.c:590 ksys_write+0x1a0/0x2c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b -> #0 (rlock-AF_UNIX){+.+.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x1909/0x5ab0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 skb_queue_tail+0x36/0x120 net/core/skbuff.c:3863 unix_dgram_sendmsg+0x15d9/0x2200 net/unix/af_unix.c:2112 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x592/0x890 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmmsg+0x3b2/0x730 net/socket.c:2724 __do_sys_sendmmsg net/socket.c:2753 [inline] __se_sys_sendmmsg net/socket.c:2750 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2750 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&u->lock/1); lock(rlock-AF_UNIX); lock(&u->lock/1); lock(rlock-AF_UNIX); *** DEADLOCK *** 1 lock held by syz-executor.1/2542: #0: ffff88808b5dfe70 (&u->lock/1){+.+.}-{2:2}, at: unix_dgram_sendmsg+0xfc7/0x2200 net/unix/af_unix.c:2089 stack backtrace: CPU: 1 PID: 2542 Comm: syz-executor.1 Not tainted 6.8.0-rc1-syzkaller-00356-g8a696a29c690 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 check_noncircular+0x366/0x490 kernel/locking/lockdep.c:2187 check_prev_add kernel/locking/lockdep.c:3134 [inline] check_prevs_add kernel/locking/lockdep.c:3253 [inline] validate_chain+0x1909/0x5ab0 kernel/locking/lockdep.c:3869 __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 skb_queue_tail+0x36/0x120 net/core/skbuff.c:3863 unix_dgram_sendmsg+0x15d9/0x2200 net/unix/af_unix.c:2112 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x592/0x890 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmmsg+0x3b2/0x730 net/socket.c:2724 __do_sys_sendmmsg net/socket.c:2753 [inline] __se_sys_sendmmsg net/socket.c:2750 [inline] __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2750 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f26d887cda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f26d95a60c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f26d89abf80 RCX: 00007f26d887cda9 RDX: 000000000000003e RSI: 00000000200bd000 RDI: 0000000000000004 RBP: 00007f26d88c947a R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000008c0 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f26d89abf80 R15: 00007ffcfe081a68 Fixes: 2aac7a2cb0d9 ("unix_diag: Pending connections IDs NLA") Reported-by: syzbot Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20240130184235.1620738-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 0d150beff26e636aa07ab889133a0015eaee4227 Author: Caleb Sander Date: Wed Jan 31 09:43:15 2024 -0700 nvme-fc: log human-readable opcode on timeout The fc transport logs the opcode and fctype on command timeout. This is sufficient information to identify the command issued, but not very human-readable. Use the nvme_fabrics_opcode_str() helper to also log the name of the command, as rdma and tcp already do. Signed-off-by: Caleb Sander Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 7d23e836b00eec96610141549f59e5902dc55fe8 Author: Caleb Sander Date: Wed Jan 31 09:43:14 2024 -0700 nvme: split out fabrics version of nvme_opcode_str() nvme_opcode_str() currently supports admin, IO, and fabrics commands. However, fabrics commands aren't allowed for the pci transport. Currently the pci caller passes 0 as the fctype, which means any fabrics command would be displayed as "Property Set". Move fabrics command support into a function nvme_fabrics_opcode_str() and remove the fctype argument to nvme_opcode_str(). This way, a fabrics command will display as "Unknown" for pci. Convert the rdma and tcp transports to use nvme_fabrics_opcode_str(). Signed-off-by: Caleb Sander Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 15b87e267b6952eb3603d8fb9f031d8f75696960 Merge: 585b40e25dc9f 6caf3adcc877b Author: Jakub Kicinski Date: Wed Jan 31 16:33:31 2024 -0800 Merge branch 'selftests-net-a-couple-of-typos-fixes-in-key-management-rst-tests' Dmitry Safonov says: ==================== selftests/net: A couple of typos fixes in key-management/rst tests Two typo fixes, noticed by Mohammad's review. And a fix for an issue that got uncovered. v1: https://lore.kernel.org/r/20240118-tcp-ao-test-key-mgmt-v1-0-3583ca147113@arista.com Signed-off-by: Dmitry Safonov ==================== Link: https://lore.kernel.org/r/20240130-tcp-ao-test-key-mgmt-v2-0-d190430a6c60@arista.com Signed-off-by: Jakub Kicinski commit 6caf3adcc877b3470e98133d52b360ebe5f7a6a3 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Jan 30 03:51:54 2024 +0000 selftests/net: Repair RST passive reset selftest Currently, the test is racy and seems to not pass anymore. In order to rectify it, aim on TCP_TW_RST. Doesn't seem way too good with this sleep() part, but it seems as a reasonable compromise for the test. There is a plan in-line comment on how-to improve it, going to do it on the top, at this moment I want it to run on netdev/patchwork selftests dashboard. It also slightly changes tcp_ao-lib in order to get SO_ERROR propagated to test_client_verify() return value. Fixes: c6df7b2361d7 ("selftests/net: Add TCP-AO RST test") Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20240130-tcp-ao-test-key-mgmt-v2-3-d190430a6c60@arista.com Signed-off-by: Jakub Kicinski commit 384aa16d3776a9ca5c0c1f1e7af4030fe176a993 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Jan 30 03:51:53 2024 +0000 selftests/net: Rectify key counters checks As the names of (struct test_key) members didn't reflect whether the key was used for TX or RX, the verification for the counters was done incorrectly for asymmetrical selftests. Rename these with _tx appendix and fix checks in verify_counters(). While at it, as the checks are now correct, introduce skip_counters_checks, which is intended for tests where it's expected that a key that was set with setsockopt(sk, IPPROTO_TCP, TCP_AO_INFO, ...) might had no chance of getting used on the wire. Fixes the following failures, exposed by the previous commit: > not ok 51 server: Check current != rnext keys set before connect(): Counter pkt_good was expected to increase 0 => 0 for key 132:5 > not ok 52 server: Check current != rnext keys set before connect(): Counter pkt_good was not expected to increase 0 => 21 for key 137:10 > > not ok 63 server: Check current flapping back on peer's RnextKey request: Counter pkt_good was expected to increase 0 => 0 for key 132:5 > not ok 64 server: Check current flapping back on peer's RnextKey request: Counter pkt_good was not expected to increase 0 => 40 for key 137:10 Cc: Mohammad Nassiri Fixes: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20240130-tcp-ao-test-key-mgmt-v2-2-d190430a6c60@arista.com Signed-off-by: Jakub Kicinski commit d8f5df1fcea54923b74558035b8de8fb2da3e816 Author: Mohammad Nassiri Date: Tue Jan 30 03:51:52 2024 +0000 selftests/net: Argument value mismatch when calling verify_counters() The end_server() function only operates in the server thread and always takes an accept socket instead of a listen socket as its input argument. To align with this, invert the boolean values used when calling verify_counters() within the end_server() function. As a result of this typo, the test didn't correctly check for the non-symmetrical scenario, where i.e. peer-A uses a key <100:200> to send data, but peer-B uses another key <105:205> to send its data. So, in simple words, different keys for TX and RX. Fixes: 3c3ead555648 ("selftests/net: Add TCP-AO key-management test") Signed-off-by: Mohammad Nassiri Link: https://lore.kernel.org/all/934627c5-eebb-4626-be23-cfb134c01d1a@arista.com/ [amended 'Fixes' tag, added the issue description and carried-over to lkml] Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20240130-tcp-ao-test-key-mgmt-v2-1-d190430a6c60@arista.com Signed-off-by: Jakub Kicinski commit f9e9115d0c014dec3278d68823eaff159f98f4d6 Author: Caleb Sander Date: Wed Jan 31 09:43:13 2024 -0700 nvme: take const cmd pointer in read-only helpers nvme_is_fabrics() and nvme_is_write() only read struct nvme_command, so take it by const pointer. This allows callers to pass a const pointer and communicates that these functions don't modify the command. Signed-off-by: Caleb Sander Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 6f9a71c61183d6849d5aeab085b210c10398af9a Author: Caleb Sander Date: Wed Jan 31 09:43:12 2024 -0700 nvme: remove redundant status mask In nvme_get_error_status_str(), the status code is already masked with 0x7ff at the beginning of the function. Don't bother masking it again when indexing nvme_statuses. Signed-off-by: Caleb Sander Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 4b6821940eeb238a0cc9af322e9ebe8e12613f6a Author: Caleb Sander Date: Wed Jan 31 09:43:11 2024 -0700 nvme: return string as char *, not unsigned char * The functions in drivers/nvme/host/constants.c returning human-readable status and opcode strings currently use type "const unsigned char *". Typically string constants use type "const char *", so remove "unsigned" from the return types. This is a purely cosmetic change to clarify that the functions return text strings instead of an array of bytes, for example. Signed-off-by: Caleb Sander Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 0945b43b4ef8833d73daf5d057d07b64a23b4220 Author: Chaitanya Kulkarni Date: Wed Jan 31 15:01:38 2024 -0800 nvme-common: add module description Add MODULE_DESCRIPTION() in order to remove warnings & get clean build:- WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/common/nvme-auth.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/common/nvme-keyring.o Signed-off-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 48dae46676d1acb632a3e1e14d02879d57618b5d Author: Hannes Reinecke Date: Mon Jan 29 07:39:48 2024 +0100 nvme: enable retries for authentication commands Authentication commands might trigger a lengthy computation on the controller or even a callout to an external entity. In these cases the controller might return a status without the DNR bit set, indicating that the command should be retried. This patch enables retries for authentication commands by setting NVME_SUBMIT_RETRY for __nvme_submit_sync_cmd(). Reported-by: Martin George Signed-off-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit bd2687f2e5940f6ee14bfae787b3c1f5f0574907 Author: Hannes Reinecke Date: Mon Jan 29 07:39:46 2024 +0100 nvme: change __nvme_submit_sync_cmd() calling conventions Combine the two arguments 'flags' and 'at_head' from __nvme_submit_sync_cmd() into a single 'flags' argument and use function-specific values to indicate what should be set within the function. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit f9ddefb6c0de771038b041eaad5cc15e61fe283f Author: Hannes Reinecke Date: Mon Jan 29 07:39:45 2024 +0100 nvme-auth: open-code single-use macros No point in having macros just for a single function nvme_auth_submit(). Open-code them into the caller. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 585b40e25dc9ff3d2b03d1495150540849009e5b Author: Andrew Lunn Date: Mon Jan 29 23:49:48 2024 +0100 net: dsa: mv88e6xxx: Fix failed probe due to unsupported C45 reads Not all mv88e6xxx device support C45 read/write operations. Those which do not return -EOPNOTSUPP. However, when phylib scans the bus, it considers this fatal, and the probe of the MDIO bus fails, which in term causes the mv88e6xxx probe as a whole to fail. When there is no device on the bus for a given address, the pull up resistor on the data line results in the read returning 0xffff. The phylib core code understands this when scanning for devices on the bus. C45 allows multiple devices to be supported at one address, so phylib will perform a few reads at each address, so although thought not the most efficient solution, it is a way to avoid fatal errors. Make use of this as a minimal fix for stable to fix the probing problems. Follow up patches will rework how C45 operates to make it similar to C22 which considers -ENODEV as a none-fatal, and swap mv88e6xxx to using this. Cc: stable@vger.kernel.org Fixes: 743a19e38d02 ("net: dsa: mv88e6xxx: Separate C22 and C45 transactions") Reported-by: Tim Menninger Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20240129224948.1531452-1-andrew@lunn.ch Signed-off-by: Jakub Kicinski commit 5dee6d6923458e26966717f2a3eae7d09fc10bf6 Author: Zhipeng Lu Date: Mon Jan 29 17:10:17 2024 +0800 net: ipv4: fix a memleak in ip_setup_cork When inetdev_valid_mtu fails, cork->opt should be freed if it is allocated in ip_setup_cork. Otherwise there could be a memleak. Fixes: 501a90c94510 ("inet: protect against too small mtu values.") Signed-off-by: Zhipeng Lu Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240129091017.2938835-1-alexious@zju.edu.cn Signed-off-by: Jakub Kicinski commit e028243003ad6e1417cc8ac19af9ded672b9ec59 Author: Andrew Halaney Date: Mon Jan 29 11:12:11 2024 -0600 MAINTAINERS: Drop unreachable reviewer for Qualcomm ETHQOS ethernet driver Bhupesh's email responds indicating they've changed employers and with no new contact information. Let's drop the line from MAINTAINERS to avoid getting the same response over and over. Signed-off-by: Andrew Halaney Link: https://lore.kernel.org/r/20240129-remove-dwmac-qcom-ethqos-reviewer-v1-1-2645eab61451@redhat.com Signed-off-by: Jakub Kicinski commit ee36a3b345c433a846effcdcfba437c2298eeda5 Author: Shyam Prasad N Date: Mon Jan 29 13:58:13 2024 +0000 cifs: make sure that channel scaling is done only once Following a successful cifs_tree_connect, we have the code to scale up/down the number of channels in the session. However, it is not protected by a lock today. As a result, this code can be executed by several processes that select the same channel. The core functions handle this well, as they pick chan_lock. However, we've seen cases where smb2_reconnect throws some warnings. To fix that, this change introduces a flags bitmap inside the cifs_ses structure. A new flag type is used to ensure that only one process enters this section at any time. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 7330256268664ea0a7dd5b07a3fed363093477dd Author: Friedrich Vock Date: Tue Jan 23 12:52:03 2024 +0100 drm/amdgpu: Reset IH OVERFLOW_CLEAR bit Allows us to detect subsequent IH ring buffer overflows as well. Cc: Joshua Ashton Cc: Alex Deucher Cc: Christian König Cc: stable@vger.kernel.org Signed-off-by: Friedrich Vock Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 4f56acdee4c69224afde328bb6402a48b93f8221 Author: Yifan Zhang Date: Tue Jan 30 21:01:42 2024 +0800 drm/amdgpu: remove asymmetrical irq disabling in vcn 4.0.5 suspend There is no irq enabled in vcn 4.0.5 resume, causing wrong amdgpu_irq_src status. Beside, current set function callbacks are empty with no real effect. Signed-off-by: Yifan Zhang Acked-by: Saleemkhan Jamadar Reviewed-by: Veerabadhran Gopalakrishnan Signed-off-by: Alex Deucher commit de4a733868df3a1b899fd4b05c32e92474cc8f73 Author: Yifan Zhang Date: Tue Jan 30 13:14:39 2024 +0800 drm/amdgpu: drm/amdgpu: remove golden setting for gfx 11.5.0 No need to set GC golden settings in driver from gfx 11.5.0 onwards. Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Reviewed-by: Lang Yu Signed-off-by: Alex Deucher commit 9c29282ecbeeb1b43fced3055c6a5bb244b9390b Author: Lang Yu Date: Thu Jan 11 12:27:07 2024 +0800 drm/amdkfd: reserve the BO before validating it Fix a warning. v2: Avoid unmapping attachment repeatedly when ERESTARTSYS. v3: Lock the BO before accessing ttm->sg to avoid race conditions.(Felix) [ 41.708711] WARNING: CPU: 0 PID: 1463 at drivers/gpu/drm/ttm/ttm_bo.c:846 ttm_bo_validate+0x146/0x1b0 [ttm] [ 41.708989] Call Trace: [ 41.708992] [ 41.708996] ? show_regs+0x6c/0x80 [ 41.709000] ? ttm_bo_validate+0x146/0x1b0 [ttm] [ 41.709008] ? __warn+0x93/0x190 [ 41.709014] ? ttm_bo_validate+0x146/0x1b0 [ttm] [ 41.709024] ? report_bug+0x1f9/0x210 [ 41.709035] ? handle_bug+0x46/0x80 [ 41.709041] ? exc_invalid_op+0x1d/0x80 [ 41.709048] ? asm_exc_invalid_op+0x1f/0x30 [ 41.709057] ? amdgpu_amdkfd_gpuvm_dmaunmap_mem+0x2c/0x80 [amdgpu] [ 41.709185] ? ttm_bo_validate+0x146/0x1b0 [ttm] [ 41.709197] ? amdgpu_amdkfd_gpuvm_dmaunmap_mem+0x2c/0x80 [amdgpu] [ 41.709337] ? srso_alias_return_thunk+0x5/0x7f [ 41.709346] kfd_mem_dmaunmap_attachment+0x9e/0x1e0 [amdgpu] [ 41.709467] amdgpu_amdkfd_gpuvm_dmaunmap_mem+0x56/0x80 [amdgpu] [ 41.709586] kfd_ioctl_unmap_memory_from_gpu+0x1b7/0x300 [amdgpu] [ 41.709710] kfd_ioctl+0x1ec/0x650 [amdgpu] [ 41.709822] ? __pfx_kfd_ioctl_unmap_memory_from_gpu+0x10/0x10 [amdgpu] [ 41.709945] ? srso_alias_return_thunk+0x5/0x7f [ 41.709949] ? tomoyo_file_ioctl+0x20/0x30 [ 41.709959] __x64_sys_ioctl+0x9c/0xd0 [ 41.709967] do_syscall_64+0x3f/0x90 [ 41.709973] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Fixes: 101b8104307e ("drm/amdkfd: Move dma unmapping after TLB flush") Signed-off-by: Lang Yu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 16da399091dca3d1e48109086403587af37cc196 Author: Srinivasan Shanmugam Date: Tue Jan 30 12:10:38 2024 +0530 drm/amdgpu: Fix missing error code in 'gmc_v6/7/8/9_0_hw_init()' Return 0 for success scenairos in 'gmc_v6/7/8/9_0_hw_init()' Fixes the below: drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c:920 gmc_v6_0_hw_init() warn: missing error code? 'r' drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:1104 gmc_v7_0_hw_init() warn: missing error code? 'r' drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:1224 gmc_v8_0_hw_init() warn: missing error code? 'r' drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:2347 gmc_v9_0_hw_init() warn: missing error code? 'r' Fixes: fac4ebd79fed ("drm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()'") Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 97cba232549b9fe7e491fb60a69cf93075015f29 Author: Srinivasan Shanmugam Date: Mon Jan 29 21:17:09 2024 +0530 drm/amd/display: Fix buffer overflow in 'get_host_router_total_dp_tunnel_bw()' The error message buffer overflow 'dc->links' 12 <= 12 suggests that the code is trying to access an element of the dc->links array that is beyond its bounds. In C, arrays are zero-indexed, so an array with 12 elements has valid indices from 0 to 11. Trying to access dc->links[12] would be an attempt to access the 13th element of a 12-element array, which is a buffer overflow. To fix this, ensure that the loop does not go beyond the last valid index when accessing dc->links[i + 1] by subtracting 1 from the loop condition. This would ensure that i + 1 is always a valid index in the array. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_dpia_bw.c:208 get_host_router_total_dp_tunnel_bw() error: buffer overflow 'dc->links' 12 <= 12 Fixes: 59f1622a5f05 ("drm/amd/display: Add dpia display mode validation logic") Cc: PeiChen Huang Cc: Aric Cyr Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Cc: Meenakshikumar Somasundaram Signed-off-by: Srinivasan Shanmugam Reviewed-by: Tom Chung Signed-off-by: Alex Deucher commit 492a1e67ee59312b27c85c275298080fde392190 Author: Srinivasan Shanmugam Date: Tue Jan 30 14:06:43 2024 +0530 drm/amd/display: Add NULL check for kzalloc in 'amdgpu_dm_atomic_commit_tail()' Add a NULL check for the kzalloc call that allocates memory for dummy_updates in the amdgpu_dm_atomic_commit_tail function. Previously, if kzalloc failed to allocate memory and returned NULL, the code would attempt to use the NULL pointer. The fix is to check if kzalloc returns NULL, and if so, log an error message and skip the rest of the current loop iteration with the continue statement. This prevents the code from attempting to use the NULL pointer. Cc: Julia Lawall Cc: Aurabindo Pillai Cc: Rodrigo Siqueira Cc: Alex Hung Cc: Alex Deucher Reported-by: Julia Lawall Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202401300629.ICnCt983-lkp@intel.com/ Fixes: 135fd1b35690 ("drm/amd/display: Reduce stack size") Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 8ef85a0ce24a6d9322dfa2a67477e473c3619b4f Author: David McFarland Date: Mon Jan 29 18:18:22 2024 -0400 drm/amd: Don't init MEC2 firmware when it fails to load The same calls are made directly above, but conditional on the firmware loading and validating successfully. Cc: stable@vger.kernel.org Fixes: 9931b67690cf ("drm/amd: Load GFX10 microcode during early_init") Signed-off-by: David McFarland Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit bb34bc2cd3ee284d7992df24a3f7d24f61a59268 Author: Ma Jun Date: Fri Jan 5 14:05:25 2024 +0800 drm/amdgpu: Fix the warning info in mode1 reset Fix the warning info below during mode1 reset. [ +0.000004] Call Trace: [ +0.000004] [ +0.000006] ? show_regs+0x6e/0x80 [ +0.000011] ? __flush_work.isra.0+0x2e8/0x390 [ +0.000005] ? __warn+0x91/0x150 [ +0.000009] ? __flush_work.isra.0+0x2e8/0x390 [ +0.000006] ? report_bug+0x19d/0x1b0 [ +0.000013] ? handle_bug+0x46/0x80 [ +0.000012] ? exc_invalid_op+0x1d/0x80 [ +0.000011] ? asm_exc_invalid_op+0x1f/0x30 [ +0.000014] ? __flush_work.isra.0+0x2e8/0x390 [ +0.000007] ? __flush_work.isra.0+0x208/0x390 [ +0.000007] ? _prb_read_valid+0x216/0x290 [ +0.000008] __cancel_work_timer+0x11d/0x1a0 [ +0.000007] ? try_to_grab_pending+0xe8/0x190 [ +0.000012] cancel_work_sync+0x14/0x20 [ +0.000008] amddrm_sched_stop+0x3c/0x1d0 [amd_sched] [ +0.000032] amdgpu_device_gpu_recover+0x29a/0xe90 [amdgpu] This warning info was printed after applying the patch "drm/sched: Convert drm scheduler to use a work queue rather than kthread". The root cause is that amdgpu driver tries to use the uninitialized work_struct in the struct drm_gpu_scheduler v2: - Rename the function to amdgpu_ring_sched_ready and move it to amdgpu_ring.c (Alex) v3: - Fix a few more checks based on Vitaly's patch (Alex) v4: - squash in fix noticed by Bert in https://gitlab.freedesktop.org/drm/amd/-/issues/3139 Fixes: 11b3b9f461c5 ("drm/sched: Check scheduler ready before calling timeout handling") Reviewed-by: Alex Deucher Signed-off-by: Vitaly Prosyak Signed-off-by: Ma Jun Signed-off-by: Alex Deucher commit faf51b201bc42adf500945732abb6220c707d6f3 Author: Fangzhi Zuo Date: Thu Jan 11 14:46:01 2024 -0500 drm/amd/display: Fix dcn35 8k30 Underflow/Corruption Issue [why] odm calculation is missing for pipe split policy determination and cause Underflow/Corruption issue. [how] Add the odm calculation. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 191cb4ed33a61c90feed8bda0f0df3a419604fc8 Author: Nicholas Susanto Date: Thu Jan 18 13:34:40 2024 -0500 drm/amd/display: Underflow workaround by increasing SR exit latency [Why] On 14us for exit latency time causes underflow for 8K monitor with HDR on. Increasing the latency to 28us fixes the underflow. [How] Increase the latency to 28us. This workaround should be sufficient before we figure out why SR exit so long. Reviewed-by: Chaitanya Dhere Acked-by: Tom Chung Signed-off-by: Nicholas Susanto Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 39079fe8e660851abbafa90cd55cbf029210661f Author: Wenjing Liu Date: Thu Jan 18 15:14:15 2024 -0500 drm/amd/display: fix incorrect mpc_combine array size [why] MAX_SURFACES is per stream, while MAX_PLANES is per asic. The mpc_combine is an array that records all the planes per asic. Therefore MAX_PLANES should be used as the array size. Using MAX_SURFACES causes array overflow when there are more than 3 planes. [how] Use the MAX_PLANES for the mpc_combine array size. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Rodrigo Siqueira Reviewed-by: Nevenko Stupar Reviewed-by: Chaitanya Dhere Acked-by: Tom Chung Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 31c2bf25eaf51c2d45f092284a28e97f43b54c15 Author: Dmytro Laktyushkin Date: Wed Jan 17 16:46:02 2024 -0500 drm/amd/display: Fix DPSTREAM CLK on and off sequence [Why] Secondary DP2 display fails to light up in some instances [How] Clock needs to be on when DPSTREAMCLK*_EN =1. This change moves dtbclk_p enable/disable point to make sure this is the case Reviewed-by: Charlene Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Tom Chung Signed-off-by: Daniel Miess Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b5abd7f983e14054593dc91d6df2aa5f8cc67652 Author: Charlene Liu Date: Tue Jan 16 19:54:15 2024 -0500 drm/amd/display: fix USB-C flag update after enc10 feature init [why] BIOS's integration info table not following the original order which is phy instance is ext_displaypath's array index. [how] Move them to follow the original order. Reviewed-by: Muhammad Ahmed Acked-by: Tom Chung Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2ff33c759a4247c84ec0b7815f1f223e155ba82a Author: Sohaib Nadeem Date: Tue Jan 16 11:00:00 2024 -0500 drm/amd/display: increased min_dcfclk_mhz and min_fclk_mhz [why] Originally, PMFW said min FCLK is 300Mhz, but min DCFCLK can be increased to 400Mhz because min FCLK is now 600Mhz so FCLK >= 1.5 * DCFCLK hardware requirement will still be satisfied. Increasing min DCFCLK addresses underflow issues (underflow occurs when phantom pipe is turned on for some Sub-Viewport configs). [how] Increasing DCFCLK by raising the min_dcfclk_mhz Reviewed-by: Chaitanya Dhere Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Sohaib Nadeem Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 514312c07f6cd2f1ffe5a90d42b6080868a03a26 Author: Charlene Liu Date: Tue Jan 9 11:31:20 2024 -0500 Revert "drm/amd/display: initialize all the dpm level's stutter latency" Revert commit 885c71ad791c ("drm/amd/display: initialize all the dpm level's stutter latency") Because it causes some regression Reviewed-by: Muhammad Ahmed Acked-by: Tom Chung Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4119734e06a7f30e7e8eb666692a58b85dca0269 Author: Mukul Joshi Date: Fri Jan 26 15:14:50 2024 -0500 drm/amdkfd: Use correct drm device for cgroup permission check On GFX 9.4.3, for a given KFD node, fetch the correct drm device from XCP manager when checking for cgroup permissions. Signed-off-by: Mukul Joshi Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit c49bf4fcfc2f5516f76a706b06fcad5886cc25e1 Author: Jay Cornwall Date: Fri Jan 5 08:49:06 2024 -0600 drm/amdkfd: Use S_ENDPGM_SAVED in trap handler This instruction has no functional difference to S_ENDPGM but allows performance counters to track save events correctly. Signed-off-by: Jay Cornwall Reviewed-by: Laurent Morichetti Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 961df3085416ffabea192989941c89ffbf2af2d5 Author: Philip Yang Date: Mon Jan 15 13:37:47 2024 -0500 drm/amdkfd: Correct partial migration virtual addr Partial migration to system memory should use migrate.addr, not prange->start as virtual address to allocate system memory page. Fixes: a546a2768440 ("drm/amdkfd: Use partial migrations/mapping for GPU/CPU page faults in SVM") Signed-off-by: Philip Yang Reviewed-by: Xiaogang Chen Signed-off-by: Alex Deucher commit 8059918a1377f2f1fff06af4f5a4ed3d5acd6bc4 Author: Pablo Neira Ayuso Date: Mon Jan 29 13:12:33 2024 +0100 netfilter: nft_ct: sanitize layer 3 and 4 protocol number in custom expectations - Disallow families other than NFPROTO_{IPV4,IPV6,INET}. - Disallow layer 4 protocol with no ports, since destination port is a mandatory attribute for this object. Fixes: 857b46027d6f ("netfilter: nft_ct: add ct expectations support") Signed-off-by: Pablo Neira Ayuso commit 259eb32971e9eb24d1777a28d82730659f50fdcb Author: Pablo Neira Ayuso Date: Mon Jan 29 11:09:43 2024 +0100 netfilter: nf_log: replace BUG_ON by WARN_ON_ONCE when putting logger Module reference is bumped for each user, this should not ever happen. But BUG_ON check should use rcu_access_pointer() instead. If this ever happens, do WARN_ON_ONCE() instead of BUG_ON() and consolidate pointer check under the rcu read side lock section. Fixes: fab4085f4e24 ("netfilter: log: nf_log_packet() as real unified interface") Signed-off-by: Pablo Neira Ayuso commit 97f7cf1cd80eeed3b7c808b7c12463295c751001 Author: Jozsef Kadlecsik Date: Mon Jan 29 10:57:01 2024 +0100 netfilter: ipset: fix performance regression in swap operation The patch "netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test", commit 28628fa9 fixes a race condition. But the synchronize_rcu() added to the swap function unnecessarily slows it down: it can safely be moved to destroy and use call_rcu() instead. Eric Dumazet pointed out that simply calling the destroy functions as rcu callback does not work: sets with timeout use garbage collectors which need cancelling at destroy which can wait. Therefore the destroy functions are split into two: cancelling garbage collectors safely at executing the command received by netlink and moving the remaining part only into the rcu callback. Link: https://lore.kernel.org/lkml/C0829B10-EAA6-4809-874E-E1E9C05A8D84@automattic.com/ Fixes: 28628fa952fe ("netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test") Reported-by: Ale Crismani Reported-by: David Wang <00107082@163.com> Tested-by: David Wang <00107082@163.com> Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit 6e348067ee4bc5905e35faa3a8fafa91c9124bc7 Author: Xin Long Date: Thu Jan 25 17:29:46 2024 -0500 netfilter: conntrack: check SCTP_CID_SHUTDOWN_ACK for vtag setting in sctp_new The annotation says in sctp_new(): "If it is a shutdown ack OOTB packet, we expect a return shutdown complete, otherwise an ABORT Sec 8.4 (5) and (8)". However, it does not check SCTP_CID_SHUTDOWN_ACK before setting vtag[REPLY] in the conntrack entry(ct). Because of that, if the ct in Router disappears for some reason in [1] with the packet sequence like below: Client > Server: sctp (1) [INIT] [init tag: 3201533963] Server > Client: sctp (1) [INIT ACK] [init tag: 972498433] Client > Server: sctp (1) [COOKIE ECHO] Server > Client: sctp (1) [COOKIE ACK] Client > Server: sctp (1) [DATA] (B)(E) [TSN: 3075057809] Server > Client: sctp (1) [SACK] [cum ack 3075057809] Server > Client: sctp (1) [HB REQ] (the ct in Router disappears somehow) <-------- [1] Client > Server: sctp (1) [HB ACK] Client > Server: sctp (1) [DATA] (B)(E) [TSN: 3075057810] Client > Server: sctp (1) [DATA] (B)(E) [TSN: 3075057810] Client > Server: sctp (1) [HB REQ] Client > Server: sctp (1) [DATA] (B)(E) [TSN: 3075057810] Client > Server: sctp (1) [HB REQ] Client > Server: sctp (1) [ABORT] when processing HB ACK packet in Router it calls sctp_new() to initialize the new ct with vtag[REPLY] set to HB_ACK packet's vtag. Later when sending DATA from Client, all the SACKs from Server will get dropped in Router, as the SACK packet's vtag does not match vtag[REPLY] in the ct. The worst thing is the vtag in this ct will never get fixed by the upcoming packets from Server. This patch fixes it by checking SCTP_CID_SHUTDOWN_ACK before setting vtag[REPLY] in the ct in sctp_new() as the annotation says. With this fix, it will leave vtag[REPLY] in ct to 0 in the case above, and the next HB REQ/ACK from Server is able to fix the vtag as its value is 0 in nf_conntrack_sctp_packet(). Signed-off-by: Xin Long Signed-off-by: Pablo Neira Ayuso commit 97830f3c3088638ff90b20dfba2eb4d487bf14d7 Author: Carlos Llamas Date: Wed Jan 31 21:53:46 2024 +0000 binder: signal epoll threads of self-work In (e)poll mode, threads often depend on I/O events to determine when data is ready for consumption. Within binder, a thread may initiate a command via BINDER_WRITE_READ without a read buffer and then make use of epoll_wait() or similar to consume any responses afterwards. It is then crucial that epoll threads are signaled via wakeup when they queue their own work. Otherwise, they risk waiting indefinitely for an event leaving their work unhandled. What is worse, subsequent commands won't trigger a wakeup either as the thread has pending work. Fixes: 457b9a6f09f0 ("Staging: android: add binder driver") Cc: Arve Hjønnevåg Cc: Martijn Coenen Cc: Alice Ryhl Cc: Steven Moreland Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20240131215347.1808751-1-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 776d451648443f9884be4a1b4e38e8faf1c621f9 Author: Pablo Neira Ayuso Date: Tue Jan 23 23:45:32 2024 +0100 netfilter: nf_tables: restrict tunnel object to NFPROTO_NETDEV Bail out on using the tunnel dst template from other than netdev family. Add the infrastructure to check for the family in objects. Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support") Signed-off-by: Pablo Neira Ayuso commit fb366fc7541a1de521ab3df58471746aa793b833 Author: Ryan Schaefer Date: Sun Jan 21 21:51:44 2024 +0000 netfilter: conntrack: correct window scaling with retransmitted SYN commit c7aab4f17021 ("netfilter: nf_conntrack_tcp: re-init for syn packets only") introduces a bug where SYNs in ORIGINAL direction on reused 5-tuple result in incorrect window scale negotiation. This commit merged the SYN re-initialization and simultaneous open or SYN retransmits cases. Merging this block added the logic in tcp_init_sender() that performed window scale negotiation to the retransmitted syn case. Previously. this would only result in updating the sender's scale and flags. After the merge the additional logic results in improperly clearing the scale in ORIGINAL direction before any packets in the REPLY direction are received. This results in packets incorrectly being marked invalid for being out-of-window. This can be reproduced with the following trace: Packet Sequence: > Flags [S], seq 1687765604, win 62727, options [.. wscale 7], length 0 > Flags [S], seq 1944817196, win 62727, options [.. wscale 7], length 0 In order to fix the issue, only evaluate window negotiation for packets in the REPLY direction. This was tested with simultaneous open, fast open, and the above reproduction. Fixes: c7aab4f17021 ("netfilter: nf_conntrack_tcp: re-init for syn packets only") Signed-off-by: Ryan Schaefer Signed-off-by: Pablo Neira Ayuso commit 607aad1e4356c210dbef9022955a3089377909b2 Author: Christian A. Ehrhardt Date: Mon Jan 29 20:25:56 2024 +0100 of: unittest: Fix compile in the non-dynamic case If CONFIG_OF_KOBJ is not set, a device_node does not contain a kobj and attempts to access the embedded kobj via kref_read break the compile. Replace affected kref_read calls with a macro that reads the refcount if it exists and returns 1 if there is no embedded kobj. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401291740.VP219WIz-lkp@intel.com/ Fixes: 4dde83569832 ("of: Fix double free in of_parse_phandle_with_args_map") Signed-off-by: Christian A. Ehrhardt Link: https://lore.kernel.org/r/20240129192556.403271-1-lk@c--e.de Signed-off-by: Rob Herring commit a9ef277488cfc1b7da88235dc11c338a14f34835 Author: Kirill A. Shutemov Date: Wed Jan 24 15:03:17 2024 +0200 x86/kvm: Fix SEV check in sev_map_percpu_data() The function sev_map_percpu_data() checks if it is running on an SEV platform by checking the CC_ATTR_GUEST_MEM_ENCRYPT attribute. However, this attribute is also defined for TDX. To avoid false positives, add a cc_vendor check. Signed-off-by: Kirill A. Shutemov Fixes: 4d96f9109109 ("x86/sev: Replace occurrences of sev_active() with cc_platform_has()") Suggested-by: Borislav Petkov (AMD) Acked-by: David Rientjes Message-Id: <20240124130317.495519-1-kirill.shutemov@linux.intel.com> Signed-off-by: Paolo Bonzini commit d52734d00b8e86604a66b4cdfa9e8bb541daca2d Author: Maciej S. Szmigiero Date: Wed Jan 24 21:18:21 2024 +0100 KVM: x86: Give a hint when Win2016 might fail to boot due to XSAVES erratum Since commit b0563468eeac ("x86/CPU/AMD: Disable XSAVES on AMD family 0x17") kernel unconditionally clears the XSAVES CPU feature bit on Zen1/2 CPUs. Because KVM CPU caps are initialized from the kernel boot CPU features this makes the XSAVES feature also unavailable for KVM guests in this case. At the same time the XSAVEC feature is left enabled. Unfortunately, having XSAVEC but no XSAVES in CPUID breaks Hyper-V enabled Windows Server 2016 VMs that have more than one vCPU. Let's at least give users hint in the kernel log what could be wrong since these VMs currently simply hang at boot with a black screen - giving no clue what suddenly broke them and how to make them work again. Trigger the kernel message hint based on the particular guest ID written to the Guest OS Identity Hyper-V MSR implemented by KVM. Defer this check to when the L1 Hyper-V hypervisor enables SVM in EFER since we want to limit this message to Hyper-V enabled Windows guests only (Windows session running nested as L2) but the actual Guest OS Identity MSR write is done by L1 and happens before it enables SVM. Fixes: b0563468eeac ("x86/CPU/AMD: Disable XSAVES on AMD family 0x17") Signed-off-by: Maciej S. Szmigiero Message-Id: [Move some checks before mutex_lock(), rename function. - Paolo] Signed-off-by: Paolo Bonzini commit 9e05d9b06757732477cca428e87f3d72163d01cf Author: Tengfei Yu Date: Thu Jan 25 13:08:23 2024 +0800 KVM: x86: Check irqchip mode before create PIT As the kvm api(https://docs.kernel.org/virt/kvm/api.html) reads, KVM_CREATE_PIT2 call is only valid after enabling in-kernel irqchip support via KVM_CREATE_IRQCHIP. Without this check, I can create PIT first and enable irqchip-split then, which may cause the PIT invalid because of lacking of in-kernel PIC to inject the interrupt. Signed-off-by: Tengfei Yu Message-Id: <20240125050823.4893-1-moehanabichan@gmail.com> Signed-off-by: Paolo Bonzini commit d9807d60c145836043ffa602328ea1d66dc458b1 Author: Vincent Chen Date: Wed Jan 17 22:03:33 2024 +0800 riscv: mm: execute local TLB flush after populating vmemmap The spare_init() calls memmap_populate() many times to create VA to PA mapping for the VMEMMAP area, where all "struct page" are located once CONFIG_SPARSEMEM_VMEMMAP is defined. These "struct page" are later initialized in the zone_sizes_init() function. However, during this process, no sfence.vma instruction is executed for this VMEMMAP area. This omission may cause the hart to fail to perform page table walk because some data related to the address translation is invisible to the hart. To solve this issue, the local_flush_tlb_kernel_range() is called right after the sparse_init() to execute a sfence.vma instruction for this VMEMMAP area, ensuring that all data related to the address translation is visible to the hart. Fixes: d95f1a542c3d ("RISC-V: Implement sparsemem") Signed-off-by: Vincent Chen Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20240117140333.2479667-1-vincent.chen@sifive.com Fixes: 7a92fc8b4d20 ("mm: Introduce flush_cache_vmap_early()") Signed-off-by: Palmer Dabbelt commit db2aad036e77100e04a96c67f65ae7d49fb538fb Author: Le Ma Date: Thu Jan 25 12:00:34 2024 +0800 drm/amdgpu: move the drm client creation behind drm device registration This patch is to eliminate interrupt warning below: "[drm] Fence fallback timer expired on ring sdma0.0". An early vm pt clearing job is sent to SDMA ahead of interrupt enabled. And re-locating the drm client creation following after drm_dev_register looks like a more proper flow. v2: wrap the drm client creation Fixes: 1819200166ce ("drm/amdkfd: Export DMABufs from KFD using GEM handles") Signed-off-by: Le Ma Reviewed-by: Felix Kuehling Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 99c001cb617df409dac275a059d6c3f187a2da7a Author: Linus Torvalds Date: Wed Jan 31 13:49:21 2024 -0500 tracefs: Avoid using the ei->dentry pointer unnecessarily The eventfs_find_events() code tries to walk up the tree to find the event directory that a dentry belongs to, in order to then find the eventfs inode that is associated with that event directory. However, it uses an odd combination of walking the dentry parent, looking up the eventfs inode associated with that, and then looking up the dentry from there. Repeat. But the code shouldn't have back-pointers to dentries in the first place, and it should just walk the dentry parenthood chain directly. Similarly, 'set_top_events_ownership()' looks up the dentry from the eventfs inode, but the only reason it wants a dentry is to look up the superblock in order to look up the root dentry. But it already has the real filesystem inode, which has that same superblock pointer. So just pass in the superblock pointer using the information that's already there, instead of looking up extraneous data that is irrelevant. Link: https://lore.kernel.org/linux-trace-kernel/202401291043.e62e89dc-oliver.sang@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240131185512.638645365@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Cc: Greg Kroah-Hartman Fixes: c1504e510238 ("eventfs: Implement eventfs dir creation functions") Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit 4fa4b010b83fb2f837b5ef79e38072a79e96e4f1 Author: Linus Torvalds Date: Wed Jan 31 13:49:20 2024 -0500 eventfs: Initialize the tracefs inode properly The tracefs-specific fields in the inode were not initialized before the inode was exposed to others through the dentry with 'd_instantiate()'. Move the field initializations up to before the d_instantiate. Link: https://lore.kernel.org/linux-trace-kernel/20240131185512.478449628@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Cc: Greg Kroah-Hartman Fixes: 5790b1fb3d672 ("eventfs: Remove eventfs_file and just use eventfs_inode") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202401291043.e62e89dc-oliver.sang@intel.com Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit d81786f53aec14fd4d56263145a0635afbc64617 Author: Steven Rostedt (Google) Date: Wed Jan 31 13:49:19 2024 -0500 tracefs: Zero out the tracefs_inode when allocating it eventfs uses the tracefs_inode and assumes that it's already initialized to zero. That is, it doesn't set fields to zero (like ti->private) after getting its tracefs_inode. This causes bugs due to stale values. Just initialize the entire structure to zero on allocation so there isn't any more surprises. This is a partial fix to access to ti->private. The assignment still needs to be made before the dentry is instantiated. Link: https://lore.kernel.org/linux-trace-kernel/20240131185512.315825944@goodmis.org Cc: stable@vger.kernel.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Cc: Greg Kroah-Hartman Fixes: 5790b1fb3d672 ("eventfs: Remove eventfs_file and just use eventfs_inode") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202401291043.e62e89dc-oliver.sang@intel.com Suggested-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit 66bbea9ed6446b8471d365a22734dc00556c4785 Author: Vincent Donnefort Date: Wed Jan 31 14:09:55 2024 +0000 ring-buffer: Clean ring_buffer_poll_wait() error return The return type for ring_buffer_poll_wait() is __poll_t. This is behind the scenes an unsigned where we can set event bits. In case of a non-allocated CPU, we do return instead -EINVAL (0xffffffea). Lucky us, this ends up setting few error bits (EPOLLERR | EPOLLHUP | EPOLLNVAL), so user-space at least is aware something went wrong. Nonetheless, this is an incorrect code. Replace that -EINVAL with a proper EPOLLERR to clean that output. As this doesn't change the behaviour, there's no need to treat this change as a bug fix. Link: https://lore.kernel.org/linux-trace-kernel/20240131140955.3322792-1-vdonnefort@google.com Cc: stable@vger.kernel.org Fixes: 6721cb6002262 ("ring-buffer: Do not poll non allocated cpu buffers") Signed-off-by: Vincent Donnefort Signed-off-by: Steven Rostedt (Google) commit 2b9c3eb32a699acdd4784d6b93743271b4970899 Author: Javier Carrasco Date: Sat Oct 14 12:20:15 2023 +0200 Input: bcm5974 - check endpoint type before starting traffic syzbot has found a type mismatch between a USB pipe and the transfer endpoint, which is triggered by the bcm5974 driver[1]. This driver expects the device to provide input interrupt endpoints and if that is not the case, the driver registration should terminate. Repros are available to reproduce this issue with a certain setup for the dummy_hcd, leading to an interrupt/bulk mismatch which is caught in the USB core after calling usb_submit_urb() with the following message: "BOGUS urb xfer, pipe 1 != type 3" Some other device drivers (like the appletouch driver bcm5974 is mainly based on) provide some checking mechanism to make sure that an IN interrupt endpoint is available. In this particular case the endpoint addresses are provided by a config table, so the checking can be targeted to the provided endpoints. Add some basic checking to guarantee that the endpoints available match the expected type for both the trackpad and button endpoints. This issue was only found for the trackpad endpoint, but the checking has been added to the button endpoint as well for the same reasons. Given that there was never a check for the endpoint type, this bug has been there since the first implementation of the driver (f89bd95c5c94). [1] https://syzkaller.appspot.com/bug?extid=348331f63b034f89b622 Fixes: f89bd95c5c94 ("Input: bcm5974 - add driver for Macbook Air and Pro Penryn touchpads") Signed-off-by: Javier Carrasco Reported-and-tested-by: syzbot+348331f63b034f89b622@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20231007-topic-bcm5974_bulk-v3-1-d0f38b9d2935@gmail.com Signed-off-by: Dmitry Torokhov commit 6764c317b6bb91bd806ef79adf6d9c0e428b191e Merge: 1bbb19b6eb1b8 f4469f3858352 Author: Linus Torvalds Date: Wed Jan 31 10:12:03 2024 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Six small fixes. Five are obvious and in drivers. The last one is a core fix to remove the host lock acquisition and release, caused by a dynamic check of host_busy, in the error handling loop which has been reported to cause lockups" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: storvsc: Fix ring buffer size calculation scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler scsi: MAINTAINERS: Update ibmvscsi_tgt maintainer scsi: initio: Remove redundant variable 'rb' scsi: virtio_scsi: Remove duplicate check if queue is broken scsi: isci: Fix an error code problem in isci_io_request_build() commit fdd0ae72b34e56eb5e896d067c49a78ecb451032 Author: Arnaldo Carvalho de Melo Date: Wed Jan 31 11:24:40 2024 -0300 perf tools headers: update the asm-generic/unaligned.h copy with the kernel sources To pick up the changes in: 1ab33c03145d0f6c ("asm-generic: make sparse happy with odd-sized put_unaligned_*()") Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/asm-generic/unaligned.h include/asm-generic/unaligned.h Cc: Adrian Hunter Cc: Dmitry Torokhov Cc: Ian Rogers Cc: Jiri Olsa Cc: Linus Torvalds Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/Zbp9I7rmFj1Owhug@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c9ec85153fea6873c52ed4f5055c87263f1b54f9 Author: Matthias May Date: Tue Jan 30 10:12:18 2024 +0000 selftests: net: add missing config for GENEVE l2_tos_ttl_inherit.sh verifies the inheritance of tos and ttl for GRETAP, VXLAN and GENEVE. Before testing it checks if the required module is available and if not skips the tests accordingly. Currently only GRETAP and VXLAN are tested because the GENEVE module is missing. Fixes: b690842d12fd ("selftests/net: test l2 tunnel TOS/TTL inheriting") Signed-off-by: Matthias May Link: https://lore.kernel.org/r/20240130101157.196006-1-matthias.may@westermo.com Signed-off-by: Jakub Kicinski commit f3f8f050316893fe2da523458ff7f5f6d61fb1a6 Author: Breno Leitao Date: Tue Jan 30 02:42:43 2024 -0800 wifi: fill in MODULE_DESCRIPTION()s for mt76 drivers W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the MediaTek mt76 drivers. Here is a sorted list of descriptions. It might make the reviewing process easier. MODULE_DESCRIPTION("MediaTek MT7603E and MT76x8 wireless driver"); MODULE_DESCRIPTION("MediaTek MT7615E and MT7663E wireless driver"); MODULE_DESCRIPTION("MediaTek MT7615E MMIO helpers"); MODULE_DESCRIPTION("MediaTek MT7663 SDIO/USB helpers"); MODULE_DESCRIPTION("MediaTek MT7663S (SDIO) wireless driver"); MODULE_DESCRIPTION("MediaTek MT7663U (USB) wireless driver"); MODULE_DESCRIPTION("MediaTek MT76x02 helpers"); MODULE_DESCRIPTION("MediaTek MT76x02 MCU helpers"); MODULE_DESCRIPTION("MediaTek MT76x0E (PCIe) wireless driver"); MODULE_DESCRIPTION("MediaTek MT76x0U (USB) wireless driver"); MODULE_DESCRIPTION("MediaTek MT76x2 EEPROM helpers"); MODULE_DESCRIPTION("MediaTek MT76x2E (PCIe) wireless driver"); MODULE_DESCRIPTION("MediaTek MT76x2U (USB) wireless driver"); MODULE_DESCRIPTION("MediaTek MT76x connac layer helpers"); MODULE_DESCRIPTION("MediaTek MT76x EEPROM helpers"); MODULE_DESCRIPTION("MediaTek MT76x helpers"); MODULE_DESCRIPTION("MediaTek MT76x SDIO helpers"); MODULE_DESCRIPTION("MediaTek MT76x USB helpers"); MODULE_DESCRIPTION("MediaTek MT7915E MMIO helpers"); MODULE_DESCRIPTION("MediaTek MT7921 core driver"); MODULE_DESCRIPTION("MediaTek MT7921E (PCIe) wireless driver"); MODULE_DESCRIPTION("MediaTek MT7921S (SDIO) wireless driver"); MODULE_DESCRIPTION("MediaTek MT7921U (USB) wireless driver"); MODULE_DESCRIPTION("MediaTek MT7925 core driver"); MODULE_DESCRIPTION("MediaTek MT7925E (PCIe) wireless driver"); MODULE_DESCRIPTION("MediaTek MT7925U (USB) wireless driver"); MODULE_DESCRIPTION("MediaTek MT792x core driver"); MODULE_DESCRIPTION("MediaTek MT792x USB helpers"); MODULE_DESCRIPTION("MediaTek MT7996 MMIO helpers"); Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240130104243.3025393-10-leitao@debian.org commit c9013880284d78bac6498d9c0b0b7043cf0f5639 Author: Breno Leitao Date: Tue Jan 30 02:42:42 2024 -0800 wifi: fill in MODULE_DESCRIPTION()s for wilc1000 W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Atmel WILC1000 SPI driver. Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240130104243.3025393-9-leitao@debian.org commit 35337ac472605da9db051827fa2d39e6c02c6d81 Author: Breno Leitao Date: Tue Jan 30 02:42:41 2024 -0800 wifi: fill in MODULE_DESCRIPTION()s for wl18xx W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the TI WiLink 8 wireless driver. Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240130104243.3025393-8-leitao@debian.org commit 714ea2f109d9d561789078fd8a1beeffa9af36d6 Author: Breno Leitao Date: Tue Jan 30 02:42:40 2024 -0800 wifi: fill in MODULE_DESCRIPTION()s for p54spi W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Prism54 SPI wireless driver. Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240130104243.3025393-7-leitao@debian.org commit e063d2a05d713d396044124867704b08e5c30860 Author: Breno Leitao Date: Tue Jan 30 02:42:39 2024 -0800 wifi: fill in MODULE_DESCRIPTION()s for wcn36xx W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Qualcomm Atheros WCN3660/3680 wireless driver. Signed-off-by: Breno Leitao Reviewed-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240130104243.3025393-6-leitao@debian.org commit f8782ea450ad83df5f3dfdb1fca093f46238febe Author: Breno Leitao Date: Tue Jan 30 02:42:38 2024 -0800 wifi: fill in MODULE_DESCRIPTION()s for ar5523 W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Atheros AR5523 wireless driver. Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240130104243.3025393-5-leitao@debian.org commit 257ca10c7317d4a424e48bb95d14ca53a1f1dd6f Author: Breno Leitao Date: Tue Jan 30 02:42:37 2024 -0800 wifi: fill in MODULE_DESCRIPTION()s for Broadcom WLAN W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Broadcom FullMac WLAN drivers. Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240130104243.3025393-4-leitao@debian.org commit 2f2b503ea770cf817044851a583e8880d1de4ae2 Author: Breno Leitao Date: Tue Jan 30 02:42:36 2024 -0800 wifi: fill in MODULE_DESCRIPTION()s for wl1251 and wl12xx W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the TI wireless drivers wl12xx and wl1251. Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240130104243.3025393-3-leitao@debian.org commit 5b778e1c2e9760ffe99482de26e70cd74683ba5c Author: Breno Leitao Date: Tue Jan 30 02:42:35 2024 -0800 wifi: fill in MODULE_DESCRIPTION()s for wlcore W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the TI WLAN wlcore drivers. Signed-off-by: Breno Leitao Signed-off-by: Kalle Valo Link: https://msgid.link/20240130104243.3025393-2-leitao@debian.org commit 6231c9e1a9f35b535c66709aa8a6eda40dbc4132 Author: Prasad Pandit Date: Wed Jan 3 13:23:43 2024 +0530 KVM: x86: make KVM_REQ_NMI request iff NMI pending for vcpu kvm_vcpu_ioctl_x86_set_vcpu_events() routine makes 'KVM_REQ_NMI' request for a vcpu even when its 'events->nmi.pending' is zero. Ex: qemu_thread_start kvm_vcpu_thread_fn qemu_wait_io_event qemu_wait_io_event_common process_queued_cpu_work do_kvm_cpu_synchronize_post_init/_reset kvm_arch_put_registers kvm_put_vcpu_events (cpu, level=[2|3]) This leads vCPU threads in QEMU to constantly acquire & release the global mutex lock, delaying the guest boot due to lock contention. Add check to make KVM_REQ_NMI request only if vcpu has NMI pending. Fixes: bdedff263132 ("KVM: x86: Route pending NMIs from userspace through process_nmi()") Cc: stable@vger.kernel.org Signed-off-by: Prasad Pandit Link: https://lore.kernel.org/r/20240103075343.549293-1-ppandit@redhat.com Signed-off-by: Sean Christopherson commit 9189526c46f2ad14df25dbdc30443f79d03dc7bd Author: Andi Shyti Date: Wed Jan 24 23:50:31 2024 +0100 MAINTAINERS: Update i2c host drivers repository The i2c host patches are now set to be merged into the following repository: git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git Cc: Wolfram Sang Acked-by: Wolfram Sang Signed-off-by: Andi Shyti commit 925bd5e08106bd5bfbd1cb8e124c89a0b4003569 Author: Lorenzo Pieralisi Date: Mon Jan 29 17:59:33 2024 +0100 MAINTAINERS: Add Manivannan Sadhasivam as PCI Endpoint maintainer The PCI endpoint subsystem is evolving at a rate I cannot keep up with, therefore I am standing down as a maintainer handing over to Manivannan (currently reviewer for this code) and Krzysztof who are doing an excellent job on the matter - they don't need my help any longer. Link: https://lore.kernel.org/r/20240129165933.33428-1-lpieralisi@kernel.org Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Acked-by: Manivannan Sadhasivam Cc: Krzysztof Wilczyński commit 1e560864159d002b453da42bd2c13a1805515a20 Author: Johan Hovold Date: Tue Jan 30 11:02:43 2024 +0100 PCI/ASPM: Fix deadlock when enabling ASPM A last minute revert in 6.7-final introduced a potential deadlock when enabling ASPM during probe of Qualcomm PCIe controllers as reported by lockdep: ============================================ WARNING: possible recursive locking detected 6.7.0 #40 Not tainted -------------------------------------------- kworker/u16:5/90 is trying to acquire lock: ffffacfa78ced000 (pci_bus_sem){++++}-{3:3}, at: pcie_aspm_pm_state_change+0x58/0xdc but task is already holding lock: ffffacfa78ced000 (pci_bus_sem){++++}-{3:3}, at: pci_walk_bus+0x34/0xbc other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(pci_bus_sem); lock(pci_bus_sem); *** DEADLOCK *** Call trace: print_deadlock_bug+0x25c/0x348 __lock_acquire+0x10a4/0x2064 lock_acquire+0x1e8/0x318 down_read+0x60/0x184 pcie_aspm_pm_state_change+0x58/0xdc pci_set_full_power_state+0xa8/0x114 pci_set_power_state+0xc4/0x120 qcom_pcie_enable_aspm+0x1c/0x3c [pcie_qcom] pci_walk_bus+0x64/0xbc qcom_pcie_host_post_init_2_7_0+0x28/0x34 [pcie_qcom] The deadlock can easily be reproduced on machines like the Lenovo ThinkPad X13s by adding a delay to increase the race window during asynchronous probe where another thread can take a write lock. Add a new pci_set_power_state_locked() and associated helper functions that can be called with the PCI bus semaphore held to avoid taking the read lock twice. Link: https://lore.kernel.org/r/ZZu0qx2cmn7IwTyQ@hovoldconsulting.com Link: https://lore.kernel.org/r/20240130100243.11011-1-johan+linaro@kernel.org Fixes: f93e71aea6c6 ("Revert "PCI/ASPM: Remove pcie_aspm_pm_state_change()"") Signed-off-by: Johan Hovold Signed-off-by: Bjorn Helgaas Cc: # 6.7 commit bfef491df67022c56aab3b831044f8d259f9441f Author: Masahiro Yamada Date: Fri Jan 26 22:30:10 2024 +0900 kconfig: initialize sym->curr.tri to 'no' for all symbol types again Geert Uytterhoeven reported that commit 4e244c10eab3 ("kconfig: remove unneeded symbol_empty variable") changed the default value of CONFIG_LOG_CPU_MAX_BUF_SHIFT from 12 to 0. As it turned out, this is an undefined behavior because sym_calc_value() stopped setting the sym->curr.tri field for 'int', 'hex', and 'string' symbols. This commit restores the original behavior, where 'int', 'hex', 'string' symbols are interpreted as false if used in boolean contexts. CONFIG_LOG_CPU_MAX_BUF_SHIFT will default to 12 again, irrespective of CONFIG_BASE_SMALL. Presumably, this is not the intended behavior, as already reported [1], but this is another issue that should be addressed by a separate patch. [1]: https://lore.kernel.org/all/f6856be8-54b7-0fa0-1d17-39632bf29ada@oracle.com/ Fixes: 4e244c10eab3 ("kconfig: remove unneeded symbol_empty variable") Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/all/CAMuHMdWm6u1wX7efZQf=2XUAHascps76YQac6rdnQGhc8nop_Q@mail.gmail.com/ Tested-by: Geert Uytterhoeven Signed-off-by: Masahiro Yamada commit 1c1914d6e8c6edbf5b45047419ff51abdb1dce96 Author: T.J. Mercier Date: Wed Jan 17 18:11:40 2024 +0000 dma-buf: heaps: Don't track CMA dma-buf pages under RssFile DMA buffers allocated from the CMA dma-buf heap get counted under RssFile for processes that map them and trigger page faults. In addition to the incorrect accounting reported to userspace, reclaim behavior was influenced by the MM_FILEPAGES counter until linux 6.8, but this memory is not reclaimable. [1] Change the CMA dma-buf heap to set VM_PFNMAP on the VMA so MM does not poke at the memory managed by this dma-buf heap, and use vmf_insert_pfn to correct the RSS accounting. The system dma-buf heap does not suffer from this issue since remap_pfn_range is used during the mmap of the buffer, which also sets VM_PFNMAP on the VMA. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/mm/vmscan.c?id=fb46e22a9e3863e08aef8815df9f17d0f4b9aede Fixes: b61614ec318a ("dma-buf: heaps: Add CMA heap to dmabuf heaps") Signed-off-by: T.J. Mercier Acked-by: Christian König Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20240117181141.286383-1-tjmercier@google.com commit 358de8b4f201bc05712484b15f0109b1ae3516a8 Author: Jose Ignacio Tornos Martinez Date: Mon Jan 29 10:28:19 2024 +0100 kbuild: rpm-pkg: simplify installkernel %post The new installkernel application that is now included in systemd-udev package allows installation although destination files are already present in the boot directory of the kernel package, but is failing with the implemented workaround for the old installkernel application from grubby package. For the new installkernel application, as Davide says: <> But we need to keep the old behavior as well, because the old installkernel application from grubby package, does not allow this simplification and we need to be backward compatible to avoid issues with the different packages. Mimic Fedora shipping process and store vmlinuz, config amd System.map in the module directory instead of the boot directory. In this way, we will avoid the commented problem for all the cases, because the new destination files are not going to exist in the boot directory of the kernel package. Replace installkernel tool with kernel-install tool, because the latter is more complete. Besides, after installkernel tool execution, check to complete if the correct package files vmlinuz, System.map and config files are present in /boot directory, and if necessary, copy manually for install operation. In this way, take into account if files were not previously copied from /usr/lib/kernel/install.d/* scripts and if the suitable files for the requested package are present (it could be others if the rpm files were replace with a new pacakge with the same release and a different build). Tested with Fedora 38, Fedora 39, RHEL 9, Oracle Linux 9.3, openSUSE Tumbleweed and openMandrive ROME, using dnf/zypper and rpm tools. cc: stable@vger.kernel.org Co-Developed-by: Davide Cavalca Signed-off-by: Jose Ignacio Tornos Martinez Signed-off-by: Masahiro Yamada commit 82175d1f9430d5a026e2231782d13da0bf57155c Author: Dmitry Goncharov Date: Sun Jan 28 10:10:39 2024 -0500 kbuild: Replace tabs with spaces when followed by conditionals This is needed for the future (post make-4.4.1) versions of gnu make. Starting from https://git.savannah.gnu.org/cgit/make.git/commit/?id=07fcee35f058a876447c8a021f9eb1943f902534 gnu make won't allow conditionals to follow recipe prefix. For example there is a tab followed by ifeq on line 324 in the root Makefile. With the new make this conditional causes the following $ make cpu.o /home/dgoncharov/src/linux-kbuild/Makefile:2063: *** missing 'endif'. Stop. make: *** [Makefile:240: __sub-make] Error 2 This patch replaces tabs followed by conditionals with 8 spaces. See https://savannah.gnu.org/bugs/?64185 and https://savannah.gnu.org/bugs/?64259 for details. Signed-off-by: Dmitry Goncharov Reported-by: Martin Dorey Reviewed-by: Miguel Ojeda Signed-off-by: Masahiro Yamada commit cda5f94e88b45c9209599bac15fc44add5a59f60 Author: Masahiro Yamada Date: Sat Jan 27 22:28:11 2024 +0900 modpost: avoid using the alias attribute Aiden Leong reported modpost fails to build on macOS since commit 16a473f60edc ("modpost: inform compilers that fatal() never returns"): scripts/mod/modpost.c:93:21: error: aliases are not supported on darwin Nathan's research indicates that Darwin seems to support weak aliases at least [1]. Although the situation might be improved in future Clang versions, we can achieve a similar outcome without relying on it. This commit makes fatal() a macro of error() + exit(1) in modpost.h, as compilers recognize that exit() never returns. [1]: https://github.com/llvm/llvm-project/issues/71001 Fixes: 16a473f60edc ("modpost: inform compilers that fatal() never returns") Reported-by: Aiden Leong Closes: https://lore.kernel.org/all/d9ac2960-6644-4a87-b5e4-4bfb6e0364a8@aibsd.com/ Signed-off-by: Masahiro Yamada commit 89876175c8c83c35cf0cc8e21b7460dfed7b118a Author: Masahiro Yamada Date: Sat Jan 20 17:32:55 2024 +0900 kbuild: fix W= flags in the help message W=c and W=e are supported. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 8f7e917907385e112a845d668ae2832f41e64bf5 Author: Nuno Sa Date: Tue Jan 23 16:14:22 2024 +0100 of: property: fix typo in io-channels The property is io-channels and not io-channel. This was effectively preventing the devlink creation. Fixes: 8e12257dead7 ("of: property: Add device link support for iommus, mboxes and io-channels") Cc: stable@vger.kernel.org Signed-off-by: Nuno Sa Reviewed-by: Saravana Kannan Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20240123-iio-backend-v7-1-1bff236b8693@analog.com Signed-off-by: Rob Herring commit adf0c363ad2c7ceccb2831a295cd8fc50378269e Author: Rob Herring Date: Wed Jan 24 13:07:14 2024 -0600 dt-bindings: tpm: Drop type from "resets" "resets" is a standard property which already has a type. Users only need to define how many clocks and what each clock is if more than 1 clock. Reviewed-by: Lukas Wunner Link: https://lore.kernel.org/r/20240124190714.1553772-1-robh@kernel.org Signed-off-by: Rob Herring commit 4c654ec0ba0f9a04905ebad538689524a8779154 Author: Rob Herring Date: Mon Jan 22 14:49:58 2024 -0600 dt-bindings: display: nxp,tda998x: Fix 'audio-ports' constraints The constraints for 'audio-ports' don't match the description. There can be 1 or 2 DAI entries and each entry is exactly 2 values. Also, the values' sizes are 32-bits, not 8-bits. Move the size constraints to the outer dimension (number of DAIs) and add constraints on inner array values. Link: https://lore.kernel.org/r/20240122204959.1665970-1-robh@kernel.org Signed-off-by: Rob Herring commit 2d3b3ab8d0d54e6c20260c8c1a73901a7a58a9cd Author: Radhey Shyam Pandey Date: Fri Jan 19 17:06:21 2024 +0530 dt-bindings: xilinx: replace Piyush Mehta maintainership As Piyush is leaving AMD, he handed over ahci-ceva, ZynqMP Mode Pin GPIO controller, Zynq UltraScale+ MPSoC and Versal reset, Xilinx SuperSpeed DWC3 USB SoC controller, Microchip USB5744 4-port Hub Controller and Xilinx udc controller maintainership duties to Mubin and Radhey. Signed-off-by: Radhey Shyam Pandey Acked-by: Mubin Sayyed Acked-by: Michal Simek Acked-by: Krzysztof Kozlowski Acked-by: Piyush Mehta Acked-by: Bartosz Golaszewski Acked-by: Niklas Cassel Link: https://lore.kernel.org/r/1705664181-722937-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Rob Herring commit 2468e8922d2f6da81a6192b73023eff67e3fefdd Author: José Relvas Date: Wed Jan 31 11:34:09 2024 +0000 ALSA: hda/realtek: Apply headset jack quirk for non-bass alc287 thinkpads There currently exists two thinkpad headset jack fixups: ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK ALC285_FIXUP_THINKPAD_HEADSET_JACK The latter is applied to alc285 and alc287 thinkpads which contain bass speakers. However, the former was only being applied to alc285 thinkpads, leaving non-bass alc287 thinkpads with no headset button controls. This patch fixes that by adding ALC285_FIXUP_THINKPAD_NO_BASS_SPK_HEADSET_JACK to the alc287 chains, allowing the detection of headset buttons. Signed-off-by: José Relvas Cc: Link: https://lore.kernel.org/r/20240131113407.34698-3-josemonsantorelvas@gmail.com Signed-off-by: Takashi Iwai commit 913b9d443a0180cf0de3548f1ab3149378998486 Author: Helge Deller Date: Wed Jan 31 13:37:25 2024 +0100 parisc: BTLB: Fix crash when setting up BTLB at CPU bringup When using hotplug and bringing up a 32-bit CPU, ask the firmware about the BTLB information to set up the static (block) TLB entries. For that write access to the static btlb_info struct is needed, but since it is marked __ro_after_init the kernel segfaults with missing write permissions. Fix the crash by dropping the __ro_after_init annotation. Fixes: e5ef93d02d6c ("parisc: BTLB: Initialize BTLB tables at CPU startup") Signed-off-by: Helge Deller Cc: # v6.6+ commit 51af8f255bdaca6d501afc0d085b808f67b44d91 Author: Lennert Buytenhek Date: Tue Jan 30 15:21:51 2024 +0200 ahci: Extend ASM1061 43-bit DMA address quirk to other ASM106x parts ASMedia have confirmed that all ASM106x parts currently listed in ahci_pci_tbl[] suffer from the 43-bit DMA address limitation that we ran into on the ASM1061, and therefore, we need to apply the quirk added by commit 20730e9b2778 ("ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers") to the other supported ASM106x parts as well. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-ide/ZbopwKZJAKQRA4Xv@x1-carbon/ Signed-off-by: Lennert Buytenhek [cassel: add link to ASMedia confirmation email] Signed-off-by: Niklas Cassel commit 764ad6b02777d77dca3659ca490f0898aa593670 Author: Benjamin Tissoires Date: Wed Jan 24 12:26:59 2024 +0100 HID: bpf: use __bpf_kfunc instead of noinline Follow the docs at Documentation/bpf/kfuncs.rst: - declare the function with `__bpf_kfunc` - disables missing prototype warnings, which allows to remove them from include/linux/hid-bpf.h Removing the prototypes is not an issue because we currently have to redeclare them when writing the BPF program. They will eventually be generated by bpftool directly AFAIU. Link: https://lore.kernel.org/r/20240124-b4-hid-bpf-fixes-v2-3-052520b1e5e6@kernel.org Signed-off-by: Benjamin Tissoires commit 89be8aa5b0ecb3b729c7bcff64bb2af7921fec63 Author: Benjamin Tissoires Date: Wed Jan 24 12:26:58 2024 +0100 HID: bpf: actually free hdev memory after attaching a HID-BPF program Turns out that I got my reference counts wrong and each successful bus_find_device() actually calls get_device(), and we need to manually call put_device(). Ensure each bus_find_device() gets a matching put_device() when releasing the bpf programs and fix all the error paths. Cc: Fixes: f5c27da4e3c8 ("HID: initial BPF implementation") Link: https://lore.kernel.org/r/20240124-b4-hid-bpf-fixes-v2-2-052520b1e5e6@kernel.org Signed-off-by: Benjamin Tissoires commit 7cdd2108903a4e369eb37579830afc12a6877ec2 Author: Benjamin Tissoires Date: Wed Jan 24 12:26:57 2024 +0100 HID: bpf: remove double fdget() When the kfunc hid_bpf_attach_prog() is called, we called twice fdget(): one for fetching the type of the bpf program, and one for actually attaching the program to the device. The problem is that between those two calls, we have no guarantees that the prog_fd is still the same file descriptor for the given program. Solve this by calling bpf_prog_get() earlier, and use this to fetch the program type. Reported-by: Dan Carpenter Link: https://lore.kernel.org/bpf/CAO-hwJJ8vh8JD3-P43L-_CLNmPx0hWj44aom0O838vfP4=_1CA@mail.gmail.com/T/#t Cc: Fixes: f5c27da4e3c8 ("HID: initial BPF implementation") Link: https://lore.kernel.org/r/20240124-b4-hid-bpf-fixes-v2-1-052520b1e5e6@kernel.org Signed-off-by: Benjamin Tissoires commit b4a1f4eaf1d798066affc6ad040f76eb1a16e1c9 Author: Puliang Lu Date: Wed Jan 31 17:12:24 2024 +0800 USB: serial: option: add Fibocom FM101-GL variant Update the USB serial option driver support for the Fibocom FM101-GL LTE modules as there are actually several different variants. - VID:PID 2cb7:01a3, FM101-GL are laptop M.2 cards (with MBIM interfaces for /Linux/Chrome OS) 0x01a3:mbim,gnss Here are the outputs of usb-devices: T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 3 Spd=5000 MxCh= 0 D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1 P: Vendor=2cb7 ProdID=01a3 Rev=05.04 S: Manufacturer=Fibocom Wireless Inc. S: Product=Fibocom FM101-GL Module S: SerialNumber=5ccd5cd4 C: #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=896mA I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim E: Ad=81(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim E: Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option E: Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms Signed-off-by: Puliang Lu Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit be551ee1574280ef8afbf7c271212ac3e38933ef Author: Yishai Hadas Date: Sun Jan 28 11:29:13 2024 +0200 RDMA/mlx5: Relax DEVX access upon modify commands Relax DEVX access upon modify commands to be UVERBS_ACCESS_READ. The kernel doesn't need to protect what firmware protects, or what causes no damage to anyone but the user. As firmware needs to protect itself from parallel access to the same object, don't block parallel modify/query commands on the same object in the kernel side. This change will allow user space application to run parallel updates to different entries in the same bulk object. Tested-by: Tamar Mashiah Signed-off-by: Yishai Hadas Reviewed-by: Michael Guralnik Link: https://lore.kernel.org/r/7407d5ed35dc427c1097699e12b49c01e1073406.1706433934.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 43fdbd140238d44e7e847232719fef7d20f9d326 Author: Mark Zhang Date: Sun Jan 28 11:29:12 2024 +0200 IB/mlx5: Don't expose debugfs entries for RRoCE general parameters if not supported debugfs entries for RRoCE general CC parameters must be exposed only when they are supported, otherwise when accessing them there may be a syndrome error in kernel log, for example: $ cat /sys/kernel/debug/mlx5/0000:08:00.1/cc_params/rtt_resp_dscp cat: '/sys/kernel/debug/mlx5/0000:08:00.1/cc_params/rtt_resp_dscp': Invalid argument $ dmesg mlx5_core 0000:08:00.1: mlx5_cmd_out_err:805:(pid 1253): QUERY_CONG_PARAMS(0x824) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x325a82), err(-22) Fixes: 66fb1d5df6ac ("IB/mlx5: Extend debug control for CC parameters") Reviewed-by: Edward Srouji Signed-off-by: Mark Zhang Link: https://lore.kernel.org/r/e7ade70bad52b7468bdb1de4d41d5fad70c8b71c.1706433934.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 4d5e86a56615cc387d21c629f9af8fb0e958d350 Author: Leon Romanovsky Date: Sun Jan 28 11:29:11 2024 +0200 RDMA/mlx5: Fix fortify source warning while accessing Eth segment ------------[ cut here ]------------ memcpy: detected field-spanning write (size 56) of single field "eseg->inline_hdr.start" at /var/lib/dkms/mlnx-ofed-kernel/5.8/build/drivers/infiniband/hw/mlx5/wr.c:131 (size 2) WARNING: CPU: 0 PID: 293779 at /var/lib/dkms/mlnx-ofed-kernel/5.8/build/drivers/infiniband/hw/mlx5/wr.c:131 mlx5_ib_post_send+0x191b/0x1a60 [mlx5_ib] Modules linked in: 8021q garp mrp stp llc rdma_ucm(OE) rdma_cm(OE) iw_cm(OE) ib_ipoib(OE) ib_cm(OE) ib_umad(OE) mlx5_ib(OE) ib_uverbs(OE) ib_core(OE) mlx5_core(OE) pci_hyperv_intf mlxdevm(OE) mlx_compat(OE) tls mlxfw(OE) psample nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables libcrc32c nfnetlink mst_pciconf(OE) knem(OE) vfio_pci vfio_pci_core vfio_iommu_type1 vfio iommufd irqbypass cuse nfsv3 nfs fscache netfs xfrm_user xfrm_algo ipmi_devintf ipmi_msghandler binfmt_misc crct10dif_pclmul crc32_pclmul polyval_clmulni polyval_generic ghash_clmulni_intel sha512_ssse3 snd_pcsp aesni_intel crypto_simd cryptd snd_pcm snd_timer joydev snd soundcore input_leds serio_raw evbug nfsd auth_rpcgss nfs_acl lockd grace sch_fq_codel sunrpc drm efi_pstore ip_tables x_tables autofs4 psmouse virtio_net net_failover failover floppy [last unloaded: mlx_compat(OE)] CPU: 0 PID: 293779 Comm: ssh Tainted: G OE 6.2.0-32-generic #32~22.04.1-Ubuntu Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:mlx5_ib_post_send+0x191b/0x1a60 [mlx5_ib] Code: 0c 01 00 a8 01 75 25 48 8b 75 a0 b9 02 00 00 00 48 c7 c2 10 5b fd c0 48 c7 c7 80 5b fd c0 c6 05 57 0c 03 00 01 e8 95 4d 93 da <0f> 0b 44 8b 4d b0 4c 8b 45 c8 48 8b 4d c0 e9 49 fb ff ff 41 0f b7 RSP: 0018:ffffb5b48478b570 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffb5b48478b628 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffffb5b48478b5e8 R13: ffff963a3c609b5e R14: ffff9639c3fbd800 R15: ffffb5b480475a80 FS: 00007fc03b444c80(0000) GS:ffff963a3dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000556f46bdf000 CR3: 0000000006ac6003 CR4: 00000000003706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? show_regs+0x72/0x90 ? mlx5_ib_post_send+0x191b/0x1a60 [mlx5_ib] ? __warn+0x8d/0x160 ? mlx5_ib_post_send+0x191b/0x1a60 [mlx5_ib] ? report_bug+0x1bb/0x1d0 ? handle_bug+0x46/0x90 ? exc_invalid_op+0x19/0x80 ? asm_exc_invalid_op+0x1b/0x20 ? mlx5_ib_post_send+0x191b/0x1a60 [mlx5_ib] mlx5_ib_post_send_nodrain+0xb/0x20 [mlx5_ib] ipoib_send+0x2ec/0x770 [ib_ipoib] ipoib_start_xmit+0x5a0/0x770 [ib_ipoib] dev_hard_start_xmit+0x8e/0x1e0 ? validate_xmit_skb_list+0x4d/0x80 sch_direct_xmit+0x116/0x3a0 __dev_xmit_skb+0x1fd/0x580 __dev_queue_xmit+0x284/0x6b0 ? _raw_spin_unlock_irq+0xe/0x50 ? __flush_work.isra.0+0x20d/0x370 ? push_pseudo_header+0x17/0x40 [ib_ipoib] neigh_connected_output+0xcd/0x110 ip_finish_output2+0x179/0x480 ? __smp_call_single_queue+0x61/0xa0 __ip_finish_output+0xc3/0x190 ip_finish_output+0x2e/0xf0 ip_output+0x78/0x110 ? __pfx_ip_finish_output+0x10/0x10 ip_local_out+0x64/0x70 __ip_queue_xmit+0x18a/0x460 ip_queue_xmit+0x15/0x30 __tcp_transmit_skb+0x914/0x9c0 tcp_write_xmit+0x334/0x8d0 tcp_push_one+0x3c/0x60 tcp_sendmsg_locked+0x2e1/0xac0 tcp_sendmsg+0x2d/0x50 inet_sendmsg+0x43/0x90 sock_sendmsg+0x68/0x80 sock_write_iter+0x93/0x100 vfs_write+0x326/0x3c0 ksys_write+0xbd/0xf0 ? do_syscall_64+0x69/0x90 __x64_sys_write+0x19/0x30 do_syscall_64+0x59/0x90 ? do_user_addr_fault+0x1d0/0x640 ? exit_to_user_mode_prepare+0x3b/0xd0 ? irqentry_exit_to_user_mode+0x9/0x20 ? irqentry_exit+0x43/0x50 ? exc_page_fault+0x92/0x1b0 entry_SYSCALL_64_after_hwframe+0x72/0xdc RIP: 0033:0x7fc03ad14a37 Code: 10 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 RSP: 002b:00007ffdf8697fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000008024 RCX: 00007fc03ad14a37 RDX: 0000000000008024 RSI: 0000556f46bd8270 RDI: 0000000000000003 RBP: 0000556f46bb1800 R08: 0000000000007fe3 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 0000556f46bc66b0 R14: 000000000000000a R15: 0000556f46bb2f50 ---[ end trace 0000000000000000 ]--- Link: https://lore.kernel.org/r/8228ad34bd1a25047586270f7b1fb4ddcd046282.1706433934.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 4451e8e8415e4ef48cdc763d66855f8c25fda94c Author: Mario Limonciello Date: Tue Jan 23 12:08:18 2024 -0600 pinctrl: amd: Add IRQF_ONESHOT to the interrupt request On some systems the interrupt is shared between GPIO controller and ACPI SCI. When the interrupt is shared with the ACPI SCI the flags need to be identical. This should fix the GPIO controller failing to work after commit 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI"). ``` [ 0.417335] genirq: Flags mismatch irq 9. 00000088 (pinctrl_amd) vs. 00002080 (acpi) [ 0.420073] amd_gpio: probe of AMDI0030:00 failed with error -16 ``` Cc: Rafael J. Wysocki Reported-by: Christian Heusel Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218407 Fixes: 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI") Link: https://lore.kernel.org/linux-acpi/CAJZ5v0iRqUXeuKmC_+dAJtDBLWQ3x15n4gRH48y7MEaLoXF+UA@mail.gmail.com/T/#mc5506014141b61e472b24e095889535a04458083 Signed-off-by: Mario Limonciello Acked-by: Rafael J. Wysocki Tested-by: Christian Heusel Link: https://lore.kernel.org/r/20240123180818.3994-1-mario.limonciello@amd.com Signed-off-by: Linus Walleij commit e03ee2fe873eb68c1f9ba5112fee70303ebf9dfb Author: Qu Wenruo Date: Sat Jan 20 19:41:28 2024 +1030 btrfs: do not ASSERT() if the newly created subvolume already got read [BUG] There is a syzbot crash, triggered by the ASSERT() during subvolume creation: assertion failed: !anon_dev, in fs/btrfs/disk-io.c:1319 ------------[ cut here ]------------ kernel BUG at fs/btrfs/disk-io.c:1319! invalid opcode: 0000 [#1] PREEMPT SMP KASAN RIP: 0010:btrfs_get_root_ref.part.0+0x9aa/0xa60 btrfs_get_new_fs_root+0xd3/0xf0 create_subvol+0xd02/0x1650 btrfs_mksubvol+0xe95/0x12b0 __btrfs_ioctl_snap_create+0x2f9/0x4f0 btrfs_ioctl_snap_create+0x16b/0x200 btrfs_ioctl+0x35f0/0x5cf0 __x64_sys_ioctl+0x19d/0x210 do_syscall_64+0x3f/0xe0 entry_SYSCALL_64_after_hwframe+0x63/0x6b ---[ end trace 0000000000000000 ]--- [CAUSE] During create_subvol(), after inserting root item for the newly created subvolume, we would trigger btrfs_get_new_fs_root() to get the btrfs_root of that subvolume. The idea here is, we have preallocated an anonymous device number for the subvolume, thus we can assign it to the new subvolume. But there is really nothing preventing things like backref walk to read the new subvolume. If that happens before we call btrfs_get_new_fs_root(), the subvolume would be read out, with a new anonymous device number assigned already. In that case, we would trigger ASSERT(), as we really expect no one to read out that subvolume (which is not yet accessible from the fs). But things like backref walk is still possible to trigger the read on the subvolume. Thus our assumption on the ASSERT() is not correct in the first place. [FIX] Fix it by removing the ASSERT(), and just free the @anon_dev, reset it to 0, and continue. If the subvolume tree is read out by something else, it should have already get a new anon_dev assigned thus we only need to free the preallocated one. Reported-by: Chenyuan Yang Fixes: 2dfb1e43f57d ("btrfs: preallocate anon block device at first phase of snapshot creation") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a8df35619948bd8363d330c20a90c9a7fbff28c0 Author: Boris Burkov Date: Wed Jan 10 17:30:00 2024 -0800 btrfs: forbid deleting live subvol qgroup If a subvolume still exists, forbid deleting its qgroup 0/subvolid. This behavior generally leads to incorrect behavior in squotas and doesn't have a legitimate purpose. Fixes: cecbb533b5fc ("btrfs: record simple quota deltas in delayed refs") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Qu Wenruo Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0c309d66dacddf8ce939b891d9ead4a8e21ad6f0 Author: Boris Burkov Date: Wed Jan 10 17:51:26 2024 -0800 btrfs: forbid creating subvol qgroups Creating a qgroup 0/subvolid leads to various races and it isn't helpful, because you can't specify a subvol id when creating a subvol, so you can't be sure it will be the right one. Any requirements on the automatic subvol can be gratified by using a higher level qgroup and the inheritance parameters of subvol creation. Fixes: cecbb533b5fc ("btrfs: record simple quota deltas in delayed refs") CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Qu Wenruo Signed-off-by: Boris Burkov Reviewed-by: David Sterba Signed-off-by: David Sterba commit f884a9f9e59206a2d41f265e7e403f080d10b493 Author: David Sterba Date: Wed Jan 10 17:48:44 2024 +0100 btrfs: send: return EOPNOTSUPP on unknown flags When some ioctl flags are checked we return EOPNOTSUPP, like for BTRFS_SCRUB_SUPPORTED_FLAGS, BTRFS_SUBVOL_CREATE_ARGS_MASK or fallocate modes. The EINVAL is supposed to be for a supported but invalid values or combination of options. Fix that when checking send flags so it's consistent with the rest. CC: stable@vger.kernel.org # 4.14+ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5rryOLzp3EKq8RTbjMHMHeaJubfpsVLF6H4qJnKCUR1w@mail.gmail.com/ Reviewed-by: Filipe Manana Signed-off-by: David Sterba commit 1bbb19b6eb1b8685ab1c268a401ea64380b8bbcb Merge: 2a6526c4f389b d9281660ff3ff Author: Linus Torvalds Date: Tue Jan 30 21:27:50 2024 -0800 Merge tag 'erofs-for-6.8-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: - fix an infinite loop issue of sub-page compressed data support found with lengthy stress tests on a 64k-page arm64 VM - optimize the temporary buffer allocation for low-memory scenarios, which can reduce 20.21% on average under a heavy multi-app launch benchmark workload - get rid of unnecessary GFP_NOFS * tag 'erofs-for-6.8-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: relaxed temporary buffers allocation on readahead erofs: fix infinite loop due to a race of filling compressed_bvecs erofs: get rid of unneeded GFP_NOFS commit 6af191034c8f2e5b7cf1f0f6a86b0effe9a85879 Merge: 1a89e24f8bfd3 bbc404d20d1b4 Author: Jakub Kicinski Date: Tue Jan 30 18:35:27 2024 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-01-29 (e1000e, ixgbe) This series contains updates to e1000e and ixgbe drivers. Jake corrects values used for maximum frequency adjustment for e1000e. Christophe Jaillet adjusts error handling path so that semaphore is released on ixgbe. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550() e1000e: correct maximum frequency adjustment values ==================== Link: https://lore.kernel.org/r/20240129185240.787397-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 1a89e24f8bfd3e3562d69709c9d9cd185ded869b Author: Parav Pandit Date: Mon Jan 29 21:10:59 2024 +0200 devlink: Fix referring to hw_addr attribute during state validation When port function state change is requested, and when the driver does not support it, it refers to the hw address attribute instead of state attribute. Seems like a copy paste error. Fix it by referring to the port function state attribute. Fixes: c0bea69d1ca7 ("devlink: Validate port function request") Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240129191059.129030-1-parav@nvidia.com Signed-off-by: Jakub Kicinski commit f5c3eb4b7251baba5cd72c9e93920e710ac8194a Author: Linus Lüssing Date: Sat Jan 27 18:50:32 2024 +0100 bridge: mcast: fix disabled snooping after long uptime The original idea of the delay_time check was to not apply multicast snooping too early when an MLD querier appears. And to instead wait at least for MLD reports to arrive before switching from flooding to group based, MLD snooped forwarding, to avoid temporary packet loss. However in a batman-adv mesh network it was noticed that after 248 days of uptime 32bit MIPS based devices would start to signal that they had stopped applying multicast snooping due to missing queriers - even though they were the elected querier and still sending MLD queries themselves. While time_is_before_jiffies() generally is safe against jiffies wrap-arounds, like the code comments in jiffies.h explain, it won't be able to track a difference larger than ULONG_MAX/2. With a 32bit large jiffies and one jiffies tick every 10ms (CONFIG_HZ=100) on these MIPS devices running OpenWrt this would result in a difference larger than ULONG_MAX/2 after 248 (= 2^32/100/60/60/24/2) days and time_is_before_jiffies() would then start to return false instead of true. Leading to multicast snooping not being applied to multicast packets anymore. Fix this issue by using a proper timer_list object which won't have this ULONG_MAX/2 difference limitation. Fixes: b00589af3b04 ("bridge: disable snooping if there is no querier") Signed-off-by: Linus Lüssing Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20240127175033.9640-1-linus.luessing@c0d3.blue Signed-off-by: Jakub Kicinski commit b40f873a7c80dbafbb6f4a7a569f2dcaf969d283 Author: Ido Schimmel Date: Mon Jan 29 14:37:03 2024 +0200 selftests: net: Add missing matchall classifier One of the test cases in the test_bridge_backup_port.sh selftest relies on a matchall classifier to drop unrelated traffic so that the Tx drop counter on the VXLAN device will only be incremented as a result of traffic generated by the test. However, the configuration option for the matchall classifier is missing from the configuration file which might explain the failures we see in the netdev CI [1]. Fix by adding CONFIG_NET_CLS_MATCHALL to the configuration file. [1] # Backup nexthop ID - invalid IDs # ------------------------------- [...] # TEST: Forwarding out of vx0 [ OK ] # TEST: No forwarding using backup nexthop ID [ OK ] # TEST: Tx drop increased [FAIL] # TEST: IPv6 address family nexthop as backup nexthop [ OK ] # TEST: No forwarding out of swp1 [ OK ] # TEST: Forwarding out of vx0 [ OK ] # TEST: No forwarding using backup nexthop ID [ OK ] # TEST: Tx drop increased [FAIL] [...] Fixes: b408453053fb ("selftests: net: Add bridge backup port and backup nexthop ID test") Signed-off-by: Ido Schimmel Acked-by: Nikolay Aleksandrov Link: https://lore.kernel.org/r/20240129123703.1857843-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski commit ac9762a74c7ca7cbfcb4c65f5871373653a046ac Author: Will Deacon Date: Fri Jan 26 15:24:10 2024 +0000 misc: open-dice: Fix spurious lockdep warning When probing the open-dice driver with PROVE_LOCKING=y, lockdep complains that the mutex in 'drvdata->lock' has a non-static key: | INFO: trying to register non-static key. | The code is fine but needs lockdep annotation, or maybe | you didn't initialize this object before use? | turning off the locking correctness validator. Fix the problem by initialising the mutex memory with mutex_init() instead of __MUTEX_INITIALIZER(). Cc: Arnd Bergmann Cc: David Brazdil Cc: Greg Kroah-Hartman Signed-off-by: Will Deacon Link: https://lore.kernel.org/r/20240126152410.10148-1-will@kernel.org Signed-off-by: Greg Kroah-Hartman commit a4e61de63e34860c36a71d1a364edba16fb6203b Author: Ekansh Gupta Date: Mon Jan 8 17:18:33 2024 +0530 misc: fastrpc: Mark all sessions as invalid in cb_remove In remoteproc shutdown sequence, rpmsg_remove will get called which would depopulate all the child nodes that have been created during rpmsg_probe. This would result in cb_remove call for all the context banks for the remoteproc. In cb_remove function, session 0 is getting skipped which is not correct as session 0 will never become available again. Add changes to mark session 0 also as invalid. Fixes: f6f9279f2bf0 ("misc: fastrpc: Add Qualcomm fastrpc basic driver model") Cc: stable Signed-off-by: Ekansh Gupta Link: https://lore.kernel.org/r/20240108114833.20480-1-quic_ekangupt@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 98323e9d70172f1b46d1cadb20d6c54abf62870d Author: Vincent Guittot Date: Wed Jan 17 20:05:45 2024 +0100 topology: Set capacity_freq_ref in all cases If "capacity-dmips-mhz" is not set, raw_capacity is null and we skip the normalization step which includes setting per_cpu capacity_freq_ref. Always register the notifier but skip the capacity normalization if raw_capacity is null. Fixes: 9942cb22ea45 ("sched/topology: Add a new arch_scale_freq_ref() method") Signed-off-by: Vincent Guittot Acked-by: Sudeep Holla Tested-by: Pierre Gondois Tested-by: Mark Brown Tested-by: Paul Barker Reviewed-by: Dietmar Eggemann Tested-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20240117190545.596057-1-vincent.guittot@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2a6526c4f389bb741e511be11721b3d1cbf1034a Merge: d1d873a9bfac4 1a9f2c776d141 Author: Linus Torvalds Date: Tue Jan 30 15:12:58 2024 -0800 Merge tag 'linux_kselftest-kunit-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kunit fixes from Shuah Khan: "NULL vs IS_ERR() bug fixes, documentation update, MAINTAINERS file update to add Rae Moar as a reviewer, and a fix to run test suites only after module initialization completes" * tag 'linux_kselftest-kunit-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: Documentation: KUnit: Update the instructions on how to test static functions kunit: run test suites only after module initialization completes MAINTAINERS: kunit: Add Rae Moar as a reviewer kunit: device: Fix a NULL vs IS_ERR() check in init() kunit: Fix a NULL vs IS_ERR() bug commit d1d873a9bfac44a9a455d2ec47b85ea66f7888b9 Merge: 53ed2ac8fc1de b54761f6e9773 Author: Linus Torvalds Date: Tue Jan 30 15:10:17 2024 -0800 Merge tag 'linux_kselftest-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fixes from Shuah Khan: "Three fixes to livepatch, rseq, and seccomp tests" * tag 'linux_kselftest-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kselftest/seccomp: Report each expectation we assert as a KTAP test kselftest/seccomp: Use kselftest output functions for benchmark selftests/livepatch: fix and refactor new dmesg message code selftests/rseq: Do not skip !allowed_cpus for mm_cid commit 80441f76ee67002437db61f3b317ed80cce085d2 Author: Brenton Simpson Date: Tue Jan 30 13:34:16 2024 -0800 Input: xpad - add Lenovo Legion Go controllers The Lenovo Legion Go is a handheld gaming system, similar to a Steam Deck. It has a gamepad (including rear paddles), 3 gyroscopes, a trackpad, volume buttons, a power button, and 2 LED ring lights. The Legion Go firmware presents these controls as a USB hub with various devices attached. In its default state, the gamepad is presented as an Xbox controller connected to this hub. (By holding a combination of buttons, it can be changed to use the older DirectInput API.) This patch teaches the existing Xbox controller module `xpad` to bind to the controller in the Legion Go, which enables support for the: - directional pad, - analog sticks (including clicks), - X, Y, A, B, - start and select (or menu and capture), - shoulder buttons, and - rumble. The trackpad, touchscreen, volume controls, and power button are already supported via existing kernel modules. Two of the face buttons, the gyroscopes, rear paddles, and LEDs are not. After this patch lands, the Legion Go will be mostly functional in Linux, out-of-the-box. The various components of the USB hub can be synthesized into a single logical controller (including the additional buttons) in userspace with [Handheld Daemon](https://github.com/hhd-dev/hhd), which makes the Go fully functional. Signed-off-by: Brenton Simpson Link: https://lore.kernel.org/r/20240118183546.418064-1-appsforartists@google.com Signed-off-by: Dmitry Torokhov commit 5a287d3d2b9de2b3e747132c615599907ba5c3c1 Author: Ondrej Mosnacek Date: Fri Jan 26 19:45:31 2024 +0100 lsm: fix default return value of the socket_getpeersec_*() hooks For these hooks the true "neutral" value is -EOPNOTSUPP, which is currently what is returned when no LSM provides this hook and what LSMs return when there is no security context set on the socket. Correct the value in and adjust the dispatch functions in security/security.c to avoid issues when the BPF LSM is enabled. Cc: stable@vger.kernel.org Fixes: 98e828a0650f ("security: Refactor declaration of LSM hooks") Signed-off-by: Ondrej Mosnacek [PM: subject line tweak] Signed-off-by: Paul Moore commit 10c02aad111df02088d1a81792a709f6a7eca6cc Author: Sebastian Ene Date: Wed Jan 24 09:10:28 2024 +0000 KVM: arm64: Fix circular locking dependency The rule inside kvm enforces that the vcpu->mutex is taken *inside* kvm->lock. The rule is violated by the pkvm_create_hyp_vm() which acquires the kvm->lock while already holding the vcpu->mutex lock from kvm_vcpu_ioctl(). Avoid the circular locking dependency altogether by protecting the hyp vm handle with the config_lock, much like we already do for other forms of VM-scoped data. Signed-off-by: Sebastian Ene Cc: stable@vger.kernel.org Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240124091027.1477174-2-sebastianene@google.com commit aa0e784dea7c1a026aabff9db1cb5d2bd92b3e92 Author: Yang Li Date: Fri Jan 19 18:06:35 2024 +0800 efi/libstub: Add one kernel-doc comment Add the description of @memory_type to silence the warning: drivers/firmware/efi/libstub/alignedmem.c:27: warning: Function parameter or struct member 'memory_type' not described in 'efi_allocate_pages_aligned' Signed-off-by: Yang Li [ardb: tweak comment] Signed-off-by: Ard Biesheuvel commit 2f77465b05b1270c832b5e2ee27037672ad2a10a Author: Ard Biesheuvel Date: Tue Jan 30 19:01:35 2024 +0100 x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDR The EFI stub's kernel placement logic randomizes the physical placement of the kernel by taking all available memory into account, and picking a region at random, based on a random seed. When KASLR is disabled, this seed is set to 0x0, and this results in the lowest available region of memory to be selected for loading the kernel, even if this is below LOAD_PHYSICAL_ADDR. Some of this memory is typically reserved for the GFP_DMA region, to accommodate masters that can only access the first 16 MiB of system memory. Even if such devices are rare these days, we may still end up with a warning in the kernel log, as reported by Tom: swapper/0: page allocation failure: order:10, mode:0xcc1(GFP_KERNEL|GFP_DMA), nodemask=(null),cpuset=/,mems_allowed=0 Fix this by tweaking the random allocation logic to accept a low bound on the placement, and set it to LOAD_PHYSICAL_ADDR. Fixes: a1b87d54f4e4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot") Reported-by: Tom Englund Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218404 Signed-off-by: Ard Biesheuvel commit c2a449a30fa2b5ddc1dd058e92e047157c9eeb9e Author: Vitaly Kuznetsov Date: Mon Jan 29 09:58:47 2024 +0100 KVM: selftests: Fail tests when open() fails with !ENOENT open_path_or_exit() is used for '/dev/kvm', '/dev/sev', and '/sys/module/%s/parameters/%s' and skipping test when the entry is missing is completely reasonable. Other errors, however, may indicate a real issue which is easy to miss. E.g. when 'hyperv_features' test was entering an infinite loop the output was: ./hyperv_features Testing access to Hyper-V specific MSRs 1..0 # SKIP - /dev/kvm not available (errno: 24) and this can easily get overlooked. Keep ENOENT case 'special' for skipping tests and fail when open() results in any other errno. Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20240129085847.2674082-2-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 8ad4855273488c9bd5320b3fee80f66f0023f326 Author: Vitaly Kuznetsov Date: Mon Jan 29 09:58:46 2024 +0100 KVM: selftests: Avoid infinite loop in hyperv_features when invtsc is missing When X86_FEATURE_INVTSC is missing, guest_test_msrs_access() was supposed to skip testing dependent Hyper-V invariant TSC feature. Unfortunately, 'continue' does not lead to that as stage is not incremented. Moreover, 'vm' allocated with vm_create_with_one_vcpu() is not freed and the test runs out of available file descriptors very quickly. Fixes: bd827bd77537 ("KVM: selftests: Test Hyper-V invariant TSC control") Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20240129085847.2674082-1-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 46fee9e38995af9ae16a8cc7d05031486d44cf35 Author: Sean Christopherson Date: Tue Jan 9 14:03:02 2024 -0800 KVM: selftests: Delete superfluous, unused "stage" variable in AMX test Delete the AMX's tests "stage" counter, as the counter is no longer used, which makes clang unhappy: x86_64/amx_test.c:224:6: error: variable 'stage' set but not used int stage, ret; ^ 1 error generated. Note, "stage" was never really used, it just happened to be dumped out by a (failed) assertion on run->exit_reason, i.e. the AMX test has no concept of stages, the code was likely copy+pasted from a different test. Fixes: c96f57b08012 ("KVM: selftests: Make vCPU exit reason test assertion common") Reviewed-by: Jim Mattson Link: https://lore.kernel.org/r/20240109220302.399296-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 65612e993493014cb95be81ca4f98e08732c46d0 Author: Andrew Jones Date: Wed Dec 6 18:02:47 2023 +0100 KVM: selftests: x86_64: Remove redundant newlines TEST_* functions append their own newline. Remove newlines from TEST_* callsites to avoid extra newlines in output. Signed-off-by: Andrew Jones Link: https://lore.kernel.org/r/20231206170241.82801-12-ajones@ventanamicro.com [sean: keep the newline in the "tsc\n" strncmp()] Signed-off-by: Sean Christopherson commit 53ed2ac8fc1de6658aadae5714627ac99b9dddb0 Author: Linus Torvalds Date: Tue Jan 30 11:34:49 2024 -0800 soc: apple: mailbox: error pointers are negative integers In an entirely unrelated discussion where I pointed out a stupid thinko of mine, Rasmus piped up and noted that that obvious mistake already existed elsewhere in the kernel tree. An "error pointer" is the negative error value encoded as a pointer, making the whole "return error or valid pointer" use-case simple and straightforward. We use it all over the kernel. But the key here is that errors are _negative_ error numbers, not the horrid UNIX user-level model of "-1 and the value of 'errno'". The Apple mailbox driver used the positive error values, and thus just returned invalid normal pointers instead of actual errors. Of course, the reason nobody ever noticed is that the errors presumably never actually happen, so this is fixing a conceptual bug rather than an actual one. Reported-by: Rasmus Villemoes Link: https://lore.kernel.org/all/5c30afe0-f9fb-45d5-9333-dd914a1ea93a@prevas.dk/ Signed-off-by: Linus Torvalds commit 40ef8756fbdd9faec4da5d70352b28f1196132ed Author: Mikulas Patocka Date: Tue Jan 9 16:00:57 2024 +0100 dm writecache: allow allocations larger than 2GiB The function kvmalloc_node limits the allocation size to INT_MAX. This limit will be overflowed if dm-writecache attempts to map a device with 1TiB or larger length. This commit changes kvmalloc_array to vmalloc_array to avoid the limit. The commit also changes vmalloc(array_size()) to vmalloc_array(). Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 9cf11ce06ea52911245578032761e40a6409cf35 Author: Mikulas Patocka Date: Tue Jan 9 15:59:15 2024 +0100 dm stats: limit the number of entries The kvmalloc function fails with a warning if the size is larger than INT_MAX. Linus said that there should be limits that prevent this warning from being hit. This commit adds the limits to the dm-stats subsystem in DM core. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit bd504bcfec41a503b32054da5472904b404341a4 Author: Mikulas Patocka Date: Tue Jan 9 15:57:56 2024 +0100 dm: limit the number of targets and parameter size area The kvmalloc function fails with a warning if the size is larger than INT_MAX. The warning was triggered by a syscall testing robot. In order to avoid the warning, this commit limits the number of targets to 1048576 and the size of the parameter area to 1073741824. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 7104ba0f1958adb250319e68a15eff89ec4fd36d Author: Tony Lindgren Date: Sun Jan 28 14:05:54 2024 +0200 phy: ti: phy-omap-usb2: Fix NULL pointer dereference for SRP If the external phy working together with phy-omap-usb2 does not implement send_srp(), we may still attempt to call it. This can happen on an idle Ethernet gadget triggering a wakeup for example: configfs-gadget.g1 gadget.0: ECM Suspend configfs-gadget.g1 gadget.0: Port suspended. Triggering wakeup ... Unable to handle kernel NULL pointer dereference at virtual address 00000000 when execute ... PC is at 0x0 LR is at musb_gadget_wakeup+0x1d4/0x254 [musb_hdrc] ... musb_gadget_wakeup [musb_hdrc] from usb_gadget_wakeup+0x1c/0x3c [udc_core] usb_gadget_wakeup [udc_core] from eth_start_xmit+0x3b0/0x3d4 [u_ether] eth_start_xmit [u_ether] from dev_hard_start_xmit+0x94/0x24c dev_hard_start_xmit from sch_direct_xmit+0x104/0x2e4 sch_direct_xmit from __dev_queue_xmit+0x334/0xd88 __dev_queue_xmit from arp_solicit+0xf0/0x268 arp_solicit from neigh_probe+0x54/0x7c neigh_probe from __neigh_event_send+0x22c/0x47c __neigh_event_send from neigh_resolve_output+0x14c/0x1c0 neigh_resolve_output from ip_finish_output2+0x1c8/0x628 ip_finish_output2 from ip_send_skb+0x40/0xd8 ip_send_skb from udp_send_skb+0x124/0x340 udp_send_skb from udp_sendmsg+0x780/0x984 udp_sendmsg from __sys_sendto+0xd8/0x158 __sys_sendto from ret_fast_syscall+0x0/0x58 Let's fix the issue by checking for send_srp() and set_vbus() before calling them. For USB peripheral only cases these both could be NULL. Fixes: 657b306a7bdf ("usb: phy: add a new driver for omap usb2 phy") Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20240128120556.8848-1-tony@atomide.com Signed-off-by: Vinod Koul commit a22fe1d6dec7e98535b97249fdc95c2be79120bb Author: Frank Li Date: Tue Jan 23 12:28:41 2024 -0500 dmaengine: fix is_slave_direction() return false when DMA_DEV_TO_DEV is_slave_direction() should return true when direction is DMA_DEV_TO_DEV. Fixes: 49920bc66984 ("dmaengine: add new enum dma_transfer_direction") Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240123172842.3764529-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit 8b1d72395635af45410b66cc4c4ab37a12c4a831 Author: Helge Deller Date: Sat Jan 20 15:29:27 2024 +0100 parisc: Fix random data corruption from exception handler The current exception handler implementation, which assists when accessing user space memory, may exhibit random data corruption if the compiler decides to use a different register than the specified register %r29 (defined in ASM_EXCEPTIONTABLE_REG) for the error code. If the compiler choose another register, the fault handler will nevertheless store -EFAULT into %r29 and thus trash whatever this register is used for. Looking at the assembly I found that this happens sometimes in emulate_ldd(). To solve the issue, the easiest solution would be if it somehow is possible to tell the fault handler which register is used to hold the error code. Using %0 or %1 in the inline assembly is not posssible as it will show up as e.g. %r29 (with the "%r" prefix), which the GNU assembler can not convert to an integer. This patch takes another, better and more flexible approach: We extend the __ex_table (which is out of the execution path) by one 32-word. In this word we tell the compiler to insert the assembler instruction "or %r0,%r0,%reg", where %reg references the register which the compiler choosed for the error return code. In case of an access failure, the fault handler finds the __ex_table entry and can examine the opcode. The used register is encoded in the lowest 5 bits, and the fault handler can then store -EFAULT into this register. Since we extend the __ex_table to 3 words we can't use the BUILDTIME_TABLE_SORT config option any longer. Signed-off-by: Helge Deller Cc: # v6.0+ commit b54761f6e9773350c0d1fb8e1e5aacaba7769d0f Author: Mark Brown Date: Wed Jan 24 13:00:19 2024 +0000 kselftest/seccomp: Report each expectation we assert as a KTAP test The seccomp benchmark test makes a number of checks on the performance it measures and logs them to the output but does so in a custom format which none of the automated test runners understand meaning that the chances that anyone is paying attention are slim. Let's additionally log each result in KTAP format so that automated systems parsing the test output will see each comparison as a test case. The original logs are left in place since they provide the actual numbers for analysis. As part of this rework the flow for the main program so that when we skip tests we still log all the tests we skip, this is because the standard KTAP headers and footers include counts of the number of expected and run tests. Tested-by: Anders Roxell Acked-by: Kees Cook Signed-off-by: Mark Brown Signed-off-by: Shuah Khan commit 5820cfee443f8a90ea3eb9f99f57f2049a4a93c3 Author: Mark Brown Date: Wed Jan 24 13:00:18 2024 +0000 kselftest/seccomp: Use kselftest output functions for benchmark In preparation for trying to output the test results themselves in TAP format rework all the prints in the benchmark to use the kselftest output functions. The uses of system() all produce single line output so we can avoid having to deal with fully managing the child process and continue to use system() by simply printing an empty message before we invoke system(). We also leave one printf() used to complete a line of output in place. Tested-by: Anders Roxell Acked-by: Kees Cook Signed-off-by: Mark Brown Signed-off-by: Shuah Khan commit f1fea725cc93fcc3c5af9a2af63ffdc40dd2259e Author: Joe Lawrence Date: Wed Dec 20 10:11:51 2023 -0500 selftests/livepatch: fix and refactor new dmesg message code The livepatching kselftests rely on comparing expected vs. observed dmesg output. After each test, new dmesg entries are determined by the 'comm' utility comparing a saved, pre-test copy of dmesg to post-test dmesg output. Alexander reports that the 'comm --nocheck-order -13' invocation used by the tests can be confused when dmesg entry timestamps vary in magnitude (ie, "[ 98.820331]" vs. "[ 100.031067]"), in which case, additional messages are reported as new. The unexpected entries then spoil the test results. Instead of relying on 'comm' or 'diff' to determine new testing dmesg entries, refactor the code: - pre-test : log a unique canary dmesg entry - test : run tests, log messages - post-test : filter dmesg starting from pre-test message Reported-by: Alexander Gordeev Closes: https://lore.kernel.org/live-patching/ZYAimyPYhxVA9wKg@li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com/ Signed-off-by: Joe Lawrence Acked-by: Alexander Gordeev Tested-by: Marcos Paulo de Souza Reviewed-by: Marcos Paulo de Souza Acked-by: Miroslav Benes Signed-off-by: Shuah Khan commit 6500ad28fd5d67d5ca0fee9da73c463090842440 Author: Wolfram Sang Date: Tue Jan 30 10:40:53 2024 +0100 spi: sh-msiof: avoid integer overflow in constants cppcheck rightfully warned: drivers/spi/spi-sh-msiof.c:792:28: warning: Signed integer overflow for expression '7<<29'. [integerOverflow] sh_msiof_write(p, SIFCTR, SIFCTR_TFWM_1 | SIFCTR_RFWM_1); Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Link: https://msgid.link/r/20240130094053.10672-1-wsa+renesas@sang-engineering.com Signed-off-by: Mark Brown commit a3fa9838e8140584a6f338e8516f2b05d3bea812 Author: Patrick Rudolph Date: Tue Jan 30 20:32:56 2024 +0530 regulator (max5970): Fix IRQ handler The max5970 datasheet gives the impression that IRQ status bits must be cleared by writing a one to set bits, as those are marked with 'R/C', however tests showed that a zero must be written. Fixes an IRQ storm as the interrupt handler actually clears the IRQ status bits. Signed-off-by: Patrick Rudolph Signed-off-by: Naresh Solanki Link: https://msgid.link/r/20240130150257.3643657-1-naresh.solanki@9elements.com Signed-off-by: Mark Brown commit d877550eaf2dc9090d782864c96939397a3c6835 Author: Andrei Vagin Date: Mon Jan 29 22:36:03 2024 -0800 x86/fpu: Stop relying on userspace for info to fault in xsave buffer Before this change, the expected size of the user space buffer was taken from fx_sw->xstate_size. fx_sw->xstate_size can be changed from user-space, so it is possible construct a sigreturn frame where: * fx_sw->xstate_size is smaller than the size required by valid bits in fx_sw->xfeatures. * user-space unmaps parts of the sigrame fpu buffer so that not all of the buffer required by xrstor is accessible. In this case, xrstor tries to restore and accesses the unmapped area which results in a fault. But fault_in_readable succeeds because buf + fx_sw->xstate_size is within the still mapped area, so it goes back and tries xrstor again. It will spin in this loop forever. Instead, fault in the maximum size which can be touched by XRSTOR (taken from fpstate->user_size). [ dhansen: tweak subject / changelog ] Fixes: fcb3635f5018 ("x86/fpu/signal: Handle #PF in the direct restore path") Reported-by: Konstantin Bogomolov Suggested-by: Thomas Gleixner Signed-off-by: Andrei Vagin Signed-off-by: Dave Hansen Cc:stable@vger.kernel.org Link: https://lore.kernel.org/all/20240130063603.3392627-1-avagin%40google.com commit 129690fb229a20b6e563a77a2c85266acecf20bc Author: JackBB Wu Date: Tue Jan 23 17:39:48 2024 +0800 USB: serial: qcserial: add new usb-id for Dell Wireless DW5826e Add support for Dell DW5826e with USB-id 0x413c:0x8217 & 0x413c:0x8218. It is 0x413c:0x8217 T: Bus=02 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=413c ProdID=8217 Rev= 5.04 S: Manufacturer=DELL S: Product=COMPAL Electronics EXM-G1A S: SerialNumber=359302940050401 C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=qcserial E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=usbfs E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=qcserial E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=qcserial E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=32ms I:* If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=50 Driver=qmi_wwan E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms It is 0x413c:0x8218 T: Bus=02 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=413c ProdID=8218 Rev= 0.00 S: Manufacturer=DELL S: Product=COMPAL Electronics EXM-G1A S: SerialNumber=359302940050401 C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 2mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=qcserial E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: JackBB Wu Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 12b17b4eb82a41977eb848048137b5908d52845c Author: Leonard Dallmayr Date: Fri Jan 5 13:35:51 2024 +0100 USB: serial: cp210x: add ID for IMST iM871A-USB The device IMST USB-Stick for Smart Meter is a rebranded IMST iM871A-USB Wireless M-Bus USB-adapter. It is used to read wireless water, gas and electricity meters. Signed-off-by: Leonard Dallmayr Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 1f8c43b09ec6906079ac1f02e2b0a381c6f48c6c Author: Arnaldo Carvalho de Melo Date: Tue Jan 30 11:44:00 2024 -0300 tools include UAPI: Sync linux/mount.h copy with the kernel sources To pick the changes from: 35e27a5744131996 ("fs: keep struct mnt_id_req extensible") b4c2bea8ceaa50cd ("add listmount(2) syscall") 46eae99ef73302f9 ("add statmount(2) syscall") That doesn't change anything in tools this time as nothing that is harvested by the beauty scripts got changed: $ ls -1 tools/perf/trace/beauty/*mount*sh tools/perf/trace/beauty/fsmount.sh tools/perf/trace/beauty/mount_flags.sh tools/perf/trace/beauty/move_mount_flags.sh $ This addresses this perf build warning. Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h Cc: Adrian Hunter Cc: Christian Brauner Cc: Ian Rogers Cc: Jiri Olsa Cc: Miklos Szeredi Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZbkMiB7ZcOsLP2V5@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7814fe24a6211a610db0b408d87420403b5b7a36 Author: James Clark Date: Wed Jan 24 09:43:57 2024 +0000 perf evlist: Fix evlist__new_default() for > 1 core PMU The 'Session topology' test currently fails with this message when evlist__new_default() opens more than one event: 32: Session topology : --- start --- templ file: /tmp/perf-test-vv5YzZ Using CPUID 0x00000000410fd070 Opening: unknown-hardware:HG ------------------------------------------------------------ perf_event_attr: type 0 (PERF_TYPE_HARDWARE) config 0xb00000000 disabled 1 ------------------------------------------------------------ sys_perf_event_open: pid 0 cpu -1 group_fd -1 flags 0x8 = 4 Opening: unknown-hardware:HG ------------------------------------------------------------ perf_event_attr: type 0 (PERF_TYPE_HARDWARE) config 0xa00000000 disabled 1 ------------------------------------------------------------ sys_perf_event_open: pid 0 cpu -1 group_fd -1 flags 0x8 = 5 non matching sample_type FAILED tests/topology.c:73 can't get session ---- end ---- Session topology: FAILED! This is because when re-opening the file and parsing the header, Perf expects that any file that has more than one event has the sample ID flag set. Perf record already sets the flag in a similar way when there is more than one event, so add the same logic to evlist__new_default(). evlist__new_default() is only currently used in tests, so I don't expect this change to have any other side effects. The other tests that use it don't save and re-open the file so don't hit this issue. The session topology test has been failing on Arm big.LITTLE platforms since commit 251aa040244a3b17 ("perf parse-events: Wildcard most "numeric" events") when evlist__new_default() started opening multiple events for 'cycles'. Fixes: 251aa040244a3b17 ("perf parse-events: Wildcard most "numeric" events") Reviewed-by: Ian Rogers Signed-off-by: James Clark [ This was failing as well on a Rocket Lake Refresh/14700k Intel hybrid system - Arnaldo ] Tested-by: Arnaldo Carvalho de Melo Tested-by: Ian Rogers Tested-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Changbin Du Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yang Jihong Closes: https://lore.kernel.org/lkml/CAP-5=fWVQ-7ijjK3-w1q+k2WYVNHbAcejb-xY0ptbjRw476VKA@mail.gmail.com/ Link: https://lore.kernel.org/r/20240124094358.489372-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit efe80f9c9063228136bc3824f7ac6b4ff2e273b4 Author: Arnaldo Carvalho de Melo Date: Tue Jan 30 10:45:24 2024 -0300 tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench' This is to get the changes from: 94ea9c05219518ef ("x86/headers: Replace #include with #include ") 10f4c9b9a33b7df0 ("x86/asm: Fix build of UML with KASAN") That addresses these perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Vincent Whitchurch Link: https://lore.kernel.org/lkml/ZbkIKpKdNqOFdMwJ@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f7c4cb4a3f77867612b45c6327f80eac58a8ce65 Author: Ivan Orlov Date: Thu Jan 25 22:35:19 2024 +0000 ALSA: pcm: Add missing formats to formats list Add 4 missing formats to 'snd_pcm_format_names' array in order to be able to get their names with 'snd_pcm_format_name' function. Signed-off-by: Ivan Orlov Link: https://lore.kernel.org/r/20240125223522.1122765-1-ivan.orlov0322@gmail.com Signed-off-by: Takashi Iwai commit be220d2e5544ff094142d263db5cf94d034b5e39 Author: Chhayly Leang Date: Fri Jan 26 15:09:12 2024 +0700 ALSA: hda: cs35l41: Support ASUS Zenbook UM3402YAR Adds sound support for ASUS Zenbook UM3402YAR with missing DSD Signed-off-by: Chhayly Leang Link: https://lore.kernel.org/r/20240126080912.87422-1-clw.leang@gmail.com Signed-off-by: Takashi Iwai commit 15d6daad8f8add8ef99b6e4e2b5bf0db48e1a8db Author: Arnaldo Carvalho de Melo Date: Tue Jan 30 10:09:18 2024 -0300 tools headers x86 cpufeatures: Sync with the kernel sources to pick TDX, Zen, APIC MSR fence changes To pick the changes from: 1e536e10689700e0 ("x86/cpu: Detect TDX partial write machine check erratum") 765a0542fdc7aad7 ("x86/virt/tdx: Detect TDX during kernel boot") 30fa92832f405d5a ("x86/CPU/AMD: Add ZenX generations flags") 04c3024560d3a14a ("x86/barrier: Do not serialize MSR accesses on AMD") This causes these perf files to be rebuilt and brings some X86_FEATURE that will be used when updating the copies of tools/arch/x86/lib/mem{cpy,set}_64.S with the kernel sources: 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 differences: diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Adrian Hunter Cc: Borislav Petkov Cc: Dave Hansen Cc: Ian Rogers Cc: Jiri Olsa Cc: Kai Huang Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ Signed-off-by: Arnaldo Carvalho de Melo commit c16dfab33f99fc3ff43d48253bc2784ccb84c1de Author: Kenzo Gomez Date: Sat Jan 27 17:46:21 2024 +0100 ALSA: hda: cs35l41: Support additional ASUS Zenbook UX3402VA Add new model entry into configuration table. Signed-off-by: Kenzo Gomez Link: https://lore.kernel.org/r/20240127164621.26431-1-kenzo.sgomez@gmail.com Signed-off-by: Takashi Iwai commit aa2b2eb3934859904c287bf5434647ba72e14c1c Author: Eric Dumazet Date: Fri Jan 26 16:55:32 2024 +0000 llc: call sock_orphan() at release time syzbot reported an interesting trace [1] caused by a stale sk->sk_wq pointer in a closed llc socket. In commit ff7b11aa481f ("net: socket: set sock->sk to NULL after calling proto_ops::release()") Eric Biggers hinted that some protocols are missing a sock_orphan(), we need to perform a full audit. In net-next, I plan to clear sock->sk from sock_orphan() and amend Eric patch to add a warning. [1] BUG: KASAN: slab-use-after-free in list_empty include/linux/list.h:373 [inline] BUG: KASAN: slab-use-after-free in waitqueue_active include/linux/wait.h:127 [inline] BUG: KASAN: slab-use-after-free in sock_def_write_space_wfree net/core/sock.c:3384 [inline] BUG: KASAN: slab-use-after-free in sock_wfree+0x9a8/0x9d0 net/core/sock.c:2468 Read of size 8 at addr ffff88802f4fc880 by task ksoftirqd/1/27 CPU: 1 PID: 27 Comm: ksoftirqd/1 Not tainted 6.8.0-rc1-syzkaller-00049-g6098d87eaf31 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc4/0x620 mm/kasan/report.c:488 kasan_report+0xda/0x110 mm/kasan/report.c:601 list_empty include/linux/list.h:373 [inline] waitqueue_active include/linux/wait.h:127 [inline] sock_def_write_space_wfree net/core/sock.c:3384 [inline] sock_wfree+0x9a8/0x9d0 net/core/sock.c:2468 skb_release_head_state+0xa3/0x2b0 net/core/skbuff.c:1080 skb_release_all net/core/skbuff.c:1092 [inline] napi_consume_skb+0x119/0x2b0 net/core/skbuff.c:1404 e1000_unmap_and_free_tx_resource+0x144/0x200 drivers/net/ethernet/intel/e1000/e1000_main.c:1970 e1000_clean_tx_irq drivers/net/ethernet/intel/e1000/e1000_main.c:3860 [inline] e1000_clean+0x4a1/0x26e0 drivers/net/ethernet/intel/e1000/e1000_main.c:3801 __napi_poll.constprop.0+0xb4/0x540 net/core/dev.c:6576 napi_poll net/core/dev.c:6645 [inline] net_rx_action+0x956/0xe90 net/core/dev.c:6778 __do_softirq+0x21a/0x8de kernel/softirq.c:553 run_ksoftirqd kernel/softirq.c:921 [inline] run_ksoftirqd+0x31/0x60 kernel/softirq.c:913 smpboot_thread_fn+0x660/0xa10 kernel/smpboot.c:164 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Allocated by task 5167: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:314 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:340 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook mm/slub.c:3813 [inline] slab_alloc_node mm/slub.c:3860 [inline] kmem_cache_alloc_lru+0x142/0x6f0 mm/slub.c:3879 alloc_inode_sb include/linux/fs.h:3019 [inline] sock_alloc_inode+0x25/0x1c0 net/socket.c:308 alloc_inode+0x5d/0x220 fs/inode.c:260 new_inode_pseudo+0x16/0x80 fs/inode.c:1005 sock_alloc+0x40/0x270 net/socket.c:634 __sock_create+0xbc/0x800 net/socket.c:1535 sock_create net/socket.c:1622 [inline] __sys_socket_create net/socket.c:1659 [inline] __sys_socket+0x14c/0x260 net/socket.c:1706 __do_sys_socket net/socket.c:1720 [inline] __se_sys_socket net/socket.c:1718 [inline] __x64_sys_socket+0x72/0xb0 net/socket.c:1718 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Freed by task 0: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3f/0x60 mm/kasan/generic.c:640 poison_slab_object mm/kasan/common.c:241 [inline] __kasan_slab_free+0x121/0x1b0 mm/kasan/common.c:257 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2121 [inline] slab_free mm/slub.c:4299 [inline] kmem_cache_free+0x129/0x350 mm/slub.c:4363 i_callback+0x43/0x70 fs/inode.c:249 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0x819/0x1680 kernel/rcu/tree.c:2433 __do_softirq+0x21a/0x8de kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 __kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:586 __call_rcu_common.constprop.0+0x9a/0x7b0 kernel/rcu/tree.c:2683 destroy_inode+0x129/0x1b0 fs/inode.c:315 iput_final fs/inode.c:1739 [inline] iput.part.0+0x560/0x7b0 fs/inode.c:1765 iput+0x5c/0x80 fs/inode.c:1755 dentry_unlink_inode+0x292/0x430 fs/dcache.c:400 __dentry_kill+0x1ca/0x5f0 fs/dcache.c:603 dput.part.0+0x4ac/0x9a0 fs/dcache.c:845 dput+0x1f/0x30 fs/dcache.c:835 __fput+0x3b9/0xb70 fs/file_table.c:384 task_work_run+0x14d/0x240 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa8a/0x2ad0 kernel/exit.c:871 do_group_exit+0xd4/0x2a0 kernel/exit.c:1020 __do_sys_exit_group kernel/exit.c:1031 [inline] __se_sys_exit_group kernel/exit.c:1029 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88802f4fc800 which belongs to the cache sock_inode_cache of size 1408 The buggy address is located 128 bytes inside of freed 1408-byte region [ffff88802f4fc800, ffff88802f4fcd80) The buggy address belongs to the physical page: page:ffffea0000bd3e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2f4f8 head:ffffea0000bd3e00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888013b06b40 0000000000000000 0000000000000001 raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Reclaimable, gfp_mask 0xd20d0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_RECLAIMABLE), pid 4956, tgid 4956 (sshd), ts 31423924727, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa28/0x3780 mm/page_alloc.c:3311 __alloc_pages+0x22f/0x2440 mm/page_alloc.c:4567 __alloc_pages_node include/linux/gfp.h:238 [inline] alloc_pages_node include/linux/gfp.h:261 [inline] alloc_slab_page mm/slub.c:2190 [inline] allocate_slab mm/slub.c:2354 [inline] new_slab+0xcc/0x3a0 mm/slub.c:2407 ___slab_alloc+0x4af/0x19a0 mm/slub.c:3540 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3625 __slab_alloc_node mm/slub.c:3678 [inline] slab_alloc_node mm/slub.c:3850 [inline] kmem_cache_alloc_lru+0x379/0x6f0 mm/slub.c:3879 alloc_inode_sb include/linux/fs.h:3019 [inline] sock_alloc_inode+0x25/0x1c0 net/socket.c:308 alloc_inode+0x5d/0x220 fs/inode.c:260 new_inode_pseudo+0x16/0x80 fs/inode.c:1005 sock_alloc+0x40/0x270 net/socket.c:634 __sock_create+0xbc/0x800 net/socket.c:1535 sock_create net/socket.c:1622 [inline] __sys_socket_create net/socket.c:1659 [inline] __sys_socket+0x14c/0x260 net/socket.c:1706 __do_sys_socket net/socket.c:1720 [inline] __se_sys_socket net/socket.c:1718 [inline] __x64_sys_socket+0x72/0xb0 net/socket.c:1718 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b page_owner free stack trace missing Memory state around the buggy address: ffff88802f4fc780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802f4fc800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88802f4fc880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802f4fc900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802f4fc980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 43815482370c ("net: sock_def_readable() and friends RCU conversion") Reported-and-tested-by: syzbot+32b89eaa102b372ff76d@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Cc: Eric Biggers Cc: Kuniyuki Iwashima Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20240126165532.3396702-1-edumazet@google.com Signed-off-by: Paolo Abeni commit c7767f5c43df2c453af4651d1f58f489e3eb4ac1 Author: Kevin Brodsky Date: Mon Jan 29 15:47:48 2024 +0000 arm64: vdso32: Remove unused vdso32-offsets.h Commit 2d071968a405 ("arm64: compat: Remove 32-bit sigreturn code from the vDSO") removed all VDSO_* symbols in the compat vDSO. As a result, vdso32-offsets.h is now empty and therefore unused. Time to remove it. Signed-off-by: Kevin Brodsky Link: https://lore.kernel.org/r/20240129154748.1727759-1-kevin.brodsky@arm.com Signed-off-by: Will Deacon commit f8affba725487381046e918277de58fa864802b7 Merge: 60365049ccbac 3b12ec8f618eb Author: Paolo Abeni Date: Tue Jan 30 12:58:13 2024 +0100 Merge branch 'net-stmmac-dwmac-imx-time-based-scheduling-support' Esben Haabendal says: ==================== net: stmmac: dwmac-imx: Time Based Scheduling support This small patch series allows using TBS support of the i.MX Ethernet QOS controller for etf qdisc offload. It achieves this in a similar manner that it is done in dwmac-intel.c, dwmac-mediatek.c and stmmac_pci.c. Changes since v1: - Simplified for loop by starting at index 1. - Fixed problem with indentation. ==================== Link: https://lore.kernel.org/r/cover.1706256158.git.esben@geanix.com Signed-off-by: Paolo Abeni commit 3b12ec8f618ebaccfe43ea4621a6f5fb586edef8 Author: Esben Haabendal Date: Fri Jan 26 10:10:42 2024 +0100 net: stmmac: dwmac-imx: set TSO/TBS TX queues default settings TSO and TBS cannot coexist. For now we set i.MX Ethernet QOS controller to use the first TX queue with TSO and the rest for TBS. TX queues with TBS can support etf qdisc hw offload. Signed-off-by: Esben Haabendal Reviewed-by: Kurt Kanzenbach Reviewed-by: Vadim Fedorenko Signed-off-by: Paolo Abeni commit 4896bb7c0b31a0a3379b290ea7729900c59e0c69 Author: Esben Haabendal Date: Fri Jan 26 10:10:41 2024 +0100 net: stmmac: do not clear TBS enable bit on link up/down With the dma conf being reallocated on each call to stmmac_open(), any information in there is lost, unless we specifically handle it. The STMMAC_TBS_EN bit is set when adding an etf qdisc, and the etf qdisc therefore would stop working when link was set down and then back up. Fixes: ba39b344e924 ("net: ethernet: stmicro: stmmac: generate stmmac dma conf before open") Cc: stable@vger.kernel.org Signed-off-by: Esben Haabendal Signed-off-by: Paolo Abeni commit d104a6fef3fec137d8d44961224ab76edbd6cbc7 Author: Ard Biesheuvel Date: Tue Jan 23 14:30:55 2024 +0100 arm64: scs: Disable LTO for SCS patching code Full LTO takes the '-mbranch-protection=none' passed to the compiler when generating the dynamic shadow call stack patching code as a hint to stop emitting PAC instructions altogether. (Thin LTO appears unaffected by this) Work around this by disabling LTO for the compilation unit, which appears to convince the linker that it should still use PAC in the rest of the kernel.. Fixes: 3b619e22c460 ("arm64: implement dynamic shadow call stack for Clang") Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook Reviewed-by: Sami Tolvanen Tested-by: Sami Tolvanen Link: https://lore.kernel.org/r/20240123133052.1417449-6-ardb+git@google.com Signed-off-by: Will Deacon commit 2fa28abd1090562b4d9bc4aedd70abcca26561af Author: Ard Biesheuvel Date: Tue Jan 23 14:30:54 2024 +0100 arm64: Revert "scs: Work around full LTO issue with dynamic SCS" This reverts commit 8c5a19cb17a71e ("arm64: scs: Work around full LTO issue with dynamic SCS"), which did not quite fix the issue as intended. Apparently, -fno-unwind-tables is ignored for the final full LTO link when it is set on any of the objects, resulting in an early boot crash due to the SCS patching code patching itself, and attempting to pop the return address from the shadow stack while the associated push was still a PACIASP instruction when it executed. Reported-by: Sami Tolvanen Signed-off-by: Ard Biesheuvel Reviewed-by: Kees Cook Reviewed-by: Sami Tolvanen Tested-by: Sami Tolvanen Link: https://lore.kernel.org/r/20240123133052.1417449-5-ardb+git@google.com Signed-off-by: Will Deacon commit 60365049ccbacd101654a66ddcb299abfabd4fc5 Author: Helge Deller Date: Fri Jan 26 09:32:20 2024 +0100 ipv6: Ensure natural alignment of const ipv6 loopback and router addresses On a parisc64 kernel I sometimes notice this kernel warning: Kernel unaligned access to 0x40ff8814 at ndisc_send_skb+0xc0/0x4d8 The address 0x40ff8814 points to the in6addr_linklocal_allrouters variable and the warning simply means that some ipv6 function tries to read a 64-bit word directly from the not-64-bit aligned in6addr_linklocal_allrouters variable. Unaligned accesses are non-critical as the architecture or exception handlers usually will fix it up at runtime. Nevertheless it may trigger a performance penality for some architectures. For details read the "unaligned-memory-access" kernel documentation. The patch below ensures that the ipv6 loopback and router addresses will always be naturally aligned. This prevents the unaligned accesses for all architectures. Signed-off-by: Helge Deller Fixes: 034dfc5df99eb ("ipv6: export in6addr_loopback to modules") Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/ZbNuFM1bFqoH-UoY@p100 Signed-off-by: Paolo Abeni commit 881f78f472556ed05588172d5b5676b48dc48240 Author: Darrick J. Wong Date: Mon Jan 29 20:27:23 2024 -0800 xfs: remove conditional building of rt geometry validator functions I mistakenly turned off CONFIG_XFS_RT in the Kconfig file for arm64 variant of the djwong-wtf git branch. Unfortunately, it took me a good hour to figure out that RT wasn't built because this is what got printed to dmesg: XFS (sda2): realtime geometry sanity check failed XFS (sda2): Metadata corruption detected at xfs_sb_read_verify+0x170/0x190 [xfs], xfs_sb block 0x0 Whereas I would have expected: XFS (sda2): Not built with CONFIG_XFS_RT XFS (sda2): RT mount failed The root cause of these problems is the conditional compilation of the new functions xfs_validate_rtextents and xfs_compute_rextslog that I introduced in the two commits listed below. The !RT versions of these functions return false and 0, respectively, which causes primary superblock validation to fail, which explains the first message. Move the two functions to other parts of libxfs that are not conditionally defined by CONFIG_XFS_RT and remove the broken stubs so that validation works again. Fixes: e14293803f4e ("xfs: don't allow overly small or large realtime volumes") Fixes: a6a38f309afc ("xfs: make rextslog computation consistent with mkfs") Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 861c0981648f5b64c86fd028ee622096eb7af05a Merge: 9b7bd05bebfcd e42e29cc44239 Author: Linus Torvalds Date: Mon Jan 29 18:45:54 2024 -0800 Merge tag 'jfs-6.8-rc3' of github.com:kleikamp/linux-shaggy Pull jfs fix from David Kleikamp: "Revert a bad sanity check" * tag 'jfs-6.8-rc3' of github.com:kleikamp/linux-shaggy: Revert "jfs: fix shift-out-of-bounds in dbJoin" commit 9b7bd05bebfcd3d369272d41ef32a379708ec933 Merge: 6f3d7d5cedbad 29142dc92c37d Author: Linus Torvalds Date: Mon Jan 29 18:42:34 2024 -0800 Merge tag 'trace-v6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing fixes from Steven Rostedt: "Two small fixes for tracefs and eventfs: - Fix register_snapshot_trigger() on allocation error If the snapshot fails to allocate, the register_snapshot_trigger() can still return success. If the call to tracing_alloc_snapshot_instance() returned anything but 0, it returned 0, but it should have been returning the error code from that allocation function. - Remove leftover code from tracefs doing a dentry walk on remount. The update_gid() function was called by the tracefs code on remount to update the gid of eventfs, but that is no longer the case, but that code wasn't deleted. Nothing calls it. Remove it" * tag 'trace-v6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracefs: remove stale 'update_gid' code tracing/trigger: Fix to return error if failed to alloc snapshot commit 59c93583491ab15db109f9902524d241c4fa4c0b Author: Jakub Kicinski Date: Fri Jan 26 12:13:08 2024 -0800 selftests: net: add missing config for nftables-backed iptables Modern OSes use iptables implementation with nf_tables as a backend, e.g.: $ iptables -V iptables v1.8.8 (nf_tables) Pablo points out that we need CONFIG_NFT_COMPAT to make that work, otherwise we see a lot of: Warning: Extension DNAT revision 0 not supported, missing kernel module? with DNAT being just an example here, other modules we need include udp, TTL, length etc. Link: https://lore.kernel.org/r/20240126201308.2903602-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c44fc98f0a8ffd94fa0bd291928e7e312ffc7ca4 Author: Michal Vokáč Date: Fri Jan 26 11:49:35 2024 +0100 net: dsa: qca8k: fix illegal usage of GPIO When working with GPIO, its direction must be set either when the GPIO is requested by gpiod_get*() or later on by one of the gpiod_direction_*() functions. Neither of this is done here which results in undefined behavior on some systems. As the reset GPIO is used right after it is requested here, it makes sense to configure it as GPIOD_OUT_HIGH right away. With that, the following gpiod_set_value_cansleep(1) becomes redundant and can be safely removed. Fixes: a653f2f538f9 ("net: dsa: qca8k: introduce reset via gpio feature") Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/1706266175-3408-1-git-send-email-michal.vokac@ysoft.com Signed-off-by: Jakub Kicinski commit 6f3d7d5cedbad7a859bb34161a2807c58e6cdda8 Merge: 41bccc98fb793 96204e15310c2 Author: Linus Torvalds Date: Mon Jan 29 17:12:16 2024 -0800 Merge tag 'mm-hotfixes-stable-2024-01-28-23-21' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc fixes from Andrew Morton: "22 hotfixes. 11 are cc:stable and the remainder address post-6.7 issues or aren't considered appropriate for backporting" * tag 'mm-hotfixes-stable-2024-01-28-23-21' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (22 commits) mm: thp_get_unmapped_area must honour topdown preference mm: huge_memory: don't force huge page alignment on 32 bit userfaultfd: fix mmap_changing checking in mfill_atomic_hugetlb selftests/mm: ksm_tests should only MADV_HUGEPAGE valid memory scs: add CONFIG_MMU dependency for vfree_atomic() mm/memory: fix folio_set_dirty() vs. folio_mark_dirty() in zap_pte_range() mm/huge_memory: fix folio_set_dirty() vs. folio_mark_dirty() selftests/mm: Update va_high_addr_switch.sh to check CPU for la57 flag selftests: mm: fix map_hugetlb failure on 64K page size systems MAINTAINERS: supplement of zswap maintainers update stackdepot: make fast paths lock-less again stackdepot: add stats counters exported via debugfs mm, kmsan: fix infinite recursion due to RCU critical section mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again selftests/mm: switch to bash from sh MAINTAINERS: add man-pages git trees mm: memcontrol: don't throttle dying tasks on memory.high mm: mmap: map MAP_STACK to VM_NOHUGEPAGE uprobes: use pagesize-aligned virtual address when replacing pages selftests/mm: mremap_test: fix build warning ... commit cc976dbc492c2bf67d8225845b609ea72e292128 Merge: 6613476e225e0 d76c762e7ee04 Author: Stephen Boyd Date: Mon Jan 29 16:46:37 2024 -0800 Merge tag 'samsung-clk-fixes-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-fixes Pull Samsung clk fixes from Krzysztof Kozlowski: Google GS101: Correct the input clock names to CMU MISC clock controller to match received review. The review was initially missed and CMU MISC clock controller bindings, driver and DTS was merged into v6.8-rc1 with different names. Nothing was released so far, so the bindings and driver can be still corrected to match review. * tag 'samsung-clk-fixes-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: clk-gs101: comply with the new dt cmu_misc clock names dt-bindings: clock: gs101: rename cmu_misc clock-names commit eef5c7b28dbecd6b141987a96db6c54e49828102 Author: Li Ming Date: Mon Jan 29 13:18:56 2024 +0000 cxl/pci: Skip to handle RAS errors if CXL.mem device is detached The PCI AER model is an awkward fit for CXL error handling. While the expectation is that a PCI device can escalate to link reset to recover from an AER event, the same reset on CXL amounts to a surprise memory hotplug of massive amounts of memory. At present, the CXL error handler attempts some optimistic error handling to unbind the device from the cxl_mem driver after reaping some RAS register values. This results in a "hopeful" attempt to unplug the memory, but there is no guarantee that will succeed. A subsequent AER notification after the memdev unbind event can no longer assume the registers are mapped. Check for memdev bind before reaping status register values to avoid crashes of the form: BUG: unable to handle page fault for address: ffa00000195e9100 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page [...] RIP: 0010:__cxl_handle_ras+0x30/0x110 [cxl_core] [...] Call Trace: ? __die+0x24/0x70 ? page_fault_oops+0x82/0x160 ? kernelmode_fixup_or_oops+0x84/0x110 ? exc_page_fault+0x113/0x170 ? asm_exc_page_fault+0x26/0x30 ? __pfx_dpc_reset_link+0x10/0x10 ? __cxl_handle_ras+0x30/0x110 [cxl_core] ? find_cxl_port+0x59/0x80 [cxl_core] cxl_handle_rp_ras+0xbc/0xd0 [cxl_core] cxl_error_detected+0x6c/0xf0 [cxl_core] report_error_detected+0xc7/0x1c0 pci_walk_bus+0x73/0x90 pcie_do_recovery+0x23f/0x330 Longer term, the unbind and PCI_ERS_RESULT_DISCONNECT behavior might need to be replaced with a new PCI_ERS_RESULT_PANIC. Fixes: 6ac07883dbb5 ("cxl/pci: Add RCH downstream port error logging") Cc: stable@vger.kernel.org Suggested-by: Dan Williams Signed-off-by: Li Ming Link: https://lore.kernel.org/r/20240129131856.2458980-1-ming4.li@intel.com Signed-off-by: Dan Williams commit 76b367a2d83163cf19173d5cb0b562acbabc8eac Author: Jens Axboe Date: Mon Jan 29 12:00:58 2024 -0700 io_uring/net: limit inline multishot retries If we have multiple clients and some/all are flooding the receives to such an extent that we can retry a LOT handling multishot receives, then we can be starving some clients and hence serving traffic in an imbalanced fashion. Limit multishot retry attempts to some arbitrary value, whose only purpose serves to ensure that we don't keep serving a single connection for way too long. We default to 32 retries, which should be more than enough to provide fairness, yet not so small that we'll spend too much time requeuing rather than handling traffic. Cc: stable@vger.kernel.org Depends-on: 704ea888d646 ("io_uring/poll: add requeue return code from poll multishot handling") Depends-on: 1e5d765a82f ("io_uring/net: un-indent mshot retry path in io_recv_finish()") Depends-on: e84b01a880f6 ("io_uring/poll: move poll execution helpers higher up") Fixes: b3fdea6ecb55 ("io_uring: multishot recv") Fixes: 9bb66906f23e ("io_uring: support multishot in recvmsg") Link: https://github.com/axboe/liburing/issues/1043 Signed-off-by: Jens Axboe commit 704ea888d646cb9d715662944cf389c823252ee0 Author: Jens Axboe Date: Mon Jan 29 11:57:11 2024 -0700 io_uring/poll: add requeue return code from poll multishot handling Since our poll handling is edge triggered, multishot handlers retry internally until they know that no more data is available. In preparation for limiting these retries, add an internal return code, IOU_REQUEUE, which can be used to inform the poll backend about the handler wanting to retry, but that this should happen through a normal task_work requeue rather than keep hammering on the issue side for this one request. No functional changes in this patch, nobody is using this return code just yet. Signed-off-by: Jens Axboe commit 91e5d765a82fb2c9d0b7ad930d8953208081ddf1 Author: Jens Axboe Date: Mon Jan 29 11:54:18 2024 -0700 io_uring/net: un-indent mshot retry path in io_recv_finish() In preparation for putting some retry logic in there, have the done path just skip straight to the end rather than have too much nesting in here. No functional changes in this patch. Signed-off-by: Jens Axboe commit e84b01a880f635e3084a361afba41f95ff500d12 Author: Jens Axboe Date: Mon Jan 29 11:52:54 2024 -0700 io_uring/poll: move poll execution helpers higher up In preparation for calling __io_poll_execute() higher up, move the functions to avoid forward declarations. No functional changes in this patch. Signed-off-by: Jens Axboe commit 5513c5d0fb3d509cdd0a11afc18441c57eb7c94c Author: Marian Postevca Date: Sun Jan 28 19:22:29 2024 +0200 ASoC: amd: acp: Fix support for a Huawei Matebook laptop Previous commit that added support for Huawei MateBook D16 2021 with Ryzen 4600H (HVY-WXX9 M1010) was incomplete. To activate support for this laptop, the DMI table in acp3x-es83xx machine driver must also be updated. Fixes: b5338b1b901e ("ASoC: amd: acp: Add support for a new Huawei Matebook laptop") Signed-off-by: Marian Postevca Link: https://msgid.link/r/20240128172229.657142-1-posteuca@mutex.one Signed-off-by: Mark Brown commit 5d71e60004512a6d171f54f79485f06713a17aff Merge: c6dce23ec993f 7a9dc944f129b Author: Mark Brown Date: Mon Jan 29 19:41:50 2024 +0000 arm64: sun50i-h616: Add DMA and SPDIF controllers Merge series from Chen-Yu Tsai : This series adds SPDIF controllers for the H616 and H618. There's also a fix for SPDIF on H6: the controller also has a receiver that was not correctly modeled. commit 0abcac4fe3ca3aeaef40ad53c0b295b2d5f8cbf1 Author: Samasth Norway Ananda Date: Thu Jan 25 13:19:33 2024 -0800 firmware: microchip: fix wrong sizeof argument response_msg is a pointer to an unsigned int (u32). So passing just response_msg to sizeof would not print the size of the variable. To get the size of response_msg we need to pass it as a pointer variable. Fixes: ec5b0f1193ad ("firmware: microchip: add PolarFire SoC Auto Update support") Signed-off-by: Samasth Norway Ananda Signed-off-by: Conor Dooley commit ccbca118ef1a71d5faa012b9bb1ecd784e9e2b42 Author: Samasth Norway Ananda Date: Mon Jan 22 21:35:09 2024 -0800 NFSv4.1: Assign the right value for initval and retries for rpc timeout Make sure the rpc timeout was assigned with the correct value for initial timeout and max number of retries. Fixes: 57331a59ac0d ("NFSv4.1: Use the nfs_client's rpc timeouts for backchannel") Signed-off-by: Samasth Norway Ananda Reviewed-by: Benjamin Coddington Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit bbc404d20d1b46d89b461918bc44587620eda200 Author: Christophe JAILLET Date: Sat Jan 20 18:25:36 2024 +0100 ixgbe: Fix an error handling path in ixgbe_read_iosf_sb_reg_x550() All error handling paths, except this one, go to 'out' where release_swfw_sync() is called. This call balances the acquire_swfw_sync() call done at the beginning of the function. Branch to the error handling path in order to correctly release some resources in case of error. Fixes: ae14a1d8e104 ("ixgbe: Fix IOSF SB access issues") Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit f1f6a6b1830a8f1dc92ee26fae76333f446b0663 Author: Jacob Keller Date: Mon Dec 11 18:05:52 2023 -0800 e1000e: correct maximum frequency adjustment values The e1000e driver supports hardware with a variety of different clock speeds, and thus a variety of different increment values used for programming its PTP hardware clock. The values currently programmed in e1000e_ptp_init are incorrect. In particular, only two maximum adjustments are used: 24000000 - 1, and 600000000 - 1. These were originally intended to be used with the 96 MHz clock and the 25 MHz clock. Both of these values are actually slightly too high. For the 96 MHz clock, the actual maximum value that can safely be programmed is 23,999,938. For the 25 MHz clock, the maximum value is 599,999,904. Worse, several devices use a 24 MHz clock or a 38.4 MHz clock. These parts are incorrectly assigned one of either the 24million or 600million values. For the 24 MHz clock, this is not a significant issue: its current increment value can support an adjustment up to 7billion in the positive direction. However, the 38.4 KHz clock uses an increment value which can only support up to 230,769,157 before it starts overflowing. To understand where these values come from, consider that frequency adjustments have the form of: new_incval = base_incval + (base_incval * adjustment) / (unit of adjustment) The maximum adjustment is reported in terms of parts per billion: new_incval = base_incval + (base_incval * adjustment) / 1 billion The largest possible adjustment is thus given by the following: max_incval = base_incval + (base_incval * max_adj) / 1 billion Re-arranging to solve for max_adj: max_adj = (max_incval - base_incval) * 1 billion / base_incval We also need to ensure that negative adjustments cannot underflow. This can be achieved simply by ensuring max_adj is always less than 1 billion. Introduce new macros in e1000.h codifying the maximum adjustment in PPB for each frequency given its associated increment values. Also clarify where these values come from by commenting about the above equations. Replace the switch statement in e1000e_ptp_init with one which mirrors the increment value switch statement from e1000e_get_base_timinica. For each device, assign the appropriate maximum adjustment based on its frequency. Some parts can have one of two frequency modes as determined by E1000_TSYNCRXCTL_SYSCFI. Since the new flow directly matches the assignments in e1000e_get_base_timinca, and uses well defined macro names, it is much easier to verify that the resulting maximum adjustments are correct. It also avoids difficult to parse construction such as the "hw->mac.type < e1000_phc_lpt", and the use of fallthrough which was especially confusing when combined with a conditional block. Note that I believe the current increment value configuration used for 24MHz clocks is sub-par, as it leaves at least 3 extra bits available in the INCVALUE register. However, fixing that requires more careful review of the clock rate and associated values. Reported-by: Trey Harrison Fixes: 68fe1d5da548 ("e1000e: Add Support for 38.4MHZ frequency") Fixes: d89777bf0e42 ("e1000e: add support for IEEE-1588 PTP") Signed-off-by: Jacob Keller Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 7a9dc944f129bb56ef855d9c0b0647bc3e98a56f Author: Chen-Yu Tsai Date: Sun Jan 28 00:32:42 2024 +0800 ASoC: sun4i-spdif: Add Allwinner H616 compatible The SPDIF hardware block found in the H616 SoC has the same layout as the one found in the H6 SoC, except that it is missing the receiver side. Add a new compatible string for it. Signed-off-by: Chen-Yu Tsai Acked-by: Conor Dooley Reviewed-by: Jernej Skrabec Link: https://msgid.link/r/20240127163247.384439-3-wens@kernel.org Signed-off-by: Mark Brown commit 57b3c130d97e45b8a07586e0ae113e43776c5ea8 Author: Chen-Yu Tsai Date: Sun Jan 28 00:32:41 2024 +0800 ASoC: sun4i-spdif: Fix requirements for H6 When the H6 was added to the bindings, only the TX DMA channel was added. As the hardware supports both transmit and receive functions, the binding is missing the RX DMA channel and is thus incorrect. Also, the reset control was not made mandatory. Add the RX DMA channel for SPDIF on H6 by removing the compatible from the list of compatibles that should only have a TX DMA channel. And add the H6 compatible to the list of compatibles that require the reset control to be present. Fixes: b20453031472 ("dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible") Signed-off-by: Chen-Yu Tsai Acked-by: Conor Dooley Reviewed-by: Jernej Skrabec Link: https://msgid.link/r/20240127163247.384439-2-wens@kernel.org Signed-off-by: Mark Brown commit 0adf963b8463faa44653e22e56ce55f747e68868 Author: Chen-Yu Tsai Date: Sun Jan 28 00:32:43 2024 +0800 ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616 The SPDIF hardware block found in the H616 SoC has the same layout as the one found in the H6 SoC, except that it is missing the receiver side. Since the driver currently only supports the transmit function, support for the H616 is identical to what is currently done for the H6. Signed-off-by: Chen-Yu Tsai Reviewed-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://msgid.link/r/20240127163247.384439-4-wens@kernel.org Signed-off-by: Mark Brown commit a38125f188c141cd1297d14af84c28b5276ab287 Author: Andrew Jones Date: Wed Dec 6 18:02:46 2023 +0100 KVM: selftests: s390x: Remove redundant newlines TEST_* functions append their own newline. Remove newlines from TEST_* callsites to avoid extra newlines in output. Signed-off-by: Andrew Jones Acked-by: Janosch Frank Acked-by: Claudio Imbrenda Link: https://lore.kernel.org/r/20231206170241.82801-11-ajones@ventanamicro.com Signed-off-by: Sean Christopherson commit 93e43e50b80b4f342251fb48f8ebced4d3c34983 Author: Andrew Jones Date: Wed Dec 6 18:02:45 2023 +0100 KVM: selftests: riscv: Remove redundant newlines TEST_* functions append their own newline. Remove newlines from TEST_* callsites to avoid extra newlines in output. Signed-off-by: Andrew Jones Acked-by: Anup Patel Link: https://lore.kernel.org/r/20231206170241.82801-10-ajones@ventanamicro.com Signed-off-by: Sean Christopherson commit 95be17e4008b592342ec6cfb9264f4b54c21b790 Author: Andrew Jones Date: Wed Dec 6 18:02:44 2023 +0100 KVM: selftests: aarch64: Remove redundant newlines TEST_* functions append their own newline. Remove newlines from TEST_* callsites to avoid extra newlines in output. Signed-off-by: Andrew Jones Acked-by: Zenghui Yu Link: https://lore.kernel.org/r/20231206170241.82801-9-ajones@ventanamicro.com Signed-off-by: Sean Christopherson commit 250e138d876838774bca3140d544438898df0489 Author: Andrew Jones Date: Wed Dec 6 18:02:43 2023 +0100 KVM: selftests: Remove redundant newlines TEST_* functions append their own newline. Remove newlines from TEST_* callsites to avoid extra newlines in output. Signed-off-by: Andrew Jones Link: https://lore.kernel.org/r/20231206170241.82801-8-ajones@ventanamicro.com Signed-off-by: Sean Christopherson commit 02add85a9eefb5c969b9bb6916f14607ca2faae0 Author: Sean Christopherson Date: Wed Nov 29 14:40:41 2023 -0800 KVM: selftests: Reword the NX hugepage test's skip message to be more helpful Rework the NX hugepage test's skip message regarding the magic token to provide all of the necessary magic, and to very explicitly recommended using the wrapper shell script. Opportunistically remove an overzealous newline; splitting the recommendation message across two lines of ~45 characters makes it much harder to read than running out a single line to 98 characters. Link: https://lore.kernel.org/r/20231129224042.530798-1-seanjc@google.com Signed-off-by: Sean Christopherson commit e4ad71e2367f3f7b7409c30df9cdbb34da15e012 Author: Arend van Spriel Date: Fri Jan 26 11:57:24 2024 +0100 MAINTAINERS: wifi: brcm80211: cleanup entry There has been some discussion about what is expected from a maintainer and so a cleanup seems to be in order. A dedicated mailing list has been created to discuss brcm80211 specific development issues. Keeping the status as Supported although help in maintaining this driver is welcomed. Cc: brcm80211@lists.linux.dev Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://msgid.link/20240126105724.384063-1-arend.vanspriel@broadcom.com commit c6dce23ec993f7da7790a9eadb36864ceb60e942 Author: Techno Mooney Date: Mon Jan 29 15:11:47 2024 +0700 ASoC: amd: yc: Add DMI quirk for MSI Bravo 15 C7VF The laptop requires a quirk ID to enable its internal microphone. Add it to the DMI quirk table. Reported-by: Techno Mooney Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218402 Cc: stable@vger.kernel.org Signed-off-by: Techno Mooney Signed-off-by: Bagas Sanjaya Link: https://msgid.link/r/20240129081148.1044891-1-bagasdotme@gmail.com Signed-off-by: Mark Brown commit 21fdd8dd3726199451fc495f20104356e071a997 Author: Arnaldo Carvalho de Melo Date: Mon Jan 29 13:00:07 2024 -0300 tools headers UAPI: Sync unistd.h to pick {list,stat}mount, lsm_{[gs]et_self_attr,list_modules} syscall numbers To pick the changes in these csets: d8b0f5465012538c ("wire up syscalls for statmount/listmount") 5f42375904b08890 ("LSM: wireup Linux Security Module syscalls") Used in some architectures to create syscall tables. This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Cc: Casey Schaufler Cc: Christian Brauner Cc: Miklos Szeredi Cc: Paul Moore Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZbfMuAlUMRO9Hqa6@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 346f59d1e8ed0eed41c80e1acb657e484c308e6a Author: Alexander Tsoy Date: Mon Jan 29 15:12:54 2024 +0300 ALSA: usb-audio: Check presence of valid altsetting control Many devices with a single alternate setting do not have a Valid Alternate Setting Control and validation performed by validate_sample_rate_table_v2v3() doesn't work on them and is not really needed. So check the presense of control before sending altsetting validation requests. MOTU Microbook IIc is suffering the most without this check. It takes up to 40 seconds to bootup due to how slow it switches sampling rates: [ 2659.164824] usb 3-2: New USB device found, idVendor=07fd, idProduct=0004, bcdDevice= 0.60 [ 2659.164827] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 2659.164829] usb 3-2: Product: MicroBook IIc [ 2659.164830] usb 3-2: Manufacturer: MOTU [ 2659.166204] usb 3-2: Found last interface = 3 [ 2679.322298] usb 3-2: No valid sample rate available for 1:1, assuming a firmware bug [ 2679.322306] usb 3-2: 1:1: add audio endpoint 0x3 [ 2679.322321] usb 3-2: Creating new data endpoint #3 [ 2679.322552] usb 3-2: 1:1 Set sample rate 96000, clock 1 [ 2684.362250] usb 3-2: 2:1: cannot get freq (v2/v3): err -110 [ 2694.444700] usb 3-2: No valid sample rate available for 2:1, assuming a firmware bug [ 2694.444707] usb 3-2: 2:1: add audio endpoint 0x84 [ 2694.444721] usb 3-2: Creating new data endpoint #84 [ 2699.482103] usb 3-2: 2:1 Set sample rate 96000, clock 1 Signed-off-by: Alexander Tsoy Link: https://lore.kernel.org/r/20240129121254.3454481-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit 6d3c7fb17b4c047ccd0b42cf1308da693ab45acb Author: Keith Busch Date: Wed Jan 24 09:27:27 2024 -0800 nvme: use ctrl state accessor The ctrl->state value is updated in another thread using WRITE_ONCE, so ensure all the readers use the appropriate accessor. Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit e42e29cc442395d62f1a8963ec2dfb700ba6a5d7 Author: Dave Kleikamp Date: Mon Jan 29 08:40:23 2024 -0600 Revert "jfs: fix shift-out-of-bounds in dbJoin" This reverts commit cca974daeb6c43ea971f8ceff5a7080d7d49ee30. The added sanity check is incorrect. BUDMIN is not the wrong value and is too small. Signed-off-by: Dave Kleikamp commit c92c108403b09f75f3393588c2326ecad49ee2e2 Author: Mario Limonciello Date: Fri Jan 19 03:08:37 2024 -0600 Revert "drm/amd/pm: fix the high voltage and temperature issue" This reverts commit 5f38ac54e60562323ea4abb1bfb37d043ee23357. This causes issues with rebooting and the 7800XT. Cc: Kenneth Feng Cc: stable@vger.kernel.org Fixes: 5f38ac54e605 ("drm/amd/pm: fix the high voltage and temperature issue") Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3062 Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ca9ca1a5d5a980550db1001ea825f9fdfa550b83 Author: David Howells Date: Mon Jan 29 09:49:19 2024 +0000 netfs: Fix missing zero-length check in unbuffered write Fix netfs_unbuffered_write_iter() to return immediately if generic_write_checks() returns 0, indicating there's nothing to write. Note that netfs_file_write_iter() already does this. Also, whilst we're at it, put in checks for the size being zero before we even take the locks. Note that generic_write_checks() can still reduce the size to zero, so we still need that check. Without this, a warning similar to the following is logged to dmesg: netfs: Zero-sized write [R=1b6da] and the syscall fails with EIO, e.g.: /sbin/ldconfig.real: Writing of cache extension data failed: Input/output error This can be reproduced on 9p by: xfs_io -f -c 'pwrite 0 0' /xfstest.test/foo Fixes: 153a9961b551 ("netfs: Implement unbuffered/DIO write support") Reported-by: Eric Van Hensbergen Link: https://lore.kernel.org/r/ZbQUU6QKmIftKsmo@FV7GG9FTHL/ Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240129094924.1221977-3-dhowells@redhat.com Tested-by: Dominique Martinet Reviewed-by: Jeff Layton cc: Dominique Martinet cc: Jeff Layton cc: cc: cc: cc: Signed-off-by: Christian Brauner commit 2147caaac7349698f2a392c5e2911a6861a09650 Author: Marc Dionne Date: Mon Jan 29 09:49:18 2024 +0000 netfs: Fix i_dio_count leak on DIO read past i_size If netfs_begin_read gets a NETFS_DIO_READ request that begins past i_size, it won't perform any i/o and just return 0. This will leak an increment to i_dio_count that is done at the top of the function. This can cause subsequent buffered read requests to block indefinitely, waiting for a non existing dio operation to complete. Add a inode_dio_end() for the NETFS_DIO_READ case, before returning. Signed-off-by: Marc Dionne Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240129094924.1221977-2-dhowells@redhat.com Reviewed-by: Jeff Layton cc: Jeff Layton cc: cc: cc: Signed-off-by: Christian Brauner commit 577e4432f3ac810049cb7e6b71f4d96ec7c6e894 Author: Eric Dumazet Date: Thu Jan 25 10:33:17 2024 +0000 tcp: add sanity checks to rx zerocopy TCP rx zerocopy intent is to map pages initially allocated from NIC drivers, not pages owned by a fs. This patch adds to can_map_frag() these additional checks: - Page must not be a compound one. - page->mapping must be NULL. This fixes the panic reported by ZhangPeng. syzbot was able to loopback packets built with sendfile(), mapping pages owned by an ext4 file to TCP rx zerocopy. r3 = socket$inet_tcp(0x2, 0x1, 0x0) mmap(&(0x7f0000ff9000/0x4000)=nil, 0x4000, 0x0, 0x12, r3, 0x0) r4 = socket$inet_tcp(0x2, 0x1, 0x0) bind$inet(r4, &(0x7f0000000000)={0x2, 0x4e24, @multicast1}, 0x10) connect$inet(r4, &(0x7f00000006c0)={0x2, 0x4e24, @empty}, 0x10) r5 = openat$dir(0xffffffffffffff9c, &(0x7f00000000c0)='./file0\x00', 0x181e42, 0x0) fallocate(r5, 0x0, 0x0, 0x85b8) sendfile(r4, r5, 0x0, 0x8ba0) getsockopt$inet_tcp_TCP_ZEROCOPY_RECEIVE(r4, 0x6, 0x23, &(0x7f00000001c0)={&(0x7f0000ffb000/0x3000)=nil, 0x3000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, &(0x7f0000000440)=0x40) r6 = openat$dir(0xffffffffffffff9c, &(0x7f00000000c0)='./file0\x00', 0x181e42, 0x0) Fixes: 93ab6cc69162 ("tcp: implement mmap() for zero copy receive") Link: https://lore.kernel.org/netdev/5106a58e-04da-372a-b836-9d3d0bd2507b@huawei.com/T/ Reported-and-bisected-by: ZhangPeng Signed-off-by: Eric Dumazet Cc: Arjun Roy Cc: Matthew Wilcox Cc: linux-mm@vger.kernel.org Cc: Andrew Morton Cc: linux-fsdevel@vger.kernel.org Signed-off-by: David S. Miller commit bfb007aebe6bff451f7f3a4be19f4f286d0d5d9c Author: Fedor Pchelkin Date: Thu Jan 25 12:53:09 2024 +0300 nfc: nci: free rx_data_reassembly skb on NCI device cleanup rx_data_reassembly skb is stored during NCI data exchange for processing fragmented packets. It is dropped only when the last fragment is processed or when an NTF packet with NCI_OP_RF_DEACTIVATE_NTF opcode is received. However, the NCI device may be deallocated before that which leads to skb leak. As by design the rx_data_reassembly skb is bound to the NCI device and nothing prevents the device to be freed before the skb is processed in some way and cleaned, free it on the NCI device cleanup. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Fixes: 6a2968aaf50c ("NFC: basic NCI protocol implementation") Cc: stable@vger.kernel.org Reported-by: syzbot+6b7c68d9c21e4ee4251b@syzkaller.appspotmail.com Closes: https://lore.kernel.org/lkml/000000000000f43987060043da7b@google.com/ Signed-off-by: Fedor Pchelkin Signed-off-by: David S. Miller commit 37e8c97e539015637cb920d3e6f1e404f707a06e Author: Nikita Zhandarovich Date: Wed Jan 24 02:21:47 2024 -0800 net: hsr: remove WARN_ONCE() in send_hsr_supervision_frame() Syzkaller reported [1] hitting a warning after failing to allocate resources for skb in hsr_init_skb(). Since a WARN_ONCE() call will not help much in this case, it might be prudent to switch to netdev_warn_once(). At the very least it will suppress syzkaller reports such as [1]. Just in case, use netdev_warn_once() in send_prp_supervision_frame() for similar reasons. [1] HSR: Could not send supervision frame WARNING: CPU: 1 PID: 85 at net/hsr/hsr_device.c:294 send_hsr_supervision_frame+0x60a/0x810 net/hsr/hsr_device.c:294 RIP: 0010:send_hsr_supervision_frame+0x60a/0x810 net/hsr/hsr_device.c:294 ... Call Trace: hsr_announce+0x114/0x370 net/hsr/hsr_device.c:382 call_timer_fn+0x193/0x590 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1751 [inline] __run_timers+0x764/0xb20 kernel/time/timer.c:2022 run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035 __do_softirq+0x21a/0x8de kernel/softirq.c:553 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu kernel/softirq.c:632 [inline] irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 ... This issue is also found in older kernels (at least up to 5.10). Cc: stable@vger.kernel.org Reported-by: syzbot+3ae0a3f42c84074b7c8e@syzkaller.appspotmail.com Fixes: 121c33b07b31 ("net: hsr: introduce common code for skb initialization") Signed-off-by: Nikita Zhandarovich Signed-off-by: David S. Miller commit 8eed4e00a370b37b4e5985ed983dccedd555ea9d Author: Qiuxu Zhuo Date: Mon Jan 29 14:38:42 2024 +0800 x86/lib: Revert to _ASM_EXTABLE_UA() for {get,put}_user() fixups During memory error injection test on kernels >= v6.4, the kernel panics like below. However, this issue couldn't be reproduced on kernels <= v6.3. mce: [Hardware Error]: CPU 296: Machine Check Exception: f Bank 1: bd80000000100134 mce: [Hardware Error]: RIP 10: {__get_user_nocheck_4+0x6/0x20} mce: [Hardware Error]: TSC 411a93533ed ADDR 346a8730040 MISC 86 mce: [Hardware Error]: PROCESSOR 0:a06d0 TIME 1706000767 SOCKET 1 APIC 211 microcode 80001490 mce: [Hardware Error]: Run the above through 'mcelog --ascii' mce: [Hardware Error]: Machine check: Data load in unrecoverable area of kernel Kernel panic - not syncing: Fatal local machine check The MCA code can recover from an in-kernel #MC if the fixup type is EX_TYPE_UACCESS, explicitly indicating that the kernel is attempting to access userspace memory. However, if the fixup type is EX_TYPE_DEFAULT the only thing that is raised for an in-kernel #MC is a panic. ex_handler_uaccess() would warn if users gave a non-canonical addresses (with bit 63 clear) to {get, put}_user(), which was unexpected. Therefore, commit b19b74bc99b1 ("x86/mm: Rework address range check in get_user() and put_user()") replaced _ASM_EXTABLE_UA() with _ASM_EXTABLE() for {get, put}_user() fixups. However, the new fixup type EX_TYPE_DEFAULT results in a panic. Commit 6014bc27561f ("x86-64: make access_ok() independent of LAM") added the check gp_fault_address_ok() right before the WARN_ONCE() in ex_handler_uaccess() to not warn about non-canonical user addresses due to LAM. With that in place, revert back to _ASM_EXTABLE_UA() for {get,put}_user() exception fixups in order to be able to handle in-kernel MCEs correctly again. [ bp: Massage commit message. ] Fixes: b19b74bc99b1 ("x86/mm: Rework address range check in get_user() and put_user()") Signed-off-by: Qiuxu Zhuo Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Kirill A. Shutemov Cc: Link: https://lore.kernel.org/r/20240129063842.61584-1-qiuxu.zhuo@intel.com commit 622cd3daa8eae37359a6fd3c07c36d19f66606b5 Author: Christophe JAILLET Date: Fri Nov 10 20:59:22 2023 +0100 fs/ntfs3: Slightly simplify ntfs_inode_printk() The size passed to snprintf() includes the space for the trailing space. So there is no reason here not to use all the available space. So remove the -1 when computing 'name_len'. While at it, use the size of the array directly instead of the intermediate 'name_len' variable. snprintf() also guaranties that the buffer if NULL terminated, so there is no need to write an additional trailing NULL "To be sure". Signed-off-by: Christophe JAILLET Signed-off-by: Konstantin Komarov commit 1f5fa4b3b85ceb43f1053290f0ade037b50e6297 Author: Nekun Date: Mon Oct 30 08:33:54 2023 +0000 fs/ntfs3: Add ioctl operation for directories (FITRIM) While ntfs3 supports discards, FITRIM ioctl() command has defined only for regular files. This may confuse users trying to invoke `fstrim` utility with the directory argument (for example, call `fstrim ` which is the common practice). In this case, ioctl() returns -ENOTTY without any error messages in kernel ring buffer, this may be easily interpreted as no support for discards in ntfs3 driver. Currently only FITRIM command implemented in ntfs_ioctl() and passed inode used only for dereferencing NTFS superblock, so no need for separate ioctl() handler for directories, just add existing ntfs_ioctl() handler to ntfs_dir_operations. Signed-off-by: Nekun Signed-off-by: Konstantin Komarov commit 731ab1f9828800df871c5a7ab9ffe965317d3f15 Author: Edward Adam Davis Date: Sat Dec 30 17:00:03 2023 +0800 fs/ntfs3: Fix oob in ntfs_listxattr The length of name cannot exceed the space occupied by ea. Reported-and-tested-by: syzbot+65e940cfb8f99a97aca7@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Signed-off-by: Konstantin Komarov commit b2dd7b953c25ffd5912dda17e980e7168bebcf6c Author: Dan Carpenter Date: Tue Oct 17 17:04:39 2023 +0300 fs/ntfs3: Fix an NULL dereference bug The issue here is when this is called from ntfs_load_attr_list(). The "size" comes from le32_to_cpu(attr->res.data_size) so it can't overflow on a 64bit systems but on 32bit systems the "+ 1023" can overflow and the result is zero. This means that the kmalloc will succeed by returning the ZERO_SIZE_PTR and then the memcpy() will crash with an Oops on the next line. Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations") Signed-off-by: Dan Carpenter Signed-off-by: Konstantin Komarov commit ebd4acc0cbeae9efea15993b11b05bd32942f3f0 Author: Alexandre Ghiti Date: Tue Jan 23 14:27:30 2024 +0100 riscv: Fix wrong size passed to local_flush_tlb_range_asid() local_flush_tlb_range_asid() takes the size as argument, not the end of the range to flush, so fix this by computing the size from the end and the start of the range. Fixes: 7a92fc8b4d20 ("mm: Introduce flush_cache_vmap_early()") Signed-off-by: Alexandre Ghiti Signed-off-by: Dennis Zhou commit 9c64e749cebd9c2d3d55261530a98bcccb83b950 Author: Sebastian Ott Date: Tue Jan 23 19:14:14 2024 +0100 drm/virtio: Set segment size for virtio_gpu device Set the segment size of the virtio_gpu device to the value used by the drm helpers when allocating sg lists to fix the following complaint from DMA_API debug code: DMA-API: virtio-pci 0000:07:00.0: mapping sg segment longer than device claims to support [len=262144] [max=65536] Cc: stable@vger.kernel.org Tested-by: Zhenyu Zhang Acked-by: Vivek Kasireddy Signed-off-by: Sebastian Ott Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/7258a4cc-da16-5c34-a042-2a23ee396d56@redhat.com commit 82ef1a5356572219f41f9123ca047259a77bd67b Author: Andrey Albershteyn Date: Wed Jan 24 11:26:44 2024 +0100 xfs: reset XFS_ATTR_INCOMPLETE filter on node removal In XFS_DAS_NODE_REMOVE_ATTR case, xfs_attr_mode_remove_attr() sets filter to XFS_ATTR_INCOMPLETE. The filter is then reset in xfs_attr_complete_op() if XFS_DA_OP_REPLACE operation is performed. The filter is not reset though if XFS just removes the attribute (args->value == NULL) with xfs_attr_defer_remove(). attr code goes to XFS_DAS_DONE state. Fix this by always resetting XFS_ATTR_INCOMPLETE filter. The replace operation already resets this filter in anyway and others are completed at this step hence don't need it. Fixes: fdaf1bb3cafc ("xfs: ATTR_REPLACE algorithm with LARP enabled needs rework") Signed-off-by: Andrey Albershteyn Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit c0787fcff88bce36d21e5b726bdeab694baba6a5 Author: Alexander Tsoy Date: Sun Jan 28 16:23:38 2024 +0300 Revert "ALSA: usb-audio: Skip setting clock selector for single connections" This reverts commit 67794f882adca00d043899ac248bc002751da9f6. We need to explicitly set up the clock selector to workaround a problem with the Behringer mixers. This was originally done in d2e8f641257d ("ALSA: usb-audio: Explicitly set up the clock selector") The problem with MOTU M Series mentioned in commit message was fixed in a different way by checking control capabilities of clock selectors. Signed-off-by: Alexander Tsoy Link: https://lore.kernel.org/r/20240128132338.819273-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit f0d78972f27dc1d1d51fbace2713ad3cdc60a877 Author: Luka Guzenko Date: Sun Jan 28 16:57:04 2024 +0100 ALSA: hda/realtek: Enable Mute LED on HP Laptop 14-fq0xxx This HP Laptop uses ALC236 codec with COEF 0x07 controlling the mute LED. Enable existing quirk for this device. Signed-off-by: Luka Guzenko Cc: Link: https://lore.kernel.org/r/20240128155704.2333812-1-l.guzenko@web.de Signed-off-by: Takashi Iwai commit efb56d84dd9c3de3c99fc396abb57c6d330038b5 Author: David Senoner Date: Fri Jan 26 16:56:26 2024 +0100 ALSA: hda/realtek: Fix the external mic not being recognised for Acer Swift 1 SF114-32 If you connect an external headset/microphone to the 3.5mm jack on the Acer Swift 1 SF114-32 it does not recognize the microphone. This fixes that and gives the user the ability to choose between internal and headset mic. Signed-off-by: David Senoner Cc: Link: https://lore.kernel.org/r/20240126155626.2304465-1-seda18@rolmail.net Signed-off-by: Takashi Iwai commit ec4d82f855ce332de26fe080892483de98cc1a19 Author: Mohammad Rahimi Date: Sat Jan 27 11:26:28 2024 +0800 thunderbolt: Fix setting the CNS bit in ROUTER_CS_5 The bit 23, CM TBT3 Not Supported (CNS), in ROUTER_CS_5 indicates whether a USB4 Connection Manager is TBT3-Compatible and should be: 0b for TBT3-Compatible 1b for Not TBT3-Compatible Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4") Cc: stable@vger.kernel.org Signed-off-by: Mohammad Rahimi Signed-off-by: Mika Westerberg commit d68968440b1a75dee05cfac7f368f1aa139e1911 Author: Konstantin Komarov Date: Mon Jan 29 10:30:09 2024 +0300 fs/ntfs3: Update inode->i_size after success write into compressed file Reported-by: Giovanni Santini Signed-off-by: Konstantin Komarov commit 652cfeb43d6b9aba5c7c4902bed7a7340df131fb Author: Konstantin Komarov Date: Fri Jan 26 11:14:31 2024 +0300 fs/ntfs3: Fixed overflow check in mi_enum_attr() Reported-by: Robert Morris Signed-off-by: Konstantin Komarov commit 1b7dd28e14c4728ae1a815605ca33ffb4ce1b309 Author: Konstantin Komarov Date: Fri Jan 26 11:13:59 2024 +0300 fs/ntfs3: Correct function is_rst_area_valid Reported-by: Robert Morris Signed-off-by: Konstantin Komarov commit 4fd6c08a16d7f1ba10212c9ef7bc73218144b463 Author: Konstantin Komarov Date: Fri Jan 26 11:12:38 2024 +0300 fs/ntfs3: Use i_size_read and i_size_write Signed-off-by: Konstantin Komarov commit 5ca87d01eba7bdfe9536a157ca33c1455bb8d16c Author: Konstantin Komarov Date: Fri Jan 26 11:03:21 2024 +0300 fs/ntfs3: Prevent generic message "attempt to access beyond end of device" It used in test environment. Signed-off-by: Konstantin Komarov commit d6d33f03baa43d763fe094ca926eeae7d3421d07 Author: Ism Hong Date: Tue Dec 26 16:51:41 2023 +0800 fs/ntfs3: use non-movable memory for ntfs3 MFT buffer cache Since the buffer cache for ntfs3 metadata is not released until the file system is unmounted, allocating from the movable zone may result in cma allocation failures. This is due to the page still being used by ntfs3, leading to migration failures. To address this, this commit use sb_bread_umovable() instead of sb_bread(). This change prevents allocation from the movable zone, ensuring compatibility with scenarios where the buffer head is not released until unmount. This patch is inspired by commit a8ac900b8163("ext4: use non-movable memory for the ext4 superblock"). The issue is found when playing video files stored in NTFS on the Android TV platform. During this process, the media parser reads the video file, causing ntfs3 to allocate buffer cache from the CMA area. Subsequently, the hardware decoder attempts to allocate memory from the same CMA area. However, the page is still in use by ntfs3, resulting in a migrate failure in alloc_contig_range(). The pinned page and allocating stacktrace reported by page owner shows below: page:ffffffff00b68880 refcount:3 mapcount:0 mapping:ffffff80046aa828 index:0xc0040 pfn:0x20fa4 aops:def_blk_aops ino:0 flags: 0x2020(active|private) page dumped because: migration failure page last allocated via order 0, migratetype Movable, gfp_mask 0x108c48 (GFP_NOFS|__GFP_NOFAIL|__GFP_HARDWALL|__GFP_MOVABLE), page_owner tracks the page as allocated prep_new_page get_page_from_freelist __alloc_pages_nodemask pagecache_get_page __getblk_gfp __bread_gfp ntfs_read_run_nb ntfs_read_bh mi_read ntfs_iget5 dir_search_u ntfs_lookup __lookup_slow lookup_slow walk_component path_lookupat Signed-off-by: Ism Hong Signed-off-by: Konstantin Komarov commit c79f52f0656eeb3e4a12f7f358f760077ae111b6 Author: Jens Axboe Date: Sat Jan 27 13:44:58 2024 -0700 io_uring/rw: ensure poll based multishot read retries appropriately io_read_mshot() always relies on poll triggering retries, and this works fine as long as we do a retry per size of the buffer being read. The buffer size is given by the size of the buffer(s) in the given buffer group ID. But if we're reading less than what is available, then we don't always get to read everything that is available. For example, if the buffers available are 32 bytes and we have 64 bytes to read, then we'll correctly read the first 32 bytes and then wait for another poll trigger before we attempt the next read. This next poll trigger may never happen, in which case we just sit forever and never make progress, or it may trigger at some point in the future, and now we're just delivering the available data much later than we should have. io_read_mshot() could do retries itself, but that is wasteful as we'll be going through all of __io_read() again, and most likely in vain. Rather than do that, bump our poll reference count and have io_poll_check_events() do one more loop and check with vfs_poll() if we have more data to read. If we do, io_read_mshot() will get invoked again directly and we'll read the next chunk. io_poll_multishot_retry() must only get called from inside io_poll_issue(), which is our multishot retry handler, as we know we already "own" the request at this point. Cc: stable@vger.kernel.org Link: https://github.com/axboe/liburing/issues/1041 Fixes: fc68fcda0491 ("io_uring/rw: add support for IORING_OP_READ_MULTISHOT") Signed-off-by: Jens Axboe commit 6bb3f7f4c3f4da8e09de188f2f63e8f741bba3bd Author: Guoyu Ou Date: Sun Jan 28 16:46:17 2024 +0800 bcachefs: unlock parent dir if entry is not found in subvolume deletion Parent dir is locked by user_path_locked_at() before validating the required dentry. It should be unlocked if we can not perform the deletion. This fixes the problem: $ bcachefs subvolume delete not-exist-entry BCH_IOCTL_SUBVOLUME_DESTROY ioctl error: No such file or directory $ bcachefs subvolume delete not-exist-entry the second will stuck because the parent dir is locked in the previous deletion. Signed-off-by: Guoyu Ou Signed-off-by: Kent Overstreet commit eba38cc7578bef94865341c73608bdf49193a51d Author: Helge Deller Date: Sun Jan 28 09:53:55 2024 +0100 bcachefs: Fix build on parisc by avoiding __multi3() The gcc compiler on paric does support the __int128 type, although the architecture does not have native 128-bit support. The effect is, that the bcachefs u128_square() function will pull in the libgcc __multi3() helper, which breaks the kernel build when bcachefs is built as module since this function isn't currently exported in arch/parisc/kernel/parisc_ksyms.c. The build failure can be seen in the latest debian kernel build at: https://buildd.debian.org/status/fetch.php?pkg=linux&arch=hppa&ver=6.7.1-1%7Eexp1&stamp=1706132569&raw=0 We prefer to not export that symbol, so fall back to the optional 64-bit implementation provided by bcachefs and thus avoid usage of __multi3(). Signed-off-by: Helge Deller Cc: Kent Overstreet Signed-off-by: Kent Overstreet commit 41bccc98fb7931d63d03f326a746ac4d429c1dd3 Author: Linus Torvalds Date: Sun Jan 28 17:01:12 2024 -0800 Linux 6.8-rc2 commit 3eb5ca857d38ae7a694de6e59a3de7990af87919 Merge: 4854cf9c61d06 d76779dd3681c Author: Linus Torvalds Date: Sun Jan 28 13:55:56 2024 -0800 Merge tag 'cxl-fixes-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull cxl fixes from Dan Williams: "A build regression fix, a device compatibility fix, and an original bug preventing creation of large (16 device) interleave sets: - Fix unit test build regression fallout from global "missing-prototypes" change - Fix compatibility with devices that do not support interrupts - Fix overflow when calculating the capacity of large interleave sets" * tag 'cxl-fixes-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/region:Fix overflow issue in alloc_hpa() cxl/pci: Skip irq features if MSI/MSI-X are not supported tools/testing/nvdimm: Disable "missing prototypes / declarations" warnings tools/testing/cxl: Disable "missing prototypes / declarations" warnings commit 29142dc92c37d3259a33aef15b03e6ee25b0d188 Author: Linus Torvalds Date: Sat Jan 27 13:21:14 2024 -0800 tracefs: remove stale 'update_gid' code The 'eventfs_update_gid()' function is no longer called, so remove it (and the helper function it uses). Link: https://lore.kernel.org/all/CAHk-=wj+DsZZ=2iTUkJ-Nojs9fjYMvPs1NuoM3yK7aTDtJfPYQ@mail.gmail.com/ Fixes: 8186fff7ab64 ("tracefs/eventfs: Use root and instance inodes as default ownership") Signed-off-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit 4854cf9c61d060209d2b431f4a787f6952967022 Merge: 648f575d5e626 59be5c3585017 Author: Linus Torvalds Date: Sun Jan 28 10:43:06 2024 -0800 Merge tag 'mips-fixes_6.8_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix boot issue on single core Lantiq Danube devices - fix boot issue on Loongson64 platforms - fix improper FPU setup - fix missing prototypes issues * tag 'mips-fixes_6.8_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mips: Call lose_fpu(0) before initializing fcr31 in mips_set_personality_nan MIPS: loongson64: set nid for reserved memblock region Revert "MIPS: loongson64: set nid for reserved memblock region" MIPS: lantiq: register smp_ops on non-smp platforms MIPS: loongson64: set nid for reserved memblock region MIPS: reserve exception vector space ONLY ONCE MIPS: BCM63XX: Fix missing prototypes MIPS: sgi-ip32: Fix missing prototypes MIPS: sgi-ip30: Fix missing prototypes MIPS: fw arc: Fix missing prototypes MIPS: sgi-ip27: Fix missing prototypes MIPS: Alchemy: Fix missing prototypes MIPS: Cobalt: Fix missing prototypes commit 648f575d5e626f8d45ef0989db60ea60a9067560 Merge: 0e4363ac1a212 e626cb02ee839 Author: Linus Torvalds Date: Sun Jan 28 10:38:16 2024 -0800 Merge tag 'locking_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Borislav Petkov: - Prevent an inconsistent futex operation leading to stale state exposure * tag 'locking_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Prevent the reuse of stale pi_state commit 0e4363ac1a21268c0c02ff65e16b3d33dde3bee8 Merge: 90db544ebaf43 b184c8c2889ce Author: Linus Torvalds Date: Sun Jan 28 10:34:55 2024 -0800 Merge tag 'irq_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Borislav Petkov: - Initialize the resend node of each IRQ descriptor, not only the first one * tag 'irq_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Initialize resend_node hlist for all interrupt descriptors commit 90db544ebaf4325044402cdfecf1cf9247ca3ae6 Merge: 9d451912dbef7 9a574ea9069be Author: Linus Torvalds Date: Sun Jan 28 10:33:14 2024 -0800 Merge tag 'timers_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Borislav Petkov: - Preserve the number of idle calls and sleep entries across CPU hotplug events in order to be able to compute correct averages - Limit the duration of the clocksource watchdog checking interval as too long intervals lead to wrongly marking the TSC as unstable * tag 'timers_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick/sched: Preserve number of idle sleeps across CPU hotplug events clocksource: Skip watchdog check for large watchdog intervals commit df77288f7e3accf246785c53cd5f117fc5d81611 Author: Neil Armstrong Date: Thu Jan 11 17:58:50 2024 +0100 arm64: dts: qcom: sm8650-mtp: add gpio74 as reserved gpio The TLMM gpio74 is also used to communicate with the secure NFC on-board module, some variants of the SM8650-MTP board requires this GPIO to be dedicated to the secure firmware and set reserved in order to successfully initialize the TLMM GPIOs from HLOS (Linux). On the other boards this GPIO is unused so it's still safe to mark the GPIO as reserved. Fixes: 6fbdb3c1fac7 ("arm64: dts: qcom: sm8650: add initial SM8650 MTP dts") Reported-by: Georgi Djakov Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Tested-by: Georgi Djakov Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240111-topic-sm8650-upstream-qrd-fix-gpio-reserved-v1-2-fad39b4c5def@linaro.org Signed-off-by: Bjorn Andersson commit 361bb7c961403173be109d8892f3c23096dc098d Author: Neil Armstrong Date: Thu Jan 11 17:58:49 2024 +0100 arm64: dts: qcom: sm8650-qrd: add gpio74 as reserved gpio The TLMM gpio74 is also used to communicate with the secure NFC on-board module, some variants of the SM8650-QRD board requires this GPIO to be dedicated to the secure firmware and set reserved in order to successfully initialize the TLMM GPIOs from HLOS (Linux). On the other boards this GPIO is unused so it's still safe to mark the GPIO as reserved. Fixes: a834911d50c1 ("arm64: dts: qcom: sm8650: add initial SM8650 QRD dts") Reported-by: Georgi Djakov Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Reviewed-by: Elliot Berman Link: https://lore.kernel.org/r/20240111-topic-sm8650-upstream-qrd-fix-gpio-reserved-v1-1-fad39b4c5def@linaro.org Signed-off-by: Bjorn Andersson commit 9d451912dbef72b4b4dcaa99229f98b309338b39 Merge: a08ebda97e2a3 b9328fd636bd5 Author: Linus Torvalds Date: Sun Jan 28 09:45:11 2024 -0800 Merge tag 'x86_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Make sure 32-bit syscall registers are properly sign-extended - Add detection for AMD's Zen5 generation CPUs and Intel's Clearwater Forest CPU model number - Make a stub function export non-GPL because it is part of the paravirt alternatives and that can be used by non-GPL code * tag 'x86_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/CPU/AMD: Add more models to X86_FEATURE_ZEN5 x86/entry/ia32: Ensure s32 is sign extended to s64 x86/cpu: Add model number for Intel Clearwater Forest processor x86/CPU/AMD: Add X86_FEATURE_ZEN5 x86/paravirt: Make BUG_func() usable by non-GPL modules commit a08ebda97e2a32b8f1de2c8240337f726c2e1ba7 Merge: 8a696a29c6905 6a9531c3a8809 Author: Linus Torvalds Date: Sun Jan 28 09:41:39 2024 -0800 Merge tag 'fixes-2024-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock fix from Mike Rapoport: "Fix crash when reserved memory is not added to memory. When CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, the initialization of reserved pages may cause access of NODE_DATA() with invalid nid and crash. Add a fall back to early_pfn_to_nid() in memmap_init_reserved_pages() to ensure a valid node id is always passed to init_reserved_page()" * tag 'fixes-2024-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock: fix crash when reserved memory is not added to memory commit 6f6c72acddf4357fcc83593c20ef9064fb42db92 Author: Javier Carrasco Date: Sat Jan 27 21:02:08 2024 +0100 iio: move LIGHT_UVA and LIGHT_UVB to the end of iio_modifier The new modifiers should have added to the end of the enum, so they do not affect the existing entries. No modifiers were added since then, so they can be moved safely to the end of the list. Move IIO_MOD_LIGHT_UVA and IIO_MOD_LIGHT_UVB to the end of iio_modifier. Fixes: b89710bd215e ("iio: add modifiers for A and B ultraviolet light") Suggested-by: Paul Cercueil Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20240127200208.185815-1-javier.carrasco.cruz@gmail.com Signed-off-by: Jonathan Cameron commit 20e08a720cc526dacc0678067ffc81613aa738ca Author: Helge Deller Date: Mon Jan 22 17:51:15 2024 +0100 parisc: Drop unneeded semicolon in parse_tree_node() Reported-by: kernel test robot Signed-off-by: Helge Deller Closes: https://lore.kernel.org/oe-kbuild-all/202401222059.Wli6OGT0-lkp@intel.com/ commit c8708d758e715c3824a73bf0cda97292b52be44d Author: Helge Deller Date: Fri Jan 19 21:16:39 2024 +0100 parisc: Prevent hung tasks when printing inventory on serial console Printing the inventory on a serial console can be quite slow and thus may trigger the hung task detector (CONFIG_DETECT_HUNG_TASK=y) and possibly reboot the machine. Adding a cond_resched() prevents this. Signed-off-by: Helge Deller Cc: # v6.0+ commit b9402e3b97289ca9e0f0f79f4df64bd6c9176a86 Author: Helge Deller Date: Wed Jan 17 17:46:43 2024 +0100 parisc: Check for valid stride size for cache flushes Report if the calculated cache stride size is zero, otherwise the cache flushing routine will never finish and hang the machine. This can be reproduced with a testcase in qemu, where the firmware reports wrong cache values. Signed-off-by: Helge Deller commit 2751153b9945c31eb905deb9fbe2d7f127b4b34c Author: Helge Deller Date: Fri Dec 1 21:20:50 2023 +0100 parisc: Make RO_DATA page aligned in vmlinux.lds.S The rodata_test program for CONFIG_DEBUG_RODATA_TEST=y complains if read-only data does not start at page boundary. Signed-off-by: Helge Deller commit b35f8dbbce818b02c730dc85133dc7754266e084 Author: Hugo Villeneuve Date: Tue Jan 16 16:30:01 2024 -0500 serial: max310x: prevent infinite while() loop in port startup If there is a problem after resetting a port, the do/while() loop that checks the default value of DIVLSB register may run forever and spam the I2C bus. Add a delay before each read of DIVLSB, and a maximum number of tries to prevent that situation from happening. Also fail probe if port reset is unsuccessful. Fixes: 10d8b34a4217 ("serial: max310x: Driver rework") Cc: stable@vger.kernel.org Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20240116213001.3691629-5-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 8afa6c6decea37e7cb473d2c60473f37f46cea35 Author: Hugo Villeneuve Date: Tue Jan 16 16:30:00 2024 -0500 serial: max310x: fail probe if clock crystal is unstable A stable clock is really required in order to use this UART, so log an error message and bail out if the chip reports that the clock is not stable. Fixes: 4cf9a888fd3c ("serial: max310x: Check the clock readiness") Cc: stable@vger.kernel.org Suggested-by: Jan Kundrát Link: https://www.spinics.net/lists/linux-serial/msg35773.html Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20240116213001.3691629-4-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 93cd256ab224c2519e7c4e5f58bb4f1ac2bf0965 Author: Hugo Villeneuve Date: Tue Jan 16 16:29:59 2024 -0500 serial: max310x: improve crystal stable clock detection Some people are seeing a warning similar to this when using a crystal: max310x 11-006c: clock is not stable yet The datasheet doesn't mention the maximum time to wait for the clock to be stable when using a crystal, and it seems that the 10ms delay in the driver is not always sufficient. Jan Kundrát reported that it took three tries (each separated by 10ms) to get a stable clock. Modify behavior to check stable clock ready bit multiple times (20), and waiting 10ms between each try. Note: the first draft of the driver originally used a 50ms delay, without checking the clock stable bit. Then a loop with 1000 retries was implemented, each time reading the clock stable bit. Fixes: 4cf9a888fd3c ("serial: max310x: Check the clock readiness") Cc: stable@vger.kernel.org Suggested-by: Jan Kundrát Link: https://www.spinics.net/lists/linux-serial/msg35773.html Link: https://lore.kernel.org/all/20240110174015.6f20195fde08e5c9e64e5675@hugovil.com/raw Link: https://github.com/boundarydevices/linux/commit/e5dfe3e4a751392515d78051973190301a37ca9a Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20240116213001.3691629-3-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 0419373333c2f2024966d36261fd82a453281e80 Author: Hugo Villeneuve Date: Tue Jan 16 16:29:58 2024 -0500 serial: max310x: set default value when reading clock ready bit If regmap_read() returns a non-zero value, the 'val' variable can be left uninitialized. Clear it before calling regmap_read() to make sure we properly detect the clock ready bit. Fixes: 4cf9a888fd3c ("serial: max310x: Check the clock readiness") Cc: stable@vger.kernel.org Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20240116213001.3691629-2-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 30926783a46841c2d1bbf3f74067ba85d304fd0d Author: Gui-Dong Han <2045gemini@gmail.com> Date: Fri Jan 12 19:36:24 2024 +0800 serial: core: Fix atomicity violation in uart_tiocmget In uart_tiocmget(): result = uport->mctrl; uart_port_lock_irq(uport); result |= uport->ops->get_mctrl(uport); uart_port_unlock_irq(uport); ... return result; In uart_update_mctrl(): uart_port_lock_irqsave(port, &flags); ... port->mctrl = (old & ~clear) | set; ... port->ops->set_mctrl(port, port->mctrl); ... uart_port_unlock_irqrestore(port, flags); An atomicity violation is identified due to the concurrent execution of uart_tiocmget() and uart_update_mctrl(). After assigning result = uport->mctrl, the mctrl value may change in uart_update_mctrl(), leading to a mismatch between the value returned by uport->ops->get_mctrl(uport) and the mctrl value previously read. This can result in uart_tiocmget() returning an incorrect value. This possible bug is found by an experimental static analysis tool developed by our team, BassCheck[1]. This tool analyzes the locking APIs to extract function pairs that can be concurrently executed, and then analyzes the instructions in the paired functions to identify possible concurrency bugs including data races and atomicity violations. The above possible bug is reported when our tool analyzes the source code of Linux 5.17. To address this issue, it is suggested to move the line result = uport->mctrl inside the uart_port_lock block to ensure atomicity and prevent the mctrl value from being altered during the execution of uart_tiocmget(). With this patch applied, our tool no longer reports the bug, with the kernel configuration allyesconfig for x86_64. Due to the absence of the requisite hardware, we are unable to conduct runtime testing of the patch. Therefore, our verification is solely based on code logic analysis. [1] https://sites.google.com/view/basscheck/ Fixes: c5f4644e6c8b ("[PATCH] Serial: Adjust serial locking") Cc: stable@vger.kernel.org Signed-off-by: Gui-Dong Han <2045gemini@gmail.com> Link: https://lore.kernel.org/r/20240112113624.17048-1-2045gemini@gmail.com Signed-off-by: Greg Kroah-Hartman commit 86ee55e9bc7ff7308eda67e5bcb3f8c834c7c113 Author: Dan Carpenter Date: Wed Jan 10 22:25:21 2024 +0300 serial: 8250_pci1xxxx: fix off by one in pci1xxxx_process_read_data() These > comparisons should be >= to prevent writing one element beyond the end of the rx_buff[] array. The rx_buff[] buffer has RX_BUF_SIZE elements. Fix the buffer overflow. Fixes: aba8290f368d ("8250: microchip: pci1xxxx: Add Burst mode reception support in uart driver for writing into FIFO") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/ZZ7vIfj7Jgh-pJn8@moroto Signed-off-by: Greg Kroah-Hartman commit e15c99be0c915bbe70dfe55450d268d7bd5bdac8 Author: Christoph Niedermaier Date: Fri Jan 19 12:35:16 2024 +0100 tty: serial: Fix bit order in RS485 flag definitions Since the commit 93f3350c46fa ("RS485: fix inconsistencies in the meaning of some variables"), the definition for bit 3 has been removed. But with the switch to bit shift macros in commit 76ac8e29855b ("tty: serial: Cleanup the bit shift with macro"), this gap wasn't preserved. To avoid a break in user/kernel api of the system skip bit 3 again and add a placeholder comment. Signed-off-by: Christoph Niedermaier Fixes: 76ac8e29855b ("tty: serial: Cleanup the bit shift with macro") Fixes: 6056f20f27e9 ("tty: serial: Add RS422 flag to struct serial_rs485") Reviewed-by: Jiri Slaby Cc: Greg Kroah-Hartman Cc: Crescent CY Hsieh Cc: Jiri Slaby Cc: Lukas Wunner Cc: Lino Sanfilippo Cc: Hugo Villeneuve Link: https://lore.kernel.org/r/20240119113516.2944-1-cniedermaier@dh-electronics.com Signed-off-by: Greg Kroah-Hartman commit f2e5d3de7e1fbf24483e7f996e519b3ebc3935a1 Author: Dmitry Baryshkov Date: Sat Jan 13 22:55:48 2024 +0200 usb: typec: tcpm: fix the PD disabled case If the PD is disabled for the port, port->pds will be left as NULL, which causes the following crash during caps intilisation. Fix the crash. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Call trace: tcpm_register_port+0xaec/0xc44 qcom_pmic_typec_probe+0x1a4/0x254 platform_probe+0x68/0xc0 really_probe+0x148/0x2ac __driver_probe_device+0x78/0x12c driver_probe_device+0xd8/0x160 Bluetooth: hci0: QCA Product ID :0x0000000a __device_attach_driver+0xb8/0x138 bus_for_each_drv+0x80/0xdc Bluetooth: hci0: QCA SOC Version :0x40020150 __device_attach+0x9c/0x188 device_initial_probe+0x14/0x20 bus_probe_device+0xac/0xb0 deferred_probe_work_func+0x8c/0xc8 process_one_work+0x1ec/0x51c worker_thread+0x1ec/0x3e4 kthread+0x120/0x124 ret_from_fork+0x10/0x20 Fixes: cd099cde4ed2 ("usb: typec: tcpm: Support multiple capabilities") Signed-off-by: Dmitry Baryshkov Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240113-pmi632-typec-v2-5-182d9aa0a5b3@linaro.org Signed-off-by: Greg Kroah-Hartman commit f3be347ea42dbb0358cd8b2d8dc543a23b70a976 Author: Christian A. Ehrhardt Date: Sun Jan 21 21:41:23 2024 +0100 usb: ucsi_acpi: Quirk to ack a connector change ack cmd The PPM on some Dell laptops seems to expect that the ACK_CC_CI command to clear the connector change notification is in turn followed by another ACK_CC_CI to acknowledge the ACK_CC_CI command itself. This is in violation of the UCSI spec that states: "The only notification that is not acknowledged by the OPM is the command completion notification for the ACK_CC_CI or the PPM_RESET command." Add a quirk to send this ack anyway. Apply the quirk to all Dell systems. On the first command that acks a connector change send a dummy command to determine if it runs into a timeout. Only activate the quirk if it does. This ensure that we do not break Dell systems that do not need the quirk. Signed-off-by: "Christian A. Ehrhardt" Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240121204123.275441-4-lk@c--e.de Signed-off-by: Greg Kroah-Hartman commit 2840143e393a4ddc1caab4372969ea337371168c Author: Christian A. Ehrhardt Date: Sun Jan 21 21:41:22 2024 +0100 usb: ucsi_acpi: Fix command completion handling In case of a spurious or otherwise delayed notification it is possible that CCI still reports the previous completion. The UCSI spec is aware of this and provides two completion bits in CCI, one for normal commands and one for acks. As acks and commands alternate the notification handler can determine if the completion bit is from the current command. The initial UCSI code correctly handled this but the distinction between the two completion bits was lost with the introduction of the new API. To fix this revive the ACK_PENDING bit for ucsi_acpi and only complete commands if the completion bit matches. Fixes: f56de278e8ec ("usb: typec: ucsi: acpi: Move to the new API") Cc: stable@vger.kernel.org Signed-off-by: "Christian A. Ehrhardt" Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240121204123.275441-3-lk@c--e.de Signed-off-by: Greg Kroah-Hartman commit c9aed03a0a683fd1600ea92f2ad32232d4736272 Author: Christian A. Ehrhardt Date: Sun Jan 21 21:41:21 2024 +0100 usb: ucsi: Add missing ppm_lock Calling ->sync_write must be done while holding the PPM lock as the mailbox logic does not support concurrent commands. At least since the addition of partner task this means that ucsi_acknowledge_connector_change should be called with the PPM lock held as it calls ->sync_write. Thus protect the only call to ucsi_acknowledge_connector_change with the PPM. All other calls to ->sync_write already happen under the PPM lock. Fixes: b9aa02ca39a4 ("usb: typec: ucsi: Add polling mechanism for partner tasks like alt mode checking") Cc: stable@vger.kernel.org Signed-off-by: "Christian A. Ehrhardt" Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240121204123.275441-2-lk@c--e.de Signed-off-by: Greg Kroah-Hartman commit 3caf2b2ad7334ef35f55b95f3e1b138c6f77b368 Author: Sean Anderson Date: Fri Jan 26 17:38:00 2024 -0500 usb: ulpi: Fix debugfs directory leak The ULPI per-device debugfs root is named after the ulpi device's parent, but ulpi_unregister_interface tries to remove a debugfs directory named after the ulpi device itself. This results in the directory sticking around and preventing subsequent (deferred) probes from succeeding. Change the directory name to match the ulpi device. Fixes: bd0a0a024f2a ("usb: ulpi: Add debugfs support") Cc: stable@vger.kernel.org Signed-off-by: Sean Anderson Link: https://lore.kernel.org/r/20240126223800.2864613-1-sean.anderson@seco.com Signed-off-by: Greg Kroah-Hartman commit b717dfbf73e842d15174699fe2c6ee4fdde8aa1f Author: Badhri Jagan Sridharan Date: Wed Jan 17 11:47:42 2024 +0000 Revert "usb: typec: tcpm: fix cc role at port reset" This reverts commit 1e35f074399dece73d5df11847d4a0d7a6f49434. Given that ERROR_RECOVERY calls into PORT_RESET for Hi-Zing the CC pins, setting CC pins to default state during PORT_RESET breaks error recovery. 4.5.2.2.2.1 ErrorRecovery State Requirements The port shall not drive VBUS or VCONN, and shall present a high-impedance to ground (above zOPEN) on its CC1 and CC2 pins. Hi-Zing the CC pins is the inteded behavior for PORT_RESET. CC pins are set to default state after tErrorRecovery in PORT_RESET_WAIT_OFF. 4.5.2.2.2.2 Exiting From ErrorRecovery State A Sink shall transition to Unattached.SNK after tErrorRecovery. A Source shall transition to Unattached.SRC after tErrorRecovery. Cc: stable@vger.kernel.org Cc: Frank Wang Fixes: 1e35f074399d ("usb: typec: tcpm: fix cc role at port reset") Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20240117114742.2587779-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 032178972f8e992b90f9794a13265fec8c8314b0 Author: Randy Dunlap Date: Sun Jan 14 16:30:08 2024 -0800 usb: gadget: pch_udc: fix an Excess kernel-doc warning Delete one extraneous line of kernel-doc to prevent a kernel-doc warning: pch_udc.c:297: warning: Excess struct member 'desc' description in 'pch_udc_ep' Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Cc: tomoya-linux@dsn.lapis-semi.com Link: https://lore.kernel.org/r/20240115003008.5763-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit b2d2d7ea0dd09802cf5a0545bf54d8ad8987d20c Author: yuan linyu Date: Tue Jan 23 11:48:29 2024 +0800 usb: f_mass_storage: forbid async queue when shutdown happen When write UDC to empty and unbind gadget driver from gadget device, it is possible that there are many queue failures for mass storage function. The root cause is mass storage main thread alaways try to queue request to receive a command from host if running flag is on, on platform like dwc3, if pull down called, it will not queue request again and return -ESHUTDOWN, but it not affect running flag of mass storage function. Check return code from mass storage function and clear running flag if it is -ESHUTDOWN, also indicate start in/out transfer failure to break loops. Cc: stable Signed-off-by: yuan linyu Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20240123034829.3848409-1-yuanlinyu@hihonor.com Signed-off-by: Greg Kroah-Hartman commit f17c34ffc792bbb520e4b61baa16b6cfc7d44b13 Author: Oliver Neukum Date: Mon Jan 22 16:35:32 2024 +0100 USB: hub: check for alternate port before enabling A_ALT_HNP_SUPPORT The OTG 1.3 spec has the feature A_ALT_HNP_SUPPORT, which tells a device that it is connected to the wrong port. Some devices refuse to operate if you enable that feature, because it indicates to them that they ought to request to be connected to another port. According to the spec this feature may be used based only the following three conditions: 6.5.3 a_alt_hnp_support Setting this feature indicates to the B-device that it is connected to an A-device port that is not capable of HNP, but that the A-device does have an alternate port that is capable of HNP. The A-device is required to set this feature under the following conditions: • the A-device has multiple receptacles • the A-device port that connects to the B-device does not support HNP • the A-device has another port that does support HNP A check for the third and first condition is missing. Add it. Signed-off-by: Oliver Neukum Cc: stable Fixes: 7d2d641c44269 ("usb: otg: don't set a_alt_hnp_support feature for OTG 2.0 device") Link: https://lore.kernel.org/r/20240122153545.12284-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit cc509b6a47e7c8998d9e41c273191299d5d9d631 Author: Xu Yang Date: Fri Jan 19 20:35:37 2024 +0800 usb: chipidea: core: handle power lost in workqueue When power is recycled in usb controller during system power management, the controller will recognize it and switch role if role has been changed during power lost. In current design, it will be completed in resume() function. However, this may bring issues since usb class devices have their pm operations too and these device's resume() functions are still not being called at this point. When usb controller recognized host role should be stopped, these usb class devices will be removed at this point. But these usb class devices can't be removed in some cases, such as scsi devices. Since scsi driver may sync data to U-disk, however it will block there because scsi drvier can only handle pm request when is in suspended state. Therefore, there may exist a dependency between ci_resume() and usb class device's resume(). To break this potential dependency, we need to handle power lost work in a workqueue. Fixes: 74494b33211d ("usb: chipidea: core: add controller resume support when controller is powered off") cc: stable@vger.kernel.org Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20240119123537.3614838-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 61a348857e869432e6a920ad8ea9132e8d44c316 Author: Uttkarsh Aggarwal Date: Fri Jan 19 15:18:25 2024 +0530 usb: dwc3: gadget: Fix NULL pointer dereference in dwc3_gadget_suspend In current scenario if Plug-out and Plug-In performed continuously there could be a chance while checking for dwc->gadget_driver in dwc3_gadget_suspend, a NULL pointer dereference may occur. Call Stack: CPU1: CPU2: gadget_unbind_driver dwc3_suspend_common dwc3_gadget_stop dwc3_gadget_suspend dwc3_disconnect_gadget CPU1 basically clears the variable and CPU2 checks the variable. Consider CPU1 is running and right before gadget_driver is cleared and in parallel CPU2 executes dwc3_gadget_suspend where it finds dwc->gadget_driver which is not NULL and resumes execution and then CPU1 completes execution. CPU2 executes dwc3_disconnect_gadget where it checks dwc->gadget_driver is already NULL because of which the NULL pointer deference occur. Cc: stable@vger.kernel.org Fixes: 9772b47a4c29 ("usb: dwc3: gadget: Fix suspend/resume during device mode") Acked-by: Thinh Nguyen Signed-off-by: Uttkarsh Aggarwal Link: https://lore.kernel.org/r/20240119094825.26530-1-quic_uaggarwa@quicinc.com Signed-off-by: Greg Kroah-Hartman commit de4b5b28c87ccae4da268a53c5df135437f5cfde Author: Heikki Krogerus Date: Mon Jan 15 11:28:20 2024 +0200 usb: dwc3: pci: add support for the Intel Arrow Lake-H This patch adds the necessary PCI ID for Intel Arrow Lake-H devices. Acked-by: Thinh Nguyen Signed-off-by: Heikki Krogerus Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240115092820.1454492-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 12783c0b9e2c7915a50d5ec829630ff2da50472c Author: Udipto Goswami Date: Wed Jan 10 15:28:14 2024 +0530 usb: core: Prevent null pointer dereference in update_port_device_state Currently, the function update_port_device_state gets the usb_hub from udev->parent by calling usb_hub_to_struct_hub. However, in case the actconfig or the maxchild is 0, the usb_hub would be NULL and upon further accessing to get port_dev would result in null pointer dereference. Fix this by introducing an if check after the usb_hub is populated. Fixes: 83cb2604f641 ("usb: core: add sysfs entry for usb device state") Cc: stable@vger.kernel.org Signed-off-by: Udipto Goswami Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20240110095814.7626-1-quic_ugoswami@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 7c4650ded49e5b88929ecbbb631efb8b0838e811 Author: Michal Pecio Date: Thu Jan 25 17:27:37 2024 +0200 xhci: handle isoc Babble and Buffer Overrun events properly xHCI 4.9 explicitly forbids assuming that the xHC has released its ownership of a multi-TRB TD when it reports an error on one of the early TRBs. Yet the driver makes such assumption and releases the TD, allowing the remaining TRBs to be freed or overwritten by new TDs. The xHC should also report completion of the final TRB due to its IOC flag being set by us, regardless of prior errors. This event cannot be recognized if the TD has already been freed earlier, resulting in "Transfer event TRB DMA ptr not part of current TD" error message. Fix this by reusing the logic for processing isoc Transaction Errors. This also handles hosts which fail to report the final completion. Fix transfer length reporting on Babble errors. They may be caused by device malfunction, no guarantee that the buffer has been filled. Signed-off-by: Michal Pecio Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240125152737.2983959-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5372c65e1311a16351ef03dd096ff576e6477674 Author: Mathias Nyman Date: Thu Jan 25 17:27:36 2024 +0200 xhci: process isoc TD properly when there was a transaction error mid TD. The last TRB of a isoc TD might not trigger an event if there was an error event for a TRB mid TD. This is seen on a NEC Corporation uPD720200 USB 3.0 Host After an error mid a multi-TRB TD the xHC should according to xhci 4.9.1 generate events for passed TRBs with IOC flag set if it proceeds to the next TD. This event is either a copy of the original error, or a "success" transfer event. If that event is missing then the driver and xHC host get out of sync as the driver is still expecting a transfer event for that first TD, while xHC host is already sending events for the next TD in the list. This leads to "Transfer event TRB DMA ptr not part of current TD" messages. As a solution we tag the isoc TDs that get error events mid TD. If an event doesn't match the first TD, then check if the tag is set, and event points to the next TD. In that case give back the fist TD and process the next TD normally Make sure TD status and transferred length stay valid in both cases with and without final TD completion event. Reported-by: Michał Pecio Closes: https://lore.kernel.org/linux-usb/20240112235205.1259f60c@foxbook/ Tested-by: Michał Pecio Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240125152737.2983959-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 09f197225cbc35db8ac135659cdd21bc1e29bda0 Author: Mathias Nyman Date: Thu Jan 25 17:27:35 2024 +0200 xhci: fix off by one check when adding a secondary interrupter. The sanity check of interrupter index when adding a new interrupter is off by one. intr_num needs to be smaller than xhci->max_interrupter to fit the array of interrupters. Luckily this doesn't cause any real word harm as xhci_add_interrupter() is always called with a intr_num value smaller than xhci->max_interrupters in any current kernel. Should not be needed for stable as 6.7 kernel and older only supports one interrupter, with intr_num always being zero. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-usb/e9771296-586d-456a-ac24-a82de79bb2e6@moroto.mountain/ Fixes: 4bf398e15aa4 ("xhci: split allocate interrupter into separate alloacte and add parts") Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240125152737.2983959-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a54a594d72f25b08f39d743880a76721fba9ae77 Author: Mathias Nyman Date: Thu Jan 25 17:27:34 2024 +0200 xhci: fix possible null pointer dereference at secondary interrupter removal Don't try to remove a secondary interrupter that is known to be invalid. Also check if the interrupter is valid inside the spinlock that protects the array of interrupters. Found by smatch static checker Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-usb/ffaa0a1b-5984-4a1f-bfd3-9184630a97b9@moroto.mountain/ Fixes: c99b38c41234 ("xhci: add support to allocate several interrupters") Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20240125152737.2983959-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9dc292413c56a2d01e34787d3fc4a76635e4a498 Author: Krishna Kurapati Date: Thu Jan 18 21:18:53 2024 +0530 usb: gadget: ncm: Fix endianness of wMaxSegmentSize variable in ecm_desc Recent commit [1] added support for changing max segment size of the NCM interface via configfs. But the value of segment size value stored in ncm_opts need to be converted to little endian before saving it in ecm_desc. Also while initialising the value of segment size in opts during instance allocation, the value ETH_FRAME_LEN needs to be assigned directly without any conversion as ETH_FRAME_LEN and the variable max_segment_size are native endian. The current implementaion modifies it into little endian thus breaking things for big endian targets. Fix endianness while assigning these variables. While at it, fix up some stray spaces in comments added in code. [1]: https://lore.kernel.org/all/20231221153216.18657-1-quic_kriskura@quicinc.com/ Fixes: 1900daeefd3e ("usb: gadget: ncm: Add support to update wMaxSegmentSize via configfs") Signed-off-by: Krishna Kurapati Reviewed-by: Maciej Żenczykowski Link: https://lore.kernel.org/r/20240118154910.8765-1-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 520b391e3e813c1dd142d1eebb3ccfa6d08c3995 Author: Prashanth K Date: Tue Jan 16 11:28:16 2024 +0530 usb: host: xhci-plat: Add support for XHCI_SG_TRB_CACHE_SIZE_QUIRK Upstream commit bac1ec551434 ("usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK") introduced a new quirk in XHCI which fixes XHC timeout, which was seen on synopsys XHCs while using SG buffers. Currently this quirk can only be set using xhci private data. But there are some drivers like dwc3/host.c which adds adds quirks using software node for xhci device. Hence set this xhci quirk by iterating over device properties. Cc: stable@vger.kernel.org # 5.11 Fixes: bac1ec551434 ("usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK") Signed-off-by: Prashanth K Link: https://lore.kernel.org/r/20240116055816.1169821-3-quic_prashk@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 817349b6d26aadd8b38283a05ce0bab106b4c765 Author: Prashanth K Date: Tue Jan 16 11:28:15 2024 +0530 usb: dwc3: host: Set XHCI_SG_TRB_CACHE_SIZE_QUIRK Upstream commit bac1ec551434 ("usb: xhci: Set quirk for XHCI_SG_TRB_CACHE_SIZE_QUIRK") introduced a new quirk in XHCI which fixes XHC timeout, which was seen on synopsys XHCs while using SG buffers. But the support for this quirk isn't present in the DWC3 layer. We will encounter this XHCI timeout/hung issue if we run iperf loopback tests using RTL8156 ethernet adaptor on DWC3 targets with scatter-gather enabled. This gets resolved after enabling the XHCI_SG_TRB_CACHE_SIZE_QUIRK. This patch enables it using the xhci device property since its needed for DWC3 controller. In Synopsys DWC3 databook, Table 9-3: xHCI Debug Capability Limitations Chained TRBs greater than TRB cache size: The debug capability driver must not create a multi-TRB TD that describes smaller than a 1K packet that spreads across 8 or more TRBs on either the IN TR or the OUT TR. Cc: stable@vger.kernel.org #5.11 Signed-off-by: Prashanth K Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20240116055816.1169821-2-quic_prashk@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 20d03ae36ec010aa97a97495d9dd9202cb93cb87 Author: Udipto Goswami Date: Mon Jan 8 18:57:20 2024 +0530 usb: gadget: ncm: Fix indentations in documentation of NCM section Currently, the section of NCM which describes attributes are having wrong indentation. Fix this by following the correct format recommended. Fixes: 1900daeefd3e ("usb: gadget: ncm: Add support to update wMaxSegmentSize via configfs") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/all/20240108160221.743649b5@canb.auug.org.au/ Signed-off-by: Udipto Goswami Link: https://lore.kernel.org/r/20240108132720.7786-1-quic_ugoswami@quicinc.com Signed-off-by: Greg Kroah-Hartman commit becc24e96ad4b9bc5c5bba800dc184661b6702bc Author: Ian Rogers Date: Thu Jan 4 15:19:03 2024 -0800 perf vendor events intel: Alderlake/sapphirerapids metric fixes As events are deduplicated by name, ensure PMU prefixes are always used in metrics. Previously they may be missed on the first event in a formula. Update metric constraints for architectures with topdown l2 events. Conversion script updated in: https://github.com/intel/perfmon/pull/128 Reported-by: Arnaldo Carvalho de Melo Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Closes: https://lore.kernel.org/lkml/ZZam-EG-UepcXtWw@kernel.org/ Link: https://lore.kernel.org/r/20240104231903.775717-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e30dca91e5667568a6be54886020c43f1f6f95d3 Author: Arnaldo Carvalho de Melo Date: Sat Jan 27 14:52:23 2024 -0300 tools headers UAPI: Sync kvm headers with the kernel sources To pick the changes in: a5d3df8ae13fada7 ("KVM: remove deprecated UAPIs") 6d72283526090850 ("KVM x86/xen: add an override for PVCLOCK_TSC_STABLE_BIT") 89ea60c2c7b5838b ("KVM: x86: Add support for "protected VMs" that can utilize private memory") 8dd2eee9d526c30f ("KVM: x86/mmu: Handle page fault for private memory") a7800aa80ea4d535 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory") 5a475554db1e476a ("KVM: Introduce per-page memory attributes") 16f95f3b95caded2 ("KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace") bb58b90b1a8f753b ("KVM: Introduce KVM_SET_USER_MEMORY_REGION2") 3f9cd0ca848413fd ("KVM: arm64: Allow userspace to get the writable masks for feature ID registers") That automatically adds support for some new ioctls and remove a bunch of deprecated ones. This ends up making the new binary to forget about the deprecated one, so when used in an older system it will not be able to resolve those codes to strings. $ 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 2024-01-27 14:48:16.523014020 -0300 +++ after 2024-01-27 14:48:24.183932866 -0300 @@ -14,6 +14,7 @@ [0x46] = "SET_USER_MEMORY_REGION", [0x47] = "SET_TSS_ADDR", [0x48] = "SET_IDENTITY_MAP_ADDR", + [0x49] = "SET_USER_MEMORY_REGION2", [0x60] = "CREATE_IRQCHIP", [0x61] = "IRQ_LINE", [0x62] = "GET_IRQCHIP", @@ -22,14 +23,8 @@ [0x65] = "GET_PIT", [0x66] = "SET_PIT", [0x67] = "IRQ_LINE_STATUS", - [0x69] = "ASSIGN_PCI_DEVICE", [0x6a] = "SET_GSI_ROUTING", - [0x70] = "ASSIGN_DEV_IRQ", [0x71] = "REINJECT_CONTROL", - [0x72] = "DEASSIGN_PCI_DEVICE", - [0x73] = "ASSIGN_SET_MSIX_NR", - [0x74] = "ASSIGN_SET_MSIX_ENTRY", - [0x75] = "DEASSIGN_DEV_IRQ", [0x76] = "IRQFD", [0x77] = "CREATE_PIT2", [0x78] = "SET_BOOT_CPU_ID", @@ -66,7 +61,6 @@ [0x9f] = "GET_VCPU_EVENTS", [0xa0] = "SET_VCPU_EVENTS", [0xa3] = "ENABLE_CAP", - [0xa4] = "ASSIGN_SET_INTX_MASK", [0xa5] = "SIGNAL_MSI", [0xa6] = "GET_XCRS", [0xa7] = "SET_XCRS", @@ -97,6 +91,8 @@ [0xcd] = "SET_SREGS2", [0xce] = "GET_STATS_FD", [0xd0] = "XEN_HVM_EVTCHN_SEND", + [0xd2] = "SET_MEMORY_ATTRIBUTES", + [0xd4] = "CREATE_GUEST_MEMFD", [0xe0] = "CREATE_DEVICE", [0xe1] = "SET_DEVICE_ATTR", [0xe2] = "GET_DEVICE_ATTR", $ This silences these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Cc: Adrian Hunter Cc: Chao Peng Cc: Ian Rogers Cc: Jing Zhang Cc: Jiri Olsa Cc: Namhyung Kim Cc: Oliver Upton Cc: Paolo Bonzini Cc: Paul Durrant Cc: Sean Christopherson Link: https://lore.kernel.org/lkml/ZbVLbkngp4oq13qN@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8a696a29c6905594e4abf78eaafcb62165ac61f1 Merge: 955340433a792 1abdf288b0ef5 Author: Linus Torvalds Date: Sat Jan 27 09:48:55 2024 -0800 Merge tag 'platform-drivers-x86-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - WMI bus driver fixes - Second attempt (previously reverted) at P2SB PCI rescan deadlock fix - AMD PMF driver improvements - MAINTAINERS updates - Misc other small fixes and hw-id additions * tag 'platform-drivers-x86-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: touchscreen_dmi: Add info for the TECLAST X16 Plus tablet platform/x86/intel/ifs: Call release_firmware() when handling errors. platform/x86/amd/pmf: Fix memory leak in amd_pmf_get_pb_data() platform/x86/amd/pmf: Get ambient light information from AMD SFH driver platform/x86/amd/pmf: Get Human presence information from AMD SFH driver platform/mellanox: mlxbf-pmc: Fix offset calculation for crspace events platform/mellanox: mlxbf-tmfifo: Drop Tx network packet when Tx TmFIFO is full MAINTAINERS: remove defunct acpi4asus project info from asus notebooks section MAINTAINERS: add Luke Jones as maintainer for asus notebooks MAINTAINERS: Remove Perry Yuan as DELL WMI HARDWARE PRIVACY SUPPORT maintainer platform/x86: silicom-platform: Add missing "Description:" for power_cycle sysfs attr platform/x86: intel-wmi-sbl-fw-update: Fix function name in error message platform/x86: p2sb: Use pci_resource_n() in p2sb_read_bar0() platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe platform/x86: intel-uncore-freq: Fix types in sysfs callbacks platform/x86: wmi: Fix wmi_dev_probe() platform/x86: wmi: Fix notify callback locking platform/x86: wmi: Decouple legacy WMI notify handlers from wmi_block_list platform/x86: wmi: Return immediately if an suitable WMI event is found platform/x86: wmi: Fix error handling in legacy WMI notify handler functions commit 955340433a7926ab80838e904814461598adcd8c Merge: cd2286fc57752 48ef9e87b407f Author: Linus Torvalds Date: Sat Jan 27 09:44:40 2024 -0800 Merge tag 'loongarch-fixes-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch fixes from Huacai Chen: "Fix boot failure on machines with more than 8 nodes, and fix two build errors about KVM" * tag 'loongarch-fixes-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: KVM: Add returns to SIMD stubs LoongArch: KVM: Fix build due to API changes LoongArch/smp: Call rcutree_report_cpu_starting() at tlb_init() commit cd2286fc577526f0a6798f68977a95eb85fe3d52 Merge: 064a4a5bfac8b d8d222e09dab8 Author: Linus Torvalds Date: Sat Jan 27 09:17:01 2024 -0800 Merge tag 'xfs-6.8-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Chandan Babu: - Fix read only mounts when using fsopen mount API * tag 'xfs-6.8-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: read only mounts with fsopen mount API are busted commit 064a4a5bfac8bb24af08ec8a4c2664ff61a06f16 Merge: 8c6f6a76465a4 d2fda304bb739 Author: Linus Torvalds Date: Sat Jan 27 09:11:52 2024 -0800 Merge tag 'bcachefs-2024-01-26' of https://evilpiepirate.org/git/bcachefs Pull bcachefs fixes from Kent Overstreet: - fix for REQ_OP_FLUSH usage; this fixes filesystems going read only with -EOPNOTSUPP from the block layer. (this really should have gone in with the block layer patch causing the -EOPNOTSUPP, or should have gone in before). - fix an allocation in non-sleepable context - fix one source of srcu lock latency, on devices with terrible discard latency - fix a reattach_inode() issue in fsck * tag 'bcachefs-2024-01-26' of https://evilpiepirate.org/git/bcachefs: bcachefs: __lookup_dirent() works in snapshot, not subvol bcachefs: discard path uses unlock_long() bcachefs: fix incorrect usage of REQ_OP_FLUSH bcachefs: Add gfp flags param to bch2_prt_task_backtrace() commit 8c6f6a76465a4c001770992867b0a4985d20f927 Merge: d1bba17e20d51 ebeae8adf89d9 Author: Linus Torvalds Date: Sat Jan 27 09:06:56 2024 -0800 Merge tag '6.8-rc2-smb3-server-fixes' of git://git.samba.org/ksmbd Pull smb server fixes from Steve French: - Fix netlink OOB - Minor kernel doc fix * tag '6.8-rc2-smb3-server-fixes' of git://git.samba.org/ksmbd: ksmbd: fix global oob in ksmbd_nl_policy smb: Fix some kernel-doc comments commit d1bba17e20d513e09d0977afc82cd85b91d0fef8 Merge: 3a5879d495b22 993d1c346b1a5 Author: Linus Torvalds Date: Sat Jan 27 09:02:42 2024 -0800 Merge tag '6.8-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: "Nine cifs/smb client fixes - Four network error fixes (three relating to replays of requests that need to be retried, and one fixing some places where we were returning the wrong rc up the stack on network errors) - Two multichannel fixes including locking fix and case where subset of channels need reconnect - netfs integration fixup: share remote i_size with netfslib - Two small cleanups (one for addressing a clang warning)" * tag '6.8-rc1-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix stray unlock in cifs_chan_skip_or_disable cifs: set replay flag for retries of write command cifs: commands that are retried should have replay flag set cifs: helper function to check replayable error codes cifs: translate network errors on send to -ECONNABORTED cifs: cifs_pick_channel should try selecting active channels cifs: Share server EOF pos with netfslib smb: Work around Clang __bdos() type confusion smb: client: delete "true", "false" defines commit 397586506c3da005b9333ce5947ad01e8018a3be Author: Nathan Chancellor Date: Tue Jan 23 15:59:55 2024 -0700 modpost: Add '.ltext' and '.ltext.*' to TEXT_SECTIONS After the linked LLVM change, building ARCH=um defconfig results in a segmentation fault in modpost. Prior to commit a23e7584ecf3 ("modpost: unify 'sym' and 'to' in default_mismatch_handler()"), there was a warning: WARNING: modpost: vmlinux.o(__ex_table+0x88): Section mismatch in reference to the .ltext:(unknown) WARNING: modpost: The relocation at __ex_table+0x88 references section ".ltext" which is not in the list of authorized sections. If you're adding a new section and/or if this reference is valid, add ".ltext" to the list of authorized sections to jump to on fault. This can be achieved by adding ".ltext" to OTHER_TEXT_SECTIONS in scripts/mod/modpost.c. The linked LLVM change moves global objects to the '.ltext' (and '.ltext.*' with '-ffunction-sections') sections with '-mcmodel=large', which ARCH=um uses. These sections should be handled just as '.text' and '.text.*' are, so add them to TEXT_SECTIONS. Cc: stable@vger.kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/1981 Link: https://github.com/llvm/llvm-project/commit/4bf8a688956a759b7b6b8d94f42d25c13c7af130 Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 846cfbeed09b45d985079a9173cf390cc053715b Author: Nathan Chancellor Date: Tue Jan 23 15:59:54 2024 -0700 um: Fix adding '-no-pie' for clang The kernel builds with -fno-PIE, so commit 883354afbc10 ("um: link vmlinux with -no-pie") added the compiler linker flag '-no-pie' via cc-option because '-no-pie' was only supported in GCC 6.1.0 and newer. While this works for GCC, this does not work for clang because cc-option uses '-c', which stops the pipeline right before linking, so '-no-pie' is unconsumed and clang warns, causing cc-option to fail just as it would if the option was entirely unsupported: $ clang -Werror -no-pie -c -o /dev/null -x c /dev/null clang-16: error: argument unused during compilation: '-no-pie' [-Werror,-Wunused-command-line-argument] A recent version of clang exposes this because it generates a relocation under '-mcmodel=large' that is not supported in PIE mode: /usr/sbin/ld: init/main.o: relocation R_X86_64_32 against symbol `saved_command_line' can not be used when making a PIE object; recompile with -fPIE /usr/sbin/ld: failed to set dynamic section sizes: bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) Remove the cc-option check altogether. It is wasteful to invoke the compiler to check for '-no-pie' because only one supported compiler version does not support it, GCC 5.x (as it is supported with the minimum version of clang and GCC 6.1.0+). Use a combination of the gcc-min-version macro and CONFIG_CC_IS_CLANG to unconditionally add '-no-pie' with CONFIG_LD_SCRIPT_DYN=y, so that it is enabled with all compilers that support this. Furthermore, using gcc-min-version can help turn this back into LINK-$(CONFIG_LD_SCRIPT_DYN) += -no-pie when the minimum version of GCC is bumped past 6.1.0. Cc: stable@vger.kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/1982 Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 6c20faec8ffc97af21acb43382adda011eb39359 Author: Zhang Bingwu Date: Sun Jan 14 16:13:59 2024 +0800 kbuild: defconf: use SRCARCH to find merged configs For some ARCH values, SRCARCH, which should be used for finding arch/ subdirectory, is different from ARCH. Signed-off-by: Zhang Bingwu Signed-off-by: Masahiro Yamada commit 915644189c22d9c93e9fee7c7c993b58e745bef7 Author: Konstantin Aladyshev Date: Sat Jan 27 18:48:44 2024 +0300 hwmon: (pmbus/mp2975) Correct comment inside 'mp2975_read_byte_data' The current driver code no longer perfrom internal conversion from VID to direct. Instead it configures READ_VOUT using MFR_DC_LOOP_CTRL. Correct the comment message inside the 'mp2975_read_byte_data' function to match the driver logic. Signed-off-by: Konstantin Aladyshev Fixes: c60fe56c169e ("hwmon: (pmbus/mp2975) Fix driver initialization for MP2975 device") Link: https://lore.kernel.org/r/20240127154844.989-1-aladyshev22@gmail.com Signed-off-by: Guenter Roeck commit 6db053cd949fcd6254cea9f2cd5d39f7bd64379c Author: David Schiller Date: Mon Jan 22 14:49:17 2024 +0100 staging: iio: ad5933: fix type mismatch regression Commit 4c3577db3e4f ("Staging: iio: impedance-analyzer: Fix sparse warning") fixed a compiler warning, but introduced a bug that resulted in one of the two 16 bit IIO channels always being zero (when both are enabled). This is because int is 32 bits wide on most architectures and in the case of a little-endian machine the two most significant bytes would occupy the buffer for the second channel as 'val' is being passed as a void pointer to 'iio_push_to_buffers()'. Fix by defining 'val' as u16. Tested working on ARM64. Fixes: 4c3577db3e4f ("Staging: iio: impedance-analyzer: Fix sparse warning") Signed-off-by: David Schiller Link: https://lore.kernel.org/r/20240122134916.2137957-1-david.schiller@jku.at Cc: Signed-off-by: Jonathan Cameron commit a69eeaad093dd2c8fd0b216c8143b380b73d672d Author: Dimitri Fedrau Date: Fri Jan 26 14:52:26 2024 +0100 iio: humidity: hdc3020: fix temperature offset The temperature offset should be negative according to the datasheet. Adding a minus to the existing offset results in correct temperature calculations. Fixes: c9180b8e39be ("iio: humidity: Add driver for ti HDC302x humidity sensors") Reviewed-by: Nuno Sa Signed-off-by: Dimitri Fedrau Link: https://lore.kernel.org/r/20240126135226.3977904-1-dima.fedrau@gmail.com Signed-off-by: Jonathan Cameron commit 59be5c35850171e307ca5d3d703ee9ff4096b948 Author: Xi Ruoyao Date: Sat Jan 27 05:05:57 2024 +0800 mips: Call lose_fpu(0) before initializing fcr31 in mips_set_personality_nan If we still own the FPU after initializing fcr31, when we are preempted the dirty value in the FPU will be read out and stored into fcr31, clobbering our setting. This can cause an improper floating-point environment after execve(). For example: zsh% cat measure.c #include int main() { return fetestexcept(FE_INEXACT); } zsh% cc measure.c -o measure -lm zsh% echo $((1.0/3)) # raising FE_INEXACT 0.33333333333333331 zsh% while ./measure; do ; done (stopped in seconds) Call lose_fpu(0) before setting fcr31 to prevent this. Closes: https://lore.kernel.org/linux-mips/7a6aa1bbdbbe2e63ae96ff163fab0349f58f1b9e.camel@xry111.site/ Fixes: 9b26616c8d9d ("MIPS: Respect the ISA level in FCSR handling") Cc: stable@vger.kernel.org Signed-off-by: Xi Ruoyao Signed-off-by: Thomas Bogendoerfer commit 822df315cc7c85c3c10afcc6408b254a6fa0f166 Author: Huang Pei Date: Sat Jan 27 17:12:21 2024 +0800 MIPS: loongson64: set nid for reserved memblock region Commit 61167ad5fecd("mm: pass nid to reserve_bootmem_region()") reveals that reserved memblock regions have no valid node id set, just set it right since loongson64 firmware makes it clear in memory layout info. This works around booting failure on 3A1000+ since commit 61167ad5fecd ("mm: pass nid to reserve_bootmem_region()") under CONFIG_DEFERRED_STRUCT_PAGE_INIT. Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer commit c91c6b2f08afb7be111678ceade563158c9a31ba Author: Thomas Bogendoerfer Date: Sat Jan 27 11:07:49 2024 +0100 Revert "MIPS: loongson64: set nid for reserved memblock region" This reverts commit ce7b1b97776ec0b068c4dd6b6dbb48ae09a23519. Signed-off-by: Thomas Bogendoerfer commit 62b4248105353e7d1debd30ca5c57ec5e5f28e35 Author: Horatiu Vultur Date: Wed Jan 24 11:17:58 2024 +0100 net: lan966x: Fix port configuration when using SGMII interface In case the interface between the MAC and the PHY is SGMII, then the bit GIGA_MODE on the MAC side needs to be set regardless of the speed at which it is running. Fixes: d28d6d2e37d1 ("net: lan966x: add port module support") Signed-off-by: Horatiu Vultur Reviewed-by: Maxime Chevallier Signed-off-by: David S. Miller commit 586e40aa883cab255ab8ddfe332c4092a5349cb7 Author: Simon Horman Date: Wed Jan 24 09:16:22 2024 +0000 MAINTAINERS: Add connector headers to NETWORKING DRIVERS Commit 46cf789b68b2 ("connector: Move maintainence under networking drivers umbrella.") moved the connector maintenance but did not include the connector header files. It seems that it has always been implied that these headers were maintained along with the rest of the connector code, both before and after the cited commit. Make this explicit. Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 0a186b49bba596b81de5a686ce5bfc9cd48ab3ef Author: Linus Lüssing Date: Wed Jan 17 06:22:20 2024 +0100 batman-adv: mcast: fix memory leak on deleting a batman-adv interface The batman-adv multicast tracker TVLV handler is registered for the new batman-adv multicast packet type upon creating a batman-adv interface, but not unregistered again upon the interface's deletion, leading to a memory leak. Fix this memory leak by calling the according TVLV handler unregister routine for the multicast tracker TVLV upon batman-adv interface deletion. Fixes: 07afe1ba288c ("batman-adv: mcast: implement multicast packet reception and forwarding") Reported-and-tested-by: syzbot+ebe64cc5950868e77358@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000beadc4060f0cbc23@google.com/ Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 59f7ea703c38abc3f239068d49cc8897740e4c54 Author: Linus Lüssing Date: Tue Jan 9 22:58:59 2024 +0100 batman-adv: mcast: fix mcast packet type counter on timeouted nodes When a node which does not have the new batman-adv multicast packet type capability vanishes then the according, global counter erroneously would not be reduced in response on other nodes. Which in turn leads to the mesh never switching back to sending with the new multicast packet type. Fix this by reducing the according counter when such a node times out. Fixes: 90039133221e ("batman-adv: mcast: implement multicast packet generation") Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit e622502c310f1069fd9f41cd38210553115f610a Author: Nicolas Dichtel Date: Thu Jan 25 15:18:47 2024 +0100 ipmr: fix kernel panic when forwarding mcast packets The stacktrace was: [ 86.305548] BUG: kernel NULL pointer dereference, address: 0000000000000092 [ 86.306815] #PF: supervisor read access in kernel mode [ 86.307717] #PF: error_code(0x0000) - not-present page [ 86.308624] PGD 0 P4D 0 [ 86.309091] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 86.309883] CPU: 2 PID: 3139 Comm: pimd Tainted: G U 6.8.0-6wind-knet #1 [ 86.311027] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.1-0-g0551a4be2c-prebuilt.qemu-project.org 04/01/2014 [ 86.312728] RIP: 0010:ip_mr_forward (/build/work/knet/net/ipv4/ipmr.c:1985) [ 86.313399] Code: f9 1f 0f 87 85 03 00 00 48 8d 04 5b 48 8d 04 83 49 8d 44 c5 00 48 8b 40 70 48 39 c2 0f 84 d9 00 00 00 49 8b 46 58 48 83 e0 fe <80> b8 92 00 00 00 00 0f 84 55 ff ff ff 49 83 47 38 01 45 85 e4 0f [ 86.316565] RSP: 0018:ffffad21c0583ae0 EFLAGS: 00010246 [ 86.317497] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 86.318596] RDX: ffff9559cb46c000 RSI: 0000000000000000 RDI: 0000000000000000 [ 86.319627] RBP: ffffad21c0583b30 R08: 0000000000000000 R09: 0000000000000000 [ 86.320650] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001 [ 86.321672] R13: ffff9559c093a000 R14: ffff9559cc00b800 R15: ffff9559c09c1d80 [ 86.322873] FS: 00007f85db661980(0000) GS:ffff955a79d00000(0000) knlGS:0000000000000000 [ 86.324291] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 86.325314] CR2: 0000000000000092 CR3: 000000002f13a000 CR4: 0000000000350ef0 [ 86.326589] Call Trace: [ 86.327036] [ 86.327434] ? show_regs (/build/work/knet/arch/x86/kernel/dumpstack.c:479) [ 86.328049] ? __die (/build/work/knet/arch/x86/kernel/dumpstack.c:421 /build/work/knet/arch/x86/kernel/dumpstack.c:434) [ 86.328508] ? page_fault_oops (/build/work/knet/arch/x86/mm/fault.c:707) [ 86.329107] ? do_user_addr_fault (/build/work/knet/arch/x86/mm/fault.c:1264) [ 86.329756] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) [ 86.330350] ? __irq_work_queue_local (/build/work/knet/kernel/irq_work.c:111 (discriminator 1)) [ 86.331013] ? exc_page_fault (/build/work/knet/./arch/x86/include/asm/paravirt.h:693 /build/work/knet/arch/x86/mm/fault.c:1515 /build/work/knet/arch/x86/mm/fault.c:1563) [ 86.331702] ? asm_exc_page_fault (/build/work/knet/./arch/x86/include/asm/idtentry.h:570) [ 86.332468] ? ip_mr_forward (/build/work/knet/net/ipv4/ipmr.c:1985) [ 86.333183] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) [ 86.333920] ipmr_mfc_add (/build/work/knet/./include/linux/rcupdate.h:782 /build/work/knet/net/ipv4/ipmr.c:1009 /build/work/knet/net/ipv4/ipmr.c:1273) [ 86.334583] ? __pfx_ipmr_hash_cmp (/build/work/knet/net/ipv4/ipmr.c:363) [ 86.335357] ip_mroute_setsockopt (/build/work/knet/net/ipv4/ipmr.c:1470) [ 86.336135] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) [ 86.336854] ? ip_mroute_setsockopt (/build/work/knet/net/ipv4/ipmr.c:1470) [ 86.337679] do_ip_setsockopt (/build/work/knet/net/ipv4/ip_sockglue.c:944) [ 86.338408] ? __pfx_unix_stream_read_actor (/build/work/knet/net/unix/af_unix.c:2862) [ 86.339232] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) [ 86.339809] ? aa_sk_perm (/build/work/knet/security/apparmor/include/cred.h:153 /build/work/knet/security/apparmor/net.c:181) [ 86.340342] ip_setsockopt (/build/work/knet/net/ipv4/ip_sockglue.c:1415) [ 86.340859] raw_setsockopt (/build/work/knet/net/ipv4/raw.c:836) [ 86.341408] ? security_socket_setsockopt (/build/work/knet/security/security.c:4561 (discriminator 13)) [ 86.342116] sock_common_setsockopt (/build/work/knet/net/core/sock.c:3716) [ 86.342747] do_sock_setsockopt (/build/work/knet/net/socket.c:2313) [ 86.343363] __sys_setsockopt (/build/work/knet/./include/linux/file.h:32 /build/work/knet/net/socket.c:2336) [ 86.344020] __x64_sys_setsockopt (/build/work/knet/net/socket.c:2340) [ 86.344766] do_syscall_64 (/build/work/knet/arch/x86/entry/common.c:52 /build/work/knet/arch/x86/entry/common.c:83) [ 86.345433] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) [ 86.346161] ? syscall_exit_work (/build/work/knet/./include/linux/audit.h:357 /build/work/knet/kernel/entry/common.c:160) [ 86.346938] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) [ 86.347657] ? syscall_exit_to_user_mode (/build/work/knet/kernel/entry/common.c:215) [ 86.348538] ? srso_return_thunk (/build/work/knet/arch/x86/lib/retpoline.S:223) [ 86.349262] ? do_syscall_64 (/build/work/knet/./arch/x86/include/asm/cpufeature.h:171 /build/work/knet/arch/x86/entry/common.c:98) [ 86.349971] entry_SYSCALL_64_after_hwframe (/build/work/knet/arch/x86/entry/entry_64.S:129) The original packet in ipmr_cache_report() may be queued and then forwarded with ip_mr_forward(). This last function has the assumption that the skb dst is set. After the below commit, the skb dst is dropped by ipv4_pktinfo_prepare(), which causes the oops. Fixes: bb7403655b3c ("ipmr: support IP_PKTINFO on cache report IGMP msg") Signed-off-by: Nicolas Dichtel Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240125141847.1931933-1-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit d9281660ff3ffb4a05302b485cc59a87e709aefc Author: Chunhai Guo Date: Fri Jan 26 22:01:42 2024 +0800 erofs: relaxed temporary buffers allocation on readahead Even with inplace decompression, sometimes very few temporary buffers may be still needed for a single decompression shot (e.g. 16 pages for 64k sliding window or 4 pages for 16k sliding window). In low-memory scenarios, it would be better to try to allocate with GFP_NOWAIT on readahead first. That can help reduce the time spent on page allocation under durative memory pressure. Here are detailed performance numbers under multi-app launch benchmark workload [1] on ARM64 Android devices (8-core CPU and 8GB of memory) running a 5.15 LTS kernel with EROFS of 4k pclusters: +----------------------------------------------+ | LZ4 | vanilla | patched | diff | |----------------+---------+---------+---------| | Average (ms) | 3364 | 2684 | -20.21% | [64k sliding window] |----------------+---------+---------+---------| | Average (ms) | 2079 | 1610 | -22.56% | [16k sliding window] +----------------------------------------------+ The total size of system images for 4k pclusters is almost unchanged: (64k sliding window) 9,117,044 KB (16k sliding window) 9,113,096 KB Therefore, in addition to switch the sliding window from 64k to 16k, after applying this patch, it can eventually save 52.14% (3364 -> 1610) on average with no memory reservation. That is particularly useful for embedded devices with limited resources. [1] https://lore.kernel.org/r/20240109074143.4138783-1-guochunhai@vivo.com Suggested-by: Gao Xiang Signed-off-by: Chunhai Guo Signed-off-by: Gao Xiang Reviewed-by: Yue Hu Link: https://lore.kernel.org/r/20240126140142.201718-1-hsiangkao@linux.alibaba.com commit 3a5879d495b226d0404098e3564462d5f1daa33b Merge: 914e17088e91a 20730e9b27787 Author: Linus Torvalds Date: Fri Jan 26 15:24:00 2024 -0800 Merge tag 'ata-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata updates from Niklas Cassel: - Fix an incorrect link_power_management_policy sysfs attribute value. We were previously using the same attribute value for two different LPM policies (me) - Add a ASMedia ASM1166 quirk. The SATA host controller always reports that it has 32 ports, even though it only has six ports. Add a quirk that overrides the value reported by the controller (Conrad) - Add a ASMedia ASM1061 quirk. The SATA host controller completely ignores the upper 21 bits of the DMA address. This causes IOMMU error events when a (valid) DMA address actually has any of the upper 21 bits set. Add a quirk that limits the dma_mask to 43-bits (Lennert) * tag 'ata-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers ahci: asm1166: correct count of reported ports ata: libata-sata: improve sysfs description for ATA_LPM_UNKNOWN commit 914e17088e91a96ea4ce5af2504588678f96edb8 Merge: cced1c5e72b74 5af2c3f44e004 Author: Linus Torvalds Date: Fri Jan 26 15:19:43 2024 -0800 Merge tag 'block-6.8-2024-01-26' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - RCU warning fix for md (Mikulas) - Fix for an aoe issue that lockdep rightfully complained about (Maksim) - Fix for an error code change in partitioning that caused a regression with some tools (Li) - Fix for a data direction warning with bi-direction commands (Christian) * tag 'block-6.8-2024-01-26' of git://git.kernel.dk/linux: md: fix a suspicious RCU usage warning aoe: avoid potential deadlock at set_capacity block: Fix WARNING in _copy_from_iter block: Move checking GENHD_FL_NO_PART to bdev_add_partition() commit cced1c5e72b7466e6c9091370eaf5d55a4ddeecb Merge: 667c889308a17 16bae3e137784 Author: Linus Torvalds Date: Fri Jan 26 15:17:42 2024 -0800 Merge tag 'io_uring-6.8-2024-01-26' of git://git.kernel.dk/linux Pull io_uring fix from Jens Axboe: "Just a single tweak to the newly added IORING_OP_FIXED_FD_INSTALL from Paul, ensuring it goes via the audit path and playing it safe by excluding it from using registered creds" * tag 'io_uring-6.8-2024-01-26' of git://git.kernel.dk/linux: io_uring: enable audit and restrict cred override for IORING_OP_FIXED_FD_INSTALL commit 667c889308a171748dd19d496a9714b77c688a86 Merge: 0c879d88138ca c6a783be82c89 Author: Linus Torvalds Date: Fri Jan 26 15:06:23 2024 -0800 Merge tag 'thermal-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control update from Rafael Wysocki: "Remove some dead code from the Intel powerclamp thermal control driver (Srinivas Pandruvada)" * tag 'thermal-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal: intel: powerclamp: Remove dead code for target mwait value commit 0c879d88138cab3477eb71dda962cb13b3dd8973 Merge: 70da22eb63f73 f3bdd82c58342 Author: Linus Torvalds Date: Fri Jan 26 14:53:28 2024 -0800 Merge tag 'pm-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix two cpufreq drivers and the cpupower utility. Specifics: - Fix the handling of scaling_max/min_freq sysfs attributes in the AMD P-state cpufreq driver (Mario Limonciello) - Make the intel_pstate cpufreq driver avoid unnecessary computation of the HWP performance level corresponding to a given frequency in the cases when it is known already, which also helps to avoid reducing the maximum CPU capacity artificially on some systems (Rafael J. Wysocki) - Fix compilation of the cpupower utility when CFLAGS is passed as a make argument for cpupower, but it does not take effect as expected due to mishandling (Stanley Chan)" * tag 'pm-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq/amd-pstate: Fix setting scaling max/min freq values cpufreq: intel_pstate: Refine computation of P-state for given frequency tools cpupower bench: Override CFLAGS assignments commit 70da22eb63f73a1ce41c7d106a5a417c352089f8 Merge: 168174d78157b d546978e0c07b Author: Linus Torvalds Date: Fri Jan 26 14:51:41 2024 -0800 Merge tag 'docs-6.8-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of relatively boring documentation fixes" * tag 'docs-6.8-fixes' of git://git.lwn.net/linux: docs: admin-guide: remove obsolete advice related to SLAB allocator doc: admin-guide/kernel-parameters: remove useless comment docs/accel: correct links to mailing list archives docs/sphinx: Fix TOC scroll hack for the home page commit 99b817c173cd213671daecd25ca27f56b0c7c4ec Author: Ondrej Mosnacek Date: Fri Jan 26 11:44:03 2024 +0100 lsm: fix the logic in security_inode_getsecctx() The inode_getsecctx LSM hook has previously been corrected to have -EOPNOTSUPP instead of 0 as the default return value to fix BPF LSM behavior. However, the call_int_hook()-generated loop in security_inode_getsecctx() was left treating 0 as the neutral value, so after an LSM returns 0, the loop continues to try other LSMs, and if one of them returns a non-zero value, the function immediately returns with said value. So in a situation where SELinux and the BPF LSMs registered this hook, -EOPNOTSUPP would be incorrectly returned whenever SELinux returned 0. Fix this by open-coding the call_int_hook() loop and making it use the correct LSM_RET_DEFAULT() value as the neutral one, similar to what other hooks do. Cc: stable@vger.kernel.org Reported-by: Stephen Smalley Link: https://lore.kernel.org/selinux/CAEjxPJ4ev-pasUwGx48fDhnmjBnq_Wh90jYPwRQRAqXxmOKD4Q@mail.gmail.com/ Link: https://bugzilla.redhat.com/show_bug.cgi?id=2257983 Fixes: b36995b8609a ("lsm: fix default return value for inode_getsecctx") Signed-off-by: Ondrej Mosnacek Reviewed-by: Casey Schaufler [PM: subject line tweak] Signed-off-by: Paul Moore commit dfa988b4c7c3a48bde7c2713308920c7741fff29 Author: Daniel Golle Date: Wed Jan 24 05:17:25 2024 +0000 net: dsa: mt7530: fix 10M/100M speed on MT7988 switch Setup PMCR port register for actual speed and duplex on internally connected PHYs of the MT7988 built-in switch. This fixes links with speeds other than 1000M. Fixes: 110c18bfed41 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch") Signed-off-by: Daniel Golle Reviewed-by: Vladimir Oltean Acked-by: Arınç ÜNAL Link: https://lore.kernel.org/r/a5b04dfa8256d8302f402545a51ac4c626fdba25.1706071272.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski commit 8d975c15c0cd744000ca386247432d57b21f9df0 Author: Eric Dumazet Date: Thu Jan 25 17:05:57 2024 +0000 ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv() syzbot found __ip6_tnl_rcv() could access unitiliazed data [1]. Call pskb_inet_may_pull() to fix this, and initialize ipv6h variable after this call as it can change skb->head. [1] BUG: KMSAN: uninit-value in __INET_ECN_decapsulate include/net/inet_ecn.h:253 [inline] BUG: KMSAN: uninit-value in INET_ECN_decapsulate include/net/inet_ecn.h:275 [inline] BUG: KMSAN: uninit-value in IP6_ECN_decapsulate+0x7df/0x1e50 include/net/inet_ecn.h:321 __INET_ECN_decapsulate include/net/inet_ecn.h:253 [inline] INET_ECN_decapsulate include/net/inet_ecn.h:275 [inline] IP6_ECN_decapsulate+0x7df/0x1e50 include/net/inet_ecn.h:321 ip6ip6_dscp_ecn_decapsulate+0x178/0x1b0 net/ipv6/ip6_tunnel.c:727 __ip6_tnl_rcv+0xd4e/0x1590 net/ipv6/ip6_tunnel.c:845 ip6_tnl_rcv+0xce/0x100 net/ipv6/ip6_tunnel.c:888 gre_rcv+0x143f/0x1870 ip6_protocol_deliver_rcu+0xda6/0x2a60 net/ipv6/ip6_input.c:438 ip6_input_finish net/ipv6/ip6_input.c:483 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] ip6_input+0x15d/0x430 net/ipv6/ip6_input.c:492 ip6_mc_input+0xa7e/0xc80 net/ipv6/ip6_input.c:586 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish+0x5db/0x870 net/ipv6/ip6_input.c:79 NF_HOOK include/linux/netfilter.h:314 [inline] ipv6_rcv+0xda/0x390 net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core net/core/dev.c:5532 [inline] __netif_receive_skb+0x1a6/0x5a0 net/core/dev.c:5646 netif_receive_skb_internal net/core/dev.c:5732 [inline] netif_receive_skb+0x58/0x660 net/core/dev.c:5791 tun_rx_batched+0x3ee/0x980 drivers/net/tun.c:1555 tun_get_user+0x53af/0x66d0 drivers/net/tun.c:2002 tun_chr_write_iter+0x3af/0x5d0 drivers/net/tun.c:2048 call_write_iter include/linux/fs.h:2084 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x786/0x1200 fs/read_write.c:590 ksys_write+0x20f/0x4c0 fs/read_write.c:643 __do_sys_write fs/read_write.c:655 [inline] __se_sys_write fs/read_write.c:652 [inline] __x64_sys_write+0x93/0xd0 fs/read_write.c:652 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x6d/0x140 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Uninit was created at: slab_post_alloc_hook+0x129/0xa70 mm/slab.h:768 slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x5e9/0xb10 mm/slub.c:3523 kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:560 __alloc_skb+0x318/0x740 net/core/skbuff.c:651 alloc_skb include/linux/skbuff.h:1286 [inline] alloc_skb_with_frags+0xc8/0xbd0 net/core/skbuff.c:6334 sock_alloc_send_pskb+0xa80/0xbf0 net/core/sock.c:2787 tun_alloc_skb drivers/net/tun.c:1531 [inline] tun_get_user+0x1e8a/0x66d0 drivers/net/tun.c:1846 tun_chr_write_iter+0x3af/0x5d0 drivers/net/tun.c:2048 call_write_iter include/linux/fs.h:2084 [inline] new_sync_write fs/read_write.c:497 [inline] vfs_write+0x786/0x1200 fs/read_write.c:590 ksys_write+0x20f/0x4c0 fs/read_write.c:643 __do_sys_write fs/read_write.c:655 [inline] __se_sys_write fs/read_write.c:652 [inline] __x64_sys_write+0x93/0xd0 fs/read_write.c:652 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x6d/0x140 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b CPU: 0 PID: 5034 Comm: syz-executor331 Not tainted 6.7.0-syzkaller-00562-g9f8413c4a66f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Fixes: 0d3c703a9d17 ("ipv6: Cleanup IPv6 tunnel receive path") Reported-by: syzbot Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240125170557.2663942-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 89abe628375301fedb68770644df845d49018d8b Author: Paolo Abeni Date: Thu Jan 25 19:09:06 2024 +0100 selftests: net: give more time for GRO aggregation The gro.sh test-case relay on the gro_flush_timeout to ensure that all the segments belonging to any given batch are properly aggregated. The other end, the sender is a user-space program transmitting each packet with a separate write syscall. A busy host and/or stracing the sender program can make the relevant segments reach the GRO engine after the flush timeout triggers. Give the GRO flush timeout more slack, to avoid sporadic self-tests failures. Fixes: 9af771d2ec04 ("selftests/net: allow GRO coalesce test on veth") Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Tested-by: Eric Dumazet Link: https://lore.kernel.org/r/bffec2beab3a5672dd13ecabe4fad81d2155b367.1706206101.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit d3cb3b0088ca92082e2bebc40cc6894a632173e2 Author: Paolo Abeni Date: Thu Jan 25 09:22:50 2024 +0100 selftests: net: add missing required classifier the udpgro_fraglist self-test uses the BPF classifiers, but the current net self-test configuration does not include it, causing CI failures: # selftests: net: udpgro_frglist.sh # ipv6 # tcp - over veth touching data # -l 4 -6 -D 2001:db8::1 -t rx -4 -t # Error: TC classifier not found. # We have an error talking to the kernel # Error: TC classifier not found. # We have an error talking to the kernel Add the missing knob. Fixes: edae34a3ed92 ("selftests net: add UDP GRO fraglist + bpf self-tests") Signed-off-by: Paolo Abeni Reviewed-by: Maciej Żenczykowski Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/7c3643763b331e9a400e1874fe089193c99a1c3f.1706170897.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 281cb9d65a95c00bb844f332cd187491d2d55496 Author: Breno Leitao Date: Thu Jan 25 05:41:03 2024 -0800 bnxt_en: Make PTP timestamp HWRM more silent commit 056bce63c469 ("bnxt_en: Make PTP TX timestamp HWRM query silent") changed a netdev_err() to netdev_WARN_ONCE(). netdev_WARN_ONCE() is it generates a kernel WARNING, which is bad, for the following reasons: * You do not a kernel warning if the firmware queries are late * In busy networks, timestamp query failures fairly regularly * A WARNING message doesn't bring much value, since the code path is clear. (This was discussed in-depth in [1]) Transform the netdev_WARN_ONCE() into a netdev_warn_once(), and print a more well-behaved message, instead of a full WARN(). bnxt_en 0000:67:00.0 eth0: TS query for TX timer failed rc = fffffff5 [1] Link: https://lore.kernel.org/all/ZbDj%2FFI4EJezcfd1@gmail.com/ Signed-off-by: Breno Leitao Reviewed-by: Pavan Chebbi Reviewed-by: Michael Chan Fixes: 056bce63c469 ("bnxt_en: Make PTP TX timestamp HWRM query silent") Link: https://lore.kernel.org/r/20240125134104.2045573-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit c3dfcdb65ec1a4813ec1e0871c52c671ba9c71ac Author: Wen Gu Date: Thu Jan 25 20:39:16 2024 +0800 net/smc: fix incorrect SMC-D link group matching logic The logic to determine if SMC-D link group matches is incorrect. The correct logic should be that it only returns true when the GID is the same, and the SMC-D device is the same and the extended GID is the same (in the case of virtual ISM). It can be fixed by adding brackets around the conditional (or ternary) operator expression. But for better readability and maintainability, it has been changed to an if-else statement. Reported-by: Matthew Rosato Closes: https://lore.kernel.org/r/13579588-eb9d-4626-a063-c0b77ed80f11@linux.ibm.com Fixes: b40584d14570 ("net/smc: compatible with 128-bits extended GID of virtual ISM device") Link: https://lore.kernel.org/r/13579588-eb9d-4626-a063-c0b77ed80f11@linux.ibm.com Signed-off-by: Wen Gu Reviewed-by: Alexandra Winter Link: https://lore.kernel.org/r/20240125123916.77928-1-guwen@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 168174d78157bba1315d5f8e1c66548b92c84ae9 Merge: 2047b0b275085 987940f05735a Author: Linus Torvalds Date: Fri Jan 26 13:52:18 2024 -0800 Merge tag 'drm-fixes-2024-01-27' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Lots going on for rc2, ivpu has a bunch of stabilisation and debugging work, then amdgpu and xe are the main fixes. i915, exynos have a few, then some misc panel and bridge fixes. Worth mentioning are three regressions. One of the nouveau fixes in 6.7 for a serious deadlock had side effects, so I guess we will bring back the deadlock until I can figure out what should be done properly. There was a scheduler regression vs amdgpu which was reported in a few places and is now fixed. There was an i915 vs simpledrm problem resulting in black screens, that is reverted also. I'll be working on a proper nouveau fix, it kinda looks like one of those cases where someone tried to use an atomic where they should have probably used a lock, but I'll see. fb: - fix simpledrm/i915 regression by reverting change scheduler: - fix regression affecting amdgpu users due to sched draining nouveau: - revert 6.7 deadlock fix as it has side effects dp: - fix documentation warning ttm: - fix dummy page read on some platforms bridge: - anx7625 suspend fix - sii902x: fix probing and audio registration - parade-ps8640: fix suspend of bridge, aux fixes - samsung-dsim: avoid using FORCE_STOP_STATE panel: - simple add missing bus flags - fix samsung-s6d7aa0 flags amdgpu: - AC/DC power supply tracking fix - Don't show invalid vram vendor data - SMU 13.0.x fixes - GART fix for umr on systems without VRAM - GFX 10/11 UNORD_DISPATCH fixes - IPS display fixes (required for S0ix on some platforms) - Misc fixes i915: - DSI sequence revert to fix GitLab #10071 and DP test-pattern fix - Drop -Wstringop-overflow (broken on GCC11) ivpu: - fix recovery/reset support - improve submit ioctl stability - fix dev open/close races on unbind - PLL disable reset fix - deprecate context priority param - improve debug buffer logging - disable buffer sharing across VPU contexts - free buffer sgt on unbind - fix missing lock around shmem vmap - add better boot diagnostics - add more debug prints around mapping - dump MMU events in case of timeout v3d: - NULL ptr dereference fix exynos: - fix stack usage - fix incorrect type - fix dt typo - fix gsc runtime resume xe: - Make an ops struct static - Fix an implicit 0 to NULL conversion - A couple of 32-bit fixes - A migration coherency fix for Lunar Lake. - An error path vm id leak fix - Remove PVC references in kunit tests" * tag 'drm-fixes-2024-01-27' of git://anongit.freedesktop.org/drm/drm: (66 commits) Revert "nouveau: push event block/allowing out of the fence context" drm: bridge: samsung-dsim: Don't use FORCE_STOP_STATE drm/sched: Drain all entities in DRM sched run job worker drm/amd/display: "Enable IPS by default" drm/amd: Add a DC debug mask for IPS drm/amd/display: Disable ips before dc interrupt setting drm/amd/display: Replay + IPS + ABM in Full Screen VPB drm/amd/display: Add IPS checks before dcn register access drm/amd/display: Add Replay IPS register for DMUB command table drm/amd/display: Allow IPS2 during Replay drm/amdgpu/gfx11: set UNORD_DISPATCH in compute MQDs drm/amdgpu/gfx10: set UNORD_DISPATCH in compute MQDs drm/amd/amdgpu: Assign GART pages to AMD device mapping drm/amd/pm: Fetch current power limit from FW drm/amdgpu: Fix null pointer dereference drm/amdgpu: Show vram vendor only if available drm/amd/pm: update the power cap setting drm/amdgpu: Avoid fetching vram vendor information drm/amdgpu/pm: Fix the power source flag error drm/amd/display: Fix uninitialized variable usage in core_link_ 'read_dpcd() & write_dpcd()' functions ... commit d0266d7ab1618482d58015d67a5220e590333298 Author: Johan Hovold Date: Tue Jan 23 17:00:53 2024 +0100 Revert "power: supply: qcom_battmgr: Register the power supplies after PDR is up" This reverts commit b43f7ddc2b7a5a90447d96cb4d3c6d142dd4a810. The offending commit deferred power-supply class device registration until the service-started notification is received. This triggers a NULL pointer dereference during boot of the Lenovo ThinkPad X13s and SC8280XP CRD as battery status notifications can be received before the service-start notification: Unable to handle kernel NULL pointer dereference at virtual address 00000000000005c0 ... Call trace: _acquire+0x338/0x2064 acquire+0x1e8/0x318 spin_lock_irqsave+0x60/0x88 _supply_changed+0x2c/0xa4 battmgr_callback+0x1d4/0x60c [qcom_battmgr] pmic_glink_rpmsg_callback+0x5c/0xa4 [pmic_glink] qcom_glink_native_rx+0x58c/0x7e8 qcom_glink_smem_intr+0x14/0x24 [qcom_glink_smem] __handle_irq_event_percpu+0xb0/0x2d4 handle_irq_event+0x4c/0xb8 As trying to serialise this is non-trivial and risks missing notifications, let's revert to registration during probe so that the driver data is all set up once the service goes live. The warning message during resume in case the aDSP firmware is not running that motivated the change can be considered a feature and should not be suppressed. Fixes: b43f7ddc2b7a ("power: supply: qcom_battmgr: Register the power supplies after PDR is up") Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20240123160053.18331-1-johan+linaro@kernel.org Signed-off-by: Sebastian Reichel commit 2047b0b2750855a8a5b489915b203b4a8b5ec56e Merge: ae971859f810d 61f61c89fa5d9 Author: Linus Torvalds Date: Fri Jan 26 13:22:59 2024 -0800 Merge tag 'asm-generic-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic update from Arnd Bergmann: "Just one patch this time, adding Andreas Larsson as co-maintainer for arch/sparc. He is volunteering to help since David Miller has become much less active over the past few years. In turn, I'm helping Andreas get set up as a new maintainer, starting with the entry in the MAINTAINERS file" * tag 'asm-generic-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: MAINTAINERS: Add Andreas Larsson as co-maintainer for arch/sparc commit ae971859f810d90c2e844cb2eb3daa5e061dd446 Merge: 48fa8ec61569e 1f4a994be2c3d Author: Linus Torvalds Date: Fri Jan 26 13:09:38 2024 -0800 Merge tag 'arm-fixes-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull arm SoC fixes from Arnd Bergmann: "There are a couple of devicetree fixes for samsung, riscv/sophgo, and for TPM device nodes on a couple of platforms. Both the Arm FF-A and the SCMI firmware drivers get a number of code fixes, addressing minor implementation bugs and compatibility with firmware implementations. Most of these bugs relate to the usage of xarray and rwlock structures and are fixed by Cristian Marussi" * tag 'arm-fixes-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: riscv: dts: sophgo: separate sg2042 mtime and mtimecmp to fit aclint format arm64: dts: Fix TPM schema violations ARM: dts: Fix TPM schema violations ARM: dts: exynos4212-tab3: add samsung,invert-vclk flag to fimd arm64: dts: exynos: gs101: comply with the new cmu_misc clock names firmware: arm_ffa: Handle partitions setup failures firmware: arm_ffa: Use xa_insert() and check for result firmware: arm_ffa: Simplify ffa_partitions_cleanup() firmware: arm_ffa: Check xa_load() return value firmware: arm_ffa: Add missing rwlock_init() for the driver partition firmware: arm_ffa: Add missing rwlock_init() in ffa_setup_partitions() firmware: arm_scmi: Fix the clock protocol supported version firmware: arm_scmi: Fix the clock protocol version for v3.2 firmware: arm_scmi: Use xa_insert() when saving raw queues firmware: arm_scmi: Use xa_insert() to store opps firmware: arm_scmi: Replace asm-generic/bug.h with linux/bug.h firmware: arm_scmi: Check mailbox/SMT channel for consistency commit c60fe56c169eb552113a4711db3a5f99e3acd4c1 Author: Konstantin Aladyshev Date: Fri Jan 26 23:57:14 2024 +0300 hwmon: (pmbus/mp2975) Fix driver initialization for MP2975 device The commit 1feb31e810b0 ("hwmon: (pmbus/mp2975) Simplify VOUT code") has introduced a bug that makes it impossible to initialize MP2975 device: """ mp2975 5-0020: Failed to identify chip capabilities i2c i2c-5: new_device: Instantiated device mp2975 at 0x20 i2c i2c-5: delete_device: Deleting device mp2975 at 0x20 """ Since the 'read_byte_data' function was removed from the 'pmbus_driver_info ' structure the driver no longer reports correctly that VOUT mode is direct. Therefore 'pmbus_identify_common' fails with error, making it impossible to initialize the device. Restore 'read_byte_data' function to fix the issue. Tested: - before: it is not possible to initialize MP2975 device with the 'mp2975' driver, - after: 'mp2975' correctly initializes MP2975 device and all sensor data is correct. Fixes: 1feb31e810b0 ("hwmon: (pmbus/mp2975) Simplify VOUT code") Signed-off-by: Konstantin Aladyshev Link: https://lore.kernel.org/r/20240126205714.2363-1-aladyshev22@gmail.com Signed-off-by: Guenter Roeck commit 48fa8ec61569efe122ac92694ce6ff4324b61bd8 Merge: 5f91b9ba5acad 8c2ae772fe08e Author: Linus Torvalds Date: Fri Jan 26 12:29:04 2024 -0800 Merge tag 'spi-fix-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "As well as a few device IDs and the usual scattering of driver specific fixes this contains a couple of core things. One is a missed case in error handling, the other patch is a change from me raising the number of chip selects allowed by the newly added multi chip select support patches to resolve problems seen on several systems that exceeded the limit. This is not a real solution to the issue but rather just a change to avoid disruption to users, one of the options I am considering is just sending a revert of those changes if we can't come up with something sensible" * tag 'spi-fix-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: fix finalize message on error return spi: cs42l43: Handle error from devm_pm_runtime_enable spi: Raise limit on number of chip selects spi: hisi-sfc-v3xx: Return IRQ_NONE if no interrupts were detected spi: spi-cadence: Reverse the order of interleaved write and read operations spi: spi-imx: Use dev_err_probe for failed DMA channel requests spi: bcm-qspi: fix SFDP BFPT read by usig mspi read spi: intel-pci: Add support for Arrow Lake SPI serial flash spi: intel-pci: Remove Meteor Lake-S SoC PCI ID from the list commit 5f91b9ba5acada5e56c874af82660d29a7f84e25 Merge: 4aeb083707d6a 84aef4ed59705 Author: Linus Torvalds Date: Fri Jan 26 12:26:02 2024 -0800 Merge tag 'gpio-fixes-for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - add a quirk to GPIO ACPI handling to ignore touchpad wakeups on GPD G1619-04 - clear interrupt status bits (that may have been set before enabling the interrupts) after setting the interrupt type in gpio-eic-sprd * tag 'gpio-fixes-for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: eic-sprd: Clear interrupt after set the interrupt type gpiolib: acpi: Ignore touchpad wakeup on GPD G1619-04 commit 4aeb083707d6a2535bfea5d16140b72a81efb62b Merge: ecb1b8288dc7c b32431b753217 Author: Linus Torvalds Date: Fri Jan 26 12:11:49 2024 -0800 Merge tag 'media/v6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - remove K3 DT prefix from wave5 - vb2 core: fix missing caps on VIDIO_CREATE_BUFS under certain circumstances - videobuf2: Stop direct calls to queue num_buffers field * tag 'media/v6.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: vb2: refactor setting flags and caps, fix missing cap media: media videobuf2: Stop direct calls to queue num_buffers field media: chips-media: wave5: Remove K3 References dt-bindings: media: Remove K3 Family Prefix from Compatible commit 0958b33ef5a04ed91f61cef4760ac412080c4e08 Author: Masami Hiramatsu (Google) Date: Fri Jan 26 09:42:58 2024 +0900 tracing/trigger: Fix to return error if failed to alloc snapshot Fix register_snapshot_trigger() to return error code if it failed to allocate a snapshot instead of 0 (success). Unless that, it will register snapshot trigger without an error. Link: https://lore.kernel.org/linux-trace-kernel/170622977792.270660.2789298642759362200.stgit@devnote2 Fixes: 0bbe7f719985 ("tracing: Fix the race between registering 'snapshot' event trigger and triggering 'snapshot' operation") Cc: stable@vger.kernel.org Cc: Vincent Donnefort Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit fcf67d82b8b878bdd95145382be43927bce07ec6 Author: Paolo Abeni Date: Fri Jan 26 16:32:36 2024 +0100 selftests: net: add missing config for big tcp tests The big_tcp test-case requires a few kernel knobs currently not specified in the net selftests config, causing the following failure: # selftests: net: big_tcp.sh # Error: Failed to load TC action module. # We have an error talking to the kernel ... # Testing for BIG TCP: # CLI GSO | GW GRO | GW GSO | SER GRO # ./big_tcp.sh: line 107: test: !=: unary operator expected ... # on on on on : [FAIL_on_link1] Add the missing configs Fixes: 6bb382bcf742 ("selftests: add a selftest for big tcp") Signed-off-by: Paolo Abeni Acked-by: Aaron Conole Acked-by: Xin Long Link: https://lore.kernel.org/all/21630ecea872fea13f071342ac64ef52a991a9b5.1706282943.git.pabeni@redhat.com/ Signed-off-by: Jakub Kicinski commit 1abdf288b0ef5606f76b6e191fa6df05330e3d7e Author: Phoenix Chen Date: Fri Jan 26 17:53:08 2024 +0800 platform/x86: touchscreen_dmi: Add info for the TECLAST X16 Plus tablet Add touch screen info for TECLAST X16 Plus tablet. Signed-off-by: Phoenix Chen Link: https://lore.kernel.org/r/20240126095308.5042-1-asbeltogf@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8c898ec07a2fc1d4694e81097a48e94a3816308d Author: Jithu Joseph Date: Thu Jan 25 00:22:50 2024 -0800 platform/x86/intel/ifs: Call release_firmware() when handling errors. Missing release_firmware() due to error handling blocked any future image loading. Fix the return code and release_fiwmare() to release the bad image. Fixes: 25a76dbb36dd ("platform/x86/intel/ifs: Validate image size") Reported-by: Pengfei Xu Signed-off-by: Jithu Joseph Signed-off-by: Ashok Raj Tested-by: Pengfei Xu Reviewed-by: Tony Luck Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240125082254.424859-2-ashok.raj@intel.com Signed-off-by: Hans de Goede commit a692a86efe97fe0aba7cb15f38cbce866c080689 Author: Cong Liu Date: Wed Jan 24 09:29:38 2024 +0800 platform/x86/amd/pmf: Fix memory leak in amd_pmf_get_pb_data() amd_pmf_get_pb_data() will allocate memory for the policy buffer, but does not free it if copy_from_user() fails. This leads to a memory leak. Fixes: 10817f28e533 ("platform/x86/amd/pmf: Add capability to sideload of policy binary") Reviewed-by: Shyam Sundar S K Signed-off-by: Cong Liu Link: https://lore.kernel.org/r/20240124012939.6550-1-liucong2@kylinos.cn Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit cedecdba60f4a42a8562574119f317ed0c674b5a Author: Shyam Sundar S K Date: Tue Jan 23 19:44:58 2024 +0530 platform/x86/amd/pmf: Get ambient light information from AMD SFH driver AMD SFH driver has APIs defined to export the ambient light information; use this within the PMF driver to send inputs to the PMF TA, so that PMF driver can enact to the actions coming from the TA. Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240123141458.3715211-2-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 118063f3803324411be0e601d560ed7d1c9824b0 Author: Shyam Sundar S K Date: Tue Jan 23 19:44:57 2024 +0530 platform/x86/amd/pmf: Get Human presence information from AMD SFH driver AMD SFH driver has APIs defined to export the human presence information; use this within the PMF driver to send inputs to the PMF TA, so that PMF driver can enact to the actions coming from the TA. Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello Link: https://lore.kernel.org/r/20240123141458.3715211-1-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 97aab852c4b9e1b378de48a55f8c9b8d76c36ccc Author: Harshit Mogalapalli Date: Mon Jan 22 07:49:52 2024 -0800 hwmon: gigabyte_waterforce: Fix locking bug in waterforce_get_status() Goto 'unlock_and_return' for unlocking before returning on the error path. Fixes: d5939a793693 ("hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers") Signed-off-by: Harshit Mogalapalli Reviewed-by: Aleksa Savic Link: https://lore.kernel.org/r/20240122154952.2851934-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Guenter Roeck commit f3bdd82c5834219a5b272c2310c83aef68667486 Merge: d3b93fe159b8d 22fb4f041999f Author: Rafael J. Wysocki Date: Fri Jan 26 19:16:48 2024 +0100 Merge branch 'pm-cpufreq' Merge cpufreq fixes for 6.8-rc2: - Fix the handling of scaling_max/min_freq sysfs attributes in the AMD P-state cpufreq driver (Mario Limonciello). - Make the intel_pstate cpufreq driver avoid unnecessary computation of the HWP performance level corresponding to a given frequency in the cases when it is known already, which also helps to avoid reducing the maximum CPU capacity artificially on some systems (Rafael J. Wysocki). * pm-cpufreq: cpufreq/amd-pstate: Fix setting scaling max/min freq values cpufreq: intel_pstate: Refine computation of P-state for given frequency commit 987940f05735a960dd143214f7cc2d699885b625 Merge: 4d7acc8f48bcf ff3d5d04db07e Author: Dave Airlie Date: Sat Jan 27 04:12:14 2024 +1000 Merge tag 'drm-misc-fixes-for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes One regression fixup to samsung-dsim.c module - The FORCE_STOP_STATE bit is ineffective for forcing DSI link into LP-11 mode, causing timing issues and potential bridge failures. This patch reverts previous commits and corrects this issue. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20240126141130.15512-1-inki.dae@samsung.com commit 4d7acc8f48bcf27d0dc068f02e55c77e840b9110 Author: Dave Airlie Date: Sat Jan 27 04:04:34 2024 +1000 Revert "nouveau: push event block/allowing out of the fence context" This reverts commit eacabb5462717a52fccbbbba458365a4f5e61f35. This commit causes some regressions in desktop usage, this will reintroduce the original deadlock in DRI_PRIME situations, I've got an idea to fix it by offloading to a workqueue in a different spot, however this code has a race condition where we sometimes miss interrupts so I'd like to fix that as well. Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie commit 11f563320917d4c9cee5d572a344c1360487530d Merge: 3f5198c7f6722 4d0e8f9a361b3 Author: Paolo Bonzini Date: Fri Jan 26 12:58:26 2024 -0500 Merge tag 'kvm-riscv-6.8-2' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv changes for 6.8 part #2 - Zbc extension support for Guest/VM - Scalar crypto extensions support for Guest/VM - Vector crypto extensions support for Guest/VM - Zfh[min] extensions support for Guest/VM - Zihintntl extension support for Guest/VM - Zvfh[min] extensions support for Guest/VM - Zfa extension support for Guest/VM commit 9c4a1126ad9ce6699cc6ad2ca7c590cd1203c70f Merge: ddd2b472a1b7e f9f031dd21a7c Author: Dave Airlie Date: Sat Jan 27 03:58:24 2024 +1000 Merge tag 'drm-intel-fixes-2024-01-26' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - PSR fix for HSW Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZbPGBL9lj4DxxIW1@jlahtine-mobl.ger.corp.intel.com commit ddd2b472a1b7e7c2ec9bdc9420045ba08eb9f664 Merge: 66dbd9004a550 27d19268cf394 Author: Dave Airlie Date: Sat Jan 27 03:56:02 2024 +1000 Merge tag 'drm-misc-fixes-2024-01-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Plenty of ivpu fixes to improve the general stability and debugging, a suspend fix for the anx7625 bridge, a revert to fix an initialization order bug between i915 and simpledrm and a documentation warning fix for dp_mst. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/tp77e5fokigup6cgmpq6mtg46kzdw2dpze6smpnwfoml4kmwpq@bo6mbkezpkle commit 3f5198c7f6722b07e6c827d674fdaf3d7019ed21 Merge: 6613476e225e0 83303a4c776ce Author: Paolo Bonzini Date: Fri Jan 26 12:57:12 2024 -0500 Merge tag 'kvm-s390-master-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD pqap instruction missing cc fix vsie shadow creation race fix commit 00aab7dcb2267f2aef59447602f34501efe1a07f Author: Johan Hovold Date: Fri Jan 26 18:09:01 2024 +0100 HID: i2c-hid-of: fix NULL-deref on failed power up A while back the I2C HID implementation was split in an ACPI and OF part, but the new OF driver never initialises the client pointer which is dereferenced on power-up failures. Fixes: b33752c30023 ("HID: i2c-hid: Reorganize so ACPI and OF are separate modules") Cc: stable@vger.kernel.org # 5.12 Cc: Douglas Anderson Signed-off-by: Johan Hovold Reviewed-by: Douglas Anderson Signed-off-by: Jiri Kosina commit 47c5dd66c1840524572dcdd956f4af2bdb6fbdff Author: Guixin Liu Date: Fri Jan 26 16:26:43 2024 +0800 nvmet-tcp: fix nvme tcp ida memory leak The nvmet_tcp_queue_ida should be destroy when the nvmet-tcp module exit. Signed-off-by: Guixin Liu Reviewed-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit a7a6a01f88e87dec4bf2365571dd2dc7403d52d0 Author: Ard Biesheuvel Date: Fri Jan 26 12:14:30 2024 +0100 x86/efistub: Give up if memory attribute protocol returns an error The recently introduced EFI memory attributes protocol should be used if it exists to ensure that the memory allocation created for the kernel permits execution. This is needed for compatibility with tightened requirements related to Windows logo certification for x86 PCs. Currently, we simply strip the execute protect (XP) attribute from the entire range, but this might be rejected under some firmware security policies, and so in a subsequent patch, this will be changed to only strip XP from the executable region that runs early, and make it read-only (RO) as well. In order to catch any issues early, ensure that the memory attribute protocol works as intended, and give up if it produces spurious errors. Note that the DXE services based fallback was always based on best effort, so don't propagate any errors returned by that API. Fixes: a1b87d54f4e4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot") Signed-off-by: Ard Biesheuvel commit 7bbe8f0071dfa23fcc3b2864ec9f3b1aeb7ab2df Author: Sun Haiyong Date: Sat Jan 6 17:41:29 2024 +0800 perf tools: Fix calloc() arguments to address error introduced in gcc-14 the definition of calloc is as follows: void *calloc(size_t nmemb, size_t size); number of members is in the first parameter and the size is in the second parameter. Fix error messages on gcc 14 20240102: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] Committer notes: I noticed this on fedora 40 and rawhide. Signed-off-by: Sun Haiyong Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20240106094129.3337057-1-siyanteng@loongson.cn Signed-off-by: Yanteng Si Signed-off-by: Arnaldo Carvalho de Melo commit eeca59a6e8e610e593d17e12f67324c615ec5ef2 Author: Alexander Tsoy Date: Thu Jan 25 23:54:57 2024 +0300 ALSA: usb-audio: Support read-only clock selector control Clock selector control might be read-only. Add corresponding checks to prevent sending control requests that would fail. Signed-off-by: Alexander Tsoy Link: https://lore.kernel.org/r/20240125205457.28258-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit 79baac8acfc60a7a5114f6d60731e28c242ef8ce Author: Sun Haiyong Date: Mon Dec 4 16:20:55 2023 +0800 perf top: Remove needless malloc(0) call that triggers -Walloc-size GCC 14 introduces a new -Walloc-size included in -Wextra which errors out like: builtin-top.c: In function ‘prompt_integer’: builtin-top.c:360:21: error: allocation of insufficient size ‘0’ for type ‘char’ with size ‘1’ [-Werror=alloc-size] 360 | char *buf = malloc(0), *p; | ^~~~~~ Just set it to NULL, getline() will do the allocation. Signed-off-by: Sun Haiyong Signed-off-by: Yanteng Si Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231204082055.91877-1-siyanteng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 39af67413997a350fa02a88e15eaacf202c94884 Author: Yicong Yang Date: Mon Jan 22 16:04:06 2024 +0800 perf build: Make minimal shellcheck version to v0.6.0 The perf build failed due to the shellcheck on my machine (v0.4.6 on Ubuntu 18.04.1 LTS) doesn't support -a/--check-sourced and -S/--severity option. These two options are introduced in shellcheck v0.4.7 and v0.6.0 respectively. So restrict the minimal version of shellcheck to v0.6.0. Fixes: b809fc656e763296 ("perf build: Shellcheck support for OUTPUT directory") Reviewed-by: Ian Rogers Signed-off-by: Yicong Yang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Junhao He Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linuxarm@huawei.com Link: https://lore.kernel.org/r/20240122080406.28678-1-yangyicong@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 1233d1d54b7f66813cfa748aaaeca8c4f9c36c6b Author: Arnaldo Carvalho de Melo Date: Fri Jan 26 11:00:01 2024 -0300 tools headers UAPI: Update tools's copy of drm.h headers to pick DRM_IOCTL_MODE_CLOSEFB Picking the changes from: 8570c27932e132d2 ("drm/syncobj: Add deadline support for syncobj waits") 9724ed6c1b1212d1 ("drm: Introduce DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT") e4d983acffff270c ("drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP") d208d875667e2a29 ("drm: introduce CLOSEFB IOCTL") afa5cf3175a22b71 ("drm/i915/uapi: fix typos/spellos and punctuation") Addressing these perf build warnings: Warning: Kernel ABI header differences: Now 'perf trace' and other code that might use the tools/perf/trace/beauty autogenerated tables will be able to translate this new ioctl command into a string: $ tools/perf/trace/beauty/drm_ioctl.sh > before $ cp include/uapi/drm/drm.h tools/include/uapi/drm/drm.h $ tools/perf/trace/beauty/drm_ioctl.sh > after $ diff -u before after --- before 2024-01-26 10:54:23.486381862 -0300 +++ after 2024-01-26 10:54:35.767902442 -0300 @@ -109,6 +109,7 @@ [0xCD] = "SYNCOBJ_TIMELINE_SIGNAL", [0xCE] = "MODE_GETFB2", [0xCF] = "SYNCOBJ_EVENTFD", + [0xD0] = "MODE_CLOSEFB", [DRM_COMMAND_BASE + 0x00] = "I915_INIT", [DRM_COMMAND_BASE + 0x01] = "I915_FLUSH", [DRM_COMMAND_BASE + 0x02] = "I915_FLIP", $ Cc: Adrian Hunter Cc: Dmitry Baryshkov Cc: Ian Rogers Cc: Javier Martinez Canillas Cc: Jiri Olsa Cc: Namhyung Kim Cc: Randy Dunlap Cc: Rob Clark Cc: Simon Ser Cc: Tvrtko Ursulin Cc: Zack Rusin Link: https://lore.kernel.org/lkml/ZbPIN9Dcc5AM0uxo@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 61f61c89fa5d9925e0b874854fb62e51948a6de1 Author: Andreas Larsson Date: Mon Jan 15 16:02:00 2024 +0100 MAINTAINERS: Add Andreas Larsson as co-maintainer for arch/sparc Dave has not been very active on arch/sparc for the past two years. I have been contributing to the SPARC32 port as well as maintaining out-of-tree SPARC32 patches for LEON3/4/5 (SPARCv8 with CAS support) since 2012. I am willing to step up as an arch/sparc (co-)maintainer. For recent discussions on the matter, see [1] and [2]. [1] https://lore.kernel.org/r/20230713075235.2164609-1-u.kleine-koenig@pengutronix.de [2] https://lore.kernel.org/r/20231209105816.GA1085691@ravnborg.org/ Signed-off-by: Andreas Larsson Suggested-by: Arnd Bergmann Acked-by: Sam Ravnborg Acked-by: John Paul Adrian Glaubitz Acked-by: Jose E. Marchesi Signed-off-by: Arnd Bergmann commit 9a8dd2f24d1cb8e8df2c5d18b4973298db1006e1 Author: Ian Rogers Date: Tue Jan 23 20:30:15 2024 -0800 perf test shell daemon: Make signal test less racy The daemon signal test sends signals and then expects files to be written. It was observed on an Intel Alderlake that the signals were sent too quickly leading to the 3 expected files not appearing. To avoid this send the next signal only after the expected previous file has appeared. To avoid an infinite loop the number of retries is limited. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Ingo Molnar Cc: Kajol Jain Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Ross Zwisler Cc: Shirisha G Link: https://lore.kernel.org/r/20240124043015.1388867-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 1c2124ec8431f88f5c122be73cb4b784b558d600 Author: Ian Rogers Date: Tue Jan 23 20:30:14 2024 -0800 perf test shell script: Fix test for python being disabled "grep -cv" can exit with an error code that causes the "set -e" to abort the script. Switch to using the grep exit code in the if condition to avoid this. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Ross Zwisler Cc: Shirisha G Link: https://lore.kernel.org/r/20240124043015.1388867-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a734c7f969750302b1150ef20468704498f74e64 Author: Ian Rogers Date: Tue Jan 23 20:30:13 2024 -0800 perf test: Workaround debug output in list test Write the JSON output to a specific file to avoid debug output breaking it. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Ross Zwisler Cc: Shirisha G Link: https://lore.kernel.org/r/20240124043015.1388867-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 79bacb6ad73ce63faba3564671c2028e6c3fa1e2 Author: Ian Rogers Date: Tue Jan 23 20:30:12 2024 -0800 perf list: Add output file option Add an option to write the 'perf list' output to a specific file. This can avoid issues with debug output being written into the output stream. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Ross Zwisler Cc: Shirisha G Link: https://lore.kernel.org/r/20240124043015.1388867-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9d95c6be48fc8d3d622658da8fbd6d6787d5c2e7 Author: Ian Rogers Date: Tue Jan 23 20:30:11 2024 -0800 perf list: Switch error message to pr_err() to respect debug settings (-v) Using printf() can interrupt 'perf list output', use pr_err() which can respect debug settings and the debug file. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Rajeev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Ross Zwisler Cc: Shirisha G Link: https://lore.kernel.org/r/20240124043015.1388867-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2dac1f089add90a45d93fe8217938281532b86c7 Author: Thomas Richter Date: Thu Jan 25 11:03:51 2024 +0100 perf test: Fix 'perf script' tests on s390 In linux next repo, test case 'perf script tests' fails on s390. The root case is a command line invocation of 'perf record' with call-graph information. On s390 only DWARF formatted call-graphs are supported and only on software events. Change the command line parameters for s390. Output before: # perf test 89 89: perf script tests : FAILED! # Output after: # perf test 89 89: perf script tests : Ok # Fixes: 0dd5041c9a0eaf8c ("perf addr_location: Add init/exit/copy functions") Reviewed-by: Ian Rogers Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Namhyung Kim Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20240125100351.936262-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit b0dc99215598d7fc7c6903437d49f0b33d1ef899 Author: Arnaldo Carvalho de Melo Date: Thu Jan 25 11:23:56 2024 -0300 tools headers UAPI: Sync linux/fcntl.h with the kernel sources To get the changes in: 8a924db2d7b5eb69 ("fs: Pass AT_GETATTR_NOSEC flag to getattr interface function") That don't add anything that is handled by existing hard coded tables or table generation scripts. This silences this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/fcntl.h include/uapi/linux/fcntl.h Cc: Adrian Hunter Cc: Christian Brauner Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stefan Berger Link: https://lore.kernel.org/lkml/ZbJv9fGF_k2xXEdr@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 174372668933ede569b9e56eab26971669a6a0a9 Author: Arnaldo Carvalho de Melo Date: Thu Jan 25 11:08:44 2024 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources to pick IA32_MKTME_KEYID_PARTITIONING To pick up the changes in: 765a0542fdc7aad7 ("x86/virt/tdx: Detect TDX during kernel boot") Addressing this tools/perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h That makes the beautification scripts to pick some new entries: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after --- before 2024-01-25 11:08:12.363223880 -0300 +++ after 2024-01-25 11:08:24.839307699 -0300 @@ -21,6 +21,7 @@ [0x0000004f] = "PPIN", [0x00000060] = "LBR_CORE_TO", [0x00000079] = "IA32_UCODE_WRITE", + [0x00000087] = "IA32_MKTME_KEYID_PARTITIONING", [0x0000008b] = "AMD64_PATCH_LEVEL", [0x0000008C] = "IA32_SGXLEPUBKEYHASH0", [0x0000008D] = "IA32_SGXLEPUBKEYHASH1", $ Now one can trace systemwide asking to see backtraces to where that MSR is being read/written, see this example with a previous update: # perf trace -e msr:*_msr/max-stack=32/ --filter="msr==IA32_MKTME_KEYID_PARTITIONING" ^C# If we use -v (verbose mode) we can see what it does behind the scenes: # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr==IA32_MKTME_KEYID_PARTITIONING" Using CPUID GenuineIntel-6-8E-A 0x87 New filter for msr:read_msr: (msr==0x87) && (common_pid != 58627 && common_pid != 3792) 0x87 New filter for msr:write_msr: (msr==0x87) && (common_pid != 58627 && common_pid != 3792) mmap size 528384B ^C# Example with a frequent msr: # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr==IA32_SPEC_CTRL" --max-events 2 Using CPUID AuthenticAMD-25-21-0 0x48 New filter for msr:read_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841) 0x48 New filter for msr:write_msr: (msr==0x48) && (common_pid != 2612129 && common_pid != 3841) mmap size 528384B Looking at the vmlinux_path (8 entries long) symsrc__init: build id mismatch for vmlinux. Using /proc/kcore for kernel data Using /proc/kallsyms for symbols 0.000 Timer/2525383 msr:write_msr(msr: IA32_SPEC_CTRL, val: 6) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) __switch_to_xtra ([kernel.kallsyms]) __switch_to ([kernel.kallsyms]) __schedule ([kernel.kallsyms]) schedule ([kernel.kallsyms]) futex_wait_queue_me ([kernel.kallsyms]) futex_wait ([kernel.kallsyms]) do_futex ([kernel.kallsyms]) __x64_sys_futex ([kernel.kallsyms]) do_syscall_64 ([kernel.kallsyms]) entry_SYSCALL_64_after_hwframe ([kernel.kallsyms]) __futex_abstimed_wait_common64 (/usr/lib64/libpthread-2.33.so) 0.030 :0/0 msr:write_msr(msr: IA32_SPEC_CTRL, val: 2) do_trace_write_msr ([kernel.kallsyms]) do_trace_write_msr ([kernel.kallsyms]) __switch_to_xtra ([kernel.kallsyms]) __switch_to ([kernel.kallsyms]) __schedule ([kernel.kallsyms]) schedule_idle ([kernel.kallsyms]) do_idle ([kernel.kallsyms]) cpu_startup_entry ([kernel.kallsyms]) secondary_startup_64_no_verify ([kernel.kallsyms]) # Cc: Adrian Hunter Cc: Dave Hansen Cc: Ian Rogers Cc: Jiri Olsa Cc: Kai Huang Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZbJt27rjkQVU1YoP@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 690811f0128eb6034e5fd011c3c54878839b4014 Author: Arnaldo Carvalho de Melo Date: Thu Jan 25 11:00:14 2024 -0300 tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_MNT_ID_UNIQUE To pick the changes from: 98d2b43081972abe ("add unique mount ID") That add STATX_MNT_ID_UNIQUE that was manually added to tools/perf/trace/beauty/statx.c, at some point this should move to the shell based automated way. This silences this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/stat.h include/uapi/linux/stat.h Cc: Adrian Hunter Cc: Christian Brauner Cc: Ian Rogers Cc: Jiri Olsa Cc: Miklos Szeredi Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZbJq08s19890WDo-@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ff3d5d04db07e5374758baa7e877fde8d683ebab Author: Michael Walle Date: Mon Nov 13 17:43:44 2023 +0100 drm: bridge: samsung-dsim: Don't use FORCE_STOP_STATE The FORCE_STOP_STATE bit is unsuitable to force the DSI link into LP-11 mode. It seems the bridge internally queues DSI packets and when the FORCE_STOP_STATE bit is cleared, they are sent in close succession without any useful timing (this also means that the DSI lanes won't go into LP-11 mode). The length of this gibberish varies between 1ms and 5ms. This sometimes breaks an attached bridge (TI SN65DSI84 in this case). In our case, the bridge will fail in about 1 per 500 reboots. The FORCE_STOP_STATE handling was introduced to have the DSI lanes in LP-11 state during the .pre_enable phase. But as it turns out, none of this is needed at all. Between samsung_dsim_init() and samsung_dsim_set_display_enable() the lanes are already in LP-11 mode. The code as it was before commit 20c827683de0 ("drm: bridge: samsung-dsim: Fix init during host transfer") and 0c14d3130654 ("drm: bridge: samsung-dsim: Fix i.MX8M enable flow to meet spec") was correct in this regard. This patch basically reverts both commits. It was tested on an i.MX8M SoC with an SN65DSI84 bridge. The signals were probed and the DSI packets were decoded during initialization and link start-up. After this patch the first DSI packet on the link is a VSYNC packet and the timing is correct. Command mode between .pre_enable and .enable was also briefly tested by a quick hack. There was no DSI link partner which would have responded, but it was made sure the DSI packet was send on the link. As a side note, the command mode seems to just work in HS mode. I couldn't find that the bridge will handle commands in LP mode. Fixes: 20c827683de0 ("drm: bridge: samsung-dsim: Fix init during host transfer") Fixes: 0c14d3130654 ("drm: bridge: samsung-dsim: Fix i.MX8M enable flow to meet spec") Signed-off-by: Michael Walle Signed-off-by: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20231113164344.1612602-1-mwalle@kernel.org commit 1f4a994be2c3d13852fd5c1054f292bd303352cc Author: Inochi Amaoto Date: Fri Jan 26 17:20:00 2024 +0800 riscv: dts: sophgo: separate sg2042 mtime and mtimecmp to fit aclint format Change the timer layout in the dtb to fit the format that needed by the SBI. Fixes: 967a94a92aaa ("riscv: dts: add initial Sophgo SG2042 SoC device tree") Reviewed-by: Chen Wang Reviewed-by: Guo Ren Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Arnd Bergmann commit cc4b2dd95f0d1eba8c691b36e8f4d1795582f1ff Author: Gao Xiang Date: Thu Jan 25 20:00:39 2024 +0800 erofs: fix infinite loop due to a race of filling compressed_bvecs I encountered a race issue after lengthy (~594647 secs) stress tests on a 64k-page arm64 VM with several 4k-block EROFS images. The timing is like below: z_erofs_try_inplace_io z_erofs_fill_bio_vec cmpxchg(&compressed_bvecs[].page, NULL, ..) [access bufvec] compressed_bvecs[] = *bvec; Previously, z_erofs_submit_queue() just accessed bufvec->page only, so other fields in bufvec didn't matter. After the subpage block support is landed, .offset and .end can be used too, but filling bufvec isn't an atomic operation which can cause inconsistency. Let's use a spinlock to keep the atomicity of each bufvec. More specifically, just reuse the existing spinlock `pcl->obj.lockref.lock` since it's rarely used (also it takes a short time if even used) as long as the pcluster has a reference. Fixes: 192351616a9d ("erofs: support I/O submission for sub-page compressed blocks") Signed-off-by: Gao Xiang Reviewed-by: Yue Hu Reviewed-by: Sandeep Dhavale Link: https://lore.kernel.org/r/20240125120039.3228103-1-hsiangkao@linux.alibaba.com commit 1b023d475ae928f3036cefee9ea0a499af1d8900 Author: Mario Limonciello Date: Tue Jan 16 21:05:25 2024 -0600 wifi: mac80211: Drop WBRF debugging statements Due to the way that debugging is used in the mac80211 subsystem this message ends up being noisier than it needs to be. As the statement is only useful at a first stage of triage for BIOS bugs, just drop it. Cc: Jun Ma Suggested-by: Kalle Valo Signed-off-by: Mario Limonciello Tested-by: Kalle Valo Link: https://msgid.link/20240117030525.539-1-mario.limonciello@amd.com Signed-off-by: Johannes Berg commit 3a3ef3940798e85121066a859127e72a528dc32a Author: Benjamin Berg Date: Tue Jan 23 20:08:19 2024 +0200 wifi: iwlwifi: mvm: skip adding debugfs symlink for reconfig The function to add an interface may be called without a previous removal if the HW is being reconfigured. As such, only add the symlink if the hardware is not being reconfigured due to a HW_RESTART. Fixes: c36235acb34f ("wifi: iwlwifi: mvm: rework debugfs handling") Signed-off-by: Benjamin Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20240123200528.314395eacda4.I5823e962c3c3674b942383733debd10b3fe903e2@changeid Signed-off-by: Johannes Berg commit b743287d7a0007493f5cada34ed2085d475050b4 Author: Johannes Berg Date: Thu Jan 25 09:51:09 2024 +0100 wifi: cfg80211: fix wiphy delayed work queueing When a wiphy work is queued with timer, and then again without a delay, it's started immediately but *also* started again after the timer expires. This can lead, for example, to warnings in mac80211's offchannel code as reported by Jouni. Running the same work twice isn't expected, of course. Fix this by deleting the timer at this point, when queuing immediately due to delay=0. Cc: stable@vger.kernel.org Reported-by: Jouni Malinen Fixes: a3ee4dc84c4e ("wifi: cfg80211: add a work abstraction with special semantics") Link: https://msgid.link/20240125095108.2feb0eaaa446.I4617f3210ed0e7f252290d5970dac6a876aa595b@changeid Signed-off-by: Johannes Berg commit 353d321f63f7dbfc9ef58498cc732c9fe886a596 Author: Johannes Berg Date: Tue Jan 23 20:08:11 2024 +0200 wifi: iwlwifi: fix double-free bug The storage for the TLV PC register data wasn't done like all the other storage in the drv->fw area, which is cleared at the end of deallocation. Therefore, the freeing must also be done differently, explicitly NULL'ing it out after the free, since otherwise there's a nasty double-free bug here if a file fails to load after this has been parsed, and we get another free later (e.g. because no other file exists.) Fix that by adding the missing NULL assignment. Cc: stable@vger.kernel.org Fixes: 5e31b3df86ec ("wifi: iwlwifi: dbg: print pc register data once fw dump occurred") Reported-by: Guy Kaplan Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20240123200528.675f3c24ec0d.I6ab4015cd78d82dd95471f840629972ef0331de3@changeid Signed-off-by: Johannes Berg commit 4bf2a626dc4bb46f0754d8ac02ec8584ff114ad5 Author: Aleksander Jan Bajkowski Date: Mon Jan 22 19:47:09 2024 +0100 MIPS: lantiq: register smp_ops on non-smp platforms Lantiq uses a common kernel config for devices with 24Kc and 34Kc cores. The changes made previously to add support for interrupts on all cores work on 24Kc platforms with SMP disabled and 34Kc platforms with SMP enabled. This patch fixes boot issues on Danube (single core 24Kc) with SMP enabled. Fixes: 730320fd770d ("MIPS: lantiq: enable all hardware interrupts on second VPE") Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: Thomas Bogendoerfer commit ce7b1b97776ec0b068c4dd6b6dbb48ae09a23519 Author: Huang Pei Date: Tue Jan 23 09:47:58 2024 +0800 MIPS: loongson64: set nid for reserved memblock region Commit 61167ad5fecd("mm: pass nid to reserve_bootmem_region()") reveals that reserved memblock regions have no valid node id set, just set it right since loongson64 firmware makes it clear in memory layout info. This works around booting failure on 3A1000+ since commit 61167ad5fecd ("mm: pass nid to reserve_bootmem_region()") under CONFIG_DEFERRED_STRUCT_PAGE_INIT. Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer commit abcabb9e30a1f9a69c76776f8abffc31c377b542 Author: Huang Pei Date: Tue Jan 23 09:47:57 2024 +0800 MIPS: reserve exception vector space ONLY ONCE "cpu_probe" is called both by BP and APs, but reserving exception vector (like 0x0-0x1000) called by "cpu_probe" need once and calling on APs is too late since memblock is unavailable at that time. So, reserve exception vector ONLY by BP. Suggested-by: Thomas Bogendoerfer Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer commit dd3c33ccbb8f0dc6a256dc55e7607569aea69721 Author: Florian Fainelli Date: Tue Jan 23 09:46:54 2024 -0800 MIPS: BCM63XX: Fix missing prototypes Most of the symbols for which we do not have a prototype can actually be made static and for the few that cannot, there is already a declaration in a header for it. Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 96204e15310c218fd9355bdcacd02fed1d18070e Author: Ryan Roberts Date: Tue Jan 23 17:14:20 2024 +0000 mm: thp_get_unmapped_area must honour topdown preference The addition of commit efa7df3e3bb5 ("mm: align larger anonymous mappings on THP boundaries") caused the "virtual_address_range" mm selftest to start failing on arm64. Let's fix that regression. There were 2 visible problems when running the test; 1) it takes much longer to execute, and 2) the test fails. Both are related: The (first part of the) test allocates as many 1GB anonymous blocks as it can in the low 256TB of address space, passing NULL as the addr hint to mmap. Before the faulty patch, all allocations were abutted and contained in a single, merged VMA. However, after this patch, each allocation is in its own VMA, and there is a 2M gap between each VMA. This causes the 2 problems in the test: 1) mmap becomes MUCH slower because there are so many VMAs to check to find a new 1G gap. 2) mmap fails once it hits the VMA limit (/proc/sys/vm/max_map_count). Hitting this limit then causes a subsequent calloc() to fail, which causes the test to fail. The problem is that arm64 (unlike x86) selects ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT. But __thp_get_unmapped_area() allocates len+2M then always aligns to the bottom of the discovered gap. That causes the 2M hole. Fix this by detecting cases where we can still achive the alignment goal when moved to the top of the allocated area, if configured to prefer top-down allocation. While we are at it, fix thp_get_unmapped_area's use of pgoff, which should always be zero for anonymous mappings. Prior to the faulty change, while it was possible for user space to pass in pgoff!=0, the old mm->get_unmapped_area() handler would not use it. thp_get_unmapped_area() does use it, so let's explicitly zero it before calling the handler. This should also be the correct behavior for arches that define their own get_unmapped_area() handler. Link: https://lkml.kernel.org/r/20240123171420.3970220-1-ryan.roberts@arm.com Fixes: efa7df3e3bb5 ("mm: align larger anonymous mappings on THP boundaries") Closes: https://lore.kernel.org/linux-mm/1e8f5ac7-54ce-433a-ae53-81522b2320e1@arm.com/ Signed-off-by: Ryan Roberts Reviewed-by: Yang Shi Cc: Matthew Wilcox (Oracle) Cc: Rik van Riel Cc: Signed-off-by: Andrew Morton commit c5a2f74db71a849f3a60bc153d684d6d28a0c665 Author: Gaurav Jain Date: Thu Jan 18 14:55:57 2024 +0530 crypto: caam - fix asynchronous hash ahash_alg->setkey is updated to ahash_nosetkey in ahash.c so checking setkey() function to determine hmac algorithm is not valid. to fix this added is_hmac variable in structure caam_hash_alg to determine whether the algorithm is hmac or not. Fixes: 2f1f34c1bf7b ("crypto: ahash - optimize performance when wrapping shash") Signed-off-by: Gaurav Jain Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit e1d54d153fc3e697b841999df7cbad51492def8e Author: Damian Muszynski Date: Fri Jan 19 17:12:38 2024 +0100 crypto: qat - fix arbiter mapping generation algorithm for QAT 402xx The commit "crypto: qat - generate dynamically arbiter mappings" introduced a regression on qat_402xx devices. This is reported when the driver probes the device, as indicated by the following error messages: 4xxx 0000:0b:00.0: enabling device (0140 -> 0142) 4xxx 0000:0b:00.0: Generate of the thread to arbiter map failed 4xxx 0000:0b:00.0: Direct firmware load for qat_402xx_mmp.bin failed with error -2 The root cause of this issue was the omission of a necessary function pointer required by the mapping algorithm during the implementation. Fix it by adding the missing function pointer. Fixes: 5da6a2d5353e ("crypto: qat - generate dynamically arbiter mappings") Signed-off-by: Damian Muszynski Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 9b3058d1f456464a02e202cc7fc660508709097c Author: Gregory Greenman Date: Tue Jan 2 14:20:19 2024 +0200 MAINTAINERS: remove myself as iwlwifi driver maintainer As I'm resigning from Intel, it's time to remove myself as a maintainer of iwlwifi. Good luck to Miri! Signed-off-by: Gregory Greenman Link: https://msgid.link/20240102122019.1689602-1-gregory.greenman@intel.com Signed-off-by: Johannes Berg commit 48ef9e87b407f89f230f804815af7ac2031ec17a Author: Randy Dunlap Date: Fri Jan 26 16:22:07 2024 +0800 LoongArch: KVM: Add returns to SIMD stubs The stubs for kvm_own/lsx()/kvm_own_lasx() when CONFIG_CPU_HAS_LSX or CONFIG_CPU_HAS_LASX is not defined should have a return value since they return an int, so add "return -EINVAL;" to the stubs. Fixes the build error: In file included from ../arch/loongarch/include/asm/kvm_csr.h:12, from ../arch/loongarch/kvm/interrupt.c:8: ../arch/loongarch/include/asm/kvm_vcpu.h: In function 'kvm_own_lasx': ../arch/loongarch/include/asm/kvm_vcpu.h:73:39: error: no return statement in function returning non-void [-Werror=return-type] 73 | static inline int kvm_own_lasx(struct kvm_vcpu *vcpu) { } Fixes: db1ecca22edf ("LoongArch: KVM: Add LSX (128bit SIMD) support") Fixes: 118e10cd893d ("LoongArch: KVM: Add LASX (256bit SIMD) support") Signed-off-by: Randy Dunlap Signed-off-by: Huacai Chen commit 614f362918c782d1cfa4ee50f96072a95eac264e Author: Huacai Chen Date: Fri Jan 26 16:22:07 2024 +0800 LoongArch: KVM: Fix build due to API changes Commit 8569992d64b8f750e34b7858eac ("KVM: Use gfn instead of hva for mmu_notifier_retry") replaces mmu_invalidate_retry_hva() usage with mmu_invalidate_retry_gfn() for X86, LoongArch also need similar changes to fix build. Signed-off-by: Huacai Chen commit 5056c596c3d1848021a4eaa76ee42f4c05c50346 Author: Huacai Chen Date: Fri Jan 26 16:22:07 2024 +0800 LoongArch/smp: Call rcutree_report_cpu_starting() at tlb_init() Machines which have more than 8 nodes fail to boot SMP after commit a2ccf46333d7b2cf96 ("LoongArch/smp: Call rcutree_report_cpu_starting() earlier"). Because such machines use tlb-based per-cpu base address rather than dmw-based per-cpu base address, resulting per-cpu variables can only be accessed after tlb_init(). But rcutree_report_cpu_starting() is now called before tlb_init() and accesses per-cpu variables indeed. Since the original patch want to avoid the lockdep warning caused by page allocation in tlb_init(), we can move rcutree_report_cpu_starting() to tlb_init() where after tlb exception configuration but before page allocation. Fixes: a2ccf46333d7b2cf96 ("LoongArch/smp: Call rcutree_report_cpu_starting() earlier") Signed-off-by: Huacai Chen commit 4ef9ad19e17676b9ef071309bc62020e2373705d Author: Yang Shi Date: Thu Jan 18 10:05:05 2024 -0800 mm: huge_memory: don't force huge page alignment on 32 bit commit efa7df3e3bb5 ("mm: align larger anonymous mappings on THP boundaries") caused two issues [1] [2] reported on 32 bit system or compat userspace. It doesn't make too much sense to force huge page alignment on 32 bit system due to the constrained virtual address space. [1] https://lore.kernel.org/linux-mm/d0a136a0-4a31-46bc-adf4-2db109a61672@kernel.org/ [2] https://lore.kernel.org/linux-mm/CAJuCfpHXLdQy1a2B6xN2d7quTYwg2OoZseYPZTRpU0eHHKD-sQ@mail.gmail.com/ Link: https://lkml.kernel.org/r/20240118180505.2914778-1-shy828301@gmail.com Fixes: efa7df3e3bb5 ("mm: align larger anonymous mappings on THP boundaries") Signed-off-by: Yang Shi Reported-by: Jiri Slaby Reported-by: Suren Baghdasaryan Tested-by: Jiri Slaby Tested-by: Suren Baghdasaryan Reviewed-by: Matthew Wilcox (Oracle) Cc: Rik van Riel Cc: Christopher Lameter Signed-off-by: Andrew Morton commit 67695f18d55924b2013534ef3bdc363bc9e14605 Author: Lokesh Gidra Date: Wed Jan 17 14:37:29 2024 -0800 userfaultfd: fix mmap_changing checking in mfill_atomic_hugetlb In mfill_atomic_hugetlb(), mmap_changing isn't being checked again if we drop mmap_lock and reacquire it. When the lock is not held, mmap_changing could have been incremented. This is also inconsistent with the behavior in mfill_atomic(). Link: https://lkml.kernel.org/r/20240117223729.1444522-1-lokeshgidra@google.com Fixes: df2cc96e77011 ("userfaultfd: prevent non-cooperative events vs mcopy_atomic races") Signed-off-by: Lokesh Gidra Cc: Andrea Arcangeli Cc: Mike Rapoport Cc: Axel Rasmussen Cc: Brian Geffon Cc: David Hildenbrand Cc: Jann Horn Cc: Kalesh Singh Cc: Matthew Wilcox (Oracle) Cc: Nicolas Geoffray Cc: Peter Xu Cc: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit d021b442cf312664811783e92b3d5e4548e92a53 Author: Ryan Roberts Date: Mon Jan 22 12:05:54 2024 +0000 selftests/mm: ksm_tests should only MADV_HUGEPAGE valid memory ksm_tests was previously mmapping a region of memory, aligning the returned pointer to a PMD boundary, then setting MADV_HUGEPAGE, but was setting it past the end of the mmapped area due to not taking the pointer alignment into consideration. Fix this behaviour. Up until commit efa7df3e3bb5 ("mm: align larger anonymous mappings on THP boundaries"), this buggy behavior was (usually) masked because the alignment difference was always less than PMD-size. But since the mentioned commit, `ksm_tests -H -s 100` started failing. Link: https://lkml.kernel.org/r/20240122120554.3108022-1-ryan.roberts@arm.com Fixes: 325254899684 ("selftests: vm: add KSM huge pages merging time test") Signed-off-by: Ryan Roberts Cc: Pedro Demarchi Gomes Cc: Shuah Khan Cc: Signed-off-by: Andrew Morton commit 6f9dc684cae638dda0570154509884ee78d0f75c Author: Samuel Holland Date: Mon Jan 22 09:52:01 2024 -0800 scs: add CONFIG_MMU dependency for vfree_atomic() The shadow call stack implementation fails to build without CONFIG_MMU: ld.lld: error: undefined symbol: vfree_atomic >>> referenced by scs.c >>> kernel/scs.o:(scs_free) in archive vmlinux.a Link: https://lkml.kernel.org/r/20240122175204.2371009-1-samuel.holland@sifive.com Fixes: a2abe7cbd8fe ("scs: switch to vmapped shadow stacks") Signed-off-by: Samuel Holland Reviewed-by: Sami Tolvanen Cc: Will Deacon Cc: Signed-off-by: Andrew Morton commit e4e3df290f65da6cb27dac1309389c916f27db1a Author: David Hildenbrand Date: Mon Jan 22 18:17:51 2024 +0100 mm/memory: fix folio_set_dirty() vs. folio_mark_dirty() in zap_pte_range() The correct folio replacement for "set_page_dirty()" is "folio_mark_dirty()", not "folio_set_dirty()". Using the latter won't properly inform the FS using the dirty_folio() callback. This has been found by code inspection, but likely this can result in some real trouble when zapping dirty PTEs that point at clean pagecache folios. Yuezhang Mo said: "Without this fix, testing the latest exfat with xfstests, test cases generic/029 and generic/030 will fail." Link: https://lkml.kernel.org/r/20240122171751.272074-1-david@redhat.com Fixes: c46265030b0f ("mm/memory: page_remove_rmap() -> folio_remove_rmap_pte()") Signed-off-by: David Hildenbrand Reported-by: Ryan Roberts Closes: https://lkml.kernel.org/r/2445cedb-61fb-422c-8bfb-caf0a2beed62@arm.com Reviewed-by: Ryan Roberts Cc: Matthew Wilcox (Oracle) Reviewed-by: Yuezhang Mo Signed-off-by: Andrew Morton commit db44c658f798ad907219f15e033229b8d1aadb93 Author: David Hildenbrand Date: Mon Jan 22 18:54:07 2024 +0100 mm/huge_memory: fix folio_set_dirty() vs. folio_mark_dirty() The correct folio replacement for "set_page_dirty()" is "folio_mark_dirty()", not "folio_set_dirty()". Using the latter won't properly inform the FS using the dirty_folio() callback. This has been found by code inspection, but likely this can result in some real trouble. Link: https://lkml.kernel.org/r/20240122175407.307992-1-david@redhat.com Fixes: a8e61d584eda0 ("mm/huge_memory: page_remove_rmap() -> folio_remove_rmap_pmd()") Signed-off-by: David Hildenbrand Cc: Ryan Roberts Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 52e63d67b5bb423b33d7a262ac7f8bd375a90145 Author: Audra Mitchell Date: Fri Jan 19 15:58:01 2024 -0500 selftests/mm: Update va_high_addr_switch.sh to check CPU for la57 flag In order for the page table level 5 to be in use, the CPU must have the setting enabled in addition to the CONFIG option. Check for the flag to be set to avoid false test failures on systems that do not have this cpu flag set. The test does a series of mmap calls including three using the MAP_FIXED flag and specifying an address that is 1<<47 or 1<<48. These addresses are only available if you are using level 5 page tables, which requires both the CPU to have the capabiltiy (la57 flag) and the kernel to be configured. Currently the test only checks for the kernel configuration option, so this test can still report a false positive. Here are the three failing lines: $ ./va_high_addr_switch | grep FAILED mmap(ADDR_SWITCH_HINT, 2 * PAGE_SIZE, MAP_FIXED): 0xffffffffffffffff - FAILED mmap(HIGH_ADDR, MAP_FIXED): 0xffffffffffffffff - FAILED mmap(ADDR_SWITCH_HINT, 2 * PAGE_SIZE, MAP_FIXED): 0xffffffffffffffff - FAILED I thought (for about a second) refactoring the test so that these three mmap calls will only be run on systems with the level 5 page tables available, but the whole point of the test is to check the level 5 feature... Link: https://lkml.kernel.org/r/20240119205801.62769-1-audra@redhat.com Fixes: 4f2930c6718a ("selftests/vm: only run 128TBswitch with 5-level paging") Signed-off-by: Audra Mitchell Cc: Rafael Aquini Cc: Shuah Khan Cc: Adam Sindelar Cc: Signed-off-by: Andrew Morton commit 91b80cc5b39f00399e8e2d17527cad2c7fa535e2 Author: Nico Pache Date: Fri Jan 19 06:14:29 2024 -0700 selftests: mm: fix map_hugetlb failure on 64K page size systems On systems with 64k page size and 512M huge page sizes, the allocation and test succeeds but errors out at the munmap. As the comment states, munmap will failure if its not HUGEPAGE aligned. This is due to the length of the mapping being 1/2 the size of the hugepage causing the munmap to not be hugepage aligned. Fix this by making the mapping length the full hugepage if the hugepage is larger than the length of the mapping. Link: https://lkml.kernel.org/r/20240119131429.172448-1-npache@redhat.com Signed-off-by: Nico Pache Cc: Donet Tom Cc: Shuah Khan Cc: Christophe Leroy Cc: Michael Ellerman Cc: Signed-off-by: Andrew Morton commit 0fe8ff51efb3fe5cb25da13229f95aa709613cb3 Author: Yosry Ahmed Date: Wed Jan 17 18:21:52 2024 +0000 MAINTAINERS: supplement of zswap maintainers update As discussed on the mailing list [1], merge the zpool maintainers entry into the zswap one. Also, add CREDITS entries for previous zswap/zpool maintainers. [1] https://lore.kernel.org/linux-mm/CAJD7tkYx4YWhGoVwnSeGc8dY_1aRRxxg8PzWBV==A6iqG_OgFw@mail.gmail.com/ Link: https://lkml.kernel.org/r/20240117182152.1439822-1-yosryahmed@google.com Signed-off-by: Yosry Ahmed Acked-by: Nhat Pham Acked-by: Dan Streetman Acked-by: Seth Jennings Acked-by: Johannes Weiner Cc: Vitaly Wool Signed-off-by: Andrew Morton commit 4434a56ec20925333d6cf4d4093641d063abd35b Author: Marco Elver Date: Thu Jan 18 12:01:30 2024 +0100 stackdepot: make fast paths lock-less again With the introduction of the pool_rwlock (reader-writer lock), several fast paths end up taking the pool_rwlock as readers. Furthermore, stack_depot_put() unconditionally takes the pool_rwlock as a writer. Despite allowing readers to make forward-progress concurrently, reader-writer locks have inherent cache contention issues, which does not scale well on systems with large CPU counts. Rework the synchronization story of stack depot to again avoid taking any locks in the fast paths. This is done by relying on RCU-protected list traversal, and the NMI-safe subset of RCU to delay reuse of freed stack records. See code comments for more details. Along with the performance issues, this also fixes incorrect nesting of rwlock within a raw_spinlock, given that stack depot should still be usable from anywhere: | [ BUG: Invalid wait context ] | ----------------------------- | swapper/0/1 is trying to lock: | ffffffff89869be8 (pool_rwlock){..--}-{3:3}, at: stack_depot_save_flags | other info that might help us debug this: | context-{5:5} | 2 locks held by swapper/0/1: | #0: ffffffff89632440 (rcu_read_lock){....}-{1:3}, at: __queue_work | #1: ffff888100092018 (&pool->lock){-.-.}-{2:2}, at: __queue_work <-- raw_spin_lock Stack depot usage stats are similar to the previous version after a KASAN kernel boot: $ cat /sys/kernel/debug/stackdepot/stats pools: 838 allocations: 29865 frees: 6604 in_use: 23261 freelist_size: 1879 The number of pools is the same as previously. The freelist size is minimally larger, but this may also be due to variance across system boots. This shows that even though we do not eagerly wait for the next RCU grace period (such as with synchronize_rcu() or call_rcu()) after freeing a stack record - requiring depot_pop_free() to "poll" if an entry may be used - new allocations are very likely to happen in later RCU grace periods. Link: https://lkml.kernel.org/r/20240118110216.2539519-2-elver@google.com Fixes: 108be8def46e ("lib/stackdepot: allow users to evict stack traces") Reported-by: Andi Kleen Signed-off-by: Marco Elver Reviewed-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit c2a292545cd43dcab86d5290ed95b006f1cefe90 Author: Marco Elver Date: Thu Jan 18 12:01:29 2024 +0100 stackdepot: add stats counters exported via debugfs Add a few basic stats counters for stack depot that can be used to derive if stack depot is working as intended. This is a snapshot of the new stats after booting a system with a KASAN-enabled kernel: $ cat /sys/kernel/debug/stackdepot/stats pools: 838 allocations: 29861 frees: 6561 in_use: 23300 freelist_size: 1840 Generally, "pools" should be well below the max; once the system is booted, "in_use" should remain relatively steady. Link: https://lkml.kernel.org/r/20240118110216.2539519-1-elver@google.com Signed-off-by: Marco Elver Reviewed-by: Andrey Konovalov Cc: Andi Kleen Cc: Dmitry Vyukov Cc: Vlastimil Babka Cc: Alexander Potapenko Signed-off-by: Andrew Morton commit f6564fce256a3944aa1bc76cb3c40e792d97c1eb Author: Marco Elver Date: Thu Jan 18 11:59:14 2024 +0100 mm, kmsan: fix infinite recursion due to RCU critical section Alexander Potapenko writes in [1]: "For every memory access in the code instrumented by KMSAN we call kmsan_get_metadata() to obtain the metadata for the memory being accessed. For virtual memory the metadata pointers are stored in the corresponding `struct page`, therefore we need to call virt_to_page() to get them. According to the comment in arch/x86/include/asm/page.h, virt_to_page(kaddr) returns a valid pointer iff virt_addr_valid(kaddr) is true, so KMSAN needs to call virt_addr_valid() as well. To avoid recursion, kmsan_get_metadata() must not call instrumented code, therefore ./arch/x86/include/asm/kmsan.h forks parts of arch/x86/mm/physaddr.c to check whether a virtual address is valid or not. But the introduction of rcu_read_lock() to pfn_valid() added instrumented RCU API calls to virt_to_page_or_null(), which is called by kmsan_get_metadata(), so there is an infinite recursion now. I do not think it is correct to stop that recursion by doing kmsan_enter_runtime()/kmsan_exit_runtime() in kmsan_get_metadata(): that would prevent instrumented functions called from within the runtime from tracking the shadow values, which might introduce false positives." Fix the issue by switching pfn_valid() to the _sched() variant of rcu_read_lock/unlock(), which does not require calling into RCU. Given the critical section in pfn_valid() is very small, this is a reasonable trade-off (with preemptible RCU). KMSAN further needs to be careful to suppress calls into the scheduler, which would be another source of recursion. This can be done by wrapping the call to pfn_valid() into preempt_disable/enable_no_resched(). The downside is that this sacrifices breaking scheduling guarantees; however, a kernel compiled with KMSAN has already given up any performance guarantees due to being heavily instrumented. Note, KMSAN code already disables tracing via Makefile, and since mmzone.h is included, it is not necessary to use the notrace variant, which is generally preferred in all other cases. Link: https://lkml.kernel.org/r/20240115184430.2710652-1-glider@google.com [1] Link: https://lkml.kernel.org/r/20240118110022.2538350-1-elver@google.com Fixes: 5ec8e8ea8b77 ("mm/sparsemem: fix race in accessing memory_section->usage") Signed-off-by: Marco Elver Reported-by: Alexander Potapenko Reported-by: syzbot+93a9e8a3dea8d6085e12@syzkaller.appspotmail.com Reviewed-by: Alexander Potapenko Tested-by: Alexander Potapenko Cc: Charan Teja Kalla Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Dmitry Vyukov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 9319b647902cbd5cc884ac08a8a6d54ce111fc78 Author: Zach O'Keefe Date: Thu Jan 18 10:19:53 2024 -0800 mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again (struct dirty_throttle_control *)->thresh is an unsigned long, but is passed as the u32 divisor argument to div_u64(). On architectures where unsigned long is 64 bytes, the argument will be implicitly truncated. Use div64_u64() instead of div_u64() so that the value used in the "is this a safe division" check is the same as the divisor. Also, remove redundant cast of the numerator to u64, as that should happen implicitly. This would be difficult to exploit in memcg domain, given the ratio-based arithmetic domain_drity_limits() uses, but is much easier in global writeback domain with a BDI_CAP_STRICTLIMIT-backing device, using e.g. vm.dirty_bytes=(1<<32)*PAGE_SIZE so that dtc->thresh == (1<<32) Link: https://lkml.kernel.org/r/20240118181954.1415197-1-zokeefe@google.com Fixes: f6789593d5ce ("mm/page-writeback.c: fix divide by zero in bdi_dirty_limits()") Signed-off-by: Zach O'Keefe Cc: Maxim Patlasov Cc: Signed-off-by: Andrew Morton commit bc29036e1da1cf66e5f8312649aeec2d51ea3d86 Author: Muhammad Usama Anjum Date: Tue Jan 16 14:04:54 2024 +0500 selftests/mm: switch to bash from sh Running charge_reserved_hugetlb.sh generates errors if sh is set to dash: ./charge_reserved_hugetlb.sh: 9: [[: not found ./charge_reserved_hugetlb.sh: 19: [[: not found ./charge_reserved_hugetlb.sh: 27: [[: not found ./charge_reserved_hugetlb.sh: 37: [[: not found ./charge_reserved_hugetlb.sh: 45: Syntax error: "(" unexpected Switch to using /bin/bash instead of /bin/sh. Make the switch for write_hugetlb_memory.sh as well which is called from charge_reserved_hugetlb.sh. Link: https://lkml.kernel.org/r/20240116090455.3407378-1-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Cc: Muhammad Usama Anjum Cc: Shuah Khan Cc: David Laight Cc: Signed-off-by: Andrew Morton commit 0d7e68c0271853c30655b05934d66cec81dc6afc Author: Petr Vorel Date: Wed Jan 17 13:22:57 2024 +0100 MAINTAINERS: add man-pages git trees The maintainer uses both. Link: https://lkml.kernel.org/r/20240117122257.2707637-1-pvorel@suse.cz Signed-off-by: Petr Vorel Reviewed-by: Alejandro Colomar Signed-off-by: Andrew Morton commit 63fd327016fdfca6f2fa27eba3496bd079eb8ed3 Author: Johannes Weiner Date: Thu Jan 11 08:29:02 2024 -0500 mm: memcontrol: don't throttle dying tasks on memory.high While investigating hosts with high cgroup memory pressures, Tejun found culprit zombie tasks that had were holding on to a lot of memory, had SIGKILL pending, but were stuck in memory.high reclaim. In the past, we used to always force-charge allocations from tasks that were exiting in order to accelerate them dying and freeing up their rss. This changed for memory.max in a4ebf1b6ca1e ("memcg: prohibit unconditional exceeding the limit of dying tasks"); it noted that this can cause (userspace inducable) containment failures, so it added a mandatory reclaim and OOM kill cycle before forcing charges. At the time, memory.high enforcement was handled in the userspace return path, which isn't reached by dying tasks, and so memory.high was still never enforced by dying tasks. When c9afe31ec443 ("memcg: synchronously enforce memory.high for large overcharges") added synchronous reclaim for memory.high, it added unconditional memory.high enforcement for dying tasks as well. The callstack shows that this path is where the zombie is stuck in. We need to accelerate dying tasks getting past memory.high, but we cannot do it quite the same way as we do for memory.max: memory.max is enforced strictly, and tasks aren't allowed to move past it without FIRST reclaiming and OOM killing if necessary. This ensures very small levels of excess. With memory.high, though, enforcement happens lazily after the charge, and OOM killing is never triggered. A lot of concurrent threads could have pushed, or could actively be pushing, the cgroup into excess. The dying task will enter reclaim on every allocation attempt, with little hope of restoring balance. To fix this, skip synchronous memory.high enforcement on dying tasks altogether again. Update memory.high path documentation while at it. [hannes@cmpxchg.org: also handle tasks are being killed during the reclaim] Link: https://lkml.kernel.org/r/20240111192807.GA424308@cmpxchg.org Link: https://lkml.kernel.org/r/20240111132902.389862-1-hannes@cmpxchg.org Fixes: c9afe31ec443 ("memcg: synchronously enforce memory.high for large overcharges") Signed-off-by: Johannes Weiner Reported-by: Tejun Heo Reviewed-by: Yosry Ahmed Acked-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Dan Schatzberg Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton commit c4608d1bf7c6536d1a3d233eb21e50678681564e Author: Yang Shi Date: Wed Dec 20 22:59:43 2023 -0800 mm: mmap: map MAP_STACK to VM_NOHUGEPAGE commit efa7df3e3bb5 ("mm: align larger anonymous mappings on THP boundaries") incured regression for stress-ng pthread benchmark [1]. It is because THP get allocated to pthread's stack area much more possible than before. Pthread's stack area is allocated by mmap without VM_GROWSDOWN or VM_GROWSUP flag, so kernel can't tell whether it is a stack area or not. The MAP_STACK flag is used to mark the stack area, but it is a no-op on Linux. Mapping MAP_STACK to VM_NOHUGEPAGE to prevent from allocating THP for such stack area. With this change the stack area looks like: fffd18e10000-fffd19610000 rw-p 00000000 00:00 0 Size: 8192 kB KernelPageSize: 4 kB MMUPageSize: 4 kB Rss: 12 kB Pss: 12 kB Pss_Dirty: 12 kB Shared_Clean: 0 kB Shared_Dirty: 0 kB Private_Clean: 0 kB Private_Dirty: 12 kB Referenced: 12 kB Anonymous: 12 kB KSM: 0 kB LazyFree: 0 kB AnonHugePages: 0 kB ShmemPmdMapped: 0 kB FilePmdMapped: 0 kB Shared_Hugetlb: 0 kB Private_Hugetlb: 0 kB Swap: 0 kB SwapPss: 0 kB Locked: 0 kB THPeligible: 0 VmFlags: rd wr mr mw me ac nh The "nh" flag is set. [1] https://lore.kernel.org/linux-mm/202312192310.56367035-oliver.sang@intel.com/ Link: https://lkml.kernel.org/r/20231221065943.2803551-2-shy828301@gmail.com Fixes: efa7df3e3bb5 ("mm: align larger anonymous mappings on THP boundaries") Signed-off-by: Yang Shi Reported-by: kernel test robot Tested-by: Oliver Sang Reviewed-by: Yin Fengwei Cc: Rik van Riel Cc: Matthew Wilcox Cc: Christopher Lameter Cc: Huang, Ying Cc: Signed-off-by: Andrew Morton commit 4dca82d14174fe53f656a6bc32398db1bdd8f481 Author: David Hildenbrand Date: Mon Jan 15 11:07:31 2024 +0100 uprobes: use pagesize-aligned virtual address when replacing pages uprobes passes an unaligned page mapping address to folio_add_new_anon_rmap(), which ends up triggering a VM_BUG_ON() we recently extended in commit 372cbd4d5a066 ("mm: non-pmd-mappable, large folios for folio_add_new_anon_rmap()"). Arguably, this is uprobes code doing something wrong; however, for the time being it would have likely worked in rmap code because __folio_set_anon() would set folio->index to the same value. Looking at __replace_page(), we'd also pass slightly wrong values to mmu_notifier_range_init(), page_vma_mapped_walk(), flush_cache_page(), ptep_clear_flush() and set_pte_at_notify(). I suspect most of them are fine, but let's just mark the introducing commit as the one needed fixing. I don't think CC stable is warranted. We'll add more sanity checks in rmap code separately, to make sure that we always get properly aligned addresses. Link: https://lkml.kernel.org/r/20240115100731.91007-1-david@redhat.com Fixes: c517ee744b96 ("uprobes: __replace_page() should not use page_address_in_vma()") Signed-off-by: David Hildenbrand Reported-by: Jiri Olsa Closes: https://lkml.kernel.org/r/ZaMR2EWN-HvlCfUl@krava Tested-by: Jiri Olsa Reviewed-by: Ryan Roberts Acked-by: Oleg Nesterov Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Ian Rogers Cc: Adrian Hunter Signed-off-by: Andrew Morton commit f8ee4361b7be3f0c5bd21ee47561473ddf3aa17b Author: Muhammad Usama Anjum Date: Fri Jan 12 12:18:50 2024 +0500 selftests/mm: mremap_test: fix build warning Use 2 separate variables of types int and unsigned long long instead of confusing them. This corrects the correct print format for each of them and removes the build warning: warning: format `%d' expects argument of type `int', but argument 2 has type `long long unsigned int' Link: https://lkml.kernel.org/r/20240112071851.612930-1-usama.anjum@collabora.com Fixes: a4cb3b243343 ("selftests: mm: add a test for remapping to area immediately after existing mapping") Signed-off-by: Muhammad Usama Anjum Cc: Joel Fernandes (Google) Cc: Lorenzo Stoakes Cc: Shuah Khan Signed-off-by: Andrew Morton commit 19d3e221807772f8443e565234a6fdc5a2b09d26 Author: Sidhartha Kumar Date: Fri Jan 12 10:08:40 2024 -0800 fs/hugetlbfs/inode.c: mm/memory-failure.c: fix hugetlbfs hwpoison handling has_extra_refcount() makes the assumption that the page cache adds a ref count of 1 and subtracts this in the extra_pins case. Commit a08c7193e4f1 (mm/filemap: remove hugetlb special casing in filemap.c) modifies __filemap_add_folio() by calling folio_ref_add(folio, nr); for all cases (including hugtetlb) where nr is the number of pages in the folio. We should adjust the number of references coming from the page cache by subtracing the number of pages rather than 1. In hugetlbfs_read_iter(), folio_test_has_hwpoisoned() is testing the wrong flag as, in the hugetlb case, memory-failure code calls folio_test_set_hwpoison() to indicate poison. folio_test_hwpoison() is the correct function to test for that flag. After these fixes, the hugetlb hwpoison read selftest passes all cases. Link: https://lkml.kernel.org/r/20240112180840.367006-1-sidhartha.kumar@oracle.com Fixes: a08c7193e4f1 ("mm/filemap: remove hugetlb special casing in filemap.c") Signed-off-by: Sidhartha Kumar Closes: https://lore.kernel.org/linux-mm/20230713001833.3778937-1-jiaqiyan@google.com/T/#m8e1469119e5b831bbd05d495f96b842e4a1c5519 Reported-by: Muhammad Usama Anjum Tested-by: Muhammad Usama Anjum Acked-by: Miaohe Lin Acked-by: Muchun Song Cc: James Houghton Cc: Jiaqi Yan Cc: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Cc: [6.7+] Signed-off-by: Andrew Morton commit ab4443fe3ca6298663a55c4a70efc6c3ce913ca6 Author: Jan Kara Date: Thu Jan 4 09:58:39 2024 +0100 readahead: avoid multiple marked readahead pages ra_alloc_folio() marks a page that should trigger next round of async readahead. However it rounds up computed index to the order of page being allocated. This can however lead to multiple consecutive pages being marked with readahead flag. Consider situation with index == 1, mark == 1, order == 0. We insert order 0 page at index 1 and mark it. Then we bump order to 1, index to 2, mark (still == 1) is rounded up to 2 so page at index 2 is marked as well. Then we bump order to 2, index is incremented to 4, mark gets rounded to 4 so page at index 4 is marked as well. The fact that multiple pages get marked within a single readahead window confuses the readahead logic and results in readahead window being trimmed back to 1. This situation is triggered in particular when maximum readahead window size is not a power of two (in the observed case it was 768 KB) and as a result sequential read throughput suffers. Fix the problem by rounding 'mark' down instead of up. Because the index is naturally aligned to 'order', we are guaranteed 'rounded mark' == index iff 'mark' is within the page we are allocating at 'index' and thus exactly one page is marked with readahead flag as required by the readahead code and sequential read performance is restored. This effectively reverts part of commit b9ff43dd2743 ("mm/readahead: Fix readahead with large folios"). The commit changed the rounding with the rationale: "... we were setting the readahead flag on the folio which contains the last byte read from the block. This is wrong because we will trigger readahead at the end of the read without waiting to see if a subsequent read is going to use the pages we just read." Although this is true, the fact is this was always the case with read sizes not aligned to folio boundaries and large folios in the page cache just make the situation more obvious (and frequent). Also for sequential read workloads it is better to trigger the readahead earlier rather than later. It is true that the difference in the rounding and thus earlier triggering of the readahead can result in reading more for semi-random workloads. However workloads really suffering from this seem to be rare. In particular I have verified that the workload described in commit b9ff43dd2743 ("mm/readahead: Fix readahead with large folios") of reading random 100k blocks from a file like: [reader] bs=100k rw=randread numjobs=1 size=64g runtime=60s is not impacted by the rounding change and achieves ~70MB/s in both cases. [jack@suse.cz: fix one more place where mark rounding was done as well] Link: https://lkml.kernel.org/r/20240123153254.5206-1-jack@suse.cz Link: https://lkml.kernel.org/r/20240104085839.21029-1-jack@suse.cz Fixes: b9ff43dd2743 ("mm/readahead: Fix readahead with large folios") Signed-off-by: Jan Kara Cc: Matthew Wilcox Cc: Guo Xuenan Cc: Signed-off-by: Andrew Morton commit 66dbd9004a55073c5931f5f65f5fe2bbd414bdaa Author: Matthew Brost Date: Wed Jan 24 13:08:11 2024 -0800 drm/sched: Drain all entities in DRM sched run job worker All entities must be drained in the DRM scheduler run job worker to avoid the following case. An entity found that is ready, no job found ready on entity, and run job worker goes idle with other entities + jobs ready. Draining all ready entities (i.e. loop over all ready entities) in the run job worker ensures all job that are ready will be scheduled. Cc: Thorsten Leemhuis Reported-by: Mikhail Gavrilov Closes: https://lore.kernel.org/all/CABXGCsM2VLs489CH-vF-1539-s3in37=bwuOWtoeeE+q26zE+Q@mail.gmail.com/ Reported-and-tested-by: Mario Limonciello Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3124 Link: https://lore.kernel.org/all/20240123021155.2775-1-mario.limonciello@amd.com/ Reported-and-tested-by: Vlastimil Babka Closes: https://lore.kernel.org/dri-devel/05ddb2da-b182-4791-8ef7-82179fd159a8@amd.com/T/#m0c31d4d1b9ae9995bb880974c4f1dbaddc33a48a Signed-off-by: Matthew Brost Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20240124210811.1639040-1-matthew.brost@intel.com commit 77fe8f195737056e26b84a4d7fbe693587ab887e Merge: 83cd3be8648fe c82eb25c5f005 Author: Dave Airlie Date: Fri Jan 26 12:39:51 2024 +1000 Merge tag 'amd-drm-fixes-6.8-2024-01-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.8-2024-01-25: amdgpu: - AC/DC power supply tracking fix - Don't show invalid vram vendor data - SMU 13.0.x fixes - GART fix for umr on systems without VRAM - GFX 10/11 UNORD_DISPATCH fixes - IPS display fixes (required for S0ix on some platforms) - Misc fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240125221503.5019-1-alexander.deucher@amd.com commit 83cd3be8648fe3cbdf35cdea080b3535ef4449fc Merge: b16702be210bb 9e3a13f3eef6b Author: Dave Airlie Date: Fri Jan 26 06:09:13 2024 +1000 Merge tag 'drm-xe-fixes-2024-01-25' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - Make an ops struct static - Fix an implicit 0 to NULL conversion - A couple of 32-bit fixes - A migration coherency fix for Lunar Lake. - An error path vm id leak fix - Remove PVC references in kunit tests Signed-off-by: Dave Airlie From: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/ZbIb7l0EhpVp5cXE@fedora commit ff63cc2e95065bea978d2db01f7e7356cca3d021 Author: Daniel Golle Date: Wed Jan 24 05:18:23 2024 +0000 net: phy: mediatek-ge-soc: sync driver with MediaTek SDK Sync initialization and calibration routines with MediaTek's reference driver. Improves compliance and resolves link stability issues with CH340 IoT devices connected to MT798x built-in PHYs. Fixes: 98c485eaf509 ("net: phy: add driver for MediaTek SoC built-in GE PHYs") Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/f2195279c234c0f618946424b8236026126bc595.1706071311.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski commit cae1f1c36661f28c92a1db9113961a9ebd61dbaa Author: Daniel Golle Date: Wed Jan 24 16:22:09 2024 +0000 net: ethernet: mtk_eth_soc: set DMA coherent mask to get PPE working Set DMA coherent mask to 32-bit which makes PPE offloading engine start working on BPi-R4 which got 4 GiB of RAM. Fixes: 2d75891ebc09 ("net: ethernet: mtk_eth_soc: support 36-bit DMA addressing on MT7988") Suggested-by: Elad Yifee Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/97e90925368b405f0974b9b15f1b7377c4a329ad.1706113251.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski commit d833683d43854ad041ed64fdc175cbd1a19253eb Merge: 534326711000c 3a007b8009b5f Author: Jakub Kicinski Date: Thu Jan 25 17:17:30 2024 -0800 Merge branch 'nfp-flower-a-few-small-conntrack-offload-fixes' Louis Peens says: ==================== nfp: flower: a few small conntrack offload fixes This small series addresses two bugs in the nfp conntrack offloading code. The first patch is a check to prevent offloading for a case which is currently not supported by the nfp. The second patch fixes up parsing of layer4 mangling code so it can be correctly offloaded. Since the masks are an inverse mask and we are shifting it so it can be packed together with the destination we effectively need to 'clear' the lower bits of the mask by setting it to 0xFFFF. ==================== Link: https://lore.kernel.org/r/20240124151909.31603-1-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit 3a007b8009b5f8af021021b7a590a6da0dc4c6e0 Author: Hui Zhou Date: Wed Jan 24 17:19:09 2024 +0200 nfp: flower: fix hardware offload for the transfer layer port The nfp driver will merge the tp source port and tp destination port into one dword which the offset must be zero to do hardware offload. However, the mangle action for the tp source port and tp destination port is separated for tc ct action. Modify the mangle action for the FLOW_ACT_MANGLE_HDR_TYPE_TCP and FLOW_ACT_MANGLE_HDR_TYPE_UDP to satisfy the nfp driver offload check for the tp port. The mangle action provides a 4B value for source, and a 4B value for the destination, but only 2B of each contains the useful information. For offload the 2B of each is combined into a single 4B word. Since the incoming mask for the source is '0xFFFF' the shift-left will throw away the 0xFFFF part. When this gets combined together in the offload it will clear the destination field. Fix this by setting the lower bits back to 0xFFFF, effectively doing a rotate-left operation on the mask. Fixes: 5cee92c6f57a ("nfp: flower: support hw offload for ct nat action") CC: stable@vger.kernel.org # 6.1+ Signed-off-by: Hui Zhou Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20240124151909.31603-3-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit cefa98e806fd4e2a5e2047457a11ae5f17b8f621 Author: Hui Zhou Date: Wed Jan 24 17:19:08 2024 +0200 nfp: flower: add hardware offload check for post ct entry The nfp offload flow pay will not allocate a mask id when the out port is openvswitch internal port. This is because these flows are used to configure the pre_tun table and are never actually send to the firmware as an add-flow message. When a tc rule which action contains ct and the post ct entry's out port is openvswitch internal port, the merge offload flow pay with the wrong mask id of 0 will be send to the firmware. Actually, the nfp can not support hardware offload for this situation, so return EOPNOTSUPP. Fixes: bd0fe7f96a3c ("nfp: flower-ct: add zone table entry when handling pre/post_ct flows") CC: stable@vger.kernel.org # 5.14+ Signed-off-by: Hui Zhou Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20240124151909.31603-2-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit 534326711000c318fe1523c77308450522baa499 Author: Praveen Kaligineedi Date: Wed Jan 24 08:10:25 2024 -0800 gve: Fix skb truesize underestimation For a skb frag with a newly allocated copy page, the true size is incorrectly set to packet buffer size. It should be set to PAGE_SIZE instead. Fixes: 82fd151d38d9 ("gve: Reduce alloc and copy costs in the GQ rx path") Signed-off-by: Praveen Kaligineedi Link: https://lore.kernel.org/r/20240124161025.1819836-1-pkaligineedi@google.com Signed-off-by: Jakub Kicinski commit fc836129f708407502632107e58d48f54b1caf75 Author: Hangbin Liu Date: Wed Jan 24 14:13:44 2024 +0800 selftests/net/lib: update busywait timeout value The busywait timeout value is a millisecond, not a second. So the current setting 2 is too small. On slow/busy host (or VMs) the current timeout can expire even on "correct" execution, causing random failures. Let's copy the WAIT_TIMEOUT from forwarding/lib.sh and set BUSYWAIT_TIMEOUT here. Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Signed-off-by: Hangbin Liu Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240124061344.1864484-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit d2fda304bb739b97c1a3e46e39700eb49f07a62c Author: Kent Overstreet Date: Wed Jan 24 17:26:33 2024 -0500 bcachefs: __lookup_dirent() works in snapshot, not subvol Add a new helper, bch2_hash_lookup_in_snapshot(), for when we're not operating in a subvolume and already have a snapshot ID, and then use it in lookup_lostfound() -> __lookup_dirent(). This is a bugfix - lookup_lostfound() doesn't take a subvolume ID, we were passing a nonsense subvolume ID before, and don't have one to pass since we may be operating in an interior snapshot node that doesn't have a subvolume ID. Signed-off-by: Kent Overstreet commit 5af2c3f44e004b5618ebef34ac30bd3511babb27 Merge: e169bd4fb2b36 9f3fe29d77ef4 Author: Jens Axboe Date: Thu Jan 25 17:03:54 2024 -0700 Merge tag 'md-6.8-20240126' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.8 Pull MD fix from Song: "This change fixes a RCU warning." * tag 'md-6.8-20240126' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: fix a suspicious RCU usage warning commit 39b383d77961a544d896242051168b8129cf5be7 Author: Jakub Kicinski Date: Wed Jan 24 15:36:30 2024 -0800 selftests: tcp_ao: set the timeout to 2 minutes The default timeout for tests is 45sec, bench-lookups_ipv6 seems to take around 50sec when running in a VM without HW acceleration. Give it a 2x margin and set the timeout to 120sec. Fixes: d1066c9c58d4 ("selftests/net: Add test/benchmark for removing MKTs") Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Link: https://lore.kernel.org/r/20240124233630.1977708-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ce36ea754051cfae39eabd841f907de0e8d8a6b7 Merge: b64787840080b 4acffb66630a0 Author: Jakub Kicinski Date: Thu Jan 25 15:59:24 2024 -0800 Merge branch 'selftests-net-a-few-fixes' Paolo Abeni says: ==================== selftests: net: a few fixes This series address self-tests failures for udp gro-related tests. The first patch addresses the main problem I observe locally - the XDP program required by such tests, xdp_dummy, is currently build in the ebpf self-tests directory, not available if/when the user targets net only. Arguably is more a refactor than a fix, but still targeting net to hopefully The second patch fixes the integration of such tests with the build system. Patch 3/3 fixes sporadic failures due to races. Tested with: make -C tools/testing/selftests/ TARGETS=net install ./tools/testing/selftests/kselftest_install/run_kselftest.sh \ -t "net:udpgro_bench.sh net:udpgro.sh net:udpgro_fwd.sh \ net:udpgro_frglist.sh net:veth.sh" no failures. ==================== Link: https://lore.kernel.org/r/cover.1706131762.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 4acffb66630a0e4800880baa61a54ef18047ccd3 Author: Paolo Abeni Date: Wed Jan 24 22:33:22 2024 +0100 selftests: net: explicitly wait for listener ready The UDP GRO forwarding test still hard-code an arbitrary pause to wait for the UDP listener becoming ready in background. That causes sporadic failures depending on the host load. Replace the sleep with the existing helper waiting for the desired port being exposed. Fixes: a062260a9d5f ("selftests: net: add UDP GRO forwarding self-tests") Signed-off-by: Paolo Abeni Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/4d58900fb09cef42749cfcf2ad7f4b91a97d225c.1706131762.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit f5173fe3e13b2cbd25d0d73f40acd923d75add55 Author: Paolo Abeni Date: Wed Jan 24 22:33:21 2024 +0100 selftests: net: included needed helper in the install targets The blamed commit below introduce a dependency in some net self-tests towards a newly introduce helper script. Such script is currently not included into the TEST_PROGS_EXTENDED list and thus is not installed, causing failure for the relevant tests when executed from the install dir. Fix the issue updating the install targets. Fixes: 3bdd9fd29cb0 ("selftests/net: synchronize udpgro tests' tx and rx connection") Signed-off-by: Paolo Abeni Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/076e8758e21ff2061cc9f81640e7858df775f0a9.1706131762.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit 98cb12eb52a780e682bea8372fdb2912c08132dd Author: Paolo Abeni Date: Wed Jan 24 22:33:20 2024 +0100 selftests: net: remove dependency on ebpf tests Several net tests requires an XDP program build under the ebpf directory, and error out if such program is not available. That makes running successful net test hard, let's duplicate into the net dir the [very small] program, re-using the existing rules to build it, and finally dropping the bogus dependency. Signed-off-by: Paolo Abeni Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/28e7af7c031557f691dc8045ee41dd549dd5e74c.1706131762.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski commit b64787840080bdbd048bb9c68222ad17236cbd7e Author: Jakub Kicinski Date: Wed Jan 24 11:25:50 2024 -0800 selftests: tcp_ao: add a config file Still a bit unclear whether each directory should have its own config file, but assuming they should lets add one for tcp_ao. The following tests still fail with this config in place: - rst_ipv4, - rst_ipv6, - bench-lookups_ipv6. other 21 pass. Fixes: d11301f65977 ("selftests/net: Add TCP-AO ICMPs accept test") Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Link: https://lore.kernel.org/r/20240124192550.1865743-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 8d35217149daa33358c284aca6a56d5ab92cfc6c Author: Dmitry Baryshkov Date: Fri Dec 15 03:32:22 2023 +0200 drm/msm/mdss: specify cfg bandwidth for SDM670 Lower the requested CFG bus bandwidth for the SDM670 platform. The default value is 153600 kBps, which is twice as big as required by the platform according to the vendor kernel. Fixes: a55c8ff252d3 ("drm/msm/mdss: Handle the reg bus ICC path") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Richard Acayan Patchwork: https://patchwork.freedesktop.org/patch/572182/ Link: https://lore.kernel.org/r/20231215013222.827975-1-dmitry.baryshkov@linaro.org Signed-off-by: Abhinav Kumar commit 8c2ae772fe08e33f3d7a83849e85539320701abd Author: David Lechner Date: Thu Jan 25 14:53:09 2024 -0600 spi: fix finalize message on error return In __spi_pump_transfer_message(), the message was not finalized in the first error return as it is in the other error return paths. Not finalizing the message could cause anything waiting on the message to complete to hang forever. This adds the missing call to spi_finalize_current_message(). Fixes: ae7d2346dc89 ("spi: Don't use the message queue if possible in spi_sync") Signed-off-by: David Lechner Link: https://msgid.link/r/20240125205312.3458541-2-dlechner@baylibre.com Signed-off-by: Mark Brown commit c82eb25c5f005b33aebb1415a8472fc2eeea0deb Author: Roman Li Date: Tue Jan 23 15:18:24 2024 -0500 drm/amd/display: "Enable IPS by default" [Why] IPS was temporary disabled due to instability. It was fixed in dmub firmware and with: - "drm/amd/display: Add IPS checks before dcn register access" - "drm/amd/display: Disable ips before dc interrupt setting" [How] Enable IPS by default. Disable IPS if 0x800 bit set in amdgpu.dcdebugmask module params Signed-off-by: Roman Li Tested-by: Mark Broadworth Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit d45669eb5e68c052d0d890cd88c33a65c115d9f3 Author: Roman Li Date: Tue Jan 23 15:14:28 2024 -0500 drm/amd: Add a DC debug mask for IPS For debugging IPS-related issues, expose a new debug mask that allows to disable IPS. Usage: amdgpu.dcdebugmask=0x800 Signed-off-by: Roman Li Tested-by: Mark Broadworth Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 8894b9283afd35b8d22ae07a0c118eb5f7d2e78b Author: Roman Li Date: Mon Jan 22 17:45:41 2024 -0500 drm/amd/display: Disable ips before dc interrupt setting [Why] While in IPS2 an access to dcn registers is not allowed. If interrupt results in dc call, we should disable IPS. [How] Safeguard register access in IPS2 by disabling idle optimization before calling dc interrupt setting api. Signed-off-by: Roman Li Tested-by: Mark Broadworth Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit f37f7979202d45489d84469838f5352cda3557bc Author: ChunTao Tso Date: Mon Jan 8 13:46:59 2024 +0800 drm/amd/display: Replay + IPS + ABM in Full Screen VPB [Why] Because ABM will wait VStart to start getting histogram data, it will cause we can't enter IPS while full screnn video playing. [How] Modify the panel refresh rate to the maximun multiple of current refresh rate. Reviewed-by: Dennis Chan Acked-by: Roman Li Signed-off-by: ChunTao Tso Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 196107eb1e1557df25e1425bbfb53e0f7588b80a Author: Roman Li Date: Tue Jan 9 17:31:33 2024 -0500 drm/amd/display: Add IPS checks before dcn register access [Why] With IPS enabled a system hangs once PSR is active. PSR active triggers transition to IPS2 state. While in IPS2 an access to dcn registers results in hard hang. Existing check doesn't cover for PSR sequence. [How] Safeguard register access by disabling idle optimization in atomic commit and crtc scanout. It will be re-enabled on next vblank. Reviewed-by: Nicholas Kazlauskas Acked-by: Roman Li Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 955406e6fd241b2936e7f033a03b2956922c8f32 Author: Alvin Lee Date: Tue Jan 2 12:02:39 2024 -0500 drm/amd/display: Add Replay IPS register for DMUB command table - Introduce a new Replay mode for DMUB version 0.0.199.0 Reviewed-by: Martin Leung Acked-by: Alex Hung Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ff8caade7429f28217c293672ab64323031f350e Author: Nicholas Kazlauskas Date: Thu Dec 7 14:12:03 2023 -0500 drm/amd/display: Allow IPS2 during Replay [Why & How] Add regkey to block video playback in IPS2 by default Allow idle optimizations in the same spot we allow Replay for video playback usecases. Avoid sending it when there's an external display connected by modifying the allow idle checks to check for active non-eDP screens. Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3380fcad2c906872110d31ddf7aa1fdea57f9df6 Author: Alex Deucher Date: Fri Jan 19 12:32:59 2024 -0500 drm/amdgpu/gfx11: set UNORD_DISPATCH in compute MQDs This needs to be set to 1 to avoid a potential deadlock in the GC 10.x and newer. On GC 9.x and older, this needs to be set to 0. This can lead to hangs in some mixed graphics and compute workloads. Updated firmware is also required for AQL. Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 03ff6d7238b77e5fb2b85dc5fe01d2db9eb893bd Author: Alex Deucher Date: Fri Jan 19 12:23:55 2024 -0500 drm/amdgpu/gfx10: set UNORD_DISPATCH in compute MQDs This needs to be set to 1 to avoid a potential deadlock in the GC 10.x and newer. On GC 9.x and older, this needs to be set to 0. This can lead to hangs in some mixed graphics and compute workloads. Updated firmware is also required for AQL. Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit e7a8594cc2af920a905db15653c19c362d4ebd3f Author: Tom St Denis Date: Wed Jan 17 12:47:37 2024 -0500 drm/amd/amdgpu: Assign GART pages to AMD device mapping This allows kernel mapped pages like the PDB and PTB to be read via the iomem debugfs when there is no vram in the system. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.7.x commit f1807682de0edbff6c1e46b19642a517d2e15c57 Author: Lijo Lazar Date: Thu Jan 18 14:25:35 2024 +0530 drm/amd/pm: Fetch current power limit from FW Power limit of SMUv13.0.6 SOCs can be updated by out-of-band ways. Fetch the limit from firmware instead of using cached values. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.7.x commit bc8f6d42b1334f486980d57c8d12f3128d30c2e3 Author: Hawking Zhang Date: Mon Jan 22 17:38:23 2024 +0800 drm/amdgpu: Fix null pointer dereference amdgpu_reg_state_sysfs_fini could be invoked at the time when asic_func is even not initialized, i.e., amdgpu_discovery_init fails for some reason. Signed-off-by: Hawking Zhang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 89a7c0bd74918f723c94c10452265e25063cba9b Author: Lijo Lazar Date: Sat Jan 20 13:48:09 2024 +0530 drm/amdgpu: Show vram vendor only if available Ony if vram vendor info is available, show in sysfs. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.7.x commit 30269954745c6cac730352829ac9850918457440 Author: Kenneth Feng Date: Fri Jan 19 16:12:00 2024 +0800 drm/amd/pm: update the power cap setting update the power cap setting for smu_v13.0.0/smu_v13.0.7 Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2356 Signed-off-by: Kenneth Feng Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 90751bdeee4e3ac87ebf814bf282b0fa97edfeab Author: Lijo Lazar Date: Sat Jan 20 13:32:51 2024 +0530 drm/amdgpu: Avoid fetching vram vendor information For GFX 9.4.3 APUs, the current method of fetching vram vendor information is not reliable. Avoid fetching the information. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.7.x commit ca1ffb174f16b699c536734fc12a4162097c49f4 Author: Ma Jun Date: Wed Jan 17 14:35:29 2024 +0800 drm/amdgpu/pm: Fix the power source flag error The power source flag should be updated when [1] System receives an interrupt indicating that the power source has changed. [2] System resumes from suspend or runtime suspend Signed-off-by: Ma Jun Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit a58371d632ebab9ea63f10893a6b6731196b6f8d Author: Srinivasan Shanmugam Date: Wed Jan 17 08:41:52 2024 +0530 drm/amd/display: Fix uninitialized variable usage in core_link_ 'read_dpcd() & write_dpcd()' functions The 'status' variable in 'core_link_read_dpcd()' & 'core_link_write_dpcd()' was uninitialized. Thus, initializing 'status' variable to 'DC_ERROR_UNEXPECTED' by default. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dpcd.c:226 core_link_read_dpcd() error: uninitialized symbol 'status'. drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dpcd.c:248 core_link_write_dpcd() error: uninitialized symbol 'status'. Cc: stable@vger.kernel.org Cc: Jerry Zuo Cc: Jun Lei Cc: Wayne Lin Cc: Aurabindo Pillai Cc: Rodrigo Siqueira Cc: Hamza Mahfooz Signed-off-by: Srinivasan Shanmugam Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit fdaca31a7668cb17f70df5c32b6a9b90e82fc9b5 Author: Yang Wang Date: Fri Jan 19 11:32:41 2024 +0800 drm/amd/pm: udpate smu v13.0.6 message permission update smu v13.0.6 message to allow guest driver set gfx clock. Signed-off-by: Yang Wang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit fc4657971be31ae679e2bbeee2fb8e93a7a063eb Author: Sebastian Reichel Date: Wed Jan 17 20:14:48 2024 +0100 arm64: dts: rockchip: mark system power controller on rk3588-evb1 Mark the primary PMIC as system-power-controller, so that the system properly shuts down on poweroff. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20240117191555.86138-1-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit ecb1b8288dc7ccbdcb3b9df005fa1c0e0c0388a7 Merge: bdc010200eb5e 0a5bd0ffe7905 Author: Linus Torvalds Date: Thu Jan 25 10:58:35 2024 -0800 Merge tag 'net-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Paolo Abeni: "Including fixes from bpf, netfilter and WiFi. Jakub is doing a lot of work to include the self-tests in our CI, as a result a significant amount of self-tests related fixes is flowing in (and will likely continue in the next few weeks). Current release - regressions: - bpf: fix a kernel crash for the riscv 64 JIT - bnxt_en: fix memory leak in bnxt_hwrm_get_rings() - revert "net: macsec: use skb_ensure_writable_head_tail to expand the skb" Previous releases - regressions: - core: fix removing a namespace with conflicting altnames - tc/flower: fix chain template offload memory leak - tcp: - make sure init the accept_queue's spinlocks once - fix autocork on CPUs with weak memory model - udp: fix busy polling - mlx5e: - fix out-of-bound read in port timestamping - fix peer flow lists corruption - iwlwifi: fix a memory corruption Previous releases - always broken: - netfilter: - nft_chain_filter: handle NETDEV_UNREGISTER for inet/ingress basechain - nft_limit: reject configurations that cause integer overflow - bpf: fix bpf_xdp_adjust_tail() with XSK zero-copy mbuf, avoiding a NULL pointer dereference upon shrinking - llc: make llc_ui_sendmsg() more robust against bonding changes - smc: fix illegal rmb_desc access in SMC-D connection dump - dpll: fix pin dump crash for rebound module - bnxt_en: fix possible crash after creating sw mqprio TCs - hv_netvsc: calculate correct ring size when PAGE_SIZE is not 4kB Misc: - several self-tests fixes for better integration with the netdev CI - added several missing modules descriptions" * tag 'net-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (88 commits) tsnep: Fix XDP_RING_NEED_WAKEUP for empty fill ring tsnep: Remove FCS for XDP data path net: fec: fix the unhandled context fault from smmu selftests: bonding: do not test arp/ns target with mode balance-alb/tlb fjes: fix memleaks in fjes_hw_setup i40e: update xdp_rxq_info::frag_size for ZC enabled Rx queue i40e: set xdp_rxq_info::frag_size xdp: reflect tail increase for MEM_TYPE_XSK_BUFF_POOL ice: update xdp_rxq_info::frag_size for ZC enabled Rx queue intel: xsk: initialize skb_frag_t::bv_offset in ZC drivers ice: remove redundant xdp_rxq_info registration i40e: handle multi-buffer packets that are shrunk by xdp prog ice: work on pre-XDP prog frag count xsk: fix usage of multi-buffer BPF helpers for ZC XDP xsk: make xsk_buff_pool responsible for clearing xdp_buff::flags xsk: recycle buffer in case Rx queue was full net: fill in MODULE_DESCRIPTION()s for rvu_mbox net: fill in MODULE_DESCRIPTION()s for litex net: fill in MODULE_DESCRIPTION()s for fsl_pq_mdio net: fill in MODULE_DESCRIPTION()s for fec ... commit bdc010200eb5e2cddf1c76c83386bdde8aad0899 Merge: a658e0e98688f 420332b94119c Author: Linus Torvalds Date: Thu Jan 25 10:52:30 2024 -0800 Merge tag 'ovl-fixes-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs Pull overlayfs fix from Amir Goldstein: "Change the on-disk format for the new "xwhiteouts" feature introduced in v6.7 The change reduces unneeded overhead of an extra getxattr per readdir. The only user of the "xwhiteout" feature is the external composefs tool, which has been updated to support the new on-disk format. This change is also designated for 6.7.y" * tag 'ovl-fixes-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs: ovl: mark xwhiteouts directory with overlay.opaque='x' commit a658e0e98688f4a41873fcf9b036a887a5be0de1 Merge: b9fa4cbd8415c f13d8f28fe9fb Author: Linus Torvalds Date: Thu Jan 25 10:41:29 2024 -0800 Merge tag 'vfs-6.8-rc2.netfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull netfs fixes from Christian Brauner: "This contains various fixes for the netfs work merged earlier this cycle: afs: - Fix locking imbalance in afs_proc_addr_prefs_show() - Remove afs_dynroot_d_revalidate() which is redundant - Fix error handling during lookup - Hide sillyrenames from userspace. This fixes a race between silly-rename files being created/removed and userspace iterating over directory entries - Don't use unnecessary folio_*() functions cifs: - Don't use unnecessary folio_*() functions cachefiles: - erofs: Fix Null dereference when cachefiles are not doing ondemand-mode - Update mailing list netfs library: - Add Jeff Layton as reviewer - Update mailing list - Fix a error checking in netfs_perform_write() - fscache: Check error before dereferencing - Don't use unnecessary folio_*() functions" * tag 'vfs-6.8-rc2.netfs' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: afs: Fix missing/incorrect unlocking of RCU read lock afs: Remove afs_dynroot_d_revalidate() as it is redundant afs: Fix error handling with lookup via FS.InlineBulkStatus afs: Hide silly-rename files from userspace cachefiles, erofs: Fix NULL deref in when cachefiles is not doing ondemand-mode netfs: Fix a NULL vs IS_ERR() check in netfs_perform_write() netfs, fscache: Prevent Oops in fscache_put_cache() cifs: Don't use certain unnecessary folio_*() functions afs: Don't use certain unnecessary folio_*() functions netfs: Don't use certain unnecessary folio_*() functions netfs: Add Jeff Layton as reviewer netfs, cachefiles: Change mailing list commit b9fa4cbd8415c57d514a45c5eb6272d40961d6c7 Merge: 3cb9871f8160a edcf9725150e4 Author: Linus Torvalds Date: Thu Jan 25 10:26:52 2024 -0800 Merge tag 'nfsd-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd fixes from Chuck Lever: - Fix in-kernel RPC UDP transport - Fix NFSv4.0 RELEASE_LOCKOWNER * tag 'nfsd-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: fix RELEASE_LOCKOWNER SUNRPC: use request size to initialize bio_vec in svc_udp_sendto() commit 3cb9871f8160a4789189701eda5af582f3414e55 Merge: 6098d87eaf31f e787644caf762 Author: Linus Torvalds Date: Thu Jan 25 10:21:21 2024 -0800 Merge tag 'urgent-rcu.2024.01.24a' of https://github.com/neeraju/linux Pull RCU fix from Neeraj Upadhyay: "This fixes RCU grace period stalls, which are observed when an outgoing CPU's quiescent state reporting results in wakeup of one of the grace period kthreads, to complete the grace period. If those kthreads have SCHED_FIFO policy, the wake up can indirectly arm the RT bandwith timer to the local offline CPU. Earlier migration of the hrtimers from the CPU introduced in commit 5c0930ccaad5 ("hrtimers: Push pending hrtimers away from outgoing CPU earlier") results in this timer getting ignored. If the RCU grace period kthreads are waiting for RT bandwidth to be available, they may never be actually scheduled, resulting in RCU stall warnings" * tag 'urgent-rcu.2024.01.24a' of https://github.com/neeraju/linux: rcu: Defer RCU kthreads wakeup when CPU is dying commit 0d1d824a4ac102db35bc8524a8be97ada8ad37ab Merge: 8ad2c84e2ecb4 eab4f56d3e75d Author: Arnd Bergmann Date: Thu Jan 25 18:23:10 2024 +0100 Merge tag 'samsung-fixes-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/fixes Samsung fixes for v6.8 1. Google GS101: Correct the input clock names to CMU MISC clock controller to match received review. The review was initially missed and CMU MISC clock controller bindings, driver and DTS was merged into v6.8-rc1 with different names. Nothing was released so far, so the bindings and driver can be still corrected to match review. 2. Samsung Galaxy Tab3: Fix display by using correct vclk polarity in display node. * tag 'samsung-fixes-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos4212-tab3: add samsung,invert-vclk flag to fimd arm64: dts: exynos: gs101: comply with the new cmu_misc clock names Link: https://lore.kernel.org/r/20240125082400.163935-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 8ad2c84e2ecb476c96eb5508848e6f160962d3f5 Merge: d77b016bc9178 0c565d16b8007 Author: Arnd Bergmann Date: Thu Jan 25 18:21:50 2024 +0100 Merge tag 'ffa-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm FF-A fixes for v6.8 Quite a few fixes addressing issues around missing RW lock initialisation in ffa_setup_partitions(), missing check for xa_load() return value, use of xa_insert instead of xa_store to flag case of duplicate insertion. It also simplifies ffa_partitions_cleanup() with xa_for_each() and xa_erase() instead of xa_extract() and kfree(). Finally it includes fixes around handling of partitions setup failures during initialisation. * tag 'ffa-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_ffa: Handle partitions setup failures firmware: arm_ffa: Use xa_insert() and check for result firmware: arm_ffa: Simplify ffa_partitions_cleanup() firmware: arm_ffa: Check xa_load() return value firmware: arm_ffa: Add missing rwlock_init() for the driver partition firmware: arm_ffa: Add missing rwlock_init() in ffa_setup_partitions() Link: https://lore.kernel.org/r/20240122161652.3551159-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit d77b016bc9178b4ebcf0160100202e1293ac3139 Merge: 5e2400f11d4de 6bd1b3fede83d Author: Arnd Bergmann Date: Thu Jan 25 18:21:29 2024 +0100 Merge tag 'scmi-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes Arm SCMI fixes for v6.8 Few fixes addressing the below issues: 1. A spurious IRQ related to the late reply can get wrongly associated with the new enqueued request resulting in misinterpretation of data in shared memory. This race-condition can be detected by looking at the channel status bits which the platform must set to the channel free before triggering the completion IRQ. Adding a consistency check to validate such condition will fix the issue. 2. Incorrect use of asm-generic/bug.h instead of generic linux/bUg.h 3. xa_store() can't check for possible duplication insertion, use xa_insert() instead 4. Fix the SCMI clock protocol version in the v3.2 SCMI specification 5. Incorrect upgrade of highest supported clock protocol version from v2.0 to v3.0 * tag 'scmi-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Fix the clock protocol supported version firmware: arm_scmi: Fix the clock protocol version for v3.2 firmware: arm_scmi: Use xa_insert() when saving raw queues firmware: arm_scmi: Use xa_insert() to store opps firmware: arm_scmi: Replace asm-generic/bug.h with linux/bug.h firmware: arm_scmi: Check mailbox/SMT channel for consistency Link: https://lore.kernel.org/r/20240122161640.3551085-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 5e2400f11d4deec444ac00b73e96267e057fbb37 Author: Lukas Wunner Date: Sat Jan 13 19:06:56 2024 +0100 arm64: dts: Fix TPM schema violations Since commit 26c9d152ebf3 ("dt-bindings: tpm: Consolidate TCG TIS bindings"), several issues are reported by "make dtbs_check" for arm64 devicetrees: The compatible property needs to contain the chip's name in addition to the generic "tcg,tpm_tis-spi" and the nodename needs to be "tpm@0" rather than "cr50@0": tpm@1: compatible: ['tcg,tpm_tis-spi'] is too short from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm_tis-spi.yaml# cr50@0: $nodename:0: 'cr50@0' does not match '^tpm(@[0-9a-f]+)?$' from schema $id: http://devicetree.org/schemas/tpm/google,cr50.yaml# Fix these schema violations. phyGATE-Tauri uses an Infineon SLB9670: https://lore.kernel.org/all/ab45c82485fa272f74adf560cbb58ee60cc42689.camel@phytec.de/ Gateworks Venice uses an Atmel ATTPM20P: https://trac.gateworks.com/wiki/tpm Signed-off-by: Lukas Wunner Acked-by: Heiko Stuebner Reviewed-by: AngeloGioacchino Del Regno commit 8412c47d68436b9f9a260039a4a773daa6824925 Author: Lukas Wunner Date: Sat Jan 13 10:03:51 2024 +0100 ARM: dts: Fix TPM schema violations Since commit 26c9d152ebf3 ("dt-bindings: tpm: Consolidate TCG TIS bindings"), several issues are reported by "make dtbs_check" for ARM devicetrees: The nodename needs to be "tpm@0" rather than "tpmdev@0" and the compatible property needs to contain the chip's name in addition to the generic "tcg,tpm_tis-spi" or "tcg,tpm-tis-i2c": tpmdev@0: $nodename:0: 'tpmdev@0' does not match '^tpm(@[0-9a-f]+)?$' from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm_tis-spi.yaml# tpm@2e: compatible: 'oneOf' conditional failed, one must be fixed: ['tcg,tpm-tis-i2c'] is too short from schema $id: http://devicetree.org/schemas/tpm/tcg,tpm-tis-i2c.yaml# Fix these schema violations. Aspeed Facebook BMCs use an Infineon SLB9670: https://lore.kernel.org/all/ZZSmMJ%2F%2Fl972Qbxu@fedora/ https://lore.kernel.org/all/ZZT4%2Fw2eVzMhtsPx@fedora/ https://lore.kernel.org/all/ZZTS0p1hdAchIbKp@heinlein.vulture-banana.ts.net/ Aspeed Tacoma uses a Nuvoton NPCT75X per commit 39d8a73c53a2 ("ARM: dts: aspeed: tacoma: Add TPM"). phyGATE-Tauri uses an Infineon SLB9670: https://lore.kernel.org/all/ab45c82485fa272f74adf560cbb58ee60cc42689.camel@phytec.de/ A single schema violation remains in am335x-moxa-uc-2100-common.dtsi because it is unknown which chip is used on the board. The devicetree's author has been asked for clarification but has not responded so far: https://lore.kernel.org/all/20231220090910.GA32182@wunner.de/ Signed-off-by: Lukas Wunner Reviewed-by: Patrick Williams Reviewed-by: Tao Ren Reviewed-by: Bruno Thomsen commit 20730e9b277873deeb6637339edcba64468f3da3 Author: Lennert Buytenhek Date: Thu Jan 25 17:04:01 2024 +0200 ahci: add 43-bit DMA address quirk for ASMedia ASM1061 controllers With one of the on-board ASM1061 AHCI controllers (1b21:0612) on an ASUSTeK Pro WS WRX80E-SAGE SE WIFI mainboard, a controller hang was observed that was immediately preceded by the following kernel messages: ahci 0000:28:00.0: Using 64-bit DMA addresses ahci 0000:28:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0035 address=0x7fffff00000 flags=0x0000] ahci 0000:28:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0035 address=0x7fffff00300 flags=0x0000] ahci 0000:28:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0035 address=0x7fffff00380 flags=0x0000] ahci 0000:28:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0035 address=0x7fffff00400 flags=0x0000] ahci 0000:28:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0035 address=0x7fffff00680 flags=0x0000] ahci 0000:28:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0035 address=0x7fffff00700 flags=0x0000] The first message is produced by code in drivers/iommu/dma-iommu.c which is accompanied by the following comment that seems to apply: /* * Try to use all the 32-bit PCI addresses first. The original SAC vs. * DAC reasoning loses relevance with PCIe, but enough hardware and * firmware bugs are still lurking out there that it's safest not to * venture into the 64-bit space until necessary. * * If your device goes wrong after seeing the notice then likely either * its driver is not setting DMA masks accurately, the hardware has * some inherent bug in handling >32-bit addresses, or not all the * expected address bits are wired up between the device and the IOMMU. */ Asking the ASM1061 on a discrete PCIe card to DMA from I/O virtual address 0xffffffff00000000 produces the following I/O page faults: vfio-pci 0000:07:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0021 address=0x7ff00000000 flags=0x0010] vfio-pci 0000:07:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0021 address=0x7ff00000500 flags=0x0010] Note that the upper 21 bits of the logged DMA address are zero. (When asking a different PCIe device in the same PCIe slot to DMA to the same I/O virtual address, we do see all the upper 32 bits of the DMA address as 1, so this is not an issue with the chipset or IOMMU configuration on the test system.) Also, hacking libahci to always set the upper 21 bits of all DMA addresses to 1 produces no discernible effect on the behavior of the ASM1061, and mkfs/mount/scrub/etc work as without this hack. This all strongly suggests that the ASM1061 has a 43 bit DMA address limit, and this commit therefore adds a quirk to deal with this limit. This issue probably applies to (some of) the other supported ASMedia parts as well, but we limit it to the PCI IDs known to refer to ASM1061 parts, as that's the only part we know for sure to be affected by this issue at this point. Link: https://lore.kernel.org/linux-ide/ZaZ2PIpEId-rl6jv@wantstofly.org/ Signed-off-by: Lennert Buytenhek [cassel: drop date from error messages in commit log] Signed-off-by: Niklas Cassel commit 40b7835e74e0383be308d528c5e0e41b3bf72ade Author: Hu Yadi Date: Wed Jan 24 10:29:08 2024 +0800 selftests/landlock: Fix fs_test build with old libc One issue comes up while building selftest/landlock/fs_test on my side (gcc 7.3/glibc-2.28/kernel-4.19). gcc -Wall -O2 -isystem fs_test.c -lcap -o selftests/landlock/fs_test fs_test.c:4575:9: error: initializer element is not constant .mnt = mnt_tmp, ^~~~~~~ Signed-off-by: Hu Yadi Suggested-by: Jiao Reviewed-by: Berlin Link: https://lore.kernel.org/r/20240124022908.42100-1-hu.yadi@h3c.com Fixes: 04f9070e99a4 ("selftests/landlock: Add tests for pseudo filesystems") [mic: Factor out mount's data string and make mnt_tmp static] Signed-off-by: Mickaël Salaün commit 116099ed345c932a8ae4a0d884a8f6cc54fd5fed Author: Hu Yadi Date: Tue Jan 23 14:26:21 2024 +0800 selftests/landlock: Fix net_test build with old libc One issue comes up while building selftest/landlock/net_test on my side (gcc 7.3/glibc-2.28/kernel-4.19). net_test.c: In function ‘set_service’: net_test.c:91:45: warning: implicit declaration of function ‘gettid’; [-Wimplicit-function-declaration] "_selftests-landlock-net-tid%d-index%d", gettid(), ^~~~~~ getgid net_test.c:(.text+0x4e0): undefined reference to `gettid' Signed-off-by: Hu Yadi Suggested-by: Jiao Reviewed-by: Berlin Fixes: a549d055a22e ("selftests/landlock: Add network tests") Link: https://lore.kernel.org/r/20240123062621.25082-1-hu.yadi@h3c.com [mic: Cosmetic fixes] Signed-off-by: Mickaël Salaün commit b9328fd636bd50da89e792e135b234ba8e6fe59f Author: Mario Limonciello Date: Wed Jan 24 16:07:49 2024 -0600 x86/CPU/AMD: Add more models to X86_FEATURE_ZEN5 Add model ranges starting at 0x20, 0x40 and 0x70 to the synthetic feature flag X86_FEATURE_ZEN5. Signed-off-by: Mario Limonciello Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240124220749.2983-1-mario.limonciello@amd.com commit 0a5bd0ffe790511d802e7f40898429a89e2487df Merge: 5da4597163562 9a91c05f4bd6f Author: Paolo Abeni Date: Thu Jan 25 11:59:44 2024 +0100 Merge branch 'tsnep-xdp-fixes' Gerhard Engleder says: ==================== tsnep: XDP fixes Found two driver specific problems during XDP and XSK testing. ==================== Link: https://lore.kernel.org/r/20240123200918.61219-1-gerhard@engleder-embedded.com Signed-off-by: Paolo Abeni commit 9a91c05f4bd6f6bdd6b8f90445e0da92e3ac956c Author: Gerhard Engleder Date: Tue Jan 23 21:09:18 2024 +0100 tsnep: Fix XDP_RING_NEED_WAKEUP for empty fill ring The fill ring of the XDP socket may contain not enough buffers to completey fill the RX queue during socket creation. In this case the flag XDP_RING_NEED_WAKEUP is not set as this flag is only set if the RX queue is not completely filled during polling. Set XDP_RING_NEED_WAKEUP flag also if RX queue is not completely filled during XDP socket creation. Fixes: 3fc2333933fd ("tsnep: Add XDP socket zero-copy RX support") Signed-off-by: Gerhard Engleder Signed-off-by: Paolo Abeni commit 50bad6f797d4d501c5ef416a6f92e1912ab5aa8b Author: Gerhard Engleder Date: Tue Jan 23 21:09:17 2024 +0100 tsnep: Remove FCS for XDP data path The RX data buffer includes the FCS. The FCS is already stripped for the normal data path. But for the XDP data path the FCS is included and acts like additional/useless data. Remove the FCS from the RX data buffer also for XDP. Fixes: 65b28c810035 ("tsnep: Add XDP RX support") Fixes: 3fc2333933fd ("tsnep: Add XDP socket zero-copy RX support") Signed-off-by: Gerhard Engleder Signed-off-by: Paolo Abeni commit 5da4597163562689033ed5728511782708e667f2 Merge: fdf8e6d18c6dc aef855df7e1bb Author: Paolo Abeni Date: Thu Jan 25 11:42:27 2024 +0100 Merge tag 'mlx5-fixes-2024-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2024-01-24 This series provides bug fixes to mlx5 driver. Please pull and let me know if there is any problem. * tag 'mlx5-fixes-2024-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5e: fix a potential double-free in fs_any_create_groups net/mlx5e: fix a double-free in arfs_create_groups net/mlx5e: Ignore IPsec replay window values on sender side net/mlx5e: Allow software parsing when IPsec crypto is enabled net/mlx5: Use mlx5 device constant for selecting CQ period mode for ASO net/mlx5: DR, Can't go to uplink vport on RX rule net/mlx5: DR, Use the right GVMI number for drop action net/mlx5: Bridge, fix multicast packets sent to uplink net/mlx5: Fix a WARN upon a callback command failure net/mlx5e: Fix peer flow lists handling net/mlx5e: Fix inconsistent hairpin RQT sizes net/mlx5e: Fix operation precedence bug in port timestamping napi_poll context net/mlx5: Fix query of sd_group field net/mlx5e: Use the correct lag ports number when creating TISes ==================== Link: https://lore.kernel.org/r/20240124081855.115410-1-saeed@kernel.org Signed-off-by: Paolo Abeni commit fdf8e6d18c6dcc0421d65aa6382f5a4fa0050149 Merge: 5e34480773502 9d71bc833f57a Author: Paolo Abeni Date: Thu Jan 25 11:30:31 2024 +0100 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2024-01-25 The following pull-request contains BPF updates for your *net* tree. We've added 12 non-merge commits during the last 2 day(s) which contain a total of 13 files changed, 190 insertions(+), 91 deletions(-). The main changes are: 1) Fix bpf_xdp_adjust_tail() in context of XSK zero-copy drivers which support XDP multi-buffer. The former triggered a NULL pointer dereference upon shrinking, from Maciej Fijalkowski & Tirthendu Sarkar. 2) Fix a bug in riscv64 BPF JIT which emitted a wrong prologue and epilogue for struct_ops programs, from Pu Lehui. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: i40e: update xdp_rxq_info::frag_size for ZC enabled Rx queue i40e: set xdp_rxq_info::frag_size xdp: reflect tail increase for MEM_TYPE_XSK_BUFF_POOL ice: update xdp_rxq_info::frag_size for ZC enabled Rx queue intel: xsk: initialize skb_frag_t::bv_offset in ZC drivers ice: remove redundant xdp_rxq_info registration i40e: handle multi-buffer packets that are shrunk by xdp prog ice: work on pre-XDP prog frag count xsk: fix usage of multi-buffer BPF helpers for ZC XDP xsk: make xsk_buff_pool responsible for clearing xdp_buff::flags xsk: recycle buffer in case Rx queue was full riscv, bpf: Fix unpredictable kernel crash about RV64 struct_ops ==================== Link: https://lore.kernel.org/r/20240125084416.10876-1-daniel@iogearbox.net Signed-off-by: Paolo Abeni commit 5e344807735023cd3a67c37a1852b849caa42620 Author: Shenwei Wang Date: Tue Jan 23 10:51:41 2024 -0600 net: fec: fix the unhandled context fault from smmu When repeatedly changing the interface link speed using the command below: ethtool -s eth0 speed 100 duplex full ethtool -s eth0 speed 1000 duplex full The following errors may sometimes be reported by the ARM SMMU driver: [ 5395.035364] fec 5b040000.ethernet eth0: Link is Down [ 5395.039255] arm-smmu 51400000.iommu: Unhandled context fault: fsr=0x402, iova=0x00000000, fsynr=0x100001, cbfrsynra=0x852, cb=2 [ 5398.108460] fec 5b040000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off It is identified that the FEC driver does not properly stop the TX queue during the link speed transitions, and this results in the invalid virtual I/O address translations from the SMMU and causes the context faults. Fixes: dbc64a8ea231 ("net: fec: move calls to quiesce/resume packet processing out of fec_restart()") Signed-off-by: Shenwei Wang Link: https://lore.kernel.org/r/20240123165141.2008104-1-shenwei.wang@nxp.com Signed-off-by: Paolo Abeni commit 80dde187f734cf9ccf988d5c2ef1a46b990660fd Author: Kalesh AP Date: Mon Jan 22 20:54:37 2024 -0800 RDMA/bnxt_re: Add a missing check in bnxt_qplib_query_srq Before populating the response, driver has to check the status of HWRM command. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1705985677-15551-6-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 3687b450c5f32e80f179ce4b09e0454da1449eac Author: Kalesh AP Date: Mon Jan 22 20:54:36 2024 -0800 RDMA/bnxt_re: Return error for SRQ resize SRQ resize is not supported in the driver. But driver is not returning error from bnxt_re_modify_srq() for SRQ resize. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1705985677-15551-5-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 8eaca6b5997bd8fd7039f2693e4ecf112823c816 Author: Kalesh AP Date: Mon Jan 22 20:54:35 2024 -0800 RDMA/bnxt_re: Fix unconditional fence for newer adapters Older adapters required an unconditional fence for non-wire memory operations. Newer adapters doesn't require this and therefore, disabling the unconditional fence. Fixes: 1801d87b3598 ("RDMA/bnxt_re: Support new 5760X P7 devices") Signed-off-by: Kashyap Desai Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1705985677-15551-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 8fcbf0a55f71be7e562f10222abc9a34148189d0 Author: Kalesh AP Date: Mon Jan 22 20:54:34 2024 -0800 RDMA/bnxt_re: Remove a redundant check inside bnxt_re_vf_res_config After the cited commit, there is no possibility that this check can return true. Remove it. Fixes: a43c26fa2e6c ("RDMA/bnxt_re: Remove the sriov config callback") Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1705985677-15551-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 282fd66e2ef6e5d72b8fcd77efb2b282d2569464 Author: Kalesh AP Date: Mon Jan 22 20:54:33 2024 -0800 RDMA/bnxt_re: Avoid creating fence MR for newer adapters Limit the usage of fence MR to adapters older than Gen P5 products. Fixes: 1801d87b3598 ("RDMA/bnxt_re: Support new 5760X P7 devices") Signed-off-by: Kashyap Desai Signed-off-by: Bhargava Chenna Marreddy Signed-off-by: Kalesh AP Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1705985677-15551-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 809aa64ebff51eb170ee31a95f83b2d21efa32e2 Author: Zhipeng Lu Date: Fri Jan 12 16:55:23 2024 +0800 IB/hfi1: Fix a memleak in init_credit_return When dma_alloc_coherent fails to allocate dd->cr_base[i].va, init_credit_return should deallocate dd->cr_base and dd->cr_base[i] that allocated before. Or those resources would be never freed and a memleak is triggered. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Signed-off-by: Zhipeng Lu Link: https://lore.kernel.org/r/20240112085523.3731720-1-alexious@zju.edu.cn Acked-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky commit 27d19268cf394f2c78db732be0cb31852eeadb0a Author: Jacek Lawrynowicz Date: Mon Jan 22 13:09:45 2024 +0100 accel/ivpu: Improve recovery and reset support - Synchronize job submission with reset/recovery using reset_lock - Always print recovery reason and call diagnose_failure() - Don't allow for autosupend during recovery - Prevent immediate autosuspend after reset/recovery - Prevent force_recovery for issuing TDR when device is suspended - Reset VPU instead triggering recovery after changing debugfs params Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240122120945.1150728-4-jacek.lawrynowicz@linux.intel.com commit 264b271d12d0af794f3d1dc3793e6589fae8c66c Author: Jacek Lawrynowicz Date: Mon Jan 22 13:09:44 2024 +0100 accel/ivpu: Improve stability of ivpu_submit_ioctl() - Wake up the device as late as possible - Remove job reference counting in order to simplify the code - Don't put jobs that are not fully submitted on submitted_jobs_xa in order to avoid potential races with reset/recovery Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240122120945.1150728-3-jacek.lawrynowicz@linux.intel.com commit f1cc6aceecd04964304786530eaa4ad87d90b972 Author: Jacek Lawrynowicz Date: Mon Jan 22 13:09:43 2024 +0100 accel/ivpu: Fix dev open/close races with unbind - Add context_list_lock to synchronize user context addition/removal - Use drm_dev_enter() to prevent unbinding the device during ivpu_open() and vpu address allocation Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240122120945.1150728-2-jacek.lawrynowicz@linux.intel.com commit 9a574ea9069be30b835a3da772c039993c43369b Author: Tim Chen Date: Mon Jan 22 15:35:34 2024 -0800 tick/sched: Preserve number of idle sleeps across CPU hotplug events Commit 71fee48f ("tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug") preserved total idle sleep time and iowait sleeptime across CPU hotplug events. Similar reasoning applies to the number of idle calls and idle sleeps to get the proper average of sleep time per idle invocation. Preserve those fields too. Fixes: 71fee48f ("tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug") Signed-off-by: Tim Chen Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240122233534.3094238-1-tim.c.chen@linux.intel.com commit a2933a8759a62269754e54733d993b19de870e84 Author: Hangbin Liu Date: Tue Jan 23 15:59:17 2024 +0800 selftests: bonding: do not test arp/ns target with mode balance-alb/tlb The prio_arp/ns tests hard code the mode to active-backup. At the same time, The balance-alb/tlb modes do not support arp/ns target. So remove the prio_arp/ns tests from the loop and only test active-backup mode. Fixes: 481b56e0391e ("selftests: bonding: re-format bond option tests") Reported-by: Jay Vosburgh Closes: https://lore.kernel.org/netdev/17415.1705965957@famine/ Signed-off-by: Hangbin Liu Acked-by: Jay Vosburgh Link: https://lore.kernel.org/r/20240123075917.1576360-1-liuhangbin@gmail.com Signed-off-by: Paolo Abeni commit f9f031dd21a7ce13a13862fa5281d32e1029c70f Author: Ville Syrjälä Date: Thu Jan 18 23:21:31 2024 +0200 drm/i915/psr: Only allow PSR in LPSP mode on HSW non-ULT On HSW non-ULT (or at least on Dell Latitude E6540) external displays start to flicker when we enable PSR on the eDP. We observe a much higher SR and PC6 residency than should be possible with an external display, and indeen much higher than what we observe with eDP disabled and only the external display enabled. Looks like the hardware is somehow ignoring the fact that the external display is active during PSR. I wasn't able to redproduce this on my HSW ULT machine, or BDW. So either there's something specific about this particular laptop (eg. some unknown firmware thing) or the issue is limited to just non-ULT HSW systems. All known registers that could affect this look perfectly reasonable on the affected machine. As a workaround let's unmask the LPSP event to prevent PSR entry except while in LPSP mode (only pipe A + eDP active). This will prevent PSR entry entirely when multiple pipes are active. The one slight downside is that we now also prevent PSR entry when driving eDP with pipe B or C, but I think that's a reasonable tradeoff to avoid having to implement a more complex workaround. Cc: stable@vger.kernel.org Fixes: 783d8b80871f ("drm/i915/psr: Re-enable PSR1 on hsw/bdw") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10092 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240118212131.31868-1-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander (cherry picked from commit 94501c3ca6400e463ff6cc0c9cf4a2feb6a9205d) Signed-off-by: Joonas Lahtinen commit 644649553508b9bacf0fc7a5bdc4f9e0165576a5 Author: Jiri Wiesner Date: Mon Jan 22 18:23:50 2024 +0100 clocksource: Skip watchdog check for large watchdog intervals There have been reports of the watchdog marking clocksources unstable on machines with 8 NUMA nodes: clocksource: timekeeping watchdog on CPU373: Marking clocksource 'tsc' as unstable because the skew is too large: clocksource: 'hpet' wd_nsec: 14523447520 clocksource: 'tsc' cs_nsec: 14524115132 The measured clocksource skew - the absolute difference between cs_nsec and wd_nsec - was 668 microseconds: cs_nsec - wd_nsec = 14524115132 - 14523447520 = 667612 The kernel used 200 microseconds for the uncertainty_margin of both the clocksource and watchdog, resulting in a threshold of 400 microseconds (the md variable). Both the cs_nsec and the wd_nsec value indicate that the readout interval was circa 14.5 seconds. The observed behaviour is that watchdog checks failed for large readout intervals on 8 NUMA node machines. This indicates that the size of the skew was directly proportinal to the length of the readout interval on those machines. The measured clocksource skew, 668 microseconds, was evaluated against a threshold (the md variable) that is suited for readout intervals of roughly WATCHDOG_INTERVAL, i.e. HZ >> 1, which is 0.5 second. The intention of 2e27e793e280 ("clocksource: Reduce clocksource-skew threshold") was to tighten the threshold for evaluating skew and set the lower bound for the uncertainty_margin of clocksources to twice WATCHDOG_MAX_SKEW. Later in c37e85c135ce ("clocksource: Loosen clocksource watchdog constraints"), the WATCHDOG_MAX_SKEW constant was increased to 125 microseconds to fit the limit of NTP, which is able to use a clocksource that suffers from up to 500 microseconds of skew per second. Both the TSC and the HPET use default uncertainty_margin. When the readout interval gets stretched the default uncertainty_margin is no longer a suitable lower bound for evaluating skew - it imposes a limit that is far stricter than the skew with which NTP can deal. The root causes of the skew being directly proportinal to the length of the readout interval are: * the inaccuracy of the shift/mult pairs of clocksources and the watchdog * the conversion to nanoseconds is imprecise for large readout intervals Prevent this by skipping the current watchdog check if the readout interval exceeds 2 * WATCHDOG_INTERVAL. Considering the maximum readout interval of 2 * WATCHDOG_INTERVAL, the current default uncertainty margin (of the TSC and HPET) corresponds to a limit on clocksource skew of 250 ppm (microseconds of skew per second). To keep the limit imposed by NTP (500 microseconds of skew per second) for all possible readout intervals, the margins would have to be scaled so that the threshold value is proportional to the length of the actual readout interval. As for why the readout interval may get stretched: Since the watchdog is executed in softirq context the expiration of the watchdog timer can get severely delayed on account of a ksoftirqd thread not getting to run in a timely manner. Surely, a system with such belated softirq execution is not working well and the scheduling issue should be looked into but the clocksource watchdog should be able to deal with it accordingly. Fixes: 2e27e793e280 ("clocksource: Reduce clocksource-skew threshold") Suggested-by: Feng Tang Signed-off-by: Jiri Wiesner Signed-off-by: Thomas Gleixner Tested-by: Paul E. McKenney Reviewed-by: Feng Tang Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240122172350.GA740@incl commit 983a73da1f996faee9997149eb05b12fa7bd8cbf Author: Leon Romanovsky Date: Wed Jan 24 00:13:54 2024 -0800 xfrm: Pass UDP encapsulation in TX packet offload In addition to citied commit in Fixes line, allow UDP encapsulation in TX path too. Fixes: 89edf40220be ("xfrm: Support UDP encapsulation in packet offload mode") CC: Steffen Klassert Reported-by: Mike Yu Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed Signed-off-by: Steffen Klassert commit a3bdcdd022c68942a774e8e63424cc11c85aab78 Author: Su Hui Date: Thu Jan 25 14:32:26 2024 +0800 HID: hidraw: fix a problem of memory leak in hidraw_release() 'struct hidraw_list' is a circular queue whose head can be smaller than tail. Using 'list->tail != list->head' to release all memory that should be released. Fixes: a5623a203cff ("HID: hidraw: fix memory leak in hidraw_release()") Signed-off-by: Su Hui Reviewed-by: Dan Carpenter Signed-off-by: Jiri Kosina commit 9f3fe29d77ef4e7f7cb5c4c8c59f6dc373e57e78 Author: Mikulas Patocka Date: Wed Jan 17 19:22:36 2024 +0100 md: fix a suspicious RCU usage warning RCU protection was removed in the commit 2d32777d60de ("raid1: remove rcu protection to access rdev from conf"). However, the code in fix_read_error does rcu_dereference outside rcu_read_lock - this triggers the following warning. The warning is triggered by a LVM2 test shell/integrity-caching.sh. This commit removes rcu_dereference. ============================= WARNING: suspicious RCU usage 6.7.0 #2 Not tainted ----------------------------- drivers/md/raid1.c:2265 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 no locks held by mdX_raid1/1859. stack backtrace: CPU: 2 PID: 1859 Comm: mdX_raid1 Not tainted 6.7.0 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x60/0x70 lockdep_rcu_suspicious+0x153/0x1b0 raid1d+0x1732/0x1750 [raid1] ? lock_acquire+0x9f/0x270 ? finish_wait+0x3d/0x80 ? md_thread+0xf7/0x130 [md_mod] ? lock_release+0xaa/0x230 ? md_register_thread+0xd0/0xd0 [md_mod] md_thread+0xa0/0x130 [md_mod] ? housekeeping_test_cpu+0x30/0x30 kthread+0xdc/0x110 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x28/0x40 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork_asm+0x11/0x20 Signed-off-by: Mikulas Patocka Fixes: ca294b34aaf3 ("md/raid1: support read error check") Reviewed-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/51539879-e1ca-fde3-b8b4-8934ddedcbc@redhat.com commit ebeae8adf89d9a82359f6659b1663d09beec2faa Author: Lin Ma Date: Sun Jan 21 15:35:06 2024 +0800 ksmbd: fix global oob in ksmbd_nl_policy Similar to a reported issue (check the commit b33fb5b801c6 ("net: qualcomm: rmnet: fix global oob in rmnet_policy"), my local fuzzer finds another global out-of-bounds read for policy ksmbd_nl_policy. See bug trace below: ================================================================== BUG: KASAN: global-out-of-bounds in validate_nla lib/nlattr.c:386 [inline] BUG: KASAN: global-out-of-bounds in __nla_validate_parse+0x24af/0x2750 lib/nlattr.c:600 Read of size 1 at addr ffffffff8f24b100 by task syz-executor.1/62810 CPU: 0 PID: 62810 Comm: syz-executor.1 Tainted: G N 6.1.0 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x172/0x475 mm/kasan/report.c:395 kasan_report+0xbb/0x1c0 mm/kasan/report.c:495 validate_nla lib/nlattr.c:386 [inline] __nla_validate_parse+0x24af/0x2750 lib/nlattr.c:600 __nla_parse+0x3e/0x50 lib/nlattr.c:697 __nlmsg_parse include/net/netlink.h:748 [inline] genl_family_rcv_msg_attrs_parse.constprop.0+0x1b0/0x290 net/netlink/genetlink.c:565 genl_family_rcv_msg_doit+0xda/0x330 net/netlink/genetlink.c:734 genl_family_rcv_msg net/netlink/genetlink.c:833 [inline] genl_rcv_msg+0x441/0x780 net/netlink/genetlink.c:850 netlink_rcv_skb+0x14f/0x410 net/netlink/af_netlink.c:2540 genl_rcv+0x24/0x40 net/netlink/genetlink.c:861 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x54e/0x800 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x930/0xe50 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0x154/0x190 net/socket.c:734 ____sys_sendmsg+0x6df/0x840 net/socket.c:2482 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2536 __sys_sendmsg+0xf3/0x1c0 net/socket.c:2565 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fdd66a8f359 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 RSP: 002b:00007fdd65e00168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fdd66bbcf80 RCX: 00007fdd66a8f359 RDX: 0000000000000000 RSI: 0000000020000500 RDI: 0000000000000003 RBP: 00007fdd66ada493 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc84b81aff R14: 00007fdd65e00300 R15: 0000000000022000 The buggy address belongs to the variable: ksmbd_nl_policy+0x100/0xa80 The buggy address belongs to the physical page: page:0000000034f47940 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ccc4b flags: 0x200000000001000(reserved|node=0|zone=2) raw: 0200000000001000 ffffea00073312c8 ffffea00073312c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffffffff8f24b000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffffff8f24b080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffff8f24b100: f9 f9 f9 f9 00 00 f9 f9 f9 f9 f9 f9 00 00 07 f9 ^ ffffffff8f24b180: f9 f9 f9 f9 00 05 f9 f9 f9 f9 f9 f9 00 00 00 05 ffffffff8f24b200: f9 f9 f9 f9 00 00 03 f9 f9 f9 f9 f9 00 00 04 f9 ================================================================== To fix it, add a placeholder named __KSMBD_EVENT_MAX and let KSMBD_EVENT_MAX to be its original value - 1 according to what other netlink families do. Also change two sites that refer the KSMBD_EVENT_MAX to correct value. Cc: stable@vger.kernel.org Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") Signed-off-by: Lin Ma Acked-by: Namjae Jeon Signed-off-by: Steve French commit a717932db11ed895f32421d46e82746f5c52c5c0 Merge: f6cc4b6a3ae53 d0009effa8862 Author: Jakub Kicinski Date: Wed Jan 24 21:03:16 2024 -0800 Merge tag 'nf-24-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Update nf_tables kdoc to keep it in sync with the code, from George Guo. 2) Handle NETDEV_UNREGISTER event for inet/ingress basechain. 3) Reject configuration that cause nft_limit to overflow, from Florian Westphal. 4) Restrict anonymous set/map names to 16 bytes, from Florian Westphal. 5) Disallow to encode queue number and error in verdicts. This reverts a patch which seems to have introduced an early attempt to support for nfqueue maps, which is these days supported via nft_queue expression. 6) Sanitize family via .validate for expressions that explicitly refer to NF_INET_* hooks. * tag 'nf-24-01-24' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nf_tables: validate NFPROTO_* family netfilter: nf_tables: reject QUEUE/DROP verdict parameters netfilter: nf_tables: restrict anonymous set and map names to 16 bytes netfilter: nft_limit: reject configurations that cause integer overflow netfilter: nft_chain_filter: handle NETDEV_UNREGISTER for inet/ingress basechain netfilter: nf_tables: cleanup documentation ==================== Link: https://lore.kernel.org/r/20240124191248.75463-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit d76779dd3681c01a4c6c3cae4d0627c9083e0ee6 Author: Quanquan Cao Date: Wed Jan 24 17:15:26 2024 +0800 cxl/region:Fix overflow issue in alloc_hpa() Creating a region with 16 memory devices caused a problem. The div_u64_rem function, used for dividing an unsigned 64-bit number by a 32-bit one, faced an issue when SZ_256M * p->interleave_ways. The result surpassed the maximum limit of the 32-bit divisor (4G), leading to an overflow and a remainder of 0. note: At this point, p->interleave_ways is 16, meaning 16 * 256M = 4G To fix this issue, I replaced the div_u64_rem function with div64_u64_rem and adjusted the type of the remainder. Signed-off-by: Quanquan Cao Reviewed-by: Dave Jiang Fixes: 23a22cd1c98b ("cxl/region: Allocate HPA capacity to regions") Cc: Signed-off-by: Dan Williams commit b16702be210bb49256f8a32df2c310383134dd57 Merge: e5767a95abf7a 4050957c7c2c1 Author: Dave Airlie Date: Thu Jan 25 14:22:10 2024 +1000 Merge tag 'exynos-drm-fixes-for-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Several fixups - Minor fix in `drm/exynos: gsc: gsc_runtime_resume` . The patch ensures `clk_disable_unprepare()` is called on the first element of `ctx->clocks` array. This issue was identified by the Linux Verification Center. - Fix excessive stack usage in `fimd_win_set_pixfmt()` in `drm/exynos` . The issue, highlighted by gcc, involved an unnecessary on-stack copy of the large `exynos_drm_plane` structure, now replaced with a pointer. - Fix an incorrect type issue in `exynos_drm_fimd.c` module . Addresses an incorrect type issue in `fimd_commit()` within the `exynos_drm_fimd.c` The problem was reported by the kernel test robot[1]. [1] https://lore.kernel.org/oe-kbuild-all/202312140930.Me9yWf8F-lkp@intel.com/ - Fix a typo in the dt-bindings for `samsung,exynos-mixer` . Changes 'regs' to the correct property name 'reg' in the dt-bindings documentation for `samsung,exynos-mixer` Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20240122072407.39546-1-inki.dae@samsung.com commit e5767a95abf7a51352746e159e05d990aca39f5d Merge: b8c68345949c2 1f1626ac04288 Author: Dave Airlie Date: Thu Jan 25 14:19:52 2024 +1000 Merge tag 'drm-misc-next-fixes-2024-01-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A null pointer dereference fix for v3d and a protection fault fix for ttm. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/5zrphn2nhxnwillxlmo6ap3zh7qjt3jgydlm5sntuc4fzvwhpo@hznprx2bjyi7 commit b8c68345949c27edc05157bae97726cb59da5552 Merge: 6613476e225e0 84b5ece64477d Author: Dave Airlie Date: Thu Jan 25 14:19:12 2024 +1000 Merge tag 'drm-intel-next-fixes-2024-01-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes - DSI sequence revert to fix GitLab #10071 and DP test-pattern fix - Drop -Wstringop-overflow (broken on GCC11) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZaozNnAGhu6Ec6cb@jlahtine-mobl.ger.corp.intel.com commit 97cf5d53b4812dcb52c13fda700dad5aa8d3446c Author: Jingbo Xu Date: Wed Jan 24 11:19:45 2024 +0800 erofs: get rid of unneeded GFP_NOFS Clean up some leftovers since there is no way for EROFS to be called again from a reclaim context. Signed-off-by: Jingbo Xu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20240124031945.130782-1-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang commit f6cc4b6a3ae53df425771000e9c9540cce9b7bb1 Author: Zhipeng Lu Date: Tue Jan 23 01:24:42 2024 +0800 fjes: fix memleaks in fjes_hw_setup In fjes_hw_setup, it allocates several memory and delay the deallocation to the fjes_hw_exit in fjes_probe through the following call chain: fjes_probe |-> fjes_hw_init |-> fjes_hw_setup |-> fjes_hw_exit However, when fjes_hw_setup fails, fjes_hw_exit won't be called and thus all the resources allocated in fjes_hw_setup will be leaked. In this patch, we free those resources in fjes_hw_setup and prevents such leaks. Fixes: 2fcbca687702 ("fjes: platform_driver's .probe and .remove routine") Signed-off-by: Zhipeng Lu Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240122172445.3841883-1-alexious@zju.edu.cn Signed-off-by: Jakub Kicinski commit 6098d87eaf31f48153c984e2adadf14762520a87 Merge: f22face166ef6 ded080c86b3f9 Author: Linus Torvalds Date: Wed Jan 24 16:59:52 2024 -0800 Merge tag 'ceph-for-6.8-rc2' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A fix to avoid triggering an assert in some cases where RBD exclusive mappings are involved and a deprecated API cleanup" * tag 'ceph-for-6.8-rc2' of https://github.com/ceph/ceph-client: rbd: don't move requests to the running list on errors rbd: remove usage of the deprecated ida_simple_*() API commit f22face166ef6327fe5b2cab61d2a78578b94534 Merge: cf10015a24f36 1ed4b56310023 Author: Linus Torvalds Date: Wed Jan 24 16:51:59 2024 -0800 Merge tag 'integrity-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity fix from Mimi Zohar: "Revert patch that required user-provided key data, since keys can be created from kernel-generated random numbers" * tag 'integrity-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: Revert "KEYS: encrypted: Add check for strsep" commit 9d71bc833f57a6549c753e37ce47136d35b67fc4 Merge: 1732ebc4a2618 0cbb08707c932 Author: Alexei Starovoitov Date: Wed Jan 24 16:24:07 2024 -0800 Merge branch 'net-bpf_xdp_adjust_tail-and-intel-mbuf-fixes' Maciej Fijalkowski says: ==================== net: bpf_xdp_adjust_tail() and Intel mbuf fixes Hey, after a break followed by dealing with sickness, here is a v6 that makes bpf_xdp_adjust_tail() actually usable for ZC drivers that support XDP multi-buffer. Since v4 I tried also using bpf_xdp_adjust_tail() with positive offset which exposed yet another issues, which can be observed by increased commit count when compared to v3. John, in the end I think we should remove handling MEM_TYPE_XSK_BUFF_POOL from __xdp_return(), but it is out of the scope for fixes set, IMHO. Thanks, Maciej v6: - add acks [Magnus] - fix spelling mistakes [Magnus] - avoid touching xdp_buff in xp_alloc_{reused,new_from_fq}() [Magnus] - s/shrink_data/bpf_xdp_shrink_data [Jakub] - remove __shrink_data() [Jakub] - check retvals from __xdp_rxq_info_reg() [Magnus] v5: - pick correct version of patch 5 [Simon] - elaborate a bit more on what patch 2 fixes v4: - do not clear frags flag when deleting tail; xsk_buff_pool now does that - skip some NULL tests for xsk_buff_get_tail [Martin, John] - address problems around registering xdp_rxq_info - fix bpf_xdp_frags_increase_tail() for ZC mbuf v3: - add acks - s/xsk_buff_tail_del/xsk_buff_del_tail - address i40e as well (thanks Tirthendu) v2: - fix !CONFIG_XDP_SOCKETS builds - add reviewed-by tag to patch 3 ==================== Link: https://lore.kernel.org/r/20240124191602.566724-1-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit 0cbb08707c932b3f004bc1a8ec6200ef572c1f5f Author: Maciej Fijalkowski Date: Wed Jan 24 20:16:02 2024 +0100 i40e: update xdp_rxq_info::frag_size for ZC enabled Rx queue Now that i40e driver correctly sets up frag_size in xdp_rxq_info, let us make it work for ZC multi-buffer as well. i40e_ring::rx_buf_len for ZC is being set via xsk_pool_get_rx_frame_size() and this needs to be propagated up to xdp_rxq_info. Fixes: 1c9ba9c14658 ("i40e: xsk: add RX multi-buffer support") Acked-by: Magnus Karlsson Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-12-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit a045d2f2d03d23e7db6772dd83e0ba2705dfad93 Author: Maciej Fijalkowski Date: Wed Jan 24 20:16:01 2024 +0100 i40e: set xdp_rxq_info::frag_size i40e support XDP multi-buffer so it is supposed to use __xdp_rxq_info_reg() instead of xdp_rxq_info_reg() and set the frag_size. It can not be simply converted at existing callsite because rx_buf_len could be un-initialized, so let us register xdp_rxq_info within i40e_configure_rx_ring(), which happen to be called with already initialized rx_buf_len value. Commit 5180ff1364bc ("i40e: use int for i40e_status") converted 'err' to int, so two variables to deal with return codes are not needed within i40e_configure_rx_ring(). Remove 'ret' and use 'err' to handle status from xdp_rxq_info registration. Fixes: e213ced19bef ("i40e: add support for XDP multi-buffer Rx") Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-11-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit fbadd83a612c3b7aad2987893faca6bd24aaebb3 Author: Maciej Fijalkowski Date: Wed Jan 24 20:16:00 2024 +0100 xdp: reflect tail increase for MEM_TYPE_XSK_BUFF_POOL XSK ZC Rx path calculates the size of data that will be posted to XSK Rx queue via subtracting xdp_buff::data_end from xdp_buff::data. In bpf_xdp_frags_increase_tail(), when underlying memory type of xdp_rxq_info is MEM_TYPE_XSK_BUFF_POOL, add offset to data_end in tail fragment, so that later on user space will be able to take into account the amount of bytes added by XDP program. Fixes: 24ea50127ecf ("xsk: support mbuf on ZC RX") Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-10-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit 3de38c87174225487fc93befeea7d380db80aef6 Author: Maciej Fijalkowski Date: Wed Jan 24 20:15:59 2024 +0100 ice: update xdp_rxq_info::frag_size for ZC enabled Rx queue Now that ice driver correctly sets up frag_size in xdp_rxq_info, let us make it work for ZC multi-buffer as well. ice_rx_ring::rx_buf_len for ZC is being set via xsk_pool_get_rx_frame_size() and this needs to be propagated up to xdp_rxq_info. Use a bigger hammer and instead of unregistering only xdp_rxq_info's memory model, unregister it altogether and register it again and have xdp_rxq_info with correct frag_size value. Fixes: 1bbc04de607b ("ice: xsk: add RX multi-buffer support") Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-9-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit 290779905d09d5fdf6caa4f58ddefc3f4db0c0a9 Author: Maciej Fijalkowski Date: Wed Jan 24 20:15:58 2024 +0100 intel: xsk: initialize skb_frag_t::bv_offset in ZC drivers Ice and i40e ZC drivers currently set offset of a frag within skb_shared_info to 0, which is incorrect. xdp_buffs that come from xsk_buff_pool always have 256 bytes of a headroom, so they need to be taken into account to retrieve xdp_buff::data via skb_frag_address(). Otherwise, bpf_xdp_frags_increase_tail() would be starting its job from xdp_buff::data_hard_start which would result in overwriting existing payload. Fixes: 1c9ba9c14658 ("i40e: xsk: add RX multi-buffer support") Fixes: 1bbc04de607b ("ice: xsk: add RX multi-buffer support") Acked-by: Magnus Karlsson Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-8-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit 2ee788c06493d02ee85855414cca39825e768aaf Author: Maciej Fijalkowski Date: Wed Jan 24 20:15:57 2024 +0100 ice: remove redundant xdp_rxq_info registration xdp_rxq_info struct can be registered by drivers via two functions - xdp_rxq_info_reg() and __xdp_rxq_info_reg(). The latter one allows drivers that support XDP multi-buffer to set up xdp_rxq_info::frag_size which in turn will make it possible to grow the packet via bpf_xdp_adjust_tail() BPF helper. Currently, ice registers xdp_rxq_info in two spots: 1) ice_setup_rx_ring() // via xdp_rxq_info_reg(), BUG 2) ice_vsi_cfg_rxq() // via __xdp_rxq_info_reg(), OK Cited commit under fixes tag took care of setting up frag_size and updated registration scheme in 2) but it did not help as 1) is called before 2) and as shown above it uses old registration function. This means that 2) sees that xdp_rxq_info is already registered and never calls __xdp_rxq_info_reg() which leaves us with xdp_rxq_info::frag_size being set to 0. To fix this misbehavior, simply remove xdp_rxq_info_reg() call from ice_setup_rx_ring(). Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side") Acked-by: Magnus Karlsson Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-7-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit 83014323c642b8faa2d64a5f303b41c019322478 Author: Tirthendu Sarkar Date: Wed Jan 24 20:15:56 2024 +0100 i40e: handle multi-buffer packets that are shrunk by xdp prog XDP programs can shrink packets by calling the bpf_xdp_adjust_tail() helper function. For multi-buffer packets this may lead to reduction of frag count stored in skb_shared_info area of the xdp_buff struct. This results in issues with the current handling of XDP_PASS and XDP_DROP cases. For XDP_PASS, currently skb is being built using frag count of xdp_buffer before it was processed by XDP prog and thus will result in an inconsistent skb when frag count gets reduced by XDP prog. To fix this, get correct frag count while building the skb instead of using pre-obtained frag count. For XDP_DROP, current page recycling logic will not reuse the page but instead will adjust the pagecnt_bias so that the page can be freed. This again results in inconsistent behavior as the page refcnt has already been changed by the helper while freeing the frag(s) as part of shrinking the packet. To fix this, only adjust pagecnt_bias for buffers that are stillpart of the packet post-xdp prog run. Fixes: e213ced19bef ("i40e: add support for XDP multi-buffer Rx") Reported-by: Maciej Fijalkowski Signed-off-by: Tirthendu Sarkar Link: https://lore.kernel.org/r/20240124191602.566724-6-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit ad2047cf5d9313200e308612aed516548873d124 Author: Maciej Fijalkowski Date: Wed Jan 24 20:15:55 2024 +0100 ice: work on pre-XDP prog frag count Fix an OOM panic in XDP_DRV mode when a XDP program shrinks a multi-buffer packet by 4k bytes and then redirects it to an AF_XDP socket. Since support for handling multi-buffer frames was added to XDP, usage of bpf_xdp_adjust_tail() helper within XDP program can free the page that given fragment occupies and in turn decrease the fragment count within skb_shared_info that is embedded in xdp_buff struct. In current ice driver codebase, it can become problematic when page recycling logic decides not to reuse the page. In such case, __page_frag_cache_drain() is used with ice_rx_buf::pagecnt_bias that was not adjusted after refcount of page was changed by XDP prog which in turn does not drain the refcount to 0 and page is never freed. To address this, let us store the count of frags before the XDP program was executed on Rx ring struct. This will be used to compare with current frag count from skb_shared_info embedded in xdp_buff. A smaller value in the latter indicates that XDP prog freed frag(s). Then, for given delta decrement pagecnt_bias for XDP_DROP verdict. While at it, let us also handle the EOP frag within ice_set_rx_bufs_act() to make our life easier, so all of the adjustments needed to be applied against freed frags are performed in the single place. Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side") Acked-by: Magnus Karlsson Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-5-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit c5114710c8ce86b8317e9b448f4fd15c711c2a82 Author: Maciej Fijalkowski Date: Wed Jan 24 20:15:54 2024 +0100 xsk: fix usage of multi-buffer BPF helpers for ZC XDP Currently when packet is shrunk via bpf_xdp_adjust_tail() and memory type is set to MEM_TYPE_XSK_BUFF_POOL, null ptr dereference happens: [1136314.192256] BUG: kernel NULL pointer dereference, address: 0000000000000034 [1136314.203943] #PF: supervisor read access in kernel mode [1136314.213768] #PF: error_code(0x0000) - not-present page [1136314.223550] PGD 0 P4D 0 [1136314.230684] Oops: 0000 [#1] PREEMPT SMP NOPTI [1136314.239621] CPU: 8 PID: 54203 Comm: xdpsock Not tainted 6.6.0+ #257 [1136314.250469] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019 [1136314.265615] RIP: 0010:__xdp_return+0x6c/0x210 [1136314.274653] Code: ad 00 48 8b 47 08 49 89 f8 a8 01 0f 85 9b 01 00 00 0f 1f 44 00 00 f0 41 ff 48 34 75 32 4c 89 c7 e9 79 cd 80 ff 83 fe 03 75 17 41 34 01 0f 85 02 01 00 00 48 89 cf e9 22 cc 1e 00 e9 3d d2 86 [1136314.302907] RSP: 0018:ffffc900089f8db0 EFLAGS: 00010246 [1136314.312967] RAX: ffffc9003168aed0 RBX: ffff8881c3300000 RCX: 0000000000000000 [1136314.324953] RDX: 0000000000000000 RSI: 0000000000000003 RDI: ffffc9003168c000 [1136314.336929] RBP: 0000000000000ae0 R08: 0000000000000002 R09: 0000000000010000 [1136314.348844] R10: ffffc9000e495000 R11: 0000000000000040 R12: 0000000000000001 [1136314.360706] R13: 0000000000000524 R14: ffffc9003168aec0 R15: 0000000000000001 [1136314.373298] FS: 00007f8df8bbcb80(0000) GS:ffff8897e0e00000(0000) knlGS:0000000000000000 [1136314.386105] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1136314.396532] CR2: 0000000000000034 CR3: 00000001aa912002 CR4: 00000000007706f0 [1136314.408377] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [1136314.420173] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [1136314.431890] PKRU: 55555554 [1136314.439143] Call Trace: [1136314.446058] [1136314.452465] ? __die+0x20/0x70 [1136314.459881] ? page_fault_oops+0x15b/0x440 [1136314.468305] ? exc_page_fault+0x6a/0x150 [1136314.476491] ? asm_exc_page_fault+0x22/0x30 [1136314.484927] ? __xdp_return+0x6c/0x210 [1136314.492863] bpf_xdp_adjust_tail+0x155/0x1d0 [1136314.501269] bpf_prog_ccc47ae29d3b6570_xdp_sock_prog+0x15/0x60 [1136314.511263] ice_clean_rx_irq_zc+0x206/0xc60 [ice] [1136314.520222] ? ice_xmit_zc+0x6e/0x150 [ice] [1136314.528506] ice_napi_poll+0x467/0x670 [ice] [1136314.536858] ? ttwu_do_activate.constprop.0+0x8f/0x1a0 [1136314.546010] __napi_poll+0x29/0x1b0 [1136314.553462] net_rx_action+0x133/0x270 [1136314.561619] __do_softirq+0xbe/0x28e [1136314.569303] do_softirq+0x3f/0x60 This comes from __xdp_return() call with xdp_buff argument passed as NULL which is supposed to be consumed by xsk_buff_free() call. To address this properly, in ZC case, a node that represents the frag being removed has to be pulled out of xskb_list. Introduce appropriate xsk helpers to do such node operation and use them accordingly within bpf_xdp_adjust_tail(). Fixes: 24ea50127ecf ("xsk: support mbuf on ZC RX") Acked-by: Magnus Karlsson # For the xsk header part Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-4-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit f7f6aa8e24383fbb11ac55942e66da9660110f80 Author: Maciej Fijalkowski Date: Wed Jan 24 20:15:53 2024 +0100 xsk: make xsk_buff_pool responsible for clearing xdp_buff::flags XDP multi-buffer support introduced XDP_FLAGS_HAS_FRAGS flag that is used by drivers to notify data path whether xdp_buff contains fragments or not. Data path looks up mentioned flag on first buffer that occupies the linear part of xdp_buff, so drivers only modify it there. This is sufficient for SKB and XDP_DRV modes as usually xdp_buff is allocated on stack or it resides within struct representing driver's queue and fragments are carried via skb_frag_t structs. IOW, we are dealing with only one xdp_buff. ZC mode though relies on list of xdp_buff structs that is carried via xsk_buff_pool::xskb_list, so ZC data path has to make sure that fragments do *not* have XDP_FLAGS_HAS_FRAGS set. Otherwise, xsk_buff_free() could misbehave if it would be executed against xdp_buff that carries a frag with XDP_FLAGS_HAS_FRAGS flag set. Such scenario can take place when within supplied XDP program bpf_xdp_adjust_tail() is used with negative offset that would in turn release the tail fragment from multi-buffer frame. Calling xsk_buff_free() on tail fragment with XDP_FLAGS_HAS_FRAGS would result in releasing all the nodes from xskb_list that were produced by driver before XDP program execution, which is not what is intended - only tail fragment should be deleted from xskb_list and then it should be put onto xsk_buff_pool::free_list. Such multi-buffer frame will never make it up to user space, so from AF_XDP application POV there would be no traffic running, however due to free_list getting constantly new nodes, driver will be able to feed HW Rx queue with recycled buffers. Bottom line is that instead of traffic being redirected to user space, it would be continuously dropped. To fix this, let us clear the mentioned flag on xsk_buff_pool side during xdp_buff initialization, which is what should have been done right from the start of XSK multi-buffer support. Fixes: 1bbc04de607b ("ice: xsk: add RX multi-buffer support") Fixes: 1c9ba9c14658 ("i40e: xsk: add RX multi-buffer support") Fixes: 24ea50127ecf ("xsk: support mbuf on ZC RX") Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-3-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit 269009893146c495f41e9572dd9319e787c2eba9 Author: Maciej Fijalkowski Date: Wed Jan 24 20:15:52 2024 +0100 xsk: recycle buffer in case Rx queue was full Add missing xsk_buff_free() call when __xsk_rcv_zc() failed to produce descriptor to XSK Rx queue. Fixes: 24ea50127ecf ("xsk: support mbuf on ZC RX") Acked-by: Magnus Karlsson Signed-off-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20240124191602.566724-2-maciej.fijalkowski@intel.com Signed-off-by: Alexei Starovoitov commit 8246601a7d391ce8207408149d65732f28af81a1 Author: Jisheng Zhang Date: Wed Dec 20 01:50:43 2023 +0800 riscv: tlb: fix __p*d_free_tlb() If non-leaf PTEs I.E pmd, pud or p4d is modified, a sfence.vma is a must for safe, imagine if an implementation caches the non-leaf translation in TLB, although I didn't meet this HW so far, but it's possible in theory. Signed-off-by: Jisheng Zhang Fixes: c5e9b2c2ae82 ("riscv: Improve tlb_flush()") Link: https://lore.kernel.org/r/20231219175046.2496-2-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 7f3d03c48b1eb6bc45ab20ca98b8b11be25f9f52 Author: Abhinav Kumar Date: Wed Jan 17 11:41:09 2024 -0800 drm/msm/dpu: check for valid hw_pp in dpu_encoder_helper_phys_cleanup The commit 8b45a26f2ba9 ("drm/msm/dpu: reserve cdm blocks for writeback in case of YUV output") introduced a smatch warning about another conditional block in dpu_encoder_helper_phys_cleanup() which had assumed hw_pp will always be valid which may not necessarily be true. Lets fix the other conditional block by making sure hw_pp is valid before dereferencing it. Reported-by: Dan Carpenter Fixes: ae4d721ce100 ("drm/msm/dpu: add an API to reset the encoder related hw blocks") Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/574878/ Link: https://lore.kernel.org/r/20240117194109.21609-1-quic_abhinavk@quicinc.com Signed-off-by: Abhinav Kumar commit 77be22473b28f0538d69d58f64d35091095688cd Merge: 0879020a7817e bdc6734115d7f Author: Jakub Kicinski Date: Wed Jan 24 15:12:55 2024 -0800 Merge branch 'fix-module_description-for-net-p2' Breno Leitao says: ==================== Fix MODULE_DESCRIPTION() for net (p2) There are hundreds of network modules that misses MODULE_DESCRIPTION(), causing a warnning when compiling with W=1. Example: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/com90io.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/arc-rimi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/com20020.o This part2 of the patchset focus on the drivers/net/ethernet drivers. There are still some missing warnings in drivers/net/ethernet that will be fixed in an upcoming patchset. v1: https://lore.kernel.org/all/20240122184543.2501493-2-leitao@debian.org/ ==================== Link: https://lore.kernel.org/r/20240123190332.677489-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit bdc6734115d7f66d8bea155454d4ce9259821660 Author: Breno Leitao Date: Tue Jan 23 11:03:31 2024 -0800 net: fill in MODULE_DESCRIPTION()s for rvu_mbox W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Marvel RVU mbox driver. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240123190332.677489-11-leitao@debian.org Signed-off-by: Jakub Kicinski commit 07d1e0ce874377a88c13bb56a336d6c544367837 Author: Breno Leitao Date: Tue Jan 23 11:03:30 2024 -0800 net: fill in MODULE_DESCRIPTION()s for litex W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the LiteX Liteeth Ethernet device. Signed-off-by: Breno Leitao Acked-by: Gabriel Somlo Link: https://lore.kernel.org/r/20240123190332.677489-10-leitao@debian.org Signed-off-by: Jakub Kicinski commit 8183c470c17602275ec1e3525d010f6c9cd383e9 Author: Breno Leitao Date: Tue Jan 23 11:03:29 2024 -0800 net: fill in MODULE_DESCRIPTION()s for fsl_pq_mdio W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Freescale PQ MDIO driver. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240123190332.677489-9-leitao@debian.org Signed-off-by: Jakub Kicinski commit 2e87576488552aab742391b6c442beedffd31abe Author: Breno Leitao Date: Tue Jan 23 11:03:28 2024 -0800 net: fill in MODULE_DESCRIPTION()s for fec W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the FEC (MPC8xx) Ethernet controller. Signed-off-by: Breno Leitao Reviewed-by: Wei Fang Link: https://lore.kernel.org/r/20240123190332.677489-8-leitao@debian.org Signed-off-by: Jakub Kicinski commit 07c42d237567d47225499d0586b9b90a432a7b58 Author: Breno Leitao Date: Tue Jan 23 11:03:27 2024 -0800 net: fill in MODULE_DESCRIPTION()s for enetc W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the NXP ENETC Ethernet driver. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240123190332.677489-7-leitao@debian.org Signed-off-by: Jakub Kicinski commit 27881ca8c8e1b6179ac41dc787cbfc3cb4362ff8 Author: Breno Leitao Date: Tue Jan 23 11:03:26 2024 -0800 net: fill in MODULE_DESCRIPTION()s for nps_enet W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the EZchip NPS ethernet driver. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240123190332.677489-6-leitao@debian.org Signed-off-by: Jakub Kicinski commit 53c83e2d36484f8df87792bb5368653bdb441014 Author: Breno Leitao Date: Tue Jan 23 11:03:25 2024 -0800 net: fill in MODULE_DESCRIPTION()s for ep93xxx_eth W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Cirrus EP93xx ethernet driver. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240123190332.677489-5-leitao@debian.org Signed-off-by: Jakub Kicinski commit bb567fbbbbb41d61b685e224098806a90df8cef2 Author: Breno Leitao Date: Tue Jan 23 11:03:24 2024 -0800 net: fill in MODULE_DESCRIPTION()s for liquidio W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Cavium Liquidio. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240123190332.677489-4-leitao@debian.org Signed-off-by: Jakub Kicinski commit 39535d7ff6c1e5bda0a3f3c87250bab63e910969 Author: Breno Leitao Date: Tue Jan 23 11:03:23 2024 -0800 net: fill in MODULE_DESCRIPTION()s for Broadcom bgmac W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Broadcom iProc GBit driver. Signed-off-by: Breno Leitao Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20240123190332.677489-3-leitao@debian.org Signed-off-by: Jakub Kicinski commit f5e414167be768b0373891d301478351f757ec65 Author: Breno Leitao Date: Tue Jan 23 11:03:22 2024 -0800 net: fill in MODULE_DESCRIPTION()s for 8390 W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to all the good old 8390 modules and drivers. Signed-off-by: Breno Leitao CC: geert@linux-m68k.org Link: https://lore.kernel.org/r/20240123190332.677489-2-leitao@debian.org Signed-off-by: Jakub Kicinski commit 0879020a7817e7ce636372c016b4528f541c9f4d Author: Jakub Kicinski Date: Mon Jan 22 22:05:29 2024 -0800 selftests: netdevsim: fix the udp_tunnel_nic test This test is missing a whole bunch of checks for interface renaming and one ifup. Presumably it was only used on a system with renaming disabled and NetworkManager running. Fixes: 91f430b2c49d ("selftests: net: add a test for UDP tunnel info infra") Acked-by: Paolo Abeni Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240123060529.1033912-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 096386a5bcf02e4053dc8b6cacb09a8493eeee4f Author: Kent Overstreet Date: Mon Jan 22 18:08:51 2024 -0500 bcachefs: discard path uses unlock_long() Some (bad) devices can have really terrible discard latency; we don't want them blocking memory reclaim and causing warnings. Signed-off-by: Kent Overstreet commit fcccdafd91f8bdde568b86ff70848cf83f029add Author: Kuogee Hsieh Date: Wed Jan 17 13:13:30 2024 -0800 drm/msm/dp: return correct Colorimetry for DP_TEST_DYNAMIC_RANGE_CEA case MSA MISC0 bit 1 to 7 contains Colorimetry Indicator Field. dp_link_get_colorimetry_config() returns wrong colorimetry value in the DP_TEST_DYNAMIC_RANGE_CEA case in the current implementation. Hence fix this problem by having dp_link_get_colorimetry_config() return defined CEA RGB colorimetry value in the case of DP_TEST_DYNAMIC_RANGE_CEA. Changes in V2: -- drop retrieving colorimetry from colorspace -- drop dr = link->dp_link.test_video.test_dyn_range assignment Changes in V3: -- move defined MISCr0a Colorimetry vale to dp_reg.h -- rewording commit title -- rewording commit text to more precise describe this patch Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/574888/ Link: https://lore.kernel.org/r/1705526010-597-1-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Abhinav Kumar commit 77e8aad5519e04f6c1e132aaec1c5f8faf41844f Author: Kuogee Hsieh Date: Wed Jan 10 12:18:51 2024 -0800 drm/msms/dp: fixed link clock divider bits be over written in BPC unknown case Since the value of DP_TEST_BIT_DEPTH_8 is already left shifted, in the BPC unknown case, the additional shift causes spill over to the other bits of the [DP_CONFIGURATION_CTRL] register. Fix this by changing the return value of dp_link_get_test_bits_depth() in the BPC unknown case to (DP_TEST_BIT_DEPTH_8 >> DP_TEST_BIT_DEPTH_SHIFT). Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support") Signed-off-by: Kuogee Hsieh Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/573989/ Link: https://lore.kernel.org/r/1704917931-30133-1-git-send-email-quic_khsieh@quicinc.com [quic_abhinavk@quicinc.com: fix minor checkpatch warning to align with opening braces] Signed-off-by: Abhinav Kumar commit 0719b5338a0cbe80d1637a5fb03d8141b5bfc7a1 Author: Jakub Kicinski Date: Mon Jan 22 11:58:15 2024 -0800 selftests: net: fix rps_default_mask with >32 CPUs If there is more than 32 cpus the bitmask will start to contain commas, leading to: ./rps_default_mask.sh: line 36: [: 00000000,00000000: integer expression expected Remove the commas, bash doesn't interpret leading zeroes as oct so that should be good enough. Switch to bash, Simon reports that not all shells support this type of substitution. Fixes: c12e0d5f267d ("self-tests: introduce self-tests for RPS default mask") Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240122195815.638997-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 1793ce9f205efe07ca2992ef129b86dab2c329f5 Author: Randy Dunlap Date: Sat Dec 30 22:08:23 2023 -0800 drm/msm/dpu: fix kernel-doc warnings Correct all kernel-doc warnings in dpu_encoder.c and dpu_rm.c: dpu_encoder.c:212: warning: Excess struct member 'crtc_kickoff_cb' description in 'dpu_encoder_virt' dpu_encoder.c:212: warning: Excess struct member 'crtc_kickoff_cb_data' description in 'dpu_encoder_virt' dpu_encoder.c:212: warning: Excess struct member 'debugfs_root' description in 'dpu_encoder_virt' dpu_rm.c:35: warning: Excess struct member 'hw_res' description in 'dpu_rm_requirements' dpu_rm.c:208: warning: No description found for return value of '_dpu_rm_get_lm_peer' Signed-off-by: Randy Dunlap Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Sean Paul Cc: Marijn Suijten Cc: linux-arm-msm@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Jonathan Corbet Cc: Vegard Nossum Reviewed-by: Paloma Arellano Reviewed-by: Dmitry Baryshkov Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312170641.5exlvQQx-lkp@intel.com/ Fixes: 62d35629da80 ("drm/msm/dpu: move encoder status to standard encoder debugfs dir") Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Patchwork: https://patchwork.freedesktop.org/patch/572962/ Link: https://lore.kernel.org/r/20231231060823.1934-1-rdunlap@infradead.org Signed-off-by: Abhinav Kumar commit cf10015a24f36a82370151a88cb8610c8779e927 Merge: 3eab830189d94 90383cc078951 Author: Linus Torvalds Date: Wed Jan 24 13:32:29 2024 -0800 Merge tag 'execve-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull execve fixes from Kees Cook: - Fix error handling in begin_new_exec() (Bernd Edlinger) - MAINTAINERS: specifically mention ELF (Alexey Dobriyan) - Various cleanups related to earlier open() (Askar Safin, Kees Cook) * tag 'execve-v6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: exec: Distinguish in_execve from in_exec exec: Fix error handling in begin_new_exec() exec: Add do_close_execat() helper exec: remove useless comment ELF, MAINTAINERS: specifically mention ELF commit 3eab830189d94f0f80f34cbff609b5bb54002679 Author: Linus Torvalds Date: Wed Jan 24 13:12:20 2024 -0800 uselib: remove use of __FMODE_EXEC Jann Horn points out that uselib() really shouldn't trigger the new FMODE_EXEC logic introduced by commit 4759ff71f23e ("exec: __FMODE_EXEC instead of in_execve for LSMs"). In fact, it shouldn't even have ever triggered the old pre-existing logic for __FMODE_EXEC (like the NFS code that makes executables not need read permissions). Unlike a real execve(), that can work even with files that are purely executable by the user (not readable), uselib() has that MAY_READ requirement becasue it's really just a convenience wrapper around mmap() for legacy shared libraries. The whole FMODE_EXEC bit was originally introduced by commit b500531e6f5f ("[PATCH] Introduce FMODE_EXEC file flag"), primarily to give ETXTBUSY error returns for distributed filesystems. It has since grown a few other warts (like that NFS thing), but there really isn't any reason to use it for uselib(), and now that we are trying to use it to replace the horrid 'tsk->in_execve' flag, it's actively wrong. Of course, as Jann Horn also points out, nobody should be enabling CONFIG_USELIB in the first place in this day and age, but that's a different discussion entirely. Reported-by: Jann Horn Fixes: 4759ff71f23e ("exec: __FMODE_EXEC instead of in_execve for LSMs") Cc: Kees Cook Signed-off-by: Linus Torvalds commit 1ed4b563100230ea68821a2b25a3d9f25388a3e6 Author: Mimi Zohar Date: Wed Jan 24 14:21:44 2024 -0500 Revert "KEYS: encrypted: Add check for strsep" This reverts commit b4af096b5df5dd131ab796c79cedc7069d8f4882. New encrypted keys are created either from kernel-generated random numbers or user-provided decrypted data. Revert the change requiring user-provided decrypted data. Reported-by: Vishal Verma Signed-off-by: Mimi Zohar commit 9f538b415db862e74b8c5d3abbccfc1b2b6caa38 Author: Jenishkumar Maheshbhai Patel Date: Thu Jan 18 19:59:14 2024 -0800 net: mvpp2: clear BM pool before initialization Register value persist after booting the kernel using kexec which results in kernel panic. Thus clear the BM pool registers before initialisation to fix the issue. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Jenishkumar Maheshbhai Patel Reviewed-by: Maxime Chevallier Link: https://lore.kernel.org/r/20240119035914.2595665-1-jpatel2@marvell.com Signed-off-by: Jakub Kicinski commit a5f5eee282a0aae80227697e1d9c811b1726d31d Author: Bernd Edlinger Date: Mon Jan 22 19:19:09 2024 +0100 net: stmmac: Wait a bit for the reset to take effect otherwise the synopsys_id value may be read out wrong, because the GMAC_VERSION register might still be in reset state, for at least 1 us after the reset is de-asserted. Add a wait for 10 us before continuing to be on the safe side. > From what have you got that delay value? Just try and error, with very old linux versions and old gcc versions the synopsys_id was read out correctly most of the time (but not always), with recent linux versions and recnet gcc versions it was read out wrongly most of the time, but again not always. I don't have access to the VHDL code in question, so I cannot tell why it takes so long to get the correct values, I also do not have more than a few hardware samples, so I cannot tell how long this timeout must be in worst case. Experimentally I can tell that the register is read several times as zero immediately after the reset is de-asserted, also adding several no-ops is not enough, adding a printk is enough, also udelay(1) seems to be enough but I tried that not very often, and I have not access to many hardware samples to be 100% sure about the necessary delay. And since the udelay here is only executed once per device instance, it seems acceptable to delay the boot for 10 us. BTW: my hardware's synopsys id is 0x37. Fixes: c5e4ddbdfa11 ("net: stmmac: Add support for optional reset control") Signed-off-by: Bernd Edlinger Reviewed-by: Jiri Pirko Reviewed-by: Serge Semin Link: https://lore.kernel.org/r/AS8P193MB1285A810BD78C111E7F6AA34E4752@AS8P193MB1285.EURP193.PROD.OUTLOOK.COM Signed-off-by: Jakub Kicinski commit 443b349019f2d9461b23213a4308f9cf72e41c5e Author: Linus Torvalds Date: Wed Jan 24 11:52:40 2024 -0800 samples/cgroup: add .gitignore file for generated samples Make 'git status' quietly happy again after a full allmodconfig build. Fixes: 60433a9d038d ("samples: introduce new samples subdir for cgroup") Signed-off-by: Linus Torvalds commit 90383cc07895183c75a0db2460301c2ffd912359 Author: Kees Cook Date: Wed Jan 24 11:15:33 2024 -0800 exec: Distinguish in_execve from in_exec Just to help distinguish the fs->in_exec flag from the current->in_execve flag, add comments in check_unsafe_exec() and copy_fs() for more context. Also note that in_execve is only used by TOMOYO now. Cc: Kentaro Takeda Cc: Tetsuo Handa Cc: Alexander Viro Cc: Christian Brauner Cc: Jan Kara Cc: Eric Biederman Cc: Andrew Morton Cc: Sebastian Andrzej Siewior Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Kees Cook commit 4759ff71f23e1a9cba001009abab68cde6dc327a Author: Kees Cook Date: Wed Jan 24 11:22:32 2024 -0800 exec: Check __FMODE_EXEC instead of in_execve for LSMs After commit 978ffcbf00d8 ("execve: open the executable file before doing anything else"), current->in_execve was no longer in sync with the open(). This broke AppArmor and TOMOYO which depend on this flag to distinguish "open" operations from being "exec" operations. Instead of moving around in_execve, switch to using __FMODE_EXEC, which is where the "is this an exec?" intent is stored. Note that TOMOYO still uses in_execve around cred handling. Reported-by: Kevin Locke Closes: https://lore.kernel.org/all/ZbE4qn9_h14OqADK@kevinlocke.name Suggested-by: Linus Torvalds Fixes: 978ffcbf00d8 ("execve: open the executable file before doing anything else") Cc: Josh Triplett Cc: John Johansen Cc: Paul Moore Cc: James Morris Cc: Serge E. Hallyn Cc: Kentaro Takeda Cc: Tetsuo Handa Cc: Alexander Viro Cc: Christian Brauner Cc: Jan Kara Cc: Eric Biederman Cc: Andrew Morton Cc: Sebastian Andrzej Siewior Cc: Cc: Cc: Cc: Signed-off-by: Kees Cook Signed-off-by: Linus Torvalds commit d0009effa8862c20a13af4cb7475d9771b905693 Author: Pablo Neira Ayuso Date: Tue Jan 23 16:38:25 2024 +0100 netfilter: nf_tables: validate NFPROTO_* family Several expressions explicitly refer to NF_INET_* hook definitions from expr->ops->validate, however, family is not validated. Bail out with EOPNOTSUPP in case they are used from unsupported families. Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Fixes: a3c90f7a2323 ("netfilter: nf_tables: flow offload expression") Fixes: 2fa841938c64 ("netfilter: nf_tables: introduce routing expression") Fixes: 554ced0a6e29 ("netfilter: nf_tables: add support for native socket matching") Fixes: ad49d86e07a4 ("netfilter: nf_tables: Add synproxy support") Fixes: 4ed8eb6570a4 ("netfilter: nf_tables: Add native tproxy support") Fixes: 6c47260250fc ("netfilter: nf_tables: add xfrm expression") Signed-off-by: Pablo Neira Ayuso commit f342de4e2f33e0e39165d8639387aa6c19dff660 Author: Florian Westphal Date: Sat Jan 20 22:50:04 2024 +0100 netfilter: nf_tables: reject QUEUE/DROP verdict parameters This reverts commit e0abdadcc6e1. core.c:nf_hook_slow assumes that the upper 16 bits of NF_DROP verdicts contain a valid errno, i.e. -EPERM, -EHOSTUNREACH or similar, or 0. Due to the reverted commit, its possible to provide a positive value, e.g. NF_ACCEPT (1), which results in use-after-free. Its not clear to me why this commit was made. NF_QUEUE is not used by nftables; "queue" rules in nftables will result in use of "nft_queue" expression. If we later need to allow specifiying errno values from userspace (do not know why), this has to call NF_DROP_GETERR and check that "err <= 0" holds true. Fixes: e0abdadcc6e1 ("netfilter: nf_tables: accept QUEUE/DROP verdict parameters") Cc: stable@vger.kernel.org Reported-by: Notselwyn Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b462579b2b86a8f5230543cadd3a4836be27baf7 Author: Florian Westphal Date: Fri Jan 19 13:34:32 2024 +0100 netfilter: nf_tables: restrict anonymous set and map names to 16 bytes nftables has two types of sets/maps, one where userspace defines the name, and anonymous sets/maps, where userspace defines a template name. For the latter, kernel requires presence of exactly one "%d". nftables uses "__set%d" and "__map%d" for this. The kernel will expand the format specifier and replaces it with the smallest unused number. As-is, userspace could define a template name that allows to move the set name past the 256 bytes upperlimit (post-expansion). I don't see how this could be a problem, but I would prefer if userspace cannot do this, so add a limit of 16 bytes for the '%d' template name. 16 bytes is the old total upper limit for set names that existed when nf_tables was merged initially. Fixes: 387454901bd6 ("netfilter: nf_tables: Allow set names of up to 255 chars") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c9d9eb9c53d37cdebbad56b91e40baf42d5a97aa Author: Florian Westphal Date: Fri Jan 19 13:11:32 2024 +0100 netfilter: nft_limit: reject configurations that cause integer overflow Reject bogus configs where internal token counter wraps around. This only occurs with very very large requests, such as 17gbyte/s. Its better to reject this rather than having incorrect ratelimit. Fixes: d2168e849ebf ("netfilter: nft_limit: add per-byte limiting") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 01acb2e8666a6529697141a6017edbf206921913 Author: Pablo Neira Ayuso Date: Thu Jan 18 10:56:26 2024 +0100 netfilter: nft_chain_filter: handle NETDEV_UNREGISTER for inet/ingress basechain Remove netdevice from inet/ingress basechain in case NETDEV_UNREGISTER event is reported, otherwise a stale reference to netdevice remains in the hook list. Fixes: 60a3815da702 ("netfilter: add inet ingress support") Cc: stable@vger.kernel.org Signed-off-by: Pablo Neira Ayuso commit b253d87fd78bf8d3e7efc5d149147765f044e89d Author: George Guo Date: Tue Dec 26 17:42:42 2023 +0800 netfilter: nf_tables: cleanup documentation - Correct comments for nlpid, family, udlen and udata in struct nft_table, and afinfo is no longer a member of enum nft_set_class. - Add comment for data in struct nft_set_elem. - Add comment for flags in struct nft_ctx. - Add comments for timeout in struct nft_set_iter, and flags is not a member of struct nft_set_iter, remove the comment for it. - Add comments for commit, abort, estimate and gc_init in struct nft_set_ops. - Add comments for pending_update, num_exprs, exprs and catchall_list in struct nft_set. - Add comment for ext_len in struct nft_set_ext_tmpl. - Add comment for inner_ops in struct nft_expr_type. - Add comments for clone, destroy_clone, reduce, gc, offload, offload_action, offload_stats in struct nft_expr_ops. - Add comments for blob_gen_0, blob_gen_1, bound, genmask, udlen, udata, blob_next in struct nft_chain. - Add comment for flags in struct nft_base_chain. - Add comments for udlen, udata in struct nft_object. - Add comment for type in struct nft_object_ops. - Add comment for hook_list in struct nft_flowtable, and remove comments for dev_name and ops which are not members of struct nft_flowtable. Signed-off-by: George Guo Signed-off-by: Pablo Neira Ayuso commit f9f4b0c6425eb9ffd9bf62b8b8143e786b6ba695 Author: Charles Keepax Date: Wed Jan 24 17:41:01 2024 +0000 spi: cs42l43: Handle error from devm_pm_runtime_enable As it devm_pm_runtime_enable can fail due to memory allocations, it is best to handle the error. Suggested-by: Andy Shevchenko Signed-off-by: Charles Keepax Link: https://msgid.link/r/20240124174101.2270249-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit e787644caf7628ad3269c1fbd321c3255cf51710 Author: Frederic Weisbecker Date: Tue Dec 19 00:19:15 2023 +0100 rcu: Defer RCU kthreads wakeup when CPU is dying When the CPU goes idle for the last time during the CPU down hotplug process, RCU reports a final quiescent state for the current CPU. If this quiescent state propagates up to the top, some tasks may then be woken up to complete the grace period: the main grace period kthread and/or the expedited main workqueue (or kworker). If those kthreads have a SCHED_FIFO policy, the wake up can indirectly arm the RT bandwith timer to the local offline CPU. Since this happens after hrtimers have been migrated at CPUHP_AP_HRTIMERS_DYING stage, the timer gets ignored. Therefore if the RCU kthreads are waiting for RT bandwidth to be available, they may never be actually scheduled. This triggers TREE03 rcutorture hangs: rcu: INFO: rcu_preempt self-detected stall on CPU rcu: 4-...!: (1 GPs behind) idle=9874/1/0x4000000000000000 softirq=0/0 fqs=20 rcuc=21071 jiffies(starved) rcu: (t=21035 jiffies g=938281 q=40787 ncpus=6) rcu: rcu_preempt kthread starved for 20964 jiffies! g938281 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 stack:14896 pid:14 tgid:14 ppid:2 flags:0x00004000 Call Trace: __schedule+0x2eb/0xa80 schedule+0x1f/0x90 schedule_timeout+0x163/0x270 ? __pfx_process_timeout+0x10/0x10 rcu_gp_fqs_loop+0x37c/0x5b0 ? __pfx_rcu_gp_kthread+0x10/0x10 rcu_gp_kthread+0x17c/0x200 kthread+0xde/0x110 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x2b/0x40 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1b/0x30 The situation can't be solved with just unpinning the timer. The hrtimer infrastructure and the nohz heuristics involved in finding the best remote target for an unpinned timer would then also need to handle enqueues from an offline CPU in the most horrendous way. So fix this on the RCU side instead and defer the wake up to an online CPU if it's too late for the local one. Reported-by: Paul E. McKenney Fixes: 5c0930ccaad5 ("hrtimers: Push pending hrtimers away from outgoing CPU earlier") Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 1110ebe058268b5425c69a23a99456f2331063bf Merge: 615d300648869 4b088005c897a Author: Linus Torvalds Date: Wed Jan 24 08:55:51 2024 -0800 Merge tag 'fbdev-for-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes and cleanups from Helge Deller: "A crash fix in stifb which was missed to be included in the drm-misc tree, two checks to prevent wrong userspace input in sisfb and savagefb and two trivial printk cleanups: - stifb: Fix crash in stifb_blank() - savage/sis: Error out if pixclock equals zero - minor trivial cleanups" * tag 'fbdev-for-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: stifb: Fix crash in stifb_blank() fbcon: Fix incorrect printed function name in fbcon_prepare_logo() fbdev: sis: Error out if pixclock equals zero fbdev: savage: Error out if pixclock equals zero fbdev: vt8500lcdfb: Remove unnecessary print function dev_err() commit b32431b753217d8d45b018443b1a7aac215921fb Author: Hans Verkuil Date: Fri Jan 19 10:03:23 2024 +0100 media: vb2: refactor setting flags and caps, fix missing cap Several functions implementing VIDIOC_REQBUFS and _CREATE_BUFS all use almost the same code to fill in the flags and capability fields. Refactor this into a new vb2_set_flags_and_caps() function that replaces the old fill_buf_caps() and validate_memory_flags() functions. This also fixes a bug where vb2_ioctl_create_bufs() would not set the V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS cap and also not fill in the max_num_buffers field. Fixes: d055a76c0065 ("media: core: Report the maximum possible number of buffers for the queue") Signed-off-by: Hans Verkuil Reviewed-by: Benjamin Gaignard Acked-by: Tomasz Figa commit 78e23c3e914a5e678a20286fb09bc218017af89a Author: Benjamin Gaignard Date: Thu Jan 18 13:14:52 2024 +0100 media: media videobuf2: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Fixes: d055a76c0065 ("media: core: Report the maximum possible number of buffers for the queue") Signed-off-by: Benjamin Gaignard Acked-by: Tomasz Figa Signed-off-by: Hans Verkuil commit c14d17a32568679385d32fe7a23994560c12772c Author: Brandon Brnich Date: Mon Dec 11 14:59:20 2023 -0600 media: chips-media: wave5: Remove K3 References Change compatible string to match dt bindings for TI devices. K3 family prefix should not be included as it deviates from naming convention. Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer") Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/all/CAMuHMdUYOq=q1j=d+Eac28hthOUAaNUkuvxmRu-mUN1pLKq69g@mail.gmail.com/ Signed-off-by: Brandon Brnich Reviewed-by: Nishanth Menon Signed-off-by: Hans Verkuil commit 520d9708979349dcf6e044eac51efc43788b5cec Author: Brandon Brnich Date: Mon Dec 11 14:59:19 2023 -0600 dt-bindings: media: Remove K3 Family Prefix from Compatible K3 family prefix is not included in other TI compatible strings. Remove this prefix to keep naming convention consistent. Fixes: de4b9f7e371a ("dt-bindings: media: wave5: add yaml devicetree bindings") Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/all/CAMuHMdUYOq=q1j=d+Eac28hthOUAaNUkuvxmRu-mUN1pLKq69g@mail.gmail.com/ Signed-off-by: Brandon Brnich Acked-by: Krzysztof Kozlowski Reviewed-by: Nishanth Menon Signed-off-by: Hans Verkuil commit d1b163aa0749706379055e40a52cf7a851abf9dc Author: Thomas Zimmermann Date: Tue Jan 23 13:09:26 2024 +0100 Revert "drivers/firmware: Move sysfb_init() from device_initcall to subsys_initcall_sync" This reverts commit 60aebc9559492cea6a9625f514a8041717e3a2e4. Commit 60aebc9559492cea ("drivers/firmware: Move sysfb_init() from device_initcall to subsys_initcall_sync") messes up initialization order of the graphics drivers and leads to blank displays on some systems. So revert the commit. To make the display drivers fully independent from initialization order requires to track framebuffer memory by device and independently from the loaded drivers. The kernel currently lacks the infrastructure to do so. Reported-by: Jaak Ristioja Closes: https://lore.kernel.org/dri-devel/ZUnNi3q3yB3zZfTl@P70.localdomain/T/#t Reported-by: Huacai Chen Closes: https://lore.kernel.org/dri-devel/20231108024613.2898921-1-chenhuacai@loongson.cn/ Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10133 Signed-off-by: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Thorsten Leemhuis Cc: Jani Nikula Cc: stable@vger.kernel.org # v6.5+ Reviewed-by: Javier Martinez Canillas Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240123120937.27736-1-tzimmermann@suse.de commit 668abe6dc7b61941fa5c724c06797efb0b87f070 Author: Takashi Iwai Date: Wed Jan 24 16:53:07 2024 +0100 ALSA: usb-audio: Sort quirk table entries The quirk table entries should be put in the USB ID order, but some entries have been put in random places. Re-sort them. Fixes: bf990c102319 ("ALSA: usb-audio: add quirk to fix Hamedal C20 disconnect issue") Fixes: fd28941cff1c ("ALSA: usb-audio: Add new quirk FIXED_RATE for JBL Quantum810 Wireless") Fixes: dfd5fe19db7d ("ALSA: usb-audio: Add FIXED_RATE quirk for JBL Quantum610 Wireless") Fixes: 4a63e68a2951 ("ALSA: usb-audio: Fix microphone sound on Nexigo webcam.") Fixes: 7822baa844a8 ("ALSA: usb-audio: add quirk for RODE NT-USB+") Fixes: 4fb7c24f69c4 ("ALSA: usb-audio: Add quirk for Fiero SC-01") Fixes: 2307a0e1ca0b ("ALSA: usb-audio: Add quirk for Fiero SC-01 (fw v1.0.0)") Link: https://lore.kernel.org/r/20240124155307.16996-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit e169bd4fb2b36c4b2bee63c35c740c85daeb2e86 Author: Maksim Kiselev Date: Wed Jan 24 10:24:36 2024 +0300 aoe: avoid potential deadlock at set_capacity Move set_capacity() outside of the section procected by (&d->lock). To avoid possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- [1] lock(&bdev->bd_size_lock); local_irq_disable(); [2] lock(&d->lock); [3] lock(&bdev->bd_size_lock); [4] lock(&d->lock); *** DEADLOCK *** Where [1](&bdev->bd_size_lock) hold by zram_add()->set_capacity(). [2]lock(&d->lock) hold by aoeblk_gdalloc(). And aoeblk_gdalloc() is trying to acquire [3](&bdev->bd_size_lock) at set_capacity() call. In this situation an attempt to acquire [4]lock(&d->lock) from aoecmd_cfg_rsp() will lead to deadlock. So the simplest solution is breaking lock dependency [2](&d->lock) -> [3](&bdev->bd_size_lock) by moving set_capacity() outside. Signed-off-by: Maksim Kiselev Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240124072436.3745720-2-bigunclemax@gmail.com Signed-off-by: Jens Axboe commit 15ade5bfa5abf0e02249239db91d5438fa796d18 Author: Israel Rukshin Date: Wed Jan 24 12:16:27 2024 +0000 nvme-rdma: Fix transfer length when write_generate/read_verify are 0 When the block layer doesn't generate/verify metadata, the SG length is smaller than the transfer length. This is because the SG length doesn't include the metadata length that is added by the HW on the wire. The target failes those commands with "Data SGL Length Invalid" by comparing the transfer length and the SG length. Fix it by adding the metadata length to the transfer length when there is no metadata SGL. The bug reproduces when setting read_verify/write_generate configs to 0 at the child multipath device or at the primary device when NVMe multipath is disabled. Note that setting those configs to 0 on the multipath device (ns_head) doesn't have any impact on the I/Os. Fixes: 5ec5d3bddc6b ("nvme-rdma: add metadata/T10-PI support") Signed-off-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 7822baa844a87cbb93308c1032c3d47d4079bb8a Author: Sean Young Date: Wed Jan 24 15:15:24 2024 +0000 ALSA: usb-audio: add quirk for RODE NT-USB+ The RODE NT-USB+ is marketed as a professional usb microphone, however the usb audio interface is a mess: [ 1.130977] usb 1-5: new full-speed USB device number 2 using xhci_hcd [ 1.503906] usb 1-5: config 1 has an invalid interface number: 5 but max is 4 [ 1.503912] usb 1-5: config 1 has no interface number 4 [ 1.519689] usb 1-5: New USB device found, idVendor=19f7, idProduct=0035, bcdDevice= 1.09 [ 1.519695] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1.519697] usb 1-5: Product: RØDE NT-USB+ [ 1.519699] usb 1-5: Manufacturer: RØDE [ 1.519700] usb 1-5: SerialNumber: 1D773A1A [ 8.327495] usb 1-5: 1:1: cannot get freq at ep 0x82 [ 8.344500] usb 1-5: 1:2: cannot get freq at ep 0x82 [ 8.365499] usb 1-5: 2:1: cannot get freq at ep 0x2 Add QUIRK_FLAG_GET_SAMPLE_RATE to work around the broken sample rate get. I have asked Rode support to fix it, but they show no interest. Signed-off-by: Sean Young Cc: Link: https://lore.kernel.org/r/20240124151524.23314-1-sean@mess.org Signed-off-by: Takashi Iwai commit 41951f83ef9044e906e11f5ea7db35a30dc9f581 Author: Chaitanya Kulkarni Date: Tue Jan 23 14:13:41 2024 -0800 nvmet: add module description to stop warnings Add MODULE_DESCRIPTION() in order to remove warnings & get clean build:- WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/target/nvmet.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/target/nvme-loop.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/target/nvmet-rdma.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/target/nvmet-fc.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/target/nvme-fcloop.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/target/nvmet-tcp.o Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 92b0b0ff0ba32e7b3f1e789cc96df1359db712ef Author: Chaitanya Kulkarni Date: Tue Jan 23 14:13:40 2024 -0800 nvme: add module description to stop warnings Add MODULE_DESCRIPTION() in order to remove warnings & get clean build:- WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/host/nvme-core.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/host/nvme.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/host/nvme-fabrics.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/host/nvme-rdma.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/host/nvme-fc.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/nvme/host/nvme-tcp.o Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 2f8c7c3715f2c6fb51a4ecc0905c04dd78a3da29 Author: Mark Brown Date: Wed Jan 24 13:24:24 2024 +0000 spi: Raise limit on number of chip selects As reported by Guenter the limit we've got on the number of chip selects is set too low for some systems, raise the limit. We should really remove the hard coded limit but this is needed as a fix so let's do the simple thing and raise the limit for now. Fixes: 4d8ff6b0991d ("spi: Add multi-cs memories support in SPI core") Reported-by: Guenter Roeck Suggested-by: Guenter Roeck Signed-off-by: Mark Brown Link: https://msgid.link/r/20240124-spi-multi-cs-max-v2-1-df6fc5ab1abc@kernel.org Signed-off-by: Mark Brown commit edcf9725150e42beeca42d085149f4c88fa97afd Author: NeilBrown Date: Mon Jan 22 14:58:16 2024 +1100 nfsd: fix RELEASE_LOCKOWNER The test on so_count in nfsd4_release_lockowner() is nonsense and harmful. Revert to using check_for_locks(), changing that to not sleep. First: harmful. As is documented in the kdoc comment for nfsd4_release_lockowner(), the test on so_count can transiently return a false positive resulting in a return of NFS4ERR_LOCKS_HELD when in fact no locks are held. This is clearly a protocol violation and with the Linux NFS client it can cause incorrect behaviour. If RELEASE_LOCKOWNER is sent while some other thread is still processing a LOCK request which failed because, at the time that request was received, the given owner held a conflicting lock, then the nfsd thread processing that LOCK request can hold a reference (conflock) to the lock owner that causes nfsd4_release_lockowner() to return an incorrect error. The Linux NFS client ignores that NFS4ERR_LOCKS_HELD error because it never sends NFS4_RELEASE_LOCKOWNER without first releasing any locks, so it knows that the error is impossible. It assumes the lock owner was in fact released so it feels free to use the same lock owner identifier in some later locking request. When it does reuse a lock owner identifier for which a previous RELEASE failed, it will naturally use a lock_seqid of zero. However the server, which didn't release the lock owner, will expect a larger lock_seqid and so will respond with NFS4ERR_BAD_SEQID. So clearly it is harmful to allow a false positive, which testing so_count allows. The test is nonsense because ... well... it doesn't mean anything. so_count is the sum of three different counts. 1/ the set of states listed on so_stateids 2/ the set of active vfs locks owned by any of those states 3/ various transient counts such as for conflicting locks. When it is tested against '2' it is clear that one of these is the transient reference obtained by find_lockowner_str_locked(). It is not clear what the other one is expected to be. In practice, the count is often 2 because there is precisely one state on so_stateids. If there were more, this would fail. In my testing I see two circumstances when RELEASE_LOCKOWNER is called. In one case, CLOSE is called before RELEASE_LOCKOWNER. That results in all the lock states being removed, and so the lockowner being discarded (it is removed when there are no more references which usually happens when the lock state is discarded). When nfsd4_release_lockowner() finds that the lock owner doesn't exist, it returns success. The other case shows an so_count of '2' and precisely one state listed in so_stateid. It appears that the Linux client uses a separate lock owner for each file resulting in one lock state per lock owner, so this test on '2' is safe. For another client it might not be safe. So this patch changes check_for_locks() to use the (newish) find_any_file_locked() so that it doesn't take a reference on the nfs4_file and so never calls nfsd_file_put(), and so never sleeps. With this check is it safe to restore the use of check_for_locks() rather than testing so_count against the mysterious '2'. Fixes: ce3c4ad7f4ce ("NFSD: Fix possible sleep during nfsd4_release_lockowner()") Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Cc: stable@vger.kernel.org # v6.2+ Signed-off-by: Chuck Lever commit d915a6850e27efb383cd4400caadfe47792623df Author: Alexander Tsoy Date: Wed Jan 24 16:02:39 2024 +0300 ALSA: usb-audio: Add delay quirk for MOTU M Series 2nd revision Audio control requests that sets sampling frequency sometimes fail on this card. Adding delay between control messages eliminates that problem. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217601 Cc: Signed-off-by: Alexander Tsoy Link: https://lore.kernel.org/r/20240124130239.358298-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit d62ccb59afcd94e8d301433974672b156392289d Author: Li RongQing Date: Wed Jan 24 20:08:34 2024 +0800 ALSA: virtio: remove duplicate check if queue is broken virtqueue_enable_cb() will call virtqueue_poll() which will check if queue is broken at beginning, so remove the virtqueue_is_broken() call Signed-off-by: Li RongQing Reviewed-by: Stefan Hajnoczi Link: https://lore.kernel.org/r/20240124120834.49410-1-lirongqing@baidu.com Signed-off-by: Takashi Iwai commit 7c4298534ce3c4b85099aba53442ec82ef17578b Author: Jacob Siverskog Date: Wed Jan 24 11:18:24 2024 +0100 ALSA: usb-audio: fix typo fix typo in midi fallback log. Signed-off-by: Jacob Siverskog Fixes: ff49d1df79ae ("ALSA: usb-audio: USB MIDI 2.0 UMP support") Link: https://lore.kernel.org/r/20240124101827.35433-1-jacob@teenage.engineering Signed-off-by: Takashi Iwai commit fcfc9f711d1e2fc7876ac12b1b16c509404b9625 Author: Kailang Yang Date: Wed Jan 24 14:21:47 2024 +0800 ALSA: hda/realtek - Add speaker pin verbtable for Dell dual speaker platform SSID 0x0c0d platform. It can't mute speaker when HP plugged. This patch add quirk to fill speaker pin verbtable. And disable speaker passthrough. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/38b82976a875451d833d514cee34ff6a@realtek.com Signed-off-by: Takashi Iwai commit b184c8c2889ceef0a137c7d0567ef9fe3d92276e Author: Dawei Li Date: Mon Jan 22 16:57:15 2024 +0800 genirq: Initialize resend_node hlist for all interrupt descriptors For a CONFIG_SPARSE_IRQ=n kernel, early_irq_init() is supposed to initialize all interrupt descriptors. It does except for irq_desc::resend_node, which ia only initialized for the first descriptor. Use the indexed decriptor and not the base pointer to address that. Fixes: bc06a9e08742 ("genirq: Use hlist for managing resend handlers") Signed-off-by: Dawei Li Signed-off-by: Thomas Gleixner Acked-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240122085716.2999875-5-dawei.li@shingroup.cn commit 56062d60f117dccfb5281869e0ab61e090baf864 Author: Richard Palethorpe Date: Wed Jan 10 15:01:22 2024 +0200 x86/entry/ia32: Ensure s32 is sign extended to s64 Presently ia32 registers stored in ptregs are unconditionally cast to unsigned int by the ia32 stub. They are then cast to long when passed to __se_sys*, but will not be sign extended. This takes the sign of the syscall argument into account in the ia32 stub. It still casts to unsigned int to avoid implementation specific behavior. However then casts to int or unsigned int as necessary. So that the following cast to long sign extends the value. This fixes the io_pgetevents02 LTP test when compiled with -m32. Presently the systemcall io_pgetevents_time64() unexpectedly accepts -1 for the maximum number of events. It doesn't appear other systemcalls with signed arguments are effected because they all have compat variants defined and wired up. Fixes: ebeb8c82ffaf ("syscalls/x86: Use 'struct pt_regs' based syscall calling for IA32_EMULATION and x32") Suggested-by: Arnd Bergmann Signed-off-by: Richard Palethorpe Signed-off-by: Nikolay Borisov Signed-off-by: Thomas Gleixner Reviewed-by: Arnd Bergmann Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240110130122.3836513-1-nik.borisov@suse.com Link: https://lore.kernel.org/ltp/20210921130127.24131-1-rpalethorpe@suse.com/ commit 9e3a13f3eef6b14a26cc2660ca2f43f0e46b4318 Author: Lucas De Marchi Date: Mon Jan 22 19:12:42 2024 -0800 drm/xe: Remove PVC from xe_wa kunit tests Since the PCI IDs for PVC weren't added to the xe driver, the xe_wa tests should not try to create a fake PVC device since they can't find the right PCI ID. Fix bugs when running kunit: # xe_wa_gt: ASSERTION FAILED at drivers/gpu/drm/xe/tests/xe_wa_test.c:111 Expected ret == 0, but ret == -19 (0xffffffffffffffed) [FAILED] PVC (B0) # xe_wa_gt: ASSERTION FAILED at drivers/gpu/drm/xe/tests/xe_wa_test.c:111 Expected ret == 0, but ret == -19 (0xffffffffffffffed) [FAILED] PVC (B1) # xe_wa_gt: ASSERTION FAILED at drivers/gpu/drm/xe/tests/xe_wa_test.c:111 Expected ret == 0, but ret == -19 (0xffffffffffffffed) [FAILED] PVC (C0) Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240123031242.3548724-1-lucas.demarchi@intel.com (cherry picked from commit ab5ae65fb25d06c38a6617a628b964828adb4786) Signed-off-by: Thomas Hellström commit d186e51b0ed05a0cd94c7c9756740a855325c557 Author: Moti Haimovski Date: Mon Jan 22 12:24:24 2024 +0200 drm/xe/vm: bugfix in xe_vm_create_ioctl Fix xe_vm_create_ioctl routine not freeing the vm-id allocated to it when the function fails. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Moti Haimovski Reviewed-by: Matthew Brost Reviewed-by: Tomer Tayar Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240122102424.4008095-1-mhaimovski@habana.ai (cherry picked from commit f6bf0424cadc27d7cf6a049d2db960e4b52fa513) Signed-off-by: Thomas Hellström commit c0e2508cb1004fdb153fbbcf0101404abfefdddd Author: Himal Prasad Ghimiray Date: Fri Jan 19 09:48:26 2024 +0530 drm/xe/xe2: Use XE_CACHE_WB pat index The pat table entry associated with XE_CACHE_WB is coherent whereas XE_CACHE_NONE is non coherent. Migration expects the coherency with cpu therefore use the coherent entry XE_CACHE_WB for buffers not supporting compression. For read/write to flat ccs region the issue is not related to coherency with cpu. The hardware expects the pat index associated with GPUVA for indirect access to be compression enabled hence use XE_CACHE_NONE_COMPRESSION. v2 - Fix the argument to emit_pte, pass the bool directly. (Thomas) v3 - Rebase - Update commit message (Matt) v4 - Add a Fixes: tag. (Thomas) Cc: Matt Roper Cc: Thomas Hellström Fixes: 65ef8dbad1db ("drm/xe/xe2: Update emit_pte to use compression enabled PAT index") Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström Signed-off-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20240119041826.1670496-1-himal.prasad.ghimiray@intel.com (cherry picked from commit 6a02867560f77328ae5637b70b06704b140aafa6) Signed-off-by: Thomas Hellström commit 981460d8ee6042b14149fd8931ae27b91f2146b1 Author: Lucas De Marchi Date: Thu Jan 18 16:16:10 2024 -0800 drm/xe/display: Avoid calling readq() readq() is not available in 32bits and i915_gem_object_read_from_page() is supposed to allow reading arbitrary sizes determined by the `size` argument. Currently the only caller only passes a size == 8 so the second problem is not that big. Migrate to calling memcpy()/memcpy_fromio() to allow possible changes in the display side and to fix the build on 32b architectures. v2: Use memcpy/memcpy_fromio directly rather than using iosys-map with the same size == 8 bytes restriction (Matt Roper) Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240119001612.2991381-4-lucas.demarchi@intel.com (cherry picked from commit 406663f777bee53e9ad93dc080c333d4655ab7de) Signed-off-by: Thomas Hellström commit 52e8948c6b6a41603371996b9bc0e43e17d690b4 Author: Lucas De Marchi Date: Thu Jan 18 16:16:09 2024 -0800 drm/xe/mmio: Cast to u64 when printing resource_size_t uses %pa format in printk since the size varies depending on build options. However to keep the io_size/physical_size addition in the same call we can't pass the address without adding yet another variable in these function. Simply cast it to u64 and keep using %llx. Fixes: 286089ce6929 ("drm/xe: Improve vram info debug printing") Cc: Oak Zeng Cc: Michael J. Ruhl Cc: Matthew Brost Cc: Rodrigo Vivi Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240119001612.2991381-3-lucas.demarchi@intel.com (cherry picked from commit 6d8d038364d8ec573e9dc0872e17bee1e5f12490) Signed-off-by: Thomas Hellström commit 32f6c3325703c98edee8f1005ad47b4d8431b758 Author: Lucas De Marchi Date: Thu Jan 18 16:16:08 2024 -0800 drm/xe: Use _ULL for u64 division Use DIV_ROUND_UP_ULL() so it also works on 32bit build. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240119001612.2991381-2-lucas.demarchi@intel.com (cherry picked from commit 7b5bdb447b14930b9ef3e39bd301937889c60c96) Signed-off-by: Thomas Hellström commit 03b72dbbd4e96d0197aa8cf894a24a4db8623031 Author: Thomas Hellström Date: Wed Jan 17 14:40:48 2024 +0100 drm/xe: Use a NULL pointer instead of 0. The last argument of xe_pcode_read() is a pointer. Use NULL instead of 0. Fixes: 92d44a422d0d ("drm/xe/hwmon: Expose card reactive critical power") Cc: Rodrigo Vivi Signed-off-by: Thomas Hellström Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240117134048.165425-6-thomas.hellstrom@linux.intel.com (cherry picked from commit 79f8eacbdf9dad7ead39b3319e31e12d4dc6529e) Signed-off-by: Thomas Hellström commit 3213b8070ac69b32f05fa2328cbebe0eca75c1bd Author: Thomas Hellström Date: Wed Jan 17 14:40:44 2024 +0100 drm/xe/dmabuf: Make xe_dmabuf_ops static It is not referenced outside of the xe_dma_buf.c source file. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Rodrigo Vivi Cc: Matthew Brost Signed-off-by: Thomas Hellström Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20240117134048.165425-2-thomas.hellstrom@linux.intel.com (cherry picked from commit e2dc52f849f8694bdabb75127164c9df622af459) Signed-off-by: Thomas Hellström commit aef855df7e1bbd5aa4484851561211500b22707e Author: Dinghao Liu Date: Tue Nov 28 17:29:01 2023 +0800 net/mlx5e: fix a potential double-free in fs_any_create_groups When kcalloc() for ft->g succeeds but kvzalloc() for in fails, fs_any_create_groups() will free ft->g. However, its caller fs_any_create_table() will free ft->g again through calling mlx5e_destroy_flow_table(), which will lead to a double-free. Fix this by setting ft->g to NULL in fs_any_create_groups(). Fixes: 0f575c20bf06 ("net/mlx5e: Introduce Flow Steering ANY API") Signed-off-by: Dinghao Liu Reviewed-by: Tariq Toukan Reviewed-by: Simon Horman Signed-off-by: Saeed Mahameed commit 3c6d5189246f590e4e1f167991558bdb72a4738b Author: Zhipeng Lu Date: Wed Jan 17 15:17:36 2024 +0800 net/mlx5e: fix a double-free in arfs_create_groups When `in` allocated by kvzalloc fails, arfs_create_groups will free ft->g and return an error. However, arfs_create_table, the only caller of arfs_create_groups, will hold this error and call to mlx5e_destroy_flow_table, in which the ft->g will be freed again. Fixes: 1cabe6b0965e ("net/mlx5e: Create aRFS flow tables") Signed-off-by: Zhipeng Lu Reviewed-by: Simon Horman Signed-off-by: Saeed Mahameed commit 315a597f9bcfe7fe9980985031413457bee95510 Author: Leon Romanovsky Date: Sun Nov 26 11:08:10 2023 +0200 net/mlx5e: Ignore IPsec replay window values on sender side XFRM stack doesn't prevent from users to configure replay window in TX side and strongswan sets replay_window to be 1. It causes to failures in validation logic when trying to offload the SA. Replay window is not relevant in TX side and should be ignored. Fixes: cded6d80129b ("net/mlx5e: Store replay window in XFRM attributes") Signed-off-by: Aya Levin Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 20f5468a7988dedd94a57ba8acd65ebda6a59723 Author: Leon Romanovsky Date: Tue Dec 12 13:52:55 2023 +0200 net/mlx5e: Allow software parsing when IPsec crypto is enabled All ConnectX devices have software parsing capability enabled, but it is more correct to set allow_swp only if capability exists, which for IPsec means that crypto offload is supported. Fixes: 2451da081a34 ("net/mlx5: Unify device IPsec capabilities check") Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 20cbf8cbb827094197f3b17db60d71449415db1e Author: Rahul Rameshbabu Date: Tue Nov 28 14:01:54 2023 -0800 net/mlx5: Use mlx5 device constant for selecting CQ period mode for ASO mlx5 devices have specific constants for choosing the CQ period mode. These constants do not have to match the constants used by the kernel software API for DIM period mode selection. Fixes: cdd04f4d4d71 ("net/mlx5: Add support to create SQ and CQ for ASO") Signed-off-by: Rahul Rameshbabu Reviewed-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit 5b2a2523eeea5f03d39a9d1ff1bad2e9f8eb98d2 Author: Yevgeny Kliteynik Date: Sun Dec 17 13:20:36 2023 +0200 net/mlx5: DR, Can't go to uplink vport on RX rule Go-To-Vport action on RX is not allowed when the vport is uplink. In such case, the packet should be dropped. Fixes: 9db810ed2d37 ("net/mlx5: DR, Expose steering action functionality") Signed-off-by: Yevgeny Kliteynik Reviewed-by: Erez Shitrit Signed-off-by: Saeed Mahameed commit 5665954293f13642f9c052ead83c1e9d8cff186f Author: Yevgeny Kliteynik Date: Sun Dec 17 11:24:08 2023 +0200 net/mlx5: DR, Use the right GVMI number for drop action When FW provides ICM addresses for drop RX/TX, the provided capability is 64 bits that contain its GVMI as well as the ICM address itself. In case of TX DROP this GVMI is different from the GVMI that the domain is operating on. This patch fixes the action to use these GVMI IDs, as provided by FW. Fixes: 9db810ed2d37 ("net/mlx5: DR, Expose steering action functionality") Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit ec7cc38ef9f83553102e84c82536971a81630739 Author: Moshe Shemesh Date: Sat Dec 30 22:40:37 2023 +0200 net/mlx5: Bridge, fix multicast packets sent to uplink To enable multicast packets which are offloaded in bridge multicast offload mode to be sent also to uplink, FTE bit uplink_hairpin_en should be set. Add this bit to FTE for the bridge multicast offload rules. Fixes: 18c2916cee12 ("net/mlx5: Bridge, snoop igmp/mld packets") Signed-off-by: Moshe Shemesh Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit cc8091587779cfaddb6b29c9e9edb9079a282cad Author: Yishai Hadas Date: Sun Dec 31 15:19:50 2023 +0200 net/mlx5: Fix a WARN upon a callback command failure The below WARN [1] is reported once a callback command failed. As a callback runs under an interrupt context, needs to use the IRQ save/restore variant. [1] DEBUG_LOCKS_WARN_ON(lockdep_hardirq_context()) WARNING: CPU: 15 PID: 0 at kernel/locking/lockdep.c:4353 lockdep_hardirqs_on_prepare+0x11b/0x180 Modules linked in: vhost_net vhost tap mlx5_vfio_pci vfio_pci vfio_pci_core vfio_iommu_type1 vfio mlx5_vdpa vringh vhost_iotlb vdpa nfnetlink_cttimeout openvswitch nsh ip6table_mangle ip6table_nat ip6table_filter ip6_tables iptable_mangle xt_conntrackxt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_umad ib_ipoib ib_cm mlx5_ib ib_uverbs ib_core fuse mlx5_core CPU: 15 PID: 0 Comm: swapper/15 Tainted: G W 6.7.0-rc4+ #1587 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:lockdep_hardirqs_on_prepare+0x11b/0x180 Code: 00 5b c3 c3 e8 e6 0d 58 00 85 c0 74 d6 8b 15 f0 c3 76 01 85 d2 75 cc 48 c7 c6 04 a5 3b 82 48 c7 c7 f1 e9 39 82 e8 95 12 f9 ff <0f> 0b 5b c3 e8 bc 0d 58 00 85 c0 74 ac 8b 3d c6 c3 76 01 85 ff 75 RSP: 0018:ffffc900003ecd18 EFLAGS: 00010086 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000027 RDX: 0000000000000000 RSI: ffff88885fbdb880 RDI: ffff88885fbdb888 RBP: 00000000ffffff87 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000000 R11: 284e4f5f4e524157 R12: 00000000002c9aa1 R13: ffff88810aace980 R14: ffff88810aace9b8 R15: 0000000000000003 FS: 0000000000000000(0000) GS:ffff88885fbc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f731436f4c8 CR3: 000000010aae6001 CR4: 0000000000372eb0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? __warn+0x81/0x170 ? lockdep_hardirqs_on_prepare+0x11b/0x180 ? report_bug+0xf8/0x1c0 ? handle_bug+0x3f/0x70 ? exc_invalid_op+0x13/0x60 ? asm_exc_invalid_op+0x16/0x20 ? lockdep_hardirqs_on_prepare+0x11b/0x180 ? lockdep_hardirqs_on_prepare+0x11b/0x180 trace_hardirqs_on+0x4a/0xa0 raw_spin_unlock_irq+0x24/0x30 cmd_status_err+0xc0/0x1a0 [mlx5_core] cmd_status_err+0x1a0/0x1a0 [mlx5_core] mlx5_cmd_exec_cb_handler+0x24/0x40 [mlx5_core] mlx5_cmd_comp_handler+0x129/0x4b0 [mlx5_core] cmd_comp_notifier+0x1a/0x20 [mlx5_core] notifier_call_chain+0x3e/0xe0 atomic_notifier_call_chain+0x5f/0x130 mlx5_eq_async_int+0xe7/0x200 [mlx5_core] notifier_call_chain+0x3e/0xe0 atomic_notifier_call_chain+0x5f/0x130 irq_int_handler+0x11/0x20 [mlx5_core] __handle_irq_event_percpu+0x99/0x220 ? tick_irq_enter+0x5d/0x80 handle_irq_event_percpu+0xf/0x40 handle_irq_event+0x3a/0x60 handle_edge_irq+0xa2/0x1c0 __common_interrupt+0x55/0x140 common_interrupt+0x7d/0xa0 asm_common_interrupt+0x22/0x40 RIP: 0010:default_idle+0x13/0x20 Code: c0 08 00 00 00 4d 29 c8 4c 01 c7 4c 29 c2 e9 72 ff ff ff cc cc cc cc 8b 05 ea 08 25 01 85 c0 7e 07 0f 00 2d 7f b0 26 00 fb f4 c3 90 66 2e 0f 1f 84 00 00 00 00 00 65 48 8b 04 25 80 d0 02 00 RSP: 0018:ffffc9000010fec8 EFLAGS: 00000242 RAX: 0000000000000001 RBX: 000000000000000f RCX: 4000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff811c410c RBP: ffffffff829478c0 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ? do_idle+0x1ec/0x210 default_idle_call+0x6c/0x90 do_idle+0x1ec/0x210 cpu_startup_entry+0x26/0x30 start_secondary+0x11b/0x150 secondary_startup_64_no_verify+0x165/0x16b irq event stamp: 833284 hardirqs last enabled at (833283): [] do_idle+0x1ec/0x210 hardirqs last disabled at (833284): [] common_interrupt+0xf/0xa0 softirqs last enabled at (833224): [] __do_softirq+0x2bf/0x40e softirqs last disabled at (833177): [] irq_exit_rcu+0x7f/0xa0 Fixes: 34f46ae0d4b3 ("net/mlx5: Add command failures data to debugfs") Signed-off-by: Yishai Hadas Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit d76fdd31f953ac5046555171620f2562715e9b71 Author: Vlad Buslov Date: Fri Nov 10 11:10:22 2023 +0100 net/mlx5e: Fix peer flow lists handling The cited change refactored mlx5e_tc_del_fdb_peer_flow() to only clear DUP flag when list of peer flows has become empty. However, if any concurrent user holds a reference to a peer flow (for example, the neighbor update workqueue task is updating peer flow's parent encap entry concurrently), then the flow will not be removed from the peer list and, consecutively, DUP flag will remain set. Since mlx5e_tc_del_fdb_peers_flow() calls mlx5e_tc_del_fdb_peer_flow() for every possible peer index the algorithm will try to remove the flow from eswitch instances that it has never peered with causing either NULL pointer dereference when trying to remove the flow peer list head of peer_index that was never initialized or a warning if the list debug config is enabled[0]. Fix the issue by always removing the peer flow from the list even when not releasing the last reference to it. [0]: [ 3102.985806] ------------[ cut here ]------------ [ 3102.986223] list_del corruption, ffff888139110698->next is NULL [ 3102.986757] WARNING: CPU: 2 PID: 22109 at lib/list_debug.c:53 __list_del_entry_valid_or_report+0x4f/0xc0 [ 3102.987561] Modules linked in: act_ct nf_flow_table bonding act_tunnel_key act_mirred act_skbedit vxlan cls_matchall nfnetlink_cttimeout act_gact cls_flower sch_ingress mlx5_vdpa vringh vhost_iotlb vdpa openvswitch nsh xt_MASQUERADE nf_conntrack_netlink nfnetlink iptable_nat xt_addrtype xt_conntrack nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcg ss oid_registry overlay rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib iw_cm ib_cm mlx5_ib ib_uverbs ib_core mlx5_core [last unloaded: bonding] [ 3102.991113] CPU: 2 PID: 22109 Comm: revalidator28 Not tainted 6.6.0-rc6+ #3 [ 3102.991695] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 3102.992605] RIP: 0010:__list_del_entry_valid_or_report+0x4f/0xc0 [ 3102.993122] Code: 39 c2 74 56 48 8b 32 48 39 fe 75 62 48 8b 51 08 48 39 f2 75 73 b8 01 00 00 00 c3 48 89 fe 48 c7 c7 48 fd 0a 82 e8 41 0b ad ff <0f> 0b 31 c0 c3 48 89 fe 48 c7 c7 70 fd 0a 82 e8 2d 0b ad ff 0f 0b [ 3102.994615] RSP: 0018:ffff8881383e7710 EFLAGS: 00010286 [ 3102.995078] RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000 [ 3102.995670] RDX: 0000000000000001 RSI: ffff88885f89b640 RDI: ffff88885f89b640 [ 3102.997188] DEL flow 00000000be367878 on port 0 [ 3102.998594] RBP: dead000000000122 R08: 0000000000000000 R09: c0000000ffffdfff [ 3102.999604] R10: 0000000000000008 R11: ffff8881383e7598 R12: dead000000000100 [ 3103.000198] R13: 0000000000000002 R14: ffff888139110000 R15: ffff888101901240 [ 3103.000790] FS: 00007f424cde4700(0000) GS:ffff88885f880000(0000) knlGS:0000000000000000 [ 3103.001486] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3103.001986] CR2: 00007fd42e8dcb70 CR3: 000000011e68a003 CR4: 0000000000370ea0 [ 3103.002596] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3103.003190] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3103.003787] Call Trace: [ 3103.004055] [ 3103.004297] ? __warn+0x7d/0x130 [ 3103.004623] ? __list_del_entry_valid_or_report+0x4f/0xc0 [ 3103.005094] ? report_bug+0xf1/0x1c0 [ 3103.005439] ? console_unlock+0x4a/0xd0 [ 3103.005806] ? handle_bug+0x3f/0x70 [ 3103.006149] ? exc_invalid_op+0x13/0x60 [ 3103.006531] ? asm_exc_invalid_op+0x16/0x20 [ 3103.007430] ? __list_del_entry_valid_or_report+0x4f/0xc0 [ 3103.007910] mlx5e_tc_del_fdb_peers_flow+0xcf/0x240 [mlx5_core] [ 3103.008463] mlx5e_tc_del_flow+0x46/0x270 [mlx5_core] [ 3103.008944] mlx5e_flow_put+0x26/0x50 [mlx5_core] [ 3103.009401] mlx5e_delete_flower+0x25f/0x380 [mlx5_core] [ 3103.009901] tc_setup_cb_destroy+0xab/0x180 [ 3103.010292] fl_hw_destroy_filter+0x99/0xc0 [cls_flower] [ 3103.010779] __fl_delete+0x2d4/0x2f0 [cls_flower] [ 3103.011207] fl_delete+0x36/0x80 [cls_flower] [ 3103.011614] tc_del_tfilter+0x56f/0x750 [ 3103.011982] rtnetlink_rcv_msg+0xff/0x3a0 [ 3103.012362] ? netlink_ack+0x1c7/0x4e0 [ 3103.012719] ? rtnl_calcit.isra.44+0x130/0x130 [ 3103.013134] netlink_rcv_skb+0x54/0x100 [ 3103.013533] netlink_unicast+0x1ca/0x2b0 [ 3103.013902] netlink_sendmsg+0x361/0x4d0 [ 3103.014269] __sock_sendmsg+0x38/0x60 [ 3103.014643] ____sys_sendmsg+0x1f2/0x200 [ 3103.015018] ? copy_msghdr_from_user+0x72/0xa0 [ 3103.015265] ___sys_sendmsg+0x87/0xd0 [ 3103.016608] ? copy_msghdr_from_user+0x72/0xa0 [ 3103.017014] ? ___sys_recvmsg+0x9b/0xd0 [ 3103.017381] ? ttwu_do_activate.isra.137+0x58/0x180 [ 3103.017821] ? wake_up_q+0x49/0x90 [ 3103.018157] ? futex_wake+0x137/0x160 [ 3103.018521] ? __sys_sendmsg+0x51/0x90 [ 3103.018882] __sys_sendmsg+0x51/0x90 [ 3103.019230] ? exit_to_user_mode_prepare+0x56/0x130 [ 3103.019670] do_syscall_64+0x3c/0x80 [ 3103.020017] entry_SYSCALL_64_after_hwframe+0x46/0xb0 [ 3103.020469] RIP: 0033:0x7f4254811ef4 [ 3103.020816] Code: 89 f3 48 83 ec 10 48 89 7c 24 08 48 89 14 24 e8 42 eb ff ff 48 8b 14 24 41 89 c0 48 89 de 48 8b 7c 24 08 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 30 44 89 c7 48 89 04 24 e8 78 eb ff ff 48 8b [ 3103.022290] RSP: 002b:00007f424cdd9480 EFLAGS: 00000293 ORIG_RAX: 000000000000002e [ 3103.022970] RAX: ffffffffffffffda RBX: 00007f424cdd9510 RCX: 00007f4254811ef4 [ 3103.023564] RDX: 0000000000000000 RSI: 00007f424cdd9510 RDI: 0000000000000012 [ 3103.024158] RBP: 00007f424cdda238 R08: 0000000000000000 R09: 00007f41d801a4b0 [ 3103.024748] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000001 [ 3103.025341] R13: 00007f424cdd9510 R14: 00007f424cdda240 R15: 00007f424cdd99a0 [ 3103.025931] [ 3103.026182] ---[ end trace 0000000000000000 ]--- [ 3103.027033] ------------[ cut here ]------------ Fixes: 9be6c21fdcf8 ("net/mlx5e: Handle offloads flows per peer") Signed-off-by: Vlad Buslov Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit c20767fd45e82d64352db82d4fc8d281a43e4783 Author: Tariq Toukan Date: Sun Nov 5 17:09:46 2023 +0200 net/mlx5e: Fix inconsistent hairpin RQT sizes The processing of traffic in hairpin queues occurs in HW/FW and does not involve the cpus, hence the upper bound on max num channels does not apply to them. Using this bound for the hairpin RQT max_table_size is wrong. It could be too small, and cause the error below [1]. As the RQT size provided on init does not get modified later, use the same value for both actual and max table sizes. [1] mlx5_core 0000:08:00.1: mlx5_cmd_out_err:805:(pid 1200): CREATE_RQT(0x916) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x538faf), err(-22) Fixes: 74a8dadac17e ("net/mlx5e: Preparations for supporting larger number of channels") Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 3876638b2c7ebb2c9d181de1191db0de8cac143a Author: Rahul Rameshbabu Date: Wed Nov 22 18:32:11 2023 -0800 net/mlx5e: Fix operation precedence bug in port timestamping napi_poll context Indirection (*) is of lower precedence than postfix increment (++). Logic in napi_poll context would cause an out-of-bound read by first increment the pointer address by byte address space and then dereference the value. Rather, the intended logic was to dereference first and then increment the underlying value. Fixes: 92214be5979c ("net/mlx5e: Update doorbell for port timestamping CQ before the software counter") Signed-off-by: Rahul Rameshbabu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit cfbc3608a8c69b48bf238bd68f768192f0238e0d Author: Tariq Toukan Date: Tue Dec 19 14:46:20 2023 +0200 net/mlx5: Fix query of sd_group field The sd_group field moved in the HW spec from the MPIR register to the vport context. Align the query accordingly. Fixes: f5e956329960 ("net/mlx5: Expose Management PCIe Index Register (MPIR)") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 25461ce8b3d28528f2c55f5e737e99d2906eda83 Author: Saeed Mahameed Date: Fri Dec 15 19:31:14 2023 -0800 net/mlx5e: Use the correct lag ports number when creating TISes The cited commit moved the code of mlx5e_create_tises() and changed the loop to create TISes over MLX5_MAX_PORTS constant value, instead of getting the correct lag ports supported by the device, which can cause FW errors on devices with less than MLX5_MAX_PORTS ports. Change that back to mlx5e_get_num_lag_ports(mdev). Also IPoIB interfaces create there own TISes, they don't use the eth TISes, pass a flag to indicate that. This fixes the following errors that might appear in kernel log: mlx5_cmd_out_err:808:(pid 650): CREATE_TIS(0x912) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x595b5d), err(-22) mlx5e_create_mdev_resources:174:(pid 650): alloc tises failed, -22 Fixes: b25bd37c859f ("net/mlx5: Move TISes from priv to mdev HW resources") Signed-off-by: Saeed Mahameed commit 0077a504e1a4468669fd2e011108db49133db56e Author: Conrad Kostecki Date: Tue Jan 23 19:30:02 2024 +0100 ahci: asm1166: correct count of reported ports The ASM1166 SATA host controller always reports wrongly, that it has 32 ports. But in reality, it only has six ports. This seems to be a hardware issue, as all tested ASM1166 SATA host controllers reports such high count of ports. Example output: ahci 0000:09:00.0: AHCI 0001.0301 32 slots 32 ports 6 Gbps 0xffffff3f impl SATA mode. By adjusting the port_map, the count is limited to six ports. New output: ahci 0000:09:00.0: AHCI 0001.0301 32 slots 32 ports 6 Gbps 0x3f impl SATA mode. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=211873 Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218346 Signed-off-by: Conrad Kostecki Reviewed-by: Hans de Goede Signed-off-by: Niklas Cassel commit 4e4a1183f281d95fbb6caf28d670775d13264beb Author: Horatiu Vultur Date: Mon Jan 8 21:51:40 2024 +0100 phy: lan966x: Add missing serdes mux entry According to the datasheet(Table 3-2: Port configuration) the serdes 2 (SD2) can be configured to run QSGMII or SGMII mode. Already the QSGMII mode is supported in the serdes_muxes list but was missing the SGMII mode. In this mode the serdes is connected to the port 4. Therefore add this entry in the list. Signed-off-by: Horatiu Vultur Link: https://lore.kernel.org/r/20240108205140.1701770-1-horatiu.vultur@microchip.com Signed-off-by: Vinod Koul commit 249abaf3bf0dd07f5ddebbb2fe2e8f4d675f074e Author: Yoshihiro Shimoda Date: Fri Jan 5 18:37:03 2024 +0900 phy: renesas: rcar-gen3-usb2: Fix returning wrong error code Even if device_create_file() returns error code, rcar_gen3_phy_usb2_probe() will return zero because the "ret" is variable shadowing. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202312161021.gOLDl48K-lkp@intel.com/ Fixes: 441a681b8843 ("phy: rcar-gen3-usb2: fix implementation for runtime PM") Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240105093703.3359949-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul commit 62a5df451ab911421da96655fcc4d1e269ff6e2f Author: Mantas Pucka Date: Tue Jan 23 18:09:20 2024 +0200 phy: qcom-qmp-usb: fix serdes init sequence for IPQ6018 Commit 23fd679249df ("phy: qcom-qmp: add USB3 PHY support for IPQ6018") noted that IPQ6018 init is identical to IPQ8074. Yet downstream uses separate serdes init sequence for IPQ6018. Since already existing IPQ9574 serdes init sequence is identical, just reuse it and fix failing USB3 mode in IPQ6018. Fixes: 23fd679249df ("phy: qcom-qmp: add USB3 PHY support for IPQ6018") Signed-off-by: Mantas Pucka Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1706026160-17520-3-git-send-email-mantas@8devices.com Signed-off-by: Vinod Koul commit f74c35b630d40d414ca6b53f7b1b468dd4abf478 Author: Mantas Pucka Date: Tue Jan 23 18:09:19 2024 +0200 phy: qcom-qmp-usb: fix register offsets for ipq8074/ipq6018 Commit 2be22aae6b18 ("phy: qcom-qmp-usb: populate offsets configuration") introduced register offsets to the driver but for ipq8074/ipq6018 they do not match what was in the old style device tree. Example from old ipq6018.dtsi: <0x00078200 0x130>, /* Tx */ <0x00078400 0x200>, /* Rx */ <0x00078800 0x1f8>, /* PCS */ <0x00078600 0x044>; /* PCS misc */ which would translate to: {.., .pcs = 0x800, .pcs_misc = 0x600, .tx = 0x200, .rx = 0x400 } but was translated to: {.., .pcs = 0x600, .tx = 0x200, .rx = 0x400 } So split usb_offsets and fix USB initialization for IPQ8074 and IPQ6018. Tested only on IPQ6018 Fixes: 2be22aae6b18 ("phy: qcom-qmp-usb: populate offsets configuration") Signed-off-by: Mantas Pucka Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1706026160-17520-2-git-send-email-mantas@8devices.com Signed-off-by: Vinod Koul commit f4469f3858352ad1197434557150b1f7086762a0 Author: Michael Kelley Date: Mon Jan 22 09:09:56 2024 -0800 scsi: storvsc: Fix ring buffer size calculation Current code uses the specified ring buffer size (either the default of 128 Kbytes or a module parameter specified value) to encompass the one page ring buffer header plus the actual ring itself. When the page size is 4K, carving off one page for the header isn't significant. But when the page size is 64K on ARM64, only half of the default 128 Kbytes is left for the actual ring. While this doesn't break anything, the smaller ring size could be a performance bottleneck. Fix this by applying the VMBUS_RING_SIZE macro to the specified ring buffer size. This macro adds a page for the header, and rounds up the size to a page boundary, using the page size for which the kernel is built. Use this new size for subsequent ring buffer calculations. For example, on ARM64 with 64K page size and the default ring size, this results in the actual ring being 128 Kbytes, which is intended. Cc: stable@vger.kernel.org # 5.15.x Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/20240122170956.496436-1-mhklinux@outlook.com Signed-off-by: Martin K. Petersen commit 993d1c346b1a51ac41b2193609a0d4e51e9748f4 Author: Shyam Prasad N Date: Tue Jan 23 05:07:57 2024 +0000 cifs: fix stray unlock in cifs_chan_skip_or_disable A recent change moved the code that decides to skip a channel or disable multichannel entirely, into a helper function. During this, a mutex_unlock of the session_mutex should have been removed. Doing that here. Fixes: f591062bdbf4 ("cifs: handle servers that still advertise multichannel after disabling") Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 4cdad80261862c8cdcbb5fd232aa713d0bdefe24 Author: Shyam Prasad N Date: Thu Jan 18 09:14:10 2024 +0000 cifs: set replay flag for retries of write command Similar to the rest of the commands, this is a change to add replay flags on retry. This one does not add a back-off, considering that we may want to flush a write ASAP to the server. Considering that this will be a flush of cached pages, the retrans value is also not honoured. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 4f1fffa2376922f3d1d506e49c0fd445b023a28e Author: Shyam Prasad N Date: Sun Jan 21 03:32:47 2024 +0000 cifs: commands that are retried should have replay flag set MS-SMB2 states that the header flag SMB2_FLAGS_REPLAY_OPERATION needs to be set when a command needs to be retried, so that the server is aware that this is a replay for an operation that appeared before. This can be very important, for example, for state changing operations and opens which get retried following a reconnect; since the client maybe unaware of the status of the previous open. This is particularly important for multichannel scenario, since disconnection of one connection does not mean that the session is lost. The requests can be replayed on another channel. This change also makes use of exponential back-off before replays and also limits the number of retries to "retrans" mount option value. Also, this change does not modify the read/write codepath. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 64cc377b7628b81ffdbdb1c6bacfba895dcac3f8 Author: Shyam Prasad N Date: Sun Jan 21 03:32:46 2024 +0000 cifs: helper function to check replayable error codes The code to check for replay is not just -EAGAIN. In some cases, the send request or receive response may result in network errors, which we're now mapping to -ECONNABORTED. This change introduces a helper function which checks if the error returned in one of the above two errors. And all checks for replays will now use this helper. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit a68106a6928e0a6680f12bcc7338c0dddcfe4d11 Author: Shyam Prasad N Date: Sun Jan 21 03:32:45 2024 +0000 cifs: translate network errors on send to -ECONNABORTED When the network stack returns various errors, we today bubble up the error to the user (in case of soft mounts). This change translates all network errors except -EINTR and -EAGAIN to -ECONNABORTED. A similar approach is taken when we receive network errors when reading from the socket. The change also forces the cifsd thread to reconnect during it's next activity. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 4373534a9850627a2695317944898eb1283a2db0 Author: Ming Lei Date: Fri Jan 12 15:00:00 2024 +0800 scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler Inside scsi_eh_wakeup(), scsi_host_busy() is called & checked with host lock every time for deciding if error handler kthread needs to be waken up. This can be too heavy in case of recovery, such as: - N hardware queues - queue depth is M for each hardware queue - each scsi_host_busy() iterates over (N * M) tag/requests If recovery is triggered in case that all requests are in-flight, each scsi_eh_wakeup() is strictly serialized, when scsi_eh_wakeup() is called for the last in-flight request, scsi_host_busy() has been run for (N * M - 1) times, and request has been iterated for (N*M - 1) * (N * M) times. If both N and M are big enough, hard lockup can be triggered on acquiring host lock, and it is observed on mpi3mr(128 hw queues, queue depth 8169). Fix the issue by calling scsi_host_busy() outside the host lock. We don't need the host lock for getting busy count because host the lock never covers that. [mkp: Drop unnecessary 'busy' variables pointed out by Bart] Cc: Ewan Milne Fixes: 6eb045e092ef ("scsi: core: avoid host-wide host_busy counter for scsi_mq") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20240112070000.4161982-1-ming.lei@redhat.com Reviewed-by: Ewan D. Milne Reviewed-by: Sathya Prakash Veerichetty Tested-by: Sathya Prakash Veerichetty Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 32f2a0afa95fae0d1ceec2ff06e0e816939964b8 Author: Ido Schimmel Date: Mon Jan 22 15:28:43 2024 +0200 net/sched: flower: Fix chain template offload When a qdisc is deleted from a net device the stack instructs the underlying driver to remove its flow offload callback from the associated filter block using the 'FLOW_BLOCK_UNBIND' command. The stack then continues to replay the removal of the filters in the block for this driver by iterating over the chains in the block and invoking the 'reoffload' operation of the classifier being used. In turn, the classifier in its 'reoffload' operation prepares and emits a 'FLOW_CLS_DESTROY' command for each filter. However, the stack does not do the same for chain templates and the underlying driver never receives a 'FLOW_CLS_TMPLT_DESTROY' command when a qdisc is deleted. This results in a memory leak [1] which can be reproduced using [2]. Fix by introducing a 'tmplt_reoffload' operation and have the stack invoke it with the appropriate arguments as part of the replay. Implement the operation in the sole classifier that supports chain templates (flower) by emitting the 'FLOW_CLS_TMPLT_{CREATE,DESTROY}' command based on whether a flow offload callback is being bound to a filter block or being unbound from one. As far as I can tell, the issue happens since cited commit which reordered tcf_block_offload_unbind() before tcf_block_flush_all_chains() in __tcf_block_put(). The order cannot be reversed as the filter block is expected to be freed after flushing all the chains. [1] unreferenced object 0xffff888107e28800 (size 2048): comm "tc", pid 1079, jiffies 4294958525 (age 3074.287s) hex dump (first 32 bytes): b1 a6 7c 11 81 88 ff ff e0 5b b3 10 81 88 ff ff ..|......[...... 01 00 00 00 00 00 00 00 e0 aa b0 84 ff ff ff ff ................ backtrace: [] __kmem_cache_alloc_node+0x1e8/0x320 [] __kmalloc+0x4e/0x90 [] mlxsw_sp_acl_ruleset_get+0x34d/0x7a0 [] mlxsw_sp_flower_tmplt_create+0x145/0x180 [] mlxsw_sp_flow_block_cb+0x1ea/0x280 [] tc_setup_cb_call+0x183/0x340 [] fl_tmplt_create+0x3da/0x4c0 [] tc_ctl_chain+0xa15/0x1170 [] rtnetlink_rcv_msg+0x3cc/0xed0 [] netlink_rcv_skb+0x170/0x440 [] netlink_unicast+0x540/0x820 [] netlink_sendmsg+0x8d8/0xda0 [] ____sys_sendmsg+0x30f/0xa80 [] ___sys_sendmsg+0x13a/0x1e0 [] __sys_sendmsg+0x11c/0x1f0 [] do_syscall_64+0x40/0xe0 unreferenced object 0xffff88816d2c0400 (size 1024): comm "tc", pid 1079, jiffies 4294958525 (age 3074.287s) hex dump (first 32 bytes): 40 00 00 00 00 00 00 00 57 f6 38 be 00 00 00 00 @.......W.8..... 10 04 2c 6d 81 88 ff ff 10 04 2c 6d 81 88 ff ff ..,m......,m.... backtrace: [] __kmem_cache_alloc_node+0x1e8/0x320 [] __kmalloc_node+0x51/0x90 [] kvmalloc_node+0xa6/0x1f0 [] bucket_table_alloc.isra.0+0x83/0x460 [] rhashtable_init+0x43b/0x7c0 [] mlxsw_sp_acl_ruleset_get+0x428/0x7a0 [] mlxsw_sp_flower_tmplt_create+0x145/0x180 [] mlxsw_sp_flow_block_cb+0x1ea/0x280 [] tc_setup_cb_call+0x183/0x340 [] fl_tmplt_create+0x3da/0x4c0 [] tc_ctl_chain+0xa15/0x1170 [] rtnetlink_rcv_msg+0x3cc/0xed0 [] netlink_rcv_skb+0x170/0x440 [] netlink_unicast+0x540/0x820 [] netlink_sendmsg+0x8d8/0xda0 [] ____sys_sendmsg+0x30f/0xa80 [2] # tc qdisc add dev swp1 clsact # tc chain add dev swp1 ingress proto ip chain 1 flower dst_ip 0.0.0.0/32 # tc qdisc del dev swp1 clsact # devlink dev reload pci/0000:06:00.0 Fixes: bbf73830cd48 ("net: sched: traverse chains in block with tcf_get_next_chain()") Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 04fe7c5029cbdbcdb28917f09a958d939a8f19f7 Author: Jakub Kicinski Date: Mon Jan 22 12:35:28 2024 -0800 selftests: fill in some missing configs for net We are missing a lot of config options from net selftests, it seems: tun/tap: CONFIG_TUN, CONFIG_MACVLAN, CONFIG_MACVTAP fib_tests: CONFIG_NET_SCH_FQ_CODEL l2tp: CONFIG_L2TP, CONFIG_L2TP_V3, CONFIG_L2TP_IP, CONFIG_L2TP_ETH sctp-vrf: CONFIG_INET_DIAG txtimestamp: CONFIG_NET_CLS_U32 vxlan_mdb: CONFIG_BRIDGE_VLAN_FILTERING gre_gso: CONFIG_NET_IPGRE_DEMUX, CONFIG_IP_GRE, CONFIG_IPV6_GRE srv6_end_dt*_l3vpn: CONFIG_IPV6_SEG6_LWTUNNEL ip_local_port_range: CONFIG_MPTCP fib_test: CONFIG_NET_CLS_BASIC rtnetlink: CONFIG_MACSEC, CONFIG_NET_SCH_HTB, CONFIG_XFRM_INTERFACE CONFIG_NET_IPGRE, CONFIG_BONDING fib_nexthops: CONFIG_MPLS, CONFIG_MPLS_ROUTING vxlan_mdb: CONFIG_NET_ACT_GACT tls: CONFIG_TLS, CONFIG_CRYPTO_CHACHA20POLY1305 psample: CONFIG_PSAMPLE fcnal: CONFIG_TCP_MD5SIG Try to add them in a semi-alphabetical order. Fixes: 62199e3f1658 ("selftests: net: Add VXLAN MDB test") Fixes: c12e0d5f267d ("self-tests: introduce self-tests for RPS default mask") Fixes: 122db5e3634b ("selftests/net: add MPTCP coverage for IP_LOCAL_PORT_RANGE") Link: https://lore.kernel.org/r/20240122203528.672004-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 6941f67ad37d5465b75b9ffc498fcf6897a3c00e Author: Michael Kelley Date: Mon Jan 22 08:20:28 2024 -0800 hv_netvsc: Calculate correct ring size when PAGE_SIZE is not 4 Kbytes Current code in netvsc_drv_init() incorrectly assumes that PAGE_SIZE is 4 Kbytes, which is wrong on ARM64 with 16K or 64K page size. As a result, the default VMBus ring buffer size on ARM64 with 64K page size is 8 Mbytes instead of the expected 512 Kbytes. While this doesn't break anything, a typical VM with 8 vCPUs and 8 netvsc channels wastes 120 Mbytes (8 channels * 2 ring buffers/channel * 7.5 Mbytes/ring buffer). Unfortunately, the module parameter specifying the ring buffer size is in units of 4 Kbyte pages. Ideally, it should be in units that are independent of PAGE_SIZE, but backwards compatibility prevents changing that now. Fix this by having netvsc_drv_init() hardcode 4096 instead of using PAGE_SIZE when calculating the ring buffer size in bytes. Also use the VMBUS_RING_SIZE macro to ensure proper alignment when running with page size larger than 4K. Cc: # 5.15.x Fixes: 7aff79e297ee ("Drivers: hv: Enable Hyper-V code to be built on ARM64") Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/20240122162028.348885-1-mhklinux@outlook.com Signed-off-by: Jakub Kicinski commit 3222bc997a24821ea4f96d1a9108dafeadc00cfb Author: Rahul Rameshbabu Date: Thu Jan 18 11:18:06 2024 -0800 Revert "net: macsec: use skb_ensure_writable_head_tail to expand the skb" This reverts commit b34ab3527b9622ca4910df24ff5beed5aa66c6b5. Using skb_ensure_writable_head_tail without a call to skb_unshare causes the MACsec stack to operate on the original skb rather than a copy in the macsec_encrypt path. This causes the buffer to be exceeded in space, and leads to warnings generated by skb_put operations. Opting to revert this change since skb_copy_expand is more efficient than skb_ensure_writable_head_tail followed by a call to skb_unshare. Log: ------------[ cut here ]------------ kernel BUG at net/core/skbuff.c:2464! invalid opcode: 0000 [#1] SMP KASAN CPU: 21 PID: 61997 Comm: iperf3 Not tainted 6.7.0-rc8_for_upstream_debug_2024_01_07_17_05 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:skb_put+0x113/0x190 Code: 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 70 3b 9d bc 00 00 00 77 0e 48 83 c4 08 4c 89 e8 5b 5d 41 5d c3 <0f> 0b 4c 8b 6c 24 20 89 74 24 04 e8 6d b7 f0 fe 8b 74 24 04 48 c7 RSP: 0018:ffff8882694e7278 EFLAGS: 00010202 RAX: 0000000000000025 RBX: 0000000000000100 RCX: 0000000000000001 RDX: 0000000000000000 RSI: 0000000000000010 RDI: ffff88816ae0bad4 RBP: ffff88816ae0ba60 R08: 0000000000000004 R09: 0000000000000004 R10: 0000000000000001 R11: 0000000000000001 R12: ffff88811ba5abfa R13: ffff8882bdecc100 R14: ffff88816ae0ba60 R15: ffff8882bdecc0ae FS: 00007fe54df02740(0000) GS:ffff88881f080000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe54d92e320 CR3: 000000010a345003 CR4: 0000000000370eb0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? die+0x33/0x90 ? skb_put+0x113/0x190 ? do_trap+0x1b4/0x3b0 ? skb_put+0x113/0x190 ? do_error_trap+0xb6/0x180 ? skb_put+0x113/0x190 ? handle_invalid_op+0x2c/0x30 ? skb_put+0x113/0x190 ? exc_invalid_op+0x2b/0x40 ? asm_exc_invalid_op+0x16/0x20 ? skb_put+0x113/0x190 ? macsec_start_xmit+0x4e9/0x21d0 macsec_start_xmit+0x830/0x21d0 ? get_txsa_from_nl+0x400/0x400 ? lock_downgrade+0x690/0x690 ? dev_queue_xmit_nit+0x78b/0xae0 dev_hard_start_xmit+0x151/0x560 __dev_queue_xmit+0x1580/0x28f0 ? check_chain_key+0x1c5/0x490 ? netdev_core_pick_tx+0x2d0/0x2d0 ? __ip_queue_xmit+0x798/0x1e00 ? lock_downgrade+0x690/0x690 ? mark_held_locks+0x9f/0xe0 ip_finish_output2+0x11e4/0x2050 ? ip_mc_finish_output+0x520/0x520 ? ip_fragment.constprop.0+0x230/0x230 ? __ip_queue_xmit+0x798/0x1e00 __ip_queue_xmit+0x798/0x1e00 ? __skb_clone+0x57a/0x760 __tcp_transmit_skb+0x169d/0x3490 ? lock_downgrade+0x690/0x690 ? __tcp_select_window+0x1320/0x1320 ? mark_held_locks+0x9f/0xe0 ? lockdep_hardirqs_on_prepare+0x286/0x400 ? tcp_small_queue_check.isra.0+0x120/0x3d0 tcp_write_xmit+0x12b6/0x7100 ? skb_page_frag_refill+0x1e8/0x460 __tcp_push_pending_frames+0x92/0x320 tcp_sendmsg_locked+0x1ed4/0x3190 ? tcp_sendmsg_fastopen+0x650/0x650 ? tcp_sendmsg+0x1a/0x40 ? mark_held_locks+0x9f/0xe0 ? lockdep_hardirqs_on_prepare+0x286/0x400 tcp_sendmsg+0x28/0x40 ? inet_send_prepare+0x1b0/0x1b0 __sock_sendmsg+0xc5/0x190 sock_write_iter+0x222/0x380 ? __sock_sendmsg+0x190/0x190 ? kfree+0x96/0x130 vfs_write+0x842/0xbd0 ? kernel_write+0x530/0x530 ? __fget_light+0x51/0x220 ? __fget_light+0x51/0x220 ksys_write+0x172/0x1d0 ? update_socket_protocol+0x10/0x10 ? __x64_sys_read+0xb0/0xb0 ? lockdep_hardirqs_on_prepare+0x286/0x400 do_syscall_64+0x40/0xe0 entry_SYSCALL_64_after_hwframe+0x46/0x4e RIP: 0033:0x7fe54d9018b7 Code: 0f 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 RSP: 002b:00007ffdbd4191d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000025 RCX: 00007fe54d9018b7 RDX: 0000000000000025 RSI: 0000000000d9859c RDI: 0000000000000004 RBP: 0000000000d9859c R08: 0000000000000004 R09: 0000000000000000 R10: 00007fe54d80afe0 R11: 0000000000000246 R12: 0000000000000004 R13: 0000000000000025 R14: 00007fe54e00ec00 R15: 0000000000d982a0 Modules linked in: 8021q garp mrp iptable_raw bonding vfio_pci rdma_ucm ib_umad mlx5_vfio_pci mlx5_ib vfio_pci_core vfio_iommu_type1 ib_uverbs vfio mlx5_core ip_gre nf_tables ipip tunnel4 ib_ipoib ip6_gre gre ip6_tunnel tunnel6 geneve openvswitch nsh xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat br_netfilter rpcsec_gss_krb5 auth_rpcgss oid_registry overlay rpcrdma ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_cm ib_core zram zsmalloc fuse [last unloaded: ib_uverbs] ---[ end trace 0000000000000000 ]--- Cc: Radu Pirea (NXP OSS) Cc: Sabrina Dubroca Signed-off-by: Rahul Rameshbabu Link: https://lore.kernel.org/r/20240118191811.50271-1-rrameshbabu@nvidia.com Signed-off-by: Jakub Kicinski commit fc43a8ac396d302ced1e991e4913827cf72c8eb9 Author: Shyam Prasad N Date: Sun Jan 21 03:32:43 2024 +0000 cifs: cifs_pick_channel should try selecting active channels cifs_pick_channel today just selects a channel based on the policy of least loaded channel. However, it does not take into account if the channel needs reconnect. As a result, we can have failures in send that can be completely avoided. This change doesn't make a channel a candidate for this selection if it needs reconnect. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 966cc171c8be4fbeae1bf166d264e0bfb09e141c Author: David Howells Date: Tue Feb 15 19:22:18 2022 +0000 cifs: Share server EOF pos with netfslib Use cifsi->netfs_ctx.remote_i_size instead of cifsi->server_eof so that netfslib can refer to it to. Signed-off-by: David Howells cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Signed-off-by: Steve French commit 8deb05c84b63b4fdb8549e08942867a68924a5b8 Author: Kees Cook Date: Tue Jan 23 15:47:34 2024 -0800 smb: Work around Clang __bdos() type confusion Recent versions of Clang gets confused about the possible size of the "user" allocation, and CONFIG_FORTIFY_SOURCE ends up emitting a warning[1]: repro.c:126:4: warning: call to '__write_overflow_field' declared with 'warning' attribute: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning] 126 | __write_overflow_field(p_size_field, size); | ^ for this memset(): int len; __le16 *user; ... len = ses->user_name ? strlen(ses->user_name) : 0; user = kmalloc(2 + (len * 2), GFP_KERNEL); ... if (len) { ... } else { memset(user, '\0', 2); } While Clang works on this bug[2], switch to using a direct assignment, which avoids memset() entirely which both simplifies the code and silences the false positive warning. (Making "len" size_t also silences the warning, but the direct assignment seems better.) Reported-by: Nathan Chancellor Closes: https://github.com/ClangBuiltLinux/linux/issues/1966 [1] Link: https://github.com/llvm/llvm-project/issues/77813 [2] Cc: Steve French Cc: Paulo Alcantara Cc: Ronnie Sahlberg Cc: Shyam Prasad N Cc: Tom Talpey Cc: linux-cifs@vger.kernel.org Cc: llvm@lists.linux.dev Signed-off-by: Kees Cook Signed-off-by: Steve French commit 615d300648869c774bd1fe54b4627bb0c20faed4 Merge: 7ed2632ec7d72 834bf76add3e6 Author: Linus Torvalds Date: Tue Jan 23 16:48:09 2024 -0800 Merge tag 'trace-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing and eventfs fixes from Steven Rostedt: - Fix histogram tracing_map insertion. The tracing_map_insert copies the value into the elt variable and then assigns the elt to the entry value. But it is possible that the entry value becomes visible on other CPUs before the elt is fully initialized. This is fixed by adding a wmb() between the initialization of the elt variable and assigning it. - Have eventfs directory have unique inode numbers. Having them be all the same proved to be a failure as the 'find' application will think that the directories are causing loops, as it checks for directory loops via their inodes. Have the evenfs dir entries get their inodes assigned when they are referenced and then save them in the eventfs_inode structure. * tag 'trace-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: eventfs: Save directory inodes in the eventfs_inode structure tracing: Ensure visibility when inserting an element into tracing_map commit 16bae3e1377846734ec6b87eee459c0f3551692c Author: Paul Moore Date: Tue Jan 23 16:55:02 2024 -0500 io_uring: enable audit and restrict cred override for IORING_OP_FIXED_FD_INSTALL We need to correct some aspects of the IORING_OP_FIXED_FD_INSTALL command to take into account the security implications of making an io_uring-private file descriptor generally accessible to a userspace task. The first change in this patch is to enable auditing of the FD_INSTALL operation as installing a file descriptor into a task's file descriptor table is a security relevant operation and something that admins/users may want to audit. The second change is to disable the io_uring credential override functionality, also known as io_uring "personalities", in the FD_INSTALL command. The credential override in FD_INSTALL is particularly problematic as it affects the credentials used in the security_file_receive() LSM hook. If a task were to request a credential override via REQ_F_CREDS on a FD_INSTALL operation, the LSM would incorrectly check to see if the overridden credentials of the io_uring were able to "receive" the file as opposed to the task's credentials. After discussions upstream, it's difficult to imagine a use case where we would want to allow a credential override on a FD_INSTALL operation so we are simply going to block REQ_F_CREDS on IORING_OP_FIXED_FD_INSTALL operations. Fixes: dc18b89ab113 ("io_uring/openclose: add support for IORING_OP_FIXED_FD_INSTALL") Signed-off-by: Paul Moore Link: https://lore.kernel.org/r/20240123215501.289566-2-paul@paul-moore.com Signed-off-by: Jens Axboe commit 1732ebc4a26181c8f116c7639db99754b313edc8 Author: Pu Lehui Date: Tue Jan 23 02:32:07 2024 +0000 riscv, bpf: Fix unpredictable kernel crash about RV64 struct_ops We encountered a kernel crash triggered by the bpf_tcp_ca testcase as show below: Unable to handle kernel paging request at virtual address ff60000088554500 Oops [#1] ... CPU: 3 PID: 458 Comm: test_progs Tainted: G OE 6.8.0-rc1-kselftest_plain #1 Hardware name: riscv-virtio,qemu (DT) epc : 0xff60000088554500 ra : tcp_ack+0x288/0x1232 epc : ff60000088554500 ra : ffffffff80cc7166 sp : ff2000000117ba50 gp : ffffffff82587b60 tp : ff60000087be0040 t0 : ff60000088554500 t1 : ffffffff801ed24e t2 : 0000000000000000 s0 : ff2000000117bbc0 s1 : 0000000000000500 a0 : ff20000000691000 a1 : 0000000000000018 a2 : 0000000000000001 a3 : ff60000087be03a0 a4 : 0000000000000000 a5 : 0000000000000000 a6 : 0000000000000021 a7 : ffffffff8263f880 s2 : 000000004ac3c13b s3 : 000000004ac3c13a s4 : 0000000000008200 s5 : 0000000000000001 s6 : 0000000000000104 s7 : ff2000000117bb00 s8 : ff600000885544c0 s9 : 0000000000000000 s10: ff60000086ff0b80 s11: 000055557983a9c0 t3 : 0000000000000000 t4 : 000000000000ffc4 t5 : ffffffff8154f170 t6 : 0000000000000030 status: 0000000200000120 badaddr: ff60000088554500 cause: 000000000000000c Code: c796 67d7 0000 0000 0052 0002 c13b 4ac3 0000 0000 (0001) 0000 ---[ end trace 0000000000000000 ]--- The reason is that commit 2cd3e3772e41 ("x86/cfi,bpf: Fix bpf_struct_ops CFI") changes the func_addr of arch_prepare_bpf_trampoline in struct_ops from NULL to non-NULL, while we use func_addr on RV64 to differentiate between struct_ops and regular trampoline. When the struct_ops testcase is triggered, it emits wrong prologue and epilogue, and lead to unpredictable issues. After commit 2cd3e3772e41, we can use BPF_TRAMP_F_INDIRECT to distinguish them as it always be set in struct_ops. Fixes: 2cd3e3772e41 ("x86/cfi,bpf: Fix bpf_struct_ops CFI") Signed-off-by: Pu Lehui Signed-off-by: Daniel Borkmann Tested-by: Björn Töpel Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20240123023207.1917284-1-pulehui@huaweicloud.com commit d546978e0c07b6333fdbcbd81b2f2e058d4560b5 Author: Lukas Bulwahn Date: Thu Nov 30 10:55:15 2023 +0100 docs: admin-guide: remove obsolete advice related to SLAB allocator Commit 1db9d06aaa55 ("mm/slab: remove CONFIG_SLAB from all Kconfig and Makefile") removes the config SLAB and makes the SLUB allocator the only default allocator in the kernel. Hence, the advice on reducing OS jitter due to kworker kernel threads to build with CONFIG_SLUB instead of CONFIG_SLAB is obsolete. Remove the obsolete advice to build with SLUB instead of SLAB. Signed-off-by: Lukas Bulwahn Acked-by: Vlastimil Babka Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231130095515.21586-1-lukas.bulwahn@gmail.com commit ea7dcd8a48ea3b440a7070b1a0f70f757f8ed9a8 Author: Vegard Nossum Date: Thu Jan 11 09:52:20 2024 +0100 doc: admin-guide/kernel-parameters: remove useless comment This comment about DRM drivers has been there since the first git commit. It simply doesn't belong in kernel-parameters; remove it. Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240111085220.3693059-1-vegard.nossum@oracle.com commit 3f0e4df37a1b505307f61fbfa7b1f9a2fa2c40bc Author: Hu Haowen <2023002089@link.tyut.edu.cn> Date: Thu Jan 18 17:01:40 2024 +0800 docs/accel: correct links to mailing list archives Since the mailing archive list lkml.org is obsolete, change the links into lore.kernel.org's ones. Signed-off-by: Hu Haowen <2023002089@link.tyut.edu.cn> Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240118090140.4868-1-2023002089@link.tyut.edu.cn commit d2d0223441d3caad65f6978c07869321bce968e0 Author: Gustavo Sousa Date: Tue Jan 23 13:21:58 2024 -0300 docs/sphinx: Fix TOC scroll hack for the home page When on the documentation home page, there won't be any ".current" element since no entry from the TOC was selected yet. That results in a javascript error. Fix that by only trying to set the scrollTop if we have matches for current entries. Signed-off-by: Gustavo Sousa Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240123162157.61819-2-gustavo.sousa@intel.com commit d3b93fe159b8d3a48565c4ecd602e3499764d549 Merge: 6613476e225e0 0086ffec768be Author: Rafael J. Wysocki Date: Tue Jan 23 21:12:06 2024 +0100 Merge tag 'linux-cpupower-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Merge cpupower utility update for 6.8-rc2 from Shuah Khan: "This cpupower fixes update for Linux 6.8-rc2 consists of one single fix to an issue where CFLAGS is passed as a make argument for cpupower, but bench makefile does not inherit and append to them." This fixes the problem so the user specified CFLAGS are honored. * tag 'linux-cpupower-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: tools cpupower bench: Override CFLAGS assignments commit 5d390df3bdd13d178eb2e02e60e9a480f7103f7b Author: Alexey Dobriyan Date: Tue Jan 23 13:40:00 2024 +0300 smb: client: delete "true", "false" defines Kernel has its own official true/false definitions. The defines aren't even used in this file. Signed-off-by: Alexey Dobriyan Signed-off-by: Steve French commit 1347775dea7f62798b4d5ef60771cdd7cfff25d8 Merge: 435e202d645c1 bcbc84af1183c Author: Jakub Kicinski Date: Tue Jan 23 08:38:13 2024 -0800 Merge tag 'wireless-2024-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Kalle Valo says: ==================== wireless fixes for v6.8-rc2 The most visible fix here is the ath11k crash fix which was introduced in v6.7. We also have a fix for iwlwifi memory corruption and few smaller fixes in the stack. * tag 'wireless-2024-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: wifi: mac80211: fix race condition on enabling fast-xmit wifi: iwlwifi: fix a memory corruption wifi: mac80211: fix potential sta-link leak wifi: cfg80211/mac80211: remove dependency on non-existing option wifi: cfg80211: fix missing interfaces when dumping wifi: ath11k: rely on mac80211 debugfs handling for vif wifi: p54: fix GCC format truncation warning with wiphy->fw_version ==================== Link: https://lore.kernel.org/r/20240122153434.E0254C433C7@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 41353fbad4f551e82c2792f7e82ac225c79cc710 Author: Guixin Liu Date: Thu Jan 18 20:51:45 2024 +0800 nvmet: unify aer type enum The host and target use two definition of aer type, unify them into a single one. Signed-off-by: Guixin Liu Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 13f3956eb5681a4045a8dfdef48df5dc4d9f58a6 Author: Christian A. Ehrhardt Date: Sun Jan 21 21:26:34 2024 +0100 block: Fix WARNING in _copy_from_iter Syzkaller reports a warning in _copy_from_iter because an iov_iter is supposedly used in the wrong direction. The reason is that syzcaller managed to generate a request with a transfer direction of SG_DXFER_TO_FROM_DEV. This instructs the kernel to copy user buffers into the kernel, read into the copied buffers and then copy the data back to user space. Thus the iovec is used in both directions. Detect this situation in the block layer and construct a new iterator with the correct direction for the copy-in. Reported-by: syzbot+a532b03fdfee2c137666@syzkaller.appspotmail.com Closes: https://lore.kernel.org/lkml/0000000000009b92c10604d7a5e9@google.com/t/ Reported-by: syzbot+63dec323ac56c28e644f@syzkaller.appspotmail.com Closes: https://lore.kernel.org/lkml/0000000000003faaa105f6e7c658@google.com/T/ Signed-off-by: Christian A. Ehrhardt Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240121202634.275068-1-lk@c--e.de Signed-off-by: Jens Axboe commit de8b6e1c231a95abf95ad097b993d34b31458ec9 Author: Devyn Liu Date: Tue Jan 23 15:11:49 2024 +0800 spi: hisi-sfc-v3xx: Return IRQ_NONE if no interrupts were detected Return IRQ_NONE from the interrupt handler when no interrupt was detected. Because an empty interrupt will cause a null pointer error: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 Call trace: complete+0x54/0x100 hisi_sfc_v3xx_isr+0x2c/0x40 [spi_hisi_sfc_v3xx] __handle_irq_event_percpu+0x64/0x1e0 handle_irq_event+0x7c/0x1cc Signed-off-by: Devyn Liu Link: https://msgid.link/r/20240123071149.917678-1-liudingyuan@huawei.com Signed-off-by: Mark Brown commit a67e1f0bd4564b485e0f0c3ed7f6bf17688be268 Author: Romain Naour Date: Tue Jan 23 12:14:56 2024 +0100 regulator: ti-abb: don't use devm_platform_ioremap_resource_byname for shared interrupt register We can't use devm_platform_ioremap_resource_byname() to remap the interrupt register that can be shared between regulator-abb-{ivahd,dspeve,gpu} drivers instances. The combined helper introduce a call to devm_request_mem_region() that creates a new busy resource region on PRM_IRQSTATUS_MPU register (0x4ae06010). The first devm_request_mem_region() call succeeds for regulator-abb-ivahd but fails for the two other regulator-abb-dspeve and regulator-abb-gpu. # cat /proc/iomem | grep -i 4ae06 4ae06010-4ae06013 : 4ae07e34.regulator-abb-ivahd int-address 4ae06014-4ae06017 : 4ae07ddc.regulator-abb-mpu int-address regulator-abb-dspeve and regulator-abb-gpu are missing due to devm_request_mem_region() failure (EBUSY): [ 1.326660] ti_abb 4ae07e30.regulator-abb-dspeve: can't request region for resource [mem 0x4ae06010-0x4ae06013] [ 1.326660] ti_abb: probe of 4ae07e30.regulator-abb-dspeve failed with error -16 [ 1.327239] ti_abb 4ae07de4.regulator-abb-gpu: can't request region for resource [mem 0x4ae06010-0x4ae06013] [ 1.327270] ti_abb: probe of 4ae07de4.regulator-abb-gpu failed with error -16 >From arm/boot/dts/dra7.dtsi: The abb_mpu is the only instance using its own interrupt register: (0x4ae06014) PRM_IRQSTATUS_MPU_2, ABB_MPU_DONE_ST (bit 7) The other tree instances (abb_ivahd, abb_dspeve, abb_gpu) share PRM_IRQSTATUS_MPU register (0x4ae06010) but use different bits ABB_IVA_DONE_ST (bit 30), ABB_DSPEVE_DONE_ST( bit 29) and ABB_GPU_DONE_ST (but 28). The commit b36c6b1887ff ("regulator: ti-abb: Make use of the helper function devm_ioremap related") overlooked the following comment implicitly explaining why devm_ioremap() is used in this case: /* * We may have shared interrupt register offsets which are * write-1-to-clear between domains ensuring exclusivity. */ Fixes and partially reverts commit b36c6b1887ff ("regulator: ti-abb: Make use of the helper function devm_ioremap related"). Improve the existing comment to avoid further conversion to devm_platform_ioremap_resource_byname(). Fixes: b36c6b1887ff ("regulator: ti-abb: Make use of the helper function devm_ioremap related") Signed-off-by: Romain Naour Reviewed-by: Yoann Congal Link: https://msgid.link/r/20240123111456.739381-1-romain.naour@smile.fr Signed-off-by: Mark Brown commit f13d8f28fe9fb0a4d0a6c21fb3c1577d0eda4ed8 Merge: d59da02d1ab69 b90493505347a Author: Christian Brauner Date: Tue Jan 23 16:00:39 2024 +0100 Merge branch 'netfs-fixes' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull netfs fixes from David Howells: * 'netfs-fixes' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Fix missing/incorrect unlocking of RCU read lock afs: Remove afs_dynroot_d_revalidate() as it is redundant afs: Fix error handling with lookup via FS.InlineBulkStatus afs: Hide silly-rename files from userspace cachefiles, erofs: Fix NULL deref in when cachefiles is not doing ondemand-mode netfs: Fix a NULL vs IS_ERR() check in netfs_perform_write() netfs, fscache: Prevent Oops in fscache_put_cache() cifs: Don't use certain unnecessary folio_*() functions afs: Don't use certain unnecessary folio_*() functions netfs: Don't use certain unnecessary folio_*() functions Signed-off-by: Christian Brauner commit 834bf76add3e6168038150f162cbccf1fd492a67 Author: Steven Rostedt (Google) Date: Mon Jan 22 15:27:48 2024 -0500 eventfs: Save directory inodes in the eventfs_inode structure The eventfs inodes and directories are allocated when referenced. But this leaves the issue of keeping consistent inode numbers and the number is only saved in the inode structure itself. When the inode is no longer referenced, it can be freed. When the file that the inode was representing is referenced again, the inode is once again created, but the inode number needs to be the same as it was before. Just making the inode numbers the same for all files is fine, but that does not work with directories. The find command will check for loops via the inode number and having the same inode number for directories triggers: # find /sys/kernel/tracing find: File system loop detected; '/sys/kernel/debug/tracing/events/initcall/initcall_finish' is part of the same file system loop as '/sys/kernel/debug/tracing/events/initcall'. [..] Linus pointed out that the eventfs_inode structure ends with a single 32bit int, and on 64 bit machines, there's likely a 4 byte hole due to alignment. We can use this hole to store the inode number for the eventfs_inode. All directories in eventfs are represented by an eventfs_inode and that data structure can hold its inode number. That last int was also purposely placed at the end of the structure to prevent holes from within. Now that there's a 4 byte number to hold the inode, both the inode number and the last integer can be moved up in the structure for better cache locality, where the llist and rcu fields can be moved to the end as they are only used when the eventfs_inode is being deleted. Link: https://lore.kernel.org/all/CAMuHMdXKiorg-jiuKoZpfZyDJ3Ynrfb8=X+c7x0Eewxn-YRdCA@mail.gmail.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240122152748.46897388@gandalf.local.home Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Linus Torvalds Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Fixes: 53c41052ba31 ("eventfs: Have the inodes all for files and directories all be the same") Signed-off-by: Steven Rostedt (Google) Reviewed-by: Kees Cook commit 67794f882adca00d043899ac248bc002751da9f6 Author: Alexander Tsoy Date: Tue Jan 23 16:46:35 2024 +0300 ALSA: usb-audio: Skip setting clock selector for single connections Since commit 086b957cc17f5 ("ALSA: usb-audio: Skip the clock selector inquiry for single connections") we are already skipping clock selector inquiry if only one clock source is connected, but we are still sending a set request. Lets skip that too. This should fix errors when setting a sample rate on devices that don't have any controls present within the clock selector. An example of such device is the new revision of MOTU M Series (07fd:000b): AudioControl Interface Descriptor: bLength 8 bDescriptorType 36 bDescriptorSubtype 11 (CLOCK_SELECTOR) bClockID 1 bNrInPins 1 baCSourceID(0) 2 bmControls 0x00 iClockSelector 0 Perhaps we also should check if clock selectors are readable and writeable like we already do for clock sources, but this is out of scope of this patch. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217601 Signed-off-by: Alexander Tsoy Link: https://lore.kernel.org/r/20240123134635.54026-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit d2baf8cc82c17459fca019a12348efcf86bfec29 Author: Ard Biesheuvel Date: Tue Jan 16 14:52:27 2024 +0100 riscv/efistub: Tighten ELF relocation check The EFI stub makefile contains logic to ensure that the objects that make up the stub do not contain relocations that require runtime fixups (typically to account for the runtime load address of the executable) On RISC-V, we also avoid GP based relocations, as they require that GP is assigned the correct base in the startup code, which is not implemented in the EFI stub. So add these relocation types to the grep expression that is used to carry out this check. Link: https://lkml.kernel.org/r/42c63cb9-87d0-49db-9af8-95771b186684%40siemens.com Signed-off-by: Ard Biesheuvel commit afb2a4fb84555ef9e61061f6ea63ed7087b295d5 Author: Jan Kiszka Date: Fri Jan 12 19:37:29 2024 +0100 riscv/efistub: Ensure GP-relative addressing is not used The cflags for the RISC-V efistub were missing -mno-relax, thus were under the risk that the compiler could use GP-relative addressing. That happened for _edata with binutils-2.41 and kernel 6.1, causing the relocation to fail due to an invalid kernel_size in handle_kernel_image. It was not yet observed with newer versions, but that may just be luck. Cc: Signed-off-by: Jan Kiszka Signed-off-by: Ard Biesheuvel commit 633cd6fe6e1993ba80e0954c2db127a0b1a3e66f Author: Amit Kumar Mahapatra Date: Mon Dec 18 14:36:52 2023 +0530 spi: spi-cadence: Reverse the order of interleaved write and read operations In the existing implementation, when executing interleaved write and read operations in the ISR for a transfer length greater than the FIFO size, the TXFIFO write precedes the RXFIFO read. Consequently, the initially received data in the RXFIFO is pushed out and lost, leading to a failure in data integrity. To address this issue, reverse the order of interleaved operations and conduct the RXFIFO read followed by the TXFIFO write. Fixes: 6afe2ae8dc48 ("spi: spi-cadence: Interleave write of TX and read of RX FIFO") Signed-off-by: Amit Kumar Mahapatra Link: https://msgid.link/r/20231218090652.18403-1-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit e267a5b3ec59ce88d6be21078e2deb807ca3b436 Author: Alexander Stein Date: Wed Jan 10 09:54:03 2024 +0100 spi: spi-imx: Use dev_err_probe for failed DMA channel requests If dma_request_chan() fails, no error is shown nor any information is shown in /sys/kernel/debug/devices_deferred if -EPROBE_DEFER is returned. Use dev_err_probe to fix both problems. Signed-off-by: Alexander Stein Reviewed-by: Francesco Dolcini Link: https://msgid.link/r/20240110085403.457089-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown commit 574bf7bbe83794a902679846770f75a9b7f28176 Author: Kamal Dasu Date: Tue Jan 9 16:00:32 2024 -0500 spi: bcm-qspi: fix SFDP BFPT read by usig mspi read SFDP read shall use the mspi reads when using the bcm_qspi_exec_mem_op() call. This fixes SFDP parameter page read failures seen with parts that now use SFDP protocol to read the basic flash parameter table. Fixes: 5f195ee7d830 ("spi: bcm-qspi: Implement the spi_mem interface") Signed-off-by: Kamal Dasu Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://msgid.link/r/20240109210033.43249-1-kamal.dasu@broadcom.com Signed-off-by: Mark Brown commit 435e202d645c197dcfd39d7372eb2a56529b6640 Author: Zhengchao Shao Date: Mon Jan 22 18:20:01 2024 +0800 ipv6: init the accept_queue's spinlocks in inet6_create In commit 198bc90e0e73("tcp: make sure init the accept_queue's spinlocks once"), the spinlocks of accept_queue are initialized only when socket is created in the inet4 scenario. The locks are not initialized when socket is created in the inet6 scenario. The kernel reports the following error: INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trace: dump_stack_lvl (lib/dump_stack.c:107) register_lock_class (kernel/locking/lockdep.c:1289) __lock_acquire (kernel/locking/lockdep.c:5015) lock_acquire.part.0 (kernel/locking/lockdep.c:5756) _raw_spin_lock_bh (kernel/locking/spinlock.c:178) inet_csk_listen_stop (net/ipv4/inet_connection_sock.c:1386) tcp_disconnect (net/ipv4/tcp.c:2981) inet_shutdown (net/ipv4/af_inet.c:935) __sys_shutdown (./include/linux/file.h:32 net/socket.c:2438) __x64_sys_shutdown (net/socket.c:2445) do_syscall_64 (arch/x86/entry/common.c:52) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:129) RIP: 0033:0x7f52ecd05a3d Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ab a3 0e 00 f7 d8 64 89 01 48 RSP: 002b:00007f52ecf5dde8 EFLAGS: 00000293 ORIG_RAX: 0000000000000030 RAX: ffffffffffffffda RBX: 00007f52ecf5e640 RCX: 00007f52ecd05a3d RDX: 00007f52ecc8b188 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f52ecf5de20 R08: 00007ffdae45c69f R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 00007f52ecf5e640 R13: 0000000000000000 R14: 00007f52ecc8b060 R15: 00007ffdae45c6e0 Fixes: 198bc90e0e73 ("tcp: make sure init the accept_queue's spinlocks once") Signed-off-by: Zhengchao Shao Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240122102001.2851701-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni commit c41336f4d69057cbf88fed47951379b384540df5 Author: Eugen Hristev Date: Mon Dec 25 15:36:15 2023 +0200 pmdomain: mediatek: fix race conditions with genpd If the power domains are registered first with genpd and *after that* the driver attempts to power them on in the probe sequence, then it is possible that a race condition occurs if genpd tries to power them on in the same time. The same is valid for powering them off before unregistering them from genpd. Attempt to fix race conditions by first removing the domains from genpd and *after that* powering down domains. Also first power up the domains and *after that* register them to genpd. Fixes: 59b644b01cf4 ("soc: mediatek: Add MediaTek SCPSYS power domains") Signed-off-by: Eugen Hristev Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20231225133615.78993-1-eugen.hristev@collabora.com Signed-off-by: Ulf Hansson commit 420332b94119cdc7db4477cc88484691cb92ae71 Author: Amir Goldstein Date: Sat Jan 20 12:18:39 2024 +0200 ovl: mark xwhiteouts directory with overlay.opaque='x' An opaque directory cannot have xwhiteouts, so instead of marking an xwhiteouts directory with a new xattr, overload overlay.opaque xattr for marking both opaque dir ('y') and xwhiteouts dir ('x'). This is more efficient as the overlay.opaque xattr is checked during lookup of directory anyway. This also prevents unnecessary checking the xattr when reading a directory without xwhiteouts, i.e. most of the time. Note that the xwhiteouts marker is not checked on the upper layer and on the last layer in lowerstack, where xwhiteouts are not expected. Fixes: bc8df7a3dc03 ("ovl: Add an alternative type of whiteout") Cc: # v6.7 Reviewed-by: Alexander Larsson Tested-by: Alexander Larsson Signed-off-by: Amir Goldstein commit 26dd6a5667f500c5d991f90a9ac5998a71afaf5c Author: Kai-Heng Feng Date: Mon Jan 15 12:50:51 2024 +0800 HID: i2c-hid: Skip SET_POWER SLEEP for Cirque touchpad on system suspend There's a Cirque touchpad that wakes system up without anything touched the touchpad. The input report is empty when this happens. The reason is stated in HID over I2C spec, 7.2.8.2: "If the DEVICE wishes to wake the HOST from its low power state, it can issue a wake by asserting the interrupt." This is fine if OS can put system back to suspend by identifying input wakeup count stays the same on resume, like Chrome OS Dark Resume [0]. But for regular distro such policy is lacking. Though the change doesn't bring any impact on power consumption for touchpad is minimal, other i2c-hid device may depends on SLEEP control power. So use a quirk to limit the change scope. [0] https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/power_manager/docs/dark_resume.md Signed-off-by: Kai-Heng Feng Reviewed-by: Douglas Anderson Signed-off-by: Jiri Kosina commit b6eda11c44dc89a681e1c105f0f4660e69b1e183 Author: Kunwu Chan Date: Fri Jan 19 14:07:14 2024 +0800 HID: nvidia-shield: Add missing null pointer checks to LED initialization devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. [jkosina@suse.com: tweak changelog a bit] Signed-off-by: Kunwu Chan Reviewed-by: Rahul Rameshbabu Signed-off-by: Jiri Kosina commit 234ec0b6034b16869d45128b8cd2dc6ffe596f04 Author: Zhengchao Shao Date: Mon Jan 22 09:18:07 2024 +0800 netlink: fix potential sleeping issue in mqueue_flush_file I analyze the potential sleeping issue of the following processes: Thread A Thread B ... netlink_create //ref = 1 do_mq_notify ... sock = netlink_getsockbyfilp ... //ref = 2 info->notify_sock = sock; ... ... netlink_sendmsg ... skb = netlink_alloc_large_skb //skb->head is vmalloced ... netlink_unicast ... sk = netlink_getsockbyportid //ref = 3 ... netlink_sendskb ... __netlink_sendskb ... skb_queue_tail //put skb to sk_receive_queue ... sock_put //ref = 2 ... ... ... netlink_release ... deferred_put_nlk_sk //ref = 1 mqueue_flush_file spin_lock remove_notification netlink_sendskb sock_put //ref = 0 sk_free ... __sk_destruct netlink_sock_destruct skb_queue_purge //get skb from sk_receive_queue ... __skb_queue_purge_reason kfree_skb_reason __kfree_skb ... skb_release_all skb_release_head_state netlink_skb_destructor vfree(skb->head) //sleeping while holding spinlock In netlink_sendmsg, if the memory pointed to by skb->head is allocated by vmalloc, and is put to sk_receive_queue queue, also the skb is not freed. When the mqueue executes flush, the sleeping bug will occur. Use vfree_atomic instead of vfree in netlink_skb_destructor to solve the issue. Fixes: c05cdb1b864f ("netlink: allow large data transfers from user-space") Signed-off-by: Zhengchao Shao Link: https://lore.kernel.org/r/20240122011807.2110357-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni commit 090e3bec01763e415bccae445f5bfe3d0c61b629 Author: Tony Luck Date: Wed Jan 17 11:18:44 2024 -0800 x86/cpu: Add model number for Intel Clearwater Forest processor Server product based on the Atom Darkmont core. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240117191844.56180-1-tony.luck@intel.com commit 3e4147f33f8b647775357bae0248b9a2aeebfcd2 Author: Borislav Petkov (AMD) Date: Thu Jan 4 21:11:37 2024 +0100 x86/CPU/AMD: Add X86_FEATURE_ZEN5 Add a synthetic feature flag for Zen5. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240104201138.5072-1-bp@alien8.de commit 97de5a15edf2d22184f5ff588656030bbb7fa358 Author: Kuniyuki Iwashima Date: Fri Jan 19 19:16:42 2024 -0800 selftest: Don't reuse port for SO_INCOMING_CPU test. Jakub reported that ASSERT_EQ(cpu, i) in so_incoming_cpu.c seems to fire somewhat randomly. # # RUN so_incoming_cpu.before_reuseport.test3 ... # # so_incoming_cpu.c:191:test3:Expected cpu (32) == i (0) # # test3: Test terminated by assertion # # FAIL so_incoming_cpu.before_reuseport.test3 # not ok 3 so_incoming_cpu.before_reuseport.test3 When the test failed, not-yet-accepted CLOSE_WAIT sockets received SYN with a "challenging" SEQ number, which was sent from an unexpected CPU that did not create the receiver. The test basically does: 1. for each cpu: 1-1. create a server 1-2. set SO_INCOMING_CPU 2. for each cpu: 2-1. set cpu affinity 2-2. create some clients 2-3. let clients connect() to the server on the same cpu 2-4. close() clients 3. for each server: 3-1. accept() all child sockets 3-2. check if all children have the same SO_INCOMING_CPU with the server The root cause was the close() in 2-4. and net.ipv4.tcp_tw_reuse. In a loop of 2., close() changed the client state to FIN_WAIT_2, and the peer transitioned to CLOSE_WAIT. In another loop of 2., connect() happened to select the same port of the FIN_WAIT_2 socket, and it was reused as the default value of net.ipv4.tcp_tw_reuse is 2. As a result, the new client sent SYN to the CLOSE_WAIT socket from a different CPU, and the receiver's sk_incoming_cpu was overwritten with unexpected CPU ID. Also, the SYN had a different SEQ number, so the CLOSE_WAIT socket responded with Challenge ACK. The new client properly returned RST and effectively killed the CLOSE_WAIT socket. This way, all clients were created successfully, but the error was detected later by 3-2., ASSERT_EQ(cpu, i). To avoid the failure, let's make sure that (i) the number of clients is less than the number of available ports and (ii) such reuse never happens. Fixes: 6df96146b202 ("selftest: Add test for SO_INCOMING_CPU.") Reported-by: Jakub Kicinski Signed-off-by: Kuniyuki Iwashima Tested-by: Jakub Kicinski Link: https://lore.kernel.org/r/20240120031642.67014-1-kuniyu@amazon.com Signed-off-by: Paolo Abeni commit 7267e8dcad6b2f9fce05a6a06335d7040acbc2b6 Author: Salvatore Dipietro Date: Fri Jan 19 11:01:33 2024 -0800 tcp: Add memory barrier to tcp_push() On CPUs with weak memory models, reads and updates performed by tcp_push to the sk variables can get reordered leaving the socket throttled when it should not. The tasklet running tcp_wfree() may also not observe the memory updates in time and will skip flushing any packets throttled by tcp_push(), delaying the sending. This can pathologically cause 40ms extra latency due to bad interactions with delayed acks. Adding a memory barrier in tcp_push removes the bug, similarly to the previous commit bf06200e732d ("tcp: tsq: fix nonagle handling"). smp_mb__after_atomic() is used to not incur in unnecessary overhead on x86 since not affected. Patch has been tested using an AWS c7g.2xlarge instance with Ubuntu 22.04 and Apache Tomcat 9.0.83 running the basic servlet below: import java.io.IOException; import java.io.OutputStreamWriter; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class HelloWorldServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=utf-8"); OutputStreamWriter osw = new OutputStreamWriter(response.getOutputStream(),"UTF-8"); String s = "a".repeat(3096); osw.write(s,0,s.length()); osw.flush(); } } Load was applied using wrk2 (https://github.com/kinvolk/wrk2) from an AWS c6i.8xlarge instance. Before the patch an additional 40ms latency from P99.99+ values is observed while, with the patch, the extra latency disappears. No patch and tcp_autocorking=1 ./wrk -t32 -c128 -d40s --latency -R10000 http://172.31.60.173:8080/hello/hello ... 50.000% 0.91ms 75.000% 1.13ms 90.000% 1.46ms 99.000% 1.74ms 99.900% 1.89ms 99.990% 41.95ms <<< 40+ ms extra latency 99.999% 48.32ms 100.000% 48.96ms With patch and tcp_autocorking=1 ./wrk -t32 -c128 -d40s --latency -R10000 http://172.31.60.173:8080/hello/hello ... 50.000% 0.90ms 75.000% 1.13ms 90.000% 1.45ms 99.000% 1.72ms 99.900% 1.83ms 99.990% 2.11ms <<< no 40+ ms extra latency 99.999% 2.53ms 100.000% 2.62ms Patch has been also tested on x86 (m7i.2xlarge instance) which it is not affected by this issue and the patch doesn't introduce any additional delay. Fixes: 7aa5470c2c09 ("tcp: tsq: move tsq_flags close to sk_wmem_alloc") Signed-off-by: Salvatore Dipietro Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240119190133.43698-1-dipiets@amazon.com Signed-off-by: Paolo Abeni commit a969210066054ea109d8b7aff29a9b1c98776841 Author: Julian Sikorski Date: Tue Jan 23 09:49:35 2024 +0100 ALSA: usb-audio: Add a quirk for Yamaha YIT-W12TX transmitter The device fails to initialize otherwise, giving the following error: [ 3676.671641] usb 2-1.1: 1:1: cannot get freq at ep 0x1 Signed-off-by: Julian Sikorski Cc: Link: https://lore.kernel.org/r/20240123084935.2745-1-belegdol+github@gmail.com Signed-off-by: Takashi Iwai commit 4b088005c897a62fe98f70ab69687706cb2fad3b Author: Helge Deller Date: Mon Jan 22 21:26:33 2024 +0100 fbdev: stifb: Fix crash in stifb_blank() Avoid a kernel crash in stifb by providing the correct pointer to the fb_info struct. Prior to commit e2e0b838a184 ("video/sticore: Remove info field from STI struct") the fb_info struct was at the beginning of the fb struct. Fixes: e2e0b838a184 ("video/sticore: Remove info field from STI struct") Signed-off-by: Helge Deller Cc: Thomas Zimmermann commit a2ed0a44d637ef9deca595054c206da7d6cbdcbc Author: Vitaly Rodionov Date: Mon Jan 22 18:47:10 2024 +0000 ALSA: hda/cs8409: Suppress vmaster control for Dolphin models Customer has reported an issue with specific desktop platform where two CS42L42 codecs are connected to CS8409 HDA bridge. If "Master Volume Control" is created then on Ubuntu OS UCM left/right balance slider in UI audio settings has no effect. This patch will fix this issue for a target paltform. Fixes: 20e507724113 ("ALSA: hda/cs8409: Add support for dolphin") Signed-off-by: Vitaly Rodionov Cc: Link: https://lore.kernel.org/r/20240122184710.5802-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 56beedc88405fd8022edfd1c2e63d1bc6c95efcb Author: Rui Salvaterra Date: Mon Jan 22 11:45:13 2024 +0000 ALSA: hda: Increase default bdl_pos_adj for Apollo Lake Apollo Lake seems to also suffer from IRQ timing issues. After being up for ~4 minutes, a Pentium N4200 system ends up falling back to workqueue-based IRQ handling: [ 208.019906] snd_hda_intel 0000:00:0e.0: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj. Unfortunately, the Baytrail and Braswell workaround value of 32 samples isn't enough to fix the issue here. Default to 64 samples. Signed-off-by: Rui Salvaterra Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20240122114512.55808-3-rsalvaterra@gmail.com Signed-off-by: Takashi Iwai commit 3526860f26febbe46960f9b37f5dbd5ccc109ea8 Author: Rui Salvaterra Date: Mon Jan 22 11:45:12 2024 +0000 ALSA: hda: Replace numeric device IDs with constant values We have self-explanatory constants for Intel HDA devices, let's use them instead of magic numbers and code comments. Signed-off-by: Rui Salvaterra Reviewed-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20240122114512.55808-2-rsalvaterra@gmail.com Signed-off-by: Takashi Iwai commit f0b7a0d1d46625db5b0e631c05ae96d78eda6c70 Merge: 5aa1c96e8ef34 6613476e225e0 Author: Andrew Morton Date: Mon Jan 22 19:23:56 2024 -0800 Merge branch 'master' into mm-hotfixes-stable commit 7ed2632ec7d72e926b9e8bcc9ad1bb0cd37274bf Author: Fedor Pchelkin Date: Sun Jan 14 00:33:45 2024 +0300 drm/ttm: fix ttm pool initialization for no-dma-device drivers The QXL driver doesn't use any device for DMA mappings or allocations so dev_to_node() will panic inside ttm_device_init() on NUMA systems: general protection fault, probably for non-canonical address 0xdffffc000000007a: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x00000000000003d0-0x00000000000003d7] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.7.0+ #9 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014 RIP: 0010:ttm_device_init+0x10e/0x340 Call Trace: qxl_ttm_init+0xaa/0x310 qxl_device_init+0x1071/0x2000 qxl_pci_probe+0x167/0x3f0 local_pci_probe+0xe1/0x1b0 pci_device_probe+0x29d/0x790 really_probe+0x251/0x910 __driver_probe_device+0x1ea/0x390 driver_probe_device+0x4e/0x2e0 __driver_attach+0x1e3/0x600 bus_for_each_dev+0x12d/0x1c0 bus_add_driver+0x25a/0x590 driver_register+0x15c/0x4b0 qxl_pci_driver_init+0x67/0x80 do_one_initcall+0xf5/0x5d0 kernel_init_freeable+0x637/0xb10 kernel_init+0x1c/0x2e0 ret_from_fork+0x48/0x80 ret_from_fork_asm+0x1b/0x30 RIP: 0010:ttm_device_init+0x10e/0x340 Fall back to NUMA_NO_NODE if there is no device for DMA. Found by Linux Verification Center (linuxtesting.org). Fixes: b0a7ce53d494 ("drm/ttm: Schedule delayed_delete worker closer") Signed-off-by: Fedor Pchelkin Reviewed-by: Christian König Reported-by: Steven Rostedt Cc: Rajneesh Bhardwaj Cc: Felix Kuehling Signed-off-by: Linus Torvalds commit e01a83e12604aa2f8d4ab359ec44e341a2248b4a Author: Linus Torvalds Date: Mon Jan 22 15:39:01 2024 -0800 Revert "btrfs: zstd: fix and simplify the inline extent decompression" This reverts commit 1e7f6def8b2370ecefb54b3c8f390ff894b0c51b. It causes my machine to not even boot, and Klara Modin reports that the cause is that small zstd-compressed files return garbage when read. Reported-by: Klara Modin Link: https://lore.kernel.org/linux-btrfs/CABq1_vj4GpUeZpVG49OHCo-3sdbe2-2ROcu_xDvUG-6-5zPRXg@mail.gmail.com/ Reported-and-bisected-by: Linus Torvalds Acked-by: David Sterba Cc: Qu Wenruo Signed-off-by: Linus Torvalds commit b90493505347a4ca4d900f317e2b330e0e43ae2f Author: David Howells Date: Wed Jan 17 15:49:26 2024 +0000 afs: Fix missing/incorrect unlocking of RCU read lock In afs_proc_addr_prefs_show(), we need to unlock the RCU read lock in both places before returning (and not lock it again). Fixes: f94f70d39cc2 ("afs: Provide a way to configure address priorities") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202401172243.cd53d5f6-oliver.sang@intel.com Signed-off-by: David Howells cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org commit cfcc005dbcc79f1e6bddc6fd4b3e8a1163a6d181 Author: David Howells Date: Fri Jan 12 21:59:44 2024 +0000 afs: Remove afs_dynroot_d_revalidate() as it is redundant Remove afs_dynroot_d_revalidate() as it is redundant as all it does is return 1 and the caller assumes that if the op is not given. Suggested-by: Alexander Viro Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org commit 17ba6f0bd14fe3ac606aac6bebe5e69bdaad8ba1 Author: David Howells Date: Tue Jan 2 14:02:37 2024 +0000 afs: Fix error handling with lookup via FS.InlineBulkStatus When afs does a lookup, it tries to use FS.InlineBulkStatus to preemptively look up a bunch of files in the parent directory and cache this locally, on the basis that we might want to look at them too (for example if someone does an ls on a directory, they may want want to then stat every file listed). FS.InlineBulkStatus can be considered a compound op with the normal abort code applying to the compound as a whole. Each status fetch within the compound is then given its own individual abort code - but assuming no error that prevents the bulk fetch from returning the compound result will be 0, even if all the constituent status fetches failed. At the conclusion of afs_do_lookup(), we should use the abort code from the appropriate status to determine the error to return, if any - but instead it is assumed that we were successful if the op as a whole succeeded and we return an incompletely initialised inode, resulting in ENOENT, no matter the actual reason. In the particular instance reported, a vnode with no permission granted to be accessed is being given a UAEACCES abort code which should be reported as EACCES, but is instead being reported as ENOENT. Fix this by abandoning the inode (which will be cleaned up with the op) if file[1] has an abort code indicated and turn that abort code into an error instead. Whilst we're at it, add a tracepoint so that the abort codes of the individual subrequests of FS.InlineBulkStatus can be logged. At the moment only the container abort code can be 0. Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Reported-by: Jeffrey Altman Signed-off-by: David Howells Reviewed-by: Marc Dionne cc: linux-afs@lists.infradead.org commit 57e9d49c54528c49b8bffe6d99d782ea051ea534 Author: David Howells Date: Mon Jan 8 17:22:36 2024 +0000 afs: Hide silly-rename files from userspace There appears to be a race between silly-rename files being created/removed and various userspace tools iterating over the contents of a directory, leading to such errors as: find: './kernel/.tmp_cpio_dir/include/dt-bindings/reset/.__afs2080': No such file or directory tar: ./include/linux/greybus/.__afs3C95: File removed before we read it when building a kernel. Fix afs_readdir() so that it doesn't return .__afsXXXX silly-rename files to userspace. This doesn't stop them being looked up directly by name as we need to be able to look them up from within the kernel as part of the silly-rename algorithm. Fixes: 79ddbfa500b3 ("afs: Implement sillyrename for unlink and rename") Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit c3d6569a43322f371e7ba0ad386112723757ac8f Author: David Howells Date: Fri Jan 19 20:49:34 2024 +0000 cachefiles, erofs: Fix NULL deref in when cachefiles is not doing ondemand-mode cachefiles_ondemand_init_object() as called from cachefiles_open_file() and cachefiles_create_tmpfile() does not check if object->ondemand is set before dereferencing it, leading to an oops something like: RIP: 0010:cachefiles_ondemand_init_object+0x9/0x41 ... Call Trace: cachefiles_open_file+0xc9/0x187 cachefiles_lookup_cookie+0x122/0x2be fscache_cookie_state_machine+0xbe/0x32b fscache_cookie_worker+0x1f/0x2d process_one_work+0x136/0x208 process_scheduled_works+0x3a/0x41 worker_thread+0x1a2/0x1f6 kthread+0xca/0xd2 ret_from_fork+0x21/0x33 Fix this by making cachefiles_ondemand_init_object() return immediately if cachefiles->ondemand is NULL. Fixes: 3c5ecfe16e76 ("cachefiles: extract ondemand info field from cachefiles_object") Reported-by: Marc Dionne Signed-off-by: David Howells cc: Gao Xiang cc: Chao Yu cc: Yue Hu cc: Jeffle Xu cc: linux-erofs@lists.ozlabs.org cc: netfs@lists.linux.dev cc: linux-fsdevel@vger.kernel.org commit 2b44760609e9eaafc9d234a6883d042fc21132a7 Author: Petr Pavlu Date: Mon Jan 22 16:09:28 2024 +0100 tracing: Ensure visibility when inserting an element into tracing_map Running the following two commands in parallel on a multi-processor AArch64 machine can sporadically produce an unexpected warning about duplicate histogram entries: $ while true; do echo hist:key=id.syscall:val=hitcount > \ /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/trigger cat /sys/kernel/debug/tracing/events/raw_syscalls/sys_enter/hist sleep 0.001 done $ stress-ng --sysbadaddr $(nproc) The warning looks as follows: [ 2911.172474] ------------[ cut here ]------------ [ 2911.173111] Duplicates detected: 1 [ 2911.173574] WARNING: CPU: 2 PID: 12247 at kernel/trace/tracing_map.c:983 tracing_map_sort_entries+0x3e0/0x408 [ 2911.174702] Modules linked in: iscsi_ibft(E) iscsi_boot_sysfs(E) rfkill(E) af_packet(E) nls_iso8859_1(E) nls_cp437(E) vfat(E) fat(E) ena(E) tiny_power_button(E) qemu_fw_cfg(E) button(E) fuse(E) efi_pstore(E) ip_tables(E) x_tables(E) xfs(E) libcrc32c(E) aes_ce_blk(E) aes_ce_cipher(E) crct10dif_ce(E) polyval_ce(E) polyval_generic(E) ghash_ce(E) gf128mul(E) sm4_ce_gcm(E) sm4_ce_ccm(E) sm4_ce(E) sm4_ce_cipher(E) sm4(E) sm3_ce(E) sm3(E) sha3_ce(E) sha512_ce(E) sha512_arm64(E) sha2_ce(E) sha256_arm64(E) nvme(E) sha1_ce(E) nvme_core(E) nvme_auth(E) t10_pi(E) sg(E) scsi_mod(E) scsi_common(E) efivarfs(E) [ 2911.174738] Unloaded tainted modules: cppc_cpufreq(E):1 [ 2911.180985] CPU: 2 PID: 12247 Comm: cat Kdump: loaded Tainted: G E 6.7.0-default #2 1b58bbb22c97e4399dc09f92d309344f69c44a01 [ 2911.182398] Hardware name: Amazon EC2 c7g.8xlarge/, BIOS 1.0 11/1/2018 [ 2911.183208] pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--) [ 2911.184038] pc : tracing_map_sort_entries+0x3e0/0x408 [ 2911.184667] lr : tracing_map_sort_entries+0x3e0/0x408 [ 2911.185310] sp : ffff8000a1513900 [ 2911.185750] x29: ffff8000a1513900 x28: ffff0003f272fe80 x27: 0000000000000001 [ 2911.186600] x26: ffff0003f272fe80 x25: 0000000000000030 x24: 0000000000000008 [ 2911.187458] x23: ffff0003c5788000 x22: ffff0003c16710c8 x21: ffff80008017f180 [ 2911.188310] x20: ffff80008017f000 x19: ffff80008017f180 x18: ffffffffffffffff [ 2911.189160] x17: 0000000000000000 x16: 0000000000000000 x15: ffff8000a15134b8 [ 2911.190015] x14: 0000000000000000 x13: 205d373432323154 x12: 5b5d313131333731 [ 2911.190844] x11: 00000000fffeffff x10: 00000000fffeffff x9 : ffffd1b78274a13c [ 2911.191716] x8 : 000000000017ffe8 x7 : c0000000fffeffff x6 : 000000000057ffa8 [ 2911.192554] x5 : ffff0012f6c24ec0 x4 : 0000000000000000 x3 : ffff2e5b72b5d000 [ 2911.193404] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0003ff254480 [ 2911.194259] Call trace: [ 2911.194626] tracing_map_sort_entries+0x3e0/0x408 [ 2911.195220] hist_show+0x124/0x800 [ 2911.195692] seq_read_iter+0x1d4/0x4e8 [ 2911.196193] seq_read+0xe8/0x138 [ 2911.196638] vfs_read+0xc8/0x300 [ 2911.197078] ksys_read+0x70/0x108 [ 2911.197534] __arm64_sys_read+0x24/0x38 [ 2911.198046] invoke_syscall+0x78/0x108 [ 2911.198553] el0_svc_common.constprop.0+0xd0/0xf8 [ 2911.199157] do_el0_svc+0x28/0x40 [ 2911.199613] el0_svc+0x40/0x178 [ 2911.200048] el0t_64_sync_handler+0x13c/0x158 [ 2911.200621] el0t_64_sync+0x1a8/0x1b0 [ 2911.201115] ---[ end trace 0000000000000000 ]--- The problem appears to be caused by CPU reordering of writes issued from __tracing_map_insert(). The check for the presence of an element with a given key in this function is: val = READ_ONCE(entry->val); if (val && keys_match(key, val->key, map->key_size)) ... The write of a new entry is: elt = get_free_elt(map); memcpy(elt->key, key, map->key_size); entry->val = elt; The "memcpy(elt->key, key, map->key_size);" and "entry->val = elt;" stores may become visible in the reversed order on another CPU. This second CPU might then incorrectly determine that a new key doesn't match an already present val->key and subsequently insert a new element, resulting in a duplicate. Fix the problem by adding a write barrier between "memcpy(elt->key, key, map->key_size);" and "entry->val = elt;", and for good measure, also use WRITE_ONCE(entry->val, elt) for publishing the element. The sequence pairs with the mentioned "READ_ONCE(entry->val);" and the "val->key" check which has an address dependency. The barrier is placed on a path executed when adding an element for a new key. Subsequent updates targeting the same key remain unaffected. From the user's perspective, the issue was introduced by commit c193707dde77 ("tracing: Remove code which merges duplicates"), which followed commit cbf4100efb8f ("tracing: Add support to detect and avoid duplicates"). The previous code operated differently; it inherently expected potential races which result in duplicates but merged them later when they occurred. Link: https://lore.kernel.org/linux-trace-kernel/20240122150928.27725-1-petr.pavlu@suse.com Fixes: c193707dde77 ("tracing: Remove code which merges duplicates") Signed-off-by: Petr Pavlu Acked-by: Tom Zanussi Signed-off-by: Steven Rostedt (Google) commit 843609df0be792991b3c4a720d6be4828d48dec4 Author: Dan Carpenter Date: Wed Jan 10 21:54:42 2024 +0300 netfs: Fix a NULL vs IS_ERR() check in netfs_perform_write() The netfs_grab_folio_for_write() function doesn't return NULL, it returns error pointers. Update the check accordingly. Fixes: c38f4e96e605 ("netfs: Provide func to copy data to pagecache for buffered write") Signed-off-by: Dan Carpenter Signed-off-by: David Howells Link: https://lore.kernel.org/r/29fb1310-8e2d-47ba-b68d-40354eb7b896@moroto.mountain/ commit 3be0b3ed1d76c6703b9ee482b55f7e01c369cc68 Author: Dan Carpenter Date: Fri Jan 12 09:59:41 2024 +0300 netfs, fscache: Prevent Oops in fscache_put_cache() This function dereferences "cache" and then checks if it's IS_ERR_OR_NULL(). Check first, then dereference. Fixes: 9549332df4ed ("fscache: Implement cache registration") Signed-off-by: Dan Carpenter Signed-off-by: David Howells Link: https://lore.kernel.org/r/e84bc740-3502-4f16-982a-a40d5676615c@moroto.mountain/ # v2 commit c40497d82387188f14d9adc4caa58ee1cb1999e1 Author: David Howells Date: Tue Jan 9 17:54:35 2024 +0000 cifs: Don't use certain unnecessary folio_*() functions Filesystems should use folio->index and folio->mapping, instead of folio_index(folio), folio_mapping() and folio_file_mapping() since they know that it's in the pagecache. Change this automagically with: perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/smb/client/*.c perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/smb/client/*.c perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/smb/client/*.c Reported-by: Matthew Wilcox Signed-off-by: David Howells cc: Jeff Layton cc: Steve French cc: Paulo Alcantara cc: Ronnie Sahlberg cc: Shyam Prasad N cc: Tom Talpey cc: linux-cifs@vger.kernel.org cc: linux-fsdevel@vger.kernel.org commit fa7d614da3c556c7ef71023cb8c410a3e8571a42 Author: David Howells Date: Tue Jan 9 17:51:08 2024 +0000 afs: Don't use certain unnecessary folio_*() functions Filesystems should use folio->index and folio->mapping, instead of folio_index(folio), folio_mapping() and folio_file_mapping() since they know that it's in the pagecache. Change this automagically with: perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/afs/*.c perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/afs/*.c perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/afs/*.c Reported-by: Matthew Wilcox Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org commit 202bc57b675601bc07b5942369ecc16af64d1b95 Author: David Howells Date: Tue Jan 9 17:17:36 2024 +0000 netfs: Don't use certain unnecessary folio_*() functions Filesystems should use folio->index and folio->mapping, instead of folio_index(folio), folio_mapping() and folio_file_mapping() since they know that it's in the pagecache. Change this automagically with: perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/netfs/*.c perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/netfs/*.c perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/netfs/*.c Reported-by: Matthew Wilcox Signed-off-by: David Howells cc: Jeff Layton cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-cifs@vger.kernel.org cc: linux-erofs@lists.ozlabs.org cc: linux-fsdevel@vger.kernel.org commit 7c70825d1603001e09907b383ed5d1bd283d61a0 Merge: 7c834a7265960 aafa3acf62f1f Author: Mark Brown Date: Mon Jan 22 21:54:30 2024 +0000 ASoC: qcom: volume fixes and codec cleanups Merge series from Johan Hovold : To reduce the risk of speaker damage the PA gain needs to be limited on machines like the Lenovo Thinkpad X13s until we have active speaker protection in place. Limit the gain to the current default setting provided by the UCM configuration which most user have so far been using (due to a bug in the configuration files which prevented hardware volume control [1]). The wsa883x PA volume control also turned out to be broken, which meant that the default setting used by UCM configuration is actually the lowest level (-3 dB). With the codec driver fixed, hardware volume control also works as expected. Note that the new wsa884x driver most likely suffers from a similar bug, I'll send a fix for that once I've got that confirmed. Included is also a related fix for the LPASS WSA macro driver, which was changing the digital gain setting behind the back of user space and which can result in excessive (or too low) digital gain. There are further Qualcomm codec drivers that similarly appear to manipulate various gain settings, but on closer inspection it turns out that they only write back the current settings. Tests reveal that these writes are indeed needed for any prior updates to take effect (at least for the WSA and RX macros). [1] https://github.com/alsa-project/alsa-ucm-conf/pull/382 commit 7c834a7265960545b17b5703e8510691350faf97 Merge: c481016bb4f8a 8c99a0a607b5e Author: Mark Brown Date: Mon Jan 22 21:54:23 2024 +0000 ASoC: codecs: fix ES8326 performance and pop noise Merge series from Zhu Ning : We get some issues regarding crosstalk, THD+N performance and pop noise from customer's project. commit 018856c3f171517c66d5d7d3755ae0c517924fd7 Author: Geert Uytterhoeven Date: Mon Jan 22 16:04:58 2024 +0100 fbcon: Fix incorrect printed function name in fbcon_prepare_logo() If the boot logo does not fit, a message is printed, including a wrong function name prefix. Instead of correcting the function name (or using __func__), just use "fbcon", like is done in several other messages. While at it, modernize the call by switching to pr_info(). Signed-off-by: Geert Uytterhoeven Signed-off-by: Helge Deller commit 5d9248eed48054bf26b3d5ad3d7073a356a17d19 Merge: 610347effc2ec 7f2d219e78e95 Author: Linus Torvalds Date: Mon Jan 22 13:29:42 2024 -0800 Merge tag 'for-6.8-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - zoned mode fixes: - fix slowdown when writing large file sequentially by looking up block groups with enough space faster - locking fixes when activating a zone - new mount API fixes: - preserve mount options for a ro/rw mount of the same subvolume - scrub fixes: - fix use-after-free in case the chunk length is not aligned to 64K, this does not happen normally but has been reported on images converted from ext4 - similar alignment check was missing with raid-stripe-tree - subvolume deletion fixes: - prevent calling ioctl on already deleted subvolume - properly track flag tracking a deleted subvolume - in subpage mode, fix decompression of an inline extent (zlib, lzo, zstd) - fix crash when starting writeback on a folio, after integration with recent MM changes this needs to be started conditionally - reject unknown flags in defrag ioctl - error handling, API fixes, minor warning fixes * tag 'for-6.8-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: scrub: limit RST scrub to chunk boundary btrfs: scrub: avoid use-after-free when chunk length is not 64K aligned btrfs: don't unconditionally call folio_start_writeback in subpage btrfs: use the original mount's mount options for the legacy reconfigure btrfs: don't warn if discard range is not aligned to sector btrfs: tree-checker: fix inline ref size in error messages btrfs: zstd: fix and simplify the inline extent decompression btrfs: lzo: fix and simplify the inline extent decompression btrfs: zlib: fix and simplify the inline extent decompression btrfs: defrag: reject unknown flags of btrfs_ioctl_defrag_range_args btrfs: avoid copying BTRFS_ROOT_SUBVOL_DEAD flag to snapshot of subvolume being deleted btrfs: don't abort filesystem when attempting to snapshot deleted subvolume btrfs: zoned: fix lock ordering in btrfs_zone_activate() btrfs: fix unbalanced unlock of mapping_tree_lock btrfs: ref-verify: free ref cache before clearing mount opt btrfs: fix kvcalloc() arguments order in btrfs_ioctl_send() btrfs: zoned: optimize hint byte for zoned allocator btrfs: zoned: factor out prepare_allocation_zoned() commit 73ae7e1c7644a8c33ba526302a10267cdbc249f8 Author: Niklas Cassel Date: Thu Jan 11 17:57:44 2024 +0100 ata: libata-sata: improve sysfs description for ATA_LPM_UNKNOWN Currently, both ATA_LPM_UNKNOWN (0) and ATA_LPM_MAX_POWER (1) displays as "max_performance" in sysfs. This is quite misleading as they are not the same. For ATA_LPM_UNKNOWN, ata_eh_set_lpm() will not be called at all, leaving the configuration in unknown state. For ATA_LPM_MAX_POWER, ata_eh_set_lpm() is called, and setting the policy to ATA_LPM_MAX_POWER. This also matches the description of the SATA_MOBILE_LPM_POLICY Kconfig: 0 => Keep firmware settings 1 => Maximum performance Thus, update the sysfs description for ATA_LPM_UNKNOWN to match reality. While at it, update libata.h to mention that the ascii descriptions are in libata-sata.c and not in libata-scsi.c. Reviewed-by: Damien Le Moal Signed-off-by: Niklas Cassel commit 84c39ec57d409e803a9bb6e4e85daf1243e0e80b Author: Bernd Edlinger Date: Mon Jan 22 19:34:21 2024 +0100 exec: Fix error handling in begin_new_exec() If get_unused_fd_flags() fails, the error handling is incomplete because bprm->cred is already set to NULL, and therefore free_bprm will not unlock the cred_guard_mutex. Note there are two error conditions which end up here, one before and one after bprm->cred is cleared. Fixes: b8a61c9e7b4a ("exec: Generic execfd support") Signed-off-by: Bernd Edlinger Acked-by: Eric W. Biederman Link: https://lore.kernel.org/r/AS8P193MB128517ADB5EFF29E04389EDAE4752@AS8P193MB1285.EURP193.PROD.OUTLOOK.COM Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit 52998cdd8d3438df9a77c858a827b8932da1bb28 Merge: 6613476e225e0 7d1ae55ffed0f Author: Martin K. Petersen Date: Mon Jan 22 15:49:29 2024 -0500 Merge branch '6.8/scsi-staging' into 6.8/scsi-fixes Pull in staged fixes for 6.8. Signed-off-by: Martin K. Petersen commit afa6ac2690bb9904ff883c6e942281e1032a484d Author: Jiri Kosina Date: Mon Jan 22 21:32:01 2024 +0100 HID: logitech-hidpp: add support for Logitech G Pro X Superlight 2 Let logitech-hidpp driver claim Logitech G Pro X Superlight 2. Reported-by: Marcus Rückert Signed-off-by: Jiri Kosina commit bdd8f62431ebcf15902a5fce3336388e436405c6 Author: Kees Cook Date: Fri Sep 16 17:11:18 2022 -0700 exec: Add do_close_execat() helper Consolidate the calls to allow_write_access()/fput() into a single place, since we repeat this code pattern. Add comments around the callers for the details on it. Link: https://lore.kernel.org/r/202209161637.9EDAF6B18@keescook Signed-off-by: Kees Cook commit c481016bb4f8a9c059c39ac06e7b65e233a61f6a Author: Johan Hovold Date: Mon Jan 22 19:18:17 2024 +0100 ASoC: qcom: sc8280xp: limit speaker volumes The UCM configuration for the Lenovo ThinkPad X13s has up until now been setting the speaker PA volume to the minimum -3 dB when enabling the speakers, but this does not prevent the user from increasing the volume further. Limit the digital gain and PA volumes to a combined -3 dB in the machine driver to reduce the risk of speaker damage until we have active speaker protection in place (or higher safe levels have been established). Note that the PA volume limit cannot be set lower than 0 dB or PulseAudio gets confused when the first 16 levels all map to -3 dB. Also note that this will probably need to be generalised using machine-specific limits, but a common limit should do for now. Cc: # 6.5 Signed-off-by: Johan Hovold Link: https://msgid.link/r/20240122181819.4038-3-johan+linaro@kernel.org Signed-off-by: Mark Brown commit 92c02d74ba7b7cdf3887ed56bc9af38c3ee17a8b Author: Fei Shao Date: Mon Jan 22 14:20:27 2024 +0800 ASoC: codecs: ES8326: Remove executable bit Remove the executable bit that was unintentionally turned on. Fixes: ee09084fbf9f ("ASoC: codecs: ES8326: Add chip version flag") Signed-off-by: Fei Shao Link: https://msgid.link/r/20240122062055.1673597-1-fshao@chromium.org Signed-off-by: Mark Brown commit 22fb4f041999f5f16ecbda15a2859b4ef4cbf47e Author: Mario Limonciello Date: Fri Jan 19 05:33:19 2024 -0600 cpufreq/amd-pstate: Fix setting scaling max/min freq values Scaling min/max freq values were being cached and lagging a setting each time. Fix the ordering of the clamp call to ensure they work. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217931 Fixes: febab20caeba ("cpufreq/amd-pstate: Fix scaling_min_freq and scaling_max_freq update") Signed-off-by: Mario Limonciello Reviewed-by: Wyes Karny Signed-off-by: Rafael J. Wysocki commit 8788a17c2319f020ccdc3f2907179a5ae81b7ad6 Author: Askar Safin Date: Tue Jan 9 06:04:34 2024 +0300 exec: remove useless comment Function name is wrong and the comment tells us nothing Signed-off-by: Askar Safin Link: https://lore.kernel.org/r/20240109030801.31827-1-safinaskar@zohomail.com Signed-off-by: Kees Cook commit 27daa514c48d5796d564ea5410cb72f78a521891 Author: Alexey Dobriyan Date: Wed Dec 6 12:21:42 2023 +0300 ELF, MAINTAINERS: specifically mention ELF People complain when I miss people in Cc. [ kees: Also add the ELF uapi doc link ] Signed-off-by: Alexey Dobriyan Link: https://lore.kernel.org/r/2cb0891e-d7c0-4939-bb5f-282812de6078@p183 Signed-off-by: Kees Cook commit 9c46e3a5232d855a65f440b298a2a66497f799d2 Author: Dan Carpenter Date: Mon Jan 8 12:07:02 2024 +0300 iio: adc: ad7091r8: Fix error code in ad7091r8_gpio_setup() There is a copy and paste error so it accidentally returns ->convst_gpio instead of ->reset_gpio. Fix it. Fixes: 0b76ff46c463 ("iio: adc: Add support for AD7091R-8") Signed-off-by: Dan Carpenter Reviewed-by: Marcelo Schmitt Link: https://lore.kernel.org/r/fd905ad0-6413-489c-9a3b-90c0cdb35ec9@moroto.mountain Signed-off-by: Jonathan Cameron commit 59598510be1d49e1cff7fd7593293bb8e1b2398b Author: Nuno Sa Date: Wed Jan 17 13:41:03 2024 +0100 iio: adc: ad_sigma_delta: ensure proper DMA alignment Aligning the buffer to the L1 cache is not sufficient in some platforms as they might have larger cacheline sizes for caches after L1 and thus, we can't guarantee DMA safety. That was the whole reason to introduce IIO_DMA_MINALIGN in [1]. Do the same for the sigma_delta ADCs. [1]: https://lore.kernel.org/linux-iio/20220508175712.647246-2-jic23@kernel.org/ Fixes: 0fb6ee8d0b5e ("iio: ad_sigma_delta: Don't put SPI transfer buffer on the stack") Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240117-dev_sigma_delta_no_irq_flags-v1-1-db39261592cf@analog.com Cc: Signed-off-by: Jonathan Cameron commit 8e98b87f515d8c4bae521048a037b2cc431c3fd5 Author: Nuno Sa Date: Wed Jan 17 14:10:49 2024 +0100 iio: imu: adis: ensure proper DMA alignment Aligning the buffer to the L1 cache is not sufficient in some platforms as they might have larger cacheline sizes for caches after L1 and thus, we can't guarantee DMA safety. That was the whole reason to introduce IIO_DMA_MINALIGN in [1]. Do the same for the sigma_delta ADCs. [1]: https://lore.kernel.org/linux-iio/20220508175712.647246-2-jic23@kernel.org/ Fixes: ccd2b52f4ac6 ("staging:iio: Add common ADIS library") Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20240117-adis-improv-v1-1-7f90e9fad200@analog.com Cc: Signed-off-by: Jonathan Cameron commit f1dfcbaa7b9d131859b0167c428480ae6e7e817d Author: Jonathan Cameron Date: Sun Jan 21 13:46:16 2024 +0000 iio: humidity: hdc3020: Add Makefile, Kconfig and MAINTAINERS entry Something when wrong when applying the original patch and only the c file made it in. Here the rest of the changes are applied. Fixes: c9180b8e39be ("iio: humidity: Add driver for ti HDC302x humidity sensors") Reported-by: Lars-Peter Clausen Cc: Javier Carrasco Cc: Li peiyu <579lpy@gmail.com> Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen commit 35ec2d03b282a939949090bd8c39eb37a5856721 Author: Randy Dunlap Date: Wed Jan 10 10:56:11 2024 -0800 iio: imu: bno055: serdev requires REGMAP There are a ton of build errors when REGMAP is not set, so select REGMAP to fix all of them. Examples (not all of them): ../drivers/iio/imu/bno055/bno055_ser_core.c:495:15: error: variable 'bno055_ser_regmap_bus' has initializer but incomplete type 495 | static struct regmap_bus bno055_ser_regmap_bus = { ../drivers/iio/imu/bno055/bno055_ser_core.c:496:10: error: 'struct regmap_bus' has no member named 'write' 496 | .write = bno055_ser_write_reg, ../drivers/iio/imu/bno055/bno055_ser_core.c:497:10: error: 'struct regmap_bus' has no member named 'read' 497 | .read = bno055_ser_read_reg, ../drivers/iio/imu/bno055/bno055_ser_core.c: In function 'bno055_ser_probe': ../drivers/iio/imu/bno055/bno055_ser_core.c:532:18: error: implicit declaration of function 'devm_regmap_init'; did you mean 'vmem_map_init'? [-Werror=implicit-function-declaration] 532 | regmap = devm_regmap_init(&serdev->dev, &bno055_ser_regmap_bus, ../drivers/iio/imu/bno055/bno055_ser_core.c:532:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 532 | regmap = devm_regmap_init(&serdev->dev, &bno055_ser_regmap_bus, ../drivers/iio/imu/bno055/bno055_ser_core.c: At top level: ../drivers/iio/imu/bno055/bno055_ser_core.c:495:26: error: storage size of 'bno055_ser_regmap_bus' isn't known 495 | static struct regmap_bus bno055_ser_regmap_bus = { Fixes: 2eef5a9cc643 ("iio: imu: add BNO055 serdev driver") Signed-off-by: Randy Dunlap Cc: Andrea Merello Cc: Jonathan Cameron Cc: Lars-Peter Clausen Cc: linux-iio@vger.kernel.org Cc: Link: https://lore.kernel.org/r/20240110185611.19723-1-rdunlap@infradead.org Signed-off-by: Jonathan Cameron commit 792595bab4925aa06532a14dd256db523eb4fa5e Author: zhili.liu Date: Tue Jan 2 09:07:11 2024 +0800 iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC Recently, we encounter kernel crash in function rm3100_common_probe caused by out of bound access of array rm3100_samp_rates (because of underlying hardware failures). Add boundary check to prevent out of bound access. Fixes: 121354b2eceb ("iio: magnetometer: Add driver support for PNI RM3100") Suggested-by: Zhouyi Zhou Signed-off-by: zhili.liu Link: https://lore.kernel.org/r/1704157631-3814-1-git-send-email-zhouzhouyi@gmail.com Cc: Signed-off-by: Jonathan Cameron commit b67f3e653e305abf1471934d7b9fdb9ad2df3eef Author: Sam Protsenko Date: Wed Dec 20 12:47:53 2023 -0600 iio: pressure: bmp280: Add missing bmp085 to SPI id table "bmp085" is missing in bmp280_spi_id[] table, which leads to the next warning in dmesg: SPI driver bmp280 has no spi_device_id for bosch,bmp085 Add "bmp085" to bmp280_spi_id[] by mimicking its existing description in bmp280_of_spi_match[] table to fix the above warning. Signed-off-by: Sam Protsenko Fixes: b26b4e91700f ("iio: pressure: bmp280: add SPI interface driver") Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Cc: Signed-off-by: Jonathan Cameron commit 95a0d596bbd0552a78e13ced43f2be1038883c81 Author: Dinghao Liu Date: Fri Dec 8 15:31:19 2023 +0800 iio: core: fix memleak in iio_device_register_sysfs When iio_device_register_sysfs_group() fails, we should free iio_dev_opaque->chan_attr_group.attrs to prevent potential memleak. Fixes: 32f171724e5c ("iio: core: rework iio device group creation") Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20231208073119.29283-1-dinghao.liu@zju.edu.cn Cc: Signed-off-by: Jonathan Cameron commit d72a4caf685989e353dff0a97d7376ee10edbf87 Author: Ira Weiny Date: Wed Jan 17 17:24:01 2024 -0800 cxl/pci: Skip irq features if MSI/MSI-X are not supported CXL 3.1 Section 3.1.1 states: "A Function on a CXL device must not generate INTx messages if that Function participates in CXL.cache protocol or CXL.mem protocols." The generic CXL memory driver only supports devices which use the CXL.mem protocol. The current driver attempts to allocate MSI/MSI-X vectors in anticipation of their need for mailbox interrupts or event processing. However, the above requirement does not require a device to support interrupts, only that they use MSI/MSI-X. For example, a device may disable mailbox interrupts and either be configured for firmware first or skip event processing and function. Dave Larsen reported that the following Intel / Agilex card does not support interrupts on function 0. CXL: Intel Corporation Device 0ddb (rev 01) (prog-if 10 [CXL Memory Device (CXL 2.x)]) Rather than fail device probe if interrupts are not supported; flag that irqs are not enabled and avoid features which require interrupts. Emit messages appropriate for the situation to aid in debugging should device behavior be unexpected due to a failure to allocate vectors. Note that it is possible for a device to have host based event processing through polling. However, the driver does not support polling and it is not anticipated to be generally required. Leave that functionality to a future patch if such a device comes along. Reported-by: Dave Larsen Reviewed-by: Dave Jiang Reviewed-by: Fan Ni Signed-off-by: Ira Weiny Reviewed-and-tested-by: Davidlohr Bueso Link: https://lore.kernel.org/r/20240117-dont-fail-irq-v2-1-f33f26b0e365@intel.com Signed-off-by: Dan Williams commit c97dac57c804b53eab492ca0230d86356729d633 Author: Dan Williams Date: Tue Jan 16 13:17:23 2024 -0800 tools/testing/nvdimm: Disable "missing prototypes / declarations" warnings Prevent warnings of the form: tools/testing/nvdimm/config_check.c:4:6: error: no previous prototype for ‘check’ [-Werror=missing-prototypes] ...by locally disabling some warnings. It turns out that: Commit 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally") ...in addition to expanding in-tree coverage, also impacts out-of-tree module builds like those in tools/testing/nvdimm/. Filter out the warning options on unit test code that does not effect mainline builds. Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/170543984331.460832.1780246477583036191.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit 68deb9972079c9904fe714c049a7f08bd997a9ee Author: Dan Williams Date: Tue Jan 16 13:17:17 2024 -0800 tools/testing/cxl: Disable "missing prototypes / declarations" warnings Prevent warnings of the form: tools/testing/cxl/test/mock.c:44:6: error: no previous prototype for ‘__wrap_is_acpi_device_node’ [-Werror=missing-prototypes] tools/testing/cxl/test/mock.c:63:5: error: no previous prototype for ‘__wrap_acpi_table_parse_cedt’ [-Werror=missing-prototypes] tools/testing/cxl/test/mock.c:81:13: error: no previous prototype for ‘__wrap_acpi_evaluate_integer’ [-Werror=missing-prototypes] ...by locally disabling some warnings. It turns out that: Commit 0fcb70851fbf ("Makefile.extrawarn: turn on missing-prototypes globally") ...in addition to expanding in-tree coverage, also impacts out-of-tree module builds like those in tools/testing/cxl/. Filter out the warning options on unit test code that does not effect mainline builds. Reviewed-by: Alison Schofield Link: https://lore.kernel.org/r/170543983780.460832.10920261849128601697.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams commit d53271c05965b4469c57a18c66585075df81c504 Author: Mathieu Desnoyers Date: Thu Jan 11 10:49:22 2024 -0500 selftests/rseq: Do not skip !allowed_cpus for mm_cid Indexing with mm_cid is incompatible with skipping disallowed cpumask, because concurrency IDs are based on a virtual ID allocation which is unrelated to the physical CPU mask. These issues can be reproduced by running the rseq selftests under a taskset which excludes CPU 0, e.g. taskset -c 10-20 ./run_param_test.sh Signed-off-by: Mathieu Desnoyers Cc: Shuah Khan Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Boqun Feng Signed-off-by: Shuah Khan commit 610347effc2ecb5ededf5037e82240b151f883ab Merge: 0f0d819aef6fe a5e0ace04fbf5 Author: Linus Torvalds Date: Mon Jan 22 09:47:24 2024 -0800 Merge tag 'Wstringop-overflow-for-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull stringop-overflow warning update from Gustavo A. R. Silva: "Enable -Wstringop-overflow globally. I waited for the release of -rc1 to run a final build-test on top of it before sending this pull request. Fortunatelly, after building 358 kernels overnight (basically all supported archs with a wide variety of configs), no more warnings have surfaced! :) Thus, we are in a good position to enable this compiler option for all versions of GCC that support it, with the exception of GCC-11, which appears to have some issues with this option [1]" Link: https://lore.kernel.org/lkml/b3c99290-40bc-426f-b3d2-1aa903f95c4e@embeddedor.com/ [1] * tag 'Wstringop-overflow-for-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: init: Kconfig: Disable -Wstringop-overflow for GCC-11 Makefile: Enable -Wstringop-overflow globally commit 0f0d819aef6feb711dfd773ef906b9cbd02a2419 Merge: 6613476e225e0 c7ec4f2d684e1 Author: Linus Torvalds Date: Mon Jan 22 09:40:05 2024 -0800 Merge tag 'xsa448-6.8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen netback fix from Juergen Gross: "Transmit requests in Xen's virtual network protocol can consist of multiple parts. While not really useful, except for the initial part any of them may be of zero length, i.e. carry no data at all. Besides a certain initial portion of the to be transferred data, these parts are directly translated into what Linux calls SKB fragments. Such converted request parts can, when for a particular SKB they are all of length zero, lead to a de-reference of NULL in core networking code" * tag 'xsa448-6.8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen-netback: don't produce zero-size SKB frags commit 3e44f325f6f75078cdcd44cd337f517ba3650d05 Author: Christoph Hellwig Date: Thu Jan 11 08:36:55 2024 +0100 bcachefs: fix incorrect usage of REQ_OP_FLUSH REQ_OP_FLUSH is only for internal use in the blk-mq and request based drivers. File systems and other block layer consumers must use REQ_OP_WRITE | REQ_PREFLUSH as documented in Documentation/block/writeback_cache_control.rst. While REQ_OP_FLUSH appears to work for blk-mq drivers it does not get the proper flush state machine handling, and completely fails for any bio based drivers, including all the stacking drivers. The block layer will also get a check in 6.8 to reject this use case entirely. [Note: completely untested, but as this never got fixed since the original bug report in November: https://bugzilla.kernel.org/show_bug.cgi?id=218184 and the the discussion in December: https://lore.kernel.org/all/20231221053016.72cqcfg46vxwohcj@moria.home.lan/T/ this seems to be best way to force it] Signed-off-by: Christoph Hellwig Signed-off-by: Kent Overstreet commit 612e1110d689387aab81b2727895cd307d3cbbfd Author: Kent Overstreet Date: Mon Jan 22 12:25:00 2024 -0500 bcachefs: Add gfp flags param to bch2_prt_task_backtrace() Fixes: e6a2566f7a00 ("bcachefs: Better journal tracepoints") Signed-off-by: Kent Overstreet Reported-by: smatch commit 1a84c213146a06aca1fd0e5b376ab7d36d15e1b3 Author: Bagas Sanjaya Date: Tue Nov 14 15:10:33 2023 +0700 drm/dp_mst: Separate @failing_port list in drm_dp_mst_atomic_check_mgr() comment Stephen Rothwell reported htmldocs warnings when merging drm-intel tree: Documentation/gpu/drm-kms-helpers:296: drivers/gpu/drm/display/drm_dp_mst_topology.c:5484: ERROR: Unexpected indentation. Documentation/gpu/drm-kms-helpers:296: drivers/gpu/drm/display/drm_dp_mst_topology.c:5488: WARNING: Block quote ends without a blank line; unexpected unindent. Separate @failing_port return value list by surrounding it with a blank line to fix above warnings. Fixes: 1cd0a5ea427931 ("drm/dp_mst: Factor out a helper to check the atomic state of a topology manager") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20231114141715.6f435118@canb.auug.org.au/ Signed-off-by: Bagas Sanjaya Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231114081033.27343-1-bagasdotme@gmail.com Signed-off-by: Jani Nikula commit 4d5b7daa3c610af3f322ad1e91fc0c752ff32f0e Author: Hsin-Yi Wang Date: Wed Jan 17 17:58:14 2024 -0800 drm/bridge: anx7625: Ensure bridge is suspended in disable() Similar to commit 26db46bc9c67 ("drm/bridge: parade-ps8640: Ensure bridge is suspended in .post_disable()"). Add a mutex to ensure that aux transfer won't race with atomic_disable by holding the PM reference and prevent the bridge from suspend. Also we need to use pm_runtime_put_sync_suspend() to suspend the bridge instead of idle with pm_runtime_put_sync(). Fixes: 3203e497eb76 ("drm/bridge: anx7625: Synchronously run runtime suspend.") Fixes: adca62ec370c ("drm/bridge: anx7625: Support reading edid through aux channel") Signed-off-by: Hsin-Yi Wang Tested-by: Xuxin Xiong Reviewed-by: Pin-yen Lin Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240118015916.2296741-1-hsinyi@chromium.org commit 7777f47f2ea64efd1016262e7b59fab34adfb869 Author: Li Lingfeng Date: Thu Jan 18 21:04:01 2024 +0800 block: Move checking GENHD_FL_NO_PART to bdev_add_partition() Commit 1a721de8489f ("block: don't add or resize partition on the disk with GENHD_FL_NO_PART") prevented all operations about partitions on disks with GENHD_FL_NO_PART in blkpg_do_ioctl() since they are meaningless. However, it changed error code in some scenarios. So move checking GENHD_FL_NO_PART to bdev_add_partition() to eliminate impact. Fixes: 1a721de8489f ("block: don't add or resize partition on the disk with GENHD_FL_NO_PART") Reported-by: Allison Karlitskaya Closes: https://lore.kernel.org/all/CAOYeF9VsmqKMcQjo1k6YkGNujwN-nzfxY17N3F-CMikE1tYp+w@mail.gmail.com/ Signed-off-by: Li Lingfeng Reviewed-by: Yu Kuai Link: https://lore.kernel.org/r/20240118130401.792757-1-lilingfeng@huaweicloud.com Signed-off-by: Jens Axboe commit 6dd9a236042e305d7b69ee92db7347bf5943e7d3 Author: Geert Uytterhoeven Date: Mon Jan 22 16:04:14 2024 +0100 soc: microchip: Fix POLARFIRE_SOC_SYS_CTRL input prompt The symbol's prompt should be a one-line description, instead of just duplicating the symbol name. Signed-off-by: Geert Uytterhoeven Signed-off-by: Conor Dooley commit 6154fb9c2134f8d9534b2de10491aa3a22f3c9ff Author: Nícolas F. R. A. Prado Date: Mon Jan 22 11:29:18 2024 -0300 kselftest: dt: Stop relying on dirname to improve performance When walking directory trees, instead of looking for specific files and running dirname to get the parent folder, traverse all folders and ignore the ones not containing the desired files. This avoids the need to call dirname inside the loop, which drastically decreases run time: Running locally on a mt8192-asurada-spherion, which reports 160 test cases, has gone from 5.5s to 2.9s, while running remotely with an nfsroot has gone from 13.5s to 5.5s. This change has a side-effect, which is that the root DT node now also shows in the output, even though it isn't expected to bind to a driver. However there shouldn't be a matching driver for the board compatible, so the end result will be just an extra skipped test: ok 1 / # SKIP Reported-by: Mark Brown Closes: https://lore.kernel.org/all/310391e8-fdf2-4c2f-a680-7744eb685177@sirena.org.uk Fixes: 14571ab1ad21 ("kselftest: Add new test for detecting unprobed Devicetree devices") Tested-by: Mark Brown Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20240122-dt-kselftest-dirname-perf-fix-v2-1-f1630532fd38@collabora.com Signed-off-by: Rob Herring commit 8afe3c7fcaf72fca1e7d3dab16a5b7f4201ece17 Author: Mika Westerberg Date: Mon Jan 22 14:00:34 2024 +0200 spi: intel-pci: Add support for Arrow Lake SPI serial flash This adds the PCI ID of the Arrow Lake and Meteor Lake-S PCH SPI serial flash controller. This one supports all the necessary commands Linux SPI-NOR stack requires. Signed-off-by: Mika Westerberg Link: https://msgid.link/r/20240122120034.2664812-3-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown commit 6c314425b9ef6b247cefd0903e287eb072580c3b Author: Mika Westerberg Date: Mon Jan 22 14:00:33 2024 +0200 spi: intel-pci: Remove Meteor Lake-S SoC PCI ID from the list Turns out this "SoC" side controller does not support certain commands, such as reading chip JEDEC ID, so the controller is pretty much unusable in Linux. We should be using the "PCH" side controller instead. For this reason remove this PCI ID from the list. Fixes: c2912d42e86e ("spi: intel-pci: Add support for Meteor Lake-S SPI serial flash") Signed-off-by: Mika Westerberg Link: https://msgid.link/r/20240122120034.2664812-2-mika.westerberg@linux.intel.com Signed-off-by: Mark Brown commit b3cbdcc191819b75c04178142e2d0d4c668f68c0 Author: Martin Blumenstingl Date: Sat Jan 13 23:46:28 2024 +0100 regulator: pwm-regulator: Manage boot-on with disabled PWM channels Odroid-C1 uses a Monolithic Power Systems MP2161 controlled via PWM for the VDDEE voltage supply of the Meson8b SoC. Commit 6b9352f3f8a1 ("pwm: meson: modify and simplify calculation in meson_pwm_get_state") results in my Odroid-C1 crashing with memory corruption in many different places (seemingly at random). It turns out that this is due to a currently not supported corner case. The VDDEE regulator can generate between 860mV (duty cycle of ~91%) and 1140mV (duty cycle of 0%). We consider it to be enabled by the bootloader (which is why it has the regulator-boot-on flag in .dts) as well as being always-on (which is why it has the regulator-always-on flag in .dts) because the VDDEE voltage is generally required for the Meson8b SoC to work. The public S805 datasheet [0] states on page 17 (where "A5" refers to the Cortex-A5 CPU cores): [...] So if EE domains is shut off, A5 memory is also shut off. That does not matter. Before EE power domain is shut off, A5 should be shut off at first. It turns out that at least some bootloader versions are keeping the PWM output disabled. This is not a problem due to the specific design of the regulator: when the PWM output is disabled the output pin is pulled LOW, effectively achieving a 0% duty cycle (which in return means that VDDEE voltage is at 1140mV). The problem comes when the pwm-regulator driver tries to initialize the PWM output. To do so it reads the current state from the hardware, which is: period: 3666ns duty cycle: 3333ns (= ~91%) enabled: false Then those values are translated using the continuous voltage range to 860mV. Later, when the regulator is being enabled (either by the regulator core due to the always-on flag or first consumer - in this case the lima driver for the Mali-450 GPU) the pwm-regulator driver tries to keep the voltage (at 860mV) and just enable the PWM output. This is when things start to go wrong as the typical voltage used for VDDEE is 1100mV. Commit 6b9352f3f8a1 ("pwm: meson: modify and simplify calculation in meson_pwm_get_state") triggers above condition as before that change period and duty cycle were both at 0. Since the change to the pwm-meson driver is considered correct the solution is to be found in the pwm-regulator driver. Update the duty cycle during driver probe if the regulator is flagged as boot-on so that a call to pwm_regulator_enable() (by the regulator core during initialization of a regulator flagged with boot-on) without any preceding call to pwm_regulator_set_voltage() does not change the output voltage. [0] https://dn.odroid.com/S805/Datasheet/S805_Datasheet%20V0.8%2020150126.pdf Signed-off-by: Martin Blumenstingl Link: https://msgid.link/r/20240113224628.377993-4-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown commit 6a7d11efd6915d80a025f2a0be4ae09d797b91ec Author: Martin Blumenstingl Date: Sat Jan 13 23:46:27 2024 +0100 regulator: pwm-regulator: Calculate the output voltage for disabled PWMs If a PWM output is disabled then it's voltage has to be calculated based on a zero duty cycle (for normal polarity) or duty cycle being equal to the PWM period (for inverted polarity). Add support for this to pwm_regulator_get_voltage(). Signed-off-by: Martin Blumenstingl Link: https://msgid.link/r/20240113224628.377993-3-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown commit c92688cac239794e4a1d976afa5203a4d3a2ac0e Author: Martin Blumenstingl Date: Sat Jan 13 23:46:26 2024 +0100 regulator: pwm-regulator: Add validity checks in continuous .get_voltage Continuous regulators can be configured to operate only in a certain duty cycle range (for example from 0..91%). Add a check to error out if the duty cycle translates to an unsupported (or out of range) voltage. Suggested-by: Uwe Kleine-König Signed-off-by: Martin Blumenstingl Link: https://msgid.link/r/20240113224628.377993-2-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown commit 70b4769956651e986591dd94b3ff9649122b1513 Author: Krzysztof Kozlowski Date: Wed Jan 17 17:01:44 2024 +0100 ASoC: allow up to eight CPU/codec DAIs Sound card on Qualcomm X1E80100 CRD board will use eight DAIs in one DAI link, so increase the limit. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240117160144.1305127-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 35314e39dabcfb256832654ad0e856a9fba744bd Author: Krzysztof Kozlowski Date: Wed Jan 17 16:12:08 2024 +0100 ASoC: codecs: wcd934x: drop unneeded regulator include Driver does not use any regulator code, so drop redundant include of regulator/consumer.h header. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240117151208.1219755-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 22221b13d0c20a9791dec33121df73fe0b2ac226 Author: Krzysztof Kozlowski Date: Wed Jan 17 16:12:07 2024 +0100 ASoC: codecs: wcd938x: skip printing deferred probe failuers Probe calls wcd938x_populate_dt_data() which already prints all the error cases with dev_err_probe(), so skip the additional dev_err(). Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240117151208.1219755-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 086df711d9b886194481b4fbe525eb43e9ae7403 Author: Krzysztof Kozlowski Date: Wed Jan 17 16:12:06 2024 +0100 ASoC: codecs: wcd938x: handle deferred probe WCD938x sound codec driver ignores return status of getting regulators and returns EINVAL instead of EPROBE_DEFER. If regulator provider probes after the codec, system is left without probed audio: wcd938x_codec audio-codec: wcd938x_probe: Fail to obtain platform data wcd938x_codec: probe of audio-codec failed with error -22 Fixes: 16572522aece ("ASoC: codecs: wcd938x-sdw: add SoundWire driver") Cc: Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240117151208.1219755-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 6cc2aa9a75f2397d42b78d4c159bc06722183c78 Author: Venkata Prasad Potturu Date: Thu Jan 18 20:00:21 2024 +0530 ASoC: amd: acp: Add check for cpu dai link initialization Add condition check for cpu dai link initialization for amplifier codec path, as same pcm id uses for both headset and speaker path for RENOIR platforms. Signed-off-by: Venkata Prasad Potturu Link: https://msgid.link/r/20240118143023.1903984-3-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 4bae2029ffcccfbefb8f31563556494464e7bf2d Author: Venkata Prasad Potturu Date: Thu Jan 18 20:00:20 2024 +0530 ASoC: amd: acp: Update platform name for different boards Update platform name for various boards based on rembrandt and renoir platforms. Signed-off-by: Venkata Prasad Potturu Link: https://msgid.link/r/20240118143023.1903984-2-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 1d565de8d53cfa823576abac84e82ab1561f04eb Author: Venkata Prasad Potturu Date: Thu Jan 18 20:00:19 2024 +0530 ASoC: amd: acp: Enable rt5682s clocks in acp slave mode Set and enable rt5682s codec bclk and lrclk rates when acp is in slave mode. Signed-off-by: Venkata Prasad Potturu Link: https://msgid.link/r/20240118143023.1903984-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 4d0e8bdfa4a57099dc7230952a460903f2e2f8de Author: Johan Hovold Date: Mon Jan 22 10:11:30 2024 +0100 ASoC: codecs: wcd938x: fix headphones volume controls The lowest headphones volume setting does not mute so the leave the TLV mute flag unset. This is specifically needed to let the sound server use the lowest gain setting. Fixes: c03226ba15fe ("ASoC: codecs: wcd938x: fix dB range for HPHL and HPHR") Cc: # 6.5 Cc: Srinivas Kandagatla Signed-off-by: Johan Hovold Link: https://msgid.link/r/20240122091130.27463-1-johan+linaro@kernel.org Signed-off-by: Mark Brown commit aafa3acf62f1f63e620753fb9fd75095325617b2 Author: Johan Hovold Date: Fri Jan 19 12:24:20 2024 +0100 ASoC: codecs: wcd9335: drop unused gain hack remnant The vendor driver appears to be modifying the gain settings behind the back of user space but these hacks never made it upstream except for some essentially dead code that adds a constant zero to the current gain setting on DAPM events. Note that the volume registers still need to be written after enabling clocks in order for any prior updates to take effect. Reviewed-by: Srinivas Kandagatla Signed-off-by: Johan Hovold Link: https://msgid.link/r/20240119112420.7446-5-johan+linaro@kernel.org Signed-off-by: Mark Brown commit 46188db080bd1df7d2d28031b89e56f2fdbabd67 Author: Johan Hovold Date: Fri Jan 19 12:24:19 2024 +0100 ASoC: codecs: lpass-wsa-macro: fix compander volume hack The LPASS WSA macro codec driver is updating the digital gain settings behind the back of user space on DAPM events if companding has been enabled. As compander control is exported to user space, this can result in the digital gain setting being incremented (or decremented) every time the sound server is started and the codec suspended depending on what the UCM configuration looks like. Soon enough playback will become distorted (or too quiet). This is specifically a problem on the Lenovo ThinkPad X13s as this bypasses the limit for the digital gain setting that has been set by the machine driver. Fix this by simply dropping the compander gain offset hack. If someone cares about modelling the impact of the compander setting this can possibly be done by exporting it as a volume control later. Note that the volume registers still need to be written after enabling clocks in order for any prior updates to take effect. Fixes: 2c4066e5d428 ("ASoC: codecs: lpass-wsa-macro: add dapm widgets and route") Cc: stable@vger.kernel.org # 5.11 Cc: Srinivas Kandagatla Signed-off-by: Johan Hovold Link: https://msgid.link/r/20240119112420.7446-4-johan+linaro@kernel.org Signed-off-by: Mark Brown commit b53cc6144a3f6c8b56afcdec89d81195c9b0dc69 Author: Johan Hovold Date: Fri Jan 19 12:24:17 2024 +0100 ASoC: codecs: wsa883x: fix PA volume control The PA gain can be set in steps of 1.5 dB from -3 dB to 18 dB, that is, in 15 levels. Fix the dB values for the PA volume control as experiments using wsa8835 show that the first 16 levels all map to the same lowest gain while the last three map to the highest gain. These values specifically need to be correct for the sound server to provide proper volume control. Note that level 0 (-3 dB) does not mute the PA so the mute flag should also not be set. Fixes: cdb09e623143 ("ASoC: codecs: wsa883x: add control, dapm widgets and map") Cc: stable@vger.kernel.org # 6.0 Cc: Srinivas Kandagatla Signed-off-by: Johan Hovold Link: https://msgid.link/r/20240119112420.7446-2-johan+linaro@kernel.org Signed-off-by: Mark Brown commit 8c99a0a607b5e0cf6b79b283d7bb2c2b84e01da5 Author: Zhu Ning Date: Sat Jan 20 18:12:40 2024 +0800 ASoC: codecs: ES8326: fix the capture noise issue We get a noise issue during the startup of recording. We update the register setting and dapm widgets to fix this issue. we change callback type of es8326_mute function to mute_stream. ES8326_ADC_MUTE is moved to es8326_mute function so it can be turned on at last and turned off at first. Signed-off-by: Zhu Ning Link: https://msgid.link/r/20240120101240.12496-6-zhuning0077@gmail.com Signed-off-by: Mark Brown commit a3aa9255d6ccb1bff13c7c98e5d3bf10ba67f92e Author: Zhu Ning Date: Sat Jan 20 18:12:39 2024 +0800 ASoC: codecs: ES8326: Minimize the pop noise on headphone We modify the register settings to minimize headphone pop noise during ES8326 power-up and music start/stop. Signed-off-by: Zhu Ning Link: https://msgid.link/r/20240120101240.12496-5-zhuning0077@gmail.com Signed-off-by: Mark Brown commit 14a0a1ec3335ac3945a96437c35465e4a9616b88 Author: Zhu Ning Date: Sat Jan 20 18:12:37 2024 +0800 ASoC: codecs: ES8326: Improving the THD+N performance We update the values of some registers in the initialization sequence in es8326_resume function to improve THD+N performance. THD+N performance decreases if the output level on headphone is close to full scale. So we change the register setting in es8326_jack_detect_handler function to improve THD+N performance if headphone pulgged. Also, the register setting should be restored when the headset is unplugged Signed-off-by: Zhu Ning Link: https://msgid.link/r/20240120101240.12496-3-zhuning0077@gmail.com Signed-off-by: Mark Brown commit 523d242d4309797e6b27c708fbd1463f301c199a Author: Zhu Ning Date: Sat Jan 20 18:12:36 2024 +0800 ASoC: codecs: ES8326: improving crosstalk performance We change the crosstalk parameter in es8326_resume function to improve crosstalk performance. Adding crosstalk kcontrol to enhance the flexibility of crosstalk debugging in machine. Adding ES8326_DAC_CROSSTALK macro to declare the crosstalk register. Signed-off-by: Zhu Ning Link: https://msgid.link/r/20240120101240.12496-2-zhuning0077@gmail.com Signed-off-by: Mark Brown commit 1a9f2c776d1416c4ea6cb0d0b9917778c41a1a7d Author: Arthur Grillo Date: Wed Jan 10 14:39:28 2024 -0300 Documentation: KUnit: Update the instructions on how to test static functions Now that we have the VISIBLE_IF_KUNIT and EXPORT_SYMBOL_IF_KUNIT macros, update the instructions to recommend this way of testing static functions. Signed-off-by: Arthur Grillo Reviewed-by: David Gow Signed-off-by: Shuah Khan commit a1af6a2bfa0cb46d70b7df5352993e750da6c79b Author: Marco Pagani Date: Wed Jan 10 16:59:47 2024 +0100 kunit: run test suites only after module initialization completes Commit 2810c1e99867 ("kunit: Fix wild-memory-access bug in kunit_free_suite_set()") fixed a wild-memory-access bug that could have happened during the loading phase of test suites built and executed as loadable modules. However, it also introduced a problematic side effect that causes test suites modules to crash when they attempt to register fake devices. When a module is loaded, it traverses the MODULE_STATE_UNFORMED and MODULE_STATE_COMING states before reaching the normal operating state MODULE_STATE_LIVE. Finally, when the module is removed, it moves to MODULE_STATE_GOING before being released. However, if the loading function load_module() fails between complete_formation() and do_init_module(), the module goes directly from MODULE_STATE_COMING to MODULE_STATE_GOING without passing through MODULE_STATE_LIVE. This behavior was causing kunit_module_exit() to be called without having first executed kunit_module_init(). Since kunit_module_exit() is responsible for freeing the memory allocated by kunit_module_init() through kunit_filter_suites(), this behavior was resulting in a wild-memory-access bug. Commit 2810c1e99867 ("kunit: Fix wild-memory-access bug in kunit_free_suite_set()") fixed this issue by running the tests when the module is still in MODULE_STATE_COMING. However, modules in that state are not fully initialized, lacking sysfs kobjects. Therefore, if a test module attempts to register a fake device, it will inevitably crash. This patch proposes a different approach to fix the original wild-memory-access bug while restoring the normal module execution flow by making kunit_module_exit() able to detect if kunit_module_init() has previously initialized the tests suite set. In this way, test modules can once again register fake devices without crashing. This behavior is achieved by checking whether mod->kunit_suites is a virtual or direct mapping address. If it is a virtual address, then kunit_module_init() has allocated the suite_set in kunit_filter_suites() using kmalloc_array(). On the contrary, if mod->kunit_suites is still pointing to the original address that was set when looking up the .kunit_test_suites section of the module, then the loading phase has failed and there's no memory to be freed. v4: - rebased on 6.8 - noted that kunit_filter_suites() must return a virtual address v3: - add a comment to clarify why the start address is checked v2: - add include Fixes: 2810c1e99867 ("kunit: Fix wild-memory-access bug in kunit_free_suite_set()") Reviewed-by: David Gow Tested-by: Rae Moar Tested-by: Richard Fitzgerald Reviewed-by: Javier Martinez Canillas Signed-off-by: Marco Pagani Signed-off-by: Shuah Khan commit 57e39086fb868a84f772cf097004f4715d8aaccb Author: David Gow Date: Fri Jan 12 07:49:47 2024 +0800 MAINTAINERS: kunit: Add Rae Moar as a reviewer Rae has been shouldering a lot of the KUnit review burden for the last year, and will continue to do so in the future. Thanks! Signed-off-by: David Gow Reviewed-by: Rae Moar Signed-off-by: Shuah Khan commit 083974ebb8fc65978d6cacd1bcfe9158d6234b98 Author: Dan Carpenter Date: Wed Jan 10 21:55:14 2024 +0300 kunit: device: Fix a NULL vs IS_ERR() check in init() The root_device_register() function does not return NULL, it returns error pointers. Fix the check to match. Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") Signed-off-by: Dan Carpenter Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit ed1a72fb0d646c983c85b62144fb1d134a8edb71 Author: Dan Carpenter Date: Wed Jan 10 21:55:22 2024 +0300 kunit: Fix a NULL vs IS_ERR() bug The kunit_device_register() function doesn't return NULL, it returns error pointers. Change the KUNIT_ASSERT_NOT_NULL() to check for ERR_OR_NULL(). Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") Signed-off-by: Dan Carpenter Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit f7cfe7017b531e08c108ac6615b1ddedcc892428 Author: Juergen Gross Date: Tue Jan 9 09:22:32 2024 +0100 x86/paravirt: Make BUG_func() usable by non-GPL modules Several inlined functions subject to paravirt patching are referencing BUG_func() after the recent switch to the alternative patching mechanism. As those functions can legally be used by non-GPL modules, BUG_func() must be usable by those modules, too. So use EXPORT_SYMBOL() when exporting BUG_func(). Fixes: 9824b00c2b58 ("x86/paravirt: Move some functions and defines to alternative.c") Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240109082232.22657-1-jgross@suse.com commit f0e4a1356466ec1858ae8e5c70bea2ce5e55008b Author: Geert Uytterhoeven Date: Fri Jan 12 17:33:55 2024 +0100 pmdomain: renesas: r8a77980-sysc: CR7 must be always on The power domain containing the Cortex-R7 CPU core on the R-Car V3H SoC must always be in power-on state, unlike on other SoCs in the R-Car Gen3 family. See Table 9.4 "Power domains" in the R-Car Series, 3rd Generation Hardware User’s Manual Rev.1.00 and later. Fix this by marking the domain as a CPU domain without control registers, so the driver will not touch it. Fixes: 41d6d8bd8ae9 ("soc: renesas: rcar-sysc: add R8A77980 support") Signed-off-by: Geert Uytterhoeven Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/fdad9a86132d53ecddf72b734dac406915c4edc0.1705076735.git.geert+renesas@glider.be Signed-off-by: Ulf Hansson commit 741ba0134fa7822fcf4e4a0a537a5c4cfd706b20 Author: Konrad Dybcio Date: Wed Dec 27 16:21:24 2023 +0100 pmdomain: core: Move the unused cleanup to a _sync initcall The unused clock cleanup uses the _sync initcall to give all users at earlier initcalls time to probe. Do the same to avoid leaving some PDs dangling at "on" (which actually happened on qcom!). Fixes: 2fe71dcdfd10 ("PM / domains: Add late_initcall to disable unused PM domains") Signed-off-by: Konrad Dybcio Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20231227-topic-pmdomain_sync_cleanup-v1-1-5f36769d538b@linaro.org Signed-off-by: Ulf Hansson commit d59da02d1ab690b81a3dd2493112fc6878198f60 Author: David Howells Date: Mon Jan 22 11:50:01 2024 +0000 netfs: Add Jeff Layton as reviewer Add Jeff Layton as a reviewer in the MAINTAINERS file. Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240122115007.3820330-3-dhowells@redhat.com Acked-by: Jeff Layton cc: cc: Signed-off-by: Christian Brauner commit 3c18703079b6c7149d037b71d685d6fcaf6c4cd0 Author: David Howells Date: Mon Jan 22 11:50:00 2024 +0000 netfs, cachefiles: Change mailing list The publicly accessible archives for Red Hat mailing lists stop at Oct 2023; messages sent after that time are in internal-only archives. Change the netfs and cachefiles mailing list to one that has publicly accessible archives: netfs@lists.linux.dev Signed-off-by: David Howells Link: https://lore.kernel.org/r/20240122115007.3820330-2-dhowells@redhat.com cc: Jeff Layton cc: Matthew Wilcox cc: cc: cc: cc: cc: cc: cc: cc: cc: Signed-off-by: Christian Brauner commit 192cdb1c907fd8df2d764c5bb17496e415e59391 Author: Rafael J. Wysocki Date: Mon Jan 22 15:18:11 2024 +0100 cpufreq: intel_pstate: Refine computation of P-state for given frequency On systems using HWP, if a given frequency is equal to the maximum turbo frequency or the maximum non-turbo frequency, the HWP performance level corresponding to it is already known and can be used directly without any computation. Accordingly, adjust the code to use the known HWP performance levels in the cases mentioned above. This also helps to avoid limiting CPU capacity artificially in some cases when the BIOS produces the HWP_CAP numbers using a different E-core-to-P-core performance scaling factor than expected by the kernel. Fixes: f5c8cf2a4992 ("cpufreq: intel_pstate: hybrid: Use known scaling factor for P-cores") Cc: 6.1+ # 6.1+ Tested-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 4b5581f112075e46d73b34b9848be041e6c1e489 Author: Jacek Lawrynowicz Date: Tue Oct 24 18:53:53 2023 +0200 accel/ivpu: Disable PLL after VPU IP reset during FLR IP reset has to followed by ivpu_pll_disable() to properly enter reset state. Fixes: 828d63042aec ("accel/ivpu: Don't enter d0i3 during FLR") Signed-off-by: Jacek Lawrynowicz Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231024165353.761507-1-stanislaw.gruszka@linux.intel.com commit 1513664f340289cf10402753110f3cff12a738aa Author: Andy Chi Date: Mon Jan 22 15:48:24 2024 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP ZBook Power The HP ZBook Power 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/20240122074826.1020964-1-andy.chi@canonical.com Signed-off-by: Takashi Iwai commit 0650006a93a2ce3b57f86e7f000347d9ae7737ef Author: Christophe JAILLET Date: Sun Jan 7 11:02:05 2024 +0100 dmaengine: fsl-qdma: Remove a useless devm_kfree() 'status_head' is a managed resource. It will be freed automatically if fsl_qdma_prep_status_queue(), and so fsl_qdma_probe(), fails. Remove the redundant (and harmless) devm_kfree() call. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/6b7f60aa2b92f73b35c586886daffc1a5ac58697.1704621515.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 3aa58cb51318e329d203857f7a191678e60bb714 Author: Christophe JAILLET Date: Sun Jan 7 11:02:04 2024 +0100 dmaengine: fsl-qdma: Fix a memory leak related to the queue command DMA This dma_alloc_coherent() is undone neither in the remove function, nor in the error handling path of fsl_qdma_probe(). Switch to the managed version to fix both issues. Fixes: b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/7f66aa14f59d32b13672dde28602b47deb294e1f.1704621515.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 968bc1d7203d384e72afe34124a1801b7af76514 Author: Christophe JAILLET Date: Sun Jan 7 11:02:03 2024 +0100 dmaengine: fsl-qdma: Fix a memory leak related to the status queue DMA This dma_alloc_coherent() is undone in the remove function, but not in the error handling path of fsl_qdma_probe(). Switch to the managed version to fix the issue in the probe and simplify the remove function. Fixes: b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/a0ef5d0f5a47381617ef339df776ddc68ce48173.1704621515.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit bc9847c9ba134cfe3398011e343dcf6588c1c902 Author: Jai Luthra Date: Wed Jan 3 14:37:55 2024 +0530 dmaengine: ti: k3-udma: Report short packet errors Propagate the TR response status to the device using BCDMA split-channels. For example CSI-RX driver should be able to check if a frame was not transferred completely (short packet) and needs to be discarded. Fixes: 25dcb5dd7b7c ("dmaengine: ti: New driver for K3 UDMA") Signed-off-by: Jai Luthra Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20240103-tr_resp_err-v1-1-2fdf6d48ab92@ti.com Signed-off-by: Vinod Koul commit 13e788deb7348cc88df34bed736c3b3b9927ea52 Author: Sharath Srinivasan Date: Fri Jan 19 17:48:39 2024 -0800 net/rds: Fix UBSAN: array-index-out-of-bounds in rds_cmsg_recv Syzcaller UBSAN crash occurs in rds_cmsg_recv(), which reads inc->i_rx_lat_trace[j + 1] with index 4 (3 + 1), but with array size of 4 (RDS_RX_MAX_TRACES). Here 'j' is assigned from rs->rs_rx_trace[i] and in-turn from trace.rx_trace_pos[i] in rds_recv_track_latency(), with both arrays sized 3 (RDS_MSG_RX_DGRAM_TRACE_MAX). So fix the off-by-one bounds check in rds_recv_track_latency() to prevent a potential crash in rds_cmsg_recv(). Found by syzcaller: ================================================================= UBSAN: array-index-out-of-bounds in net/rds/recv.c:585:39 index 4 is out of range for type 'u64 [4]' CPU: 1 PID: 8058 Comm: syz-executor228 Not tainted 6.6.0-gd2f51b3516da #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x136/0x150 lib/dump_stack.c:106 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0xd5/0x130 lib/ubsan.c:348 rds_cmsg_recv+0x60d/0x700 net/rds/recv.c:585 rds_recvmsg+0x3fb/0x1610 net/rds/recv.c:716 sock_recvmsg_nosec net/socket.c:1044 [inline] sock_recvmsg+0xe2/0x160 net/socket.c:1066 __sys_recvfrom+0x1b6/0x2f0 net/socket.c:2246 __do_sys_recvfrom net/socket.c:2264 [inline] __se_sys_recvfrom net/socket.c:2260 [inline] __x64_sys_recvfrom+0xe0/0x1b0 net/socket.c:2260 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b ================================================================== Fixes: 3289025aedc0 ("RDS: add receive message trace used by application") Reported-by: Chenyuan Yang Closes: https://lore.kernel.org/linux-rdma/CALGdzuoVdq-wtQ4Az9iottBqC5cv9ZhcE5q8N7LfYFvkRsOVcw@mail.gmail.com/ Signed-off-by: Sharath Srinivasan Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 6e2276203ac9ff10fc76917ec9813c660f627369 Author: Kunwu Chan Date: Thu Jan 18 11:19:29 2024 +0800 dmaengine: ti: edma: Add some null pointer checks to the edma_probe devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan Link: https://lore.kernel.org/r/20240118031929.192192-1-chentao@kylinos.cn Signed-off-by: Vinod Koul commit 732c35ce6d4892f7b07cc9aca61a6ad0fd400a26 Author: Shravan Kumar Ramani Date: Wed Jan 17 05:01:34 2024 -0500 platform/mellanox: mlxbf-pmc: Fix offset calculation for crspace events The event selector fields for 2 counters are contained in one 32-bit register and the current logic does not account for this. Fixes: 423c3361855c ("platform/mellanox: mlxbf-pmc: Add support for BlueField-3") Signed-off-by: Shravan Kumar Ramani Reviewed-by: David Thompson Reviewed-by: Vadim Pasternak Link: https://lore.kernel.org/r/8834cfa496c97c7c2fcebcfca5a2aa007e20ae96.1705485095.git.shravankr@nvidia.com Signed-off-by: Hans de Goede commit 8cbc756b802605dee3dd40019bd75960772bacf5 Author: Liming Sun Date: Thu Jan 11 12:31:06 2024 -0500 platform/mellanox: mlxbf-tmfifo: Drop Tx network packet when Tx TmFIFO is full Starting from Linux 5.16 kernel, Tx timeout mechanism was added in the virtio_net driver which prints the "Tx timeout" warning message when a packet stays in Tx queue for too long. Below is an example of the reported message: "[494105.316739] virtio_net virtio1 tmfifo_net0: TX timeout on queue: 0, sq: output.0, vq: 0×1, name: output.0, usecs since last trans: 3079892256". This issue could happen when external host driver which drains the FIFO is restared, stopped or upgraded. To avoid such confusing "Tx timeout" messages, this commit adds logic to drop the outstanding Tx packet if it's not able to transmit in two seconds due to Tx FIFO full, which can be considered as congestion or out-of-resource drop. This commit also handles the special case that the packet is half- transmitted into the Tx FIFO. In such case, the packet is discarded with remaining length stored in vring->rem_padding. So paddings with zeros can be sent out when Tx space is available to maintain the integrity of the packet format. The padded packet will be dropped on the receiving side. Signed-off-by: Liming Sun Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240111173106.96958-1-limings@nvidia.com Signed-off-by: Hans de Goede commit aaf632f7ab6dec57bc9329a438f94504fe8034b9 Author: Horatiu Vultur Date: Fri Jan 19 11:47:50 2024 +0100 net: micrel: Fix PTP frame parsing for lan8814 The HW has the capability to check each frame if it is a PTP frame, which domain it is, which ptp frame type it is, different ip address in the frame. And if one of these checks fail then the frame is not timestamp. Most of these checks were disabled except checking the field minorVersionPTP inside the PTP header. Meaning that once a partner sends a frame compliant to 8021AS which has minorVersionPTP set to 1, then the frame was not timestamp because the HW expected by default a value of 0 in minorVersionPTP. This is exactly the same issue as on lan8841. Fix this issue by removing this check so the userspace can decide on this. Fixes: ece19502834d ("net: phy: micrel: 1588 support for LAN8814 phy") Signed-off-by: Horatiu Vultur Reviewed-by: Maxime Chevallier Reviewed-by: Divya Koppera Signed-off-by: David S. Miller commit 94fa82b095c7d4949f0906ee3596e8b7988ea557 Merge: ef48521672452 7dc5b18ff71bd Author: David S. Miller Date: Mon Jan 22 11:01:11 2024 +0000 Merge branch 'dpll-fixes' Arkadiusz Kubalewski says: ==================== dpll: fix unordered unbind/bind registerer issues Fix issues when performing unordered unbind/bind of a kernel modules which are using a dpll device with DPLL_PIN_TYPE_MUX pins. Currently only serialized bind/unbind of such use case works, fix the issues and allow for unserialized kernel module bind order. The issues are observed on the ice driver, i.e., $ echo 0000:af:00.0 > /sys/bus/pci/drivers/ice/unbind $ echo 0000:af:00.1 > /sys/bus/pci/drivers/ice/unbind results in: ice 0000:af:00.0: Removed PTP clock BUG: kernel NULL pointer dereference, address: 0000000000000010 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: 7 PID: 71848 Comm: bash Kdump: loaded Not tainted 6.6.0-rc5_next-queue_19th-Oct-2023-01625-g039e5d15e451 #1 Hardware name: Intel Corporation S2600STB/S2600STB, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019 RIP: 0010:ice_dpll_rclk_state_on_pin_get+0x2f/0x90 [ice] Code: 41 57 4d 89 cf 41 56 41 55 4d 89 c5 41 54 55 48 89 f5 53 4c 8b 66 08 48 89 cb 4d 8d b4 24 f0 49 00 00 4c 89 f7 e8 71 ec 1f c5 <0f> b6 5b 10 41 0f b6 84 24 30 4b 00 00 29 c3 41 0f b6 84 24 28 4b RSP: 0018:ffffc902b179fb60 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff8882c1398000 RSI: ffff888c7435cc60 RDI: ffff888c7435cb90 RBP: ffff888c7435cc60 R08: ffffc902b179fbb0 R09: 0000000000000000 R10: ffff888ef1fc8050 R11: fffffffffff82700 R12: ffff888c743581a0 R13: ffffc902b179fbb0 R14: ffff888c7435cb90 R15: 0000000000000000 FS: 00007fdc7dae0740(0000) GS:ffff888c105c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 0000000132c24002 CR4: 00000000007706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? __die+0x20/0x70 ? page_fault_oops+0x76/0x170 ? exc_page_fault+0x65/0x150 ? asm_exc_page_fault+0x22/0x30 ? ice_dpll_rclk_state_on_pin_get+0x2f/0x90 [ice] ? __pfx_ice_dpll_rclk_state_on_pin_get+0x10/0x10 [ice] dpll_msg_add_pin_parents+0x142/0x1d0 dpll_pin_event_send+0x7d/0x150 dpll_pin_on_pin_unregister+0x3f/0x100 ice_dpll_deinit_pins+0xa1/0x230 [ice] ice_dpll_deinit+0x29/0xe0 [ice] ice_remove+0xcd/0x200 [ice] pci_device_remove+0x33/0xa0 device_release_driver_internal+0x193/0x200 unbind_store+0x9d/0xb0 kernfs_fop_write_iter+0x128/0x1c0 vfs_write+0x2bb/0x3e0 ksys_write+0x5f/0xe0 do_syscall_64+0x59/0x90 ? filp_close+0x1b/0x30 ? do_dup2+0x7d/0xd0 ? syscall_exit_work+0x103/0x130 ? syscall_exit_to_user_mode+0x22/0x40 ? do_syscall_64+0x69/0x90 ? syscall_exit_work+0x103/0x130 ? syscall_exit_to_user_mode+0x22/0x40 ? do_syscall_64+0x69/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7fdc7d93eb97 Code: 0b 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 RSP: 002b:00007fff2aa91028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000000000d RCX: 00007fdc7d93eb97 RDX: 000000000000000d RSI: 00005644814ec9b0 RDI: 0000000000000001 RBP: 00005644814ec9b0 R08: 0000000000000000 R09: 00007fdc7d9b14e0 R10: 00007fdc7d9b13e0 R11: 0000000000000246 R12: 000000000000000d R13: 00007fdc7d9fb780 R14: 000000000000000d R15: 00007fdc7d9f69e0 Modules linked in: uinput vfio_pci vfio_pci_core vfio_iommu_type1 vfio irqbypass ixgbevf snd_seq_dummy snd_hrtimer snd_seq snd_timer snd_seq_device snd soundcore overlay qrtr rfkill vfat fat xfs libcrc32c rpcrdma sunrpc rdma_ucm ib_srpt ib_isert iscsi_target_mod target_core_mod ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_cm intel_rapl_msr intel_rapl_common intel_uncore_frequency intel_uncore_frequency_common isst_if_common skx_edac nfit libnvdimm ipmi_ssif x86_pkg_temp_thermal intel_powerclamp coretemp irdma rapl intel_cstate ib_uverbs iTCO_wdt iTCO_vendor_support acpi_ipmi intel_uncore mei_me ipmi_si pcspkr i2c_i801 ib_core mei ipmi_devintf intel_pch_thermal ioatdma i2c_smbus ipmi_msghandler lpc_ich joydev acpi_power_meter acpi_pad ext4 mbcache jbd2 sd_mod t10_pi sg ast i2c_algo_bit drm_shmem_helper drm_kms_helper ice crct10dif_pclmul ixgbe crc32_pclmul drm crc32c_intel ahci i40e libahci ghash_clmulni_intel libata mdio dca gnss wmi fuse [last unloaded: iavf] CR2: 0000000000000010 v6: - fix memory corruption on error path in patch [v5 2/4] ==================== Acked-by: Vadim Fedorenko Signed-off-by: David S. Miller commit 7dc5b18ff71bd6f948810ab8a08b6a6ff8b315c5 Author: Arkadiusz Kubalewski Date: Fri Jan 19 14:43:04 2024 +0100 dpll: fix register pin with unregistered parent pin In case of multiple kernel module instances using the same dpll device: if only one registers dpll device, then only that one can register directly connected pins with a dpll device. When unregistered parent is responsible for determining if the muxed pin can be registered with it or not, the drivers need to be loaded in serialized order to work correctly - first the driver instance which registers the direct pins needs to be loaded, then the other instances could register muxed type pins. Allow registration of a pin with a parent even if the parent was not yet registered, thus allow ability for unserialized driver instance load order. Do not WARN_ON notification for unregistered pin, which can be invoked for described case, instead just return error. Fixes: 9431063ad323 ("dpll: core: Add DPLL framework base functions") Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions") Reviewed-by: Jan Glaza Reviewed-by: Jiri Pirko Signed-off-by: Arkadiusz Kubalewski Signed-off-by: David S. Miller commit db2ec3c94667eaeecc6a74d96594fab6baf80fdc Author: Arkadiusz Kubalewski Date: Fri Jan 19 14:43:03 2024 +0100 dpll: fix userspace availability of pins If parent pin was unregistered but child pin was not, the userspace would see the "zombie" pins - the ones that were registered with a parent pin (dpll_pin_on_pin_register(..)). Technically those are not available - as there is no dpll device in the system. Do not dump those pins and prevent userspace from any interaction with them. Provide a unified function to determine if the pin is available and use it before acting/responding for user requests. Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions") Reviewed-by: Jan Glaza Reviewed-by: Jiri Pirko Signed-off-by: Arkadiusz Kubalewski Signed-off-by: David S. Miller commit 830ead5fb0c5855ce4d70ba2ed4a673b5f1e7d9b Author: Arkadiusz Kubalewski Date: Fri Jan 19 14:43:02 2024 +0100 dpll: fix pin dump crash for rebound module When a kernel module is unbound but the pin resources were not entirely freed (other kernel module instance of the same PCI device have had kept the reference to that pin), and kernel module is again bound, the pin properties would not be updated (the properties are only assigned when memory for the pin is allocated), prop pointer still points to the kernel module memory of the kernel module which was deallocated on the unbind. If the pin dump is invoked in this state, the result is a kernel crash. Prevent the crash by storing persistent pin properties in dpll subsystem, copy the content from the kernel module when pin is allocated, instead of using memory of the kernel module. Fixes: 9431063ad323 ("dpll: core: Add DPLL framework base functions") Fixes: 9d71b54b65b1 ("dpll: netlink: Add DPLL framework base functions") Reviewed-by: Jan Glaza Reviewed-by: Przemek Kitszel Signed-off-by: Arkadiusz Kubalewski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit b6a11a7fc4d6337f7ea720b9287d1b9749c4eae0 Author: Arkadiusz Kubalewski Date: Fri Jan 19 14:43:01 2024 +0100 dpll: fix broken error path in dpll_pin_alloc(..) If pin type is not expected, or pin properities failed to allocate memory, the unwind error path shall not destroy pin's xarrays, which were not yet initialized. Add new goto label and use it to fix broken error path. Reviewed-by: Jiri Pirko Signed-off-by: Arkadiusz Kubalewski Signed-off-by: David S. Miller commit c6a783be82c893c6f124a5853bef2edeaf26dadf Author: Srinivas Pandruvada Date: Thu Jan 18 04:23:40 2024 -0800 thermal: intel: powerclamp: Remove dead code for target mwait value After conversion of this driver to use powercap idle_inject core, this driver doesn't use target_mwait value. So remove dead code. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit ef48521672452aa7a5da1cb91160822eda6e4403 Merge: d09486a04f5da f1084c427f55d Author: David S. Miller Date: Mon Jan 22 10:58:05 2024 +0000 Merge branch 'tun-fixes' Yunjian Wang says: ==================== fixes for tun There are few places on the receive path where packet receives and packet drops were not accounted for. This patchset fixes that issue. ==================== Signed-off-by: David S. Miller commit f1084c427f55d573fcd5688d9ba7b31b78019716 Author: Yunjian Wang Date: Fri Jan 19 18:22:56 2024 +0800 tun: add missing rx stats accounting in tun_xdp_act The TUN can be used as vhost-net backend, and it is necessary to count the packets transmitted from TUN to vhost-net/virtio-net. However, there are some places in the receive path that were not taken into account when using XDP. It would be beneficial to also include new accounting for successfully received bytes using dev_sw_netstats_rx_add. Fixes: 761876c857cb ("tap: XDP support") Signed-off-by: Yunjian Wang Reviewed-by: Willem de Bruijn Acked-by: Jason Wang Signed-off-by: David S. Miller commit 5744ba05e7c4bff8fec133dd0f9e51ddffba92f5 Author: Yunjian Wang Date: Fri Jan 19 18:22:35 2024 +0800 tun: fix missing dropped counter in tun_xdp_act The commit 8ae1aff0b331 ("tuntap: split out XDP logic") includes dropped counter for XDP_DROP, XDP_ABORTED, and invalid XDP actions. Unfortunately, that commit missed the dropped counter when error occurs during XDP_TX and XDP_REDIRECT actions. This patch fixes this issue. Fixes: 8ae1aff0b331 ("tuntap: split out XDP logic") Signed-off-by: Yunjian Wang Reviewed-by: Willem de Bruijn Acked-by: Jason Wang Signed-off-by: David S. Miller commit eab4f56d3e75dad697acf8dc2c8be3c341d6c63e Author: Artur Weber Date: Fri Jan 5 07:53:01 2024 +0100 ARM: dts: exynos4212-tab3: add samsung,invert-vclk flag to fimd After more investigation, I've found that it's not the panel driver config that needs to be modified to invert the data polarity, but the FIMD config. Add the missing invert-vclk option that is required to get the display to work correctly. Fixes: ee37a457af1d ("ARM: dts: exynos: Add Samsung Galaxy Tab 3 8.0 boards") Signed-off-by: Artur Weber Link: https://lore.kernel.org/r/20240105-tab3-display-fixes-v2-1-904d1207bf6f@gmail.com Signed-off-by: Krzysztof Kozlowski commit d76c762e7ee04af79e1c127422e0bbcb5f123018 Author: Tudor Ambarus Date: Tue Jan 9 11:49:08 2024 +0000 clk: samsung: clk-gs101: comply with the new dt cmu_misc clock names The cmu_misc clock-names were renamed to just "bus" and "sss" because naming is local to the module, so cmu_misc is implied. As the bindings and the device tree have not made a release yet, comply with the renamed clocks. Suggested-by: Rob Herring Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20240109114908.3623645-4-tudor.ambarus@linaro.org Signed-off-by: Krzysztof Kozlowski commit 80c86ff6800b857c8008cebe7b8d22a6e574e68d Author: Tudor Ambarus Date: Tue Jan 9 11:49:07 2024 +0000 arm64: dts: exynos: gs101: comply with the new cmu_misc clock names The cmu_misc clock-names were renamed to just "bus" and "sss" because naming is local to the module, so cmu_misc is implied. As the bindings and the device tree have not made a release yet, comply with the renamed clocks. Suggested-by: Rob Herring Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20240109114908.3623645-3-tudor.ambarus@linaro.org Signed-off-by: Krzysztof Kozlowski commit 1755c4b0372a2cf1e7124956b8cfebcb51083208 Author: Tudor Ambarus Date: Tue Jan 9 11:49:06 2024 +0000 dt-bindings: clock: gs101: rename cmu_misc clock-names 'bus' and 'ip' are sufficient because naming is local to the module. As the bindings have not made a release yet, rename the cmu_misc clock-names. Fixes: 0a910f160638 ("dt-bindings: clock: Add Google gs101 clock management unit bindings") Suggested-by: Rob Herring Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko Acked-by: Rob Herring Link: https://lore.kernel.org/r/20240109114908.3623645-2-tudor.ambarus@linaro.org Signed-off-by: Krzysztof Kozlowski commit 84aef4ed59705585d629e81d633a83b7d416f5fb Author: Wenhua Lin Date: Tue Jan 9 15:38:48 2024 +0800 gpio: eic-sprd: Clear interrupt after set the interrupt type The raw interrupt status of eic maybe set before the interrupt is enabled, since the eic interrupt has a latch function, which would trigger the interrupt event once enabled it from user side. To solve this problem, interrupts generated before setting the interrupt trigger type are ignored. Fixes: 25518e024e3a ("gpio: Add Spreadtrum EIC driver support") Acked-by: Chunyan Zhang Signed-off-by: Wenhua Lin Signed-off-by: Bartosz Golaszewski commit 8530ecaf35f23d02fdce49aded7227fc8f14ebcc Author: Hans de Goede Date: Tue Jan 16 11:39:21 2024 +0100 MAINTAINERS: remove defunct acpi4asus project info from asus notebooks section The acpi4asus project appears to be defunct, according to: https://sourceforge.net/p/acpi4asus/mailman/acpi4asus-user/ the last posts to the list were done in May 2020 and even then they were mostly spam. And the http://acpi4asus.sf.net website still talks about 2.6.x kernels. Drop the defunct mailing-list and update the W: entry to point to the new up2date https://asus-linux.org/ site. Cc: Corentin Chary Cc: Luke D. Jones Signed-off-by: Hans de Goede commit 20fe5e9be47efc952c66374334f7bb94e4a51d90 Author: Luke D. Jones Date: Tue Jan 16 10:18:29 2024 +1300 MAINTAINERS: add Luke Jones as maintainer for asus notebooks Add myself as maintainer for "ASUS NOTEBOOKS AND EEEPC ACPI/WMI EXTRAS DRIVERS" as suggested by Hans de Goede based on my history of contributions. Signed-off-by: Luke D. Jones Link: https://lore.kernel.org/r/20240115211829.48251-1-luke@ljones.dev Signed-off-by: Hans de Goede commit 452c314988dbccc491a32b674a3945d93a23c87c Author: Heiner Kallweit Date: Sun Jan 14 17:53:16 2024 +0100 MAINTAINERS: Remove Perry Yuan as DELL WMI HARDWARE PRIVACY SUPPORT maintainer Recent mails to his Dell address bounced with "user unknown". So remove him as maintainer. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/c9757d0a-2046-464b-93e1-a2d9ab0ce36b@gmail.com Signed-off-by: Hans de Goede commit 41237735ccde2cc3fe1d83ae0b776a085be6a22f Author: Hans de Goede Date: Mon Jan 8 15:06:55 2024 +0100 platform/x86: silicom-platform: Add missing "Description:" for power_cycle sysfs attr The Documentation/ABI/testing/sysfs-platform-silicom entry for the power_cycle sysfs attr is missing the "Description:" keyword, add this. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240108140655.547261-1-hdegoede@redhat.com commit 348d9cc7bde30852aa4f54aa70a22c3ad5dd081a Author: Armin Wolf Date: Sat Jan 6 23:41:26 2024 +0100 platform/x86: intel-wmi-sbl-fw-update: Fix function name in error message Since when the driver was converted to use the bus-based WMI interface, the old GUID-based WMI functions are not used anymore. Update the error message to avoid confusing users. Compile-tested only. Fixes: 75c487fcb69c ("platform/x86: intel-wmi-sbl-fw-update: Use bus-based WMI interface") Signed-off-by: Armin Wolf Acked-by: Randy Dunlap Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240106224126.13803-1-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 9e054ed05ddae2c1b4b2bcb5dfcae49c5ac7637e Author: Shin'ichiro Kawasaki Date: Mon Jan 8 15:20:59 2024 +0900 platform/x86: p2sb: Use pci_resource_n() in p2sb_read_bar0() Accesses to resource[] member of struct pci_dev shall be wrapped with pci_resource_n() for future compatibility. Call the helper function in p2sb_read_bar0(). Suggested-by: Andy Shevchenko Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20240108062059.3583028-3-shinichiro.kawasaki@wdc.com Tested-by Klara Modin Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5913320eb0b3ec88158cfcb0fa5e996bf4ef681b Author: Shin'ichiro Kawasaki Date: Mon Jan 8 15:20:58 2024 +0900 platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe p2sb_bar() unhides P2SB device to get resources from the device. It guards the operation by locking pci_rescan_remove_lock so that parallel rescans do not find the P2SB device. However, this lock causes deadlock when PCI bus rescan is triggered by /sys/bus/pci/rescan. The rescan locks pci_rescan_remove_lock and probes PCI devices. When PCI devices call p2sb_bar() during probe, it locks pci_rescan_remove_lock again. Hence the deadlock. To avoid the deadlock, do not lock pci_rescan_remove_lock in p2sb_bar(). Instead, do the lock at fs_initcall. Introduce p2sb_cache_resources() for fs_initcall which gets and caches the P2SB resources. At p2sb_bar(), refer the cache and return to the caller. Before operating the device at P2SB DEVFN for resource cache, check that its device class is PCI_CLASS_MEMORY_OTHER 0x0580 that PCH specifications define. This avoids unexpected operation to other devices at the same DEVFN. Link: https://lore.kernel.org/linux-pci/6xb24fjmptxxn5js2fjrrddjae6twex5bjaftwqsuawuqqqydx@7cl3uik5ef6j/ Fixes: 9745fb07474f ("platform/x86/intel: Add Primary to Sideband (P2SB) bridge support") Cc: stable@vger.kernel.org Suggested-by: Andy Shevchenko Signed-off-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20240108062059.3583028-2-shinichiro.kawasaki@wdc.com Reviewed-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Tested-by Klara Modin Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 416de0246f35f43d871a57939671fe814f4455ee Author: Nathan Chancellor Date: Thu Jan 4 15:59:03 2024 -0700 platform/x86: intel-uncore-freq: Fix types in sysfs callbacks When booting a kernel with CONFIG_CFI_CLANG, there is a CFI failure when accessing any of the values under /sys/devices/system/cpu/intel_uncore_frequency/package_00_die_00: $ cat /sys/devices/system/cpu/intel_uncore_frequency/package_00_die_00/max_freq_khz fish: Job 1, 'cat /sys/devices/system/cpu/int…' terminated by signal SIGSEGV (Address boundary error) $ sudo dmesg &| grep 'CFI failure' [ 170.953925] CFI failure at kobj_attr_show+0x19/0x30 (target: show_max_freq_khz+0x0/0xc0 [intel_uncore_frequency_common]; expected type: 0xd34078c5 The sysfs callback functions such as show_domain_id() are written as if they are going to be called by dev_attr_show() but as the above message shows, they are instead called by kobj_attr_show(). kCFI checks that the destination of an indirect jump has the exact same type as the prototype of the function pointer it is called through and fails when they do not. These callbacks are called through kobj_attr_show() because uncore_root_kobj was initialized with kobject_create_and_add(), which means uncore_root_kobj has a ->sysfs_ops of kobj_sysfs_ops from kobject_create(), which uses kobj_attr_show() as its ->show() value. The only reason there has not been a more noticeable problem until this point is that 'struct kobj_attribute' and 'struct device_attribute' have the same layout, so getting the callback from container_of() works the same with either value. Change all the callbacks and their uses to be compatible with kobj_attr_show() and kobj_attr_store(), which resolves the kCFI failure and allows the sysfs files to work properly. Closes: https://github.com/ClangBuiltLinux/linux/issues/1974 Fixes: ae7b2ce57851 ("platform/x86/intel/uncore-freq: Use sysfs API to create attributes") Cc: stable@vger.kernel.org Signed-off-by: Nathan Chancellor Reviewed-by: Sami Tolvanen Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20240104-intel-uncore-freq-kcfi-fix-v1-1-bf1e8939af40@kernel.org Signed-off-by: Hans de Goede commit 8446f9d11678bc268897882e86733d73204f83c4 Author: Dan Carpenter Date: Fri Jan 5 16:47:54 2024 +0300 platform/x86: wmi: Fix wmi_dev_probe() This has a reversed if statement so it accidentally disables the wmi method before returning. Fixes: 704af3a40747 ("platform/x86: wmi: Remove chardev interface") Signed-off-by: Dan Carpenter Reviewed-by: Armin Wolf Link: https://lore.kernel.org/r/9c81251b-bc87-4ca3-bb86-843dc85e5145@moroto.mountain Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b73e43dcd7a8be26880ef8ff336053b29e79dbc5 Author: Guanhua Gao Date: Thu Jan 18 11:29:16 2024 -0500 dmaengine: fsl-dpaa2-qdma: Fix the size of dma pools In case of long format of qDMA command descriptor, there are one frame descriptor, three entries in the frame list and two data entries. So the size of dma_pool_create for these three fields should be the same with the total size of entries respectively, or the contents may be overwritten by the next allocated descriptor. Fixes: 7fdf9b05c73b ("dmaengine: fsl-dpaa2-qdma: Add NXP dpaa2 qDMA controller driver for Layerscape SoCs") Signed-off-by: Guanhua Gao Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20240118162917.2951450-1-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit 29e473f4b51ee56b5808323e274a8369b4d181cb Author: Armin Wolf Date: Wed Jan 3 20:27:07 2024 +0100 platform/x86: wmi: Fix notify callback locking When an legacy WMI event handler is removed, an WMI event could have called the handler just before it was removed, meaning the handler could still be running after wmi_remove_notify_handler() returns. Something similar could also happens when using the WMI bus, as the WMI core might still call the notify() callback from an WMI driver even if its remove() callback was just called. Fix this by introducing a rw semaphore which ensures that the event state of a WMI device does not change while the WMI core is handling an event for it. Tested on a Dell Inspiron 3505 and a Acer Aspire E1-731. Fixes: 1686f5444546 ("platform/x86: wmi: Incorporate acpi_install_notify_handler") Signed-off-by: Armin Wolf Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240103192707.115512-5-W_Armin@gmx.de Signed-off-by: Hans de Goede commit 3ea7f59af8ffa17ce5f5173d6f4bfbc73334187d Author: Armin Wolf Date: Wed Jan 3 20:27:06 2024 +0100 platform/x86: wmi: Decouple legacy WMI notify handlers from wmi_block_list Until now, legacy WMI notify handler functions where using the wmi_block_list, which did no refcounting on the returned WMI device. This meant that the WMI device could disappear at any moment, potentially leading to various errors. Fix this by using bus_find_device() which returns an actual reference to the found WMI device. Tested on a Dell Inspiron 3505 and a Acer Aspire E1-731. Signed-off-by: Armin Wolf Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240103192707.115512-4-W_Armin@gmx.de Signed-off-by: Hans de Goede commit 3d8a29fec2cb96b3aa75a595f20c4b73ff294a97 Author: Armin Wolf Date: Wed Jan 3 20:27:05 2024 +0100 platform/x86: wmi: Return immediately if an suitable WMI event is found Commit 58f6425eb92f ("WMI: Cater for multiple events with same GUID") allowed legacy WMI notify handlers to be installed for multiple WMI devices with the same GUID. However this is useless since the legacy GUID-based interface is blacklisted from seeing WMI devices with duplicated GUIDs. Return immediately if a suitable WMI event is found in wmi_install/remove_notify_handler() since searching for other suitable events is pointless. Tested on a Dell Inspiron 3505 and a Acer Aspire E1-731. Signed-off-by: Armin Wolf Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240103192707.115512-3-W_Armin@gmx.de Signed-off-by: Hans de Goede commit 6ba7843b59b77360812617d071313c7f35f3757a Author: Armin Wolf Date: Wed Jan 3 20:27:04 2024 +0100 platform/x86: wmi: Fix error handling in legacy WMI notify handler functions When wmi_install_notify_handler()/wmi_remove_notify_handler() are unable to enable/disable the WMI device, they unconditionally return an error to the caller. When registering legacy WMI notify handlers, this means that the callback remains registered despite wmi_install_notify_handler() having returned an error. When removing legacy WMI notify handlers, this means that the callback is removed despite wmi_remove_notify_handler() having returned an error. Fix this by only warning when the WMI device could not be enabled. This behaviour matches the bus-based WMI interface. Tested on a Dell Inspiron 3505 and a Acer Aspire E1-731. Fixes: 58f6425eb92f ("WMI: Cater for multiple events with same GUID") Signed-off-by: Armin Wolf Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20240103192707.115512-2-W_Armin@gmx.de Signed-off-by: Hans de Goede commit e4cec073b7755a78030f30cf627141c759035b50 Author: Randy Dunlap Date: Sat Jan 20 23:00:21 2024 -0800 dmaengine: at_hdmac: fix some kernel-doc warnings Fix some kernel-doc format warnings: at_hdmac.c:243: warning: Excess struct member 'sg_len' description in 'at_desc' at_hdmac.c:252: warning: cannot understand function prototype: 'enum atc_status ' ez at_hdmac.c:351: warning: Excess struct member 'atdma_devtype' description in 'at_dma' at_hdmac.c:351: warning: Excess struct member 'ch_regs' description in 'at_dma' at_hdmac.c:664: warning: contents before sections Signed-off-by: Randy Dunlap Cc: Ludovic Desroches Cc: Tudor Ambarus Cc: linux-arm-kernel@lists.infradead.org Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Link: https://lore.kernel.org/r/20240121070021.25365-1-rdunlap@infradead.org Signed-off-by: Vinod Koul commit f64fdde9bc771d7d790e8bcc30a7e03bbe0b1a9f Author: Thomas Bogendoerfer Date: Fri Jan 19 14:52:51 2024 +0100 MIPS: sgi-ip32: Fix missing prototypes Fix interrupt function prototypes, move all prototypes into a new file ip32-common.h and include it where needed. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Florian Fainelli commit ab58a2f319de945f631150a190653a90e307df8e Author: Thomas Bogendoerfer Date: Fri Jan 19 14:37:57 2024 +0100 MIPS: sgi-ip30: Fix missing prototypes Include needed header files. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Florian Fainelli commit e3a4f1b7ada8360c1838ac3aad9837749a698c7a Author: Thomas Bogendoerfer Date: Fri Jan 19 14:36:34 2024 +0100 MIPS: fw arc: Fix missing prototypes Make ArcGetMemoryDescriptor() static since it's only needed internally. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Florian Fainelli commit f134bd1ebc28d40010328e5b314e10575e3550e0 Author: Thomas Bogendoerfer Date: Fri Jan 19 14:32:16 2024 +0100 MIPS: sgi-ip27: Fix missing prototypes Fix missing prototypes by making not shared functions static and adding others to ip27-common.h. Also drop ip27-hubio.c as it's not used for a long time. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Florian Fainelli commit 0c565d16b80074e57e3e56240d13fc6cd6ed0334 Author: Cristian Marussi Date: Mon Jan 8 12:34:16 2024 +0000 firmware: arm_ffa: Handle partitions setup failures Make ffa_setup_partitions() fail, cleanup and return an error when the Host partition setup fails: in such a case ffa_init() itself will fail. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-6-75bf7035bc50@arm.com Signed-off-by: Sudeep Holla commit ace760d9c0498fb226269ed34f0e86417d90f91b Author: Cristian Marussi Date: Mon Jan 8 12:34:15 2024 +0000 firmware: arm_ffa: Use xa_insert() and check for result While adding new partitions descriptors to the XArray the outcome of the stores should be checked and, in particular, it has also to be ensured that an existing entry with the same index was not already present, since partitions IDs are expected to be unique. Use xa_insert() instead of xa_store() since it returns -EBUSY when the index is already in use and log an error when that happens. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-5-75bf7035bc50@arm.com Signed-off-by: Sudeep Holla commit ad9d9a107a4308e75ec34890547447c7095b4781 Author: Cristian Marussi Date: Mon Jan 8 12:34:14 2024 +0000 firmware: arm_ffa: Simplify ffa_partitions_cleanup() On cleanup iterate the XArrays with xa_for_each() and remove the existent entries with xa_erase(), finally destroy the XArray itself. Remove partition_count field from drv_info since no more used anywhwere. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-4-75bf7035bc50@arm.com Signed-off-by: Sudeep Holla commit c00d9738fd5fce15dc5494d05b7599dce23e8146 Author: Cristian Marussi Date: Mon Jan 8 12:34:13 2024 +0000 firmware: arm_ffa: Check xa_load() return value Add a check to verify the result of xa_load() during the partition lookups done while registering/unregistering the scheduler receiver interrupt callbacks and while executing the main scheduler receiver interrupt callback handler. Fixes: 0184450b8b1e ("firmware: arm_ffa: Add schedule receiver callback mechanism") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-3-75bf7035bc50@arm.com Signed-off-by: Sudeep Holla commit 5ff30ade16cd9efc2466d3ea22bbaf370772941a Author: Cristian Marussi Date: Mon Jan 8 12:34:12 2024 +0000 firmware: arm_ffa: Add missing rwlock_init() for the driver partition Add the missing rwlock initialization for the FF-A partition associated the driver in ffa_setup_partitions(). It will the primary scheduler partition in the host or the VM partition in the virtualised environment. IOW, it corresponds to the partition with VM ID == drv_info->vm_id. Fixes: 1b6bf41b7a65 ("firmware: arm_ffa: Add notification handling mechanism") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-2-75bf7035bc50@arm.com Signed-off-by: Sudeep Holla commit 59b2e242b13192e50bf47df3780bf8a7e2260e98 Author: Cristian Marussi Date: Mon Jan 8 12:34:11 2024 +0000 firmware: arm_ffa: Add missing rwlock_init() in ffa_setup_partitions() Add the missing rwlock initialization for the individual FF-A partition information in ffa_setup_partitions(). Fixes: 0184450b8b1e ("firmware: arm_ffa: Add schedule receiver callback mechanism") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-1-75bf7035bc50@arm.com Signed-off-by: Sudeep Holla commit 6bd1b3fede83d8ba5314886062a9bfdada5102a9 Author: Cristian Marussi Date: Tue Jan 9 18:17:16 2024 +0000 firmware: arm_scmi: Fix the clock protocol supported version Rollback currently supported SCMI clock protocol version to v2.0 since some of the mandatory v3.0 features are indeed still not supported yet. Fixes: b5efc28a754d ("firmware: arm_scmi: Add protocol versioning checks") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240109181716.2338636-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 27600c96e2ffa6c1b2cb378ddc75c6620c628d04 Author: Cristian Marussi Date: Tue Jan 9 15:01:06 2024 +0000 firmware: arm_scmi: Fix the clock protocol version for v3.2 The clock protocol version as per the SCMI v3.2 specification is 0x30000. Enable the v3.0 clock protocol features only when clock protocol version equals 0x30000. The previous beta version of the spec had this value set to 0x20001 and th same value trickled down from the initial development. The version update were missed in the driver. Fixes: e49e314a2cf7 ("firmware: arm_scmi: Add clock v3.2 CONFIG_SET support") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240109150106.2066739-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit b5dc0ffd36560dbadaed9a3d9fd7838055d62d74 Author: Cristian Marussi Date: Mon Jan 8 18:50:50 2024 +0000 firmware: arm_scmi: Use xa_insert() when saving raw queues Use xa_insert() when saving per-channel raw queues to better check for duplicates. Fixes: 7860701d1e6e ("firmware: arm_scmi: Add per-channel raw injection support") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240108185050.1628687-2-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit e8ef4bbe39b9576a73f104f6af743fb9c7b624ba Author: Cristian Marussi Date: Mon Jan 8 18:50:49 2024 +0000 firmware: arm_scmi: Use xa_insert() to store opps When storing opps by level or index use xa_insert() instead of xa_store() and add error-checking to spot bad duplicates indexes possibly wrongly provided by the platform firmware. Fixes: 31c7c1397a33 ("firmware: arm_scmi: Add v3.2 perf level indexing mode support") Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20240108185050.1628687-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 0726fcc8d4af75441b38aaa082f820e63b3a8748 Author: Tanzir Hasan Date: Tue Dec 26 22:52:03 2023 +0000 firmware: arm_scmi: Replace asm-generic/bug.h with linux/bug.h linux/bug.h includes asm-generic/bug.h already and hence replacing asm-generic/bug.h with linux/bug.h will not regress any build. Also, it is always better to avoid header file inclusion from asm-generic if possible. Suggested-by: Al Viro Signed-off-by: Tanzir Hasan Link: https://lore.kernel.org/r/20231226-shmem-v1-1-ea15ce81d8ba@google.com Signed-off-by: Sudeep Holla commit 437a310b22244d4e0b78665c3042e5d1c0f45306 Author: Cristian Marussi Date: Wed Dec 20 17:21:12 2023 +0000 firmware: arm_scmi: Check mailbox/SMT channel for consistency On reception of a completion interrupt the shared memory area is accessed to retrieve the message header at first and then, if the message sequence number identifies a transaction which is still pending, the related payload is fetched too. When an SCMI command times out the channel ownership remains with the platform until eventually a late reply is received and, as a consequence, any further transmission attempt remains pending, waiting for the channel to be relinquished by the platform. Once that late reply is received the channel ownership is given back to the agent and any pending request is then allowed to proceed and overwrite the SMT area of the just delivered late reply; then the wait for the reply to the new request starts. It has been observed that the spurious IRQ related to the late reply can be wrongly associated with the freshly enqueued request: when that happens the SCMI stack in-flight lookup procedure is fooled by the fact that the message header now present in the SMT area is related to the new pending transaction, even though the real reply has still to arrive. This race-condition on the A2P channel can be detected by looking at the channel status bits: a genuine reply from the platform will have set the channel free bit before triggering the completion IRQ. Add a consistency check to validate such condition in the A2P ISR. Reported-by: Xinglong Yang Closes: https://lore.kernel.org/all/PUZPR06MB54981E6FA00D82BFDBB864FBF08DA@PUZPR06MB5498.apcprd06.prod.outlook.com/ Fixes: 5c8a47a5a91d ("firmware: arm_scmi: Make scmi core independent of the transport type") Cc: stable@vger.kernel.org # 5.15+ Signed-off-by: Cristian Marussi Tested-by: Xinglong Yang Link: https://lore.kernel.org/r/20231220172112.763539-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit feab19143a1c8c5efdf1934dd0b1defb29bb5026 Author: Florian Fainelli Date: Wed Jan 17 15:49:44 2024 -0800 MIPS: Alchemy: Fix missing prototypes We have a number of missing prototypes warnings for board_setup(), alchemy_set_lpj() and prom_init_cmdline(), prom_getenv() and prom_get_ethernet_addr(). Fix those by providing definitions for the first two functions in au1000.h which is included everywhere relevant, and including prom.h for the last three. Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 0dd20a48a541ea5485b8bfc0e0bdbc6ae29b389f Author: Florian Fainelli Date: Tue Jan 16 20:30:59 2024 -0800 MIPS: Cobalt: Fix missing prototypes Fix missing prototypes warnings for cobalt_machine_halt() and cobalt_machine_restart() by moving their prototypes to cobalt.h which is included by setup.c. Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit b246271d257b4b0573e88f443ed8091f8b044895 Author: Wachowski, Karol Date: Mon Jan 15 14:44:34 2024 +0100 accel/ivpu: Deprecate DRM_IVPU_PARAM_CONTEXT_PRIORITY param DRM_IVPU_PARAM_CONTEXT_PRIORITY has been deprecated because it has been replaced with DRM_IVPU_JOB_PRIORITY levels set with submit IOCTL and was unused anyway. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-10-jacek.lawrynowicz@linux.intel.com commit 37dee2a2f4330a030abc5674bcec25ccc4addbcc Author: Jacek Lawrynowicz Date: Mon Jan 15 14:44:33 2024 +0100 accel/ivpu: Improve buffer object debug logs Make debug logs more readable and consistent: - don't print handle as it is not always available for all buffers - use hashed ivpu_bo ptr as main buffer identifier - remove unused fields from ivpu_bo_print_info() Signed-off-by: Jacek Lawrynowicz Reviewed-by: Wachowski, Karol Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-9-jacek.lawrynowicz@linux.intel.com commit b7a0e75632eb6568c82de9108bd29e130dd082d9 Author: Jacek Lawrynowicz Date: Mon Jan 15 14:44:32 2024 +0100 accel/ivpu: Disable buffer sharing among VPU contexts This was not supported properly. A buffer was imported to another VPU context as a separate buffer object with duplicated sgt. Both exported and imported buffers could be DMA mapped causing a double mapping on the same device. Buffers imported from another VPU context will now just increase reference count, leaving only a single sgt, fixing the problem above. Buffers still can't be shared among VPU contexts because each has its own MMU mapping and ivpu_bo only supports single MMU mappings. The solution would be to use a mapping list as in panfrost or etnaviv drivers and it will be implemented in future if required. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Andrzej Kacprowski Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-8-jacek.lawrynowicz@linux.intel.com commit a8c099d5d0e4b0400cfddfd95b881c8bd9349a88 Author: Jacek Lawrynowicz Date: Mon Jan 15 14:44:31 2024 +0100 accel/ivpu: Free buffer sgt on unbind Call dma_unmap() on all buffers before the VPU is unbinded to avoid "device driver has pending DMA allocations while released from device" warning when DMA-API debug is enabled. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-7-jacek.lawrynowicz@linux.intel.com commit 7f66319927a8ced3be715eb7616a890b9bf0348b Author: Jacek Lawrynowicz Date: Mon Jan 15 14:44:30 2024 +0100 accel/ivpu: Fix for missing lock around drm_gem_shmem_vmap() drm_gem_shmem_vmap/vunmap requires dma resv lock to be held. This was missed during conversion to shmem helper. Fixes: 8d88e4cdce4f ("accel/ivpu: Use GEM shmem helper for all buffers") Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-6-jacek.lawrynowicz@linux.intel.com commit 2a20b857dd654595d332f2521d80bd67b03536a0 Author: Wachowski, Karol Date: Mon Jan 15 14:44:29 2024 +0100 accel/ivpu: Add diagnostic messages when VPU fails to boot or suspend Make boot/suspend failure debugging easier by dumping FW logs and error registers. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-5-jacek.lawrynowicz@linux.intel.com commit 8047d36fe563bf7ee7b28a284a0892506a6000a9 Author: Wachowski, Karol Date: Mon Jan 15 14:44:28 2024 +0100 accel/ivpu: Add debug prints for MMU map/unmap operations It is common need to be able to see IOVA/physical to VPU addresses mappings. Especially when debugging different kind of memory related issues. Lack of such logs forces user to modify and recompile KMD manually. This commit adds those logs under MMU debug mask which can be turned on dynamically with module param during KMD load. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-4-jacek.lawrynowicz@linux.intel.com commit 929acfb9c53986d5ba37cfb9e1172ad79735f8eb Author: Wachowski, Karol Date: Mon Jan 15 14:44:27 2024 +0100 accel/ivpu: Call diagnose failure in ivpu_mmu_cmdq_sync() Check for possible failure reasons in the buttress. Some errors (like external abort) should have corresponding buttress errors registers set indicating the real reason of failure. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-3-jacek.lawrynowicz@linux.intel.com commit 30cf36bb0408a163eb3d58ea6b883c612c029286 Author: Wachowski, Karol Date: Mon Jan 15 14:44:26 2024 +0100 accel/ivpu: Dump MMU events in case of VPU boot timeout Add ivpu_mmu_evtq_dump() function that dumps existing MMU events from MMU event queue. Call this function if VPU boot failed. Previously MMU events were only checked in interrupt handler, but if VPU failed to boot due to MMU faults, those faults were missed because of interrupts not yet being enabled. This will allow checking potential fault reason of VPU not booting. Signed-off-by: Wachowski, Karol Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20240115134434.493839-2-jacek.lawrynowicz@linux.intel.com commit 805c74eac8cb306dc69b87b6b066ab4da77ceaf1 Author: Mario Limonciello Date: Wed Jan 17 08:29:42 2024 -0600 gpiolib: acpi: Ignore touchpad wakeup on GPD G1619-04 Spurious wakeups are reported on the GPD G1619-04 which can be absolved by programming the GPIO to ignore wakeups. Cc: stable@vger.kernel.org Reported-and-tested-by: George Melikov Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3073 Signed-off-by: Mario Limonciello Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit cf79f291f985662150363b4a93d16f88f12643bc Merge: a20f1b02bafcb 6613476e225e0 Author: Maxime Ripard Date: Mon Jan 22 09:44:15 2024 +0100 Merge v6.8-rc1 into drm-misc-fixes Let's kickstart the 6.8 fix cycle. Signed-off-by: Maxime Ripard commit d8d222e09dab84a17bb65dda4b94d01c565f5327 Author: Dave Chinner Date: Tue Jan 16 15:33:07 2024 +1100 xfs: read only mounts with fsopen mount API are busted Recently xfs/513 started failing on my test machines testing "-o ro,norecovery" mount options. This was being emitted in dmesg: [ 9906.932724] XFS (pmem0): no-recovery mounts must be read-only. Turns out, readonly mounts with the fsopen()/fsconfig() mount API have been busted since day zero. It's only taken 5 years for debian unstable to start using this "new" mount API, and shortly after this I noticed xfs/513 had started to fail as per above. The syscall trace is: fsopen("xfs", FSOPEN_CLOEXEC) = 3 mount_setattr(-1, NULL, 0, NULL, 0) = -1 EINVAL (Invalid argument) ..... fsconfig(3, FSCONFIG_SET_STRING, "source", "/dev/pmem0", 0) = 0 fsconfig(3, FSCONFIG_SET_FLAG, "ro", NULL, 0) = 0 fsconfig(3, FSCONFIG_SET_FLAG, "norecovery", NULL, 0) = 0 fsconfig(3, FSCONFIG_CMD_CREATE, NULL, NULL, 0) = -1 EINVAL (Invalid argument) close(3) = 0 Showing that the actual mount instantiation (FSCONFIG_CMD_CREATE) is what threw out the error. During mount instantiation, we call xfs_fs_validate_params() which does: /* No recovery flag requires a read-only mount */ if (xfs_has_norecovery(mp) && !xfs_is_readonly(mp)) { xfs_warn(mp, "no-recovery mounts must be read-only."); return -EINVAL; } and xfs_is_readonly() checks internal mount flags for read only state. This state is set in xfs_init_fs_context() from the context superblock flag state: /* * Copy binary VFS mount flags we are interested in. */ if (fc->sb_flags & SB_RDONLY) set_bit(XFS_OPSTATE_READONLY, &mp->m_opstate); With the old mount API, all of the VFS specific superblock flags had already been parsed and set before xfs_init_fs_context() is called, so this all works fine. However, in the brave new fsopen/fsconfig world, xfs_init_fs_context() is called from fsopen() context, before any VFS superblock have been set or parsed. Hence if we use fsopen(), the internal XFS readonly state is *never set*. Hence anything that depends on xfs_is_readonly() actually returning true for read only mounts is broken if fsopen() has been used to mount the filesystem. Fix this by moving this internal state initialisation to xfs_fs_fill_super() before we attempt to validate the parameters that have been set prior to the FSCONFIG_CMD_CREATE call being made. Signed-off-by: Dave Chinner Fixes: 73e5fff98b64 ("xfs: switch to use the new mount-api") cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 4050957c7c2c14aa795dbf423b4180d5ac04e113 Author: Fedor Pchelkin Date: Wed Dec 20 12:53:15 2023 +0300 drm/exynos: gsc: minor fix for loop iteration in gsc_runtime_resume Do not forget to call clk_disable_unprepare() on the first element of ctx->clocks array. Found by Linux Verification Center (linuxtesting.org). Fixes: 8b7d3ec83aba ("drm/exynos: gsc: Convert driver to IPP v2 core API") Signed-off-by: Fedor Pchelkin Reviewed-by: Marek Szyprowski Signed-off-by: Inki Dae commit 960b537e91725bcb17dd1b19e48950e62d134078 Author: Arnd Bergmann Date: Thu Dec 14 13:32:15 2023 +0100 drm/exynos: fix accidental on-stack copy of exynos_drm_plane gcc rightfully complains about excessive stack usage in the fimd_win_set_pixfmt() function: drivers/gpu/drm/exynos/exynos_drm_fimd.c: In function 'fimd_win_set_pixfmt': drivers/gpu/drm/exynos/exynos_drm_fimd.c:750:1: error: the frame size of 1032 bytes is larger than 1024 byte drivers/gpu/drm/exynos/exynos5433_drm_decon.c: In function 'decon_win_set_pixfmt': drivers/gpu/drm/exynos/exynos5433_drm_decon.c:381:1: error: the frame size of 1032 bytes is larger than 1024 bytes There is really no reason to copy the large exynos_drm_plane structure to the stack before using one of its members, so just use a pointer instead. Fixes: 6f8ee5c21722 ("drm/exynos: fimd: Make plane alpha configurable") Signed-off-by: Arnd Bergmann Reviewed-by: Marek Szyprowski Signed-off-by: Inki Dae commit 477552e1d339d9fa654a363c9c0f1e9c4f087d2b Author: Inki Dae Date: Fri Dec 15 09:38:19 2023 +0900 drm/exynos: fix incorrect type issue Fix incorrect type issue in fimd_commit() of exynos_drm_fimd.c module. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312140930.Me9yWf8F-lkp@intel.com/ Signed-off-by: Inki Dae commit d09486a04f5da0a812c26217213b89a3b1acf836 Author: Jakub Kicinski Date: Thu Jan 18 16:58:59 2024 -0800 net: fix removing a namespace with conflicting altnames Mark reports a BUG() when a net namespace is removed. kernel BUG at net/core/dev.c:11520! Physical interfaces moved outside of init_net get "refunded" to init_net when that namespace disappears. The main interface name may get overwritten in the process if it would have conflicted. We need to also discard all conflicting altnames. Recent fixes addressed ensuring that altnames get moved with the main interface, which surfaced this problem. Reported-by: Марк Коренберг Link: https://lore.kernel.org/all/CAEmTpZFZ4Sv3KwqFOY2WKDHeZYdi0O7N5H1nTvcGp=SAEavtDg@mail.gmail.com/ Fixes: 7663d522099e ("net: check for altname conflicts when changing netdev's netns") Signed-off-by: Jakub Kicinski Reviewed-by: Eric Dumazet Reviewed-by: Jiri Pirko Reviewed-by: Xin Long Signed-off-by: David S. Miller commit 0086ffec768bec6f5d61fc7e406af640eb912a24 Author: Stanley Chan Date: Mon Nov 27 15:20:48 2023 -0600 tools cpupower bench: Override CFLAGS assignments Allow user to specify outside CFLAGS values as make argument Corrects an issue where CFLAGS is passed as a make argument for cpupower, but bench's makefile does not inherit and append to them. Signed-off-by: Stanley Chan Signed-off-by: Shuah Khan commit a5e0ace04fbf56c1794b1a2fa7a93672753b3fc7 Author: Gustavo A. R. Silva Date: Thu Nov 30 14:29:34 2023 -0600 init: Kconfig: Disable -Wstringop-overflow for GCC-11 -Wstringop-overflow is buggy in GCC-11. Therefore, we should disable this option specifically for that compiler version. To achieve this, we introduce a new configuration option: GCC11_NO_STRINGOP_OVERFLOW. The compiler option related to string operation overflow is now managed under configuration CC_STRINGOP_OVERFLOW. This option is enabled by default for all other versions of GCC that support it. Link: https://lore.kernel.org/lkml/b3c99290-40bc-426f-b3d2-1aa903f95c4e@embeddedor.com/ Link: https://lore.kernel.org/lkml/20231128091351.2bfb38dd@canb.auug.org.au/ Reviewed-by: Kees Cook Link: https://lore.kernel.org/linux-hardening/ZWj1+jkweEDWbmAR@work/ Signed-off-by: Gustavo A. R. Silva commit 113a61863ecbfb3c29f3eb18fd9813bccf1743c1 Author: Gustavo A. R. Silva Date: Tue Oct 31 17:50:11 2023 -0600 Makefile: Enable -Wstringop-overflow globally It seems that we have finished addressing all the remaining issues regarding -Wstringop-overflow. So, we are now in good shape to enable this compiler option globally. Signed-off-by: Gustavo A. R. Silva commit ded080c86b3f99683774af0441a58fc2e3d60cae Author: Ilya Dryomov Date: Wed Jan 17 18:59:44 2024 +0100 rbd: don't move requests to the running list on errors The running list is supposed to contain requests that are pinning the exclusive lock, i.e. those that must be flushed before exclusive lock is released. When wake_lock_waiters() is called to handle an error, requests on the acquiring list are failed with that error and no flushing takes place. Briefly moving them to the running list is not only pointless but also harmful: if exclusive lock gets acquired before all of their state machines are scheduled and go through rbd_lock_del_request(), we trigger rbd_assert(list_empty(&rbd_dev->running_list)); in rbd_try_acquire_lock(). Cc: stable@vger.kernel.org Fixes: 637cd060537d ("rbd: new exclusive lock wait/wake code") Signed-off-by: Ilya Dryomov Reviewed-by: Dongsheng Yang commit cd30e8bde28ac361e15d67ee5c00e0125ed42548 Author: Christophe JAILLET Date: Mon Jan 15 21:37:47 2024 +0100 rbd: remove usage of the deprecated ida_simple_*() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). Note that the upper limit of ida_simple_get() is exclusive, while that of ida_alloc_max() is inclusive, so 1 has been subtracted. [ idryomov: tweak changelog ] Signed-off-by: Christophe JAILLET Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 72b0cbf6b81003c01d63c60180b335f7692d170e Author: Yang Li Date: Fri Jan 19 17:57:07 2024 +0800 smb: Fix some kernel-doc comments Fix some kernel-doc comments to silence the warnings: fs/smb/server/transport_tcp.c:374: warning: Function parameter or struct member 'max_retries' not described in 'ksmbd_tcp_read' fs/smb/server/transport_tcp.c:423: warning: Function parameter or struct member 'iface' not described in 'create_socket' Signed-off-by: Yang Li Acked-by: Namjae Jeon Signed-off-by: Steve French commit 6613476e225e090cc9aad49be7fa504e290dd33d Author: Linus Torvalds Date: Sun Jan 21 14:11:32 2024 -0800 Linux 6.8-rc1 commit 35a4474b5c3dd4315f72bd53e87b97f128d9bb3d Merge: 4fbbed7872677 249f441f83c54 Author: Linus Torvalds Date: Sun Jan 21 14:01:12 2024 -0800 Merge tag 'bcachefs-2024-01-21' of https://evilpiepirate.org/git/bcachefs Pull more bcachefs updates from Kent Overstreet: "Some fixes, Some refactoring, some minor features: - Assorted prep work for disk space accounting rewrite - BTREE_TRIGGER_ATOMIC: after combining our trigger callbacks, this makes our trigger context more explicit - A few fixes to avoid excessive transaction restarts on multithreaded workloads: fstests (in addition to ktest tests) are now checking slowpath counters, and that's shaking out a few bugs - Assorted tracepoint improvements - Starting to break up bcachefs_format.h and move on disk types so they're with the code they belong to; this will make room to start documenting the on disk format better. - A few minor fixes" * tag 'bcachefs-2024-01-21' of https://evilpiepirate.org/git/bcachefs: (46 commits) bcachefs: Improve inode_to_text() bcachefs: logged_ops_format.h bcachefs: reflink_format.h bcachefs; extents_format.h bcachefs: ec_format.h bcachefs: subvolume_format.h bcachefs: snapshot_format.h bcachefs: alloc_background_format.h bcachefs: xattr_format.h bcachefs: dirent_format.h bcachefs: inode_format.h bcachefs; quota_format.h bcachefs: sb-counters_format.h bcachefs: counters.c -> sb-counters.c bcachefs: comment bch_subvolume bcachefs: bch_snapshot::btime bcachefs: add missing __GFP_NOWARN bcachefs: opts->compression can now also be applied in the background bcachefs: Prep work for variable size btree node buffers bcachefs: grab s_umount only if snapshotting ... commit 4fbbed7872677b0a28ba8237169968171a61efbd Merge: 7b297a5cc9308 71fee48fb772a Author: Linus Torvalds Date: Sun Jan 21 11:14:40 2024 -0800 Merge tag 'timers-core-2024-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Updates for time and clocksources: - A fix for the idle and iowait time accounting vs CPU hotplug. The time is reset on CPU hotplug which makes the accumulated systemwide time jump backwards. - Assorted fixes and improvements for clocksource/event drivers" * tag 'timers-core-2024-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug clocksource/drivers/ep93xx: Fix error handling during probe clocksource/drivers/cadence-ttc: Fix some kernel-doc warnings clocksource/drivers/timer-ti-dm: Fix make W=n kerneldoc warnings clocksource/timer-riscv: Add riscv_clock_shutdown callback dt-bindings: timer: Add StarFive JH8100 clint dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp regs commit 7b297a5cc9308b57c29635e00395f4005c9ba960 Merge: 2368fcf341d3a 18f14afe28164 Author: Linus Torvalds Date: Sun Jan 21 11:04:29 2024 -0800 Merge tag 'powerpc-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Aneesh Kumar: - Increase default stack size to 32KB for Book3S Thanks to Michael Ellerman. * tag 'powerpc-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s: Increase default stack size to 32KB commit 249f441f83c546281f1c175756c81fac332bb64c Author: Kent Overstreet Date: Sun Jan 21 12:19:01 2024 -0500 bcachefs: Improve inode_to_text() Add line breaks - inode_to_text() is now much easier to read. Signed-off-by: Kent Overstreet commit d826cc57c53fa759cac019efc9e59e475cf41070 Author: Kent Overstreet Date: Sun Jan 21 02:57:45 2024 -0500 bcachefs: logged_ops_format.h Signed-off-by: Kent Overstreet commit 8d52ba60c4dccbf5d45db70f41b82b18c38059bd Author: Kent Overstreet Date: Sun Jan 21 02:54:47 2024 -0500 bcachefs: reflink_format.h Signed-off-by: Kent Overstreet commit b2fa1b633bac0c3b2d04ae00e8801414d251aace Author: Kent Overstreet Date: Sun Jan 21 02:51:56 2024 -0500 bcachefs; extents_format.h Signed-off-by: Kent Overstreet commit 0560eb9abf7dee3c3517cb38246522ecaf1efc12 Author: Kent Overstreet Date: Sun Jan 21 02:47:14 2024 -0500 bcachefs: ec_format.h Signed-off-by: Kent Overstreet commit c6c4ff6507c4e1d32f9c2019795d4b7aa6eb559f Author: Kent Overstreet Date: Sun Jan 21 02:42:53 2024 -0500 bcachefs: subvolume_format.h Signed-off-by: Kent Overstreet commit 8fed323b14040f42e5755bbb9bd778415634c4b6 Author: Kent Overstreet Date: Sun Jan 21 02:41:06 2024 -0500 bcachefs: snapshot_format.h Signed-off-by: Kent Overstreet commit d455179fce10f0a7a76b84d1c8327988a93e3216 Author: Kent Overstreet Date: Sun Jan 21 00:01:52 2024 -0500 bcachefs: alloc_background_format.h Signed-off-by: Kent Overstreet commit 72e0801049c9b10fe3cadacf57eb040dbe65ba52 Author: Kent Overstreet Date: Sat Jan 20 23:59:15 2024 -0500 bcachefs: xattr_format.h Signed-off-by: Kent Overstreet commit 7ffc4daa5f08b13f88c0ce743dadb18040926cbf Author: Kent Overstreet Date: Sat Jan 20 23:57:10 2024 -0500 bcachefs: dirent_format.h Signed-off-by: Kent Overstreet commit b36425da71fe25a51c7f28af0e92b37e535db4a2 Author: Kent Overstreet Date: Sat Jan 20 23:55:39 2024 -0500 bcachefs: inode_format.h Signed-off-by: Kent Overstreet commit 82de6207fb20ea9a467065f4c8ec382affc38405 Author: Kent Overstreet Date: Sat Jan 20 23:53:52 2024 -0500 bcachefs; quota_format.h Signed-off-by: Kent Overstreet commit 43314801a43985aa78cf475ccbdb3c520aa1e3d0 Author: Kent Overstreet Date: Sat Jan 20 23:50:56 2024 -0500 bcachefs: sb-counters_format.h bcachefs_format.h has gotten too big; let's do some organizing. Signed-off-by: Kent Overstreet commit 3a58dfbc46c277b090f1b72c949e15da7e1290bf Author: Kent Overstreet Date: Sat Jan 20 23:46:35 2024 -0500 bcachefs: counters.c -> sb-counters.c Signed-off-by: Kent Overstreet commit 12207f49ef41d5599fb313d103f2c7b485848c9d Author: Kent Overstreet Date: Sat Jan 20 23:44:17 2024 -0500 bcachefs: comment bch_subvolume Signed-off-by: Kent Overstreet commit d32088f2f2f0f361caeb87dfc71b632231fd6c7b Author: Kent Overstreet Date: Sat Jan 20 23:35:41 2024 -0500 bcachefs: bch_snapshot::btime Add a field to bch_snapshot for creation time; this will be important when we start exposing the snapshot tree to userspace. Signed-off-by: Kent Overstreet commit 7be0208fc99207e86974f40a3b57949dae67976c Author: Kent Overstreet Date: Wed Jan 17 17:16:07 2024 -0500 bcachefs: add missing __GFP_NOWARN Signed-off-by: Kent Overstreet commit d7e77f53e90e1eb87838eed7c651531427b9114a Author: Kent Overstreet Date: Tue Jan 16 16:20:21 2024 -0500 bcachefs: opts->compression can now also be applied in the background The "apply this compression method in the background" paths now use the compression option if background_compression is not set; this means that setting or changing the compression option will cause existing data to be compressed accordingly in the background. Signed-off-by: Kent Overstreet commit ec4edd7b9d2038a97e0ba3fad8fc8492b0d12d35 Author: Kent Overstreet Date: Tue Jan 16 13:29:59 2024 -0500 bcachefs: Prep work for variable size btree node buffers bcachefs btree nodes are big - typically 256k - and btree roots are pinned in memory. As we're now up to 18 btrees, we now have significant memory overhead in mostly empty btree roots. And in the future we're going to start enforcing that certain btree node boundaries exist, to solve lock contention issues - analagous to XFS's AGIs. Thus, we need to start allocating smaller btree node buffers when we can. This patch changes code that refers to the filesystem constant c->opts.btree_node_size to refer to the btree node buffer size - btree_buf_bytes() - where appropriate. Signed-off-by: Kent Overstreet commit 2acc59dd88d27ad69b66ded80df16c042b04eeec Author: Su Yue Date: Mon Jan 15 10:21:25 2024 +0800 bcachefs: grab s_umount only if snapshotting When I was testing mongodb over bcachefs with compression, there is a lockdep warning when snapshotting mongodb data volume. $ cat test.sh prog=bcachefs $prog subvolume create /mnt/data $prog subvolume create /mnt/data/snapshots while true;do $prog subvolume snapshot /mnt/data /mnt/data/snapshots/$(date +%s) sleep 1s done $ cat /etc/mongodb.conf systemLog: destination: file logAppend: true path: /mnt/data/mongod.log storage: dbPath: /mnt/data/ lockdep reports: [ 3437.452330] ====================================================== [ 3437.452750] WARNING: possible circular locking dependency detected [ 3437.453168] 6.7.0-rc7-custom+ #85 Tainted: G E [ 3437.453562] ------------------------------------------------------ [ 3437.453981] bcachefs/35533 is trying to acquire lock: [ 3437.454325] ffffa0a02b2b1418 (sb_writers#10){.+.+}-{0:0}, at: filename_create+0x62/0x190 [ 3437.454875] but task is already holding lock: [ 3437.455268] ffffa0a02b2b10e0 (&type->s_umount_key#48){.+.+}-{3:3}, at: bch2_fs_file_ioctl+0x232/0xc90 [bcachefs] [ 3437.456009] which lock already depends on the new lock. [ 3437.456553] the existing dependency chain (in reverse order) is: [ 3437.457054] -> #3 (&type->s_umount_key#48){.+.+}-{3:3}: [ 3437.457507] down_read+0x3e/0x170 [ 3437.457772] bch2_fs_file_ioctl+0x232/0xc90 [bcachefs] [ 3437.458206] __x64_sys_ioctl+0x93/0xd0 [ 3437.458498] do_syscall_64+0x42/0xf0 [ 3437.458779] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 3437.459155] -> #2 (&c->snapshot_create_lock){++++}-{3:3}: [ 3437.459615] down_read+0x3e/0x170 [ 3437.459878] bch2_truncate+0x82/0x110 [bcachefs] [ 3437.460276] bchfs_truncate+0x254/0x3c0 [bcachefs] [ 3437.460686] notify_change+0x1f1/0x4a0 [ 3437.461283] do_truncate+0x7f/0xd0 [ 3437.461555] path_openat+0xa57/0xce0 [ 3437.461836] do_filp_open+0xb4/0x160 [ 3437.462116] do_sys_openat2+0x91/0xc0 [ 3437.462402] __x64_sys_openat+0x53/0xa0 [ 3437.462701] do_syscall_64+0x42/0xf0 [ 3437.462982] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 3437.463359] -> #1 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}: [ 3437.463843] down_write+0x3b/0xc0 [ 3437.464223] bch2_write_iter+0x5b/0xcc0 [bcachefs] [ 3437.464493] vfs_write+0x21b/0x4c0 [ 3437.464653] ksys_write+0x69/0xf0 [ 3437.464839] do_syscall_64+0x42/0xf0 [ 3437.465009] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 3437.465231] -> #0 (sb_writers#10){.+.+}-{0:0}: [ 3437.465471] __lock_acquire+0x1455/0x21b0 [ 3437.465656] lock_acquire+0xc6/0x2b0 [ 3437.465822] mnt_want_write+0x46/0x1a0 [ 3437.465996] filename_create+0x62/0x190 [ 3437.466175] user_path_create+0x2d/0x50 [ 3437.466352] bch2_fs_file_ioctl+0x2ec/0xc90 [bcachefs] [ 3437.466617] __x64_sys_ioctl+0x93/0xd0 [ 3437.466791] do_syscall_64+0x42/0xf0 [ 3437.466957] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 3437.467180] other info that might help us debug this: [ 3437.469670] 2 locks held by bcachefs/35533: other info that might help us debug this: [ 3437.467507] Chain exists of: sb_writers#10 --> &c->snapshot_create_lock --> &type->s_umount_key#48 [ 3437.467979] Possible unsafe locking scenario: [ 3437.468223] CPU0 CPU1 [ 3437.468405] ---- ---- [ 3437.468585] rlock(&type->s_umount_key#48); [ 3437.468758] lock(&c->snapshot_create_lock); [ 3437.469030] lock(&type->s_umount_key#48); [ 3437.469291] rlock(sb_writers#10); [ 3437.469434] *** DEADLOCK *** [ 3437.469670] 2 locks held by bcachefs/35533: [ 3437.469838] #0: ffffa0a02ce00a88 (&c->snapshot_create_lock){++++}-{3:3}, at: bch2_fs_file_ioctl+0x1e3/0xc90 [bcachefs] [ 3437.470294] #1: ffffa0a02b2b10e0 (&type->s_umount_key#48){.+.+}-{3:3}, at: bch2_fs_file_ioctl+0x232/0xc90 [bcachefs] [ 3437.470744] stack backtrace: [ 3437.470922] CPU: 7 PID: 35533 Comm: bcachefs Kdump: loaded Tainted: G E 6.7.0-rc7-custom+ #85 [ 3437.471313] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 [ 3437.471694] Call Trace: [ 3437.471795] [ 3437.471884] dump_stack_lvl+0x57/0x90 [ 3437.472035] check_noncircular+0x132/0x150 [ 3437.472202] __lock_acquire+0x1455/0x21b0 [ 3437.472369] lock_acquire+0xc6/0x2b0 [ 3437.472518] ? filename_create+0x62/0x190 [ 3437.472683] ? lock_is_held_type+0x97/0x110 [ 3437.472856] mnt_want_write+0x46/0x1a0 [ 3437.473025] ? filename_create+0x62/0x190 [ 3437.473204] filename_create+0x62/0x190 [ 3437.473380] user_path_create+0x2d/0x50 [ 3437.473555] bch2_fs_file_ioctl+0x2ec/0xc90 [bcachefs] [ 3437.473819] ? lock_acquire+0xc6/0x2b0 [ 3437.474002] ? __fget_files+0x2a/0x190 [ 3437.474195] ? __fget_files+0xbc/0x190 [ 3437.474380] ? lock_release+0xc5/0x270 [ 3437.474567] ? __x64_sys_ioctl+0x93/0xd0 [ 3437.474764] ? __pfx_bch2_fs_file_ioctl+0x10/0x10 [bcachefs] [ 3437.475090] __x64_sys_ioctl+0x93/0xd0 [ 3437.475277] do_syscall_64+0x42/0xf0 [ 3437.475454] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 3437.475691] RIP: 0033:0x7f2743c313af ====================================================== In __bch2_ioctl_subvolume_create(), we grab s_umount unconditionally and unlock it at the end of the function. There is a comment "why do we need this lock?" about the lock coming from commit 42d237320e98 ("bcachefs: Snapshot creation, deletion") The reason is that __bch2_ioctl_subvolume_create() calls sync_inodes_sb() which enforce locked s_umount to writeback all dirty nodes before doing snapshot works. Fix it by read locking s_umount for snapshotting only and unlocking s_umount after sync_inodes_sb(). Signed-off-by: Su Yue Signed-off-by: Kent Overstreet commit 369acf97d6fd5da620d053d0f1878ffe32eff555 Author: Su Yue Date: Tue Jan 16 19:05:37 2024 +0800 bcachefs: kvfree bch_fs::snapshots in bch2_fs_snapshots_exit bch_fs::snapshots is allocated by kvzalloc in __snapshot_t_mut. It should be freed by kvfree not kfree. Or umount will triger: [ 406.829178 ] BUG: unable to handle page fault for address: ffffe7b487148008 [ 406.830676 ] #PF: supervisor read access in kernel mode [ 406.831643 ] #PF: error_code(0x0000) - not-present page [ 406.832487 ] PGD 0 P4D 0 [ 406.832898 ] Oops: 0000 [#1] PREEMPT SMP PTI [ 406.833512 ] CPU: 2 PID: 1754 Comm: umount Kdump: loaded Tainted: G OE 6.7.0-rc7-custom+ #90 [ 406.834746 ] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 [ 406.835796 ] RIP: 0010:kfree+0x62/0x140 [ 406.836197 ] Code: 80 48 01 d8 0f 82 e9 00 00 00 48 c7 c2 00 00 00 80 48 2b 15 78 9f 1f 01 48 01 d0 48 c1 e8 0c 48 c1 e0 06 48 03 05 56 9f 1f 01 <48> 8b 50 08 48 89 c7 f6 c2 01 0f 85 b0 00 00 00 66 90 48 8b 07 f6 [ 406.837810 ] RSP: 0018:ffffb9d641607e48 EFLAGS: 00010286 [ 406.838213 ] RAX: ffffe7b487148000 RBX: ffffb9d645200000 RCX: ffffb9d641607dc4 [ 406.838738 ] RDX: 000065bb00000000 RSI: ffffffffc0d88b84 RDI: ffffb9d645200000 [ 406.839217 ] RBP: ffff9a4625d00068 R08: 0000000000000001 R09: 0000000000000001 [ 406.839650 ] R10: 0000000000000001 R11: 000000000000001f R12: ffff9a4625d4da80 [ 406.840055 ] R13: ffff9a4625d00000 R14: ffffffffc0e2eb20 R15: 0000000000000000 [ 406.840451 ] FS: 00007f0a264ffb80(0000) GS:ffff9a4e2d500000(0000) knlGS:0000000000000000 [ 406.840851 ] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 406.841125 ] CR2: ffffe7b487148008 CR3: 000000018c4d2000 CR4: 00000000000006f0 [ 406.841464 ] Call Trace: [ 406.841583 ] [ 406.841682 ] ? __die+0x1f/0x70 [ 406.841828 ] ? page_fault_oops+0x159/0x470 [ 406.842014 ] ? fixup_exception+0x22/0x310 [ 406.842198 ] ? exc_page_fault+0x1ed/0x200 [ 406.842382 ] ? asm_exc_page_fault+0x22/0x30 [ 406.842574 ] ? bch2_fs_release+0x54/0x280 [bcachefs] [ 406.842842 ] ? kfree+0x62/0x140 [ 406.842988 ] ? kfree+0x104/0x140 [ 406.843138 ] bch2_fs_release+0x54/0x280 [bcachefs] [ 406.843390 ] kobject_put+0xb7/0x170 [ 406.843552 ] deactivate_locked_super+0x2f/0xa0 [ 406.843756 ] cleanup_mnt+0xba/0x150 [ 406.843917 ] task_work_run+0x59/0xa0 [ 406.844083 ] exit_to_user_mode_prepare+0x197/0x1a0 [ 406.844302 ] syscall_exit_to_user_mode+0x16/0x40 [ 406.844510 ] do_syscall_64+0x4e/0xf0 [ 406.844675 ] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 406.844907 ] RIP: 0033:0x7f0a2664e4fb Signed-off-by: Su Yue Reviewed-by: Brian Foster Signed-off-by: Kent Overstreet commit 00fff4dd58661944af9cb4fe8fe61b4105931776 Author: Kent Overstreet Date: Tue Jan 16 11:38:04 2024 -0500 bcachefs: bios must be 512 byte algined Fixes: 023f9ac9f70f bcachefs: Delete dio read alignment check Reported-by: Brian Foster Signed-off-by: Kent Overstreet commit aead3428e8b7502942356a17f0882d28eb3ff0c3 Author: Colin Ian King Date: Tue Jan 16 11:07:23 2024 +0000 bcachefs: remove redundant variable tmp The variable tmp is being assigned a value but it isn't being read afterwards. The assignment is redundant and so tmp can be removed. Cleans up clang scan build warning: warning: Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret' [deadcode.DeadStores] Signed-off-by: Colin Ian King Reviewed-by: Brian Foster Signed-off-by: Kent Overstreet commit b97de453651f06071afbf52a5614bd55b8cc4740 Author: Kent Overstreet Date: Mon Jan 15 20:40:06 2024 -0500 bcachefs: Improve trace_trans_restart_relock Signed-off-by: Kent Overstreet commit 46bf2e9cc745996ca56e56ed816e60d07811bd9a Author: Kent Overstreet Date: Mon Jan 15 20:37:23 2024 -0500 bcachefs: Fix excess transaction restarts in __bchfs_fallocate() drop_locks_do() should not be used in a fastpath without first trying the do in nonblocking mode - the unlock and relock will cause excessive transaction restarts and potentially livelocking with other threads that are contending for the same locks. Signed-off-by: Kent Overstreet commit 1a5039041b376f545dfc11d89af77cc720217b44 Author: Kent Overstreet Date: Mon Jan 15 18:19:52 2024 -0500 bcachefs: extents_to_bp_state Signed-off-by: Kent Overstreet commit ba96d36ca526f99b163927115abfec36ef5565e0 Author: Kent Overstreet Date: Mon Jan 15 18:08:32 2024 -0500 bcachefs: bkey_and_val_eq() Signed-off-by: Kent Overstreet commit e6a2566f7a009b644fd84a43a6c1e3a53bb0bf00 Author: Kent Overstreet Date: Mon Jan 15 17:59:51 2024 -0500 bcachefs: Better journal tracepoints Factor out bch2_journal_bufs_to_text(), and use it in the journal_entry_full() tracepoint; when we can't get a journal reservation we need to know the outstanding journal entry sizes to know if the problem is due to excessive flushing. Signed-off-by: Kent Overstreet commit 4ae016607b907e69ed817ce14158adffb9b47978 Author: Kent Overstreet Date: Mon Jan 15 17:57:44 2024 -0500 bcachefs: Print size of superblock with space allocated Signed-off-by: Kent Overstreet commit a6548c8b5eb541e77ffcf497e8761f34172ff828 Author: Kent Overstreet Date: Mon Jan 15 17:56:22 2024 -0500 bcachefs: Avoid flushing the journal in the discard path When issuing discards, we may need to flush the journal if there's too many buckets that can't be discarded until a journal flush. But the heuristic was bad; we should be comparing the number of buckets that need to flushes against the number of free buckets, not the number of buckets we saw. Signed-off-by: Kent Overstreet commit 189c176c5dd324531d4cb23f172b1761e65bb0ed Author: Kent Overstreet Date: Mon Jan 15 15:33:39 2024 -0500 bcachefs: Improve move_extent tracepoint Also print out the data_opts, so that we can see what specifically is being done to an extent. Signed-off-by: Kent Overstreet commit ef740a1e2939376ea4cc11cc8b923214dc1f4a41 Author: Kent Overstreet Date: Mon Jan 15 15:06:43 2024 -0500 bcachefs: Add missing bch2_moving_ctxt_flush_all() This fixes a bug with rebalance IOs getting stuck with reads completed, but writes never being issued. Signed-off-by: Kent Overstreet commit fa3185af43dce43a23df78c122bef860bcd4bf40 Author: Kent Overstreet Date: Mon Jan 15 15:04:40 2024 -0500 bcachefs: Re-add move_extent_write tracepoint It appears this was accidentally deleted at some point - also, do a bit of cleanup. Signed-off-by: Kent Overstreet commit d92b83f592d810aded2e5f90db5f560cc8cf577b Author: Kent Overstreet Date: Mon Jan 15 14:15:26 2024 -0500 bcachefs: bch2_kthread_io_clock_wait() no longer sleeps until full amount Drop t he loop in bch2_kthread_io_clock_wait(): this allows the code that uses it to be woken up for other reasons, and fixes a bug where rebalance wouldn't wake up when a scan was requested. This raises the possibility of spurious wakeups, but callers should always be able to handle that reasonably well. Signed-off-by: Kent Overstreet commit 741c1d3ec1a4a91d0bf18f200e2f0f8bed1ee7e9 Author: Kent Overstreet Date: Mon Jan 15 14:15:03 2024 -0500 bcachefs: Add .val_to_text() for KEY_TYPE_cookie Signed-off-by: Kent Overstreet commit 0124f42da70c513dc371b73688663c54e5a9666f Author: Kent Overstreet Date: Mon Jan 15 14:12:43 2024 -0500 bcachefs: Don't pass memcmp() as a pointer Some (buggy!) compilers have issues with this. Fixes: https://github.com/koverstreet/bcachefs/issues/625 Signed-off-by: Kent Overstreet commit 2368fcf341d3a6aa143e3cdfb0440fabd152c83b Merge: 7a396820222d6 5f4c01f1e3c7b Author: Linus Torvalds Date: Sun Jan 21 10:21:43 2024 -0800 Merge tag 'header_cleanup-2024-01-20' of https://evilpiepirate.org/git/bcachefs Pull header fix from Kent Overstreet: "Just one small fixup for the RT build" * tag 'header_cleanup-2024-01-20' of https://evilpiepirate.org/git/bcachefs: spinlock: Fix failing build for PREEMPT_RT commit 359724fa3ab79fbe9f42c6263cddc2afae32eef3 Author: Michal Schmidt Date: Thu Jan 18 21:50:40 2024 +0100 idpf: distinguish vports by the dev_port attribute idpf registers multiple netdevs (virtual ports) for one PCI function, but it does not provide a way for userspace to distinguish them with sysfs attributes. Per Documentation/ABI/testing/sysfs-class-net, it is a bug not to set dev_port for independent ports on the same PCI bus, device and function. Without dev_port set, systemd-udevd's default naming policy attempts to assign the same name ("ens2f0") to all four idpf netdevs on my test system and obviously fails, leaving three of them with the initial eth name. With this patch, systemd-udevd is able to assign unique names to the netdevs (e.g. "ens2f0", "ens2f0d1", "ens2f0d2", "ens2f0d3"). The Intel-provided out-of-tree idpf driver already sets dev_port. In this patch I chose to do it in the same place in the idpf_cfg_netdev function. Fixes: 0fe45467a104 ("idpf: add create vport and netdev configuration") Signed-off-by: Michal Schmidt Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit a54d51fb2dfb846aedf3751af501e9688db447f5 Author: Eric Dumazet Date: Thu Jan 18 20:17:49 2024 +0000 udp: fix busy polling Generic sk_busy_loop_end() only looks at sk->sk_receive_queue for presence of packets. Problem is that for UDP sockets after blamed commit, some packets could be present in another queue: udp_sk(sk)->reader_queue In some cases, a busy poller could spin until timeout expiration, even if some packets are available in udp_sk(sk)->reader_queue. v3: - make sk_busy_loop_end() nicer (Willem) v2: - add a READ_ONCE(sk->sk_family) in sk_is_inet() to avoid KCSAN splats. - add a sk_is_inet() check in sk_is_udp() (Willem feedback) - add a sk_is_inet() check in sk_is_tcp(). Fixes: 2276f58ac589 ("udp: use a separate rx queue for packet reception") Signed-off-by: Eric Dumazet Reviewed-by: Paolo Abeni Reviewed-by: Willem de Bruijn Reviewed-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit 57f2d2097603fea102330e8cfe6be4a8db24809e Author: Kent Overstreet Date: Wed Jan 10 23:47:04 2024 -0500 bcachefs: Reduce would_deadlock restarts We don't have to take locks in any particular ordering - we'll make forward progress just fine - but if we try to stick to an ordering, it can help to avoid excessive would_deadlock transaction restarts. This tweaks the reflink path to take extents btree locks in the right order. Signed-off-by: Kent Overstreet commit 5b14ce35af901853e91e186f34e71f31b08b4e0a Author: Kent Overstreet Date: Sat Nov 11 15:08:36 2023 -0500 bcachefs: bch2_trans_account_disk_usage_change() The disk space accounting rewrite is splitting out accounting for each replicas set - those are moving to btree keys, instead of percpu counters. This breaks bch2_trans_fs_usage_apply() up, splitting out the part we will still need. Signed-off-by: Kent Overstreet commit 8e7834a8831678d0825895d7f5a02ad0b29bbcde Author: Kent Overstreet Date: Fri Nov 17 00:03:45 2023 -0500 bcachefs: bch_fs_usage_base Split out base filesystem usage into its own type; prep work for breaking up bch2_trans_fs_usage_apply(). Signed-off-by: Kent Overstreet commit 4f564f4f9fdd4d120ee04678b0c22e40cc8b6b47 Author: Kent Overstreet Date: Sat Jan 6 21:01:47 2024 -0500 bcachefs: bch2_prt_compression_type() bounds checking helper, since compression types are extensible Signed-off-by: Kent Overstreet commit e58f963cecbdb08f28334122afba93a7840beabc Author: Kent Overstreet Date: Sat Jan 6 20:57:43 2024 -0500 bcachefs: helpers for printing data types We need bounds checking since new versions may introduce new data types. Signed-off-by: Kent Overstreet commit 38c23fb809f60bda1adfc431b18200b8f68c2025 Author: Kent Overstreet Date: Sun Jan 7 17:14:46 2024 -0500 bcachefs: BTREE_TRIGGER_ATOMIC Add a new flag to be explicit about when we're running atomic triggers. Signed-off-by: Kent Overstreet commit 9d5dba2ba86de28f74497d9018889918d368d9fa Author: Kent Overstreet Date: Sat Jan 6 19:47:09 2024 -0500 bcachefs: drop to_text code for obsolete bps in alloc keys Signed-off-by: Kent Overstreet commit 3fe8a1864042f7793e8fd79e4e24678839207153 Author: Kent Overstreet Date: Sat Jan 6 19:29:14 2024 -0500 bcachefs: eytzinger_for_each() declares loop iter Signed-off-by: Kent Overstreet commit 4ecad0da9de830681ffff973bc0d47b07612bbe6 Author: Kent Overstreet Date: Wed Jan 10 23:08:30 2024 -0500 bcachefs: Don't log errors if BCH_WRITE_ALLOC_NOWAIT Previously, we added logging in the write path to ensure that any unexpected errors getting reported to userspace have a log message; but BCH_WRITE_ALLOC_NOWAIT is a special case, it's used for promotes where errors are expected and not reported out to userspace - so we need to silence those. Signed-off-by: Kent Overstreet commit e240c1b3635e3fc7d3ba46c6fe12a0d8efb2941a Author: Su Yue Date: Mon Jan 8 23:11:08 2024 +0800 bcachefs: fix memleak in bch2_split_devs The pointer dev_name can be modified by strseq(), then causes the memleak: unreferenced object 0xffff9d08a2916c80 (size 32): comm "mount.bcachefs", pid 9090, jiffies 4295856224 (age 17.564s) hex dump (first 32 bytes): 2f 64 65 76 2f 6d 61 70 70 65 72 2f 74 65 73 74 /dev/mapper/test 2d 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -0.............. backtrace: [<00000000c5d3be7d>] __kmem_cache_alloc_node+0x1f3/0x2c0 [<0000000052215d26>] __kmalloc_node_track_caller+0x51/0x150 [<0000000069fea956>] kstrdup+0x32/0x60 [<000000000877fcf1>] bch2_split_devs+0x3f/0x150 [bcachefs] [<000000007ee93204>] bch2_mount+0xcb/0x640 [bcachefs] [<000000002dd1e04b>] legacy_get_tree+0x30/0x60 [<000000006afc31d3>] vfs_get_tree+0x28/0xf0 [<000000007b0c538e>] path_mount+0x475/0xb60 [<0000000092de5882>] __x64_sys_mount+0x105/0x140 [<0000000054fc05d8>] do_syscall_64+0x42/0xf0 [<00000000df584910>] entry_SYSCALL_64_after_hwframe+0x6e/0x76 Fix it by copy pointer dev_name at beginning and free the copied pointer at end. Signed-off-by: Su Yue Reviewed-by: Brian Foster Signed-off-by: Kent Overstreet commit e421946be7d9bf545147bea8419ef8239cb7ca52 Author: Fullway Wang Date: Thu Jan 18 14:24:43 2024 +0800 fbdev: sis: Error out if pixclock equals zero The userspace program could pass any values to the driver through ioctl() interface. If the driver doesn't check the value of pixclock, it may cause divide-by-zero error. In sisfb_check_var(), var->pixclock is used as a divisor to caculate drate before it is checked against zero. Fix this by checking it at the beginning. This is similar to CVE-2022-3061 in i740fb which was fixed by commit 15cf0b8. Signed-off-by: Fullway Wang Signed-off-by: Helge Deller commit 04e5eac8f3ab2ff52fa191c187a46d4fdbc1e288 Author: Fullway Wang Date: Thu Jan 18 11:49:40 2024 +0800 fbdev: savage: Error out if pixclock equals zero The userspace program could pass any values to the driver through ioctl() interface. If the driver doesn't check the value of pixclock, it may cause divide-by-zero error. Although pixclock is checked in savagefb_decode_var(), but it is not checked properly in savagefb_probe(). Fix this by checking whether pixclock is zero in the function savagefb_check_var() before info->var.pixclock is used as the divisor. This is similar to CVE-2022-3061 in i740fb which was fixed by commit 15cf0b8. Signed-off-by: Fullway Wang Signed-off-by: Helge Deller commit fead90507a37e73d41f6059b325b34412ed8d84b Author: Jiapeng Chong Date: Fri Jan 5 10:06:01 2024 +0800 fbdev: vt8500lcdfb: Remove unnecessary print function dev_err() The print function dev_err() is redundant because platform_get_irq() already prints an error. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7824 Signed-off-by: Jiapeng Chong Signed-off-by: Helge Deller commit 7a396820222d6d4c02057f41658b162bdcdadd0e Merge: 65163d16fcaef 78e727e58e54e Author: Linus Torvalds Date: Sat Jan 20 16:48:07 2024 -0800 Merge tag 'v6.8-rc-part2-smb-client' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client updates from Steve French: "Various smb client fixes, including multichannel and for SMB3.1.1 POSIX extensions: - debugging improvement (display start time for stats) - two reparse point handling fixes - various multichannel improvements and fixes - SMB3.1.1 POSIX extensions open/create parsing fix - retry (reconnect) improvement including new retrans mount parm, and handling of two additional return codes that need to be retried on - two minor cleanup patches and another to remove duplicate query info code - two documentation cleanup, and one reviewer email correction" * tag 'v6.8-rc-part2-smb-client' of git://git.samba.org/sfrench/cifs-2.6: cifs: update iface_last_update on each query-and-update cifs: handle servers that still advertise multichannel after disabling cifs: new mount option called retrans cifs: reschedule periodic query for server interfaces smb: client: don't clobber ->i_rdev from cached reparse points smb: client: get rid of smb311_posix_query_path_info() smb: client: parse owner/group when creating reparse points smb: client: fix parsing of SMB3.1.1 POSIX create context cifs: update known bugs mentioned in kernel docs for cifs cifs: new nt status codes from MS-SMB2 cifs: pick channel for tcon and tdis cifs: open_cached_dir should not rely on primary channel smb3: minor documentation updates Update MAINTAINERS email address cifs: minor comment cleanup smb3: show beginning time for per share stats cifs: remove redundant variable tcon_exist commit 65163d16fcaef37733b5f273ffe4d00d731b34de Merge: 80fc600fafee8 cb95a4fa50bbc Author: Linus Torvalds Date: Sat Jan 20 15:03:25 2024 -0800 Merge tag 'dmaengine-fix-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "New support: - Loongson LS2X APB DMA controller - sf-pdma: mpfs-pdma support - Qualcomm X1E80100 GPI dma controller support Updates: - Xilinx XDMA updates to support interleaved DMA transfers - TI PSIL threads for AM62P and J722S and cfg register regions description - axi-dmac Improving the cyclic DMA transfers - Tegra Support dma-channel-mask property - Remaining platform remove callback returning void conversions Driver fixes for: - Xilinx xdma driver operator precedence and initialization fix - Excess kernel-doc warning fix in imx-sdma xilinx xdma drivers - format-overflow warning fix for rz-dmac, sh usb dmac drivers - 'output may be truncated' fix for shdma, fsl-qdma and dw-edma drivers" * tag 'dmaengine-fix-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (58 commits) dmaengine: dw-edma: increase size of 'name' in debugfs code dmaengine: fsl-qdma: increase size of 'irq_name' dmaengine: shdma: increase size of 'dev_id' dmaengine: xilinx: xdma: Fix kernel-doc warnings dmaengine: usb-dmac: Avoid format-overflow warning dmaengine: sh: rz-dmac: Avoid format-overflow warning dmaengine: imx-sdma: fix Excess kernel-doc warnings dmaengine: xilinx: xdma: Fix initialization location of desc in xdma_channel_isr() dmaengine: xilinx: xdma: Fix operator precedence in xdma_prep_interleaved_dma() dmaengine: xilinx: xdma: statify xdma_prep_interleaved_dma dmaengine: xilinx: xdma: Workaround truncation compilation error dmaengine: pl330: issue_pending waits until WFP state dmaengine: xilinx: xdma: Implement interleaved DMA transfers dmaengine: xilinx: xdma: Prepare the introduction of interleaved DMA transfers dmaengine: xilinx: xdma: Add transfer error reporting dmaengine: xilinx: xdma: Add error checking in xdma_channel_isr() dmaengine: xilinx: xdma: Rework xdma_terminate_all() dmaengine: xilinx: xdma: Ease dma_pool alignment requirements dmaengine: xilinx: xdma: Add necessary macro definitions dmaengine: xilinx: xdma: Get rid of unused code ... commit 80fc600fafee8ba981da6ed41a572800c8e11de6 Merge: 31e97d7c9ae3d ff82e84e80fc0 Author: Linus Torvalds Date: Sat Jan 20 14:20:34 2024 -0800 Merge tag 'coccinelle-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux Pull coccinelle updates from Julia Lawall: "Updates to the device_attr_show semantic patch to reflect the new guidelines of the Linux kernel documentation. The problem was identified by Li Zhijian , who proposed an initial fix" * tag 'coccinelle-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux: coccinelle: device_attr_show: simplify patch case coccinelle: device_attr_show: Adapt to the latest Documentation/filesystems/sysfs.rst commit 31e97d7c9ae3de072d7b424b2cf706a03ec10720 Author: Aurelien Jarno Date: Sat Jan 13 19:33:31 2024 +0100 media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c) This patch replaces max(a, min(b, c)) by clamp(b, a, c) in the solo6x10 driver. This improves the readability and more importantly, for the solo6x10-p2m.c file, this reduces on my system (x86-64, gcc 13): - the preprocessed size from 121 MiB to 4.5 MiB; - the build CPU time from 46.8 s to 1.6 s; - the build memory from 2786 MiB to 98MiB. In fine, this allows this relatively simple C file to be built on a 32-bit system. Reported-by: Jiri Slaby Closes: https://lore.kernel.org/lkml/18c6df0d-45ed-450c-9eda-95160a2bbb8e@gmail.com/ Cc: # v6.7+ Suggested-by: David Laight Signed-off-by: Aurelien Jarno Reviewed-by: David Laight Reviewed-by: Hans Verkuil Signed-off-by: Linus Torvalds commit ff82e84e80fc0c93095f5a36e0a3508ac121ab80 Author: Julia Lawall Date: Sat Jan 20 21:56:11 2024 +0100 coccinelle: device_attr_show: simplify patch case Replacing the final expression argument by ... allows the format string to have multiple arguments. It also has the advantage of allowing the change to be recognized as a change in a single statement, thus avoiding adding unneeded braces. Signed-off-by: Julia Lawall commit 978ffcbf00d82b03b79e64b5c8249589b50e7463 Author: Linus Torvalds Date: Mon Jan 8 16:43:04 2024 -0800 execve: open the executable file before doing anything else No point in allocating a new mm, counting arguments and environment variables etc if we're just going to return ENOENT. This patch does expose the fact that 'do_filp_open()' that execve() uses is still unnecessarily expensive in the failure case, because it allocates the 'struct file *' early, even if the path lookup (which is heavily optimized) fails. So that remains an unnecessary cost in the "no such executable" case, but it's a separate issue. Regardless, I do not want to do _both_ a filename_lookup() and a later do_filp_open() like the origin patch by Josh Triplett did in [1]. Reported-by: Josh Triplett Cc: Kees Cook Cc: Mateusz Guzik Cc: Al Viro Link: https://lore.kernel.org/lkml/5c7333ea4bec2fad1b47a8fa2db7c31e4ffc4f14.1663334978.git.josh@joshtriplett.org/ [1] Link: https://lore.kernel.org/lkml/202209161637.9EDAF6B18@keescook/ Link: https://lore.kernel.org/lkml/CAHk-=wgznerM-xs+x+krDfE7eVBiy_HOam35rbsFMMOwvYuEKQ@mail.gmail.com/ Link: https://lore.kernel.org/lkml/CAHk-=whf9qLO8ipps4QhmS0BkM8mtWJhvnuDSdtw5gFjhzvKNA@mail.gmail.com/ Signed-off-by: Linus Torvalds commit e5075d8ec5647322fb9e699bfb76331cc8ee098d Merge: c25b24fa72c73 f24a70106dc1a Author: Linus Torvalds Date: Sat Jan 20 11:06:04 2024 -0800 Merge tag 'riscv-for-linus-6.8-mw4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull more RISC-V updates from Palmer Dabbelt: - Support for tuning for systems with fast misaligned accesses. - Support for SBI-based suspend. - Support for the new SBI debug console extension. - The T-Head CMOs now use PA-based flushes. - Support for enabling the V extension in kernel code. - Optimized IP checksum routines. - Various ftrace improvements. - Support for archrandom, which depends on the Zkr extension. - The build is no longer broken under NET=n, KUNIT=y for ports that don't define their own ipv6 checksum. * tag 'riscv-for-linus-6.8-mw4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (56 commits) lib: checksum: Fix build with CONFIG_NET=n riscv: lib: Check if output in asm goto supported riscv: Fix build error on rv32 + XIP riscv: optimize ELF relocation function in riscv RISC-V: Implement archrandom when Zkr is available riscv: Optimize hweight API with Zbb extension riscv: add dependency among Image(.gz), loader(.bin), and vmlinuz.efi samples: ftrace: Add RISC-V support for SAMPLE_FTRACE_DIRECT[_MULTI] riscv: ftrace: Add DYNAMIC_FTRACE_WITH_DIRECT_CALLS support riscv: ftrace: Make function graph use ftrace directly riscv: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name riscv: Restrict DWARF5 when building with LLVM to known working versions riscv: Hoist linker relaxation disabling logic into Kconfig kunit: Add tests for csum_ipv6_magic and ip_fast_csum riscv: Add checksum library riscv: Add checksum header riscv: Add static key for misaligned accesses asm-generic: Improve csum_fold RISC-V: selftests: cbo: Ensure asm operands match constraints ... commit c25b24fa72c734f8cd6c31a13548013263b26286 Merge: 125514880ddd3 83ab68168a3d9 Author: Linus Torvalds Date: Sat Jan 20 09:42:32 2024 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "Final round of fixes that came in too late to send in the first request. It's nine bug fixes and one version update (because of a bug fix) and one set of PCI ID additions. There's one bug fix in the core which is really a one liner (except that an additional sdev pointer was added for convenience) and the rest are in drivers" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target: core: Add TMF to tmr_list handling scsi: core: Kick the requeue list after inserting when flushing scsi: fnic: unlock on error path in fnic_queuecommand() scsi: fcoe: Fix unsigned comparison with zero in store_ctlr_mode() scsi: mpi3mr: Fix mpi3mr_fw.c kernel-doc warnings scsi: smartpqi: Bump driver version to 2.1.26-030 scsi: smartpqi: Fix logical volume rescan race condition scsi: smartpqi: Add new controller PCI IDs scsi: ufs: qcom: Remove unnecessary goto statement from ufs_qcom_config_esi() scsi: ufs: core: Remove the ufshcd_hba_exit() call from ufshcd_async_scan() scsi: ufs: core: Simplify power management during async scan commit 125514880ddd381fdaaa4d11f32afdb55f1c0307 Merge: b1737ad4406a3 99fe83ab3bb0e Author: Linus Torvalds Date: Sat Jan 20 09:24:06 2024 -0800 Merge tag 'sh-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux Pull sh updates from John Paul Adrian Glaubitz: "Since the large patch series to convert arch/sh to device tree support has not been finalized yet due to various maintainers still asking for changes to the series, this ended up being rather small consisting of just two fixes. The first patch by Geert Uytterhoeven addresses a build failure in the EcoVec platform code. And the second patch by Masahiro Yamada removes an unnecessary $(foreach ...) found in a Makefile of the vsyscall code. - Rename missed backlight field from fbdev to dev - Remove unnecessary $(foreach ...)" * tag 'sh-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux: sh: vsyscall: Remove unnecessary $(foreach ...) sh: ecovec24: Rename missed backlight field from fbdev to dev commit b1737ad4406a35f20eaae0e8079cc6ca6447e83a Merge: 9d64bf433c53c 2bebc3cd48701 Author: Linus Torvalds Date: Sat Jan 20 09:14:04 2024 -0800 Merge tag 'fbdev-for-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fix from Helge Deller: "There were various reports from people without any graphics output on the screen and it turns out one commit triggers the problem. - Revert 'firmware/sysfb: Clear screen_info state after consuming it'" * tag 'fbdev-for-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: Revert "firmware/sysfb: Clear screen_info state after consuming it" commit e3f9bed9bee261e3347131764e42aeedf1ffea61 Author: Kuniyuki Iwashima Date: Thu Jan 18 17:55:15 2024 -0800 llc: Drop support for ETH_P_TR_802_2. syzbot reported an uninit-value bug below. [0] llc supports ETH_P_802_2 (0x0004) and used to support ETH_P_TR_802_2 (0x0011), and syzbot abused the latter to trigger the bug. write$tun(r0, &(0x7f0000000040)={@val={0x0, 0x11}, @val, @mpls={[], @llc={@snap={0xaa, 0x1, ')', "90e5dd"}}}}, 0x16) llc_conn_handler() initialises local variables {saddr,daddr}.mac based on skb in llc_pdu_decode_sa()/llc_pdu_decode_da() and passes them to __llc_lookup(). However, the initialisation is done only when skb->protocol is htons(ETH_P_802_2), otherwise, __llc_lookup_established() and __llc_lookup_listener() will read garbage. The missing initialisation existed prior to commit 211ed865108e ("net: delete all instances of special processing for token ring"). It removed the part to kick out the token ring stuff but forgot to close the door allowing ETH_P_TR_802_2 packets to sneak into llc_rcv(). Let's remove llc_tr_packet_type and complete the deprecation. [0]: BUG: KMSAN: uninit-value in __llc_lookup_established+0xe9d/0xf90 __llc_lookup_established+0xe9d/0xf90 __llc_lookup net/llc/llc_conn.c:611 [inline] llc_conn_handler+0x4bd/0x1360 net/llc/llc_conn.c:791 llc_rcv+0xfbb/0x14a0 net/llc/llc_input.c:206 __netif_receive_skb_one_core net/core/dev.c:5527 [inline] __netif_receive_skb+0x1a6/0x5a0 net/core/dev.c:5641 netif_receive_skb_internal net/core/dev.c:5727 [inline] netif_receive_skb+0x58/0x660 net/core/dev.c:5786 tun_rx_batched+0x3ee/0x980 drivers/net/tun.c:1555 tun_get_user+0x53af/0x66d0 drivers/net/tun.c:2002 tun_chr_write_iter+0x3af/0x5d0 drivers/net/tun.c:2048 call_write_iter include/linux/fs.h:2020 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x8ef/0x1490 fs/read_write.c:584 ksys_write+0x20f/0x4c0 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x93/0xd0 fs/read_write.c:646 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Local variable daddr created at: llc_conn_handler+0x53/0x1360 net/llc/llc_conn.c:783 llc_rcv+0xfbb/0x14a0 net/llc/llc_input.c:206 CPU: 1 PID: 5004 Comm: syz-executor994 Not tainted 6.6.0-syzkaller-14500-g1c41041124bd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Fixes: 211ed865108e ("net: delete all instances of special processing for token ring") Reported-by: syzbot+b5ad66046b913bc04c6f@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=b5ad66046b913bc04c6f Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240119015515.61898-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit dad555c816a50c6a6a8a86be1f9177673918c647 Author: Eric Dumazet Date: Thu Jan 18 18:36:25 2024 +0000 llc: make llc_ui_sendmsg() more robust against bonding changes syzbot was able to trick llc_ui_sendmsg(), allocating an skb with no headroom, but subsequently trying to push 14 bytes of Ethernet header [1] Like some others, llc_ui_sendmsg() releases the socket lock before calling sock_alloc_send_skb(). Then it acquires it again, but does not redo all the sanity checks that were performed. This fix: - Uses LL_RESERVED_SPACE() to reserve space. - Check all conditions again after socket lock is held again. - Do not account Ethernet header for mtu limitation. [1] skbuff: skb_under_panic: text:ffff800088baa334 len:1514 put:14 head:ffff0000c9c37000 data:ffff0000c9c36ff2 tail:0x5dc end:0x6c0 dev:bond0 kernel BUG at net/core/skbuff.c:193 ! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 6875 Comm: syz-executor.0 Not tainted 6.7.0-rc8-syzkaller-00101-g0802e17d9aca-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : skb_panic net/core/skbuff.c:189 [inline] pc : skb_under_panic+0x13c/0x140 net/core/skbuff.c:203 lr : skb_panic net/core/skbuff.c:189 [inline] lr : skb_under_panic+0x13c/0x140 net/core/skbuff.c:203 sp : ffff800096f97000 x29: ffff800096f97010 x28: ffff80008cc8d668 x27: dfff800000000000 x26: ffff0000cb970c90 x25: 00000000000005dc x24: ffff0000c9c36ff2 x23: ffff0000c9c37000 x22: 00000000000005ea x21: 00000000000006c0 x20: 000000000000000e x19: ffff800088baa334 x18: 1fffe000368261ce x17: ffff80008e4ed000 x16: ffff80008a8310f8 x15: 0000000000000001 x14: 1ffff00012df2d58 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000001 x10: 0000000000ff0100 x9 : e28a51f1087e8400 x8 : e28a51f1087e8400 x7 : ffff80008028f8d0 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000001 x3 : ffff800082b78714 x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000089 Call trace: skb_panic net/core/skbuff.c:189 [inline] skb_under_panic+0x13c/0x140 net/core/skbuff.c:203 skb_push+0xf0/0x108 net/core/skbuff.c:2451 eth_header+0x44/0x1f8 net/ethernet/eth.c:83 dev_hard_header include/linux/netdevice.h:3188 [inline] llc_mac_hdr_init+0x110/0x17c net/llc/llc_output.c:33 llc_sap_action_send_xid_c+0x170/0x344 net/llc/llc_s_ac.c:85 llc_exec_sap_trans_actions net/llc/llc_sap.c:153 [inline] llc_sap_next_state net/llc/llc_sap.c:182 [inline] llc_sap_state_process+0x1ec/0x774 net/llc/llc_sap.c:209 llc_build_and_send_xid_pkt+0x12c/0x1c0 net/llc/llc_sap.c:270 llc_ui_sendmsg+0x7bc/0xb1c net/llc/af_llc.c:997 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] sock_sendmsg+0x194/0x274 net/socket.c:767 splice_to_socket+0x7cc/0xd58 fs/splice.c:881 do_splice_from fs/splice.c:933 [inline] direct_splice_actor+0xe4/0x1c0 fs/splice.c:1142 splice_direct_to_actor+0x2a0/0x7e4 fs/splice.c:1088 do_splice_direct+0x20c/0x348 fs/splice.c:1194 do_sendfile+0x4bc/0xc70 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1322 [inline] __se_sys_sendfile64 fs/read_write.c:1308 [inline] __arm64_sys_sendfile64+0x160/0x3b4 fs/read_write.c:1308 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:51 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:136 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:155 el0_svc+0x54/0x158 arch/arm64/kernel/entry-common.c:678 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:696 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:595 Code: aa1803e6 aa1903e7 a90023f5 94792f6a (d4210000) Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-and-tested-by: syzbot+2a7024e9502df538e8ef@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20240118183625.4007013-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 6c21660fe221a15c789dee2bc2fd95516bc5aeaf Author: Lin Ma Date: Thu Jan 18 21:03:06 2024 +0800 vlan: skip nested type that is not IFLA_VLAN_QOS_MAPPING In the vlan_changelink function, a loop is used to parse the nested attributes IFLA_VLAN_EGRESS_QOS and IFLA_VLAN_INGRESS_QOS in order to obtain the struct ifla_vlan_qos_mapping. These two nested attributes are checked in the vlan_validate_qos_map function, which calls nla_validate_nested_deprecated with the vlan_map_policy. However, this deprecated validator applies a LIBERAL strictness, allowing the presence of an attribute with the type IFLA_VLAN_QOS_UNSPEC. Consequently, the loop in vlan_changelink may parse an attribute of type IFLA_VLAN_QOS_UNSPEC and believe it carries a payload of struct ifla_vlan_qos_mapping, which is not necessarily true. To address this issue and ensure compatibility, this patch introduces two type checks that skip attributes whose type is not IFLA_VLAN_QOS_MAPPING. Fixes: 07b5b17e157b ("[VLAN]: Use rtnl_link API") Signed-off-by: Lin Ma Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240118130306.1644001-1-linma@zju.edu.cn Signed-off-by: Jakub Kicinski commit 9b6979563b8353b2b3ace4550d16c1cacc34b408 Merge: 198bc90e0e734 467739baf6364 Author: Jakub Kicinski Date: Fri Jan 19 21:15:16 2024 -0800 Merge branch 'bnxt_en-bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes This series contains 5 miscellaneous fixes. The fixes include adding delay for FLR, buffer memory leak, RSS table size calculation, ethtool self test kernel warning, and mqprio crash. ==================== Link: https://lore.kernel.org/r/20240117234515.226944-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 467739baf63646d4a5033f7f8a9306669ea55326 Author: Michael Chan Date: Wed Jan 17 15:45:15 2024 -0800 bnxt_en: Fix possible crash after creating sw mqprio TCs The driver relies on netdev_get_num_tc() to get the number of HW offloaded mqprio TCs to allocate and free TX rings. This won't work and can potentially crash the system if software mqprio or taprio TCs have been setup. netdev_get_num_tc() will return the number of software TCs and it may cause the driver to allocate or free more TX rings that it should. Fix it by adding a bp->num_tc field to store the number of HW offload mqprio TCs for the device. Use bp->num_tc instead of netdev_get_num_tc(). This fixes a crash like this: BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 42b8404067 P4D 0 Oops: 0000 [#1] PREEMPT SMP NOPTI CPU: 120 PID: 8661 Comm: ifconfig Kdump: loaded Tainted: G OE 5.18.16 #1 Hardware name: Lenovo ThinkSystem SR650 V3/SB27A92818, BIOS ESE114N-2.12 04/25/2023 RIP: 0010:bnxt_hwrm_cp_ring_alloc_p5+0x10/0x90 [bnxt_en] Code: 41 5c 41 5d 41 5e c3 cc cc cc cc 41 8b 44 24 08 66 89 03 eb c6 e8 b0 f1 7d db 0f 1f 44 00 00 41 56 41 55 41 54 55 48 89 fd 53 <48> 8b 06 48 89 f3 48 81 c6 28 01 00 00 0f b6 96 13 ff ff ff 44 8b RSP: 0018:ff65907660d1fa88 EFLAGS: 00010202 RAX: 0000000000000010 RBX: ff4dde1d907e4980 RCX: f400000000000000 RDX: 0000000000000010 RSI: 0000000000000000 RDI: ff4dde1d907e4980 RBP: ff4dde1d907e4980 R08: 000000000000000f R09: 0000000000000000 R10: ff4dde5f02671800 R11: 0000000000000008 R12: 0000000088888889 R13: 0500000000000000 R14: 00f0000000000000 R15: ff4dde5f02671800 FS: 00007f4b126b5740(0000) GS:ff4dde9bff600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000416f9c6002 CR4: 0000000000771ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: bnxt_hwrm_ring_alloc+0x204/0x770 [bnxt_en] bnxt_init_chip+0x4d/0x680 [bnxt_en] ? bnxt_poll+0x1a0/0x1a0 [bnxt_en] __bnxt_open_nic+0xd2/0x740 [bnxt_en] bnxt_open+0x10b/0x220 [bnxt_en] ? raw_notifier_call_chain+0x41/0x60 __dev_open+0xf3/0x1b0 __dev_change_flags+0x1db/0x250 dev_change_flags+0x21/0x60 devinet_ioctl+0x590/0x720 ? avc_has_extended_perms+0x1b7/0x420 ? _copy_from_user+0x3a/0x60 inet_ioctl+0x189/0x1c0 ? wp_page_copy+0x45a/0x6e0 sock_do_ioctl+0x42/0xf0 ? ioctl_has_perm.constprop.0.isra.0+0xbd/0x120 sock_ioctl+0x1ce/0x2e0 __x64_sys_ioctl+0x87/0xc0 do_syscall_64+0x59/0x90 ? syscall_exit_work+0x103/0x130 ? syscall_exit_to_user_mode+0x12/0x30 ? do_syscall_64+0x69/0x90 ? exc_page_fault+0x62/0x150 Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Reviewed-by: Damodharam Ammepalli Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20240117234515.226944-6-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit c20f482129a582455f02eb9a6dcb2a4215274599 Author: Michael Chan Date: Wed Jan 17 15:45:14 2024 -0800 bnxt_en: Prevent kernel warning when running offline self test We call bnxt_half_open_nic() to setup the chip partially to run loopback tests. The rings and buffers are initialized normally so that we can transmit and receive packets in loopback mode. That means page pool buffers are allocated for the aggregation ring just like the normal case. NAPI is not needed because we are just polling for the loopback packets. When we're done with the loopback tests, we call bnxt_half_close_nic() to clean up. When freeing the page pools, we hit a WARN_ON() in page_pool_unlink_napi() because the NAPI state linked to the page pool is uninitialized. The simplest way to avoid this warning is just to initialize the NAPIs during half open and delete the NAPIs during half close. Trying to skip the page pool initialization or skip linking of NAPI during half open will be more complicated. This fix avoids this warning: WARNING: CPU: 4 PID: 46967 at net/core/page_pool.c:946 page_pool_unlink_napi+0x1f/0x30 CPU: 4 PID: 46967 Comm: ethtool Tainted: G S W 6.7.0-rc5+ #22 Hardware name: Dell Inc. PowerEdge R750/06V45N, BIOS 1.3.8 08/31/2021 RIP: 0010:page_pool_unlink_napi+0x1f/0x30 Code: 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 48 8b 47 18 48 85 c0 74 1b 48 8b 50 10 83 e2 01 74 08 8b 40 34 83 f8 ff 74 02 <0f> 0b 48 c7 47 18 00 00 00 00 c3 cc cc cc cc 66 90 90 90 90 90 90 RSP: 0018:ffa000003d0dfbe8 EFLAGS: 00010246 RAX: ff110003607ce640 RBX: ff110010baf5d000 RCX: 0000000000000008 RDX: 0000000000000000 RSI: ff110001e5e522c0 RDI: ff110010baf5d000 RBP: ff11000145539b40 R08: 0000000000000001 R09: ffffffffc063f641 R10: ff110001361eddb8 R11: 000000000040000f R12: 0000000000000001 R13: 000000000000001c R14: ff1100014553a080 R15: 0000000000003fc0 FS: 00007f9301c4f740(0000) GS:ff1100103fd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f91344fa8f0 CR3: 00000003527cc005 CR4: 0000000000771ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: ? __warn+0x81/0x140 ? page_pool_unlink_napi+0x1f/0x30 ? report_bug+0x102/0x200 ? handle_bug+0x44/0x70 ? exc_invalid_op+0x13/0x60 ? asm_exc_invalid_op+0x16/0x20 ? bnxt_free_ring.isra.123+0xb1/0xd0 [bnxt_en] ? page_pool_unlink_napi+0x1f/0x30 page_pool_destroy+0x3e/0x150 bnxt_free_mem+0x441/0x5e0 [bnxt_en] bnxt_half_close_nic+0x2a/0x40 [bnxt_en] bnxt_self_test+0x21d/0x450 [bnxt_en] __dev_ethtool+0xeda/0x2e30 ? native_queued_spin_lock_slowpath+0x17f/0x2b0 ? __link_object+0xa1/0x160 ? _raw_spin_unlock_irqrestore+0x23/0x40 ? __create_object+0x5f/0x90 ? __kmem_cache_alloc_node+0x317/0x3c0 ? dev_ethtool+0x59/0x170 dev_ethtool+0xa7/0x170 dev_ioctl+0xc3/0x530 sock_do_ioctl+0xa8/0xf0 sock_ioctl+0x270/0x310 __x64_sys_ioctl+0x8c/0xc0 do_syscall_64+0x3e/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 Fixes: 294e39e0d034 ("bnxt: hook NAPIs to page pools") Reviewed-by: Andy Gospodarek Reviewed-by: Ajit Khaparde Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20240117234515.226944-5-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 523384a6aa095d3f3d9ee8b1a4e289d4311cd2d9 Author: Michael Chan Date: Wed Jan 17 15:45:13 2024 -0800 bnxt_en: Fix RSS table entries calculation for P5_PLUS chips The existing formula used in the driver to calculate the number of RSS table entries is to round up the number of RX rings to the next integer multiples of 64 (e.g. 64, 128, 192, ..). This is incorrect. The valid values supported by the chip are 64, 128, 256, 512 only (power of 2 starting from 64). When the number of RX rings is greater than 128, the entry size will likely be wrong. Firmware will round down the invalid value (e.g. 192 rounded down to 128) provided by the driver, causing some RSS rings to not receive any packets. We already have an existing function bnxt_calc_nr_ring_pages() to do this calculation. Use it in bnxt_get_nr_rss_ctxs() to calculate the number of RSS contexts correctly for P5_PLUS chips. Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Fixes: 7b3af4f75b81 ("bnxt_en: Add RSS support for 57500 chips.") Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20240117234515.226944-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 2ad8e57338ac7b1e149d458669a95132e2460096 Author: Michael Chan Date: Wed Jan 17 15:45:12 2024 -0800 bnxt_en: Fix memory leak in bnxt_hwrm_get_rings() bnxt_hwrm_get_rings() can abort and return error when there are not enough ring resources. It aborts without releasing the HWRM DMA buffer, causing a dma_pool_destroy warning when the driver is unloaded: bnxt_en 0000:99:00.0: dma_pool_destroy bnxt_hwrm, 000000005b089ba8 busy Fixes: f1e50b276d37 ("bnxt_en: Fix trimming of P5 RX and TX rings") Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20240117234515.226944-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 3c1069fa42872f95cf3c6fedf80723d391e12d57 Author: Michael Chan Date: Wed Jan 17 15:45:11 2024 -0800 bnxt_en: Wait for FLR to complete during probe The first message to firmware may fail if the device is undergoing FLR. The driver has some recovery logic for this failure scenario but we must wait 100 msec for FLR to complete before proceeding. Otherwise the recovery will always fail. Fixes: ba02629ff6cb ("bnxt_en: log firmware status on firmware init failure") Reviewed-by: Damodharam Ammepalli Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20240117234515.226944-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 198bc90e0e734e5f98c3d2833e8390cac3df61b2 Author: Zhengchao Shao Date: Thu Jan 18 09:20:19 2024 +0800 tcp: make sure init the accept_queue's spinlocks once When I run syz's reproduction C program locally, it causes the following issue: pvqspinlock: lock 0xffff9d181cd5c660 has corrupted value 0x0! WARNING: CPU: 19 PID: 21160 at __pv_queued_spin_unlock_slowpath (kernel/locking/qspinlock_paravirt.h:508) Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 RIP: 0010:__pv_queued_spin_unlock_slowpath (kernel/locking/qspinlock_paravirt.h:508) Code: 73 56 3a ff 90 c3 cc cc cc cc 8b 05 bb 1f 48 01 85 c0 74 05 c3 cc cc cc cc 8b 17 48 89 fe 48 c7 c7 30 20 ce 8f e8 ad 56 42 ff <0f> 0b c3 cc cc cc cc 0f 0b 0f 1f 40 00 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffa8d200604cb8 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff9d1ef60e0908 RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff9d1ef60e0900 RBP: ffff9d181cd5c280 R08: 0000000000000000 R09: 00000000ffff7fff R10: ffffa8d200604b68 R11: ffffffff907dcdc8 R12: 0000000000000000 R13: ffff9d181cd5c660 R14: ffff9d1813a3f330 R15: 0000000000001000 FS: 00007fa110184640(0000) GS:ffff9d1ef60c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000000 CR3: 000000011f65e000 CR4: 00000000000006f0 Call Trace: _raw_spin_unlock (kernel/locking/spinlock.c:186) inet_csk_reqsk_queue_add (net/ipv4/inet_connection_sock.c:1321) inet_csk_complete_hashdance (net/ipv4/inet_connection_sock.c:1358) tcp_check_req (net/ipv4/tcp_minisocks.c:868) tcp_v4_rcv (net/ipv4/tcp_ipv4.c:2260) ip_protocol_deliver_rcu (net/ipv4/ip_input.c:205) ip_local_deliver_finish (net/ipv4/ip_input.c:234) __netif_receive_skb_one_core (net/core/dev.c:5529) process_backlog (./include/linux/rcupdate.h:779) __napi_poll (net/core/dev.c:6533) net_rx_action (net/core/dev.c:6604) __do_softirq (./arch/x86/include/asm/jump_label.h:27) do_softirq (kernel/softirq.c:454 kernel/softirq.c:441) __local_bh_enable_ip (kernel/softirq.c:381) __dev_queue_xmit (net/core/dev.c:4374) ip_finish_output2 (./include/net/neighbour.h:540 net/ipv4/ip_output.c:235) __ip_queue_xmit (net/ipv4/ip_output.c:535) __tcp_transmit_skb (net/ipv4/tcp_output.c:1462) tcp_rcv_synsent_state_process (net/ipv4/tcp_input.c:6469) tcp_rcv_state_process (net/ipv4/tcp_input.c:6657) tcp_v4_do_rcv (net/ipv4/tcp_ipv4.c:1929) __release_sock (./include/net/sock.h:1121 net/core/sock.c:2968) release_sock (net/core/sock.c:3536) inet_wait_for_connect (net/ipv4/af_inet.c:609) __inet_stream_connect (net/ipv4/af_inet.c:702) inet_stream_connect (net/ipv4/af_inet.c:748) __sys_connect (./include/linux/file.h:45 net/socket.c:2064) __x64_sys_connect (net/socket.c:2073 net/socket.c:2070 net/socket.c:2070) do_syscall_64 (arch/x86/entry/common.c:51 arch/x86/entry/common.c:82) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:129) RIP: 0033:0x7fa10ff05a3d Code: 5b 41 5c c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ab a3 0e 00 f7 d8 64 89 01 48 RSP: 002b:00007fa110183de8 EFLAGS: 00000202 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000020000054 RCX: 00007fa10ff05a3d RDX: 000000000000001c RSI: 0000000020000040 RDI: 0000000000000003 RBP: 00007fa110183e20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00007fa110184640 R13: 0000000000000000 R14: 00007fa10fe8b060 R15: 00007fff73e23b20 The issue triggering process is analyzed as follows: Thread A Thread B tcp_v4_rcv //receive ack TCP packet inet_shutdown tcp_check_req tcp_disconnect //disconnect sock ... tcp_set_state(sk, TCP_CLOSE) inet_csk_complete_hashdance ... inet_csk_reqsk_queue_add inet_listen //start listen spin_lock(&queue->rskq_lock) inet_csk_listen_start ... reqsk_queue_alloc ... spin_lock_init spin_unlock(&queue->rskq_lock) //warning When the socket receives the ACK packet during the three-way handshake, it will hold spinlock. And then the user actively shutdowns the socket and listens to the socket immediately, the spinlock will be initialized. When the socket is going to release the spinlock, a warning is generated. Also the same issue to fastopenq.lock. Move init spinlock to inet_create and inet_accept to make sure init the accept_queue's spinlocks once. Fixes: fff1f3001cc5 ("tcp: add a spinlock to protect struct request_sock_queue") Fixes: 168a8f58059a ("tcp: TCP Fast Open Server - main code path") Reported-by: Ming Shu Signed-off-by: Zhengchao Shao Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240118012019.1751966-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski commit b01f15a7571b7aa222458bc9bf26ab59bd84e384 Author: Benjamin Poirier Date: Wed Jan 17 19:12:32 2024 -0500 selftests: bonding: Increase timeout to 1200s When tests are run by runner.sh, bond_options.sh gets killed before it can complete: make -C tools/testing/selftests run_tests TARGETS="drivers/net/bonding" [...] # timeout set to 120 # selftests: drivers/net/bonding: bond_options.sh # TEST: prio (active-backup miimon primary_reselect 0) [ OK ] # TEST: prio (active-backup miimon primary_reselect 1) [ OK ] # TEST: prio (active-backup miimon primary_reselect 2) [ OK ] # TEST: prio (active-backup arp_ip_target primary_reselect 0) [ OK ] # TEST: prio (active-backup arp_ip_target primary_reselect 1) [ OK ] # TEST: prio (active-backup arp_ip_target primary_reselect 2) [ OK ] # not ok 7 selftests: drivers/net/bonding: bond_options.sh # TIMEOUT 120 seconds This test includes many sleep statements, at least some of which are related to timers in the operation of the bonding driver itself. Increase the test timeout to allow the test to complete. I ran the test in slightly different VMs (including one without HW virtualization support) and got runtimes of 13m39.760s, 13m31.238s, and 13m2.956s. Use a ~1.5x "safety factor" and set the timeout to 1200s. Fixes: 42a8d4aaea84 ("selftests: bonding: add bonding prio option test") Reported-by: Jakub Kicinski Closes: https://lore.kernel.org/netdev/20240116104402.1203850a@kernel.org/#t Suggested-by: Jakub Kicinski Signed-off-by: Benjamin Poirier Reviewed-by: Hangbin Liu Link: https://lore.kernel.org/r/20240118001233.304759-1-bpoirier@nvidia.com Signed-off-by: Jakub Kicinski commit 9d64bf433c53cab2f48a3fff7a1f2a696bc5229a Merge: 57f22c8dab6b2 d988c9f511af7 Author: Linus Torvalds Date: Fri Jan 19 14:25:23 2024 -0800 Merge tag 'perf-tools-for-v6.8-1-2024-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools Pull perf tools updates from Arnaldo Carvalho de Melo: "Add Namhyung Kim as tools/perf/ co-maintainer, we're taking turns processing patches, switching roles from perf-tools to perf-tools-next at each Linux release. Data profiling: - Associate samples that identify loads and stores with data structures. This uses events available on Intel, AMD and others and DWARF info: # To get memory access samples in kernel for 1 second (on Intel) $ perf mem record -a -K --ldlat=4 -- sleep 1 # Similar for the AMD (but it requires 6.3+ kernel for BPF filters) $ perf mem record -a --filter 'mem_op == load || mem_op == store, ip > 0x8000000000000000' -- sleep 1 Then, amongst several modes of post processing, one can do things like: $ perf report -s type,typeoff --hierarchy --group --stdio ... # # Samples: 10K of events 'cpu/mem-loads,ldlat=4/P, cpu/mem-stores/P, dummy:u' # Event count (approx.): 602758064 # # Overhead Data Type / Data Type Offset # ........................... ............................ # 26.09% 3.28% 0.00% long unsigned int 26.09% 3.28% 0.00% long unsigned int +0 (no field) 18.48% 0.73% 0.00% struct page 10.83% 0.02% 0.00% struct page +8 (lru.next) 3.90% 0.28% 0.00% struct page +0 (flags) 3.45% 0.06% 0.00% struct page +24 (mapping) 0.25% 0.28% 0.00% struct page +48 (_mapcount.counter) 0.02% 0.06% 0.00% struct page +32 (index) 0.02% 0.00% 0.00% struct page +52 (_refcount.counter) 0.02% 0.01% 0.00% struct page +56 (memcg_data) 0.00% 0.01% 0.00% struct page +16 (lru.prev) 15.37% 17.54% 0.00% (stack operation) 15.37% 17.54% 0.00% (stack operation) +0 (no field) 11.71% 50.27% 0.00% (unknown) 11.71% 50.27% 0.00% (unknown) +0 (no field) $ perf annotate --data-type ... Annotate type: 'struct cfs_rq' in [kernel.kallsyms] (13 samples): ============================================================================ samples offset size field 13 0 640 struct cfs_rq { 2 0 16 struct load_weight load { 2 0 8 unsigned long weight; 0 8 4 u32 inv_weight; }; 0 16 8 unsigned long runnable_weight; 0 24 4 unsigned int nr_running; 1 28 4 unsigned int h_nr_running; ... $ perf annotate --data-type=page --group Annotate type: 'struct page' in [kernel.kallsyms] (480 samples): event[0] = cpu/mem-loads,ldlat=4/P event[1] = cpu/mem-stores/P event[2] = dummy:u =================================================================================== samples offset size field 447 33 0 0 64 struct page { 108 8 0 0 8 long unsigned int flags; 319 13 0 8 40 union { 319 13 0 8 40 struct { 236 2 0 8 16 union { 236 2 0 8 16 struct list_head lru { 236 1 0 8 8 struct list_head* next; 0 1 0 16 8 struct list_head* prev; }; 236 2 0 8 16 struct { 236 1 0 8 8 void* __filler; 0 1 0 16 4 unsigned int mlock_count; }; 236 2 0 8 16 struct list_head buddy_list { 236 1 0 8 8 struct list_head* next; 0 1 0 16 8 struct list_head* prev; }; 236 2 0 8 16 struct list_head pcp_list { 236 1 0 8 8 struct list_head* next; 0 1 0 16 8 struct list_head* prev; }; }; 82 4 0 24 8 struct address_space* mapping; 1 7 0 32 8 union { 1 7 0 32 8 long unsigned int index; 1 7 0 32 8 long unsigned int share; }; 0 0 0 40 8 long unsigned int private; }; This uses the existing annotate code, calling objdump to do the disassembly, with improvements to avoid having this take too long, but longer term a switch to a disassembler library, possibly reusing code in the kernel will be pursued. This is the initial implementation, please use it and report impressions and bugs. Make sure the kernel-debuginfo packages match the running kernel. The 'perf report' phase for non short perf.data files may take a while. There is a great article about it on LWN: https://lwn.net/Articles/955709/ - "Data-type profiling for perf" One last test I did while writing this text, on a AMD Ryzen 5950X, using a distro kernel, while doing a simple 'find /' on an otherwise idle system resulted in: # uname -r 6.6.9-100.fc38.x86_64 # perf -vv | grep BPF_ bpf: [ on ] # HAVE_LIBBPF_SUPPORT bpf_skeletons: [ on ] # HAVE_BPF_SKEL # rpm -qa | grep kernel-debuginfo kernel-debuginfo-common-x86_64-6.6.9-100.fc38.x86_64 kernel-debuginfo-6.6.9-100.fc38.x86_64 # # perf mem record -a --filter 'mem_op == load || mem_op == store, ip > 0x8000000000000000' ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.199 MB perf.data (2913 samples) ] # # ls -la perf.data -rw-------. 1 root root 2346486 Jan 9 18:36 perf.data # perf evlist ibs_op// dummy:u # perf evlist -v ibs_op//: type: 11, size: 136, config: 0, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|ADDR|CPU|PERIOD|IDENTIFIER|DATA_SRC|WEIGHT, read_format: ID, disabled: 1, inherit: 1, freq: 1, sample_id_all: 1 dummy:u: type: 1 (PERF_TYPE_SOFTWARE), size: 136, config: 0x9 (PERF_COUNT_SW_DUMMY), { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|ADDR|CPU|IDENTIFIER|DATA_SRC|WEIGHT, read_format: ID, inherit: 1, exclude_kernel: 1, exclude_hv: 1, mmap: 1, comm: 1, task: 1, mmap_data: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 # # perf report -s type,typeoff --hierarchy --group --stdio # Total Lost Samples: 0 # # Samples: 2K of events 'ibs_op//, dummy:u' # Event count (approx.): 1904553038 # # Overhead Data Type / Data Type Offset # ................... ............................ # 73.70% 0.00% (unknown) 73.70% 0.00% (unknown) +0 (no field) 3.01% 0.00% long unsigned int 3.00% 0.00% long unsigned int +0 (no field) 0.01% 0.00% long unsigned int +2 (no field) 2.73% 0.00% struct task_struct 1.71% 0.00% struct task_struct +52 (on_cpu) 0.38% 0.00% struct task_struct +2104 (rcu_read_unlock_special.b.blocked) 0.23% 0.00% struct task_struct +2100 (rcu_read_lock_nesting) 0.14% 0.00% struct task_struct +2384 () 0.06% 0.00% struct task_struct +3096 (signal) 0.05% 0.00% struct task_struct +3616 (cgroups) 0.05% 0.00% struct task_struct +2344 (active_mm) 0.02% 0.00% struct task_struct +46 (flags) 0.02% 0.00% struct task_struct +2096 (migration_disabled) 0.01% 0.00% struct task_struct +24 (__state) 0.01% 0.00% struct task_struct +3956 (mm_cid_active) 0.01% 0.00% struct task_struct +1048 (cpus_ptr) 0.01% 0.00% struct task_struct +184 (se.group_node.next) 0.01% 0.00% struct task_struct +20 (thread_info.cpu) 0.00% 0.00% struct task_struct +104 (on_rq) 0.00% 0.00% struct task_struct +2456 (pid) 1.36% 0.00% struct module 0.59% 0.00% struct module +952 (kallsyms) 0.42% 0.00% struct module +0 (state) 0.23% 0.00% struct module +8 (list.next) 0.12% 0.00% struct module +216 (syms) 0.95% 0.00% struct inode 0.41% 0.00% struct inode +40 (i_sb) 0.22% 0.00% struct inode +0 (i_mode) 0.06% 0.00% struct inode +76 (i_rdev) 0.06% 0.00% struct inode +56 (i_security) perf top/report: - Don't ignore job control, allowing control+Z + bg to work. - Add s390 raw data interpretation for PAI (Processor Activity Instrumentation) counters. perf archive: - Add new option '--all' to pack perf.data with DSOs. - Add new option '--unpack' to expand tarballs. Initialization speedups: - Lazily initialize zstd streams to save memory when not using it. - Lazily allocate/size mmap event copy. - Lazy load kernel symbols in 'perf record'. - Be lazier in allocating lost samples buffer in 'perf record'. - Don't synthesize BPF events when disabled via the command line (perf record --no-bpf-event). Assorted improvements: - Show note on AMD systems that the :p, :pp, :ppp and :P are all the same, as IBS (Instruction Based Sampling) is used and it is inherentely precise, not having levels of precision like in Intel systems. - When 'cycles' isn't available, fall back to the "task-clock" event when not system wide, not to 'cpu-clock'. - Add --debug-file option to redirect debug output, e.g.: $ perf --debug-file /tmp/perf.log record -v true - Shrink 'struct map' to under one cacheline by avoiding function pointers for selecting if addresses are identity or DSO relative, and using just a byte for some boolean struct members. - Resolve the arch specific strerrno just once to use in perf_env__arch_strerrno(). - Reduce memory for recording PERF_RECORD_LOST_SAMPLES event. Assorted fixes: - Fix the default 'perf top' usage on Intel hybrid systems, now it starts with a browser showing the number of samples for Efficiency (cpu_atom/cycles/P) and Performance (cpu_core/cycles/P). This behaviour is similar on ARM64, with its respective set of big.LITTLE processors. - Fix segfault on build_mem_topology() error path. - Fix 'perf mem' error on hybrid related to availability of mem event in a PMU. - Fix missing reference count gets (map, maps) in the db-export code. - Avoid recursively taking env->bpf_progs.lock in the 'perf_env' code. - Use the newly introduced maps__for_each_map() to add missing locking around iteration of 'struct map' entries. - Parse NOTE segments until the build id is found, don't stop on the first one, ELF files may have several such NOTE segments. - Remove 'egrep' usage, its deprecated, use 'grep -E' instead. - Warn first about missing libelf, not libbpf, that depends on libelf. - Use alternative to 'find ... -printf' as this isn't supported in busybox. - Address python 3.6 DeprecationWarning for string scapes. - Fix memory leak in uniq() in libsubcmd. - Fix man page formatting for 'perf lock' - Fix some spelling mistakes. perf tests: - Fail shell tests that needs some symbol in perf itself if it is stripped. These tests check if a symbol is resolved, if some hot function is indeed detected by profiling, etc. - The 'perf test sigtrap' test is currently failing on PREEMPT_RT, skip it if sleeping spinlocks are detected (using BTF) and point to the mailing list discussion about it. This test is also being skipped on several architectures (powerpc, s390x, arm and aarch64) due to other pending issues with intruction breakpoints. - Adjust test case perf record offcpu profiling tests for s390. - Fix 'Setup struct perf_event_attr' fails on s390 on z/VM guest, addressing issues caused by the fallback from cycles to task-clock done in this release. - Fix mask for VG register in the user-regs test. - Use shellcheck on 'perf test' shell scripts automatically to make sure changes don't introduce things it flags as problematic. - Add option to change objdump binary and allow it to be set via 'perf config'. - Add basic 'perf script', 'perf list --json" and 'perf diff' tests. - Basic branch counter support. - Make DSO tests a suite rather than individual. - Remove atomics from test_loop to avoid test failures. - Fix call chain match on powerpc for the record+probe_libc_inet_pton test. - Improve Intel hybrid tests. Vendor event files (JSON): powerpc: - Update datasource event name to fix duplicate events on IBM's Power10. - Add PVN for HX-C2000 CPU with Power8 Architecture. Intel: - Alderlake/rocketlake metric fixes. - Update emeraldrapids events to v1.02. - Update icelakex events to v1.23. - Update sapphirerapids events to v1.17. - Add skx, clx, icx and spr upi bandwidth metric. AMD: - Add Zen 4 memory controller events. RISC-V: - Add StarFive Dubhe-80 and Dubhe-90 JSON files. https://www.starfivetech.com/en/site/cpu-u - Add T-HEAD C9xx JSON file. https://github.com/riscv-software-src/opensbi/blob/master/docs/platform/thead-c9xx.md ARM64: - Remove UTF-8 characters from cmn.json, that were causing build failure in some distros. - Add core PMU events and metrics for Ampere One X. - Rename Ampere One's BPU_FLUSH_MEM_FAULT to GPC_FLUSH_MEM_FAULT libperf: - Rename several perf_cpu_map constructor names to clarify what they really do. - Ditto for some other methods, coping with some issues in their semantics, like perf_cpu_map__empty() -> perf_cpu_map__has_any_cpu_or_is_empty(). - Document perf_cpu_map__nr()'s behavior perf stat: - Exit if parse groups fails. - Combine the -A/--no-aggr and --no-merge options. - Fix help message for --metric-no-threshold option. Hardware tracing: ARM64 CoreSight: - Bump minimum OpenCSD version to ensure a bugfix is present. - Add 'T' itrace option for timestamp trace - Set start vm addr of exectable file to 0 and don't ignore first sample on the arm-cs-trace-disasm.py 'perf script'" * tag 'perf-tools-for-v6.8-1-2024-01-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: (179 commits) MAINTAINERS: Add Namhyung as tools/perf/ co-maintainer perf test: test case 'Setup struct perf_event_attr' fails on s390 on z/vm perf db-export: Fix missing reference count get in call_path_from_sample() perf tests: Add perf script test libsubcmd: Fix memory leak in uniq() perf TUI: Don't ignore job control perf vendor events intel: Update sapphirerapids events to v1.17 perf vendor events intel: Update icelakex events to v1.23 perf vendor events intel: Update emeraldrapids events to v1.02 perf vendor events intel: Alderlake/rocketlake metric fixes perf x86 test: Add hybrid test for conflicting legacy/sysfs event perf x86 test: Update hybrid expectations perf vendor events amd: Add Zen 4 memory controller events perf stat: Fix hard coded LL miss units perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event perf env: Avoid recursively taking env->bpf_progs.lock perf annotate: Add --insn-stat option for debugging perf annotate: Add --type-stat option for debugging perf annotate: Support event group display perf annotate: Add --data-type option ... commit 57f22c8dab6b266ae36b89b073a4a33dea71e762 Merge: 18b5cb6cb85c2 d26270061ae66 Author: Linus Torvalds Date: Fri Jan 19 13:49:16 2024 -0800 Merge tag 'strlcpy-removal-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull strlcpy removal from Kees Cook: "As promised, this is 'part 2' of the hardening tree, late in -rc1 now that all the other trees with strlcpy() removals have landed. One new user appeared (in bcachefs) but was a trivial refactor. The kernel is now free of the strlcpy() API! - Remove of the final (very recent) user of strlcpy() (in bcachefs) - Remove the strlcpy() API. Long live strscpy()" * tag 'strlcpy-removal-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: string: Remove strlcpy() bcachefs: Replace strlcpy() with strscpy() commit 18b5cb6cb85c2ac96b8e94e698d11b909225ce4a Merge: 24fdd5189914b 1b20d0486a602 Author: Linus Torvalds Date: Fri Jan 19 13:36:15 2024 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "I think the main one is fixing the dynamic SCS patching when full LTO is enabled (clang was silently getting this horribly wrong), but it's all good stuff. Rob just pointed out that the fix to the workaround for erratum #2966298 might not be necessary, but in the worst case it's harmless and since the official description leaves a little to be desired here, I've left it in. Summary: - Fix shadow call stack patching with LTO=full - Fix voluntary preemption of the FPSIMD registers from assembly code - Fix workaround for A520 CPU erratum #2966298 and extend to A510 - Fix SME issues that resulted in corruption of the register state - Minor fixes (missing includes, formatting)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Fix silcon-errata.rst formatting arm64/sme: Always exit sme_alloc() early with existing storage arm64/fpsimd: Remove spurious check for SVE support arm64/ptrace: Don't flush ZA/ZT storage when writing ZA via ptrace arm64: entry: simplify kernel_exit logic arm64: entry: fix ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD arm64: errata: Add Cortex-A510 speculative unprivileged load workaround arm64: Rename ARM64_WORKAROUND_2966298 arm64: fpsimd: Bring cond_yield asm macro in line with new rules arm64: scs: Work around full LTO issue with dynamic SCS arm64: irq: include commit 24fdd5189914b36102cb51626a890a2d84501993 Merge: 9bc44c51a0461 6e441fa3ac475 Author: Linus Torvalds Date: Fri Jan 19 13:30:49 2024 -0800 Merge tag 'loongarch-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson Pull LoongArch updates from Huacai Chen: - Raise minimum clang version to 18.0.0 - Enable initial Rust support for LoongArch - Add built-in dtb support for LoongArch - Use generic interface to support crashkernel=X,[high,low] - Some bug fixes and other small changes - Update the default config file. * tag 'loongarch-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: (22 commits) MAINTAINERS: Add BPF JIT for LOONGARCH entry LoongArch: Update Loongson-3 default config file LoongArch: BPF: Prevent out-of-bounds memory access LoongArch: BPF: Support 64-bit pointers to kfuncs LoongArch: Fix definition of ftrace_regs_set_instruction_pointer() LoongArch: Use generic interface to support crashkernel=X,[high,low] LoongArch: Fix and simplify fcsr initialization on execve() LoongArch: Let cores_io_master cover the largest NR_CPUS LoongArch: Change SHMLBA from SZ_64K to PAGE_SIZE LoongArch: Add a missing call to efi_esrt_init() LoongArch: Parsing CPU-related information from DTS LoongArch: dts: DeviceTree for Loongson-2K2000 LoongArch: dts: DeviceTree for Loongson-2K1000 LoongArch: dts: DeviceTree for Loongson-2K0500 LoongArch: Allow device trees be built into the kernel dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for interrupt-names dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names dt-bindings: loongarch: Add Loongson SoC boards compatibles dt-bindings: loongarch: Add CPU bindings for LoongArch LoongArch: Enable initial Rust support ... commit 2bebc3cd48701607e38e8258ab9692de9b1a718b Author: Helge Deller Date: Fri Jan 19 21:47:15 2024 +0100 Revert "firmware/sysfb: Clear screen_info state after consuming it" This reverts commit df67699c9cb0ceb70f6cc60630ca938c06773eda. Jens Axboe reported a regression that his machine is failing to show a console, or in fact anything, on current -git. There's no output and no console after: Loading Linux 6.7.0+ ... Loading initial ramdisk ... Signed-off-by: Helge Deller Cc: Thomas Zimmermann Cc: Jens Axboe commit 9bc44c51a0461e099d4eb5dff86c2d72f0fb4a6c Merge: a638bfbfa1f8e ef175b29a242f Author: Linus Torvalds Date: Fri Jan 19 13:00:45 2024 -0800 Merge tag 'devicetree-for-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree header detangling from Rob Herring: "Remove the circular including of of_device.h and of_platform.h along with all of their implicit includes. This is the culmination of several kernel cycles worth of fixing implicit DT includes throughout the tree" * tag 'devicetree-for-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: of: Stop circularly including of_device.h and of_platform.h clk: qcom: gcc-x1e80100: Replace of_device.h with explicit includes thermal: loongson2: Replace of_device.h with explicit includes net: can: Use device_get_match_data() sparc: Use device_get_match_data() commit 68ea60a7961ca6c7c38f856572a146f66949815d Author: Li Zhijian Date: Fri Jan 19 14:20:57 2024 +0800 coccinelle: device_attr_show: Adapt to the latest Documentation/filesystems/sysfs.rst Adapt description, warning message and MODE=patch according to the latest Documentation/filesystems/sysfs.rst: > show() should only use sysfs_emit() or sysfs_emit_at() when formatting > the value to be returned to user space. After this patch: When MODE=report, $ make coccicheck COCCI=scripts/coccinelle/api/device_attr_show.cocci M=drivers/hid/hid-picolcd_core.c MODE=report <...snip...> drivers/hid/hid-picolcd_core.c:304:8-16: WARNING: please use sysfs_emit or sysfs_emit_at drivers/hid/hid-picolcd_core.c:259:9-17: WARNING: please use sysfs_emit or sysfs_emit_at When MODE=patch, $ make coccicheck COCCI=scripts/coccinelle/api/device_attr_show.cocci M=drivers/hid/hid-picolcd_core.c MODE=patch <...snip...> diff -u -p a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c --- a/drivers/hid/hid-picolcd_core.c +++ b/drivers/hid/hid-picolcd_core.c @@ -255,10 +255,12 @@ static ssize_t picolcd_operation_mode_sh { struct picolcd_data *data = dev_get_drvdata(dev); - if (data->status & PICOLCD_BOOTLOADER) - return snprintf(buf, PAGE_SIZE, "[bootloader] lcd\n"); - else - return snprintf(buf, PAGE_SIZE, "bootloader [lcd]\n"); + if (data->status & PICOLCD_BOOTLOADER) { + return sysfs_emit(buf, "[bootloader] lcd\n"); + } + else { + return sysfs_emit(buf, "bootloader [lcd]\n"); + } } static ssize_t picolcd_operation_mode_store(struct device *dev, @@ -301,7 +303,7 @@ static ssize_t picolcd_operation_mode_de { struct picolcd_data *data = dev_get_drvdata(dev); - return snprintf(buf, PAGE_SIZE, "hello world\n"); + return sysfs_emit(buf, "hello world\n"); } static ssize_t picolcd_operation_mode_delay_store(struct device *dev, CC: Julia Lawall CC: Nicolas Palix CC: cocci@inria.fr Signed-off-by: Li Zhijian commit a638bfbfa1f8e8fbf36d84679916c60c1382a2ef Merge: a1fe5b6d0dce1 17dc11a02d8da Author: Linus Torvalds Date: Fri Jan 19 12:50:09 2024 -0800 Merge tag 'spi-fix-v6.8-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One simple fix for the device unbind path in the Coldfire driver. A conversion to use a combined get/enable helper missed removing a disable" * tag 'spi-fix-v6.8-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: coldfire-qspi: Remove an erroneous clk_disable_unprepare() from the remove function commit a1fe5b6d0dce12893f40f0f3cc4e3885456155fb Merge: e08b575815398 fb3c007fde80d Author: Linus Torvalds Date: Fri Jan 19 12:30:29 2024 -0800 Merge tag 'sound-fix-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes: - Lots of ASoC SOF fixes and related reworks - ASoC TAS codec fixes including DT updates - A few HD-audio quirks and regression fixes - Minor fixes for aloop, oxygen and scarlett2 mixer" * tag 'sound-fix-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits) ALSA: hda/realtek: Enable headset mic on Lenovo M70 Gen5 ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on HP ZBook ALSA: hda/relatek: Enable Mute LED on HP Laptop 15s-fq2xxx ASoC: SOF: ipc4-loader: remove the CPC check warnings ASoC: SOF: ipc4-pcm: remove log message for LLP ALSA: hda: generic: Remove obsolete call to ledtrig_audio_get ALSA: scarlett2: Fix yet more -Wformat-truncation warnings ALSA: hda: Properly setup HDMI stream ASoC: audio-graph-card2: fix index check on graph_parse_node_multi_nm() ASoC: SOF: icp3-dtrace: Revert "Fix wrong kfree() usage" ALSA: oxygen: Fix right channel of capture volume mixer ALSA: aloop: Introduce a function to get if access is interleaved mode ASoC: mediatek: sof-common: Add NULL check for normal_link string ASoC: mediatek: mt8195: Remove afe-dai component and rework codec link ASoC: mediatek: mt8192: Check existence of dai_name before dereferencing ASoC: Intel: bxt_rt298: Fix kernel ops due to COMP_DUMMY change ASoC: Intel: bxt_da7219_max98357a: Fix kernel ops due to COMP_DUMMY change ASoC: codecs: rtq9128: Fix TDM enable and DAI format control flow ASoC: codecs: rtq9128: Fix PM_RUNTIME usage ASoC: tas2781: Add tas2563 into driver ... commit d26270061ae66b915138af7cd73ca6f8b85e6b44 Author: Kees Cook Date: Thu Jan 18 12:31:55 2024 -0800 string: Remove strlcpy() With all the users of strlcpy() removed[1] from the kernel, remove the API, self-tests, and other references. Leave mentions in Documentation (about its deprecation), and in checkpatch.pl (to help migrate host-only tools/ usage). Long live strscpy(). Link: https://github.com/KSPP/linux/issues/89 [1] Cc: Azeem Shaikh Cc: Andrew Morton Cc: Andy Whitcroft Cc: Joe Perches Cc: Dwaipayan Ray Cc: Lukas Bulwahn Cc: linux-hardening@vger.kernel.org Reviewed-by: Andy Shevchenko Signed-off-by: Kees Cook commit e08b5758153981ca812c5991209a6133c732e799 Merge: ab1e2d0fccc57 009f0a64f9cce Author: Linus Torvalds Date: Fri Jan 19 11:50:00 2024 -0800 Merge tag 'drm-next-2024-01-19' of git://anongit.freedesktop.org/drm/drm Pull more drm fixes from Dave Airlie: "This is mostly amdgpu and xe fixes, with an amdkfd and nouveau fix thrown in. The amdgpu ones are just the usual couple of weeks of fixes. The xe ones are bunch of cleanups for the new xe driver, the fix you put in on the merge commit and the kconfig fix that was hiding the problem from me. amdgpu: - DSC fixes - DC resource pool fixes - OTG fix - DML2 fixes - Aux fix - GFX10 RLC firmware handling fix - Revert a broken workaround for SMU 13.0.2 - DC writeback fix - Enable gfxoff when ROCm apps are active on gfx11 with the proper FW version amdkfd: - Fix dma-buf exports using GEM handles nouveau: - fix a unneeded WARN_ON triggering xe: - Fix for definition of wakeref_t - Fix for an error code aliasing - Fix for VM_UNBIND_ALL in the case there are no bound VMAs - Fixes for a number of __iomem address space mismatches reported by sparse - Fixes for the assignment of exec_queue priority - A Fix for skip_guc_pc not taking effect - Workaround for a build problem on GCC 11 - A couple of fixes for error paths - Fix a Flat CCS compression metadata copy issue - Fix a misplace array bounds checking - Don't have display support depend on EXPERT (as discussed on IRC)" * tag 'drm-next-2024-01-19' of git://anongit.freedesktop.org/drm/drm: (71 commits) nouveau/vmm: don't set addr on the fail path to avoid warning drm/amdgpu: Enable GFXOFF for Compute on GFX11 drm/amd/display: Drop 'acrtc' and add 'new_crtc_state' NULL check for writeback requests. drm/amdgpu: revert "Adjust removal control flow for smu v13_0_2" drm/amdkfd: init drm_client with funcs hook drm/amd/display: Fix a switch statement in populate_dml_output_cfg_from_stream_state() drm/amdgpu: Fix the null pointer when load rlc firmware drm/amd/display: Align the returned error code with legacy DP drm/amd/display: Fix DML2 watermark calculation drm/amd/display: Clear OPTC mem select on disable drm/amd/display: Port DENTIST hang and TDR fixes to OTG disable W/A drm/amd/display: Add logging resource checks drm/amd/display: Init link enc resources in dc_state only if res_pool presents drm/amd/display: Fix late derefrence 'dsc' check in 'link_set_dsc_pps_packet()' drm/amd/display: Avoid enum conversion warning drm/amd/pm: Fix smuv13.0.6 current clock reporting drm/amd/pm: Add error log for smu v13.0.6 reset drm/amdkfd: Fix 'node' NULL check in 'svm_range_get_range_boundaries()' drm/amdgpu: drop exp hw support check for GC 9.4.3 drm/amdgpu: move debug options init prior to amdgpu device init ... commit ab1e2d0fccc570c950fd939840ebc8efa3bd39b8 Merge: 237c31cb5d83b 17d49b7e47a10 Author: Linus Torvalds Date: Fri Jan 19 11:34:19 2024 -0800 Merge tag 'for-v6.8-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "New features: - bq24190: Add support for BQ24296 charger Cleanups: - all reset drivers: Stop using module_platform_driver_probe() - gpio-restart: use devm_register_sys_off_handler - pwr-mlxbf: support graceful reboot - cw2015: correct time_to_empty units - qcom-battmgr: Fix driver initialization sequence - bq27xxx: Start/Stop delayed work in suspend/resume - minor cleanups and fixes" * tag 'for-v6.8-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (33 commits) power: supply: bq24190_charger: Fix "initializer element is not constant" error power: supply: bq24190_charger: Add support for BQ24296 dt-bindings: power: supply: bq24190: Add BQ24296 compatible dt-bindings: power: reset: xilinx: Rename node names in examples power: supply: qcom_battmgr: Register the power supplies after PDR is up dt-bindings: power: reset: qcom-pon: fix inconsistent example power: supply: Fix null pointer dereference in smb2_probe power: reset: at91: Drop '__init' from at91_wakeup_status() power: supply: Use multiple MODULE_AUTHOR statements power: supply: Fix indentation and some other warnings power: reset: gpio-restart: Use devm_register_sys_off_handler() power: supply: bq256xx: fix some problem in bq256xx_hw_init power: supply: cw2015: correct time_to_empty units in sysfs power: reset: at91-sama5d2_shdwc: Convert to platform remove callback returning void power: reset: at91-reset: Convert to platform remove callback returning void power: reset: tps65086-restart: Convert to platform remove callback returning void power: reset: syscon-poweroff: Convert to platform remove callback returning void power: reset: rmobile-reset: Convert to platform remove callback returning void power: reset: restart-poweroff: Convert to platform remove callback returning void power: reset: regulator-poweroff: Convert to platform remove callback returning void ... commit 237c31cb5d83b3f77715f6d6a185f46a5ee4ec88 Merge: 556e2d17cae62 8ead196be219a Author: Linus Torvalds Date: Fri Jan 19 10:53:55 2024 -0800 Merge tag 'apparmor-pr-2024-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor Pull AppArmor updates from John Johansen: "This adds a single feature, switch the hash used to check policy from sha1 to sha256 There are fixes for two memory leaks, and refcount bug and a potential crash when a profile name is empty. Along with a couple minor code cleanups. Summary: Features - switch policy hash from sha1 to sha256 Bug Fixes - Fix refcount leak in task_kill - Fix leak of pdb objects and trans_table - avoid crash when parse profie name is empty Cleanups - add static to stack_msg and nulldfa - more kernel-doc cleanups" * tag 'apparmor-pr-2024-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor: apparmor: Fix memory leak in unpack_profile() apparmor: avoid crash when parsed profile name is empty apparmor: fix possible memory leak in unpack_trans_table apparmor: free the allocated pdb objects apparmor: Fix ref count leak in task_kill apparmor: cleanup network hook comments apparmor: add missing params to aa_may_ptrace kernel-doc comments apparmor: declare nulldfa as static apparmor: declare stack_msg as static apparmor: switch SECURITY_APPARMOR_HASH from sha1 to sha256 commit 556e2d17cae620d549c5474b1ece053430cd50bc Merge: ec2d264ae4bb6 2a965d1b15d28 Author: Linus Torvalds Date: Fri Jan 19 09:58:55 2024 -0800 Merge tag 'ceph-for-6.8-rc1' of https://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "Assorted CephFS fixes and cleanups with nothing standing out" * tag 'ceph-for-6.8-rc1' of https://github.com/ceph/ceph-client: ceph: get rid of passing callbacks in __dentry_leases_walk() ceph: d_obtain_{alias,root}(ERR_PTR(...)) will do the right thing ceph: fix invalid pointer access if get_quota_realm return ERR_PTR ceph: remove duplicated code in ceph_netfs_issue_read() ceph: send oldest_client_tid when renewing caps ceph: rename create_session_open_msg() to create_session_full_msg() ceph: select FS_ENCRYPTION_ALGS if FS_ENCRYPTION ceph: fix deadlock or deadcode of misusing dget() ceph: try to allocate a smaller extent map for sparse read libceph: remove MAX_EXTENTS check for sparse reads ceph: reinitialize mds feature bit even when session in open ceph: skip reconnecting if MDS is not ready commit ec2d264ae4bb624f1b48a6f6ee1c47d7ea385f0a Merge: 8cb1bb178cdbd d61b40bf15ce4 Author: Linus Torvalds Date: Fri Jan 19 09:57:08 2024 -0800 Merge tag 'xfs-6.8-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Chandan Babu: - Fix per-inode space accounting bug * tag 'xfs-6.8-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix backwards logic in xfs_bmap_alloc_account commit 8cb1bb178cdbdf005b7ac07bb67a1e1f3e365e5a Merge: 16df6e07d6a88 77bebd186442a Author: Linus Torvalds Date: Fri Jan 19 09:31:59 2024 -0800 Merge tag '6.8-rc-smb-server-fixes-part2' of git://git.samba.org/ksmbd Pull more smb server updates from Steve French: - Fix for incorrect oplock break on directories when leases disabled - UAF fix for race between create and destroy of tcp connection - Important session setup SPNEGO fix - Update ksmbd feature status summary * tag '6.8-rc-smb-server-fixes-part2' of git://git.samba.org/ksmbd: ksmbd: only v2 leases handle the directory ksmbd: fix UAF issue in ksmbd_tcp_new_connection() ksmbd: validate mech token in session setup ksmbd: update feature status in documentation commit 16df6e07d6a88dc3049a5674654ed44dfbc74d81 Merge: 9d1694dc91ce7 1d5911d43cab5 Author: Linus Torvalds Date: Fri Jan 19 09:10:23 2024 -0800 Merge tag 'vfs-6.8.netfs' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs Pull netfs updates from Christian Brauner: "This extends the netfs helper library that network filesystems can use to replace their own implementations. Both afs and 9p are ported. cifs is ready as well but the patches are way bigger and will be routed separately once this is merged. That will remove lots of code as well. The overal goal is to get high-level I/O and knowledge of the page cache and ouf of the filesystem drivers. This includes knowledge about the existence of pages and folios The pull request converts afs and 9p. This removes about 800 lines of code from afs and 300 from 9p. For 9p it is now possible to do writes in larger than a page chunks. Additionally, multipage folio support can be turned on for 9p. Separate patches exist for cifs removing another 2000+ lines. I've included detailed information in the individual pulls I took. Summary: - Add NFS-style (and Ceph-style) locking around DIO vs buffered I/O calls to prevent these from happening at the same time. - Support for direct and unbuffered I/O. - Support for write-through caching in the page cache. - O_*SYNC and RWF_*SYNC writes use write-through rather than writing to the page cache and then flushing afterwards. - Support for write-streaming. - Support for write grouping. - Skip reads for which the server could only return zeros or EOF. - The fscache module is now part of the netfs library and the corresponding maintainer entry is updated. - Some helpers from the fscache subsystem are renamed to mark them as belonging to the netfs library. - Follow-up fixes for the netfs library. - Follow-up fixes for the 9p conversion" * tag 'vfs-6.8.netfs' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs: (50 commits) netfs: Fix wrong #ifdef hiding wait cachefiles: Fix signed/unsigned mixup netfs: Fix the loop that unmarks folios after writing to the cache netfs: Fix interaction between write-streaming and cachefiles culling netfs: Count DIO writes netfs: Mark netfs_unbuffered_write_iter_locked() static netfs: Fix proc/fs/fscache symlink to point to "netfs" not "../netfs" netfs: Rearrange netfs_io_subrequest to put request pointer first 9p: Use length of data written to the server in preference to error 9p: Do a couple of cleanups 9p: Fix initialisation of netfs_inode for 9p cachefiles: Fix __cachefiles_prepare_write() 9p: Use netfslib read/write_iter afs: Use the netfs write helpers netfs: Export the netfs_sreq tracepoint netfs: Optimise away reads above the point at which there can be no data netfs: Implement a write-through caching option netfs: Provide a launder_folio implementation netfs: Provide a writepages implementation netfs, cachefiles: Pass upper bound length to allow expansion ... commit 78e727e58e54efca4c23863fbd9e16e9d2d83f81 Author: Shyam Prasad N Date: Wed Jan 3 12:51:49 2024 +0000 cifs: update iface_last_update on each query-and-update iface_last_update was an unused field when it was introduced. Later, when we had periodic update of server interface list, this field was used regularly to decide when to update next. However, with the new logic of updating the interfaces, it becomes crucial that this field be updated whenever parse_server_interfaces runs successfully. This change updates this field when either the server does not support query of interfaces; so that we do not query the interfaces repeatedly. It also updates the field when the function reaches the end. Fixes: aa45dadd34e4 ("cifs: change iface_list from array to sorted linked list") Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit f591062bdbf4742b7f1622173017f19e927057b0 Author: Shyam Prasad N Date: Tue Jan 2 13:14:46 2024 +0000 cifs: handle servers that still advertise multichannel after disabling Some servers like Azure SMB servers always advertise multichannel capability in server capabilities list. Such servers return error STATUS_NOT_IMPLEMENTED for ioctl calls to query server interfaces, and expect clients to consider that as a sign that they do not support multichannel. We already handled this at mount time. Soon after the tree connect, we query server interfaces. And when server returned STATUS_NOT_IMPLEMENTED, we kept interface list as empty. When cifs_try_adding_channels gets called, it would not find any interfaces, so will not add channels. For the case where an active multichannel mount exists, and multichannel is disabled by such a server, this change will now allow the client to disable secondary channels on the mount. It will check the return status of query server interfaces call soon after a tree reconnect. If the return status is EOPNOTSUPP, then instead of the check to add more channels, we'll disable the secondary channels instead. For better code reuse, this change also moves the common code for disabling multichannel to a helper function. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit ce09f8d8a7130e6edfdd6fcad8eb277824d5de95 Author: Shyam Prasad N Date: Wed Jan 17 06:09:16 2024 +0000 cifs: new mount option called retrans We have several places in the code where we treat the error -EAGAIN very differently. Some code retry for arbitrary number of times. Introducing this new mount option named "retrans", so that all these handlers of -EAGAIN can retry a fixed number of times. This applies only to soft mounts. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 49fe25ce838183afac20f40457157ec009a86930 Author: Shyam Prasad N Date: Wed Jan 3 08:36:22 2024 +0000 cifs: reschedule periodic query for server interfaces Today, we schedule periodic query for server interfaces once every 10 minutes once a tree connection has been established. Recent change to handle disabling of multichannel disabled this delayed work. This change reenables it following a reconnect, and the server advertises multichannel. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 66c9314b61ed5b7bfcff0d89359aa0f975c0ab53 Author: Paulo Alcantara Date: Fri Jan 19 01:08:29 2024 -0300 smb: client: don't clobber ->i_rdev from cached reparse points Don't clobber ->i_rdev from valid reparse inodes over readdir(2) as it can't be provided by query dir responses. Signed-off-by: Paulo Alcantara Signed-off-by: Steve French commit f83709b9e0eb7048d74ba4515f268c6eacbce9c9 Author: Paulo Alcantara Date: Fri Jan 19 01:08:28 2024 -0300 smb: client: get rid of smb311_posix_query_path_info() Merge smb311_posix_query_path_info into ->query_path_info() to get rid of duplicate code. Signed-off-by: Paulo Alcantara Signed-off-by: Steve French commit 858e74876c5cbff1dfd5bace99e32fbce2abd4b5 Author: Paulo Alcantara Date: Fri Jan 19 01:08:27 2024 -0300 smb: client: parse owner/group when creating reparse points Parse owner/group when creating special files and symlinks under SMB3.1.1 POSIX mounts. Move the parsing of owner/group to smb2_compound_op() so we don't have to duplicate it in both smb2_get_reparse_inode() and smb311_posix_query_path_info(). Signed-off-by: Paulo Alcantara Signed-off-by: Steve French commit 76025cc2285d9ede3d717fe4305d66f8be2d9346 Author: Paulo Alcantara Date: Fri Jan 19 01:08:26 2024 -0300 smb: client: fix parsing of SMB3.1.1 POSIX create context The data offset for the SMB3.1.1 POSIX create context will always be 8-byte aligned so having the check 'noff + nlen >= doff' in smb2_parse_contexts() is wrong as it will lead to -EINVAL because noff + nlen == doff. Fix the sanity check to correctly handle aligned create context data. Fixes: af1689a9b770 ("smb: client: fix potential OOBs in smb2_parse_contexts()") Signed-off-by: Paulo Alcantara Signed-off-by: Steve French commit cfb7a13399be2234052a5bc480d166cd33047b0c Author: Steve French Date: Thu Jan 18 22:36:13 2024 -0600 cifs: update known bugs mentioned in kernel docs for cifs Remove bugs that have been addressed and add link to xfstest results wiki. Signed-off-by: Steve French commit f24a70106dc1ad2a755b2d42f47cf1dcf24f0b27 Author: Palmer Dabbelt Date: Fri Jan 19 06:56:01 2024 -0800 lib: checksum: Fix build with CONFIG_NET=n The generic ipv6 checksums are only defined with CONFIG_NET=y, so gate the test as well. Fixes: 6f4c45cbcb00 ("kunit: Add tests for csum_ipv6_magic and ip_fast_csum") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401192143.jLdjbIy3-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202401192357.WU4nPRdN-lkp@intel.com/ Reviewed-By: Charlie Jenkins Link: https://lore.kernel.org/r/20240119145600.3093-2-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt commit 71fee48fb772ac4f6cfa63dbebc5629de8b4cc09 Author: Heiko Carstens Date: Mon Jan 15 17:35:55 2024 +0100 tick-sched: Fix idle and iowait sleeptime accounting vs CPU hotplug When offlining and onlining CPUs the overall reported idle and iowait times as reported by /proc/stat jump backward and forward: cpu 132 0 176 225249 47 6 6 21 0 0 cpu0 80 0 115 112575 33 3 4 18 0 0 cpu1 52 0 60 112673 13 3 1 2 0 0 cpu 133 0 177 226681 47 6 6 21 0 0 cpu0 80 0 116 113387 33 3 4 18 0 0 cpu 133 0 178 114431 33 6 6 21 0 0 <---- jump backward cpu0 80 0 116 114247 33 3 4 18 0 0 cpu1 52 0 61 183 0 3 1 2 0 0 <---- idle + iowait start with 0 cpu 133 0 178 228956 47 6 6 21 0 0 <---- jump forward cpu0 81 0 117 114929 33 3 4 18 0 0 Reason for this is that get_idle_time() in fs/proc/stat.c has different sources for both values depending on if a CPU is online or offline: - if a CPU is online the values may be taken from its per cpu tick_cpu_sched structure - if a CPU is offline the values are taken from its per cpu cpustat structure The problem is that the per cpu tick_cpu_sched structure is set to zero on CPU offline. See tick_cancel_sched_timer() in kernel/time/tick-sched.c. Therefore when a CPU is brought offline and online afterwards both its idle and iowait sleeptime will be zero, causing a jump backward in total system idle and iowait sleeptime. In a similar way if a CPU is then brought offline again the total idle and iowait sleeptimes will jump forward. It looks like this behavior was introduced with commit 4b0c0f294f60 ("tick: Cleanup NOHZ per cpu data on cpu down"). This was only noticed now on s390, since we switched to generic idle time reporting with commit be76ea614460 ("s390/idle: remove arch_cpu_idle_time() and corresponding code"). Fix this by preserving the values of idle_sleeptime and iowait_sleeptime members of the per-cpu tick_sched structure on CPU hotplug. Fixes: 4b0c0f294f60 ("tick: Cleanup NOHZ per cpu data on cpu down") Reported-by: Gerald Schaefer Signed-off-by: Heiko Carstens Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240115163555.1004144-1-hca@linux.ibm.com commit ef175b29a242fea98f467f008237484b03c94834 Author: Rob Herring Date: Fri Jan 15 15:24:59 2021 -0600 of: Stop circularly including of_device.h and of_platform.h The DT of_device.h and of_platform.h headers date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. The headers also include platform_device.h and of.h. The result was lots of drivers relied on these implicit includes. Now the entire tree has been fixed over the last couple of cycles to explicitly include the necessary headers instead of relying on of_device.h and/or of_platform.h implicit includes, so the implicit and circular includes can finally be removed. Signed-off-by: Rob Herring commit 527eb67e0cfb3f398d780cf04fde28ee55618a4a Author: Stephen Rothwell Date: Mon Dec 11 16:05:10 2023 +1100 clk: qcom: gcc-x1e80100: Replace of_device.h with explicit includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. of_device.h isn't needed, but mod_devicetable.h and platform_device.h were implicitly included. Signed-off-by: Stephen Rothwell Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20231211160510.0aef871b@canb.auug.org.au [robh: Redo commit msg] Signed-off-by: Rob Herring commit ed7dafcc5364d5ff1ac85d7b18bf9a00ff28b6f8 Author: Rob Herring Date: Mon Oct 9 14:45:08 2023 -0500 thermal: loongson2: Replace of_device.h with explicit includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. of_device.h isn't needed, but mod_devicetable.h and property.h were implicitly included. Signed-off-by: Rob Herring commit 5e6c3454b40594c6f1d398254e7b4005494f9638 Author: Rob Herring Date: Fri Sep 1 14:36:49 2023 -0500 net: can: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Error checking for matching and match data was not necessary as matching is always successful if we're already in probe and the match tables always have data pointers. Signed-off-by: Rob Herring commit 61c2ef4b6cb019946479baf0aeded648081bfb5c Author: Rob Herring Date: Thu Aug 31 16:40:08 2023 -0500 sparc: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring commit cb95a4fa50bbc1262bfb7fea482388a50b12948f Author: Vinod Koul Date: Fri Jan 19 18:10:44 2024 +0530 dmaengine: dw-edma: increase size of 'name' in debugfs code We seem to have hit warnings of 'output may be truncated' which is fixed by increasing the size of 'name' drivers/dma/dw-edma/dw-hdma-v0-debugfs.c: In function ‘dw_hdma_v0_debugfs_on’: drivers/dma/dw-edma/dw-hdma-v0-debugfs.c:125:50: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Werror=format-truncation=] 125 | snprintf(name, sizeof(name), "%s:%d", CHANNEL_STR, i); | ^~ drivers/dma/dw-edma/dw-hdma-v0-debugfs.c: In function ‘dw_hdma_v0_debugfs_on’: drivers/dma/dw-edma/dw-hdma-v0-debugfs.c:142:50: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Werror=format-truncation=] 142 | snprintf(name, sizeof(name), "%s:%d", CHANNEL_STR, i); | ^~ drivers/dma/dw-edma/dw-edma-v0-debugfs.c: In function ‘dw_edma_debugfs_regs_wr’: drivers/dma/dw-edma/dw-edma-v0-debugfs.c:193:50: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 8 [-Werror=format-truncation=] 193 | snprintf(name, sizeof(name), "%s:%d", CHANNEL_STR, i); | ^~ Signed-off-by: Vinod Koul commit 6386f6c995b3ab91c72cfb76e4465553c555a8da Author: Vinod Koul Date: Fri Jan 19 18:10:44 2024 +0530 dmaengine: fsl-qdma: increase size of 'irq_name' We seem to have hit warnings of 'output may be truncated' which is fixed by increasing the size of 'irq_name' drivers/dma/fsl-qdma.c: In function ‘fsl_qdma_irq_init’: drivers/dma/fsl-qdma.c:824:46: error: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Werror=format-overflow=] 824 | sprintf(irq_name, "qdma-queue%d", i); | ^~ drivers/dma/fsl-qdma.c:824:35: note: directive argument in the range [-2147483641, 2147483646] 824 | sprintf(irq_name, "qdma-queue%d", i); | ^~~~~~~~~~~~~~ drivers/dma/fsl-qdma.c:824:17: note: ‘sprintf’ output between 12 and 22 bytes into a destination of size 20 824 | sprintf(irq_name, "qdma-queue%d", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Vinod Koul commit 404290240827c3bb5c4e195174a8854eef2f89ac Author: Vinod Koul Date: Fri Jan 19 18:10:44 2024 +0530 dmaengine: shdma: increase size of 'dev_id' We seem to have hit warnings of 'output may be truncated' which is fixed by increasing the size of 'dev_id' drivers/dma/sh/shdmac.c: In function ‘sh_dmae_probe’: drivers/dma/sh/shdmac.c:541:34: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 9 [-Werror=format-truncation=] 541 | "sh-dmae%d.%d", pdev->id, id); | ^~ In function ‘sh_dmae_chan_probe’, inlined from ‘sh_dmae_probe’ at drivers/dma/sh/shdmac.c:845:9: drivers/dma/sh/shdmac.c:541:26: note: directive argument in the range [0, 2147483647] 541 | "sh-dmae%d.%d", pdev->id, id); | ^~~~~~~~~~~~~~ drivers/dma/sh/shdmac.c:541:26: note: directive argument in the range [0, 19] drivers/dma/sh/shdmac.c:540:17: note: ‘snprintf’ output between 11 and 21 bytes into a destination of size 16 540 | snprintf(sh_chan->dev_id, sizeof(sh_chan->dev_id), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 541 | "sh-dmae%d.%d", pdev->id, id); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Vinod Koul commit f829bca2e294bc2953bd2dadb93d72a9987b3110 Author: Jan Kuliga Date: Sat Dec 23 00:17:28 2023 +0100 dmaengine: xilinx: xdma: Fix kernel-doc warnings Replace hyphens with colons where necessary. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312230634.3AIMQ3OP-lkp@intel.com/ Signed-off-by: Jan Kuliga Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20231222231728.7156-1-jankul@alatek.krakow.pl Signed-off-by: Vinod Koul commit 62b68a88795942512936896b9fec1ee7d5fa9922 Author: Lad Prabhakar Date: Wed Jan 10 22:22:10 2024 +0000 dmaengine: usb-dmac: Avoid format-overflow warning gcc points out that the fix-byte buffer might be too small: drivers/dma/sh/usb-dmac.c: In function 'usb_dmac_probe': drivers/dma/sh/usb-dmac.c:720:34: warning: '%u' directive writing between 1 and 10 bytes into a region of size 3 [-Wformat-overflow=] 720 | sprintf(pdev_irqname, "ch%u", index); | ^~ In function 'usb_dmac_chan_probe', inlined from 'usb_dmac_probe' at drivers/dma/sh/usb-dmac.c:814:9: drivers/dma/sh/usb-dmac.c:720:31: note: directive argument in the range [0, 4294967294] 720 | sprintf(pdev_irqname, "ch%u", index); | ^~~~~~ drivers/dma/sh/usb-dmac.c:720:9: note: 'sprintf' output between 4 and 13 bytes into a destination of size 5 720 | sprintf(pdev_irqname, "ch%u", index); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Maximum number of channels for USB-DMAC as per the driver is 1-99 so use u8 instead of unsigned int/int for DMAC channel indexing and make the pdev_irqname string long enough to avoid the warning. While at it use scnprintf() instead of sprintf() to make the code more robust. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240110222210.193479-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit dbc153fd3c142909e564bb256da087e13fbf239c Author: Wen Gu Date: Thu Jan 18 12:32:10 2024 +0800 net/smc: fix illegal rmb_desc access in SMC-D connection dump A crash was found when dumping SMC-D connections. It can be reproduced by following steps: - run nginx/wrk test: smc_run nginx smc_run wrk -t 16 -c 1000 -d -H 'Connection: Close' - continuously dump SMC-D connections in parallel: watch -n 1 'smcss -D' BUG: kernel NULL pointer dereference, address: 0000000000000030 CPU: 2 PID: 7204 Comm: smcss Kdump: loaded Tainted: G E 6.7.0+ #55 RIP: 0010:__smc_diag_dump.constprop.0+0x5e5/0x620 [smc_diag] Call Trace: ? __die+0x24/0x70 ? page_fault_oops+0x66/0x150 ? exc_page_fault+0x69/0x140 ? asm_exc_page_fault+0x26/0x30 ? __smc_diag_dump.constprop.0+0x5e5/0x620 [smc_diag] ? __kmalloc_node_track_caller+0x35d/0x430 ? __alloc_skb+0x77/0x170 smc_diag_dump_proto+0xd0/0xf0 [smc_diag] smc_diag_dump+0x26/0x60 [smc_diag] netlink_dump+0x19f/0x320 __netlink_dump_start+0x1dc/0x300 smc_diag_handler_dump+0x6a/0x80 [smc_diag] ? __pfx_smc_diag_dump+0x10/0x10 [smc_diag] sock_diag_rcv_msg+0x121/0x140 ? __pfx_sock_diag_rcv_msg+0x10/0x10 netlink_rcv_skb+0x5a/0x110 sock_diag_rcv+0x28/0x40 netlink_unicast+0x22a/0x330 netlink_sendmsg+0x1f8/0x420 __sock_sendmsg+0xb0/0xc0 ____sys_sendmsg+0x24e/0x300 ? copy_msghdr_from_user+0x62/0x80 ___sys_sendmsg+0x7c/0xd0 ? __do_fault+0x34/0x160 ? do_read_fault+0x5f/0x100 ? do_fault+0xb0/0x110 ? __handle_mm_fault+0x2b0/0x6c0 __sys_sendmsg+0x4d/0x80 do_syscall_64+0x69/0x180 entry_SYSCALL_64_after_hwframe+0x6e/0x76 It is possible that the connection is in process of being established when we dump it. Assumed that the connection has been registered in a link group by smc_conn_create() but the rmb_desc has not yet been initialized by smc_buf_create(), thus causing the illegal access to conn->rmb_desc. So fix it by checking before dump. Fixes: 4b1b7d3b30a6 ("net/smc: add SMC-D diag support") Signed-off-by: Wen Gu Reviewed-by: Dust Li Reviewed-by: Wenjia Zhang Signed-off-by: David S. Miller commit e626cb02ee8399fd42c415e542d031d185783903 Author: Sebastian Andrzej Siewior Date: Thu Jan 18 12:54:51 2024 +0100 futex: Prevent the reuse of stale pi_state Jiri Slaby reported a futex state inconsistency resulting in -EINVAL during a lock operation for a PI futex. It requires that the a lock process is interrupted by a timeout or signal: T1 Owns the futex in user space. T2 Tries to acquire the futex in kernel (futex_lock_pi()). Allocates a pi_state and attaches itself to it. T2 Times out and removes its rt_waiter from the rt_mutex. Drops the rtmutex lock and tries to acquire the hash bucket lock to remove the futex_q. The lock is contended and T2 schedules out. T1 Unlocks the futex (futex_unlock_pi()). Finds a futex_q but no rt_waiter. Unlocks the futex (do_uncontended) and makes it available to user space. T3 Acquires the futex in user space. T4 Tries to acquire the futex in kernel (futex_lock_pi()). Finds the existing futex_q of T2 and tries to attach itself to the existing pi_state. This (attach_to_pi_state()) fails with -EINVAL because uval contains the TID of T3 but pi_state points to T1. It's incorrect to unlock the futex and make it available for user space to acquire as long as there is still an existing state attached to it in the kernel. T1 cannot hand over the futex to T2 because T2 already gave up and started to clean up and is blocked on the hash bucket lock, so T2's futex_q with the pi_state pointing to T1 is still queued. T2 observes the futex_q, but ignores it as there is no waiter on the corresponding rt_mutex and takes the uncontended path which allows the subsequent caller of futex_lock_pi() (T4) to observe that stale state. To prevent this the unlock path must dequeue all futex_q entries which point to the same pi_state when there is no waiter on the rt mutex. This requires obviously to make the dequeue conditional in the locking path to prevent a double dequeue. With that it's guaranteed that user space cannot observe an uncontended futex which has kernel state attached. Fixes: fbeb558b0dd0d ("futex/pi: Fix recursive rt_mutex waiter state") Reported-by: Jiri Slaby Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Tested-by: Jiri Slaby Link: https://lore.kernel.org/r/20240118115451.0TkD_ZhB@linutronix.de Closes: https://lore.kernel.org/all/4611bcf2-44d0-4c34-9b84-17406f881003@kernel.org commit c4d6dcb3b6250ea546a952ad33382daf7cd32425 Author: Lad Prabhakar Date: Wed Jan 10 22:27:17 2024 +0000 dmaengine: sh: rz-dmac: Avoid format-overflow warning The max channel count for RZ DMAC is 16, hence use u8 instead of unsigned int and make the pdev_irqname string long enough to avoid the warning. This fixes the below issue: drivers/dma/sh/rz-dmac.c: In function ‘rz_dmac_probe’: drivers/dma/sh/rz-dmac.c:770:34: warning: ‘%u’ directive writing between 1 and 10 bytes into a region of size 3 [-Wformat-overflow=] 770 | sprintf(pdev_irqname, "ch%u", index); | ^~ In function ‘rz_dmac_chan_probe’, inlined from ‘rz_dmac_probe’ at drivers/dma/sh/rz-dmac.c:910:9: drivers/dma/sh/rz-dmac.c:770:31: note: directive argument in the range [0, 4294967294] 770 | sprintf(pdev_irqname, "ch%u", index); | ^~~~~~ drivers/dma/sh/rz-dmac.c:770:9: note: ‘sprintf’ output between 4 and 13 bytes into a destination of size 5 770 | sprintf(pdev_irqname, "ch%u", index); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ While at it use scnprintf() instead of sprintf() to make the code more robust. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240110222717.193719-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit 98373a21159379341742dadd6c038fe8ff34d9a1 Author: Randy Dunlap Date: Thu Jan 18 19:28:32 2024 -0800 dmaengine: imx-sdma: fix Excess kernel-doc warnings Fix warnings of "Excess struct member" by removing those lines. They are extraneous. imx-sdma.c:467: warning: Excess struct member 'context_loaded' description in 'sdma_channel' imx-sdma.c:467: warning: Excess struct member 'bd_pool' description in 'sdma_channel' imx-sdma.c:500: warning: Excess struct member 'script_addrs' description in 'sdma_firmware_header' Signed-off-by: Randy Dunlap Cc: Sascha Hauer Cc: Shawn Guo Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20240119032832.4051-1-rdunlap@infradead.org Signed-off-by: Vinod Koul commit 620a7e4c1f03a84e10c8c3fa0ae1aab03ef84294 Author: Nathan Chancellor Date: Fri Dec 22 11:06:45 2023 -0700 dmaengine: xilinx: xdma: Fix initialization location of desc in xdma_channel_isr() Clang warns (or errors with CONFIG_WERROR=y): drivers/dma/xilinx/xdma.c:894:3: error: variable 'desc' is uninitialized when used here [-Werror,-Wuninitialized] 894 | desc->error = true; | ^~~~ The initialization of desc was moved too far forward, move it back so that this assignment does not result in a potential crash at runtime while clearing up the warning. Closes: https://github.com/ClangBuiltLinux/linux/issues/1972 Fixes: 2f8f90cd2f8d ("dmaengine: xilinx: xdma: Implement interleaved DMA transfers") Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20231222-dma-xilinx-xdma-clang-fixes-v1-2-84a18ff184d2@kernel.org Signed-off-by: Vinod Koul commit fe0d495e759cee0dbfff4348b5791f21b6f56655 Author: Nathan Chancellor Date: Fri Dec 22 11:06:44 2023 -0700 dmaengine: xilinx: xdma: Fix operator precedence in xdma_prep_interleaved_dma() Clang warns (or errors with CONFIG_WERROR=y): drivers/dma/xilinx/xdma.c:757:68: error: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Werror,-Wparentheses] 757 | src_addr += dmaengine_get_src_icg(xt, &xt->sgl[i]) + xt->src_inc ? | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ drivers/dma/xilinx/xdma.c:757:68: note: place parentheses around the '+' expression to silence this warning 757 | src_addr += dmaengine_get_src_icg(xt, &xt->sgl[i]) + xt->src_inc ? | ^ | ( ) drivers/dma/xilinx/xdma.c:757:68: note: place parentheses around the '?:' expression to evaluate it first 757 | src_addr += dmaengine_get_src_icg(xt, &xt->sgl[i]) + xt->src_inc ? | ^ | ( 758 | xt->sgl[i].size : 0; | | ) drivers/dma/xilinx/xdma.c:759:68: error: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Werror,-Wparentheses] 759 | dst_addr += dmaengine_get_dst_icg(xt, &xt->sgl[i]) + xt->dst_inc ? | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ drivers/dma/xilinx/xdma.c:759:68: note: place parentheses around the '+' expression to silence this warning 759 | dst_addr += dmaengine_get_dst_icg(xt, &xt->sgl[i]) + xt->dst_inc ? | ^ | ( ) drivers/dma/xilinx/xdma.c:759:68: note: place parentheses around the '?:' expression to evaluate it first 759 | dst_addr += dmaengine_get_dst_icg(xt, &xt->sgl[i]) + xt->dst_inc ? | ^ | ( 760 | xt->sgl[i].size : 0; | | ) The src_inc and dst_inc members of 'struct dma_interleaved_template' are booleans, so it does not make sense for the addition to happen first. Wrap the conditional operator in parantheses so it is evaluated first. Closes: https://github.com/ClangBuiltLinux/linux/issues/1971 Fixes: 2f8f90cd2f8d ("dmaengine: xilinx: xdma: Implement interleaved DMA transfers") Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20231222-dma-xilinx-xdma-clang-fixes-v1-1-84a18ff184d2@kernel.org Signed-off-by: Vinod Koul commit b93216d3be55924c43e097c1fbb21bbe1a5a5d5c Merge: 4ee632c82d2db 3d0b2176e0426 Author: Vinod Koul Date: Fri Jan 19 17:03:06 2024 +0530 Merge tag 'dmaengine-6.8-rc1' into fixes dmaengine updates for v6.8 New support: - Loongson LS2X APB DMA controller - sf-pdma: mpfs-pdma support - Qualcomm X1E80100 GPI dma controller support Updates: - Xilinx XDMA updates to support interleaved DMA transfers - TI PSIL threads for AM62P and J722S and cfg register regions description - axi-dmac Improving the cyclic DMA transfers - Tegra Support dma-channel-mask property - Remaining platform remove callback returning void conversions commit 99fe83ab3bb0e8aac4d45a9361919794336b2ba8 Author: Masahiro Yamada Date: Tue Nov 21 08:54:23 2023 +0900 sh: vsyscall: Remove unnecessary $(foreach ...) There is no need to use $(foreach ...) for iterating over just one parameter. Signed-off-by: Masahiro Yamada Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20231120235423.4103310-1-masahiroy@kernel.org Signed-off-by: John Paul Adrian Glaubitz commit 6a9531c3a88096a26cf3ac582f7ec44f94a7dcb2 Author: Yajun Deng Date: Thu Jan 18 14:18:53 2024 +0800 memblock: fix crash when reserved memory is not added to memory After commit 61167ad5fecd ("mm: pass nid to reserve_bootmem_region()") nid of a reserved region is used by init_reserved_page() (with CONFIG_DEFERRED_STRUCT_PAGE_INIT=y) to access node strucure. In many cases the nid of the reserved memory is not set and this causes a crash. When the nid of a reserved region is not set, fall back to early_pfn_to_nid(), so that nid of the first_online_node will be passed to init_reserved_page(). Fixes: 61167ad5fecd ("mm: pass nid to reserve_bootmem_region()") Signed-off-by: Yajun Deng Link: https://lore.kernel.org/r/20240118061853.2652295-1-yajun.deng@linux.dev [rppt: massaged the commit message] Signed-off-by: Mike Rapoport (IBM) commit 180a8f12c21f41740fee09ca7f7aa98ff5bb99f8 Author: Hans de Goede Date: Sat Dec 23 15:16:50 2023 +0100 Input: goodix - accept ACPI resources with gpio_count == 3 && gpio_int_idx == 0 Some devices list 3 Gpio resources in the ACPI resource list for the touchscreen: 1. GpioInt resource pointing to the GPIO used for the interrupt 2. GpioIo resource pointing to the reset GPIO 3. GpioIo resource pointing to the GPIO used for the interrupt Note how the third extra GpioIo resource really is a duplicate of the GpioInt provided info. Ignore this extra GPIO, treating this setup the same as gpio_count == 2 && gpio_int_idx == 0 fixes the touchscreen not working on the Thunderbook Colossus W803 rugged tablet and likely also on the CyberBook_T116K. Reported-by: Maarten van der Schrieck Closes: https://gitlab.com/AdyaAdya/goodix-touchscreen-linux-driver/-/issues/22 Suggested-by: Maarten van der Schrieck Tested-by: Maarten van der Schrieck Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20231223141650.10679-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit d87123aa9a7920e88633ffc5c5a0a22ab08bdc06 Author: Geert Uytterhoeven Date: Mon Sep 25 13:10:22 2023 +0200 sh: ecovec24: Rename missed backlight field from fbdev to dev One instance of gpio_backlight_platform_data.fbdev was renamed, but the second instance was forgotten, causing a build failure: arch/sh/boards/mach-ecovec24/setup.c: In function ‘arch_setup’: arch/sh/boards/mach-ecovec24/setup.c:1223:37: error: ‘struct gpio_backlight_platform_data’ has no member named ‘fbdev’; did you mean ‘dev’? 1223 | gpio_backlight_data.fbdev = NULL; | ^~~~~ | dev Fix this by updating the second instance. Fixes: ed369def91c1579a ("backlight/gpio_backlight: Rename field 'fbdev' to 'dev'") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202309231601.Uu6qcRnU-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven Acked-by: Thomas Zimmermann Reviewed-by: John Paul Adrian Glaubitz Link: https://lore.kernel.org/r/20230925111022.3626362-1-geert+renesas@glider.be Signed-off-by: John Paul Adrian Glaubitz commit 009f0a64f9ccee9db9d758b883059e5c74bb7330 Merge: cacea81390fd8 bf3ff145df184 Author: Dave Airlie Date: Fri Jan 19 16:13:44 2024 +1000 Merge tag 'drm-xe-next-fixes-2024-01-16' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Driver Changes: - Fix for definition of wakeref_t - Fix for an error code aliasing - Fix for VM_UNBIND_ALL in the case there are no bound VMAs - Fixes for a number of __iomem address space mismatches reported by sparse - Fixes for the assignment of exec_queue priority - A Fix for skip_guc_pc not taking effect - Workaround for a build problem on GCC 11 - A couple of fixes for error paths - Fix a Flat CCS compression metadata copy issue - Fix a misplace array bounds checking - Don't have display support depend on EXPERT (as discussed on IRC) Signed-off-by: Dave Airlie From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m?= Link: https://patchwork.freedesktop.org/patch/msgid/20240116102204.106520-1-thomas.hellstrom@linux.intel.com commit cacea81390fd8c8c85404e5eb2adeb83d87a912e Author: Dave Airlie Date: Thu Jan 18 06:19:57 2024 +1000 nouveau/vmm: don't set addr on the fail path to avoid warning nvif_vmm_put gets called if addr is set, but if the allocation fails we don't need to call put, otherwise we get a warning like [523232.435671] ------------[ cut here ]------------ [523232.435674] WARNING: CPU: 8 PID: 1505697 at drivers/gpu/drm/nouveau/nvif/vmm.c:68 nvif_vmm_put+0x72/0x80 [nouveau] [523232.435795] Modules linked in: uinput rfcomm snd_seq_dummy snd_hrtimer nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables nfnetlink qrtr bnep sunrpc binfmt_misc intel_rapl_msr intel_rapl_common intel_uncore_frequency intel_uncore_frequency_common isst_if_common iwlmvm nfit libnvdimm vfat fat x86_pkg_temp_thermal intel_powerclamp mac80211 snd_soc_avs snd_soc_hda_codec coretemp snd_hda_ext_core snd_soc_core snd_hda_codec_realtek kvm_intel snd_hda_codec_hdmi snd_compress snd_hda_codec_generic ac97_bus snd_pcm_dmaengine snd_hda_intel libarc4 snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec kvm iwlwifi snd_hda_core btusb snd_hwdep btrtl snd_seq btintel irqbypass btbcm rapl snd_seq_device eeepc_wmi btmtk intel_cstate iTCO_wdt cfg80211 snd_pcm asus_wmi bluetooth intel_pmc_bxt iTCO_vendor_support snd_timer ledtrig_audio pktcdvd snd mei_me [523232.435828] sparse_keymap intel_uncore i2c_i801 platform_profile wmi_bmof mei pcspkr ioatdma soundcore i2c_smbus rfkill idma64 dca joydev acpi_tad loop zram nouveau drm_ttm_helper ttm video drm_exec drm_gpuvm gpu_sched crct10dif_pclmul i2c_algo_bit nvme crc32_pclmul crc32c_intel drm_display_helper polyval_clmulni nvme_core polyval_generic e1000e mxm_wmi cec ghash_clmulni_intel r8169 sha512_ssse3 nvme_common wmi pinctrl_sunrisepoint uas usb_storage ip6_tables ip_tables fuse [523232.435849] CPU: 8 PID: 1505697 Comm: gnome-shell Tainted: G W 6.6.0-rc7-nvk-uapi+ #12 [523232.435851] Hardware name: System manufacturer System Product Name/ROG STRIX X299-E GAMING II, BIOS 1301 09/24/2021 [523232.435852] RIP: 0010:nvif_vmm_put+0x72/0x80 [nouveau] [523232.435934] Code: 00 00 48 89 e2 be 02 00 00 00 48 c7 04 24 00 00 00 00 48 89 44 24 08 e8 fc bf ff ff 85 c0 75 0a 48 c7 43 08 00 00 00 00 eb b3 <0f> 0b eb f2 e8 f5 c9 b2 e6 0f 1f 44 00 00 90 90 90 90 90 90 90 90 [523232.435936] RSP: 0018:ffffc900077ffbd8 EFLAGS: 00010282 [523232.435937] RAX: 00000000fffffffe RBX: ffffc900077ffc00 RCX: 0000000000000010 [523232.435938] RDX: 0000000000000010 RSI: ffffc900077ffb38 RDI: ffffc900077ffbd8 [523232.435940] RBP: ffff888e1c4f2140 R08: 0000000000000000 R09: 0000000000000000 [523232.435940] R10: 0000000000000000 R11: 0000000000000000 R12: ffff888503811800 [523232.435941] R13: ffffc900077ffca0 R14: ffff888e1c4f2140 R15: ffff88810317e1e0 [523232.435942] FS: 00007f933a769640(0000) GS:ffff88905fa00000(0000) knlGS:0000000000000000 [523232.435943] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [523232.435944] CR2: 00007f930bef7000 CR3: 00000005d0322001 CR4: 00000000003706e0 [523232.435945] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [523232.435946] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [523232.435964] Call Trace: [523232.435965] [523232.435966] ? nvif_vmm_put+0x72/0x80 [nouveau] [523232.436051] ? __warn+0x81/0x130 [523232.436055] ? nvif_vmm_put+0x72/0x80 [nouveau] [523232.436138] ? report_bug+0x171/0x1a0 [523232.436142] ? handle_bug+0x3c/0x80 [523232.436144] ? exc_invalid_op+0x17/0x70 [523232.436145] ? asm_exc_invalid_op+0x1a/0x20 [523232.436149] ? nvif_vmm_put+0x72/0x80 [nouveau] [523232.436230] ? nvif_vmm_put+0x64/0x80 [nouveau] [523232.436342] nouveau_vma_del+0x80/0xd0 [nouveau] [523232.436506] nouveau_vma_new+0x1a0/0x210 [nouveau] [523232.436671] nouveau_gem_object_open+0x1d0/0x1f0 [nouveau] [523232.436835] drm_gem_handle_create_tail+0xd1/0x180 [523232.436840] drm_prime_fd_to_handle_ioctl+0x12e/0x200 [523232.436844] ? __pfx_drm_prime_fd_to_handle_ioctl+0x10/0x10 [523232.436847] drm_ioctl_kernel+0xd3/0x180 [523232.436849] drm_ioctl+0x26d/0x4b0 [523232.436851] ? __pfx_drm_prime_fd_to_handle_ioctl+0x10/0x10 [523232.436855] nouveau_drm_ioctl+0x5a/0xb0 [nouveau] [523232.437032] __x64_sys_ioctl+0x94/0xd0 [523232.437036] do_syscall_64+0x5d/0x90 [523232.437040] ? syscall_exit_to_user_mode+0x2b/0x40 [523232.437044] ? do_syscall_64+0x6c/0x90 [523232.437046] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Reported-by: Faith Ekstrand Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20240117213852.295565-1-airlied@gmail.com commit 4d0e8f9a361b3a1f7b67418c536b258323de734f Author: Anup Patel Date: Mon Nov 27 22:45:35 2023 +0530 KVM: riscv: selftests: Add Zfa extension to get-reg-list test The KVM RISC-V allows Zfa extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 41182cc6f507011a2e6c82657779e451ed9942bb Author: Anup Patel Date: Mon Nov 27 22:43:12 2023 +0530 RISC-V: KVM: Allow Zfa extension for Guest/VM We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zfa extension for Guest/VM. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 1216fdd99be113fa75ccdd0497802bd0fe4369aa Author: Anup Patel Date: Mon Nov 27 22:35:06 2023 +0530 KVM: riscv: selftests: Add Zvfh[min] extensions to get-reg-list test The KVM RISC-V allows Zvfh[min] extensions for Guest/VM so let us add these extensions to get-reg-list test. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit f46300285926c2b0d0c79bf40c87d45e169cecb6 Author: Anup Patel Date: Mon Nov 27 22:26:05 2023 +0530 RISC-V: KVM: Allow Zvfh[min] extensions for Guest/VM We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zvfh[min] extensions for Guest/VM. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 1a3bc507821d24a80a6af8beb08af8032c33ebd7 Author: Anup Patel Date: Mon Nov 27 22:22:06 2023 +0530 KVM: riscv: selftests: Add Zihintntl extension to get-reg-list test The KVM RISC-V allows Zihintntl extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit ab6da9cdc3f3d1d091d657219fb6e98f710ee098 Author: Anup Patel Date: Mon Nov 27 22:15:10 2023 +0530 RISC-V: KVM: Allow Zihintntl extension for Guest/VM We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zihintntl extension for Guest/VM. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 496ee21a17ce45e92483fdf1827ba91f4867f160 Author: Anup Patel Date: Mon Nov 27 22:11:02 2023 +0530 KVM: riscv: selftests: Add Zfh[min] extensions to get-reg-list test The KVM RISC-V allows Zfh[min] extensions for Guest/VM so let us add these extensions to get-reg-list test. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit f3901ece5b3894177d1816208d0fb06b295617e0 Author: Anup Patel Date: Mon Nov 27 22:01:55 2023 +0530 RISC-V: KVM: Allow Zfh[min] extensions for Guest/VM We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zfh[min] extensions for Guest/VM. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 2ddf79070f7edada19fecec57d8591d6b718fa53 Author: Anup Patel Date: Mon Nov 27 21:54:33 2023 +0530 KVM: riscv: selftests: Add vector crypto extensions to get-reg-list test The KVM RISC-V allows vector crypto extensions for Guest/VM so let us add these extensions to get-reg-list test. This includes extensions Zvbb, Zvbc, Zvkb, Zvkg, Zvkned, Zvknha, Zvknhb, Zvksed, Zvksh, and Zvkt. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit afd1ef3adfbc36e35fcf4f742fd90aea6480a276 Author: Anup Patel Date: Mon Nov 27 21:38:43 2023 +0530 RISC-V: KVM: Allow vector crypto extensions for Guest/VM We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable vector crypto extensions for Guest/VM. This includes extensions Zvbb, Zvbc, Zvkb, Zvkg, Zvkned, Zvknha, Zvknhb, Zvksed, Zvksh, and Zvkt. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 14d70de562dfd78be638fc59b0a323235acc67be Author: Anup Patel Date: Mon Nov 27 20:47:58 2023 +0530 KVM: riscv: selftests: Add scaler crypto extensions to get-reg-list test The KVM RISC-V allows scaler crypto extensions for Guest/VM so let us add these extensions to get-reg-list test. This includes extensions Zbkb, Zbkc, Zbkx, Zknd, Zkne, Zknh, Zkr, Zksed, Zksh, and Zkt. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit f370b4e668f017f523968f7490163fa922dcd92e Author: Anup Patel Date: Mon Nov 27 20:36:36 2023 +0530 RISC-V: KVM: Allow scalar crypto extensions for Guest/VM We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable scalar crypto extensions for Guest/VM. This includes extensions Zbkb, Zbkc, Zbkx, Zknd, Zkne, Zknh, Zkr, Zksed, Zksh, and Zkt. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit ac396141308d07a9534c5a7f1f7c80cb95e35b20 Author: Anup Patel Date: Mon Nov 27 18:47:23 2023 +0530 KVM: riscv: selftests: Add Zbc extension to get-reg-list test The KVM RISC-V allows Zbc extension for Guest/VM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 367188297254e7f81e3c3c94e6d6a623f757c4cb Author: Anup Patel Date: Mon Nov 27 16:11:09 2023 +0530 RISC-V: KVM: Allow Zbc extension for Guest/VM We extend the KVM ISA extension ONE_REG interface to allow KVM user space to detect and enable Zbc extension for Guest/VM. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit 7f738527a7a03021c7e1b02e188f446845f05eb6 Author: Shyam Prasad N Date: Wed Jan 17 06:21:33 2024 +0000 cifs: new nt status codes from MS-SMB2 MS-SMB2 spec has introduced two new status codes, STATUS_SERVER_UNAVAILABLE and STATUS_FILE_NOT_AVAILABLE which are to be treated as retryable errors. This change adds these to the available mappings and maps them to Linux errno EAGAIN. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 268b8b5797becb242013fcd63173eb28c007c8ae Author: Shyam Prasad N Date: Wed Jan 10 10:48:36 2024 +0000 cifs: pick channel for tcon and tdis Today, the tree connect and disconnect requests are sent on the primary channel only. However, the new multichannel logic allows the session to remain active even if one of the channels are alive. So a tree connect can now be triggered during a reconnect on any of its channels. This change changes tcon and tdis calls to pick an active channel instead of the first one. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 936eba9cfb5cfbf6a2c762cd163605f2b784e03e Author: Shyam Prasad N Date: Wed Jan 17 05:55:39 2024 +0000 cifs: open_cached_dir should not rely on primary channel open_cached_dir today selects ses->server a.k.a primary channel to send requests. When multichannel is used, the primary channel maybe down. So it does not make sense to rely only on that channel. This fix makes this function pick a channel with the standard helper function cifs_pick_channel. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit d7851dc13d87688e2c532f0e77c2bd29f902d6cf Author: Steve French Date: Wed Jan 17 17:59:59 2024 -0600 smb3: minor documentation updates Update the usage documentation to include some missing configuration options. Update the todo list documentation for cifs.ko Reviewed-by: Bharath SM Signed-off-by: Steve French commit 9d1694dc91ce7b80bc96d6d8eaf1a1eca668d847 Merge: e9a5a78d1ad8c b2e792ae883a0 Author: Linus Torvalds Date: Thu Jan 18 18:22:40 2024 -0800 Merge tag 'for-6.8/block-2024-01-18' of git://git.kernel.dk/linux Pull block fixes from Jens Axboe: - NVMe pull request via Keith: - tcp, fc, and rdma target fixes (Maurizio, Daniel, Hannes, Christoph) - discard fixes and improvements (Christoph) - timeout debug improvements (Keith, Max) - various cleanups (Daniel, Max, Giuxen) - trace event string fixes (Arnd) - shadow doorbell setup on reset fix (William) - a write zeroes quirk for SK Hynix (Jim) - MD pull request via Song: - Sparse warning since v6.0 (Bart) - /proc/mdstat regression since v6.7 (Yu Kuai) - Use symbolic error value (Christian) - IO Priority documentation update (Christian) - Fix for accessing queue limits without having entered the queue (Christoph, me) - Fix for loop dio support (Christoph) - Move null_blk off deprecated ida interface (Christophe) - Ensure nbd initializes full msghdr (Eric) - Fix for a regression with the folio conversion, which is now easier to hit because of an unrelated change (Matthew) - Remove redundant check in virtio-blk (Li) - Fix for a potential hang in sbitmap (Ming) - Fix for partial zone appending (Damien) - Misc changes and fixes (Bart, me, Kemeng, Dmitry) * tag 'for-6.8/block-2024-01-18' of git://git.kernel.dk/linux: (45 commits) Documentation: block: ioprio: Update schedulers loop: fix the the direct I/O support check when used on top of block devices blk-mq: Remove the hctx 'run' debugfs attribute nbd: always initialize struct msghdr completely block: Fix iterating over an empty bio with bio_for_each_folio_all block: bio-integrity: fix kcalloc() arguments order virtio_blk: remove duplicate check if queue is broken in virtblk_done sbitmap: remove stale comment in sbq_calc_wake_batch block: Correct a documentation comment in blk-cgroup.c null_blk: Remove usage of the deprecated ida_simple_xx() API block: ensure we hold a queue reference when using queue limits blk-mq: rename blk_mq_can_use_cached_rq block: print symbolic error name instead of error code blk-mq: fix IO hang from sbitmap wakeup race nvmet-rdma: avoid circular locking dependency on install_queue() nvmet-tcp: avoid circular locking dependency on install_queue() nvme-pci: set doorbell config before unquiescing block: fix partial zone append completion handling in req_bio_endio() block/iocost: silence warning on 'last_period' potentially being unused md/raid1: Use blk_opf_t for read and write operations ... commit e9a5a78d1ad8ceb4e3df6d6ad93360094c84ac40 Merge: 6f3625006b157 b4bc35cf8704d Author: Linus Torvalds Date: Thu Jan 18 18:17:57 2024 -0800 Merge tag 'for-6.8/io_uring-2024-01-18' of git://git.kernel.dk/linux Pull io_uring fixes from Jens Axboe: "Nothing major in here, just a few fixes and cleanups that arrived after the initial merge window pull request got finalized, as well as a fix for a patch that got merged earlier" * tag 'for-6.8/io_uring-2024-01-18' of git://git.kernel.dk/linux: io_uring: combine cq_wait_nr checks io_uring: clean *local_work_add var naming io_uring: clean up local tw add-wait sync io_uring: adjust defer tw counting io_uring/register: guard compat syscall with CONFIG_COMPAT io_uring/rsrc: improve code generation for fixed file assignment io_uring/rw: cleanup io_rw_done() commit 6f3625006b157c5a460970ca4d651b100bfa67bf Merge: b5f66ba2d0718 2b872b0f466d2 Author: Linus Torvalds Date: Thu Jan 18 18:12:26 2024 -0800 Merge tag 'erofs-for-6.8-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: - Fix a "BUG: kernel NULL pointer dereference" issue due to inconsistent on-disk indices of compressed inodes against per-sb `available_compr_algs` generated by Syzkaller - Don't use certain unnecessary folio_*() helpers if the folio type (page cache) is known * tag 'erofs-for-6.8-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: Don't use certain unnecessary folio_*() functions erofs: fix inconsistent per-file compression format commit b5f66ba2d07180706ffa10df07f202335df190f1 Merge: 2a668d217676c 6185d32170b68 Author: Linus Torvalds Date: Thu Jan 18 17:57:07 2024 -0800 Merge tag 'kbuild-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Make Kconfig parse the input .config more precisely - Support W=c and W=e options for Kconfig - Set Kconfig int/hex symbols to zero if the 'default' property is missing - Add .editorconfig - Add scripts/git.orderFile - Add a script to detect backward-incompatible changes in UAPI headers - Resolve the symlink passed to O= option properly - Use the user-supplied mtime for all files in the builtin initramfs, which provides better reproducible builds - Fix the direct execution of debian/rules for Debian package builds - Use build ID instead of the .gnu_debuglink section for the Debian dbg package * tag 'kbuild-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (53 commits) kbuild: deb-pkg: use debian/ for tmpdir kbuild: deb-pkg: move 'make headers' to build-arch kbuild: deb-pkg: do not search for 'scripts' directory under arch/ kbuild: deb-pkg: use build ID instead of debug link for dbg package kbuild: deb-pkg: use more debhelper commands in builddeb kbuild: deb-pkg: remove unneeded '-f $srctree/Makefile' in debian/rules kbuild: deb-pkg: allow to run debian/rules from output directory kbuild: deb-pkg: set DEB_* variables if debian/rules is directly executed kbuild: deb-pkg: squash scripts/package/deb-build-option to debian/rules kbuild: deb-pkg: factor out common Make options in debian/rules kbuild: deb-pkg: hard-code Build-Depends kbuild: deb-pkg: split debian/copyright from the mkdebian script gen_init_cpio: Apply mtime supplied by user to all file types kbuild: resolve symlinks for O= properly docs: dev-tools: Add UAPI checker documentation check-uapi: Introduce check-uapi.sh scripts: Introduce a default git.orderFile kconfig: WERROR unmet symbol dependency Add .editorconfig file for basic formatting kconfig: Use KCONFIG_CONFIG instead of .config ... commit 2a668d217676c642bec02ee3b5b73a623f194f7a Merge: 736b5545d39ca 4f41d30cd6dc8 Author: Linus Torvalds Date: Thu Jan 18 17:53:22 2024 -0800 Merge tag 'kgdb-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb update from Daniel Thompson: "The entire changeset for kgdb this cycle is a single two-line change to remove some deadcode that, had it not been dead, would have called strncpy() in an unsafe manner. To be fair there were other modest clean ups were discussed this cycle but they are not finalized and will have to wait until next time" * tag 'kgdb-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kdb: Fix a potential buffer overflow in kdb_local() commit 736b5545d39ca59d4332a60e56cc8a1a5e264a8e Merge: ed8d84530ab0a 925781a471d81 Author: Linus Torvalds Date: Thu Jan 18 17:33:50 2024 -0800 Merge tag 'net-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Including fixes from bpf and netfilter. Previous releases - regressions: - Revert "net: rtnetlink: Enslave device before bringing it up", breaks the case inverse to the one it was trying to fix - net: dsa: fix oob access in DSA's netdevice event handler dereference netdev_priv() before check its a DSA port - sched: track device in tcf_block_get/put_ext() only for clsact binder types - net: tls, fix WARNING in __sk_msg_free when record becomes full during splice and MORE hint set - sfp-bus: fix SFP mode detect from bitrate - drv: stmmac: prevent DSA tags from breaking COE Previous releases - always broken: - bpf: fix no forward progress in in bpf_iter_udp if output buffer is too small - bpf: reject variable offset alu on registers with a type of PTR_TO_FLOW_KEYS to prevent oob access - netfilter: tighten input validation - net: add more sanity check in virtio_net_hdr_to_skb() - rxrpc: fix use of Don't Fragment flag on RESPONSE packets, avoid infinite loop - amt: do not use the portion of skb->cb area which may get clobbered - mptcp: improve validation of the MPTCPOPT_MP_JOIN MCTCP option Misc: - spring cleanup of inactive maintainers" * tag 'net-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (88 commits) i40e: Include types.h to some headers ipv6: mcast: fix data-race in ipv6_mc_down / mld_ifc_work selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes selftests: mlxsw: qos_pfc: Remove wrong description mlxsw: spectrum_router: Register netdevice notifier before nexthop mlxsw: spectrum_acl_tcam: Fix stack corruption mlxsw: spectrum_acl_tcam: Fix NULL pointer dereference in error path mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure ethtool: netlink: Add missing ethnl_ops_begin/complete selftests: bonding: Add more missing config options selftests: netdevsim: add a config file libbpf: warn on unexpected __arg_ctx type when rewriting BTF selftests/bpf: add tests confirming type logic in kernel for __arg_ctx bpf: enforce types for __arg_ctx-tagged arguments in global subprogs bpf: extract bpf_ctx_convert_map logic and make it more reusable libbpf: feature-detect arg:ctx tag support in kernel ipvs: avoid stat macros calls from preemptible context netfilter: nf_tables: reject NFT_SET_CONCAT with not field length description netfilter: nf_tables: skip dead set elements in netlink dump netfilter: nf_tables: do not allow mismatch field size and set key length ... commit ed8d84530ab0a3b7b370e8b28f12179314dcfcc3 Merge: 378de6df19800 4503538d3066f Author: Linus Torvalds Date: Thu Jan 18 17:29:01 2024 -0800 Merge tag 'i2c-for-6.8-rc1-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "This removes the currently unused CLASS_DDC support (controllers set the flag, but there is no client to use it). Also, CLASS_SPD support gets simplified to prepare removal in the future. Class based instantiation is not recommended these days anyhow. Furthermore, I2C core now creates a debugfs directory per I2C adapter. Current bus driver users were converted to use it. Finally, quite some driver updates. Standing out are patches for the wmt-driver which is refactored to support more variants. This is the rebased pull request where a large series for the designware driver was dropped" * tag 'i2c-for-6.8-rc1-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits) MAINTAINERS: use proper email for my I2C work i2c: stm32f7: add support for stm32mp25 soc i2c: stm32f7: perform I2C_ISR read once at beginning of event isr dt-bindings: i2c: document st,stm32mp25-i2c compatible i2c: stm32f7: simplify status messages in case of errors i2c: stm32f7: perform most of irq job in threaded handler i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq i2c: i801: Add lis3lv02d for Dell XPS 15 7590 i2c: i801: Add lis3lv02d for Dell Precision 3540 i2c: wmt: Reduce redundant: REG_CR setting i2c: wmt: Reduce redundant: function parameter i2c: wmt: Reduce redundant: clock mode setting i2c: wmt: Reduce redundant: wait event complete i2c: wmt: Reduce redundant: bus busy check i2c: mux: reg: Remove class-based device auto-detection support i2c: make i2c_bus_type const dt-bindings: at24: add ROHM BR24G04 eeprom: at24: use of_match_ptr() i2c: cpm: Remove linux,i2c-index conversion from be32 i2c: imx: Make SDA actually optional for bus recovering ... commit 378de6df19800dc2c18c355c8c2c5528f98e879a Merge: 0f289bdd4102f 14688f1a91e1f Author: Linus Torvalds Date: Thu Jan 18 17:25:39 2024 -0800 Merge tag 'rtc-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "There are three new drivers this cycle. Also the cmos driver is getting fixes for longstanding wakeup issues on AMD. New drivers: - Analog Devices MAX31335 - Nuvoton ma35d1 - Texas Instrument TPS6594 PMIC RTC Drivers: - cmos: use ACPI alarm instead of HPET on recent AMD platforms - nuvoton: add NCT3015Y-R and NCT3018Y-R support - rv8803: proper suspend/resume and wakeup-source support" * tag 'rtc-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (26 commits) rtc: nuvoton: Compatible with NCT3015Y-R and NCT3018Y-R rtc: da9063: Use dev_err_probe() rtc: da9063: Use device_get_match_data() rtc: da9063: Make IRQ as optional rtc: max31335: Fix comparison in max31335_volatile_reg() rtc: max31335: use regmap_update_bits_check rtc: max31335: remove unecessary locking rtc: max31335: add driver support dt-bindings: rtc: max31335: add max31335 bindings rtc: rv8803: add wakeup-source support rtc: ac100: remove misuses of kernel-doc rtc: class: Remove usage of the deprecated ida_simple_xx() API rtc: MAINTAINERS: drop Alessandro Zummo rtc: ma35d1: remove hardcoded UIE support dt-bindings: rtc: qcom-pm8xxx: fix inconsistent example rtc: rv8803: Add power management support rtc: ds3232: avoid unused-const-variable warning rtc: lpc24xx: add missing dependency rtc: tps6594: Add driver for TPS6594 RTC rtc: Add driver for Nuvoton ma35d1 rtc controller ... commit 0f289bdd4102fc870c8b97652c57d41952040d70 Merge: 33a9caa49938e 58f65f9db7e0d Author: Linus Torvalds Date: Thu Jan 18 17:21:35 2024 -0800 Merge tag 'input-for-v6.8-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a new driver for Adafruit Seesaw gamepad device - Zforce touchscreen will handle standard device properties for axis swap/inversion - handling of advanced sensitivity settings in Microchip CAP11xx capacitive sensor driver - more drivers have been converted to use newer gpiod API - support for dedicated wakeup IRQs in gpio-keys dirver - support for slider gestures and OTP variants in iqs269a driver - atkbd will report keyboard version as 0xab83 in cases when GET ID command was skipped (to deal with problematic firmware on newer laptops), restoring the previous behavior - other assorted cleanups and changes * tag 'input-for-v6.8-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (44 commits) Input: atkbd - use ab83 as id when skipping the getid command Input: driver for Adafruit Seesaw Gamepad dt-bindings: input: bindings for Adafruit Seesaw Gamepad Input: da9063_onkey - avoid explicitly setting input's parent Input: da9063_onkey - avoid using OF-specific APIs Input: iqs269a - add support for OTP variants dt-bindings: input: iqs269a: Add bindings for OTP variants Input: iqs269a - add support for slider gestures dt-bindings: input: iqs269a: Add bindings for slider gestures Input: gpio-keys - filter gpio_keys -EPROBE_DEFER error messages Input: zforce_ts - accept standard touchscreen properties dt-bindings: touchscreen: neonode,zforce: Use standard properties dt-bindings: touchscreen: convert neonode,zforce to json-schema dt-bindings: input: convert drv266x to json-schema Input: da9063 - use dev_err_probe() Input: da9063 - drop redundant prints in probe() Input: da9063 - simplify obtaining OF match data Input: as5011 - convert to GPIO descriptor Input: omap-keypad - drop optional GPIO support Input: tca6416-keypad - drop unused include ... commit 33a9caa49938eff19a3cc5ffab195649d702540b Merge: 4d5d604cc48a7 2029e71482fcd Author: Linus Torvalds Date: Thu Jan 18 17:11:43 2024 -0800 Merge tag 'phy-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy Pull phy updates from Vinod Koul: "New Support: - Qualcomm SM8650 UFS, PCIe and USB/DP Combo PHY, eUSB2 PHY, SDX75 USB3, X1E80100 USB3 support - Mediatek MT8195 support - Rockchip RK3128 usb2 support - TI SGMII mode for J784S4 Updates: - Qualcomm v7 register offsets updates - Mediatek tphy support for force phy mode switch" * tag 'phy-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (34 commits) phy: ti: j721e-wiz: Add SGMII support in WIZ driver for J784S4 phy: ti: gmii-sel: Enable SGMII mode for J784S4 phy: qcom-qmp-usb: Add Qualcomm X1E80100 USB3 PHY support dt-bindings: phy: qcom,sc8280xp-qmp-usb3-uni: Add X1E80100 USB PHY binding phy: qcom-qmp-combo: Add x1e80100 USB/DP combo phys dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document X1E80100 compatible dt-bindings: phy: qcom: snps-eusb2: Document the X1E80100 compatible phy: mediatek: tphy: add support force phy mode switch dt-bindings: phy: mediatek: tphy: add a property for force-mode switch phy: phy-can-transceiver: insert space after include phy: qualcomm: phy-qcom-qmp-ufs: Rectify SM8550 UFS HS-G4 PHY Settings dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: fix path to header phy: renesas: phy-rcar-gen2: use select for GENERIC_PHY phy: qcom-qmp: qserdes-txrx: Add v7 register offsets phy: qcom-qmp: qserdes-txrx: Add V6 N4 register offsets phy: qcom-qmp: qserdes-com: Add v7 register offsets phy: qcom-qmp: pcs-usb: Add v7 register offsets phy: qcom-qmp: pcs: Add v7 register offsets phy: qcom-qmp: qserdes-txrx: Add some more v6.20 register offsets phy: qcom-qmp: qserdes-com: Add some more v6 register offsets ... commit 4d5d604cc48a7babeb30e97aeb443679415573af Merge: 3455135839741 becfce5233a78 Author: Linus Torvalds Date: Thu Jan 18 17:08:31 2024 -0800 Merge tag 'soundwire-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire Pull soundwire updates from Vinod Koul: - Core: add concept of controller_id to deal with clear Controller / Manager hierarchy - bunch of qcom driver refactoring for qcom_swrm_stream_alloc_ports(), qcom_swrm_stream_alloc_ports() and setting controller id to hw master id * tag 'soundwire-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: amd: drop bus freq calculation and set 'max_clk_freq' soundwire: generic_bandwidth_allocation use bus->params.max_dr_freq soundwire: qcom: set controller id to hw master id soundwire: fix initializing sysfs for same devices on different buses soundwire: bus: introduce controller_id soundwire: stream: constify sdw_port_config when adding devices soundwire: qcom: move sconfig in qcom_swrm_stream_alloc_ports() out of critical section soundwire: qcom: drop unneeded qcom_swrm_stream_alloc_ports() cleanup commit 345513583974110107300824375a91ff602d72ba Merge: 5c93506983626 efb8235bfdbe6 Author: Linus Torvalds Date: Thu Jan 18 17:03:51 2024 -0800 Merge tag 'gpio-fixes-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: "Apart from some regular driver fixes there's a relatively big revert of the locking changes that were introduced to GPIOLIB in this merge window. This is because it turned out that some legacy GPIO interfaces - that need to translate a number from the global GPIO numberspace to the address of the relevant descriptor, thus running a GPIO device lookup and taking the GPIO device list lock - are still used in old code from atomic context resulting in "scheduling while atomic" errors. I'll try to make the read-only part of the list access entirely lockless using SRCU but this will take some time so let's go back to the old global spinlock for now. Summary: - revert the changes aiming to use a read-write semaphore to protect the list of GPIO devices due to calls to legacy API taking that lock from atomic context in old code - fix inverted logic in DEFINE_FREE() for GPIO device references - check the return value of bgpio_init() in gpio-mlxbf3 - fix node address in the DT bindings example for gpio-xilinx - fix signedness bug in gpio-rtd - fix kernel-doc warnings in gpio-en7523" * tag 'gpio-fixes-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: revert the attempt to protect the GPIO device list with an rwsem gpio: EN7523: fix kernel-doc warnings gpiolib: Fix scope-based gpio_device refcounting gpio: mlxbf3: add an error code check in mlxbf3_gpio_probe dt-bindings: gpio: xilinx: Fix node address in gpio gpio: rtd: Fix signedness bug in probe commit 5c93506983626419fb8719a7301b53faea1e0bb3 Merge: 21c91bb936771 9320fc509b87b Author: Linus Torvalds Date: Thu Jan 18 16:58:21 2024 -0800 Merge tag 'pwm/for-6.8-2' of gitolite.kernel.org:pub/scm/linux/kernel/git/ukleinek/linux Pull pwm fixes from Uwe Kleine-König: - fix a duplicate cleanup in an error path introduced in this merge window - fix an out-of-bounds access In practise it doesn't happen - otherwise someone would have noticed since v5.17-rc1 I guess - because the device tree binding for the two drivers using of_pwm_single_xlate() only have args->args_count == 1. A device-tree that doesn't conform to the respective bindings could trigger that easily however. - correct the request callback of the jz4740 pwm driver which used dev_err_probe() long after .probe() completed. This is conceptually wrong because dev_err_probe() might call device_set_deferred_probe_reason() which is nonsensical after the driver is bound. * tag 'pwm/for-6.8-2' of gitolite.kernel.org:pub/scm/linux/kernel/git/ukleinek/linux: pwm: jz4740: Don't use dev_err_probe() in .request() pwm: Fix out-of-bounds access in of_pwm_single_xlate() pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put() commit 21c91bb9367716f61f46a352aafdeda61cb91c73 Merge: 17e232b6d2fed 7d84a63a39b78 Author: Linus Torvalds Date: Thu Jan 18 16:53:35 2024 -0800 Merge tag 'backlight-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "New Drivers: - Add support for Monolithic Power Systems MP3309C WLED Step-up Converter Fix-ups: - Use/convert to new/better APIs/helpers/MACROs instead of hand-rolling implementations - Device Tree Binding updates - Demote non-kerneldoc header comments - Improve error handling; return proper error values, simplify, avoid duplicates, etc - Convert over to the new (kinda) GPIOD API Bug Fixes: - Fix uninitialised local variable" * tag 'backlight-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: hx8357: Convert to agnostic GPIO API backlight: ili922x: Add an error code check in ili922x_write() backlight: ili922x: Drop kernel-doc for local macros backlight: mp3309c: Fix uninitialized local variable backlight: pwm_bl: Use dev_err_probe backlight: mp3309c: Add support for MPS MP3309C dt-bindings: backlight: mp3309c: Remove two required properties commit 17e232b6d2feddd0285e59dbe641c0efe67a5ee6 Merge: 77c9622d87d21 7c65aa3cc072c Author: Linus Torvalds Date: Thu Jan 18 16:49:34 2024 -0800 Merge tag 'dma-mapping-6.8-2024-01-18' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: - fix kerneldoc warnings (Randy Dunlap) - better bounds checking in swiotlb (ZhangPeng) * tag 'dma-mapping-6.8-2024-01-18' of git://git.infradead.org/users/hch/dma-mapping: dma-debug: fix kernel-doc warnings swiotlb: check alloc_size before the allocation of a new memory pool commit 77c9622d87d21d989eb1a866e4df8eb5e3ce00e0 Merge: 0b7359ccddaaa 2159bd4e90570 Author: Linus Torvalds Date: Thu Jan 18 16:46:18 2024 -0800 Merge tag 'memblock-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock update from Mike Rapoport: "Code readability improvement. Use NUMA_NO_NODE instead of -1 as return value of memblock_search_pfn_nid() to improve code readability and consistency with the callers of that function" * tag 'memblock-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock: Return NUMA_NO_NODE instead of -1 to improve code readability commit 0b7359ccddaaa844044c62000734f0cb92ab6310 Merge: da3c45c721e28 f16d65124380a Author: Linus Torvalds Date: Thu Jan 18 16:44:03 2024 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: - vdpa/mlx5: support for resumable vqs - virtio_scsi: mq_poll support - 3virtio_pmem: support SHMEM_REGION - virtio_balloon: stay awake while adjusting balloon - virtio: support for no-reset virtio PCI PM - Fixes, cleanups * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vdpa/mlx5: Add mkey leak detection vdpa/mlx5: Introduce reference counting to mrs vdpa/mlx5: Use vq suspend/resume during .set_map vdpa/mlx5: Mark vq state for modification in hw vq vdpa/mlx5: Mark vq addrs for modification in hw vq vdpa/mlx5: Introduce per vq and device resume vdpa/mlx5: Allow modifying multiple vq fields in one modify command vdpa/mlx5: Expose resumable vq capability vdpa: Block vq property changes in DRIVER_OK vdpa: Track device suspended state scsi: virtio_scsi: Add mq_poll support virtio_pmem: support feature SHMEM_REGION virtio_balloon: stay awake while adjusting balloon vdpa: Remove usage of the deprecated ida_simple_xx() API virtio: Add support for no-reset virtio PCI PM virtio_net: fix missing dma unmap for resize vhost-vdpa: account iommu allocations vdpa: Fix an error handling path in eni_vdpa_probe() commit da3c45c721e2807b2effdea8f41ece96bbf47b15 Merge: db5ccb9eb2318 2539b15d504c3 Author: Linus Torvalds Date: Thu Jan 18 16:42:18 2024 -0800 Merge tag 'hwmon-for-v6.8-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmonfix from Guenter Roeck: "Fix crash seen when instantiating npcm750-pwm-fan" * tag 'hwmon-for-v6.8-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (npcm750-pwm-fan) Fix crash observed when instantiating nuvoton,npcm750-pwm-fan commit db5ccb9eb23189e99e244a4915dd31eedd8d428b Merge: 244aefb1c64ad 73bf93edeeea8 Author: Linus Torvalds Date: Thu Jan 18 16:22:43 2024 -0800 Merge tag 'cxl-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull CXL (Compute Express Link) updates from Dan Williams: "The bulk of this update is support for enumerating the performance capabilities of CXL memory targets and connecting that to a platform CXL memory QoS class. Some follow-on work remains to hook up this data into core-mm policy, but that is saved for v6.9. The next significant update is unifying how CXL event records (things like background scrub errors) are processed between so called "firmware first" and native error record retrieval. The CXL driver handler that processes the record retrieved from the device mailbox is now the handler for that same record format coming from an EFI/ACPI notification source. This also contains miscellaneous feature updates, like Get Timestamp, and other fixups. Summary: - Add support for parsing the Coherent Device Attribute Table (CDAT) - Add support for calculating a platform CXL QoS class from CDAT data - Unify the tracing of EFI CXL Events with native CXL Events. - Add Get Timestamp support - Miscellaneous cleanups and fixups" * tag 'cxl-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (41 commits) cxl/core: use sysfs_emit() for attr's _show() cxl/pci: Register for and process CPER events PCI: Introduce cleanup helpers for device reference counts and locks acpi/ghes: Process CXL Component Events cxl/events: Create a CXL event union cxl/events: Separate UUID from event structures cxl/events: Remove passing a UUID to known event traces cxl/events: Create common event UUID defines cxl/events: Promote CXL event structures to a core header cxl: Refactor to use __free() for cxl_root allocation in cxl_endpoint_port_probe() cxl: Refactor to use __free() for cxl_root allocation in cxl_find_nvdimm_bridge() cxl: Fix device reference leak in cxl_port_perf_data_calculate() cxl: Convert find_cxl_root() to return a 'struct cxl_root *' cxl: Introduce put_cxl_root() helper cxl/port: Fix missing target list lock cxl/port: Fix decoder initialization when nr_targets > interleave_ways cxl/region: fix x9 interleave typo cxl/trace: Pass UUID explicitly to event traces cxl/region: use %pap format to print resource_size_t cxl/region: Add dev_dbg() detail on failure to allocate HPA space ... commit 0a1123c7b9f17fb06cc51fb9ce2f880a512be408 Merge: 205e18c13545a aa0901a9008ee Author: Dave Airlie Date: Fri Jan 19 10:21:26 2024 +1000 Merge tag 'amd-drm-fixes-6.8-2024-01-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-6.8-2024-01-18: amdgpu: - DSC fixes - DC resource pool fixes - OTG fix - DML2 fixes - Aux fix - GFX10 RLC firmware handling fix - Revert a broken workaround for SMU 13.0.2 - DC writeback fix - Enable gfxoff when ROCm apps are active on gfx11 with the proper FW version amdkfd: - Fix dma-buf exports using GEM handles Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240118223127.4904-1-alexander.deucher@amd.com commit 17d49b7e47a1001c8796f05f4a2bbdef0a998213 Author: Nathan Chancellor Date: Wed Jan 3 09:57:07 2024 -0700 power: supply: bq24190_charger: Fix "initializer element is not constant" error When building with a version of GCC prior to 8.x, there is an error around non-constant initializer elements: drivers/power/supply/bq24190_charger.c:1978:16: error: initializer element is not constant .vbus_desc = bq24190_vbus_desc, ^~~~~~~~~~~~~~~~~ drivers/power/supply/bq24190_charger.c:1978:16: note: (near initialization for 'bq24190_chip_info_tbl[0].vbus_desc') drivers/power/supply/bq24190_charger.c:1989:16: error: initializer element is not constant .vbus_desc = bq24190_vbus_desc, ^~~~~~~~~~~~~~~~~ drivers/power/supply/bq24190_charger.c:1989:16: note: (near initialization for 'bq24190_chip_info_tbl[1].vbus_desc') drivers/power/supply/bq24190_charger.c:2000:16: error: initializer element is not constant .vbus_desc = bq24190_vbus_desc, ^~~~~~~~~~~~~~~~~ drivers/power/supply/bq24190_charger.c:2000:16: note: (near initialization for 'bq24190_chip_info_tbl[2].vbus_desc') drivers/power/supply/bq24190_charger.c:2011:16: error: initializer element is not constant .vbus_desc = bq24190_vbus_desc, ^~~~~~~~~~~~~~~~~ drivers/power/supply/bq24190_charger.c:2011:16: note: (near initialization for 'bq24190_chip_info_tbl[3].vbus_desc') drivers/power/supply/bq24190_charger.c:2022:16: error: initializer element is not constant .vbus_desc = bq24296_vbus_desc, ^~~~~~~~~~~~~~~~~ drivers/power/supply/bq24190_charger.c:2022:16: note: (near initialization for 'bq24190_chip_info_tbl[4].vbus_desc') Clang versions prior to 17.x show a similar error: drivers/power/supply/bq24190_charger.c:1978:16: error: initializer element is not a compile-time constant .vbus_desc = bq24190_vbus_desc, ^~~~~~~~~~~~~~~~~ 1 error generated. Newer compilers have decided to accept these structures as compile time constants as an extension. To resolve this issue for all supported compilers, change the vbus_desc member in 'struct bq24190_chip_info' to a pointer, as it is only ever passed by reference anyways, and adjust the assignments accordingly. Closes: https://github.com/ClangBuiltLinux/linux/issues/1973 Fixes: b150a703b56f ("power: supply: bq24190_charger: Add support for BQ24296") Signed-off-by: Nathan Chancellor Reviewed-by: Justin Stitt Link: https://lore.kernel.org/r/20240103-fix-bq24190_charger-vbus_desc-non-const-v1-1-115ddf798c70@kernel.org Signed-off-by: Sebastian Reichel commit 244aefb1c64ad562b48929e6d85e07bc79e331d6 Merge: 86c4d58a99ab1 78f70c02bdbcc Author: Linus Torvalds Date: Thu Jan 18 15:57:25 2024 -0800 Merge tag 'vfio-v6.8-rc1' of https://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Add debugfs support, initially used for reporting device migration state (Longfang Liu) - Fixes and support for migration dirty tracking across multiple IOVA regions in the pds-vfio-pci driver (Brett Creeley) - Improved IOMMU allocation accounting visibility (Pasha Tatashin) - Virtio infrastructure and a new virtio-vfio-pci variant driver, which provides emulation of a legacy virtio interfaces on modern virtio hardware for virtio-net VF devices where the PF driver exposes support for legacy admin queues, ie. an emulated IO BAR on an SR-IOV VF to provide driver ABI compatibility to legacy devices (Yishai Hadas & Feng Liu) - Migration fixes for the hisi-acc-vfio-pci variant driver (Shameer Kolothum) - Kconfig dependency fix for new virtio-vfio-pci variant driver (Arnd Bergmann) * tag 'vfio-v6.8-rc1' of https://github.com/awilliam/linux-vfio: (22 commits) vfio/virtio: fix virtio-pci dependency hisi_acc_vfio_pci: Update migration data pointer correctly on saving/resume vfio/virtio: Declare virtiovf_pci_aer_reset_done() static vfio/virtio: Introduce a vfio driver over virtio devices vfio/pci: Expose vfio_pci_core_iowrite/read##size() vfio/pci: Expose vfio_pci_core_setup_barmap() virtio-pci: Introduce APIs to execute legacy IO admin commands virtio-pci: Initialize the supported admin commands virtio-pci: Introduce admin commands virtio-pci: Introduce admin command sending function virtio-pci: Introduce admin virtqueue virtio: Define feature bit for administration virtqueue vfio/type1: account iommu allocations vfio/pds: Add multi-region support vfio/pds: Move seq/ack bitmaps into region struct vfio/pds: Pass region info to relevant functions vfio/pds: Move and rename region specific info vfio/pds: Only use a single SGL for both seq and ack vfio/pds: Fix calculations in pds_vfio_dirty_sync MAINTAINERS: Add vfio debugfs interface doc link ... commit 86c4d58a99ab1ccfa03860d4dead157be51eb2b6 Merge: 0dde2bf67bcf3 47f2bd2ff382e Author: Linus Torvalds Date: Thu Jan 18 15:28:15 2024 -0800 Merge tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd Pull iommufd updates from Jason Gunthorpe: "This brings the first of three planned user IO page table invalidation operations: - IOMMU_HWPT_INVALIDATE allows invalidating the IOTLB integrated into the iommu itself. The Intel implementation will also generate an ATC invalidation to flush the device IOTLB as it unambiguously knows the device, but other HW will not. It goes along with the prior PR to implement userspace IO page tables (aka nested translation for VMs) to allow Intel to have full functionality for simple cases. An Intel implementation of the operation is provided. Also fix a small bug in the selftest mock iommu driver probe" * tag 'for-linus-iommufd' of git://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd: iommufd/selftest: Check the bus type during probe iommu/vt-d: Add iotlb flush for nested domain iommufd: Add data structure for Intel VT-d stage-1 cache invalidation iommufd/selftest: Add coverage for IOMMU_HWPT_INVALIDATE ioctl iommufd/selftest: Add IOMMU_TEST_OP_MD_CHECK_IOTLB test op iommufd/selftest: Add mock_domain_cache_invalidate_user support iommu: Add iommu_copy_struct_from_user_array helper iommufd: Add IOMMU_HWPT_INVALIDATE iommu: Add cache_invalidate_user op commit 0dde2bf67bcf37f54c829c6c42fa8c4fca78a224 Merge: e7ded27593bf0 75f74f85a42eb Author: Linus Torvalds Date: Thu Jan 18 15:16:57 2024 -0800 Merge tag 'iommu-updates-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: "Core changes: - Fix race conditions in device probe path - Retire IOMMU bus_ops - Support for passing custom allocators to page table drivers - Clean up Kconfig around IOMMU_SVA - Support for sharing SVA domains with all devices bound to a mm - Firmware data parsing cleanup - Tracing improvements for iommu-dma code - Some smaller fixes and cleanups ARM-SMMU drivers: - Device-tree binding updates: - Add additional compatible strings for Qualcomm SoCs - Document Adreno clocks for Qualcomm's SM8350 SoC - SMMUv2: - Implement support for the ->domain_alloc_paging() callback - Ensure Secure context is restored following suspend of Qualcomm SMMU implementation - SMMUv3: - Disable stalling mode for the "quiet" context descriptor - Minor refactoring and driver cleanups Intel VT-d driver: - Cleanup and refactoring AMD IOMMU driver: - Improve IO TLB invalidation logic - Small cleanups and improvements Rockchip IOMMU driver: - DT binding update to add Rockchip RK3588 Apple DART driver: - Apple M1 USB4/Thunderbolt DART support - Cleanups Virtio IOMMU driver: - Add support for iotlb_sync_map - Enable deferred IO TLB flushes" * tag 'iommu-updates-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (66 commits) iommu: Don't reserve 0-length IOVA region iommu/vt-d: Move inline helpers to header files iommu/vt-d: Remove unused vcmd interfaces iommu/vt-d: Remove unused parameter of intel_pasid_setup_pass_through() iommu/vt-d: Refactor device_to_iommu() to retrieve iommu directly iommu/sva: Fix memory leak in iommu_sva_bind_device() dt-bindings: iommu: rockchip: Add Rockchip RK3588 iommu/dma: Trace bounce buffer usage when mapping buffers iommu/arm-smmu: Convert to domain_alloc_paging() iommu/arm-smmu: Pass arm_smmu_domain to internal functions iommu/arm-smmu: Implement IOMMU_DOMAIN_BLOCKED iommu/arm-smmu: Convert to a global static identity domain iommu/arm-smmu: Reorganize arm_smmu_domain_add_master() iommu/arm-smmu-v3: Remove ARM_SMMU_DOMAIN_NESTED iommu/arm-smmu-v3: Master cannot be NULL in arm_smmu_write_strtab_ent() iommu/arm-smmu-v3: Add a type for the STE iommu/arm-smmu-v3: disable stall for quiet_cd iommu/qcom: restore IOMMU state if needed iommu/arm-smmu-qcom: Add QCM2290 MDSS compatible iommu/arm-smmu-qcom: Add missing GMU entry to match table ... commit e7ded27593bf0aff08d18258251e3de0a2697f47 Merge: 24f3a63e1fc36 6b9f29b81b155 Author: Linus Torvalds Date: Thu Jan 18 15:01:28 2024 -0800 Merge tag 'percpu-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu updates from Dennis Zhou: "Enable percpu page allocator for RISC-V. There are RISC-V configurations with sparse NUMA configurations and small vmalloc space causing dynamic percpu allocations to fail as the backing chunk stride is too far apart" * tag 'percpu-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: riscv: Enable pcpu page first chunk allocator mm: Introduce flush_cache_vmap_early() commit 24f3a63e1fc36d5d240c1b3973c75618c20cf458 Merge: a2ded784cd7fd 7a8e9cdf94058 Author: Linus Torvalds Date: Thu Jan 18 14:45:33 2024 -0800 Merge tag 'eventfs-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull eventfs updates from Steven Rostedt: - Remove "lookup" parameter of create_dir_dentry() and create_file_dentry(). These functions were called by lookup and the readdir logic, where readdir needed it to up the ref count of the dentry but the lookup did not. A "lookup" parameter was passed in to tell it what to do, but this complicated the code. It is better to just always up the ref count and require the caller to decrement it, even for lookup. - Modify the .iterate_shared callback to not use the dcache_readdir() logic and just handle what gets displayed by that one function. This removes the need for eventfs to hijack the file->private_data from the dcache_readdir() "cursor" pointer, and makes the code a bit more sane - Use the root and instance inodes for default ownership. Instead of walking the dentry tree and updating each dentry gid, use the getattr(), setattr() and permission() callbacks to set the ownership and permissions using the root or instance as the default - Some other optimizations with the eventfs iterate_shared logic - Hard-code the inodes for eventfs to the same number for files, and the same number for directories - Have getdent() not create dentries/inodes in iterate_shared() as now it has hard-coded inode numbers - Use kcalloc() instead of kzalloc() on a list of elements - Fix seq_buf warning and make static work properly. * tag 'eventfs-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: seq_buf: Make DECLARE_SEQ_BUF() usable eventfs: Use kcalloc() instead of kzalloc() eventfs: Do not create dentries nor inodes in iterate_shared eventfs: Have the inodes all for files and directories all be the same eventfs: Shortcut eventfs_iterate() by skipping entries already read eventfs: Read ei->entries before ei->children in eventfs_iterate() eventfs: Do ctx->pos update for all iterations in eventfs_iterate() eventfs: Have eventfs_iterate() stop immediately if ei->is_freed is set tracefs/eventfs: Use root and instance inodes as default ownership eventfs: Stop using dcache_readdir() for getdents() eventfs: Remove "lookup" parameter from create_dir/file_dentry() commit 7f2d219e78e95a137a9c76fddac7ff8228260439 Author: Qu Wenruo Date: Wed Jan 17 11:02:26 2024 +1030 btrfs: scrub: limit RST scrub to chunk boundary [BUG] If there is an extent beyond chunk boundary, currently RST scrub would error out. [CAUSE] In scrub_submit_extent_sector_read(), we completely rely on extent_sector_bitmap, which is populated using extent tree. The extent tree can be corrupted that there is an extent item beyond a chunk. In that case, RST scrub would fail and error out. [FIX] Despite the extent_sector_bitmap usage, also limit the read to chunk boundary. Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit f546c4282673497a06ecb6190b50ae7f6c85b02f Author: Qu Wenruo Date: Wed Jan 17 11:02:25 2024 +1030 btrfs: scrub: avoid use-after-free when chunk length is not 64K aligned [BUG] There is a bug report that, on a ext4-converted btrfs, scrub leads to various problems, including: - "unable to find chunk map" errors BTRFS info (device vdb): scrub: started on devid 1 BTRFS critical (device vdb): unable to find chunk map for logical 2214744064 length 4096 BTRFS critical (device vdb): unable to find chunk map for logical 2214744064 length 45056 This would lead to unrepariable errors. - Use-after-free KASAN reports: ================================================================== BUG: KASAN: slab-use-after-free in __blk_rq_map_sg+0x18f/0x7c0 Read of size 8 at addr ffff8881013c9040 by task btrfs/909 CPU: 0 PID: 909 Comm: btrfs Not tainted 6.7.0-x64v3-dbg #11 c50636e9419a8354555555245df535e380563b2b Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 2023.11-2 12/24/2023 Call Trace: dump_stack_lvl+0x43/0x60 print_report+0xcf/0x640 kasan_report+0xa6/0xd0 __blk_rq_map_sg+0x18f/0x7c0 virtblk_prep_rq.isra.0+0x215/0x6a0 [virtio_blk 19a65eeee9ae6fcf02edfad39bb9ddee07dcdaff] virtio_queue_rqs+0xc4/0x310 [virtio_blk 19a65eeee9ae6fcf02edfad39bb9ddee07dcdaff] blk_mq_flush_plug_list.part.0+0x780/0x860 __blk_flush_plug+0x1ba/0x220 blk_finish_plug+0x3b/0x60 submit_initial_group_read+0x10a/0x290 [btrfs e57987a360bed82fe8756dcd3e0de5406ccfe965] flush_scrub_stripes+0x38e/0x430 [btrfs e57987a360bed82fe8756dcd3e0de5406ccfe965] scrub_stripe+0x82a/0xae0 [btrfs e57987a360bed82fe8756dcd3e0de5406ccfe965] scrub_chunk+0x178/0x200 [btrfs e57987a360bed82fe8756dcd3e0de5406ccfe965] scrub_enumerate_chunks+0x4bc/0xa30 [btrfs e57987a360bed82fe8756dcd3e0de5406ccfe965] btrfs_scrub_dev+0x398/0x810 [btrfs e57987a360bed82fe8756dcd3e0de5406ccfe965] btrfs_ioctl+0x4b9/0x3020 [btrfs e57987a360bed82fe8756dcd3e0de5406ccfe965] __x64_sys_ioctl+0xbd/0x100 do_syscall_64+0x5d/0xe0 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f47e5e0952b - Crash, mostly due to above use-after-free [CAUSE] The converted fs has the following data chunk layout: item 2 key (FIRST_CHUNK_TREE CHUNK_ITEM 2214658048) itemoff 16025 itemsize 80 length 86016 owner 2 stripe_len 65536 type DATA|single For above logical bytenr 2214744064, it's at the chunk end (2214658048 + 86016 = 2214744064). This means btrfs_submit_bio() would split the bio, and trigger endio function for both of the two halves. However scrub_submit_initial_read() would only expect the endio function to be called once, not any more. This means the first endio function would already free the bbio::bio, leaving the bvec freed, thus the 2nd endio call would lead to use-after-free. [FIX] - Make sure scrub_read_endio() only updates bits in its range Since we may read less than 64K at the end of the chunk, we should not touch the bits beyond chunk boundary. - Make sure scrub_submit_initial_read() only to read the chunk range This is done by calculating the real number of sectors we need to read, and add sector-by-sector to the bio. Thankfully the scrub read repair path won't need extra fixes: - scrub_stripe_submit_repair_read() With above fixes, we won't update error bit for range beyond chunk, thus scrub_stripe_submit_repair_read() should never submit any read beyond the chunk. Reported-by: Rongrong Fixes: e02ee89baa66 ("btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure") Tested-by: Rongrong Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 4525462dd0db9e86bb67c10dedbbaa4f8d62697d Author: Charlie Jenkins Date: Thu Jan 18 14:36:45 2024 -0800 riscv: lib: Check if output in asm goto supported The output field of an asm goto statement is not supported by all compilers. If it is not supported, fallback to the non-optimized code. Signed-off-by: Charlie Jenkins Fixes: a04c192eabfb ("riscv: Add checksum library") Link: https://lore.kernel.org/r/20240118-csum_remove_output_operands_asm_goto-v2-1-5d1b73cf93d4@rivosinc.com Signed-off-by: Palmer Dabbelt commit 1e61b8c672ab2f59b282c8d48a29c14b52c0f5b4 Author: Josef Bacik Date: Wed Jan 10 17:14:21 2024 -0500 btrfs: don't unconditionally call folio_start_writeback in subpage In the normal case we check if a page is under writeback and skip it before we attempt to begin writeback. The exception is subpage metadata writes, where we know we don't have an eb under writeback and we're doing it one eb at a time. Since b5612c368648 ("mm: return void from folio_start_writeback() and related functions") we now will BUG_ON() if we call folio_start_writeback() on a folio that's already under writeback. Previously folio_start_writeback() would bail if writeback was already started. Fix this in the subpage code by checking if we have writeback set and skipping it if we do. This fixes the panic we were seeing on subpage. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2018ef1d9ac3e95448b9206adc3425b0431c2411 Author: Josef Bacik Date: Wed Jan 10 12:54:41 2024 -0500 btrfs: use the original mount's mount options for the legacy reconfigure btrfs/330, which tests our old trick to allow mount -o ro,subvol=/x /dev/sda1 /foo mount -o rw,subvol=/y /dev/sda1 /bar fails on the block group tree. This is because we aren't preserving the mount options for what is essentially a remount, and thus we're ending up without the FREE_SPACE_TREE mount option, which triggers our free space tree delete codepath. This isn't possible with the block group tree and thus it falls over. Fix this by making sure we copy the existing mount options for the existing fs mount over in this case. Fixes: f044b318675f ("btrfs: handle the ro->rw transition for mounting different subvolumes") Reviewed-by: Neal Gompa Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a208b3f132b48e1f94f620024e66fea635925877 Author: David Sterba Date: Mon Jan 15 20:30:26 2024 +0100 btrfs: don't warn if discard range is not aligned to sector There's a warning in btrfs_issue_discard() when the range is not aligned to 512 bytes, originally added in 4d89d377bbb0 ("btrfs: btrfs_issue_discard ensure offset/length are aligned to sector boundaries"). We can't do sub-sector writes anyway so the adjustment is the only thing that we can do and the warning is unnecessary. CC: stable@vger.kernel.org # 4.19+ Reported-by: syzbot+4a4f1eba14eb5c3417d1@syzkaller.appspotmail.com Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: David Sterba commit f398e70dd69e6ceea71463a5380e6118f219197e Author: Chung-Chiang Cheng Date: Fri Jan 12 15:41:05 2024 +0800 btrfs: tree-checker: fix inline ref size in error messages The error message should accurately reflect the size rather than the type. Fixes: f82d1c7ca8ae ("btrfs: tree-checker: Add EXTENT_ITEM and METADATA_ITEM check") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Filipe Manana Reviewed-by: Qu Wenruo Signed-off-by: Chung-Chiang Cheng Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1e7f6def8b2370ecefb54b3c8f390ff894b0c51b Author: Qu Wenruo Date: Mon Jan 8 19:38:46 2024 +1030 btrfs: zstd: fix and simplify the inline extent decompression [BUG] If we have a filesystem with 4k sectorsize, and an inlined compressed extent created like this: item 4 key (257 INODE_ITEM 0) itemoff 15863 itemsize 160 generation 8 transid 8 size 4096 nbytes 4096 block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0 sequence 1 flags 0x0(none) item 5 key (257 INODE_REF 256) itemoff 15839 itemsize 24 index 2 namelen 14 name: source_inlined item 6 key (257 EXTENT_DATA 0) itemoff 15770 itemsize 69 generation 8 type 0 (inline) inline extent data size 48 ram_bytes 4096 compression 3 (zstd) Then trying to reflink that extent in an aarch64 system with 64K page size, the reflink would just fail: # xfs_io -f -c "reflink $mnt/source_inlined 0 60k 4k" $mnt/dest XFS_IOC_CLONE_RANGE: Input/output error [CAUSE] In zstd_decompress(), we didn't treat @start_byte as just a page offset, but also use it as an indicator on whether we should error out, without any proper explanation (this is copied from other decompression code). In reality, for subpage cases, although @start_byte can be non-zero, we should never switch input/output buffer nor error out, since the whole input/output buffer should never exceed one sector, thus we should not need to do any buffer switch. Thus the current code using @start_byte as a condition to switch input/output buffer or finish the decompression is completely incorrect. [FIX] The fix involves several modification: - Rename @start_byte to @dest_pgoff to properly express its meaning - Use @sectorsize other than PAGE_SIZE to properly initialize the output buffer size - Use correct destination offset inside the destination page - Simplify the main loop Since the input/output buffer should never switch, we only need one zstd_decompress_stream() call. - Consider early end as an error After the fix, even on 64K page sized aarch64, above reflink now works as expected: # xfs_io -f -c "reflink $mnt/source_inlined 0 60k 4k" $mnt/dest linked 4096/4096 bytes at offset 61440 And results the correct file layout: item 9 key (258 INODE_ITEM 0) itemoff 15542 itemsize 160 generation 10 transid 10 size 65536 nbytes 4096 block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0 sequence 1 flags 0x0(none) item 10 key (258 INODE_REF 256) itemoff 15528 itemsize 14 index 3 namelen 4 name: dest item 11 key (258 XATTR_ITEM 3817753667) itemoff 15445 itemsize 83 location key (0 UNKNOWN.0 0) type XATTR transid 10 data_len 37 name_len 16 name: security.selinux data unconfined_u:object_r:unlabeled_t:s0 item 12 key (258 EXTENT_DATA 61440) itemoff 15392 itemsize 53 generation 10 type 1 (regular) extent data disk byte 13631488 nr 4096 extent data offset 0 nr 4096 ram 4096 extent compression 0 (none) Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6a69631ec9b1b23784c012a855bbb23012a6dbeb Author: Qu Wenruo Date: Mon Jan 8 19:38:45 2024 +1030 btrfs: lzo: fix and simplify the inline extent decompression [BUG] If we have a filesystem with 4k sectorsize, and an inlined compressed extent created like this: item 4 key (257 INODE_ITEM 0) itemoff 15863 itemsize 160 generation 8 transid 8 size 4096 nbytes 4096 block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0 sequence 1 flags 0x0(none) item 5 key (257 INODE_REF 256) itemoff 15839 itemsize 24 index 2 namelen 14 name: source_inlined item 6 key (257 EXTENT_DATA 0) itemoff 15770 itemsize 69 generation 8 type 0 (inline) inline extent data size 48 ram_bytes 4096 compression 2 (lzo) Then trying to reflink that extent in an aarch64 system with 64K page size, the reflink would just fail: # xfs_io -f -c "reflink $mnt/source_inlined 0 60k 4k" $mnt/dest XFS_IOC_CLONE_RANGE: Input/output error [CAUSE] In zlib_decompress(), we didn't treat @start_byte as just a page offset, but also use it as an indicator on whether we should error out, without any proper explanation (this is from the very beginning of btrfs). In reality, for subpage cases, although @start_byte can be non-zero, we should never switch input/output buffer nor error out, since the whole input/output buffer should never exceed one sector. Note: The above assumption is only not true if we're going to support multi-page sectorsize. Thus the current code using @start_byte as a condition to switch input/output buffer or finish the decompression is completely incorrect. [FIX] The fix involves several modifications: - Rename @start_byte to @dest_pgoff to properly express its meaning - Use @sectorsize other than PAGE_SIZE to properly initialize the output buffer size - Use correct destination offset inside the destination page - Use memcpy_to_page() to copy the contents to the destination page - Use memzero_page() to zero out the tailing part - Consider early end as an error After the fix, even on 64K page sized aarch64, above reflink now works as expected: # xfs_io -f -c "reflink $mnt/source_inlined 0 60k 4k" $mnt/dest linked 4096/4096 bytes at offset 61440 And results the correct file layout: item 9 key (258 INODE_ITEM 0) itemoff 15542 itemsize 160 generation 10 transid 10 size 65536 nbytes 4096 block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0 sequence 1 flags 0x0(none) item 10 key (258 INODE_REF 256) itemoff 15528 itemsize 14 index 3 namelen 4 name: dest item 11 key (258 XATTR_ITEM 3817753667) itemoff 15445 itemsize 83 location key (0 UNKNOWN.0 0) type XATTR transid 10 data_len 37 name_len 16 name: security.selinux data unconfined_u:object_r:unlabeled_t:s0 item 12 key (258 EXTENT_DATA 61440) itemoff 15392 itemsize 53 generation 10 type 1 (regular) extent data disk byte 13631488 nr 4096 extent data offset 0 nr 4096 ram 4096 extent compression 0 (none) Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a2ded784cd7fd83e567829637068cd86aeffbeaf Merge: 5b890ad456b16 25742aeb135c4 Author: Linus Torvalds Date: Thu Jan 18 14:35:29 2024 -0800 Merge tag 'trace-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull tracing updates from Steven Rostedt: - Allow kernel trace instance creation to specify what events are created Inside the kernel, a subsystem may create a tracing instance that it can use to send events to user space. This sub-system may not care about the thousands of events that exist in eventfs. Allow the sub-system to specify what sub-systems of events it cares about, and only those events are exposed to this instance. - Allow the ring buffer to be broken up into bigger sub-buffers than just the architecture page size. A new tracefs file called "buffer_subbuf_size_kb" is created. The user can now specify a minimum size the sub-buffer may be in kilobytes. Note, that the implementation currently make the sub-buffer size a power of 2 pages (1, 2, 4, 8, 16, ...) but the user only writes in kilobyte size, and the sub-buffer will be updated to the next size that it will can accommodate it. If the user writes in 10, it will change the size to be 4 pages on x86 (16K), as that is the next available size that can hold 10K pages. - Update the debug output when a corrupt time is detected in the ring buffer. If the ring buffer detects inconsistent timestamps, there's a debug config options that will dump the contents of the meta data of the sub-buffer that is used for debugging. Add some more information to this dump that helps with debugging. - Add more timestamp debugging checks (only triggers when the config is enabled) - Increase the trace_seq iterator to 2 page sizes. - Allow strings written into tracefs_marker to be larger. Up to just under 2 page sizes (based on what trace_seq can hold). - Increase the trace_maker_raw write to be as big as a sub-buffer can hold. - Remove 32 bit time stamp logic, now that the rb_time_cmpxchg() has been removed. - More selftests were added. - Some code clean ups as well. * tag 'trace-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: (29 commits) ring-buffer: Remove stale comment from ring_buffer_size() tracing histograms: Simplify parse_actions() function tracing/selftests: Remove exec permissions from trace_marker.tc test ring-buffer: Use subbuf_order for buffer page masking tracing: Update subbuffer with kilobytes not page order ringbuffer/selftest: Add basic selftest to test changing subbuf order ring-buffer: Add documentation on the buffer_subbuf_order file ring-buffer: Just update the subbuffers when changing their allocation order ring-buffer: Keep the same size when updating the order tracing: Stop the tracing while changing the ring buffer subbuf size tracing: Update snapshot order along with main buffer order ring-buffer: Make sure the spare sub buffer used for reads has same size ring-buffer: Do no swap cpu buffers if order is different ring-buffer: Clear pages on error in ring_buffer_subbuf_order_set() failure ring-buffer: Read and write to ring buffers with custom sub buffer size ring-buffer: Set new size of the ring buffer sub page ring-buffer: Add interface for configuring trace sub buffer size ring-buffer: Page size per ring buffer ring-buffer: Have ring_buffer_print_page_header() be able to access ring_buffer_iter ring-buffer: Check if absolute timestamp goes backwards ... commit 2c25716dcc25a0420c4ad49d6e6bf61e60a21434 Author: Qu Wenruo Date: Mon Jan 8 19:38:44 2024 +1030 btrfs: zlib: fix and simplify the inline extent decompression [BUG] If we have a filesystem with 4k sectorsize, and an inlined compressed extent created like this: item 4 key (257 INODE_ITEM 0) itemoff 15863 itemsize 160 generation 8 transid 8 size 4096 nbytes 4096 block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0 sequence 1 flags 0x0(none) item 5 key (257 INODE_REF 256) itemoff 15839 itemsize 24 index 2 namelen 14 name: source_inlined item 6 key (257 EXTENT_DATA 0) itemoff 15770 itemsize 69 generation 8 type 0 (inline) inline extent data size 48 ram_bytes 4096 compression 1 (zlib) Which has an inline compressed extent at file offset 0, and its decompressed size is 4K, allowing us to reflink that 4K range to another location (which will not be compressed). If we do such reflink on a subpage system, it would fail like this: # xfs_io -f -c "reflink $mnt/source_inlined 0 60k 4k" $mnt/dest XFS_IOC_CLONE_RANGE: Input/output error [CAUSE] In zlib_decompress(), we didn't treat @start_byte as just a page offset, but also use it as an indicator on whether we should switch our output buffer. In reality, for subpage cases, although @start_byte can be non-zero, we should never switch input/output buffer, since the whole input/output buffer should never exceed one sector. Note: The above assumption is only not true if we're going to support multi-page sectorsize. Thus the current code using @start_byte as a condition to switch input/output buffer or finish the decompression is completely incorrect. [FIX] The fix involves several modifications: - Rename @start_byte to @dest_pgoff to properly express its meaning - Add an extra ASSERT() inside btrfs_decompress() to make sure the input/output size never exceeds one sector. - Use Z_FINISH flag to make sure the decompression happens in one go - Remove the loop needed to switch input/output buffers - Use correct destination offset inside the destination page - Consider early end as an error After the fix, even on 64K page sized aarch64, above reflink now works as expected: # xfs_io -f -c "reflink $mnt/source_inlined 0 60k 4k" $mnt/dest linked 4096/4096 bytes at offset 61440 And resulted a correct file layout: item 9 key (258 INODE_ITEM 0) itemoff 15542 itemsize 160 generation 10 transid 10 size 65536 nbytes 4096 block group 0 mode 100600 links 1 uid 0 gid 0 rdev 0 sequence 1 flags 0x0(none) item 10 key (258 INODE_REF 256) itemoff 15528 itemsize 14 index 3 namelen 4 name: dest item 11 key (258 XATTR_ITEM 3817753667) itemoff 15445 itemsize 83 location key (0 UNKNOWN.0 0) type XATTR transid 10 data_len 37 name_len 16 name: security.selinux data unconfined_u:object_r:unlabeled_t:s0 item 12 key (258 EXTENT_DATA 61440) itemoff 15392 itemsize 53 generation 10 type 1 (regular) extent data disk byte 13631488 nr 4096 extent data offset 0 nr 4096 ram 4096 extent compression 0 (none) Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5b890ad456b16a5b45e7f86d9708d7248e73d0f8 Merge: 302d185865449 9c556b7c3f520 Author: Linus Torvalds Date: Thu Jan 18 14:21:22 2024 -0800 Merge tag 'probes-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace Pull probes update from Masami Hiramatsu: - Update the Kprobes trace event to show the actual function name in notrace-symbol warning. Instead of using the user specified symbol name, use "%ps" printk format to show the actual symbol at the probe address. Since kprobe event accepts the offset from symbol which is bigger than the symbol size, the user specified symbol may not be the actual probed symbol. * tag 'probes-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: trace/kprobe: Display the actual notrace function when rejecting a probe commit 302d1858654494dbbb8541e3ea5f0f884c0e683c Merge: b4442cadca2f9 b9bd10c43456d Author: Linus Torvalds Date: Thu Jan 18 14:11:25 2024 -0800 Merge tag 's390-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Alexander Gordeev: - do not enable by default the support of 31-bit Enterprise Systems Architecture (ESA) ELF binaries - drop automatic CONFIG_KEXEC selection, while set CONFIG_KEXEC=y explicitly for defconfig and debug_defconfig only - fix zpci_get_max_io_size() to allow PCI block stores where normal PCI stores were used otherwise - remove unneeded tsk variable in do_exception() fault handler - __load_fpu_regs() is only called from the core kernel code. Therefore, remove not needed EXPORT_SYMBOL. - remove leftover comment from s390_fpregs_set() callback - few cleanups to Processor Activity Instrumentation (PAI) code (which perf framework is based on) - replace Wenjia Zhang with Thorsten Winkler as s390 Inter-User Communication Vehicle (IUCV) networking maintainer - Fix all scenarios where queues previously removed from a guest's Adjunct-Processor (AP) configuration do not re-appear in a reset state when they are subsequently made available to a guest again * tag 's390-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/vfio-ap: do not reset queue removed from host config s390/vfio-ap: reset queues associated with adapter for queue unbound from driver s390/vfio-ap: reset queues filtered from the guest's AP config s390/vfio-ap: let on_scan_complete() callback filter matrix and update guest's APCB s390/vfio-ap: loop over the shadow APCB when filtering guest's AP configuration s390/vfio-ap: always filter entire AP matrix s390/net: add Thorsten Winkler as maintainer s390/pai_ext: split function paiext_push_sample s390/pai_ext: rework function paiext_copy argments s390/pai: rework paiXXX_start and paiXXX_stop functions s390/pai_crypto: split function paicrypt_push_sample s390/pai: rework paixxxx_getctr interface s390/ptrace: remove leftover comment s390/fpu: remove __load_fpu_regs() export s390/mm,fault: remove not needed tsk variable s390/pci: fix max size calculation in zpci_memcpy_toio() s390/kexec: do not automatically select KEXEC option s390/compat: change default for CONFIG_COMPAT to "n" commit 66f962d8939fd2ac74de901d30d30310c8ddca79 Author: Alexandre Ghiti Date: Thu Jan 18 22:21:20 2024 +0100 riscv: Fix build error on rv32 + XIP commit 66f1e6809397 ("riscv: Make XIP bootable again") restricted page offset to the sv39 page offset instead of the default sv57, which makes sense since probably the platforms that target XIP kernels do not support anything else than sv39 and we do not try to find out the largest address space supported on XIP kernels (ie set_satp_mode()). But PAGE_OFFSET_L3 is not defined for rv32, so fix the build error by restoring the previous behaviour which picks CONFIG_PAGE_OFFSET for rv32. Fixes: 66f1e6809397 ("riscv: Make XIP bootable again") Reported-by: Randy Dunlap Closes: https://lore.kernel.org/linux-riscv/344dca85-5c48-44e1-bc64-4fa7973edd12@infradead.org/T/#u Signed-off-by: Alexandre Ghiti Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20240118212120.2087803-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit aa0901a9008eeb2710292aff94e615adf7884d5f Author: Ori Messinger Date: Wed Nov 22 00:12:13 2023 -0500 drm/amdgpu: Enable GFXOFF for Compute on GFX11 On GFX version 11, GFXOFF was disabled due to a MES KIQ firmware issue, which has since been fixed after version 64. This patch only re-enables GFXOFF for GFX version 11 if the GPU's MES KIQ firmware version is newer than version 64. V2: Keep GFXOFF disabled on GFX11 if MES KIQ is below version 64. V3: Add parentheses to avoid GCC warning for parentheses: "suggest parentheses around comparison in operand of ‘&’" V4: Remove "V3" from commit title V5: Change commit description and insert 'Acked-by' Signed-off-by: Ori Messinger Acked-by: Alex Deucher Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit b2139c96dc954b58b81bc670fc4ea5f034ed062c Author: Srinivasan Shanmugam Date: Sat Jan 13 14:32:27 2024 +0530 drm/amd/display: Drop 'acrtc' and add 'new_crtc_state' NULL check for writeback requests. Return value of 'to_amdgpu_crtc' which is container_of(...) can't be null, so it's null check 'acrtc' is dropped. Fixing the below: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9302 amdgpu_dm_atomic_commit_tail() error: we previously assumed 'acrtc' could be null (see line 9299) Added 'new_crtc_state' NULL check for function 'drm_atomic_get_new_crtc_state' that retrieves the new state for a CRTC, while enabling writeback requests. Cc: stable@vger.kernel.org Cc: Alex Hung Cc: Aurabindo Pillai Cc: Rodrigo Siqueira Cc: Hamza Mahfooz Signed-off-by: Srinivasan Shanmugam Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit fb1c93c2e9604a884467a773790016199f78ca08 Author: Christian König Date: Wed Jan 10 15:19:29 2024 +0100 drm/amdgpu: revert "Adjust removal control flow for smu v13_0_2" Calling amdgpu_device_ip_resume_phase1() during shutdown leaves the HW in an active state and is an unbalanced use of the IP callbacks. Using the IP callbacks like this can lead to memory leaks, double free and imbalanced reference counters. Leaving the HW in an active state can lead to DMA accesses to memory now freed by the driver. Both is a complete no-go for driver unload so completely revert the workaround for now. This reverts commit f5c7e7797060255dbc8160734ccc5ad6183c5e04. Signed-off-by: Christian König Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 3c4e4eb5d872118fef1708abe933a410c5e07e3a Author: Flora Cui Date: Wed Jan 10 19:23:56 2024 +0800 drm/amdkfd: init drm_client with funcs hook otherwise drm_client_dev_unregister() would try to kfree(&adev->kfd.client). Fixes: 1819200166ce ("drm/amdkfd: Export DMABufs from KFD using GEM handles") Signed-off-by: Flora Cui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b4442cadca2f97239c8b80f64af7937897b867b1 Merge: ba7dd8570dc8a 83e1bdc94f32d Author: Linus Torvalds Date: Thu Jan 18 13:41:48 2024 -0800 Merge tag 'x86_tdx_for_6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 TDX updates from Dave Hansen: "This contains the initial support for host-side TDX support so that KVM can run TDX-protected guests. This does not include the actual KVM-side support which will come from the KVM folks. The TDX host interactions with kexec also needs to be ironed out before this is ready for prime time, so this code is currently Kconfig'd off when kexec is on. The majority of the code here is the kernel telling the TDX module which memory to protect and handing some additional memory over to it to use to store TDX module metadata. That sounds pretty simple, but the TDX architecture is rather flexible and it takes quite a bit of back-and-forth to say, "just protect all memory, please." There is also some code tacked on near the end of the series to handle a hardware erratum. The erratum can make software bugs such as a kernel write to TDX-protected memory cause a machine check and masquerade as a real hardware failure. The erratum handling watches out for these and tries to provide nicer user errors" * tag 'x86_tdx_for_6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) x86/virt/tdx: Make TDX host depend on X86_MCE x86/virt/tdx: Disable TDX host support when kexec is enabled Documentation/x86: Add documentation for TDX host support x86/mce: Differentiate real hardware #MCs from TDX erratum ones x86/cpu: Detect TDX partial write machine check erratum x86/virt/tdx: Handle TDX interaction with sleep and hibernation x86/virt/tdx: Initialize all TDMRs x86/virt/tdx: Configure global KeyID on all packages x86/virt/tdx: Configure TDX module with the TDMRs and global KeyID x86/virt/tdx: Designate reserved areas for all TDMRs x86/virt/tdx: Allocate and set up PAMTs for TDMRs x86/virt/tdx: Fill out TDMRs to cover all TDX memory regions x86/virt/tdx: Add placeholder to construct TDMRs to cover all TDX memory regions x86/virt/tdx: Get module global metadata for module initialization x86/virt/tdx: Use all system memory when initializing TDX module as TDX memory x86/virt/tdx: Add skeleton to enable TDX on demand x86/virt/tdx: Add SEAMCALL error printing for module initialization x86/virt/tdx: Handle SEAMCALL no entropy error in common code x86/virt/tdx: Make INTEL_TDX_HOST depend on X86_X2APIC x86/virt/tdx: Define TDX supported page sizes as macros ... commit 05638ff6dd6f0f38734b6b3ee2c7cf15520f5c00 Author: Christophe JAILLET Date: Sat Jan 13 15:58:21 2024 +0100 drm/amd/display: Fix a switch statement in populate_dml_output_cfg_from_stream_state() It is likely that the statement related to 'dml_edp' is misplaced. So move it in the correct "case SIGNAL_TYPE_EDP". Fixes: 7966f319c66d ("drm/amd/display: Introduce DML2") Signed-off-by: Christophe JAILLET Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit bc03c02cc1991a066b23e69bbcc0f66e8f1f7453 Author: Ma Jun Date: Fri Jan 12 13:33:24 2024 +0800 drm/amdgpu: Fix the null pointer when load rlc firmware If the RLC firmware is invalid because of wrong header size, the pointer to the rlc firmware is released in function amdgpu_ucode_request. There will be a null pointer error in subsequent use. So skip validation to fix it. Fixes: 3da9b71563cb ("drm/amd: Use `amdgpu_ucode_*` helpers for GFX10") Signed-off-by: Ma Jun Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit bfe79f5fff1300d96203383582b078c7b0aec80a Author: Wayne Lin Date: Tue Jan 2 14:20:37 2024 +0800 drm/amd/display: Align the returned error code with legacy DP [Why] For usb4 connector, AUX transaction is handled by dmub utilizing a differnt code path comparing to legacy DP connector. If the usb4 DP connector is disconnected, AUX access will report EBUSY and cause igt@kms_dp_aux_dev fail. [How] Align the error code with the one reported by legacy DP as EIO. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Acked-by: Alex Hung Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d3579f5df0536c2f0fabaa3ea80bb2d179884195 Author: Ovidiu Bunea Date: Mon Dec 18 21:40:45 2023 -0500 drm/amd/display: Fix DML2 watermark calculation [Why] core_mode_programming in DML2 should output watermark calculations to locals, but it incorrectly uses mode_lib [How] update code to match HW DML2 Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Ovidiu Bunea Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3ba2a0bfd8cf94eb225e1c60dff16e5c35bde1da Author: Ilya Bakoulin Date: Wed Jan 3 09:42:04 2024 -0500 drm/amd/display: Clear OPTC mem select on disable [Why] Not clearing the memory select bits prior to OPTC disable can cause DSC corruption issues when attempting to reuse a memory instance for another OPTC that enables ODM. [How] Clear the memory select bits prior to disabling an OPTC. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4b56f7d47be87cde5f368b67bc7fac53a2c3e8d2 Author: Nicholas Kazlauskas Date: Fri Dec 15 11:01:42 2023 -0500 drm/amd/display: Port DENTIST hang and TDR fixes to OTG disable W/A [Why] We can experience DENTIST hangs during optimize_bandwidth or TDRs if FIFO is toggled and hangs. [How] Port the DCN35 fixes to DCN314. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8a51cc097dd590a86e8eec5398934ef389ff9a7b Author: Charlene Liu Date: Thu Dec 28 13:19:33 2023 -0500 drm/amd/display: Add logging resource checks [Why] When mapping resources, resources could be unavailable. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Sung joon Kim Acked-by: Alex Hung Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit aa36d8971fccb55ef3241cbfff9d1799e31d8628 Author: Dillon Varone Date: Thu Dec 28 21:36:39 2023 -0500 drm/amd/display: Init link enc resources in dc_state only if res_pool presents [Why & How] res_pool is not initialized in all situations such as virtual environments, and therefore link encoder resources should not be initialized if res_pool is NULL. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Martin Leung Acked-by: Alex Hung Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3bb9b1f958c3d986ed90a3ff009f1e77e9553207 Author: Srinivasan Shanmugam Date: Wed Jan 10 20:58:35 2024 +0530 drm/amd/display: Fix late derefrence 'dsc' check in 'link_set_dsc_pps_packet()' In link_set_dsc_pps_packet(), 'struct display_stream_compressor *dsc' was dereferenced in a DC_LOGGER_INIT(dsc->ctx->logger); before the 'dsc' NULL pointer check. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_dpms.c:905 link_set_dsc_pps_packet() warn: variable dereferenced before check 'dsc' (see line 903) Cc: stable@vger.kernel.org Cc: Aurabindo Pillai Cc: Rodrigo Siqueira Cc: Hamza Mahfooz Cc: Wenjing Liu Cc: Qingqing Zhuo Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ba7dd8570dc8ad4daa3d1c49a137a7b8479eae07 Merge: b0d326da462e2 981cf568a8644 Author: Linus Torvalds Date: Thu Jan 18 13:23:53 2024 -0800 Merge tag 'x86_sgx_for_6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SGX updates from Dave Hansen: "This time, these are entirely confined to SGX selftests fixes. The mini SGX enclave built by the selftests has garnered some attention because it stands alone and does not need the sizable infrastructure of the official SGX SDK. I think that's why folks are suddently interested in cleaning it up. - Clean up selftest compilation issues, mostly from non-gcc compilers - Avoid building selftests when not on x86" * tag 'x86_sgx_for_6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/sgx: Skip non X86_64 platform selftests/sgx: Remove incomplete ABI sanitization code in test enclave selftests/sgx: Discard unsupported ELF sections selftests/sgx: Ensure expected location of test enclave buffer selftests/sgx: Ensure test enclave buffer is entirely preserved selftests/sgx: Fix linker script asserts selftests/sgx: Handle relocations in test enclave selftests/sgx: Produce static-pie executable for test enclave selftests/sgx: Remove redundant enclave base address save/restore selftests/sgx: Specify freestanding environment for enclave compilation selftests/sgx: Separate linker options selftests/sgx: Include memory clobber for inline asm in test enclave selftests/sgx: Fix uninitialized pointer dereferences in encl_get_entry selftests/sgx: Fix uninitialized pointer dereference in error path commit 925781a471d8156011e8f8c1baf61bbe020dac55 Merge: 4349efc52b83a d6938c1c76c64 Author: Jakub Kicinski Date: Thu Jan 18 12:45:04 2024 -0800 Merge tag 'nf-24-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following batch contains Netfilter fixes for net. Slightly larger than usual because this batch includes several patches to tighten the nf_tables control plane to reject inconsistent configuration: 1) Restrict NFTA_SET_POLICY to NFT_SET_POL_PERFORMANCE and NFT_SET_POL_MEMORY. 2) Bail out if a nf_tables expression registers more than 16 netlink attributes which is what struct nft_expr_info allows. 3) Bail out if NFT_EXPR_STATEFUL provides no .clone interface, remove existing fallback to memcpy() when cloning which might accidentally duplicate memory reference to the same object. 4) Fix br_netfilter interaction with neighbour layer. This requires three preparation patches: - Use nf_bridge_get_physinif() in nfnetlink_log - Use nf_bridge_info_exists() to check in br_netfilter context is available in nf_queue. - Pass net to nf_bridge_get_physindev() And finally, the fix which replaces physindev with physinif in nf_bridge_info. Patches from Pavel Tikhomirov. 5) Catch-all deactivation happens in the transaction, hence this oneliner to check for the next generation. This bug uncovered after the removal of the _BUSY bit, which happened in set elements back in summer 2023. 6) Ensure set (total) key length size and concat field length description is consistent, otherwise bail out. 7) Skip set element with the _DEAD flag on from the netlink dump path. A tests occasionally shows that dump is mismatching because GC might lose race to get rid of this element while a netlink dump is in progress. 8) Reject NFT_SET_CONCAT for field_count < 1. 9) Use IP6_INC_STATS in ipvs to fix preemption BUG splat, patch from Fedor Pchelkin. * tag 'nf-24-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: ipvs: avoid stat macros calls from preemptible context netfilter: nf_tables: reject NFT_SET_CONCAT with not field length description netfilter: nf_tables: skip dead set elements in netlink dump netfilter: nf_tables: do not allow mismatch field size and set key length netfilter: nf_tables: check if catch-all set element is active in next generation netfilter: bridge: replace physindev with physinif in nf_bridge_info netfilter: propagate net to nf_bridge_get_physindev netfilter: nf_queue: remove excess nf_bridge variable netfilter: nfnetlink_log: use proper helper for fetching physinif netfilter: nft_limit: do not ignore unsupported flags netfilter: nf_tables: bail out if stateful expression provides no .clone netfilter: nf_tables: validate .maxattr at expression registration netfilter: nf_tables: reject invalid set policy ==================== Link: https://lore.kernel.org/r/20240118161726.14838-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit e28b0359587fe4055c838698172de0530b511702 Author: Kees Cook Date: Wed Jan 10 15:54:41 2024 -0800 bcachefs: Replace strlcpy() with strscpy() strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). Nothing checks the return value here, so a direct replacement with strspy() is possible. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Cc: Kent Overstreet Cc: Brian Foster Cc: Link: https://lore.kernel.org/r/20240110235438.work.385-kees@kernel.org Signed-off-by: Kees Cook commit 4503538d3066f6dd0a66ecc902b382912b97d8a1 Author: Wolfram Sang Date: Sat Jan 13 20:35:54 2024 +0100 MAINTAINERS: use proper email for my I2C work Renesas is solely funding my I2C maintenance meanwhile, give them credit for that by using this email address. Signed-off-by: Wolfram Sang commit 90f9b1406236853bd524ddde86cc5a945690c6b7 Author: Alain Volmat Date: Fri Dec 15 18:06:10 2023 +0100 i2c: stm32f7: add support for stm32mp25 soc The stm32mp25 has only a single interrupt line used for both events and errors. In order to cope with that, reorganise the error handling code so that it can be called either from the common handler (used in case of SoC having only a single IT line) and the error handler for others. The CR1 register also embeds a new FMP bit, necessary when running at Fast Mode Plus frequency. This bit should be used instead of the SYSCFG bit used on other platforms. Add a new compatible to distinguish between the SoCs and two boolean within the setup structure in order to know if the platform has a single/multiple IT lines and if the FMP bit within CR1 is available or not. Signed-off-by: Valentin Caron Signed-off-by: Alain Volmat Signed-off-by: Wolfram Sang commit a058b24c08023ea0ea0a7c38e6845f1d25139a22 Author: Alain Volmat Date: Fri Dec 15 18:06:09 2023 +0100 i2c: stm32f7: perform I2C_ISR read once at beginning of event isr Move readl_relaxed of I2C_ISR register at beginning of event isr so that it done once for both master & slave handling. Signed-off-by: Alain Volmat Signed-off-by: Wolfram Sang commit bf12998e1a68a82d596ea33b00b3ebc75ce52bb5 Author: Alain Volmat Date: Fri Dec 15 18:06:08 2023 +0100 dt-bindings: i2c: document st,stm32mp25-i2c compatible Add a new compatible st,stm32mp25-i2c for the STM32MP25 series which has only one interrupt line for both events and errors and differs in term of handling of FastModePlus. Signed-off-by: Alain Volmat Reviewed-by: Conor Dooley Signed-off-by: Wolfram Sang commit 33a00d919253022aabafecae6bc88a6fad446589 Author: Alain Volmat Date: Fri Dec 15 18:06:07 2023 +0100 i2c: stm32f7: simplify status messages in case of errors Avoid usage of __func__ when reporting an error message since dev_err/dev_dbg are already providing enough details to identify the source of the message. Signed-off-by: Alain Volmat Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit e6103cd45ef0e14eb02f0666bc6b494902cfe821 Author: Alain Volmat Date: Fri Dec 15 18:06:06 2023 +0100 i2c: stm32f7: perform most of irq job in threaded handler The irq handling is currently split between the irq handler and the threaded irq handler. Some of the handling (such as dma related stuffs) done within the irq handler might sleep or take some time leading to issues if the kernel is built with realtime constraints. In order to fix that, perform an overall rework to perform most of the job within the threaded handler and only keep fifo access in the non threaded handler. Signed-off-by: Alain Volmat Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit a51e224c2f42417e95a3e1a672ade221bcd006ba Author: Alain Volmat Date: Fri Dec 15 18:06:05 2023 +0100 i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq Convert error handling upon calls of devm_request_irq functions during the probe of the driver. Signed-off-by: Alain Volmat Signed-off-by: Wolfram Sang commit 2f189493ae32be9768b27072c9388e62b38d2dda Author: Paul Menzel Date: Wed Dec 20 17:10:02 2023 +0100 i2c: i801: Add lis3lv02d for Dell XPS 15 7590 On the Dell XPS 15 7590/0VYV0G, BIOS 1.24.0 09/11/2023, Linux prints the warning below. i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration Following the same suggestions by Wolfram Sang as for the Dell Precision 3540 [1], the accelerometer can be successfully found on I2C bus 2 at address 0x29. $ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-2/new_device lis3lv02d 0x29 $ dmesg | tail -5 [ 549.522876] lis3lv02d_i2c 2-0029: supply Vdd not found, using dummy regulator [ 549.522904] lis3lv02d_i2c 2-0029: supply Vdd_IO not found, using dummy regulator [ 549.542486] lis3lv02d: 8 bits 3DC sensor found [ 549.630022] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input35 [ 549.630586] i2c i2c-2: new_device: Instantiated device lis3lv02d at 0x29 So, the device has that accelerometer. Add the I2C address to the mapping list, and test it successfully on the device. [1]: https://lore.kernel.org/linux-i2c/97708c11-ac85-fb62-2c8e-d37739ca826f@molgen.mpg.de/ Signed-off-by: Paul Menzel Acked-by: Pali Rohár Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit 6d9450464ce1825d7d0e7ef5d33a9d2701f41c76 Author: Paul Menzel Date: Wed Dec 20 17:10:01 2023 +0100 i2c: i801: Add lis3lv02d for Dell Precision 3540 On the Dell Precision 3540/0M14W7, BIOS 1.7.4 05/12/2020, Linux prints the warning below. i801_smbus 0000:00:1f.4: Accelerometer lis3lv02d is present on SMBus but its address is unknown, skipping registration With the help of Wolfram Sang, the test to probe it on I2C bus 6 at address 0x29 was successful. $ echo lis3lv02d 0x29 | sudo tee /sys/bus/i2c/devices/i2c-6/new_device [ 2110.787000] i2c i2c-6: new_device: Instantiated device lis3lv02d at 0x29 [ 2110.791932] lis3lv02d_i2c 6-0029: supply Vdd not found, using dummy regulator [ 2110.791981] lis3lv02d_i2c 6-0029: supply Vdd_IO not found, using dummy regulator [ 2110.809233] lis3lv02d: 8 bits 3DC sensor found [ 2110.900668] input: ST LIS3LV02DL Accelerometer as /devices/platform/lis3lv02d/input/input23 So, the device has that accelerometer. Add the I2C address to the mapping list. Link: https://lore.kernel.org/linux-i2c/97708c11-ac85-fb62-2c8e-d37739ca826f@molgen.mpg.de/ Signed-off-by: Paul Menzel Acked-by: Pali Rohár Reviewed-by: Andi Shyti [wsa: shortened commit message a little] Signed-off-by: Wolfram Sang commit bb7c0209c4fead37fbc9fd07f9617f40ba21189e Author: Hans Hu Date: Thu Nov 2 10:53:54 2023 +0800 i2c: wmt: Reduce redundant: REG_CR setting These Settings for the same register, REG_CR, can be put together to reduce code redundancy. Signed-off-by: Hans Hu Signed-off-by: Wolfram Sang commit 4c541c6a66df396c35693a21c5bc40553cd4d2fa Author: Hans Hu Date: Thu Nov 2 10:53:55 2023 +0800 i2c: wmt: Reduce redundant: function parameter Use more appropriate parameter passing to reduce the amount of code Signed-off-by: Hans Hu Signed-off-by: Wolfram Sang commit 7108ecf3cbc728ec4a72ce29136cbcfedf4a9242 Author: Hans Hu Date: Thu Nov 2 10:53:53 2023 +0800 i2c: wmt: Reduce redundant: clock mode setting The frequency setting mode is adjusted to reduce the code redundancy, and it is also convenient to share with zhaoxin Signed-off-by: Hans Hu Signed-off-by: Wolfram Sang commit 8a22991a48f2602aaab79df1301483d50bc51b2c Author: Hans Hu Date: Thu Nov 2 10:53:52 2023 +0800 i2c: wmt: Reduce redundant: wait event complete Put the handling of interrupt events in a function class to reduce code redundancy. Signed-off-by: Hans Hu Signed-off-by: Wolfram Sang commit 462e9804d2c90bfffb494718b5aae5c374ff3b78 Author: Hans Hu Date: Thu Nov 2 10:53:51 2023 +0800 i2c: wmt: Reduce redundant: bus busy check Put wmt_i2c_wait_bus_not_busy() in a more appropriate place to reduce code redundancy Signed-off-by: Hans Hu Signed-off-by: Wolfram Sang commit a8355235dbd571b32c750ee756dd6dac216d18f2 Author: Heiner Kallweit Date: Wed Nov 8 07:38:07 2023 +0100 i2c: mux: reg: Remove class-based device auto-detection support Legacy class-based device auto-detection shouldn't be used in new code. Therefore remove support in i2c-mux-reg as long as we don't have a user of this feature yet. Link: https://lore.kernel.org/linux-i2c/a22978a4-88e4-46f4-b71c-032b22321599@gmail.com/ Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang commit 94959c0e796e41128483588d133b9a7003b409f9 Author: Greg Kroah-Hartman Date: Tue Dec 19 16:22:43 2023 +0100 i2c: make i2c_bus_type const Now that the driver core can properly handle constant struct bus_type, move the i2c_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Note, the sound/soc/rockchip/rk3399_gru_sound.c also needed tweaking as it decided to save off a pointer to a bus type for internal stuff, and it was using the i2c_bus_type as well. Signed-off-by: Greg Kroah-Hartman Acked-by: Mark Brown Signed-off-by: Wolfram Sang commit 614ef4d30fe724ff8558a74a1926bd3051d39b67 Author: Philipp Zabel Date: Mon Nov 27 22:11:02 2023 +0100 dt-bindings: at24: add ROHM BR24G04 Add compatible for ROHM Semiconductor BR24G04 EEPROMs. Signed-off-by: Philipp Zabel Signed-off-by: Roland Hieber Acked-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 2b0eee4f6add17a74f696a6f40ad2a4fa173613e Author: Bartosz Golaszewski Date: Thu Nov 23 11:30:32 2023 +0100 eeprom: at24: use of_match_ptr() This driver does not depend on CONFIG_OF so using of_match_ptr() makes sense to reduce the size a bit. Signed-off-by: Bartosz Golaszewski commit e535af5c4225fe2715d12322b645853ab9724648 Author: Christophe Leroy Date: Wed Dec 6 23:24:03 2023 +0100 i2c: cpm: Remove linux,i2c-index conversion from be32 sparse reports an error on some data that gets converted from be32. That's because that data is typed u32 instead of __be32. The type is correct, the be32_to_cpu() conversion is not. Remove the conversion. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312042210.QL4DA8Av-lkp@intel.com/ Signed-off-by: Christophe Leroy Acked-By: Jochen Friedrich Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit db63eacdf61d6bbcde783f15aaafbd8e66476e9a Author: Alexander Stein Date: Thu Nov 30 10:57:51 2023 +0100 i2c: imx: Make SDA actually optional for bus recovering Both i2c_generic_scl_recovery() and the debug output indicate that SDA is purely optional for bus recovery. But devm_gpiod_get() never returns NULL making it mandatory. Fix this by calling devm_gpiod_get_optional instead. Signed-off-by: Alexander Stein Reviewed-by: Andi Shyti Reviewed-by: Oleksij Rempel Signed-off-by: Wolfram Sang commit 13e3a512a29001cab68fe9a0c12be94e6d42a10c Author: Jean Delvare Date: Tue Nov 14 15:13:28 2023 +0100 i2c: smbus: Support up to 8 SPD EEPROMs I originally restricted i2c_register_spd() to only support systems with up to 4 memory slots, so that we can experiment with it on a limited numbers of systems. It's been more than 3 years and it seems to work just fine, so the time has come to lift this arbitrary limitation. The maximum number of memory slots which can be connected to a single I2C segment is 8, so support that many SPD EEPROMs. Any system with more than 8 memory slots would have either multiple SMBus channels or SMBus multiplexing, so it would need dedicated care. We'll get to that later as needed. Signed-off-by: Jean Delvare Signed-off-by: Wolfram Sang commit 92a85b7c6262f19c65a1c115cf15f411ba65a57c Author: Tim Lunn Date: Sun Dec 3 23:39:59 2023 +1100 i2c: rk3x: Adjust mask/value offset for i2c2 on rv1126 Rockchip RV1126 is using old style i2c controller, the i2c2 bus uses a non-sequential offset in the grf register for the mask/value bits for this bus. This patch fixes i2c2 bus on rv1126 SoCs. Signed-off-by: Tim Lunn Acked-by: Heiko Stuebner Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit 187432b82173c86e0450d0e3d516b415ab2455f8 Author: Marek Szyprowski Date: Wed Nov 8 17:43:54 2023 +0100 i2c: s3c24xx: add support for atomic transfers Add support for atomic transfers using polling mode with interrupts intentionally disabled to get rid of the following warning introduced by commit 63b96983a5dd ("i2c: core: introduce callbacks for atomic transfers") during system reboot and power-off: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1518 at drivers/i2c/i2c-core.h:40 i2c_transfer+0xe8/0xf4 No atomic I2C transfer handler for 'i2c-0' ... ---[ end trace 0000000000000000 ]--- Signed-off-by: Marek Szyprowski Reviewed-by: Chanho Park Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit 990489e1042c6c5d6bccf56deca68f8dbeed8180 Author: Marek Szyprowski Date: Wed Nov 8 17:43:53 2023 +0100 i2c: s3c24xx: fix transferring more than one message in polling mode To properly handle ACK on the bus when transferring more than one message in polling mode, move the polling handling loop from s3c24xx_i2c_message_start() to s3c24xx_i2c_doxfer(). This way i2c_s3c_irq_nextbyte() is always executed till the end, properly acknowledging the IRQ bits and no recursive calls to i2c_s3c_irq_nextbyte() are made. While touching this, also fix finishing transfers in polling mode by using common code path and always waiting for the bus to become idle and disabled. Fixes: 117053f77a5a ("i2c: s3c2410: Add polling mode support") Signed-off-by: Marek Szyprowski Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit 0d9cf23ed55d7ba3ab26d617a3ae507863674c8f Author: Marek Szyprowski Date: Wed Nov 8 17:43:52 2023 +0100 i2c: s3c24xx: fix read transfers in polling mode To properly handle read transfers in polling mode, no waiting for the ACK state is needed as it will never come. Just wait a bit to ensure start state is on the bus and continue processing next bytes. Fixes: 117053f77a5a ("i2c: s3c2410: Add polling mode support") Signed-off-by: Marek Szyprowski Reviewed-by: Chanho Park Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit d0520eb3ed54df89eb5961ec3b88634f313123f2 Author: Wolfram Sang Date: Thu Dec 14 08:43:58 2023 +0100 i2c: rcar: add FastMode+ support for Gen4 To support FM+, we mainly need to turn the SMD constant into a parameter and set it accordingly. That also means we can finally fix SMD to our needs instead of bailing out. A sanity check for SMD then becomes a sanity check for 'x == 0'. After all that, activating the enable bit for FM+ is all we need to do. Tested with a Renesas Falcon board using R-Car V3U. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit 2b523c46e81ebd621515ab47117f95de197dfcbf Author: Wolfram Sang Date: Thu Dec 14 08:43:57 2023 +0100 i2c: rcar: introduce Gen4 devices So far, we treated Gen4 as Gen3. But we are soon adding FM+ as a Gen4 specific feature, so prepare the code for the new devtype. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Andi Shyti Signed-off-by: Wolfram Sang commit e19e1abc9ce45f4d4cad2f7eab1827e683be4e84 Author: Wolfram Sang Date: Sun Nov 12 17:59:11 2023 -0500 i2c: npcm7xx: move to per-adapter debugfs directory The I2C core now provides a per-adapter debugfs directory. Use it instead of creating a custom one. Signed-off-by: Wolfram Sang Reviewed-by: Tali Perry Signed-off-by: Wolfram Sang commit c66520c02c2f5b75e4f06a83ece4382fe2f92cfc Author: Wolfram Sang Date: Sun Nov 12 17:59:10 2023 -0500 i2c: gpio: move to per-adapter debugfs directory The I2C core now provides a per-adapter debugfs directory. Use it instead of creating a custom one. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 73febd775bdbdb98c81255ff85773ac410ded5c4 Author: Wolfram Sang Date: Sun Nov 12 17:54:41 2023 -0500 i2c: create debugfs entry per adapter Two drivers already implement custom debugfs handling for their i2c_adapter and more will come. So, let the core create a debugfs directory per adapter and pass that to drivers for their debugfs files. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit f79ad78a25841fdde6cd589969966fb113cf1d10 Author: Heiner Kallweit Date: Fri Nov 24 11:16:11 2023 +0100 staging: greybus: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Acked-by: Greg Kroah-Hartman Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang commit 8cd210d200ad00b29a8e0476ceef585bdca1d2a7 Author: Heiner Kallweit Date: Fri Nov 24 11:16:17 2023 +0100 media: netup_unidvb: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Signed-off-by: Heiner Kallweit Acked-by: Hans Verkuil Signed-off-by: Wolfram Sang commit c1cc7ccb0ff7596a7025a844d29487df0efd40b2 Author: Heiner Kallweit Date: Fri Nov 24 11:16:14 2023 +0100 i2c: stub: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang commit 9fd12f385720a85b4ce9a3cb98e66d470a5efd20 Author: Heiner Kallweit Date: Fri Nov 24 11:16:10 2023 +0100 i2c: Don't let i2c adapters declare I2C_CLASS_SPD support if they support I2C_CLASS_HWMON After removal of the legacy eeprom driver the only remaining I2C client device driver supporting I2C_CLASS_SPD is jc42. Because this driver also supports I2C_CLASS_HWMON, adapters don't have to declare support for I2C_CLASS_SPD if they support I2C_CLASS_HWMON. It's one step towards getting rid of I2C_CLASS_SPD mid-term. Signed-off-by: Heiner Kallweit Acked-by: Andi Shyti Acked-by: Jim Cromie # for SCX Signed-off-by: Wolfram Sang commit f21682b362b67833e4f4f481c30abcb432861b0c Author: Heiner Kallweit Date: Mon Nov 13 12:37:15 2023 +0100 drm/amd/pm: Remove I2C_CLASS_SPD support I2C_CLASS_SPD was used to expose the EEPROM content to user space, via the legacy eeprom driver. Now that this driver has been removed, we can remove I2C_CLASS_SPD support. at24 driver with explicit instantiation should be used instead. Signed-off-by: Heiner Kallweit Acked-by: Alex Deucher Signed-off-by: Wolfram Sang commit b60db383e2ba64a18e49b6bef3be1ab18aa159f1 Author: Heiner Kallweit Date: Thu Nov 23 10:40:40 2023 +0100 include/linux/i2c.h: remove I2C_CLASS_DDC support After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now. Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang commit 754bd2fffc913e523d1b9e686e8b1fd3a70d8f7e Author: Heiner Kallweit Date: Thu Nov 23 10:40:25 2023 +0100 fbdev: remove I2C_CLASS_DDC support After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now. Acked-by: Helge Deller Acked-by: Thomas Zimmermann Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang commit e965a707276760cc010eb77fba64b08ee9e8781f Author: Heiner Kallweit Date: Thu Nov 23 10:40:21 2023 +0100 drm: remove I2C_CLASS_DDC support After removal of the legacy EEPROM driver and I2C_CLASS_DDC support in olpc_dcon there's no i2c client driver left supporting I2C_CLASS_DDC. Class-based device auto-detection is a legacy mechanism and shouldn't be used in new code. So we can remove this class completely now. Acked-by: Alex Deucher Acked-by: Dmitry Baryshkov Acked-by: Harry Wentland Acked-by: Heiko Stuebner Acked-by: Jani Nikula Acked-by: Jernej Skrabec Reviewed-by: Thomas Zimmermann Reviewed-by: Andi Shyti Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Neil Armstrong Signed-off-by: Heiner Kallweit Signed-off-by: Wolfram Sang commit b0d326da462e20285236e11e4cbc32085de9f363 Merge: 8c94ccc7cd691 e37617c8e53a1 Author: Linus Torvalds Date: Thu Jan 18 11:57:33 2024 -0800 Merge tag 'sched-urgent-2024-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Fix a cpufreq related performance regression on certain systems, where the CPU would remain at the lowest frequency, degrading performance substantially" * tag 'sched-urgent-2024-01-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix frequency selection for non-invariant case commit 8c94ccc7cd691472461448f98e2372c75849406c Merge: bd736f38c014b 933bb7b878ddd Author: Linus Torvalds Date: Thu Jan 18 11:43:55 2024 -0800 Merge tag 'usb-6.8-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 changes for 6.8-rc1. Included in here are the following: - Thunderbolt subsystem and driver updates for USB 4 hardware and issues reported by real devices - xhci driver updates - dwc3 driver updates - uvc_video gadget driver updates - typec driver updates - gadget string functions cleaned up - other small changes All of these have been in the linux-next tree for a while with no reported issues" * tag 'usb-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (169 commits) usb: typec: tipd: fix use of device-specific init function usb: typec: tipd: Separate reset for TPS6598x usb: mon: Fix atomicity violation in mon_bin_vma_fault usb: gadget: uvc: Remove nested locking usb: gadget: uvc: Fix use are free during STREAMOFF usb: typec: class: fix typec_altmode_put_partner to put plugs dt-bindings: usb: dwc3: Limit num-hc-interrupters definition dt-bindings: usb: xhci: Add num-hc-interrupters definition xhci: add support to allocate several interrupters USB: core: Use device_driver directly in struct usb_driver and usb_device_driver arm64: dts: mediatek: mt8195: Add 'rx-fifo-depth' for cherry usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue arm64: dts: qcom: msm8996: Remove PNoC clock from MSS arm64: dts: qcom: msm8996: Remove AGGRE2 clock from SLPI arm64: dts: qcom: msm8998: Remove AGGRE2 clock from SLPI arm64: dts: qcom: msm8939: Drop RPM bus clocks arm64: dts: qcom: sdm630: Drop RPM bus clocks arm64: dts: qcom: qcs404: Drop RPM bus clocks arm64: dts: qcom: msm8996: Drop RPM bus clocks ... commit bd736f38c014ba70ba7ec3bdc6af6fe5368d6612 Merge: e38f734add21d 0c84bea0cabc4 Author: Linus Torvalds Date: Thu Jan 18 11:37:24 2024 -0800 Merge tag 'tty-6.8-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 changes for 6.8-rc1. As usual, Jiri has a bunch of refactoring and cleanups for the tty core and drivers in here, along with the usual set of rs485 updates (someday this might work properly...) Along with those, in here are changes for: - sc16is7xx serial driver updates - platform driver removal api updates - amba-pl011 driver updates - tty driver binding updates - other small tty/serial driver updates and changes All of these have been in linux-next for a while with no reported issues" * tag 'tty-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (197 commits) serial: sc16is7xx: refactor EFR lock serial: sc16is7xx: reorder code to remove prototype declarations serial: sc16is7xx: refactor FIFO access functions to increase commonality serial: sc16is7xx: drop unneeded MODULE_ALIAS serial: sc16is7xx: replace hardcoded divisor value with BIT() macro serial: sc16is7xx: add explicit return for some switch default cases serial: sc16is7xx: add macro for max number of UART ports serial: sc16is7xx: add driver name to struct uart_driver serial: sc16is7xx: use i2c_get_match_data() serial: sc16is7xx: use spi_get_device_match_data() serial: sc16is7xx: use DECLARE_BITMAP for sc16is7xx_lines bitfield serial: sc16is7xx: improve do/while loop in sc16is7xx_irq() serial: sc16is7xx: remove obsolete loop in sc16is7xx_port_irq() serial: sc16is7xx: set safe default SPI clock frequency serial: sc16is7xx: add check for unsupported SPI modes during probe serial: sc16is7xx: fix invalid sc16is7xx_lines bitfield in case of probe error serial: 8250_exar: Set missing rs485_supported flag serial: omap: do not override settings for RS485 support serial: core, imx: do not set RS485 enabled if it is not supported serial: core: make sure RS485 cannot be enabled when it is not supported ... commit 80fe58cc176fefceb7afd6dd937f97f37313b9b3 Merge: da65f29dada7f c0c4579d79d0d Author: Thomas Gleixner Date: Thu Jan 18 20:11:46 2024 +0100 Merge tag 'timers-v6.8-rc1' of http://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clockevent/clocksource updates from Daniel Lezcano: - Fixed error handling at probe time and uninitialized return code on ep93xx (Arnd Bergman) - Fixed some kerneldoc warning on Cadence TTC (Randy Dunlap) - Fixed kerneldoc warning on Timer TI DM (Tony Lindgren) - Handle interrupt disabling when shutting down the timer on RISC-V timer (Joshua Yeong) - Add compatible string for the StarFive JH8100 clint (Sia Jee Heng) - Separate mtime and mtimecmp registers in DT bindings (Inochi Amaoto) Link: https://lore.kernel.org/lkml/0f07af92-e4b2-48de-88a6-dd9aa9e49743@linaro.org commit 18f14afe281648e31ed35c9ad2fcb724c4838ad9 Author: Michael Ellerman Date: Fri Dec 15 23:44:49 2023 +1100 powerpc/64s: Increase default stack size to 32KB There are reports of kernels crashing due to stack overflow while running OpenShift (Kubernetes). The primary contributor to the stack usage seems to be openvswitch, which is used by OVN-Kubernetes (based on OVN (Open Virtual Network)), but NFS also contributes in some stack traces. There may be some opportunities to reduce stack usage in the openvswitch code, but doing so potentially require tradeoffs vs performance, and also requires testing across architectures. Looking at stack usage across the kernel (using -fstack-usage), shows that ppc64le stack frames are on average 50-100% larger than the equivalent function built for x86-64. Which is not surprising given the minimum stack frame size is 32 bytes on ppc64le vs 16 bytes on x86-64. So increase the default stack size to 32KB for the modern 64-bit Book3S platforms, ie. pseries (virtualised) and powernv (bare metal). That leaves the older systems like G5s, and the AmigaOne (pasemi) with a 16KB stack which should be sufficient on those machines. Signed-off-by: Michael Ellerman Signed-off-by: Aneesh Kumar K.V (IBM) Link: https://msgid.link/20231215124449.317597-1-mpe@ellerman.id.au commit e38f734add21d75d76dbcf7b214f4823131c1bae Merge: 80955ae955d15 0a46c21c21c1f Author: Linus Torvalds Date: Thu Jan 18 10:30:48 2024 -0800 Merge tag 'staging-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver updates from Greg KH: "Here is the "big" set of staging driver changes for 6.8-rc1. It's not really that big this release cycle, not much happened except for 186 patches of coding style cleanups. The majority was in the rtl8192e driver, but there are other smaller changes in a few other staging drivers, full details in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'staging-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (186 commits) Staging: rtl8192e: Rename variable OpMode Staging: rtl8192e: Rename variable bIsAggregateFrame Staging: rtl8192e: Rename function rtllib_EnableNetMonitorMode() Staging: rtl8192e: Rename variable NumRxOkInPeriod Staging: rtl8192e: Rename variable NumTxOkInPeriod Staging: rtl8192e: Rename variable bUsed staging: vme_user: print more detailed infomation when an error occurs Staging: rtl8192e: Rename function rtllib_DisableNetMonitorMode() Staging: rtl8192e: Rename variable bInitState Staging: rtl8192e: Rename variable skb_waitQ Staging: rtl8192e: Rename variable BasicRate Staging: rtl8192e: Rename variable QueryRate Staging: rtl8192e: Rename function rtllib_TURBO_Info() Staging: rtl8192e: Rename function rtllib_WMM_Info() Staging: rtl8192e: Rename function rtllib_MFIE_Grate() Staging: rtl8192e: Rename function rtllib_MFIE_Brate() Staging: rtl8192e: Fixup statement broken across 2 lines in rtllib_softmac_new_net() Staging: rtl8192e: Fixup statement broken across 2 lines in rtllib_softmac_xmit() Staging: rtl8192e: Fix function definition broken across multiple lines Staging: rtl8192e: Fix statement broken across 2 lines in rtllib_rx_assoc_resp() ... commit c3365ced1375db779d2244695a7f936fd2f1bdb5 Author: Steve French Date: Wed Jan 17 17:12:57 2024 -0600 Update MAINTAINERS email address Ronnie is no longer at Redhat. Update his email address. Signed-off-by: Steve French commit 0b549c4f594167d7ef056393c6a06ac77f5690ff Author: Steve French Date: Wed Jan 17 16:56:05 2024 -0600 cifs: minor comment cleanup minor comment cleanup and trivial camelCase removal Reviewed-by: Bharath SM Signed-off-by: Steve French commit d8392c203e84ec7daa2afecdb8f4db69bc32416a Author: Steve French Date: Wed Jan 17 16:15:18 2024 -0600 smb3: show beginning time for per share stats In analyzing problems, one missing piece of debug data is when the mount occurred. A related problem is when collecting stats we don't know the period of time the stats covered, ie when this set of stats for the tcon started to be collected. To make debugging easier track the stats begin time. Set it when the mount occurred at mount time, and reset it to current time whenever stats are reset. For example, ... 1) \\localhost\test SMBs: 14 since 2024-01-17 22:17:30 UTC Bytes read: 0 Bytes written: 0 Open files: 0 total (local), 0 open on server TreeConnects: 1 total 0 failed TreeDisconnects: 0 total 0 failed ... 2) \\localhost\scratch SMBs: 24 since 2024-01-17 22:16:04 UTC Bytes read: 0 Bytes written: 0 Open files: 0 total (local), 0 open on server TreeConnects: 1 total 0 failed TreeDisconnects: 0 total 0 failed ... Note the time "since ... UTC" is now displayed in /proc/fs/cifs/Stats for each share that is mounted. Suggested-by: Shyam Prasad N Reviewed-by: Bharath SM Signed-off-by: Steve French commit 4349efc52b83af3851df7a4199567ad50b3d1f03 Merge: 9cfd3b5021538 35ac085a94efe Author: Jakub Kicinski Date: Thu Jan 18 09:54:24 2024 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2024-01-18 We've added 10 non-merge commits during the last 5 day(s) which contain a total of 12 files changed, 806 insertions(+), 51 deletions(-). The main changes are: 1) Fix an issue in bpf_iter_udp under backward progress which prevents user space process from finishing iteration, from Martin KaFai Lau. 2) Fix BPF verifier to reject variable offset alu on registers with a type of PTR_TO_FLOW_KEYS to prevent oob access, from Hao Sun. 3) Follow up fixes for kernel- and libbpf-side logic around handling arg:ctx tagged arguments of BPF global subprogs, from Andrii Nakryiko. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf: libbpf: warn on unexpected __arg_ctx type when rewriting BTF selftests/bpf: add tests confirming type logic in kernel for __arg_ctx bpf: enforce types for __arg_ctx-tagged arguments in global subprogs bpf: extract bpf_ctx_convert_map logic and make it more reusable libbpf: feature-detect arg:ctx tag support in kernel selftests/bpf: Add test for alu on PTR_TO_FLOW_KEYS bpf: Reject variable offset alu on PTR_TO_FLOW_KEYS selftests/bpf: Test udp and tcp iter batching bpf: Avoid iter->offset making backward progress in bpf_iter_udp bpf: iter_udp: Retry with a larger batch size without going back to the previous bucket ==================== Link: https://lore.kernel.org/r/20240118153936.11769-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 9cfd3b502153810b66ac0ce47f1fba682228f2d2 Author: Tony Nguyen Date: Wed Jan 17 09:25:32 2024 -0800 i40e: Include types.h to some headers Commit 56df345917c0 ("i40e: Remove circular header dependencies and fix headers") redistributed a number of includes from one large header file to the locations they were needed. In some environments, types.h is not included and causing compile issues. The driver should not rely on implicit inclusion from other locations; explicitly include it to these files. Snippet of issue. Entire log can be seen through the Closes: link. In file included from drivers/net/ethernet/intel/i40e/i40e_diag.h:7, from drivers/net/ethernet/intel/i40e/i40e_diag.c:4: drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:33:9: error: unknown type name '__le16' 33 | __le16 flags; | ^~~~~~ drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:34:9: error: unknown type name '__le16' 34 | __le16 opcode; | ^~~~~~ ... drivers/net/ethernet/intel/i40e/i40e_diag.h:22:9: error: unknown type name 'u32' 22 | u32 elements; /* number of elements if array */ | ^~~ drivers/net/ethernet/intel/i40e/i40e_diag.h:23:9: error: unknown type name 'u32' 23 | u32 stride; /* bytes between each element */ Reported-by: Martin Zaharinov Closes: https://lore.kernel.org/netdev/21BBD62A-F874-4E42-B347-93087EEA8126@gmail.com/ Fixes: 56df345917c0 ("i40e: Remove circular header dependencies and fix headers") Reviewed-by: Jesse Brandeburg Reviewed-by: Simon Horman Tested-by: Arpana Arland (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20240117172534.3555162-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 2e7ef287f07c74985f1bf2858bedc62bd9ebf155 Author: Nikita Zhandarovich Date: Wed Jan 17 09:21:02 2024 -0800 ipv6: mcast: fix data-race in ipv6_mc_down / mld_ifc_work idev->mc_ifc_count can be written over without proper locking. Originally found by syzbot [1], fix this issue by encapsulating calls to mld_ifc_stop_work() (and mld_gq_stop_work() for good measure) with mutex_lock() and mutex_unlock() accordingly as these functions should only be called with mc_lock per their declarations. [1] BUG: KCSAN: data-race in ipv6_mc_down / mld_ifc_work write to 0xffff88813a80c832 of 1 bytes by task 3771 on cpu 0: mld_ifc_stop_work net/ipv6/mcast.c:1080 [inline] ipv6_mc_down+0x10a/0x280 net/ipv6/mcast.c:2725 addrconf_ifdown+0xe32/0xf10 net/ipv6/addrconf.c:3949 addrconf_notify+0x310/0x980 notifier_call_chain kernel/notifier.c:93 [inline] raw_notifier_call_chain+0x6b/0x1c0 kernel/notifier.c:461 __dev_notify_flags+0x205/0x3d0 dev_change_flags+0xab/0xd0 net/core/dev.c:8685 do_setlink+0x9f6/0x2430 net/core/rtnetlink.c:2916 rtnl_group_changelink net/core/rtnetlink.c:3458 [inline] __rtnl_newlink net/core/rtnetlink.c:3717 [inline] rtnl_newlink+0xbb3/0x1670 net/core/rtnetlink.c:3754 rtnetlink_rcv_msg+0x807/0x8c0 net/core/rtnetlink.c:6558 netlink_rcv_skb+0x126/0x220 net/netlink/af_netlink.c:2545 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6576 netlink_unicast_kernel net/netlink/af_netlink.c:1342 [inline] netlink_unicast+0x589/0x650 net/netlink/af_netlink.c:1368 netlink_sendmsg+0x66e/0x770 net/netlink/af_netlink.c:1910 ... write to 0xffff88813a80c832 of 1 bytes by task 22 on cpu 1: mld_ifc_work+0x54c/0x7b0 net/ipv6/mcast.c:2653 process_one_work kernel/workqueue.c:2627 [inline] process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2700 worker_thread+0x525/0x730 kernel/workqueue.c:2781 ... Fixes: 2d9a93b4902b ("mld: convert from timer to delayed work") Reported-by: syzbot+a9400cabb1d784e49abf@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/000000000000994e09060ebcdffb@google.com/ Signed-off-by: Nikita Zhandarovich Acked-by: Taehee Yoo Reviewed-by: Eric Dumazet Reviewed-by: Hangbin Liu Link: https://lore.kernel.org/r/20240117172102.12001-1-n.zhandarovich@fintech.ru Signed-off-by: Jakub Kicinski commit 80955ae955d15ea5c11d55cd50032a5243a6dfd6 Merge: 296455ade1fdc e3977e0609a07 Author: Linus Torvalds Date: Thu Jan 18 09:48:40 2024 -0800 Merge tag 'driver-core-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here are the set of driver core and kernfs changes for 6.8-rc1. Nothing major in here this release cycle, just lots of small cleanups and some tweaks on kernfs that in the very end, got reverted and will come back in a safer way next release cycle. Included in here are: - more driver core 'const' cleanups and fixes - fw_devlink=rpm is now the default behavior - kernfs tiny changes to remove some string functions - cpu handling in the driver core is updated to work better on many systems that add topologies and cpus after booting - other minor changes and cleanups All of the cpu handling patches have been acked by the respective maintainers and are coming in here in one series. Everything has been in linux-next for a while with no reported issues" * tag 'driver-core-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (51 commits) Revert "kernfs: convert kernfs_idr_lock to an irq safe raw spinlock" kernfs: convert kernfs_idr_lock to an irq safe raw spinlock class: fix use-after-free in class_register() PM: clk: make pm_clk_add_notifier() take a const pointer EDAC: constantify the struct bus_type usage kernfs: fix reference to renamed function driver core: device.h: fix Excess kernel-doc description warning driver core: class: fix Excess kernel-doc description warning driver core: mark remaining local bus_type variables as const driver core: container: make container_subsys const driver core: bus: constantify subsys_register() calls driver core: bus: make bus_sort_breadthfirst() take a const pointer kernfs: d_obtain_alias(NULL) will do the right thing... driver core: Better advertise dev_err_probe() kernfs: Convert kernfs_path_from_node_locked() from strlcpy() to strscpy() kernfs: Convert kernfs_name_locked() from strlcpy() to strscpy() kernfs: Convert kernfs_walk_ns() from strlcpy() to strscpy() initramfs: Expose retained initrd as sysfs file fs/kernfs/dir: obey S_ISGID kernel/cgroup: use kernfs_create_dir_ns() ... commit bc9291dea7eca74b4a24bbdc173d7fde99c78718 Merge: f1172f3ee3a98 b34f4de6d30cb Author: Jakub Kicinski Date: Thu Jan 18 09:48:11 2024 -0800 Merge branch 'mlxsw-miscellaneous-fixes' Petr Machata says: ==================== mlxsw: Miscellaneous fixes This patchset is a bric-a-brac of fixes for bugs impacting mlxsw. - Patches #1 and #2 fix issues in ACL handling error paths. - Patch #3 fixes stack corruption in ACL code that a recent FW update has uncovered. - Patch #4 fixes an issue in handling of IPIP next hops. - Patch #5 fixes a typo in a the qos_pfc selftest - Patch #6 fixes the same selftest to work with 8-lane ports. ==================== Link: https://lore.kernel.org/r/cover.1705502064.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit b34f4de6d30cbaa8fed905a5080b6eace8c84dc7 Author: Amit Cohen Date: Wed Jan 17 16:04:21 2024 +0100 selftests: mlxsw: qos_pfc: Adjust the test to support 8 lanes 'qos_pfc' test checks PFC behavior. The idea is to limit the traffic using a shaper somewhere in the flow of the packets. In this area, the buffer is smaller than the buffer at the beginning of the flow, so it fills up until there is no more space left. The test configures there PFC which is supposed to notice that the headroom is filling up and send PFC Xoff to indicate the transmitter to stop sending traffic for the priorities sharing this PG. The Xon/Xoff threshold is auto-configured and always equal to 2*(MTU rounded up to cell size). Even after sending the PFC Xoff packet, traffic will keep arriving until the transmitter receives and processes the PFC packet. This amount of traffic is known as the PFC delay allowance. Currently the buffer for the delay traffic is configured as 100KB. The MTU in the test is 10KB, therefore the threshold for Xoff is about 20KB. This allows 80KB extra to be stored in this buffer. 8-lane ports use two buffers among which the configured buffer is split, the Xoff threshold then applies to each buffer in parallel. The test does not take into account the behavior of 8-lane ports, when the ports are configured to 400Gbps with 8 lanes or 800Gbps with 8 lanes, packets are dropped and the test fails. Check if the relevant ports use 8 lanes, in such case double the size of the buffer, as the headroom is split half-half. Cc: Shuah Khan Fixes: bfa804784e32 ("selftests: mlxsw: Add a PFC test") Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/23ff11b7dff031eb04a41c0f5254a2b636cd8ebb.1705502064.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 40cc674bafd50fc728c4a73d7dc77728a0b86759 Author: Amit Cohen Date: Wed Jan 17 16:04:20 2024 +0100 selftests: mlxsw: qos_pfc: Remove wrong description In the diagram of the topology, $swp3 and $swp4 are described as 1Gbps ports. This is wrong information, the test does not configure such speed. Cc: Shuah Khan Fixes: bfa804784e32 ("selftests: mlxsw: Add a PFC test") Signed-off-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/0087e2d416aff7e444d15f7c2958fc1d438dc27e.1705502064.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 62bef63646c194e0f82b40304a0f2d060b28687b Author: Petr Machata Date: Wed Jan 17 16:04:19 2024 +0100 mlxsw: spectrum_router: Register netdevice notifier before nexthop If there are IPIP nexthops at the time when the driver is loaded (or the devlink instance reloaded), the driver looks up the corresponding IPIP entry. But IPIP entries are only created as a result of netdevice notifications. Since the netdevice notifier is registered after the nexthop notifier, mlxsw_sp_nexthop_type_init() never finds the IPIP entry, registers the nexthop MLXSW_SP_NEXTHOP_TYPE_ETH, and fails to assign a CRIF to the nexthop. Later on when the CRIF is necessary, the WARN_ON in mlxsw_sp_nexthop_rif() triggers, causing the splat [1]. In order to fix the issue, reorder the netdevice notifier to be registered before the nexthop one. [1] (edited for clarity): WARNING: CPU: 1 PID: 1364 at drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3245 mlxsw_sp_nexthop_rif (drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3246 (discriminator 1)) mlxsw_spectrum Hardware name: Mellanox Technologies Ltd. MSN4410/VMOD0010, BIOS 5.11 01/06/2019 Call Trace: ? mlxsw_sp_nexthop_rif (drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3246 (discriminator 1)) mlxsw_spectrum __mlxsw_sp_nexthop_eth_update (drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3637) mlxsw_spectrum mlxsw_sp_nexthop_update (drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3679 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3727) mlxsw_spectrum mlxsw_sp_nexthop_group_update (drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:3757) mlxsw_spectrum mlxsw_sp_nexthop_group_refresh (drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4112) mlxsw_spectrum mlxsw_sp_nexthop_obj_event (drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:5118 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:5191 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:5315 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:5500) mlxsw_spectrum nexthops_dump (net/ipv4/nexthop.c:217 net/ipv4/nexthop.c:440 net/ipv4/nexthop.c:3609) register_nexthop_notifier (net/ipv4/nexthop.c:3624) mlxsw_sp_router_init (drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:11486) mlxsw_spectrum mlxsw_sp_init (drivers/net/ethernet/mellanox/mlxsw/spectrum.c:3267) mlxsw_spectrum __mlxsw_core_bus_device_register (drivers/net/ethernet/mellanox/mlxsw/core.c:2202) mlxsw_core mlxsw_devlink_core_bus_device_reload_up (drivers/net/ethernet/mellanox/mlxsw/core.c:2265 drivers/net/ethernet/mellanox/mlxsw/core.c:1603) mlxsw_core devlink_reload (net/devlink/dev.c:314 net/devlink/dev.c:475) [...] Fixes: 9464a3d68ea9 ("mlxsw: spectrum_router: Track next hops at CRIFs") Reported-by: Maksym Yaremchuk Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/74edb8d45d004e8d8f5318eede6ccc3d786d8ba9.1705502064.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 483ae90d8f976f8339cf81066312e1329f2d3706 Author: Ido Schimmel Date: Wed Jan 17 16:04:18 2024 +0100 mlxsw: spectrum_acl_tcam: Fix stack corruption When tc filters are first added to a net device, the corresponding local port gets bound to an ACL group in the device. The group contains a list of ACLs. In turn, each ACL points to a different TCAM region where the filters are stored. During forwarding, the ACLs are sequentially evaluated until a match is found. One reason to place filters in different regions is when they are added with decreasing priorities and in an alternating order so that two consecutive filters can never fit in the same region because of their key usage. In Spectrum-2 and newer ASICs the firmware started to report that the maximum number of ACLs in a group is more than 16, but the layout of the register that configures ACL groups (PAGT) was not updated to account for that. It is therefore possible to hit stack corruption [1] in the rare case where more than 16 ACLs in a group are required. Fix by limiting the maximum ACL group size to the minimum between what the firmware reports and the maximum ACLs that fit in the PAGT register. Add a test case to make sure the machine does not crash when this condition is hit. [1] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: mlxsw_sp_acl_tcam_group_update+0x116/0x120 [...] dump_stack_lvl+0x36/0x50 panic+0x305/0x330 __stack_chk_fail+0x15/0x20 mlxsw_sp_acl_tcam_group_update+0x116/0x120 mlxsw_sp_acl_tcam_group_region_attach+0x69/0x110 mlxsw_sp_acl_tcam_vchunk_get+0x492/0xa20 mlxsw_sp_acl_tcam_ventry_add+0x25/0xe0 mlxsw_sp_acl_rule_add+0x47/0x240 mlxsw_sp_flower_replace+0x1a9/0x1d0 tc_setup_cb_add+0xdc/0x1c0 fl_hw_replace_filter+0x146/0x1f0 fl_change+0xc17/0x1360 tc_new_tfilter+0x472/0xb90 rtnetlink_rcv_msg+0x313/0x3b0 netlink_rcv_skb+0x58/0x100 netlink_unicast+0x244/0x390 netlink_sendmsg+0x1e4/0x440 ____sys_sendmsg+0x164/0x260 ___sys_sendmsg+0x9a/0xe0 __sys_sendmsg+0x7a/0xc0 do_syscall_64+0x40/0xe0 entry_SYSCALL_64_after_hwframe+0x63/0x6b Fixes: c3ab435466d5 ("mlxsw: spectrum: Extend to support Spectrum-2 ASIC") Reported-by: Orel Hagag Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Signed-off-by: Petr Machata Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/2d91c89afba59c22587b444994ae419dbea8d876.1705502064.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit efeb7dfea8ee10cdec11b6b6ba4e405edbe75809 Author: Ido Schimmel Date: Wed Jan 17 16:04:17 2024 +0100 mlxsw: spectrum_acl_tcam: Fix NULL pointer dereference in error path When calling mlxsw_sp_acl_tcam_region_destroy() from an error path after failing to attach the region to an ACL group, we hit a NULL pointer dereference upon 'region->group->tcam' [1]. Fix by retrieving the 'tcam' pointer using mlxsw_sp_acl_to_tcam(). [1] BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] RIP: 0010:mlxsw_sp_acl_tcam_region_destroy+0xa0/0xd0 [...] Call Trace: mlxsw_sp_acl_tcam_vchunk_get+0x88b/0xa20 mlxsw_sp_acl_tcam_ventry_add+0x25/0xe0 mlxsw_sp_acl_rule_add+0x47/0x240 mlxsw_sp_flower_replace+0x1a9/0x1d0 tc_setup_cb_add+0xdc/0x1c0 fl_hw_replace_filter+0x146/0x1f0 fl_change+0xc17/0x1360 tc_new_tfilter+0x472/0xb90 rtnetlink_rcv_msg+0x313/0x3b0 netlink_rcv_skb+0x58/0x100 netlink_unicast+0x244/0x390 netlink_sendmsg+0x1e4/0x440 ____sys_sendmsg+0x164/0x260 ___sys_sendmsg+0x9a/0xe0 __sys_sendmsg+0x7a/0xc0 do_syscall_64+0x40/0xe0 entry_SYSCALL_64_after_hwframe+0x63/0x6b Fixes: 22a677661f56 ("mlxsw: spectrum: Introduce ACL core with simple TCAM implementation") Signed-off-by: Ido Schimmel Reviewed-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/fb6a4542bbc9fcab5a523802d97059bffbca7126.1705502064.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 6d6eeabcfaba2fcadf5443b575789ea606f9de83 Author: Amit Cohen Date: Wed Jan 17 16:04:16 2024 +0100 mlxsw: spectrum_acl_erp: Fix error flow of pool allocation failure Lately, a bug was found when many TC filters are added - at some point, several bugs are printed to dmesg [1] and the switch is crashed with segmentation fault. The issue starts when gen_pool_free() fails because of unexpected behavior - a try to free memory which is already freed, this leads to BUG() call which crashes the switch and makes many other bugs. Trying to track down the unexpected behavior led to a bug in eRP code. The function mlxsw_sp_acl_erp_table_alloc() gets a pointer to the allocated index, sets the value and returns an error code. When gen_pool_alloc() fails it returns address 0, we track it and return -ENOBUFS outside, BUT the call for gen_pool_alloc() already override the index in erp_table structure. This is a problem when such allocation is done as part of table expansion. This is not a new table, which will not be used in case of allocation failure. We try to expand eRP table and override the current index (non-zero) with zero. Then, it leads to an unexpected behavior when address 0 is freed twice. Note that address 0 is valid in erp_table->base_index and indeed other tables use it. gen_pool_alloc() fails in case that there is no space left in the pre-allocated pool, in our case, the pool is limited to ACL_MAX_ERPT_BANK_SIZE, which is read from hardware. When more than max erp entries are required, we exceed the limit and return an error, this error leads to "Failed to migrate vregion" print. Fix this by changing erp_table->base_index only in case of a successful allocation. Add a test case for such a scenario. Without this fix it causes segmentation fault: $ TESTS="max_erp_entries_test" ./tc_flower.sh ./tc_flower.sh: line 988: 1560 Segmentation fault tc filter del dev $h2 ingress chain $i protocol ip pref $i handle $j flower &>/dev/null [1]: kernel BUG at lib/genalloc.c:508! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 6 PID: 3531 Comm: tc Not tainted 6.7.0-rc5-custom-ga6893f479f5e #1 Hardware name: Mellanox Technologies Ltd. MSN4700/VMOD0010, BIOS 5.11 07/12/2021 RIP: 0010:gen_pool_free_owner+0xc9/0xe0 ... Call Trace: __mlxsw_sp_acl_erp_table_other_dec+0x70/0xa0 [mlxsw_spectrum] mlxsw_sp_acl_erp_mask_destroy+0xf5/0x110 [mlxsw_spectrum] objagg_obj_root_destroy+0x18/0x80 [objagg] objagg_obj_destroy+0x12c/0x130 [objagg] mlxsw_sp_acl_erp_mask_put+0x37/0x50 [mlxsw_spectrum] mlxsw_sp_acl_ctcam_region_entry_remove+0x74/0xa0 [mlxsw_spectrum] mlxsw_sp_acl_ctcam_entry_del+0x1e/0x40 [mlxsw_spectrum] mlxsw_sp_acl_tcam_ventry_del+0x78/0xd0 [mlxsw_spectrum] mlxsw_sp_flower_destroy+0x4d/0x70 [mlxsw_spectrum] mlxsw_sp_flow_block_cb+0x73/0xb0 [mlxsw_spectrum] tc_setup_cb_destroy+0xc1/0x180 fl_hw_destroy_filter+0x94/0xc0 [cls_flower] __fl_delete+0x1ac/0x1c0 [cls_flower] fl_destroy+0xc2/0x150 [cls_flower] tcf_proto_destroy+0x1a/0xa0 ... mlxsw_spectrum3 0000:07:00.0: Failed to migrate vregion mlxsw_spectrum3 0000:07:00.0: Failed to migrate vregion Fixes: f465261aa105 ("mlxsw: spectrum_acl: Implement common eRP core") Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/4cfca254dfc0e5d283974801a24371c7b6db5989.1705502064.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit f0e54b6087de9571ec61c189d6c378b81edbe3b2 Author: Kemeng Shi Date: Fri Jan 5 17:21:02 2024 +0800 ext4: remove 'needed' in trace_ext4_discard_preallocations As 'needed' to trace_ext4_discard_preallocations is always 0 which is meaningless. Just remove it. Signed-off-by: Kemeng Shi Suggested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240105092102.496631-10-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 2ffd2a6ad1d3a8213bb5805f45f49098fe615db1 Author: Kemeng Shi Date: Fri Jan 5 17:21:01 2024 +0800 ext4: remove unnecessary parameter "needed" in ext4_discard_preallocations The "needed" controls the number of ext4_prealloc_space to discard in ext4_discard_preallocations. Function ext4_discard_preallocations is supposed to discard all non-used preallocated blocks when "needed" is 0 and now ext4_discard_preallocations is always called with "needed" = 0. Remove unnecessary parameter "needed" and remove all non-used preallocated spaces in ext4_discard_preallocations to simplify the code. Note: If count of non-used preallocated spaces could be more than UINT_MAX, there was a memory leak as some non-used preallocated spaces are left ununsed and this commit will fix it. Otherwise, there is no behavior change. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240105092102.496631-9-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 20427949b9b584422c05bb31e48b1b68615dd794 Author: Kemeng Shi Date: Fri Jan 5 17:21:00 2024 +0800 ext4: remove unused return value of ext4_mb_release_group_pa Remove unused return value of ext4_mb_release_group_pa. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240105092102.496631-8-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 820c280896eaf715b39ac1ad38976bcc749082b7 Author: Kemeng Shi Date: Fri Jan 5 17:20:59 2024 +0800 ext4: remove unused return value of ext4_mb_release_inode_pa Remove unused return value of ext4_mb_release_inode_pa Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240105092102.496631-7-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 908177175a2ac7280cac738f33ccbbbcff035c5c Author: Kemeng Shi Date: Fri Jan 5 17:20:58 2024 +0800 ext4: remove unused return value of ext4_mb_release Remove unused return value of ext4_mb_release. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240105092102.496631-6-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 97c32dbffce12136c06d9ceb6919850233d3a1c2 Author: Kemeng Shi Date: Fri Jan 5 17:20:57 2024 +0800 ext4: remove unused ext4_allocation_context::ac_groups_considered Remove unused ext4_allocation_context::ac_groups_considered Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240105092102.496631-5-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 11fd1a5d642355a45f4008d308399c26a8b3d3f0 Author: Kemeng Shi Date: Fri Jan 5 17:20:56 2024 +0800 ext4: remove unneeded return value of ext4_mb_release_context Function ext4_mb_release_context always return 0 and the return value is never used. Just remove unneeded return value of ext4_mb_release_context. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240105092102.496631-4-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 438a35e72d09c01da7ffb49570ecd11ca632270b Author: Kemeng Shi Date: Fri Jan 5 17:20:55 2024 +0800 ext4: remove unused parameter ngroup in ext4_mb_choose_next_group_*() Remove unused parameter ngroup in ext4_mb_choose_next_group_*(). Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Reviewed-by: Ojaswin Mujoo Link: https://lore.kernel.org/r/20240105092102.496631-3-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit 133de5a0d8f8e32b34feaa8beae7a189482f1856 Author: Kemeng Shi Date: Fri Jan 5 17:20:54 2024 +0800 ext4: remove unused return value of __mb_check_buddy Remove unused return value of __mb_check_buddy. Signed-off-by: Kemeng Shi Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240105092102.496631-2-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o commit c5f3a3821de42ede9bcaeb892d1539717cf590cb Author: Baokun Li Date: Thu Jan 4 22:20:40 2024 +0800 ext4: mark the group block bitmap as corrupted before reporting an error Otherwise unlocking the group in ext4_grp_locked_error may allow other processes to modify the core block bitmap that is known to be corrupt. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240104142040.2835097-9-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 832698373a25950942c04a512daa652c18a9b513 Author: Baokun Li Date: Thu Jan 4 22:20:39 2024 +0800 ext4: avoid allocating blocks from corrupted group in ext4_mb_find_by_goal() Places the logic for checking if the group's block bitmap is corrupt under the protection of the group lock to avoid allocating blocks from the group with a corrupted block bitmap. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240104142040.2835097-8-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 4530b3660d396a646aad91a787b6ab37cf604b53 Author: Baokun Li Date: Thu Jan 4 22:20:38 2024 +0800 ext4: avoid allocating blocks from corrupted group in ext4_mb_try_best_found() Determine if the group block bitmap is corrupted before using ac_b_ex in ext4_mb_try_best_found() to avoid allocating blocks from a group with a corrupted block bitmap in the following concurrency and making the situation worse. ext4_mb_regular_allocator ext4_lock_group(sb, group) ext4_mb_good_group // check if the group bbitmap is corrupted ext4_mb_complex_scan_group // Scan group gets ac_b_ex but doesn't use it ext4_unlock_group(sb, group) ext4_mark_group_bitmap_corrupted(group) // The block bitmap was corrupted during // the group unlock gap. ext4_mb_try_best_found ext4_lock_group(ac->ac_sb, group) ext4_mb_use_best_found mb_mark_used // Allocating blocks in block bitmap corrupted group Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240104142040.2835097-7-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 993bf0f4c393b3667830918f9247438a8f6fdb5b Author: Baokun Li Date: Thu Jan 4 22:20:37 2024 +0800 ext4: avoid dividing by 0 in mb_update_avg_fragment_size() when block bitmap corrupt Determine if bb_fragments is 0 instead of determining bb_free to eliminate the risk of dividing by zero when the block bitmap is corrupted. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240104142040.2835097-6-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 2331fd4a49864e1571b4f50aa3aa1536ed6220d0 Author: Baokun Li Date: Thu Jan 4 22:20:36 2024 +0800 ext4: avoid bb_free and bb_fragments inconsistency in mb_free_blocks() After updating bb_free in mb_free_blocks, it is possible to return without updating bb_fragments because the block being freed is found to have already been freed, which leads to inconsistency between bb_free and bb_fragments. Since the group may be unlocked in ext4_grp_locked_error(), this can lead to problems such as dividing by zero when calculating the average fragment length. Hence move the update of bb_free to after the block double-free check guarantees that the corresponding statistics are updated only after the core block bitmap is modified. Fixes: eabe0444df90 ("ext4: speed-up releasing blocks on commit") CC: # 3.10 Suggested-by: Jan Kara Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240104142040.2835097-5-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit c9b528c35795b711331ed36dc3dbee90d5812d4e Author: Baokun Li Date: Thu Jan 4 22:20:35 2024 +0800 ext4: regenerate buddy after block freeing failed if under fc replay This mostly reverts commit 6bd97bf273bd ("ext4: remove redundant mb_regenerate_buddy()") and reintroduces mb_regenerate_buddy(). Based on code in mb_free_blocks(), fast commit replay can end up marking as free blocks that are already marked as such. This causes corruption of the buddy bitmap so we need to regenerate it in that case. Reported-by: Jan Kara Fixes: 6bd97bf273bd ("ext4: remove redundant mb_regenerate_buddy()") Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240104142040.2835097-4-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 172202152a125955367393956acf5f4ffd092e0d Author: Baokun Li Date: Thu Jan 4 22:20:34 2024 +0800 ext4: do not trim the group with corrupted block bitmap Otherwise operating on an incorrupted block bitmap can lead to all sorts of unknown problems. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240104142040.2835097-3-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 55583e899a5357308274601364741a83e78d6ac4 Author: Baokun Li Date: Thu Jan 4 22:20:33 2024 +0800 ext4: fix double-free of blocks due to wrong extents moved_len In ext4_move_extents(), moved_len is only updated when all moves are successfully executed, and only discards orig_inode and donor_inode preallocations when moved_len is not zero. When the loop fails to exit after successfully moving some extents, moved_len is not updated and remains at 0, so it does not discard the preallocations. If the moved extents overlap with the preallocated extents, the overlapped extents are freed twice in ext4_mb_release_inode_pa() and ext4_process_freed_data() (as described in commit 94d7c16cbbbd ("ext4: Fix double-free of blocks with EXT4_IOC_MOVE_EXT")), and bb_free is incremented twice. Hence when trim is executed, a zero-division bug is triggered in mb_update_avg_fragment_size() because bb_free is not zero and bb_fragments is zero. Therefore, update move_len after each extent move to avoid the issue. Reported-by: Wei Chen Reported-by: xingwei lee Closes: https://lore.kernel.org/r/CAO4mrferzqBUnCag8R3m2zf897ts9UEuhjFQGPtODT92rYyR2Q@mail.gmail.com Fixes: fcf6b1b729bc ("ext4: refactor ext4_move_extents code base") CC: # 3.18 Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20240104142040.2835097-2-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit b2e792ae883a0aa976d4176dfa7dc933263440ea Author: Christian Loehle Date: Thu Jan 18 09:29:56 2024 +0000 Documentation: block: ioprio: Update schedulers This doc hasn't been touched in a while, in the meantime some new io schedulers were added (e.g. all of mq), some with ioprio support. Also reword the introduction to remove reference to CFQ and the limitation that io priorities only work on reads, which is no longer true. Signed-off-by: Christian Loehle Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/a86cfdc8-016f-40f1-8b58-0cb15d2a792c@arm.com Signed-off-by: Jens Axboe commit baa7d536077dcdfe2b70c476a8873d1745d3de0f Author: Christoph Hellwig Date: Wed Jan 17 18:59:01 2024 +0100 loop: fix the the direct I/O support check when used on top of block devices __loop_update_dio only checks the alignment requirement for block backed file systems, but misses them for the case where the loop device is created directly on top of another block device. Due to this creating a loop device with default option plus the direct I/O flag on a > 512 byte sector size file system will lead to incorrect I/O being submitted to the lower block device and a lot of error from the lock layer. This can be seen with xfstests generic/563. Fix the code in __loop_update_dio by factoring the alignment check into a helper, and calling that also for the struct block_device of a block device inode. Also remove the TODO comment talking about dynamically switching between buffered and direct I/O, which is a would be a recipe for horrible performance and occasional data loss. Fixes: 2e5ab5f379f9 ("block: loop: prepare for supporing direct IO") Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20240117175901.871796-1-hch@lst.de Signed-off-by: Jens Axboe commit 7a8e9cdf9405819105ae7405cd91e482bf574b01 Author: Nathan Lynch Date: Tue Jan 16 08:09:25 2024 -0600 seq_buf: Make DECLARE_SEQ_BUF() usable Using the address operator on the array doesn't work: ./include/linux/seq_buf.h:27:27: error: initialization of ‘char *’ from incompatible pointer type ‘char (*)[128]’ [-Werror=incompatible-pointer-types] 27 | .buffer = &__ ## NAME ## _buffer, \ | ^ Apart from fixing that, we can improve DECLARE_SEQ_BUF() by using a compound literal to define the buffer array without attaching a name to it. This makes the macro a single statement, allowing constructs such as: static DECLARE_SEQ_BUF(my_seq_buf, MYSB_SIZE); to work as intended. Link: https://lkml.kernel.org/r/20240116-declare-seq-buf-fix-v1-1-915db4692f32@linux.ibm.com Cc: stable@vger.kernel.org Acked-by: Kees Cook Fixes: dcc4e5728eea ("seq_buf: Introduce DECLARE_SEQ_BUF and seq_buf_str()") Signed-off-by: Nathan Lynch Signed-off-by: Steven Rostedt (Google) commit 0991abeddefa118479b0af32c28bcd662dec1561 Author: Yuezhang Mo Date: Thu Jan 18 09:52:52 2024 +0800 exfat: fix zero the unwritten part for dio read For dio read, bio will be leave in flight when a successful partial aio read have been setup, blockdev_direct_IO() will return -EIOCBQUEUED. In the case, iter->iov_offset will be not advanced, the oops reported by syzbot will occur if revert iter->iov_offset with iov_iter_revert(). The unwritten part had been zeroed by aio read, so there is no need to zero it in dio read. Reported-by: syzbot+fd404f6b03a58e8bc403@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=fd404f6b03a58e8bc403 Fixes: 11a347fb6cef ("exfat: change to get file size from DataLength") Signed-off-by: Yuezhang Mo Signed-off-by: Namjae Jeon commit bcbc84af1183c8cf3d1ca9b78540c2185cd85e7f Author: Felix Fietkau Date: Thu Jan 4 19:10:59 2024 +0100 wifi: mac80211: fix race condition on enabling fast-xmit fast-xmit must only be enabled after the sta has been uploaded to the driver, otherwise it could end up passing the not-yet-uploaded sta via drv_tx calls to the driver, leading to potential crashes because of uninitialized drv_priv data. Add a missing sta->uploaded check and re-check fast xmit after inserting a sta. Signed-off-by: Felix Fietkau Link: https://msgid.link/20240104181059.84032-1-nbd@nbd.name Signed-off-by: Johannes Berg commit cf4a0d840ecc72fcf16198d5e9c505ab7d5a5e4d Author: Emmanuel Grumbach Date: Thu Jan 11 15:07:25 2024 +0200 wifi: iwlwifi: fix a memory corruption iwl_fw_ini_trigger_tlv::data is a pointer to a __le32, which means that if we copy to iwl_fw_ini_trigger_tlv::data + offset while offset is in bytes, we'll write past the buffer. Cc: stable@vger.kernel.org Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218233 Fixes: cf29c5b66b9f ("iwlwifi: dbg_ini: implement time point handling") Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20240111150610.2d2b8b870194.I14ed76505a5cf87304e0c9cc05cc0ae85ed3bf91@changeid Signed-off-by: Johannes Berg commit b01a74b3ca6fd51b62c67733ba7c3280fa6c5d26 Author: Johannes Berg Date: Thu Jan 11 18:17:44 2024 +0200 wifi: mac80211: fix potential sta-link leak When a station is allocated, links are added but not set to valid yet (e.g. during connection to an AP MLD), we might remove the station without ever marking links valid, and leak them. Fix that. Fixes: cb71f1d136a6 ("wifi: mac80211: add sta link addition/removal") Signed-off-by: Johannes Berg Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://msgid.link/20240111181514.6573998beaf8.I09ac2e1d41c80f82a5a616b8bd1d9d8dd709a6a6@changeid Signed-off-by: Johannes Berg commit 26490da5a71da9064e58f0d4ce82756c26ef9eb1 Author: Lukas Bulwahn Date: Thu Jan 18 09:25:45 2024 +0100 wifi: cfg80211/mac80211: remove dependency on non-existing option Commit ffbd0c8c1e7f ("wifi: mac80211: add an element parsing unit test") and commit 730eeb17bbdd ("wifi: cfg80211: add first kunit tests, for element defrag") add new configs that depend on !KERNEL_6_2, but the config option KERNEL_6_2 does not exist in the tree. This dependency is used for handling backporting to restrict the option to certain kernels but this really should not be carried around the mainline kernel tree. Clean up this needless dependency on the non-existing option KERNEL_6_2. Link: https://lore.kernel.org/lkml/CAKXUXMyfrM6amOR7Ysim3WNQ-Ckf9HJDqRhAoYmLXujo1UV+yA@mail.gmail.com/ Signed-off-by: Lukas Bulwahn Signed-off-by: Johannes Berg commit a6e4f85d3820d00694ed10f581f4c650445dbcda Author: Michal Kazior Date: Tue Jan 16 14:22:57 2024 +0000 wifi: cfg80211: fix missing interfaces when dumping The nl80211_dump_interface() supports resumption in case nl80211_send_iface() doesn't have the resources to complete its work. The logic would store the progress as iteration offsets for rdev and wdev loops. However the logic did not properly handle resumption for non-last rdev. Assuming a system with 2 rdevs, with 2 wdevs each, this could happen: dump(cb=[0, 0]): if_start=cb[1] (=0) send rdev0.wdev0 -> ok send rdev0.wdev1 -> yield cb[1] = 1 dump(cb=[0, 1]): if_start=cb[1] (=1) send rdev0.wdev1 -> ok // since if_start=1 the rdev0.wdev0 got skipped // through if_idx < if_start send rdev1.wdev1 -> ok The if_start needs to be reset back to 0 upon wdev loop end. The problem is actually hard to hit on a desktop, and even on most routers. The prerequisites for this manifesting was: - more than 1 wiphy - a few handful of interfaces - dump without rdev or wdev filter I was seeing this with 4 wiphys 9 interfaces each. It'd miss 6 interfaces from the last wiphy reported to userspace. Signed-off-by: Michal Kazior Link: https://msgid.link/20240116142340.89678-1-kazikcz@gmail.com Signed-off-by: Johannes Berg commit f1172f3ee3a98754d95b968968920a7d03fdebcc Author: Ludvig Pärsson Date: Wed Jan 17 13:03:14 2024 +0100 ethtool: netlink: Add missing ethnl_ops_begin/complete Accessing an ethernet device that is powered off or clock gated might cause the CPU to hang. Add ethnl_ops_begin/complete in ethnl_set_features() to protect against this. Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request") Signed-off-by: Ludvig Pärsson Link: https://lore.kernel.org/r/20240117-etht2-v2-1-1a96b6e8c650@axis.com Signed-off-by: Paolo Abeni commit 1b20d0486a602417defb5bf33320d31b2a7a47f8 Author: Robin Murphy Date: Wed Jan 17 17:05:45 2024 +0000 arm64: Fix silcon-errata.rst formatting Remove the errant blank lines to make the desired empty row separators around the Fujitsu and ASR entries in the main table, rather than them being their own separate tables which then look odd in the HTML view. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/b6637654eda761e224f828a44a7bbc1eadf2ef88.1705511145.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit dc7eb8755797ed41a0d1b5c0c39df3c8f401b3d9 Author: Mark Brown Date: Mon Jan 15 20:15:46 2024 +0000 arm64/sme: Always exit sme_alloc() early with existing storage When sme_alloc() is called with existing storage and we are not flushing we will always allocate new storage, both leaking the existing storage and corrupting the state. Fix this by separating the checks for flushing and for existing storage as we do for SVE. Callers that reallocate (eg, due to changing the vector length) should call sme_free() themselves. Fixes: 5d0a8d2fba50 ("arm64/ptrace: Ensure that SME is set up for target when writing SSVE state") Signed-off-by: Mark Brown Cc: Link: https://lore.kernel.org/r/20240115-arm64-sme-flush-v1-1-7472bd3459b7@kernel.org Signed-off-by: Will Deacon commit 8410186ca48002092818500b7c209e569b47a2ac Author: Mark Brown Date: Mon Jan 15 19:53:01 2024 +0000 arm64/fpsimd: Remove spurious check for SVE support There is no need to check for SVE support when changing vector lengths, even if the system is SME only we still need SVE storage for the streaming SVE state. Fixes: d4d5be94a878 ("arm64/fpsimd: Ensure SME storage is allocated after SVE VL changes") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20240115-arm64-sve-enabled-check-v1-1-a26360b00f6d@kernel.org Signed-off-by: Will Deacon commit 84b5ece64477df4394d362d494a2496bf0878985 Author: Lucas De Marchi Date: Fri Jan 12 07:49:12 2024 -0800 drm/i915: Drop -Wstringop-overflow -Wstringop-overflow is broken on GCC11. In future changes it will be moved to the normal C flags in the top level Makefile (out of Makefile.extrawarn), but accounting for the compiler support. Just remove it out of i915's forced extra warnings, preparing for the upcoming change and avoiding build warnings to show up. Fixes: 2250c7ead8ad ("drm/i915: enable W=1 warnings by default") References: https://lore.kernel.org/all/45ad1d0f-a10f-483e-848a-76a30252edbe@paulmck-laptop/ Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240112154912.1775199-1-lucas.demarchi@intel.com (cherry picked from commit 05ae67d95bade8b7facd5612baea21c12d243149) Signed-off-by: Joonas Lahtinen commit 6992eb815d087858f8d7e4020529c2fe800456b3 Author: Ville Syrjälä Date: Tue Jan 16 23:08:21 2024 +0200 Revert "drm/i915/dsi: Do display on sequence later on icl+" This reverts commit 88b065943cb583e890324d618e8d4b23460d51a3. Lenovo 82TQ is unhappy if we do the display on sequence this late. The display output shows severe corruption. It's unclear if this is a failure on our part (perhaps something to do with sending commands in LP mode after HS /video mode transmission has been started? Though the backlight on command at least seems to work) or simply that there are some commands in the sequence that are needed to be done earlier (eg. could be some DSC init stuff?). If the latter then I don't think the current Windows code would work either, but maybe this was originally tested with an older driver, who knows. Root causing this fully would likely require a lot of experimentation which isn't really feasible without direct access to the machine, so let's just accept failure and go back to the original sequence. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10071 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20240116210821.30194-1-ville.syrjala@linux.intel.com Acked-by: Jani Nikula (cherry picked from commit dc524d05974f615b145404191fcf91b478950499) Signed-off-by: Joonas Lahtinen commit b7c510d049049409e8945b932f4b0b357fa17415 Author: Mark Brown Date: Mon Jan 15 18:42:38 2024 +0000 arm64/ptrace: Don't flush ZA/ZT storage when writing ZA via ptrace When writing ZA we currently unconditionally flush the buffer used to store it as part of ensuring that it is allocated. Since this buffer is shared with ZT0 this means that a write to ZA when PSTATE.ZA is already set will corrupt the value of ZT0 on a SME2 system. Fix this by only flushing the backing storage if PSTATE.ZA was not previously set. This will mean that short or failed writes may leave stale data in the buffer, this seems as correct as our current behaviour and unlikely to be something that userspace will rely on. Fixes: f90b529bcbe5 ("arm64/sme: Implement ZT0 ptrace support") Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20240115-arm64-fix-ptrace-za-zt-v1-1-48617517028a@kernel.org Signed-off-by: Will Deacon commit da59f1d051d57e85eca49401a3a36d5a622babde Author: Mark Rutland Date: Tue Jan 16 11:02:21 2024 +0000 arm64: entry: simplify kernel_exit logic For historical reasons, the non-KPTI exception return path is duplicated for EL1 and EL0, with the structure: .if \el == 0 [ KPTI handling ] ldr lr, [sp, #S_LR] add sp, sp, #PT_REGS_SIZE // restore sp [ EL0 exception return workaround ] eret .else ldr lr, [sp, #S_LR] add sp, sp, #PT_REGS_SIZE // restore sp [ EL1 exception return workaround ] eret .endif sb This would be simpler and clearer with the common portions factored out, e.g. .if \el == 0 [ KPTI handling ] .endif ldr lr, [sp, #S_LR] add sp, sp, #PT_REGS_SIZE // restore sp .if \el == 0 [ EL0 exception return workaround ] .else [ EL1 exception return workaround ] .endif eret sb This expands to the same code, but is simpler for a human to follow as it avoids duplicates the restore of LR+SP, and makes it clear that the ERET is associated with the SB. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Rob Herring Cc: Will Deacon Link: https://lore.kernel.org/r/20240116110221.420467-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 832dd634bd1b4e3bbe9f10b9c9ba5db6f6f2b97f Author: Mark Rutland Date: Tue Jan 16 11:02:20 2024 +0000 arm64: entry: fix ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD Currently the ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD workaround isn't quite right, as it is supposed to be applied after the last explicit memory access, but is immediately followed by an LDR. The ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD workaround is used to handle Cortex-A520 erratum 2966298 and Cortex-A510 erratum 3117295, which are described in: * https://developer.arm.com/documentation/SDEN2444153/0600/?lang=en * https://developer.arm.com/documentation/SDEN1873361/1600/?lang=en In both cases the workaround is described as: | If pagetable isolation is disabled, the context switch logic in the | kernel can be updated to execute the following sequence on affected | cores before exiting to EL0, and after all explicit memory accesses: | | 1. A non-shareable TLBI to any context and/or address, including | unused contexts or addresses, such as a `TLBI VALE1 Xzr`. | | 2. A DSB NSH to guarantee completion of the TLBI. The important part being that the TLBI+DSB must be placed "after all explicit memory accesses". Unfortunately, as-implemented, the TLBI+DSB is immediately followed by an LDR, as we have: | alternative_if ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD | tlbi vale1, xzr | dsb nsh | alternative_else_nop_endif | alternative_if_not ARM64_UNMAP_KERNEL_AT_EL0 | ldr lr, [sp, #S_LR] | add sp, sp, #PT_REGS_SIZE // restore sp | eret | alternative_else_nop_endif | | [ ... KPTI exception return path ... ] This patch fixes this by reworking the logic to place the TLBI+DSB immediately before the ERET, after all explicit memory accesses. The ERET is currently in a separate alternative block, and alternatives cannot be nested. To account for this, the alternative block for ARM64_UNMAP_KERNEL_AT_EL0 is replaced with a single alternative branch to skip the KPTI logic, with the new shape of the logic being: | alternative_insn "b .L_skip_tramp_exit_\@", nop, ARM64_UNMAP_KERNEL_AT_EL0 | [ ... KPTI exception return path ... ] | .L_skip_tramp_exit_\@: | | ldr lr, [sp, #S_LR] | add sp, sp, #PT_REGS_SIZE // restore sp | | alternative_if ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD | tlbi vale1, xzr | dsb nsh | alternative_else_nop_endif | eret The new structure means that the workaround is only applied when KPTI is not in use; this is fine as noted in the documented implications of the erratum: | Pagetable isolation between EL0 and higher level ELs prevents the | issue from occurring. ... and as per the workaround description quoted above, the workaround is only necessary "If pagetable isolation is disabled". Fixes: 471470bc7052 ("arm64: errata: Add Cortex-A520 speculative unprivileged load workaround") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Rob Herring Cc: Will Deacon Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240116110221.420467-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit dd2d40acdbb2b9e6bcddd5424b0e00c1760ecf26 Author: Benjamin Poirier Date: Tue Jan 16 10:49:26 2024 -0500 selftests: bonding: Add more missing config options As a followup to commit 03fb8565c880 ("selftests: bonding: add missing build configs"), add more networking-specific config options which are needed for bonding tests. For testing, I used the minimal config generated by virtme-ng and I added the options in the config file. All bonding tests passed. Fixes: bbb774d921e2 ("net: Add tests for bonding and team address list management") # for ipv6 Fixes: 6cbe791c0f4e ("kselftest: bonding: add num_grat_arp test") # for tc options Fixes: 222c94ec0ad4 ("selftests: bonding: add tests for ether type changes") # for nlmon Suggested-by: Jakub Kicinski Signed-off-by: Benjamin Poirier Link: https://lore.kernel.org/r/20240116154926.202164-1-bpoirier@nvidia.com Signed-off-by: Paolo Abeni commit 39369c9a6e090619a7b5eedb2212c99ac8a03890 Author: Jakub Kicinski Date: Tue Jan 16 07:43:11 2024 -0800 selftests: netdevsim: add a config file netdevsim tests aren't very well integrated with kselftest, which has its advantages and disadvantages. But regardless of the intended integration - a config file to know what kernel to build is very useful, add one. Fixes: fc4c93f145d7 ("selftests: add basic netdevsim devlink flash testing") Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20240116154311.1945801-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 556857aa1d0855aba02b1c63bc52b91ec63fc2cc Author: Benjamin Berg Date: Mon Jan 15 11:18:05 2024 +0100 wifi: ath11k: rely on mac80211 debugfs handling for vif mac80211 started to delete debugfs entries in certain cases, causing a ath11k to crash when it tried to delete the entries later. Fix this by relying on mac80211 to delete the entries when appropriate and adding them from the vif_add_debugfs handler. Fixes: 0a3d898ee9a8 ("wifi: mac80211: add/remove driver debugfs entries as appropriate") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218364 Signed-off-by: Benjamin Berg Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20240115101805.1277949-1-benjamin@sipsolutions.net commit 4d695869d3fb952d6f690bec0260ffe2a8b99b37 Author: Benjamin Tissoires Date: Wed Jan 17 14:27:15 2024 +0100 selftests/hid: wacom: fix confidence tests The device is exported with a fuzz of 4, meaning that the `+ t` here is removed by the fuzz algorithm, making those tests failing. Not sure why, but when I run this locally it was passing, but not in the VM of the CI. Fixes: b0fb904d074e ("HID: wacom: Add additional tests of confidence behavior") Link: https://gitlab.freedesktop.org/bentiss/hid/-/jobs/53692957#L3315 Acked-by: Jason Gerecke Link: https://lore.kernel.org/r/20240117-b4-wip-wacom-tests-fixes-v1-1-f317784f3c36@kernel.org Signed-off-by: Benjamin Tissoires commit 35ac085a94efe82d906d3a812612d432aa267cbe Merge: 33772ff3b887e 76ec90a996e3c Author: Alexei Starovoitov Date: Wed Jan 17 20:20:06 2024 -0800 Merge branch 'tighten-up-arg-ctx-type-enforcement' Andrii Nakryiko says: ==================== Tighten up arg:ctx type enforcement Follow up fixes for kernel-side and libbpf-side logic around handling arg:ctx (__arg_ctx) tagged arguments of BPF global subprogs. Patch #1 adds libbpf feature detection of kernel-side __arg_ctx support to avoid unnecessary rewriting BTF types. With stricter kernel-side type enforcement this is now mandatory to avoid problems with using `struct bpf_user_pt_regs_t` instead of actual typedef. For __arg_ctx tagged arguments verifier is now supporting either `bpf_user_pt_regs_t` typedef or resolves it down to the actual struct (pt_regs/user_pt_regs/user_regs_struct), depending on architecture), but for old kernels without __arg_ctx support it's more backwards compatible for libbpf to use `struct bpf_user_pt_regs_t` rewrite which will work on wider range of kernels. So feature detection prevent libbpf accidentally breaking global subprogs on new kernels. We also adjust selftests to do similar feature detection (much simpler, but potentially breaking due to kernel source code refactoring, which is fine for selftests), and skip tests expecting libbpf's BTF type rewrites. Patch #2 is preparatory refactoring for patch #3 which adds type enforcement for arg:ctx tagged global subprog args. See the patch for specifics. Patch #4 adds many new cases to ensure type logic works as expected. Finally, patch #5 adds a relevant subset of kernel-side type checks to __arg_ctx cases that libbpf supports rewrite of. In libbpf's case, type violations are reported as warnings and BTF rewrite is not performed, which will eventually lead to BPF verifier complaining at program verification time. Good care was taken to avoid conflicts between bpf and bpf-next tree (which has few follow up refactorings in the same code area). Once trees converge some of the code will be moved around a bit (and some will be deleted), but with no change to functionality or general shape of the code. v2->v3: - support `bpf_user_pt_regs_t` typedef for KPROBE and PERF_EVENT (CI); v1->v2: - add user_pt_regs and user_regs_struct support for PERF_EVENT (CI); - drop FEAT_ARG_CTX_TAG enum leftover from patch #1; - fix warning about default: without break in the switch (CI). ==================== Link: https://lore.kernel.org/r/20240118033143.3384355-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 76ec90a996e3c707eb6772510afa36faeba2ecff Author: Andrii Nakryiko Date: Wed Jan 17 19:31:43 2024 -0800 libbpf: warn on unexpected __arg_ctx type when rewriting BTF On kernel that don't support arg:ctx tag, before adjusting global subprog BTF information to match kernel's expected canonical type names, make sure that types used by user are meaningful, and if not, warn and don't do BTF adjustments. This is similar to checks that kernel performs, but narrower in scope, as only a small subset of BPF program types can be accommodated by libbpf using canonical type names. Libbpf unconditionally allows `struct pt_regs *` for perf_event program types, unlike kernel, which supports that conditionally on architecture. This is done to keep things simple and not cause unnecessary false positives. This seems like a minor and harmless deviation, which in real-world programs will be caught by kernels with arg:ctx tag support anyways. So KISS principle. This logic is hard to test (especially on latest kernels), so manual testing was performed instead. Libbpf emitted the following warning for perf_event program with wrong context argument type: libbpf: prog 'arg_tag_ctx_perf': subprog 'subprog_ctx_tag' arg#0 is expected to be of `struct bpf_perf_event_data *` type Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240118033143.3384355-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 989410cde81959c4033dc287d79b42b6eb04f04f Author: Andrii Nakryiko Date: Wed Jan 17 19:31:42 2024 -0800 selftests/bpf: add tests confirming type logic in kernel for __arg_ctx Add a bunch of global subprogs across variety of program types to validate expected kernel type enforcement logic for __arg_ctx arguments. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240118033143.3384355-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 0ba971511d16603599f947459e59b435cc465b0d Author: Andrii Nakryiko Date: Wed Jan 17 19:31:41 2024 -0800 bpf: enforce types for __arg_ctx-tagged arguments in global subprogs Add enforcement of expected types for context arguments tagged with arg:ctx (__arg_ctx) tag. First, any program type will accept generic `void *` context type when combined with __arg_ctx tag. Besides accepting "canonical" struct names and `void *`, for a bunch of program types for which program context is actually a named struct, we allows a bunch of pragmatic exceptions to match real-world and expected usage: - for both kprobes and perf_event we allow `bpf_user_pt_regs_t *` as canonical context argument type, where `bpf_user_pt_regs_t` is a *typedef*, not a struct; - for kprobes, we also always accept `struct pt_regs *`, as that's what actually is passed as a context to any kprobe program; - for perf_event, we resolve typedefs (unless it's `bpf_user_pt_regs_t`) down to actual struct type and accept `struct pt_regs *`, or `struct user_pt_regs *`, or `struct user_regs_struct *`, depending on the actual struct type kernel architecture points `bpf_user_pt_regs_t` typedef to; otherwise, canonical `struct bpf_perf_event_data *` is expected; - for raw_tp/raw_tp.w programs, `u64/long *` are accepted, as that's what's expected with BPF_PROG() usage; otherwise, canonical `struct bpf_raw_tracepoint_args *` is expected; - tp_btf supports both `struct bpf_raw_tracepoint_args *` and `u64 *` formats, both are coded as expections as tp_btf is actually a TRACING program type, which has no canonical context type; - iterator programs accept `struct bpf_iter__xxx *` structs, currently with no further iterator-type specific enforcement; - fentry/fexit/fmod_ret/lsm/struct_ops all accept `u64 *`; - classic tracepoint programs, as well as syscall and freplace programs allow any user-provided type. In all other cases kernel will enforce exact match of struct name to expected canonical type. And if user-provided type doesn't match that expectation, verifier will emit helpful message with expected type name. Note a bit unnatural way the check is done after processing all the arguments. This is done to avoid conflict between bpf and bpf-next trees. Once trees converge, a small follow up patch will place a simple btf_validate_prog_ctx_type() check into a proper ARG_PTR_TO_CTX branch (which bpf-next tree patch refactored already), removing duplicated arg:ctx detection logic. Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240118033143.3384355-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 66967a32d3b16ed447e76fed4d946bab52e43d86 Author: Andrii Nakryiko Date: Wed Jan 17 19:31:40 2024 -0800 bpf: extract bpf_ctx_convert_map logic and make it more reusable Refactor btf_get_prog_ctx_type() a bit to allow reuse of bpf_ctx_convert_map logic in more than one places. Simplify interface by returning btf_type instead of btf_member (field reference in BTF). To do the above we need to touch and start untangling btf_translate_to_vmlinux() implementation. We do the bare minimum to not regress anything for btf_translate_to_vmlinux(), but its implementation is very questionable for what it claims to be doing. Mapping kfunc argument types to kernel corresponding types conceptually is quite different from recognizing program context types. Fixing this is out of scope for this change though. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240118033143.3384355-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 01b55f4f0cd6ad1a16eca6c43a3190005892ef91 Author: Andrii Nakryiko Date: Wed Jan 17 19:31:39 2024 -0800 libbpf: feature-detect arg:ctx tag support in kernel Add feature detector of kernel-side arg:ctx (__arg_ctx) tag support. If this is detected, libbpf will avoid doing any __arg_ctx-related BTF rewriting and checks in favor of letting kernel handle this completely. test_global_funcs/ctx_arg_rewrite subtest is adjusted to do the same feature detection (albeit in much simpler, though round-about and inefficient, way), and skip the tests. This is done to still be able to execute this test on older kernels (like in libbpf CI). Note, BPF token series ([0]) does a major refactor and code moving of libbpf-internal feature detection "framework", so to avoid unnecessary conflicts we keep newly added feature detection stand-alone with ad-hoc result caching. Once things settle, there will be a small follow up to re-integrate everything back and move code into its final place in newly-added (by BPF token series) features.c file. [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=814209&state=* Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240118033143.3384355-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 080c4324fa5e81ff3780206a138223abfb57a68e Author: Maxim Kochetkov Date: Thu Dec 14 09:39:06 2023 +0300 riscv: optimize ELF relocation function in riscv The patch can optimize the running times of insmod command by modify ELF relocation function. In the 5.10 and latest kernel, when install the riscv ELF drivers which contains multiple symbol table items to be relocated, kernel takes a lot of time to execute the relocation. For example, we install a 3+MB driver need 180+s. We focus on the riscv architecture handle R_RISCV_HI20 and R_RISCV_LO20 type items relocation function in the arch\riscv\kernel\module.c and find that there are two-loops in the function. If we modify the begin number in the second for-loops iteration, we could save significant time for installation. We install the same 3+MB driver could just need 2s. Signed-off-by: Amma Lee Signed-off-by: Maxim Kochetkov Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20231214063906.13612-1-fido_max@inbox.ru Signed-off-by: Palmer Dabbelt commit 10243401059287868a5651f869a2494368872add Author: Samuel Ortiz Date: Thu Nov 30 12:17:02 2023 +0100 RISC-V: Implement archrandom when Zkr is available The Zkr extension is ratified and provides 16 bits of entropy seed when reading the SEED CSR. We can implement arch_get_random_seed_longs() by doing multiple csrrw to that CSR and filling an unsigned long with valid entropy bits. Acked-by: Conor Dooley Signed-off-by: Samuel Ortiz Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231130111704.1319081-1-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 55ca8d7aa2af3ebdb6f85cccf1b0703d031c1678 Author: Xiao Wang Date: Sun Nov 12 17:52:44 2023 +0800 riscv: Optimize hweight API with Zbb extension The Hamming Weight of a number is the total number of bits set in it, so the cpop/cpopw instruction from Zbb extension can be used to accelerate hweight() API. Signed-off-by: Xiao Wang Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20231112095244.4015351-1-xiao.w.wang@intel.com Signed-off-by: Palmer Dabbelt commit c4db7ff7a9edf504752704f08aabb5554bd6c37f Author: Masahiro Yamada Date: Sun Nov 19 19:00:24 2023 +0900 riscv: add dependency among Image(.gz), loader(.bin), and vmlinuz.efi A common issue in Makefile is a race in parallel building. You need to be careful to prevent multiple threads from writing to the same file simultaneously. Commit 3939f3345050 ("ARM: 8418/1: add boot image dependencies to not generate invalid images") addressed such a bad scenario. A similar symptom occurs with the following command: $ make -j$(nproc) ARCH=riscv Image Image.gz loader loader.bin vmlinuz.efi [ snip ] SORTTAB vmlinux OBJCOPY arch/riscv/boot/Image OBJCOPY arch/riscv/boot/Image OBJCOPY arch/riscv/boot/Image OBJCOPY arch/riscv/boot/Image OBJCOPY arch/riscv/boot/Image GZIP arch/riscv/boot/Image.gz AS arch/riscv/boot/loader.o AS arch/riscv/boot/loader.o Kernel: arch/riscv/boot/Image is ready PAD arch/riscv/boot/vmlinux.bin GZIP arch/riscv/boot/vmlinuz Kernel: arch/riscv/boot/loader is ready OBJCOPY arch/riscv/boot/loader.bin Kernel: arch/riscv/boot/loader.bin is ready Kernel: arch/riscv/boot/Image.gz is ready OBJCOPY arch/riscv/boot/vmlinuz.o LD arch/riscv/boot/vmlinuz.efi.elf OBJCOPY arch/riscv/boot/vmlinuz.efi Kernel: arch/riscv/boot/vmlinuz.efi is ready The log "OBJCOPY arch/riscv/boot/Image" is displayed 5 times. (also "AS arch/riscv/boot/loader.o" twice.) It indicates that 5 threads simultaneously enter arch/riscv/boot/ and write to arch/riscv/boot/Image. It occasionally leads to a build failure: $ make -j$(nproc) ARCH=riscv Image Image.gz loader loader.bin vmlinuz.efi [ snip ] SORTTAB vmlinux OBJCOPY arch/riscv/boot/Image OBJCOPY arch/riscv/boot/Image OBJCOPY arch/riscv/boot/Image OBJCOPY arch/riscv/boot/Image PAD arch/riscv/boot/vmlinux.bin truncate: Invalid number: 'arch/riscv/boot/vmlinux.bin' make[2]: *** [drivers/firmware/efi/libstub/Makefile.zboot:13: arch/riscv/boot/vmlinux.bin] Error 1 make[2]: *** Deleting file 'arch/riscv/boot/vmlinux.bin' make[1]: *** [arch/riscv/Makefile:167: vmlinuz.efi] Error 2 make[1]: *** Waiting for unfinished jobs.... Kernel: arch/riscv/boot/Image is ready GZIP arch/riscv/boot/Image.gz AS arch/riscv/boot/loader.o AS arch/riscv/boot/loader.o Kernel: arch/riscv/boot/loader is ready OBJCOPY arch/riscv/boot/loader.bin Kernel: arch/riscv/boot/loader.bin is ready Kernel: arch/riscv/boot/Image.gz is ready make: *** [Makefile:234: __sub-make] Error 2 Image.gz, loader, vmlinuz.efi depend on Image. loader.bin depends on loader. Such dependencies are not specified in arch/riscv/Makefile. Signed-off-by: Masahiro Yamada Acked-by: Ard Biesheuvel Reviewed-by: Samuel Holland Tested-by: Samuel Holland Link: https://lore.kernel.org/r/20231119100024.2370992-1-masahiroy@kernel.org Signed-off-by: Palmer Dabbelt commit 3074e8b175382b97545e4d9e26c98a5077b02cb1 Merge: 448857ec53a47 629291dd8499e Author: Palmer Dabbelt Date: Wed Jan 17 18:17:29 2024 -0800 Merge patch series "riscv: ftrace: Miscellaneous ftrace improvements" Björn Töpel says: This series includes a three ftrace improvements for RISC-V: 1. Do not require to run recordmcount at build time (patch 1) 2. Simplification of the function graph functionality (patch 2) 3. Enable DYNAMIC_FTRACE_WITH_DIRECT_CALLS (patch 3 and 4) The series has been tested on Qemu/rv64 virt/Debian sid with the following test configs: CONFIG_FTRACE_SELFTEST=y CONFIG_FTRACE_STARTUP_TEST=y CONFIG_SAMPLE_FTRACE_DIRECT=m CONFIG_SAMPLE_FTRACE_DIRECT_MULTI=m CONFIG_SAMPLE_FTRACE_OPS=m All tests pass. * b4-shazam-merge: samples: ftrace: Add RISC-V support for SAMPLE_FTRACE_DIRECT[_MULTI] riscv: ftrace: Add DYNAMIC_FTRACE_WITH_DIRECT_CALLS support riscv: ftrace: Make function graph use ftrace directly riscv: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY Link: https://lore.kernel.org/r/20231130121531.1178502-1-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 629291dd8499e4dc7dff6e9ab8c13b1a841059e8 Author: Song Shuai Date: Thu Nov 30 13:15:31 2023 +0100 samples: ftrace: Add RISC-V support for SAMPLE_FTRACE_DIRECT[_MULTI] Add RISC-V variants of the ftrace-direct* samples. Tested-by: Evgenii Shatokhin Signed-off-by: Song Shuai Tested-by: Guo Ren Signed-off-by: Guo Ren Acked-by: Björn Töpel Link: https://lore.kernel.org/r/20231130121531.1178502-5-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 196c79f19a92764d45005599f35338cf0a9eafbb Author: Song Shuai Date: Thu Nov 30 13:15:30 2023 +0100 riscv: ftrace: Add DYNAMIC_FTRACE_WITH_DIRECT_CALLS support Select the DYNAMIC_FTRACE_WITH_DIRECT_CALLS to provide the register_ftrace_direct[_multi] interfaces allowing users to register the customed trampoline (direct_caller) as the mcount for one or more target functions. And modify_ftrace_direct[_multi] are also provided for modifying direct_caller. To make the direct_caller and the other ftrace hooks (e.g. function/fgraph tracer, k[ret]probes) co-exist, a temporary register is nominated to store the address of direct_caller in ftrace_regs_caller. After the setting of the address direct_caller by direct_ops->func and the RESTORE_REGS in ftrace_regs_caller, direct_caller will be jumped to by the `jr` inst. Add DYNAMIC_FTRACE_WITH_DIRECT_CALLS support for RISC-V. Signed-off-by: Song Shuai Tested-by: Guo Ren Signed-off-by: Guo Ren Acked-by: Björn Töpel Link: https://lore.kernel.org/r/20231130121531.1178502-4-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 35e61e8827ee8ea09e6093ab4d8ba45efd537e36 Author: Song Shuai Date: Thu Nov 30 13:15:29 2023 +0100 riscv: ftrace: Make function graph use ftrace directly Similar to commit 0c0593b45c9b ("x86/ftrace: Make function graph use ftrace directly") and commit c4a0ebf87ceb ("arm64/ftrace: Make function graph use ftrace directly"), RISC-V has no need for a special graph tracer hook. The graph_ops::func function can be used to install the return_hooker. This cleanup only changes the FTRACE_WITH_REGS implementation, leaving the mcount-based implementation is unaffected. Perform the simplification, and also cleanup the register save/restore macros. Signed-off-by: Song Shuai Tested-by: Guo Ren Signed-off-by: Guo Ren Acked-by: Björn Töpel Link: https://lore.kernel.org/r/20231130121531.1178502-3-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit b546d6363af4791567dcd145109837fe97cc8ba5 Author: Song Shuai Date: Thu Nov 30 13:15:28 2023 +0100 riscv: select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY In commit afc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") RISC-V added support for -fpatchable-function-entry, which removes the need for recordmcount. Select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY to tell the build system not to run recordmcount. Link: https://lore.kernel.org/linux-riscv/CAAYs2=j3Eak9vU6xbAw0zPuoh00rh8v5C2U3fePkokZFibWs2g@mail.gmail.com/T/#t Link: https://lore.kernel.org/linux-riscv/Y4jtfrJt+%2FQ5nMOz@spud/ Signed-off-by: Song Shuai Tested-by: Guo Ren Signed-off-by: Guo Ren Acked-by: Björn Töpel Link: https://lore.kernel.org/r/20231130121531.1178502-2-bjorn@kernel.org Signed-off-by: Palmer Dabbelt commit 448857ec53a47718b50cdb38b9380660b3f84b20 Merge: c640868491105 a4426641f00cd Author: Palmer Dabbelt Date: Wed Jan 17 18:08:30 2024 -0800 Merge patch series "RISC-V: Disable DWARF5 with known broken LLVM versions" Nathan Chancellor says: This series disables DWARF5 for LLVM versions where it is known to be broken due to linker relaxation. * b4-shazam-merge: lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name riscv: Restrict DWARF5 when building with LLVM to known working versions riscv: Hoist linker relaxation disabling logic into Kconfig Link: https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 Link: https://lore.kernel.org/r/20231205-riscv-restrict-dwarf5-llvm-v2-0-aedf00a382ac@kernel.org Signed-off-by: Palmer Dabbelt commit a4426641f00cd2c293c91e881ab31faaf76b20fb Author: Nathan Chancellor Date: Tue Dec 5 16:53:52 2023 -0700 lib/Kconfig.debug: Update AS_HAS_NON_CONST_LEB128 comment and name Fangrui noted that the comment around CONFIG_AS_HAS_NON_CONST_LEB128 could be made more accurate because explicit .sleb128 directives are not emitted, only .uleb128 directives are. Rename the symbol to CONFIG_AS_HAS_NON_CONST_ULEB128 as a result. Further clarifications include replacing "symbol deltas" with the more accurate "label differences", noting that this issue has been resolved in newer binutils (2.41+), and it only occurs when a port uses RISC-V style linker relaxation. Suggested-by: Fangrui Song Signed-off-by: Nathan Chancellor Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20231205-riscv-restrict-dwarf5-llvm-v2-3-aedf00a382ac@kernel.org Signed-off-by: Palmer Dabbelt commit ae84ff9a14a5a8d36a329a30626800155782e617 Author: Nathan Chancellor Date: Tue Dec 5 16:53:51 2023 -0700 riscv: Restrict DWARF5 when building with LLVM to known working versions LLVM prior to 18.0.0 would generate incorrect debug info for DWARF5 due to linker relaxation, which was worked around in clang by defaulting RISC-V to DWARF4 [1]. Unfortunately, this workaround does not work for the kernel because the DWARF version can be independently changed from the default in Kconfig. Do not allow DWARF5 to be selected for RISC-V when using linker relaxation (ld.lld >= 15.0.0) and a version of LLVM that does not have the fixes (the integrated assembler [2] and ld.lld [3] < 18.0.0) necessary to generate the correct debug info. Link: https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6 [1] Link: https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a [2] Link: https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77 [3] Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song Link: https://lore.kernel.org/r/20231205-riscv-restrict-dwarf5-llvm-v2-2-aedf00a382ac@kernel.org Signed-off-by: Palmer Dabbelt commit 55b71d2ce133da893ffb1ecd69a34e1fee509292 Author: Nathan Chancellor Date: Tue Dec 5 16:53:50 2023 -0700 riscv: Hoist linker relaxation disabling logic into Kconfig Certain configurations may need to be disabled if linker relaxation is in use, such as DWARF5 with ld.lld < 18. Hoist the logic of whether or not linker relaxation is in use into Kconfig so decisions can be made at configuration time. Reviewed-by: Fangrui Song Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20231205-riscv-restrict-dwarf5-llvm-v2-1-aedf00a382ac@kernel.org Signed-off-by: Palmer Dabbelt commit c640868491105d53899f9f8e613acd4aa06cef68 Merge: 0de65288d75ff 6f4c45cbcb00d Author: Palmer Dabbelt Date: Wed Jan 17 18:07:11 2024 -0800 Merge patch series "riscv: Add fine-tuned checksum functions" Charlie Jenkins says: Each architecture generally implements fine-tuned checksum functions to leverage the instruction set. This patch adds the main checksum functions that are used in networking. Tested on QEMU, this series allows the CHECKSUM_KUNIT tests to complete an average of 50.9% faster. This patch takes heavy use of the Zbb extension using alternatives patching. To test this patch, enable the configs for KUNIT, then CHECKSUM_KUNIT. I have attempted to make these functions as optimal as possible, but I have not ran anything on actual riscv hardware. My performance testing has been limited to inspecting the assembly, running the algorithms on x86 hardware, and running in QEMU. ip_fast_csum is a relatively small function so even though it is possible to read 64 bits at a time on compatible hardware, the bottleneck becomes the clean up and setup code so loading 32 bits at a time is actually faster. * b4-shazam-merge: kunit: Add tests for csum_ipv6_magic and ip_fast_csum riscv: Add checksum library riscv: Add checksum header riscv: Add static key for misaligned accesses asm-generic: Improve csum_fold Link: https://lore.kernel.org/r/20240108-optimize_checksum-v15-0-1c50de5f2167@rivosinc.com Signed-off-by: Palmer Dabbelt commit 6f4c45cbcb00d649475a3099235e5b4fce569b4b Author: Charlie Jenkins Date: Mon Jan 8 15:57:06 2024 -0800 kunit: Add tests for csum_ipv6_magic and ip_fast_csum Supplement existing checksum tests with tests for csum_ipv6_magic and ip_fast_csum. Signed-off-by: Charlie Jenkins Link: https://lore.kernel.org/r/20240108-optimize_checksum-v15-5-1c50de5f2167@rivosinc.com Signed-off-by: Palmer Dabbelt commit a04c192eabfb76824d00f1b4cd0f25844a59d0f0 Author: Charlie Jenkins Date: Mon Jan 8 15:57:05 2024 -0800 riscv: Add checksum library Provide a 32 and 64 bit version of do_csum. When compiled for 32-bit will load from the buffer in groups of 32 bits, and when compiled for 64-bit will load in groups of 64 bits. Additionally provide riscv optimized implementation of csum_ipv6_magic. Signed-off-by: Charlie Jenkins Acked-by: Conor Dooley Reviewed-by: Xiao Wang Link: https://lore.kernel.org/r/20240108-optimize_checksum-v15-4-1c50de5f2167@rivosinc.com Signed-off-by: Palmer Dabbelt commit e11e367e9fe57164ea609807ed27184c85263355 Author: Charlie Jenkins Date: Mon Jan 8 15:57:04 2024 -0800 riscv: Add checksum header Provide checksum algorithms that have been designed to leverage riscv instructions such as rotate. In 64-bit, can take advantage of the larger register to avoid some overflow checking. Signed-off-by: Charlie Jenkins Acked-by: Conor Dooley Reviewed-by: Xiao Wang Link: https://lore.kernel.org/r/20240108-optimize_checksum-v15-3-1c50de5f2167@rivosinc.com Signed-off-by: Palmer Dabbelt commit 2ce5729fce8f62b5118f56110d16006c0e22c522 Author: Charlie Jenkins Date: Mon Jan 8 15:57:03 2024 -0800 riscv: Add static key for misaligned accesses Support static branches depending on the value of misaligned accesses. This will be used by a later patch in the series. At any point in time, this static branch will only be enabled if all online CPUs are considered "fast". Signed-off-by: Charlie Jenkins Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20240108-optimize_checksum-v15-2-1c50de5f2167@rivosinc.com Signed-off-by: Palmer Dabbelt commit 1e7196fa5b0312a6a3e49e7c1300e145afcba96b Author: Charlie Jenkins Date: Mon Jan 8 15:57:02 2024 -0800 asm-generic: Improve csum_fold This csum_fold implementation introduced into arch/arc by Vineet Gupta is better than the default implementation on at least arc, x86, and riscv. Using GCC trunk and compiling non-inlined version, this implementation has 41.6667%, 25% fewer instructions on riscv64, x86-64 respectively with -O3 optimization. Most implmentations override this default in asm, but this should be more performant than all of those other implementations except for arm which has barrel shifting and sparc32 which has a carry flag. Signed-off-by: Charlie Jenkins Reviewed-by: David Laight Link: https://lore.kernel.org/r/20240108-optimize_checksum-v15-1-1c50de5f2167@rivosinc.com Signed-off-by: Palmer Dabbelt commit 0de65288d75ff96c30e216557d979fb9342c4323 Author: Andrew Jones Date: Wed Jan 17 14:09:34 2024 +0100 RISC-V: selftests: cbo: Ensure asm operands match constraints The 'i' constraint expects a constant operand, which fn and its constant derivative MK_CBO(fn) are, but passing fn through a function as a parameter and using a local variable for MK_CBO(fn) allow the compiler to lose sight of that when no optimization is done. Use a macro instead of a function and skip the local variable to ensure the compiler uses constants, matching the asm constraints. Reported-by: Yunhui Cui Closes: https://lore.kernel.org/all/20240117082514.42967-1-cuiyunhui@bytedance.com Fixes: a29e2a48afe3 ("RISC-V: selftests: Add CBO tests") Signed-off-by: Andrew Jones Link: https://lore.kernel.org/r/20240117130933.57514-2-ajones@ventanamicro.com Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 296455ade1fdcf5f8f8c033201633b60946c589a Merge: e1aa9df440186 5850edccec303 Author: Linus Torvalds Date: Wed Jan 17 16:47:17 2024 -0800 Merge tag 'char-misc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc and other driver updates from Greg KH: "Here is the big set of char/misc and other driver subsystem changes for 6.8-rc1. Other than lots of binder driver changes (as you can see by the merge conflicts) included in here are: - lots of iio driver updates and additions - spmi driver updates - eeprom driver updates - firmware driver updates - ocxl driver updates - mhi driver updates - w1 driver updates - nvmem driver updates - coresight driver updates - platform driver remove callback api changes - tags.sh script updates - bus_type constant marking cleanups - lots of other small driver updates All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (341 commits) android: removed duplicate linux/errno uio: Fix use-after-free in uio_open drivers: soc: xilinx: add check for platform firmware: xilinx: Export function to use in other module scripts/tags.sh: remove find_sources scripts/tags.sh: use -n to test archinclude scripts/tags.sh: add local annotation scripts/tags.sh: use more portable -path instead of -wholename scripts/tags.sh: Update comment (addition of gtags) firmware: zynqmp: Convert to platform remove callback returning void firmware: turris-mox-rwtm: Convert to platform remove callback returning void firmware: stratix10-svc: Convert to platform remove callback returning void firmware: stratix10-rsu: Convert to platform remove callback returning void firmware: raspberrypi: Convert to platform remove callback returning void firmware: qemu_fw_cfg: Convert to platform remove callback returning void firmware: mtk-adsp-ipc: Convert to platform remove callback returning void firmware: imx-dsp: Convert to platform remove callback returning void firmware: coreboot_table: Convert to platform remove callback returning void firmware: arm_scpi: Convert to platform remove callback returning void firmware: arm_scmi: Convert to platform remove callback returning void ... commit e1aa9df440186af73a9e690244eb49cbc99f36ac Merge: a3f4a07b5027e 7119ca35ee4a0 Author: Linus Torvalds Date: Wed Jan 17 16:23:17 2024 -0800 Merge tag 'pci-v6.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull pci updates from Bjorn Helgaas: "Enumeration: - Reserve ECAM so we don't assign it to PCI BARs; this works around bugs where BIOS included ECAM in a PNP0A03 host bridge window, didn't reserve it via a PNP0C02 motherboard device, and didn't allocate space for SR-IOV VF BARs (Bjorn Helgaas) - Add MMCONFIG/ECAM debug logging (Bjorn Helgaas) - Rename 'MMCONFIG' to 'ECAM' to match spec usage (Bjorn Helgaas) - Log device type (Root Port, Switch Port, etc) during enumeration (Bjorn Helgaas) - Log bridges before downstream devices so the dmesg order is more logical (Bjorn Helgaas) - Log resource names (BAR 0, VF BAR 0, bridge window, etc) consistently instead of a mix of names and "reg 0x10" (Puranjay Mohan, Bjorn Helgaas) - Fix 64GT/s effective data rate calculation to use 1b/1b encoding rather than the 8b/10b or 128b/130b used by lower rates (Ilpo Järvinen) - Use PCI_HEADER_TYPE_* instead of literals in x86, powerpc, SCSI lpfc (Ilpo Järvinen) - Clean up open-coded PCIBIOS return code mangling (Ilpo Järvinen) Resource management: - Restructure pci_dev_for_each_resource() to avoid computing the address of an out-of-bounds array element (the bounds check was performed later so the element was never actually *read*, but it's nicer to avoid even computing an out-of-bounds address) (Andy Shevchenko) Driver binding: - Convert pci-host-common.c platform .remove() callback to .remove_new() returning 'void' since it's not useful to return error codes here (Uwe Kleine-König) - Convert exynos, keystone, kirin from .remove() to .remove_new(), which returns void instead of int (Uwe Kleine-König) - Drop unused struct pci_driver.node member (Mathias Krause) Virtualization: - Add ACS quirk for more Zhaoxin Root Ports (LeoLiuoc) Error handling: - Log AER errors as "Correctable" (not "Corrected") or "Uncorrectable" to match spec terminology (Bjorn Helgaas) - Decode Requester ID when no error info found instead of printing the raw hex value (Bjorn Helgaas) Endpoint framework: - Use a unique test pattern for each BAR in the pci_endpoint_test to make it easier to debug address translation issues (Niklas Cassel) Broadcom STB PCIe controller driver: - Add DT property "brcm,clkreq-mode" and driver support for different CLKREQ# modes to make ASPM L1.x states possible (Jim Quinlan) Freescale Layerscape PCIe controller driver: - Add suspend/resume support for Layerscape LS1043a and LS1021a, including software-managed PME_Turn_Off and transitions between L0, L2/L3_Ready Link states (Frank Li) MediaTek PCIe controller driver: - Clear MSI interrupt status before handler to avoid missing MSIs that occur after the handler (qizhong cheng) MediaTek PCIe Gen3 controller driver: - Update mediatek-gen3 translation window setup to handle MMIO space that is not a power of two in size (Jianjun Wang) Qualcomm PCIe controller driver: - Increase qcom iommu-map maxItems to accommodate SDX55 (five entries) and SDM845 (sixteen entries) (Krzysztof Kozlowski) - Describe qcom,pcie-sc8180x clocks and resets accurately (Krzysztof Kozlowski) - Describe qcom,pcie-sm8150 clocks and resets accurately (Krzysztof Kozlowski) - Correct the qcom "reset-name" property, previously incorrectly called "reset-names" (Krzysztof Kozlowski) - Document qcom,pcie-sm8650, based on qcom,pcie-sm8550 (Neil Armstrong) Renesas R-Car PCIe controller driver: - Replace of_device.h with explicit of.h include to untangle header usage (Rob Herring) - Add DT and driver support for optional miniPCIe 1.5v and 3.3v regulators on KingFisher (Wolfram Sang) SiFive FU740 PCIe controller driver: - Convert fu740 CONFIG_PCIE_FU740 dependency from SOC_SIFIVE to ARCH_SIFIVE (Conor Dooley) Synopsys DesignWare PCIe controller driver: - Align iATU mapping for endpoint MSI-X (Niklas Cassel) - Drop "host_" prefix from struct dw_pcie_host_ops members (Yoshihiro Shimoda) - Drop "ep_" prefix from struct dw_pcie_ep_ops members (Yoshihiro Shimoda) - Rename struct dw_pcie_ep_ops.func_conf_select() to .get_dbi_offset() to be more descriptive (Yoshihiro Shimoda) - Add Endpoint DBI accessors to encapsulate offset lookups (Yoshihiro Shimoda) TI J721E PCIe driver: - Add j721e DT and driver support for 'num-lanes' for devices that support x1, x2, or x4 Links (Matt Ranostay) - Add j721e DT compatible strings and driver support for j784s4 (Matt Ranostay) - Make TI J721E Kconfig depend on ARCH_K3 since the hardware is specific to those TI SoC parts (Peter Robinson) TI Keystone PCIe controller driver: - Hold power management references to all PHYs while enabling them to avoid a race when one provides clocks to others (Siddharth Vadapalli) Xilinx XDMA PCIe controller driver: - Remove redundant dev_err(), since platform_get_irq() and platform_get_irq_byname() already log errors (Yang Li) - Fix uninitialized symbols in xilinx_pl_dma_pcie_setup_irq() (Krzysztof Wilczyński) - Fix xilinx_pl_dma_pcie_init_irq_domain() error return when irq_domain_add_linear() fails (Harshit Mogalapalli) MicroSemi Switchtec management driver: - Do dma_mrpc cleanup during switchtec_pci_remove() to match its devm ioremapping in switchtec_pci_probe(). Previously the cleanup was done in stdev_release(), which used stale pointers if stdev->cdev happened to be open when the PCI device was removed (Daniel Stodden) Miscellaneous: - Convert interrupt terminology from "legacy" to "INTx" to be more specific and match spec terminology (Damien Le Moal) - In dw-xdata-pcie, pci_endpoint_test, and vmd, replace usage of deprecated ida_simple_*() API with ida_alloc() and ida_free() (Christophe JAILLET)" * tag 'pci-v6.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (97 commits) PCI: Fix kernel-doc issues PCI: brcmstb: Configure HW CLKREQ# mode appropriate for downstream device dt-bindings: PCI: brcmstb: Add property "brcm,clkreq-mode" PCI: mediatek-gen3: Fix translation window size calculation PCI: mediatek: Clear interrupt status before dispatching handler PCI: keystone: Fix race condition when initializing PHYs PCI: xilinx-xdma: Fix error code in xilinx_pl_dma_pcie_init_irq_domain() PCI: xilinx-xdma: Fix uninitialized symbols in xilinx_pl_dma_pcie_setup_irq() PCI: rcar-gen4: Fix -Wvoid-pointer-to-enum-cast error PCI: iproc: Fix -Wvoid-pointer-to-enum-cast warning PCI: dwc: Add dw_pcie_ep_{read,write}_dbi[2] helpers PCI: dwc: Rename .func_conf_select to .get_dbi_offset in struct dw_pcie_ep_ops PCI: dwc: Rename .ep_init to .init in struct dw_pcie_ep_ops PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members misc: pci_endpoint_test: Use a unique test pattern for each BAR PCI: j721e: Make TI J721E depend on ARCH_K3 PCI: j721e: Add TI J784S4 PCIe configuration PCI/AER: Use explicit register sizes for struct members PCI/AER: Decode Requester ID when no error info found PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors ... commit a3f4a07b5027e88209a7f47f572d8eed126ca870 Merge: ed6c23b175471 4fa0888f6f3e6 Author: Linus Torvalds Date: Wed Jan 17 16:06:16 2024 -0800 Merge tag 'i3c/for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Alexandre Belloni: "We are continuing to see more fixes as hardware is available and code is actually getting tested. Core: - Add a sysfs control for hotjoin - Add fallback method for GETMXDS CCC Drivers: - cdns: fix prescale for i2c clock - mipi-i3c-hci: more fixes now that the driver is used - svc: hotjoin enabling/disabling support" * tag 'i3c/for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: document hotjoin sysfs entry i3c: master: fix kernel-doc check warning i3c: master: cdns: Update maximum prescaler value for i2c clock i3c: master: fix Excess kernel-doc description warning i3c: master: svc: return actual transfer data len i3c: master: svc: rename read_len as actual_len i3c: add actual_len in i3c_priv_xfer i3c: master: svc: add hot join support i3c: master: add enable(disable) hot join in sys entry i3c: master: Fix build error i3c: Add fallback method for GETMXDS CCC i3c: mipi-i3c-hci: Add DMA bounce buffer for private transfers i3c: mipi-i3c-hci: Handle I3C address header error in hci_cmd_v1_daa() i3c: mipi-i3c-hci: Do not overallocate transfers in hci_cmd_v1_daa() i3c: mipi-i3c-hci: Report NACK response from CCC command to core commit 14688f1a91e1f37bc6bf50ff5241e857f24338e0 Author: Mia Lin Date: Mon Nov 13 18:38:07 2023 +0800 rtc: nuvoton: Compatible with NCT3015Y-R and NCT3018Y-R The NCT3015Y-R and NCT3018Y-R use the same datasheet but have different topologies as follows. - Topology (Only 1st i2c can set TWO bit and HF bit) In NCT3015Y-R, rtc 1st i2c is connected to a host CPU rtc 2nd i2c is connected to a BMC In NCT3018Y-R, rtc 1st i2c is connected to a BMC rtc 2nd i2c is connected to a host CPU In order to be compatible with NCT3015Y-R and NCT3018Y-R, - In probe, If part number is NCT3018Y-R, only set HF bit to 24-Hour format. Else, do nothing - In set_time, If part number is NCT3018Y-R && TWO bit is 0, change TWO bit to 1, and restore TWO bit after updating time. Signed-off-by: Mia Lin Link: https://lore.kernel.org/r/20231113103807.1036978-2-mimi05633@gmail.com Signed-off-by: Alexandre Belloni commit f5334aa88345874d54a406e86a886a54173e1ba8 Author: Biju Das Date: Fri Jan 5 14:53:44 2024 +0000 rtc: da9063: Use dev_err_probe() Replace dev_err()->dev_err_probe() to simpilfy probe(). Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240105145344.204453-4-biju.das.jz@bp.renesas.com Signed-off-by: Alexandre Belloni commit 4b60c32e979ac84a715c329161ddf42b0790be4e Author: Biju Das Date: Fri Jan 5 14:53:43 2024 +0000 rtc: da9063: Use device_get_match_data() Replace of_match_node()->device_get_match_data() for the data associated with device match. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240105145344.204453-3-biju.das.jz@bp.renesas.com Signed-off-by: Alexandre Belloni commit 8681de6457aa071a5982e9b20682e56a7d87e3b6 Author: Biju Das Date: Fri Jan 5 14:53:42 2024 +0000 rtc: da9063: Make IRQ as optional On some platforms (eg: RZ/{G2UL,Five} SMARC EVK), there is no IRQ populated by default. Add irq optional support. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240105145344.204453-2-biju.das.jz@bp.renesas.com Signed-off-by: Alexandre Belloni commit dd7fe5d9fd6a27531e985e3812ef4031bd316b01 Author: Nathan Chancellor Date: Wed Jan 17 10:54:16 2024 -0700 rtc: max31335: Fix comparison in max31335_volatile_reg() Clang warns (or errors with CONFIG_WERROR=y): drivers/rtc/rtc-max31335.c:211:36: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand] 211 | if (reg == MAX31335_TEMP_DATA_MSB || MAX31335_TEMP_DATA_LSB) | ^ ~~~~~~~~~~~~~~~~~~~~~~ drivers/rtc/rtc-max31335.c:211:36: note: use '|' for a bitwise operation 211 | if (reg == MAX31335_TEMP_DATA_MSB || MAX31335_TEMP_DATA_LSB) | ^~ | | 1 error generated. This clearly should be a comparison against reg. Fix the comparison so that max31335_volatile_reg() does not always return true. Closes: https://github.com/ClangBuiltLinux/linux/issues/1980 Fixes: dedaf03b99d6 ("rtc: max31335: add driver support") Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20240117-rtc-max3133-fix-comparison-v1-1-91e98b29d564@kernel.org Signed-off-by: Alexandre Belloni commit b7d450d98b0f9917cac31b39ba459a4aee26c8b1 Author: Alexandre Belloni Date: Tue Jan 16 00:22:14 2024 +0100 rtc: max31335: use regmap_update_bits_check Simplify the IRQ handler by using regmap_update_bits_check. Reviewed-by: Antoniu Miclaus Link: https://lore.kernel.org/r/20240115232215.273374-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 590b1d19d73914477cfd9faac7a0d7dcf5b4eb08 Author: Alexandre Belloni Date: Tue Jan 16 00:22:13 2024 +0100 rtc: max31335: remove unecessary locking There is no race condition when accessing MAX31335_STATUS1 because it is always about clearing the alarm interrupt bit. Reviewed-by: Antoniu Miclaus Link: https://lore.kernel.org/r/20240115232215.273374-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit ed6c23b175471d7bdecd06b5f37a0b1057c90cce Merge: 5d197e97fb106 1b09c2b8f8490 Author: Linus Torvalds Date: Wed Jan 17 15:55:33 2024 -0800 Merge tag 'pinctrl-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "For this kernel cycle I managed an immutable branch for the PEF2256 WAN framer that has some pin control portions. It already landed in your tree through the net pull request but here it is mentioned again. The most interesting is perhaps the Samsung Exynos subdrivers for the Tensor SoC used in Google Pixel 6 and the ExynosAuto subdriver for automotive. Along with the earlier merged Tesla FSD subdriver it shows some of the versatile uses of the Samsung Exynos silicon. It is also used in the latest version of Axis Communications ARTPEC chips so it is a very widely deployed SoC family. We also have the Intel Meteor Lake SoC which I think is for laptops. It's a pretty interesting chip with Xe graphics and integrated PCH. Core changes: - A new PINCTRL_GROUP_DESC() infrastructure macro is added and used in different drivers, generic group description struct group_desc is now used all over the place. New drivers: - New driver for the Texas Instruments TPS6494 Power Management IC. - New driver for the Lantic PEF2256 framer pin multiplexer. This IC has some pins that can be reconfigured in different ways. The actual driver comes on an immutable branch with the net WAN parts, the IC is some latest-and-greatest serial line funnel for e.g. wireless access points. - New subdriver for the Samsung Exynos Auto V920 pin controller, used for automotive applications. - New subdriver for the Samsung "GS101" SoC pin controller, this is the Google "Tensor" SoC used in the Google Pixel 6. - New subdriver for the Intel Meteor Point SoC pin controller. - New subdriver for the Qualcomm SM8650 top level (TLMM) and LPASS pin controllers. - New subdriver for the Qualcomm X1E80100 top level (TLMM) pin controller. - New subdriver for the Qualcomm SM4450 top level (TLMM) pin controller. - The "single" pin controller now supports the Texas Instruments J7200 SoC. Improvements: - Intel has created a new (Intel-)generic pin controller driver that is now used by all contemporary Intel platforms. - Intel is now also making use of some cleanup helpers. - Enble 910 Ohm bias in the Intel Tangier driver. - The Samsung driver now suppors irq_set_affinity() in it's IRQ chip giving support for non wake up external gpio interrupts" * tag 'pinctrl-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (112 commits) pinctrl: samsung: constify iomem pointers pinctrl: cy8c95x0: Cache muxed registers dt-bindings: pinctrl: xilinx: Rename *gpio to *gpio-grp pinctrl: qcom: lpass-lpi: remove duplicated include dt-bindings: pinctrl: qcom: drop common properties and allow wakeup-parent dt-bindings: pinctrl: qcom: drop common properties dt-bindings: pinctrl: qcom,ipq5018-tlmm: use common TLMM bindings dt-bindings: pinctrl: qcom,x1e80100-tlmm: restrict number of interrupts dt-bindings: pinctrl: qcom,sm8650-tlmm: restrict number of interrupts dt-bindings: pinctrl: qcom,sm8550-tlmm: restrict number of interrupts dt-bindings: pinctrl: qcom,sdx75-tlmm: restrict number of interrupts dt-bindings: pinctrl: qcom,sa8775p-tlmm: restrict number of interrupts dt-bindings: pinctrl: qcom,qdu1000-tlmm: restrict number of interrupts dt-bindings: pinctrl: qcom: create common LPASS LPI schema pinctrl: qcom: sm4450: dd SM4450 pinctrl driver dt-bindings: pinctrl: qcom: Add SM4450 pinctrl dt-bindings: pinctrl: qcom,pmic-mpp: clean up example pinctrl: intel: Add Intel Meteor Point pin controller and GPIO support pinctrl: renesas: rzg2l: Add input enable to the Ethernet pins pinctrl: renesas: rzg2l: Add output enable support ... commit 5d197e97fb106c09d3d013be341e5961fd70ec8a Merge: 75afd029e6076 fa72d143471d0 Author: Linus Torvalds Date: Wed Jan 17 15:48:46 2024 -0800 Merge tag 'hsi-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI update from Sebastian Reichel: - modernize IDA API * tag 'hsi-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: omap_ssi: Remove usage of the deprecated ida_simple_xx() API commit 75afd029e607623df50495ec6acefe82138d6935 Merge: 08df80a3c5167 cd795fb0c352c Author: Linus Torvalds Date: Wed Jan 17 15:39:32 2024 -0800 Merge tag 'mailbox-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox Pull mailbox updates from Jassi Brar: - add CMDQ support for mediatek mt8188 - mhuv2: fix channel window status - qcom: document X1E80100 IPC controller and misc cleanup - add Versal bindings to xlnx - Convert to platform remove callback returning void * tag 'mailbox-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: (23 commits) mailbox: mtk-cmdq: Add CMDQ driver support for mt8188 mailbox: mtk-cmdq: Sort cmdq platform data by compatible name mailbox: mtk-cmdq: Rename gce_plat variable with SoC name postfix dt-bindings: mailbox: qcom-ipcc: document the X1E80100 Inter-Processor Communication Controller mailbox: zynqmp-ipi: Convert to platform remove callback returning void mailbox: tegra-hsp: Convert to platform remove callback returning void mailbox: sun6i-msgbox: Convert to platform remove callback returning void mailbox: stm32-ipcc: Convert to platform remove callback returning void mailbox: qcom-ipcc: Convert to platform remove callback returning void mailbox: qcom-apcs-ipc: Convert to platform remove callback returning void mailbox: omap: Convert to platform remove callback returning void mailbox: mtk-cmdq: Convert to platform remove callback returning void mailbox: mailbox-test: Convert to platform remove callback returning void mailbox: imx: Convert to platform remove callback returning void mailbox: bcm-pdc: Convert to platform remove callback returning void mailbox: bcm-flexrm: Convert to platform remove callback returning void mailbox: zynqmp-ipi: fix an Excess struct member kernel-doc warning dt-bindings: mailbox: add Versal IPI bindings dt-bindings: mailbox: zynqmp: extend required list mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt ... commit 08df80a3c51674ab73ae770885a383ca553fbbbf Merge: 2385018a4e5eb 4289e434c46c8 Author: Linus Torvalds Date: Wed Jan 17 15:25:27 2024 -0800 Merge tag 'leds-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds Pull LED updates from Lee Jones: "New Drivers: - Add support for Allwinner A100 RGB LED controller - Add support for Maxim 5970 Dual Hot-swap controller New Device Support: - Add support for AW20108 to Awinic LED driver New Functionality: - Extend support for Net speeds to include; 2.5G, 5G and 10G - Allow tx/rx and cts/dsr/dcd/rng TTY LEDS to be turned on and off via sysfs if required - Add support for hardware control in AW200xx Fix-ups: - Use safer methods for string handling - Improve error handling; return proper error values, simplify, avoid duplicates, etc - Replace Mutex use with the Completion mechanism - Fix include lists; alphabetise, remove unused, explicitly add used - Use generic platform device properties - Use/convert to new/better APIs/helpers/MACROs instead of hand-rolling implementations - Device Tree binding adaptions/conversions/creation - Continue work to remove superfluous platform .remove() call-backs - Remove superfluous/defunct code - Trivial; whitespace, unused variables, spelling, clean-ups, etc - Avoid unnecessary duplicate locks Bug Fixes: - Repair Kconfig based dependency lists - Ensure unused dynamically allocated data is freed after use - Fix support for brightness control - Add missing sufficient delays during reset to ensure correct operation - Avoid division-by-zero issues" * tag 'leds-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (45 commits) leds: trigger: netdev: Add core support for hw not supporting fallback to LED sw control leds: trigger: panic: Don't register panic notifier if creating the trigger failed leds: sun50i-a100: Convert to be agnostic to property provider leds: max5970: Add missing headers leds: max5970: Make use of dev_err_probe() leds: max5970: Make use of device properties leds: max5970: Remove unused variable leds: rgb: Drop obsolete dependency on COMPILE_TEST leds: sun50i-a100: Avoid division-by-zero warning leds: trigger: Remove unused function led_trigger_rename_static() leds: qcom-lpg: Introduce a wrapper for getting driver data from a pwm chip leds: gpio: Add kernel log if devm_fwnode_gpiod_get() fails dt-bindings: leds: qcom,spmi-flash-led: Fix example node name dt-bindings: leds: aw200xx: Fix led pattern and add reg constraints dt-bindings: leds: awinic,aw200xx: Add AW20108 device leds: aw200xx: Add support for aw20108 device leds: aw200xx: Improve autodim calculation method leds: aw200xx: Enable disable_locking flag in regmap config leds: aw200xx: Add delay after software reset dt-bindings: leds: aw200xx: Remove property "awinic,display-rows" ... commit 2385018a4e5eb4f06cf110cca80d0a4ac8e27297 Merge: a2ec2071cad81 284d16c456e5d Author: Linus Torvalds Date: Wed Jan 17 15:21:21 2024 -0800 Merge tag 'mfd-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull mfd updates from Lee Jones: "New Device Support: - Add support for Qualcomm PM8937 PMIC to QCOM SPMI PMIC Fix-ups: - Use/convert to new/better APIs/helpers/MACROs instead of hand-rolling implementations - Device Tree binding adaptions/conversions/creation - Improve error handling; return proper error values, simplify, avoid duplicates, etc - Continue work to remove superfluous platform .remove() call-backs - Move some exported symbols into private namespaces - Clean-up and staticify PM related operations - Trivial; spelling, whitespace, clean-ups, etc - Fix include lists; alphabetise, remove unused, explicitly add used Bug Fixes: - Use PLATFORM_DEVID_AUTO to ensure multiple duplicate devices can co-exist - Ensure debugfs register view is correctly presented - Fix ordering and value issues in current use of clk_register_fractional_divider() - Repair Kconfig based dependency lists" * tag 'mfd-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (50 commits) mfd: ti_am335x_tscadc: Fix TI SoC dependencies dt-bindings: mfd: sprd: Add support for UMS9620 mfd: ab8500-sysctrl: Drop ancient charger mfd: intel-lpss: Fix the fractional clock divider flags mfd: tps6594: Add null pointer check to tps6594_device_init() dt-bindings: mfd: pm8008: Clean up example node names dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Clean up example dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Fix regulator binding dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Fix up binding reference mfd: da9062: Simplify obtaining I2C match data mfd: syscon: Fix null pointer dereference in of_syscon_register() mfd: intel-lpss: Don't fail probe on success of pci_alloc_irq_vectors() mfd: twl6030-irq: Revert to use of_match_device() mfd: cs42l43: Correct order of include files to be alphabetical mfd: cs42l43: Correct SoundWire port list mfd: Fix a few spelling mistakes in PMIC header file comments mfd: intel-lpss: Provide Intel LPSS PM ops structure mfd: intel-lpss: Move exported symbols to INTEL_LPSS namespace mfd: intel-lpss: Adjust header inclusions mfd: intel-lpss: Use device_get_match_data() ... commit a2ec2071cad819fe952a3f1ef66f2d2112c27b6e Merge: e88481f74fee6 bcd0f5d18b0b1 Author: Linus Torvalds Date: Wed Jan 17 15:12:26 2024 -0800 Merge tag 'hwlock-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull hwspinlock updates from Bjorn Andersson: - Correct kernel-doc through the hwspinlock core, to address build warnings (and improve the documentation) - Drop unused compatible in the Qualcomm TCSR mutex driver * tag 'hwlock-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: hwspinlock/core: fix kernel-doc warnings hwspinlock: qcom: Remove IPQ6018 SOC specific compatible commit e88481f74fee690316c1e0fd3777f919067d2d58 Merge: 2a43434675b21 300ed425dfa99 Author: Linus Torvalds Date: Wed Jan 17 15:09:12 2024 -0800 Merge tag 'rproc-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull remoteproc updates from Bjorn Andersson: - The i.MX DSP remoteproc driver adds support for providing a resource table, in order to enable IPC with the core - The TI K3 DSP driver is transitioned to remove_new, error messages are changed to use symbolic error codes, and dev_err_probe() is used where applicable - Support for the Qualcomm SC7280 audio, compute and WiFi co-processors are added to the Qualcomm TrustZone based remoteproc driver * tag 'rproc-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: remoteproc: qcom_q6v5_pas: Add SC7280 ADSP, CDSP & WPSS dt-bindings: remoteproc: qcom: sc7180-pas: Add SC7280 compatibles dt-bindings: remoteproc: qcom: sc7180-pas: Fix SC7280 MPSS PD-names remoteproc: k3-dsp: Convert to platform remove callback returning void remoteproc: k3-dsp: Use symbolic error codes in error messages remoteproc: k3-dsp: Suppress duplicate error message in .remove() arm64: dts: imx8mp: Add reserve-memory nodes for DSP remoteproc: imx_dsp_rproc: Add mandatory find_loaded_rsc_table op commit 2a43434675b2114e8f909a5039cc421d35d35ce9 Merge: 8893a6bfff312 d5362c37e1f8a Author: Linus Torvalds Date: Wed Jan 17 15:05:27 2024 -0800 Merge tag 'rpmsg-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux Pull rpmsg updates from Bjorn Andersson: "This make virtio free driver_override upon removal. It also updates the rpmsg documentation after earlier API updates" * tag 'rpmsg-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: rpmsg: virtio: Free driver_override when rpmsg_remove() doc: rmpsg: Update with rpmsg_endpoint commit 8893a6bfff312ea6fee89bfaa8761f0b9456199b Merge: d8e6ba025f5e4 205e18c13545a Author: Linus Torvalds Date: Wed Jan 17 14:59:05 2024 -0800 Merge tag 'drm-next-2024-01-15-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This is just a wrap up of fixes from the last few days. It has the proper fix to the i915/xe collision, we can clean up what you did later once rc1 lands. Otherwise it's a few other i915, a v3d, rockchip and a nouveau fix to make GSP load on some original Turing GPUs. i915: - Fixes for kernel-doc warnings enforced in linux-next - Another build warning fix for string formatting of intel_wakeref_t - Display fixes for DP DSC BPC and C20 PLL state verification v3d: - register readout fix rockchip: - two build warning fixes nouveau: - fix GSP loading on Turing with different nvdec configuration" * tag 'drm-next-2024-01-15-1' of git://anongit.freedesktop.org/drm/drm: nouveau/gsp: handle engines in runl without nonstall interrupts. drm/i915/perf: reconcile Excess struct member kernel-doc warnings drm/i915/guc: reconcile Excess struct member kernel-doc warnings drm/i915/gt: reconcile Excess struct member kernel-doc warnings drm/i915/gem: reconcile Excess struct member kernel-doc warnings drm/i915/dp: Fix the max DSC bpc supported by source drm/i915: don't make assumptions about intel_wakeref_t type drm/i915/dp: Fix the PSR debugfs entries wrt. MST connectors drm/i915/display: Fix C20 pll selection for state verification drm/v3d: Fix support for register debugging on the RPi 4 drm/rockchip: vop2: Drop unused if_dclk_rate variable drm/rockchip: vop2: Drop superfluous include commit d8e6ba025f5e45cb0821298919b0e07130cef877 Merge: 7f369a8f5ba97 dd75558b2d0b5 Author: Linus Torvalds Date: Wed Jan 17 14:47:33 2024 -0800 Merge tag 'thermal-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more thermal control updates from Rafael Wysocki: "These add support for debugfs-based diagnostics to the thermal core, simplify the thermal netlink API, fix system-wide PM support in the Intel HFI driver and clean up some code. Specifics: - Add debugfs-based diagnostics support to the thermal core (Daniel Lezcano, Dan Carpenter) - Fix a power allocator thermal governor issue preventing it from resetting cooling devices sometimes (Di Shen) - Simplify the thermal netlink API and clean up related code (Rafael J. Wysocki) - Make the Intel HFI driver support hibernation and deep suspend properly (Ricardo Neri)" * tag 'thermal-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal/debugfs: Unlock on error path in thermal_debug_tz_trip_up() thermal: intel: hfi: Add syscore callbacks for system-wide PM thermal: gov_power_allocator: avoid inability to reset a cdev thermal: helpers: Rearrange thermal_cdev_set_cur_state() thermal: netlink: Rework notify API for cooling devices thermal: core: Use kstrdup_const() during cooling device registration thermal/debugfs: Add thermal debugfs information for mitigation episodes thermal/debugfs: Add thermal cooling device debugfs information thermal: netlink: Pass thermal zone pointer to notify routines thermal: netlink: Drop thermal_notify_tz_trip_add/delete() thermal: netlink: Pass pointers to thermal_notify_tz_trip_up/down() thermal: netlink: Pass pointers to thermal_notify_tz_trip_change() commit 7f369a8f5ba973c1c1b680dcc99959773193350a Merge: 7b5bcf9b84208 5b5268cd49d23 Author: Linus Torvalds Date: Wed Jan 17 14:37:40 2024 -0800 Merge tag 'acpi-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These add support for new MADT flags to ACPICA, constify the PNP bus type structure and add new ACPI IRQ management quirks. Specifics: - Make pnp_bus_type const (Greg Kroah-Hartman) - Add ACPI IRQ management quirks for ASUS ExpertBook B1502CGA and ASUS Vivobook E1504GA and E1504GAB (Ben Mayo, Michael Maltsev) - Add new MADT GICC/GICR/ITS non-coherent flags and GICC online capable bit handling to ACPICA (Lorenzo Pieralisi)" * tag 'acpi-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: MADT: Add new MADT GICC/GICR/ITS non-coherent flags handling ACPICA: MADT: Add GICC online capable bit handling ACPI: resource: Skip IRQ override on ASUS ExpertBook B1502CGA ACPI: resource: Add DMI quirks for ASUS Vivobook E1504GA and E1504GAB PNP: make pnp_bus_type const commit 7b5bcf9b842087ba38cb6292637910f384368cff Merge: 82fd5ee9d8a51 9223614ea760a Author: Linus Torvalds Date: Wed Jan 17 14:07:14 2024 -0800 Merge tag 'pm-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These restore the asynchronous device resume optimization removed by the previous PM merge, make the intel_pstate driver work better on Meteor Lake systems, optimize the PM QoS core code slightly and fix up typos in admin-guide. Specifics: - Restore the system-wide asynchronous device resume optimization removed by a recent concurrency fix (Rafael J. Wysocki) - Make the intel_pstate cpufreq driver allow Meteor Lake systems to run at somewhat higher frequencies (Srinivas Pandruvada) - Make the PM QoS core code use kcalloc() for array allocation (Erick Archer) - Fix two PM-related typos in admin-guide (Erwan Velu)" * tag 'pm-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: sleep: Restore asynchronous device resume optimization Documentation: admin-guide: PM: Fix two typos cpufreq: intel_pstate: Update hybrid scaling factor for Meteor Lake PM: QoS: Use kcalloc() instead of kzalloc() commit 1d9cabe2817edd215779dc9c2fe5e7ab9aac0704 Author: Lucas Stach Date: Wed Jan 17 22:06:28 2024 +0100 SUNRPC: use request size to initialize bio_vec in svc_udp_sendto() Use the proper size when setting up the bio_vec, as otherwise only zero-length UDP packets will be sent. Fixes: baabf59c2414 ("SUNRPC: Convert svc_udp_sendto() to use the per-socket bio_vec array") Signed-off-by: Lucas Stach Signed-off-by: Chuck Lever commit 82fd5ee9d8a516d47a17e8c99c2712a3fd937014 Merge: 09d1c6a80f2cf 2d2db7d40254d Author: Linus Torvalds Date: Wed Jan 17 13:41:38 2024 -0800 Merge tag 'for-linus-6.8-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - update some Xen PV interface related headers - fix some kernel-doc comments in the xenbus driver - fix the Xen gntdev driver to not access the struct page of pages imported from a DMA-buf * tag 'for-linus-6.8-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import xen/xenbus: client: fix kernel-doc comments xen: update PV-device interface headers commit 49e60333d743ae32db3bdde2f93bc818482dd741 Author: Bart Van Assche Date: Wed Jan 17 12:36:09 2024 -0800 blk-mq: Remove the hctx 'run' debugfs attribute Nobody uses the debugfs hctx 'run' attribute. Hence remove this attribute and also the code that updates the corresponding member variable. Suggested-by: Jens Axboe Cc: Gabriel Ryan Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20240117203609.4122520-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 09d1c6a80f2cf94c6e70be919203473d4ab8e26c Merge: 1b1934dbbdcf9 1c6d984f523f6 Author: Linus Torvalds Date: Wed Jan 17 13:03:37 2024 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "Generic: - Use memdup_array_user() to harden against overflow. - Unconditionally advertise KVM_CAP_DEVICE_CTRL for all architectures. - Clean up Kconfigs that all KVM architectures were selecting - New functionality around "guest_memfd", a new userspace API that creates an anonymous file and returns a file descriptor that refers to it. guest_memfd files are bound to their owning virtual machine, cannot be mapped, read, or written by userspace, and cannot be resized. guest_memfd files do however support PUNCH_HOLE, which can be used to switch a memory area between guest_memfd and regular anonymous memory. - New ioctl KVM_SET_MEMORY_ATTRIBUTES allowing userspace to specify per-page attributes for a given page of guest memory; right now the only attribute is whether the guest expects to access memory via guest_memfd or not, which in Confidential SVMs backed by SEV-SNP, TDX or ARM64 pKVM is checked by firmware or hypervisor that guarantees confidentiality (AMD PSP, Intel TDX module, or EL2 in the case of pKVM). x86: - Support for "software-protected VMs" that can use the new guest_memfd and page attributes infrastructure. This is mostly useful for testing, since there is no pKVM-like infrastructure to provide a meaningfully reduced TCB. - Fix a relatively benign off-by-one error when splitting huge pages during CLEAR_DIRTY_LOG. - Fix a bug where KVM could incorrectly test-and-clear dirty bits in non-leaf TDP MMU SPTEs if a racing thread replaces a huge SPTE with a non-huge SPTE. - Use more generic lockdep assertions in paths that don't actually care about whether the caller is a reader or a writer. - let Xen guests opt out of having PV clock reported as "based on a stable TSC", because some of them don't expect the "TSC stable" bit (added to the pvclock ABI by KVM, but never set by Xen) to be set. - Revert a bogus, made-up nested SVM consistency check for TLB_CONTROL. - Advertise flush-by-ASID support for nSVM unconditionally, as KVM always flushes on nested transitions, i.e. always satisfies flush requests. This allows running bleeding edge versions of VMware Workstation on top of KVM. - Sanity check that the CPU supports flush-by-ASID when enabling SEV support. - On AMD machines with vNMI, always rely on hardware instead of intercepting IRET in some cases to detect unmasking of NMIs - Support for virtualizing Linear Address Masking (LAM) - Fix a variety of vPMU bugs where KVM fail to stop/reset counters and other state prior to refreshing the vPMU model. - Fix a double-overflow PMU bug by tracking emulated counter events using a dedicated field instead of snapshotting the "previous" counter. If the hardware PMC count triggers overflow that is recognized in the same VM-Exit that KVM manually bumps an event count, KVM would pend PMIs for both the hardware-triggered overflow and for KVM-triggered overflow. - Turn off KVM_WERROR by default for all configs so that it's not inadvertantly enabled by non-KVM developers, which can be problematic for subsystems that require no regressions for W=1 builds. - Advertise all of the host-supported CPUID bits that enumerate IA32_SPEC_CTRL "features". - Don't force a masterclock update when a vCPU synchronizes to the current TSC generation, as updating the masterclock can cause kvmclock's time to "jump" unexpectedly, e.g. when userspace hotplugs a pre-created vCPU. - Use RIP-relative address to read kvm_rebooting in the VM-Enter fault paths, partly as a super minor optimization, but mostly to make KVM play nice with position independent executable builds. - Guard KVM-on-HyperV's range-based TLB flush hooks with an #ifdef on CONFIG_HYPERV as a minor optimization, and to self-document the code. - Add CONFIG_KVM_HYPERV to allow disabling KVM support for HyperV "emulation" at build time. ARM64: - LPA2 support, adding 52bit IPA/PA capability for 4kB and 16kB base granule sizes. Branch shared with the arm64 tree. - Large Fine-Grained Trap rework, bringing some sanity to the feature, although there is more to come. This comes with a prefix branch shared with the arm64 tree. - Some additional Nested Virtualization groundwork, mostly introducing the NV2 VNCR support and retargetting the NV support to that version of the architecture. - A small set of vgic fixes and associated cleanups. Loongarch: - Optimization for memslot hugepage checking - Cleanup and fix some HW/SW timer issues - Add LSX/LASX (128bit/256bit SIMD) support RISC-V: - KVM_GET_REG_LIST improvement for vector registers - Generate ISA extension reg_list using macros in get-reg-list selftest - Support for reporting steal time along with selftest s390: - Bugfixes Selftests: - Fix an annoying goof where the NX hugepage test prints out garbage instead of the magic token needed to run the test. - Fix build errors when a header is delete/moved due to a missing flag in the Makefile. - Detect if KVM bugged/killed a selftest's VM and print out a helpful message instead of complaining that a random ioctl() failed. - Annotate the guest printf/assert helpers with __printf(), and fix the various bugs that were lurking due to lack of said annotation" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (185 commits) x86/kvm: Do not try to disable kvmclock if it was not enabled KVM: x86: add missing "depends on KVM" KVM: fix direction of dependency on MMU notifiers KVM: introduce CONFIG_KVM_COMMON KVM: arm64: Add missing memory barriers when switching to pKVM's hyp pgd KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache RISC-V: KVM: selftests: Add get-reg-list test for STA registers RISC-V: KVM: selftests: Add steal_time test support RISC-V: KVM: selftests: Add guest_sbi_probe_extension RISC-V: KVM: selftests: Move sbi_ecall to processor.c RISC-V: KVM: Implement SBI STA extension RISC-V: KVM: Add support for SBI STA registers RISC-V: KVM: Add support for SBI extension registers RISC-V: KVM: Add SBI STA info to vcpu_arch RISC-V: KVM: Add steal-update vcpu request RISC-V: KVM: Add SBI STA extension skeleton RISC-V: paravirt: Implement steal-time support RISC-V: Add SBI STA extension definitions RISC-V: paravirt: Add skeleton for pv-time support RISC-V: KVM: Fix indentation in kvm_riscv_vcpu_set_reg_csr() ... commit 5aa1c96e8ef347430e7a7c898f290425d1b568ef Merge: fe33c0fbed75d 1b1934dbbdcf9 Author: Andrew Morton Date: Wed Jan 17 12:59:32 2024 -0800 Merge branch 'master' into mm-hotfixes-stable commit fe33c0fbed75dd464747c0faaedf94c7d8eb4101 Merge: 5d4747a6cc8e7 052d534373b7e Author: Andrew Morton Date: Wed Jan 17 12:58:28 2024 -0800 Merge branch 'master' into mm-hotfixes-stable commit a20f1b02bafcbf5a32d96a1d4185d6981cf7d016 Author: Douglas Anderson Date: Wed Jan 17 10:35:03 2024 -0800 drm/bridge: parade-ps8640: Make sure we drop the AUX mutex in the error case After commit 26db46bc9c67 ("drm/bridge: parade-ps8640: Ensure bridge is suspended in .post_disable()"), if we hit the error case in ps8640_aux_transfer() then we return without dropping the mutex. Fix this oversight. Fixes: 26db46bc9c67 ("drm/bridge: parade-ps8640: Ensure bridge is suspended in .post_disable()") Reviewed-by: Hsin-Yi Wang Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240117103502.1.Ib726a0184913925efc7e99c4d4fc801982e1bc24@changeid commit 7d1ae55ffed0ff78ed33b1465c1233e05024e135 Author: Tyrel Datwyler Date: Tue Jan 16 13:55:09 2024 -0800 scsi: MAINTAINERS: Update ibmvscsi_tgt maintainer Michael has not been responsible for this code as an IBMer for quite some time. Seeing as the rest of the IBM Virtual SCSI related drivers already fall under my purview replace Michael with myself as maintainer. Signed-off-by: Tyrel Datwyler Link: https://lore.kernel.org/r/20240116215509.1155787-1-tyreld@linux.ibm.com Signed-off-by: Martin K. Petersen commit 1b1934dbbdcf9aa2d507932ff488cec47999cf3f Merge: bce3b5d6764b1 ead8467f96d6d Author: Linus Torvalds Date: Wed Jan 17 11:49:11 2024 -0800 Merge tag 'docs-6.8-2' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of late-arriving documentation fixes" * tag 'docs-6.8-2' of git://git.lwn.net/linux: docs, kprobes: Add loongarch as supported architecture docs, kprobes: Update email address of Masami Hiramatsu docs: admin-guide: hw_random: update rng-tools website Documentation/core-api: fix spelling mistake in workqueue docs: kernel_feat.py: fix potential command injection Documentation: constrain alabaster package to older versions commit e6f3799de2f2b2cd23c3894a127921dfb6c6a512 Author: Colin Ian King Date: Tue Jan 16 11:26:06 2024 +0000 scsi: initio: Remove redundant variable 'rb' The variable 'rb' is being assigned a value but it isn't being read afterwards. The assignment is redundant and so 'rb' can be removed. Cleans up clang scan build warning: warning: Although the value stored to 'rb' is used in the enclosing expression, the value is never actually read from 'rb'[deadcode.DeadStores] Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20240116112606.2263738-1-colin.i.king@gmail.com Signed-off-by: Martin K. Petersen commit d6b75ba5218915be48542bcd7e2a09776b7c66c9 Author: Li RongQing Date: Tue Jan 16 12:58:36 2024 +0800 scsi: virtio_scsi: Remove duplicate check if queue is broken virtqueue_enable_cb() will call virtqueue_poll() which will check if queue is broken at beginning, so remove the virtqueue_is_broken() call Signed-off-by: Li RongQing Link: https://lore.kernel.org/r/20240116045836.12475-1-lirongqing@baidu.com Reviewed-by: Stefan Hajnoczi Acked-by: Michael S. Tsirkin Signed-off-by: Martin K. Petersen commit bce3b5d6764b1e8cd8e24f4ced54ec0c42a64c32 Merge: 47ce834fbb6ce 6472036581f94 Author: Linus Torvalds Date: Wed Jan 17 11:45:01 2024 -0800 Merge tag 'parisc-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "Two small fixes for the parisc architecture: - Fix PDC address calculation with narrow firmware (64-bit kernel on 32-bit firmware) - Fix kthread which checks power button get started on qemu too" * tag 'parisc-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc/power: Fix power soft-off button emulation on qemu parisc/firmware: Fix F-extend for PDC addresses commit 658365c6b0857e6a306436e315a8633937e3af42 Author: Su Hui Date: Fri Jan 12 12:19:27 2024 +0800 scsi: isci: Fix an error code problem in isci_io_request_build() Clang static complains that Value stored to 'status' is never read. Return 'status' rather than 'SCI_SUCCESS'. Fixes: f1f52e75939b ("isci: uplevel request infrastructure") Signed-off-by: Su Hui Link: https://lore.kernel.org/r/20240112041926.3924315-1-suhui@nfschina.com Reviewed-by: Artur Paszkiewicz Signed-off-by: Martin K. Petersen commit 47ce834fbb6ce6cb9e802f651b647b8030c5fc7f Merge: c4c6044d35f06 a03cd7602a090 Author: Linus Torvalds Date: Wed Jan 17 11:40:52 2024 -0800 Merge tag 'xtensa-20240117' of https://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: - small cleanups in the xtensa PCI and asmmacro code - fix kernel build with FDPIC toolchain * tag 'xtensa-20240117' of https://github.com/jcmvbkbc/linux-xtensa: xtensa: don't produce FDPIC output with fdpic toolchain xtensa: Use PCI_HEADER_TYPE_MFD instead of literal xtensa: replace with xtensa: fix variants path in the Kconfig help commit c4c6044d35f06a93115e691e79436839962c203e Merge: 284a4ddeed350 8790fade1a19c Author: Linus Torvalds Date: Wed Jan 17 11:34:45 2024 -0800 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - add missing neon instructions for the neon support hook - arrange for davinci to select PINCTRL - try VMA lock-base page fault handling first - use memblock_alloc_try_nid_raw() for kasan shadow page - dma: use kvzalloc() rather than kzalloc()/vzalloc() * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9331/1: ARM/dma-mapping: replace kzalloc() and vzalloc() with kvzalloc() ARM: 9329/1: kasan: Use memblock_alloc_try_nid_raw for shadow page ARM: 9328/1: mm: try VMA lock-based page fault handling first ARM: 9330/1: davinci: also select PINCTRL ARM: 9327/1: vfp: Add missing VFP instructions to neon_support_hook commit 284a4ddeed35091a356fb8274d91d2dded62136c Merge: 096f286ee3fad ffb0399437ef5 Author: Linus Torvalds Date: Wed Jan 17 11:27:23 2024 -0800 Merge tag 'microblaze-v6.8' of git://git.monstr.eu/linux-2.6-microblaze Pull microblaze updates from Michal Simek: "Just defconfig updates: - enable NFS, Marvell phy - sync defconfig with the latest Kconfig layout" * tag 'microblaze-v6.8' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: defconfig: Enable the Marvell phy driver microblaze: Enable options to mount a rootfs via NFS microblaze: Align defconfig with latest Kconfig layout commit 096f286ee3fadf3f6777dedba35fa66654ec9f34 Merge: 4331f070267ae 3c1e5abcda64b Author: Linus Torvalds Date: Wed Jan 17 11:20:50 2024 -0800 Merge tag 'mips_6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: "Just cleanups and fixes" * tag 'mips_6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup() MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup() MIPS: Fix typos MIPS: Remove unused shadow GPR support from vector irq setup MIPS: Allow vectored interrupt handler to reside everywhere for 64bit mips: Set dump-stack arch description mips: mm: add slab availability checking in ioremap_prot mips: Optimize max_mapnr init procedure mips: Fix max_mapnr being uninitialized on early stages mips: Fix incorrect max_low_pfn adjustment mips: dmi: Fix early remap on MIPS32 MIPS: compressed: Use correct instruction for 64 bit code MIPS: SGI-IP27: hubio: fix nasid kernel-doc warning MAINTAINERS: Add myself as maintainer of the Ralink architecture commit 4331f070267ae8f76db1abbc7f4eeed4f06ae817 Merge: 6cff79f4b90a4 cb51bfee7f62a Author: Linus Torvalds Date: Wed Jan 17 10:50:46 2024 -0800 Merge tag 'riscv-for-linus-6.8-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - Support for many new extensions in hwprobe, along with a handful of cleanups - Various cleanups to our page table handling code, so we alwayse use {READ,WRITE}_ONCE - Support for the which-cpus flavor of hwprobe - Support for XIP kernels has been resurrected * tag 'riscv-for-linus-6.8-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (52 commits) riscv: hwprobe: export Zicond extension riscv: hwprobe: export Zacas ISA extension riscv: add ISA extension parsing for Zacas dt-bindings: riscv: add Zacas ISA extension description riscv: hwprobe: export Ztso ISA extension riscv: add ISA extension parsing for Ztso use linux/export.h rather than asm-generic/export.h riscv: Remove SHADOW_OVERFLOW_STACK_SIZE macro riscv; fix __user annotation in save_v_state() riscv: fix __user annotation in traps_misaligned.c riscv: Select ARCH_WANTS_NO_INSTR riscv: Remove obsolete rv32_defconfig file riscv: Allow disabling of BUILTIN_DTB for XIP riscv: Fixed wrong register in XIP_FIXUP_FLASH_OFFSET macro riscv: Make XIP bootable again riscv: Fix set_direct_map_default_noflush() to reset _PAGE_EXEC riscv: Fix module_alloc() that did not reset the linear mapping permissions riscv: Fix wrong usage of lm_alias() when splitting a huge linear mapping riscv: Check if the code to patch lies in the exit section riscv: Use the same CPU operations for all CPUs ... commit 6cff79f4b90a42d73f039564f09fa5d59ec3d8ab Merge: 0c6bc37255927 83aec96c631e0 Author: Linus Torvalds Date: Wed Jan 17 10:44:34 2024 -0800 Merge tag 'uml-for-linus-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux Pull UML updates from Richard Weinberger: - Clang coverage support - Many cleanups from Benjamin Berg - Various minor fixes * tag 'uml-for-linus-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux: um: Mark 32bit syscall helpers as clobbering memory um: Remove unused register save/restore functions um: Rely on PTRACE_SETREGSET to set FS/GS base registers Documentation: kunit: Add clang UML coverage example arch: um: Add Clang coverage support um: time-travel: fix time corruption um: net: Fix return type of uml_net_start_xmit() um: Always inline stub functions um: Do not use printk in userspace trampoline um: Reap winch thread if it fails um: Do not use printk in SIGWINCH helper thread um: Don't use vfprintf() for os_info() um: Make errors to stop ptraced child fatal during startup um: Drop NULL check from start_userspace um: Drop support for hosts without SYSEMU_SINGLESTEP support um: document arch_futex_atomic_op_inuser um: mmu: remove stub_pages um: Fix naming clash between UML and scheduler um: virt-pci: fix platform map offset commit 0c6bc37255927cf2e2cfdd9dc9bd1eced9c166de Merge: eebe75827b73b adbf4c4954e33 Author: Linus Torvalds Date: Wed Jan 17 10:27:13 2024 -0800 Merge tag 'ubifs-for-linus-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBI and UBIFS updates from Richard Weinberger: "UBI: - Use in-tree fault injection framework and add new injection types - Fix for a memory leak in the block driver UBIFS: - kernel-doc fixes - Various minor fixes" * tag 'ubifs-for-linus-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubi: block: fix memleak in ubiblock_create() ubifs: fix kernel-doc warnings mtd: Add several functions to the fail_function list ubi: Reserve sufficient buffer length for the input mask ubi: Add six fault injection type for testing ubi: Split io_failures into write_failure and erase_failure ubi: Use the fault injection framework to enhance the fault injection capability ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path ubifs: Check @c->dirty_[n|p]n_cnt and @c->nroot state under @c->lp_mutex ubifs: describe function parameters ubifs: auth.c: fix kernel-doc function prototype warning ubifs: use crypto_shash_tfm_digest() in ubifs_hmac_wkm() commit eebe75827b73b0a61e84acd2033ce304a3166d70 Merge: c2459ce011f65 c919330dd5783 Author: Linus Torvalds Date: Wed Jan 17 10:23:34 2024 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux Pull fscrypt fix from Eric Biggers: "Fix a bug in my change to how f2fs frees its superblock info (which was part of changing the timing of fscrypt keyring destruction)" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: f2fs: fix double free of f2fs_sb_info commit c2459ce011f65487231c6340486d5acdaceac6a7 Merge: 7f5e47f785140 ba5afb9a84df2 Author: Linus Torvalds Date: Wed Jan 17 09:34:25 2024 -0800 Merge tag 'vfs-6.8-rc1.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs Pull vfs fixes from Christian Brauner: "This contains two fixes for the current merge window. The listmount changes that you requested and a fix for a fsnotify performance regression: - The proposed listmount changes are currently under my authorship. I wasn't sure whether you'd wanted to be author as the patch wasn't signed off. If you do I'm happy if you just apply your own patch. I've tested the patch with my sh4 cross-build setup. And confirmed that a) the build failure with sh on current upstream is reproducible and that b) the proposed patch fixes the build failure. That should only leave the task of fixing put_user on sh. - The fsnotify regression was caused by moving one of the hooks out of the security hook in preparation for other fsnotify work. This meant that CONFIG_SECURITY would have compiled out the fsnotify hook before but didn't do so now. That lead to up to 6% performance regression in some io_uring workloads that compile all fsnotify and security checks out. Fix this by making sure that the relevant hooks are covered by the already existing CONFIG_FANOTIFY_ACCESS_PERMISSIONS where the relevant hook belongs" * tag 'vfs-6.8-rc1.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs: fs: rework listmount() implementation fsnotify: compile out fsnotify permission hooks if !FANOTIFY_ACCESS_PERMISSIONS commit 7f5e47f785140c2d7948bee6fc387f939f68dbb8 Merge: 052d534373b7e 5d4747a6cc8e7 Author: Linus Torvalds Date: Wed Jan 17 09:31:36 2024 -0800 Merge tag 'mm-hotfixes-stable-2024-01-12-16-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull misc hotfixes from Andrew Morton: "For once not mostly MM-related. 17 hotfixes. 10 address post-6.7 issues and the other 7 are cc:stable" * tag 'mm-hotfixes-stable-2024-01-12-16-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: userfaultfd: avoid huge_zero_page in UFFDIO_MOVE MAINTAINERS: add entry for shrinker selftests: mm: hugepage-vmemmap fails on 64K page size systems mm/memory_hotplug: fix memmap_on_memory sysfs value retrieval mailmap: switch email for Tanzir Hasan mailmap: add old address mappings for Randy kernel/crash_core.c: make __crash_hotplug_lock static efi: disable mirror feature during crashkernel kexec: do syscore_shutdown() in kernel_kexec mailmap: update entry for Manivannan Sadhasivam fs/proc/task_mmu: move mmu notification mechanism inside mm lock mm: zswap: switch maintainers to recently active developers and reviewers scripts/decode_stacktrace.sh: optionally use LLVM utilities kasan: avoid resetting aux_lock lib/Kconfig.debug: disable CONFIG_DEBUG_INFO_BTF for Hexagon MAINTAINERS: update LTP maintainers kdump: defer the insertion of crashkernel resources commit 26db46bc9c675e43230cc6accd110110a7654299 Author: Pin-yen Lin Date: Tue Jan 9 20:04:57 2024 +0800 drm/bridge: parade-ps8640: Ensure bridge is suspended in .post_disable() The ps8640 bridge seems to expect everything to be power cycled at the disable process, but sometimes ps8640_aux_transfer() holds the runtime PM reference and prevents the bridge from suspend. Prevent that by introducing a mutex lock between ps8640_aux_transfer() and .post_disable() to make sure the bridge is really powered off. Fixes: 826cff3f7ebb ("drm/bridge: parade-ps8640: Enable runtime power management") Signed-off-by: Pin-yen Lin Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20240109120528.1292601-1-treapking@chromium.org commit 4f41d30cd6dc865c3cbc1a852372321eba6d4e4c Author: Christophe JAILLET Date: Sat Nov 25 13:05:04 2023 +0100 kdb: Fix a potential buffer overflow in kdb_local() When appending "[defcmd]" to 'kdb_prompt_str', the size of the string already in the buffer should be taken into account. An option could be to switch from strncat() to strlcat() which does the correct test to avoid such an overflow. However, this actually looks as dead code, because 'defcmd_in_progress' can't be true here. See a more detailed explanation at [1]. [1]: https://lore.kernel.org/all/CAD=FV=WSh7wKN7Yp-3wWiDgX4E3isQ8uh0LCzTmd1v9Cg9j+nQ@mail.gmail.com/ Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)") Signed-off-by: Christophe JAILLET Reviewed-by: Douglas Anderson commit fb3c007fde80d9d3b4207943e74c150c9116cead Author: Bin Li Date: Wed Jan 17 23:41:23 2024 +0800 ALSA: hda/realtek: Enable headset mic on Lenovo M70 Gen5 Lenovo M70 Gen5 is equipped with ALC623, and it needs ALC283_FIXUP_HEADSET_MIC quirk to make its headset mic work. Signed-off-by: Bin Li Cc: Link: https://lore.kernel.org/r/20240117154123.21578-1-bin.li@canonical.com Signed-off-by: Takashi Iwai commit b4bc35cf8704db86203c0739711dab1804265bf3 Author: Pavel Begunkov Date: Wed Jan 17 00:57:29 2024 +0000 io_uring: combine cq_wait_nr checks Instead of explicitly checking ->cq_wait_nr for whether there are waiting, which is currently represented by 0, we can store there a large value and the nr_tw will automatically filter out those cases. Add a named constant for that and for the wake up bias value. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/38def30282654d980673976cd42fde9bab19b297.1705438669.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e8c407717b4814dac5641d93cbbbb9fc394f7cf0 Author: Pavel Begunkov Date: Wed Jan 17 00:57:28 2024 +0000 io_uring: clean *local_work_add var naming if (!first) { ... } While it reads as do something if it's not the first entry, it does exactly the opposite because "first" here is a pointer to the first entry. Remove the confusion by renaming it into "head". Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3b8be483b52f58a524185bb88694b8a268e7e85d.1705438669.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit d381099f980b5f6c3c7e150baf13b0aaefc66c29 Author: Pavel Begunkov Date: Wed Jan 17 00:57:27 2024 +0000 io_uring: clean up local tw add-wait sync Kill a smp_mb__after_atomic() right before wake_up, it's useless, and add a comment explaining implicit barriers from cmpxchg and synchronsation around ->cq_wait_nr with the waiter. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3007f3c2d53c72b61de56919ef56b53158b8276f.1705438669.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit dc12d1799ce710fd90abbe0ced71e7e1ae0894fc Author: Pavel Begunkov Date: Wed Jan 17 00:57:26 2024 +0000 io_uring: adjust defer tw counting The UINT_MAX work item counting bias in io_req_local_work_add() in case of !IOU_F_TWQ_LAZY_WAKE works in a sense that we will not miss a wake up, however it's still eerie. In particular, if we add a lazy work item after a non-lazy one, we'll increment it and get nr_tw==0, and subsequent adds may try to unnecessarily wake up the task, which is though not so likely to happen in real workloads. Half the bias, it's still large enough to be larger than any valid ->cq_wait_nr, which is limited by IORING_MAX_CQ_ENTRIES, but further have a good enough of space before it overflows. Fixes: 8751d15426a31 ("io_uring: reduce scheduling due to tw") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/108b971e958deaf7048342930c341ba90f75d806.1705438669.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit baf59771343dc0c2ef9ac3189bf9df2d6143654f Author: Jens Axboe Date: Tue Jan 16 17:08:32 2024 -0700 io_uring/register: guard compat syscall with CONFIG_COMPAT Add compat.h include to avoid a potential build issue: io_uring/register.c:281:6: error: call to undeclared function 'in_compat_syscall'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] if (in_compat_syscall()) { ^ 1 warning generated. io_uring/register.c:282:9: error: call to undeclared function 'compat_get_bitmap'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] ret = compat_get_bitmap(cpumask_bits(new_mask), ^ Fixes: c43203154d8a ("io_uring/register: move io_uring_register(2) related code to register.c") Reported-by: Manu Bretelle Reviewed-by: Jeff Moyer Signed-off-by: Jens Axboe commit 78fbb92af27d0982634116c7a31065f24d092826 Author: Eric Dumazet Date: Fri Jan 12 13:26:57 2024 +0000 nbd: always initialize struct msghdr completely syzbot complains that msg->msg_get_inq value can be uninitialized [1] struct msghdr got many new fields recently, we should always make sure their values is zero by default. [1] BUG: KMSAN: uninit-value in tcp_recvmsg+0x686/0xac0 net/ipv4/tcp.c:2571 tcp_recvmsg+0x686/0xac0 net/ipv4/tcp.c:2571 inet_recvmsg+0x131/0x580 net/ipv4/af_inet.c:879 sock_recvmsg_nosec net/socket.c:1044 [inline] sock_recvmsg+0x12b/0x1e0 net/socket.c:1066 __sock_xmit+0x236/0x5c0 drivers/block/nbd.c:538 nbd_read_reply drivers/block/nbd.c:732 [inline] recv_work+0x262/0x3100 drivers/block/nbd.c:863 process_one_work kernel/workqueue.c:2627 [inline] process_scheduled_works+0x104e/0x1e70 kernel/workqueue.c:2700 worker_thread+0xf45/0x1490 kernel/workqueue.c:2781 kthread+0x3ed/0x540 kernel/kthread.c:388 ret_from_fork+0x66/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Local variable msg created at: __sock_xmit+0x4c/0x5c0 drivers/block/nbd.c:513 nbd_read_reply drivers/block/nbd.c:732 [inline] recv_work+0x262/0x3100 drivers/block/nbd.c:863 CPU: 1 PID: 7465 Comm: kworker/u5:1 Not tainted 6.7.0-rc7-syzkaller-00041-gf016f7547aee #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Workqueue: nbd5-recv recv_work Fixes: f94fd25cb0aa ("tcp: pass back data left in socket after receive") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: stable@vger.kernel.org Cc: Josef Bacik Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: nbd@other.debian.org Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240112132657.647112-1-edumazet@google.com Signed-off-by: Jens Axboe commit b9bd10c43456d16abd97b717446f51afb3b88411 Author: Tony Krowiak Date: Mon Jan 15 13:54:36 2024 -0500 s390/vfio-ap: do not reset queue removed from host config When a queue is unbound from the vfio_ap device driver, it is reset to ensure its crypto data is not leaked when it is bound to another device driver. If the queue is unbound due to the fact that the adapter or domain was removed from the host's AP configuration, then attempting to reset it will fail with response code 01 (APID not valid) getting returned from the reset command. Let's ensure that the queue is assigned to the host's configuration before resetting it. Signed-off-by: Tony Krowiak Reviewed-by: "Jason J. Herne" Reviewed-by: Halil Pasic Fixes: eeb386aeb5b7 ("s390/vfio-ap: handle config changed and scan complete notification") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240115185441.31526-7-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit f009cfa466558b7dfe97f167ba1875d6f9ea4c07 Author: Tony Krowiak Date: Mon Jan 15 13:54:35 2024 -0500 s390/vfio-ap: reset queues associated with adapter for queue unbound from driver When a queue is unbound from the vfio_ap device driver, if that queue is assigned to a guest's AP configuration, its associated adapter is removed because queues are defined to a guest via a matrix of adapters and domains; so, it is not possible to remove a single queue. If an adapter is removed from the guest's AP configuration, all associated queues must be reset to prevent leaking crypto data should any of them be assigned to a different guest or device driver. The one caveat is that if the queue is being removed because the adapter or domain has been removed from the host's AP configuration, then an attempt to reset the queue will fail with response code 01, AP-queue number not valid; so resetting these queues should be skipped. Acked-by: Halil Pasic Signed-off-by: Tony Krowiak Fixes: 09d31ff78793 ("s390/vfio-ap: hot plug/unplug of AP devices when probed/removed") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240115185441.31526-6-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit f848cba767e59f8d5c54984b1d45451aae040d50 Author: Tony Krowiak Date: Mon Jan 15 13:54:34 2024 -0500 s390/vfio-ap: reset queues filtered from the guest's AP config When filtering the adapters from the configuration profile for a guest to create or update a guest's AP configuration, if the APID of an adapter and the APQI of a domain identify a queue device that is not bound to the vfio_ap device driver, the APID of the adapter will be filtered because an individual APQN can not be filtered due to the fact the APQNs are assigned to an AP configuration as a matrix of APIDs and APQIs. Consequently, a guest will not have access to all of the queues associated with the filtered adapter. If the queues are subsequently made available again to the guest, they should re-appear in a reset state; so, let's make sure all queues associated with an adapter unplugged from the guest are reset. In order to identify the set of queues that need to be reset, let's allow a vfio_ap_queue object to be simultaneously stored in both a hashtable and a list: A hashtable used to store all of the queues assigned to a matrix mdev; and/or, a list used to store a subset of the queues that need to be reset. For example, when an adapter is hot unplugged from a guest, all guest queues associated with that adapter must be reset. Since that may be a subset of those assigned to the matrix mdev, they can be stored in a list that can be passed to the vfio_ap_mdev_reset_queues function. Signed-off-by: Tony Krowiak Acked-by: Halil Pasic Fixes: 48cae940c31d ("s390/vfio-ap: refresh guest's APCB by filtering AP resources assigned to mdev") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240115185441.31526-5-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit 774d10196e648e2c0b78da817f631edfb3dfa557 Author: Tony Krowiak Date: Mon Jan 15 13:54:33 2024 -0500 s390/vfio-ap: let on_scan_complete() callback filter matrix and update guest's APCB When adapters and/or domains are added to the host's AP configuration, this may result in multiple queue devices getting created and probed by the vfio_ap device driver. For each queue device probed, the matrix of adapters and domains assigned to a matrix mdev will be filtered to update the guest's APCB. If any adapters or domains get added to or removed from the APCB, the guest's AP configuration will be dynamically updated (i.e., hot plug/unplug). To dynamically update the guest's configuration, its VCPUs must be taken out of SIE for the period of time it takes to make the update. This is disruptive to the guest's operation and if there are many queues probed due to a change in the host's AP configuration, this could be troublesome. The problem is exacerbated by the fact that the 'on_scan_complete' callback also filters the mdev's matrix and updates the guest's AP configuration. In order to reduce the potential amount of disruption to the guest that may result from a change to the host's AP configuration, let's bypass the filtering of the matrix and updating of the guest's AP configuration in the probe callback - if due to a host config change - and defer it until the 'on_scan_complete' callback is invoked after the AP bus finishes its device scan operation. This way the filtering and updating will be performed only once regardless of the number of queues added. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Fixes: 48cae940c31d ("s390/vfio-ap: refresh guest's APCB by filtering AP resources assigned to mdev") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240115185441.31526-4-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit 16fb78cbf56e42b8efb2682a4444ab59e32e7959 Author: Tony Krowiak Date: Mon Jan 15 13:54:32 2024 -0500 s390/vfio-ap: loop over the shadow APCB when filtering guest's AP configuration While filtering the mdev matrix, it doesn't make sense - and will have unexpected results - to filter an APID from the matrix if the APID or one of the associated APQIs is not in the host's AP configuration. There are two reasons for this: 1. An adapter or domain that is not in the host's AP configuration can be assigned to the matrix; this is known as over-provisioning. Queue devices, however, are only created for adapters and domains in the host's AP configuration, so there will be no queues associated with an over-provisioned adapter or domain to filter. 2. The adapter or domain may have been externally removed from the host's configuration via an SE or HMC attached to a DPM enabled LPAR. In this case, the vfio_ap device driver would have been notified by the AP bus via the on_config_changed callback and the adapter or domain would have already been filtered. Since the matrix_mdev->shadow_apcb.apm and matrix_mdev->shadow_apcb.aqm are copied from the mdev matrix sans the APIDs and APQIs not in the host's AP configuration, let's loop over those bitmaps instead of those assigned to the matrix. Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Fixes: 48cae940c31d ("s390/vfio-ap: refresh guest's APCB by filtering AP resources assigned to mdev") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240115185441.31526-3-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit 850fb7fa8c684a4c6bf0e4b6978f4ddcc5d43d11 Author: Tony Krowiak Date: Mon Jan 15 13:54:31 2024 -0500 s390/vfio-ap: always filter entire AP matrix The vfio_ap_mdev_filter_matrix function is called whenever a new adapter or domain is assigned to the mdev. The purpose of the function is to update the guest's AP configuration by filtering the matrix of adapters and domains assigned to the mdev. When an adapter or domain is assigned, only the APQNs associated with the APID of the new adapter or APQI of the new domain are inspected. If an APQN does not reference a queue device bound to the vfio_ap device driver, then it's APID will be filtered from the mdev's matrix when updating the guest's AP configuration. Inspecting only the APID of the new adapter or APQI of the new domain will result in passing AP queues through to a guest that are not bound to the vfio_ap device driver under certain circumstances. Consider the following: guest's AP configuration (all also assigned to the mdev's matrix): 14.0004 14.0005 14.0006 16.0004 16.0005 16.0006 unassign domain 4 unbind queue 16.0005 assign domain 4 When domain 4 is re-assigned, since only domain 4 will be inspected, the APQNs that will be examined will be: 14.0004 16.0004 Since both of those APQNs reference queue devices that are bound to the vfio_ap device driver, nothing will get filtered from the mdev's matrix when updating the guest's AP configuration. Consequently, queue 16.0005 will get passed through despite not being bound to the driver. This violates the linux device model requirement that a guest shall only be given access to devices bound to the device driver facilitating their pass-through. To resolve this problem, every adapter and domain assigned to the mdev will be inspected when filtering the mdev's matrix. Signed-off-by: Tony Krowiak Acked-by: Halil Pasic Fixes: 48cae940c31d ("s390/vfio-ap: refresh guest's APCB by filtering AP resources assigned to mdev") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240115185441.31526-2-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit 8f54fca3f8fce49c2d5f4ec4b7c325d1e50916df Author: Alexandra Winter Date: Thu Jan 4 16:01:30 2024 +0100 s390/net: add Thorsten Winkler as maintainer Thank you Wenjia for your support, welcome Thorsten! Acked-by: Wenjia Zhang Acked-by: Thorsten Winkler Signed-off-by: Alexandra Winter Signed-off-by: Alexander Gordeev commit d6938c1c76c64f42363d0d1f051e1b4641c2ad40 Author: Fedor Pchelkin Date: Mon Jan 15 17:39:22 2024 +0300 ipvs: avoid stat macros calls from preemptible context Inside decrement_ttl() upon discovering that the packet ttl has exceeded, __IP_INC_STATS and __IP6_INC_STATS macros can be called from preemptible context having the following backtrace: check_preemption_disabled: 48 callbacks suppressed BUG: using __this_cpu_add() in preemptible [00000000] code: curl/1177 caller is decrement_ttl+0x217/0x830 CPU: 5 PID: 1177 Comm: curl Not tainted 6.7.0+ #34 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 04/01/2014 Call Trace: dump_stack_lvl+0xbd/0xe0 check_preemption_disabled+0xd1/0xe0 decrement_ttl+0x217/0x830 __ip_vs_get_out_rt+0x4e0/0x1ef0 ip_vs_nat_xmit+0x205/0xcd0 ip_vs_in_hook+0x9b1/0x26a0 nf_hook_slow+0xc2/0x210 nf_hook+0x1fb/0x770 __ip_local_out+0x33b/0x640 ip_local_out+0x2a/0x490 __ip_queue_xmit+0x990/0x1d10 __tcp_transmit_skb+0x288b/0x3d10 tcp_connect+0x3466/0x5180 tcp_v4_connect+0x1535/0x1bb0 __inet_stream_connect+0x40d/0x1040 inet_stream_connect+0x57/0xa0 __sys_connect_file+0x162/0x1a0 __sys_connect+0x137/0x160 __x64_sys_connect+0x72/0xb0 do_syscall_64+0x6f/0x140 entry_SYSCALL_64_after_hwframe+0x6e/0x76 RIP: 0033:0x7fe6dbbc34e0 Use the corresponding preemption-aware variants: IP_INC_STATS and IP6_INC_STATS. Found by Linux Verification Center (linuxtesting.org). Fixes: 8d8e20e2d7bb ("ipvs: Decrement ttl") Signed-off-by: Fedor Pchelkin Acked-by: Julian Anastasov Acked-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 113661e07460a6604aacc8ae1b23695a89e7d4b3 Author: Pablo Neira Ayuso Date: Mon Jan 15 12:50:29 2024 +0100 netfilter: nf_tables: reject NFT_SET_CONCAT with not field length description It is still possible to set on the NFT_SET_CONCAT flag by specifying a set size and no field description, report EINVAL in such case. Fixes: 1b6345d4160e ("netfilter: nf_tables: check NFT_SET_CONCAT flag if field_count is specified") Signed-off-by: Pablo Neira Ayuso commit 6b1ca88e4bb63673dc9f9c7f23c899f22c3cb17a Author: Pablo Neira Ayuso Date: Mon Jan 15 00:14:38 2024 +0100 netfilter: nf_tables: skip dead set elements in netlink dump Delete from packet path relies on the garbage collector to purge elements with NFT_SET_ELEM_DEAD_BIT on. Skip these dead elements from nf_tables_dump_setelem() path, I very rarely see tests/shell/testcases/maps/typeof_maps_add_delete reports [DUMP FAILED] showing a mismatch in the expected output with an element that should not be there. If the netlink dump happens before GC worker run, it might show dead elements in the ruleset listing. nft_rhash_get() already skips dead elements in nft_rhash_cmp(), therefore, it already does not show the element when getting a single element via netlink control plane. Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane") Signed-off-by: Pablo Neira Ayuso commit 3ce67e3793f48c1b9635beb9bb71116ca1e51b58 Author: Pablo Neira Ayuso Date: Sun Jan 14 23:53:39 2024 +0100 netfilter: nf_tables: do not allow mismatch field size and set key length The set description provides the size of each field in the set whose sum should not mismatch the set key length, bail out otherwise. I did not manage to crash nft_set_pipapo with mismatch fields and set key length so far, but this is UB which must be disallowed. Fixes: f3a2181e16f1 ("netfilter: nf_tables: Support for sets with multiple ranged fields") Signed-off-by: Pablo Neira Ayuso commit b1db244ffd041a49ecc9618e8feb6b5c1afcdaa7 Author: Pablo Neira Ayuso Date: Fri Jan 12 23:28:45 2024 +0100 netfilter: nf_tables: check if catch-all set element is active in next generation When deactivating the catch-all set element, check the state in the next generation that represents this transaction. This bug uncovered after the recent removal of the element busy mark a2dd0233cbc4 ("netfilter: nf_tables: remove busy mark and gc batch API"). Fixes: aaa31047a6d2 ("netfilter: nftables: add catch-all set element support") Cc: stable@vger.kernel.org Reported-by: lonial con Signed-off-by: Pablo Neira Ayuso commit 9874808878d9eed407e3977fd11fee49de1e1d86 Author: Pavel Tikhomirov Date: Thu Jan 11 23:06:40 2024 +0800 netfilter: bridge: replace physindev with physinif in nf_bridge_info An skb can be added to a neigh->arp_queue while waiting for an arp reply. Where original skb's skb->dev can be different to neigh's neigh->dev. For instance in case of bridging dnated skb from one veth to another, the skb would be added to a neigh->arp_queue of the bridge. As skb->dev can be reset back to nf_bridge->physindev and used, and as there is no explicit mechanism that prevents this physindev from been freed under us (for instance neigh_flush_dev doesn't cleanup skbs from different device's neigh queue) we can crash on e.g. this stack: arp_process neigh_update skb = __skb_dequeue(&neigh->arp_queue) neigh_resolve_output(..., skb) ... br_nf_dev_xmit br_nf_pre_routing_finish_bridge_slow skb->dev = nf_bridge->physindev br_handle_frame_finish Let's use plain ifindex instead of net_device link. To peek into the original net_device we will use dev_get_by_index_rcu(). Thus either we get device and are safe to use it or we don't get it and drop skb. Fixes: c4e70a87d975 ("netfilter: bridge: rename br_netfilter.c to br_netfilter_hooks.c") Suggested-by: Florian Westphal Signed-off-by: Pavel Tikhomirov Signed-off-by: Pablo Neira Ayuso commit a54e72197037d2c9bfcd70dddaac8c8ccb5b41ba Author: Pavel Tikhomirov Date: Thu Jan 11 23:06:39 2024 +0800 netfilter: propagate net to nf_bridge_get_physindev This is a preparation patch for replacing physindev with physinif on nf_bridge_info structure. We will use dev_get_by_index_rcu to resolve device, when needed, and it requires net to be available. Signed-off-by: Pavel Tikhomirov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit aeaa44075f8e49e2e0ad4507d925e690b7950145 Author: Pavel Tikhomirov Date: Thu Jan 11 23:06:38 2024 +0800 netfilter: nf_queue: remove excess nf_bridge variable We don't really need nf_bridge variable here. And nf_bridge_info_exists is better replacement for nf_bridge_info_get in case we are only checking for existence. Signed-off-by: Pavel Tikhomirov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit c3f9fd54cd87233f53bdf0e191a86b3a5e960e02 Author: Pavel Tikhomirov Date: Thu Jan 11 23:06:37 2024 +0800 netfilter: nfnetlink_log: use proper helper for fetching physinif We don't use physindev in __build_packet_message except for getting physinif from it. So let's switch to nf_bridge_get_physinif to get what we want directly. Signed-off-by: Pavel Tikhomirov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 91a139cee1202a4599a380810d93c69b5bac6197 Author: Pablo Neira Ayuso Date: Wed Jan 10 00:42:37 2024 +0100 netfilter: nft_limit: do not ignore unsupported flags Bail out if userspace provides unsupported flags, otherwise future extensions to the limit expression will be silently ignored by the kernel. Fixes: c7862a5f0de5 ("netfilter: nft_limit: allow to invert matching criteria") Signed-off-by: Pablo Neira Ayuso commit 3c13725f43dcf43ad8a9bcd6a9f12add19a8f93e Author: Pablo Neira Ayuso Date: Sun Jan 7 23:00:15 2024 +0100 netfilter: nf_tables: bail out if stateful expression provides no .clone All existing NFT_EXPR_STATEFUL provide a .clone interface, remove fallback to copy content of stateful expression since this is never exercised and bail out if .clone interface is not defined. Signed-off-by: Pablo Neira Ayuso commit 65b3bd600e15e00fb9e433bbc8aa55e42b202055 Author: Pablo Neira Ayuso Date: Sat Jan 6 23:52:02 2024 +0100 netfilter: nf_tables: validate .maxattr at expression registration struct nft_expr_info allows to store up to NFT_EXPR_MAXATTR (16) attributes when parsing netlink attributes. Rise a warning in case there is ever a nft expression whose .maxattr goes beyond this number of expressions, in such case, struct nft_expr_info needs to be updated. Signed-off-by: Pablo Neira Ayuso commit 0617c3de9b4026b87be12b0cb5c35f42c7c66fcb Author: Pablo Neira Ayuso Date: Wed Jan 3 23:34:58 2024 +0100 netfilter: nf_tables: reject invalid set policy Report -EINVAL in case userspace provides a unsupported set backend policy. Fixes: c50b960ccc59 ("netfilter: nf_tables: implement proper set selection") Signed-off-by: Pablo Neira Ayuso commit ea937f77208323d35ffe2f8d8fc81b00118bfcda Author: Jakub Kicinski Date: Tue Jan 16 11:14:00 2024 -0800 net: netdevsim: don't try to destroy PHC on VFs PHC gets initialized in nsim_init_netdevsim(), which is only called if (nsim_dev_port_is_pf()). Create a counterpart of nsim_init_netdevsim() and move the mock_phc_destroy() there. This fixes a crash trying to destroy netdevsim with VFs instantiated, as caught by running the devlink.sh test: BUG: kernel NULL pointer dereference, address: 00000000000000b8 RIP: 0010:mock_phc_destroy+0xd/0x30 Call Trace: nsim_destroy+0x4a/0x70 [netdevsim] __nsim_dev_port_del+0x47/0x70 [netdevsim] nsim_dev_reload_destroy+0x105/0x120 [netdevsim] nsim_drv_remove+0x2f/0xb0 [netdevsim] device_release_driver_internal+0x1a1/0x210 bus_remove_device+0xd5/0x120 device_del+0x159/0x490 device_unregister+0x12/0x30 del_device_store+0x11a/0x1a0 [netdevsim] kernfs_fop_write_iter+0x130/0x1d0 vfs_write+0x30b/0x4b0 ksys_write+0x69/0xf0 do_syscall_64+0xcc/0x1e0 entry_SYSCALL_64_after_hwframe+0x6f/0x77 Fixes: b63e78fca889 ("net: netdevsim: use mock PHC driver") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c0f5aec28edf98906d28f08daace6522adf9ee7a Author: Paolo Abeni Date: Tue Jan 16 18:18:47 2024 +0100 mptcp: relax check on MPC passive fallback While testing the blamed commit below, I was able to miss (!) packetdrill failures in the fastopen test-cases. On passive fastopen the child socket is created by incoming TCP MPC syn, allow for both MPC_SYN and MPC_ACK header. Fixes: 724b00c12957 ("mptcp: refine opt_mp_capable determination") Reviewed-by: Matthieu Baerts Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit c2945c435c999c63e47f337bc7c13c98c21d0bcc Author: Romain Gantois Date: Tue Jan 16 13:19:17 2024 +0100 net: stmmac: Prevent DSA tags from breaking COE Some DSA tagging protocols change the EtherType field in the MAC header e.g. DSA_TAG_PROTO_(DSA/EDSA/BRCM/MTK/RTL4C_A/SJA1105). On TX these tagged frames are ignored by the checksum offload engine and IP header checker of some stmmac cores. On RX, the stmmac driver wrongly assumes that checksums have been computed for these tagged packets, and sets CHECKSUM_UNNECESSARY. Add an additional check in the stmmac TX and RX hotpaths so that COE is deactivated for packets with ethertypes that will not trigger the COE and IP header checks. Fixes: 6b2c6e4a938f ("net: stmmac: propagate feature flags to vlan") Cc: Reported-by: Richard Tresidder Link: https://lore.kernel.org/netdev/e5c6c75f-2dfa-4e50-a1fb-6bf4cdb617c2@electromag.com.au/ Reported-by: Romain Gantois Link: https://lore.kernel.org/netdev/c57283ed-6b9b-b0e6-ee12-5655c1c54495@bootlin.com/ Reviewed-by: Vladimir Oltean Reviewed-by: Linus Walleij Signed-off-by: Romain Gantois Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 3eb791c891aa91603a5fbbfea940f8acf5f17d45 Author: Michał Winiarski Date: Tue Jan 16 18:46:02 2024 +0100 drm/tests: mm: Call drm_mm_print in drm_test_mm_debug The original intent behind the test was to sanity check whether calling the debug iterator (drm_mm_print) doesn't cause any problems. Unfortunately - this call got accidentally removed during KUnit transition. Restore it. Signed-off-by: Michał Winiarski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20240116174602.1019512-1-michal.winiarski@intel.com commit efb8235bfdbe661c460f803150b50840a73b5f03 Author: Bartosz Golaszewski Date: Mon Jan 15 12:17:43 2024 +0100 gpiolib: revert the attempt to protect the GPIO device list with an rwsem This reverts commits 1979a2807547 ("gpiolib: replace the GPIO device mutex with a read-write semaphore") and 65a828bab158 ("gpiolib: use a mutex to protect the list of GPIO devices"). Unfortunately the legacy GPIO API that's still used in older code has to translate numbers from the global GPIO numberspace to descriptors. This results in a GPIO device lookup in every call to legacy functions. Some of those functions - like gpio_set/get_value() - can be called from atomic context so taking a sleeping lock that is an RW semaphore results in an error. We'll probably have to protect this list with SRCU. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-wireless/f7b5ff1e-8f34-4d98-a7be-b826cb897dc8@moroto.mountain/ Fixes: 1979a2807547 ("gpiolib: replace the GPIO device mutex with a read-write semaphore") Fixes: 65a828bab158 ("gpiolib: use a mutex to protect the list of GPIO devices") Signed-off-by: Bartosz Golaszewski commit 0103b4496087c99c195800456bf6a4fcf24fd444 Author: Umesh Nerlige Ramappa Date: Mon Dec 18 16:05:43 2023 -0800 drm/i915/perf: Update handling of MMIO triggered reports On XEHP platforms user is not able to find MMIO triggered reports in the OA buffer since i915 squashes the context ID fields. These context ID fields hold the MMIO trigger markers. Update logic to not squash the context ID fields of MMIO triggered reports. Fixes: cba94bbcff08 ("drm/i915/perf: Determine context valid in OA reports") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20231219000543.1087706-1-umesh.nerlige.ramappa@intel.com (cherry picked from commit 0c68132df6e66244acec1bb5b9e19b0751414389) Signed-off-by: Joonas Lahtinen commit 3d9e9020b92288871b02f194c3ec88e03a1afa88 Author: Khaled Almahallawy Date: Wed Dec 13 13:15:42 2023 -0800 drm/i915/dp: Fix passing the correct DPCD_REV for drm_dp_set_phy_test_pattern Using link_status to get DPCD_REV fails when disabling/defaulting phy pattern. Use intel_dp->dpcd to access DPCD_REV correctly. Fixes: 8cdf72711928 ("drm/i915/dp: Program vswing, pre-emphasis, test-pattern") Cc: Jani Nikula Cc: Imre Deak Cc: Lee Shawn C Signed-off-by: Khaled Almahallawy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231213211542.3585105-3-khaled.almahallawy@intel.com (cherry picked from commit 3ee302ec22d6e1d7d1e6d381b0d507ee80f2135c) Signed-off-by: Joonas Lahtinen commit 0a8c1feed387f8460b8b65fc46fb3608afa7512e Author: Yangyu Chen Date: Wed Jan 17 02:50:34 2024 +0800 drm/ttm: allocate dummy_read_page without DMA32 on fail Some platforms may not have any memory in ZONE_DMA32 and use IOMMU to allow 32-bit-DMA-only device to work. Forcing GFP_DMA32 on dummy_read_page will fail on such platforms. Retry after fail will get this works on such platforms. Signed-off-by: Yangyu Chen Link: https://patchwork.freedesktop.org/patch/msgid/tencent_8637383EE0A2C7CC870036AAF01909B26A0A@qq.com Signed-off-by: Christian König commit 1982a2a02c9197436d4a8ea12f66bafab53f16a0 Author: Guillaume Nault Date: Wed Jan 3 16:06:32 2024 +0100 xfrm: Clear low order bits of ->flowi4_tos in decode_session4(). Commit 23e7b1bfed61 ("xfrm: Don't accidentally set RTO_ONLINK in decode_session4()") fixed a problem where decode_session4() could erroneously set the RTO_ONLINK flag for IPv4 route lookups. This problem was reintroduced when decode_session4() was modified to use the flow dissector. Fix this by clearing again the two low order bits of ->flowi4_tos. Found by code inspection, compile tested only. Fixes: 7a0207094f1b ("xfrm: policy: replace session decode with flow dissector") Signed-off-by: Guillaume Nault Signed-off-by: Steffen Klassert commit 6e441fa3ac475be73c03c9a85bd305d66ea476a6 Author: Tiezhu Yang Date: Wed Jan 17 12:43:13 2024 +0800 MAINTAINERS: Add BPF JIT for LOONGARCH entry After commit 5dc615520c4d ("LoongArch: Add BPF JIT support"), there is no BPF JIT for LOONGARCH entry, in order to maintain the current code and the new features timely, just add it. Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit fc562925f51c0ce462c17b24a5c538db676af576 Author: Huacai Chen Date: Wed Jan 17 12:43:13 2024 +0800 LoongArch: Update Loongson-3 default config file 1, Increase NR_CPUS to 256. 2, Enable some cgroup options. 3, Enable some PREEMPT_DYNAMIC/SCHED_CORE options. 4, Enable some CMA/DMA_CMA options. 5, Enable some F2FS options. 6, Enable some DMABUF/UDMABUF options. 7, Enable some USB4 and NTB options. 8, Enable some networking options (MPTCP). 9, Enable Loongson-specific drivers: APB DMA, ASoC. 10, Enable PCI_HOST_GENERIC and SND_VIRTIO for virtual machine. 11, Remove obsolete SECURITY_SELINUX_DISABLE. 12, Regenerate the whole file to keep the order of options be the same as the latest source code. Signed-off-by: Huacai Chen commit 36a87385e31c9343af9a4756598e704741250a67 Author: Hengqi Chen Date: Wed Jan 17 12:43:13 2024 +0800 LoongArch: BPF: Prevent out-of-bounds memory access The test_tag test triggers an unhandled page fault: # ./test_tag [ 130.640218] CPU 0 Unable to handle kernel paging request at virtual address ffff80001b898004, era == 9000000003137f7c, ra == 9000000003139e70 [ 130.640501] Oops[#3]: [ 130.640553] CPU: 0 PID: 1326 Comm: test_tag Tainted: G D O 6.7.0-rc4-loong-devel-gb62ab1a397cf #47 61985c1d94084daa2432f771daa45b56b10d8d2a [ 130.640764] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 2/2/2022 [ 130.640874] pc 9000000003137f7c ra 9000000003139e70 tp 9000000104cb4000 sp 9000000104cb7a40 [ 130.641001] a0 ffff80001b894000 a1 ffff80001b897ff8 a2 000000006ba210be a3 0000000000000000 [ 130.641128] a4 000000006ba210be a5 00000000000000f1 a6 00000000000000b3 a7 0000000000000000 [ 130.641256] t0 0000000000000000 t1 00000000000007f6 t2 0000000000000000 t3 9000000004091b70 [ 130.641387] t4 000000006ba210be t5 0000000000000004 t6 fffffffffffffff0 t7 90000000040913e0 [ 130.641512] t8 0000000000000005 u0 0000000000000dc0 s9 0000000000000009 s0 9000000104cb7ae0 [ 130.641641] s1 00000000000007f6 s2 0000000000000009 s3 0000000000000095 s4 0000000000000000 [ 130.641771] s5 ffff80001b894000 s6 ffff80001b897fb0 s7 9000000004090c50 s8 0000000000000000 [ 130.641900] ra: 9000000003139e70 build_body+0x1fcc/0x4988 [ 130.642007] ERA: 9000000003137f7c build_body+0xd8/0x4988 [ 130.642112] CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) [ 130.642261] PRMD: 00000004 (PPLV0 +PIE -PWE) [ 130.642353] EUEN: 00000003 (+FPE +SXE -ASXE -BTE) [ 130.642458] ECFG: 00071c1c (LIE=2-4,10-12 VS=7) [ 130.642554] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0) [ 130.642658] BADV: ffff80001b898004 [ 130.642719] PRID: 0014c010 (Loongson-64bit, Loongson-3A5000) [ 130.642815] Modules linked in: [last unloaded: bpf_testmod(O)] [ 130.642924] Process test_tag (pid: 1326, threadinfo=00000000f7f4015f, task=000000006499f9fd) [ 130.643062] Stack : 0000000000000000 9000000003380724 0000000000000000 0000000104cb7be8 [ 130.643213] 0000000000000000 25af8d9b6e600558 9000000106250ea0 9000000104cb7ae0 [ 130.643378] 0000000000000000 0000000000000000 9000000104cb7be8 90000000049f6000 [ 130.643538] 0000000000000090 9000000106250ea0 ffff80001b894000 ffff80001b894000 [ 130.643685] 00007ffffb917790 900000000313ca94 0000000000000000 0000000000000000 [ 130.643831] ffff80001b894000 0000000000000ff7 0000000000000000 9000000100468000 [ 130.643983] 0000000000000000 0000000000000000 0000000000000040 25af8d9b6e600558 [ 130.644131] 0000000000000bb7 ffff80001b894048 0000000000000000 0000000000000000 [ 130.644276] 9000000104cb7be8 90000000049f6000 0000000000000090 9000000104cb7bdc [ 130.644423] ffff80001b894000 0000000000000000 00007ffffb917790 90000000032acfb0 [ 130.644572] ... [ 130.644629] Call Trace: [ 130.644641] [<9000000003137f7c>] build_body+0xd8/0x4988 [ 130.644785] [<900000000313ca94>] bpf_int_jit_compile+0x228/0x4ec [ 130.644891] [<90000000032acfb0>] bpf_prog_select_runtime+0x158/0x1b0 [ 130.645003] [<90000000032b3504>] bpf_prog_load+0x760/0xb44 [ 130.645089] [<90000000032b6744>] __sys_bpf+0xbb8/0x2588 [ 130.645175] [<90000000032b8388>] sys_bpf+0x20/0x2c [ 130.645259] [<9000000003f6ab38>] do_syscall+0x7c/0x94 [ 130.645369] [<9000000003121c5c>] handle_syscall+0xbc/0x158 [ 130.645507] [ 130.645539] Code: 380839f6 380831f9 28412bae <24000ca6> 004081ad 0014cb50 004083e8 02bff34c 58008e91 [ 130.645729] [ 130.646418] ---[ end trace 0000000000000000 ]--- On my machine, which has CONFIG_PAGE_SIZE_16KB=y, the test failed at loading a BPF prog with 2039 instructions: prog = (struct bpf_prog *)ffff80001b894000 insn = (struct bpf_insn *)(prog->insnsi)ffff80001b894048 insn + 2039 = (struct bpf_insn *)ffff80001b898000 <- end of the page In the build_insn() function, we are trying to access next instruction unconditionally, i.e. `(insn + 1)->imm`. The address lies in the next page and can be not owned by the current process, thus an page fault is inevitable and then segfault. So, let's access next instruction only under `dst = imm64` context. With this fix, we have: # ./test_tag test_tag: OK (40945 tests) Fixes: bbfddb904df6f82 ("LoongArch: BPF: Avoid declare variables in switch-case") Tested-by: Tiezhu Yang Signed-off-by: Hengqi Chen Signed-off-by: Huacai Chen commit 21c5ae5cc1eee70f7f3b09f1d6b237d9812d4b9c Author: Hengqi Chen Date: Wed Jan 17 12:43:13 2024 +0800 LoongArch: BPF: Support 64-bit pointers to kfuncs Like commit 1cf3bfc60f9836f ("bpf: Support 64-bit pointers to kfuncs") for s390x, add support for 64-bit pointers to kfuncs for LoongArch. Since the infrastructure is already implemented in BPF core, the only thing need to be done is to override bpf_jit_supports_far_kfunc_call(). Before this change, several test_verifier tests failed: # ./test_verifier | grep # | grep FAIL #119/p calls: invalid kfunc call: ptr_to_mem to struct with non-scalar FAIL #120/p calls: invalid kfunc call: ptr_to_mem to struct with nesting depth > 4 FAIL #121/p calls: invalid kfunc call: ptr_to_mem to struct with FAM FAIL #122/p calls: invalid kfunc call: reg->type != PTR_TO_CTX FAIL #123/p calls: invalid kfunc call: void * not allowed in func proto without mem size arg FAIL #124/p calls: trigger reg2btf_ids[reg->type] for reg->type > __BPF_REG_TYPE_MAX FAIL #125/p calls: invalid kfunc call: reg->off must be zero when passed to release kfunc FAIL #126/p calls: invalid kfunc call: don't match first member type when passed to release kfunc FAIL #127/p calls: invalid kfunc call: PTR_TO_BTF_ID with negative offset FAIL #128/p calls: invalid kfunc call: PTR_TO_BTF_ID with variable offset FAIL #129/p calls: invalid kfunc call: referenced arg needs refcounted PTR_TO_BTF_ID FAIL #130/p calls: valid kfunc call: referenced arg needs refcounted PTR_TO_BTF_ID FAIL #486/p map_kptr: ref: reference state created and released on xchg FAIL This is because the kfuncs in the loaded module are far away from __bpf_call_base: ffff800002009440 t bpf_kfunc_call_test_fail1 [bpf_testmod] 9000000002e128d8 T __bpf_call_base The offset relative to __bpf_call_base does NOT fit in s32, which breaks the assumption in BPF core. Enable bpf_jit_supports_far_kfunc_call() lifts this limit. Note that to reproduce the above result, tools/testing/selftests/bpf/config should be applied, and run the test with JIT enabled, unpriv BPF enabled. With this change, the test_verifier tests now all passed: # ./test_verifier ... Summary: 777 PASSED, 0 SKIPPED, 0 FAILED Tested-by: Tiezhu Yang Signed-off-by: Hengqi Chen Signed-off-by: Huacai Chen commit 91af17cd7d03db8836554c91ba7c38b0817aa980 Author: Tiezhu Yang Date: Wed Jan 17 12:43:08 2024 +0800 LoongArch: Fix definition of ftrace_regs_set_instruction_pointer() The current definition of ftrace_regs_set_instruction_pointer() is not correct. Obviously, this function is used to set instruction pointer but not return value, so it should call instruction_pointer_set() instead of regs_set_return_value(). There is no side effect by now because it is only used for kernel live- patching which is not supported, so fix it to avoid failure when testing livepatch in the future. Fixes: 6fbff14a6382 ("LoongArch: ftrace: Abstract DYNAMIC_FTRACE_WITH_ARGS accesses") Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen commit 78de91b45860da175bab73f4521d9ad875f3a7d4 Author: Youling Tang Date: Wed Jan 17 12:43:08 2024 +0800 LoongArch: Use generic interface to support crashkernel=X,[high,low] LoongArch already supports two crashkernel regions in kexec-tools, so we can directly use the common interface to support crashkernel=X,[high,low] after commit 0ab97169aa0517079b ("crash_core: add generic function to do reservation"). With the help of newly changed function parse_crashkernel() and generic reserve_crashkernel_generic(), crashkernel reservation can be simplified by steps: 1) Add a new header file , then define CRASH_ALIGN, CRASH_ADDR_LOW_MAX and CRASH_ADDR_HIGH_MAX and in ; 2) Add arch_reserve_crashkernel() to call parse_crashkernel() and reserve_crashkernel_generic(); 3) Add ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION Kconfig in arch/loongarch/Kconfig. One can reserve the crash kernel from high memory above DMA zone range by explicitly passing "crashkernel=X,high"; or reserve a memory range below 4G with "crashkernel=X,low". Besides, there are few rules need to take notice: 1) "crashkernel=X,[high,low]" will be ignored if "crashkernel=size" is specified. 2) "crashkernel=X,low" is valid only when "crashkernel=X,high" is passed and there is enough memory to be allocated under 4G. 3) When allocating crashkernel above 4G and no "crashkernel=X,low" is specified, a 128M low memory will be allocated automatically for swiotlb bounce buffer. See Documentation/admin-guide/kernel-parameters.txt for more information. Following test cases have been performed as expected: 1) crashkernel=256M //low=256M 2) crashkernel=1G //low=1G 3) crashkernel=4G //high=4G, low=128M(default) 4) crashkernel=4G crashkernel=256M,high //high=4G, low=128M(default), high is ignored 5) crashkernel=4G crashkernel=256M,low //high=4G, low=128M(default), low is ignored 6) crashkernel=4G,high //high=4G, low=128M(default) 7) crashkernel=256M,low //low=0M, invalid 8) crashkernel=4G,high crashkernel=256M,low //high=4G, low=256M 9) crashkernel=4G,high crashkernel=4G,low //high=0M, low=0M, invalid 10) crashkernel=512M@2560M //low=512M 11) crashkernel=1G,high crashkernel=0M,low //high=1G, low=0M Recommended usage in general: 1) In the case of small memory: crashkernel=512M 2) In the case of large memory: crashkernel=1024M,high crashkernel=128M,low Signed-off-by: Youling Tang Signed-off-by: Huacai Chen commit c2396651309eba291c15e32db8fbe44c738b5921 Author: Xi Ruoyao Date: Wed Jan 17 12:43:08 2024 +0800 LoongArch: Fix and simplify fcsr initialization on execve() There has been a lingering bug in LoongArch Linux systems causing some GCC tests to intermittently fail (see Closes link). I've made a minimal reproducer: zsh% cat measure.s .align 4 .globl _start _start: movfcsr2gr $a0, $fcsr0 bstrpick.w $a0, $a0, 16, 16 beqz $a0, .ok break 0 .ok: li.w $a7, 93 syscall 0 zsh% cc mesaure.s -o measure -nostdlib zsh% echo $((1.0/3)) 0.33333333333333331 zsh% while ./measure; do ; done This while loop should not stop as POSIX is clear that execve must set fenv to the default, where FCSR should be zero. But in fact it will just stop after running for a while (normally less than 30 seconds). Note that "$((1.0/3))" is needed to reproduce this issue because it raises FE_INVALID and makes fcsr0 non-zero. The problem is we are currently relying on SET_PERSONALITY2() to reset current->thread.fpu.fcsr. But SET_PERSONALITY2() is executed before start_thread which calls lose_fpu(0). We can see if kernel preempt is enabled, we may switch to another thread after SET_PERSONALITY2() but before lose_fpu(0). Then bad thing happens: during the thread switch the value of the fcsr0 register is stored into current->thread.fpu.fcsr, making it dirty again. The issue can be fixed by setting current->thread.fpu.fcsr after lose_fpu(0) because lose_fpu() clears TIF_USEDFPU, then the thread switch won't touch current->thread.fpu.fcsr. The only other architecture setting FCSR in SET_PERSONALITY2() is MIPS. I've ran a similar test on MIPS with mainline kernel and it turns out MIPS is buggy, too. Anyway MIPS do this for supporting different FP flavors (NaN encodings, etc.) which do not exist on LoongArch. So for LoongArch, we can simply remove the current->thread.fpu.fcsr setting from SET_PERSONALITY2() and do it in start_thread(), after lose_fpu(0). The while loop failing with the mainline kernel has survived one hour after this change on LoongArch. Fixes: 803b0fc5c3f2baa ("LoongArch: Add process management") Closes: https://github.com/loongson-community/discussions/issues/7 Link: https://lore.kernel.org/linux-mips/7a6aa1bbdbbe2e63ae96ff163fab0349f58f1b9e.camel@xry111.site/ Cc: stable@vger.kernel.org Signed-off-by: Xi Ruoyao Signed-off-by: Huacai Chen commit ce68ff3528e6eff4a1a4770600ec6c66779ba7b9 Author: Huacai Chen Date: Wed Jan 17 12:43:08 2024 +0800 LoongArch: Let cores_io_master cover the largest NR_CPUS Now loongson_system_configuration::cores_io_master only covers 64 cpus, if NR_CPUS > 64 there will be memory corruption. So let cores_io_master cover the largest NR_CPUS (256). Signed-off-by: Huacai Chen commit d23b77953f5a4fbf94c05157b186aac2a247ae32 Author: Huacai Chen Date: Wed Jan 17 12:43:08 2024 +0800 LoongArch: Change SHMLBA from SZ_64K to PAGE_SIZE LoongArch has hardware page coloring for L1 Cache, so we don't have cache aliases. But SFB (Store Fill Buffer) still has aliases. So we define SHMLBA to SZ_64K previously. But there are losts of applications use PAGE_SIZE rather than SHMLBA to mmap() file pages and shared pages. Of course we can fix them one by one, but not easy. On the other hand, we can simply disable SFB for 4KB page size to fix cache alias (there will be performance decrease, but acceptable), and in future we will fix SFB in hardware. So we can safely define SHMLBA to PAGE_SIZE (use the generic shmparam.h) to make life easier. Signed-off-by: Huacai Chen commit 9499daeade0edcbd3d5d20ffdd642a8e3a194b1f Author: Huacai Chen Date: Wed Jan 17 12:43:08 2024 +0800 LoongArch: Add a missing call to efi_esrt_init() ESRT (EFI System Resource Table) is needed for UEFI's "Capsule Update" feature. But ESRT initialization is missing on LoongArch now, so add a call to efi_esrt_init() at the end of efi_init(). Signed-off-by: Huacai Chen commit 44a01f1f726ab1d2050fb741eca4fabfa3cab799 Author: Binbin Zhou Date: Wed Jan 17 12:43:08 2024 +0800 LoongArch: Parsing CPU-related information from DTS Generally, we can get cpu-related information, such as model name, from /proc/cpuinfo. For FDT-based systems, we need to parse the relevant information from DTS. BTW, set loongson_sysconf.cores_per_package to num_processors if SMBIOS doesn't provide a valid number (usually FDT-based systems). Signed-off-by: Binbin Zhou Signed-off-by: Hongliang Wang Signed-off-by: Huacai Chen commit 2905844f682808275ea5daf6f5b668fbfe547363 Author: Binbin Zhou Date: Wed Jan 17 12:43:08 2024 +0800 LoongArch: dts: DeviceTree for Loongson-2K2000 Add DeviceTree file for Loongson-2K2000 processor, which integrates two 64-bit 3-issue superscalar LA364 processor cores. Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit 30a5532a32066233a2e9a4751989276e91c82210 Author: Binbin Zhou Date: Wed Jan 17 12:43:08 2024 +0800 LoongArch: dts: DeviceTree for Loongson-2K1000 Add DeviceTree file for Loongson-2K1000 processor, which integrates two 64-bit 2-issue superscalar LA264 processor cores. Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit 0f66569c85948c8b3c3edbe3e4ada6f98a4937ea Author: Binbin Zhou Date: Wed Jan 17 12:43:07 2024 +0800 LoongArch: dts: DeviceTree for Loongson-2K0500 Add DeviceTree file for Loongson-2K0500 processor, which integrates one 64-bit 2-issue superscalar LA264 processor core. Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit 5f346a6e5970229c19c059e8fa62c3dbdde56e7b Author: Binbin Zhou Date: Wed Jan 17 12:43:00 2024 +0800 LoongArch: Allow device trees be built into the kernel During the upstream progress of those DT-based drivers, DT properties are changed a lot so very different from those in existing bootloaders. It is inevitably that some existing systems do not provide a standard, canonical device tree to the kernel at boot time. So let's provide a device tree table in the kernel, keyed by the dts filename, containing the relevant DTBs. We can use the built-in dts files as references. Each SoC has only one built-in dts file which describes all possible device information of that SoC, so the dts files are good examples during development. And as a reference, our built-in dts file only enables the most basic bootable combinations (so it is generic enough), acts as an alternative in case the dts in the bootloader is unexpected. Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit db8ce2407090f695339e3406a034377dcdc2c942 Author: Binbin Zhou Date: Wed Jan 17 12:43:00 2024 +0800 dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for interrupt-names The Loongson-2K0500/2K1000 CPUs have 64 interrupt sources as inputs, and a route-mapped node handles up to 32 interrupt sources, so two liointc nodes are defined in dts{i}. Of course, we have to make sure that the routing outputs ("intx") of the two nodes do not conflict, i.e. "int0" can only be used as a routing output for one of them. Therefore, "interrupt-names" should be defined as "pattern". In addition, since "interrupt-names" and "interrupts" are one-to-one correspondence, we pass it to get the corresponding interrupt number in the driver. Setting it to "required" does not break ABI, because it is already logically represented as "required". This fixes dtbs_check warning: DTC_CHK arch/loongarch/boot/dts/loongson-2k0500-ref.dtb arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: interrupt-names:0: 'int0' was expected From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: Unevaluated properties are not allowed ('interrupt-names' was unexpected) From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml DTC_CHK arch/loongarch/boot/dts/loongson-2k1000-ref.dtb arch/loongarch/boot/dts/loongson-2k1000-ref.dtb: interrupt-controller@1fe01440: interrupt-names:0: 'int0' was expected From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k1000-ref.dtb: interrupt-controller@1fe01440: Unevaluated properties are not allowed ('interrupt-names' was unexpected) From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml Acked-by: Jiaxun Yang Reviewed-by: Rob Herring Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit aaeebb3ea4f2d6674b0fbc8bd48bf8862309f191 Author: Binbin Zhou Date: Wed Jan 17 12:43:00 2024 +0800 dt-bindings: interrupt-controller: loongson,liointc: Fix dtbs_check warning for reg-names As we know, the Loongson-2K0500 is a single-core CPU, and the core1- related register (isr1) does not exist. So "reg" and "reg-names" should be set to "minItems 2"(main nad isr0). This fixes dtbs_check warning: DTC_CHK arch/loongarch/boot/dts/loongson-2k0500-ref.dtb arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg-names: ['main', 'isr0'] is too short From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: Unevaluated properties are not allowed ('reg-names' was unexpected) From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11400: reg: [[0, 534844416, 0, 64], [0, 534843456, 0, 8]] is too short From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml arch/loongarch/boot/dts/loongson-2k0500-ref.dtb: interrupt-controller@1fe11440: reg-names: ['main', 'isr0'] is too short From schema: Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml Acked-by: Jiaxun Yang Reviewed-by: Rob Herring Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit ec6b36edf0cea06d651ef14092921a339b4eea2f Author: Binbin Zhou Date: Wed Jan 17 12:43:00 2024 +0800 dt-bindings: loongarch: Add Loongson SoC boards compatibles Add Loongson SoC boards binding with DT schema format using json-schema. Reviewed-by: Conor Dooley Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit 8e07e0e3964ca4e23ce7b68e2096fe660a888942 Author: Binbin Zhou Date: Wed Jan 17 12:43:00 2024 +0800 dt-bindings: loongarch: Add CPU bindings for LoongArch Add the available CPUs in LoongArch binding with DT schema format using json-schema. Reviewed-by: Conor Dooley Signed-off-by: Binbin Zhou Signed-off-by: Huacai Chen commit 90868ff9cadecd46fa2a4f5501c66bfea8ade9b7 Author: WANG Rui Date: Wed Jan 17 12:43:00 2024 +0800 LoongArch: Enable initial Rust support Enable initial Rust support for LoongArch. Tested-by: Miguel Ojeda Signed-off-by: WANG Rui Signed-off-by: Huacai Chen commit f58b0abae839f06be9d791d16196922a4b281777 Author: WANG Rui Date: Wed Jan 17 12:43:00 2024 +0800 scripts/min-tool-version.sh: Raise minimum clang version to 18.0.0 for loongarch The existing mainline clang development version encounters difficulties compiling the LoongArch kernel module. It is anticipated that this issue will be resolved in the upcoming 18.0.0 release. To prevent user confusion arising from broken builds, it is advisable to raise the minimum required clang version for LoongArch to 18.0.0. Suggested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Acked-by: Nick Desaulniers Link: https://github.com/ClangBuiltLinux/linux/issues/1941 Signed-off-by: Tiezhu Yang Signed-off-by: WANG Rui Signed-off-by: Huacai Chen commit 2772ae4d66d17c6a8b4c167ddb660fc8d7972da5 Author: WANG Xuerui Date: Wed Jan 17 12:42:59 2024 +0800 modpost: Ignore relaxation and alignment marker relocs on LoongArch With recent trunk versions of binutils and gcc, alignment directives are represented with R_LARCH_ALIGN relocs on LoongArch, which is necessary for the linker to maintain alignment requirements during its relaxation passes. And even though the kernel is built with relaxation disabled, so far a small number of R_LARCH_RELAX marker relocs are still emitted as part of la.* pseudo instructions in assembly. These two kinds of relocs do not refer to symbols, which can trip up modpost's section mismatch checks, because the r_offset of said relocs can be zero or any other meaningless value, eventually leading to a `from == NULL` condition in default_mismatch_handler and SIGSEGV. As the two kinds of relocs are not concerned with symbols, just ignore them for section mismatch check purposes. Signed-off-by: WANG Xuerui Signed-off-by: Huacai Chen commit e9ce7ededf14af3396312f02d1622f4889d676ca Author: Nicolas Dichtel Date: Mon Jan 15 14:59:22 2024 +0100 selftests: rtnetlink: use setup_ns in bonding test This is a follow-up of commit a159cbe81d3b ("selftests: rtnetlink: check enslaving iface in a bond") after the merge of net-next into net. The goal is to follow the new convention, see commit d3b6b1116127 ("selftests/net: convert rtnetlink.sh to run it in unique namespace") for more details. Let's use also the generic dummy name instead of defining a new one. Signed-off-by: Nicolas Dichtel Reviewed-by: Hangbin Liu Link: https://lore.kernel.org/r/20240115135922.3662648-1-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit 97eb5d51b4a584a60e5d096bdb6b33edc9f50d8d Author: Russell King (Oracle) Date: Mon Jan 15 12:43:38 2024 +0000 net: sfp-bus: fix SFP mode detect from bitrate The referenced commit moved the setting of the Autoneg and pause bits early in sfp_parse_support(). However, we check whether the modes are empty before using the bitrate to set some modes. Setting these bits so early causes that test to always be false, preventing this working, and thus some modules that used to work no longer do. Move them just before the call to the quirk. Fixes: 8110633db49d ("net: sfp-bus: allow SFP quirks to override Autoneg and pause bits") Signed-off-by: Russell King (Oracle) Reviewed-by: Maxime Chevallier Link: https://lore.kernel.org/r/E1rPMJW-001Ahf-L0@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 776dac5a662774f07a876b650ba578d0a62d20db Author: Kunwu Chan Date: Thu Jan 11 15:20:18 2024 +0800 net: dsa: vsc73xx: Add null pointer check to vsc73xx_gpio_probe devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: 05bd97fc559d ("net: dsa: Add Vitesse VSC73xx DSA router driver") Signed-off-by: Kunwu Chan Suggested-by: Jakub Kicinski Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240111072018.75971-1-chentao@kylinos.cn Signed-off-by: Jakub Kicinski commit 8ca5d2641be217a78a891d4dbe2a46232d1d8eb9 Author: Colin Ian King Date: Tue Jan 16 10:51:34 2024 +0000 cifs: remove redundant variable tcon_exist The variable tcon_exist is being assigned however it is never read, the variable is redundant and can be removed. Cleans up clang scan build warning: warning: Although the value stored to 'tcon_exist' is used in the enclosing expression, the value is never actually readfrom 'tcon_exist' [deadcode.DeadStores] Signed-off-by: Colin Ian King Signed-off-by: Steve French commit 1057066009c4325bb1d8430c9274894d0860e7c3 Author: Erick Archer Date: Mon Jan 15 19:16:58 2024 +0100 eventfs: Use kcalloc() instead of kzalloc() As noted in the "Deprecated Interfaces, Language Features, Attributes, and Conventions" documentation [1], size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values wrapping around and a smaller allocation being made than the caller was expecting. Using those allocations could lead to linear overflows of heap memory and other misbehaviors. So, use the purpose specific kcalloc() function instead of the argument size * count in the kzalloc() function. [1] https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Link: https://lore.kernel.org/linux-trace-kernel/20240115181658.4562-1-erick.archer@gmx.com Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Mark Rutland Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Erick Archer Reviewed-by: Gustavo A. R. Silva Signed-off-by: Steven Rostedt (Google) commit 852e46e239ee6db3cd220614cf8bce96e79227c2 Author: Steven Rostedt (Google) Date: Tue Jan 16 16:12:19 2024 -0500 eventfs: Do not create dentries nor inodes in iterate_shared The original eventfs code added a wrapper around the dcache_readdir open callback and created all the dentries and inodes at open, and increment their ref count. A wrapper was added around the dcache_readdir release function to decrement all the ref counts of those created inodes and dentries. But this proved to be buggy[1] for when a kprobe was created during a dir read, it would create a dentry between the open and the release, and because the release would decrement all ref counts of all files and directories, that would include the kprobe directory that was not there to have its ref count incremented in open. This would cause the ref count to go to negative and later crash the kernel. To solve this, the dentries and inodes that were created and had their ref count upped in open needed to be saved. That list needed to be passed from the open to the release, so that the release would only decrement the ref counts of the entries that were incremented in the open. Unfortunately, the dcache_readdir logic was already using the file->private_data, which is the only field that can be used to pass information from the open to the release. What was done was the eventfs created another descriptor that had a void pointer to save the dcache_readdir pointer, and it wrapped all the callbacks, so that it could save the list of entries that had their ref counts incremented in the open, and pass it to the release. The wrapped callbacks would just put back the dcache_readdir pointer and call the functions it used so it could still use its data[2]. But Linus had an issue with the "hijacking" of the file->private_data (unfortunately this discussion was on a security list, so no public link). Which we finally agreed on doing everything within the iterate_shared callback and leave the dcache_readdir out of it[3]. All the information needed for the getents() could be created then. But this ended up being buggy too[4]. The iterate_shared callback was not the right place to create the dentries and inodes. Even Christian Brauner had issues with that[5]. An attempt was to go back to creating the inodes and dentries at the open, create an array to store the information in the file->private_data, and pass that information to the other callbacks.[6] The difference between that and the original method, is that it does not use dcache_readdir. It also does not up the ref counts of the dentries and pass them. Instead, it creates an array of a structure that saves the dentry's name and inode number. That information is used in the iterate_shared callback, and the array is freed in the dir release. The dentries and inodes created in the open are not used for the iterate_share or release callbacks. Just their names and inode numbers. Linus did not like that either[7] and just wanted to remove the dentries being created in iterate_shared and use the hard coded inode numbers. [ All this while Linus enjoyed an unexpected vacation during the merge window due to lack of power. ] [1] https://lore.kernel.org/linux-trace-kernel/20230919211804.230edf1e@gandalf.local.home/ [2] https://lore.kernel.org/linux-trace-kernel/20230922163446.1431d4fa@gandalf.local.home/ [3] https://lore.kernel.org/linux-trace-kernel/20240104015435.682218477@goodmis.org/ [4] https://lore.kernel.org/all/202401152142.bfc28861-oliver.sang@intel.com/ [5] https://lore.kernel.org/all/20240111-unzahl-gefegt-433acb8a841d@brauner/ [6] https://lore.kernel.org/all/20240116114711.7e8637be@gandalf.local.home/ [7] https://lore.kernel.org/all/20240116170154.5bf0a250@gandalf.local.home/ Link: https://lore.kernel.org/linux-trace-kernel/20240116211353.573784051@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Linus Torvalds Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Fixes: 493ec81a8fb8 ("eventfs: Stop using dcache_readdir() for getdents()") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202401152142.bfc28861-oliver.sang@intel.com Signed-off-by: Steven Rostedt (Google) commit 7bed6f3d08b7af27b7015da8dc3acf2b9c1f21d7 Author: Matthew Wilcox (Oracle) Date: Tue Jan 16 21:29:59 2024 +0000 block: Fix iterating over an empty bio with bio_for_each_folio_all If the bio contains no data, bio_first_folio() calls page_folio() on a NULL pointer and oopses. Move the test that we've reached the end of the bio from bio_next_folio() to bio_first_folio(). Reported-by: syzbot+8b23309d5788a79d3eea@syzkaller.appspotmail.com Reported-by: syzbot+004c1e0fced2b4bc3dcc@syzkaller.appspotmail.com Fixes: 640d1930bef4 ("block: Add bio_for_each_folio_all()") Cc: stable@vger.kernel.org Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20240116212959.3413014-1-willy@infradead.org [axboe: add unlikely() to error case] Signed-off-by: Jens Axboe commit 53c41052ba3121761e6f62a813961164532a214f Author: Steven Rostedt (Google) Date: Tue Jan 16 16:12:18 2024 -0500 eventfs: Have the inodes all for files and directories all be the same The dentries and inodes are created in the readdir for the sole purpose of getting a consistent inode number. Linus stated that is unnecessary, and that all inodes can have the same inode number. For a virtual file system they are pretty meaningless. Instead use a single unique inode number for all files and one for all directories. Link: https://lore.kernel.org/all/20240116133753.2808d45e@gandalf.local.home/ Link: https://lore.kernel.org/linux-trace-kernel/20240116211353.412180363@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Christian Brauner Cc: Al Viro Cc: Ajay Kaher Suggested-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit 58f65f9db7e0de366a5a115c2e2c0703858bba69 Author: Hans de Goede Date: Tue Jan 16 21:43:25 2024 +0100 Input: atkbd - use ab83 as id when skipping the getid command Barnabás reported that the change to skip the getid command when the controller is in translated mode on laptops caused the Version field of his "AT Translated Set 2 keyboard" input device to change from ab83 to abba, breaking a custom hwdb entry for this keyboard. Use the standard ab83 id for keyboards when getid is skipped (rather then that getid fails) to avoid reporting a different Version to userspace then before skipping the getid. Fixes: 936e4d49ecbc ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") Reported-by: Barnabás Pőcze Closes: https://lore.kernel.org/linux-input/W1ydwoG2fYv85Z3C3yfDOJcVpilEvGge6UGa9kZh8zI2-qkHXp7WLnl2hSkFz63j-c7WupUWI5TLL6n7Lt8DjRuU-yJBwLYWrreb1hbnd6A=@protonmail.com/ Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20240116204325.7719-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 935024212dafebe065ccb5c4d399f19e4b8dbb82 Author: André Draszik Date: Tue Jan 16 06:27:31 2024 +0000 dt-bindings: don't anchor DT_SCHEMA_FILES to bindings directory Commit 5e3ef4546819 ("dt-bindings: ignore paths outside kernel for DT_SCHEMA_FILES") anchored all searches to the bindings directory (since bindings only exist below that), but it turns out this is not always desired. Just anchor to the base kernel source directory and while at it, break the overly long line for legibility. Reported-by: Michal Simek Fixes: 5e3ef4546819 ("dt-bindings: ignore paths outside kernel for DT_SCHEMA_FILES") Closes: https://lore.kernel.org/all/827695c3-bb33-4a86-8586-2c7323530398@amd.com/ Cc: Masahiro Yamada Signed-off-by: André Draszik Tested-by: Michal Simek Link: https://lore.kernel.org/r/20240116062731.2810067-1-git@andred.net Signed-off-by: Rob Herring commit be50df31c4e2a69f961a3bb759346d299eaa2b23 Author: Dmitry Antipov Date: Tue Jan 16 17:34:31 2024 +0300 block: bio-integrity: fix kcalloc() arguments order When compiling with gcc version 14.0.1 20240116 (experimental) and W=1, I've noticed the following warning: block/bio-integrity.c: In function 'bio_integrity_map_user': block/bio-integrity.c:339:38: warning: 'kcalloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 339 | bvec = kcalloc(sizeof(*bvec), nr_vecs, GFP_KERNEL); | ^ block/bio-integrity.c:339:38: note: earlier argument should specify number of elements, later size of each element Since 'n' and 'size' arguments of 'kcalloc()' are multiplied to calculate the final size, their actual order doesn't affect the result and so this is not a bug. But it's still worth to fix it. Fixes: 492c5d455969 ("block: bio-integrity: directly map user buffers") Signed-off-by: Dmitry Antipov Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20240116143437.89060-1-dmantipov@yandex.ru Signed-off-by: Jens Axboe commit e06964205920b5a45b13d4f3eebb69e39ea49ab1 Merge: b018cee736989 ab09fb9c629ed Author: Takashi Iwai Date: Tue Jan 16 17:37:17 2024 +0100 Merge tag 'asoc-fix-v6.8-merge-window' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.8 A bunch of small fixes that come in during the merge window, mainly fixing issues from some core refactoring around dummy components that weren't detected until things reached mainline. The TAS driver changes are a little larger than normal for a device ID addition due to some shuffling around of where things are registered and DT updates but aren't really any more substantial than normal. commit 33772ff3b887eb2f426ed66bcb1808837a40669c Author: Hao Sun Date: Mon Jan 15 09:20:28 2024 +0100 selftests/bpf: Add test for alu on PTR_TO_FLOW_KEYS Add a test case for PTR_TO_FLOW_KEYS alu. Testing if alu with variable offset on flow_keys is rejected. For the fixed offset success case, we already have C code coverage to verify (e.g. via bpf_flow.c). Signed-off-by: Hao Sun Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20240115082028.9992-2-sunhao.th@gmail.com commit 22c7fa171a02d310e3a3f6ed46a698ca8a0060ed Author: Hao Sun Date: Mon Jan 15 09:20:27 2024 +0100 bpf: Reject variable offset alu on PTR_TO_FLOW_KEYS For PTR_TO_FLOW_KEYS, check_flow_keys_access() only uses fixed off for validation. However, variable offset ptr alu is not prohibited for this ptr kind. So the variable offset is not checked. The following prog is accepted: func#0 @0 0: R1=ctx() R10=fp0 0: (bf) r6 = r1 ; R1=ctx() R6_w=ctx() 1: (79) r7 = *(u64 *)(r6 +144) ; R6_w=ctx() R7_w=flow_keys() 2: (b7) r8 = 1024 ; R8_w=1024 3: (37) r8 /= 1 ; R8_w=scalar() 4: (57) r8 &= 1024 ; R8_w=scalar(smin=smin32=0, smax=umax=smax32=umax32=1024,var_off=(0x0; 0x400)) 5: (0f) r7 += r8 mark_precise: frame0: last_idx 5 first_idx 0 subseq_idx -1 mark_precise: frame0: regs=r8 stack= before 4: (57) r8 &= 1024 mark_precise: frame0: regs=r8 stack= before 3: (37) r8 /= 1 mark_precise: frame0: regs=r8 stack= before 2: (b7) r8 = 1024 6: R7_w=flow_keys(smin=smin32=0,smax=umax=smax32=umax32=1024,var_off =(0x0; 0x400)) R8_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=1024, var_off=(0x0; 0x400)) 6: (79) r0 = *(u64 *)(r7 +0) ; R0_w=scalar() 7: (95) exit This prog loads flow_keys to r7, and adds the variable offset r8 to r7, and finally causes out-of-bounds access: BUG: unable to handle page fault for address: ffffc90014c80038 [...] Call Trace: bpf_dispatcher_nop_func include/linux/bpf.h:1231 [inline] __bpf_prog_run include/linux/filter.h:651 [inline] bpf_prog_run include/linux/filter.h:658 [inline] bpf_prog_run_pin_on_cpu include/linux/filter.h:675 [inline] bpf_flow_dissect+0x15f/0x350 net/core/flow_dissector.c:991 bpf_prog_test_run_flow_dissector+0x39d/0x620 net/bpf/test_run.c:1359 bpf_prog_test_run kernel/bpf/syscall.c:4107 [inline] __sys_bpf+0xf8f/0x4560 kernel/bpf/syscall.c:5475 __do_sys_bpf kernel/bpf/syscall.c:5561 [inline] __se_sys_bpf kernel/bpf/syscall.c:5559 [inline] __x64_sys_bpf+0x73/0xb0 kernel/bpf/syscall.c:5559 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Fix this by rejecting ptr alu with variable offset on flow_keys. Applying the patch rejects the program with "R7 pointer arithmetic on flow_keys prohibited". Fixes: d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") Signed-off-by: Hao Sun Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20240115082028.9992-1-sunhao.th@gmail.com commit a894e8ed09c6c7fa239711819db83b8c050eb7b0 Merge: d4abde52b4b11 2080ff9493072 Author: Palmer Dabbelt Date: Tue Jan 16 07:14:04 2024 -0800 Merge patch series "riscv: support kernel-mode Vector" Andy Chiu says: This series provides support running Vector in kernel mode. Additionally, kernel-mode Vector can be configured to run without turnning off preemption on a CONFIG_PREEMPT kernel. Along with the suport, we add Vector optimized copy_{to,from}_user. And provide a simple threshold to decide when to run the vectorized functions. We decided to drop vectorized memcpy/memset/memmove for the moment due to the concern of memory side-effect in kernel_vector_begin(). The detailed description can be found at v9[0] This series is composed by 4 parts: patch 1-4: adds basic support for kernel-mode Vector patch 5: includes vectorized copy_{to,from}_user into the kernel patch 6: refactor context switch code in fpu [1] patch 7-10: provides some code refactors and support for preemptible kernel-mode Vector. This series can be merged if we feel any part of {1~4, 5, 6, 7~10} is mature enough. This patch is tested on a QEMU with V and verified that booting, normal userspace operations all work as usual with thresholds set to 0. Also, we test by launching multiple kernel threads which continuously executes and verifies Vector operations in the background. The module that tests these operation is expected to be upstream later. * b4-shazam-merge: riscv: vector: allow kernel-mode Vector with preemption riscv: vector: use kmem_cache to manage vector context riscv: vector: use a mask to write vstate_ctrl riscv: vector: do not pass task_struct into riscv_v_vstate_{save,restore}() riscv: fpu: drop SR_SD bit checking riscv: lib: vectorize copy_to_user/copy_from_user riscv: sched: defer restoring Vector context for user riscv: Add vector extension XOR implementation riscv: vector: make Vector always available for softirq context riscv: Add support for kernel mode vector Link: https://lore.kernel.org/r/20240115055929.4736-1-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit 2080ff9493072a94e42b1856d59f5f1bffb761b7 Author: Andy Chiu Date: Mon Jan 15 05:59:29 2024 +0000 riscv: vector: allow kernel-mode Vector with preemption Add kernel_vstate to keep track of kernel-mode Vector registers when trap introduced context switch happens. Also, provide riscv_v_flags to let context save/restore routine track context status. Context tracking happens whenever the core starts its in-kernel Vector executions. An active (dirty) kernel task's V contexts will be saved to memory whenever a trap-introduced context switch happens. Or, when a softirq, which happens to nest on top of it, uses Vector. Context retoring happens when the execution transfer back to the original Kernel context where it first enable preempt_v. Also, provide a config CONFIG_RISCV_ISA_V_PREEMPTIVE to give users an option to disable preemptible kernel-mode Vector at build time. Users with constraint memory may want to disable this config as preemptible kernel-mode Vector needs extra space for tracking of per thread's kernel-mode V context. Or, users might as well want to disable it if all kernel-mode Vector code is time sensitive and cannot tolerate context switch overhead. Signed-off-by: Andy Chiu Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-11-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit bd446f5df5afab212917f6732ba6442a5e8de85e Author: Andy Chiu Date: Mon Jan 15 05:59:28 2024 +0000 riscv: vector: use kmem_cache to manage vector context The allocation size of thread.vstate.datap is always riscv_v_vsize. So it is possbile to use kmem_cache_* to manage the allocation. This gives users more information regarding allocation of vector context via /proc/slabinfo. And it potentially reduces the latency of the first-use trap because of the allocation caches. Signed-off-by: Andy Chiu Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-10-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit 5b6048f2ff710196c85ce14373febe8be5115bbe Author: Andy Chiu Date: Mon Jan 15 05:59:27 2024 +0000 riscv: vector: use a mask to write vstate_ctrl riscv_v_ctrl_set() should only touch bits within PR_RISCV_V_VSTATE_CTRL_MASK. So, use the mask when we really set task's vstate_ctrl. Signed-off-by: Andy Chiu Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-9-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit d6c78f1ca3e8ec3fd1afa1bc567cdf083e7af9fe Author: Andy Chiu Date: Mon Jan 15 05:59:26 2024 +0000 riscv: vector: do not pass task_struct into riscv_v_vstate_{save,restore}() riscv_v_vstate_{save,restore}() can operate only on the knowlege of struct __riscv_v_ext_state, and struct pt_regs. Let the caller decides which should be passed into the function. Meanwhile, the kernel-mode Vector is going to introduce another vstate, so this also makes functions potentially able to be reused. Signed-off-by: Andy Chiu Acked-by: Conor Dooley Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-8-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit a93fdaf183125fea81f66b9bd756ef5a0c30859e Author: Andy Chiu Date: Mon Jan 15 05:59:25 2024 +0000 riscv: fpu: drop SR_SD bit checking SR_SD summarizes the dirty status of FS/VS/XS. However, the current code structure does not fully utilize it because each extension specific code is divided into an individual segment. So remove the SR_SD check for now. Signed-off-by: Andy Chiu Reviewed-by: Song Shuai Reviewed-by: Guo Ren Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-7-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit c2a658d419246108c9bf065ec347355de5ba8a05 Author: Andy Chiu Date: Mon Jan 15 05:59:24 2024 +0000 riscv: lib: vectorize copy_to_user/copy_from_user This patch utilizes Vector to perform copy_to_user/copy_from_user. If Vector is available and the size of copy is large enough for Vector to perform better than scalar, then direct the kernel to do Vector copies for userspace. Though the best programming practice for users is to reduce the copy, this provides a faster variant when copies are inevitable. The optimal size for using Vector, copy_to_user_thres, is only a heuristic for now. We can add DT parsing if people feel the need of customizing it. The exception fixup code of the __asm_vector_usercopy must fallback to the scalar one because accessing user pages might fault, and must be sleepable. Current kernel-mode Vector does not allow tasks to be preemptible, so we must disactivate Vector and perform a scalar fallback in such case. The original implementation of Vector operations comes from https://github.com/sifive/sifive-libc, which we agree to contribute to Linux kernel. Co-developed-by: Jerry Shih Signed-off-by: Jerry Shih Co-developed-by: Nick Knight Signed-off-by: Nick Knight Suggested-by: Guo Ren Signed-off-by: Andy Chiu Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-6-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit 7df56cbc27e4239807b5d8860f79a7350d63a741 Author: Andy Chiu Date: Mon Jan 15 05:59:23 2024 +0000 riscv: sched: defer restoring Vector context for user User will use its Vector registers only after the kernel really returns to the userspace. So we can delay restoring Vector registers as long as we are still running in kernel mode. So, add a thread flag to indicates the need of restoring Vector and do the restore at the last arch-specific exit-to-user hook. This save the context restoring cost when we switch over multiple processes that run V in kernel mode. For example, if the kernel performs a context swicth from A->B->C, and returns to C's userspace, then there is no need to restore B's V-register. Besides, this also prevents us from repeatedly restoring V context when executing kernel-mode Vector multiple times. The cost of this is that we must disable preemption and mark vector as busy during vstate_{save,restore}. Because then the V context will not get restored back immediately when a trap-causing context switch happens in the middle of vstate_{save,restore}. Signed-off-by: Andy Chiu Acked-by: Conor Dooley Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-5-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit c5674d00cacdb1c47c72e19a552fbae401bc3532 Author: Greentime Hu Date: Mon Jan 15 05:59:22 2024 +0000 riscv: Add vector extension XOR implementation This patch adds support for vector optimized XOR and it is tested in qemu. Co-developed-by: Han-Kuan Chen Signed-off-by: Han-Kuan Chen Signed-off-by: Greentime Hu Signed-off-by: Andy Chiu Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-4-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit 956895b9d8f74df015636288a81872c07c4fded3 Author: Andy Chiu Date: Mon Jan 15 05:59:21 2024 +0000 riscv: vector: make Vector always available for softirq context The goal of this patch is to provide full support of Vector in kernel softirq context. So that some of the crypto alogrithms won't need scalar fallbacks. By disabling bottom halves in active kernel-mode Vector, softirq will not be able to nest on top of any kernel-mode Vector. So, softirq context is able to use Vector whenever it runs. After this patch, Vector context cannot start with irqs disabled. Otherwise local_bh_enable() may run in a wrong context. Disabling bh is not enough for RT-kernel to prevent preeemption. So we must disable preemption, which also implies disabling bh on RT. Related-to: commit 696207d4258b ("arm64/sve: Make kernel FPU protection RT friendly") Related-to: commit 66c3ec5a7120 ("arm64: neon: Forbid when irqs are disabled") Signed-off-by: Andy Chiu Reviewed-by: Eric Biggers Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-3-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit ecd2ada8a5e0b464dab54f71d4ba7bbf5708711f Author: Greentime Hu Date: Mon Jan 15 05:59:20 2024 +0000 riscv: Add support for kernel mode vector Add kernel_vector_begin() and kernel_vector_end() function declarations and corresponding definitions in kernel_mode_vector.c These are needed to wrap uses of vector in kernel mode. Co-developed-by: Vincent Chen Signed-off-by: Vincent Chen Signed-off-by: Greentime Hu Signed-off-by: Andy Chiu Reviewed-by: Eric Biggers Tested-by: Björn Töpel Tested-by: Lad Prabhakar Link: https://lore.kernel.org/r/20240115055929.4736-2-andy.chiu@sifive.com Signed-off-by: Palmer Dabbelt commit 03fb8565c880d57952d9b4ba0b36468bae52b554 Author: Jakub Kicinski Date: Mon Jan 15 18:02:01 2024 -0800 selftests: bonding: add missing build configs bonding tests also try to create bridge, veth and dummy interfaces. These are not currently listed in config. Fixes: bbb774d921e2 ("net: Add tests for bonding and team address list management") Fixes: c078290a2b76 ("selftests: include bonding tests into the kselftest infra") Acked-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20240116020201.1883023-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 5b5268cd49d233f03a5cfb1108dcd38bcb83f6d1 Merge: 7da71072e1d69 2fb7e4dd35c52 e315e8692f792 3be8fb1bc6fc1 Author: Rafael J. Wysocki Date: Tue Jan 16 12:44:35 2024 +0100 Merge branches 'pnp', 'acpi-resource' and 'acpica' Merge a PNP change, new ACPI IRQ management quirks and a small ACPICA code update for 6.8-rc1: - Make pnp_bus_type const (Greg Kroah-Hartman). - Add ACPI IRQ management quirks for ASUS ExpertBook B1502CGA and ASUS Vivobook E1504GA and E1504GAB (Ben Mayo, Michael Maltsev). - Add new MADT GICC/GICR/ITS non-coherent flags and GICC online capable bit handling to ACPICA (Lorenzo Pieralisi). * pnp: PNP: make pnp_bus_type const * acpi-resource: ACPI: resource: Skip IRQ override on ASUS ExpertBook B1502CGA ACPI: resource: Add DMI quirks for ASUS Vivobook E1504GA and E1504GAB * acpica: ACPICA: MADT: Add new MADT GICC/GICR/ITS non-coherent flags handling ACPICA: MADT: Add GICC online capable bit handling commit 4697381bd076adfea4d67394189c8bf27b9cc95b Author: Jakub Kicinski Date: Sun Jan 14 14:47:48 2024 -0800 selftests: netdevsim: correct expected FEC strings ethtool CLI has changed its output. Make the test compatible. Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20240114224748.1210578-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit dd75558b2d0b5e2b36ec0ef7e494d2763517d801 Merge: 17e8b76491b00 6dcb35088e264 97566d09fd02d Author: Rafael J. Wysocki Date: Tue Jan 16 12:33:15 2024 +0100 Merge branches 'thermal-core' and 'thermal-intel' Merge additional updates for 6.8-rc1 in the thermal core and in the Intel HFI thermal driver: - Add debugfs-based diagnostics support to the thermal core (Daniel Lezcano, Dan Carpenter). - Fix a power allocator thermal governor issue preventing it from resetting cooling devices sometimes (Di Shen). - Simplify the thermal netlink API and clean up related code (Rafael J. Wysocki). - Make the Intel HFI driver support hibernation and deep suspend properly (Ricardo Neri). * thermal-core: thermal/debugfs: Unlock on error path in thermal_debug_tz_trip_up() thermal: gov_power_allocator: avoid inability to reset a cdev thermal: helpers: Rearrange thermal_cdev_set_cur_state() thermal: netlink: Rework notify API for cooling devices thermal: core: Use kstrdup_const() during cooling device registration thermal/debugfs: Add thermal debugfs information for mitigation episodes thermal/debugfs: Add thermal cooling device debugfs information thermal: netlink: Pass thermal zone pointer to notify routines thermal: netlink: Drop thermal_notify_tz_trip_add/delete() thermal: netlink: Pass pointers to thermal_notify_tz_trip_up/down() thermal: netlink: Pass pointers to thermal_notify_tz_trip_change() * thermal-intel: thermal: intel: hfi: Add syscore callbacks for system-wide PM commit 9223614ea760a77873c7061875cb91963e6f79b7 Merge: 7da71072e1d69 3e999770ac1c7 03c305861c70d 022e6f5184ff7 Author: Rafael J. Wysocki Date: Tue Jan 16 12:23:24 2024 +0100 Merge branches 'pm-sleep', 'pm-cpufreq' and 'pm-qos' into pm * pm-sleep: PM: sleep: Restore asynchronous device resume optimization * pm-cpufreq: Documentation: admin-guide: PM: Fix two typos cpufreq: intel_pstate: Update hybrid scaling factor for Meteor Lake * pm-qos: PM: QoS: Use kcalloc() instead of kzalloc() commit 2c4ca7977298c6a3d237d7d703df97e043b75c12 Author: Jakub Kicinski Date: Sun Jan 14 14:47:26 2024 -0800 selftests: netdevsim: sprinkle more udevadm settle Number of tests are failing when netdev renaming is active on the system. Add udevadm settle in logic determining the names. Fixes: 242aaf03dc9b ("selftests: add a test for ethtool pause stats") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240114224726.1210532-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit e37617c8e53a1f7fcba6d5e1041f4fd8a2425c27 Author: Vincent Guittot Date: Sun Jan 14 19:36:00 2024 +0100 sched/fair: Fix frequency selection for non-invariant case Linus reported a ~50% performance regression on single-threaded workloads on his AMD Ryzen system, and bisected it to: 9c0b4bb7f630 ("sched/cpufreq: Rework schedutil governor performance estimation") When frequency invariance is not enabled, get_capacity_ref_freq(policy) is supposed to return the current frequency and the performance margin applied by map_util_perf(), enabling the utilization to go above the maximum compute capacity and to select a higher frequency than the current one. After the changes in 9c0b4bb7f630, the performance margin was applied earlier in the path to take into account utilization clampings and we couldn't get a utilization higher than the maximum compute capacity, and the CPU remained 'stuck' at lower frequencies. To fix this, we must use a frequency above the current frequency to get a chance to select a higher OPP when the current one becomes fully used. Apply the same margin and return a frequency 25% higher than the current one in order to switch to the next OPP before we fully use the CPU at the current one. [ mingo: Clarified the changelog. ] Fixes: 9c0b4bb7f630 ("sched/cpufreq: Rework schedutil governor performance estimation") Reported-by: Linus Torvalds Bisected-by: Linus Torvalds Reported-by: Wyes Karny Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Wyes Karny Link: https://lore.kernel.org/r/20240114183600.135316-1-vincent.guittot@linaro.org commit b018cee7369896c7a15bfdbe88f168f3dbd8ba27 Author: Yo-Jung Lin Date: Tue Jan 16 10:07:19 2024 +0800 ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on HP ZBook On some HP ZBooks, the audio LEDs can be enabled by ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF. So use it accordingly. Signed-off-by: Yo-Jung Lin Cc: Link: https://lore.kernel.org/r/20240116020722.27236-1-leo.lin@canonical.com Signed-off-by: Takashi Iwai commit bc7863d18677df66b2c7a0e172c91296ff380f11 Author: Çağhan Demir Date: Mon Jan 15 20:23:03 2024 +0300 ALSA: hda/relatek: Enable Mute LED on HP Laptop 15s-fq2xxx This HP Laptop uses ALC236 codec with COEF 0x07 idx 1 controlling the mute LED. This patch enables the already existing quirk for this device. Signed-off-by: Çağhan Demir Cc: Link: https://lore.kernel.org/r/20240115172303.4718-1-caghandemir@marun.edu.tr Signed-off-by: Takashi Iwai commit 3fc6c76a8d208d3955c9e64b382d0ff370bc61fc Author: Tomi Valkeinen Date: Wed Jan 3 15:31:08 2024 +0200 drm/bridge: sii902x: Fix audio codec unregistration The driver never unregisters the audio codec platform device, which can lead to a crash on module reloading, nor does it handle the return value from sii902x_audio_codec_init(). Signed-off-by: Tomi Valkeinen Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support") Cc: Jyri Sarha Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20240103-si902x-fixes-v1-2-b9fd3e448411@ideasonboard.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240103-si902x-fixes-v1-2-b9fd3e448411@ideasonboard.com commit 08ac6f132dd77e40f786d8af51140c96c6d739c9 Author: Tomi Valkeinen Date: Wed Jan 3 15:31:07 2024 +0200 drm/bridge: sii902x: Fix probing race issue A null pointer dereference crash has been observed rarely on TI platforms using sii9022 bridge: [ 53.271356] sii902x_get_edid+0x34/0x70 [sii902x] [ 53.276066] sii902x_bridge_get_edid+0x14/0x20 [sii902x] [ 53.281381] drm_bridge_get_edid+0x20/0x34 [drm] [ 53.286305] drm_bridge_connector_get_modes+0x8c/0xcc [drm_kms_helper] [ 53.292955] drm_helper_probe_single_connector_modes+0x190/0x538 [drm_kms_helper] [ 53.300510] drm_client_modeset_probe+0x1f0/0xbd4 [drm] [ 53.305958] __drm_fb_helper_initial_config_and_unlock+0x50/0x510 [drm_kms_helper] [ 53.313611] drm_fb_helper_initial_config+0x48/0x58 [drm_kms_helper] [ 53.320039] drm_fbdev_dma_client_hotplug+0x84/0xd4 [drm_dma_helper] [ 53.326401] drm_client_register+0x5c/0xa0 [drm] [ 53.331216] drm_fbdev_dma_setup+0xc8/0x13c [drm_dma_helper] [ 53.336881] tidss_probe+0x128/0x264 [tidss] [ 53.341174] platform_probe+0x68/0xc4 [ 53.344841] really_probe+0x188/0x3c4 [ 53.348501] __driver_probe_device+0x7c/0x16c [ 53.352854] driver_probe_device+0x3c/0x10c [ 53.357033] __device_attach_driver+0xbc/0x158 [ 53.361472] bus_for_each_drv+0x88/0xe8 [ 53.365303] __device_attach+0xa0/0x1b4 [ 53.369135] device_initial_probe+0x14/0x20 [ 53.373314] bus_probe_device+0xb0/0xb4 [ 53.377145] deferred_probe_work_func+0xcc/0x124 [ 53.381757] process_one_work+0x1f0/0x518 [ 53.385770] worker_thread+0x1e8/0x3dc [ 53.389519] kthread+0x11c/0x120 [ 53.392750] ret_from_fork+0x10/0x20 The issue here is as follows: - tidss probes, but is deferred as sii902x is still missing. - sii902x starts probing and enters sii902x_init(). - sii902x calls drm_bridge_add(). Now the sii902x bridge is ready from DRM's perspective. - sii902x calls sii902x_audio_codec_init() and platform_device_register_data() - The registration of the audio platform device causes probing of the deferred devices. - tidss probes, which eventually causes sii902x_bridge_get_edid() to be called. - sii902x_bridge_get_edid() tries to use the i2c to read the edid. However, the sii902x driver has not set up the i2c part yet, leading to the crash. Fix this by moving the drm_bridge_add() to the end of the sii902x_init(), which is also at the very end of sii902x_probe(). Signed-off-by: Tomi Valkeinen Fixes: 21d808405fe4 ("drm/bridge/sii902x: Fix EDID readback") Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20240103-si902x-fixes-v1-1-b9fd3e448411@ideasonboard.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240103-si902x-fixes-v1-1-b9fd3e448411@ideasonboard.com commit a23aa04042187cbde16f470b49d4ad60d32e9206 Author: Qiang Ma Date: Fri Jan 12 10:12:49 2024 +0800 net: stmmac: ethtool: Fixed calltrace caused by unbalanced disable_irq_wake calls We found the following dmesg calltrace when testing the GMAC NIC notebook: [9.448656] ------------[ cut here ]------------ [9.448658] Unbalanced IRQ 43 wake disable [9.448673] WARNING: CPU: 3 PID: 1083 at kernel/irq/manage.c:688 irq_set_irq_wake+0xe0/0x128 [9.448717] CPU: 3 PID: 1083 Comm: ethtool Tainted: G O 4.19 #1 [9.448773] ... [9.448774] Call Trace: [9.448781] [<9000000000209b5c>] show_stack+0x34/0x140 [9.448788] [<9000000000d52700>] dump_stack+0x98/0xd0 [9.448794] [<9000000000228610>] __warn+0xa8/0x120 [9.448797] [<9000000000d2fb60>] report_bug+0x98/0x130 [9.448800] [<900000000020a418>] do_bp+0x248/0x2f0 [9.448805] [<90000000002035f4>] handle_bp_int+0x4c/0x78 [9.448808] [<900000000029ea40>] irq_set_irq_wake+0xe0/0x128 [9.448813] [<9000000000a96a7c>] stmmac_set_wol+0x134/0x150 [9.448819] [<9000000000be6ed0>] dev_ethtool+0x1368/0x2440 [9.448824] [<9000000000c08350>] dev_ioctl+0x1f8/0x3e0 [9.448827] [<9000000000bb2a34>] sock_ioctl+0x2a4/0x450 [9.448832] [<900000000046f044>] do_vfs_ioctl+0xa4/0x738 [9.448834] [<900000000046f778>] ksys_ioctl+0xa0/0xe8 [9.448837] [<900000000046f7d8>] sys_ioctl+0x18/0x28 [9.448840] [<9000000000211ab4>] syscall_common+0x20/0x34 [9.448842] ---[ end trace 40c18d9aec863c3e ]--- Multiple disable_irq_wake() calls will keep decreasing the IRQ wake_depth, When wake_depth is 0, calling disable_irq_wake() again, will report the above calltrace. Due to the need to appear in pairs, we cannot call disable_irq_wake() without calling enable_irq_wake(). Fix this by making sure there are no unbalanced disable_irq_wake() calls. Fixes: 3172d3afa998 ("stmmac: support wake up irq from external sources (v3)") Signed-off-by: Qiang Ma Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240112021249.24598-1-maqianga@uniontech.com Signed-off-by: Paolo Abeni commit ddb17dc880eeaac37b5a6e984de07b882de7d78d Author: Konstantin Komarov Date: Tue Jan 16 10:32:20 2024 +0300 fs/ntfs3: Use kvfree to free memory allocated by kvmalloc Signed-off-by: Konstantin Komarov commit 915805b5058554bae48e5c162ddcc4c329bf4efc Merge: e327b2372bc0f 49078c1b80b6f Author: Paolo Abeni Date: Tue Jan 16 09:06:18 2024 +0100 Merge branch 'selftests-net-small-fixes' Benjamin Poirier says: ==================== selftests: net: Small fixes From: Benjamin Poirier Two small fixes for net selftests. These patches were carved out of the following RFC series: https://lore.kernel.org/netdev/20231222135836.992841-1-bpoirier@nvidia.com/ I'm planning to send the rest of the series to net-next after it opens up. ==================== Link: https://lore.kernel.org/r/20240110141436.157419-1-bpoirier@nvidia.com Signed-off-by: Paolo Abeni commit 49078c1b80b6f7e214ff60cf6f44750b33019cad Author: Benjamin Poirier Date: Wed Jan 10 09:14:36 2024 -0500 selftests: forwarding: Remove executable bits from lib.sh The lib.sh script is meant to be sourced from other scripts, not executed directly. Therefore, remove the executable bits from lib.sh's permissions. Fixes: fe32dffdcd33 ("selftests: forwarding: add TCPDUMP_EXTRA_FLAGS to lib.sh") Tested-by: Hangbin Liu Reviewed-by: Hangbin Liu Reviewed-by: Vladimir Oltean Signed-off-by: Benjamin Poirier Reviewed-by: Przemek Kitszel Signed-off-by: Paolo Abeni commit c2518da8e6b0e248cfff1d4b6682e14020bd4d3f Author: Benjamin Poirier Date: Wed Jan 10 09:14:35 2024 -0500 selftests: bonding: Change script interpreter The tests changed by this patch, as well as the scripts they source, use features which are not part of POSIX sh (ex. 'source' and 'local'). As a result, these tests fail when /bin/sh is dash such as on Debian. Change the interpreter to bash so that these tests can run successfully. Fixes: d43eff0b85ae ("selftests: bonding: up/down delay w/ slave link flapping") Tested-by: Hangbin Liu Reviewed-by: Hangbin Liu Reviewed-by: Petr Machata Signed-off-by: Benjamin Poirier Reviewed-by: Przemek Kitszel Signed-off-by: Paolo Abeni commit d7643fe6fb76edb1f2f1497bf5e8b8f4774b5129 Author: Nathan Chancellor Date: Wed Jan 10 13:46:47 2024 -0700 drm/amd/display: Avoid enum conversion warning Clang warns (or errors with CONFIG_WERROR=y) when performing arithmetic with different enumerated types, which is usually a bug: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_dpia_bw.c:548:24: error: arithmetic between different enumeration types ('const enum dc_link_rate' and 'const enum dc_lane_count') [-Werror,-Wenum-enum-conversion] 548 | link_cap->link_rate * link_cap->lane_count * LINK_RATE_REF_FREQ_IN_KHZ * 8; | ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ 1 error generated. In this case, there is not a problem because the enumerated types are basically treated as '#define' values. Add an explicit cast to an integral type to silence the warning. Closes: https://github.com/ClangBuiltLinux/linux/issues/1976 Fixes: 5f3bce13266e ("drm/amd/display: Request usb4 bw for mst streams") Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit a992c90d8ed3929b70ae815ce21ca5651cc0a692 Author: Lijo Lazar Date: Thu Jan 11 15:28:53 2024 +0530 drm/amd/pm: Fix smuv13.0.6 current clock reporting When current clock is equal to max dpm level clock, the level is not indicated correctly with *. Fix by comparing current clock against dpm level value. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.7.x commit 91739a897c12dcec699e53f390be1b4abdeef3a0 Author: Lijo Lazar Date: Thu Jan 11 09:47:33 2024 +0530 drm/amd/pm: Add error log for smu v13.0.6 reset For all mode-2 reset fail cases, add error log. Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.7.x commit d7a254fad873775ce6c32b77796c81e81e6b7f2e Author: Srinivasan Shanmugam Date: Tue Jan 9 16:57:26 2024 +0530 drm/amdkfd: Fix 'node' NULL check in 'svm_range_get_range_boundaries()' Range interval [start, last] is ordered by rb_tree, rb_prev, rb_next return value still needs NULL check, thus modified from "node" to "rb_node". Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_svm.c:2691 svm_range_get_range_boundaries() warn: can 'node' even be NULL? Suggested-by: Philip Yang Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c3d5e297dcae88274dc6924db337a2159279eced Author: Alex Deucher Date: Tue Jan 9 10:45:42 2024 -0500 drm/amdgpu: drop exp hw support check for GC 9.4.3 No longer needed. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.7.x commit 51258acdc4758d43f03ec9cab6f3fa72a2838f0e Author: Le Ma Date: Tue Jan 9 18:06:35 2024 +0800 drm/amdgpu: move debug options init prior to amdgpu device init To bring debug options into effect in early initialization phase Signed-off-by: Le Ma Reviewed-by: Lijo Lazar Reviewed-by: Christian König Signed-off-by: Alex Deucher commit d20e1aec8862e48a352ca86969cee6f530dd41d5 Author: Le Ma Date: Tue Jan 9 17:44:39 2024 +0800 drm/amdgpu: add debug flag to place fw bo on vram for frontdoor loading Use debug_mask=0x8 param to help isolating data path issues on new systems in early phase. v2: rename the flag for explicitness (lijo) Signed-off-by: Le Ma Reviewed-by: Lijo Lazar Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 6c5683bd9ecaa7f199c3122c1010ece5d59b1aef Author: Le Ma Date: Tue Jan 9 12:06:25 2024 +0800 Revert "drm/amdgpu: add param to specify fw bo location for front-door loading" This reverts commit c572abffe9f50c8ba33060865449313b3f588c35. Will use debug module param instead of independent module param. Signed-off-by: Le Ma Reviewed-by: Lijo Lazar Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7073934f5d73f8b53308963cee36f0d389ea857c Author: Srinivasan Shanmugam Date: Mon Jan 8 21:20:28 2024 +0530 drm/amd/display: Fix variable deferencing before NULL check in edp_setup_replay() In edp_setup_replay(), 'struct dc *dc' & 'struct dmub_replay *replay' was dereferenced before the pointer 'link' & 'replay' NULL check. Fixes the below: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_edp_panel_control.c:947 edp_setup_replay() warn: variable dereferenced before check 'link' (see line 933) Cc: stable@vger.kernel.org Cc: Bhawanpreet Lakha Cc: Harry Wentland Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 2b9a073b7304f4a9e130d04794c91a0c4f9a5c12 Author: Yifan Zhang Date: Tue Jan 9 09:19:22 2024 +0800 drm/amdgpu: update regGL2C_CTRL4 value in golden setting This patch to update regGL2C_CTRL4 in golden setting. Signed-off-by: Yifan Zhang Reviewed-by: Tim Huang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.7.x commit 8a44fdd3cf91debbd09b43bd2519ad2b2486ccf4 Author: Srinivasan Shanmugam Date: Thu Dec 21 18:13:11 2023 +0530 drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()' In function 'amdgpu_device_need_post(struct amdgpu_device *adev)' - 'adev->pm.fw' may not be released before return. Using the function release_firmware() to release adev->pm.fw. Thus fixing the below: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1571 amdgpu_device_need_post() warn: 'adev->pm.fw' from request_firmware() not released on lines: 1554. Cc: Monk Liu Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Suggested-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8e8272f0dc22e11b2791dc778b07bd66c208d5a8 Author: Srinivasan Shanmugam Date: Fri Jan 5 10:08:58 2024 +0530 drm/amdgpu: Fix unsigned comparison with less than zero in vpe_u1_8_from_fraction() The variables 'numerator' and 'denominator', are unsigned 16-bit integer types, that can never be less than 0. Thus fixing the below: drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:62 vpe_u1_8_from_fraction() warn: unsigned 'numerator' is never less than zero. drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c:63 vpe_u1_8_from_fraction() warn: unsigned 'denominator' is never less than zero. Cc: Peyton Lee Cc: Lang Yu Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Peyton Lee Signed-off-by: Alex Deucher commit fac4ebd79fed60e79cccafdad45a2bb8d3795044 Author: Srinivasan Shanmugam Date: Thu Jan 4 15:26:42 2024 +0530 drm/amdgpu: Fix with right return code '-EIO' in 'amdgpu_gmc_vram_checking()' The amdgpu_gmc_vram_checking() function in emulation checks whether all of the memory range of shared system memory could be accessed by GPU, from this aspect, -EIO is returned for error scenarios. Fixes the below: drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c:919 gmc_v6_0_hw_init() warn: missing error code? 'r' drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c:1103 gmc_v7_0_hw_init() warn: missing error code? 'r' drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c:1223 gmc_v8_0_hw_init() warn: missing error code? 'r' drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c:2344 gmc_v9_0_hw_init() warn: missing error code? 'r' Cc: Xiaojian Du Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 30d8dffab7d00da7fd13ecdb7d41a1f25ed6a4af Author: Victor Lu Date: Tue Dec 19 11:55:09 2023 -0500 drm/amdgpu: Do not program VM_L2_CNTL under SRIOV VM_L2_CNTL* should not be programmed on driver unload under SRIOV. These regs are skipped during SRIOV driver init. Signed-off-by: Victor Lu Reviewed-by: Vignesh Chander Signed-off-by: Alex Deucher commit 6616b5e1999146b1304abe78232af810080c67e3 Author: Srinivasan Shanmugam Date: Fri Jan 5 12:05:09 2024 +0530 drm/amd/powerplay: Fix kzalloc parameter 'ATOM_Tonga_PPM_Table' in 'get_platform_power_management_table()' In 'struct phm_ppm_table *ptr' allocation using kzalloc, an incorrect structure type is passed to sizeof() in kzalloc, larger structure types were used, thus using correct type 'struct phm_ppm_table' fixes the below: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/process_pptables_v1_0.c:203 get_platform_power_management_table() warn: struct type mismatch 'phm_ppm_table vs _ATOM_Tonga_PPM_Table' Cc: Eric Huang Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c9edcc1864f8529fd24441da40a1275232b5efc4 Author: Yifan Zhang Date: Mon Jan 8 16:05:27 2024 +0800 drm/amdgpu: update ATHUB_MISC_CNTL offset for athub v3.3 This patch to update ATHUB_MISC_CNTL offset for athub v3.3 v2: correct a typo (Tim) v3: correct patch title (Lang) Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 8f8cb7124e86c68ab09aa446664192d3829a40be Author: Yifan Zhang Date: Mon Jan 8 15:46:12 2024 +0800 drm/amdgpu: update headers for nbio v7.11 This patch is to update headers for nbio v7.11. Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Reviewed-by: Tim Huang Signed-off-by: Alex Deucher commit 6127d7df4a5b66783da5a55ff60b3920a9c315a2 Author: Alex Deucher Date: Thu Dec 7 10:36:56 2023 -0500 drm/amdgpu/pm: clarify debugfs pm output On APUs power is SoC power, not just GPU. Clarify that for UVD/VCE/VCN the IP is powered down, not disabled which can confusing and lead to concerns that the IP is actually not available. Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit d02069850fc102b07ae923535d5e212f2c8a34e9 Author: Alex Deucher Date: Mon Oct 2 14:43:06 2023 -0400 drm/amdgpu: fall back to INPUT power for AVG power via INFO IOCTL For backwards compatibility with userspace. Fixes: 47f1724db4fe ("drm/amd: Introduce `AMDGPU_PP_SENSOR_GPU_INPUT_POWER`") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2897 Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 25852d4b97572ff62ffee574cb8bb4bc551af23a Author: Alex Deucher Date: Mon Oct 2 14:27:13 2023 -0400 drm/amdgpu: fix avg vs input power reporting on smu7 Hawaii, Bonaire, Fiji, and Tonga support average power, the others support current power. Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 02eed83abc1395a1207591aafad9bcfc5cb1abcb Author: Dafna Hirschfeld Date: Sun Jan 7 15:07:00 2024 +0200 drm/amdkfd: fixes for HMM mem allocation Fix err return value and reset pgmap->type after checking it. Fixes: c83dee9b6394 ("drm/amdkfd: add SPM support for SVM") Reviewed-by: Felix Kuehling Signed-off-by: Dafna Hirschfeld Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit dedaf03b99d6561fae06457fd7fc2b0aa154d003 Author: Antoniu Miclaus Date: Mon Nov 20 14:00:17 2023 +0200 rtc: max31335: add driver support RTC driver for MAX31335 ±2ppm Automotive Real-Time Clock with Integrated MEMS Resonator. Reviewed-by: Guenter Roeck Signed-off-by: Antoniu Miclaus Link: https://lore.kernel.org/r/20231120120114.48657-2-antoniu.miclaus@analog.com Signed-off-by: Alexandre Belloni commit 5905777847b5c3aa8aefe2aad5103f9f468fb990 Author: Antoniu Miclaus Date: Mon Nov 20 14:00:16 2023 +0200 dt-bindings: rtc: max31335: add max31335 bindings Document the Analog Devices MAX31335 device tree bindings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Antoniu Miclaus Link: https://lore.kernel.org/r/20231120120114.48657-1-antoniu.miclaus@analog.com Signed-off-by: Alexandre Belloni commit 62b38f30a00ff47142e58d0a6d60dd296e0e8108 Author: Randy Dunlap Date: Mon Jan 15 10:56:47 2024 -0800 gpio: EN7523: fix kernel-doc warnings Add "struct" keyword and explain the @dir array differently to prevent kernel-doc warnings: gpio-en7523.c:22: warning: cannot understand function prototype: 'struct airoha_gpio_ctrl ' gpio-en7523.c:27: warning: Function parameter or struct member 'dir' not described in 'airoha_gpio_ctrl' gpio-en7523.c:27: warning: Excess struct member 'dir0' description in 'airoha_gpio_ctrl' gpio-en7523.c:27: warning: Excess struct member 'dir1' description in 'airoha_gpio_ctrl' Fixes: 0868ad385aff ("gpio: Add support for Airoha EN7523 GPIO controller") Signed-off-by: Randy Dunlap Signed-off-by: Bartosz Golaszewski commit 83c0711453e54dc696b13e9512fbbed6d9180ea2 Author: Alexandre Belloni Date: Mon Jan 8 01:43:57 2024 +0100 rtc: rv8803: add wakeup-source support The RV8803 can be wired directly to a PMIC that can wake up an SoC without the CPU getting interrupts. Link: https://lore.kernel.org/r/20240108004357.602918-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit eea7615b684fc98cd0403beaaa2194e6f029c812 Author: Randy Dunlap Date: Sun Jan 14 15:13:20 2024 -0800 rtc: ac100: remove misuses of kernel-doc Prevent kernel-doc warnings by changing "/**" to common comment format "/*" in non-kernel-doc comments: drivers/rtc/rtc-ac100.c:103: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Clock controls for 3 clock output pins drivers/rtc/rtc-ac100.c:382: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * RTC related bits Signed-off-by: Randy Dunlap Cc: Chen-Yu Tsai Cc: Alexandre Belloni Cc: Link: https://lore.kernel.org/r/20240114231320.31437-1-rdunlap@infradead.org Signed-off-by: Alexandre Belloni commit 5f4c01f1e3c7b0c8d1e5dd6f080531de7aa5e47b Author: Leonardo Bras Date: Mon Jan 15 17:19:34 2024 -0300 spinlock: Fix failing build for PREEMPT_RT Since 1d71b30e1f85 ("sched.h: Move (spin|rwlock)_needbreak() to spinlock.h") build fails for PREEMPT_RT, since there is no definition available of either spin_needbreak() and rwlock_needbreak(). Since it was moved on the mentioned commit, it was placed inside a !PREEMPT_RT part of the code, making it out of reach for an RT kernel. Fix this by moving code it a few lines down so it can be reached by an RT build, where it can also make use of the *_is_contended() definition added by the spinlock_rt.h. Fixes: d1d71b30e1f85 ("sched.h: Move (spin|rwlock)_needbreak() to spinlock.h") Signed-off-by: Leonardo Bras Signed-off-by: Kent Overstreet Acked-by: Waiman Long commit bf3ff145df184698a8a80b33265064638572366f Author: Jani Nikula Date: Thu Jan 11 12:47:16 2024 +0200 drm/xe: display support should not depend on EXPERT Remove the DRM_XE_DISPLAY config dependency on EXPERT. I can only presume the idea was only experts should be able to disable it, but the effect is the opposite. Reported-by: Eero Tamminen Reviewed-by: Francois Dugast Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20240111104716.3548744-1-jani.nikula@intel.com (cherry picked from commit 1c7531f50eaa425eca8ff726287b8df3a4a51e55) Signed-off-by: Thomas Hellström commit 7119ca35ee4a0129ae86ae9d36f357edc55aab2f Merge: 9946bbb3edae0 2db6b72c98976 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:41 2024 -0600 Merge branch 'pci/misc' - Drop unused struct pci_driver.node member (Mathias Krause) - Fix documentation typos (Attreyee Mukherjee) - Use a unique test pattern for each BAR in the pci_endpoint_test to make it easier to debug address translation issues (Niklas Cassel) - Fix kernel-doc issues (Bjorn Helgaas) * pci/misc: PCI: Fix kernel-doc issues misc: pci_endpoint_test: Use a unique test pattern for each BAR docs: PCI: Fix typos PCI: Remove unused 'node' member from struct pci_driver commit 9946bbb3edae01cbd964c0339b3805c0c0b90ec2 Merge: eddcaefa5fec1 41f757713ac38 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:41 2024 -0600 Merge branch 'pci/dt-bindings' - Increase qcom iommu-map maxItems to accommodate SDX55 (five entries) and SDM845 (sixteen entries) (Krzysztof Kozlowski) - Describe qcom,pcie-sc8180x clocks and resets accurately (Krzysztof Kozlowski) - Describe qcom,pcie-sm8150 clocks and resets accurately (Krzysztof Kozlowski) - Correct the qcom "reset-name" property, previously incorrectly called "reset-names" (Krzysztof Kozlowski) - Document rockchip optional PCIe reference clock input (Heiko Stuebner) - Document qcom,pcie-sm8650, based on qcom,pcie-sm8550 (Neil Armstrong) * pci/dt-bindings: dt-bindings: PCI: qcom: Document the SM8650 PCIe Controller dt-bindings: PCI: dwc: rockchip: Document optional PCIe reference clock input dt-bindings: PCI: qcom: Correct reset-names property dt-bindings: PCI: qcom: Correct clocks for SM8150 dt-bindings: PCI: qcom: Correct clocks for SC8180x dt-bindings: PCI: qcom: Adjust iommu-map for different SoC commit eddcaefa5fec10ce29dfa4edb6b43a1610bd45a3 Merge: d43e4239f09c4 0171e067d7daf Author: Bjorn Helgaas Date: Mon Jan 15 12:10:41 2024 -0600 Merge branch 'pci/remove-old-api' - In dw-xdata-pcie, pci_endpoint_test, and vmd, replace usage of deprecated ida_simple_*() API with ida_alloc() and ida_free() (Christophe JAILLET) * pci/remove-old-api: dw-xdata: Remove usage of the deprecated ida_simple_*() API misc: pci_endpoint_test: Remove usage of the deprecated ida_simple_*() API PCI: vmd: Remove usage of the deprecated ida_simple_*() API commit d43e4239f09c4d8b4b24d416d602dfaf9a0e502d Merge: dc14155d46b58 6f517e044096f Author: Bjorn Helgaas Date: Mon Jan 15 12:10:40 2024 -0600 Merge branch 'pci/endpoint' - Make struct pci_epc_event_ops and struct pci_epf_ops instances const (Lars-Peter Clausen) * pci/endpoint: PCI: endpoint: pci-epf-test: Make struct pci_epf_ops const PCI: endpoint: pci-epf-vntb: Make struct pci_epf_ops const PCI: endpoint: pci-epf-ntb: Make struct pci_epf_ops const PCI: endpoint: pci-epf-mhi: Make structs pci_epf_ops and pci_epf_event_ops const PCI: endpoint: Make struct pci_epf_ops in pci_epf_driver const commit dc14155d46b58d8bb6e68970b3314118b79497b7 Merge: eb30ad414169b 354b2bd38aeae Author: Bjorn Helgaas Date: Mon Jan 15 12:10:40 2024 -0600 Merge branch 'pci/irq-clean-up' - Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX to be more explicit and match spec terminology (Bjorn Helgaas) - Use existing PCI_IRQ_INTX, PCI_IRQ_MSI, PCI_IRQ_MSIX in artpec6, cadence, designware, designware-plat, dra7xx, imx6, keembay, keystone, layerscape, mhi, ntb, qcom, rcar, rcar-gen4, rockchip, tegra194, uniphier, vntb; drop the redundant pci_epc_irq_type enum with the same values (Damien Le Moal) - Use "intx" instead of "leg" or "legacy" when describing INTx interrupts in endpoint core, endpoint tests, cadence, dra7xx, designware, dw-rockchip, dwc core, imx6, keystone, layerscape, qcom, rcar-gen4, rockchip, tegra194, uniphier, xilinx-nwl (Damien Le Moal) * pci/irq-clean-up: PCI: xilinx-nwl: Use INTX instead of legacy PCI: rockchip-host: Rename rockchip_pcie_legacy_int_handler() PCI: rockchip-ep: Use INTX instead of legacy PCI: uniphier: Use INTX instead of legacy PCI: tegra194: Use INTX instead of legacy PCI: dw-rockchip: Rename rockchip_pcie_legacy_int_handler() PCI: keystone: Use INTX instead of legacy PCI: dwc: Rename dw_pcie_ep_raise_legacy_irq() PCI: cadence: Use INTX instead of legacy PCI: dra7xx: Rename dra7xx_pcie_raise_legacy_irq() misc: pci_endpoint_test: Use INTX instead of LEGACY PCI: endpoint: Rename LEGACY to INTX in test function driver PCI: endpoint: Use INTX instead of legacy PCI: endpoint: Drop PCI_EPC_IRQ_XXX definitions PCI: Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX commit eb30ad414169b7c41d32d726c8d4bb12031a5e68 Merge: fd286a1de5dd6 a5eee68931fcc Author: Bjorn Helgaas Date: Mon Jan 15 12:10:40 2024 -0600 Merge branch 'pci/controller/remove-void-return' - Convert exynos, keystone, kirin from .remove() to .remove_new(), which returns void instead of int (Uwe Kleine-König) * pci/controller/remove-void-return: PCI: kirin: Convert to platform remove callback returning void PCI: keystone: Convert to platform remove callback returning void PCI: exynos: Convert to platform remove callback returning void commit fd286a1de5dd698b1cf02a1d3d22d13c832ff2fb Merge: 161d42df9acfd 2324be17b5e05 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:39 2024 -0600 Merge branch 'pci/controller/xilinx' - Remove redundant dev_err(), since platform_get_irq() and platform_get_irq_byname() already log errors (Yang Li) - Fix uninitialized symbols in xilinx_pl_dma_pcie_setup_irq() (Krzysztof Wilczyński) - Fix xilinx_pl_dma_pcie_init_irq_domain() error return when irq_domain_add_linear() fails (Harshit Mogalapalli) * pci/controller/xilinx: PCI: xilinx-xdma: Fix error code in xilinx_pl_dma_pcie_init_irq_domain() PCI: xilinx-xdma: Fix uninitialized symbols in xilinx_pl_dma_pcie_setup_irq() PCI: xilinx-xdma: Remove redundant dev_err() commit 161d42df9acfd14a5dd4e0ced023aed5879c5d64 Merge: 67b9ef22c68c4 991801bc4722e Author: Bjorn Helgaas Date: Mon Jan 15 12:10:39 2024 -0600 Merge branch 'pci/controller/vmd' - Use ida_alloc() instead of deprecated ida_simple_get() (Christophe JAILLET) * pci/controller/vmd: PCI: vmd: Remove usage of the deprecated ida_simple_xx() API commit 67b9ef22c68c4f7761309864d18da85da560f882 Merge: 1b6069f51ef02 6797e4da2dd1e Author: Bjorn Helgaas Date: Mon Jan 15 12:10:38 2024 -0600 Merge branch 'pci/controller/rcar' - Replace of_device.h with explicit of.h include to untangle header usage (Rob Herring) - Add DT and driver support for optional miniPCIe 1.5v and 3.3v regulators on KingFisher (Wolfram Sang) * pci/controller/rcar: PCI: rcar-host: Add support for optional regulators dt-bindings: PCI: rcar-pci-host: Add optional regulators PCI: rcar-gen4: Replace of_device.h with explicit of.h include commit 1b6069f51ef02618f89fc20a630762ac38420a8d Merge: 1800c660b08f3 9ccc1318cf4bd Author: Bjorn Helgaas Date: Mon Jan 15 12:10:38 2024 -0600 Merge branch 'pci/controller/mediatek' - Clear MSI interrupt status before handler to avoid missing MSIs that occur after the handler (qizhong cheng) - Update mediatek-gen3 translation window setup to handle MMIO space that is not a power of two in size (Jianjun Wang) * pci/controller/mediatek: PCI: mediatek-gen3: Fix translation window size calculation PCI: mediatek: Clear interrupt status before dispatching handler commit 1800c660b08f3f1ab365063dcfe842b5d45d079c Merge: 921e097ede900 27b3bcbf8a797 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:38 2024 -0600 Merge branch 'pci/controller/layerscape' - Add suspend/resume support for Layerscape LS1043a, including software-managed PME_Turn_Off and transitions between L0, L2/L3_Ready Link states (Frank Li) * pci/controller/layerscape: PCI: layerscape: Add suspend/resume for ls1043a PCI: layerscape(ep): Rename pf_* as pf_lut_* PCI: layerscape: Add suspend/resume for ls1021a PCI: layerscape: Add function pointer for exit_from_l2() commit 921e097ede900b311226ffa608f0c56af24b5055 Merge: 186ce88c90630 9f5077ef8f815 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:37 2024 -0600 Merge branch 'pci/controller/kirin' - Use devm_kasprintf() to dynamically allocate clock names, removing need for an intermediate buffer (Christophe JAILLET) * pci/controller/kirin: PCI: kirin: Use devm_kasprintf() to dynamically allocate clock names commit 186ce88c9063086f8e11d1eeafde360f0926b341 Merge: 787c72b1d45be c12ca110c613a Author: Bjorn Helgaas Date: Mon Jan 15 12:10:37 2024 -0600 Merge branch 'pci/controller/keystone' - Hold power management references to all PHYs while enabling them to avoid a race when one provides clocks to others (Siddharth Vadapalli) * pci/controller/keystone: PCI: keystone: Fix race condition when initializing PHYs commit 787c72b1d45be57f902f13a84552b118fa61e063 Merge: 78fe51fcb4351 7682f19c3c8c7 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:37 2024 -0600 Merge branch 'pci/controller/dwc' - Convert fu740 CONFIG_PCIE_FU740 dependency from SOC_SIFIVE to ARCH_SIFIVE (Conor Dooley) - Align iATU mapping for endpoint MSI-X (Niklas Cassel) - Drop "host_" prefix from struct dw_pcie_host_ops members (Yoshihiro Shimoda) - Drop "ep_" prefix from struct dw_pcie_ep_ops members (Yoshihiro Shimoda) - Rename struct dw_pcie_ep_ops.func_conf_select() to .get_dbi_offset() to be more descriptive (Yoshihiro Shimoda) - Add Endpoint DBI accessors to encapsulate offset lookups (Yoshihiro Shimoda) - Cast iproc and rcar-gen4 of_device_get_match_data() results to uintptr_t to avoid clang "cast to smaller integer type" warnings (Justin Stitt, Yoshihiro Shimoda) * pci/controller/dwc: PCI: rcar-gen4: Fix -Wvoid-pointer-to-enum-cast error PCI: iproc: Fix -Wvoid-pointer-to-enum-cast warning PCI: dwc: Add dw_pcie_ep_{read,write}_dbi[2] helpers PCI: dwc: Rename .func_conf_select to .get_dbi_offset in struct dw_pcie_ep_ops PCI: dwc: Rename .ep_init to .init in struct dw_pcie_ep_ops PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members PCI: dwc: endpoint: Fix dw_pcie_ep_raise_msix_irq() alignment support PCI: dwc: Convert SOC_SIFIVE to ARCH_SIFIVE commit 78fe51fcb43510d5c15a827ca42b597287084e9d Merge: 6f77f0ac5ee2e 177c9ac6ab3fa Author: Bjorn Helgaas Date: Mon Jan 15 12:10:36 2024 -0600 Merge branch 'pci/controller/cadence' - Add j721e DT and driver support for 'num-lanes' for devices that support x1, x2, or x4 Links (Matt Ranostay) - Add j721e DT compatible strings and driver support for j784s4 (Matt Ranostay) - Make TI J721E Kconfig depend on ARCH_K3 since the hardware is specific to those TI SoC parts (Peter Robinson) * pci/controller/cadence: PCI: j721e: Make TI J721E depend on ARCH_K3 PCI: j721e: Add TI J784S4 PCIe configuration PCI: j721e: Add PCIe 4x lane selection support PCI: j721e: Add per platform maximum lane settings dt-bindings: PCI: ti,j721e-pci-*: Add j784s4-pci-* compatible strings dt-bindings: PCI: ti,j721e-pci-*: Add checks for num-lanes commit 6f77f0ac5ee2ee510f8e041a1d80ab14323ba0f0 Merge: c94df6214681d e2596dcf1e9df Author: Bjorn Helgaas Date: Mon Jan 15 12:10:36 2024 -0600 Merge branch 'pci/controller/broadcom' - Add DT property "brcm,clkreq-mode" and driver support for different CLKREQ# modes (Jim Quinlan) * pci/controller/broadcom: PCI: brcmstb: Configure HW CLKREQ# mode appropriate for downstream device dt-bindings: PCI: brcmstb: Add property "brcm,clkreq-mode" commit c94df6214681da71c32268771fa89540de423567 Merge: d6f5bcc2d098b e367e3c765f54 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:36 2024 -0600 Merge branch 'pci/virtualization' - Add ACS quirk for more Zhaoxin Root Ports (LeoLiuoc) * pci/virtualization: PCI: Add ACS quirk for more Zhaoxin Root Ports commit d6f5bcc2d098b5900fc288429499d6a7e650717f Merge: 5a4af2ca48b87 df25461119d98 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:35 2024 -0600 Merge branch 'pci/switchtec' - Do dma_mrpc cleanup during switchtec_pci_remove() to match its devm ioremapping in switchtec_pci_probe(). Previously the cleanup was done in stdev_release(), which used stale pointers if stdev->cdev happened to be open when the PCI device was removed (Daniel Stodden) * pci/switchtec: PCI: switchtec: Fix stdev_release() crash after surprise hot remove commit 5a4af2ca48b877c8214722f338bdce702892e269 Merge: 18c3850f313e1 3171e46d677a6 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:35 2024 -0600 Merge branch 'pci/resource' - Restructure pci_dev_for_each_resource() to avoid computing the address of an out-of-bounds array element (the bounds check was performed later so the element was never actually *read*, but it's nicer to avoid even computing an out-of-bounds address) (Andy Shevchenko) * pci/resource: PCI: Avoid potential out-of-bounds read in pci_dev_for_each_resource() commit 18c3850f313e1646a05fb016c9f6d5b7ad47e751 Merge: 564af7a5363fe 9a000a72af758 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:35 2024 -0600 Merge branch 'pci/p2pdma' - Remove documentation for obsolete pci_p2pdma_map_sg() (Tadeusz Struk) * pci/p2pdma: PCI/P2PDMA: Remove reference to pci_p2pdma_map_sg() commit 564af7a5363feae1d56d5b1985975c85d7864230 Merge: 78e5ad791faeb 95140c2fbfdf3 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:34 2024 -0600 Merge branch 'pci/enumeration-logging' - Log device type (Root Port, Switch Port, etc) during enumeration (Bjorn Helgaas) - Log resource names (BAR 0, VF BAR 0, bridge window, etc) consistently instead of a mix of names and "reg 0x10" (Puranjay Mohan, Bjorn Helgaas) - Log bridges before devices below the bridges (Bjorn Helgaas) * pci/enumeration-logging: PCI: Log bridge info when first enumerating bridge PCI: Log bridge windows conditionally PCI: Supply bridge device, not secondary bus, to read window details PCI: Move pci_read_bridge_windows() below individual window accessors PCI: Use resource names in PCI log messages PCI: Update BAR # and window messages PCI: Log device type during enumeration commit 78e5ad791faeb97a35c705b3f772dd3bc7dd6b47 Merge: 996e337f4d33e ac4f1897fa543 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:34 2024 -0600 Merge branch 'pci/enumeration' - Convert pci-host-common.c platform .remove() callback to .remove_new() returning 'void' since it's not useful to return error codes here (Uwe Kleine-König) - Log a message about updating AMD USB controller class code (so dwc3, not xhci, claims it) only when we actually change it (Guilherme G. Piccoli) - Use PCI_HEADER_TYPE_* instead of literals in x86, powerpc, SCSI lpfc (Ilpo Järvinen) - Clean up open-coded PCIBIOS return code mangling (Ilpo Järvinen) - Fix 64GT/s effective data rate calculation to use 1b/1b encoding rather than the 8b/10b or 128b/130b used by lower rates (Ilpo Järvinen) * pci/enumeration: PCI: Fix 64GT/s effective data rate calculation x86/pci: Clean up open-coded PCIBIOS return code mangling scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal x86/pci: Use PCI_HEADER_TYPE_* instead of literals PCI: Only override AMD USB controller if required PCI: host-generic: Convert to platform remove callback returning void commit 996e337f4d33e8775f8f357d4e9234c7efc654d9 Merge: f04e5285efb06 1dfc86af06131 Author: Bjorn Helgaas Date: Mon Jan 15 12:10:34 2024 -0600 Merge branch 'pci/ecam' - Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS (Bjorn Helgaas) - Add MMCONFIG/ECAM debug logging (Bjorn Helgaas) - Rename 'MMCONFIG' to 'ECAM' to match spec usage (Bjorn Helgaas) * pci/ecam: x86/pci: Reorder pci_mmcfg_arch_map() definition before calls x86/pci: Return pci_mmconfig_add() failure early x86/pci: Comment pci_mmconfig_insert() obscure MCFG dependency x86/pci: Rename pci_mmcfg_check_reserved() to pci_mmcfg_reserved() x86/pci: Rename acpi_mcfg_check_entry() to acpi_mcfg_valid_entry() x86/pci: Rename 'MMCONFIG' to 'ECAM', use pr_fmt x86/pci: Add MCFG debug logging x86/pci: Reword ECAM EfiMemoryMappedIO logging to avoid 'reserved' x86/pci: Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS commit f04e5285efb064ebd6826e1b03c98233715308cd Merge: b85ea95d08647 db02e176f597a Author: Bjorn Helgaas Date: Mon Jan 15 12:10:33 2024 -0600 Merge branch 'pci/aer' - Log AER errors as "Correctable" (not "Corrected") or "Uncorrectable" to match spec terminology (Bjorn Helgaas) - Decode Requester ID when no error info found instead of printing the raw hex value (Bjorn Helgaas) * pci/aer: PCI/AER: Use explicit register sizes for struct members PCI/AER: Decode Requester ID when no error info found PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors commit 2db6b72c989763e30fab83b186e9263fece26bc6 Author: Bjorn Helgaas Date: Wed Dec 6 12:17:51 2023 -0600 PCI: Fix kernel-doc issues Fix kernel-doc issues reported by "find include -name \*pci\* | xargs scripts/kernel-doc -none": include/linux/pci.h:731: warning: Function parameter or member 'pdev' not described in 'pci_is_vga' include/linux/pci-epc.h:154: warning: Function parameter or member 'list_lock' not described in 'pci_epc' include/linux/pci-epf.h:83: warning: expecting prototype for struct pci_epf_event_ops. Prototype was for struct pci_epc_event_ops instead Link: https://lore.kernel.org/r/20240111162850.2177655-1-helgaas@kernel.org Tested-by: Randy Dunlap Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Acked-by: Randy Dunlap Acked-by: Sui Jingfeng commit 832b371097eb928d077c827b8f117bf5b99d35c0 Author: Lukas Wunner Date: Mon Jan 15 16:05:26 2024 +0100 gpiolib: Fix scope-based gpio_device refcounting Commit 9e4555d1e54a ("gpiolib: add support for scope-based management to gpio_device") sought to add scope-based gpio_device refcounting, but erroneously forgot a negation of IS_ERR_OR_NULL(). As a result, gpio_device_put() is not called if the gpio_device pointer is valid (meaning the ref is leaked), but only called if the pointer is NULL or an ERR_PTR(). While at it drop a superfluous trailing semicolon. Fixes: 9e4555d1e54a ("gpiolib: add support for scope-based management to gpio_device") Signed-off-by: Lukas Wunner Signed-off-by: Bartosz Golaszewski commit 04036d49c44b1772d4158640f3ccd938a12a3cb8 Author: Li RongQing Date: Sat Jan 13 12:09:47 2024 +0800 virtio_blk: remove duplicate check if queue is broken in virtblk_done virtqueue_enable_cb() will call virtqueue_poll() which will check if queue is broken at beginning, so remove the virtqueue_is_broken() call Acked-by: Jason Wang Signed-off-by: Li RongQing Signed-off-by: Jens Axboe commit 2b872b0f466d2acb4491da845c66b49246d5cdf9 Author: David Howells Date: Mon Jan 15 22:46:35 2024 +0800 erofs: Don't use certain unnecessary folio_*() functions Filesystems should use folio->index and folio->mapping, instead of folio_index(folio), folio_mapping() and folio_file_mapping() since they know that it's in the pagecache. Change this automagically with: perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/erofs/*.c perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/erofs/*.c perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/erofs/*.c Reported-by: Matthew Wilcox Signed-off-by: David Howells Reviewed-by: Jeff Layton Cc: Chao Yu Cc: Yue Hu Cc: Jeffle Xu Cc: linux-erofs@lists.ozlabs.org Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20240115144635.1931422-1-hsiangkao@linux.alibaba.com commit 2a965d1b15d28065b35ab4ebd1e51558fcd91aa5 Author: Al Viro Date: Wed Dec 20 05:29:25 2023 +0000 ceph: get rid of passing callbacks in __dentry_leases_walk() __dentry_leases_walk() gets a callback and calls it for a bunch of denties; there are exactly two callers and we already have a flag telling them apart - lwc->dir_lease. Seeing that indirect calls are costly these days, let's get rid of the callback and just call the right function directly. Has a side benefit of saner signatures... [ xiubli: a minor fix in the commit title ] Signed-off-by: Al Viro Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit f6fb21b22fbe443f92b0d580391a7fb46d1840df Author: Al Viro Date: Wed Dec 20 05:20:54 2023 +0000 ceph: d_obtain_{alias,root}(ERR_PTR(...)) will do the right thing Clean up the code. Signed-off-by: Al Viro Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 0f4cf64eabc6e16cfc2704f1960e82dc79d91c8d Author: Wenchao Hao Date: Thu Nov 23 09:53:40 2023 +0800 ceph: fix invalid pointer access if get_quota_realm return ERR_PTR This issue is reported by smatch that get_quota_realm() might return ERR_PTR but we did not handle it. It's not a immediate bug, while we still should address it to avoid potential bugs if get_quota_realm() is changed to return other ERR_PTR in future. Set ceph_snap_realm's pointer in get_quota_realm()'s to address this issue, the pointer would be set to NULL if get_quota_realm() failed to get struct ceph_snap_realm, so no ERR_PTR would happen any more. [ xiubli: minor code style clean up ] Signed-off-by: Wenchao Hao Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit b36b03344f5fccb81e5cf3b3ede68b7e7a7e930a Author: Xiubo Li Date: Wed Nov 22 15:55:14 2023 +0800 ceph: remove duplicated code in ceph_netfs_issue_read() When allocating an osd request the libceph.ko will add the 'read_from_replica' flag by default. Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 6df89bf220fdac9f40b0d35cd132eef54cf99d4b Author: Xiubo Li Date: Thu Nov 16 10:56:24 2023 +0800 ceph: send oldest_client_tid when renewing caps Update the oldest_client_tid via the session renew caps msg to make sure that the MDSs won't pile up the completed request list in a very large size. [ idryomov: drop inapplicable comment ] Link: https://tracker.ceph.com/issues/63364 Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 66207de308df82242da0bf88035b24bcd4377562 Author: Xiubo Li Date: Thu Nov 16 09:46:19 2023 +0800 ceph: rename create_session_open_msg() to create_session_full_msg() Makes the create session msg helper to be more general and could be used by other ops. Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 9c896d6bc3dfef86659a6a1fb25ccdea5dbef6a3 Author: Eric Biggers Date: Wed Nov 22 19:08:38 2023 -0800 ceph: select FS_ENCRYPTION_ALGS if FS_ENCRYPTION The kconfig options for filesystems that support FS_ENCRYPTION are supposed to select FS_ENCRYPTION_ALGS. This is needed to ensure that required crypto algorithms get enabled as loadable modules or builtin as is appropriate for the set of enabled filesystems. Do this for CEPH_FS so that there aren't any missing algorithms if someone happens to have CEPH_FS as their only enabled filesystem that supports encryption. Cc: stable@vger.kernel.org Fixes: f061feda6c54 ("ceph: add fscrypt ioctls and ceph.fscrypt.auth vxattr") Signed-off-by: Eric Biggers Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit b493ad718b1f0357394d2cdecbf00a44a36fa085 Author: Xiubo Li Date: Fri Nov 17 13:26:18 2023 +0800 ceph: fix deadlock or deadcode of misusing dget() The lock order is incorrect between denty and its parent, we should always make sure that the parent get the lock first. But since this deadcode is never used and the parent dir will always be set from the callers, let's just remove it. Link: https://lore.kernel.org/r/20231116081919.GZ1957730@ZenIV Reported-by: Al Viro Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit aaefabc4a5f7ae48682c4d2d5d10faaf95c08eb9 Author: Xiubo Li Date: Tue Nov 7 10:44:41 2023 +0800 ceph: try to allocate a smaller extent map for sparse read In fscrypt case and for a smaller read length we can predict the max count of the extent map. And for small read length use cases this could save some memories. [ idryomov: squash into a single patch to avoid build break, drop redundant variable in ceph_alloc_sparse_ext_map() ] Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit b79e4a0aa902322756ced7361a2c637d462c3c1c Author: Xiubo Li Date: Tue Nov 7 09:37:47 2023 +0800 libceph: remove MAX_EXTENTS check for sparse reads There is no any limit for the extent array size and it's possible that when reading with a large size contents the total number of extents will exceed 4096. Then the messager will fail by reseting the connection and keeps resending the inflight IOs infinitely. [ idryomov: adjust error message ] Link: https://tracker.ceph.com/issues/62081 Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit f48e0342a74d7770cdf1d11894bdc3b6d989b29e Author: Venky Shankar Date: Mon Nov 6 10:02:32 2023 +0530 ceph: reinitialize mds feature bit even when session in open Following along the same lines as per the user-space fix. Right now this isn't really an issue with the ceph kernel driver because of the feature bit laginess, however, that can change over time (when the new snaprealm info type is ported to the kernel driver) and depending on the MDS version that's being upgraded can cause message decoding issues - so, fix that early on. Link: http://tracker.ceph.com/issues/63188 Signed-off-by: Venky Shankar Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit cbcb358b744bf8d8c52b35d5efb1a960438c31cd Author: Xiubo Li Date: Thu Aug 24 17:55:51 2023 +0800 ceph: skip reconnecting if MDS is not ready When MDS closed the session the kclient will send to reconnect to it immediately, but if the MDS just restarted and still not ready yet, such as still in the up:replay state and the sessionmap journal logs hasn't be replayed, the MDS will close the session. And then the kclient could remove the session and later when the mdsmap is in RECONNECT phrase it will skip reconnecting. But the MDS will wait until timeout and then evict the kclient. Just skip sending the reconnection request until the MDS is ready. Link: https://tracker.ceph.com/issues/62489 Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 8049e3954aeaaeb488cd4e371526721c7fca297e Author: Brian Welty Date: Wed Jan 10 16:21:11 2024 -0800 drm/xe: Fix bounds checking in __xe_bo_placement_for_flags() Requesting all memory regions on PVC will fill bo->placements up to XE_BO_MAX_PLACEMENTS. The subsequent call to try_add_stolen() will trip over the bounds checking even though XE_PL_STOLEN is not expected to be used in this case. This is hit with igt@xe_exec_fault_mode@once-basic-prefetch: xe 0000:8c:00.0: [drm] Assertion `*c < (sizeof(bo->placements) / sizeof((bo->placements)[0]) + ((int)(sizeof(struct { int:(-!!(__builtin_types_compatible_p(typeof((bo->placements)), typeof(&(bo->placements)[0])))); }))))` failed! WARNING: CPU: 30 PID: 6161 at drivers/gpu/drm/xe/xe_bo.c:203 __xe_bo_placement_for_flags+0x218/0x240 [xe] Is fixed here by moving the bounds checks closer to where we actually write into the bo->placement array. Fixes: 8c54ee8a8606 ("drm/xe: Ensure that we don't access the placements array out-of-bounds") Link: https://patchwork.freedesktop.org/patch/msgid/20240111002111.10190-1-brian.welty@intel.com Signed-off-by: Matthew Brost Signed-off-by: Brian Welty Reviewed-by: Matthew Brost (cherry picked from commit 52e3fa3e3ea3ee05e32c1a8d72bb3ae306a4da64) Signed-off-by: Thomas Hellström commit 7425c43c268f859426d02ccb3f043bdbae31cca9 Author: Thomas Hellström Date: Wed Jan 10 17:34:15 2024 +0100 drm/xe/migrate: Fix CCS copy for small VRAM copy chunks Since the migrate code is using the identity map for addressing VRAM, copy chunks may become as small as 64K if the VRAM resource is fragmented. However, a chunk size smaller that 1MiB may lead to the *next* chunk's offset into the CCS metadata backup memory may not be page-aligned, and the XY_CTRL_SURF_COPY_BLT command can't handle that, and even if it could, the current code doesn't handle the offset calculaton correctly. To fix this, make sure we align the size of VRAM copy chunks to 1MiB. If the remaining data to copy is smaller than that, that's not a problem, so use the remaining size. If the VRAM copy cunk becomes fragmented due to the size alignment restriction, don't use the identity map, but instead emit PTEs into the page-table like we do for system memory. v2: - Rebase v3: - Future proof somewhat by taking into account the real data size to flat CCS metadata size ratio. (Matt Roper) - Invert a couple of if-statements for better readability. - Fix support for 4K-granularity VRAM sizes. (Tested on DG1). v4: - Fix up code comments - Fix debug printout format typo. v5: - Add a Fixes: tag. Cc: Matt Roper Cc: Matthew Auld Cc: Matthew Brost Fixes: e89b384cde62 ("drm/xe/migrate: Update emit_pte to cope with a size level than 4k") Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20240110163415.524165-1-thomas.hellstrom@linux.intel.com (cherry picked from commit ef51d7542d143f3fd9a48d4e2c307563661668aa) Signed-off-by: Thomas Hellström commit ec32f4f1bed87f0b87b9b0091231c8685db1138c Author: Dan Carpenter Date: Fri Jan 5 15:20:22 2024 +0300 drm/xe: unlock on error path in xe_vm_add_compute_exec_queue() Drop the "&vm->lock" before returning. Fixes: 24f947d58fe5 ("drm/xe: Use DRM GPUVM helpers for external- and evicted objects") Signed-off-by: Dan Carpenter Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost (cherry picked from commit cf46019e8550a810cc023af7aa020ba43103b44d) Signed-off-by: Thomas Hellström commit 616576df35193bbadac31dc42a32d5943e183f45 Author: Dan Carpenter Date: Fri Jan 5 15:20:35 2024 +0300 drm/xe/selftests: Fix an error pointer dereference bug Check if "bo" is an error pointer before calling xe_bo_lock() on it. Fixes: d6abc18d6693 ("drm/xe/xe2: Modify xe_bo_test for system memory") Signed-off-by: Dan Carpenter Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost (cherry picked from commit 88ec23528b32ddb9ce2e8492f2629b0056353697) Signed-off-by: Thomas Hellström commit ffd915e41a4a2277fd8041dc77603df59acf3e01 Author: Dan Carpenter Date: Fri Jan 5 15:22:23 2024 +0300 drm/xe/device: clean up on error in probe() This error path should clean up before returning. Smatch detected this bug: drivers/gpu/drm/xe/xe_device.c:487 xe_device_probe() warn: missing unwind goto? Fixes: 4cb12b71923b ("drm/xe/xe2: Determine bios enablement for flat ccs on igfx") Signed-off-by: Dan Carpenter Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost (cherry picked from commit c10da95afa68060e13c5f920d96671943a7e54d9) Signed-off-by: Thomas Hellström commit 190db3b1da8f40131d6153de7469abce16766302 Author: Paul E. McKenney Date: Wed Jan 10 06:48:29 2024 -0800 drm/xe: Fix build bug for GCC 11 Building drivers/gpu/drm/xe/xe_gt_pagefault.c with GCC 11 results in the following build errors: ./include/linux/fortify-string.h:57:33: error: writing 16 bytes into a region of size 0 [-Werror=stringop-overflow=] 57 | #define __underlying_memcpy __builtin_memcpy | ^ ./include/linux/fortify-string.h:644:9: note: in expansion of macro ‘__underlying_memcpy’ 644 | __underlying_##op(p, q, __fortify_size); \ | ^~~~~~~~~~~~~ ./include/linux/fortify-string.h:689:26: note: in expansion of macro ‘__fortify_memcpy_chk’ 689 | #define memcpy(p, q, s) __fortify_memcpy_chk(p, q, s, \ | ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/xe/xe_gt_pagefault.c:340:17: note: in expansion of macro ‘memcpy’ 340 | memcpy(pf_queue->data + pf_queue->tail, msg, len * sizeof(u32)); | ^~~~~~ In file included from drivers/gpu/drm/xe/xe_device_types.h:17, from drivers/gpu/drm/xe/xe_vm_types.h:16, from drivers/gpu/drm/xe/xe_bo.h:13, from drivers/gpu/drm/xe/xe_gt_pagefault.c:16: drivers/gpu/drm/xe/xe_gt_types.h:102:25: note: at offset [1144, 265324] into destination object ‘tile’ of size 8 102 | struct xe_tile *tile; | ^~~~ Fix these by removing -Wstringop-overflow from drm/xe builds. Closes: https://lore.kernel.org/all/45ad1d0f-a10f-483e-848a-76a30252edbe@paulmck-laptop/ Fixes: 7a8bc11782d3 ("drm/xe: Enable W=1 warnings by default") Suggested-by: Stephen Rothwell Signed-off-by: Paul E. McKenney [ This particular warning is broken on GCC11. In future changes it will be moved to the normal C flags in the top level Makefile (out of Makefile.extrawarn), but accounting for the compiler support. Just remove it out of xe's forced extra warnings for now ] Signed-off-by: Lucas De Marchi (cherry picked from commit a109d19992294736abd4f4232ea639e03eb1f9e7) Signed-off-by: Thomas Hellström commit 23ca3d2fe367794d2816530fa6b141339fddc1c6 Author: Vinay Belgaumkar Date: Mon Jan 8 14:58:42 2024 -0800 drm/xe: Check skip_guc_pc before setting SLPC flag Don't set SLPC GuC feature ctl flag if skip_guc_pc is true. v2: Skip the freq related sysfs creation as well (Badal) v3: Remove unnecessary parenthesis (Lucas) Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is set") Fixes: bef52b5c7a19 ("drm/xe: Create a xe_gt_freq component for raw management and sysfs") Reviewed-by: Lucas De Marchi Signed-off-by: Vinay Belgaumkar Link: https://lore.kernel.org/r/20240108225842.966066-1-vinay.belgaumkar@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 69cac0a8f3ef8db4d62441c4a2686ec676c9facd) Signed-off-by: Thomas Hellström commit 19c02225242498eea9267d444ee1276016368d49 Author: Brian Welty Date: Fri Jan 5 11:04:40 2024 -0800 drm/xe: Fix modifying exec_queue priority in xe_migrate_init After exec_queue has been created, we cannot simply modify q->priority. This needs to be done by the backend via q->ops. However in this case, it would be more efficient to simply pass a flag when creating the exec_queue and set the desired priority upfront during queue creation. To that end: new flag EXEC_QUEUE_FLAG_HIGH_PRIORITY is introduced. The priority field is moved to be with other scheduling properties and is now exec_queue.sched_props.priority. This is no longer set to initial value by the backend, but is now set within __xe_exec_queue_create(). Fixes: b4eecedc75c1 ("drm/xe: Fix potential deadlock handling page faults") Signed-off-by: Brian Welty Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost (cherry picked from commit a8004af338f6b3319476ecbed63ea49bf393fc1f) Signed-off-by: Thomas Hellström commit fef257eb6dcb9f39baee9ac44f064cd796ecfd0b Author: Brian Welty Date: Fri Jan 5 11:04:39 2024 -0800 drm/xe: Fix guc_exec_queue_set_priority We need to set q->priority prior to calling guc_exec_queue_add_msg() as that will call init_policies() and sets the scheduling properties to those stored in the exec_queue. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Brian Welty Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost (cherry picked from commit b16483f9f8120b530327879fa3ea576e897946da) Signed-off-by: Thomas Hellström commit 98949068eb559a31f162ab37f56a89bf6c3698ad Author: Thomas Hellström Date: Tue Jan 9 12:24:05 2024 +0100 drm/xe: Annotate xe_ttm_stolen_mgr::mapping with __iomem The pointer points to IO memory, but the __iomem annotation was incorrectly placed. Annotate it correctly, update its usage accordingly and fix the corresponding sparse error. Fixes: d8b52a02cb40 ("drm/xe: Implement stolen memory.") Cc: Maarten Lankhorst Cc: Matthew Brost Cc: Rodrigo Vivi Signed-off-by: Thomas Hellström Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240109112405.108136-5-thomas.hellstrom@linux.intel.com (cherry picked from commit dcddb6f0b06d454c9a3b2b240a43f0e7310c7f7c) Signed-off-by: Thomas Hellström commit 5c63e7574739c034e072dea0e0a6fcbe8d538666 Author: Thomas Hellström Date: Tue Jan 9 12:24:04 2024 +0100 drm/xe: Annotate multiple mmio pointers with __iomem There are a couple of pointers pointing to MMIO space. Annotate them with __iomem and fix the corresponding sparse warnings. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Fixes: 3b0d4a557996 ("drm/xe: Move register MMIO into xe_tile") Fixes: 399a13323f0d ("drm/xe: add 28-bit address support in struct xe_reg") Cc: Rodrigo Vivi Cc: Matthew Brost Cc: Lucas De Marchi Cc: Matt Roper Cc: Koby Elbaz Cc: Ofir Bitton Cc: Moti Haimovski Signed-off-by: Thomas Hellström Reviewed-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20240109112405.108136-4-thomas.hellstrom@linux.intel.com (cherry picked from commit 9d612ee52c6096bc70d43f54921ba2831ffbf1ad) Signed-off-by: Thomas Hellström commit 77232e6a28447c2942558d05f1c3115bdf95a9e7 Author: Thomas Hellström Date: Tue Jan 9 12:24:03 2024 +0100 drm/xe: Annotate xe_mem_region::mapping with __iomem The pointer points to IO memory, but the __iomem annotation was incorrectly placed. Annotate it correctly, update its usage accordingly and fix the corresponding sparse error. Fixes: 0887a2e7ab62 ("drm/xe: Make xe_mem_region struct") Cc: Oak Zeng Cc: Michael J. Ruhl Cc: Matthew Brost Cc: Rodrigo Vivi Signed-off-by: Thomas Hellström Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240109112405.108136-3-thomas.hellstrom@linux.intel.com (cherry picked from commit 20855b62a30538361e587cfc7c5245f07d4f826a) Signed-off-by: Thomas Hellström commit 3ec276d06698189506f508f87c0f4f17c11e0251 Author: Thomas Hellström Date: Tue Jan 9 12:24:02 2024 +0100 drm/xe: Use __iomem for the regs pointer The regs pointer points to IO memory. Annotate it properly and fix the corresponding sparse warning. Fixes: a4e2f3a299ea ("drm/xe: refactor xe_mmio_probe_tiles to support MMIO extension") Cc: Koby Elbaz Cc: Ofir Bitton Cc: Moti Haimovski Cc: Rodrigo Vivi Signed-off-by: Thomas Hellström Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20240109112405.108136-2-thomas.hellstrom@linux.intel.com (cherry picked from commit 9d03bf30e78673d827484bbc17a6fd8f5e43a039) Signed-off-by: Thomas Hellström commit 457f4439833487acb18abdd55e95fbb17d43fdca Author: Thomas Hellström Date: Fri Dec 22 18:59:04 2023 +0100 drm/xe/vm: Fix an error path If using the VM_BIND_OP_UNMAP_ALL without any bound vmas for the vm, we will end up dereferencing an uninitialized variable and leak a bo lock. Fix this. v2: - Updated commit message (Lucas De Marchi) Reported-by: Dafna Hirschfeld Closes: https://lore.kernel.org/intel-xe/jrwua7ckbiozfcaodx4gg2h4taiuxs53j5zlpf3qzvyhyiyl2d@pbs3plurokrj/ Suggested-by: Dafna Hirschfeld Fixes: b06d47be7c83 ("drm/xe: Port Xe to GPUVA") Signed-off-by: Thomas Hellström Acked-by: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20231222175904.16732-1-thomas.hellstrom@linux.intel.com (cherry picked from commit 9d0c1c5618be02c5acda7e6bbb728007b0632984) Signed-off-by: Thomas Hellström commit 56c253daabc8bd9dfbae52c3d9e0dd34977347a6 Author: Matthew Brost Date: Thu Jan 4 00:00:39 2024 -0800 drm/xe: Fix exec IOCTL long running exec queue ring full condition The intent is to return -EWOULDBLOCK to the user if a long running exec queue is full during the exec IOCTL. -EWOULDBLOCK aliases to -EAGAIN which results in the exec IOCTL doing a retry loop. Fix this by ensuring the retry loop is broken when returning -EWOULDBLOCK. Fixes: 8ae8a2e8dd21 ("drm/xe: Long running job update") Reported-by: Sai Gowtham Ch Signed-off-by: Matthew Brost Reviewed-by: Brian Welty (cherry picked from commit 97d0047cbb17318431eaf37dfe1a6855539340f9) Signed-off-by: Thomas Hellström commit 7b1a8a5fcee4a85be1f540ac0e09761d421e562d Author: José Roberto de Souza Date: Thu Jan 4 08:18:32 2024 -0800 drm/xe: Fix definition of intel_wakeref_t i915 defines it as unsigned long so Xe should do the same to avoid compilation warnings: CC [M] drivers/gpu/drm/i915/i915_gem.o CC [M] drivers/gpu/drm/xe/i915-display/intel_display_power_well.o In file included from ./include/drm/drm_mm.h:51, from drivers/gpu/drm/xe/xe_bo_types.h:11, from drivers/gpu/drm/xe/xe_bo.h:11, from ./drivers/gpu/drm/xe/compat-i915-headers/gem/i915_gem_object.h:11, from ./drivers/gpu/drm/xe/compat-i915-headers/i915_drv.h:15, from drivers/gpu/drm/i915/display/intel_display_power.c:8: drivers/gpu/drm/i915/display/intel_display_power.c: In function ‘print_async_put_domains_state’: drivers/gpu/drm/i915/display/intel_display_power.c:408:29: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘int’ [-Wformat=] 408 | drm_dbg(&i915->drm, "async_put_wakeref %lu\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~ 409 | power_domains->async_put_wakeref); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int ./include/drm/drm_print.h:410:39: note: in definition of macro ‘drm_dev_dbg’ 410 | __drm_dev_dbg(NULL, dev, cat, fmt, ##__VA_ARGS__) | ^~~ ./include/drm/drm_print.h:510:33: note: in expansion of macro ‘drm_dbg_driver’ 510 | #define drm_dbg(drm, fmt, ...) drm_dbg_driver(drm, fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~ drivers/gpu/drm/i915/display/intel_display_power.c:408:9: note: in expansion of macro ‘drm_dbg’ 408 | drm_dbg(&i915->drm, "async_put_wakeref %lu\n", | ^~~~~~~ drivers/gpu/drm/i915/display/intel_display_power.c:408:50: note: format string is defined here 408 | drm_dbg(&i915->drm, "async_put_wakeref %lu\n", | ~~^ | | | long unsigned int | %u CC [M] drivers/gpu/drm/i915/i915_gem_evict.o CC [M] drivers/gpu/drm/i915/i915_gem_gtt.o CC [M] drivers/gpu/drm/xe/i915-display/intel_display_trace.o CC [M] drivers/gpu/drm/xe/i915-display/intel_display_wa.o CC [M] drivers/gpu/drm/i915/i915_query.o Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Cc: Maarten Lankhorst Reviewed-by: Jani Nikula Signed-off-by: José Roberto de Souza (cherry picked from commit fdbadf504375886a0320ac6f84c850322a6b32e1) Signed-off-by: Thomas Hellström commit 5c7fa5c8ad79a1d7cc9f59636e2f99e8b5471248 Author: Kemeng Shi Date: Mon Jan 15 22:56:26 2024 +0800 sbitmap: remove stale comment in sbq_calc_wake_batch After commit 106397376c036 ("sbitmap: fix batching wakeup"), we may wake up more than one queue for each batch. Just remove stale comment that we wake up only one queue for each batch. Signed-off-by: Kemeng Shi Link: https://lore.kernel.org/r/20240115145626.665562-1-shikemeng@huaweicloud.com Signed-off-by: Jens Axboe commit 521277d12b5a75982d4f642d2ee22db8d7f986dd Author: Nicky Chorley Date: Sun Jan 14 19:10:56 2024 +0000 block: Correct a documentation comment in blk-cgroup.c Commit 99e603874366 ("blk-cgroup: pass a gendisk to the blkg allocation helpers") changed blkg_alloc() to take a struct gendisk instead of a struct request_queue, but the documentation comment still referred to q. So, update that comment to refer to disk instead and fix a typo. Signed-off-by: Nicky Chorley Link: https://lore.kernel.org/r/20240114191056.6992-1-ndchorley@gmail.com Signed-off-by: Jens Axboe commit ab09fb9c629ed3aaea6a82467f08595dbc549726 Author: Kai Vehmanen Date: Mon Jan 15 11:22:09 2024 +0200 ASoC: SOF: ipc4-loader: remove the CPC check warnings Warnings related to missing data in firmware manifest have proven to be too verbose. This relates to description of DSP module cost expressed in cycles per chunk (CPC). If a matching value is not found in the manifest, kernel will pass a zero value and DSP firmware will use a conservative value in its place. Downgrade the warnings to dev_dbg(). Fixes: d8a2c9879349 ("ASoC: SOF: ipc4-loader/topology: Query the CPC value from manifest") Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Liam Girdwood Signed-off-by: Peter Ujfalusi Link: https://msgid.link/r/20240115092209.7184-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 848c8f563dadfdf01358b001ef7c9afe2a6ece8f Author: Rander Wang Date: Mon Jan 15 11:22:08 2024 +0200 ASoC: SOF: ipc4-pcm: remove log message for LLP LLP is supported by I2S and SDW platforms but not supported by HDA platforms. This log is used to notify developer current LLP status for current device. Since above case is known to developers, the log is unnecessary and should be removed. Fixes: 7cb19007baba ("ASoC: SOF: ipc4-pcm: add hw_params") Signed-off-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://msgid.link/r/20240115092209.7184-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1f1626ac0428820f998245478610f452650bcab5 Author: Fedor Pchelkin Date: Sun Jan 14 00:33:45 2024 +0300 drm/ttm: fix ttm pool initialization for no-dma-device drivers QXL driver doesn't use any device for DMA mappings or allocations so dev_to_node() will panic inside ttm_device_init() on NUMA systems: general protection fault, probably for non-canonical address 0xdffffc000000007a: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x00000000000003d0-0x00000000000003d7] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.7.0+ #9 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014 RIP: 0010:ttm_device_init+0x10e/0x340 Call Trace: qxl_ttm_init+0xaa/0x310 qxl_device_init+0x1071/0x2000 qxl_pci_probe+0x167/0x3f0 local_pci_probe+0xe1/0x1b0 pci_device_probe+0x29d/0x790 really_probe+0x251/0x910 __driver_probe_device+0x1ea/0x390 driver_probe_device+0x4e/0x2e0 __driver_attach+0x1e3/0x600 bus_for_each_dev+0x12d/0x1c0 bus_add_driver+0x25a/0x590 driver_register+0x15c/0x4b0 qxl_pci_driver_init+0x67/0x80 do_one_initcall+0xf5/0x5d0 kernel_init_freeable+0x637/0xb10 kernel_init+0x1c/0x2e0 ret_from_fork+0x48/0x80 ret_from_fork_asm+0x1b/0x30 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:ttm_device_init+0x10e/0x340 Fall back to NUMA_NO_NODE if there is no device for DMA. Found by Linux Verification Center (linuxtesting.org). Fixes: b0a7ce53d494 ("drm/ttm: Schedule delayed_delete worker closer") Signed-off-by: Fedor Pchelkin Link: https://patchwork.freedesktop.org/patch/msgid/20240113213347.9562-1-pchelkin@ispras.ru Signed-off-by: Christian König commit 19adbe96d3e3c2188ad5838b936550e073cba54d Author: Heiner Kallweit Date: Sat Jan 13 17:08:54 2024 +0100 ALSA: hda: generic: Remove obsolete call to ledtrig_audio_get Since 64f67b5240db ("leds: trigger: audio: Add an activate callback to ensure the initial brightness is set") the audio triggers have an activate callback which sets the LED brightness as soon as the (default) trigger is bound to the LED device. So we can remove the call to ledtrig_audio_get. Positive side effect: We have no code dependency to ledtrig-audio any longer, therefore, if built as module, it's no longer loaded if not needed. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/3dc9167d-fb33-43a6-baa6-dbef8b5da7b9@gmail.com Signed-off-by: Takashi Iwai commit 3787ffdd13de81ba406e5b42c6c24f823395ba5e Author: Takashi Iwai Date: Fri Jan 12 18:10:00 2024 +0100 ALSA: scarlett2: Fix yet more -Wformat-truncation warnings The recent code change introduced a few false-positive compile warnings with -Wformat-trucation again. Suppress them by replacing snprintf() with scnprintf(). Fixes: 0a995e38dc44 ("ALSA: scarlett2: Add support for software-controllable input gain") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401062344.AzZCYlpa-lkp@intel.com/ Link: https://lore.kernel.org/r/20240112171000.31855-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit a9f1da09c69f13ef471db8b22107a28042d230ca Author: Dan Carpenter Date: Fri Jan 12 17:35:06 2024 +0300 HID: hid-steam: Fix cleanup in probe() There are a number of issues in this code. First of all if steam_create_client_hid() fails then it leads to an error pointer dereference when we call hid_destroy_device(steam->client_hdev). Also there are a number of leaks. hid_hw_stop() is not called if hid_hw_open() fails for example. And it doesn't call steam_unregister() or hid_hw_close(). Fixes: 691ead124a0c ("HID: hid-steam: Clean up locking") Signed-off-by: Dan Carpenter Reviewed-by: Vicki Pfau Link: https://lore.kernel.org/r/1fd87904-dabf-4879-bb89-72d13ebfc91e@moroto.mountain Signed-off-by: Benjamin Tissoires commit a9668169961106f3598384fe95004106ec191201 Author: Dan Carpenter Date: Fri Jan 12 17:34:14 2024 +0300 HID: hid-steam: remove pointless error message This error message doesn't really add any information. If modprobe fails then the user will already know what the error code is. In the case of kmalloc() it's a style violation to print an error message for that because kmalloc has it's own better error messages built in. Signed-off-by: Dan Carpenter Reviewed-by: Vicki Pfau Link: https://lore.kernel.org/r/305898fb-6bd4-4749-806c-05ec51bbeb80@moroto.mountain Signed-off-by: Benjamin Tissoires commit d460e9c2075164e9b1fa9c4c95f8c05517bd8752 Author: Su Hui Date: Fri Jan 12 12:24:04 2024 +0800 gpio: mlxbf3: add an error code check in mlxbf3_gpio_probe Clang static checker warning: Value stored to 'ret' is never read. bgpio_init() returns error code if failed, it's better to add this check. Fixes: cd33f216d241 ("gpio: mlxbf3: Add gpio driver support") Signed-off-by: Su Hui [Bartosz: add the Fixes: tag] Signed-off-by: Bartosz Golaszewski commit 314c020c4ed3de72b15603eb6892250bc4b51702 Author: Michal Simek Date: Fri Jan 12 12:32:58 2024 +0100 dt-bindings: gpio: xilinx: Fix node address in gpio Node address doesn't match reg property which is not correct. Fixes: ba96b2e7974b ("dt-bindings: gpio: gpio-xilinx: Convert Xilinx axi gpio binding to YAML") Signed-off-by: Michal Simek Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit c8fb5a52b977ef91dc9342e556c63b9602065c8a Author: Dan Carpenter Date: Fri Jan 12 09:55:25 2024 +0300 gpio: rtd: Fix signedness bug in probe The "data->irqs[]" array holds unsigned int so this error handling will not work correctly. Fixes: eee636bff0dc ("gpio: rtd: Add support for Realtek DHC(Digital Home Center) RTD SoCs") Signed-off-by: Dan Carpenter Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 7c65aa3cc072cee76f577262fbe381a111a98774 Author: Randy Dunlap Date: Sat Jan 13 20:46:42 2024 -0800 dma-debug: fix kernel-doc warnings Update the kernel-doc comments to catch up with the code changes and fix the kernel-doc warnings: debug.c:83: warning: Excess struct member 'stacktrace' description in 'dma_debug_entry' debug.c:83: warning: Function parameter or struct member 'stack_len' not described in 'dma_debug_entry' debug.c:83: warning: Function parameter or struct member 'stack_entries' not described in 'dma_debug_entry' Fixes: 746017ed8d4d ("dma/debug: Simplify stracktrace retrieval") Signed-off-by: Randy Dunlap Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: iommu@lists.linux.dev Signed-off-by: Christoph Hellwig commit 205e18c13545ab43cc4fe4930732b4feef551198 Author: Dave Airlie Date: Wed Jan 10 11:14:05 2024 +1000 nouveau/gsp: handle engines in runl without nonstall interrupts. It appears on TU106 GPUs (2070), that some of the nvdec engines are in the runlist but have no valid nonstall interrupt, nouveau didn't handle that too well. This should let nouveau/gsp work on those. Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Dave Airlie Link: https://lore.kernel.org/all/20240110011826.3996289-1-airlied@gmail.com/ commit 77bebd186442a7d703b796784db7495129cc3e70 Author: Namjae Jeon Date: Mon Jan 15 10:24:54 2024 +0900 ksmbd: only v2 leases handle the directory When smb2 leases is disable, ksmbd can send oplock break notification and cause wait oplock break ack timeout. It may appear like hang when accessing a directory. This patch make only v2 leases handle the directory. Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 9caaeb090174a5486f9e410b4f561f7569ce2654 Merge: e8aaca57f9d95 89fe46019a62b Author: Dave Airlie Date: Mon Jan 15 10:09:33 2024 +1000 Merge tag 'drm-misc-next-fixes-2024-01-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next A fix for the v3d register readout, and two compilation fixes for rockchip. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/warlsyhbwarbezejzokxvrpnmvoaajonj6khjobvnfrhttrsks@fqoeqrjrct6l commit 4fa0888f6f3e6a67cac5afafb23e33f8222cfdd0 Author: Alexandre Belloni Date: Sun Jan 14 23:52:25 2024 +0100 i3c: document hotjoin sysfs entry The hotjoin syfs entry allows to enable or disable Hot-Join on the Current Controller of the I3C Bus. Link: https://lore.kernel.org/r/20240114225232.140860-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit e8aaca57f9d95be26f179137821ad447678a17ca Merge: b76c01f1d9504 d505a16e00c35 Author: Dave Airlie Date: Mon Jan 15 08:06:19 2024 +1000 Merge tag 'drm-intel-next-fixes-2024-01-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Fixes for kernel-doc warnings enforced in linux-next - Another build warning fix for string formatting of intel_wakeref_t - Display fixes for DP DSC BPC and C20 PLL state verification Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZZ_IOcLiDG9LJafO@jlahtine-mobl.ger.corp.intel.com commit 34d946b723b53488ab39d8ac540ddf9db255317a Author: Frank Li Date: Tue Jan 9 00:25:48 2024 -0500 i3c: master: fix kernel-doc check warning Fix warning found by 'scripts/kernel-doc -v -none include/linux/i3c/master.h' include/linux/i3c/master.h:457: warning: Function parameter or member 'enable_hotjoin' not described in 'i3c_master_controller_ops' include/linux/i3c/master.h:457: warning: Function parameter or member 'disable_hotjoin' not described in 'i3c_master_controller_ops' include/linux/i3c/master.h:499: warning: Function parameter or member 'hotjoin' not described in 'i3c_master_controller' Signed-off-by: Frank Li Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20240109052548.2128133-1-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit 05599b5f56b750b5a92ff7f2c081945210816f83 Merge: b150a703b56fb f37669119423c Author: Sebastian Reichel Date: Sun Jan 14 21:38:31 2024 +0100 Merge power-supply fixes for 6.7 cycle Merge power-supply fixes branch, which I never send for the v6.7 cycle. Signed-off-by: Sebastian Reichel commit 38d20c62903d669693a1869aa68c4dd5674e2544 Author: Namjae Jeon Date: Sat Jan 13 15:30:07 2024 +0900 ksmbd: fix UAF issue in ksmbd_tcp_new_connection() The race is between the handling of a new TCP connection and its disconnection. It leads to UAF on `struct tcp_transport` in ksmbd_tcp_new_connection() function. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-22991 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 92e470163d96df8db6c4fa0f484e4a229edb903d Author: Namjae Jeon Date: Sat Jan 13 15:11:41 2024 +0900 ksmbd: validate mech token in session setup If client send invalid mech token in session setup request, ksmbd validate and make the error if it is invalid. Cc: stable@vger.kernel.org Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-22890 Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit fdfd6dde4328635861db029f6fdb649e17350526 Author: Namjae Jeon Date: Sun Jan 14 15:17:18 2024 +0900 ksmbd: update feature status in documentation Update ksmbd feature status in documentation file. - add support for v2 lease feature and SMB3 CCM/GCM256 encryption. - add planned compression, quic, gmac signing features. Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit e327b2372bc0f18c30433ac40be07741b59231c5 Author: Nikita Yushchenko Date: Sat Jan 13 10:22:21 2024 +0600 net: ravb: Fix dma_addr_t truncation in error case In ravb_start_xmit(), ravb driver uses u32 variable to store result of dma_map_single() call. Since ravb hardware has 32-bit address fields in descriptors, this works properly when mapping is successful - it is platform's job to provide mapping addresses that fit into hardware limitations. However, in failure case dma_map_single() returns DMA_MAPPING_ERROR constant that is 64-bit when dma_addr_t is 64-bit. Storing this constant in u32 leads to truncation, and further call to dma_mapping_error() fails to notice the error. Fix that by storing result of dma_map_single() in a dma_addr_t variable. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Nikita Yushchenko Reviewed-by: Niklas Söderlund Reviewed-by: Sergey Shtylyov Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2539b15d504c3f9fd8ca82032bf9c80c9864412c Author: Guenter Roeck Date: Fri Jan 12 15:03:21 2024 -0800 hwmon: (npcm750-pwm-fan) Fix crash observed when instantiating nuvoton,npcm750-pwm-fan Commit 89fec128d5d1 ("hwmon: (npcm750-pwm-fan) Add NPCM8xx support") introduced support for PWM fans on Nuvoton's npcm845 SoC. This chip supports three PWM modules with four PWM channels each. The older npcm750 only supported two PWM modules. The commit did not take into account that the older SoC only supported two PWM modules. This results in a crash if npcm750 is instantiated when the code attempts to instantiate the non-existing third PWM module. Unable to handle kernel paging request at virtual address e0aa2000 when write [e0aa2000] *pgd=04ab6811, *pte=00000000, *ppte=00000000 Internal error: Oops: 807 [#1] SMP ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Tainted: G N 6.7.0-next-20240112-dirty #3 Hardware name: NPCM7XX Chip family PC is at npcm7xx_pwm_fan_probe+0x204/0x890 LR is at arm_heavy_mb+0x1c/0x38 Fix the problem by detecting the number of supported PWM modules in the probe function and only instantiating the supported modules. Fixes: 89fec128d5d1 ("hwmon: (npcm750-pwm-fan) Add NPCM8xx support") Cc: Tomer Maimon Signed-off-by: Guenter Roeck commit 95931a245b44ee04f3359ec432e73614d44d8b38 Author: Christophe JAILLET Date: Sun Jan 14 10:00:59 2024 +0100 null_blk: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/bf257b1078475a415cdc3344c6a750842946e367.1705222845.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jens Axboe commit c061be1bd5e74e9685630cc95b818e13dbff9713 Author: Marcin Wojtas Date: Fri Jan 12 14:06:28 2024 +0000 MAINTAINERS: eth: mvneta: update entry Add myself as driver maintainer and restore the maintained status. While at it, update the file field to cover mvneta_bm part of the driver. Signed-off-by: Marcin Wojtas Signed-off-by: David S. Miller commit 5ef7f6b308bb98b385076bd623d08d107f6445f4 Merge: 894d7508316e7 034ea1305e659 Author: David S. Miller Date: Sun Jan 14 12:17:14 2024 +0000 Merge branch 'tls-splice-hint-fixes' John Fastabend says: ==================== tls fixes for SPLICE with more hint Syzbot found a splat where it tried to splice data over a tls socket with the more hint and sending greater than the number of frags that fit in a msg scatterlist. This resulted in an error where we do not correctly send the data when the msg sg is full. The more flag being just a hint not a strict contract. This then results in the syzbot warning on the next send. Edward generated an initial patch for this which checked for a full msg on entry to the sendmsg hook. This fixed the WARNING, but didn't fully resolve the issue because the full msg_pl scatterlist was never sent resulting in a stuck socket. In this series instead avoid the situation by forcing the send on the splice that fills the scatterlist. Also in original thread I mentioned it didn't seem to be enough to simply fix the send on full sg problem. That was incorrect and was really a bug in my test program that was hanging the test program. I had setup a repair socket and wasn't handling it correctly so my tester got stuck. Thanks. Please review. Fix in patch 1 and test in patch 2. v2: use SPLICE_F_ flag names instead of cryptic 0xe ==================== Signed-off-by: David S. Miller commit 034ea1305e659ddae44c19ba8449166fec318e2d Author: John Fastabend Date: Fri Jan 12 16:32:58 2024 -0800 net: tls, add test to capture error on large splice syzbot found an error with how splice() is handled with a msg greater than 32. This was fixed in previous patch, but lets add a test for it to ensure it continues to work. Signed-off-by: John Fastabend Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit dc9dfc8dc629e42f2234e3327b75324ffc752bc9 Author: John Fastabend Date: Fri Jan 12 16:32:57 2024 -0800 net: tls, fix WARNIING in __sk_msg_free A splice with MSG_SPLICE_PAGES will cause tls code to use the tls_sw_sendmsg_splice path in the TLS sendmsg code to move the user provided pages from the msg into the msg_pl. This will loop over the msg until msg_pl is full, checked by sk_msg_full(msg_pl). The user can also set the MORE flag to hint stack to delay sending until receiving more pages and ideally a full buffer. If the user adds more pages to the msg than can fit in the msg_pl scatterlist (MAX_MSG_FRAGS) we should ignore the MORE flag and send the buffer anyways. What actually happens though is we abort the msg to msg_pl scatterlist setup and then because we forget to set 'full record' indicating we can no longer consume data without a send we fallthrough to the 'continue' path which will check if msg_data_left(msg) has more bytes to send and then attempts to fit them in the already full msg_pl. Then next iteration of sender doing send will encounter a full msg_pl and throw the warning in the syzbot report. To fix simply check if we have a full_record in splice code path and if not send the msg regardless of MORE flag. Reported-and-tested-by: syzbot+f2977222e0e95cec15c8@syzkaller.appspotmail.com Reported-by: Edward Adam Davis Fixes: fe1e81d4f73b ("tls/sw: Support MSG_SPLICE_PAGES") Reviewed-by: Jakub Kicinski Signed-off-by: John Fastabend Signed-off-by: David S. Miller commit e2a2501af13cfeb1f21bb628db54c49d61949a53 Merge: ea3715941a9b7 52c4e5985a730 Author: Dmitry Torokhov Date: Sat Jan 13 21:54:39 2024 -0800 Merge branch 'next' into for-linus Prepare input updates for 6.8 merge window. commit cd795fb0c352c1f70e5fa437b01572c8693e1b77 Author: Jason-JH.Lin Date: Fri Dec 15 15:00:26 2023 +0800 mailbox: mtk-cmdq: Add CMDQ driver support for mt8188 Add CMDQ driver support for mt8188 by adding its compatible and driver data in CMDQ driver. Signed-off-by: Jason-JH.Lin Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jassi Brar commit df71f7818fb20546e400379dcb2c6b9f2ebab8c5 Author: Jason-JH.Lin Date: Fri Dec 15 15:00:25 2023 +0800 mailbox: mtk-cmdq: Sort cmdq platform data by compatible name Sort cmdq platform data according to the number sequence of compatible names. Signed-off-by: Jason-JH.Lin Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jassi Brar commit 060177644136bdefd887c61043220f7eb63c2fe6 Author: Jason-JH.Lin Date: Fri Dec 15 15:00:24 2023 +0800 mailbox: mtk-cmdq: Rename gce_plat variable with SoC name postfix Rename gce_plat variable postfix from 'v1~v7' to SoC names. Signed-off-by: Jason-JH.Lin Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Jassi Brar commit 171c8a20850fd29721c417af743a8e36aeb6e010 Author: Abel Vesa Date: Thu Dec 14 19:16:04 2023 +0200 dt-bindings: mailbox: qcom-ipcc: document the X1E80100 Inter-Processor Communication Controller Document the Inter-Processor Communication Controller on the X1E80100 Platform. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit cdf179a9d3e424e3634718ebd4208b5fd4ca480d Author: Uwe Kleine-König Date: Wed Dec 27 22:02:40 2023 +0100 mailbox: zynqmp-ipi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Michal Simek Signed-off-by: Jassi Brar commit ab572ab44b042146dce1b38a5ad5c076e351833d Author: Uwe Kleine-König Date: Wed Dec 27 22:02:39 2023 +0100 mailbox: tegra-hsp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit b8e346bd8fb9bd1e310aa185219679c9412065b0 Author: Uwe Kleine-König Date: Wed Dec 27 22:02:38 2023 +0100 mailbox: sun6i-msgbox: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jernej Skrabec Signed-off-by: Jassi Brar commit 0a902f502e392ffd689057af39e0cdadc6060362 Author: Uwe Kleine-König Date: Wed Dec 27 22:02:37 2023 +0100 mailbox: stm32-ipcc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit d3a0021c413262c011d7ffbce1de0b2cb1c7146b Author: Uwe Kleine-König Date: Wed Dec 27 22:02:36 2023 +0100 mailbox: qcom-ipcc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit ce42b93c6370020d3c3ba91d48f356227a059c17 Author: Uwe Kleine-König Date: Wed Dec 27 22:02:35 2023 +0100 mailbox: qcom-apcs-ipc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit 67785923d3f5ee2cf6825f3f69fb6c2f9cc54c15 Author: Uwe Kleine-König Date: Wed Dec 27 22:02:34 2023 +0100 mailbox: omap: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit e89c7c3766dca2d38a1c7a695fd7d046e2a3fc4a Author: Uwe Kleine-König Date: Wed Dec 27 22:02:33 2023 +0100 mailbox: mtk-cmdq: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit bf562bc5a86b2ab7b5cf9a85862a37bd4af06113 Author: Uwe Kleine-König Date: Wed Dec 27 22:02:32 2023 +0100 mailbox: mailbox-test: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit a0c313d08d158e59262dd2bc89027d7de584950e Author: Uwe Kleine-König Date: Wed Dec 27 22:02:31 2023 +0100 mailbox: imx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit 74701ffbf7db4352404034d9fac536a029d2fc3f Author: Uwe Kleine-König Date: Wed Dec 27 22:02:30 2023 +0100 mailbox: bcm-pdc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit d0a724d419cccf301a62626f48bea4ed75dda1b9 Author: Uwe Kleine-König Date: Wed Dec 27 22:02:29 2023 +0100 mailbox: bcm-flexrm: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Jassi Brar commit b3734a8291ad7fd61e5a51cc540e414bcfbdc0cf Author: Randy Dunlap Date: Fri Dec 15 16:41:56 2023 -0800 mailbox: zynqmp-ipi: fix an Excess struct member kernel-doc warning kernel test robot reports 2 Excess struct member warnings: zynqmp-ipi-mailbox.c:92: warning: Excess struct member 'irq' description in 'zynqmp_ipi_mbox' zynqmp-ipi-mailbox.c:112: warning: Excess struct member 'ipi_mboxes' description in 'zynqmp_ipi_pdata' The second one is a false positive that is caused by the __counted_by() attribute. Kees has posted a patch for that, so just fix the first one. Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312150705.glrQ4ypv-lkp@intel.com/ Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Michal Simek Signed-off-by: Jassi Brar commit 7f923ab20faa1d378ac3bca5bdb73a1a484fddd3 Author: Tanmay Shah Date: Wed Dec 13 21:42:27 2023 -0800 dt-bindings: mailbox: add Versal IPI bindings Add documentation for AMD-Xilinx Versal platform Inter Processor Interrupt controller. Versal IPI controller contains buffer-less IPI which do not have buffers for message passing. For such IPI channels message buffers are not expected and only notification to/from remote agent is expected. Signed-off-by: Tanmay Shah Acked-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 0a49b66c7413337445553da331aebfb26c95e6a2 Author: Tanmay Shah Date: Wed Dec 13 21:42:25 2023 -0800 dt-bindings: mailbox: zynqmp: extend required list "xlnx,ipi-id" is handled as required property but is missing from binding doc required list of mailbox child node. Add that to required list. This does not break backward compatibility but bug in bindings document. Fixes: 4a855a957936 ("dt-bindings: mailbox: zynqmp_ipi: convert to yaml") Signed-off-by: Tanmay Shah Acked-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit ee01c0b4384d19ecc5dfa7db3fd4303f965c3eba Author: Xiaowu.ding Date: Tue Dec 12 19:37:22 2023 +0800 mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt Message Handling Unit version is v2.1. When arm_mhuv2 working with the data protocol transfer mode. We have split one mhu into two channels, and every channel include four channel windows, the two channels share one gic spi interrupt. There is a problem with the sending scenario. The first channel will take up 0-3 channel windows, and the second channel take up 4-7 channel windows. When the first channel send the data, and the receiver will clear all the four channels status. Although we only enabled the interrupt on the last channel window with register CH_INT_EN,the register CHCOMB_INT_ST0 will be 0xf, not be 0x8. Currently we just clear the last channel windows int status with the data proctol mode.So after that,the CHCOMB_INT_ST0 status will be 0x7, not be the 0x0. Then the second channel send the data, the receiver read the data, clear all the four channel windows status, trigger the sender interrupt. But currently the CHCOMB_INT_ST0 register will be 0xf7, get_irq_chan_comb function will always return the first channel. So this patch clear all channel windows int status to avoid this interrupt confusion. Signed-off-by: Xiaowu.ding Acked-by: Viresh Kumar Signed-off-by: Jassi Brar commit a71c8424e309c2b22fa357d0af23ac1cde4eecae Author: Krzysztof Kozlowski Date: Sat Nov 11 21:49:16 2023 +0100 mailbox: qcom-apcs-ipc: re-organize compatibles with fallbacks Similarly to previous commit e17225887005 ("mailbox: qcom-apcs-ipc: do not grow the of_device_id"), move compatibles with fallbacks in the of_device_id table, to indicate these are not necessary. This only shuffles the code. No functional impact. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jassi Brar commit 1e9cb7e007dc3bfe12c1e1e8e9d4b0edca392fac Author: Krzysztof Kozlowski Date: Sat Nov 11 21:49:15 2023 +0100 dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks Rework the compatibles and group devices which have similar interface (same from Linux driver point of view) as compatible. This allows smaller of_device_id table in the Linux driver and smaller allOf:if:then: constraints. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Jassi Brar commit 24583bd204d56d530d98431629d8a8cf021b9339 Author: Krzysztof Kozlowski Date: Sat Nov 11 21:49:14 2023 +0100 dt-bindings: mailbox: qcom,apcs-kpss-global: drop duplicated qcom,ipq8074-apcs-apps-global qcom,ipq8074-apcs-apps-global compatible is listed in two places: with and without fallback. Drop the second case to match DTS. Fixes: 34d8775a0edc ("dt-bindings: mailbox: qcom,apcs-kpss-global: use fallbacks for few variants") Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Signed-off-by: Jassi Brar commit 8e33d5db7d014ea2fb2994bbe42010d043997d60 Merge: 894d7508316e7 dbd7db7787ba1 Author: Alexei Starovoitov Date: Sat Jan 13 11:01:44 2024 -0800 Merge branch 'bpf-fix-backward-progress-bug-in-bpf_iter_udp' Martin KaFai Lau says: ==================== bpf: Fix backward progress bug in bpf_iter_udp From: Martin KaFai Lau This patch set fixes an issue in bpf_iter_udp that makes backward progress and prevents the user space process from finishing. There is a test at the end to reproduce the bug. Please see individual patches for details. v3: - Fixed the iter_fd check and local_port check in the patch 3 selftest. (Yonghong) - Moved jhash2 to test_jhash.h in the patch 3. (Yonghong) - Added explanation in the bucket selection in the patch 3. (Yonghong) v2: - Added patch 1 to fix another bug that goes back to the previous bucket - Simplify the fix in patch 2 to always reset iter->offset to 0 - Add a test case to close all udp_sk in a bucket while in the middle of the iteration. ==================== Link: https://lore.kernel.org/r/20240112190530.3751661-1-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit dbd7db7787ba1743a505a495e479550932836fa4 Author: Martin KaFai Lau Date: Fri Jan 12 11:05:30 2024 -0800 selftests/bpf: Test udp and tcp iter batching The patch adds a test to exercise the bpf_iter_udp batching logic. It specifically tests the case that there are multiple so_reuseport udp_sk in a bucket of the udp_table. The test creates two sets of so_reuseport sockets and each set on a different port. Meaning there will be two buckets in the udp_table. The test does the following: 1. read() 3 out of 4 sockets in the first bucket. 2. close() all sockets in the first bucket. This will ensure the current bucket's offset in the kernel does not affect the read() of the following bucket. 3. read() all 4 sockets in the second bucket. The test also reads one udp_sk at a time from the bpf_iter_udp prog. The true case in "do_test(..., bool onebyone)". This is the buggy case that the previous patch fixed. It also tests the "false" case in "do_test(..., bool onebyone)", meaning the userspace reads the whole bucket. There is no bug in this case but adding this test also while at it. Considering the way to have multiple tcp_sk in the same bucket is similar (by using so_reuseport), this patch also tests the bpf_iter_tcp even though the bpf_iter_tcp batching logic works correctly. Both IP v4 and v6 are exercising the same bpf_iter batching code path, so only v6 is tested. Acked-by: Yonghong Song Signed-off-by: Martin KaFai Lau Link: https://lore.kernel.org/r/20240112190530.3751661-4-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 2242fd537fab52d5f4d2fbb1845f047c01fad0cf Author: Martin KaFai Lau Date: Fri Jan 12 11:05:29 2024 -0800 bpf: Avoid iter->offset making backward progress in bpf_iter_udp There is a bug in the bpf_iter_udp_batch() function that stops the userspace from making forward progress. The case that triggers the bug is the userspace passed in a very small read buffer. When the bpf prog does bpf_seq_printf, the userspace read buffer is not enough to capture the whole bucket. When the read buffer is not large enough, the kernel will remember the offset of the bucket in iter->offset such that the next userspace read() can continue from where it left off. The kernel will skip the number (== "iter->offset") of sockets in the next read(). However, the code directly decrements the "--iter->offset". This is incorrect because the next read() may not consume the whole bucket either and then the next-next read() will start from offset 0. The net effect is the userspace will keep reading from the beginning of a bucket and the process will never finish. "iter->offset" must always go forward until the whole bucket is consumed. This patch fixes it by using a local variable "resume_offset" and "resume_bucket". "iter->offset" is always reset to 0 before it may be used. "iter->offset" will be advanced to the "resume_offset" when it continues from the "resume_bucket" (i.e. "state->bucket == resume_bucket"). This brings it closer to the bpf_iter_tcp's offset handling which does not suffer the same bug. Cc: Aditi Ghag Fixes: c96dac8d369f ("bpf: udp: Implement batching for sockets iterator") Acked-by: Yonghong Song Signed-off-by: Martin KaFai Lau Reviewed-by: Aditi Ghag Link: https://lore.kernel.org/r/20240112190530.3751661-3-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 19ca0823f6eaad01d18f664a00550abe912c034c Author: Martin KaFai Lau Date: Fri Jan 12 11:05:28 2024 -0800 bpf: iter_udp: Retry with a larger batch size without going back to the previous bucket The current logic is to use a default size 16 to batch the whole bucket. If it is too small, it will retry with a larger batch size. The current code accidentally does a state->bucket-- before retrying. This goes back to retry with the previous bucket which has already been done. This patch fixed it. It is hard to create a selftest. I added a WARN_ON(state->bucket < 0), forced a particular port to be hashed to the first bucket, created >16 sockets, and observed the for-loop went back to the "-1" bucket. Cc: Aditi Ghag Fixes: c96dac8d369f ("bpf: udp: Implement batching for sockets iterator") Acked-by: Yonghong Song Signed-off-by: Martin KaFai Lau Reviewed-by: Aditi Ghag Link: https://lore.kernel.org/r/20240112190530.3751661-2-martin.lau@linux.dev Signed-off-by: Alexei Starovoitov commit 894d7508316e7ad722df597d68b4b1797a9eee11 Author: Marc Kleine-Budde Date: Fri Jan 12 17:13:14 2024 +0100 net: netdev_queue: netdev_txq_completed_mb(): fix wake condition netif_txq_try_stop() uses "get_desc >= start_thrs" as the check for the call to netif_tx_start_queue(). Use ">=" i netdev_txq_completed_mb(), too. Fixes: c91c46de6bbc ("net: provide macros for commonly copied lockless queue stop/wake code") Signed-off-by: Marc Kleine-Budde Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9181d6f8a2bb32d158de66a84164fac05e3ddd18 Author: Eric Dumazet Date: Fri Jan 12 12:28:16 2024 +0000 net: add more sanity check in virtio_net_hdr_to_skb() syzbot/KMSAN reports access to uninitialized data from gso_features_check() [1] The repro use af_packet, injecting a gso packet and hdrlen == 0. We could fix the issue making gso_features_check() more careful while dealing with NETIF_F_TSO_MANGLEID in fast path. Or we can make sure virtio_net_hdr_to_skb() pulls minimal network and transport headers as intended. Note that for GSO packets coming from untrusted sources, SKB_GSO_DODGY bit forces a proper header validation (and pull) before the packet can hit any device ndo_start_xmit(), thus we do not need a precise disection at virtio_net_hdr_to_skb() stage. [1] BUG: KMSAN: uninit-value in skb_gso_segment include/net/gso.h:83 [inline] BUG: KMSAN: uninit-value in validate_xmit_skb+0x10f2/0x1930 net/core/dev.c:3629 skb_gso_segment include/net/gso.h:83 [inline] validate_xmit_skb+0x10f2/0x1930 net/core/dev.c:3629 __dev_queue_xmit+0x1eac/0x5130 net/core/dev.c:4341 dev_queue_xmit include/linux/netdevice.h:3134 [inline] packet_xmit+0x9c/0x6b0 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3087 [inline] packet_sendmsg+0x8b1d/0x9f30 net/packet/af_packet.c:3119 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x9c2/0xd60 net/socket.c:2584 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2638 __sys_sendmsg net/socket.c:2667 [inline] __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg net/socket.c:2674 [inline] __x64_sys_sendmsg+0x307/0x490 net/socket.c:2674 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Uninit was created at: slab_post_alloc_hook+0x129/0xa70 mm/slab.h:768 slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x5e9/0xb10 mm/slub.c:3523 kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:560 __alloc_skb+0x318/0x740 net/core/skbuff.c:651 alloc_skb include/linux/skbuff.h:1286 [inline] alloc_skb_with_frags+0xc8/0xbd0 net/core/skbuff.c:6334 sock_alloc_send_pskb+0xa80/0xbf0 net/core/sock.c:2780 packet_alloc_skb net/packet/af_packet.c:2936 [inline] packet_snd net/packet/af_packet.c:3030 [inline] packet_sendmsg+0x70e8/0x9f30 net/packet/af_packet.c:3119 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x9c2/0xd60 net/socket.c:2584 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2638 __sys_sendmsg net/socket.c:2667 [inline] __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg net/socket.c:2674 [inline] __x64_sys_sendmsg+0x307/0x490 net/socket.c:2674 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b CPU: 0 PID: 5025 Comm: syz-executor279 Not tainted 6.7.0-rc7-syzkaller-00003-gfbafc3e621c3 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Reported-by: syzbot+7f4d0ea3df4d4fa9a65f@syzkaller.appspotmail.com Link: https://lore.kernel.org/netdev/0000000000005abd7b060eb160cd@google.com/ Fixes: 9274124f023b ("net: stricter validation of untrusted gso packets") Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 118a8cf504d7dfa519562d000f423ee3ca75d2c4 Author: Gao Xiang Date: Sat Jan 13 23:06:02 2024 +0800 erofs: fix inconsistent per-file compression format EROFS can select compression algorithms on a per-file basis, and each per-file compression algorithm needs to be marked in the on-disk superblock for initialization. However, syzkaller can generate inconsistent crafted images that use an unsupported algorithmtype for specific inodes, e.g. use MicroLZMA algorithmtype even it's not set in `sbi->available_compr_algs`. This can lead to an unexpected "BUG: kernel NULL pointer dereference" if the corresponding decompressor isn't built-in. Fix this by checking against `sbi->available_compr_algs` for each m_algorithmformat request. Incorrect !erofs_sb_has_compr_cfgs preset bitmap is now fixed together since it was harmless previously. Reported-by: Fixes: 8f89926290c4 ("erofs: get compression algorithms directly on mapping") Fixes: 622ceaddb764 ("erofs: lzma compression support") Reviewed-by: Yue Hu Link: https://lore.kernel.org/r/20240113150602.1471050-1-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang commit e18405d0be8001fa4c5f9e61471f6ffd59c7a1b3 Author: Jiri Pirko Date: Fri Jan 12 12:39:30 2024 +0100 net: sched: track device in tcf_block_get/put_ext() only for clsact binder types Clsact/ingress qdisc is not the only one using shared block, red is also using it. The device tracking was originally introduced by commit 913b47d3424e ("net/sched: Introduce tc block netdev tracking infra") for clsact/ingress only. Commit 94e2557d086a ("net: sched: move block device tracking into tcf_block_get/put_ext()") mistakenly enabled that for red as well. Fix that by adding a check for the binder type being clsact when adding device to the block->ports xarray. Reported-by: Ido Schimmel Closes: https://lore.kernel.org/all/ZZ6JE0odnu1lLPtu@shredder/ Fixes: 94e2557d086a ("net: sched: move block device tracking into tcf_block_get/put_ext()") Signed-off-by: Jiri Pirko Tested-by: Ido Schimmel Acked-by: Jamal Hadi Salim Tested-by: Victor Nogueira Signed-off-by: David S. Miller commit 482521d8e0c6520429478aa6866cd44128b33d5d Author: Eric Dumazet Date: Fri Jan 12 10:44:27 2024 +0000 udp: annotate data-races around up->pending up->pending can be read without holding the socket lock, as pointed out by syzbot [1] Add READ_ONCE() in lockless contexts, and WRITE_ONCE() on write side. [1] BUG: KCSAN: data-race in udpv6_sendmsg / udpv6_sendmsg write to 0xffff88814e5eadf0 of 4 bytes by task 15547 on cpu 1: udpv6_sendmsg+0x1405/0x1530 net/ipv6/udp.c:1596 inet6_sendmsg+0x63/0x80 net/ipv6/af_inet6.c:657 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] __sys_sendto+0x257/0x310 net/socket.c:2192 __do_sys_sendto net/socket.c:2204 [inline] __se_sys_sendto net/socket.c:2200 [inline] __x64_sys_sendto+0x78/0x90 net/socket.c:2200 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b read to 0xffff88814e5eadf0 of 4 bytes by task 15551 on cpu 0: udpv6_sendmsg+0x22c/0x1530 net/ipv6/udp.c:1373 inet6_sendmsg+0x63/0x80 net/ipv6/af_inet6.c:657 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x37c/0x4d0 net/socket.c:2586 ___sys_sendmsg net/socket.c:2640 [inline] __sys_sendmmsg+0x269/0x500 net/socket.c:2726 __do_sys_sendmmsg net/socket.c:2755 [inline] __se_sys_sendmmsg net/socket.c:2752 [inline] __x64_sys_sendmmsg+0x57/0x60 net/socket.c:2752 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b value changed: 0x00000000 -> 0x0000000a Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 15551 Comm: syz-executor.1 Tainted: G W 6.7.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+8d482d0e407f665d9d10@syzkaller.appspotmail.com Link: https://lore.kernel.org/netdev/0000000000009e46c3060ebcdffd@google.com/ Signed-off-by: Eric Dumazet Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 08300adac3b8dab9e2fd3be0155c7d3093c755f4 Author: Sneh Shah Date: Tue Jan 9 20:17:29 2024 +0530 net: stmmac: Fix ethool link settings ops for integrated PCS Currently get/set_link_ksettings ethtool ops are dependent on PCS. When PCS is integrated, it will not have separate link config. Bypass configuring and checking PCS for integrated PCS. Fixes: aa571b6275fb ("net: stmmac: add new switch to struct plat_stmmacenet_data") Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Sneh Shah Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ba5afb9a84df2e6b26a1b6389b98849cd16ea757 Author: Christian Brauner Date: Fri Jan 12 09:09:14 2024 +0100 fs: rework listmount() implementation Linus pointed out that there's error handling and naming issues in the that we should rewrite: * Perform the access checks for the buffer before actually doing any work instead of doing it during the iteration. * Rename the arguments to listmount() and do_listmount() to clarify what the arguments are used for. * Get rid of the pointless ctr variable and overflow checking. * Get rid of the pointless speculation check. Link: https://lore.kernel.org/r/CAHk-=wjh6Cypo8WC-McXgSzCaou3UXccxB+7PVeSuGR8AjCphg@mail.gmail.com Suggested-by: Linus Torvalds Signed-off-by: Christian Brauner commit 7b4f36cd22a65b750b4cb6ac14804fb7d6e6c67d Author: Jens Axboe Date: Fri Jan 12 09:12:20 2024 -0700 block: ensure we hold a queue reference when using queue limits q_usage_counter is the only thing preventing us from the limits changing under us in __bio_split_to_limits, but blk_mq_submit_bio doesn't hold it while calling into it. Move the splitting inside the region where we know we've got a queue reference. Ideally this could still remain a shared section of code, but let's keep the fix simple and defer any refactoring here to later. Reported-by: Christoph Hellwig Fixes: 900e08075202 ("block: move queue enter logic into blk_mq_submit_bio()") Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit c919330dd57835970b37676d377de3eaaea2c1e9 Author: Eric Biggers Date: Fri Jan 12 16:57:47 2024 -0800 f2fs: fix double free of f2fs_sb_info kill_f2fs_super() is called even if f2fs_fill_super() fails. f2fs_fill_super() frees the struct f2fs_sb_info, so it must set sb->s_fs_info to NULL to prevent it from being freed again. Fixes: 275dca4630c1 ("f2fs: move release of block devices to after kill_block_super()") Reported-by: Closes: https://lore.kernel.org/lkml/0000000000006cb174060ec34502@google.com Reviewed-by: Chao Yu Link: https://lore.kernel.org/linux-f2fs-devel/20240113005747.38887-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 68d27badef6280298b84333be313f58cbdce2769 Merge: cbdd50ec8b1da 724b00c129579 Author: Jakub Kicinski Date: Fri Jan 12 18:14:23 2024 -0800 Merge branch 'mptcp-better-validation-of-mptcpopt_mp_join-option' Eric Dumazet says: ==================== mptcp: better validation of MPTCPOPT_MP_JOIN option Based on a syzbot report (see 4th patch in the series). We need to be more explicit about which one of the following flag is set by mptcp_parse_option(): - OPTION_MPTCP_MPJ_SYN - OPTION_MPTCP_MPJ_SYNACK - OPTION_MPTCP_MPJ_ACK Then select the appropriate values instead of OPTIONS_MPTCP_MPJ Paolo suggested to do the same for OPTIONS_MPTCP_MPC (5th patch) ==================== Link: https://lore.kernel.org/r/20240111194917.4044654-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 724b00c12957973656d312dce2a110c75ae2c680 Author: Eric Dumazet Date: Thu Jan 11 19:49:17 2024 +0000 mptcp: refine opt_mp_capable determination OPTIONS_MPTCP_MPC is a combination of three flags. It would be better to be strict about testing what flag is expected, at least for code readability. mptcp_parse_option() already makes the distinction. - subflow_check_req() should use OPTION_MPTCP_MPC_SYN. - mptcp_subflow_init_cookie_req() should use OPTION_MPTCP_MPC_ACK. - subflow_finish_connect() should use OPTION_MPTCP_MPC_SYNACK - subflow_syn_recv_sock should use OPTION_MPTCP_MPC_ACK Suggested-by: Paolo Abeni Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Acked-by: Paolo Abeni Reviewed-by: Mat Martineau Fixes: 74c7dfbee3e1 ("mptcp: consolidate in_opt sub-options fields in a bitmask") Link: https://lore.kernel.org/r/20240111194917.4044654-6-edumazet@google.com Signed-off-by: Jakub Kicinski commit 66ff70df1a919a066942844bb095d6fcb748d78d Author: Eric Dumazet Date: Thu Jan 11 19:49:16 2024 +0000 mptcp: use OPTION_MPTCP_MPJ_SYN in subflow_check_req() syzbot reported that subflow_check_req() was using uninitialized data in subflow_check_req() [1] This is because mp_opt.token is only set when OPTION_MPTCP_MPJ_SYN is also set. While we are are it, fix mptcp_subflow_init_cookie_req() to test for OPTION_MPTCP_MPJ_ACK. [1] BUG: KMSAN: uninit-value in subflow_token_join_request net/mptcp/subflow.c:91 [inline] BUG: KMSAN: uninit-value in subflow_check_req+0x1028/0x15d0 net/mptcp/subflow.c:209 subflow_token_join_request net/mptcp/subflow.c:91 [inline] subflow_check_req+0x1028/0x15d0 net/mptcp/subflow.c:209 subflow_v6_route_req+0x269/0x410 net/mptcp/subflow.c:367 tcp_conn_request+0x153a/0x4240 net/ipv4/tcp_input.c:7164 subflow_v6_conn_request+0x3ee/0x510 tcp_rcv_state_process+0x2e1/0x4ac0 net/ipv4/tcp_input.c:6659 tcp_v6_do_rcv+0x11bf/0x1fe0 net/ipv6/tcp_ipv6.c:1669 tcp_v6_rcv+0x480b/0x4fb0 net/ipv6/tcp_ipv6.c:1900 ip6_protocol_deliver_rcu+0xda6/0x2a60 net/ipv6/ip6_input.c:438 ip6_input_finish net/ipv6/ip6_input.c:483 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] ip6_input+0x15d/0x430 net/ipv6/ip6_input.c:492 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish+0x5db/0x870 net/ipv6/ip6_input.c:79 NF_HOOK include/linux/netfilter.h:314 [inline] ipv6_rcv+0xda/0x390 net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core net/core/dev.c:5532 [inline] __netif_receive_skb+0x1a6/0x5a0 net/core/dev.c:5646 netif_receive_skb_internal net/core/dev.c:5732 [inline] netif_receive_skb+0x58/0x660 net/core/dev.c:5791 tun_rx_batched+0x3ee/0x980 drivers/net/tun.c:1555 tun_get_user+0x53af/0x66d0 drivers/net/tun.c:2002 tun_chr_write_iter+0x3af/0x5d0 drivers/net/tun.c:2048 call_write_iter include/linux/fs.h:2020 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x8ef/0x1490 fs/read_write.c:584 ksys_write+0x20f/0x4c0 fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __x64_sys_write+0x93/0xd0 fs/read_write.c:646 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Local variable mp_opt created at: subflow_check_req+0x6d/0x15d0 net/mptcp/subflow.c:145 subflow_v6_route_req+0x269/0x410 net/mptcp/subflow.c:367 CPU: 1 PID: 5924 Comm: syz-executor.3 Not tainted 6.7.0-rc8-syzkaller-00055-g5eff55d725a4 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Florian Westphal Cc: Peter Krystad Cc: Matthieu Baerts Cc: Mat Martineau Cc: Geliang Tang Reviewed-by: Simon Horman Acked-by: Paolo Abeni Reviewed-by: Mat Martineau Link: https://lore.kernel.org/r/20240111194917.4044654-5-edumazet@google.com Signed-off-by: Jakub Kicinski commit be1d9d9d38da922bd4beeec5b6dd821ff5a1dfeb Author: Eric Dumazet Date: Thu Jan 11 19:49:15 2024 +0000 mptcp: use OPTION_MPTCP_MPJ_SYNACK in subflow_finish_connect() subflow_finish_connect() uses four fields (backup, join_id, thmac, none) that may contain garbage unless OPTION_MPTCP_MPJ_SYNACK has been set in mptcp_parse_option() Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Signed-off-by: Eric Dumazet Cc: Florian Westphal Cc: Peter Krystad Cc: Matthieu Baerts Cc: Mat Martineau Cc: Geliang Tang Reviewed-by: Simon Horman Acked-by: Paolo Abeni Reviewed-by: Mat Martineau Link: https://lore.kernel.org/r/20240111194917.4044654-4-edumazet@google.com Signed-off-by: Jakub Kicinski commit c1665273bdc7c201766c65e561c06711f2e050dc Author: Eric Dumazet Date: Thu Jan 11 19:49:14 2024 +0000 mptcp: strict validation before using mp_opt->hmac mp_opt->hmac contains uninitialized data unless OPTION_MPTCP_MPJ_ACK was set in mptcp_parse_option(). We must refine the condition before we call subflow_hmac_valid(). Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Signed-off-by: Eric Dumazet Cc: Florian Westphal Cc: Peter Krystad Cc: Matthieu Baerts Cc: Mat Martineau Cc: Geliang Tang Reviewed-by: Simon Horman Acked-by: Paolo Abeni Reviewed-by: Mat Martineau Link: https://lore.kernel.org/r/20240111194917.4044654-3-edumazet@google.com Signed-off-by: Jakub Kicinski commit 89e23277f9c16df6f9f9c1a1a07f8f132339c15c Author: Eric Dumazet Date: Thu Jan 11 19:49:13 2024 +0000 mptcp: mptcp_parse_option() fix for MPTCPOPT_MP_JOIN mptcp_parse_option() currently sets OPTIONS_MPTCP_MPJ, for the three possible cases handled for MPTCPOPT_MP_JOIN option. OPTIONS_MPTCP_MPJ is the combination of three flags: - OPTION_MPTCP_MPJ_SYN - OPTION_MPTCP_MPJ_SYNACK - OPTION_MPTCP_MPJ_ACK This is a problem, because backup, join_id, token, nonce and/or hmac fields could be left uninitialized in some cases. Distinguish the three cases, as following patches will need this step. Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Signed-off-by: Eric Dumazet Cc: Florian Westphal Cc: Peter Krystad Cc: Matthieu Baerts Cc: Mat Martineau Cc: Geliang Tang Reviewed-by: Simon Horman Acked-by: Paolo Abeni Reviewed-by: Mat Martineau Link: https://lore.kernel.org/r/20240111194917.4044654-2-edumazet@google.com Signed-off-by: Jakub Kicinski commit 052d534373b7ed33712a63d5e17b2b6cdbce84fd Merge: f16ab99c2eba2 f55c096f62f10 Author: Linus Torvalds Date: Fri Jan 12 18:05:56 2024 -0800 Merge tag 'exfat-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat updates from Namjae Jeon: - Replace the internal table lookup algorithm with the hweight library and ffs of the bitops library. - Handle the two types of stream entry, valid data size (has been written) and data size separately. It improves compatibility with two differently sized files created on Windows. * tag 'exfat-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: do not zero the extended part exfat: change to get file size from DataLength exfat: using ffs instead of internal logic exfat: using hweight instead of internal logic commit f16ab99c2eba233bc97b9f9cc374f7a371fcc363 Merge: 1acc24b300bfa bbe6a7c899e7f Author: Linus Torvalds Date: Fri Jan 12 18:04:01 2024 -0800 Merge tag 'pull-bcachefs-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull bcachefs locking fix from Al Viro: "Fix broken locking in bch2_ioctl_subvolume_destroy()" * tag 'pull-bcachefs-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: bch2_ioctl_subvolume_destroy(): fix locking new helper: user_path_locked_at() commit 1acc24b300bfa8b2f03daabbba67db600fd38e08 Merge: 23a80d462c674 88388cb0c9b0c Author: Linus Torvalds Date: Fri Jan 12 18:02:03 2024 -0800 Merge tag 'pull-simple_recursive_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull nfsctl update from Al Viro: "More simple_recursive_removal() conversions. nfsctl this time..." * tag 'pull-simple_recursive_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: nfsctl: switch to simple_recursive_removal() commit cbdd50ec8b1daef6d71fb3325e436c8dec2d2e15 Author: Dmitry Antipov Date: Thu Jan 11 19:24:29 2024 +0300 net: liquidio: fix clang-specific W=1 build warnings When compiling with clang-18 and W=1, I've noticed the following warnings: drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:1493:16: warning: cast from 'void (*)(struct octeon_device *, struct octeon_mbox_cmd *, void *)' to 'octeon_mbox_callback_t' (aka 'void (*)(void *, void *, void *)') converts to incompatible function type [-Wcast-function-type-strict] 1493 | mbox_cmd.fn = (octeon_mbox_callback_t)cn23xx_get_vf_stats_callback; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ and: drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:432:16: warning: cast from 'void (*)(struct octeon_device *, struct octeon_mbox_cmd *, void *)' to 'octeon_mbox_callback_t' (aka 'void (*)(void *, void *, void *)') converts to incompatible function type [-Wcast-function-type-strict] 432 | mbox_cmd.fn = (octeon_mbox_callback_t)octeon_pfvf_hs_callback; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix both of the above by adjusting 'octeon_mbox_callback_t' to match actual callback definitions (at the cost of adding an extra forward declaration). Signed-off-by: Dmitry Antipov Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240111162432.124014-1-dmantipov@yandex.ru Signed-off-by: Jakub Kicinski commit 23a80d462c67406303df852d58b745b8618acc4a Merge: 38814330fedd7 7dfb03dd24d43 Author: Linus Torvalds Date: Fri Jan 12 16:35:58 2024 -0800 Merge tag 'rcu.release.v6.8' of https://github.com/neeraju/linux Pull RCU updates from Neeraj Upadhyay: - Documentation and comment updates - RCU torture, locktorture updates that include cleanups; nolibc init build support for mips, ppc and rv64; testing of mid stall duration scenario and fixing fqs task creation conditions - Misc fixes, most notably restricting usage of RCU CPU stall notifiers, to confine their usage primarily to debug kernels - RCU tasks minor fixes - lockdep annotation fix for NMI-safe accesses, callback advancing/acceleration cleanup and documentation improvements * tag 'rcu.release.v6.8' of https://github.com/neeraju/linux: rcu: Force quiescent states only for ongoing grace period doc: Clarify historical disclaimers in memory-barriers.txt doc: Mention address and data dependencies in rcu_dereference.rst doc: Clarify RCU Tasks reader/updater checklist rculist.h: docs: Fix wrong function summary Documentation: RCU: Remove repeated word in comments srcu: Use try-lock lockdep annotation for NMI-safe access. srcu: Explain why callbacks invocations can't run concurrently srcu: No need to advance/accelerate if no callback enqueued srcu: Remove superfluous callbacks advancing from srcu_gp_start() rcu: Remove unused macros from rcupdate.h rcu: Restrict access to RCU CPU stall notifiers rcu-tasks: Mark RCU Tasks accesses to current->rcu_tasks_idle_cpu rcutorture: Add fqs_holdoff check before fqs_task is created rcutorture: Add mid-sized stall to TREE07 rcutorture: add nolibc init support for mips, ppc and rv64 locktorture: Increase Hamming distance between call_rcu_chain and rcu_call_chains commit 5d4747a6cc8e78ce74742d557fc9b7697fcacc95 Author: Suren Baghdasaryan Date: Thu Jan 11 17:39:35 2024 -0800 userfaultfd: avoid huge_zero_page in UFFDIO_MOVE While testing UFFDIO_MOVE ioctl, syzbot triggered VM_BUG_ON_PAGE caused by a call to PageAnonExclusive() with a huge_zero_page as a parameter. UFFDIO_MOVE does not yet handle zeropages and returns EBUSY when one is encountered. Add an early huge_zero_page check in the PMD move path to avoid this situation. Link: https://lkml.kernel.org/r/20240112013935.1474648-1-surenb@google.com Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Reported-by: syzbot+705209281e36404998f6@syzkaller.appspotmail.com Signed-off-by: Suren Baghdasaryan Acked-by: David Hildenbrand Cc: Andrea Arcangeli Cc: Peter Xu Cc: Stephen Rothwell Signed-off-by: Andrew Morton commit aa8f91910bf5fb11dcd176e6efac2dbe2cecebea Author: Qi Zheng Date: Thu Jan 11 15:52:19 2024 +0800 MAINTAINERS: add entry for shrinker Since the shrinker-related code has been moved to a separate shrinker.c file, it's time to add a MAINTAINERS entry for it. Dave, Roman, Muchun and I have all worked on shrinker (development, review, etc) in the past period of time, and all of us are willing to continue working on shrinker in the future, so I'd like to add all of us as maintainer/reviewer. Link: https://lkml.kernel.org/r/20240111075219.34221-1-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng Cc: Dave Chinner Cc: Muchun Song Cc: Roman Gushchin Signed-off-by: Andrew Morton commit 00bcfcd47a52f50f07a2e88d730d7931384cb073 Author: Donet Tom Date: Wed Jan 10 14:03:35 2024 +0530 selftests: mm: hugepage-vmemmap fails on 64K page size systems The kernel sefltest mm/hugepage-vmemmap fails on architectures which has different page size other than 4K. In hugepage-vmemmap page size used is 4k so the pfn calculation will go wrong on systems which has different page size .The length of MAP_HUGETLB memory must be hugepage aligned but in hugepage-vmemmap map length is 2M so this will not get aligned if the system has differnet hugepage size. Added psize() to get the page size and default_huge_page_size() to get the default hugepage size at run time, hugepage-vmemmap test pass on powerpc with 64K page size and x86 with 4K page size. Result on powerpc without patch (page size 64K) *# ./hugepage-vmemmap Returned address is 0x7effff000000 whose pfn is 0 Head page flags (100000000) is invalid check_page_flags: Invalid argument *# Result on powerpc with patch (page size 64K) *# ./hugepage-vmemmap Returned address is 0x7effff000000 whose pfn is 600 *# Result on x86 with patch (page size 4K) *# ./hugepage-vmemmap Returned address is 0x7fc7c2c00000 whose pfn is 1dac00 *# Link: https://lkml.kernel.org/r/3b3a3ae37ba21218481c482a872bbf7526031600.1704865754.git.donettom@linux.vnet.ibm.com Fixes: b147c89cd429 ("selftests: vm: add a hugetlb test case") Signed-off-by: Donet Tom Reported-by: Geetika Moolchandani Tested-by: Geetika Moolchandani Acked-by: Muchun Song Cc: Signed-off-by: Andrew Morton commit 11684134140bb708b6e6de969a060535630b1b53 Author: Sumanth Korikkar Date: Wed Jan 10 15:01:27 2024 +0100 mm/memory_hotplug: fix memmap_on_memory sysfs value retrieval set_memmap_mode() stores the kernel parameter memmap mode as an integer. However, the get_memmap_mode() function utilizes param_get_bool() to fetch the value as a boolean, leading to potential endianness issue. On Big-endian architectures, the memmap_on_memory is consistently displayed as 'N' regardless of its actual status. To address this endianness problem, the solution involves obtaining the mode as an integer. This adjustment ensures the proper display of the memmap_on_memory parameter, presenting it as one of the following options: Force, Y, or N. Link: https://lkml.kernel.org/r/20240110140127.241451-1-sumanthk@linux.ibm.com Fixes: 2d1f649c7c08 ("mm/memory_hotplug: support memmap_on_memory when memmap is not aligned to pageblocks") Signed-off-by: Sumanth Korikkar Suggested-by: Gerald Schaefer Acked-by: David Hildenbrand Cc: Alexander Gordeev Cc: Aneesh Kumar K.V Cc: Heiko Carstens Cc: Michal Hocko Cc: Oscar Salvador Cc: Vasily Gorbik Cc: [6.6+] Signed-off-by: Andrew Morton commit 55f958c55c2f381c4c9e121c0a5098b222bca75f Author: Tanzir Hasan Date: Fri Jan 5 23:44:34 2024 +0000 mailmap: switch email for Tanzir Hasan Access to the tanzirh@google.com email will be revoked upon the end of the internship. Link: https://lkml.kernel.org/r/20240105-newemail-v3-1-3dc8ae035b54@google.com Signed-off-by: Tanzir Hasan Reviewed-by: Nick Desaulniers Reviewed-by: Justin Stitt Signed-off-by: Andrew Morton commit 0b8f128da761c54c5b210fad581ef597d38e7f81 Author: Randy Dunlap Date: Fri Jan 5 22:30:44 2024 -0800 mailmap: add old address mappings for Randy Add my old email addresses so that git send-email will map them to my current email address. Link: https://lkml.kernel.org/r/20240106063051.13623-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Andrew Morton Signed-off-by: Andrew Morton commit 4e87ff59cebb53d3ce1333245e64ab7d51ebf118 Author: Andrew Morton Date: Tue Jan 9 21:35:21 2024 -0800 kernel/crash_core.c: make __crash_hotplug_lock static sparse warnings: kernel/crash_core.c:749:1: sparse: sparse: symbol '__crash_hotplug_lock' was not declared. Should it be static? Fixes: e2a8f20dd8e9 ("Crash: add lock to serialize crash hotplug handling") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401080654.IjjU5oK7-lkp@intel.com/ Cc: Baoquan He Signed-off-by: Andrew Morton commit 7ea6ec4c25294e8bc8788148ef854df92ee8dc5e Author: Ma Wupeng Date: Tue Jan 9 12:15:36 2024 +0800 efi: disable mirror feature during crashkernel If the system has no mirrored memory or uses crashkernel.high while kernelcore=mirror is enabled on the command line then during crashkernel, there will be limited mirrored memory and this usually leads to OOM. To solve this problem, disable the mirror feature during crashkernel. Link: https://lkml.kernel.org/r/20240109041536.3903042-1-mawupeng1@huawei.com Signed-off-by: Ma Wupeng Acked-by: Mike Rapoport (IBM) Cc: Signed-off-by: Andrew Morton commit 7bb943806ff61e83ae4cceef8906b7fe52453e8a Author: James Gowans Date: Wed Dec 13 08:40:04 2023 +0200 kexec: do syscore_shutdown() in kernel_kexec syscore_shutdown() runs driver and module callbacks to get the system into a state where it can be correctly shut down. In commit 6f389a8f1dd2 ("PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()") syscore_shutdown() was removed from kernel_restart_prepare() and hence got (incorrectly?) removed from the kexec flow. This was innocuous until commit 6735150b6997 ("KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown") changed the way that KVM registered its shutdown callbacks, switching from reboot notifiers to syscore_ops.shutdown. As syscore_shutdown() is missing from kexec, KVM's shutdown hook is not run and virtualisation is left enabled on the boot CPU which results in triple faults when switching to the new kernel on Intel x86 VT-x with VMXE enabled. Fix this by adding syscore_shutdown() to the kexec sequence. In terms of where to add it, it is being added after migrating the kexec task to the boot CPU, but before APs are shut down. It is not totally clear if this is the best place: in commit 6f389a8f1dd2 ("PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()") it is stated that "syscore_ops operations should be carried with one CPU on-line and interrupts disabled." APs are only offlined later in machine_shutdown(), so this syscore_shutdown() is being run while APs are still online. This seems to be the correct place as it matches where syscore_shutdown() is run in the reboot and halt flows - they also run it before APs are shut down. The assumption is that the commit message in commit 6f389a8f1dd2 ("PM / reboot: call syscore_shutdown() after disable_nonboot_cpus()") is no longer valid. KVM has been discussed here as it is what broke loudly by not having syscore_shutdown() in kexec, but this change impacts more than just KVM; all drivers/modules which register a syscore_ops.shutdown callback will now be invoked in the kexec flow. Looking at some of them like x86 MCE it is probably more correct to also shut these down during kexec. Maintainers of all drivers which use syscore_ops.shutdown are added on CC for visibility. They are: arch/powerpc/platforms/cell/spu_base.c .shutdown = spu_shutdown, arch/x86/kernel/cpu/mce/core.c .shutdown = mce_syscore_shutdown, arch/x86/kernel/i8259.c .shutdown = i8259A_shutdown, drivers/irqchip/irq-i8259.c .shutdown = i8259A_shutdown, drivers/irqchip/irq-sun6i-r.c .shutdown = sun6i_r_intc_shutdown, drivers/leds/trigger/ledtrig-cpu.c .shutdown = ledtrig_cpu_syscore_shutdown, drivers/power/reset/sc27xx-poweroff.c .shutdown = sc27xx_poweroff_shutdown, kernel/irq/generic-chip.c .shutdown = irq_gc_shutdown, virt/kvm/kvm_main.c .shutdown = kvm_shutdown, This has been tested by doing a kexec on x86_64 and aarch64. Link: https://lkml.kernel.org/r/20231213064004.2419447-1-jgowans@amazon.com Fixes: 6735150b6997 ("KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown") Signed-off-by: James Gowans Cc: Baoquan He Cc: Eric Biederman Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Marc Zyngier Cc: Arnd Bergmann Cc: Tony Luck Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Samuel Holland Cc: Pavel Machek Cc: Sebastian Reichel Cc: Orson Zhai Cc: Alexander Graf Cc: Jan H. Schoenherr Cc: Signed-off-by: Andrew Morton commit 327b4603c0b2469c2ef5f15b510d0e42d8e209de Author: Manivannan Sadhasivam Date: Tue Jan 9 15:44:31 2024 +0530 mailmap: update entry for Manivannan Sadhasivam Remove the map for Linaro id as it is still in use and I want to use it for submitting patches. Otherwise, git uses kernel.org as the author id for patches created using Linaro id. Link: https://lkml.kernel.org/r/20240109-update-mailmap-v1-1-bf7a39f15fb7@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andrew Morton commit 4cccb6221cae6d020270606b9e52b1678fc8b71a Author: Muhammad Usama Anjum Date: Tue Jan 9 16:24:42 2024 +0500 fs/proc/task_mmu: move mmu notification mechanism inside mm lock Move mmu notification mechanism inside mm lock to prevent race condition in other components which depend on it. The notifier will invalidate memory range. Depending upon the number of iterations, different memory ranges would be invalidated. The following warning would be removed by this patch: WARNING: CPU: 0 PID: 5067 at arch/x86/kvm/../../../virt/kvm/kvm_main.c:734 kvm_mmu_notifier_change_pte+0x860/0x960 arch/x86/kvm/../../../virt/kvm/kvm_main.c:734 There is no behavioural and performance change with this patch when there is no component registered with the mmu notifier. [akpm@linux-foundation.org: narrow the scope of `range', per Sean] Link: https://lkml.kernel.org/r/20240109112445.590736-1-usama.anjum@collabora.com Fixes: 52526ca7fdb9 ("fs/proc/task_mmu: implement IOCTL to get and optionally clear info about PTEs") Signed-off-by: Muhammad Usama Anjum Reported-by: syzbot+81227d2bd69e9dedb802@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/000000000000f6d051060c6785bc@google.com/ Reviewed-by: Sean Christopherson Cc: Andrei Vagin Cc: Arnd Bergmann Cc: David Hildenbrand Cc: Hugh Dickins Cc: Kefeng Wang Cc: Liam R. Howlett Cc: Michał Mirosław Cc: Peter Xu Cc: Ryan Roberts Cc: Stephen Rothwell Cc: Suren Baghdasaryan Cc: Signed-off-by: Andrew Morton commit ea52f71598f3d0cfaaf53b7d837bee9919041351 Author: Johannes Weiner Date: Tue Jan 9 14:02:00 2024 -0500 mm: zswap: switch maintainers to recently active developers and reviewers Yosry, Nhat and I have been doing most of the recent development and reviewing of changes in this space. Signed-off-by: Johannes Weiner Acked-by: Nhat Pham Acked-by: Yosry Ahmed Acked-by: Dan Streetman Acked-by: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton commit efbd6398353315b7018e6943e41fee9ec35e875f Author: Carlos Llamas Date: Fri Sep 29 03:48:17 2023 +0000 scripts/decode_stacktrace.sh: optionally use LLVM utilities GNU's addr2line can have problems parsing a vmlinux built with LLVM, particularly when LTO was used. In order to decode the traces correctly this patch adds the ability to switch to LLVM's utilities readelf and addr2line. The same approach is followed by Will in [1]. Before: $ scripts/decode_stacktrace.sh vmlinux < kernel.log [17716.240635] Call trace: [17716.240646] skb_cow_data (??:?) [17716.240654] esp6_input (ld-temp.o:?) [17716.240666] xfrm_input (ld-temp.o:?) [17716.240674] xfrm6_rcv (??:?) [...] After: $ LLVM=1 scripts/decode_stacktrace.sh vmlinux < kernel.log [17716.240635] Call trace: [17716.240646] skb_cow_data (include/linux/skbuff.h:2172 net/core/skbuff.c:4503) [17716.240654] esp6_input (net/ipv6/esp6.c:977) [17716.240666] xfrm_input (net/xfrm/xfrm_input.c:659) [17716.240674] xfrm6_rcv (net/ipv6/xfrm6_input.c:172) [...] Note that one could set CROSS_COMPILE=llvm- instead to hack around this issue. However, doing so can break the decodecode routine as it will force the selection of other LLVM utilities down the line e.g. llvm-as. [1] https://lore.kernel.org/all/20230914131225.13415-3-will@kernel.org/ Link: https://lkml.kernel.org/r/20230929034836.403735-1-cmllamas@google.com Signed-off-by: Carlos Llamas Reviewed-by: Nick Desaulniers Reviewed-by: Elliot Berman Tested-by: Justin Stitt Cc: Will Deacon Cc: John Stultz Cc: Masahiro Yamada Cc: Nathan Chancellor Cc: Tom Rix Cc: Signed-off-by: Andrew Morton commit cc478e0b6bdffd20561e1a07941a65f6c8962cab Author: Andrey Konovalov Date: Tue Jan 9 23:12:34 2024 +0100 kasan: avoid resetting aux_lock With commit 63b85ac56a64 ("kasan: stop leaking stack trace handles"), KASAN zeroes out alloc meta when an object is freed. The zeroed out data purposefully includes alloc and auxiliary stack traces but also accidentally includes aux_lock. As aux_lock is only initialized for each object slot during slab creation, when the freed slot is reallocated, saving auxiliary stack traces for the new object leads to lockdep reports when taking the zeroed out aux_lock. Arguably, we could reinitialize aux_lock when the object is reallocated, but a simpler solution is to avoid zeroing out aux_lock when an object gets freed. Link: https://lkml.kernel.org/r/20240109221234.90929-1-andrey.konovalov@linux.dev Fixes: 63b85ac56a64 ("kasan: stop leaking stack trace handles") Signed-off-by: Andrey Konovalov Reported-by: Paul E. McKenney Closes: https://lore.kernel.org/linux-next/5cc0f83c-e1d6-45c5-be89-9b86746fe731@paulmck-laptop/ Reviewed-by: Marco Elver Tested-by: Paul E. McKenney Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Liam R. Howlett Signed-off-by: Andrew Morton commit aaa2c9a97c22af5bf011f6dd8e0538219b45af88 Author: Nathan Chancellor Date: Fri Jan 5 12:13:04 2024 -0700 lib/Kconfig.debug: disable CONFIG_DEBUG_INFO_BTF for Hexagon pahole, which generates BTF, relies on elfutils to process DWARF debug info. Because kernel modules are relocatable files, elfutils needs to resolve relocations when processing the DWARF .debug sections. Hexagon is not supported in binutils or elfutils, so elfutils is unable to process relocations in kernel modules, causing pahole to crash during BTF generation. Do not allow CONFIG_DEBUG_INFO_BTF to be selected for Hexagon until it is supported in elfutils, so that there are no more cryptic build failures during BTF generation. Link: https://lkml.kernel.org/r/20240105-hexagon-disable-btf-v1-1-ddab073e7f74@kernel.org Signed-off-by: Nathan Chancellor Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312192107.wMIKiZWw-lkp@intel.com/ Suggested-by: Nick Desaulniers Acked-by: Brian Cain Cc: Arnaldo Carvalho de Melo Signed-off-by: Andrew Morton commit 65cc86800cf27d8e2da3439c834aef96d93fef63 Author: Petr Vorel Date: Thu Jan 4 16:49:53 2024 +0100 MAINTAINERS: update LTP maintainers There are more people with git push permissions, but we keep only people who actually did review and merge patches last year. Link: https://lkml.kernel.org/r/20240104154953.1193634-1-pvorel@suse.cz Signed-off-by: Petr Vorel Reviewed-by: Li Wang Cc: Alexey Kodanev Cc: Jan Stancek Cc: Mike Frysinger Cc: Wanlong Gao Cc: Yang Xu Signed-off-by: Andrew Morton commit 4a693ce65b186fddc1a73621bd6f941e6e3eca21 Author: Huacai Chen Date: Fri Dec 29 16:02:13 2023 +0800 kdump: defer the insertion of crashkernel resources In /proc/iomem, sub-regions should be inserted after their parent, otherwise the insertion of parent resource fails. But after generic crashkernel reservation applied, in both RISC-V and ARM64 (LoongArch will also use generic reservation later on), crashkernel resources are inserted before their parent, which causes the parent disappear in /proc/iomem. So we defer the insertion of crashkernel resources to an early_initcall(). 1, Without 'crashkernel' parameter: 100d0100-100d01ff : LOON0001:00 100d0100-100d01ff : LOON0001:00 LOON0001:00 100e0000-100e0bff : LOON0002:00 100e0000-100e0bff : LOON0002:00 LOON0002:00 1fe001e0-1fe001e7 : serial 90400000-fa17ffff : System RAM f6220000-f622ffff : Reserved f9ee0000-f9ee3fff : Reserved fa120000-fa17ffff : Reserved fa190000-fe0bffff : System RAM fa190000-fa1bffff : Reserved fe4e0000-47fffffff : System RAM 43c000000-441ffffff : Reserved 47ff98000-47ffa3fff : Reserved 47ffa4000-47ffa7fff : Reserved 47ffa8000-47ffabfff : Reserved 47ffac000-47ffaffff : Reserved 47ffb0000-47ffb3fff : Reserved 2, With 'crashkernel' parameter, before this patch: 100d0100-100d01ff : LOON0001:00 100d0100-100d01ff : LOON0001:00 LOON0001:00 100e0000-100e0bff : LOON0002:00 100e0000-100e0bff : LOON0002:00 LOON0002:00 1fe001e0-1fe001e7 : serial e6200000-f61fffff : Crash kernel fa190000-fe0bffff : System RAM fa190000-fa1bffff : Reserved fe4e0000-47fffffff : System RAM 43c000000-441ffffff : Reserved 47ff98000-47ffa3fff : Reserved 47ffa4000-47ffa7fff : Reserved 47ffa8000-47ffabfff : Reserved 47ffac000-47ffaffff : Reserved 47ffb0000-47ffb3fff : Reserved 3, With 'crashkernel' parameter, after this patch: 100d0100-100d01ff : LOON0001:00 100d0100-100d01ff : LOON0001:00 LOON0001:00 100e0000-100e0bff : LOON0002:00 100e0000-100e0bff : LOON0002:00 LOON0002:00 1fe001e0-1fe001e7 : serial 90400000-fa17ffff : System RAM e6200000-f61fffff : Crash kernel f6220000-f622ffff : Reserved f9ee0000-f9ee3fff : Reserved fa120000-fa17ffff : Reserved fa190000-fe0bffff : System RAM fa190000-fa1bffff : Reserved fe4e0000-47fffffff : System RAM 43c000000-441ffffff : Reserved 47ff98000-47ffa3fff : Reserved 47ffa4000-47ffa7fff : Reserved 47ffa8000-47ffabfff : Reserved 47ffac000-47ffaffff : Reserved 47ffb0000-47ffb3fff : Reserved Link: https://lkml.kernel.org/r/20231229080213.2622204-1-chenhuacai@loongson.cn Signed-off-by: Huacai Chen Fixes: 0ab97169aa05 ("crash_core: add generic function to do reservation") Cc: Baoquan He Cc: Zhen Lei Cc: [6.6+] Signed-off-by: Andrew Morton commit 38814330fedd778edffcabe0c8cb462ee365782e Merge: 42bff4d0f9b9c 716089b417cf9 Author: Linus Torvalds Date: Fri Jan 12 15:05:30 2024 -0800 Merge tag 'devicetree-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: - Convert FPGA bridge, all TPMs (finally), and Rockchip HDMI bindings to schemas - Improvements in Samsung GPU schemas - A few more cases of dropping unneeded quotes in schemas - Merge QCom idle-states txt binding into common idle-states schema - Add X1E80100, SM8650, SM8650, and SDX75 SoCs to QCom Power Domain Controller - Add NXP i.mx8dl to SCU PD - Add synaptics r63353 panel controller - Clarify the wording around the use of 'wakeup-source' property - Add a DTS coding style doc - Add smi vendor prefix - Fix DT_SCHEMA_FILES incorrect matching of paths outside the kernel tree - Disable sysfb (e.g. EFI FB) when simple-framebuffer node is present - Fix double free in of_parse_phandle_with_args_map() - A couple of kerneldoc fixes * tag 'devicetree-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (37 commits) of: unittest: Fix of_count_phandle_with_args() expected value message dt-bindings: fpga: altera: Convert bridge bindings to yaml dt-bindings: fpga: Convert bridge binding to yaml dt-bindings: vendor-prefixes: Add smi dt-bindings: power: Clarify wording for wakeup-source property of: Fix double free in of_parse_phandle_with_args_map dt-bindings: ignore paths outside kernel for DT_SCHEMA_FILES drivers: of: Fixed kernel doc warning dt-bindings: tpm: Document Microsoft fTPM bindings dt-bindings: tpm: Convert IBM vTPM bindings to DT schema dt-bindings: tpm: Convert Google Cr50 bindings to DT schema dt-bindings: tpm: Consolidate TCG TIS bindings dt-bindings: display: rockchip,inno-hdmi: Document RK3128 compatible dt-bindings: arm: Add remote etm dt-binding dt-bindings: mmc: sdhci-pxa: Fix 'regs' typo media: dt-bindings: samsung,s5p-mfc: Fix iommu properties schemas dt-bindings: display: panel: Add synaptics r63353 panel controller dt-bindings: arm: merge qcom,idle-state with idle-state dt-bindings: drm: rockchip: convert inno_hdmi-rockchip.txt to yaml dt-bindings: cache: qcom,llcc: correct QDU1000 reg entries ... commit 42bff4d0f9b9c8b669c5cef25c5116f41eb45c6b Merge: fef018d819966 7afc0e7f681e6 Author: Linus Torvalds Date: Fri Jan 12 14:59:50 2024 -0800 Merge tag 'pwm/for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This contains a bunch of cleanups and simplifications across the board, as well as a number of small fixes. Perhaps the most notable change here is the addition of an API that allows PWMs to be used in atomic contexts, which is useful when time- critical operations are involved, such as using a PWM to generate IR signals. Finally, I have decided to step down as PWM subsystem maintainer. Due to other responsibilities I have lately not been able to find the time that the subsystem deserves and Uwe, who has been helping out a lot for the past few years and has many things planned for the future, has kindly volunteered to take over. I have no doubt that he will be a suitable replacement" * tag 'pwm/for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (44 commits) MAINTAINERS: pwm: Thierry steps down, Uwe takes over pwm: linux/pwm.h: fix Excess kernel-doc description warning pwm: Add pwm_apply_state() compatibility stub pwm: cros-ec: Drop documentation for dropped struct member pwm: Drop two unused API functions pwm: lpc18xx-sct: Don't modify the cached period of other PWM outputs pwm: meson: Simplify using dev_err_probe() pwm: stmpe: Silence duplicate error messages pwm: Reduce number of pointer dereferences in pwm_device_request() pwm: crc: Use consistent variable naming for driver data pwm: omap-dmtimer: Drop locking dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml media: pwm-ir-tx: Trigger edges from hrtimer interrupt context pwm: bcm2835: Allow PWM driver to be used in atomic context pwm: Make it possible to apply PWM changes in atomic context pwm: renesas: Remove unused include pwm: Replace ENOTSUPP with EOPNOTSUPP pwm: Rename pwm_apply_state() to pwm_apply_might_sleep() pwm: Stop referencing pwm->chip pwm: Update kernel doc for struct pwm_chip ... commit 73bf93edeeea866b0b6efbc8d2595bdaaba7f1a5 Author: Shiyang Ruan Date: Fri Jan 12 14:27:09 2024 +0800 cxl/core: use sysfs_emit() for attr's _show() sprintf() is deprecated for sysfs, use preferred sysfs_emit() instead. Signed-off-by: Shiyang Ruan Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Fan Ni Link: https://lore.kernel.org/r/20240112062709.2490947-1-ruansy.fnst@fujitsu.com Signed-off-by: Dan Williams commit fef018d8199661962b5fc0f0d1501caa54b2b533 Merge: d97a78423c33f 0b43615af1974 Author: Linus Torvalds Date: Fri Jan 12 14:45:13 2024 -0800 Merge tag 'hid-for-linus-2024010801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - assorted functional fixes for hid-steam ported from SteamOS betas (Vicki Pfau) - fix for custom sensor-hub sensors (hinge angle sensor and LISS sensors) not working (Yauhen Kharuzhy) - functional fix for handling Confidence in Wacom driver (Jason Gerecke) - support for Ilitek ili2901 touchscreen (Zhengqiao Xia) - power management fix for Wacom userspace battery exporting (Tatsunosuke Tobita) - rework of wait-for-reset in order to reduce the need for I2C_HID_QUIRK_NO_IRQ_AFTER_RESET qurk; the success rate is now 50% better, but there are still further improvements to be made (Hans de Goede) - greatly improved coverage of Tablets in hid-selftests (Benjamin Tissoires) - support for Nintendo NSO controllers -- SNES, Genesis and N64 (Ryan McClelland) - support for controlling mcp2200 GPIOs (Johannes Roith) - power management improvement for EHL OOB wakeup in intel-ish (Kai-Heng Feng) - other assorted device-specific fixes and code cleanups * tag 'hid-for-linus-2024010801' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (53 commits) HID: amd_sfh: Add a new interface for exporting ALS data HID: amd_sfh: Add a new interface for exporting HPD data HID: amd_sfh: rename float_to_int() to amd_sfh_float_to_int() HID: i2c-hid: elan: Add ili2901 timing dt-bindings: HID: i2c-hid: elan: Introduce Ilitek ili2901 HID: bpf: make bus_type const in struct hid_bpf_ops HID: make ishtp_cl_bus_type const HID: make hid_bus_type const HID: hid-steam: Add gamepad-only mode switched to by holding options HID: hid-steam: Better handling of serial number length HID: hid-steam: Update list of identifiers from SDL HID: hid-steam: Make client_opened a counter HID: hid-steam: Clean up locking HID: hid-steam: Disable watchdog instead of using a heartbeat HID: hid-steam: Avoid overwriting smoothing parameter HID: magicmouse: fix kerneldoc for struct magicmouse_sc HID: sensor-hub: Enable hid core report processing for all devices HID: wacom: Add additional tests of confidence behavior HID: wacom: Correct behavior when processing some confidence == false touches HID: nintendo: add support for nso controllers ... commit d97a78423c33f68ca6543de510a409167baed6f5 Merge: 61da593f4458f 689237ab37c59 Author: Linus Torvalds Date: Fri Jan 12 14:38:08 2024 -0800 Merge tag 'fbdev-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev updates from Helge Deller: "Three fbdev drivers (~8500 lines of code) removed. The Carillo Ranch fbdev driver is for an Intel product which was never shipped, and for the intelfb and the amba-clcd drivers the drm drivers can be used instead. The other code changes are minor: some fb_deferred_io flushing fixes, imxfb margin fixes and stifb cleanups. Summary: - Remove intelfb fbdev driver (Thomas Zimmermann) - Remove amba-clcd fbdev driver (Linus Walleij) - Remove vmlfb Carillo Ranch fbdev driver (Matthew Wilcox) - fb_deferred_io flushing fixes (Nam Cao) - imxfb code fixes and cleanups (Dario Binacchi) - stifb primary screen detection cleanups (Thomas Zimmermann)" * tag 'fbdev-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (28 commits) fbdev/intelfb: Remove driver fbdev/hyperv_fb: Do not clear global screen_info firmware/sysfb: Clear screen_info state after consuming it fbdev/hyperv_fb: Remove firmware framebuffers with aperture helpers drm/hyperv: Remove firmware framebuffers with aperture helper fbdev/sis: Remove dependency on screen_info video/logo: use %u format specifier for unsigned int values video/sticore: Remove info field from STI struct arch/parisc: Detect primary video device from device instance fbdev/stifb: Allocate fb_info instance with framebuffer_alloc() video/sticore: Store ROM device in STI struct fbdev: flush deferred IO before closing fbdev: flush deferred work in fb_deferred_io_fsync() fbdev: amba-clcd: Delete the old CLCD driver fbdev: Remove support for Carillo Ranch driver fbdev: hgafb: fix kernel-doc comments fbdev: mmp: Fix typo and wording in code comment fbdev: fsl-diu-fb: Fix sparse warning due to virt_to_phys() prototype change fbdev: imxfb: add '*/' on a separate line in block comment fbdev: imxfb: use __func__ for function name ... commit 61da593f4458f25c59f65cfd9ba1bda570db5db7 Merge: a3cc31e75185f 60a031b64984a Author: Linus Torvalds Date: Fri Jan 12 14:29:48 2024 -0800 Merge tag 'media/v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - v4l core: subdev frame interval now supports which field - v4l kapi: moves and renames the init_cfg pad op to init_state as an internal op. - new sensor drivers: gc0308, gc2145, Avnet Alvium, ov64a40, tw9900 - new camera driver: STM32 DCMIPP - s5p-mfc has gained MFC v12 support - new ISP driver added to staging: Starfive - new stateful encoder/decoded: Wave5 codec It is found on the J721S2 SoC, JH7100 SoC, ssd202d SoC. Etc. - fwnode gained support for MIPI "DisCo for Imaging" (https://www.mipi.org/specifications/mipi-disco-imaging) - as usual, lots of cleanups, fixups and driver improvements. * tag 'media/v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (309 commits) media: i2c: thp7312: select CONFIG_FW_LOADER media: i2c: mt9m114: use fsleep() in place of udelay() media: videobuf2: core: Rename min_buffers_needed field in vb2_queue media: i2c: thp7312: Store frame interval in subdev state media: docs: uAPI: Fix documentation of 'which' field for routing ioctls media: docs: uAPI: Expand error documentation for invalid 'which' value media: docs: uAPI: Clarify error documentation for invalid 'which' value media: v4l2-subdev: Store frame interval in subdev state media: v4l2-subdev: Add which field to struct v4l2_subdev_frame_interval media: v4l2-subdev: Turn .[gs]_frame_interval into pad operations media: v4l: subdev: Move out subdev state lock macros outside CONFIG_MEDIA_CONTROLLER media: s5p-mfc: DPB Count Independent of VIDIOC_REQBUF media: s5p-mfc: Load firmware for each run in MFCv12. media: s5p-mfc: Set context for valid case before calling try_run media: s5p-mfc: Add support for DMABUF for encoder media: s5p-mfc: Add support for UHD encoding. media: s5p-mfc: Add support for rate controls in MFCv12 media: s5p-mfc: Add YV12 and I420 multiplanar format support media: s5p-mfc: Add initial support for MFCv12 media: s5p-mfc: Rename IS_MFCV10 macro ... commit a3cc31e75185f9b1ad8dc45eac77f8de788dc410 Merge: 20077583ccdd4 a085a5eb6594a Author: Linus Torvalds Date: Fri Jan 12 14:00:18 2024 -0800 Merge tag 'libnvdimm-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Ira Weiny: "A mix of bug fixes and updates to interfaces used by nvdimm: - Updates to interfaces include: Use the new scope based management Remove deprecated ida interfaces Update to sysfs_emit() - Fixup kdoc comments" * tag 'libnvdimm-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: acpi/nfit: Use sysfs_emit() for all attributes nvdimm/namespace: fix kernel-doc for function params nvdimm/dimm_devs: fix kernel-doc for function params nvdimm/btt: fix btt_blk_cleanup() kernel-doc nvdimm-btt: simplify code with the scope based resource management nvdimm: Remove usage of the deprecated ida_simple_xx() API ACPI: NFIT: Use cleanup.h helpers instead of devm_*() commit 20077583ccdd4db8aa626eae442e030d217901db Merge: 0c4b09cb542fd 5d40213347480 Author: Linus Torvalds Date: Fri Jan 12 13:57:33 2024 -0800 Merge tag 'mmc-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Don't force a retune before eMMC RPMB switch - Add optional HS400 tuning in HS400es initialization - Add a sysfs node to for write-protect-group-size - Add re-tuning test to the mmc-test module - Use mrq.sbc to support close-ended ioctl requests MMC host: - mmci: Add support for SDIO in-band irqs for the stm32 variant - mmc_spi: Remove broken support custom DMA mapped buffers - mtk-sd: Improve and extend the support for tunings - renesas_sdhi: Document support for the RZ/Five variant - sdhci_am654: Drop support for the ti,otap-del-sel DT property - sdhci-brcmstb: Add support for the brcm 74165b0 variant - sdhci-msm: Add compatibles for IPQ4019 and IPQ8074 - sdhci-of-dwcmshc: Add support for the T-Head TH1520 variant - sdhci-xenon: Add support for the Marvell ac5 variant" * tag 'mmc-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (27 commits) mmc: xenon: Add ac5 support via bounce buffer dt-bindings: mmc: add Marvell ac5 mmc: sdhci-brcmstb: add new sdhci reset sequence for brcm 74165b0 dt-bindings: mmc: brcm,sdhci-brcmstb: Add support for 74165b0 mmc: core: Do not force a retune before RPMB switch mmc: core: Add HS400 tuning in HS400es initialization mmc: sdhci_omap: Fix TI SoC dependencies mmc: sdhci_am654: Fix TI SoC dependencies mmc: core: Add wp_grp_size sysfs node mmc: mmc_test: Add re-tuning test mmc: mmc_spi: remove custom DMA mapped buffers dt-bindings: mmc: sdhci-msm: document dedicated IPQ4019 and IPQ8074 dt-bindings: mmc: synopsys-dw-mshc: add iommus for Intel SocFPGA mmc: mtk-sd: Extend number of tuning steps dt-bindings: mmc: mtk-sd: add tuning steps related property mmc: sdhci-omap: don't misuse kernel-doc marker mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data mmc: core: Use mrq.sbc in close-ended ffu mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel mmc: sdhci-of-dwcmshc: Use logical OR instead of bitwise OR in dwcmshc_probe() ... commit 0c4b09cb542fd0c4134e3f87442c89abffbfeedd Merge: bf9ca811bbadd d6948c13b663a Author: Linus Torvalds Date: Fri Jan 12 13:54:25 2024 -0800 Merge tag 'pmdomain-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm Pull pmdomain updates from Ulf Hansson: "Core: - Move the generic PM domain and its governor to the pmdomain subsystem - Drop the unused pm_genpd_opp_to_performance_state() Providers: - Convert some providers to let the ->remove() callback return void - amlogic: Add support for G12A ISP power domain - arm: Move the SCPI power-domain driver to the pmdomain subsystem - arm: Move Kconfig options to the pmdomain subsystem - qcom: Update part number to X1E80100 for the rpmhpd" * tag 'pmdomain-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: PM: domains: Move genpd and its governor to the pmdomain subsystem PM: domains: Drop redundant header for genpd PM: domains: Drop the unused pm_genpd_opp_to_performance_state() PM: domains: fix domain_governor kernel-doc warnings pmdomain: xilinx/zynqmp: Convert to platform remove callback returning void pmdomain: qcom-cpr: Convert to platform remove callback returning void pmdomain: imx93-pd: Convert to platform remove callback returning void pmdomain: imx93-blk-ctrl: Convert to platform remove callback returning void pmdomain: imx8mp-blk-ctrl: Convert to platform remove callback returning void pmdomain: imx8m-blk-ctrl: Convert to platform remove callback returning void pmdomain: imx-gpcv2: Convert to platform remove callback returning void pmdomain: imx-gpc: Convert to platform remove callback returning void pmdomain: imx-pgc: Convert to platform remove callback returning void pmdomain: amlogic: meson-ee-pwrc: add support for G12A ISP power domain dt-bindings: power: meson-g12a-power: document ISP power domain firmware: arm_scpi: Move power-domain driver to the pmdomain dir pmdomain: arm_scmi: Move Kconfig options to the pmdomain subsystem pmdomain: qcom: rpmhpd: Update part number to X1E80100 dt-bindings: power: rpmpd: Update part number to X1E80100 commit bf9ca811bbadd7d853469d58284ed87906cc9321 Merge: 141d9c6e003b8 d24b923f1d696 Author: Linus Torvalds Date: Fri Jan 12 13:52:21 2024 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "Small cycle, with some typical driver updates: - General code tidying in siw, hfi1, idrdma, usnic, hns rtrs and bnxt_re - Many small siw cleanups without an overeaching theme - Debugfs stats for hns - Fix a TX queue timeout in IPoIB and missed locking of the mcast list - Support more features of P7 devices in bnxt_re including a new work submission protocol - CQ interrupts for MANA - netlink stats for erdma - EFA multipath PCI support - Fix Incorrect MR invalidation in iser" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (66 commits) RDMA/bnxt_re: Fix error code in bnxt_re_create_cq() RDMA/efa: Add EFA query MR support IB/iser: Prevent invalidating wrong MR RDMA/erdma: Add hardware statistics support RDMA/erdma: Introduce dma pool for hardware responses of CMDQ requests IB/iser: iscsi_iser.h: fix kernel-doc warning and spellos RDMA/mana_ib: Add CQ interrupt support for RAW QP RDMA/mana_ib: query device capabilities RDMA/mana_ib: register RDMA device with GDMA RDMA/bnxt_re: Fix the sparse warnings RDMA/bnxt_re: Fix the offset for GenP7 adapters for user applications RDMA/bnxt_re: Share a page to expose per CQ info with userspace RDMA/bnxt_re: Add UAPI to share a page with user space IB/ipoib: Fix mcast list locking RDMA/mlx5: Expose register c0 for RDMA device net/mlx5: E-Switch, expose eswitch manager vport net/mlx5: Manage ICM type of SW encap RDMA/mlx5: Support handling of SW encap ICM area net/mlx5: Introduce indirect-sw-encap ICM properties RDMA/bnxt_re: Adds MSN table capability for Gen P7 adapters ... commit 141d9c6e003b806d8faeddeec7053ee2691ea61a Merge: 645f910ff61d9 986c20bb3e67d Author: Linus Torvalds Date: Fri Jan 12 13:49:47 2024 -0800 Merge tag 'firewire-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394 Pull firewire updates from Takashi Sakamoto: "This includes the series of changes related to device attributes, as well as slight code refactoring. Some old devices are recognized to have legacy layout of configuration ROM. They have an inconvenience that FireWire subsystem adds no attributes for vendor information to corresponding devices. The main purpose of this update is to rectify the inconvenience. We have a slight concern about regression. The update changes the value of modalias for the unit devices by populating its model field, which was previously left as zero in the case. I've assessed the potential impact of this change and anticipate it to have minimal concern for both the kernel and user lands. The change is enough acceptable" * tag 'firewire-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: firewire: core: fill model field in modalias of unit device for legacy layout of configuration ROM firewire: core: detect model name for legacy layout of configuration ROM firewire: core: detect numeric model identifier for legacy layout of configuration ROM firewire: test: add test of device attributes for legacy AV/C device firewire: test: add test of device attributes for simple AV/C device firewire: test: add KUnit test for device attributes firewire: core: replace magic number with macro firewire: core: adds constant qualifier for local helper functions firewire: make fw_bus_type const commit 645f910ff61d9b2968865c77a2f92a7c80e255ba Merge: c736c9a9553f9 0cbbbe09d49b9 Author: Linus Torvalds Date: Fri Jan 12 13:46:52 2024 -0800 Merge tag 'gnss-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss Pull GNSS updates from Johan Hovold: - support for the reset pin found on some u-blox receivers - use new regulator helper for the u-blox backup supply * tag 'gnss-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/gnss: gnss: ubx: add support for the reset gpio dt-bindings: gnss: u-blox: add "reset-gpios" binding gnss: ubx: use new helper to remove open coded regulator handling commit c736c9a9553f9cfcb1b03e65f91bc29fc6446fd3 Merge: 576db73424305 4f964cfef39d4 Author: Linus Torvalds Date: Fri Jan 12 13:42:35 2024 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "Only a couple new SoCs have support added this time, primarily for Qualcomm SM8650 based on the diffstat. Otherwise this is a collection of non-critical fixes and cleanups to various clk drivers and their DT bindings. Nothing is changed in the core clk framework this time, although there's a patch to fix a basic clk type initialization function. In general, this pile looks to be on the smaller side. New Drivers: - Global, display, gpu, tcsr, and rpmh clocks on Qualcomm SM8650 - Mediatek MT7988 SoC clocks Updates: - Update Zynqmp driver for Versal NET platforms - Add clk driver for Versal clocking wizard IP - Support for stm32mp25 clks - Add glitch free PLL setting support to si5351 clk driver - Add DSI clocks on Amlogic g12/sm1 - Add CSI and ISP clocks on Amlogic g12/sm1 - Document bindings for i.MX93 ANATOP clock driver - Free clk_node in i.MX SCU driver for resource with different owner - Update the LVDS clocks to be compatible with i.MX SCU firmware 1.15 - Fix the name of the fvco in i.MX pll14xx by renaming it to fout - Add EtherNet TSN and PCIe clocks on the Renesas R-Car V4H SoC - Add interrupt controller and Ethernet clocks and resets on Renesas RZ/G3S - Check reset monitor registers on Renesas RZ/G2L-alike SoCs - Reuse reset functionality in the Renesas RZ/G2L clock driver - Global and RPMh clock support for the Qualcomm X1E80100 SoC - Support for the Stromer APCS PLL found in Qualcomm IPQ5018 - Add a new type of branch clock, with support for controlling separate memory control bits, to the Qualcomm clk driver - Use above new branch type in Qualcomm ECPRI clk driver for QDU1000 and QRU1000 - Add a number of missing clocks related to CSI2 on Qualcomm MSM8939 - Add support for the camera clock controller on Qualcomm SC8280XP - Correct PLL configuration in GPU and video clock controllers for Qualcomm SM8150 - Add runtime PM support and a few missing resets to Qualcomm SM8150 video clock controller - Fix configuration of various GCC GDSCs on Qualcomm SM8550 - Mark shared RCGs appropriately in the Qualcomm SM8550 GCC driver - Fix up GPU and display clock controllers PLL configuration settings on Qualcomm SM8550 - Cleanup variable init in Allwinner nkm module - Convert various DT bindings to YAML - A few kernel-doc fixes for Samsung SoC clock controllers" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (93 commits) clk: mediatek: add drivers for MT7988 SoC clk: mediatek: add pcw_chg_bit control for PLLs of MT7988 dt-bindings: clock: mediatek: add clock controllers of MT7988 dt-bindings: reset: mediatek: add MT7988 ethwarp reset IDs dt-bindings: clock: mediatek: add MT7988 clock IDs clk: mediatek: mt8188-topckgen: Refactor parents for top_dp/edp muxes clk: mediatek: mt8195-topckgen: Refactor parents for top_dp/edp muxes clk: mediatek: clk-mux: Support custom parent indices for muxes dt-bindings: clock: sophgo: Add clock controller of CV1800 series SoC clk: starfive: jh7100: Add CLK_SET_RATE_PARENT to gmac_tx clk: starfive: Add flags argument to JH71X0__MUX macro clk: imx: pll14xx: change naming of fvco to fout clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks clk: imx: scu: Fix memory leak in __imx_clk_gpr_scu() clk: fixed-rate: fix clk_hw_register_fixed_rate_with_accuracy_parent_hw clk: qcom: dispcc-sm8650: Add test_ctl parameters to PLL config clk: qcom: gpucc-sm8650: Add test_ctl parameters to PLL config clk: qcom: dispcc-sm8550: Use the correct PLL configuration function clk: qcom: dispcc-sm8550: Update disp PLL settings clk: qcom: gpucc-sm8550: Update GPU PLL settings ... commit 576db73424305036a6aa9e40daf7109742fbb1df Merge: 61f4c3e671147 1979a28075470 Author: Linus Torvalds Date: Fri Jan 12 13:35:31 2024 -0800 Merge tag 'gpio-updates-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "We have two new drivers, an assortment of updates and cleanups to many others, and first part of the big rework of the core GPIOLIB that's currently underway. Add to that some code shrink in the character device module and updates to DT bindings and that's pretty much it. Core GPIOLIB: - protect the global list of GPIO devices with a read-write semaphore as it is rarely modified but can be traversed by multiple readers at once - remove GPIO devices from the global list when they are *unregistered* and not when they are *released* (which only happens when the last reference is dropped) as this may lead to a successful lookup of an unregistered device - remove the unnecessary "extra_checks" switch - rename functions that are called with a lock taken - remove duplicate includes Character device handling: - use locking guards to reduce the code size - allocate the big linereq structure using the more suitable kvzalloc() - redulce the size of critical sections - improve documentation - move the debounce_period_us field out of struct gpio_desc New drivers: - Nuvoton NPCM SGPIO driver for BMC NPCM7xx/NPCM8xx - Realtek DHC (Digital Home Center) SoC GPIO driver Driver improvements: - replace gpiochip_is_requested() with a safer alternative in the form of gpiochip_dup_line_label() as the former returns a pointer to a string that can be deleted - implement the dbg_show() callback in gpio-sim - improve the coding style for local variables by removing unnecessary tabs - use generic device properties instead of OF variants in gpio-mmio - use the preferred coding style for __free() in gpio-mockup - reuse PM ops from the gpio-tangier in gpio-elkhartlake - rework PM and use cleanup helpers in gpio-tangier - fix the EIC configuration in gpio-pmic-eic-sprd - remove the unneeded call to platform_set_drvdata() in gpio-sifive - use generic GPIO helpers for driver callbacks in gpio-dwapb - add clock support on certain pins of gpio-ixp4xx - don't use the core-specific DEBUG_GPIO switch in drivers - kerneldoc improvements DT bindings: - add bindings for the new Realtek and Nuvoton devices - allow gpio-ranges in gpio-dwapb - support GPIO hogs in gpio-rockchip - describe the label property in gpio-zynqmp-modepin Other: - header cleanups - forward declarations cleanups" * tag 'gpio-updates-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (55 commits) gpiolib: replace the GPIO device mutex with a read-write semaphore gpiolib: remove the GPIO device from the list when it's unregistered gpio: nuvoton: Add Nuvoton NPCM sgpio driver dt-bindings: gpio: add NPCM sgpio driver bindings gpio: rtd: Add support for Realtek DHC(Digital Home Center) RTD SoCs dt-bindings: gpio: realtek: Add realtek,rtd-gpio gpio: pmic-eic-sprd: Configure the bit corresponding to the EIC through offset gpio: dwapb: Use generic request, free and set_config gpio: sysfs: drop tabs from local variable declarations gpiolib: drop tabs from local variable declarations gpiolib: remove extra_checks gpio: tps65219: don't use CONFIG_DEBUG_GPIO gpiolib: cdev: replace locking wrappers for gpio_device with guards gpiolib: cdev: replace locking wrappers for config_mutex with guards gpiolib: cdev: allocate linereq using kvzalloc() gpiolib: cdev: include overflow.h gpiolib: cdev: reduce locking in gpio_desc_to_lineinfo() gpiolib: cdev: improve documentation of get/set values gpiolib: cdev: fully adopt guard() and scoped_guard() gpiolib: remove debounce_period_us from struct gpio_desc ... commit 61f4c3e6711477b8a347ca5fe89e5e6613e0a147 Merge: 5dfec3cf3efbd 9546b21ea672a Author: Linus Torvalds Date: Fri Jan 12 13:32:30 2024 -0800 Merge tag 'linux-watchdog-6.8-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - Add Mediatek MT7988 watchdog - Add IT8659 watchdog - watchdog: set cdev owner before adding - hpwdt: Only claim UNKNOWN NMI if from iLO - Various other fixes and improvements * tag 'linux-watchdog-6.8-rc1' of git://www.linux-watchdog.org/linux-watchdog: (30 commits) watchdog: mlx_wdt: fix all kernel-doc warnings dt-bindings: watchdog: qcom,pm8916-wdt: add parent spmi node to example dt-bindings: watchdog: nxp,pnx4008-wdt: convert txt to yaml dt-bindings: watchdog: qca,ar7130-wdt: convert txt to yaml dt-bindings: watchdog: intel,keembay: reference common watchdog schema dt-bindings: watchdog: re-order entries to match coding convention watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786 watchdog: it87_wdt: Add IT8659 ID watchdog: it87_wdt: Remove redundant max_units setting watchdog: it87_wdt: add blank line after variable declaration dt-bindings: wdt: Add ts72xx dt-bindings: watchdog: dlg,da9062-watchdog: Document DA9063 watchdog dt-bindings: watchdog: dlg,da9062-watchdog: Add fallback for DA9061 watchdog watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused watchdog: starfive: add lock annotations to fix context imbalances watchdog: mediatek: mt7988: add wdt support dt-bindings: watchdog: mediatek,mtk-wdt: add MT7988 watchdog and toprgu dt-bindings: watchdog: realtek,rtd1295-watchdog: convert txt to yaml watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling watchdog/hpwdt: Remove unused variable ... commit 5dfec3cf3efbd897d774e3b5c08c2f0deaf9b5ad Merge: 7912a6391f3ee 41c71105a845e Author: Linus Torvalds Date: Fri Jan 12 13:27:40 2024 -0800 Merge tag 'hwmon-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "New drivers: - pmbus: Support for MPS Multi-phase mp2856/mp2857 controller - pmbus: Support for MPS Multi-phase mp5990 - Driver for Gigabyte AORUS Waterforce AIO coolers Added support to existing drivers: - lm75: Support for AMS AS6200 temperature sensor - k10temp: Support for AMD Family 19h Model 8h - max31827: Support for max31828 and max31829 - sht3x: Support for sts3x - Add support for WMI SMM interface, and various related improvements. Add support for Optiplex 7000 - emc1403: Support for EMC1442 - npcm750-pwm-fan: Support for NPCM8xx - nct6775: Add support for 2 additional fan controls Minor improvements and bug fixes: - gigabyte_waterforce: Mark status report as received under a spinlock - aquacomputer_d5next: Remove unneeded CONFIG_DEBUG_FS #ifdef - gpio-fan: Convert txt bindings to yaml - smsc47m1: Various cleanups / improvements - corsair-cpro: use NULL instead of 0 - hp-wmi-sensors: Fix failure to load on EliteDesk 800 G6 - tmp513: Various cleanups - peci/dimmtemp: Bump timeout - pc87360: Bounds check data->innr usage - nct6775: Fix fan speed set failure in automatic mode - ABI: sysfs-class-hwmon: document various missing attributes - lm25066, max6650, nct6775: Use i2c_get_match_data() - aspeed-pwm-tacho: Fix -Wstringop-overflow warning" * tag 'hwmon-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (59 commits) hwmon: (gigabyte_waterforce) Mark status report as received under a spinlock hwmon: (lm75) Fix tmp112 default config hwmon: (lm75) Add AMS AS6200 temperature sensor dt-bindings: hwmon: (lm75) Add AMS AS6200 temperature sensor hwmon: (lm75) remove now-unused include hwmon: (pmbus) Add support for MPS Multi-phase mp2856/mp2857 controller dt-bindings: Add MP2856/MP2857 voltage regulator device hwmon: (aquacomputer_d5next) Remove unneeded CONFIG_DEBUG_FS #ifdef dt-bindings: hwmon: gpio-fan: Convert txt bindings to yaml hwmon: (k10temp) Add support for AMD Family 19h Model 8h hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers hwmon: (smsc47m1) Rename global platform device variable hwmon: (smsc47m1) Simplify device registration hwmon: (smsc47m1) Convert to platform remove callback returning void hwmon: (smsc47m1) Mark driver struct with __refdata to prevent section mismatch MAINTAINERS: Add maintainer for Baikal-T1 PVT hwmon driver hwmon: (sht3x) add sts3x support hwmon: (pmbus) Add ltc4286 driver dt-bindings: hwmon: Add lltc ltc4286 driver bindings hwmon: (max31827) Add custom attribute for resolution ... commit 7912a6391f3ee7eb9f9a69227a209d502679bc0c Merge: cf65598d5909a fd38dd6abda58 Author: Linus Torvalds Date: Fri Jan 12 11:55:28 2024 -0800 Merge tag 'sound-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "It was a calm development cycle. There were an ALSA core extension for subformat PCM bits and a few ASoC core changes to support N:M mappings, while the most of remaining changes are driver-specific. Core: - API extensions for properly limiting PCM format bits via subformat - Enhanced support for N:M CPU:CODEC mappings in the core and in audio-graph-card2 ASoC: - Lots of SOF updates: fallback support to older IPC versions, notification on control changes with IPC4. Also supports for ACPI parse for the ES83xx driver that reduces quirks. - Device tree support for describing parts of the card which can be active over suspend (for very low power playback or wake word use cases) - Support for more AMD and Intel systems, NXP i.MX8m MICFIL, Qualcomm SM8250, SM8550, SM8650 and X1E80100 - Drop of Freescale MPC8610 code that is no longer supported HD-audio: - More CS35L41 codec extensions for Dell, HP and Lenovo models - TAS2781 codec extensions for Lenovo and co - New PCM subformat supports Others: - More enhancement for Scarlett2 USB mixer support - Various kselftest fixes" * tag 'sound-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (337 commits) kselftest/alsa - conf: Stringify the printed errno in sysfs_get() kselftest/alsa - mixer-test: Fix the print format specifier warning kselftest/alsa - mixer-test: Fix the print format specifier warning kselftest/alsa - mixer-test: fix the number of parameters to ksft_exit_fail_msg() ALSA: hda/tas2781: annotate calibration data endianness ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP Envy X360 13-ay0xxx ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140 ALSA: ac97: fix build regression ALSA: hda: cs35l41: Support more HP models without _DSD ALSA: hda/tas2781: add fixup for Lenovo 14ARB7 ALSA: hda/tas2781: add TAS2563 support for 14ARB7 ALSA: hda/tas2781: add configurable global i2c address ALSA: hda/tas2781: add ptrs to calibration functions ALSA: hda: Add driver properties for cs35l41 for Lenovo Legion Slim 7 Gen 8 serie ALSA: hda/realtek: enable SND_PCI_QUIRK for Lenovo Legion Slim 7 Gen 8 (2023) serie ALSA: hda/tas2781: configure the amp after firmware load ALSA: mark all struct bus_type as const ASoC: pxa: sspa: Don't select SND_ARM ASoC: rt5663: cancel the work when system suspends ALSA: scarlett2: Add PCM Input Switch for Solo Gen 4 ... commit cf65598d5909acf5e7b7dc9e21786e386356bc81 Merge: 70d201a40823a b76c01f1d9504 Author: Linus Torvalds Date: Fri Jan 12 11:32:19 2024 -0800 Merge tag 'drm-next-2024-01-10' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "This contains two major new drivers: - imagination is a first driver for Imagination Technologies devices, it only covers very specific devices, but there is hope to grow it - xe is a reboot of the i915 GPU (shares display) side using a more upstream focused development model, and trying to maximise code sharing. It's not enabled for any hw by default, and will hopefully get switched on for Intel's Lunarlake. This also drops a bunch of the old UMS ioctls. It's been dead long enough. amdgpu has a bunch of new color management code that is being used in the Steam Deck. amdgpu also has a new ACPI WBRF interaction to help avoid radio interference. Otherwise it's the usual lots of changes in lots of places. Detailed summary: new drivers: - imagination - new driver for Imagination Technologies GPU - xe - new driver for Intel GPUs using core drm concepts core: - add CLOSE_FB ioctl - remove old UMS ioctls - increase max objects to accomodate AMD color mgmt encoder: - create per-encoder debugfs directory edid: - split out drm_eld - SAD helpers - drop edid_firmware module parameter format-helper: - cache format conversion buffers sched: - move from kthread to workqueue - rename some internals - implement dynamic job-flow control gpuvm: - provide more features to handle GEM objects client: - don't acquire module reference displayport: - add mst path property documentation fdinfo: - alignment fix dma-buf: - add fence timestamp helper - add fence deadline support bridge: - transparent aux-bridge for DP/USB-C - lt8912b: add suspend/resume support and power regulator support panel: - edp: AUO B116XTN02, BOE NT116WHM-N21,836X2, NV116WHM-N49 - chromebook panel support - elida-kd35t133: rework pm - powkiddy RK2023 panel - himax-hx8394: drop prepare/unprepare and shutdown logic - BOE BP101WX1-100, Powkiddy X55, Ampire AM8001280G - Evervision VGG644804, SDC ATNA45AF01 - nv3052c: register docs, init sequence fixes, fascontek FS035VG158 - st7701: Anbernic RG-ARC support - r63353 panel controller - Ilitek ILI9805 panel controller - AUO G156HAN04.0 simplefb: - support memory regions - support power domains amdgpu: - add new 64-bit sequence number infrastructure - add AMD specific color management - ACPI WBRF support for RF interference handling - GPUVM updates - RAS updates - DCN 3.5 updates - Rework PCIe link speed handling - Document GPU reset types - DMUB fixes - eDP fixes - NBIO 7.9/7.11 updates - SubVP updates - XGMI PCIe state dumping for aqua vanjaram - GFX11 golden register updates - enable tunnelling on high pri compute amdkfd: - Migrate TLB flushing logic to amdgpu - Trap handler fixes - Fix restore workers handling on suspend/resume - Fix possible memory leak in pqm_uninit() - support import/export of dma-bufs using GEM handles radeon: - fix possible overflows in command buffer checking - check for errors in ring_lock i915: - reorg display code for reuse in xe driver - fdinfo memory stats printing - DP MST bandwidth mgmt improvements - DP panel replay enabling - MTL C20 phy state verification - MTL DP DSC fractional bpp support - Audio fastset support - use dma_fence interfaces instead of i915_sw_fence - Separate gem and display code - AUX register macro refactoring - Separate display module/device parameters - Move display capabilities debugfs under display - Makefile cleanups - Register cleanups - Move display lock inits under display/ - VLV/CHV DPIO PHY register and interface refactoring - DSI VBT sequence refactoring - C10/C20 PHY PLL hardware readout - DPLL code cleanups - Cleanup PXP plane protection checks - Improve display debug msgs - PSR selective fetch fixes/improvements - DP MST fixes - Xe2LPD FBC restrictions removed - DGFX uses direct VBT pin mapping - more MTL WAs - fix MTL eDP bug - eliminate use of kmap_atomic habanalabs: - sysfs entry to identify a device minor id with debugfs path - sysfs entry to expose device module id - add signed device info retrieval through INFO ioctl - add Gaudi2C device support - pcie reset prepare/done hooks msm: - Add support for SDM670, SM8650 - Handle the CFG interconnect to fix the obscure hangs / timeouts - Kconfig fix for QMP dependency - use managed allocators - DPU: SDM670, SM8650 support - DPU: Enable SmartDMA on SM8350 and SM8450 - DP: enable runtime PM support - GPU: add metadata UAPI - GPU: move devcoredumps to GPU device - GPU: convert to drm_exec ivpu: - update FW API - new debugfs file - a new NOP job submission test mode - improve suspend/resume - PM improvements - MMU PT optimizations - firmware profile frequency support - support for uncached buffers - switch to gem shmem helpers - replace kthread with threaded irqs rockchip: - rk3066_hdmi: convert to atomic - vop2: support nv20 and nv30 - rk3588 support mediatek: - use devm_platform_ioremap_resource - stop using iommu_present - MT8188 VDOSYS1 display support panfrost: - PM improvements - improve interrupt handling as poweroff qaic: - allow to run with single MSI - support host/device time sync - switch to persistent DRM devices exynos: - fix potential error pointer dereference - fix wrong error checking - add missing call to drm_atomic_helper_shutdown omapdrm: - dma-fence lockdep annotation fix tidss: - dma-fence lockdep annotation fix - support for AM62A7 v3d: - BCM2712 - rpi5 support - fdinfo + gputop support - uapi for CPU job handling virtio-gpu: - add context debug name" * tag 'drm-next-2024-01-10' of git://anongit.freedesktop.org/drm/drm: (2340 commits) drm/amd/display: Allow z8/z10 from driver drm/amd/display: fix bandwidth validation failure on DCN 2.1 drm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well drm/amd/display: Move fixpt_from_s3132 to amdgpu_dm drm/amd/display: Fix recent checkpatch errors in amdgpu_dm Revert "drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole" drm/amd/display: avoid stringop-overflow warnings for dp_decide_lane_settings() drm/amd/display: Fix power_helpers.c codestyle drm/amd/display: Fix hdcp_log.h codestyle drm/amd/display: Fix hdcp2_execution.c codestyle drm/amd/display: Fix hdcp_psp.h codestyle drm/amd/display: Fix freesync.c codestyle drm/amd/display: Fix hdcp_psp.c codestyle drm/amd/display: Fix hdcp1_execution.c codestyle drm/amd/pm/smu7: fix a memleak in smu7_hwmgr_backend_init drm/amdkfd: Fix iterator used outside loop in 'kfd_add_peer_prop()' drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()' drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c drm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()' drm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()' ... commit 9320fc509b87b4d795fb37112931e2f4f8b5c55f Author: Uwe Kleine-König Date: Sat Jan 6 15:13:03 2024 +0100 pwm: jz4740: Don't use dev_err_probe() in .request() dev_err_probe() is only supposed to be used in probe functions. While it probably doesn't hurt, both the EPROBE_DEFER handling and calling device_set_deferred_probe_reason() are conceptually wrong in the request callback. So replace the call by dev_err() and a separate return statement. This effectively reverts commit c0bfe9606e03 ("pwm: jz4740: Simplify with dev_err_probe()"). Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240106141302.1253365-2-u.kleine-koenig@pengutronix.de Fixes: c0bfe9606e03 ("pwm: jz4740: Simplify with dev_err_probe()") Cc: stable@vger.kernel.org Signed-off-by: Uwe Kleine-König commit a297d07b9a1e4fb8cda25a4a2363a507d294b7c9 Author: Uwe Kleine-König Date: Tue Jan 9 22:34:31 2024 +0100 pwm: Fix out-of-bounds access in of_pwm_single_xlate() With args->args_count == 2 args->args[2] is not defined. Actually the flags are contained in args->args[1]. Fixes: 3ab7b6ac5d82 ("pwm: Introduce single-PWM of_xlate function") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/243908750d306e018a3d4bf2eb745d53ab50f663.1704835845.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 678164a5f0ecd6e0134ce246d64ae7345f8de59c Author: Sean Young Date: Fri Dec 22 13:13:11 2023 +0000 pwm: bcm2835: Remove duplicate call to clk_rate_exclusive_put() devm_add_action_or_reset() already calls the action in the error case. Reported-by: Uwe Kleine-König Closes: https://lore.kernel.org/linux-pwm/fuku3b5ur6y4k4refd3vmeoenzjo6mwe3b3gtel34rhhhtvnsa@w4uktgbqsc3w/ Fixes: fcc760729359 ("pwm: bcm2835: Allow PWM driver to be used in atomic context") Signed-off-by: Sean Young Reviewed-by: Uwe Kleine-König Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20231222131312.174491-1-sean@mess.org Signed-off-by: Uwe Kleine-König commit 454abb80e26ab85323a30e52aa7b0ee9aae1d38a Author: Amadeusz Sławiński Date: Fri Jan 12 12:33:49 2024 +0100 ALSA: hda: Properly setup HDMI stream Since commit 4005d1ba0a7e ("ASoC: soc-dai: don't call PCM audio ops if the stream is not supported") HDMI playback is broken with avs driver. This happens because for HDMI stream (unlike generic HDA one) channels_min for stream is not set when creating PCMs. Fix this by setting the value based on first available converter. Fixes: 4005d1ba0a7e ("ASoC: soc-dai: don't call PCM audio ops if the stream is not supported") Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20240112113349.2905328-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Takashi Iwai commit 309ce6741430b5a7b5e85cd1a7569647f8d9dfa6 Author: Christoph Hellwig Date: Thu Jan 11 14:57:04 2024 +0100 blk-mq: rename blk_mq_can_use_cached_rq blk_mq_can_use_cached_rq doesn't just check if we can use the request, but also performs the work to actually use it. Remove the _can in the naming, and improve the comment describing the function. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240111135705.2155518-2-hch@lst.de Signed-off-by: Jens Axboe commit 25c1772a0493463408489b1fae65cf77fe46cac1 Author: Christian Heusel Date: Fri Jan 12 00:15:18 2024 +0100 block: print symbolic error name instead of error code Utilize the %pe print specifier to get the symbolic error name as a string (i.e "-ENOMEM") in the log message instead of the error code to increase its readablility. This change was suggested in https://lore.kernel.org/all/92972476-0b1f-4d0a-9951-af3fc8bc6e65@suswa.mountain/ Signed-off-by: Christian Heusel Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20240111231521.1596838-1-christian@heusel.eu Signed-off-by: Jens Axboe commit 5266caaf5660529e3da53004b8b7174cab6374ed Author: Ming Lei Date: Fri Jan 12 20:26:26 2024 +0800 blk-mq: fix IO hang from sbitmap wakeup race In blk_mq_mark_tag_wait(), __add_wait_queue() may be re-ordered with the following blk_mq_get_driver_tag() in case of getting driver tag failure. Then in __sbitmap_queue_wake_up(), waitqueue_active() may not observe the added waiter in blk_mq_mark_tag_wait() and wake up nothing, meantime blk_mq_mark_tag_wait() can't get driver tag successfully. This issue can be reproduced by running the following test in loop, and fio hang can be observed in < 30min when running it on my test VM in laptop. modprobe -r scsi_debug modprobe scsi_debug delay=0 dev_size_mb=4096 max_queue=1 host_max_queue=1 submit_queues=4 dev=`ls -d /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*/block/* | head -1 | xargs basename` fio --filename=/dev/"$dev" --direct=1 --rw=randrw --bs=4k --iodepth=1 \ --runtime=100 --numjobs=40 --time_based --name=test \ --ioengine=libaio Fix the issue by adding one explicit barrier in blk_mq_mark_tag_wait(), which is just fine in case of running out of tag. Cc: Jan Kara Cc: Kemeng Shi Reported-by: Changhui Zhong Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20240112122626.4181044-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 7afc0e7f681e6efd6b826f003fc14c17b5093643 Author: Uwe Kleine-König Date: Fri Dec 22 06:56:39 2023 +0100 MAINTAINERS: pwm: Thierry steps down, Uwe takes over It's not easy to let go responsibility for a subsystem that one cared for for a long time, but Thierry realized that his heart isn't in the pwm framework any more. Thierry cared for the pwm subsystem (commit 200efedd8766 ("pwm: Take over maintainership of the PWM subsystem")) as a maintainer during nearly 12 years. A big thanks for the time, effort and dedication spend during that time. Uwe takes over maintenance. Reviewed-by: Neil Armstrong Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 6dcb35088e264306b948141971286257681ca412 Author: Dan Carpenter Date: Fri Jan 12 17:30:18 2024 +0300 thermal/debugfs: Unlock on error path in thermal_debug_tz_trip_up() Add a missing mutex_unlock(&thermal_dbg->lock) to this error path. Fixes: 7ef01f228c9f ("thermal/debugfs: Add thermal debugfs information for mitigation episodes") Signed-off-by: Dan Carpenter Signed-off-by: Rafael J. Wysocki commit 97566d09fd02d2ab329774bb89a2cdf2267e86d9 Author: Ricardo Neri Date: Tue Jan 9 19:07:04 2024 -0800 thermal: intel: hfi: Add syscore callbacks for system-wide PM The kernel allocates a memory buffer and provides its location to the hardware, which uses it to update the HFI table. This allocation occurs during boot and remains constant throughout runtime. When resuming from hibernation, the restore kernel allocates a second memory buffer and reprograms the HFI hardware with the new location as part of a normal boot. The location of the second memory buffer may differ from the one allocated by the image kernel. When the restore kernel transfers control to the image kernel, its HFI buffer becomes invalid, potentially leading to memory corruption if the hardware writes to it (the hardware continues to use the buffer from the restore kernel). It is also possible that the hardware "forgets" the address of the memory buffer when resuming from "deep" suspend. Memory corruption may also occur in such a scenario. To prevent the described memory corruption, disable HFI when preparing to suspend or hibernate. Enable it when resuming. Add syscore callbacks to handle the package of the boot CPU (packages of non-boot CPUs are handled via CPU offline). Syscore ops always run on the boot CPU. Additionally, HFI only needs to be disabled during "deep" suspend and hibernation. Syscore ops only run in these cases. Cc: 6.1+ # 6.1+ Signed-off-by: Ricardo Neri [ rjw: Comment adjustment, subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit e95fa7404716f6e25021e66067271a4ad8eb1486 Author: Di Shen Date: Wed Jan 10 19:55:26 2024 +0800 thermal: gov_power_allocator: avoid inability to reset a cdev Commit 0952177f2a1f ("thermal/core/power_allocator: Update once cooling devices when temp is low") adds an update flag to avoid triggering a thermal event when there is no need, and the thermal cdev is updated once when the temperature is low. But when the trips are writable, and switch_on_temp is set to be a higher value, the cooling device state may not be reset to 0, because last_temperature is smaller than switch_on_temp. For example: First: switch_on_temp=70 control_temp=85; Then userspace change the trip_temp: switch_on_temp=45 control_temp=55 cur_temp=54 Then userspace reset the trip_temp: switch_on_temp=70 control_temp=85 cur_temp=57 last_temp=54 At this time, the cooling device state should be reset to 0. However, because cur_temp(57) < switch_on_temp(70) last_temp(54) < switch_on_temp(70) ----> update = false, update is false, the cooling device state can not be reset. Using the observation that tz->passive can also be regarded as the temperature status, set the update flag to the tz->passive value. When the temperature drops below switch_on for the first time, the states of cooling devices can be reset once, and tz->passive is updated to 0. In the next round, because tz->passive is 0, cdev->state will not be updated. By using the tz->passive value as the "update" flag, the issue above can be solved, and the cooling devices can be updated only once when the temperature is low. Fixes: 0952177f2a1f ("thermal/core/power_allocator: Update once cooling devices when temp is low") Cc: 5.13+ # 5.13+ Suggested-by: Wei Wang Signed-off-by: Di Shen Reviewed-by: Lukasz Luba [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit fd881eac3af6c4e36b34ce92d69fb1d7e95f5920 Author: Rafael J. Wysocki Date: Tue Jan 9 17:42:48 2024 +0100 thermal: helpers: Rearrange thermal_cdev_set_cur_state() Change the code layout in thermal_cdev_set_cur_state() so it returns early on errors which is more consistent with what happens elsewhere. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Daniel Lezcano commit 11fde939314836c4375b567d60407d752d987069 Author: Rafael J. Wysocki Date: Tue Jan 9 17:42:04 2024 +0100 thermal: netlink: Rework notify API for cooling devices In analogy with some previous thermal netlink API changes, redefine thermal_notify_cdev_state_update(), thermal_notify_cdev_add() and thermal_notify_cdev_delete() to take a const cdev pointer as their first argument and let them extract the requisite information from there by themselves. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Daniel Lezcano commit 57a427c81c322c5f0cdfe7c46cdee553d18b1ec6 Author: Christophe JAILLET Date: Fri Jan 5 14:45:11 2024 +0100 thermal: core: Use kstrdup_const() during cooling device registration Some *thermal_cooling_device_register() calls pass a string literal as the 'type' parameter, so kstrdup_const() can be used instead of kstrdup() to avoid a memory allocation in such cases. Signed-off-by: Christophe JAILLET [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 7ef01f228c9f54c6260319858be138a8a7e9e704 Author: Daniel Lezcano Date: Tue Jan 9 10:41:12 2024 +0100 thermal/debugfs: Add thermal debugfs information for mitigation episodes The mitigation episodes are recorded. A mitigation episode happens when the first trip point is crossed the way up and then the way down. During this episode other trip points can be crossed also and are accounted for this mitigation episode. The interesting information is the average temperature at the trip point, the undershot and the overshot. The standard deviation of the mitigated temperature will be added later. The thermal debugfs directory structure tries to stay consistent with the sysfs one but in a very simplified way: thermal/ `-- thermal_zones |-- 0 | `-- mitigations `-- 1 `-- mitigations The content of the mitigations file has the following format: ,-Mitigation at 349988258us, duration=130136ms | trip | type | temp(°mC) | hyst(°mC) | duration | avg(°mC) | min(°mC) | max(°mC) | | 0 | passive | 65000 | 2000 | 130136 | 68227 | 62500 | 75625 | | 1 | passive | 75000 | 2000 | 104209 | 74857 | 71666 | 77500 | ,-Mitigation at 272451637us, duration=75000ms | trip | type | temp(°mC) | hyst(°mC) | duration | avg(°mC) | min(°mC) | max(°mC) | | 0 | passive | 65000 | 2000 | 75000 | 68561 | 62500 | 75000 | | 1 | passive | 75000 | 2000 | 60714 | 74820 | 70555 | 77500 | ,-Mitigation at 238184119us, duration=27316ms | trip | type | temp(°mC) | hyst(°mC) | duration | avg(°mC) | min(°mC) | max(°mC) | | 0 | passive | 65000 | 2000 | 27316 | 73377 | 62500 | 75000 | | 1 | passive | 75000 | 2000 | 19468 | 75284 | 69444 | 77500 | ,-Mitigation at 39863713us, duration=136196ms | trip | type | temp(°mC) | hyst(°mC) | duration | avg(°mC) | min(°mC) | max(°mC) | | 0 | passive | 65000 | 2000 | 136196 | 73922 | 62500 | 75000 | | 1 | passive | 75000 | 2000 | 91721 | 74386 | 69444 | 78125 | More information for a better understanding of the thermal behavior will be added after. The idea is to give detailed statistics information about the undershots and overshots, the temperature speed, etc... As all the information in a single file is too much, the idea would be to create a directory named with the mitigation timestamp where all data could be added. Please note this code is immune against trip ordering but not against a trip temperature change while a mitigation is happening. However, this situation should be extremely rare, perhaps not happening and we might question ourselves if something should be done in the core framework for other components first. Signed-off-by: Daniel Lezcano [ rjw: White space fixups, rebase ] Signed-off-by: Rafael J. Wysocki commit 755113d7678681a137c330f7997ceb680adb644e Author: Daniel Lezcano Date: Tue Jan 9 10:41:11 2024 +0100 thermal/debugfs: Add thermal cooling device debugfs information The thermal framework does not have any debug information except a sysfs stat which is a bit controversial. This one allocates big chunks of memory for every cooling devices with a high number of states and could represent on some systems in production several megabytes of memory for just a portion of it. As the sysfs is limited to a page size, the output is not exploitable with large data array and gets truncated. The patch provides the same information than sysfs except the transitions are dynamically allocated, thus they won't show more events than the ones which actually occurred. There is no longer a size limitation and it opens the field for more debugging information where the debugfs is designed for, not sysfs. The thermal debugfs directory structure tries to stay consistent with the sysfs one but in a very simplified way: thermal/ -- cooling_devices |-- 0 | |-- clear | |-- time_in_state_ms | |-- total_trans | `-- trans_table |-- 1 | |-- clear | |-- time_in_state_ms | |-- total_trans | `-- trans_table |-- 2 | |-- clear | |-- time_in_state_ms | |-- total_trans | `-- trans_table |-- 3 | |-- clear | |-- time_in_state_ms | |-- total_trans | `-- trans_table `-- 4 |-- clear |-- time_in_state_ms |-- total_trans `-- trans_table The content of the files in the cooling devices directory is the same as the sysfs one except for the trans_table which has the following format: Transition Hits 1->0 246 0->1 246 2->1 632 1->2 632 3->2 98 2->3 98 Signed-off-by: Daniel Lezcano [ rjw: White space fixups, rebase ] Signed-off-by: Rafael J. Wysocki commit 7ea26f9460c6c76b1d6e36f39fce34b16cb88300 Author: Amir Goldstein Date: Tue Jan 9 20:22:45 2024 +0200 fsnotify: compile out fsnotify permission hooks if !FANOTIFY_ACCESS_PERMISSIONS The depency of FANOTIFY_ACCESS_PERMISSIONS on SECURITY made sure that the fsnotify permission hooks were never called when SECURITY was disabled. Moving the fsnotify permission hook out of the secutiy hook broke that optimisation. Reported-and-tested-by: Jens Axboe Closes: https://lore.kernel.org/linux-fsdevel/53682ece-f0e7-48de-9a1c-879ee34b0449@kernel.dk/ Fixes: d9e5d31084b0 ("fsnotify: optionally pass access range in file permission hooks") Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20240109182245.38884-1-amir73il@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 301bda18ac735eaaad5823dbdd067b3b2728c780 Author: Kuninori Morimoto Date: Fri Jan 12 06:10:15 2024 +0000 ASoC: audio-graph-card2: fix index check on graph_parse_node_multi_nm() commit d685aea5e0a8 ("ASoC: audio-graph-card2: fix off by one in graph_parse_node_multi_nm()") uses ">=" instead of ">" for index check, but it was wrong. The nm_idx will be increment at end of loop, thus, ">" is correct. while (1) { ... => if (*nm_idx > nm_max) break; ... (*nm_idx)++; } Without this patch, "Multi-Codec-1" sample on ${LINUX}/sound/soc/generic/audio-graph-card2-custom-sample.dtsi will be error. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/87o7drdqux.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 813c2f2925ee9c10dc4acd5aa7410cd3357e8da8 Author: Peter Ujfalusi Date: Fri Jan 12 15:27:49 2024 +0200 ASoC: SOF: icp3-dtrace: Revert "Fix wrong kfree() usage" The offending patch introduces memory leak when there is no error, the memory allocated for the temporary storage is not freed up. As I have commented, the original code was correct and cleaner to follow but it was not obvious from the patch that it will introduce regression. Fixes: 8c91ca76f448 ("ASoC: SOF: icp3-dtrace: Fix wrong kfree() usage") Link: https://lore.kernel.org/all/aec61f67-6b4f-49e6-b458-c332983a0ad6@linux.intel.com/ Signed-off-by: Peter Ujfalusi Link: https://msgid.link/r/20240112132749.28970-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3046a1091137f55de473262b7f3a04c45f87873a Author: Thomas Richter Date: Thu Nov 16 12:12:12 2023 +0100 s390/pai_ext: split function paiext_push_sample Split function paiext_push_sample() into two parts. The first part determines the number of bytes to store as raw data in the perf sample record. This is now function paiext_have_sample(). The second part stores the raw data in the perf event's ring buffer. No functional change. Signed-off-by: Thomas Richter Reviewed-by: Mete Durlu Signed-off-by: Alexander Gordeev commit 0dade41d16132ac11ac9e3ac0b0313d438037224 Author: Thomas Richter Date: Thu Nov 16 10:43:14 2023 +0100 s390/pai_ext: rework function paiext_copy argments Change the function paiext_copy() parameter from a pointer to a structure to two pointers to memory areas referenced. The other members of that structure are not needed. Signed-off-by: Thomas Richter Acked-by: Mete Durlu Signed-off-by: Alexander Gordeev commit cb1259b7b574bd90ef22dac2c6282327cdae31c6 Author: Thomas Richter Date: Wed Nov 15 11:04:25 2023 +0100 s390/pai: rework paiXXX_start and paiXXX_stop functions The PAI crypto counter and PAI NNPA counters start and stop functions are streamlined. Move the conditions to invoke start and stop functions to its respective function body and call them unconditionally. The start and stop functions now determine how to proceed. No functional change. Signed-off-by: Thomas Richter Acked-by: Mete Durlu Signed-off-by: Alexander Gordeev commit 0578a54110ff28dc2b3830e90ad2dd9c1e065e90 Author: Thomas Richter Date: Tue Nov 14 12:00:38 2023 +0100 s390/pai_crypto: split function paicrypt_push_sample Split function paicrypt_push_sample() into two parts. The first part determines the number of bytes to store as raw data in the perf sample record. The second part stores the raw data in the perf event's ring buffer. No functional change. Signed-off-by: Thomas Richter Acked-by: Mete Durlu Signed-off-by: Alexander Gordeev commit 8d0e8a8aa3a1e844b7a969e9fe80937667507c6c Author: Thomas Richter Date: Tue Nov 14 10:53:22 2023 +0100 s390/pai: rework paixxxx_getctr interface Simplify the interface for functions paicrypt_getctr() and paiext_getctr(). Change the first parameter from a pointer to a structure to a pointer to a structure member. The other members of the structure are not needed. No functional change. Signed-off-by: Thomas Richter Acked-by: Mete Durlu Signed-off-by: Alexander Gordeev commit f827bcdafa2a2ac21c91e47f587e8d0c76195409 Author: Rob Herring Date: Wed Jan 10 11:29:21 2024 -0600 arm64: errata: Add Cortex-A510 speculative unprivileged load workaround Implement the workaround for ARM Cortex-A510 erratum 3117295. On an affected Cortex-A510 core, a speculatively executed unprivileged load might leak data from a privileged load via a cache side channel. The issue only exists for loads within a translation regime with the same translation (e.g. same ASID and VMID). Therefore, the issue only affects the return to EL0. The erratum and workaround are the same as ARM Cortex-A520 erratum 2966298, so reuse the existing workaround. Cc: stable@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Mark Rutland Link: https://lore.kernel.org/r/20240110-arm-errata-a510-v1-2-d02bc51aeeee@kernel.org Signed-off-by: Will Deacon commit 546b7cde9b1dd36089649101b75266564600ffe5 Author: Rob Herring Date: Wed Jan 10 11:29:20 2024 -0600 arm64: Rename ARM64_WORKAROUND_2966298 In preparation to apply ARM64_WORKAROUND_2966298 for multiple errata, rename the kconfig and capability. No functional change. Cc: stable@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Mark Rutland Link: https://lore.kernel.org/r/20240110-arm-errata-a510-v1-1-d02bc51aeeee@kernel.org Signed-off-by: Will Deacon commit 3931261ecf46151a5e779c96fb3da00677b6dc37 Author: Ard Biesheuvel Date: Thu Jan 11 12:24:48 2024 +0100 arm64: fpsimd: Bring cond_yield asm macro in line with new rules We no longer disable softirqs or preemption when doing kernel mode SIMD, and so for fully preemptible kernels, there is no longer a need to do any explicit yielding (and for non-preemptible kernels, yielding is not needed either). That leaves voluntary preemption, where only explicit yield calls may result in a reschedule. To retain the existing behavior for such a configuration, we should take the new situation into account, where the preempt count will be zero rather than one, and yielding to pending softirqs is unnecessary. Fixes: aefbab8e77eb ("arm64: fpsimd: Preserve/restore kernel mode NEON at context switch") Signed-off-by: Ard Biesheuvel Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20240111112447.577640-2-ardb+git@google.com Signed-off-by: Will Deacon commit 8c5a19cb17a71e52303150335b459c7d2d28a155 Author: Ard Biesheuvel Date: Wed Jan 10 14:26:20 2024 +0100 arm64: scs: Work around full LTO issue with dynamic SCS Full LTO takes the '-mbranch-protection=none' passed to the compiler when generating the dynamic shadow call stack patching code as a hint to stop emitting PAC instructions altogether. (Thin LTO appears unaffected by this) Work around this by stripping unwind tables from the object in question, which should be sufficient to prevent the patching code from attempting to patch itself. Fixes: 3b619e22c460 ("arm64: implement dynamic shadow call stack for Clang") Signed-off-by: Ard Biesheuvel Reviewed-by: Sami Tolvanen Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20240110132619.258809-2-ardb+git@google.com Signed-off-by: Will Deacon commit b95df3bd1ea31fadc9e1471a036b4c08199aa0f0 Author: Tudor Ambarus Date: Wed Jan 10 07:40:07 2024 +0000 arm64: irq: include Sorting include files in alphabetic order in drivers/tty/serial/samsung.c revealed the following error: In file included from drivers/tty/serial/samsung_tty.c:24: ./arch/arm64/include/asm/irq.h:9:43: error: unknown type name ‘cpumask_t’ 9 | void arch_trigger_cpumask_backtrace(const cpumask_t *mask, int exclude_cpu); | ^~~~~~~~~ Include cpumask.h to avoid unknown type errors for parents of irq.h that don't include cpumask.h. Acked-by: Mark Rutland Signed-off-by: Tudor Ambarus Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20240110074007.4020016-1-tudor.ambarus@linaro.org Signed-off-by: Will Deacon commit 907ee6681788556b9ade3ad0a1f6f4aea192399c Author: Jakub Kicinski Date: Thu Jan 11 11:33:11 2024 -0800 net: fill in MODULE_DESCRIPTION()s for wx_lib W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add a description to Wangxun's common code lib. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 689237ab37c59b9909bc9371d7fece3081683fba Author: Thomas Zimmermann Date: Fri Jan 5 10:10:36 2024 +0100 fbdev/intelfb: Remove driver From looking at the PCI IDs, every device supported by intelfb is also supported by i915. Anyone still using intelfb should please move on to i915, which does everything intelfb does but better. Removing intelfb is motivated by the driver's excessive use of the global screen_info state. The state belongs to architecture and firmware code; device drivers should not attempt to access it. But fixing intelfb would require a significant change in the driver's probing logic. As intelfb has been obsolete for nearly 2 decades, it is probably not worth the effort. Let's just remove it. Also remove the related documentation. Signed-off-by: Thomas Zimmermann Acked-by: Maik Broemme Signed-off-by: Helge Deller commit c25a19afb81cfd73dab494ba64f9a434cf1a4499 Author: Thomas Zimmermann Date: Wed Jan 3 11:15:12 2024 +0100 fbdev/hyperv_fb: Do not clear global screen_info Do not clear the global instance of screen_info. If necessary, clearing fields in screen_info should be done by architecture or firmware code that maintains the firmware framebuffer. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Helge Deller commit df67699c9cb0ceb70f6cc60630ca938c06773eda Author: Thomas Zimmermann Date: Wed Jan 3 11:15:11 2024 +0100 firmware/sysfb: Clear screen_info state after consuming it After consuming the global screen_info_state in sysfb_init(), the created platform device maintains the firmware framebuffer. Clear screen_info to avoid conflicting access. Subsequent kexec reboots now ignore the firmware framebuffer. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Helge Deller commit 0aa0838c84da22cd50d8a92fac26637c630a3235 Author: Thomas Zimmermann Date: Wed Jan 3 11:15:10 2024 +0100 fbdev/hyperv_fb: Remove firmware framebuffers with aperture helpers Replace use of screen_info state with the correct interfaces from the aperture helpers. The state is only for architecture and firmware code. It is not guaranteed to contain valid data. Drivers are thus not allowed to use it. For removing conflicting firmware framebuffers, there are aperture helpers. Hence replace screen_info with the correct functions that will remove conflicting framebuffers for the hypervfb driver. For GEN1 PCI devices, the driver reads the framebuffer base and size from the PCI BAR, and uses the range for removing the firmware framebuffer. For GEN2 VMBUS devices no range can be detected, so the driver clears all firmware framebuffers. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Helge Deller commit 778e73d2411abc8f3a2d60dbf038acaec218792e Author: Thomas Zimmermann Date: Wed Jan 3 11:15:09 2024 +0100 drm/hyperv: Remove firmware framebuffers with aperture helper Replace use of screen_info state with the correct interface from the aperture helpers. The state is only for architecture and firmware code. It is not guaranteed to contain valid data. Drivers are thus not allowed to use it. For removing conflicting firmware framebuffers, there are aperture helpers. Hence replace screen_info with the correct function that will remove conflicting framebuffers for the hyperv-drm driver. Also move the call to the correct place within the driver. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Signed-off-by: Helge Deller commit 7452b319bd30d02c9e353d11206410fd66a67efa Author: Thomas Zimmermann Date: Wed Jan 3 13:13:25 2024 +0100 fbdev/sis: Remove dependency on screen_info When built-in, the sis driver tries to detect the current display mode from the global screen_info state. That state is only for architecture and firmware code. Drivers should not use it directly as it's not guaranteed to contain valid information. Remove the mode-detection code from sis. Drivers that want to detect a pre-set mode on probe should read the hardware registers directly. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 29328fb06cee0f984c796c7451408b00e5681a6b Author: Colin Ian King Date: Tue Dec 19 15:14:36 2023 +0000 video/logo: use %u format specifier for unsigned int values Currently the %d format specifier is being used for unsigned int values. Fix this by using the correct %u format specifier. Cleans up cppcheck warnings: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] Signed-off-by: Colin Ian King Reviewed-by: Randy Dunlap Signed-off-by: Helge Deller commit e2e0b838a1849f92612a8305c09aaf31bf824350 Author: Thomas Zimmermann Date: Wed Dec 20 14:22:57 2023 +0100 video/sticore: Remove info field from STI struct The info field in struct sti_struct was used to detect the default display device. That test is now done with the respective Linux device and the info field is unused. Remove it. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit ca6c080eef42e4149110f79cf73a48a6ec4e965d Author: Thomas Zimmermann Date: Wed Dec 20 14:22:56 2023 +0100 arch/parisc: Detect primary video device from device instance Update fb_is_primary device() on parisc to detect the primary display device from the Linux device instance. Aligns the code with the other architectures. A later patch will remove the fbdev dependency from the function's interface. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit b362179731f0b59b8108b6afb95262ec88279759 Author: Thomas Zimmermann Date: Wed Dec 20 14:22:55 2023 +0100 fbdev/stifb: Allocate fb_info instance with framebuffer_alloc() Allocate stifb's instance of fb_info with framebuffer_alloc(). This is the preferred way of creating fb_info with associated driver data stored in struct fb_info.par. Requires several, but minor, changes through out the driver's code. The intended side effect of this patch is that the new instance of struct fb_info now has its device field correctly set to the parent device of the STI ROM. A later patch can detect if the device is the firmware's primary output. It is also now correctly located within the Linux device hierarchy. Signed-off-by: Thomas Zimmermann Tested-by: Helge Deller Reviewed-by: Helge Deller Signed-off-by: Helge Deller commit 12b8de566fa9ec428e724f955735fd1ca278ca4c Author: Thomas Zimmermann Date: Wed Dec 20 14:22:54 2023 +0100 video/sticore: Store ROM device in STI struct Store the ROM's parent device in each STI struct, so we can associate the STI framebuffer with a device. The new field will eventually replace the fbdev subsystem's info field, which the function fb_is_primary_device() currently requires to detect the firmware's output. By using the device instead of the framebuffer info, a later patch can generalize the helper for use in non-fbdev code. Signed-off-by: Thomas Zimmermann Signed-off-by: Helge Deller commit 33cd6ea9c0673517cdb06ad5c915c6f22e9615fc Author: Nam Cao Date: Mon Dec 18 10:57:31 2023 +0100 fbdev: flush deferred IO before closing When framebuffer gets closed, the queued deferred IO gets cancelled. This can cause some last display data to vanish. This is problematic for users who send a still image to the framebuffer, then close the file: the image may never appear. To ensure none of display data get lost, flush the queued deferred IO first before closing. Another possible solution is to delete the cancel_delayed_work_sync() instead. The difference is that the display may appear some time after closing. However, the clearing of page mapping after this needs to be removed too, because the page mapping is used by the deferred work. It is not completely obvious whether it is okay to not clear the page mapping. For a patch intended for stable trees, go with the simple and obvious solution. Fixes: 60b59beafba8 ("fbdev: mm: Deferred IO support") Cc: stable@vger.kernel.org Signed-off-by: Nam Cao Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Helge Deller commit 15e4c1f462279b4e128f27de48133e0debe9e0df Author: Nam Cao Date: Mon Dec 18 10:57:30 2023 +0100 fbdev: flush deferred work in fb_deferred_io_fsync() The driver's fsync() is supposed to flush any pending operation to hardware. It is implemented in this driver by cancelling the queued deferred IO first, then schedule it for "immediate execution" by calling schedule_delayed_work() again with delay=0. However, setting delay=0 only means the work is scheduled immediately, it does not mean the work is executed immediately. There is no guarantee that the work is finished after schedule_delayed_work() returns. After this driver's fsync() returns, there can still be pending work. Furthermore, if close() is called by users immediately after fsync(), the pending work gets cancelled and fsync() may do nothing. To ensure that the deferred IO completes, use flush_delayed_work() instead. Write operations to this driver either write to the device directly, or invoke schedule_delayed_work(); so by flushing the workqueue, it can be guaranteed that all previous writes make it to the device. Fixes: 5e841b88d23d ("fb: fsync() method for deferred I/O flush.") Cc: stable@vger.kernel.org Signed-off-by: Nam Cao Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Helge Deller commit dee56ccb468a832074397fdbf22bbd9bf6d710aa Author: Linus Walleij Date: Tue Dec 12 15:18:02 2023 +0100 fbdev: amba-clcd: Delete the old CLCD driver We have managed to ascertain that all users of the old FBDEV code that are out of tree are now gone. The new DRM driver can be found in drivers/gpu/drm/pl111/. The remaining out of tree user was the ARM FVP emulation platform, running Android. Thanks to changes in Android versions 13 and 14, Android can now use the DRM driver when being emulated under FVP. Some final patches are being put in place to make it fully featured. This is essentially a revert of the partial revert in commit 112c35237c72 ("Partially revert "video: fbdev: amba-clcd: Retire elder CLCD driver"") Signed-off-by: Linus Walleij Signed-off-by: Helge Deller commit d9f25b59ed85ae45801cf45fe17eb269b0ef3038 Author: Matthew Wilcox (Oracle) Date: Fri Dec 8 22:47:02 2023 +0000 fbdev: Remove support for Carillo Ranch driver As far as anybody can tell, this product never shipped. If it did, it shipped in 2007 and nobody has access to one any more. Remove the fbdev driver and the backlight driver. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Helge Deller commit a03cfad512ac24a35184d7d87ec0d5489e1cb763 Author: Takashi Iwai Date: Fri Jan 12 12:10:23 2024 +0100 ALSA: oxygen: Fix right channel of capture volume mixer There was a typo in oxygen mixer code that didn't update the right channel value properly for the capture volume. Let's fix it. This trivial fix was originally reported on Bugzilla. Fixes: a3601560496d ("[ALSA] oxygen: add front panel controls") Cc: Link: https://bugzilla.kernel.org/show_bug.cgi?id=156561 Link: https://lore.kernel.org/r/20240112111023.6208-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit e398822c4751017fe401f57409488f5948d12fb5 Author: Claudiu Beznea Date: Fri Jan 5 10:52:42 2024 +0200 net: phy: micrel: populate .soft_reset for KSZ9131 The RZ/G3S SMARC Module has 2 KSZ9131 PHYs. In this setup, the KSZ9131 PHY is used with the ravb Ethernet driver. It has been discovered that when bringing the Ethernet interface down/up continuously, e.g., with the following sh script: $ while :; do ifconfig eth0 down; ifconfig eth0 up; done the link speed and duplex are wrong after interrupting the bring down/up operation even though the Ethernet interface is up. To recover from this state the following configuration sequence is necessary (executed manually): $ ifconfig eth0 down $ ifconfig eth0 up The behavior has been identified also on the Microchip SAMA7G5-EK board which runs the macb driver and uses the same PHY. The order of PHY-related operations in ravb_open() is as follows: ravb_open() -> ravb_phy_start() -> ravb_phy_init() -> of_phy_connect() -> phy_connect_direct() -> phy_attach_direct() -> phy_init_hw() -> phydev->drv->soft_reset() phydev->drv->config_init() phydev->drv->config_intr() phy_resume() kszphy_resume() The order of PHY-related operations in ravb_close is as follows: ravb_close() -> phy_stop() -> phy_suspend() -> kszphy_suspend() -> genphy_suspend() // set BMCR_PDOWN bit in MII_BMCR In genphy_suspend() setting the BMCR_PDWN bit in MII_BMCR switches the PHY to Software Power-Down (SPD) mode (according to the KSZ9131 datasheet). Thus, when opening the interface after it has been previously closed (via ravb_close()), the phydev->drv->config_init() and phydev->drv->config_intr() reach the KSZ9131 PHY driver via the ksz9131_config_init() and kszphy_config_intr() functions. KSZ9131 specifies that the MII management interface remains operational during SPD (Software Power-Down), but (according to manual): - Only access to the standard registers (0 through 31) is supported. - Access to MMD address spaces other than MMD address space 1 is possible if the spd_clock_gate_override bit is set. - Access to MMD address space 1 is not possible. The spd_clock_gate_override bit is not used in the KSZ9131 driver. ksz9131_config_init() configures RGMII delay, pad skews and LEDs by accessesing MMD registers other than those in address space 1. The datasheet for the KSZ9131 does not specify what happens if registers from an unsupported address space are accessed while the PHY is in SPD. To fix the issue the .soft_reset method has been instantiated for KSZ9131, too. This resets the PHY to the default state before doing any configurations to it, thus switching it out of SPD. Fixes: bff5b4b37372 ("net: phy: micrel: add Microchip KSZ9131 initial driver") Signed-off-by: Claudiu Beznea Reviewed-by: Maxime Chevallier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit acd66c2126eb9b5da2d89ae07dbcd73b909c2111 Author: Horatiu Vultur Date: Wed Jan 10 12:37:30 2024 +0100 net: micrel: Fix PTP frame parsing for lan8841 The HW has the capability to check each frame if it is a PTP frame, which domain it is, which ptp frame type it is, different ip address in the frame. And if one of these checks fail then the frame is not timestamp. Most of these checks were disabled except checking the field minorVersionPTP inside the PTP header. Meaning that once a partner sends a frame compliant to 8021AS which has minorVersionPTP set to 1, then the frame was not timestamp because the HW expected by default a value of 0 in minorVersionPTP. Fix this issue by removing this check so the userspace can decide on this. Fixes: cafc3662ee3f ("net: micrel: Add PHC support for lan8841") Signed-off-by: Horatiu Vultur Reviewed-by: Divya Koppera Reviewed-by: Rahul Rameshbabu Signed-off-by: David S. Miller commit 589830b13ac21bddf99b9bc5a4ec17813d0869ef Author: Arnd Bergmann Date: Mon Oct 23 13:55:58 2023 +0200 drm/panel/raydium-rm692e5: select CONFIG_DRM_DISPLAY_DP_HELPER As with several other panel drivers, this fails to link without the DP helper library: ld: drivers/gpu/drm/panel/panel-raydium-rm692e5.o: in function `rm692e5_prepare': panel-raydium-rm692e5.c:(.text+0x11f4): undefined reference to `drm_dsc_pps_payload_pack' Select the same symbols that the others already use. Fixes: 988d0ff29ecf7 ("drm/panel: Add driver for BOE RM692E5 AMOLED panel") Signed-off-by: Arnd Bergmann Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231023115619.3551348-1-arnd@kernel.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231023115619.3551348-1-arnd@kernel.org commit 62b143b5ec4a14e1ae0dede5aabaf1832e3b0073 Author: Artur Weber Date: Fri Jan 5 07:53:02 2024 +0100 drm/panel: samsung-s6d7aa0: drop DRM_BUS_FLAG_DE_HIGH for lsl080al02 It turns out that I had misconfigured the device I was using the panel with; the bus data polarity is not high for this panel, I had to change the config on the display controller's side. Fix the panel config to properly reflect its accurate settings. Fixes: 6810bb390282 ("drm/panel: Add Samsung S6D7AA0 panel controller driver") Reviewed-by: Jessica Zhang Signed-off-by: Artur Weber Link: https://lore.kernel.org/r/20240105-tab3-display-fixes-v2-2-904d1207bf6f@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240105-tab3-display-fixes-v2-2-904d1207bf6f@gmail.com commit 45dd7df26cee741b31c25ffdd44fb8794eb45ccd Author: Markus Niebel Date: Thu Oct 12 10:42:08 2023 +0200 drm: panel-simple: add missing bus flags for Tianma tm070jvhg[30/33] The DE signal is active high on this display, fill in the missing bus_flags. This aligns panel_desc with its display_timing. Fixes: 9a2654c0f62a ("drm/panel: Add and fill drm_panel type field") Fixes: b3bfcdf8a3b6 ("drm/panel: simple: add Tianma TM070JVHG33") Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Reviewed-by: Sam Ravnborg Link: https://lore.kernel.org/r/20231012084208.2731650-1-alexander.stein@ew.tq-group.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231012084208.2731650-1-alexander.stein@ew.tq-group.com commit cdac6e1f716419ce307ad3e44a718557a5469c17 Author: Chancel Liu Date: Thu Jan 11 11:52:19 2024 +0900 ALSA: aloop: Introduce a function to get if access is interleaved mode There's a use case that playback stream of a loopback cable works on RW_INTERLEAVED mode while capture stream works on MMAP_INTERLEAVED mode: aplay -Dhw:Loopback,0,0 S32_48K_2ch.wav; arecord -Dplughw:Loopback,1,0 -fS32_LE -r16000 -c2 cap.wav; The plug plugin handles only slave PCM support MMAP mode. Not only plug plugin but also other plugins like direct plugins(dmix/dsnoop/dshare) work on MMAP access mode. In this case capture stream is the slave PCM works on MMAP_INTERLEAVED mode. However loopback_check_format() rejects this access setting and return: arecord: pcm_read:2240: read error: Input/output error To fix it a function called is_access_interleaved() is introduced to get if access is interleaved mode. If both access of capture stream and playback stream is interleaved mode loopback_check_format() will allow this kind of access setting. Fixes: 462494565c27 ("ALSA: aloop: Add support for the non-interleaved access mode") Signed-off-by: Chancel Liu Link: https://lore.kernel.org/r/20240111025219.2678764-1-chancel.liu@nxp.com Signed-off-by: Takashi Iwai commit 70d201a40823acba23899342d62bc2644051ad2e Merge: 6a31658aa1c0b c3c2d45b90501 Author: Linus Torvalds Date: Thu Jan 11 20:39:15 2024 -0800 Merge tag 'f2fs-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs update from Jaegeuk Kim: "In this series, we've some progress to support Zoned block device regarding to the power-cut recovery flow and enabling checkpoint=disable feature which is essential for Android OTA. Other than that, some patches touched sysfs entries and tracepoints which are minor, while several bug fixes on error handlers and compression flows are good to improve the overall stability. Enhancements: - enable checkpoint=disable for zoned block device - sysfs entries such as discard status, discard_io_aware, dir_level - tracepoints such as f2fs_vm_page_mkwrite(), f2fs_rename(), f2fs_new_inode() - use shared inode lock during f2fs_fiemap() and f2fs_seek_block() Bug fixes: - address some power-cut recovery issues on zoned block device - handle errors and logics on do_garbage_collect(), f2fs_reserve_new_block(), f2fs_move_file_range(), f2fs_recover_xattr_data() - don't set FI_PREALLOCATED_ALL for partial write - fix to update iostat correctly in f2fs_filemap_fault() - fix to wait on block writeback for post_read case - fix to tag gcing flag on page during block migration - restrict max filesize for 16K f2fs - fix to avoid dirent corruption - explicitly null-terminate the xattr list There are also several clean-up patches to remove dead codes and better readability" * tag 'f2fs-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (33 commits) f2fs: show more discard status by sysfs f2fs: Add error handling for negative returns from do_garbage_collect f2fs: Constrain the modification range of dir_level in the sysfs f2fs: Use wait_event_freezable_timeout() for freezable kthread f2fs: fix to check return value of f2fs_recover_xattr_data f2fs: don't set FI_PREALLOCATED_ALL for partial write f2fs: fix to update iostat correctly in f2fs_filemap_fault() f2fs: fix to check compress file in f2fs_move_file_range() f2fs: fix to wait on block writeback for post_read case f2fs: fix to tag gcing flag on page during block migration f2fs: add tracepoint for f2fs_vm_page_mkwrite() f2fs: introduce f2fs_invalidate_internal_cache() for cleanup f2fs: update blkaddr in __set_data_blkaddr() for cleanup f2fs: introduce get_dnode_addr() to clean up codes f2fs: delete obsolete FI_DROP_CACHE f2fs: delete obsolete FI_FIRST_BLOCK_WRITTEN f2fs: Restrict max filesize for 16K f2fs f2fs: let's finish or reset zones all the time f2fs: check write pointers when checkpoint=disable f2fs: fix write pointers on zoned device after roll forward ... commit 6a31658aa1c0b757df652f6fcf3a001f90fda302 Merge: 488926926a165 8fb7b723924cc Author: Linus Torvalds Date: Thu Jan 11 20:27:41 2024 -0800 Merge tag '6.8-rc-smb-server-fixes' of git://git.samba.org/ksmbd Pull smb server updates from Steve French: - memory allocation fix - three lease fixes, including important rename fix - read only share fix - thread freeze fix - three cleanup fixes (two kernel doc related) - locking fix in setting EAs - packet header validation fix * tag '6.8-rc-smb-server-fixes' of git://git.samba.org/ksmbd: ksmbd: Add missing set_freezable() for freezable kthread ksmbd: free ppace array on error in parse_dacl ksmbd: send lease break notification on FILE_RENAME_INFORMATION ksmbd: don't allow O_TRUNC open on read-only share ksmbd: vfs: fix all kernel-doc warnings ksmbd: auth: fix most kernel-doc warnings ksmbd: Remove usage of the deprecated ida_simple_xx() API ksmbd: don't increment epoch if current state and request state are same ksmbd: fix potential circular locking issue in smb2_set_ea() ksmbd: set v2 lease version on lease upgrade ksmbd: validate the zero field of packet header commit 488926926a1653adfda3f662355907c896524487 Merge: 499aa1ca4eb66 c5f3fd21789cf Author: Linus Torvalds Date: Thu Jan 11 20:23:50 2024 -0800 Merge tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc filesystem updates from Al Viro: "Misc cleanups (the part that hadn't been picked by individual fs trees)" * tag 'pull-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: apparmorfs: don't duplicate kfree_link() orangefs: saner arguments passing in readdir guts ocfs2_find_match(): there's no such thing as NULL or negative ->d_parent reiserfs_add_entry(): get rid of pointless namelen checks __ocfs2_add_entry(), ocfs2_prepare_dir_for_insert(): namelen checks ext4_add_entry(): ->d_name.len is never 0 befs: d_obtain_alias(ERR_PTR(...)) will do the right thing affs: d_obtain_alias(ERR_PTR(...)) will do the right thing /proc/sys: use d_splice_alias() calling conventions to simplify failure exits hostfs: use d_splice_alias() calling conventions to simplify failure exits udf_fiiter_add_entry(): check for zero ->d_name.len is bogus... udf: d_obtain_alias(ERR_PTR(...)) will do the right thing... udf: d_splice_alias() will do the right thing on ERR_PTR() inode nfsd: kill stale comment about simple_fill_super() requirements bfs_add_entry(): get rid of pointless ->d_name.len checks nilfs2: d_obtain_alias(ERR_PTR(...)) will do the right thing... zonefs: d_splice_alias() will do the right thing on ERR_PTR() inode commit 499aa1ca4eb6602df38afaecb88fc14edf50cdbb Merge: bf4e7080aeed2 1b6ae9f6e6c3e Author: Linus Torvalds Date: Thu Jan 11 20:11:35 2024 -0800 Merge tag 'pull-dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull dcache updates from Al Viro: "Change of locking rules for __dentry_kill(), regularized refcounting rules in that area, assorted cleanups and removal of weird corner cases (e.g. now ->d_iput() on child is always called before the parent might hit __dentry_kill(), etc)" * tag 'pull-dcache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (40 commits) dcache: remove unnecessary NULL check in dget_dlock() kill DCACHE_MAY_FREE __d_unalias() doesn't use inode argument d_alloc_parallel(): in-lookup hash insertion doesn't need an RCU variant get rid of DCACHE_GENOCIDE d_genocide(): move the extern into fs/internal.h simple_fill_super(): don't bother with d_genocide() on failure nsfs: use d_make_root() d_alloc_pseudo(): move setting ->d_op there from the (sole) caller kill d_instantate_anon(), fold __d_instantiate_anon() into remaining caller retain_dentry(): introduce a trimmed-down lockless variant __dentry_kill(): new locking scheme d_prune_aliases(): use a shrink list switch select_collect{,2}() to use of to_shrink_list() to_shrink_list(): call only if refcount is 0 fold dentry_kill() into dput() don't try to cut corners in shrink_lock_dentry() fold the call of retain_dentry() into fast_dput() Call retain_dentry() with refcount 0 dentry_kill(): don't bother with retain_dentry() on slow path ... commit bf4e7080aeed29354cb156a8eb5d221ab2b6a8cc Merge: 2f444347a8d6b a8b0026847b8c Author: Linus Torvalds Date: Thu Jan 11 20:00:22 2024 -0800 Merge tag 'pull-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull rename updates from Al Viro: "Fix directory locking scheme on rename This was broken in 6.5; we really can't lock two unrelated directories without holding ->s_vfs_rename_mutex first and in case of same-parent rename of a subdirectory 6.5 ends up doing just that" * tag 'pull-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: rename(): avoid a deadlock in the case of parents having no common ancestor kill lock_two_inodes() rename(): fix the locking of subdirectories f2fs: Avoid reading renamed directory if parent does not change ext4: don't access the source subdirectory content on same-directory rename ext2: Avoid reading renamed directory if parent does not change udf_rename(): only access the child content on cross-directory rename ocfs2: Avoid touching renamed directory if parent does not change reiserfs: Avoid touching renamed directory if parent does not change commit 2f444347a8d6b03b4e6a9aeff13d67b8cbbe08ce Merge: 5b9b41617bf3e 41e9a7faff514 Author: Linus Torvalds Date: Thu Jan 11 19:54:18 2024 -0800 Merge tag 'pull-minix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull minixfs updates from Al Viro: "minixfs kmap_local_page() switchover and related fixes - very similar to sysv series" * tag 'pull-minix' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: minixfs: switch to kmap_local_page() minixfs: Use dir_put_page() in minix_unlink() and minix_rename() minixfs: change the signature of dir_get_page() minixfs: use offset_in_page() commit 5b9b41617bf3e1282cc60f07d3d52e62399aa4ba Merge: 22d29f1112c85 2d179e8ac02e3 Author: Linus Torvalds Date: Thu Jan 11 19:46:52 2024 -0800 Merge tag 'docs-6.8' of git://git.lwn.net/linux Pull documentation update from Jonathan Corbet: "Another moderately busy cycle for documentation, including: - The minimum Sphinx requirement has been raised to 2.4.4, following a warning that was added in 6.2 - Some reworking of the Documentation/process front page to, hopefully, make it more useful - Various kernel-doc tweaks to, for example, make it deal properly with __counted_by annotations - We have also restored a warning for documentation of nonexistent structure members that disappeared a while back. That had the delightful consequence of adding some 600 warnings to the docs build. A sustained effort by Randy, Vegard, and myself has addressed almost all of those, bringing the documentation back into sync with the code. The fixes are going through the appropriate maintainer trees - Various improvements to the HTML rendered docs, including automatic links to Git revisions and a nice new pulldown to make translations easy to access - Speaking of translations, more of those for Spanish and Chinese ... plus the usual stream of documentation updates and typo fixes" * tag 'docs-6.8' of git://git.lwn.net/linux: (57 commits) MAINTAINERS: use tabs for indent of CONFIDENTIAL COMPUTING THREAT MODEL A reworked process/index.rst ring-buffer/Documentation: Add documentation on buffer_percent file Translated the RISC-V architecture boot documentation. Docs: remove mentions of fdformat from util-linux Docs/zh_CN: Fix the meaning of DEBUG to pr_debug() Documentation: move driver-api/dcdbas to userspace-api/ Documentation: move driver-api/isapnp to userspace-api/ Documentation/core-api : fix typo in workqueue Documentation/trace: Fixed typos in the ftrace FLAGS section kernel-doc: handle a void function without producing a warning scripts/get_abi.pl: ignore some temp files docs: kernel_abi.py: fix command injection scripts/get_abi: fix source path leak CREDITS, MAINTAINERS, docs/process/howto: Update man-pages' maintainer docs: translations: add translations links when they exist kernel-doc: Align quick help and the code MAINTAINERS: add reviewer for Spanish translations docs: ignore __counted_by attribute in structure definitions scripts: kernel-doc: Clarify missing struct member description .. commit a03cd7602a090eae277d2b79d43925661e7fbe9a Author: Max Filippov Date: Wed Jan 10 20:20:00 2024 -0800 xtensa: don't produce FDPIC output with fdpic toolchain The kernel doesn't use features of the FDPIC toolchain, disable FDPIC code generation when using such toolchain and select ordinary ELF linker emulation. Signed-off-by: Max Filippov commit 83ab68168a3d990d5ff39ab030ad5754cbbccb25 Author: Dmitry Bogdanov Date: Thu Jan 11 15:59:41 2024 +0300 scsi: target: core: Add TMF to tmr_list handling An abort that is responded to by iSCSI itself is added to tmr_list but does not go to target core. A LUN_RESET that goes through tmr_list takes a refcounter on the abort and waits for completion. However, the abort will be never complete because it was not started in target core. Unable to locate ITT: 0x05000000 on CID: 0 Unable to locate RefTaskTag: 0x05000000 on CID: 0. wait_for_tasks: Stopping tmf LUN_RESET with tag 0x0 ref_task_tag 0x0 i_state 34 t_state ISTATE_PROCESSING refcnt 2 transport_state active,stop,fabric_stop wait for tasks: tmf LUN_RESET with tag 0x0 ref_task_tag 0x0 i_state 34 t_state ISTATE_PROCESSING refcnt 2 transport_state active,stop,fabric_stop ... INFO: task kworker/0:2:49 blocked for more than 491 seconds. task:kworker/0:2 state:D stack: 0 pid: 49 ppid: 2 flags:0x00000800 Workqueue: events target_tmr_work [target_core_mod] Call Trace: __switch_to+0x2c4/0x470 _schedule+0x314/0x1730 schedule+0x64/0x130 schedule_timeout+0x168/0x430 wait_for_completion+0x140/0x270 target_put_cmd_and_wait+0x64/0xb0 [target_core_mod] core_tmr_lun_reset+0x30/0xa0 [target_core_mod] target_tmr_work+0xc8/0x1b0 [target_core_mod] process_one_work+0x2d4/0x5d0 worker_thread+0x78/0x6c0 To fix this, only add abort to tmr_list if it will be handled by target core. Signed-off-by: Dmitry Bogdanov Link: https://lore.kernel.org/r/20240111125941.8688-1-d.bogdanov@yadro.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit 6df0e077d76bd144c533b61d6182676aae6b0a85 Author: Niklas Cassel Date: Thu Jan 11 13:05:32 2024 +0100 scsi: core: Kick the requeue list after inserting when flushing When libata calls ata_link_abort() to abort all ata queued commands, it calls blk_abort_request() on the SCSI command representing each QC. This causes scsi_timeout() to be called, which calls scsi_eh_scmd_add() for each SCSI command. scsi_eh_scmd_add() sets the SCSI host to state recovery, and then adds the command to shost->eh_cmd_q. This will wake up the SCSI EH, and eventually the libata EH strategy handler will be called, which calls scsi_eh_flush_done_q() to either flush retry or flush finish each failed command. The commands that are flush retried by scsi_eh_flush_done_q() are done so using scsi_queue_insert(). Before commit 8b566edbdbfb ("scsi: core: Only kick the requeue list if necessary"), __scsi_queue_insert() called blk_mq_requeue_request() with the second argument set to true, indicating that it should always kick/run the requeue list after inserting. After commit 8b566edbdbfb ("scsi: core: Only kick the requeue list if necessary"), __scsi_queue_insert() does not kick/run the requeue list after inserting, if the current SCSI host state is recovery (which is the case in the libata example above). This optimization is probably fine in most cases, as I can only assume that most often someone will eventually kick/run the queues. However, that is not the case for scsi_eh_flush_done_q(), where we can see that the request gets inserted to the requeue list, but the queue is never started after the request has been inserted, leading to the block layer waiting for the completion of command that never gets to run. Since scsi_eh_flush_done_q() is called by SCSI EH context, the SCSI host state is most likely always in recovery when this function is called. Thus, let scsi_eh_flush_done_q() explicitly kick the requeue list after inserting a flush retry command, so that scsi_eh_flush_done_q() keeps the same behavior as before commit 8b566edbdbfb ("scsi: core: Only kick the requeue list if necessary"). Simple reproducer for the libata example above: $ hdparm -Y /dev/sda $ echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/delete Fixes: 8b566edbdbfb ("scsi: core: Only kick the requeue list if necessary") Reported-by: Kevin Locke Closes: https://lore.kernel.org/linux-scsi/ZZw3Th70wUUvCiCY@kevinlocke.name/ Signed-off-by: Niklas Cassel Link: https://lore.kernel.org/r/20240111120533.3612509-1-cassel@kernel.org Reviewed-by: Bart Van Assche Reviewed-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 38945c2b006b23a1a7a0c88d76e3294c6199891c Author: Dan Carpenter Date: Wed Jan 10 21:41:55 2024 +0300 scsi: fnic: unlock on error path in fnic_queuecommand() Call spin_unlock_irqrestore(&fnic->wq_copy_lock[hwq], flags) before returning. Fixes: c81df08cd294 ("scsi: fnic: Add support for multiqueue (MQ) in fnic driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/5360fa20-74bc-4c22-a78e-ea8b18c5410d@moroto.mountain Reviewed-by: Karan Tilak Kumar Signed-off-by: Martin K. Petersen commit 567a1e852e872e702b18d271a3dbce2a75efbaff Author: Harshit Mogalapalli Date: Tue Jan 2 00:52:45 2024 -0800 scsi: fcoe: Fix unsigned comparison with zero in store_ctlr_mode() ctlr->mode is of unsigned type, it is never less than zero. Fix this by using an extra variable called 'res', to store return value from sysfs_match_string() and assign that to ctlr->mode on the success path. Fixes: edc22a7c8688 ("scsi: fcoe: Use sysfs_match_string() over fcoe_parse_mode()") Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20240102085245.600570-1-harshit.m.mogalapalli@oracle.com Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 173431b274a9a54fc10b273b46e67f46bcf62d2e Author: Qu Wenruo Date: Wed Jan 10 08:58:26 2024 +1030 btrfs: defrag: reject unknown flags of btrfs_ioctl_defrag_range_args Add extra sanity check for btrfs_ioctl_defrag_range_args::flags. This is not really to enhance fuzzing tests, but as a preparation for future expansion on btrfs_ioctl_defrag_range_args. In the future we're going to add new members, allowing more fine tuning for btrfs defrag. Without the -ENONOTSUPP error, there would be no way to detect if the kernel supports those new defrag features. CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3324d0547861b16cf436d54abba7052e0c8aa9de Author: Omar Sandoval Date: Thu Jan 4 11:48:47 2024 -0800 btrfs: avoid copying BTRFS_ROOT_SUBVOL_DEAD flag to snapshot of subvolume being deleted Sweet Tea spotted a race between subvolume deletion and snapshotting that can result in the root item for the snapshot having the BTRFS_ROOT_SUBVOL_DEAD flag set. The race is: Thread 1 | Thread 2 ----------------------------------------------|---------- btrfs_delete_subvolume | btrfs_set_root_flags(BTRFS_ROOT_SUBVOL_DEAD)| |btrfs_mksubvol | down_read(subvol_sem) | create_snapshot | ... | create_pending_snapshot | copy root item from source down_write(subvol_sem) | This flag is only checked in send and swap activate, which this would cause to fail mysteriously. create_snapshot() now checks the root refs to reject a deleted subvolume, so we can fix this by locking subvol_sem earlier so that the BTRFS_ROOT_SUBVOL_DEAD flag and the root refs are updated atomically. CC: stable@vger.kernel.org # 4.14+ Reported-by: Sweet Tea Dorminy Reviewed-by: Sweet Tea Dorminy Reviewed-by: Anand Jain Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7081929ab2572920e94d70be3d332e5c9f97095a Author: Omar Sandoval Date: Thu Jan 4 11:48:46 2024 -0800 btrfs: don't abort filesystem when attempting to snapshot deleted subvolume If the source file descriptor to the snapshot ioctl refers to a deleted subvolume, we get the following abort: BTRFS: Transaction aborted (error -2) WARNING: CPU: 0 PID: 833 at fs/btrfs/transaction.c:1875 create_pending_snapshot+0x1040/0x1190 [btrfs] Modules linked in: pata_acpi btrfs ata_piix libata scsi_mod virtio_net blake2b_generic xor net_failover virtio_rng failover scsi_common rng_core raid6_pq libcrc32c CPU: 0 PID: 833 Comm: t_snapshot_dele Not tainted 6.7.0-rc6 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-1.fc39 04/01/2014 RIP: 0010:create_pending_snapshot+0x1040/0x1190 [btrfs] RSP: 0018:ffffa09c01337af8 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff9982053e7c78 RCX: 0000000000000027 RDX: ffff99827dc20848 RSI: 0000000000000001 RDI: ffff99827dc20840 RBP: ffffa09c01337c00 R08: 0000000000000000 R09: ffffa09c01337998 R10: 0000000000000003 R11: ffffffffb96da248 R12: fffffffffffffffe R13: ffff99820535bb28 R14: ffff99820b7bd000 R15: ffff99820381ea80 FS: 00007fe20aadabc0(0000) GS:ffff99827dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000559a120b502f CR3: 00000000055b6000 CR4: 00000000000006f0 Call Trace: ? create_pending_snapshot+0x1040/0x1190 [btrfs] ? __warn+0x81/0x130 ? create_pending_snapshot+0x1040/0x1190 [btrfs] ? report_bug+0x171/0x1a0 ? handle_bug+0x3a/0x70 ? exc_invalid_op+0x17/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? create_pending_snapshot+0x1040/0x1190 [btrfs] ? create_pending_snapshot+0x1040/0x1190 [btrfs] create_pending_snapshots+0x92/0xc0 [btrfs] btrfs_commit_transaction+0x66b/0xf40 [btrfs] btrfs_mksubvol+0x301/0x4d0 [btrfs] btrfs_mksnapshot+0x80/0xb0 [btrfs] __btrfs_ioctl_snap_create+0x1c2/0x1d0 [btrfs] btrfs_ioctl_snap_create_v2+0xc4/0x150 [btrfs] btrfs_ioctl+0x8a6/0x2650 [btrfs] ? kmem_cache_free+0x22/0x340 ? do_sys_openat2+0x97/0xe0 __x64_sys_ioctl+0x97/0xd0 do_syscall_64+0x46/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 RIP: 0033:0x7fe20abe83af RSP: 002b:00007ffe6eff1360 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007fe20abe83af RDX: 00007ffe6eff23c0 RSI: 0000000050009417 RDI: 0000000000000003 RBP: 0000000000000003 R08: 0000000000000000 R09: 00007fe20ad16cd0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe6eff13c0 R14: 00007fe20ad45000 R15: 0000559a120b6d58 ---[ end trace 0000000000000000 ]--- BTRFS: error (device vdc: state A) in create_pending_snapshot:1875: errno=-2 No such entry BTRFS info (device vdc: state EA): forced readonly BTRFS warning (device vdc: state EA): Skipping commit of aborted transaction. BTRFS: error (device vdc: state EA) in cleanup_transaction:2055: errno=-2 No such entry This happens because create_pending_snapshot() initializes the new root item as a copy of the source root item. This includes the refs field, which is 0 for a deleted subvolume. The call to btrfs_insert_root() therefore inserts a root with refs == 0. btrfs_get_new_fs_root() then finds the root and returns -ENOENT if refs == 0, which causes create_pending_snapshot() to abort. Fix it by checking the source root's refs before attempting the snapshot, but after locking subvol_sem to avoid racing with deletion. CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Sweet Tea Dorminy Reviewed-by: Anand Jain Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit b18f3b60b35a8c01c9a2a0f0d6424c6d73971dc3 Author: Naohiro Aota Date: Fri Dec 22 13:56:34 2023 +0900 btrfs: zoned: fix lock ordering in btrfs_zone_activate() The btrfs CI reported a lockdep warning as follows by running generic generic/129. WARNING: possible circular locking dependency detected 6.7.0-rc5+ #1 Not tainted ------------------------------------------------------ kworker/u5:5/793427 is trying to acquire lock: ffff88813256d028 (&cache->lock){+.+.}-{2:2}, at: btrfs_zone_finish_one_bg+0x5e/0x130 but task is already holding lock: ffff88810a23a318 (&fs_info->zone_active_bgs_lock){+.+.}-{2:2}, at: btrfs_zone_finish_one_bg+0x34/0x130 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&fs_info->zone_active_bgs_lock){+.+.}-{2:2}: ... -> #0 (&cache->lock){+.+.}-{2:2}: ... This is because we take fs_info->zone_active_bgs_lock after a block_group's lock in btrfs_zone_activate() while doing the opposite in other places. Fix the issue by expanding the fs_info->zone_active_bgs_lock's critical section and taking it before a block_group's lock. Fixes: a7e1ac7bdc5a ("btrfs: zoned: reserve zones for an active metadata/system block group") CC: stable@vger.kernel.org # 6.6 Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit d967c914a633ee797255261808720f791b658f24 Author: Naohiro Aota Date: Fri Dec 22 01:46:16 2023 +0900 btrfs: fix unbalanced unlock of mapping_tree_lock The error path of btrfs_get_chunk_map() releases fs_info->mapping_tree_lock. But, it is taken and released in btrfs_find_chunk_map(). So, there is no need to do so. Fixes: 7dc66abb5a47 ("btrfs: use a dedicated data structure for chunk maps") Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit f03e274a8b29d1d1c1bbd7f764766cb5ca537ab7 Author: Fedor Pchelkin Date: Wed Jan 3 13:31:27 2024 +0300 btrfs: ref-verify: free ref cache before clearing mount opt As clearing REF_VERIFY mount option indicates there were some errors in a ref-verify process, a ref cache is not relevant anymore and should be freed. btrfs_free_ref_cache() requires REF_VERIFY option being set so call it just before clearing the mount option. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. Reported-by: syzbot+be14ed7728594dc8bd42@syzkaller.appspotmail.com Fixes: fd708b81d972 ("Btrfs: add a extent ref verify tool") CC: stable@vger.kernel.org # 5.4+ Closes: https://lore.kernel.org/lkml/000000000000e5a65c05ee832054@google.com/ Reported-by: syzbot+c563a3c79927971f950f@syzkaller.appspotmail.com Closes: https://lore.kernel.org/lkml/0000000000007fe09705fdc6086c@google.com/ Reviewed-by: Anand Jain Signed-off-by: Fedor Pchelkin Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6ff09b6b8c2fb6b3edda4ffaa173153a40653067 Author: Dmitry Antipov Date: Thu Dec 21 11:47:45 2023 +0300 btrfs: fix kvcalloc() arguments order in btrfs_ioctl_send() When compiling with gcc version 14.0.0 20231220 (experimental) and W=1, I've noticed the following warning: fs/btrfs/send.c: In function 'btrfs_ioctl_send': fs/btrfs/send.c:8208:44: warning: 'kvcalloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 8208 | sctx->clone_roots = kvcalloc(sizeof(*sctx->clone_roots), | ^ Since 'n' and 'size' arguments of 'kvcalloc()' are multiplied to calculate the final size, their actual order doesn't affect the result and so this is not a bug. But it's still worth to fix it. Signed-off-by: Dmitry Antipov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 02444f2ac26eae6385a65fcd66915084d15dffba Author: Naohiro Aota Date: Tue Dec 19 01:02:29 2023 +0900 btrfs: zoned: optimize hint byte for zoned allocator Writing sequentially to a huge file on btrfs on a SMR HDD revealed a decline of the performance (220 MiB/s to 30 MiB/s after 500 minutes). The performance goes down because of increased latency of the extent allocation, which is induced by a traversing of a lot of full block groups. So, this patch optimizes the ffe_ctl->hint_byte by choosing a block group with sufficient size from the active block group list, which does not contain full block groups. After applying the patch, the performance is maintained well. Fixes: 2eda57089ea3 ("btrfs: zoned: implement sequential extent allocation") CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit b271fee9a41ca1474d30639fd6cc912c9901d0f8 Author: Naohiro Aota Date: Tue Dec 19 01:02:28 2023 +0900 btrfs: zoned: factor out prepare_allocation_zoned() Factor out prepare_allocation_zoned() for further extension. While at it, optimize the if-branch a bit. Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit bec161add35b478a7746bf58bcdea6faa19129ef Author: Taehee Yoo Date: Sun Jan 7 14:42:41 2024 +0000 amt: do not use overwrapped cb area amt driver uses skb->cb for storing tunnel information. This job is worked before TC layer and then amt driver load tunnel info from skb->cb after TC layer. So, its cb area should not be overwrapped with CB area used by TC. In order to not use cb area used by TC, it skips the biggest cb structure used by TC, which was qdisc_skb_cb. But it's not anymore. Currently, biggest structure of TC's CB is tc_skb_cb. So, it should skip size of tc_skb_cb instead of qdisc_skb_cb. Fixes: ec624fe740b4 ("net/sched: Extend qdisc control block with tc control block") Signed-off-by: Taehee Yoo Acked-by: Paolo Abeni Reviewed-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20240107144241.4169520-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski commit 66cee759ffa3d1146a22182c3d5a6404c7cfe9fd Merge: e3fe8d28c67bf 64e47d8afb5ca Author: Jakub Kicinski Date: Thu Jan 11 16:54:47 2024 -0800 Merge branch 'net-ethernet-ti-am65-cpsw-allow-for-mtu-values' Sanjuán García, Jorge says: ==================== net: ethernet: ti: am65-cpsw: Allow for MTU values The am65-cpsw-nuss driver has a fixed definition for the maximum ethernet frame length of 1522 bytes (AM65_CPSW_MAX_PACKET_SIZE). This limits the switch ports to only operate at a maximum MTU of 1500 bytes. When combining this CPSW switch with a DSA switch connected to one of its ports this limitation shows up. The extra 8 bytes the DSA subsystem adds internally to the ethernet frame create resulting frames bigger than 1522 bytes (1518 for non VLAN + 8 for DSA stuff) so they get dropped by the switch. One of the issues with the the am65-cpsw-nuss driver is that the network device max_mtu was being set to the same fixed value defined for the max total frame length (1522 bytes). This makes the DSA subsystem believe that the MTU of the interface can be set to 1508 bytes to make room for the extra 8 bytes of the DSA headers. However, all packages created assuming the 1500 bytes payload get dropped by the switch as oversized. This series offers a solution to this problem. The max_mtu advertised on the network device and the actual max frame size configured on the switch registers are made consistent by letting the extra room needed for the ethernet headers and the frame checksum (22 bytes including VLAN). ==================== Link: https://lore.kernel.org/r/20240105085530.14070-1-jorge.sanjuangarcia@duagon.com Signed-off-by: Jakub Kicinski commit 64e47d8afb5ca533b27efc006405e5bcae2c4a7b Author: Sanjuán García, Jorge Date: Fri Jan 5 08:55:43 2024 +0000 net: ethernet: ti: am65-cpsw: Fix max mtu to fit ethernet frames The value of AM65_CPSW_MAX_PACKET_SIZE represents the maximum length of a received frame. This value is written to the register AM65_CPSW_PORT_REG_RX_MAXLEN. The maximum MTU configured on the network device should then leave some room for the ethernet headers and frame check. Otherwise, if the network interface is configured to its maximum mtu possible, the frames will be larger than AM65_CPSW_MAX_PACKET_SIZE and will get dropped as oversized. The switch supports ethernet frame sizes between 64 and 2024 bytes (including VLAN) as stated in the technical reference manual, so define AM65_CPSW_MAX_PACKET_SIZE with that maximum size. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Jorge Sanjuan Garcia Reviewed-by: Horatiu Vultur Reviewed-by: Siddharth Vadapalli Link: https://lore.kernel.org/r/20240105085530.14070-2-jorge.sanjuangarcia@duagon.com Signed-off-by: Jakub Kicinski commit e3fe8d28c67bf6c291e920c6d04fa22afa14e6e4 Author: Zhu Yanjun Date: Thu Jan 4 10:09:02 2024 +0800 virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings Fix the warnings when building virtio_net driver. " drivers/net/virtio_net.c: In function ‘init_vqs’: drivers/net/virtio_net.c:4551:48: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=] 4551 | sprintf(vi->rq[i].name, "input.%d", i); | ^~ In function ‘virtnet_find_vqs’, inlined from ‘init_vqs’ at drivers/net/virtio_net.c:4645:8: drivers/net/virtio_net.c:4551:41: note: directive argument in the range [-2147483643, 65534] 4551 | sprintf(vi->rq[i].name, "input.%d", i); | ^~~~~~~~~~ drivers/net/virtio_net.c:4551:17: note: ‘sprintf’ output between 8 and 18 bytes into a destination of size 16 4551 | sprintf(vi->rq[i].name, "input.%d", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/virtio_net.c: In function ‘init_vqs’: drivers/net/virtio_net.c:4552:49: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 9 [-Wformat-overflow=] 4552 | sprintf(vi->sq[i].name, "output.%d", i); | ^~ In function ‘virtnet_find_vqs’, inlined from ‘init_vqs’ at drivers/net/virtio_net.c:4645:8: drivers/net/virtio_net.c:4552:41: note: directive argument in the range [-2147483643, 65534] 4552 | sprintf(vi->sq[i].name, "output.%d", i); | ^~~~~~~~~~~ drivers/net/virtio_net.c:4552:17: note: ‘sprintf’ output between 9 and 19 bytes into a destination of size 16 4552 | sprintf(vi->sq[i].name, "output.%d", i); " Reviewed-by: Xuan Zhuo Signed-off-by: Zhu Yanjun Link: https://lore.kernel.org/r/20240104020902.2753599-1-yanjun.zhu@intel.com Signed-off-by: Jakub Kicinski commit a0cb76a770083a22167659e64ba69af6425b1d9b Author: Nithin Dabilpuram Date: Mon Jan 8 13:00:36 2024 +0530 octeontx2-af: CN10KB: Fix FIFO length calculation for RPM2 RPM0 and RPM1 on the CN10KB SoC have 8 LMACs each, whereas RPM2 has only 4 LMACs. Similarly, the RPM0 and RPM1 have 256KB FIFO, whereas RPM2 has 128KB FIFO. This patch fixes an issue with improper TX credit programming for the RPM2 link. Fixes: b9d0fedc6234 ("octeontx2-af: cn10kb: Add RPM_USX MAC support") Signed-off-by: Nithin Dabilpuram Signed-off-by: Naveen Mamindlapalli Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240108073036.8766-1-naveenm@marvell.com Signed-off-by: Jakub Kicinski commit 3722a98752b40f7a98839d062c67631f45b72c7a Merge: 8722014311e61 a159cbe81d3b8 Author: Jakub Kicinski Date: Thu Jan 11 16:47:43 2024 -0800 Merge branch 'rtnetlink-allow-to-enslave-with-one-msg-an-up-interface' Nicolas Dichtel says: ==================== rtnetlink: allow to enslave with one msg an up interface The first patch fixes a regression, introduced in linux v6.1, by reverting a patch. The second patch adds a test to verify this API. ==================== Link: https://lore.kernel.org/r/20240108094103.2001224-1-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit a159cbe81d3b88bf35cd4edb4e6040d015972fdd Author: Nicolas Dichtel Date: Mon Jan 8 10:41:03 2024 +0100 selftests: rtnetlink: check enslaving iface in a bond The goal is to check the following two sequences: > ip link set dummy0 up > ip link set dummy0 master bond0 down Signed-off-by: Nicolas Dichtel Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240108094103.2001224-3-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit ec4ffd100ffb396eca13ebe7d18938ea80f399c3 Author: Nicolas Dichtel Date: Mon Jan 8 10:41:02 2024 +0100 Revert "net: rtnetlink: Enslave device before bringing it up" This reverts commit a4abfa627c3865c37e036bccb681619a50d3d93c. The patch broke: > ip link set dummy0 up > ip link set dummy0 master bond0 down This last command is useful to be able to enslave an interface with only one netlink message. After discussion, there is no good reason to support: > ip link set dummy0 down > ip link set dummy0 master bond0 up because the bond interface already set the slave up when it is up. Cc: stable@vger.kernel.org Fixes: a4abfa627c38 ("net: rtnetlink: Enslave device before bringing it up") Signed-off-by: Nicolas Dichtel Reviewed-by: Jiri Pirko Reviewed-by: Hangbin Liu Link: https://lore.kernel.org/r/20240108094103.2001224-2-nicolas.dichtel@6wind.com Signed-off-by: Jakub Kicinski commit 8722014311e613244f33952354956a82fa4b0472 Author: David Howells Date: Tue Jan 9 15:10:48 2024 +0000 rxrpc: Fix use of Don't Fragment flag rxrpc normally has the Don't Fragment flag set on the UDP packets it transmits, except when it has decided that DATA packets aren't getting through - in which case it turns it off just for the DATA transmissions. This can be a problem, however, for RESPONSE packets that convey authentication and crypto data from the client to the server as ticket may be larger than can fit in the MTU. In such a case, rxrpc gets itself into an infinite loop as the sendmsg returns an error (EMSGSIZE), which causes rxkad_send_response() to return -EAGAIN - and the CHALLENGE packet is put back on the Rx queue to retry, leading to the I/O thread endlessly attempting to perform the transmission. Fix this by disabling DF on RESPONSE packets for now. The use of DF and best data MTU determination needs reconsidering at some point in the future. Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Reported-by: Marc Dionne Signed-off-by: David Howells cc: linux-afs@lists.infradead.org Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/1581852.1704813048@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski commit 844f104790bd69c2e4dbb9ee3eba46fde1fcea7b Author: Vladimir Oltean Date: Wed Jan 10 02:33:54 2024 +0200 net: dsa: fix netdev_priv() dereference before check on non-DSA netdevice events After the blamed commit, we started doing this dereference for every NETDEV_CHANGEUPPER and NETDEV_PRECHANGEUPPER event in the system. static inline struct dsa_port *dsa_user_to_port(const struct net_device *dev) { struct dsa_user_priv *p = netdev_priv(dev); return p->dp; } Which is obviously bogus, because not all net_devices have a netdev_priv() of type struct dsa_user_priv. But struct dsa_user_priv is fairly small, and p->dp means dereferencing 8 bytes starting with offset 16. Most drivers allocate that much private memory anyway, making our access not fault, and we discard the bogus data quickly afterwards, so this wasn't caught. But the dummy interface is somewhat special in that it calls alloc_netdev() with a priv size of 0. So every netdev_priv() dereference is invalid, and we get this when we emit a NETDEV_PRECHANGEUPPER event with a VLAN as its new upper: $ ip link add dummy1 type dummy $ ip link add link dummy1 name dummy1.100 type vlan id 100 [ 43.309174] ================================================================== [ 43.316456] BUG: KASAN: slab-out-of-bounds in dsa_user_prechangeupper+0x30/0xe8 [ 43.323835] Read of size 8 at addr ffff3f86481d2990 by task ip/374 [ 43.330058] [ 43.342436] Call trace: [ 43.366542] dsa_user_prechangeupper+0x30/0xe8 [ 43.371024] dsa_user_netdevice_event+0xb38/0xee8 [ 43.375768] notifier_call_chain+0xa4/0x210 [ 43.379985] raw_notifier_call_chain+0x24/0x38 [ 43.384464] __netdev_upper_dev_link+0x3ec/0x5d8 [ 43.389120] netdev_upper_dev_link+0x70/0xa8 [ 43.393424] register_vlan_dev+0x1bc/0x310 [ 43.397554] vlan_newlink+0x210/0x248 [ 43.401247] rtnl_newlink+0x9fc/0xe30 [ 43.404942] rtnetlink_rcv_msg+0x378/0x580 Avoid the kernel oops by dereferencing after the type check, as customary. Fixes: 4c3f80d22b2e ("net: dsa: walk through all changeupper notifier functions") Reported-and-tested-by: syzbot+d81bcd883824180500c8@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/0000000000001d4255060e87545c@google.com/ Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20240110003354.2796778-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit b33fb5b801c6db408b774a68e7c8722796b59ecc Author: Lin Ma Date: Wed Jan 10 14:14:00 2024 +0800 net: qualcomm: rmnet: fix global oob in rmnet_policy The variable rmnet_link_ops assign a *bigger* maxtype which leads to a global out-of-bounds read when parsing the netlink attributes. See bug trace below: ================================================================== BUG: KASAN: global-out-of-bounds in validate_nla lib/nlattr.c:386 [inline] BUG: KASAN: global-out-of-bounds in __nla_validate_parse+0x24af/0x2750 lib/nlattr.c:600 Read of size 1 at addr ffffffff92c438d0 by task syz-executor.6/84207 CPU: 0 PID: 84207 Comm: syz-executor.6 Tainted: G N 6.1.0 #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8b/0xb3 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x172/0x475 mm/kasan/report.c:395 kasan_report+0xbb/0x1c0 mm/kasan/report.c:495 validate_nla lib/nlattr.c:386 [inline] __nla_validate_parse+0x24af/0x2750 lib/nlattr.c:600 __nla_parse+0x3e/0x50 lib/nlattr.c:697 nla_parse_nested_deprecated include/net/netlink.h:1248 [inline] __rtnl_newlink+0x50a/0x1880 net/core/rtnetlink.c:3485 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3594 rtnetlink_rcv_msg+0x43c/0xd70 net/core/rtnetlink.c:6091 netlink_rcv_skb+0x14f/0x410 net/netlink/af_netlink.c:2540 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x54e/0x800 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x930/0xe50 net/netlink/af_netlink.c:1921 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg+0x154/0x190 net/socket.c:734 ____sys_sendmsg+0x6df/0x840 net/socket.c:2482 ___sys_sendmsg+0x110/0x1b0 net/socket.c:2536 __sys_sendmsg+0xf3/0x1c0 net/socket.c:2565 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fdcf2072359 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 RSP: 002b:00007fdcf13e3168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fdcf219ff80 RCX: 00007fdcf2072359 RDX: 0000000000000000 RSI: 0000000020000200 RDI: 0000000000000003 RBP: 00007fdcf20bd493 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffbb8d7bdf R14: 00007fdcf13e3300 R15: 0000000000022000 The buggy address belongs to the variable: rmnet_policy+0x30/0xe0 The buggy address belongs to the physical page: page:0000000065bdeb3c refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x155243 flags: 0x200000000001000(reserved|node=0|zone=2) raw: 0200000000001000 ffffea00055490c8 ffffea00055490c8 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffffffff92c43780: f9 f9 f9 f9 00 00 00 02 f9 f9 f9 f9 00 00 00 07 ffffffff92c43800: f9 f9 f9 f9 00 00 00 05 f9 f9 f9 f9 06 f9 f9 f9 >ffffffff92c43880: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 ^ ffffffff92c43900: 00 00 00 00 00 00 00 00 07 f9 f9 f9 f9 f9 f9 f9 ffffffff92c43980: 00 00 00 07 f9 f9 f9 f9 00 00 00 05 f9 f9 f9 f9 According to the comment of `nla_parse_nested_deprecated`, the maxtype should be len(destination array) - 1. Hence use `IFLA_RMNET_MAX` here. Fixes: 14452ca3b5ce ("net: qualcomm: rmnet: Export mux_id and flags to netlink") Signed-off-by: Lin Ma Reviewed-by: Subash Abhinov Kasiviswanathan Reviewed-by: Simon Horman Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20240110061400.3356108-1-linma@zju.edu.cn Signed-off-by: Jakub Kicinski commit e689a876969833cb1317f8752cd064595e7b61e2 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Jan 10 21:34:10 2024 +0000 selftests/net/tcp-ao: Use LDLIBS instead of LDFLAGS The rules to link selftests are: > $(OUTPUT)/%_ipv4: %.c > $(LINK.c) $^ $(LDLIBS) -o $@ > > $(OUTPUT)/%_ipv6: %.c > $(LINK.c) -DIPV6_TEST $^ $(LDLIBS) -o $@ The intel test robot uses only selftest's Makefile, not the top linux Makefile: > make W=1 O=/tmp/kselftest -C tools/testing/selftests So, $(LINK.c) is determined by environment, rather than by kernel Makefiles. On my machine (as well as other people that ran tcp-ao selftests) GNU/Make implicit definition does use $(LDFLAGS): > [dima@Mindolluin ~]$ make -p -f/dev/null | grep '^LINK.c\>' > make: *** No targets. Stop. > LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) But, according to build robot report, it's not the case for them. While I could just avoid using pre-defined $(LINK.c), it's also used by selftests/lib.mk by default. Anyways, according to GNU/Make documentation [1], I should have used $(LDLIBS) instead of $(LDFLAGS) in the first place, so let's just do it: > LDFLAGS > Extra flags to give to compilers when they are supposed to invoke > the linker, ‘ld’, such as -L. Libraries (-lfoo) should be added > to the LDLIBS variable instead. > LDLIBS > Library flags or names given to compilers when they are supposed > to invoke the linker, ‘ld’. LOADLIBES is a deprecated (but still > supported) alternative to LDLIBS. Non-library linker flags, such > as -L, should go in the LDFLAGS variable. [1]: https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html Fixes: cfbab37b3da0 ("selftests/net: Add TCP-AO library") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401011151.veyYTJzq-lkp@intel.com/ Signed-off-by: Dmitry Safonov Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/20240110-tcp_ao-selftests-makefile-v1-1-aa07d043f052@arista.com Signed-off-by: Jakub Kicinski commit b3739fb3a9e6633b233d829ee799323d75162775 Author: Arnd Bergmann Date: Thu Jan 11 17:27:53 2024 +0100 wangxunx: select CONFIG_PHYLINK where needed The ngbe driver needs phylink: arm-linux-gnueabi-ld: drivers/net/ethernet/wangxun/libwx/wx_ethtool.o: in function `wx_nway_reset': wx_ethtool.c:(.text+0x458): undefined reference to `phylink_ethtool_nway_reset' arm-linux-gnueabi-ld: drivers/net/ethernet/wangxun/ngbe/ngbe_main.o: in function `ngbe_remove': ngbe_main.c:(.text+0x7c): undefined reference to `phylink_destroy' arm-linux-gnueabi-ld: drivers/net/ethernet/wangxun/ngbe/ngbe_main.o: in function `ngbe_open': ngbe_main.c:(.text+0xf90): undefined reference to `phylink_connect_phy' arm-linux-gnueabi-ld: drivers/net/ethernet/wangxun/ngbe/ngbe_mdio.o: in function `ngbe_mdio_init': ngbe_mdio.c:(.text+0x314): undefined reference to `phylink_create' Add the missing Kconfig description for this. Fixes: bc2426d74aa3 ("net: ngbe: convert phylib to phylink") Signed-off-by: Arnd Bergmann Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20240111162828.68564-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit f9678f5825dd852b7201132e36691fefb17d49ce Author: Jakub Kicinski Date: Tue Jan 9 08:45:17 2024 -0800 MAINTAINERS: ibmvnic: drop Dany from reviewers I missed that Dany uses a different email address when tagging patches (drt@linux.ibm.com) and asked him if he's still actively working on ibmvnic. He doesn't really fall under our removal criteria, but he admitted that he already moved on to other projects. Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240109164517.3063131-8-kuba@kernel.org Signed-off-by: Jakub Kicinski commit bd93edbfd70cdea6e2313c87c3bae5b05bbb947e Author: Jakub Kicinski Date: Tue Jan 9 08:45:16 2024 -0800 MAINTAINERS: mark ax25 as Orphan We haven't heard from Ralf for two years, according to lore. We get a constant stream of "fixes" to ax25 from people using code analysis tools. Nobody is reviewing those, let's reflect this reality in MAINTAINERS. Subsystem AX.25 NETWORK LAYER Changes 9 / 59 (15%) (No activity) Top reviewers: [2]: mkl@pengutronix.de [2]: edumazet@google.com [2]: stefan@datenfreihafen.org INACTIVE MAINTAINER Ralf Baechle Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240109164517.3063131-7-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 0bfcdce867f70a8309fe120eb5a9fff2fc54e8b6 Author: Jakub Kicinski Date: Tue Jan 9 08:45:15 2024 -0800 MAINTAINERS: Bluetooth: retire Johan (for now?) Johan moved to maintaining the Zephyr Bluetooth stack, and we haven't heard from him on the ML in 3 years (according to lore), and seen any tags in git in 4 years. Trade the MAINTAINER entry for CREDITS, we can revert whenever Johan comes back to Linux hacking :) Subsystem BLUETOOTH SUBSYSTEM Changes 173 / 986 (17%) Last activity: 2023-12-22 Marcel Holtmann : Author 91cb4c19118a 2022-01-27 00:00:00 52 Committer edcb185fa9c4 2022-05-23 00:00:00 446 Tags 000c2fa2c144 2023-04-23 00:00:00 523 Johan Hedberg : Luiz Augusto von Dentz : Author d03376c18592 2023-12-22 00:00:00 241 Committer da9065caa594 2023-12-22 00:00:00 341 Tags da9065caa594 2023-12-22 00:00:00 493 Top reviewers: [33]: alainm@chromium.org [31]: mcchou@chromium.org [27]: abhishekpandit@chromium.org INACTIVE MAINTAINER Johan Hedberg Link: https://lore.kernel.org/r/20240109164517.3063131-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 384a35866f3a2b75f0c12e09e1bc486ef96cb5f5 Author: Jakub Kicinski Date: Tue Jan 9 08:45:14 2024 -0800 MAINTAINERS: eth: mark Cavium liquidio as an Orphan We haven't seen much review activity from the liquidio maintainers for years. Reflect that reality in MAINTAINERS. Our scripts report: Subsystem CAVIUM LIQUIDIO NETWORK DRIVER Changes 30 / 87 (34%) Last activity: 2019-01-28 Derek Chickles : Tags ac93e2fa8550 2019-01-28 00:00:00 1 Satanand Burla : Felix Manlunas : Tags ac93e2fa8550 2019-01-28 00:00:00 1 Top reviewers: [5]: simon.horman@corigine.com [4]: keescook@chromium.org [4]: jiri@nvidia.com INACTIVE MAINTAINER Satanand Burla Acked-by: Derek Chickles Link: https://lore.kernel.org/r/20240109164517.3063131-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 009a98bca6347d0bd9cf0c31691331e68f0ee380 Author: Jakub Kicinski Date: Tue Jan 9 08:45:13 2024 -0800 MAINTAINERS: eth: mvneta: move Thomas to CREDITS Thomas is still active in other bits of the kernel and beyond but not as much on the Marvell Ethernet devices. Our scripts report: Subsystem MARVELL MVNETA ETHERNET DRIVER Changes 54 / 176 (30%) (No activity) Top reviewers: [12]: hawk@kernel.org [9]: toke@redhat.com [9]: john.fastabend@gmail.com INACTIVE MAINTAINER Thomas Petazzoni Acked-by: Thomas Petazzoni Link: https://lore.kernel.org/r/20240109164517.3063131-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit b59d8485fe7fda864e10800085ce1d19c321922a Author: Jakub Kicinski Date: Tue Jan 9 08:45:12 2024 -0800 MAINTAINERS: eth: mt7530: move Landen Chao to CREDITS mt7530 is a pretty active driver and last we have heard from Landen Chao on the list was March. There were total of 4 message from them in the last 2.5 years. I think it's time to move to CREDITS. Subsystem MEDIATEK SWITCH DRIVER Changes 94 / 169 (55%) Last activity: 2023-10-11 Arınç ÜNAL : Author e94b590abfff 2023-08-19 00:00:00 12 Tags e94b590abfff 2023-08-19 00:00:00 16 Daniel Golle : Author 91daa4f62ce8 2023-04-19 00:00:00 17 Tags ac49b992578d 2023-10-11 00:00:00 20 Landen Chao : DENG Qingfang : Author 342afce10d6f 2021-10-18 00:00:00 24 Tags 342afce10d6f 2021-10-18 00:00:00 25 Sean Wang : Tags c288575f7810 2020-09-14 00:00:00 5 Top reviewers: [46]: f.fainelli@gmail.com [29]: andrew@lunn.ch [19]: olteanv@gmail.com INACTIVE MAINTAINER Landen Chao Acked-by: Arınç ÜNAL Link: https://lore.kernel.org/r/20240109164517.3063131-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit da14d1fed9c1e2f56a58dcd980d1395121c4665f Author: Jakub Kicinski Date: Tue Jan 9 08:45:11 2024 -0800 MAINTAINERS: eth: mtk: move John to CREDITS John is still active in other bits of the kernel but not much on the MediaTek ethernet switch side. Our scripts report: Subsystem MEDIATEK ETHERNET DRIVER Changes 81 / 384 (21%) Last activity: 2023-12-21 Felix Fietkau : Author c6d96df9fa2c 2023-05-02 00:00:00 42 Tags c6d96df9fa2c 2023-05-02 00:00:00 48 John Crispin : Sean Wang : Author 880c2d4b2fdf 2019-06-03 00:00:00 5 Tags a5d75538295b 2020-04-07 00:00:00 7 Mark Lee : Author 8d66a8183d0c 2019-11-14 00:00:00 4 Tags 8d66a8183d0c 2019-11-14 00:00:00 4 Lorenzo Bianconi : Author 7cb8cd4daacf 2023-12-21 00:00:00 98 Tags 7cb8cd4daacf 2023-12-21 00:00:00 112 Top reviewers: [18]: horms@kernel.org [15]: leonro@nvidia.com [8]: rmk+kernel@armlinux.org.uk INACTIVE MAINTAINER John Crispin Reviewed-by: Simon Horman Signed-off-by: John Crispin Link: https://lore.kernel.org/r/20240109164517.3063131-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 5ecba0101dfe1cc4b7bbc29ae3a4a06a2e55a823 Merge: 3e7aeb78ab01c c155eca07647b Author: Jakub Kicinski Date: Thu Jan 11 16:16:08 2024 -0800 Merge branch 'fix-module_description-for-net-p1' Breno Leitao says: ==================== Fix MODULE_DESCRIPTION() for net (p1) There are hundreds of network modules that misses MODULE_DESCRIPTION(), causing a warnning when compiling with W=1. Example: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/com90io.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/arc-rimi.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/net/arcnet/com20020.o ==================== Link: https://lore.kernel.org/r/20240108181610.2697017-1-leitao@debian.org Signed-off-by: Jakub Kicinski commit c155eca07647bac84cbce690b4257605f5740dda Author: Breno Leitao Date: Mon Jan 8 10:16:09 2024 -0800 net: fill in MODULE_DESCRIPTION()s for s2io W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Neterion 10GbE (s2io) driver. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240108181610.2697017-10-leitao@debian.org Signed-off-by: Jakub Kicinski commit ade98756128a63dbb801b9d3948c6954cc81b473 Author: Breno Leitao Date: Mon Jan 8 10:16:08 2024 -0800 net: fill in MODULE_DESCRIPTION()s for ds26522 module W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to Slic Maxim ds26522 card driver. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240108181610.2697017-9-leitao@debian.org Signed-off-by: Jakub Kicinski commit d8610e431fe53ee3a1a11a7f25528b03f8a0b1c7 Author: Breno Leitao Date: Mon Jan 8 10:16:05 2024 -0800 net: fill in MODULE_DESCRIPTION()s for Sun RPC W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to Sun RPC modules. Signed-off-by: Breno Leitao Reviewed-by: Jeff Layton Link: https://lore.kernel.org/r/20240108181610.2697017-6-leitao@debian.org Signed-off-by: Jakub Kicinski commit 95c236cc5fc9f09fc4cf58767fa7c01f2425ad6b Author: Breno Leitao Date: Mon Jan 8 10:16:04 2024 -0800 net: fill in MODULE_DESCRIPTION()s for NFC W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to all NFC Controller Interface (NCI) modules. Signed-off-by: Breno Leitao Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240108181610.2697017-5-leitao@debian.org Signed-off-by: Jakub Kicinski commit 417d8c571cb49fcace83a6b6477da2970802bf26 Author: Breno Leitao Date: Mon Jan 8 10:16:03 2024 -0800 net: fill in MODULE_DESCRIPTION()s for HSR W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to High-availability Seamless Redundancy (HSR) driver. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240108181610.2697017-4-leitao@debian.org Signed-off-by: Jakub Kicinski commit e1b1d282d5ccabbf17e5556191af248a35293e16 Author: Breno Leitao Date: Mon Jan 8 10:16:02 2024 -0800 net: fill in MODULE_DESCRIPTION()s for SLIP W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Serial Line (SLIP) protocol modules. Signed-off-by: Breno Leitao Link: https://lore.kernel.org/r/20240108181610.2697017-3-leitao@debian.org Signed-off-by: Jakub Kicinski commit 22d29f1112c85c1ad519a8c0403f7f7289cf060c Merge: 4c72e2b8c42e5 45a2c87f28ad0 Author: Linus Torvalds Date: Thu Jan 11 14:24:32 2024 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "Updates to the usual drivers (ufs, mpi3mr, mpt3sas, lpfc, fnic, hisi_sas, arcmsr, ) plus the usual assorted minor fixes and updates. This time around there's only a single line update to the core, so nothing major and barely anything minor" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (135 commits) scsi: ufs: core: Simplify ufshcd_auto_hibern8_update() scsi: ufs: core: Rename ufshcd_auto_hibern8_enable() and make it static scsi: ufs: qcom: Fix ESI vector mask scsi: ufs: host: Fix kernel-doc warning scsi: hisi_sas: Correct the number of global debugfs registers scsi: hisi_sas: Rollback some operations if FLR failed scsi: hisi_sas: Check before using pointer variables scsi: hisi_sas: Replace with standard error code return value scsi: hisi_sas: Set .phy_attached before notifing phyup event HISI_PHYE_PHY_UP_PM scsi: ufs: core: Add sysfs node for UFS RTC update scsi: ufs: core: Add UFS RTC support scsi: ufs: core: Add ufshcd_is_ufs_dev_busy() scsi: ufs: qcom: Remove unused definitions scsi: ufs: qcom: Use ufshcd_rmwl() where applicable scsi: ufs: qcom: Remove support for host controllers older than v2.0 scsi: ufs: qcom: Simplify ufs_qcom_{assert/deassert}_reset scsi: ufs: qcom: Initialize cycles_in_1us variable in ufs_qcom_set_core_clk_ctrl() scsi: ufs: qcom: Sort includes alphabetically scsi: ufs: qcom: Remove unused ufs_qcom_hosts struct array scsi: ufs: qcom: Use dev_err_probe() to simplify error handling of devm_gpiod_get_optional() ... commit 4c72e2b8c42e57f65d8fbfb01329e79d2b450653 Merge: 01d550f0fcc06 6ff1407e24e6f Author: Linus Torvalds Date: Thu Jan 11 14:19:23 2024 -0800 Merge tag 'for-6.8/io_uring-2024-01-08' of git://git.kernel.dk/linux Pull io_uring updates from Jens Axboe: "Mostly just come fixes and cleanups, but one feature as well. In detail: - Harden the check for handling IOPOLL based on return (Pavel) - Various minor optimizations (Pavel) - Drop remnants of SCM_RIGHTS fd passing support, now that it's no longer supported since 6.7 (me) - Fix for a case where bytes_done wasn't initialized properly on a failure condition for read/write requests (me) - Move the register related code to a separate file (me) - Add support for returning the provided ring buffer head (me) - Add support for adding a direct descriptor to the normal file table (me, Christian Brauner) - Fix for ensuring pending task_work for a ring with DEFER_TASKRUN is run even if we timeout waiting (me)" * tag 'for-6.8/io_uring-2024-01-08' of git://git.kernel.dk/linux: io_uring: ensure local task_work is run on wait timeout io_uring/kbuf: add method for returning provided buffer ring head io_uring/rw: ensure io->bytes_done is always initialized io_uring: drop any code related to SCM_RIGHTS io_uring/unix: drop usage of io_uring socket io_uring/register: move io_uring_register(2) related code to register.c io_uring/openclose: add support for IORING_OP_FIXED_FD_INSTALL io_uring/cmd: inline io_uring_cmd_get_task io_uring/cmd: inline io_uring_cmd_do_in_task_lazy io_uring: split out cmd api into a separate header io_uring: optimise ltimeout for inline execution io_uring: don't check iopoll if request completes commit 716089b417cf98d01f0dc1b39f9c47e1d7b4c965 Author: Geert Uytterhoeven Date: Thu Jan 11 09:50:25 2024 +0100 of: unittest: Fix of_count_phandle_with_args() expected value message The expected result value for the call to of_count_phandle_with_args() was updated from 7 to 8, but the accompanying error message was forgotten. Fixes: 4dde83569832f937 ("of: Fix double free in of_parse_phandle_with_args_map") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20240111085025.2073894-1-geert+renesas@glider.be Signed-off-by: Rob Herring commit 01d550f0fcc06c7292f79a6f1453aac122d1d2c8 Merge: d05e626603d57 587371ed783b0 Author: Linus Torvalds Date: Thu Jan 11 13:58:04 2024 -0800 Merge tag 'for-6.8/block-2024-01-08' of git://git.kernel.dk/linux Pull block updates from Jens Axboe: "Pretty quiet round this time around. This contains: - NVMe updates via Keith: - nvme fabrics spec updates (Guixin, Max) - nvme target udpates (Guixin, Evan) - nvme attribute refactoring (Daniel) - nvme-fc numa fix (Keith) - MD updates via Song: - Fix/Cleanup RCU usage from conf->disks[i].rdev (Yu Kuai) - Fix raid5 hang issue (Junxiao Bi) - Add Yu Kuai as Reviewer of the md subsystem - Remove deprecated flavors (Song Liu) - raid1 read error check support (Li Nan) - Better handle events off-by-1 case (Alex Lyakas) - Efficiency improvements for passthrough (Kundan) - Support for mapping integrity data directly (Keith) - Zoned write fix (Damien) - rnbd fixes (Kees, Santosh, Supriti) - Default to a sane discard size granularity (Christoph) - Make the default max transfer size naming less confusing (Christoph) - Remove support for deprecated host aware zoned model (Christoph) - Misc fixes (me, Li, Matthew, Min, Ming, Randy, liyouhong, Daniel, Bart, Christoph)" * tag 'for-6.8/block-2024-01-08' of git://git.kernel.dk/linux: (78 commits) block: Treat sequential write preferred zone type as invalid block: remove disk_clear_zoned sd: remove the !ZBC && blk_queue_is_zoned case in sd_read_block_characteristics drivers/block/xen-blkback/common.h: Fix spelling typo in comment blk-cgroup: fix rcu lockdep warning in blkg_lookup() blk-cgroup: don't use removal safe list iterators block: floor the discard granularity to the physical block size mtd_blkdevs: use the default discard granularity bcache: use the default discard granularity zram: use the default discard granularity null_blk: use the default discard granularity nbd: use the default discard granularity ubd: use the default discard granularity block: default the discard granularity to sector size bcache: discard_granularity should not be smaller than a sector block: remove two comments in bio_split_discard block: rename and document BLK_DEF_MAX_SECTORS loop: don't abuse BLK_DEF_MAX_SECTORS aoe: don't abuse BLK_DEF_MAX_SECTORS null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS ... commit 22439cf4d1ca4861820b825f4f07958bdaed12d6 Author: Michal Simek Date: Tue Jan 9 14:32:39 2024 +0100 dt-bindings: fpga: altera: Convert bridge bindings to yaml Convert Altera's bridges to yaml with using fpga-bridge.yaml. Signed-off-by: Michal Simek Reviewed-by: Xu Yilun Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/07d646a6d82cc21b100e45ced7cae3ef05faa2cc.1704807147.git.michal.simek@amd.com Signed-off-by: Rob Herring commit 36a7c96b3f265fd2bc5f518ae2fc60bed578da30 Author: Michal Simek Date: Tue Jan 9 14:32:38 2024 +0100 dt-bindings: fpga: Convert bridge binding to yaml Convert the generic fpga bridge DT binding to json-schema. Signed-off-by: Michal Simek Reviewed-by: Xu Yilun Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/14558a4dcfab5255c1683015287e9c7f48b1afc2.1704807147.git.michal.simek@amd.com Signed-off-by: Rob Herring commit 9defbb1bcf973b43bef7e9960bc0006bdf38dfb2 Author: Yoshinori Sato Date: Tue Jan 9 17:23:23 2024 +0900 dt-bindings: vendor-prefixes: Add smi Add Silicon Mortion Technology Corporation https://www.siliconmotion.com/ Signed-off-by: Yoshinori Sato Acked-by: Conor Dooley Link: https://lore.kernel.org/r/c8aaf67e3fcdb7e60632c53a784691aabfc7733e.1704788539.git.ysato@users.sourceforge.jp Signed-off-by: Rob Herring commit d05e626603d57936314816433db8bf1d34b5a504 Merge: 893e2f9eac9ec fa7280e5dd815 Author: Linus Torvalds Date: Thu Jan 11 13:49:00 2024 -0800 Merge tag 'ata-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata updates from Damien Le Moal: - Cleanup the pxa PATA driver to use dma_request_chan() instead of the deprecated dma_request_slave_channel(). - Add Niklas as co-maintainer of the ata subsystem. * tag 'ata-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: MAINTAINERS: Add Niklas Cassel as libata maintainer ata: pata_pxa: convert not to use dma_request_slave_channel() commit 893e2f9eac9ec8d65a5ae2d99656d5e9f7bd76e2 Merge: 457e4f99765cc b07bc2347672c Author: Linus Torvalds Date: Thu Jan 11 13:46:50 2024 -0800 Merge tag 'dma-mapping-6.8-2024-01-08' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - reduce area lock contention for non-primary IO TLB pools (Petr Tesarik) - don't store redundant offsets in the dma_ranges stuctures (Robin Murphy) - clear dev->dma_mem when freeing per-device pools (Joakim Zhang) * tag 'dma-mapping-6.8-2024-01-08' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: clear dev->dma_mem to NULL after freeing it swiotlb: reduce area lock contention for non-primary IO TLB pools dma-mapping: don't store redundant offsets commit 457e4f99765cc41d0b90e1385f51b848d6a921d0 Merge: 2518f39af6ba6 c52391fafcefe Author: Linus Torvalds Date: Thu Jan 11 13:12:59 2024 -0800 Merge tag 'auxdisplay-6.8' of https://github.com/ojeda/linux Pull auxdisplay update from Miguel Ojeda: "A single cleanup for 'img-ascii-lcd' to use 'device_get_match_data()'" * tag 'auxdisplay-6.8' of https://github.com/ojeda/linux: auxdisplay: img-ascii-lcd: Use device_get_match_data() commit 2518f39af6ba671964193c249ad1e307b51fd31a Merge: b6964fe2398cb 5a205c6a9f79d Author: Linus Torvalds Date: Thu Jan 11 13:11:32 2024 -0800 Merge tag 'clang-format-6.8' of https://github.com/ojeda/linux Pull clang-format updates from Miguel Ojeda: "A routine update of the 'for_each' macro list" * tag 'clang-format-6.8' of https://github.com/ojeda/linux: clang-format: Update with v6.7-rc4's `for_each` macro list clang-format: Add maple tree's for_each macros commit b6964fe2398cb8939c3d4fc6960a6be93687305d Merge: 5bad490858c3e 711cbfc717650 Author: Linus Torvalds Date: Thu Jan 11 13:05:41 2024 -0800 Merge tag 'rust-6.8' of https://github.com/Rust-for-Linux/linux Pull Rust updates from Miguel Ojeda: "Another routine one in terms of features. In terms of lines, this time the 'alloc' version upgrade is less prominent, given that it was fairly small (and we did not have two upgrades) Toolchain and infrastructure: - Upgrade to Rust 1.74.1 The patch release includes a fix for an ICE that the Apple AGX GPU driver was hitting - Support 'srctree'-relative links in Rust code documentation - Automate part of the manual constants handling (i.e. the ones not recognised by 'bindgen') - Suppress searching builtin sysroot to avoid confusion with installed sysroots, needed for the to-be-merged arm64 support which uses a builtin target - Ignore '__preserve_most' functions for 'bindgen' - Reduce header inclusion bloat in exports 'kernel' crate: - Implement 'Debug' for 'CString' - Make 'CondVar::wait()' an uninterruptible wait 'macros' crate: - Update 'paste!' to accept string literals - Improve '#[vtable]' documentation Documentation: - Add testing section (KUnit and 'rusttest' target) - Remove 'CC=clang' mentions - Clarify that 'rustup override' applies to build directory" * tag 'rust-6.8' of https://github.com/Rust-for-Linux/linux: docs: rust: Clarify that 'rustup override' applies to build directory docs: rust: Add rusttest info docs: rust: remove `CC=clang` mentions rust: support `srctree`-relative links rust: sync: Makes `CondVar::wait()` an uninterruptible wait rust: upgrade to Rust 1.74.1 rust: Suppress searching builtin sysroot rust: macros: improve `#[vtable]` documentation rust: macros: update 'paste!' macro to accept string literals rust: bindings: rename const binding using sed rust: Ignore preserve-most functions rust: replace with in rust/exports.c rust: kernel: str: Implement Debug for CString commit 3f302388d45855c0b24802e7b414e3fb29f172e3 Author: Jens Axboe Date: Thu Jan 11 13:34:33 2024 -0700 io_uring/rsrc: improve code generation for fixed file assignment For the normal read/write path, we have already locked the ring submission side when assigning the file. This causes branch mispredictions when we then check and try and lock again in io_req_set_rsrc_node(). As this is a very hot path, this matters. Add a basic helper that already assumes we already have it locked, and use that in io_file_get_fixed(). Signed-off-by: Jens Axboe commit 5bad490858c3ebdbb47e622e8f9049f828d2abba Merge: fb249b275c591 c2dba4d19f654 Author: Linus Torvalds Date: Thu Jan 11 12:14:32 2024 -0800 Merge tag 'soc-defconfig-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC defconfig updates from Arnd Bergmann: "As usual, the arm32 and arm64 defconfig files get changed to account for added device drivers that can now be used. The files are also refreshed to reflect the more recent Kconfig changes that are going into v6.8" * tag 'soc-defconfig-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (30 commits) ARM: defconfig: remove dead platform options ARM: defconfig: remove CONFIG_SLUB references ARM: defconfig: remove CONFIG_NET_ETHERNET references ARM: defconfig: remove sysfs-deprecated entries ARM: defconfig: reorder config lines arm64: defconfig reorder config lines ARM: multi_v7_defconfig: Enable STM32 IPCC mailbox driver arm64: defconfig: Enable Qualcomm SC8280XP camera clock controller ARM: multi_v7_defconfig: Enable RPMSG CHAR and CTRL ARM: multi_v7_defconfig: enable STM32 DCMIPP media support arm64: defconfig: enable GPU clock controller for SM8[45]50 arm64: defconfig: Enable X1E80100 SoC base configs arm64: defconfig: enable Qualcomm WSA884x driver arm64: defconfig: enable Qualcomm UEFI Secure App driver arm64: defconfig: enable Qualcomm sc8280xp sound drivers arm64: defconfig: enable clock controller and pinctrl arm64: defconfig: Enable DRM_POWERVR arm64: defconfig: Enable configs for MT8195-Cherry-Tomato Chromebook arm64: defconfig: Enable DA9211 regulator arm64: deconfig: enable Qualcomm SM8650 SoC drivers ... commit 47f2bd2ff382e5fe766b1322e354558a8da4a470 Author: Jason Gunthorpe Date: Wed Jan 3 11:27:22 2024 -0400 iommufd/selftest: Check the bus type during probe This relied on the probe function only being invoked by the bus type mock was registered on. The removal of the bus ops broke this assumption and the probe could be called on non-mock bus types like PCI. Check the bus type directly in probe. Fixes: 17de3f5fdd35 ("iommu: Retire bus ops") Link: https://lore.kernel.org/r/0-v1-82d59f7eab8c+40c-iommufd_mock_bus_jgg@nvidia.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe commit f6f3721244a8224fa97952b34fbb21e4ee40e8a8 Author: Lu Baolu Date: Wed Jan 10 20:10:15 2024 -0800 iommu/vt-d: Add iotlb flush for nested domain This implements the .cache_invalidate_user() callback to support iotlb flush for nested domain. Link: https://lore.kernel.org/r/20240111041015.47920-9-yi.l.liu@intel.com Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Co-developed-by: Yi Liu Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe commit fb249b275c591f064853157bf2b378fcedd6381b Merge: f6597d17069a6 40974ee421b4d Author: Linus Torvalds Date: Thu Jan 11 11:42:53 2024 -0800 Merge tag 'soc-arm-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC code updates from Arnd Bergmann: "There are two notable changes this time: - add a arch/arm/Kconfig.platforms file to simplify the platforms that have no code except their Kconfig file (Andrew Davis) - remove support for the ARM11MPCore CPU in the versatile/realview platform. Since this is the last remaining one after removing ox820, some core code can go as well (Linus Walleij) The other changes are minor cleanups and bugfixes" * tag 'soc-arm-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: davinci: always select CONFIG_CPU_ARM926T soc: pxa: ssp: fix casts ARM: debug: fix DEBUG_UNCOMPRESS help for !MULTIPLATFORM ARM: MAINTAINERS: drop empty entries for removed boards ARM: Delete ARM11MPCore perf leftovers ARM: mach-nspire: Rework support and directory structure ARM: mach-sunplus: Rework support and directory structure ARM: mach-airoha: Rework support and directory structure ARM: mach-moxart: Move MOXA ART support into Kconfig.platforms ARM: mach-uniphier: Move Socionext UniPhier support into Kconfig.platforms ARM: mach-rda: Move RDA Micro support into Kconfig.platforms ARM: mach-asm9260: Move ASM9260 support into Kconfig.platforms ARM: Kconfig: move platform selection into its own Kconfig file ARM: Delete ARM11MPCore (ARM11 ARMv6K SMP) support MAINTAINERS: add Marvell MBus driver to Marvell EBU SoCs support ARM: mxs: Do not search for "fsl,clkctrl" ARM: imx: Use device_get_match_data() MAINTAINERS: add omap bus drivers to OMAP2+ SUPPORT ARM: at91: pm: set soc_pm.data.mode in at91_pm_secure_init() commit f6597d17069a67819f57569e44ac9069f0b829e8 Merge: c4101e55974cc db0a7c09b2a55 Author: Linus Torvalds Date: Thu Jan 11 11:31:46 2024 -0800 Merge tag 'soc-drivers-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC driver updates from Arnd Bergmann: "A new drivers/cache/ subsystem is added to contain drivers for abstracting cache flush methods on riscv and potentially others, as this is needed for handling non-coherent DMA but several SoCs require nonstandard hardware methods for it. op-tee gains support for asynchronous notification with FF-A, as well as support for a system thread for executing in secure world. The tee, reset, bus, memory and scmi subsystems have a couple of minor updates. Platform specific soc driver changes include: - Samsung Exynos gains driver support for Google GS101 (Tensor G1) across multiple subsystems - Qualcomm Snapdragon gains support for SM8650 and X1E along with added features for some other SoCs - Mediatek adds support for "Smart Voltage Scaling" on MT8186 and MT8195, and driver support for MT8188 along with some code refactoring. - Microchip Polarfire FPGA support for "Auto Update" of the FPGA bitstream - Apple M1 mailbox driver is rewritten into a SoC driver - minor updates on amlogic, mvebu, ti, zynq, imx, renesas and hisilicon" * tag 'soc-drivers-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (189 commits) memory: ti-emif-pm: Convert to platform remove callback returning void memory: ti-aemif: Convert to platform remove callback returning void memory: tegra210-emc: Convert to platform remove callback returning void memory: tegra186-emc: Convert to platform remove callback returning void memory: stm32-fmc2-ebi: Convert to platform remove callback returning void memory: exynos5422-dmc: Convert to platform remove callback returning void memory: renesas-rpc-if: Convert to platform remove callback returning void memory: omap-gpmc: Convert to platform remove callback returning void memory: mtk-smi: Convert to platform remove callback returning void memory: jz4780-nemc: Convert to platform remove callback returning void memory: fsl_ifc: Convert to platform remove callback returning void memory: fsl-corenet-cf: Convert to platform remove callback returning void memory: emif: Convert to platform remove callback returning void memory: brcmstb_memc: Convert to platform remove callback returning void memory: brcmstb_dpfe: Convert to platform remove callback returning void soc: qcom: llcc: Fix LLCC_TRP_ATTR2_CFGn offset firmware: qcom: qseecom: fix memory leaks in error paths dt-bindings: clock: google,gs101: rename CMU_TOP gate defines soc: qcom: llcc: Fix typo in kernel-doc dt-bindings: soc: qcom,aoss-qmp: document the X1E80100 Always-On Subsystem side channel ... commit c4101e55974cc7d835fbd2d8e01553a3f61e9e75 Merge: 3e7aeb78ab01c 18a1ee9d716d3 Author: Linus Torvalds Date: Thu Jan 11 11:23:17 2024 -0800 Merge tag 'soc-dt-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull SoC DT updates from Arnd Bergmann: "There is one new SoC for each 32-bit Arm and 64-bit RISC-V, but both the Rockchips rv1109 and Sopgho CV1812H are just minor variations of already supported chips. The other six new SoCs are all part of existing arm64 families, but are somewhat more interesting: - Samsung ExynosAutov920 is an automotive chip, and the first one we support based on the Cortex-A78AE core with lockstep mode. - Google gs101 (Tensor G1) is the chip used in a number of Pixel phones, and is grouped with Samsung Exynos here since it is based on the same SoC design, sharing most of its IP blocks with that series. - MediaTek MT8188 is a new chip used for mid-range tablets and Chromebooks, using two Cortex-A78 cores where the older MT8195 had four of them. - Qualcomm SM8650 (Snapdragon 8 Gen 3) is their current top range phone SoC and the first supported chip based on Cortex-X4, Cortex-A720 and Cortex-A520. - Qualcomm X1E80100 (Snapdragon X Elite) in turn is the latest Laptop chip using the custom Oryon cores. - Unisoc UMS9620 (Tanggula 7 series) is a 5G phone SoC based on Cortex-A76 and Cortex-A55 In terms of boards, we have - Five old Microsoft Lumia phones, the HTC One Mini 2, Motorola Moto G 4G, and Huawei Honor 5X/GR5, all based on Snapdragon SoCs. - Multiple Rockchips mobile gaming systems (Anbernic RG351V, Powkiddy RK2023, Powkiddy X55) along with the Sonoff iHost Smart Home Hub and a few Rockchips SBCs - Some ComXpress boards based on Marvell CN913x, which is the follow-up to Armada 7xxx/8xxx. - Six new industrial/embedded boards based on NXP i.MX8 and i.MX9 - Mediatek MT8183 based Chromebooks from Lenovo, Asus and Acer. - Toradex Verdin AM62 Mallow carrier for TI AM62 - Huashan Pi board based on the SophGo CV1812H RISC-V chip - Two boards based on Allwinner H616/H618 - A number of reference boards for various added SoCs from Qualcomm, Mediatek, Google, Samsung, NXP and Spreadtrum As usual, there are cleanups and warning fixes across all platforms as well as added features for several of them" * tag 'soc-dt-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (857 commits) ARM: dts: usr8200: Fix phy registers arm64: dts: intel: minor whitespace cleanup around '=' arm64: dts: socfpga: agilex: drop redundant status arm64: dts: socfpga: agilex: add unit address to soc node arm64: dts: socfpga: agilex: move firmware out of soc node arm64: dts: socfpga: agilex: move FPGA region out of soc node arm64: dts: socfpga: agilex: align pin-controller name with bindings arm64: dts: socfpga: stratix10_swvp: drop unsupported DW MSHC properties arm64: dts: socfpga: stratix10_socdk: align NAND chip name with bindings arm64: dts: socfpga: stratix10: add unit address to soc node arm64: dts: socfpga: stratix10: move firmware out of soc node arm64: dts: socfpga: stratix10: move FPGA region out of soc node arm64: dts: socfpga: stratix10: align pincfg nodes with bindings arm64: dts: socfpga: stratix10: add clock-names to DWC2 USB arm64: dts: socfpga: drop unsupported cdns,page-size and cdns,block-size ARM: dts: socfpga: align NAND controller name with bindings ARM: dts: socfpga: drop unsupported cdns,page-size and cdns,block-size arm64: dts: rockchip: Fix led pinctrl of lubancat 1 arm64: dts: rockchip: correct gpio_pwrctrl1 typo on nanopc-t6 arm64: dts: rockchip: correct gpio_pwrctrl1 typo on rock-5b ... commit 3e7aeb78ab01c2c2f0e1f784e5ddec88fcd3d106 Merge: de927f6c0b07d a7fe0881d9b78 Author: Linus Torvalds Date: Thu Jan 11 10:07:29 2024 -0800 Merge tag 'net-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Paolo Abeni: "The most interesting thing is probably the networking structs reorganization and a significant amount of changes is around self-tests. Core & protocols: - Analyze and reorganize core networking structs (socks, netdev, netns, mibs) to optimize cacheline consumption and set up build time warnings to safeguard against future header changes This improves TCP performances with many concurrent connections up to 40% - Add page-pool netlink-based introspection, exposing the memory usage and recycling stats. This helps indentify bad PP users and possible leaks - Refine TCP/DCCP source port selection to no longer favor even source port at connect() time when IP_LOCAL_PORT_RANGE is set. This lowers the time taken by connect() for hosts having many active connections to the same destination - Refactor the TCP bind conflict code, shrinking related socket structs - Refactor TCP SYN-Cookie handling, as a preparation step to allow arbitrary SYN-Cookie processing via eBPF - Tune optmem_max for 0-copy usage, increasing the default value to 128KB and namespecifying it - Allow coalescing for cloned skbs coming from page pools, improving RX performances with some common configurations - Reduce extension header parsing overhead at GRO time - Add bridge MDB bulk deletion support, allowing user-space to request the deletion of matching entries - Reorder nftables struct members, to keep data accessed by the datapath first - Introduce TC block ports tracking and use. This allows supporting multicast-like behavior at the TC layer - Remove UAPI support for retired TC qdiscs (dsmark, CBQ and ATM) and classifiers (RSVP and tcindex) - More data-race annotations - Extend the diag interface to dump TCP bound-only sockets - Conditional notification of events for TC qdisc class and actions - Support for WPAN dynamic associations with nearby devices, to form a sub-network using a specific PAN ID - Implement SMCv2.1 virtual ISM device support - Add support for Batman-avd mulicast packet type BPF: - Tons of verifier improvements: - BPF register bounds logic and range support along with a large test suite - log improvements - complete precision tracking support for register spills - track aligned STACK_ZERO cases as imprecise spilled registers. This improves the verifier "instructions processed" metric from single digit to 50-60% for some programs - support for user's global BPF subprogram arguments with few commonly requested annotations for a better developer experience - support tracking of BPF_JNE which helps cases when the compiler transforms (unsigned) "a > 0" into "if a == 0 goto xxx" and the like - several fixes - Add initial TX metadata implementation for AF_XDP with support in mlx5 and stmmac drivers. Two types of offloads are supported right now, that is, TX timestamp and TX checksum offload - Fix kCFI bugs in BPF all forms of indirect calls from BPF into kernel and from kernel into BPF work with CFI enabled. This allows BPF to work with CONFIG_FINEIBT=y - Change BPF verifier logic to validate global subprograms lazily instead of unconditionally before the main program, so they can be guarded using BPF CO-RE techniques - Support uid/gid options when mounting bpffs - Add a new kfunc which acquires the associated cgroup of a task within a specific cgroup v1 hierarchy where the latter is identified by its id - Extend verifier to allow bpf_refcount_acquire() of a map value field obtained via direct load which is a use-case needed in sched_ext - Add BPF link_info support for uprobe multi link along with bpftool integration for the latter - Support for VLAN tag in XDP hints - Remove deprecated bpfilter kernel leftovers given the project is developed in user-space (https://github.com/facebook/bpfilter) Misc: - Support for parellel TC self-tests execution - Increase MPTCP self-tests coverage - Updated the bridge documentation, including several so-far undocumented features - Convert all the net self-tests to run in unique netns, to avoid random failures due to conflict and allow concurrent runs - Add TCP-AO self-tests - Add kunit tests for both cfg80211 and mac80211 - Autogenerate Netlink families documentation from YAML spec - Add yml-gen support for fixed headers and recursive nests, the tool can now generate user-space code for all genetlink families for which we have specs - A bunch of additional module descriptions fixes - Catch incorrect freeing of pages belonging to a page pool Driver API: - Rust abstractions for network PHY drivers; do not cover yet the full C API, but already allow implementing functional PHY drivers in rust - Introduce queue and NAPI support in the netdev Netlink interface, allowing complete access to the device <> NAPIs <> queues relationship - Introduce notifications filtering for devlink to allow control application scale to thousands of instances - Improve PHY validation, requesting rate matching information for each ethtool link mode supported by both the PHY and host - Add support for ethtool symmetric-xor RSS hash - ACPI based Wifi band RFI (WBRF) mitigation feature for the AMD platform - Expose pin fractional frequency offset value over new DPLL generic netlink attribute - Convert older drivers to platform remove callback returning void - Add support for PHY package MMD read/write New hardware / drivers: - Ethernet: - Octeon CN10K devices - Broadcom 5760X P7 - Qualcomm SM8550 SoC - Texas Instrument DP83TG720S PHY - Bluetooth: - IMC Networks Bluetooth radio Removed: - WiFi: - libertas 16-bit PCMCIA support - Atmel at76c50x drivers - HostAP ISA/PCMCIA style 802.11b driver - zd1201 802.11b USB dongles - Orinoco ISA/PCMCIA 802.11b driver - Aviator/Raytheon driver - Planet WL3501 driver - RNDIS USB 802.11b driver Driver updates: - Ethernet high-speed NICs: - Intel (100G, ice, idpf): - allow one by one port representors creation and removal - add temperature and clock information reporting - add get/set for ethtool's header split ringparam - add again FW logging - adds support switchdev hardware packet mirroring - iavf: implement symmetric-xor RSS hash - igc: add support for concurrent physical and free-running timers - i40e: increase the allowable descriptors - nVidia/Mellanox: - Preparation for Socket-Direct multi-dev netdev. That will allow in future releases combining multiple PFs devices attached to different NUMA nodes under the same netdev - Broadcom (bnxt): - TX completion handling improvements - add basic ntuple filter support - reduce MSIX vectors usage for MQPRIO offload - add VXLAN support, USO offload and TX coalesce completion for P7 - Marvell Octeon EP: - xmit-more support - add PF-VF mailbox support and use it for FW notifications for VFs - Wangxun (ngbe/txgbe): - implement ethtool functions to operate pause param, ring param, coalesce channel number and msglevel - Netronome/Corigine (nfp): - add flow-steering support - support UDP segmentation offload - Ethernet NICs embedded, slower, virtual: - Xilinx AXI: remove duplicate DMA code adopting the dma engine driver - stmmac: add support for HW-accelerated VLAN stripping - TI AM654x sw: add mqprio, frame preemption & coalescing - gve: add support for non-4k page sizes. - virtio-net: support dynamic coalescing moderation - nVidia/Mellanox Ethernet datacenter switches: - allow firmware upgrade without a reboot - more flexible support for bridge flooding via the compressed FID flooding mode - Ethernet embedded switches: - Microchip: - fine-tune flow control and speed configurations in KSZ8xxx - KSZ88X3: enable setting rmii reference - Renesas: - add jumbo frames support - Marvell: - 88E6xxx: add "eth-mac" and "rmon" stats support - Ethernet PHYs: - aquantia: add firmware load support - at803x: refactor the driver to simplify adding support for more chip variants - NXP C45 TJA11xx: Add MACsec offload support - Wifi: - MediaTek (mt76): - NVMEM EEPROM improvements - mt7996 Extremely High Throughput (EHT) improvements - mt7996 Wireless Ethernet Dispatcher (WED) support - mt7996 36-bit DMA support - Qualcomm (ath12k): - support for a single MSI vector - WCN7850: support AP mode - Intel (iwlwifi): - new debugfs file fw_dbg_clear - allow concurrent P2P operation on DFS channels - Bluetooth: - QCA2066: support HFP offload - ISO: more broadcast-related improvements - NXP: better recovery in case receiver/transmitter get out of sync" * tag 'net-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1714 commits) lan78xx: remove redundant statement in lan78xx_get_eee lan743x: remove redundant statement in lan743x_ethtool_get_eee bnxt_en: Fix RCU locking for ntuple filters in bnxt_rx_flow_steer() bnxt_en: Fix RCU locking for ntuple filters in bnxt_srxclsrldel() bnxt_en: Remove unneeded variable in bnxt_hwrm_clear_vnic_filter() tcp: Revert no longer abort SYN_SENT when receiving some ICMP Revert "mlx5 updates 2023-12-20" Revert "net: stmmac: Enable Per DMA Channel interrupt" ipvlan: Remove usage of the deprecated ida_simple_xx() API ipvlan: Fix a typo in a comment net/sched: Remove ipt action tests net: stmmac: Use interrupt mode INTM=1 for per channel irq net: stmmac: Add support for TX/RX channel interrupt net: stmmac: Make MSI interrupt routine generic dt-bindings: net: snps,dwmac: per channel irq net: phy: at803x: make read_status more generic net: phy: at803x: add support for cdt cross short test for qca808x net: phy: at803x: refactor qca808x cable test get status function net: phy: at803x: generalize cdt fault length function net: ethernet: cortina: Drop TSO support ... commit 60a031b64984ad4a219a13b0fe912746b586bb9b Author: Arnd Bergmann Date: Wed Jan 3 16:58:05 2024 +0100 media: i2c: thp7312: select CONFIG_FW_LOADER The recently added driver uses the firmware loader mechanism but causes a link failure when that is in a loadable module while thp7312 itself is built-in: arm-linux-gnueabi-ld: drivers/media/i2c/thp7312.o: in function `thp7312_probe': thp7312.c:(.text+0x4164): undefined reference to `firmware_upload_register' Select the required Kconfig symbol. Note that the driver specifically needs the firmware upload interface that is controlled by CONFIG_FW_UPLOAD, but there is no link failure when that is disabled because the interfaces are stubbed out here. Link: https://lore.kernel.org/linux-media/20240103155811.4092035-1-arnd@kernel.org Fixes: 7a52ab415b43 ("media: i2c: Add driver for THine THP7312") Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit ba69655fffdb8ada391494cfb8ddfe6e96784b79 Author: Heiko Carstens Date: Tue Jan 9 11:59:47 2024 +0100 s390/ptrace: remove leftover comment The code which validates floating point control register contents was reworked with commit 702644249d3e ("s390/fpu: get rid of test_fp_ctl()"). There is still a comment which refers to the old implementation - remove it in order to avoid confusion. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 74ca896113531c4a3bba278fd7991da743b7e63b Author: Heiko Carstens Date: Fri Jan 5 15:28:47 2024 +0100 s390/fpu: remove __load_fpu_regs() export __load_fpu_regs() is only called from core kernel code. Therefore remove the not needed export. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit d124e484691a737e174474d230dc6a4b385ba3db Author: Heiko Carstens Date: Wed Jan 3 13:15:13 2024 +0100 s390/mm,fault: remove not needed tsk variable tsk is only used as an intermediate variable for current. Remove tsk and use current directly instead at the only place where it is used. Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 80df7d6af7f6d229b34cf237b2cc9024c07111cd Author: Niklas Schnelle Date: Tue Nov 28 16:22:49 2023 +0100 s390/pci: fix max size calculation in zpci_memcpy_toio() The zpci_get_max_write_size() helper is used to determine the maximum size a PCI store or load can use at a given __iomem address. For the PCI block store the following restrictions apply: 1. The dst + len must not cross a 4K boundary in the (pseudo-)MMIO space 2. len must not exceed ZPCI_MAX_WRITE_SIZE 3. len must be a multiple of 8 bytes 4. The src address must be double word (8 byte) aligned 5. The dst address must be double word (8 byte) aligned Otherwise only a normal PCI store which takes its src value from a register can be used. For these PCI store restriction 1 still applies. Similarly 1 also applies to PCI loads. It turns out zpci_max_write_size() instead implements stricter conditions which prevents PCI block stores from being used where they can and should be used. In particular instead of conditions 4 and 5 it wrongly enforces both dst and src to be size aligned. This indirectly covers condition 1 but also prevents many legal PCI block stores. On top of the functional shortcomings the zpci_get_max_write_size() is misnamed as it is used for both read and write size calculations. Rename it to zpci_get_max_io_size() and implement the listed conditions explicitly. Reviewed-by: Matthew Rosato Fixes: cd24834130ac ("s390/pci: base support") Signed-off-by: Niklas Schnelle [agordeev@linux.ibm.com replaced spaces with tabs] Signed-off-by: Alexander Gordeev commit 0130a0d3a61889060e912a533e996201c4d9a2e5 Author: Alexander Gordeev Date: Tue Dec 12 13:59:42 2023 +0100 s390/kexec: do not automatically select KEXEC option Following commit dccf78d39f10 ("kernel/Kconfig.kexec: drop select of KEXEC for CRASH_DUMP") also drop automatic KEXEC selection for s390 while set CONFIG_KEXEC=y explicitly for defconfig and debug_defconfig targets. zfcpdump_defconfig target gets CONFIG_KEXEC unset as result, which is right and consistent with CONFIG_KEXEC_FILE besides. Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 77ed045e88e5cba6d8dec3c5c7cd52105c46b50b Author: Heiko Carstens Date: Fri Dec 8 13:50:35 2023 +0100 s390/compat: change default for CONFIG_COMPAT to "n" 31 bit support has been removed from the kernel more than eight years ago. The last 31 bit distribution is many years older. There shouldn't be any 31 bit code around anymore. Therefore avoid providing an unused and only partially tested user space interface and change the default for CONFIG_COMPAT from "yes" to "no". Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 393a5778b72a7b551493d0fd3fbe0282154058fe Author: Yi Liu Date: Wed Jan 10 20:10:14 2024 -0800 iommufd: Add data structure for Intel VT-d stage-1 cache invalidation This adds the data structure invalidating caches for the nested domain allocated with IOMMU_HWPT_DATA_VTD_S1 type. Link: https://lore.kernel.org/r/20240111041015.47920-8-yi.l.liu@intel.com Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe commit bf26eb83fd3b6f392cf68285c8858db5bfd5e570 Author: Nicolin Chen Date: Wed Jan 10 20:10:13 2024 -0800 iommufd/selftest: Add coverage for IOMMU_HWPT_INVALIDATE ioctl Add test cases for the IOMMU_HWPT_INVALIDATE ioctl and verify it by using the new IOMMU_TEST_OP_MD_CHECK_IOTLB. Link: https://lore.kernel.org/r/20240111041015.47920-7-yi.l.liu@intel.com Reviewed-by: Kevin Tian Signed-off-by: Nicolin Chen Co-developed-by: Yi Liu Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe commit e1fa6640d58e3529bd5e392dd92371cde2b31283 Author: Nicolin Chen Date: Wed Jan 10 20:10:12 2024 -0800 iommufd/selftest: Add IOMMU_TEST_OP_MD_CHECK_IOTLB test op Allow to test whether IOTLB has been invalidated or not. Link: https://lore.kernel.org/r/20240111041015.47920-6-yi.l.liu@intel.com Reviewed-by: Kevin Tian Signed-off-by: Nicolin Chen Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe commit ac8691203c07bb1897681d5c66374174336392fe Author: Nicolin Chen Date: Wed Jan 10 20:10:11 2024 -0800 iommufd/selftest: Add mock_domain_cache_invalidate_user support Add mock_domain_cache_invalidate_user() data structure to support user space selftest program to cover user cache invalidation pathway. Link: https://lore.kernel.org/r/20240111041015.47920-5-yi.l.liu@intel.com Reviewed-by: Kevin Tian Signed-off-by: Nicolin Chen Co-developed-by: Yi Liu Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe commit 77785117f9c73fd71a440a5ac86dd80752967adc Author: Nicolin Chen Date: Wed Jan 10 20:10:10 2024 -0800 iommu: Add iommu_copy_struct_from_user_array helper Wrap up the data pointer/num sanity and __iommu_copy_struct_from_user() call for iommu drivers to copy driver specific data at a specific location in the struct iommu_user_data_array. And expect it to be used in cache_invalidate_user ops for example. Link: https://lore.kernel.org/r/20240111041015.47920-4-yi.l.liu@intel.com Reviewed-by: Kevin Tian Signed-off-by: Nicolin Chen Co-developed-by: Yi Liu Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe commit 8c6eabae3807e048b9f17733af5e20500fbf858c Author: Yi Liu Date: Wed Jan 10 20:10:09 2024 -0800 iommufd: Add IOMMU_HWPT_INVALIDATE In nested translation, the stage-1 page table is user-managed but cached by the IOMMU hardware, so an update on present page table entries in the stage-1 page table should be followed with a cache invalidation. Add an IOMMU_HWPT_INVALIDATE ioctl to support such a cache invalidation. It takes hwpt_id to specify the iommu_domain, and a multi-entry array to support multiple invalidation data in one ioctl. enum iommu_hwpt_invalidate_data_type is defined to tag the data type of the entries in the multi-entry array. Link: https://lore.kernel.org/r/20240111041015.47920-3-yi.l.liu@intel.com Reviewed-by: Kevin Tian Co-developed-by: Nicolin Chen Signed-off-by: Nicolin Chen Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe commit f35b88b66fbb5c90298ce3aa483b8a2cf1f39ad0 Author: Lu Baolu Date: Wed Jan 10 20:10:08 2024 -0800 iommu: Add cache_invalidate_user op The updates of the PTEs in the nested page table will be propagated to the hardware caches. Add a new domain op cache_invalidate_user() for the userspace to flush the hardware caches for a nested domain through iommufd. No wrapper for it, as it's only supposed to be used by iommufd. Then, pass in invalidation requests in form of a user data array containing a number of invalidation data entries. Link: https://lore.kernel.org/r/20240111041015.47920-2-yi.l.liu@intel.com Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Signed-off-by: Nicolin Chen Signed-off-by: Yi Liu Signed-off-by: Jason Gunthorpe commit ead8467f96d6dc35bbf8c63ee9d244a357ede84a Author: Tiezhu Yang Date: Tue Dec 19 14:23:30 2023 +0800 docs, kprobes: Add loongarch as supported architecture After the following three changes at the beginning of the year: commit 6d4cc40fb5f5 ("LoongArch: Add kprobes support") commit 3f5536860086 ("LoongArch: Add kretprobes support") commit 09e679c28a4d ("LoongArch: Add kprobes on ftrace support") it is appropriate to add loongarch as supported architecture in kprobes documentation. Signed-off-by: Tiezhu Yang Acked-by: "Masami Hiramatsu (Google)" Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231219062330.22813-3-yangtiezhu@loongson.cn commit b65a6b44f0eaab8f217335d821c9b79aed47d9d8 Author: Tiezhu Yang Date: Tue Dec 19 14:23:29 2023 +0800 docs, kprobes: Update email address of Masami Hiramatsu According to the latest authorship and Signed-off-by: Masami Hiramatsu (Google) Masami Hiramatsu is working at Google, so the current email @redhat.com is out of date, it is better to use the email @kernel.org. Signed-off-by: Tiezhu Yang Acked-by: "Masami Hiramatsu (Google)" Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231219062330.22813-2-yangtiezhu@loongson.cn commit 54a2ffe9524f5aef34397bbd53366c6a95661491 Author: Baruch Siach Date: Mon Jan 8 15:21:45 2024 +0200 docs: admin-guide: hw_random: update rng-tools website rng-tools upstream moved to github. New upstream does not appear to consider itself official website for hw_random. Drop that part. Signed-off-by: Baruch Siach Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/ef52ace5008fa934084442149f64f5f9ddbba465.1704720105.git.baruch@tkos.co.il commit 22160b08d88898898b2bb99282663cdf3caa5c1c Author: attreyee-muk Date: Thu Jan 11 00:27:47 2024 +0530 Documentation/core-api: fix spelling mistake in workqueue Correct to "following" from "followings" in the sentence "The followings are the read bandwidths and CPU utilizations depending on different affinity scope settings on ``kcryptd`` measured over five runs." Signed-off-by: Attreyee Mukherjee Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240110185746.24974-1-tintinm2017@gmail.com commit c48a7c44a1d02516309015b6134c9bb982e17008 Author: Vegard Nossum Date: Wed Jan 10 18:47:58 2024 +0100 docs: kernel_feat.py: fix potential command injection The kernel-feat directive passes its argument straight to the shell. This is unfortunate and unnecessary. Let's always use paths relative to $srctree/Documentation/ and use subprocess.check_call() instead of subprocess.Popen(shell=True). This also makes the code shorter. This is analogous to commit 3231dd586277 ("docs: kernel_abi.py: fix command injection") where we did exactly the same thing for kernel_abi.py, somehow I completely missed this one. Link: https://fosstodon.org/@jani/111676532203641247 Reported-by: Jani Nikula Signed-off-by: Vegard Nossum Cc: stable@vger.kernel.org Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240110174758.3680506-1-vegard.nossum@oracle.com commit 1f4cac0f7465830a17a266983acbd60a2ce7ee6f Author: Vegard Nossum Date: Wed Jan 10 11:46:46 2024 +0100 Documentation: constrain alabaster package to older versions The 'alabaster' theme dropped support for Sphinx < v3.4: 0.7.14 – 2024-01-08 * Dropped support for Python 3.8 and earlier. * Dropped support for Sphinx 3.3 and earlier. [...] (Source: https://alabaster.readthedocs.io/en/latest/changelog.html) This manifests as an error when running 'make htmldocs' in a virtualenv constructed from Documentation/sphinx/requirements.txt: Sphinx version error: The alabaster extension used by this project needs at least Sphinx v3.4; it therefore cannot be built with this version. Raising the Sphinx version is not really a good option at this point, since 3.x through 6.x have horrible performance regressions (7.x still does, but not quite as bad). Instead, constrain the 'alabaster' package to versions that still support Sphinx 2.4.4. Signed-off-by: Vegard Nossum Link: https://lore.kernel.org/r/20240110104646.3647600-1-vegard.nossum@oracle.com Signed-off-by: Jonathan Corbet commit 5379c646960e3bbb4e59d65f0d689407636a7136 Author: Randy Dunlap Date: Tue Dec 5 15:14:08 2023 -0800 fbdev: hgafb: fix kernel-doc comments Fix kernel-doc warnings found when using "W=1". hgafb.c:370: warning: No description found for return value of 'hgafb_open' hgafb.c:384: warning: No description found for return value of 'hgafb_release' hgafb.c:406: warning: No description found for return value of 'hgafb_setcolreg' hgafb.c:425: warning: No description found for return value of 'hgafb_pan_display' hgafb.c:425: warning: expecting prototype for hga_pan_display(). Prototype was for hgafb_pan_display() instead hgafb.c:455: warning: No description found for return value of 'hgafb_blank' Signed-off-by: Randy Dunlap Cc: Ferenc Bakonyi Cc: Helge Deller Cc: linux-nvidia@lists.surfsouth.com Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Helge Deller commit af1563f256e2125755ed6ed14f4e53095b2c43fb Author: Dario Binacchi Date: Fri Nov 24 10:52:11 2023 +0100 fbdev: mmp: Fix typo and wording in code comment Fixes: 641b4b1b6a7c ("video: mmpdisp: add spi port in display controller") Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit 75dda3f04ae7725b028b7267e49cd0b7b98ffe19 Author: Stanislav Kinsburskii Date: Mon Nov 20 16:01:33 2023 -0800 fbdev: fsl-diu-fb: Fix sparse warning due to virt_to_phys() prototype change Explicitly cast __iomem pointer to const void* with __force to fix the following warning: incorrect type in argument 1 (different address spaces) expected void const volatile *address got char [noderef] __iomem *screen_base Signed-off-by: Stanislav Kinsburskii Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311161120.BgyxTBMQ-lkp@intel.com/ Signed-off-by: Helge Deller commit d6dfcdaa4e6e1a7fa99dc068f47f6b7b8c5bb634 Author: Dario Binacchi Date: Sat Nov 11 11:41:59 2023 +0100 fbdev: imxfb: add '*/' on a separate line in block comment Linux kernel coding style uses '*/' on a separate line at the end of multi line comments. Fix block comments by moving '*/' at the end of block comments on a separate line as reported by checkpatch: WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit cb892e5dfed3044974c4f10addbc297966224fe8 Author: Dario Binacchi Date: Sat Nov 11 11:41:58 2023 +0100 fbdev: imxfb: use __func__ for function name Resolve the following warning reported by checkpatch: WARNING: Prefer using '"%s...", __func__' to using 'imxfb_blank', this function's name, in a string Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit 77bf5df43348c45eddf40e06e9a1d417f1d755ef Author: Dario Binacchi Date: Sat Nov 11 11:41:57 2023 +0100 fbdev: imxfb: Fix style warnings relating to printk() Resolve the following warning reported by checkpatch: WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... This made it necessary to move the 'fbi->pdev = pdev' setting to the beginning of the driver's probing. Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit 62c82a47cbf8f183db24382bd5fc6e3067cd54c4 Author: Dario Binacchi Date: Sat Nov 11 11:41:56 2023 +0100 fbdev: imxfb: add missing spaces after ',' Fix the following checkpatch error: ERROR: space required after that ',' (ctx:VxV) Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit f11025059b59fe84880b48b2c3e7cf6894677b93 Author: Dario Binacchi Date: Sat Nov 11 11:41:55 2023 +0100 fbdev: imxfb: drop ftrace-like logging Resolve the following warning reported by checkpatch: WARNING: Unnecessary ftrace-like logging - prefer using ftrace Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit df937b8bb6044f1763945e00a5c0b29b8cc51ba4 Author: Dario Binacchi Date: Sat Nov 11 11:41:54 2023 +0100 fbdev: imxfb: add missing SPDX tag Resolve the following warning reported by checkpatch.pl: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 The patch also removes some license info made redundant by the addition of the SPDX tag. Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit da119a074d776e95a29d5891cf50248553064749 Author: Dario Binacchi Date: Sat Nov 11 11:41:53 2023 +0100 fbdev: imxfb: replace some magic numbers with constants The patch gets rid of magic numbers replacing them with appropriate macros. Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit b0e05872f7ae4d005e51952b2f3aca9504452495 Author: Dario Binacchi Date: Sat Nov 11 11:41:52 2023 +0100 fbdev: imxfb: use BIT, FIELD_{GET,PREP} and GENMASK macros Replace opencoded masking and shifting, with BIT(), GENMASK(), FIELD_GET() and FIELD_PREP() macros. Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit b85f173679900d1f4d1abfc6aa00495ecf1b17e4 Author: Dario Binacchi Date: Sat Nov 11 11:41:51 2023 +0100 fbdev: imxfb: move PCR bitfields near their offset The patch moves the bitfields of the PCR register near the macro that defines its offset, just like for all the other registers. Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit 5758844105f7dd9a0a04990cd92499a1a593dd36 Author: Dario Binacchi Date: Sat Nov 11 11:41:50 2023 +0100 fbdev: imxfb: fix left margin setting The previous setting did not take into account the CSTN mode. For the H_WAIT_2 bitfield (bits 0-7) of the LCDC Horizontal Configuration Register (LCDCR), the IMX25RM manual states that: In TFT mode, it specifies the number of SCLK periods between the end of HSYNC and the beginning of OE signal, and the total delay time equals (H_WAIT_2 + 3) of SCLK periods. In CSTN mode, it specifies the number of SCLK periods between the end of HSYNC and the first display data in each line, and the total delay time equals (H_WAIT_2 + 2) of SCLK periods. The patch handles both cases. Fixes: 4e47382fbca9 ("fbdev: imxfb: warn about invalid left/right margin") Fixes: 7e8549bcee00 ("imxfb: Fix margin settings") Signed-off-by: Dario Binacchi Signed-off-by: Helge Deller commit d4abde52b4b116111537593e2744b3234d18808d Merge: adb1f95d388a4 97b7ac69be2e5 Author: Palmer Dabbelt Date: Thu Jan 11 08:04:38 2024 -0800 Merge patch series "riscv: mm: Fixup & Optimize COMPAT code" guoren@kernel.org says: From: Guo Ren When the task is in COMPAT mode, the TASK_SIZE should be 2GB, so STACK_TOP_MAX and arch_get_mmap_end must be limited to 2 GB. This series fixes the problem made by commit: add2cc6b6515 ("RISC-V: mm: Restrict address space for sv39,sv48,sv57") and optimizes the related coding convention of TASK_SIZE. * b4-shazam-merge: riscv: mm: Fixup compat arch_get_mmap_end riscv: mm: Fixup compat mode boot failure Link: https://lore.kernel.org/r/20231222115703.2404036-1-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit 97b7ac69be2e5a683e898f5267f659fde52efdd5 Author: Guo Ren Date: Fri Dec 22 06:57:01 2023 -0500 riscv: mm: Fixup compat arch_get_mmap_end When the task is in COMPAT mode, the arch_get_mmap_end should be 2GB, not TASK_SIZE_64. The TASK_SIZE has contained is_compat_mode() detection, so change the definition of STACK_TOP_MAX to TASK_SIZE directly. Cc: stable@vger.kernel.org Fixes: add2cc6b6515 ("RISC-V: mm: Restrict address space for sv39,sv48,sv57") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reviewed-by: Leonardo Bras Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20231222115703.2404036-3-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit 5f449e245e5b0d9d63eef6c8968fbdc3a8594407 Author: Guo Ren Date: Fri Dec 22 06:57:00 2023 -0500 riscv: mm: Fixup compat mode boot failure In COMPAT mode, the STACK_TOP is DEFAULT_MAP_WINDOW (0x80000000), but the TASK_SIZE is 0x7fff000. When the user stack is upon 0x7fff000, it will cause a user segment fault. Sometimes, it would cause boot failure when the whole rootfs is rv32. Freeing unused kernel image (initmem) memory: 2236K Run /sbin/init as init process Starting init: /sbin/init exists but couldn't execute it (error -14) Run /etc/init as init process ... Increase the TASK_SIZE to cover STACK_TOP. Cc: stable@vger.kernel.org Fixes: add2cc6b6515 ("RISC-V: mm: Restrict address space for sv39,sv48,sv57") Signed-off-by: Guo Ren Signed-off-by: Guo Ren Reviewed-by: Leonardo Bras Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20231222115703.2404036-2-guoren@kernel.org Signed-off-by: Palmer Dabbelt commit adb1f95d388a43c4c564ef3e436f18900dde978e Author: Christophe JAILLET Date: Sun Oct 29 08:20:40 2023 +0100 riscv: Fix an off-by-one in get_early_cmdline() The ending NULL is not taken into account by strncat(), so switch to strlcat() to correctly compute the size of the available memory when appending CONFIG_CMDLINE to 'early_cmdline'. Fixes: 26e7aacb83df ("riscv: Allow to downgrade paging mode from the command line") Signed-off-by: Christophe JAILLET Reviewed-by: Alexandre Ghiti Link: https://lore.kernel.org/r/9f66d2b58c8052d4055e90b8477ee55d9a0914f9.1698564026.git.christophe.jaillet@wanadoo.fr Signed-off-by: Palmer Dabbelt commit 9b1d9abe24b11ff7005a52e241a12fbbf4863db0 Merge: 54d7431af73e2 12c16919652b5 Author: Palmer Dabbelt Date: Thu Jan 11 08:02:55 2024 -0800 Merge patch series "tools: selftests: riscv: Fix compiler warnings" Christoph Muellner says: From: Christoph Müllner When building the RISC-V selftests with a riscv32 compiler I ran into a couple of compiler warnings. While riscv32 support for these tests is questionable, the fixes are so trivial that it is probably best to simply apply them. Note that the missing-include patch and some format string warnings are also relevant for riscv64. * b4-shazam-merge: tools: selftests: riscv: Fix compile warnings in mm tests tools: selftests: riscv: Fix compile warnings in vector tests tools: selftests: riscv: Add missing include for vector test tools: selftests: riscv: Fix compile warnings in cbo tools: selftests: riscv: Fix compile warnings in hwprobe Link: https://lore.kernel.org/r/20231123185821.2272504-1-christoph.muellner@vrull.eu Signed-off-by: Palmer Dabbelt commit 12c16919652b5873f524c8b361336ecfa5ce5e6b Author: Christoph Müllner Date: Thu Nov 23 19:58:21 2023 +0100 tools: selftests: riscv: Fix compile warnings in mm tests When building the mm tests with a riscv32 compiler, we see a range of shift-count-overflow errors from shifting 1UL by more than 32 bits in do_mmaps(). Since, the relevant code is only called from code that is gated by `__riscv_xlen == 64`, we can just apply the same gating to do_mmaps(). Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20231123185821.2272504-6-christoph.muellner@vrull.eu Signed-off-by: Palmer Dabbelt commit e1baf5e68ed128c1e22ba43e5190526d85de323c Author: Christoph Müllner Date: Thu Nov 23 19:58:20 2023 +0100 tools: selftests: riscv: Fix compile warnings in vector tests GCC prints a couple of format string warnings when compiling the vector tests. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20231123185821.2272504-5-christoph.muellner@vrull.eu Signed-off-by: Palmer Dabbelt commit b250c90898412878fe56f069b1a6b1b94a7bbdfa Author: Christoph Müllner Date: Thu Nov 23 19:58:19 2023 +0100 tools: selftests: riscv: Add missing include for vector test GCC raises the following warning: warning: 'status' may be used uninitialized The warning comes from the fact, that the signature of waitpid() is unknown and therefore the initialization of GCC cannot be guessed. Let's add the relevant header to address this warning. Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti Reviewed-by: Andy Chiu Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20231123185821.2272504-4-christoph.muellner@vrull.eu Signed-off-by: Palmer Dabbelt commit ac7b2a02d62faff8c6d45bacb5cb9ea565b47776 Author: Christoph Müllner Date: Thu Nov 23 19:58:18 2023 +0100 tools: selftests: riscv: Fix compile warnings in cbo GCC prints a couple of format string warnings when compiling the cbo test. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20231123185821.2272504-3-christoph.muellner@vrull.eu Signed-off-by: Palmer Dabbelt commit b91c26fdb0e8150cdb610cdaadea62bb5e43bee0 Author: Christoph Müllner Date: Thu Nov 23 19:58:17 2023 +0100 tools: selftests: riscv: Fix compile warnings in hwprobe GCC prints a couple of format string warnings when compiling the hwprobe test. Let's follow the recommendation in Documentation/printk-formats.txt to fix these warnings. Signed-off-by: Christoph Müllner Reviewed-by: Alexandre Ghiti Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20231123185821.2272504-2-christoph.muellner@vrull.eu Signed-off-by: Palmer Dabbelt commit 54d7431af73e2fa53b73cfeb2bec559c6664a4e4 Author: Alexandre Ghiti Date: Mon Jan 8 20:36:40 2024 +0100 riscv: Add support for BATCHED_UNMAP_TLB_FLUSH Allow to defer the flushing of the TLB when unmapping pages, which allows to reduce the numbers of IPI and the number of sfence.vma. The ubenchmarch used in commit 43b3dfdd0455 ("arm64: support batched/deferred tlb shootdown during page reclamation/migration") that was multithreaded to force the usage of IPI shows good performance improvement on all platforms: * Unmatched: ~34% * TH1520 : ~78% * Qemu : ~81% In addition, perf on qemu reports an important decrease in time spent dealing with IPIs: Before: 68.17% main [kernel.kallsyms] [k] __sbi_rfence_v02_call After : 8.64% main [kernel.kallsyms] [k] __sbi_rfence_v02_call * Benchmark: int stick_this_thread_to_core(int core_id) { int num_cores = sysconf(_SC_NPROCESSORS_ONLN); if (core_id < 0 || core_id >= num_cores) return EINVAL; cpu_set_t cpuset; CPU_ZERO(&cpuset); CPU_SET(core_id, &cpuset); pthread_t current_thread = pthread_self(); return pthread_setaffinity_np(current_thread, sizeof(cpu_set_t), &cpuset); } static void *fn_thread (void *p_data) { int ret; pthread_t thread; stick_this_thread_to_core((int)p_data); while (1) { sleep(1); } return NULL; } int main() { volatile unsigned char *p = mmap(NULL, SIZE, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); pthread_t threads[4]; int ret; for (int i = 0; i < 4; ++i) { ret = pthread_create(&threads[i], NULL, fn_thread, (void *)i); if (ret) { printf("%s", strerror (ret)); } } memset(p, 0x88, SIZE); for (int k = 0; k < 10000; k++) { /* swap in */ for (int i = 0; i < SIZE; i += 4096) { (void)p[i]; } /* swap out */ madvise(p, SIZE, MADV_PAGEOUT); } for (int i = 0; i < 4; i++) { pthread_cancel(threads[i]); } for (int i = 0; i < 4; i++) { pthread_join(threads[i], NULL); } return 0; } Signed-off-by: Alexandre Ghiti Reviewed-by: Jisheng Zhang Tested-by: Jisheng Zhang # Tested on TH1520 Tested-by: Nam Cao Link: https://lore.kernel.org/r/20240108193640.344929-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit ff172d4818ad32dba433dae189e36684e43c5c74 Author: Alexandre Ghiti Date: Thu Dec 14 14:29:35 2023 +0100 riscv: Use hugepage mappings for vmemmap This will allow better TLB utilization and then should be more performant. Before: ---[ vmemmap start ]--- 0xffff8d8002000000-0xffff8d8012000000 0x000000046ec00000 256M PTE . .. .. D A G . . W R V ---[ vmemmap end ]--- After: ---[ vmemmap start ]--- 0xffff8d8002000000-0xffff8d8012000000 0x000000046ec00000 256M PMD . .. .. D A G . . W R V ---[ vmemmap end ]--- Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20231214132935.212864-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit e3b3ec967a7d93b9010a5af9a2394c8b5c8f31ed Author: AngeloGioacchino Del Regno Date: Thu Jan 11 11:52:26 2024 +0100 ASoC: mediatek: sof-common: Add NULL check for normal_link string It's not granted that all entries of struct sof_conn_stream declare a `normal_link` (a non-SOF, direct link) string, and this is the case for SoCs that support only SOF paths (hence do not support both direct and SOF usecases). For example, in the case of MT8188 there is no normal_link string in any of the sof_conn_stream entries and there will be more drivers doing that in the future. To avoid possible NULL pointer KPs, add a NULL check for `normal_link`. Fixes: 0caf1120c583 ("ASoC: mediatek: mt8195: extract SOF common code") Signed-off-by: AngeloGioacchino Del Regno Link: https://msgid.link/r/20240111105226.117603-1-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown commit d3e591a38c98d448ae84eba1f89388c55382cb0e Author: Daniel Henrique Barboza Date: Sun Oct 29 09:35:00 2023 -0300 dt-bindings: riscv: Document cbop-block-size Following the examples of cbom-block-size and cboz-block-size, cbop-block-size is the cache size of Zicbop (cbo.prefetch) operations. The most common case is to have all cache block sizes to be the same size (e.g. profiles such as rva22u64 mandates a 64 bytes size for all cache operations), but there's no specification requirement for that, and an implementation can have different cache sizes for each operation. Cc: Rob Herring Cc: Conor Dooley Signed-off-by: Daniel Henrique Barboza Acked-by: Conor Dooley Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20231029123500.739409-1-dbarboza@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 2e605741e9dd26426ba2475afaf5966d781bfbc6 Merge: 07df87c0f8815 3690492612ecd Author: Palmer Dabbelt Date: Wed Jan 10 09:54:29 2024 -0800 Merge patch series "riscv: errata: thead: use riscv_nonstd_cache_ops for CMO" Jisheng Zhang says: Previously, we use alternative mechanism to dynamically patch the CMO operations for THEAD C906/C910 during boot for performance reason. But as pointed out by Arnd, "there is already a significant cost in accessing the invalidated cache lines afterwards, which is likely going to be much higher than the cost of an indirect branch". And indeed, there's no performance difference with GMAC and EMMC per my test on Sipeed Lichee Pi 4A board. Use riscv_nonstd_cache_ops for THEAD C906/C910 CMO to simplify the alternative code, and to acchieve Arnd's goal -- "I think moving the THEAD ops at the same level as all nonstandard operations makes sense, but I'd still leave CMO as an explicit fast path that avoids the indirect branch. This seems like the right thing to do both for readability and for platforms on which the indirect branch has a noticeable overhead." To make bisect easy, I use two patches here: patch1 does the conversion which just mimics current CMO behavior via. riscv_nonstd_cache_ops, I assume no functionalities changes. patch2 uses T-HEAD PA based CMO instructions so that we don't need to covert PA to VA. * b4-shazam-merge: riscv: errata: thead: use pa based instructions for CMO riscv: errata: thead: use riscv_nonstd_cache_ops for CMO Link: https://lore.kernel.org/r/20231114143338.2406-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 07df87c0f8815898cb994408c4b6dd542a1394b8 Author: Conor Dooley Date: Fri Dec 8 16:06:51 2023 +0000 dt-bindings: riscv: permit numbers in "riscv,isa" There are some extensions that contain numbers, such as Zve32f, which are enabled by the "max" cpu type in QEMU. Signed-off-by: Conor Dooley Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231208-uncolored-oxidant-5ab37dd3ab84@spud Signed-off-by: Palmer Dabbelt commit a452816132d699bbb2af6fab8530685306054bda Author: Samuel Holland Date: Wed Dec 27 09:57:38 2023 -0800 dt-bindings: riscv: cpus: Clarify mmu-type interpretation The current description implies that only a single address translation mode is available to the operating system. However, some implementations support multiple address translation modes, and the operating system is free to choose between them. Per the RISC-V privileged specification, Sv48 implementations must also implement Sv39, and likewise Sv57 implies support for Sv48. This means it is possible to describe all supported address translation modes using a single value, by naming the largest supported mode. This appears to have been the intended usage of the property, so note it explicitly. Fixes: 4fd669a8c487 ("dt-bindings: riscv: convert cpu binding to json-schema") Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231227175739.1453782-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 951df4eb817cbb23fcac9e61de3ef4f8ca2c1a1d Merge: 4dc4af9ce3268 50942ad6ddb57 Author: Palmer Dabbelt Date: Wed Jan 10 07:04:08 2024 -0800 Merge patch series "RISC-V SBI debug console extension support" Anup Patel says: The SBI v2.0 specification is now frozen. The SBI v2.0 specification defines SBI debug console (DBCN) extension which replaces the legacy SBI v0.1 functions sbi_console_putchar() and sbi_console_getchar(). (Refer v2.0-rc5 at https://github.com/riscv-non-isa/riscv-sbi-doc/releases) This series adds support for SBI debug console (DBCN) extension in Linux RISC-V. To try these patches with KVM RISC-V, use KVMTOOL from the riscv_zbx_zicntr_smstateen_condops_v1 branch at: https://github.com/avpatel/kvmtool.git * b4-shazam-merge: RISC-V: Enable SBI based earlycon support tty: Add SBI debug console support to HVC SBI driver tty/serial: Add RISC-V SBI debug console based earlycon RISC-V: Add SBI debug console helper routines RISC-V: Add stubs for sbi_console_putchar/getchar() Link: https://lore.kernel.org/r/20231124070905.1043092-1-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 4dc4af9ce32681fbd16aa0e757ccba341cc9d4ca Author: Andrew Jones Date: Wed Dec 6 12:08:09 2023 +0100 riscv: sbi: Introduce system suspend support When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with CONFIG_SUSPEND, one can do 'echo mem > /sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives. Signed-off-by: Andrew Jones Tested-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231206110807.35882-4-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 3a58275099b9cbfb9d86b85824fb3a5de796c815 Merge: 17f2c308051f8 a35551c7244d9 Author: Palmer Dabbelt Date: Wed Jan 10 06:48:16 2024 -0800 Merge patch series "riscv: modules: Fix module loading error handling" Charlie Jenkins says: When modules are loaded while there is not ample allocatable memory, there was previously not proper error handling. This series fixes a use-after-free error and a different issue that caused a non graceful exit after memory was not properly allocated. * b4-shazam-merge: riscv: Fix relocation_hashtable size riscv: Correctly free relocation hashtable on error riscv: Fix module loading free order Link: https://lore.kernel.org/r/20240104-module_loading_fix-v3-0-a71f8de6ce0f@rivosinc.com Signed-off-by: Palmer Dabbelt commit 17f2c308051f8adccd913b63d105afdd9a1c7d9e Merge: cb51bfee7f62a d0fdc20b04291 Author: Palmer Dabbelt Date: Tue Jan 9 20:18:23 2024 -0800 Merge patch series "riscv: enable EFFICIENT_UNALIGNED_ACCESS and DCACHE_WORD_ACCESS" Jisheng Zhang says: Some riscv implementations such as T-HEAD's C906, C908, C910 and C920 support efficient unaligned access, for performance reason we want to enable HAVE_EFFICIENT_UNALIGNED_ACCESS on these platforms. To avoid performance regressions on non efficient unaligned access platforms, HAVE_EFFICIENT_UNALIGNED_ACCESS can't be globally selected. To solve this problem, runtime code patching based on the detected speed is a good solution. But that's not easy, it involves lots of work to modify vairous subsystems such as net, mm, lib and so on. This can be done step by step. So let's take an easier solution: add support to efficient unaligned access and hide the support under NONPORTABLE. patch1 introduces RISCV_EFFICIENT_UNALIGNED_ACCESS which depends on NONPORTABLE, if users know during config time that the kernel will be only run on those efficient unaligned access hw platforms, they can enable it. Obviously, generic unified kernel Image shouldn't enable it. patch2 adds support DCACHE_WORD_ACCESS when MMU and RISCV_EFFICIENT_UNALIGNED_ACCESS. Below test program and step shows how much performance can be improved: $ cat tt.c #include #include #include #define ITERATIONS 1000000 #define PATH "123456781234567812345678123456781" int main(void) { unsigned long i; struct stat buf; for (i = 0; i < ITERATIONS; i++) stat(PATH, &buf); return 0; } $ gcc -O2 tt.c $ touch 123456781234567812345678123456781 $ time ./a.out Per my test on T-HEAD C910 platforms, the above test performance is improved by about 7.5%. * b4-shazam-merge: riscv: select DCACHE_WORD_ACCESS for efficient unaligned access HW riscv: introduce RISCV_EFFICIENT_UNALIGNED_ACCESS Link: https://lore.kernel.org/r/20231225044207.3821-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 18a1ee9d716d355361da2765f87dbbadcdea03bf Author: Linus Walleij Date: Fri Oct 20 15:11:41 2023 +0200 ARM: dts: usr8200: Fix phy registers The MV88E6060 switch has internal PHY registers at MDIO addresses 0x00..0x04. Tie each port to the corresponding PHY. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231020-ixp4xx-usr8200-dtsfix-v1-1-3a8591dea259@linaro.org Signed-off-by: Arnd Bergmann commit 2ad62d16cd24b5e2f18318e97e1f06bef9f1ce7d Author: Maíra Canal Date: Tue Jan 9 11:28:24 2024 -0300 drm/v3d: Free the job and assign it to NULL if initialization fails Currently, if `v3d_job_init()` fails (e.g. in the IGT test "bad-in-sync", where we submit an invalid in-sync to the IOCTL), then we end up with the following NULL pointer dereference: [ 34.146279] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000078 [ 34.146301] Mem abort info: [ 34.146306] ESR = 0x0000000096000005 [ 34.146315] EC = 0x25: DABT (current EL), IL = 32 bits [ 34.146322] SET = 0, FnV = 0 [ 34.146328] EA = 0, S1PTW = 0 [ 34.146334] FSC = 0x05: level 1 translation fault [ 34.146340] Data abort info: [ 34.146345] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 [ 34.146351] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 34.146357] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 34.146366] user pgtable: 4k pages, 39-bit VAs, pgdp=00000001232e6000 [ 34.146375] [0000000000000078] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000 [ 34.146399] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP [ 34.146406] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device algif_hash aes_neon_bs aes_neon_blk algif_skcipher af_alg bnep hid_logitech_hidpp brcmfmac_wcc brcmfmac brcmutil hci_uart vc4 btbcm cfg80211 bluetooth bcm2835_v4l2(C) snd_soc_hdmi_codec binfmt_misc cec drm_display_helper hid_logitech_dj bcm2835_mmal_vchiq(C) drm_dma_helper drm_kms_helper videobuf2_v4l2 raspberrypi_hwmon ecdh_generic videobuf2_vmalloc videobuf2_memops ecc videobuf2_common rfkill videodev libaes snd_soc_core dwc2 i2c_brcmstb snd_pcm_dmaengine snd_bcm2835(C) i2c_bcm2835 pwm_bcm2835 snd_pcm mc v3d snd_timer snd gpu_sched drm_shmem_helper nvmem_rmem uio_pdrv_genirq uio i2c_dev drm fuse dm_mod drm_panel_orientation_quirks backlight configfs ip_tables x_tables ipv6 [ 34.146556] CPU: 1 PID: 1890 Comm: v3d_submit_csd Tainted: G C 6.7.0-rc3-g49ddab089611 #68 [ 34.146563] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT) [ 34.146569] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 34.146575] pc : drm_sched_job_cleanup+0x3c/0x190 [gpu_sched] [ 34.146611] lr : v3d_submit_csd_ioctl+0x1b4/0x460 [v3d] [ 34.146653] sp : ffffffc083cbbb80 [ 34.146658] x29: ffffffc083cbbb90 x28: ffffff81035afc00 x27: ffffffe77a641168 [ 34.146668] x26: ffffff81056a8000 x25: 0000000000000058 x24: 0000000000000000 [ 34.146677] x23: ffffff81065e2000 x22: ffffff81035afe00 x21: ffffffc083cbbcf0 [ 34.146686] x20: ffffff81035afe00 x19: 00000000ffffffea x18: 0000000000000000 [ 34.146694] x17: 0000000000000000 x16: ffffffe7989e34b0 x15: 0000000000000000 [ 34.146703] x14: 0000000004000004 x13: ffffff81035afe80 x12: ffffffc083cb8000 [ 34.146711] x11: cc57e05dfbe5ef00 x10: cc57e05dfbe5ef00 x9 : ffffffe77a64131c [ 34.146719] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f [ 34.146727] x5 : 0000000000000040 x4 : ffffff81fefb03f0 x3 : ffffffc083cbba40 [ 34.146736] x2 : ffffff81056a8000 x1 : ffffffe7989e35e8 x0 : 0000000000000000 [ 34.146745] Call trace: [ 34.146748] drm_sched_job_cleanup+0x3c/0x190 [gpu_sched] [ 34.146768] v3d_submit_csd_ioctl+0x1b4/0x460 [v3d] [ 34.146791] drm_ioctl_kernel+0xe0/0x120 [drm] [ 34.147029] drm_ioctl+0x264/0x408 [drm] [ 34.147135] __arm64_sys_ioctl+0x9c/0xe0 [ 34.147152] invoke_syscall+0x4c/0x118 [ 34.147162] el0_svc_common+0xb8/0xf0 [ 34.147168] do_el0_svc+0x28/0x40 [ 34.147174] el0_svc+0x38/0x88 [ 34.147184] el0t_64_sync_handler+0x84/0x100 [ 34.147191] el0t_64_sync+0x190/0x198 [ 34.147201] Code: aa0003f4 f90007e8 f9401008 aa0803e0 (b8478c09) [ 34.147210] ---[ end trace 0000000000000000 ]--- This happens because we are calling `drm_sched_job_cleanup()` twice: once at `v3d_job_init()` and again when we call `v3d_job_cleanup()`. To mitigate this issue, we can return to the same approach that we used to use before 464c61e76de8: deallocate the job after `v3d_job_init()` fails and assign it to NULL. Then, when we call `v3d_job_cleanup()`, job is NULL and the function returns. Fixes: 464c61e76de8 ("drm/v3d: Decouple job allocation from job initiation") Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240109142857.1122704-1-mcanal@igalia.com commit e2596dcf1e9dfd5904d50f796c19b03c94a3b8b4 Author: Jim Quinlan Date: Mon Nov 13 13:56:06 2023 -0500 PCI: brcmstb: Configure HW CLKREQ# mode appropriate for downstream device The Broadcom STB/CM PCIe HW core, which is also used in RPi SOCs, must be deliberately set by the PCIe RC HW into one of three mutually exclusive modes: "safe" -- No CLKREQ# expected or required, refclk is always provided. This mode should work for all devices but is not be capable of any refclk power savings. "no-l1ss" -- CLKREQ# is expected to be driven by the downstream device for CPM and ASPM L0s and L1. Provides Clock Power Management, L0s, and L1, but cannot provide L1 substate (L1SS) power savings. If the downstream device connected to the RC is L1SS capable AND the OS enables L1SS, all PCIe traffic may abruptly halt, potentially hanging the system. "default" -- Bidirectional CLKREQ# between the RC and downstream device. Provides ASPM L0s, L1, and L1SS, but not compliant to provide Clock Power Management; specifically, may not be able to meet the T_CLRon max timing of 400ns as specified in "Dynamic Clock Control", section 3.2.5.2.2 of the PCIe Express Mini CEM 2.1 specification. This situation is atypical and should happen only with older devices. Previously, this driver always set the mode to "no-l1ss", as almost all STB/CM boards operate in this mode. But now there is interest in activating L1SS power savings from STB/CM customers, which requires "aspm" mode. In addition, a bug was filed for RPi4 CM platform because most devices did not work in "no-l1ss" mode. Note that the mode is specified by the DT property "brcm,clkreq-mode". If this property is omitted, then "default" mode is chosen. Note: Since L1 substates are now possible, a modification was made regarding an internal bus timeout: During long periods of the PCIe RC HW being in an L1SS sleep state, there may be a timeout on an internal bus access, even though there may not be any PCIe access involved. Such a timeout will cause a subsequent CPU abort. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217276 Link: https://lore.kernel.org/linux-pci/20231113185607.1756-3-james.quinlan@broadcom.com Tested-by: Cyril Brulebois Tested-by: Florian Fainelli Signed-off-by: Jim Quinlan Signed-off-by: Krzysztof Wilczyński commit 14b15aeb3628fc2fd1fe7f6c94f6ea7b1557bc27 Author: Jim Quinlan Date: Mon Nov 13 13:56:05 2023 -0500 dt-bindings: PCI: brcmstb: Add property "brcm,clkreq-mode" The Broadcom STB/CM PCIe HW -- a core that is also used by RPi SOCs -- requires the driver to deliberately place the RC HW one of three CLKREQ# modes. The "brcm,clkreq-mode" property allows the user to override the default setting. If this property is omitted, the default mode shall be "default". Link: https://lore.kernel.org/linux-pci/20231113185607.1756-2-james.quinlan@broadcom.com Tested-by: Cyril Brulebois Tested-by: Florian Fainelli Signed-off-by: Jim Quinlan Signed-off-by: Krzysztof Wilczyński Reviewed-by: Rob Herring Acked-by: Conor Dooley commit 3c1e5abcda64bed0c7bffa65af2316995f269a61 Author: Christophe JAILLET Date: Wed Jan 10 19:09:46 2024 +0100 MIPS: Alchemy: Fix an out-of-bound access in db1550_dev_setup() When calling spi_register_board_info(), Fixes: f869d42e580f ("MIPS: Alchemy: Improved DB1550 support, with audio and serial busses.") Signed-off-by: Christophe JAILLET Signed-off-by: Thomas Bogendoerfer commit 89c4b588d11e9acf01d604de4b0c715884f59213 Author: Christophe JAILLET Date: Wed Jan 10 19:07:36 2024 +0100 MIPS: Alchemy: Fix an out-of-bound access in db1200_dev_setup() When calling spi_register_board_info(), we should pass the number of elements in 'db1200_spi_devs', not 'db1200_i2c_devs'. Fixes: 63323ec54a7e ("MIPS: Alchemy: Extended DB1200 board support.") Signed-off-by: Christophe JAILLET Signed-off-by: Thomas Bogendoerfer commit 1d5911d43cab5fb99229b02bce173b0c6d9da7d2 Merge: d271c4b406f75 e2bdb5272f431 Author: Christian Brauner Date: Thu Jan 11 12:22:33 2024 +0100 Merge tag 'netfs-lib-20240109' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into vfs.netfs Pull netfs updates from David Howells: A few follow-up fixes for the netfs work for this cycle. * tag 'netfs-lib-20240109' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: netfs: Fix wrong #ifdef hiding wait cachefiles: Fix signed/unsigned mixup netfs: Fix the loop that unmarks folios after writing to the cache netfs: Fix interaction between write-streaming and cachefiles culling netfs: Count DIO writes netfs: Mark netfs_unbuffered_write_iter_locked() static Tested-by: Marc Dionne Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner commit 989cd9fd1ffe1a964429325f9092ea8f0db3f953 Author: Kalle Valo Date: Tue Dec 19 18:25:16 2023 +0200 wifi: p54: fix GCC format truncation warning with wiphy->fw_version GCC 13.2 warns: drivers/net/wireless/intersil/p54/fwio.c:128:34: warning: '%s' directive output may be truncated writing up to 39 bytes into a region of size 32 [-Wformat-truncation=] drivers/net/wireless/intersil/p54/fwio.c:128:33: note: directive argument in the range [0, 16777215] drivers/net/wireless/intersil/p54/fwio.c:128:33: note: directive argument in the range [0, 255] drivers/net/wireless/intersil/p54/fwio.c:127:17: note: 'snprintf' output between 7 and 52 bytes into a destination of size 32 The issue here is that wiphy->fw_version is 32 bytes and in theory the string we try to place there can be 39 bytes. wiphy->fw_version is used for providing the firmware version to user space via ethtool, so not really important. fw_version in theory can be 24 bytes but in practise it's shorter, so even if print only 19 bytes via ethtool there should not be any practical difference. I did consider removing fw_var from the string altogether or making the maximum length for fw_version 19 bytes, but chose this approach as it was the least intrusive. Compile tested only. Signed-off-by: Kalle Valo Acked-by: Christian Lamparter # Tested with Dell 1450 USB Signed-off-by: Kalle Valo Link: https://msgid.link/20231219162516.898205-1-kvalo@kernel.org commit e3977e0609a07d86406029fceea0fd40d7849368 Author: Tejun Heo Date: Tue Jan 9 11:48:02 2024 -1000 Revert "kernfs: convert kernfs_idr_lock to an irq safe raw spinlock" This reverts commit dad3fb67ca1cbef87ce700e83a55835e5921ce8a. The commit converted kernfs_idr_lock to an IRQ-safe raw_spinlock because it could be acquired while holding an rq lock through bpf_cgroup_from_id(). However, kernfs_idr_lock is held while doing GPF_NOWAIT allocations which involves acquiring an non-IRQ-safe and non-raw lock leading to the following lockdep warning: ============================= [ BUG: Invalid wait context ] 6.7.0-rc5-kzm9g-00251-g655022a45b1c #578 Not tainted ----------------------------- swapper/0/0 is trying to lock: dfbcd488 (&c->lock){....}-{3:3}, at: local_lock_acquire+0x0/0xa4 other info that might help us debug this: context-{5:5} 2 locks held by swapper/0/0: #0: dfbc9c60 (lock){+.+.}-{3:3}, at: local_lock_acquire+0x0/0xa4 #1: c0c012a8 (kernfs_idr_lock){....}-{2:2}, at: __kernfs_new_node.constprop.0+0x68/0x258 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.7.0-rc5-kzm9g-00251-g655022a45b1c #578 Hardware name: Generic SH73A0 (Flattened Device Tree) unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x68/0x90 dump_stack_lvl from __lock_acquire+0x3cc/0x168c __lock_acquire from lock_acquire+0x274/0x30c lock_acquire from local_lock_acquire+0x28/0xa4 local_lock_acquire from ___slab_alloc+0x234/0x8a8 ___slab_alloc from __slab_alloc.constprop.0+0x30/0x44 __slab_alloc.constprop.0 from kmem_cache_alloc+0x7c/0x148 kmem_cache_alloc from radix_tree_node_alloc.constprop.0+0x44/0xdc radix_tree_node_alloc.constprop.0 from idr_get_free+0x110/0x2b8 idr_get_free from idr_alloc_u32+0x9c/0x108 idr_alloc_u32 from idr_alloc_cyclic+0x50/0xb8 idr_alloc_cyclic from __kernfs_new_node.constprop.0+0x88/0x258 __kernfs_new_node.constprop.0 from kernfs_create_root+0xbc/0x154 kernfs_create_root from sysfs_init+0x18/0x5c sysfs_init from mnt_init+0xc4/0x220 mnt_init from vfs_caches_init+0x6c/0x88 vfs_caches_init from start_kernel+0x474/0x528 start_kernel from 0x0 Let's rever the commit. It's undesirable to spread out raw spinlock usage anyway and the problem can be solved by protecting the lookup path with RCU instead. Signed-off-by: Tejun Heo Cc: Andrea Righi Reported-by: Geert Uytterhoeven Link: http://lkml.kernel.org/r/CAMuHMdV=AKt+mwY7svEq5gFPx41LoSQZ_USME5_MEdWQze13ww@mail.gmail.com Link: https://lore.kernel.org/r/20240109214828.252092-2-tj@kernel.org Tested-by: Andrea Righi Signed-off-by: Greg Kroah-Hartman commit c2dba4d19f6542e52e59873a596cce0388d0df64 Author: Arnd Bergmann Date: Thu Jan 11 09:53:00 2024 +0100 ARM: defconfig: remove dead platform options These are all options for boards that got removed in the past and are not relevant here because the options no longer exist or are implied by the platform. Signed-off-by: Arnd Bergmann commit 114854438defa24fc82948591fe4d56f8ee925da Author: Arnd Bergmann Date: Thu Jan 11 09:28:42 2024 +0100 ARM: defconfig: remove CONFIG_SLUB references SLUB is now the only remaining allocator after the SLAB removal and it was the default already before that, so no need to mention it in the defconfig files. Signed-off-by: Arnd Bergmann commit 183a967ad19c97585a4fa79b8748b237311af76c Author: Arnd Bergmann Date: Thu Jan 11 09:18:12 2024 +0100 ARM: defconfig: remove CONFIG_NET_ETHERNET references CONFIG_NET_ETHERNET was removed a long time ago in f860b0522f65 ("drivers/net: Kconfig and Makefile cleanup"). Remove the last references to in in ARM defconfig files. Signed-off-by: Arnd Bergmann commit 984893f80e0fdba779e1e5f90ff5b2ef84b6009d Author: Arnd Bergmann Date: Thu Jan 11 09:17:49 2024 +0100 ARM: defconfig: remove sysfs-deprecated entries These were removed last year in commit 721da5cee9d4 ("driver core: remove CONFIG_SYSFS_DEPRECATED and CONFIG_SYSFS_DEPRECATED_V2"), so remove the last references to them in arm config files. Signed-off-by: Arnd Bergmann commit 23a7fa9c08e8af8ddfdd7d6de980aa0ec7343ef2 Author: Arnd Bergmann Date: Wed Jan 10 18:49:29 2024 +0100 ARM: defconfig: reorder config lines As part of general housekeeping, change the defconfig files to sort lines based on the 'make savedefconfig' output, to make it easier to do additional changes on top. Signed-off-by: Arnd Bergmann commit 67df5b47a946f594224bf24c07e6ac5086bf8b7f Author: Arnd Bergmann Date: Wed Jan 10 18:08:33 2024 +0100 arm64: defconfig reorder config lines A number of options got reorganized over time wihtin Kconfig, so make sure everything is where it belongs in order to simplify defconfig changes again in the future. Signed-off-by: Arnd Bergmann commit d61b40bf15ce453f3aa71f6b423938e239e7f8f8 Author: Darrick J. Wong Date: Mon Jan 8 18:17:34 2024 -0800 xfs: fix backwards logic in xfs_bmap_alloc_account We're only allocating from the realtime device if the inode is marked for realtime and we're /not/ allocating into the attr fork. Fixes: 58643460546d ("xfs: also use xfs_bmap_btalloc_accounting for RT allocations") Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit de927f6c0b07d9e698416c5b287c521b07694cac Merge: c29901006179c b2b97a62f055d Author: Linus Torvalds Date: Wed Jan 10 18:18:20 2024 -0800 Merge tag 's390-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Alexander Gordeev: - Add machine variable capacity information to /proc/sysinfo. - Limit the waste of page tables and always align vmalloc area size and base address on segment boundary. - Fix a memory leak when an attempt to register interruption sub class (ISC) for the adjunct-processor (AP) guest failed. - Reset response code AP_RESPONSE_INVALID_GISA to understandable by guest AP_RESPONSE_INVALID_ADDRESS in response to a failed interruption sub class (ISC) registration attempt. - Improve reaction to adjunct-processor (AP) AP_RESPONSE_OTHERWISE_CHANGED response code when enabling interrupts on behalf of a guest. - Fix incorrect sysfs 'status' attribute of adjunct-processor (AP) queue device bound to the vfio_ap device driver when the mediated device is attached to a guest, but the queue device is not passed through. - Rework struct ap_card to hold the whole adjunct-processor (AP) card hardware information. As result, all the ugly bit checks are replaced by simple evaluations of the required bit fields. - Improve handling of some weird scenarios between service element (SE) host and SE guest with adjunct-processor (AP) pass-through support. - Change local_ctl_set_bit() and local_ctl_clear_bit() so they return the previous value of the to be changed control register. This is useful if a bit is only changed temporarily and the previous content needs to be restored. - The kernel starts with machine checks disabled and is expected to enable it once trap_init() is called. However the implementation allows machine checks early. Consistently enable it in trap_init() only. - local_mcck_disable() and local_mcck_enable() assume that machine checks are always enabled. Instead implement and use local_mcck_save() and local_mcck_restore() to disable machine checks and restore the previous state. - Modification of floating point control (FPC) register of a traced process using ptrace interface may lead to corruption of the FPC register of the tracing process. Fix this. - kvm_arch_vcpu_ioctl_set_fpu() allows to set the floating point control (FPC) register in vCPU, but may lead to corruption of the FPC register of the host process. Fix this. - Use READ_ONCE() to read a vCPU floating point register value from the memory mapped area. This avoids that, depending on code generation, a different value is tested for validity than the one that is used. - Get rid of test_fp_ctl(), since it is quite subtle to use it correctly. Instead copy a new floating point control register value into its save area and test the validity of the new value when loading it. - Remove superfluous save_fpu_regs() call. - Remove s390 support for ARCH_WANTS_DYNAMIC_TASK_STRUCT. All machines provide the vector facility since many years and the need to make the task structure size dependent on the vector facility does not exist. - Remove the "novx" kernel command line option, as the vector code runs without any problems since many years. - Add the vector facility to the z13 architecture level set (ALS). All hypervisors support the vector facility since many years. This allows compile time optimizations of the kernel. - Get rid of MACHINE_HAS_VX and replace it with cpu_has_vx(). As result, the compiled code will have less runtime checks and less code. - Convert pgste_get_lock() and pgste_set_unlock() ASM inlines to C. - Convert the struct subchannel spinlock from pointer to member. * tag 's390-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (24 commits) Revert "s390: update defconfigs" s390/cio: make sch->lock spinlock pointer a member s390: update defconfigs s390/mm: convert pgste locking functions to C s390/fpu: get rid of MACHINE_HAS_VX s390/als: add vector facility to z13 architecture level set s390/fpu: remove "novx" option s390/fpu: remove ARCH_WANTS_DYNAMIC_TASK_STRUCT support KVM: s390: remove superfluous save_fpu_regs() call s390/fpu: get rid of test_fp_ctl() KVM: s390: use READ_ONCE() to read fpc register value KVM: s390: fix setting of fpc register s390/ptrace: handle setting of fpc register correctly s390/nmi: implement and use local_mcck_save() / local_mcck_restore() s390/nmi: consistently enable machine checks in trap_init() s390/ctlreg: return old register contents when changing bits s390/ap: handle outband SE bind state change s390/ap: store TAPQ hwinfo in struct ap_card s390/vfio-ap: fix sysfs status attribute for AP queue devices s390/vfio-ap: improve reaction to response code 07 from PQAP(AQIC) command ... commit c29901006179c4c87f9335771e50814ec5707239 Merge: 4cd083d53108b d93cca2f3109f Author: Linus Torvalds Date: Wed Jan 10 18:13:44 2024 -0800 Merge tag 'asm-generic-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic cleanups from Arnd Bergmann: "A series from Baoquan He cleans up the asm-generic/io.h to remove the ioremap_uc() definition from everything except x86, which still needs it for pre-PAT systems. This series notably contains a patch from Jiaxun Yang that converts MIPS to use asm-generic/io.h like every other architecture does, enabling future cleanups. Some of my own patches fix -Wmissing-prototype warnings in architecture specific code across several architectures. This is now needed as the warning is enabled by default. There are still some remaining warnings in minor platforms, but the series should catch most of the widely used ones make them more consistent with one another. David McKay fixes a bug in __generic_cmpxchg_local() when this is used on 64-bit architectures. This could currently only affect parisc64 and sparc64. Additional cleanups address from Linus Walleij, Uwe Kleine-König, Thomas Huth, and Kefeng Wang help reduce unnecessary inconsistencies between architectures" * tag 'asm-generic-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: Fix 32 bit __generic_cmpxchg_local Hexagon: Make pfn accessors statics inlines ARC: mm: Make virt_to_pfn() a static inline mips: remove extraneous asm-generic/iomap.h include sparc: Use $(kecho) to announce kernel images being ready arm64: vdso32: Define BUILD_VDSO32_64 to correct prototypes csky: fix arch_jump_label_transform_static override arch: add do_page_fault prototypes arch: add missing prepare_ftrace_return() prototypes arch: vdso: consolidate gettime prototypes arch: include linux/cpu.h for trap_init() prototype arch: fix asm-offsets.c building with -Wmissing-prototypes arch: consolidate arch_irq_work_raise prototypes hexagon: Remove CONFIG_HEXAGON_ARCH_VERSION from uapi header asm/io: remove unnecessary xlate_dev_mem_ptr() and unxlate_dev_mem_ptr() mips: io: remove duplicated codes arch/*/io.h: remove ioremap_uc in some architectures mips: add including commit 4cd083d53108b32f4c8ed92a3f85d7b36133c0c9 Merge: a05aea98d4052 4515d08a742c7 Author: Linus Torvalds Date: Wed Jan 10 18:00:18 2024 -0800 Merge tag 'modules-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull module updates from Luis Chamberlain: "Just one cleanup and one documentation improvement change. No functional changes" * tag 'modules-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: kernel/module: improve documentation for try_module_get() module: Remove redundant TASK_UNINTERRUPTIBLE commit 5b202c250acd8dd1df9fcc8e6319ecd83d69923a Author: Mark Hasemeyer Date: Tue Jan 2 14:07:28 2024 -0700 dt-bindings: power: Clarify wording for wakeup-source property The wording in the current documentation is a little strong. The intention was not to fix any particular interrupt as wakeup capable but leave those details to the device. It wasn't intended to enforce any rules as what can be or can't be a wakeup interrupt. Soften the wording to not mandate that the 'wakeup-source' property be used, and clarify what it means when an interrupt is marked (or not marked) for wakeup. Link: https://lore.kernel.org/all/ZYAjxxHcCOgDVMTQ@bogus/ Link: https://lore.kernel.org/all/CAL_Jsq+MYwOG40X26cYmO9EkZ9xqWrXDi03MaRfxnV-+VGkXWQ@mail.gmail.com/ Signed-off-by: Mark Hasemeyer Link: https://lore.kernel.org/r/20240102140734.v4.4.I1016a45ac9e8daf8a9ebc9854ab90ec3542e7c30@changeid Signed-off-by: Rob Herring commit a05aea98d4052dcd63d9d379613058e9e86c76d7 Merge: 78273df7f646f 561429807d50a Author: Linus Torvalds Date: Wed Jan 10 17:44:36 2024 -0800 Merge tag 'sysctl-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux Pull sysctl updates from Luis Chamberlain: "To help make the move of sysctls out of kernel/sysctl.c not incur a size penalty sysctl has been changed to allow us to not require the sentinel, the final empty element on the sysctl array. Joel Granados has been doing all this work. In the v6.6 kernel we got the major infrastructure changes required to support this. For v6.7 we had all arch/ and drivers/ modified to remove the sentinel. For v6.8-rc1 we get a few more updates for fs/ directory only. The kernel/ directory is left but we'll save that for v6.9-rc1 as those patches are still being reviewed. After that we then can expect also the removal of the no longer needed check for procname == NULL. Let us recap the purpose of this work: - this helps reduce the overall build time size of the kernel and run time memory consumed by the kernel by about ~64 bytes per array - the extra 64-byte penalty is no longer inncurred now when we move sysctls out from kernel/sysctl.c to their own files Thomas Weißschuh also sent a few cleanups, for v6.9-rc1 we expect to see further work by Thomas Weißschuh with the constificatin of the struct ctl_table. Due to Joel Granados's work, and to help bring in new blood, I have suggested for him to become a maintainer and he's accepted. So for v6.9-rc1 I look forward to seeing him sent you a pull request for further sysctl changes. This also removes Iurii Zaikin as a maintainer as he has moved on to other projects and has had no time to help at all" * tag 'sysctl-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux: sysctl: remove struct ctl_path sysctl: delete unused define SYSCTL_PERM_EMPTY_DIR coda: Remove the now superfluous sentinel elements from ctl_table array sysctl: Remove the now superfluous sentinel elements from ctl_table array fs: Remove the now superfluous sentinel elements from ctl_table array cachefiles: Remove the now superfluous sentinel element from ctl_table array sysclt: Clarify the results of selftest run sysctl: Add a selftest for handling empty dirs sysctl: Fix out of bounds access for empty sysctl registers MAINTAINERS: Add Joel Granados as co-maintainer for proc sysctl MAINTAINERS: remove Iurii Zaikin from proc sysctl commit 78273df7f646f8daf2604ec714bea0897cd03aae Merge: 999a36b52b1b1 1e2f2d31997a9 Author: Linus Torvalds Date: Wed Jan 10 16:43:55 2024 -0800 Merge tag 'header_cleanup-2024-01-10' of https://evilpiepirate.org/git/bcachefs Pull header cleanups from Kent Overstreet: "The goal is to get sched.h down to a type only header, so the main thing happening in this patchset is splitting out various _types.h headers and dependency fixups, as well as moving some things out of sched.h to better locations. This is prep work for the memory allocation profiling patchset which adds new sched.h interdepencencies" * tag 'header_cleanup-2024-01-10' of https://evilpiepirate.org/git/bcachefs: (51 commits) Kill sched.h dependency on rcupdate.h kill unnecessary thread_info.h include Kill unnecessary kernel.h include preempt.h: Kill dependency on list.h rseq: Split out rseq.h from sched.h LoongArch: signal.c: add header file to fix build error restart_block: Trim includes lockdep: move held_lock to lockdep_types.h sem: Split out sem_types.h uidgid: Split out uidgid_types.h seccomp: Split out seccomp_types.h refcount: Split out refcount_types.h uapi/linux/resource.h: fix include x86/signal: kill dependency on time.h syscall_user_dispatch.h: split out *_types.h mm_types_task.h: Trim dependencies Split out irqflags_types.h ipc: Kill bogus dependency on spinlock.h shm: Slim down dependencies workqueue: Split out workqueue_types.h ... commit 999a36b52b1b11b2ca0590756e4f8cf21f2d9182 Merge: 84e9a2d5517bf 169de41985f53 Author: Linus Torvalds Date: Wed Jan 10 16:34:17 2024 -0800 Merge tag 'bcachefs-2024-01-10' of https://evilpiepirate.org/git/bcachefs Pull bcachefs updates from Kent Overstreet: - btree write buffer rewrite: instead of adding keys to the btree write buffer at transaction commit time, we now journal them with a different journal entry type and copy them from the journal to the write buffer just prior to journal write. This reduces the number of atomic operations on shared cachelines in the transaction commit path and is a signicant performance improvement on some workloads: multithreaded 4k random writes went from ~650k iops to ~850k iops. - Bring back optimistic spinning for six locks: the new implementation doesn't use osq locks; instead we add to the lock waitlist as normal, and then spin on the lock_acquired bit in the waitlist entry, _not_ the lock itself. - New ioctls: - BCH_IOCTL_DEV_USAGE_V2, which allows for new data types - BCH_IOCTL_OFFLINE_FSCK, which runs the kernel implementation of fsck but without mounting: useful for transparently using the kernel version of fsck from 'bcachefs fsck' when the kernel version is a better match for the on disk filesystem. - BCH_IOCTL_ONLINE_FSCK: online fsck. Not all passes are supported yet, but the passes that are supported are fully featured - errors may be corrected as normal. The new ioctls use the new 'thread_with_file' abstraction for kicking off a kthread that's tied to a file descriptor returned to userspace via the ioctl. - btree_paths within a btree_trans are now dynamically growable, instead of being limited to 64. This is important for the check_directory_structure phase of fsck, and also fixes some issues we were having with btree path overflow in the reflink btree. - Trigger refactoring; prep work for the upcoming disk space accounting rewrite - Numerous bugfixes :) * tag 'bcachefs-2024-01-10' of https://evilpiepirate.org/git/bcachefs: (226 commits) bcachefs: eytzinger0_find() search should be const bcachefs: move "ptrs not changing" optimization to bch2_trigger_extent() bcachefs: fix simulateously upgrading & downgrading bcachefs: Restart recovery passes more reliably bcachefs: bch2_dump_bset() doesn't choke on u64s == 0 bcachefs: improve checksum error messages bcachefs: improve validate_bset_keys() bcachefs: print sb magic when relevant bcachefs: __bch2_sb_field_to_text() bcachefs: %pg is banished bcachefs: Improve would_deadlock trace event bcachefs: fsck_err()s don't need to manually check c->sb.version anymore bcachefs: Upgrades now specify errors to fix, like downgrades bcachefs: no thread_with_file in userspace bcachefs: Don't autofix errors we can't fix bcachefs: add missing bch2_latency_acct() call bcachefs: increase max_active on io_complete_wq bcachefs: add time_stats for btree_node_read_done() bcachefs: don't clear accessed bit in btree node fill bcachefs: Add an option to control btree node prefetching ... commit 84e9a2d5517bf62edda74f382757aa173b8e45fd Merge: 587217f9706a4 26ba1bf310f0e Author: Linus Torvalds Date: Wed Jan 10 16:23:30 2024 -0800 Merge tag 'v6.8-rc-part1-smb-client' of git://git.samba.org/sfrench/cifs-2.6 Pull smb client fixes from Steve French: "Various smb client fixes, most related to better handling special file types: - Improve handling of special file types: - performance improvement (better compounding and better caching of readdir entries that are reparse points) - extend support for creating special files (sockets, fifos, block/char devices) - fix renaming and hardlinking of reparse points - extend support for creating symlinks with IO_REPARSE_TAG_SYMLINK - Multichannel logging improvement - Exception handling fix - Minor cleanups" * tag 'v6.8-rc-part1-smb-client' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module version number for cifs.ko cifs: remove unneeded return statement cifs: make cifs_chan_update_iface() a void function cifs: delete unnecessary NULL checks in cifs_chan_update_iface() cifs: get rid of dup length check in parse_reparse_point() smb: client: stop revalidating reparse points unnecessarily cifs: Pass unbyteswapped eof value into SMB2_set_eof() smb3: Improve exception handling in allocate_mr_list() cifs: fix in logging in cifs_chan_update_iface smb: client: handle special files and symlinks in SMB3 POSIX smb: client: cleanup smb2_query_reparse_point() smb: client: allow creating symlinks via reparse points smb: client: fix hardlinking of reparse points smb: client: fix renaming of reparse points smb: client: optimise reparse point querying smb: client: allow creating special files via reparse points smb: client: extend smb2_compound_op() to accept more commands smb: client: Fix minor whitespace errors and warnings commit 587217f9706a4ff033196d819db52e32afa29654 Merge: 0d19d9e14687f 57331a59ac0d6 Author: Linus Torvalds Date: Wed Jan 10 16:13:57 2024 -0800 Merge tag 'nfs-for-6.8-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull nfs client updates from Anna Schumaker: "New Features: - Always ask for type with READDIR - Remove nfs_writepage() Bugfixes: - Fix a suspicious RCU usage warning - Fix a blocklayoutdriver reference leak - Fix the block driver's calculation of layoutget size - Fix handling NFS4ERR_RETURNCONFLICT - Fix _xprt_switch_find_current_entry() - Fix v4.1 backchannel request timeouts - Don't add zero-length pnfs block devices - Use the parent cred in nfs_access_login_time() Cleanups: - A few improvements when dealing with referring calls from the server - Clean up various unused variables, struct fields, and function calls - Various tracepoint improvements" * tag 'nfs-for-6.8-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (21 commits) NFSv4.1: Use the nfs_client's rpc timeouts for backchannel SUNRPC: Fixup v4.1 backchannel request timeouts rpc_pipefs: Replace one label in bl_resolve_deviceid() nfs: Remove writepage NFS: drop unused nfs_direct_req bytes_left pNFS: Fix the pnfs block driver's calculation of layoutget size nfs: print fileid in lookup tracepoints nfs: rename the nfs_async_rename_done tracepoint nfs: add new tracepoint at nfs4 revalidate entry point SUNRPC: fix _xprt_switch_find_current_entry logic NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT NFSv4.1: if referring calls are complete, trust the stateid argument NFSv4: Track the number of referring calls in struct cb_process_state NFS: Use parent's objective cred in nfs_access_login_time() NFSv4: Always ask for type with READDIR pnfs/blocklayout: Don't add zero-length pnfs_block_dev blocklayoutdriver: Fix reference leak of pnfs_device_node SUNRPC: Fix a suspicious RCU usage warning SUNRPC: Create a helper function for accessing the rpc_clnt's xprt_switch SUNRPC: Remove unused function rpc_clnt_xprt_switch_put() ... commit 0d19d9e14687ff6f43d6c4806ace9ff682d7703f Merge: 6bd593bc743d3 68da4c44b994a Author: Linus Torvalds Date: Wed Jan 10 16:09:14 2024 -0800 Merge tag 'ext4_for_linus-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Various ext4 bug fixes and cleanups. The fixes are mostly in the fstrim and mballoc code paths. Also enable dioread_nolock in the case where the block size is less than the page size (dioread_nolock has been default in the bs == ps case for quite some time)" * tag 'ext4_for_linus-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix inconsistent between segment fstrim and full fstrim ext4: fallback to complex scan if aligned scan doesn't work ext4: convert ext4_da_do_write_end() to take a folio ext4: allow for the last group to be marked as trimmed ext4: move ext4_check_bdev_write_error() into nojournal mode jbd2: abort journal when detecting metadata writeback error of fs dev jbd2: remove unused 'JBD2_CHECKPOINT_IO_ERROR' and 'j_atomic_flags' jbd2: replace journal state flag by checking errseq jbd2: add errseq to detect client fs's bdev writeback error ext4: improving calculation of 'fe_{len|start}' in mb_find_extent() ext4: clarify handling of unwritten bh in __ext4_block_zero_page_range() ext4: treat end of range as exclusive in ext4_zero_range() ext4: enable dioread_nolock as default for bs < ps case ext4: delete redundant calculations in ext4_mb_get_buddy_page_lock() ext4: reduce unnecessary memory allocation in alloc_flex_gd() ext4: avoid online resizing failures due to oversized flex bg ext4: remove unnecessary check from alloc_flex_gd() ext4: unify the type of flexbg_size to unsigned int commit 6bd593bc743d3b959af157698064ece5fb56aee0 Merge: acc657692aed4 b837a816b36fa Author: Linus Torvalds Date: Wed Jan 10 16:06:58 2024 -0800 Merge tag 'unicode-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode Pull unicode updates from Gabriel Krisman Bertazi: "Other than the update to MAINTAINERS, this PR has only a fix to stop ecryptfs from inadvertently mounting case-insensitive filesystems that it cannot handle, which would otherwise caused post-mount failures" * tag 'unicode-next-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/krisman/unicode: MAINTAINERS: update unicode maintainer e-mail address ecryptfs: Reject casefold directory inodes commit b2da197565d7a2e8f357605a63971bf39597a9f0 Merge: 748dc0b65ec2b 31deaeb11ba7a Author: Jens Axboe Date: Wed Jan 10 15:26:42 2024 -0700 Merge tag 'nvme-6.8-2024-1-10' of git://git.infradead.org/nvme into for-6.8/block Pull NVMe changes from Keith: "nvme follow-up updates for Linux 6.8 - tcp, fc, and rdma target fixes (Maurizio, Daniel, Hannes, Christoph) - discard fixes and improvements (Christoph) - timeout debug improvements (Keith, Max) - various cleanups (Daniel, Max, Giuxen) - trace event string fixes (Arnd) - shadow doorbell setup on reset fix (William) - a write zeroes quirk for SK Hynix (Jim)" * tag 'nvme-6.8-2024-1-10' of git://git.infradead.org/nvme: (25 commits) nvmet-rdma: avoid circular locking dependency on install_queue() nvmet-tcp: avoid circular locking dependency on install_queue() nvme-pci: set doorbell config before unquiescing nvmet-tcp: Fix the H2C expected PDU len calculation nvme-tcp: enhance timeout kernel log nvme-rdma: enhance timeout kernel log nvme-pci: enhance timeout kernel log nvme: trace: avoid memcpy overflow warning nvmet: re-fix tracing strncpy() warning nvme: introduce nvme_disk_is_ns_head helper nvme-pci: disable write zeroes for SK Hynix BC901 nvmet-fcloop: Remove remote port from list when unlinking nvmet-trace: avoid dereferencing pointer too early nvmet-fc: remove unnecessary bracket nvme: simplify the max_discard_segments calculation nvme: fix max_discard_sectors calculation nvme: also skip discard granularity updates in nvme_config_discard nvme: update the explanation for not updating the limits in nvme_config_discard nvmet-tcp: fix a missing endianess conversion in nvmet_tcp_try_peek_pdu nvme-common: mark nvme_tls_psk_prio static ... commit 78f70c02bdbccb5e9b0b0c728185d4aeb7044ace Author: Arnd Bergmann Date: Tue Jan 9 08:57:19 2024 +0100 vfio/virtio: fix virtio-pci dependency The new vfio-virtio driver already has a dependency on VIRTIO_PCI_ADMIN_LEGACY, but that is a bool symbol and allows vfio-virtio to be built-in even if virtio-pci itself is a loadable module. This leads to a link failure: aarch64-linux-ld: drivers/vfio/pci/virtio/main.o: in function `virtiovf_pci_probe': main.c:(.text+0xec): undefined reference to `virtio_pci_admin_has_legacy_io' aarch64-linux-ld: drivers/vfio/pci/virtio/main.o: in function `virtiovf_pci_init_device': main.c:(.text+0x260): undefined reference to `virtio_pci_admin_legacy_io_notify_info' aarch64-linux-ld: drivers/vfio/pci/virtio/main.o: in function `virtiovf_pci_bar0_rw': main.c:(.text+0x6ec): undefined reference to `virtio_pci_admin_legacy_common_io_read' aarch64-linux-ld: main.c:(.text+0x6f4): undefined reference to `virtio_pci_admin_legacy_device_io_read' aarch64-linux-ld: main.c:(.text+0x7f0): undefined reference to `virtio_pci_admin_legacy_common_io_write' aarch64-linux-ld: main.c:(.text+0x7f8): undefined reference to `virtio_pci_admin_legacy_device_io_write' Add another explicit dependency on the tristate symbol. Fixes: eb61eca0e8c3 ("vfio/virtio: Introduce a vfio driver over virtio devices") Signed-off-by: Arnd Bergmann Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20240109075731.2726731-1-arnd@kernel.org Signed-off-by: Alex Williamson commit 31deaeb11ba7a885116c9c30892b9f763c04d59c Author: Hannes Reinecke Date: Fri Dec 8 13:53:21 2023 +0100 nvmet-rdma: avoid circular locking dependency on install_queue() nvmet_rdma_install_queue() is driven from the ->io_work workqueue function, but will call flush_workqueue() which might trigger ->release_work() which in itself calls flush_work on ->io_work. To avoid that check for pending queue in disconnecting status, and return 'controller busy' when we reached a certain threshold. Signed-off-by: Hannes Reinecke Tested-by: Shin'ichiro Kawasaki Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 07a29b134ce8e47aef15ea71eab8e6b3734a9720 Author: Hannes Reinecke Date: Fri Dec 8 13:53:20 2023 +0100 nvmet-tcp: avoid circular locking dependency on install_queue() nvmet_tcp_install_queue() is driven from the ->io_work workqueue function, but will call flush_workqueue() which might trigger ->release_work() which in itself calls flush_work on ->io_work. To avoid that check for pending queue in disconnecting status, and return 'controller busy' when we reached a certain threshold. Signed-off-by: Hannes Reinecke Tested-by: Shin'ichiro Kawasaki Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit acc657692aed438e9931438f8c923b2b107aebf9 Author: David Howells Date: Wed Jan 10 21:11:40 2024 +0000 keys, dns: Fix size check of V1 server-list header Fix the size check added to dns_resolver_preparse() for the V1 server-list header so that it doesn't give EINVAL if the size supplied is the same as the size of the header struct (which should be valid). This can be tested with: echo -n -e '\0\0\01\xff\0\0' | keyctl padd dns_resolver desc @p which will give "add_key: Invalid argument" without this fix. Fixes: 1997b3cb4217 ("keys, dns: Fix missing size check of V1 server-list header") Reported-by: Pengfei Xu Link: https://lore.kernel.org/r/ZZ4fyY4r3rqgZL+4@xpf.sh.intel.com/ Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 0cb552aa97843f24549ce808883494138471c16b Merge: 6434eade5dd51 b8910630c967f Author: Linus Torvalds Date: Wed Jan 10 12:23:43 2024 -0800 Merge tag 'v6.8-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Add incremental lskcipher/skcipher processing Algorithms: - Remove SHA1 from drbg - Remove CFB and OFB Drivers: - Add comp high perf mode configuration in hisilicon/zip - Add support for 420xx devices in qat - Add IAA Compression Accelerator driver" * tag 'v6.8-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (172 commits) crypto: iaa - Account for cpu-less numa nodes crypto: scomp - fix req->dst buffer overflow crypto: sahara - add support for crypto_engine crypto: sahara - remove error message for bad aes request size crypto: sahara - remove unnecessary NULL assignments crypto: sahara - remove 'active' flag from sahara_aes_reqctx struct crypto: sahara - use dev_err_probe() crypto: sahara - use devm_clk_get_enabled() crypto: sahara - use BIT() macro crypto: sahara - clean up macro indentation crypto: sahara - do not resize req->src when doing hash operations crypto: sahara - fix processing hash requests with req->nbytes < sg->length crypto: sahara - improve error handling in sahara_sha_process() crypto: sahara - fix wait_for_completion_timeout() error handling crypto: sahara - fix ahash reqsize crypto: sahara - handle zero-length aes requests crypto: skcipher - remove excess kerneldoc members crypto: shash - remove excess kerneldoc members crypto: qat - generate dynamically arbiter mappings crypto: qat - add support for ring pair level telemetry ... commit 3e999770ac1c7c31a70685dd5b88e89473509e9c Author: Rafael J. Wysocki Date: Tue Jan 9 17:59:22 2024 +0100 PM: sleep: Restore asynchronous device resume optimization Before commit 7839d0078e0d ("PM: sleep: Fix possible deadlocks in core system-wide PM code"), the resume of devices that were allowed to resume asynchronously was scheduled before starting the resume of the other devices, so the former did not have to wait for the latter unless functional dependencies were present. Commit 7839d0078e0d removed that optimization in order to address a correctness issue, but it can be restored with the help of a new device power management flag, so do that now. Signed-off-by: Rafael J. Wysocki Reviewed-by: Stanislaw Gruszka commit 6434eade5dd51f12b464c8dc16633f0f2d26e284 Merge: 120a201bd2ad0 2b6fad7a900d2 Author: Linus Torvalds Date: Wed Jan 10 11:37:38 2024 -0800 Merge tag 'tpmdd-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "Just a couple fixes and no new features" * tag 'tpmdd-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: cr50: fix kernel-doc warning and spelling tpm: nuvoton: Use i2c_get_match_data() commit 120a201bd2ad0bffebdd2cf62c389dbba79bbfae Merge: 72116efd63070 a75b3809dce2a Author: Linus Torvalds Date: Wed Jan 10 11:03:52 2024 -0800 Merge tag 'hardening-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull hardening updates from Kees Cook: - Introduce the param_unknown_fn type and other clean ups (Andy Shevchenko) - Various __counted_by annotations (Christophe JAILLET, Gustavo A. R. Silva, Kees Cook) - Add KFENCE test to LKDTM (Stephen Boyd) - Various strncpy() refactorings (Justin Stitt) - Fix qnx4 to avoid writing into the smaller of two overlapping buffers - Various strlcpy() refactorings * tag 'hardening-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: qnx4: Use get_directory_fname() in qnx4_match() qnx4: Extract dir entry filename processing into helper atags_proc: Add __counted_by for struct buffer and use struct_size() tracing/uprobe: Replace strlcpy() with strscpy() params: Fix multi-line comment style params: Sort headers params: Use size_add() for kmalloc() params: Do not go over the limit when getting the string length params: Introduce the param_unknown_fn type lkdtm: Add kfence read after free crash type nvme-fc: replace deprecated strncpy with strscpy nvdimm/btt: replace deprecated strncpy with strscpy nvme-fabrics: replace deprecated strncpy with strscpy drm/modes: replace deprecated strncpy with strscpy_pad afs: Add __counted_by for struct afs_acl and use struct_size() VMCI: Annotate struct vmci_handle_arr with __counted_by i40e: Annotate struct i40e_qvlist_info with __counted_by HID: uhid: replace deprecated strncpy with strscpy samples: Replace strlcpy() with strscpy() SUNRPC: Replace strlcpy() with strscpy() commit 68da4c44b994aea797eb9821acb3a4a36015293e Author: Ye Bin Date: Sat Dec 16 09:09:19 2023 +0800 ext4: fix inconsistent between segment fstrim and full fstrim Suppose we issue two FITRIM ioctls for ranges [0,15] and [16,31] with mininum length of trimmed range set to 8 blocks. If we have say a range of blocks 10-22 free, this range will not be trimmed because it straddles the boundary of the two FITRIM ranges and neither part is big enough. This is a bit surprising to some users that call FITRIM on smaller ranges of blocks to limit impact on the system. Also XFS trims all free space extents that overlap with the specified range so we are inconsistent among filesystems. Let's change ext4_try_to_trim_range() to consider for trimming the whole free space extent that straddles the end of specified range, not just the part of it within the range. Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231216010919.1995851-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o commit 1f6bc02f18489b9c9ea39b068d0695fb0e4567e9 Author: Ojaswin Mujoo Date: Fri Dec 15 16:49:50 2023 +0530 ext4: fallback to complex scan if aligned scan doesn't work Currently in case the goal length is a multiple of stripe size we use ext4_mb_scan_aligned() to find the stripe size aligned physical blocks. In case we are not able to find any, we again go back to calling ext4_mb_choose_next_group() to search for a different suitable block group. However, since the linear search always begins from the start, most of the times we end up with the same BG and the cycle continues. With large fliesystems, the CPU can be stuck in this loop for hours which can slow down the whole system. Hence, until we figure out a better way to continue the search (rather than starting from beginning) in ext4_mb_choose_next_group(), lets just fallback to ext4_mb_complex_scan_group() in case aligned scan fails, as it is much more likely to find the needed blocks. Signed-off-by: Ojaswin Mujoo Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/ee033f6dfa0a7f2934437008a909c3788233950f.1702455010.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit 4d5cdd757d0c74924b629559fccb68d8803ce995 Author: Matthew Wilcox (Oracle) Date: Thu Dec 14 05:30:35 2023 +0000 ext4: convert ext4_da_do_write_end() to take a folio There's nothing page-specific happening in ext4_da_do_write_end(); it's merely used for its refcount & lock, both of which are folio properties. Saves four calls to compound_head(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231214053035.1018876-1-willy@infradead.org Signed-off-by: Theodore Ts'o commit 7c784d624819acbeefb0018bac89e632467cca5a Author: Suraj Jitindar Singh Date: Wed Dec 13 16:16:35 2023 +1100 ext4: allow for the last group to be marked as trimmed The ext4 filesystem tracks the trim status of blocks at the group level. When an entire group has been trimmed then it is marked as such and subsequent trim invocations with the same minimum trim size will not be attempted on that group unless it is marked as able to be trimmed again such as when a block is freed. Currently the last group can't be marked as trimmed due to incorrect logic in ext4_last_grp_cluster(). ext4_last_grp_cluster() is supposed to return the zero based index of the last cluster in a group. This is then used by ext4_try_to_trim_range() to determine if the trim operation spans the entire group and as such if the trim status of the group should be recorded. ext4_last_grp_cluster() takes a 0 based group index, thus the valid values for grp are 0..(ext4_get_groups_count - 1). Any group index less than (ext4_get_groups_count - 1) is not the last group and must have EXT4_CLUSTERS_PER_GROUP(sb) clusters. For the last group we need to calculate the number of clusters based on the number of blocks in the group. Finally subtract 1 from the number of clusters as zero based indexing is expected. Rearrange the function slightly to make it clear what we are calculating and returning. Reproducer: // Create file system where the last group has fewer blocks than // blocks per group $ mkfs.ext4 -b 4096 -g 8192 /dev/nvme0n1 8191 $ mount /dev/nvme0n1 /mnt Before Patch: $ fstrim -v /mnt /mnt: 25.9 MiB (27156480 bytes) trimmed // Group not marked as trimmed so second invocation still discards blocks $ fstrim -v /mnt /mnt: 25.9 MiB (27156480 bytes) trimmed After Patch: fstrim -v /mnt /mnt: 25.9 MiB (27156480 bytes) trimmed // Group marked as trimmed so second invocation DOESN'T discard any blocks fstrim -v /mnt /mnt: 0 B (0 bytes) trimmed Fixes: 45e4ab320c9b ("ext4: move setting of trimmed bit into ext4_try_to_trim_range()") Cc: # 4.19+ Signed-off-by: Suraj Jitindar Singh Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231213051635.37731-1-surajjs@amazon.com Signed-off-by: Theodore Ts'o commit 72116efd6307077546c93e0432a197876cedff70 Merge: 4d925f60578ab 24a0b5e196cf7 Author: Linus Torvalds Date: Wed Jan 10 10:53:02 2024 -0800 Merge tag 'pstore-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore updates from Kees Cook: - Do not allow misconfigured ECC sizes (Sergey Shtylyov) - Allow for odd number of CPUs (Weichen Chen) - Refactor error handling to use cleanup.h * tag 'pstore-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: inode: Use cleanup.h for struct pstore_private pstore: inode: Use __free(pstore_iput) for inode allocations pstore: inode: Convert mutex usage to guard(mutex) pstore: inode: Convert kfree() usage to __free(kfree) pstore: ram_core: fix possible overflow in persistent_ram_init_ecc() pstore/ram: Fix crash when setting number of cpus to an odd number commit 4d925f60578ab3b13e2cfeb5e6e38cb83d51e032 Merge: 0507d2526f843 d17bb4620f90f Author: Linus Torvalds Date: Wed Jan 10 10:48:22 2024 -0800 Merge tag 'ovl-update-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs Pull overlayfs updates from Amir Goldstein: "This is a very small update with no bug fixes and no new features. The larger update of overlayfs for this cycle, the re-factoring of overlayfs code into generic backing_file helpers, was already merged via Christian. Summary: - Simplify/clarify some code No bug fixes here, just some changes following questions from Al about overlayfs code that could be a little more simple to follow. - Overlayfs documentation style fixes Mainly fixes for ReST formatting suggested by documentation developers" * tag 'ovl-update-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs: overlayfs.rst: fix ReST formatting overlayfs.rst: use consistent feature names ovl: initialize ovl_copy_up_ctx.destname inside ovl_do_copy_up() ovl: remove redundant ofs->indexdir member commit fe80eb15dea5125ea64845c9de0dd7f8478dd267 Author: Jens Axboe Date: Wed Jan 10 10:05:32 2024 -0700 io_uring/rw: cleanup io_rw_done() This originally came from the aio side, and it's laid out rather oddly. The common case here is that we either get -EIOCBQUEUED from submitting an async request, or that we complete the request correctly with the given number of bytes. Handling the odd internal restart error codes is not a common operation. Lay it out a bit more optimally that better explains the normal flow, and switch to avoiding the indirect call completely as this is our kiocb and we know the completion handler can only be one of two possible variants. While at it, move it to where it belongs in the file, with fellow end IO helpers. Outside of being easier to read, this also reduces the text size of the function by 24 bytes for me on arm64. Reviewed-by: Keith Busch Signed-off-by: Jens Axboe commit 0507d2526f843c1d5d833d318f90b64dd07fc93f Merge: 17b9e388c619e aa12a790d31be Author: Linus Torvalds Date: Wed Jan 10 10:39:56 2024 -0800 Merge tag 'erofs-for-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "In this cycle, we'd like to enable basic sub-page compressed data support for Android ecosystem (for vendors to try out 16k page size with 4k-block images in their compatibility mode) as well as container images (so that 4k-block images can be parsed on arm64 cloud servers using 64k page size.) In addition, there are several bugfixes and cleanups as usual. All commits have been in -next for a while and no potential merge conflict is observed. Summary: - Add basic sub-page compressed data support - Fix a memory leak on MicroLZMA and DEFLATE compression - Fix a rare LZ4 inplace decompression issue on recent x86 CPUs - Fix a KASAN issue reported by syzbot around crafted images - Some cleanups" * tag 'erofs-for-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: make erofs_{err,info}() support NULL sb parameter erofs: avoid debugging output for (de)compressed data erofs: allow partially filled compressed bvecs erofs: enable sub-page compressed block support erofs: refine z_erofs_transform_plain() for sub-page block support erofs: fix ztailpacking for subpage compressed blocks erofs: fix up compacted indexes for block size < 4096 erofs: record `pclustersize` in bytes instead of pages erofs: support I/O submission for sub-page compressed blocks erofs: fix lz4 inplace decompression erofs: fix memory leak on short-lived bounced pages commit 06c59d427017fcde3107c236177fcc74c9db7909 Author: William Butler Date: Wed Jan 10 18:28:55 2024 +0000 nvme-pci: set doorbell config before unquiescing During resets, if queues are unquiesced first, then the host can submit IOs to the controller using shadow doorbell logic but the controller won't be aware. This can lead to necessary MMIO doorbells from being not issued, causing requests to be delayed and timed-out. Signed-off-by: William Butler Signed-off-by: Keith Busch commit 17b9e388c619ea4f1eae97833cdcadfbfe041650 Merge: 49f4810356f7d 2a0e85719892a Author: Linus Torvalds Date: Wed Jan 10 10:24:49 2024 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux Pull fscrypt updates from Eric Biggers: "Adjust the timing of the fscrypt keyring destruction, to prepare for btrfs's fscrypt support. Also document that CephFS supports fscrypt now" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/linux: fs: move fscrypt keyring destruction to after ->put_super f2fs: move release of block devices to after kill_block_super() fscrypt: document that CephFS supports fscrypt now fscrypt: update comment for do_remove_key() fscrypt.rst: update definition of struct fscrypt_context_v2 commit 49f4810356f7d4294ad63dc70fe3c65ca3b8ada9 Merge: d8c8e595dc31f 17419aefcbfd9 Author: Linus Torvalds Date: Wed Jan 10 10:20:08 2024 -0800 Merge tag 'nfsd-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd updates from Chuck Lever: "The bulk of the patches for this release are clean-ups and minor bug fixes. There is one significant revert to mention: support for RDMA Read operations in the server's RPC-over-RDMA transport implementation has been fixed so it waits for Read completion in a way that avoids tying up an nfsd thread. This prevents a possible DoS vector if an RPC-over-RDMA client should become unresponsive during RDMA Read operations. As always I am grateful to NFSD contributors, reviewers, and testers" * tag 'nfsd-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (56 commits) nfsd: rename nfsd_last_thread() to nfsd_destroy_serv() SUNRPC: discard sv_refcnt, and svc_get/svc_put svc: don't hold reference for poolstats, only mutex. SUNRPC: remove printk when back channel request not found svcrdma: Implement multi-stage Read completion again svcrdma: Copy construction of svc_rqst::rq_arg to rdma_read_complete() svcrdma: Add back svcxprt_rdma::sc_read_complete_q svcrdma: Add back svc_rdma_recv_ctxt::rc_pages svcrdma: Clean up comment in svc_rdma_accept() svcrdma: Remove queue-shortening warnings svcrdma: Remove pointer addresses shown in dprintk() svcrdma: Optimize svc_rdma_cc_init() svcrdma: De-duplicate completion ID initialization helpers svcrdma: Move the svc_rdma_cc_init() call svcrdma: Remove struct svc_rdma_read_info svcrdma: Update the synopsis of svc_rdma_read_special() svcrdma: Update the synopsis of svc_rdma_read_call_chunk() svcrdma: Update synopsis of svc_rdma_read_multiple_chunks() svcrdma: Update synopsis of svc_rdma_copy_inline_range() svcrdma: Update the synopsis of svc_rdma_read_data_item() ... commit d8c8e595dc31fb639bc4f8a202901afaa15bb13f Merge: 0c59ae1290741 5beebc1dda477 Author: Linus Torvalds Date: Wed Jan 10 10:17:23 2024 -0800 Merge tag 'dlm-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This set cleans up the interface between nfs lockd and dlm, which is handling nfs file locking for gfs2 and ocfs2. Very basic lockd functionality is fixed, in which the fl owner was using the lockd pid instead of the owner value from nfs" * tag 'dlm-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: update format header reflect current format dlm: fix format seq ops type 4 dlm: implement EXPORT_OP_ASYNC_LOCK dlm: use FL_SLEEP to determine blocking vs non-blocking dlm: use fl_owner from lockd dlm: use kernel_connect() and kernel_bind() commit 0c59ae1290741854b6cf597ef05bfa9bc811389f Merge: 032500abc5dc7 abcbd3bfbbfe9 Author: Linus Torvalds Date: Wed Jan 10 10:11:01 2024 -0800 Merge tag 'afs-fix-rotation-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull afs updates from David Howells: "The majority of the patches are aimed at fixing and improving the AFS filesystem's rotation over server IP addresses, but there are also some fixes from Oleg Nesterov for the use of read_seqbegin_or_lock(). - Fix fileserver probe handling so that the next round of probes doesn't break ongoing server/address rotation by clearing all the probe result tracking. This could occasionally cause the rotation algorithm to drop straight through, give a 'successful' result without actually emitting any RPC calls, leaving the reply buffer in an undefined state. Instead, detach the probe results into a separate struct and allocate a new one each time we start probing and update the pointer to it. Probes are also sent in order of address preference to try and improve the chance that the preferred one will complete first. - Fix server rotation so that it uses configurable address preferences across on the probes that have completed so far than ranking them by RTT as the latter doesn't necessarily give the best route. The preference list can be altered by writing into /proc/net/afs/addr_prefs. - Fix the handling of Read-Only (and Backup) volume callbacks as there is one per volume, not one per file, so if someone performs a command that, say, offlines the volume but doesn't change it, when it comes back online we don't spam the server with a status fetch for every vnode we're using. Instead, check the Creation timestamp in the VolSync record when prompted by a callback break. - Handle volume regression (ie. a RW volume being restored from a backup) by scrubbing all cache data for that volume. This is detected from the VolSync creation timestamp. - Adjust abort handling and abort -> error mapping to match better with what other AFS clients do. - Fix offline and busy volume state handling as they only apply to individual server instances and not entire volumes and the rotation algorithm should go and look at other servers if available. Also make it sleep briefly before each retry if all the volume instances are unavailable" * tag 'afs-fix-rotation-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: (40 commits) afs: trace: Log afs_make_call(), including server address afs: Fix offline and busy message emission afs: Fix fileserver rotation afs: Overhaul invalidation handling to better support RO volumes afs: Parse the VolSync record in the reply of a number of RPC ops afs: Don't leave DONTUSE/NEWREPSITE servers out of server list afs: Fix comment in afs_do_lookup() afs: Apply server breaks to mmap'd files in the call processor afs: Move the vnode/volume validity checking code into its own file afs: Defer volume record destruction to a workqueue afs: Make it possible to find the volumes that are using a server afs: Combine the endpoint state bools into a bitmask afs: Keep a record of the current fileserver endpoint state afs: Dispatch vlserver probes in priority order afs: Dispatch fileserver probes in priority order afs: Mark address lists with configured priorities afs: Provide a way to configure address priorities afs: Remove the unimplemented afs_cmp_addr_list() afs: Add some more info to /proc/net/afs/servers rxrpc: Create a procfile to display outstanding client conn bundles ... commit 032500abc5dc7add035ad5bc8eddf67e97f686b6 Merge: bfed9a92940ba a280c9ceeca73 Author: Linus Torvalds Date: Wed Jan 10 10:04:36 2024 -0800 Merge tag 'jfs-6.8' of github.com:kleikamp/linux-shaggy Pull jfs updates from David Kleikamp: "Stability improvements" * tag 'jfs-6.8' of github.com:kleikamp/linux-shaggy: jfs: Add missing set_freezable() for freezable kthread jfs: fix array-index-out-of-bounds in diNewExt jfs: fix shift-out-of-bounds in dbJoin jfs: fix uaf in jfs_evict_inode jfs: fix array-index-out-of-bounds in dbAdjTree jfs: fix slab-out-of-bounds Read in dtSearch UBSAN: array-index-out-of-bounds in dtSplitRoot FS:JFS:UBSAN:array-index-out-of-bounds in dbAdjTree commit f16d65124380ac6de8055c4a8e5373a1043bb09b Author: Dragos Tatulea Date: Mon Dec 25 17:12:03 2023 +0200 vdpa/mlx5: Add mkey leak detection Track allocated mrs in a list and show warning when leaks are detected on device free or reset. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20231225151203.152687-9-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit a06bd11b18fdf2d40e2b81d4318abc6cc38e70c9 Author: Dragos Tatulea Date: Mon Dec 25 17:12:02 2023 +0200 vdpa/mlx5: Introduce reference counting to mrs Deleting the old mr during mr update (.set_map) and then modifying the vqs with the new mr is not a good flow for firmware. The firmware expects that mkeys are deleted after there are no more vqs referencing them. Introduce reference counting for mrs to fix this. It is the only way to make sure that mkeys are not in use by vqs. An mr reference is taken when the mr is associated to the mr asid table and when the mr is linked to the vq on create/modify. The reference is released when the mkey is unlinked from the vq (trough modify/destroy) and from the mr asid table. To make things consistent, get rid of mlx5_vdpa_destroy_mr and use get/put semantics everywhere. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Acked-by: Jason Wang Signed-off-by: Dragos Tatulea Message-Id: <20231225151203.152687-8-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit f756dd3e2a4c704c0ab5ecb143ab71f1249af497 Author: Dragos Tatulea Date: Mon Dec 25 17:12:01 2023 +0200 vdpa/mlx5: Use vq suspend/resume during .set_map Instead of tearing down and setting up vq resources, use vq suspend/resume during .set_map to speed things up a bit. The vq mr is updated with the new mapping while the vqs are suspended. If the device doesn't support resumable vqs, do the old teardown and setup dance. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Acked-by: Jason Wang Signed-off-by: Dragos Tatulea Message-Id: <20231225151203.152687-7-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 60c43b3f6b4eb5a3d672952a0d65991f414ea258 Author: Dragos Tatulea Date: Mon Dec 25 17:12:00 2023 +0200 vdpa/mlx5: Mark vq state for modification in hw vq .set_vq_state will set the indices and mark the fields to be modified in the hw vq. Advertise that the device supports changing the vq state when the device is in DRIVER_OK state and suspended. Reviewed-by: Gal Pressman Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Message-Id: <20231225151203.152687-6-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 9b23417825df470e4c9e98e7ed4b2c37465bfa1e Author: Dragos Tatulea Date: Mon Dec 25 17:11:59 2023 +0200 vdpa/mlx5: Mark vq addrs for modification in hw vq Addresses get set by .set_vq_address. hw vq addresses will be updated on next modify_virtqueue. Reviewed-by: Gal Pressman Signed-off-by: Dragos Tatulea Message-Id: <20231225151203.152687-5-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 145096937b8a6a8d5889f5a1a6fb453c52cc48a1 Author: Dragos Tatulea Date: Mon Dec 25 17:11:58 2023 +0200 vdpa/mlx5: Introduce per vq and device resume Implement vdpa vq and device resume if capability detected. Add support for suspend -> ready state change. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Acked-by: Jason Wang Signed-off-by: Dragos Tatulea Message-Id: <20231225151203.152687-4-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 651cdaa9c028b1edf0897e10f560fed4f4fb1fb6 Author: Dragos Tatulea Date: Mon Dec 25 17:11:57 2023 +0200 vdpa/mlx5: Allow modifying multiple vq fields in one modify command Add a bitmask variable that tracks hw vq field changes that are supposed to be modified on next hw vq change command. This will be useful to set multiple vq fields when resuming the vq. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Acked-by: Jason Wang Signed-off-by: Dragos Tatulea Message-Id: <20231225151203.152687-3-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit ef067191f73cce3ee192e991ce486d95524655d5 Author: Dragos Tatulea Date: Mon Dec 25 17:11:56 2023 +0200 vdpa/mlx5: Expose resumable vq capability Necessary for checking if resumable vqs are supported by the hardware. Actual support will be added in a downstream patch. Reviewed-by: Gal Pressman Acked-by: Eugenio Pérez Signed-off-by: Dragos Tatulea Message-Id: <20231225151203.152687-2-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit a09483c4065fe1e14812f2371cee1cba78a13d60 Author: Dragos Tatulea Date: Mon Dec 25 15:42:10 2023 +0200 vdpa: Block vq property changes in DRIVER_OK The virtio standard doesn't allow for virtqueue address and state changes when the device is in DRIVER_OK. Return an error in such cases unless the device is suspended. The suspended device exception is needed because some devices support virtqueue changes when the device is suspended. Signed-off-by: Dragos Tatulea Suggested-by: Eugenio Pérez Message-Id: <20231225134210.151540-3-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit c7e194402be3ed385dfaefaf1681bb731fd776e2 Author: Dragos Tatulea Date: Mon Dec 25 15:42:09 2023 +0200 vdpa: Track device suspended state Set vdpa device suspended state on successful suspend. Clear it on successful resume and reset. The state will be locked by the vhost_vdpa mutex. The mutex is taken during suspend, resume and reset in vhost_vdpa_unlocked_ioctl. The exception is vhost_vdpa_open which does a device reset but that should be safe because it can only happen before the other ops. Signed-off-by: Dragos Tatulea Suggested-by: Eugenio Pérez Message-Id: <20231225134210.151540-2-dtatulea@nvidia.com> Signed-off-by: Michael S. Tsirkin commit 95e7249691f082a5178d4d6f60fcdee91da458ab Author: Mike Christie Date: Wed Dec 13 23:26:49 2023 -0600 scsi: virtio_scsi: Add mq_poll support This adds polling support to virtio-scsi. It's based on and works similar to virtblk support where we add a module param to specify the number of poll queues then subtract to calculate the IO queues. When using 8 poll queues and a vhost worker per queue we see 4K IOPs with fio: fio --filename=/dev/sda --direct=1 --rw=randread --bs=4k \ --ioengine=io_uring --hipri --iodepth=128 --numjobs=$NUM_JOBS increase like: jobs base poll 1 207K 296K 2 392K 552K 3 581K 860K 4 765K 1235K 5 936K 1598K 6 1104K 1880K 7 1253K 2095K 8 1311k 2187K Signed-off-by: Mike Christie Message-Id: <20231214052649.57743-1-michael.christie@oracle.com> Signed-off-by: Michael S. Tsirkin commit 35967bdcff325f4572b21b0d0005318da7e03f53 Author: Changyuan Lyu Date: Wed Dec 20 12:49:06 2023 -0800 virtio_pmem: support feature SHMEM_REGION This patch adds the support for feature VIRTIO_PMEM_F_SHMEM_REGION (virtio spec v1.2 section 5.19.5.2 [1]). During feature negotiation, if VIRTIO_PMEM_F_SHMEM_REGION is offered by the device, the driver looks for a shared memory region of id 0. If it is found, this feature is understood. Otherwise, this feature bit is cleared. During probe, if VIRTIO_PMEM_F_SHMEM_REGION has been negotiated, virtio pmem ignores the `start` and `size` fields in device config and uses the physical address range of shared memory region 0. [1] https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-6480002 Signed-off-by: Changyuan Lyu Message-Id: <20231220204906.566922-1-changyuanl@google.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit b12fbc3f787e3d7e47af274a761fdee6e867bc7d Author: David Stevens Date: Wed Jan 10 11:19:25 2024 +0900 virtio_balloon: stay awake while adjusting balloon A virtio_balloon's parent device may be configured so that a configuration change interrupt is a wakeup event. Extend the processing of such a wakeup event until the balloon finishes inflating or deflating by calling pm_stay_awake/pm_relax in the virtio_balloon driver. Note that these calls are no-ops if the parent device doesn't support wakeup events or if the wakeup events are not enabled. This change allows the guest to use system power states such as s2idle without running the risk the virtio_balloon's cooperative memory management becoming unresponsive to the host's requests. Tested-by: Theodore Ts'o Signed-off-by: David Stevens Signed-off-by: Theodore Ts'o Message-Id: <20240110021925.1137333-1-stevensd@google.com> Signed-off-by: Michael S. Tsirkin commit 3690492612ecd2b3fd69f39f3a56f6313ea8ef8b Author: Jisheng Zhang Date: Tue Nov 14 22:33:38 2023 +0800 riscv: errata: thead: use pa based instructions for CMO T-HEAD CPUs such as C906/C910/C920 support phy address based CMO, use them so that we don't need to convert to virt address. Signed-off-by: Jisheng Zhang Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20231114143338.2406-3-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit a4ff64edf9edc8f05e2183610dc8306d3279c6ac Author: Jisheng Zhang Date: Tue Nov 14 22:33:37 2023 +0800 riscv: errata: thead: use riscv_nonstd_cache_ops for CMO Previously, we use alternative mechanism to dynamically patch the CMO operations for THEAD C906/C910 during boot for performance reason. But as pointed out by Arnd, "there is already a significant cost in accessing the invalidated cache lines afterwards, which is likely going to be much higher than the cost of an indirect branch". And indeed, there's no performance difference with GMAC and EMMC per my test on Sipeed Lichee Pi 4A board. Use riscv_nonstd_cache_ops for THEAD C906/C910 CMO to simplify the alternative code, and to acchieve Arnd's goal -- "I think moving the THEAD ops at the same level as all nonstandard operations makes sense, but I'd still leave CMO as an explicit fast path that avoids the indirect branch. This seems like the right thing to do both for readability and for platforms on which the indirect branch has a noticeable overhead." Signed-off-by: Jisheng Zhang Tested-by: Emil Renner Berthing Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231114143338.2406-2-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit bfed9a92940bae1fbdaad80b82562ce4e122434a Merge: affc5af36bbb6 e345b87b0b044 Author: Linus Torvalds Date: Wed Jan 10 09:36:40 2024 -0800 Merge tag 'gfs2-v6.7-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Add support for non-blocking lookup (MAY_NOT_BLOCK / LOOKUP_RCU) - Various minor fixes and cleanups * tag 'gfs2-v6.7-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix freeze consistency check in log_write_header gfs2: Refcounting fix in gfs2_thaw_super gfs2: Minor gfs2_{freeze,thaw}_super cleanup gfs2: Use wait_event_freezable_timeout() for freezable kthread gfs2: Add missing set_freezable() for freezable kthread gfs2: Remove use of error flag in journal reads gfs2: Lift withdraw check out of gfs2_ail1_empty gfs2: Rename gfs2_withdrawn to gfs2_withdrawing_or_withdrawn gfs2: Mark withdraws as unlikely gfs2: Minor gfs2_ail1_empty cleanup gfs2: use is_subdir() gfs2: d_obtain_alias(ERR_PTR(...)) will do the right thing gfs2: Use GL_NOBLOCK flag for non-blocking lookups gfs2: Add GL_NOBLOCK flag gfs2: rgrp: fix kernel-doc warnings gfs2: fix kernel BUG in gfs2_quota_cleanup gfs2: Fix inode_go_instantiate description gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump commit affc5af36bbb62073b6aaa4f4459b38937ff5331 Merge: 12958e9c4c8e9 e94dfb7a2935c Author: Linus Torvalds Date: Wed Jan 10 09:27:40 2024 -0800 Merge tag 'for-6.8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "There are no exciting changes for users, it's been mostly API conversions and some fixes or refactoring. The mount API conversion is a base for future improvements that would come with VFS. Metadata processing has been converted to folios, not yet enabling the large folios but it's one patch away once everything gets tested enough. Core changes: - convert extent buffers to folios: - direct API conversion where possible - performance can drop by a few percent on metadata heavy workloads, the folio sizes are not constant and the calculations add up in the item helpers - both regular and subpage modes - data cannot be converted yet, we need to port that to iomap and there are some other generic changes required - convert mount to the new API, should not be user visible: - options deprecated long time ago have been removed: inode_cache, recovery - the new logic that splits mount to two phases slightly changes timing of device scanning for multi-device filesystems - LSM options will now work (like for selinux) - convert delayed nodes radix tree to xarray, preserving the preload-like logic that still allows to allocate with GFP_NOFS - more validation of sysfs value of scrub_speed_max - refactor chunk map structure, reduce size and improve performance - extent map refactoring, smaller data structures, improved performance - reduce size of struct extent_io_tree, embedded in several structures - temporary pages used for compression are cached and attached to a shrinker, this may slightly improve performance - in zoned mode, remove redirty extent buffer tracking, zeros are written in case an out-of-order is detected and proper data are written to the actual write pointer - cleanups, refactoring, error message improvements, updated tests - verify and update branch name or tag - remove unwanted text" * tag 'for-6.8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (89 commits) btrfs: pass btrfs_io_geometry into btrfs_max_io_len btrfs: pass struct btrfs_io_geometry to set_io_stripe btrfs: open code set_io_stripe for RAID56 btrfs: change block mapping to switch/case in btrfs_map_block btrfs: factor out block mapping for single profiles btrfs: factor out block mapping for RAID5/6 btrfs: reduce scope of data_stripes in btrfs_map_block btrfs: factor out block mapping for RAID10 btrfs: factor out block mapping for DUP profiles btrfs: factor out RAID1 block mapping btrfs: factor out block-mapping for RAID0 btrfs: re-introduce struct btrfs_io_geometry btrfs: factor out helper for single device IO check btrfs: migrate btrfs_repair_io_failure() to folio interfaces btrfs: migrate eb_bitmap_offset() to folio interfaces btrfs: migrate various end io functions to folios btrfs: migrate subpage code to folio interfaces btrfs: migrate get_eb_page_index() and get_eb_offset_in_page() to folios btrfs: don't double put our subpage reference in alloc_extent_buffer btrfs: cleanup metadata page pointer usage ... commit 12958e9c4c8e93ef694c10960c78453edf21526e Merge: 32720aca900b2 bcdfae6ee520b Author: Linus Torvalds Date: Wed Jan 10 08:45:22 2024 -0800 Merge tag 'xfs-6.8-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Chandan Babu: "New features/functionality: - Online repair: - Reserve disk space for online repairs - Fix misinteraction between the AIL and btree bulkloader because of which the bulk load fails to queue a buffer for writeback if it happens to be on the AIL list - Prevent transaction reservation overflows when reaping blocks during online repair - Whenever possible, bulkloader now copies multiple records into a block - Support repairing of 1. Per-AG free space, inode and refcount btrees 2. Ondisk inodes 3. File data and attribute fork mappings - Verify the contents of 1. Inode and data fork of realtime bitmap file 2. Quota files - Introduce MF_MEM_PRE_REMOVE. This will be used to notify tasks about a pmem device being removed Bug fixes: - Fix memory leak of recovered attri intent items - Fix UAF during log intent recovery - Fix realtime geometry integer overflows - Prevent scrub from live locking in xchk_iget - Prevent fs shutdown when removing files during low free disk space - Prevent transaction reservation overflow when extending an RT device - Prevent incorrect warning from being printed when extending a filesystem - Fix an off-by-one error in xreap_agextent_binval - Serialize access to perag radix tree during deletion operation - Fix perag memory leak during growfs - Allow allocation of minlen realtime extent when the maximum sized realtime free extent is minlen in size Cleanups: - Remove duplicate boilerplate code spread across functionality associated with different log items - Cleanup resblks interfaces - Pass defer ops pointer to defer helpers instead of an enum - Initialize di_crc in xfs_log_dinode to prevent KMSAN warnings - Use static_assert() instead of BUILD_BUG_ON_MSG() to validate size of structures and structure member offsets. This is done in order to be able to share the code with userspace - Move XFS documentation under a new directory specific to XFS - Do not invoke deferred ops' ->create_done callback if the deferred operation does not have an intent item associated with it - Remove duplicate inclusion of header files from scrub/health.c - Refactor Realtime code - Cleanup attr code" * tag 'xfs-6.8-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (123 commits) xfs: use the op name in trace_xlog_intent_recovery_failed xfs: fix a use after free in xfs_defer_finish_recovery xfs: turn the XFS_DA_OP_REPLACE checks in xfs_attr_shortform_addname into asserts xfs: remove xfs_attr_sf_hdr_t xfs: remove struct xfs_attr_shortform xfs: use xfs_attr_sf_findname in xfs_attr_shortform_getvalue xfs: remove xfs_attr_shortform_lookup xfs: simplify xfs_attr_sf_findname xfs: move the xfs_attr_sf_lookup tracepoint xfs: return if_data from xfs_idata_realloc xfs: make if_data a void pointer xfs: fold xfs_rtallocate_extent into xfs_bmap_rtalloc xfs: simplify and optimize the RT allocation fallback cascade xfs: reorder the minlen and prod calculations in xfs_bmap_rtalloc xfs: remove XFS_RTMIN/XFS_RTMAX xfs: remove rt-wrappers from xfs_format.h xfs: factor out a xfs_rtalloc_sumlevel helper xfs: tidy up xfs_rtallocate_extent_exact xfs: merge the calls to xfs_rtallocate_range in xfs_rtallocate_block xfs: reflow the tail end of xfs_rtallocate_extent_block ... commit 32720aca900b226653c843bb4e06b8125312f214 Merge: 9963327f8e578 30ad1938326bf Author: Linus Torvalds Date: Wed Jan 10 08:38:33 2024 -0800 Merge tag 'fsnotify_for_v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: "fanotify changes allowing use of fanotify directory events even for filesystems such as FUSE which don't report proper fsid" * tag 'fsnotify_for_v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: allow "weak" fsid when watching a single filesystem fanotify: store fsid in mark instead of in connector commit 9963327f8e578bb29de2e283ee16b0f95c20201c Merge: ab27740f76654 d1c371035c820 Author: Linus Torvalds Date: Wed Jan 10 08:32:04 2024 -0800 Merge tag 'fs_for_v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull small quota cleanup from Jan Kara. * tag 'fs_for_v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: convert dquot_claim_space_nodirty() to return void commit 748dc0b65ec2b4b7b3dbd7befcc4a54fdcac7988 Author: Damien Le Moal Date: Wed Jan 10 18:29:42 2024 +0900 block: fix partial zone append completion handling in req_bio_endio() Partial completions of zone append request is not allowed but if a zone append completion indicates a number of completed bytes different from the original BIO size, only the BIO status is set to error. This leads to bio_advance() not setting the BIO size to 0 and thus to not call bio_endio() at the end of req_bio_endio(). Make sure a partially completed zone append is failed and completed immediately by forcing the completed number of bytes (nbytes) to be equal to the BIO size, thus ensuring that bio_endio() is called. Fixes: 297db731847e ("block: fix req_bio_endio append error handling") Cc: stable@kernel.vger.org Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20240110092942.442334-1-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 742e324a0679ce271f7475a40056bac6917a950c Author: Jens Axboe Date: Wed Jan 10 08:29:53 2024 -0700 block/iocost: silence warning on 'last_period' potentially being unused If CONFIG_TRACEPOINTS isn't enabled, we assign this variable but then never use it. This can cause the compiler to complain about that: block/blk-iocost.c:1264:6: warning: variable 'last_period' set but not used [-Wunused-but-set-variable] 1264 | u64 last_period, cur_period; | ^ Rather than add ifdefs to guard this, just mark it __maybe_unused. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401102335.GiWdeIo9-lkp@intel.com/ Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 50942ad6ddb57d3cfe2e4fc1f08714d54b2565ef Author: Anup Patel Date: Fri Nov 24 12:39:05 2023 +0530 RISC-V: Enable SBI based earlycon support Let us enable SBI based earlycon support in defconfig for both RV32 and RV64 so that "earlycon=sbi" can be used again. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20231124070905.1043092-6-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 88ead68e764cd164abb965e258c4e18841433ecf Author: Atish Patra Date: Fri Nov 24 12:39:04 2023 +0530 tty: Add SBI debug console support to HVC SBI driver RISC-V SBI specification supports advanced debug console support via SBI DBCN extension. Extend the HVC SBI driver to support it. Signed-off-by: Atish Patra Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231124070905.1043092-5-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt commit c77bf3607a0f0180aa674b58cfa76633215bb42f Author: Anup Patel Date: Fri Nov 24 12:39:03 2023 +0530 tty/serial: Add RISC-V SBI debug console based earlycon We extend the existing RISC-V SBI earlycon support to use the new RISC-V SBI debug console extension. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231124070905.1043092-4-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt commit f43fabf444ca3c4c74bf5fa5211bb2d0548715c4 Author: Anup Patel Date: Fri Nov 24 12:39:02 2023 +0530 RISC-V: Add SBI debug console helper routines Let us provide SBI debug console helper routines which can be shared by serial/earlycon-riscv-sbi.c and hvc/hvc_riscv_sbi.c. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20231124070905.1043092-3-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt commit f503b167b66007fc6b4434cd07a044ce4a56b6a0 Author: Anup Patel Date: Fri Nov 24 12:39:01 2023 +0530 RISC-V: Add stubs for sbi_console_putchar/getchar() The functions sbi_console_putchar() and sbi_console_getchar() are not defined when CONFIG_RISCV_SBI_V01 is disabled so let us add stub of these functions to avoid "#ifdef" on user side. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Link: https://lore.kernel.org/r/20231124070905.1043092-2-apatel@ventanamicro.com Signed-off-by: Palmer Dabbelt commit a35551c7244d9d061643a01eb96cc3ba04eaf45c Author: Charlie Jenkins Date: Thu Jan 4 11:42:49 2024 -0800 riscv: Fix relocation_hashtable size A second dereference is needed to get the accurate size of the relocation_hashtable. Signed-off-by: Charlie Jenkins Fixes: d8792a5734b0 ("riscv: Safely remove entries from relocation list") Reported-by: kernel test robot Reported-by: Julia Lawall Closes: https://lore.kernel.org/r/202312120044.wTI1Uyaa-lkp@intel.com/ Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240104-module_loading_fix-v3-3-a71f8de6ce0f@rivosinc.com Signed-off-by: Palmer Dabbelt commit 4b38b36bfbd83b23e20c172d08dd85773791e3bd Author: Charlie Jenkins Date: Thu Jan 4 11:42:48 2024 -0800 riscv: Correctly free relocation hashtable on error When there is not enough allocatable memory for the relocation hashtable, module loading should exit gracefully. Previously, this was attempted to be accomplished by checking if an unsigned number is less than zero which does not work. Instead have the caller check if the hashtable was correctly allocated and add a comment explaining that hashtable_bits that is 0 is valid. Signed-off-by: Charlie Jenkins Fixes: d8792a5734b0 ("riscv: Safely remove entries from relocation list") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202312132019.iYGTwW0L-lkp@intel.com/ Reported-by: kernel test robot Reported-by: Julia Lawall Closes: https://lore.kernel.org/r/202312120044.wTI1Uyaa-lkp@intel.com/ Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240104-module_loading_fix-v3-2-a71f8de6ce0f@rivosinc.com Signed-off-by: Palmer Dabbelt commit 78996eee79ebdfe8b6f0e54cb6dcc792d5129291 Author: Charlie Jenkins Date: Thu Jan 4 11:42:47 2024 -0800 riscv: Fix module loading free order Reverse order of kfree calls to resolve use-after-free error. Signed-off-by: Charlie Jenkins Fixes: d8792a5734b0 ("riscv: Safely remove entries from relocation list") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202312132019.iYGTwW0L-lkp@intel.com/ Reported-by: kernel test robot Reported-by: Julia Lawall Closes: https://lore.kernel.org/r/202312120044.wTI1Uyaa-lkp@intel.com/ Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20240104-module_loading_fix-v3-1-a71f8de6ce0f@rivosinc.com Signed-off-by: Palmer Dabbelt commit 03c305861c70d6db898dd2379b882e7772a5c5d0 Author: Erwan Velu Date: Tue Jan 9 18:57:53 2024 +0100 Documentation: admin-guide: PM: Fix two typos Fix two typos in the admin-guide: - a missing e in "reference_perf" in cppc_sysfs.rst. - the amd_pstate sysfs path uses a dash instead of an underscore. Signed-off-by: Erwan Velu [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit bde4f5ff8295601554601f78a523d4d97e42433e Author: Srinivas Pandruvada Date: Tue Jan 9 09:48:48 2024 -0800 cpufreq: intel_pstate: Update hybrid scaling factor for Meteor Lake On some Meteor Lake platforms, maximum one core turbo frequency is not observed. During hybrid performance to frequency conversion, the maximum frequency is 100 MHz less. This results in requesting maximum frequency 100 MHz less. For example when the max one core turbo is 4.9 GHz: MSR HWP_CAPABILITIES shows highest performance ratio for P-core is 0x3E. With the current scaling factor of 78741 (1.27x for converting frequency to performance) results in max frequency of 4.8 GHz. This results in capping the max scaling frequency as 4.8 GHz, which is 100 MHz less than the desired. Add capability to define per CPU model specific scaling factor and define scaling factor of 80000 (1.25x for converting frequency to performance for P-cores) for Meteor Lake. Signed-off-by: Srinivas Pandruvada [ rjw: Debug message adjustment, subject edit ] Signed-off-by: Rafael J. Wysocki commit e70b8dd26711704b1ff1f1b4eb3d048ba69e29da Author: AngeloGioacchino Del Regno Date: Wed Jan 10 11:57:57 2024 +0100 ASoC: mediatek: mt8195: Remove afe-dai component and rework codec link Remove the extra 'mt8195-afe-pcm-dai' component, register the DAI drivers to the main AFE component, and rework the DAI linking between the headset codec (RT5682/RT5682S) and the TDM interface in the probe function to stop assigning name, relying on the of_node of the codec. Also replace the COMP_DUMMY codec entry with a COMP_EMPTY for the ETDM2_IN and remove it entirely from ETDM1_OUT to fix the registration flow for this sound card. While at it, since we also need to swap the codec init function from ETDM2_IN to ETDM1_OUT, remove the static assignment of both `ops` and `init` for both, as we now assign these dynamically during probe. Fixes: 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") Signed-off-by: AngeloGioacchino Del Regno Link: https://msgid.link/r/20240110105757.539089-1-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown commit 24406f6794aa631516241deb9e19de333d6a0600 Author: Konrad Dybcio Date: Wed Jan 10 15:16:46 2024 +0200 interconnect: qcom: sm8550: Enable sync_state To ensure the interconnect votes are actually meaningful and in order to prevent holding all buses at FMAX, introduce the sync state callback. Fixes: e6f0d6a30f73 ("interconnect: qcom: Add SM8550 interconnect provider driver") Signed-off-by: Konrad Dybcio Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-2-ce1272d77540@linaro.org Signed-off-by: Georgi Djakov commit 85e985a4f46e462a37f1875cb74ed380e7c0c2e0 Author: Konrad Dybcio Date: Wed Jan 10 15:16:26 2024 +0200 interconnect: qcom: sc8180x: Mark CO0 BCM keepalive The CO0 BCM needs to be up at all times, otherwise some hardware (like the UFS controller) loses its connection to the rest of the SoC, resulting in a hang of the platform, accompanied by a spectacular logspam. Mark it as keepalive to prevent such cases. Fixes: 9c8c6bac1ae8 ("interconnect: qcom: Add SC8180x providers") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214-topic-sc8180_fixes-v1-1-421904863006@linaro.org Signed-off-by: Georgi Djakov commit aa12a790d31be14b289d5a2c6f41ca535fcc7841 Author: Chunhai Guo Date: Wed Jan 3 05:32:02 2024 -0700 erofs: make erofs_{err,info}() support NULL sb parameter Make erofs_err() and erofs_info() support NULL sb parameter for more general usage. Suggested-by: Gao Xiang Signed-off-by: Chunhai Guo Link: https://lore.kernel.org/r/20240103123202.3054718-1-guochunhai@vivo.com Reviewed-by: Jingbo Xu Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang commit 496530c7c1dfc159d59a75ae00b572f570710c53 Author: Gao Xiang Date: Wed Dec 27 23:19:03 2023 +0800 erofs: avoid debugging output for (de)compressed data Syzbot reported a KMSAN warning, erofs: (device loop0): z_erofs_lz4_decompress_mem: failed to decompress -12 in[46, 4050] out[917] ===================================================== BUG: KMSAN: uninit-value in hex_dump_to_buffer+0xae9/0x10f0 lib/hexdump.c:194 .. print_hex_dump+0x13d/0x3e0 lib/hexdump.c:276 z_erofs_lz4_decompress_mem fs/erofs/decompressor.c:252 [inline] z_erofs_lz4_decompress+0x257e/0x2a70 fs/erofs/decompressor.c:311 z_erofs_decompress_pcluster fs/erofs/zdata.c:1290 [inline] z_erofs_decompress_queue+0x338c/0x6460 fs/erofs/zdata.c:1372 z_erofs_runqueue+0x36cd/0x3830 z_erofs_read_folio+0x435/0x810 fs/erofs/zdata.c:1843 The root cause is that the printed decompressed buffer may be filled incompletely due to decompression failure. Since they were once only used for debugging, get rid of them now. Reported-and-tested-by: syzbot+6c746eea496f34b3161d@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/000000000000321c24060d7cfa1c@google.com Reviewed-by: Yue Hu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231227151903.2900413-1-hsiangkao@linux.alibaba.com commit 6185d32170b683abadddf1e68be998e24f3cc5de Author: Masahiro Yamada Date: Sat Dec 30 22:51:58 2023 +0900 kbuild: deb-pkg: use debian/ for tmpdir Use debian/ for tmpdir, which is the default of debhelper. This simplifies the code. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 1b5e94657320c86fc660745e3fc64321948649be Author: Masahiro Yamada Date: Sat Dec 30 22:51:56 2023 +0900 kbuild: deb-pkg: move 'make headers' to build-arch Strictly speaking, 'make headers' should be a part of build-arch instead of binary-arch. 'make headers' constructs ready-to-copy UAPI headers in the kernel directory. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 284d16c456e5d4b143f375b8ccc4038ab3f4ee0f Author: Peter Robinson Date: Wed Dec 20 15:56:39 2023 +0000 mfd: ti_am335x_tscadc: Fix TI SoC dependencies The ti_am335x_tscadc is specific to some TI SoCs, update the dependencies for those SoCs and compile testing. Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20231220155643.445849-1-pbrobinson@gmail.com Signed-off-by: Lee Jones commit 64fe64f920f0b478c0fb350b1682b70c21160c98 Author: Chunyan Zhang Date: Fri Dec 15 16:56:27 2023 +0800 dt-bindings: mfd: sprd: Add support for UMS9620 Add bindings for Unisoc UMS9620 system global registers which provide register maps for clocks. Signed-off-by: Chunyan Zhang Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231215085630.984892-2-chunyan.zhang@unisoc.com Signed-off-by: Lee Jones commit 3208bcef366a1795f03abd93a0dfe7f1c364e4d7 Author: Linus Walleij Date: Thu Dec 14 19:26:31 2023 +0100 mfd: ab8500-sysctrl: Drop ancient charger The sysctrl driver was looking for an instance of the PM2301 charger but this has been deleted from the kernel and is not used with the U8500 systems any more. Drop the string. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231214-ab8500-sysctrl-oneliner-v1-1-fd78a15c0b2f@linaro.org Signed-off-by: Lee Jones commit d505a16e00c35919fd9fe5735894645e0f70a415 Author: Randy Dunlap Date: Tue Dec 26 11:54:32 2023 -0800 drm/i915/perf: reconcile Excess struct member kernel-doc warnings Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. i915_perf_types.h:341: warning: Excess struct member 'ptr_lock' description in 'i915_perf_stream' i915_perf_types.h:341: warning: Excess struct member 'head' description in 'i915_perf_stream' i915_perf_types.h:341: warning: Excess struct member 'tail' description in 'i915_perf_stream' 3 warnings as Errors Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231226195432.10891-4-rdunlap@infradead.org (cherry picked from commit aa253baca534357e033bd29b074ce1eade2a9362) Signed-off-by: Joonas Lahtinen commit af3cfcad492f2ffbef5de36c8ee1e8f8a701938f Author: Randy Dunlap Date: Tue Dec 26 11:54:31 2023 -0800 drm/i915/guc: reconcile Excess struct member kernel-doc warnings Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. intel_guc.h:305: warning: Excess struct member 'lock' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_ids' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'num_guc_ids' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_ids_bitmap' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_id_list' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'guc_ids_in_use' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'destroyed_contexts' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'destroyed_worker' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'reset_fail_worker' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'reset_fail_mask' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'sched_disable_delay_ms' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'sched_disable_gucid_threshold' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'lock' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'gt_stamp' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'ping_delay' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'work' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'shift' description in 'intel_guc' intel_guc.h:305: warning: Excess struct member 'last_stat_jiffies' description in 'intel_guc' 18 warnings as Errors Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231226195432.10891-3-rdunlap@infradead.org (cherry picked from commit e4cf1a70fad3e2107503e99cfe9cc0c9cba19dad) Signed-off-by: Joonas Lahtinen commit 53cd65a9c95109eef402db0ed7822b7c9a8ad732 Author: Randy Dunlap Date: Thu Dec 28 15:49:46 2023 -0800 drm/i915/gt: reconcile Excess struct member kernel-doc warnings Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. intel_gsc.h:34: warning: Excess struct member 'gem_obj' description in 'intel_gsc' Also add missing field member descriptions. Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi Cc: Andi Shyti Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231228234946.12405-1-rdunlap@infradead.org (cherry picked from commit cd1d91115ff1929ec346d85f512ef260ddf8131e) Signed-off-by: Joonas Lahtinen commit 30e18a89fb1f84718a174bc02807bd9a590e2bd0 Author: Randy Dunlap Date: Tue Dec 26 11:54:29 2023 -0800 drm/i915/gem: reconcile Excess struct member kernel-doc warnings Document nested struct members with full names as described in Documentation/doc-guide/kernel-doc.rst. i915_gem_context_types.h:420: warning: Excess struct member 'lock' description in 'i915_gem_context' Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231226195432.10891-1-rdunlap@infradead.org (cherry picked from commit 7353c3d7c15017140a8b984e41f94be0bf535e73) Signed-off-by: Joonas Lahtinen commit 986c20bb3e67d0171c0c2e4acd25429b1876b963 Author: Takashi Sakamoto Date: Mon Dec 25 07:23:01 2023 +0900 firewire: core: fill model field in modalias of unit device for legacy layout of configuration ROM As the last part of support for legacy layout of configuration ROM, this commit traverses vendor directory as well as root directory when constructing modalias for unit device. The change brings loss of backward compatibility since it can fill model field ('mo') which is 0 at current implementation in the case. However, we can be optimistic against regression for unit drivers in kernel, due to some points: 1. ALSA drivers for audio and music units use the model fields to match device, however all of supported devices does not have such legacy layout. 2. the other unit drivers (e.g. sbp2) does not use the model field to match device. The rest of concern is user space application. The most of applications just take care of node device and does not use the modalias of unit device, thus the change does not affect to them. But systemd project is known to get affects from the change since it includes hwdb to take udev to configure fw character device conveniently. I have a plan to work for systemd so that the access permission of character device could be kept across the change. Suggested-by: Adam Goldman Link: https://lore.kernel.org/r/20231221134849.603857-9-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 584ebbefd12296c6bad009c8a0c9e610eb8283c8 Author: Ankit Nautiyal Date: Wed Dec 13 14:46:29 2023 +0530 drm/i915/dp: Fix the max DSC bpc supported by source Use correct helper for getting max DSC bpc supported by the source. Fixes: 1c56e9a39833 ("drm/i915/dp: Get optimal link config to have best compressed bpp") Cc: Ankit Nautiyal Cc: Stanislav Lisovskiy Cc: Jani Nikula Signed-off-by: Ankit Nautiyal Reviewed-by: Swati Sharma Link: https://patchwork.freedesktop.org/patch/msgid/20231213091632.431557-3-ankit.k.nautiyal@intel.com (cherry picked from commit cd7b0b2dd3d9fecc6057c07b40e8087db2f9f71a) Signed-off-by: Joonas Lahtinen commit 11809687954ab2a073ec5a4bafd8281a42ff407a Author: Jani Nikula Date: Thu Jan 4 18:46:00 2024 +0200 drm/i915: don't make assumptions about intel_wakeref_t type intel_wakeref_t is supposed to be a mostly opaque cookie to its users. It should only be checked for being non-zero and set to zero. Debug logging its actual value is meaningless. Switch to just debug logging whether the async_put_wakeref is non-zero. The issue dates back to much earlier than commit b49e894c3fd8 ("drm/i915: Replace custom intel runtime_pm tracker with ref_tracker library"), but this is the one that brought about a build failure due to the printf format. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20240102111222.2db11208@canb.auug.org.au Fixes: b49e894c3fd8 ("drm/i915: Replace custom intel runtime_pm tracker with ref_tracker library") Cc: Andrzej Hajda Cc: Imre Deak Signed-off-by: Jani Nikula Reviewed-by: Imre Deak Reviewed-by: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20240104164600.783371-1-jani.nikula@intel.com (cherry picked from commit de06b42edc5bf05aefbb7e2f59475d6022ed57e1) Signed-off-by: Joonas Lahtinen commit ae8986e681e9c26fb6c140ae1ed41e6d74d38fc4 Author: Imre Deak Date: Wed Jan 3 17:26:09 2024 +0200 drm/i915/dp: Fix the PSR debugfs entries wrt. MST connectors MST connectors don't have a static attached encoder, as their encoder can change depending on the pipe they use; so the encoder for an MST connector can't be retrieved using intel_dp_attached_encoder() (which may return NULL for MST). Most of the PSR debugfs entries depend on a static connector -> encoder mapping which is only true for eDP and SST DP connectors and not for MST. These debugfs entries were enabled for MST connectors as well recently to provide PR information for them, but handling MST connectors needs more changes. Fix this by not adding for now the PSR entries on MST connectors. To make things more uniform add the entries for SST connectors on all platforms, not just on platforms supporting DP2.0. v2: - Keep adding the entries for SST connectors. (Jouni) - Add a TODO: comment for MST support. Fixes: ef75c25e8fed ("drm/i915/panelreplay: Debugfs support for panel replay") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9850 Cc: Animesh Manna Cc: Jouni Högander Reviewed-by: Jouni Högander Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240103152609.2434100-1-imre.deak@intel.com (cherry picked from commit 9b0b61c5bc08e1aa55a0c1e7cda28f952b2d02cc) Signed-off-by: Joonas Lahtinen commit a4a9779d7642111b4fb6e7415aae9da9783850bd Author: Mika Kahola Date: Tue Jan 2 13:57:39 2024 +0200 drm/i915/display: Fix C20 pll selection for state verification Add pll selection check for C20 as well as clock state verification0. We have been relying on sw state to select A or B pll's. This is incorrect as the hw might see this selection differently. This patch fixes this shortcoming by reading pll selection for both sw and hw states and compares if these two selections match. Fixes: 59be90248b42 ("drm/i915/mtl: C20 state verification") v2: reword commit message and include fix to a original commit (Imre) Compare pll selection (Jani) Signed-off-by: Mika Kahola Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20240102115741.118525-2-mika.kahola@intel.com (cherry picked from commit f4304beadd88d074333b23fdc7f35d00ee763e14) Signed-off-by: Joonas Lahtinen commit 52c4e5985a730796a3fa555b83b404708b960f9d Author: Anshul Dalal Date: Tue Jan 9 14:39:26 2024 -0800 Input: driver for Adafruit Seesaw Gamepad Adds a driver for a mini gamepad that communicates over i2c, the gamepad has bidirectional thumb stick input and six buttons. The gamepad chip utilizes the open framework from Adafruit called 'Seesaw' to transmit the ADC data for the joystick and digital pin state for the buttons. I have only implemented the functionality required to receive the thumb stick and button state. Steps in reading the gamepad state over i2c: 1. Reset the registers 2. Set the pin mode of the pins specified by the `BUTTON_MASK` to input `BUTTON_MASK`: A bit-map for the six digital pins internally connected to the joystick buttons. 3. Enable internal pullup resistors for the `BUTTON_MASK` 4. Bulk set the pin state HIGH for `BUTTON_MASK` 5. Poll the device for button and joystick state done by: `seesaw_read_data(struct i2c_client *client, struct seesaw_data *data)` Product page: https://www.adafruit.com/product/5743 Arduino driver: https://github.com/adafruit/Adafruit_Seesaw Driver tested on RPi Zero 2W Reviewed-by: Thomas Weißschuh Signed-off-by: Anshul Dalal Link: https://lore.kernel.org/r/20240106015111.882325-2-anshulusr@gmail.com Signed-off-by: Dmitry Torokhov commit dc5b56241cf3e4084723c2e27758358e0feec84f Author: Anshul Dalal Date: Tue Jan 9 14:38:57 2024 -0800 dt-bindings: input: bindings for Adafruit Seesaw Gamepad Adds bindings for the Adafruit Seesaw Gamepad. The gamepad functions as an i2c device with the default address of 0x50 and has an IRQ pin that can be enabled in the driver to allow for a rising edge trigger on each button press or joystick movement. Product page: https://www.adafruit.com/product/5743 Arduino driver: https://github.com/adafruit/Adafruit_Seesaw Reviewed-by: Conor Dooley Reviewed-by: Krzysztof Kozlowski Signed-off-by: Anshul Dalal Link: https://lore.kernel.org/r/20240106015111.882325-1-anshulusr@gmail.com Signed-off-by: Dmitry Torokhov commit 2d2db7d40254d5fb53b11ebd703cd1ed0c5de7a1 Author: Oleksandr Tyshchenko Date: Sun Jan 7 12:34:26 2024 +0200 xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import DO NOT access the underlying struct page of an sg table exported by DMA-buf in dmabuf_imp_to_refs(), this is not allowed. Please see drivers/dma-buf/dma-buf.c:mangle_sg_table() for details. Fortunately, here (for special Xen device) we can avoid using pages and calculate gfns directly from dma addresses provided by the sg table. Suggested-by: Daniel Vetter Signed-off-by: Oleksandr Tyshchenko Acked-by: Christian König Reviewed-by: Stefano Stabellini Acked-by: Daniel Vetter Link: https://lore.kernel.org/r/20240107103426.2038075-1-olekstysh@gmail.com Signed-off-by: Juergen Gross commit 26ba1bf310f0ed43f249a93d0cf8a93675cd8ae8 Author: Steve French Date: Tue Jan 9 23:42:51 2024 -0600 cifs: update internal module version number for cifs.ko From 2.46 to 2.47 Signed-off-by: Steve French commit d0fdc20b0429150c9dd09111f9b1d9d48117b56f Author: Jisheng Zhang Date: Mon Dec 25 12:42:07 2023 +0800 riscv: select DCACHE_WORD_ACCESS for efficient unaligned access HW DCACHE_WORD_ACCESS uses the word-at-a-time API for optimised string comparisons in the vfs layer. This patch implements support for load_unaligned_zeropad in much the same way as has been done for arm64. Here is the test program and step: $ cat tt.c #include #include #include #define ITERATIONS 1000000 #define PATH "123456781234567812345678123456781" int main(void) { unsigned long i; struct stat buf; for (i = 0; i < ITERATIONS; i++) stat(PATH, &buf); return 0; } $ gcc -O2 tt.c $ touch 123456781234567812345678123456781 $ time ./a.out Per my test on T-HEAD C910 platforms, the above test performance is improved by about 7.5%. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20231225044207.3821-3-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit b6da6cbe13ebf24716438de71d50573b9f36f35d Author: Jisheng Zhang Date: Mon Dec 25 12:42:06 2023 +0800 riscv: introduce RISCV_EFFICIENT_UNALIGNED_ACCESS Some riscv implementations such as T-HEAD's C906, C908, C910 and C920 support efficient unaligned access, for performance reason we want to enable HAVE_EFFICIENT_UNALIGNED_ACCESS on these platforms. To avoid performance regressions on other non efficient unaligned access platforms, HAVE_EFFICIENT_UNALIGNED_ACCESS can't be globally selected. To solve this problem, runtime code patching based on the detected speed is a good solution. But that's not easy, it involves lots of work to modify vairous subsystems such as net, mm, lib and so on. This can be done step by step. So let's take an easier solution: add support to efficient unaligned access and hide the support under NONPORTABLE. Now let's introduce RISCV_EFFICIENT_UNALIGNED_ACCESS which depends on NONPORTABLE, if users know during config time that the kernel will be only run on those efficient unaligned access hw platforms, they can enable it. Obviously, generic unified kernel Image shouldn't enable it. Signed-off-by: Jisheng Zhang Reviewed-by: Charlie Jenkins Reviewed-by: Eric Biggers Link: https://lore.kernel.org/r/20231225044207.3821-2-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit cb51bfee7f62a8e26b694f9d84c0041b3e3ccc71 Merge: 62694797f56bf 3359866b40a97 Author: Palmer Dabbelt Date: Tue Jan 9 20:14:51 2024 -0800 Merge patch series "riscv: hwprobe: add Zicond, Zacas and Ztso support" Clément Léger says: This series add support for a few more extensions that are present in the RVA22U64/RVA23U64 (either mandatory or optional) and that are useful for userspace: - Zicond - Zacas - Ztso Series currently based on riscv/for-next. * b4-shazam-lts: riscv: hwprobe: export Zicond extension riscv: hwprobe: export Zacas ISA extension riscv: add ISA extension parsing for Zacas dt-bindings: riscv: add Zacas ISA extension description riscv: hwprobe: export Ztso ISA extension riscv: add ISA extension parsing for Ztso Link: https://lore.kernel.org/r/20231220155723.684081-1-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 3359866b40a97038405c72e68097a92a4a9caa71 Author: Clément Léger Date: Wed Dec 20 16:57:22 2023 +0100 riscv: hwprobe: export Zicond extension Export the zicond extension to userspace using hwprobe. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231220155723.684081-7-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 154a3706122978eeb34d8223d49285ed4f3c61fa Author: Clément Léger Date: Wed Dec 20 16:57:21 2023 +0100 riscv: hwprobe: export Zacas ISA extension Export Zacas ISA extension through hwprobe. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231220155723.684081-6-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 188a2122c8274b64a739544b1bcfd30e30aed5dd Author: Clément Léger Date: Wed Dec 20 16:57:20 2023 +0100 riscv: add ISA extension parsing for Zacas Add parsing for Zacas ISA extension which was ratified recently in the riscv-zacas manual. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231220155723.684081-5-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit cd7be4d02f418d5d62bcaf26e5c44ceb4ce00029 Author: Clément Léger Date: Wed Dec 20 16:57:19 2023 +0100 dt-bindings: riscv: add Zacas ISA extension description Add description for the Zacas ISA extension which was ratified recently. Signed-off-by: Clément Léger Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231220155723.684081-4-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 5b4d64a819c05e7e96e7ab3f00f4f0967246905f Author: Clément Léger Date: Wed Dec 20 16:57:18 2023 +0100 riscv: hwprobe: export Ztso ISA extension Export the Ztso extension to userspace. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231220155723.684081-3-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 1ec9f381e84877085ed4ce891e89172f8494ddb8 Author: Clément Léger Date: Wed Dec 20 16:57:17 2023 +0100 riscv: add ISA extension parsing for Ztso Add support to parse the Ztso string in the riscv,isa string. The bindings already supports it but not the ISA parsing code. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231220155723.684081-2-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 62694797f56bf72e4c598bc0e319c7b828c1b187 Author: Al Viro Date: Thu Dec 14 19:19:22 2023 +0000 use linux/export.h rather than asm-generic/export.h asm-generic/export.h is a wrapper for linux/export.h, with explicit request to use linux/export.h directly. Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20231214191922.GQ1674809@ZenIV Signed-off-by: Palmer Dabbelt commit 2bf8acbf542bbc83a72a1c9d3f4f87aab7f2d2c1 Merge: a7565f4d068b2 6c4a2f6329f09 Author: Palmer Dabbelt Date: Tue Jan 9 19:33:25 2024 -0800 Merge patch series "Fix XIP boot and make XIP testable in QEMU" Frederik Haxel says: XIP boot seems to be broken for some time now. A likely reason why no one seems to have noticed this is that XIP is more difficult to test, as it is currently not easily testable with QEMU. These patches fix the XIP boot and allow an XIP build without BUILTIN_DTB, which in turn makes it easier to test an image with the QEMU virt machine. * b4-shazam-merge: riscv: Allow disabling of BUILTIN_DTB for XIP riscv: Fixed wrong register in XIP_FIXUP_FLASH_OFFSET macro riscv: Make XIP bootable again Link: https://lore.kernel.org/r/20231212130116.848530-1-haxel@fzi.de Signed-off-by: Palmer Dabbelt commit a7565f4d068b2e60f95c3223c3167c40b8fe83ae Author: Song Shuai Date: Mon Dec 11 19:03:31 2023 +0800 riscv: Remove SHADOW_OVERFLOW_STACK_SIZE macro The commit be97d0db5f44 ("riscv: VMAP_STACK overflow detection thread-safe") got rid of `shadow_stack`, so SHADOW_OVERFLOW_STACK_SIZE should be removed too. Fixes: be97d0db5f44 ("riscv: VMAP_STACK overflow detection thread-safe") Signed-off-by: Song Shuai Reviewed-by: Sami Tolvanen Link: https://lore.kernel.org/r/20231211110331.359534-1-songshuaishuai@tinylab.org Signed-off-by: Palmer Dabbelt commit 5c89186a32702d35496c8d3a9d8877ea6608d30a Merge: 869436dae72ac b8b2711336f03 Author: Palmer Dabbelt Date: Tue Jan 9 20:10:32 2024 -0800 Merge remote-tracking branch 'palmer/fixes' into for-next I don't usually merge these in, but I missed sending a PR due to the holidays. * palmer/fixes: riscv: Fix set_direct_map_default_noflush() to reset _PAGE_EXEC riscv: Fix module_alloc() that did not reset the linear mapping permissions riscv: Fix wrong usage of lm_alias() when splitting a huge linear mapping riscv: Check if the code to patch lies in the exit section riscv: errata: andes: Probe for IOCP only once in boot stage riscv: Fix SMP when shadow call stacks are enabled dt-bindings: perf: riscv,pmu: drop unneeded quotes riscv: fix misaligned access handling of C.SWSP and C.SDSP RISC-V: hwprobe: Always use u64 for extension bits Support rv32 ULEB128 test riscv: Correct type casting in module loading riscv: Safely remove entries from relocation list Signed-off-by: Palmer Dabbelt commit 869436dae72acf1629b41437e9d08d31a7360fdb Author: Ben Dooks Date: Thu Nov 23 14:27:08 2023 +0000 riscv; fix __user annotation in save_v_state() The save_v_state() is technically sending a __user pointer through __put_user() and thus is generating a sparse warning so force the value to be "void *" to fix: arch/riscv/kernel/signal.c:94:16: warning: incorrect type in initializer (different address spaces) arch/riscv/kernel/signal.c:94:16: expected void *__val arch/riscv/kernel/signal.c:94:16: got void [noderef] __user *[assigned] datap Fixes: 8ee0b41898fa26f66e32 ("riscv: signal: Add sigcontext save/restore for vector") Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20231123142708.261733-1-ben.dooks@codethink.co.uk Signed-off-by: Palmer Dabbelt commit ca0e433b41a6aa5115f752644eb39470f9a12a99 Author: Ben Dooks Date: Thu Nov 23 14:16:17 2023 +0000 riscv: fix __user annotation in traps_misaligned.c The instruction reading code can read from either user or kernel addresses and thus the use of __user on pointers to instructions depends on which context. Fix a few sparse warnings by using __user for user-accesses and remove it when not. Fixes: arch/riscv/kernel/traps_misaligned.c:361:21: warning: dereference of noderef expression arch/riscv/kernel/traps_misaligned.c:373:21: warning: dereference of noderef expression arch/riscv/kernel/traps_misaligned.c:381:21: warning: dereference of noderef expression arch/riscv/kernel/traps_misaligned.c:322:24: warning: incorrect type in initializer (different address spaces) arch/riscv/kernel/traps_misaligned.c:322:24: expected unsigned char const [noderef] __user *__gu_ptr arch/riscv/kernel/traps_misaligned.c:322:24: got unsigned char const [usertype] *addr arch/riscv/kernel/traps_misaligned.c:361:21: warning: dereference of noderef expression arch/riscv/kernel/traps_misaligned.c:373:21: warning: dereference of noderef expression arch/riscv/kernel/traps_misaligned.c:381:21: warning: dereference of noderef expression arch/riscv/kernel/traps_misaligned.c:332:24: warning: incorrect type in initializer (different address spaces) arch/riscv/kernel/traps_misaligned.c:332:24: expected unsigned char [noderef] __user *__gu_ptr arch/riscv/kernel/traps_misaligned.c:332:24: got unsigned char [usertype] *addr Fixes: 7c83232161f60 ("riscv: add support for misaligned trap handling in S-mode") Signed-off-by: Ben Dooks Link: https://lore.kernel.org/r/20231123141617.259591-1-ben.dooks@codethink.co.uk Signed-off-by: Palmer Dabbelt commit cfbc4f81c9d0ea7d6b6726d55a93e859f51ef196 Author: Jisheng Zhang Date: Thu Nov 23 22:22:23 2023 +0800 riscv: Select ARCH_WANTS_NO_INSTR As said in the help of ARCH_WANTS_NO_INSTR entry in arch/Kconfig: "An architecture should select this if the noinstr macro is being used on functions to denote that the toolchain should avoid instrumenting such functions and is required for correctness." Select ARCH_WANTS_NO_INSTR for correctness. PS: The reason we didn't find any issue so far is that the CC_HAS_NO_PROFILE_FN_ATTR is true. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20231123142223.1787-1-jszhang@kernel.org Signed-off-by: Palmer Dabbelt commit 5634d9c280d2c91f1759054bcb8c2a4b0abb73c8 Merge: b7b4e4d79fc72 62ff262227a45 Author: Palmer Dabbelt Date: Thu Jan 4 15:03:09 2024 -0800 Merge patch series "riscv: CPU operations cleanup" Samuel Holland says: This series cleans up some duplicated and dead code around the RISC-V CPU operations, that was copied from arm64 but is not needed here. The result is a bit of memory savings and removal of a few SBI calls during boot, with no functional change. * b4-shazam-merge: riscv: Use the same CPU operations for all CPUs riscv: Remove unused members from struct cpu_operations riscv: Deduplicate code in setup_smp() Link: https://lore.kernel.org/r/20231121234736.3489608-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit b7b4e4d79fc72e2b565cb3da38897b0e4c891e79 Author: Samuel Holland Date: Tue Nov 21 14:53:18 2023 -0800 riscv: Remove obsolete rv32_defconfig file This file is not used since commit 72f045d19f25 ("riscv: Fixup difference with defconfig"), where it was replaced by the 32-bit.config fragment. Delete the old file to avoid any confusion. Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231121225320.3430550-1-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 7a4749739c5f26daaecbdd46e5ab33b3432c6c40 Merge: cbc911392c057 ef7d6abb2cf57 Author: Palmer Dabbelt Date: Wed Jan 3 04:09:39 2024 -0800 Merge patch series "RISC-V: hwprobe: Introduce which-cpus" Andrew Jones says: This series introduces a flag for the hwprobe syscall which effectively reverses its behavior from getting the values of keys for a set of cpus to getting the cpus for a set of key-value pairs. * b4-shazam-merge: RISC-V: selftests: Add which-cpus hwprobe test RISC-V: hwprobe: Introduce which-cpus flag RISC-V: Move the hwprobe syscall to its own file RISC-V: hwprobe: Clarify cpus size parameter Link: https://lore.kernel.org/r/20231122164700.127954-6-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 25742aeb135c4a44e92fb347e037adaa145b9484 Author: Steven Rostedt (Google) Date: Wed Dec 20 08:10:28 2023 -0500 ring-buffer: Remove stale comment from ring_buffer_size() It's been 11 years since the ring_buffer_size() function was updated to use the nr_pages from the buffer->buffers[cpu] structure instead of using the buffer->nr_pages that no longer exists. The comment in the code is more of what a change log should have and is pretty much useless for development. It's saying how things worked back in 2012 that bares no purpose on today's code. Remove it. Link: https://lore.kernel.org/linux-trace-kernel/84d3b41a72bd43dbb9d44921ef535c92@AcuMS.aculab.com/ Link: https://lore.kernel.org/linux-trace-kernel/20231220081028.7cd7e8e2@gandalf.local.home Cc: Mark Rutland Cc: Mathieu Desnoyers Reported-by: David Laight Signed-off-by: Steven Rostedt (Google) Acked-by: Masami Hiramatsu (Google) commit 6c4a2f6329f0925161a80d2fd90aa8438c1ca82f Author: Frederik Haxel Date: Tue Dec 12 14:01:14 2023 +0100 riscv: Allow disabling of BUILTIN_DTB for XIP This enables, among other things, testing with the QEMU virt machine. To build an XIP kernel for the QEMU virt machine, configure the the kernel as desired and apply the following configuration ``` CONFIG_NONPORTABLE=y CONFIG_XIP_KERNEL=y CONFIG_XIP_PHYS_ADDR=0x20000000 CONFIG_PHYS_RAM_BASE=0x80200000 CONFIG_BUILTIN_DTB=n ``` Since the QEMU virt flash memory expects a 32 MB file, the built image must be padded. For example, with `truncate -s 32M arch/riscv/boot/xipImage` The kernel can be started using the following command in QEMU (v8+) ``` qemu-system-riscv64 -M virt,pflash0=pflash0 \ -blockdev node-name=pflash0,driver=file,read-only=on,\ filename=arch/riscv/boot/xipImage ``` Signed-off-by: Frederik Haxel Link: https://lore.kernel.org/r/20231212130116.848530-4-haxel@fzi.de Signed-off-by: Palmer Dabbelt commit 5daa3726410288075ba73c336bb2e80d6b06aa4d Author: Frederik Haxel Date: Tue Dec 12 14:01:13 2023 +0100 riscv: Fixed wrong register in XIP_FIXUP_FLASH_OFFSET macro During the refactoring, a bug was introduced in the rarly used XIP_FIXUP_FLASH_OFFSET macro. Fixes: bee7fbc38579 ("RISC-V CPU Idle Support") Fixes: e7681beba992 ("RISC-V: Split out the XIP fixups into their own file") Signed-off-by: Frederik Haxel Link: https://lore.kernel.org/r/20231212130116.848530-3-haxel@fzi.de Signed-off-by: Palmer Dabbelt commit 66f1e68093979816a23412a3fad066f5bcbc0360 Author: Frederik Haxel Date: Tue Dec 12 14:01:12 2023 +0100 riscv: Make XIP bootable again Currently, the XIP kernel seems to fail to boot due to missing XIP_FIXUP and a wrong page_offset value. A superfluous XIP_FIXUP has also been removed. Signed-off-by: Frederik Haxel Link: https://lore.kernel.org/r/20231212130116.848530-2-haxel@fzi.de Signed-off-by: Palmer Dabbelt commit 3601311593eb44d34f142b993cb6f38f9a7863b3 Merge: e16bf7e015d75 dc97f6344f205 Author: Dan Williams Date: Tue Jan 9 19:21:44 2024 -0800 Merge branch 'for-6.8/cxl-cper' into for-6.8/cxl Pick up the CPER to CXL driver integration work for v6.8. Some additional cleanup of cper_estatus_print() messages is needed, but that is to be handled incrementally. commit 8fb7b723924cc9306bc161f45496497aec733904 Author: Kevin Hao Date: Sun Dec 17 21:41:37 2023 +0800 ksmbd: Add missing set_freezable() for freezable kthread The kernel thread function ksmbd_conn_handler_loop() invokes the try_to_freeze() in its loop. But all the kernel threads are non-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao Acked-by: Namjae Jeon Signed-off-by: Steve French commit b76c01f1d950425924ee1c1377760de3c024ef78 Merge: e54478fbdad20 31accc37eaee9 Author: Dave Airlie Date: Wed Jan 10 11:35:58 2024 +1000 Merge tag 'drm-intel-gt-next-2023-12-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver Changes: - Eliminate use of kmap_atomic() in i915 (Zhao) - Add Wa_14019877138 for DG2 (Haridhar) - Static checker and spelling fixes (Colin, Karthik, Randy) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZXxCibZZQqlqhDN3@jlahtine-mobl.ger.corp.intel.com commit c8300953ba8e4c8e506ceea1b4e3c6acb4638a05 Merge: 53889bcaf536b 7dab24554dedd Author: Jens Axboe Date: Tue Jan 9 18:28:43 2024 -0700 Merge tag 'md-6.8-20240109' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.8/block Pull MD fixes from Song: "1. Sparse warning since v6.0, by Bart; 2. /proc/mdstat regression since v6.7, by Yu Kuai." * tag 'md-6.8-20240109' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid1: Use blk_opf_t for read and write operations md: Fix md_seq_ops() regressions commit ab27740f76654ed58dd32ac0ba0031c18a6dea3b Merge: 41daf06ea14fd ee9793be08b1a Author: Linus Torvalds Date: Tue Jan 9 17:28:41 2024 -0800 Merge tag 'linux_kselftest-next-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest update from Shuah Khan: "Enhancements to reporting test results, fixes to root and user run behavior and fixing ksft_print_msg() calls" * tag 'linux_kselftest-next-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: tracing/selftests: Add ownership modification tests for eventfs selftests: sched: Remove initialization to 0 for a static variable selftests: capabilities: namespace create varies for root and normal user selftests: prctl: Add prctl test for PR_GET_NAME kselftest/vDSO: Use ksft_print_msg() rather than printf in vdso_test_abi kselftest/vDSO: Fix message formatting for clock_id logging kselftest/vDSO: Make test name reporting for vdso_abi_test tooling friendly selftests:x86: Fix Format String Warnings in lam.c selftests/breakpoints: Fix format specifier in ksft_print_msg in step_after_suspend_test.c selftests:breakpoints: Fix Format String Warning in breakpoint_test commit 8cf9bedfc3c47d24bb0de386f808f925dc52863e Author: Fedor Pchelkin Date: Tue Jan 9 17:14:44 2024 +0300 ksmbd: free ppace array on error in parse_dacl The ppace array is not freed if one of the init_acl_state() calls inside parse_dacl() fails. At the moment the function may fail only due to the memory allocation errors so it's highly unlikely in this case but nevertheless a fix is needed. Move ppace allocation after the init_acl_state() calls with proper error handling. Found by Linux Verification Center (linuxtesting.org). Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Signed-off-by: Fedor Pchelkin Acked-by: Namjae Jeon Signed-off-by: Steve French commit 41daf06ea14fdccb34224fbcc5c4f2a6d17814e2 Merge: 5d09f61e505a6 539e582a375de Author: Linus Torvalds Date: Tue Jan 9 17:16:58 2024 -0800 Merge tag 'linux_kselftest-kunit-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit updates from Shuah Khan: - a new feature that adds APIs for managing devices introducing a set of helper functions which allow devices (internally a struct kunit_device) to be created and managed by KUnit. These devices will be automatically unregistered on test exit. These helpers can either use a user-provided struct device_driver, or have one automatically created and managed by KUnit. In both cases, the device lives on a new kunit_bus. - changes to switch drm/tests to use kunit devices - several fixes and enhancements to attribute feature - changes to reorganize deferred action function introducing KUNIT_DEFINE_ACTION_WRAPPER - new feature adds ability to run tests after boot using debugfs - fixes and enhancements to string-stream-test: - parse ERR_PTR in string_stream_destroy() - unchecked dereference in bug fix in debugfs_print_results() - handling errors from alloc_string_stream() - NULL-dereference bug fix in kunit_init_suite() * tag 'linux_kselftest-kunit-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (27 commits) kunit: Fix some comments which were mistakenly kerneldoc kunit: Protect string comparisons against NULL kunit: Add example of kunit_activate_static_stub() with pointer-to-function kunit: Allow passing function pointer to kunit_activate_static_stub() kunit: Fix NULL-dereference in kunit_init_suite() if suite->log is NULL kunit: Reset test->priv after each param iteration kunit: Add example for using test->priv drm/tests: Switch to kunit devices ASoC: topology: Replace fake root_device with kunit_device in tests overflow: Replace fake root_device with kunit_device fortify: test: Use kunit_device kunit: Add APIs for managing devices Documentation: Add debugfs docs with run after boot kunit: add ability to run tests after boot using debugfs kunit: add is_init test attribute kunit: add example suite to test init suites kunit: add KUNIT_INIT_TABLE to init linker section kunit: move KUNIT_TABLE out of INIT_DATA kunit: tool: add test for parsing attributes kunit: tool: fix parsing of test attributes ... commit 5d09f61e505a614250df24a0f7e646802e40fc87 Merge: a7e4c6cf5bbbd d543d9ddf593b Author: Linus Torvalds Date: Tue Jan 9 17:14:32 2024 -0800 Merge tag 'linux_kselftest-nolibc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull nolibc updates from Shuah Khan: - Support for PIC mode on MIPS - Support for getrlimit()/setrlimit() - Replace some custom declarations with UAPI includes - A new script "run-tests.sh" to run the testsuite over different architectures and configurations - A few non-functional code cleanups - Minor improvements to nolibc-test, primarily to support the test script * tag 'linux_kselftest-nolibc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (22 commits) selftests/nolibc: disable coredump via setrlimit tools/nolibc: add support for getrlimit/setrlimit tools/nolibc: drop custom definition of struct rusage tools/nolibc: drop duplicated testcase ioctl_tiocinq tools/nolibc: annotate va_list printf formats selftests/nolibc: make result alignment more robust tools/nolibc: mips: add support for PIC selftests/nolibc: run-tests.sh: enable testing via qemu-user selftests/nolibc: introduce QEMU_ARCH_USER selftests/nolibc: fix testcase status alignment selftests/nolibc: add configuration for mipso32be selftests/nolibc: extraconfig support selftests/nolibc: explicitly specify ABI for MIPS selftests/nolibc: use XARCH for MIPS tools/nolibc: move MIPS ABI validation into arch-mips.h tools/nolibc: error out on unsupported architecture selftests/nolibc: add script to run testsuite selftests/nolibc: support out-of-tree builds selftests/nolibc: anchor paths in $(srcdir) if possible selftests/nolibc: use EFI -bios for LoongArch qemu ... commit a7e4c6cf5bbbd8fea2be1cef0540e5cf107c43c2 Merge: 7c6a3fc925b63 4afa688d7141a Author: Linus Torvalds Date: Tue Jan 9 17:11:27 2024 -0800 Merge tag 'efi-next-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi Pull EFI updates from Ard Biesheuvel: - Fix a syzbot reported issue in efivarfs where concurrent accesses to the file system resulted in list corruption - Add support for accessing EFI variables via the TEE subsystem (and a trusted application in the secure world) instead of via EFI runtime firmware running in the OS's execution context - Avoid linker tricks to discover the image base on LoongArch * tag 'efi-next-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: efi: memmap: fix kernel-doc warnings efi/loongarch: Directly position the loaded image file efivarfs: automatically update super block flag efi: Add tee-based EFI variable driver efi: Add EFI_ACCESS_DENIED status code efi: expose efivar generic ops register function efivarfs: Move efivarfs list into superblock s_fs_info efivarfs: Free s_fs_info on unmount efivarfs: Move efivar availability check into FS context init efivarfs: force RO when remounting if SetVariable is not supported commit 7c6a3fc925b63d5201f1c11b93193d8a466a7d89 Merge: 5fda5698c289b 9bd9fbd9032a3 Author: Linus Torvalds Date: Tue Jan 9 17:09:44 2024 -0800 Merge tag 'for-linus-6.8-1' of https://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Some small fixes. Nothing big, just aligning things with some changes" * tag 'for-linus-6.8-1' of https://github.com/cminyard/linux-ipmi: ipmi: Remove usage of the deprecated ida_simple_xx() API ipmi: Use regspacings passed as a module parameter ipmi: si: Use device_get_match_data() commit 5fda5698c289b2ff21d53d935c43351c424f8388 Merge: b9b56eb280451 236f7d8034ff4 Author: Linus Torvalds Date: Tue Jan 9 17:07:12 2024 -0800 Merge tag 'platform-drivers-x86-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates from Hans de Goede: - Intel PMC / PMT / TPMI / uncore-freq / vsec improvements and new platform support - AMD PMC / PMF improvements and new platform support - AMD ACPI based Wifi band RFI mitigation feature (WBRF) - WMI bus driver cleanups and improvements (Armin Wolf) - acer-wmi Predator PHN16-71 support - New Silicom network appliance EC LEDs / GPIOs driver * tag 'platform-drivers-x86-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (96 commits) platform/x86/amd/pmc: Modify SMU message port for latest AMD platform platform/x86/amd/pmc: Add 1Ah family series to STB support list platform/x86/amd/pmc: Add idlemask support for 1Ah family platform/x86/amd/pmc: call amd_pmc_get_ip_info() during driver probe platform/x86/amd/pmc: Add VPE information for AMDI000A platform platform/x86/amd/pmc: Send OS_HINT command for AMDI000A platform platform/x86/amd/pmf: Return a status code only as a constant in two functions platform/x86/amd/pmf: Return directly after a failed apmf_if_call() in apmf_sbios_heartbeat_notify() platform/x86: wmi: linux/wmi.h: fix Excess kernel-doc description warning platform/x86/intel/pmc: Add missing extern platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend platform/x86/intel/pmc/arl: Add GBE LTR ignore during suspend platform/x86: intel-uncore-freq: Add additional client processors platform/x86: Remove "X86 PLATFORM DRIVERS - ARCH" from MAINTAINERS platform/x86: hp-bioscfg: Removed needless asm-generic platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver platform/x86/intel/pmc: Add ssram_init flag in PMC discovery in Meteor Lake platform/x86/intel/pmc: Move common code to core.c platform/x86/intel/pmc: Add PSON residency counter for Alder Lake ... commit b9b56eb280451ccfd42e9e554e83c6202a2d286b Merge: 3efcce4a9ec0d 09aeaabebdafb Author: Linus Torvalds Date: Tue Jan 9 17:04:44 2024 -0800 Merge tag 'tag-chrome-platform-firmware-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform firmware updates from Tzung-Bi Shih: - Fix an invalid address access. - Use .remove_new() for converting the callback to return void * tag 'tag-chrome-platform-firmware-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: firmware: coreboot: Convert to platform remove callback returning void firmware: coreboot: framebuffer: Avoid invalid zero physical address commit 3efcce4a9ec0d2f47ad7c501d0b072c12a1706af Merge: 7da71072e1d69 57eb6dcd32cf6 Author: Linus Torvalds Date: Tue Jan 9 16:55:25 2024 -0800 Merge tag 'tag-chrome-platform-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Tzung-Bi Shih: - Implement quickselect for median in cros-ec-sensorhub - Fix an out of boundary array access in cros-ec-vbc - Cleanups and fix typos * tag 'tag-chrome-platform-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API platform/chrome: cros_ec_vbc: Fix -Warray-bounds warnings platform/chrome: sensorhub: Implement quickselect for median calculation platform/chrome: sensorhub: Fix typos commit 7da71072e1d6967c0482abcbb5991ffb5953fdf2 Merge: 7f73ba68cf67e f1e5e46397817 Author: Linus Torvalds Date: Tue Jan 9 16:32:11 2024 -0800 Merge tag 'pm-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These add support for new processors (Sierra Forest, Grand Ridge and Meteor Lake) to the intel_idle driver, make intel_pstate run on Emerald Rapids without HWP support and adjust it to utilize EPP values supplied by the platform firmware, fix issues, clean up code and improve documentation. The most significant fix addresses deadlocks in the core system-wide resume code that occur if async_schedule_dev() attempts to run its argument function synchronously (for example, due to a memory allocation failure). It rearranges the code in question which may increase the system resume time in some cases, but this basically is a removal of a premature optimization. That optimization will be added back later, but properly this time. Specifics: - Add support for the Sierra Forest, Grand Ridge and Meteorlake SoCs to the intel_idle cpuidle driver (Artem Bityutskiy, Zhang Rui) - Do not enable interrupts when entering idle in the haltpoll cpuidle driver (Borislav Petkov) - Add Emerald Rapids support in no-HWP mode to the intel_pstate cpufreq driver (Zhenguo Yao) - Use EPP values programmed by the platform firmware as balanced performance ones by default in intel_pstate (Srinivas Pandruvada) - Add a missing function return value check to the SCMI cpufreq driver to avoid unexpected behavior (Alexandra Diupina) - Fix parameter type warning in the armada-8k cpufreq driver (Gregory CLEMENT) - Rework trans_stat_show() in the devfreq core code to avoid buffer overflows (Christian Marangi) - Synchronize devfreq_monitor_[start/stop] so as to prevent a timer list corruption from occurring when devfreq governors are switched frequently (Mukesh Ojha) - Fix possible deadlocks in the core system-wide PM code that occur if device-handling functions cannot be executed asynchronously during resume from system-wide suspend (Rafael J. Wysocki) - Clean up unnecessary local variable initializations in multiple places in the hibernation code (Wang chaodong, Li zeming) - Adjust core hibernation code to avoid missing wakeup events that occur after saving an image to persistent storage (Chris Feng) - Update hibernation code to enforce correct ordering during image compression and decompression (Hongchen Zhang) - Use kmap_local_page() instead of kmap_atomic() in copy_data_page() during hibernation and restore (Chen Haonan) - Adjust documentation and code comments to reflect recent tasks freezer changes (Kevin Hao) - Repair excess function parameter description warning in the hibernation image-saving code (Randy Dunlap) - Fix _set_required_opps when opp is NULL (Bryan O'Donoghue) - Use device_get_match_data() in the OPP code for TI (Rob Herring) - Clean up OPP level and other parts and call dev_pm_opp_set_opp() recursively for required OPPs (Viresh Kumar)" * tag 'pm-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (35 commits) OPP: Rename 'rate_clk_single' OPP: Pass rounded rate to _set_opp() OPP: Relocate dev_pm_opp_sync_regulators() PM: sleep: Fix possible deadlocks in core system-wide PM code OPP: Move dev_pm_opp_icc_bw to internal opp.h async: Introduce async_schedule_dev_nocall() async: Split async_schedule_node_domain() cpuidle: haltpoll: Do not enable interrupts when entering idle OPP: Fix _set_required_opps when opp is NULL OPP: The level field is always of unsigned int type PM: hibernate: Repair excess function parameter description warning PM: sleep: Remove obsolete comment from unlock_system_sleep() cpufreq: intel_pstate: Add Emerald Rapids support in no-HWP mode Documentation: PM: Adjust freezing-of-tasks.rst to the freezer changes PM: hibernate: Use kmap_local_page() in copy_data_page() intel_idle: add Sierra Forest SoC support intel_idle: add Grand Ridge SoC support PM / devfreq: Synchronize devfreq_monitor_[start/stop] cpufreq: armada-8k: Fix parameter type warning PM: hibernate: Enforce ordering during image compression/decompression ... commit 7f73ba68cf67ef533783013f863d750c5736f957 Merge: bd012f3a5b028 17e8b76491b00 Author: Linus Torvalds Date: Tue Jan 9 16:20:17 2024 -0800 Merge tag 'thermal-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull thermal control updates from Rafael Wysocki: "These add support for the D1/T113s THS controller to the sun8i driver and a DT-based mechanism for platforms to indicate a preference to reboot (instead of shutting down) on crossing a critical trip point, fix issues, make other improvements (in the IPA governor, the Intel HFI driver, the exynos driver and the thermal netlink interface among other places) and clean up code. One long-standing issue addressed here is that trip point crossing notifications sent to user space might be unreliable due to the incorrect handling of trip point hysteresis in the thermal core: multiple notifications might be sent for the same event or there might be events without any notification at all. Specifics: - Add dynamic thresholds for trip point crossing detection to prevent trip point crossing notifications from being sent at incorrect times or not at all in some cases (Rafael J. Wysocki) - Fix synchronization issues related to the resume of thermal zones during a system-wide resume and allow thermal zones to be resumed concurrently (Rafael J. Wysocki) - Modify the thermal zone unregistration to wait for the given zone to go away completely before returning to the caller and rework the sysfs interface for trip points on top of that (Rafael J. Wysocki) - Fix a possible NULL pointer dereference in thermal zone registration error path (Rafael J. Wysocki) - Clean up the IPA thermal governor and modify it (with the help of a new governor callback) to avoid allocating and freeing memory every time its throttling callback is invoked (Lukasz Luba) - Make the IPA thermal governor handle thermal instance weight changes via sysfs correctly (Lukasz Luba) - Update the thermal netlink code to avoid sending messages if there are no recipients (Stanislaw Gruszka) - Convert Mediatek Thermal to the json-schema (Rafał Miłecki) - Fix thermal DT bindings issue on Loongson (Binbin Zhou) - Fix returning NULL instead of -ENODEV during thermal probe on Loogsoon (Binbin Zhou) - Add thermal DT binding for tsens on the SM8650 platform (Neil Armstrong) - Add reboot on the critical trip point crossing option feature (Fabio Estevam) - Use DEFINE_SIMPLE_DEV_PM_OPS do define PM functions for thermal suspend/resume on AmLogic (Uwe Kleine-König) - Add D1/T113s THS controller support to the Sun8i thermal control driver (Maxim Kiselev) - Fix example in the thermal DT binding for QCom SPMI (Johan Hovold) - Fix compilation warning in the tmon utility (Florian Eckert) - Add support for interrupt-based thermal configuration on Exynos along with a set of related cleanups (Mateusz Majewski) - Make the Intel HFI thermal driver enable an HFI instance (eg. processor package) from its first online CPU and disable it when the last CPU in it goes offline (Ricardo Neri) - Fix a kernel-doc warning and a spello in the cpuidle_cooling thermal driver (Randy Dunlap) - Move the .get_temp() thermal zone callback presence check to the thermal zone registration code (Daniel Lezcano) - Use the for_each_trip() macro for trip points table walks in a few places in the thermal core (Rafael J. Wysocki) - Make all trip point updates (via sysfs as well as from the platform firmware) trigger trip change notifications (Rafael J. Wysocki) - Drop redundant code from the thermal core and make one function in it take a const pointer argument (Rafael J. Wysocki)" * tag 'thermal-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (64 commits) thermal: trip: Constify thermal zone argument of thermal_zone_trip_id() thermal: intel: hfi: Disable an HFI instance when all its CPUs go offline thermal: intel: hfi: Enable an HFI instance from its first online CPU thermal: intel: hfi: Refactor enabling code into helper functions thermal/drivers/exynos: Use set_trips ops thermal/drivers/exynos: Use BIT wherever possible thermal/drivers/exynos: Split initialization of TMU and the thermal zone thermal/drivers/exynos: Stop using the threshold mechanism on Exynos 4210 thermal/drivers/exynos: Simplify regulator (de)initialization thermal/drivers/exynos: Handle devm_regulator_get_optional return value correctly thermal/drivers/exynos: Wwitch from workqueue-driven interrupt handling to threaded interrupts thermal/drivers/exynos: Drop id field thermal/drivers/exynos: Remove an unnecessary field description tools/thermal/tmon: Fix compilation warning for wrong format dt-bindings: thermal: qcom-spmi-adc-tm5/hc: Clean up examples dt-bindings: thermal: qcom-spmi-adc-tm5/hc: Fix example node names thermal/drivers/sun8i: Add D1/T113s THS controller support dt-bindings: thermal: sun8i: Add binding for D1/T113s THS controller thermal: amlogic: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions thermal: amlogic: Make amlogic_thermal_disable() return void ... commit bd012f3a5b02849d9acc85e2b8b71293ce072263 Merge: 35f11a3710cdc e46201308a1e5 Author: Linus Torvalds Date: Tue Jan 9 16:12:44 2024 -0800 Merge tag 'acpi-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "From the new features standpoint, the most significant change here is the addition of CSI-2 and MIPI DisCo for Imaging support to the ACPI device enumeration code that will allow MIPI cameras to be enumerated through the platform firmware on systems using ACPI. Also significant is the switch-over to threaded interrupt handlers for the ACPI SCI and the dedicated EC interrupt (on systems where the former is not used) which essentially allows all ACPI code to run with local interrupts enabled. That should improve responsiveness significantly on systems where multiple GPEs are enabled and the handling of one SCI involves many I/O address space accesses which previously had to be carried out in one go with disabled interrupts on the local CPU. Apart from the above, the ACPI thermal zone driver will use the Thermal fast Sampling Period (_TFP) object if available, which should allow temperature changes to be followed more accurately on some systems, the ACPI Notify () handlers can run on all CPUs (not just on CPU0), which should generally speed up the processing of events signaled through the ACPI SCI, and the ACPI power button driver will trigger wakeup key events via the input subsystem (on systems where it is a system wakeup device) In addition to that, there are the usual bunch of fixes and cleanups. Specifics: - Add CSI-2 and DisCo for Imaging support to the ACPI device enumeration code (Sakari Ailus, Rafael J. Wysocki) - Adjust the cpufreq thermal reduction algorithm in the ACPI processor driver for Tegra241 (Srikar Srimath Tirumala, Arnd Bergmann) - Make acpi_proc_quirk_mwait_check() x86-specific (Rafael J. Wysocki) - Switch over ACPI to using a threaded interrupt handler for the SCI (Rafael J. Wysocki) - Allow ACPI Notify () handlers to run on all CPUs and clean up the ACPI interface for deferred events processing (Rafael J. Wysocki) - Switch over the ACPI EC driver to using a threaded handler for the dedicated IRQ on systems without the EC GPE (Rafael J. Wysocki) - Adjust code using ACPICA spinlocks and the ACPI EC driver spinlock to keep local interrupts on (Rafael J. Wysocki) - Adjust the USB4 _OSC handshake to correctly handle cases in which certain types of OS control are denied by the platform (Mika Westerberg) - Correct and clean up the generic function for parsing ACPI data-only tables with array structure (Yuntao Wang) - Modify acpi_dev_uid_match() to support different types of its second argument and adjust its users accordingly (Raag Jadav) - Clean up code related to acpi_evaluate_reference() and ACPI device lists (Rafael J. Wysocki) - Use generic ACPI helpers for evaluating trip point temperature objects in the ACPI thermal zone driver (Rafael J. Wysockii, Arnd Bergmann) - Add Thermal fast Sampling Period (_TFP) support to the ACPI thermal zone driver (Jeff Brasen) - Modify the ACPI LPIT table handling code to avoid u32 multiplication overflows in state residency computations (Nikita Kiryushin) - Drop an unused helper function from the ACPI backlight (video) driver and add a clarifying comment to it (Hans de Goede) - Update the ACPI backlight driver to avoid using uninitialized memory in some cases (Nikita Kiryushin) - Add ACPI backlight quirk for the Colorful X15 AT 23 laptop (Yuluo Qiu) - Add support for vendor-defined error types to the ACPI APEI error injection code (Avadhut Naik) - Adjust APEI to properly set MF_ACTION_REQUIRED on synchronous memory failure events, so they are handled differently from the asynchronous ones (Shuai Xue) - Fix NULL pointer dereference check in the ACPI extlog driver (Prarit Bhargava) - Adjust the ACPI extlog driver to clear the Extended Error Log status when RAS_CEC handled the error (Tony Luck) - Add IRQ override quirks for some Infinity laptops and for TongFang GMxXGxx (David McFarland, Hans de Goede) - Clean up the ACPI NUMA code and fix it to ensure that fake_pxm is not the same as one of the real pxm values (Yuntao Wang) - Fix the fractional clock divider flags in the ACPI LPSS (Intel SoC) driver so as to prevent miscalculation of the values in the clock divider (Andy Shevchenko) - Adjust comments in the ACPI watchdog driver to prevent kernel-doc from complaining during documentation builds (Randy Dunlap) - Make the ACPI button driver send wakeup key events to user space in addition to power button events on systems that can be woken up by the power button (Ken Xue) - Adjust pnpacpi_parse_allocated_vendor() to use memcpy() on a full structure field (Dmitry Antipov)" * tag 'acpi-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits) ACPI: resource: Add Infinity laptops to irq1_edge_low_force_override ACPI: button: trigger wakeup key events ACPI: resource: Add another DMI match for the TongFang GMxXGxx ACPI: EC: Use a spin lock without disabing interrupts ACPI: EC: Use a threaded handler for dedicated IRQ ACPI: OSL: Use spin locks without disabling interrupts ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events ACPI: utils: Introduce helper for _DEP list lookup ACPI: utils: Fix white space in struct acpi_handle_list definition ACPI: utils: Refine acpi_handle_list_equal() slightly ACPI: utils: Return bool from acpi_evaluate_reference() ACPI: utils: Rearrange in acpi_evaluate_reference() ACPI: arm64: export acpi_arch_thermal_cpufreq_pctg() ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error ACPI: LPSS: Fix the fractional clock divider flags ACPI: NUMA: Fix the logic of getting the fake_pxm value ACPI: NUMA: Optimize the check for the availability of node values ACPI: NUMA: Remove unnecessary check in acpi_parse_gi_affinity() ACPI: watchdog: fix kernel-doc warnings ACPI: extlog: fix NULL pointer dereference check ... commit dc97f6344f205b0dfa144e1b3e16d6dc05383d57 Author: Ira Weiny Date: Wed Dec 20 16:17:36 2023 -0800 cxl/pci: Register for and process CPER events If the firmware has configured CXL event support to be firmware first the OS can process those events through CPER records. The CXL layer has unique DPA to HPA knowledge and standard event trace parsing in place. CPER records contain Bus, Device, Function information which can be used to identify the PCI device which is sending the event. Change the PCI driver registration to include registration of a CXL CPER callback to process events through the trace subsystem. Use new scoped based management to simplify the handling of the PCI device object. Tested-by: Smita-Koralahalli Reviewed-by: Smita-Koralahalli Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-9-1bb8a4ca2c7a@intel.com Signed-off-by: Ira Weiny [djbw: use new pci_dev guard, flip init order] Reviewed-by: Jonathan Cameron Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams commit ced085ef369af7a2b6da962ec2fbd01339f60693 Author: Ira Weiny Date: Wed Dec 20 16:17:35 2023 -0800 PCI: Introduce cleanup helpers for device reference counts and locks The "goto error" pattern is notorious for introducing subtle resource leaks. Use the new cleanup.h helpers for PCI device reference counts and locks. Similar to the new put_device() and device_lock() cleanup helpers, __free(put_device) and guard(device), define the same for PCI devices, __free(pci_dev_put) and guard(pci_dev). These helpers eliminate the need for "goto free;" and "goto unlock;" patterns. For example, A 'struct pci_dev *' instance declared as: struct pci_dev *pdev __free(pci_dev_put) = NULL; ...will automatically call pci_dev_put() if @pdev is non-NULL when @pdev goes out of scope (automatic variable scope). If a function wants to invoke pci_dev_put() on error, but return @pdev on success, it can do: return no_free_ptr(pdev); ...or: return_ptr(pdev); For potential cleanup opportunity there are 587 open-coded calls to pci_dev_put() in the kernel with 65 instances within 10 lines of a goto statement with the CXL driver threatening to add another one. The guard() helper holds the associated lock for the remainder of the current scope in which it was invoked. So, for example: func(...) { if (...) { ... guard(pci_dev); /* pci_dev_lock() invoked here */ ... } /* <- implied pci_dev_unlock() triggered here */ } There are 15 invocations of pci_dev_unlock() in the kernel with 5 instances within 10 lines of a goto statement. Again, the CXL driver is threatening to add another. Introduce these helpers to preclude the addition of new more error prone goto put; / goto unlock; sequences. For now, these helpers are used in drivers/cxl/pci.c to allow ACPI error reports to be fed back into the CXL driver associated with the PCI device identified in the report. Cc: Bjorn Helgaas Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-8-1bb8a4ca2c7a@intel.com [djbw: rewrite changelog] Acked-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams commit 671a794c33c6e048ca5cedd5ad6af44d52d5d7e5 Author: Ira Weiny Date: Wed Dec 20 16:17:34 2023 -0800 acpi/ghes: Process CXL Component Events BIOS can configure memory devices as firmware first. This will send CXL events to the firmware instead of the OS. The firmware can then send these events to the OS via UEFI. UEFI v2.10 section N.2.14 defines a Common Platform Error Record (CPER) format for CXL Component Events. The format is mostly the same as the CXL Common Event Record Format. The difference is the use of a GUID in the Section Type rather than a UUID as part of the event itself. Add GHES support to detect CXL CPER records and call a registered callback with the event. A notifier chain was considered for the callback but the complexity did not justify the use case as only the CXL subsystem requires this event. Enforce that only one callback can be registered at any time. Cc: Ard Biesheuvel Cc: Rafael J. Wysocki Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-7-1bb8a4ca2c7a@intel.com [djbw: fixup checkpatch errors] Reviewed-by: Jonathan Cameron Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams commit f9c683386f5bc0364615138ce2b14be50848dbcf Author: Ira Weiny Date: Wed Dec 20 16:17:33 2023 -0800 cxl/events: Create a CXL event union The CXL CPER and event log records share everything but a UUID/GUID in their structures. Define a cxl_event union without the UUID/GUID to be shared between the CPER and event log record formats. Adjust the code to use this union. Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-6-1bb8a4ca2c7a@intel.com Reviewed-by: Jonathan Cameron Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams commit 35f11a3710cdcbbc5090d14017a6295454e0cc73 Merge: 301940020a92e 98d4fda8f2d4b Author: Linus Torvalds Date: Tue Jan 9 15:40:59 2024 -0800 Merge tag 'mtd/for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd updates from Miquel Raynal: "MTD: - Apart from preventing the mtdblk to run on top of ftl or ubiblk (which may cause security issues and has no meaning anyway), there are a few misc fixes. Raw NAND: - Two meaningful changes this time. The conversion of the brcmnand driver to the ->exec_op() API, this series brought additional changes to the core in order to help controller drivers to handle themselves the WP pin during destructive operations when relevant. - There is also a series bringing important fixes to the sequential read feature. - As always, there is as well a whole bunch of miscellaneous W=1 fixes, together with a few runtime fixes (double free, timeout value, OOB layout, missing register initialization) and the usual load of remove callbacks turned into void (which led to switch the txx9ndfmc driver to use module_platform_driver()). SPI NOR: - SPI NOR comes with die erase support for multi die flashes, with new octal protocols (1-1-8 and 1-8-8) parsed from SFDP and with an updated documentation about what the contributors shall consider when proposing flash additions or updates. - Michael Walle stepped out from the reviewer role to maintainer" * tag 'mtd/for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (39 commits) mtd: rawnand: Clarify conditions to enable continuous reads mtd: rawnand: Prevent sequential reads with on-die ECC engines mtd: rawnand: Fix core interference with sequential reads mtd: rawnand: Prevent crossing LUN boundaries during sequential reads mtd: Fix gluebi NULL pointer dereference caused by ftl notifier dt-bindings: mtd: partitions: u-boot: Fix typo mtd: rawnand: s3c2410: fix Excess struct member description kernel-doc warnings MAINTAINERS: change my mail to the kernel.org one mtd: spi-nor: sfdp: get the 1-1-8 and 1-8-8 protocol from SFDP mtd: spi-nor: drop superfluous debug prints mtd: spi-nor: sysfs: hide the flash name if not set mtd: spi-nor: mark the flash name as obsolete mtd: spi-nor: print flash ID instead of name mtd: maps: vmu-flash: Fix the (mtd core) switch to ref counters mtd: ssfdc: Remove an unused variable mtd: rawnand: diskonchip: fix a potential double free in doc_probe mtd: rawnand: rockchip: Add missing title to a kernel doc comment mtd: rawnand: rockchip: Rename a structure mtd: rawnand: pl353: Fix kernel doc mtd: spi-nor: micron-st: Add support for mt25qu01g ... commit 6eade110754c085cee9e46f4d87d2c3ea4e59e8c Author: Ira Weiny Date: Wed Dec 20 16:17:32 2023 -0800 cxl/events: Separate UUID from event structures The UEFI CXL CPER structure does not include the UUID. Now that the UUID is passed separately to the trace event there is no need to have the UUID in those structures. Move UUID from the event record header to the raw structures. Adjust cxl-test to Create dummy structures for creating test records. Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-5-1bb8a4ca2c7a@intel.com Reviewed-by: Jonathan Cameron Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams commit 207a1f82301de0b4123f00a8d26ea55bb2484757 Author: Ira Weiny Date: Wed Dec 20 16:17:31 2023 -0800 cxl/events: Remove passing a UUID to known event traces The UUID data is redundant in the known event trace types. The addition of static defines allows the trace macros to create the UUID data inside the trace thus removing unnecessary code. Have well known trace events use static data to set the uuid field based on the event type. Suggested-by: Jonathan Cameron Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-4-1bb8a4ca2c7a@intel.com Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams commit 4c115c9c1f81a6efe2bd68fcefec6836f7f3dc71 Author: Ira Weiny Date: Wed Dec 20 16:17:30 2023 -0800 cxl/events: Create common event UUID defines Dan points out in review that the cxl_test code could be made better through the use of UUID's defines rather than being open coded.[1] Create UUID defines and use them rather than open coding them. Suggested-by: Dan Williams Signed-off-by: Ira Weiny Link: http://lore.kernel.org/r/65738d09e30e2_45e0129451@dwillia2-xfh.jf.intel.com.notmuch [1] Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-3-1bb8a4ca2c7a@intel.com [djbw: clang-format uuid definitions] Reviewed-by: Jonathan Cameron Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams commit 7dab24554dedd4e6f408af8eb2d25c89997a6a1f Author: Bart Van Assche Date: Sun Jan 7 16:12:23 2024 -0800 md/raid1: Use blk_opf_t for read and write operations Use the type blk_opf_t for read and write operations instead of int. This patch does not affect the generated code but fixes the following sparse warning: drivers/md/raid1.c:1993:60: sparse: sparse: incorrect type in argument 5 (different base types) expected restricted blk_opf_t [usertype] opf got int rw Cc: Song Liu Cc: Jens Axboe Fixes: 3c5e514db58f ("md/raid1: Use the new blk_opf_t type") Cc: stable@vger.kernel.org # v6.0+ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401080657.UjFnvQgX-lkp@intel.com/ Signed-off-by: Bart Van Assche Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240108001223.23835-1-bvanassche@acm.org commit 301940020a92ebdef9352a0573075a1db42d17aa Merge: da96801729b43 f6cd66231aa58 Author: Linus Torvalds Date: Tue Jan 9 15:02:12 2024 -0800 Merge tag 'spi-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "A moderately busy release for SPI, the main core update was the merging of support for multiple chip selects, used in some flash configurations. There were also big overhauls for the AXI SPI Engine and PL022 drivers, plus some new device support for ST. There's a few patches for other trees, API updates to allow the multiple chip select support and one of the naming modernisations touched a controller embedded in the USB code. - Support for multiple chip selects. - A big overhaul for the AXI SPI engine driver, modernising it and adding a bunch of new features. - Modernisation of the PL022 driver, fixing some issues with submitting messages while in atomic context in the process. - Many drivers were converted to use new APIs which avoid outdated terminology for devices and controllers. - Support for ST Microelectronics STM32F7 and STM32MP25, and Renesas RZ/Five" * tag 'spi-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (83 commits) spi: stm32: add st,stm32mp25-spi compatible supporting STM32MP25 soc dt-bindings: spi: stm32: add st,stm32mp25-spi compatible spi: stm32: use dma_get_slave_caps prior to configuring dma channel spi: axi-spi-engine: fix struct member doc warnings spi: pl022: update description of internal_cs_control() spi: pl022: delete description of cur_msg spi: dw: Remove Intel Thunder Bay SOC support spi: dw: Remove Intel Thunder Bay SOC support spi: sh-msiof: Enforce fixed DTDL for R-Car H3 spi: ljca: switch to use devm_spi_alloc_host() spi: cs42l43: switch to use devm_spi_alloc_host() spi: zynqmp-gqspi: switch to use modern name spi: zynq-qspi: switch to use modern name spi: xtensa-xtfpga: switch to use modern name spi: xlp: switch to use modern name spi: xilinx: switch to use modern name spi: xcomm: switch to use modern name spi: uniphier: switch to use modern name spi: topcliff-pch: switch to use modern name spi: wpcm-fiu: switch to use devm_spi_alloc_host() ... commit 9ccc1318cf4bd90601f221268e42c3374703d681 Author: Jianjun Wang Date: Mon Oct 23 16:14:23 2023 +0800 PCI: mediatek-gen3: Fix translation window size calculation When using the fls() helper, the translation table should be a power of two; otherwise, the resulting value will not be correct. For example, given fls(0x3e00000) - 1 = 25, the PCIe translation window size will be set to 0x2000000 instead of the expected size 0x3e00000. Fix the translation window by splitting the MMIO space into multiple tables if its size is not a power of two. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20231023081423.18559-1-jianjun.wang@mediatek.com Fixes: d3bf75b579b9 ("PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192") Signed-off-by: Jianjun Wang Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: AngeloGioacchino Del Regno commit 4e11c29873a8a296a20f99b3e03095e65ebf897d Author: qizhong cheng Date: Mon Dec 11 17:49:23 2023 +0800 PCI: mediatek: Clear interrupt status before dispatching handler We found a failure when using the iperf tool during WiFi performance testing, where some MSIs were received while clearing the interrupt status, and these MSIs cannot be serviced. The interrupt status can be cleared even if the MSI status remains pending. As such, given the edge-triggered interrupt type, its status should be cleared before being dispatched to the handler of the underling device. [kwilczynski: commit log, code comment wording] Link: https://lore.kernel.org/linux-pci/20231211094923.31967-1-jianjun.wang@mediatek.com Fixes: 43e6409db64d ("PCI: mediatek: Add MSI support for MT2712 and MT7622") Signed-off-by: qizhong cheng Signed-off-by: Jianjun Wang Signed-off-by: Krzysztof Wilczyński [bhelgaas: rewrap comment] Signed-off-by: Bjorn Helgaas Reviewed-by: AngeloGioacchino Del Regno Cc: commit da96801729b43eb6229425a23b7bdf6045685251 Merge: 83130ff423d61 1cadc04c1a1ac Author: Linus Torvalds Date: Tue Jan 9 14:41:21 2024 -0800 Merge tag 'regulator-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "The main updates for this release are around monitoring of regulators, largely for error handling purposes. We allow the stream of regulator events to be seen by userspace as netlink events and allow system integrators to describe individual regulators as system critical with information on how long the system is expected to last on error. The system level error handling is very much about best effort problem mitigation rather than providing something fully robust, the initial drive was to provide a mechanism for trying to avoid initiating any new writes to flash once we notice the power going out. Otherwise it's very quiet, mainly several new Qualcomm devices. - Support for marking regulators as system critical and providing information on how long the system might last with those regulators in a failure state, hooked into the existing critical shutdown error handling. - Optional support for generating netlink events for events, there are use cases for system monitoring UIs and error handling. - A command line option to leave unused controllable regulators enabled, useful for debugging. We already only disable regulators we were explicitly given permission to control. - Support for Quacomm MP5496, PM8010 and PM8937" * tag 'regulator-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (31 commits) regulator: event: Ensure atomicity for sequence number uapi: regulator: Fix typo regulator: Reuse LINEAR_RANGE() in REGULATOR_LINEAR_RANGE() dt-bindings: regulator: qcom,usb-vbus-regulator: clean up example regulator: qcom_smd: Add LDO5 MP5496 regulator regulator: qcom-rpmh: add support for pm8010 regulators regulator: dt-bindings: qcom,rpmh: add compatible for pm8010 regulator: qcom-rpmh: extend to support multiple linear voltage ranges regulator: wm8350: Convert to platform remove callback returning void regulator: virtual: Convert to platform remove callback returning void regulator: userspace-consumer: Convert to platform remove callback returning void regulator: uniphier: Convert to platform remove callback returning void regulator: stm32-vrefbuf: Convert to platform remove callback returning void regulator: db8500-prcmu: Convert to platform remove callback returning void regulator: bd9571mwv: Convert to platform remove callback returning void regulator: arizona-ldo1: Convert to platform remove callback returning void regulator: event: Add regulator netlink event support regulator: event: Add regulator netlink event support regulator: stpmic1: Fix kernel-doc notation warnings regulator: palmas: remove redundant initialization of pointer pdata ... commit 83130ff423d61b018e1018cfa9ca5c1511b5f33b Merge: 6c1dd1fe5d8a1 3b201c9af7c0c Author: Linus Torvalds Date: Tue Jan 9 14:39:48 2024 -0800 Merge tag 'regmap-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This was a very quiet release for regmap, we added kunit test coverage for a noinc fix that was merged during v6.7 and a couple of other trivial cleanups" * tag 'regmap-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: fix kcalloc() arguments order regmap: fix regmap_noinc_write() description regmap: kunit: add noinc write test regmap: ram: support noinc semantics commit 6c1dd1fe5d8a1d43ed96e2e0ed44a88c73c5c039 Merge: e9b4c58908580 c00f94b3a5be4 Author: Linus Torvalds Date: Tue Jan 9 13:24:06 2024 -0800 Merge tag 'integrity-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity updates from Mimi Zohar: - Add a new IMA/EVM maintainer and reviewer - Disable EVM on overlayfs The EVM HMAC and the original file signatures contain filesystem specific metadata (e.g. i_ino, i_generation and s_uuid), preventing the security.evm xattr from directly being copied up to the overlay. Further before calculating and writing out the overlay file's EVM HMAC, EVM must first verify the existing backing file's 'security.evm' value. For now until a solution is developed, disable EVM on overlayfs. - One bug fix and two cleanups * tag 'integrity-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: overlay: disable EVM evm: add support to disable EVM on unsupported filesystems evm: don't copy up 'security.evm' xattr MAINTAINERS: Add Eric Snowberg as a reviewer to IMA MAINTAINERS: Add Roberto Sassu as co-maintainer to IMA and EVM KEYS: encrypted: Add check for strsep ima: Remove EXPERIMENTAL from Kconfig ima: Reword IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY commit e9b4c5890858015bfe2089b7573319bcf4a92907 Merge: 063a7ce32ddc2 0daaa610c8e03 Author: Linus Torvalds Date: Tue Jan 9 13:22:15 2024 -0800 Merge tag 'landlock-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull Landlock updates from Mickaël Salaün: "New tests, a slight optimization, and some cosmetic changes" * tag 'landlock-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: landlock: Optimize the number of calls to get_access_mask slightly selftests/landlock: Rename "permitted" to "allowed" in ftruncate tests landlock: Remove remaining "inline" modifiers in .c files [v6.6] landlock: Remove remaining "inline" modifiers in .c files [v6.1] landlock: Remove remaining "inline" modifiers in .c files [v5.15] selftests/landlock: Add tests to check unhandled rule's access rights selftests/landlock: Add tests to check unknown rule's access rights commit 063a7ce32ddc2c4f2404b0dfd29e60e3dbcdffac Merge: 9f9310bf87348 f1bb47a31dff6 Author: Linus Torvalds Date: Tue Jan 9 12:57:46 2024 -0800 Merge tag 'lsm-pr-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm Pull security module updates from Paul Moore: - Add three new syscalls: lsm_list_modules(), lsm_get_self_attr(), and lsm_set_self_attr(). The first syscall simply lists the LSMs enabled, while the second and third get and set the current process' LSM attributes. Yes, these syscalls may provide similar functionality to what can be found under /proc or /sys, but they were designed to support multiple, simultaneaous (stacked) LSMs from the start as opposed to the current /proc based solutions which were created at a time when only one LSM was allowed to be active at a given time. We have spent considerable time discussing ways to extend the existing /proc interfaces to support multiple, simultaneaous LSMs and even our best ideas have been far too ugly to support as a kernel API; after +20 years in the kernel, I felt the LSM layer had established itself enough to justify a handful of syscalls. Support amongst the individual LSM developers has been nearly unanimous, with a single objection coming from Tetsuo (TOMOYO) as he is worried that the LSM_ID_XXX token concept will make it more difficult for out-of-tree LSMs to survive. Several members of the LSM community have demonstrated the ability for out-of-tree LSMs to continue to exist by picking high/unused LSM_ID values as well as pointing out that many kernel APIs rely on integer identifiers, e.g. syscalls (!), but unfortunately Tetsuo's objections remain. My personal opinion is that while I have no interest in penalizing out-of-tree LSMs, I'm not going to penalize in-tree development to support out-of-tree development, and I view this as a necessary step forward to support the push for expanded LSM stacking and reduce our reliance on /proc and /sys which has occassionally been problematic for some container users. Finally, we have included the linux-api folks on (all?) recent revisions of the patchset and addressed all of their concerns. - Add a new security_file_ioctl_compat() LSM hook to handle the 32-bit ioctls on 64-bit systems problem. This patch includes support for all of the existing LSMs which provide ioctl hooks, although it turns out only SELinux actually cares about the individual ioctls. It is worth noting that while Casey (Smack) and Tetsuo (TOMOYO) did not give explicit ACKs to this patch, they did both indicate they are okay with the changes. - Fix a potential memory leak in the CALIPSO code when IPv6 is disabled at boot. While it's good that we are fixing this, I doubt this is something users are seeing in the wild as you need to both disable IPv6 and then attempt to configure IPv6 labeled networking via NetLabel/CALIPSO; that just doesn't make much sense. Normally this would go through netdev, but Jakub asked me to take this patch and of all the trees I maintain, the LSM tree seemed like the best fit. - Update the LSM MAINTAINERS entry with additional information about our process docs, patchwork, bug reporting, etc. I also noticed that the Lockdown LSM is missing a dedicated MAINTAINERS entry so I've added that to the pull request. I've been working with one of the major Lockdown authors/contributors to see if they are willing to step up and assume a Lockdown maintainer role; hopefully that will happen soon, but in the meantime I'll continue to look after it. - Add a handful of mailmap entries for Serge Hallyn and myself. * tag 'lsm-pr-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm: (27 commits) lsm: new security_file_ioctl_compat() hook lsm: Add a __counted_by() annotation to lsm_ctx.ctx calipso: fix memory leak in netlbl_calipso_add_pass() selftests: remove the LSM_ID_IMA check in lsm/lsm_list_modules_test MAINTAINERS: add an entry for the lockdown LSM MAINTAINERS: update the LSM entry mailmap: add entries for Serge Hallyn's dead accounts mailmap: update/replace my old email addresses lsm: mark the lsm_id variables are marked as static lsm: convert security_setselfattr() to use memdup_user() lsm: align based on pointer length in lsm_fill_user_ctx() lsm: consolidate buffer size handling into lsm_fill_user_ctx() lsm: correct error codes in security_getselfattr() lsm: cleanup the size counters in security_getselfattr() lsm: don't yet account for IMA in LSM_CONFIG_COUNT calculation lsm: drop LSM_ID_IMA LSM: selftests for Linux Security Module syscalls SELinux: Add selfattr hooks AppArmor: Add selfattr hooks Smack: implement setselfattr and getselfattr hooks ... commit 7075893d1d68b2b3517be250a02d86e76554ed22 Author: Melissa Wen Date: Fri Jan 5 21:02:09 2024 -0100 drm/amd/display: cleanup inconsistent indenting in amdgpu_dm_color smatch warnings: amdgpu_dm_update_plane_color_mgmt() warn: inconsistent indenting Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401051643.PPdbmG1U-lkp@intel.com/ Signed-off-by: Melissa Wen Reviewed-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 50e60184bfe72400c49f7806af97edaf693ecd45 Author: James Zhu Date: Tue Jan 2 15:53:01 2024 -0500 drm/amdgpu: make a correction on comment Use a generic comment for AMDGPU_VM_RESERVED_VRAM size. Signed-off-by: James Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c2ab9ce0ee7225fc05f58a6671c43b8a3684f530 Author: Ivan Lipski Date: Fri Jan 5 19:40:50 2024 -0500 Revert "drm/amd/display: fix bandwidth validation failure on DCN 2.1" This commit causes dmesg-warn on several IGT tests on DCN 3.1.6: *ERROR* link_enc_cfg_validate: Invalid link encoder assignments - 0x1c Affected IGT tests include: - amdgpu/[amd_assr|amd_plane|amd_hotplug] - kms_atomic - kms_color - kms_flip - kms_properties - kms_universal_plane and some other tests This reverts commit 3a0fa3bc245ef92838a8296e0055569b8dff94c4. Cc: Melissa Wen Cc: Hamza Mahfooz Reviewed-by: Rodrigo Siqueira Signed-off-by: Ivan Lipski Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c147ddc68e741aed78bba796effe049344d87ab8 Author: Felix Kuehling Date: Wed Jan 3 18:13:04 2024 -0500 drm/amdkfd: Fix sparse __rcu annotation warnings Properly mark kfd_process->ef as __rcu and consistently use the right accessor functions. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312052245.yFpBSgNH-lkp@intel.com/ Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2a9de42e8d3c82c6990d226198602be44f43f340 Author: Philip Yang Date: Fri Dec 29 15:19:25 2023 -0500 drm/amdkfd: Fix lock dependency warning with srcu ====================================================== WARNING: possible circular locking dependency detected 6.5.0-kfd-yangp #2289 Not tainted ------------------------------------------------------ kworker/0:2/996 is trying to acquire lock: (srcu){.+.+}-{0:0}, at: __synchronize_srcu+0x5/0x1a0 but task is already holding lock: ((work_completion)(&svms->deferred_list_work)){+.+.}-{0:0}, at: process_one_work+0x211/0x560 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 ((work_completion)(&svms->deferred_list_work)){+.+.}-{0:0}: __flush_work+0x88/0x4f0 svm_range_list_lock_and_flush_work+0x3d/0x110 [amdgpu] svm_range_set_attr+0xd6/0x14c0 [amdgpu] kfd_ioctl+0x1d1/0x630 [amdgpu] __x64_sys_ioctl+0x88/0xc0 -> #2 (&info->lock#2){+.+.}-{3:3}: __mutex_lock+0x99/0xc70 amdgpu_amdkfd_gpuvm_restore_process_bos+0x54/0x740 [amdgpu] restore_process_helper+0x22/0x80 [amdgpu] restore_process_worker+0x2d/0xa0 [amdgpu] process_one_work+0x29b/0x560 worker_thread+0x3d/0x3d0 -> #1 ((work_completion)(&(&process->restore_work)->work)){+.+.}-{0:0}: __flush_work+0x88/0x4f0 __cancel_work_timer+0x12c/0x1c0 kfd_process_notifier_release_internal+0x37/0x1f0 [amdgpu] __mmu_notifier_release+0xad/0x240 exit_mmap+0x6a/0x3a0 mmput+0x6a/0x120 do_exit+0x322/0xb90 do_group_exit+0x37/0xa0 __x64_sys_exit_group+0x18/0x20 do_syscall_64+0x38/0x80 -> #0 (srcu){.+.+}-{0:0}: __lock_acquire+0x1521/0x2510 lock_sync+0x5f/0x90 __synchronize_srcu+0x4f/0x1a0 __mmu_notifier_release+0x128/0x240 exit_mmap+0x6a/0x3a0 mmput+0x6a/0x120 svm_range_deferred_list_work+0x19f/0x350 [amdgpu] process_one_work+0x29b/0x560 worker_thread+0x3d/0x3d0 other info that might help us debug this: Chain exists of: srcu --> &info->lock#2 --> (work_completion)(&svms->deferred_list_work) Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&svms->deferred_list_work)); lock(&info->lock#2); lock((work_completion)(&svms->deferred_list_work)); sync(srcu); Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 73cb81dc548f154547d9205d5b9603ba10e2a402 Author: Hawking Zhang Date: Fri Dec 29 14:54:35 2023 +0800 drm/amdgpu: Packed socket_id to ras feature mask Initialize RAS feature mask bit[31:29] with socket_id. Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit fb1e91719983c529f85602fdd08c0b7dbf384b1c Author: Candice Li Date: Thu Jan 4 10:27:10 2024 +0800 drm/amdgpu: Support poison error injection via ras_ctrl debugfs Support poison error injection. Signed-off-by: Candice Li Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f4a94dbb6dc0bed10a5fc63718d00f1de45b12c0 Author: Likun Gao Date: Fri Jan 5 17:33:34 2024 +0800 drm/amdgpu: correct the cu count for gfx v11 Correct the algorithm of active CU to skip disabled sa for gfx v11. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 90bd01471d1c7f2d2db3c69259e247357991fe50 Author: Candice Li Date: Thu Jan 4 09:34:25 2024 +0800 drm/amdgpu: Drop unnecessary sentences about CE and deferred error. Remove "no user action is needed" for correctable and deferred error to avoid confusion. Signed-off-by: Candice Li Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d32156a07575d69916944ce0e2d4a71a4c95979d Author: Aric Cyr Date: Sun Dec 17 19:36:16 2023 -0500 drm/amd/display: 3.2.266 This version brings along following fixes: - Improve z8/z10 support. - Revert some of the VRR optimization. - Improve usb4 when using MST. Acked-by: Rodrigo Siqueira Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ab76bd72ee12d9117c3a16d749ffce84f5b235bf Author: Meenakshikumar Somasundaram Date: Tue Dec 19 15:51:24 2023 -0500 drm/amd/display: Dpia hpd status not in sync after S4 [Why] Dpia hpd status not in sync causing driver not enabling BW Alloc after S4. [How] Update hpd_status of the link when querying hpd state from dmub in dpia_query_hpd_status(). Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Meenakshikumar Somasundaram Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2476bf4328d1a55db709ce9ad2c274d26040311b Author: Charlene Liu Date: Thu Dec 21 09:42:28 2023 -0500 drm/amd/display: Update z8 latency Adjust z8 latency for performance. Reviewed-by: Muhammad Ahmed Acked-by: Rodrigo Siqueira Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bf282eb92b84709d99186ad5940b9997eb3c1ff2 Author: Daniel Miess Date: Wed Dec 20 10:34:32 2023 -0500 Revert "drm/amd/display: Fix conversions between bytes and KB" This reverts commit d0f639c5869399bf6dde4d694d5f8c0ab8c0ec46. The previous commit causes failure to light up for 1080p eDP + 8k HDMI panel combo. Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5f3bce13266e6fe2f7a46f94d8bc94d5274e276b Author: Peichen Huang Date: Thu Dec 14 23:16:34 2023 +0800 drm/amd/display: Request usb4 bw for mst streams [WHY] When usb4 bandwidth allocation mode is enabled, driver need to request bandwidth from connection manager. For mst link, the requested bandwidth should be big enough for all remote streams. [HOW] - If mst link, the requested bandwidth should be the sum of all mst streams bandwidth added with dp MTPH overhead. - Allocate/deallcate usb4 bandwidth when setting dpms on/off. - When doing display mode validation, driver also need to consider total bandwidth of all mst streams for mst link. Reviewed-by: Cruise Hung Acked-by: Rodrigo Siqueira Signed-off-by: Peichen Huang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit a465536ebff88fcc42e131a1b09bbe3df829117b Author: Martin Leung Date: Wed Dec 20 16:56:11 2023 -0500 drm/amd/display: revert "Optimize VRR updates to only necessary ones" This reverts commit 6e4337f695c25162f0296934152506ad596fcebf. The original commit causes regression in corner case with HDMI at specific timings. Reverting from staging to get the full suite to retest. Reviewed-by: Rodrigo Siqueira Signed-off-by: Martin Leung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 51c7e6ac24101af3147ebc45627810da367c6b66 Author: Martin Leung Date: Wed Dec 20 16:54:05 2023 -0500 drm/amd/display: revert "for FPO & SubVP/DRR config program vmin/max" This reverts commit 6b2b782ad6a25734ae847d1659bea3f613dbb563. The original commit causes issues with certain features when DRR is disabled, need to revisit this change later after resolving issues with new DRR policy. Reviewed-by: Rodrigo Siqueira Signed-off-by: Martin Leung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7bdbfb4e36e34eb788e44f27666bf0a2b3b90803 Author: George Shen Date: Sun Dec 17 17:17:57 2023 -0500 drm/amd/display: Disconnect phantom pipe OPP from OPTC being disabled [Why] If an OPP is used for a different OPTC without first being disconnected from the previous OPTC, unexpected behaviour can occur. This also applies to phantom pipes, which is what the current logic missed. [How] Disconnect OPPs from OPTC for phantom pipes before disabling OTG master. Also move the disconnection to before the OTG master disable, since the register is double buffered. Reviewed-by: Dillon Varone Acked-by: Rodrigo Siqueira Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 17e74e11ac2b46e7514705ae7abfb93ac0e20bd6 Author: Martin Tsai Date: Mon Dec 18 16:36:44 2023 +0800 drm/amd/display: To adjust dprefclk by down spread percentage [Why] Panels show corruption with high refresh rate timings when ssc is enabled. [How] Read down-spread percentage from lut to adjust dprefclk. Issues come from S0i3 with this commit has been fixed by SMU. Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Martin Tsai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 47bf0f83fc86df1bf42b385a91aadb910137c5c9 Author: Felix Kuehling Date: Tue Jan 2 15:07:44 2024 -0500 drm/amdkfd: Fix lock dependency warning ====================================================== WARNING: possible circular locking dependency detected 6.5.0-kfd-fkuehlin #276 Not tainted ------------------------------------------------------ kworker/8:2/2676 is trying to acquire lock: ffff9435aae95c88 ((work_completion)(&svm_bo->eviction_work)){+.+.}-{0:0}, at: __flush_work+0x52/0x550 but task is already holding lock: ffff9435cd8e1720 (&svms->lock){+.+.}-{3:3}, at: svm_range_deferred_list_work+0xe8/0x340 [amdgpu] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&svms->lock){+.+.}-{3:3}: __mutex_lock+0x97/0xd30 kfd_ioctl_alloc_memory_of_gpu+0x6d/0x3c0 [amdgpu] kfd_ioctl+0x1b2/0x5d0 [amdgpu] __x64_sys_ioctl+0x86/0xc0 do_syscall_64+0x39/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd -> #1 (&mm->mmap_lock){++++}-{3:3}: down_read+0x42/0x160 svm_range_evict_svm_bo_worker+0x8b/0x340 [amdgpu] process_one_work+0x27a/0x540 worker_thread+0x53/0x3e0 kthread+0xeb/0x120 ret_from_fork+0x31/0x50 ret_from_fork_asm+0x11/0x20 -> #0 ((work_completion)(&svm_bo->eviction_work)){+.+.}-{0:0}: __lock_acquire+0x1426/0x2200 lock_acquire+0xc1/0x2b0 __flush_work+0x80/0x550 __cancel_work_timer+0x109/0x190 svm_range_bo_release+0xdc/0x1c0 [amdgpu] svm_range_free+0x175/0x180 [amdgpu] svm_range_deferred_list_work+0x15d/0x340 [amdgpu] process_one_work+0x27a/0x540 worker_thread+0x53/0x3e0 kthread+0xeb/0x120 ret_from_fork+0x31/0x50 ret_from_fork_asm+0x11/0x20 other info that might help us debug this: Chain exists of: (work_completion)(&svm_bo->eviction_work) --> &mm->mmap_lock --> &svms->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&svms->lock); lock(&mm->mmap_lock); lock(&svms->lock); lock((work_completion)(&svm_bo->eviction_work)); I believe this cannot really lead to a deadlock in practice, because svm_range_evict_svm_bo_worker only takes the mmap_read_lock if the BO refcount is non-0. That means it's impossible that svm_range_bo_release is running concurrently. However, there is no good way to annotate this. To avoid the problem, take a BO reference in svm_range_schedule_evict_svm_bo instead of in the worker. That way it's impossible for a BO to get freed while eviction work is pending and the cancel_work_sync call in svm_range_bo_release can be eliminated. v2: Use svm_bo_ref_unless_zero and explained why that's safe. Also removed redundant checks that are already done in amdkfd_fence_enable_signaling. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit 9f9310bf87348e36a98ffa09c4e285908c14f592 Merge: eab23bc8a807d bbf5a1d0e5d0f Author: Linus Torvalds Date: Tue Jan 9 12:05:16 2024 -0800 Merge tag 'selinux-pr-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: - Add a new SELinux initial SID, SECINITSID_INIT, to represent userspace processes started before the SELinux policy is loaded in early boot. Prior to this patch all processes were marked as SECINITSID_KERNEL before the SELinux policy was loaded, making it difficult to distinquish early boot userspace processes from the kernel in the SELinux policy. For most users this will be a non-issue as the policy is loaded early enough during boot, but for users who load their SELinux policy relatively late, this should make it easier to construct meaningful security policies. - Cleanups to the selinuxfs code by Al, mostly on VFS related issues during a policy reload. The commit description has more detail, but the quick summary is that we are replacing a disconnected directory approach with a temporary directory that we swapover at the end of the reload. - Fix an issue where the input sanity checking on socket bind() operations was slightly different depending on the presence of SELinux. This is caused by the placement of the LSM hooks in the generic socket layer as opposed to the protocol specific bind() handler where the protocol specific sanity checks are performed. Mickaël has mentioned that he is working to fix this, but in the meantime we just ensure that we are replicating the checks properly. We need to balance the placement of the LSM hooks with the number of LSM hooks; pushing the hooks down into the protocol layers is likely not the right answer. - Update the avc_has_perm_noaudit() prototype to better match the function definition. - Migrate from using partial_name_hash() to full_name_hash() the filename transition hash table. This improves the quality of the code and has the potential for a minor performance bump. - Consolidate some open coded SELinux access vector comparisions into a single new function, avtab_node_cmp(), and use that instead. A small, but nice win for code quality and maintainability. - Updated the SELinux MAINTAINERS entry with additional information around process, bug reporting, etc. We're also updating some of our "official" roles: dropping Eric Paris and adding Ondrej as a reviewer. - Cleanup the coding style crimes in security/selinux/include. While I'm not a fan of code churn, I am pushing for more automated code checks that can be done at the developer level and one of the obvious things to check for is coding style. In an effort to start from a "good" base I'm slowly working through our source files cleaning them up with the help of clang-format and good ol' fashioned human eyeballs; this has the first batch of these changes. I've been splitting the changes up per-file to help reduce the impact if backports are required (either for LTS or distro kernels), and I expect the some of the larger files, e.g. hooks.c and ss/services.c, will likely need to be split even further. - Cleanup old, outdated comments. * tag 'selinux-pr-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: (24 commits) selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket selinux: fix style issues in security/selinux/include/initial_sid_to_string.h selinux: fix style issues in security/selinux/include/xfrm.h selinux: fix style issues in security/selinux/include/security.h selinux: fix style issues with security/selinux/include/policycap_names.h selinux: fix style issues in security/selinux/include/policycap.h selinux: fix style issues in security/selinux/include/objsec.h selinux: fix style issues with security/selinux/include/netlabel.h selinux: fix style issues in security/selinux/include/netif.h selinux: fix style issues in security/selinux/include/ima.h selinux: fix style issues in security/selinux/include/conditional.h selinux: fix style issues in security/selinux/include/classmap.h selinux: fix style issues in security/selinux/include/avc_ss.h selinux: align avc_has_perm_noaudit() prototype with definition selinux: fix style issues in security/selinux/include/avc.h selinux: fix style issues in security/selinux/include/audit.h MAINTAINERS: drop Eric Paris from his SELinux role MAINTAINERS: add Ondrej Mosnacek as a SELinux reviewer selinux: remove the wrong comment about multithreaded process handling selinux: introduce an initial SID for early boot processes ... commit eab23bc8a807dbd32ac4f20af4a146d1679f57a3 Merge: 9f2a635235823 4e8714b76613e Author: Linus Torvalds Date: Tue Jan 9 12:01:15 2024 -0800 Merge tag 'audit-pr-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "The audit updates are fairly minor with only two patches: - Send an audit ACK to userspace immediately upon receiving an auditd registration event as opposed to waiting until the registration has been fully processed and the audit backlog starts filling the netlink buffers. Sending the ACK earlier, as done here, is still safe as the operation should not fail at the point when the ACK is done, and doing so helps avoid the ACK being dropped in extreme situations. - Update the audit MAINTAINERS entry with additional information. There isn't anything in this update that should be new to regular contributors or list subscribers, but I'm pushing to start documenting our processes, conventions, etc. and this seems like an important part of that" * tag 'audit-pr-20240105' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: MAINTAINERS: update the audit entry audit: Send netlink ACK before setting connection in auditd_set commit 4f964cfef39d48a8e6748847df9a1ed310b96c4e Merge: a4dcb2f84be44 f0e5e1800204b Author: Stephen Boyd Date: Tue Jan 9 11:55:47 2024 -0800 Merge branch 'clk-rs9' into clk-next * clk-rs9: clk: rs9: Add support for 9FGV0841 clk: rs9: Replace model check with bitshift from chip data clk: rs9: Limit check to vendor ID in VID register dt-bindings: clk: rs9: Add 9FGV0841 commit a4dcb2f84be44da9e7ae0e420adcab1f6efb8de6 Merge: 23bd8c4ad1825 1fe15be1fb613 3a96393a46e78 b5be49db3d47e Author: Stephen Boyd Date: Tue Jan 9 11:55:06 2024 -0800 Merge branches 'clk-zynq', 'clk-xilinx' and 'clk-stm' into clk-next - Update Zynqmp driver for Versal NET platforms - Add clk driver for Versal clocking wizard IP * clk-zynq: drivers: clk: zynqmp: update divider round rate logic drivers: clk: zynqmp: calculate closest mux rate * clk-xilinx: clocking-wizard: Add support for versal clocking wizard dt-bindings: clock: xilinx: add versal compatible * clk-stm: dt-bindings: stm32: add clocks and reset binding for stm32mp25 platform clk: stm32mp1: use stm32mp13 reset driver clk: stm32mp1: move stm32mp1 clock driver into stm32 directory commit 23bd8c4ad182534ba4096ca657c27cdbe7a49aec Merge: 8066514dc53dd f1b591217fd0b 93beaa981a2d1 145916f6895ad 4b4719437d85f Author: Stephen Boyd Date: Tue Jan 9 11:52:49 2024 -0800 Merge branches 'clk-imx', 'clk-qcom', 'clk-amlogic' and 'clk-mediatek' into clk-next * clk-imx: clk: imx: pll14xx: change naming of fvco to fout clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks clk: imx: scu: Fix memory leak in __imx_clk_gpr_scu() dt-bindings: clock: support i.MX93 ANATOP clock module * clk-qcom: (41 commits) clk: qcom: dispcc-sm8650: Add test_ctl parameters to PLL config clk: qcom: gpucc-sm8650: Add test_ctl parameters to PLL config clk: qcom: dispcc-sm8550: Use the correct PLL configuration function clk: qcom: dispcc-sm8550: Update disp PLL settings clk: qcom: gpucc-sm8550: Update GPU PLL settings clk: qcom: gcc-sm8550: Mark RCGs shared where applicable clk: qcom: gcc-sm8550: use collapse-voting for PCIe GDSCs clk: qcom: gcc-sm8550: Mark the PCIe GDSCs votable clk: qcom: gcc-sm8550: Add the missing RETAIN_FF_ENABLE GDSC flag clk: qcom: camcc-sc8280xp: Prevent error pointer dereference clk: qcom: videocc-sm8150: Add runtime PM support clk: qcom: videocc-sm8150: Add missing PLL config property clk: qcom: videocc-sm8150: Update the videocc resets dt-bindings: clock: Update the videocc resets for sm8150 clk: qcom: rpmh: Add support for X1E80100 rpmh clocks clk: qcom: Add Global Clock controller (GCC) driver for X1E80100 dt-bindings: clock: qcom-rpmhcc: Add RPMHCC bindings for X1E80100 dt-bindings: clock: qcom: Add X1E80100 GCC clocks clk: qcom: Add ECPRICC driver support for QDU1000 and QRU1000 clk: qcom: branch: Add mem ops support for branch2 clocks ... * clk-amlogic: clk: meson: g12a: add CSI & ISP gates clocks clk: meson: g12a: add MIPI ISP clocks dt-bindings: clock: g12a-clkc: add MIPI ISP & CSI PHY clock ids clk: meson: g12a: add CTS_ENCL & CTS_ENCL_SEL clocks dt-bindings: clk: g12a-clkc: add CTS_ENCL clock ids * clk-mediatek: clk: mediatek: add drivers for MT7988 SoC clk: mediatek: add pcw_chg_bit control for PLLs of MT7988 dt-bindings: clock: mediatek: add clock controllers of MT7988 dt-bindings: reset: mediatek: add MT7988 ethwarp reset IDs dt-bindings: clock: mediatek: add MT7988 clock IDs clk: mediatek: mt8188-topckgen: Refactor parents for top_dp/edp muxes clk: mediatek: mt8195-topckgen: Refactor parents for top_dp/edp muxes clk: mediatek: clk-mux: Support custom parent indices for muxes dt-bindings: clock: brcm,kona-ccu: convert to YAML dt-bindings: arm: mediatek: move ethsys controller & convert to DT schema dt-bindings: Remove alt_ref from versal commit 8066514dc53dd649be6b24a7a92c3602d42357d7 Merge: 76a2ee33762e1 b08fa385937c1 b2adbc9cea752 5e3b5f31fc2c4 4287cd628f77d 5a72f0711151b Author: Stephen Boyd Date: Tue Jan 9 11:52:35 2024 -0800 Merge branches 'clk-versa', 'clk-silabs', 'clk-samsung', 'clk-starfive' and 'clk-sophgo' into clk-next - Add glitch free PLL setting support to si5351 clk driver * clk-versa: clk: versaclock3: Drop ret variable clk: versaclock3: Add missing space between ')' and '{' clk: versaclock3: Use u8 return type for get_parent() callback clk: versaclock3: Avoid unnecessary padding clk: versaclock3: Update vc3_get_div() to avoid divide by zero * clk-silabs: clk: si5351: allow PLLs to be adjusted without reset dt-bindings: clock: si5351: add PLL reset mode property dt-bindings: clock: si5351: convert to yaml * clk-samsung: clk: samsung: Improve kernel-doc comments clk: samsung: Fix kernel-doc comments * clk-starfive: clk: starfive: jh7100: Add CLK_SET_RATE_PARENT to gmac_tx clk: starfive: Add flags argument to JH71X0__MUX macro * clk-sophgo: dt-bindings: clock: sophgo: Add clock controller of CV1800 series SoC commit 76a2ee33762e18eef15f2677f70b251a1839f0c5 Merge: c46104f0c53d0 723facbbb5604 72449a9035f80 ee0cf5e07f44a Author: Stephen Boyd Date: Tue Jan 9 11:52:28 2024 -0800 Merge branches 'clk-renesas', 'clk-rockchip', 'clk-allwinner' and 'clk-cleanup' into clk-next * clk-renesas: clk: renesas: r9a08g045: Add clock and reset support for ETH0 and ETH1 clk: renesas: rzg2l: Check reset monitor registers clk: renesas: r9a08g045: Add IA55 pclk and its reset clk: renesas: rzg2l-cpg: Reuse code in rzg2l_cpg_reset() clk: renesas: r8a779g0: Add PCIe clocks clk: renesas: r8a779g0: Add EtherTSN clock * clk-rockchip: clk: rockchip: rk3568: Mark pclk_usb as critical clk: rockchip: rk3568: Add PLL rate for 126.4MHz clk: rockchip: rk3568: Add PLL rate for 115.2MHz * clk-allwinner: clk: sunxi-ng: nkm: remove redundant initialization of tmp_parent * clk-cleanup: clk: fixed-rate: fix clk_hw_register_fixed_rate_with_accuracy_parent_hw clk: si5341: fix an error code problem in si5341_output_clk_set_rate clk: microchip: mpfs-ccc: replace include of asm-generic/errno-base.h clk: rs9: Fix DIF OEn bit placement on 9FGV0241 clk: mmp: pxa168: Fix memory leak in pxa168_clk_init() clk: hi3620: Fix memory leak in hi3620_mmc_clk_init() clk: sp7021: fix return value check in sp7021_clk_probe() commit 9f2a635235823cf016eb8af0aeb3c0b2b25cea64 Merge: fb46e22a9e386 6dff315972640 Author: Linus Torvalds Date: Tue Jan 9 11:46:20 2024 -0800 Merge tag 'mm-nonmm-stable-2024-01-09-10-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull non-MM updates from Andrew Morton: "Quite a lot of kexec work this time around. Many singleton patches in many places. The notable patch series are: - nilfs2 folio conversion from Matthew Wilcox in 'nilfs2: Folio conversions for file paths'. - Additional nilfs2 folio conversion from Ryusuke Konishi in 'nilfs2: Folio conversions for directory paths'. - IA64 remnant removal in Heiko Carstens's 'Remove unused code after IA-64 removal'. - Arnd Bergmann has enabled the -Wmissing-prototypes warning everywhere in 'Treewide: enable -Wmissing-prototypes'. This had some followup fixes: - Nathan Chancellor has cleaned up the hexagon build in the series 'hexagon: Fix up instances of -Wmissing-prototypes'. - Nathan also addressed some s390 warnings in 's390: A couple of fixes for -Wmissing-prototypes'. - Arnd Bergmann addresses the same warnings for MIPS in his series 'mips: address -Wmissing-prototypes warnings'. - Baoquan He has made kexec_file operate in a top-down-fitting manner similar to kexec_load in the series 'kexec_file: Load kernel at top of system RAM if required' - Baoquan He has also added the self-explanatory 'kexec_file: print out debugging message if required'. - Some checkstack maintenance work from Tiezhu Yang in the series 'Modify some code about checkstack'. - Douglas Anderson has disentangled the watchdog code's logging when multiple reports are occurring simultaneously. The series is 'watchdog: Better handling of concurrent lockups'. - Yuntao Wang has contributed some maintenance work on the crash code in 'crash: Some cleanups and fixes'" * tag 'mm-nonmm-stable-2024-01-09-10-33' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (157 commits) crash_core: fix and simplify the logic of crash_exclude_mem_range() x86/crash: use SZ_1M macro instead of hardcoded value x86/crash: remove the unused image parameter from prepare_elf_headers() kdump: remove redundant DEFAULT_CRASH_KERNEL_LOW_SIZE scripts/decode_stacktrace.sh: strip unexpected CR from lines watchdog: if panicking and we dumped everything, don't re-enable dumping watchdog/hardlockup: use printk_cpu_sync_get_irqsave() to serialize reporting watchdog/softlockup: use printk_cpu_sync_get_irqsave() to serialize reporting watchdog/hardlockup: adopt softlockup logic avoiding double-dumps kexec_core: fix the assignment to kimage->control_page x86/kexec: fix incorrect end address passed to kernel_ident_mapping_init() lib/trace_readwrite.c:: replace asm-generic/io with linux/io nilfs2: cpfile: fix some kernel-doc warnings stacktrace: fix kernel-doc typo scripts/checkstack.pl: fix no space expression between sp and offset x86/kexec: fix incorrect argument passed to kexec_dprintk() x86/kexec: use pr_err() instead of kexec_dprintk() when an error occurs nilfs2: add missing set_freezable() for freezable kthread kernel: relay: remove relay_file_splice_read dead code, doesn't work docs: submit-checklist: remove all of "make namespacecheck" ... commit fb46e22a9e3863e08aef8815df9f17d0f4b9aede Merge: d30e51aa7b1f6 5e0a760b44417 Author: Linus Torvalds Date: Tue Jan 9 11:18:47 2024 -0800 Merge tag 'mm-stable-2024-01-08-15-31' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Pull MM updates from Andrew Morton: "Many singleton patches against the MM code. The patch series which are included in this merge do the following: - Peng Zhang has done some mapletree maintainance work in the series 'maple_tree: add mt_free_one() and mt_attr() helpers' 'Some cleanups of maple tree' - In the series 'mm: use memmap_on_memory semantics for dax/kmem' Vishal Verma has altered the interworking between memory-hotplug and dax/kmem so that newly added 'device memory' can more easily have its memmap placed within that newly added memory. - Matthew Wilcox continues folio-related work (including a few fixes) in the patch series 'Add folio_zero_tail() and folio_fill_tail()' 'Make folio_start_writeback return void' 'Fix fault handler's handling of poisoned tail pages' 'Convert aops->error_remove_page to ->error_remove_folio' 'Finish two folio conversions' 'More swap folio conversions' - Kefeng Wang has also contributed folio-related work in the series 'mm: cleanup and use more folio in page fault' - Jim Cromie has improved the kmemleak reporting output in the series 'tweak kmemleak report format'. - In the series 'stackdepot: allow evicting stack traces' Andrey Konovalov to permits clients (in this case KASAN) to cause eviction of no longer needed stack traces. - Charan Teja Kalla has fixed some accounting issues in the page allocator's atomic reserve calculations in the series 'mm: page_alloc: fixes for high atomic reserve caluculations'. - Dmitry Rokosov has added to the samples/ dorectory some sample code for a userspace memcg event listener application. See the series 'samples: introduce cgroup events listeners'. - Some mapletree maintanance work from Liam Howlett in the series 'maple_tree: iterator state changes'. - Nhat Pham has improved zswap's approach to writeback in the series 'workload-specific and memory pressure-driven zswap writeback'. - DAMON/DAMOS feature and maintenance work from SeongJae Park in the series 'mm/damon: let users feed and tame/auto-tune DAMOS' 'selftests/damon: add Python-written DAMON functionality tests' 'mm/damon: misc updates for 6.8' - Yosry Ahmed has improved memcg's stats flushing in the series 'mm: memcg: subtree stats flushing and thresholds'. - In the series 'Multi-size THP for anonymous memory' Ryan Roberts has added a runtime opt-in feature to transparent hugepages which improves performance by allocating larger chunks of memory during anonymous page faults. - Matthew Wilcox has also contributed some cleanup and maintenance work against eh buffer_head code int he series 'More buffer_head cleanups'. - Suren Baghdasaryan has done work on Andrea Arcangeli's series 'userfaultfd move option'. UFFDIO_MOVE permits userspace heap compaction algorithms to move userspace's pages around rather than UFFDIO_COPY'a alloc/copy/free. - Stefan Roesch has developed a 'KSM Advisor', in the series 'mm/ksm: Add ksm advisor'. This is a governor which tunes KSM's scanning aggressiveness in response to userspace's current needs. - Chengming Zhou has optimized zswap's temporary working memory use in the series 'mm/zswap: dstmem reuse optimizations and cleanups'. - Matthew Wilcox has performed some maintenance work on the writeback code, both code and within filesystems. The series is 'Clean up the writeback paths'. - Andrey Konovalov has optimized KASAN's handling of alloc and free stack traces for secondary-level allocators, in the series 'kasan: save mempool stack traces'. - Andrey also performed some KASAN maintenance work in the series 'kasan: assorted clean-ups'. - David Hildenbrand has gone to town on the rmap code. Cleanups, more pte batching, folio conversions and more. See the series 'mm/rmap: interface overhaul'. - Kinsey Ho has contributed some maintenance work on the MGLRU code in the series 'mm/mglru: Kconfig cleanup'. - Matthew Wilcox has contributed lruvec page accounting code cleanups in the series 'Remove some lruvec page accounting functions'" * tag 'mm-stable-2024-01-08-15-31' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (361 commits) mm, treewide: rename MAX_ORDER to MAX_PAGE_ORDER mm, treewide: introduce NR_PAGE_ORDERS selftests/mm: add separate UFFDIO_MOVE test for PMD splitting selftests/mm: skip test if application doesn't has root privileges selftests/mm: conform test to TAP format output selftests: mm: hugepage-mmap: conform to TAP format output selftests/mm: gup_test: conform test to TAP format output mm/selftests: hugepage-mremap: conform test to TAP format output mm/vmstat: move pgdemote_* out of CONFIG_NUMA_BALANCING mm: zsmalloc: return -ENOSPC rather than -EINVAL in zs_malloc while size is too large mm/memcontrol: remove __mod_lruvec_page_state() mm/khugepaged: use a folio more in collapse_file() slub: use a folio in __kmalloc_large_node slub: use folio APIs in free_large_kmalloc() slub: use alloc_pages_node() in alloc_slab_page() mm: remove inc/dec lruvec page state functions mm: ratelimit stat flush from workingset shrinker kasan: stop leaking stack trace handles mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE mm/mglru: add dummy pmd_dirty() ... commit b8b2711336f03ece539de61479d6ffc44fb603d3 Author: Alexandre Ghiti Date: Wed Dec 13 14:40:27 2023 +0100 riscv: Fix set_direct_map_default_noflush() to reset _PAGE_EXEC When resetting the linear mapping permissions, we must make sure that we clear the X bit so that do not end up with WX mappings (since we set PAGE_KERNEL). Fixes: 395a21ff859c ("riscv: add ARCH_HAS_SET_DIRECT_MAP support") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20231213134027.155327-3-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 749b94b08005929bbc636df21a23322733166e35 Author: Alexandre Ghiti Date: Wed Dec 13 14:40:26 2023 +0100 riscv: Fix module_alloc() that did not reset the linear mapping permissions After unloading a module, we must reset the linear mapping permissions, see the example below: Before unloading a module: 0xffffaf809d65d000-0xffffaf809d6dc000 0x000000011d65d000 508K PTE . .. .. D A G . . W R V 0xffffaf809d6dc000-0xffffaf809d6dd000 0x000000011d6dc000 4K PTE . .. .. D A G . . . R V 0xffffaf809d6dd000-0xffffaf809d6e1000 0x000000011d6dd000 16K PTE . .. .. D A G . . W R V 0xffffaf809d6e1000-0xffffaf809d6e7000 0x000000011d6e1000 24K PTE . .. .. D A G . X . R V After unloading a module: 0xffffaf809d65d000-0xffffaf809d6e1000 0x000000011d65d000 528K PTE . .. .. D A G . . W R V 0xffffaf809d6e1000-0xffffaf809d6e7000 0x000000011d6e1000 24K PTE . .. .. D A G . X W R V The last mapping is not reset and we end up with WX mappings in the linear mapping. So add VM_FLUSH_RESET_PERMS to our module_alloc() definition. Fixes: 0cff8bff7af8 ("riscv: avoid the PIC offset of static percpu data in module beyond 2G limits") Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20231213134027.155327-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit c29fc621e1a49949a14c7fa031dd4760087bfb29 Author: Alexandre Ghiti Date: Tue Dec 12 20:54:00 2023 +0100 riscv: Fix wrong usage of lm_alias() when splitting a huge linear mapping lm_alias() can only be used on kernel mappings since it explicitly uses __pa_symbol(), so simply fix this by checking where the address belongs to before. Fixes: 311cd2f6e253 ("riscv: Fix set_memory_XX() and set_direct_map_XX() by splitting huge linear mappings") Reported-by: syzbot+afb726d49f84c8d95ee1@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-riscv/000000000000620dd0060c02c5e1@google.com/ Signed-off-by: Alexandre Ghiti Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20231212195400.128457-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 420370f3ae3d3b883813fd3051a38805160b2b9f Author: Alexandre Ghiti Date: Thu Dec 14 10:19:26 2023 +0100 riscv: Check if the code to patch lies in the exit section Otherwise we fall through to vmalloc_to_page() which panics since the address does not lie in the vmalloc region. Fixes: 043cb41a85de ("riscv: introduce interfaces to patch kernel code") Signed-off-by: Alexandre Ghiti Reviewed-by: Charlie Jenkins Link: https://lore.kernel.org/r/20231214091926.203439-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 3fc74c65b367476874da5fe6f633398674b78e5a Author: Namjae Jeon Date: Sun Jan 7 21:26:17 2024 +0900 ksmbd: send lease break notification on FILE_RENAME_INFORMATION Send lease break notification on FILE_RENAME_INFORMATION request. This patch fix smb2.lease.v2_epoch2 test failure. Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit d592a9158a112d419f341f035d18d02f8d232def Author: Namjae Jeon Date: Sun Jan 7 21:24:07 2024 +0900 ksmbd: don't allow O_TRUNC open on read-only share When file is changed using notepad on read-only share(read_only = yes in ksmbd.conf), There is a problem where existing data is truncated. notepad in windows try to O_TRUNC open(FILE_OVERWRITE_IF) and all data in file is truncated. This patch don't allow O_TRUNC open on read-only share and add KSMBD_TREE_CONN_FLAG_WRITABLE check in smb2_set_info(). Cc: stable@vger.kernel.org Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 4dde83569832f9377362e50f7748463340c5db6b Author: Christian A. Ehrhardt Date: Fri Dec 29 11:54:11 2023 +0100 of: Fix double free in of_parse_phandle_with_args_map In of_parse_phandle_with_args_map() the inner loop that iterates through the map entries calls of_node_put(new) to free the reference acquired by the previous iteration of the inner loop. This assumes that the value of "new" is NULL on the first iteration of the inner loop. Make sure that this is true in all iterations of the outer loop by setting "new" to NULL after its value is assigned to "cur". Extend the unittest to detect the double free and add an additional test case that actually triggers this path. Fixes: bd6f2fd5a1 ("of: Support parsing phandle argument lists through a nexus node") Cc: Stephen Boyd Signed-off-by: "Christian A. Ehrhardt" Link: https://lore.kernel.org/r/20231229105411.1603434-1-lk@c--e.de Signed-off-by: Rob Herring commit 8d99c1131d9d03053b7b1e1245b8f6e6846d9c69 Author: Randy Dunlap Date: Fri Dec 15 19:28:14 2023 -0800 ksmbd: vfs: fix all kernel-doc warnings Fix all kernel-doc warnings in vfs.c: vfs.c:54: warning: Function parameter or member 'parent' not described in 'ksmbd_vfs_lock_parent' vfs.c:54: warning: Function parameter or member 'child' not described in 'ksmbd_vfs_lock_parent' vfs.c:54: warning: No description found for return value of 'ksmbd_vfs_lock_parent' vfs.c:372: warning: Function parameter or member 'fp' not described in 'ksmbd_vfs_read' vfs.c:372: warning: Excess function parameter 'fid' description in 'ksmbd_vfs_read' vfs.c:489: warning: Function parameter or member 'fp' not described in 'ksmbd_vfs_write' vfs.c:489: warning: Excess function parameter 'fid' description in 'ksmbd_vfs_write' vfs.c:555: warning: Function parameter or member 'path' not described in 'ksmbd_vfs_getattr' vfs.c:555: warning: Function parameter or member 'stat' not described in 'ksmbd_vfs_getattr' vfs.c:555: warning: Excess function parameter 'work' description in 'ksmbd_vfs_getattr' vfs.c:555: warning: Excess function parameter 'fid' description in 'ksmbd_vfs_getattr' vfs.c:555: warning: Excess function parameter 'attrs' description in 'ksmbd_vfs_getattr' vfs.c:572: warning: Function parameter or member 'p_id' not described in 'ksmbd_vfs_fsync' vfs.c:595: warning: Function parameter or member 'work' not described in 'ksmbd_vfs_remove_file' vfs.c:595: warning: Function parameter or member 'path' not described in 'ksmbd_vfs_remove_file' vfs.c:595: warning: Excess function parameter 'name' description in 'ksmbd_vfs_remove_file' vfs.c:633: warning: Function parameter or member 'work' not described in 'ksmbd_vfs_link' vfs.c:805: warning: Function parameter or member 'fp' not described in 'ksmbd_vfs_truncate' vfs.c:805: warning: Excess function parameter 'fid' description in 'ksmbd_vfs_truncate' vfs.c:846: warning: Excess function parameter 'size' description in 'ksmbd_vfs_listxattr' vfs.c:953: warning: Function parameter or member 'option' not described in 'ksmbd_vfs_set_fadvise' vfs.c:953: warning: Excess function parameter 'options' description in 'ksmbd_vfs_set_fadvise' vfs.c:1167: warning: Function parameter or member 'um' not described in 'ksmbd_vfs_lookup_in_dir' vfs.c:1203: warning: Function parameter or member 'work' not described in 'ksmbd_vfs_kern_path_locked' vfs.c:1641: warning: No description found for return value of 'ksmbd_vfs_init_kstat' Signed-off-by: Randy Dunlap Cc: Namjae Jeon Cc: Steve French Cc: Sergey Senozhatsky Cc: Tom Talpey Cc: linux-cifs@vger.kernel.org Acked-by: Namjae Jeon Signed-off-by: Steve French commit b4068f1ef36d634ef44ece894738284d756d6627 Author: Randy Dunlap Date: Fri Dec 15 19:03:57 2023 -0800 ksmbd: auth: fix most kernel-doc warnings Fix 12 of 17 kernel-doc warnings in auth.c: auth.c:221: warning: Function parameter or member 'conn' not described in 'ksmbd_auth_ntlmv2' auth.c:221: warning: Function parameter or member 'cryptkey' not described in 'ksmbd_auth_ntlmv2' auth.c:305: warning: Function parameter or member 'blob_len' not described in 'ksmbd_decode_ntlmssp_auth_blob' auth.c:305: warning: Function parameter or member 'conn' not described in 'ksmbd_decode_ntlmssp_auth_blob' auth.c:305: warning: Excess function parameter 'usr' description in 'ksmbd_decode_ntlmssp_auth_blob' auth.c:385: warning: Function parameter or member 'blob_len' not described in 'ksmbd_decode_ntlmssp_neg_blob' auth.c:385: warning: Function parameter or member 'conn' not described in 'ksmbd_decode_ntlmssp_neg_blob' auth.c:385: warning: Excess function parameter 'rsp' description in 'ksmbd_decode_ntlmssp_neg_blob' auth.c:385: warning: Excess function parameter 'sess' description in 'ksmbd_decode_ntlmssp_neg_blob' auth.c:413: warning: Function parameter or member 'conn' not described in 'ksmbd_build_ntlmssp_challenge_blob' auth.c:413: warning: Excess function parameter 'rsp' description in 'ksmbd_build_ntlmssp_challenge_blob' auth.c:413: warning: Excess function parameter 'sess' description in 'ksmbd_build_ntlmssp_challenge_blob' The other 5 are only present when a W=1 kernel build is done or when scripts/kernel-doc is run with -Wall. They are: auth.c:81: warning: No description found for return value of 'ksmbd_gen_sess_key' auth.c:385: warning: No description found for return value of 'ksmbd_decode_ntlmssp_neg_blob' auth.c:413: warning: No description found for return value of 'ksmbd_build_ntlmssp_challenge_blob' auth.c:577: warning: No description found for return value of 'ksmbd_sign_smb2_pdu' auth.c:628: warning: No description found for return value of 'ksmbd_sign_smb3_pdu' Signed-off-by: Randy Dunlap Cc: Namjae Jeon Cc: Steve French Cc: Sergey Senozhatsky Cc: Tom Talpey Cc: linux-cifs@vger.kernel.org Acked-by: Namjae Jeon Signed-off-by: Steve French commit ebfee7ad2722f84064d241b5319a7085b881b584 Author: Christophe JAILLET Date: Thu Dec 14 21:50:55 2023 +0100 ksmbd: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_range() is inclusive. So change a 0xFFFFFFFF into a 0xFFFFFFFE in order to keep the same behavior. Signed-off-by: Christophe JAILLET Acked-by: Namjae Jeon Signed-off-by: Steve French commit b6e9a44e99603fe10e1d78901fdd97681a539612 Author: Namjae Jeon Date: Fri Dec 15 08:35:00 2023 +0900 ksmbd: don't increment epoch if current state and request state are same If existing lease state and request state are same, don't increment epoch in create context. Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit 6fc0a265e1b932e5e97a038f99e29400a93baad0 Author: Namjae Jeon Date: Fri Dec 15 08:33:57 2023 +0900 ksmbd: fix potential circular locking issue in smb2_set_ea() smb2_set_ea() can be called in parent inode lock range. So add get_write argument to smb2_set_ea() not to call nested mnt_want_write(). Signed-off-by: Namjae Jeon Signed-off-by: Steve French commit bb05367a66a9990d2c561282f5620bb1dbe40c28 Author: Namjae Jeon Date: Fri Dec 15 08:33:11 2023 +0900 ksmbd: set v2 lease version on lease upgrade If file opened with v2 lease is upgraded with v1 lease, smb server should response v2 lease create context to client. This patch fix smb2.lease.v2_epoch2 test failure. This test case assumes the following scenario: 1. smb2 create with v2 lease(R, LEASE1 key) 2. smb server return smb2 create response with v2 lease context(R, LEASE1 key, epoch + 1) 3. smb2 create with v1 lease(RH, LEASE1 key) 4. smb server return smb2 create response with v2 lease context(RH, LEASE1 key, epoch + 2) i.e. If same client(same lease key) try to open a file that is being opened with v2 lease with v1 lease, smb server should return v2 lease. Signed-off-by: Namjae Jeon Acked-by: Tom Talpey Signed-off-by: Steve French commit 516b3eb8c8065f7465f87608d37a7ed08298c7a5 Author: Li Nan Date: Fri Dec 8 14:56:47 2023 +0800 ksmbd: validate the zero field of packet header The SMB2 Protocol requires that "The first byte of the Direct TCP transport packet header MUST be zero (0x00)"[1]. Commit 1c1bcf2d3ea0 ("ksmbd: validate smb request protocol id") removed the validation of this 1-byte zero. Add the validation back now. [1]: [MS-SMB2] - v20230227, page 30. https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-SMB2/%5bMS-SMB2%5d-230227.pdf Fixes: 1c1bcf2d3ea0 ("ksmbd: validate smb request protocol id") Signed-off-by: Li Nan Acked-by: Tom Talpey Acked-by: Namjae Jeon Signed-off-by: Steve French commit d30e51aa7b1f6fa7dd78d4598d1e4c047fcc3fb9 Merge: 9f8413c4a66f2 61d7e367f8bcc Author: Linus Torvalds Date: Tue Jan 9 10:36:07 2024 -0800 Merge tag 'slab-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab Pull slab updates from Vlastimil Babka: - SLUB: delayed freezing of CPU partial slabs (Chengming Zhou) Freezing is an operation involving double_cmpxchg() that makes a slab exclusive for a particular CPU. Chengming noticed that we use it also in situations where we are not yet installing the slab as the CPU slab, because freezing also indicates that the slab is not on the shared list. This results in redundant freeze/unfreeze operation and can be avoided by marking separately the shared list presence by reusing the PG_workingset flag. This approach neatly avoids the issues described in 9b1ea29bc0d7 ("Revert "mm, slub: consider rest of partial list if acquire_slab() fails"") as we can now grab a slab from the shared list in a quick and guaranteed way without the cmpxchg_double() operation that amplifies the lock contention and can fail. As a result, lkp has reported 34.2% improvement of stress-ng.rawudp.ops_per_sec - SLAB removal and SLUB cleanups (Vlastimil Babka) The SLAB allocator has been deprecated since 6.5 and nobody has objected so far. We agreed at LSF/MM to wait until the next LTS, which is 6.6, so we should be good to go now. This doesn't yet erase all traces of SLAB outside of mm/ so some dead code, comments or documentation remain, and will be cleaned up gradually (some series are already in the works). Removing the choice of allocators has already allowed to simplify and optimize the code wiring up the kmalloc APIs to the SLUB implementation. * tag 'slab-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: (34 commits) mm/slub: free KFENCE objects in slab_free_hook() mm/slub: handle bulk and single object freeing separately mm/slub: introduce __kmem_cache_free_bulk() without free hooks mm/slub: fix bulk alloc and free stats mm/slub: optimize free fast path code layout mm/slub: optimize alloc fastpath code layout mm/slub: remove slab_alloc() and __kmem_cache_alloc_lru() wrappers mm/slab: move kmalloc() functions from slab_common.c to slub.c mm/slab: move kmalloc_slab() to mm/slab.h mm/slab: move kfree() from slab_common.c to slub.c mm/slab: move struct kmem_cache_node from slab.h to slub.c mm/slab: move memcg related functions from slab.h to slub.c mm/slab: move pre/post-alloc hooks from slab.h to slub.c mm/slab: consolidate includes in the internal mm/slab.h mm/slab: move the rest of slub_def.h to mm/slab.h mm/slab: move struct kmem_cache_cpu declaration to slub.c mm/slab: remove mm/slab.c and slab_def.h mm/mempool/dmapool: remove CONFIG_DEBUG_SLAB ifdefs mm/slab: remove CONFIG_SLAB code from slab common code cpu/hotplug: remove CPUHP_SLAB_PREPARE hooks ... commit f9cfe7e7f96a9414a17d596e288693c4f2325d49 Author: Yu Kuai Date: Tue Jan 9 21:39:57 2024 +0800 md: Fix md_seq_ops() regressions Commit cf1b6d4441ff ("md: simplify md_seq_ops") introduce following regressions: 1) If list all_mddevs is emptly, personalities and unused devices won't be showed to user anymore. 2) If seq_file buffer overflowed from md_seq_show(), then md_seq_start() will be called again, hence personalities will be showed to user again. 3) If seq_file buffer overflowed from md_seq_stop(), seq_read_iter() doesn't handle this, hence unused devices won't be showed to user. Fix above problems by printing personalities and unused devices in md_seq_show(). Fixes: cf1b6d4441ff ("md: simplify md_seq_ops") Cc: stable@vger.kernel.org # v6.7+ Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20240109133957.2975272-1-yukuai1@huaweicloud.com commit 89fe46019a62bc1d0cb49c9615cb3520096c4bc1 Author: Maíra Canal Date: Tue Jan 9 08:30:40 2024 -0300 drm/v3d: Fix support for register debugging on the RPi 4 RPi 4 uses V3D 4.2, which is currently not supported by the register definition stated at `v3d_core_reg_defs`. We should be able to support V3D 4.2, therefore, change the maximum version of the register definition to 42, not 41. Fixes: 0ad5bc1ce463 ("drm/v3d: fix up register addresses for V3D 7.x") Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20240109113126.929446-1-mcanal@igalia.com commit 5e3ef45468196498ad1a7132f274d6709e3a1146 Author: André Draszik Date: Wed Dec 20 14:55:37 2023 +0000 dt-bindings: ignore paths outside kernel for DT_SCHEMA_FILES If the location of the kernel sources contains the string that we're filtering for using DT_SCHEMA_FILES, then all schemas will currently be matched, returned and checked, not just the ones we actually expected. As an example, if the kernel sources happen to be below a directory 'google', and DT_SCHEMA_FILES=google, everything is checked. More common examples might be having the sources below people's home directories that contain the string st or arm and then searching for those. The list is endless. Fix this by only matching for schemas below the kernel source's bindings directory. Note that I opted for the implementation here so as to not having to deal with escaping DT_SCHEMA_FILES, which would have been the alternative if the grep match itself had been updated. Cc: Masahiro Yamada Signed-off-by: André Draszik Link: https://lore.kernel.org/r/20231220145537.2163811-1-andre.draszik@linaro.org Signed-off-by: Rob Herring commit 09c49315f4c764366fdcf8ff096dd6fad8b8577c Author: Muzammil Ashraf Date: Tue Dec 19 11:23:17 2023 +0500 drivers: of: Fixed kernel doc warning property.c:1220 : Fixed excess struct member definition warning property.c:444 : Fixed missing a blank line after declarations Signed-off-by: Muzammil Ashraf Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20231219062317.17650-1-muzammil@dreambigsemi.com Signed-off-by: Rob Herring commit 3f4cc70d89099f8c40b6838a13ccac322dfa0a38 Author: Lukas Wunner Date: Sun Dec 17 11:13:34 2023 +0100 dt-bindings: tpm: Document Microsoft fTPM bindings A driver for Microsoft's firmware-based Trusted Platform Module (fTPM) was merged with commit 09e574831b27 ("tpm/tpm_ftpm_tee: A driver for firmware TPM running inside TEE"), but its devicetree bindings were not. This is the only remaining undocumented compatible string for a TPM, so add a DT schema based on the patch linked below. Link: https://lore.kernel.org/all/20190409184958.7476-2-sashal@kernel.org/ Signed-off-by: Lukas Wunner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/99523409eb5aec9276055ff358ae6f2ceb10be6d.1702806810.git.lukas@wunner.de Signed-off-by: Rob Herring commit cd6366c0c9996ff8d33c1f68d58869e0e31de4d9 Author: Lukas Wunner Date: Sun Dec 17 11:13:33 2023 +0100 dt-bindings: tpm: Convert IBM vTPM bindings to DT schema Convert the devicetree bindings for the IBM Virtual Trusted Platform Module to DT schema. Drop properties which are already documented in tpm-common.yaml. Document the "IBM,vtpm20" compatible string introduced by commit 18b3670d79ae ("tpm: ibmvtpm: Add support for TPM2"). Signed-off-by: Lukas Wunner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/5c41e045dfe7cc3f27dd41c08c62ed8c4a90d8a4.1702806810.git.lukas@wunner.de Signed-off-by: Rob Herring commit d3b8b0855a1181b5a9f8ef58022474f34cba09fd Author: Lukas Wunner Date: Sun Dec 17 11:13:32 2023 +0100 dt-bindings: tpm: Convert Google Cr50 bindings to DT schema Convert the devicetree bindings for the Google Security Chip H1 running Cr50 firmware to DT schema. The chip can be attached to SPI or I²C. Existing devicetrees use the same "google,cr50" compatible string for both cases without additionally specifying a generic "tcg,tpm_tis-spi" or "tcg,tpm-tis-i2c" compatible. The chip therefore cannot be documented in the tcg,tpm_tis-spi.yaml and tcg,tpm-tis-i2c.yaml schemas: The validator would select both of them and complain about SPI properties when the chip is an I²C peripheral. So document the chip in a schema of its own which includes both, SPI and I²C properties by reference. Signed-off-by: Lukas Wunner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/52635205818ab201cacb0c0f37c7fa48149c7f8e.1702806810.git.lukas@wunner.de Signed-off-by: Rob Herring commit 26c9d152ebf3a16661f2d2a619bd71099c71299d Author: Lukas Wunner Date: Sun Dec 17 11:13:31 2023 +0100 dt-bindings: tpm: Consolidate TCG TIS bindings A significant number of Trusted Platform Modules conform to the "TIS" specification published by the Trusted Computing Group ("TCG PC Client Specific TPM Interface Specification"). These chips typically use an SPI, I²C or LPC bus as transport (via MMIO in the latter case). Some of them even support multiple of those buses (selectable through a config strap) or the same chip is available in multiple SKUs, each with a different bus interface. The devicetree bindings for these TPMs have not been converted to DT schema yet and are spread out across 3 generic files and 2 chip-specific files. A few TPM compatible strings were added to trivial-devices.yaml even though additional properties are documented in the plaintext bindings. Consolidate the devicetree bindings into 3 yaml files, one per bus. Move common properties to a separate tpm-common.yaml. Document compatible strings which are supported by the TPM TIS driver but were neglected to be added to the devicetree bindings. Document the memory-region property recently introduced by commit 1e2714bb83fc ("tpm: Add reserved memory event log"). Signed-off-by: Lukas Wunner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/953fd4c7519030db88e5b5e12ab6307414ebdd21.1702806810.git.lukas@wunner.de Signed-off-by: Rob Herring commit 4ec295efef1ac4969a9667b40e1e91fa45d90c4a Author: Alex Bee Date: Fri Dec 22 18:41:52 2023 +0100 dt-bindings: display: rockchip,inno-hdmi: Document RK3128 compatible The integration for this SoC is different from the currently existing: It needs it's PHY's reference clock rate to calculate the DDC bus frequency correctly. The controller is also part of a powerdomain, so this gets added as an mandatory property for this variant. Signed-off-by: Alex Bee Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231222174220.55249-2-knaerzche@gmail.com Signed-off-by: Rob Herring commit 76156d06769b20fed37d09b505808a74433b5e55 Author: Mao Jinlong Date: Sat Dec 9 23:26:28 2023 -0800 dt-bindings: arm: Add remote etm dt-binding Remote ETM(Embedded Trace Macrocell) is to capture information of the executed processor instructions of remote processors like modem. Add new coresight-remote-etm.yaml file describing the bindings required to define coresight remote etm in the device trees. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mao Jinlong Link: https://lore.kernel.org/r/20231210072633.4243-2-quic_jinlmao@quicinc.com Signed-off-by: Rob Herring commit 30e0bbf50a704750d86c986744b7fb1e6f4c3c1d Author: Rob Herring Date: Wed Dec 13 16:42:19 2023 -0600 dt-bindings: mmc: sdhci-pxa: Fix 'regs' typo The correct property name is 'reg' not 'regs'. Fixes: ae5c0585dfc2 ("dt-bindings: mmc: Convert sdhci-pxa to json-schema") Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231213224219.2191721-1-robh@kernel.org Signed-off-by: Rob Herring commit a1499b7541cc26bac360cf07e49fd1e2ab3dd17f Author: Rob Herring Date: Thu Dec 14 13:55:52 2023 -0600 media: dt-bindings: samsung,s5p-mfc: Fix iommu properties schemas The iommus and iommu-names property schemas have several issues. First, 'iommus-names' in the if/then schemas is the wrong name. As all the names are the same, they can be defined at the top level instead. Then the if/then schemas just need to define how many entries. The iommus if/then schemas are also redundant. Best I can tell, the desire was to require 2 entries for "samsung,exynos5433-mfc", "samsung,mfc-v5", "samsung,mfc-v6", and "samsung,mfc-v8". Reviewed-by: Krzysztof Kozlowski Reviewed-by: Aakarsh Jain Link: https://lore.kernel.org/r/20231214195553.862920-1-robh@kernel.org Signed-off-by: Rob Herring commit 9de97e2a4e3afc6454bcb7be28beb2f20c7559a6 Author: Michael Trimarchi Date: Wed Dec 13 15:03:44 2023 +0100 dt-bindings: display: panel: Add synaptics r63353 panel controller Add documentation for "synaptics,r63353" panel. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231213140437.2769508-4-dario.binacchi@amarulasolutions.com Signed-off-by: Rob Herring commit ff5912b96f039cc3609eb1d8edc20dfccbfb3a25 Author: David Heidelberg Date: Sun Dec 3 00:47:17 2023 +0100 dt-bindings: arm: merge qcom,idle-state with idle-state Merge Qualcomm-specific idle-state binding with generic one. Signed-off-by: David Heidelberg Link: https://lore.kernel.org/r/20231202234832.155306-1-david@ixit.cz Signed-off-by: Rob Herring commit 3dc2f209208dddc73ffd1d817081711343de3242 Author: ZhangPeng Date: Tue Jan 9 10:45:47 2024 +0800 swiotlb: check alloc_size before the allocation of a new memory pool The allocation request for swiotlb contiguous memory greater than 128*2KB cannot be fulfilled because it exceeds the maximum contiguous memory limit. If the swiotlb memory we allocate is larger than 128*2KB, swiotlb_find_slots() will still schedule the allocation of a new memory pool, which will increase memory overhead. Fix it by adding a check with alloc_size no more than 128*2KB before scheduling the allocation of a new memory pool in swiotlb_find_slots(). Signed-off-by: ZhangPeng Reviewed-by: Petr Tesarik Signed-off-by: Christoph Hellwig commit a7fe0881d9b78d402bbd9067dd4503a57c57a1d9 Merge: 9b0f510971470 ac631873c9e7a Author: Paolo Abeni Date: Tue Jan 9 12:42:00 2024 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Merge in late fixes to prepare for the 6.8 net-next PR No conflicts. Signed-off-by: Paolo Abeni commit 3be8fb1bc6fc10b6c8e79052126fa5a423698fd1 Author: Lorenzo Pieralisi Date: Wed Dec 27 12:00:37 2023 +0100 ACPICA: MADT: Add new MADT GICC/GICR/ITS non-coherent flags handling ACPICA commit c5d2010744b1bf7efba0bd04a8a9c200ef8fb610 Add new flags and related fields to the MADT GICC/GICR/ITS structures according to the code first ECR: https://bugzilla.tianocore.org/show_bug.cgi?id=4557 Update the MADT template to the latest MADT revision. Link: https://github.com/acpica/acpica/commit/c5d20107 Signed-off-by: Lorenzo Pieralisi Signed-off-by: Rafael J. Wysocki commit cb1210a7c03c55f9fb7496bd44155c6a024fe458 Author: Lorenzo Pieralisi Date: Wed Dec 27 12:00:36 2023 +0100 ACPICA: MADT: Add GICC online capable bit handling ACPICA commit 16f0befdeddf25756f317907798192bbaa417e5e Implement code to handle the GICC online capable bit management added into ACPI v6.5. Link: https://github.com/acpica/acpica/commit/16f0befd Signed-off-by: Lorenzo Pieralisi Signed-off-by: Rafael J. Wysocki commit e315e8692f7922cd1b2a26bd7a1741cc8ce77085 Author: Michael Maltsev Date: Sun Jan 7 13:53:07 2024 +0500 ACPI: resource: Skip IRQ override on ASUS ExpertBook B1502CGA Like the ASUS ExpertBook B1502CBA and various ASUS laptops, the ASUS ExpertBook B1502CGA has an ACPI DSDT table that describes IRQ 1 as ActiveLow while the kernel overrides it to Edge_High. $ sudo dmesg | grep DMI [ 0.000000] DMI: ASUSTeK COMPUTER INC. ASUS EXPERTBOOK B1502CGA_B1502CGA/B1502CGA, BIOS B1502CGA.303 06/05/2023 $ grep -A 40 PS2K dsdt.dsl | grep IRQ -A 1 IRQ (Level, ActiveLow, Exclusive, ) {1} This prevents the keyboard from working. To fix this issue, add this laptop to the skip_override_table so that the kernel does not override IRQ 1. Signed-off-by: Michael Maltsev [ rjw: rebase, replace .ident field with a comment ] Signed-off-by: Rafael J. Wysocki commit fd38dd6abda589a8771e7872e4dea28c99c6a6ef Author: Mirsad Todorovac Date: Sun Jan 7 18:37:08 2024 +0100 kselftest/alsa - conf: Stringify the printed errno in sysfs_get() GCC 13.2.0 reported the warning of the print format specifier: conf.c: In function ‘sysfs_get’: conf.c:181:72: warning: format ‘%s’ expects argument of type ‘char *’, \ but argument 3 has type ‘int’ [-Wformat=] 181 | ksft_exit_fail_msg("sysfs: unable to read value '%s': %s\n", | ~^ | | | char * | %d The fix passes strerror(errno) as it was intended, like in the sibling error exit message. Fixes: aba51cd0949ae ("selftests: alsa - add PCM test") Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Shuah Khan Cc: linux-sound@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mirsad Todorovac Acked-by: Mark Brown Link: https://lore.kernel.org/r/20240107173704.937824-5-mirsad.todorovac@alu.unizg.hr Signed-off-by: Takashi Iwai commit f77a255e74c348a158d21a471e993e70ff710737 Author: Mirsad Todorovac Date: Sun Jan 7 18:37:06 2024 +0100 kselftest/alsa - mixer-test: Fix the print format specifier warning GCC 13.2.0 compiler issued the following warning: mixer-test.c:350:80: warning: format ‘%ld’ expects argument of type ‘long int’, \ but argument 5 has type ‘unsigned int’ [-Wformat=] 350 | ksft_print_msg("%s.%d value %ld more than item count %ld\n", | ~~^ | | | long int | %d 351 | ctl->name, index, int_val, 352 | snd_ctl_elem_info_get_items(ctl->info)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | unsigned int Fixing the format specifier in call to ksft_print_msg() according to the compiler suggestion silences the warning. Fixes: 10f2f194663af ("kselftest: alsa: Validate values read from enumerations") Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Shuah Khan Cc: linux-sound@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mirsad Todorovac Acked-by: Mark Brown Link: https://lore.kernel.org/r/20240107173704.937824-4-mirsad.todorovac@alu.unizg.hr Signed-off-by: Takashi Iwai commit 3f47c1ebe5ca9c5883e596c7888dec4bec0176d8 Author: Mirsad Todorovac Date: Sun Jan 7 18:37:04 2024 +0100 kselftest/alsa - mixer-test: Fix the print format specifier warning The GCC 13.2.0 compiler issued the following warning: mixer-test.c: In function ‘ctl_value_index_valid’: mixer-test.c:322:79: warning: format ‘%lld’ expects argument of type ‘long long int’, \ but argument 5 has type ‘long int’ [-Wformat=] 322 | ksft_print_msg("%s.%d value %lld more than maximum %lld\n", | ~~~^ | | | long long int | %ld 323 | ctl->name, index, int64_val, 324 | snd_ctl_elem_info_get_max(ctl->info)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | long int Fixing the format specifier as advised by the compiler suggestion removes the warning. Fixes: 3f48b137d88e7 ("kselftest: alsa: Factor out check that values meet constraints") Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Shuah Khan Cc: linux-sound@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mirsad Todorovac Acked-by: Mark Brown Link: https://lore.kernel.org/r/20240107173704.937824-3-mirsad.todorovac@alu.unizg.hr Signed-off-by: Takashi Iwai commit 8c51c13dc63d46e754c44215eabc0890a8bd9bfb Author: Mirsad Todorovac Date: Sun Jan 7 18:37:02 2024 +0100 kselftest/alsa - mixer-test: fix the number of parameters to ksft_exit_fail_msg() Minor fix in the number of arguments to error reporting function in the test program as reported by GCC 13.2.0 warning. mixer-test.c: In function ‘find_controls’: mixer-test.c:169:44: warning: too many arguments for format [-Wformat-extra-args] 169 | ksft_exit_fail_msg("snd_ctl_poll_descriptors() failed for %d\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The number of arguments in call to ksft_exit_fail_msg() doesn't correspond to the format specifiers, so this is adjusted resembling the sibling calls to the error function. Fixes: b1446bda56456 ("kselftest: alsa: Check for event generation when we write to controls") Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Shuah Khan Cc: linux-sound@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Mirsad Todorovac Acked-by: Mark Brown Link: https://lore.kernel.org/r/20240107173704.937824-2-mirsad.todorovac@alu.unizg.hr Signed-off-by: Takashi Iwai commit dcaca1b5f0d47f4ed59f606795df531cc8a2d7d2 Author: Gergo Koteles Date: Mon Jan 8 22:16:46 2024 +0100 ALSA: hda/tas2781: annotate calibration data endianness Sparse reports an endian mismatch. The amplifier expects the calibration data as big-endian. Use the __be32 type to express endianness better. Fixes: c3ca4458cc2f ("ALSA: hda/tas2781: add TAS2563 support for 14ARB7") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401072137.Oc7pQgRW-lkp@intel.com/ Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/3852ff28ea7d5d8f2086d8dd78aeff8d1d984991.1704748435.git.soyer@irl.hu Signed-off-by: Takashi Iwai commit d2aaf19965045f70bb2ece514399cdc6fcce2e73 Author: Ben Mayo Date: Sat Jan 6 21:13:23 2024 -0500 ACPI: resource: Add DMI quirks for ASUS Vivobook E1504GA and E1504GAB Asus Vivobook E1504GA and E1504GAB notebooks are affected by bug #216158 (DSDT specifies the kbd IRQ as level active-low and using the override changes this to rising edge, stopping the keyboard from working). Users of these notebooks do not have a working keyboard unless they add their DMI information to the struct irq1_level_low_skip_override array and compile a custom kernel. Add support for these computers to the Linux kernel without requiring the end-user to recompile the kernel. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216158 Signed-off-by: Ben Mayo [ rjw: Link tag, subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 2fb7e4dd35c52933b18ff127bf92d703c8e2e897 Author: Greg Kroah-Hartman Date: Fri Jan 5 13:51:21 2024 +0100 PNP: make pnp_bus_type const Now that the driver core can properly handle constant struct bus_type, move the pnp_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki commit 022e6f5184ff73eaaf6aa7a89b7fafc7c2bd8c9c Author: Erick Archer Date: Fri Jan 5 18:11:04 2024 +0000 PM: QoS: Use kcalloc() instead of kzalloc() Use 2-factor multiplication argument form kcalloc() instead of kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Erick Archer Reviewed-by: Gustavo A. R. Silva Signed-off-by: Rafael J. Wysocki commit e2bdb5272f4314256f51d91eee7babcae58b194b Author: David Howells Date: Mon Jan 8 21:30:49 2024 +0000 netfs: Fix wrong #ifdef hiding wait netfs_writepages_begin() has the wait on the fscache folio conditional on CONFIG_NETFS_FSCACHE - which doesn't exist. Fix it to be conditional on CONFIG_FSCACHE instead. Fixes: 62c3b7481b9a ("netfs: Provide a writepages implementation") Reported-by: Lukas Bulwahn Signed-off-by: David Howells cc: Matthew Wilcox cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org Link: https://lore.kernel.org/r/20240109083257.GK132648@kernel.org/ commit 3d1d4aa0cc13b1883a5a56c945837a2e0ecb5143 Author: David Howells Date: Mon Jan 8 10:02:55 2024 +0000 cachefiles: Fix signed/unsigned mixup In __cachefiles_prepare_write(), the start and pos variables were made unsigned 64-bit so that the casts in the checking could be got rid of - which should be fine since absolute file offsets can't be negative, except that an error code may be obtained from vfs_llseek(), which *would* be negative. This breaks the error check. Fix this for now by reverting pos and start to be signed and putting back the casts. Unfortunately, the error value checks cannot be replaced with IS_ERR_VALUE() as long might be 32-bits. Fixes: 7097c96411d2 ("cachefiles: Fix __cachefiles_prepare_write()") Reported-by: Simon Horman Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401071152.DbKqMQMu-lkp@intel.com/ Signed-off-by: David Howells Reviewed-by: Simon Horman Reviewed-by: Gao Xiang cc: Yiqun Leng cc: Jia Zhu cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-erofs@lists.ozlabs.org cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 2f521890aa5b8a5619d31a95caec0b08d4cb9e1a Author: Rafael J. Wysocki Date: Wed Jan 3 12:59:10 2024 +0100 thermal: netlink: Pass thermal zone pointer to notify routines There are several rountines in the thermal netlink API that take a thermal zone ID or a thermal zone type as their arguments, but from their callers perspective it would be more convenient to pass a thermal zone pointer to them and let them extract the necessary data from the given thermal zone object by themselves. Modify the code accordingly. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Acked-by: Daniel Lezcano commit 4ae535f37d0e3c5731f90c385e883c0bada59fc9 Author: Rafael J. Wysocki Date: Fri Dec 15 20:59:08 2023 +0100 thermal: netlink: Drop thermal_notify_tz_trip_add/delete() Because thermal_notify_tz_trip_add/delete() are never used, drop them entirely along with the related code. The addition or removal of trip points is not supported by the thermal core and is unlikely to be supported in the future, so it is also unlikely that these functions will ever be needed. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Acked-by: Daniel Lezcano commit f52557edf0648b471e2006f9377ea0ba4f73f9b2 Author: Rafael J. Wysocki Date: Fri Dec 15 20:57:50 2023 +0100 thermal: netlink: Pass pointers to thermal_notify_tz_trip_up/down() Instead of requiring the callers of thermal_notify_tz_trip_up/down() to provide specific values needed to populate struct param in them, make them extract those values from objects passed by the callers via const pointers. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Reviewed-by: Daniel Lezcano commit 7e72fc41d4243800206ff76615cfebb15d632027 Author: Rafael J. Wysocki Date: Wed Jan 3 12:49:57 2024 +0100 thermal: netlink: Pass pointers to thermal_notify_tz_trip_change() Instead of requiring the caller of thermal_notify_tz_trip_change() to provide specific values needed to populate struct param in it, make it extract those values from objects passed to it by the caller via const pointers. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Reviewed-by: Daniel Lezcano commit f1479f0a4f53ef4fc12108a59caee61c39bc6843 Author: Randy Dunlap Date: Wed Dec 6 10:17:24 2023 -0800 xen/xenbus: client: fix kernel-doc comments Correct function kernel-doc notation to prevent warnings from scripts/kernel-doc. xenbus_client.c:134: warning: No description found for return value of 'xenbus_watch_path' xenbus_client.c:177: warning: No description found for return value of 'xenbus_watch_pathfmt' xenbus_client.c:258: warning: missing initial short description on line: * xenbus_switch_state xenbus_client.c:267: warning: No description found for return value of 'xenbus_switch_state' xenbus_client.c:308: warning: missing initial short description on line: * xenbus_dev_error xenbus_client.c:327: warning: missing initial short description on line: * xenbus_dev_fatal xenbus_client.c:350: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Equivalent to xenbus_dev_fatal(dev, err, fmt, args), but helps xenbus_client.c:457: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Allocate an event channel for the given xenbus_device, assigning the newly xenbus_client.c:486: warning: expecting prototype for Free an existing event channel. Returns 0 on success or(). Prototype was for xenbus_free_evtchn() instead xenbus_client.c:502: warning: missing initial short description on line: * xenbus_map_ring_valloc xenbus_client.c:517: warning: No description found for return value of 'xenbus_map_ring_valloc' xenbus_client.c:602: warning: missing initial short description on line: * xenbus_unmap_ring xenbus_client.c:614: warning: No description found for return value of 'xenbus_unmap_ring' xenbus_client.c:715: warning: missing initial short description on line: * xenbus_unmap_ring_vfree xenbus_client.c:727: warning: No description found for return value of 'xenbus_unmap_ring_vfree' xenbus_client.c:919: warning: missing initial short description on line: * xenbus_read_driver_state xenbus_client.c:926: warning: No description found for return value of 'xenbus_read_driver_state' Signed-off-by: Randy Dunlap Cc: Juergen Gross Cc: Stefano Stabellini Cc: Oleksandr Tyshchenko Cc: xen-devel@lists.xenproject.org Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20231206181724.27767-1-rdunlap@infradead.org Signed-off-by: Juergen Gross commit 125c0a646a257fd58de223f2c3e1fe8a99085644 Author: Juergen Gross Date: Tue Dec 5 12:51:21 2023 +0100 xen: update PV-device interface headers Update the Xen PV-device interface headers in order to avoid undefined behavior with flexible arrays being defined with one array element. Reported-by: Pry Mar Signed-off-by: Juergen Gross Acked-by: Stefano Stabellini Link: https://lore.kernel.org/r/20231205115121.11627-1-jgross@suse.com Signed-off-by: Juergen Gross commit 8ead196be219adade3bd0d4115cc9b8506643121 Author: Gaosheng Cui Date: Fri Jan 5 10:01:26 2024 +0800 apparmor: Fix memory leak in unpack_profile() The aa_put_pdb(rules->file) should be called when rules->file is reassigned, otherwise there may be a memory leak. This was found via kmemleak: unreferenced object 0xffff986c17056600 (size 192): comm "apparmor_parser", pid 875, jiffies 4294893488 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 89 14 04 6c 98 ff ff ............l... 00 00 8c 11 6c 98 ff ff bc 0c 00 00 00 00 00 00 ....l........... backtrace (crc e28c80c4): [] kmemleak_alloc+0x4f/0x90 [] kmalloc_trace+0x2d2/0x340 [] aa_alloc_pdb+0x4d/0x90 [] unpack_pdb+0x48/0x660 [] unpack_profile+0x693/0x1090 [] aa_unpack+0x10a/0x6e0 [] aa_replace_profiles+0xa3/0x1210 [] policy_update+0x163/0x2a0 [] profile_replace+0xb1/0x130 [] vfs_write+0xd4/0x3d0 [] ksys_write+0x6b/0xf0 [] __x64_sys_write+0x1e/0x30 [] do_syscall_64+0x76/0x120 [] entry_SYSCALL_64_after_hwframe+0x6c/0x74 So add aa_put_pdb(rules->file) to fix it when rules->file is reassigned. Fixes: 98b824ff8984 ("apparmor: refcount the pdb") Signed-off-by: Gaosheng Cui Signed-off-by: John Johansen commit 2b6fad7a900d2a378b475e5c196c146fb71856be Author: Randy Dunlap Date: Thu Dec 21 22:19:16 2023 -0800 tpm: cr50: fix kernel-doc warning and spelling Fix kernel-doc notation to prevent a warning: tpm_tis_i2c_cr50.c:681: warning: Excess function parameter 'id' description in 'tpm_cr50_i2c_probe' and fix a spelling error reported by codespell. Signed-off-by: Randy Dunlap Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: linux-integrity@vger.kernel.org Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit a4c7d794ac16224e5f86f359e65b89d5d8aad3bf Author: Rob Herring Date: Wed Nov 15 15:02:15 2023 -0600 tpm: nuvoton: Use i2c_get_match_data() Use preferred i2c_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit dd1d4bd6e5cfd6a6ad51d3123895e34cf36ab31b Author: Mark Brown Date: Sun Jan 7 22:40:29 2024 +0000 ARM: multi_v7_defconfig: Enable STM32 IPCC mailbox driver The STM32 systems have a mailbox used for communication with non-Linux processors like the M4 on the STM32MP157A. Enable the driver for the mailbox so it is available for testing. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20240107-arm-defconfig-stm32-ipcc-v1-1-924721db5661@kernel.org Signed-off-by: Arnd Bergmann commit 40974ee421b4d1fc74ac733d86899ce1b83d8f65 Author: Arnd Bergmann Date: Mon Jan 8 12:00:36 2024 +0100 ARM: davinci: always select CONFIG_CPU_ARM926T The select was lost by accident during the multiplatform conversion. Any davinci-only arm-linux-gnueabi-ld: arch/arm/mach-davinci/sleep.o: in function `CACHE_FLUSH': (.text+0x168): undefined reference to `arm926_flush_kern_cache_all' Fixes: f962396ce292 ("ARM: davinci: support multiplatform build for ARM v5") Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20240108110055.1531153-1-arnd@kernel.org Signed-off-by: Arnd Bergmann commit 6db359b5eef5de3d5fbf4cb412958186850df106 Author: Duje Mihanović Date: Sat Jan 6 15:11:33 2024 +0100 soc: pxa: ssp: fix casts On ARM64 platforms, id->data is a 64-bit value and casting it to a 32-bit integer causes build errors. Cast it to uintptr_t instead. The id->driver_data cast is unnecessary, so drop it. Signed-off-by: Duje Mihanović Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20240106-pxa-ssp-v2-1-69ac9f028bba@skole.hr Signed-off-by: Arnd Bergmann commit a3f763fdcb2f784c355aed66ddac6748ff8dbfa6 Author: Steve French Date: Mon Jan 8 22:37:10 2024 -0600 cifs: remove unneeded return statement Return statement was not needed at end of cifs_chan_update_iface Suggested-by: Christophe Jaillet Signed-off-by: Steve French commit 8d606c311b75e81063b4ea650b301cbe0c4ed5e1 Author: Dan Carpenter Date: Mon Jan 8 12:08:29 2024 +0300 cifs: make cifs_chan_update_iface() a void function The return values for cifs_chan_update_iface() didn't match what the documentation said and nothing was checking them anyway. Just make it a void function. Signed-off-by: Dan Carpenter Signed-off-by: Steve French commit 9f8413c4a66f2fb776d3dc3c9ed20bf435eb305e Merge: bfe8eb3b85c57 a7fb0423c201b Author: Linus Torvalds Date: Mon Jan 8 20:04:02 2024 -0800 Merge tag 'cgroup-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - Yafang Shao added task_get_cgroup1() helper to enable a similar BPF helper so that BPF progs can be more useful on cgroup1 hierarchies. While cgroup1 is mostly in maintenance mode, this addition is very small while having an outsized usefulness for users who are still on cgroup1. Yafang also optimized root cgroup list access by making it RCU protected in the process. - Waiman Long optimized rstat operation leading to substantially lower and more consistent lock hold time while flushing the hierarchical statistics. As the lock can be acquired briefly in various hot paths, this reduction has cascading benefits. - Waiman also improved the quality of isolation for cpuset's isolated partitions. CPUs which are allocated to isolated partitions are now excluded from running unbound work items and cpu_is_isolated() test which is used by vmstat and memcg to reduce interference now includes cpuset isolated CPUs. While it isn't there yet, the hope is eventually reaching parity with the isolation level provided by the `isolcpus` boot param but in a dynamic manner. * tag 'cgroup-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Move rcu_head up near the top of cgroup_root cgroup/cpuset: Include isolated cpuset CPUs in cpu_is_isolated() check cgroup: Avoid false cacheline sharing of read mostly rstat_cpu cgroup/rstat: Optimize cgroup_rstat_updated_list() cgroup: Fix documentation for cpu.idle cgroup/cpuset: Expose cpuset.cpus.isolated workqueue: Move workqueue_set_unbound_cpumask() and its helpers inside CONFIG_SYSFS cgroup/rstat: Reduce cpu_lock hold time in cgroup_rstat_flush_locked() cgroup/cpuset: Take isolated CPUs out of workqueue unbound cpumask cgroup/cpuset: Keep track of CPUs in isolated partitions selftests/cgroup: Minor code cleanup and reorganization of test_cpuset_prs.sh workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask selftests: cgroup: Fixes a typo in a comment cgroup: Add a new helper for cgroup1 hierarchy cgroup: Add annotation for holding namespace_sem in current_cgns_cgroup_from_root() cgroup: Eliminate the need for cgroup_mutex in proc_cgroup_show() cgroup: Make operations on the cgroup root_list RCU safe cgroup: Remove unnecessary list_empty() commit bfe8eb3b85c571f7e94e1039f59b462505b8e0fc Merge: aac4de465af08 cdb3033e191fd Author: Linus Torvalds Date: Mon Jan 8 19:49:17 2024 -0800 Merge tag 'sched-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "Energy scheduling: - Consolidate how the max compute capacity is used in the scheduler and how we calculate the frequency for a level of utilization. - Rework interface between the scheduler and the schedutil governor - Simplify the util_est logic Deadline scheduler: - Work more towards reducing SCHED_DEADLINE starvation of low priority tasks (e.g., SCHED_OTHER) tasks when higher priority tasks monopolize CPU cycles, via the introduction of 'deadline servers' (nested/2-level scheduling). "Fair servers" to make use of this facility are not introduced yet. EEVDF: - Introduce O(1) fastpath for EEVDF task selection NUMA balancing: - Tune the NUMA-balancing vma scanning logic some more, to better distribute the probability of a particular vma getting scanned. Plus misc fixes, cleanups and updates" * tag 'sched-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) sched/fair: Fix tg->load when offlining a CPU sched/fair: Remove unused 'next_buddy_marked' local variable in check_preempt_wakeup_fair() sched/fair: Use all little CPUs for CPU-bound workloads sched/fair: Simplify util_est sched/fair: Remove SCHED_FEAT(UTIL_EST_FASTUP, true) arm64/amu: Use capacity_ref_freq() to set AMU ratio cpufreq/cppc: Set the frequency used for computing the capacity cpufreq/cppc: Move and rename cppc_cpufreq_{perf_to_khz|khz_to_perf}() energy_model: Use a fixed reference frequency cpufreq/schedutil: Use a fixed reference frequency cpufreq: Use the fixed and coherent frequency for scaling capacity sched/topology: Add a new arch_scale_freq_ref() method freezer,sched: Clean saved_state when restoring it during thaw sched/fair: Update min_vruntime for reweight_entity() correctly sched/doc: Update documentation after renames and synchronize Chinese version sched/cpufreq: Rework iowait boost sched/cpufreq: Rework schedutil governor performance estimation sched/pelt: Avoid underestimation of task utilization sched/timers: Explain why idle task schedules out on remote timer enqueue sched/cpuidle: Comment about timers requirements VS idle handler ... commit c12ca110c613a81cb0f0099019c839d078cd0f38 Author: Siddharth Vadapalli Date: Wed Sep 27 09:48:45 2023 +0530 PCI: keystone: Fix race condition when initializing PHYs The PCI driver invokes the PHY APIs using the ks_pcie_enable_phy() function. The PHY in this case is the Serdes. It is possible that the PCI instance is configured for two lane operation across two different Serdes instances, using one lane of each Serdes. In such a configuration, if the reference clock for one Serdes is provided by the other Serdes, it results in a race condition. After the Serdes providing the reference clock is initialized by the PCI driver by invoking its PHY APIs, it is not guaranteed that this Serdes remains powered on long enough for the PHY APIs based initialization of the dependent Serdes. In such cases, the PLL of the dependent Serdes fails to lock due to the absence of the reference clock from the former Serdes which has been powered off by the PM Core. Fix this by obtaining reference to the PHYs before invoking the PHY initialization APIs and releasing reference after the initialization is complete. Link: https://lore.kernel.org/linux-pci/20230927041845.1222080-1-s-vadapalli@ti.com Fixes: 49229238ab47 ("PCI: keystone: Cleanup PHY handling") Signed-off-by: Siddharth Vadapalli Signed-off-by: Krzysztof Wilczyński Acked-by: Ravi Gunasekaran commit aac4de465af08ccec90ef47bdcc13435e48a7223 Merge: 0bdf0621f89f8 fdd041028f229 Author: Linus Torvalds Date: Mon Jan 8 19:37:20 2024 -0800 Merge tag 'perf-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull performance events updates from Ingo Molnar: - Add branch stack counters ABI extension to better capture the growing amount of information the PMU exposes via branch stack sampling. There's matching tooling support. - Fix race when creating the nr_addr_filters sysfs file - Add Intel Sierra Forest and Grand Ridge intel/cstate PMU support - Add Intel Granite Rapids, Sierra Forest and Grand Ridge uncore PMU support - Misc cleanups & fixes * tag 'perf-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Factor out topology_gidnid_map() perf/x86/intel/uncore: Fix NULL pointer dereference issue in upi_fill_topology() perf/x86/amd: Reject branch stack for IBS events perf/x86/intel/uncore: Support Sierra Forest and Grand Ridge perf/x86/intel/uncore: Support IIO free-running counters on GNR perf/x86/intel/uncore: Support Granite Rapids perf/x86/uncore: Use u64 to replace unsigned for the uncore offsets array perf/x86/intel/uncore: Generic uncore_get_uncores and MMIO format of SPR perf: Fix the nr_addr_filters fix perf/x86/intel/cstate: Add Grand Ridge support perf/x86/intel/cstate: Add Sierra Forest support x86/smp: Export symbol cpu_clustergroup_mask() perf/x86/intel/cstate: Cleanup duplicate attr_groups perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file perf/x86/intel: Support branch counters logging perf/x86/intel: Reorganize attrs and is_visible perf: Add branch_sample_call_stack perf/x86: Add PERF_X86_EVENT_NEEDS_BRANCH_STACK flag perf: Add branch stack counters commit 0bdf0621f89f87858ca26344378188eff194eddd Merge: f24dc33f8e0a7 69ffab9b9e698 Author: Linus Torvalds Date: Mon Jan 8 19:35:04 2024 -0800 Merge tag 'irq-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq subsystem updates from Ingo Molnar: - Add support for the IA55 interrupt controller on RZ/G3S SoC's - Update/fix the Qualcom MPM Interrupt Controller driver's register enumeration within the somewhat exotic "RPM Message RAM" MMIO-mapped shared memory region that is used for other purposes as well - Clean up the Xtensa built-in Programmable Interrupt Controller driver (xtensa-pic) a bit * tag 'irq-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/irq-xtensa-pic: Clean up irqchip/qcom-mpm: Support passing a slice of SRAM as reg space dt-bindings: interrupt-controller: mpm: Pass MSG RAM slice through phandle dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/G3S irqchip/renesas-rzg2l: Add support for suspend to RAM irqchip/renesas-rzg2l: Add macro to retrieve TITSR register offset based on register's index irqchip/renesas-rzg2l: Implement restriction when writing ISCR register irqchip/renesas-rzg2l: Document structure members irqchip/renesas-rzg2l: Align struct member names to tabs irqchip/renesas-rzg2l: Use tabs instead of spaces commit 9b0f510971470b495a707a4475d5a065c6e4d1f6 Author: Heiner Kallweit Date: Fri Jan 5 23:21:52 2024 +0100 lan78xx: remove redundant statement in lan78xx_get_eee eee_active is set by phy_ethtool_get_eee() already, using the same logic plus an additional check against link speed/duplex values. See genphy_c45_eee_is_active() for details. So we can remove this line. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/b086b296-0a1b-42d4-8e2b-ef6682598185@gmail.com Signed-off-by: Jakub Kicinski commit 5733d139a6745382c733020c7d60a1cf9fb1fc29 Author: Heiner Kallweit Date: Fri Jan 5 23:19:02 2024 +0100 lan743x: remove redundant statement in lan743x_ethtool_get_eee eee_active is set by phy_ethtool_get_eee() already, using the same logic plus an additional check against link speed/duplex values. See genphy_c45_eee_is_active() for details. So we can remove this line. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/3340ff84-8d7a-404b-8268-732c7f281164@gmail.com Signed-off-by: Jakub Kicinski commit 1c835c81eb5c2ca12bc3d0fdc448ba229694d47f Merge: b59db45d7eba9 d8214d0f01350 Author: Jakub Kicinski Date: Mon Jan 8 19:15:04 2024 -0800 Merge branch 'bnxt_en-ntuple-filter-fixes' Michael Chan says: ==================== bnxt_en: ntuple filter fixes The first patch is to remove an unneeded variable. The next 2 patches are to release RCU lock correctly after accesing the RCU protected filter structure. Patch 2 also re-arranges the code to look cleaner. ==================== Link: https://lore.kernel.org/r/20240105235439.28282-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit d8214d0f0135010acf7205c646cda31601bbb7ad Author: Michael Chan Date: Fri Jan 5 15:54:39 2024 -0800 bnxt_en: Fix RCU locking for ntuple filters in bnxt_rx_flow_steer() Similar to the previous patch, RCU locking was released too early in bnxt_rx_flow_steer(). Fix it to unlock after reading fltr->base.sw_id to guarantee that fltr won't be freed while we are still reading it. Fixes: cb5bdd292dc0 ("bnxt_en: Add bnxt_lookup_ntp_filter_from_idx() function") Reported-by: Simon Horman Link: https://lore.kernel.org/netdev/20231225165653.GH5962@kernel.org/ Signed-off-by: Michael Chan Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240105235439.28282-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit fd7769798de8a3748c286da65d7e32437f9854bf Author: Michael Chan Date: Fri Jan 5 15:54:38 2024 -0800 bnxt_en: Fix RCU locking for ntuple filters in bnxt_srxclsrldel() After looking up an ntuple filter from a RCU hash list, the rcu_read_unlock() call should be made after reading the structure, or after determining that the filter cannot age out (by aRFS). The existing code was calling rcu_read_unlock() too early in bnxt_srxclsrldel(). As suggested by Simon Horman, change the code to handle the error case of fltr_base not found in the if condition. The code looks cleaner this way. Fixes: 8d7ba028aa9a ("bnxt_en: Add support for ntuple filter deletion by ethtool.") Suggested-by: Simon Horman Reported-by: Jakub Kicinski Link: https://lore.kernel.org/netdev/20240104145955.5a6df702@kernel.org/ Signed-off-by: Michael Chan Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240105235439.28282-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 1ef4cacaae2f907db79faea4110ef90545467b7c Author: Michael Chan Date: Fri Jan 5 15:54:37 2024 -0800 bnxt_en: Remove unneeded variable in bnxt_hwrm_clear_vnic_filter() After recent refactoring, this function doesn't return error any more. Remove the unneeded rc variable and change the function to void. The caller is not checking for the return value. Fixes: 96c9bedc755e ("bnxt_en: Refactor L2 filter alloc/free firmware commands.") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202401041942.qrB1amZM-lkp@intel.com/ Signed-off-by: Michael Chan Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240105235439.28282-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit b59db45d7eba9894e7834d768ec4236fca39bd7d Author: Shachar Kagan Date: Tue Jan 2 11:00:57 2024 +0200 tcp: Revert no longer abort SYN_SENT when receiving some ICMP This reverts commit 0a8de364ff7a14558e9676f424283148110384d6. Shachar reported that Vagrant (https://www.vagrantup.com/), which is very popular tool to manage fleet of VMs stopped to work after commit citied in Fixes line. The issue appears while using Vagrant to manage nested VMs. The steps are: * create vagrant file * vagrant up * vagrant halt (VM is created but shut down) * vagrant up - fail Vagrant up stdout: Bringing machine 'player1' up with 'libvirt' provider... ==> player1: Creating shared folders metadata... ==> player1: Starting domain. ==> player1: Domain launching with graphics connection settings... ==> player1: -- Graphics Port: 5900 ==> player1: -- Graphics IP: 127.0.0.1 ==> player1: -- Graphics Password: Not defined ==> player1: -- Graphics Websocket: 5700 ==> player1: Waiting for domain to get an IP address... ==> player1: Waiting for machine to boot. This may take a few minutes... player1: SSH address: 192.168.123.61:22 player1: SSH username: vagrant player1: SSH auth method: private key ==> player1: Attempting graceful shutdown of VM... ==> player1: Attempting graceful shutdown of VM... ==> player1: Attempting graceful shutdown of VM... player1: Guest communication could not be established! This is usually because player1: SSH is not running, the authentication information was changed, player1: or some other networking issue. Vagrant will force halt, if player1: capable. ==> player1: Attempting direct shutdown of domain... Fixes: 0a8de364ff7a ("tcp: no longer abort SYN_SENT when receiving some ICMP") Closes: https://lore.kernel.org/all/MN2PR12MB44863139E562A59329E89DBEB982A@MN2PR12MB4486.namprd12.prod.outlook.com Signed-off-by: Shachar Kagan Signed-off-by: Leon Romanovsky Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/14459261ea9f9c7d7dfb28eb004ce8734fa83ade.1704185904.git.leonro@nvidia.com Signed-off-by: Jakub Kicinski commit f24dc33f8e0a765bf9bdf1c190ae5b9a23343d65 Merge: 46a08b4d4836c da65f29dada7f Author: Linus Torvalds Date: Mon Jan 8 18:44:11 2024 -0800 Merge tag 'timers-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer subsystem updates from Ingo Molnar: - Various preparatory cleanups & enhancements of the timer-wheel code, in preparation for the WIP 'pull timers at expiry' timer migration model series (which will replace the current 'push timers at enqueue' migration model), by Anna-Maria Behnsen: - Update comments and clean up confusing variable names - Add debug check to warn about time travel - Improve/expand timer-wheel tracepoints - Optimize away unnecessary IPIs for deferrable timers - Restructure & clean up next_expiry_recalc() - Clean up forward_timer_base() - Introduce __forward_timer_base() and use it to simplify and micro-optimize get_next_timer_interrupt() - Restructure the get_next_timer_interrupt()'s idle logic for better readability and to enable a minor optimization. - Fix the nextevt calculation when no timers are pending - Fix the sysfs_get_uname() prototype declaration * tag 'timers-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: timers: Fix nextevt calculation when no timers are pending timers: Rework idle logic timers: Use already existing function for forwarding timer base timers: Split out forward timer base functionality timers: Clarify check in forward_timer_base() timers: Move store of next event into __next_timer_interrupt() timers: Do not IPI for deferrable timers tracing/timers: Add tracepoint for tracking timer base is_idle flag tracing/timers: Enhance timer_start tracepoint tick-sched: Warn when next tick seems to be in the past tick/sched: Cleanup confusing variables tick-sched: Fix function names in comments time: Make sysfs_get_uname() function visible in header commit 46a08b4d4836c721e012ff4c542a8baa8baa3594 Merge: cdc202281a5d5 fe22944cf05ed Author: Linus Torvalds Date: Mon Jan 8 18:39:41 2024 -0800 Merge tag 'smp-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull CPU hotplug updates from Ingo Molnar: - Remove unused CPU hotplug states - Increase the number of dynamic CPU hotplug states from 30 to 40, because existing drivers can exhaust the allocation space * tag 'smp-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Increase the number of dynamic states cpu/hotplug: Remove unused CPU hotplug states commit cdc202281a5d5e2c4bbbbf78bbd68f035a49421a Merge: ab9517fa9aab7 221a164035fd8 Author: Linus Torvalds Date: Mon Jan 8 18:37:13 2024 -0800 Merge tag 'core-entry-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull generic syscall updates from Ingo Molnar: "Move various entry functions from kernel/entry/common.c to a header file, and always-inline them, to improve syscall entry performance on s390 by ~11%" * tag 'core-entry-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry: Move syscall_enter_from_user_mode() to header file entry: Move enter_from_user_mode() to header file entry: Move exit to usermode functions to header file commit ab9517fa9aab71e312c7acc6fefefe080db3c972 Merge: 669d089a7fe1e 9bb6362652f3f Author: Linus Torvalds Date: Mon Jan 8 18:35:33 2024 -0800 Merge tag 'core-debugobjects-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobject update from Ingo Molnar: - Make tracking object use more robust: it's not safe to access a tracking object after releasing the hashbucket lock. Create a persistent copy for debug printouts instead. * tag 'core-debugobjects-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Stop accessing objects after releasing hash bucket lock commit 669d089a7fe1eacf4e86160297f32c678ee71ec5 Merge: 6cbf5b3105f31 e2e13630f93d9 Author: Linus Torvalds Date: Mon Jan 8 18:31:27 2024 -0800 Merge tag 'objtool-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixlet from Ingo Molnar: "Address a GCC-14 warning: there's no real bug, but indeed the calloc order doesn't match the prototype. (Side note: we should really add zalloc() for such cases)" * tag 'objtool-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix calloc call for new -Walloc-size commit 6cbf5b3105f31217053570e7ca722b739a9242a4 Merge: f0a78b3e2a0c8 2b9d9e0a9ba0e Author: Linus Torvalds Date: Mon Jan 8 18:19:44 2024 -0800 Merge tag 'locking-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molar: "Lock guards: - Use lock guards in the ptrace code - Introduce conditional guards to extend to conditional lock primitives like mutex_trylock()/mutex_lock_interruptible()/etc. lockdep: - Optimize 'struct lock_class' to be smaller - Update file patterns in MAINTAINERS mutexes: - Document mutex lifetime rules a bit more" * tag 'locking-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/mutex: Clarify that mutex_unlock(), and most other sleeping locks, can still use the lock object after it's unlocked locking/mutex: Document that mutex_unlock() is non-atomic ptrace: Convert ptrace_attach() to use lock guards locking/lockdep: Slightly reorder 'struct lock_class' to save some memory MAINTAINERS: Add include/linux/lockdep*.h cleanup: Add conditional guard support commit f0a78b3e2a0c842cc7b4c2686f4a35681f02ca72 Author: Florian Fainelli Date: Mon Jan 8 17:09:04 2024 -0800 arm64: Update __NR_compat_syscalls for statmount/listmount Commit d8b0f5465012 ("wire up syscalls for statmount/listmount") added two new system calls to arch/arm64/include/asm/unistd32.h but forgot to update the __NR_compat_syscalls number, thus causing the following build failures: arch/arm64/include/asm/unistd32.h:922:24: error: array index in initializer exceeds array bounds 922 | #define __NR_statmount 457 | ^~~ arch/arm64/kernel/sys32.c:130:34: note: in definition of macro '__SYSCALL' 130 | #define __SYSCALL(nr, sym) [nr] = __arm64_##sym, | ^~ Bump up the number by two to accomodate for the new system calls added. Fixes: d8b0f5465012 ("wire up syscalls for statmount/listmount") Signed-off-by: Florian Fainelli Signed-off-by: Linus Torvalds commit 2fdbcf715a1b9dd1468317f7cd4b4cd327a09781 Merge: 33677aef32cf0 1e4d3001f59fb Author: Linus Torvalds Date: Mon Jan 8 17:48:35 2024 -0800 Merge tag 'x86-entry-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 entry updates from Ingo Molnar: - Optimize common_interrupt_return() - Harden the return-to-user code by making a CONFIG_DEBUG_ENTRY=y check unconditional & moving it closer to the IRET. * tag 'x86-entry-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry: Harden return-to-user x86/entry: Optimize common_interrupt_return() commit 33677aef32cf07ebbed07647e88136258c4b95ba Merge: b51cc5d02834a edc8fc01f6081 Author: Linus Torvalds Date: Mon Jan 8 17:45:24 2024 -0800 Merge tag 'x86-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 core updates from Ingo Molnar: - Add comments about the magic behind the shadow STI before MWAIT in __sti_mwait(). - Fix possible unintended timer delays caused by a race in mwait_idle_with_hints(). * tag 'x86-core-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Fix CPUIDLE_FLAG_IRQ_ENABLE leaking timer reprogram x86: Add a comment about the "magic" behind shadow sti before mwait commit b51cc5d02834a9c38cfd95b00b7d981b701b13f9 Merge: 42c371f8ec429 54aa699e8094e Author: Linus Torvalds Date: Mon Jan 8 17:23:32 2024 -0800 Merge tag 'x86-cleanups-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: - Change global variables to local - Add missing kernel-doc function parameter descriptions - Remove unused parameter from a macro - Remove obsolete Kconfig entry - Fix comments - Fix typos, mostly scripted, manually reviewed and a micro-optimization got misplaced as a cleanup: - Micro-optimize the asm code in secondary_startup_64_no_verify() * tag 'x86-cleanups-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arch/x86: Fix typos x86/head_64: Use TESTB instead of TESTL in secondary_startup_64_no_verify() x86/docs: Remove reference to syscall trampoline in PTI x86/Kconfig: Remove obsolete config X86_32_SMP x86/io: Remove the unused 'bw' parameter from the BUILDIO() macro x86/mtrr: Document missing function parameters in kernel-doc x86/setup: Make relocated_ramdisk a local variable of relocate_initrd() commit 42c371f8ec4296cee49b10d8e6be50aae90f2d70 Merge: f73857ece4d85 bcf7ef56daca2 Author: Linus Torvalds Date: Mon Jan 8 17:22:02 2024 -0800 Merge tag 'x86-build-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Ingo Molnar: - Update the objdump & instruction decoder self-test code for better LLVM toolchain compatibility - Rework CONFIG_X86_PAE dependencies, for better readability and higher robustness. - Misc cleanups * tag 'x86-build-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/tools: objdump_reformat.awk: Skip bad instructions from llvm-objdump x86/Kconfig: Rework CONFIG_X86_PAE dependency x86/tools: Remove chkobjdump.awk x86/tools: objdump_reformat.awk: Allow for spaces x86/tools: objdump_reformat.awk: Ensure regex matches fwait commit f73857ece4d85d2ee36571df9c13a733f3ba2732 Merge: 106b88d7a91e2 257ca14f4d780 Author: Linus Torvalds Date: Mon Jan 8 17:19:59 2024 -0800 Merge tag 'x86-boot-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: - Ignore NMIs during very early boot, to address kexec crashes - Remove redundant initialization in boot/string.c's strcmp() * tag 'x86-boot-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Remove redundant initialization of the 'delta' variable in strcmp() x86/boot: Ignore NMIs during very early boot commit 106b88d7a91e2b4d40369a20b8ef07bb827dafd5 Merge: 33034c4f9497b bc90aefa99f74 Author: Linus Torvalds Date: Mon Jan 8 17:02:57 2024 -0800 Merge tag 'x86-asm-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "Replace magic numbers in GDT descriptor definitions & handling: - Introduce symbolic names via macros for descriptor types/fields/flags, and then use these symbolic names. - Clean up definitions a bit, such as GDT_ENTRY_INIT() - Fix/clean up details that became visibly inconsistent after the symbol-based code was introduced: - Unify accessed flag handling - Set the D/B size flag consistently & according to the HW specification" * tag 'x86-asm-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/asm: Add DB flag to 32-bit percpu GDT entry x86/asm: Always set A (accessed) flag in GDT descriptors x86/asm: Replace magic numbers in GDT descriptors, script-generated change x86/asm: Replace magic numbers in GDT descriptors, preparations x86/asm: Provide new infrastructure for GDT descriptors commit 33034c4f9497b7fe33b0d97740a4bf1c0552316b Merge: ab5f3fcb7c720 5e1c8a47fc6ec Author: Linus Torvalds Date: Mon Jan 8 16:46:41 2024 -0800 Merge tag 'x86-apic-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic updates from Ingo Molnar: - Clean up 'struct apic': - Drop ::delivery_mode - Drop 'enum apic_delivery_modes' - Drop 'struct local_apic' - Fix comments * tag 'x86-apic-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioapic: Remove unfinished sentence from comment x86/apic: Drop struct local_apic x86/apic: Drop enum apic_delivery_modes x86/apic: Drop apic::delivery_mode commit 571c7ed0baa928447bac29ef79a90bd6525d1ebc Author: Rob Herring Date: Wed Dec 13 16:42:01 2023 -0600 dt-bindings: display: samsung,exynos-mixer: Fix 'regs' typo The correct property name is 'reg' not 'regs'. Fixes: 68e89bb36d58 ("dt-bindings: display: samsung,exynos-mixer: convert to dtschema") Signed-off-by: Rob Herring Signed-off-by: Inki Dae commit c3a11c0ec66c1e0652e3a2bb4f5cc74eea0ba486 Author: Dan Carpenter Date: Mon Jan 8 12:07:59 2024 +0300 cifs: delete unnecessary NULL checks in cifs_chan_update_iface() We return early if "iface" is NULL so there is no need to check here. Delete those checks. Signed-off-by: Dan Carpenter Signed-off-by: Steve French commit ab5f3fcb7c72094684760e0cd8954d8d570b5e83 Merge: 3cf1d6a5fbf3f db32cf8e280b4 Author: Linus Torvalds Date: Mon Jan 8 16:32:09 2024 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "CPU features: - Remove ARM64_HAS_NO_HW_PREFETCH copy_page() optimisation for ye olde Thunder-X machines - Avoid mapping KPTI trampoline when it is not required - Make CPU capability API more robust during early initialisation Early idreg overrides: - Remove dependencies on core kernel helpers from the early command-line parsing logic in preparation for moving this code before the kernel is mapped FPsimd: - Restore kernel-mode fpsimd context lazily, allowing us to run fpsimd code sequences in the kernel with pre-emption enabled KBuild: - Install 'vmlinuz.efi' when CONFIG_EFI_ZBOOT=y - Makefile cleanups LPA2 prep: - Preparatory work for enabling the 'LPA2' extension, which will introduce 52-bit virtual and physical addressing even with 4KiB pages (including for KVM guests). Misc: - Remove dead code and fix a typo MM: - Pass NUMA node information for IRQ stack allocations Perf: - Add perf support for the Synopsys DesignWare PCIe PMU - Add support for event counting thresholds (FEAT_PMUv3_TH) introduced in Armv8.8 - Add support for i.MX8DXL SoCs to the IMX DDR PMU driver. - Minor PMU driver fixes and optimisations RIP VPIPT: - Remove what support we had for the obsolete VPIPT I-cache policy Selftests: - Improvements to the SVE and SME selftests Stacktrace: - Refactor kernel unwind logic so that it can used by BPF unwinding and, eventually, reliable backtracing Sysregs: - Update a bunch of register definitions based on the latest XML drop from Arm" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (87 commits) kselftest/arm64: Don't probe the current VL for unsupported vector types efi/libstub: zboot: do not use $(shell ...) in cmd_copy_and_pad arm64: properly install vmlinuz.efi arm64/sysreg: Add missing system instruction definitions for FGT arm64/sysreg: Add missing system register definitions for FGT arm64/sysreg: Add missing ExtTrcBuff field definition to ID_AA64DFR0_EL1 arm64/sysreg: Add missing Pauth_LR field definitions to ID_AA64ISAR1_EL1 arm64: memory: remove duplicated include arm: perf: Fix ARCH=arm build with GCC arm64: Align boot cpucap handling with system cpucap handling arm64: Cleanup system cpucap handling MAINTAINERS: add maintainers for DesignWare PCIe PMU driver drivers/perf: add DesignWare PCIe PMU driver PCI: Move pci_clear_and_set_dword() helper to PCI header PCI: Add Alibaba Vendor ID to linux/pci_ids.h docs: perf: Add description for Synopsys DesignWare PCIe PMU driver arm64: irq: set the correct node for shadow call stack Revert "perf/arm_dmc620: Remove duplicate format attribute #defines" arm64: fpsimd: Implement lazy restore for kernel mode FPSIMD arm64: fpsimd: Preserve/restore kernel mode NEON at context switch ... commit 3cf1d6a5fbf3f724d12b01635319924239d42c00 Merge: 968b803324321 6b9c045b0602c Author: Linus Torvalds Date: Mon Jan 8 16:25:46 2024 -0800 Merge tag 'm68k-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - make the NuBus bus type static and constant - defconfig updates * tag 'm68k-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: defconfig: Update defconfigs for v6.7-rc1 nubus: Make nubus_bus_type static and constant commit 968b80332432172dbbb773e749a43bdc846d1a13 Merge: 3edbe8afb617a 44a1aad2fe6c1 Author: Linus Torvalds Date: Mon Jan 8 16:22:47 2024 -0800 Merge tag 'powerpc-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Add initial support to recognise the HeXin C2000 processor. - Add papr-vpd and papr-sysparm character device drivers for VPD & sysparm retrieval, so userspace tools can be adapted to avoid doing raw firmware calls from userspace. - Sched domains optimisations for shared processor partitions on P9/P10. - A series of optimisations for KVM running as a nested HV under PowerVM. - Other small features and fixes. Thanks to Aditya Gupta, Aneesh Kumar K.V, Arnd Bergmann, Christophe Leroy, Colin Ian King, Dario Binacchi, David Heidelberg, Geoff Levand, Gustavo A. R. Silva, Haoran Liu, Jordan Niethe, Kajol Jain, Kevin Hao, Kunwu Chan, Li kunyu, Li zeming, Masahiro Yamada, Michal Suchánek, Nathan Lynch, Naveen N Rao, Nicholas Piggin, Randy Dunlap, Sathvika Vasireddy, Srikar Dronamraju, Stephen Rothwell, Vaibhav Jain, and Zhao Ke. * tag 'powerpc-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (96 commits) powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2 powerpc/86xx: Drop unused CONFIG_MPC8610 powerpc/powernv: Add error handling to opal_prd_range_is_valid selftests/powerpc: Fix spelling mistake "EACCESS" -> "EACCES" powerpc/hvcall: Reorder Nestedv2 hcall opcodes powerpc/ps3: Add missing set_freezable() for ps3_probe_thread() powerpc/mpc83xx: Use wait_event_freezable() for freezable kthread powerpc/mpc83xx: Add the missing set_freezable() for agent_thread_fn() powerpc/fsl: Fix fsl,tmu-calibration to match the schema powerpc/smp: Dynamically build Powerpc topology powerpc/smp: Avoid asym packing within thread_group of a core powerpc/smp: Add __ro_after_init attribute powerpc/smp: Disable MC domain for shared processor powerpc/smp: Enable Asym packing for cores on shared processor powerpc/sched: Cleanup vcpu_is_preempted() powerpc: add cpu_spec.cpu_features to vmcoreinfo powerpc/imc-pmu: Add a null pointer check in update_events_in_group() powerpc/powernv: Add a null pointer check in opal_powercap_init() powerpc/powernv: Add a null pointer check in opal_event_init() powerpc/powernv: Add a null pointer check to scom_debug_init_one() ... commit 3edbe8afb617a736ae0dcc877311bdb112a00123 Merge: bef91c28f28fe 1f68ce2a02725 Author: Linus Torvalds Date: Mon Jan 8 16:03:00 2024 -0800 Merge tag 'ras_core_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS updates from Borislav Petkov: - Convert the hw error storm handling into a finer-grained, per-bank solution which allows for more timely detection and reporting of errors - Start a documentation section which will hold down relevant RAS features description and how they should be used - Add new AMD error bank types - Slim down and remove error type descriptions from the kernel side of error decoding to rasdaemon which can be used from now on to decode hw errors on AMD - Mark pages containing uncorrectable errors as poison so that kdump can avoid them and thus not cause another panic - The usual cleanups and fixlets * tag 'ras_core_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Handle Intel threshold interrupt storms x86/mce: Add per-bank CMCI storm mitigation x86/mce: Remove old CMCI storm mitigation code Documentation: Begin a RAS section x86/MCE/AMD: Add new MA_LLC, USR_DP, and USR_CP bank types EDAC/mce_amd: Remove SMCA Extended Error code descriptions x86/mce/amd, EDAC/mce_amd: Move long names to decoder module x86/mce/inject: Clear test status value x86/mce: Remove redundant check from mce_device_create() x86/mce: Mark fatal MCE's page as poison to avoid panic in the kdump kernel commit bef91c28f28fe8a36b91e9a39f60054ae1874280 Merge: e900042f04848 232afb557835d Author: Linus Torvalds Date: Mon Jan 8 15:45:31 2024 -0800 Merge tag 'x86_cpu_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu feature updates from Borislav Petkov: - Add synthetic X86_FEATURE flags for the different AMD Zen generations and use them everywhere instead of ad-hoc family/model checks. Drop an ancient AMD errata checking facility as a result - Fix a fragile initcall ordering in intel_epb - Do not issue the MFENCE+LFENCE barrier for the TSC deadline and X2APIC MSRs on AMD as it is not needed there * tag 'x86_cpu_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/CPU/AMD: Add X86_FEATURE_ZEN1 x86/CPU/AMD: Drop now unused CPU erratum checking function x86/CPU/AMD: Get rid of amd_erratum_1485[] x86/CPU/AMD: Get rid of amd_erratum_400[] x86/CPU/AMD: Get rid of amd_erratum_383[] x86/CPU/AMD: Get rid of amd_erratum_1054[] x86/CPU/AMD: Move the DIV0 bug detection to the Zen1 init function x86/CPU/AMD: Move Zenbleed check to the Zen2 init function x86/CPU/AMD: Rename init_amd_zn() to init_amd_zen_common() x86/CPU/AMD: Call the spectral chicken in the Zen2 init function x86/CPU/AMD: Move erratum 1076 fix into the Zen1 init function x86/CPU/AMD: Move the Zen3 BTC_NO detection to the Zen3 init function x86/CPU/AMD: Carve out the erratum 1386 fix x86/CPU/AMD: Add ZenX generations flags x86/cpu/intel_epb: Don't rely on link order x86/barrier: Do not serialize MSR accesses on AMD commit e900042f04848b5be9238d866df0952cfc548cf9 Merge: fc5e5c5923407 d642ef7111014 Author: Linus Torvalds Date: Mon Jan 8 15:42:52 2024 -0800 Merge tag 'x86_sev_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SEV updates from Borislav Petkov: - Convert the sev-guest plaform ->remove callback to return void - Move the SEV C-bit verification to the BSP as it needs to happen only once and not on every AP * tag 'x86_sev_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: virt: sev-guest: Convert to platform remove callback returning void x86/sev: Do the C-bit verification only on the BSP commit 5e0a760b44417f7cadd79de2204d6247109558a0 Author: Kirill A. Shutemov Date: Thu Dec 28 17:47:04 2023 +0300 mm, treewide: rename MAX_ORDER to MAX_PAGE_ORDER commit 23baf831a32c ("mm, treewide: redefine MAX_ORDER sanely") has changed the definition of MAX_ORDER to be inclusive. This has caused issues with code that was not yet upstream and depended on the previous definition. To draw attention to the altered meaning of the define, rename MAX_ORDER to MAX_PAGE_ORDER. Link: https://lkml.kernel.org/r/20231228144704.14033-2-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Cc: Linus Torvalds Signed-off-by: Andrew Morton commit fd37721803c6e73619108f76ad2e12a9aa5fafaf Author: Kirill A. Shutemov Date: Thu Dec 28 17:47:03 2023 +0300 mm, treewide: introduce NR_PAGE_ORDERS NR_PAGE_ORDERS defines the number of page orders supported by the page allocator, ranging from 0 to MAX_ORDER, MAX_ORDER + 1 in total. NR_PAGE_ORDERS assists in defining arrays of page orders and allows for more natural iteration over them. [kirill.shutemov@linux.intel.com: fixup for kerneldoc warning] Link: https://lkml.kernel.org/r/20240101111512.7empzyifq7kxtzk3@box Link: https://lkml.kernel.org/r/20231228144704.14033-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reviewed-by: Zi Yan Cc: Linus Torvalds Signed-off-by: Andrew Morton commit e54478fbdad20f2c58d0a4f99d01299ed8e7fe9c Merge: 3c064aea46d07 754d349ed4118 Author: Dave Airlie Date: Tue Jan 9 09:07:42 2024 +1000 Merge tag 'amd-drm-next-6.8-2024-01-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.8-2024-01-05: amdgpu: - VRR fixes - PSR-SU fixes - SubVP fixes - DCN 3.5 fixes - Documentation updates - DMCUB fixes - DML2 fixes - UMC 12.0 updates - GPUVM fix - Misc code cleanups and whitespace cleanups - DP MST fix - Let KFD sync with GPUVM fences - GFX11 reset fix - SMU 13.0.6 fixes - VSC fix for DP/eDP - Navi12 display fix - RN/CZN system aperture fix - DCN 2.1 bandwidth validation fix - DCN INIT cleanup amdkfd: - SVM fixes - Revert TBA/TMA location change Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20240105220522.4976-1-alexander.deucher@amd.com commit 024b32db43a359e0ded3fcc6cd86247cbbed4224 Author: Douglas Anderson Date: Thu Dec 21 13:55:48 2023 -0800 drm/bridge: parade-ps8640: Wait for HPD when doing an AUX transfer Unlike what is claimed in commit f5aa7d46b0ee ("drm/bridge: parade-ps8640: Provide wait_hpd_asserted() in struct drm_dp_aux"), if someone manually tries to do an AUX transfer (like via `i2cdump ${bus} 0x50 i`) while the panel is off we don't just get a simple transfer error. Instead, the whole ps8640 gets thrown for a loop and goes into a bad state. Let's put the function to wait for the HPD (and the magical 50 ms after first reset) back in when we're doing an AUX transfer. This shouldn't actually make things much slower (assuming the panel is on) because we should immediately poll and see the HPD high. Mostly this is just an extra i2c transfer to the bridge. Fixes: f5aa7d46b0ee ("drm/bridge: parade-ps8640: Provide wait_hpd_asserted() in struct drm_dp_aux") Tested-by: Pin-yen Lin Reviewed-by: Pin-yen Lin Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231221135548.1.I10f326a9305d57ad32cee7f8d9c60518c8be20fb@changeid commit fc5e5c5923407b4b312d999af27aaddbdd33c790 Merge: 41a80ca4ae2de 7991ed43587d1 Author: Linus Torvalds Date: Mon Jan 8 13:41:42 2024 -0800 Merge tag 'x86_paravirt_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 paravirt updates from Borislav Petkov: - Replace the paravirt patching functionality using the alternatives infrastructure and remove the former - Misc other improvements * tag 'x86_paravirt_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternative: Correct feature bit debug output x86/paravirt: Remove no longer needed paravirt patching code x86/paravirt: Switch mixed paravirt/alternative calls to alternatives x86/alternative: Add indirect call patching x86/paravirt: Move some functions and defines to alternative.c x86/paravirt: Introduce ALT_NOT_XEN x86/paravirt: Make the struct paravirt_patch_site packed x86/paravirt: Use relative reference for the original instruction offset commit 41a80ca4ae2de711e04b399f614f676daf72d938 Merge: 6e0b939180fcd f789383fa34a2 Author: Linus Torvalds Date: Mon Jan 8 13:27:43 2024 -0800 Merge tag 'x86_misc_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 updates from Borislav Petkov: - Add an informational message which gets issued when IA32 emulation has been disabled on the cmdline - Clarify in detail how /proc/cpuinfo is used on x86 - Fix a theoretical overflow in num_digits() * tag 'x86_misc_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ia32: State that IA32 emulation is disabled Documentation/x86: Document what /proc/cpuinfo is for x86/lib: Fix overflow when counting digits commit 6e0b939180fcd2658d2eb8e5bfa4192d1bc32fad Merge: 1dee7f509db20 9c21ea53e6bd1 Author: Linus Torvalds Date: Mon Jan 8 13:24:30 2024 -0800 Merge tag 'x86_microcode_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode updates from Borislav Petkov: - Correct minor issues after the microcode revision reporting sanitization * tag 'x86_microcode_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/intel: Set new revision only after a successful update x86/microcode/intel: Remove redundant microcode late updated message commit 1dee7f509db20402a25be94003f8f1ac3e17bdc1 Merge: 5db8752c3b81b 1e92af09fab1b Author: Linus Torvalds Date: Mon Jan 8 13:22:30 2024 -0800 Merge tag 'edac_updates_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - The EDAC drivers part of the effort to make the ->remove() platform driver callback return void - Add support for AMD AI accelerators - Add support for a number of Intel SoCs: Alder Lake-N, Raptor Lake-P, Meteor Lake-{P,PS} - Random fixes and cleanups all over the place * tag 'edac_updates_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: (39 commits) EDAC/skx_common: Filter out the invalid address EDAC, pnd2: Sort headers alphabetically EDAC, pnd2: Correct misleading error message in mk_region_mask() EDAC, pnd2: Apply bit macros and helpers where it makes sense EDAC, pnd2: Replace custom definition by one from sizes.h EDAC/igen6: Add Intel Meteor Lake-P SoCs support EDAC/igen6: Add Intel Meteor Lake-PS SoCs support EDAC/igen6: Add Intel Raptor Lake-P SoCs support EDAC/igen6: Add Intel Alder Lake-N SoCs support EDAC/igen6: Make get_mchbar() helper function EDAC/amd64: Add support for family 0x19, models 0x90-9f devices EDAC/mc: Add support for HBM3 memory type EDAC/{sb,i7core}_edac: Do not use a plain integer for a NULL pointer EDAC/armada_xp: Explicitly include correct DT includes EDAC/pci_sysfs: Use PCI_HEADER_TYPE_MASK instead of literals EDAC/thunderx: Fix possible out-of-bounds string access EDAC/fsl_ddr: Convert to platform remove callback returning void EDAC/zynqmp: Convert to platform remove callback returning void EDAC/xgene: Convert to platform remove callback returning void EDAC/ti: Convert to platform remove callback returning void ... commit 4d4e1b6319e5c4425ea3faeaf9a10b8b4c16c1e1 Author: Nícolas F. R. A. Prado Date: Mon Jan 8 17:44:58 2024 -0300 ASoC: mediatek: mt8192: Check existence of dai_name before dereferencing Following commit 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()"), the dai_name field is only populated for dummy components after the card is registered. This causes a null pointer dereference in the mt8192-mt6359 sound card driver's probe function when searching for a dai_name among all the card's dai links. Verify that the dai_name is non-null before passing it to strcmp. While at it, also check that there's at least one codec. Reported-by: kernelci.org bot Closes: https://linux.kernelci.org/test/case/id/6582cd6d992645c680e13478/ Fixes: 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") Signed-off-by: Nícolas F. R. A. Prado Link: https://msgid.link/r/20240108204508.691739-1-nfraprado@collabora.com Signed-off-by: Mark Brown commit d988c9f511af71a3445b6a4f3a2c67208ff8e480 Author: Arnaldo Carvalho de Melo Date: Mon Jan 8 17:11:13 2024 -0300 MAINTAINERS: Add Namhyung as tools/perf/ co-maintainer Acked-by: Ingo Molnar Acked-by: Linus Torvalds Acked-by: Namhyung Kim Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Mark Rutland Cc: Alexander Shishkin Link: https://lore.kernel.org/lkml/ZZxbCeVPnOjShbMQ@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0b43615af19742e1f4f71d332e72381430804804 Merge: 53eb935638816 b0fb904d074e8 Author: Jiri Kosina Date: Mon Jan 8 21:15:36 2024 +0100 Merge branch 'for-6.8/wacom' into for-linus - functional fix for handling Confidence in Wacom driver (Jason Gerecke) - power management fix for Wacom userspace battery exporting (Tatsunosuke Tobita) Conflicts: tools/testing/selftests/hid/tests/test_wacom_generic.py commit 53eb9356388169df4d805ba1fe14d5c7369bcf69 Merge: 333b217c151c0 cd438e57dd05b Author: Jiri Kosina Date: Mon Jan 8 21:14:10 2024 +0100 Merge branch 'for-6.8/steam' into for-linus - assorted functional fixes for hid-steam ported from SteamOS betas (Vicki Pfau) commit 333b217c151c0d2de5fc0bf5dafb71110c80cd90 Merge: 1cb09b552b1a3 8e2f79f41a5d1 Author: Jiri Kosina Date: Mon Jan 8 21:12:34 2024 +0100 Merge branch 'for-6.8/sensor-hub' into for-linus - fix for custom sensor-hub sensors (hinge angle sensor and LISS sensors) not working (Yauhen Kharuzhy) commit 1cb09b552b1a3e05ac4c1960b8cda6be19f59d05 Merge: f54a651c57943 da2c1b861065b Author: Jiri Kosina Date: Mon Jan 8 21:11:10 2024 +0100 Merge branch 'for-6.8/selftests' into for-linus - greatly improved coverage of Tablets in hid-selftests (Benjamin Tissoires) commit f54a651c57943044c63644f629e170630dd2f930 Merge: e9d29f4f6f5cd 94f18bb199459 Author: Jiri Kosina Date: Mon Jan 8 21:09:48 2024 +0100 Merge branch 'for-6.8/nintendo' into for-linus - support for Nintendo NSO controllers -- SNES, Genesis and N64 (Ryan McClelland) commit e9d29f4f6f5cdc166d264238969929f7322bab7e Merge: 4dc8c87a96ee9 2682468671aa0 Author: Jiri Kosina Date: Mon Jan 8 21:08:40 2024 +0100 Merge branch 'for-6.8/mcp2221' into for-linus - several assorted functional fixes for mcp2221 driver (Hamish Martin) commit 4dc8c87a96ee91b2a772dc4063c55ddc3abab249 Merge: f60c35260e569 740329d7120f8 Author: Jiri Kosina Date: Mon Jan 8 21:07:38 2024 +0100 Merge branch 'for-6.8/mcp2200' into for-linus - support for controlling mcp2200 GPIOs (Johannes Roith) commit f60c35260e5698c86e4a0a0580e05f08768c39d3 Merge: ff18ab5a4562c 0e63dd27f456f Author: Jiri Kosina Date: Mon Jan 8 21:06:09 2024 +0100 Merge branch 'for-6.8/intel-ish' into for-linus - power management improvement for EHL OOB wakeup in intel-ish (Kai-Heng Feng) - generic intel-ish code cleanups (Even Xu) commit ff18ab5a4562cf7af9045cbce3decc82036ed536 Merge: 82a18fc3aafed 7d7a252842eca Author: Jiri Kosina Date: Mon Jan 8 21:03:27 2024 +0100 Merge branch 'for-6.8/i2c-hid' into for-linus - rework of wait-for-reset in order to reduce the need for I2C_HID_QUIRK_NO_IRQ_AFTER_RESET qurk; the success rate is now 50% better, but there are still further improvements to be made (Hans de Goede) commit 82a18fc3aafed36a14a4db5be80cc26bb58f0127 Merge: 39e7facbe5eaa 9b0a3839e8d29 Author: Jiri Kosina Date: Mon Jan 8 21:02:30 2024 +0100 Merge branch 'for-6.8/hid-bus-type-const' into for-linus - bus_type constification (Greg Kroah-Hartman) commit 39e7facbe5eaa5e1bf25d44116e0a96376bc928b Merge: 6b93f350e55f3 03ddb7de012c6 Author: Jiri Kosina Date: Mon Jan 8 21:01:34 2024 +0100 Merge branch 'for-6.8/elan' into for-linus - support for Ilitek ili2901 touchscreen (Zhengqiao Xia) commit 6b93f350e55f3f2ee071dd41109d936abfba8ebf Merge: b0a1fe4610de5 584f35a3647d4 Author: Jiri Kosina Date: Mon Jan 8 20:57:04 2024 +0100 Merge branch 'for-6.8/amd-sfh' into for-linus - addition of new interfaces to export User presence information and Ambient light from amd-sfh to other drivers within the kernel (Basavaraj Natikar) commit b837a816b36fae45f27d75d9bdeb1b5b9d16a53c Author: Gabriel Krisman Bertazi Date: Fri Dec 15 17:09:57 2023 -0500 MAINTAINERS: update unicode maintainer e-mail address I no longer have access to this mailbox. Use kernel.org to avoid future updates. Signed-off-by: Gabriel Krisman Bertazi commit 5db8752c3b81bd33a549f6f812bab81e3bb61b20 Merge: 26458409a9b18 9fd7874c0e5c8 Author: Linus Torvalds Date: Mon Jan 8 11:43:04 2024 -0800 Merge tag 'vfs-6.8.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs iov_iter cleanups from Christian Brauner: "This contains a minor cleanup. The patches drop an unused argument from import_single_range() allowing to replace import_single_range() with import_ubuf() and dropping import_single_range() completely" * tag 'vfs-6.8.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: iov_iter: replace import_single_range() with import_ubuf() iov_iter: remove unused 'iov' argument from import_single_range() commit cd72c7ef5fed44272272a105b1da22810c91be69 Author: Gabriel Krisman Bertazi Date: Fri Aug 11 14:38:12 2023 -0400 ecryptfs: Reject casefold directory inodes Even though it seems to be able to resolve some names of case-insensitive directories, the lack of d_hash and d_compare means we end up with a broken state in the d_cache. Considering it was never a goal to support these two together, and we are preparing to use d_revalidate in case-insensitive filesystems, which would make the combination even more broken, reject any attempt to get a casefolded inode from ecryptfs. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Eric Biggers commit 53889bcaf536b3abedeaf104019877cee37dd08b Author: Jens Axboe Date: Mon Jan 8 11:51:57 2024 -0700 block: make __get_task_ioprio() easier to read We don't need to do any gymnastics if we don't have an io_context assigned at all, so just return early with our default priority. Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 3b7cb745473aec7255d66e3854abaa9c3f46f952 Author: Jens Axboe Date: Mon Jan 8 11:50:16 2024 -0700 block: move __get_task_ioprio() into header file We call this once per IO, which can be millions of times per second. Since nobody really uses io priorities, or at least it isn't very common, this is all wasted time and can amount to as much as 3% of the total kernel time. Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 26458409a9b180ea6cc2cd7b67d6138984184669 Merge: bb93c5ed457fe e73fa11a356ca Author: Linus Torvalds Date: Mon Jan 8 11:26:50 2024 -0800 Merge tag 'vfs-6.8.cachefiles' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs cachefiles updates from Christian Brauner: "This contains improvements for on-demand cachefiles. If the daemon crashes and the on-demand cachefiles fd is unexpectedly closed in-flight requests and subsequent read operations associated with the fd will fail with EIO. This causes issues in various scenarios as this failure is currently unrecoverable. The work contained in this pull request introduces a failover mode and enables the daemon to recover in-flight requested-related objects. A restarted daemon will be able to process requests as usual. This requires that in-flight requests are stored during daemon crash or while the daemon is offline. In addition, a handle to /dev/cachefiles needs to be stored. This can be done by e.g., systemd's fdstore (cf. [1]) which enables the restarted daemon to recover state. Three new states are introduced in this patchset: (1) CLOSE Object is closed by the daemon. (2) OPEN Object is open and ready for processing. IOW, the open request has been handled successfully. (3) REOPENING Object has been previously closed and is now reopened due to a read request. A restarted daemon can recover the /dev/cachefiles fd from systemd's fdstore and writes "restore" to the device. This causes the object state to be reset from CLOSE to REOPENING and reinitializes the object. The daemon may now handle the open request. Any in-flight operations are restored and handled avoiding interruptions for users" Link: https://systemd.io/FILE_DESCRIPTOR_STORE [1] * tag 'vfs-6.8.cachefiles' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: cachefiles: add restore command to recover inflight ondemand read requests cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode cachefiles: resend an open request if the read request's object is closed cachefiles: extract ondemand info field from cachefiles_object cachefiles: introduce object ondemand state commit bb93c5ed457fe76597c14717eb994fc5aef22716 Merge: 8c9440fea7744 c39e2ae3943d4 Author: Linus Torvalds Date: Mon Jan 8 11:11:51 2024 -0800 Merge tag 'vfs-6.8.rw' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs rw updates from Christian Brauner: "This contains updates from Amir for read-write backing file helpers for stacking filesystems such as overlayfs: - Fanotify is currently in the process of introducing pre content events. Roughly, a new permission event will be added indicating that it is safe to write to the file being accessed. These events are used by hierarchical storage managers to e.g., fill the content of files on first access. During that work we noticed that our current permission checking is inconsistent in rw_verify_area() and remap_verify_area(). Especially in the splice code permission checking is done multiple times. For example, one time for the whole range and then again for partial ranges inside the iterator. In addition, we mostly do permission checking before we call file_start_write() except for a few places where we call it after. For pre-content events we need such permission checking to be done before file_start_write(). So this is a nice reason to clean this all up. After this series, all permission checking is done before file_start_write(). As part of this cleanup we also massaged the splice code a bit. We got rid of a few helpers because we are alredy drowning in special read-write helpers. We also cleaned up the return types for splice helpers. - Introduce generic read-write helpers for backing files. This lifts some overlayfs code to common code so it can be used by the FUSE passthrough work coming in over the next cycles. Make Amir and Miklos the maintainers for this new subsystem of the vfs" * tag 'vfs-6.8.rw' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (30 commits) fs: fix __sb_write_started() kerneldoc formatting fs: factor out backing_file_mmap() helper fs: factor out backing_file_splice_{read,write}() helpers fs: factor out backing_file_{read,write}_iter() helpers fs: prepare for stackable filesystems backing file helpers fsnotify: optionally pass access range in file permission hooks fsnotify: assert that file_start_write() is not held in permission hooks fsnotify: split fsnotify_perm() into two hooks fs: use splice_copy_file_range() inline helper splice: return type ssize_t from all helpers fs: use do_splice_direct() for nfsd/ksmbd server-side-copy fs: move file_start_write() into direct_splice_actor() fs: fork splice_file_range() from do_splice_direct() fs: create {sb,file}_write_not_started() helpers fs: create file_write_started() helper fs: create __sb_write_started() helper fs: move kiocb_start_write() into vfs_iocb_iter_write() fs: move permission hook out of do_iter_read() fs: move permission hook out of do_iter_write() fs: move file_start_write() into vfs_iter_write() ... commit 8c9440fea77440772542d6dbcb5c36182495c164 Merge: 3f6984e7301f4 5bd3cf8cbc8a2 Author: Linus Torvalds Date: Mon Jan 8 10:57:34 2024 -0800 Merge tag 'vfs-6.8.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs mount updates from Christian Brauner: "This contains the work to retrieve detailed information about mounts via two new system calls. This is hopefully the beginning of the end of the saga that started with fsinfo() years ago. The LWN articles in [1] and [2] can serve as a summary so we can avoid rehashing everything here. At LSFMM in May 2022 we got into a room and agreed on what we want to do about fsinfo(). Basically, split it into pieces. This is the first part of that agreement. Specifically, it is concerned with retrieving information about mounts. So this only concerns the mount information retrieval, not the mount table change notification, or the extended filesystem specific mount option work. That is separate work. Currently mounts have a 32bit id. Mount ids are already in heavy use by libmount and other low-level userspace but they can't be relied upon because they're recycled very quickly. We agreed that mounts should carry a unique 64bit id by which they can be referenced directly. This is now implemented as part of this work. The new 64bit mount id is exposed in statx() through the new STATX_MNT_ID_UNIQUE flag. If the flag isn't raised the old mount id is returned. If it is raised and the kernel supports the new 64bit mount id the flag is raised in the result mask and the new 64bit mount id is returned. New and old mount ids do not overlap so they cannot be conflated. Two new system calls are introduced that operate on the 64bit mount id: statmount() and listmount(). A summary of the api and usage can be found on LWN as well (cf. [3]) but of course, I'll provide a summary here as well. Both system calls rely on struct mnt_id_req. Which is the request struct used to pass the 64bit mount id identifying the mount to operate on. It is extensible to allow for the addition of new parameters and for future use in other apis that make use of mount ids. statmount() mimicks the semantics of statx() and exposes a set flags that userspace may raise in mnt_id_req to request specific information to be retrieved. A statmount() call returns a struct statmount filled in with information about the requested mount. Supported requests are indicated by raising the request flag passed in struct mnt_id_req in the @mask argument in struct statmount. Currently we do support: - STATMOUNT_SB_BASIC: Basic filesystem info - STATMOUNT_MNT_BASIC Mount information (mount id, parent mount id, mount attributes etc) - STATMOUNT_PROPAGATE_FROM Propagation from what mount in current namespace - STATMOUNT_MNT_ROOT Path of the root of the mount (e.g., mount --bind /bla /mnt returns /bla) - STATMOUNT_MNT_POINT Path of the mount point (e.g., mount --bind /bla /mnt returns /mnt) - STATMOUNT_FS_TYPE Name of the filesystem type as the magic number isn't enough due to submounts The string options STATMOUNT_MNT_{ROOT,POINT} and STATMOUNT_FS_TYPE are appended to the end of the struct. Userspace can use the offsets in @fs_type, @mnt_root, and @mnt_point to reference those strings easily. The struct statmount reserves quite a bit of space currently for future extensibility. This isn't really a problem and if this bothers us we can just send a follow-up pull request during this cycle. listmount() is given a 64bit mount id via mnt_id_req just as statmount(). It takes a buffer and a size to return an array of the 64bit ids of the child mounts of the requested mount. Userspace can thus choose to either retrieve child mounts for a mount in batches or iterate through the child mounts. For most use-cases it will be sufficient to just leave space for a few child mounts. But for big mount tables having an iterator is really helpful. Iterating through a mount table works by setting @param in mnt_id_req to the mount id of the last child mount retrieved in the previous listmount() call" Link: https://lwn.net/Articles/934469 [1] Link: https://lwn.net/Articles/829212 [2] Link: https://lwn.net/Articles/950569 [3] * tag 'vfs-6.8.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: add selftest for statmount/listmount fs: keep struct mnt_id_req extensible wire up syscalls for statmount/listmount add listmount(2) syscall statmount: simplify string option retrieval statmount: simplify numeric option retrieval add statmount(2) syscall namespace: extract show_path() helper mounts: keep list of mounts in an rbtree add unique mount ID commit 3f6984e7301f4a37285cc5962f97c83c7c3b8239 Merge: c604110e662a5 8ff363ade395e Author: Linus Torvalds Date: Mon Jan 8 10:43:51 2024 -0800 Merge tag 'vfs-6.8.super' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull vfs super updates from Christian Brauner: "This contains the super work for this cycle including the long-awaited series by Jan to make it possible to prevent writing to mounted block devices: - Writing to mounted devices is dangerous and can lead to filesystem corruption as well as crashes. Furthermore syzbot comes with more and more involved examples how to corrupt block device under a mounted filesystem leading to kernel crashes and reports we can do nothing about. Add tracking of writers to each block device and a kernel cmdline argument which controls whether other writeable opens to block devices open with BLK_OPEN_RESTRICT_WRITES flag are allowed. Note that this effectively only prevents modification of the particular block device's page cache by other writers. The actual device content can still be modified by other means - e.g. by issuing direct scsi commands, by doing writes through devices lower in the storage stack (e.g. in case loop devices, DM, or MD are involved) etc. But blocking direct modifications of the block device page cache is enough to give filesystems a chance to perform data validation when loading data from the underlying storage and thus prevent kernel crashes. Syzbot can use this cmdline argument option to avoid uninteresting crashes. Also users whose userspace setup does not need writing to mounted block devices can set this option for hardening. We expect that this will be interesting to quite a few workloads. Btrfs is currently opted out of this because they still haven't merged patches we require for this to work from three kernel releases ago. - Reimplement block device freezing and thawing as holder operations on the block device. This allows us to extend block device freezing to all devices associated with a superblock and not just the main device. It also allows us to remove get_active_super() and thus another function that scans the global list of superblocks. Freezing via additional block devices only works if the filesystem chooses to use @fs_holder_ops for these additional devices as well. That currently only includes ext4 and xfs. Earlier releases switched get_tree_bdev() and mount_bdev() to use @fs_holder_ops. The remaining nilfs2 open-coded version of mount_bdev() has been converted to rely on @fs_holder_ops as well. So block device freezing for the main block device will continue to work as before. There should be no regressions in functionality. The only special case is btrfs where block device freezing for the main block device never worked because sb->s_bdev isn't set. Block device freezing for btrfs can be fixed once they can switch to @fs_holder_ops but that can happen whenever they're ready" * tag 'vfs-6.8.super' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (27 commits) block: Fix a memory leak in bdev_open_by_dev() super: don't bother with WARN_ON_ONCE() super: massage wait event mechanism ext4: Block writes to journal device xfs: Block writes to log device fs: Block writes to mounted block devices btrfs: Do not restrict writes to btrfs devices block: Add config option to not allow writing to mounted devices block: Remove blkdev_get_by_*() functions bcachefs: Convert to bdev_open_by_path() fs: handle freezing from multiple devices fs: remove dead check nilfs2: simplify device handling fs: streamline thaw_super_locked ext4: simplify device handling xfs: simplify device handling fs: simplify setup_bdev_super() calls blkdev: comment fs_holder_ops porting: document block device freeze and thaw changes fs: remove unused helper ... commit 2d179e8ac02e33c82c1a314961254353eb5028b3 Author: Jakub Kicinski Date: Wed Jan 3 08:09:38 2024 -0800 MAINTAINERS: use tabs for indent of CONFIDENTIAL COMPUTING THREAT MODEL There are two MAINTAINERS entries which snuck in during the previous merge window which use spaces instead of tabs for indent. The rest of the file uses tabs. Fix CONFIDENTIAL COMPUTING THREAT MODEL FOR X86 VIRTUALIZATION (SNP/TDX). Given the prevalence of using tabs some scripts (AKA my scripts) assume tabs when parsing. The faulty entry was added in commit 1f597b1a6ec2 ("docs: security: Confidential computing intro and threat model for x86 virtualization") Signed-off-by: Jakub Kicinski Reviewed-by: Carlos Bilbao Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240103160938.1006517-1-kuba@kernel.org commit c604110e662a54568073a03176402b624e740310 Merge: 1ab33c03145d0 dd8f87f21dc3d Author: Linus Torvalds Date: Mon Jan 8 10:26:08 2024 -0800 Merge tag 'vfs-6.8.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs Pull misc vfs updates from Christian Brauner: "This contains the usual miscellaneous features, cleanups, and fixes for vfs and individual fses. Features: - Add Jan Kara as VFS reviewer - Show correct device and inode numbers in proc//maps for vma files on stacked filesystems. This is now easily doable thanks to the backing file work from the last cycles. This comes with selftests Cleanups: - Remove a redundant might_sleep() from wait_on_inode() - Initialize pointer with NULL, not 0 - Clarify comment on access_override_creds() - Rework and simplify eventfd_signal() and eventfd_signal_mask() helpers - Process aio completions in batches to avoid needless wakeups - Completely decouple struct mnt_idmap from namespaces. We now only keep the actual idmapping around and don't stash references to namespaces - Reformat maintainer entries to indicate that a given subsystem belongs to fs/ - Simplify fput() for files that were never opened - Get rid of various pointless file helpers - Rename various file helpers - Rename struct file members after SLAB_TYPESAFE_BY_RCU switch from last cycle - Make relatime_need_update() return bool - Use GFP_KERNEL instead of GFP_USER when allocating superblocks - Replace deprecated ida_simple_*() calls with their current ida_*() counterparts Fixes: - Fix comments on user namespace id mapping helpers. They aren't kernel doc comments so they shouldn't be using /** - s/Retuns/Returns/g in various places - Add missing parameter documentation on can_move_mount_beneath() - Rename i_mapping->private_data to i_mapping->i_private_data - Fix a false-positive lockdep warning in pipe_write() for watch queues - Improve __fget_files_rcu() code generation to improve performance - Only notify writer that pipe resizing has finished after setting pipe->max_usage otherwise writers are never notified that the pipe has been resized and hang - Fix some kernel docs in hfsplus - s/passs/pass/g in various places - Fix kernel docs in ntfs - Fix kcalloc() arguments order reported by gcc 14 - Fix uninitialized value in reiserfs" * tag 'vfs-6.8.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (36 commits) reiserfs: fix uninit-value in comp_keys watch_queue: fix kcalloc() arguments order ntfs: dir.c: fix kernel-doc function parameter warnings fs: fix doc comment typo fs tree wide selftests/overlayfs: verify device and inode numbers in /proc/pid/maps fs/proc: show correct device and inode numbers in /proc/pid/maps eventfd: Remove usage of the deprecated ida_simple_xx() API fs: super: use GFP_KERNEL instead of GFP_USER for super block allocation fs/hfsplus: wrapper.c: fix kernel-doc warnings fs: add Jan Kara as reviewer fs/inode: Make relatime_need_update return bool pipe: wakeup wr_wait after setting max_usage file: remove __receive_fd() file: stop exposing receive_fd_user() fs: replace f_rcuhead with f_task_work file: remove pointless wrapper file: s/close_fd_get_file()/file_close_fd()/g Improve __fget_files_rcu() code generation (and thus __fget_light()) file: massage cleanup of files that failed to open fs/pipe: Fix lockdep false-positive in watchqueue pipe_write() ... commit 4f1991a92cfe89096b2d1f5583a2e093bdd55c37 Author: Steven Rostedt (Google) Date: Sun Jan 7 20:32:58 2024 -0500 tracing histograms: Simplify parse_actions() function The parse_actions() function uses 'len = str_has_prefix()' to test which action is in the string being parsed. But then it goes and repeats the logic for each different action. This logic can be simplified and duplicate code can be removed as 'len' contains the length of the found prefix which should be used for all actions. Link: https://lore.kernel.org/all/20240107112044.6702cb66@gandalf.local.home/ Link: https://lore.kernel.org/linux-trace-kernel/20240107203258.37e26d2b@gandalf.local.home Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Andy Shevchenko Cc: Tom Zanussi Signed-off-by: Steven Rostedt (Google) commit 9a1abc24850eb759e36a2f8869161c3b7254c904 Author: Maurizio Lombardi Date: Fri Jan 5 09:14:44 2024 +0100 nvmet-tcp: Fix the H2C expected PDU len calculation The nvmet_tcp_handle_h2c_data_pdu() function should take into consideration the possibility that the header digest and/or the data digests are enabled when calculating the expected PDU length, before comparing it to the value stored in cmd->pdu_len. Fixes: efa56305908b ("nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length") Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 45c36f04f1beb7c4c45f5910a1f69d6d9d5a19fb Author: Max Gurtovoy Date: Sun Jan 7 02:29:50 2024 +0200 nvme-tcp: enhance timeout kernel log Print the command_id along side blk-mq's tag to help match commands with protocol wire traces and logs. Signed-off-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit a5c1a87ce0876192d4343cdf5f0a22d737eb0ec3 Author: Max Gurtovoy Date: Sun Jan 7 02:29:49 2024 +0200 nvme-rdma: enhance timeout kernel log Print the command_id along side blk-mq's tag to help match commands with protocol wire traces and logs. Signed-off-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 172fb49600c2b96a4ade255fbfc3fe7098b8afd3 Author: Keith Busch Date: Wed Dec 6 10:48:30 2023 -0800 nvme-pci: enhance timeout kernel log Kernel configs don't necessarily have opcode decoding, and some opcodes are not even decodable. It is still interesting for debugging SSD issues to know what opcode is timing out, what request type it came from, and the data size (if applicable). Also print the command_id along side blk-mq's tag to help match commands with protocol wire traces and firmware logs, Reviewed-by: Max Gurtovoy Signed-off-by: Keith Busch commit 1ab33c03145d0f6c345823fc2da935d9a1a9e9fc Author: Dmitry Torokhov Date: Sun Jan 7 22:16:45 2024 -0800 asm-generic: make sparse happy with odd-sized put_unaligned_*() __put_unaligned_be24() and friends use implicit casts to convert larger-sized data to bytes, which trips sparse truncation warnings when the argument is a constant: CC [M] drivers/input/touchscreen/hynitron_cstxxx.o CHECK drivers/input/touchscreen/hynitron_cstxxx.c drivers/input/touchscreen/hynitron_cstxxx.c: note: in included file (through arch/x86/include/generated/asm/unaligned.h): include/asm-generic/unaligned.h:119:16: warning: cast truncates bits from constant value (aa01a0 becomes a0) include/asm-generic/unaligned.h:120:20: warning: cast truncates bits from constant value (aa01 becomes 1) include/asm-generic/unaligned.h:119:16: warning: cast truncates bits from constant value (ab00d0 becomes d0) include/asm-generic/unaligned.h:120:20: warning: cast truncates bits from constant value (ab00 becomes 0) To avoid this let's mask off upper bits explicitly, the resulting code should be exactly the same, but it will keep sparse happy. Reported-by: kernel test robot Suggested-by: Linus Torvalds Closes: https://lore.kernel.org/oe-kbuild-all/202401070147.gqwVulOn-lkp@intel.com/ Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Torvalds commit 2324be17b5e05ac682e7c81fcbfc7b36a9b1becb Author: Harshit Mogalapalli Date: Mon Oct 30 00:27:57 2023 -0700 PCI: xilinx-xdma: Fix error code in xilinx_pl_dma_pcie_init_irq_domain() Currently, if the function irq_domain_add_linear() fails to allocate a new IRQ domain and returns NULL, we would then still return a success from the xilinx_pl_dma_pcie_init_irq_domain() function regardless, as the PTR_ERR(NULL) would return a value of zero. This is not a desirable outcome. Thus, fix the incorrect error code and return the -ENOMEM error code if the irq_domain_add_linear() fails to allocate a new IRQ domain. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20231030072757.3236546-1-harshit.m.mogalapalli@oracle.com Fixes: 8d786149d78c ("PCI: xilinx-xdma: Add Xilinx XDMA Root Port driver") Signed-off-by: Harshit Mogalapalli Signed-off-by: Krzysztof Wilczyński commit 1c6d984f523f67ecfad1083bb04c55d91977bb15 Author: Kirill A. Shutemov Date: Tue Dec 5 03:45:01 2023 +0300 x86/kvm: Do not try to disable kvmclock if it was not enabled kvm_guest_cpu_offline() tries to disable kvmclock regardless if it is present in the VM. It leads to write to a MSR that doesn't exist on some configurations, namely in TDX guest: unchecked MSR access error: WRMSR to 0x12 (tried to write 0x0000000000000000) at rIP: 0xffffffff8110687c (kvmclock_disable+0x1c/0x30) kvmclock enabling is gated by CLOCKSOURCE and CLOCKSOURCE2 KVM paravirt features. Do not disable kvmclock if it was not enabled. Signed-off-by: Kirill A. Shutemov Fixes: c02027b5742b ("x86/kvm: Disable kvmclock on all CPUs on shutdown") Reviewed-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Wanpeng Li Cc: stable@vger.kernel.org Message-Id: <20231205004510.27164-6-kirill.shutemov@linux.intel.com> Signed-off-by: Paolo Bonzini commit 83303a4c776ce1032d88df59e811183479acea77 Author: Eric Farman Date: Fri Dec 1 19:16:57 2023 +0100 KVM: s390: fix cc for successful PQAP The various errors that are possible when processing a PQAP instruction (the absence of a driver hook, an error FROM that hook), all correctly set the PSW condition code to 3. But if that processing works successfully, CC0 needs to be set to convey that everything was fine. Fix the check so that the guest can examine the condition code to determine whether GPR1 has meaningful data. Fixes: e5282de93105 ("s390: ap: kvm: add PQAP interception for AQIC") Signed-off-by: Eric Farman Reviewed-by: Tony Krowiak Reviewed-by: Halil Pasic Link: https://lore.kernel.org/r/20231201181657.1614645-1-farman@linux.ibm.com Signed-off-by: Janosch Frank Message-Id: <20231201181657.1614645-1-farman@linux.ibm.com> Signed-off-by: Christian Borntraeger commit 6b3d14b7f9b1acaf7303d8499836bf78ee9c470c Author: Tom Jason Schwanke Date: Mon Jan 8 16:15:21 2024 +0100 ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP Envy X360 13-ay0xxx This enables the mute and mic-mute LEDs on the HP Envy X360 13-ay0xxx convertibles. The quirk 'ALC245_FIXUP_HP_X360_MUTE_LEDS' already exists and is now enabled for this device. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216197 Signed-off-by: Tom Jason Schwanke Cc: Link: https://lore.kernel.org/r/651b26e9-e86b-45dd-aa90-3e43d6b99823@catboys.cloud Signed-off-by: Takashi Iwai commit 587371ed783b046f22ba7a5e1cc9a19ae35123b4 Author: Damien Le Moal Date: Sun Jan 7 16:22:12 2024 +0900 block: Treat sequential write preferred zone type as invalid With the removal of the support for host-aware zoned devices, blk_revalidate_zone_cb() should never see the zone type BLK_ZONE_TYPE_SEQWRITE_PREF (sequential write preffered zones). Treat this zone type as being invalid. Fixes: 7437bb73f087 ("block: remove support for the host aware zone model") Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240107072212.1071080-1-dlemoal@kernel.org Signed-off-by: Jens Axboe commit 41c71105a845ec1458680f01644d032a5fbbe0d9 Author: Aleksa Savic Date: Tue Dec 19 15:36:19 2023 +0100 hwmon: (gigabyte_waterforce) Mark status report as received under a spinlock Through hidraw, userspace can cause a status report to be sent from the device. The parsing in waterforce_raw_event() may happen in parallel to a waterforce_get_status() call (which resets the completion for tracking the report) if it's running on a different CPU where bottom half interrupts are not disabled. Add a spinlock around the complete_all() call in waterforce_raw_event() to prevent race issues. Fixes: d5939a793693 ("hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers") Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20231219143620.22179-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck commit 4e33b071bb8e8415fb9847249ffcf300fa7d8cac Author: Christoph Hellwig Date: Thu Dec 28 07:51:41 2023 +0000 block: remove disk_clear_zoned disk_clear_zoned is unused now that the last warts of the host-aware model support in sd are gone. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20231228075141.362560-3-hch@lst.de Signed-off-by: Jens Axboe commit 6945a1804e5c2a3382232a8d6c2143930b833362 Author: Christoph Hellwig Date: Thu Dec 28 07:51:40 2023 +0000 sd: remove the !ZBC && blk_queue_is_zoned case in sd_read_block_characteristics Now that host-aware devices are always treated as conventional this case can't happen. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20231228075141.362560-2-hch@lst.de Signed-off-by: Jens Axboe commit 8249a0e25dd2972e919a2552425bf4faa2581d24 Author: Abdel Alkuor Date: Fri Jan 5 22:02:53 2024 -0500 hwmon: (lm75) Fix tmp112 default config Set tmp112 conversion rate to 8 HZ and 12-bit mode. Fixes: 35cd18048542 ("hwmon: (lm75) Aproximate sample times to data-sheet values") Signed-off-by: Abdel Alkuor Link: https://lore.kernel.org/r/20240106030254.384963-1-alkuor@gmail.com Signed-off-by: Guenter Roeck commit 7f26fea9bc085290e3731501f4f8fc5b82b9d615 Merge: 3115d2de39b87 e59f75de4e501 Author: Paolo Bonzini Date: Mon Jan 8 08:10:32 2024 -0500 Merge tag 'kvm-x86-mmu-6.8' of https://github.com/kvm-x86/linux into HEAD KVM x86 MMU changes for 6.8: - Fix a relatively benign off-by-one error when splitting huge pages during CLEAR_DIRTY_LOG. - Fix a bug where KVM could incorrectly test-and-clear dirty bits in non-leaf TDP MMU SPTEs if a racing thread replaces a huge SPTE with a non-huge SPTE. - Relax the TDP MMU's lockdep assertions related to holding mmu_lock for read versus write so that KVM doesn't pass "bool shared" all over the place just to have precise assertions in paths that don't actually care about whether the caller is a reader or a writer. commit 3115d2de39b8762fdaebc3d222f2ad09f6a2f762 Merge: 8c9244af4dc86 6d72283526090 Author: Paolo Bonzini Date: Mon Jan 8 08:10:20 2024 -0500 Merge tag 'kvm-x86-xen-6.8' of https://github.com/kvm-x86/linux into HEAD KVM Xen change for 6.8: To workaround Xen guests that don't expect Xen PV clocks to be marked as being based on a stable TSC, add a Xen config knob to allow userspace to opt out of KVM setting the "TSC stable" bit in Xen PV clocks. Note, the "TSC stable" bit was added to the PVCLOCK ABI by KVM without an ack from Xen, i.e. KVM isn't entirely blameless for the buggy guest behavior. commit 8c9244af4dc8680a453e759331f0c93d5bde1898 Merge: 8ecb10bcbfa38 72046d0a077a8 Author: Paolo Bonzini Date: Mon Jan 8 08:10:16 2024 -0500 Merge tag 'kvm-x86-svm-6.8' of https://github.com/kvm-x86/linux into HEAD KVM SVM changes for 6.8: - Revert a bogus, made-up nested SVM consistency check for TLB_CONTROL. - Advertise flush-by-ASID support for nSVM unconditionally, as KVM always flushes on nested transitions, i.e. always satisfies flush requests. This allows running bleeding edge versions of VMware Workstation on top of KVM. - Sanity check that the CPU supports flush-by-ASID when enabling SEV support. - Fix a benign NMI virtualization bug where KVM would unnecessarily intercept IRET when manually injecting an NMI, e.g. when KVM pends an NMI and injects a second, "simultaneous" NMI. commit 8ecb10bcbfa389cc7715f8b1f3894b2aeca23f0c Merge: 01edb1cfbdb98 183bdd161c2b7 Author: Paolo Bonzini Date: Mon Jan 8 08:10:12 2024 -0500 Merge tag 'kvm-x86-lam-6.8' of https://github.com/kvm-x86/linux into HEAD KVM x86 support for virtualizing Linear Address Masking (LAM) Add KVM support for Linear Address Masking (LAM). LAM tweaks the canonicality checks for most virtual address usage in 64-bit mode, such that only the most significant bit of the untranslated address bits must match the polarity of the last translated address bit. This allows software to use ignored, untranslated address bits for metadata, e.g. to efficiently tag pointers for address sanitization. LAM can be enabled separately for user pointers and supervisor pointers, and for userspace LAM can be select between 48-bit and 57-bit masking - 48-bit LAM: metadata bits 62:48, i.e. LAM width of 15. - 57-bit LAM: metadata bits 62:57, i.e. LAM width of 6. For user pointers, LAM enabling utilizes two previously-reserved high bits from CR3 (similar to how PCID_NOFLUSH uses bit 63): LAM_U48 and LAM_U57, bits 62 and 61 respectively. Note, if LAM_57 is set, LAM_U48 is ignored, i.e.: - CR3.LAM_U48=0 && CR3.LAM_U57=0 == LAM disabled for user pointers - CR3.LAM_U48=1 && CR3.LAM_U57=0 == LAM-48 enabled for user pointers - CR3.LAM_U48=x && CR3.LAM_U57=1 == LAM-57 enabled for user pointers For supervisor pointers, LAM is controlled by a single bit, CR4.LAM_SUP, with the 48-bit versus 57-bit LAM behavior following the current paging mode, i.e.: - CR4.LAM_SUP=0 && CR4.LA57=x == LAM disabled for supervisor pointers - CR4.LAM_SUP=1 && CR4.LA57=0 == LAM-48 enabled for supervisor pointers - CR4.LAM_SUP=1 && CR4.LA57=1 == LAM-57 enabled for supervisor pointers The modified LAM canonicality checks: - LAM_S48 : [ 1 ][ metadata ][ 1 ] 63 47 - LAM_U48 : [ 0 ][ metadata ][ 0 ] 63 47 - LAM_S57 : [ 1 ][ metadata ][ 1 ] 63 56 - LAM_U57 + 5-lvl paging : [ 0 ][ metadata ][ 0 ] 63 56 - LAM_U57 + 4-lvl paging : [ 0 ][ metadata ][ 0...0 ] 63 56..47 The bulk of KVM support for LAM is to emulate LAM's modified canonicality checks. The approach taken by KVM is to "fill" the metadata bits using the highest bit of the translated address, e.g. for LAM-48, bit 47 is sign-extended to bits 62:48. The most significant bit, 63, is *not* modified, i.e. its value from the raw, untagged virtual address is kept for the canonicality check. This untagging allows Aside from emulating LAM's canonical checks behavior, LAM has the usual KVM touchpoints for selectable features: enumeration (CPUID.7.1:EAX.LAM[bit 26], enabling via CR3 and CR4 bits, etc. commit 01edb1cfbdb984ebe7b490cce544e908c402e859 Merge: 33d0403fdad8f fd89499a5151d Author: Paolo Bonzini Date: Mon Jan 8 08:10:08 2024 -0500 Merge tag 'kvm-x86-pmu-6.8' of https://github.com/kvm-x86/linux into HEAD KVM x86 PMU changes for 6.8: - Fix a variety of bugs where KVM fail to stop/reset counters and other state prior to refreshing the vPMU model. - Fix a double-overflow PMU bug by tracking emulated counter events using a dedicated field instead of snapshotting the "previous" counter. If the hardware PMC count triggers overflow that is recognized in the same VM-Exit that KVM manually bumps an event count, KVM would pend PMIs for both the hardware-triggered overflow and for KVM-triggered overflow. commit 33d0403fdad8f4f6a1ccf552bdc31a0170f665b8 Merge: 0afdfd85e33af 15223c4f973a6 Author: Paolo Bonzini Date: Mon Jan 8 08:10:04 2024 -0500 Merge tag 'kvm-x86-misc-6.8' of https://github.com/kvm-x86/linux into HEAD KVM x86 misc changes for 6.8: - Turn off KVM_WERROR by default for all configs so that it's not inadvertantly enabled by non-KVM developers, which can be problematic for subsystems that require no regressions for W=1 builds. - Advertise all of the host-supported CPUID bits that enumerate IA32_SPEC_CTRL "features". - Don't force a masterclock update when a vCPU synchronizes to the current TSC generation, as updating the masterclock can cause kvmclock's time to "jump" unexpectedly, e.g. when userspace hotplugs a pre-created vCPU. - Use RIP-relative address to read kvm_rebooting in the VM-Enter fault paths, partly as a super minor optimization, but mostly to make KVM play nice with position independent executable builds. commit 0afdfd85e33afdbda4cdd219c22ee5bf95b005f4 Merge: fb872da8e720f 017a99a966f11 Author: Paolo Bonzini Date: Mon Jan 8 08:10:01 2024 -0500 Merge tag 'kvm-x86-hyperv-6.8' of https://github.com/kvm-x86/linux into HEAD KVM x86 Hyper-V changes for 6.8: - Guard KVM-on-HyperV's range-based TLB flush hooks with an #ifdef on CONFIG_HYPERV as a minor optimization, and to self-document the code. - Add CONFIG_KVM_HYPERV to allow disabling KVM support for HyperV "emulation" at build time. commit fb872da8e720f8281dde01b8929419eb5ae6b033 Merge: 5f53d88f10eb0 1f829359c8c37 Author: Paolo Bonzini Date: Mon Jan 8 08:09:57 2024 -0500 Merge tag 'kvm-x86-generic-6.8' of https://github.com/kvm-x86/linux into HEAD Common KVM changes for 6.8: - Use memdup_array_user() to harden against overflow. - Unconditionally advertise KVM_CAP_DEVICE_CTRL for all architectures. commit 5f53d88f10eb07de0a9bf50e6ad21982e48fd3e3 Merge: 783288010035e 040113fa32f27 Author: Paolo Bonzini Date: Mon Jan 8 08:09:53 2024 -0500 Merge tag 'kvmarm-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for Linux 6.8 - LPA2 support, adding 52bit IPA/PA capability for 4kB and 16kB base granule sizes. Branch shared with the arm64 tree. - Large Fine-Grained Trap rework, bringing some sanity to the feature, although there is more to come. This comes with a prefix branch shared with the arm64 tree. - Some additional Nested Virtualization groundwork, mostly introducing the NV2 VNCR support and retargetting the NV support to that version of the architecture. - A small set of vgic fixes and associated cleanups. commit 783288010035e4c250a0b6491a4642cdb8d30548 Author: Paolo Bonzini Date: Mon Jan 8 07:51:26 2024 -0500 KVM: x86: add missing "depends on KVM" Support for KVM software-protected VMs should not be configurable, if KVM is not available at all. Fixes: 89ea60c2c7b5 ("KVM: x86: Add support for "protected VMs" that can utilize private memory") Signed-off-by: Paolo Bonzini commit 3a373e027d8b0ed14963cc84b48a11e69e4506b6 Author: Paolo Bonzini Date: Sat Jan 6 02:24:00 2024 -0500 KVM: fix direction of dependency on MMU notifiers KVM_GENERIC_MEMORY_ATTRIBUTES requires the generic MMU notifier code, because it uses kvm_mmu_invalidate_begin/end. However, it would not work with a bespoke implementation of MMU notifiers that does not use KVM_GENERIC_MMU_NOTIFIER, because most likely it would not synchronize correctly on invalidation. So the right thing to do is to note the problematic configuration if the architecture does not select itself KVM_GENERIC_MMU_NOTIFIER; not to enable it blindly. Signed-off-by: Paolo Bonzini commit caadf876bb7449bf25ef817afe7fb881df8198a2 Author: Paolo Bonzini Date: Thu Jan 4 11:15:07 2024 -0500 KVM: introduce CONFIG_KVM_COMMON CONFIG_HAVE_KVM is currently used by some architectures to either enabled the KVM config proper, or to enable host-side code that is not part of the KVM module. However, CONFIG_KVM's "select" statement in virt/kvm/Kconfig corresponds to a third meaning, namely to enable common Kconfigs required by all architectures that support KVM. These three meanings can be replaced respectively by an architecture-specific Kconfig, by IS_ENABLED(CONFIG_KVM), or by a new Kconfig symbol that is in turn selected by the architecture-specific "config KVM". Start by introducing such a new Kconfig symbol, CONFIG_KVM_COMMON. Unlike CONFIG_HAVE_KVM, it is selected by CONFIG_KVM, not by architecture code, and it brings in all dependencies of common KVM code. In particular, INTERVAL_TREE was missing in loongarch and riscv, so that is another thing that is fixed. Fixes: 8132d887a702 ("KVM: remove CONFIG_HAVE_KVM_EVENTFD", 2023-12-08) Reported-by: Randy Dunlap Closes: https://lore.kernel.org/all/44907c6b-c5bd-4e4a-a921-e4d3825539d8@infradead.org/ Reviewed-by: Andrew Jones Signed-off-by: Paolo Bonzini commit 7aeb259086487417f0fecf66e325bee133e8813a Author: bo liu Date: Mon Jan 8 19:02:35 2024 +0800 ALSA: hda/conexant: Fix headset auto detect fail in cx8070 and SN6140 When OMTP headset plugin the headset jack of CX8070 and SN6160 sound cards, the headset type detection circuit will recognize the headset type as CTIA. At this point, plugout and plugin the headset will get the correct headset type as OMTP. The reason for the failure of headset type recognition is that the sound card creation will enable the VREF voltage of the headset mic, which interferes with the headset type automatic detection circuit. Plugout and plugin the headset will restart the headset detection and get the correct headset type. The patch is disable the VREF voltage when the headset is not present, and will enable the VREF voltage when the headset is present. Signed-off-by: bo liu Link: https://lore.kernel.org/r/20240108110235.3867-1-bo.liu@senarytech.com Signed-off-by: Takashi Iwai commit f55c096f62f100aa9f5f48d86e1b6846ecbd67e7 Author: Yuezhang Mo Date: Tue May 30 17:35:00 2023 +0800 exfat: do not zero the extended part Since the read operation beyond the ValidDataLength returns zero, if we just extend the size of the file, we don't need to zero the extended part, but only change the DataLength without changing the ValidDataLength. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 11a347fb6cef62ce47e84b97c45f2b2497c7593b Author: Yuezhang Mo Date: Mon Mar 13 12:38:53 2023 +0800 exfat: change to get file size from DataLength In stream extension directory entry, the ValidDataLength field describes how far into the data stream user data has been written, and the DataLength field describes the file size. Signed-off-by: Yuezhang Mo Reviewed-by: Andy Wu Reviewed-by: Aoyama Wataru Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 34939ae005ec402ee183956114b1a74cb57b8b9d Author: John Sanpe Date: Fri Dec 8 07:47:01 2023 +0800 exfat: using ffs instead of internal logic Replaced the internal table lookup algorithm with ffs of the bitops library with better performance. Use it to increase the single processing length of the exfat_find_free_bitmap function, from single-byte search to long type. Signed-off-by: John Sanpe Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 7423546040194e0e74fcfedd089a8b2720fcfc6e Author: John Sanpe Date: Tue Dec 5 23:58:37 2023 +0800 exfat: using hweight instead of internal logic Replace the internal table lookup algorithm with the hweight library, which has instruction set acceleration capabilities. Use it to increase the length of a single calculation of the exfat_find_free_bitmap function to the long type. Signed-off-by: John Sanpe Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit f1e5e4639781724d05d90309900321baaecfde74 Merge: 0b055cf441224 7839d0078e0d5 Author: Rafael J. Wysocki Date: Mon Jan 8 13:42:48 2024 +0100 Merge branch 'pm-sleep' Merge system-wide power management updates for 6.8-rc1: - Fix possible deadlocks in the core system-wide PM code that occur if device-handling functions cannot be executed asynchronously during resune from system-wide suspend (Rafael J. Wysocki). - Clean up unnecessary local variable initializations in multiple places in the hibernation code (Wang chaodong, Li zeming). - Adjust core hibernation code to avoid missing wakeup events that occur after saving an image to persistent storage (Chris Feng). - Update hibernation code to enforce correct ordering during image compression and decompression (Hongchen Zhang). - Use kmap_local_page() instead of kmap_atomic() in copy_data_page() during hibernation and restore (Chen Haonan). - Adjust documentation and code comments to reflect recent task freezer changes (Kevin Hao). - Repair excess function parameter description warning in the hibernation image-saving code (Randy Dunlap). * pm-sleep: PM: sleep: Fix possible deadlocks in core system-wide PM code async: Introduce async_schedule_dev_nocall() async: Split async_schedule_node_domain() PM: hibernate: Repair excess function parameter description warning PM: sleep: Remove obsolete comment from unlock_system_sleep() Documentation: PM: Adjust freezing-of-tasks.rst to the freezer changes PM: hibernate: Use kmap_local_page() in copy_data_page() PM: hibernate: Enforce ordering during image compression/decompression PM: hibernate: Avoid missing wakeup events during hibernation PM: hibernate: Do not initialize error in snapshot_write_next() PM: hibernate: Do not initialize error in swap_write_page() PM: hibernate: Drop unnecessary local variable initialization commit 0b055cf4412240bec9fe684bde157c7161879f5c Merge: 4ee4ffccc01c8 c8f5caec3df84 e956c884ef50a bfd7b2d95ef46 Author: Rafael J. Wysocki Date: Mon Jan 8 13:39:59 2024 +0100 Merge branches 'pm-cpuidle', 'pm-cpufreq' and 'pm-devfreq' Merge cpuidle, cpufreq and devfreq updates for 6.8-rc1: - Add support for the Sierra Forest, Grand Ridge and Meteorlake SoCs to the intel_idle cpuidle driver (Artem Bityutskiy, Zhang Rui). - Do not enable interrupts when entering idle in the haltpoll cpuidle driver (Borislav Petkov). - Add Emerald Rapids support in no-HWP mode to the intel_pstate cpufreq driver (Zhenguo Yao). - Use EPP values programmed by the platform firmware as balance performance ones by default in intel_pstate (Srinivas Pandruvada). - Add a missing function return value check to the SCMI cpufreq driver to avoid unexpected behavior (Alexandra Diupina). - Fix parameter type warning in the armada-8k cpufreq driver (Gregory CLEMENT). - Rework trans_stat_show() in the devfreq core code to avoid buffer overflows (Christian Marangi). - Synchronize devfreq_monitor_[start/stop] so as to prevent a timer list corruption from occurring when devfreq governors are switched frequently (Mukesh Ojha). * pm-cpuidle: cpuidle: haltpoll: Do not enable interrupts when entering idle intel_idle: add Sierra Forest SoC support intel_idle: add Grand Ridge SoC support intel_idle: Add Meteorlake support * pm-cpufreq: cpufreq: intel_pstate: Add Emerald Rapids support in no-HWP mode cpufreq: armada-8k: Fix parameter type warning cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() cpufreq: intel_pstate: Prioritize firmware-provided balance performance EPP * pm-devfreq: PM / devfreq: Synchronize devfreq_monitor_[start/stop] PM / devfreq: Convert to use sysfs_emit_at() API PM / devfreq: Fix buffer overflow in trans_stat_show commit 3ec71290db4de298b67659ef2bc2a8f84cf9537b Author: Peter Ujfalusi Date: Mon Jan 8 11:48:42 2024 +0200 ASoC: Intel: bxt_rt298: Fix kernel ops due to COMP_DUMMY change The change to avoid dummy components will leave the component name and dai_name NULL which will cause NULL dereference when trying to access to it in the machine driver when applying fixups. Link: https://github.com/thesofproject/linux/pull/4759#issuecomment-1878641868 Fixes: 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240108094842.28782-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 59b946ea30806064c4ac78f0ac93642655dd4f2e Author: Peter Ujfalusi Date: Mon Jan 8 11:48:41 2024 +0200 ASoC: Intel: bxt_da7219_max98357a: Fix kernel ops due to COMP_DUMMY change The change to avoid dummy components will leave the component name and dai_name NULL which will cause NULL dereference when trying to access to it in the machine driver when applying fixups. Link: https://github.com/thesofproject/linux/pull/4759#issuecomment-1878641868 Fixes: 13f58267cda3 ("ASoC: soc.h: don't create dummy Component via COMP_DUMMY()") Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240108094842.28782-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 4ee4ffccc01c8b3ff18abd6fdf56aad32a994442 Merge: 610a9b8f49fbc dcfec12b67980 Author: Rafael J. Wysocki Date: Mon Jan 8 13:17:17 2024 +0100 Merge tag 'opp-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-opp Merge OPP (Operating Performance Points) updates for 6.8 from Viresh Kumar: "- Fix _set_required_opps when opp is NULL (Bryan O'Donoghue). - ti: Use device_get_match_data() (Rob Herring). - Minor cleanups around OPP level and other parts and call dev_pm_opp_set_opp() recursively for required OPPs (Viresh Kumar)." * tag 'opp-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: OPP: Rename 'rate_clk_single' OPP: Pass rounded rate to _set_opp() OPP: Relocate dev_pm_opp_sync_regulators() OPP: Move dev_pm_opp_icc_bw to internal opp.h OPP: Fix _set_required_opps when opp is NULL OPP: The level field is always of unsigned int type OPP: Check for invalid OPP in dev_pm_opp_find_level_ceil() OPP: Don't set OPP recursively for a parent genpd OPP: Call dev_pm_opp_set_opp() for required OPPs OPP: Use _set_opp_level() for single genpd case OPP: Level zero is valid opp: ti: Use device_get_match_data() commit cdb3033e191fd03da2d7da23b9cd448dfa180a8e Merge: fbb66ce0b1d67 f60a631ab9ed5 Author: Ingo Molnar Date: Mon Jan 8 12:57:28 2024 +0100 Merge branch 'sched/urgent' into sched/core, to pick up pending v6.7 fixes for the v6.8 merge window This fix didn't make it upstream in time, pick it up for the v6.8 merge window. Signed-off-by: Ingo Molnar commit d24b923f1d696ddacb09f0f2d1b1f4f045cfe65e Author: Dan Carpenter Date: Mon Jan 8 12:06:11 2024 +0300 RDMA/bnxt_re: Fix error code in bnxt_re_create_cq() Return -ENOMEM if get_zeroed_page() fails. Don't return success. Fixes: e275919d9669 ("RDMA/bnxt_re: Share a page to expose per CQ info with userspace") Link: https://lore.kernel.org/r/d714306e-b7d7-4e89-b973-a9ff0f260c78@moroto.mountain Signed-off-by: Dan Carpenter Acked-by: Selvin Xavier Signed-off-by: Leon Romanovsky commit 2f9060b1db4aa2c21c248e34476d8936a2b69cf6 Author: Bjorn Helgaas Date: Wed Jan 3 17:16:03 2024 -0600 MIPS: Fix typos Fix typos, most reported by "codespell arch/mips". Only touches comments, no code changes. Signed-off-by: Bjorn Helgaas Cc: linux-mips@vger.kernel.org Reviewed-by: Randy Dunlap Signed-off-by: Thomas Bogendoerfer commit 2b9d9e0a9ba0e24cb9c78336481f0ed8b2bc1ff2 Author: Ingo Molnar Date: Mon Jan 8 09:31:16 2024 +0100 locking/mutex: Clarify that mutex_unlock(), and most other sleeping locks, can still use the lock object after it's unlocked Clarify the mutex lock lifetime rules a bit more. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Jann Horn Cc: Linus Torvalds Link: https://lore.kernel.org/r/20231201121808.GL3818@noisy.programming.kicks-ass.net commit 0205f3753dbe15fe8b5c08302f44b69a80a83167 Merge: 821e2ac632ff7 67508b874844b Author: Takashi Iwai Date: Mon Jan 8 08:18:02 2024 +0100 Merge tag 'asoc-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v6.8 This is a relatively quiet release, there's a lot of driver specific changes and the usual high level of activity in the SOF core but the one big core change was Mormioto-san's work to support more N:M CPU:CODEC mapping cases. Highlights include: - Enhanced support for N:M CPU:CODEC mappings in the core and in audio-graph-card2. - Support for falling back to older SOF IPC versions where firmware for new versions is not available. - Support for notification of control changes generated by SOF firmware with IPC4. - Device tree support for describing parts of the card which can be active over suspend (for very low power playback or wake word use cases). - ACPI parsing support for the ES83xx driver, reducing the number of quirks neede for x86 systems. - Support for more AMD and Intel systems, NXP i.MX8m MICFIL, Qualcomm SM8250, SM8550, SM8650 and X1E80100. - Removal of Freescale MPC8610 support, the SoC is no longer supported by Linux. commit 821e2ac632ff77bf7abaf2dfad7214fe8563edf1 Merge: b6ce6e6c79e4e f90dffdce70ff Author: Takashi Iwai Date: Mon Jan 8 08:17:18 2024 +0100 Merge branch 'for-next' into for-linus Prepare for 6.8 merge. Signed-off-by: Takashi Iwai commit c7ec4f2d684e17d69bbdd7c4324db0ef5daac26a Author: Jan Beulich Date: Mon Jan 8 07:41:39 2024 +0100 xen-netback: don't produce zero-size SKB frags While frontends may submit zero-size requests (wasting a precious slot), core networking code as of at least 3ece782693c4b ("sock: skb_copy_ubufs support for compound pages") can't deal with SKBs when they have all zero-size fragments. Respond to empty requests right when populating fragments; all further processing is fragment based and hence won't encounter these empty requests anymore. In a way this should have been that way from the beginning: When no data is to be transferred for a particular request, there's not even a point in validating the respective grant ref. That's no different from e.g. passing NULL into memcpy() when at the same time the size is 0. This is XSA-448 / CVE-2023-46838. Cc: stable@vger.kernel.org Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Reviewed-by: Paul Durrant commit 8a3c4e44c243308c2364a00f9944c3d6fbdeb125 Author: Paulo Alcantara Date: Sat Jan 6 20:05:18 2024 -0300 cifs: get rid of dup length check in parse_reparse_point() smb2_compound_op(SMB2_OP_GET_REPARSE) already checks if ioctl response has a valid reparse data buffer's length, so there's no need to check it again in parse_reparse_point(). In order to get rid of duplicate check, validate reparse data buffer's length also in cifs_query_reparse_point(). Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 3fbf61207c66ff7ac9b60ab76d4bfd239f97e973 Author: Jakub Kicinski Date: Sun Jan 7 17:14:51 2024 -0800 Revert "mlx5 updates 2023-12-20" Revert "net/mlx5: Implement management PF Ethernet profile" This reverts commit 22c4640698a1d47606b5a4264a584e8046641784. Revert "net/mlx5: Enable SD feature" This reverts commit c88c49ac9c18fb7c3fa431126de1d8f8f555e912. Revert "net/mlx5e: Block TLS device offload on combined SD netdev" This reverts commit 83a59ce0057b7753d7fbece194b89622c663b2a6. Revert "net/mlx5e: Support per-mdev queue counter" This reverts commit d72baceb92539a178d2610b0e9ceb75706a75b55. Revert "net/mlx5e: Support cross-vhca RSS" This reverts commit c73a3ab8fa6e93a783bd563938d7cf00d62d5d34. Revert "net/mlx5e: Let channels be SD-aware" This reverts commit e4f9686bdee7b4dd89e0ed63cd03606e4bda4ced. Revert "net/mlx5e: Create EN core HW resources for all secondary devices" This reverts commit c4fb94aa822d6c9d05fc3c5aee35c7e339061dc1. Revert "net/mlx5e: Create single netdev per SD group" This reverts commit e2578b4f983cfcd47837bbe3bcdbf5920e50b2ad. Revert "net/mlx5: SD, Add informative prints in kernel log" This reverts commit c82d360325112ccc512fc11a3b68cdcdf04a1478. Revert "net/mlx5: SD, Implement steering for primary and secondaries" This reverts commit 605fcce33b2d1beb0139b6e5913fa0b2062116b2. Revert "net/mlx5: SD, Implement devcom communication and primary election" This reverts commit a45af9a96740873db9a4b5bb493ce2ad81ccb4d5. Revert "net/mlx5: SD, Implement basic query and instantiation" This reverts commit 63b9ce944c0e26c44c42cdd5095c2e9851c1a8ff. Revert "net/mlx5: SD, Introduce SD lib" This reverts commit 4a04a31f49320d078b8078e1da4b0e2faca5dfa3. Revert "net/mlx5: Fix query of sd_group field" This reverts commit e04984a37398b3f4f5a79c993b94c6b1224184cc. Revert "net/mlx5e: Use the correct lag ports number when creating TISes" This reverts commit a7e7b40c4bc115dbf2a2bb453d7bbb2e0ea99703. There are some unanswered questions on the list, and we don't have any docs. Given the lack of replies so far and the fact that v6.8 merge window has started - let's revert this and revisit for v6.9. Link: https://lore.kernel.org/all/20231221005721.186607-1-saeed@kernel.org/ Signed-off-by: Jakub Kicinski commit e9ee910218ffd420454b52a052d6f1087354905b Author: Jakub Kicinski Date: Sun Jan 7 17:11:38 2024 -0800 Revert "net: stmmac: Enable Per DMA Channel interrupt" Revert "net: stmmac: Use interrupt mode INTM=1 for per channel irq" This reverts commit 36af9f25ddfd311da82628f194c794786467cb12. Revert "net: stmmac: Add support for TX/RX channel interrupt" This reverts commit 9072e03d32088137a435ddf3aa95fd6e038d69d8. Revert "net: stmmac: Make MSI interrupt routine generic" This reverts commit 477bd4beb93bf9ace9bda71f1437b191befa9cf4. Revert "dt-bindings: net: snps,dwmac: per channel irq" This reverts commit 67d47c8ada0f8795bfcdb85cc8f2ad3ce556674b. Device tree bindings need to be reviewed. Link: https://lore.kernel.org/all/2df9fe3e-7971-4aa2-89a9-0e085b3b00d7@linaro.org/ Signed-off-by: Jakub Kicinski commit e3d3fe7e7bf08820a83c9d9a4c38c7b29a2927f1 Author: Christophe JAILLET Date: Tue Dec 19 06:07:12 2023 +0100 rtc: class: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/4f2c049cb09d46fed336e22445c71988b4f340d6.1702962419.git.christophe.jaillet@wanadoo.fr Signed-off-by: Alexandre Belloni commit 2eab8bc0f0c80ddb8c7d8192ff6f13c2bc505739 Author: Takashi Sakamoto Date: Mon Dec 25 07:23:01 2023 +0900 firewire: core: detect model name for legacy layout of configuration ROM As the part of support for legacy layout of configuration ROM, this commit traverses vendor directory as well as root directory when showing device attribute for node device. This change expects 'model_name' attribute appears in node device, however it is probable to see the other types of descriptor leaf if the vendor directory includes. Suggested-by: Adam Goldman Link: https://lore.kernel.org/r/20231221134849.603857-8-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit b6a38057d06e282c1a4630db1d7b74548664a1d7 Author: Takashi Sakamoto Date: Mon Dec 25 07:23:01 2023 +0900 firewire: core: detect numeric model identifier for legacy layout of configuration ROM As the part of support for legacy layout of configuration ROM, this commit traverses vendor directory as well as root directory when showing device attribute for node device. This change expects 'model' attribute appears in node device, however it is probable to see the other types of immediate values if the vendor directory includes. Suggested-by: Adam Goldman Link: https://lore.kernel.org/r/20231221134849.603857-7-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 58aae0a00e0d1d677d064280c69aa10038af97ea Author: Takashi Sakamoto Date: Mon Dec 25 07:23:00 2023 +0900 firewire: test: add test of device attributes for legacy AV/C device Some legacy devices have configuration ROM against standard AV/C device. They have vendor directory to store model identifier. It is described in annex of the following document. - Configuration ROM for AV/C Devices 1.0 (Dec. 12, 2000, 1394 Trading Association) In the case, current implementation of core function does not detect the model identifier, thus device attributes and modalias of unit have lack of it. Another KUnit test is required for the case, and this commit is for the purpose. The following output is the parse result for the hard-coded data, by config-rom-pretty-printer in linux-firewire-utils (https://git.kernel.org/pub/scm/utils/ieee1394/linux-firewire-utils.git/). The data is written by my hand. $ config-rom-pretty-printer < /tmp/rom.img ROM header and bus information block ----------------------------------------------------------------- 1024 04199fe7 bus_info_length 4, crc_length 25, crc 40935 1028 31333934 bus_name "1394" 1032 e0644000 irmc 1, cmc 1, isc 1, bmc 0, cyc_clk_acc 100, max_rec 4 (32) 1036 00112233 company_id 001122 | 1040 44556677 device_id 220189779575 | EUI-64 4822678189205111 root directory ----------------------------------------------------------------- 1044 0005dace directory_length 5, crc 56014 1048 03012345 vendor 1052 0c0083c0 node capabilities: per IEEE 1394 1056 8d000009 --> eui-64 leaf at 1092 1060 d1000002 --> unit directory at 1068 1064 c3000004 --> vendor directory at 1080 unit directory at 1068 ----------------------------------------------------------------- 1068 0002e107 directory_length 2, crc 57607 1072 12abcdef specifier id 1076 13543210 version vendor directory at 1080 ----------------------------------------------------------------- 1080 0002cb73 directory_length 2, crc 52083 1084 17fedcba model 1088 81000004 --> descriptor leaf at 1104 eui-64 leaf at 1092 ----------------------------------------------------------------- 1092 00026dc1 leaf_length 2, crc 28097 1096 00112233 company_id 001122 | 1100 44556677 device_id 220189779575 | EUI-64 4822678189205111 descriptor leaf at 1104 ----------------------------------------------------------------- 1104 00050e84 leaf_length 5, crc 3716 1108 00000000 textual descriptor 1112 00000000 minimal ASCII 1116 41424344 "ABCD" 1120 45464748 "EFGH" 1124 494a0000 "IJ" Link: https://lore.kernel.org/r/20231221134849.603857-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 1c8506d62624fbc57db75414a387f365da8422e9 Author: Takashi Sakamoto Date: Mon Dec 25 07:23:00 2023 +0900 firewire: test: add test of device attributes for simple AV/C device At present, core function can handle node which has configuration ROM similar to standard AV/C device somehow. The standard layout of configuration ROM is described in the following document. - Configuration ROM for AV/C Devices 1.0 (Dec. 12, 2000, 1394 Trading Association) This commit adds a KUnit test for the above case. The following output is the parse result for the hard-coded data, by config-rom-pretty-printer in linux-firewire-utils (https://git.kernel.org/pub/scm/utils/ieee1394/linux-firewire-utils.git/). $ config-rom-pretty-printer < /tmp/rom.img ROM header and bus information block ----------------------------------------------------------------- 1024 0404eabf bus_info_length 4, crc_length 4, crc 60095 1028 31333934 bus_name "1394" 1032 e0646102 irmc 1, cmc 1, isc 1, bmc 0, cyc_clk_acc 100, max_rec 6 (128) 1036 ffffffff company_id ffffff | 1040 ffffffff device_id 1099511627775 | EUI-64 18446744073709551615 root directory ----------------------------------------------------------------- 1044 00063287 directory_length 6, crc 12935 1048 03ffffff vendor 1052 8100000a --> descriptor leaf at 1092 1056 17ffffff model 1060 8100000e --> descriptor leaf at 1116 1064 0c0083c0 node capabilities: per IEEE 1394 1068 d1000001 --> unit directory at 1072 unit directory at 1072 ----------------------------------------------------------------- 1072 0004442d directory_length 4, crc 17453 1076 1200a02d specifier id 1080 13010001 version 1084 17ffffff model 1088 81000007 --> descriptor leaf at 1116 descriptor leaf at 1092 ----------------------------------------------------------------- 1092 0005c915 leaf_length 5, crc 51477 1096 00000000 textual descriptor 1100 00000000 minimal ASCII 1104 56656e64 "Vend" 1108 6f72204e "or N" 1112 616d6500 "ame" descriptor leaf at 1116 ----------------------------------------------------------------- 1116 00057f16 leaf_length 5, crc 32534 1120 00000000 textual descriptor 1124 00000000 minimal ASCII 1128 4d6f6465 "Mode" 1132 6c204e61 "l Na" 1136 6d650000 "me" Link: https://lore.kernel.org/r/20231221134849.603857-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 1770d39d10dd4c7b867e8e9f88d0f23373df3773 Author: Takashi Sakamoto Date: Mon Dec 25 07:23:00 2023 +0900 firewire: test: add KUnit test for device attributes The traverse over CSR space results in attributes of node and unit devices. Any test of the traverse is useful. This commit adds a skeleton of KUnit test for the purpose. Link: https://lore.kernel.org/r/20231221134849.603857-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit afa36dadd3b3f509ab48eabc1a89f487be6c6af4 Author: Takashi Sakamoto Date: Mon Dec 25 07:23:00 2023 +0900 firewire: core: replace magic number with macro In IEEE 1394 specification, the size of bus information block of configuration ROM is fixed to 5, thus the offset of root directory is 5. Current implementation to handle device structures has the hard-coded offset. This commit replaces the offset with macro. Link: https://lore.kernel.org/r/20231221134849.603857-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit f1e2f87834f4f8427e5dd282312f552e8ca02d1c Author: Takashi Sakamoto Date: Mon Dec 25 07:23:00 2023 +0900 firewire: core: adds constant qualifier for local helper functions Some local functions just handles given argument as mutable, thus it is preferable to add constant qualifier to them. Link: https://lore.kernel.org/r/20231221134849.603857-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto commit 10416a3578ba5f76d0b161d2d36a1d8a4c46a69d Author: Greg Kroah-Hartman Date: Tue Dec 19 15:59:32 2023 +0100 firewire: make fw_bus_type const Now that the driver core can properly handle constant struct bus_type, move the fw_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Takashi Sakamoto Cc: linux1394-devel@lists.sourceforge.net Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/2023121931-skydiver-dodgy-d1bd@gregkh Signed-off-by: Takashi Sakamoto commit 54e1898e113dc65974103620bbe7a9f856f80f6e Author: Krzysztof Kozlowski Date: Mon Dec 11 14:26:00 2023 +0100 rtc: MAINTAINERS: drop Alessandro Zummo Last email from Alessandro was in 2016, so remove him from maintainers of the RTC subsystem. Stale maintainer entries hide information whether subsystem needs help, has a bus-factor or is even orphaned. Link: https://lore.kernel.org/all/?q=f%3A%22Alessandro+Zummo%22 Cc: Alexandre Belloni Cc: Uwe Kleine-König Cc: Arnd Bergmann Cc: Alessandro Zummo Signed-off-by: Krzysztof Kozlowski Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231211132600.101090-1-krzysztof.kozlowski@linaro.org Signed-off-by: Alexandre Belloni commit e9a2162495ce387647bae565483f978369a29839 Author: Alexandre Belloni Date: Sun Dec 17 23:58:31 2023 +0100 rtc: ma35d1: remove hardcoded UIE support Let the core handle UIE instead of enabling it forcefully at probe which means the RTC will generate an interrupt every second even when nobody cares. Link: https://lore.kernel.org/r/20231217225831.48581-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 33f4ac16540509af518580abe730d409e8098aca Author: Johan Hovold Date: Thu Nov 30 18:32:23 2023 +0100 dt-bindings: rtc: qcom-pm8xxx: fix inconsistent example The PM8921 is an SSBI PMIC but in the binding example it is described as being part of an SPMI PMIC while using an SSBI address. Make the example consistent by using the sibling PM8941 SPMI PMIC instead. Fixes: 8138c5f0318c ("dt-bindings: rtc: qcom-pm8xxx-rtc: Add qcom pm8xxx rtc bindings") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231130173223.12794-1-johan+linaro@kernel.org Signed-off-by: Alexandre Belloni commit 2f80de657f83a1f6495e557096847f4626d57164 Author: Stefan Eichenberger Date: Wed Nov 22 19:16:11 2023 +0100 rtc: rv8803: Add power management support Add power management support to the driver. This allows a SoC to wake from suspend using the nINT provided by the RTC. Only register it as a wakeup device if the interrupt is provided and handled. Signed-off-by: Stefan Eichenberger Link: https://lore.kernel.org/r/20231122181611.164792-1-eichest@gmail.com Signed-off-by: Alexandre Belloni commit 3628d999e31e2e31b51f78b0f68e91275854c179 Author: Akinobu Mita Date: Sat Nov 18 18:22:00 2023 +0900 rtc: ds3232: avoid unused-const-variable warning Fix the following warning when CONFIG_I2C is not set but CONFIG_SPI_MASTER is set. warning: 'ds3232_pm_ops' defined but not used [-Wunused-const-variable=] 'ds3232_pm_ops' is only used by rtc-ds3232 i2c driver, so move the device PM callbacks inside #if IS_ENABLED(CONFIG_I2C). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311172325.33tTniaJ-lkp@intel.com/ Signed-off-by: Akinobu Mita Link: https://lore.kernel.org/r/20231118092200.829808-1-akinobu.mita@gmail.com Signed-off-by: Alexandre Belloni commit cd0d7d6639de4468d181c87e45cfd07d51b525da Author: Antoniu Miclaus Date: Tue Nov 14 13:45:31 2023 +0200 rtc: lpc24xx: add missing dependency The driver depends on COMMON_CLK. Add the dependency in Kconfig. Signed-off-by: Antoniu Miclaus Link: https://lore.kernel.org/r/20231114114532.37840-1-antoniu.miclaus@analog.com Signed-off-by: Alexandre Belloni commit 9f67c1e63976d3403f0b250b03ffe959c890f9db Author: Esteban Blanc Date: Tue Nov 7 10:47:01 2023 +0100 rtc: tps6594: Add driver for TPS6594 RTC TPS6594 PMIC is a MFD. This patch adds support for the RTC found inside TPS6594 family of PMIC. Alarm is also supported. Signed-off-by: Esteban Blanc Reviewed-by: Andy Shevchenko Tested-by: Thomas Richard Link: https://lore.kernel.org/r/20231107094701.2223486-1-eblanc@baylibre.com Signed-off-by: Alexandre Belloni commit 374c13f9080a1b9835a5ed3e7bea93cf8e2dc262 Author: Harshit Shah Date: Sat Dec 30 14:41:23 2023 +0530 i3c: master: cdns: Update maximum prescaler value for i2c clock As per the Cadence IP document fixed the I2C clock divider value limit from 16 bits instead of 10 bits. Without this change setting up the I2C clock to low frequencies will not work as the prescaler value might be greater than 10 bit number. I3C clock divider value is 10 bits only. Updating the macro names for both. Signed-off-by: Harshit Shah Link: https://lore.kernel.org/r/1703927483-28682-1-git-send-email-harshitshah.opendev@gmail.com Signed-off-by: Alexandre Belloni commit 18e5794879905a788e06fb2bc40b6f5b58eae5c2 Author: Randy Dunlap Date: Fri Dec 22 21:05:42 2023 -0800 i3c: master: fix Excess kernel-doc description warning Remove the @boardinfo: line to prevent the kernel-doc warning: include/linux/i3c/master.h:98: warning: Excess struct member 'boardinfo' description in 'i2c_dev_desc' Signed-off-by: Randy Dunlap Cc: Alexandre Belloni Cc: Link: https://lore.kernel.org/r/20231223050542.13930-1-rdunlap@infradead.org Signed-off-by: Alexandre Belloni commit 6d1a19d34e2cc07ca9cdad8892da94e716e9d15f Author: Frank Li Date: Fri Dec 1 17:25:31 2023 -0500 i3c: master: svc: return actual transfer data len I3C allow devices early terminate data transfer. So set "actual_len" to indicate how much data get by i3c_priv_xfer. Reviewed-by: Miquel Raynal Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231201222532.2431484-6-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit 6fb61734a74eaa307a5b6a0bee770e736d8acf89 Author: Frank Li Date: Fri Dec 1 17:25:30 2023 -0500 i3c: master: svc: rename read_len as actual_len I3C transfer (SDR), target can early terminate read transfer. I3C transfer (HDR), target can end write transfer. I2C transfer, target can NACK write transfer. 'actual_len' is better name than 'read_len'. Reviewed-by: Miquel Raynal Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231201222532.2431484-5-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit e5e3df06ac98d15cfb10bb5c12356709365e91b2 Author: Frank Li Date: Fri Dec 1 17:25:29 2023 -0500 i3c: add actual_len in i3c_priv_xfer In MIPI I3C Specification: "Ninth Bit of SDR Target Returned (Read) Data as End-of-Data: In I2C, the ninth Data bit from Target to Controller is an ACK by the Controller. By contrast, in I3C this bit allows the Target to end a Read, and allows the Controller to Abort a Read. In SDR terms, the ninth bit of Read data is referred to as the T-Bit (for ‘Transition’)" I3C allow devices early terminate data transfer. So need "actual_len" field to indicate how much get by i3c_priv_xfer. Reviewed-by: Miquel Raynal Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231201222532.2431484-4-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit 05b26c31a4859af9e75b7de77458e99358364fe1 Author: Frank Li Date: Fri Dec 1 17:25:28 2023 -0500 i3c: master: svc: add hot join support Add hot join support for svc master controller. Disable hot join by default. User can use sysfs entry to enable hot join. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231201222532.2431484-3-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit 317bacf960a4879af22d12175f47d284930b3273 Author: Frank Li Date: Fri Dec 1 17:25:27 2023 -0500 i3c: master: add enable(disable) hot join in sys entry Add hotjoin entry in sys file system allow user enable/disable hotjoin feature. Add (*enable(disable)_hotjoin)() to i3c_master_controller_ops. Add api i3c_master_enable(disable)_hotjoin(); Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231201222532.2431484-2-Frank.Li@nxp.com Signed-off-by: Alexandre Belloni commit 17419aefcbfd9891863e8b8132f0bca9a6b2984e Author: NeilBrown Date: Fri Dec 15 11:56:35 2023 +1100 nfsd: rename nfsd_last_thread() to nfsd_destroy_serv() As this function now destroys the svc_serv, this is a better name. Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 1e3577a4521ef33199eea05ce7b9099825848c49 Author: NeilBrown Date: Fri Dec 15 11:56:34 2023 +1100 SUNRPC: discard sv_refcnt, and svc_get/svc_put sv_refcnt is no longer useful. lockd and nfs-cb only ever have the svc active when there are a non-zero number of threads, so sv_refcnt mirrors sv_nrthreads. nfsd also keeps the svc active between when a socket is added and when the first thread is started, but we don't really need a refcount for that. We can simply not destroy the svc while there are any permanent sockets attached. So remove sv_refcnt and the get/put functions. Instead of a final call to svc_put(), call svc_destroy() instead. This is changed to also store NULL in the passed-in pointer to make it easier to avoid use-after-free situations. Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 7b207ccd983350a5dedd132b57c666186dd02a7c Author: NeilBrown Date: Fri Dec 15 11:56:32 2023 +1100 svc: don't hold reference for poolstats, only mutex. A future patch will remove refcounting on svc_serv as it is of little use. It is currently used to keep the svc around while the pool_stats file is open. Change this to get the pointer, protected by the mutex, only in seq_start, and the release the mutex in seq_stop. This means that if the nfsd server is stopped and restarted while the pool_stats file it open, then some pool stats info could be from the first instance and some from the second. This might appear odd, but is unlikely to be a problem in practice. Signed-off-by: NeilBrown Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 05a4b58301c38fbb81cc10a79f246f3dea0043c5 Author: Dai Ngo Date: Fri Dec 15 13:47:15 2023 -0800 SUNRPC: remove printk when back channel request not found If the client interface is down, or there is a network partition between the client and server that prevents the callback request to reach the client, TCP on the server will keep re-transmitting the callback for about ~9 minutes before giving up and closing the connection. If the connection between the client and the server is re-established before the connection is closed and after the callback timed out (9 secs) then the re-transmitted callback request will arrive at the client. When the server receives the reply of the callback, receive_cb_reply prints the "Got unrecognized reply..." message in the system log since the callback request was already removed from the server xprt's recv_queue. Even though this scenario has no effect on the server operation, a malfunctioning or malicious client can fill up the server's system log. Signed-off-by: Dai Ngo Signed-off-by: Chuck Lever commit d3dba534100d4e9eb7a5204be97cd6f9ada2066e Author: Chuck Lever Date: Mon Dec 18 17:32:07 2023 -0500 svcrdma: Implement multi-stage Read completion again Having an nfsd thread waiting for an RDMA Read completion is problematic if the Read responder (ie, the client) stops responding. We need to go back to handling RDMA Reads by getting the svc scheduler to call svc_rdma_recvfrom() a second time to finish building an RPC message after a Read completion. This is the final patch, and makes several changes that have to happen concurrently: 1. svc_rdma_process_read_list no longer waits for a completion, but simply builds and posts the Read WRs. 2. svc_rdma_read_done() now queues a completed Read on sc_read_complete_q for later processing rather than calling complete(). 3. The completed RPC message is no longer built in the svc_rdma_process_read_list() path. Finishing the message is now done in svc_rdma_recvfrom() when it notices work on the sc_read_complete_q. The "finish building this RPC message" code is removed from the svc_rdma_process_read_list() path. This arrangement avoids the need for an nfsd thread to wait for an RDMA Read non-interruptibly without a timeout. It's basically the same code structure that Tom Tucker used for Read chunks along with some clean-up and modernization. Signed-off-by: Chuck Lever commit ecba85e951c178e3fe7cea04eebf1035e8168f93 Author: Chuck Lever Date: Mon Dec 18 17:32:01 2023 -0500 svcrdma: Copy construction of svc_rqst::rq_arg to rdma_read_complete() Once a set of RDMA Reads are complete, the Read completion handler will poke the transport to trigger a second call to svc_rdma_recvfrom(). recvfrom() will then merge the RDMA Read payloads with the previously received RPC header to form a completed RPC Call message. The new code is copied from the svc_rdma_process_read_list() path. A subsequent patch will make use of this code and remove the code that this was copied from (svc_rdma_rw.c). Signed-off-by: Chuck Lever commit a937693a82fd2211c5e52b638959d1486a77d16a Author: Chuck Lever Date: Mon Dec 18 17:31:54 2023 -0500 svcrdma: Add back svcxprt_rdma::sc_read_complete_q Having an nfsd thread waiting for an RDMA Read completion is problematic if the Read responder (ie, the client) stops responding. We need to go back to handling RDMA Reads by allowing the nfsd thread to return to the svc scheduler, then waking a second thread finish the RPC message once the Read completion fires. As a next step, add a list_head upon which completed Reads are queued. A subsequent patch will make use of this queue. Signed-off-by: Chuck Lever commit 4d9d69db898d05bd063548eee65d16a020676fec Author: Chuck Lever Date: Mon Dec 18 17:31:48 2023 -0500 svcrdma: Add back svc_rdma_recv_ctxt::rc_pages Having an nfsd thread waiting for an RDMA Read completion is problematic if the Read responder (the client) stops responding. We need to go back to handling RDMA Reads by allowing the nfsd thread to return to the svc scheduler, then waking a second thread finish the RPC message once the Read completion fires. To start with, restore the rc_pages field so that RDMA Read pages can be managed across calls to svc_rdma_recvfrom(). Signed-off-by: Chuck Lever commit fc2e69db82c1ac506cd7f539a3ab66d51d3380dc Author: Chuck Lever Date: Mon Dec 11 10:24:34 2023 -0500 svcrdma: Clean up comment in svc_rdma_accept() The comment that starts "Qualify ..." applies to only some of the following code paragraph. Re-arrange the lines so the comment makes more sense. Signed-off-by: Chuck Lever commit b918bfcf370c92ea3b82fa9bb3d017702b5fa4cb Author: Chuck Lever Date: Mon Dec 11 10:24:28 2023 -0500 svcrdma: Remove queue-shortening warnings These won't have much diagnostic value for site administrators. Since they can't be disabled, they become noise. What's more, the subsequent rdma_create_qp() call adjusts the Send Queue size (possibly downward) without warning, making the size reported by these pr_warns inaccurate. Signed-off-by: Chuck Lever commit 913cd7668f17b2b0dad044a179ee540d81eff41b Author: Chuck Lever Date: Mon Dec 11 10:24:21 2023 -0500 svcrdma: Remove pointer addresses shown in dprintk() There are a couple of dprintk() call sites in svc_rdma_accept() that show pointer addresses. These days, displayed pointer addresses are hashed and thus have little or no diagnostic value, especially for site administrators. Signed-off-by: Chuck Lever commit 2a95ce479e681b35e385da0f1a6adf7c6240ddce Author: Chuck Lever Date: Mon Dec 11 10:24:15 2023 -0500 svcrdma: Optimize svc_rdma_cc_init() The atomic_inc_return() in svc_rdma_send_cid_init() is expensive. Some svc_rdma_chunk_ctxt's now reside in long-lived container structures. They don't need a fresh completion ID for every I/O operation. Signed-off-by: Chuck Lever commit 28ee0ec8948ac235327a1f5472fc032b308284a3 Author: Chuck Lever Date: Mon Dec 11 10:24:08 2023 -0500 svcrdma: De-duplicate completion ID initialization helpers Signed-off-by: Chuck Lever commit 018f34051bc9f4908336b3fe9e52931bb8410ced Author: Chuck Lever Date: Mon Dec 4 09:58:33 2023 -0500 svcrdma: Move the svc_rdma_cc_init() call Now that the chunk_ctxt for Reads is no longer dynamically allocated it can be initialized once for the life of the object that contains it (struct svc_rdma_recv_ctxt). Signed-off-by: Chuck Lever commit 57666bbb4eaae187e1e08dd1a9a2db7bcb1fbf96 Author: Chuck Lever Date: Mon Dec 4 09:58:26 2023 -0500 svcrdma: Remove struct svc_rdma_read_info The remaining fields of struct svc_rdma_read_info are no longer referenced. Signed-off-by: Chuck Lever commit efd02cb0dda6fed89065bb9d6de77d9752e1f0c3 Author: Chuck Lever Date: Mon Dec 4 09:58:20 2023 -0500 svcrdma: Update the synopsis of svc_rdma_read_special() Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_read_special() can use that recv_ctxt to derive the read_info rather than the other way around. This removes another usage of the ri_readctxt field, enabling its removal in a subsequent patch. Signed-off-by: Chuck Lever commit 23bab3b22d84793f1f096322d17952156be6f207 Author: Chuck Lever Date: Mon Dec 4 09:58:13 2023 -0500 svcrdma: Update the synopsis of svc_rdma_read_call_chunk() Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_read_call_chunk() can use that recv_ctxt to derive the read_info rather than the other way around. This removes another usage of the ri_readctxt field, enabling its removal in a subsequent patch. Signed-off-by: Chuck Lever commit 740a3c895d94fc72494f2a4abf1ab31b6be482e8 Author: Chuck Lever Date: Mon Dec 4 09:58:07 2023 -0500 svcrdma: Update synopsis of svc_rdma_read_multiple_chunks() Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_read_multiple_chunks() can use that recv_ctxt to derive the read_info rather than the other way around. This removes another usage of the ri_readctxt field, enabling its removal in a subsequent patch. Signed-off-by: Chuck Lever commit 6518204d2304239507236919f70ecf7ff324fe20 Author: Chuck Lever Date: Mon Dec 4 09:58:01 2023 -0500 svcrdma: Update synopsis of svc_rdma_copy_inline_range() Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_copy_inline_range() can use that recv_ctxt to derive the read_info rather than the other way around. This removes another usage of the ri_readctxt field, enabling its removal in a subsequent patch. Signed-off-by: Chuck Lever commit 6e4b9b8643967e1a44d7b326da60b4ecb3a9b858 Author: Chuck Lever Date: Mon Dec 4 09:57:54 2023 -0500 svcrdma: Update the synopsis of svc_rdma_read_data_item() Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_build_read_data_item() can use that recv_ctxt to derive that information rather than the other way around. This removes another usage of the ri_readctxt field, enabling its removal in a subsequent patch. Signed-off-by: Chuck Lever commit c7eb4feb1b21dd08fa32f08ce165b9444b9bfee9 Author: Chuck Lever Date: Mon Dec 4 09:57:48 2023 -0500 svcrdma: Update synopsis of svc_rdma_read_chunk_range() Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_build_read_chunk_range() can use that recv_ctxt to derive that information rather than the other way around. This removes another usage of the ri_readctxt field, enabling its removal in a subsequent patch. Signed-off-by: Chuck Lever commit 02e8fe1eca4c6ff5bf26718bb732379f3193534a Author: Chuck Lever Date: Mon Dec 4 09:57:41 2023 -0500 svcrdma: Update synopsis of svc_rdma_build_read_chunk() Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_build_read_chunk() can use that recv_ctxt to derive that information rather than the other way around. This removes another usage of the ri_readctxt field, enabling its removal in a subsequent patch. Signed-off-by: Chuck Lever commit fc20f19b4df4a46d1003d15d84148a117e8bdf5d Author: Chuck Lever Date: Mon Dec 4 09:57:35 2023 -0500 svcrdma: Update synopsis of svc_rdma_build_read_segment() Since the RDMA Read I/O state is now contained in the recv_ctxt, svc_rdma_build_read_segment() can use the recv_ctxt to derive that information rather than the other way around. This removes one usage of the ri_readctxt field, enabling its removal in a subsequent patch. At the same time, the use of ri_rqst can similarly be replaced with a passed-in function parameter. Start with build_read_segment() because it is a common utility function at the bottom of the Read chunk path. Signed-off-by: Chuck Lever commit 919f6e790ab6cca772fa60c6006162c0a7ebbfc5 Author: Chuck Lever Date: Mon Dec 4 09:57:28 2023 -0500 svcrdma: Move read_info::ri_pageoff into struct svc_rdma_recv_ctxt Further clean up: move the starting byte offset field into svc_rdma_recv_ctxt. Signed-off-by: Chuck Lever commit 8e122582680c6f8acd686a5a2af9c0e46fe90f2d Author: Chuck Lever Date: Mon Dec 4 09:57:22 2023 -0500 svcrdma: Move svc_rdma_read_info::ri_pageno to struct svc_rdma_recv_ctxt Further clean up: move the page index field into svc_rdma_recv_ctxt. Signed-off-by: Chuck Lever commit b1818412d06fc03605d02dbdd4a7c53dc9e2d5ba Author: Chuck Lever Date: Mon Dec 4 09:57:16 2023 -0500 svcrdma: Start moving fields out of struct svc_rdma_read_info Since the request's svc_rdma_recv_ctxt will stay around for the duration of the RDMA Read operation, the contents of struct svc_rdma_read_info can reside in the request's svc_rdma_recv_ctxt rather than being allocated separately. This will eventually save a call to kmalloc() in a hot path. Start this clean-up by moving the Read chunk's svc_rdma_chunk_ctxt. Signed-off-by: Chuck Lever commit 6a04a4349330c5476adf465159a7f49411091bbe Author: Chuck Lever Date: Mon Dec 4 09:57:09 2023 -0500 svcrdma: Move struct svc_rdma_chunk_ctxt to svc_rdma.h Prepare for nestling these into the send and recv ctxts so they no longer have to be allocated dynamically. Signed-off-by: Chuck Lever commit 2cc0f23b53050c047fe99ebe73c162268e8dd635 Author: Chuck Lever Date: Mon Dec 4 09:57:03 2023 -0500 svcrdma: Remove the svc_rdma_chunk_ctxt::cc_rdma field In every instance, the pointer address in that field is now available by other means. Signed-off-by: Chuck Lever commit bc8fd4e915130ebe515be4d852185d8e90c6111d Author: Chuck Lever Date: Mon Dec 4 09:56:57 2023 -0500 svcrdma: Pass a pointer to the transport to svc_rdma_cc_release() Enable the eventual removal of the svc_rdma_chunk_ctxt::cc_rdma field. Signed-off-by: Chuck Lever commit 83fe6dd6a8165fa5f1a45b832e8fe76850888eff Author: Chuck Lever Date: Mon Dec 4 09:56:50 2023 -0500 svcrdma: Explicitly pass the transport to svc_rdma_post_chunk_ctxt() Enable the eventual removal of the svc_rdma_chunk_ctxt::cc_rdma field. Signed-off-by: Chuck Lever commit 4a68edd93f5c79f3597d3c00642628599b62b2ef Author: Chuck Lever Date: Mon Dec 4 09:56:44 2023 -0500 svcrdma: Explicitly pass the transport into Read chunk I/O paths Enable the eventual removal of the svc_rdma_chunk_ctxt::cc_rdma field. Signed-off-by: Chuck Lever commit c3899b71072fb9b830918faa53745edc2f47d3a9 Author: Chuck Lever Date: Mon Dec 4 09:56:37 2023 -0500 svcrdma: Explicitly pass the transport into Write chunk I/O paths Enable the eventual removal of the svc_rdma_chunk_ctxt::cc_rdma field. Signed-off-by: Chuck Lever commit c4fd9f452517402b7f8b768761961178f2b2098c Author: Chuck Lever Date: Mon Dec 4 09:56:31 2023 -0500 svcrdma: Acquire the svcxprt_rdma pointer from the CQ context Enable the removal of the svc_rdma_chunk_ctxt::cc_rdma field in a subsequent patch. Signed-off-by: Chuck Lever commit 5ef6c666764151095346c18966b8720146a33719 Author: Chuck Lever Date: Mon Dec 4 09:56:24 2023 -0500 svcrdma: Reduce size of struct svc_rdma_rw_ctxt SG_CHUNK_SIZE is 128, making struct svc_rdma_rw_ctxt + the first SGL array more than 4200 bytes in length, pushing the memory allocation well into order 1. Even so, the RDMA rw core doesn't seem to use more than max_send_sge entries in that array (typically 32 or less), so that is all wasted space. Signed-off-by: Chuck Lever commit 2dd6e29a3ea86ce51404589fd99597cd4dd0cd41 Author: Chuck Lever Date: Mon Nov 27 11:33:50 2023 -0500 svcrdma: Update some svcrdma DMA-related tracepoints A send/recv_ctxt already records transport-related information in the cq.id, thus there is no need to record the IP addresses of the transport endpoints. Signed-off-by: Chuck Lever commit 848760a9e701cfab93a71374c1727491b0bc321e Author: Chuck Lever Date: Mon Nov 27 11:33:43 2023 -0500 svcrdma: DMA error tracepoints should report completion IDs Update the DMA error flow tracepoints to report the completion ID of the failing context. This ties the wait/failure to a particular operation or request, which is more useful than knowing only the failing transport. Signed-off-by: Chuck Lever commit ad3656bd84e0a91d4505095a0df7fbb6a8e0796a Author: Chuck Lever Date: Mon Nov 27 11:33:37 2023 -0500 svcrdma: SQ error tracepoints should report completion IDs Update the Send Queue's error flow tracepoints to report the completion ID of the waiting or failing context. This ties the wait/failure to a particular operation or request, which is a little more useful than knowing only the transport that is about to close. Signed-off-by: Chuck Lever commit be2acb104880dbd5582c898d000cab5f38750bb9 Author: Chuck Lever Date: Mon Nov 27 11:33:30 2023 -0500 rpcrdma: Introduce a simple cid tracepoint class De-duplicate some code, making it easier to add new tracepoints that report only a completion ID. Signed-off-by: Chuck Lever commit 907e34a7d01d99d7e10a6090f2bdd247bbc5de9a Author: Chuck Lever Date: Mon Nov 27 11:33:24 2023 -0500 svcrdma: Add lockdep class keys for transport locks Two svcrdma-related transport locks can become quite contended. Collate their use and make them easy to find in /proc/lock_stat for better observability. Signed-off-by: Chuck Lever commit bfb81535c2660d2bb8496e5cbb7480693188cd72 Author: Chuck Lever Date: Tue Nov 21 11:40:46 2023 -0500 svcrdma: Clean up locking There's no need to protect llist_entry() with a spin lock. Signed-off-by: Chuck Lever commit f09c36c8dffc7dcf796b862bffdda5753bec84ef Author: Chuck Lever Date: Tue Nov 21 11:40:39 2023 -0500 svcrdma: Add an async version of svc_rdma_write_info_free() DMA unmapping can take quite some time, so it should not be handled in a single-threaded completion handler. Defer releasing write_info structs to the recently-added workqueue. With this patch, DMA unmapping can be handled in parallel, and it does not cause head-of-queue blocking of Write completions. Signed-off-by: Chuck Lever commit ae225fe27b931de89b6b1e1bbe6de4de23000850 Author: Chuck Lever Date: Tue Nov 21 11:40:33 2023 -0500 svcrdma: Add an async version of svc_rdma_send_ctxt_put() DMA unmapping can take quite some time, so it should not be handled in a single-threaded completion handler. Defer releasing send_ctxts to the recently-added workqueue. With this patch, DMA unmapping can be handled in parallel, and it does not cause head-of-queue blocking of Send completions. Signed-off-by: Chuck Lever commit 9c7e1a06588ee6962afe0dfe5a398e1d23212005 Author: Chuck Lever Date: Tue Nov 21 11:40:26 2023 -0500 svcrdma: Add a utility workqueue to svcrdma To handle work in the background, set up an UNBOUND workqueue for svcrdma. Subsequent patches will make use of it. Signed-off-by: Chuck Lever commit 877118c667abe0df7e4d7b0607f77806a9d2df91 Author: Chuck Lever Date: Tue Nov 21 11:40:20 2023 -0500 svcrdma: Pre-allocate svc_rdma_recv_ctxt objects The original reason for allocating svc_rdma_recv_ctxt objects during Receive completion was to ensure the objects were allocated on the NUMA node closest to the underlying IB device. Since commit c5d68d25bd6b ("svcrdma: Clean up allocation of svc_rdma_recv_ctxt"), however, the device's favored node is explicitly passed to the memory allocator. To enable switching Receive completion to soft IRQ context, move memory allocation out of completion handling, since it can be costly, and it can sleep. A limited number of objects is now allocated at "accept" time. Signed-off-by: Chuck Lever commit b541dd554bc0442f7ff8c6cab6c5460c044913c8 Author: Chuck Lever Date: Tue Nov 21 11:40:13 2023 -0500 svcrdma: Eliminate allocation of recv_ctxt objects in backchannel The svc_rdma_recv_ctxt free list uses a lockless list to avoid the need for a spin lock in the fast path. llist_del_first(), which is used by svc_rdma_recv_ctxt_get(), requires serialization, however, when there are multiple list producers that are unserialized. I mistakenly thought there was only one caller of svc_rdma_recv_ctxt_get() (svc_rdma_refresh_recvs()), thus explicit serialization would not be necessary. But there is another caller: svc_rdma_bc_sendto(), and these two are not serialized against each other. I haven't seen ill effects that I could directly ascribe to a lack of serialization. It's just an observation based on code audit. When DMA-mapping before sending a Reply, the passed-in struct svc_rdma_recv_ctxt is used only for its write and reply PCLs. These are currently always empty in the backchannel case. So, instead of passing a full svc_rdma_recv_ctxt object to svc_rdma_map_reply_msg(), let's pass in just the Write and Reply PCLs. This change makes it unnecessary for the backchannel to acquire a dummy svc_rdma_recv_ctxt object when sending an RPC Call. The need for svc_rdma_recv_ctxt free list serialization is now completely avoided. Signed-off-by: Chuck Lever commit 52e89100754b2e888cb63bf2d19e65d809497cd6 Author: ChenXiaoSong Date: Sat Dec 2 21:07:25 2023 +0000 NFSv4, NFSD: move enum nfs_cb_opnum4 to include/linux/nfs4.h Callback operations enum is defined in client and server, move it to common header file. Signed-off-by: ChenXiaoSong Acked-by: Anna Schumaker Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 3c86e615d17d1f6194ff222247d291fc9df16ff4 Author: Dan Carpenter Date: Mon Dec 4 15:30:06 2023 +0300 nfsd: remove unnecessary NULL check We check "state" for NULL on the previous line so it can't be NULL here. No need to check again. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202312031425.LffZTarR-lkp@intel.com/ Signed-off-by: Dan Carpenter Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit 3587b5c75376fd0b6ca8c4a8de54954e410f4e0e Author: Chuck Lever Date: Fri Nov 17 17:14:46 2023 -0500 SUNRPC: Remove RQ_SPLICE_OK This flag is no longer used. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit a2c91753a4f3771a9b46eb42e0c46654819149a4 Author: Chuck Lever Date: Fri Nov 17 17:14:40 2023 -0500 NFSD: Modify NFSv4 to use nfsd_read_splice_ok() Avoid the use of an atomic bitop, and prepare for adding a run-time switch for using splice reads. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit c21fd7a8e86c0e069b512462ffd69bcf179387c8 Author: Chuck Lever Date: Fri Nov 17 17:14:33 2023 -0500 NFSD: Replace RQ_SPLICE_OK in nfsd_read() RQ_SPLICE_OK is a bit of a layering violation. Also, a subsequent patch is going to provide a mechanism for always disabling splice reads. Splicing is an issue only for NFS READs, so refactor nfsd_read() to check the auth type directly instead of relying on an rq_flag setting. The new helper will be added into the NFSv4 read path in a subsequent patch. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit deb704281f076097b0347116a82edeba96697db1 Author: Chuck Lever Date: Fri Nov 17 17:14:27 2023 -0500 SUNRPC: Add a server-side API for retrieving an RPC's pseudoflavor NFSD will use this new API to determine whether nfsd_splice_read is safe to use. This avoids the need to add a dependency to NFSD for CONFIG_SUNRPC_GSS. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit a853ed552545e116cf9b197b8c3c5cec80077f1e Author: Chuck Lever Date: Sun Nov 19 20:17:11 2023 -0500 NFSD: Document lack of f_pos_lock in nfsd_readdir() Al Viro notes that normal system calls hold f_pos_lock when calling ->iterate_shared and ->llseek; however nfsd_readdir() does not take that mutex when calling these methods. It should be safe however because the struct file acquired by nfsd_readdir() is not visible to other threads. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit d0ab8b649ba7636d181605e31bf3e42b0784bc67 Author: Chuck Lever Date: Mon Nov 13 08:45:07 2023 -0500 NFSD: Remove nfsd_drc_gc() tracepoint This trace point was for debugging the DRC's garbage collection. In the field it's just noise. Reviewed-by: Jeff Layton Signed-off-by: Chuck Lever commit ce7df05508c30de140c1dfd9a32a8c03c5671ecc Author: Chuck Lever Date: Sun Oct 22 18:50:10 2023 -0400 NFSD: Make the file_delayed_close workqueue UNBOUND workqueue: nfsd_file_delayed_close [nfsd] hogged CPU for >13333us 8 times, consider switching to WQ_UNBOUND There's no harm in closing a cached file descriptor on another core. Signed-off-by: Chuck Lever commit f3734cc4073f68ac3566293acc6d62971c47ad5a Author: Oleg Nesterov Date: Thu Oct 26 16:50:18 2023 +0200 NFSD: use read_seqbegin() rather than read_seqbegin_or_lock() The usage of read_seqbegin_or_lock() in nfsd_copy_write_verifier() is wrong. "seq" is always even and thus "or_lock" has no effect, this code can never take ->writeverf_lock for writing. I guess this is fine, nfsd_copy_write_verifier() just copies 8 bytes and nfsd_reset_write_verifier() is supposed to be very rare operation so we do not need the adaptive locking in this case. Yet the code looks wrong and sub-optimal, it can use read_seqbegin() without changing the behaviour. [ cel: Note also that it eliminates this Sparse warning: fs/nfsd/nfssvc.c:360:6: warning: context imbalance in 'nfsd_copy_write_verifier' - different lock contexts for basic block ] Signed-off-by: Oleg Nesterov Reviewed-by: Jeff Layton Reviewed-by: NeilBrown Signed-off-by: Chuck Lever commit 74fd48739d0488e39ae18b0168720f449a06690c Author: Jeff Layton Date: Fri Oct 13 09:03:53 2023 -0400 nfsd: new Kconfig option for legacy client tracking We've had a number of attempts at different NFSv4 client tracking methods over the years, but now nfsdcld has emerged as the clear winner since the others (recoverydir and the usermodehelper upcall) are problematic. As a case in point, the recoverydir backend uses MD5 hashes to encode long form clientid strings, which means that nfsd repeatedly gets dinged on FIPS audits, since MD5 isn't considered secure. Its use of MD5 is not cryptographically significant, so there is no danger there, but allowing us to compile that out allows us to sidestep the issue entirely. As a prelude to eventually removing support for these client tracking methods, add a new Kconfig option that enables them. Mark it deprecated and make it default to N. Acked-by: NeilBrown Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever commit 3ee29a4474e3e433268068a6e6337d4f635b79b7 Author: Christophe JAILLET Date: Fri Jan 5 10:27:09 2024 +0100 ipvlan: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Note that the upper bound of ida_alloc_range() is inclusive while the one of ida_simple_get() was exclusive. So calls have been updated accordingly. Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e900274f27c37de76279e34e342847d7b5756bec Author: Christophe JAILLET Date: Fri Jan 5 10:27:08 2024 +0100 ipvlan: Fix a typo in a comment s/diffentiate/differentiate/ Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 6472036581f947109b20664121db1d143e916f0b Author: Helge Deller Date: Wed Jan 3 21:17:23 2024 +0100 parisc/power: Fix power soft-off button emulation on qemu Make sure to start the kthread to check the power button on qemu as well if the power button address was provided. This fixes the qemu built-in system_powerdown runtime command. Fixes: d0c219472980 ("parisc/power: Add power soft-off when running on qemu") Signed-off-by: Helge Deller Cc: stable@vger.kernel.org # v6.0+ commit 735ae74f73e55c191d48689bd11ff4a06ea0508f Author: Helge Deller Date: Wed Jan 3 21:02:16 2024 +0100 parisc/firmware: Fix F-extend for PDC addresses When running with narrow firmware (64-bit kernel using a 32-bit firmware), extend PDC addresses into the 0xfffffff0.00000000 region instead of the 0xf0f0f0f0.00000000 region. This fixes the power button on the C3700 machine in qemu (64-bit CPU with 32-bit firmware), and my assumption is that the previous code was really never used (because most 64-bit machines have a 64-bit firmware), or it just worked on very old machines because they may only decode 40-bit of virtual addresses. Cc: stable@vger.kernel.org Signed-off-by: Helge Deller commit 6d039984c15d1ea1ca080176df6dfab443e44585 Author: Paulo Alcantara Date: Sat Jan 6 20:05:17 2024 -0300 smb: client: stop revalidating reparse points unnecessarily Query dir responses don't provide enough information on reparse points such as major/minor numbers and symlink targets other than reparse tags, however we don't need to unconditionally revalidate them only because they are reparse points. Instead, revalidate them only when their ctime or reparse tag has changed. For instance, Windows Server updates ctime of reparse points when their data have changed. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 6ebfede8d57a615dcbdec7e490faed585153f7f1 Author: David Howells Date: Mon Jan 1 15:40:10 2024 +0000 cifs: Pass unbyteswapped eof value into SMB2_set_eof() Change SMB2_set_eof() to take eof as CPU order rather than __le64 and pass it directly rather than by pointer. This moves the conversion down into SMB_set_eof() rather than all of its callers and means we don't need to undo it for the traceline. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cifs@vger.kernel.org Signed-off-by: Steve French commit 96d566b6c933be96e9f5b216f04024ab522e0465 Author: Markus Elfring Date: Fri Dec 29 20:43:12 2023 +0100 smb3: Improve exception handling in allocate_mr_list() The kfree() function was called in one case by the allocate_mr_list() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. Thus use another label. Signed-off-by: Markus Elfring Signed-off-by: Steve French commit 516eea97f92f1e7271f20835cfe9e73774b0f8cc Author: Shyam Prasad N Date: Fri Dec 29 11:16:18 2023 +0000 cifs: fix in logging in cifs_chan_update_iface Recently, cifs_chan_update_iface was modified to not remove an iface if a suitable replacement was not found. With that, there were two conditionals that were exactly the same. This change removes that extra condition check. Also, fixed a logging in the same function to indicate the correct message. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 9c38568a75c160786d5f5d5b96aeefed0c1b76bd Author: Paulo Alcantara Date: Tue Nov 28 18:23:33 2023 -0300 smb: client: handle special files and symlinks in SMB3 POSIX Parse reparse points in SMB3 posix query info as they will be supported and required by the new specification. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 3ded18a9e9d22a9cba8acad24b77a87851f9c9fa Author: Paulo Alcantara Date: Sat Nov 25 23:55:08 2023 -0300 smb: client: cleanup smb2_query_reparse_point() Use smb2_compound_op() with SMB2_OP_GET_REPARSE to get reparse point. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 514d793e27a310eb26b112c1f8f1a160472907e5 Author: Paulo Alcantara Date: Sat Nov 25 23:55:04 2023 -0300 smb: client: allow creating symlinks via reparse points Add support for creating symlinks via IO_REPARSE_TAG_SYMLINK reparse points in SMB2+. These are fully supported by most SMB servers and documented in MS-FSCC. Also have the advantage of requiring fewer roundtrips as their symlink targets can be parsed directly from CREATE responses on STATUS_STOPPED_ON_SYMLINK errors. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311260838.nx5mkj1j-lkp@intel.com/ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 5408990aa662bcfd6ba894734023a023a16e8729 Author: Paulo Alcantara Date: Sat Nov 25 23:55:07 2023 -0300 smb: client: fix hardlinking of reparse points The client was sending an SMB2_CREATE request without setting OPEN_REPARSE_POINT flag thus failing the entire hardlink operation. Fix this by setting OPEN_REPARSE_POINT in create options for SMB2_CREATE request when the source inode is a repase point. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 7435d51b7ea2ab7801279c43ecd72063e9d5c92f Author: Paulo Alcantara Date: Sat Nov 25 23:55:06 2023 -0300 smb: client: fix renaming of reparse points The client was sending an SMB2_CREATE request without setting OPEN_REPARSE_POINT flag thus failing the entire rename operation. Fix this by setting OPEN_REPARSE_POINT in create options for SMB2_CREATE request when the source inode is a repase point. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 67ec9949b0dfe78c99e110dd975eb7dc5645630c Author: Paulo Alcantara Date: Sat Nov 25 23:55:05 2023 -0300 smb: client: optimise reparse point querying Reduce number of roundtrips to server when querying reparse points in ->query_path_info() by sending a single compound request of create+get_reparse+get_info+close. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 102466f303ffcd5cff207b3c122557f73f1041e6 Author: Paulo Alcantara Date: Sat Nov 25 23:55:03 2023 -0300 smb: client: allow creating special files via reparse points Add support for creating special files (e.g. char/block devices, sockets, fifos) via NFS reparse points on SMB2+, which are fully supported by most SMB servers and documented in MS-FSCC. smb2_get_reparse_inode() creates the file with a corresponding reparse point buffer set in @iov through a single roundtrip to the server. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311260746.HOJ039BV-lkp@intel.com/ Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 3322960ce222997b1663ffa69e691b2edfec4ac9 Author: Paulo Alcantara Date: Sat Nov 25 23:55:02 2023 -0300 smb: client: extend smb2_compound_op() to accept more commands Make smb2_compound_op() accept up to MAX_COMPOUND(5) commands to be sent over a single compounded request. This will allow next commits to read and write reparse files through a single roundtrip to the server. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 0108ce08aed195d200ffbad74c1948bbaefe6625 Author: Pierre Mariani Date: Sun Nov 26 20:52:56 2023 -0800 smb: client: Fix minor whitespace errors and warnings Fixes no-op checkpatch errors and warnings. Signed-off-by: Pierre Mariani Signed-off-by: Steve French commit 2ffca83aa39ce70003a792acf3443175fc82a655 Author: Jamal Hadi Salim Date: Sat Jan 6 08:11:28 2024 -0500 net/sched: Remove ipt action tests Commit ba24ea129126 ("net/sched: Retire ipt action") removed the ipt action but not the testcases. This patch removes the outstanding tdc tests. Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 2560a0695a895109edd53185986c3c119acb83da Merge: 769ab26db4e4a 36af9f25ddfd3 Author: David S. Miller Date: Sun Jan 7 16:33:50 2024 +0000 Merge branch 'stmmac-per-dma-channel-interrupt' Swee Leong Ching says: ==================== net: stmmac: Enable Per DMA Channel interrupt Add Per DMA Channel interrupt feature for DWXGMAC IP. Patchset (link below) contains per DMA channel interrupt, But it was achieved. https://lore.kernel.org/lkml/20230821203328.GA2197059- robh@kernel.org/t/#m849b529a642e1bff89c05a07efc25d6a94c8bfb4 Some of the changes in this patchset are based on reviewer comment on patchset mentioned beforehand. ==================== Signed-off-by: David S. Miller commit 36af9f25ddfd311da82628f194c794786467cb12 Author: Swee Leong Ching Date: Fri Jan 5 15:09:25 2024 +0800 net: stmmac: Use interrupt mode INTM=1 for per channel irq Enable per DMA channel interrupt that uses shared peripheral interrupt (SPI), so only per channel TX and RX intr (TI/RI) are handled by TX/RX ISR without calling common interrupt ISR. Signed-off-by: Teoh Ji Sheng Signed-off-by: Swee Leong Ching Signed-off-by: David S. Miller commit 9072e03d32088137a435ddf3aa95fd6e038d69d8 Author: Swee Leong Ching Date: Fri Jan 5 15:09:24 2024 +0800 net: stmmac: Add support for TX/RX channel interrupt Enable TX/RX channel interrupt registration for MAC that interrupts CPU through shared peripheral interrupt (SPI). Per channel interrupts and interrupt-names are registered through, Eg: 4 tx and 4 rx channels: interrupts = , , , ; ; ; ; ; interrupt-names = "dma_tx0", "dma_tx1", "dma_tx2", "dma_tx3", "dma_rx0", "dma_rx1", "dma_rx2", "dma_rx3"; Signed-off-by: Teoh Ji Sheng Signed-off-by: Swee Leong Ching Signed-off-by: David S. Miller commit 477bd4beb93bf9ace9bda71f1437b191befa9cf4 Author: Swee Leong Ching Date: Fri Jan 5 15:09:23 2024 +0800 net: stmmac: Make MSI interrupt routine generic There is no support for per DMA channel interrupt for non-MSI platform, where the MAC's per channel interrupt hooks up to interrupt controller(GIC) through shared peripheral interrupt(SPI) to handle interrupt from TX/RX transmit channel. This patch generalize the existing MSI ISR to also support non-MSI platform. Signed-off-by: Teoh Ji Sheng Signed-off-by: Swee Leong Ching Signed-off-by: David S. Miller commit 67d47c8ada0f8795bfcdb85cc8f2ad3ce556674b Author: Swee Leong Ching Date: Fri Jan 5 15:09:22 2024 +0800 dt-bindings: net: snps,dwmac: per channel irq Add dt-bindings for per channel irq. Signed-off-by: Rohan G Thomas Signed-off-by: Swee Leong Ching Signed-off-by: David S. Miller commit 769ab26db4e4a759aa09187bad3c5a08309399ed Merge: c4a5ee9c09aa1 c34d9452d4e5d Author: David S. Miller Date: Sun Jan 7 16:23:22 2024 +0000 Merge branch 'at803x-more-generalization' Christian Marangi says: ==================== net: phy: at803x: even more generalization This is part 3 of at803x required patches to split the PHY driver in more specific PHY Family driver. While adding support for a new PHY Family qca807x it was notice lots of similarities with the qca808x cdt function. Hence this series is done to make things easier in the future when qca807x PHY will be submitted. Changes v4: - Fix Smatch warning Changes v3: - Rebase on top of net-next Changes v2: - Address request from Russell in a previous series on cdt get status improvement ==================== Signed-off-by: David S. Miller commit c34d9452d4e5d98a655d7b625e85466320885416 Author: Christian Marangi Date: Thu Jan 4 22:30:41 2024 +0100 net: phy: at803x: make read_status more generic Make read_status more generic in preparation on moving it to shared library as other PHY Family Driver will have the exact same implementation. The only specific part was a check for AR8031/33 if 1000basex was used. The check is moved to a dedicated function specific for those PHYs. Signed-off-by: Christian Marangi Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ea73e5ea442ee2aade67b1fb1233ccb3cbea2ceb Author: Christian Marangi Date: Thu Jan 4 22:30:40 2024 +0100 net: phy: at803x: add support for cdt cross short test for qca808x QCA808x PHY Family supports Cable Diagnostic Test also for Cross Pair Short. Add all the define to make enable and support these additional tests. Cross Short test was previously disabled by default, this is now changed and enabled by default. In this mode, the mask changed a bit and length is shifted based on the fault condition. Signed-off-by: Christian Marangi Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e0e9ada1df6133513249861c1d91c1dbefd9383b Author: Christian Marangi Date: Thu Jan 4 22:30:39 2024 +0100 net: phy: at803x: refactor qca808x cable test get status function Refactor qca808x cable test get status function to remove code duplication and clean things up. The same logic is applied to each pair hence it can be generalized and moved to a common function. Signed-off-by: Christian Marangi Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 22eb276098da820d9440fad22901f9b74ed4d659 Author: Christian Marangi Date: Thu Jan 4 22:30:38 2024 +0100 net: phy: at803x: generalize cdt fault length function Generalize cable test fault length function since they all base on the same magic values (already reverse engineered to understand the meaning of it) to have consistenct values on every PHY. Signed-off-by: Christian Marangi Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit ac631873c9e7a50d2a8de457cfc4b9f86666403e Author: Linus Walleij Date: Sat Jan 6 01:12:22 2024 +0100 net: ethernet: cortina: Drop TSO support The recent change to allow large frames without hardware checksumming slotted in software checksumming in the driver if hardware could not do it. This will however upset TSO (TCP Segment Offloading). Typical error dumps includes this: skb len=2961 headroom=222 headlen=66 tailroom=0 (...) WARNING: CPU: 0 PID: 956 at net/core/dev.c:3259 skb_warn_bad_offload+0x7c/0x108 gemini-ethernet-port: caps=(0x0000010000154813, 0x00002007ffdd7889) And the packets do not go through. The TSO implementation is bogus: a TSO enabled driver must propagate the skb_shinfo(skb)->gso_size value to the TSO engine on the NIC. Drop the size check and TSO offloading features for now: this needs to be fixed up properly. After this ethernet works fine on Gemini devices with a direct connected PHY such as D-Link DNS-313. Also tested to still be working with a DSA switch using the Gemini ethernet as conduit interface. Link: https://lore.kernel.org/netdev/CANn89iJLfxng1sYL5Zk0mknXpyYQPCp83m3KgD2KJ2_hKCpEUg@mail.gmail.com/ Suggested-by: Eric Dumazet Fixes: d4d0c5b4d279 ("net: ethernet: cortina: Handle large frames") Signed-off-by: Linus Walleij Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 61921bdaa132b580b6db6858e6d7dcdb870df5fe Author: Petr Tesarik Date: Fri Jan 5 21:16:42 2024 +0100 net: stmmac: fix ethtool per-queue statistics Fix per-queue statistics for devices with more than one queue. The output data pointer is currently reset in each loop iteration, effectively summing all queue statistics in the first four u64 values. The summary values are not even labeled correctly. For example, if eth0 has 2 queues, ethtool -S eth0 shows: q0_tx_pkt_n: 374 (actually tx_pkt_n over all queues) q0_tx_irq_n: 23 (actually tx_normal_irq_n over all queues) q1_tx_pkt_n: 462 (actually rx_pkt_n over all queues) q1_tx_irq_n: 446 (actually rx_normal_irq_n over all queues) q0_rx_pkt_n: 0 q0_rx_irq_n: 0 q1_rx_pkt_n: 0 q1_rx_irq_n: 0 Fixes: 133466c3bbe1 ("net: stmmac: use per-queue 64 bit statistics where necessary") Cc: stable@vger.kernel.org Signed-off-by: Petr Tesarik Reviewed-by: Jisheng Zhang Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d375b98e0248980681e5e56b712026174d617198 Author: Eric Dumazet Date: Fri Jan 5 17:03:13 2024 +0000 ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim() syzbot pointed out [1] that NEXTHDR_FRAGMENT handling is broken. Reading frag_off can only be done if we pulled enough bytes to skb->head. Currently we might access garbage. [1] BUG: KMSAN: uninit-value in ip6_tnl_parse_tlv_enc_lim+0x94f/0xbb0 ip6_tnl_parse_tlv_enc_lim+0x94f/0xbb0 ipxip6_tnl_xmit net/ipv6/ip6_tunnel.c:1326 [inline] ip6_tnl_start_xmit+0xab2/0x1a70 net/ipv6/ip6_tunnel.c:1432 __netdev_start_xmit include/linux/netdevice.h:4940 [inline] netdev_start_xmit include/linux/netdevice.h:4954 [inline] xmit_one net/core/dev.c:3548 [inline] dev_hard_start_xmit+0x247/0xa10 net/core/dev.c:3564 __dev_queue_xmit+0x33b8/0x5130 net/core/dev.c:4349 dev_queue_xmit include/linux/netdevice.h:3134 [inline] neigh_connected_output+0x569/0x660 net/core/neighbour.c:1592 neigh_output include/net/neighbour.h:542 [inline] ip6_finish_output2+0x23a9/0x2b30 net/ipv6/ip6_output.c:137 ip6_finish_output+0x855/0x12b0 net/ipv6/ip6_output.c:222 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0x323/0x610 net/ipv6/ip6_output.c:243 dst_output include/net/dst.h:451 [inline] ip6_local_out+0xe9/0x140 net/ipv6/output_core.c:155 ip6_send_skb net/ipv6/ip6_output.c:1952 [inline] ip6_push_pending_frames+0x1f9/0x560 net/ipv6/ip6_output.c:1972 rawv6_push_pending_frames+0xbe8/0xdf0 net/ipv6/raw.c:582 rawv6_sendmsg+0x2b66/0x2e70 net/ipv6/raw.c:920 inet_sendmsg+0x105/0x190 net/ipv4/af_inet.c:847 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x9c2/0xd60 net/socket.c:2584 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2638 __sys_sendmsg net/socket.c:2667 [inline] __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg net/socket.c:2674 [inline] __x64_sys_sendmsg+0x307/0x490 net/socket.c:2674 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b Uninit was created at: slab_post_alloc_hook+0x129/0xa70 mm/slab.h:768 slab_alloc_node mm/slub.c:3478 [inline] __kmem_cache_alloc_node+0x5c9/0x970 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc_node_track_caller+0x118/0x3c0 mm/slab_common.c:1027 kmalloc_reserve+0x249/0x4a0 net/core/skbuff.c:582 pskb_expand_head+0x226/0x1a00 net/core/skbuff.c:2098 __pskb_pull_tail+0x13b/0x2310 net/core/skbuff.c:2655 pskb_may_pull_reason include/linux/skbuff.h:2673 [inline] pskb_may_pull include/linux/skbuff.h:2681 [inline] ip6_tnl_parse_tlv_enc_lim+0x901/0xbb0 net/ipv6/ip6_tunnel.c:408 ipxip6_tnl_xmit net/ipv6/ip6_tunnel.c:1326 [inline] ip6_tnl_start_xmit+0xab2/0x1a70 net/ipv6/ip6_tunnel.c:1432 __netdev_start_xmit include/linux/netdevice.h:4940 [inline] netdev_start_xmit include/linux/netdevice.h:4954 [inline] xmit_one net/core/dev.c:3548 [inline] dev_hard_start_xmit+0x247/0xa10 net/core/dev.c:3564 __dev_queue_xmit+0x33b8/0x5130 net/core/dev.c:4349 dev_queue_xmit include/linux/netdevice.h:3134 [inline] neigh_connected_output+0x569/0x660 net/core/neighbour.c:1592 neigh_output include/net/neighbour.h:542 [inline] ip6_finish_output2+0x23a9/0x2b30 net/ipv6/ip6_output.c:137 ip6_finish_output+0x855/0x12b0 net/ipv6/ip6_output.c:222 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0x323/0x610 net/ipv6/ip6_output.c:243 dst_output include/net/dst.h:451 [inline] ip6_local_out+0xe9/0x140 net/ipv6/output_core.c:155 ip6_send_skb net/ipv6/ip6_output.c:1952 [inline] ip6_push_pending_frames+0x1f9/0x560 net/ipv6/ip6_output.c:1972 rawv6_push_pending_frames+0xbe8/0xdf0 net/ipv6/raw.c:582 rawv6_sendmsg+0x2b66/0x2e70 net/ipv6/raw.c:920 inet_sendmsg+0x105/0x190 net/ipv4/af_inet.c:847 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x9c2/0xd60 net/socket.c:2584 ___sys_sendmsg+0x28d/0x3c0 net/socket.c:2638 __sys_sendmsg net/socket.c:2667 [inline] __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg net/socket.c:2674 [inline] __x64_sys_sendmsg+0x307/0x490 net/socket.c:2674 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b CPU: 0 PID: 7345 Comm: syz-executor.3 Not tainted 6.7.0-rc8-syzkaller-00024-gac865f00af29 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Fixes: fbfa743a9d2a ("ipv6: fix ip6_tnl_parse_tlv_enc_lim()") Reported-by: syzbot Signed-off-by: Eric Dumazet Cc: Willem de Bruijn Reviewed-by: Willem de Bruijn Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 4fc68c4c1a114ba597b4f3b082f04622dfa0e0f6 Author: David Howells Date: Fri Jan 5 17:05:41 2024 +0000 rxrpc: Fix skbuff cleanup of call's recvmsg_queue and rx_oos_queue Fix rxrpc_cleanup_ring() to use rxrpc_purge_queue() rather than skb_queue_purge() so that the count of outstanding skbuffs is correctly updated when a failed call is cleaned up. Without this rmmod may hang waiting for rxrpc_n_rx_skbs to become zero. Fixes: 5d7edbc9231e ("rxrpc: Get rid of the Rx ring") Reported-by: Marc Dionne Signed-off-by: David Howells cc: "David S. Miller" cc: Eric Dumazet cc: Jakub Kicinski cc: Paolo Abeni cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit a460f4a684511e007bbf1700758a41f05d9981e6 Author: Asmaa Mnebhi Date: Fri Jan 5 11:00:14 2024 -0500 mlxbf_gige: Enable the GigE port in mlxbf_gige_open At the moment, the GigE port is enabled in the mlxbf_gige_probe function. If the mlxbf_gige_open is not executed, this could cause pause frames to increase in the case where there is high backgroud traffic. This results in clogging the port. So move enabling the OOB port to mlxbf_gige_open. Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver") Reviewed-by: David Thompson Signed-off-by: Asmaa Mnebhi Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ef210ef85d5cb543ce34a57803ed856d0c8c08c2 Author: Asmaa Mnebhi Date: Fri Jan 5 10:59:46 2024 -0500 mlxbf_gige: Fix intermittent no ip issue Although the link is up, there is no ip assigned on setups with high background traffic. Nothing is transmitted nor received. The RX error count keeps on increasing. After several minutes, the RX error count stagnates and the GigE interface finally gets an ip. The issue is that mlxbf_gige_rx_init() is called before phy_start(). As soon as the RX DMA is enabled in mlxbf_gige_rx_init(), the RX CI reaches the max of 128, and becomes equal to RX PI. RX CI doesn't decrease since the code hasn't ran phy_start yet. Bring the PHY up before starting the RX. Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver") Reviewed-by: David Thompson Signed-off-by: Asmaa Mnebhi Signed-off-by: David S. Miller commit c4a5ee9c09aa11f394b57674f525085034f5f68b Author: Zhengchao Shao Date: Fri Jan 5 14:56:34 2024 +0800 fib: rules: remove repeated assignment in fib_nl2rule In fib_nl2rule(), 'err' variable has been set to -EINVAL during declaration, and no need to set the 'err' variable to -EINVAL again. So, remove it. Signed-off-by: Zhengchao Shao Reviewed-by: Simon Horman Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 405cd9fc6f44f7a54505019bea60de83f1c58365 Author: Pedro Tammela Date: Thu Jan 4 21:38:10 2024 -0300 net/sched: simplify tc_action_load_ops parameters Instead of using two bools derived from a flags passed as arguments to the parent function of tc_action_load_ops, just pass the flags itself to tc_action_load_ops to simplify its parameters. Reviewed-by: Jiri Pirko Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 363096a27f9087bc3a081e157b09683ff18508d4 Author: Christophe JAILLET Date: Fri Jan 5 10:10:37 2024 +0100 nfp: flower: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Note that the upper bound of ida_alloc_range() is inclusive while the one of ida_simple_get() was exclusive. So NFP_FL_LAG_GROUP_MAX has been decreased by 1. It now better watch the comment stating that "1 to 31 are valid". The only other user of NFP_FL_LAG_GROUP_MAX has been updated accordingly in nfp_fl_lag_put_unprocessed(). Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2307157c85096026043ba11f9ad8393c31515c45 Author: Michael Margolin Date: Thu Jan 4 09:51:55 2024 +0000 RDMA/efa: Add EFA query MR support Add EFA driver uapi definitions and register a new query MR method that currently returns the physical interconnects the device is using to reach the MR. Update admin definitions and efa-abi accordingly. Reviewed-by: Anas Mousa Reviewed-by: Firas Jahjah Signed-off-by: Michael Margolin Link: https://lore.kernel.org/r/20240104095155.10676-1-mrgolin@amazon.com Signed-off-by: Leon Romanovsky commit 5850edccec30325707f953bc088497b3b9041231 Author: Tanzir Hasan Date: Thu Jan 4 19:31:36 2024 +0000 android: removed duplicate linux/errno There are two linux/errno.h inclusions in this file. The second one has been removed and the file builds correctly. Fixes: 54ffdab82080 ("android: binder: binderfs.c: removed asm-generic/errno-base.h") Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Tanzir Hasan Acked-by: Carlos Llamas Link: https://lore.kernel.org/r/20240104-removeduperror-v1-1-d170d4b3675a@google.com Signed-off-by: Greg Kroah-Hartman commit adbf4c4954e33e623897058a617c583d65a177f6 Author: Li Nan Date: Fri Dec 8 15:46:29 2023 +0800 ubi: block: fix memleak in ubiblock_create() If idr_alloc() fails, dev->gd will be put after goto out_cleanup_disk in ubiblock_create(), but dev->gd has not been assigned yet at this time, and 'gd' will not be put anymore. Fix it by putting 'gd' directly. Signed-off-by: Li Nan Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit ac8e9f64f51b6e61e7181a44525e1d4cd1cb338a Author: Randy Dunlap Date: Tue Dec 5 18:48:50 2023 -0800 ubifs: fix kernel-doc warnings Fix kernel-doc warnings found when using "W=1". file.c:1385: warning: Excess function parameter 'time' description in 'ubifs_update_time' and 9 warnings like this one: file.c:326: warning: No description found for return value of 'allocate_budget' Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202312030417.66c5PwHj-lkp@intel.com/ Cc: Richard Weinberger Cc: linux-mtd@lists.infradead.org Reviewed-by: Zhihao Cheng [rw: massaged patch to resolve conflict ] Signed-off-by: Richard Weinberger commit 2fe48aaab2669b3fbb11bf1b822a1b07424eef56 Author: ZhaoLong Wang Date: Tue Dec 26 09:01:13 2023 +0800 mtd: Add several functions to the fail_function list add mtd_read(), mtd_write(), mtd_erase(), mtd_block_markbad() to fail_function list for testing purpose - Specify the function to inject the fault echo mtd_read > /sys/kernel/debug/fail_function/inject - Specifies the return value of the function to inject the fault printf %#x -12 > /sys/kernel/debug/fail_function/mtd_read/retval - Specify other fault injection configuration parameters. echo -1 > /sys/kernel/debug/fail_function/times echo 100 > /sys/kernel/debug/fail_function/probability echo 15 > /sys/kernel/debug/fail_function/space Signed-off-by: ZhaoLong Wang Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 4d0deb380a5b53471cde1d8c0e0fbd1b53bfbc64 Author: ZhaoLong Wang Date: Tue Dec 26 09:01:12 2023 +0800 ubi: Reserve sufficient buffer length for the input mask Because the mask received by the emulate_failures interface is a 32-bit unsigned integer, ensure that there is sufficient buffer length to receive and display this value. Signed-off-by: ZhaoLong Wang Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 7cd8d1f8475d83c8871917430a2daf362c68e742 Author: ZhaoLong Wang Date: Tue Dec 26 09:01:11 2023 +0800 ubi: Add six fault injection type for testing This commit adds six fault injection type for testing to cover the abnormal path of the UBI driver. Inject the following faults when the UBI reads the LEB: +----------------------------+-----------------------------------+ | Interface name | emulate behavior | +----------------------------+-----------------------------------+ | emulate_eccerr | ECC error | +----------------------------+-----------------------------------+ | emulate_read_failure | read failure | |----------------------------+-----------------------------------+ | emulate_io_ff | read content as all FF | |----------------------------+-----------------------------------+ | emulate_io_ff_bitflips | content FF with MTD err reported | +----------------------------+-----------------------------------+ | emulate_bad_hdr | bad leb header | |----------------------------+-----------------------------------+ | emulate_bad_hdr_ebadmsg | bad header with ECC err | +----------------------------+-----------------------------------+ Signed-off-by: ZhaoLong Wang Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit e30948f7c0730d9fb2271ff3eadd43eda4e44740 Author: ZhaoLong Wang Date: Tue Dec 26 09:01:10 2023 +0800 ubi: Split io_failures into write_failure and erase_failure The emulate_io_failures debugfs entry controls both write failure and erase failure. This patch split io_failures to write_failure and erase_failure. Signed-off-by: ZhaoLong Wang Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 6931fb44858c3b9da9f35fdc8d9cbeef0b4b50a3 Author: ZhaoLong Wang Date: Tue Dec 26 09:01:09 2023 +0800 ubi: Use the fault injection framework to enhance the fault injection capability To make debug parameters configurable at run time, use the fault injection framework to reconstruct the debugfs interface, and retain the legacy fault injection interface. Now, the file emulate_failures and fault_attr files control whether to enable fault emmulation. The file emulate_failures receives a mask that controls type and process of fault injection. Generally, for ease of use, you can directly enter a mask with all 1s. echo 0xffff > /sys/kernel/debug/ubi/ubi0/emulate_failures And you need to configure other fault-injection capabilities for testing purpose: echo 100 > /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/probability echo 15 > /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/space echo 2 > /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/verbose echo -1 > /sys/kernel/debug/ubi/fault_inject/emulate_power_cut/times The CONFIG_MTD_UBI_FAULT_INJECTION to enable the Fault Injection is added to kconfig. Signed-off-by: ZhaoLong Wang Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 1e022216dcd248326a5bb95609d12a6815bca4e2 Author: Zhihao Cheng Date: Fri Dec 22 16:54:46 2023 +0800 ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path For error handling path in ubifs_symlink(), inode will be marked as bad first, then iput() is invoked. If inode->i_link is initialized by fscrypt_encrypt_symlink() in encryption scenario, inode->i_link won't be freed by callchain ubifs_free_inode -> fscrypt_free_inode in error handling path, because make_bad_inode() has changed 'inode->i_mode' as 'S_IFREG'. Following kmemleak is easy to be reproduced by injecting error in ubifs_jnl_update() when doing symlink in encryption scenario: unreferenced object 0xffff888103da3d98 (size 8): comm "ln", pid 1692, jiffies 4294914701 (age 12.045s) backtrace: kmemdup+0x32/0x70 __fscrypt_encrypt_symlink+0xed/0x1c0 ubifs_symlink+0x210/0x300 [ubifs] vfs_symlink+0x216/0x360 do_symlinkat+0x11a/0x190 do_syscall_64+0x3b/0xe0 There are two ways fixing it: 1. Remove make_bad_inode() in error handling path. We can do that because ubifs_evict_inode() will do same processes for good symlink inode and bad symlink inode, for inode->i_nlink checking is before is_bad_inode(). 2. Free inode->i_link before marking inode bad. Method 2 is picked, it has less influence, personally, I think. Cc: stable@vger.kernel.org Fixes: 2c58d548f570 ("fscrypt: cache decrypted symlink target in ->i_link") Signed-off-by: Zhihao Cheng Suggested-by: Eric Biggers Reviewed-by: Eric Biggers Signed-off-by: Richard Weinberger commit 7aa5f8fcd6d95b713a39fe52c296a6892eda7f02 Author: Krzysztof Wilczyński Date: Sat Jan 6 12:43:28 2024 +0000 PCI: xilinx-xdma: Fix uninitialized symbols in xilinx_pl_dma_pcie_setup_irq() The error paths that follow calls to the devm_request_irq() functions within the xilinx_pl_dma_pcie_setup_irq() reference an uninitialized symbol each that also so happens to be incorrect. Thus, fix this omission and reference the correct variable when invoking a given dev_err() function following an error. This problem was found using smatch via the 0-DAY CI Kernel Test service: drivers/pci/controller/pcie-xilinx-dma-pl.c:638 xilinx_pl_dma_pcie_setup_irq() error: uninitialized symbol 'irq'. drivers/pci/controller/pcie-xilinx-dma-pl.c:645 xilinx_pl_dma_pcie_setup_irq() error: uninitialized symbol 'irq'. Fixes: 8d786149d78c ("PCI: xilinx-xdma: Add Xilinx XDMA Root Port driver") Link: https://lore.kernel.org/oe-kbuild/202312120248.5DblxkBp-lkp@intel.com/ Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202312120248.5DblxkBp-lkp@intel.com/ Signed-off-by: Krzysztof Wilczyński commit 7682f19c3c8c709ff4ef0e1d475f00907ade868f Author: Yoshihiro Shimoda Date: Wed Dec 20 14:38:29 2023 +0900 PCI: rcar-gen4: Fix -Wvoid-pointer-to-enum-cast error When building with clang 18 with the -Werror compiler option enabled, the following error will be reported: drivers/pci/controller/dwc/pcie-rcar-gen4.c:439:15: error: cast to smaller integer type 'enum dw_pcie_device_mode' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] 439 | rcar->mode = (enum dw_pcie_device_mode)of_device_get_match_data(&rcar->pdev->dev); To fix this issue, cast the data the of_device_get_match_data() helper returns to uintptr_t rather than the dw_pcie_device_mode enum. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20231220053829.1921187-7-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Geert Uytterhoeven Reviewed-by: Manivannan Sadhasivam commit f72896721621689460967301a54a3d380d0e9434 Author: Justin Stitt Date: Wed Dec 20 14:38:28 2023 +0900 PCI: iproc: Fix -Wvoid-pointer-to-enum-cast warning When building with clang 18, the following warning will be reported: drivers/pci/controller/pcie-iproc-platform.c:54:15: warning: cast to smaller integer type 'enum iproc_pcie_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] 55 | pcie->type = (enum iproc_pcie_type) of_device_get_match_data(dev); To fix this issue, cast the data the of_device_get_match_data() helper returns to uintptr_t rather than the iproc_pcie_type enum. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20231220053829.1921187-6-yoshihiro.shimoda.uh@renesas.com Link: https://github.com/ClangBuiltLinux/linux/issues/1910 Reported-by: Nathan Chancellor Signed-off-by: Justin Stitt Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Geert Uytterhoeven Reviewed-by: Manivannan Sadhasivam commit 70fa02ca14466ee35c5a6b69175475b43b4931f8 Author: Yoshihiro Shimoda Date: Wed Dec 20 14:38:27 2023 +0900 PCI: dwc: Add dw_pcie_ep_{read,write}_dbi[2] helpers The current code calculated some dbi[2] registers' offset by calling dw_pcie_ep_get_dbi[2]_offset() in each function. To improve the code readability, add dw_pcie_ep_{read,write}_dbi[2} and some data-width related helpers. Link: https://lore.kernel.org/linux-pci/20231220053829.1921187-5-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam commit 641f79beeebcad8f10a4e76d50cc81fc07af7cc1 Author: Yoshihiro Shimoda Date: Wed Dec 20 14:38:26 2023 +0900 PCI: dwc: Rename .func_conf_select to .get_dbi_offset in struct dw_pcie_ep_ops Since the struct member .func_conf_select makes the intentions behind it difficult to ascertain from its name alone, rename it to .get_dbi_offset to make the intended usage more obvious. [kwilczynski: commmit log] Suggested-by: Manivannan Sadhasivam Link: https://lore.kernel.org/linux-pci/20231220053829.1921187-4-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: Serge Semin commit 756dcb5a820aab4429e004bb070674116062dea3 Author: Yoshihiro Shimoda Date: Wed Dec 20 14:38:25 2023 +0900 PCI: dwc: Rename .ep_init to .init in struct dw_pcie_ep_ops Since the name of the dw_pcie_ep_ops struct makes it obvious that it's for the PCIe Endpoint, rename the struct member .ep_init to .init. [kwilczynski: commit log] Suggested-by: Serge Semin Suggested-by: Manivannan Sadhasivam Link: https://lore.kernel.org/linux-pci/20231220053829.1921187-3-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: Serge Semin Reviewed-by: Srikanth Thokala Acked-by: Jesper Nilsson Acked-by: Kunihiko Hayashi commit aea370b2aec9d36d6fdb8c9695c8022429b84492 Author: Yoshihiro Shimoda Date: Wed Dec 20 14:38:24 2023 +0900 PCI: dwc: Drop host prefix from struct dw_pcie_host_ops members Since the name of the dw_pcie_host_ops struct makes it obvious that it's for the PCIe Host, drop the host prefix from the struct members. [kwilczynski: commit log] Suggested-by: Serge Semin Link: https://lore.kernel.org/linux-pci/20231220053829.1921187-2-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Reviewed-by: Serge Semin Reviewed-by: Thomas Petazzoni Acked-by: Heiko Stuebner Acked-by: Jesper Nilsson Acked-by: Kunihiko Hayashi Acked-by: Lei Chuanhua Acked-by: Nobuhiro Iwamatsu commit 516f366434e1db71b83c77b970cfcc0804671e1c Author: Niklas Cassel Date: Fri Dec 15 11:59:51 2023 +0100 misc: pci_endpoint_test: Use a unique test pattern for each BAR Use a unique test pattern for each BAR in. This makes it easier to detect/debug address translation issues, since a developer can dump the backing memory on the EP side, using e.g. devmem, to verify that the address translation for each BAR is actually correct. Link: https://lore.kernel.org/linux-pci/20231215105952.1531683-1-nks@flawful.org Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Reviewed-by: Damien Le Moal Reviewed-by: Manivannan Sadhasivam commit 177c9ac6ab3fa585608a16877b1fa1aad832571c Author: Peter Robinson Date: Thu Jan 4 21:39:06 2024 +0000 PCI: j721e: Make TI J721E depend on ARCH_K3 The J721E PCIe is hardware specific to TI SoC parts so add a dependency on that so it's available for those SoC parts and for compile testing but not necessarily everyone who enables the Cadence PCIe controller. Link: https://lore.kernel.org/linux-pci/20240104213910.1426843-1-pbrobinson@gmail.com Signed-off-by: Peter Robinson Signed-off-by: Krzysztof Wilczyński commit e49ad667815d37dc621ffdfb7302df6a7265bab8 Author: Matt Ranostay Date: Tue Nov 28 11:14:02 2023 +0530 PCI: j721e: Add TI J784S4 PCIe configuration Add PCIe configuration for J784S4 SoC platform which has 4x lane support. Link: https://lore.kernel.org/linux-pci/20231128054402.2155183-6-s-vadapalli@ti.com Tested-by: Achal Verma Signed-off-by: Matt Ranostay Signed-off-by: Achal Verma Signed-off-by: Siddharth Vadapalli Signed-off-by: Krzysztof Wilczyński Reviewed-by: Roger Quadros commit 169de41985f53320580f3d347534966ea83343ca Author: Kent Overstreet Date: Fri Jan 5 20:02:33 2024 -0500 bcachefs: eytzinger0_find() search should be const Signed-off-by: Kent Overstreet commit f5d4481c3edddf759e21e18751c168de879e3471 Author: Kent Overstreet Date: Thu Dec 28 02:17:18 2023 -0500 bcachefs: move "ptrs not changing" optimization to bch2_trigger_extent() This is useful for btree ptrs as well, when we're just updating sectors_written. Signed-off-by: Kent Overstreet commit e7999235e6c437b99fad03d8301a4341be0d2bb5 Author: Kent Overstreet Date: Fri Jan 5 19:04:42 2024 -0500 bcachefs: fix simulateously upgrading & downgrading Signed-off-by: Kent Overstreet commit 72e2c920e4dcf73d37e513d404fa561c7b6f5ebc Author: Kent Overstreet Date: Fri Jan 5 18:23:44 2024 -0500 bcachefs: Restart recovery passes more reliably Signed-off-by: Kent Overstreet commit d04d2727438575e1884ccd4a2eff34f5ee5acedd Author: Kent Overstreet Date: Fri Jan 5 15:14:50 2024 -0500 bcachefs: bch2_dump_bset() doesn't choke on u64s == 0 Signed-off-by: Kent Overstreet commit 4819b66e29893828d3efa76ecdf1ede9e036db35 Author: Kent Overstreet Date: Fri Jan 5 11:59:03 2024 -0500 bcachefs: improve checksum error messages new helpers: - bch2_csum_to_text() - bch2_csum_err_msg() standardize our checksum error messages a bit, and print out the checksums a bit more nicely. Signed-off-by: Kent Overstreet commit 2d02bfb01b2743da06748ba396ff7da4425488ef Author: Kent Overstreet Date: Fri Jan 5 14:17:57 2024 -0500 bcachefs: improve validate_bset_keys() Signed-off-by: Kent Overstreet commit 5e448c48932b578e7548d7df0f8bfb46eb29fbfc Author: Kent Overstreet Date: Fri Jan 5 13:03:01 2024 -0500 bcachefs: print sb magic when relevant Signed-off-by: Kent Overstreet commit 5b883656605eb46457b7eeb51581c78477d254b6 Author: Kent Overstreet Date: Fri Jan 5 12:37:47 2024 -0500 bcachefs: __bch2_sb_field_to_text() Signed-off-by: Kent Overstreet commit 1f5af5fc178588ff1f1293b5ddadd4228ce5095e Author: Kent Overstreet Date: Fri Jan 5 11:58:50 2024 -0500 bcachefs: %pg is banished not portable to userspace Signed-off-by: Kent Overstreet commit c13fbb7de2fc4fd61a44ebfa4ba182f35e0a3286 Author: Kent Overstreet Date: Thu Jan 4 18:59:17 2024 -0500 bcachefs: Improve would_deadlock trace event We now include backtraces for every thread involved in the cycle. Signed-off-by: Kent Overstreet commit 074cbcdaeee433a02d6d0565b936bee0915cc5da Author: Kent Overstreet Date: Wed Jan 3 23:29:02 2024 -0500 bcachefs: fsck_err()s don't need to manually check c->sb.version anymore Signed-off-by: Kent Overstreet commit 15eaaa4c315547c1ec871956ad0752cb9f4b14ae Author: Kent Overstreet Date: Wed Jan 3 21:01:37 2024 -0500 bcachefs: Upgrades now specify errors to fix, like downgrades Signed-off-by: Kent Overstreet commit d641d4cae72a178334c0c712f701f62cebde18ec Author: Kent Overstreet Date: Wed Jan 3 21:46:50 2024 -0500 bcachefs: no thread_with_file in userspace Signed-off-by: Kent Overstreet commit a64a37338d49a79647d332f1f510daafffeab4ad Author: Kent Overstreet Date: Wed Jan 3 20:34:46 2024 -0500 bcachefs: Don't autofix errors we can't fix Signed-off-by: Kent Overstreet commit e9bc59f9df96a439c009d3590581c3a6ff68fcbe Author: Kent Overstreet Date: Wed Jan 3 17:32:07 2024 -0500 bcachefs: add missing bch2_latency_acct() call Signed-off-by: Kent Overstreet commit 4798bd2443bb426b3065c0cc84bbe0458d4bf72c Author: Kent Overstreet Date: Wed Jan 3 17:15:55 2024 -0500 bcachefs: increase max_active on io_complete_wq this definitely should _not_ be 1, and we don't actually want any concurrency limiting at all here - btree node read completions are getting blocked behind btree node write submissions. Signed-off-by: Kent Overstreet commit c72e4d7a30670b59dcf32fb79b2c814a09171912 Author: Kent Overstreet Date: Wed Jan 3 16:42:33 2024 -0500 bcachefs: add time_stats for btree_node_read_done() Seeing weird latency issues in the btree node read path - add one bch2_btree_node_read_done(). Signed-off-by: Kent Overstreet commit b819f30855a67a82fab9e93828e672f266f20992 Author: Kent Overstreet Date: Wed Jan 3 15:25:08 2024 -0500 bcachefs: don't clear accessed bit in btree node fill Seeing strange performance issues that might be caused by memory pressure causing prefetched nodes to be evicted before they're used. Signed-off-by: Kent Overstreet commit 49a5192c0e9cc1deac5130a82127b1e79db3fe20 Author: Kent Overstreet Date: Wed Jan 3 15:21:45 2024 -0500 bcachefs: Add an option to control btree node prefetching Signed-off-by: Kent Overstreet commit 8a0dda6fd6b7af2a7aa797762148b8ecb8f47a67 Author: Kent Overstreet Date: Wed Jan 3 13:44:43 2024 -0500 bcachefs: kill useless return ret Signed-off-by: Kent Overstreet commit f0431c5f474643a0dbe9f3c288480422abd16179 Author: Kent Overstreet Date: Sun Dec 31 21:01:06 2023 -0500 bcachefs: Combine .trans_trigger, .atomic_trigger Signed-off-by: Kent Overstreet commit 4f9ec59f8fd658d832460aa25c145bdecfdbaa2d Author: Kent Overstreet Date: Thu Dec 28 02:11:00 2023 -0500 bcachefs: unify extent trigger Signed-off-by: Kent Overstreet commit 5a82ec3feaaf8be8f566fd535bac5dca4a00dfc7 Author: Kent Overstreet Date: Fri Dec 29 19:08:54 2023 -0500 bcachefs: bch2_trigger_stripe_ptr() Signed-off-by: Kent Overstreet commit d55ddf6e7a81e1e72b2f73c3cca836a6961c68af Author: Kent Overstreet Date: Sun Dec 31 19:41:45 2023 -0500 bcachefs: Online fsck can now fix errors BCH_FS_fsck_done -> BCH_FS_fsck_running; set when we might be fixing fsck errors. Also; set fix_errors to ask by default when fsck is running. Signed-off-by: Kent Overstreet commit 1f34c21bc685f6bd43383aefcb85a9cf604d439a Author: Kent Overstreet Date: Fri Dec 29 19:02:56 2023 -0500 bcachefs: bch2_trigger_pointer() Signed-off-by: Kent Overstreet commit e4eb3e5ae46b654ab50c62cce96cf04039bab2e3 Author: Kent Overstreet Date: Thu Dec 28 01:46:04 2023 -0500 bcachefs: unify stripe trigger Signed-off-by: Kent Overstreet commit f4f78779bb2ad1d1a56036c45f8e824d9700eeba Author: Kent Overstreet Date: Thu Dec 28 01:31:49 2023 -0500 bcachefs: move stripe triggers to ec.c Signed-off-by: Kent Overstreet commit 153d1c63c2aca97871be2f67551eb992f95488ab Author: Kent Overstreet Date: Thu Dec 28 01:21:01 2023 -0500 bcachefs: unify alloc trigger Signed-off-by: Kent Overstreet commit 6820ac2cdc3095ac9d2eac62dc7c89bdcee9b8c4 Author: Kent Overstreet Date: Thu Dec 28 00:59:17 2023 -0500 bcachefs: move bch2_mark_alloc() to alloc_background.c Signed-off-by: Kent Overstreet commit 6cacd0c4141cbadc7246cf89a9a55220acb91908 Author: Kent Overstreet Date: Thu Dec 28 00:50:21 2023 -0500 bcachefs: unify reservation trigger Signed-off-by: Kent Overstreet commit 7bc4d18af4131ce900d7d9d90e51135706818628 Author: Kent Overstreet Date: Thu Dec 28 00:15:58 2023 -0500 bcachefs: unify reflink_p trigger Signed-off-by: Kent Overstreet commit 08bc95901037bce2fa31a7bb4b559f55a31ae88d Author: Kent Overstreet Date: Thu Dec 28 00:05:54 2023 -0500 bcachefs: unify inode trigger Signed-off-by: Kent Overstreet commit 282e7c37ebf5d76c4f38d6656354901919a2592f Author: Kent Overstreet Date: Thu Dec 28 00:21:04 2023 -0500 bcachefs: kill mem_trigger_run_overwrite_then_insert() now that type signatures are unified, redundant Signed-off-by: Kent Overstreet commit c95e9ec48682425267e682e5489ee9dc42313335 Author: Kent Overstreet Date: Wed Dec 27 23:54:52 2023 -0500 bcachefs: BTREE_TRIGGER_TRANSACTIONAL New flag so that triggers can distinguish whether we're running transactional or atomic triggers (or gc) - unifying the callbacks. Signed-off-by: Kent Overstreet commit 089e311347ebe347a79545ca117a02811623c91e Author: Kent Overstreet Date: Wed Dec 27 23:44:50 2023 -0500 bcachefs: Kill BTREE_TRIGGER_NOATOMIC dead code Signed-off-by: Kent Overstreet commit ad00bce07da8138c08f6585f153412b65c99b064 Author: Kent Overstreet Date: Wed Dec 27 23:19:09 2023 -0500 bcachefs: mark now takes bkey_s Prep work for disk space accounting rewrite: we're going to want to use a single callback for both of our current triggers, so we need to change them to have the same type signature first. Signed-off-by: Kent Overstreet commit 717296c34c8d9d13d7aad4d710b0c3bdb285783b Author: Kent Overstreet Date: Wed Dec 27 23:19:09 2023 -0500 bcachefs: trans_mark now takes bkey_s Prep work for disk space accounting rewrite: we're going to want to use a single callback for both of our current triggers, so we need to change them to have the same type signature first. Signed-off-by: Kent Overstreet commit eff1f728bedc014c783752af5d2a88c46586f654 Author: Kent Overstreet Date: Fri Dec 29 17:08:58 2023 -0500 bcachefs: Upgrading uses bch_sb.recovery_passes_required Signed-off-by: Kent Overstreet commit 96f37eabe7a5cb4746f369e959f935be464950be Author: Kent Overstreet Date: Sun Dec 31 10:04:54 2023 -0500 bcachefs: factor out thread_with_file, thread_with_stdio thread_with_stdio now knows how to handle input - fsck can now prompt to fix errors. Signed-off-by: Kent Overstreet commit f60250de329ae6dbf8aeb49ebb13bf0b79e86a1d Author: Kent Overstreet Date: Fri Dec 29 19:16:14 2023 -0500 bcachefs: Fix printing of device durability BCH_MEMBER_DURABILITY() was not present initially; a value of 0 means use the default, nonzero means use v - 1. Signed-off-by: Kent Overstreet commit 8feaebb0ae8882d688b4152c5d693e248d17e623 Author: Kent Overstreet Date: Wed Dec 27 20:26:30 2023 -0500 bcachefs: __bch2_journal_key_to_wb -> bch2_journal_key_to_wb_slowpath Signed-off-by: Kent Overstreet commit f412392f6ea3168c0b9730532bc6298c07c4e378 Author: Kent Overstreet Date: Wed Dec 27 20:31:21 2023 -0500 bcachefs: __journal_keys_sort() refactoring Signed-off-by: Kent Overstreet commit 371650143d173ccdddc07405d5ee55e390a86921 Author: Kent Overstreet Date: Wed Dec 27 18:23:34 2023 -0500 bcachefs: wb_key_cmp -> wb_key_ref_cmp Signed-off-by: Kent Overstreet commit 89056f245bce2cb833726927783337c5dc59eac0 Author: Kent Overstreet Date: Sat Dec 23 22:43:33 2023 -0500 bcachefs: track transaction durations Signed-off-by: Kent Overstreet commit 83322e8ca8b687528765d7f4acf55ef3855004c4 Author: Kent Overstreet Date: Sat Dec 23 23:08:45 2023 -0500 bcachefs: btree_trans always has stats reserve slot 0 for unknown (when we overflow), to avoid some branches Signed-off-by: Kent Overstreet commit 0d529663f04be744d6af879889c5b16e46286ce1 Author: Kent Overstreet Date: Tue Jun 27 21:02:27 2023 -0400 bcachefs: Split brain detection Use the new bch_member->seq, sb->write_time fields to detect split brain and kick out devices when necessary. Signed-off-by: Kent Overstreet commit 6b00de06f51c5388f1a7eddd4ad7df8e3b8863b5 Author: Kent Overstreet Date: Tue Jun 27 21:02:27 2023 -0400 bcachefs: bch_member->seq Add new fields for split brain detection: - bch_member->seq, which tracks the sequence number of the last superblock write that happened to each member device - bch_sb->write_time, which tracks the time of the last superblock write, to allow detection of when two members have diverged but had the same number of superblock writes. Signed-off-by: Kent Overstreet commit 62719cf33c3ad62986130a19496cd864a0ed06c3 Author: Kent Overstreet Date: Sat Dec 23 17:50:29 2023 -0500 bcachefs: Fix nochanges/read_only interaction nochanges means "we cannot issue writes at all"; it's possible to go into a pseudo read-write mode where we pin dirty metadata in memory, which is used for fsck in dry run mode and doing journal replay on a read only mount, but we do not want to allow an actual read-write mount in nochanges mode. But we do always want to allow early read-write, during recovery - this patch clarifies that. Signed-off-by: Kent Overstreet commit 5e329145148d7e9fe5a07ecfc08682ef7334a4d1 Author: Kent Overstreet Date: Thu Dec 21 00:16:32 2023 -0500 bcachefs: Check journal entries for invalid keys in trans commit path Signed-off-by: Kent Overstreet commit e16bf7e015d75fdd805528bedaf285fcb71dad2a Merge: 80dda9a69a487 5459e186a5c9f Author: Dan Williams Date: Fri Jan 5 19:24:33 2024 -0800 Merge branch 'for-6.7/cxl' into for-6.8/cxl Pick up a late locking change + fixup that is better as merge window material than rc material. commit 948f97f9d8d2aa3a742df028129d44130268f0e4 Author: Ahmed Zaki Date: Thu Jan 4 14:26:53 2024 -0700 net: ethtool: reject unsupported RSS input xfrm values RXFH input_xfrm currently has three supported values: 0 (clear all), symmetric_xor and NO_CHANGE. Reject any other value sent from user-space. Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash") Suggested-by: Jakub Kicinski Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20240104212653.394424-1-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit 2114e83381d3289a88378850f43069e79f848083 Author: Benjamin Poirier Date: Thu Jan 4 09:11:09 2024 -0500 selftests: forwarding: Avoid failures to source net/lib.sh The expression "source ../lib.sh" added to net/forwarding/lib.sh in commit 25ae948b4478 ("selftests/net: add lib.sh") does not work for tests outside net/forwarding which source net/forwarding/lib.sh (1). It also does not work in some cases where only a subset of tests are exported (2). Avoid the problems mentioned above by replacing the faulty expression with a copy of the content from net/lib.sh which is used by files under net/forwarding. A more thorough solution which avoids duplicating content between net/lib.sh and net/forwarding/lib.sh has been posted here: https://lore.kernel.org/netdev/20231222135836.992841-1-bpoirier@nvidia.com/ The approach in the current patch is a stopgap solution to avoid submitting large changes at the eleventh hour of this development cycle. Example of problem 1) tools/testing/selftests/drivers/net/bonding$ ./dev_addr_lists.sh ./net_forwarding_lib.sh: line 41: ../lib.sh: No such file or directory TEST: bonding cleanup mode active-backup [ OK ] TEST: bonding cleanup mode 802.3ad [ OK ] TEST: bonding LACPDU multicast address to slave (from bond down) [ OK ] TEST: bonding LACPDU multicast address to slave (from bond up) [ OK ] An error message is printed but since the test does not use functions from net/lib.sh, the test results are not affected. Example of problem 2) tools/testing/selftests$ make install TARGETS="net/forwarding" tools/testing/selftests$ cd kselftest_install/net/forwarding/ tools/testing/selftests/kselftest_install/net/forwarding$ ./pedit_ip.sh veth{0..3} lib.sh: line 41: ../lib.sh: No such file or directory TEST: ping [ OK ] TEST: ping6 [ OK ] ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth1 ingress pedit ip src set 198.51.100.1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth2 egress pedit ip src set 198.51.100.1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth1 ingress pedit ip dst set 198.51.100.1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth2 egress pedit ip dst set 198.51.100.1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth1 ingress pedit ip6 src set 2001:db8:2::1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth2 egress pedit ip6 src set 2001:db8:2::1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth1 ingress pedit ip6 dst set 2001:db8:2::1 [FAIL] Expected to get 10 packets, but got . ./pedit_ip.sh: line 135: busywait: command not found TEST: dev veth2 egress pedit ip6 dst set 2001:db8:2::1 [FAIL] Expected to get 10 packets, but got . In this case, the test results are affected. Fixes: 25ae948b4478 ("selftests/net: add lib.sh") Suggested-by: Ido Schimmel Suggested-by: Petr Machata Reviewed-by: Ido Schimmel Tested-by: Petr Machata Signed-off-by: Benjamin Poirier Reviewed-by: Hangbin Liu Link: https://lore.kernel.org/r/20240104141109.100672-1-bpoirier@nvidia.com Signed-off-by: Jakub Kicinski commit 8158a50f9058ce882a6a020c41cef6bae2c3eae3 Merge: 795fd9342c628 5fe4ee6ae1875 Author: Jakub Kicinski Date: Fri Jan 5 19:15:32 2024 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2024-01-05 We've added 40 non-merge commits during the last 2 day(s) which contain a total of 73 files changed, 1526 insertions(+), 951 deletions(-). The main changes are: 1) Fix a memory leak when streaming AF_UNIX sockets were inserted into multiple sockmap slots/maps, from John Fastabend. 2) Fix gotol in s390 BPF JIT with large offsets, from Ilya Leoshkevich. 3) Fix reattachment branch in bpf_tracing_prog_attach() and reject the request if there is no valid attach_btf, from Jiri Olsa. 4) Remove deprecated bpfilter kernel leftovers given the project is developed in user space (https://github.com/facebook/bpfilter), from Quentin Deslandes. 5) Relax tracing BPF program recursive attach rules given right now it is not possible to create tracing program call cycles, from Dmitrii Dolgov. 6) Fix excessive memory consumption for the bpf_global_percpu_ma for systems with a large number of CPUs, from Yonghong Song. 7) Small x86 BPF JIT cleanup to reuse emit_nops instead of open-coding memcpy of x86_nops, from Leon Hwang. 8) Follow-up for libbpf to support __arg_ctx global function argument tag semantics to complement the merged kernel side, from Andrii Nakryiko. 9) Introduce "volatile compare" macros for BPF selftests in order to make the latter more robust against compiler optimization, from Alexei Starovoitov. 10) Small simplification in verifier's size checking of helper accesses along with additional selftests, from Andrei Matei. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (40 commits) selftests/bpf: Test re-attachment fix for bpf_tracing_prog_attach bpf: Fix re-attachment branch in bpf_tracing_prog_attach selftests/bpf: Add test for recursive attachment of tracing progs bpf: Relax tracing prog recursive attach rules bpf, x86: Use emit_nops to replace memcpy x86_nops selftests/bpf: Test gotol with large offsets selftests/bpf: Double the size of test_loader log s390/bpf: Fix gotol with large offsets bpfilter: remove bpfilter bpf: Remove unnecessary cpu == 0 check in memalloc selftests/bpf: add __arg_ctx BTF rewrite test selftests/bpf: add arg:ctx cases to test_global_funcs tests libbpf: implement __arg_ctx fallback logic libbpf: move BTF loading step after relocation step libbpf: move exception callbacks assignment logic into relocation step libbpf: use stable map placeholder FDs libbpf: don't rely on map->fd as an indicator of map being created libbpf: use explicit map reuse flag to skip map creation steps libbpf: make uniform use of btf__fd() accessor inside libbpf selftests/bpf: Add a selftest with > 512-byte percpu allocation size ... ==================== Link: https://lore.kernel.org/r/20240105170105.21070-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 795fd9342c628839ac9c3f3133d063ce2e577ea7 Author: Vadim Fedorenko Date: Thu Jan 4 09:25:40 2024 -0800 ptp_ocp: adjust MAINTAINERS and mailmap The fb.com domain is going to be deprecated. Use personal one for kernel contributions. Signed-off-by: Vadim Fedorenko Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240104172540.2379128-1-vadfed@meta.com Signed-off-by: Jakub Kicinski commit c72a657b5cca1d415a26c871ae114bbb119ad0c2 Author: Eric Dumazet Date: Thu Jan 4 16:36:33 2024 +0000 geneve: use DEV_STATS_INC() geneve updates dev->stats fields locklessly. Adopt DEV_STATS_INC() to avoid races. Signed-off-by: Eric Dumazet Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240104163633.2070538-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 80dda9a69a487c72ded1ac69234c8a89d5922b04 Merge: d3953c78fc78d c7ad3dc364973 Author: Dan Williams Date: Fri Jan 5 19:03:06 2024 -0800 Merge branch 'for-6.8/cxl-misc' into for-6.8/cxl Pick up some miscellaneous fixups for v6.8. commit d3953c78fc78d37f1b795740632ec7c3d83ef98a Merge: 11c8393202871 321dd36c286b3 Author: Dan Williams Date: Fri Jan 5 18:59:06 2024 -0800 Merge branch 'for-6.8/cxl-cdat' into for-6.8/cxl Pick up some follow-on fixes for 'cxl_root' reference count leaks. commit 26a1a86dd093a10d0653429bf013dae6e95dccbf Author: Ira Weiny Date: Wed Dec 20 16:17:29 2023 -0800 cxl/events: Promote CXL event structures to a core header UEFI code can process CXL events through CPER records. Those records use almost the same format as the CXL events. Lift the CXL event structures to a core header to be shared in later patches. [jic123: drop "CXL rev 3.0" mention] Signed-off-by: Ira Weiny Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-2-1bb8a4ca2c7a@intel.com [djbw: add F: entry to maintainers for include/linux/cxl-event.h] Reviewed-by: Jonathan Cameron Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams commit 807c6d09cc99cbdf9933edfadcbaa8f0b856848d Author: David Howells Date: Fri Jan 5 22:03:58 2024 +0000 netfs: Fix the loop that unmarks folios after writing to the cache In the loop in netfs_rreq_unmark_after_write() that removes the PG_fscache from folios after they've been written to the cache, as soon as we remove the mark from a multipage folio, it can get split - and then we might see a fragment of folio again. Guard against this by advancing the 'unlocked' tracker to the index of the last page in the folio to avoid a double removal of the PG_fscache mark. Reported-by: Marc Dionne Signed-off-by: David Howells cc: Matthew Wilcox cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 321dd36c286b3f982b341ce9a273b0f66f0e00ed Author: Dave Jiang Date: Fri Jan 5 15:07:59 2024 -0700 cxl: Refactor to use __free() for cxl_root allocation in cxl_endpoint_port_probe() Use scope-based resource management __free() macro to drop the open coded put_device() in cxl_endpoint_port_probe(). Reviewed-by: Ira Weiny Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170449247973.3779673.15088722836135359275.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 66f11890d35a609012037cccfd9e63ed98474f99 Author: Dave Jiang Date: Fri Jan 5 15:07:53 2024 -0700 cxl: Refactor to use __free() for cxl_root allocation in cxl_find_nvdimm_bridge() Use scope-based resource management __free() macro to drop the open coded put_device() in cxl_find_nvdimm_bridge(). Reviewed-by: Ira Weiny Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170449247353.3779673.5963704495491343135.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 98e7ab3345e105339b7d919b4918f3c1879052ed Author: Dave Jiang Date: Fri Jan 5 15:07:46 2024 -0700 cxl: Fix device reference leak in cxl_port_perf_data_calculate() cxl_port_perf_data_calculate() calls find_cxl_root() and does not dereference the 'struct device' in the cxl_root->port. find_cxl_root() calls get_device() and takes a reference on the port 'struct device' member. Use the __free() macro to ensure the dereference happens. Fixes: 7a4f148dd8d5 ("cxl: Compute the entire CXL path latency and bandwidth data") Reviewed-by: Ira Weiny Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170449246681.3779673.2288926019977963333.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 44cd71ef7bacdfcf7c3e8a7b13f11a7eba69533d Author: Dave Jiang Date: Fri Jan 5 15:07:40 2024 -0700 cxl: Convert find_cxl_root() to return a 'struct cxl_root *' Commit 790815902ec6 ("cxl: Add support for _DSM Function for retrieving QTG ID") introduced 'struct cxl_root', however all usages have been worked indirectly through cxl_port. Refactor code such as find_cxl_root() function to use 'struct cxl_root' directly. Suggested-by: Dan Williams Reviewed-by: Ira Weiny Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170449246044.3779673.13035770941393418591.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 98856b2ea3065d8f60e90f423d7707f4a4706ec5 Author: Dave Jiang Date: Fri Jan 5 15:07:34 2024 -0700 cxl: Introduce put_cxl_root() helper Add a helper function put_cxl_root() to maintain symmetry for find_cxl_root() function instead of relying on open coding of the put_device() in order to dereference the 'struct device' that happens via get_device() in find_cxl_root(). Suggested-by: Robert Richter Reviewed-by: Ira Weiny Signed-off-by: Dave Jiang Reviewed-by: Robert Richter Link: https://lore.kernel.org/r/170449245417.3779673.4566146351673989387.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 50d9edd33df50f3ce570818880fe2c6785ca8bf1 Author: Martin Kaiser Date: Wed Jan 3 12:04:09 2024 +0100 ARM: debug: fix DEBUG_UNCOMPRESS help for !MULTIPLATFORM Commit 84fc86360623 ("ARM: make ARCH_MULTIPLATFORM user-visible") modified DEBUG_UNCOMPRESS to prevent using it with multiplatform kernels. Update the help text, remove references to multiplatform. Signed-off-by: Martin Kaiser Signed-off-by: Arnd Bergmann commit d93cca2f3109f88c94a32d3322ec8b2854a9c339 Author: David McKay Date: Thu Jan 4 09:40:10 2024 +0000 asm-generic: Fix 32 bit __generic_cmpxchg_local Commit 656e9007ef58 ("asm-generic: avoid __generic_cmpxchg_local warnings") introduced a typo that means the code is incorrect for 32 bit values. It will work fine for postive numbers, but will fail for negative numbers on a system where longs are 64 bit. Fixes: 656e9007ef58 ("asm-generic: avoid __generic_cmpxchg_local warnings") Signed-off-by: David McKay Signed-off-by: Stuart Menefy Signed-off-by: Arnd Bergmann commit a7de1dea76cd6a3707707af4ea2f8bc3cdeaeb11 Author: Arnd Bergmann Date: Wed Jan 3 16:56:56 2024 +0100 nvme: trace: avoid memcpy overflow warning A previous patch introduced a struct_group() in nvme_common_command to help stringop fortification figure out the length of the fields, but one function is not currently using them: In file included from drivers/nvme/target/core.c:7: In file included from include/linux/string.h:254: include/linux/fortify-string.h:592:4: error: call to '__read_overflow2_field' declared with 'warning' attribute: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Werror,-Wattribute-warning] __read_overflow2_field(q_size_field, size); ^ Change this one to use the correct field name to avoid the warning. Fixes: 5c629dc9609dc ("nvme: use struct group for generic command dwords") Signed-off-by: Arnd Bergmann Signed-off-by: Keith Busch commit 4ee7ffeb4ce50c80bc4504db6f39b25a2df6bcf4 Author: Arnd Bergmann Date: Wed Jan 3 16:56:55 2024 +0100 nvmet: re-fix tracing strncpy() warning An earlier patch had tried to address a warning about a string copy with missing zero termination: drivers/nvme/target/trace.h:52:3: warning: ‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] The new version causes a different warning with some compiler versions, notably gcc-9 and gcc-10, and also misses the zero padding that was apparently done intentionally in the original code: drivers/nvme/target/trace.h:56:2: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=] Change it to use strscpy_pad() with the original length, which will give a properly padded and zero-terminated string as well as avoiding the warning. Fixes: d86481e924a7 ("nvmet: use min of device_path and disk len") Signed-off-by: Arnd Bergmann Signed-off-by: Keith Busch commit bafd590910d00327decb3937e77f6f11c3e80e4b Author: Guixin Liu Date: Wed Dec 27 17:31:06 2023 +0800 nvme: introduce nvme_disk_is_ns_head helper We currently rely on gendisk's file operations (fops) to distinguish between a namespace head (ns_head) and a regular namespace. To enhance code readability, introduce a helper function. Additionally, we must ensure that the device is not an ns_head before calling nvme_get_ns_from_dev(). To enforce this, add a WARN_ON check within the nvme_get_ns_from_dev(). Signed-off-by: Guixin Liu Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Liu Song [include fix: https://lore.kernel.org/oe-kbuild-all/202401031943.0N72Tkji-lkp@intel.com/] Signed-off-by: Keith Busch commit bd029a02ce46e77e4d553140b039f93cf78ee8c1 Author: Jim.Lin Date: Tue Nov 28 10:57:37 2023 +0800 nvme-pci: disable write zeroes for SK Hynix BC901 SK Hynix BC901 drive write zero will cause Chromebook takes more than 20 mins to switch to developer mode "disable write zeroes" can fix this issue and Sk Hynix has been verified. Signed-off-by: Jim.Lin Signed-off-by: Keith Busch commit f644d21baab34c837d639e9639aa8204dba7f3cf Author: Daniel Wagner Date: Mon Dec 18 16:30:53 2023 +0100 nvmet-fcloop: Remove remote port from list when unlinking The remote port is removed too late from fcloop_nports list. Remove it when port is unregistered. This prevents a busy loop in fcloop_exit, because it is possible the remote port is found in the list and thus we will never progress. The kernel log will be spammed with nvme_fcloop: fcloop_exit: Failed deleting remote port nvme_fcloop: fcloop_exit: Failed deleting target port Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Keith Busch commit 754d349ed41186e3aba50c3128937be335f9460a Author: Charlene Liu Date: Fri Dec 15 19:41:57 2023 -0500 drm/amd/display: Allow z8/z10 from driver Copy StutterPeriod from DML2 into DML1 StutterPeriod parameter. Tested-by: Daniel Wheeler Reviewed-by: Muhammad Ahmed Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Charlene Liu Signed-off-by: Alex Deucher commit 3a0fa3bc245ef92838a8296e0055569b8dff94c4 Author: Melissa Wen Date: Fri Dec 29 15:25:00 2023 -0100 drm/amd/display: fix bandwidth validation failure on DCN 2.1 IGT `amdgpu/amd_color/crtc-lut-accuracy` fails right at the beginning of the test execution, during atomic check, because DC rejects the bandwidth state for a fb sizing 64x64. The test was previously working with the deprecated dc_commit_state(). Now using dc_validate_with_context() approach, the atomic check needs to perform a full state validation. Therefore, set fast_validation to false in the dc_validate_global_state call for atomic check. Cc: stable@vger.kernel.org Fixes: b8272241ff9d ("drm/amd/display: Drop dc_commit_state in favor of dc_commit_streams") Signed-off-by: Melissa Wen Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 16783d8ef08448815e149e40c82fc1e1fc41ddbf Author: Alex Deucher Date: Wed Jan 3 11:55:53 2024 -0500 drm/amdgpu: apply the RV2 system aperture fix to RN/CZN as well These chips needs the same fix. This was previously not seen on then since the AGP aperture expanded the system aperture, but this showed up again when AGP was disabled. Reviewed-and-tested-by: Jiadong Zhu Signed-off-by: Alex Deucher commit d65e0e91664184299d5e6aaa2f4323e43df9b2c7 Author: Harry Wentland Date: Wed Dec 20 16:25:48 2023 -0500 drm/amd/display: Move fixpt_from_s3132 to amdgpu_dm Other environments don't like the unary minus operator on an unsigned value. Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit af7cefc618f437556ccb48ddd0c9e8e0cf7fd11d Author: Harry Wentland Date: Wed Dec 20 15:18:05 2023 -0500 drm/amd/display: Fix recent checkpatch errors in amdgpu_dm - Use tabs, not spaces. - Brace and parentheses placement Signed-off-by: Harry Wentland Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0f35b0a7b8fa402adbffa2565047cdcc4c480153 Author: Kaibo Ma Date: Wed Jan 3 12:29:56 2024 +0800 Revert "drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole" That commit causes NULL pointer dereferences in dmesgs when running applications using ROCm, including clinfo, blender, and PyTorch, since v6.6.1. Revert it to fix blender again. This reverts commit 96c211f1f9ef82183493f4ceed4e347b52849149. Closes: https://github.com/ROCm/ROCm/issues/2596 Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2991 Reviewed-by: Jay Cornwall Signed-off-by: Kaibo Ma Signed-off-by: Alex Deucher commit c966dc0e9d96dc44423c404a2628236f1200c24e Author: Arnd Bergmann Date: Wed Nov 22 23:13:36 2023 +0100 drm/amd/display: avoid stringop-overflow warnings for dp_decide_lane_settings() gcc prints a warning about a possible array overflow for a couple of callers of dp_decide_lane_settings() after commit 1b56c90018f0 ("Makefile: Enable -Wstringop-overflow globally"): drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c: In function 'dp_perform_fixed_vs_pe_training_sequence_legacy': drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c:426:25: error: 'dp_decide_lane_settings' accessing 4 bytes in a region of size 1 [-Werror=stringop-overflow=] 426 | dp_decide_lane_settings(lt_settings, dpcd_lane_adjust, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 427 | lt_settings->hw_lane_settings, lt_settings->dpcd_lane_settings); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/link_dp_training_fixed_vs_pe_retimer.c:426:25: note: referencing argument 4 of type 'union dpcd_training_lane[4]' I'm not entirely sure what caused this, but changing the prototype to expect a pointer instead of an array avoids the warnings. Fixes: 7727e7b60f82 ("drm/amd/display: Improve robustness of FIXED_VS link training at DP1 rates") Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 1ac725b300769b179375c9100b81ea0a82b39896 Author: Marcelo Mendes Spessoto Junior Date: Fri Dec 29 14:41:56 2023 -0300 drm/amd/display: Fix power_helpers.c codestyle Place define macro expression inside () in power_helpers.c file Signed-off-by: Marcelo Mendes Spessoto Junior Signed-off-by: Alex Deucher commit 0783f17e760d3cfa6b79aea94712dc7082d4ae2c Author: Marcelo Mendes Spessoto Junior Date: Fri Dec 29 14:41:55 2023 -0300 drm/amd/display: Fix hdcp_log.h codestyle Place HDCP_EVENT_TRACE(hdcp, event) macro content inside do while loop to avoid if-else issues in hdcp_log.h file v2: fix up build (Alex) Signed-off-by: Marcelo Mendes Spessoto Junior Signed-off-by: Alex Deucher commit 31906f4cf6b1ece08f7a16c6c53ef899f1fda009 Author: Marcelo Mendes Spessoto Junior Date: Fri Dec 29 14:41:54 2023 -0300 drm/amd/display: Fix hdcp2_execution.c codestyle Remove braces for single statement if expressions and change comparison order for hdcp2_execution.c file Signed-off-by: Marcelo Mendes Spessoto Junior Signed-off-by: Alex Deucher commit 30c822afdf9f4b7194384e83f05adefc9da15632 Author: Marcelo Mendes Spessoto Junior Date: Fri Dec 29 14:41:53 2023 -0300 drm/amd/display: Fix hdcp_psp.h codestyle Fix identation inside enum and place expressions in define macros inside () for hdcp_psp.h file Signed-off-by: Marcelo Mendes Spessoto Junior Signed-off-by: Alex Deucher commit 0c3c952d0512d0e27c191bdb3da85efbf2780ef6 Author: Marcelo Mendes Spessoto Junior Date: Fri Dec 29 14:41:52 2023 -0300 drm/amd/display: Fix freesync.c codestyle Remove braces for single statement if expression for freesync.c file Signed-off-by: Marcelo Mendes Spessoto Junior Signed-off-by: Alex Deucher commit f28390cd004cefa531dc4f5c190a2f11901a6f9a Author: Marcelo Mendes Spessoto Junior Date: Fri Dec 29 14:41:51 2023 -0300 drm/amd/display: Fix hdcp_psp.c codestyle Fix identation for hdcp_psp.c file Signed-off-by: Marcelo Mendes Spessoto Junior Signed-off-by: Alex Deucher commit c86e5ab2273705c0588ce23daf55e4c12f1f0998 Author: Marcelo Mendes Spessoto Junior Date: Fri Dec 29 14:41:50 2023 -0300 drm/amd/display: Fix hdcp1_execution.c codestyle Remove braces from single statement if expression in hdcp1_execution.c file Signed-off-by: Marcelo Mendes Spessoto Junior Signed-off-by: Alex Deucher commit 2f3be3ca779b11c332441b10e00443a2510f4d7b Author: Zhipeng Lu Date: Sun Dec 24 16:22:47 2023 +0800 drm/amd/pm/smu7: fix a memleak in smu7_hwmgr_backend_init The hwmgr->backend, (i.e. data) allocated by kzalloc is not freed in the error-handling paths of smu7_get_evv_voltages and smu7_update_edc_leakage_table. However, it did be freed in the error-handling of phm_initializa_dynamic_state_adjustment_rule_settings, by smu7_hwmgr_backend_fini. So the lack of free in smu7_get_evv_voltages and smu7_update_edc_leakage_table is considered a memleak in this patch. Fixes: 599a7e9fe1b6 ("drm/amd/powerplay: implement smu7 hwmgr to manager asics with smu ip version 7.") Fixes: 8f0804c6b7d0 ("drm/amd/pm: add edc leakage controller setting") Signed-off-by: Zhipeng Lu Signed-off-by: Alex Deucher commit b1a428b45dc7e47c7acc2ad0d08d8a6dda910c4c Author: Srinivasan Shanmugam Date: Fri Dec 29 15:07:09 2023 +0530 drm/amdkfd: Fix iterator used outside loop in 'kfd_add_peer_prop()' Fix the following about iterator use: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1456 kfd_add_peer_prop() warn: iterator used outside loop: 'iolink3' Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit bf2ad4fb8adca89374b54b225d494e0b1956dbea Author: Srinivasan Shanmugam Date: Wed Dec 27 12:54:44 2023 +0530 drm/amdgpu: Drop 'fence' check in 'to_amdgpu_amdkfd_fence()' Return value of container_of(...) can't be null, so null check is not required for 'fence'. Hence drop its NULL check. Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c:93 to_amdgpu_amdkfd_fence() warn: can 'fence' even be NULL? Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 499839eca34ad62d43025ec0b46b80e77065f6d8 Author: Srinivasan Shanmugam Date: Thu Dec 21 07:16:23 2023 +0530 drm/amdkfd: Confirm list is non-empty before utilizing list_first_entry in kfd_topology.c Before using list_first_entry, make sure to check that list is not empty, if list is empty return -ENODATA. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1347 kfd_create_indirect_link_prop() warn: can 'gpu_link' even be NULL? drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1428 kfd_add_peer_prop() warn: can 'iolink1' even be NULL? drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:1433 kfd_add_peer_prop() warn: can 'iolink2' even be NULL? Fixes: 0f28cca87e9a ("drm/amdkfd: Extend KFD device topology to surface peer-to-peer links") Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Suggested-by: Felix Kuehling Suggested-by: Lijo Lazar Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 13a1851f923d9a7a78a477497295c2dfd16ad4a4 Author: Srinivasan Shanmugam Date: Wed Jan 3 22:22:44 2024 +0530 drm/amdgpu: Fix '*fw' from request_firmware() not released in 'amdgpu_ucode_request()' Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c:1404 amdgpu_ucode_request() warn: '*fw' from request_firmware() not released on lines: 1404. Cc: Mario Limonciello Cc: Lijo Lazar Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 4f32504a2f85a7b40fe149436881381f48e9c0c0 Author: Srinivasan Shanmugam Date: Wed Jan 3 22:05:16 2024 +0530 drm/amdgpu: Fix variable 'mca_funcs' dereferenced before NULL check in 'amdgpu_mca_smu_get_mca_entry()' Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c:377 amdgpu_mca_smu_get_mca_entry() warn: variable dereferenced before check 'mca_funcs' (see line 368) 357 int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev, enum amdgpu_mca_error_type type, 358 int idx, struct mca_bank_entry *entry) 359 { 360 const struct amdgpu_mca_smu_funcs *mca_funcs = adev->mca.mca_funcs; 361 int count; 362 363 switch (type) { 364 case AMDGPU_MCA_ERROR_TYPE_UE: 365 count = mca_funcs->max_ue_count; mca_funcs is dereferenced here. 366 break; 367 case AMDGPU_MCA_ERROR_TYPE_CE: 368 count = mca_funcs->max_ce_count; mca_funcs is dereferenced here. 369 break; 370 default: 371 return -EINVAL; 372 } 373 374 if (idx >= count) 375 return -EINVAL; 376 377 if (mca_funcs && mca_funcs->mca_get_mca_entry) ^^^^^^^^^ Checked too late! Cc: Yang Wang Cc: Hawking Zhang Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit c572abffe9f50c8ba33060865449313b3f588c35 Author: Le Ma Date: Wed Jan 3 15:27:38 2024 +0800 drm/amdgpu: add param to specify fw bo location for front-door loading This param can help isolating data path issues on new systems in early phase. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8e317a811f3d63760d737c4371783f2e98291d40 Author: Srinivasan Shanmugam Date: Thu Dec 28 22:42:04 2023 +0530 drm/amdgpu: Remove unreachable code in 'atom_skip_src_int()' Fixes the below: drivers/gpu/drm/amd/amdgpu/atom.c:398 atom_skip_src_int() warn: ignoring unreachable code. Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 151374fb6e17ce966e1db8e1e2b35ea517202779 Author: Marcelo Mendes Spessoto Junior Date: Thu Dec 28 19:15:13 2023 -0300 drm/amd/display: Removing duplicate copyright text mod_freesync header file has duplicated copyright boilerplate. Drop the duplicate. Signed-off-by: Marcelo Mendes Spessoto Junior Signed-off-by: Alex Deucher commit fb915c87edc2c99bbde148a62bfa97a2c6d991bb Author: Alex Deucher Date: Wed Dec 20 12:36:08 2023 -0500 drm/amdgpu: skip gpu_info fw loading on navi12 It's no longer required. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2318 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1b0b232ee4e005e402a9cd21e47cecb6d6f54a29 Author: Alex Deucher Date: Wed Dec 20 12:33:45 2023 -0500 drm/amd/display: add nv12 bounding box This was included in gpu_info firmware, move it into the driver for consistency with other nv1x parts. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2318 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 30afdffb3f600d8fd1d5afa1b7187081e1ac85be Author: Joshua Ashton Date: Mon Jan 1 18:28:22 2024 +0000 drm/amd/display: Fix sending VSC (+ colorimetry) packets for DP/eDP displays without PSR The check for sending the vsc infopacket to the display was gated behind PSR (Panel Self Refresh) being enabled. The vsc infopacket also contains the colorimetry (specifically the container color gamut) information for the stream on modern DP. PSR is typically only supported on mobile phone eDP displays, thus this was not getting sent for typical desktop monitors or TV screens. This functionality is needed for proper HDR10 functionality on DP as it wants BT2020 RGB/YCbCr for the container color space. Cc: stable@vger.kernel.org Cc: Harry Wentland Cc: Xaver Hugl Cc: Melissa Wen Fixes: 15f9dfd545a1 ("drm/amd/display: Register Colorspace property for DP and HDMI") Tested-by: Simon Berz Tested-by: Xaver Hugl Signed-off-by: Joshua Ashton Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 6697dbf0afff73fcf2b53e99c4accdab58892e39 Author: Hawking Zhang Date: Sun Dec 31 17:42:47 2023 +0800 Revert "drm/amdgpu: enable mca debug mode on APU by default" Not needed any more with firmware fixes Signed-off-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 5df0f0b3b4d4f5eaac19f550a30be8922f2aca95 Author: Asad Kamal Date: Fri Dec 22 18:24:20 2023 +0800 drm/amd/pm: Add mem_busy_percent for GCv9.4.3 apu Expose sysfs entry mem_busy_percent for GC version 9.4.3 APU system Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 196da3f3f76a46905f7daab29c56974f1aba9a7a Author: Cristian Ciocaltea Date: Fri Jan 5 19:40:06 2024 +0200 drm/rockchip: vop2: Drop unused if_dclk_rate variable Commit 5a028e8f062f ("drm/rockchip: vop2: Add support for rk3588") introduced a variable which ended up being unused: rockchip_drm_vop2.c:1688:23: warning: variable ‘if_dclk_rate’ set but not used [-Wunused-but-set-variable] This has been initially used as part of a formula to compute the clock dividers, but eventually it has been replaced by static values. Drop the variable declaration and move its assignment to the comment block, to serve as documentation of how the constants have been generated. Signed-off-by: Cristian Ciocaltea Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20240105174007.98054-1-cristian.ciocaltea@collabora.com commit 15de2a27024132fcfe0078e2f56d697a0039e9fa Merge: 9f1bcd16e2bd4 415d10ccef712 Author: Mark Brown Date: Fri Jan 5 18:48:30 2024 +0000 rtq9128: Fix pm runtime and TDM usage Merge series from cy_huang@richtek.com: This patch series fix rtq9128 pm_runtime and TDM usage. commit 6dff315972640bfe542e2d044933751afd8e6c4a Author: Yuntao Wang Date: Tue Jan 2 22:49:05 2024 +0800 crash_core: fix and simplify the logic of crash_exclude_mem_range() The purpose of crash_exclude_mem_range() is to remove all memory ranges that overlap with [mstart-mend]. However, the current logic only removes the first overlapping memory range. Commit a2e9a95d2190 ("kexec: Improve & fix crash_exclude_mem_range() to handle overlapping ranges") attempted to address this issue, but it did not fix all error cases. Let's fix and simplify the logic of crash_exclude_mem_range(). Link: https://lkml.kernel.org/r/20240102144905.110047-4-ytcoode@gmail.com Signed-off-by: Yuntao Wang Acked-by: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Dave Young Cc: Hari Bathini Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Sourabh Jain Cc: Takashi Iwai Cc: Thomas Gleixner Cc: Vivek Goyal Signed-off-by: Andrew Morton commit 61bb219f9d83c1619e59153b837af25873a00a43 Author: Yuntao Wang Date: Tue Jan 2 22:49:04 2024 +0800 x86/crash: use SZ_1M macro instead of hardcoded value Use SZ_1M macro instead of hardcoded 1<<20 to make code more readable. Link: https://lkml.kernel.org/r/20240102144905.110047-3-ytcoode@gmail.com Signed-off-by: Yuntao Wang Acked-by: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Dave Young Cc: Hari Bathini Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Sourabh Jain Cc: Takashi Iwai Cc: Thomas Gleixner Cc: Vivek Goyal Signed-off-by: Andrew Morton commit 83d4a42a916677f0975997bc8894ac2ba9a5c6af Author: Yuntao Wang Date: Tue Jan 2 22:49:03 2024 +0800 x86/crash: remove the unused image parameter from prepare_elf_headers() Patch series "crash: Some cleanups and fixes", v2. This patchset includes two cleanups and one fix. This patch (of 3): The image parameter is no longer in use, remove it. Also, tidy up the code formatting. Link: https://lkml.kernel.org/r/20240102144905.110047-1-ytcoode@gmail.com Link: https://lkml.kernel.org/r/20240102144905.110047-2-ytcoode@gmail.com Signed-off-by: Yuntao Wang Acked-by: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: Dave Young Cc: Hari Bathini Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Sourabh Jain Cc: Takashi Iwai Cc: Thomas Gleixner Cc: Vivek Goyal Signed-off-by: Andrew Morton commit a5b7620bab81f16e8bbb04f4aea94c4c7feb0d77 Author: Suren Baghdasaryan Date: Fri Dec 29 18:56:36 2023 -0800 selftests/mm: add separate UFFDIO_MOVE test for PMD splitting Add a test for UFFDIO_MOVE ioctl operating on a hugepage which has to be split because destination is marked with MADV_NOHUGEPAGE. With this we cover all 3 cases: normal page move, hugepage move, hugepage splitting before move. Link: https://lkml.kernel.org/r/20231230025636.2477429-1-surenb@google.com Signed-off-by: Suren Baghdasaryan Cc: Al Viro Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Brian Geffon Cc: Christian Brauner Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport (IBM) Cc: Nicolas Geoffray Cc: Peter Xu Cc: Ryan Roberts Cc: Shuah Khan Cc: ZhangPeng Signed-off-by: Andrew Morton commit 8c9eea721a9837b227abcc9374862f4cefc71530 Author: Muhammad Usama Anjum Date: Mon Jan 1 13:36:13 2024 +0500 selftests/mm: skip test if application doesn't has root privileges The test depends on writing to nr_hugepages which isn't possible without root privileges. So skip the test in this case. Link: https://lkml.kernel.org/r/20240101083614.1076768-2-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Cc: Shuah Khan Signed-off-by: Andrew Morton commit 9a21701edc41465de56f97914741bfb7bfc2517d Author: Muhammad Usama Anjum Date: Mon Jan 1 13:36:12 2024 +0500 selftests/mm: conform test to TAP format output Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Link: https://lkml.kernel.org/r/20240101083614.1076768-1-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Cc: Shuah Khan Signed-off-by: Andrew Morton commit 84ba3f226ce1a1f0255b3fc9eb9abbd66d3e0d94 Author: Muhammad Usama Anjum Date: Tue Jan 2 10:32:22 2024 +0500 selftests: mm: hugepage-mmap: conform to TAP format output Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Link: https://lkml.kernel.org/r/20240102053223.2099572-1-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Cc: Shuah Khan Signed-off-by: Andrew Morton commit cb6e7cae18868422a23d62670110c61fd1b15029 Author: Muhammad Usama Anjum Date: Tue Jan 2 10:38:06 2024 +0500 selftests/mm: gup_test: conform test to TAP format output Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Link: https://lkml.kernel.org/r/20240102053807.2114200-1-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Cc: Shuah Khan Signed-off-by: Andrew Morton commit e2cfedf4b07cd3cdcb3648729fb1ce09c8c1fcc0 Author: Muhammad Usama Anjum Date: Tue Jan 2 13:19:18 2024 +0500 mm/selftests: hugepage-mremap: conform test to TAP format output Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Link: https://lkml.kernel.org/r/20240102081919.2325570-1-usama.anjum@collabora.com Signed-off-by: Muhammad Usama Anjum Cc: Shuah Khan Signed-off-by: Andrew Morton commit b805ab3c6935d14654ccc28f16ffce7a13c2c528 Author: Li Zhijian Date: Fri Dec 29 10:26:51 2023 +0800 mm/vmstat: move pgdemote_* out of CONFIG_NUMA_BALANCING Demotion can work well without CONFIG_NUMA_BALANCING. But the commit 23e9f0138963 ("mm/vmstat: move pgdemote_* to per-node stats") wrongly hid it behind CONFIG_NUMA_BALANCING. Fix it by moving them out of CONFIG_NUMA_BALANCING. Link: https://lkml.kernel.org/r/20231229022651.3229174-1-lizhijian@fujitsu.com Fixes: 23e9f0138963 ("mm/vmstat: move pgdemote_* to per-node stats") Signed-off-by: Li Zhijian Cc: "Huang, Ying" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton commit fc8580edbaa664b952063371805e4550afd7a139 Author: Barry Song <21cnbao@gmail.com> Date: Thu Dec 28 19:18:02 2023 +1300 mm: zsmalloc: return -ENOSPC rather than -EINVAL in zs_malloc while size is too large This is the case the "compressed" data is larger than the original data, it is better to return -ENOSPC which can help zswap record a poor compr rather than an invalid request. Then we get more friendly counting for reject_compress_poor in debugfs. bool zswap_store(struct folio *folio) { ... ret = zpool_malloc(zpool, dlen, gfp, &handle); if (ret == -ENOSPC) { zswap_reject_compress_poor++; goto put_dstmem; } if (ret) { zswap_reject_alloc_fail++; goto put_dstmem; } ... } Also, zbud_alloc() and z3fold_alloc() are returning ENOSPC in the same case, eg static int z3fold_alloc(struct z3fold_pool *pool, size_t size, gfp_t gfp, unsigned long *handle) { ... if (!size || (gfp & __GFP_HIGHMEM)) return -EINVAL; if (size > PAGE_SIZE) return -ENOSPC; ... } Link: https://lkml.kernel.org/r/20231228061802.25280-1-v-songbaohua@oppo.com Signed-off-by: Barry Song Reviewed-by: Chengming Zhou Reviewed-by: Nhat Pham Acked-by: Sergey Senozhatsky Cc: Chris Li Cc: Dan Streetman Cc: Johannes Weiner Cc: Minchan Kim Cc: Seth Jennings Cc: Vitaly Wool Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit c701123bd68bf1cc3bc167b4f597cb1f4995c39c Author: Matthew Wilcox (Oracle) Date: Thu Dec 28 08:57:48 2023 +0000 mm/memcontrol: remove __mod_lruvec_page_state() There are no more callers of __mod_lruvec_page_state(), so convert the implementation to __lruvec_stat_mod_folio(), removing two calls to compound_head() (one explicit, one hidden inside page_memcg()). Link: https://lkml.kernel.org/r/20231228085748.1083901-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Acked-by: Shakeel Butt Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner Signed-off-by: Andrew Morton commit b54d60b18e850561e8bdb4264ae740676c3b7658 Author: Matthew Wilcox (Oracle) Date: Thu Dec 28 08:57:47 2023 +0000 mm/khugepaged: use a folio more in collapse_file() This function is not yet fully converted to the folio API, but this removes a few uses of old APIs. Link: https://lkml.kernel.org/r/20231228085748.1083901-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Zi Yan Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner Signed-off-by: Andrew Morton commit 82feeaa0092523c309d8d4dd6d67237d1b1a1b45 Author: Matthew Wilcox (Oracle) Date: Thu Dec 28 08:57:46 2023 +0000 slub: use a folio in __kmalloc_large_node Mirror the code in free_large_kmalloc() and alloc_pages_node() and use a folio directly. Avoid the use of folio_alloc() as that will set up an rmappable folio which we do not want here. Link: https://lkml.kernel.org/r/20231228085748.1083901-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Rientjes Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner Signed-off-by: Andrew Morton commit 2443fb5bec4ff1dda4670e47ceb9ef8c05a06412 Author: Matthew Wilcox (Oracle) Date: Thu Dec 28 08:57:45 2023 +0000 slub: use folio APIs in free_large_kmalloc() Save a few calls to compound_head() by using the folio APIs directly. Link: https://lkml.kernel.org/r/20231228085748.1083901-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Rientjes Reviewed-by: Vlastimil Babka Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner Signed-off-by: Andrew Morton commit 8014c46ad991f05b15ffbc0c6ae130bdf911187b Author: Matthew Wilcox (Oracle) Date: Thu Dec 28 08:57:44 2023 +0000 slub: use alloc_pages_node() in alloc_slab_page() For no apparent reason, we were open-coding alloc_pages_node() in this function. Link: https://lkml.kernel.org/r/20231228085748.1083901-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: David Rientjes Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit e435ca87882167dda78776ce4bd6eb2094eb864b Author: Matthew Wilcox (Oracle) Date: Thu Dec 28 08:57:43 2023 +0000 mm: remove inc/dec lruvec page state functions Patch series "Remove some lruvec page accounting functions", v2. Some functions are now unused; remove them. Make __mod_lruvec_page_state() unused and then remove it. This patch (of 6): All callers of these have been converted to their folio equivalents. Link: https://lkml.kernel.org/r/20231228085748.1083901-1-willy@infradead.org Link: https://lkml.kernel.org/r/20231228085748.1083901-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Johannes Weiner Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit d4a5b369ad6d8aae552752ff438dddde653a72ec Author: Shakeel Butt Date: Thu Dec 28 07:30:55 2023 +0000 mm: ratelimit stat flush from workingset shrinker One of our workloads (Postgres 14 + sysbench OLTP) regressed on newer upstream kernel and on further investigation, it seems like the cause is the always synchronous rstat flush in the count_shadow_nodes() added by the commit f82e6bf9bb9b ("mm: memcg: use rstat for non-hierarchical stats"). On further inspection it seems like we don't really need accurate stats in this function as it was already approximating the amount of appropriate shadow entries to keep for maintaining the refault information. Since there is already 2 sec periodic rstat flush, we don't need exact stats here. Let's ratelimit the rstat flush in this code path. Link: https://lkml.kernel.org/r/20231228073055.4046430-1-shakeelb@google.com Fixes: f82e6bf9bb9b ("mm: memcg: use rstat for non-hierarchical stats") Signed-off-by: Shakeel Butt Cc: Johannes Weiner Cc: Yosry Ahmed Cc: Yu Zhao Cc: Michal Hocko Cc: Roman Gushchin Cc: Muchun Song Signed-off-by: Andrew Morton commit 63b85ac56a6498476fb34402c10a3f431f62f35c Author: Andrey Konovalov Date: Tue Dec 26 23:51:21 2023 +0100 kasan: stop leaking stack trace handles Commit 773688a6cb24 ("kasan: use stack_depot_put for Generic mode") added support for stack trace eviction for Generic KASAN. However, that commit didn't evict stack traces when the object is not put into quarantine. As a result, some stack traces are never evicted from the stack depot. In addition, with the "kasan: save mempool stack traces" series, the free stack traces for mempool objects are also not properly evicted from the stack depot. Fix both issues by: 1. Evicting all stack traces when an object if freed if it was not put into quarantine; 2. Always evicting an existing free stack trace when a new one is saved. Also do a few related clean-ups: - Do not zero out free track when initializing/invalidating free meta: set a value in shadow memory instead; - Rename KASAN_SLAB_FREETRACK to KASAN_SLAB_FREE_META; - Drop the kasan_init_cache_meta function as it's not used by KASAN; - Add comments for the kasan_alloc_meta and kasan_free_meta structs. [akpm@linux-foundation.org: make release_free_meta() and release_alloc_meta() static] Link: https://lkml.kernel.org/r/20231226225121.235865-1-andrey.konovalov@linux.dev Fixes: 773688a6cb24 ("kasan: use stack_depot_put for Generic mode") Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 7eb2d01a1bea78310a83bdebc880625c03cb94f6 Author: Kinsey Ho Date: Wed Dec 27 14:12:05 2023 +0000 mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE Improve code readability by removing CONFIG_TRANSPARENT_HUGEPAGE, since the compiler should be able to automatically optimize out the code that promotes THPs during page table walks. No functional changes. Link: https://lkml.kernel.org/r/20231227141205.2200125-6-kinseyho@google.com Signed-off-by: Kinsey Ho Co-developed-by: Aneesh Kumar K.V Signed-off-by: Aneesh Kumar K.V Tested-by: Donet Tom Acked-by: Yu Zhao Cc: kernel test robot Signed-off-by: Andrew Morton commit 533c67e6358406727145efae32882c4dc355d6c5 Author: Kinsey Ho Date: Wed Dec 27 14:12:04 2023 +0000 mm/mglru: add dummy pmd_dirty() Add dummy pmd_dirty() for architectures that don't provide it. This is similar to commit 6617da8fb565 ("mm: add dummy pmd_young() for architectures not having it"). Link: https://lkml.kernel.org/r/20231227141205.2200125-5-kinseyho@google.com Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312210606.1Etqz3M4-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202312210042.xQEiqlEh-lkp@intel.com/ Signed-off-by: Kinsey Ho Suggested-by: Yu Zhao Cc: Aneesh Kumar K.V Cc: Donet Tom Signed-off-by: Andrew Morton commit 745b13e647cd119e70d16b57698e12b7c86ca264 Author: Kinsey Ho Date: Wed Dec 27 14:12:03 2023 +0000 mm/mglru: remove CONFIG_MEMCG Remove CONFIG_MEMCG in a refactoring to improve code readability at the cost of a few bytes in struct lru_gen_folio per node when CONFIG_MEMCG=n. Link: https://lkml.kernel.org/r/20231227141205.2200125-4-kinseyho@google.com Signed-off-by: Kinsey Ho Co-developed-by: Aneesh Kumar K.V Signed-off-by: Aneesh Kumar K.V Tested-by: Donet Tom Acked-by: Yu Zhao Cc: kernel test robot Signed-off-by: Andrew Morton commit 61dd3f246b3adaabff3241c586f2210ac91b05a4 Author: Kinsey Ho Date: Wed Dec 27 14:12:02 2023 +0000 mm/mglru: add CONFIG_LRU_GEN_WALKS_MMU Add CONFIG_LRU_GEN_WALKS_MMU such that if disabled, the code that walks page tables to promote pages into the youngest generation will not be built. Also improves code readability by adding two helper functions get_mm_state() and get_next_mm(). Link: https://lkml.kernel.org/r/20231227141205.2200125-3-kinseyho@google.com Signed-off-by: Kinsey Ho Co-developed-by: Aneesh Kumar K.V Signed-off-by: Aneesh Kumar K.V Tested-by: Donet Tom Acked-by: Yu Zhao Cc: kernel test robot Signed-off-by: Andrew Morton commit 71ce1ab54a505736786d9c5921e6c2718c7ec535 Author: Kinsey Ho Date: Wed Dec 27 14:12:01 2023 +0000 mm/mglru: add CONFIG_ARCH_HAS_HW_PTE_YOUNG Patch series "mm/mglru: Kconfig cleanup", v4. This series is the result of the following discussion: https://lore.kernel.org/47066176-bd93-55dd-c2fa-002299d9e034@linux.ibm.com/ It mainly avoids building the code that walks page tables on CPUs that use it, i.e., those don't support hardware accessed bit. Specifically, it introduces a new Kconfig to guard some of functions added by commit bd74fdaea146 ("mm: multi-gen LRU: support page table walks") on CPUs like POWER9, on which the series was tested. This patch (of 5): Some architectures are able to set the accessed bit in PTEs when PTEs are used as part of linear address translations. Add CONFIG_ARCH_HAS_HW_PTE_YOUNG for such architectures to be able to override arch_has_hw_pte_young(). Link: https://lkml.kernel.org/r/20231227141205.2200125-1-kinseyho@google.com Link: https://lkml.kernel.org/r/20231227141205.2200125-2-kinseyho@google.com Signed-off-by: Kinsey Ho Co-developed-by: Aneesh Kumar K.V Signed-off-by: Aneesh Kumar K.V Tested-by: Donet Tom Acked-by: Yu Zhao Cc: kernel test robot Signed-off-by: Andrew Morton commit 9c5938694cd0e9e00bdfb7e60900673263daf4d5 Author: David Hildenbrand Date: Fri Jan 5 16:57:29 2024 +0100 mm/rmap: silence VM_WARN_ON_FOLIO() in __folio_rmap_sanity_checks() Unfortunately, vm_insert_page() and friends and up passing driver-allocated folios into folio_add_file_rmap_pte() using insert_page_into_pte_locked(). While these driver-allocated folios can be compound pages (large folios), they are not proper "rmappable" folios. In these VM_MIXEDMAP VMAs, there isn't really the concept of a reverse mapping, so long-term, we should clean that up and not call into rmap code. For the time being, document how we can end up in rmap code with large folios that are not marked rmappable. Link: https://lkml.kernel.org/r/793c5cee-d5fc-4eb1-86a2-39e05686233d@redhat.com Fixes: 68f0320824fa ("mm/rmap: convert folio_add_file_rmap_range() into folio_add_file_rmap_[pte|ptes|pmd]()") Reported-by: syzbot+50ef73537bbc393a25bb@syzkaller.appspotmail.com Closes: https://lkml.kernel.org/r/000000000000014174060e09316e@google.com Signed-off-by: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 982ae058b2f08f576e4f3d4055f8916ba789f3d4 Author: Suren Baghdasaryan Date: Tue Jan 2 15:32:56 2024 -0800 userfaultfd: fix move_pages_pte() splitting folio under RCU read lock While testing the split PMD path with lockdep enabled I've got an "Invalid wait context" error caused by split_huge_page_to_list() trying to lock anon_vma->rwsem while inside RCU read section. The issues is due to move_pages_pte() calling split_folio() under RCU read lock. Fix this by unmapping the PTEs and exiting RCU read section before splitting the folio and then retrying. The same retry pattern is used when locking the folio or anon_vma in this function. After splitting the large folio we unlock and release it because after the split the old folio might not be the one that contains the src_addr. Link: https://lkml.kernel.org/r/20240102233256.1077959-1-surenb@google.com Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI") Signed-off-by: Suren Baghdasaryan Reviewed-by: Peter Xu Cc: Al Viro Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Brian Geffon Cc: Christian Brauner Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport (IBM) Cc: Nicolas Geoffray Cc: Ryan Roberts Cc: Shuah Khan Cc: ZhangPeng Signed-off-by: Andrew Morton commit bcd30d4cd937e8e15c3986358c5e601135475ce1 Author: Matthew Wilcox (Oracle) Date: Mon Jan 1 09:38:48 2024 +0000 buffer: fix unintended successful return If try_to_free_buffers() succeeded and then folio_alloc_buffers() failed, grow_dev_folio() would return success. This would be incorrect; memory allocation failure is supposed to result in a failure. It's a harmless bug; the caller will simply go around the loop one more time and grow_dev_folio() will correctly return a failure that time. But it was an unintended change and looks like a more serious bug than it is. While I'm in here, improve the commentary about why we return success even though we failed. Link: https://lkml.kernel.org/r/20240101093848.2017115-1-willy@infradead.org Fixes: 6d840a18773f ("buffer: return bool from grow_dev_folio()") Signed-off-by: Matthew Wilcox (Oracle) Reported-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit ee93b1ffde3d5d102c08754964686985062a54f9 Merge: cb420106901ad 4e321d590cec6 Author: Jakub Kicinski Date: Fri Jan 5 08:11:51 2024 -0800 Merge branch 'net-gro-reduce-extension-header-parsing-overhead' Richard Gobert says: ==================== net: gro: reduce extension header parsing overhead This series attempts to reduce the parsing overhead of IPv6 extension headers in GRO and GSO, by removing extension header specific code and enabling the frag0 fast path. The following changes were made: - Removed some unnecessary HBH conditionals by adding HBH offload to inet6_offloads - Added a utility function to support frag0 fast path in ipv6_gro_receive - Added selftests for IPv6 packets with extension headers in GRO v2: https://lore.kernel.org/netdev/127b8199-1cd4-42d7-9b2b-875abaad93fe@gmail.com/ v1: https://lore.kernel.org/netdev/f4eff69d-3917-4c42-8c6b-d09597ac4437@gmail.com/ ==================== Link: https://lore.kernel.org/r/ac6fb684-c00e-449c-92c3-99358a927ade@gmail.com Signed-off-by: Jakub Kicinski commit 4e321d590cec6053cb3c566413794706035ee638 Author: Richard Gobert Date: Wed Jan 3 15:48:35 2024 +0100 selftests/net: fix GRO coalesce test and add ext header coalesce tests Currently there is no test which checks that IPv6 extension header packets successfully coalesce. This commit adds a test, which verifies two IPv6 packets with HBH extension headers do coalesce, and another test which checks that packets with different extension header data do not coalesce in GRO. I changed the receive socket filter to accept a packet with one extension header. This change exposed a bug in the fragment test -- the old BPF did not accept the fragment packet. I updated correct_num_packets in the fragment test accordingly. Signed-off-by: Richard Gobert Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/69282fed-2415-47e8-b3d3-34939ec3eb56@gmail.com Signed-off-by: Jakub Kicinski commit dff0b0161ad571f888d37f5e7163a07dcafdef60 Author: Richard Gobert Date: Wed Jan 3 15:44:21 2024 +0100 net: gro: parse ipv6 ext headers without frag0 invalidation The existing code always pulls the IPv6 header and sets the transport offset initially. Then optionally again pulls any extension headers in ipv6_gso_pull_exthdrs and sets the transport offset again on return from that call. skb->data is set at the start of the first extension header before calling ipv6_gso_pull_exthdrs, and must disable the frag0 optimization because that function uses pskb_may_pull/pskb_pull instead of skb_gro_ helpers. It sets the GRO offset to the TCP header with skb_gro_pull and sets the transport header. Then returns skb->data to its position before this block. This commit introduces a new helper function - ipv6_gro_pull_exthdrs - which is used in ipv6_gro_receive to pull ipv6 ext headers instead of ipv6_gso_pull_exthdrs. Thus, there is no modification of skb->data, all operations use skb_gro_* helpers, and the frag0 fast path can be taken for IPv6 packets with ext headers. Signed-off-by: Richard Gobert Reviewed-by: Willem de Bruijn Reviewed-by: David Ahern Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/504130f6-b56c-4dcc-882c-97942c59f5b7@gmail.com Signed-off-by: Jakub Kicinski commit f2e3fc2158e66d84af77f4818df47b607ded3a75 Author: Richard Gobert Date: Wed Jan 3 15:40:44 2024 +0100 net: gso: add HBH extension header offload support This commit adds net_offload to IPv6 Hop-by-Hop extension headers (as it is done for routing and dstopts) since it is supported in GSO and GRO. This allows to remove specific HBH conditionals in GSO and GRO when pulling and parsing an incoming packet. Signed-off-by: Richard Gobert Reviewed-by: Willem de Bruijn Reviewed-by: David Ahern Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/d4f8825a-1d55-4b12-9d67-a254dbbfa6ae@gmail.com Signed-off-by: Jakub Kicinski commit 3f14b377d01d8357eba032b4cabc8c1149b458b6 Author: Tao Liu Date: Thu Dec 28 16:14:57 2023 +0800 net/sched: act_ct: fix skb leak and crash on ooo frags act_ct adds skb->users before defragmentation. If frags arrive in order, the last frag's reference is reset in: inet_frag_reasm_prepare skb_morph which is not straightforward. However when frags arrive out of order, nobody unref the last frag, and all frags are leaked. The situation is even worse, as initiating packet capture can lead to a crash[0] when skb has been cloned and shared at the same time. Fix the issue by removing skb_get() before defragmentation. act_ct returns TC_ACT_CONSUMED when defrag failed or in progress. [0]: [ 843.804823] ------------[ cut here ]------------ [ 843.809659] kernel BUG at net/core/skbuff.c:2091! [ 843.814516] invalid opcode: 0000 [#1] PREEMPT SMP [ 843.819296] CPU: 7 PID: 0 Comm: swapper/7 Kdump: loaded Tainted: G S 6.7.0-rc3 #2 [ 843.824107] Hardware name: XFUSION 1288H V6/BC13MBSBD, BIOS 1.29 11/25/2022 [ 843.828953] RIP: 0010:pskb_expand_head+0x2ac/0x300 [ 843.833805] Code: 8b 70 28 48 85 f6 74 82 48 83 c6 08 bf 01 00 00 00 e8 38 bd ff ff 8b 83 c0 00 00 00 48 03 83 c8 00 00 00 e9 62 ff ff ff 0f 0b <0f> 0b e8 8d d0 ff ff e9 b3 fd ff ff 81 7c 24 14 40 01 00 00 4c 89 [ 843.843698] RSP: 0018:ffffc9000cce07c0 EFLAGS: 00010202 [ 843.848524] RAX: 0000000000000002 RBX: ffff88811a211d00 RCX: 0000000000000820 [ 843.853299] RDX: 0000000000000640 RSI: 0000000000000000 RDI: ffff88811a211d00 [ 843.857974] RBP: ffff888127d39518 R08: 00000000bee97314 R09: 0000000000000000 [ 843.862584] R10: 0000000000000000 R11: ffff8881109f0000 R12: 0000000000000880 [ 843.867147] R13: ffff888127d39580 R14: 0000000000000640 R15: ffff888170f7b900 [ 843.871680] FS: 0000000000000000(0000) GS:ffff889ffffc0000(0000) knlGS:0000000000000000 [ 843.876242] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 843.880778] CR2: 00007fa42affcfb8 CR3: 000000011433a002 CR4: 0000000000770ef0 [ 843.885336] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 843.889809] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 843.894229] PKRU: 55555554 [ 843.898539] Call Trace: [ 843.902772] [ 843.906922] ? __die_body+0x1e/0x60 [ 843.911032] ? die+0x3c/0x60 [ 843.915037] ? do_trap+0xe2/0x110 [ 843.918911] ? pskb_expand_head+0x2ac/0x300 [ 843.922687] ? do_error_trap+0x65/0x80 [ 843.926342] ? pskb_expand_head+0x2ac/0x300 [ 843.929905] ? exc_invalid_op+0x50/0x60 [ 843.933398] ? pskb_expand_head+0x2ac/0x300 [ 843.936835] ? asm_exc_invalid_op+0x1a/0x20 [ 843.940226] ? pskb_expand_head+0x2ac/0x300 [ 843.943580] inet_frag_reasm_prepare+0xd1/0x240 [ 843.946904] ip_defrag+0x5d4/0x870 [ 843.950132] nf_ct_handle_fragments+0xec/0x130 [nf_conntrack] [ 843.953334] tcf_ct_act+0x252/0xd90 [act_ct] [ 843.956473] ? tcf_mirred_act+0x516/0x5a0 [act_mirred] [ 843.959657] tcf_action_exec+0xa1/0x160 [ 843.962823] fl_classify+0x1db/0x1f0 [cls_flower] [ 843.966010] ? skb_clone+0x53/0xc0 [ 843.969173] tcf_classify+0x24d/0x420 [ 843.972333] tc_run+0x8f/0xf0 [ 843.975465] __netif_receive_skb_core+0x67a/0x1080 [ 843.978634] ? dev_gro_receive+0x249/0x730 [ 843.981759] __netif_receive_skb_list_core+0x12d/0x260 [ 843.984869] netif_receive_skb_list_internal+0x1cb/0x2f0 [ 843.987957] ? mlx5e_handle_rx_cqe_mpwrq_rep+0xfa/0x1a0 [mlx5_core] [ 843.991170] napi_complete_done+0x72/0x1a0 [ 843.994305] mlx5e_napi_poll+0x28c/0x6d0 [mlx5_core] [ 843.997501] __napi_poll+0x25/0x1b0 [ 844.000627] net_rx_action+0x256/0x330 [ 844.003705] __do_softirq+0xb3/0x29b [ 844.006718] irq_exit_rcu+0x9e/0xc0 [ 844.009672] common_interrupt+0x86/0xa0 [ 844.012537] [ 844.015285] [ 844.017937] asm_common_interrupt+0x26/0x40 [ 844.020591] RIP: 0010:acpi_safe_halt+0x1b/0x20 [ 844.023247] Code: ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 65 48 8b 04 25 00 18 03 00 48 8b 00 a8 08 75 0c 66 90 0f 00 2d 81 d0 44 00 fb f4 c3 0f 1f 00 89 fa ec 48 8b 05 ee 88 ed 00 a9 00 00 00 80 75 11 [ 844.028900] RSP: 0018:ffffc90000533e70 EFLAGS: 00000246 [ 844.031725] RAX: 0000000000004000 RBX: 0000000000000001 RCX: 0000000000000000 [ 844.034553] RDX: ffff889ffffc0000 RSI: ffffffff828b7f20 RDI: ffff88a090f45c64 [ 844.037368] RBP: ffff88a0901a2800 R08: ffff88a090f45c00 R09: 00000000000317c0 [ 844.040155] R10: 00ec812281150475 R11: ffff889fffff0e04 R12: ffffffff828b7fa0 [ 844.042962] R13: ffffffff828b7f20 R14: 0000000000000001 R15: 0000000000000000 [ 844.045819] acpi_idle_enter+0x7b/0xc0 [ 844.048621] cpuidle_enter_state+0x7f/0x430 [ 844.051451] cpuidle_enter+0x2d/0x40 [ 844.054279] do_idle+0x1d4/0x240 [ 844.057096] cpu_startup_entry+0x2a/0x30 [ 844.059934] start_secondary+0x104/0x130 [ 844.062787] secondary_startup_64_no_verify+0x16b/0x16b [ 844.065674] Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct") Signed-off-by: Tao Liu Link: https://lore.kernel.org/r/20231228081457.936732-1-taoliu828@163.com Signed-off-by: Jakub Kicinski commit be12ad45e15b5ee0e2526a50266ba1d295d26a88 Author: Shameer Kolothum Date: Mon Nov 20 09:14:06 2023 +0000 hisi_acc_vfio_pci: Update migration data pointer correctly on saving/resume When the optional PRE_COPY support was added to speed up the device compatibility check, it failed to update the saving/resuming data pointers based on the fd offset. This results in migration data corruption and when the device gets started on the destination the following error is reported in some cases, [ 478.907684] arm-smmu-v3 arm-smmu-v3.2.auto: event 0x10 received: [ 478.913691] arm-smmu-v3 arm-smmu-v3.2.auto: 0x0000310200000010 [ 478.919603] arm-smmu-v3 arm-smmu-v3.2.auto: 0x000002088000007f [ 478.925515] arm-smmu-v3 arm-smmu-v3.2.auto: 0x0000000000000000 [ 478.931425] arm-smmu-v3 arm-smmu-v3.2.auto: 0x0000000000000000 [ 478.947552] hisi_zip 0000:31:00.0: qm_axi_rresp [error status=0x1] found [ 478.955930] hisi_zip 0000:31:00.0: qm_db_timeout [error status=0x400] found [ 478.955944] hisi_zip 0000:31:00.0: qm sq doorbell timeout in function 2 Fixes: d9a871e4a143 ("hisi_acc_vfio_pci: Introduce support for PRE_COPY state transitions") Signed-off-by: Shameer Kolothum Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231120091406.780-1-shameerali.kolothum.thodi@huawei.com Signed-off-by: Alex Williamson commit cb420106901ad038ea8b3c58fe26a5a465c40080 Author: Jakub Kicinski Date: Thu Jan 4 06:48:55 2024 -0800 net: fill in MODULE_DESCRIPTION()s for CAIF W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to all the CAIF sub-modules. Link: https://lore.kernel.org/r/20240104144855.1320993-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit b8549d85983c2c494960b82aa41749db3d61fa4d Author: Jakub Kicinski Date: Thu Jan 4 06:41:19 2024 -0800 net: fill in MODULE_DESCRIPTION() for AF_PACKET W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add description to net/packet/af_packet.c Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20240104144119.1319055-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 0ed6e95255e79c66a60eae033f8212447cbb6ed9 Author: Jakub Kicinski Date: Thu Jan 4 06:37:59 2024 -0800 net: fill in MODULE_DESCRIPTION()s for DSA tags W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to all the DSA tag modules. The descriptions are copy/pasted Kconfig names, with s/^Tag/DSA tag/. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Acked-by: Arun Ramadoss Acked-by: Arınç ÜNAL Acked-by: Kurt Kanzenbach Link: https://lore.kernel.org/r/20240104143759.1318137-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit fc0caed81bca733af1cebf62a3c16f55c81e937c Author: Jakub Kicinski Date: Thu Jan 4 06:37:37 2024 -0800 net: fill in MODULE_DESCRIPTION()s for ATM W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to all the ATM modules and drivers. Link: https://lore.kernel.org/r/20240104143737.1317945-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit c07a4dab243a99589bdfd5ec364b5cb1db6b70f3 Author: Zhihao Cheng Date: Mon Nov 20 19:13:45 2023 +0800 ubifs: Check @c->dirty_[n|p]n_cnt and @c->nroot state under @c->lp_mutex The checking of @c->nroot->flags and @c->dirty_[n|p]n_cnt in function nothing_to_commit() is not atomic, which could be raced with modifying of lpt, for example: P1 P2 P3 run_gc ubifs_garbage_collect do_commit ubifs_return_leb ubifs_lpt_lookup_dirty dirty_cow_nnode do_commit nothing_to_commit if (test_bit(DIRTY_CNODE, &c->nroot->flags) // false test_and_set_bit(DIRTY_CNODE, &nnode->flags) c->dirty_nn_cnt += 1 ubifs_assert(c, c->dirty_nn_cnt == 0) // false ! Fetch a reproducer in Link: UBIFS error (ubi0:0 pid 2747): ubifs_assert_failed UBIFS assert failed: c->dirty_pn_cnt == 0, in fs/ubifs/commit.c Call Trace: ubifs_ro_mode+0x58/0x70 [ubifs] ubifs_assert_failed+0x6a/0x90 [ubifs] do_commit+0x5b7/0x930 [ubifs] ubifs_run_commit+0xc6/0x1a0 [ubifs] ubifs_sync_fs+0xd8/0x110 [ubifs] sync_filesystem+0xb4/0x120 do_syscall_64+0x6f/0x140 Fix it by checking @c->dirty_[n|p]n_cnt and @c->nroot state with @c->lp_mutex locked. Fixes: 944fdef52ca9 ("UBIFS: do not start the commit if there is nothing to commit") Link: https://bugzilla.kernel.org/show_bug.cgi?id=218162 Signed-off-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit aa537fee6188583f938282b3b49324e11bc21485 Merge: 82e7b22f64720 f035dca34ede0 Author: Jakub Kicinski Date: Fri Jan 5 07:58:21 2024 -0800 Merge branch 'dpll-expose-fractional-frequency-offset-value-to-user' Jiri Pirko says: ==================== dpll: expose fractional frequency offset value to user Allow to expose pin fractional frequency offset value over new DPLL generic netlink attribute. Add an op to get the value from the driver. Implement this new op in mlx5 driver. ==================== Link: https://lore.kernel.org/r/20240103132838.1501801-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit f035dca34ede00d667a3e2d16e1c731161eeacec Author: Jiri Pirko Date: Wed Jan 3 14:28:38 2024 +0100 net/mlx5: DPLL, Implement fractional frequency offset get pin op Implement ffo_get() pin op filling it up to MSEED.frequency_diff value. Signed-off-by: Jiri Pirko Reviewed-by: Arkadiusz Kubalewski Acked-by: Vadim Fedorenko Acked-by: Arkadiusz Kubalewski Link: https://lore.kernel.org/r/20240103132838.1501801-4-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit e6d86938a40a60adaffad170914380b886c029f8 Author: Jiri Pirko Date: Wed Jan 3 14:28:37 2024 +0100 net/mlx5: DPLL, Use struct to get values from mlx5_dpll_synce_status_get() Instead of passing separate args, introduce struct mlx5_dpll_synce_status to hold the values obtained by mlx5_dpll_synce_status_get(). Signed-off-by: Jiri Pirko Reviewed-by: Arkadiusz Kubalewski Acked-by: Vadim Fedorenko Acked-by: Arkadiusz Kubalewski Link: https://lore.kernel.org/r/20240103132838.1501801-3-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 8a6286c1804e2c7144aef3154a0357c4b496e10b Author: Jiri Pirko Date: Wed Jan 3 14:28:36 2024 +0100 dpll: expose fractional frequency offset value to user Add a new netlink attribute to expose fractional frequency offset value for a pin. Add an op to get the value from the driver. Signed-off-by: Jiri Pirko Acked-by: Vadim Fedorenko Acked-by: Arkadiusz Kubalewski Link: https://lore.kernel.org/r/20240103132838.1501801-2-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 17dc11a02d8dacc7e78968daa2a8c16281eb7d1e Author: Christophe JAILLET Date: Fri Jan 5 15:21:00 2024 +0100 spi: coldfire-qspi: Remove an erroneous clk_disable_unprepare() from the remove function The commit in Fixes has changed a devm_clk_get()/clk_prepare_enable() into a devm_clk_get_enabled(). It has updated the error handling path of the probe accordingly, but the remove has been left unchanged. Remove now the redundant clk_disable_unprepare() call from the remove function. Fixes: a90a987ebe00 ("spi: use devm_clk_get_enabled() in mcfqspi_probe()") Signed-off-by: Christophe JAILLET Link: https://msgid.link/r/6670aed303e1f7680e0911387606a8ae069e2cef.1704464447.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 92a714d727ec9e7ccfcc7432d348aba730145914 Author: David Howells Date: Thu Jan 4 15:52:11 2024 +0000 netfs: Fix interaction between write-streaming and cachefiles culling An issue can occur between write-streaming (storing dirty data in partial non-uptodate pages) and a cachefiles object being culled to make space. The problem occurs because the cache object is only marked in use while there are files open using it. Once it has been released, it can be culled and the cookie marked disabled. At this point, a streaming write is permitted to occur (if the cache is active, we require pages to be prefetched and cached), but the cache can become active again before this gets flushed out - and then two effects can occur: (1) The cache may be asked to write out a region that's less than its DIO block size (assumed by cachefiles to be PAGE_SIZE) - and this causes one of two debugging statements to be emitted. (2) netfs_how_to_modify() gets confused because it sees a page that isn't allowed to be non-uptodate being uptodate and tries to prefetch it - leading to a warning that PG_fscache is set twice. Fix this by the following means: (1) Add a netfs_inode flag to disallow write-streaming to an inode and set it if we ever do local caching of that inode. It remains set for the lifetime of that inode - even if the cookie becomes disabled. (2) If the no-write-streaming flag is set, then make netfs_how_to_modify() always want to prefetch instead. (3) If netfs_how_to_modify() decides it wants to prefetch a folio, but that folio has write-streamed data in it, then it requires the folio be flushed first. (4) Export a counter of the number of times we wanted to prefetch a non-uptodate page, but found it had write-streamed data in it. (5) Export a counter of the number of times we cancelled a write to the cache because it didn't DIO align and remove the debug statements. Reported-by: Marc Dionne Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-erofs@lists.ozlabs.org cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 2ba5b48938d752d09d65d1a01c8ff0d2228c5ab5 Author: Sascha Hauer Date: Wed Nov 8 07:05:06 2023 +0100 ubifs: describe function parameters With 16a26b20d2afd ("ubifs: authentication: Add hashes to index nodes") insert_node() and insert_dent() got a new function parameter 'hash'. Add a description for this new parameter. Signed-off-by: Sascha Hauer Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311051618.D7YUE1Rr-lkp@intel.com/ Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 19c2fcb4a489cf7c40686e694336478093919960 Author: Randy Dunlap Date: Sun Nov 5 22:07:44 2023 -0800 ubifs: auth.c: fix kernel-doc function prototype warning Use the correct function name in the kernel-doc comment to prevent a kernel-doc warning: auth.c:30: warning: expecting prototype for ubifs_node_calc_hash(). Prototype was for __ubifs_node_calc_hash() instead Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: lore.kernel.org/r/202311052125.gE1Rylox-lkp@intel.com Cc: Richard Weinberger Cc: linux-mtd@lists.infradead.org Reviewed-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 738fadaa549797c777650ac8d0d433fdc20152e3 Author: Eric Biggers Date: Sat Oct 28 22:03:55 2023 -0700 ubifs: use crypto_shash_tfm_digest() in ubifs_hmac_wkm() Simplify ubifs_hmac_wkm() by using crypto_shash_tfm_digest() instead of an alloc+init+update+final sequence. This should also improve performance. Signed-off-by: Eric Biggers Tested-by: Zhihao Cheng Signed-off-by: Richard Weinberger commit 83aec96c631e0fa75cfe6d6a1b113a32151aaa88 Author: Benjamin Berg Date: Fri Nov 10 12:03:48 2023 +0100 um: Mark 32bit syscall helpers as clobbering memory The 64bit helper are marked to clobber the memory, but the 32bit ones are not. Add the appropriate clobber to the 32bit helper routines so that the compiler cannot do invalid optimizations. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 1e41c415e21ff03ddf5c3725b608d0e4f0c239e3 Author: Benjamin Berg Date: Fri Nov 10 12:03:47 2023 +0100 um: Remove unused register save/restore functions These functions were only used when calling PTRACE_ARCH_PRCTL, but this code has been removed. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 1ca1443570e4085c180ecc657d319c21b22a76f6 Author: Benjamin Berg Date: Fri Nov 10 12:03:46 2023 +0100 um: Rely on PTRACE_SETREGSET to set FS/GS base registers These registers are saved/restored together with the other general registers using ptrace. In arch_set_tls we then just need to set the register and it will be synced back normally. Most of this logic was introduced in commit f355559cf7845 ("[PATCH] uml: x86_64 thread fixes"). However, at least today we can rely on ptrace to restore the base registers for us. As such, only the part of the patch that tracks the FS register for use as thread local storage is actually needed. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 21822553a5f424892c12d1664b3c1235b095c6c6 Author: Michał Winiarski Date: Fri Oct 20 11:21:59 2023 +0200 Documentation: kunit: Add clang UML coverage example LLVM-based toolchain is using a different set of tools for coverage. Add an example that produces output in lcov format. Signed-off-by: Michał Winiarski Reviewed-by: David Gow [rw: Added spelling fixes from David Gow] Signed-off-by: Richard Weinberger commit 4088e389476e3baababf9b22f34b9d8b3e557344 Author: David Howells Date: Fri Jan 5 14:55:52 2024 +0000 netfs: Count DIO writes Provide a counter for DIO writes to match that for DIO reads. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 415d10ccef712f3ec73cd880c1fef3eb48601c3a Author: ChiYuan Huang Date: Fri Dec 29 09:46:02 2023 +0800 ASoC: codecs: rtq9128: Fix TDM enable and DAI format control flow To enable TDM mode, the current control flow limits the function calling order should be 'set_tdm_slot->set_dai_fmt'. But not all platform sound card like as simeple card to follow this design. To bypass this limit, adjust the DAI format setting in runtime 'hw_param' callback. Signed-off-by: ChiYuan Huang Link: https://msgid.link/r/c4c8df00d8d179b8b5b39a8521de3a85325c57e8.1703813842.git.cy_huang@richtek.com Signed-off-by: Mark Brown commit 35040410372ca27a33cec8382d42c90b6b6c99f6 Author: ChiYuan Huang Date: Fri Dec 29 09:46:01 2023 +0800 ASoC: codecs: rtq9128: Fix PM_RUNTIME usage If 'pm_runtime_resume_and_get' is used, must check the return value to prevent the active count not matched problem. Signed-off-by: ChiYuan Huang Link: https://msgid.link/r/bebd9e2bed9e0528a7fd9c528d785da02caf4f1a.1703813842.git.cy_huang@richtek.com Signed-off-by: Mark Brown commit 0e4d464cda4c5996402343d4c9e2b6ceec716f93 Author: David Howells Date: Fri Jan 5 14:57:14 2024 +0000 netfs: Mark netfs_unbuffered_write_iter_locked() static Mark netfs_unbuffered_write_iter_locked() static as it's only called from the file in which it is defined. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 9f1bcd16e2bd41d758438f1d74e5f2d35f1e8c8e Author: Shenghao Ding Date: Thu Jan 4 22:57:19 2024 +0800 ASoC: tas2781: Add tas2563 into driver Move tas2563 from tas2562 driver to tas2781 driver to unbind tas2563 from tas2562 driver code and bind it to tas2781 driver code, because tas2563 only work in bypass-DSP mode with tas2562 driver. In order to enable DSP mode for tas2563, it has been moved to tas2781 driver. As to the hardware part, such as register setting and DSP firmware, all these are stored in the binary firmware. What tas2781 drivder does is to parse the firmware and download it to the chip, then power on the chip. So, tas2781 driver can be resued as tas2563 driver. Only attention will be paid to downloading corresponding firmware. Signed-off-by: Shenghao Ding Link: https://msgid.link/r/20240104145721.1398-4-shenghao-ding@ti.com Signed-off-by: Mark Brown commit e9aa44736cb75e901d76ee59d80db1ae79d516f1 Author: Shenghao Ding Date: Thu Jan 4 22:57:18 2024 +0800 ASoC: tas2781: Add tas2563 into header file for DSP mode Move tas2563 from tas2562 header file to tas2781 header file to unbind tas2563 from tas2562 driver code and bind it to tas2781 driver code, because tas2563 only work in bypass-DSP mode with tas2562 driver. In order to enable DSP mode for tas2563, it has been moved to tas2781 driver. As to the hardware part, such as register setting and DSP firmware, all these are stored in the binary firmware. What tas2781 drivder does is to parse the firmware and download it to the chip, then power on the chip. So, tas2781 driver can be resued as tas2563 driver. Only attention will be paid to downloading corresponding firmware. Signed-off-by: Shenghao Ding Link: https://msgid.link/r/20240104145721.1398-3-shenghao-ding@ti.com Signed-off-by: Mark Brown commit 645994d21287a1ad2f637818d737f7a3d84e97d7 Author: Shenghao Ding Date: Thu Jan 4 22:57:17 2024 +0800 ASoC: tas2562: move tas2563 from tas2562 driver to tas2781 driver Move tas2563 from tas2562 driver to tas2781 driver to unbind tas2563 from tas2562 driver code and bind it to tas2781 driver code, because tas2563 only work in bypass-DSP mode with tas2562 driver. In order to enable DSP mode for tas2563, it has been moved to tas2781 driver. As to the hardware part, such as register setting and DSP firmware, all these are stored in the binary firmware. What tas2781 drivder does is to parse the firmware and download it to the chip, then power on the chip. So, tas2781 driver can be resued as tas2563 driver. Only attention will be paid to downloading corresponding firmware. Signed-off-by: Shenghao Ding Link: https://msgid.link/r/20240104145721.1398-2-shenghao-ding@ti.com Signed-off-by: Mark Brown commit 3dbb4e3602d217d7139b95a36077a6b7252dc290 Author: Shenghao Ding Date: Thu Jan 4 22:57:16 2024 +0800 ASoC: dt-bindings: move tas2563 from tas2562.yaml to tas2781.yaml Move tas2563 from tas2562.yaml to tas2781.yaml to unbind tas2563 from tas2562 driver code and bind it to tas2781 driver code, because tas2563 only work in bypass-DSP mode with tas2562 driver. In order to enable DSP mode for tas2563, it has been moved to tas2781 driver. As to the hardware part, such as register setting and DSP firmware, all these are stored in the binary firmware. What tas2781 drivder does is to parse the firmware and download it to the chip, then power on the chip. So, tas2781 driver can be resued as tas2563 driver. Only attention will be paid to downloading corresponding firmware. Signed-off-by: Shenghao Ding Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20240104145721.1398-1-shenghao-ding@ti.com Signed-off-by: Mark Brown commit 8790fade1a19caf714ba1d91ce1fdceb9f2067f2 Merge: c17d8847c3bef f54e8634d1366 Author: Russell King (Oracle) Date: Fri Jan 5 13:14:42 2024 +0000 Merge branches 'misc' and 'fixes' into for-next commit c17d8847c3bef9e4fe4aef34edecc29cee3cd06f Author: Chen Haonan Date: Fri Dec 15 11:04:40 2023 +0100 ARM: 9331/1: ARM/dma-mapping: replace kzalloc() and vzalloc() with kvzalloc() using kvzalloc() simplifies the code by avoiding the use of different memory allocation functions for different situations, making the code more uniform and readable. Signed-off-by: Chen Haonan Signed-off-by: Russell King (Oracle) commit 933bb7b878ddd0f8c094db45551a7daddf806e00 Author: Javier Carrasco Date: Thu Jan 4 18:07:12 2024 +0100 usb: typec: tipd: fix use of device-specific init function The current implementation supports device-pecific callbacks for the init function with a function pointer. The patch that introduced this feature did not update one call to the tps25750 init function to turn it into a call with the new pointer in the resume function. Fixes: d49f90822015 ("usb: typec: tipd: add init and reset functions to tipd_data") Signed-off-by: Javier Carrasco Reviewed-by: Heikki Krogerus Suggested-by: Roger Quadros Link: https://lore.kernel.org/r/20240104-dev_spec_init-v1-1-1a57e7fd8cc8@gmail.com Signed-off-by: Greg Kroah-Hartman commit 17e8b76491b007698cf63bc10093bc8991e45001 Merge: f380846462b2d 1c53081d773c2 Author: Rafael J. Wysocki Date: Fri Jan 5 13:34:15 2024 +0100 Merge branch 'thermal-intel' Merge changes in thermal control drivers for Intel platforms for 6.8-rc1: - Make the Intel HFI thermal driver enable an HFI instance (eg. processor package) from its first online CPU and disable it when the last CPU in it goes offline (Ricardo Neri). * thermal-intel: thermal: intel: hfi: Disable an HFI instance when all its CPUs go offline thermal: intel: hfi: Enable an HFI instance from its first online CPU thermal: intel: hfi: Refactor enabling code into helper functions commit 1154e4304174e0ab4a90d5bae3fd5548aa343472 Author: Jai Luthra Date: Fri Jan 5 14:36:54 2024 +0530 usb: typec: tipd: Separate reset for TPS6598x Some platforms like SK-AM62, SK-AM62A cannot boot up to prompt if TPS6598x is cold-reset during unconditionally on probe failures by sending "GAID" sequence. The probe can fail initially because USB0 remote-endpoint may not be probed yet, which defines the usb-role-switch property. Fixes: d49f90822015 ("usb: typec: tipd: add init and reset functions to tipd_data") Closes: https://lore.kernel.org/linux-usb/vmngazj6si7xxss7txenezkcukqje2glhvvs7ipdcx3vjiqvlk@ohmmhhhlryws/ Signed-off-by: Jai Luthra Reviewed-by: Roger Quadros Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240105-next-tps-fix-v1-1-158cabaec168@ti.com Signed-off-by: Greg Kroah-Hartman commit 82e7b22f647202ecd8f25de2bd3f1276bbd34989 Merge: 94e2557d086ad 45f62ca5cc486 Author: David S. Miller Date: Fri Jan 5 11:56:37 2024 +0000 Merge branch 'user_mii_bus-cleanup-part-one' Vladimir Oltean says: ==================== ds->user_mii_bus cleanup (part 1) There are some drivers which assign ds->user_mii_bus when they don't really need its specific functionality, aka non-OF based dsa_user_phy_connect(). There was some confusion regarding the fact that yes, this is why ds->user_mii_bus really exists, so I've started a cleanup series which aims to eliminate the usage of ds->user_mii_bus from drivers when there is nothing to gain from it. Today's drivers are lantiq_gswip, qca8k and bcm_sf2. The work is not done here, but a "part 2" may or may not come, depending on other priorities. All patches were only compile-tested. ==================== Signed-off-by: David S. Miller commit 45f62ca5cc4861d084744e79642a4969848593eb Author: Vladimir Oltean Date: Thu Jan 4 16:00:37 2024 +0200 net: dsa: bcm_sf2: drop priv->master_mii_dn There used to be a of_node_put(priv->master_mii_dn) call in bcm_sf2_mdio_unregister(), which was accidentally deleted in commit 6ca80638b90c ("net: dsa: Use conduit and user terms"). But it's not needed - we don't need to hold a reference on the "brcm,unimac-mdio" OF node for that long, since we don't do anything with it. We can release it as soon as we finish bcm_sf2_mdio_register(). Also reduce "if (err && dn)" to just "if (err)". We know "dn", aka the former priv->master_mii_dn, is non-NULL. Otherwise, of_mdio_find_bus(dn) would not have been able to find the bus behind "brcm,unimac-mdio". Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Reviewed-by: Luiz Angelo Daros de Luca Signed-off-by: David S. Miller commit 04a4bc9dddc7bd316ba555338c04b885581be5ae Author: Vladimir Oltean Date: Thu Jan 4 16:00:36 2024 +0200 net: dsa: bcm_sf2: stop assigning an OF node to the ds->user_mii_bus The bcm_sf2 driver does something strange. Instead of calling of_mdiobus_register() with an OF node argument, it manually assigns the bus->dev->of_node and then calls the non-OF mdiobus_register(). This circumvents some code from __of_mdiobus_register() from running, which sets the auto-scan mask, parses some device tree properties, etc. I'm going to go out on a limb and say that the OF node isn't, in fact, needed at all, and can be removed. The MDIO diversion as initially implemented in commit 461cd1b03e32 ("net: dsa: bcm_sf2: Register our slave MDIO bus") looked quite different than it is now, after commit 771089c2a485 ("net: dsa: bcm_sf2: Ensure that MDIO diversion is used"). Initially, it made sense, as bcm_sf2 was registering another set of driver ops for the "brcm,unimac-mdio" OF node. But now, it deletes all phandles, which makes "phy-handle"s unable to find PHYs, which means that it always goes through the OF-unaware dsa_user_phy_connect(). Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Signed-off-by: David S. Miller commit c4a1cefdf3bceb69359bddb997bf593717465ea1 Author: Vladimir Oltean Date: Thu Jan 4 16:00:35 2024 +0200 net: dsa: qca8k: use "dev" consistently within qca8k_mdio_register() Accessed either through priv->dev or ds->dev, it is the same device structure. Keep a single variable which holds a reference to it, and use it consistently. Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Reviewed-by: Christian Marangi Reviewed-by: Luiz Angelo Daros de Luca Signed-off-by: David S. Miller commit 5c5d6b34b683c044a5d61dc0ace94e5c20f32bcf Author: Vladimir Oltean Date: Thu Jan 4 16:00:34 2024 +0200 net: dsa: qca8k: consolidate calls to a single devm_of_mdiobus_register() __of_mdiobus_register() already calls __mdiobus_register() if the OF node provided as argument is NULL. We can take advantage of that and simplify the 2 code path, calling devm_of_mdiobus_register() only once for both cases. Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Reviewed-by: Christian Marangi Reviewed-by: Luiz Angelo Daros de Luca Signed-off-by: David S. Miller commit 525366b81f3382ad1c76ba5e47b71e8b7925c85e Author: Vladimir Oltean Date: Thu Jan 4 16:00:33 2024 +0200 net: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case To simplify reasoning about why the DSA framework provides the ds->user_mii_bus functionality, drivers should only use it if they need to. The qca8k driver appears to also use it simply as storage for a pointer, which is not a good enough reason to make the core much more difficult to follow. ds->user_mii_bus is useful for only 2 cases: 1. The driver probes on platform_data (no OF) 2. The driver probes on OF, but there is no OF node for the MDIO bus. It is unclear if case (1) is supported with qca8k. It might not be: the driver might crash when of_device_get_match_data() returns NULL and then it dereferences priv->info without NULL checking. Anyway, let us limit the ds->user_mii_bus usage only to the above cases, and not assign it when an OF node is present. The bus->phy_mask assignment follows along with the movement, because __of_mdiobus_register() overwrites this bus field anyway. The value set by the driver only matters for the non-OF code path. Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Reviewed-by: Luiz Angelo Daros de Luca Signed-off-by: David S. Miller commit e66bf63a7f670a600338faf889bed71f90c183bf Author: Vladimir Oltean Date: Thu Jan 4 16:00:32 2024 +0200 net: dsa: qca8k: skip MDIO bus creation if its OF node has status = "disabled" Currently the driver calls the non-OF devm_mdiobus_register() rather than devm_of_mdiobus_register() for this case, but it seems to rather be a confusing coincidence, and not a real use case that needs to be supported. If the device tree says status = "disabled" for the MDIO bus, we shouldn't need an MDIO bus at all. Instead, just exit as early as possible and do not call any MDIO API. Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 68e1010cda7967cfca9c8650ee1f4efcae54ab90 Author: Vladimir Oltean Date: Thu Jan 4 16:00:31 2024 +0200 net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure of_get_child_by_name() gives us an OF node with an elevated refcount, which should be dropped when we're done with it. This is so that, if (of_node_check_flag(node, OF_DYNAMIC)) is true, the node's memory can eventually be freed. There are 2 distinct paths to be considered in qca8k_mdio_register(): - devm_of_mdiobus_register() succeeds: since commit 3b73a7b8ec38 ("net: mdio_bus: add refcounting for fwnodes to mdiobus"), the MDIO core treats this well. - devm_of_mdiobus_register() or anything up to that point fails: it is the duty of the qca8k driver to release the OF node. This change addresses the second case by making sure that the OF node reference is not leaked. The "mdio" node may be NULL, but of_node_put(NULL) is safe. Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 7a898539391dccce00c3cb24d96a6ba80cef7f6d Author: Vladimir Oltean Date: Thu Jan 4 16:00:30 2024 +0200 net: dsa: lantiq_gswip: ignore MDIO buses disabled in OF If the "lantiq,xrx200-mdio" child has status = "disabled", the MDIO bus creation should be avoided. Use of_device_is_available() to check for that, and take advantage of 2 facts: - of_device_is_available(NULL) returns false - of_node_put(NULL) is a no-op Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit cd4ba3ecced904cc8e48cde9ae3216889d139789 Author: Vladimir Oltean Date: Thu Jan 4 16:00:29 2024 +0200 net: dsa: lantiq_gswip: use devres for internal MDIO bus, not ds->user_mii_bus This driver does not need any of the functionalities that make ds->user_mii_bus special. Those use cases are listed here: https://lore.kernel.org/netdev/20231221174746.hylsmr3f7g5byrsi@skbuf/ It just makes use of ds->user_mii_bus only as storage for its own MDIO bus, which otherwise has no connection to the framework. This is because: - the gswip driver only probes on OF: it fails if of_device_get_match_data() returns NULL - when the child OF node of the MDIO bus is absent, no MDIO bus is registered at all, not even by the DSA framework. In order for that to have happened, the gswip driver would have needed to provide ->phy_read() and ->phy_write() in struct dsa_switch_ops, which it does not. We can break the connection between the gswip driver and the DSA framework and still preserve the same functionality. Since commit 3b73a7b8ec38 ("net: mdio_bus: add refcounting for fwnodes to mdiobus"), MDIO buses take ownership of the OF node handled to them, and release it on their own. The gswip driver no longer needs to do this. Combine that with devres, and we no longer need to keep track of anything for teardown purposes. Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Reviewed-by: Luiz Angelo Daros de Luca Signed-off-by: David S. Miller commit fc74b32b4032fc1aba8fc92f0e17e5ebe773bb68 Author: Vladimir Oltean Date: Thu Jan 4 16:00:28 2024 +0200 net: dsa: lantiq_gswip: delete irrelevant use of ds->phys_mii_mask __of_mdiobus_register(), called right next, overwrites the phy_mask we just configured on the bus, so this is redundant and confusing. Delete it. Signed-off-by: Vladimir Oltean Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 94e2557d086ad831027c54bc9c2130d337c72814 Author: Jiri Pirko Date: Thu Jan 4 13:58:44 2024 +0100 net: sched: move block device tracking into tcf_block_get/put_ext() Inserting the device to block xarray in qdisc_create() is not suitable place to do this. As it requires use of tcf_block() callback, it causes multiple issues. It is called for all qdisc types, which is incorrect. So, instead, move it to more suitable place, which is tcf_block_get_ext() and make sure it is only done for qdiscs that use block infrastructure and also only for blocks which are shared. Symmetrically, alter the cleanup path, move the xarray entry removal into tcf_block_put_ext(). Fixes: 913b47d3424e ("net/sched: Introduce tc block netdev tracking infra") Reported-by: Ido Schimmel Closes: https://lore.kernel.org/all/ZY1hBb8GFwycfgvd@shredder/ Reported-by: Kui-Feng Lee Closes: https://lore.kernel.org/all/ce8d3e55-b8bc-409c-ace9-5cf1c4f7c88e@gmail.com/ Reported-and-tested-by: syzbot+84339b9e7330daae4d66@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/0000000000007c85f5060dcc3a28@google.com/ Reported-and-tested-by: syzbot+806b0572c8d06b66b234@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/00000000000082f2f2060dcc3a92@google.com/ Reported-and-tested-by: syzbot+0039110f932d438130f9@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/0000000000007fbc8c060dcc3a5c@google.com/ Signed-off-by: Jiri Pirko Tested-by: Ido Schimmel Reviewed-by: Victor Nogueira Tested-by: Victor Nogueira Reviewed-by: Jamal Hadi Salim Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 358c3f8cce6d8294e7ba72199f04771e9bff4b64 Author: Masahiro Yamada Date: Sat Dec 30 21:02:52 2023 +0900 kbuild: deb-pkg: do not search for 'scripts' directory under arch/ The 'scripts' directory was searched under arch/${SRCARCH} to copy arch/ia64/scripts, but commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture") removed arch/ia64/ entirely. There is another 'scripts' directory in arch/um/, but this script is never executed with SRCARCH=um because UML does not support the linux-headers package. Signed-off-by: Masahiro Yamada commit 16c36f8864e354952eeeb8449034d63d372f621d Author: Masahiro Yamada Date: Tue Dec 26 23:33:59 2023 +0900 kbuild: deb-pkg: use build ID instead of debug link for dbg package There are two ways of managing separate debug info files: [1] The executable contains the .gnu_debuglink section, which specifies the name and the CRC of the separate debug info file. [2] The executable contains a build ID, and the corresponding debug info file is placed in the .build-id directory. We could do both, but the former, which 'make deb-pkg' currently does, results in complicated installation steps because we need to manually strip the debug sections, create debug links, and re-sign the modules. Besides, it is not working with module compression. This commit abandons the approach [1], and instead opts for [2]. Debian kernel commit de26137e2a9f ("Drop not needed extra step to add debug links") also stopped adding debug links. Signed-off-by: Masahiro Yamada commit 5e73758b43c3defba2578df6d3a53e942fa6b41e Author: Masahiro Yamada Date: Tue Dec 26 22:52:43 2023 +0900 kbuild: deb-pkg: use more debhelper commands in builddeb Commit 36862e14e316 ("kbuild: deb-pkg: use dh_listpackages to know enabled packages") started to require the debhelper tool suite. Use more dh_* commands in create_package(): - dh_installdocs to install copyright - dh_installchangelogs to install changelog - dh_compress to compress changelog - dh_fixperms to replace the raw chmod command - dh_gencontrol to replace the raw dpkg-gencontrol command - dh_md5sums to record the md5sum of included files - dh_builddeb to replace the raw dpkg-deb command Set DEB_RULES_REQUIRES_ROOT to 'no' in case debian/rules is executed directly. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 68e262f8017d7fa5a9ea1ef21cbaa0fd5334ecd5 Author: Masahiro Yamada Date: Tue Dec 26 22:52:42 2023 +0900 kbuild: deb-pkg: remove unneeded '-f $srctree/Makefile' in debian/rules This is unneeded because the Makefile in the output directory wraps the top-level Makefile in the srctree. Just run $(MAKE) irrespective of the build location. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit eaf80f7f2c9c5f08d76858ec32addfcfe64ce58e Author: Masahiro Yamada Date: Tue Dec 26 22:52:41 2023 +0900 kbuild: deb-pkg: allow to run debian/rules from output directory 'make O=... deb-pkg' creates the debian directory in the output directory. However, currently it is impossible to run debian/rules created in the separate output directory. This commit delays the $(srctree) expansion by escaping '$' and by quoting the entire command, making it possible to run debian/rules in the output directory. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 159956f34ede363e67a87bea840937e242293e91 Author: Masahiro Yamada Date: Tue Dec 26 22:52:40 2023 +0900 kbuild: deb-pkg: set DEB_* variables if debian/rules is directly executed Since commit 491b146d4c13 ("kbuild: builddeb: Eliminate debian/arch use"), direct execution of debian/rules results in the following error: dpkg-architecture: error: unknown option 'DEB_HOST_MULTIARCH' The current code: dpkg-architecture -a$DEB_HOST_ARCH -qDEB_HOST_MULTIARCH ... does not look sensible because: - For this code to work correctly, DEB_HOST_ARCH must be pre-defined, which is true when the packages are built via dpkg-buildpackage. In this case, DEB_HOST_MULTIARCH is also likely defined, hence there is no need to query DEB_HOST_MULTIARCH in the first place. - If DEB_HOST_MULTIARCH is undefined, DEB_HOST_ARCH is likely undefined too. So, you cannot query DEB_HOST_MULTIARCH in this way. This is mostly the case where debian/rules is directly executed. When debian/rules is directly executed, querying DEB_HOST_MUCHARCH is not enough because we need to know DEB_{BUILD,HOST}_GNU_TYPE as well. All DEB_* variables are defined when the package build is initiated by dpkg-buildpackage, but otherwise, let's call dpkg-architecture to set all DEB_* environment variables. This requires dpkg 1.20.6 or newer because --print-format option was added in dpkg commit 7c54fa2b232e ("dpkg-architecture: Add a --print-format option"). Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit dcfec12b67980cba139a6c3afba57ebd4936ebe8 Author: Viresh Kumar Date: Fri Jan 5 15:39:52 2024 +0530 OPP: Rename 'rate_clk_single' The field's name isn't clear enough. Rename it. Signed-off-by: Viresh Kumar commit 7269c250db1b89cda72ca419b7bd5e37997309d6 Author: Viresh Kumar Date: Fri Jan 5 13:55:37 2024 +0530 OPP: Pass rounded rate to _set_opp() The OPP core finds the eventual frequency to set with the help of clk_round_rate() and the same was earlier getting passed to _set_opp() and that's what would get configured. The commit 1efae8d2e777 ("OPP: Make dev_pm_opp_set_opp() independent of frequency") mistakenly changed that. Fix it. Fixes: 1efae8d2e777 ("OPP: Make dev_pm_opp_set_opp() independent of frequency") Cc: v5.18+ # v6.0+ Signed-off-by: Viresh Kumar commit 0b40dd3bcfc6f521e6ac0e297ecdcc391d5cc4bb Author: Viresh Kumar Date: Wed Jan 3 14:26:18 2024 +0530 OPP: Relocate dev_pm_opp_sync_regulators() Move this to a more relevant place in the file. No functional changes. Signed-off-by: Viresh Kumar commit 3f2f25b5aebffcc73a1afd3bad72c01b6849790a Merge: b2363297508a8 16615a2aa5370 Author: Arnd Bergmann Date: Fri Jan 5 11:15:29 2024 +0100 Merge tag 'socfpga_dts_updates_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into soc/dt SoCFPGA DTS updates for v6.8 - Fix dtbs_check warnings for nand, usb, FPGA firmware, and pin-controller - Clean up of DTS for Agilex5 * tag 'socfpga_dts_updates_for_v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: intel: minor whitespace cleanup around '=' arm64: dts: socfpga: agilex: drop redundant status arm64: dts: socfpga: agilex: add unit address to soc node arm64: dts: socfpga: agilex: move firmware out of soc node arm64: dts: socfpga: agilex: move FPGA region out of soc node arm64: dts: socfpga: agilex: align pin-controller name with bindings arm64: dts: socfpga: stratix10_swvp: drop unsupported DW MSHC properties arm64: dts: socfpga: stratix10_socdk: align NAND chip name with bindings arm64: dts: socfpga: stratix10: add unit address to soc node arm64: dts: socfpga: stratix10: move firmware out of soc node arm64: dts: socfpga: stratix10: move FPGA region out of soc node arm64: dts: socfpga: stratix10: align pincfg nodes with bindings arm64: dts: socfpga: stratix10: add clock-names to DWC2 USB arm64: dts: socfpga: drop unsupported cdns,page-size and cdns,block-size ARM: dts: socfpga: align NAND controller name with bindings ARM: dts: socfpga: drop unsupported cdns,page-size and cdns,block-size Link: https://lore.kernel.org/r/20240104001354.152410-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 5d40213347480e3ab903d5438dbd0d6b0110e6b8 Author: Elad Nachman Date: Thu Jan 4 19:30:33 2024 +0200 mmc: xenon: Add ac5 support via bounce buffer AC5/X/IM SOCs has a variant of the Xenon eMMC controller, in which only 31-bit of addressing pass from the controller on the AXI bus. Since we cannot guarantee that only buffers from the first 2GB of memory will reach the driver, the driver is configured for SDMA mode, without 64-bit mode, overriding the DMA mask to 34-bit to support the DDR memory mapping, which starts at offset 8GB. Signed-off-by: Elad Nachman Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20240104173033.2836110-1-enachman@marvell.com Signed-off-by: Ulf Hansson commit d5862720c018db3046855cd43a497e346309a5d5 Author: Elad Nachman Date: Wed Jan 3 19:28:02 2024 +0200 dt-bindings: mmc: add Marvell ac5 Add dt bindings for Marvell AC5/X/IM eMMC controller. This compatibility string covers the differences in the AC5/X version of the driver: 31-bit bus limitation and DDR memory starting at address 0x2_0000_0000, which are handled by usage of a bounce buffer plus a different DMA mask. Signed-off-by: Elad Nachman Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20240103172803.1826113-2-enachman@marvell.com Signed-off-by: Ulf Hansson commit fe86da368a1b751adec1776369cb15cd0aae0f10 Author: Kamal Dasu Date: Wed Jan 3 17:23:38 2024 -0500 mmc: sdhci-brcmstb: add new sdhci reset sequence for brcm 74165b0 74165b0 shall use a new sdio controller core version which requires a different reset sequence. For core reset we use sdhci_reset. For CMD and/or DATA reset added a new function to also enable SDHCI clocks SDHCI_CLOCK_CARD_EN SDHCI_CLOCK_INT_EN along with the SDHCI_RESET_CMD and/or SDHCI_RESET_DATA fields. Signed-off-by: Kamal Dasu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20240103222338.31447-3-kamal.dasu@broadcom.com Signed-off-by: Ulf Hansson commit 0a8d397cfc9001a5a0d9f52aa2af97f0df4a51f2 Author: Kamal Dasu Date: Wed Jan 3 17:23:37 2024 -0500 dt-bindings: mmc: brcm,sdhci-brcmstb: Add support for 74165b0 With newer sdio controller core used for 74165b0 we need to update the compatibility with "brcm,bcm74165b0-sdhci". Signed-off-by: Kamal Dasu Acked-by: Krzysztof Kozlowski Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20240103222338.31447-2-kamal.dasu@broadcom.com Signed-off-by: Ulf Hansson commit 2dd23cc4d0e6aa55cf9fb3b05f2f4165b01de81c Author: Gui-Dong Han <2045gemini@gmail.com> Date: Fri Jan 5 13:24:12 2024 +0800 usb: mon: Fix atomicity violation in mon_bin_vma_fault In mon_bin_vma_fault(): offset = vmf->pgoff << PAGE_SHIFT; if (offset >= rp->b_size) return VM_FAULT_SIGBUS; chunk_idx = offset / CHUNK_SIZE; pageptr = rp->b_vec[chunk_idx].pg; The code is executed without holding any lock. In mon_bin_vma_close(): spin_lock_irqsave(&rp->b_lock, flags); rp->mmap_active--; spin_unlock_irqrestore(&rp->b_lock, flags); In mon_bin_ioctl(): spin_lock_irqsave(&rp->b_lock, flags); if (rp->mmap_active) { ... } else { ... kfree(rp->b_vec); rp->b_vec = vec; rp->b_size = size; ... } spin_unlock_irqrestore(&rp->b_lock, flags); Concurrent execution of mon_bin_vma_fault() with mon_bin_vma_close() and mon_bin_ioctl() could lead to atomicity violations. mon_bin_vma_fault() accesses rp->b_size and rp->b_vec without locking, risking array out-of-bounds access or use-after-free bugs due to possible modifications in mon_bin_ioctl(). This possible bug is found by an experimental static analysis tool developed by our team, BassCheck[1]. This tool analyzes the locking APIs to extract function pairs that can be concurrently executed, and then analyzes the instructions in the paired functions to identify possible concurrency bugs including data races and atomicity violations. The above possible bug is reported when our tool analyzes the source code of Linux 6.2. To address this issue, it is proposed to add a spin lock pair in mon_bin_vma_fault() to ensure atomicity. With this patch applied, our tool never reports the possible bug, with the kernel configuration allyesconfig for x86_64. Due to the lack of associated hardware, we cannot test the patch in runtime testing, and just verify it according to the code logic. [1] https://sites.google.com/view/basscheck/ Fixes: 19e6317d24c2 ("usb: mon: Fix a deadlock in usbmon between ...") Cc: Signed-off-by: Gui-Dong Han <2045gemini@gmail.com> Link: https://lore.kernel.org/r/20240105052412.9377-1-2045gemini@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9866dc4314c6c858e451933f965d64532aec00a9 Author: Avichal Rakesh Date: Thu Jan 4 13:50:09 2024 -0800 usb: gadget: uvc: Remove nested locking When handling error status from uvcg_video_usb_req_queue, uvc_video_complete currently calls uvcg_queue_cancel with video->req_lock held. uvcg_queue_cancel internally locks queue->irqlock, which nests queue->irqlock inside video->req_lock. This isn't a functional bug at the moment, but does open up possibilities for ABBA deadlocks in the future. This patch fixes the accidental nesting by dropping video->req_lock before calling uvcg_queue_cancel. Fixes: 6acba0345b68 ("usb:gadget:uvc Do not use worker thread to pump isoc usb requests") Signed-off-by: Avichal Rakesh Link: https://lore.kernel.org/r/20240104215009.2252452-2-arakesh@google.com Signed-off-by: Greg Kroah-Hartman commit fe814b5b0f3042f1a583734497e726ee53783cc1 Author: Avichal Rakesh Date: Thu Jan 4 13:50:08 2024 -0800 usb: gadget: uvc: Fix use are free during STREAMOFF There is a path that may lead to freed memory being referenced, causing kernel panics. The kernel panic has the following stack trace: Workqueue: uvcgadget uvcg_video_pump.c51fb85fece46625450f86adbf92c56c.cfi_jt pstate: 60c00085 (nZCv daIf +PAN +UAO -TCO BTYPE=--) pc : __list_del_entry_valid+0xc0/0xd4 lr : __list_del_entry_valid+0xc0/0xd4 Call trace: __list_del_entry_valid+0xc0/0xd4 uvc_video_free_request+0x60/0x98 uvcg_video_pump+0x1cc/0x204 process_one_work+0x21c/0x4b8 worker_thread+0x29c/0x574 kthread+0x158/0x1b0 ret_from_fork+0x10/0x30 The root cause is that uvcg_video_usb_req_queue frees the uvc_request if is_enabled is false and returns an error status. video_pump also frees the associated request if uvcg_video_usb_req_queue returns an error status, leading to double free and accessing garbage memory. To fix the issue, this patch removes freeing logic from uvcg_video_usb_req_queue, and lets the callers to the function handle queueing errors as they see fit. Fixes: 6acba0345b68 ("usb:gadget:uvc Do not use worker thread to pump isoc usb requests") Tested-by: Avichal Rakesh Signed-off-by: Avichal Rakesh Link: https://lore.kernel.org/r/20240104215009.2252452-1-arakesh@google.com Signed-off-by: Greg Kroah-Hartman commit d73f444d06fb8a42a5c0623453f3ea1fe9880229 Author: Randy Dunlap Date: Fri Dec 22 21:06:20 2023 -0800 pwm: linux/pwm.h: fix Excess kernel-doc description warning Remove the @pwm: line to prevent the kernel-doc warning: include/linux/pwm.h:87: warning: Excess struct member 'pwm' description in 'pwm_device' Signed-off-by: Randy Dunlap Cc: Thierry Reding Cc: Uwe Kleine-König Cc: Fixes: f3e25e68ceb2 ("pwm: Drop unused member "pwm" from struct pwm_device") Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c2e64baac4f36f7e0365218c7523bb9ba4639250 Author: Thierry Reding Date: Thu Dec 21 11:08:02 2023 +0100 pwm: Add pwm_apply_state() compatibility stub In order to make the transition to the new pwm_apply_might_sleep() a bit smoother, add a compatibility stub. This will prevent new calls to the old function introduced via other subsystems from breaking builds. Once the next merge window has closed we can take another stab at removing the stub. Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit ada3fb86a3f3aea40903d5ad9aeec708dc049b8b Author: Zhihao Cheng Date: Wed Dec 13 09:32:24 2023 +0800 ext4: move ext4_check_bdev_write_error() into nojournal mode Since JBD2 takes care of all metadata writeback errors of fs dev, ext4_check_bdev_write_error() is useful only in nojournal mode. Move it into '!ext4_handle_valid(handle)' branch. Signed-off-by: Zhihao Cheng Suggested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231213013224.2100050-6-chengzhihao1@huawei.com Signed-off-by: Theodore Ts'o commit b4e73e61268903d82dacff2bc6f4bb766c6ed555 Author: Zhihao Cheng Date: Wed Dec 13 09:32:23 2023 +0800 jbd2: abort journal when detecting metadata writeback error of fs dev This is a replacement solution of commit bc71726c725767 ("ext4: abort the filesystem if failed to async write metadata buffer"), JBD2 can detect metadata writeback error of fs dev by 'j_fs_dev_wb_err'. Signed-off-by: Zhihao Cheng Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231213013224.2100050-5-chengzhihao1@huawei.com Signed-off-by: Theodore Ts'o commit 8a4fd33d879fb303b207f06ea6340d73f698c4ed Author: Zhihao Cheng Date: Wed Dec 13 09:32:22 2023 +0800 jbd2: remove unused 'JBD2_CHECKPOINT_IO_ERROR' and 'j_atomic_flags' Since 'JBD2_CHECKPOINT_IO_ERROR' and j_atomic_flags' are not useful anymore after fs dev's errseq is imported into jbd2, just remove them. Signed-off-by: Zhihao Cheng Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231213013224.2100050-4-chengzhihao1@huawei.com Signed-off-by: Theodore Ts'o commit 62ec1707cb071c95706d1bab85fbee8d5a3d2f24 Author: Zhihao Cheng Date: Wed Dec 13 09:32:21 2023 +0800 jbd2: replace journal state flag by checking errseq Now JBD2 detects metadata writeback error of fs dev according to errseq. Replace journal state flag by checking errseq. Signed-off-by: Zhihao Cheng Suggested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231213013224.2100050-3-chengzhihao1@huawei.com Signed-off-by: Theodore Ts'o commit 990b6b5b13b7993b7f44740c0add3119d407ccbf Author: Zhihao Cheng Date: Wed Dec 13 09:32:20 2023 +0800 jbd2: add errseq to detect client fs's bdev writeback error Add errseq in journal, so that JBD2 can detect whether metadata is successfully written to fs bdev. This patch adds detection in recovery process to replace original solution(using local variable wb_err). Signed-off-by: Zhihao Cheng Suggested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231213013224.2100050-2-chengzhihao1@huawei.com Signed-off-by: Theodore Ts'o commit 5fe4ee6ae187523f710f1b93024437a073d88b17 Merge: 00bc898880798 e02feb3f1f475 Author: Alexei Starovoitov Date: Thu Jan 4 20:31:34 2024 -0800 Merge branch 'relax-tracing-prog-recursive-attach-rules' Dmitrii Dolgov says: ==================== Relax tracing prog recursive attach rules Currently, it's not allowed to attach an fentry/fexit prog to another fentry/fexit. At the same time it's not uncommon to see a tracing program with lots of logic in use, and the attachment limitation prevents usage of fentry/fexit for performance analysis (e.g. with "bpftool prog profile" command) in this case. An example could be falcosecurity libs project that uses tp_btf tracing programs for offloading certain part of logic into tail-called programs, but the use-case is still generic enough -- a tracing program could be complicated and heavy enough to warrant its profiling, yet frustratingly it's not possible to do so use best tooling for that. Following the corresponding discussion [1], the reason for that is to avoid tracing progs call cycles without introducing more complex solutions. But currently it seems impossible to load and attach tracing programs in a way that will form such a cycle. Replace "no same type" requirement with verification that no more than one level of attachment nesting is allowed. In this way only one fentry/fexit program could be attached to another fentry/fexit to cover profiling use case, and still no cycle could be formed. The series contains a test for recursive attachment, as well as a fix + test for an issue in re-attachment branch of bpf_tracing_prog_attach. When preparing the test for the main change set, I've stumbled upon the possibility to construct a sequence of events when attach_btf would be NULL while computing a trampoline key. It doesn't look like this issue is triggered by the main change, because the reproduces doesn't actually need to have an fentry attachment chain. [1]: https://lore.kernel.org/bpf/20191108064039.2041889-16-ast@kernel.org/ ==================== Link: https://lore.kernel.org/r/20240103190559.14750-1-9erthalion6@gmail.com Signed-off-by: Alexei Starovoitov commit e02feb3f1f47509ec1e07b604bfbeff8c3b4e639 Author: Dmitrii Dolgov <9erthalion6@gmail.com> Date: Wed Jan 3 20:05:47 2024 +0100 selftests/bpf: Test re-attachment fix for bpf_tracing_prog_attach Add a test case to verify the fix for "prog->aux->dst_trampoline and tgt_prog is NULL" branch in bpf_tracing_prog_attach. The sequence of events: 1. load rawtp program 2. load fentry program with rawtp as target_fd 3. create tracing link for fentry program with target_fd = 0 4. repeat 3 Acked-by: Jiri Olsa Acked-by: Song Liu Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com> Link: https://lore.kernel.org/r/20240103190559.14750-5-9erthalion6@gmail.com Signed-off-by: Alexei Starovoitov commit 715d82ba636cb3629a6e18a33bb9dbe53f9936ee Author: Jiri Olsa Date: Wed Jan 3 20:05:46 2024 +0100 bpf: Fix re-attachment branch in bpf_tracing_prog_attach The following case can cause a crash due to missing attach_btf: 1) load rawtp program 2) load fentry program with rawtp as target_fd 3) create tracing link for fentry program with target_fd = 0 4) repeat 3 In the end we have: - prog->aux->dst_trampoline == NULL - tgt_prog == NULL (because we did not provide target_fd to link_create) - prog->aux->attach_btf == NULL (the program was loaded with attach_prog_fd=X) - the program was loaded for tgt_prog but we have no way to find out which one BUG: kernel NULL pointer dereference, address: 0000000000000058 Call Trace: ? __die+0x20/0x70 ? page_fault_oops+0x15b/0x430 ? fixup_exception+0x22/0x330 ? exc_page_fault+0x6f/0x170 ? asm_exc_page_fault+0x22/0x30 ? bpf_tracing_prog_attach+0x279/0x560 ? btf_obj_id+0x5/0x10 bpf_tracing_prog_attach+0x439/0x560 __sys_bpf+0x1cf4/0x2de0 __x64_sys_bpf+0x1c/0x30 do_syscall_64+0x41/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 Return -EINVAL in this situation. Fixes: f3a95075549e0 ("bpf: Allow trampoline re-attach for tracing and lsm programs") Cc: stable@vger.kernel.org Signed-off-by: Jiri Olsa Acked-by: Jiri Olsa Acked-by: Song Liu Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com> Link: https://lore.kernel.org/r/20240103190559.14750-4-9erthalion6@gmail.com Signed-off-by: Alexei Starovoitov commit 5c5371e069e1ffc204dda8b20c609b170b823165 Author: Dmitrii Dolgov <9erthalion6@gmail.com> Date: Wed Jan 3 20:05:45 2024 +0100 selftests/bpf: Add test for recursive attachment of tracing progs Verify the fact that only one fentry prog could be attached to another fentry, building up an attachment chain of limited size. Use existing bpf_testmod as a start of the chain. Acked-by: Jiri Olsa Acked-by: Song Liu Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com> Link: https://lore.kernel.org/r/20240103190559.14750-3-9erthalion6@gmail.com Signed-off-by: Alexei Starovoitov commit 2bf5eb2a7c22fc3dd011fda2722fd369b1c4608b Author: Gou Hao Date: Mon Nov 13 16:26:17 2023 +0800 ext4: improving calculation of 'fe_{len|start}' in mb_find_extent() After first execution of mb_find_order_for_block(): 'fe_start' is the value of 'block' passed in mb_find_extent(). 'fe_len' is the difference between the length of order-chunk and remainder of the block divided by order-chunk. And 'next' does not require initialization after above modifications. Signed-off-by: Gou Hao Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231113082617.11258-1-gouhao@uniontech.com Signed-off-by: Theodore Ts'o commit 19bfcdf9498aa968ea293417fbbc39e523527ca8 Author: Dmitrii Dolgov <9erthalion6@gmail.com> Date: Wed Jan 3 20:05:44 2024 +0100 bpf: Relax tracing prog recursive attach rules Currently, it's not allowed to attach an fentry/fexit prog to another one fentry/fexit. At the same time it's not uncommon to see a tracing program with lots of logic in use, and the attachment limitation prevents usage of fentry/fexit for performance analysis (e.g. with "bpftool prog profile" command) in this case. An example could be falcosecurity libs project that uses tp_btf tracing programs. Following the corresponding discussion [1], the reason for that is to avoid tracing progs call cycles without introducing more complex solutions. But currently it seems impossible to load and attach tracing programs in a way that will form such a cycle. The limitation is coming from the fact that attach_prog_fd is specified at the prog load (thus making it impossible to attach to a program loaded after it in this way), as well as tracing progs not implementing link_detach. Replace "no same type" requirement with verification that no more than one level of attachment nesting is allowed. In this way only one fentry/fexit program could be attached to another fentry/fexit to cover profiling use case, and still no cycle could be formed. To implement, add a new field into bpf_prog_aux to track nested attachment for tracing programs. [1]: https://lore.kernel.org/bpf/20191108064039.2041889-16-ast@kernel.org/ Acked-by: Jiri Olsa Acked-by: Song Liu Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com> Link: https://lore.kernel.org/r/20240103190559.14750-2-9erthalion6@gmail.com Signed-off-by: Alexei Starovoitov commit c6bfd724098457a1162a7b9fef07af176720055b Author: Ojaswin Mujoo Date: Wed Nov 1 22:08:11 2023 +0530 ext4: clarify handling of unwritten bh in __ext4_block_zero_page_range() As an optimization, I was trying to work on exiting early from this function if dealing with unwritten extent since they anyways read 0. However, it was realised that there are certain code paths that can end up calling ext4_block_zero_page_range() for an unwritten bh that might still have data in pagecache. In this case, we can't exit early and we do require to process the bh and zero out the pagecache to ensure that a writeback can't kick in at a later time and flush the stale pagecache to disk. Since, adding the logic to exit early for unwritten bh was turning out to be much more nuanced and the current code already handles it well, just add a comment to explicitly document this behavior. Suggested-by: Jan Kara Signed-off-by: Ojaswin Mujoo Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/d859b7ae5fe42e6626479b91ed9f4da3aae4c597.1698856309.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit 92573369144f40397e8514440afdf59f24905b40 Author: Ojaswin Mujoo Date: Wed Nov 1 22:08:10 2023 +0530 ext4: treat end of range as exclusive in ext4_zero_range() The call to filemap_write_and_wait_range() assumes the range passed to be inclusive, so fix the call to make sure we follow that. Signed-off-by: Ojaswin Mujoo Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/e503107a7c73a2b68dec645c5ad798c437717c45.1698856309.git.ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit e89fdcc425b6feea4dfb33877e9256757905d763 Author: Ojaswin Mujoo Date: Wed Nov 1 21:17:17 2023 +0530 ext4: enable dioread_nolock as default for bs < ps case dioread_nolock was originally disabled as a default option for bs < ps scenarios due to a data corruption issue. Since then, we've had some fixes in this area which address such issues. Enable dioread_nolock by default and remove the experimental warning message for bs < ps path. dioread for bs < ps has been tested on a 64k pagesize machine using: kvm-xfstest -C 3 -g auto with the following configs: 64k adv bigalloc_4k bigalloc_64k data_journal encrypt dioread_nolock dioread_nolock_4k ext3 ext3conv nojournal And no new regressions were seen compared to baseline kernel. Suggested-by: Ritesh Harjani (IBM) Signed-off-by: Ojaswin Mujoo Reviewed-by: Ritesh Harjani (IBM) Link: https://lore.kernel.org/r/20231101154717.531865-1-ojaswin@linux.ibm.com Signed-off-by: Theodore Ts'o commit f2fec3e99a32d7c14dbf63c824f8286ebc94b18d Author: Gou Hao Date: Tue Oct 24 11:52:15 2023 +0800 ext4: delete redundant calculations in ext4_mb_get_buddy_page_lock() 'blocks_per_page' is always 1 after 'if (blocks_per_page >= 2)', 'pnum' and 'block' are equal in this case. Signed-off-by: Gou Hao Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231024035215.29474-1-gouhao@uniontech.com Signed-off-by: Theodore Ts'o commit 00bc8988807985e32f5103f1ac099baf593bd8a3 Author: Leon Hwang Date: Thu Jan 4 22:22:23 2024 +0800 bpf, x86: Use emit_nops to replace memcpy x86_nops Move emit_nops() before emit_prologue() and replace memcpy(prog, x86_nops[5], X86_PATCH_SIZE) with emit_nops(&prog, X86_PATCH_SIZE). Signed-off-by: Leon Hwang Link: https://lore.kernel.org/r/20240104142226.87869-2-hffilwlqm@gmail.com Signed-off-by: Alexei Starovoitov commit e63c1822ac32a865dd02a18107fc933fd7b30f6f Merge: a180b0b1a6c48 1f874787ed9a2 Author: Jakub Kicinski Date: Thu Jan 4 18:04:58 2024 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/ethernet/broadcom/bnxt/bnxt.c e009b2efb7a8 ("bnxt_en: Remove mis-applied code from bnxt_cfg_ntp_filters()") 0f2b21477988 ("bnxt_en: Fix compile error without CONFIG_RFS_ACCEL") https://lore.kernel.org/all/20240105115509.225aa8a2@canb.auug.org.au/ Signed-off-by: Jakub Kicinski commit a180b0b1a6c484a091f2f20f9c6b9e5e726cbd31 Merge: a2634a5ffcafc 3aca362a4c141 Author: Jakub Kicinski Date: Thu Jan 4 17:00:07 2024 -0800 Merge tag 'wireless-next-2024-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== Just a couple of more things over the holidays: - first kunit tests for both cfg80211 and mac80211 - a few multi-link fixes - DSCP mapping update - RCU fix * tag 'wireless-next-2024-01-03' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: wifi: mac80211: remove redundant ML element check wifi: cfg80211: parse all ML elements in an ML probe response wifi: cfg80211: correct comment about MLD ID wifi: cfg80211: Update the default DSCP-to-UP mapping wifi: cfg80211: tests: add some scanning related tests wifi: mac80211: kunit: extend MFP tests wifi: mac80211: kunit: generalize public action test wifi: mac80211: add kunit tests for public action handling kunit: add a convenience allocation wrapper for SKBs kunit: add parameter generation macro using description from array wifi: mac80211: fix spelling typo in comment wifi: cfg80211: fix RCU dereference in __cfg80211_bss_update ==================== Link: https://lore.kernel.org/r/20240103144423.52269-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski commit a2634a5ffcafc31c343c6153ae487eb184c433a6 Author: Heiner Kallweit Date: Wed Jan 3 16:52:04 2024 +0100 r8169: fix building with CONFIG_LEDS_CLASS=m When r8169 is built-in but LED support is a loadable module, the new code to drive the LED causes a link failure: ld: drivers/net/ethernet/realtek/r8169_leds.o: in function `rtl8168_init_leds': r8169_leds.c:(.text+0x36c): undefined reference to `devm_led_classdev_register_ext' LED support is an optional feature, so fix this issue by adding a Kconfig symbol R8169_LEDS that is guaranteed to be false if r8169 is built-in and LED core support is a module. As a positive side effect of this change r8169_leds.o no longer is built under this configuration. Fixes: 18764b883e15 ("r8169: add support for LED's on RTL8168/RTL8101") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312281159.9TPeXbNd-lkp@intel.com/ Suggested-by: Arnd Bergmann Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Tested-by: Simon Horman # build-tested Tested-by: Arnd Bergmann Link: https://lore.kernel.org/r/d055aeb5-fe5c-4ccf-987f-5af93a17537b@gmail.com Signed-off-by: Jakub Kicinski commit 14d0681b3ae2cb5c3f2fe4ca2d0b9c517f225e48 Author: Vladimir Oltean Date: Wed Jan 3 13:34:45 2024 +0200 net: enetc: allow phy-mode = "1000base-x" The driver code proper is handled by the lynx_pcs. The enetc just needs to populate phylink's supported_interfaces array, and return true for this phy-mode in enetc_port_has_pcs(), such that it creates an internal MDIO bus through which the Lynx PCS registers are accessed. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20240103113445.3892971-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 3c064aea46d071ccf95a142be5532768a7fa6f02 Merge: cff601b45723f eee706839333e Author: Dave Airlie Date: Fri Jan 5 10:31:29 2024 +1000 Merge tag 'drm-misc-next-fixes-2024-01-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-next One fix for drm/plane to avoid a use-after-free and some additional warnings to prevent more of these occurences, a lock inversion dependency fix and an indentation fix for drm/rockchip, and some doc warning fixes for imagination and gpuvm. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/enhl33v2oeihktta2yfyc4exvezdvm3eexcuwxkethc5ommrjo@lkidkv2kwakq commit fe1eb24bd5ade085914248c527044e942f75e06a Author: Jakub Kicinski Date: Thu Jan 4 16:04:35 2024 -0800 Revert "Introduce PHY listing and link_topology tracking" This reverts commit 32bb4515e34469975abc936deb0a116c4a445817. This reverts commit d078d480639a4f3b5fc2d56247afa38e0956483a. This reverts commit fcc4b105caa4b844bf043375bf799c20a9c99db1. This reverts commit 345237dbc1bdbb274c9fb9ec38976261ff4a40b8. This reverts commit 7db69ec9cfb8b4ab50420262631fb2d1908b25bf. This reverts commit 95132a018f00f5dad38bdcfd4180d1af955d46f6. This reverts commit 63d5eaf35ac36cad00cfb3809d794ef0078c822b. This reverts commit c29451aefcb42359905d18678de38e52eccb3bb5. This reverts commit 2ab0edb505faa9ac90dee1732571390f074e8113. This reverts commit dedd702a35793ab462fce4c737eeba0badf9718e. This reverts commit 034fcc210349b873ece7356905be5c6ca11eef2a. This reverts commit 9c5625f559ad6fe9f6f733c11475bf470e637d34. This reverts commit 02018c544ef113e980a2349eba89003d6f399d22. Looks like we need more time for reviews, and incremental changes will be hard to make sense of. So revert. Link: https://lore.kernel.org/all/ZZP6FV5sXEf+xd58@shell.armlinux.org.uk/ Signed-off-by: Jakub Kicinski commit 32a84cfc6caf830431375c5182391284986d4066 Author: Michał Winiarski Date: Fri Oct 20 11:21:58 2023 +0200 arch: um: Add Clang coverage support Clang uses a different set of command line arguments for enabling coverage. Signed-off-by: Michał Winiarski Tested-by: David Gow Signed-off-by: Richard Weinberger commit abe4eaa8618bb36c2b33e9cdde0499296a23448c Author: Johannes Berg Date: Wed Oct 25 22:45:05 2023 +0200 um: time-travel: fix time corruption In 'basic' time-travel mode (without =inf-cpu or =ext), we still get timer interrupts. These can happen at arbitrary points in time, i.e. while in timer_read(), which pushes time forward just a little bit. Then, if we happen to get the interrupt after calculating the new time to push to, but before actually finishing that, the interrupt will set the time to a value that's incompatible with the forward, and we'll crash because time goes backwards when we do the forwarding. Fix this by reading the time_travel_time, calculating the adjustment, and doing the adjustment all with interrupts disabled. Reported-by: Vincent Whitchurch Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 7d748f60a4b82b50bf25fad1bd42d33f049f76aa Author: Nathan Chancellor Date: Wed Dec 6 09:49:46 2023 -0700 um: net: Fix return type of uml_net_start_xmit() With clang's kernel control flow integrity (kCFI, CONFIG_CFI_CLANG), indirect call targets are validated against the expected function pointer prototype to make sure the call target is valid to help mitigate ROP attacks. If they are not identical, there is a failure at run time, which manifests as either a kernel panic or thread getting killed. A warning in clang aims to catch these at compile time, which reveals: arch/um/drivers/net_kern.c:353:21: warning: incompatible function pointer types initializing 'netdev_tx_t (*)(struct sk_buff *, struct net_device *)' (aka 'enum netdev_tx (*)(struct sk_buff *, struct net_device *)') with an expression of type 'int (struct sk_buff *, struct net_device *)' [-Wincompatible-function-pointer-types-strict] 353 | .ndo_start_xmit = uml_net_start_xmit, | ^~~~~~~~~~~~~~~~~~ 1 warning generated. ->ndo_start_xmit() in 'struct net_device_ops' expects a return type of 'netdev_tx_t', not 'int'. Adjust the return type of uml_net_start_xmit() to match the prototype's to resolve the warning. While UML does not currently implement support for kCFI, it could in the future, which means this warning becomes a fatal CFI failure at run time. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310031340.v1vPh207-lkp@intel.com/ Acked-by: Anton Ivanov Signed-off-by: Nathan Chancellor Signed-off-by: Richard Weinberger commit e3d7581cb13b3f2a415e5cd92769b7f4b7d14ed0 Author: liyouhong Date: Tue Dec 26 17:57:01 2023 +0800 drivers/block/xen-blkback/common.h: Fix spelling typo in comment Fix spelling typo in comment. Reported-by: k2ci Signed-off-by: liyouhong Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20231226095701.172080-1-liyouhong@kylinos.cn Signed-off-by: Jens Axboe commit 393cd8ffd832f23eec3a105553eff622e8198918 Author: Ming Lei Date: Tue Dec 19 09:28:33 2023 +0800 blk-cgroup: fix rcu lockdep warning in blkg_lookup() blkg_lookup() is called with either queue_lock or rcu read lock, so use rcu_dereference_check(lockdep_is_held(&q->queue_lock)) for retrieving 'blkg', which way models the check exactly for covering queue lock or rcu read lock. Fix lockdep warning of "block/blk-cgroup.h:254 suspicious rcu_dereference_check() usage!" from blkg_lookup(). Tested-by: Changhui Zhong Signed-off-by: Ming Lei Reviewed-by: Yu Kuai Fixes: 83462a6c971c ("blkcg: Drop unnecessary RCU read [un]locks from blkg_conf_prep/finish()") Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20231219012833.2129540-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit fab4c16c527e24c804efa4992b3cf40438c9b227 Author: Daniel Vacek Date: Thu Jan 4 19:00:30 2024 +0100 blk-cgroup: don't use removal safe list iterators Commit f1c006f1c685 moved deletion of the list blkg->q_node from blkg_destroy() to blkg_free_workfn(). Switch to using the list iterators, as we don't need removal protection anymore. Signed-off-by: Daniel Vacek Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20240104180031.148148-1-neelx@redhat.com Signed-off-by: Jens Axboe commit 458aa1a09939a56e044768013c86b5ef06e1c4f1 Author: Christoph Hellwig Date: Wed Jan 3 08:16:22 2024 +0000 block: floor the discard granularity to the physical block size Discarding less than a physical block doesn't make sense. This fixes the existing behavior for zram before the recent changes to default the discard granularity to the logical block size, and is also a generally useful sanity check. Fixes: 3753039def5d ("zram: use the default discard granularity") Reported-by: Sergey Senozhatsky Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20240103081622.508754-1-hch@lst.de Signed-off-by: Jens Axboe commit 62ff262227a45bf917fe198885ab7aa19be5a01f Author: Samuel Holland Date: Tue Nov 21 15:47:26 2023 -0800 riscv: Use the same CPU operations for all CPUs RISC-V provides no binding (ACPI or DT) to describe per-cpu start/stop operations, so cpu_set_ops() will always detect the same operations for every CPU. Replace the cpu_ops array with a single pointer to save space and reduce boot time. Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231121234736.3489608-4-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 79093f3ec39c90edf4bd1a532d922ee6163441ec Author: Samuel Holland Date: Tue Nov 21 15:47:25 2023 -0800 riscv: Remove unused members from struct cpu_operations name is not used anywhere at all. cpu_prepare and cpu_disable do nothing and always return 0 if implemented. Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231121234736.3489608-3-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit a4166aec11309d24e650e74cf8191a6d25a97fcf Author: Samuel Holland Date: Tue Nov 21 15:47:24 2023 -0800 riscv: Deduplicate code in setup_smp() Both the ACPI and DT implementations contain some of the same code. Move it to the calling function so it is not duplicated. Signed-off-by: Samuel Holland Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231121234736.3489608-2-samuel.holland@sifive.com Signed-off-by: Palmer Dabbelt commit 7b84543cbd8861c83a2ec7c8848e936ce214bc01 Author: Benjamin Berg Date: Fri Nov 10 12:03:45 2023 +0100 um: Always inline stub functions The stub executable page is remapped to a different location in the userland process. As these functions may be used by the stub, they really need to be always inlined rather than permitting the compiler to emit a function. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 6d64095ea8698e3cb1698ec4e81acb2aa1500322 Author: Benjamin Berg Date: Fri Nov 10 12:03:44 2023 +0100 um: Do not use printk in userspace trampoline The trampoline is running in a cloned process. It is not safe to use printk for error printing there. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 139e6e8ef6ee9a56fc1737240ecd8402fbcadd82 Author: Benjamin Berg Date: Fri Nov 10 12:03:43 2023 +0100 um: Reap winch thread if it fails When the winch thread runs into an error condition, it would exit(1) and never be reaped until shutdown time. Change this to write a command byte which causes the driver to kill it, therefore reaping the child. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 1818b8406678a78b823dad44c91580f859403ced Author: Benjamin Berg Date: Fri Nov 10 12:03:42 2023 +0100 um: Do not use printk in SIGWINCH helper thread The thread is running outside of the UML kernel scope and is a helper. As such, printk cannot work and os_info must be used instead. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 236f9fe39b02c15fa5530b53e9cca48354394389 Author: Benjamin Berg Date: Fri Nov 10 12:03:41 2023 +0100 um: Don't use vfprintf() for os_info() The threads allocated inside the kernel have only a single page of stack. Unfortunately, the vfprintf function in standard glibc may use too much stack-space, overflowing it. To make os_info safe to be used by helper threads, use the kernel vscnprintf function into a smallish buffer and write out the information to stderr. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 61a40c12496a763fdb95edc08d59f816a594a87a Merge: 98e20e5e13d28 63fac34669e4c Author: Alexei Starovoitov Date: Thu Jan 4 11:35:40 2024 -0800 Merge branch 's390-bpf-fix-gotol-with-large-offsets' Ilya Leoshkevich says: ==================== s390/bpf: Fix gotol with large offsets Hi, While looking at a pyperf180 failure on s390x (must be related to [1], I'm not done with the investigation yet) I noticed that I have unfortunately messed up the gotol implementation. Patch 1 is the fix, patch 2 is a small test infrastructure tweak, and patch 3 adds a test. [1] https://github.com/llvm/llvm-project/issues/55669 Best regards, Ilya ==================== Link: https://lore.kernel.org/r/20240102193531.3169422-1-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 63fac34669e4cc666f943173ed2aa76b8db999f0 Author: Ilya Leoshkevich Date: Tue Jan 2 20:30:37 2024 +0100 selftests/bpf: Test gotol with large offsets Test gotol with offsets that don't fit into a short (i.e., larger than 32k or smaller than -32k). Signed-off-by: Ilya Leoshkevich Acked-by: Yonghong Song Acked-by: John Fastabend Link: https://lore.kernel.org/r/20240102193531.3169422-4-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 445aea5afda4759c13dc5c492b309cc1d5c1c486 Author: Ilya Leoshkevich Date: Tue Jan 2 20:30:36 2024 +0100 selftests/bpf: Double the size of test_loader log Testing long jumps requires having >32k instructions. That many instructions require the verifier log buffer of 2 megabytes. The regular test_progs run doesn't need an increased buffer, since gotol test with 40k instructions doesn't request a log, but test_progs -v will set the verifier log level. Hence to avoid breaking gotol test with -v increase the buffer size. Signed-off-by: Ilya Leoshkevich Acked-by: Yonghong Song Acked-by: John Fastabend Link: https://lore.kernel.org/r/20240102193531.3169422-3-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 9e16fb933fd1f2132c0d137f3666ebf20f93e33a Author: Benjamin Berg Date: Fri Nov 10 12:03:40 2023 +0100 um: Make errors to stop ptraced child fatal during startup For the detection code to check whether SYSEMU_SINGLESTEP works correctly we needed some error cases while stopping to be non-fatal. However, at this point stop_ptraced_child must always succeed, and we can therefore simplify it slightly to exit immediately on error. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit 571353379470f1d0aaad3cce4ad4db4b6c8f9ada Author: Benjamin Berg Date: Fri Nov 10 12:03:39 2023 +0100 um: Drop NULL check from start_userspace start_userspace is only called from exactly one location, and the passed pointer for the userspace process stack cannot be NULL. Remove the check, without changing the control flow. Signed-off-by: Benjamin Berg Signed-off-by: Richard Weinberger commit a55719847da0a780baa84d0baee745358f144c39 Author: Benjamin Berg Date: Fri Nov 10 12:03:38 2023 +0100 um: Drop support for hosts without SYSEMU_SINGLESTEP support These features have existed since Linux 2.6.14 and can be considered widely available at this point. Also drop the backward compatibility code for PTRACE_SETOPTIONS. Signed-off-by: Benjamin Berg ---- v2: * Continue to define PTRACE_SYSEMU_SINGLESTEP as glibc only added it in version 2.27. Signed-off-by: Richard Weinberger commit 172b3fccf574eb760a2d88f19971c7e26d1441f0 Merge: 6c8e2407100e4 2373699560a75 Author: Jakub Kicinski Date: Thu Jan 4 14:20:14 2024 -0800 Merge tag 'ieee802154-for-net-next-2023-12-20' of gitolite.kernel.org:pub/scm/linux/kernel/git/wpan/wpan-next Miquel Raynal says: ==================== This pull request mainly brings support for dynamic associations in the WPAN world. Thanks to the recent improvements it was possible to discover nearby devices, it is now also possible to associate with them to form a sub-network using a specific PAN ID. The support includes several functions, such as: * Requesting an association to a coordinator, waiting for the response * Sending a disassociation notification to a coordinator * Receiving an association request when we are coordinator, answering the request (for now all devices are accepted up to a limit, to be refined) * Sending a disassociation notification to a child * Users may request the list of associated devices (the parent and the children). Here are a few example of userspace calls that can be made: # iwpan dev associate pan_id 2 coord $COORD # iwpan dev list_associations # iwpan dev disassociate ext_addr $COORD There are as well two patches from Uwe turning remove callbacks into void functions. * tag 'ieee802154-for-net-next-2023-12-20' of gitolite.kernel.org:pub/scm/linux/kernel/git/wpan/wpan-next: mac802154: Avoid new associations while disassociating ieee802154: Avoid confusing changes after associating mac802154: Only allow PAN controllers to process association requests mac802154: Use the PAN coordinator parameter when stamping packets mac80254: Provide real PAN coordinator info in beacons ieee802154: Give the user the association list mac802154: Handle disassociation notifications from peers mac802154: Follow the number of associated devices ieee802154: Add support for limiting the number of associated devices mac802154: Handle association requests from peers mac802154: Handle disassociations ieee802154: Add support for user disassociation requests mac802154: Handle associating ieee802154: Add support for user association requests ieee802154: Internal PAN management ieee802154: Let PAN IDs be reset ieee802154: hwsim: Convert to platform remove callback returning void ieee802154: fakelb: Convert to platform remove callback returning void ==================== Link: https://lore.kernel.org/r/20231220095556.4d9cef91@xps-13 Signed-off-by: Jakub Kicinski commit 1de94b52d5e8d8b32f0252f14fad1f1edc2e71f1 Author: Steven Rostedt (Google) Date: Thu Jan 4 16:57:15 2024 -0500 eventfs: Shortcut eventfs_iterate() by skipping entries already read As the ei->entries array is fixed for the duration of the eventfs_inode, it can be used to skip over already read entries in eventfs_iterate(). That is, if ctx->pos is greater than zero, there's no reason in doing the loop across the ei->entries array for the entries less than ctx->pos. Instead, start the lookup of the entries at the current ctx->pos. Link: https://lore.kernel.org/all/CAHk-=wiKwDUDv3+jCsv-uacDcHDVTYsXtBR9=6sGM5mqX+DhOg@mail.gmail.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240104220048.494956957@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Suggested-by: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit 704f960dbee2f1634f4b4e16f208cb16eaf41c1e Author: Steven Rostedt (Google) Date: Thu Jan 4 16:57:14 2024 -0500 eventfs: Read ei->entries before ei->children in eventfs_iterate() In order to apply a shortcut to skip over the current ctx->pos immediately, by using the ei->entries array, the reading of that array should be first. Moving the array reading before the linked list reading will make the shortcut change diff nicer to read. Link: https://lore.kernel.org/all/CAHk-=wiKwDUDv3+jCsv-uacDcHDVTYsXtBR9=6sGM5mqX+DhOg@mail.gmail.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240104220048.333115095@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Linus Torvalds Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Signed-off-by: Steven Rostedt (Google) commit 1e4624eb5a0ecaae0d2c4e3019bece119725bb98 Author: Steven Rostedt (Google) Date: Thu Jan 4 16:57:13 2024 -0500 eventfs: Do ctx->pos update for all iterations in eventfs_iterate() The ctx->pos was only updated when it added an entry, but the "skip to current pos" check (c--) happened for every loop regardless of if the entry was added or not. This inconsistency caused readdir to be incorrect. It was due to: for (i = 0; i < ei->nr_entries; i++) { if (c > 0) { c--; continue; } mutex_lock(&eventfs_mutex); /* If ei->is_freed then just bail here, nothing more to do */ if (ei->is_freed) { mutex_unlock(&eventfs_mutex); goto out; } r = entry->callback(name, &mode, &cdata, &fops); mutex_unlock(&eventfs_mutex); [..] ctx->pos++; } But this can cause the iterator to return a file that was already read. That's because of the way the callback() works. Some events may not have all files, and the callback can return 0 to tell eventfs to skip the file for this directory. for instance, we have: # ls /sys/kernel/tracing/events/ftrace/function format hist hist_debug id inject and # ls /sys/kernel/tracing/events/sched/sched_switch/ enable filter format hist hist_debug id inject trigger Where the function directory is missing "enable", "filter" and "trigger". That's because the callback() for events has: static int event_callback(const char *name, umode_t *mode, void **data, const struct file_operations **fops) { struct trace_event_file *file = *data; struct trace_event_call *call = file->event_call; [..] /* * Only event directories that can be enabled should have * triggers or filters, with the exception of the "print" * event that can have a "trigger" file. */ if (!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) { if (call->class->reg && strcmp(name, "enable") == 0) { *mode = TRACE_MODE_WRITE; *fops = &ftrace_enable_fops; return 1; } if (strcmp(name, "filter") == 0) { *mode = TRACE_MODE_WRITE; *fops = &ftrace_event_filter_fops; return 1; } } if (!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) || strcmp(trace_event_name(call), "print") == 0) { if (strcmp(name, "trigger") == 0) { *mode = TRACE_MODE_WRITE; *fops = &event_trigger_fops; return 1; } } [..] return 0; } Where the function event has the TRACE_EVENT_FL_IGNORE_ENABLE set. This means that the entries array elements for "enable", "filter" and "trigger" when called on the function event will have the callback return 0 and not 1, to tell eventfs to skip these files for it. Because the "skip to current ctx->pos" check happened for all entries, but the ctx->pos++ only happened to entries that exist, it would confuse the reading of a directory. Which would cause: # ls /sys/kernel/tracing/events/ftrace/function/ format hist hist hist_debug hist_debug id inject inject The missing "enable", "filter" and "trigger" caused ls to show "hist", "hist_debug" and "inject" twice. Update the ctx->pos for every iteration to keep its update and the "skip" update consistent. This also means that on error, the ctx->pos needs to be decremented if it was incremented without adding something. Link: https://lore.kernel.org/all/20240104150500.38b15a62@gandalf.local.home/ Link: https://lore.kernel.org/linux-trace-kernel/20240104220048.172295263@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Linus Torvalds Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Fixes: 493ec81a8fb8e ("eventfs: Stop using dcache_readdir() for getdents()") Signed-off-by: Steven Rostedt (Google) commit e109deadb73318cf4a3bd61287d969f705df278f Author: Steven Rostedt (Google) Date: Thu Jan 4 16:57:12 2024 -0500 eventfs: Have eventfs_iterate() stop immediately if ei->is_freed is set If ei->is_freed is set in eventfs_iterate(), it means that the directory that is being iterated on is in the process of being freed. Just exit the loop immediately when that is ever detected, and separate out the return of the entry->callback() from ei->is_freed. Link: https://lore.kernel.org/linux-trace-kernel/20240104220048.016261289@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Linus Torvalds Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Signed-off-by: Steven Rostedt (Google) commit 57331a59ac0d680f606403eb24edd3c35aecba31 Author: Benjamin Coddington Date: Thu Jan 4 09:58:46 2024 -0500 NFSv4.1: Use the nfs_client's rpc timeouts for backchannel For backchannel requests that lookup the appropriate nfs_client, use the state-management rpc_clnt's rpc_timeout parameters for the backchannel's response. When the nfs_client cannot be found, fall back to using the xprt's default timeout parameters. Signed-off-by: Benjamin Coddington Tested-by: Chuck Lever Tested-by: Jeff Layton Signed-off-by: Anna Schumaker commit e6f533b615971afcaa1141573a1a1714d9d4f31a Author: Benjamin Coddington Date: Thu Jan 4 09:58:45 2024 -0500 SUNRPC: Fixup v4.1 backchannel request timeouts After commit 59464b262ff5 ("SUNRPC: SOFTCONN tasks should time out when on the sending list"), any 4.1 backchannel tasks placed on the sending queue would immediately return with -ETIMEDOUT since their req timers are zero. Initialize the backchannel's rpc_rqst timeout parameters from the xprt's default timeout settings. Fixes: 59464b262ff5 ("SUNRPC: SOFTCONN tasks should time out when on the sending list") Signed-off-by: Benjamin Coddington Tested-by: Chuck Lever Tested-by: Jeff Layton Signed-off-by: Anna Schumaker commit 5459e186a5c9f412334321cff58d70dcb0e48a04 Author: Dan Williams Date: Thu Dec 21 21:05:01 2023 -0800 cxl/port: Fix missing target list lock cxl_port_setup_targets() modifies the ->targets[] array of a switch decoder. target_list_show() expects to be able to emit a coherent snapshot of that array by "holding" ->target_lock for read. The target_lock is held for write during initialization of the ->targets[] array, but it is not held for write during cxl_port_setup_targets(). The ->target_lock() predates the introduction of @cxl_region_rwsem. That semaphore protects changes to host-physical-address (HPA) decode which is precisely what writes to a switch decoder's target list affects. Replace ->target_lock with @cxl_region_rwsem. Now the side-effect of snapshotting a unstable view of a decoder's target list is likely benign so the Fixes: tag is presumptive. Fixes: 27b3f8d13830 ("cxl/region: Program target lists") Reviewed-by: Alison Schofield Reviewed-by: Dave Jiang Signed-off-by: Dan Williams commit d6488fee66472b468ed88d265b14aa3f04dc3bdf Author: Huang Ying Date: Fri Dec 8 11:06:36 2023 +0800 cxl/port: Fix decoder initialization when nr_targets > interleave_ways The decoder_populate_targets() helper walks all of the targets in a port and makes sure they can be looked up in @target_map. Where @target_map is a lookup table from target position to target id (corresponding to a cxl_dport instance). However @target_map is only responsible for conveying the active dport instances as indicated by interleave_ways. When nr_targets > interleave_ways it results in decoder_populate_targets() walking off the end of the valid entries in @target_map. Given target_map is initialized to 0 it results in the dport lookup failing if position 0 is not mapped to a dport with an id of 0: cxl_port port3: Failed to populate active decoder targets cxl_port port3: Failed to add decoder cxl_port port3: Failed to add decoder3.0 cxl_bus_probe: cxl_port port3: probe: -6 This bug also highlights that when the decoder's ->targets[] array is written in cxl_port_setup_targets() it is missing a hold of the targets_lock to synchronize against sysfs readers of the target list. A fix for that is saved for a later patch. Fixes: a5c258021689 ("cxl/bus: Populate the target list at decoder create") Cc: Signed-off-by: Huang, Ying [djbw: rewrite the changelog, find the Fixes: tag] Co-developed-by: Dan Williams Reviewed-by: Alison Schofield Reviewed-by: Dave Jiang Signed-off-by: Dan Williams commit bbf5a1d0e5d0fb3bdf90205aa872636122692a50 Author: Mickaël Salaün Date: Wed Jan 3 17:34:15 2024 +0100 selinux: Fix error priority for bind with AF_UNSPEC on PF_INET6 socket The IPv6 network stack first checks the sockaddr length (-EINVAL error) before checking the family (-EAFNOSUPPORT error). This was discovered thanks to commit a549d055a22e ("selftests/landlock: Add network tests"). Cc: Eric Paris Cc: Konstantin Meskhidze Cc: Paul Moore Cc: Stephen Smalley Reported-by: Muhammad Usama Anjum Closes: https://lore.kernel.org/r/0584f91c-537c-4188-9e4f-04f192565667@collabora.com Fixes: 0f8db8cc73df ("selinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind()") Signed-off-by: Mickaël Salaün Tested-by: Muhammad Usama Anjum Signed-off-by: Paul Moore commit b6d8b858dbbbd832d255c3c8a3721173e6edf036 Author: Thomas Richter Date: Tue Dec 19 15:32:35 2023 +0100 perf test: test case 'Setup struct perf_event_attr' fails on s390 on z/vm perf test 17 'Setup struct perf_event_attr' fails on s390 z/VM guest, using linux-next kernel. Root cause is the fall-back from hardware counter cycles perf_event_attr: type 0 (PERF_TYPE_HARDWARE) size 136 config 0 (PERF_COUNT_HW_CPU_CYCLES) { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|ADDR|PERIOD|DATA_SRC read_format ID|LOST which returns -ENOENT on s390 z/VM guest. This causes the code to fall back to software counter task-clock, as can be seen in the debug output: ------------------------------------------------------------ perf_event_attr: type 1 (PERF_TYPE_SOFTWARE) size 136 config 0x1 (PERF_COUNT_SW_TASK_CLOCK) <-here { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|ADDR|PERIOD|DATA_SRC read_format ID|LOST This succeeds on s390 z/VM guest. This successful installation of the counter task-clock is not listed in the expected results and the test case fails. This is caused by commit eb2eac0c7b618033 ("perf evsel: Fallback to "task-clock" when not system wide") which introduced fall back from event 'cycles' to event 'task-clock'. To fix this on s390 allow event number 0 (cycles) and event number 1 (task-clock) as expected result. Output before: # ./perf test -Fv 17 17: Setup struct perf_event_attr : --- start --- running './tests/attr/test-stat-group1' unsupp './tests/attr/test-stat-group1' running './tests/attr/test-record-graph-default' test limitation '!aarch64' excluded architecture list ['aarch64'] expected config=0, got 1 FAILED './tests/attr/test-record-graph-default' - match failure ---- end ---- Setup struct perf_event_attr: FAILED! # Output after: # ./perf test -F 17 17: Setup struct perf_event_attr : Ok # Fixes: eb2eac0c7b618033 ("perf evsel: Fallback to "task-clock" when not system wide") Signed-off-by: Thomas Richter Acked-by: Ian Rogers Cc: Alexander Gordeev Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20231219143235.1075522-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 1e24ce402c97dc3c0ab050593f1d5f6fde524564 Author: Ben Gainey Date: Thu Dec 7 14:09:11 2023 +0000 perf db-export: Fix missing reference count get in call_path_from_sample() The addr_location map and maps fields in the inner loop were missing calls to map__get()/maps__get(). The subsequent addr_location__exit() call in each loop puts the map/maps fields causing use-after-free aborts. This issue reproduces on at least arm64 and x86_64 with something simple like `perf record -g ls` followed by `perf script -s script.py` with the following script: perf_db_export_mode = True perf_db_export_calls = False perf_db_export_callchains = True def sample_table(*args): print(f'sample_table({args})') def call_path_table(*args): print(f'call_path_table({args}') Committer testing: This test, just introduced by Ian Rogers, now passes, not segfaulting anymore: # perf test "perf script tests" 95: perf script tests : Ok # Fixes: 0dd5041c9a0eaf8c ("perf addr_location: Add init/exit/copy functions") Signed-off-by: Ben Gainey Tested-by: Arnaldo Carvalho de Melo Tested-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231207140911.3240408-1-ben.gainey@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit bb177a85e82b37d3b76e65f3f773e8502be49d9b Author: Ian Rogers Date: Thu Dec 7 09:40:57 2023 -0800 perf tests: Add perf script test Start a new set of shell tests for testing perf script. The initial contribution is checking that some perf db-export functionality works as reported in this regression by Ben Gainey : https://lore.kernel.org/lkml/20231207140911.3240408-1-ben.gainey@arm.com/ Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Tested-by: Ben Gainey Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231207174057.1482161-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ad30469a841b50dbb541df4d6971d891f703c297 Author: Ian Rogers Date: Thu Dec 7 16:05:13 2023 -0800 libsubcmd: Fix memory leak in uniq() uniq() will write one command name over another causing the overwritten string to be leaked. Fix by doing a pass that removes duplicates and a second that removes the holes. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Chenyuan Mi Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231208000515.1693746-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6af6d22495efeb00cb4e220a4e6e30b5be3afdf3 Author: Ahelenia Ziemiańska Date: Tue Dec 27 21:57:40 2022 +0100 perf TUI: Don't ignore job control In its infinite wisdom, by default, SLang sets susp undef, and this can only be un-done by calling SLtty_set_suspend_state(true). After every SLang_init_tty(). Additionally, no provisions are made for maintaining the teletype attributes across suspend/continue (outside of curses emulation mode(?!), which provides full support, naturally), so we need to save and restore the flags ourselves, as well as reset the text colours when going under. We need to also re-draw the screen, and raising SIGWINCH, shockingly, Just Works. The correct solution would be to Not Use SLang, but as a stop-gap, this makes TUI 'perf report' usable. Signed-off-by: Ahelenia Ziemiańska Tested-by: Arnaldo Carvalho de Melo Tested-by: Namhyung Kim Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: yaowenbin Link: https://lore.kernel.org/r/0354dcae23a8713f75f4fed609e0caec3c6e3cd5.1672174189.git.nabijaczleweli@nabijaczleweli.xyz Signed-off-by: Arnaldo Carvalho de Melo commit 6c8e2407100e4ff1db86e4af65b74be7895031a2 Author: Stephen Rothwell Date: Thu Dec 21 13:09:46 2023 +1100 net: phy: aquantia: switch to crc_itu_t() After merging the net-next tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/net/phy/aquantia/aquantia_firmware.c: In function 'aqr_fw_load_memory': drivers/net/phy/aquantia/aquantia_firmware.c:135:23: error: implicit declaration of function 'crc_ccitt_false'; did you mean 'crc_ccitt_byte'? [-Werror=implicit-function-declaration] 135 | crc = crc_ccitt_false(crc, crc_data, sizeof(crc_data)); | ^~~~~~~~~~~~~~~ | crc_ccitt_byte Caused by commit e93984ebc1c8 ("net: phy: aquantia: add firmware load support") interacting with commit ("lib: crc_ccitt_false() is identical to crc_itu_t()") from the mm tree. Signed-off-by: Stephen Rothwell Link: https://lore.kernel.org/r/20231221130946.7ed9a805@canb.auug.org.au Signed-off-by: Jakub Kicinski commit a8e75902f4d7d342350ea3f79e3e65f2bbfa4c8d Author: Anton Ivanov Date: Tue Oct 17 09:32:01 2023 +0100 um: document arch_futex_atomic_op_inuser arch_futex_atomic_op_inuser was not documented correctly resulting in build time warnings. Signed-off-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 63c7234f50e8e760fb6b0abdc2bfb6ce83d56cc9 Author: Jakub Kicinski Date: Thu Jan 4 13:00:44 2024 -0800 Revert "octeon_ep_vf: add octeon_ep_vf driver" This reverts commit c902ba322cfda8ebe54ffd53392ef7e2ef5d1c65. This reverts commit 50648968b3e3c193b45eaca07840111c9d4fdb74. This reverts commit 77cef1e02104529f54c5b8b4126317eda3ff132d. This reverts commit 8f8d322bc47c1c5ecab1f2238b644e30f69cc475. This reverts commit 6ca7b5486ebd5e7985f0c98a2ac7ae49078043a4. This reverts commit db468f92c3b9437dfeb1dcf55d9b7d1b97769a6c. This reverts commit 5f8c64c2344c888a03fa4b7fd8c3b5e0c235d879. This reverts commit ebdc193b2ce209bfc1ebec2f777cd7bac00b547c. The driver needs more work. Signed-off-by: Jakub Kicinski commit 360b045fceb282fb21b66131c396b0f85759ddb7 Author: Ian Rogers Date: Wed Jan 3 23:42:59 2024 -0800 perf vendor events intel: Update sapphirerapids events to v1.17 Update to v1.17 released in: https://github.com/intel/perfmon/pull/123 Add events FP_ARITH_DISPATCHED.V0, FP_ARITH_DISPATCHED.V1, FP_ARITH_DISPATCHED.V2, UNC_IIO_IOMMU0.1G_HITS, UNC_IIO_IOMMU0.2M_HITS and UNC_IIO_IOMMU0.4K_HITS. Description updates. Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20240104074259.653219-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8550506887a93cd6ff4f6b44a08e8c2cc7a4d481 Author: Ian Rogers Date: Wed Jan 3 23:42:58 2024 -0800 perf vendor events intel: Update icelakex events to v1.23 Update to v1.23 released in: https://github.com/intel/perfmon/pull/123 Updates to event descriptions. Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20240104074259.653219-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 576d7fed09c7edbae7600f29a8a3ed6c1ead904f Author: Ian Rogers Date: Wed Jan 3 23:42:57 2024 -0800 perf vendor events intel: Update emeraldrapids events to v1.02 Update to v1.02 released in: https://github.com/intel/perfmon/pull/123 Removes events AMX_OPS_RETIRED.BF16 and AMX_OPS_RETIRED.INT8. Add events FP_ARITH_DISPATCHED.V0, FP_ARITH_DISPATCHED.V1, FP_ARITH_DISPATCHED.V2, UNC_IIO_IOMMU0.1G_HITS, UNC_IIO_IOMMU0.2M_HITS and UNC_IIO_IOMMU0.4K_HITS. Description updates. Signed-off-by: Ian Rogers Reviewed-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20240104074259.653219-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 982b6acec662ff06e9e89c61838f297f6544a84d Author: Ian Rogers Date: Wed Jan 3 23:42:56 2024 -0800 perf vendor events intel: Alderlake/rocketlake metric fixes Fix that the core PMU is being specified for 2 uncore events. Specify a PMU for the alderlake UNCORE_FREQ metric. Conversion script updated in: https://github.com/intel/perfmon/pull/126 Committer testing: Before this patch the "perf all metricgroups test" was failing, now: root@number:~# perf test metric 10: PMU events : 10.3: Parsing of PMU event table metrics : Ok 10.4: Parsing of PMU event table metrics with fake PMUs : Ok 10.5: Parsing of metric thresholds with fake PMUs : Ok 61: Parse and process metrics : Ok 98: perf stat metrics (shadow stat) test : Skip 101: perf all metricgroups test : Ok 102: perf all metrics test : FAILED! 107: perf metrics value validation : Ok root@number:~# Test 102 is failing for another reason, not being able to get as many counters as needed, Ian Rogers suggested disabling the NMI watchdog to have more counters available: root@number:/home/acme# cat /proc/sys/kernel/nmi_watchdog 1 root@number:/home/acme# echo 0 > /proc/sys/kernel/nmi_watchdog root@number:/home/acme# perf test 102 102: perf all metrics test : Ok root@number:/home/acme# Closes: https://lore.kernel.org/lkml/ZZWOdHXJJ_oecWwm@kernel.org/ Reported-by: Arnaldo Carvalho de Melo Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Edward Baker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20240104074259.653219-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 085bc003baab8223b87649ee56aa0db05c33b5b8 Author: Johannes Berg Date: Mon Sep 25 21:29:48 2023 +0200 um: mmu: remove stub_pages I removed all the users of this some time ago, but evidently forgot the pointers. Remove them from the data structure too. Fixes: bfc58e2b98e9 ("um: remove process stub VMA") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 2f1888281e67205bd80d3e8f54dbd519a9653f26 Author: Sergey Gorenko Date: Tue Dec 19 09:23:11 2023 +0200 IB/iser: Prevent invalidating wrong MR The iser_reg_resources structure has two pointers to MR but only one mr_valid field. The implementation assumes that we use only *sig_mr when pi_enable is true. Otherwise, we use only *mr. However, it is only sometimes correct. Read commands without protection information occur even when pi_enble is true. For example, the following SCSI commands have a Data-In buffer but never have protection information: READ CAPACITY (16), INQUIRY, MODE SENSE(6), MAINTENANCE IN. So, we use *sig_mr for some SCSI commands and *mr for the other SCSI commands. In most cases, it works fine because the remote invalidation is applied. However, there are two cases when the remote invalidation is not applicable. 1. Small write commands when all data is sent as an immediate. 2. The target does not support the remote invalidation feature. The lazy invalidation is used if the remote invalidation is impossible. Since, at the lazy invalidation, we always invalidate the MR we want to use, the wrong MR may be invalidated. To fix the issue, we need a field per MR that indicates the MR needs invalidation. Since the ib_mr structure already has such a field, let's use ib_mr.need_inval instead of iser_reg_resources.mr_valid. Fixes: b76a439982f8 ("IB/iser: Use IB_WR_REG_MR_INTEGRITY for PI handover") Link: https://lore.kernel.org/r/20231219072311.40989-1-sergeygo@nvidia.com Acked-by: Max Gurtovoy Signed-off-by: Sergey Gorenko Signed-off-by: Jason Gunthorpe commit 541d4e4d435c8b9bfd29f70a1da4a2db97794e0a Author: Anton Ivanov Date: Thu Sep 21 15:34:44 2023 +0100 um: Fix naming clash between UML and scheduler __cant_sleep was already used and exported by the scheduler. The name had to be changed to a UML specific one. Signed-off-by: Anton Ivanov Reviewed-by: Peter Lafreniere Signed-off-by: Richard Weinberger commit 32253f00ac8a8073bf6db4bfe9d6511cc93c4aef Author: Vincent Whitchurch Date: Fri Sep 1 15:35:43 2023 +0200 um: virt-pci: fix platform map offset The offset is currently always zero so the backend can't distinguish between accesses to different ioremapped areas. Fixes: 522c532c4fe7 ("virt-pci: add platform bus support") Signed-off-by: Vincent Whitchurch Signed-off-by: Richard Weinberger commit 0c64117d112b35dc3ba2020108ec26f538b95ae6 Author: Dmitry Torokhov Date: Wed Dec 20 19:09:45 2023 -0800 Input: da9063_onkey - avoid explicitly setting input's parent devm_input_allocate_device() already sets parent of the new input device, there's no need to set it up explicitly. Reviewed-by: Biju Das Link: https://lore.kernel.org/r/ZYOseYfVgg0Ve6Zl@google.com Signed-off-by: Dmitry Torokhov commit 1cadc04c1a1ac5015c2eb0fadfabf4b61bbe167e Author: Naresh Solanki Date: Thu Jan 4 19:43:13 2024 +0530 regulator: event: Ensure atomicity for sequence number Previously, the sequence number in the regulator event subsystem was updated without atomic operations, potentially leading to race conditions. This commit addresses the issue by making the sequence number atomic. Signed-off-by: Naresh Solanki Link: https://msgid.link/r/20240104141314.3337037-1-naresh.solanki@9elements.com Signed-off-by: Mark Brown commit ec4fcc6b6a63585af8897b49d9aae92af994505d Author: Dmitry Torokhov Date: Wed Dec 20 19:09:05 2023 -0800 Input: da9063_onkey - avoid using OF-specific APIs There is nothing OF-specific in the driver, so switch from OF properties helpers to generic device helpers. Reviewed-by: Biju Das Link: https://lore.kernel.org/r/ZYOsUfKceOFXuCt5@google.com Signed-off-by: Dmitry Torokhov commit ecba66cb36e3428e9f0c2362b45e213ad43ba8d0 Author: Ilya Leoshkevich Date: Tue Jan 2 20:30:35 2024 +0100 s390/bpf: Fix gotol with large offsets The gotol implementation uses a wrong data type for the offset: it should be s32, not s16. Fixes: c690191e23d8 ("s390/bpf: Implement unconditional jump with 32-bit offset") Signed-off-by: Ilya Leoshkevich Acked-by: Yonghong Song Acked-by: John Fastabend Link: https://lore.kernel.org/r/20240102193531.3169422-2-iii@linux.ibm.com Signed-off-by: Alexei Starovoitov commit 040113fa32f27096f531c377001936e0d7964597 Author: Will Deacon Date: Thu Jan 4 16:42:20 2024 +0000 KVM: arm64: Add missing memory barriers when switching to pKVM's hyp pgd In commit f320bc742bc23 ("KVM: arm64: Prepare the creation of s1 mappings at EL2"), pKVM switches from a temporary host-provided page-table to its own page-table at EL2. Since there is only a single TTBR for the nVHE hypervisor, this involves disabling and re-enabling the MMU in __pkvm_init_switch_pgd(). Unfortunately, the memory barriers here are not quite correct. Specifically: - A DSB is required to complete the TLB invalidation executed while the MMU is disabled. - An ISB is required to make the new TTBR value visible to the page-table walker before the MMU is enabled in the SCTLR. An earlier version of the patch actually got this correct: https://lore.kernel.org/lkml/20210304184717.GB21795@willie-the-truck/ but thanks to some badly worded review comments from yours truly, these were dropped for the version that was eventually merged. Bring back the barriers and fix the potential issue (but note that this was found by code inspection). Cc: Quentin Perret Fixes: f320bc742bc23 ("KVM: arm64: Prepare the creation of s1 mappings at EL2") Signed-off-by: Will Deacon Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240104164220.7968-1-will@kernel.org commit f4af13bd93b36e46615305b9a9fabf02b83c94c2 Merge: d016264d0765e ad362fe07fecf Author: Marc Zyngier Date: Thu Jan 4 19:28:15 2024 +0000 Merge branch kvm-arm64/vgic-6.8 into kvmarm-master/next * kvm-arm64/vgic-6.8: : . : Fix for the GICv4.1 vSGI pending state being set/cleared from : userspace, and some cleanup to the MMIO and userspace accessors : for the pending state. : : Also a fix for a potential UAF in the ITS translation cache. : . KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache KVM: arm64: vgic-v3: Reinterpret user ISPENDR writes as I{C,S}PENDR KVM: arm64: vgic: Use common accessor for writes to ICPENDR KVM: arm64: vgic: Use common accessor for writes to ISPENDR KVM: arm64: vgic-v4: Restore pending state on host userspace write Signed-off-by: Marc Zyngier commit ad362fe07fecf0aba839ff2cc59a3617bd42c33f Author: Oliver Upton Date: Thu Jan 4 18:32:32 2024 +0000 KVM: arm64: vgic-its: Avoid potential UAF in LPI translation cache There is a potential UAF scenario in the case of an LPI translation cache hit racing with an operation that invalidates the cache, such as a DISCARD ITS command. The root of the problem is that vgic_its_check_cache() does not elevate the refcount on the vgic_irq before dropping the lock that serializes refcount changes. Have vgic_its_check_cache() raise the refcount on the returned vgic_irq and add the corresponding decrement after queueing the interrupt. Cc: stable@vger.kernel.org Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20240104183233.3560639-1-oliver.upton@linux.dev commit 6ff1407e24e6fdfa4a16ba9ba551e3d253a26391 Author: Jens Axboe Date: Thu Jan 4 12:21:08 2024 -0700 io_uring: ensure local task_work is run on wait timeout A previous commit added an earlier break condition here, which is fine if we're using non-local task_work as it'll be run on return to userspace. However, if DEFER_TASKRUN is used, then we could be leaving local task_work that is ready to process in the ctx list until next time that we enter the kernel to wait for events. Move the break condition to _after_ we have run task_work. Cc: stable@vger.kernel.org Fixes: 846072f16eed ("io_uring: mimimise io_cqring_wait_schedule") Signed-off-by: Jens Axboe commit 98e20e5e13d2811898921f999288be7151a11954 Author: Quentin Deslandes Date: Tue Dec 26 14:07:42 2023 +0100 bpfilter: remove bpfilter bpfilter was supposed to convert iptables filtering rules into BPF programs on the fly, from the kernel, through a usermode helper. The base code for the UMH was introduced in 2018, and couple of attempts (2, 3) tried to introduce the BPF program generate features but were abandoned. bpfilter now sits in a kernel tree unused and unusable, occasionally causing confusion amongst Linux users (4, 5). As bpfilter is now developed in a dedicated repository on GitHub (6), it was suggested a couple of times this year (LSFMM/BPF 2023, LPC 2023) to remove the deprecated kernel part of the project. This is the purpose of this patch. [1]: https://lore.kernel.org/lkml/20180522022230.2492505-1-ast@kernel.org/ [2]: https://lore.kernel.org/bpf/20210829183608.2297877-1-me@ubique.spb.ru/#t [3]: https://lore.kernel.org/lkml/20221224000402.476079-1-qde@naccy.de/ [4]: https://dxuuu.xyz/bpfilter.html [5]: https://github.com/linuxkit/linuxkit/pull/3904 [6]: https://github.com/facebook/bpfilter Signed-off-by: Quentin Deslandes Link: https://lore.kernel.org/r/20231226130745.465988-1-qde@naccy.de Signed-off-by: Alexei Starovoitov commit 9ddf872b47e3ac8f27dbfc4a4737a976c7588de6 Author: Yonghong Song Date: Thu Jan 4 08:57:44 2024 -0800 bpf: Remove unnecessary cpu == 0 check in memalloc After merging the patch set [1] to reduce memory usage for bpf_global_percpu_ma, Alexei found a redundant check (cpu == 0) in function bpf_mem_alloc_percpu_unit_init() ([2]). Indeed, the check is unnecessary since c->unit_size will be all NULL or all non-NULL for all cpus before for_each_possible_cpu() loop. Removing the check makes code less confusing. [1] https://lore.kernel.org/all/20231222031729.1287957-1-yonghong.song@linux.dev/ [2] https://lore.kernel.org/all/20231222031745.1289082-1-yonghong.song@linux.dev/ Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20240104165744.702239-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 38709af26c33e398c3292e96837ccfde41fd9e6b Author: Cristian Ciocaltea Date: Thu Jan 4 16:39:49 2024 +0200 drm/rockchip: vop2: Drop superfluous include The rockchip_drm_fb.h header contains just a single function which is not directly used by the VOP2 driver. Drop the unnecessary include. Signed-off-by: Cristian Ciocaltea Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20240104143951.85219-1-cristian.ciocaltea@collabora.com commit c312828c37a72fe2d033a961c47c227b0767e9f8 Author: Andrea Righi Date: Fri Dec 29 08:49:16 2023 +0100 kernfs: convert kernfs_idr_lock to an irq safe raw spinlock bpf_cgroup_from_id() is basically a wrapper to cgroup_get_from_id(), that is relying on kernfs to determine the right cgroup associated to the target id. As a kfunc, it has the potential to be attached to any function through BPF, particularly in contexts where certain locks are held. However, kernfs is not using an irq safe spinlock for kernfs_idr_lock, that means any kernfs function that is acquiring this lock can be interrupted and potentially hit bpf_cgroup_from_id() in the process, triggering a deadlock. For example, it is really easy to trigger a lockdep splat between kernfs_idr_lock and rq->_lock, attaching a small BPF program to __set_cpus_allowed_ptr_locked() that just calls bpf_cgroup_from_id(): ===================================================== WARNING: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected 6.7.0-rc7-virtme #5 Not tainted ----------------------------------------------------- repro/131 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire: ffffffffb2dc4578 (kernfs_idr_lock){+.+.}-{2:2}, at: kernfs_find_and_get_node_by_id+0x1d/0x80 and this task is already holding: ffff911cbecaf218 (&rq->__lock){-.-.}-{2:2}, at: task_rq_lock+0x50/0xc0 which would create a new lock dependency: (&rq->__lock){-.-.}-{2:2} -> (kernfs_idr_lock){+.+.}-{2:2} but this new dependency connects a HARDIRQ-irq-safe lock: (&rq->__lock){-.-.}-{2:2} ... which became HARDIRQ-irq-safe at: lock_acquire+0xbf/0x2b0 _raw_spin_lock_nested+0x2e/0x40 scheduler_tick+0x5d/0x170 update_process_times+0x9c/0xb0 tick_periodic+0x27/0xe0 tick_handle_periodic+0x24/0x70 __sysvec_apic_timer_interrupt+0x64/0x1a0 sysvec_apic_timer_interrupt+0x6f/0x80 asm_sysvec_apic_timer_interrupt+0x1a/0x20 memcpy+0xc/0x20 arch_dup_task_struct+0x15/0x30 copy_process+0x1ce/0x1eb0 kernel_clone+0xac/0x390 kernel_thread+0x6f/0xa0 kthreadd+0x199/0x230 ret_from_fork+0x31/0x50 ret_from_fork_asm+0x1b/0x30 to a HARDIRQ-irq-unsafe lock: (kernfs_idr_lock){+.+.}-{2:2} ... which became HARDIRQ-irq-unsafe at: ... lock_acquire+0xbf/0x2b0 _raw_spin_lock+0x30/0x40 __kernfs_new_node.isra.0+0x83/0x280 kernfs_create_root+0xf6/0x1d0 sysfs_init+0x1b/0x70 mnt_init+0xd9/0x2a0 vfs_caches_init+0xcf/0xe0 start_kernel+0x58a/0x6a0 x86_64_start_reservations+0x18/0x30 x86_64_start_kernel+0xc5/0xe0 secondary_startup_64_no_verify+0x178/0x17b other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(kernfs_idr_lock); local_irq_disable(); lock(&rq->__lock); lock(kernfs_idr_lock); lock(&rq->__lock); *** DEADLOCK *** Prevent this deadlock condition converting kernfs_idr_lock to a raw irq safe spinlock. The performance impact of this change should be negligible and it also helps to prevent similar deadlock conditions with any other subsystems that may depend on kernfs. Fixes: 332ea1f697be ("bpf: Add bpf_cgroup_from_id() kfunc") Cc: stable Signed-off-by: Andrea Righi Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20231229074916.53547-1-andrea.righi@canonical.com Signed-off-by: Greg Kroah-Hartman commit 93ec4a3b76404bce01bd5c9032bef5df6feb1d62 Author: Jing Xia Date: Wed Dec 20 10:46:03 2023 +0800 class: fix use-after-free in class_register() The lock_class_key is still registered and can be found in lock_keys_hash hlist after subsys_private is freed in error handler path.A task who iterate over the lock_keys_hash later may cause use-after-free.So fix that up and unregister the lock_class_key before kfree(cp). On our platform, a driver fails to kset_register because of creating duplicate filename '/class/xxx'.With Kasan enabled, it prints a invalid-access bug report. KASAN bug report: BUG: KASAN: invalid-access in lockdep_register_key+0x19c/0x1bc Write of size 8 at addr 15ffff808b8c0368 by task modprobe/252 Pointer tag: [15], memory tag: [fe] CPU: 7 PID: 252 Comm: modprobe Tainted: G W 6.6.0-mainline-maybe-dirty #1 Call trace: dump_backtrace+0x1b0/0x1e4 show_stack+0x2c/0x40 dump_stack_lvl+0xac/0xe0 print_report+0x18c/0x4d8 kasan_report+0xe8/0x148 __hwasan_store8_noabort+0x88/0x98 lockdep_register_key+0x19c/0x1bc class_register+0x94/0x1ec init_module+0xbc/0xf48 [rfkill] do_one_initcall+0x17c/0x72c do_init_module+0x19c/0x3f8 ... Memory state around the buggy address: ffffff808b8c0100: 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a 8a ffffff808b8c0200: 8a 8a 8a 8a 8a 8a 8a 8a fe fe fe fe fe fe fe fe >ffffff808b8c0300: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ^ ffffff808b8c0400: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 As CONFIG_KASAN_GENERIC is not set, Kasan reports invalid-access not use-after-free here.In this case, modprobe is manipulating the corrupted lock_keys_hash hlish where lock_class_key is already freed before. It's worth noting that this only can happen if lockdep is enabled, which is not true for normal system. Fixes: dcfbb67e48a2 ("driver core: class: use lock_class_key already present in struct subsys_private") Cc: stable Signed-off-by: Jing Xia Signed-off-by: Xuewen Yan Link: https://lore.kernel.org/r/20231220024603.186078-1-jing.xia@unisoc.com Signed-off-by: Greg Kroah-Hartman commit 0c9ae0b8605078eafc3bea053cc78791e97ba2e2 Author: Guanghui Feng Date: Thu Dec 21 17:57:43 2023 +0800 uio: Fix use-after-free in uio_open core-1 core-2 ------------------------------------------------------- uio_unregister_device uio_open idev = idr_find() device_unregister(&idev->dev) put_device(&idev->dev) uio_device_release get_device(&idev->dev) kfree(idev) uio_free_minor(minor) uio_release put_device(&idev->dev) kfree(idev) ------------------------------------------------------- In the core-1 uio_unregister_device(), the device_unregister will kfree idev when the idev->dev kobject ref is 1. But after core-1 device_unregister, put_device and before doing kfree, the core-2 may get_device. Then: 1. After core-1 kfree idev, the core-2 will do use-after-free for idev. 2. When core-2 do uio_release and put_device, the idev will be double freed. To address this issue, we can get idev atomic & inc idev reference with minor_lock. Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered") Cc: stable Signed-off-by: Guanghui Feng Reviewed-by: Baolin Wang Link: https://lore.kernel.org/r/1703152663-59949-1-git-send-email-guanghuifeng@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit 97d62760e441af9ed393e127a46172f9534b5808 Author: Jay Buddhabhatti Date: Mon Dec 18 21:50:25 2023 -0800 drivers: soc: xilinx: add check for platform Some error event IDs for Versal and Versal NET are different. Both the platforms should access their respective error event IDs so use sub_family_code to check for platform and check error IDs for respective platforms. The family code is passed via platform data to avoid platform detection again. Platform data is setup when even driver is registered. Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231219055025.27570-3-jay.buddhabhatti@amd.com Signed-off-by: Greg Kroah-Hartman commit 0c4b2255b7afbcc80f4efcc8f67425162f49c263 Author: Jay Buddhabhatti Date: Mon Dec 18 21:50:24 2023 -0800 firmware: xilinx: Export function to use in other module Export zynqmp_pm_get_family_info() to access and find family information in other module. Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231219055025.27570-2-jay.buddhabhatti@amd.com Signed-off-by: Greg Kroah-Hartman commit 2ad3cc0582003f1fad74ad4c06b85613746fae47 Author: Wei Yang Date: Fri Dec 29 03:06:54 2023 +0000 scripts/tags.sh: remove find_sources After commit '4f628248a578 kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope', find_sources only invoke find_arch_sources. Signed-off-by: Wei Yang CC: Jike Song Link: https://lore.kernel.org/r/20231229030654.17474-4-richard.weiyang@gmail.com Signed-off-by: Greg Kroah-Hartman commit d70a091fb412fd0410b882c0b45072e547beb070 Author: Wei Yang Date: Fri Dec 29 03:06:53 2023 +0000 scripts/tags.sh: use -n to test archinclude In bash, "! -z" is equivalent to "-n", which seems to be more intuitive. Signed-off-by: Wei Yang CC: Sam Ravnborg Link: https://lore.kernel.org/r/20231229030654.17474-3-richard.weiyang@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0aedf7a2dc5d23211399813bdfce5a46e836d5d7 Author: Wei Yang Date: Fri Dec 29 03:06:52 2023 +0000 scripts/tags.sh: add local annotation Commit 'f81b1be40c44 tags: include headers before source files' introduce two local variables. Let's add local annotation to make it obvious. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20231229030654.17474-2-richard.weiyang@gmail.com Signed-off-by: Greg Kroah-Hartman commit f9fefa985d2e96db81954ae3b1feb09d69357f28 Author: Wei Yang Date: Fri Dec 29 03:06:51 2023 +0000 scripts/tags.sh: use more portable -path instead of -wholename According to the manual, -path is more portable than -wholename. Also for consistency, let's use -path here. Signed-off-by: Wei Yang CC: Guennadi Liakhovetski CC: WANG Cong CC: Michal Marek Link: https://lore.kernel.org/r/20231229030654.17474-1-richard.weiyang@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4f3f263df57ff2bb37174ced271b7364238833d0 Author: René Nyffenegger Date: Sun Dec 17 09:27:19 2023 +0100 scripts/tags.sh: Update comment (addition of gtags) Commit f4ed1009fcea ("kbuild: add GNU GLOBAL tags generation") added support for the GNU Global source tagging system. However, this addition was not reflected in the script's header comment. Fixes: f4ed1009fcea ("kbuild: add GNU GLOBAL tags generation") Signed-off-by: René Nyffenegger Link: https://lore.kernel.org/r/20231217082719.4747-1-mail@renenyffenegger.ch Signed-off-by: Greg Kroah-Hartman commit 408201eb2e386c8d1f3e4bcc46fee8f4c869b8a2 Author: Uwe Kleine-König Date: Wed Dec 27 17:26:35 2023 +0100 firmware: zynqmp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/b5a82472a6d61608c2cd7728ca364f6c88a821c3.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 31fd8f1ddd2857070c32ca63bbe53262768f432e Author: Uwe Kleine-König Date: Wed Dec 27 17:26:34 2023 +0100 firmware: turris-mox-rwtm: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Marek Behún Link: https://lore.kernel.org/r/9074d1ad2e889425991fecad664781ae27b2418a.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 51e24bac2fb8a12e70e2195b3101e5777b3e0965 Author: Uwe Kleine-König Date: Wed Dec 27 17:26:33 2023 +0100 firmware: stratix10-svc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Dinh Nguyen Link: https://lore.kernel.org/r/e574041cdce2e4e69f729dfa726a6d090762cff9.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 6ac63d0bb5762566a8cd8ebde0b129dc80a007d8 Author: Uwe Kleine-König Date: Wed Dec 27 17:26:32 2023 +0100 firmware: stratix10-rsu: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Dinh Nguyen Link: https://lore.kernel.org/r/06df45c697a747cb6543800a4613db6e1f5462b4.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ffc3c929507d86fd8056887035f163b5341740e9 Author: Uwe Kleine-König Date: Wed Dec 27 17:26:31 2023 +0100 firmware: raspberrypi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/5df31ef3c069f45634631c9c639bbb60ab1d4798.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 9eeec412265a185d1011d7b5da0baee9c3453e3e Author: Uwe Kleine-König Date: Wed Dec 27 17:26:30 2023 +0100 firmware: qemu_fw_cfg: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/8d7d86a24ea36985845c17b6da0933fedbf99ad8.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ab45e1f40bab8d87ba59a8e41888f2792e530278 Author: Uwe Kleine-König Date: Wed Dec 27 17:26:29 2023 +0100 firmware: mtk-adsp-ipc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/e2ea8abb4c30190392a86cf05cecd722d0f0b493.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 303cbf2a30cccfd600aa32f8a93067196d4d926d Author: Uwe Kleine-König Date: Wed Dec 27 17:26:28 2023 +0100 firmware: imx-dsp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/f4cc1ffe30b837d5eab96f2924f51999dfa9f671.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit f69583d32fcb23943271e4a1bb7265ac9af9b3e0 Author: Uwe Kleine-König Date: Wed Dec 27 17:26:27 2023 +0100 firmware: coreboot_table: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/d323e4f24bfab3ac1480933deb51e7c5cb025b09.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 259566503782eafc3c1eb4201347e32af2741e9f Author: Uwe Kleine-König Date: Wed Dec 27 17:26:26 2023 +0100 firmware: arm_scpi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/e7b4bc389949c3613a358bd8e57d70d7acd5552b.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 927e11300d8ef19873926d67e1f5662b1b85a7c7 Author: Uwe Kleine-König Date: Wed Dec 27 17:26:25 2023 +0100 firmware: arm_scmi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/86165c8ccd0bb47000a29e711102795b36c8df41.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 2765149273f4b52beb07256c3e4686c065a5f8a8 Author: Andrew Davis Date: Thu Jan 4 09:45:52 2024 -0600 mux: mmio: use reg property when parent device is not a syscon The DT binding for the reg-mux compatible states it can be used when the "parent device of mux controller is not syscon device". It also allows for a reg property. When the reg property is provided, use that to identify the address space for this mux. If not provided fallback to using the parent device as a regmap provider. While here use dev_err_probe() in the error path to prevent printing a message on probe defer which now can happen in extra ways. Signed-off-by: Andrew Davis Reviewed-by: Nishanth Menon Acked-by: Peter Rosin Link: https://lore.kernel.org/r/20240104154552.17852-1-afd@ti.com Signed-off-by: Greg Kroah-Hartman commit b1b9f7a494400c0c39f8cd83de3aaa6111c55087 Author: Hans de Goede Date: Sun Dec 24 19:34:02 2023 +0100 misc: lis3lv02d_i2c: Add missing setting of the reg_ctrl callback The lis3lv02d_i2c driver was missing a line to set the lis3_dev's reg_ctrl callback. lis3_reg_ctrl(on) is called from the init callback, but due to the missing reg_ctrl callback the regulators where never turned off again leading to the following oops/backtrace when detaching the driver: [ 82.313527] ------------[ cut here ]------------ [ 82.313546] WARNING: CPU: 1 PID: 1724 at drivers/regulator/core.c:2396 _regulator_put+0x219/0x230 ... [ 82.313695] RIP: 0010:_regulator_put+0x219/0x230 ... [ 82.314767] Call Trace: [ 82.314770] [ 82.314772] ? _regulator_put+0x219/0x230 [ 82.314777] ? __warn+0x81/0x170 [ 82.314784] ? _regulator_put+0x219/0x230 [ 82.314791] ? report_bug+0x18d/0x1c0 [ 82.314801] ? handle_bug+0x3c/0x80 [ 82.314806] ? exc_invalid_op+0x13/0x60 [ 82.314812] ? asm_exc_invalid_op+0x16/0x20 [ 82.314845] ? _regulator_put+0x219/0x230 [ 82.314857] regulator_bulk_free+0x39/0x60 [ 82.314865] i2c_device_remove+0x22/0xb0 Add the missing setting of the callback so that the regulators properly get turned off again when not used. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20231224183402.95640-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit d3da61ea9776d3c09c7284c5e1b77e6f78ba308a Author: Andy Shevchenko Date: Thu Dec 21 16:09:21 2023 +0200 pvpanic: Kill duplicate PCI_VENDOR_ID_REDHAT definition PCI_VENDOR_ID_REDHAT is already defined in pci_ids.h. Kill the dup. Signed-off-by: Andy Shevchenko Reviewed-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20231221140921.2760432-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e1be24b2e1190a7662462e8e398189ac795339cd Author: Greg Kroah-Hartman Date: Tue Dec 19 18:18:58 2023 +0100 platform/surface: aggregator: make ssam_bus_type constant and static Now that the driver core can properly handle constant struct bus_type, move the ssam_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. It's also never used outside of drivers/platform/surface/aggregator/bus.c so make it static and don't export it as no one is using it. Cc: Maximilian Luz Cc: Hans de Goede Cc: Ilpo Järvinen Cc: Reviewed-by: Maximilian Luz Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/2023121957-tapered-upswing-8326@gregkh Signed-off-by: Greg Kroah-Hartman commit e68f487133d515234bdf00b85fedd0fe6216349e Author: Heiner Kallweit Date: Wed Dec 20 16:11:14 2023 +0100 eeprom: at24: Use pm_runtime_resume_and_get to simplify the code Use helper pm_runtime_resume_and_get() to simplify the code. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/c3045427-da42-4f7c-8a96-3c4756646cd0@gmail.com Signed-off-by: Greg Kroah-Hartman commit caba40ec3531b0849f44502a03117796e8c9f4a1 Author: Heiner Kallweit Date: Wed Dec 20 13:55:58 2023 +0100 eeprom: at24: Probe for DDR3 thermal sensor in the SPD case The DDR3 SPD data structure advertises the presence of a thermal sensor on a DDR3 module in byte 32, bit 7. Let's use this information to explicitly instantiate the thermal sensor I2C client instead of having to rely on class-based I2C probing. The temp sensor i2c address can be derived from the SPD i2c address, so we can directly instantiate the device and don't have to probe for it. If the temp sensor has been instantiated already by other means (e.g. class-based auto-detection), then the busy-check in i2c_new_client_device will detect this. Note: Thermal sensors on DDR4 DIMM's are instantiated from the ee1004 driver. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/68113672-3724-44d5-9ff8-313dd6628f8c@gmail.com Signed-off-by: Greg Kroah-Hartman commit 393bd1000f8192fcf5fa4abc1e79c0919c123e9b Author: Heiner Kallweit Date: Tue Dec 19 23:09:48 2023 +0100 eeprom: ee1004: add support for temperature sensor The EE1004 SPD data structure advertises the presence of a thermal sensor on a DDR4 module in byte 14, bit 7. Let's use this information to explicitly instantiate the thermal sensor I2C client instead of having to rely on class-based I2C probing. The temp sensor i2c address can be derived from the SPD i2c address, so we can directly instantiate the device and don't have to probe for it. If the temp sensor has been instantiated already by other means (e.g. class-based auto-detection), then the busy-check in i2c_new_client_device will detect this. Patch was successfully tested with a Corsair Vengeance RGB PRO DDR4 module which comes with a thermal sensor. Link: https://www.spinics.net/lists/linux-i2c/msg65963.html Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/aa063dfb-2a92-40ba-bdab-e972781ae84b@gmail.com Signed-off-by: Greg Kroah-Hartman commit a6c7e0146b2db55531f9c48408daf7bcb07e4b0e Author: Greg Kroah-Hartman Date: Tue Dec 19 15:26:39 2023 +0100 moxtet: mark moxtet_bus_type as const Now that the driver core can properly handle constant struct bus_type, move the moxtet_bus_type to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Marek Behún Link: https://lore.kernel.org/r/2023121939-written-guru-db83@gregkh Signed-off-by: Greg Kroah-Hartman commit a87e55bfa25c195b3aaa25369175905ba9527fff Author: Greg Kroah-Hartman Date: Tue Dec 19 15:26:38 2023 +0100 moxtet: remove unused moxtet_type declaration For some reason, moxtet_type was defined in moxtet.h, but never actually used. Looks like a left-over from the original commit that was exporting the moxtet bus type, but that wasn't needed, and it was a different variable name, so no one noticed this one dangling around. Cc: Marek Behún Link: https://lore.kernel.org/r/2023121937-pants-heroics-17c1@gregkh Signed-off-by: Greg Kroah-Hartman commit 1960932eef9183e2dab662fe75126f7fa46e0e6d Author: Dan Carpenter Date: Tue Jan 2 16:11:16 2024 +0300 cdx: Unlock on error path in rescan_store() We added locking to this function but these two error paths were accidentally overlooked. Fixes: f0af81683466 ("cdx: Introduce lock to protect controller ops") Signed-off-by: Dan Carpenter Acked-by: Abhijit Gangurde Link: https://lore.kernel.org/r/a7994b47-6f78-4e2c-a30a-ee5995d428ec@moroto.mountain Signed-off-by: Greg Kroah-Hartman commit 87736ae12e1427bb2e6fd11f37b2ff76ed69aa0f Author: Dan Carpenter Date: Tue Jan 2 16:10:21 2024 +0300 cdx: call of_node_put() on error path Add a missing call to of_node_put(np) on error. There was a second error path where "np" was NULL, but that situation is impossible. The for_each_compatible_node() loop iterator is always non-NULL. Just deleted that error path. Fixes: 54b406e10f03 ("cdx: Remove cdx controller list from cdx bus system") Signed-off-by: Dan Carpenter Acked-by: Abhijit Gangurde Link: https://lore.kernel.org/r/2e66efc4-a13a-4774-8c9d-763455fe4834@moroto.mountain Signed-off-by: Greg Kroah-Hartman commit cf60af04edfe51fca488246c9959904adb2750fa Author: Abhijit Gangurde Date: Fri Dec 22 12:16:27 2023 +0530 cdx: Create resource debugfs file for cdx device resource debugfs file contains host addresses of CDX device resources. Each line of the resource file describe type of resource, a region with start-end and flag fields. Signed-off-by: Abhijit Gangurde Link: https://lore.kernel.org/r/20231222064627.2828960-2-abhijit.gangurde@amd.com Signed-off-by: Greg Kroah-Hartman commit aeda33ab8160c7a2e24ba4f44492ad1e974ddc7d Author: Abhijit Gangurde Date: Fri Dec 22 12:16:26 2023 +0530 cdx: create sysfs bin files for cdx resources Resource binary file contains the content of the memory regions. These resources devices can be used to mmap the MMIO regions in the user-space. Co-developed-by: Puneet Gupta Signed-off-by: Puneet Gupta Signed-off-by: Abhijit Gangurde Link: https://lore.kernel.org/r/20231222064627.2828960-1-abhijit.gangurde@amd.com Signed-off-by: Greg Kroah-Hartman commit 6bafe07c930676d6430be471310958070816a595 Author: Rafał Miłecki Date: Thu Dec 21 18:34:20 2023 +0100 nvmem: u-boot-env: improve coding style 1. Prefer kzalloc() over kcalloc() See memory-allocation.rst which says: "to be on the safe side it's best to use routines that set memory to zero, like kzalloc()" 2. Drop dev_err() for u_boot_env_add_cells() fail It can fail only on -ENOMEM. We don't want to print error then. 3. Add extra "crc32_addr" variable It makes code reading header's crc32 easier to understand / review. Signed-off-by: Rafał Miłecki Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20231221173421.13737-5-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit a832556d23c5a11115f300011a5874d6107a0d62 Author: Rafał Miłecki Date: Thu Dec 21 18:34:19 2023 +0100 nvmem: u-boot-env: use nvmem device helpers Use nvmem_dev_size() and nvmem_device_read() to make this driver less mtd dependent. Signed-off-by: Rafał Miłecki Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20231221173421.13737-4-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c8979b42b1a9c5604f431ba804928e55919263c Author: Rafał Miłecki Date: Thu Dec 21 18:34:18 2023 +0100 nvmem: u-boot-env: use nvmem_add_one_cell() nvmem subsystem helper Simplify adding NVMEM cells. Signed-off-by: Rafał Miłecki Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20231221173421.13737-3-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit 33cf42e68efc8ff529a7eee08a4f0ba8c8d0a207 Author: Rafał Miłecki Date: Thu Dec 21 18:34:17 2023 +0100 nvmem: core: add nvmem_dev_size() helper This is required by layouts that need to read whole NVMEM content. It's especially useful for NVMEM devices without hardcoded layout (like U-Boot environment data block). Signed-off-by: Rafał Miłecki Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20231221173421.13737-2-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit 43f60e3fb62edc7bd8891de8779fb422f4ae23ae Author: Rafał Miłecki Date: Tue Dec 19 13:01:04 2023 +0100 nvmem: drop nvmem_layout_get_match_data() Thanks for layouts refactoring we now have "struct device" associated with layout. Also its OF pointer points directly to the "nvmem-layout" DT node. All it takes to get match data is a generic of_device_get_match_data(). Signed-off-by: Rafał Miłecki Reviewed-by: Miquel Raynal Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20231219120104.3422-2-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit 401df0d4f4098ecc9c5278da2f50756d62e5b37d Author: Rafał Miłecki Date: Tue Dec 19 13:01:03 2023 +0100 nvmem: layouts: refactor .add_cells() callback arguments Simply pass whole "struct nvmem_layout" instead of single variables. There is nothing in "struct nvmem_layout" that we have to hide from layout drivers. They also access it during .probe() and .remove(). Thanks to this change: 1. API gets more consistent All layouts drivers callbacks get the same argument 2. Layouts get correct device Before this change NVMEM core code was passing NVMEM device instead of layout device. That resulted in: * Confusing prints * Calling devm_*() helpers on wrong device * Helpers like of_device_get_match_data() dereferencing NULLs 3. It gets possible to get match data First of all nvmem_layout_get_match_data() requires passing "struct nvmem_layout" which .add_cells() callback didn't have before this. It doesn't matter much as it's rather useless now anyway (and will be dropped). What's more important however is that of_device_get_match_data() can be used now thanks to owning a proper device pointer. Signed-off-by: Rafał Miłecki Reviewed-by: Miquel Raynal Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20231219120104.3422-1-zajec5@gmail.com Signed-off-by: Greg Kroah-Hartman commit 597a421798033cd150586b5f2607389fa4052550 Author: Markus Elfring Date: Fri Dec 29 13:18:56 2023 +0100 rpc_pipefs: Replace one label in bl_resolve_deviceid() The kfree() function was called in one case by the bl_resolve_deviceid() function during error handling even if the passed data structure member contained a null pointer. This issue was detected by using the Coccinelle software. Thus use an other label. Signed-off-by: Markus Elfring Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 12fc0a963128b54b82e98b9909f463e784b90b07 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:47:07 2023 +0000 nfs: Remove writepage NFS already has writepages and migrate_folio, so it does not need to implement writepage. The writepage operation is deprecated as it leads to worse performance under high memory pressure due to folios being written out in LRU order rather than sequentially within a file. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Anna Schumaker commit 1fd5394e6ab8b11465a5d0867f188fad1835a762 Author: Benjamin Coddington Date: Fri Nov 17 06:25:14 2023 -0500 NFS: drop unused nfs_direct_req bytes_left Now that we're calculating how large a remaining IO should be based on the current request's offset, we no longer need to track bytes_left on each struct nfs_direct_req. Drop the field, and clean up the direct request tracepoints. Signed-off-by: Benjamin Coddington Reviewed-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit 8a6291bf3b0eae1bf26621e6419a91682f2d6227 Author: Trond Myklebust Date: Fri Nov 17 06:25:13 2023 -0500 pNFS: Fix the pnfs block driver's calculation of layoutget size Instead of relying on the value of the 'bytes_left' field, we should calculate the layout size based on the offset of the request that is being written out. Reported-by: Benjamin Coddington Signed-off-by: Trond Myklebust Fixes: 954998b60caa ("NFS: Fix error handling for O_DIRECT write scheduling") Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Reviewed-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit f6e70c59edee4203e9541e790e8c416a9250f190 Author: Jeff Layton Date: Fri Nov 3 06:10:51 2023 -0400 nfs: print fileid in lookup tracepoints With this we can see the dentry -> inode linkage that's being revalidated. A fileid of 0 means "negative dentry". Signed-off-by: Jeff Layton Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker commit 310b1f89ea81ff753f55cba7f6ec457b6bbf6549 Author: Jeff Layton Date: Fri Nov 3 06:10:50 2023 -0400 nfs: rename the nfs_async_rename_done tracepoint We do async renames in other cases besides sillyrenames now. This tracepoint name is now misleading. Signed-off-by: Jeff Layton Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker commit 283064fca3e8c6a2f3d1d70bb56f5c01ee01118c Author: Jeff Layton Date: Fri Nov 3 06:10:49 2023 -0400 nfs: add new tracepoint at nfs4 revalidate entry point Add a call to the v4 d_revalidate entrypoint, just like the v3 one. Signed-off-by: Jeff Layton Reviewed-by: Chuck Lever Signed-off-by: Anna Schumaker commit 98b4e5137504a5bd9346562b1310cdc13486603b Author: Olga Kornievskaia Date: Fri Dec 1 14:42:03 2023 -0500 SUNRPC: fix _xprt_switch_find_current_entry logic Fix the logic for picking current transport entry. Fixes: 95d0d30c66b8 ("SUNRPC create an iterator to list only OFFLINE xprts") Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit 037e56a22ff37f9a9c2330b66cff55d3d1ff9b90 Author: Trond Myklebust Date: Wed Nov 15 13:55:29 2023 -0500 NFSv4.1/pnfs: Ensure we handle the error NFS4ERR_RETURNCONFLICT Once the client has processed the CB_LAYOUTRECALL, but has not yet successfully returned the layout, the server is supposed to switch to returning NFS4ERR_RETURNCONFLICT. This patch ensures that we handle that return value correctly. Fixes: 183d9e7b112a ("pnfs: rework LAYOUTGET retry handling") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit dce72920c81b7e2ee6e0c9b2fde8762160b9992a Author: Trond Myklebust Date: Wed Nov 15 13:55:28 2023 -0500 NFSv4.1: if referring calls are complete, trust the stateid argument If the server is recalling a layout, and sends us a list of referring calls that we can see are complete, then we should just trust that the stateid argument is correct, even if the sequence id doesn't match the one we hold. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit e3fd54e7dc5a7f3fb7bb7c33bee1361ca0c36ed3 Author: Trond Myklebust Date: Wed Nov 15 13:55:27 2023 -0500 NFSv4: Track the number of referring calls in struct cb_process_state When the server gives us a set of referring calls, to tell us that the NFSv4.1 callback needs to be ordered with respect to those calls, then we may want to make that information available to the operations. In certain cases, it may allow them to optimise their behaviour due to the extra knowledge. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit a10a9233073d984b239e22358ba21825e27e2e88 Author: Scott Mayhew Date: Tue Dec 5 09:10:54 2023 -0500 NFS: Use parent's objective cred in nfs_access_login_time() The subjective cred (task->cred) can potentially be overridden and subsquently freed in non-RCU context, which could lead to a panic if we try to use it in cred_fscmp(). Use __task_cred(), which returns the objective cred (task->real_cred) instead. Fixes: 0eb43812c027 ("NFS: Clear the file access cache upon login") Fixes: 5e9a7b9c2ea1 ("NFS: Fix up a sparse warning") Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit b4d4fd60f884e75d52bf9254bc56b3ea41ea2686 Author: Benjamin Coddington Date: Wed Dec 6 08:10:22 2023 -0500 NFSv4: Always ask for type with READDIR Again we have claimed regressions for walking a directory tree, this time with the "find" utility which always tries to optimize away asking for any attributes until it has a complete list of entries. This behavior makes the readdir plus heuristic do the wrong thing, which causes a storm of GETATTRs to determine each entry's type in order to continue the walk. For v4 add the type attribute to each READDIR request to include it no matter the heuristic. This allows a simple `find` command to proceed quickly through a directory tree. Suggested-by: Jeff Layton Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Reviewed-by: Christoph Hellwig Signed-off-by: Anna Schumaker commit d76c769c8db4c321aa4d697e810e0ed0b30bcc91 Author: Benjamin Coddington Date: Tue Dec 5 10:05:02 2023 -0500 pnfs/blocklayout: Don't add zero-length pnfs_block_dev We noticed a SCSI device that refused to allow READ CAPACITY when the device had a PR with exclusive access, registrants only. The result of this situation is that the blocklayout driver adds a pnfs_block_dev of zero length which always fails the offset_in_map tests. Instead of continuously trying to do pNFS for this case, just mark the device as unavailable which will allow the client to fallback to the MDS for the duration of PNFS_DEVICE_RETRY_TIMEOUT. Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 1530827b90025cdf80c9b0d07a166d045a0a7b81 Author: Benjamin Coddington Date: Tue Dec 5 10:05:01 2023 -0500 blocklayoutdriver: Fix reference leak of pnfs_device_node The error path for blocklayout's device lookup is missing a reference drop for the case where a lookup finds the device, but the device is marked with NFS_DEVICEID_UNAVAILABLE. Fixes: b3dce6a2f060 ("pnfs/blocklayout: handle transient devices") Signed-off-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 31b62908693c90d4d07db597e685d9f25a120073 Author: Anna Schumaker Date: Mon Nov 27 17:06:18 2023 -0500 SUNRPC: Fix a suspicious RCU usage warning I received the following warning while running cthon against an ontap server running pNFS: [ 57.202521] ============================= [ 57.202522] WARNING: suspicious RCU usage [ 57.202523] 6.7.0-rc3-g2cc14f52aeb7 #41492 Not tainted [ 57.202525] ----------------------------- [ 57.202525] net/sunrpc/xprtmultipath.c:349 RCU-list traversed in non-reader section!! [ 57.202527] other info that might help us debug this: [ 57.202528] rcu_scheduler_active = 2, debug_locks = 1 [ 57.202529] no locks held by test5/3567. [ 57.202530] stack backtrace: [ 57.202532] CPU: 0 PID: 3567 Comm: test5 Not tainted 6.7.0-rc3-g2cc14f52aeb7 #41492 5b09971b4965c0aceba19f3eea324a4a806e227e [ 57.202534] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 2/2/2022 [ 57.202536] Call Trace: [ 57.202537] [ 57.202540] dump_stack_lvl+0x77/0xb0 [ 57.202551] lockdep_rcu_suspicious+0x154/0x1a0 [ 57.202556] rpc_xprt_switch_has_addr+0x17c/0x190 [sunrpc ebe02571b9a8ceebf7d98e71675af20c19bdb1f6] [ 57.202596] rpc_clnt_setup_test_and_add_xprt+0x50/0x180 [sunrpc ebe02571b9a8ceebf7d98e71675af20c19bdb1f6] [ 57.202621] ? rpc_clnt_add_xprt+0x254/0x300 [sunrpc ebe02571b9a8ceebf7d98e71675af20c19bdb1f6] [ 57.202646] rpc_clnt_add_xprt+0x27a/0x300 [sunrpc ebe02571b9a8ceebf7d98e71675af20c19bdb1f6] [ 57.202671] ? __pfx_rpc_clnt_setup_test_and_add_xprt+0x10/0x10 [sunrpc ebe02571b9a8ceebf7d98e71675af20c19bdb1f6] [ 57.202696] nfs4_pnfs_ds_connect+0x345/0x760 [nfsv4 c716d88496ded0ea6d289bbea684fa996f9b57a9] [ 57.202728] ? __pfx_nfs4_test_session_trunk+0x10/0x10 [nfsv4 c716d88496ded0ea6d289bbea684fa996f9b57a9] [ 57.202754] nfs4_fl_prepare_ds+0x75/0xc0 [nfs_layout_nfsv41_files e3a4187f18ae8a27b630f9feae6831b584a9360a] [ 57.202760] filelayout_write_pagelist+0x4a/0x200 [nfs_layout_nfsv41_files e3a4187f18ae8a27b630f9feae6831b584a9360a] [ 57.202765] pnfs_generic_pg_writepages+0xbe/0x230 [nfsv4 c716d88496ded0ea6d289bbea684fa996f9b57a9] [ 57.202788] __nfs_pageio_add_request+0x3fd/0x520 [nfs 6c976fa593a7c2976f5a0aeb4965514a828e6902] [ 57.202813] nfs_pageio_add_request+0x18b/0x390 [nfs 6c976fa593a7c2976f5a0aeb4965514a828e6902] [ 57.202831] nfs_do_writepage+0x116/0x1e0 [nfs 6c976fa593a7c2976f5a0aeb4965514a828e6902] [ 57.202849] nfs_writepages_callback+0x13/0x30 [nfs 6c976fa593a7c2976f5a0aeb4965514a828e6902] [ 57.202866] write_cache_pages+0x265/0x450 [ 57.202870] ? __pfx_nfs_writepages_callback+0x10/0x10 [nfs 6c976fa593a7c2976f5a0aeb4965514a828e6902] [ 57.202891] nfs_writepages+0x141/0x230 [nfs 6c976fa593a7c2976f5a0aeb4965514a828e6902] [ 57.202913] do_writepages+0xd2/0x230 [ 57.202917] ? filemap_fdatawrite_wbc+0x5c/0x80 [ 57.202921] filemap_fdatawrite_wbc+0x67/0x80 [ 57.202924] filemap_write_and_wait_range+0xd9/0x170 [ 57.202930] nfs_wb_all+0x49/0x180 [nfs 6c976fa593a7c2976f5a0aeb4965514a828e6902] [ 57.202947] nfs4_file_flush+0x72/0xb0 [nfsv4 c716d88496ded0ea6d289bbea684fa996f9b57a9] [ 57.202969] __se_sys_close+0x46/0xd0 [ 57.202972] do_syscall_64+0x68/0x100 [ 57.202975] ? do_syscall_64+0x77/0x100 [ 57.202976] ? do_syscall_64+0x77/0x100 [ 57.202979] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 57.202982] RIP: 0033:0x7fe2b12e4a94 [ 57.202985] Code: 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 80 3d d5 18 0e 00 00 74 13 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 44 c3 0f 1f 00 48 83 ec 18 89 7c 24 0c e8 c3 [ 57.202987] RSP: 002b:00007ffe857ddb38 EFLAGS: 00000202 ORIG_RAX: 0000000000000003 [ 57.202989] RAX: ffffffffffffffda RBX: 00007ffe857dfd68 RCX: 00007fe2b12e4a94 [ 57.202991] RDX: 0000000000002000 RSI: 00007ffe857ddc40 RDI: 0000000000000003 [ 57.202992] RBP: 00007ffe857dfc50 R08: 7fffffffffffffff R09: 0000000065650f49 [ 57.202993] R10: 00007fe2b11f8300 R11: 0000000000000202 R12: 0000000000000000 [ 57.202994] R13: 00007ffe857dfd80 R14: 00007fe2b1445000 R15: 0000000000000000 [ 57.202999] The problem seems to be that two out of three callers aren't taking the rcu_read_lock() before calling the list_for_each_entry_rcu() function in rpc_xprt_switch_has_addr(). I fix this by having rpc_xprt_switch_has_addr() unconditionaly take the rcu_read_lock(), which is okay to do recursively in the case that the lock has already been taken by a caller. Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit a902f3dec70a46332a8c99604de384fbabd734e5 Author: Anna Schumaker Date: Thu Nov 30 16:25:58 2023 -0500 SUNRPC: Create a helper function for accessing the rpc_clnt's xprt_switch This function takes the necessary rcu read lock to dereference the client's rpc_xprt_switch and bump the reference count so it doesn't disappear underneath us before returning. This does mean that callers are responsible for calling xprt_switch_put() on the returned object when they are done with it. Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit 5f1e77b2285b47c216b44e513071549cf006a309 Author: Anna Schumaker Date: Thu Nov 30 13:30:15 2023 -0500 SUNRPC: Remove unused function rpc_clnt_xprt_switch_put() Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit ec677b58f65ed500d80c4ddff62ae2e8a9ae9802 Author: Anna Schumaker Date: Thu Nov 30 11:45:34 2023 -0500 SUNRPC: Clean up unused variable in rpc_xprt_probe_trunked() We don't use the rpc_xprt_switch anywhere in this function, so let's not take an extra reference to in unnecessarily. Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker commit d8407f71ebeaeb6f50bd89791837873e44609708 Author: Christophe JAILLET Date: Tue Dec 19 06:01:47 2023 +0100 ppdev: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/ba9da12fdd5cdb2c28180b7160af5042447d803f.1702962092.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 54ffdab820801372f3632bb86613407df34b921b Author: Tanzir Hasan Date: Tue Dec 26 17:09:23 2023 +0000 android: binder: binderfs.c: removed asm-generic/errno-base.h asm-generic/errno-base.h can be replaced by linux/errno.h and the file will still build correctly. It is an asm-generic file which should be avoided if possible. Suggested-by: Al Viro Signed-off-by: Tanzir Hasan Acked-by: Carlos Llamas Link: https://lore.kernel.org/r/20231226-binderfs-v1-1-66829e92b523@google.com Signed-off-by: Greg Kroah-Hartman commit 5962ded777d689cd8bf04454273e32228d7fb71f Author: RD Babiera Date: Wed Jan 3 18:17:55 2024 +0000 usb: typec: class: fix typec_altmode_put_partner to put plugs When typec_altmode_put_partner is called by a plug altmode upon release, the port altmode the plug belongs to will not remove its reference to the plug. The check to see if the altmode being released is a plug evaluates against the released altmode's partner instead of the calling altmode, so change adev in typec_altmode_put_partner to properly refer to the altmode being released. Because typec_altmode_set_partner calls get_device() on the port altmode, add partner_adev that points to the port altmode in typec_put_partner to call put_device() on. typec_altmode_set_partner is not called for port altmodes, so add a check in typec_altmode_release to prevent typec_altmode_put_partner() calls on port altmode release. Fixes: 8a37d87d72f0 ("usb: typec: Bus type for alternate modes") Cc: Co-developed-by: Christian A. Ehrhardt Signed-off-by: Christian A. Ehrhardt Signed-off-by: RD Babiera Tested-by: Christian A. Ehrhardt Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240103181754.2492492-2-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman commit 0c84bea0cabc4e2b98a3de88eeb4ff798931f056 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:23 2023 -0500 serial: sc16is7xx: refactor EFR lock Move common code for EFR lock/unlock of mutex into functions for code reuse and clarity. With the addition of old_lcr, move irda_mode within struct sc16is7xx_one to reduce memory usage: Before: /* size: 752, cachelines: 12, members: 10 */ After: /* size: 744, cachelines: 12, members: 10 */ Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-17-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 2de8a1b46756b5a79d8447f99afdfe49e914225a Author: Hugo Villeneuve Date: Thu Dec 21 18:18:22 2023 -0500 serial: sc16is7xx: reorder code to remove prototype declarations Move/reorder some functions to remove sc16is7xx_ier_set() and sc16is7xx_stop_tx() prototypes declarations. No functional change. sc16is7xx_ier_set() was introduced in commit cc4c1d05eb10 ("sc16is7xx: Properly resume TX after stop"). Reviewed-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-16-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit f031d763dcb0b4dbd4bbf1d4324f7ca91761d3b1 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:21 2023 -0500 serial: sc16is7xx: refactor FIFO access functions to increase commonality Simplify FIFO access functions by avoiding to declare a struct sc16is7xx_port *s variable within each function. This is mainly done to have more commonality between the max310x and sc16is7xx drivers. Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-15-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit e54837da4d81bd297b8b5272594eed41664c13ca Author: Hugo Villeneuve Date: Thu Dec 21 18:18:20 2023 -0500 serial: sc16is7xx: drop unneeded MODULE_ALIAS The MODULE_DEVICE_TABLE() already creates the proper aliases for the SPI driver. Reviewed-by: Andy Shevchenko Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-14-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 2e57cefc4477659527f7adab1f87cdbf60ef1ae6 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:19 2023 -0500 serial: sc16is7xx: replace hardcoded divisor value with BIT() macro To better show why the limit is what it is, since we have only 16 bits for the divisor. Reviewed-by: Andy Shevchenko Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-13-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit dfb104213008e68ba4dd516ce4f329d676c449fb Author: Hugo Villeneuve Date: Thu Dec 21 18:18:18 2023 -0500 serial: sc16is7xx: add explicit return for some switch default cases Allows to simplify code by removing the break statement in the default switch/case in some functions. Reviewed-by: Andy Shevchenko Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-12-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit acd7f118b3b5466549e351331bedb50a6027d8d1 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:17 2023 -0500 serial: sc16is7xx: add macro for max number of UART ports Add macro to hold the maximum number of UART ports per IC/device. Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-11-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit d9ffadaf9df1c8f416a8308f8995c2f8de4cbc7f Author: Hugo Villeneuve Date: Thu Dec 21 18:18:16 2023 -0500 serial: sc16is7xx: add driver name to struct uart_driver Make sure that the driver name is displayed instead of "unknown" when displaying the driver infos: Before: grep ttySC /proc/tty/drivers unknown /dev/ttySC 243 0-7 serial After: grep ttySC /proc/tty/drivers sc16is7xx /dev/ttySC 243 0-7 serial Reviewed-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-10-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 7e2ead98b7478629b10e616ad997c24c390fbc84 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:15 2023 -0500 serial: sc16is7xx: use i2c_get_match_data() Use preferred i2c_get_match_data() instead of device_get_match_data() and i2c_client_get_device_id() to get the driver match data. Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-9-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 195f01ddcc8146465dff1cbdfd592aa3c4f3ce5d Author: Hugo Villeneuve Date: Thu Dec 21 18:18:14 2023 -0500 serial: sc16is7xx: use spi_get_device_match_data() Use preferred spi_get_device_match_data() instead of device_get_match_data() and spi_get_device_id() to get the driver match data. Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-8-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 3504c3174bfce19bbf3b6391645f159c68ba12e9 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:13 2023 -0500 serial: sc16is7xx: use DECLARE_BITMAP for sc16is7xx_lines bitfield Replace the explicit sc16is7xx_lines bitfield declaration with the generic macro DECLARE_BITMAP() to reserve just enough memory to contain all required bits. This also improves code self-documentation by showing the maximum number of bits required. This conversion now makes sc16is7xx_lines an array, so drop the "&" before sc16is7xx_lines in all bit access functions. Reviewed-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-7-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit d5078509c8b06c5c472a60232815e41af81c6446 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:12 2023 -0500 serial: sc16is7xx: improve do/while loop in sc16is7xx_irq() Simplify and improve readability by replacing while(1) loop with do {} while, and by using the keep_polling variable as the exit condition, making it more explicit. Fixes: 834449872105 ("sc16is7xx: Fix for multi-channel stall") Cc: Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-6-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit ed647256e8f226241ecff7baaecdb8632ffc7ec1 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:11 2023 -0500 serial: sc16is7xx: remove obsolete loop in sc16is7xx_port_irq() Commit 834449872105 ("sc16is7xx: Fix for multi-channel stall") changed sc16is7xx_port_irq() from looping multiple times when there was still interrupts to serve. It simply changed the do {} while(1) loop to a do {} while(0) loop, which makes the loop itself now obsolete. Clean the code by removing this obsolete do {} while(0) loop. Fixes: 834449872105 ("sc16is7xx: Fix for multi-channel stall") Cc: Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-5-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 3ef79cd1412236d884ab0c46b4d1921380807b48 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:10 2023 -0500 serial: sc16is7xx: set safe default SPI clock frequency 15 MHz is supported only by 76x variants. If the SPI clock frequency is not specified, use a safe default clock value of 4 MHz that is supported by all variants. Also use HZ_PER_MHZ macro to improve readability. Fixes: 2c837a8a8f9f ("sc16is7xx: spi interface is added") Cc: Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-4-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 6d710b769c1f5f0d55c9ad9bb49b7dce009ec103 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:09 2023 -0500 serial: sc16is7xx: add check for unsupported SPI modes during probe The original comment is confusing because it implies that variants other than the SC16IS762 supports other SPI modes beside SPI_MODE_0. Extract from datasheet: The SC16IS762 differs from the SC16IS752 in that it supports SPI clock speeds up to 15 Mbit/s instead of the 4 Mbit/s supported by the SC16IS752... In all other aspects, the SC16IS762 is functionally and electrically the same as the SC16IS752. The same is also true of the SC16IS760 variant versus the SC16IS740 and SC16IS750 variants. For all variants, only SPI mode 0 is supported. Change comment and abort probing if the specified SPI mode is not SPI_MODE_0. Fixes: 2c837a8a8f9f ("sc16is7xx: spi interface is added") Cc: Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-3-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 8a1060ce974919f2a79807527ad82ac39336eda2 Author: Hugo Villeneuve Date: Thu Dec 21 18:18:08 2023 -0500 serial: sc16is7xx: fix invalid sc16is7xx_lines bitfield in case of probe error If an error occurs during probing, the sc16is7xx_lines bitfield may be left in a state that doesn't represent the correct state of lines allocation. For example, in a system with two SC16 devices, if an error occurs only during probing of channel (port) B of the second device, sc16is7xx_lines final state will be 00001011b instead of the expected 00000011b. This is caused in part because of the "i--" in the for/loop located in the out_ports: error path. Fix this by checking the return value of uart_add_one_port() and set line allocation bit only if this was successful. This allows the refactor of the obfuscated for(i--...) loop in the error path, and properly call uart_remove_one_port() only when needed, and properly unset line allocation bits. Also use same mechanism in remove() when calling uart_remove_one_port(). Fixes: c64349722d14 ("sc16is7xx: support multiple devices") Cc: Cc: Yury Norov Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231221231823.2327894-2-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 0c2a5f471ce58bca8f8ab5fcb911aff91eaaa5eb Author: Lino Sanfilippo Date: Wed Jan 3 07:18:18 2024 +0100 serial: 8250_exar: Set missing rs485_supported flag The UART supports an auto-RTS mode in which the RTS pin is automatically activated during transmission. So mark this mode as being supported even if RTS is not controlled by the driver but the UART. Also the serial core expects now at least one of both modes rts-on-send or rts-after-send to be supported. This is since during sanitization unsupported flags are deleted from a RS485 configuration set by userspace. However if the configuration ends up with both flags unset, the core prints a warning since it considers such a configuration invalid (see uart_sanitize_serial_rs485()). Cc: Reviewed-by: Ilpo Järvinen Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20240103061818.564-8-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman commit 51f93776b84dee23e44a7be880736669a01cec2b Author: Lino Sanfilippo Date: Wed Jan 3 07:18:17 2024 +0100 serial: omap: do not override settings for RS485 support The drivers RS485 support is deactivated if there is no RTS GPIO available. This is done by nullifying the ports rs485_supported struct. After that however the settings in serial_omap_rs485_supported are assigned to the same structure unconditionally, which results in an unintended reactivation of RS485 support. Fix this by moving the assignment to the beginning of serial_omap_probe_rs485() and thus before uart_get_rs485_mode() gets called. Also replace the assignment of rs485_config() to have the complete RS485 setup in one function. Fixes: e2752ae3cfc9 ("serial: omap: Disallow RS-485 if rts-gpio is not specified") Cc: Signed-off-by: Lino Sanfilippo Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240103061818.564-7-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman commit 74eab89b26ac433ad857292f4707b43c1a8f0209 Author: Lino Sanfilippo Date: Wed Jan 3 07:18:16 2024 +0100 serial: core, imx: do not set RS485 enabled if it is not supported If the imx driver cannot support RS485 it nullifies the ports rs485_supported structure. But it still calls uart_get_rs485_mode() which may set the RS485_ENABLED flag nevertheless. This may lead to an attempt to configure RS485 even if it is not supported when the flag is evaluated in uart_configure_port() at port startup. Avoid this by bailing out of uart_get_rs485_mode() if the RS485_ENABLED flag is not supported by the caller. With this fix a check for RTS availability is now obsolete in the imx driver, since it can not evaluate to true any more. So remove this check. Furthermore the explicit nullifcation of rs485_supported is not needed, since the memory has already been set to zeros at allocation. So remove this, too. Fixes: 00d7a00e2a6f ("serial: imx: Fill in rs485_supported") Cc: Shawn Guo Cc: Sascha Hauer Cc: Suggested-by: Uwe Kleine-König Signed-off-by: Lino Sanfilippo Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20240103061818.564-6-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman commit c73986913fa47e71e0b1ad7f039f6444915e8810 Author: Lino Sanfilippo Date: Wed Jan 3 07:18:15 2024 +0100 serial: core: make sure RS485 cannot be enabled when it is not supported Some uart drivers specify a rs485_config() function and then decide later to disable RS485 support for some reason (e.g. imx and ar933). In these cases userspace may be able to activate RS485 via TIOCSRS485 nevertheless, since in uart_set_rs485_config() an existing rs485_config() function indicates that RS485 is supported. Make sure that this is not longer possible by checking the uarts rs485_supported.flags instead and bailing out if SER_RS485_ENABLED is not set. Furthermore instead of returning an empty structure return -ENOTTY if the RS485 configuration is requested via TIOCGRS485 but RS485 is not supported. This has a small impact on userspace visibility but it is consistent with the -ENOTTY error for TIOCGRS485. Fixes: e849145e1fdd ("serial: ar933x: Fill in rs485_supported") Fixes: 55e18c6b6d42 ("serial: imx: Remove serial_rs485 sanitization") Cc: Shawn Guo Cc: Sascha Hauer Cc: Reviewed-by: Ilpo Järvinen Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20240103061818.564-5-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman commit 4afeced55baa391490b61ed9164867e2927353ed Author: Lino Sanfilippo Date: Wed Jan 3 07:18:14 2024 +0100 serial: core: fix sanitizing check for RTS settings Among other things uart_sanitize_serial_rs485() tests the sanity of the RTS settings in a RS485 configuration that has been passed by userspace. If RTS-on-send and RTS-after-send are both set or unset the configuration is adjusted and RTS-after-send is disabled and RTS-on-send enabled. This however makes only sense if both RTS modes are actually supported by the driver. With commit be2e2cb1d281 ("serial: Sanitize rs485_struct") the code does take the driver support into account but only checks if one of both RTS modes are supported. This may lead to the errorneous result of RTS-on-send being set even if only RTS-after-send is supported. Fix this by changing the implemented logic: First clear all unsupported flags in the RS485 configuration, then adjust an invalid RTS setting by taking into account which RTS mode is supported. Cc: Fixes: be2e2cb1d281 ("serial: Sanitize rs485_struct") Reviewed-by: Ilpo Järvinen Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20240103061818.564-4-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman commit 1a33e33ca0e80d485458410f149265cdc0178cfa Author: Lino Sanfilippo Date: Wed Jan 3 07:18:13 2024 +0100 serial: core: set missing supported flag for RX during TX GPIO If the RS485 feature RX-during-TX is supported by means of a GPIO set the according supported flag. Otherwise setting this feature from userspace may not be possible, since in uart_sanitize_serial_rs485() the passed RS485 configuration is matched against the supported features and unsupported settings are thereby removed and thus take no effect. Cc: Fixes: 163f080eb717 ("serial: core: Add option to output RS485 RX_DURING_TX state via GPIO") Reviewed-by: Ilpo Järvinen Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20240103061818.564-3-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman commit 07c30ea5861fb26a77dade8cdc787252f6122fb1 Author: Lino Sanfilippo Date: Wed Jan 3 07:18:12 2024 +0100 serial: Do not hold the port lock when setting rx-during-tx GPIO Both the imx and stm32 driver set the rx-during-tx GPIO in rs485_config(). Since this function is called with the port lock held, this can be a problem in case that setting the GPIO line can sleep (e.g. if a GPIO expander is used which is connected via SPI or I2C). Avoid this issue by moving the GPIO setting outside of the port lock into the serial core and thus making it a generic feature. Also with commit c54d48543689 ("serial: stm32: Add support for rs485 RX_DURING_TX output GPIO") the SER_RS485_RX_DURING_TX flag is only set if a rx-during-tx GPIO is _not_ available, which is wrong. Fix this, too. Furthermore reset old GPIO settings in case that changing the RS485 configuration failed. Fixes: c54d48543689 ("serial: stm32: Add support for rs485 RX_DURING_TX output GPIO") Fixes: ca530cfa968c ("serial: imx: Add support for RS485 RX_DURING_TX output GPIO") Cc: Shawn Guo Cc: Sascha Hauer Cc: Signed-off-by: Lino Sanfilippo Link: https://lore.kernel.org/r/20240103061818.564-2-l.sanfilippo@kunbus.com Signed-off-by: Greg Kroah-Hartman commit da680c045fde3c441bb0df5780f4ffc68327797d Author: Michal Simek Date: Thu Dec 21 15:05:09 2023 +0100 dt-bindings: serial: Describe ARM dcc interface Debug Communication Channel (DCC) provides the way how to pass data between target CPU and host via JTAG interface. Every CPU has own interface for communication via dbgdtrtx_el0 and dbgdtrrx_el0 registers. Signed-off-by: Michal Simek Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/9d7e85914eb1cdb313b28cb019093a84dd9b4773.1703167505.git.michal.simek@amd.com Signed-off-by: Greg Kroah-Hartman commit 83e571f054cd742eb9a46d46ef05193904adf53f Author: Stefan Wahren Date: Wed Dec 20 12:43:34 2023 +0100 serial: 8250_bcm2835aux: Restore clock error handling The commit fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support") dropped the error handling for clock acquiring. But even an optional clock needs this. Fixes: fcc446c8aa63 ("serial: 8250_bcm2835aux: Add ACPI support") Cc: stable Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20231220114334.4712-1-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit aba8290f368d965d49c929a283b3bf41783d3ada Author: Rengarajan S Date: Fri Dec 15 20:41:22 2023 +0530 8250: microchip: pci1xxxx: Add Burst mode reception support in uart driver for writing into FIFO In PCI1XXXX C0 endpoint, support for Burst mode is added. pci1xxxx_handle_irq checks the burst status and based on that incoming characters are received in DWORDs, RX handling is done in pci1xxxx_rx_burst. While reading the burst status the RX error is checked and the corresponding error statistics are updated. Signed-off-by: Rengarajan S Link: https://lore.kernel.org/r/20231215151123.41812-4-rengarajan.s@microchip.com Signed-off-by: Greg Kroah-Hartman commit b7fbca372bb6247990e2419c09fe6064d107542d Author: Rengarajan S Date: Fri Dec 15 20:41:21 2023 +0530 8250: microchip: pci1xxxx: Add Syslock support for reading UART system registers Different Host drivers can attempt to access system registers simultaneously from different memory spaces at the same time. The syslock mechanism provides a safe option for reading UART system registers and prevents conflicts by serializing access. Added three padding bytes in the structure for memory alignment. Signed-off-by: Rengarajan S Link: https://lore.kernel.org/r/20231215151123.41812-3-rengarajan.s@microchip.com Signed-off-by: Greg Kroah-Hartman commit e0ae1431dfb6899836f5689225ac464394570b18 Author: Rengarajan S Date: Fri Dec 15 20:41:20 2023 +0530 8250: microchip: pci1xxxx: Rearranging the structure declarations Structure declarations in 8250_pci1xxxx.c have been moved above the functions for code readability. Signed-off-by: Rengarajan S Link: https://lore.kernel.org/r/20231215151123.41812-2-rengarajan.s@microchip.com Signed-off-by: Greg Kroah-Hartman commit 8c9aa6e1877de041e393b42a88e0cfd54627b3f7 Author: Raag Jadav Date: Tue Jan 2 11:20:06 2024 +0530 serial: 8250_lpss: copy dma_param using devm_kmemdup() Use devm_kmemdup() helper to copy dma_param instead of doing it manually. Signed-off-by: Raag Jadav Reviewed-by: Ilpo Järvinen Reviewed-by: Mika Westerberg Link: https://lore.kernel.org/r/20240102055006.27256-1-raag.jadav@intel.com Signed-off-by: Greg Kroah-Hartman commit 9903f2f2e1c0306df5e35080552502659475e751 Author: Crescent CY Hsieh Date: Tue Jan 2 13:31:33 2024 +0800 tty: serial: 8250: Set RS232 as default for Moxa PCIe board initialization After switching the serial interface of the Moxa RS232 PCIe boards, it fails to reset to RS232 when attempting to reload 8250_pci driver. This patch set RS232 as the default setting during the initialization of Moxa PCIe board. Signed-off-by: Crescent CY Hsieh Link: https://lore.kernel.org/r/20240102053133.9795-1-crescentcy.hsieh@moxa.com Signed-off-by: Greg Kroah-Hartman commit d8a02844791360ed156ce5935bc50754ea22e299 Author: Vamshi Gajjela Date: Sun Dec 31 23:59:51 2023 +0530 serial: 8250_dw: Do not bailout on UCV read returning zero Designware UART has optional feature FIFO_MODE to implement FIFO. Encoding FIFO capabilities through Component Parameter Register CPR is optional and it can be enabled using parameter UART_ADD_ENCODED_PARAMS. Driver can exercise fifo capabilities by decoding CPR if implemented or from cpr_val provided from the dw8250_platform_data otherwise. dw8250_setup_port() checks for CPR or cpr_val to determine FIFO size only when Component Version (UCV) is non-zero. Bailing out early on UCV read returning zero will leave fifosize as zero and !UART_CAP_FIFO, hence prevent early return and continue to process CPR or cpr_val for the driver to utilize FIFO. Non-zero UCV implies ADDITIONAL_FEATURES=1, preventing early return will not be an overhead here. Signed-off-by: Vamshi Gajjela Link: https://lore.kernel.org/r/20231231182951.877805-1-vamshigajjela@google.com Signed-off-by: Greg Kroah-Hartman commit 7c45eaa813476bd195ac1227a64b52f9cf2e2030 Author: Christoph Niedermaier Date: Tue Dec 26 12:36:47 2023 +0100 serial: imx: Ensure that imx_uart_rs485_config() is called with enabled clock There are register accesses in the function imx_uart_rs485_config(). The clock must be enabled for these accesses. This was ensured by calling it via the function uart_rs485_config() in the probe() function within the range where the clock is enabled. With the commit 7c7f9bc986e6 ("serial: Deassert Transmit Enable on probe in driver-specific way") it was removed from the probe() function and is now only called through the function uart_add_one_port() which is located at the end of the probe() function. But the clock is already switched off in this area. To ensure that the clock is enabled during register access, move the disabling of the clock to the very end of the probe() function. To avoid leaking enabled clocks on error also add an error path for exiting with disabling the clock. Fixes: 7c7f9bc986e6 ("serial: Deassert Transmit Enable on probe in driver-specific way") Cc: stable Signed-off-by: Christoph Niedermaier Reviewed-by: Lukas Wunner Link: https://lore.kernel.org/r/20231226113647.39376-1-cniedermaier@dh-electronics.com Signed-off-by: Greg Kroah-Hartman commit c6dcd8050fb7c2efec6946ae9c49bc186b0a7475 Author: Sam Ravnborg Date: Tue Dec 26 13:16:07 2023 +0100 serial: apbuart: fix console prompt on qemu When using a leon kernel with qemu there where no console prompt. The root cause is the handling of the fifo size in the tx part of the apbuart driver. The qemu uart driver only have a very rudimentary status handling and do not report the number of chars queued in the tx fifo in the status register. So the driver ends up with a fifo size of 1. In the tx path the fifo size is divided by 2 - resulting in a fifo size of zero. The original implementation would always try to send one char, but after the introduction of uart_port_tx_limited() the fifo size is respected even for the first char. There seems to be no good reason to divide the fifo size with two - so remove this. It looks like something copied from the original amba driver. With qemu we now have a minimum fifo size of one char, so we show the prompt. Signed-off-by: Sam Ravnborg Fixes: d11cc8c3c4b6 ("tty: serial: use uart_port_tx_limited()") Cc: Andreas Larsson Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Cc: Link: https://lore.kernel.org/r/20231226121607.GA2622970@ravnborg.org Signed-off-by: Greg Kroah-Hartman commit 788aeef392d27545ae99af2875068a9dd0531d5f Author: Michael Trimarchi Date: Sun Dec 24 14:12:00 2023 +0100 tty: serial: kgdboc: Fix 8250_* kgdb over serial Check if port type is not PORT_UNKNOWN during poll_init. The kgdboc calls the tty_find_polling_driver that check if the serial is able to use poll_init. The poll_init calls the uart uart_poll_init that try to configure the uart with the selected boot parameters. The uart must be ready before setting parameters. Seems that PORT_UNKNOWN is already used by other functions in serial_core to detect uart status, so use the same to avoid to use it in invalid state. The crash happen for instance in am62x architecture where the 8250 register the platform driver after the 8250 core is initialized. Follow the report crash coming from KGDB Thread 2 received signal SIGSEGV, Segmentation fault. [Switching to Thread 1] _outb (addr=, value=) at ./include/asm-generic/io.h:584 584 __raw_writeb(value, PCI_IOBASE + addr); (gdb) bt This section of the code is too early because in this case the omap serial is not probed Thread 2 received signal SIGSEGV, Segmentation fault. [Switching to Thread 1] _outb (addr=, value=) at ./include/asm-generic/io.h:584 584 __raw_writeb(value, PCI_IOBASE + addr); (gdb) bt Thread 2 received signal SIGSEGV, Segmentation fault. [Switching to Thread 1] _outb (addr=, value=) at ./include/asm-generic/io.h:584 584 __raw_writeb(value, PCI_IOBASE + addr); (gdb) bt 0 _outb (addr=, value=) at ./include/asm-generic/io.h:584 1 logic_outb (value=0 '\000', addr=18446739675637874689) at lib/logic_pio.c:299 2 0xffff80008082dfcc in io_serial_out (p=0x0, offset=16760830, value=0) at drivers/tty/serial/8250/8250_port.c:416 3 0xffff80008082fe34 in serial_port_out (value=, offset=, up=) at ./include/linux/serial_core.h:677 4 serial8250_do_set_termios (port=0xffff8000828ee940 , termios=0xffff80008292b93c, old=0x0) at drivers/tty/serial/8250/8250_port.c:2860 5 0xffff800080830064 in serial8250_set_termios (port=0xfffffbfffe800000, termios=0xffbffe, old=0x0) at drivers/tty/serial/8250/8250_port.c:2912 6 0xffff80008082571c in uart_set_options (port=0xffff8000828ee940 , co=0x0, baud=115200, parity=110, bits=8, flow=110) at drivers/tty/serial/serial_core.c:2285 7 0xffff800080828434 in uart_poll_init (driver=0xfffffbfffe800000, line=16760830, options=0xffff8000828f7506 "115200n8") at drivers/tty/serial/serial_core.c:2656 8 0xffff800080801690 in tty_find_polling_driver (name=0xffff8000828f7500 "ttyS2,115200n8", line=0xffff80008292ba90) at drivers/tty/tty_io.c:410 9 0xffff80008086c0b0 in configure_kgdboc () at drivers/tty/serial/kgdboc.c:194 10 0xffff80008086c1ec in kgdboc_probe (pdev=0xfffffbfffe800000) at drivers/tty/serial/kgdboc.c:249 11 0xffff8000808b399c in platform_probe (_dev=0xffff000000ebb810) at drivers/base/platform.c:1404 12 0xffff8000808b0b44 in call_driver_probe (drv=, dev=) at drivers/base/dd.c:579 13 really_probe (dev=0xffff000000ebb810, drv=0xffff80008277f138 ) at drivers/base/dd.c:658 14 0xffff8000808b0d2c in __driver_probe_device (drv=0xffff80008277f138 , dev=0xffff000000ebb810) at drivers/base/dd.c:800 15 0xffff8000808b0eb8 in driver_probe_device (drv=0xfffffbfffe800000, dev=0xffff000000ebb810) at drivers/base/dd.c:830 16 0xffff8000808b0ff4 in __device_attach_driver (drv=0xffff80008277f138 , _data=0xffff80008292bc48) at drivers/base/dd.c:958 17 0xffff8000808ae970 in bus_for_each_drv (bus=0xfffffbfffe800000, start=0x0, data=0xffff80008292bc48, fn=0xffff8000808b0f3c <__device_attach_driver>) at drivers/base/bus.c:457 18 0xffff8000808b1408 in __device_attach (dev=0xffff000000ebb810, allow_async=true) at drivers/base/dd.c:1030 19 0xffff8000808b16d8 in device_initial_probe (dev=0xfffffbfffe800000) at drivers/base/dd.c:1079 20 0xffff8000808af9f4 in bus_probe_device (dev=0xffff000000ebb810) at drivers/base/bus.c:532 21 0xffff8000808ac77c in device_add (dev=0xfffffbfffe800000) at drivers/base/core.c:3625 22 0xffff8000808b3428 in platform_device_add (pdev=0xffff000000ebb800) at drivers/base/platform.c:716 23 0xffff800081b5dc0c in init_kgdboc () at drivers/tty/serial/kgdboc.c:292 24 0xffff800080014db0 in do_one_initcall (fn=0xffff800081b5dba4 ) at init/main.c:1236 25 0xffff800081b0114c in do_initcall_level (command_line=, level=) at init/main.c:1298 26 do_initcalls () at init/main.c:1314 27 do_basic_setup () at init/main.c:1333 28 kernel_init_freeable () at init/main.c:1551 29 0xffff8000810271ec in kernel_init (unused=0xfffffbfffe800000) at init/main.c:1441 30 0xffff800080015e80 in ret_from_fork () at arch/arm64/kernel/entry.S:857 Reviewed-by: Douglas Anderson Signed-off-by: Michael Trimarchi Link: https://lore.kernel.org/r/20231224131200.266224-1-michael@amarulasolutions.com Signed-off-by: Greg Kroah-Hartman commit 3e189470cad27d41a3a9dc02649f965b7ed1c90f Author: Christoph Niedermaier Date: Sun Dec 24 10:32:09 2023 +0100 serial: imx: Correct clock error message in function probe() Correct the clock error message by changing the clock name. Fixes: 1e512d45332b ("serial: imx: add error messages when .probe fails") Signed-off-by: Christoph Niedermaier Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231224093209.2612-1-cniedermaier@dh-electronics.com Signed-off-by: Greg Kroah-Hartman commit f0635480462f3fd03953b2af2ea8d3229e2a7e08 Author: Antony Pavlov Date: Sun Dec 17 22:56:01 2023 +0300 tty/serial: altera_uart: use more informative labels in /proc/interrupts Prior to this patch: ~# cat /proc/interrupts ... 40: 123 0 GIC-0 72 Level altera_uart 41: 9 0 GIC-0 73 Level altera_uart After this patch: ~# cat /proc/interrupts ... 40: 6 0 GIC-0 72 Level ff200100.fpga-uart0 41: 28 0 GIC-0 73 Level ff200200.fpga-uart1 Signed-off-by: Antony Pavlov Acked-by: Tobias Klauser Link: https://lore.kernel.org/r/20231217195601.236002-1-antonynpavlov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6056f20f27e99fb67582f299468328505f130e36 Author: Crescent CY Hsieh Date: Fri Dec 1 15:15:54 2023 +0800 tty: serial: Add RS422 flag to struct serial_rs485 Add "SER_RS485_MODE_RS422" flag to struct serial_rs485, so that serial port can switch interface into RS422 if supported by using ioctl command "TIOCSRS485". By treating RS422 as a mode of RS485, which means while enabling RS422 there are two flags need to be set (SER_RS485_ENABLED and SER_RS485_MODE_RS422), it would make things much easier. For example some places that checks for "SER_RS485_ENABLED" won't need to be rewritten. Signed-off-by: Crescent CY Hsieh Link: https://lore.kernel.org/r/20231201071554.258607-3-crescentcy.hsieh@moxa.com Signed-off-by: Greg Kroah-Hartman commit 76ac8e29855b06331d77a1d237a28ce97ac67a38 Author: Crescent CY Hsieh Date: Fri Dec 1 15:15:53 2023 +0800 tty: serial: Cleanup the bit shift with macro This patch replaces the bit shift code with "_BITUL()" macro inside "serial_rs485" struct. Signed-off-by: Crescent CY Hsieh Link: https://lore.kernel.org/r/20231201071554.258607-2-crescentcy.hsieh@moxa.com Signed-off-by: Greg Kroah-Hartman commit d4303e0b9f51b9dc97bd682332a1e2ded919bedc Author: Vamshi Gajjela Date: Thu Nov 9 12:04:17 2023 +0530 serial: core: Clean up uart_update_timeout() function Rename the variable size to temp and change its data type from unsigned int to u64 to avoid type casting in multiplication. Remove the intermediate variable frame_time and use temp instead to accommodate the nanoseconds(ns). port->frame_time is an unsigned int, therefore an explicit cast is used to improve readability. Having said this unsigned int is sufficinet to hold frame time duration in nanoseconds for all the standard baudrates. Consider 9600 baud, it takes 1/9600 seconds for one bit, for a total of 10 bits (start, 8-bit data, stop) 10/9600=1.04 ms for 1 byte transfer, frame_time here is 1041667ns. As baudrate increases frame_time decreases, say for 115200 baud it is 86806ns. To avoid costly 64-bit arithmetic we do not upconvert the type for variable frame_time as overflow happens for extremely low baudrates which are impractical and are not used in real-world applications. Signed-off-by: Vamshi Gajjela Link: https://lore.kernel.org/r/20231109063417.3971005-3-vamshigajjela@google.com Signed-off-by: Greg Kroah-Hartman commit cb86a3383aa7b9bb891daca691e596f6bfe52d82 Author: Vamshi Gajjela Date: Thu Nov 9 12:04:16 2023 +0530 serial: core: Update uart_poll_timeout() function to return unsigned long The function uart_fifo_timeout() returns an unsigned long value, which is the number of jiffies. Therefore, change the variable timeout in the function uart_poll_timeout() from int to unsigned long. Change the return type of the function uart_poll_timeout() from int to unsigned long to be consistent with the type of timeout values. Signed-off-by: Vamshi Gajjela Link: https://lore.kernel.org/r/20231109063417.3971005-2-vamshigajjela@google.com Signed-off-by: Greg Kroah-Hartman commit 79c58ab241bea76c197d09091eb85b753d5d4416 Author: Wesley Cheng Date: Tue Jan 2 13:45:23 2024 -0800 dt-bindings: usb: dwc3: Limit num-hc-interrupters definition Ensure that the number of XHCI secondary interrupters defined for a DWC3 based implementation is limited to 8. XHCI in general can potentially support up to 1024 interrupters. Reviewed-by: Rob Herring Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20240102214549.22498-16-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit b1541a80414d13b1da9b528b09e68a4a518ae8fe Author: Wesley Cheng Date: Tue Jan 2 13:45:22 2024 -0800 dt-bindings: usb: xhci: Add num-hc-interrupters definition Add the definition for how many interrupts the XHCI host controller should allocate. XHCI can potentially support up to 1024 interrupters, which implementations may want to limit. Reviewed-by: Rob Herring Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20240102214549.22498-15-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit c99b38c412343053e9af187e595793c8805bb9b8 Author: Mathias Nyman Date: Tue Jan 2 13:45:09 2024 -0800 xhci: add support to allocate several interrupters Modify the XHCI drivers to accommodate for handling multiple event rings in case there are multiple interrupters. Add the required APIs so clients are able to allocate/request for an interrupter ring, and pass this information back to the client driver. This allows for users to handle the resource accordingly, such as passing the event ring base address to an audio DSP. There is no actual support for multiple MSI/MSI-X vectors. [export xhci_initialize_ring_info() -wcheng] Signed-off-by: Mathias Nyman Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20240102214549.22498-2-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 49a78b05d5ca1e23fd737747a8757b8bdc319b30 Author: Yajun Deng Date: Thu Jan 4 11:28:22 2024 +0800 USB: core: Use device_driver directly in struct usb_driver and usb_device_driver There is usbdrv_wrap in struct usb_driver and usb_device_driver, it contains device_driver and for_devices. for_devices is used to distinguish between device drivers and interface drivers. Like the is_usb_device(), it tests the type of the device. We can test that if the probe of device_driver is equal to usb_probe_device in is_usb_device_driver(), and then the struct usbdrv_wrap is no longer needed. Clean up struct usbdrv_wrap, use device_driver directly in struct usb_driver and usb_device_driver. This makes the code cleaner. Signed-off-by: Yajun Deng Acked-by: Alan Stern Link: https://lore.kernel.org/r/20240104032822.1896596-1-yajun.deng@linux.dev Signed-off-by: Greg Kroah-Hartman commit 33d4137d57997476404bc968fcc5b2ed5639a22f Author: Chunfeng Yun Date: Thu Jan 4 14:16:40 2024 +0800 arm64: dts: mediatek: mt8195: Add 'rx-fifo-depth' for cherry Add the quirk property "rx-fifo-depth" to work around Gen1 isoc-in transfer issue which send out unexpected ACK even after device already finished the burst transfer with a short patcket, specially for a 4K camera device. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20240104061640.7335-3-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 017dbfc05c31284150819890b4cc86a699cbdb71 Author: Chunfeng Yun Date: Thu Jan 4 14:16:39 2024 +0800 usb: xhci-mtk: fix a short packet issue of gen1 isoc-in transfer For Gen1 isoc-in transfer, host still send out unexpected ACK after device finish the burst with a short packet, this will cause an exception on the connected device, such as, a usb 4k camera. It can be fixed by setting rxfifo depth less than 4k bytes, prefer to use 3k here, the side-effect is that may cause performance drop about 10%, including bulk transfer. Fixes: 926d60ae64a6 ("usb: xhci-mtk: modify the SOF/ITP interval for mt8195") Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20240104061640.7335-2-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 223b4ef5a3b75c4500facf07f99a925232eaf113 Author: Chunfeng Yun Date: Thu Jan 4 14:16:38 2024 +0800 dt-bindings: usb: mtk-xhci: add a property for Gen1 isoc-in transfer issue For Gen1 isoc-in endpoint on controller before about SSUSB IPM v1.6.0, it still send out unexpected ACK after receiving a short packet in burst transfer, this will cause an exception on connected device, specially for a 4k camera. Add a quirk property "rx-fifo-depth" to work around this hardware issue, prefer to use 3k bytes; The side-effect is that it may cause performance drop about 10%, including bulk transfer. Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20240104061640.7335-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 3eee5b4085e223339cfcadadc4aab6199c1f09ec Author: Konrad Dybcio Date: Wed Jan 3 21:15:39 2024 +0100 arm64: dts: qcom: msm8996: Remove PNoC clock from MSS The PNoC clock is a clock for the entire PNoC bus, managed from within the interconnect driver. Attaching it to MSS was a total hack. Get rid of it and take the liberty to make the clock-names entries more readable. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230721-topic-rpm_clk_cleanup-v3-9-a66e698932e3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 30d2641df650e38aa5f8687a666bac036bc204dd Author: Konrad Dybcio Date: Wed Jan 3 21:15:38 2024 +0100 arm64: dts: qcom: msm8996: Remove AGGRE2 clock from SLPI The AGGRE2 clock is a clock for the entire AGGRE2 bus, managed from within the interconnect driver. Attaching it to SLPI was a total hack. Get rid of it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230721-topic-rpm_clk_cleanup-v3-8-a66e698932e3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8ee8587fdcac12c8c73d1e8797b2eb9abe5cdf18 Author: Konrad Dybcio Date: Wed Jan 3 21:15:37 2024 +0100 arm64: dts: qcom: msm8998: Remove AGGRE2 clock from SLPI The AGGRE2 clock is a clock for the entire AGGRE2 bus, managed from within the interconnect driver. Attaching it to SLPI was a total hack. Get rid of it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230721-topic-rpm_clk_cleanup-v3-7-a66e698932e3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 09ee216d0b9f63f44fa59651a9e7403c8fd05ea8 Author: Konrad Dybcio Date: Wed Jan 3 21:15:36 2024 +0100 arm64: dts: qcom: msm8939: Drop RPM bus clocks Some nodes are abusingly referencing some of the internal bus clocks, that were recently removed in Linux (because the original implementation did not make much sense), managing them as if they were the only devices on an NoC bus. These clocks are now handled from within the icc framework and are no longer registered from within the CCF. Remove them. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230721-topic-rpm_clk_cleanup-v3-6-a66e698932e3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 283730be6bbb7ec6a45ba6b9c7db5feeaad93f63 Author: Konrad Dybcio Date: Wed Jan 3 21:15:35 2024 +0100 arm64: dts: qcom: sdm630: Drop RPM bus clocks Some nodes are abusingly referencing some of the internal bus clocks, that were recently removed in Linux (because the original implementation did not make much sense), managing them as if they were the only devices on an NoC bus. These clocks are now handled from within the icc framework and are no longer registered from within the CCF. Remove them. Reviewed-by: Marijn Suijten Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230721-topic-rpm_clk_cleanup-v3-5-a66e698932e3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 437afcefdbec8972598f6a029a7ed4cb8f52dfd0 Author: Konrad Dybcio Date: Wed Jan 3 21:15:34 2024 +0100 arm64: dts: qcom: qcs404: Drop RPM bus clocks Some nodes are abusingly referencing some of the internal bus clocks, that were recently removed in Linux (because the original implementation did not make much sense), managing them as if they were the only devices on an NoC bus. These clocks are now handled from within the icc framework and are no longer registered from within the CCF. Remove them. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230721-topic-rpm_clk_cleanup-v3-4-a66e698932e3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 19f837ae4e4ac4ebdec861038bffff9781100a9a Author: Konrad Dybcio Date: Wed Jan 3 21:15:33 2024 +0100 arm64: dts: qcom: msm8996: Drop RPM bus clocks Some nodes are abusingly referencing some of the internal bus clocks, that were recently removed in Linux (because the original implementation did not make much sense), managing them as if they were the only devices on an NoC bus. These clocks are now handled from within the icc framework and are no longer registered from within the CCF. Remove them. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230721-topic-rpm_clk_cleanup-v3-3-a66e698932e3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 51b6148026f043cd3ec222dbe5efa82103a3e3c9 Author: Konrad Dybcio Date: Wed Jan 3 21:15:32 2024 +0100 arm64: dts: qcom: msm8916: Drop RPM bus clocks Some nodes are abusingly referencing some of the internal bus clocks, that were recently removed in Linux (because the original implementation did not make much sense), managing them as if they were the only devices on an NoC bus. These clocks are now handled from within the icc framework and are no longer registered from within the CCF. Remove them. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230721-topic-rpm_clk_cleanup-v3-2-a66e698932e3@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7db25e95589e7a8871de2c5dad88eba5f432e2dd Author: Konrad Dybcio Date: Wed Jan 3 21:15:31 2024 +0100 dt-bindings: usb: qcom,dwc3: Fix SDM660 clock description SDM660 was abusingly referencing one of the internal bus clocks, that were recently dropped from Linux (because the original implementation did not make much sense), circumventing the interconnect framework. Drop it. Signed-off-by: Konrad Dybcio Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230721-topic-rpm_clk_cleanup-v3-1-a66e698932e3@linaro.org Signed-off-by: Greg Kroah-Hartman commit aefdcd89d72bd92e68fe0a8182ed98b4a6b91efa Author: Krishna Kurapati Date: Wed Dec 27 14:49:51 2023 +0530 usb: dwc3: qcom: Rename hs_phy_irq to qusb2_phy_irq For wakeup to work, driver needs to enable interrupts that depict what is happening on the DP/DM lines. On QUSB targets, this is identified by qusb2_phy whereas on SoCs using Femto PHY, separate {dp,dm}_hs_phy_irq's are used instead. The implementation incorrectly names qusb2_phy interrupts as "hs_phy_irq". Clean this up so that driver would be using only qusb2/(dp & dm) for wakeup purposes. For devices running older kernels, this won't break any functionality because the interrupt configurations in QUSB2 PHY based SoCs is done by configuring QUSB2PHY_INTR_CTRL register in PHY address space and it was never armed properly right from the start. Signed-off-by: Krishna Kurapati Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20231227091951.685-3-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 53c6d854be4e93fa21b80bd40e3a666c3961e82c Author: Krishna Kurapati Date: Wed Dec 27 14:49:50 2023 +0530 dt-bindings: usb: dwc3: Clean up hs_phy_irq in binding The high speed related interrupts present on QC targets are as follows: 1. dp/dm irq's These IRQ's directly reflect changes on the DP/DM pads of the SoC. These are used as wakeup interrupts only on SoCs with non-QUSB2 targets with exception of SDM670/SDM845/SM6350. 2. qusb2_phy irq SoCs with QUSB2 PHY do not have separate DP/DM IRQs and expose only a single IRQ whose behavior can be modified by the QUSB2PHY_INTR_CTRL register. The required DPSE/DMSE configuration is done in QUSB2PHY_INTR_CTRL register of phy address space. 3. hs_phy_irq This is completely different from the above two and is present on all targets with exception of a few IPQ ones. The interrupt is not enabled by default and its functionality is mutually exclusive of qusb2_phy on QUSB targets and DP/DM on femto phy targets. The DTs of several QUSB2 PHY based SoCs incorrectly define "hs_phy_irq" when they should have been "qusb2_phy_irq". On Femto phy targets, the "hs_phy_irq" mentioned is either the actual "hs_phy_irq" or "pwr_event", neither of which would never be triggered directly are non-functional currently. The implementation tries to clean up this issue by addressing the discrepencies involved and fixing the hs_phy_irq's in respective DT's. Classify SoC's into four groups based on whether qusb2_phy interrupt or {dp/dm}_hs_phy_irq is used for wakeup in high speed and whether the SoCs have hs_phy_irq present in them or not. The ss_phy_irq is optional interrupt because there are mutliple SoC's which either support only High Speed or there are multiple controllers within same Soc and the secondary controller is High Speed only capable. This breaks ABI on targets running older kernels, but since the interrupt definitions are given wrong on many targets and to establish proper rules for usage of DWC3 interrupts on Qualcomm platforms, DT binding update is necessary. The bindings put pwr_event as the first interrupt and ss_phy as the last. Since all SoCs have the pwr_event (HS) interrupt, but not all controllers have the SS PHY interrupt, this would prevent, to some extent, expressing that the SS PHY is optional by keeping it last in the binding schema and making sure that minItems = maxItems - 1. No new targets have been added to schema. Only the existing ones have been re-ordered. Signed-off-by: Krishna Kurapati Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231227091951.685-2-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 76c945730cdffb572c7767073cc6515fd3f646b4 Author: Richard Acayan Date: Mon Dec 18 11:45:33 2023 -0500 usb: gadget: u_ether: Re-attach netif device to mirror detachment In 6.7-rc1, there was a netif_device_detach call added to the gether_disconnect function. This clears the __LINK_STATE_PRESENT bit of the netif device and suppresses pings (ICMP messages) and TCP connection requests from the connected host. If userspace temporarily disconnects the gadget, such as by temporarily removing configuration in the gadget configfs interface, network activity should continue to be processed when the gadget is re-connected. Mirror the netif_device_detach call with a netif_device_attach call in gether_connect to fix re-connecting gadgets. Link: https://gitlab.com/postmarketOS/pmaports/-/tree/6002e51b7090aeeb42947e0ca7ec22278d7227d0/main/postmarketos-base-ui/rootfs-usr-lib-NetworkManager-dispatcher.d-50-tethering.sh Cc: stable Fixes: f49449fbc21e ("usb: gadget: u_ether: Replace netif_stop_queue with netif_device_detach") Signed-off-by: Richard Acayan Tested-by: Luca Weiss Tested-by: Duje Mihanović Link: https://lore.kernel.org/r/20231218164532.411125-2-mailingradian@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3c7af52c7616c3aa6dacd2336ec748d4a65df8f4 Author: Wesley Cheng Date: Wed Jan 3 13:49:46 2024 -0800 usb: dwc3: gadget: Queue PM runtime idle on disconnect event There is a scenario where DWC3 runtime suspend is blocked due to the dwc->connected flag still being true while PM usage_count is zero after DWC3 giveback is completed and the USB gadget session is being terminated. This leads to a case where nothing schedules a PM runtime idle for the device. The exact condition is seen with the following sequence: 1. USB bus reset is issued by the host 2. Shortly after, or concurrently, a USB PD DR SWAP request is received (sink->source) 3. USB bus reset event handler runs and issues dwc3_stop_active_transfers(), and pending transfer are stopped 4. DWC3 usage_count decremented to 0, and runtime idle occurs while dwc->connected == true, returns -EBUSY 5. DWC3 disconnect event seen, dwc->connected set to false due to DR swap handling 6. No runtime idle after this point Address this by issuing an asynchronous PM runtime idle call after the disconnect event is completed, as it modifies the dwc->connected flag, which is what blocks the initial runtime idle. Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM") Cc: Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20240103214946.2596-1-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit ff2b89de471da942a4d853443688113a44fd35ed Author: Xu Yang Date: Thu Dec 28 19:07:53 2023 +0800 usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host() When CONFIG_USB_OTG is not set, mxs_phy_is_otg_host() will always return false. This behaviour is wrong. Since phy.last_event will always be set for either host or device mode. Therefore, CONFIG_USB_OTG condition can be removed. Fixes: 5eda42aebb76 ("usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()") cc: Acked-by: Peter Chen Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20231228110753.1755756-3-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 128d849074d05545becf86e713715ce7676fc074 Author: Xu Yang Date: Thu Dec 28 19:07:52 2023 +0800 usb: chipidea: wait controller resume finished for wakeup irq After the chipidea driver introduce extcon for id and vbus, it's able to wakeup from another irq source, in case the system with extcon ID cable, wakeup from usb ID cable and device removal, the usb device disconnect irq may come firstly before the extcon notifier while system resume, so we will get 2 "wakeup" irq, one for usb device disconnect; and one for extcon ID cable change(real wakeup event), current driver treat them as 2 successive wakeup irq so can't handle it correctly, then finally the usb irq can't be enabled. This patch adds a check to bypass further usb events before controller resume finished to fix it. Fixes: 1f874edcb731 ("usb: chipidea: add runtime power management support") cc: Acked-by: Peter Chen Signed-off-by: Xu Yang Signed-off-by: Li Jun Link: https://lore.kernel.org/r/20231228110753.1755756-2-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 5dbe9ac28355fd8f4a7c4732e1e2b7db4fb9f405 Author: Xu Yang Date: Thu Dec 28 19:07:51 2023 +0800 usb: chipidea: ci_hdrc_imx: add wakeup clock and keep it always on Some platform using ChipIdea IP may keep 32KHz wakeup clock always on without usb driver intervention. And some may need driver to handle this clock. For now only i.MX93 needs this wakeup clock. This patch will get wakeup clock and keep it always on to make controller work properly. Signed-off-by: Xu Yang Acked-by: Peter Chen Tested-by: Stefan Wahren Link: https://lore.kernel.org/r/20231228110753.1755756-1-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman commit 895ee5aefb7e24203de5dffae7ce9a02d78fa3d1 Author: Frank Li Date: Sun Dec 24 10:38:16 2023 -0500 Revert "usb: gadget: f_uvc: change endpoint allocation in uvc_function_bind()" This reverts commit 3c5b006f3ee800b4bd9ed37b3a8f271b8560126e. gadget_is_{super|dual}speed() API check UDC controller capitblity. It should pass down highest speed endpoint descriptor to UDC controller. So UDC controller driver can reserve enough resource at check_config(), especially mult and maxburst. So UDC driver (such as cdns3) can know need at least (mult + 1) * (maxburst + 1) * wMaxPacketSize internal memory for this uvc functions. Cc: Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231224153816.1664687-5-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 40c304109e866a7dc123661a5c8ca72f6b5e14e0 Author: Frank Li Date: Sun Dec 24 10:38:15 2023 -0500 usb: cdns3: Fix uvc fail when DMA cross 4k boundery since sg enabled Supposed DMA cross 4k bounder problem should be fixed at DEV_VER_V2, but still met problem when do ISO transfer if sg enabled. Data pattern likes below when sg enabled, package size is 1k and mult is 2 [UVC Header(8B) ] [data(3k - 8)] ... The received data at offset 0xd000 will get 0xc000 data, len 0x70. Error happen position as below pattern: 0xd000: wrong 0xe000: wrong 0xf000: correct 0x10000: wrong 0x11000: wrong 0x12000: correct ... To avoid DMA cross 4k bounder at ISO transfer, reduce burst len according to start DMA address's alignment. Cc: Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231224153816.1664687-4-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 92f02efa1d86d7dcaef7f38a5fe3396c4e88a93c Author: Frank Li Date: Sun Dec 24 10:38:14 2023 -0500 usb: cdns3: fix iso transfer error when mult is not zero ISO basic transfer is ITP(SOF) Package_0 Package_1 ... Package_n CDNS3 DMA start dma transfer from memmory to internal FIFO when get SOF, controller will transfer data to usb bus from internal FIFO when get IN token. According USB spec defination: Maximum number of packets = (bMaxBurst + 1) * (Mult + 1) Internal memory should be the same as (bMaxBurst + 1) * (Mult + 1). DMA don't fetch data advance when ISO transfer, so only reserve (bMaxBurst + 1) * (Mult + 1) internal memory for ISO transfer. Need save Mult and bMaxBurst information and set it into EP_CFG register, otherwise only 1 package is sent by controller, other package will be lost. Cc: Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231224153816.1664687-3-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 1b8be5ecff26201bafb0a554c74e91571299fb94 Author: Frank Li Date: Sun Dec 24 10:38:13 2023 -0500 usb: cdns3: fix uvc failure work since sg support enabled When IP version >= DEV_VER_V2, gadget:sg_supported is true. So uvc gadget function driver will use sg to equeue data, first is 8bytes header, the second is 1016bytes data. cdns3_prepare_trb: ep2in: trb 0000000000ac755f, dma buf: 0xbf455000, size: 8, burst: 128 ctrl: 0x00000415 (C=1, T=0, ISP, CHAIN, Normal) cdns3_prepare_trb: ep2in: trb 00000000a574e693, dma buf: 0xc0200fe0, size: 1016, burst: 128 ctrl: 0x00000405 (C=1, T=0, ISP, Normal) But cdns3_ep_run_transfer() can't correctly handle this case, which only support one TRB for ISO transfer. The controller requires duplicate the TD for each SOF if priv_ep->interval is not 1. DMA will read data from DDR to internal FIFO when get SOF. Send data to bus when receive IN token. DMA always refill FIFO when get SOF regardless host send IN token or not. If host send IN token later, some frames data will be lost. Fixed it by below major steps: 1. Calculate numembers of TRB base on sg_nums and priv_ep->interval. 2. Remove CHAIN flags for each end TRB of TD when duplicate TD. 3. The controller requires LINK TRB must be first TRB of TD. When check there are not enough TRBs lefts, just fill LINK TRB for left TRBs. .... CHAIN_TRB DATA_TRB, CHAIN_TRB DATA_TRB, LINK_TRB ... LINK_TRB ^End of TRB List Cc: Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231224153816.1664687-2-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 5382774515d4e192251fabfec41e8a15c1a5c23d Author: Jonathan Corbet Date: Fri Nov 10 15:17:46 2023 -0700 A reworked process/index.rst The process book is arguably the most important documentation we have; the top three trafficked pages on docs.kernel.org are found here. Make a beginning effort to impose a more useful organization on this page to ease developers into the community. Acked-by: Vegard Nossum Signed-off-by: Jonathan Corbet commit 1900daeefd3ebde61199649143085a2dfdebf55c Author: Krishna Kurapati Date: Thu Dec 21 21:02:16 2023 +0530 usb: gadget: ncm: Add support to update wMaxSegmentSize via configfs The max segment size is currently limited to the ethernet frame length of the kernel which happens to be 1514 at this point in time. However the NCM specification limits it to 64K for sixtenn bit NTB's. For peer to peer connections, increasing the segment size gives better throughput. Add support to configure this value before configfs symlink is created. Also since the NTB Out/In buffer sizes are fixed at 16384 bytes, limit the segment size to an upper cap of 8000 to allow at least a minimum of 2 MTU sized datagrams to be aggregated. Set the default MTU size for the ncm interface during function bind before network interface is registered allowing MTU to be set in parity with wMaxSegmentSize. Update gadget documentation describing the new configfs property. Signed-off-by: Krishna Kurapati Link: https://lore.kernel.org/r/20231221153216.18657-1-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 68c26fe58182f5af56bfa577d1cc0c949740baab Author: Frank Wang Date: Wed Dec 6 14:59:39 2023 +0800 usb: dwc3: set pm runtime active before resume common For device mode, if PM runtime autosuspend feature enabled, the runtime power status of dwc3 may be suspended when run dwc3_resume(), and dwc3 gadget would not be configured in dwc3_gadget_run_stop(). It would cause gadget connected failed if USB cable has been plugged before PM resume. So move forward pm_runtime_set_active() to fix it. Signed-off-by: Frank Wang Link: https://lore.kernel.org/r/20231206065939.16958-1-frank.wang@rock-chips.com Signed-off-by: Greg Kroah-Hartman commit 398aa9a7e77cf23c2a6f882ddd3dcd96f21771dc Author: Manan Aurora Date: Tue Oct 31 03:46:41 2023 +0000 usb: dwc3: Support EBC feature of DWC_usb31 Support configuration and use of bulk endpoints in the so-called EBC mode described in the DBC_usb31 databook (appendix E) Added a bit fifo_mode to usb_ep to indicate to the UDC driver that a specific endpoint is to operate in the EBC (or equivalent) mode when enabled Added macros for bits 15 and 14 of DEPCFG parameter 1 to indicate EBC mode and write back behaviour. These bits will be set to 1 when configuring an EBC endpoint as described in the programming guide Signed-off-by: Manan Aurora Link: https://lore.kernel.org/r/20231031034641.660606-1-maurora@google.com Signed-off-by: Greg Kroah-Hartman commit cd099cde4ed264403b434d8344994f97ac2a4349 Author: Kyle Tso Date: Sat Dec 16 18:46:30 2023 +0800 usb: typec: tcpm: Support multiple capabilities Refactor tcpm_fw_get_caps to support the multiple pd capabilities got from fwnode. For backward compatibility, the original single capability is still applicable. The fetched data is stored in the newly defined structure "pd_data" and there is an array "pd_list" to store the pointers to them. A dedicated array "pds" is used to store the handles of the registered usb_power_delivery instances. Also implement the .pd_get and .pd_set ops which are introduced in commit a7cff92f0635 ("usb: typec: USB Power Delivery helpers for ports and partners"). Once the .pd_set is called, the current capability will be updated and state machine will re-negotiate the power contract if possible. Signed-off-by: Kyle Tso Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231216104630.2720818-3-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 501b15207138e3cf85c8413fbbb746f6ee21b0a1 Author: Kyle Tso Date: Sat Dec 16 18:46:29 2023 +0800 dt-bindings: connector: Add child nodes for multiple PD capabilities Commit 662a60102c12 ("usb: typec: Separate USB Power Delivery from USB Type-C") allows userspace to configure the PD of a port by selecting different set of predefined PD capabilities. Define the PD capability sets in DT for better configurability in device modules. Define an optional child node "capabilities" to contain multiple USB Power Delivery capabilities. Define child nodes with pattern (e.g. caps-0, caps-1) under "capabilities". Each node contains PDO data of a selectable Power Delivery capability. Also define common properties for source-pdos, sink-pdos, and op-sink-microwatt that can be referenced. Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20231205030114.1349089-2-kyletso@google.com Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231216104630.2720818-2-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 6d6887c42e946f43bed2e64571a40c8476a1e4a9 Author: Yinbo Zhu Date: Thu Dec 28 15:11:13 2023 +0800 usb: xhci-plat: fix usb disconnect issue after s4 The xhci retaining bogus hardware states cause usb disconnect devices connected before hibernation(s4) and refer to the commit 'f3d478858be ("usb: ohci-platform: fix usb disconnect issue after s4")' which set flag "hibernated" as true when resume-from-hibernation and that the drivers will reset the hardware to get rid of any existing state and make sure resume from hibernation re-enumerates everything for xhci. Signed-off-by: Yinbo Zhu Link: https://lore.kernel.org/r/20231228071113.1719-1-zhuyinbo@loongson.cn Signed-off-by: Greg Kroah-Hartman commit 91736d0619eb4083f33ae737b9d9763fc6b196ed Author: Krishna Kurapati Date: Tue Dec 19 09:45:59 2023 +0530 usb: dwc3: core: set force_gen1 bit in USB31 devices if max speed is SS Currently for dwc3_usb31 controller, if maximum_speed is limited to super-speed in DT, then device mode is limited to SS, but host mode still works in SSP. The documentation for max-speed property is as follows: "Tells USB controllers we want to work up to a certain speed. Incase this isn't passed via DT, USB controllers should default to their maximum HW capability." It doesn't specify that the property is only for device mode. There are cases where we need to limit the host's maximum speed to SuperSpeed only. Use this property for host mode to contrain host's speed to SuperSpeed. Signed-off-by: Krishna Kurapati Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20231219041559.15789-1-quic_kriskura@quicinc.com Signed-off-by: Greg Kroah-Hartman commit e9d40b215e38480fd94c66b06d79045717a59e9c Author: Uttkarsh Aggarwal Date: Fri Dec 22 15:17:04 2023 +0530 usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart Current implementation blocks the running operations when Plug-out and Plug-In is performed continuously, process gets stuck in dwc3_thread_interrupt(). Code Flow: CPU1 ->Gadget_start ->dwc3_interrupt ->dwc3_thread_interrupt ->dwc3_process_event_buf ->dwc3_process_event_entry ->dwc3_endpoint_interrupt ->dwc3_ep0_interrupt ->dwc3_ep0_inspect_setup ->dwc3_ep0_stall_and_restart By this time if pending_list is not empty, it will get the next request on the given list and calls dwc3_gadget_giveback which will unmap request and call its complete() callback to notify upper layers that it has completed. Currently dwc3_gadget_giveback status is set to -ECONNRESET, whereas it should be -ESHUTDOWN based on condition if not dwc->connected is true. Cc: Fixes: d742220b3577 ("usb: dwc3: ep0: giveback requests on stall_and_restart") Signed-off-by: Uttkarsh Aggarwal Link: https://lore.kernel.org/r/20231222094704.20276-1-quic_uaggarwa@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 738ec5ab7acca7ee5856e36a5a6a0c41201fe88f Author: Kevin Hao Date: Mon Dec 18 15:47:30 2023 +0800 usb: ueagle-atm: Use wait_event_freezable_timeout() in uea_wait() A freezable kernel thread can enter frozen state during freezing by either calling try_to_freeze() or using wait_event_freezable() and its variants. So for the following snippet of code in a kernel thread loop: wait_event_interruptible_timeout(); try_to_freeze(); We can change it to a simple wait_event_freezable_timeout() and then eliminate a function call. Signed-off-by: Kevin Hao Link: https://lore.kernel.org/r/20231218074730.1898699-1-haokexin@gmail.com Signed-off-by: Greg Kroah-Hartman commit d271c4b406f75e27efd79fe132981e475db1dd7e Merge: 86fb59411553c 43833f2ba5ce1 Author: Christian Brauner Date: Thu Jan 4 15:40:34 2024 +0100 Merge tag 'netfs-lib-20240104' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull netfs updates from David Howells: A few follow-up fixes for the netfs work for this cycle. * tag 'netfs-lib-20240104' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: netfs: Fix proc/fs/fscache symlink to point to "netfs" not "../netfs" netfs: Rearrange netfs_io_subrequest to put request pointer first 9p: Use length of data written to the server in preference to error 9p: Do a couple of cleanups 9p: Fix initialisation of netfs_inode for 9p cachefiles: Fix __cachefiles_prepare_write() Signed-off-by: Christian Brauner commit 730e12fbec53ab59dd807d981a204258a4cfb29a Author: Wesley Cheng Date: Wed Dec 6 12:18:14 2023 -0800 usb: dwc3: gadget: Handle EP0 request dequeuing properly Current EP0 dequeue path will share the same as other EPs. However, there are some special considerations that need to be made for EP0 transfers: - EP0 transfers never transition into the started_list - EP0 only has one active request at a time In case there is a vendor specific control message for a function over USB FFS, then there is no guarantee on the timeline which the DATA/STATUS stage is responded to. While this occurs, any attempt to end transfers on non-control EPs will end up having the DWC3_EP_DELAY_STOP flag set, and defer issuing of the end transfer command. If the USB FFS application decides to timeout the control transfer, or if USB FFS AIO path exits, the USB FFS driver will issue a call to usb_ep_dequeue() for the ep0 request. In case of the AIO exit path, the AIO FS blocks until all pending USB requests utilizing the AIO path is completed. However, since the dequeue of ep0 req does not happen properly, all non-control EPs with the DWC3_EP_DELAY_STOP flag set will not be handled, and the AIO exit path will be stuck waiting for the USB FFS data endpoints to receive a completion callback. Fix is to utilize dwc3_ep0_reset_state() in the dequeue API to ensure EP0 is brought back to the SETUP state, and ensures that any deferred end transfer commands are handled. This also will end any active transfers on EP0, compared to the previous implementation which directly called giveback only. Fixes: fcd2def66392 ("usb: dwc3: gadget: Refactor dwc3_gadget_ep_dequeue") Cc: stable Signed-off-by: Wesley Cheng Acked-by: Thinh Nguyen Link: https://lore.kernel.org/r/20231206201814.32664-1-quic_wcheng@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 584f35a3647d42980af495fc0bc5c51eb174aa35 Author: Basavaraj Natikar Date: Wed Dec 20 12:30:42 2023 +0530 HID: amd_sfh: Add a new interface for exporting ALS data AMDSFH has information about the Ambient light via the Ambient Light Sensor (ALS) which is part of the AMD sensor fusion hub. Add a new interface to export this information, where other drivers like PMF can use this information to enhance user experiences. Link: https://lore.kernel.org/all/ad064333-48a4-4cfa-9428-69e8a7c44667@redhat.com/ Reviewed-by: Mario Limonciello Co-developed-by: Shyam Sundar S K Signed-off-by: Shyam Sundar S K Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit b5b0774d53bb81bddbf8c609b3f183d4af6e91da Author: Basavaraj Natikar Date: Wed Dec 20 12:30:41 2023 +0530 HID: amd_sfh: Add a new interface for exporting HPD data AMDSFH has information about the User presence information via the Human Presence Detection (HPD) sensor which is part of the AMD sensor fusion hub. Add a new interface to export this information, where other drivers like PMF can use this information to enhance user experiences. Link: https://lore.kernel.org/all/ad064333-48a4-4cfa-9428-69e8a7c44667@redhat.com/ Co-developed-by: Shyam Sundar S K Signed-off-by: Shyam Sundar S K Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit 4e71d262899d7bab1f0c65936a2e639afeb83e4d Author: Basavaraj Natikar Date: Wed Dec 20 12:30:40 2023 +0530 HID: amd_sfh: rename float_to_int() to amd_sfh_float_to_int() Current amd_sfh driver has float_to_int() to convert units from float to int. This is fine until this function gets called outside of the current scope of file. Add a prefix "amd_sfh" to float_to_int() so that function represents the driver name. This function will be called by multiple callers in the next patch. Link: https://lore.kernel.org/all/ad064333-48a4-4cfa-9428-69e8a7c44667@redhat.com/ Reviewed-by: Ilpo Järvinen Co-developed-by: Shyam Sundar S K Signed-off-by: Shyam Sundar S K Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit 2e9bf5cc912365d20e3255a0779f5516157b923e Author: Greg Kroah-Hartman Date: Tue Dec 19 19:33:06 2023 +0100 locomo: make locomo_bus_type constant and static Now that the driver core can properly handle constant struct bus_type, move the locomo_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. It's also never used outside of arch/arm/common/locomo.c so make it static and don't export it as no one is using it. Cc: Russell King Cc: Arnd Bergmann Cc: Uwe Kleine-König Cc: Randy Dunlap Cc: Acked-by: Uwe Kleine-König Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/2023121905-idiom-opossum-1ba3@gregkh Signed-off-by: Greg Kroah-Hartman commit 86438841e48f6361f0a6a04805b7d7813738761f Author: Greg Kroah-Hartman Date: Tue Dec 19 14:41:42 2023 +0100 dma-debug: make dma_debug_add_bus take a const pointer The driver core now can handle a const struct bus_type pointer, and the dma_debug_add_bus() call just passes on the pointer give to it to the driver core, so make this pointer const as well to allow everyone to use read-only struct bus_type pointers going forward. Cc: Christoph Hellwig Cc: Marek Szyprowski Cc: Robin Murphy Cc: Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/2023121941-dejected-nugget-681e@gregkh Signed-off-by: Greg Kroah-Hartman commit e76933a9bfa9b7f28a387f2e13cb3e689adc200d Author: Greg Kroah-Hartman Date: Tue Dec 19 15:06:19 2023 +0100 maple: make maple_bus_type static and const There is no need to export maple_bus_type as no one uses it outside of maple.c, so make it static, AND make it const as it can be read-only as no one modifies it. Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: Link: https://lore.kernel.org/r/2023121918-rejoicing-frostlike-d976@gregkh Signed-off-by: Greg Kroah-Hartman commit db2292b01b799e926abfdbd6fafa1f27f0d0e457 Author: Greg Kroah-Hartman Date: Tue Dec 19 15:07:23 2023 +0100 PM: clk: make pm_clk_add_notifier() take a const pointer The driver core wants to work with const struct bus_type, so there's no reason that pm_clk_add_notifier() should not also do the same thing, considering that it just passes the pointer off to the driver core which is expecting a const *. Cc: Rafael J. Wysocki Link: https://lore.kernel.org/r/2023121922-triumph-exploit-f545@gregkh Signed-off-by: Greg Kroah-Hartman commit 0a46c21c21c1f1c9a65e29eaae243d0f240bbd6b Author: Tree Davies Date: Mon Dec 25 12:23:14 2023 -0800 Staging: rtl8192e: Rename variable OpMode Rename variable OpMode to op_mode to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231225202314.31869-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 9cbaf63c14002dfc01145475b93474aa72d641ba Author: Tree Davies Date: Mon Dec 25 12:23:13 2023 -0800 Staging: rtl8192e: Rename variable bIsAggregateFrame Rename variable bIsAggregateFrame to is_aggregate_frame to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231225202314.31869-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 2d1f383244ed271efd019236b78523c403d19818 Author: Tree Davies Date: Mon Dec 25 12:23:12 2023 -0800 Staging: rtl8192e: Rename function rtllib_EnableNetMonitorMode() Rename function rtllib_EnableNetMonitorModeto to rtllib_enable_net_monitor_mode to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231225202314.31869-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 5fa882a8ad81b08d2366f6ebe82fcd50a4a582cf Author: Tree Davies Date: Mon Dec 25 12:23:11 2023 -0800 Staging: rtl8192e: Rename variable NumRxOkInPeriod Rename variable NumRxOkInPeriod to num_rx_ok_in_period to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231225202314.31869-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit a24e0197f343cc55024c9edd68c072d0363466b6 Author: Tree Davies Date: Mon Dec 25 12:23:10 2023 -0800 Staging: rtl8192e: Rename variable NumTxOkInPeriod Rename variable NumTxOkInPeriod to num_tx_ok_in_period to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231225202314.31869-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit d65a2fc00fc046117875507961e610fdc9001100 Author: Tree Davies Date: Mon Dec 25 12:23:09 2023 -0800 Staging: rtl8192e: Rename variable bUsed Rename variable bUsed to used to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231225202314.31869-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit f36be9ce8146faabdbbf74ee0499edb2039c53a5 Author: Greg Kroah-Hartman Date: Tue Dec 19 14:13:10 2023 +0100 EDAC: constantify the struct bus_type usage In many places in the edac code, struct bus_type pointers are passed around and then eventually sent to the driver core, which can handle a constant pointer. So constantify all of the edac usage of these as well because the data in them is never modified by the edac code either. Cc: Borislav Petkov Cc: Tony Luck Cc: James Morse Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Link: https://lore.kernel.org/r/2023121909-tribute-punctuate-4b22@gregkh Signed-off-by: Greg Kroah-Hartman commit fbfb131ef81ff0cb568196801de1a1fb46cfd592 Author: Piro Yang Date: Wed Dec 27 23:47:39 2023 +0800 staging: vme_user: print more detailed infomation when an error occurs when the slave_get function pointer belongs to the struct vme_bridge member is NULL, it prompts that the detailed function name "vme_slave_set" equivalent to __func__ not supported. it is similar to the vme_slave_get function: when vme_bridge->slave_set function pointer is NULL to print detailed function name by using __func__. Signed-off-by: Piro Yang Link: https://lore.kernel.org/r/20231227154739.6951-1-piroyangg@gmail.com Signed-off-by: Greg Kroah-Hartman commit 51088e5cc241178ccd6db2dd6d161dc8df32057d Author: Naresh Solanki Date: Thu Jan 4 15:43:15 2024 +0530 uapi: regulator: Fix typo Fix minor typo. Signed-off-by: Naresh Solanki Link: https://msgid.link/r/20240104101315.521301-1-naresh.solanki@9elements.com Signed-off-by: Mark Brown commit 43833f2ba5ce1543148a1b7cdd2513f5a663a17c Author: David Howells Date: Wed Jan 3 21:08:11 2024 +0000 netfs: Fix proc/fs/fscache symlink to point to "netfs" not "../netfs" Fix the proc/fs/fscache symlink to point to "netfs" not "../netfs". Reported-by: Marc Dionne Signed-off-by: David Howells cc: Jeff Layton cc: Christian Brauner cc: linux-fsdevel@vger.kernel.org cc: linux-cachefs@redhat.com commit 040a82be54c09a72162a3db2f5cd2ba289c0f224 Author: David Howells Date: Fri Oct 13 12:26:31 2023 +0100 netfs: Rearrange netfs_io_subrequest to put request pointer first Rearrange the netfs_io_subrequest struct to put the netfs_io_request pointer (rreq) first. This then allows netfs_io_subrequest to be put in a union with a pointer to a wrapper around netfs_io_request. This will be useful in the future for cifs and maybe ceph. Signed-off-by: David Howells cc: Steve French cc: Shyam Prasad N cc: Rohith Surabattula cc: Jeff Layton cc: linux-cifs@vger.kernel.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 252cf7b2eaf7cb904580ffbb0126d23411bcb43d Author: David Howells Date: Wed Jan 3 14:30:48 2024 +0000 9p: Use length of data written to the server in preference to error In v9fs_upload_to_server(), we pass the error to netfslib to terminate the subreq rather than the amount of data written - even if we did actually write something. Further, we assume that the write is always entirely done if successful - but it might have been partially complete - as returned by p9_client_write(), but we ignore that. Fix this by indicating the amount written by preference and only returning the error if we didn't write anything. (We might want to return both in future if both are available as this might be useful as to whether we retry or not.) Suggested-by: Dominique Martinet Link: https://lore.kernel.org/r/ZZULNQAZ0n0WQv7p@codewreck.org/ Signed-off-by: David Howells Acked-by: Dominique Martinet cc: Eric Van Hensbergen cc: Latchesar Ionkov cc: Christian Schoenebeck cc: v9fs@lists.linux.dev cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org commit 6c2c1e0009e97381a032d8c84747a46082fd327c Author: David Howells Date: Wed Jan 3 12:08:46 2024 +0000 9p: Do a couple of cleanups Do a couple of cleanups to 9p: (1) Remove a couple of unused variables. (2) Turn a BUG_ON() into a warning, consolidate with another warning and make the warning message include the inode number rather than whatever's in i_private (which will get hashed anyway). Suggested-by: Dominique Martinet Link: https://lore.kernel.org/r/ZZULNQAZ0n0WQv7p@codewreck.org/ Signed-off-by: David Howells Acked-by: Dominique Martinet cc: Eric Van Hensbergen cc: Latchesar Ionkov cc: Christian Schoenebeck cc: v9fs@lists.linux.dev cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org commit e46201308a1e568059328e200282c8a62faa2f19 Merge: 4ab8d27ad1318 ba3f5058db437 Author: Rafael J. Wysocki Date: Thu Jan 4 13:42:21 2024 +0100 Merge branch 'pnp' Merge a PNP update for 6.8-rc1: - Adjust pnpacpi_parse_allocated_vendor() to use memcpy() on a full structure field (Dmitry Antipov). * pnp: PNP: ACPI: fix fortify warning commit db32cf8e280b46726065c518e90761bb0229bacf Merge: 3e8626b4ed567 3c0696076aad6 Author: Will Deacon Date: Thu Jan 4 12:28:46 2024 +0000 Merge branch 'for-next/fixes' into for-next/core Merge in arm64 fixes queued for 6.7 so that kpti_install_ng_mappings() can be updated to use arm64_kernel_unmapped_at_el0() instead of checking the ARM64_UNMAP_KERNEL_AT_EL0 CPU capability directly. * for-next/fixes: arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify perf/arm-cmn: Fail DTC counter allocation correctly arm64: Avoid enabling KPTI unnecessarily commit 3e8626b4ed5679812a496d43dcd1fab1fae546f4 Merge: 41cff14b031a8 4ebee8cebdf6d Author: Will Deacon Date: Thu Jan 4 12:28:38 2024 +0000 Merge branch 'for-next/sysregs' into for-next/core * for-next/sysregs: arm64/sysreg: Add missing system instruction definitions for FGT arm64/sysreg: Add missing system register definitions for FGT arm64/sysreg: Add missing ExtTrcBuff field definition to ID_AA64DFR0_EL1 arm64/sysreg: Add missing Pauth_LR field definitions to ID_AA64ISAR1_EL1 arm64/sysreg: Add new system registers for GCS arm64/sysreg: Add definition for FPMR arm64/sysreg: Update HCRX_EL2 definition for DDI0601 2023-09 arm64/sysreg: Update SCTLR_EL1 for DDI0601 2023-09 arm64/sysreg: Update ID_AA64SMFR0_EL1 definition for DDI0601 2023-09 arm64/sysreg: Add definition for ID_AA64FPFR0_EL1 arm64/sysreg: Add definition for ID_AA64ISAR3_EL1 arm64/sysreg: Update ID_AA64ISAR2_EL1 defintion for DDI0601 2023-09 arm64/sysreg: Add definition for ID_AA64PFR2_EL1 arm64/sysreg: update CPACR_EL1 register arm64/sysreg: add system register POR_EL{0,1} arm64/sysreg: Add definition for HAFGRTR_EL2 arm64/sysreg: Update HFGITR_EL2 definiton to DDI0601 2023-09 commit 41cff14b031a8969867b1476ef725c1aad0fc9bc Merge: ef4896b598906 1aba06e7b2b49 Author: Will Deacon Date: Thu Jan 4 12:28:31 2024 +0000 Merge branch 'for-next/stacktrace' into for-next/core * for-next/stacktrace: arm64: stacktrace: factor out kunwind_stack_walk() arm64: stacktrace: factor out kernel unwind state commit ef4896b598906a0ea5dc80b3068a8c1383c485a0 Merge: 30431774fe6e9 9a802ddb2123e Author: Will Deacon Date: Thu Jan 4 12:28:22 2024 +0000 Merge branch 'for-next/selftests' into for-next/core * for-next/selftests: kselftest/arm64: Don't probe the current VL for unsupported vector types kselftest/arm64: Log SVCR when the SME tests barf kselftest/arm64: Improve output for skipped TPIDR2 ABI test commit 30431774fe6e96f9418911f36b99914f54089d75 Merge: dd9168ab08ebb f35c32ca6839f Author: Will Deacon Date: Thu Jan 4 12:28:14 2024 +0000 Merge branch 'for-next/rip-vpipt' into for-next/core * for-next/rip-vpipt: arm64: Rename reserved values for CTR_EL0.L1Ip arm64: Kill detection of VPIPT i-cache policy KVM: arm64: Remove VPIPT I-cache handling commit dd9168ab08ebbf5643434c652a5f22ffa96dbdf3 Merge: 3b47bd8fed044 bb339db4d363c Author: Will Deacon Date: Thu Jan 4 12:28:00 2024 +0000 Merge branch 'for-next/perf' into for-next/core * for-next/perf: (30 commits) arm: perf: Fix ARCH=arm build with GCC MAINTAINERS: add maintainers for DesignWare PCIe PMU driver drivers/perf: add DesignWare PCIe PMU driver PCI: Move pci_clear_and_set_dword() helper to PCI header PCI: Add Alibaba Vendor ID to linux/pci_ids.h docs: perf: Add description for Synopsys DesignWare PCIe PMU driver Revert "perf/arm_dmc620: Remove duplicate format attribute #defines" Documentation: arm64: Document the PMU event counting threshold feature arm64: perf: Add support for event counting threshold arm: pmu: Move error message and -EOPNOTSUPP to individual PMUs KVM: selftests: aarch64: Update tools copy of arm_pmuv3.h perf/arm_dmc620: Remove duplicate format attribute #defines arm: pmu: Share user ABI format mechanism with SPE arm64: perf: Include threshold control fields in PMEVTYPER mask arm: perf: Convert remaining fields to use GENMASK arm: perf: Use GENMASK for PMMIR fields arm: perf/kvm: Use GENMASK for ARMV8_PMU_PMCR_N arm: perf: Remove inlines from arm_pmuv3.c drivers/perf: arm_dsu_pmu: Remove kerneldoc-style comment syntax drivers/perf: Remove usage of the deprecated ida_simple_xx() API ... commit 3b47bd8fed0446f4cc89e66d7a532b5f8b6633f3 Merge: 65180649fa256 7b1a09e44dc64 Author: Will Deacon Date: Thu Jan 4 12:27:55 2024 +0000 Merge branch 'for-next/mm' into for-next/core * for-next/mm: arm64: irq: set the correct node for shadow call stack arm64: irq: set the correct node for VMAP stack commit 65180649fa25695e2b156b30965cefde7a033575 Merge: ccaeeec5294b1 5cc5ed7a668dc Author: Will Deacon Date: Thu Jan 4 12:27:49 2024 +0000 Merge branch 'for-next/misc' into for-next/core * for-next/misc: arm64: memory: remove duplicated include arm64: Delete the zero_za macro Documentation/arch/arm64: Fix typo commit ccaeeec5294b1be89264c2eb6026d7a0eecb61c0 Merge: 88619527b4204 376f5a3bd7e21 Author: Will Deacon Date: Thu Jan 4 12:27:42 2024 +0000 Merge branch 'for-next/lpa2-prep' into for-next/core * for-next/lpa2-prep: arm64: mm: get rid of kimage_vaddr global variable arm64: mm: Take potential load offset into account when KASLR is off arm64: kernel: Disable latent_entropy GCC plugin in early C runtime arm64: Add ARM64_HAS_LPA2 CPU capability arm64/mm: Add FEAT_LPA2 specific ID_AA64MMFR0.TGRAN[2] arm64/mm: Update tlb invalidation routines for FEAT_LPA2 arm64/mm: Add lpa2_is_enabled() kvm_lpa2_is_enabled() stubs arm64/mm: Modify range-based tlbi to decrement scale commit 88619527b420481f832828af92fd0d96b6367fbf Merge: 79eb42b269d42 97ba4416d6dd5 Author: Will Deacon Date: Thu Jan 4 12:27:35 2024 +0000 Merge branch 'for-next/kbuild' into for-next/core * for-next/kbuild: efi/libstub: zboot: do not use $(shell ...) in cmd_copy_and_pad arm64: properly install vmlinuz.efi arm64: replace with arm64: vdso32: rename 32-bit debug vdso to vdso32.so.dbg commit 79eb42b269d425ec9c9e1d0613f62b273026de78 Merge: e90a8a210fd0f 2632e25217696 Author: Will Deacon Date: Thu Jan 4 12:27:29 2024 +0000 Merge branch 'for-next/fpsimd' into for-next/core * for-next/fpsimd: arm64: fpsimd: Implement lazy restore for kernel mode FPSIMD arm64: fpsimd: Preserve/restore kernel mode NEON at context switch arm64: fpsimd: Drop unneeded 'busy' flag commit e90a8a210fd0fc633ed9c6c7d76ad35ae65d37dc Merge: 3f35db4e68ceb 50f176175e96e Author: Will Deacon Date: Thu Jan 4 12:27:13 2024 +0000 Merge branch 'for-next/early-idreg-overrides' into for-next/core * for-next/early-idreg-overrides: arm64/kernel: Move 'nokaslr' parsing out of early idreg code arm64: idreg-override: Avoid kstrtou64() to parse a single hex digit arm64: idreg-override: Avoid sprintf() for simple string concatenation arm64: idreg-override: avoid strlen() to check for empty strings arm64: idreg-override: Avoid parameq() and parameqn() arm64: idreg-override: Prepare for place relative reloc patching arm64: idreg-override: Omit non-NULL checks for override pointer commit 3f35db4e68ceb84aad9f3ae0ae0a13779ada5b5c Merge: 2cc14f52aeb78 eb15d707c252c Author: Will Deacon Date: Thu Jan 4 12:26:56 2024 +0000 Merge branch 'for-next/cpufeature' into for-next/core * for-next/cpufeature: arm64: Align boot cpucap handling with system cpucap handling arm64: Cleanup system cpucap handling arm64: Kconfig: drop KAISER reference from KPTI option description arm64: mm: Only map KPTI trampoline if it is going to be used arm64: Get rid of ARM64_HAS_NO_HW_PREFETCH commit 4ab8d27ad13189fdf7d927e15da2330d6d80ea53 Merge: 22349e79b98cd e2605d4039a42 e3f577830ce21 3ebccf1d1ca74 8a3134a025380 Author: Rafael J. Wysocki Date: Thu Jan 4 13:23:31 2024 +0100 Merge branches 'acpi-resource', 'acpi-numa', 'acpi-soc' and 'acpi-misc' Merge ACPI resources management quirks, ACPI NUMA updates, an ACPI LPSS (Intel SoC) driver update and an ACPI watchdog driver fixup for 6.8-rc1: - Add IRQ override quirks for some Infinity laptops and for TongFang GMxXGxx (David McFarland, Hans de Goede). - Clean up the ACPI NUMA code and fix it to ensure that fake_pxm is not the same as one of the real pxm values (Yuntao Wang). - Fix the fractional clock divider flags in the ACPI LPSS (Intel SoC) driver so as to prevent miscalculation of the values in the clock divider (Andy Shevchenko). - Adjust comments in the ACPI watchdog driver to prevent kernel-doc from complaining during documentation builds (Randy Dunlap). * acpi-resource: ACPI: resource: Add Infinity laptops to irq1_edge_low_force_override ACPI: resource: Add another DMI match for the TongFang GMxXGxx * acpi-numa: ACPI: NUMA: Fix the logic of getting the fake_pxm value ACPI: NUMA: Optimize the check for the availability of node values ACPI: NUMA: Remove unnecessary check in acpi_parse_gi_affinity() * acpi-soc: ACPI: LPSS: Fix the fractional clock divider flags * acpi-misc: ACPI: watchdog: fix kernel-doc warnings commit 22349e79b98cd3c61c28c2fc0d3a034bb854210e Merge: f845351a40623 56d2eeda87995 143176a46bdd3 a70297d221325 38c872a9e96f7 Author: Rafael J. Wysocki Date: Thu Jan 4 13:19:40 2024 +0100 Merge branches 'acpi-pm', 'acpi-video', 'acpi-apei' and 'acpi-extlog' Merge an ACPI power management change, ACPI backlight driver changes, APEI updates and ACPI extlog driver changes for 6.8-rc1: - Modify the ACPI LPIT table handling code to avoid u32 multiplication overflows in state residency computations (Nikita Kiryushin). - Drop an unused helper function from the ACPI backlight (video) driver and add a clarifying comment to it (Hans de Goede). - Update the ACPI backlight driver to avoid using uninitialized memory in some cases (Nikita Kiryushin). - Add ACPI backlight quirk for the Colorful X15 AT 23 laptop (Yuluo Qiu). - Add support for vendor-defined error types to the ACPI APEI error injection code (Avadhut Naik). - Adjust APEI to properly set MF_ACTION_REQUIRED on synchronous memory failure events, so they are handled differently from the asynchronous ones (Shuai Xue). - Fix NULL pointer dereference check in the ACPI extlog driver (Prarit Bhargava). - Adjust the ACPI extlog driver to clear the Extended Error Log status when RAS_CEC handled the error (Tony Luck). * acpi-pm: ACPI: LPIT: Avoid u32 multiplication overflow * acpi-video: ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop ACPI: video: check for error while searching for backlight device parent ACPI: video: Drop should_check_lcd_flag() ACPI: video: Add comment about acpi_video_backlight_use_native() usage * acpi-apei: ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events ACPI: APEI: EINJ: Add support for vendor defined error types platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo fs: debugfs: Add write functionality to debugfs blobs ACPI: APEI: EINJ: Refactor available_error_type_show() * acpi-extlog: ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error ACPI: extlog: fix NULL pointer dereference check commit f845351a40623c80c4d48404f042c193a8c5334a Merge: f00571b58ec21 b14b2d56168c1 Author: Rafael J. Wysocki Date: Thu Jan 4 13:01:51 2024 +0100 Merge branch 'acpi-thermal' Merge ACPI thermal zone driver updates for 6.8-rc1: - Use generic ACPI helpers for evaluating trip point temperature objects in the ACPI thermal zone driver (Rafael J. Wysockii, Arnd Bergmann). - Add Thermal fast Sampling Period (_TFP) support to the ACPI thermal zone driver (Jeff Brasen). * acpi-thermal: ACPI: thermal_lib: include "internal.h" for function prototypes ACPI: thermal: Add Thermal fast Sampling Period (_TFP) support ACPI: thermal: Use library functions to obtain trip point temperature values ACPI: thermal_lib: Add functions returning temperature in deci-Kelvin thermal: ACPI: Move the ACPI thermal library to drivers/acpi/ commit f00571b58ec213ec818392301101a244e6f97989 Merge: 8be056a2c075d d70d141bb15f3 Author: Rafael J. Wysocki Date: Thu Jan 4 12:57:48 2024 +0100 Merge branch 'acpi-utils' Merge ACPI utility functions updates for 6.8-rc1: - Modify acpi_dev_uid_match() to support different types of its second argument and adjust its users accordingly (Raag Jadav). - Clean up code related to acpi_evaluate_reference() and ACPI device lists (Rafael J. Wysocki). * acpi-utils: ACPI: utils: Introduce helper for _DEP list lookup ACPI: utils: Fix white space in struct acpi_handle_list definition ACPI: utils: Refine acpi_handle_list_equal() slightly ACPI: utils: Return bool from acpi_evaluate_reference() ACPI: utils: Rearrange in acpi_evaluate_reference() perf: arm_cspmu: drop redundant acpi_dev_uid_to_integer() efi: dev-path-parser: use acpi_dev_uid_match() for matching _UID ACPI: LPSS: use acpi_dev_uid_match() for matching _UID ACPI: bus: update acpi_dev_hid_uid_match() to support multiple types ACPI: bus: update acpi_dev_uid_match() to support multiple types commit 8be056a2c075dfb578a8e4ea21bd036352cee5f3 Merge: e3f4440753462 eb9299beadbdd 6d392d8daa751 4b3805daaacb2 Author: Rafael J. Wysocki Date: Thu Jan 4 12:35:42 2024 +0100 Merge branches 'acpi-osl', 'acpi-bus' and 'acpi-tables' Merge low-level ACPICA interface changes, an _SB-scope _OSC handshake update and a data-only ACPI tables parsing code update for 6.8-rc1: - Switch over ACPI to using a threaded interrupt handler for the SCI (Rafael J. Wysocki). - Allow ACPI Notify () handlers to run on all CPUs and clean up the ACPI interface for deferred events processing (Rafael J. Wysocki). - Switch over the ACPI EC driver to using a threaded handler for the dedicated IRQ on systems without the EC GPE (Rafael J. Wysocki). - Adjust code using ACPICA spinlocks and the ACPI EC driver spinlock to keep local interrupts on (Rafael J. Wysocki). - Adjust the USB4 _OSC handshake to correctly handle cases in which certain types of OS control are denied by the platform (Mika Westerberg). - Correct and clean up the generic function for parsing ACPI data-only tables with array structure (Yuntao Wang). * acpi-osl: ACPI: EC: Use a spin lock without disabing interrupts ACPI: EC: Use a threaded handler for dedicated IRQ ACPI: OSL: Use spin locks without disabling interrupts ACPI: OSL: Allow Notify () handlers to run on all CPUs ACPI: OSL: Rearrange workqueue selection in acpi_os_execute() ACPI: OSL: Rework error handling in acpi_os_execute() ACPI: OSL: Use a threaded interrupt handler for SCI * acpi-bus: ACPI: Run USB4 _OSC() first with query bit set * acpi-tables: ACPI: tables: Correct and clean up the logic of acpi_parse_entries_array() commit 61d7e367f8bcc8083f02dcc5ce89b98b1480929d Merge: 31bda717d7777 782f8906f8057 Author: Vlastimil Babka Date: Thu Dec 28 19:19:50 2023 +0100 Merge branch 'slab/for-6.8/slub-hook-cleanups' into slab/for-next Merge the SLAB allocator removal and a number of subsequent SLUB cleanups and optimizations. commit e3f444075346278ce8103ea387d3c24858106f1c Merge: 16f70feaabe9f cb21746b179c7 ccb45b34d4401 Author: Rafael J. Wysocki Date: Thu Jan 4 12:29:52 2024 +0100 Merge branches 'acpi-scan' and 'acpi-processor' Merge ACPI device enumeration updates and ACPI processor driver updates for 6.8-rc1: - Add CSI-2 and DisCo for Imaging support to the ACPI device enumeration code (Sakari Ailus, Rafael J. Wysocki). - Adjust the cpufreq thermal reduction algorithm in the ACPI processor driver for Tegra241 (Srikar Srimath Tirumala, Arnd Bergmann). - Make acpi_proc_quirk_mwait_check() x86-specific (Rafael J. Wysocki). * acpi-scan: ACPI: scan: Fix an error message in DisCo for Imaging support ACPI: property: Replicate DT-aligned u32 properties from DisCo for Imaging ACPI: property: Dig "rotation" property for devices with CSI2 _CRS ACPI: scan: Extract MIPI DisCo for Imaging data into swnodes device property: Add SOFTWARE_NODE() macro for defining software nodes ACPI: scan: Extract _CRS CSI-2 connection information into swnodes ACPI: scan: Extract CSI-2 connection graph from _CRS ACPI: property: Support using strings in reference properties * acpi-processor: ACPI: arm64: export acpi_arch_thermal_cpufreq_pctg() ACPI: processor: reduce CPUFREQ thermal reduction pctg for Tegra241 ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check() commit 5e5401d6612ef599ad45785b941eebda7effc90f Author: Russell King (Oracle) Date: Thu Jan 4 09:47:36 2024 +0000 net: phylink: move phylink_pcs_neg_mode() into phylink.c Move phylink_pcs_neg_mode() from the header file into the .c file since nothing should be using it. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3b73a7b8ec3821928cfaf399da7876bc39a5cf78 Author: Russell King (Oracle) Date: Thu Jan 4 10:37:55 2024 +0000 net: mdio_bus: add refcounting for fwnodes to mdiobus Luiz Angelo Daros de Luca reports that the MDIO bus code maintains a reference to the DT node, but does not hold a refcount on the node. The simple solution to this is to add the necessary refcounting into the MDIO bus code for all users, ensuring that on registration, the refcount is incremented, and only dropped when the MDIO bus is released. Do this for fwnodes, so we not only fix this for DT, but also other types of firmware nodes as well. Reported-by: Luiz Angelo Daros de Luca Signed-off-by: Russell King (Oracle) Signed-off-by: David S. Miller commit f380846462b2d8341be303db954d4305d419b883 Author: Rafael J. Wysocki Date: Fri Dec 15 20:53:52 2023 +0100 thermal: trip: Constify thermal zone argument of thermal_zone_trip_id() Because thermal_zone_trip_id() does not update the thermal zone object passed to it, its pointer argument representing the thermal zone can be const, so adjust its definition accordingly. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba commit 0f2b21477988634ba7d813539f034d595f9501d7 Author: Michael Chan Date: Wed Jan 3 17:01:08 2024 -0800 bnxt_en: Fix compile error without CONFIG_RFS_ACCEL Fix the following compile error: .../bnxt.c: In function 'bnxt_cfg_ntp_filters': .../bnxt.c:14077:37: error: implicit declaration of function 'rps_may_expire_flow' [-Werror=implicit-function-declaration] 14077 | if (rps_may_expire_flow(bp->dev, fltr->base.rxq, | ^~~~~~~~~~~~~~~~~~~ bnxt_cfg_ntp_filters() is only used when CONFIG_RFS_ACCEL is enabled. User configured ntuple filters are directly added and will not go through this function. Wrap the body of bnxt_cfg_ntp_filters() with CONFIG_RFS_ACCEL. Fixes: 59cde76f33fa ("bnxt_en: Refactor filter insertion logic in bnxt_rx_flow_steer().") Reported-by: Arnd Bergmann Link: https://lore.kernel.org/netdev/20240103102332.3642417-1-arnd@kernel.org/ Reported-by: kernel test robot Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 168882d440feaa8d159665d5f4daf5a89f89483f Merge: 5403d39b4b999 b746dc6bdde5a Author: David S. Miller Date: Thu Jan 4 10:49:36 2024 +0000 Merge branch 'net-wangxun-more-ethtool' Jiawen Wu says: ==================== Implement more ethtool_ops for Wangxun Provide ethtool functions to operate pause param, ring param, coalesce channel number and msglevel, for driver txgbe/ngbe. v6 -> v7: - Rebase on net-next. v5 -> v6: - Minor fixes address on Jakub Kicinski's comments. v4 -> v5: - Fix build error reported by kernel test robot. v3 -> v4: - Repartition the patches of phylink. - Handle failure to allocate memory while changing ring parameters. - Minor fixes about formatting. v2 -> v3: - Address comments: https://lore.kernel.org/all/ZW2loxTO6oKNYLew@shell.armlinux.org.uk/ v1 -> v2: - Add phylink support for ngbe. - Fix issue on interrupts when queue number is changed. - Add more marco defines. - Fix return codes. ==================== Signed-off-by: David S. Miller commit b746dc6bdde5a9a03309f208733a08665d4a0cb4 Author: Jiawen Wu Date: Wed Jan 3 10:08:54 2024 +0800 net: wangxun: add ethtool_ops for msglevel Add support to get and set msglevel for driver txgbe and ngbe. Signed-off-by: Jiawen Wu Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 937d46ecc5f941b26270bdf7ce37495f12b25955 Author: Jiawen Wu Date: Wed Jan 3 10:08:53 2024 +0800 net: wangxun: add ethtool_ops for channel number Add support to get RX/TX queue number with ethtool -l, and set RX/TX queue number with ethtool -L. Since interrupts need to be rescheduled, adjust the allocation of msix enties. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 4ac2d9dff4b01fb210f951dcb67badcc2a1aa427 Author: Jiawen Wu Date: Wed Jan 3 10:08:52 2024 +0800 net: wangxun: add coalesce options support Support to show RX/TX coalesce with ethtool -c and set RX/TX coalesce with ethtool -C. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 883b5984a5d2900468af5ab979cae90547a78da4 Author: Jiawen Wu Date: Wed Jan 3 10:08:51 2024 +0800 net: wangxun: add ethtool_ops for ring parameters Support to query RX/TX depth with ethtool -g, and change RX/TX depth with ethtool -G. Signed-off-by: Jiawen Wu Signed-off-by: David S. Miller commit 2fe2ca09da953bac778eab5dfb309b4e7d274b1a Author: Jiawen Wu Date: Wed Jan 3 10:08:50 2024 +0800 net: wangxun: add flow control support Add support to set pause params with ethtool -A and get pause params with ethtool -a, for ethernet driver txgbe and ngbe. Signed-off-by: Jiawen Wu Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit bc2426d74aa35cd8ec9c97a253ef57c2c5cd730c Author: Jiawen Wu Date: Wed Jan 3 10:08:49 2024 +0800 net: ngbe: convert phylib to phylink Implement phylink in ngbe driver, to handle phy uniformly for Wangxun ethernet devices. Signed-off-by: Jiawen Wu Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 4491c602fe5f3a248cc8a2ed4180aacdc2162365 Author: Jiawen Wu Date: Wed Jan 3 10:08:48 2024 +0800 net: txgbe: use phylink bits added in libwx Convert txgbe to use phylink and phylink_config added in libwx. Signed-off-by: Jiawen Wu Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit e8e138cf7383cf820419fcbec63992e75a01467b Author: Jiawen Wu Date: Wed Jan 3 10:08:47 2024 +0800 net: libwx: add phylink to libwx For the following implementation, add struct phylink and phylink_config to wx structure. Add the helper function for converting phylink to wx, implement ethtool ksetting and nway reset in libwx. Signed-off-by: Jiawen Wu Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 5403d39b4b999b15b2dc9abe4df25aeb77c02539 Merge: a562c0a2d651e 3027e7b15b02d Author: David S. Miller Date: Thu Jan 4 10:40:07 2024 +0000 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/nex t-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-01-02 (ice) This series contains updates to ice driver only. Karol adds support for capable devices to receive timestamp via interrupt rather than polling to allow for less delay. Andrii adds support switchdev hardware packet mirroring. Jake reworks VF rebuild to avoid destroying objects that do not need to be. Jan S removes reporting of rx_len_errors as they are incorrectly reported by hardware. Jan G adds const modifier to some uses that are applicable. Kunwu Chan adds some checks for failed memory allocations. ==================== Signed-off-by: David S. Miller commit a562c0a2d651e040681b0bfce9b4d229ac3b0b8c Author: Eric Dumazet Date: Tue Dec 19 17:00:17 2023 +0000 sctp: fix busy polling Busy polling while holding the socket lock makes litle sense, because incoming packets wont reach our receive queue. Fixes: 8465a5fcd1ce ("sctp: add support for busy polling to sctp protocol") Reported-by: Jacob Moroni Signed-off-by: Eric Dumazet Cc: Marcelo Ricardo Leitner Cc: Xin Long Signed-off-by: David S. Miller commit 55a8210c9e7d21ff2644809699765796d4bfb200 Author: Fedor Pchelkin Date: Thu Dec 28 19:07:43 2023 +0300 apparmor: avoid crash when parsed profile name is empty When processing a packed profile in unpack_profile() described like "profile :ns::samba-dcerpcd /usr/lib*/samba/{,samba/}samba-dcerpcd {...}" a string ":samba-dcerpcd" is unpacked as a fully-qualified name and then passed to aa_splitn_fqname(). aa_splitn_fqname() treats ":samba-dcerpcd" as only containing a namespace. Thus it returns NULL for tmpname, meanwhile tmpns is non-NULL. Later aa_alloc_profile() crashes as the new profile name is NULL now. general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 6 PID: 1657 Comm: apparmor_parser Not tainted 6.7.0-rc2-dirty #16 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014 RIP: 0010:strlen+0x1e/0xa0 Call Trace: ? strlen+0x1e/0xa0 aa_policy_init+0x1bb/0x230 aa_alloc_profile+0xb1/0x480 unpack_profile+0x3bc/0x4960 aa_unpack+0x309/0x15e0 aa_replace_profiles+0x213/0x33c0 policy_update+0x261/0x370 profile_replace+0x20e/0x2a0 vfs_write+0x2af/0xe00 ksys_write+0x126/0x250 do_syscall_64+0x46/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 ---[ end trace 0000000000000000 ]--- RIP: 0010:strlen+0x1e/0xa0 It seems such behaviour of aa_splitn_fqname() is expected and checked in other places where it is called (e.g. aa_remove_profiles). Well, there is an explicit comment "a ns name without a following profile is allowed" inside. AFAICS, nothing can prevent unpacked "name" to be in form like ":samba-dcerpcd" - it is passed from userspace. Deny the whole profile set replacement in such case and inform user with EPROTO and an explaining message. Found by Linux Verification Center (linuxtesting.org). Fixes: 04dc715e24d0 ("apparmor: audit policy ns specified in policy load") Signed-off-by: Fedor Pchelkin Signed-off-by: John Johansen commit 1342ad786073e96fa813ad943c19f586157ae297 Author: Fedor Pchelkin Date: Mon Dec 4 21:19:44 2023 +0300 apparmor: fix possible memory leak in unpack_trans_table If we fail to unpack the transition table then the table elements which have been already allocated are not freed on error path. unreferenced object 0xffff88802539e000 (size 128): comm "apparmor_parser", pid 903, jiffies 4294914938 (age 35.085s) hex dump (first 32 bytes): 20 73 6f 6d 65 20 6e 61 73 74 79 20 73 74 72 69 some nasty stri 6e 67 20 73 6f 6d 65 20 6e 61 73 74 79 20 73 74 ng some nasty st backtrace: [] __kmem_cache_alloc_node+0x1e2/0x2d0 [] __kmalloc_node_track_caller+0x54/0x170 [] kmemdup+0x29/0x60 [] aa_unpack_strdup+0xe5/0x1b0 [] unpack_pdb+0xeb8/0x2700 [] unpack_profile+0x1507/0x4a30 [] aa_unpack+0x36a/0x1560 [] aa_replace_profiles+0x213/0x33c0 [] policy_update+0x261/0x370 [] profile_replace+0x20e/0x2a0 [] vfs_write+0x2af/0xe00 [] ksys_write+0x126/0x250 [] do_syscall_64+0x46/0xf0 [] entry_SYSCALL_64_after_hwframe+0x6e/0x76 Call aa_free_str_table() on error path as was done before the blamed commit. It implements all necessary checks, frees str_table if it is available and nullifies the pointers. Found by Linux Verification Center (linuxtesting.org). Fixes: a0792e2ceddc ("apparmor: make transition table unpack generic so it can be reused") Signed-off-by: Fedor Pchelkin Signed-off-by: John Johansen commit 1979a28075470ef82472a5656ecc969f901e0d3b Author: Bartosz Golaszewski Date: Tue Jan 2 16:59:48 2024 +0100 gpiolib: replace the GPIO device mutex with a read-write semaphore There are only two spots where we modify (add to or remove objects from) the GPIO device list. Readers should be able to access it concurrently. Replace the mutex with a read-write semaphore and adjust the locking operations accordingly. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit 48e1b4d369cfe2729138a128afa6b8a55d093eaf Author: Bartosz Golaszewski Date: Tue Jan 2 16:59:47 2024 +0100 gpiolib: remove the GPIO device from the list when it's unregistered If we wait until the GPIO device's .release() callback gets invoked before we remove it from the global device list, then we risk that someone will look it up using gpio_device_find() between where we dropped the last reference and before .release() is done taking a reference again to an object that's being released. The device must be removed when it's being unregistered - just like how we remove it from the GPIO bus. Fixes: ff2b13592299 ("gpio: make the gpiochip a real device") Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit bcf7ef56daca2eacf836d22eee23c66f7cd96a65 Author: Nathan Chancellor Date: Tue Dec 5 12:53:08 2023 -0700 x86/tools: objdump_reformat.awk: Skip bad instructions from llvm-objdump When running the instruction decoder selftest with LLVM=1 and CONFIG_PVH=y, there is a series of warnings: arch/x86/tools/insn_decoder_test: warning: Found an x86 instruction decoder bug, please report this. arch/x86/tools/insn_decoder_test: warning: ffffffff81000050 ea arch/x86/tools/insn_decoder_test: warning: objdump says 1 bytes, but insn_get_length() says 7 arch/x86/tools/insn_decoder_test: warning: Decoded and checked 7214721 instructions with 1 failures GNU objdump outputs "(bad)" instead of "", which is already handled in the bad_expr regex, so there is no warning. $ objdump -d arch/x86/platform/pvh/head.o | grep -E '50:\s+ea' 50: ea (bad) $ llvm-objdump -d arch/x86/platform/pvh/head.o | grep -E '50:\s+ea' 50: ea Add "" to the bad_expr regex to clear up the warning, allowing the instruction decoder selftest to fully pass with llvm-objdump. Signed-off-by: Nathan Chancellor Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231205-objdump_reformat-awk-handle-llvm-objdump-bad_expr-v1-1-b4a74f39396f@kernel.org commit c040e902b07e946ff73e81d4abb4347d2c0b6044 Merge: f8506c5734902 95226f5a36695 Author: Alexei Starovoitov Date: Wed Jan 3 21:22:50 2024 -0800 Merge branch 'libbpf-side-__arg_ctx-fallback-support' Andrii Nakryiko says: ==================== Libbpf-side __arg_ctx fallback support Support __arg_ctx global function argument tag semantics even on older kernels that don't natively support it through btf_decl_tag("arg:ctx"). Patches #2-#6 are preparatory work to allow to postpone BTF loading into the kernel until after all the BPF program relocations (including global func appending to main programs) are done. Patch #4 is perhaps the most important and establishes pre-created stable placeholder FDs, so that relocations can embed valid map FDs into ldimm64 instructions. Once BTF is done after relocation, what's left is to adjust BTF information to have each main program's copy of each used global subprog to point to its own adjusted FUNC -> FUNC_PROTO type chain (if they use __arg_ctx) in such a way as to satisfy type expectations of BPF verifier regarding the PTR_TO_CTX argument definition. See patch #8 for details. Patch #8 adds few more __arg_ctx use cases (edge cases like multiple arguments having __arg_ctx, etc) to test_global_func_ctx_args.c, to make it simple to validate that this logic indeed works on old kernels. It does. But just to be 100% sure patch #9 adds a test validating that libbpf uploads func_info with properly modified BTF data. v2->v3: - drop renaming patch (Alexei, Eduard); - use memfd_create() instead of /dev/null for placeholder FD (Eduard); - add one more test for validating BTF rewrite logic (Eduard); - fixed wrong -errno usage, reshuffled some BTF rewrite bits (Eduard); v1->v2: - do internal functions renaming in patch #1 (Alexei); - extract cloning of FUNC -> FUNC_PROTO information into separate function (Alexei); ==================== Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20240104013847.3875810-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 95226f5a36695fd5740e130016d9ed697cfb2bad Author: Andrii Nakryiko Date: Wed Jan 3 17:38:47 2024 -0800 selftests/bpf: add __arg_ctx BTF rewrite test Add a test validating that libbpf uploads BTF and func_info with rewritten type information for arguments of global subprogs that are marked with __arg_ctx tag. Suggested-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240104013847.3875810-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 67fe459144dd629855bd9fb4b12bd9c4f792a8cf Author: Andrii Nakryiko Date: Wed Jan 3 17:38:46 2024 -0800 selftests/bpf: add arg:ctx cases to test_global_funcs tests Add a few extra cases of global funcs with context arguments. This time rely on "arg:ctx" decl_tag (__arg_ctx macro), but put it next to "classic" cases where context argument has to be of an exact type that BPF verifier expects (e.g., bpf_user_pt_regs_t for kprobe/uprobe). Colocating all these cases separately from other global func args that rely on arg:xxx decl tags (in verifier_global_subprogs.c) allows for simpler backwards compatibility testing on old kernels. All the cases in test_global_func_ctx_args.c are supposed to work on older kernels, which was manually validated during development. Acked-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240104013847.3875810-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 2f38fe689470055440bf80fc644920023a643a82 Author: Andrii Nakryiko Date: Wed Jan 3 17:38:45 2024 -0800 libbpf: implement __arg_ctx fallback logic Out of all special global func arg tag annotations, __arg_ctx is practically is the most immediately useful and most critical to have working across multitude kernel version, if possible. This would allow end users to write much simpler code if __arg_ctx semantics worked for older kernels that don't natively understand btf_decl_tag("arg:ctx") in verifier logic. Luckily, it is possible to ensure __arg_ctx works on old kernels through a bit of extra work done by libbpf, at least in a lot of common cases. To explain the overall idea, we need to go back at how context argument was supported in global funcs before __arg_ctx support was added. This was done based on special struct name checks in kernel. E.g., for BPF_PROG_TYPE_PERF_EVENT the expectation is that argument type `struct bpf_perf_event_data *` mark that argument as PTR_TO_CTX. This is all good as long as global function is used from the same BPF program types only, which is often not the case. If the same subprog has to be called from, say, kprobe and perf_event program types, there is no single definition that would satisfy BPF verifier. Subprog will have context argument either for kprobe (if using bpf_user_pt_regs_t struct name) or perf_event (with bpf_perf_event_data struct name), but not both. This limitation was the reason to add btf_decl_tag("arg:ctx"), making the actual argument type not important, so that user can just define "generic" signature: __noinline int global_subprog(void *ctx __arg_ctx) { ... } I won't belabor how libbpf is implementing subprograms, see a huge comment next to bpf_object_relocate_calls() function. The idea is that each main/entry BPF program gets its own copy of global_subprog's code appended. This per-program copy of global subprog code *and* associated func_info .BTF.ext information, pointing to FUNC -> FUNC_PROTO BTF type chain allows libbpf to simulate __arg_ctx behavior transparently, even if the kernel doesn't yet support __arg_ctx annotation natively. The idea is straightforward: each time we append global subprog's code and func_info information, we adjust its FUNC -> FUNC_PROTO type information, if necessary (that is, libbpf can detect the presence of btf_decl_tag("arg:ctx") just like BPF verifier would do it). The rest is just mechanical and somewhat painful BTF manipulation code. It's painful because we need to clone FUNC -> FUNC_PROTO, instead of reusing it, as same FUNC -> FUNC_PROTO chain might be used by another main BPF program within the same BPF object, so we can't just modify it in-place (and cloning BTF types within the same struct btf object is painful due to constant memory invalidation, see comments in code). Uploaded BPF object's BTF information has to work for all BPF programs at the same time. Once we have FUNC -> FUNC_PROTO clones, we make sure that instead of using some `void *ctx` parameter definition, we have an expected `struct bpf_perf_event_data *ctx` definition (as far as BPF verifier and kernel is concerned), which will mark it as context for BPF verifier. Same global subprog relocated and copied into another main BPF program will get different type information according to main program's type. It all works out in the end in a completely transparent way for end user. Libbpf maintains internal program type -> expected context struct name mapping internally. Note, not all BPF program types have named context struct, so this approach won't work for such programs (just like it didn't before __arg_ctx). So native __arg_ctx is still important to have in kernel to have generic context support across all BPF program types. Acked-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240104013847.3875810-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 1004742d7ff03a088e74133af2401556ac80092b Author: Andrii Nakryiko Date: Wed Jan 3 17:38:44 2024 -0800 libbpf: move BTF loading step after relocation step With all the preparations in previous patches done we are ready to postpone BTF loading and sanitization step until after all the relocations are performed. Acked-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240104013847.3875810-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit fb03be7c4a27c25696287df4ee06c5aafa31267c Author: Andrii Nakryiko Date: Wed Jan 3 17:38:43 2024 -0800 libbpf: move exception callbacks assignment logic into relocation step Move the logic of finding and assigning exception callback indices from BTF sanitization step to program relocations step, which seems more logical and will unblock moving BTF loading to after relocation step. Exception callbacks discovery and assignment has no dependency on BTF being loaded into the kernel, it only uses BTF information. It does need to happen before subprogram relocations happen, though. Which is why the split. No functional changes. Acked-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240104013847.3875810-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit dac645b950ea4fc0896fe46a645365cb8d9ab92b Author: Andrii Nakryiko Date: Wed Jan 3 17:38:42 2024 -0800 libbpf: use stable map placeholder FDs Move map creation to later during BPF object loading by pre-creating stable placeholder FDs (utilizing memfd_create()). Use dup2() syscall to then atomically make those placeholder FDs point to real kernel BPF map objects. This change allows to delay BPF map creation to after all the BPF program relocations. That, in turn, allows to delay BTF finalization and loading into kernel to after all the relocations as well. We'll take advantage of the latter in subsequent patches to allow libbpf to adjust BTF in a way that helps with BPF global function usage. Clean up a few places where we close map->fd, which now shouldn't happen, because map->fd should be a valid FD regardless of whether map was created or not. Surprisingly and nicely it simplifies a bunch of error handling code. If this change doesn't backfire, I'm tempted to pre-create such stable FDs for other entities (progs, maybe even BTF). We previously did some manipulations to make gen_loader work with fake map FDs, with stable map FDs this hack is not necessary for maps (we still have it for BTF, but I left it as is for now). Acked-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240104013847.3875810-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit f08c18e083adfef92946ae1d44b07bb81e727e08 Author: Andrii Nakryiko Date: Wed Jan 3 17:38:41 2024 -0800 libbpf: don't rely on map->fd as an indicator of map being created With the upcoming switch to preallocated placeholder FDs for maps, switch various getters/setter away from checking map->fd. Use map_is_created() helper that detect whether BPF map can be modified based on map->obj->loaded state, with special provision for maps set up with bpf_map__reuse_fd(). For backwards compatibility, we take map_is_created() into account in bpf_map__fd() getter as well. This way before bpf_object__load() phase bpf_map__fd() will always return -1, just as before the changes in subsequent patches adding stable map->fd placeholders. We also get rid of all internal uses of bpf_map__fd() getter, as it's more oriented for uses external to libbpf. The above map_is_created() check actually interferes with some of the internal uses, if map FD is fetched through bpf_map__fd(). Acked-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240104013847.3875810-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit fa98b54bff39f51c46fc96d3385c6292391c277b Author: Andrii Nakryiko Date: Wed Jan 3 17:38:40 2024 -0800 libbpf: use explicit map reuse flag to skip map creation steps Instead of inferring whether map already point to previously created/pinned BPF map (which user can specify with bpf_map__reuse_fd()) API), use explicit map->reused flag that is set in such case. Acked-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240104013847.3875810-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit df7c3f7d3a3ddab31ca8cfa9b86a8729ec43fd2e Author: Andrii Nakryiko Date: Wed Jan 3 17:38:39 2024 -0800 libbpf: make uniform use of btf__fd() accessor inside libbpf It makes future grepping and code analysis a bit easier. Acked-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20240104013847.3875810-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit f8506c5734902ebda5c7b4778859b46d0a2ae5f3 Merge: 417fa6d163df6 adc8c4549d9e7 Author: Alexei Starovoitov Date: Wed Jan 3 21:08:26 2024 -0800 Merge branch 'bpf-reduce-memory-usage-for-bpf_global_percpu_ma' Yonghong Song says: ==================== bpf: Reduce memory usage for bpf_global_percpu_ma Currently when a bpf program intends to allocate memory for percpu kptr, the verifier will call bpf_mem_alloc_init() to prefill all supported unit sizes and this caused memory consumption very big for large number of cpus. For example, for 128-cpu system, the total memory consumption with initial prefill is ~175MB. Things will become worse for systems with even more cpus. Patch 1 avoids unnecessary extra percpu memory allocation. Patch 2 adds objcg to bpf_mem_alloc at init stage so objcg can be associated with root cgroup and objcg can be passed to later bpf_mem_alloc_percpu_unit_init(). Patch 3 addresses memory consumption issue by avoiding to prefill with all unit sizes, i.e. only prefilling with user specified size. Patch 4 further reduces memory consumption by limiting the number of prefill entries for percpu memory allocation. Patch 5 has much smaller low/high watermarks for percpu allocation to reduce memory consumption. Patch 6 rejects percpu memory allocation with bpf_global_percpu_ma when allocation size is greater than 512 bytes. Patch 7 fixed test_bpf_ma test due to Patch 5. Patch 8 added one test to show the verification failure log message. Changelogs: v5 -> v6: . Change bpf_mem_alloc_percpu_init() to add objcg as one of parameters. For bpf_global_percpu_ma, the objcg is NULL, corresponding root memcg. v4 -> v5: . Do not do bpf_global_percpu_ma initialization at init stage, instead doing initialization when the verifier knows it is going to be used by bpf prog. . Using much smaller low/high watermarks for percpu allocation. v3 -> v4: . Add objcg to bpf_mem_alloc during init stage. . Initialize objcg at init stage but use it in bpf_mem_alloc_percpu_unit_init(). . Remove check_obj_size() in bpf_mem_alloc_percpu_unit_init(). v2 -> v3: . Clear the bpf_mem_cache if prefill fails. . Change test_bpf_ma percpu allocation tests to use bucket_size as allocation size instead of bucket_size - 8. . Remove __GFP_ZERO flag from __alloc_percpu_gfp() call. v1 -> v2: . Avoid unnecessary extra percpu memory allocation. . Add a separate function to do bpf_global_percpu_ma initialization . promote. . Promote function static 'sizes' array to file static. . Add comments to explain to refill only one item for percpu alloc. ==================== Link: https://lore.kernel.org/r/20231222031729.1287957-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit adc8c4549d9e74d2359c217d2478b18ecdd15c91 Author: Yonghong Song Date: Thu Dec 21 19:18:12 2023 -0800 selftests/bpf: Add a selftest with > 512-byte percpu allocation size Add a selftest to capture the verification failure when the allocation size is greater than 512. Acked-by: Hou Tao Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20231222031812.1293190-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 21f5a801c171dff4e728e38f62cf626c4197d07c Author: Yonghong Song Date: Thu Dec 21 19:18:07 2023 -0800 selftests/bpf: Cope with 512 bytes limit with bpf_global_percpu_ma In the previous patch, the maximum data size for bpf_global_percpu_ma is 512 bytes. This breaks selftest test_bpf_ma. The test is adjusted in two aspects: - Since the maximum allowed data size for bpf_global_percpu_ma is 512, remove all tests beyond that, names sizes 1024, 2048 and 4096. - Previously the percpu data size is bucket_size - 8 in order to avoid percpu allocation into the next bucket. This patch removed such data size adjustment thanks to Patch 1. Also, a better way to generate BTF type is used than adding a member to the value struct. Acked-by: Hou Tao Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20231222031807.1292853-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 5c1a37653260ed5d9c8b26fb7fe7b99629612982 Author: Yonghong Song Date: Thu Dec 21 19:18:01 2023 -0800 bpf: Limit up to 512 bytes for bpf_global_percpu_ma allocation For percpu data structure allocation with bpf_global_percpu_ma, the maximum data size is 4K. But for a system with large number of cpus, bigger data size (e.g., 2K, 4K) might consume a lot of memory. For example, the percpu memory consumption with unit size 2K and 1024 cpus will be 2K * 1K * 1k = 2GB memory. We should discourage such usage. Let us limit the maximum data size to be 512 for bpf_global_percpu_ma allocation. Acked-by: Hou Tao Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20231222031801.1290841-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 0e2ba9f96f9b82893ba19170ae48d46003f8ef44 Author: Yonghong Song Date: Thu Dec 21 19:17:55 2023 -0800 bpf: Use smaller low/high marks for percpu allocation Currently, refill low/high marks are set with the assumption of normal non-percpu memory allocation. For example, for an allocation size 256, for non-percpu memory allocation, low mark is 32 and high mark is 96, resulting in the batch allocation of 48 elements and the allocated memory will be 48 * 256 = 12KB for this particular cpu. Assuming an 128-cpu system, the total memory consumption across all cpus will be 12K * 128 = 1.5MB memory. This might be okay for non-percpu allocation, but may not be good for percpu allocation, which will consume 1.5MB * 128 = 192MB memory in the worst case if every cpu has a chance of memory allocation. In practice, percpu allocation is very rare compared to non-percpu allocation. So let us have smaller low/high marks which can avoid unnecessary memory consumption. Signed-off-by: Yonghong Song Acked-by: Hou Tao Link: https://lore.kernel.org/r/20231222031755.1289671-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 5b95e638f134e552b5ba2976326c02babe248615 Author: Yonghong Song Date: Thu Dec 21 19:17:50 2023 -0800 bpf: Refill only one percpu element in memalloc Typically for percpu map element or data structure, once allocated, most operations are lookup or in-place update. Deletion are really rare. Currently, for percpu data strcture, 4 elements will be refilled if the size is <= 256. Let us just do with one element for percpu data. For example, for size 256 and 128 cpus, the potential saving will be 3 * 256 * 128 * 128 = 12MB. Acked-by: Hou Tao Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20231222031750.1289290-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit c39aa3b289e9c10d0d246cd919b06809f13b72b8 Author: Yonghong Song Date: Thu Dec 21 19:17:45 2023 -0800 bpf: Allow per unit prefill for non-fix-size percpu memory allocator Commit 41a5db8d8161 ("Add support for non-fix-size percpu mem allocation") added support for non-fix-size percpu memory allocation. Such allocation will allocate percpu memory for all buckets on all cpus and the memory consumption is in the order to quadratic. For example, let us say, 4 cpus, unit size 16 bytes, so each cpu has 16 * 4 = 64 bytes, with 4 cpus, total will be 64 * 4 = 256 bytes. Then let us say, 8 cpus with the same unit size, each cpu has 16 * 8 = 128 bytes, with 8 cpus, total will be 128 * 8 = 1024 bytes. So if the number of cpus doubles, the number of memory consumption will be 4 times. So for a system with large number of cpus, the memory consumption goes up quickly with quadratic order. For example, for 4KB percpu allocation, 128 cpus. The total memory consumption will 4KB * 128 * 128 = 64MB. Things will become worse if the number of cpus is bigger (e.g., 512, 1024, etc.) In Commit 41a5db8d8161, the non-fix-size percpu memory allocation is done in boot time, so for system with large number of cpus, the initial percpu memory consumption is very visible. For example, for 128 cpu system, the total percpu memory allocation will be at least (16 + 32 + 64 + 96 + 128 + 196 + 256 + 512 + 1024 + 2048 + 4096) * 128 * 128 = ~138MB. which is pretty big. It will be even bigger for larger number of cpus. Note that the current prefill also allocates 4 entries if the unit size is less than 256. So on top of 138MB memory consumption, this will add more consumption with 3 * (16 + 32 + 64 + 96 + 128 + 196 + 256) * 128 * 128 = ~38MB. Next patch will try to reduce this memory consumption. Later on, Commit 1fda5bb66ad8 ("bpf: Do not allocate percpu memory at init stage") moved the non-fix-size percpu memory allocation to bpf verificaiton stage. Once a particular bpf_percpu_obj_new() is called by bpf program, the memory allocator will try to fill in the cache with all sizes, causing the same amount of percpu memory consumption as in the boot stage. To reduce the initial percpu memory consumption for non-fix-size percpu memory allocation, instead of filling the cache with all supported allocation sizes, this patch intends to fill the cache only for the requested size. As typically users will not use large percpu data structure, this can save memory significantly. For example, the allocation size is 64 bytes with 128 cpus. Then total percpu memory amount will be 64 * 128 * 128 = 1MB, much less than previous 138MB. Signed-off-by: Yonghong Song Acked-by: Hou Tao Link: https://lore.kernel.org/r/20231222031745.1289082-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 9fc8e802048ad150e8032c4f3dbf40112160cfe9 Author: Yonghong Song Date: Thu Dec 21 19:17:39 2023 -0800 bpf: Add objcg to bpf_mem_alloc The objcg is a bpf_mem_alloc level property since all bpf_mem_cache's are with the same objcg. This patch made such a property explicit. The next patch will use this property to save and restore objcg for percpu unit allocator. Acked-by: Hou Tao Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20231222031739.1288590-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 9beda16c257d55213f70adee2f16d7f13a8502e1 Author: Yonghong Song Date: Thu Dec 21 19:17:34 2023 -0800 bpf: Avoid unnecessary extra percpu memory allocation Currently, for percpu memory allocation, say if the user requests allocation size to be 32 bytes, the actually calculated size will be 40 bytes and it further rounds to 64 bytes, and eventually 64 bytes are allocated, wasting 32-byte memory. Change bpf_mem_alloc() to calculate the cache index based on the user-provided allocation size so unnecessary extra memory can be avoided. Suggested-by: Hou Tao Acked-by: Hou Tao Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20231222031734.1288400-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 904fdd2062f3101fb09db8ee077abf7ffd95e538 Author: Randy Dunlap Date: Wed Dec 20 21:31:13 2023 -0800 scsi: mpi3mr: Fix mpi3mr_fw.c kernel-doc warnings Use correct format for function return values. Delete blank lines that are reported as "bad line:". mpi3mr_fw.c:482: warning: No description found for return value of 'mpi3mr_get_reply_desc' mpi3mr_fw.c:1066: warning: bad line: mpi3mr_fw.c:1109: warning: bad line: mpi3mr_fw.c:1249: warning: No description found for return value of 'mpi3mr_revalidate_factsdata' Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20231221053113.32191-1-rdunlap@infradead.org Cc: Sathya Prakash Veerichetty Cc: Kashyap Desai Cc: Sumit Saxena Cc: Sreekanth Reddy Cc: Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: Signed-off-by: Martin K. Petersen commit 8c9955107762a23043db544d83959c4e0103bae3 Author: Don Brace Date: Tue Dec 19 13:36:52 2023 -0600 scsi: smartpqi: Bump driver version to 2.1.26-030 Reviewed-by: Mahesh Rajashekhara Reviewed-by: Murthy Bhat Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20231219193653.277553-4-don.brace@microchip.com Signed-off-by: Martin K. Petersen commit fb4cece17b4583f55b34a8538e27a4adc833c9d4 Author: Mahesh Rajashekhara Date: Tue Dec 19 13:36:51 2023 -0600 scsi: smartpqi: Fix logical volume rescan race condition Correct rescan flag race condition. Multiple conditions are being evaluated before notifying OS to do a rescan. Driver will skip rescanning the device if any one of the following conditions are met: - Devices that have not yet been added to the OS or devices that have been removed. - Devices which are already marked for removal or in the phase of removal. Under very rare conditions, after logical volume size expansion, the OS still sees the size of the logical volume which was before expansion. The rescan flag in the driver is used to signal the need for a logical volume rescan. A race condition can occur in the driver, and it leads to one thread overwriting the flag inadvertently. As a result, driver is not notifying the OS SML to rescan the logical volume. Move device->rescan update into new function pqi_mark_volumes_for_rescan() and protect with a spin lock. Move check for device->rescan into new function pqi_volume_rescan_needed() and protect function call with a spin_lock. Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Co-developed-by: Murthy Bhat Signed-off-by: Murthy Bhat Signed-off-by: Mahesh Rajashekhara Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20231219193653.277553-3-don.brace@microchip.com Signed-off-by: Martin K. Petersen commit c6d5aa44eaf6d119f9ceb3bfc7d22405ac04232a Author: David Strahan Date: Tue Dec 19 13:36:50 2023 -0600 scsi: smartpqi: Add new controller PCI IDs All PCI ID entries in Hex. Add PCI IDs for Cisco controllers: VID / DID / SVID / SDID ---- ---- ---- ---- Cisco 24G TriMode M1 RAID 4GB FBWC 32D 9005 / 028f / 1137 / 02f8 Cisco 24G TriMode M1 RAID 4GB FBWC 16D 9005 / 028f / 1137 / 02f9 Cisco 24G TriMode M1 HBA 16D 9005 / 028f / 1137 / 02fa Add PCI IDs for CloudNine controllers: VID / DID / SVID / SDID ---- ---- ---- ---- SmartRAID P7604N-16i 9005 / 028f / 1f51 / 100e SmartRAID P7604N-8i 9005 / 028f / 1f51 / 100f SmartRAID P7504N-16i 9005 / 028f / 1f51 / 1010 SmartRAID P7504N-8i 9005 / 028f / 1f51 / 1011 SmartRAID P7504N-8i 9005 / 028f / 1f51 / 1043 SmartHBA P6500-8i 9005 / 028f / 1f51 / 1044 SmartRAID P7504-8i 9005 / 028f / 1f51 / 1045 Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: David Strahan Signed-off-by: Don Brace Link: https://lore.kernel.org/r/20231219193653.277553-2-don.brace@microchip.com Signed-off-by: Martin K. Petersen commit b08d86e6eb03566c5dc32e6ff10147f80aeb7511 Author: ChanWoo Lee Date: Tue Dec 19 17:27:40 2023 +0900 scsi: ufs: qcom: Remove unnecessary goto statement from ufs_qcom_config_esi() There is only one place where goto is used, and it is unnecessary to check the ret value through 'goto out' because the ret value is already true. Therefore, remove the goto statement and integrate the '!ret' condition into the existing code. Signed-off-by: ChanWoo Lee Link: https://lore.kernel.org/r/20231219082740.27644-1-cw9316.lee@samsung.com Reviewed-by: Christophe JAILLET Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit ee36710912b2075c417100a8acc642c9c6496501 Author: Bart Van Assche Date: Mon Dec 18 14:52:15 2023 -0800 scsi: ufs: core: Remove the ufshcd_hba_exit() call from ufshcd_async_scan() Calling ufshcd_hba_exit() from a function that is called asynchronously from ufshcd_init() is wrong because this triggers multiple race conditions. Instead of calling ufshcd_hba_exit(), log an error message. Reported-by: Daniel Mentz Fixes: 1d337ec2f35e ("ufs: improve init sequence") Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20231218225229.2542156-3-bvanassche@acm.org Reviewed-by: Can Guo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit daf7795406bf307997366f694888bd317ae5b5fa Author: Bart Van Assche Date: Mon Dec 18 14:52:14 2023 -0800 scsi: ufs: core: Simplify power management during async scan ufshcd_init() calls pm_runtime_get_sync() before it calls async_schedule(). ufshcd_async_scan() calls pm_runtime_put_sync() directly or indirectly from ufshcd_add_lus(). Simplify ufshcd_async_scan() by always calling pm_runtime_put_sync() from ufshcd_async_scan(). Cc: Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20231218225229.2542156-2-bvanassche@acm.org Reviewed-by: Can Guo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 8186fff7ab649085e2c60d032d9a20a85af1d87c Author: Steven Rostedt (Google) Date: Wed Jan 3 21:50:16 2024 -0500 tracefs/eventfs: Use root and instance inodes as default ownership Instead of walking the dentries on mount/remount to update the gid values of all the dentries if a gid option is specified on mount, just update the root inode. Add .getattr, .setattr, and .permissions on the tracefs inode operations to update the permissions of the files and directories. For all files and directories in the top level instance: /sys/kernel/tracing/* It will use the root inode as the default permissions. The inode that represents: /sys/kernel/tracing (or wherever it is mounted). When an instance is created: mkdir /sys/kernel/tracing/instance/foo The directory "foo" and all its files and directories underneath will use the default of what foo is when it was created. A remount of tracefs will not affect it. If a user were to modify the permissions of any file or directory in tracefs, it will also no longer be modified by a change in ownership of a remount. The events directory, if it is in the top level instance, will use the tracefs root inode as the default ownership for itself and all the files and directories below it. For the events directory in an instance ("foo"), it will keep the ownership of what it was when it was created, and that will be used as the default ownership for the files and directories beneath it. Link: https://lore.kernel.org/linux-trace-kernel/CAHk-=wjVdGkjDXBbvLn2wbZnqP4UsH46E3gqJ9m7UG6DpX2+WA@mail.gmail.com/ Link: https://lore.kernel.org/linux-trace-kernel/20240103215016.1e0c9811@gandalf.local.home Cc: Masami Hiramatsu Cc: Mathieu Desnoyers Cc: Linus Torvalds Cc: Al Viro Cc: Christian Brauner Cc: Greg Kroah-Hartman Signed-off-by: Steven Rostedt (Google) commit 493ec81a8fb8e4ada6f223b8b73791a1280d4774 Author: Steven Rostedt (Google) Date: Wed Jan 3 20:52:49 2024 -0500 eventfs: Stop using dcache_readdir() for getdents() The eventfs creates dynamically allocated dentries and inodes. Using the dcache_readdir() logic for its own directory lookups requires hiding the cursor of the dcache logic and playing games to allow the dcache_readdir() to still have access to the cursor while the eventfs saved what it created and what it needs to release. Instead, just have eventfs have its own iterate_shared callback function that will fill in the dent entries. This simplifies the code quite a bit. Link: https://lore.kernel.org/linux-trace-kernel/20240104015435.682218477@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Linus Torvalds Cc: Ajay Kaher Cc: Al Viro Cc: Christian Brauner Signed-off-by: Steven Rostedt (Google) commit b0f7e2d739b4aac131ea1662d086a07775097b05 Author: Steven Rostedt (Google) Date: Wed Jan 3 20:52:48 2024 -0500 eventfs: Remove "lookup" parameter from create_dir/file_dentry() The "lookup" parameter is a way to differentiate the call to create_file/dir_dentry() from when it's just a lookup (no need to up the dentry refcount) and accessed via a readdir (need to up the refcount). But reality, it just makes the code more complex. Just up the refcount and let the caller decide to dput() the result or not. Link: https://lore.kernel.org/linux-trace-kernel/20240103102553.17a19cea@gandalf.local.home Link: https://lore.kernel.org/linux-trace-kernel/20240104015435.517502710@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Linus Torvalds Cc: Ajay Kaher Cc: Al Viro Cc: Christian Brauner Signed-off-by: Steven Rostedt (Google) commit b15a4cfe100b9acd097d3ae7052448bd1cdc2a3b Author: Mina Almasry Date: Tue Jan 2 12:59:58 2024 -0800 net: kcm: fix direct access to bv_len Minor fix for kcm: code wanting to access the fields inside an skb frag should use the skb_frag_*() helpers, instead of accessing the fields directly. Signed-off-by: Mina Almasry Link: https://lore.kernel.org/r/20240102205959.794513-1-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 06d9b446c4d445f0facb4b87cbbaeacd28c5a747 Author: Mina Almasry Date: Tue Jan 2 12:59:04 2024 -0800 vsock/virtio: use skb_frag_*() helpers Minor fix for virtio: code wanting to access the fields inside an skb frag should use the skb_frag_*() helpers, instead of accessing the fields directly. This allows for extensions where the underlying memory is not a page. Acked-by: Stefano Garzarella Signed-off-by: Mina Almasry Link: https://lore.kernel.org/r/20240102205905.793738-1-almasrymina@google.com Signed-off-by: Jakub Kicinski commit 530496985ceae54b78c301baf7819eac0012d0f8 Author: Pedro Tammela Date: Fri Dec 29 10:26:42 2023 -0300 net/sched: sch_api: conditional netlink notifications Implement conditional netlink notifications for Qdiscs and classes, which were missing in the initial patches that targeted tc filters and actions. Notifications will only be built after passing a check for 'rtnl_notify_needed()'. For both Qdiscs and classes 'get' operations now call a dedicated notification function as it was not possible to distinguish between 'create' and 'get' before. This distinction is necessary because 'get' always send a notification. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231229132642.1489088-2-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit c2a67de9bb543394aee869d1c68b5fbcd8a89dcb Author: Pedro Tammela Date: Fri Dec 29 10:26:41 2023 -0300 net/sched: introduce ACT_P_BOUND return code Bound actions always return '0' and as of today we rely on '0' being returned in order to properly skip bound actions in tcf_idr_insert_many. In order to further improve maintainability, introduce the ACT_P_BOUND return code. Actions are updated to return 'ACT_P_BOUND' instead of plain '0'. tcf_idr_insert_many is then updated to check for 'ACT_P_BOUND'. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231229132642.1489088-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit d3d344a1ca69d8fb2413e29e6400f3ad58a05c06 Author: Eric Dumazet Date: Tue Jan 2 16:22:20 2024 +0000 net-device: move xdp_prog to net_device_read_rx xdp_prog is used in receive path, both from XDP enabled drivers and from netif_elide_gro(). This patch also removes two 4-bytes holes. Fixes: 43a71cd66b9c ("net-device: reorganize net_device fast path variables") Signed-off-by: Eric Dumazet Cc: Coco Li Cc: Simon Horman Link: https://lore.kernel.org/r/20240102162220.750823-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit a562a0272ccec75191001fb138956fd1bf2c5f93 Merge: 09f9d7a87c70b 55f96e8bbea09 Author: Jakub Kicinski Date: Wed Jan 3 18:07:59 2024 -0800 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-01-02 (ixgbe, i40e) This series contains updates to ixgbe and i40e drivers. Ovidiu Panait adds reporting of VF link state to ixgbe. Jedrzej removes uses of IXGBE_ERR* codes to instead use standard error codes. Andrii modifies behavior of VF disable to properly shut down queues on i40e. Simon Horman removes, undesired, use of comma operator for i40e. * '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: i40e: Avoid unnecessary use of comma operator i40e: Fix VF disable behavior to block all traffic ixgbe: Refactor returning internal error codes ixgbe: Refactor overtemp event handling ixgbe: report link state for VF devices ==================== Link: https://lore.kernel.org/r/20240102222429.699129-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 09f9d7a87c70beb47e1dca10ee6ac6685da73aac Merge: 4ebb1f95e0c3c 782345d248749 Author: Jakub Kicinski Date: Wed Jan 3 18:01:00 2024 -0800 Merge branch 'ena-driver-xdp-changes' David Arinzon says: ==================== ENA driver XDP changes This patchset contains multiple XDP-related changes in the ENA driver, including moving the XDP code to dedicated files. ==================== Link: https://lore.kernel.org/r/20240101190855.18739-1-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit 782345d248749c461bfb648fb4de855a2bc3e496 Author: David Arinzon Date: Mon Jan 1 19:08:55 2024 +0000 net: ena: Take xdp packets stats into account in ena_get_stats64() Queue stats using ifconfig and ip are retrieved via ena_get_stats64(). This function currently does not take the xdp sent or dropped packets stats into account. This commit adds the following xdp stats to ena_get_stats64(): tx bytes sent tx packets sent rx dropped packets Signed-off-by: Arthur Kiyanovski Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-12-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit 4f28e789be761a57176904c01959cc9d439bd17a Author: David Arinzon Date: Mon Jan 1 19:08:54 2024 +0000 net: ena: Make queue stats code cleaner by removing the if block Also shorten comment related to it. Signed-off-by: Arthur Kiyanovski Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-11-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit ea5c460023aad8d97e206e57ca4ce9d1b733c430 Author: David Arinzon Date: Mon Jan 1 19:08:53 2024 +0000 net: ena: Always register RX queue info The RX queue info contains information about the RX queue which might be relevant to the kernel. To avoid configuring this queue for different scenarios, this patch moves the RX queue configuration to ena_up()/ena_down() function and makes it configured every interface state toggle. Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-10-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit 2b02e332c1519572f454838400640f9a4d482de5 Author: David Arinzon Date: Mon Jan 1 19:08:52 2024 +0000 net: ena: Add more debug prints to XDP related function Used for better readability and debugging of XDP flow. Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-9-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit b626fd9627d40fd291289dba9b53cd5cdbb17362 Author: David Arinzon Date: Mon Jan 1 19:08:51 2024 +0000 net: ena: Refactor napi functions This patch focuses on changes to the XDP part of the napi polling routine. 1. Update the `napi_comp` stat only when napi is actually complete. 2. Simplify the code by using a function pointer to the right napi routine (XDP vs non-XDP path) 3. Remove unnecessary local variables. 4. Adjust a debug print to show the processed XDP frame index rather than the pointer. Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-8-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit 436c793585951464e2b679c440083daa19f6fb02 Author: David Arinzon Date: Mon Jan 1 19:08:50 2024 +0000 net: ena: Don't check if XDP program is loaded in ena_xdp_execute() This check is already done in ena_clean_rx_irq() which indirectly calls it. This function is called in napi context and the driver doesn't allow to change the XDP program without performing destruction and reinitialization of napi context (part of ena_down/ena_up sequence). Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-7-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit 911a8c960110b03ed519ce43ea6c9990a0ee0ceb Author: David Arinzon Date: Mon Jan 1 19:08:49 2024 +0000 net: ena: Use tx_ring instead of xdp_ring for XDP channel TX When an XDP program is loaded the existing channels in the driver split into two halves: - The first half of the channels contain RX and TX rings, these queues are used for receiving traffic and sending packets originating from kernel. - The second half of the channels contain only a TX ring. These queues are used for sending packets that were redirected using XDP_TX or XDP_REDIRECT. Referring to the queues in the second half of the channels as "xdp_ring" can be confusing and may give the impression that ENA has the capability to generate an additional special queue. This patch ensures that the xdp_ring field is exclusively used to describe the XDP TX queue that a specific RX queue needs to utilize when forwarding packets with XDP TX and XDP REDIRECT, preserving the integrity of the xdp_ring field in ena_ring. Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-6-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit 23ec97498026f57793be1f76c4e78b494911db1a Author: David Arinzon Date: Mon Jan 1 19:08:48 2024 +0000 net: ena: Introduce total_tx_size field in ena_tx_buffer struct To avoid de-referencing skb or xdp_frame when we poll for TX completion (where they might not be in the cache), save the total TX packet size in the ena_tx_buffer object representing the packet. Also the 'print_once' field's type was changed from u32 to u8 to allow adding the 'total_tx_size' without changing the total size of the struct. Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-5-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit 009b387659d3c739863b61a9f142e731f5723153 Author: David Arinzon Date: Mon Jan 1 19:08:47 2024 +0000 net: ena: Put orthogonal fields in ena_tx_buffer in a union The skb and xdpf pointers cannot be set together in the driver (each TX descriptor can send either an SKB or an XDP frame), and so it makes more sense to put them both in a union. This decreases the overall size of the ena_tx_buffer struct which improves cache locality. Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-4-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit 39a044f4dcfee1c776603a6589b6fb98a9e222f2 Author: David Arinzon Date: Mon Jan 1 19:08:46 2024 +0000 net: ena: Pass ena_adapter instead of net_device to ena_xmit_common() This change will enable the ability to use ena_xmit_common() in functions that don't have a net_device pointer. While it can be retrieved by dereferencing ena_adapter (adapter->netdev), there's no reason to do it in fast path code where this pointer is only needed for debug prints. Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-3-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit d000574d02870710c62751148cbfe22993222b98 Author: David Arinzon Date: Mon Jan 1 19:08:45 2024 +0000 net: ena: Move XDP code to its new files XDP system has a very large footprint in the driver's overall code. makes the whole driver's code much harder to read. Moving XDP code to dedicated files. This patch doesn't make any changes to the code itself and only cut-pastes the code into ena_xdp.c and ena_xdp.h files so the change is purely cosmetic. Signed-off-by: Shay Agroskin Signed-off-by: David Arinzon Link: https://lore.kernel.org/r/20240101190855.18739-2-darinzon@amazon.com Signed-off-by: Jakub Kicinski commit c7ad3dc3649730af483ee1e78be5d0362da25bfe Author: Jim Harris Date: Fri Nov 3 20:18:34 2023 +0000 cxl/region: fix x9 interleave typo CXL supports x3, x6 and x12 - not x9. Fixes: 80d10a6cee050 ("cxl/region: Add interleave geometry attributes") Signed-off-by: Jim Harris Reviewed-by: Dave Jiang Reviewed-by: Fan Ni Link: https://lore.kernel.org/r/169904271254.204936.8580772404462743630.stgit@ubuntu Signed-off-by: Dan Williams commit 4ebb1f95e0c3c3e0eec5bb21aa43097580c4b6e4 Author: Suman Ghosh Date: Mon Jan 1 20:20:42 2024 +0530 octeontx2-af: Fix max NPC MCAM entry check while validating ref_entry As of today, the last MCAM entry was not getting allocated because of a <= check with the max_bmap count. This patch modifies that and if the requested entry is greater than the available entries then set it to the max value. Signed-off-by: Suman Ghosh Link: https://lore.kernel.org/r/20240101145042.419697-1-sumang@marvell.com Signed-off-by: Jakub Kicinski commit 05d92cb0e919239c29b3a26da1f76f1e18fed7d3 Author: Yujie Liu Date: Fri Dec 29 21:19:31 2023 +0800 selftests/net: change shebang to bash to support "source" The patch set [1] added a general lib.sh in net selftests, and converted several test scripts to source the lib.sh. unicast_extensions.sh (converted in [1]) and pmtu.sh (converted in [2]) have a /bin/sh shebang which may point to various shells in different distributions, but "source" is only available in some of them. For example, "source" is a built-it function in bash, but it cannot be used in dash. Refer to other scripts that were converted together, simply change the shebang to bash to fix the following issues when the default /bin/sh points to other shells. not ok 51 selftests: net: unicast_extensions.sh # exit=1 v1 -> v2: - Fix pmtu.sh which has the same issue as unicast_extensions.sh, suggested by Hangbin - Change the style of the "source" line to be consistent with other tests, suggested by Hangbin Link: https://lore.kernel.org/all/20231202020110.362433-1-liuhangbin@gmail.com/ [1] Link: https://lore.kernel.org/all/20231219094856.1740079-1-liuhangbin@gmail.com/ [2] Reported-by: kernel test robot Fixes: 378f082eaf37 ("selftests/net: convert pmtu.sh to run it in unique namespace") Fixes: 0f4765d0b48d ("selftests/net: convert unicast_extensions.sh to run it in unique namespace") Signed-off-by: Yujie Liu Reviewed-by: Przemek Kitszel Reviewed-by: Hangbin Liu Reviewed-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20231229131931.3961150-1-yujie.liu@intel.com Signed-off-by: Jakub Kicinski commit 417fa6d163df6f13fb2cfad5132eff354c8a472e Merge: b4560055c8f11 bdbca46d3f84a Author: Martin KaFai Lau Date: Wed Jan 3 16:34:32 2024 -0800 Merge branch 'fix sockmap + stream af_unix memleak' John Fastabend says: ==================== There was a memleak when streaming af_unix sockets were inserted into multiple sockmap slots and/or maps. This is because each insert would call a proto update operatino and these must be allowed to be called multiple times. The streaming af_unix implementation recently added a refcnt to handle a use after free issue, however it introduced a memleak when inserted into multiple maps. This series fixes the memleak, adds a note in the code so we remember that proto updates need to support this. And then we add three tests for each of the slightly different iterations of adding sockets into multiple maps. I kept them as 3 independent test cases here. I have some slight preference for this they could however be a single test, but then you don't get to run them independently which was sort of useful while debugging. ==================== Signed-off-by: Martin KaFai Lau commit bdbca46d3f84a4455cd5c15a7483666218851549 Author: John Fastabend Date: Thu Dec 21 15:23:27 2023 -0800 bpf: sockmap, add tests for proto updates replace socket Add test that replaces the same socket with itself. This exercises a corner case where old element and new element have the same posck. Test protocols: TCP, UDP, stream af_unix and dgram af_unix. Signed-off-by: John Fastabend Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/r/20231221232327.43678-6-john.fastabend@gmail.com commit f1300467dd9f67293a7aae86fd26471520fac36d Author: John Fastabend Date: Thu Dec 21 15:23:26 2023 -0800 bpf: sockmap, add tests for proto updates single socket to many map Add test with multiple maps where each socket is inserted in multiple maps. Test protocols: TCP, UDP, stream af_unix and dgram af_unix. Signed-off-by: John Fastabend Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/r/20231221232327.43678-5-john.fastabend@gmail.com commit 8c1b382a555adcd2008ae964047a35b739dfaf24 Author: John Fastabend Date: Thu Dec 21 15:23:25 2023 -0800 bpf: sockmap, add tests for proto updates many to single map Add test with a single map where each socket is inserted multiple times. Test protocols: TCP, UDP, stream af_unix and dgram af_unix. Signed-off-by: John Fastabend Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/r/20231221232327.43678-4-john.fastabend@gmail.com commit 7865dfb1eb941ddd25802a9e13b6ff5f3f4dc02f Author: John Fastabend Date: Thu Dec 21 15:23:24 2023 -0800 bpf: sockmap, added comments describing update proto rules Add a comment describing that the psock update proto callbback can be called multiple times and this must be safe. Signed-off-by: John Fastabend Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/r/20231221232327.43678-3-john.fastabend@gmail.com commit 16b2f264983dc264c1560cc0170e760dec1bf54f Author: John Fastabend Date: Thu Dec 21 15:23:23 2023 -0800 bpf: sockmap, fix proto update hook to avoid dup calls When sockets are added to a sockmap or sockhash we allocate and init a psock. Then update the proto ops with sock_map_init_proto the flow is sock_hash_update_common sock_map_link psock = sock_map_psock_get_checked() <-returns existing psock sock_map_init_proto(sk, psock) <- updates sk_proto If the socket is already in a map this results in the sock_map_init_proto being called multiple times on the same socket. We do this because when a socket is added to multiple maps this might result in a new set of BPF programs being attached to the socket requiring an updated ops struct. This creates a rule where it must be safe to call psock_update_sk_prot multiple times. When we added a fix for UAF through unix sockets in patch 4dd9a38a753fc we broke this rule by adding a sock_hold in that path to ensure the sock is not released. The result is if a af_unix stream sock is placed in multiple maps it results in a memory leak because we call sock_hold multiple times with only a single sock_put on it. Fixes: 8866730aed51 ("bpf, sockmap: af_unix stream sockets need to hold ref for pair sock") Reported-by: Xingwei Lee Signed-off-by: John Fastabend Signed-off-by: Martin KaFai Lau Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/r/20231221232327.43678-2-john.fastabend@gmail.com commit b4c1d4d9734cda4394da5b59ebf7d9ca3579561a Author: Zhengchao Shao Date: Tue Jan 2 15:15:19 2024 +0800 fib: remove unnecessary input parameters in fib_default_rule_add When fib_default_rule_add is invoked, the value of the input parameter 'flags' is always 0. Rules uses kzalloc to allocate memory, so 'flags' has been initialized to 0. Therefore, remove the input parameter 'flags' in fib_default_rule_add. Signed-off-by: Zhengchao Shao Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20240102071519.3781384-1-shaozhengchao@huawei.com Signed-off-by: Jakub Kicinski commit 5fe65375e3d45b9db11783eea067dfe404752d2f Author: Marcin Wojtas Date: Sun Dec 31 12:20:19 2023 +0000 net: mvpp2: initialize port fwnode pointer Update the port's device structure also with its fwnode pointer with a recommended device_set_node() helper routine. Signed-off-by: Marcin Wojtas Reviewed-by: Suman Ghosh Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20231231122019.123344-1-marcin.s.wojtas@gmail.com Signed-off-by: Jakub Kicinski commit 73b2e2e3fe26f97010444e29536b3e815bbc57da Author: Ilpo Järvinen Date: Fri Dec 29 16:52:32 2023 +0200 net: mdio: mux-bcm-iproc: Use alignment helpers and SZ_4K Instead of open coding, use IS_ALIGNED() and ALIGN_DOWN() when dealing with alignment. Replace also literals with SZ_4K. Signed-off-by: Ilpo Järvinen Reviewed-by: Florian Fainelli Acked-by: Ray Jui Link: https://lore.kernel.org/r/20231229145232.6163-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Jakub Kicinski commit 16615a2aa5370a3f16422e9bfdbe07c2204f8513 Author: Krzysztof Kozlowski Date: Fri Nov 24 10:46:20 2023 +0100 arm64: dts: intel: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit e3c163c3a0f4165892a9358648170b1749887c42 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:44 2023 +0100 arm64: dts: socfpga: agilex: drop redundant status New device nodes are enabled by default. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 68d550d00cb3d1d45f6848dd76c2565dfe519201 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:43 2023 +0100 arm64: dts: socfpga: agilex: add unit address to soc node The "soc" node has ranges with addresses, so it is should have unit address to fix dtc W=1 warnings like: socfpga_agilex.dtsi:152.6-674.4: Warning (unit_address_vs_reg): /soc: node has a reg or ranges property, but no unit name Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 23c3ebed382a9e9c57a86d9993964fddd2d6239b Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:42 2023 +0100 arm64: dts: socfpga: agilex: move firmware out of soc node The "soc" node is supposed to have only MMIO children, so move the firmware/svc node to top level to fix dtc W=1 warnings like: socfpga_agilex.dtsi:663.12-673.5: Warning (simple_bus_reg): /soc@0/firmware: missing or empty reg/ranges property The node should still be instantiated by drivers/of/platform.c, just like in all other platforms. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit eb687212560278a689d80e1140c7d15950989ab2 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:41 2023 +0100 arm64: dts: socfpga: agilex: move FPGA region out of soc node The "soc" node is supposed to have only MMIO children, so move the FPGA region node to top level to fix dtc W=1 warnings like: socfpga_agilex.dtsi:141.20-146.5: Warning (simple_bus_reg): /soc@0/base_fpga_region: missing or empty reg/ranges property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 5c7c75b9cd261fc6f86ff0dd12fb213336003c26 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:40 2023 +0100 arm64: dts: socfpga: agilex: align pin-controller name with bindings Use a generic node name for the pin controller node to fix: /socfpga_agilex_n6000.dtb: pinconf@ffd13100: $nodename:0: 'pinconf@ffd13100' does not match '^(pinctrl|pinmux)(@[0-9a-f]+)?$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 9241b019b2350e40053b0cc38918daaf3e070e73 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:39 2023 +0100 arm64: dts: socfpga: stratix10_swvp: drop unsupported DW MSHC properties altr,dw-mshc-ciu-div and altr,dw-mshc-sdr-timing are neither documented nor used by Linux, so remove them to fix dtbs_check warnings like: socfpga_stratix10_swvp.dtb: mmc@ff808000: Unevaluated properties are not allowed ('altr,dw-mshc-ciu-div', 'altr,dw-mshc-sdr-timing' were unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 30bc6904221794c0a0a6c6f9b3436efa9729908a Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:38 2023 +0100 arm64: dts: socfpga: stratix10_socdk: align NAND chip name with bindings Bindings expect NAND child node name to match certain patterns: socfpga_agilex_socdk_nand.dtb: nand-controller@ffb90000: Unevaluated properties are not allowed ('flash@0' was unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 5e53525fc63eed87539874159f715a41165d86e3 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:37 2023 +0100 arm64: dts: socfpga: stratix10: add unit address to soc node The "soc" node has ranges with addresses, so it is should have unit address to fix dtc W=1 warnings like: socfpga_stratix10.dtsi:128.6-636.4: Warning (unit_address_vs_reg): /soc: node has a reg or ranges property, but no unit name Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 9fc0511a472f2aec4b780caee7c3fddc84016fd6 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:36 2023 +0100 arm64: dts: socfpga: stratix10: move firmware out of soc node The "soc" node is supposed to have only MMIO children, so move the firmware/svc node to top level to fix dtc W=1 warnings like: socfpga_stratix10.dtsi:625.12-635.5: Warning (simple_bus_reg): /soc@0/firmware: missing or empty reg/ranges property The node should still be instantiated by drivers/of/platform.c, just like in all other platforms. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 5c8f036f92961512b92b27cdc267330957debda9 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:35 2023 +0100 arm64: dts: socfpga: stratix10: move FPGA region out of soc node The "soc" node is supposed to have only MMIO children, so move the FPGA region node to top level to fix dtc W=1 warnings like: socfpga_stratix10.dtsi:136.20-141.5: Warning (simple_bus_reg): /soc@0/base_fpga_region: missing or empty reg/ranges property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 179e58703e162eaa30c67741c3cf6bf435e97b88 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:34 2023 +0100 arm64: dts: socfpga: stratix10: align pincfg nodes with bindings pinctrl-single bindings require pin configuration node names to match certain patterns: socfpga_stratix10_socdk.dtb: pinctrl@ffd13000: 'i2c1-pmx-func', 'i2c1-pmx-func-gpio' do not match any of the regexes: '-pins(-[0-9]+)?$|-pin$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 91b491fd03d996be4d924cce42018d286d8e104b Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:33 2023 +0100 arm64: dts: socfpga: stratix10: add clock-names to DWC2 USB The DWC2 USB bindings require clock-names property, to provide such to fix warnings like: socfpga_stratix10_swvp.dtb: usb@ffb40000: 'clock-names' is a required property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 2241f81c91f211b512bd2c3a26a4a74258d0e008 Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:32 2023 +0100 arm64: dts: socfpga: drop unsupported cdns,page-size and cdns,block-size cdns,page-size and cdns,block-size are neither documented nor used by Linux, so remove them to fix dtbs_check warnings like: socfpga_n5x_socdk.dtb: flash@0: Unevaluated properties are not allowed ('cdns,block-size', 'cdns,page-size' were unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 575c726ce854b144a8d844943a9a9c3d189b37fd Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:31 2023 +0100 ARM: dts: socfpga: align NAND controller name with bindings Bindings expect NAND controller node name to match certain patterns: socfpga_arria10_socdk_nand.dtb: nand@ffb90000: $nodename:0: 'nand@ffb90000' does not match '^nand-controller(@.*)?' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit a5db395a1cef0b8335fc7f70a6790d074957a62d Author: Krzysztof Kozlowski Date: Sat Dec 9 18:30:30 2023 +0100 ARM: dts: socfpga: drop unsupported cdns,page-size and cdns,block-size cdns,page-size and cdns,block-size are neither documented nor used by Linux, so remove them to fix dtbs_check warnings like: socfpga_arria5_socdk.dtb: flash@0: Unevaluated properties are not allowed ('cdns,block-size', 'cdns,page-size' were unexpected) Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 4b4719437d85f0173d344f2c76fa1a5b7f7d184b Author: Sam Shih Date: Sun Dec 17 21:50:15 2023 +0000 clk: mediatek: add drivers for MT7988 SoC Add APMIXED, ETH, INFRACFG and TOPCKGEN clock drivers which are typical MediaTek designs. Also add driver for XFIPLL clock generating the 156.25MHz clock for the XFI SerDes. It needs an undocumented software workaround and has an unknown internal design. Signed-off-by: Sam Shih Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/c7574d808e2da1a530182f0fd790c1337c336e1b.1702849494.git.daniel@makrotopia.org [sboyd@kernel.org: Add module license to infracfg file] Signed-off-by: Stephen Boyd commit d9bf944beaaad1890ad3fcb755c61e1c7e4c5630 Author: Sam Shih Date: Sun Dec 17 21:50:07 2023 +0000 clk: mediatek: add pcw_chg_bit control for PLLs of MT7988 Introduce pcw_chg_bit member to struct mtk_pll_data and use it instead of the previously hardcoded PCW_CHG_MASK macro if set. This will needed for clocks on the MT7988 SoC. Signed-off-by: Sam Shih Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/3b9c65ddb08c8bedf790aacf29871af026b6f0b7.1702849494.git.daniel@makrotopia.org Signed-off-by: Stephen Boyd commit afd36e9d91b0a840983b829a9e95407d8151f7e7 Author: Daniel Golle Date: Sun Dec 17 21:49:55 2023 +0000 dt-bindings: clock: mediatek: add clock controllers of MT7988 Add various clock controllers found in the MT7988 SoC to existing bindings (if applicable) and add files for the new ethwarp, mcusys and xfi-pll clock controllers not previously present in any SoC. Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/07e76a544ce4392bcb88e34d5480e99bb7994618.1702849494.git.daniel@makrotopia.org Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit 5cfa3beb7761cb84be77225902e018d9d3f9b973 Author: Daniel Golle Date: Sun Dec 17 21:49:45 2023 +0000 dt-bindings: reset: mediatek: add MT7988 ethwarp reset IDs Add reset ID for ethwarp subsystem allowing to reset the built-in Ethernet switch of the MediaTek MT7988 SoC. Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/0c14bbacf471683af67ffa7572bfa1d5c45a0b5d.1702849494.git.daniel@makrotopia.org Signed-off-by: Stephen Boyd commit 8187e001de156e99ef95366ffd10d627ed090826 Author: Sam Shih Date: Sun Dec 17 21:49:33 2023 +0000 dt-bindings: clock: mediatek: add MT7988 clock IDs Add MT7988 clock dt-bindings for topckgen, apmixedsys, infracfg, ethernet and xfipll subsystem clocks. Signed-off-by: Sam Shih Signed-off-by: Daniel Golle Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/27f99db432e9ccc804cc5b6501d7d17d72cae879.1702849494.git.daniel@makrotopia.org Signed-off-by: Stephen Boyd commit ebbf49d4cf0a816a6a4a3e8b8d7a077940fb1db3 Author: AngeloGioacchino Del Regno Date: Fri Nov 3 11:25:33 2023 +0100 clk: mediatek: mt8188-topckgen: Refactor parents for top_dp/edp muxes The top_dp and top_edp muxes can be both parented to either TVDPLL1 or TVDPLL2, two identically specced PLLs for the specific purpose of giving out pixel clock: this becomes a problem when the MediaTek DisplayPort Interface (DPI) driver tries to set the pixel clock rate. In the usecase of two simultaneous outputs (using two controllers), it was seen that one of the displays would sometimes display garbled output (if any at all) and this was because: - top_edp was set to TVDPLL1, outputting X GHz - top_dp was set to TVDPLL2, outputting Y GHz - mtk_dpi calls clk_set_rate(top_edp, Z GHz) - top_dp is switched to TVDPLL1 - TVDPLL1 changes its rate, top_edp outputs the wrong rate. - eDP display is garbled To solve this issue, remove all TVDPLL1 parents from `top_dp` and all TVDPLL2 parents from `top_edp`, plus, necessarily switch both clocks to use the new MUX_GATE_CLR_SET_UPD_INDEXED() macro to be able to use the right bit index for the new parents list. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231103102533.69280-4-angelogioacchino.delregno@collabora.com Reviewed-by: Alexandre Mergnat Reviewed-by: Chen-Yu Tsai Tested-by: Fei Shao Reviewed-by: Fei Shao Signed-off-by: Stephen Boyd commit 831f9216a79a2930ecd449116889ef74f29a7411 Author: AngeloGioacchino Del Regno Date: Fri Nov 3 11:25:32 2023 +0100 clk: mediatek: mt8195-topckgen: Refactor parents for top_dp/edp muxes The top_dp and top_edp muxes can be both parented to either TVDPLL1 or TVDPLL2, two identically specced PLLs for the specific purpose of giving out pixel clock: this becomes a problem when the MediaTek DisplayPort Interface (DPI) driver tries to set the pixel clock rate. In the usecase of two simultaneous outputs (using two controllers), it was seen that one of the displays would sometimes display garbled output (if any at all) and this was because: - top_edp was set to TVDPLL1, outputting X GHz - top_dp was set to TVDPLL2, outputting Y GHz - mtk_dpi calls clk_set_rate(top_edp, Z GHz) - top_dp is switched to TVDPLL1 - TVDPLL1 changes its rate, top_edp outputs the wrong rate. - eDP display is garbled To solve this issue, remove all TVDPLL1 parents from `top_dp` and all TVDPLL2 parents from `top_edp`, plus, necessarily switch both clocks to use the new MUX_GATE_CLR_SET_UPD_INDEXED() macro to be able to use the right bit index for the new parents list. Reviewed-by: Alexandre Mergnat Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231103102533.69280-3-angelogioacchino.delregno@collabora.com Reviewed-by: Fei Shao Signed-off-by: Stephen Boyd commit a6a70a670c7d8964455fc9bb3ab53b2df0a14150 Author: AngeloGioacchino Del Regno Date: Fri Nov 3 11:25:31 2023 +0100 clk: mediatek: clk-mux: Support custom parent indices for muxes Add support for customized parent indices for MediaTek muxes: this is necessary for the case in which we want to exclude some clocks from a mux's parent clocks list, where the exclusions are not from the very bottom of the list but either in the middle or the beginning. Example: - MUX1 (all parents) - parent1; idx=0 - parent2; idx=1 - parent3; idx=2 - MUX1 (wanted parents) - parent1; idx=0 - parent3; idx=2 To achieve that add a `parent_index` array pointer to struct mtk_mux, then in .set_parent(), .get_parent() callbacks check if this array was populated and eventually get the index from that. Also, to avoid updating all clock drivers for all SoCs, rename the "main" macro to __GATE_CLR_SET_UPD_FLAGS (so, `__` was added) and add the new member to it; furthermore, GATE_CLK_SET_UPD_FLAGS has been reintroduced as being fully compatible with the older version. The new parent_index can be specified with the new `_INDEXED` variants of the MUX_GATE_CLR_SET_UPD_xxxx macros. Reviewed-by: Alexandre Mergnat Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231103102533.69280-2-angelogioacchino.delregno@collabora.com Tested-by: Fei Shao Reviewed-by: Fei Shao Signed-off-by: Stephen Boyd commit 145916f6895addab982a8ba13451da9d19e31e27 Merge: b85ea95d08647 5205628ab0bfe Author: Stephen Boyd Date: Wed Jan 3 15:54:05 2024 -0800 Merge tag 'clk-meson-v6.8-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clk driver updates from Jerome Brunet: - Add DSI clocks on Amlogic g12/sm1 - Add CSI and ISP clocks on Amlogic g12/sm1 * tag 'clk-meson-v6.8-1' of https://github.com/BayLibre/clk-meson: clk: meson: g12a: add CSI & ISP gates clocks clk: meson: g12a: add MIPI ISP clocks dt-bindings: clock: g12a-clkc: add MIPI ISP & CSI PHY clock ids clk: meson: g12a: add CTS_ENCL & CTS_ENCL_SEL clocks dt-bindings: clk: g12a-clkc: add CTS_ENCL clock ids commit f1b591217fd0b5dc419f6ca05790c24c8f84c278 Merge: b85ea95d08647 f52f00069888e Author: Stephen Boyd Date: Wed Jan 3 15:53:49 2024 -0800 Merge tag 'clk-imx-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux into clk-imx Pull i.MX clk driver updates from Abel Vesa: - Document bindings for i.MX93 ANATOP clock driver - Free clk_node in SCU driver for resource with different owner - Update the LVDS clocks to be compatible with SCU firmware 1.15 - Fix the name of the fvco in pll14xx by renaming it to fout * tag 'clk-imx-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux: clk: imx: pll14xx: change naming of fvco to fout clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks clk: imx: scu: Fix memory leak in __imx_clk_gpr_scu() dt-bindings: clock: support i.MX93 ANATOP clock module commit 93beaa981a2d10ad749fdf8650ddb5d936636f09 Merge: b85ea95d08647 757d1ca14f94e Author: Stephen Boyd Date: Wed Jan 3 15:53:09 2024 -0800 Merge tag 'qcom-clk-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-qcom Pull Qualcomm clk driver updates from Bjorn Andersson: - New drivers to support global, display, gpu, tcsr, and rpmh clocks on Qualcomm SM8650 - Global and RPMh clock support for the Qualcomm X1E80100 SoC - Support for the Stromer APCS PLL found in Qualcomm IPQ5018 - Add a new type of branch clock, with support for controlling separate memory control bits, to the Qualcomm clk driver - Use new branch type in Qualcomm ECPRI clk driver for QDU1000 and QRU1000 - Add a number of missing clocks related to CSI2 on Qualcomm MSM8939 - Add support for the camera clock controller on Qualcomm SC8280XP - Correct PLL configuration in GPU and video clock controllers for Qualcomm SM8150 - Add runtime PM support and a few missing resets to Qualcomm SM8150 video clock controller - Fix configuration of various GCC GDSCs on Qualcomm SM8550 - Mark shared RCGs appropriately in the Qualcomm SM8550 GCC driver - Fix up GPU and display clock controllers PLL configuration settings on Qualcomm SM8550 * tag 'qcom-clk-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (41 commits) clk: qcom: dispcc-sm8650: Add test_ctl parameters to PLL config clk: qcom: gpucc-sm8650: Add test_ctl parameters to PLL config clk: qcom: dispcc-sm8550: Use the correct PLL configuration function clk: qcom: dispcc-sm8550: Update disp PLL settings clk: qcom: gpucc-sm8550: Update GPU PLL settings clk: qcom: gcc-sm8550: Mark RCGs shared where applicable clk: qcom: gcc-sm8550: use collapse-voting for PCIe GDSCs clk: qcom: gcc-sm8550: Mark the PCIe GDSCs votable clk: qcom: gcc-sm8550: Add the missing RETAIN_FF_ENABLE GDSC flag clk: qcom: camcc-sc8280xp: Prevent error pointer dereference clk: qcom: videocc-sm8150: Add runtime PM support clk: qcom: videocc-sm8150: Add missing PLL config property clk: qcom: videocc-sm8150: Update the videocc resets dt-bindings: clock: Update the videocc resets for sm8150 clk: qcom: rpmh: Add support for X1E80100 rpmh clocks clk: qcom: Add Global Clock controller (GCC) driver for X1E80100 dt-bindings: clock: qcom-rpmhcc: Add RPMHCC bindings for X1E80100 dt-bindings: clock: qcom: Add X1E80100 GCC clocks clk: qcom: Add ECPRICC driver support for QDU1000 and QRU1000 clk: qcom: branch: Add mem ops support for branch2 clocks ... commit 5a72f0711151b5ccdd14e22ff5f2ba3605483a95 Author: Inochi Amaoto Date: Mon Dec 18 12:04:03 2023 +0800 dt-bindings: clock: sophgo: Add clock controller of CV1800 series SoC Add definition for the clock controller of the CV1800 series SoC. For CV181X, it has a clock that CV180X does not have. To avoid misuse, also add a compatible string to identify CV181X series SoC. Signed-off-by: Inochi Amaoto Link: https://github.com/milkv-duo/duo-files/blob/main/hardware/CV1800B/CV1800B-CV1801B-Preliminary-Datasheet-full-en.pdf Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/IA1PR20MB49535E448097F6FFC1218C39BB90A@IA1PR20MB4953.namprd20.prod.outlook.com Signed-off-by: Stephen Boyd commit 4287cd628f77de6ddaa1f458274a5337f373b040 Author: Emil Renner Berthing Date: Wed Dec 20 01:24:40 2023 +0200 clk: starfive: jh7100: Add CLK_SET_RATE_PARENT to gmac_tx This is needed by the dwmac-starfive ethernet driver to set the clock for 1000, 100 and 10 Mbps links properly. Signed-off-by: Emil Renner Berthing Signed-off-by: Cristian Ciocaltea Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20231219232442.2460166-3-cristian.ciocaltea@collabora.com Signed-off-by: Stephen Boyd commit a242b2051ba2ec2d042680c381fdb7e34e66278d Author: Emil Renner Berthing Date: Wed Dec 20 01:24:39 2023 +0200 clk: starfive: Add flags argument to JH71X0__MUX macro This flag is needed to add the CLK_SET_RATE_PARENT flag on the gmac_tx clock on the JH7100, which in turn is needed by the dwmac-starfive driver to set the clock properly for 1000, 100 and 10 Mbps links. This change was mostly made using coccinelle: @ match @ expression idx, name, nparents; @@ JH71X0__MUX( -idx, name, nparents, +idx, name, 0, nparents, ...) Signed-off-by: Emil Renner Berthing Signed-off-by: Cristian Ciocaltea Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20231219232442.2460166-2-cristian.ciocaltea@collabora.com Signed-off-by: Stephen Boyd commit 6d0fc416c42a98b39a74151376928d577873941c Author: Ira Weiny Date: Wed Dec 20 16:17:28 2023 -0800 cxl/trace: Pass UUID explicitly to event traces CXL CPER events are identified by the CPER Section Type GUID. The GUID correlates with the CXL UUID for the event record. It turns out that a CXL CPER record is a strict subset of the CXL event record, only the UUID header field is chopped. In order to unify handling between native and CPER flavors of CXL events, prepare the code for the UUID to be passed in rather than inferred from the record itself. Later patches update the passed in record to only refer to the common data between the formats. Pass the UUID explicitly to each trace event to be able to remove the UUID from the event structures. Originally it was desirable to remove the UUID from the well known event because the UUID value was redundant. However, the trace API was already in place.[1] Signed-off-by: Ira Weiny Link: https://lore.kernel.org/all/36f2d12934d64a278f2c0313cbd01abc@huawei.com [1] Link: https://lore.kernel.org/r/20231220-cxl-cper-v5-1-1bb8a4ca2c7a@intel.com Reviewed-by: Jonathan Cameron Acked-by: Ard Biesheuvel Signed-off-by: Dan Williams commit 4b2df884b8971f0f18e0c5d7ef9e5b9cb740cc9a Author: Steven Rostedt (Google) Date: Fri Dec 29 12:24:02 2023 -0500 ring-buffer/Documentation: Add documentation on buffer_percent file When the buffer_percent file was added to the kernel, the documentation should have been updated to document what that file does. Acked-by: "Masami Hiramatsu (Google)" Fixes: 03329f9939781 ("tracing: Add tracefs file buffer_percentage") Signed-off-by: "Steven Rostedt (Google)" Acked-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231229122402.537eb252@gandalf.local.home commit d78bcf646cf52097d3a36330404291cf84aabf85 Author: longjin Date: Mon Dec 18 09:29:24 2023 +0000 Translated the RISC-V architecture boot documentation. The patch adds a new file boot.rst to the Documentation/translations/zh_CN/ arch/riscv/ directory, and adds a reference to the new file in the index.rst file. Signed-off-by: longjin Reviewed-by: Yanteng Si Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231218092924.200165-1-longjin@DragonOS.org commit 821bd43ed555fba376e8aa38d825de6c60df90ad Author: Thomas Weißschuh Date: Wed Dec 20 06:02:49 2023 +0100 Docs: remove mentions of fdformat from util-linux Since util-linux commit 13b26e3c36d1 ("fdformat: remove command from default build") the fdformat tool is not built anymore by default. As a result it is not packaged anymore by distributions and therefore not usable by users. Instead mention the "mount" command as more likely to be present alternative. Also drop the reference to fdformat from the list of features of new versions of util-linux. Signed-off-by: Thomas Weißschuh Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231220-docs-fdformat-v1-1-0d05279e5d83@weissschuh.net commit 0587e62bf4f36001bea60ae0fc65b54aff6f847d Author: JiaLong.Yang Date: Thu Dec 21 13:58:32 2023 +0800 Docs/zh_CN: Fix the meaning of DEBUG to pr_debug() We know the macro DEBUG will make pr_debug() save the formatted string into final binary. But the translation in chinese gives a opposite meaning. Signed-off-by: "JiaLong.Yang" Reviewed-by: Zenghui Yu Acked-by: Yanteng Si Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231221055832.4374-1-jialong.yang@shingroup.cn commit bb67bf1c4a56cc8bdba93b4f0353d05e777ff44b Author: Vegard Nossum Date: Thu Dec 21 13:48:16 2023 +0100 Documentation: move driver-api/dcdbas to userspace-api/ This file documents a sysfs interface that is intended for systems management software. It does NOT document any kind of kernel driver API. It is also not meant to be used directly by system administrators or users. Cc: Stuart Hayes Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Vegard Nossum Acked-by: Hans de Goede Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231221124816.2978000-3-vegard.nossum@oracle.com commit 77e075579e88892510ddb7fda47ea15d74a5729f Author: Vegard Nossum Date: Thu Dec 21 13:48:15 2023 +0100 Documentation: move driver-api/isapnp to userspace-api/ driver-api/isapnp documents /proc interfaces for interfacing directly with ISA Plug & Play devices, not any kind of API for kernel developers, and should thus also live under userspace-api/. Also fix a few issues while we're at it. Cc: Jaroslav Kysela Cc: Mauro Carvalho Chehab Cc: Alexandre Belloni Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Vegard Nossum Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231221124816.2978000-2-vegard.nossum@oracle.com commit 89405db5cd1ed641dfe91b4a3796bb6188ab05e3 Author: attreyee-muk Date: Sat Dec 23 23:23:17 2023 +0530 Documentation/core-api : fix typo in workqueue Correct to “boundaries” from “bounaries” Signed-off-by: Attreyee Mukherjee Acked-by: Tejun Heo Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231223175316.24951-1-tintinm2017@gmail.com commit d3f79db93275ef84f46536eb1b6da8d605f34a97 Author: Matthew Cassell Date: Sat Dec 23 18:58:45 2023 +0000 Documentation/trace: Fixed typos in the ftrace FLAGS section Fixed typos in the FTRACE_OPS_FL_RECURSION flag description. Signed-off-by: Matthew Cassell Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231223185845.2326-1-mcassell411@gmail.com commit afa751e84c30b517aebd418970d222c39c81acb8 Author: Randy Dunlap Date: Mon Dec 25 22:52:19 2023 -0800 kernel-doc: handle a void function without producing a warning Currently a void function can produce a warning: main.c:469: warning: contents before sections This one is from arch/x86/kernel/cpu/sgx/main.c (which is not included in any produced kernel documentation output). Handle this by setting $in_doc_sect to 1 whenever any recognized document section name is processed. Fixes: f624adef3d0b ("kernel-doc: limit the "section header:" detection to a select few") Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231226065219.319-1-rdunlap@infradead.org commit 75ddc07835ab20fcd7b79710ab766bde71873d53 Author: Randy Dunlap Date: Thu Dec 28 15:31:13 2023 -0800 scripts/get_abi.pl: ignore some temp files When there are filenames of the form ".orig" or ".rej" in the Documenatation/ABI/ subdirectories, there can be confusing or erroneous output generated. Example: the file Documenation/ABI/testing/sysfs-bus-papr-pmem.orig causes this warning message: Documentation/ABI/testing/sysfs-bus-papr-pmem:2: WARNING: unknown document: '/powerpc/papr_hcalls' Prevent this by skipping over filenames that may be created by patch/diff tools etc. Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Acked-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231228233113.5218-1-rdunlap@infradead.org commit ec5257d99e6894d65fae772ca43c53b3d6855115 Author: Ian Rogers Date: Wed Jan 3 09:01:59 2024 -0800 perf x86 test: Add hybrid test for conflicting legacy/sysfs event The cpu-cycles event is both a legacy event and declared in /sys/devices/cpu_core/events/cpu-cycles. The cycles event is a legacy event but with no sysfs version. Add a test that the sysfs version is preferred to the legacy for cpu-cycles, while for cycles we use the legacy version. Suggested-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20240103170159.1435753-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit eb00697b91646de22d6d9b4e6a5fadf4495fdf69 Author: Ian Rogers Date: Wed Jan 3 09:01:58 2024 -0800 perf x86 test: Update hybrid expectations The legacy events cpu-cycles and instructions have sysfs event equivalents on x86 (see /sys/devices/cpu_core/events). As sysfs/JSON events are now higher in priority than legacy events this causes the hybrid test expectations not to be met. To fix this switch to legacy events that don't have sysfs versions, namely cpu-cycles becomes cycles and instructions becomes branches. Fixes: a24d9d9dc096fc0d ("perf parse-events: Make legacy events lower priority than sysfs/JSON") Reported-by: Arnaldo Carvalho de Melo Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Closes: https://lore.kernel.org/lkml/ZYbm5L7tw7bdpDpE@kernel.org/ Link: https://lore.kernel.org/r/20240103170159.1435753-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 346878dacc81f53667381c8f4bb5018195ca10be Author: Sandipan Das Date: Wed Nov 29 11:55:04 2023 +0530 perf vendor events amd: Add Zen 4 memory controller events Make the jevents parser aware of the Unified Memory Controller (UMC) PMU and add events taken from Section 8.2.1 "UMC Performance Monitor Events" of the Processor Programming Reference (PPR) for AMD Family 19h Model 11h processors. The events capture UMC command activity such as CAS, ACTIVATE, PRECHARGE etc. while the metrics derive data bus utilization and memory bandwidth out of these events. Signed-off-by: Sandipan Das Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Stephane Eranian Link: https://lore.kernel.org/r/e0d8a7e8ca8ee3e378d8029e80b456ac327d6419.1701238314.git.sandipan.das@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit f2567e12a090f0eb22553a4468d4c4fe04aad906 Author: Ian Rogers Date: Mon Dec 11 10:12:41 2023 -0800 perf stat: Fix hard coded LL miss units Copy-paste error where LL cache misses are reported as l1i. Fixes: 0a57b910807ad163 ("perf stat: Use counts rather than saved_value") Suggested-by: Guillaume Endignoux Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231211181242.1721059-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7d1405c71df21f6c394b8a885aa8a133f749fa22 Author: Ian Rogers Date: Wed Dec 6 18:16:27 2023 -0800 perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event Reduce from PERF_SAMPLE_MAX_SIZE to "sizeof(*lost) + session->machines.host.id_hdr_size". Suggested-by: Namhyung Kim Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231207021627.1322884-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9c51f8788b5d4e9f46afbcf563255cfd355690b3 Author: Ian Rogers Date: Wed Dec 6 17:46:55 2023 -0800 perf env: Avoid recursively taking env->bpf_progs.lock Add variants of perf_env__insert_bpf_prog_info(), perf_env__insert_btf() and perf_env__find_btf prefixed with __ to indicate the env->bpf_progs.lock is assumed held. Call these variants when the lock is held to avoid recursively taking it and potentially having a thread deadlock with itself. Fixes: f8dfeae009effc0b ("perf bpf: Show more BPF program info in print_bpf_prog_info()") Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Acked-by: Song Liu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Huacai Chen Cc: Ingo Molnar Cc: K Prateek Nayak Cc: Kan Liang Cc: Mark Rutland Cc: Ming Wang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20231207014655.1252484-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3231dd5862779c2e15633c96133a53205ad660ce Author: Vegard Nossum Date: Mon Jan 1 00:59:59 2024 +0100 docs: kernel_abi.py: fix command injection The kernel-abi directive passes its argument straight to the shell. This is unfortunate and unnecessary. Let's always use paths relative to $srctree/Documentation/ and use subprocess.check_call() instead of subprocess.Popen(shell=True). This also makes the code shorter. Link: https://fosstodon.org/@jani/111676532203641247 Reported-by: Jani Nikula Cc: stable@vger.kernel.org Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231231235959.3342928-2-vegard.nossum@oracle.com commit 5889d6ede53bc17252f79c142387e007224aa554 Author: Vegard Nossum Date: Mon Jan 1 00:59:58 2024 +0100 scripts/get_abi: fix source path leak The code currently leaks the absolute path of the ABI files into the rendered documentation. There exists code to prevent this, but it is not effective when an absolute path is passed, which it is when $srctree is used. I consider this to be a minimal, stop-gap fix; a better fix would strip off the actual prefix instead of hacking it off with a regex. Link: https://mastodon.social/@vegard/111677490643495163 Cc: Jani Nikula Cc: stable@vger.kernel.org Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231231235959.3342928-1-vegard.nossum@oracle.com commit e49ad8530de9f8eb71056faf59b49d4a336e53a1 Author: Alejandro Colomar Date: Mon Jan 1 13:42:56 2024 +0100 CREDITS, MAINTAINERS, docs/process/howto: Update man-pages' maintainer Michael retired from maintaining the Linux man-pages project in 2021. See commit 06e72cb19c74d3b1d661609c698ee26d7b6e4d7e ("CONTRIBUTING, README, lsm: Remove mtk as maintainer") in the Linux man-pages repository. Add him to CREDITS. Reported-by: Ahelenia Ziemiańska Link: Acked-by: Randy Dunlap Cc: Michael Kerrisk Cc: Michael Kerrisk Cc: Geert Uytterhoeven Cc: Jonathan Corbet Signed-off-by: Alejandro Colomar Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20240101124242.8059-2-alx@kernel.org commit a085a5eb6594a3ebe5c275e9c2c2d341f686c23c Author: Dan Williams Date: Tue Dec 19 18:15:13 2023 -0800 acpi/nfit: Use sysfs_emit() for all attributes sysfs_emit() properly handles the PAGE_SIZE limitation of populating sysfs attribute buffers. Clean up the deprecated usage of sprintf() in all of nfit's sysfs show() handlers. Reported-by: Ben Dooks Closes: http://lore.kernel.org/0d1bf461-d9e8-88bc-b7e2-b03b56594213@codethink.co.uk Cc: Alison Schofield Cc: Dave Jiang Signed-off-by: Dan Williams Reviewed-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/170303851337.2238503.5103082574938957743.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Ira Weiny commit fd045e5f99723db573d671d0484543f61dc496f5 Author: Randy Dunlap Date: Thu Dec 7 13:05:45 2023 -0800 nvdimm/namespace: fix kernel-doc for function params Adjust kernel-doc notation to prevent warnings when using -Wall. namespace_devs.c:76: warning: No description found for return value of 'nd_is_uuid_unique' namespace_devs.c:343: warning: No description found for return value of 'shrink_dpa_allocation' namespace_devs.c:668: warning: No description found for return value of 'grow_dpa_allocation' namespace_devs.c:958: warning: No description found for return value of 'namespace_update_uuid' namespace_devs.c:1665: warning: Function parameter or member 'nd_mapping' not described in 'create_namespace_pmem' namespace_devs.c:1665: warning: Excess function parameter 'nspm' description in 'create_namespace_pmem' namespace_devs.c:1665: warning: No description found for return value of 'create_namespace_pmem' [iweiny: s/-errno/ERR_PTR(-errno)/] Signed-off-by: Randy Dunlap Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Cc: Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/20231207210545.24056-3-rdunlap@infradead.org Signed-off-by: Ira Weiny commit 0e2b3d54d826da9def1ab627b50c123bc34250fa Author: Randy Dunlap Date: Thu Dec 7 13:05:44 2023 -0800 nvdimm/dimm_devs: fix kernel-doc for function params Adjust kernel-doc notation to prevent warnings when using -Wall. dimm_devs.c:59: warning: Function parameter or member 'ndd' not described in 'nvdimm_init_nsarea' dimm_devs.c:59: warning: Excess function parameter 'nvdimm' description in 'nvdimm_init_nsarea' dimm_devs.c:59: warning: No description found for return value of 'nvdimm_init_nsarea' dimm_devs.c:728: warning: No description found for return value of 'nd_pmem_max_contiguous_dpa' dimm_devs.c:773: warning: No description found for return value of 'nd_pmem_available_dpa' dimm_devs.c:844: warning: Function parameter or member 'ndd' not described in 'nvdimm_allocated_dpa' dimm_devs.c:844: warning: Excess function parameter 'nvdimm' description in 'nvdimm_allocated_dpa' dimm_devs.c:844: warning: No description found for return value of 'nvdimm_allocated_dpa' [iweiny: drop ND_CMD_* status code] Signed-off-by: Randy Dunlap Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Cc: Link: https://lore.kernel.org/r/20231207210545.24056-2-rdunlap@infradead.org Signed-off-by: Ira Weiny commit b19211418969357c6872b963c91799c8cdba3f72 Author: Randy Dunlap Date: Thu Dec 7 13:05:43 2023 -0800 nvdimm/btt: fix btt_blk_cleanup() kernel-doc Correct the function parameters to prevent kernel-doc warnings: btt.c:1567: warning: Function parameter or member 'nd_region' not described in 'btt_init' btt.c:1567: warning: Excess function parameter 'maxlane' description in 'btt_init' Signed-off-by: Randy Dunlap Cc: Vishal Verma Cc: Dan Williams Cc: Dave Jiang Cc: Ira Weiny Cc: Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/20231207210545.24056-1-rdunlap@infradead.org Signed-off-by: Ira Weiny commit 9aa6543ee6d3a717268f210b263b0f1286a0bf1e Author: Dinghao Liu Date: Thu Dec 14 16:39:19 2023 +0800 nvdimm-btt: simplify code with the scope based resource management Use the scope based resource management (defined in linux/cleanup.h) to automate resource lifetime control on struct btt_sb *super in discover_arenas(). Signed-off-by: Dinghao Liu Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20231214083919.22218-1-dinghao.liu@zju.edu.cn Signed-off-by: Ira Weiny commit deb369e0828faa245ef3c726b3d5e5f2740ac762 Author: Christophe JAILLET Date: Sun Dec 10 18:13:09 2023 +0100 nvdimm: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/50719568e4108f65f3b989ba05c1563e17afba3f.1702228319.git.christophe.jaillet@wanadoo.fr Signed-off-by: Ira Weiny commit 1af5aa82c976753e93eb52b72784e586a7d2844b Author: Fedor Pchelkin Date: Mon Nov 27 20:59:04 2023 +0300 apparmor: free the allocated pdb objects policy_db objects are allocated with kzalloc() inside aa_alloc_pdb() and are not cleared in the corresponding aa_free_pdb() function causing leak: unreferenced object 0xffff88801f0a1400 (size 192): comm "apparmor_parser", pid 1247, jiffies 4295122827 (age 2306.399s) 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: [] __kmem_cache_alloc_node+0x1e2/0x2d0 [] kmalloc_trace+0x25/0xc0 [] aa_alloc_pdb+0x82/0x140 [] unpack_pdb+0xc7/0x2700 [] unpack_profile+0x450/0x4960 [] aa_unpack+0x309/0x15e0 [] aa_replace_profiles+0x213/0x33c0 [] policy_update+0x261/0x370 [] profile_replace+0x20e/0x2a0 [] vfs_write+0x2af/0xe00 [] ksys_write+0x126/0x250 [] do_syscall_64+0x46/0xf0 [] entry_SYSCALL_64_after_hwframe+0x6e/0x76 Free the pdbs inside aa_free_pdb(). While at it, rename the variable representing an aa_policydb object to make the function more unified with aa_pdb_free_kref() and aa_alloc_pdb(). Found by Linux Verification Center (linuxtesting.org). Fixes: 98b824ff8984 ("apparmor: refcount the pdb") Signed-off-by: Fedor Pchelkin Signed-off-by: John Johansen commit e2605d4039a42a03000856b3229932455717b48b Author: David McFarland Date: Wed Jan 3 12:55:18 2024 -0400 ACPI: resource: Add Infinity laptops to irq1_edge_low_force_override A user reported a keyboard problem similar to ones reported with other Zen laptops, on an Infinity E15-5A165-BM. Add board name matches for this model and one (untested) close relative to irq1_edge_low_force_override. Link: https://lemmy.ml/post/9864736 Link: https://www.infinitygaming.com.au/bios/ Link: https://lore.kernel.org/linux-acpi/20231006123304.32686-1-hdegoede@redhat.com Signed-off-by: Rafael J. Wysocki commit b4560055c8f11c5e2cfffb4de928b3cfd4eae3b4 Merge: a640de4cf9fec 7e3811cb998f0 Author: Andrii Nakryiko Date: Wed Jan 3 10:41:22 2024 -0800 Merge branch 'bpf-volatile-compare' Alexei Starovoitov says: ==================== bpf: volatile compare From: Alexei Starovoitov v2->v3: Debugged profiler.c regression. It was caused by basic block layout. Introduce bpf_cmp_likely() and bpf_cmp_unlikely() macros. Debugged redundant <<=32, >>=32 with u32 variables. Added cast workaround. v1->v2: Fixed issues pointed out by Daniel, added more tests, attempted to convert profiler.c, but barrier_var() wins vs bpf_cmp(). To be investigated. Patches 1-4 are good to go, but 5 needs more work. ==================== Link: https://lore.kernel.org/r/20231226191148.48536-1-alexei.starovoitov@gmail.com Signed-off-by: Andrii Nakryiko commit 7e3811cb998f0e2493677c7daf6cefb4ece27111 Author: Alexei Starovoitov Date: Tue Dec 26 11:11:48 2023 -0800 selftests/bpf: Convert profiler.c to bpf_cmp. Convert profiler[123].c to "volatile compare" to compare barrier_var() approach vs bpf_cmp_likely() vs bpf_cmp_unlikely(). bpf_cmp_unlikely() produces correct code, but takes much longer to verify: ./veristat -C -e prog,insns,states before after_with_unlikely Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) ------------------------------------ --------- --------- ------------------ ---------- ---------- ----------------- kprobe__proc_sys_write 1603 19606 +18003 (+1123.08%) 123 1678 +1555 (+1264.23%) kprobe__vfs_link 11815 70305 +58490 (+495.05%) 971 4967 +3996 (+411.53%) kprobe__vfs_symlink 5464 42896 +37432 (+685.07%) 434 3126 +2692 (+620.28%) kprobe_ret__do_filp_open 5641 44578 +38937 (+690.25%) 446 3162 +2716 (+608.97%) raw_tracepoint__sched_process_exec 2770 35962 +33192 (+1198.27%) 226 3121 +2895 (+1280.97%) raw_tracepoint__sched_process_exit 1526 2135 +609 (+39.91%) 133 208 +75 (+56.39%) raw_tracepoint__sched_process_fork 265 337 +72 (+27.17%) 19 24 +5 (+26.32%) tracepoint__syscalls__sys_enter_kill 18782 140407 +121625 (+647.56%) 1286 12176 +10890 (+846.81%) bpf_cmp_likely() is equivalent to barrier_var(): ./veristat -C -e prog,insns,states before after_with_likely Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) ------------------------------------ --------- --------- -------------- ---------- ---------- ------------- kprobe__proc_sys_write 1603 1663 +60 (+3.74%) 123 127 +4 (+3.25%) kprobe__vfs_link 11815 12090 +275 (+2.33%) 971 971 +0 (+0.00%) kprobe__vfs_symlink 5464 5448 -16 (-0.29%) 434 426 -8 (-1.84%) kprobe_ret__do_filp_open 5641 5739 +98 (+1.74%) 446 446 +0 (+0.00%) raw_tracepoint__sched_process_exec 2770 2608 -162 (-5.85%) 226 216 -10 (-4.42%) raw_tracepoint__sched_process_exit 1526 1526 +0 (+0.00%) 133 133 +0 (+0.00%) raw_tracepoint__sched_process_fork 265 265 +0 (+0.00%) 19 19 +0 (+0.00%) tracepoint__syscalls__sys_enter_kill 18782 18970 +188 (+1.00%) 1286 1286 +0 (+0.00%) kprobe__proc_sys_write 2700 2809 +109 (+4.04%) 107 109 +2 (+1.87%) kprobe__vfs_link 12238 12366 +128 (+1.05%) 267 269 +2 (+0.75%) kprobe__vfs_symlink 7139 7365 +226 (+3.17%) 167 175 +8 (+4.79%) kprobe_ret__do_filp_open 7264 7070 -194 (-2.67%) 180 182 +2 (+1.11%) raw_tracepoint__sched_process_exec 3768 3453 -315 (-8.36%) 211 199 -12 (-5.69%) raw_tracepoint__sched_process_exit 3138 3138 +0 (+0.00%) 83 83 +0 (+0.00%) raw_tracepoint__sched_process_fork 265 265 +0 (+0.00%) 19 19 +0 (+0.00%) tracepoint__syscalls__sys_enter_kill 26679 24327 -2352 (-8.82%) 1067 1037 -30 (-2.81%) kprobe__proc_sys_write 1833 1833 +0 (+0.00%) 157 157 +0 (+0.00%) kprobe__vfs_link 9995 10127 +132 (+1.32%) 803 803 +0 (+0.00%) kprobe__vfs_symlink 5606 5672 +66 (+1.18%) 451 451 +0 (+0.00%) kprobe_ret__do_filp_open 5716 5782 +66 (+1.15%) 462 462 +0 (+0.00%) raw_tracepoint__sched_process_exec 3042 3042 +0 (+0.00%) 278 278 +0 (+0.00%) raw_tracepoint__sched_process_exit 1680 1680 +0 (+0.00%) 146 146 +0 (+0.00%) raw_tracepoint__sched_process_fork 299 299 +0 (+0.00%) 25 25 +0 (+0.00%) tracepoint__syscalls__sys_enter_kill 18372 18372 +0 (+0.00%) 1558 1558 +0 (+0.00%) default (mcpu=v3), no_alu32, cpuv4 have similar differences. Note one place where bpf_nop_mov() is used to workaround the verifier lack of link between the scalar register and its spill to stack. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231226191148.48536-7-alexei.starovoitov@gmail.com commit 0bcc62aa9813f519db58df14ddf1d523fa971e62 Author: Alexei Starovoitov Date: Tue Dec 26 11:11:47 2023 -0800 bpf: Add bpf_nop_mov() asm macro. bpf_nop_mov(var) asm macro emits nop register move: rX = rX. If 'var' is a scalar and not a fixed constant the verifier will assign ID to it. If it's later spilled the stack slot will carry that ID as well. Hence the range refining comparison "if rX < const" will update all copies including spilled slot. This macro is a temporary workaround until the verifier gets smarter. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231226191148.48536-6-alexei.starovoitov@gmail.com commit 907dbd3ede5ffd4f9519dd1fae2a8a983603bf3b Author: Alexei Starovoitov Date: Tue Dec 26 11:11:46 2023 -0800 selftests/bpf: Remove bpf_assert_eq-like macros. Since the last user was converted to bpf_cmp, remove bpf_assert_eq/ne/... macros. __bpf_assert_op() macro is kept for experiments, since it's slightly more efficient than bpf_assert(bpf_cmp_unlikely()) until LLVM is fixed. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/bpf/20231226191148.48536-5-alexei.starovoitov@gmail.com commit 624cd2a17672f4596fee97a5558bc990778bbcf9 Author: Alexei Starovoitov Date: Tue Dec 26 11:11:45 2023 -0800 selftests/bpf: Convert exceptions_assert.c to bpf_cmp Convert exceptions_assert.c to bpf_cmp_unlikely() macro. Since bpf_assert(bpf_cmp_unlikely(var, ==, 100)); other code; will generate assembly code: if r1 == 100 goto L2; r0 = 0 call bpf_throw L1: other code; ... L2: goto L1; LLVM generates redundant basic block with extra goto. LLVM will be fixed eventually. Right now it's less efficient than __bpf_assert(var, ==, 100) macro that produces: if r1 == 100 goto L1; r0 = 0 call bpf_throw L1: other code; But extra goto doesn't hurt the verification process. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/bpf/20231226191148.48536-4-alexei.starovoitov@gmail.com commit a8b242d77bd72556b7a9d8be779f7d27b95ba73c Author: Alexei Starovoitov Date: Tue Dec 26 11:11:44 2023 -0800 bpf: Introduce "volatile compare" macros Compilers optimize conditional operators at will, but often bpf programmers want to force compilers to keep the same operator in asm as it's written in C. Introduce bpf_cmp_likely/unlikely(var1, conditional_op, var2) macros that can be used as: - if (seen >= 1000) + if (bpf_cmp_unlikely(seen, >=, 1000)) The macros take advantage of BPF assembly that is C like. The macros check the sign of variable 'seen' and emits either signed or unsigned compare. For example: int a; bpf_cmp_unlikely(a, >, 0) will be translated to 'if rX s> 0 goto' in BPF assembly. unsigned int a; bpf_cmp_unlikely(a, >, 0) will be translated to 'if rX > 0 goto' in BPF assembly. C type conversions coupled with comparison operator are tricky. int i = -1; unsigned int j = 1; if (i < j) // this is false. long i = -1; unsigned int j = 1; if (i < j) // this is true. Make sure BPF program is compiled with -Wsign-compare then the macros will catch the mistake. The macros check LHS (left hand side) only to figure out the sign of compare. 'if 0 < rX goto' is not allowed in the assembly, so the users have to use a variable on LHS anyway. The patch updates few tests to demonstrate the use of the macros. The macro allows to use BPF_JSET in C code, since LLVM doesn't generate it at present. For example: if (i & j) compiles into r0 &= r1; if r0 == 0 goto while if (bpf_cmp_unlikely(i, &, j)) compiles into if r0 & r1 goto Note that the macros has to be careful with RHS assembly predicate. Since: u64 __rhs = 1ull << 42; asm goto("if r0 < %[rhs] goto +1" :: [rhs] "ri" (__rhs)); LLVM will silently truncate 64-bit constant into s32 imm. Note that [lhs] "r"((short)LHS) the type cast is a workaround for LLVM issue. When LHS is exactly 32-bit LLVM emits redundant <<=32, >>=32 to zero upper 32-bits. When LHS is 64 or 16 or 8-bit variable there are no shifts. When LHS is 32-bit the (u64) cast doesn't help. Hence use (short) cast. It does _not_ truncate the variable before it's assigned to a register. Traditional likely()/unlikely() macros that use __builtin_expect(!!(x), 1 or 0) have no effect on these macros, hence macros implement the logic manually. bpf_cmp_unlikely() macro preserves compare operator as-is while bpf_cmp_likely() macro flips the compare. Consider two cases: A. for() { if (foo >= 10) { bar += foo; } other code; } B. for() { if (foo >= 10) break; other code; } It's ok to use either bpf_cmp_likely or bpf_cmp_unlikely macros in both cases, but consider that 'break' is effectively 'goto out_of_the_loop'. Hence it's better to use bpf_cmp_unlikely in the B case. While 'bar += foo' is better to keep as 'fallthrough' == likely code path in the A case. When it's written as: A. for() { if (bpf_cmp_likely(foo, >=, 10)) { bar += foo; } other code; } B. for() { if (bpf_cmp_unlikely(foo, >=, 10)) break; other code; } The assembly will look like: A. for() { if r1 < 10 goto L1; bar += foo; L1: other code; } B. for() { if r1 >= 10 goto L2; other code; } L2: The bpf_cmp_likely vs bpf_cmp_unlikely changes basic block layout, hence it will greatly influence the verification process. The number of processed instructions will be different, since the verifier walks the fallthrough first. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Daniel Borkmann Acked-by: Jiri Olsa Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/bpf/20231226191148.48536-3-alexei.starovoitov@gmail.com commit 495d2d8133fd1407519170a5238f455abbd9ec9b Author: Alexei Starovoitov Date: Tue Dec 26 11:11:43 2023 -0800 selftests/bpf: Attempt to build BPF programs with -Wsign-compare GCC's -Wall includes -Wsign-compare while clang does not. Since BPF programs are built with clang we need to add this flag explicitly to catch problematic comparisons like: int i = -1; unsigned int j = 1; if (i < j) // this is false. long i = -1; unsigned int j = 1; if (i < j) // this is true. C standard for reference: - If either operand is unsigned long the other shall be converted to unsigned long. - Otherwise, if one operand is a long int and the other unsigned int, then if a long int can represent all the values of an unsigned int, the unsigned int shall be converted to a long int; otherwise both operands shall be converted to unsigned long int. - Otherwise, if either operand is long, the other shall be converted to long. - Otherwise, if either operand is unsigned, the other shall be converted to unsigned. Unfortunately clang's -Wsign-compare is very noisy. It complains about (s32)a == (u32)b which is safe and doen't have surprising behavior. This patch fixes some of the issues. It needs a follow up to fix the rest. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Jiri Olsa Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/bpf/20231226191148.48536-2-alexei.starovoitov@gmail.com commit a640de4cf9fec0caf43ccb7404ec9f0fde9a6a65 Merge: 2ab1efad60ad1 72187506de4f1 Author: Andrii Nakryiko Date: Wed Jan 3 10:37:57 2024 -0800 Merge branch 'bpf-simplify-checking-size-of-helper-accesses' Andrei Matei says: ==================== bpf: Simplify checking size of helper accesses v3->v4: - kept only the minimal change, undoing debatable changes (Andrii) - dropped the second patch from before, with changes to the error message (Andrii) - extracted the new test into a separate patch (Andrii) - added Acked by Andrii v2->v3: - split the error-logging function to a separate patch (Andrii) - make the error buffers smaller (Andrii) - include size of memory region for PTR_TO_MEM (Andrii) - nits from Andrii and Eduard v1->v2: - make the error message include more info about the context of the zero-sized access (Andrii) ==================== Link: https://lore.kernel.org/r/20231221232225.568730-1-andreimatei1@gmail.com Signed-off-by: Andrii Nakryiko commit 72187506de4f19fcc8ae63a2b2f36d75e5259d9d Author: Andrei Matei Date: Thu Dec 21 18:22:25 2023 -0500 bpf: Add a possibly-zero-sized read test This patch adds a test for the condition that the previous patch mucked with - illegal zero-sized helper memory access. As opposed to existing tests, this new one uses a size whose lower bound is zero, as opposed to a known-zero one. Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231221232225.568730-3-andreimatei1@gmail.com commit 8a021e7fa10576eeb3938328f39bbf98fe7d4715 Author: Andrei Matei Date: Thu Dec 21 18:22:24 2023 -0500 bpf: Simplify checking size of helper accesses This patch simplifies the verification of size arguments associated to pointer arguments to helpers and kfuncs. Many helpers take a pointer argument followed by the size of the memory access performed to be performed through that pointer. Before this patch, the handling of the size argument in check_mem_size_reg() was confusing and wasteful: if the size register's lower bound was 0, then the verification was done twice: once considering the size of the access to be the lower-bound of the respective argument, and once considering the upper bound (even if the two are the same). The upper bound checking is a super-set of the lower-bound checking(*), except: the only point of the lower-bound check is to handle the case where zero-sized-accesses are explicitly not allowed and the lower-bound is zero. This static condition is now checked explicitly, replacing a much more complex, expensive and confusing verification call to check_helper_mem_access(). Error messages change in this patch. Before, messages about illegal zero-size accesses depended on the type of the pointer and on other conditions, and sometimes the message was plain wrong: in some tests that changed you'll see that the old message was something like "R1 min value is outside of the allowed memory range", where R1 is the pointer register; the error was wrongly claiming that the pointer was bad instead of the size being bad. Other times the information that the size came for a register with a possible range of values was wrong, and the error presented the size as a fixed zero. Now the errors refer to the right register. However, the old error messages did contain useful information about the pointer register which is now lost; recovering this information was deemed not important enough. (*) Besides standing to reason that the checks for a bigger size access are a super-set of the checks for a smaller size access, I have also mechanically verified this by reading the code for all types of pointers. I could convince myself that it's true for all but PTR_TO_BTF_ID (check_ptr_to_btf_access). There, simply looking line-by-line does not immediately prove what we want. If anyone has any qualms, let me know. Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231221232225.568730-2-andreimatei1@gmail.com commit 217e85f97031791fb48a2d374c7bdcf439365b21 Author: Srinivasan Shanmugam Date: Thu Dec 21 08:10:42 2023 +0530 drm/amdkfd: Fix type of 'dbg_flags' in 'struct kfd_process' dbg_flags looks to be defined with incorrect data type; to process multiple debug flag options, and hence defined dbg_flags as u32. Fixes the below: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_packet_manager_v9.c:117 pm_map_process_aldebaran() warn: maybe use && instead of & Fixes: 0de4ec9a0353 ("drm/amdgpu: prepare map process for multi-process debug devices") Suggested-by: Lijo Lazar Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b8d55a90fd55b767c25687747e2b24abd1ef8680 Author: Srinivasan Shanmugam Date: Tue Dec 26 15:32:19 2023 +0530 drm/amdgpu: Fix possible NULL dereference in amdgpu_ras_query_error_status_helper() Return invalid error code -EINVAL for invalid block id. Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:1183 amdgpu_ras_query_error_status_helper() error: we previously assumed 'info' could be null (see line 1176) Suggested-by: Hawking Zhang Cc: Tao Zhou Cc: Hawking Zhang Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5ce9a6ad8ec48445ff6c999d064f7931f892bf2b Author: Srinivasan Shanmugam Date: Wed Dec 20 20:07:54 2023 +0530 drm/amdgpu: Drop redundant unsigned >=0 comparision 'amdgpu_gfx_rlc_init_microcode()' unsigned int "version_minor" is always >= 0 Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c:534 amdgpu_gfx_rlc_init_microcode() warn: always true condition '(version_minor >= 0) => (0-u16max >= 0)' Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit d95ad8fa96e14b7ce1ab740c53f10d7aff9f6660 Author: Srinivasan Shanmugam Date: Tue Dec 19 12:54:46 2023 +0530 drm/amd/display: Adjust kdoc for 'dcn35_hw_block_power_down' & 'dcn35_hw_block_power_up' Fixes the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dcn35/dcn35_hwseq.c:1124: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Charlene Liu Cc: Muhammad Ahmed Cc: Hamza Mahfooz Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Cc: Alex Deucher Cc: Srinath Rao Signed-off-by: Srinivasan Shanmugam Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4d3ed0befdf4852cec2f203ceac440aa70a0e7f5 Author: Srinivasan Shanmugam Date: Tue Dec 19 12:20:36 2023 +0530 drm/amd/display: Address function parameter 'context' not described in 'dc_state_rem_all_planes_for_stream' & 'populate_subvp_cmd_drr_info' Fixes the following gcc with W=1: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:524: warning: Function parameter or member 'state' not described in 'dc_state_rem_all_planes_for_stream' drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_state.c:524: warning: Excess function parameter 'context' description in 'dc_state_rem_all_planes_for_stream' drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:540: warning: Function parameter or member 'context' not described in 'populate_subvp_cmd_drr_info' Suggested-by: Aurabindo Pillai Cc: Dillon Varone Cc: Jun Lei Cc: Hamza Mahfooz Cc: Aurabindo Pillai Cc: Rodrigo Siqueira Cc: Alex Deucher Cc: Srinath Rao Signed-off-by: Srinivasan Shanmugam Reviewed-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit b57e3ca1fb192962f5b062c2e13e1bab1936292c Author: Srinivasan Shanmugam Date: Wed Dec 20 19:36:20 2023 +0530 drm/amdgpu: Use kvcalloc instead of kvmalloc_array in amdgpu_cs_parser_bos() kvmalloc_array + __GFP_ZERO is the same with kvcalloc. Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:873 amdgpu_cs_parser_bos() warn: Please consider using kvcalloc instead of kvmalloc_array Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 091411be7ae899ce23072acf5a83b0b43e9024e1 Author: Srinivasan Shanmugam Date: Tue Dec 19 19:26:22 2023 +0530 drm/amdgpu: Use kzalloc instead of kmalloc+__GFP_ZERO in amdgpu_ras.c Fixes the below smatch warnings: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2543 amdgpu_ras_recovery_init() warn: Please consider using kzalloc instead of kmalloc drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2830 amdgpu_ras_init() warn: Please consider using kzalloc instead of kmalloc Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit abaf0666a65b8bbf7311571cd2b32b076fb8e1f9 Author: Srinivasan Shanmugam Date: Tue Dec 19 18:54:18 2023 +0530 drm/amdgpu: Cleanup indenting in amdgpu_connector_dvi_detect() drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1106 amdgpu_connector_dvi_detect() warn: inconsistent indenting Fixes: 8a1de314d189 ("drm/amdgpu: Refactor 'amdgpu_connector_dvi_detect' in amdgpu_connectors.c") Cc: Christian König Cc: Alex Deucher Cc: "Pan, Xinhui" Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Acked-by: Christian König Signed-off-by: Alex Deucher commit 25272bcf8476cbe58b7a0318fcfad79d2cd8554d Author: Asad Kamal Date: Wed Dec 20 17:32:48 2023 +0800 drm/amd/pm: Use gpu_metrics_v1_5 for SMUv13.0.6 Use gpu_metrics_v1_5 for SMUv13.0.6 to fill gpu metric info Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit a62503ca854e8a19c95022fa5bec47eeecac570b Author: Asad Kamal Date: Wed Dec 20 17:21:48 2023 +0800 drm/amd/pm: Add gpu_metrics_v1_5 Add new gpu_metrics_v1_5 to acquire vcn/jpeg activity & pcie nak error counters Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 9323b4bf6b85b4450b3e74c7a1b32182a60e030f Author: Asad Kamal Date: Wed Dec 20 17:09:21 2023 +0800 drm/amd/pm: Update metric table for jpeg/vcn data Update pmfw metric table to include vcn & jpeg activity for smu_v_13_0_6 Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 29bc46c4da4ab61bb69b2c8099be6f5d7454133f Author: Asad Kamal Date: Wed Dec 20 16:07:22 2023 +0800 drm/amd/pm: Use separate metric table for APU Use separate metric table for APU and Non APU systems for smu_v_13_0_6 to get metric data Signed-off-by: Asad Kamal Reviewed-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit e379787cbc2aa73c63a795ec55140f9b21c27d8c Author: Tom Chung Date: Fri Dec 1 14:15:45 2023 +0800 drm/amd/display: Add some functions for Panel Replay [WHY] Prepare for enabling the Panel Replay feature [HOW] - Add some Panel Replay setting functions in DC - Add the Panel Replay resource in dcn35_resource.c - Add debug masks for Panel Replay Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Reviewed-by: Leo Li Signed-off-by: Tom Chung Signed-off-by: Alex Deucher commit d6398866a6b47e92319ef6efdb0126a4fbb7796a Author: Ivan Lipski Date: Mon Oct 2 13:47:54 2023 -0400 Re-revert "drm/amd/display: Enable Replay for static screen use cases" This reverts commit 44e60b14d5a72f91fd0bdeae8da59ae37a3ca8e5. Since, it causes a regression in which eDP displays with PSR support, but no Replay support (Sink support <= 0x03), fail to enable PSR and consequently all IGT amd_psr tests fail. So, revert this until a more suitable fix can be found. This got brought back accidently with the backmerge. Acked-by: Leo Li Signed-off-by: Ivan Lipski Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 539e582a375dedee95a4fa9ca3f37cdb25c441ec Author: David Gow Date: Sat Dec 23 12:18:58 2023 +0800 kunit: Fix some comments which were mistakenly kerneldoc The KUnit device helpers are documented with kerneldoc in their header file, but also have short comments over their implementation. These were mistakenly formatted as kerneldoc comments, even though they're not valid kerneldoc. It shouldn't cause any serious problems -- this file isn't included in the docs -- but it could be confusing, and causes warnings. Remove the extra '*' so that these aren't treated as kerneldoc. Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312181920.H4EPAH20-lkp@intel.com/ Signed-off-by: David Gow Reviewed-by: Randy Dunlap Signed-off-by: Shuah Khan commit 7ece381aa72d430ee117958abb5bb23e21d72f1d Author: Richard Fitzgerald Date: Wed Dec 20 15:52:56 2023 +0000 kunit: Protect string comparisons against NULL Add NULL checks to KUNIT_BINARY_STR_ASSERTION() so that it will fail cleanly if either pointer is NULL, instead of causing a NULL pointer dereference in the strcmp(). A test failure could be that a string is unexpectedly NULL. This could be trapped by KUNIT_ASSERT_NOT_NULL() but that would terminate the test at that point. It's preferable that the KUNIT_EXPECT_STR*() macros can handle NULL pointers as a failure. Signed-off-by: Richard Fitzgerald Reviewed-by: David Gow Reviewed-by: Muhammad Usama Anjum Signed-off-by: Shuah Khan commit 0e716cec6fb11a14c220ee17c404b67962e902f7 Author: Daniel Wagner Date: Mon Dec 18 16:30:51 2023 +0100 nvmet-trace: avoid dereferencing pointer too early The first command issued from the host to the target is the fabrics connect command. At this point, neither the target queue nor the controller have been allocated. But we already try to trace this command in nvmet_req_init. Reported by KASAN. Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 72e8c9379dbef2662c2479c3d142e4c44d598a5b Author: Daniel Wagner Date: Mon Dec 18 16:30:50 2023 +0100 nvmet-fc: remove unnecessary bracket There is no need for the bracket around the identifier. Remove it. Signed-off-by: Daniel Wagner Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Keith Busch commit 3b946fe1cc149b23dad3a233c77b1475834f4d6f Author: Christoph Hellwig Date: Tue Dec 26 08:58:44 2023 +0000 nvme: simplify the max_discard_segments calculation Just stash away the DMRL value in the nvme_ctrl struture, and leave all interpretation to nvme_config_discard, where we know DSM is supported by the time we're configuring the number of segments. Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch commit f29886c249ec2ed566e423fd02f6071b8f0a3346 Author: Christoph Hellwig Date: Tue Dec 26 08:58:43 2023 +0000 nvme: fix max_discard_sectors calculation ctrl->max_discard_sectors stores a value that is potentially based of the DMRSL field in Identify Controller, which is in units of LBAs and thus dependent on the Format of a namespace. Fix this by moving the calculation of max_discard_sectors entirely into nvme_config_discard and replacing the ctrl->max_discard_sectors value with a local variable so that the calculation is always namespace-specific. Fixes: 1a86924e4f46 ("nvme: fix interpretation of DMRSL") Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch commit a4be9679aa3e862adcab465122c7678c2b5d40e6 Author: Christoph Hellwig Date: Tue Dec 26 08:58:42 2023 +0000 nvme: also skip discard granularity updates in nvme_config_discard Don't just skip the discard sectors and segments but also the granularity if a value was already set before. Signed-off-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Signed-off-by: Keith Busch commit d3074e9a73e3c0511f1033b15345e2feb9664b3c Author: Christoph Hellwig Date: Tue Dec 26 08:58:41 2023 +0000 nvme: update the explanation for not updating the limits in nvme_config_discard Expeand the comment a bit to explain what is going on. Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch commit 3a96bff229d6e3016805fd6c3dba0655ccba01eb Author: Christoph Hellwig Date: Tue Dec 26 08:13:29 2023 +0000 nvmet-tcp: fix a missing endianess conversion in nvmet_tcp_try_peek_pdu No, a __le32 cast doesn't magically byteswap on big-endian systems.. Fixes: 70525e5d82f6 ("nvmet-tcp: peek icreq before starting TLS") Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 2abd2c39ada8200ca5f02d483dccfa82799f51a7 Author: Christoph Hellwig Date: Tue Dec 26 08:14:12 2023 +0000 nvme-common: mark nvme_tls_psk_prio static Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 2ad28ce9b98f8b22feaecc0966c706a8ef59cbf0 Author: Max Gurtovoy Date: Mon Jan 1 12:35:27 2024 +0200 nvme: remove unused definition There is no users for NVMF_AUTH_HASH_LEN macro. Reviewed-by: Israel Rukshin Reviewed-by: Sagi Grimberg Signed-off-by: Max Gurtovoy Signed-off-by: Keith Busch commit ef184b8844bf98a2a80fab8eecda1489aed5d97f Author: Guixin Liu Date: Sun Dec 31 14:56:44 2023 +0800 nvme: tcp: remove unnecessary goto statement There is no requirement to call nvme_tcp_free_queue() for queue deallocation if the pskid is null or the queue allocation fails, as the NVME_TCP_Q_ALLOCATED flag would not be set in such scenarios. Signed-off-by: Guixin Liu Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 5fb1a8c671473c59ed556035346fa9f2b2b430f1 Author: Richard Fitzgerald Date: Thu Dec 21 10:38:57 2023 +0000 kunit: Add example of kunit_activate_static_stub() with pointer-to-function Adds a variant of example_static_stub_test() that shows use of a pointer-to-function with kunit_activate_static_stub(). A const pointer to the add_one() function is declared. This pointer-to-function is passed to kunit_activate_static_stub() and kunit_deactivate_static_stub() instead of passing add_one directly. Signed-off-by: Richard Fitzgerald Reviewed-by: David Gow Signed-off-by: Shuah Khan commit fcbac39b7d5e776bed058281af5d3248b94f1282 Author: Richard Fitzgerald Date: Thu Dec 21 10:38:56 2023 +0000 kunit: Allow passing function pointer to kunit_activate_static_stub() Swap the arguments to typecheck_fn() in kunit_activate_static_stub() so that real_fn_addr can be either the function itself or a pointer to that function. This is useful to simplify redirecting static functions in a module. Having to pass the actual function meant that it must be exported from the module. Either making the 'static' and EXPORT_SYMBOL*() conditional (which makes the code messy), or change it to always exported (which increases the export namespace and prevents the compiler inlining a trivial stub function in non-test builds). With the original definition of kunit_activate_static_stub() the address of real_fn_addr was passed to typecheck_fn() as the type to be passed. This meant that if real_fn_addr was a pointer-to-function it would resolve to a ** instead of a *, giving an error like this: error: initialization of ‘int (**)(int)’ from incompatible pointer type ‘int (*)(int)’ [-Werror=incompatible-pointer-types] kunit_activate_static_stub(test, add_one_fn_ptr, subtract_one); | ^~~~~~~~~~~~ ./include/linux/typecheck.h:21:25: note: in definition of macro ‘typecheck_fn’ 21 | ({ typeof(type) __tmp = function; \ Swapping the arguments to typecheck_fn makes it take the type of a pointer to the replacement function. Either a function or a pointer to function can be assigned to that. For example: static int some_function(int x) { /* whatever */ } int (* some_function_ptr)(int) = some_function; static int replacement(int x) { /* whatever */ } Then: kunit_activate_static_stub(test, some_function, replacement); yields: typecheck_fn(typeof(&replacement), some_function); and: kunit_activate_static_stub(test, some_function_ptr, replacement); yields: typecheck_fn(typeof(&replacement), some_function_ptr); The two typecheck_fn() then resolve to: int (*__tmp)(int) = some_function; and int (*__tmp)(int) = some_function_ptr; Both of these are valid. In the first case the compiler inserts an implicit '&' to take the address of the supplied function, and in the second case the RHS is already a pointer to the same type. Signed-off-by: Richard Fitzgerald Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit a0b84213f947176ddcd0e96e0751a109f28cde21 Author: Richard Fitzgerald Date: Mon Dec 18 15:17:29 2023 +0000 kunit: Fix NULL-dereference in kunit_init_suite() if suite->log is NULL suite->log must be checked for NULL before passing it to string_stream_clear(). This was done in kunit_init_test() but was missing from kunit_init_suite(). Signed-off-by: Richard Fitzgerald Fixes: 6d696c4695c5 ("kunit: add ability to run tests after boot using debugfs") Reviewed-by: Rae Moar Acked-by: David Gow Reviewed-by: Muhammad Usama Anjum Signed-off-by: Shuah Khan commit 292c2116b2ae84c7e799ae340981e60551b18f5e Author: Relja Vojvodic Date: Fri Dec 15 18:15:16 2023 -0500 drm/amd/display: Fixing stream allocation regression For certain dual display configs that had one display using a 1080p mode, the DPM level used to drive the configs regressed from DPM 0 to DPM 3. This was caused by a missing check that should have only limited the pipe segments on non-phantom pipes. This caused issues with detile buffer allocation, which dissallow subvp from being used Tested-by: Daniel Wheeler Reviewed-by: Dillon Varone Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Relja Vojvodic Signed-off-by: Alex Deucher commit b8a204fb1a97b39a7fcaefbf2c6c4d01aa4f3c57 Author: Nicholas Kazlauskas Date: Thu Dec 14 16:46:35 2023 -0500 drm/amd/display: Verify disallow bits were cleared for idle [Why] A hang was observed where a read-modify-write access occurred due to the register for idle state being shared between DMCUB and driver. dmcub read - idle allow / no commit driver read - idle allow / no commit driver write - idle disallow / no commit dmcub write - idle allow / commit Resulting in DMCUB re-entering IPS after a disable and keeping the allow high. [How] Long term we need to split commit/allow into two registers or use shared DRAM state, but short term we can reduce the repro rate by ensuring that the disallow went through by bounding the expected worst case scenario. Tested-by: Daniel Wheeler Reviewed-by: Hansen Dsouza Reviewed-by: Ovidiu Bunea Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 9ade4870b87b09e1f132ba92c1ab13a6769d1b0f Author: Gabe Teeger Date: Thu Dec 14 20:56:58 2023 -0500 drm/amd/display: Fix Mismatch between pipe and stream [Why] Failing mode validation during dc_commit, leading to blackscreen with an 8k DP2 display during mode change. [What] Fix mixmatch between pipe and stream, which prevented us from recognizing the link as DP2. Tested-by: Daniel Wheeler Reviewed-by: Dmytro Laktyushkin Acked-by: Rodrigo Siqueira Signed-off-by: Gabe Teeger Signed-off-by: Alex Deucher commit f6154d8babbb8a98f0d3ea325aafae2e33bfd8be Author: Revalla Date: Wed Dec 13 19:56:38 2023 +0530 drm/amd/display: Refactor INIT into component folder [why] Move all init files to hwss folder. [how] moved the dcnxx_init.c and .h files into inside the hwss and cleared the linkage errors. Tested-by: Daniel Wheeler Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Revalla Signed-off-by: Alex Deucher commit 6b2b782ad6a25734ae847d1659bea3f613dbb563 Author: Alvin Lee Date: Tue Dec 12 12:17:31 2023 -0500 drm/amd/display: For FPO and SubVP/DRR configs program vmin/max sel For FPO and SubVP/DRR cases we need to ensure to program OTG_V_TOTAL_MIN/MAX_SEL, otherwise stretching the vblank in FPO / SubVP / DRR cases will not have any effect and we could hit underflow / corruption. Tested-by: Daniel Wheeler Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 59f1622a5f05d948a7c665a458a3dd76ba73015e Author: Meenakshikumar Somasundaram Date: Tue Dec 5 00:01:15 2023 -0500 drm/amd/display: Add dpia display mode validation logic [Why] If bandwidth allocation feature is enabled, connection manager wont limit the dp tunnel bandwidth. So, need to do display mode validation for streams on dpia links to avoid oversubscription of dp tunnel bandwidth. [How] - To read non reduced link rate and lane count and update reported link capability. - To calculate the bandwidth required for streams of dpia links per host router and validate against the allocated bandwidth for the host router. Tested-by: Daniel Wheeler Reviewed-by: PeiChen Huang Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Meenakshikumar Somasundaram Signed-off-by: Alex Deucher commit 4e7738bcfb6765ca669fdbd2be2f7f6f239ed3e5 Author: Nicholas Kazlauskas Date: Tue Dec 12 12:10:49 2023 -0500 drm/amd/display: Switch DMCUB notify idle command to NO_WAIT [Why] Race condition between notification of driver idle and the command being processed. We could theoretically enter idle between the submission and the wait for idle that occurs after. [How] Switch the notification to NO_WAIT to avoid the RPTR access. Tested-by: Daniel Wheeler Reviewed-by: Sung joon Kim Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 4b5c5f5ad38b9435518730cc7f8f1e8de9c5cb2f Author: Jack Xiao Date: Tue Dec 19 17:10:34 2023 +0800 drm/amdgpu/gfx11: need acquire mutex before access CP_VMID_RESET v2 It's required to take the gfx mutex before access to CP_VMID_RESET, for there is a race condition with CP firmware to write the register. v2: add extra code to ensure the mutex releasing is successful. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 60d5d1e76270bac910f9596799cbd831fe09c489 Author: Nicholas Kazlauskas Date: Mon Dec 11 17:57:24 2023 -0500 drm/amd/display: Wait forever for DMCUB to wake up [Why] If we time out waiting for PMFW to finish the exit sequence and touch the DMCUB register the system will hang in a hard locked state. [How] Pol forever. This covers the case where things take too long but also enables for debugging to occur since the cores won't be hardlocked. Tested-by: Daniel Wheeler Reviewed-by: Sung joon Kim Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 54249f03ab9a7311dad653b449e15c6a939d7732 Author: Nicholas Kazlauskas Date: Mon Dec 11 17:54:57 2023 -0500 drm/amd/display: Always exit DMCUB idle when called [Why] dc->idle_optimizations_allowed may be desynced with the hardware state. [How] Make sure we always exit out when dc_dmub_srv_exit_low_power_state is called by removing the check. Tested-by: Daniel Wheeler Reviewed-by: Sung joon Kim Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 4069d43bfecb45811a2ad5dc63326e4227fa5931 Author: Relja Vojvodic Date: Wed Dec 13 10:31:06 2023 -0500 drm/amd/display: Add log end specifier [Why] Some debug tools, sometimes wrap around to multiple lines which causes issues with the DPM test script while it is looking for the logs. Need a way to tell when the log is finished. [How] Added "LOG_END" to the end of the log. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Relja Vojvodic Signed-off-by: Alex Deucher commit 09b5bc456c63e3caeb854d492177bbfbe7b1cb22 Author: Alvin Lee Date: Wed Dec 13 09:46:50 2023 -0500 drm/amd/display: Assign stream status for FPO + Vactive cases A new check was added to ensure FPO is not enabled when the FPO pipe has 0 planes. This requires the stream status to check the plane count, but the stream status was not assigned for FPO + Vactive cases which leads to FPO not be enabled always. Tested-by: Daniel Wheeler Reviewed-by: Relja Vojvodic Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit ec9ba4821fa52b5efdbc4cdf0a77497990655231 Author: Felix Kuehling Date: Mon Dec 18 16:17:23 2023 -0500 drm/amdgpu: Let KFD sync with VM fences Change the rules for amdgpu_sync_resv to let KFD synchronize with VM fences on page table reservations. This fixes intermittent memory corruption after evictions when using amdgpu_vm_handle_moved to update page tables for VM mappings managed through render nodes. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit efae5a9eb47b76d5f84c0a0ca2ec95c9ce8a393c Author: Wayne Lin Date: Mon Dec 4 10:09:33 2023 +0800 drm/amd/display: pbn_div need be updated for hotplug event link_rate sometime will be changed when DP MST connector hotplug, so pbn_div also need be updated; otherwise, it will mismatch with link_rate, causes no output in external monitor. Cc: stable@vger.kernel.org Tested-by: Daniel Wheeler Reviewed-by: Jerry Zuo Acked-by: Rodrigo Siqueira Signed-off-by: Wade Wang Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher commit ee8ed2506603629f2706712a5282921a115a8da6 Author: Camille Cho Date: Thu Nov 16 16:19:25 2023 +0800 drm/amd/display: Correctly restore user_level [Why] BL1_PWM_USER_LEVEL is meant for the user brightness level setting from OS. However, we update it along with other ABM levels to the real PWM value which could be ABMed. [How] Driver to cache and restore the user brightness level setting so that DMUB can retrieve the last user setting in ABM config initialization. Tested-by: Daniel Wheeler Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Camille Cho Signed-off-by: Alex Deucher commit aa5dc05340eb97486a631ce6bccb8d020bf6b56b Author: Meenakshikumar Somasundaram Date: Mon Dec 4 10:57:45 2023 -0500 drm/amd/display: Fix minor issues in BW Allocation Phase2 [Why] Fix minor issues in BW Allocation Phase2. [How] - In set_usb4_req_bw_req(), link->dpia_bw_alloc_config.response_ready flag should be reset before writing DPCD REQUEST_BW. - Fix the granularity for value of 2 in get_bw_granularity(). - Removed bandwidth allocation support display fw boot option as the fw would read feature enable status from bios. - Clean up DPIA_EST_BW_CHANGED and DPIA_BW_REQ_SUCCESS cases in dpia_handle_bw_alloc_response(). - Removed allocate_usb4_bw and deallocate_usb4_bw. - Optimized loop in get_lowest_dpia_index(). - Updated link_dp_dpia_allocate_usb4_bandwidth_for_stream() and set_usb4_req_bw_req() to always issue request bw. Tested-by: Daniel Wheeler Reviewed-by: PeiChen Huang Acked-by: Rodrigo Siqueira Signed-off-by: Meenakshikumar Somasundaram Signed-off-by: Alex Deucher commit ca1ecae145b20b11ff49062afe6f0bf6707bc244 Author: Josip Pavic Date: Mon Dec 11 17:50:19 2023 -0500 drm/amd/display: Add null pointer guards where needed [Why] Some functions whose output is typically checked for null are not being checked for null at several call sites, causing some static analysis tools to throw an error. [How] Add null pointer guards around functions that typically have them at other call sites. Tested-by: Daniel Wheeler Reviewed-by: Sung Lee Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Josip Pavic Signed-off-by: Alex Deucher commit 394e850f1ad73c594bf0296c2f601c71517acfdd Author: Leo (Hanghong) Ma Date: Tue Nov 28 12:31:24 2023 -0500 drm/amd/display: Add HDMI capacity computations using fixed31_32 [Why] Certain HDMI modes failed at dml cap check for uncompressed video but they can still be supported for compressed video. [How] Add HDMI capacity computations using fixed31_32 in dc side. Tested-by: Daniel Wheeler Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Leo (Hanghong) Ma Signed-off-by: Alex Deucher commit a71e1310a43ffe47b824aae25ae54f9fcc4daa12 Author: Relja Vojvodic Date: Mon Dec 11 18:00:14 2023 -0500 drm/amd/display: Add more mechanisms for tests [Why] More information is desired for the test tools. [How] Refactored get_subvp_visual_confirm_color and get_mclk_switch_visual_confirm_color to support the new method of storing the p_state type, which was changed so that it could also be saved and output by the DPM log. Ensured that the p_state type is kept updated by looping through the pipes within commit_planes_for_stream. Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Reviewed-by: Alvin Lee Signed-off-by: Relja Vojvodic Signed-off-by: Alex Deucher commit ade13d3fc03a17812e4c677ec898f62b2a8e9485 Author: Alvin Lee Date: Mon Dec 11 14:46:14 2023 -0500 drm/amd/display: Don't allow FPO if no planes In DCN32/321 FPO uses per-pipe P-State force. If there is no plane, then then HUBP is power gated, in which case any programming in HUBP has no effect and the pipe is always asserting P-State allow. This is contrary to what we want to happen for FPO (FW should moderate the P-State assertion), so block FPO if there's no plane for the FPO pipe. Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Reviewed-by: Samson Tam Reviewed-by: Chaitanya Dhere Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 8a0f02b7beed7b2b768dbdf3b79960de68f460c5 Author: Alvin Lee Date: Mon Dec 11 13:20:02 2023 -0500 drm/amd/display: Fix subvp+drr logic errors [Why] There is some logic error where the wrong variable was used to check for OTG_MASTER and DPP_PIPE. [How] Add booleans to confirm that the expected pipes were found before validating schedulability. Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Reviewed-by: Samson Tam Reviewed-by: Chaitanya Dhere Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit a32c6f7f5737cc7e31cd7ad5133f0d96fca12ea6 Author: Stanley.Yang Date: Fri Dec 15 16:13:23 2023 +0800 drm/amdgpu: Fix ecc irq enable/disable unpaired The ecc_irq is disabled while GPU mode2 reset suspending process, but not be enabled during GPU mode2 reset resume process. Changed from V1: only do sdma/gfx ras_late_init in aldebaran_mode2_restore_ip delete amdgpu_ras_late_resume function Changed from V2: check umc ras supported before put ecc_irq Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c71930300fb20d447d19cda2c85037a24a1504ad Author: Roman Li Date: Wed Dec 13 14:12:16 2023 +0800 drm/amd/display: enable dcn35 idle power optimization [Why] Idle power optimization was disabled on dcn35 by default. [How] Enable by setting disable_idle_power_optimizations to false. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 16927047b396d100a510138bdf9fba65f35b81c2 Author: Roman Li Date: Tue Dec 19 14:57:11 2023 -0500 drm/amd/display: Disable IPS by default [Why] Instability is observed on DCN35 if idle power optimization is enabled. [How] Disable IPS until issue is resolved. Signed-off-by: Roman Li Tested-by: Daniel Wheeler Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5eb8094a9b05ae5b3e49376a6e5a7a004cd0514f Author: Mangesh Gadre Date: Tue Dec 19 22:59:16 2023 +0800 drm/amdgpu: Add register read/write debugfs support for AID's SMN address is larger than 32 bits for registers on different AID's Updating existing interface to support access to such registers. Signed-off-by: Mangesh Gadre Reviewed-by: Christian König Reviewed-by: Asad Kamal Signed-off-by: Alex Deucher commit 4d23c1be882ecb7fec6894a68c310fff74cc8bba Author: Colin Ian King Date: Tue Dec 19 14:19:30 2023 +0000 drm/amd/display: remove redundant initialization of variable remainder Variable remainder is being initialized with a value that is never read, the assignment is redundant and can be removed. Also add a newline after the declaration to clean up the coding style. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 9546ac78b232bac56ff975072b1965e0e755ebd4 Author: David Howells Date: Tue Jan 2 20:33:17 2024 +0000 9p: Fix initialisation of netfs_inode for 9p The 9p filesystem is calling netfs_inode_init() in v9fs_init_inode() - before the struct inode fields have been initialised from the obtained file stats (ie. after v9fs_stat2inode*() has been called), but netfslib wants to set a couple of its fields from i_size. Reported-by: Marc Dionne Signed-off-by: David Howells Tested-by: Marc Dionne Tested-by: Dominique Martinet Acked-by: Dominique Martinet cc: Eric Van Hensbergen cc: Latchesar Ionkov cc: Dominique Martinet cc: Christian Schoenebeck cc: v9fs@lists.linux.dev cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org commit 7097c96411d22a1b3f6370dfd7eb2e3b7b83ff98 Author: David Howells Date: Tue Jan 2 16:28:04 2024 +0000 cachefiles: Fix __cachefiles_prepare_write() Fix __cachefiles_prepare_write() to correctly determine whether the requested write will fit correctly with the DIO alignment. Reported-by: Gao Xiang Signed-off-by: David Howells Tested-by: Yiqun Leng Tested-by: Jia Zhu cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-erofs@lists.ozlabs.org cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 3aca362a4c1411ec11ff04f81b6cdf2359fee962 Author: Johannes Berg Date: Tue Jan 2 21:35:42 2024 +0200 wifi: mac80211: remove redundant ML element check If "ml_basic" is assigned, we already know that the type of ML element is basic, so we don't need to check again, that check can never happen. Simplify the code. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Reviewed-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://msgid.link/20240102213313.bb9b636e66f6.I7fc0897022142d46f39ac0b912a4f7b0f1b6ea26@changeid Signed-off-by: Johannes Berg commit d18125b640309e925441ce49559be33867ae6b29 Author: Benjamin Berg Date: Tue Jan 2 21:35:31 2024 +0200 wifi: cfg80211: parse all ML elements in an ML probe response A probe response from a transmitting AP in an Multi-BSSID setup will contain more than one Multi-Link element. Most likely, only one of these elements contains per-STA profiles. Fixes: 2481b5da9c6b ("wifi: cfg80211: handle BSS data contained in ML probe responses") Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240102213313.6635eb152735.I94289002d4a2f7b6b44dfa428344854e37b0b29c@changeid Signed-off-by: Johannes Berg commit 2a0698f86d4dfc43cc0c1703efb7ba6b1506a4e2 Author: Benjamin Berg Date: Tue Jan 2 21:35:30 2024 +0200 wifi: cfg80211: correct comment about MLD ID The comment was referencing the wrong section of the documentation and was also subtly wrong as it assumed the rules that apply when sending probe requests directly to a nontransmitted AP. However, in that case the response comes from the transmitting AP and the AP MLD ID will be included. Fixes: 2481b5da9c6b ("wifi: cfg80211: handle BSS data contained in ML probe responses") Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20240102213313.0917ab4b5d7f.I76aff0e261a5de44ffb467e591a46597a30d7c0a@changeid Signed-off-by: Johannes Berg commit 6fdb8b8781d59796324efa25909f3e2112833f01 Author: Ilan Peer Date: Mon Dec 18 11:30:05 2023 +0200 wifi: cfg80211: Update the default DSCP-to-UP mapping The default DSCP-to-UP mapping method defined in RFC8325 applied to packets marked per recommendations in RFC4594 and destined to 802.11 WLAN clients will yield a number of inconsistent QoS mappings. To handle this, modify the mapping of specific DSCP values for which the default mapping will create inconsistencies, based on the recommendations in section 4 in RFC8325. Note: RFC8235 is used as it referenced by both IEEE802.11Revme_D4.0 and WFA QoS Management Specification. Signed-off-by: Ilan Peer Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231218093005.3064013-1-ilan.peer@intel.com Signed-off-by: Johannes Berg commit 9d027a35a52a4ea9400390ef4414e4e9dcd54193 Author: Benjamin Berg Date: Wed Dec 20 16:19:52 2023 +0100 wifi: cfg80211: tests: add some scanning related tests This adds some scanning related tests, mainly exercising the ML element parsing and inheritance. Signed-off-by: Benjamin Berg Link: https://msgid.link/20231220151952.415232-7-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit bbd97bbed01eca28afa5003acfd12b7c9a0b9f78 Author: Johannes Berg Date: Wed Dec 20 16:19:51 2023 +0100 wifi: mac80211: kunit: extend MFP tests Extend the MFP tests to handle the case of deauth/disassoc and robust action frames (that are not protected dual of public action frames). Reviewed-by: Gregory Greenman Link: https://msgid.link/20231220151952.415232-6-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 951c4684a3debc47b7807ffb0e4bbc16ea2a04df Author: Johannes Berg Date: Wed Dec 20 16:19:50 2023 +0100 wifi: mac80211: kunit: generalize public action test Generalize the test to be able to handle arbitrary action categories and non-action frames, for further test expansion. Reviewed-by: Gregory Greenman Link: https://msgid.link/20231220151952.415232-5-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit 0738e55c384828ccd61170e2d6f1c11196d848e6 Author: Johannes Berg Date: Wed Dec 20 16:19:49 2023 +0100 wifi: mac80211: add kunit tests for public action handling Check the logic in ieee80211_drop_unencrypted_mgmt() according to a list of test cases derived from the spec. Reviewed-by: Benjamin Berg Link: https://msgid.link/20231220151952.415232-4-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit b3231d353a51ddfb6ef7d17877d029790190f746 Author: Benjamin Berg Date: Wed Dec 20 16:19:48 2023 +0100 kunit: add a convenience allocation wrapper for SKBs Add a simple convenience helper to allocate and zero fill an SKB for the use by a kunit test. Also provide a way to free it again in case that may be desirable. This simply mirrors the kunit_kmalloc API. Signed-off-by: Benjamin Berg Reviewed-by: David Gow Link: https://msgid.link/20231220151952.415232-3-benjamin@sipsolutions.net [adjust file description as discussed] Signed-off-by: Johannes Berg commit 292010ee509443a1383bb079a4fa80515aa89a7f Author: Benjamin Berg Date: Wed Dec 20 16:19:47 2023 +0100 kunit: add parameter generation macro using description from array The existing KUNIT_ARRAY_PARAM macro requires a separate function to get the description. However, in a lot of cases the description can just be copied directly from the array. Add a second macro that avoids having to write a static function just for a single strscpy. Signed-off-by: Benjamin Berg Reviewed-by: David Gow Link: https://msgid.link/20231220151952.415232-2-benjamin@sipsolutions.net Signed-off-by: Johannes Berg commit a5bb4e1a3748e650e664e9d44feb30daa9851945 Author: Zheng tan Date: Tue Jan 2 09:54:18 2024 +0800 wifi: mac80211: fix spelling typo in comment Fix spelling of "attributes" in a comment. Reported-by: k2ci Signed-off-by: Zheng tan Link: https://msgid.link/20240102015418.3673858-1-tanzheng@kylinos.cn Signed-off-by: Johannes Berg commit 1184950e341c11b6f82bc5b59564411d9537ab27 Author: Edward Adam Davis Date: Wed Jan 3 20:13:51 2024 +0800 wifi: cfg80211: fix RCU dereference in __cfg80211_bss_update Replace rcu_dereference() with rcu_access_pointer() since we hold the lock here (and aren't in an RCU critical section). Fixes: 32af9a9e1069 ("wifi: cfg80211: free beacon_ies when overridden from hidden BSS") Reported-and-tested-by: syzbot+864a269c27ee06b58374@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Link: https://msgid.link/tencent_BF8F0DF0258C8DBF124CDDE4DD8D992DCF07@qq.com Signed-off-by: Johannes Berg commit 1c53081d773c2cb4461636559b0d55b46559ceec Author: Ricardo Neri Date: Tue Jan 2 20:14:58 2024 -0800 thermal: intel: hfi: Disable an HFI instance when all its CPUs go offline In preparation to support hibernation, add functionality to disable an HFI instance during CPU offline. The last CPU of an instance that goes offline will disable such instance. The Intel Software Development Manual states that the operating system must wait for the hardware to set MSR_IA32_PACKAGE_THERM_STATUS[26] after disabling an HFI instance to ensure that it will no longer write on the HFI memory. Some processors, however, do not ever set such bit. Wait a minimum of 2ms to give time hardware to complete any pending memory writes. Signed-off-by: Ricardo Neri Signed-off-by: Rafael J. Wysocki commit ac1f9230d92a04619331c600dbcead0e32b3e80e Author: Ricardo Neri Date: Tue Jan 2 20:14:57 2024 -0800 thermal: intel: hfi: Enable an HFI instance from its first online CPU Previously, HFI instances were never disabled once enabled. A CPU in an instance only had to check during boot whether another CPU had previously initialized the instance and its corresponding data structure. A subsequent changeset will add functionality to disable instances to support hibernation. Such change will also make possible to disable an HFI instance during runtime via CPU hotplug. Enable an HFI instance from the first of its CPUs that comes online. This covers the boot, CPU hotplug, and resume-from-suspend cases. It also covers systems with one or more HFI instances (i.e., packages). Signed-off-by: Ricardo Neri Signed-off-by: Rafael J. Wysocki commit 8a8b6bb93c704776c4b05cb517c3fa8baffb72f5 Author: Ricardo Neri Date: Tue Jan 2 20:14:56 2024 -0800 thermal: intel: hfi: Refactor enabling code into helper functions In preparation for the addition of a suspend notifier, wrap the logic to enable HFI and program its memory buffer into helper functions. Both the CPU hotplug callback and the suspend notifier will use them. This refactoring does not introduce functional changes. Signed-off-by: Ricardo Neri Signed-off-by: Rafael J. Wysocki commit 6b9c045b0602cf64b33ea6da5e6aa6f81dd47ae8 Author: Geert Uytterhoeven Date: Tue Nov 14 14:33:58 2023 +0100 m68k: defconfig: Update defconfigs for v6.7-rc1 - Enable modular build of the new bcachefs filesystem, - Drop CONFIG_CRYPTO_MANAGER=y (auto-enabled since commit 845346841b77af84 ("crypto: skcipher - Add dependency on ecb")), - Drop CONFIG_DEV_APPLETALK=m, CONFIG_IPDDP=m, and CONFIG_IPDDP_ENCAP=y (removed in commit 1dab47139e6118a4 ("appletalk: remove ipddp driver")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/7abb82edd14ee77d985f3949a673c52bb2ee28b5.1699960088.git.geert@linux-m68k.org commit a15f2d48c6f84ae0dd2000288592c79d5d1acd0e Author: Greg Kroah-Hartman Date: Tue Dec 19 16:47:41 2023 +0100 nubus: Make nubus_bus_type static and constant Now that the driver core can properly handle constant struct bus_type, move the nubus_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. It's also never used outside of drivers/nubus/bus.c so make it static and don't export it as no one is using it. Signed-off-by: Greg Kroah-Hartman Acked-by: Finn Thain Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/2023121940-enlarged-editor-c9a8@gregkh Signed-off-by: Geert Uytterhoeven commit 1cfd0a3e5eeacf9009c2b4c7a8884312678553b1 Merge: 67380251e8bbd 8abf77c88929b Author: Ulf Hansson Date: Wed Jan 3 13:17:56 2024 +0100 mmc: Merge branch fixes into next Merge the mmc fixes for v6.7-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.8. Signed-off-by: Ulf Hansson commit 67380251e8bbd3302c64fea07f95c31971b91c22 Author: Jorge Ramirez-Ortiz Date: Wed Jan 3 12:29:11 2024 +0100 mmc: core: Do not force a retune before RPMB switch Requesting a retune before switching to the RPMB partition has been observed to cause CRC errors on the RPMB reads (-EILSEQ). Since RPMB reads can not be retried, the clients would be directly affected by the errors. This commit disables the retune request prior to switching to the RPMB partition: mmc_retune_pause() no longer triggers a retune before the pause period begins. This was verified with the sdhci-of-arasan driver (ZynqMP) configured for HS200 using two separate eMMC cards (DG4064 and 064GB2). In both cases, the error was easy to reproduce triggering every few tenths of reads. With this commit, systems that were utilizing OP-TEE to access RPMB variables will experience an enhanced performance. Specifically, when OP-TEE is configured to employ RPMB as a secure storage solution, it not only writes the data but also the secure filesystem within the partition. As a result, retrieving any variable involves multiple RPMB reads, typically around five. For context, on ZynqMP, each retune request consumed approximately 8ms. Consequently, reading any RPMB variable used to take at the very minimum 40ms. After droping the need to retune before switching to the RPMB partition, this is no longer the case. Signed-off-by: Jorge Ramirez-Ortiz Acked-by: Avri Altman Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20240103112911.2954632-1-jorge@foundries.io Signed-off-by: Ulf Hansson commit 2ab1efad60ad119b616722b81eeb73060728028c Author: Lin Ma Date: Thu Dec 28 14:43:58 2023 +0800 net/sched: cls_api: complement tcf_tfilter_dump_policy In function `tc_dump_tfilter`, the attributes array is parsed via tcf_tfilter_dump_policy which only describes TCA_DUMP_FLAGS. However, the NLA TCA_CHAIN is also accessed with `nla_get_u32`. The access to TCA_CHAIN is introduced in commit 5bc1701881e3 ("net: sched: introduce multichain support for filters") and no nla_policy is provided for parsing at that point. Later on, tcf_tfilter_dump_policy is introduced in commit f8ab1807a9c9 ("net: sched: introduce terse dump flag") while still ignoring the fact that TCA_CHAIN needs a check. This patch does that by complementing the policy to allow the access discussed here can be safe as other cases just choose rtm_tca_policy as the parsing policy. Signed-off-by: Lin Ma Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 0daaa610c8e033cdfb420db728c2b40eb3a75134 Author: Günther Noack Date: Fri Dec 8 16:51:15 2023 +0100 landlock: Optimize the number of calls to get_access_mask slightly This call is now going through a function pointer, and it is not as obvious any more that it will be inlined. Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20231208155121.1943775-4-gnoack@google.com Fixes: 7a11275c3787 ("landlock: Refactor layer helpers") Signed-off-by: Mickaël Salaün commit ef7d6abb2cf57a18d34b332f0865c4d03bd810a3 Author: Andrew Jones Date: Wed Nov 22 17:47:05 2023 +0100 RISC-V: selftests: Add which-cpus hwprobe test Test the RISCV_HWPROBE_WHICH_CPUS flag of hwprobe. The test also has a command line interface in order to get the cpu list for arbitrary hwprobe pairs. Reviewed-by: Palmer Dabbelt Signed-off-by: Andrew Jones Link: https://lore.kernel.org/r/20231122164700.127954-10-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit e178bf146e4b8c774a7b00aa2419e400f4f7894f Author: Andrew Jones Date: Wed Nov 22 17:47:04 2023 +0100 RISC-V: hwprobe: Introduce which-cpus flag Introduce the first flag for the hwprobe syscall. The flag basically reverses its behavior, i.e. instead of populating the values of keys for a given set of cpus, the set of cpus after the call is the result of finding a set which supports the values of the keys. In order to do this, we implement a pair compare function which takes the type of value (a single value vs. a bitmask of booleans) into consideration. We also implement vdso support for the new flag. Signed-off-by: Andrew Jones Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231122164700.127954-9-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 53b2b22850e1ff9e2729ce8efe2d846ed7d3bff4 Author: Andrew Jones Date: Wed Nov 22 17:47:03 2023 +0100 RISC-V: Move the hwprobe syscall to its own file As Palmer says, hwprobe is "sort of its own thing now, and it's only going to get bigger..." Suggested-by: Palmer Dabbelt Signed-off-by: Andrew Jones Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231122164700.127954-8-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit 36d842d654beba970e74ff0f6016c93623b82d37 Author: Andrew Jones Date: Wed Nov 22 17:47:02 2023 +0100 RISC-V: hwprobe: Clarify cpus size parameter The "count" parameter associated with the 'cpus' parameter of the hwprobe syscall is the size in bytes of 'cpus'. Naming it 'cpu_count' may mislead users (it did me) to think it's the number of CPUs that are or can be represented by 'cpus' instead. This is particularly easy (IMO) to get wrong since 'cpus' is documented to be defined by CPU_SET(3) and CPU_SET(3) also documents a CPU_COUNT() (the number of CPUs in set) macro. CPU_SET(3) refers to the size of cpu sets with 'setsize'. Adopt 'cpusetsize' for the hwprobe parameter and specifically state it is in bytes in Documentation/riscv/hwprobe.rst to clarify. Reviewed-by: Palmer Dabbelt Reviewed-by: Conor Dooley Signed-off-by: Andrew Jones Link: https://lore.kernel.org/r/20231122164700.127954-7-ajones@ventanamicro.com Signed-off-by: Palmer Dabbelt commit cbc911392c05762d27b96a376d4be90c5f21f99d Author: Palmer Dabbelt Date: Fri Nov 10 09:59:03 2023 -0800 RISC-V: Remove the removed single-letter extensions There were a few single-letter extensions that we had references to floating around in the kernel, but that never ended up as actual ISA specs and have mostly been replaced by multi-letter extensions. This removes the references to those extensions. Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231110175903.2631-1-palmer@rivosinc.com Signed-off-by: Palmer Dabbelt commit e956c884ef50a02d23fd594f3ab291444f22a6f3 Merge: e95013156ad88 0990319a0400d Author: Rafael J. Wysocki Date: Wed Jan 3 12:14:51 2024 +0100 Merge tag 'cpufreq-arm-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm into pm-cpufreq Merge ARM cpufreq updates for 6.8 from Viresh Kumar: "- Check return value of a function in SCMI cpufreq driver (Alexandra Diupina). - Use 'NULL' instead of '0' in Armada cpufreq driver (Gregory CLEMENT)." * tag 'cpufreq-arm-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: armada-8k: Fix parameter type warning cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() commit b838dd7612f80b75e4363599f7a0d743011dd0d4 Author: Günther Noack Date: Fri Dec 8 16:51:14 2023 +0100 selftests/landlock: Rename "permitted" to "allowed" in ftruncate tests Suggested-by: Mickaël Salaün Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20231208155121.1943775-3-gnoack@google.com Signed-off-by: Mickaël Salaün commit 3406ebade1a84d1cdb0c342e1506b97a579d3834 Author: Günther Noack Date: Fri Dec 8 16:51:13 2023 +0100 landlock: Remove remaining "inline" modifiers in .c files [v6.6] For module-internal static functions, compilers are already in a good position to decide whether to inline them or not. Suggested-by: Mickaël Salaün Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20231208155121.1943775-2-gnoack@google.com [mic: Split patch for Linux 6.6] Signed-off-by: Mickaël Salaün commit da279087b9d9f288609380baf2b6bb89874769d7 Author: Günther Noack Date: Fri Dec 8 16:51:13 2023 +0100 landlock: Remove remaining "inline" modifiers in .c files [v6.1] For module-internal static functions, compilers are already in a good position to decide whether to inline them or not. Suggested-by: Mickaël Salaün Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20231208155121.1943775-2-gnoack@google.com [mic: Split patch for Linux 6.1] Signed-off-by: Mickaël Salaün commit 8fd80721ec0791826a9ab56656d26931811702f8 Author: Günther Noack Date: Fri Dec 8 16:51:13 2023 +0100 landlock: Remove remaining "inline" modifiers in .c files [v5.15] For module-internal static functions, compilers are already in a good position to decide whether to inline them or not. Suggested-by: Mickaël Salaün Signed-off-by: Günther Noack Link: https://lore.kernel.org/r/20231208155121.1943775-2-gnoack@google.com [mic: Split patch for Linux 5.15] Signed-off-by: Mickaël Salaün commit 7839d0078e0d5e6cc2fa0b0dfbee71de74f1e557 Author: Rafael J. Wysocki Date: Wed Dec 27 21:41:06 2023 +0100 PM: sleep: Fix possible deadlocks in core system-wide PM code It is reported that in low-memory situations the system-wide resume core code deadlocks, because async_schedule_dev() executes its argument function synchronously if it cannot allocate memory (and not only in that case) and that function attempts to acquire a mutex that is already held. Executing the argument function synchronously from within dpm_async_fn() may also be problematic for ordering reasons (it may cause a consumer device's resume callback to be invoked before a requisite supplier device's one, for example). Address this by changing the code in question to use async_schedule_dev_nocall() for scheduling the asynchronous execution of device suspend and resume functions and to directly run them synchronously if async_schedule_dev_nocall() returns false. Link: https://lore.kernel.org/linux-pm/ZYvjiqX6EsL15moe@perf/ Reported-by: Youngmin Nam Signed-off-by: Rafael J. Wysocki Reviewed-by: Stanislaw Gruszka Tested-by: Youngmin Nam Reviewed-by: Ulf Hansson Cc: 5.7+ # 5.7+: 6aa09a5bccd8 async: Split async_schedule_node_domain() Cc: 5.7+ # 5.7+: 7d4b5d7a37bd async: Introduce async_schedule_dev_nocall() Cc: 5.7+ # 5.7+ commit 3b82024c5ba93e7a0db2d0b9635ca6b28338efd7 Author: Viresh Kumar Date: Thu Dec 28 13:04:41 2023 +0530 OPP: Move dev_pm_opp_icc_bw to internal opp.h It isn't used by any driver or API, privatize it. Signed-off-by: Viresh Kumar commit f90dffdce70ff724f9ee8b0bcc711e86e6663896 Author: Arnd Bergmann Date: Wed Jan 3 11:25:38 2024 +0100 ALSA: ac97: fix build regression The ac97_bus_type structure is no longer declared in this file: sound/ac97/bus.c: In function 'ac97_codec_add': sound/ac97/bus.c:112:27: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'bus_type'? 112 | codec->dev.bus = &ac97_bus_type; | ^~~~~~~~~~~~~ | bus_type sound/ac97/bus.c:112:27: note: each undeclared identifier is reported only once for each function it appears in sound/ac97/bus.c: In function 'snd_ac97_codec_driver_register': sound/ac97/bus.c:191:28: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'ac97_bus_reset'? 191 | drv->driver.bus = &ac97_bus_type; Include the header that contains the declaration and make sure the definition is const but not static. Fixes: 66e82d219924 ("ALSA: mark all struct bus_type as const") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20240103102544.3715055-1-arnd@kernel.org Signed-off-by: Takashi Iwai commit 54aa699e8094efb7d7675fefbc03dfce24f98456 Author: Bjorn Helgaas Date: Tue Jan 2 18:40:11 2024 -0600 arch/x86: Fix typos Fix typos, most reported by "codespell arch/x86". Only touches comments, no code changes. Signed-off-by: Bjorn Helgaas Signed-off-by: Ingo Molnar Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20240103004011.1758650-1-helgaas@kernel.org commit 7d4b5d7a37bdd63a5a3371b988744b060d5bb86f Author: Rafael J. Wysocki Date: Wed Dec 27 21:38:23 2023 +0100 async: Introduce async_schedule_dev_nocall() In preparation for subsequent changes, introduce a specialized variant of async_schedule_dev() that will not invoke the argument function synchronously when it cannot be scheduled for asynchronous execution. The new function, async_schedule_dev_nocall(), will be used for fixing possible deadlocks in the system-wide power management core code. Signed-off-by: Rafael J. Wysocki Reviewed-by: Stanislaw Gruszka for the series. Tested-by: Youngmin Nam Reviewed-by: Ulf Hansson commit 6aa09a5bccd8e224d917afdb4c278fc66aacde4d Author: Rafael J. Wysocki Date: Wed Dec 27 21:37:02 2023 +0100 async: Split async_schedule_node_domain() In preparation for subsequent changes, split async_schedule_node_domain() in two pieces so as to allow the bottom part of it to be called from a somewhat different code path. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Stanislaw Gruszka Tested-by: Youngmin Nam Reviewed-by: Ulf Hansson commit c4f8457d17ce590c71aef53d75d49c313eb72cbc Author: Jim Liu Date: Fri Dec 29 15:45:08 2023 +0800 gpio: nuvoton: Add Nuvoton NPCM sgpio driver Add Nuvoton BMC NPCM7xx/NPCM8xx sgpio driver support. Nuvoton NPCM SGPIO module is combine serial to parallel IC (HC595) and parallel to serial IC (HC165), and use APB3 clock to control it. This interface has 4 pins (D_out , D_in, S_CLK, LDSH). BMC can use this driver to increase 64 GPI pins and 64 GPO pins to use. Signed-off-by: Jim Liu Signed-off-by: Bartosz Golaszewski commit a0e4375cb07d888cc86ef4aa7266a3baf1cfcc58 Author: Jim Liu Date: Fri Dec 29 15:45:06 2023 +0800 dt-bindings: gpio: add NPCM sgpio driver bindings Add dt-bindings document for the Nuvoton NPCM7xx sgpio driver Signed-off-by: Jim Liu Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Reviewed-by: Paul Menzel Signed-off-by: Bartosz Golaszewski commit cca28db5c6b77fa6988f9189072c5e6b82bc70ad Merge: b5cb53fd32779 7d65d70161ef7 Author: Takashi Iwai Date: Wed Jan 3 11:00:40 2024 +0100 Merge branch 'topic/cs35l41' into for-next Pull updates for CS35L41 codec for HP models. Signed-off-by: Takashi Iwai commit 7d65d70161ef75a3991480c91668ac11acedf211 Author: Lorenz Brun Date: Tue Jan 2 22:48:20 2024 +0100 ALSA: hda: cs35l41: Support more HP models without _DSD This adds overrides for a series of notebooks using a common config taken from HP's proprietary Windows driver. This has been tested on a HP 15-ey0xxxx device (subsystem 103C8A31) together with another Realtek quirk and the calibration files from the proprietary driver. Signed-off-by: Lorenz Brun Cc: # v6.7 Link: https://lore.kernel.org/r/20240102214821.3394810-1-lorenz@brun.one Signed-off-by: Takashi Iwai commit eee636bff0dcb52c39300dd88ff7e8ecaff4492a Author: Tzuyi Chang Date: Thu Dec 28 18:48:00 2023 +0800 gpio: rtd: Add support for Realtek DHC(Digital Home Center) RTD SoCs This driver enables configuration of GPIO direction, GPIO values, GPIO debounce settings and handles GPIO interrupts. Signed-off-by: Tzuyi Chang Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit ed062044955beb759d6f038bc7170081650b95b2 Author: Tzuyi Chang Date: Thu Dec 28 18:47:59 2023 +0800 dt-bindings: gpio: realtek: Add realtek,rtd-gpio Add the device tree bindings for the Realtek DHC(Digital Home Center) RTD SoCs GPIO controllers. Signed-off-by: Tzuyi Chang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 75f74f85a42eb294b657f847c33e1bb7921dbec9 Merge: 610a9b8f49fbc b6b2264ba2090 f8aa519976b38 3453c2b1d1778 6f01a732608f2 80b79e141da72 c7fc12354be0b bb57f6705960b Author: Joerg Roedel Date: Wed Jan 3 09:59:32 2024 +0100 Merge branches 'apple/dart', 'arm/rockchip', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next commit 0f57b21300c8c7d3500de995ab3018cc7ec41249 Author: Wenhua Lin Date: Tue Jan 2 16:28:29 2024 +0800 gpio: pmic-eic-sprd: Configure the bit corresponding to the EIC through offset A bank PMIC EIC contains 16 EICs, and the operating registers are BIT0-BIT15, such as BIT0 of the register operated by EIC0. Using the one-dimensional array reg[CACHE_NR_REGS] for maintenance will cause the configuration of other EICs to be affected when operating a certain EIC. In order to solve this problem, configure the bit corresponding to the EIC through offset. Signed-off-by: Wenhua Lin Reviewed-by: Chunyan Zhang Signed-off-by: Bartosz Golaszewski commit cff601b45723f9a1415a6599fc24e073a7295cef Merge: 92242716ee92d 315acff5196f4 Author: Dave Airlie Date: Wed Jan 3 11:31:24 2024 +1000 Merge tag 'drm-xe-next-fixes-2023-12-26' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next - Fix couple unfined behavior cases to calm UBSAN and clang (Matt Brost, Lucas) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZYsbDPBLUiqDevLt@intel.com commit 38894ff3a04b7e7a3fa3d7688fa77ceb0ecd4093 Author: liyouhong Date: Wed Dec 27 09:58:31 2023 +0800 ppp: Fix spelling typo in comment in ppp_async_encode() Fix spelling typo in comment Reported-by: k2ci Signed-off-by: liyouhong Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20231227015831.289077-1-liyouhong@kylinos.cn Signed-off-by: Jakub Kicinski commit 501869fecfbc00d20d07c1a5f1a49af8fb903d44 Author: Gerhard Engleder Date: Tue Dec 26 21:55:36 2023 +0100 net: ethtool: Fix symmetric-xor RSS RX flow hash check Commit 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash") adds a check to the ethtool set_rxnfc operation, which checks the RX flow hash if the flag RXH_XFRM_SYM_XOR is set. This flag is introduced with the same commit. It calls the ethtool get_rxfh operation to get the RX flow hash data. If get_rxfh is not supported, then EOPNOTSUPP is returned. There are driver like tsnep, macb, asp2, genet, gianfar, mtk, ... which support the ethtool operation set_rxnfc but not get_rxfh. This results in EOPNOTSUPP returned by ethtool_set_rxnfc() without actually calling the ethtool operation set_rxnfc. Thus, set_rxnfc got broken for all these drivers. Check RX flow hash in ethtool_set_rxnfc() only if driver supports RX flow hash. Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash") Signed-off-by: Gerhard Engleder Reviewed-by: Ravi Gunasekaran Link: https://lore.kernel.org/r/20231226205536.32003-1-gerhard@engleder-embedded.com Signed-off-by: Jakub Kicinski commit 88b8fd9770896231791ad0026d8dddde537d3c82 Merge: 8dc4c41000653 0dd415d155050 Author: Jakub Kicinski Date: Tue Jan 2 16:00:08 2024 -0800 Merge branch 'bug-fixes-for-rss-symmetric-xor' Ahmed Zaki says: ==================== Bug fixes for RSS symmetric-xor A couple of fixes for the symmetric-xor recently merged in net-next [1]. The first patch copies the xfrm value back to user-space when ethtool is built with --disable-netlink. The second allows ethtool to change other RSS attributes while not changing the xfrm values. Link: https://lore.kernel.org/netdev/20231213003321.605376-1-ahmed.zaki@intel.com/ [1] ==================== Link: https://lore.kernel.org/r/20231221184235.9192-1-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit 0dd415d155050f5c1cf360b97f905d42d44f33ed Author: Ahmed Zaki Date: Thu Dec 21 11:42:35 2023 -0700 net: ethtool: add a NO_CHANGE uAPI for new RXFH's input_xfrm Add a NO_CHANGE uAPI value for the new RXFH/RSS input_xfrm uAPI field. This needed so that user-space can set other RSS values (hkey or indir table) without affecting input_xfrm. Should have been part of [1]. Link: https://lore.kernel.org/netdev/20231213003321.605376-1-ahmed.zaki@intel.com/ [1] Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash") Reviewed-by: Jacob Keller Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231221184235.9192-3-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit 7c402f77e8cb6dd593217270e2643eeba1a89b01 Author: Ahmed Zaki Date: Thu Dec 21 11:42:34 2023 -0700 net: ethtool: copy input_xfrm to user-space in ethtool_get_rxfh The ioctl path of ethtool's get channels is missing the final step of copying the new input_xfrm field to user-space. This should have been part of [1]. Link: https://lore.kernel.org/netdev/20231213003321.605376-1-ahmed.zaki@intel.com/ [1] Fixes: 13e59344fb9d ("net: ethtool: add support for symmetric-xor RSS hash") Reviewed-by: Jacob Keller Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231221184235.9192-2-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit 8dc4c410006531ddad981ca9578f83cb93860819 Author: Vladimir Oltean Date: Tue Dec 19 13:02:05 2023 +0200 xsk: make struct xsk_cb_desc available outside CONFIG_XDP_SOCKETS The ice driver fails to build when CONFIG_XDP_SOCKETS is disabled. drivers/net/ethernet/intel/ice/ice_base.c:533:21: error: variable has incomplete type 'struct xsk_cb_desc' struct xsk_cb_desc desc = {}; ^ include/net/xsk_buff_pool.h:15:8: note: forward declaration of 'struct xsk_cb_desc' struct xsk_cb_desc; ^ Fixes: d68d707dcbbf ("ice: Support XDP hints in AF_XDP ZC mode") Closes: https://lore.kernel.org/netdev/8b76dad3-8847-475b-aa17-613c9c978f7a@infradead.org/ Signed-off-by: Vladimir Oltean Acked-by: Larysa Zaremba Reviewed-by: Maciej Fijalkowski Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20231219110205.1289506-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit db02e176f597a14eb696141ffa008c2429453a15 Author: Bjorn Helgaas Date: Wed Dec 6 16:42:31 2023 -0600 PCI/AER: Use explicit register sizes for struct members aer_irq() reads the AER Root Error Status and Error Source Identification (PCI_ERR_ROOT_STATUS and PCI_ERR_ROOT_ERR_SRC) registers directly into struct aer_err_source. Both registers are 32 bits, so declare the members explicitly as "u32" instead of "unsigned int". Similarly, aer_get_device_error_info() reads the AER Header Log (PCI_ERR_HEADER_LOG) registers, which are also 32 bits, into struct aer_header_log_regs. Declare those members as "u32" as well. No functional changes intended. Link: https://lore.kernel.org/r/20231206224231.732765-4-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron commit 1291b716bbf969e101d517bfb8ba18d958f758b8 Author: Bjorn Helgaas Date: Wed Dec 6 16:42:30 2023 -0600 PCI/AER: Decode Requester ID when no error info found When a device with AER detects an error, it logs error information in its own AER Error Status registers. It may send an Error Message to the Root Port (RCEC in the case of an RCiEP), which logs the fact that an Error Message was received (Root Error Status) and the Requester ID of the message source (Error Source Identification). aer_print_port_info() prints the Requester ID from the Root Port Error Source in the usual Linux "bb:dd.f" format, but when find_source_device() finds no error details in the hierarchy below the Root Port, it printed the raw Requester ID without decoding it. Decode the Requester ID in the usual Linux format so it matches other messages. Sample message changes: - pcieport 0000:00:1c.5: AER: Correctable error received: 0000:00:1c.5 - pcieport 0000:00:1c.5: AER: can't find device of ID00e5 + pcieport 0000:00:1c.5: AER: Correctable error message received from 0000:00:1c.5 + pcieport 0000:00:1c.5: AER: found no error details for 0000:00:1c.5 Link: https://lore.kernel.org/r/20231206224231.732765-3-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan commit 02a06f5f1a6aa2e12b2046b51ed3462c2c340037 Author: Bjorn Helgaas Date: Wed Dec 6 16:42:29 2023 -0600 PCI/AER: Use 'Correctable' and 'Uncorrectable' spec terms for errors The PCIe spec classifies errors as either "Correctable" or "Uncorrectable". Previously we printed these as "Corrected" or "Uncorrected". To avoid confusion, use the same terms as the spec. One confusing situation is when one agent detects an error, but another agent is responsible for recovery, e.g., by re-attempting the operation. The first agent may log a "correctable" error but it has not yet been corrected. The recovery agent must report an uncorrectable error if it is unable to recover. If we print the first agent's error as "Corrected", it gives the false impression that it has already been resolved. Sample message change: - pcieport 0000:00:1c.5: AER: Corrected error received: 0000:00:1c.5 + pcieport 0000:00:1c.5: AER: Correctable error received: 0000:00:1c.5 Link: https://lore.kernel.org/r/20231206224231.732765-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron Reviewed-by: Kuppuswamy Sathyanarayanan commit 3e64db35bc37edbe9e37aaa987df92cde12ddb6c Author: Jakub Kicinski Date: Tue Jan 2 14:23:34 2024 -0800 Revert "net: mdio: get/put device node during (un)registration" This reverts commit cff9c565e65f3622e8dc1dcc21c1520a083dff35. Revert based on feedback from Russell. Link: https://lore.kernel.org/all/ZZPtUIRerqTI2%2Fyh@shell.armlinux.org.uk/ Signed-off-by: Jakub Kicinski commit 1e71017b6e12637db3d41bf18b15b76372837679 Merge: 060baa9b90d4e 954fb2d2d49f4 Author: David S. Miller Date: Tue Jan 2 14:25:51 2024 +0000 Merge branch 'renesas-rzg3s-add-support-for-ethernet' Claudiu Beznea says: ==================== renesas: rzg3s: Add support for Ethernet Series adds Ethernet support for Renesas RZ/G3S. Along with it preparatory cleanups and fixes were included. ==================== Link: https://lore.kernel.org/r/20231207070700.4156557-1-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Jakub Kicinski commit 060baa9b90d4e14eac7123abc563070dd30b21a2 Author: Claudiu Beznea Date: Thu Dec 7 09:06:57 2023 +0200 dt-bindings: net: renesas,etheravb: Document RZ/G3S support Document Ethernet RZ/G3S support. Ethernet IP is similar to the one available on RZ/G2L devices. Signed-off-by: Claudiu Beznea Acked-by: Conor Dooley Reviewed-by: Sergey Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Jakub Kicinski commit 55f96e8bbea09afbd0ce95cc281ec2597ddafb81 Author: Simon Horman Date: Sun Dec 17 09:44:50 2023 +0000 i40e: Avoid unnecessary use of comma operator Although it does not seem to have any untoward side-effects, the use of ';' to separate to assignments seems more appropriate than ','. Flagged by clang-17 -Wcomma No functional change intended. Compile tested only. Signed-off-by: Simon Horman Reviewed-by: Nick Desaulniers Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 31deb12e85c35ddd2c037f0107d05d8674cab2c0 Author: Andrii Staikov Date: Wed Nov 29 15:24:12 2023 +0100 i40e: Fix VF disable behavior to block all traffic Currently, if a VF is disabled using the 'ip link set dev $ETHX vf $VF_NUM state disable' command, the VF is still able to receive traffic. Fix the behavior of the 'ip link set dev $ETHX vf $VF_NUM state disable' to completely shutdown the VF's queues making it entirely disabled and not able to receive or send any traffic. Modify the behavior of the 'ip link set $ETHX vf $VF_NUM state enable' command to make a VF do reinitialization bringing the queues back up. Co-developed-by: Aleksandr Loktionov Signed-off-by: Aleksandr Loktionov Reviewed-by: Jan Sokolowski Reviewed-by: Wojciech Drewek Reviewed-by: Przemek Kitszel Signed-off-by: Andrii Staikov Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 5795f533f30a80aa0473652876296ebc9129e33a Author: Jedrzej Jagielski Date: Mon Dec 18 11:39:26 2023 +0100 ixgbe: Refactor returning internal error codes Change returning codes to the kernel ones instead of the internal ones for the entire ixgbe driver. Reviewed-by: Jacob Keller Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman Signed-off-by: Jedrzej Jagielski Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 6c1b4af8c1b20c70dde01e58381685d6a4a1d2c8 Author: Jedrzej Jagielski Date: Mon Dec 18 11:39:25 2023 +0100 ixgbe: Refactor overtemp event handling Currently ixgbe driver is notified of overheating events via internal IXGBE_ERR_OVERTEMP error code. Change the approach for handle_lasi() to use freshly introduced is_overtemp function parameter which set when such event occurs. Change check_overtemp() to bool and return true if overtemp event occurs. Reviewed-by: Przemek Kitszel Signed-off-by: Jedrzej Jagielski Reviewed-by: Jacob Keller Reviewed-by: Simon Horman Tested-by: Sunitha Mekala (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 738808ae82d908e5ef4bd025999d44510c0710a7 Author: Ovidiu Panait Date: Fri Dec 8 14:00:57 2023 +0200 ixgbe: report link state for VF devices The link state of VF devices can be controlled via "ip link set", but the current state (auto/disabled) is not reported by "ip link show". Update ixgbe_ndo_get_vf_config() to make this info available to userspace. Reviewed-by: Przemek Kitszel Signed-off-by: Ovidiu Panait Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 75011bd0f9c55db523242f9f9a0b0b826165f14b Author: Maurizio Lombardi Date: Fri Dec 22 16:17:50 2023 +0100 nvmet-tcp: remove boilerplate code Simplify the nvmet_tcp_handle_h2c_data_pdu() function by removing boilerplate code. Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 0849a5441358cef02586fb2d60f707c0db195628 Author: Maurizio Lombardi Date: Fri Dec 22 16:17:49 2023 +0100 nvmet-tcp: fix a crash in nvmet_req_complete() in nvmet_tcp_handle_h2c_data_pdu(), if the host sends a data_offset different from rbytes_done, the driver ends up calling nvmet_req_complete() passing a status error. The problem is that at this point cmd->req is not yet initialized, the kernel will crash after dereferencing a NULL pointer. Fix the bug by replacing the call to nvmet_req_complete() with nvmet_tcp_fatal_error(). Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Maurizio Lombardi Signed-off-by: Keith Busch commit efa56305908ba20de2104f1b8508c6a7401833be Author: Maurizio Lombardi Date: Fri Dec 22 16:17:48 2023 +0100 nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length If the host sends an H2CData command with an invalid DATAL, the kernel may crash in nvmet_tcp_build_pdu_iovec(). Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 lr : nvmet_tcp_io_work+0x6ac/0x718 [nvmet_tcp] Call trace: process_one_work+0x174/0x3c8 worker_thread+0x2d0/0x3e8 kthread+0x104/0x110 Fix the bug by raising a fatal error if DATAL isn't coherent with the packet size. Also, the PDU length should never exceed the MAXH2CDATA parameter which has been communicated to the host in nvmet_tcp_handle_icreq(). Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Signed-off-by: Maurizio Lombardi Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 3027e7b15b02d2d37e3f82d6b8404f6d37e3b8cf Author: Kunwu Chan Date: Tue Dec 12 10:40:15 2023 +0800 ice: Fix some null pointer dereference issues in ice_ptp.c devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: d938a8cca88a ("ice: Auxbus devices & driver for E822 TS") Cc: Kunwu Chan Suggested-by: Przemek Kitszel Signed-off-by: Kunwu Chan Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit b8ab8858190a1bba5f4b35ca37b1e4d7577b3a75 Author: Jan Glaza Date: Wed Nov 29 02:36:11 2023 -0500 ice: ice_base.c: Add const modifier to params and vars Add const modifier to function parameters and variables where appropriate in ice_base.c and corresponding declarations in ice_base.h. The reason for starting the change is that read-only pointers should be marked as const when possible to allow for smoother and more optimal code generation and optimization as well as allowing the compiler to warn the developer about potentially unwanted modifications, while not carrying noticeable negative impact. Reviewed-by: Andrii Staikov Reviewed-by: Sachin Bahadur Signed-off-by: Jan Glaza Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen commit f9f9de23dc88670564a8e2448750d88398ea3555 Author: Jan Sokolowski Date: Wed Dec 6 11:43:33 2023 +0100 ice: remove rx_len_errors statistic It was found that this statistic is incorrectly reported by HW and thus, useless. As RX length error statistics are shown to the end user when requested, the values reported are misleading. Thus, that value is no longer reported and doesn't count anymore when adding all rx errors. Signed-off-by: Jan Sokolowski Reviewed-by: Mateusz Polchlopek Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 2a2cb4c6c18130e9f14d2e39deb75590744d98ef Author: Jacob Keller Date: Tue Nov 28 11:42:15 2023 -0800 ice: replace ice_vf_recreate_vsi() with ice_vf_reconfig_vsi() The ice_vf_create_vsi() function and its VF ops helper introduced by commit a4c785e8162e ("ice: convert vf_ops .vsi_rebuild to .create_vsi") are used during an individual VF reset to re-create the VSI. This was done in order to ensure that the VSI gets properly reconfigured within the hardware. This is somewhat heavy handed as we completely release the VSI memory and structure, and then create a new VSI. This can also potentially force a change of the VSI index as we will re-use the first open slot in the VSI array which may not be the same. As part of implementing devlink reload, commit 6624e780a577 ("ice: split ice_vsi_setup into smaller functions") split VSI setup into smaller functions, introducing both ice_vsi_cfg() and ice_vsi_decfg() which can be used to configure or deconfigure an existing software VSI structure. Rather than completely removing the VSI and adding a new one using the .create_vsi() VF operation, simply use ice_vsi_decfg() to remove the current configuration. Save the VSI type and then call ice_vsi_cfg() to reconfigure the VSI as the same type that it was before. The existing reset logic assumes that all hardware filters will be removed, so also call ice_fltr_remove_all() before re-configuring the VSI. This new operation does not re-create the VSI, so rename it to ice_vf_reconfig_vsi(). The new approach can safely share the exact same flow for both SR-IOV VFs as well as the Scalable IOV VFs being worked on. This uses less code and is a better abstraction over fully deleting the VSI and adding a new one. Signed-off-by: Jacob Keller Reviewed-by: Przemek Kitszel Reviewed-by: Petr Oros Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit aa4967d8529c8daea85303bcb546fc1b70c4d6ba Author: Andrii Staikov Date: Tue Dec 12 13:51:26 2023 +0100 ice: Add support for packet mirroring using hardware in switchdev mode Switchdev mode allows to add mirroring rules to mirror incoming and outgoing packets to the interface's port representor. Previously, this was available only using software functionality. Add possibility to offload this functionality to the NIC hardware. Introduce ICE_MIRROR_PACKET filter action to the ice_sw_fwd_act_type enum to identify the desired action and pass it to the hardware as well as the VSI to mirror. Example of tc mirror command using hardware: tc filter add dev ens1f0np0 ingress protocol ip prio 1 flower src_mac b4:96:91:a5:c7:a7 skip_sw action mirred egress mirror dev eth1 ens1f0np0 - PF b4:96:91:a5:c7:a7 - source MAC address eth1 - PR of a VF to mirror to Co-developed-by: Marcin Szycik Signed-off-by: Marcin Szycik Reviewed-by: Wojciech Drewek Signed-off-by: Andrii Staikov Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 82e71b226e0ef770d7bc143701c8b4960b4eb3d5 Author: Karol Kolacinski Date: Wed Nov 29 13:40:23 2023 +0100 ice: Enable SW interrupt from FW for LL TS Introduce new capability - Low Latency Timestamping with Interrupt. On supported devices, driver can request a single timestamp from FW without polling the register afterwards. Instead, FW can issue a dedicated interrupt when the timestamp was read from the PHY register and its value is available to read from the register. This eliminates the need of bottom half scheduling, which results in minimal delay for timestamping. For this mode, allocate TS indices sequentially, so that timestamps are always completed in FIFO manner. Co-developed-by: Yochai Hagvi Signed-off-by: Yochai Hagvi Reviewed-by: Przemek Kitszel Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 00d50001444ef5c75c8ab476a6674708f3ff613b Author: Karol Kolacinski Date: Wed Nov 29 13:40:22 2023 +0100 ice: Schedule service task in IRQ top half Schedule service task and EXTTS in the top half to avoid bottom half scheduling if possible, which significantly reduces timestamping delay. Co-developed-by: Michal Michalik Signed-off-by: Michal Michalik Reviewed-by: Przemek Kitszel Signed-off-by: Karol Kolacinski Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 11c83932028714014e4259072bd230473d6db730 Merge: 58f1e9d3a3043 185c1a489f873 Author: Dan Williams Date: Tue Jan 2 11:03:04 2024 -0800 Merge branch 'for-6.8/cxl-cdat' into for-6.8/cxl Pick up the CDAT parsing and QOS class infrastructure for v6.8. commit 58f1e9d3a30438042fc9ed65b3dc56b2e5f7886a Author: Randy Dunlap Date: Tue Jan 2 09:39:17 2024 -0800 cxl/region: use %pap format to print resource_size_t Use "%pap" to print a resource_size_t (phys_addr_t derived type) to prevent build warnings on 32-bit arches (seen on i386 and riscv-32). ../drivers/cxl/core/region.c: In function 'alloc_hpa': ../drivers/cxl/core/region.c:556:25: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=] 556 | "HPA allocation error (%ld) for size:%#llx in %s %pr\n", Fixes: 7984d22f1315 ("cxl/region: Add dev_dbg() detail on failure to allocate HPA space") Signed-off-by: Randy Dunlap Cc: Fan Ni Cc: Davidlohr Bueso Cc: Jonathan Cameron Cc: Dave Jiang Cc: Alison Schofield Cc: Vishal Verma Cc: Ira Weiny Cc: Dan Williams Cc: Link: https://lore.kernel.org/r/20240102173917.19718-1-rdunlap@infradead.org Signed-off-by: Dan Williams commit 9cc52627c702b73c633737db40914ab8fc467de8 Merge: 731859dde86e2 aad86da229bc9 Author: Paolo Bonzini Date: Tue Jan 2 13:19:40 2024 -0500 Merge tag 'kvm-riscv-6.8-1' of https://github.com/kvm-riscv/linux into HEAD KVM/riscv changes for 6.8 part #1 - KVM_GET_REG_LIST improvement for vector registers - Generate ISA extension reg_list using macros in get-reg-list selftest - Steal time account support along with selftest commit 731859dde86e23b0f11e700431e460ea76769584 Merge: 136292522e43d 10f7b1dcdfe05 Author: Paolo Bonzini Date: Tue Jan 2 13:18:30 2024 -0500 Merge tag 'kvm-s390-next-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD - uvdevice fixed additional data return length - stfle (feature indication) vsie fixes and minor cleanup commit 136292522e43da46bee4c0fef80b2602f79525a2 Merge: 8ed26ab8d5911 118e10cd893d5 Author: Paolo Bonzini Date: Tue Jan 2 13:16:29 2024 -0500 Merge tag 'loongarch-kvm-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson into HEAD LoongArch KVM changes for v6.8 1. Optimization for memslot hugepage checking. 2. Cleanup and fix some HW/SW timer issues. 3. Add LSX/LASX (128bit/256bit SIMD) support. commit d642ef7111014805f2e21e9cddb0c0a93ae1313d Author: Uwe Kleine-König Date: Tue Dec 26 14:28:03 2023 +0100 virt: sev-guest: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Acked-by: Tom Lendacky Link: https://lore.kernel.org/r/52826a50250304ab0af14c594009f7b901c2cd31.1703596577.git.u.kleine-koenig@pengutronix.de commit ac4f1897fa5433a1b07a625503a91b6aa9d7e643 Author: Ilpo Järvinen Date: Tue Jan 2 19:27:00 2024 +0200 PCI: Fix 64GT/s effective data rate calculation Unlike the lower rates, the PCIe 64GT/s Data Rate uses 1b/1b encoding, not 128b/130b (PCIe r6.1 sec 1.2, Table 1-1). Correct the PCIE_SPEED2MBS_ENC() calculation to reflect that. Link: https://lore.kernel.org/r/20240102172701.65501-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas commit 1e92af09fab1b5589f3a7ae68109e3c6a5ca6c6e Author: Qiuxu Zhuo Date: Thu Dec 7 09:45:12 2023 +0800 EDAC/skx_common: Filter out the invalid address Decoding an invalid address with certain firmware decoders could cause a #PF (Page Fault) in the EFI runtime context, which could subsequently hang the system. To make {i10nm,skx}_edac more robust against such bogus firmware decoders, filter out invalid addresses before allowing the firmware decoder to process them. Suggested-by: Tony Luck Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20231207014512.78564-1-qiuxu.zhuo@intel.com commit a280c9ceeca73fad22af79b08b470fc7126cf1d5 Author: Kevin Hao Date: Mon Dec 18 13:23:23 2023 +0800 jfs: Add missing set_freezable() for freezable kthread The kernel thread function jfs_lazycommit() and jfs_sync() invoke the try_to_freeze() in its loop. But all the kernel threads are no-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao Signed-off-by: Dave Kleikamp commit 49f9637aafa6e63ba686c13cb8549bf5e6920402 Author: Edward Adam Davis Date: Tue Dec 12 09:36:22 2023 +0800 jfs: fix array-index-out-of-bounds in diNewExt [Syz report] UBSAN: array-index-out-of-bounds in fs/jfs/jfs_imap.c:2360:2 index -878706688 is out of range for type 'struct iagctl[128]' CPU: 1 PID: 5065 Comm: syz-executor282 Not tainted 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0x11c/0x150 lib/ubsan.c:348 diNewExt+0x3cf3/0x4000 fs/jfs/jfs_imap.c:2360 diAllocExt fs/jfs/jfs_imap.c:1949 [inline] diAllocAG+0xbe8/0x1e50 fs/jfs/jfs_imap.c:1666 diAlloc+0x1d3/0x1760 fs/jfs/jfs_imap.c:1587 ialloc+0x8f/0x900 fs/jfs/jfs_inode.c:56 jfs_mkdir+0x1c5/0xb90 fs/jfs/namei.c:225 vfs_mkdir+0x2f1/0x4b0 fs/namei.c:4106 do_mkdirat+0x264/0x3a0 fs/namei.c:4129 __do_sys_mkdir fs/namei.c:4149 [inline] __se_sys_mkdir fs/namei.c:4147 [inline] __x64_sys_mkdir+0x6e/0x80 fs/namei.c:4147 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fcb7e6a0b57 Code: ff ff 77 07 31 c0 c3 0f 1f 40 00 48 c7 c2 b8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 b8 53 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd83023038 EFLAGS: 00000286 ORIG_RAX: 0000000000000053 RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007fcb7e6a0b57 RDX: 00000000000a1020 RSI: 00000000000001ff RDI: 0000000020000140 RBP: 0000000020000140 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000286 R12: 00007ffd830230d0 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [Analysis] When the agstart is too large, it can cause agno overflow. [Fix] After obtaining agno, if the value is invalid, exit the subsequent process. Reported-and-tested-by: syzbot+553d90297e6d2f50dbc7@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Modified the test from agno > MAXAG to agno >= MAXAG based on linux-next report by kernel test robot (Dan Carpenter). Signed-off-by: Dave Kleikamp commit 77e01b49e35f24ebd1659096d5fc5c3b75975545 Author: Mengqi Zhang Date: Mon Dec 25 17:38:40 2023 +0800 mmc: core: Add HS400 tuning in HS400es initialization During the initialization to HS400es stage, add a HS400 tuning flow as an optional process. For Mediatek IP, the HS400es mode requires a specific tuning to ensure the correct HS400 timing setting. Signed-off-by: Mengqi Zhang Link: https://lore.kernel.org/r/20231225093839.22931-2-mengqi.zhang@mediatek.com Signed-off-by: Ulf Hansson commit 09f164d393a6671e5ff8342ba6b3cb7fe3f20208 Author: Peter Robinson Date: Wed Dec 20 13:59:47 2023 +0000 mmc: sdhci_omap: Fix TI SoC dependencies The sdhci_omap is specific to older TI SoCs, update the dependencies for those SoCs and compile testing. While we're at it update the text to reflect the wider range of supported TI SoCS the driver now supports. Fixes: 7d326930d352 ("mmc: sdhci-omap: Add OMAP SDHCI driver") Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20231220135950.433588-2-pbrobinson@gmail.com Signed-off-by: Ulf Hansson commit cb052da7f031b0d2309a4895ca236afb3b4bbf50 Author: Peter Robinson Date: Wed Dec 20 13:59:46 2023 +0000 mmc: sdhci_am654: Fix TI SoC dependencies The sdhci_am654 is specific to recent TI SoCs, update the dependencies for those SoCs and compile testing. While we're at it update the text to reflect the wider range of supported TI SoCS the driver now supports. Fixes: 41fd4caeb00b ("mmc: sdhci_am654: Add Initial Support for AM654 SDHCI driver") Signed-off-by: Peter Robinson Link: https://lore.kernel.org/r/20231220135950.433588-1-pbrobinson@gmail.com Signed-off-by: Ulf Hansson commit e4df56ad0bf3506c5189abb9be83f3bea05a4c4f Author: Lin Gui Date: Tue Dec 19 07:05:32 2023 +0800 mmc: core: Add wp_grp_size sysfs node The eMMC card can be set into write-protected mode to prevent data from being accidentally modified or deleted. Wp_grp_size (Write Protect Group Size) refers to an attribute of the eMMC card, used to manage write protection and is the CSD register [36:32] of the eMMC device. Wp_grp_size (Write Protect Group Size) indicates how many eMMC blocks are contained in each write protection group on the eMMC card. To allow userspace easy access of the CSD register bits, let's add sysfs node "wp_grp_size". Signed-off-by: Lin Gui Signed-off-by: Bo Ye Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231218230532.82427-1-bo.ye@mediatek.com Signed-off-by: Ulf Hansson commit b062136d0d6f46d7ad5c88219cbd75f90cb18e81 Author: Adrian Hunter Date: Thu Dec 14 11:09:02 2023 +0200 mmc: mmc_test: Add re-tuning test Add a test to repeatedly re-tune in between random reads. The test is non-destructive of data on the card and runs for 30 seconds. It can be repeated to test for longer durations. If re-tuning is not supported, the test is skipped. Example: # echo 'mmc1:0001' > /sys/bus/mmc/drivers/mmcblk/unbind # echo 'mmc1:0001' > /sys/bus/mmc/drivers/mmc_test/bind [ 36.642257] mmc_test mmc1:0001: Card claimed for testing. # cat /sys/kernel/debug/mmc1/mmc1\:0001/testlist | grep tuning 52: Re-tuning reliability # echo 52 > /sys/kernel/debug/mmc1/mmc1\:0001/test [ 91.522555] mmc1: Starting tests of card mmc1:0001... [ 91.528425] mmc1: Test case 52. Re-tuning reliability... [ 121.536682] mmc1: Result: OK [ 121.539572] mmc1: Tests completed. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20231214090902.43628-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 84a6be7db9050dd2601c9870f65eab9a665d2d5d Author: Andy Shevchenko Date: Fri Dec 8 00:19:01 2023 +0200 mmc: mmc_spi: remove custom DMA mapped buffers There is no need to duplicate what SPI core or individual controller drivers already do, i.e. mapping the buffers for DMA capable transfers. Note, that the code, besides its redundancy, was buggy: strictly speaking there is no guarantee, while it's true for those which can use this code (see below), that the SPI host controller _is_ the device which does DMA. Also see the Link tags below. Additional notes. Currently only two SPI host controller drivers may use premapped (by the user) DMA buffers: - drivers/spi/spi-au1550.c - drivers/spi/spi-fsl-spi.c Both of them have DMA mapping support code. I don't expect that SPI host controller code is worse than what has been done in mmc_spi. Hence I do not expect any regressions here. Otherwise, I'm pretty much sure these regressions have to be fixed in the respective drivers, and not here. That said, remove all related pieces of DMA mapping code from mmc_spi. Link: https://lore.kernel.org/linux-mmc/c73b9ba9-1699-2aff-e2fd-b4b4f292a3ca@raspberrypi.org/ Link: https://stackoverflow.com/questions/67620728/mmc-spi-issue-not-able-to-setup-mmc-sd-card-in-linux Signed-off-by: Andy Shevchenko Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20231207221901.3259962-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson commit 4b6358e1fe4668e88cd654b345a2a62da9d373f7 Author: Abdel Alkuor Date: Sat Dec 23 11:21:59 2023 -0500 hwmon: (lm75) Add AMS AS6200 temperature sensor as6200 is a temperature sensor with 0.0625°C resolution and a range between -40°C to 125°C. By default, the driver configures as6200 as following: - Converstion rate: 8 Hz - Conversion mode: continuous - Consecutive fault counts: 4 samples - Alert state: high polarity - Alert mode: comparator mode Interrupt is supported for the alert pin. Signed-off-by: Abdel Alkuor Link: https://lore.kernel.org/r/d1686678991bf8ee0d00cb08ca046798f37ca4b3.1703127334.git.alkuor@gmail.com Signed-off-by: Guenter Roeck commit de9c6033fb4de6013c5a4f6cc23b3b40c618cad2 Author: Abdel Alkuor Date: Sat Dec 23 11:21:58 2023 -0500 dt-bindings: hwmon: (lm75) Add AMS AS6200 temperature sensor as6200 is a temperature sensor with a range between -40°C to 125°C degrees and an accuracy of ±0.4°C degree between 0 and 65°C and ±1°C for the other ranges. Signed-off-by: Abdel Alkuor Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/17ba2dfdb3d25bf1b5b4ed9f858b6e28902bedbe.1703127334.git.alkuor@gmail.com Signed-off-by: Guenter Roeck commit cfe09564467b8217b992aa329430897d0983e7db Author: Luca Ceresoli Date: Thu Dec 28 17:27:16 2023 +0100 hwmon: (lm75) remove now-unused include Including hwmon-sysfs.h is not needed since sysfs code got removed from this file in commit 08b024338166 ("hwmon: (lm75) Convert to use new hwmon registration API"). Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20231228-hwmon-cleanup-include-v1-1-e36f65aee1f0@bootlin.com Signed-off-by: Guenter Roeck commit f9e5f289b686bbb8e7fbed7a533e570ad5d863da Author: Peter Yin Date: Tue Dec 12 00:05:19 2023 +0800 hwmon: (pmbus) Add support for MPS Multi-phase mp2856/mp2857 controller Add support for mp2856/mp2857 device from Monolithic Power Systems, Inc. (MPS) vendor. This is a dual-loop, digital, multi-phase, modulation controller. Signed-off-by: Peter Yin Signed-off-by: Potin Lai Link: https://lore.kernel.org/r/20231211160519.21254-3-potin.lai.pt@gmail.com [groeck: Fix checkpatch issues, use i2c_get_match_data()] Signed-off-by: Guenter Roeck commit 956cf0986ad5a965444d5f2916f5190059d99edc Author: Peter Yin Date: Tue Dec 12 00:05:18 2023 +0800 dt-bindings: Add MP2856/MP2857 voltage regulator device Monolithic Power Systems, Inc. (MPS) MP2856/MP2857 dual-loop, digital, multi-phase controller. Signed-off-by: Peter Yin Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231211160519.21254-2-potin.lai.pt@gmail.com Signed-off-by: Guenter Roeck commit f60b9d405f49c8c9cd95e95fb1df02d9e61f89b2 Author: Aleksa Savic Date: Sat Dec 16 15:07:54 2023 +0100 hwmon: (aquacomputer_d5next) Remove unneeded CONFIG_DEBUG_FS #ifdef Remove the #ifdef check for CONFIG_DEBUG_FS and the empty variant of aqc_debugfs_init(), because the debugfs functions already do nothing if debugfs isn't enabled. Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20231216140754.336775-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck commit 4ec21eeac4772e2d931103599569ff010c5b405e Author: David Heidelberg Date: Sat Dec 9 18:15:39 2023 +0100 dt-bindings: hwmon: gpio-fan: Convert txt bindings to yaml Convert fan devices connected to GPIOs to the YAML syntax. Signed-off-by: David Heidelberg Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231209171653.85468-1-david@ixit.cz Signed-off-by: Guenter Roeck commit 06f34bcc9a050f350067006d665b7900ca33be98 Author: Jami Kurki Date: Mon Dec 11 22:02:06 2023 +0100 hwmon: (k10temp) Add support for AMD Family 19h Model 8h Add support for AMD Family 19h Model 8h CPUs, which appear to be the Zen 3 based AMD Threadripper 5000WX series (Chagall). The patch was tested with an AMD Threadripper 5955WX. Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218244 Tested-by: Jami Kurki Signed-off-by: Jami Kurki Co-developed-by: Armin Wolf Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231211210206.11060-1-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 42ac68e3d4ba06ad17bc56b790dbccc37e76e0ba Author: Aleksa Savic Date: Thu Dec 7 13:23:59 2023 +0100 hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers This driver exposes hardware sensors of the Gigabyte AORUS Waterforce all-in-one CPU liquid coolers, which communicate through a proprietary USB HID protocol. Report offsets were initially discovered in [1] and confirmed by me on a Waterforce X240 by observing the sent reports from the official software. Available sensors are pump and fan speed in RPM, as well as coolant temperature. Also available through debugfs is the firmware version. Attaching a fan is optional and allows it to be controlled from the device. If it's not connected, the fan-related sensors will report zeroes. The addressable RGB LEDs and LCD screen are not supported in this driver and should be controlled through userspace tools. [1]: https://github.com/liquidctl/liquidctl/issues/167 Signed-off-by: Aleksa Savic Link: https://lore.kernel.org/r/20231207122402.107032-1-savicaleksa83@gmail.com Signed-off-by: Guenter Roeck commit 7ae587eb163ee25576532098a3bc19a45b8fc2e2 Author: Uwe Kleine-König Date: Thu Dec 7 15:09:32 2023 +0100 hwmon: (smsc47m1) Rename global platform device variable pdev is a bad name for a global variable. Still more as the driver has functions where pdev is a local variable. Rename it to smsc47m1_pdev. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/68a959b56da7f9452557d08c72249182364b0dd0.1701957841.git.u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck commit 581076958ee6455588fe3d3368d5e0db3c2d0c69 Author: Uwe Kleine-König Date: Thu Dec 7 15:09:31 2023 +0100 hwmon: (smsc47m1) Simplify device registration Use platform_device_register_full() instead of open coding this function. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/ab326fb9b1ad2191583b4cb3a8bd624dfedb908e.1701957841.git.u.kleine-koenig@pengutronix.de [groeck: Removed double empty line] Signed-off-by: Guenter Roeck commit 5c2833c8824d6fb5c9de155f7a9cc4e8afc6e1e8 Author: Uwe Kleine-König Date: Thu Dec 7 15:09:30 2023 +0100 hwmon: (smsc47m1) Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/a732270539ef63094a32d0ff582f78e640caf3e4.1701957841.git.u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck commit 3b018391b6158039ee459c9d8ce203fed408cf51 Author: Uwe Kleine-König Date: Thu Dec 7 15:09:29 2023 +0100 hwmon: (smsc47m1) Mark driver struct with __refdata to prevent section mismatch As described in the added code comment, a reference to .exit.text is ok for drivers registered via module_platform_driver_probe(). Make this explicit to prevent the following section mismatch warning WARNING: modpost: drivers/hwmon/smsc47m1: section mismatch in reference: smsc47m1_driver+0x8 (section: .data) -> smsc47m1_remove (section: .exit.text) that triggers on an allmodconfig W=1 build. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/57977a88a9b99b6555b227aa4994ac3df10c6490.1701957840.git.u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck commit 4359b7d254ed1a0df76c19ab1b765f9bdd1e63a1 Author: Serge Semin Date: Wed Nov 22 20:04:50 2023 +0300 MAINTAINERS: Add maintainer for Baikal-T1 PVT hwmon driver Add myself as a maintainer of the Baikal-T1 PVT sensors driver. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20231122170506.27267-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck commit 6ec09effb2af9911e6c98b0ce59f3abd6c823508 Author: Stefan Gloor Date: Mon Dec 4 17:50:03 2023 +0100 hwmon: (sht3x) add sts3x support Add information regarding the existing support for sts3x series and update the datasheet links. Signed-off-by: Stefan Gloor Link: https://lore.kernel.org/r/20231204165004.8491-2-code@stefan-gloor.ch Signed-off-by: Guenter Roeck commit 0c459759ca971ee49a313b19ba50fc499c6cf8ca Author: Delphine CC Chiu Date: Thu Nov 23 09:54:37 2023 +0800 hwmon: (pmbus) Add ltc4286 driver Add a driver to support ltc4286 chip Signed-off-by: Delphine CC Chiu Link: https://lore.kernel.org/r/20231123015440.199822-3-Delphine_CC_Chiu@Wiwynn.com [groeck: Fixed formatting] Signed-off-by: Guenter Roeck commit b5cb53fd32779f3a971c45bcd997ae2608aa1086 Author: Gergo Koteles Date: Sat Dec 30 01:09:45 2023 +0100 ALSA: hda/tas2781: add fixup for Lenovo 14ARB7 The 14ARB7 has two tas2563 amplifier on i2c. Connect it to the tas2781 driver. Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/abce9ee55689523562feb72383377171a489ddc7.1703891777.git.soyer@irl.hu Signed-off-by: Takashi Iwai commit c3ca4458cc2f719b1652abaa8d2fbf7f3d4311cb Author: Gergo Koteles Date: Sat Dec 30 01:09:44 2023 +0100 ALSA: hda/tas2781: add TAS2563 support for 14ARB7 The INT8866 belongs to the Lenovo Yoga 7 Gen 7 AMD 14ARB7 laptop. It has two TAS2563 amplifier. Add the PNP ID and calibration functions to handle them. ACPI excerpt: Scope (_SB.I2CD) { Device (TAS) { Name (_HID, "INT8866") // _HID: Hardware ID Name (_UID, Zero) // _UID: Unique ID Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (RBUF, ResourceTemplate () { I2cSerialBusV2 (0x004C, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.I2CD", 0x00, ResourceConsumer, , Exclusive, ) I2cSerialBusV2 (0x004D, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.I2CD", 0x00, ResourceConsumer, , Exclusive, ) GpioInt (Edge, ActiveLow, SharedAndWake, PullNone, 0x0000, "\\_SB.GPIO", 0x00, ResourceConsumer, , ) { // Pin list 0x0020 } }) Return (RBUF) /* \_SB_.I2CD.TAS_._CRS.RBUF */ } Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0F) } } } Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/3b8d4c602e1a46922f53bc9afc8b705d55aa4872.1703891777.git.soyer@irl.hu Signed-off-by: Takashi Iwai commit c021ca729fe870d25a4798491c383c89b3091650 Author: Gergo Koteles Date: Sat Dec 30 01:09:43 2023 +0100 ALSA: hda/tas2781: add configurable global i2c address Make the global i2c address configurable to support compatible amplifiers with different global i2c address. Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/a252f1efeed5049f027f01e699c9e10e1e05bf9e.1703891777.git.soyer@irl.hu Signed-off-by: Takashi Iwai commit 76f5f55c45b906710c9565a7e68c8d782c46b394 Author: Gergo Koteles Date: Sat Dec 30 01:09:42 2023 +0100 ALSA: hda/tas2781: add ptrs to calibration functions Make calibration functions configurable to support different calibration data storage modes. Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/5859c77ffef752b8a9784713b412d815d7e2688c.1703891777.git.soyer@irl.hu Signed-off-by: Takashi Iwai commit 954fb2d2d49f46e1d9861c45731e26bdeb081695 Merge: d8213efe46aaf 33241dca48626 Author: David S. Miller Date: Tue Jan 2 14:25:51 2024 +0000 Merge branch 'remove-retired-tc-uapi' Jamal Hadi Salim says: ==================== net/sched: Remove UAPI support for retired TC qdiscs and classifiers Classifiers RSVP and tcindex as well as qdiscs dsmark, CBQ and ATM have already been deleted. This patchset removes their UAPI support. User space - with a focus on iproute2 - typically copies these UAPI headers for different kernels. These deletion patches are coordinated with the iproute2 maintainers to make sure that they delete any user space code referencing removed objects at their leisure. ==================== Signed-off-by: David S. Miller commit 33241dca486264193ed68167c8eeae1fb197f3df Author: Jamal Hadi Salim Date: Sat Dec 23 09:01:54 2023 -0500 net/sched: Remove uapi support for CBQ qdisc Commit 051d44209842 ("net/sched: Retire CBQ qdisc") retired the CBQ qdisc. Remove UAPI for it. Iproute2 will sync by equally removing it from user space. Reviewed-by: Victor Nogueira Reviewed-by: Pedro Tammela Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 26cc8714fc7f79a806c3d7ffa215b984c384ab4d Author: Jamal Hadi Salim Date: Sat Dec 23 09:01:53 2023 -0500 net/sched: Remove uapi support for ATM qdisc Commit fb38306ceb9e ("net/sched: Retire ATM qdisc") retired the ATM qdisc. Remove UAPI for it. Iproute2 will sync by equally removing it from user space. Reviewed-by: Victor Nogueira Reviewed-by: Pedro Tammela Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit fe3b739a5472968d8d349522b6816bc4db82bc0f Author: Jamal Hadi Salim Date: Sat Dec 23 09:01:52 2023 -0500 net/sched: Remove uapi support for dsmark qdisc Commit bbe77c14ee61 ("net/sched: Retire dsmark qdisc") retired the dsmark classifier. Remove UAPI support for it. Iproute2 will sync by equally removing it from user space. Reviewed-by: Victor Nogueira Reviewed-by: Pedro Tammela Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 82b2545ed9a465e4c470d2dbbb461522f767c56f Author: Jamal Hadi Salim Date: Sat Dec 23 09:01:51 2023 -0500 net/sched: Remove uapi support for tcindex classifier commit 8c710f75256b ("net/sched: Retire tcindex classifier") retired the TC tcindex classifier. Remove UAPI for it. Iproute2 will sync by equally removing it from user space. Reviewed-by: Victor Nogueira Reviewed-by: Pedro Tammela Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 41bc3e8fc1f728085da0ca6dbc1bef4a2ddb543c Author: Jamal Hadi Salim Date: Sat Dec 23 09:01:50 2023 -0500 net/sched: Remove uapi support for rsvp classifier commit 265b4da82dbf ("net/sched: Retire rsvp classifier") retired the TC RSVP classifier. Remove UAPI for it. Iproute2 will sync by equally removing it from user space. Reviewed-by: Victor Nogueira Reviewed-by: Pedro Tammela Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit d8213efe46aafd78ba0893500a54e66e774f8e19 Merge: 3ce4f9c3fbb3d c902ba322cfda Author: David S. Miller Date: Tue Jan 2 14:19:54 2024 +0000 Merge branch 'octeon_ep_vf-driver' Shinas Rasheed says: ==================== add octeon_ep_vf driver This driver implements networking functionality of Marvell's Octeon PCI Endpoint NIC VF. This driver support following devices: * Network controller: Cavium, Inc. Device b203 * Network controller: Cavium, Inc. Device b403 * Network controller: Cavium, Inc. Device b103 * Network controller: Cavium, Inc. Device b903 * Network controller: Cavium, Inc. Device ba03 * Network controller: Cavium, Inc. Device bc03 * Network controller: Cavium, Inc. Device bd03 Changes: V2: - Removed linux/version.h header file from inclusion in octep_vf_main.c - Corrected Makefile entry to include building octep_vf_mbox.c in [6/8] patch. - Removed redundant vzalloc pointer cast and vfree pointer check in [6/8] patch. V1: https://lore.kernel.org/all/20231221092844.2885872-1-srasheed@marvell.com/ ==================== Signed-off-by: David S. Miller commit c902ba322cfda8ebe54ffd53392ef7e2ef5d1c65 Author: Shinas Rasheed Date: Sat Dec 23 05:40:00 2023 -0800 octeon_ep_vf: update MAINTAINERS add MAINTAINERS for octeon_ep_vf driver. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 50648968b3e3c193b45eaca07840111c9d4fdb74 Author: Shinas Rasheed Date: Sat Dec 23 05:39:59 2023 -0800 octeon_ep_vf: add ethtool support Add support for the following ethtool commands: ethtool -i|--driver devname ethtool devname ethtool -S|--statistics devname Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 77cef1e02104529f54c5b8b4126317eda3ff132d Author: Shinas Rasheed Date: Sat Dec 23 05:39:58 2023 -0800 octeon_ep_vf: add Tx/Rx processing and interrupt support Add support to enable MSI-x and register interrupts. Add support to process Tx and Rx traffic. Includes processing Tx completions and Rx refill. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 8f8d322bc47c1c5ecab1f2238b644e30f69cc475 Author: Shinas Rasheed Date: Sat Dec 23 05:39:57 2023 -0800 octeon_ep_vf: add support for ndo ops Add support for ndo ops to set MAC address, change MTU, get stats. Add control path support to set MAC address, change MTU, get stats, set speed, get and set link mode. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 6ca7b5486ebd5e7985f0c98a2ac7ae49078043a4 Author: Shinas Rasheed Date: Sat Dec 23 05:39:56 2023 -0800 octeon_ep_vf: add Tx/Rx ring resource setup and cleanup Implement Tx/Rx ring resource allocation and cleanup. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit db468f92c3b9437dfeb1dcf55d9b7d1b97769a6c Author: Shinas Rasheed Date: Sat Dec 23 05:39:55 2023 -0800 octeon_ep_vf: add VF-PF mailbox communication. Implement VF-PF mailbox to send all control commands from VF to PF and receive responses and notifications from PF to VF. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 5f8c64c2344c888a03fa4b7fd8c3b5e0c235d879 Author: Shinas Rasheed Date: Sat Dec 23 05:39:54 2023 -0800 octeon_ep_vf: add hardware configuration APIs Implement hardware resource init and shutdown helper APIs, like hardware Tx/Rx queue init/enable/disable/reset. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit ebdc193b2ce209bfc1ebec2f777cd7bac00b547c Author: Shinas Rasheed Date: Sat Dec 23 05:39:53 2023 -0800 octeon_ep_vf: Add driver framework and device initialization Add driver framework and device setup and initialization for Octeon PCI Endpoint NIC VF. Add implementation to load module, initialize, register network device, cleanup and unload module. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 3ce4f9c3fbb3de675693d178f86284969c146898 Author: Geoff Levand Date: Sat Dec 23 16:28:20 2023 +0900 net/ps3_gelic_net: Add gelic_descr structures In an effort to make the PS3 gelic driver easier to maintain, create two new structures, struct gelic_hw_regs and struct gelic_chain_link, and replace the corresponding members of struct gelic_descr with the new structures. The new struct gelic_hw_regs holds the register variables used by the gelic hardware device. The new struct gelic_chain_link holds variables used to manage the driver's linked list of gelic descr structures. Signed-off-by: Geoff Levand Signed-off-by: David S. Miller commit ef62548f4a162d1f5096c7a16673081dd72c6f4e Author: Krzysztof Kozlowski Date: Mon Dec 11 09:58:28 2023 +0100 dt-bindings: mmc: sdhci-msm: document dedicated IPQ4019 and IPQ8074 Add dedicated compatibles for the Qualcomm IPQ4019 and IPQ8074 SoCs, because usage of generic qcom,sdhci-msm-v4 compatible alone is deprecated. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231211085830.25380-1-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson commit f7ba616f948a08d83425b4b0c75359ae01e2fd3d Author: Krzysztof Kozlowski Date: Sat Dec 9 18:10:13 2023 +0100 dt-bindings: mmc: synopsys-dw-mshc: add iommus for Intel SocFPGA The DW MSHC node in Intel SocFPGA ARM64 DTS has iommus property, so allow it to silence dtbs_check warnings: socfpga_n5x_socdk.dtb: mmc@ff808000: Unevaluated properties are not allowed ('iommus' was unexpected) Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231209171013.249972-1-krzysztof.kozlowski@linaro.org Signed-off-by: Ulf Hansson commit fb9bb704896b4defad76661289136316d534d6f3 Merge: 8a48a2dc24f83 8d7ba028aa9ab Author: David S. Miller Date: Tue Jan 2 13:52:28 2024 +0000 Merge branch 'bnxt_en-ntuple-fuilter-support' Michael Chan says: ==================== bnxt_en: Add basic ntuple filter support The current driver only supports ntuple filters added by aRFS. This patch series adds basic support for user defined TCP/UDP ntuple filters added by the user using ethtool. Many of the patches are refactoring patches to make the existing code more general to support both aRFS and user defined filters. aRFS filters always have the Toeplitz hash value from the NIC. A Toepliz hash function is added in patch 5 to get the same hash value for user defined filters. The hash is used to store all ntuple filters in the table and all filters must be hashed identically using the same function and key. v2: Fix compile error in patch #4 when CONFIG_BNXT_SRIOV is disabled. ==================== Signed-off-by: David S. Miller commit 8d7ba028aa9ab6570fe233ae026b3609b46f1eb7 Author: Michael Chan Date: Fri Dec 22 20:22:10 2023 -0800 bnxt_en: Add support for ntuple filter deletion by ethtool. Add logic to delete a user specified ntuple filter from ethtool. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c029bc30b9f6661932ee38e4bba3e8da137a579d Author: Michael Chan Date: Fri Dec 22 20:22:09 2023 -0800 bnxt_en: Add support for ntuple filters added from ethtool. Add support for adding user defined ntuple TCP/UDP filters. These filters are similar to aRFS filters except that they don't get aged. Source IP, destination IP, source port, or destination port can be unspecifed as wildcard. At least one of these tuples must be specifed. If a tuple is specified, the full mask must be specified. All ntuple related ethtool functions are now no longer compiled only for CONFIG_RFS_ACCEL. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 300c191800987a3de3422dad424601d5493041c7 Author: Michael Chan Date: Fri Dec 22 20:22:08 2023 -0800 bnxt_en: Add ntuple matching flags to the bnxt_ntuple_filter structure. aRFS filters match all 5 tuples. User defined ntuple filters may specify some of the tuples as wildcards. To support that, we add the ntuple_flags to the bnxt_ntuple_filter struct to specify which tuple fields are to be matched. The matching tuple fields will then be passed to the firmware in bnxt_hwrm_cfa_ntuple_filter_alloc() to create the proper filter. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 4faeadfd7ed67dc004d292bc3a9557f3c64fae9f Author: Michael Chan Date: Fri Dec 22 20:22:07 2023 -0800 bnxt_en: Refactor ntuple filter removal logic in bnxt_cfg_ntp_filters(). Refactor the logic into a new function bnxt_del_ntp_filters(). The same call will be used when the user deletes an ntuple filter. The bnxt_hwrm_cfa_ntuple_filter_free() function to call fw to free the ntuple filter is exported so that the ethtool logic can call it. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 80cfde29ce1fab7f2cedd259e335f3bc725118d2 Author: Michael Chan Date: Fri Dec 22 20:22:06 2023 -0800 bnxt_en: Refactor the hash table logic for ntuple filters. Generalize the ethtool logic that walks the ntuple hash table now that we have the common bnxt_filter_base structure. This will allow the code to easily extend to cover user defined ntuple or ether filters. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 59cde76f33fa4ae5cdc7f51ce87bab9e531ca183 Author: Michael Chan Date: Fri Dec 22 20:22:05 2023 -0800 bnxt_en: Refactor filter insertion logic in bnxt_rx_flow_steer(). Add a new function bnxt_insert_ntp_filter() to insert the ntuple filter into the hash table and other basic setup. We'll use this function to insert a user defined filter from ethtool. Also, export bnxt_lookup_ntp_filter_from_idx() and bnxt_get_ntp_filter_idx() for similar purposes. All ntuple related functions are now no longer compiled only for CONFIG_RFS_ACCEL Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ee908d05dd2acd89f5c0625535ef415fd89eb6aa Author: Michael Chan Date: Fri Dec 22 20:22:04 2023 -0800 bnxt_en: Add new BNXT_FLTR_INSERTED flag to bnxt_filter_base struct. Change the unused flag to BNXT_FLTR_INSERTED. To prepare for multiple pathways that an ntuple filter can be deleted, we add this flag. These filter structures can be retreived from the RCU hash table but only the caller that sees that the BNXT_FLTR_INSERTED flag is set can delete the filter structure and clear the flag under spinlock. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit cb5bdd292dc01f42dd4ecebda203e2161a901c6f Author: Michael Chan Date: Fri Dec 22 20:22:03 2023 -0800 bnxt_en: Add bnxt_lookup_ntp_filter_from_idx() function Add the helper function to look up the ntuple filter from the hash index and use it in bnxt_rx_flow_steer(). The helper function will also be used by user defined ntuple filters in the next patches. Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit d3c982851c15ff1c5187a6188710daa7d0db7fe4 Author: Pavan Chebbi Date: Fri Dec 22 20:22:02 2023 -0800 bnxt_en: Add function to calculate Toeplitz hash For ntuple filters added by aRFS, the Toeplitz hash calculated by our NIC is available and is used to store the ntuple filter for quick retrieval. In the next patches, user defined ntuple filter support will be added and we need to calculate the same hash for these filters. The same hash function needs to be used so we can detect duplicates. Add the function bnxt_toeplitz() to calculate the Toeplitz hash for user defined ntuple filters. bnxt_toeplitz() uses the same Toeplitz key and the same key length as the NIC. bnxt_get_ntp_filter_idx() is added to return the hash index. For aRFS, the hash comes from the NIC. For user defined ntuple, we call bnxt_toeplitz() to calculate the hash index. Reviewed-by: Andy Gospodarek Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 96c9bedc755ed1fa6e35d37328ddbcb439c93c4c Author: Michael Chan Date: Fri Dec 22 20:22:01 2023 -0800 bnxt_en: Refactor L2 filter alloc/free firmware commands. Refactor the L2 filter alloc/free logic so that these filters can be added/deleted by the user. The bp->ntp_fltr_bmap allocated size is also increased to allow enough IDs for L2 filters. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit bfeabf7e4615bf3076937be36456906b4597c64c Author: Michael Chan Date: Fri Dec 22 20:22:00 2023 -0800 bnxt_en: Re-structure the bnxt_ntuple_filter structure. With the new bnxt_l2_filter structure, we can now re-structure the bnxt_ntuple_filter structure to point to the bnxt_l2_filter structure. We eliminate the L2 ether address info from the ntuple filter structure as we can get the information from the L2 filter structure. Note that the source L2 MAC address is no longer used. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 1f6e77cb9b328f2ec145e73be97cab6fec838678 Author: Michael Chan Date: Fri Dec 22 20:21:59 2023 -0800 bnxt_en: Add bnxt_l2_filter hash table. The current driver only has an array of 4 additional L2 unicast addresses to support the netdev uc address list. Generalize and expand this infrastructure with an L2 address hash table so we can support an expanded list of unicast addresses (for bridges, macvlans, OVS, etc). The L2 hash table infrastructure will also allow more generalized n-tuple filter support. This patch creates the bnxt_l2_filter structure and the hash table. This L2 filter structure has the same bnxt_filter_base structure as used in the bnxt_ntuple_filter structure. All currently supported L2 filters will now have an entry in this new table. Note that L2 filters may be created for the VF. VF filters should not be freed when the PF goes down. Add some logic in bnxt_free_l2_filters() to allow keeping the VF filters or to free everything during rmmod. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 992d38d2b988a7d71c2416dad9af2b769f51ac25 Author: Michael Chan Date: Fri Dec 22 20:21:58 2023 -0800 bnxt_en: Refactor bnxt_ntuple_filter structure. This is in preparation to support user defined L2 (ether) filters, which will have many similarities with ntuple filters. Refactor bnxt_ntuple_filter structure to have a bnxt_filter_base structure that can be re-used by the L2 filters. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 8a48a2dc24f834aa1a1f5f2c5444805523f65aee Merge: 7df54188a897f da9065caa594d Author: David S. Miller Date: Tue Jan 2 13:43:23 2024 +0000 Merge tag 'for-net-next-2023-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Luiz Augusto von Dentz says: ==================== bluetooth-next pull request for net-next: - btnxpuart: Fix recv_buf return value - L2CAP: Fix responding with multiple rejects - Fix atomicity violation in {min,max}_key_size_set - ISO: Allow binding a PA sync socket - ISO: Reassociate a socket with an active BIS - ISO: Avoid creating child socket if PA sync is terminating - Add device 13d3:3572 IMC Networks Bluetooth Radio - Don't suspend when there are connections - Remove le_restart_scan work - Fix bogus check for re-auth not supported with non-ssp - lib: Add documentation to exported functions - Support HFP offload for QCA2066 ==================== Signed-off-by: David S. Miller commit e7d3b9f28654dbfce7e09f8028210489adaf6a33 Author: Harshit Mogalapalli Date: Mon Dec 18 22:36:35 2023 -0800 usb: yurex: Fix inconsistent locking bug in yurex_read() Unlock before returning on the error path. Fixes: 86b20af11e84 ("usb: yurex: Replace snprintf() with the safer scnprintf() variant") Reported-by: Dan Carpenter Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202312170252.3udgrIcP-lkp@intel.com/ Signed-off-by: Harshit Mogalapalli Link: https://lore.kernel.org/r/20231219063639.450994-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Greg Kroah-Hartman commit 4c3ea81aa8e11400f24e5541bf46c2cadb4202e9 Author: Javier Carrasco Date: Thu Dec 14 17:29:12 2023 +0100 usb: typec: tipd: add patch update support for tps6598x The TPS6598x PD controller supports firmware updates that can be loaded either from an external flash memory or a host using the device's I2C host interface. This patch implements the second approach, which is especially relevant if no flash memory is available. In order to make patch bundle updates, a series of tasks (special commands) must be sent to the device as it is documented in the TPS65987DDH and TPS65988DH Host Interface Technical Reference Manual[1], section 4.11 (Patch Bundle Update Tasks). The update sequence is as follows: 1. PTCs - Start Patch Load Sequence: the proposed approach includes device and application configuration data. 2. PTCd - Patch Download: 64-byte data chunks must be sent until the end of the firmware file is reached (the last chunk may be shorter). 3. PTCc - Patch Data Transfer Complete: ends the patch loading sequence. After this sequence and if no errors occurred, the device will change its mode to 'APP' after SETUP_MS milliseconds, and then it will be ready for normal operation. [1] https://www.ti.com/lit/ug/slvubh2b/slvubh2b.pdf?ts=1697623299919&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTPS65987D Signed-off-by: Javier Carrasco Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231207-tps6598x_update-v2-4-f3cfcde6d890@wolfvision.net Signed-off-by: Greg Kroah-Hartman commit e79ead88eeb8f3e945355b537bfaca7532dfee10 Author: Javier Carrasco Date: Thu Dec 14 17:29:11 2023 +0100 usb: typec: tipd: declare in_data in as const in exec_cmd functions The input data passed to execute commands with tps6598x_exec_cmd() is not supposed to be modified by the function. Moreover, this data is passed to tps6598x_exec_cmd_tmo() and finally to tps6598x_block_write(), which expects a const pointer. The current implementation does not produce any bugs, but it discards const qualifiers from the pointers passed as arguments. This leads to compile issues if 'discarded-qualifiers' is active and a const pointer is passed to the function, which is the case if data from a firmware structure is passed to execute update commands. Adding the const modifier to in_data prevents such issues and provides code consistency. Signed-off-by: Javier Carrasco Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231207-tps6598x_update-v2-3-f3cfcde6d890@wolfvision.net Signed-off-by: Greg Kroah-Hartman commit 798531b85f08c1dd128b88acd1f98c6a6b30dffd Author: Javier Carrasco Date: Thu Dec 14 17:29:10 2023 +0100 usb: typec: tipd: add function to request firmware The firmware request process is device agnostic and can be used for other parts. Signed-off-by: Javier Carrasco Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231207-tps6598x_update-v2-2-f3cfcde6d890@wolfvision.net Signed-off-by: Greg Kroah-Hartman commit d49f90822015ad9c8837717e6b5967c8748626df Author: Javier Carrasco Date: Thu Dec 14 17:29:09 2023 +0100 usb: typec: tipd: add init and reset functions to tipd_data The current implementation includes a number of special cases for the tps25750. Nevertheless, init and reset functions can be generalized by adding function pointers to the tipd_data structure in order to offer that functionality to other parts without additional conditional clauses. Some functionality like the cold reset request (GAID) is shared by the tps25750 and the tps6598x, so they can use the same reset function. Signed-off-by: Javier Carrasco Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231207-tps6598x_update-v2-1-f3cfcde6d890@wolfvision.net Signed-off-by: Greg Kroah-Hartman commit 7df54188a897ff656e237239f2b02a8f70183333 Author: Vegard Nossum Date: Fri Dec 22 14:36:28 2023 +0100 Documentation: add pyyaml to requirements.txt Commit f061c9f7d058 ("Documentation: Document each netlink family") added a new Python script that is invoked during 'make htmldocs' and which reads the netlink YAML spec files. Using the virtualenv from scripts/sphinx-pre-install, we get this new error wen running 'make htmldocs': Traceback (most recent call last): File "./tools/net/ynl/ynl-gen-rst.py", line 26, in import yaml ModuleNotFoundError: No module named 'yaml' make[2]: *** [Documentation/Makefile:112: Documentation/networking/netlink_spec/rt_link.rst] Error 1 make[1]: *** [Makefile:1708: htmldocs] Error 2 Fix this by adding 'pyyaml' to requirements.txt. Note: This was somehow present in the original patch submission: I'm not sure why the pyyaml requirement disappeared in the meantime. Fixes: f061c9f7d058 ("Documentation: Document each netlink family") Cc: Breno Leitao Cc: Jakub Kicinski Cc: David S. Miller Cc: Jonathan Corbet Signed-off-by: Vegard Nossum Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 961410c9e8534d3c6f347c04cacf50bc5c002a3f Author: liyouhong Date: Thu Dec 21 10:34:25 2023 +0800 drivers/usb/gadget/udc: Fix spelling typo in comments(reqest->request) Fix spelling typo in comments. Reported-by: k2ci Signed-off-by: liyouhong Link: https://lore.kernel.org/r/20231221023425.1316397-1-liyouhong@kylinos.cn Signed-off-by: Greg Kroah-Hartman commit afe28cd686aeb77e8d9140d50fb1cf06a7ecb731 Author: Thinh Nguyen Date: Fri Dec 22 22:11:33 2023 +0000 Revert "usb: dwc3: don't reset device side if dwc3 was configured as host-only" This reverts commit e835c0a4e23c38531dcee5ef77e8d1cf462658c7. Don't omit soft-reset. During initialization, the driver may need to perform a soft reset to ensure the phy is ready when the controller updates the GCTL.PRTCAPDIR or other settings by issuing phy soft-reset. Many platforms often have access to DCTL register for soft-reset despite being host-only. If there are actual reported issues from the platforms that don't expose DCTL registers, then we will need to revisit (perhaps to teach dwc3 to perform xhci's soft-reset USBCMD.HCRST). Cc: Fixes: e835c0a4e23c ("usb: dwc3: don't reset device side if dwc3 was configured as host-only") Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/7668ab11a48f260820825274976eb41fec7f54d1.1703282469.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 7059fbebcb00554c3f31e5b5d93ef6d2d96dc7b4 Author: Thinh Nguyen Date: Fri Dec 22 22:11:27 2023 +0000 Revert "usb: dwc3: Soft reset phy on probe for host" This reverts commit 8bea147dfdf823eaa8d3baeccc7aeb041b41944b. The phy soft reset GUSB2PHYCFG.PHYSOFTRST only applies to UTMI phy, not ULPI. This fix is incomplete. Cc: Fixes: 8bea147dfdf8 ("usb: dwc3: Soft reset phy on probe for host") Reported-by: Köry Maincent Closes: https://lore.kernel.org/linux-usb/20231205151959.5236c231@kmaincent-XPS-13-7390 Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/29a26593a60eba727de872a3e580a674807b3339.1703282469.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit ca2dc35e555e7043de585f4e46123d8fbd2b5a21 Author: William Wu Date: Tue Dec 26 15:19:59 2023 +0800 usb: dwc2: Disable clock gating feature on Rockchip SoCs The DWC2 IP on the Rockchip SoCs doesn't support clock gating. When a clock gating is enabled, system hangs. Signed-off-by: William Wu Acked-by: Minas Harutyunyan Link: https://lore.kernel.org/r/1703575199-23638-1-git-send-email-william.wu@rock-chips.com Signed-off-by: Greg Kroah-Hartman commit 9c6b789e954fae73c548f39332bcc56bdf0d4373 Author: Heikki Krogerus Date: Tue Jan 2 11:11:41 2024 +0200 Revert "usb: typec: class: fix typec_altmode_put_partner to put plugs" This reverts commit b17b7fe6dd5c6ff74b38b0758ca799cdbb79e26e. That commit messed up the reference counting, so it needs to be rethought. Fixes: b17b7fe6dd5c ("usb: typec: class: fix typec_altmode_put_partner to put plugs") Cc: Cc: RD Babiera Reported-by: Chris Bainbridge Closes: https://lore.kernel.org/lkml/CAP-bSRb3SXpgo_BEdqZB-p1K5625fMegRZ17ZkPE1J8ZYgEHDg@mail.gmail.com/ Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20240102091142.2136472-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8179cc4764cd1be8d5821e878ad062bc8f702e92 Merge: 42a7889a1931a 81ab772819da4 Author: David S. Miller Date: Tue Jan 2 13:33:58 2024 +0000 Merge branch 'mptcp-mib-counters' Matthieu Baerts says: ==================== mptcp: add CurrEstab MIB counter This MIB counter is similar to the one of TCP -- CurrEstab -- available in /proc/net/snmp. This is useful to quickly list the number of MPTCP connections without having to iterate over all of them. Patch 1 prepares its support by adding new helper functions: - MPTCP_DEC_STATS(): similar to MPTCP_INC_STATS(), but this time to decrement a counter. - mptcp_set_state(): similar to tcp_set_state(), to change the state of an MPTCP socket, and to inc/decrement the new counter when needed. Patch 2 uses mptcp_set_state() instead of directly calling inet_sk_state_store() to change the state of MPTCP sockets. Patch 3 and 4 validate the new feature in MPTCP "join" and "diag" selftests. ==================== Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 81ab772819da408977ac79c0a17d8be57283379f Author: Geliang Tang Date: Fri Dec 22 13:47:25 2023 +0100 selftests: mptcp: diag: check CURRESTAB counters This patch adds a new helper chk_msk_cestab() to check the current established connections counter MIB_CURRESTAB in diag.sh. Invoke it to check the counter during the connection after every chk_msk_inuse(). Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 0bd962dd86b2e5d097fc42c7411818851eca2995 Author: Geliang Tang Date: Fri Dec 22 13:47:24 2023 +0100 selftests: mptcp: join: check CURRESTAB counters This patch adds a new helper chk_cestab_nr() to check the current established connections counter MIB_CURRESTAB. Set the newly added variables cestab_ns1 and cestab_ns2 to indicate how many connections are expected in ns1 or ns2. Invoke check_cestab() to check the counter during the connection in do_transfer() and invoke chk_cestab_nr() to re-check it when the connection closed. These checks are embedded in add_tests(). Signed-off-by: Geliang Tang Acked-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit c693a8516429908da3ea111b0caa3c042ab1e6e9 Author: Geliang Tang Date: Fri Dec 22 13:47:23 2023 +0100 mptcp: use mptcp_set_state This patch replaces all the 'inet_sk_state_store()' calls under net/mptcp with the new helper mptcp_set_state(). Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/460 Signed-off-by: Geliang Tang Acked-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit d9cd27b8cd191133e287e5de107f971136abe8a2 Author: Geliang Tang Date: Fri Dec 22 13:47:22 2023 +0100 mptcp: add CurrEstab MIB counter support Add a new MIB counter named MPTCP_MIB_CURRESTAB to count current established MPTCP connections, similar to TCP_MIB_CURRESTAB. This is useful to quickly list the number of MPTCP connections without having to iterate over all of them. This patch adds a new helper function mptcp_set_state(): if the state switches from or to ESTABLISHED state, this newly added counter is incremented. This helper is going to be used in the following patch. Similar to MPTCP_INC_STATS(), a new helper called MPTCP_DEC_STATS() is also needed to decrement a MIB counter. Signed-off-by: Geliang Tang Acked-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 42a7889a1931a07a04a64c8cd72f41a4ba78a1d9 Merge: a27359abc820c 80057b2080a8f Author: David S. Miller Date: Tue Jan 2 13:27:48 2024 +0000 Merge branch 'selftests-tcp-ao' Dmitry Safonov says: ==================== selftest/net: Some more TCP-AO selftest post-merge fixups Note that there's another post-merge fix for TCP-AO selftests, but that doesn't conflict with these, so I don't resend that: https://lore.kernel.org/all/20231219-b4-tcp-ao-selftests-out-of-tree-v1-1-0fff92d26eac@arista.com/T/#u ==================== Tested-by: Hangbin Liu Reviewed-by: Hangbin Liu Signed-off-by: Dmitry Safonov commit 80057b2080a8f80b93c6f7b474909ccda8a21b09 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 22 01:59:07 2023 +0000 selftest/tcp-ao: Work on namespace-ified sysctl_optmem_max Since commit f5769faeec36 ("net: Namespace-ify sysctl_optmem_max") optmem_max is per-netns, so need of switching to root namespace. It seems trivial to keep the old logic working, so going to keep it for a while (at least, until kernel with netns-optmem_max will be release). Currently, there is a test that checks that optmem_max limit applies to TCP-AO keys and a little benchmark that measures linked-list TCP-AO keys scaling, those are fixed by this. Cc: Eric Dumazet Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit 72cd9f8d5a9925fb8ccedaf9b42ccf5fc955a716 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 22 01:59:06 2023 +0000 selftest/tcp-ao: Set routes in a proper VRF table id In unsigned-md5 selftests ip_route_add() is not needed in client_add_ip(): the route was pre-setup in __test_init() => link_init() for subnet, rather than a specific ip-address. Currently, __ip_route_add() mistakenly always sets VRF table to RT_TABLE_MAIN - this seems to have sneaked in during unsigned-md5 tests debugging. That also explains, why ip_route_add_vrf() ignored EEXIST, returned by fib6. Yet, keep EEXIST ignoring in bench-lookups selftests as it's expected that those selftests may add the same (duplicate) routes. Reported-by: Hangbin Liu Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit 21bea26c848e056e58e01448db41fabd47168c73 Merge: 1760bfa7d7ca4 04b99eac389ad Author: Greg Kroah-Hartman Date: Tue Jan 2 14:25:05 2024 +0100 Merge tag 'thunderbolt-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into char-misc-next Mika writes: thunderbolt: Changes for v6.8 merge window This includes following USB4/Thunderbolt changes for the v6.8 merge window: - Intel Lunar Lake support - PCIe tunneling improvements - DisplayPort tunneling improvements - Asymmetric switching improvements - Couple of minor fixes and cleanups. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Reduce retry timeout to speed up boot for some devices thunderbolt: Keep link as asymmetric if preferred by hardware thunderbolt: Add support for Intel Lunar Lake thunderbolt: Disable PCIe extended encapsulation upon teardown properly thunderbolt: Make PCIe tunnel setup and teardown follow CM guide thunderbolt: Improve logging when DisplayPort resource is added due to hotplug thunderbolt: Use tb_dp_read_cap() to read DP_COMMON_CAP as well thunderbolt: Disable CL states only when actually needed thunderbolt: Transition link to asymmetric only when both sides support it thunderbolt: Log XDomain link speed and width thunderbolt: Move width_name() helper to tb.h thunderbolt: Handle lane bonding of Gen 4 XDomain links properly thunderbolt: Unwind TMU configuration if tb_switch_set_tmu_mode_params() fails thunderbolt: Remove duplicated re-assignment of pointer 'out' commit f34fd6ee1be84c6e64574e9eb58f89d32c7f98a4 Author: Emil Renner Berthing Date: Fri Dec 29 14:07:51 2023 +0100 gpio: dwapb: Use generic request, free and set_config This way GPIO will be denied on pins already claimed by other devices and basic pin configuration (pull-up, pull-down etc.) can be done through the userspace GPIO API. Signed-off-by: Emil Renner Berthing Reviewed-by: Linus Walleij Acked-by: Serge Semin Signed-off-by: Bartosz Golaszewski commit a27359abc820c619c67e91241e75d045decbfdc2 Merge: 8146c3f9e6954 968509128207f Author: David S. Miller Date: Tue Jan 2 12:46:10 2024 +0000 Merge tag 'wireless-next-2023-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.8 The third "new features" pull request for v6.8. This is a smaller one to clear up our tree before the break and nothing really noteworthy this time. Major changes: stack * cfg80211: introduce cfg80211_ssid_eq() for SSID matching * cfg80211: support P2P operation on DFS channels * mac80211: allow 64-bit radiotap timestamps iwlwifi * AX210: allow concurrent P2P operation on DFS channels ==================== Signed-off-by: David S. Miller commit d654362d53a83ef3b921f3d06812e12290646a90 Merge: a3cd6db4cc2ed 5314b1543787e Author: Rafael J. Wysocki Date: Tue Jan 2 13:45:36 2024 +0100 Merge tag 'thermal-v6.8-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux into thermal Merge thermal control material for 6.8-rc1 from Daniel Lezcano: "- Converted Mediatek Thermal to the json-schema (Rafał Miłecki) - Fixed DT bindings issue on Loongson (Binbin Zhou) - Fixed returning NULL instead of -ENODEV on Loogsoo (Binbin Zhou) - Added the DT binding for the tsens on SM8650 platform (Neil Armstrong) - Added a reboot on critical option feature (Fabio Estevam) - Made usage of DEFINE_SIMPLE_DEV_PM_OPS on AmLogic (Uwe Kleine-König) - Added the D1/T113s THS controller support on Sun8i (Maxim Kiselev) - Fixed example in the DT binding for QCom SPMI (Johan Hovold) - Fixed compilation warning for the tmon utility (Florian Eckert) - Added interrupt based configuration on Exynos along with a set of related cleanups (Mateusz Majewski)" * tag 'thermal-v6.8-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (24 commits) thermal/drivers/exynos: Use set_trips ops thermal/drivers/exynos: Use BIT wherever possible thermal/drivers/exynos: Split initialization of TMU and the thermal zone thermal/drivers/exynos: Stop using the threshold mechanism on Exynos 4210 thermal/drivers/exynos: Simplify regulator (de)initialization thermal/drivers/exynos: Handle devm_regulator_get_optional return value correctly thermal/drivers/exynos: Wwitch from workqueue-driven interrupt handling to threaded interrupts thermal/drivers/exynos: Drop id field thermal/drivers/exynos: Remove an unnecessary field description tools/thermal/tmon: Fix compilation warning for wrong format dt-bindings: thermal: qcom-spmi-adc-tm5/hc: Clean up examples dt-bindings: thermal: qcom-spmi-adc-tm5/hc: Fix example node names thermal/drivers/sun8i: Add D1/T113s THS controller support dt-bindings: thermal: sun8i: Add binding for D1/T113s THS controller thermal: amlogic: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions thermal: amlogic: Make amlogic_thermal_disable() return void thermal/thermal_of: Allow rebooting after critical temp reboot: Introduce thermal_zone_device_critical_reboot() thermal/core: Prepare for introduction of thermal reboot dt-bindings: thermal-zones: Document critical-action ... commit 8146c3f9e69543c9b5a0d72b4fe3509655363ed9 Merge: 993498e537af9 6d6d80e4f6bcb Author: David S. Miller Date: Tue Jan 2 12:41:16 2024 +0000 Merge branch 'net-tc-ipt-retire' Jamal Hadi Salim says: ==================== net/sched: retire tc ipt action In keeping up with my status as a hero who removes code: another one bites the dust. The tc ipt action was intended to run all netfilter/iptables target. Unfortunately it has not benefitted over the years from proper updates when netfilter changes, and for that reason it has remained rudimentary. Pinging a bunch of people that i was aware were using this indicates that removing it wont affect them. Retire it to reduce maintenance efforts. So Long, ipt, and Thanks for all the Fish. ==================== Acked-by: David Ahern Signed-off-by: David S. Miller commit 6d6d80e4f6bcb6d975475377c34818f7f7d48eaa Author: Jamal Hadi Salim Date: Thu Dec 21 16:31:04 2023 -0500 net/sched: Remove CONFIG_NET_ACT_IPT from default configs Now that we are retiring the IPT action. Reviewed-by: Victor Noguiera Reviewed-by: Pedro Tammela Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit ba24ea129126362e7139fed4e13701ca5b71ac0b Author: Jamal Hadi Salim Date: Thu Dec 21 16:31:03 2023 -0500 net/sched: Retire ipt action The tc ipt action was intended to run all netfilter/iptables target. Unfortunately it has not benefitted over the years from proper updates when netfilter changes, and for that reason it has remained rudimentary. Pinging a bunch of people that i was aware were using this indicates that removing it wont affect them. Retire it to reduce maintenance efforts. Buh-bye. Reviewed-by: Victor Noguiera Reviewed-by: Pedro Tammela Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit 236f7d8034ff401d02fa6d74bae494a2b54e1834 Author: Shyam Sundar S K Date: Thu Dec 28 15:51:04 2023 +0530 platform/x86/amd/pmc: Modify SMU message port for latest AMD platform The latest platforms use a different SMU message port(0x938) from the one currently being used (0x538). Make code changes to adapt to this new information. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231228102104.1785383-7-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit d33e992ec87a7a7b1839fac38573d2c0721569f9 Author: Shyam Sundar S K Date: Thu Dec 28 15:51:03 2023 +0530 platform/x86/amd/pmc: Add 1Ah family series to STB support list AMD newer platforms, (AMDI000A or family 1Ah series) also supports the STB functionality. Add this to amd_pmc_is_stb_supported(). Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231228102104.1785383-6-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 9ae57d88609d2077a8340d316fc9849a601844f9 Author: Shyam Sundar S K Date: Thu Dec 28 15:51:02 2023 +0530 platform/x86/amd/pmc: Add idlemask support for 1Ah family Idlemask is an indication of each IP block current state (i.e. whether it is running or idle) during s2idle transistion. The newer 1Ah family supports this feature, add it to the support list. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231228102104.1785383-5-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 13313c135266ed62d33f43281fb22289865064fd Author: Shyam Sundar S K Date: Thu Dec 28 15:51:01 2023 +0530 platform/x86/amd/pmc: call amd_pmc_get_ip_info() during driver probe In the current code, amd_pmc_get_ip_info() is being called from amd_pmc_s2d_init() and that code block gets enabled only when the STB is being enabled. But the information from amd_pmc_get_ip_info() will be required outside of STB usecase. Hence move this call into driver probe sequence. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231228102104.1785383-4-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit d8fb50fe6c5c3632079a1642afdd87d30e0d1bbe Author: Shyam Sundar S K Date: Thu Dec 28 15:51:00 2023 +0530 platform/x86/amd/pmc: Add VPE information for AMDI000A platform Latest AMD SoCs has VPE (Video Processing Engine) IP block and the statistics related to this IP can be obtained as a part of metrics table information that the PMFW propogates. Add this support for 1Ah family series. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231228102104.1785383-3-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 9efa2a04ce7c827bf265c8963b38553306a8225e Author: Shyam Sundar S K Date: Thu Dec 28 15:50:59 2023 +0530 platform/x86/amd/pmc: Send OS_HINT command for AMDI000A platform To initiate the HW deep state transistion the OS_HINT command has to be sent the PMFW. Add this support to the platforms that has AMDI000A support. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231228102104.1785383-2-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 993498e537af9260e697219ce41b41b22b6199cc Author: Eric Dumazet Date: Thu Dec 21 14:07:47 2023 +0000 net-device: move gso_partial_features to net_device_read_tx dev->gso_partial_features is read from tx fast path for GSO packets. Move it to appropriate section to avoid a cache line miss. Fixes: 43a71cd66b9c ("net-device: reorganize net_device fast path variables") Signed-off-by: Eric Dumazet Cc: Coco Li Cc: David Ahern Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 07938d774f189c47b3117c332b0e3d1d1bb50813 Author: Andy Shevchenko Date: Thu Dec 21 16:06:07 2023 +0200 ptp: ocp: Use DEFINE_RES_*() in place There is no need to have an intermediate functions as DEFINE_RES_*() macros are represented by compound literals. Just use them in place. Signed-off-by: Andy Shevchenko Reviewed-by: Vadim Fedorenko Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4527898e300ce65e9ac5d5a05e086a07e212753c Author: Markus Elfring Date: Thu Dec 28 10:48:16 2023 +0100 platform/x86/amd/pmf: Return a status code only as a constant in two functions Return a status code without storing it in an intermediate variable. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/0d0c4876-37d7-4bee-912e-56324495454f@web.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 9dd3f1ef40d01fdfe69c3ada28b1f201a7207f6e Author: Markus Elfring Date: Thu Dec 28 09:30:54 2023 +0100 platform/x86/amd/pmf: Return directly after a failed apmf_if_call() in apmf_sbios_heartbeat_notify() The kfree() function was called in one case by the apmf_sbios_heartbeat_notify() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. * Thus return directly after a call of the function “apmf_if_call” failed at the beginning. * Delete the label “out” which became unnecessary with this refactoring. Signed-off-by: Markus Elfring Link: https://lore.kernel.org/r/362ee824-fc53-4e19-9529-8b621657635b@web.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 87d8f1ee1d4070571095859d310f6951440f288c Author: Randy Dunlap Date: Sat Dec 23 11:43:19 2023 -0800 platform/x86: wmi: linux/wmi.h: fix Excess kernel-doc description warning Remove the "private:" comment to prevent the kernel-doc warning: include/linux/wmi.h:27: warning: Excess struct member 'setable' description in 'wmi_device' Either a struct member is documented (via kernel-doc) or it's private, but not both. Fixes: b4cc979588ee ("platform/x86: wmi: Add kernel doc comments") Signed-off-by: Randy Dunlap Cc: Armin Wolf Cc: Hans de Goede Cc: Ilpo Järvinen Cc: platform-driver-x86@vger.kernel.org Reviewed-by: Armin Wolf Link: https://lore.kernel.org/r/20231223194321.23084-1-rdunlap@infradead.org Signed-off-by: Hans de Goede commit 669f157fd7ad987dd5beba46576ec357f4d6c686 Author: David E. Box Date: Fri Dec 22 19:25:48 2023 -0800 platform/x86/intel/pmc: Add missing extern Add missing extern for tgl_h_reg_map. Fixes sparse warning: drivers/platform/x86/intel/pmc/tgl.c:213:26: warning: symbol 'tgl_h_reg_map' was not declared. Should it be static? Fixes: 544f7b7f651c ("platform/x86/intel/pmc: Add regmap for Tiger Lake H PCH") Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20231223032548.1680738-9-david.e.box@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6f9fac5535ba2038063c656f0afb496d7f87bcc1 Author: David E. Box Date: Fri Dec 22 19:25:47 2023 -0800 platform/x86/intel/pmc/lnl: Add GBE LTR ignore during suspend Add the GBE LTR ignore suspend time fix for Lunar Lake. Fixes: 119652b855e6 ("platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver") Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20231223032548.1680738-8-david.e.box@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 10ed9ee0af5a6cab8b36b301865417a288179b06 Author: David E. Box Date: Fri Dec 22 19:25:46 2023 -0800 platform/x86/intel/pmc/arl: Add GBE LTR ignore during suspend Add the GBE LTR ignore suspend time fix for Arrow Lake. Fixes: f34dcf397286 ("platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver") Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20231223032548.1680738-7-david.e.box@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 2ad815797ef01136091e502944e05b6794b9e5b8 Merge: 27f2b08735c90 70681aa0746ae Author: Hans de Goede Date: Tue Jan 2 13:13:01 2024 +0100 Merge tag 'platform-drivers-x86-v6.7-6' into pdx86/for-next Merge the 'platform-drivers-x86-v6.7-6' fixes into pdx86/for-next so that the "Intel PMC GBE LTR regression" fixes can also be applied to the new Arrow Lake and Lunar Lake platform support code in pdx86/for-next . commit eee706839333ec0643f1b4898a37588025bf4cb5 Author: Randy Dunlap Date: Sat Dec 30 21:49:10 2023 -0800 drm/imagination: pvr_device.h: fix all kernel-doc warnings Correct all kernel-doc notation on pvr_device.h so that there are no kernel-doc warnings remaining. pvr_device.h:292: warning: Excess struct member 'active' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'idle' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'work' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'old_kccb_cmds_executed' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'kccb_stall_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'ccb' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_q' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_obj' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'slot_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'reserved_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'waiters' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'fence_ctx' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'id' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'seqno' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'active' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'idle' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'work' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'old_kccb_cmds_executed' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'kccb_stall_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'ccb' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_q' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn_obj' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'rtn' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'slot_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'reserved_count' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'waiters' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'fence_ctx' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'id' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'seqno' description in 'pvr_device' pvr_device.h:292: warning: Excess struct member 'lock' description in 'pvr_device' Signed-off-by: Randy Dunlap Cc: Frank Binns Cc: Donald Robson Cc: Matt Coster Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Jonathan Corbet Cc: Vegard Nossum Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231231054910.31805-1-rdunlap@infradead.org commit 200a6b3af05918ddb18832fa4d5a8f15c9dd99e0 Author: Randy Dunlap Date: Sat Dec 30 21:48:56 2023 -0800 drm/gpuvm: fix all kernel-doc warnings in include/drm/drm_gpuvm.h Update kernel-doc comments in to correct all kernel-doc warnings: drm_gpuvm.h:148: warning: Excess struct member 'addr' description in 'drm_gpuva' drm_gpuvm.h:148: warning: Excess struct member 'offset' description in 'drm_gpuva' drm_gpuvm.h:148: warning: Excess struct member 'obj' description in 'drm_gpuva' drm_gpuvm.h:148: warning: Excess struct member 'entry' description in 'drm_gpuva' drm_gpuvm.h:148: warning: Excess struct member '__subtree_last' description in 'drm_gpuva' drm_gpuvm.h:192: warning: No description found for return value of 'drm_gpuva_invalidated' drm_gpuvm.h:331: warning: Excess struct member 'tree' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'local_list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'lock' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'local_list' description in 'drm_gpuvm' drm_gpuvm.h:331: warning: Excess struct member 'lock' description in 'drm_gpuvm' drm_gpuvm.h:352: warning: No description found for return value of 'drm_gpuvm_get' drm_gpuvm.h:545: warning: Excess struct member 'fn' description in 'drm_gpuvm_exec' drm_gpuvm.h:545: warning: Excess struct member 'priv' description in 'drm_gpuvm_exec' drm_gpuvm.h:597: warning: missing initial short description on line: * drm_gpuvm_exec_resv_add_fence() drm_gpuvm.h:616: warning: missing initial short description on line: * drm_gpuvm_exec_validate() drm_gpuvm.h:623: warning: No description found for return value of 'drm_gpuvm_exec_validate' drm_gpuvm.h:698: warning: Excess struct member 'gpuva' description in 'drm_gpuvm_bo' drm_gpuvm.h:698: warning: Excess struct member 'entry' description in 'drm_gpuvm_bo' drm_gpuvm.h:698: warning: Excess struct member 'gem' description in 'drm_gpuvm_bo' drm_gpuvm.h:698: warning: Excess struct member 'evict' description in 'drm_gpuvm_bo' drm_gpuvm.h:726: warning: No description found for return value of 'drm_gpuvm_bo_get' drm_gpuvm.h:738: warning: missing initial short description on line: * drm_gpuvm_bo_gem_evict() drm_gpuvm.h:740: warning: missing initial short description on line: * drm_gpuvm_bo_gem_evict() drm_gpuvm.h:698: warning: Excess struct member 'evict' description in 'drm_gpuvm_bo' drm_gpuvm.h:844: warning: Excess struct member 'addr' description in 'drm_gpuva_op_map' drm_gpuvm.h:844: warning: Excess struct member 'range' description in 'drm_gpuva_op_map' drm_gpuvm.h:844: warning: Excess struct member 'offset' description in 'drm_gpuva_op_map' drm_gpuvm.h:844: warning: Excess struct member 'obj' description in 'drm_gpuva_op_map' Signed-off-by: Randy Dunlap Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: Jonathan Corbet Cc: Vegard Nossum Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231231054856.31786-1-rdunlap@infradead.org commit 03ddb7de012c68d727509c4f6e0c0fa1ebc81668 Author: Zhengqiao Xia Date: Wed Dec 27 16:50:13 2023 +0800 HID: i2c-hid: elan: Add ili2901 timing ILI2901 requires reset to pull down time greater than 10ms, so the configuration post_power_delay_ms is 10, and the chipset initial time is required to be greater than 100ms, so the post_gpio_reset_on_delay_ms is set to 100. Reviewed-by: Linus Walleij Signed-off-by: Zhengqiao Xia Signed-off-by: Jiri Kosina commit d74ac6f60a7ef677c3b7702f103b670142f84d66 Author: Zhengqiao Xia Date: Wed Dec 27 16:50:12 2023 +0800 dt-bindings: HID: i2c-hid: elan: Introduce Ilitek ili2901 The Ilitek ili2901 touch screen chip same as Elan eKTH6915 controller has a reset gpio. The difference is that they have different post_power_delay_ms and post_gpio_reset_on_delay_ms. Ilitek ili2901 also uses 3.3V power supply. Signed-off-by: Zhengqiao Xia Acked-by: Krzysztof Kozlowski Signed-off-by: Jiri Kosina commit 9b0a3839e8d29663cd9ee2c43d38b06c3b91619e Author: Greg Kroah-Hartman Date: Wed Dec 20 08:38:48 2023 +0100 HID: bpf: make bus_type const in struct hid_bpf_ops The struct bus_type pointer in hid_bpf_ops just passes the pointer to the driver core, and the driver core can handle, and expects, a constant pointer, so also make the pointer constant in hid_bpf_ops. Part of the process of moving all usages of struct bus_type to be constant to move them all to read-only memory. Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jiri Kosina commit c4a9743699f3b093bad4bcc472c4ee34c7929f33 Author: Greg Kroah-Hartman Date: Wed Dec 20 08:38:47 2023 +0100 HID: make ishtp_cl_bus_type const Now that the driver core can properly handle constant struct bus_type, move the ishtp_cl_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 37d158d0b05144f696323ae5bbfe1e137f7c06d3 Author: Greg Kroah-Hartman Date: Wed Dec 20 08:38:46 2023 +0100 HID: make hid_bus_type const Now that the driver core can properly handle constant struct bus_type, move the hid_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jiri Kosina commit cd438e57dd05b077f4e87c1567beafb2377b6d6b Author: Vicki Pfau Date: Tue Dec 19 19:38:37 2023 -0800 HID: hid-steam: Add gamepad-only mode switched to by holding options This commit adds a hotkey to switch between "gamepad" mode (mouse and keyboard disabled) and "desktop" mode (gamepad disabled) by holding down the options button (mapped here as the start button). This mirrors the behavior of the official Steam client. This also adds and uses a function for generating haptic pulses, as Steam also does when engaging this hotkey. Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina commit 43565b6788d46820da7d8f5ab1a595398419e914 Author: Vicki Pfau Date: Tue Dec 19 19:38:36 2023 -0800 HID: hid-steam: Better handling of serial number length The second byte of the GET_STRING_ATTRIB report is a length, so we should set the size of the buffer to be the size we're actually requesting, and only reject the reply if the length out is nonsensical. Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina commit 4f9a5a9769cc77075e606537e15747e8b8e9c7c9 Author: Vicki Pfau Date: Tue Dec 19 19:38:35 2023 -0800 HID: hid-steam: Update list of identifiers from SDL SDL includes a list of settings (formerly called registers in this driver), reports (formerly cmds), and various other identifiers that were provided by Valve. This commit imports a significant chunk of that list as well as replacing most of the guessed names and a handful of magic constants. It also replaces bitmask definitions that used hex with the BIT macro. Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina commit 555b818adb97eca70210a49ba3f1d27882dde092 Author: Vicki Pfau Date: Tue Dec 19 19:38:34 2023 -0800 HID: hid-steam: Make client_opened a counter The client_opened variable was used to track if the hidraw was opened by any clients to silence keyboard/mouse events while opened. However, there was no counting of how many clients were opened, so opening two at the same time and then closing one would fool the driver into thinking it had no remaining opened clients. Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina commit 691ead124a0c35e56633dbb73e43711ff3db23ef Author: Vicki Pfau Date: Tue Dec 19 19:38:33 2023 -0800 HID: hid-steam: Clean up locking This cleans up the locking logic so that the spinlock is consistently used for access to a small handful of struct variables, and the mutex is exclusively and consistently used for ensuring that mutliple threads aren't trying to send/receive reports at the same time. Previously, only some report transactions were guarded by this mutex, potentially breaking atomicity. The mutex has been renamed to reflect this usage. Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina commit 917972636e8271c5691710ce5dcd66c2d3bd04f2 Author: Vicki Pfau Date: Tue Dec 19 19:38:32 2023 -0800 HID: hid-steam: Disable watchdog instead of using a heartbeat The Steam Deck has a setting that controls whether or not the watchdog is enabled, so instead of using a heartbeat to keep the watchdog from triggering, this commit changes the behavior to simply disable the watchdog instead. Signed-off-by: Jiri Kosina commit 34281b4d916f167a6f77975380e1df07f06248b7 Author: Vicki Pfau Date: Tue Dec 19 19:38:31 2023 -0800 HID: hid-steam: Avoid overwriting smoothing parameter The original implementation of this driver incorrectly guessed the function of this register. It's not only unnecessary to write to this register for lizard mode but actually counter-productive since it overwrites whatever previous value was intentionally set, for example by Steam. Signed-off-by: Vicki Pfau Signed-off-by: Jiri Kosina commit b2363297508a83b9f92ac8dadfbd1fbec2ee22a9 Merge: 228307ad3f9e9 bb0b255fb6f14 Author: Arnd Bergmann Date: Tue Jan 2 11:01:03 2024 +0100 Merge tag 'v6.8-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt RK3036 fix for emmc init issue and stdout-path for the console on rk3036 kylin. * tag 'v6.8-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Remove rockchip,default-sample-phase from rk3036.dtsi ARM: dts: rockchip: Add stdout-path for rk3036 kylin Link: https://lore.kernel.org/r/15502825.JCcGWNJJiE@diego Signed-off-by: Arnd Bergmann commit c810729fe6471aa18e2b05bde4b7fb9d872b4ca0 Author: Ahelenia Ziemiańska Date: Thu Dec 21 15:15:42 2023 +0100 kernfs: fix reference to renamed function commit c637b8acbe079edb477d887041755b489036f146 ("kernfs: s/sysfs/kernfs/ in internal functions and whatever is left") renamed kernfs_file_open to kernfs_fop_open, but didn't update the comment referencing it. Signed-off-by: Ahelenia Ziemiańska Acked-by: Tejun Heo Link: https://lore.kernel.org/r/4f2wybrepigxjpuxj4bdkh3qmksetfioedit2bdrswf6b75ebb@tarta.nabijaczleweli.xyz Signed-off-by: Greg Kroah-Hartman commit 228307ad3f9e937fcdc4ea4c24b52acf40bbfc32 Merge: f3a4d7c3ffc39 8586a5d217ef7 Author: Arnd Bergmann Date: Tue Jan 2 10:53:55 2024 +0100 Merge tag 'v6.8-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt One new boards, the CoolPi CM5 SoM and 4B SBC. Basic node for the rk3588 display controller and a bunch of small improvements for different boards, * tag 'v6.8-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (21 commits) arm64: dts: rockchip: Fix led pinctrl of lubancat 1 arm64: dts: rockchip: correct gpio_pwrctrl1 typo on nanopc-t6 arm64: dts: rockchip: correct gpio_pwrctrl1 typo on rock-5b arm64: dts: rockchip: support poweroff on the rock-5b arm64: dts: rockchip: Support poweroff on Orange Pi 5 arm64: dts: rockchip: nanopc-t6 sdmmc beautification arm64: dts: rockchip: Fix rk3588 USB power-domain clocks arm64: dts: rockchip: configure eth pad driver strength for orangepi r1 plus lts arm64: dts: rockchip: Support poweroff on NanoPC-T6 arm64: dts: rockchip: rk3308-rock-pi-s gpio-line-names cleanup arm64: dts: rockchip: Add support for rk3588 based board Cool Pi CM5 EVB dt-bindings: arm: rockchip: Add Cool Pi CM5 arm64: dts: rockchip: Add support for rk3588s based board Cool Pi 4B dt-bindings: arm: rockchip: Add Cool Pi 4B dt-bindings: vendor-prefixes: Add Cool Pi arm64: dts: rockchip: add gpio-line-names to rk3328-rock-pi-e arm64: dts: rockchip: make use gpio-keys for buttons on puma-haikou arm64: dts: rockchip: expose BIOS Disable feedback pin on rk3399-puma arm64: dts: rockchip: fix misleading comment in rk3399-puma-haikou.dts arm64: dts: rockchip: Add vop on rk3588 ... Link: https://lore.kernel.org/r/3711719.VqM8IeB0Os@diego Signed-off-by: Arnd Bergmann commit f3a4d7c3ffc3970e0f658711a2bb604d08999c0f Merge: 2f5ed2cacc112 78403b37f6770 Author: Arnd Bergmann Date: Tue Jan 2 10:52:24 2024 +0100 Merge tag 'qcom-arm64-for-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt A few more Qualcomm Arm64 DeviceTree updates for v6.8 This corrects the rate of the UTMI clock on IPQ6018 USB0. The SDHCI controller on SC7280 gains missing markings for being cache-coherent. For SC8180X a typo in assignment of PCIe refgen clocks is corrected, PCI controllers are marked cache-coherent, and the USB SS PHY interrupts are corrected to allow wakeup. Similarly USB HS PHY and SS PHY interrupts are corrected to allow wakeup on SDM670. On SM8550 the X3 cluster idle state is properly described, and the latency numbers are adjusted for all the idle states. The PM8550 regulator supplies on X1E are corrected to match the driver and binding, and the timer node is updated to avoid an unnecessary validation error. * tag 'qcom-arm64-for-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: sc8180x: Fix up PCIe nodes arm64: dts: qcom: sc8180x: Mark PCIe hosts cache-coherent arm64: dts: qcom: x1e80100-qcp: Fix supplies for some LDOs in PM8550 arm64: dts: qcom: sm8550: Update idle state time requirements arm64: dts: qcom: sm8550: Separate out X3 idle state arm64: dts: qcom: ipq6018: fix clock rates for GCC_USB0_MOCK_UTMI_CLK arm64: dts: qcom: x1e80100: align mem timer size cells with bindings arm64: dts: qcom: sc7280: Mark SDHCI hosts as cache-coherent arm64: dts: qcom: sc8180x: fix USB SS wakeup arm64: dts: qcom: sdm670: fix USB SS wakeup arm64: dts: qcom: sdm670: fix USB DP/DM HS PHY interrupts Link: https://lore.kernel.org/r/20231231034108.3262678-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 2f5ed2cacc1125e5b48677b92a445761c2ca8e4e Merge: 1e672c2585ee3 cc6fc55c7ae04 Author: Arnd Bergmann Date: Tue Jan 2 10:51:38 2024 +0100 Merge tag 'qcom-arm32-for-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt A few more Qualcomm Arm32 DeviceTree updates fr v6.8 The recently introduced changes to the SDX55 USB controller interrupt flags prevents the USB controller from probing. These patches corrects the PDC's interrupt-cells, so that appropriate interrupt controller (which supports both-edge interrupts) can be used instead, which resolves the issue. The SDX55 PCIe PHY base address is also adjusted, from a mistake when the node recently was transitioned to the modernized DeviceTree binding. * tag 'qcom-arm32-for-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: sdx55: Fix the base address of PCIe PHY ARM: dts: qcom: sdx55: fix USB SS wakeup ARM: dts: qcom: sdx55: fix USB DP/DM HS PHY interrupts ARM: dts: qcom: sdx55: fix pdc '#interrupt-cells' Link: https://lore.kernel.org/r/20231231033153.3262575-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 1e672c2585ee3ef13695d5936cc59a0d73143fc0 Merge: f81647e76136d dadc77c93b6e8 Author: Arnd Bergmann Date: Tue Jan 2 10:47:50 2024 +0100 Merge tag 'arm-soc/for-6.8/devicetree' of https://github.com/Broadcom/stblinux into soc/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 6.8, please pull the following: - Rafal adds a Device Tree node for the BCM63138 high-speed UART used for Bluetooth devices * tag 'arm-soc/for-6.8/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: broadcom: Add BCM63138's high speed UART Link: https://lore.kernel.org/r/20231228085822.3656546-1-florian.fainelli@broadcom.com Signed-off-by: Arnd Bergmann commit f81647e76136d2a98b2623e02ef563b0e5f9519c Merge: 2d7123c7e1678 1cff7243334f8 Author: Arnd Bergmann Date: Tue Jan 2 10:42:01 2024 +0100 Merge tag 'sprd-dt-6.8-rc1' of https://github.com/lyrazhang/linux into soc/dt ARM: sprd: DTS and bindings for v6.8-rc1 Unisoc ARM64 DTS and bindings changes are: - Fixed a few dtb_check warnings - Add bindings for a new SoC - UMS9620 - Fixed an issue on UMS512 * tag 'sprd-dt-6.8-rc1' of https://github.com/lyrazhang/linux: arm64: dts: sprd: Change UMS512 idle-state nodename to match bindings arm64: dts: sprd: Add clock reference for pll2 on UMS512 arm64: dts: sprd: Removed unused clock references from etm nodes arm64: dts: sprd: Add support for Unisoc's UMS9620 dt-bindings: arm: Add compatible strings for Unisoc's UMS9620 arm64: dts: sprd: fix the cpu node for UMS512 Link: https://lore.kernel.org/r/20231228084958.1439115-1-chunyan.zhang@unisoc.com Signed-off-by: Arnd Bergmann commit 67a1723344cfe05430977483d6d3c7a999480143 Merge: a51749ab34d9e 610a9b8f49fbc Author: Ingo Molnar Date: Tue Jan 2 10:41:38 2024 +0100 Merge tag 'v6.7-rc8' into locking/core, to pick up dependent changes Pick up these commits from Linus's tree: b106bcf0f99a ("locking/osq_lock: Clarify osq_wait_next()") 563adbfc351b ("locking/osq_lock: Clarify osq_wait_next() calling convention") 7c2230982129 ("locking/osq_lock: Move the definition of optimistic_spin_node into osq_lock.c") Signed-off-by: Ingo Molnar commit ea15d0c571deaafe90281dbec74f8bd2e143b3db Merge: ccdc720fb73f0 191fcf77e3043 Author: Arnd Bergmann Date: Tue Jan 2 10:35:38 2024 +0100 Merge tag 'qcom-arm64-defconfig-for-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig A few more Qualcomm Arm64 defconfig updates for v6.8 This enables the base drivers necessary to boot devices on the X1E platform. The GPU clock controller for SM8450/SM8550 is enabled and the SC8280XP camera clock controller is enabled, to enable respective functionality on these platforms. * tag 'qcom-arm64-defconfig-for-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable Qualcomm SC8280XP camera clock controller arm64: defconfig: enable GPU clock controller for SM8[45]50 arm64: defconfig: Enable X1E80100 SoC base configs Link: https://lore.kernel.org/r/20231231034648.3262882-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit fcf410e050a9c046b2907e3ab9145eb974044e0e Author: Krzysztof Kozlowski Date: Mon Dec 18 14:45:32 2023 +0100 ARM: MAINTAINERS: drop empty entries for removed boards Drop empty and redundant maintainer entries for boards which were removed to fix `scripts/get_maintainer.pl --self-test=sections` errors like: ./MAINTAINERS:2021: warning: section without file pattern ARM/CIRRUS LOGIC EDB9315A MACHINE SUPPORT [arnd: only remove the obviously stale ones for now] Cc: Lennert Buytenhek Cc: Steve Sakoman Cc: Mark F. Brown Cc: Robert Jarzmik Cc: Florian Fainelli Cc: Simtec Linux Team Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231218134532.50599-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit ced296f636358c1593df0ef15523fa9aa93468ac Author: Linus Walleij Date: Sun Dec 24 23:24:38 2023 +0100 ARM: Delete ARM11MPCore perf leftovers My commit deleting the PB11MPCore apparently left a few dangling structs in the perf event code. Fix it up. Fixes: 2560cffd2134 ("ARM: Delete ARM11MPCore (ARM11 ARMv6K SMP) support") Signed-off-by: Linus Walleij Reviewed-by: Liviu Dudau Link: https://lore.kernel.org/r/20231224-drop-11mpcore-fix-v1-1-d8b16d1c1fae@linaro.org Signed-off-by: Arnd Bergmann commit 5314b1543787e6cd5d248186fcfd5c5fc4ca2146 Author: Mateusz Majewski Date: Fri Dec 1 10:56:25 2023 +0100 thermal/drivers/exynos: Use set_trips ops Currently, each trip point defined in the device tree corresponds to a single hardware interrupt. This commit instead switches to using two hardware interrupts, whose values are set dynamically using the set_trips callback. Additionally, the critical temperature threshold is handled specifically. Setting interrupts in this way also fixes a long-standing lockdep warning, which was caused by calling thermal_zone_get_trips with our lock being held. Do note that this requires TMU initialization to be split into two parts, as done by the parent commit: parts of the initialization call into the thermal_zone_device structure and so must be done after its registration, but the initialization is also responsible for setting up calibration, which must be done before thermal_zone_device registration, which will call set_trips for the first time; if the calibration is not done in time, the interrupt values will be silently wrong! Reviewed-by: Lukasz Luba Signed-off-by: Mateusz Majewski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201095625.301884-10-m.majewski2@samsung.com commit af00d488339aee7bf42b07057053ef919bedee6f Author: Mateusz Majewski Date: Fri Dec 1 10:56:24 2023 +0100 thermal/drivers/exynos: Use BIT wherever possible The original driver did not use that macro and it allows us to make our intentions slightly clearer. Reviewed-by: Lukasz Luba Signed-off-by: Mateusz Majewski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201095625.301884-9-m.majewski2@samsung.com commit b72ba67baec1d8ff67edc6e70c371ab6b2f7d31c Author: Mateusz Majewski Date: Fri Dec 1 10:56:23 2023 +0100 thermal/drivers/exynos: Split initialization of TMU and the thermal zone This will be needed in the future, as the thermal zone subsystem might call our callbacks right after devm_thermal_of_zone_register. Currently we just make get_temp return EAGAIN in such case, but this will not be possible with state-modifying callbacks, for instance set_trips. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mateusz Majewski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201095625.301884-8-m.majewski2@samsung.com commit d7a5b431911c5d9da7fbff852433e6f99a4c6616 Author: Mateusz Majewski Date: Fri Dec 1 10:56:22 2023 +0100 thermal/drivers/exynos: Stop using the threshold mechanism on Exynos 4210 Exynos 4210 supports setting a base threshold value, which is added to all trip points. This might be useful, but is not really necessary in our usecase, so we always set it to 0 to simplify the code a bit. Additionally, this change makes it so that we convert the value to the calibrated one in a slightly different place. This is more correct morally, though it does not make any change when single-point calibration is being used (which is the case currently). Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mateusz Majewski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201095625.301884-7-m.majewski2@samsung.com commit 5d6976d01414f23af4b81d7f91cfd59839c8b1fe Author: Mateusz Majewski Date: Fri Dec 1 10:56:21 2023 +0100 thermal/drivers/exynos: Simplify regulator (de)initialization We rewrite the initialization to enable the regulator as part of devm, which allows us to not handle the struct instance manually. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mateusz Majewski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201095625.301884-6-m.majewski2@samsung.com commit 52ef6f567e6b9a878a8e0e5d6367aa65a08227a5 Author: Mateusz Majewski Date: Fri Dec 1 10:56:20 2023 +0100 thermal/drivers/exynos: Handle devm_regulator_get_optional return value correctly Currently, if regulator is required in the SoC, but devm_regulator_get_optional fails for whatever reason, the execution will proceed without propagating the error. Meanwhile there is no reason to output the error in case of -ENODEV. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mateusz Majewski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201095625.301884-5-m.majewski2@samsung.com commit 20009a8137eefbeebb86402d04cae8955795385a Author: Mateusz Majewski Date: Fri Dec 1 10:56:19 2023 +0100 thermal/drivers/exynos: Wwitch from workqueue-driven interrupt handling to threaded interrupts The workqueue boilerplate is mostly one-to-one what the threaded interrupts do. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mateusz Majewski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201095625.301884-4-m.majewski2@samsung.com commit 0ac3e1cf37367aea1fef26569b793b5e57eb7a51 Author: Mateusz Majewski Date: Fri Dec 1 10:56:18 2023 +0100 thermal/drivers/exynos: Drop id field We do not use the value, and only Exynos 7 defines this alias anyway. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mateusz Majewski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201095625.301884-3-m.majewski2@samsung.com commit 0cefaf6c89c016e9eae9f8881ecaf50e836869a9 Author: Mateusz Majewski Date: Fri Dec 1 10:56:17 2023 +0100 thermal/drivers/exynos: Remove an unnecessary field description It seems that the field has been removed in one of the previous commits, but the description has been forgotten. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mateusz Majewski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201095625.301884-2-m.majewski2@samsung.com commit 9da39ef332c417ce52732564c1c682a6e1209302 Author: Florian Eckert Date: Mon Dec 4 15:13:35 2023 +0100 tools/thermal/tmon: Fix compilation warning for wrong format The following warnings are shown during compilation: tui.c: In function 'show_cooling_device': tui.c:216:40: warning: format '%d' expects argument of type 'int', but argument 7 has type 'long unsigned int' [-Wformat=] 216 | "%02d %12.12s%6d %6d", | ~~^ | | | int | %6ld ...... 219 | ptdata.cdi[j].cur_state, | ~~~~~~~~~~~~~~~~~~~~~~~ | | | long unsigned int tui.c:216:44: warning: format '%d' expects argument of type 'int', but argument 8 has type 'long unsigned int' [-Wformat=] 216 | "%02d %12.12s%6d %6d", | ~~^ | | | int | %6ld ...... 220 | ptdata.cdi[j].max_state); | ~~~~~~~~~~~~~~~~~~~~~~~ | | | long unsigned int To fix this, the correct string format must be used for printing. Signed-off-by: Florian Eckert Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231204141335.2798194-1-fe@dev.tdt.de commit 4bddb0cdfad9148a08b2bda7c3d479b1da715929 Author: Johan Hovold Date: Thu Nov 30 18:41:14 2023 +0100 dt-bindings: thermal: qcom-spmi-adc-tm5/hc: Clean up examples Clean up the examples by adding newline separators, moving 'reg' properties after 'compatible' and dropping unused labels. Signed-off-by: Johan Hovold Acked-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231130174114.13122-3-johan+linaro@kernel.org commit 7ec597ba25a3d942e13870cc27848e301c26c561 Author: Johan Hovold Date: Thu Nov 30 18:41:13 2023 +0100 dt-bindings: thermal: qcom-spmi-adc-tm5/hc: Fix example node names The ADC Thermal Monitor is part of an SPMI PMIC, which in turn sits on an SPMI bus. Fixes: db03874b8543 ("dt-bindings: thermal: qcom: add HC variant of adc-thermal monitor bindings") Fixes: e8ffd6c0756b ("dt-bindings: thermal: qcom: add adc-thermal monitor bindings") Signed-off-by: Johan Hovold Acked-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231130174114.13122-2-johan+linaro@kernel.org commit ebbf19e36d021f253425344b4d4b987f3b7d9be5 Author: Maxim Kiselev Date: Mon Dec 18 00:06:23 2023 +0300 thermal/drivers/sun8i: Add D1/T113s THS controller support This patch adds a thermal sensor controller support for the D1/T113s, which is similar to the one on H6, but with only one sensor and different scale and offset values. Signed-off-by: Maxim Kiselev Acked-by: Jernej Skrabec Reviewed-by: Andre Przywara Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231217210629.131486-3-bigunclemax@gmail.com commit 20bf6262d518c5d3bf38c805be1bbda36acb9506 Author: Maxim Kiselev Date: Mon Dec 18 00:06:22 2023 +0300 dt-bindings: thermal: sun8i: Add binding for D1/T113s THS controller Add a binding for D1/T113s thermal sensor controller. Signed-off-by: Maxim Kiselev Reviewed-by: Conor Dooley Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231217210629.131486-2-bigunclemax@gmail.com commit ac99b129630efa14efe176e968045cde9d442e55 Author: Uwe Kleine-König Date: Thu Nov 16 12:26:36 2023 +0100 thermal: amlogic: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding __maybe_unused can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231116112633.668826-3-u.kleine-koenig@pengutronix.de commit 720f8db834a31009d8d11893278ca3f8072a575e Author: Uwe Kleine-König Date: Thu Nov 16 12:26:35 2023 +0100 thermal: amlogic: Make amlogic_thermal_disable() return void amlogic_thermal_disable() returned zero unconditionally and amlogic_thermal_remove() already ignores the return value. Make it return no value and modify amlogic_thermal_suspend to not check the value. This patch introduces no semantic changes, but makes it more obvious for a human reader that amlogic_thermal_suspend() cannot fail. Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231116112633.668826-2-u.kleine-koenig@pengutronix.de commit 62e79e38b257a59f1e3d8aff801ae8590e2e45b4 Author: Fabio Estevam Date: Wed Nov 29 09:43:30 2023 -0300 thermal/thermal_of: Allow rebooting after critical temp Currently, the default mechanism is to trigger a shutdown after the critical temperature is reached. In some embedded cases, such behavior does not suit well, as the board may be unattended in the field and rebooting may be a better approach. The bootloader may also check the temperature and only allow the boot to proceed when the temperature is below a certain threshold. Introduce support for allowing a reboot to be triggered after the critical temperature is reached. If the "critical-action" devicetree property is not found, fall back to the shutdown action to preserve the existing default behavior. If a custom ops->critical exists, then it takes preference over critical-actions. Tested on a i.MX8MM board with the following devicetree changes: thermal-zones { cpu-thermal { critical-action = "reboot"; }; }; Signed-off-by: Fabio Estevam Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231129124330.519423-4-festevam@gmail.com commit 79fa723ba84c2b1b3124c72df8a3b07b851a5477 Author: Fabio Estevam Date: Wed Nov 29 09:43:29 2023 -0300 reboot: Introduce thermal_zone_device_critical_reboot() Introduce thermal_zone_device_critical_reboot() to trigger an emergency reboot. It is a counterpart of thermal_zone_device_critical() with the difference that it will force a reboot instead of shutdown. The motivation for doing this is to allow the thermal subystem to trigger a reboot when the temperature reaches the critical temperature. Signed-off-by: Fabio Estevam Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231129124330.519423-3-festevam@gmail.com commit 5a0e241003b80247de59727c945bc94c848f893d Author: Fabio Estevam Date: Wed Nov 29 09:43:28 2023 -0300 thermal/core: Prepare for introduction of thermal reboot Add some helper functions to make it easier introducing the support for thermal reboot. No functional change. Signed-off-by: Fabio Estevam Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231129124330.519423-2-festevam@gmail.com commit 87f67d1747bc3ce8ace14be99b47d7731041ff03 Author: Fabio Estevam Date: Wed Nov 29 09:43:27 2023 -0300 dt-bindings: thermal-zones: Document critical-action Document the critical-action property to describe the thermal action the OS should perform after the critical temperature is reached. The possible values are "shutdown" and "reboot". The motivation for introducing the critical-action property is that different systems may need different thermal actions when the critical temperature is reached. For example, in a desktop PC, it is desired that a shutdown happens after the critical temperature is reached. However, in some embedded cases, such behavior does not suit well, as the board may be unattended in the field and rebooting may be a better approach. The bootloader may also benefit from this new property as it can check the SoC temperature and in case the temperature is above the critical point, it can trigger a shutdown or reboot accordingly. Signed-off-by: Fabio Estevam Reviewed-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231129124330.519423-1-festevam@gmail.com commit 748b49c7dfe59d026c2e44cfb63cf66659aceb50 Author: Neil Armstrong Date: Tue Nov 28 09:44:48 2023 +0100 dt-bindings: thermal: qcom-tsens: document the SM8650 Temperature Sensor Document the Temperature Sensor (TSENS) on the SM8650 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231128-topic-sm8650-upstream-bindings-tsens-v3-1-54179e6646d3@linaro.org commit 15ef92e9c41124ee9d88b01208364f3fe1f45f84 Author: Binbin Zhou Date: Fri Nov 24 17:57:45 2023 +0800 drivers/thermal/loongson2_thermal: Fix incorrect PTR_ERR() judgment PTR_ERR() returns -ENODEV when thermal-zones are undefined, and we need -ENODEV as the right value for comparison. Otherwise, tz->type is NULL when thermal-zones is undefined, resulting in the following error: [ 12.290030] CPU 1 Unable to handle kernel paging request at virtual address fffffffffffffff1, era == 900000000355f410, ra == 90000000031579b8 [ 12.302877] Oops[#1]: [ 12.305190] CPU: 1 PID: 181 Comm: systemd-udevd Not tainted 6.6.0-rc7+ #5385 [ 12.312304] pc 900000000355f410 ra 90000000031579b8 tp 90000001069e8000 sp 90000001069eba10 [ 12.320739] a0 0000000000000000 a1 fffffffffffffff1 a2 0000000000000014 a3 0000000000000001 [ 12.329173] a4 90000001069eb990 a5 0000000000000001 a6 0000000000001001 a7 900000010003431c [ 12.337606] t0 fffffffffffffff1 t1 54567fd5da9b4fd4 t2 900000010614ec40 t3 00000000000dc901 [ 12.346041] t4 0000000000000000 t5 0000000000000004 t6 900000010614ee20 t7 900000000d00b790 [ 12.354472] t8 00000000000dc901 u0 54567fd5da9b4fd4 s9 900000000402ae10 s0 900000010614ec40 [ 12.362916] s1 90000000039fced0 s2 ffffffffffffffed s3 ffffffffffffffed s4 9000000003acc000 [ 12.362931] s5 0000000000000004 s6 fffffffffffff000 s7 0000000000000490 s8 90000001028b2ec8 [ 12.362938] ra: 90000000031579b8 thermal_add_hwmon_sysfs+0x258/0x300 [ 12.386411] ERA: 900000000355f410 strscpy+0xf0/0x160 [ 12.391626] CRMD: 000000b0 (PLV0 -IE -DA +PG DACF=CC DACM=CC -WE) [ 12.397898] PRMD: 00000004 (PPLV0 +PIE -PWE) [ 12.403678] EUEN: 00000000 (-FPE -SXE -ASXE -BTE) [ 12.409859] ECFG: 00071c1c (LIE=2-4,10-12 VS=7) [ 12.415882] ESTAT: 00010000 [PIL] (IS= ECode=1 EsubCode=0) [ 12.415907] BADV: fffffffffffffff1 [ 12.415911] PRID: 0014a000 (Loongson-64bit, Loongson-2K1000) [ 12.415917] Modules linked in: loongson2_thermal(+) vfat fat uio_pdrv_genirq uio fuse zram zsmalloc [ 12.415950] Process systemd-udevd (pid: 181, threadinfo=00000000358b9718, task=00000000ace72fe3) [ 12.415961] Stack : 0000000000000dc0 54567fd5da9b4fd4 900000000402ae10 9000000002df9358 [ 12.415982] ffffffffffffffed 0000000000000004 9000000107a10aa8 90000001002a3410 [ 12.415999] ffffffffffffffed ffffffffffffffed 9000000107a11268 9000000003157ab0 [ 12.416016] 9000000107a10aa8 ffffff80020fc0c8 90000001002a3410 ffffffffffffffed [ 12.416032] 0000000000000024 ffffff80020cc1e8 900000000402b2a0 9000000003acc000 [ 12.416048] 90000001002a3410 0000000000000000 ffffff80020f4030 90000001002a3410 [ 12.416065] 0000000000000000 9000000002df6808 90000001002a3410 0000000000000000 [ 12.416081] ffffff80020f4030 0000000000000000 90000001002a3410 9000000002df2ba8 [ 12.416097] 00000000000000b4 90000001002a34f4 90000001002a3410 0000000000000002 [ 12.416114] ffffff80020f4030 fffffffffffffff0 90000001002a3410 9000000002df2f30 [ 12.416131] ... [ 12.416138] Call Trace: [ 12.416142] [<900000000355f410>] strscpy+0xf0/0x160 [ 12.416167] [<90000000031579b8>] thermal_add_hwmon_sysfs+0x258/0x300 [ 12.416183] [<9000000003157ab0>] devm_thermal_add_hwmon_sysfs+0x50/0xe0 [ 12.416200] [] loongson2_thermal_probe+0x128/0x200 [loongson2_thermal] [ 12.416232] [<9000000002df6808>] platform_probe+0x68/0x140 [ 12.416249] [<9000000002df2ba8>] really_probe+0xc8/0x3c0 [ 12.416269] [<9000000002df2f30>] __driver_probe_device+0x90/0x180 [ 12.416286] [<9000000002df3058>] driver_probe_device+0x38/0x160 [ 12.416302] [<9000000002df33a8>] __driver_attach+0xa8/0x200 [ 12.416314] [<9000000002deffec>] bus_for_each_dev+0x8c/0x120 [ 12.416330] [<9000000002df198c>] bus_add_driver+0x10c/0x2a0 [ 12.416346] [<9000000002df46b4>] driver_register+0x74/0x160 [ 12.416358] [<90000000022201a4>] do_one_initcall+0x84/0x220 [ 12.416372] [<90000000022f3ab8>] do_init_module+0x58/0x2c0 [ 12.416386] [<90000000022f6538>] init_module_from_file+0x98/0x100 [ 12.416399] [<90000000022f67f0>] sys_finit_module+0x230/0x3c0 [ 12.416412] [<900000000358f7c8>] do_syscall+0x88/0xc0 [ 12.416431] [<900000000222137c>] handle_syscall+0xbc/0x158 Fixes: e7e3a7c35791 ("thermal/drivers/loongson-2: Add thermal management support") Cc: Yinbo Zhu Signed-off-by: Binbin Zhou Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/343c14de98216636a47b43e8bfd47b70d0a8e068.1700817227.git.zhoubinbin@loongson.cn commit 88071e31e994ee23356674e0c5461b25e2a95cdc Author: Binbin Zhou Date: Fri Nov 24 17:57:44 2023 +0800 dt-bindings: thermal: loongson,ls2k-thermal: Fix binding check issues Add the missing 'thermal-sensor-cells' property which is required for every thermal sensor as it's used when using phandles. And add the thermal-sensor.yaml reference. In fact, it was a careless mistake when submitting the driver that caused it to not work properly. So the fix is necessary, although it will result in the ABI break. Fixes: 72684d99a854 ("thermal: dt-bindings: add loongson-2 thermal") Cc: Yinbo Zhu Signed-off-by: Binbin Zhou Reviewed-by: Conor Dooley Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/6d69362632271ab0af9a5fbfa3bc46a0894f1d54.1700817227.git.zhoubinbin@loongson.cn commit 788494ba09992f6bc1c50327afdd1c861113fbe4 Author: Rafał Miłecki Date: Fri Nov 17 06:22:14 2023 +0100 dt-bindings: thermal: convert Mediatek Thermal to the json-schema This helps validating DTS files. Introduced changes: 1. Improved title 2. Simplified description (dropped "This describes the device tree...") 3. Dropped undocumented "reset-names" from example Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231117052214.24554-1-zajec5@gmail.com commit f7e2910fcec1fb2f78888e33ee994653fc29fb15 Author: Michal Wilczynski Date: Tue Oct 17 11:29:05 2023 +0300 ACPI: NFIT: Use cleanup.h helpers instead of devm_*() The new cleanup.h facilities that arrived in v6.5-rc1 can replace the the usage of devm semantics in acpi_nfit_init_interleave_set(). That routine appears to only be using devm to avoid goto statements. The new __free() annotation at variable declaration time can achieve the same effect more efficiently. There is no end user visible side effects of this patch, I was motivated to send this cleanup to practice using the new helpers. Suggested-by: Dave Jiang Suggested-by: Andy Shevchenko Reviewed-by: Dave Jiang Reviewed-by: Andy Shevchenko Reviewed-by: Dan Williams Signed-off-by: Michal Wilczynski Link: https://lore.kernel.org/r/20231017082905.1673316-1-michal.wilczynski@intel.com Signed-off-by: Ira Weiny commit 992bbc9e9ab9abe5bc1ea9a1a8d61331b28f848e Author: Jeff LaBundy Date: Mon Jan 1 14:02:45 2024 -0600 Input: iqs269a - add support for OTP variants This patch adds support for each available OTP variant of the device. The OTP configuration cannot be read over I2C, so it is derived from a compatible string instead. Early revisions of the D0 order code require their OTP-enabled func- tionality to be manually restored following a soft reset; this patch accommodates this erratum as well. Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/ZZMaZbdk6iAKUjlm@nixie71 Signed-off-by: Dmitry Torokhov commit 56c083e3f5723c68055ab5f97d21e55aab7bd8ef Author: Jeff LaBundy Date: Mon Jan 1 14:02:35 2024 -0600 dt-bindings: input: iqs269a: Add bindings for OTP variants This patch adds bindings for the D0 order code of the device. This order code represents an OTP variant that enables a touch-and-hold function in place of slider 1. Also included is the ability to specify the 00 order code (default option with no OTP customization) explicitly. Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/ZZMaW9RkQ9bKXOUn@nixie71 Signed-off-by: Dmitry Torokhov commit 00521a9bf96eaab358886d7a0c531d52027d3241 Author: Jeff LaBundy Date: Mon Jan 1 14:02:23 2024 -0600 Input: iqs269a - add support for slider gestures This patch adds support for slider gestures that can be expressed by the device. Each gesture (e.g. tap or hold) can be mapped to a unique keycode for either slider 0 or 1. With this change, raw slider coordinates are reported only if the slider has no keycodes defined. This prevents unwanted mouse cur- sor movement when expressing axial gestures (e.g. swipe) and also eliminates some unnecessary I2C traffic. Different revisions of silicon use different tap and swipe timeout step sizes. Apply an appropriate scaling factor depending on which revision is found. To facilitate this change, store the iqs269_ver_info struct in the driver's private data so that other functions can use it after the driver has probed. Last but not least, a former reserved field in iqs269_ver_info now contains useful information; give it a name (fw_num). Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/ZZMaT46WQq1/Nrsb@nixie71 Signed-off-by: Dmitry Torokhov commit 65cdd3ada7dcec1863022b2ca218ae409f99c759 Author: Jeff LaBundy Date: Mon Jan 1 14:02:06 2024 -0600 dt-bindings: input: iqs269a: Add bindings for slider gestures This patch adds bindings for slider gestures that can be expressed by the device. Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/ZZMaPrbSi4IrzwKF@nixie71 Signed-off-by: Dmitry Torokhov commit 9fb3dc1e9af2162f530d9e905fc9e4f78d7cc1c5 Merge: 109bf4cfe112d 32bb4515e3446 Author: David S. Miller Date: Mon Jan 1 18:38:57 2024 +0000 Merge branch 'phy-listing-link_topology-tracking' Maxime Chevallier says: ==================== Introduce PHY listing and link_topology tracking Here's a V5 of the multi-PHY support series. At a glance, besides some minor fixes and R'd-by from Andrew, one of the thing this series does is remove the ASSERT_RTNL() from the topo_add_phy/del_phy operations. These operations will take a PHY device and put it into the list of devices associated to a netdevice. The main thing to protect here is the list itself, but since we use xarrays, my naive understanding of it is that it contains its own protection scheme. There shouldn't be a need for more locking, as the insertion/deletion paths are already hooked into the PHY connection to a netdev, or disconnection from it. Now for the rest of the cover : As a remainder, this ongoing work aims ultimately at supporting complex link topologies that involve multiplexing multiple PHYs/SFPs on a single netdevice. As a first step, it's required that we are able to enumerate the PHYs on a given ethernet interface. By just doing so, we also improve already-existing use-cases, namely the copper SFP modules support when a media-converter is used (as we have 2 PHYs on the link, but only one is referenced by net_device.phydev, which is used on a variety of netlink commands). The series is architectured as follows : - The first patch adds the notion of phy_link_topology, which tracks all PHYs attached to a netdevice. - Patches 2, 3 and 4 adds some plumbing into SFP and phylib to be able to connect the dots when building the topology tree, to know which PHY is connected to which SFP bus, trying not to be too invasive on phylib. - Patch 5 allows passing a PHY_INDEX to ethnl commands. I'm uncertain about this, as there are at least 4 netlink commands ( 5 with the one introduced in patch 7 ) that targets PHYs directly or indirectly, which to me makes it worth-it to have a generic way to pass a PHY index to commands, however the approach taken may be too generic. - Patch 6 is the netlink spec update + ethtool-user.c|h autogenerated code update (the autogenerated code triggers checkpatch warning though) - Patch 7 introduces a new netlink command set to list PHYs on a netdevice. It implements a custom DUMP and GET operation to allow filtered dumps, that lists all PHYs on a given netdevice. I couldn't use most of ethnl's plumbing though. - Patch 8 is the netlink spec update + ethtool-user.c|h update for that new command - Patch 8,9,10 and 11 updates the PLCA, strset, cable-test and pse netlink commands to use the user-provided PHY instead of net_device.phydev. - Finally patch 12 adds some documentation for this whole work. Examples ======== Here's a short overview of the kind of operations you can have regarding the PHY topology. These tests were performed on a MacchiatoBin, which has 3 interfaces : eth0 and eth1 have the following layout: MAC - PHY - SFP eth2 has this more classic topology : MAC - PHY - RJ45 finally eth3 has the following topology : MAC - SFP When performing a dump with all interfaces down, we don't get any result, as no PHY has been attached to their respective net_device : None The following output is with eth0, eth2 and eth3 up, but no SFP module inserted in none of the interfaces : [{'downstream-sfp-name': 'sfp-eth0', 'drvname': 'mv88x3310', 'header': {'dev-index': 2, 'dev-name': 'eth0'}, 'id': 0, 'index': 1, 'name': 'f212a600.mdio-mii:00', 'upstream-type': 'mac'}, {'drvname': 'Marvell 88E1510', 'header': {'dev-index': 4, 'dev-name': 'eth2'}, 'id': 21040593, 'index': 1, 'name': 'f212a200.mdio-mii:00', 'upstream-type': 'mac'}] And now is a dump operation with a copper SFP in the eth0 port : [{'downstream-sfp-name': 'sfp-eth0', 'drvname': 'mv88x3310', 'header': {'dev-index': 2, 'dev-name': 'eth0'}, 'id': 0, 'index': 1, 'name': 'f212a600.mdio-mii:00', 'upstream-type': 'mac'}, {'drvname': 'Marvell 88E1111', 'header': {'dev-index': 2, 'dev-name': 'eth0'}, 'id': 21040322, 'index': 2, 'name': 'i2c:sfp-eth0:16', 'upstream': {'index': 1, 'sfp-name': 'sfp-eth0'}, 'upstream-type': 'phy'}, {'drvname': 'Marvell 88E1510', 'header': {'dev-index': 4, 'dev-name': 'eth2'}, 'id': 21040593, 'index': 1, 'name': 'f212a200.mdio-mii:00', 'upstream-type': 'mac'}] -- Note that this shouldn't actually work as the 88x3310 PHY doesn't allow a 1G SFP to be connected to its SFP interface, and I don't have a 10G copper SFP, so for the sake of the demo I applied the following modification, which of courses gives a non-functionnal link, but the PHY attach still works, which is what I want to demonstrate : @@ -488,7 +488,7 @@ static int mv3310_sfp_insert(void *upstream, const struct sfp_eeprom_id *id) if (iface != PHY_INTERFACE_MODE_10GBASER) { dev_err(&phydev->mdio.dev, "incompatible SFP module inserted\n"); - return -EINVAL; + //return -EINVAL; } return 0; } Finally an example of the filtered DUMP operation that Jakub suggested in V1 : [{'downstream-sfp-name': 'sfp-eth0', 'drvname': 'mv88x3310', 'header': {'dev-index': 2, 'dev-name': 'eth0'}, 'id': 0, 'index': 1, 'name': 'f212a600.mdio-mii:00', 'upstream-type': 'mac'}, {'drvname': 'Marvell 88E1111', 'header': {'dev-index': 2, 'dev-name': 'eth0'}, 'id': 21040322, 'index': 2, 'name': 'i2c:sfp-eth0:16', 'upstream': {'index': 1, 'sfp-name': 'sfp-eth0'}, 'upstream-type': 'phy'}] And a classic GET operation allows querying a single PHY's info : {'drvname': 'Marvell 88E1111', 'header': {'dev-index': 2, 'dev-name': 'eth0'}, 'id': 21040322, 'index': 2, 'name': 'i2c:sfp-eth0:16', 'upstream': {'index': 1, 'sfp-name': 'sfp-eth0'}, 'upstream-type': 'phy'} Changed in V5: - Removed the RTNL assertion in the topology ops - Made the phy_topo_get_phy inline - Fixed the PSE-PD multi-PHY support by re-adding a wrongly dropped check - Fixed some typos in the documentation - Fixed reverse xmas trees Changes in V4: - Dropped the RFC flag - Made the net_device integration independent to having phylib enabled - Removed the autogenerated ethtool-user code for the YNL specs Changes in V3: - Added RTNL assertions where needed - Fixed issues in the DUMP code for PHY_GET, which crashed when running it twice in a row - Added the documentation, and moved in-source docs around - renamed link_topology to phy_link_topology Changes in V2: - Added the DUMP operation - Added much more information in the reported data, to be able to reconstruct precisely the topology tree - renamed phy_list to link_topology ==================== Signed-off-by: David S. Miller commit 32bb4515e34469975abc936deb0a116c4a445817 Author: Maxime Chevallier Date: Thu Dec 21 19:00:46 2023 +0100 Documentation: networking: document phy_link_topology The newly introduced phy_link_topology tracks all ethernet PHYs that are attached to a netdevice. Document the base principle, internal and external APIs. As the phy_link_topology is expected to be extended, this documentation will hold any further improvements and additions made relative to topology handling. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit d078d480639a4f3b5fc2d56247afa38e0956483a Author: Maxime Chevallier Date: Thu Dec 21 19:00:45 2023 +0100 net: ethtool: strset: Allow querying phy stats by index The ETH_SS_PHY_STATS command gets PHY statistics. Use the phydev pointer from the ethnl request to allow query phy stats from each PHY on the link. Signed-off-by: Maxime Chevallier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit fcc4b105caa4b844bf043375bf799c20a9c99db1 Author: Maxime Chevallier Date: Thu Dec 21 19:00:44 2023 +0100 net: ethtool: cable-test: Target the command to the requested PHY Cable testing is a PHY-specific command. Instead of targeting the command towards dev->phydev, use the request to pick the targeted PHY. Signed-off-by: Maxime Chevallier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 345237dbc1bdbb274c9fb9ec38976261ff4a40b8 Author: Maxime Chevallier Date: Thu Dec 21 19:00:43 2023 +0100 net: ethtool: pse-pd: Target the command to the requested PHY PSE and PD configuration is a PHY-specific command. Instead of targeting the command towards dev->phydev, use the request to pick the targeted PHY device. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit 7db69ec9cfb8b4ab50420262631fb2d1908b25bf Author: Maxime Chevallier Date: Thu Dec 21 19:00:42 2023 +0100 net: ethtool: plca: Target the command to the requested PHY PLCA is a PHY-specific command. Instead of targeting the command towards dev->phydev, use the request to pick the targeted PHY. Signed-off-by: Maxime Chevallier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 95132a018f00f5dad38bdcfd4180d1af955d46f6 Author: Maxime Chevallier Date: Thu Dec 21 19:00:41 2023 +0100 netlink: specs: add ethnl PHY_GET command set The PHY_GET command, supporting both DUMP and GET operations, is used to retrieve the list of PHYs connected to a netdevice, and get topology information to know where exactly it sits on the physical link. Add the netlink specs corresponding to that command. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit 63d5eaf35ac36cad00cfb3809d794ef0078c822b Author: Maxime Chevallier Date: Thu Dec 21 19:00:40 2023 +0100 net: ethtool: Introduce a command to list PHYs on an interface As we have the ability to track the PHYs connected to a net_device through the link_topology, we can expose this list to userspace. This allows userspace to use these identifiers for phy-specific commands and take the decision of which PHY to target by knowing the link topology. Add PHY_GET and PHY_DUMP, which can be a filtered DUMP operation to list devices on only one interface. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit c29451aefcb42359905d18678de38e52eccb3bb5 Author: Maxime Chevallier Date: Thu Dec 21 19:00:39 2023 +0100 netlink: specs: add phy-index as a header parameter Update the spec to take the newly introduced phy-index as a generic request parameter. Signed-off-by: Maxime Chevallier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2ab0edb505faa9ac90dee1732571390f074e8113 Author: Maxime Chevallier Date: Thu Dec 21 19:00:38 2023 +0100 net: ethtool: Allow passing a phy index for some commands Some netlink commands are target towards ethernet PHYs, to control some of their features. As there's several such commands, add the ability to pass a PHY index in the ethnl request, which will populate the generic ethnl_req_info with the relevant phydev when the command targets a PHY. Signed-off-by: Maxime Chevallier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit dedd702a35793ab462fce4c737eeba0badf9718e Author: Maxime Chevallier Date: Thu Dec 21 19:00:37 2023 +0100 net: sfp: Add helper to return the SFP bus name Knowing the bus name is helpful when we want to expose the link topology to userspace, add a helper to return the SFP bus name. Signed-off-by: Maxime Chevallier Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 034fcc210349b873ece7356905be5c6ca11eef2a Author: Maxime Chevallier Date: Thu Dec 21 19:00:36 2023 +0100 net: phy: add helpers to handle sfp phy connect/disconnect There are a few PHY drivers that can handle SFP modules through their sfp_upstream_ops. Introduce Phylib helpers to keep track of connected SFP PHYs in a netdevice's namespace, by adding the SFP PHY to the upstream PHY's netdev's namespace. By doing so, these SFP PHYs can be enumerated and exposed to users, which will be able to use their capabilities. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit 9c5625f559ad6fe9f6f733c11475bf470e637d34 Author: Maxime Chevallier Date: Thu Dec 21 19:00:35 2023 +0100 net: sfp: pass the phy_device when disconnecting an sfp module's PHY Pass the phy_device as a parameter to the sfp upstream .disconnect_phy operation. This is preparatory work to help track phy devices across a net_device's link. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit 02018c544ef113e980a2349eba89003d6f399d22 Author: Maxime Chevallier Date: Thu Dec 21 19:00:34 2023 +0100 net: phy: Introduce ethernet link topology representation Link topologies containing multiple network PHYs attached to the same net_device can be found when using a PHY as a media converter for use with an SFP connector, on which an SFP transceiver containing a PHY can be used. With the current model, the transceiver's PHY can't be used for operations such as cable testing, timestamping, macsec offload, etc. The reason being that most of the logic for these configuration, coming from either ethtool netlink or ioctls tend to use netdev->phydev, which in multi-phy systems will reference the PHY closest to the MAC. Introduce a numbering scheme allowing to enumerate PHY devices that belong to any netdev, which can in turn allow userspace to take more precise decisions with regard to each PHY's configuration. The numbering is maintained per-netdev, in a phy_device_list. The numbering works similarly to a netdevice's ifindex, with identifiers that are only recycled once INT_MAX has been reached. This prevents races that could occur between PHY listing and SFP transceiver removal/insertion. The identifiers are assigned at phy_attach time, as the numbering depends on the netdevice the phy is attached to. Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller commit c98d132ed1e37bb1c6b2ddbb50f9eae2283f0df6 Author: Kent Overstreet Date: Sun Dec 10 22:52:43 2023 -0500 bcachefs: check_directory_structure() can now be run online Now that we have dynamically resizable btree paths, check_directory_structure() can check one path - inode up to the root - in a single transaction. Signed-off-by: Kent Overstreet commit d296e7b18521d60e3c428945c19a66ecf012c002 Author: Kent Overstreet Date: Fri Dec 15 14:13:48 2023 -0500 bcachefs: Fix reattach_inode() for snapshots reattach_inode() was broken w.r.t. snapshots - we'd lookup the subvolume to look up lost+found, but if we're in an interior node snapshot that didn't make any sense. Instead, this adds a dirent path for creating in a specific snapshot, skipping the subvolume; and we also make sure to create lost+found in the root snapshot, to avoid conflicts with lost+found being created in overlapping snapshots. Signed-off-by: Kent Overstreet commit c558c577cbea95d8a8efc161cad93bab344a61d0 Author: Kent Overstreet Date: Sun Dec 17 00:57:37 2023 -0500 bcachefs: bch2_btree_trans_peek_slot_updates refactoring the BTREE_ITER_WITH_UPDATES code, prep for removing the flag and making it always-on Signed-off-by: Kent Overstreet commit 359e89add5b89fb467f08391ab9d80ba6e775295 Author: Kent Overstreet Date: Sun Dec 17 00:57:37 2023 -0500 bcachefs: bch2_btree_trans_peek_prev_updates bch2_btree_iter_peek_prev() now supports BTREE_ITER_WITH_UPDATES Signed-off-by: Kent Overstreet commit eb6863598a9dff88bdb4483cc09a3ec8e1150b48 Author: Kent Overstreet Date: Sun Dec 17 00:57:37 2023 -0500 bcachefs: bch2_btree_trans_peek_updates refactoring the BTREE_ITER_WITH_UPDATES code, prep for removing the flag and making it always-on Signed-off-by: Kent Overstreet commit 0c99e17d3bd3b60ee7461cb8e87ff6badf228422 Author: Kent Overstreet Date: Sun Dec 10 19:26:30 2023 -0500 bcachefs: growable btree_paths XXX: we're allocating memory with btree locks held - bad We need to plumb through an error path so we can do allocate_dropping_locks() - but we're merging this now because it fixes a transaction path overflow caused by indirect extent fragmentation, and the resize path is rare. Signed-off-by: Kent Overstreet commit ff70ad2c8dfdcc24f98b645481116d4c2ea20e37 Author: Kent Overstreet Date: Fri Dec 15 15:21:40 2023 -0500 bcachefs: Fix interior update path btree_path uses Since the btree_paths array is now about to become growable, we have to be careful not to refer to paths by pointer across contexts where they may be reallocated. This fixes the remaining btree_interior_update() paths - split and merge. Signed-off-by: Kent Overstreet commit 2c3b0fc3bd0a5db0d10260b08a7139fdb7a4d3a8 Author: Kent Overstreet Date: Sun Dec 10 17:10:31 2023 -0500 bcachefs: trans->nr_paths Start to plumb through dynamically growable btree_paths; this patch replaces most BTREE_ITER_MAX references with trans->nr_paths. Signed-off-by: Kent Overstreet commit 5cc6daf74979ca951ce2550847995b3b18398af4 Author: Kent Overstreet Date: Tue Dec 12 20:30:44 2023 -0500 bcachefs: trans->updates will also be resizable the reflink triggers are also bumping up against the maximum number of paths in a transaction - and generating proportional numbers of updates. Signed-off-by: Kent Overstreet commit 31403dca5bb1e55ea0ea6ad1264b81fa8c9a3768 Author: Kent Overstreet Date: Mon Dec 11 11:11:22 2023 -0500 bcachefs: optimize __bch2_trans_get(), kill DEBUG_TRANSACTIONS - Some tweaks to greatly reduce locking overhead for the list of btree transactions, so that it can always be enabled: leave btree_trans objects on the list when they're on the percpu single item freelist, and only check for duplicates in the same process when CONFIG_BCACHEFS_DEBUG is enabled - don't zero out the full btree_trans() unless we allocated it from the mempool Signed-off-by: Kent Overstreet commit fea153a84557c982542527143950dbef434731c2 Author: Kent Overstreet Date: Tue Dec 12 20:08:29 2023 -0500 bcachefs: rcu protect trans->paths Upcoming patches are going to be changing trans->paths to a reallocatable buffer. We need to guard against use after free when it's used by other threads; this introduces RCU protection to those paths and changes them to check for trans->paths == NULL Signed-off-by: Kent Overstreet commit 6474b706108bac9e531a71ddeb8150f8fa17163c Author: Kent Overstreet Date: Mon Dec 11 02:31:12 2023 -0500 bcachefs: Clean up btree_trans Signed-off-by: Kent Overstreet commit 398c98347d464f7675216c5ea974a82bcdb2bef9 Author: Kent Overstreet Date: Mon Dec 11 00:23:33 2023 -0500 bcachefs: kill btree_path.idx Signed-off-by: Kent Overstreet commit d7e14035a4b43440a5ba741759501d86e96005d2 Author: Kent Overstreet Date: Mon Dec 11 00:17:17 2023 -0500 bcachefs: get_unlocked_mut_path() -> btree_path_idx_t Signed-off-by: Kent Overstreet commit 542e6396740aed017905e3ad02dbf07a4bf7369d Author: Kent Overstreet Date: Mon Dec 11 00:03:44 2023 -0500 bcachefs: bch2_btree_iter_peek_prev() no longer uses path->idx Signed-off-by: Kent Overstreet commit 566eabd36faca007fb14d05e387b7aad4a7af219 Author: Kent Overstreet Date: Mon Dec 11 00:02:07 2023 -0500 bcachefs: bch2_path_get() no longer uses path->idx Signed-off-by: Kent Overstreet commit b0b67378225d66a3e1900c188b27586f48c6b119 Author: Kent Overstreet Date: Sun Dec 10 23:57:50 2023 -0500 bcachefs: trans_for_each_path_with_node() no longer uses path->idx Signed-off-by: Kent Overstreet commit ccb7b08fbbb85e9b0bb2867497d98172a5737ad5 Author: Kent Overstreet Date: Sun Dec 10 23:37:45 2023 -0500 bcachefs: trans_for_each_path() no longer uses path->idx path->idx is now a code smell: we should be using path_idx_t, since it's stable across btree path reallocation. This is also a bit faster, using the same loop counter vs. fetching path->idx from each path we iterate over. Signed-off-by: Kent Overstreet commit 4c5289e6323ca9d0d46b3663ace2fb44bb2594b7 Author: Kent Overstreet Date: Sun Dec 10 17:54:02 2023 -0500 bcachefs: kill trans_for_each_path_from() dead code Signed-off-by: Kent Overstreet commit 311e446a414885aed71bc8106bdc4874774343c4 Author: Kent Overstreet Date: Sun Dec 10 23:29:06 2023 -0500 bcachefs: bch2_btree_path_to_text() -> btree_path_idx_t Signed-off-by: Kent Overstreet commit 1f75ba4e65c54ff0517d7cd073afceb0751d1a32 Author: Kent Overstreet Date: Sun Dec 10 16:35:45 2023 -0500 bcachefs: struct trans_for_each_path_inorder_iter reducing our usage of path->idx Signed-off-by: Kent Overstreet commit 7f9821a7c10bca1903bfa75126db199a40ec3b62 Author: Kent Overstreet Date: Sun Dec 10 16:10:24 2023 -0500 bcachefs: btree_insert_entry -> btree_path_idx_t Signed-off-by: Kent Overstreet commit 07f383c71fadc952059ed4ffe37dd465bda4ad3e Author: Kent Overstreet Date: Mon Dec 4 00:39:38 2023 -0500 bcachefs: btree_iter -> btree_path_idx_t Signed-off-by: Kent Overstreet commit 788cc25d15e0d502a29fb7deae78832075e55655 Author: Kent Overstreet Date: Fri Dec 8 17:02:16 2023 -0500 bcachefs: btree_path_alloc() -> btree_path_idx_t Signed-off-by: Kent Overstreet commit 96ed47d13056b74f867c63ab9fec0fd319048b70 Author: Kent Overstreet Date: Fri Dec 8 03:02:43 2023 -0500 bcachefs: bch2_btree_path_traverse() -> btree_path_idx_t Signed-off-by: Kent Overstreet commit f6363acaa63a84e7e79bd6e8b926d40a940e7c81 Author: Kent Overstreet Date: Fri Dec 8 02:24:05 2023 -0500 bcachefs: bch2_btree_path_make_mut() -> btree_path_idx_t Signed-off-by: Kent Overstreet commit 4617d94617a4604288b9f9d02f808274af21ee38 Author: Kent Overstreet Date: Fri Dec 8 02:10:23 2023 -0500 bcachefs: bch2_btree_path_set_pos() -> btree_path_idx_t Signed-off-by: Kent Overstreet commit 74e600c19a18bf6c1696f82b6d04d894f9bbdf40 Author: Kent Overstreet Date: Sun Dec 10 23:18:52 2023 -0500 bcachefs; bch2_path_put() -> btree_path_idx_t Signed-off-by: Kent Overstreet commit 255ebbbf750727e62a07e1602ffeaf1d4842018d Author: Kent Overstreet Date: Fri Dec 8 02:00:43 2023 -0500 bcachefs: bch2_path_get() -> btree_path_idx_t Signed-off-by: Kent Overstreet commit 5ce8b92da0b04faa4864845f43ed7357034e700d Author: Kent Overstreet Date: Fri Dec 8 01:51:04 2023 -0500 bcachefs: minor bch2_btree_path_set_pos() optimization bpos_eq() is cheaper than bpos_cmp() Signed-off-by: Kent Overstreet commit 4753bdeb26d55eebb415254f795b8be66cb80452 Author: Kent Overstreet Date: Wed Dec 20 01:20:53 2023 -0500 bcachefs: Kill GFP_NOFAIL usage in readahead path Signed-off-by: Kent Overstreet commit 806ebf2aa01749ca4c510fbb42cd146bdfdbe5a4 Author: Kent Overstreet Date: Fri Dec 22 21:10:32 2023 -0500 bcachefs: Convert split_devs() to darray Bit of cleanup & modernization: also moving this code to util.c, it'll be used by userspace as well. Signed-off-by: Kent Overstreet commit 0c0ba8e9c5a9f06a6a57acfc34a5526f9fdd41c4 Author: Kent Overstreet Date: Tue Dec 19 20:54:11 2023 -0500 bcachefs: skip journal more often in key cache reclaim Signed-off-by: Kent Overstreet commit 1a2a9f9f53a6c4d77bc16062fcb65c7169fb6ed1 Author: Kent Overstreet Date: Thu Dec 21 22:24:46 2023 -0500 bcachefs: for_each_keylist_key() declares loop iter Signed-off-by: Kent Overstreet commit 0beebd92457c3221b59840487591c1dff8071168 Author: Kent Overstreet Date: Thu Dec 21 15:47:15 2023 -0500 bcachefs: bkey_for_each_ptr() now declares loop iter Signed-off-by: Kent Overstreet commit 0bc64d7e2649f735eaa4ba7d422da446505ef89a Author: Kent Overstreet Date: Sun Dec 17 03:39:03 2023 -0500 bcachefs: kill __bch2_btree_iter_peek_upto_and_restart() dead code Signed-off-by: Kent Overstreet commit 4eb3877eaeba4feb81b260ff48a2063ca296ac74 Author: Kent Overstreet Date: Sun Dec 17 03:07:26 2023 -0500 bcachefs: fsck -> bch2_trans_run() Signed-off-by: Kent Overstreet commit cea07a7b6ac2cd9f40e20a5010203014c4996eb2 Author: Kent Overstreet Date: Sun Dec 17 02:19:23 2023 -0500 bcachefs: vstruct_for_each() now declares loop iter Signed-off-by: Kent Overstreet commit 41b84fb489f7707af4490d1e5e22d88f3207da71 Author: Kent Overstreet Date: Sun Dec 17 02:34:05 2023 -0500 bcachefs: for_each_member_device_rcu() now declares loop iter Signed-off-by: Kent Overstreet commit 9fea2274f783a39ba54727571e5e669c947ddd39 Author: Kent Overstreet Date: Sat Dec 16 23:47:29 2023 -0500 bcachefs: for_each_member_device() now declares loop iter Signed-off-by: Kent Overstreet commit 80eab7a7c2808f84e56ba1f2f1408a16c46d3bdc Author: Kent Overstreet Date: Sat Dec 16 22:30:09 2023 -0500 bcachefs: for_each_btree_key() now declares loop iter Signed-off-by: Kent Overstreet commit c47e8bfbb76991c7ea5feae4b21539c36d1200be Author: Kent Overstreet Date: Sat Dec 16 21:55:12 2023 -0500 bcachefs: kill for_each_btree_key_norestart() Signed-off-by: Kent Overstreet commit 44ddd8ad1e0be697cf090af669765b3a8b8965dc Author: Kent Overstreet Date: Sat Dec 16 21:51:34 2023 -0500 bcachefs: kill for_each_btree_key_old_upto() Signed-off-by: Kent Overstreet commit 3a860b5ad5f7fb851d1a9de5cd09b3e6e95362b2 Author: Kent Overstreet Date: Sat Dec 16 21:46:23 2023 -0500 bcachefs: for_each_btree_key_upto() -> for_each_btree_key_old_upto() And for_each_btree_key2_upto -> for_each_btree_key_upto Signed-off-by: Kent Overstreet commit c8ef2dc2fc87369a949c3e379ebfe50fe540fa36 Author: Kent Overstreet Date: Sun Dec 17 03:05:30 2023 -0500 bcachefs: bch2_dirent_lookup() -> lockrestart_do() Signed-off-by: Kent Overstreet commit 79904fa2bb540e2ecfaa181d7fef8cb21653b0c0 Author: Kent Overstreet Date: Mon Dec 11 18:04:29 2023 -0500 bcachefs: bch2_trans_srcu_lock() should be static Signed-off-by: Kent Overstreet commit 6d5c606c1cdc4e7c3d2ca83660e9f68827fc04ed Author: Kent Overstreet Date: Mon Dec 11 10:15:18 2023 -0500 bcachefs: use track_event_change() for allocator blocked stats Signed-off-by: Kent Overstreet commit ef23397c301900e9e7050f8245e2a25b5eea1589 Author: Kent Overstreet Date: Sat Dec 23 22:55:05 2023 -0500 bcachefs: fix warning about uninitialized time_stats Signed-off-by: Kent Overstreet commit e34ec13a56a02695458f6296daa9239c70b4cd29 Author: Kent Overstreet Date: Sat Dec 23 21:39:45 2023 -0500 bcachefs: add more verbose logging Signed-off-by: Kent Overstreet commit 53b67d8dcf47a9d9fef856484a57c7f0b30873fb Author: Kent Overstreet Date: Sat Dec 23 21:09:34 2023 -0500 bcachefs: better error message in btree_node_write_work() Signed-off-by: Kent Overstreet commit 037a2d9f48285bf3bfed0f55f1aee04d8b329d07 Author: Kent Overstreet Date: Sat Dec 23 21:02:45 2023 -0500 bcachefs: simplify bch_devs_list Signed-off-by: Kent Overstreet commit defd9e39b59961ea0fd774020fb5c05dba199412 Author: Kent Overstreet Date: Sat Dec 16 21:40:26 2023 -0500 bcachefs: darray_for_each() now declares loop iter Signed-off-by: Kent Overstreet commit 559e6c23367f4c122834e7bf4eeac0a3ac382149 Author: Kent Overstreet Date: Sat Dec 16 21:31:26 2023 -0500 bcachefs: trans_for_each_update() now declares loop iter Signed-off-by: Kent Overstreet commit cee0a8ea6d4f0c1960d47af2dd4b6f550af39e31 Author: Kent Overstreet Date: Wed Dec 20 16:49:43 2023 -0500 bcachefs: Improve the nopromote tracepoint Signed-off-by: Kent Overstreet commit 1ad36a010c698fde9148b8e2abf2303e3d6fd001 Author: Kent Overstreet Date: Wed Dec 20 02:38:10 2023 -0500 bcachefs: Use GFP_KERNEL for promote allocations We already have btree locks dropped here - no need for GFP_NOFS. Signed-off-by: Kent Overstreet commit 920388254f613410324a10695b43485a8d9f838a Author: Randy Dunlap Date: Tue Dec 19 22:44:09 2023 -0800 bcachefs: mean and variance: fix kernel-doc for function params Add missing function parameter descriptions in mean_and_variance.c. The also eliminates the "Excess function parameter" warnings. Prevents these kernel-doc warnings: mean_and_variance.c:67: warning: Function parameter or member 's' not described in 'mean_and_variance_get_mean' mean_and_variance.c:78: warning: Function parameter or member 's1' not described in 'mean_and_variance_get_variance' mean_and_variance.c:94: warning: Function parameter or member 's' not described in 'mean_and_variance_get_stddev' mean_and_variance.c:108: warning: Function parameter or member 's' not described in 'mean_and_variance_weighted_update' mean_and_variance.c:108: warning: Function parameter or member 'x' not described in 'mean_and_variance_weighted_update' mean_and_variance.c:108: warning: Excess function parameter 's1' description in 'mean_and_variance_weighted_update' mean_and_variance.c:108: warning: Excess function parameter 's2' description in 'mean_and_variance_weighted_update' mean_and_variance.c:134: warning: Function parameter or member 's' not described in 'mean_and_variance_weighted_get_mean' mean_and_variance.c:143: warning: Function parameter or member 's' not described in 'mean_and_variance_weighted_get_variance' mean_and_variance.c:153: warning: Function parameter or member 's' not described in 'mean_and_variance_weighted_get_stddev' Signed-off-by: Randy Dunlap Cc: Kent Overstreet Cc: Brian Foster Cc: linux-bcachefs@vger.kernel.org Signed-off-by: Kent Overstreet commit 447c1c01051251853e851bd77f26546488cbc7b7 Author: Kent Overstreet Date: Fri Dec 22 21:58:43 2023 -0500 bcachefs: check for failure to downgrade With the upcoming member seq patch, it's now critical that we don't ever write to a superblock that hasn't been version downgraded - failure to update member seq fields will cause split brain detection to fire erroniously. Signed-off-by: Kent Overstreet commit 44fd13a4c68e87953ccd827e764fa566ddcbbcf5 Author: Kent Overstreet Date: Thu Dec 21 19:47:55 2023 -0500 bcachefs: Fixes for rust bindgen bindgen doesn't seem to like u128 or DECLARE_FLEX_ARRAY(), but we can hack around them. Signed-off-by: Kent Overstreet commit 023f9ac9f70fbb1d94d27583fc06225355c73a67 Author: Kent Overstreet Date: Tue Dec 19 21:58:20 2023 -0500 bcachefs: Delete dio read alignment check We'll typically fomat devices with the physical blocksize supported, but the logical blocksize will be smaller. There's no real need to be checking the blocksize at the filesystem level, anyways - the block layer has to check this anyways. Signed-off-by: Kent Overstreet commit 033c9d7a2a348457239e69a2a9036d2e4029ee4d Author: Kent Overstreet Date: Thu Dec 21 23:57:22 2023 -0500 MAINTAINERS: Update my email address Signed-off-by: Kent Overstreet commit d8d819580ae02ba37388769b72f86cb4432a1cb9 Author: Brian Foster Date: Tue Dec 19 09:02:15 2023 -0500 bcachefs: clean up some dead fallocate code The have_reservation local variable in bch2_extent_fallocate() is initialized to false and set to true further down in the function. Between this two points, one branch of code checks for negative value and one for positive, and nothing ever checks the variable after it is set to true. Clean up some of the unnecessary logic and code. Signed-off-by: Brian Foster Signed-off-by: Kent Overstreet commit a7dc10ce689a6224c1601d5d2e4ca57dd8cce9f6 Author: Kent Overstreet Date: Tue Dec 19 18:08:19 2023 -0500 bcachefs: Make sure allocation failure errors are logged The previous patch fixed a bug in allocation path error handling, and it would've been noticed sooner had it been logged properly. Generally speaking, errors that shouldn't happen in normal operation and are being returned up the stack should be logged: the write path was already logging IO errors, but non IO errors were missed. Signed-off-by: Kent Overstreet commit 548673f8d39249d717d02038bd192a076e79edf0 Author: Kent Overstreet Date: Tue Dec 19 16:27:38 2023 -0500 bcachefs: drop extra semicolon Signed-off-by: Kent Overstreet commit 4c26dea1c096138b6e7c49c4886e68fbf6013217 Author: Gustavo A. R. Silva Date: Mon Dec 18 18:24:53 2023 -0600 bcachefs: Replace zero-length array with flex-array member and use __counted_by Fake flexible arrays (zero-length and one-element arrays) are deprecated, and should be replaced by flexible-array members. So, replace zero-length array with a flexible-array member in `struct bch_ioctl_fsck_offline`. Also annotate array `devs` with `__counted_by()` to prepare for the coming implementation by GCC and Clang of the `__counted_by` attribute. Flexible array members annotated with `__counted_by` can have their accesses bounds-checked at run-time via `CONFIG_UBSAN_BOUNDS` (for array indexing) and `CONFIG_FORTIFY_SOURCE` (for strcpy/memcpy-family functions). This fixes the following -Warray-bounds warnings: fs/bcachefs/chardev.c: In function 'bch2_ioctl_fsck_offline': fs/bcachefs/chardev.c:363:34: warning: array subscript 0 is outside array bounds of '__u64[0]' {aka 'long long unsigned int[]'} [-Warray-bounds=] 363 | if (copy_from_user(devs, &user_arg->devs[0], sizeof(user_arg->devs[0]) * arg.nr_devs)) { | ^~~~~~~~~~~~~~~~~~ In file included from fs/bcachefs/chardev.c:5: fs/bcachefs/bcachefs_ioctl.h:400:33: note: while referencing 'devs' 400 | __u64 devs[0]; This results in no differences in binary output. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kent Overstreet commit ac19c4c3d02e19b365209d2cee409671e1fb66bb Author: Gustavo A. R. Silva Date: Mon Dec 18 18:26:26 2023 -0600 bcachefs: Use array_size() in call to copy_from_user() Use array_size() helper, instead of the open-coded version in call to copy_from_user(). Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kent Overstreet commit 038fecc045932171e882a4e3668208c28f66f795 Author: Kent Overstreet Date: Sat Dec 16 21:16:34 2023 -0500 bcachefs: qstr_eq() Signed-off-by: Kent Overstreet commit cf904c8d964fa477cdb83445a03d05e9eda5d65c Author: Kent Overstreet Date: Sat Dec 16 22:43:41 2023 -0500 bcachefs: bch_err_(fn|msg) check if should print Signed-off-by: Kent Overstreet commit e06af20719a439730a588155e3b28d327a57d951 Author: Kent Overstreet Date: Fri Dec 15 22:16:51 2023 -0500 bcachefs: fix userspace build errors Signed-off-by: Kent Overstreet commit 73ffa5305694bfda7e39e079dcbd2199fb410781 Author: Kent Overstreet Date: Mon Dec 11 02:13:33 2023 -0500 bcachefs: Drop journal entry compaction Previously, we dropped empty journal entries and coalesced entries that could be - but it's not worth the overhead; we very rarely leave unused journal entries after getting a journal reservation. Signed-off-by: Kent Overstreet commit 679972348d03fb3644f4e1f7f7304911accd950d Author: Kent Overstreet Date: Sat Nov 11 21:43:47 2023 -0500 bcachefs: kill btree_trans->wb_updates the btree write buffer path now creates a journal entry directly Signed-off-by: Kent Overstreet commit 002c76dcf6a49a82498e8cddcde75e0dd83f745a Author: Kent Overstreet Date: Sun Dec 10 22:51:16 2023 -0500 bcachefs: check_root() can now be run online check_root() is simple enough to run as one single transaction, so is trivial to run online. Signed-off-by: Kent Overstreet commit 38ced43bb04ac59b1417f520f4d5a5c3bc3d1e57 Author: Kent Overstreet Date: Sat Nov 4 00:06:56 2023 -0400 bcachefs: Inline btree write buffer sort The sort in the btree write buffer flush path is a very hot path, and it's particularly performance sensitive since it's single threaded and can block every other thread on a multithreaded write workload. It's well worth doing a sort with inlined cmp and swap functions. Signed-off-by: Kent Overstreet commit 09caeabe1a5daa3b667b797c401d43206d583f23 Author: Kent Overstreet Date: Thu Nov 2 18:57:19 2023 -0400 bcachefs: btree write buffer now slurps keys from journal Previosuly, the transaction commit path would have to add keys to the btree write buffer as a separate operation, requiring additional global synchronization. This patch introduces a new journal entry type, which indicates that the keys need to be copied into the btree write buffer prior to being written out. We switch the journal entry type back to JSET_ENTRY_btree_keys prior to write, so this is not an on disk format change. Flushing the btree write buffer may require pulling keys out of journal entries yet to be written, and quiescing outstanding journal reservations; we previously added journal->buf_lock for synchronization with the journal write path. We also can't put strict bounds on the number of keys in the journal destined for the write buffer, which means we might overflow the size of the preallocated buffer and have to reallocate - this introduces a potentially fatal memory allocation failure. This is something we'll have to watch for, if it becomes an issue in practice we can do additional mitigation. The transaction commit path no longer has to explicitly check if the write buffer is full and wait on flushing; this is another performance optimization. Instead, when the btree write buffer is close to full we change the journal watermark, so that only reservations for journal reclaim are allowed. Signed-off-by: Kent Overstreet commit b05c0e9370bec71c62df690250f451e58e8ed2a4 Author: Kent Overstreet Date: Thu Nov 2 21:06:52 2023 -0400 bcachefs: journal->buf_lock Add a new lock for synchronizing between journal IO path and btree write buffer flush. Signed-off-by: Kent Overstreet commit 0ba9375a111a88e47733b679f6affb7f6492de4c Author: Kent Overstreet Date: Tue Nov 7 18:08:38 2023 -0500 bcachefs: Unwritten journal buffers are always dirty Ensure that journal bufs that haven't been written can't be reclaimed from the journal pin fifo, and can thus have new pins taken. Prep work for changing the btree write buffer to pull keys from the journal directly. Signed-off-by: Kent Overstreet commit f33600057f50d3dea5cb3bda05c21ecce7125282 Author: Kent Overstreet Date: Sun Dec 10 17:44:04 2023 -0500 bcachefs: bch2_trans_node_add no longer uses trans_for_each_path() In the future we'll be making trans->paths resizable and potentially having _many_ more paths (for fsck); we need to start fixing algorithms that walk each path in a transaction where possible. Signed-off-by: Kent Overstreet commit 24de63dacbffbfa069b44a1da1750eb5382275e7 Author: Kent Overstreet Date: Sun Dec 10 16:48:22 2023 -0500 bcachefs: Improve trans->extra_journal_entries Instead of using a darray, we now allocate journal entries for the transaction commit path with our normal bump allocator - with an inlined fastpath, and using btree_transaction_stats to remember how much to initially allocate so as to avoid transaction restarts. This is prep work for converting write buffer updates to use this mechanism. Signed-off-by: Kent Overstreet commit e4e49375a8e4d9c9b65e79070ef6cff2433a7d5f Author: Kent Overstreet Date: Sun Dec 10 17:52:58 2023 -0500 bcachefs; kill bch2_btree_key_cache_flush() Signed-off-by: Kent Overstreet commit a83b6c895c4d91014c73569f13b071d44e16cdc3 Author: Kent Overstreet Date: Sun Dec 10 16:12:24 2023 -0500 bcachefs: kill btree_path->(alloc_seq|downgrade_seq) These were for extra info in tracepoints for debugging a specialized issue - we do not want to bloat btree_path for this, at least in release builds. Signed-off-by: Kent Overstreet commit 249bf593e84e0b4652d2cdb9884b97bc21b59d9f Author: Kent Overstreet Date: Sun Dec 10 12:42:49 2023 -0500 bcachefs: Fix snapshot.c assertion for online fsck c->curr_recovery_pass can go backwards; this adds a non rewinding version, c->recovery_pass_done. Signed-off-by: Kent Overstreet commit b56cee70e75e2edcbb92eb3d9357fae5df857b01 Author: Randy Dunlap Date: Sat Dec 9 22:06:44 2023 -0800 bcachefs: six lock: fix typos Fix a few typos in the six.h header file. Signed-off-by: Randy Dunlap Cc: Kent Overstreet Cc: Brian Foster Cc: linux-bcachefs@vger.kernel.org Signed-off-by: Kent Overstreet commit f8fd5871becf3beb7dff84c4608140a8c571c9a9 Author: Kent Overstreet Date: Thu Dec 7 13:11:44 2023 -0500 bcachefs: reserve path idx 0 for sentinal Signed-off-by: Kent Overstreet commit 5028b9078ccb02ead012056dcbcc4f27f963b212 Author: Kent Overstreet Date: Thu Dec 7 23:33:11 2023 -0500 bcachefs: Rename for_each_btree_key2() -> for_each_btree_key() Signed-off-by: Kent Overstreet commit 27b2df982fa3343552e8a98a744581da69064207 Author: Kent Overstreet Date: Thu Dec 7 23:28:26 2023 -0500 bcachefs: Kill for_each_btree_key() for_each_btree_key() handles transaction restarts, like for_each_btree_key2(), but only calls bch2_trans_begin() after a transaction restart - for_each_btree_key2() wraps every loop iteration in a transaction. The for_each_btree_key() behaviour is problematic when it leads to holding the SRCU lock that prevents key cache reclaim for an unbounded amount of time - there's no real need to keep it around. Signed-off-by: Kent Overstreet commit 8c066edeb43b067badac984b6a0493d07d15c00a Author: Kent Overstreet Date: Fri Dec 8 00:10:25 2023 -0500 bcachefs: continue now works in for_each_btree_key2() continue now works as in any other loop Signed-off-by: Kent Overstreet commit be1fa63de867aa26f2f57e6f5db2a358f6da5ad1 Author: Kent Overstreet Date: Thu Dec 7 23:50:38 2023 -0500 bcachefs: Fix bch2_read_btree() In the debugfs code, we had an incorrect use of drop_locks_do(); on transaction restart we don't want to restart the current loop iteration, since we've already emitted the current key to the buffer for userspace. Signed-off-by: Kent Overstreet commit a0acc24fedbe067b30f4320daa8d63b404f6ccd9 Author: Kent Overstreet Date: Wed Dec 6 17:53:59 2023 -0500 bcachefs: Fix open coded set_btree_iter_dontneed() Signed-off-by: Kent Overstreet commit 267b801fda10b70eca4001a819fcac07f023df6b Author: Kent Overstreet Date: Mon Dec 4 13:45:33 2023 -0500 bcachefs: BCH_IOCTL_FSCK_ONLINE This adds a new ioctl for running fsck on a mounted, in use filesystem. This reuses the fsck_thread code from the previous patch for running fsck on an offline, unmounted filesystem, so that log messages for the fsck thread are redirected to userspace. Only one running fsck instance is allowed at a time; a new semaphore (since the lock will be taken by one thread and released by another) is added for this. Signed-off-by: Kent Overstreet commit 8408fa570ef9b8c35720369bad6b13828ae6b001 Author: Kent Overstreet Date: Tue Jul 11 23:23:40 2023 -0400 bcachefs: BCH_IOCTL_FSCK_OFFLINE This adds a new ioctl for running fsck on a list of devices. Normally, if we wish to use the kernel's implementation of fsck we'd run it at mount time with -o fsck. This ioctl lets us run fsck without mounting, so that userspace bcachefs-tools can transparently switch to the kernel's implementation of fsck when appropriate - primarily if the kernel version of bcachefs better matches the filesystem on disk. Signed-off-by: Kent Overstreet commit 7f391b2f8edc29a63913b6a2d42ea8cbb5a36ee8 Author: Kent Overstreet Date: Wed Dec 6 14:36:18 2023 -0500 bcachefs: bch2_run_online_recovery_passes() Add a new helper for running online recovery passes - i.e. online fsck. This is a subset of our normal recovery passes, and does not - for now - use or follow c->curr_recovery_pass. Signed-off-by: Kent Overstreet commit 0953450af79e9e814f64b89464e78237ceeccf54 Author: Kent Overstreet Date: Wed Dec 6 14:24:26 2023 -0500 bcachefs: Mark recovery passses that are safe to run online Online fsck is coming, and many of our recovery/fsck passes are already safe to run while the filesystem is in use - mark which ones. Signed-off-by: Kent Overstreet commit 2b41226d7f4b3b836a2a3e4ce08ab18ba03f0cd0 Author: Kent Overstreet Date: Mon Dec 4 20:15:23 2023 -0500 bcachefs: Add ability to redirect log output Upcoming patches are going to add two new ioctls for running fsck in the kernel, but pretending that we're running our normal userspace fsck. This patch adds some plumbing for redirecting our normal log messages away from the dmesg log to a thread_with_file file descriptor - via a struct log_output, which will be consumed by the fsck f_op's read method. The new ioctls will allow for running fsck in the kernel against an offline filesystem (without mounting it), and an online filesystem. For an offline filesystem we need a way to pass in a pointer to the log_output, which is done via a new hidden opts.h option. For online fsck, we can set c->output directly, but only want to redirect log messages from the thread running fsck - hence the new c->output_filter method. Signed-off-by: Kent Overstreet commit bbefcd910d9f992db2d8ba4b8f96a77d8fb131d7 Author: Kent Overstreet Date: Wed Jul 12 00:20:22 2023 -0400 bcachefs: thread_with_file Abstract out a new helper from the data job code, for connecting a kthread to a file descriptor. Signed-off-by: Kent Overstreet commit 63508b756443cb38e432dea01fec36248cb25cd7 Author: Kent Overstreet Date: Wed Dec 6 16:26:18 2023 -0500 bcachefs: c->ro_ref Add a new refcount for async ops that don't necessarily need the fs to be RW, with similar lifetime/rules otherwise as c->writes. To be used by online fsck. Signed-off-by: Kent Overstreet commit 483dea4431240dbd6503dc1b2801e391068ba737 Author: Kent Overstreet Date: Tue Dec 5 15:22:25 2023 -0500 bcachefs: Improve error message when finding wrong btree node single_device.merge_torture_flakey is, very rarely, finding a btree node that doesn't match the key that points to it: this patch improves the error message to print out more fields from the btree node header, so that we can see what else does or does not match the key. Signed-off-by: Kent Overstreet commit 5a11b5fe79e9f781db8aec6222d03dc92e2978d9 Author: Brian Foster Date: Tue Dec 5 08:24:39 2023 -0500 bcachefs: return from fsync on writeback error to avoid early shutdown When investigating transient failures of generic/441 on bcachefs, it was determined that the cause of the failure was a combination of unconditional emergency shutdown and racing between background journal activity and the test switchover from a working device mapper table to an error injecting table. Part of the reason for this sequence of events is that bcachefs aggressively flushes as much as possible during fsync(), regardless of errors. While this is reasonable behavior, it is technically unnecessary because once an error is returned from fsync(), the caller cannot make any assumptions about the resilience of data. Tweak the bch2_fsync() logic to return an error on failure of any of the steps involved in the flush. Note that this change alone does not prevent generic/441 failure, but in combination with a test tweak to avoid racing during the dm-error table switchover it avoids the unnecessary shutdowns and allows the test to pass reliably on bcachefs. Signed-off-by: Brian Foster Signed-off-by: Kent Overstreet commit 56ec287d30ba2f8dec70b642e9b2c108116cbfd9 Author: Kent Overstreet Date: Mon Dec 4 13:03:24 2023 -0500 bcachefs: BCH_ERR_opt_parse_error Continuing the project of replacing generic error codes with more specific ones. Signed-off-by: Kent Overstreet commit 6e92d15546944d9e2af8e7248a3a399dbd6fce0e Author: Kent Overstreet Date: Mon Dec 4 00:20:42 2023 -0500 bcachefs: Refactor trans->paths_allocated to be standard bitmap Signed-off-by: Kent Overstreet commit 0d963a635d20a3a48e5a1b12e91925f868f5f9de Author: Kent Overstreet Date: Sun Dec 3 15:54:45 2023 -0500 bcachefs: Move reflink_p triggers into reflink.c Signed-off-by: Kent Overstreet commit d4e4d8b98b839e1b384d5b58982888b3af1beb84 Author: Richard Davies Date: Sun Dec 3 14:10:27 2023 +0000 bcachefs: Remove obsolete comment about zstd Remove obsolete comment about zstd, since approach changed during development of commit bbc3a46065d08f9ab3412b1f26bbfa778c444833 Signed-off-by: Richard Davies Signed-off-by: Kent Overstreet commit a564c9fad581972a4bf02d598ec3ad3f53dcbae2 Author: Kent Overstreet Date: Sat Dec 2 03:36:27 2023 -0500 bcachefs: Include btree_trans in more tracepoints This gives us more context information - e.g. which codepath is invoking btree node reads. Signed-off-by: Kent Overstreet commit d9e14a4eb9902bac1e6fb779eb6c41629652cbd8 Author: Brian Foster Date: Thu Nov 30 14:17:11 2023 -0500 bcachefs: remove sb lock and flags update on explicit shutdown bcachefs grabs s_umount and sets SB_RDONLY when the fs is shutdown via the ioctl() interface. This has a couple issues related to interactions between shutdown and freeze: 1. The flags == FSOP_GOING_FLAGS_DEFAULT case is a deadlock vector because freeze_bdev() calls into freeze_super(), which also acquires s_umount. 2. If an explicit shutdown occurs while the sb is frozen, SB_RDONLY alters the thaw path as if the sb was read-only at freeze time. This effectively leaks the frozen state and leaves the sb frozen indefinitely. The usage of SB_RDONLY here goes back to the initial bcachefs commit and AFAICT is simply historical behavior. This behavior is unique to bcachefs relative to the handful of other filesystems that support the shutdown ioctl(). Typically, SB_RDONLY is reserved for the proper remount path, which itself is restricted from modifying frozen superblocks in reconfigure_super(). Drop the unnecessary sb lock and flags update bch2_ioc_goingdown() to address both of these issues. Signed-off-by: Brian Foster Signed-off-by: Kent Overstreet commit a56c61714a2d2e548f5c3792130149159e0657ed Author: Kent Overstreet Date: Thu Nov 30 02:16:19 2023 -0500 bcachefs: Make backpointer fsck wb flush check more rigorous backpointers fsck now always runs in rw mode - the btree is being modified while it runs, by e.g. copygc, rebalance, the discard worker, the invalidate worker. We could find a missing backpointer, flush the btree write buffer, and then on the next iteration find a new key at the exact same position - which will most likely need another write buffer flush. Hence, we have to check for an exact match on last_flushed, not just the pos. Signed-off-by: Kent Overstreet commit 0f64a6daaa4852db735a2df754b37d187f5480d1 Author: Kent Overstreet Date: Thu Nov 30 02:11:15 2023 -0500 bcachefs: On missing backpointer to interior node, flush interior updates Signed-off-by: Kent Overstreet commit 21e07cc966aab2400144f08eb85cb7f42df923ad Author: Daniel Hill Date: Mon Nov 27 21:52:33 2023 +1300 bcachefs: remove redundant condition from data_update_index_update Signed-off-by: Daniel Hill Signed-off-by: Kent Overstreet commit a79e1b6dea0b98a66dc0d05fd8e470c18b164b52 Author: Daniel Hill Date: Mon Nov 27 23:37:44 2023 +1300 bcachefs: copygc shouldn't try moving buckets on error Co-developed-by: Kent Overstreet Signed-off-by: Daniel Hill Signed-off-by: Kent Overstreet commit 3f0e297d8677c0f4465225ecb6d30d0edbc6e519 Author: Kent Overstreet Date: Tue Nov 28 16:36:54 2023 -0500 bcachefs: Explicity go RW for fsck This eliminates a lot of BCH_TRANS_COMMIT_lazy_rw flags, and is less error prone. Signed-off-by: Kent Overstreet commit 3ec3758a814840619ceb3446a37501cfca29bdae Author: Daniel Hill Date: Tue Nov 28 19:24:47 2023 +1300 bcachefs: copygc should wakeup on shutdown if disabled Signed-off-by: Daniel Hill Signed-off-by: Kent Overstreet commit 0c069781ddfa4e31c169a8eced1ee90b8929d522 Author: Daniel Hill Date: Sun Nov 26 19:33:31 2023 +1300 bcachefs: rebalance should wakeup on shutdown if disabled Signed-off-by: Daniel Hill Signed-off-by: Kent Overstreet commit 74529338805d514a07ba4e6feb25997c4be3bddd Author: Daniel Hill Date: Sun Nov 26 20:26:07 2023 +1300 bcachefs: remove dead bch2_evacuate_bucket() Signed-off-by: Daniel Hill Signed-off-by: Kent Overstreet commit 62286a08c3f352d2c19c08da3b2a5b9d23f34d61 Author: Gustavo A. R. Silva Date: Tue Nov 28 12:22:55 2023 -0600 bcachefs: Replace zero-length arrays with flexible-array members Fake flexible arrays (zero-length and one-element arrays) are deprecated, and should be replaced by flexible-array members. So, replace zero-length arrays with flexible-array members in multiple structures. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kent Overstreet commit 8a4b4c52c0031f7f40261e41d66922a1049f0407 Author: Kent Overstreet Date: Sun Nov 26 22:06:48 2023 -0500 bcachefs: more write buffer refactoring prep work for big rewrite - no functional changes in this patch. Signed-off-by: Kent Overstreet commit ab4fb4b678c37837c6ba4e7a89f1afea4671a3ff Author: Kent Overstreet Date: Sun Nov 26 21:58:11 2023 -0500 bcachefs: wb_flush_one_slowpath() A bit of refactoring for better inlining in the main btree write buffer flush path. Signed-off-by: Kent Overstreet commit 48dade81760ed551898ec20f59ace7ac2f5620b3 Author: Kent Overstreet Date: Tue Nov 28 19:47:26 2023 -0500 bcachefs: ONLY_SPECIFIED_DEVS doesn't mean ignore durability anymore Signed-off-by: Kent Overstreet commit a276132c2d2bc4baaa9bcfd86419885bd9b8567e Author: Kent Overstreet Date: Tue Nov 28 16:30:45 2023 -0500 bcachefs: Don't open code bch2_dev_exists2() Signed-off-by: Kent Overstreet commit 3398124444b90079a09374ab10444cd937b72ae1 Author: Kent Overstreet Date: Fri May 26 16:59:07 2023 -0400 bcachefs: Improve trace_trans_restart_would_deadlock In the CI, we're seeing tests failing due to excessive would_deadlock transaction restarts - the tracepoint now includes the lock cycle that occured. Signed-off-by: Kent Overstreet commit e153a0d70b31b605282e2dd16c5fb924f79f5e93 Author: Kent Overstreet Date: Sun Nov 26 17:02:06 2023 -0500 bcachefs: Improve trace_trans_restart_too_many_iters() We now include the list of paths in use. Signed-off-by: Kent Overstreet commit 74644030098a0c4932e194fa1b2fa052226f3868 Author: Kent Overstreet Date: Mon Nov 27 22:37:27 2023 -0500 bcachefs: count_event() Small helper for event counters. Signed-off-by: Kent Overstreet commit cb13f471390ce646a3d5aa9c599f7eec43ddb2ac Author: Kent Overstreet Date: Thu Nov 2 20:36:00 2023 -0400 bcachefs: bch2_btree_write_buffer_flush() -> bch2_btree_write_buffer_tryflush() More accurate naming. Signed-off-by: Kent Overstreet commit d3083cf28d54991c299d5c05790e40e52cf75df0 Author: Kent Overstreet Date: Thu Nov 2 20:32:19 2023 -0400 bcachefs: bch2_btree_write_buffer_flush_locked() Minor refactoring - improved naming, and move the responsibility for flush_lock to the caller instead of having it be shared. Signed-off-by: Kent Overstreet commit 183bcc89b855c412bfefa545b799006d66f689a6 Author: Kent Overstreet Date: Thu Nov 2 19:37:15 2023 -0400 bcachefs: Clean up btree write buffer write ref handling __bch2_btree_write_buffer_flush() now assumes a write ref is already held (as called by the transaction commit path); and the wrappers bch2_write_buffer_flush() and flush_sync() take an explicit write ref. This means internally the write buffer code can always use BTREE_INSERT_NOCHECK_RW, instead of in the previous code passing flags around and hoping the NOCHECK_RW flag was always carried around correctly. Signed-off-by: Kent Overstreet commit cf5bacb6a5213cd7f59c1dbf11531ff96445027a Author: Kent Overstreet Date: Mon Nov 27 01:46:18 2023 -0500 bcachefs: delete useless commit_do() Signed-off-by: Kent Overstreet commit 8ab3fa96396955bc7a0669f81007e2dbfe1e7da0 Author: Kent Overstreet Date: Mon Nov 27 01:42:42 2023 -0500 bcachefs: kill journal->preres_wait Signed-off-by: Kent Overstreet commit 56db2429511e14291bdb0105899e02f074885d4d Author: Kent Overstreet Date: Thu Nov 2 22:31:16 2023 -0400 bcachefs: Improve btree write buffer tracepoints - add a tracepoint for write_buffer_flush_sync; this is expensive - fix the write_buffer_flush_slowpath tracepoint Signed-off-by: Kent Overstreet commit c259bd95d1df6a95d6a78b7f6ebc69c8d172126f Author: Kent Overstreet Date: Sun Nov 26 20:18:16 2023 -0500 bcachefs: No need to allocate keys for write buffer Signed-off-by: Kent Overstreet commit 3c471b65889aa22d6ba4f8e3d2e5006bb70fdb58 Author: Kent Overstreet Date: Sun Nov 26 17:05:02 2023 -0500 bcachefs: convert bch_fs_flags to x-macro Now we can print out filesystem flags in sysfs, useful for debugging various "what's my filesystem doing" issues. Signed-off-by: Kent Overstreet commit 9e243d3cdac173111def205674813af973ead393 Author: Kent Overstreet Date: Sat Nov 25 22:39:21 2023 -0500 bcachefs: Kill journal_seq/gc args to bch2_dev_usage_update_m() This is only used by gc (fsck). Signed-off-by: Kent Overstreet commit 3f59547e22b9dc3eecca3407528df8b950f4e1c2 Author: Kent Overstreet Date: Sat Nov 25 15:46:02 2023 -0500 bcachefs: Refactor bch2_check_alloc_to_lru_ref() This code was somewhat convoluted - because originally bch2_lru_set() could modify the LRU index if there was a collision. That's no longer the case, so the "create LRU entry" path has no reason to update the alloc key, so we can separate the handling of the two fsck errors. Signed-off-by: Kent Overstreet commit 25d1e39df0e28494f1e82c68a3967c84dca009b3 Author: Kent Overstreet Date: Fri Nov 24 21:52:17 2023 -0500 bcachefs: Add a rebalance, data_update tracepoints Add a tracepoint for rebalance, printing out - the target option - the compression option - the key being rebalanced Signed-off-by: Kent Overstreet commit d05db12715c989c36e81737a737418af9e6232d1 Author: Kent Overstreet Date: Sat Nov 25 00:05:30 2023 -0500 bcachefs: Print durability in member_to_text() Signed-off-by: Kent Overstreet commit 7541787f58d19b4fab4368681d4ef4ed8f0dbd61 Author: Kent Overstreet Date: Fri Nov 24 23:40:08 2023 -0500 bcachefs: Improve sysfs compression_stats Break it out by compression type, and include average extent size. Also, format into a nice table. Signed-off-by: Kent Overstreet commit 9b34f02cdcc1000b0147d5751349a3ac1b697590 Author: Kent Overstreet Date: Thu Nov 23 18:43:23 2023 -0500 bcachefs: Kill dev_usage->buckets_ec This counter is redundant; it's simply the sum of BCH_DATA_stripe and BCH_DATA_parity buckets. Signed-off-by: Kent Overstreet commit ed0cd515cd8adb052881b371dd3f80cca5995174 Author: Kent Overstreet Date: Thu Nov 23 18:25:31 2023 -0500 bcachefs: bch2_dev_usage_to_text() Signed-off-by: Kent Overstreet commit dafff7e57508e87b473d91bac3e38181e2b829f2 Author: Kent Overstreet Date: Thu Nov 23 18:05:18 2023 -0500 bcachefs: New bucket sector count helpers This introduces bch2_bucket_sectors() and bch2_bucket_sectors_dirty(), prep work for separately accounting stripe sectors. Signed-off-by: Kent Overstreet commit e6674decb2195999ae9fe074bf048ba91e336144 Author: Kent Overstreet Date: Thu Nov 23 19:26:27 2023 -0500 bcachefs: BCH_IOCTL_DEV_USAGE_V2 BCH_IOCTL_DEV_USAGE mistakenly put the per-data-type array in struct bch_ioctl_dev_usage; since ioctl numbers encode the size of the arg, that means adding new data types breaks the ioctl. This adds a new version that includes the number of data types as a parameter: the old version is fixed at 10 so as to not break when adding new types. Signed-off-by: Kent Overstreet commit 3b05b8e08292eafec277e8780d79b2a2d8584af2 Author: Kent Overstreet Date: Thu Nov 23 17:17:38 2023 -0500 bcachefs: Simplify check_bucket_ref() We only need the sector count being modified. Signed-off-by: Kent Overstreet commit 011173321f6fb36f47c3aaaf04218bf758b29e17 Author: Kent Overstreet Date: Mon Oct 30 21:03:32 2023 -0400 bcachefs: six locks: Simplify optimistic spinning osq lock maintainers don't want it to be used outside of kernel/locking/ - but, we can do better. Since we have lock handoff signalled via waitlist entries, there's no reason for optimistic spinning to have to look at the lock at all - aside from checking lock-owner; we can just spin looking at our waitlist entry. Signed-off-by: Kent Overstreet commit ee841b77b3bfc3443112b1be53ca23d522b82333 Author: Kent Overstreet Date: Wed Sep 13 19:59:03 2023 -0400 powerpc: Export kvm_guest static key, for bcachefs six locks bcachefs's six locks need kvm_guest, via ower_on_cpu() -> vcpu_is_preempted() -> is_kvm_guest() Signed-off-by: Kent Overstreet Cc: linuxppc-dev@lists.ozlabs.org Acked-by: Michael Ellerman (powerpc) commit ba11c7d67a53b88d8605d7cf14942a59ae5632c0 Author: Kent Overstreet Date: Mon Nov 20 19:12:40 2023 -0500 bcachefs: BCH_DATA_OP_drop_extra_replicas Signed-off-by: Kent Overstreet commit 3c843a67595187d53f1610ff3ff44130b3247842 Author: Kent Overstreet Date: Mon Nov 20 18:52:33 2023 -0500 bcachefs: Convert bch2_move_btree() to bbpos Minor cleanup. Signed-off-by: Kent Overstreet commit 01e9564540d7e264147e3ee380e85cfa875ef48f Author: Kent Overstreet Date: Mon Nov 20 18:43:48 2023 -0500 bcachefs: x-macro-ify bch_data_ops enum This will let us add an enum -> string table for a to_text() fn. Signed-off-by: Kent Overstreet commit 225879f403c6196624f0ed5c118b2cdd7de02e64 Author: Yang Li Date: Tue Nov 21 09:05:15 2023 +0800 bcachefs: clean up one inconsistent indenting fs/bcachefs/journal_io.c:1843 bch2_journal_write_pick_flush() warn: inconsistent indenting Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7585 Signed-off-by: Yang Li Signed-off-by: Kent Overstreet commit 2b161cc7cb077e9f8479f1aa132c78c37ce845cd Author: Daniel Hill Date: Mon Nov 20 09:53:36 2023 +1300 bcachefs: add a quieter bch2_read_super If we're looking for a bcachefs supers iteratively we don't want to see this error. This function replaces KERN_ERR with KERN_INFO for when we don't find a bcachefs superblock but preserves other errors. Signed-off-by: Daniel Hill Signed-off-by: Kent Overstreet commit 25f64e997e4bd864b4426ba40b3a48d276665fea Author: Kent Overstreet Date: Sat Nov 11 17:40:45 2023 -0500 bcachefs: Don't use update_cached_sectors() in bch2_mark_alloc() bch2_update_cached_sectors_list() is closer to how the new disk space accounting works, called from trans_mark(). Signed-off-by: Kent Overstreet commit 086a52f7fa9d7dd0755a93c368f51253ea0852c8 Author: Kent Overstreet Date: Thu Nov 9 13:52:35 2023 -0500 bcachefs: Rename bch_replicas_entry -> bch_replicas_entry_v1 Prep work for introducing bch_replicas_entry_v2 Signed-off-by: Kent Overstreet commit ad9c7992eb9906caf17aa88f1fd41770879d1cb6 Author: Kent Overstreet Date: Fri Nov 17 18:38:09 2023 -0500 bcachefs: Kill btree_iter->journal_pos For BTREE_ITER_WITH_JOURNAL, we memoize lookups in the journal keys, to avoid the binary search overhead. Previously we stashed the pos of the last key returned from the journal, in order to force the lookup to be redone when rewinding. Now bch2_journal_keys_peek_upto() handles rewinding itself when necessary - so we can slim down btree_iter. Signed-off-by: Kent Overstreet commit 1ae8a0904a6a7b16ee2ffa30153d4e5c38719321 Author: Kent Overstreet Date: Thu Nov 16 22:35:29 2023 -0500 bcachefs: Kill memset() in bch2_btree_iter_init() Signed-off-by: Kent Overstreet commit ae0e61175e22b77267c2c59d0061925a0a604074 Author: Kent Overstreet Date: Thu Nov 16 20:41:10 2023 -0500 bcachefs: Add a tracepoint for journal entry close Signed-off-by: Kent Overstreet commit b27d7afb791715f4017f94c58168676c76398986 Author: Kent Overstreet Date: Thu Nov 9 23:43:35 2023 -0500 bcachefs: Don't flush journal after replay The flush_all_pins() after journal replay was unecessary, and trying to completely flush the journal while RW is not a great idea - it's not guaranteed to terminate if other threads keep adding things to the jorunal. Signed-off-by: Kent Overstreet commit b4b79b076445308389781a94934f411cb3e79c79 Author: Kent Overstreet Date: Mon Nov 13 21:12:35 2023 -0500 bcachefs: Don't rejournal keys in key cache flush Signed-off-by: Kent Overstreet commit 5fd24caf572db0d1ccb03d3132fa1e249e84dd8b Author: Kent Overstreet Date: Mon Nov 13 19:55:09 2023 -0500 bcachefs: Fix userspace bch2_prt_datetime() ctime_r() outputs a newline, which we don't want. Signed-off-by: Kent Overstreet commit e56978c80d86523e90c8fb4a23dfca9db5f60bf7 Author: Kent Overstreet Date: Sun Nov 12 20:35:51 2023 -0500 bcachefs: Kill BTREE_ITER_ALL_LEVELS As discussed in the previous patch, BTREE_ITER_ALL_LEVELS appears to be racy with concurrent interior node updates - and perhaps it is fixable, but it's tricky and unnecessary. Signed-off-by: Kent Overstreet commit cd404e5b05eb40f3ff27ab9d796f41f0a3b5a2c4 Author: Kent Overstreet Date: Sun Nov 12 20:20:35 2023 -0500 bcachefs: backpointers fsck no longer uses BTREE_ITER_ALL_LEVELS It appears that BTREE_ITER_ALL_LEVELS is racy with concurrent interior node btree updates; unfortunate but not terribly surprising it's a difficult problem - that was the original reason for gc_lock. BTREE_ITER_ALL_LEVELS will probably be deleted in a subsequent patch, this changes backpointers fsck to instead walk keys at one level of the btree at a time. This fixes the tiering_drop_alloc test, which stopped working with the patch to not flush the journal after journal replay. Signed-off-by: Kent Overstreet commit eb54e81f27b56ba101e277029b153a7c892317f1 Author: Kent Overstreet Date: Sun Nov 12 21:47:15 2023 -0500 bcachefs: Improve btree_path_dowgrade tracepoint Signed-off-by: Kent Overstreet commit cb52d23e77a6e5e9588962ba7e283b0d0d2c1976 Author: Kent Overstreet Date: Sat Nov 11 16:31:50 2023 -0500 bcachefs: Rename BTREE_INSERT flags BTREE_INSERT flags are actually transaction commit flags - rename them for clarity. Signed-off-by: Kent Overstreet commit 5927310dcfc9360ca7f8366b468ad52681bf5a27 Author: Kent Overstreet Date: Sat Nov 11 16:31:50 2023 -0500 bcachefs: bch_str_hash_flags_t Create a separate enum for str_hash flags - instead of abusing the btree_insert_flags enum - and create a __bitwise typedef for sparse typechecking. Signed-off-by: Kent Overstreet commit aa62aabbc7ab758138df4ffed59fdf8324839d4a Author: Kent Overstreet Date: Sat Nov 11 16:20:58 2023 -0500 bcachefs: Kill dead BTREE_INSERT flags BTREE_INSERT_NOWAIT and BTREE_INSERT_GC_LOCK_HELD are no longer used, and can be deleted. Signed-off-by: Kent Overstreet commit cd5bd1628284f874ad6180be1f67e9b6739cc02a Author: Kent Overstreet Date: Sat Nov 11 16:02:15 2023 -0500 bcachefs: Fix redundant variable initialization path->level was being read, but never used. Reported-by: Colin Ian King Signed-off-by: Kent Overstreet commit e17b93eb36729c7f889264ebe7e46817a8253560 Author: Kent Overstreet Date: Tue Nov 7 10:42:53 2023 -0500 bcachefs: Avoiding dropping/retaking write locks in bch2_btree_write_buffer_flush_one() Signed-off-by: Kent Overstreet commit 573224301c56ae6c169b77cc003be7690da70b9b Author: Kent Overstreet Date: Thu Nov 9 21:02:58 2023 -0500 bcachefs: Make journal replay more efficient Journal replay now first attempts to replay keys in sorted order, similar to how the btree write buffer flush path works. Any keys that can not be replayed due to journal deadlock are then left for later and replayed in journal order, unpinning journal entries as we go. Signed-off-by: Kent Overstreet commit bdde9829de1ef3c98edd872c6f181de9fe610cf6 Author: Kent Overstreet Date: Thu Nov 9 20:41:58 2023 -0500 bcachefs: Go rw before journal replay This gets us slightly nicer log messages. Also, this slightly clarifies synchronization of c->journal_keys; after we go RW it's in use by multiple threads (so that the btree iterator code can overlay keys from the journal); so it has to be prepped before that point. Signed-off-by: Kent Overstreet commit 43c7ede0095d7020ca03113b2fde84b00dd5cd49 Author: Kent Overstreet Date: Wed Nov 8 22:04:29 2023 -0500 bcachefs: Kill BTREE_UPDATE_PREJOURNAL With the previous patch that reworks BTREE_INSERT_JOURNAL_REPLAY, we can now switch the btree write buffer to use it for flushing. This has the advantage that transaction commits don't need to take a journal reservation at all. Signed-off-by: Kent Overstreet commit 9a71de675f97acafdcda7bf4ce4ba10247c1db00 Author: Kent Overstreet Date: Wed Nov 8 22:00:00 2023 -0500 bcachefs: BTREE_INSERT_JOURNAL_REPLAY now "don't init trans->journal_res" This slightly changes how trans->journal_res works, in preparation for changing the btree write buffer flush path to use it. Now, BTREE_INSERT_JOURNAL_REPLAY means "don't take a journal reservation; trans->journal_res.seq already refers to the journal sequence number to pin". Signed-off-by: Kent Overstreet commit 389c92b36e302d866c2850e70560667ac4a826c6 Author: Kent Overstreet Date: Tue Nov 7 11:16:14 2023 -0500 bcachefs: Clear k->needs_whitout earlier in commit path The upcoming btree write buffer rework is going to use the journal itself as the first stage of the write buffer; this is a cleanup to make sure k->needs_whiteout is initialized before keys hit the journal. Signed-off-by: Kent Overstreet commit 066a26460bb209d987a138519fc32b3806c1288a Author: Kent Overstreet Date: Thu Nov 9 22:07:42 2023 -0500 bcachefs: track_event_change() This introduces a new helper for connecting time_stats to state changes, i.e. when taking journal reservations is blocked for some reason. We use this to track separately the different reasons the journal might be blocked - i.e. space in the journal full, or the journal pin fifo full. Also do some cleanup and improvements on the time stats code. Signed-off-by: Kent Overstreet commit 3eedfe1af9beb6c65eca1080298086e6e0031428 Author: Kent Overstreet Date: Thu Nov 9 13:19:00 2023 -0500 bcachefs: Journal pins must always have a flush_fn flush_fn is how we identify journal pins in debugfs - this is a debugging aid. Signed-off-by: Kent Overstreet commit df8e13ccf3c0cc2b16e931f71ef69834db71eda9 Author: Kent Overstreet Date: Tue Nov 7 12:32:50 2023 -0500 bcachefs: Add an assertion in bch2_journal_pin_set() Previously, bch2_journal_pin_set() would silently ignore a request to pin a journal sequence number that was no longer dirty, because it was used internally by bch2_journal_pin_copy() which could race with the src pin being flushed. Split these apart so that we can properly assert that @seq is a currently dirty journal sequence number - this is almost always a bug. Signed-off-by: Kent Overstreet commit fa5df9e7d5a85507cc01f32815854993983c1ff5 Author: Kent Overstreet Date: Wed Nov 8 16:51:06 2023 -0500 bcachefs: Include average write size in sysfs journal_debug Signed-off-by: Kent Overstreet commit 09e0153b72bfba618e6ceedb5dd883cdeed911af Author: Kent Overstreet Date: Thu Nov 23 20:05:45 2023 -0500 bcachefs: Fix warning when building in userspace bch_err() doesn't reference the fs arg in userspace Signed-off-by: Kent Overstreet commit fbf9270817249bb00044de74587155f307d1003f Author: Kent Overstreet Date: Thu Nov 16 21:40:58 2023 -0500 bcachefs: Print old version when scanning for old metadata Also: we should be using bch2_fs_read_write_early() Signed-off-by: Kent Overstreet commit 7d9ae04e3987648b99b9ac8036178a75fb913dd6 Author: Kent Overstreet Date: Thu Nov 16 17:28:16 2023 -0500 bcachefs: Fix locking when checking freespace btree On transaction restart, we weren't re-validating the hole we saw. Signed-off-by: Kent Overstreet commit 359d1bad1b5cc047e26d8fefa0b368df89f53acb Author: Kent Overstreet Date: Thu Nov 16 17:24:54 2023 -0500 bcachefs: Check for unlinked inodes not on deleted list Signed-off-by: Kent Overstreet commit ecf8a74dab1db2d3d208ad08e4104ebdc734911b Author: Kent Overstreet Date: Thu Nov 16 15:46:50 2023 -0500 bcachefs: kill INODE_LOCK, use lock_two_nondirectories() In an ideal world, we'd have a common helper that could be used for sorting a list of inodes into the correct lock order, and then the same lock ordering could be used for any type of inode lock, not just i_rwsem. But the lock ordering rules for i_rwsem are a bit complicated, so - abandon that dream for now and do it the more standard way. Signed-off-by: Kent Overstreet commit 8b58623f5b911feacee2e55b6e378b2e0858e677 Author: Kent Overstreet Date: Mon Nov 13 21:24:24 2023 -0500 bcachefs: Improved backpointer messages in fsck When we have a key to print, we should print it. Signed-off-by: Kent Overstreet commit e7f7ddedd67d4abc1ed24dbf33816f2b0a953c02 Author: Kent Overstreet Date: Wed Nov 22 18:30:43 2023 -0500 bcachefs: Add extra verbose logging for ro path Also log time waiting for c->writes references to be dropped; this will help in debugging why unmounts are taking longer than they should. Signed-off-by: Kent Overstreet commit 30418de09e6bda5478a6cfb7c1a54e128b7e2a22 Author: Kent Overstreet Date: Mon Nov 13 19:57:09 2023 -0500 bcachefs: Flush fsck errors before running twice It's confusing if we run fsck a second time (in debug mode, to verify the second run is clean), but errors are still ratelimited from the first run. Signed-off-by: Kent Overstreet commit abcbd3bfbbfe97a8912d0c929d4aa18f50d9bc52 Author: David Howells Date: Fri Nov 17 09:20:28 2023 +0000 afs: trace: Log afs_make_call(), including server address Add a tracepoint to log calls to afs_make_call(), including the destination server address. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 28f4c58045ede40c44d331b9a6c9a6a41eb8e9a9 Author: David Howells Date: Thu Nov 9 12:06:49 2023 +0000 afs: Fix offline and busy message emission The current code assumes that offline and busy volume states apply to all instances of a volume, not just the one on the server that returned VOFFLINE or VBUSY and will emit a notice to dmesg suggesting that the entire volume is unavailable. Fix that by moving the flags recording this to the afs_server_entry struct that is used to represent a particular instance of a volume on a specific server. The notice is altered to include the server UUID also. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 495f2ae9e3552c30f7b83be3d142a932885d506e Author: David Howells Date: Wed Oct 18 09:24:01 2023 +0100 afs: Fix fileserver rotation Fix the fileserver rotation so that it doesn't use RTT as the basis for deciding which server and address to use as this doesn't necessarily give a good indication of the best path. Instead, use the configurable preference list in conjunction with whatever probes have succeeded at the time of looking. To this end, make the following changes: (1) Keep an array of "server states" to track what addresses we've tried on each server and move the waitqueue entries there that we'll need for probing. (2) Each afs_server_state struct is made to pin the corresponding server's endpoint state rather than the afs_operation struct carrying a pin on the server we're currently looking at. (3) Drop the server list preference; we now always rescan the server list. (4) afs_wait_for_probes() now uses the server state list to guide it in what it waits for (and to provide the waitqueue entries) and returns an indication of whether we'd got a response, run out of responsive addresses or the endpoint state had been superseded and we need to restart the iteration. (5) Call afs_get_address_preferences*() occasionally to refresh the preference values. (6) When picking a server, scan the addresses of the servers for which we have as-yet untested communications, looking for the highest priority one and use that instead of trying all the addresses for a particular server in ascending-RTT order. (7) When a Busy or Offline state is seen across all available servers, do a short sleep. (8) If we detect that we accessed a future RO volume version whilst it is undergoing replication, reissue the op against the older version until at least half of the servers are replicated. (9) Whilst RO replication is ongoing, increase the frequency of Volume Location server checks for that volume to every ten minutes instead of hourly. Also add a tracepoint to track progress through the rotation algorithm. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 453924de6212ac159f946b75c6b59918e2e30944 Author: David Howells Date: Wed Nov 8 13:57:42 2023 +0000 afs: Overhaul invalidation handling to better support RO volumes Overhaul the third party-induced invalidation handling, making use of the previously added volume-level event counters (cb_scrub and cb_ro_snapshot) that are now being parsed out of the VolSync record returned by the fileserver in many of its replies. This allows better handling of RO (and Backup) volumes. Since these are snapshot of a RW volume that are updated atomically simultantanously across all servers that host them, they only require a single callback promise for the entire volume. The currently upstream code assumes that RO volumes operate in the same manner as RW volumes, and that each file has its own individual callback - which means that it does a status fetch for *every* file in a RO volume, whether or not the volume got "released" (volume callback breaks can occur for other reasons too, such as the volumeserver taking ownership of a volume from a fileserver). To this end, make the following changes: (1) Change the meaning of the volume's cb_v_break counter so that it is now a hint that we need to issue a status fetch to work out the state of a volume. cb_v_break is incremented by volume break callbacks and by server initialisation callbacks. (2) Add a second counter, cb_v_check, to the afs_volume struct such that if this differs from cb_v_break, we need to do a check. When the check is complete, cb_v_check is advanced to what cb_v_break was at the start of the status fetch. (3) Move the list of mmap'd vnodes to the volume and trigger removal of PTEs that map to files on a volume break rather than on a server break. (4) When a server reinitialisation callback comes in, use the server-to-volume reverse mapping added in a preceding patch to iterate over all the volumes using that server and clear the volume callback promises for that server and the general volume promise as a whole to trigger reanalysis. (5) Replace the AFS_VNODE_CB_PROMISED flag with an AFS_NO_CB_PROMISE (TIME64_MIN) value in the cb_expires_at field, reducing the number of checks we need to make. (6) Change afs_check_validity() to quickly see if various event counters have been incremented or if the vnode or volume callback promise is due to expire/has expired without making any changes to the state. That is now left to afs_validate() as this may get more complicated in future as we may have to examine server records too. (7) Overhaul afs_validate() so that it does a single status fetch if we need to check the state of either the vnode or the volume - and do so under appropriate locking. The function does the following steps: (A) If the vnode/volume is no longer seen as valid, then we take the vnode validation lock and, if the volume promise has expired, the volume check lock also. The latter prevents redundant checks being made to find out if a new version of the volume got released. (B) If a previous RPC call found that the volsync changed unexpectedly or that a RO volume was updated, then we unmap all PTEs pointing to the file to stop mmap being used for access. (C) If the vnode is still seen to be of uncertain validity, then we perform an FS.FetchStatus RPC op to jointly update the volume status and the vnode status. This assessment is done as part of parsing the reply: If the RO volume creation timestamp advances, cb_ro_snapshot is incremented; if either the creation or update timestamps changes in an unexpected way, the cb_scrub counter is incremented If the Data Version returned doesn't match the copy we have locally, then we ask for the pagecache to be zapped. This takes care of handling RO update. (D) If cb_scrub differs between volume and vnode, the vnode's pagecache is zapped and the vnode's cb_scrub is updated unless the file is marked as having been deleted. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 16069e1349a0c5535e189f9dc5d937bfd7631a06 Author: David Howells Date: Sun Nov 5 16:11:07 2023 +0000 afs: Parse the VolSync record in the reply of a number of RPC ops A number of fileserver RPC operations return a VolSync record as part of their reply that gives some information about the state of the volume being accessed, including: (1) A volume Creation timestamp. For an RW volume, this is the time at which the volume was created; if it changes, the RW volume was presumably restored from a backup and all cached data should be scrubbed as Data Version numbers could regress on the files in the volume. For an RO volume, this is the time it was last snapshotted from the RW volume. It is expected to advance each time this happens; if it regresses, cached data should be scrubbed. (2) A volume Update timestamp (Auristor only). For an RW volume, this is updated any time any change is made to a volume or its contents. If it regresses, all cached data must be scrubbed. For an RO volume, this is a copy of the RW volume's Update timestamp at the point of snapshotting. It can be used as a version number when checking to see if a callback on a RO volume was due to a snapshot. If it regresses, all cached data must be scrubbed. but this is currently not made use of by the in-kernel afs filesystem. Make the afs filesystem use this by: (1) Add an update time field to the afs_volsync struct and use a value of TIME64_MIN in both that and the creation time to indicate that they are unset. (2) Add creation and update time fields to the afs_volume struct and use this to track the two timestamps. (3) Add a volsync_lock mutex to the afs_volume struct to control modification access for when we detect a change in these values. (3) Add a 'pre-op volsync' struct to the afs_operation struct to record the state of the volume tracking before the op. (4) Add a new counter, cb_scrub, to the afs_volume struct to count events that require all data to be scrubbed. A copy is placed in the afs_vnode struct (inode) and if they no longer match, a scrub takes place. (5) When the result of an operation is being parsed, parse the VolSync data too, if it is provided. Note that the two timestamps are handled separately, since they don't work in quite the same way. - If the afs_volume tracking is unset, just set it and do nothing else. - If the result timestamps are the same as the ones in afs_volume, do nothing. - If the timestamps regress, increment cb_scrub if not already done so. - If the creation timestamp on a RW volume changes, increment cb_scrub if not already done so. - If the creation timestamp on a RO volume advances, update the server list and see if the current server has been excluded, if so reissue the op. Once over half of the replication sites have been updated, increment cb_ro_snapshot to indicate updates may be required and switch over to excluding unupdated replication sites. - If the creation timestamp on a Backup volume advances, just increment cb_ro_snapshot to trigger updates. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit d3acd81ef916537f4f7321f3d7861f1950d5c304 Author: David Howells Date: Tue Nov 14 11:17:24 2023 +0000 afs: Don't leave DONTUSE/NEWREPSITE servers out of server list Don't leave servers that are marked VLSF_DONTUSE or VLSF_NEWREPSITE out of the server list for a volume; rather, mark DONTUSE ones excluded and mark either NEWREPSITE excluded if the number of updated servers is <50% of the usable servers or mark !NEWREPSITE excluded otherwise. Mark the server list as a whole with a 3-state flag to indicate whether we think the RW volume is being replicated to the RO volume, and, if so, whether we should switch to using updated replication sites (VLSF_NEWREPSITE) or stick with the old for now. This processing is pushed up from the VLDB RPC reply parser to the code that generates the server list from that information. Doing this allows the old list to be kept with just the exclusion flags replaced and to keep the server records pinned and maintained. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit dd94888938f8fefc6ee29ef57560c1e87cc3e05e Author: David Howells Date: Tue Nov 14 09:19:08 2023 +0000 afs: Fix comment in afs_do_lookup() Fix the comment in afs_do_lookup() that says that slot 0 is used for the fid being looked up and slot 1 is used for the directory. It's actually done the other way round. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 32222f09782f1894fcfc37f6505ca676a6f4d1d6 Author: David Howells Date: Tue Nov 7 17:59:33 2023 +0000 afs: Apply server breaks to mmap'd files in the call processor Apply server breaks to mmap'd files that are being used from that server from the call processor work function rather than punting it off to a workqueue. The work item, afs_server_init_callback(), then bumps each individual inode off to its own work item introducing a potentially lengthy delay. This reduces that delay at the cost of extending the amount of time we delay replying to the CB.InitCallBack3 notification RPC from the server. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit dfa0a44946e29bd38c054df04ca7a3f8143dafe7 Author: David Howells Date: Tue Nov 7 09:47:52 2023 +0000 afs: Move the vnode/volume validity checking code into its own file Move the code that does validity checking of vnodes and volumes with respect to third-party changes into its own file. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 445f9b6952869586990ec3140dcd87c86d795d2e Author: David Howells Date: Wed Nov 8 13:01:11 2023 +0000 afs: Defer volume record destruction to a workqueue Defer volume record destruction to a workqueue so that afs_put_volume() isn't going to run the destruction process in the callback workqueue whilst the server is holding up other clients whilst waiting for us to reply to a CB.CallBack notification RPC. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit ca0e79a46097d54e4af46c67c852479d97af35bb Author: David Howells Date: Thu Nov 2 16:08:43 2023 +0000 afs: Make it possible to find the volumes that are using a server Make it possible to find the afs_volume structs that are using an afs_server struct to aid in breaking volume callbacks. The way this is done is that each afs_volume already has an array of afs_server_entry records that point to the servers where that volume might be found. An afs_volume backpointer and a list node is added to each entry and each entry is then added to an RCU-traversable list on the afs_server to which it points. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 21c1f410d20295dbeee4178f7fdde5e167e20b43 Author: David Howells Date: Tue Oct 31 16:30:37 2023 +0000 afs: Combine the endpoint state bools into a bitmask Combine the endpoint state bool-type members into a bitmask so that some of them can be waited upon more easily. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit f49b594df3ebca53c91f4d6448680463f10aa479 Author: David Howells Date: Tue Oct 31 16:30:37 2023 +0000 afs: Keep a record of the current fileserver endpoint state Keep a record of the current fileserver endpoint state, including the probe state, and replace it when a new probe is started rather than just squelching the old state and overwriting it. Clearance of the old state can cause a race if there's another thread also currently trying to communicate with that server. It appears that this race might be the culprit for some occasions where kafs complains about invalid data in the RPC reply because the rotation algorithm fell all the way through without actually issuing an RPC call and the error return got filled in from the probe state (which has a zero error recorded). Whatever happens to be in the caller's reply buffer is then taken as the response. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit e6a7d7f71b17e0a44e2155bdad47eae7b5368503 Author: David Howells Date: Mon Oct 30 11:53:16 2023 +0000 afs: Dispatch vlserver probes in priority order When probing all the addresses for a volume location server, dispatch them in order of descending priority to try and get back highest priority one first. Also add a tracepoint to show the transmission and completion of the probes. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 92f091cdddace38e57ad570663b058a38b4d8bed Author: David Howells Date: Mon Oct 30 11:43:24 2023 +0000 afs: Dispatch fileserver probes in priority order When probing all the addresses for a fileserver, dispatch them in order of descending priority to try and get back highest priority one first. Also add a tracepoint to show the transmission and completion of the probes. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit d14cf8edd30678b5d1e3671466d458bf72a53e86 Author: David Howells Date: Mon Oct 30 08:25:44 2023 +0000 afs: Mark address lists with configured priorities Add a field to each address in an address list (afs_addr_list struct) that records the current priority for that address according to the address preference table. We don't want to do this every time we use an address list, so the version number of the address preference table is recorded in the address list too and we only re-mark the list when we see the version change. These numbers are then displayed through /proc/net/afs/servers. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit f94f70d39cc2d54079ebae934862198516315db2 Author: David Howells Date: Fri Oct 27 11:42:57 2023 +0100 afs: Provide a way to configure address priorities AFS servers may have multiple addresses, but the client can't easily judge between them as to which one is best. For instance, an address that has a larger RTT might actually have a better bandwidth because it goes through a switch rather than being directly connected - but we can't work this out dynamically unless we push through sufficient data that we can measure it. To allow the administrator to configure this, add a list of preference weightings for server addresses by IPv4/IPv6 address or subnet and allow this to be viewed through a procfile and altered by writing text commands to that same file. Preference rules can be added/updated by: echo "add [/] " >/proc/fs/afs/addr_prefs echo "add udp 1.2.3.4 1000" >/proc/fs/afs/addr_prefs echo "add udp 192.168.0.0/16 3000" >/proc/fs/afs/addr_prefs echo "add udp 1001:2002:0:6::/64 4000" >/proc/fs/afs/addr_prefs and removed by: echo "del [/]" >/proc/fs/afs/addr_prefs echo "del udp 1.2.3.4" >/proc/fs/afs/addr_prefs where the priority is a number between 0 and 65535. The list is split between IPv4 and IPv6 addresses and each sublist is kept in numerical order, with rules that would otherwise match but have different subnet masking being ordered with the most specific submatch first. A subsequent patch will apply these rules. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit b605ee421fa0425950fda2dce64fd359e1361dec Author: David Howells Date: Mon Oct 30 11:39:04 2023 +0000 afs: Remove the unimplemented afs_cmp_addr_list() Remove afs_cmp_addr_list() as it was never implemented. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit af9a5b4930dfafbf0274e9403cb64fcc698bb096 Author: David Howells Date: Fri Oct 27 10:45:56 2023 +0100 afs: Add some more info to /proc/net/afs/servers In /proc/net/afs/servers, show the cell name and the last error for each address in the server's list. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 109bf4cfe112d8260aac75dbab393f2ae7eb7495 Merge: 240436c06ce99 aaba7ddc8507f Author: David S. Miller Date: Mon Jan 1 16:15:40 2024 +0000 Merge tag 'nf-next-23-12-22' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf-next Pablo Neira Ayuso says: ==================== netfilter pull request 23-12-22 The following patchset contains Netfilter updates for net-next: 1) Add locking for NFT_MSG_GETSETELEM_RESET requests, to address a race scenario with two concurrent processes running a dump-and-reset which exposes negative counters to userspace, from Phil Sutter. 2) Use GFP_KERNEL in pipapo GC, from Florian Westphal. 3) Reorder nf_flowtable struct members, place the read-mostly parts accessed by the datapath first. From Florian Westphal. 4) Set on dead flag for NFT_MSG_NEWSET in abort path, from Florian Westphal. 5) Support filtering zone in ctnetlink, from Felix Huettner. 6) Bail out if user tries to redefine an existing chain with different type in nf_tables. ==================== Signed-off-by: David S. Miller commit 27f2b08735c90d0f6bd5888edb58bbce7fcf22a8 Author: Srinivas Pandruvada Date: Fri Dec 22 12:39:57 2023 -0800 platform/x86: intel-uncore-freq: Add additional client processors Add support for client processors starting from Kaby Lake. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20231222203957.1348043-1-srinivas.pandruvada@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ef67575ac92142ba949ae628241dffc3d9acf56e Author: Andy Shevchenko Date: Fri Dec 22 16:44:53 2023 +0200 platform/x86: Remove "X86 PLATFORM DRIVERS - ARCH" from MAINTAINERS It seems traffic there is quite low and changes are often not related to PDx86 anyhow. Besides that I have a lot of other stuff to do, I'm rearly pay attention on these emails. Doesn't seem Daren to be active either. With this in mind, remove (stale) section. Note, it might be make sense to actually move that folder under PDx86 umbrella (in MAINTAINERS) if people find it suitable. That will reduce burden on arch/x86 maintenance. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231222144453.2888706-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 240436c06ce992879d59e504b0df3d32deebb43e Merge: cff9c565e65f3 5abde62465222 Author: David S. Miller Date: Mon Jan 1 14:45:21 2024 +0000 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== bpf-next-for-netdev The following pull-request contains BPF updates for your *net-next* tree. We've added 22 non-merge commits during the last 3 day(s) which contain a total of 23 files changed, 652 insertions(+), 431 deletions(-). The main changes are: 1) Add verifier support for annotating user's global BPF subprogram arguments with few commonly requested annotations for a better developer experience, from Andrii Nakryiko. These tags are: - Ability to annotate a special PTR_TO_CTX argument - Ability to annotate a generic PTR_TO_MEM as non-NULL 2) Support BPF verifier tracking of BPF_JNE which helps cases when the compiler transforms (unsigned) "a > 0" into "if a == 0 goto xxx" and the like, from Menglong Dong. 3) Fix a warning in bpf_mem_cache's check_obj_size() as reported by LKP, from Hou Tao. 4) Re-support uid/gid options when mounting bpffs which had to be reverted with the prior token series revert to avoid conflicts, from Daniel Borkmann. 5) Fix a libbpf NULL pointer dereference in bpf_object__collect_prog_relos() found from fuzzing the library with malformed ELF files, from Mingyi Zhang. 6) Skip DWARF sections in libbpf's linker sanity check given compiler options to generate compressed debug sections can trigger a rejection due to misalignment, from Alyssa Ross. 7) Fix an unnecessary use of the comma operator in BPF verifier, from Simon Horman. 8) Fix format specifier for unsigned long values in cpustat sample, from Colin Ian King. ==================== Signed-off-by: David S. Miller commit cff9c565e65f3622e8dc1dcc21c1520a083dff35 Author: Luiz Angelo Daros de Luca Date: Wed Dec 20 01:52:29 2023 -0300 net: mdio: get/put device node during (un)registration The __of_mdiobus_register() function was storing the device node in dev.of_node without increasing its reference count. It implicitly relied on the caller to maintain the allocated node until the mdiobus was unregistered. Now, __of_mdiobus_register() will acquire the node before assigning it, and of_mdiobus_unregister_callback() will be called at the end of mdio_unregister(). Drivers can now release the node immediately after MDIO registration. Some of them are already doing that even before this patch. Signed-off-by: Luiz Angelo Daros de Luca Signed-off-by: David S. Miller commit 0171e067d7daf06374c3e9c6ddf1a99fca10469c Author: Christophe JAILLET Date: Tue Dec 19 07:09:54 2023 +0100 dw-xdata: Remove usage of the deprecated ida_simple_*() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove() functions. This is also less verbose. Link: https://lore.kernel.org/linux-pci/cc01721cec2d416d7bdf47086943b17ef44b7286.1702966181.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Krzysztof Wilczyński commit 130f335630b6475d314658ef69b225db8e328daa Author: Christophe JAILLET Date: Tue Dec 19 07:15:37 2023 +0100 misc: pci_endpoint_test: Remove usage of the deprecated ida_simple_*() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove() functions. This is also less verbose. Link: https://lore.kernel.org/linux-pci/47a30441242c4d5f0e00555cbddd7783350ff1b2.1702966523.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit 0eccea7150e3b8dfb3a08694964478966525c4c3 Author: Christophe JAILLET Date: Sun Dec 10 18:50:03 2023 +0100 PCI: vmd: Remove usage of the deprecated ida_simple_*() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove() functions. This is also less verbose. Link: https://lore.kernel.org/linux-pci/270f25cdc154f3b0309e57b2f6421776752e2170.1702230593.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Krzysztof Wilczyński commit b1a1eaf6183697b77f7243780a25f35c7c0c8bdf Merge: c9d98a562cafb 8645e659e2d22 Author: Greg Kroah-Hartman Date: Sun Dec 31 10:04:32 2023 +0000 Merge tag 'iio-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: IIO: 2nd set of new device support, features and cleanup for 6.8 A late/optimistic second pull request. The bots have been poking them since Wednesday without any issues. There are a few fixes in the ad7091r5 driver as part of rework to enable the ad7091r8 parts that are included at start of that series. Includes pre-work for major changes to the DMA buffers that should land in 6.9 and will greatly improve performance and flexibility for high performance devices by enabling DMABUF based zero copy transfers when we don't need to bounce the data via user space. New device support ------------------ adi,ad7091r8 - Major refactor of existing adi,ad7091r5 driver to separate out useful shared library code that can be used by I2C and SPI parts. - Use that library from a new driver supporting the AD7091R-2, AD7091R-4 and AD7091R-8 12-Bit SPI ADCs. - Series includes some late breaking fixes for the ad7091r5. microchip,mcp4821 - New driver for MCP4801, MCP4802, MCP4811, MCP4812, MCP4821 and MCP4822 I2C single / dual channel DACs. Cleanup ------- buffers: - Use IIO_SEPARATE in place of some hard-coded 0 values. dma-buffers: - Simplify things to not use an outgoing queue given it only ever has up to two elements and we only need to track which is first. - Split the iio_dma_buffer_fileio_free() function up to make it easier to read and enable reuse in a series lining up for 6.9 iio.h - Drop some stale documentation of struct fields that don't exist. * tag 'iio-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: linux/iio.h: fix Excess kernel-doc description warning MAINTAINERS: Add MAINTAINERS entry for AD7091R iio: adc: Add support for AD7091R-8 dt-bindings: iio: Add AD7091R-8 iio: adc: Split AD7091R-5 config symbol iio: adc: ad7091r: Add chip_info callback to get conversion result channel iio: adc: ad7091r: Set device mode through chip_info callback iio: adc: ad7091r: Remove unneeded probe parameters iio: adc: ad7091r: Move chip init data to container struct iio: adc: ad7091r: Move generic AD7091R code to base driver and header file iio: adc: ad7091r: Enable internal vref if external vref is not supplied iio: adc: ad7091r: Allow users to configure device events iio: dac: driver for MCP4821 dt-bindings: iio: dac: add MCP4821 iio: buffer-dma: split iio_dma_buffer_fileio_free() function iio: buffer-dma: Get rid of outgoing queue iio: buffer: Use IIO_SEPARATE instead of a hard-coded 0 commit 63a43a675cb90e8a56e9119fff68292561204b27 Author: Cheng Xu Date: Wed Dec 27 16:48:00 2023 +0800 RDMA/erdma: Add hardware statistics support First, we add a new command to query hardware statistics, and then implement two functions: ib_device_ops.alloc_hw_port_stats and ib_device_ops.get_hw_stats to allow rdma tool can get the statistics of erdma device. Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20231227084800.99091-3-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky commit 68cf9d82f75c07d4117bca8129a770efa9d89f62 Author: Cheng Xu Date: Wed Dec 27 16:47:59 2023 +0800 RDMA/erdma: Introduce dma pool for hardware responses of CMDQ requests Hardware response, such as the result of query statistics, may be too long to be directly accommodated within the CQE structure. To address this, we introduce a DMA pool to hold the hardware's responses of CMDQ requests. Signed-off-by: Cheng Xu Link: https://lore.kernel.org/r/20231227084800.99091-2-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky commit 8e1803900ef1b61ed33e6963d9e6a95028b41110 Author: Thomas Bogendoerfer Date: Thu Dec 21 13:54:04 2023 +0100 MIPS: Remove unused shadow GPR support from vector irq setup Using shadow GPRs for vectored interrupts has never been used, time to remove it. Signed-off-by: Thomas Bogendoerfer commit 682fb5be353117b7321f1dfb65b7bb98cbfe59ab Author: Thomas Bogendoerfer Date: Thu Dec 21 13:54:03 2023 +0100 MIPS: Allow vectored interrupt handler to reside everywhere for 64bit Setting up vector interrupts worked only with handlers, which resided in CKSEG0 space. This limits the kernel placement for 64bit platforms. By patching in the offset into vi_handlers[] instead of the full handler address, the vectored exception handler can load the address by itself and jump to it. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Jiaxun Yang commit bd968aef071ab177a47034c2e45048a3c192f0b8 Merge: 68f7f3ff6c2a0 ba7053b4b4a4d Author: Takashi Iwai Date: Sat Dec 30 12:55:00 2023 +0100 Merge branch 'topic/cs35l41' into for-next Pull CS35L41 codec updates for Lenovo laptops. Signed-off-by: Takashi Iwai commit ba7053b4b4a4ddcf530fa2b897e697004715d086 Author: Dorian Cruveiller Date: Sat Dec 30 12:43:12 2023 +0100 ALSA: hda: Add driver properties for cs35l41 for Lenovo Legion Slim 7 Gen 8 serie Add driver properties on 4 models of this laptop serie since they don't have _DSD in the ACPI table Signed-off-by: Dorian Cruveiller Cc: # v6.7 Link: https://lore.kernel.org/r/20231230114312.22118-1-doriancruveiller@gmail.com Signed-off-by: Takashi Iwai commit 99af5b11c57d33c32d761797f6308b40936c22ed Author: Dorian Cruveiller Date: Sat Dec 30 12:40:01 2023 +0100 ALSA: hda/realtek: enable SND_PCI_QUIRK for Lenovo Legion Slim 7 Gen 8 (2023) serie Link up the realtek audio chip to the cirrus cs35l41 sound amplifier chip on 4 models of the Lenovo legion slim 7 gen 8 (2023). These models are 16IRH8 (2 differents subsystem id) and 16APH8 (2 differents subsystem ids). Subsystem ids list: - 17AA38B4 - 17AA38B5 - 17AA38B6 - 17AA38B7 Signed-off-by: Dorian Cruveiller Cc: # v6.7 Link: https://lore.kernel.org/r/20231230114001.19855-1-doriancruveiller@gmail.com Signed-off-by: Takashi Iwai commit 7991ed43587d1106315208cc289c851d6915d4a3 Author: Borislav Petkov (AMD) Date: Sat Dec 30 12:20:04 2023 +0100 x86/alternative: Correct feature bit debug output In https://lore.kernel.org/r/20231206110636.GBZXBVvCWj2IDjVk4c@fat_crate.local I wanted to adjust the alternative patching debug output to the new changes introduced by da0fe6e68e10 ("x86/alternative: Add indirect call patching") but removed the '*' which denotes the ->x86_capability word. The correct output should be, for example: [ 0.230071] SMP alternatives: feat: 11*32+15, old: (entry_SYSCALL_64_after_hwframe+0x5a/0x77 (ffffffff81c000c2) len: 16), repl: (ffffffff89ae896a, len: 5) flags: 0x0 while the incorrect one says "... 1132+15" currently. Add back the '*'. Fixes: da0fe6e68e10 ("x86/alternative: Add indirect call patching") Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231206110636.GBZXBVvCWj2IDjVk4c@fat_crate.local commit 68f7f3ff6c2a0998be9dc07622bd0d16fd1fda20 Author: Gergo Koteles Date: Sat Dec 30 01:13:41 2023 +0100 ALSA: hda/tas2781: configure the amp after firmware load Make the amp available immediately after a module load to avoid having to wait for a PCM hook action. (eg. unloading & loading the module while listening music) Signed-off-by: Gergo Koteles Link: https://lore.kernel.org/r/7f2f65d9212aa16edd4db8725489ae59dbe74c66.1703895108.git.soyer@irl.hu Signed-off-by: Takashi Iwai commit 66e82d219924f6112509f7e8f8e687fcc81a16e3 Author: Greg Kroah-Hartman Date: Tue Dec 19 14:34:46 2023 +0100 ALSA: mark all struct bus_type as const Now that the driver core can properly handle constant struct bus_type, move all of the sound subsystem struct bus_type structures as const, placing them into read-only memory which can not be modified at runtime. Note, this fixes a duplicate definition of ac97_bus_type, which somehow was declared extern in a .h file, and then static as a prototype in a .c file, and then properly later on in the same .c file. Amazing that no compiler warning ever showed up for this. Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Dawei Li Cc: Yu Liao Cc: "Rafael J. Wysocki" Cc: Hans de Goede Cc: linux-sound@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/2023121945-immersion-budget-d0aa@gregkh Signed-off-by: Takashi Iwai commit aad86da229bc9d0390dc2c02eb0db9ab1f50d059 Author: Andrew Jones Date: Wed Dec 20 17:00:26 2023 +0100 RISC-V: KVM: selftests: Add get-reg-list test for STA registers Add SBI STA and its two registers to the get-reg-list test. Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 60b6e31c499643b25d4b3ccb4cc8e365dfdb8863 Author: Andrew Jones Date: Wed Dec 20 17:00:25 2023 +0100 RISC-V: KVM: selftests: Add steal_time test support With the introduction of steal-time accounting support for RISC-V KVM we can add RISC-V support to the steal_time test. Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 945d880d6be0fd19bbc77d80d113bd2ca74c74f8 Author: Andrew Jones Date: Wed Dec 20 17:00:24 2023 +0100 RISC-V: KVM: selftests: Add guest_sbi_probe_extension Add guest_sbi_probe_extension(), allowing guest code to probe for SBI extensions. As guest_sbi_probe_extension() needs SBI_ERR_NOT_SUPPORTED, take the opportunity to bring in all SBI error codes. We don't bring in all current extension IDs or base extension function IDs though, even though we need one of each, because we'd prefer to bring those in as necessary. Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 0dcab5c4762ac166aa7e635ae4b6d649e15717e2 Author: Andrew Jones Date: Wed Dec 20 17:00:23 2023 +0100 RISC-V: KVM: selftests: Move sbi_ecall to processor.c sbi_ecall() isn't ucall specific and its prototype is already in processor.h. Move its implementation to processor.c. Reviewed-by: Anup Patel Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit e9f12b5fff8ad0eefd0340273767d329ef65fd69 Author: Andrew Jones Date: Wed Dec 20 17:00:22 2023 +0100 RISC-V: KVM: Implement SBI STA extension Add a select SCHED_INFO to the KVM config in order to get run_delay info. Then implement SBI STA's set-steal-time-shmem function and kvm_riscv_vcpu_record_steal_time() to provide the steal-time info to guests. Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit f61ce890b1f0742f17b3a5d1f8c72574a33ffeb2 Author: Andrew Jones Date: Wed Dec 20 17:00:21 2023 +0100 RISC-V: KVM: Add support for SBI STA registers KVM userspace needs to be able to save and restore the steal-time shared memory address. Provide the address through the get/set-one-reg interface with two ulong-sized SBI STA extension registers (lo and hi). 64-bit KVM userspace must not set the hi register to anything other than zero and is allowed to completely neglect saving/restoring it. Reviewed-by: Anup Patel Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 5b9e41321ba919dd051c68d2a1d2c753aa61634c Author: Andrew Jones Date: Wed Dec 20 17:00:20 2023 +0100 RISC-V: KVM: Add support for SBI extension registers Some SBI extensions have state that needs to be saved / restored when migrating the VM. Provide a get/set-one-reg register type for SBI extension registers. Each SBI extension that uses this type will have its own subtype. There are currently no subtypes defined. The next patch introduces the first one. Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 38b3390ee4880140b6245fe3273fe9ce53f65bde Author: Andrew Jones Date: Wed Dec 20 17:00:19 2023 +0100 RISC-V: KVM: Add SBI STA info to vcpu_arch KVM's implementation of SBI STA needs to track the address of each VCPU's steal-time shared memory region as well as the amount of stolen time. Add a structure to vcpu_arch to contain this state and make sure that the address is always set to INVALID_GPA on vcpu reset. And, of course, ensure KVM won't try to update steal- time when the shared memory address is invalid. Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 2a1f6bf079700f0f9d8045ab77b302aeb4d12c06 Author: Andrew Jones Date: Wed Dec 20 17:00:18 2023 +0100 RISC-V: KVM: Add steal-update vcpu request Add a new vcpu request to inform a vcpu that it should record its steal-time information. The request is made each time it has been detected that the vcpu task was not assigned a cpu for some time, which is easy to do by making the request from vcpu-load. The record function is just a stub for now and will be filled in with the rest of the steal-time support functions in following patches. Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 5fed84a800e6048656c17be6e921787db2b5c6c0 Author: Andrew Jones Date: Wed Dec 20 17:00:17 2023 +0100 RISC-V: KVM: Add SBI STA extension skeleton Add the files and functions needed to support the SBI STA (steal-time accounting) extension. In the next patches we'll complete the functions to fully enable SBI STA support. Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit fdf68acccfc6af9497c34ee411d89af13b6516ed Author: Andrew Jones Date: Wed Dec 20 17:00:16 2023 +0100 RISC-V: paravirt: Implement steal-time support When the SBI STA extension exists we can use it to implement paravirt steal-time support. Fill in the empty pv-time functions with an SBI STA implementation and add the Kconfig knobs allowing it to be enabled. Acked-by: Palmer Dabbelt Reviewed-by: Atish Patra Reviewed-by: Anup Patel Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 6cfc624576a64145b1d6d3d48de7161a7505f403 Author: Andrew Jones Date: Wed Dec 20 17:00:15 2023 +0100 RISC-V: Add SBI STA extension definitions The SBI STA extension enables steal-time accounting. Add the definitions it specifies. Acked-by: Palmer Dabbelt Reviewed-by: Conor Dooley Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 323925ed6dbb0ed877047b28fae4152527cc63db Author: Andrew Jones Date: Wed Dec 20 17:00:14 2023 +0100 RISC-V: paravirt: Add skeleton for pv-time support Add the files and functions needed to support paravirt time on RISC-V. Also include the common code needed for the first application of pv-time, which is steal-time. In the next patches we'll complete the functions to fully enable steal-time support. Acked-by: Palmer Dabbelt Reviewed-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Andrew Jones Signed-off-by: Anup Patel commit 501a06fe8e4c185bbda371b8cedbdf1b23a633d8 Author: Nhat Pham Date: Thu Dec 7 11:24:06 2023 -0800 zswap: memcontrol: implement zswap writeback disabling During our experiment with zswap, we sometimes observe swap IOs due to occasional zswap store failures and writebacks-to-swap. These swapping IOs prevent many users who cannot tolerate swapping from adopting zswap to save memory and improve performance where possible. This patch adds the option to disable this behavior entirely: do not writeback to backing swapping device when a zswap store attempt fail, and do not write pages in the zswap pool back to the backing swap device (both when the pool is full, and when the new zswap shrinker is called). This new behavior can be opted-in/out on a per-cgroup basis via a new cgroup file. By default, writebacks to swap device is enabled, which is the previous behavior. Initially, writeback is enabled for the root cgroup, and a newly created cgroup will inherit the current setting of its parent. Note that this is subtly different from setting memory.swap.max to 0, as it still allows for pages to be stored in the zswap pool (which itself consumes swap space in its current form). This patch should be applied on top of the zswap shrinker series: https://lore.kernel.org/linux-mm/20231130194023.4102148-1-nphamcs@gmail.com/ as it also disables the zswap shrinker, a major source of zswap writebacks. For the most part, this feature is motivated by internal parties who have already established their opinions regarding swapping - the workloads that are highly sensitive to IO, and especially those who are using servers with really slow disk performance (for instance, massive but slow HDDs). For these folks, it's impossible to convince them to even entertain zswap if swapping also comes as a packaged deal. Writeback disabling is quite a useful feature in these situations - on a mixed workloads deployment, they can disable writeback for the more IO-sensitive workloads, and enable writeback for other background workloads. For instance, on a server with HDD, I allocate memories and populate them with random values (so that zswap store will always fail), and specify memory.high low enough to trigger reclaim. The time it takes to allocate the memories and just read through it a couple of times (doing silly things like computing the values' average etc.): zswap.writeback disabled: real 0m30.537s user 0m23.687s sys 0m6.637s 0 pages swapped in 0 pages swapped out zswap.writeback enabled: real 0m45.061s user 0m24.310s sys 0m8.892s 712686 pages swapped in 461093 pages swapped out (the last two lines are from vmstat -s). [nphamcs@gmail.com: add a comment about recurring zswap store failures leading to reclaim inefficiency] Link: https://lkml.kernel.org/r/20231221005725.3446672-1-nphamcs@gmail.com Link: https://lkml.kernel.org/r/20231207192406.3809579-1-nphamcs@gmail.com Signed-off-by: Nhat Pham Suggested-by: Johannes Weiner Reviewed-by: Yosry Ahmed Acked-by: Chris Li Cc: Dan Streetman Cc: David Heidelberg Cc: Domenico Cerasuolo Cc: Hugh Dickins Cc: Jonathan Corbet Cc: Konrad Rzeszutek Wilk Cc: Michal Hocko Cc: Mike Rapoport (IBM) Cc: Muchun Song Cc: Roman Gushchin Cc: Sergey Senozhatsky Cc: Seth Jennings Cc: Shakeel Butt Cc: Tejun Heo Cc: Vitaly Wool Cc: Zefan Li Signed-off-by: Andrew Morton commit 92de776d20904b51e6dc2d39280c5f143a80f987 Merge: cd4d7263d58ab 22c4640698a1d Author: David S. Miller Date: Fri Dec 29 22:35:13 2023 +0000 Merge tag 'mlx5-updates-2023-12-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-12-20 mlx5 Socket direct support and management PF profile. Tariq Says: =========== Support Socket-Direct multi-dev netdev This series adds support for combining multiple devices (PFs) of the same port under one netdev instance. Passing traffic through different devices belonging to different NUMA sockets saves cross-numa traffic and allows apps running on the same netdev from different numas to still feel a sense of proximity to the device and achieve improved performance. We achieve this by grouping PFs together, and creating the netdev only once all group members are probed. Symmetrically, we destroy the netdev once any of the PFs is removed. The channels are distributed between all devices, a proper configuration would utilize the correct close numa when working on a certain app/cpu. We pick one device to be a primary (leader), and it fills a special role. The other devices (secondaries) are disconnected from the network in the chip level (set to silent mode). All RX/TX traffic is steered through the primary to/from the secondaries. Currently, we limit the support to PFs only, and up to two devices (sockets). =========== Armen Says: =========== Management PF support and module integration This patch rolls out comprehensive support for the Management Physical Function (MGMT PF) within the mlx5 driver. It involves updating the mlx5 interface header to introduce necessary definitions for MGMT PF and adding a new management PF netdev profile, which will allow the host side to communicate with the embedded linux on Blue-field devices. =========== ==================== Signed-off-by: David S. Miller commit 8586a5d217ef7bfeee24943c600a8a7890d6f477 Author: Andy Yan Date: Mon Dec 25 08:50:55 2023 +0800 arm64: dts: rockchip: Fix led pinctrl of lubancat 1 According to the schematics, the gpio control sys_led is GPIO0_C5. Fixes: 8d94da58de53 ("arm64: dts: rockchip: Add EmbedFire LubanCat 1") Reported-by: Zhang Ning Closes: https://lore.kernel.org/linux-rockchip/OS0P286MB06412D049D8BF7B063D41350CD95A@OS0P286MB0641.JPNP286.PROD.OUTLOOK.COM/T/#u Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20231225005055.3102743-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 24559788384916041a0bbf54c32e2a16b612d247 Author: John Clark Date: Mon Dec 25 22:32:16 2023 +0000 arm64: dts: rockchip: correct gpio_pwrctrl1 typo on nanopc-t6 Both rk806_dvs1_null and rk806_dvs2_null duplicate gpio_pwrctrl2 and gpio_pwrctrl1 is not set. This patch sets gpio_pwrctrl1. Signed-off-by: John Clark Link: https://lore.kernel.org/r/20231225223226.17690-1-inindev@gmail.com Signed-off-by: Heiko Stuebner commit aed6514c4e3aee843385ded4c5ee0921b51c30fa Author: John Clark Date: Mon Dec 25 22:28:20 2023 +0000 arm64: dts: rockchip: correct gpio_pwrctrl1 typo on rock-5b Both rk806_dvs1_null and rk806_dvs2_null duplicate gpio_pwrctrl2 and gpio_pwrctrl1 is not set. This patch sets gpio_pwrctrl1. Signed-off-by: John Clark Reviewed-by: Sebastian Reichel Link: https://lore.kernel.org/r/20231225222859.17153-2-inindev@gmail.com Signed-off-by: Heiko Stuebner commit 7738f551173540b3daa63a91b384b167eacd24fd Author: John Clark Date: Mon Dec 25 22:28:19 2023 +0000 arm64: dts: rockchip: support poweroff on the rock-5b Allow the rock-5b to poweroff its pmic. When issuing a "shutdown -h now" on the rock-5b it reboots instead. Defining 'system-power-controller' allows the rk806 to power down. Commit c699fbfdfd54 ("arm64: dts: rockchip: Support poweroff on NanoPC-T6") similarly resolves this issue for the nanopc-t6. Signed-off-by: John Clark Reviewed-by: Sebastian Reichel Link: https://lore.kernel.org/r/20231225222859.17153-1-inindev@gmail.com Signed-off-by: Heiko Stuebner commit e9126f9d3c83acbc88461a535e24c949c7e0b6ca Author: Jimmy Hon Date: Wed Dec 27 14:32:11 2023 -0600 arm64: dts: rockchip: Support poweroff on Orange Pi 5 The RK806 on the Orange Pi 5 can be used to power on/off the whole board. Mark it as the system power controller. Signed-off-by: Jimmy Hon Link: https://lore.kernel.org/r/20231227203211.1047-1-honyuenkwun@gmail.com Signed-off-by: Heiko Stuebner commit 9e1faff1cbc877903d019a7943d37ddc5042704d Author: John Clark Date: Thu Dec 28 17:29:35 2023 +0000 arm64: dts: rockchip: nanopc-t6 sdmmc beautification drop max-frequency = <200000000> as it is already defined in rk3588s.dtsi order no-sdio & no-mmc properties while we are here Signed-off-by: John Clark Link: https://lore.kernel.org/r/20231228173011.2863-1-inindev@gmail.com Signed-off-by: Heiko Stuebner commit 29166371ef6780429e4cb84f1827fafbdd4005ab Author: Youling Tang Date: Wed Dec 27 07:46:25 2023 +0800 kdump: remove redundant DEFAULT_CRASH_KERNEL_LOW_SIZE Remove duplicate definitions, no functional changes. Link: https://lkml.kernel.org/r/MW4PR84MB3145459ADC7EB38BBB36955B8198A@MW4PR84MB3145.NAMPRD84.PROD.OUTLOOK.COM Signed-off-by: Youling Tang Reported-by: Huacai Chen Acked-by: Baoquan He Signed-off-by: Andrew Morton commit 436efd9e4b657b8b659c7f482f7106e521b09891 Author: Bjorn Andersson Date: Mon Dec 25 09:40:35 2023 -0800 scripts/decode_stacktrace.sh: strip unexpected CR from lines When the kernel log is acquired over a serial cable it is not uncommon for the log to contain carriage return characters, in addition to the expected line feeds. When this output is feed into decode_stacktrace.sh, handle_line() fails to strip the trailing ']' off the module name, which results in find_module() not being able to find the referred to kernel module. This is reported to the user as: WARNING! Modules path isn't set, but is needed to parse this symbol The solution is to reconfigure the serial port, or to strip the carriage returns from the log, but this isn't obvious from the error reported by the script. Instead, make decode_stacktrace.sh more user friendly by stripping the trailing carriage return. Link: https://lkml.kernel.org/r/20231225-decode-stacktrace-cr-v1-1-9f306f38cdde@quicinc.com Signed-off-by: Bjorn Andersson Signed-off-by: Andrew Morton commit 55efe4abf927aca3692870a1851067f309e9a374 Author: Douglas Anderson Date: Wed Dec 20 13:15:37 2023 -0800 watchdog: if panicking and we dumped everything, don't re-enable dumping If, as part of handling a hardlockup or softlockup, we've already dumped all CPUs and we're just about to panic, don't reenable dumping and give some other CPU a chance to hop in there and add some confusing logs right as the panic is happening. Link: https://lkml.kernel.org/r/20231220131534.4.Id3a9c7ec2d7d83e4080da6f8662ba2226b40543f@changeid Signed-off-by: Douglas Anderson Cc: John Ogness Cc: Lecopzer Chen Cc: Li Zhe Cc: Petr Mladek Cc: Pingfan Liu Signed-off-by: Andrew Morton commit ee6bdb3f4bf046ff7878c6103b8c88bb4ccfb11d Author: Douglas Anderson Date: Wed Dec 20 13:15:36 2023 -0800 watchdog/hardlockup: use printk_cpu_sync_get_irqsave() to serialize reporting If two CPUs end up reporting a hardlockup at the same time then their logs could get interleaved which is hard to read. The interleaving problem was especially bad with the "perf" hardlockup detector where the locked up CPU is always the same as the running CPU and we end up in show_regs(). show_regs() has no inherent serialization so we could mix together two crawls if two hardlockups happened at the same time (and if we didn't have `sysctl_hardlockup_all_cpu_backtrace` set). With this change we'll fully serialize hardlockups when using the "perf" hardlockup detector. The interleaving problem was less bad with the "buddy" hardlockup detector. With "buddy" we always end up calling `trigger_single_cpu_backtrace(cpu)` on some CPU other than the running one. trigger_single_cpu_backtrace() always at least serializes the individual stack crawls because it eventually uses printk_cpu_sync_get_irqsave(). Unfortunately the fact that trigger_single_cpu_backtrace() eventually calls printk_cpu_sync_get_irqsave() (on a different CPU) means that we have to drop the "lock" before calling it and we can't fully serialize all printouts associated with a given hardlockup. However, we still do get the advantage of serializing the output of print_modules() and print_irqtrace_events(). Aside from serializing hardlockups from each other, this change also has the advantage of serializing hardlockups and softlockups from each other if they happen to happen at the same time since they are both using the same "lock". Even though nobody is expected to hang while holding the lock associated with printk_cpu_sync_get_irqsave(), out of an abundance of caution, we don't call printk_cpu_sync_get_irqsave() until after we print out about the hardlockup. This makes extra sure that, even if printk_cpu_sync_get_irqsave() somehow never runs we at least print that we saw the hardlockup. This is different than the choice made for softlockup because hardlockup is really our last resort. Link: https://lkml.kernel.org/r/20231220131534.3.I6ff691b3b40f0379bc860f80c6e729a0485b5247@changeid Signed-off-by: Douglas Anderson Reviewed-by: John Ogness Cc: Lecopzer Chen Cc: Li Zhe Cc: Petr Mladek Cc: Pingfan Liu Signed-off-by: Andrew Morton commit 896260a6d69d01ceb1aad8cfe4298bd837a67432 Author: Douglas Anderson Date: Wed Dec 20 13:15:35 2023 -0800 watchdog/softlockup: use printk_cpu_sync_get_irqsave() to serialize reporting Instead of introducing a spinlock, use printk_cpu_sync_get_irqsave() and printk_cpu_sync_put_irqrestore() to serialize softlockup reporting. Alone this doesn't have any real advantage over the spinlock, but this will allow us to use the same function in a future change to also serialize hardlockup crawls. NOTE: for the most part this serialization is important because we often end up in the show_regs() path and that has no built-in serialization if there are multiple callers at once. However, even in the case where we end up in the dump_stack() path this still has some advantages because the stack will be guaranteed to be together in the logs with the lockup message with no interleaving. NOTE: the fact that printk_cpu_sync_get_irqsave() is allowed to be called multiple times on the same CPU is important here. Specifically we hold the "lock" while calling dump_stack() which also gets the same "lock". This is explicitly documented to be OK and means we don't need to introduce a variant of dump_stack() that doesn't grab the lock. Link: https://lkml.kernel.org/r/20231220131534.2.Ia5906525d440d8e8383cde31b7c61c2aadc8f907@changeid Signed-off-by: Douglas Anderson Reviewed-by: John Ogness Reviewed-by: Li Zhe Cc: Lecopzer Chen Cc: Petr Mladek Cc: Pingfan Liu Signed-off-by: Andrew Morton commit 6dcde5d5f248291c5ff6cbe00a7fa6ae400d1aa9 Author: Douglas Anderson Date: Wed Dec 20 13:15:34 2023 -0800 watchdog/hardlockup: adopt softlockup logic avoiding double-dumps Patch series "watchdog: Better handling of concurrent lockups". When we get multiple lockups at roughly the same time, the output in the kernel logs can be very confusing since the reports about the lockups end up interleaved in the logs. There is some code in the kernel to try to handle this but it wasn't that complete. Li Zhe recently made this a bit better for softlockups (specifically for the case where `kernel.softlockup_all_cpu_backtrace` is not set) in commit 9d02330abd3e ("softlockup: serialized softlockup's log"), but that only handled softlockup reports. Hardlockup reports still had similar issues. This series also has a small fix to avoid dumping all stacks a second time in the case of a panic. This is a bit unrelated to the interleaving fixes but it does also improve the clarity of lockup reports. This patch (of 4): The hardlockup detector and softlockup detector both have the ability to dump the stack of all CPUs (`kernel.hardlockup_all_cpu_backtrace` and `kernel.softlockup_all_cpu_backtrace`). Both detectors also have some logic to attempt to avoid interleaving printouts if two CPUs were trying to do dumps of all CPUs at the same time. However: - The hardlockup detector's logic still allowed interleaving some information. Specifically another CPU could print modules and dump the stack of the locked CPU at the same time we were dumping all CPUs. - In the case where `kernel.hardlockup_panic` was set in addition to `kernel.hardlockup_all_cpu_backtrace`, when two CPUs both detected hardlockups at the same time the second CPU could call panic() while the first was still dumping stacks. This was especially bad if the locked up CPU wasn't responding to the request for a backtrace since the function nmi_trigger_cpumask_backtrace() can wait up to 10 seconds. Let's resolve this by adopting the softlockup logic in the hardlockup handler. NOTES: - As part of this, one might think that we should make a helper function that both the hard and softlockup detectors call. This turns out not to be super trivial since it would have to be parameterized quite a bit since there are separate global variables controlling each lockup detector and they print log messages that are just different enough that it would be a pain. We probably don't want to change the messages that are printed without good reason to avoid throwing log parsers for a loop. - One might also think that it would be a good idea to have the hardlockup and softlockup detector use the same global variable to prevent interleaving. This would make sure that softlockups and hardlockups can't interleave each other. That _almost_ works but has a dangerous flaw if `kernel.hardlockup_panic` is not the same as `kernel.softlockup_panic` because we might skip a call to panic() if one type of lockup was detected at the same time as another. Link: https://lkml.kernel.org/r/20231220211640.2023645-1-dianders@chromium.org Link: https://lkml.kernel.org/r/20231220131534.1.I4f35a69fbb124b5f0c71f75c631e11fabbe188ff@changeid Signed-off-by: Douglas Anderson Cc: John Ogness Cc: Lecopzer Chen Cc: Li Zhe Cc: Petr Mladek Cc: Pingfan Liu Signed-off-by: Andrew Morton commit 2861b37732627d7d115d77585ce4853f25cf332d Author: Yuntao Wang Date: Thu Dec 21 12:23:08 2023 +0800 kexec_core: fix the assignment to kimage->control_page image->control_page represents the starting address for allocating the next control page, while hole_end represents the address of the last valid byte of the currently allocated control page. This bug actually does not affect the correctness of allocating control pages, because image->control_page is currently only used in kimage_alloc_crash_control_pages(), and this function, when allocating control pages, will first align image->control_page up to the nearest `(1 << order) << PAGE_SHIFT` boundary, then use this value as the starting address of the next control page. This ensures that the newly allocated control page will use the correct starting address and not overlap with previously allocated control pages. Although it does not affect the correctness of the final result, it is better for us to set image->control_page to the correct value, in case it might be used elsewhere in the future, potentially causing errors. Therefore, after successfully allocating a control page, image->control_page should be updated to `hole_end + 1`, rather than hole_end. Link: https://lkml.kernel.org/r/20231221042308.11076-1-ytcoode@gmail.com Signed-off-by: Yuntao Wang Cc: Baoquan He Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton commit 3177e6315b12839ea7be2810ae6b461b123e026e Author: Yuntao Wang Date: Thu Dec 21 18:17:02 2023 +0800 x86/kexec: fix incorrect end address passed to kernel_ident_mapping_init() kernel_ident_mapping_init() takes an exclusive memory range [pstart, pend) where pend is not included in the range, while res represents an inclusive memory range [start, end] where end is considered part of the range. Passing [start, end] rather than [start, end+1) to kernel_ident_mapping_init() may result in the identity mapping for the end address not being set up. For example, when res->start is equal to res->end, kernel_ident_mapping_init() will not establish any identity mapping. Similarly, when the value of res->end is a multiple of 2M and the page table maps 2M pages, kernel_ident_mapping_init() will also not set up identity mapping for res->end. Therefore, passing res->end directly to kernel_ident_mapping_init() is incorrect, the correct end address should be `res->end + 1`. Link: https://lkml.kernel.org/r/20231221101702.20956-1-ytcoode@gmail.com Signed-off-by: Yuntao Wang Cc: Baoquan He Cc: Bjorn Helgaas Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Simon Horman Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 037d88f0dd87553871a8b143586399122adf49ba Author: Tanzir Hasan Date: Thu Dec 21 20:32:33 2023 +0000 lib/trace_readwrite.c:: replace asm-generic/io with linux/io asm-generic/io.h can be replaced with linux/io.h and the file will still build correctly. It is an asm-generic file which should be avoided if possible. Link: https://lkml.kernel.org/r/20231221-tracereadwrite-v1-1-a434f25180c7@google.com Signed-off-by: Tanzir Hasan Suggested-by: Al Viro Signed-off-by: Andrew Morton commit 8e226a0a8dc8b80b792338750cd5d26675ce29bc Author: Randy Dunlap Date: Thu Dec 21 07:13:42 2023 +0900 nilfs2: cpfile: fix some kernel-doc warnings Correct the function parameter names for nilfs_cpfile_get_info(): cpfile.c:564: warning: Function parameter or member 'cnop' not described in 'nilfs_cpfile_get_cpinfo' cpfile.c:564: warning: Function parameter or member 'mode' not described in 'nilfs_cpfile_get_cpinfo' cpfile.c:564: warning: Function parameter or member 'buf' not described in 'nilfs_cpfile_get_cpinfo' cpfile.c:564: warning: Function parameter or member 'cisz' not described in 'nilfs_cpfile_get_cpinfo' cpfile.c:564: warning: Excess function parameter 'cno' description in 'nilfs_cpfile_get_cpinfo' cpfile.c:564: warning: Excess function parameter 'ci' description in 'nilfs_cpfile_get_cpinfo' Also add missing descriptions of the function's specification. [ konishi.ryusuke@gmail.com: filled in missing descriptions ] Link: https://lkml.kernel.org/r/20231220065931.2372-1-rdunlap@infradead.org Link: https://lkml.kernel.org/r/20231220221342.11505-1-konishi.ryusuke@gmail.com Signed-off-by: Randy Dunlap Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 5f981878c71eaa8dc5563805152bd129a73a90be Author: Randy Dunlap Date: Tue Dec 19 21:49:45 2023 -0800 stacktrace: fix kernel-doc typo Change @task to @tsk to prevent kernel-doc warnings: kernel/stacktrace.c:138: warning: Excess function parameter 'task' description in 'stack_trace_save_tsk' kernel/stacktrace.c:138: warning: Function parameter or member 'tsk' not described in 'stack_trace_save_tsk' Link: https://lkml.kernel.org/r/20231220054945.17663-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton commit f22c3634361c970ca49c389f4c3dacb41295bf0d Author: Kuan-Ying Lee Date: Wed Dec 20 15:36:28 2023 +0800 scripts/checkstack.pl: fix no space expression between sp and offset When I use older version aarch64 objdump (2.24) to disassemble aarch64 vmlinux, I get the result like below. There is no space between sp and offset. ffff800008010000 : ffff800008010000: d503233f hint #0x19 ffff800008010004: a9bc7bfd stp x29, x30, [sp,#-64]! ffff800008010008: 90011e60 adrp x0, ffff80000a3dc000 ffff80000801000c: 910003fd mov x29, sp ffff800008010010: a9025bf5 stp x21, x22, [sp,#32] When I use newer version aarch64 objdump (2.35), I get the result like below. There is a space between sp and offset. ffff800008010000 : ffff800008010000: d503233f paciasp ffff800008010004: a9bc7bfd stp x29, x30, [sp, #-64]! ffff800008010008: 90011e60 adrp x0, ffff80000a3dc000 ffff80000801000c: 910003fd mov x29, sp ffff800008010010: a9025bf5 stp x21, x22, [sp, #32] Add no space support of regular expression for old version objdump. Link: https://lkml.kernel.org/r/20231220073629.2658-1-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Cc: Casper Li Cc: AngeloGioacchino Del Regno Cc: Chinwen Chang Cc: Matthias Brugger Cc: Qun-Wei Lin Signed-off-by: Andrew Morton commit 22bb6bcd4c2b2f22865bdfdd7c772405ed3cbfd3 Author: Yuntao Wang Date: Wed Dec 20 23:41:05 2023 +0800 x86/kexec: fix incorrect argument passed to kexec_dprintk() kexec_dprintk() expects the last argument to be kbuf.memsz, but the actual argument being passed is kbuf.bufsz. Although these two values are currently equal, it is better to pass the correct one, in case these two values become different in the future. Link: https://lkml.kernel.org/r/20231220154105.215610-1-ytcoode@gmail.com Signed-off-by: Yuntao Wang Cc: Baoquan He Signed-off-by: Andrew Morton commit 43132282d8efc3fe8a90ecd97a715559ed510b5d Author: Yuntao Wang Date: Wed Dec 20 11:01:24 2023 +0800 x86/kexec: use pr_err() instead of kexec_dprintk() when an error occurs When detecting an error, the current code uses kexec_dprintk() to output log message. This is not quite appropriate as kexec_dprintk() is mainly used for outputting debugging messages, rather than error messages. Replace kexec_dprintk() with pr_err(). This also makes the output method for this error log align with the output method for other error logs in this function. Additionally, the last return statement in set_page_address() is unnecessary, remove it. Link: https://lkml.kernel.org/r/20231220030124.149160-1-ytcoode@gmail.com Signed-off-by: Yuntao Wang Cc: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: "Eric W. Biederman" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 5b130948d53ae8fe426e8a0af725a634d972739f Author: Kevin Hao Date: Tue Dec 19 18:09:18 2023 +0900 nilfs2: add missing set_freezable() for freezable kthread The kernel thread function nilfs_segctor_thread() invokes the try_to_freeze() in its loop. But all the kernel threads are non-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Link: https://lkml.kernel.org/r/20231219090918.2329-1-konishi.ryusuke@gmail.com Signed-off-by: Kevin Hao Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit d391615618e8b2c30ef1e09c1705a7b1751f74f0 Author: Ahelenia Ziemiańska Date: Tue Dec 19 23:24:14 2023 +0100 kernel: relay: remove relay_file_splice_read dead code, doesn't work Documentation/filesystems/relay.rst says to use return debugfs_create_file(filename, mode, parent, buf, &relay_file_operations); and this is the only way relay_file_operations is used. Thus: debugfs_create_file(&relay_file_operations) -> __debugfs_create_file(&debugfs_full_proxy_file_operations, &relay_file_operations) -> dentry{inode: {i_fop: &debugfs_full_proxy_file_operations}, d_fsdata: &relay_file_operations | DEBUGFS_FSDATA_IS_REAL_FOPS_BIT} debugfs_full_proxy_file_operations.open is full_proxy_open, which extracts the &relay_file_operations from the dentry, and allocates via __full_proxy_fops_init() new fops, with trivial wrappers around release, llseek, read, write, poll, and unlocked_ioctl, then replaces the fops on the opened file therewith. Naturally, all thusly-created debugfs files have .splice_read = NULL. This was introduced in commit 49d200deaa68 ("debugfs: prevent access to removed files' private data") from 2016-03-22. AFAICT, relay_file_operations is the only struct file_operations used for debugfs which defines a .splice_read callback. Hooking it up with > diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c > index 5063434be0fc..952fcf5b2afa 100644 > --- a/fs/debugfs/file.c > +++ b/fs/debugfs/file.c > @@ -328,6 +328,11 @@ FULL_PROXY_FUNC(write, ssize_t, filp, > loff_t *ppos), > ARGS(filp, buf, size, ppos)); > > +FULL_PROXY_FUNC(splice_read, long, in, > + PROTO(struct file *in, loff_t *ppos, struct pipe_inode_info *pipe, > + size_t len, unsigned int flags), > + ARGS(in, ppos, pipe, len, flags)); > + > FULL_PROXY_FUNC(unlocked_ioctl, long, filp, > PROTO(struct file *filp, unsigned int cmd, unsigned long arg), > ARGS(filp, cmd, arg)); > @@ -382,6 +387,8 @@ static void __full_proxy_fops_init(struct file_operations *proxy_fops, > proxy_fops->write = full_proxy_write; > if (real_fops->poll) > proxy_fops->poll = full_proxy_poll; > + if (real_fops->splice_read) > + proxy_fops->splice_read = full_proxy_splice_read; > if (real_fops->unlocked_ioctl) > proxy_fops->unlocked_ioctl = full_proxy_unlocked_ioctl; > } shows it just doesn't work, and splicing always instantly returns empty (subsequent reads actually return the contents). No-one noticed it became dead code in 2016, who knows if it worked back then. Clearly no-one cares; just delete it. Link: https://lkml.kernel.org/r/dtexwpw6zcdx7dkx3xj5gyjp5syxmyretdcbcdtvrnukd4vvuh@tarta.nabijaczleweli.xyz Signed-off-by: Ahelenia Ziemiańska Cc: Greg Kroah-Hartman Cc: Li kunyu Cc: Mike Rapoport (IBM) Cc: Rafael J. Wysocki Cc: Suren Baghdasaryan Cc: Zhang Zhengming Cc: Zhao Lei Signed-off-by: Andrew Morton commit 50bc98323c0f1ffa3bf0c2d80b8842117009ccf5 Author: Tiezhu Yang Date: Tue Dec 19 20:50:01 2023 +0800 docs: submit-checklist: remove all of "make namespacecheck" After commit 7dfbea4c468c ("scripts: remove namespace.pl"), scripts/namespace.pl has been removed from the kernel, and "make namespacecheck" has been removed from the English version of submit-checklist.rst, so also remove it in the related translations. Link: https://lkml.kernel.org/r/20231219125008.23007-6-yangtiezhu@loongson.cn Signed-off-by: Tiezhu Yang Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 712afc7c410efd3ffd8cad5d25a0fcb20f320ba3 Author: Tiezhu Yang Date: Tue Dec 19 20:50:00 2023 +0800 scripts/checkstack.pl: change min_stack to 512 by default According to Documentation/process/submit-checklist.rst, checkstack does not point out problems explicitly, but any one function that uses more than 512 bytes on the stack is a candidate for change, hence it is better to omit any stack frame sizes smaller than 512 bytes, just change min_stack to 512 by default. Link: https://lkml.kernel.org/r/20231219125008.23007-5-yangtiezhu@loongson.cn Signed-off-by: Tiezhu Yang Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 66d25cbe29f307c0a3c53b1b1efd0f597d0756a1 Author: Tiezhu Yang Date: Tue Dec 19 20:49:59 2023 +0800 scripts/checkstack.pl: match all stack sizes for some archs For some unknown reason the regular expression for checkstack only matches three digit numbers starting with the number "3", or any higher number. Which means that it skips any stack sizes smaller than 304 bytes. This makes the checkstack script a bit less useful than it could be. Change the script to match any number. To be filtered out stack sizes can be configured with the min_stack variable, which omits any stack frame sizes smaller than 100 bytes by default. This is similar with commit aab1f809d754 ("scripts/checkstack.pl: match all stack sizes for s390"). Link: https://lkml.kernel.org/r/20231219125008.23007-4-yangtiezhu@loongson.cn Signed-off-by: Tiezhu Yang Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 52f5628819363cd16efd2b9f35706b33f41842b3 Author: Tiezhu Yang Date: Tue Dec 19 20:49:58 2023 +0800 scripts/checkstack.pl: add min_stack to the usage comment After commit 572220aad525 ("scripts/checkstack.pl: Add argument to print stacks greather than value."), it is appropriate to add min_stack to the usage comment, then the users know explicitly that "min_stack" can be specified like "arch". Link: https://lkml.kernel.org/r/20231219125008.23007-3-yangtiezhu@loongson.cn Signed-off-by: Tiezhu Yang Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit dd8e05c5dd04210bb6073c594fa9be12c6473ae9 Author: Tiezhu Yang Date: Tue Dec 19 20:49:57 2023 +0800 scripts/checkstack.pl: remove ia64 support Patch series "Modify some code about checkstack". This patch (of 5): After commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"), the ia64 port has been removed from the kernel, so also remove the ia64 specific bits from the checkstack.pl script. Link: https://lkml.kernel.org/r/20231219125008.23007-1-yangtiezhu@loongson.cn Link: https://lkml.kernel.org/r/20231219125008.23007-2-yangtiezhu@loongson.cn Signed-off-by: Tiezhu Yang Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 90ca22513ed5d7cf546c7c8d35a03ec2a2f5c87e Author: Mathis Marion Date: Tue Dec 19 14:11:54 2023 +0100 lib: crc_ccitt_false() is identical to crc_itu_t() crc_ccitt_false() was introduced in commit 0d85adb5fbd33 ("lib/crc-ccitt: Add CCITT-FALSE CRC16 variant"), but it is redundant with crc_itu_t(). Since the latter is more used, it is the one being kept. Link: https://lkml.kernel.org/r/20231219131154.748577-1-Mathis.Marion@silabs.com Signed-off-by: Mathis Marion Cc: Andrey Smirnov Cc: Andrey Vostrikov Cc: Jérôme Pouiller Signed-off-by: Andrew Morton commit bc09d1dea84efaff022c09b9c5175b2a75553006 Author: Uwe Kleine-König Date: Tue Dec 19 19:28:09 2023 +0100 lib: add note about process exit message for DEBUG_STACK_USAGE DEBUG_STACK_USAGE doesn't only have an influence on the output of sysrq-T and sysrq-P, it also enables a message at process exit. See check_stack_usage() in kernel/exit.c where this is implemented. Link: https://lkml.kernel.org/r/20231219182808.210284-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Cc: Douglas Anderson Cc: Geert Uytterhoeven Cc: Kees Cook Cc: Marco Elver Cc: "Paul E. McKenney" Cc: Pengutronix Kernel Team Cc: Petr Mladek Cc: Randy Dunlap Cc: Stephen Boyd Cc: Zhaoyang Huang Signed-off-by: Andrew Morton commit d089622b32c389d6d6a1fa6bbd9e3f121b9bcd5b Author: Youling Tang Date: Sat Dec 16 14:40:54 2023 +0800 checkstack: add loongarch support for scripts/checkstack.pl scripts/checkstack.pl lacks support for the loongarch architecture. Add support to detect "addi.{w,d} $sp, $sp, -FRAME_SIZE" stack frame generation instruction. Link: https://lkml.kernel.org/r/MW4PR84MB314514273F0B7DBCC5E35A978192A@MW4PR84MB3145.NAMPRD84.PROD.OUTLOOK.COM Signed-off-by: Youling Tang Acked-by: Huacai Chen Cc: John Paul Adrian Glaubitz Signed-off-by: Andrew Morton commit d738bced865a1473ea9a5e54734def2d40052e0c Author: Youling Tang Date: Sat Dec 16 14:51:28 2023 +0800 scripts/decodecode: add support for LoongArch An example how to invoke decodecode for loongarch64: $ echo 'Code: 380839f6 380831f9 28412bae <24000ca6> 004081ad 0014cb50 004083e8 02bff34c 58008e91' | \ ARCH=loongarch CROSS_COMPILE=loongarch64-linux-gnu- \ ./scripts/decodecode Code: 380839f6 380831f9 28412bae <24000ca6> 004081ad 0014cb50 004083e8 02bff34c 58008e91 All code ======== 0: 380839f6 ldx.w $fp, $t3, $t2 4: 380831f9 ldx.w $s2, $t3, $t0 8: 28412bae ld.h $t2, $s6, 74(0x4a) c:* 24000ca6 ldptr.w $a2, $a1, 12(0xc) <-- trapping instruction 10: 004081ad slli.w $t1, $t1, 0x0 14: 0014cb50 and $t4, $s3, $t6 18: 004083e8 slli.w $a4, $s8, 0x0 1c: 02bff34c addi.w $t0, $s3, -4(0xffc) 20: 58008e91 beq $t8, $t5, 140(0x8c) # 0xac Code starting with the faulting instruction =========================================== 0: 24000ca6 ldptr.w $a2, $a1, 12(0xc) 4: 004081ad slli.w $t1, $t1, 0x0 8: 0014cb50 and $t4, $s3, $t6 c: 004083e8 slli.w $a4, $s8, 0x0 10: 02bff34c addi.w $t0, $s3, -4(0xffc) 14: 58008e91 beq $t8, $t5, 140(0x8c) # 0xa0 Link: https://lkml.kernel.org/r/MW4PR84MB3145B99B9677BB7887BB26CD8192A@MW4PR84MB3145.NAMPRD84.PROD.OUTLOOK.COM Signed-off-by: Youling Tang Acked-by: Huacai Chen Signed-off-by: Andrew Morton commit 18d565ea95fe553f442c5bbc5050415bab3c3fa4 Author: Yuntao Wang Date: Sun Dec 17 11:35:27 2023 +0800 kexec_file: fix incorrect temp_start value in locate_mem_hole_top_down() temp_end represents the address of the last available byte. Therefore, the starting address of the memory segment with temp_end as its last available byte and a size of `kbuf->memsz`, that is, the value of temp_start, should be `temp_end - kbuf->memsz + 1` instead of `temp_end - kbuf->memsz`. Additionally, use the ALIGN_DOWN macro instead of open-coding it directly in locate_mem_hole_top_down() to improve code readability. Link: https://lkml.kernel.org/r/20231217033528.303333-3-ytcoode@gmail.com Signed-off-by: Yuntao Wang Acked-by: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: "Eric W. Biederman" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 816d334afa85c836080b41bb6238aea845615ad9 Author: Yuntao Wang Date: Sun Dec 17 11:35:26 2023 +0800 kexec: modify the meaning of the end parameter in kimage_is_destination_range() The end parameter received by kimage_is_destination_range() should be the last valid byte address of the target memory segment plus 1. However, in the locate_mem_hole_bottom_up() and locate_mem_hole_top_down() functions, the corresponding value passed to kimage_is_destination_range() is the last valid byte address of the target memory segment, which is 1 less. There are two ways to fix this bug. We can either correct the logic of the locate_mem_hole_bottom_up() and locate_mem_hole_top_down() functions, or we can fix kimage_is_destination_range() by making the end parameter represent the last valid byte address of the target memory segment. Here, we choose the second approach. Due to the modification to kimage_is_destination_range(), we also need to adjust its callers, such as kimage_alloc_normal_control_pages() and kimage_alloc_page(). Link: https://lkml.kernel.org/r/20231217033528.303333-2-ytcoode@gmail.com Signed-off-by: Yuntao Wang Acked-by: Baoquan He Cc: Borislav Petkov (AMD) Cc: Dave Hansen Cc: "Eric W. Biederman" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit 5c28913ed04b29efb75c4ddd6a13469952351858 Author: Bagas Sanjaya Date: Mon Dec 18 20:28:31 2023 +0700 MAINTAINERS: remove Ohad Ben-Cohen from hwspinlock subsystem Commit 62c46d55688894 ("MAINTAINERS: Removing Ohad from remoteproc/rpmsg maintenance") removes his MAINTAINERS entry in regards to remoteproc subsystem due to his inactivity (the last commit with his Signed-off-by is 99c429cb4e628e ("remoteproc/wkup_m3: Use MODULE_DEVICE_TABLE to export alias") which is authored in 2015 and his last LKML message prior to 62c46d55688894 was [1]). Remove also his MAINTAINERS entry for hwspinlock subsystem as there is no point of Cc'ing maintainers who never respond in a long time. [1]: https://lore.kernel.org/r/CAK=Wgbbcyi36ef1-PV8VS=M6nFoQnFGUDWy6V7OCnkt0dDrtfg@mail.gmail.com/ Link: https://lkml.kernel.org/r/20231218132830.5104-2-bagasdotme@gmail.com Signed-off-by: Bagas Sanjaya Acked-by: Ohad Ben Cohen Cc: Baolin Wang Cc: Bjorn Andersson Cc: Mathieu Poirier Signed-off-by: Andrew Morton commit 1ae41dffd48a700f4bf69e5377f4311de7d92b78 Author: Tanzir Hasan Date: Thu Dec 21 23:11:01 2023 +0000 mm/damon/vaddr: change asm-generic/mman-common.h to linux/mman.h asm-generic/mman-common.h can be replaced by linux/mman.h and the file will still build correctly. It is an asm-generic file which should be avoided if possible. Link: https://lkml.kernel.org/r/20231221-asmgenericvaddr-v1-1-742b170c914e@google.com Fixes: 6dea8add4d28 ("mm/damon/vaddr: support DAMON-based Operation Schemes") Signed-off-by: Tanzir Hasan Suggested-by: Al Viro Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton commit e99fb98d478a0480d50e334df21bef12fb74e17f Author: Kefeng Wang Date: Fri Dec 22 15:02:03 2023 +0800 mm: remove unnecessary ia64 code and comment IA64 has gone with commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"), remove unnecessary ia64 special mm code and comment too. Link: https://lkml.kernel.org/r/20231222070203.2966980-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit 4a8ffab02db55c8a70063c57519cadf72d480ed4 Author: David Hildenbrand Date: Wed Dec 20 23:45:04 2023 +0100 mm: remove one last reference to page_add_*_rmap() Let's fixup one remaining comment. Note that the only trace remaining of the old rmap interface is in an example in Documentation/trace/ftrace.rst, that we'll just leave alone. Link: https://lkml.kernel.org/r/20231220224504.646757-41-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit e78a13fd16bb9d9712f61be2bd6612a092ce66ea Author: David Hildenbrand Date: Wed Dec 20 23:45:03 2023 +0100 mm/rmap: rename COMPOUND_MAPPED to ENTIRELY_MAPPED We removed all "bool compound" and RMAP_COMPOUND parameters. Let's remove the remaining "compound" terminology by making COMPOUND_MAPPED match the "folio->_entire_mapcount" terminology, renaming it to ENTIRELY_MAPPED. ENTIRELY_MAPPED is only used when the whole folio is mapped using a single page table entry (e.g., a single PMD mapping a PMD-sized THP). For now, we don't support mapping any THP bigger than that, so ENTIRELY_MAPPED only applies to PMD-mapped PMD-sized THP only. Link: https://lkml.kernel.org/r/20231220224504.646757-40-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit e3b4b1374f87c71e9309efc6149f113cdd17af72 Author: David Hildenbrand Date: Wed Dec 20 23:45:02 2023 +0100 mm: convert page_try_share_anon_rmap() to folio_try_share_anon_rmap_[pte|pmd]() Let's convert it like we converted all the other rmap functions. Don't introduce folio_try_share_anon_rmap_ptes() for now, as we don't have a user that wants rmap batching in sight. Pretty easy to add later. All users are easy to convert -- only ksm.c doesn't use folios yet but that is left for future work -- so let's just do it in a single shot. While at it, turn the BUG_ON into a WARN_ON_ONCE. Note that page_try_share_anon_rmap() so far didn't care about pte/pmd mappings (no compound parameter). We're changing that so we can perform better sanity checks and make the code actually more readable/consistent. For example, __folio_rmap_sanity_checks() will make sure that a PMD range actually falls completely into the folio. Link: https://lkml.kernel.org/r/20231220224504.646757-39-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit a13d096471ec0ac5c6fc90fbcd57e8430024046a Author: David Hildenbrand Date: Wed Dec 20 23:45:01 2023 +0100 mm/rmap: remove page_try_dup_anon_rmap() All users are gone, remove page_try_dup_anon_rmap() and any remaining traces. Link: https://lkml.kernel.org/r/20231220224504.646757-38-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 08e7795e2444c3df9292f4ac7092be6168166a46 Author: David Hildenbrand Date: Wed Dec 20 23:45:00 2023 +0100 mm/memory: page_try_dup_anon_rmap() -> folio_try_dup_anon_rmap_pte() Let's convert copy_nonpresent_pte(). While at it, perform some more folio conversion. Link: https://lkml.kernel.org/r/20231220224504.646757-37-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 96c772c25c89f35091ce924117602d04de82a0fe Author: David Hildenbrand Date: Wed Dec 20 23:44:59 2023 +0100 mm/huge_memory: page_try_dup_anon_rmap() -> folio_try_dup_anon_rmap_pmd() Let's convert copy_huge_pmd() and fixup the comment in copy_huge_pud(). While at it, perform more folio conversion in copy_huge_pmd(). Link: https://lkml.kernel.org/r/20231220224504.646757-36-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 61d90309b7156d54c5d358cb5d8bf55b33d233d2 Author: David Hildenbrand Date: Wed Dec 20 23:44:58 2023 +0100 mm/rmap: introduce folio_try_dup_anon_rmap_[pte|ptes|pmd]() The last user of page_needs_cow_for_dma() and __page_dup_rmap() are gone, remove them. Add folio_try_dup_anon_rmap_ptes() right away, we want to perform rmap baching during fork() soon. Link: https://lkml.kernel.org/r/20231220224504.646757-35-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit d8ef5e311d7bfde54b60ab45026f206eff31b2d2 Author: David Hildenbrand Date: Wed Dec 20 23:44:57 2023 +0100 mm/rmap: convert page_dup_file_rmap() to folio_dup_file_rmap_[pte|ptes|pmd]() Let's convert page_dup_file_rmap() like the other rmap functions. As there is only a single caller, convert that single caller right away and remove page_dup_file_rmap(). Add folio_dup_file_rmap_ptes() right away, we want to perform rmap baching during fork() soon. Link: https://lkml.kernel.org/r/20231220224504.646757-34-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 4d8f7418e8ba36036c8486d92d9591c368ab9b85 Author: David Hildenbrand Date: Wed Dec 20 23:44:56 2023 +0100 mm/rmap: remove page_remove_rmap() All callers are gone, let's remove it and some leftover traces. Link: https://lkml.kernel.org/r/20231220224504.646757-33-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 5a0033f0285e0bb29f6e4d1593d4519c91ed882a Author: David Hildenbrand Date: Wed Dec 20 23:44:55 2023 +0100 Documentation: stop referring to page_remove_rmap() Refer to folio_remove_rmap_*() instaed. Link: https://lkml.kernel.org/r/20231220224504.646757-32-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit ca1a0746182c3c059573d7e4554d335cae5306dc Author: David Hildenbrand Date: Wed Dec 20 23:44:54 2023 +0100 mm/rmap: page_remove_rmap() -> folio_remove_rmap_pte() Let's convert try_to_unmap_one() and try_to_migrate_one(). Link: https://lkml.kernel.org/r/20231220224504.646757-31-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 5b205c7f2684764c8a9cc3442986623d4d6e87f1 Author: David Hildenbrand Date: Wed Dec 20 23:44:53 2023 +0100 mm/migrate_device: page_remove_rmap() -> folio_remove_rmap_pte() Let's convert migrate_vma_collect_pmd(). While at it, perform more folio conversion. Link: https://lkml.kernel.org/r/20231220224504.646757-30-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit c46265030b0f400ef89833bb51da62676d2f855a Author: David Hildenbrand Date: Wed Dec 20 23:44:52 2023 +0100 mm/memory: page_remove_rmap() -> folio_remove_rmap_pte() Let's convert zap_pte_range() and closely-related tlb_flush_rmap_batch(). While at it, perform some more folio conversion in zap_pte_range(). Link: https://lkml.kernel.org/r/20231220224504.646757-29-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 18e8612e56244c6db3254d435a22344856a9c55b Author: David Hildenbrand Date: Wed Dec 20 23:44:51 2023 +0100 mm/ksm: page_remove_rmap() -> folio_remove_rmap_pte() Let's convert replace_page(). Link: https://lkml.kernel.org/r/20231220224504.646757-28-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 35668a4321461505dcc39b56a0d97b0ba2c99668 Author: David Hildenbrand Date: Wed Dec 20 23:44:50 2023 +0100 mm/khugepaged: page_remove_rmap() -> folio_remove_rmap_pte() Let's convert __collapse_huge_page_copy_succeeded() and collapse_pte_mapped_thp(). While at it, perform some more folio conversion in __collapse_huge_page_copy_succeeded(). We can get rid of release_pte_page(). Link: https://lkml.kernel.org/r/20231220224504.646757-27-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit a8e61d584eda0d5532b0bbfe3c2427d2688d3c83 Author: David Hildenbrand Date: Wed Dec 20 23:44:49 2023 +0100 mm/huge_memory: page_remove_rmap() -> folio_remove_rmap_pmd() Let's convert zap_huge_pmd() and set_pmd_migration_entry(). While at it, perform some more folio conversion. Link: https://lkml.kernel.org/r/20231220224504.646757-26-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 5cc9695f06b065168f5c893c8e006b6a8a2c9c91 Author: David Hildenbrand Date: Wed Dec 20 23:44:48 2023 +0100 kernel/events/uprobes: page_remove_rmap() -> folio_remove_rmap_pte() Let's convert __replace_page(). Link: https://lkml.kernel.org/r/20231220224504.646757-25-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit b06dc281aa9901076898d4d0a7bde588f11bc204 Author: David Hildenbrand Date: Wed Dec 20 23:44:47 2023 +0100 mm/rmap: introduce folio_remove_rmap_[pte|ptes|pmd]() Let's mimic what we did with folio_add_file_rmap_*() and folio_add_anon_rmap_*() so we can similarly replace page_remove_rmap() next. Make the compiler always special-case on the granularity by using __always_inline. We're adding folio_remove_rmap_ptes() handling right away, as we want to use that soon for batching rmap operations when unmapping PTE-mapped large folios. Link: https://lkml.kernel.org/r/20231220224504.646757-24-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 0cae959e3abf19ba62805f6e6a8b42b6cd9ed3e3 Author: David Hildenbrand Date: Wed Dec 20 23:44:46 2023 +0100 mm/rmap: remove RMAP_COMPOUND No longer used, let's remove it and clarify RMAP_NONE/RMAP_EXCLUSIVE a bit. Link: https://lkml.kernel.org/r/20231220224504.646757-23-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 84f0169e6c8a613012722e0d63302f9da4a72099 Author: David Hildenbrand Date: Wed Dec 20 23:44:45 2023 +0100 mm/rmap: remove page_add_anon_rmap() All users are gone, remove it and all traces. Link: https://lkml.kernel.org/r/20231220224504.646757-22-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit b832a354d787bfbdea5c226f0d77cc1a222d09f8 Author: David Hildenbrand Date: Wed Dec 20 23:44:44 2023 +0100 mm/memory: page_add_anon_rmap() -> folio_add_anon_rmap_pte() Let's convert restore_exclusive_pte() and do_swap_page(). While at it, perform some folio conversion in restore_exclusive_pte(). Link: https://lkml.kernel.org/r/20231220224504.646757-21-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit da7dc0afe243874b6ad25f5070aa728349e4e0fd Author: David Hildenbrand Date: Wed Dec 20 23:44:43 2023 +0100 mm/swapfile: page_add_anon_rmap() -> folio_add_anon_rmap_pte() Let's convert unuse_pte(). Link: https://lkml.kernel.org/r/20231220224504.646757-20-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 977295349eb7826c50e2841915de96eab3a502c2 Author: David Hildenbrand Date: Wed Dec 20 23:44:42 2023 +0100 mm/ksm: page_add_anon_rmap() -> folio_add_anon_rmap_pte() Let's convert replace_page(). While at it, perform some folio conversion. Link: https://lkml.kernel.org/r/20231220224504.646757-19-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit a15dc4785c98f360bdca78483455e0aff30242cb Author: David Hildenbrand Date: Wed Dec 20 23:44:41 2023 +0100 mm/migrate: page_add_anon_rmap() -> folio_add_anon_rmap_pte() Let's convert remove_migration_pte(). Link: https://lkml.kernel.org/r/20231220224504.646757-18-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 395db7b190892f1ca8d31e1fc83198e2531335f6 Author: David Hildenbrand Date: Wed Dec 20 23:44:40 2023 +0100 mm/huge_memory: page_add_anon_rmap() -> folio_add_anon_rmap_pmd() Let's convert remove_migration_pmd(). No need to set RMAP_COMPOUND, that we will remove soon. Link: https://lkml.kernel.org/r/20231220224504.646757-17-david@redhat.com Signed-off-by: David Hildenbrand Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 91b2978a348073db0e47b380fa66c865eb25f3d8 Author: David Hildenbrand Date: Wed Dec 20 23:44:39 2023 +0100 mm/huge_memory: batch rmap operations in __split_huge_pmd_locked() Let's use folio_add_anon_rmap_ptes(), batching the rmap operations. While at it, use more folio operations (but only in the code branch we're touching), use VM_WARN_ON_FOLIO(), and pass RMAP_EXCLUSIVE instead of manually setting PageAnonExclusive. We should never see non-anon pages on that branch: otherwise, the existing page_add_anon_rmap() call would have been flawed already. Link: https://lkml.kernel.org/r/20231220224504.646757-16-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Signed-off-by: Andrew Morton commit 8bd5130070fbf2247a97c5361427a810522ac98a Author: David Hildenbrand Date: Wed Dec 20 23:44:38 2023 +0100 mm/rmap: introduce folio_add_anon_rmap_[pte|ptes|pmd]() Let's mimic what we did with folio_add_file_rmap_*() so we can similarly replace page_add_anon_rmap() next. Make the compiler always special-case on the granularity by using __always_inline. For the PageAnonExclusive sanity checks, when adding a PMD mapping, we're now also checking each individual subpage covered by that PMD, instead of only the head page. Note that the new functions ignore the RMAP_COMPOUND flag, which we will remove as soon as page_add_anon_rmap() is gone. Link: https://lkml.kernel.org/r/20231220224504.646757-15-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Signed-off-by: Andrew Morton commit 96fd74958c558d6976bbc303dda0efa389182fab Author: David Hildenbrand Date: Wed Dec 20 23:44:37 2023 +0100 mm/rmap: factor out adding folio mappings into __folio_add_rmap() Let's factor it out to prepare for reuse as we convert page_add_anon_rmap() to folio_add_anon_rmap_[pte|ptes|pmd](). Make the compiler always special-case on the granularity by using __always_inline. Link: https://lkml.kernel.org/r/20231220224504.646757-14-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Signed-off-by: Andrew Morton commit be6e57cfabe99a5d3b3869103c4ea0ed4a9692d4 Author: David Hildenbrand Date: Wed Dec 20 23:44:36 2023 +0100 mm/rmap: remove page_add_file_rmap() All users are gone, let's remove it. Link: https://lkml.kernel.org/r/20231220224504.646757-13-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit 7123e19c3c9d1539c899ac8d919498e3393bb288 Author: David Hildenbrand Date: Wed Dec 20 23:44:35 2023 +0100 mm/userfaultfd: page_add_file_rmap() -> folio_add_file_rmap_pte() Let's convert mfill_atomic_install_pte(). Link: https://lkml.kernel.org/r/20231220224504.646757-12-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit c4dffb0bc237d5e3b51adf947062e65ed34ac3c3 Author: David Hildenbrand Date: Wed Dec 20 23:44:34 2023 +0100 mm/migrate: page_add_file_rmap() -> folio_add_file_rmap_pte() Let's convert remove_migration_pte(). Link: https://lkml.kernel.org/r/20231220224504.646757-11-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit 14d85a6e88a658e29d9c8d6c521e7f824f2f2c6c Author: David Hildenbrand Date: Wed Dec 20 23:44:33 2023 +0100 mm/huge_memory: page_add_file_rmap() -> folio_add_file_rmap_pmd() Let's convert remove_migration_pmd() and while at it, perform some folio conversion. Link: https://lkml.kernel.org/r/20231220224504.646757-10-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit ef37b2ea08ace7b5fbcd569d703be1903afd12f9 Author: David Hildenbrand Date: Wed Dec 20 23:44:32 2023 +0100 mm/memory: page_add_file_rmap() -> folio_add_file_rmap_[pte|pmd]() Let's convert insert_page_into_pte_locked() and do_set_pmd(). While at it, perform some folio conversion. Link: https://lkml.kernel.org/r/20231220224504.646757-9-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit 68f0320824fa59c5429cbc811e6c46e7a30ea32c Author: David Hildenbrand Date: Wed Dec 20 23:44:31 2023 +0100 mm/rmap: convert folio_add_file_rmap_range() into folio_add_file_rmap_[pte|ptes|pmd]() Let's get rid of the compound parameter and instead define explicitly which mappings we're adding. That is more future proof, easier to read and harder to mess up. Use an enum to express the granularity internally. Make the compiler always special-case on the granularity by using __always_inline. Replace the "compound" check by a switch-case that will be removed by the compiler completely. Add plenty of sanity checks with CONFIG_DEBUG_VM. Replace the folio_test_pmd_mappable() check by a config check in the caller and sanity checks. Convert the single user of folio_add_file_rmap_range(). While at it, consistently use "int" instead of "unisgned int" in rmap code when dealing with mapcounts and the number of pages. This function design can later easily be extended to PUDs and to batch PMDs. Note that for now we don't support anything bigger than PMD-sized folios (as we cleanly separated hugetlb handling). Sanity checks will catch if that ever changes. Next up is removing page_remove_rmap() along with its "compound" parameter and smilarly converting all other rmap functions. Link: https://lkml.kernel.org/r/20231220224504.646757-8-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit a4ea18641d8330a97d7d66f0ab017b690099ffce Author: David Hildenbrand Date: Wed Dec 20 23:44:30 2023 +0100 mm/rmap: add hugetlb sanity checks for anon rmap handling Let's make sure we end up with the right folios in the right functions when adding an anon rmap, just like we already do in the other rmap functions. Link: https://lkml.kernel.org/r/20231220224504.646757-7-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Ryan Roberts Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Cc: Yin Fengwei Signed-off-by: Andrew Morton commit 0c2ec32bf0b2f0d7ccb98c53ee5d255d68e73595 Author: David Hildenbrand Date: Wed Dec 20 23:44:29 2023 +0100 mm/rmap: introduce and use hugetlb_try_share_anon_rmap() hugetlb rmap handling differs quite a lot from "ordinary" rmap code. For example, hugetlb currently only supports entire mappings, and treats any mapping as mapped using a single "logical PTE". Let's move it out of the way so we can overhaul our "ordinary" rmap. implementation/interface. So let's introduce and use hugetlb_try_dup_anon_rmap() to make all hugetlb handling use dedicated hugetlb_* rmap functions. Add sanity checks that we end up with the right folios in the right functions. Note that try_to_unmap_one() does not need care. Easy to spot because among all that nasty hugetlb special-casing in that function, we're not using set_huge_pte_at() on the anon path -- well, and that code assumes that we would want to swapout. Link: https://lkml.kernel.org/r/20231220224504.646757-6-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit ebe2e35ec0f256372c158a18de459fb60070b313 Author: David Hildenbrand Date: Wed Dec 20 23:44:28 2023 +0100 mm/rmap: introduce and use hugetlb_try_dup_anon_rmap() hugetlb rmap handling differs quite a lot from "ordinary" rmap code. For example, hugetlb currently only supports entire mappings, and treats any mapping as mapped using a single "logical PTE". Let's move it out of the way so we can overhaul our "ordinary" rmap. implementation/interface. So let's introduce and use hugetlb_try_dup_anon_rmap() to make all hugetlb handling use dedicated hugetlb_* rmap functions. Add sanity checks that we end up with the right folios in the right functions. Note that is_device_private_page() does not apply to hugetlb. Link: https://lkml.kernel.org/r/20231220224504.646757-5-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Reviewed-by: Muchun Song Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit 44887f39945519fa8405133b1acd098fda9c9746 Author: David Hildenbrand Date: Wed Dec 20 23:44:27 2023 +0100 mm/rmap: introduce and use hugetlb_add_file_rmap() hugetlb rmap handling differs quite a lot from "ordinary" rmap code. For example, hugetlb currently only supports entire mappings, and treats any mapping as mapped using a single "logical PTE". Let's move it out of the way so we can overhaul our "ordinary" rmap. implementation/interface. Right now we're using page_dup_file_rmap() in some cases where "ordinary" rmap code would have used page_add_file_rmap(). So let's introduce and use hugetlb_add_file_rmap() instead. We won't be adding a "hugetlb_dup_file_rmap()" functon for the fork() case, as it would be doing the same: "dup" is just an optimization for "add". What remains is a single page_dup_file_rmap() call in fork() code. Add sanity checks that we end up with the right folios in the right functions. Link: https://lkml.kernel.org/r/20231220224504.646757-4-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Reviewed-by: Muchun Song Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit e135826b2da0cf25305086dc9ac1e91718a148e1 Author: David Hildenbrand Date: Wed Dec 20 23:44:26 2023 +0100 mm/rmap: introduce and use hugetlb_remove_rmap() hugetlb rmap handling differs quite a lot from "ordinary" rmap code. For example, hugetlb currently only supports entire mappings, and treats any mapping as mapped using a single "logical PTE". Let's move it out of the way so we can overhaul our "ordinary" rmap. implementation/interface. Let's introduce and use hugetlb_remove_rmap() and remove the hugetlb code from page_remove_rmap(). This effectively removes one check on the small-folio path as well. Add sanity checks that we end up with the right folios in the right functions. Note: all possible candidates that need care are page_remove_rmap() that pass compound=true. Link: https://lkml.kernel.org/r/20231220224504.646757-3-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Muchun Song Cc: Hugh Dickins Cc: Muchun Song Cc: Peter Xu Signed-off-by: Andrew Morton commit 9d5fafd5d882446999366f673ab06edba453f862 Author: David Hildenbrand Date: Wed Dec 20 23:44:25 2023 +0100 mm/rmap: rename hugepage_add* to hugetlb_add* Patch series "mm/rmap: interface overhaul", v2. This series overhauls the rmap interface, to get rid of the "bool compound" / RMAP_COMPOUND parameter with the goal of making the interface less error prone, more future proof, and more natural to extend to "batching". Also, this converts the interface to always consume folio+subpage, which speeds up operations on large folios. Further, this series adds PTE-batching variants for 4 rmap functions, whereby only folio_add_anon_rmap_ptes() is used for batching in this series when PTE-remapping a PMD-mapped THP. folio_remove_rmap_ptes(), folio_try_dup_anon_rmap_ptes() and folio_dup_file_rmap_ptes() will soon come in handy[1,2]. This series performs a lot of folio conversion along the way. Most of the added LOC in the diff are only due to documentation. As we're moving to a pte/pmd interface where we clearly express the mapping granularity we are dealing with, we first get the remainder of hugetlb out of the way, as it is special and expected to remain special: it treats everything as a "single logical PTE" and only currently allows entire mappings. Even if we'd ever support partial mappings, I strongly assume the interface and implementation will still differ heavily: hopefull we can avoid working on subpages/subpage mapcounts completely and only add a "count" parameter for them to enable batching. New (extended) hugetlb interface that operates on entire folio: * hugetlb_add_new_anon_rmap() -> Already existed * hugetlb_add_anon_rmap() -> Already existed * hugetlb_try_dup_anon_rmap() * hugetlb_try_share_anon_rmap() * hugetlb_add_file_rmap() * hugetlb_remove_rmap() New "ordinary" interface for small folios / THP:: * folio_add_new_anon_rmap() -> Already existed * folio_add_anon_rmap_[pte|ptes|pmd]() * folio_try_dup_anon_rmap_[pte|ptes|pmd]() * folio_try_share_anon_rmap_[pte|pmd]() * folio_add_file_rmap_[pte|ptes|pmd]() * folio_dup_file_rmap_[pte|ptes|pmd]() * folio_remove_rmap_[pte|ptes|pmd]() folio_add_new_anon_rmap() will always map at the largest granularity possible (currently, a single PMD to cover a PMD-sized THP). Could be extended if ever required. In the future, we might want "_pud" variants and eventually "_pmds" variants for batching. I ran some simple microbenchmarks on an Intel(R) Xeon(R) Silver 4210R: measuring munmap(), fork(), cow, MADV_DONTNEED on each PTE ... and PTE remapping PMD-mapped THPs on 1 GiB of memory. For small folios, there is barely a change (< 1% improvement for me). For PTE-mapped THP: * PTE-remapping a PMD-mapped THP is more than 10% faster. * fork() is more than 4% faster. * MADV_DONTNEED is 2% faster * COW when writing only a single byte on a COW-shared PTE is 1% faster * munmap() barely changes (< 1%). [1] https://lkml.kernel.org/r/20230810103332.3062143-1-ryan.roberts@arm.com [2] https://lkml.kernel.org/r/20231204105440.61448-1-ryan.roberts@arm.com This patch (of 40): Let's just call it "hugetlb_". Yes, it's all already inconsistent and confusing because we have a lot of "hugepage_" functions for legacy reasons. But "hugetlb" cannot possibly be confused with transparent huge pages, and it matches "hugetlb.c" and "folio_test_hugetlb()". So let's minimize confusion in rmap code. Link: https://lkml.kernel.org/r/20231220224504.646757-1-david@redhat.com Link: https://lkml.kernel.org/r/20231220224504.646757-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Muchun Song Cc: Hugh Dickins Cc: Matthew Wilcox (Oracle) Cc: Muchun Song Cc: Peter Xu Cc: Ryan Roberts Cc: Yin Fengwei Signed-off-by: Andrew Morton commit a3fbe303ec9db45dbabc923ea9c5323900176079 Author: Andrey Konovalov Date: Thu Dec 21 19:35:40 2023 +0100 kasan: simplify kasan_complete_mode_report_info for tag-based modes memcpy the alloc/free tracks when collecting the information about a bad access instead of copying fields one by one. Link: https://lkml.kernel.org/r/20231221183540.168428-4-andrey.konovalov@linux.dev Fixes: 5d4c6ac94694 ("kasan: record and report more information") Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Juntong Deng Signed-off-by: Andrew Morton commit fd4064f69708bc84d960b666896715fe86882c85 Author: Andrey Konovalov Date: Thu Dec 21 19:35:39 2023 +0100 kasan: simplify saving extra info into tracks Avoid duplicating code for saving extra info into tracks: reuse the common function for this. Link: https://lkml.kernel.org/r/20231221183540.168428-3-andrey.konovalov@linux.dev Fixes: 5d4c6ac94694 ("kasan: record and report more information") Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Juntong Deng Signed-off-by: Andrew Morton commit 04afc540e58e8f66fd85b0b88af3e8ce286be17c Author: Andrey Konovalov Date: Thu Dec 21 19:35:38 2023 +0100 kasan: reuse kasan_track in kasan_stack_ring_entry Avoid duplicating fields of kasan_track in kasan_stack_ring_entry: reuse the structure. Link: https://lkml.kernel.org/r/20231221183540.168428-2-andrey.konovalov@linux.dev Fixes: 5d4c6ac94694 ("kasan: record and report more information") Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Juntong Deng Signed-off-by: Andrew Morton commit f6940e8adc64f584dcfb2960f6e4b6a54ea9c508 Author: Andrey Konovalov Date: Thu Dec 21 19:35:37 2023 +0100 kasan: clean up kasan_cache_create Reorganize the code to avoid nested if/else checks to improve the readability. Also drop the confusing comments about KMALLOC_MAX_SIZE checks: they are relevant for both SLUB and SLAB (originally, the comments likely confused KMALLOC_MAX_SIZE with KMALLOC_MAX_CACHE_SIZE). Link: https://lkml.kernel.org/r/20231221183540.168428-1-andrey.konovalov@linux.dev Fixes: a5989d4ed40c ("kasan: improve free meta storage in Generic KASAN") Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Juntong Deng Signed-off-by: Andrew Morton commit 4e397274e10beb385cee1a04c7850c1c46ae5d3e Author: Andrey Konovalov Date: Thu Dec 21 21:04:53 2023 +0100 kasan: speed up match_all_mem_tag test for SW_TAGS Checking all 256 possible tag values in the match_all_mem_tag KASAN test is slow and produces 256 reports. Instead, just check the first 8 and the last 8. Link: https://lkml.kernel.org/r/6fe51262defd80cdc1150c42404977aafd1b6167.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 3ab9304db6ab13a8d4b5f99ef0bbd9302f26c741 Author: Andrey Konovalov Date: Thu Dec 21 21:04:52 2023 +0100 kasan: remove SLUB checks for page_alloc fallbacks in tests A number of KASAN tests rely on the fact that calling kmalloc with a size larger than an order-1 page falls back onto page_alloc. This fallback was originally only implemented for SLUB, but since commit d6a71648dbc0 ("mm/slab: kmalloc: pass requests larger than order-1 page to page allocator"), it is also implemented for SLAB. Thus, drop the SLUB checks from the tests. Link: https://lkml.kernel.org/r/c82099b6fb365b6f4c2c21b112d4abb4dfd83e53.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit f2fffc0cfcfa9ed2ed7448705a5e187cabee6af4 Author: Andrey Konovalov Date: Thu Dec 21 21:04:51 2023 +0100 kasan: export kasan_poison as GPL KASAN uses EXPORT_SYMBOL_GPL for symbols whose exporting is only required for KASAN tests when they are built as a module. kasan_poison is one on those symbols, so export it as GPL. Link: https://lkml.kernel.org/r/171d0b8b2e807d04cca74f973830f9b169e06fb8.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 14c99b990cccd924ae6101bd36b85f8456eabb10 Author: Andrey Konovalov Date: Thu Dec 21 21:04:50 2023 +0100 kasan: check kasan_vmalloc_enabled in vmalloc tests Check that vmalloc poisoning is not disabled via command line when running the vmalloc-related KASAN tests. Skip the tests otherwise. Link: https://lkml.kernel.org/r/954456e50ac98519910c3e24a479a18eae62f8dd.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 58ee788cb23738abd57d6327d0b5096df5a53d31 Author: Andrey Konovalov Date: Thu Dec 21 21:04:49 2023 +0100 kasan: respect CONFIG_KASAN_VMALLOC for kasan_flag_vmalloc Never enable the kasan_flag_vmalloc static branch unless CONFIG_KASAN_VMALLOC is enabled. This does not fix any observable bugs (vmalloc annotations for the HW_TAGS mode are no-op with CONFIG_KASAN_VMALLOC disabled) but rather just cleans up the code. Link: https://lkml.kernel.org/r/3e5c933c8f6b59bd587efb05c407964be951772c.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 99f3fe416c71aa3d5aba69174c274309ededfd42 Author: Andrey Konovalov Date: Thu Dec 21 21:04:48 2023 +0100 kasan: clean up is_kfence_address checks 1. Do not untag addresses that are passed to is_kfence_address: it tolerates tagged addresses. 2. Move is_kfence_address checks from internal KASAN functions (kasan_poison/unpoison, etc.) to external-facing ones. Note that kasan_poison/unpoison are never called outside of KASAN/slab code anymore; the comment is wrong, so drop it. 3. Simplify/reorganize the code around the updated checks. Link: https://lkml.kernel.org/r/1065732315ef4e141b6177d8f612232d4d5bc0ab.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 1a55836a1b002298714dc84032b3d19d9bbc2d66 Author: Andrey Konovalov Date: Thu Dec 21 21:04:47 2023 +0100 kasan: update kasan_poison documentation comment The comment for kasan_poison says that the size argument gets aligned by the function to KASAN_GRANULE_SIZE, which is wrong: the argument must be already aligned when it is passed to the function. Remove the invalid part of the comment. Link: https://lkml.kernel.org/r/992a302542059fc40d86ea560eac413ecb31b6a1.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 3067b919ed81e17b8b8fb932c43f200775b1d545 Author: Andrey Konovalov Date: Thu Dec 21 21:04:46 2023 +0100 kasan: clean up kasan_requires_meta Currently, for Generic KASAN mode, kasan_requires_meta is defined to return kasan_stack_collection_enabled. Even though the Generic mode does not support disabling stack trace collection, kasan_requires_meta was implemented in this way to make it easier to implement the disabling for the Generic mode in the future. However, for the Generic mode, the per-object metadata also stores the quarantine link. So even if disabling stack collection is implemented, the per-object metadata will still be required. Fix kasan_requires_meta to return true for the Generic mode and update the related comments. This change does not fix any observable bugs but rather just brings the code to a cleaner state. Link: https://lkml.kernel.org/r/8086623407095ac1c82377a2107dcc5845f99cfa.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit c20e3feadd4505c46a87dcabef5b129a97992466 Author: Andrey Konovalov Date: Thu Dec 21 21:04:45 2023 +0100 kasan: improve kasan_non_canonical_hook Make kasan_non_canonical_hook to be more sure in its report (i.e. say "probably" instead of "maybe") if the address belongs to the shadow memory region for kernel addresses. Also use the kasan_shadow_to_mem helper to calculate the original address. Also improve the comments in kasan_non_canonical_hook. Link: https://lkml.kernel.org/r/af94ef3cb26f8c065048b3158d9f20f6102bfaaa.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 5cb6674b694b84803cbee8bfccaa2bfdfeb6eae4 Author: Andrey Konovalov Date: Thu Dec 21 21:04:44 2023 +0100 mm, kasan: use KASAN_TAG_KERNEL instead of 0xff Use the KASAN_TAG_KERNEL marco instead of open-coding 0xff in the mm code. This macro is provided by include/linux/kasan-tags.h, which does not include any other headers, so it's safe to include it into mm.h without causing circular include dependencies. Link: https://lkml.kernel.org/r/71db9087b0aebb6c4dccbc609cc0cd50621533c7.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 27232ba96cfbc6b9bdb363231c9c31305bb9a2bc Author: Andrey Konovalov Date: Thu Dec 21 21:04:43 2023 +0100 kasan/arm64: improve comments for KASAN_SHADOW_START/END Patch series "kasan: assorted clean-ups". Code clean-ups, nothing worthy of being backported to stable. This patch (of 11): Unify and improve the comments for KASAN_SHADOW_START/END definitions from include/asm/kasan.h and include/asm/memory.h. Also put both definitions together in include/asm/memory.h. Also clarify the related BUILD_BUG_ON checks in mm/kasan_init.c. Link: https://lkml.kernel.org/r/cover.1703188911.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/140108ca0b164648c395a41fbeecb0601b1ae9e1.1703188911.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Marco Elver Signed-off-by: Andrew Morton commit 51fb591edc867a11c7fcebfa88298e7ccdb61265 Author: Andrey Konovalov Date: Mon Dec 25 16:19:24 2023 +0100 xtensa, kasan: define KASAN_SHADOW_END Common KASAN code might rely on the definitions of the shadow mapping start, end, and size. Define KASAN_SHADOW_END in addition to KASAN_SHADOW_START and KASAN_SHADOW_SIZE. Link: https://lkml.kernel.org/r/20231225151924.5422-1-andrey.konovalov@linux.dev Signed-off-by: Andrey Konovalov Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312240755.MqsWuTno-lkp@intel.com/ Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Chris Zankel Cc: Dmitry Vyukov Cc: Marco Elver Cc: Max Filippov Signed-off-by: Andrew Morton commit a3c5cc5129ef55ac6c69f468e5ee6e4b0cd8179c Author: Ryan Roberts Date: Thu Dec 14 16:24:34 2023 +0000 selftests/mm: log run_vmtests.sh results in TAP format When running tests on a CI system (e.g. LAVA) it is useful to output test results in TAP (Test Anything Protocol) format so that the CI can parse the fine-grained results to show regressions. Many of the mm selftest binaries already output using the TAP format. And the kselftests runner (run_kselftest.sh) also uses the format. CI systems such as LAVA can already handle nested TAP reports. However, with the mm selftests we have 3 levels of nesting (run_kselftest.sh -> run_vmtests.sh -> individual test binaries) and the middle level did not previously support TAP, which breaks the parser. Let's fix that by teaching run_vmtests.sh to output using the TAP format. Ideally this would be opt-in via a command line argument to avoid the possibility of breaking anyone's existing scripts that might scrape the output. However, it is not possible to pass arguments to tests invoked via run_kselftest.sh. So I've implemented an opt-out option (-n), which will revert to the existing output format. Future changes to this file should be aware of 2 new conventions: - output that is part of the TAP reporting is piped through tap_output - general output is piped through tap_prefix Link: https://lkml.kernel.org/r/20231214162434.3580009-1-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Reviewed-by: Mark Brown Tested-by: John Hubbard Cc: Aishwarya TCV Cc: Peter Xu Cc: Shuah Khan Signed-off-by: Andrew Morton commit 5ec8e8ea8b7783fab150cf86404fc38cb4db8800 Author: Charan Teja Kalla Date: Fri Oct 13 18:34:27 2023 +0530 mm/sparsemem: fix race in accessing memory_section->usage The below race is observed on a PFN which falls into the device memory region with the system memory configuration where PFN's are such that [ZONE_NORMAL ZONE_DEVICE ZONE_NORMAL]. Since normal zone start and end pfn contains the device memory PFN's as well, the compaction triggered will try on the device memory PFN's too though they end up in NOP(because pfn_to_online_page() returns NULL for ZONE_DEVICE memory sections). When from other core, the section mappings are being removed for the ZONE_DEVICE region, that the PFN in question belongs to, on which compaction is currently being operated is resulting into the kernel crash with CONFIG_SPASEMEM_VMEMAP enabled. The crash logs can be seen at [1]. compact_zone() memunmap_pages ------------- --------------- __pageblock_pfn_to_page ...... (a)pfn_valid(): valid_section()//return true (b)__remove_pages()-> sparse_remove_section()-> section_deactivate(): [Free the array ms->usage and set ms->usage = NULL] pfn_section_valid() [Access ms->usage which is NULL] NOTE: From the above it can be said that the race is reduced to between the pfn_valid()/pfn_section_valid() and the section deactivate with SPASEMEM_VMEMAP enabled. The commit b943f045a9af("mm/sparse: fix kernel crash with pfn_section_valid check") tried to address the same problem by clearing the SECTION_HAS_MEM_MAP with the expectation of valid_section() returns false thus ms->usage is not accessed. Fix this issue by the below steps: a) Clear SECTION_HAS_MEM_MAP before freeing the ->usage. b) RCU protected read side critical section will either return NULL when SECTION_HAS_MEM_MAP is cleared or can successfully access ->usage. c) Free the ->usage with kfree_rcu() and set ms->usage = NULL. No attempt will be made to access ->usage after this as the SECTION_HAS_MEM_MAP is cleared thus valid_section() return false. Thanks to David/Pavan for their inputs on this patch. [1] https://lore.kernel.org/linux-mm/994410bb-89aa-d987-1f50-f514903c55aa@quicinc.com/ On Snapdragon SoC, with the mentioned memory configuration of PFN's as [ZONE_NORMAL ZONE_DEVICE ZONE_NORMAL], we are able to see bunch of issues daily while testing on a device farm. For this particular issue below is the log. Though the below log is not directly pointing to the pfn_section_valid(){ ms->usage;}, when we loaded this dump on T32 lauterbach tool, it is pointing. [ 540.578056] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 540.578068] Mem abort info: [ 540.578070] ESR = 0x0000000096000005 [ 540.578073] EC = 0x25: DABT (current EL), IL = 32 bits [ 540.578077] SET = 0, FnV = 0 [ 540.578080] EA = 0, S1PTW = 0 [ 540.578082] FSC = 0x05: level 1 translation fault [ 540.578085] Data abort info: [ 540.578086] ISV = 0, ISS = 0x00000005 [ 540.578088] CM = 0, WnR = 0 [ 540.579431] pstate: 82400005 (Nzcv daif +PAN -UAO +TCO -DIT -SSBSBTYPE=--) [ 540.579436] pc : __pageblock_pfn_to_page+0x6c/0x14c [ 540.579454] lr : compact_zone+0x994/0x1058 [ 540.579460] sp : ffffffc03579b510 [ 540.579463] x29: ffffffc03579b510 x28: 0000000000235800 x27:000000000000000c [ 540.579470] x26: 0000000000235c00 x25: 0000000000000068 x24:ffffffc03579b640 [ 540.579477] x23: 0000000000000001 x22: ffffffc03579b660 x21:0000000000000000 [ 540.579483] x20: 0000000000235bff x19: ffffffdebf7e3940 x18:ffffffdebf66d140 [ 540.579489] x17: 00000000739ba063 x16: 00000000739ba063 x15:00000000009f4bff [ 540.579495] x14: 0000008000000000 x13: 0000000000000000 x12:0000000000000001 [ 540.579501] x11: 0000000000000000 x10: 0000000000000000 x9 :ffffff897d2cd440 [ 540.579507] x8 : 0000000000000000 x7 : 0000000000000000 x6 :ffffffc03579b5b4 [ 540.579512] x5 : 0000000000027f25 x4 : ffffffc03579b5b8 x3 :0000000000000001 [ 540.579518] x2 : ffffffdebf7e3940 x1 : 0000000000235c00 x0 :0000000000235800 [ 540.579524] Call trace: [ 540.579527] __pageblock_pfn_to_page+0x6c/0x14c [ 540.579533] compact_zone+0x994/0x1058 [ 540.579536] try_to_compact_pages+0x128/0x378 [ 540.579540] __alloc_pages_direct_compact+0x80/0x2b0 [ 540.579544] __alloc_pages_slowpath+0x5c0/0xe10 [ 540.579547] __alloc_pages+0x250/0x2d0 [ 540.579550] __iommu_dma_alloc_noncontiguous+0x13c/0x3fc [ 540.579561] iommu_dma_alloc+0xa0/0x320 [ 540.579565] dma_alloc_attrs+0xd4/0x108 [quic_charante@quicinc.com: use kfree_rcu() in place of synchronize_rcu(), per David] Link: https://lkml.kernel.org/r/1698403778-20938-1-git-send-email-quic_charante@quicinc.com Link: https://lkml.kernel.org/r/1697202267-23600-1-git-send-email-quic_charante@quicinc.com Fixes: f46edbd1b151 ("mm/sparsemem: add helpers track active portions of a section at boot") Signed-off-by: Charan Teja Kalla Cc: Aneesh Kumar K.V Cc: Dan Williams Cc: David Hildenbrand Cc: Mel Gorman Cc: Oscar Salvador Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit 7fbb5e188248c50f737720825da1864ce42536d1 Author: Fangrui Song Date: Tue Dec 19 21:41:23 2023 -0800 mm: remove VM_EXEC requirement for THP eligibility Commit e6be37b2e7bd ("mm/huge_memory.c: add missing read-only THP checking in transparent_hugepage_enabled()") introduced the VM_EXEC requirement, which is not strictly needed. lld's default --rosegment option and GNU ld's -z separate-code option (default on Linux/x86 since binutils 2.31) create a read-only PT_LOAD segment without the PF_X flag, which should be eligible for THP. Certain architectures support medium and large code models, where .lrodata may be placed in a separate read-only PT_LOAD segment, which should be eligible for THP as well. Link: https://lkml.kernel.org/r/20231220054123.1266001-1-maskray@google.com Signed-off-by: Fangrui Song Acked-by: Yang Shi Cc: Miaohe Lin Cc: Song Liu Cc: Matthew Wilcox Signed-off-by: Andrew Morton commit b39ca208403c8f2c17dab1fbfef1f5ecaff25e53 Author: Kevin Hao Date: Wed Dec 20 07:17:53 2023 +0800 mm/khugepaged: remove redundant try_to_freeze() A freezable kernel thread can enter frozen state during freezing by either calling try_to_freeze() or using wait_event_freezable() and its variants. However, there is no need to use both methods simultaneously. The freezable wait variants have been used in khugepaged_wait_work() and khugepaged_alloc_sleep(), so remove this redundant try_to_freeze(). I used the following stress-ng command to generate some memory load on my Intel Alder Lake board (24 CPUs, 32G memory). stress-ng --vm 48 --vm-bytes 90% The worst freezing latency is: Freezing user space processes Freezing user space processes completed (elapsed 0.040 seconds) OOM killer disabled. Freezing remaining freezable tasks Freezing remaining freezable tasks completed (elapsed 0.001 seconds) Without the faked memory load, the freezing latency is: Freezing user space processes Freezing user space processes completed (elapsed 0.000 seconds) OOM killer disabled. Freezing remaining freezable tasks Freezing remaining freezable tasks completed (elapsed 0.001 seconds) I didn't see any observable difference whether this patch is applied or not. Link: https://lkml.kernel.org/r/20231219231753.683171-1-haokexin@gmail.com Signed-off-by: Kevin Hao Cc: Pavel Machek Cc: Rafael J. Wysocki Signed-off-by: Andrew Morton commit 91349f541e7daa6cce15e01e7ffe4fd63731ead9 Author: Andrey Konovalov Date: Tue Dec 19 22:19:53 2023 +0100 lib/stackdepot: fix comment in include/linux/stackdepot.h As stack traces can now be evicted from the stack depot, remove the comment saying that they are never removed. Link: https://lkml.kernel.org/r/0ebe712d91f8d302a8947d3c9e9123bc2b1b8440.1703020707.git.andreyknvl@google.com Fixes: 108be8def46e ("lib/stackdepot: allow users to evict stack traces") Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Tetsuo Handa Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 08d7c94d9635cf3fdffcab5f066d857efbad9507 Author: Andrey Konovalov Date: Tue Dec 19 22:19:52 2023 +0100 kasan: memset free track in qlink_free Instead of only zeroing out the stack depot handle when evicting the free stack trace in qlink_free, zero out the whole track. Do this just to produce a similar effect for alloc and free meta. The other fields of the free track besides the stack trace handle are considered invalid at this point anyway, so no harm in zeroing them out. Link: https://lkml.kernel.org/r/db987c1cd011547e85353b0b9997de190c97e3e6.1703020707.git.andreyknvl@google.com Fixes: 773688a6cb24 ("kasan: use stack_depot_put for Generic mode") Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Tetsuo Handa Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit a414d4286f3400aa05631c4931eb3feba83e29e8 Author: Andrey Konovalov Date: Tue Dec 19 22:19:51 2023 +0100 kasan: handle concurrent kasan_record_aux_stack calls kasan_record_aux_stack can be called concurrently on the same object. This might lead to a race condition when rotating the saved aux stack trace handles, which in turns leads to incorrect accounting of stack depot handles and refcount underflows in the stack depot code. Fix by introducing a raw spinlock to protect the aux stack trace handles in kasan_record_aux_stack. Link: https://lkml.kernel.org/r/1606b960e2f746862d1f459515972f9695bf448a.1703020707.git.andreyknvl@google.com Fixes: 773688a6cb24 ("kasan: use stack_depot_put for Generic mode") Signed-off-by: Andrey Konovalov Reported-by: Tetsuo Handa Reported-by: syzbot+186b55175d8360728234@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000784b1c060b0074a2@google.com/ Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit a914d8d6cf204287aa2dfb9235d29d7944ad72a1 Author: Andrey Konovalov Date: Tue Dec 19 22:19:50 2023 +0100 lib/stackdepot: add printk_deferred_enter/exit guards Patch series "lib/stackdepot, kasan: fixes for stack eviction series", v3. A few fixes for the stack depot eviction series ("stackdepot: allow evicting stack traces"). This patch (of 5): Stack depot functions can be called from various contexts that do allocations, including with console locks taken. At the same time, stack depot functions might print WARNING's or refcount-related failures. This can cause a deadlock on console locks. Add printk_deferred_enter/exit guards to stack depot to avoid this. Link: https://lkml.kernel.org/r/cover.1703020707.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/82092f9040d075a161d1264377d51e0bac847e8a.1703020707.git.andreyknvl@google.com Fixes: 108be8def46e ("lib/stackdepot: allow users to evict stack traces") Fixes: cd11016e5f52 ("mm, kasan: stackdepot implementation. Enable stackdepot for SLAB") Signed-off-by: Andrey Konovalov Reported-by: Tetsuo Handa Closes: https://lore.kernel.org/all/000000000000f56750060b9ad216@google.com/ Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 8ab3b09755d926afc3bdd2fadff7f159310440c2 Author: Andrey Konovalov Date: Tue Dec 19 23:29:05 2023 +0100 io_uring: use mempool KASAN hook Use the proper kasan_mempool_unpoison_object hook for unpoisoning cached objects. A future change might also update io_uring to check the return value of kasan_mempool_poison_object to prevent double-free and invalid-free bugs. This proves to be non-trivial with the current way io_uring caches objects, so this is left out-of-scope of this series. Link: https://lkml.kernel.org/r/eca18d6cbf676ed784f1a1f209c386808a8087c5.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 74e831af165acc968418a4d9fde8c2e099f3e8bf Author: Andrey Konovalov Date: Tue Dec 19 23:29:04 2023 +0100 skbuff: use mempool KASAN hooks Instead of using slab-internal KASAN hooks for poisoning and unpoisoning cached objects, use the proper mempool KASAN hooks. Also check the return value of kasan_mempool_poison_object to prevent double-free and invali-free bugs. Link: https://lkml.kernel.org/r/a3482c41395c69baa80eb59dbb06beef213d2a14.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 1ce9a0523938f87dd8505233cc3445f8e2d8dcee Author: Andrey Konovalov Date: Tue Dec 19 23:29:03 2023 +0100 kasan: rename and document kasan_(un)poison_object_data Rename kasan_unpoison_object_data to kasan_unpoison_new_object and add a documentation comment. Do the same for kasan_poison_object_data. The new names and the comments should suggest the users that these hooks are intended for internal use by the slab allocator. The following patch will remove non-slab-internal uses of these hooks. No functional changes. [andreyknvl@google.com: update references to renamed functions in comments] Link: https://lkml.kernel.org/r/20231221180637.105098-1-andrey.konovalov@linux.dev Link: https://lkml.kernel.org/r/eab156ebbd635f9635ef67d1a4271f716994e628.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Signed-off-by: Andrew Morton commit 86b15969831bde23c96de00db46687762a6e9e7d Author: Andrey Konovalov Date: Tue Dec 19 23:29:02 2023 +0100 kasan: reorder tests Put closely related tests next to each other. No functional changes. Link: https://lkml.kernel.org/r/acf0ee309394dbb5764c400434753ff030dd3d6c.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 0f18ea6ea44cde3d7660e52fa8729d420f97409a Author: Andrey Konovalov Date: Tue Dec 19 23:29:01 2023 +0100 kasan: rename pagealloc tests Rename "pagealloc" KASAN tests: 1. Use "kmalloc_large" for tests that use large kmalloc allocations. 2. Use "page_alloc" for tests that use page_alloc. Also clean up the comments. Link: https://lkml.kernel.org/r/f3eef6ddb87176c40958a3e5a0bd2386b52af4c6.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 0f199eb4351ffb453c3df2da733213bef89a03b4 Author: Andrey Konovalov Date: Tue Dec 19 23:29:00 2023 +0100 kasan: add mempool tests Add KASAN tests for mempool. Link: https://lkml.kernel.org/r/5fd64732266be8287711b6408d86ffc78784be06.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 37dcc69ad17a008d2b720bdc39f070ef2a959430 Author: Andrey Konovalov Date: Tue Dec 19 23:28:59 2023 +0100 mempool: introduce mempool_use_prealloc_only Introduce a new mempool_alloc_preallocated API that asks the mempool to only use the elements preallocated during the mempool's creation when allocating and to not attempt allocating new ones from the underlying allocator. This API is required to test the KASAN poisoning/unpoisoning functionality in KASAN tests, but it might be also useful on its own. Link: https://lkml.kernel.org/r/a14d809dbdfd04cc33bcacc632fee2abd6b83c00.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 413643f3a3e2fe378dbd9f078ec119abc4539a38 Author: Andrey Konovalov Date: Tue Dec 19 23:28:58 2023 +0100 mempool: use new mempool KASAN hooks Update the mempool code to use the new mempool KASAN hooks. Rely on the return value of kasan_mempool_poison_object and kasan_mempool_poison_pages to prevent double-free and invalid-free bugs. Link: https://lkml.kernel.org/r/d36fc4a6865bdbd297cadb46b67641d436849f4c.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 7d4847ded24775a01cbe1e1a5292f132d27f158b Author: Andrey Konovalov Date: Tue Dec 19 23:28:57 2023 +0100 mempool: skip slub_debug poisoning when KASAN is enabled With the changes in the following patch, KASAN starts saving its metadata within freed mempool elements. Thus, skip slub_debug poisoning and checking of mempool elements when KASAN is enabled. Corruptions of freed mempool elements will be detected by KASAN anyway. Link: https://lkml.kernel.org/r/98a4b1617e8ceeb266ef9a46f5e8c7f67a563ad2.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 29d7355a9d05de9a6e38cc4d1146fb96c43853fb Author: Andrey Konovalov Date: Tue Dec 19 23:28:56 2023 +0100 kasan: save alloc stack traces for mempool Update kasan_mempool_unpoison_object to properly poison the redzone and save alloc strack traces for kmalloc and slab pools. As a part of this change, split out and use a unpoison_slab_object helper function from __kasan_slab_alloc. [nathan@kernel.org: mark unpoison_slab_object() as static] Link: https://lkml.kernel.org/r/20231221180042.104694-1-andrey.konovalov@linux.dev Link: https://lkml.kernel.org/r/05ad235da8347cfe14d496d01b2aaf074b4f607c.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Nathan Chancellor Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 0cc9fdbf4a5273310779bd4779fcdfb4705438a6 Author: Andrey Konovalov Date: Tue Dec 19 23:28:55 2023 +0100 kasan: introduce poison_kmalloc_large_redzone Split out a poison_kmalloc_large_redzone helper from __kasan_kmalloc_large and use it in the caller's code. This is a preparatory change for the following patches in this series. Link: https://lkml.kernel.org/r/93317097b668519d76097fb065201b2027436e22.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit ce37eec0ab62fb1f04509b83161845859815ee13 Author: Andrey Konovalov Date: Tue Dec 19 23:28:54 2023 +0100 kasan: clean up and rename ____kasan_kmalloc Introduce a new poison_kmalloc_redzone helper function that poisons the redzone for kmalloc object. Drop the confusingly named ____kasan_kmalloc function and instead use poison_kmalloc_redzone along with the other required parts of ____kasan_kmalloc in the callers' code. This is a preparatory change for the following patches in this series. Link: https://lkml.kernel.org/r/5881232ad357ec0d59a5b1aefd9e0673a386399a.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit b556a462eb8df6b6836c318d23f43409c40a7c7e Author: Andrey Konovalov Date: Tue Dec 19 23:28:53 2023 +0100 kasan: save free stack traces for slab mempools Make kasan_mempool_poison_object save free stack traces for slab and kmalloc mempools when the object is freed into the mempool. Also simplify and rename ____kasan_slab_free to poison_slab_object and do a few other reability changes. Link: https://lkml.kernel.org/r/413a7c7c3344fb56809853339ffaabc9e4905e94.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit cf0da2afe3dc2462b07fc951fa335a318eb38775 Author: Andrey Konovalov Date: Tue Dec 19 23:28:52 2023 +0100 kasan: clean up __kasan_mempool_poison_object Reorganize the code and reword the comment in __kasan_mempool_poison_object to improve the code readability. Link: https://lkml.kernel.org/r/4f6fc8840512286c1a96e16e86901082c671677d.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 9f41c59ae3163690868a32bd77e9e33c3bab555e Author: Andrey Konovalov Date: Tue Dec 19 23:28:51 2023 +0100 kasan: introduce kasan_mempool_unpoison_pages Introduce and document a new kasan_mempool_unpoison_pages hook to be used by the mempool code instead of kasan_unpoison_pages. This hook is not functionally different from kasan_unpoison_pages, but using it improves the mempool code readability. Link: https://lkml.kernel.org/r/239bd9af6176f2cc59f5c25893eb36143184daff.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit f129c31039283df884913142b0f3797d64d3a9d6 Author: Andrey Konovalov Date: Tue Dec 19 23:28:50 2023 +0100 kasan: introduce kasan_mempool_poison_pages Introduce and document a kasan_mempool_poison_pages hook to be used by the mempool code instead of kasan_poison_pages. Compated to kasan_poison_pages, the new hook: 1. For the tag-based modes, skips checking and poisoning allocations that were not tagged due to sampling. 2. Checks for double-free and invalid-free bugs. In the future, kasan_poison_pages can also be updated to handle #2, but this is out-of-scope of this series. Link: https://lkml.kernel.org/r/88dc7340cce28249abf789f6e0c792c317df9ba5.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 1956832753735b1c399b86b2c66cb7c317dc9f31 Author: Andrey Konovalov Date: Tue Dec 19 23:28:49 2023 +0100 kasan: introduce kasan_mempool_unpoison_object Introduce and document a kasan_mempool_unpoison_object hook. This hook serves as a replacement for the generic kasan_unpoison_range that the mempool code relies on right now. mempool will be updated to use the new hook in one of the following patches. For now, define the new hook to be identical to kasan_unpoison_range. One of the following patches will update it to add stack trace collection. Link: https://lkml.kernel.org/r/dae25f0e18ed8fd50efe509c5b71a0592de5c18d.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 2e7c954c11af96aa1e0566a706f22152ef91d759 Author: Andrey Konovalov Date: Tue Dec 19 23:28:48 2023 +0100 kasan: add return value for kasan_mempool_poison_object Add a return value for kasan_mempool_poison_object that lets the caller know whether the allocation is affected by a double-free or an invalid-free bug. The caller can use this return value to stop operating on the object. Also introduce a check_page_allocation helper function to improve the code readability. Link: https://lkml.kernel.org/r/618af65273875fb9f56954285443279b15f1fcd9.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 1bb843048d00050678c392dab87a15c8b756df6f Author: Andrey Konovalov Date: Tue Dec 19 23:28:47 2023 +0100 kasan: document kasan_mempool_poison_object Add documentation comment for kasan_mempool_poison_object. Link: https://lkml.kernel.org/r/af33ba8cabfa1ad731fe23a3f874bfc8d3b7fed4.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 9b94fe91099cbf05606151ef05bea9632666f5d5 Author: Andrey Konovalov Date: Tue Dec 19 23:28:46 2023 +0100 kasan: move kasan_mempool_poison_object Move kasan_mempool_poison_object after all slab-related KASAN hooks. This is a preparatory change for the following patches in this series. No functional changes. Link: https://lkml.kernel.org/r/23ea215409f43c13cdf9ecc454501a264c107d67.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 280ec6ccb6422aa4a04f9ac4216ddcf055acc95d Author: Andrey Konovalov Date: Tue Dec 19 23:28:45 2023 +0100 kasan: rename kasan_slab_free_mempool to kasan_mempool_poison_object Patch series "kasan: save mempool stack traces". This series updates KASAN to save alloc and free stack traces for secondary-level allocators that cache and reuse allocations internally instead of giving them back to the underlying allocator (e.g. mempool). As a part of this change, introduce and document a set of KASAN hooks: bool kasan_mempool_poison_pages(struct page *page, unsigned int order); void kasan_mempool_unpoison_pages(struct page *page, unsigned int order); bool kasan_mempool_poison_object(void *ptr); void kasan_mempool_unpoison_object(void *ptr, size_t size); and use them in the mempool code. Besides mempool, skbuff and io_uring also cache allocations and already use KASAN hooks to poison those. Their code is updated to use the new mempool hooks. The new hooks save alloc and free stack traces (for normal kmalloc and slab objects; stack traces for large kmalloc objects and page_alloc are not supported by KASAN yet), improve the readability of the users' code, and also allow the users to prevent double-free and invalid-free bugs; see the patches for the details. This patch (of 21): Rename kasan_slab_free_mempool to kasan_mempool_poison_object. kasan_slab_free_mempool is a slightly confusing name: it is unclear whether this function poisons the object when it is freed into mempool or does something when the object is freed from mempool to the underlying allocator. The new name also aligns with other mempool-related KASAN hooks added in the following patches in this series. Link: https://lkml.kernel.org/r/cover.1703024586.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/c5618685abb7cdbf9fb4897f565e7759f601da84.1703024586.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Lobakin Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Breno Leitao Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Signed-off-by: Andrew Morton commit 14059f66a959c760467ea2041e165f412845bcb8 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:45 2023 +0000 fs: remove the bh_end_io argument from __block_write_full_folio All callers are passing end_buffer_async_write as this argument, so we can hardcode references to it within __block_write_full_folio(). That lets us make end_buffer_async_write() static. Link: https://lkml.kernel.org/r/20231215200245.748418-15-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jens Axboe Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton commit 17bf23a981be9c6629198a76940c777eb5c8c521 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:44 2023 +0000 fs: convert block_write_full_page to block_write_full_folio Convert the function to be compatible with writepage_t so that it can be passed to write_cache_pages() by blkdev. This removes a call to compound_head(). We can also remove the function export as both callers are built-in. Link: https://lkml.kernel.org/r/20231215200245.748418-14-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Andrew Morton commit af34acc24bd6789cee6dcf1d114505c84a705b8c Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:43 2023 +0000 ufs: remove writepage implementation If the filesystem implements migrate_folio and writepages, there is no need for a writepage implementation. Link: https://lkml.kernel.org/r/20231215200245.748418-13-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Andrew Morton commit a2b92914b0bbdeb8d6b0e76b9217bd2fc9877acf Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:42 2023 +0000 sysv: remove writepage implementation If the filesystem implements migrate_folio and writepages, there is no need for a writepage implementation. Link: https://lkml.kernel.org/r/20231215200245.748418-12-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jens Axboe Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit bfc7fbe36976ce9168c9c0cc9c7943aaa57cf76d Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:41 2023 +0000 ocfs2: remove writepage implementation If the filesystem implements migrate_folio and writepages, there is no need for a writepage implementation. Link: https://lkml.kernel.org/r/20231215200245.748418-11-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Andrew Morton commit 1443a9fb4e72052b0e0657dd1baf7bf20fb4a4e0 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:40 2023 +0000 minix: remove writepage implementation If the filesystem implements migrate_folio and writepages, there is no need for a writepage implementation. Link: https://lkml.kernel.org/r/20231215200245.748418-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jens Axboe Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit 44afc066c9930df126aabde771c9bad856e9c915 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:39 2023 +0000 hfsplus: really remove hfsplus_writepage The earlier commit to remove hfsplus_writepage only removed it from one of the aops. Remove it from the btree_aops as well. Link: https://lkml.kernel.org/r/20231215200245.748418-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Andrew Morton commit df56d2287c5736691673aaac7d2b4c559bb3b562 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:38 2023 +0000 hfs: really remove hfs_writepage The earlier commit to remove hfs_writepage only removed it from one of the aops. Remove it from the btree_aops as well. Link: https://lkml.kernel.org/r/20231215200245.748418-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jens Axboe Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit 3a44d30577e77617a030e543103ca99b0fba29ff Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:37 2023 +0000 bfs: remove writepage implementation If the filesystem implements migrate_folio and writepages, there is no need for a writepage implementation. Link: https://lkml.kernel.org/r/20231215200245.748418-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Jens Axboe Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit 81d469d33075b31f650d0c62360d762680372a9e Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:36 2023 +0000 adfs: remove writepage implementation If the filesystem implements migrate_folio and writepages, there is no need for a writepage implementation. Link: https://lkml.kernel.org/r/20231215200245.748418-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Andrew Morton commit 12ac5a65cb5612e938abdd58c2dcc9cdc80b6101 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:35 2023 +0000 fs: reduce stack usage in do_mpage_readpage Some architectures support a very large PAGE_SIZE, so instead of the 8 pointers we see with a 4kB PAGE_SIZE, we can see 128 pointers with 64kB or so many on Hexagon that it trips compiler warnings about exceeding stack frame size. All we're doing with this array is checking for block contiguity, which we can as well do by remembering the address of the first block in the page and checking this block is at the appropriate offset from that address. Link: https://lkml.kernel.org/r/20231215200245.748418-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Andrew Morton commit 6ad7c607b125ce02bd0870f490d990aee8609070 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:34 2023 +0000 fs: reduce stack usage in __mpage_writepage Some architectures support a very large PAGE_SIZE, so instead of the 8 pointers we see with a 4kB PAGE_SIZE, we can see 128 pointers with 64kB or so many on Hexagon that it trips compiler warnings about exceeding stack frame size. All we're doing with this array is checking for block contiguity, which we can as well do by remembering the address of the first block in the page and checking this block is at the appropriate offset from that address. Link: https://lkml.kernel.org/r/20231215200245.748418-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Andrew Morton commit e8ff8248d37718da1a678648a4485b76f64b9d29 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:33 2023 +0000 fs: convert clean_buffers() to take a folio The only caller already has a folio, so pass it in and use it throughout. Saves two calls to compound_head(). Link: https://lkml.kernel.org/r/20231215200245.748418-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Andrew Morton commit f099c961f4998ad7107b1c6a7d6efb225e9a4614 Author: Matthew Wilcox (Oracle) Date: Fri Dec 15 20:02:32 2023 +0000 fs: remove clean_page_buffers() Patch series "Clean up the writeback paths". Most of these patches verge on the trivial, converting filesystems that just use block_write_full_page() to use mpage_writepages(). But as we saw with Christoph's earlier patchset, there can be some "interesting" gotchas, and I clearly haven't tested the majority of filesystems I've touched here. Patches 3 & 4 get rid of a lot of stack usage on architectures with larger page sizes; 1024 bytes on 64-bit systems with 64KiB pages. It starts to open the door to larger folio sizes on all architectures, but it's certainly not enough yet. Patch 14 is kind of trivial, but it's nice to get that simplification in. This patch (of 14): This function has been unused since the removal of bdev_write_page(). Link: https://lkml.kernel.org/r/20231215200245.748418-1-willy@infradead.org Link: https://lkml.kernel.org/r/20231215200245.748418-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Andrew Morton commit d1adb25df7111de83b64655a80b5a135adbded61 Author: Baolin Wang Date: Fri Dec 15 20:07:52 2023 +0800 mm: migrate: fix getting incorrect page mapping during page migration When running stress-ng testing, we found below kernel crash after a few hours: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 pc : dentry_name+0xd8/0x224 lr : pointer+0x22c/0x370 sp : ffff800025f134c0 ...... Call trace: dentry_name+0xd8/0x224 pointer+0x22c/0x370 vsnprintf+0x1ec/0x730 vscnprintf+0x2c/0x60 vprintk_store+0x70/0x234 vprintk_emit+0xe0/0x24c vprintk_default+0x3c/0x44 vprintk_func+0x84/0x2d0 printk+0x64/0x88 __dump_page+0x52c/0x530 dump_page+0x14/0x20 set_migratetype_isolate+0x110/0x224 start_isolate_page_range+0xc4/0x20c offline_pages+0x124/0x474 memory_block_offline+0x44/0xf4 memory_subsys_offline+0x3c/0x70 device_offline+0xf0/0x120 ...... After analyzing the vmcore, I found this issue is caused by page migration. The scenario is that, one thread is doing page migration, and we will use the target page's ->mapping field to save 'anon_vma' pointer between page unmap and page move, and now the target page is locked and refcount is 1. Currently, there is another stress-ng thread performing memory hotplug, attempting to offline the target page that is being migrated. It discovers that the refcount of this target page is 1, preventing the offline operation, thus proceeding to dump the page. However, page_mapping() of the target page may return an incorrect file mapping to crash the system in dump_mapping(), since the target page->mapping only saves 'anon_vma' pointer without setting PAGE_MAPPING_ANON flag. There are seveval ways to fix this issue: (1) Setting the PAGE_MAPPING_ANON flag for target page's ->mapping when saving 'anon_vma', but this can confuse PageAnon() for PFN walkers, since the target page has not built mappings yet. (2) Getting the page lock to call page_mapping() in __dump_page() to avoid crashing the system, however, there are still some PFN walkers that call page_mapping() without holding the page lock, such as compaction. (3) Using target page->private field to save the 'anon_vma' pointer and 2 bits page state, just as page->mapping records an anonymous page, which can remove the page_mapping() impact for PFN walkers and also seems a simple way. So I choose option 3 to fix this issue, and this can also fix other potential issues for PFN walkers, such as compaction. Link: https://lkml.kernel.org/r/e60b17a88afc38cb32f84c3e30837ec70b343d2b.1702641709.git.baolin.wang@linux.alibaba.com Fixes: 64c8902ed441 ("migrate_pages: split unmap_and_move() to _unmap() and _move()") Signed-off-by: Baolin Wang Reviewed-by: "Huang, Ying" Cc: Matthew Wilcox Cc: David Hildenbrand Cc: Xu Yu Cc: Zi Yan Cc: Signed-off-by: Andrew Morton commit a4575c4138db887bd27dc7f87cf7cfb0224c6f5e Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:42 2023 +0000 mm: convert swap_cluster_readahead and swap_vma_readahead to return a folio shmem_swapin_cluster() immediately converts the page back to a folio, and swapin_readahead() may as well call folio_file_page() once instead of having each function call it. [willy@infradead.org: avoid NULL pointer deref] Link: https://lkml.kernel.org/r/ZYI7OcVlM1voKfBl@casper.infradead.org Link: https://lkml.kernel.org/r/20231213215842.671461-14-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 6e03492e9d288d9ce886064289e2768da5d7d967 Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:41 2023 +0000 mm: return a folio from read_swap_cache_async() The only two callers simply call put_page() on the page returned, so they're happier calling folio_put(). Saves two calls to compound_head(). Link: https://lkml.kernel.org/r/20231213215842.671461-13-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 69fe7d67cb0c6eeab3d4c9a3bf950f9d12af4719 Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:40 2023 +0000 mm: remove page_swap_info() It's more efficient to get the swap_info_struct by calling swp_swap_info() directly. Link: https://lkml.kernel.org/r/20231213215842.671461-12-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit c9bdf768dd9319d2d80a334646e2c8116af9e430 Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:39 2023 +0000 mm: convert swap_readpage() to swap_read_folio() All callers have a folio, so pass it in, saving two calls to compound_head(). Link: https://lkml.kernel.org/r/20231213215842.671461-11-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 3a61e6f668120ee2c7840b91891c858d575d07e2 Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:38 2023 +0000 mm: convert swap_page_sector() to swap_folio_sector() All callers have a folio, so pass it in. Saves a couple of calls to compound_head(). Link: https://lkml.kernel.org/r/20231213215842.671461-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 3c3ebd82e0d1e77df7a3906e79b42d8f0793bdd7 Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:37 2023 +0000 mm: pass a folio to swap_readpage_bdev_async() Make it plain that this takes the head page (which before this point was just an assumption, but is now enforced by the compiler). Link: https://lkml.kernel.org/r/20231213215842.671461-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 2c184d821eec55f9ea3c98c67dc2b0c5ec827c87 Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:36 2023 +0000 mm: pass a folio to swap_readpage_bdev_sync() Make it plain that this takes the head page (which before this point was just an assumption, but is now enforced by the compiler). Link: https://lkml.kernel.org/r/20231213215842.671461-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 64a24e55e3f462836ee618be480bd1b0b018e557 Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:35 2023 +0000 mm: pass a folio to swap_readpage_fs() Saves a call to compound_head(). Link: https://lkml.kernel.org/r/20231213215842.671461-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit ee1b1d9b46f206ffdef5ebe4086d925a5c43805b Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:34 2023 +0000 mm: pass a folio to swap_writepage_bdev_async() Saves a call to compound_head(). Link: https://lkml.kernel.org/r/20231213215842.671461-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 6de62c7bc4bc3444ce63490640efae965b637fe6 Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:33 2023 +0000 mm: pass a folio to swap_writepage_bdev_sync() Saves a call to compound_head(). Link: https://lkml.kernel.org/r/20231213215842.671461-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit bfcd44d5f816b442feb27f59e9312ce38ac4b3cf Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:32 2023 +0000 mm: pass a folio to swap_writepage_fs() Saves several calls to compound_head(). Link: https://lkml.kernel.org/r/20231213215842.671461-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit b99b4e0d9d7f29b428bacd7a61188b2abf340c1e Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:31 2023 +0000 mm: pass a folio to __swap_writepage() Both callers now have a folio, so pass that in instead of the page. Removes a few hidden calls to compound_head(). Link: https://lkml.kernel.org/r/20231213215842.671461-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 96c7b0b42239e7b8987b2664b458dc74e825f760 Author: Matthew Wilcox (Oracle) Date: Wed Dec 13 21:58:30 2023 +0000 mm: return the folio from __read_swap_cache_async() Patch series "More swap folio conversions". These all seem like fairly straightforward conversions to me. A lot of compound_head() calls get removed. And page_swap_info(), which is nice. This patch (of 13): Move the folio->page conversion into the callers that actually want that. Most of the callers are happier with the folio anyway. If the page_allocated boolean is set, the folio allocated is of order-0, so it is safe to pass the page directly to swap_readpage(). Link: https://lkml.kernel.org/r/20231213215842.671461-1-willy@infradead.org Link: https://lkml.kernel.org/r/20231213215842.671461-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 8ba2f844f050a82624ba3ad5146aa3c116f506f7 Author: Chengming Zhou Date: Thu Dec 28 09:45:46 2023 +0000 mm/zswap: change per-cpu mutex and buffer to per-acomp_ctx First of all, we need to rename acomp_ctx->dstmem field to buffer, since we are now using for purposes other than compression. Then we change per-cpu mutex and buffer to per-acomp_ctx, since them belong to the acomp_ctx and are necessary parts when used in the compress/decompress contexts. So we can remove the old per-cpu mutex and dstmem. Link: https://lkml.kernel.org/r/20231213-zswap-dstmem-v5-5-9382162bbf05@bytedance.com Signed-off-by: Chengming Zhou Acked-by: Chris Li (Google) Reviewed-by: Nhat Pham Cc: Barry Song <21cnbao@gmail.com> Cc: Dan Streetman Cc: Johannes Weiner Cc: Seth Jennings Cc: Vitaly Wool Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit e947ba0bbf470fb3d813383426bdcd3c88fe9a7b Author: Chengming Zhou Date: Thu Dec 28 09:45:45 2023 +0000 mm/zswap: cleanup zswap_writeback_entry() Also after the common decompress part goes to __zswap_load(), we can cleanup the zswap_writeback_entry() a little. Link: https://lkml.kernel.org/r/20231213-zswap-dstmem-v5-4-9382162bbf05@bytedance.com Signed-off-by: Chengming Zhou Reviewed-by: Yosry Ahmed Reviewed-by: Nhat Pham Acked-by: Chris Li (Google) Cc: Barry Song <21cnbao@gmail.com> Cc: Dan Streetman Cc: Johannes Weiner Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton commit 66447fd036a5a540bef67a96b770d4ed84ad0467 Author: Chengming Zhou Date: Thu Dec 28 09:45:44 2023 +0000 mm/zswap: cleanup zswap_load() After the common decompress part goes to __zswap_load(), we can cleanup the zswap_load() a little. Link: https://lkml.kernel.org/r/20231213-zswap-dstmem-v5-3-9382162bbf05@bytedance.com Signed-off-by: Chengming Zhou Reviewed-by: Yosry Ahmed Acked-by: Chis Li (Google) Cc: Barry Song <21cnbao@gmail.com> Cc: Dan Streetman Cc: Johannes Weiner Cc: Nhat Pham Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton commit 32acba4c04830487ca3002d716325e02069e053a Author: Chengming Zhou Date: Thu Dec 28 09:45:43 2023 +0000 mm/zswap: refactor out __zswap_load() zswap_load() and zswap_writeback_entry() have the same part that decompress the data from zswap_entry to page, so refactor out the common part as __zswap_load(entry, page). Link: https://lkml.kernel.org/r/20231213-zswap-dstmem-v5-2-9382162bbf05@bytedance.com Signed-off-by: Chengming Zhou Reviewed-by: Nhat Pham Reviewed-by: Yosry Ahmed Acked-by: Chris Li (Google) Cc: Barry Song <21cnbao@gmail.com> Cc: Dan Streetman Cc: Johannes Weiner Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton commit c75f5c1e0f1d231278f42123ee46ba6c0e2b6a96 Author: Chengming Zhou Date: Thu Dec 28 09:45:42 2023 +0000 mm/zswap: reuse dstmem when decompress Patch series "mm/zswap: dstmem reuse optimizations and cleanups", v5. The problem this series tries to optimize is that zswap_load() and zswap_writeback_entry() have to malloc a temporary memory to support !zpool_can_sleep_mapped(). We can avoid it by reusing the percpu crypto_acomp_ctx->dstmem, which is also used by zswap_store() and protected by the same percpu crypto_acomp_ctx->mutex. This patch (of 5): In the !zpool_can_sleep_mapped() case such as zsmalloc, we need to first copy the entry->handle memory to a temporary memory, which is allocated using kmalloc. Obviously we can reuse the per-compressor dstmem to avoid allocating every time, since it's percpu-compressor and protected in percpu mutex. Link: https://lkml.kernel.org/r/20231213-zswap-dstmem-v5-0-9382162bbf05@bytedance.com Link: https://lkml.kernel.org/r/20231213-zswap-dstmem-v5-1-9382162bbf05@bytedance.com Signed-off-by: Chengming Zhou Reviewed-by: Nhat Pham Reviewed-by: Yosry Ahmed Acked-by: Chris Li (Google) Cc: Barry Song <21cnbao@gmail.com> Cc: Dan Streetman Cc: Johannes Weiner Cc: Seth Jennings Cc: Vitaly Wool Signed-off-by: Andrew Morton commit 0710f38ad26a6ac08a9154382fd3abf4e84c9092 Author: Stefan Roesch Date: Mon Dec 18 15:10:54 2023 -0800 mm/ksm: document ksm advisor and its sysfs knobs This documents the KSM advisor and its new knobs in /sys/fs/kernel/mm. Link: https://lkml.kernel.org/r/20231218231054.1625219-5-shr@devkernel.io Signed-off-by: Stefan Roesch Acked-by: David Hildenbrand Cc: Johannes Weiner Cc: Rik van Riel Signed-off-by: Andrew Morton commit 5088b49730afaaf3134d42705cfcff7ce8be082e Author: Stefan Roesch Date: Mon Dec 18 15:10:53 2023 -0800 mm/ksm: add tracepoint for ksm advisor This adds a new tracepoint for the ksm advisor. It reports the last scan time, the new setting of the pages_to_scan parameter and the average cpu percent usage of the ksmd background thread for the last scan. Link: https://lkml.kernel.org/r/20231218231054.1625219-4-shr@devkernel.io Signed-off-by: Stefan Roesch Acked-by: David Hildenbrand Cc: Johannes Weiner Cc: Rik van Riel Signed-off-by: Andrew Morton commit 66790e9a735b5c42349c48881e496b6946a55c05 Author: Stefan Roesch Date: Mon Dec 18 15:10:52 2023 -0800 mm/ksm: add sysfs knobs for advisor This adds four new knobs for the KSM advisor to influence its behaviour. The knobs are: - advisor_mode: none: no advisor (default) scan-time: scan time advisor - advisor_max_cpu: 70 (default, cpu usage percent) - advisor_min_pages_to_scan: 500 (default) - advisor_max_pages_to_scan: 30000 (default) - advisor_target_scan_time: 200 (default in seconds) The new values will take effect on the next scan round. Link: https://lkml.kernel.org/r/20231218231054.1625219-3-shr@devkernel.io Signed-off-by: Stefan Roesch Acked-by: David Hildenbrand Cc: Johannes Weiner Cc: Rik van Riel Signed-off-by: Andrew Morton commit 4e5fa4f5eff66ac654c5f3aa1b6f94d242ccae03 Author: Stefan Roesch Date: Mon Dec 18 15:10:51 2023 -0800 mm/ksm: add ksm advisor Patch series "mm/ksm: Add ksm advisor", v5. What is the KSM advisor? ========================= The ksm advisor automatically manages the pages_to_scan setting to achieve a target scan time. The target scan time defines how many seconds it should take to scan all the candidate KSM pages. In other words the pages_to_scan rate is changed by the advisor to achieve the target scan time. Why do we need a KSM advisor? ============================== The number of candidate pages for KSM is dynamic. It can often be observed that during the startup of an application more candidate pages need to be processed. Without an advisor the pages_to_scan parameter needs to be sized for the maximum number of candidate pages. With the scan time advisor the pages_to_scan parameter based can be changed based on demand. Algorithm ========== The algorithm calculates the change value based on the target scan time and the previous scan time. To avoid pertubations an exponentially weighted moving average is applied. The algorithm has a max and min value to: - guarantee responsiveness to changes - to limit CPU resource consumption Parameters to influence the KSM scan advisor ============================================= The respective parameters are: - ksm_advisor_mode 0: None (default), 1: scan time advisor - ksm_advisor_target_scan_time how many seconds a scan should of all candidate pages take - ksm_advisor_max_cpu upper limit for the cpu usage in percent of the ksmd background thread The initial value and the max value for the pages_to_scan parameter can be limited with: - ksm_advisor_min_pages_to_scan minimum value for pages_to_scan per batch - ksm_advisor_max_pages_to_scan maximum value for pages_to_scan per batch The default settings for the above two parameters should be suitable for most workloads. The parameters are exposed as knobs in /sys/kernel/mm/ksm. By default the scan time advisor is disabled. Currently there are two advisors: - none and - scan-time. Resource savings ================= Tests with various workloads have shown considerable CPU savings. Most of the workloads I have investigated have more candidate pages during startup. Once the workload is stable in terms of memory, the number of candidate pages is reduced. Without the advisor, the pages_to_scan needs to be sized for the maximum number of candidate pages. So having this advisor definitely helps in reducing CPU consumption. For the instagram workload, the advisor achieves a 25% CPU reduction. Once the memory is stable, the pages_to_scan parameter gets reduced to about 40% of its max value. The new advisor works especially well if the smart scan feature is also enabled. How is defining a target scan time better? =========================================== For an administrator it is more logical to set a target scan time.. The administrator can determine how many pages are scanned on each scan. Therefore setting a target scan time makes more sense. In addition the administrator might have a good idea about the memory sizing of its respective workloads. Setting cpu limits is easier than setting The pages_to_scan parameter. The pages_to_scan parameter is per batch. For the administrator it is difficult to set the pages_to_scan parameter. Tracing ======= A new tracing event has been added for the scan time advisor. The new trace event is called ksm_advisor. It reports the scan time, the new pages_to_scan setting and the cpu usage of the ksmd background thread. Other approaches ================= Approach 1: Adapt pages_to_scan after processing each batch. If KSM merges pages, increase the scan rate, if less KSM pages, reduce the the pages_to_scan rate. This doesn't work too well. While it increases the pages_to_scan for a short period, but generally it ends up with a too low pages_to_scan rate. Approach 2: Adapt pages_to_scan after each scan. The problem with that approach is that the calculated scan rate tends to be high. The more aggressive KSM scans, the more pages it can de-duplicate. There have been earlier attempts at an advisor: propose auto-run mode of ksm and its tests (https://marc.info/?l=linux-mm&m=166029880214485&w=2) This patch (of 5): This adds the ksm advisor. The ksm advisor automatically manages the pages_to_scan setting to achieve a target scan time. The target scan time defines how many seconds it should take to scan all the candidate KSM pages. In other words the pages_to_scan rate is changed by the advisor to achieve the target scan time. The algorithm has a max and min value to: - guarantee responsiveness to changes - limit CPU resource consumption The respective parameters are: - ksm_advisor_target_scan_time (how many seconds a scan should take) - ksm_advisor_max_cpu (maximum value for cpu percent usage) - ksm_advisor_min_pages (minimum value for pages_to_scan per batch) - ksm_advisor_max_pages (maximum value for pages_to_scan per batch) The algorithm calculates the change value based on the target scan time and the previous scan time. To avoid pertubations an exponentially weighted moving average is applied. The advisor is managed by two main parameters: target scan time, cpu max time for the ksmd background thread. These parameters determine how aggresive ksmd scans. In addition there are min and max values for the pages_to_scan parameter to make sure that its initial and max values are not set too low or too high. This ensures that it is able to react to changes quickly enough. The default values are: - target scan time: 200 secs - max cpu: 70% - min pages: 500 - max pages: 30000 By default the advisor is disabled. Currently there are two advisors: none and scan-time. Tests with various workloads have shown considerable CPU savings. Most of the workloads I have investigated have more candidate pages during startup, once the workload is stable in terms of memory, the number of candidate pages is reduced. Without the advisor, the pages_to_scan needs to be sized for the maximum number of candidate pages. So having this advisor definitely helps in reducing CPU consumption. For the instagram workload, the advisor achieves a 25% CPU reduction. Once the memory is stable, the pages_to_scan parameter gets reduced to about 40% of its max value. Link: https://lkml.kernel.org/r/20231218231054.1625219-1-shr@devkernel.io Link: https://lkml.kernel.org/r/20231218231054.1625219-2-shr@devkernel.io Signed-off-by: Stefan Roesch Acked-by: David Hildenbrand Cc: Johannes Weiner Cc: Rik van Riel Cc: Stefan Roesch Signed-off-by: Andrew Morton commit cafa8e37a2ebd344ae0774324c21f46640bbaab3 Author: Matthew Wilcox (Oracle) Date: Mon Dec 11 16:22:14 2023 +0000 mm: remove page_add_new_anon_rmap and lru_cache_add_inactive_or_unevictable All callers have now been converted to folio_add_new_anon_rmap() and folio_add_lru_vma() so we can remove the wrapper. Link: https://lkml.kernel.org/r/20231211162214.2146080-10-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 5432726848bb27a01badcbc93b596f39ee6c5ffb Author: Matthew Wilcox (Oracle) Date: Mon Dec 11 16:22:13 2023 +0000 mm: convert collapse_huge_page() to use a folio Replace three calls to compound_head() with one. Link: https://lkml.kernel.org/r/20231211162214.2146080-9-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit d3b082736518562f4eed185e1a67f28d20635fef Author: Matthew Wilcox (Oracle) Date: Mon Dec 11 16:22:12 2023 +0000 mm: convert migrate_vma_insert_page() to use a folio Replaces five calls to compound_head() with one. Link: https://lkml.kernel.org/r/20231211162214.2146080-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Reviewed-by: Alistair Popple Signed-off-by: Andrew Morton commit cb9089babc91f7ffc785d51a0fa567365b0e7751 Author: Matthew Wilcox (Oracle) Date: Mon Dec 11 16:22:11 2023 +0000 mm: remove references to page_add_new_anon_rmap in comments Refer to folio_add_new_anon_rmap() instead. Link: https://lkml.kernel.org/r/20231211162214.2146080-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit b2926ac8178bf5c88ada4285f413f56c1cafc592 Author: Matthew Wilcox (Oracle) Date: Mon Dec 11 16:22:10 2023 +0000 mm: remove stale example from comment folio_add_new_anon_rmap() no longer works this way, so just remove the entire example. Link: https://lkml.kernel.org/r/20231211162214.2146080-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Cc: Ralph Campbell Signed-off-by: Andrew Morton commit 2853b66b601a265306be709b4d86aaff7d92a0fc Author: Matthew Wilcox (Oracle) Date: Mon Dec 11 16:22:09 2023 +0000 mm: remove some calls to page_add_new_anon_rmap() We already have the folio in these functions, we just need to use it. folio_add_new_anon_rmap() didn't exist at the time they were converted to folios. Link: https://lkml.kernel.org/r/20231211162214.2146080-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit f00f48436c789af659047d3c5d6f6d17e640634e Author: Matthew Wilcox (Oracle) Date: Mon Dec 11 16:22:08 2023 +0000 mm: convert unuse_pte() to use a folio throughout Saves about eight calls to compound_head(). Link: https://lkml.kernel.org/r/20231211162214.2146080-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 8d294a8c6393afbde59cf14a0e8413df4b206698 Author: Matthew Wilcox (Oracle) Date: Tue Dec 12 16:48:13 2023 +0000 mm: remove PageAnonExclusive assertions in unuse_pte() The page in question is either freshly allocated or known to be in the swap cache; these assertions are not particularly useful. Link: https://lkml.kernel.org/r/20231212164813.2540119-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton commit 96db66d9c8f3c1547325af01b1f328b85d6ee1b9 Author: Matthew Wilcox (Oracle) Date: Mon Dec 11 16:22:06 2023 +0000 mm: convert ksm_might_need_to_copy() to work on folios Patch series "Finish two folio conversions". Most callers of page_add_new_anon_rmap() and lru_cache_add_inactive_or_unevictable() have been converted to their folio equivalents, but there are still a few stragglers. There's a bit of preparatory work in ksm and unuse_pte(), but after that it's pretty mechanical. This patch (of 9): Accept a folio as an argument and return a folio result. Removes a call to compound_head() in do_swap_page(), and prevents folio & page from getting out of sync in unuse_pte(). Reviewed-by: David Hildenbrand [willy@infradead.org: fix smatch warning] Link: https://lkml.kernel.org/r/ZXnPtblC6A1IkyAB@casper.infradead.org [david@redhat.com: only adjust the page if the folio changed] Link: https://lkml.kernel.org/r/6a8f2110-fa91-4c10-9eae-88315309a6e3@redhat.com Link: https://lkml.kernel.org/r/20231211162214.2146080-1-willy@infradead.org Link: https://lkml.kernel.org/r/20231211162214.2146080-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton commit a2bf6a9ca80532b75f8f8b6a1cd75ef7e5150576 Author: Suren Baghdasaryan Date: Wed Dec 6 02:36:59 2023 -0800 selftests/mm: add UFFDIO_MOVE ioctl test Add tests for new UFFDIO_MOVE ioctl which uses uffd to move source into destination buffer while checking the contents of both after the move. After the operation the content of the destination buffer should match the original source buffer's content while the source buffer should be zeroed. Separate tests are designed for PMD aligned and unaligned cases because they utilize different code paths in the kernel. Link: https://lkml.kernel.org/r/20231206103702.3873743-6-surenb@google.com Signed-off-by: Suren Baghdasaryan Cc: Al Viro Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Brian Geffon Cc: Christian Brauner Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport (IBM) Cc: Nicolas Geoffray Cc: Peter Xu Cc: Ryan Roberts Cc: Shuah Khan Cc: ZhangPeng Signed-off-by: Andrew Morton commit e8a422408ba9760e2640ca57e4b79c3dd7f48bd2 Author: Suren Baghdasaryan Date: Wed Dec 6 02:36:58 2023 -0800 selftests/mm: add uffd_test_case_ops to allow test case-specific operations Currently each test can specify unique operations using uffd_test_ops, however these operations are per-memory type and not per-test. Add uffd_test_case_ops which each test case can customize for its own needs regardless of the memory type being used. Pre- and post-allocation operations are added, some of which will be used in the next patch to implement test-specific operations like madvise after memory is allocated but before it is accessed. Link: https://lkml.kernel.org/r/20231206103702.3873743-5-surenb@google.com Signed-off-by: Suren Baghdasaryan Cc: Al Viro Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Brian Geffon Cc: Christian Brauner Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport (IBM) Cc: Nicolas Geoffray Cc: Peter Xu Cc: Ryan Roberts Cc: Shuah Khan Cc: ZhangPeng Signed-off-by: Andrew Morton commit 1c8d39fa7b63dcbb77af7b0325fdc519c35fe618 Author: Suren Baghdasaryan Date: Wed Dec 6 02:36:57 2023 -0800 selftests/mm: call uffd_test_ctx_clear at the end of the test uffd_test_ctx_clear() is being called from uffd_test_ctx_init() to unmap areas used in the previous test run. This approach is problematic because while unmapping areas uffd_test_ctx_clear() uses page_size and nr_pages which might differ from one test run to another. Fix this by calling uffd_test_ctx_clear() after each test is done. Link: https://lkml.kernel.org/r/20231206103702.3873743-4-surenb@google.com Signed-off-by: Suren Baghdasaryan Reviewed-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: Al Viro Cc: Andrea Arcangeli Cc: Brian Geffon Cc: Christian Brauner Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport (IBM) Cc: Nicolas Geoffray Cc: Ryan Roberts Cc: Shuah Khan Cc: ZhangPeng Signed-off-by: Andrew Morton commit adef440691bab824e39c1b17382322d195e1fab0 Author: Andrea Arcangeli Date: Wed Dec 6 02:36:56 2023 -0800 userfaultfd: UFFDIO_MOVE uABI Implement the uABI of UFFDIO_MOVE ioctl. UFFDIO_COPY performs ~20% better than UFFDIO_MOVE when the application needs pages to be allocated [1]. However, with UFFDIO_MOVE, if pages are available (in userspace) for recycling, as is usually the case in heap compaction algorithms, then we can avoid the page allocation and memcpy (done by UFFDIO_COPY). Also, since the pages are recycled in the userspace, we avoid the need to release (via madvise) the pages back to the kernel [2]. We see over 40% reduction (on a Google pixel 6 device) in the compacting thread's completion time by using UFFDIO_MOVE vs. UFFDIO_COPY. This was measured using a benchmark that emulates a heap compaction implementation using userfaultfd (to allow concurrent accesses by application threads). More details of the usecase are explained in [2]. Furthermore, UFFDIO_MOVE enables moving swapped-out pages without touching them within the same vma. Today, it can only be done by mremap, however it forces splitting the vma. [1] https://lore.kernel.org/all/1425575884-2574-1-git-send-email-aarcange@redhat.com/ [2] https://lore.kernel.org/linux-mm/CA+EESO4uO84SSnBhArH4HvLNhaUQ5nZKNKXqxRCyjniNVjp0Aw@mail.gmail.com/ Update for the ioctl_userfaultfd(2) manpage: UFFDIO_MOVE (Since Linux xxx) Move a continuous memory chunk into the userfault registered range and optionally wake up the blocked thread. The source and destination addresses and the number of bytes to move are specified by the src, dst, and len fields of the uffdio_move structure pointed to by argp: struct uffdio_move { __u64 dst; /* Destination of move */ __u64 src; /* Source of move */ __u64 len; /* Number of bytes to move */ __u64 mode; /* Flags controlling behavior of move */ __s64 move; /* Number of bytes moved, or negated error */ }; The following value may be bitwise ORed in mode to change the behavior of the UFFDIO_MOVE operation: UFFDIO_MOVE_MODE_DONTWAKE Do not wake up the thread that waits for page-fault resolution UFFDIO_MOVE_MODE_ALLOW_SRC_HOLES Allow holes in the source virtual range that is being moved. When not specified, the holes will result in ENOENT error. When specified, the holes will be accounted as successfully moved memory. This is mostly useful to move hugepage aligned virtual regions without knowing if there are transparent hugepages in the regions or not, but preventing the risk of having to split the hugepage during the operation. The move field is used by the kernel to return the number of bytes that was actually moved, or an error (a negated errno- style value). If the value returned in move doesn't match the value that was specified in len, the operation fails with the error EAGAIN. The move field is output-only; it is not read by the UFFDIO_MOVE operation. The operation may fail for various reasons. Usually, remapping of pages that are not exclusive to the given process fail; once KSM might deduplicate pages or fork() COW-shares pages during fork() with child processes, they are no longer exclusive. Further, the kernel might only perform lightweight checks for detecting whether the pages are exclusive, and return -EBUSY in case that check fails. To make the operation more likely to succeed, KSM should be disabled, fork() should be avoided or MADV_DONTFORK should be configured for the source VMA before fork(). This ioctl(2) operation returns 0 on success. In this case, the entire area was moved. On error, -1 is returned and errno is set to indicate the error. Possible errors include: EAGAIN The number of bytes moved (i.e., the value returned in the move field) does not equal the value that was specified in the len field. EINVAL Either dst or len was not a multiple of the system page size, or the range specified by src and len or dst and len was invalid. EINVAL An invalid bit was specified in the mode field. ENOENT The source virtual memory range has unmapped holes and UFFDIO_MOVE_MODE_ALLOW_SRC_HOLES is not set. EEXIST The destination virtual memory range is fully or partially mapped. EBUSY The pages in the source virtual memory range are either pinned or not exclusive to the process. The kernel might only perform lightweight checks for detecting whether the pages are exclusive. To make the operation more likely to succeed, KSM should be disabled, fork() should be avoided or MADV_DONTFORK should be configured for the source virtual memory area before fork(). ENOMEM Allocating memory needed for the operation failed. ESRCH The target process has exited at the time of a UFFDIO_MOVE operation. Link: https://lkml.kernel.org/r/20231206103702.3873743-3-surenb@google.com Signed-off-by: Andrea Arcangeli Signed-off-by: Suren Baghdasaryan Cc: Al Viro Cc: Axel Rasmussen Cc: Brian Geffon Cc: Christian Brauner Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport (IBM) Cc: Nicolas Geoffray Cc: Peter Xu Cc: Ryan Roberts Cc: Shuah Khan Cc: ZhangPeng Signed-off-by: Andrew Morton commit 880a99b60d467eefd96322e27b0a8c0b805dfa43 Author: Andrea Arcangeli Date: Wed Dec 6 02:36:55 2023 -0800 mm/rmap: support move to different root anon_vma in folio_move_anon_rmap() Patch series "userfaultfd move option", v6. This patch series introduces UFFDIO_MOVE feature to userfaultfd, which has long been implemented and maintained by Andrea in his local tree [1], but was not upstreamed due to lack of use cases where this approach would be better than allocating a new page and copying the contents. Previous upstraming attempts could be found at [6] and [7]. UFFDIO_COPY performs ~20% better than UFFDIO_MOVE when the application needs pages to be allocated [2]. However, with UFFDIO_MOVE, if pages are available (in userspace) for recycling, as is usually the case in heap compaction algorithms, then we can avoid the page allocation and memcpy (done by UFFDIO_COPY). Also, since the pages are recycled in the userspace, we avoid the need to release (via madvise) the pages back to the kernel [3]. We see over 40% reduction (on a Google pixel 6 device) in the compacting thread's completion time by using UFFDIO_MOVE vs. UFFDIO_COPY. This was measured using a benchmark that emulates a heap compaction implementation using userfaultfd (to allow concurrent accesses by application threads). More details of the usecase are explained in [3]. Furthermore, UFFDIO_MOVE enables moving swapped-out pages without touching them within the same vma. Today, it can only be done by mremap, however it forces splitting the vma. TODOs for follow-up improvements: - cross-mm support. Known differences from single-mm and missing pieces: - memcg recharging (might need to isolate pages in the process) - mm counters - cross-mm deposit table moves - cross-mm test - document the address space where src and dest reside in struct uffdio_move - TLB flush batching. Will require extensive changes to PTL locking in move_pages_pte(). OTOH that might let us reuse parts of mremap code. This patch (of 5): For now, folio_move_anon_rmap() was only used to move a folio to a different anon_vma after fork(), whereby the root anon_vma stayed unchanged. For that, it was sufficient to hold the folio lock when calling folio_move_anon_rmap(). However, we want to make use of folio_move_anon_rmap() to move folios between VMAs that have a different root anon_vma. As folio_referenced() performs an RMAP walk without holding the folio lock but only holding the anon_vma in read mode, holding the folio lock is insufficient. When moving to an anon_vma with a different root anon_vma, we'll have to hold both, the folio lock and the anon_vma lock in write mode. Consequently, whenever we succeeded in folio_lock_anon_vma_read() to read-lock the anon_vma, we have to re-check if the mapping was changed in the meantime. If that was the case, we have to retry. Note that folio_move_anon_rmap() must only be called if the anon page is exclusive to a process, and must not be called on KSM folios. This is a preparation for UFFDIO_MOVE, which will hold the folio lock, the anon_vma lock in write mode, and the mmap_lock in read mode. Link: https://lkml.kernel.org/r/20231206103702.3873743-1-surenb@google.com Link: https://lkml.kernel.org/r/20231206103702.3873743-2-surenb@google.com Signed-off-by: Andrea Arcangeli Signed-off-by: Suren Baghdasaryan Acked-by: Peter Xu Cc: Al Viro Cc: Axel Rasmussen Cc: Brian Geffon Cc: Christian Brauner Cc: David Hildenbrand Cc: Hugh Dickins Cc: Jann Horn Cc: Kalesh Singh Cc: kernel-team@android.com Cc: Liam R. Howlett Cc: Lokesh Gidra Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Mike Rapoport (IBM) Cc: Nicolas Geoffray Cc: Ryan Roberts Cc: Shuah Khan Cc: ZhangPeng Signed-off-by: Andrew Morton commit fa399c3112344fa420944e99cd529d679411ebe6 Author: Matthew Wilcox (Oracle) Date: Thu Nov 9 21:06:08 2023 +0000 buffer: fix more functions for block size > PAGE_SIZE Both __block_write_full_folio() and block_read_full_folio() assumed that block size <= PAGE_SIZE. Replace the shift with a divide, which is probably cheaper than first calculating the shift. That lets us remove block_size_bits() as these were the last callers. Link: https://lkml.kernel.org/r/20231109210608.2252323-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Pankaj Raghav Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit b0619401b8cdafcf32ad352a8e9a225ab0b4b10d Author: Matthew Wilcox (Oracle) Date: Thu Nov 9 21:06:07 2023 +0000 buffer: handle large folios in __block_write_begin_int() When __block_write_begin_int() was converted to support folios, we did not expect large folios to be passed to it. With the current work to support large block size storage devices, this will no longer be true so change the checks on 'from' and 'to' to be related to the size of the folio instead of PAGE_SIZE. Also remove an assumption that the block size is smaller than PAGE_SIZE. Link: https://lkml.kernel.org/r/20231109210608.2252323-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reported-by: Ryusuke Konishi Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Pankaj Raghav Signed-off-by: Andrew Morton commit 4b04646caed5449ca97b909bbadca0a7a2762159 Author: Matthew Wilcox (Oracle) Date: Thu Nov 9 21:06:06 2023 +0000 buffer: fix various functions for block size > PAGE_SIZE If i_blkbits is larger than PAGE_SHIFT, we shift by a negative number, which is undefined. It is safe to shift the block left as a block device must be smaller than MAX_LFS_FILESIZE, which is guaranteed to fit in loff_t. Link: https://lkml.kernel.org/r/20231109210608.2252323-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Pankaj Raghav Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit 808441943f6b817f4836752c6e0d1c07507f375e Author: Matthew Wilcox (Oracle) Date: Thu Nov 9 21:06:05 2023 +0000 buffer: cast block to loff_t before shifting it While sector_t is always defined as a u64 today, that hasn't always been the case and it might not always be the same size as loff_t in the future. Link: https://lkml.kernel.org/r/20231109210608.2252323-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Pankaj Raghav Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit 5f3bd90d9b98855c2e811aa3b4823d583b0020df Author: Matthew Wilcox (Oracle) Date: Thu Nov 9 21:06:04 2023 +0000 buffer: fix grow_buffers() for block size > PAGE_SIZE We must not shift by a negative number so work in terms of a byte offset to avoid the awkward shift left-or-right-depending-on-sign option. This means we need to use check_mul_overflow() to ensure that a large block number does not result in a wrap. Link: https://lkml.kernel.org/r/20231109210608.2252323-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Nathan Chancellor Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Pankaj Raghav Cc: Ryusuke Konishi [nathan@kernel.org: add cast in grow_buffers() to avoid a multiplication libcall] Link: https://lkml.kernel.org/r/20231128-avoid-muloti4-grow_buffers-v1-1-bc3d0f0ec483@kernel.org Signed-off-by: Andrew Morton commit 382497ada051a6fc79612aba5e30cdfa26364374 Author: Matthew Wilcox (Oracle) Date: Thu Nov 9 21:06:03 2023 +0000 buffer: calculate block number inside folio_init_buffers() The calculation of block from index doesn't work for devices with a block size larger than PAGE_SIZE as we end up shifting by a negative number. Instead, calculate the number of the first block from the folio's position in the block device. We no longer need to pass sizebits to grow_dev_folio(). Link: https://lkml.kernel.org/r/20231109210608.2252323-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Pankaj Raghav Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit 6d840a18773f36baaecc2d2f7fb18ec5862349e6 Author: Matthew Wilcox (Oracle) Date: Thu Nov 9 21:06:02 2023 +0000 buffer: return bool from grow_dev_folio() Patch series "More buffer_head cleanups", v2. The first patch is a left-over from last cycle. The rest fix "obvious" block size > PAGE_SIZE problems. I haven't tested with a large block size setup (but I have done an ext4 xfstests run). This patch (of 7): Rename grow_dev_page() to grow_dev_folio() and make it return a bool. Document what that bool means; it's more subtle than it first appears. Also rename the 'failed' label to 'unlock' beacuse it's not exactly 'failed'. It just hasn't succeeded. Link: https://lkml.kernel.org/r/20231109210608.2252323-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Pankaj Raghav Cc: Ryusuke Konishi Signed-off-by: Andrew Morton commit 16f70feaabe9fde0af703f2991d44a7589f0b6e3 Author: Ken Xue Date: Mon Dec 25 13:58:35 2023 +0800 ACPI: button: trigger wakeup key events Andorid can wakeup from various wakeup sources, but only several wakeup sources can wake up screen with right events(POWER, WAKEUP) from input device. Regarding pressing acpi power button, it can resume system and ACPI_BITMASK_WAKE_STATUS and ACPI_BITMASK_POWER_BUTTON_STATUS are set in pm1a_sts, but kernel does not report any key event to user space during resuming by default. So, send wakeup key event to user space during resume from power button. Signed-off-by: Ken Xue Reviewed-by: Andy Shevchenko [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit df0cced74159c79e36ce7971f0bf250673296d93 Author: Hans de Goede Date: Sat Dec 23 15:57:06 2023 +0100 ACPI: resource: Add another DMI match for the TongFang GMxXGxx The TongFang GMxXGxx, which needs IRQ overriding for the keyboard to work, is also sold as the Eluktronics RP-15 which does not use the standard TongFang GMxXGxx DMI board_name. Add an entry for this laptop to the irq1_edge_low_force_override[] DMI table to make the internal keyboard functional. Reported-by: Luis Acuna Signed-off-by: Hans de Goede Cc: All applicable Signed-off-by: Rafael J. Wysocki commit 67508b874844b80ac49f70b78d67036c28b9fe7e Author: Duje Mihanović Date: Tue Dec 26 21:00:24 2023 +0100 ASoC: pxa: sspa: Don't select SND_ARM On ARM64 platforms, SND_ARM shouldn't be selectable, but enabling SND_SOC_MMP_SSPA will enable SND_ARM and cause build errors if SND_ARMAACI is enabled (which it is by default). Since the SSPA driver doesn't depend on AACI nor PXA2XX_LIB, remove this false dependency. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310230518.zs9Qpg3j-lkp@intel.com/ Signed-off-by: Duje Mihanović Link: https://lore.kernel.org/r/20231226200025.30870-1-duje.mihanovic@skole.hr Signed-off-by: Mark Brown commit 5fa3bbb8eba7eaddd5c57952fca1f28bc3520d51 Author: Shuming Fan Date: Fri Dec 29 17:29:22 2023 +0800 ASoC: rt5663: cancel the work when system suspends This patch makes sure that the workqueue is completed before the system suspends. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20231229092922.853-1-shumingf@realtek.com Signed-off-by: Mark Brown commit c8f5caec3df84a02b937d6d9cda1f7ffa8dc443f Author: Borislav Petkov (AMD) Date: Fri Dec 29 18:08:18 2023 +0100 cpuidle: haltpoll: Do not enable interrupts when entering idle The cpuidle drivers' ->enter() methods are supposed to be IRQ invariant: 5e26aa933911 ("cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls") bb7b11258561 ("cpuidle: Move IRQ state validation") Do that in the haltpoll driver too. Fixes: 5e26aa933911 ("cpuidle/poll: Ensure IRQs stay disabled after cpuidle_state::enter() calls") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218245 Reported-by: Tested-by: Signed-off-by: Borislav Petkov (AMD) [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit a3cd6db4cc2ed70fc3468cdb5eb20745e7fefba9 Author: Lukasz Luba Date: Wed Dec 20 23:17:53 2023 +0000 thermal: gov_power_allocator: Support new update callback of weights When the thermal instance's weight is updated from the sysfs the governor update_tz() callback is triggered. Implement proper reaction to this event in the IPA, which would save CPU cycles spent in throttle(). This will speed-up the main throttle() IPA function and clean it up a bit. Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit bfc57bd1685981730bfe9802d9de7603a0a43bc4 Author: Lukasz Luba Date: Wed Dec 20 23:17:52 2023 +0000 thermal/sysfs: Update governors when the 'weight' has changed Support governors update when the thermal instance's weight has changed. This allows to adjust internal state for the governor. Signed-off-by: Lukasz Luba [ rjw: Add two empty code lines aroung the locking ] Signed-off-by: Rafael J. Wysocki commit 879c9dc511732b74a04f11336e00f12783337a8a Author: Lukasz Luba Date: Wed Dec 20 23:17:51 2023 +0000 thermal/sysfs: Update instance->weight under tz lock User space can change the weight of a thermal instance via sysfs while the .throttle() callback is running for a governor, because weight_store() does not use the zone lock. The IPA governor uses instance weight values for power calculations and caches the sum of them as total_weight, so it gets confused when one of them changes while its .throttle() callback is running. To prevent that from happening, use thermal zone locking in weight_store(). Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit e3ecd5716b957ff0e558e853d34be8d1e8173f64 Author: Lukasz Luba Date: Wed Dec 20 23:17:50 2023 +0000 thermal: gov_power_allocator: Simplify checks for valid power actor There is a need to check if the cooling device in the thermal zone supports IPA callback and is set for control trip point. Refactor the code which validates the power actor capabilities and make it more consistent in all places. No intentional functional impact. Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 912e97c67cc3f333c4c5df8f51498c651792e658 Author: Lukasz Luba Date: Wed Dec 20 23:17:49 2023 +0000 thermal: gov_power_allocator: Move memory allocation out of throttle() The new thermal callback allows to react to the change of cooling instances in the thermal zone. Move the memory allocation to that new callback and save CPU cycles in the throttle() code path. Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 792c3dc08ddcf29a514156bb72b3d2ad4998c69f Author: Lukasz Luba Date: Wed Dec 20 23:17:48 2023 +0000 thermal: gov_power_allocator: Change trace functions Change trace event trace_thermal_power_allocator() to not use dynamic array for requested power and granted power for all power actors. Instead, simplify the trace event and print other simple values. Add new trace event to print power actor information of requested power and granted power. That trace event would be called in a loop for each power actor. The trace data would be easier to parse comparing to the dynamic array implementation. Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 3d827317b17febba02b6b976fa910364221fecaf Author: Lukasz Luba Date: Wed Dec 20 23:17:47 2023 +0000 thermal: gov_power_allocator: Refactor checks in divvy_up_power() Simplify the code and remove one extra 'if' block. No intentional functional impact. Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 2c06456f656f7093077b4df958ed86a6554bc917 Author: Lukasz Luba Date: Wed Dec 20 23:17:46 2023 +0000 thermal: gov_power_allocator: Refactor check_power_actors() In preparation for a subsequent change, rearrange check_power_actors(). No intentional functional impact. Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit a8c959402d4dd6823918b33828d79900ae58c700 Author: Lukasz Luba Date: Wed Dec 20 23:17:45 2023 +0000 thermal: core: Add governor callback for thermal zone change Add a new callback to the struct thermal_governor. It can be used for updating governors when there is a change in the thermal zone internals, e.g. thermal cooling device is bind to the thermal zone. That makes possible to move some heavy operations like memory allocations related to the number of cooling instances out of the throttle() callback. Both callback code paths (throttle() and update_tz()) are protected with the same thermal zone lock, which guaranties the consistency. Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 31e4fac930814f2f92eb6ebac9c4d4e3b09f7aaf Author: Christoph Hellwig Date: Thu Dec 28 07:55:45 2023 +0000 mtd_blkdevs: use the default discard granularity The discard granularity now defaults to a single sector, so don't set that value explicitly. Signed-off-by: Christoph Hellwig Acked-by: Richard Weinberger Link: https://lore.kernel.org/r/20231228075545.362768-10-hch@lst.de Signed-off-by: Jens Axboe commit 105c1a5f6ccef7f52f9e76664407ef96218272eb Author: Christoph Hellwig Date: Thu Dec 28 07:55:44 2023 +0000 bcache: use the default discard granularity The discard granularity now defaults to a single sector, so don't set that value explicitly. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231228075545.362768-9-hch@lst.de Signed-off-by: Jens Axboe commit 3753039def5d0d1c43af847b507ba9b782db183a Author: Christoph Hellwig Date: Thu Dec 28 07:55:43 2023 +0000 zram: use the default discard granularity The discard granularity now defaults to a single sector, so don't set that value explicitly. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231228075545.362768-8-hch@lst.de Signed-off-by: Jens Axboe commit 724325477f8a48ce1defc2a49998bbc19fe85c88 Author: Christoph Hellwig Date: Thu Dec 28 07:55:42 2023 +0000 null_blk: use the default discard granularity The discard granularity now defaults to a single sector, so don't set that value explicitly. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231228075545.362768-7-hch@lst.de Signed-off-by: Jens Axboe commit 1e2ab2e8a98c9e0629b5b8bff8ee6f2cb3e8daac Author: Christoph Hellwig Date: Thu Dec 28 07:55:41 2023 +0000 nbd: use the default discard granularity The discard granularity now defaults to a single sector, so don't set that value explicitly. Also don't bother clearing it as a discard granularity without discard_sectors doesn't mean anything. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231228075545.362768-6-hch@lst.de Signed-off-by: Jens Axboe commit 599d9d4eab7c3d5dc6f1e0f8f052fee9eaa54e50 Author: Christoph Hellwig Date: Thu Dec 28 07:55:40 2023 +0000 ubd: use the default discard granularity The discard granularity now defaults to a single sector, so don't set that value explicitly. Signed-off-by: Christoph Hellwig Acked-by: Richard Weinberger Link: https://lore.kernel.org/r/20231228075545.362768-5-hch@lst.de Signed-off-by: Jens Axboe commit 3c407dc723bbf914f3744b0c2bb82265b411a50c Author: Christoph Hellwig Date: Thu Dec 28 07:55:39 2023 +0000 block: default the discard granularity to sector size Current the discard granularity defaults to 0 and must be initialized by any driver that wants to support discard. Default to the sector size instead, which is the smallest possible value, and a very useful default. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231228075545.362768-4-hch@lst.de Signed-off-by: Jens Axboe commit 5e7169e7f7c0989304dbe8467a1d703d614c64db Author: Christoph Hellwig Date: Thu Dec 28 07:55:38 2023 +0000 bcache: discard_granularity should not be smaller than a sector Just like all block I/O, discards are in units of sectors. Thus setting a smaller than sector size discard limit in case of > 512 byte sectors in bcache doesn't make sense. Always set the discard granularity to 512 bytes instead. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231228075545.362768-3-hch@lst.de Signed-off-by: Jens Axboe commit 928a5dd3a849dc6d8298835bdcb25c360d41bccb Author: Christoph Hellwig Date: Thu Dec 28 07:55:37 2023 +0000 block: remove two comments in bio_split_discard A zero discard_granularity is not treated the same as a single-block one, and not having any segments after taking alignment is perfectly fine and does not need a warning. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231228075545.362768-2-hch@lst.de Signed-off-by: Jens Axboe commit 64bf8dec54cfe57f416884a6b3d54c7f4259e93f Merge: 3abf66a42f1ff 4a2c8cc164473 Author: Takashi Iwai Date: Fri Dec 29 15:58:04 2023 +0100 Merge branch 'topic/scarlett2' into for-next Pull Scarlett2 USB audio mixer extensions. Signed-off-by: Takashi Iwai commit 2cb54a19ac7153b9a26a72098c495187f64c2276 Author: John Johansen Date: Fri Dec 29 06:54:41 2023 -0800 apparmor: Fix ref count leak in task_kill apparmor_task_kill was not putting the task_cred reference tc, or the cred_label reference tc when dealing with a passed in cred, fix this by using a single fn exit. Fixes: 90c436a64a6e ("apparmor: pass cred through to audit info.") Signed-off-by: John Johansen commit 4a2c8cc1644738191d9d6c0bca24516cfe390d41 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:39:04 2023 +1030 ALSA: scarlett2: Add PCM Input Switch for Solo Gen 4 When the Direct button on the Solo Gen 4 is held for 3 seconds, the PCM 1 and 2 inputs are toggled between DSP Outputs 1 and 2, and Mixer Outputs E and F. This patch adds the corresponding ALSA control. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/8c67c6131c459588ac4edab11e1fbc40a8297328.1703612638.git.g@b4.vu commit 4e809a299677b8a9a239574a787620cb4f6c086a Author: Geoffrey D. Bennett Date: Wed Dec 27 04:38:58 2023 +1030 ALSA: scarlett2: Add support for Solo, 2i2, and 4i4 Gen 4 Add new Focusrite Scarlett Gen 4 USB IDs, notification arrays, config sets, and device info data. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/b33526d3b7a56bb2c86aa4eb2137a415bd23f1ce.1703612638.git.g@b4.vu commit 2ecca0df90cbd082ab61530bb4e758a0fb970d21 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:38:52 2023 +1030 ALSA: scarlett2: Add R/O headphone volume control The Scarlett 4i4 Gen 4 adds a R/O headphone volume control in addition to a R/O master volume control (which is already supported). Mark the new scarlett2_notify_volume() function with __always_unused until it gets used when the Gen 4 notification callback function arrays are added. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/bd4a76da157f8cc3fbfa02eba96d02bdb86817c5.1703612638.git.g@b4.vu commit f6a817e6795a4f16c106ddf5f4009a7697515868 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:38:46 2023 +1030 ALSA: scarlett2: Add minimum firmware version check Early firmware for the Scarlett Gen 4 devices has sufficient differences that it is better to enforce a minimum firmware version than to try and work around those differences. Add a minimum firmware version field to the device info struct, and display a message if the firmware version is too old. Only create the Firmware Version and MSD (optional) controls in this case. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/5455a7e54bda81556066abd7f761b10e9c5f8a16.1703612638.git.g@b4.vu commit 66946398a4be9fd41eafcc844a306273f5150e69 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:38:38 2023 +1030 ALSA: scarlett2: Rename DSP mux channels The DSP mux channels are of type SCARLETT2_PORT_TYPE_MIX so the ALSA controls would refer to them "Mix X" and "Mixer Input X". This patch fixes them to be called "DSP X" and "DSP Input X". Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/2d91d0a74d5c7f6179e950bed2c80a4498d16649.1703612638.git.g@b4.vu commit 166e1dfb752665226ab482b62a94c274ec2dea17 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:38:34 2023 +1030 ALSA: scarlett2: Add support for DSP mux channels The DSP mux channels in the Scarlett 4th Gen appear as SCARLETT2_PORT_TYPE_MIX ports but do not have corresponding mixer controls. Add a dsp_count option to the device info struct to exclude those DSP channels from the num_mix_in/num_mix_out counts. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/b78bdb1a7624d55783f5bf0e1ffbfa47a9e9a800.1703612638.git.g@b4.vu commit c6c9f0cf9dba7e86f1f6cca658bb6b86c5d02530 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:38:28 2023 +1030 ALSA: scarlett2: Add support for custom Gen 4 Direct Monitor mixes The mixes used by Direct Monitor feature on the Scarlett 4th Gen Solo and 2i2 interfaces are configurable. This patch adds ALSA controls for the gains which are copied to the mixer when Direct Monitor is enabled. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/96282a805b45f04560e5923d170745363906b7f3.1703612638.git.g@b4.vu commit e8e14270d8d0d5c9bd8e04e5940d511b56a981e9 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:38:20 2023 +1030 ALSA: scarlett2: Handle Gen 4 Direct Monitor mix updates When the Direct Monitor feature on the Scarlett 4th Gen Solo and 2i2 interfaces is used, the Mix A and B gains are updated by the interface. This patch calls snd_ctl_notify() for the ALSA mix controls when a Direct Monitor notification is received. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/713d032e343e0547212368919bef17d6fa1c9d29.1703612638.git.g@b4.vu commit ac19be067aac38479b1c4d1477d4012a24d5730d Author: Geoffrey D. Bennett Date: Wed Dec 27 04:38:13 2023 +1030 ALSA: scarlett2: Store mix_ctls for Gen 4 Direct Monitor The Scarlett 4th Gen small interfaces have a software-controllable mixer like the large 2nd and 3rd Gen interfaces do. Pressing the "Direct" button on the interface updates the mixer controls, which this driver hasn't needed to deal with previously. This commit stores the ALSA mixer controls, and adds a mix_updated flag so that the controls can be updated when a notification is received. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/3ba27c60230511b80b0fa75727551ea70f17d829.1703612638.git.g@b4.vu commit d7cfa2fdfc8a0ba9bf7d5ebd5cf25e6d24501632 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:38:02 2023 +1030 ALSA: scarlett2: Add power status control Add a control to retrieve the power status from the interface (bus-powered, external-powered, or insufficient power). Mark the new scarlett2_notify_power_status() function with __always_unused until it gets used when the Gen 4 notification callback function arrays are added. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/d9806bc41adc45b1c19749562fec7765ba24351d.1703612638.git.g@b4.vu commit 882a2a36c41df96d0449c3751dceb86415b44a56 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:37:56 2023 +1030 ALSA: scarlett2: Disable autogain during phantom power state change When phantom power is enabled or disabled, the autogain control cannot be enabled until the interface has signalled that the change is complete and the input is unmuted. Update those controls to be read-only during this time. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/f49f7bf9358e1f20713d95d407d8d6a436859877.1703612638.git.g@b4.vu commit 0d2e791db4c81d295334ca09ad30cc2083f94b04 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:37:36 2023 +1030 ALSA: scarlett2: Disable input controls while autogain is running While the autogain function is running, the other input controls (select, link, gain, safe, level, air, and phantom) can't be modified. Update those controls to be read-only during this time. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/ad13bacae77860de8c2d7c89f6ec2a1ee104e65f.1703612638.git.g@b4.vu commit a1ed1d6caf680e22b933d1fa89f3d4a4c313d91e Author: Geoffrey D. Bennett Date: Wed Dec 27 04:37:18 2023 +1030 ALSA: scarlett2: Minor refactor MSD mode check Create local variable for storing private data pointer in snd_scarlett2_controls_create(). It's currently only used for checking msd_switch, but it will be used again. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/ab50939dca0fdc5fa3493fc8eee3a2fdefffa62d.1703612638.git.g@b4.vu commit 0a995e38dc440fdfe658a5ebf19bf6eb647a0f5f Author: Geoffrey D. Bennett Date: Wed Dec 27 04:37:12 2023 +1030 ALSA: scarlett2: Add support for software-controllable input gain Some devices in the Scarlett Gen 4 series have support for software-controllable input gain. Along with this comes a channel select option, an auto-gain feature, "safe" mode, and linking two channels into a stereo pair. Mark the new scarlett2_notify_input_*() functions with __always_unused until they get used when the Gen 4 notification callback function arrays are added. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/fc39e80bb39863dd1579d342097203942b4f3034.1703612638.git.g@b4.vu commit 038216f2bc85167449359cb4eec5fc5bfffbe4ef Author: Geoffrey D. Bennett Date: Wed Dec 27 04:36:54 2023 +1030 ALSA: scarlett2: Add support for Air Presence + Drive option Extend the existing "air" option support from Scarlett Gen 3, which had two states (off/on), to accommodate Scarlett Gen 4's new state: Presence + Drive. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/a9ccda7222842a72e4ce7aa258614ff45248bb16.1703612638.git.g@b4.vu commit 1b53c116232e082db06ab5310c1be1d4bf75dfe1 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:36:38 2023 +1030 ALSA: scarlett2: Allow for controls with a "mute mode" Gen 2/3 interfaces would only use 0/1 values for input level and phantom power switch controls. Gen 4 interfaces use the second bit to indicate that the state should be changed (or is changing), and the input is to be muted (or is muted) while that happens. Add a "mute" flag to config items to enable this behaviour for the level/phantom controls. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/f603cd16079c97fad910087e0302828a289d1c15.1703612638.git.g@b4.vu commit 4fa07ff7b625e5578dd974d5c43d701cb3624d84 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:36:29 2023 +1030 ALSA: scarlett2: Add support for Gen 4 style parameters Writing Scarlett Gen 4 parameters differs from Gen 2 and Gen 3: - the values are written into a shared write location - the values are only byte-sized - the read locations now extend beyond 0xFF - a separate NVRAM save step is no longer required This patch implements that alternate write style, triggered by setting the config item size field to zero. The write address is specified through a new config set field gen4_write_addr. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/1624e6d8a0c629c3bdfe53825b16e8b589724fc4.1703612638.git.g@b4.vu commit dd57b1213ab60ec9ad603507bd25ed069f9a6b61 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:36:21 2023 +1030 ALSA: scarlett2: Add support for air/phantom control on input 2 The Focusrite Scarlett Gen 4 Solo has Air and Phantom Power controls on analogue input #2 (the Gen 3 Solo had these controls on analogue input #1). Add air_input_first and phantom_first device info options to cater for this. These options are similar to the level_input_first option that was added for the Gen 3 Solo, but these new options do not require adjusting the index of the control. Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/19511f18895b8c094985a4a5691fbc1dc028c108.1703612638.git.g@b4.vu commit 4dedf7ca929a3f29fbed973e85372056d69a1848 Author: Geoffrey D. Bennett Date: Wed Dec 27 04:36:13 2023 +1030 ALSA: scarlett2: Remove repeated elem->head.mixer references Use a local variable *mixer rather than repeating elem->header.mixer in scarlett2_direct_monitor_ctl_get() and scarlett2_meter_ctl_get(). Signed-off-by: Geoffrey D. Bennett Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/b21bacf4056366e10e01077e224d2b4970fdfe31.1703612638.git.g@b4.vu commit d3cf557b26a77f6a285fe6b9b87c434ffb340ceb Author: Geoffrey D. Bennett Date: Mon Dec 25 06:01:14 2023 +1030 ALSA: scarlett2: Split direct_monitor out from monitor_other The notification value for monitor_other on the large interfaces is the same as the notification value for direct_monitor on the 3rd Gen small interfaces. Add a separate scarlett3a_notifications array and split out the direct_monitor handling. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/9b56a483e3e9c1447684f18239a88652c1f01445.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit d9b63123fbb0a9cf9938dddbe7e623c731491d7d Author: Geoffrey D. Bennett Date: Mon Dec 25 06:00:53 2023 +1030 ALSA: scarlett2: Split input_other into level/pad/air/phantom Gen 2/3 devices have a single notification value for "input other" changes. Gen 4 has separate notification values for level, pad, air, and phantom power changes. Therefore, split the input_other_updated field and the scarlett2_update_input_other() function into the four components so that they can be handled separately later. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/a1a1d190659d56689792aa20ceeb53a6175171ad.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit ad5174608eca55bd3fe6dc16057248fa03e6673d Author: Geoffrey D. Bennett Date: Mon Dec 25 06:00:38 2023 +1030 ALSA: scarlett2: Rename db_scale_scarlett2_gain to volume db_scale_scarlett2_gain is the TLV for the output volume controls. Gen 4 has software-controllable input gain controls, so rename this to db_scale_scarlett2_volume so we can use that name for the inputs. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/d544ec7cc5d5a849da104a5a78b17f61f50657c1.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit a1faecfcfe35ae774e75145470998d4418a78f0a Author: Geoffrey D. Bennett Date: Mon Dec 25 06:00:29 2023 +1030 ALSA: scarlett2: Add #define for SCARLETT2_MIX_MAX Add a #define for SCARLETT2_MIX_MAX (max of mixer inputs * outputs) as that will be used again soon. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/83cec5ccd75f0db2bd061a76d31a7023d26300c1.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 56275126aca20e0a0bfa51e3307576aee76b7264 Author: Geoffrey D. Bennett Date: Mon Dec 25 06:00:15 2023 +1030 ALSA: scarlett2: Add scarlett2_mixer_value_to_db() Refactor scarlett2_usb_get_mix(), moving the scarlett2_mixer_values[] lookup into scarlett2_mixer_value_to_db(). Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/7adf869852aba2819fddb850b0ea8df5f7d73931.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 90d8fef837a53e6b5c2c3c14c6063ee8d78277a9 Author: Geoffrey D. Bennett Date: Mon Dec 25 06:00:05 2023 +1030 ALSA: scarlett2: Allow for interfaces without per-channel volume Currently-supported interfaces with a mixer have per-channel volume controls, but this changes in Gen 4. Add a check so that the Playback Volume and associated controls don't get created unless the SCARLETT2_CONFIG_LINE_OUT_VOLUME config item is present. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/30f68cb311e27f2cc1351cb846218f7248a90263.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit c6b3e71e2c0899426dcdc46a778c6bd0c35925d1 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:59:26 2023 +1030 ALSA: scarlett2: Remove line_out_hw_vol device info entry By splitting config set gen2 into gen2a/b (for 6i6/18i8 vs 18i20), and gen3b into gen3b/c (for 4i4/8i6 vs 18i8/18i20), we can use scarlett2_has_config_item() instead of the per-device line_out_hw_vol. As Gen 4 has a master volume control but no SW/HW switches, check for both SCARLETT2_CONFIG_MASTER_VOLUME and SCARLETT2_CONFIG_SW_HW_SWITCH as needed, even though for Gen 2 and Gen 3 the former implies the latter. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/307c4f8d6d2e034f3e386b51d72a39d77c8a9fce.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit e79aea579a19ebdc703868c5955136abd80bb1a9 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:59:14 2023 +1030 ALSA: scarlett2: Split dim_mute_update from vol_updated Scarlett Gen 2 and Gen 3 devices combine volume and dim/mute notifications. The Scarlett 4i4 Gen 4 has volume change notification but no dim/mute control so split dim_mute_update out from vol_update. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/bf63f48bcc68ae739bd9948c8ee2f87ee7af22a2.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 80c7933e74c3d7dfbaf994a340317a199a6a640c Author: Geoffrey D. Bennett Date: Mon Dec 25 05:58:49 2023 +1030 ALSA: scarlett2: Remove struct scarlett2_usb_volume_status The struct scarlett2_usb_volume_status matched the config space layout of a few volume controls that could be read together and were in fixed locations between Gen 2 and Gen 3 devices. Gen 4 devices have removed, moved, and new related controls, so this needs to be cleaned up. By adding SCARLETT2_CONFIG_MASTER_VOLUME (the only config item that didn't already have its own entry, because it is read-only), we can remove: - struct scarlett2_usb_volume_state, - #define SCARLETT2_USB_VOLUME_STATUS_OFFSET, and - scarlett2_usb_get_volume_status() and replace with calls to scarlett2_usb_get_config(). Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/2ee88994857246bf89fab8e62ac279f3bcf96192.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 42caae0e20323af7c5b41ac089798f5590b54845 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:58:38 2023 +1030 ALSA: scarlett2: Refactor common port_count lookups Rather than looking up the analogue and mixer I/O counts repeatedly in info->port_count[SCARLETT2_PORT_TYPE_*][SCARLETT2_PORT_*], save those numbers in private variables. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/db0a5b56bdff476e2e31ad8e5ee15008314412b7.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit e5fab78cd8e867b2201eadabe4871100881e2a64 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:58:07 2023 +1030 ALSA: scarlett2: Change num_mux_* from int to u8 num_mux_srcs and num_mux_dsts will fit into a u8, so change the type. More similar counts are coming soon. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/886fbd9ce7f06b13c6dbf36f64e6b2d107d16a83.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 648bd468b28c37a8c84050953627011eacad84f5 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:57:52 2023 +1030 ALSA: scarlett2: Parameterise notifications The notification values were previously #define'd, and checked with a series of if() statements calling functions. Replace with an array of masks/callback function pointers, and a pointer to that array in the scarlett2_config_set definitions. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/0ee2a3786f9d30c89eeae59d7e933424e8f39162.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit b5fe6c47a55f82f16e60a90528ada8bcc3558984 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:57:34 2023 +1030 ALSA: scarlett2: Formatting fixes Add missing blank line before comment. For consistency with other functions that have few parameters, move the parameters onto the same line as the function name. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/72be568b02eea12621b0c4a96f8e8cc65b0c13c0.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 9c2ea88e9e3b00705f519b112683a75e9b6eba1d Author: Geoffrey D. Bennett Date: Mon Dec 25 05:57:16 2023 +1030 ALSA: scarlett2: Refactor scarlett2_config_save() Use the new scarlett2_usb_activate_config() helper function rather than preparing the request manually and calling scarlett2_usb(). Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/bbc733dc081f311fb3167e81b15cd76324aa6307.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 7f4d8dbea2156802cc4cef74faa26eba8a7aa7d6 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:56:43 2023 +1030 ALSA: scarlett2: Refactor scarlett2_usb_set_config() Pull out common code from scarlett2_usb_set_config() and create scarlett2_usb_set_data() and scarlett2_usb_activate_config(). Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/257eca0b07708339133f916930e388057d116eb8.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 43222a612374facb3408300ea1a789cc1b33fb9b Author: Geoffrey D. Bennett Date: Mon Dec 25 05:55:10 2023 +1030 ALSA: scarlett2: Add check for config_item presence Update scarlett2_usb_get_config() and scarlett2_usb_set_config() to make sure that the config_item_num is valid for the device. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/b0572b23291ffd1b208f21d298adaf4d9f1fe4bc.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit cbd6f148aa555c1383bef27dd003e1a2f1670e82 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:53:40 2023 +1030 ALSA: scarlett2: Remove scarlett2_config_sets array Replace array index into config sets with a pointer to a config set. Copy the config_set pointer to the scarlett2_data struct. This simplifies both the definition and use of the config sets. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/61f69519fb6fbb677e066891a3a6771aeeec106d.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit c0a7e1d859e76b121afe177f1ca04e121ecbb27d Author: Geoffrey D. Bennett Date: Mon Dec 25 05:52:47 2023 +1030 ALSA: scarlett2: Add config set struct Add struct scarlett2_config_set so that data which is common to all devices in a config set can be stored there rather than in the model-specific data. Accordingly, rename scarlett2_config_items[] to scarlett2_config_sets[]. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/bfdb04cd6239af9a8c26a52da0537980f77c0437.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit c13d43a8582aa9b003b40fc6eecb66bd4ee8b5d6 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:52:24 2023 +1030 ALSA: scarlett2: Check presence of mixer using mux_assignment Currently the presence of a mixer is determined by checking if the device uses the GEN_3A config set. Add scarlett2_has_mixer() function which checks for the presence of mux_assignment entries instead. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/ef6f4d360c2fe682ab65f83cccbe5be66ccc6296.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 2edc76dddee8a2e785f6566d2baddb49ad62fb5b Author: Geoffrey D. Bennett Date: Mon Dec 25 05:51:56 2023 +1030 ALSA: scarlett2: Check for phantom persistence config item Allow for the phantom persistence config item to not exist. This is needed for the Scarlett Gen 4 series. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/3ccaf8069280827bd6c44f103fcb770bd50b7e2e.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 3978fefdf416d4c14ba43365ef912dcc4e2ee5b6 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:51:40 2023 +1030 ALSA: scarlett2: Infer standalone switch from config items Rather than assuming the standalone switch is present for all devices with a mixer, instead check for the presence of the SCARLETT2_CONFIG_STANDALONE_SWITCH config item. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/59c30885b02d65feaab2c338cf46889d72d01813.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 3a4e1afe7d984a3de8cc3ef8447ab085800f6b54 Author: Geoffrey D. Bennett Date: Mon Dec 25 05:50:52 2023 +1030 ALSA: scarlett2: Infer has_msd_mode from config items Rather than storing has_msd_mode in the per-device structure, infer this from the presence of the SCARLETT2_CONFIG_MSD_SWITCH entry in the device's configuration set. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/ecbf3740e6b30a245333528ae4c504f37a9bc6bf.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit a2bb6c7d80575a67edb7d8a37dae95b76a86be3f Author: Geoffrey D. Bennett Date: Mon Dec 25 05:50:09 2023 +1030 ALSA: scarlett2: Simplify enums by removing explicit values This commit removes the explicit integer assignments from the enums. The actual values matter little, and not assigning explicit values makes it easier to modify the longer lists in the future. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/67f0f1bb8b90d7c76dfe7062d22d33bbde19cf93.1703444932.git.g@b4.vu Signed-off-by: Takashi Iwai commit 1abfbd3c952781881dc17d8e3624cac9df6a70b5 Author: Geoffrey D. Bennett Date: Fri Dec 29 22:49:23 2023 +1030 ALSA: scarlett2: Add support for uploading new firmware Add ops.write to the hwdep interface. Once the upgrade firmware flash segment has been erased, writes to the hwdep fd are permitted, and translated to SCARLETT2_USB_WRITE_SEGMENT commands to the device. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/ZY65S0ojShSNSeRQ@m.b4.vu Signed-off-by: Takashi Iwai commit 6a7508e64ee3e8320c886020bcdcd70f7fcbff2c Author: Geoffrey D. Bennett Date: Wed Dec 20 04:20:29 2023 +1030 ALSA: scarlett2: Add ioctl commands to erase flash segments Add ioctls: - SCARLETT2_IOCTL_SELECT_FLASH_SEGMENT - SCARLETT2_IOCTL_ERASE_FLASH_SEGMENT - SCARLETT2_IOCTL_GET_ERASE_PROGRESS The settings or the firmware flash segment can be selected and then erased (asynchronous operation), and the erase progress can be monitored. If the erase progress is not monitored, then subsequent hwdep operations will block until the erase is complete. Once the erase is started, ALSA controls that communicate with the device will all return -EBUSY, and the device must be rebooted. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/227409adb672f174bf3db211e9bda016fb4646ea.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit 337b2f0e778f78f61972497994b70a05e8f6447d Author: Geoffrey D. Bennett Date: Wed Dec 20 04:09:23 2023 +1030 ALSA: scarlett2: Add skeleton hwdep/ioctl interface Add skeleton hwdep/ioctl interface, beginning with SCARLETT2_IOCTL_PVERSION and SCARLETT2_IOCTL_REBOOT. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/24ffcd47a8a02ebad3c8b2438104af8f0169164e.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit 34101a0fb1d47d8def145e50b4221201f5348cd0 Author: Geoffrey D. Bennett Date: Wed Dec 20 04:08:58 2023 +1030 ALSA: scarlett2: Retrieve useful flash segment numbers Call SCARLETT2_USB_INFO_FLASH and SCARLETT2_USB_INFO_SEGMENT to find the App_Settings and App_Upgrade flash segment numbers, and store them in the scarlett2_data struct. These will be used later to implement reset to factory defaults and firmware upgrade functions. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/70f0108a9cf99b69f7aa920c4bcdb0cf4bf3da98.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit 103c23ccacaab14e5f8a63d60bdc4e5c81e166fc Author: Geoffrey D. Bennett Date: Wed Dec 20 04:08:42 2023 +1030 ALSA: scarlett2: Add #defines for firmware upgrade Add #defines for SCARLETT2_USB_* needed for firmware upgrade: reboot, info-flash, info-segment, erase-segment, get-erase, and write-segment. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/3077651c21bc8d4f046c68b79ec387aa16fcc5e4.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit 993f7b42fa066b055e3a19b7f76ad8157c0927a0 Author: Geoffrey D. Bennett Date: Wed Dec 20 04:08:09 2023 +1030 ALSA: scarlett2: Add missing mutex lock around get meter levels As scarlett2_meter_ctl_get() uses meter_level_map[], the data_mutex should be locked while accessing it. Signed-off-by: Geoffrey D. Bennett Fixes: 3473185f31df ("ALSA: scarlett2: Remap Level Meter values") Link: https://lore.kernel.org/r/77e093c27402c83d0730681448fa4f57583349dd.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit 04f8f053252b86c7583895c962d66747ecdc61b7 Author: Geoffrey D. Bennett Date: Wed Dec 20 04:07:52 2023 +1030 ALSA: scarlett2: Add clamp() in scarlett2_mixer_ctl_put() Ensure the value passed to scarlett2_mixer_ctl_put() is between 0 and SCARLETT2_MIXER_MAX_VALUE so we don't attempt to access outside scarlett2_mixer_values[]. Signed-off-by: Geoffrey D. Bennett Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/3b19fb3da641b587749b85fe1daa1b4e696c0c1b.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit 50603a67daef161c78c814580d57f7f0be57167e Author: Geoffrey D. Bennett Date: Wed Dec 20 04:07:37 2023 +1030 ALSA: scarlett2: Add missing error checks to *_ctl_get() The *_ctl_get() functions which call scarlett2_update_*() were not checking the return value. Fix to check the return value and pass to the caller. Signed-off-by: Geoffrey D. Bennett Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/32a5fdc83b05fa74e0fcdd672fbf71d75c5f0a6d.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit ca459dfa7d4ed9098fcf13e410963be6ae9b6bf3 Author: Geoffrey D. Bennett Date: Wed Dec 20 04:07:21 2023 +1030 ALSA: scarlett2: Add missing error check to scarlett2_usb_set_config() scarlett2_usb_set_config() calls scarlett2_usb_get() but was not checking the result. Return the error if it fails rather than continuing with an invalid value. Signed-off-by: Geoffrey D. Bennett Fixes: 9e15fae6c51a ("ALSA: usb-audio: scarlett2: Allow bit-level access to config") Link: https://lore.kernel.org/r/def110c5c31dbdf0a7414d258838a0a31c0fab67.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit 5f6ff6931a1c0065a55448108940371e1ac8075f Author: Geoffrey D. Bennett Date: Wed Dec 20 04:07:00 2023 +1030 ALSA: scarlett2: Add missing error check to scarlett2_config_save() scarlett2_config_save() was ignoring the return value from scarlett2_usb(). As this function is not called from user-space we can't return the error, so call usb_audio_err() instead. Signed-off-by: Geoffrey D. Bennett Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Link: https://lore.kernel.org/r/bf0a15332d852d7825fa6da87d2a0d9c0b702053.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit 649cc9e543a745620a2cdaa934efea2b123e594a Author: Geoffrey D. Bennett Date: Wed Dec 20 04:06:42 2023 +1030 ALSA: scarlett2: Update maintainer info Update MAINTAINERS and "enabled" message with GitHub repository links. Signed-off-by: Geoffrey D. Bennett Link: https://lore.kernel.org/r/62f32404eaa8663cc304648354b85bcb5914ce72.1703001053.git.g@b4.vu Signed-off-by: Takashi Iwai commit 3abf66a42f1ff0f5ae5de3943ce1551ceedf81a0 Merge: 126c18a4bb646 423206604b281 Author: Takashi Iwai Date: Fri Dec 29 15:14:02 2023 +0100 Merge branch 'topic/cs35l41' into for-next Pull CS35L41 codec extension series. Signed-off-by: Takashi Iwai commit 423206604b28174698d77bf5ea81365cdd6c0f77 Author: Stefan Binding Date: Thu Dec 21 13:25:18 2023 +0000 ALSA: hda/realtek: Add quirks for Dell models These models use 2 or 4 CS35L41 amps with HDA using SPI and I2C. Models use internal and external boost. All models require DSD support to be added inside cs35l41_hda_property.c Signed-off-by: Stefan Binding Cc: # v6.7+ Link: https://lore.kernel.org/r/20231221132518.3213-4-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit d110858a6925827609d11db8513d76750483ec06 Author: Stefan Binding Date: Thu Dec 21 13:25:17 2023 +0000 ALSA: hda: cs35l41: Prevent firmware load if SPI speed too low Some laptops without _DSD have the SPI speed set very low in the BIOS. Since the SPI controller uses this speed as its max speed, the SPI transactions are very slow. Firmware download writes to many registers, and if the SPI speed is too slow, it can take a long time to download. For this reason, disable firmware loading if the maximum SPI speed is too low. Without Firmware, audio playback will work, but the volume will be low to ensure safe operation of the CS35L41. Signed-off-by: Stefan Binding Cc: # v6.7+ Link: https://lore.kernel.org/r/20231221132518.3213-3-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit ee694e7db47e1af00ffb29f569904a9ed576868f Author: Stefan Binding Date: Thu Dec 21 13:25:16 2023 +0000 ALSA: hda: cs35l41: Support additional Dell models without _DSD Add new model entries into configuration table. Signed-off-by: Stefan Binding Cc: # v6.7+ Link: https://lore.kernel.org/r/20231221132518.3213-2-sbinding@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 7d4f07d5cb71728cea2b6fe8b087a0ce1dbda23a Author: Masahiro Yamada Date: Tue Dec 26 22:52:39 2023 +0900 kbuild: deb-pkg: squash scripts/package/deb-build-option to debian/rules The binary-arch target needs to use the same CROSS_COMPILE as used in build-arch; otherwise, 'make run-command' may attempt to resync the .config file. Squash scripts/package/deb-build-option into debian/rules, as it is a small amount of code. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 466e6fc43fb9eefa26ec766f78ce18616bf84b9a Author: Masahiro Yamada Date: Tue Dec 26 22:52:38 2023 +0900 kbuild: deb-pkg: factor out common Make options in debian/rules This avoids code duplication between binary-arch and built-arch. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit b88365b6d74edc88a9d283c837fec05b13d401a6 Author: Masahiro Yamada Date: Wed Dec 20 03:19:56 2023 +0900 kbuild: deb-pkg: hard-code Build-Depends The condition to require libelf-dev:native is stale because objtool is now enabled by CONFIG_OBJTOOL instead of CONFIG_UNWINDER_ORC. Not only objtool but also resolve_btfids requires libelf-dev:native; therefore, CONFIG_DEBUG_INFO_BTF should be checked as well. Similarly, CONFIG_SYSTEM_TRUSTED_KEYRING is not the only case that requires libssl-dev:native. Perhaps, the following code would provide better coverage, but it is hard to maintain (and may still be imperfect). if is_enabled CONFIG_OBJTOOL || is_enabled CONFIG_DEBUG_INFO_BTF; then build_depends="${build_depends}, libelf-dev:native" fi if is_enabled CONFIG_SYSTEM_TRUSTED_KEYRING || is_enabled CONFIG_SYSTEM_REVOCATION_LIST || is_enabled CONFIG_MODULE_SIG_FORMAT; then build_depends="${build_depends}, libssl-dev:native" fi Let's hard-code the build dependency. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 9c65810cfb215f40f14d2c00694911fbc5408761 Author: Masahiro Yamada Date: Wed Dec 20 00:40:49 2023 +0900 kbuild: deb-pkg: split debian/copyright from the mkdebian script Copy debian/copyright instead of generating it by the 'cat' command. I also updated '2018' to '2023' while I was here. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit f3b2306bea33b3a86ad2df4dcfab53b629e1bc84 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Dec 20 00:33:15 2023 +0000 gen_init_cpio: Apply mtime supplied by user to all file types Currently gen_init_cpio -d is applied to symlinks, directories and special files. These files are created by gen_init_cpio from their description. Without option current time(NULL) is used. And regular files that go in initramfs are created before cpio generation, so their mtime(s) are preserved. This is usually not an issue as reproducible builds should rebuild everything in the distribution, including binaries, configs and whatever other regular files may find their way into kernel's initramfs. On the other hand, gen_initramfs.sh usage claims: > -d Use date for all file mtime values Ar Arista initramfs files are managed with version control system that preserves mtime. Those are configs, boot parameters, init scripts, version files, platform-specific files, probably some others, too. While it's certainly possible to work this around by copying the file into temp directory and adjusting mtime prior to gen_init_cpio call, I don't see why it needs workarounds. The intended user of -d option is the one that needs to create a reproducible build, see commit a8b8017c34fe ("initramfs: Use KBUILD_BUILD_TIMESTAMP for generated entries"). If a user wants the build reproduction, they use -d , which can be set on all types of files, without surprising exceptions and workarounds. Let's KISS here and just apply the time that user specified with -d option. Based-on-a-patch-by: Baptiste Covolato Link: https://lore.kernel.org/lkml/20181025215133.20138-1-baptiste@arista.com/ Signed-off-by: Dmitry Safonov Signed-off-by: Masahiro Yamada commit 7beba04eb305393e3f8386390f25b4a9475f27f2 Author: Masahiro Yamada Date: Sat Dec 16 01:06:37 2023 +0900 kbuild: resolve symlinks for O= properly Currently, Kbuild follows the logical chain of directories for the O= option, just like 'cd' (or 'realpath --logical') does. Example: $ mkdir -p /tmp/a /tmp/x/y $ ln -s /tmp/x/y /tmp/a/b $ realpath /tmp/a/b/.. /tmp/x $ realpath --logical /tmp/a/b/.. /tmp/a $ make O=/tmp/a/b/.. defconfig make[1]: Entering directory '/tmp/a' [snip] make[1]: Leaving directory '/tmp/a' 'make O=/tmp/a/b/.. defconfig' creates the kernel configuration in /tmp/a instead of /tmp/x despite /tmp/a/b/.. resolves to /tmp/x. This is because Kbuild internally uses the 'cd ... && pwd' for the path resolution, but this behavior is not predictable for users. Additionally, it is not consistent with how the Kbuild handles the M= option or GNU Make works with 'make -C /tmp/a/b/..'. Using the physical directory structure for the O= option seems more reasonable. The comment says "expand a shell special character '~'", but it has already been expanded to the home directory in the command line. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 8c88bc5b489e785c7ead94ce6fc3adb7f76e8715 Author: John Moon Date: Mon Dec 11 18:02:58 2023 -0800 docs: dev-tools: Add UAPI checker documentation Add detailed documentation for scripts/check-uapi.sh. Signed-off-by: John Moon Signed-off-by: Masahiro Yamada commit 1f7f31bf7202adcab9616307bcb11a65fb565f63 Author: John Moon Date: Mon Dec 11 18:02:57 2023 -0800 check-uapi: Introduce check-uapi.sh While the kernel community has been good at maintaining backwards compatibility with kernel UAPIs, it would be helpful to have a tool to check if a commit introduces changes that break backwards compatibility. To that end, introduce check-uapi.sh: a simple shell script that checks for changes to UAPI headers using libabigail. libabigail is "a framework which aims at helping developers and software distributors to spot some ABI-related issues like interface incompatibility in ELF shared libraries by performing a static analysis of the ELF binaries at hand." The script uses one of libabigail's tools, "abidiff", to compile the changed header before and after the commit to detect any changes. abidiff "compares the ABI of two shared libraries in ELF format. It emits a meaningful report describing the differences between the two ABIs." The script also includes the ability to check the compatibility of all UAPI headers across commits. This allows developers to inspect the stability of the UAPIs over time. Signed-off-by: John Moon Signed-off-by: Masahiro Yamada commit 67f8f1e7aa31b6fe17aeee1c581f61fc3dfa331a Author: Leonardo Bras Date: Mon Dec 11 19:13:36 2023 -0300 scripts: Introduce a default git.orderFile When reviewing patches, it looks much nicer to have some changes shown before others, which allow better understanding of the patch before the the .c files reviewing. Introduce a default git.orderFile, in order to help developers getting the best ordering easier. Signed-off-by: Leonardo Bras Acked-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit 15d3f7664d2776c086f813f1efbfe2ae20a85e89 Author: Sergey Senozhatsky Date: Wed Nov 22 12:47:45 2023 +0900 kconfig: WERROR unmet symbol dependency When KCONFIG_WERROR env variable is set treat unmet direct symbol dependency as a terminal condition (error). Suggested-by: Stefan Reinauer Signed-off-by: Sergey Senozhatsky Signed-off-by: Masahiro Yamada commit 126c18a4bb6460c3d82b57c56941104ed34b7ba6 Author: Dmitry Antipov Date: Thu Dec 21 12:16:00 2023 +0300 ALSA: seq: fix kvmalloc_array() arguments order When compiling with gcc version 14.0.0 20231220 (experimental) and W=1, I've noticed the following warning: sound/core/seq/seq_memory.c: In function 'snd_seq_pool_init': sound/core/seq/seq_memory.c:445:41: warning: 'kvmalloc_array' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 445 | cellptr = kvmalloc_array(sizeof(struct snd_seq_event_cell), pool->size, | ^~~~~~ Since 'n' and 'size' arguments of 'kvmalloc_array()' are multiplied to calculate the final size, their actual order doesn't affect the result and so this is not a bug. But it's still worth to fix it. Signed-off-by: Dmitry Antipov Link: https://lore.kernel.org/r/20231221091605.14660-1-dmantipov@yandex.ru Signed-off-by: Takashi Iwai commit f60a631ab9ed5df15e446269ea515f2b8948ba0c Author: Vincent Guittot Date: Thu Dec 21 17:40:14 2023 +0100 sched/fair: Fix tg->load when offlining a CPU When a CPU is taken offline, the contribution of its cfs_rqs to task_groups' load may remain and will negatively impact the calculation of the share of the online CPUs. To fix this bug, clear the contribution of an offlining CPU to task groups' load and skip its contribution while it is inactive. Here's the reproducer of the anomaly, by Imran Khan: "So far I have encountered only one rather lengthy way of reproducing this issue, which is as follows: 1. Take a KVM guest (booted with 4 CPUs and can be scaled up to 124 CPUs) and create 2 custom cgroups: /sys/fs/cgroup/cpu/test_group_1 and /sys/fs/cgroup/ cpu/test_group_2 2. Assign a CPU intensive workload to each of these cgroups and start the workload. For my tests I am using following app: int main(int argc, char *argv[]) { unsigned long count, i, val; if (argc != 2) { printf("usage: ./a.out \n"); return 0; } count = strtoul(argv[1], NULL, 10); printf("Generating %lu random numbers \n", count); for (i = 0; i < count; i++) { val = rand(); val = val % 2; //usleep(1); } printf("Generated %lu random numbers \n", count); return 0; } Also since the system is booted with 4 CPUs, in order to completely load the system I am also launching 4 instances of same test app under: /sys/fs/cgroup/cpu/ 3. We can see that both of the cgroups get similar CPU time: # systemd-cgtop --depth 1 Path Tasks %CPU Memory Input/s Output/s / 659 - 5.5G - - /system.slice - - 5.7G - - /test_group_1 4 - - - - /test_group_2 3 - - - - /user.slice 31 - 56.5M - - Path Tasks %CPU Memory Input/s Output/s / 659 394.6 5.5G - - /test_group_2 3 65.7 - - - /user.slice 29 55.1 48.0M - - /test_group_1 4 47.3 - - - /system.slice - 2.2 5.7G - - Path Tasks %CPU Memory Input/s Output/s / 659 394.8 5.5G - - /test_group_1 4 62.9 - - - /user.slice 28 44.9 54.2M - - /test_group_2 3 44.7 - - - /system.slice - 0.9 5.7G - - Path Tasks %CPU Memory Input/s Output/s / 659 394.4 5.5G - - /test_group_2 3 58.8 - - - /test_group_1 4 51.9 - - - /user.slice 30 39.3 59.6M - - /system.slice - 1.9 5.7G - - Path Tasks %CPU Memory Input/s Output/s / 659 394.7 5.5G - - /test_group_1 4 60.9 - - - /test_group_2 3 57.9 - - - /user.slice 28 43.5 36.9M - - /system.slice - 3.0 5.7G - - Path Tasks %CPU Memory Input/s Output/s / 659 395.0 5.5G - - /test_group_1 4 66.8 - - - /test_group_2 3 56.3 - - - /user.slice 29 43.1 51.8M - - /system.slice - 0.7 5.7G - - 4. Now move systemd-udevd to one of these test groups, say test_group_1, and perform scale up to 124 CPUs followed by scale down back to 4 CPUs from the host side. 5. Run the same workload i.e 4 instances of CPU hogger under /sys/fs/cgroup/cpu and one instance of CPU hogger each in /sys/fs/cgroup/cpu/test_group_1 and /sys/fs/cgroup/test_group_2. It can be seen that test_group_1 (the one where systemd-udevd was moved) is getting much less CPU time than the test_group_2, even though at this point of time both of these groups have only CPU hogger running: # systemd-cgtop --depth 1 Path Tasks %CPU Memory Input/s Output/s / 1219 - 5.4G - - /system.slice - - 5.6G - - /test_group_1 4 - - - - /test_group_2 3 - - - - /user.slice 26 - 91.3M - - Path Tasks %CPU Memory Input/s Output/s / 1221 394.3 5.4G - - /test_group_2 3 82.7 - - - /test_group_1 4 14.3 - - - /system.slice - 0.8 5.6G - - /user.slice 26 0.4 91.2M - - Path Tasks %CPU Memory Input/s Output/s / 1221 394.6 5.4G - - /test_group_2 3 67.4 - - - /system.slice - 24.6 5.6G - - /test_group_1 4 12.5 - - - /user.slice 26 0.4 91.2M - - Path Tasks %CPU Memory Input/s Output/s / 1221 395.2 5.4G - - /test_group_2 3 60.9 - - - /system.slice - 27.9 5.6G - - /test_group_1 4 12.2 - - - /user.slice 26 0.4 91.2M - - Path Tasks %CPU Memory Input/s Output/s / 1221 395.2 5.4G - - /test_group_2 3 69.4 - - - /test_group_1 4 13.9 - - - /user.slice 28 1.6 92.0M - - /system.slice - 1.0 5.6G - - Path Tasks %CPU Memory Input/s Output/s / 1221 395.6 5.4G - - /test_group_2 3 59.3 - - - /test_group_1 4 14.1 - - - /user.slice 28 1.3 92.2M - - /system.slice - 0.7 5.6G - - Path Tasks %CPU Memory Input/s Output/s / 1221 395.5 5.4G - - /test_group_2 3 67.2 - - - /test_group_1 4 11.5 - - - /user.slice 28 1.3 92.5M - - /system.slice - 0.6 5.6G - - Path Tasks %CPU Memory Input/s Output/s / 1221 395.1 5.4G - - /test_group_2 3 76.8 - - - /test_group_1 4 12.9 - - - /user.slice 28 1.3 92.8M - - /system.slice - 1.2 5.6G - - From sched_debug data it can be seen that in bad case the load.weight of per-CPU sched entities corresponding to test_group_1 has reduced significantly and also load_avg of test_group_1 remains much higher than that of test_group_2, even though systemd-udevd stopped running long time back and at this point of time both cgroups just have the CPU hogger app as running entity." [ mingo: Added details from the original discussion, plus minor edits to the patch. ] Reported-by: Imran Khan Tested-by: Imran Khan Tested-by: Aaron Lu Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Reviewed-by: Imran Khan Cc: Peter Zijlstra Cc: Borislav Petkov Link: https://lore.kernel.org/r/20231223111545.62135-1-vincent.guittot@linaro.org commit cd4d7263d58ab98fd4dee876776e4da6c328faa3 Author: Ido Schimmel Date: Wed Dec 20 17:43:58 2023 +0200 genetlink: Use internal flags for multicast groups As explained in commit e03781879a0d ("drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group"), the "flags" field in the multicast group structure reuses uAPI flags despite the field not being exposed to user space. This makes it impossible to extend its use without adding new uAPI flags, which is inappropriate for internal kernel checks. Solve this by adding internal flags (i.e., "GENL_MCAST_*") and convert the existing users to use them instead of the uAPI flags. Tested using the reproducers in commit 44ec98ea5ea9 ("psample: Require 'CAP_NET_ADMIN' when joining "packets" group") and commit e03781879a0d ("drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group"). No functional changes intended. Signed-off-by: Ido Schimmel Reviewed-by: Mat Martineau Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller commit bcdfae6ee520b665385020fa3e47633a8af84f12 Author: Christoph Hellwig Date: Thu Dec 28 07:24:10 2023 +0000 xfs: use the op name in trace_xlog_intent_recovery_failed Instead of tracing the address of the recovery handler, use the name in the defer op, similar to other defer ops related tracepoints. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 4f6ac47b55e3ce6e982807928d6074ec105ab66e Author: Christoph Hellwig Date: Thu Dec 28 07:24:09 2023 +0000 xfs: fix a use after free in xfs_defer_finish_recovery dfp will be freed by ->recover_work and thus the tracepoint in case of an error can lead to a use after free. Store the defer ops in a local variable to avoid that. Fixes: 7f2f7531e0d4 ("xfs: store an ops pointer in struct xfs_defer_pending") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 378b6aef9de0f7c3d0de309ecc61c11eb29e57da Author: Christoph Hellwig Date: Wed Dec 20 07:35:03 2023 +0100 xfs: turn the XFS_DA_OP_REPLACE checks in xfs_attr_shortform_addname into asserts Since commit deed9512872d ("xfs: Check for -ENOATTR or -EEXIST"), the high-level attr code does a lookup for any attr we're trying to set, and does the checks to handle the create vs replace cases, which thus never hit the low-level attr code. Turn the checks in xfs_attr_shortform_addname as they must never trip. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 074aea4be1a4074be49a7ec41c674cc02b52fd60 Author: Christoph Hellwig Date: Wed Dec 20 07:35:02 2023 +0100 xfs: remove xfs_attr_sf_hdr_t Remove the last two users of the typedef. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 414147225400a0c4562ebfb0fdd40f065099ede4 Author: Christoph Hellwig Date: Wed Dec 20 07:35:01 2023 +0100 xfs: remove struct xfs_attr_shortform sparse complains about struct xfs_attr_shortform because it embeds a structure with a variable sized array in a variable sized array. Given that xfs_attr_shortform is not a very useful structure, and the dir2 equivalent has been removed a long time ago, remove it as well. Provide a xfs_attr_sf_firstentry helper that returns the first xfs_attr_sf_entry behind a xfs_attr_sf_hdr to replace the structure dereference. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 1fb4b0def7b5a5bf91ad62a112d8d3f6dc76585f Author: Christoph Hellwig Date: Wed Dec 20 07:35:00 2023 +0100 xfs: use xfs_attr_sf_findname in xfs_attr_shortform_getvalue xfs_attr_shortform_getvalue duplicates the logic in xfs_attr_sf_findname. Use the helper instead. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 22b7b1f597a6a21fb7b3791a55f3a7ae54d2dfe4 Author: Christoph Hellwig Date: Wed Dec 20 07:34:59 2023 +0100 xfs: remove xfs_attr_shortform_lookup xfs_attr_shortform_lookup is only used by xfs_attr_shortform_addname, which is much better served by calling xfs_attr_sf_findname. Switch it over and remove xfs_attr_shortform_lookup. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 6c8d169bbd51fc10d1d0029d495962881315b4c2 Author: Christoph Hellwig Date: Wed Dec 20 07:34:58 2023 +0100 xfs: simplify xfs_attr_sf_findname xfs_attr_sf_findname has the simple job of finding a xfs_attr_sf_entry in the attr fork, but the convoluted calling convention obfuscates that. Return the found entry as the return value instead of an pointer argument, as the -ENOATTR/-EEXIST can be trivally derived from that, and remove the basep argument, as it is equivalent of the offset of sfe in the data for if an sfe was found, or an offset of totsize if not was found. To simplify the totsize computation add a xfs_attr_sf_endptr helper that returns the imaginative xfs_attr_sf_entry at the end of the current attrs. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 14f2e4ab5d0310c2bb231941d9884fa5bae47fab Author: Christoph Hellwig Date: Wed Dec 20 07:34:57 2023 +0100 xfs: move the xfs_attr_sf_lookup tracepoint trace_xfs_attr_sf_lookup is currently only called by xfs_attr_shortform_lookup, which despit it's name is a simple helper for xfs_attr_shortform_addname, which has it's own tracing. Move the callsite to xfs_attr_shortform_getvalue, which is the closest thing to a high level lookup we have for the Linux xattr API. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 45c76a2add55b332d965c901e14004ae0134a67e Author: Christoph Hellwig Date: Wed Dec 20 07:34:56 2023 +0100 xfs: return if_data from xfs_idata_realloc Many of the xfs_idata_realloc callers need to set a local pointer to the just reallocated if_data memory. Return the pointer to simplify them a bit and use the opportunity to re-use krealloc for freeing if_data if the size hits 0. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 6e145f943bd86be47e54101fa5939f9ed0cb73e5 Author: Christoph Hellwig Date: Wed Dec 20 07:34:55 2023 +0100 xfs: make if_data a void pointer The xfs_ifork structure currently has a union of the if_root void pointer and the if_data char pointer. In either case it is an opaque pointer that depends on the fork format. Replace the union with a single if_data void pointer as that is what almost all callers want. Only the symlink NULL termination code in xfs_init_local_fork actually needs a new local variable now. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit f732ba4ac9f3626e235cc33a4f1756f17884dd32 Author: Greg Kroah-Hartman Date: Wed Dec 20 08:41:18 2023 +0100 iucv: make iucv_bus const Now that the driver core can properly handle constant struct bus_type, move the iucv_bus variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Wenjia Zhang Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-s390@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Alexandra Winter Signed-off-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit 0b670b54119902de75fcd20a50585cf7b573f801 Author: Hermes Zhang Date: Fri Dec 29 09:36:57 2023 +0800 Input: gpio-keys - filter gpio_keys -EPROBE_DEFER error messages commit ae42f9288846 ("gpio: Return EPROBE_DEFER if gc->to_irq is NULL") make gpiod_to_irq() possible to return -EPROBE_DEFER when the racing happens. This causes the following error message to be printed: gpio-keys gpio_keys: Unable to get irq number for GPIO 0, error -517 Fix that by changing dev_err() to dev_err_probe() Signed-off-by: Hermes Zhang Link: https://lore.kernel.org/r/20231229013657.692600-1-Hermes.Zhang@axis.com Signed-off-by: Dmitry Torokhov commit 4c460eb369514d53383a7c6ba1aefbca4914c68b Author: Anup Patel Date: Sun Dec 24 14:04:02 2023 +0530 RISC-V: KVM: Fix indentation in kvm_riscv_vcpu_set_reg_csr() The indentation of "break" in kvm_riscv_vcpu_set_reg_csr() is inconsistent hence let us fix it. Fixes: c04913f2b54e ("RISCV: KVM: Add sstateen0 to ONE_REG") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312190719.kBuYl6oJ-lkp@intel.com/ Signed-off-by: Anup Patel Signed-off-by: Anup Patel commit 3975525e554559117bbf569239c8b41f2c2fa5cf Author: Daniel Henrique Barboza Date: Tue Dec 5 14:45:09 2023 -0300 RISC-V: KVM: add vector registers and CSRs in KVM_GET_REG_LIST Add all vector registers and CSRs (vstart, vl, vtype, vcsr, vlenb) in get-reg-list. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit 2fa290372dfe7dd248b1c16f943f273a3e674f22 Author: Daniel Henrique Barboza Date: Tue Dec 5 14:45:08 2023 -0300 RISC-V: KVM: add 'vlenb' Vector CSR Userspace requires 'vlenb' to be able to encode it in reg ID. Otherwise it is not possible to retrieve any vector reg since we're returning EINVAL if reg_size isn't vlenb (see kvm_riscv_vcpu_vreg_addr()). Signed-off-by: Daniel Henrique Barboza Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit 197bd237b67268651ac544e8fedbe1fd275d41e0 Author: Daniel Henrique Barboza Date: Tue Dec 5 14:45:07 2023 -0300 RISC-V: KVM: set 'vlenb' in kvm_riscv_vcpu_alloc_vector_context() 'vlenb', added to riscv_v_ext_state by commit c35f3aa34509 ("RISC-V: vector: export VLENB csr in __sc_riscv_v_state"), isn't being initialized in guest_context. If we export 'vlenb' as a KVM CSR, something we want to do in the next patch, it'll always return 0. Set 'vlenb' to riscv_v_size/32. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit bdf6aa328f137e184b0fce607fd585354c3742f1 Author: Andrew Jones Date: Wed Dec 13 18:09:58 2023 +0100 RISC-V: KVM: selftests: Treat SBI ext regs like ISA ext regs SBI extension registers may not be present and indeed when running on a platform without sscofpmf the PMU SBI extension is not. Move the SBI extension registers from the base set of registers to the filter list. Individual configs should test for any that may or may not be present separately. Since the PMU extension may disappear and the DBCN extension is only present in later kernels, separate them from the rest into their own configs. The rest are lumped together into the same config. Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit b26e70d72d12dc9ddb276898a78b1c35c7ab9b95 Author: Andrew Jones Date: Wed Dec 13 18:09:57 2023 +0100 KVM: riscv: selftests: Use register subtypes Always use register subtypes in the get-reg-list test when registers have them. The only registers neglecting to do so were ISA extension registers. While we don't really need to use KVM_REG_RISCV_ISA_SINGLE (since it's zero), the main purpose is to avoid confusion and to self-document the tests. Also add print support for the multi registers like SBI extensions have, even though they're only used for debugging. Signed-off-by: Andrew Jones Reviewed-by: Haibo Xu Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit 6ccf119a4cc886678099a3526f37db98b67024d7 Author: Andrew Jones Date: Wed Dec 13 18:09:56 2023 +0100 KVM: riscv: selftests: Add RISCV_SBI_EXT_REG While adding RISCV_SBI_EXT_REG(), acknowledge that some registers have subtypes and extend __kvm_reg_id() to take a subtype field. Then, update all macros to set the new field appropriately. The general CSR macro gets renamed to include "GENERAL", but the other macros, like the new RISCV_SBI_EXT_REG, just use the SINGLE subtype. Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit 23e1dc45022eb65529aa30b1851a8d21a639c8f5 Author: Andrew Jones Date: Wed Dec 13 18:09:55 2023 +0100 RISC-V: KVM: Make SBI uapi consistent with ISA uapi When an SBI extension cannot be enabled, that's a distinct state vs. enabled and disabled. Modify enum kvm_riscv_sbi_ext_status to accommodate it, which allows KVM userspace to tell the difference in state too, as the SBI extension register will disappear when it cannot be enabled, i.e. accesses to it return ENOENT. get-reg-list is updated as well to only add SBI extension registers to the list which may be enabled. Returning ENOENT for SBI extension registers which cannot be enabled makes them consistent with ISA extension registers. Any SBI extensions which were enabled by default are still enabled by default, if they can be enabled at all. Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit 7602730d7f18ad9738d8fc5e5fd7f52a11fee399 Author: Andrew Jones Date: Wed Dec 13 18:09:54 2023 +0100 KVM: riscv: selftests: Drop SBI multi registers These registers are no longer getting added to get-reg-list. We keep sbi_ext_multi_id_to_str() for printing, even though we don't expect it to normally be used, because it may be useful for debug. Signed-off-by: Andrew Jones Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit 7f58de96aa5e871dd553499e2c84fc801658eab6 Author: Andrew Jones Date: Wed Dec 13 18:09:53 2023 +0100 RISC-V: KVM: Don't add SBI multi regs in get-reg-list The multi regs are derived from the single registers. Only list the single registers in get-reg-list. This also makes the SBI extension register listing consistent with the ISA extension register listing. Signed-off-by: Andrew Jones Reviewed-by: Haibo Xu Reviewed-by: Anup Patel Signed-off-by: Anup Patel commit c19829ba1e4d119e69b1ac9a96d5a0b86f7233e9 Author: Anup Patel Date: Tue Nov 28 20:23:43 2023 +0530 KVM: riscv: selftests: Generate ISA extension reg_list using macros Various ISA extension reg_list have common pattern so let us generate these using macros. We define two macros for the above purpose: 1) KVM_ISA_EXT_SIMPLE_CONFIG - Macro to generate reg_list for ISA extension without any additional ONE_REG registers 2) KVM_ISA_EXT_SUBLIST_CONFIG - Macro to generate reg_list for ISA extension with additional ONE_REG registers This patch also adds the missing config for svnapot. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Signed-off-by: Anup Patel commit bcd08e9bae57b5585e438b7fa58aba4b145a59cf Author: Chao Du Date: Mon Dec 11 09:40:14 2023 +0000 RISC-V: KVM: remove a redundant condition in kvm_arch_vcpu_ioctl_run() The latest ret value is updated by kvm_riscv_vcpu_aia_update(), the loop will continue if the ret is less than or equal to zero. So the later condition will never hit. Thus remove it. Signed-off-by: Chao Du Reviewed-by: Daniel Henrique Barboza Signed-off-by: Anup Patel commit e5ff012743cbc3cf13d2243aaaf032a2ca4d0791 Author: Clément Léger Date: Tue Oct 24 15:26:55 2023 +0200 riscv: kvm: use ".L" local labels in assembly when applicable For the sake of coherency, use local labels in assembly when applicable. This also avoid kprobes being confused when applying a kprobe since the size of function is computed by checking where the next visible symbol is located. This might end up in computing some function size to be way shorter than expected and thus failing to apply kprobes to the specified offset. Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Acked-by: Palmer Dabbelt Signed-off-by: Anup Patel commit 683c5bbbf6aea247bc95a7eb9fdfba4fcc8c909a Author: Clément Léger Date: Tue Oct 24 15:26:54 2023 +0200 riscv: kvm: Use SYM_*() assembly macros instead of deprecated ones ENTRY()/END()/WEAK() macros are deprecated and we should make use of the new SYM_*() macros [1] for better annotation of symbols. Replace the deprecated ones with the new ones and fix wrong usage of END()/ENDPROC() to correctly describe the symbols. [1] https://docs.kernel.org/core-api/asm-annotations.html Signed-off-by: Clément Léger Reviewed-by: Andrew Jones Acked-by: Palmer Dabbelt Signed-off-by: Anup Patel commit 44a1aad2fe6c10bfe0589d8047057b10a4c18a19 Merge: 482b718a84f08 180c6b072bf36 Author: Michael Ellerman Date: Fri Dec 29 15:30:45 2023 +1100 Merge branch 'topic/ppc-kvm' into next Merge our topic branch containing KVM related patches. commit 482b718a84f08b6fc84879c3e90cc57dba11c115 Author: Geoff Levand Date: Sun Dec 24 09:52:46 2023 +0900 powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2 Commit 8c5fa3b5c4df ("powerpc/64: Make ELFv2 the default for big-endian builds"), merged in Linux-6.5-rc1 changes the calling ABI in a way that is incompatible with the current code for the PS3's LV1 hypervisor calls. This change just adds the line '# CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not set' to the ps3_defconfig file so that the PPC64_ELF_ABI_V1 is used. Fixes run time errors like these: BUG: Kernel NULL pointer dereference at 0x00000000 Faulting instruction address: 0xc000000000047cf0 Oops: Kernel access of bad area, sig: 11 [#1] Call Trace: [c0000000023039e0] [c00000000100ebfc] ps3_create_spu+0xc4/0x2b0 (unreliable) [c000000002303ab0] [c00000000100d4c4] create_spu+0xcc/0x3c4 [c000000002303b40] [c00000000100eae4] ps3_enumerate_spus+0xa4/0xf8 Fixes: 8c5fa3b5c4df ("powerpc/64: Make ELFv2 the default for big-endian builds") Cc: stable@vger.kernel.org # v6.5+ Signed-off-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://msgid.link/df906ac1-5f17-44b9-b0bb-7cd292a0df65@infradead.org commit 5bb13e63cb00f0fdca5141f33d7a47bb26730a81 Author: Michael Ellerman Date: Thu Nov 23 14:29:02 2023 +1100 powerpc/86xx: Drop unused CONFIG_MPC8610 The MPC8610 symbol used to be default y if MPC8610_HPCD, but since MPC8610_HPCD was removed MPC8610 is now never used. Remove it. Fixes: 248667f8bbde ("powerpc: drop HPCD/MPC8610 evaluation platform support") Signed-off-by: Michael Ellerman Link: https://msgid.link/20231123032902.2760818-1-mpe@ellerman.id.au commit b8910630c967ffee582289451ddb5f9f19c26872 Author: Tom Zanussi Date: Wed Dec 27 14:28:32 2023 -0600 crypto: iaa - Account for cpu-less numa nodes In some configurations e.g. systems with CXL, a numa node can have 0 cpus and cpumask_nth() will return a cpu value that doesn't exist, which will result in an attempt to add an entry to the wq table at a bad index. To fix this, when iterating the cpus for a node, skip any node that doesn't have cpus. Also, as a precaution, add a warning and bail if cpumask_nth() returns a nonexistent cpu. Reported-by: Zhang, Rex Signed-off-by: Tom Zanussi Signed-off-by: Herbert Xu commit 744e1885922a9943458954cfea917b31064b4131 Author: Chengming Zhou Date: Wed Dec 27 09:35:23 2023 +0000 crypto: scomp - fix req->dst buffer overflow The req->dst buffer size should be checked before copying from the scomp_scratch->dst to avoid req->dst buffer overflow problem. Fixes: 1ab53a77b772 ("crypto: acomp - add driver-side scomp interface") Reported-by: syzbot+3eff5e51bf1db122a16e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/0000000000000b05cd060d6b5511@google.com/ Signed-off-by: Chengming Zhou Reviewed-by: Barry Song Signed-off-by: Herbert Xu commit 44ff4ea133b5c3fa28fa3ef79fed80cac999f07c Author: Ovidiu Panait Date: Sun Dec 24 10:21:44 2023 +0200 crypto: sahara - add support for crypto_engine Convert sahara driver to use crypto_engine, rather than doing manual queue management. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit a7dc2d5c05548f16600ff3b2cf9878fc4d929fb9 Author: Ovidiu Panait Date: Sun Dec 24 10:21:43 2023 +0200 crypto: sahara - remove error message for bad aes request size Do not spam the kernel log with unnecessary error messages when processing requests that aren't a multiple of AES block size. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit ebbcdd6358dd9737c7add8c2c18d09a3c35d0283 Author: Ovidiu Panait Date: Sun Dec 24 10:21:42 2023 +0200 crypto: sahara - remove unnecessary NULL assignments Remove unnecessary 'dev_ptr' NULL assignments in sahara_remove() and sahara_probe(). Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 1eece9c6de22fb24d77328d0c74b7c507f1c958a Author: Ovidiu Panait Date: Sun Dec 24 10:21:41 2023 +0200 crypto: sahara - remove 'active' flag from sahara_aes_reqctx struct The 'active' flag is only used to indirectly set the 'first' flag. Drop the 'active' flag and set 'first' directly in sahara_sha_init(). Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 2548c7a9088c8e06d9d4251e22abd756236d02e4 Author: Ovidiu Panait Date: Sun Dec 24 10:21:40 2023 +0200 crypto: sahara - use dev_err_probe() Switch to use dev_err_probe() to simplify the error paths and unify message template. While at it, also remove explicit error messages from every potential -ENOMEM. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 2f8547af4b7092e6bceb2ce2e8a55fb3769fe7cd Author: Ovidiu Panait Date: Sun Dec 24 10:21:39 2023 +0200 crypto: sahara - use devm_clk_get_enabled() Use devm_clk_get_enabled() helper to simplify probe/remove code. Also, use dev_err_probe() for error reporting. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit efadd1a9959a37f13f7cbca88bd515217466bcd4 Author: Ovidiu Panait Date: Sun Dec 24 10:21:38 2023 +0200 crypto: sahara - use BIT() macro Where applicable, use BIT() macro instead of shift operation to improve readability. No functional change. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 8a8f5d338a461a645f6a027a315ed324af9f1de5 Author: Ovidiu Panait Date: Sun Dec 24 10:21:37 2023 +0200 crypto: sahara - clean up macro indentation Use the same indentation style for all macros. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit a3c6f4f4d249cecaf2f34471aadbfb4f4ef57298 Author: Ovidiu Panait Date: Sun Dec 24 10:21:36 2023 +0200 crypto: sahara - do not resize req->src when doing hash operations When testing sahara sha256 speed performance with tcrypt (mode=404) on imx53-qsrb board, multiple "Invalid numbers of src SG." errors are reported. This was traced to sahara_walk_and_recalc() resizing req->src and causing the subsequent dma_map_sg() call to fail. Now that the previous commit fixed sahara_sha_hw_links_create() to take into account the actual request size, rather than relying on sg->length values, the resize operation is no longer necessary. Therefore, remove sahara_walk_and_recalc() and simplify associated logic. Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 7bafa74d1ba35dcc173e1ce915e983d65905f77e Author: Ovidiu Panait Date: Sun Dec 24 10:21:35 2023 +0200 crypto: sahara - fix processing hash requests with req->nbytes < sg->length It's not always the case that the entire sg entry needs to be processed. Currently, when nbytes is less than sg->length, "Descriptor length" errors are encountered. To fix this, take the actual request size into account when populating the hw links. Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 5deff027fca49a1eb3b20359333cf2ae562a2343 Author: Ovidiu Panait Date: Sun Dec 24 10:21:34 2023 +0200 crypto: sahara - improve error handling in sahara_sha_process() sahara_sha_hw_data_descriptor_create() returns negative error codes on failure, so make sure the errors are correctly handled / propagated. Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 2dba8e1d1a7957dcbe7888846268538847b471d1 Author: Ovidiu Panait Date: Sun Dec 24 10:21:33 2023 +0200 crypto: sahara - fix wait_for_completion_timeout() error handling The sg lists are not unmapped in case of timeout errors. Fix this. Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit efcb50f41740ac55e6ccc4986c1a7740e21c62b4 Author: Ovidiu Panait Date: Sun Dec 24 10:21:32 2023 +0200 crypto: sahara - fix ahash reqsize Set the reqsize for sha algorithms to sizeof(struct sahara_sha_reqctx), the extra space is not needed. Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit d1d6351e37aac14b32a291731d0855996c459d11 Author: Ovidiu Panait Date: Sun Dec 24 10:21:31 2023 +0200 crypto: sahara - handle zero-length aes requests In case of a zero-length input, exit gracefully from sahara_aes_crypt(). Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 069579d0291cebda575a823ac1c85f0644e2ed95 Author: Vegard Nossum Date: Sat Dec 23 09:34:59 2023 +0100 crypto: skcipher - remove excess kerneldoc members Commit 31865c4c4db2 ("crypto: skcipher - Add lskcipher") moved some fields from 'struct skcipher_alg' into SKCIPHER_ALG_COMMON but didn't remove the corresponding kerneldoc members, which results in these warnings when running 'make htmldocs': ./include/crypto/skcipher.h:182: warning: Excess struct member 'min_keysize' description in 'skcipher_alg' ./include/crypto/skcipher.h:182: warning: Excess struct member 'max_keysize' description in 'skcipher_alg' ./include/crypto/skcipher.h:182: warning: Excess struct member 'ivsize' description in 'skcipher_alg' ./include/crypto/skcipher.h:182: warning: Excess struct member 'chunksize' description in 'skcipher_alg' ./include/crypto/skcipher.h:182: warning: Excess struct member 'stat' description in 'skcipher_alg' ./include/crypto/skcipher.h:182: warning: Excess struct member 'base' description in 'skcipher_alg' SKCIPHER_ALG_COMMON already has the documentation for all these fields. Fixes: 31865c4c4db2 ("crypto: skcipher - Add lskcipher") Cc: Randy Dunlap Cc: Jonathan Corbet Signed-off-by: Vegard Nossum Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Herbert Xu commit b590563e441c4ce7cf8e328ecd687c46bbe6529f Author: Vegard Nossum Date: Sat Dec 23 09:34:58 2023 +0100 crypto: shash - remove excess kerneldoc members Commit 42808e5dc602 ("crypto: hash - Count error stats differently") moved some fields from 'struct shash_alg' into HASH_ALG_COMMON but didn't remove the corresponding kerneldoc members, which results in these warnings when running 'make htmldocs': ./include/crypto/hash.h:248: warning: Excess struct member 'digestsize' description in 'shash_alg' ./include/crypto/hash.h:248: warning: Excess struct member 'statesize' description in 'shash_alg' ./include/crypto/hash.h:248: warning: Excess struct member 'stat' description in 'shash_alg' ./include/crypto/hash.h:248: warning: Excess struct member 'base' description in 'shash_alg' HASH_ALG_COMMON already has the documentation for all these fields. Fixes: 42808e5dc602 ("crypto: hash - Count error stats differently") Cc: Randy Dunlap Cc: Jonathan Corbet Signed-off-by: Vegard Nossum Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Herbert Xu commit 5da6a2d5353e0e234f12ccacaf6f50656cc33278 Author: Damian Muszynski Date: Fri Dec 22 14:15:35 2023 +0100 crypto: qat - generate dynamically arbiter mappings The thread-to-arbiter mapping describes which arbiter can assign jobs to an acceleration engine thread. The existing mappings are functionally correct, but hardcoded and not optimized. Replace the static mappings with an algorithm that generates optimal mappings, based on the loaded configuration. The logic has been made common so that it can be shared between all QAT GEN4 devices. Signed-off-by: Damian Muszynski Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit eb52707716e3f2cdf16f4e95e3a800cca190504f Author: Lucas Segarra Fernandez Date: Fri Dec 22 11:35:08 2023 +0100 crypto: qat - add support for ring pair level telemetry Expose through debugfs ring pair telemetry data for QAT GEN4 devices. This allows to gather metrics about the PCIe channel and device TLB for a selected ring pair. It is possible to monitor maximum 4 ring pairs at the time per device. For details, refer to debugfs-driver-qat_telemetry in Documentation/ABI. This patch is based on earlier work done by Wojciech Ziemba. Signed-off-by: Lucas Segarra Fernandez Reviewed-by: Giovanni Cabiddu Reviewed-by: Damian Muszynski Signed-off-by: Herbert Xu commit 69e7649f7cc2aaa7889174456d39319a623c1a18 Author: Lucas Segarra Fernandez Date: Fri Dec 22 11:35:07 2023 +0100 crypto: qat - add support for device telemetry Expose through debugfs device telemetry data for QAT GEN4 devices. This allows to gather metrics about the performance and the utilization of a device. In particular, statistics on (1) the utilization of the PCIe channel, (2) address translation, when SVA is enabled and (3) the internal engines for crypto and data compression. If telemetry is supported by the firmware, the driver allocates a DMA region and a circular buffer. When telemetry is enabled, through the `control` attribute in debugfs, the driver sends to the firmware, via the admin interface, the `TL_START` command. This triggers the device to periodically gather telemetry data from hardware registers and write it into the DMA memory region. The device writes into the shared region every second. The driver, every 500ms, snapshots the DMA shared region into the circular buffer. This is then used to compute basic metric (min/max/average) on each counter, every time the `device_data` attribute is queried. Telemetry counters are exposed through debugfs in the folder /sys/kernel/debug/qat__/telemetry. For details, refer to debugfs-driver-qat_telemetry in Documentation/ABI. This patch is based on earlier work done by Wojciech Ziemba. Signed-off-by: Lucas Segarra Fernandez Reviewed-by: Giovanni Cabiddu Reviewed-by: Damian Muszynski Signed-off-by: Herbert Xu commit 7f06679dd54a331d750e5d6f6f04a9df2eba72ff Author: Lucas Segarra Fernandez Date: Fri Dec 22 11:35:06 2023 +0100 crypto: qat - add admin msgs for telemetry Extend the admin interface with two new public APIs to enable and disable the telemetry feature: adf_send_admin_tl_start() and adf_send_admin_tl_stop(). The first, sends to the firmware, through the ICP_QAT_FW_TL_START message, the IO address where the firmware will write telemetry metrics and a list of ring pairs (maximum 4) to be monitored. It returns the number of accelerators of each type supported by this hardware. After this message is sent, the firmware starts periodically reporting telemetry data using by writing into the dma buffer specified as input. The second, sends the admin message ICP_QAT_FW_TL_STOP which stops the reporting of telemetry data. This patch is based on earlier work done by Wojciech Ziemba. Signed-off-by: Lucas Segarra Fernandez Reviewed-by: Giovanni Cabiddu Reviewed-by: Damian Muszynski Signed-off-by: Herbert Xu commit b6e4b6eb1e6393580482581470a3a08c15ab977b Author: Lucas Segarra Fernandez Date: Fri Dec 22 11:35:05 2023 +0100 crypto: qat - include pci.h for GET_DEV() GET_DEV() macro expansion relies on struct pci_dev being defined. Include at adf_accel_devices.h. Signed-off-by: Lucas Segarra Fernandez Reviewed-by: Giovanni Cabiddu Reviewed-by: Damian Muszynski Signed-off-by: Herbert Xu commit 38f56101b8733b6d334c836c119c79d49b958a3f Author: Jiapeng Chong Date: Tue Dec 19 14:15:20 2023 +0800 crypto: iaa - remove unneeded semicolon No functional modification involved. ./drivers/crypto/intel/iaa/iaa_crypto_main.c:979:2-3: Unneeded semicolon. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7772 Signed-off-by: Jiapeng Chong Acked-by: Tom Zanussi Signed-off-by: Herbert Xu commit 5c3fadc83ee9f6747c8f0f81cd9e5591eb003360 Author: Tom Zanussi Date: Mon Dec 18 14:47:15 2023 -0600 crypto: iaa - Remove unneeded newline in update_max_adecomp_delay_ns() Remove a stray newline in update_max_adecomp_delay_ns(). Reported-by: Christophe JAILLET Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Signed-off-by: Herbert Xu commit 98bb0dd15133a66ce4d1079193367c536b9e3fec Author: Tom Zanussi Date: Mon Dec 18 14:47:14 2023 -0600 crypto: iaa - Change desc->priv to 0 In order for shared workqeues to work properly, desc->priv should be set to 0 rather than 1. The need for this is described in commit f5ccf55e1028 (dmaengine/idxd: Re-enable kernel workqueue under DMA API), so we need to make IAA consistent with IOMMU settings, otherwise we get: [ 141.948389] IOMMU: dmar15: Page request in Privilege Mode [ 141.948394] dmar15: Invalid page request: 2000026a100101 ffffb167 Dedicated workqueues ignore this field and are unaffected. Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Signed-off-by: Herbert Xu commit 73092efad56a4618a2005622eb5495cc631d2e99 Author: Ovidiu Panait Date: Mon Dec 18 18:46:49 2023 +0200 crypto: sun8i-ss - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Ovidiu Panait Acked-by: Jernej Skrabec Signed-off-by: Herbert Xu commit e9b21862587043e2e79ce114b15a578a09106e9e Author: Ovidiu Panait Date: Mon Dec 18 18:46:48 2023 +0200 crypto: sun8i-ce - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Ovidiu Panait Acked-by: Jernej Skrabec Signed-off-by: Herbert Xu commit bfd00210a4e4317ef65b18bdc4dfec163173ea8a Author: Ovidiu Panait Date: Mon Dec 18 18:46:47 2023 +0200 crypto: sl3516 - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Ovidiu Panait Reviewed-by: Linus Walleij Signed-off-by: Herbert Xu commit 7b0795d97132af1aab938697c910ebbce21f7b53 Author: Ovidiu Panait Date: Mon Dec 18 18:46:46 2023 +0200 crypto: stm32/cryp - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 4ef388f0cd87273d73730f308d387e164970c719 Author: Ovidiu Panait Date: Mon Dec 18 18:46:45 2023 +0200 crypto: artpec6 - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 3088f5e5d5f676855752d021767473cbdfdef085 Author: Ovidiu Panait Date: Mon Dec 18 18:46:44 2023 +0200 crypto: amlogic - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 4452c64ee41b3ebcadd8285781d2e7d67b15581b Author: Ovidiu Panait Date: Mon Dec 18 18:46:43 2023 +0200 crypto: rk3288 - Use helper to set reqsize The value of reqsize must only be changed through the helper. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit bfcec4c65b335706dda84e84cdcc386e44fdb3c8 Author: WangJinchao Date: Mon Dec 18 21:15:01 2023 +0800 crypto: tcrypt - add script tcrypt_speed_compare.py Create a script for comparing tcrypt speed test logs. The script will systematically analyze differences item by item and provide a summary (average). This tool is useful for evaluating the stability of cryptographic module algorithms and assisting with performance optimization. Please note that for such a comparison, stability depends on whether we allow frequency to float or pin the frequency. The script produces comparisons in two scenes: 1. For operations in seconds ================================================================================ rfc4106(gcm(aes)) (pcrypt(rfc4106(gcm_base(ctr(aes-generic),ghash-generic)))) encryption -------------------------------------------------------------------------------- bit key | byte blocks | base ops | new ops | differ(%) 160 | 16 | 66439 | 63063 | -5.08 160 | 64 | 62220 | 57439 | -7.68 ... 288 | 4096 | 15059 | 16278 | 8.09 288 | 8192 | 9043 | 9526 | 5.34 -------------------------------------------------------------------------------- average differ(%s) | total_differ(%) -------------------------------------------------------------------------------- 5.70 | -4.49 ================================================================================ 2. For avg cycles of operation ================================================================================ rfc4106(gcm(aes)) (pcrypt(rfc4106(gcm_base(ctr(aes-generic),ghash-generic)))) encryption -------------------------------------------------------------------------------- bit key | byte blocks | base cycles | new cycles | differ(%) 160 | 16 | 32500 | 35847 | 10.3 160 | 64 | 33175 | 45808 | 38.08 ... 288 | 4096 | 131369 | 132132 | 0.58 288 | 8192 | 229503 | 234581 | 2.21 -------------------------------------------------------------------------------- average differ(%s) | total_differ(%) -------------------------------------------------------------------------------- 8.41 | -6.70 ================================================================================ Signed-off-by: WangJinchao Signed-off-by: Herbert Xu commit 3139ebf70a635f20a639b2c9944d7e4ae30bab3b Author: Nithin Dabilpuram Date: Wed Dec 13 13:00:55 2023 +0530 crypto: octeontx2 - support setting ctx ilen for inline CPT LF Provide an option in Inline IPsec configure mailbox to configure the CPT_AF_LFX_CTL:CTX_ILEN for inline CPT LF attached to CPT RVU PF. This is needed to set the ctx ilen to size of inbound SA for HW errata IPBUCPT-38756. Not setting this would lead to new context's not being fetched. Also set FLR_FLUSH in CPT_LF_CTX_CTL for CPT LF's as workaround for same errata. Signed-off-by: Nithin Dabilpuram Signed-off-by: Herbert Xu commit 434c1cb9722beab9c9b91ca9f1edab9a86f5d41d Author: Nithin Dabilpuram Date: Wed Dec 13 13:00:54 2023 +0530 crypto: octeontx2 - register error interrupts for inline cptlf Register errors interrupts for inline cptlf attached to PF driver so that SMMU faults and other errors can be reported. Signed-off-by: Nithin Dabilpuram Signed-off-by: Herbert Xu commit e92971117c2c895295e5ec9cae4038ef5b17a7ff Author: Srujana Challa Date: Wed Dec 13 13:00:53 2023 +0530 crypto: octeontx2 - add ctx_val workaround HW has a errata that CPT HW may hit an issue, while processing CPT instructions with CTX_VAL set and CTX_VAL not set. So, this patch adds the code to always set the CTX_VAL as a workaround. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit 8bb0be9f53d17c75a829b9d25420645caf6d8581 Author: Srujana Challa Date: Wed Dec 13 13:00:52 2023 +0530 crypto: octeontx2 - update CPT inbound inline IPsec mailbox Updates CPT inbound inline IPsec configure mailbox to take CPT credit threshold and bpid, which are introduced in CN10KB. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit cac482f2418bf0d140ed89650dbb0413e9fe1f58 Author: Srujana Challa Date: Wed Dec 13 13:00:51 2023 +0530 crypto: octeontx2 - add LF reset on queue disable CPT LF must be reset and follow CPT LF disable sequence suggested by HW team, when driver exits. This patch adds code for the same. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit 9d1d5702aac831ba844d6227373c49e0ba0ec8ae Author: Srujana Challa Date: Wed Dec 13 13:00:50 2023 +0530 crypto: octeontx2 - remove errata workaround for CN10KB or CN10KA B0 chip. Adds code to not execute CPT errata "when CPT_AF_DIAG[FLT_DIS] = 0 and a CPT engine access to LLC/DRAM encounters a fault/poison, a rare case may result in unpredictable data being delivered to a CPT engine" workaround on CN10KA B0/CN10KB HW as it is fixed on these chips. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit 82f89f1aa6ca33a6c1e50ddb165e2d5b882025e1 Author: Srujana Challa Date: Wed Dec 13 13:00:49 2023 +0530 crypto: octeontx2 - add devlink option to set t106 mode On CN10KA B0/CN10KB, CPT scatter gather format has modified to support multi-seg in inline IPsec. Due to this CPT requires new firmware and doesn't work with CN10KA0/A1 firmware. To make HW works in backward compatibility mode or works with CN10KA0/A1 firmware, a bit(T106_MODE) is introduced in HW CSR. This patch adds devlink parameter for configuring T106_MODE. This patch also documents the devlink parameter under Documentation/crypto/device_drivers. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit 92508e7fcffdd77d6e2a18d3dd9c8863f61b040f Author: Srujana Challa Date: Wed Dec 13 13:00:48 2023 +0530 crypto: octeontx2 - add SGv2 support for CN10KB or CN10KA B0 Scatter Gather input format for CPT has changed on CN10KB/CN10KA B0 HW to make it compatible with NIX Scatter Gather format to support SG mode for inline IPsec. This patch modifies the code to make the driver works for the same. This patch also enables CPT firmware load for these chips. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit 711b2e2d6d63ee914e2bb663b322b1317884bb61 Author: Srujana Challa Date: Wed Dec 13 13:00:47 2023 +0530 crypto: octeontx2 - remove CPT block reset CPT block reset in CPT PF erase all the CPT configuration which is done in AF driver init. So, remove CPT block reset from CPT PF as it is also being done in AF init and not required in PF. Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit b6190c452a2264ccd88c849b91990fe854a7ec72 Author: Shengjiu Wang Date: Wed Dec 27 17:27:43 2023 +0800 ASoC: SOF: imx: Add SNDRV_PCM_INFO_BATCH flag The sof imx pcm device is a device which should support double buffering. Found this issue with pipewire. When there is no SNDRV_PCM_INFO_BATCH flag in driver, the pipewire will set headroom to be zero, and because sof pcm device don't support residue report, when the latency setting is small, the "delay" always larger than "target" in alsa-pcm.c, that reading next period data is not scheduled on time. With SNDRV_PCM_INFO_BATCH flag in driver, the pipewire will select a smaller period size for device, then the task of reading next period data will be scheduled on time. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1703669263-13832-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 1271ca00aa7f9bb3fd94cb7ac8f654de71099580 Author: Jonathan Corbet Date: Tue Dec 19 16:55:31 2023 -0700 ethtool: reformat kerneldoc for struct ethtool_fec_stats The kerneldoc comment for struct ethtool_fec_stats attempts to describe the "total" and "lanes" fields of the ethtool_fec_stat substructure in a way leading to these warnings: ./include/linux/ethtool.h:424: warning: Excess struct member 'lane' description in 'ethtool_fec_stats' ./include/linux/ethtool.h:424: warning: Excess struct member 'total' description in 'ethtool_fec_stats' Reformat the comment to retain the information while eliminating the warnings. Signed-off-by: Jonathan Corbet Reviewed-by: Randy Dunlap Signed-off-by: David S. Miller commit d0c3891db2d279b2f5ff8fd174e0b09e75dea039 Author: Jonathan Corbet Date: Tue Dec 19 16:53:46 2023 -0700 ethtool: reformat kerneldoc for struct ethtool_link_settings The kernel doc comments for struct ethtool_link_settings includes documentation for three fields that were never present there, leading to these docs-build warnings: ./include/uapi/linux/ethtool.h:2207: warning: Excess struct member 'supported' description in 'ethtool_link_settings' ./include/uapi/linux/ethtool.h:2207: warning: Excess struct member 'advertising' description in 'ethtool_link_settings' ./include/uapi/linux/ethtool.h:2207: warning: Excess struct member 'lp_advertising' description in 'ethtool_link_settings' Remove the entries to make the warnings go away. There was some information there on how data in >link_mode_masks is formatted; move that to the body of the comment to preserve it. Signed-off-by: Jonathan Corbet Reviewed-by: Randy Dunlap Signed-off-by: David S. Miller commit 144377c340f292c5d8c039eb790318754eec557e Author: Jonathan Corbet Date: Tue Dec 19 16:51:12 2023 -0700 net: sock: remove excess structure-member documentation Remove a couple of kerneldoc entries for struct members that do not exist, addressing these warnings: ./include/net/sock.h:548: warning: Excess struct member '__sk_flags_offset' description in 'sock' ./include/net/sock.h:548: warning: Excess struct member 'sk_padding' description in 'sock' Signed-off-by: Jonathan Corbet Reviewed-by: Randy Dunlap Signed-off-by: David S. Miller commit fa7280e5dd815363af147dc5358b25f5a06c9c68 Author: Damien Le Moal Date: Wed Dec 20 13:52:09 2023 +0900 MAINTAINERS: Add Niklas Cassel as libata maintainer Add Niklas as co-maintainer of the ata subsystem (aka libata). The new shared tree for libata will now be "pub/scm/linux/kernel/git/libata/linux" on kernel.org GIT. Niklas and I will alternate maintainership every release. Signed-off-by: Damien Le Moal Acked-by: Niklas Cassel commit 9ca65c373f4451fdf2f82ebc30b17185253aec8f Author: attreyee-muk Date: Sun Dec 24 00:17:20 2023 +0530 docs: PCI: Fix typos Fix typos in PCI docs. Link: https://lore.kernel.org/r/20231223184720.25645-1-tintinm2017@gmail.com Link: https://lore.kernel.org/r/20231223184412.25598-1-tintinm2017@gmail.com Signed-off-by: Attreyee Mukherjee [bhelgaas: squashed, commit log] Signed-off-by: Bjorn Helgaas Acked-by: Randy Dunlap # for "busses" only commit 1b09c2b8f849079220a9a9ddf961582f00bdc2c4 Author: Krzysztof Kozlowski Date: Sat Dec 23 20:19:02 2023 +0100 pinctrl: samsung: constify iomem pointers Constify few pointers to iomem, where the destination memory is not modified, for code safety and readability. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: Sam Protsenko Link: https://lore.kernel.org/r/20231223191902.22857-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 04c3b03044034ce50886f2c0d1c595ff25f45085 Author: Stanislaw Gruszka Date: Thu Dec 28 11:02:48 2023 +0100 thermal: netlink: Add thermal_group_has_listeners() helper Add a helper function to check if there are listeners for thermal_gnl_family multicast groups. For now use it to avoid unnecessary allocations and sending thermal genl messages when there are no recipients. In the future, in conjunction with (not yet implemented) notification of change in the netlink socket group membership, this helper can be used to open/close hardware interfaces based on the presence of user space subscribers. Signed-off-by: Stanislaw Gruszka Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 5eb4f413ad60db7c4b11c4d331b04f2909c8ba14 Author: Stanislaw Gruszka Date: Thu Dec 28 11:02:47 2023 +0100 thermal: netlink: Add enum for mutlicast groups indexes Use enum instead of hard-coded numbers for indexing multicast groups. Signed-off-by: Stanislaw Gruszka Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 782f8906f8057efc7151b4b98b0a0280a71d005f Author: Vlastimil Babka Date: Tue Nov 14 22:12:47 2023 +0100 mm/slub: free KFENCE objects in slab_free_hook() When freeing an object that was allocated from KFENCE, we do that in the slowpath __slab_free(), relying on the fact that KFENCE "slab" cannot be the cpu slab, so the fastpath has to fallback to the slowpath. This optimization doesn't help much though, because is_kfence_address() is checked earlier anyway during the free hook processing or detached freelist building. Thus we can simplify the code by making the slab_free_hook() free the KFENCE object immediately, similarly to KASAN quarantine. In slab_free_hook() we can place kfence_free() above init processing, as callers have been making sure to set init to false for KFENCE objects. This simplifies slab_free(). This places it also above kasan_slab_free() which is ok as that skips KFENCE objects anyway. While at it also determine the init value in slab_free_freelist_hook() outside of the loop. This change will also make introducing per cpu array caches easier. Tested-by: Marco Elver Reviewed-by: Chengming Zhou Signed-off-by: Vlastimil Babka commit 5a5efdaffda5d23717d9117cf36cda9eafcf2fae Author: Rafael J. Wysocki Date: Mon Dec 18 20:28:31 2023 +0100 thermal: core: Resume thermal zones asynchronously The resume of thermal zones in thermal_pm_notify() is carried out sequentially, which may be a problem if __thermal_zone_device_update() takes a significant time to run for some thermal zones, because some other thermal zones may need to wait for them to resume then and if any other PM notifiers are going to be invoked after the thermal one, they will need to wait for it either. To address this, make thermal_pm_notify() switch the poll_queue delayed work over to a one-shot thermal_zone_device_resume() work function that will restore the original one during the thermal zone resume and queue up poll_queue without a delay for each thermal zone. Link: https://lore.kernel.org/linux-pm/20231120234015.3273143-1-radusolea@google.com/ Reported-by: Radu Solea Signed-off-by: Rafael J. Wysocki commit 33fcb595dc14678717274c270d02c7d7e0a3c404 Author: Rafael J. Wysocki Date: Mon Dec 18 20:26:47 2023 +0100 thermal: core: Initialize poll_queue in thermal_zone_device_init() In preparation for a subsequent change, move the initialization of the poll_queue delayed work from thermal_zone_device_register_with_trips() to thermal_zone_device_init() which is called by the former. However, because thermal_zone_device_init() is also called by thermal_pm_notify(), make the latter call cancel_delayed_work() on poll_queue before invoking the former, so as to allow the work item to be re-initialized safely. Also move thermal_zone_device_check() which needs to be defined before thermal_zone_device_init(), so the latter can pass it to the INIT_DELAYED_WORK() macro. Signed-off-by: Rafael J. Wysocki commit 4e814173a8c4f432fd068b1c796f0416328c9d99 Author: Rafael J. Wysocki Date: Mon Dec 18 20:25:02 2023 +0100 thermal: core: Fix thermal zone suspend-resume synchronization There are 3 synchronization issues with thermal zone suspend-resume during system-wide transitions: 1. The resume code runs in a PM notifier which is invoked after user space has been thawed, so it can run concurrently with user space which can trigger a thermal zone device removal. If that happens, the thermal zone resume code may use a stale pointer to the next list element and crash, because it does not hold thermal_list_lock while walking thermal_tz_list. 2. The thermal zone resume code calls thermal_zone_device_init() outside the zone lock, so user space or an update triggered by the platform firmware may see an inconsistent state of a thermal zone leading to unexpected behavior. 3. Clearing the in_suspend global variable in thermal_pm_notify() allows __thermal_zone_device_update() to continue for all thermal zones and it may as well run before the thermal_tz_list walk (or at any point during the list walk for that matter) and attempt to operate on a thermal zone that has not been resumed yet. It may also race destructively with thermal_zone_device_init(). To address these issues, add thermal_list_lock locking to thermal_pm_notify(), especially arount the thermal_tz_list, make it call thermal_zone_device_init() back-to-back with __thermal_zone_device_update() under the zone lock and replace in_suspend with per-zone bool "suspend" indicators set and unset under the given zone's lock. Link: https://lore.kernel.org/linux-pm/20231218162348.69101-1-bo.ye@mediatek.com/ Reported-by: Bo Ye Signed-off-by: Rafael J. Wysocki commit eb9299beadbdd7be8de1e97f1059e89bcb64b05d Author: Rafael J. Wysocki Date: Fri Dec 15 12:27:30 2023 +0100 ACPI: EC: Use a spin lock without disabing interrupts Since all of the ACPI EC driver code runs in thread context after recent changes, it does not need to disable interrupts on the local CPU when acquiring a spin lock. Make it use the spin lock without disabling interrupts. Signed-off-by: Rafael J. Wysocki commit 655a6e7c0d83d47c36218525708c9fcfdd7f4b43 Author: Rafael J. Wysocki Date: Fri Dec 15 12:26:33 2023 +0100 ACPI: EC: Use a threaded handler for dedicated IRQ After commit 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI") all of the EC code runs in thread context on all systems where EC events are signaled through a GPE. It may as well run in thread context on systems using a dedicated IRQ for EC events signaling, so make it use a threaded handler for that IRQ. Signed-off-by: Rafael J. Wysocki commit 8e57de43076477c5cce113f2579bef02ce3e8b27 Author: Rafael J. Wysocki Date: Fri Dec 15 12:25:15 2023 +0100 ACPI: OSL: Use spin locks without disabling interrupts After commit 7a36b901a6eb ("ACPI: OSL: Use a threaded interrupt handler for SCI") any ACPICA code never runs in a hardirq handler, so it need not dissable interrupts on the local CPU when acquiring a spin lock. Make it use spin locks without disabling interrupts. Signed-off-by: Rafael J. Wysocki commit 561429807d50aad76f1205b0b1d7b4aacf365d4e Author: Thomas Weißschuh Date: Wed Dec 20 22:23:35 2023 +0100 sysctl: remove struct ctl_path All usages of this struct have been removed from the kernel tree. The struct is still referenced by scripts/check-sysctl-docs but that script is broken anyways as it only supports the register_sysctl_paths() API and not the currently used register_sysctl() one. Fixes: 0199849acd07 ("sysctl: remove register_sysctl_paths()") Signed-off-by: Thomas Weißschuh Reviewed-by: Joel Granados Signed-off-by: Luis Chamberlain commit 0b68ab50b8101a35b51fb9ec203cd988e47dbed3 Author: Thomas Weißschuh Date: Sat Dec 23 14:53:47 2023 +0100 sysctl: delete unused define SYSCTL_PERM_EMPTY_DIR It seems it was never used. Fixes: 2f2665c13af4 ("sysctl: replace child with an enumeration") Signed-off-by: Thomas Weißschuh Signed-off-by: Luis Chamberlain commit 00992a1358b67d6a4e612e1be538bdfe0a2a30ff Author: Joel Granados Date: Tue Nov 21 12:35:14 2023 +0100 coda: Remove the now superfluous sentinel elements from ctl_table array This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Remove empty sentinel from coda_table Signed-off-by: Joel Granados Acked-by: Christian Brauner Signed-off-by: Luis Chamberlain commit c8a65501d3a8a59fd9450cb961d16442c6380327 Author: Joel Granados Date: Tue Nov 21 12:35:13 2023 +0100 sysctl: Remove the now superfluous sentinel elements from ctl_table array This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Remove empty sentinel element from test_table and test_table_unregister. Signed-off-by: Joel Granados Acked-by: Christian Brauner Signed-off-by: Luis Chamberlain commit 9d5b9475356635d018b4d22f7e58fce32e2e89a7 Author: Joel Granados Date: Tue Nov 21 12:35:12 2023 +0100 fs: Remove the now superfluous sentinel elements from ctl_table array This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Remove sentinel elements ctl_table struct. Special attention was placed in making sure that an empty directory for fs/verity was created when CONFIG_FS_VERITY_BUILTIN_SIGNATURES is not defined. In this case we use the register sysctl call that expects a size. Signed-off-by: Joel Granados Reviewed-by: Jan Kara Reviewed-by: "Darrick J. Wong" Acked-by: Christian Brauner Signed-off-by: Luis Chamberlain commit e640fc5b7b241a0871fbbd94fa9a8a83ecd84391 Author: Joel Granados Date: Tue Nov 21 12:35:11 2023 +0100 cachefiles: Remove the now superfluous sentinel element from ctl_table array This commit comes at the tail end of a greater effort to remove the empty elements at the end of the ctl_table arrays (sentinels) which will reduce the overall build time size of the kernel and run time memory bloat by ~64 bytes per sentinel (further information Link : https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/) Remove sentinel from cachefiles_sysctls Signed-off-by: Joel Granados Acked-by: Christian Brauner Signed-off-by: Luis Chamberlain commit ce023757845d5bee95094fe1de948a949f52c0e4 Author: Joel Granados Date: Tue Nov 21 12:02:20 2023 +0100 sysclt: Clarify the results of selftest run In some cases the result of test were hidden inside the stdout and it was difficult to identify when a test was skipped and why. List of changes 1. Capitalize all the words that express a test result : "OK", "SKIPPED" and "FAIL". 2. Place all test result text at the end of the message. This will prevent the result from being hidden when stdout is verbose. 3. Any other explanation that comes after the result text will be placed in a new line. 4. All failures are marked as "FAIL" 5. Pipped the failure to stderr in tests 8, 9, 10. 6. Replaced bogus "FAIL" with "SKIPPED" in test 0007 7. All "..." are prefixed and followed by a space. Signed-off-by: Joel Granados Signed-off-by: Luis Chamberlain commit 777740779ec5bd05eac85d9bbbb6b11457cfd238 Author: Joel Granados Date: Tue Nov 21 12:02:19 2023 +0100 sysctl: Add a selftest for handling empty dirs Basic test to ensure that empty directories can be registered and that they in turn can serve as a base dir for other registrations. Add one test to the sysctl selftest module. It first registers an empty directory under "empty_add" and then uses that as a base to register another empty dir. The sysctl bash script then checks that "empty_add" is present and that there an empty directory within it. Signed-off-by: Joel Granados Signed-off-by: Luis Chamberlain commit 315552310c7de92baea4e570967066569937a843 Author: Joel Granados Date: Tue Nov 21 12:02:18 2023 +0100 sysctl: Fix out of bounds access for empty sysctl registers When registering tables to the sysctl subsystem there is a check to see if header is a permanently empty directory (used for mounts). This check evaluates the first element of the ctl_table. This results in an out of bounds evaluation when registering empty directories. The function register_sysctl_mount_point now passes a ctl_table of size 1 instead of size 0. It now relies solely on the type to identify a permanently empty register. Make sure that the ctl_table has at least one element before testing for permanent emptiness. Signed-off-by: Joel Granados Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202311201431.57aae8f3-oliver.sang@intel.com Signed-off-by: Luis Chamberlain commit 05c1a8d01facb9b24ab267929be94f9fc5ca686d Author: Luis Chamberlain Date: Thu Nov 2 13:26:55 2023 -0700 MAINTAINERS: Add Joel Granados as co-maintainer for proc sysctl Joel Granados has been doing quite a bit of the work to help us move forward with the proc sysctl cleanups, and is keen on helping and so has agreed to help with maintenance of proc sysctl. Add him as a maintainer. Reviewed-by: Kees Cook Signed-off-by: Luis Chamberlain commit 0417f247f20b89cf4a4d697fa60fe30b8650cd2c Author: Luis Chamberlain Date: Thu Nov 2 12:33:39 2023 -0700 MAINTAINERS: remove Iurii Zaikin from proc sysctl Iurii Zaikin has moved on to other projects and has had no time to help with proc sysctl maintenance. Signed-off-by: Luis Chamberlain commit dd8f87f21dc3da2eaf46e7401173f935b90b13a8 Author: Edward Adam Davis Date: Tue Dec 26 15:16:09 2023 +0800 reiserfs: fix uninit-value in comp_keys The cpu_key was not initialized in reiserfs_delete_solid_item(), which triggered this issue. Reported-and-tested-by: Signed-off-by: Edward Adam Davis Link: https://lore.kernel.org/r/tencent_9EA7E746DE92DBC66049A62EDF6ED64CA706@qq.com Signed-off-by: Christian Brauner commit 8ff363ade395e72dc639810b6f59849c743c363e Author: Christophe JAILLET Date: Sun Dec 24 18:36:42 2023 +0100 block: Fix a memory leak in bdev_open_by_dev() If we early exit here, 'handle' needs to be freed, or some memory leaks. Fixes: ed5cc702d311 ("block: Add config option to not allow writing to mounted devices") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/8eaec334781e695810aaa383b55de00ca4ab1352.1703439383.git.christophe.jaillet@wanadoo.fr Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit c39e2ae3943d4ee278af4e1b1dcfd5946da1089b Author: Vegard Nossum Date: Thu Dec 28 11:06:08 2023 +0100 fs: fix __sb_write_started() kerneldoc formatting When running 'make htmldocs', I see the following warning: Documentation/filesystems/api-summary:14: ./include/linux/fs.h:1659: WARNING: Definition list ends without a blank line; unexpected unindent. The official guidance [1] seems to be to use lists, which will prevent both the "unexpected unindent" warning as well as ensure that each line is formatted on a separate line in the HTML output instead of being all considered a single paragraph. [1]: https://docs.kernel.org/doc-guide/kernel-doc.html#return-values Fixes: 8802e580ee64 ("fs: create __sb_write_started() helper") Cc: Amir Goldstein Cc: Josef Bacik Cc: Jan Kara Signed-off-by: Vegard Nossum Link: https://lore.kernel.org/r/20231228100608.3123987-1-vegard.nossum@oracle.com Signed-off-by: Christian Brauner commit 86fb59411553c553fe327db067a2435ecb72c80f Merge: 861deac3b092f 80105ed2fd271 Author: Christian Brauner Date: Thu Dec 28 11:34:22 2023 +0100 Merge tag 'netfs-lib-20231228' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull netfs updates from David Howells: The main aims of these patches are to get high-level I/O and knowledge of the pagecache out of the filesystem drivers as much as possible and to get rid, as much of possible, of the knowledge that pages/folios exist. Further, I would like to see ->write_begin, ->write_end and ->launder_folio go away. Features that are added by these patches to that which is already there in netfslib: (1) NFS-style (and Ceph-style) locking around DIO vs buffered I/O calls to prevent these from happening at the same time. mmap'd I/O can, of necessity, happen at any time ignoring these locks. (2) Support for unbuffered I/O. The data is kept in the bounce buffer and the pagecache is not used. This can be turned on with an inode flag. (3) Support for direct I/O. This is basically unbuffered I/O with some extra restrictions and no RMW. (4) Support for using a bounce buffer in an operation. The bounce buffer may be bigger than the target data/buffer, allowing for crypto rounding. (5) ->write_begin() and ->write_end() are ignored in favour of merging all of that into one function, netfs_perform_write(), thereby avoiding the function pointer traversals. (6) Support for write-through caching in the pagecache. netfs_perform_write() adds the pages is modifies to an I/O operation as it goes and directly marks them writeback rather than dirty. When writing back from write-through, it limits the range written back. This should allow CIFS to deal with byte-range mandatory locks correctly. (7) O_*SYNC and RWF_*SYNC writes use write-through rather than writing to the pagecache and then flushing afterwards. An AIO O_*SYNC write will notify of completion when the sub-writes all complete. (8) Support for write-streaming where modifed data is held in !uptodate folios, with a private struct attached indicating the range that is valid. (9) Support for write grouping, multiplexing a pointer to a group in the folio private data with the write-streaming data. The writepages algorithm only writes stuff back that's in the nominated group. This is intended for use by Ceph to write is snaps in order. (10) Skipping reads for which we know the server could only supply zeros or EOF (for instance if we've done a local write that leaves a hole in the file and extends the local inode size). General notes: (1) The fscache module is merged into the netfslib module to avoid cyclic exported symbol usage that prevents either module from being loaded. (2) Some helpers from fscache are reassigned to netfslib by name. (3) netfslib now makes use of folio->private, which means the filesystem can't use it. (4) The filesystem provides wrappers to call the write helpers, allowing it to do pre-validation, oplock/capability fetching and the passing in of write group info. (5) I want to try flushing the data when tearing down an inode before invalidating it to try and render launder_folio unnecessary. (6) Write-through caching will generate and dispatch write subrequests as it gathers enough data to hit wsize and has whole pages that at least span that size. This needs to be a bit more flexible, allowing for a filesystem such as CIFS to have a variable wsize. (7) The filesystem driver is just given read and write calls with an iov_iter describing the data/buffer to use. Ideally, they don't see pages or folios at all. A function, extract_iter_to_sg(), is already available to decant part of an iterator into a scatterlist for crypto purposes. AFS notes: (1) I pushed a pair of patches that clean up the trace header down to the base so that they can be shared with another branch. 9P notes: (1) Most of xfstests now pass - more, in fact, since upstream 9p lacks a writepages method and can't handle mmap writes. An occasional oops (and sometimes panic) happens somewhere in the pathwalk/FID handling code that is unrelated to these changes. (2) Writes should now occur in larger-than-page-sized chunks. (3) It should be possible to turn on multipage folio support in 9P now. All in all these patches remove a little over 800 lines from AFS, 300 from 9P, albeit with around 3000 lines added to netfs. Hopefully, I will be able to remove a bunch of lines from Ceph too. I've split the CIFS patches out to a separate branch, cifs-netfs, where a further 2000+ lines are removed. I can run a certain amount of xfstests on CIFS, though I'm running into ksmbd issues and not all the tests work correctly because of issues between fallocate and what the SMB protocol actually supports. I've also dropped the content-crypto patches out for the moment as they're only usable by the ceph changes which I'm still working on. The patch to use PG_writeback instead of PG_fscache for writing to the cache has also been deferred, pending 9p, afs, ceph and cifs all being converted. * tag 'netfs-lib-20231228' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: (40 commits) 9p: Use netfslib read/write_iter afs: Use the netfs write helpers netfs: Export the netfs_sreq tracepoint netfs: Optimise away reads above the point at which there can be no data netfs: Implement a write-through caching option netfs: Provide a launder_folio implementation netfs: Provide a writepages implementation netfs, cachefiles: Pass upper bound length to allow expansion netfs: Provide netfs_file_read_iter() netfs: Allow buffered shared-writeable mmap through netfs_page_mkwrite() netfs: Implement buffered write API netfs: Implement unbuffered/DIO write support netfs: Implement unbuffered/DIO read support netfs: Allocate multipage folios in the writepath netfs: Make netfs_read_folio() handle streaming-write pages netfs: Provide func to copy data to pagecache for buffered write netfs: Dispatch write requests to process a writeback slice netfs: Prep to use folio->private for write grouping and streaming write netfs: Make the refcounting of netfs_begin_read() easier to use netfs: Make netfs_put_request() handle a NULL pointer ... Signed-off-by: Christian Brauner commit 80105ed2fd2715fb09a8fdb0655a8bdc86c120db Author: David Howells Date: Wed Dec 6 12:48:56 2023 +0000 9p: Use netfslib read/write_iter Use netfslib's read and write iteration helpers, allowing netfslib to take over the management of the page cache for 9p files and to manage local disk caching. In particular, this eliminates write_begin, write_end, writepage and all mentions of struct page and struct folio from 9p. Note that netfslib now offers the possibility of write-through caching if that is desirable for 9p: just set the NETFS_ICTX_WRITETHROUGH flag in v9inode->netfs.flags in v9fs_set_netfs_context(). Note also this is untested as I can't get ganesha.nfsd to correctly parse the config to turn on 9p support. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: Eric Van Hensbergen cc: Latchesar Ionkov cc: Dominique Martinet cc: Christian Schoenebeck cc: v9fs@lists.linux.dev cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org commit 3560358a49569d0ade0ee5c9cecb3606dac863c2 Author: David Howells Date: Tue Feb 15 17:02:04 2022 +0000 afs: Use the netfs write helpers Make afs use the netfs write helpers. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 545b135b72002145ade758f7e59c113915283188 Author: David Howells Date: Mon Apr 25 16:30:11 2022 +0100 netfs: Export the netfs_sreq tracepoint Export the netfs_sreq tracepoint so that it can be called directly from client filesystems/cache backend modules. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 100ccd18bb41ea7abb4fbb419202c06079559501 Author: David Howells Date: Fri Nov 24 13:39:02 2023 +0000 netfs: Optimise away reads above the point at which there can be no data Track the file position above which the server is not expected to have any data (the "zero point") and preemptively assume that we can satisfy requests by filling them with zeroes locally rather than attempting to download them if they're over that line - even if we've written data back to the server. Assume that any data that was written back above that position is held in the local cache. Note that we have to split requests that straddle the line. Make use of this to optimise away some reads from the server. We need to set the zero point in the following circumstances: (1) When we see an extant remote inode and have no cache for it, we set the zero_point to i_size. (2) On local inode creation, we set zero_point to 0. (3) On local truncation down, we reduce zero_point to the new i_size if the new i_size is lower. (4) On local truncation up, we don't change zero_point. (5) On local modification, we don't change zero_point. (6) On remote invalidation, we set zero_point to the new i_size. (7) If stored data is discarded from the pagecache or culled from fscache, we must set zero_point above that if the data also got written to the server. (8) If dirty data is written back to the server, but not fscache, we must set zero_point above that. (9) If a direct I/O write is made, set zero_point above that. Assuming the above, any read from the server at or above the zero_point position will return all zeroes. The zero_point value can be stored in the cache, provided the above rules are applied to it by any code that culls part of the local cache. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 41d8e7673a7726cba57cb8112d81c89cfb6c3e35 Author: David Howells Date: Thu Oct 12 09:06:24 2023 +0100 netfs: Implement a write-through caching option Provide a flag whereby a filesystem may request that cifs_perform_write() perform write-through caching. This involves putting pages directly into writeback rather than dirty and attaching them to a write operation as we go. Further, the writes being made are limited to the byte range being written rather than whole folios being written. This can be used by cifs, for example, to deal with strict byte-range locking. This can't be used with content encryption as that may require expansion of the write RPC beyond the write being made. This doesn't affect writes via mmap - those are written back in the normal way; similarly failed writethrough writes are marked dirty and left to writeback to retry. Another option would be to simply invalidate them, but the contents can be simultaneously accessed by read() and through mmap. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 4a79616cfb27d76947ea37f0336745ef929d56be Author: David Howells Date: Thu Oct 5 16:52:58 2023 +0100 netfs: Provide a launder_folio implementation Provide a launder_folio implementation for netfslib. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 62c3b7481b9a108cb99ef9438dba66bb4738768b Author: David Howells Date: Thu Sep 28 11:46:49 2023 +0100 netfs: Provide a writepages implementation Provide an implementation of writepages for network filesystems to delegate to. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit e0ace6ca98bef0d8d354040f13ffc0a498813ee9 Author: David Howells Date: Wed Nov 22 17:18:17 2023 +0000 netfs, cachefiles: Pass upper bound length to allow expansion Make netfslib pass the maximum length to the ->prepare_write() op to tell the cache how much it can expand the length of a write to. This allows a write to the server at the end of a file to be limited to a few bytes whilst writing an entire block to the cache (something required by direct I/O). Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 80645bd4aa33a5c325f11b8dc6b38b38410ad5c0 Author: David Howells Date: Wed Oct 11 09:29:43 2023 +0100 netfs: Provide netfs_file_read_iter() Provide a top-level-ish function that can be pointed to directly by ->read_iter file op. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 102a7e2c598c22bd2621fa97eb1c93c89d469a12 Author: David Howells Date: Tue Feb 15 23:15:57 2022 +0000 netfs: Allow buffered shared-writeable mmap through netfs_page_mkwrite() Provide an entry point to delegate a filesystem's ->page_mkwrite() to. This checks for conflicting writes, then attached any netfs-specific group marking (e.g. ceph snap) to the page to be considered dirty. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 938e13a73b244278a3777f38fa915bd239b2efd2 Author: David Howells Date: Thu Jun 17 13:09:21 2021 +0100 netfs: Implement buffered write API Institute a netfs write helper, netfs_file_write_iter(), to be pointed at by the network filesystem ->write_iter() call. Make it handled buffered writes by calling the previously defined netfs_perform_write() to copy the source data into the pagecache. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 153a9961b551101cd38e94e26cd92fbfd198b19b Author: David Howells Date: Mon Feb 21 11:38:17 2022 +0000 netfs: Implement unbuffered/DIO write support Implement support for unbuffered writes and direct I/O writes. If the write is misaligned with respect to the fscrypt block size, then RMW cycles are performed if necessary. DIO writes are a special case of unbuffered writes with extra restriction imposed, such as block size alignment requirements. Also provide a field that can tell the code to add some extra space onto the bounce buffer for use by the filesystem in the case of a content-encrypted file. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 016dc8516aec8719641e7aaaacd78d344759178e Author: David Howells Date: Fri Jan 14 17:39:55 2022 +0000 netfs: Implement unbuffered/DIO read support Implement support for unbuffered and DIO reads in the netfs library, utilising the existing read helper code to do block splitting and individual queuing. The code also handles extraction of the destination buffer from the supplied iterator, allowing async unbuffered reads to take place. The read will be split up according to the rsize setting and, if supplied, the ->clamp_length() method. Note that the next subrequest will be issued as soon as issue_op returns, without waiting for previous ones to finish. The network filesystem needs to pause or handle queuing them if it doesn't want to fire them all at the server simultaneously. Once all the subrequests have finished, the state will be assessed and the amount of data to be indicated as having being obtained will be determined. As the subrequests may finish in any order, if an intermediate subrequest is short, any further subrequests may be copied into the buffer and then abandoned. In the future, this will also take care of doing an unbuffered read from encrypted content, with the decryption being done by the library. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit e2e2e83924b1fe4c28bf5617db90e893755e9cbd Author: David Howells Date: Fri Sep 29 20:11:31 2023 +0100 netfs: Allocate multipage folios in the writepath Allocate a multipage folio when copying data into the pagecache if possible if there's sufficient data to warrant it. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 7f84a7b9892d1c9429a6f5d6f67916c61b3fc183 Author: David Howells Date: Mon Oct 2 12:51:19 2023 +0100 netfs: Make netfs_read_folio() handle streaming-write pages netfs_read_folio() needs to handle partially-valid pages that are marked dirty, but not uptodate in the event that someone tries to read a page was used to cache data by a streaming write. In such a case, make netfs_read_folio() set up a bvec iterator that points to the parts of the folio that need filling and to a sink page for the data that should be discarded and use that instead of i_pages as the iterator to be written to. This requires netfs_rreq_unlock_folios() to convert the page into a normal dirty uptodate page, getting rid of the partial write record and bumping the group pointer over to folio->private. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit c38f4e96e605f17990e871214e6ea1496bc4e65f Author: David Howells Date: Thu Jun 17 13:09:21 2021 +0100 netfs: Provide func to copy data to pagecache for buffered write Provide a netfs write helper, netfs_perform_write() to buffer data to be written in the pagecache and mark the modified folios dirty. It will perform "streaming writes" for folios that aren't currently resident, if possible, storing data in partially modified folios that are marked dirty, but not uptodate. It will also tag pages as belonging to fs-specific write groups if so directed by the filesystem. This is derived from generic_perform_write(), but doesn't use ->write_begin() and ->write_end(), having that logic rolled in instead. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 0e0f2dfe880fb19e4b15a7ca468623eb0b4ba586 Author: David Howells Date: Tue Jun 29 22:31:48 2021 +0100 netfs: Dispatch write requests to process a writeback slice Dispatch one or more write reqeusts to process a writeback slice, where a slice is tailored more to logical block divisions within the file (such as crypto blocks, an object layout or cache granules) than the protocol RPC maximum capacity. The dispatch doesn't happen until throttling allows, at which point the entire writeback slice is processed and queued. A slice may be written to multiple destinations (one or more servers and the local cache) and the writes to each destination might be split up along different lines. The writeback slice holds the required folios pinned. An iov_iter is provided in netfs_write_request that describes the buffer to be used. This may be part of the pagecache, may have auxiliary padding pages attached or may be a bounce buffer resulting from crypto or compression. Consequently, the filesystem must not twiddle the folio markings directly. The following API is available to the filesystem: (1) The ->create_write_requests() method is called to ask the filesystem to create the requests it needs. This is passed the writeback slice to be processed. (2) The filesystem should then call netfs_create_write_request() to create the requests it needs. (3) Once a request is initialised, netfs_queue_write_request() can be called to dispatch it asynchronously, if not completed immediately. (4) netfs_write_request_completed() should be called to note the completion of a request. (5) netfs_get_write_request() and netfs_put_write_request() are provided to refcount a request. These take constants from the netfs_wreq_trace enum for logging into ftrace. (6) The ->free_write_request is method is called to ask the filesystem to clean up a request. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 9ebff83e648148b9ece97d4e4890dd84ca54d6ce Author: David Howells Date: Fri Sep 29 17:28:25 2023 +0100 netfs: Prep to use folio->private for write grouping and streaming write Prepare to use folio->private to hold information write grouping and streaming write. These are implemented in the same commit as they both make use of folio->private and will be both checked at the same time in several places. "Write grouping" involves ordering the writeback of groups of writes, such as is needed for ceph snaps. A group is represented by a filesystem-supplied object which must contain a netfs_group struct. This contains just a refcount and a pointer to a destructor. "Streaming write" is the storage of data in folios that are marked dirty, but not uptodate, to avoid unnecessary reads of data. This is represented by a netfs_folio struct. This contains the offset and length of the modified region plus the otherwise displaced write grouping pointer. The way folio->private is multiplexed is: (1) If private is NULL then neither is in operation on a dirty folio. (2) If private is set, with bit 0 clear, then this points to a group. (3) If private is set, with bit 0 set, then this points to a netfs_folio struct (with bit 0 AND'ed out). Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 4fcccc38ebbdcff74494701c50a8e2fe4689837e Author: David Howells Date: Wed Oct 4 16:15:48 2023 +0100 netfs: Make the refcounting of netfs_begin_read() easier to use Make the refcounting of netfs_begin_read() easier to use by not eating the caller's ref on the netfs_io_request it's given. This makes it easier to use when we need to look in the request struct after. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 6ba22d8d1521f35ca1343e64f69d7857f0340e5e Author: David Howells Date: Fri Sep 29 14:35:17 2023 +0100 netfs: Make netfs_put_request() handle a NULL pointer Make netfs_put_request() just return if given a NULL request pointer. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit c6dc54dd91bbf597942b4975b8adec660a16827d Author: David Howells Date: Fri Feb 25 12:27:53 2022 +0000 netfs: Add a hook to allow tell the netfs to update its i_size Add a hook for netfslib's write helpers to call to tell the network filesystem that it should update its i_size. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 16af134ca4b7051b1587108f2066ec90ae029f74 Author: David Howells Date: Wed Feb 9 19:52:13 2022 +0000 netfs: Extend the netfs_io_*request structs to handle writes Modify the netfs_io_request struct to act as a point around which writes can be coordinated. It represents and pins a range of pages that need writing and a list of regions of dirty data in that range of pages. If RMW is required, the original data can be downloaded into the bounce buffer, decrypted if necessary, the modifications made, then the modified data can be reencrypted/recompressed and sent back to the server. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 768ddb1eacf5dd997ecf393e7bab9796bad047e0 Author: David Howells Date: Fri May 27 13:45:28 2022 +0100 netfs: Limit subrequest by size or number of segments Limit a subrequest to a maximum size and/or a maximum number of contiguous physical regions. This permits, for instance, an subreq's iterator to be limited to the number of DMA'able segments that a large RDMA request can handle. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit cae932d3aee55035a54415dcea8e7ecf2ec469b5 Author: David Howells Date: Fri Sep 22 14:49:47 2023 +0100 netfs: Add func to calculate pagecount/size-limited span of an iterator Add a function to work out how much of an ITER_BVEC or ITER_XARRAY iterator we can use in a pagecount-limited and size-limited span. This will be used, for example, to limit the number of segments in a subrequest to the maximum number of elements that an RDMA transfer can handle. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 7d828a06634799aba0fa392913c7fe2953eb64a6 Author: David Howells Date: Fri Sep 22 13:25:22 2023 +0100 netfs: Provide tools to create a buffer in an xarray Provide tools to create a buffer in an xarray, with a function to add new folios with a mark. This will be used to create bounce buffer and can be used more easily to create a list of folios the span of which would require more than a page's worth of bio_vec structs. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 21d706d5cf570917594b21edee81893bdce09ab8 Author: David Howells Date: Fri Jul 9 08:41:17 2021 +0100 netfs: Add support for DIO buffering Add a bvec array pointer and an iterator to netfs_io_request for either holding a copy of a DIO iterator or a list of all the bits of buffer pointed to by a DIO iterator. There are two problems: Firstly, if an iovec-class iov_iter is passed to ->read_iter() or ->write_iter(), this cannot be passed directly to kernel_sendmsg() or kernel_recvmsg() as that may cause locking recursion if a fault is generated, so we need to keep track of the pages involved separately. Secondly, if the I/O is asynchronous, we must copy the iov_iter describing the buffer before returning to the caller as it may be immediately deallocated. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 810bad6e055cdda9a72ff15f59fe497f5ae81606 Author: Tanzir Hasan Date: Tue Dec 19 22:10:52 2023 +0000 platform/x86: hp-bioscfg: Removed needless asm-generic asm-generic/posix-types.h is obtained through bioscfg.h so there is no need to include it. It is also an asm-generic file which should be avoided if possible. Suggest-by: Al Viro Signed-off-by: Tanzir Hasan Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Link: https://lore.kernel.org/r/20231219-hp-password-v1-1-052fe7b6b7f1@google.com Signed-off-by: Hans de Goede commit 3748dfdae2a6bedc64ec7d2b17c9a58dc01c2700 Author: Rajvi Jingar Date: Mon Dec 18 20:22:16 2023 -0800 platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver Add Lunar Lake M support in intel_pmc_core driver Signed-off-by: Rajvi Jingar Link: https://lore.kernel.org/r/20231219042216.2592029-8-rajvi.jingar@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 83f168a1a4375c653d6d2383fd6ce5b404d031da Author: Rajvi Jingar Date: Mon Dec 18 20:22:15 2023 -0800 platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver Add Arrow Lake S support in intel_pmc_core driver Signed-off-by: Rajvi Jingar Link: https://lore.kernel.org/r/20231219042216.2592029-7-rajvi.jingar@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 1cff7243334f851b7dddf450abdaa6223a7a28e3 Author: Chunyan Zhang Date: Thu Dec 21 17:28:24 2023 +0800 arm64: dts: sprd: Change UMS512 idle-state nodename to match bindings Fix below dtbs_check warning: idle-states: 'core-pd' does not match any of the regexes: '^(cpu|cluster)-', 'pinctrl-[0-9]+' Link: https://lore.kernel.org/r/20231221092824.1169453-3-chunyan.zhang@unisoc.com Signed-off-by: Chunyan Zhang commit 829e3e70fe72edc084fbfc4964669594ebe427ce Author: Chunyan Zhang Date: Thu Dec 21 17:28:23 2023 +0800 arm64: dts: sprd: Add clock reference for pll2 on UMS512 Fix below dtbs_check warning: 'clocks' is a dependency of 'clock-names' Link: https://lore.kernel.org/r/20231221092824.1169453-2-chunyan.zhang@unisoc.com Signed-off-by: Chunyan Zhang commit 8358491a6cffd4ea4a6951aef12386c4b8b838b3 Author: Chunyan Zhang Date: Thu Dec 21 17:28:22 2023 +0800 arm64: dts: sprd: Removed unused clock references from etm nodes Remove these unused clock references to fix dtbs_check warnings: etm@3f740000: clocks: [[11], [35, 34], [36, 8]] is too long etm@3f740000: clock-names:1: 'atclk' was expected etm@3f740000: clock-names: ['apb_pclk', 'clk_cs', 'cs_src'] is too long Link: https://lore.kernel.org/r/20231221092824.1169453-1-chunyan.zhang@unisoc.com Signed-off-by: Chunyan Zhang commit bb8551c19da095931218800ed790d12d12d73cb8 Author: Chunyan Zhang Date: Mon Dec 18 18:02:34 2023 +0800 arm64: dts: sprd: Add support for Unisoc's UMS9620 Add basic support for Unisoc's UMS9620, with this patch, the board ums9620-2h10 can run into console. Link: https://lore.kernel.org/r/20231218100234.1102916-4-chunyan.zhang@unisoc.com Signed-off-by: Chunyan Zhang commit 07bc2433a944f767e49b373f6cdfe6b0eac801f6 Author: Chunyan Zhang Date: Mon Dec 18 18:02:33 2023 +0800 dt-bindings: arm: Add compatible strings for Unisoc's UMS9620 Added bindings for Unisoc's UMS9620-2H10 board and UMS9620 SoC. Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231218100234.1102916-3-chunyan.zhang@unisoc.com Signed-off-by: Chunyan Zhang commit 2da4f4a7b003441b80f0f12d8a216590f652a40f Author: Cixi Geng Date: Wed Jul 12 00:23:46 2023 +0800 arm64: dts: sprd: fix the cpu node for UMS512 The UMS512 Socs have 8 cores contains 6 a55 and 2 a75. modify the cpu nodes to correct information. Fixes: 2b4881839a39 ("arm64: dts: sprd: Add support for Unisoc's UMS512") Cc: stable@vger.kernel.org Signed-off-by: Cixi Geng Link: https://lore.kernel.org/r/20230711162346.5978-1-cixi.geng@linux.dev Signed-off-by: Chunyan Zhang commit 5a602de99797bddc9dd7f73592281a507196f69d Author: Íñigo Huguet Date: Thu Jun 1 09:53:33 2023 +0200 Add .editorconfig file for basic formatting EditorConfig is a specification to define the most basic code formatting stuff, and it's supported by many editors and IDEs, either directly or via plugins, including VSCode/VSCodium, Vim, emacs and more. It allows to define formatting style related to indentation, charset, end of lines and trailing whitespaces. It also allows to apply different formats for different files based on wildcards, so for example it is possible to apply different configs to *.{c,h}, *.py and *.rs. In linux project, defining a .editorconfig might help to those people that work on different projects with different indentation styles, so they cannot define a global style. Now they will directly see the correct indentation on every fresh clone of the project. See https://editorconfig.org Co-developed-by: Danny Lin Signed-off-by: Danny Lin Signed-off-by: Íñigo Huguet Acked-by: Mickaël Salaün Reviewed-by: Vincent Mailhol Tested-by: Vincent Mailhol Signed-off-by: Masahiro Yamada commit ac14947c77a36270d5cb1ff07afffbf221ac8af1 Author: Markus Schneider-Pargmann Date: Tue Dec 5 11:45:59 2023 +0100 kconfig: Use KCONFIG_CONFIG instead of .config When using a custom location for kernel config files this merge config command fails as it doesn't use the configuration set with KCONFIG_CONFIG. Signed-off-by: Markus Schneider-Pargmann Signed-off-by: Masahiro Yamada commit 407868deb2a344e9baa7909e1b13aec35c7217b2 Author: Masahiro Yamada Date: Sun Dec 3 19:25:28 2023 +0900 kconfig: remove redundant NULL pointer check before free() Passing NULL to free() is allowed and is a no-op. Remove redundant NULL pointer checks. Signed-off-by: Masahiro Yamada commit 9ad86d747c46f2bdc097c908481647fcdda1d035 Author: Masahiro Yamada Date: Sun Dec 3 19:25:27 2023 +0900 kconfig: remove unreachable printf() Remove the unreachable code detected by clang. $ make HOSTCC=clang HOSTCFLAGS=-Wunreachable-code defconfig [ snip ] scripts/kconfig/expr.c:1134:2: warning: code will never be executed [-Wunreachable-code] printf("[%dgt%d?]", t1, t2); ^~~~~~ 1 warning generated. Signed-off-by: Masahiro Yamada commit 405d2cb209b5836910b5dac01cf97fcbd186c0af Author: Masahiro Yamada Date: Sun Dec 3 19:25:26 2023 +0900 kconfig: add include guard to lkc_proto.h Signed-off-by: Masahiro Yamada commit 092e39d1456bda5c3d7dab0aa72a24e4b0b4f7a5 Author: Masahiro Yamada Date: Sun Dec 3 19:25:25 2023 +0900 kconfig: squash menu_has_help() and menu_get_help() menu_has_help() and menu_get_help() functions are only used within menu_get_ext_help(). Squash them into menu_get_ext_help(). It revealed the if-conditional in menu_get_help() was unneeded, as menu_has_help() has already checked that menu->help is not NULL. Signed-off-by: Masahiro Yamada commit ab7a781fd6f889d8514817622afc3ae514c3caf1 Author: Bryan O'Donoghue Date: Sat Dec 23 02:34:21 2023 +0000 OPP: Fix _set_required_opps when opp is NULL _set_required_opps can be called with opp NULL in _disable_opp_table(). commit e37440e7e2c2 ("OPP: Call dev_pm_opp_set_opp() for required OPPs") requires the opp pointer to be non-NULL to function. [ 81.253439] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000048 [ 81.438407] Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT) [ 81.445296] Workqueue: pm pm_runtime_work [ 81.449446] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 81.456609] pc : _set_required_opps+0x178/0x28c [ 81.461288] lr : _set_required_opps+0x178/0x28c [ 81.465962] sp : ffff80008078bb00 [ 81.469375] x29: ffff80008078bb00 x28: ffffd1cd71bfe308 x27: 0000000000000000 [ 81.476730] x26: ffffd1cd70ebc578 x25: ffffd1cd70a08710 x24: 00000000ffffffff [ 81.484083] x23: 00000000ffffffff x22: 0000000000000000 x21: ffff56ff892b3c48 [ 81.491435] x20: ffff56f1071c10 x19: 0000000000000000 x18: ffffffffffffffff [ 81.498788] x17: 2030207865646e69 x16: 2030303131207370 x15: 706f5f6465726975 [ 81.506141] x14: 7165725f7465735f x13: ffff5700f5c00000 x12: 00000000000008ac [ 81.513495] x11: 00000000000002e4 x10: ffff5700f6700000 x9 : ffff5700f5c00000 [ 81.520848] x8 : 00000000fffdffff x7 : ffff5700f6700000 x6 : 80000000fffe0000 [ 81.528200] x5 : ffff5700fef40d08 x4 : 0000000000000000 x3 : 0000000000000000 [ 81.535551] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff56ff81298f80 [ 81.542904] Call trace: [ 81.545437] _set_required_opps+0x178/0x28c [ 81.549754] _set_opp+0x3fc/0x5c0 [ 81.553181] dev_pm_opp_set_rate+0x90/0x26c [ 81.557498] core_power_v4+0x44/0x15c [venus_core] [ 81.562509] venus_runtime_suspend+0x40/0xd0 [venus_core] [ 81.568135] pm_generic_runtime_suspend+0x2c/0x44 [ 81.572983] __rpm_callback+0x48/0x1d8 [ 81.576852] rpm_callback+0x6c/0x78 [ 81.580453] rpm_suspend+0x10c/0x570 [ 81.584143] pm_runtime_work+0xc4/0xc8 [ 81.588011] process_one_work+0x138/0x244 [ 81.592153] worker_thread+0x320/0x438 [ 81.596021] kthread+0x110/0x114 [ 81.599355] ret_from_fork+0x10/0x20 [ 81.603052] Code: f10000ff fa5410e0 54fffbe1 97f05ae8 (f94026c5) [ 81.609317] ---[ end trace 0000000000000000 ]--- Fix it. Fixes: e37440e7e2c2 ("OPP: Call dev_pm_opp_set_opp() for required OPPs") Signed-off-by: Bryan O'Donoghue [ Viresh: Implemented the fix differently ] Signed-off-by: Viresh Kumar Reviewed-by: Bryan O'Donoghue Tested-by: Bryan O'Donoghue commit 2a0e85719892a1d63f8f287563e2c1778a77879e Author: Josef Bacik Date: Wed Dec 27 11:14:29 2023 -0600 fs: move fscrypt keyring destruction to after ->put_super btrfs has a variety of asynchronous things we do with inodes that can potentially last until ->put_super, when we shut everything down and clean up all of our async work. Due to this we need to move fscrypt_destroy_keyring() to after ->put_super, otherwise we get warnings about still having active references on the master key. Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Reviewed-by: Neal Gompa Link: https://lore.kernel.org/r/20231227171429.9223-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 275dca4630c165edea9abe27113766bc1173f878 Author: Eric Biggers Date: Wed Dec 27 11:14:28 2023 -0600 f2fs: move release of block devices to after kill_block_super() Call destroy_device_list() and free the f2fs_sb_info from kill_f2fs_super(), after the call to kill_block_super(). This is necessary to order it after the call to fscrypt_destroy_keyring() once generic_shutdown_super() starts calling fscrypt_destroy_keyring() just after calling ->put_super. This is because fscrypt_destroy_keyring() may call into f2fs_get_devices() via the fscrypt_operations. Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20231227171429.9223-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 09aeaabebdafbcf4afd1c481beaff37ecbc6b023 Author: Uwe Kleine-König Date: Wed Dec 27 17:26:27 2023 +0100 firmware: coreboot: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/d323e4f24bfab3ac1480933deb51e7c5cb025b09.1703693980.git.u.kleine-koenig@pengutronix.de Signed-off-by: Tzung-Bi Shih commit c271fcd9095f066e0e7104e6d8919e2cf26f0899 Author: Christophe JAILLET Date: Sun Dec 10 18:51:50 2023 +0100 vdpa: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Message-Id: Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit dff4fa0e57856045359440d05af9e9b7f7048f52 Author: David Stevens Date: Fri Dec 8 16:07:54 2023 +0900 virtio: Add support for no-reset virtio PCI PM If a virtio_pci_device supports native PCI power management and has the No_Soft_Reset bit set, then skip resetting and reinitializing the device when suspending and restoring the device. This allows system-wide low power states like s2idle to be used in systems with stateful virtio devices that can't simply be re-initialized (e.g. virtio-fs). Signed-off-by: David Stevens Message-Id: <20231208070754.3132339-1-stevensd@chromium.org> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit d2c4f1928a3f7f4a1f28a0cfc022e8a145ce6903 Author: Xuan Zhuo Date: Tue Dec 26 17:43:33 2023 +0800 virtio_net: fix missing dma unmap for resize For rq, we have three cases getting buffers from virtio core: 1. virtqueue_get_buf{,_ctx} 2. virtqueue_detach_unused_buf 3. callback for virtqueue_resize But in commit 295525e29a5b("virtio_net: merge dma operations when filling mergeable buffers"), I missed the dma unmap for the #3 case. That will leak some memory, because I did not release the pages referred by the unused buffers. If we do such script, we will make the system OOM. while true do ethtool -G ens4 rx 128 ethtool -G ens4 rx 256 free -m done Fixes: 295525e29a5b ("virtio_net: merge dma operations when filling mergeable buffers") Signed-off-by: Xuan Zhuo Message-Id: <20231226094333.47740-1-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin commit ab78ffe1ff7d17102972348bb9b1a16ec2696a2b Author: Pasha Tatashin Date: Tue Dec 26 18:28:27 2023 +0000 vhost-vdpa: account iommu allocations iommu allocations should be accounted in order to allow admins to monitor and limit the amount of iommu memory. Signed-off-by: Pasha Tatashin Acked-by: Michael S. Tsirkin Message-Id: <20231226182827.294158-1-pasha.tatashin@soleen.com> Signed-off-by: Michael S. Tsirkin Acked-by: David Rientjes commit d6b9f4e6f7fb589d8024a31cc4883d15d0c8def4 Author: Christoph Hellwig Date: Wed Dec 27 09:23:05 2023 +0000 block: rename and document BLK_DEF_MAX_SECTORS Give BLK_DEF_MAX_SECTORS a _CAP postfix and document what it is used for. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231227092305.279567-5-hch@lst.de Signed-off-by: Jens Axboe commit 3d77976c3a8586ab1fb6845e2061588b7d04934f Author: Christoph Hellwig Date: Wed Dec 27 09:23:04 2023 +0000 loop: don't abuse BLK_DEF_MAX_SECTORS BLK_DEF_MAX_SECTORS despite the confusing name is the default cap for the max_sectors limits. Don't use it to initialize max_hw_setors, which is a hardware / driver capacility. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231227092305.279567-4-hch@lst.de Signed-off-by: Jens Axboe commit 3888b2ee6262616dbcbf902bc171963fe345da87 Author: Christoph Hellwig Date: Wed Dec 27 09:23:03 2023 +0000 aoe: don't abuse BLK_DEF_MAX_SECTORS BLK_DEF_MAX_SECTORS despite the confusing name is the default cap for the max_sectors limits. Don't use it to initialize max_hw_setors, which is a hardware / driver capacility. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231227092305.279567-3-hch@lst.de Signed-off-by: Jens Axboe commit 9a9525de865410047fa962867b4fcd33943b206f Author: Christoph Hellwig Date: Wed Dec 27 09:23:02 2023 +0000 null_blk: don't cap max_hw_sectors to BLK_DEF_MAX_SECTORS null_blk has some rather odd capping of the max_hw_sectors value to BLK_DEF_MAX_SECTORS, which doesn't make sense - max_hw_sector is the hardware limit, and BLK_DEF_MAX_SECTORS despite the confusing name is the default cap for the max_sectors field used for normal file system I/O. Remove all the capping, and simply leave it to the block layer or user to take up or not all of that for file system I/O. Fixes: ea17fd354ca8 ("null_blk: Allow controlling max_hw_sectors limit") Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231227092305.279567-2-hch@lst.de Signed-off-by: Jens Axboe commit 34c7db44b4edccda315edcf02b9669aa173e090b Author: Christoph Hellwig Date: Wed Dec 27 08:20:20 2023 +0000 loop: don't update discard limits from loop_set_status loop_set_status doesn't change anything relevant to the discard and write_zeroes setting, so don't bother calling loop_config_discard. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231227082020.249427-1-hch@lst.de Signed-off-by: Jens Axboe commit 1e2f2d31997a9496f99e2b43255d6a48b06fbcc2 Author: Kent Overstreet Date: Fri Dec 15 15:51:54 2023 -0500 Kill sched.h dependency on rcupdate.h by moving cond_resched_rcu() to rcupdate_wait.h, we can kill another big sched.h dependency. Signed-off-by: Kent Overstreet commit e717ceb529653891f2283e2fd783edbb231e3562 Author: Kent Overstreet Date: Fri Dec 15 17:08:47 2023 -0500 kill unnecessary thread_info.h include Signed-off-by: Kent Overstreet commit 30094208cdc68cea9d814f8df94da7d0902ac6cd Author: Kent Overstreet Date: Fri Dec 15 17:02:03 2023 -0500 Kill unnecessary kernel.h include More trimming down unnecessary includes. Signed-off-by: Kent Overstreet commit 2b010a69350f2c995f40585fb801904874c85dd1 Author: Kent Overstreet Date: Fri Dec 15 16:04:03 2023 -0500 preempt.h: Kill dependency on list.h We really only need types.h, list.h is big. Signed-off-by: Kent Overstreet commit 932562a6045ed613d45bd100db37114273c22077 Author: Kent Overstreet Date: Fri Dec 15 15:58:20 2023 -0500 rseq: Split out rseq.h from sched.h We're trying to get sched.h down to more or less just types only, not code - rseq can live in its own header. This helps us kill the dependency on preempt.h in sched.h. Signed-off-by: Kent Overstreet commit c968b99f868dd82ebcafec9788ce18334da177b6 Author: Randy Dunlap Date: Thu Dec 21 20:58:25 2023 -0800 LoongArch: signal.c: add header file to fix build error loongarch's signal.c uses rseq_signal_deliver() so it should pull in the appropriate header to prevent a build error: ../arch/loongarch/kernel/signal.c: In function 'handle_signal': ../arch/loongarch/kernel/signal.c:1034:9: error: implicit declaration of function 'rseq_signal_deliver' [-Werror=implicit-function-declaration] 1034 | rseq_signal_deliver(ksig, regs); | ^~~~~~~~~~~~~~~~~~~ Fixes: b74baf4ad05b ("LoongArch: Add signal handling support") Signed-off-by: Randy Dunlap Cc: Huacai Chen Cc: WANG Xuerui Cc: loongarch@lists.linux.dev Cc: Kent Overstreet Signed-off-by: Kent Overstreet commit 513246a34b8dc5d5280a40c1cbef112594220ba6 Author: Bartosz Golaszewski Date: Thu Dec 21 10:15:47 2023 +0100 gpio: sysfs: drop tabs from local variable declarations Older code has an annoying habit of putting tabs between the type and the name of the variable. This doesn't really add to readability and newer code doesn't do it so make the entire file consistent. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko commit 0338f6a6fb659f083eca7dd5967bb668d14707f8 Author: Bartosz Golaszewski Date: Thu Dec 21 10:15:46 2023 +0100 gpiolib: drop tabs from local variable declarations Older code has an annoying habit of putting tabs between the type and the name of the variable. This doesn't really add to readability and newer code doesn't do it so make the entire file consistent. While at it: convert 'unsigned' to 'unsigned int'. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 5d5dfc50e5689d5b09de4a323f84c28a6700d156 Author: Bartosz Golaszewski Date: Tue Dec 19 21:11:02 2023 +0100 gpiolib: remove extra_checks extra_checks is only used in a few places. It also depends on a non-standard DEBUG define one needs to add to the source file. The overhead of removing it should be minimal (we already use pure might_sleep() in the code anyway) so drop it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit 7dd1871e5049bbd40ee78ac94b1678ba5caf2486 Author: Bartosz Golaszewski Date: Thu Dec 21 19:57:02 2023 +0100 gpio: tps65219: don't use CONFIG_DEBUG_GPIO CONFIG_DEBUG_GPIO should only be used to enable debug log messages and for core GPIOLIB debugging. Don't use it to control the execution of potentially buggy code. Just put it under an always-false #if. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij commit 20bddcb40b2b6d6028fb4224fab4aadb7d7b2674 Author: Kent Gibson Date: Thu Dec 21 09:20:40 2023 +0800 gpiolib: cdev: replace locking wrappers for gpio_device with guards Replace the wrapping functions that inhibit removal of the gpio chip with equivalent guards. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 32d8e3b6453d0ebd4eb8c31c593f432f6fdad4dd Author: Kent Gibson Date: Thu Dec 21 09:20:39 2023 +0800 gpiolib: cdev: replace locking wrappers for config_mutex with guards After the adoption of guard(), the locking wrappers that hold the config_mutex for linereq_set_values() and linereq_set_config() no longer add value, so combine them into the functions they wrap. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit b718fbfea9df4f715ddd4c61a671226fb11bb232 Author: Kent Gibson Date: Thu Dec 21 09:20:38 2023 +0800 gpiolib: cdev: allocate linereq using kvzalloc() The size of struct linereq may exceed a page, so allocate space for it using kvzalloc() instead of kzalloc() to handle the case where memory is heavily fragmented and kzalloc() cannot find a sufficient contiguous region. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit ede7511e7c22c9542a699ddff9f32de74e0bb972 Author: Kent Gibson Date: Thu Dec 21 09:20:37 2023 +0800 gpiolib: cdev: include overflow.h struct_size() is used to calculate struct linereq size, so explicitly include overflow.h. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 4ccdaba5ab560862f89d1d971fbcc2ef424e1867 Merge: 1cdc605c7d70a 861deac3b092f Author: Bartosz Golaszewski Date: Wed Dec 27 15:41:04 2023 +0100 Merge tag 'v6.7-rc7' into gpio/for-next Linux 6.7-rc7 commit c0c4579d79d0df841e825c68df450909a0032faf Author: Arnd Bergmann Date: Tue Dec 12 22:46:07 2023 +0100 clocksource/drivers/ep93xx: Fix error handling during probe When the interrupt property fails to be parsed, ep93xx_timer_of_init() return code ends up uninitialized: drivers/clocksource/timer-ep93xx.c:160:6: error: variable 'ret' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] if (irq < 0) { ^~~~~~~ drivers/clocksource/timer-ep93xx.c:188:9: note: uninitialized use occurs here return ret; ^~~ drivers/clocksource/timer-ep93xx.c:160:2: note: remove the 'if' if its condition is always false if (irq < 0) { ^~~~~~~~~~~~~~ Simplify this portion to use the normal construct of just checking whether a valid interrupt was returned. Note that irq_of_parse_and_map() never returns a negative value and no other callers check for that either. Fixes: c28ca80ba3b5 ("clocksource: ep93xx: Add driver for Cirrus Logic EP93xx") Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231212214616.193098-1-arnd@kernel.org commit 0515c73467fd550249ef83062e1d03d99c718b4f Author: Randy Dunlap Date: Tue Dec 5 15:04:48 2023 -0800 clocksource/drivers/cadence-ttc: Fix some kernel-doc warnings Fix some function kernel-doc warnings to placate scripts/kernel-doc. timer-cadence-ttc.c:79: warning: Function parameter or member 'clk_rate_change_nb' not described in 'ttc_timer' timer-cadence-ttc.c:158: warning: Function parameter or member 'cs' not described in '__ttc_clocksource_read' timer-cadence-ttc.c:194: warning: expecting prototype for ttc_set_{shutdown|oneshot|periodic}(). Prototype was for ttc_shutdown() instead timer-cadence-ttc.c:196: warning: No description found for return value of 'ttc_shutdown' timer-cadence-ttc.c:212: warning: No description found for return value of 'ttc_set_periodic' Signed-off-by: Randy Dunlap Cc: Michal Simek Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Acked-by: Michal Simek Tested-by: Michal Simek Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231205230448.772-1-rdunlap@infradead.org commit b99a212a7697c542b460adaa15d4a98abf8223f0 Author: Tony Lindgren Date: Tue Nov 14 09:29:30 2023 +0200 clocksource/drivers/timer-ti-dm: Fix make W=n kerneldoc warnings Kernel test robot reports of kerneldoc related warnings that happen with make W=n for "parameter or member not described". These were caused by changes to function parameter names with earlier commits where the kerneldoc parts were not updated. Fixes: 49cd16bb573e ("clocksource/drivers/timer-ti-dm: Simplify register writes with dmtimer_write()") Fixes: a6e543f61531 ("clocksource/drivers/timer-ti-dm: Move struct omap_dm_timer fields to driver") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311040403.DzIiBuwU-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202311040606.XL5OcR9O-lkp@intel.com/ Signed-off-by: Tony Lindgren Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231114072930.40615-1-tony@atomide.com commit 6a902b118e7f30dbf0e6248f7b0f97e12c0939c3 Author: Joshua Yeong Date: Thu Nov 16 18:53:12 2023 +0800 clocksource/timer-riscv: Add riscv_clock_shutdown callback Add clocksource detach/shutdown callback to disable RISC-V timer interrupt when switching out riscv timer as clock source Signed-off-by: Joshua Yeong Reviewed-by: Anup Patel Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231116105312.4800-1-joshua.yeong@starfivetech.com commit e0cf60151e6317c654c42ba0e8b1fb6ff477489a Author: Sia Jee Heng Date: Fri Dec 1 20:14:07 2023 +0800 dt-bindings: timer: Add StarFive JH8100 clint Add compatible string for the StarFive JH8100 clint. Signed-off-by: Sia Jee Heng Reviewed-by: Ley Foon Tan Acked-by: Conor Dooley Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20231201121410.95298-4-jeeheng.sia@starfivetech.com commit b91cf01cf3e63a627b3b65f4284dcf9a4deb80f9 Author: Inochi Amaoto Date: Mon Dec 4 17:51:08 2023 +0800 dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp regs The timer registers of aclint don't follow the clint layout and can be mapped on any different offset. As sg2042 uses separated timer and mswi for its clint, it should follow the aclint spec and have separated registers. The previous patch introduced a new type of T-HEAD aclint timer which has clint timer layout. Although it has the clint timer layout, it should follow the aclint spec and uses the separated mtime and mtimecmp regs. So a ABI change is needed to make the timer fit the aclint spec. To make T-HEAD aclint timer more closer to the aclint spec, use regs-names to represent the mtimecmp register, which can avoid hack for unsupport mtime register of T-HEAD aclint timer. Also, as T-HEAD aclint only supports mtimecmp, it is unnecessary to implement the whole aclint spec. To make this binding T-HEAD specific, only add reg-name for existed register. For details, see the discussion in the last link. Signed-off-by: Inochi Amaoto Fixes: 4734449f7311 ("dt-bindings: timer: Add Sophgo sg2042 CLINT timer") Link: https://lists.infradead.org/pipermail/opensbi/2023-October/005693.html Link: https://github.com/riscv/riscv-aclint/blob/main/riscv-aclint.adoc Link: https://lore.kernel.org/all/IA1PR20MB4953F9D77FFC76A9D236922DBBB6A@IA1PR20MB4953.namprd20.prod.outlook.com/ Acked-by: Guo Ren Acked-by: Conor Dooley Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/IA1PR20MB49531ED1BCC00D6B265C2D10BB86A@IA1PR20MB4953.namprd20.prod.outlook.com commit 3fb65f6bc7dc19ce32efd4ea26cd0f59ac328ad5 Author: Kevin Hao Date: Wed Dec 20 07:37:57 2023 +0800 net: pktgen: Use wait_event_freezable_timeout() for freezable kthread A freezable kernel thread can enter frozen state during freezing by either calling try_to_freeze() or using wait_event_freezable() and its variants. So for the following snippet of code in a kernel thread loop: wait_event_interruptible_timeout(); try_to_freeze(); We can change it to a simple wait_event_freezable_timeout() and then eliminate a function call. Signed-off-by: Kevin Hao Signed-off-by: David S. Miller commit 2f7ccf1d8835975a92fae7704fa73cb2e49bc12f Merge: c2b2ee36250d9 dc1a00380aa6c Author: David S. Miller Date: Wed Dec 27 13:08:10 2023 +0000 Merge branch 'net-tja11xx-macsec-support' Radu Pirea says: ==================== Add MACsec support for TJA11XX C45 PHYs This is the MACsec support for TJA11XX PHYs. The MACsec block encrypts the ethernet frames on the fly and has no buffering. This operation will grow the frames by 32 bytes. If the frames are sent back to back, the MACsec block will not have enough room to insert the SecTAG and the ICV and the frames will be dropped. To mitigate this, the PHY can parse a specific ethertype with some padding bytes and replace them with the SecTAG and ICV. These padding bytes might be dummy or might contain information about TX SC that must be used to encrypt the frame. ==================== Signed-off-by: David S. Miller commit dc1a00380aa6cc24dc3709ee50a22d1e24cd3673 Author: Radu Pirea (NXP OSS) Date: Tue Dec 19 16:53:33 2023 +0200 net: phy: nxp-c45-tja11xx: implement mdo_insert_tx_tag Implement mdo_insert_tx_tag to insert the TLV header in the ethernet frame. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit 31a99fc06b0b454642997f9d2e87ff5d393816ca Author: Radu Pirea (NXP OSS) Date: Tue Dec 19 16:53:32 2023 +0200 net: phy: nxp-c45-tja11xx: add MACsec statistics Add MACsec statistics callbacks. The statistic registers must be set to 0 if the SC/SA is deleted to read relevant values next time when the SC/SA is used. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit a868b486cb886ef73c9b4f77b8103669c83a4515 Author: Radu Pirea (NXP OSS) Date: Tue Dec 19 16:53:31 2023 +0200 net: phy: nxp-c45-tja11xx: add MACsec support Add MACsec support. The MACsec block has four TX SCs and four RX SCs. The driver supports up to four SecY. Each SecY with one TX SC and one RX SC. The RX SCs can have two keys, key A and key B, written in hardware and enabled at the same time. The TX SCs can have two keys written in hardware, but only one can be active at a given time. On TX, the SC is selected using the MAC source address. Due of this selection mechanism, each offloaded netdev must have a unique MAC address. On RX, the SC is selected by SCI(found in SecTAG or calculated using MAC SA), or using RX SC 0 as implicit. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit a73d8779d61ad99b966c932a1715bd4d9006a9de Author: Radu Pirea (NXP OSS) Date: Tue Dec 19 16:53:30 2023 +0200 net: macsec: introduce mdo_insert_tx_tag Offloading MACsec in PHYs requires inserting the SecTAG and the ICV in the ethernet frame. This operation will increase the frame size with up to 32 bytes. If the frames are sent at line rate, the PHY will not have enough room to insert the SecTAG and the ICV. Some PHYs use a hardware buffer to store a number of ethernet frames and, if it fills up, a pause frame is sent to the MAC to control the flow. This HW implementation does not need any modification in the stack. Other PHYs might offer to use a specific ethertype with some padding bytes present in the ethernet frame. This ethertype and its associated bytes will be replaced by the SecTAG and ICV. mdo_insert_tx_tag allows the PHY drivers to add any specific tag in the skb. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit 25a00d0cd691562f43a0a4b008214405e76d067f Author: Radu Pirea (NXP OSS) Date: Tue Dec 19 16:53:29 2023 +0200 net: macsec: revert the MAC address if mdo_upd_secy fails Revert the MAC address if mdo_upd_secy fails. Offloaded MACsec device might be left in an inconsistent state. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit eb97b9bd38f93ab7cab0be2a36a7f6180c004ac2 Author: Radu Pirea (NXP OSS) Date: Tue Dec 19 16:53:28 2023 +0200 net: macsec: documentation for macsec_context and macsec_ops Add description for fields of struct macsec_context and struct macsec_ops. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit b1c036e835b67320316e20e562cc3b4daf8fa08b Author: Radu Pirea (NXP OSS) Date: Tue Dec 19 16:53:27 2023 +0200 net: macsec: move sci_to_cpu to macsec header Move sci_to_cpu to the MACsec header to use it in drivers. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit b34ab3527b9622ca4910df24ff5beed5aa66c6b5 Author: Radu Pirea (NXP OSS) Date: Tue Dec 19 16:53:26 2023 +0200 net: macsec: use skb_ensure_writable_head_tail to expand the skb Use skb_ensure_writable_head_tail to expand the skb if needed instead of reimplementing a similar operation. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit 90abde49ea85a8af9a56bbab8c419aefc77f919a Author: Radu Pirea (NXP OSS) Date: Tue Dec 19 16:53:25 2023 +0200 net: rename dsa_realloc_skb to skb_ensure_writable_head_tail Rename dsa_realloc_skb to skb_ensure_writable_head_tail and move it to skbuff.c to use it as helper. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit e345b87b0b0444d1c644b0ea15cfb50e88f10b55 Author: Andreas Gruenbacher Date: Tue Dec 19 16:49:26 2023 +0100 gfs2: Fix freeze consistency check in log_write_header Functions gfs2_freeze_super() and gfs2_thaw_super() are using the SDF_FROZEN flag to indicate when the filesystem is frozen, synchronized by sd_freeze_mutex. However, this doesn't prevent writes from happening between the point of calling thaw_super() and the point where the SDF_FROZEN flag is cleared, so the following assert can trigger in log_write_header(): gfs2_assert_withdraw(sdp, !test_bit(SDF_FROZEN, &sdp->sd_flags)); Fix that by checking for sb->s_writers.frozen != SB_FREEZE_COMPLETE in log_write_header() instead. To make sure that the filesystem-specific part of freezing happens before sb->s_writers.frozen is set to SB_FREEZE_COMPLETE, move that code from gfs2_freeze_locally() into gfs2_freeze_fs() and hook that up to the .freeze_fs operation. Signed-off-by: Andreas Gruenbacher commit 4e58543e7da4859c4ba61d15493e3522b6ad71fd Author: Andreas Gruenbacher Date: Mon Dec 25 20:07:46 2023 +0100 gfs2: Refcounting fix in gfs2_thaw_super It turns out that the .freeze_super and .thaw_super operations require the filesystem to manage the superblock refcount itself. We are using the freeze_super() and thaw_super() helpers to mostly take care of that for us, but this means that the superblock may no longer be around by when thaw_super() returns, and gfs2_thaw_super() will then access freed memory. Take an extra superblock reference in gfs2_thaw_super() to fix that. Signed-off-by: Andreas Gruenbacher commit 5a7a964689b78be5817f14409619fded6882821d Author: Andreas Gruenbacher Date: Mon Dec 25 20:00:20 2023 +0100 gfs2: Minor gfs2_{freeze,thaw}_super cleanup This minor cleanup to gfs2_freeze_super() and gfs2_thaw_super() prepares for the following refcounting fix. Signed-off-by: Andreas Gruenbacher commit b0a1fe4610de5761a66de0e43540fc3d59638402 Author: Jiri Kosina Date: Wed Dec 27 12:08:45 2023 +0100 HID: magicmouse: fix kerneldoc for struct magicmouse_sc Description for hdev, work and battery_timer of struct magicmouse_sc were missing. Fix that. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312261056.AmFPDIL5-lkp@intel.com/ Signed-off-by: Jiri Kosina commit ba367479c7ad0b870461024cd5ae7a1ea6e1e3db Author: Viresh Kumar Date: Tue Dec 19 11:32:39 2023 +0530 OPP: The level field is always of unsigned int type By mistake, dev_pm_opp_find_level_floor() used the level parameter as unsigned long instead of unsigned int. Fix it. Signed-off-by: Viresh Kumar commit c1f1f5bf413936a93fea0f920e9aafff3551ad56 Author: Eric Biggers Date: Tue Dec 26 22:51:58 2023 -0600 fscrypt: document that CephFS supports fscrypt now The help text for CONFIG_FS_ENCRYPTION and the fscrypt.rst documentation file both list the filesystems that support fscrypt. CephFS added support for fscrypt in v6.6, so add CephFS to the list. Link: https://lore.kernel.org/r/20231227045158.87276-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 0942155a48e4cfc2c83e514c86a3de8f78f6af02 Author: Mathias Krause Date: Wed Dec 20 14:35:05 2023 +0100 PCI: Remove unused 'node' member from struct pci_driver Remove the unused 'node' member. It got replaced by device_driver chaining more than 20 years ago in commit 4b4a837f2b57 ("PCI: start to use common fields of struct device_driver more...") of the history.git tree. Link: https://lore.kernel.org/r/20231220133505.8798-1-minipli@grsecurity.net Signed-off-by: Mathias Krause Signed-off-by: Bjorn Helgaas Acked-by: Kalle Valo commit c2b2ee36250d967c21890cb801e24af4b6a9eaa5 Author: Lin Ma Date: Thu Dec 21 00:34:51 2023 +0800 bridge: cfm: fix enum typo in br_cc_ccm_tx_parse It appears that there is a typo in the code where the nlattr array is being parsed with policy br_cfm_cc_ccm_tx_policy, but the instance is being accessed via IFLA_BRIDGE_CFM_CC_RDI_INSTANCE, which is associated with the policy br_cfm_cc_rdi_policy. This problem was introduced by commit 2be665c3940d ("bridge: cfm: Netlink SET configuration Interface."). Though it seems like a harmless typo since these two enum owns the exact same value (1 here), it is quite misleading hence fix it by using the correct enum IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE here. Signed-off-by: Lin Ma Reviewed-by: Simon Horman Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 1f62f58d509267bb8442e8a029f6ea8cc98b6ea0 Merge: 7961ef1fa10ec 122db5e3634b8 Author: David S. Miller Date: Tue Dec 26 22:33:22 2023 +0000 Merge branch 'mptcp-cleanups-ephemeral-port-sockopts' Matthieu Baerts says: ==================== mptcp: cleanup and support more ephemeral ports sockopts Patch 1 is a cleanup one: mptcp_is_tcpsk() helper was modifying sock_ops in some cases which is unexpected with that name. Patch 2 to 4 add support for two socket options: IP_LOCAL_PORT_RANGE and IP_BIND_ADDRESS_NO_PORT. The first one is a preparation patch, the second one adds the support while the last one modifies an existing selftest to validate the new features. ==================== Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 122db5e3634b85f6caeca19345e0adbdf79cb257 Author: Maxim Galaganov Date: Tue Dec 19 22:31:07 2023 +0100 selftests/net: add MPTCP coverage for IP_LOCAL_PORT_RANGE Since previous commit, MPTCP has support for IP_BIND_ADDRESS_NO_PORT and IP_LOCAL_PORT_RANGE sockopts. Add ip4_mptcp and ip6_mptcp fixture variants to ip_local_port_range selftest to provide selftest coverage for these sockopts. Acked-by: Mat Martineau Signed-off-by: Maxim Galaganov Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit c85636a2926424c70e13925db734eaca14f6367c Author: Maxim Galaganov Date: Tue Dec 19 22:31:06 2023 +0100 mptcp: sockopt: support IP_LOCAL_PORT_RANGE and IP_BIND_ADDRESS_NO_PORT Support for IP_BIND_ADDRESS_NO_PORT sockopt was introduced in [1]. Recently [2] allowed its value to be accessed without locking the socket. Support for (newer) IP_LOCAL_PORT_RANGE sockopt was introduced in [3]. In the same series a selftest was added in [4]. This selftest also covers the IP_BIND_ADDRESS_NO_PORT sockopt. This patch enables getsockopt()/setsockopt() on MPTCP sockets for these socket options, syncing set values to subflows in sync_socket_options(). Ephemeral port range is synced to subflows, enabling NAT usecase described in [3]. [1] commit 90c337da1524 ("inet: add IP_BIND_ADDRESS_NO_PORT to overcome bind(0) limitations") [2] commit ca571e2eb7eb ("inet: move inet->bind_address_no_port to inet->inet_flags") [3] commit 91d0b78c5177 ("inet: Add IP_LOCAL_PORT_RANGE socket option") [4] commit ae5439658cce ("selftests/net: Cover the IP_LOCAL_PORT_RANGE socket option") Signed-off-by: Maxim Galaganov Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 57d3117ca80f46d5c5af285ca75360eaf28df172 Author: Maxim Galaganov Date: Tue Dec 19 22:31:05 2023 +0100 mptcp: rename mptcp_setsockopt_sol_ip_set_transparent() Next patch extends this function so that it's not specific to IP_TRANSPARENT. Change function name to mptcp_setsockopt_sol_ip_set(). Reviewed-by: Mat Martineau Signed-off-by: Maxim Galaganov Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 8e2b8a9fa512709e6fee744dcd4e2a20ee7f5c56 Author: Davide Caratti Date: Tue Dec 19 22:31:04 2023 +0100 mptcp: don't overwrite sock_ops in mptcp_is_tcpsk() Eric Dumazet suggests: > The fact that mptcp_is_tcpsk() was able to write over sock->ops was a > bit strange to me. > mptcp_is_tcpsk() should answer a question, with a read-only argument. re-factor code to avoid overwriting sock_ops inside that function. Also, change the helper name to reflect the semantics and to disambiguate from its dual, sk_is_mptcp(). While at it, collapse mptcp_stream_accept() and mptcp_accept() into a single function, where fallback / non-fallback are separated into a single sk_is_mptcp() conditional. Link: https://github.com/multipath-tcp/mptcp_net-next/issues/432 Suggested-by: Eric Dumazet Signed-off-by: Davide Caratti Acked-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 7961ef1fa10ec35ad6923fb5751877116e4b035b Author: Christian Marangi Date: Tue Dec 19 21:21:24 2023 +0100 net: phy: at803x: better align function varibles to open parenthesis Better align function variables to open parenthesis as suggested by checkpatch script for qca808x function to make code cleaner. For cable_test_get_status function some additional rework was needed to handle too long functions. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 44a949ad07e0d892e6477491ec9a6c3209c21aaf Merge: b1dffcf0da221 42f39036cda80 Author: David S. Miller Date: Tue Dec 26 21:20:09 2023 +0000 Merge branch 'net-sched-tc-block-ports-tracking' Victor Nogueira says: ==================== net/sched: Introduce tc block ports tracking and use __context__ The "tc block" is a collection of netdevs/ports which allow qdiscs to share match-action block instances (as opposed to the traditional tc filter per netdev/port)[1]. Up to this point in the implementation, the block is unaware of its ports. This patch makes the tc block ports available to the datapath. For the datapath we provide a use case of the tc block in a mirred action in patch 3. For users can levarage mirred to do something like the following: $ tc qdisc add dev ens7 ingress_block 22 clsact $ tc qdisc add dev ens8 ingress_block 22 clsact $ tc qdisc add dev ens9 ingress_block 22 clsact $ tc filter add block 22 protocol ip pref 25 \ flower dst_ip 192.168.0.0/16 action mirred egress mirror blockid 22 In this case, if the packet arrives on ens8, it will be copied and sent to all ports in the block excluding ens8. Note that the packet is still in the pipeline at this point - meaning other actions could be added after the mirror because mirred copies/clones the skb. Example the following is valid: $ tc filter add block 22 protocol ip pref 25 flower dst_ip 192.168.0.0/16 \ action mirred egress mirror blockid 22 \ action vlan push id 123 \ action mirred egress redirect dev dummy0 redirect behavior always steals the packet from the pipeline and therefore the skb is no longer available for a subsequent action as illustrated above (in redirecting to dummy0). The behavior of redirecting to a tc block is therefore adapted to work in the same manner. So a setup as such: $ tc qdisc add dev ens7 ingress_block 22 $ tc qdisc add dev ens8 ingress_block 22 $ tc qdisc add dev ens9 ingress_block 22 $ tc filter add block 22 protocol ip pref 25 \ flower dst_ip 192.168.0.0/16 action mirred egress redirect blockid 22 for a matching packet arriving on ens7 will first send a copy/clone to ens8 (as in the "mirror" behavior) then to ens9 as in the redirect behavior above. Once this processing is done - no other actions are able to process this skb. i.e it is removed from the "pipeline". In this case, if the packet arrives on ens8, it will be copied and sent to all ports in the block excluding ens8. Patch 1 separates/exports mirror and redirect functions from act_mirred Patch 2 introduces the required infra. Patch 3 Allows mirred to blocks Subsequent patches will come with tdc test cases. __Acknowledgements__ Suggestions from Vlad Buslov and Marcelo Ricardo Leitner made this patchset better. The idea of integrating the ports into the tc block was suggested by Jiri Pirko. [1] See commit ca46abd6f89f ("Merge branch'net-sched-allow-qdiscs-to-share-filter-block-instances'") Changes in v2: - Remove RFC tag - Add more details in patch 0(Jiri) - When CONFIG_NET_TC_SKB_EXT is selected we have unused qdisc_cb Reported-by: kernel test robot (and horms@kernel.org) - Fix bad dev dereference in printk of blockcast action (Simon) Changes in v3: - Add missing xa_destroy (pointed out by Vlad) - Remove bugfix pointed by Vlad (will send in separate patch) - Removed ports from subject in patch #2 and typos (suggested by Marcelo) - Remove net_notice_ratelimited debug messages in error cases (suggested by Marcelo) - Minor changes to appease sparse's lock context warning Changes in v4: - Avoid code repetition using gotos in cast_one (suggested by Paolo) - Fix typo in cover letter (pointed out by Paolo) - Create a module description for act_blockcast (reported by Paolo and CI) Changes in v5: - Add new patch which separated mirred into mirror and redirect functions (suggested by Jiri) - Instead of repeating the code to mirror in blockcast use mirror exported function by patch1 (tcf_mirror_act) - Make Block ID into act_blockcast's parameter passed by user space instead of always getting it from SKB (suggested by Jiri) - Add tx_type parameter which will specify what transmission behaviour we want (as described earlier) Changes in v6: - Remove blockcast and make it a part of mirred (suggestd by Jiri) - Block ID is now a mirred parameter - We now allow redirecting and mirroring to either ingress or egress Changes in v7: - Remove set but not used variable in tcf_mirred_act (pointed out by Jakub) Changes in v8: - Fix uapi issues (pointed out by Jiri) - Separate last patch into 3 - two as preparations for adding block ID to mirred and one allowing mirred to block (suggested by Jiri) - Remove declaration initialisation of eg_block and in_block in qdisc_block_add_dev (suggested by Jiri) - Avoid unnecessary if guards in qdisc_block_add_dev (suggested by Jiri) - Remove unncessary block_index retrieval in __qdisc_destroy (suggested by Jiri) ==================== Signed-off-by: David S. Miller commit 42f39036cda808d3de243192a2cf5125f12f3047 Author: Victor Nogueira Date: Tue Dec 19 15:16:23 2023 -0300 net/sched: act_mirred: Allow mirred to block So far the mirred action has dealt with syntax that handles mirror/redirection for netdev. A matching packet is redirected or mirrored to a target netdev. In this patch we enable mirred to mirror to a tc block as well. IOW, the new syntax looks as follows: ... mirred [index INDEX] < | > > Examples of mirroring or redirecting to a tc block: $ tc filter add block 22 protocol ip pref 25 \ flower dst_ip 192.168.0.0/16 action mirred egress mirror blockid 22 $ tc filter add block 22 protocol ip pref 25 \ flower dst_ip 10.10.10.10/32 action mirred egress redirect blockid 22 Co-developed-by: Jamal Hadi Salim Signed-off-by: Jamal Hadi Salim Co-developed-by: Pedro Tammela Signed-off-by: Pedro Tammela Signed-off-by: Victor Nogueira Signed-off-by: David S. Miller commit 415e38bf1d8d789ee1fcb26bd815d8b95fe4faad Author: Victor Nogueira Date: Tue Dec 19 15:16:22 2023 -0300 net/sched: act_mirred: Add helper function tcf_mirred_replace_dev The act of replacing a device will be repeated by the init logic for the block ID in the patch that allows mirred to a block. Therefore we encapsulate this functionality in a function (tcf_mirred_replace_dev) so that we can reuse it and avoid code repetition. Co-developed-by: Jamal Hadi Salim Signed-off-by: Jamal Hadi Salim Co-developed-by: Pedro Tammela Signed-off-by: Pedro Tammela Signed-off-by: Victor Nogueira Signed-off-by: David S. Miller commit 16085e48cb48aeb50a1178dc276747749910b0f2 Author: Victor Nogueira Date: Tue Dec 19 15:16:21 2023 -0300 net/sched: act_mirred: Create function tcf_mirred_to_dev and improve readability As a preparation for adding block ID to mirred, separate the part of mirred that redirect/mirrors to a dev into a specific function so that it can be called by blockcast for each dev. Also improve readability. Eg. rename use_reinsert to dont_clone and skb2 to skb_to_send. Co-developed-by: Jamal Hadi Salim Signed-off-by: Jamal Hadi Salim Co-developed-by: Pedro Tammela Signed-off-by: Pedro Tammela Signed-off-by: Victor Nogueira Signed-off-by: David S. Miller commit a7042cf8f23191c3a460c627c0c39463afb5d335 Author: Victor Nogueira Date: Tue Dec 19 15:16:20 2023 -0300 net/sched: cls_api: Expose tc block to the datapath The datapath can now find the block of the port in which the packet arrived at. In the next patch we show a possible usage of this patch in a new version of mirred that multicasts to all ports except for the port in which the packet arrived on. Co-developed-by: Jamal Hadi Salim Signed-off-by: Jamal Hadi Salim Co-developed-by: Pedro Tammela Signed-off-by: Pedro Tammela Signed-off-by: Victor Nogueira Signed-off-by: David S. Miller commit 913b47d3424e7d99eaf34b798c47dfa840c64a08 Author: Victor Nogueira Date: Tue Dec 19 15:16:19 2023 -0300 net/sched: Introduce tc block netdev tracking infra This commit makes tc blocks track which ports have been added to them. And, with that, we'll be able to use this new information to send packets to the block's ports. Which will be done in the patch #3 of this series. Suggested-by: Jiri Pirko Co-developed-by: Jamal Hadi Salim Signed-off-by: Jamal Hadi Salim Co-developed-by: Pedro Tammela Signed-off-by: Pedro Tammela Signed-off-by: Victor Nogueira Signed-off-by: David S. Miller commit c3c2d45b9050180974e35ec8672c6e788adc236a Author: Zhiguo Niu Date: Wed Dec 20 09:59:58 2023 +0800 f2fs: show more discard status by sysfs The current pending_discard attr just only shows the discard_cmd_cnt information. More discard status can be shown so that we can check them through sysfs when needed. Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 19ec1d31fa56255ebf866a9e7540d3b4d6069db6 Author: Yongpeng Yang Date: Fri Dec 22 11:29:01 2023 +0800 f2fs: Add error handling for negative returns from do_garbage_collect The function do_garbage_collect can return a value less than 0 due to f2fs_cp_error being true or page allocation failure, as a result of calling f2fs_get_sum_page. However, f2fs_gc does not account for such cases, which could potentially lead to an abnormal total_freed and thus cause subsequent code to behave unexpectedly. Given that an f2fs_cp_error is irrecoverable, and considering that do_garbage_collect already retries page allocation errors through its call to f2fs_get_sum_page->f2fs_get_meta_page_retry, any error reported by do_garbage_collect should immediately terminate the current GC. Signed-off-by: Yongpeng Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0145eed6ed3210f98b366e88363553251c41807d Author: Yongpeng Yang Date: Fri Dec 22 11:29:00 2023 +0800 f2fs: Constrain the modification range of dir_level in the sysfs The {struct f2fs_sb_info}->dir_level can be modified through the sysfs interface, but its value range is not limited. If the value exceeds MAX_DIR_HASH_DEPTH and the mount options include "noinline_dentry", the following error will occur: [root@fedora ~]# mount -o noinline_dentry /dev/sdb /mnt/sdb/ [root@fedora ~]# echo 128 > /sys/fs/f2fs/sdb/dir_level [root@fedora ~]# cd /mnt/sdb/ [root@fedora sdb]# mkdir test [root@fedora sdb]# cd test/ [root@fedora test]# mkdir test mkdir: cannot create directory 'test': Argument list too long Signed-off-by: Yongpeng Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 94e7eb42414b6b1c11f14e0f760540993f429809 Author: Kevin Hao Date: Thu Dec 21 14:49:16 2023 +0800 f2fs: Use wait_event_freezable_timeout() for freezable kthread A freezable kernel thread can enter frozen state during freezing by either calling try_to_freeze() or using wait_event_freezable() and its variants. So for the following snippet of code in a kernel thread loop: wait_event_interruptible_timeout(); try_to_freeze(); We can change it to a simple wait_event_freezable_timeout() and then eliminate the function calls to try_to_freeze() and freezing(). Signed-off-by: Kevin Hao Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b1dffcf0da221d1f9d8007dfa2a41a325921d7fa Author: Denis Kirjanov Date: Tue Dec 19 17:38:20 2023 +0300 net: remove SOCK_DEBUG macro Since there are no more users of the macro let's finally burn it Signed-off-by: Denis Kirjanov Signed-off-by: David S. Miller commit 8e5443d2b8664b6a036b38b9d035eece9dfe6554 Author: Denis Kirjanov Date: Tue Dec 19 17:38:19 2023 +0300 net: remove SOCK_DEBUG leftovers SOCK_DEBUG comes from the old days. Let's move logging to standard net core ratelimited logging functions Signed-off-by: Denis Kirjanov changes in v2: - remove SOCK_DEBUG macro altogether Signed-off-by: David S. Miller commit e3eb47f2347b8cfae9de4a9a6fdddec79554652c Merge: e9301af385e78 b3bf76024f645 Author: David S. Miller Date: Tue Dec 26 20:24:33 2023 +0000 Merge branch 'net-smcv2.1-ISM-device-support' Wen Gu says: ==================== net/smc: implement SMCv2.1 virtual ISM device support The fourth edition of SMCv2 adds the SMC version 2.1 feature updates for SMC-Dv2 with virtual ISM. Virtual ISM are created and supported mainly by OS or hypervisor software, comparable to IBM ISM which is based on platform firmware or hardware. With the introduction of virtual ISM, SMCv2.1 makes some updates: - Introduce feature bitmask to indicate supplemental features. - Reserve a range of CHIDs for virtual ISM. - Support extended GIDs (128 bits) in CLC handshake. So this patch set aims to implement these updates in Linux kernel. And it acts as the first part of SMC-D virtual ISM extension & loopback-ism [1]. [1] https://lore.kernel.org/netdev/1695568613-125057-1-git-send-email-guwen@linux.alibaba.com/ v8->v7: - Patch #7: v7 mistakenly changed the type of gid_ext in smc_clc_msg_accept_confirm to u64 instead of __be64 as previous versions when fixing the rebase conflicts. So fix this mistake. v7->v6: Link: https://lore.kernel.org/netdev/20231219084536.8158-1-guwen@linux.alibaba.com/ - Collect the Reviewed-by tag in v6; - Patch #3: redefine the struct smc_clc_msg_accept_confirm; - Patch #7: Because that the Patch #3 already adds '__packed' to smc_clc_msg_accept_confirm, so Patch #7 doesn't need to do the same thing. But this is a minor change, so I kept the 'Reviewed-by' tag. Other changes in previous versions but not yet acked: - Patch #1: Some minor changes in subject and fix the format issue (length exceeds 80 columns) compared to v3. - Patch #5: removes useless ini->feature_mask assignment in __smc_connect() and smc_listen_v2_check() compared to v4. - Patch #8: new added, compared to v3. v6->v5: Link: https://lore.kernel.org/netdev/1702371151-125258-1-git-send-email-guwen@linux.alibaba.com/ - Add 'Reviewed-by' label given in the previous versions: * Patch #4, #6, #9, #10 have nothing changed since v3; - Patch #2: * fix the format issue (Alignment should match open parenthesis) compared to v5; * remove useless clc->hdr.length assignment in smcr_clc_prep_confirm_accept() compared to v5; - Patch #3: new added compared to v5. - Patch #7: some minor changes like aclc_v2->aclc or clc_v2->clc compared to v5 due to the introduction of Patch #3. Since there were no major changes, I kept the 'Reviewed-by' label. Other changes in previous versions but not yet acked: - Patch #1: Some minor changes in subject and fix the format issue (length exceeds 80 columns) compared to v3. - Patch #5: removes useless ini->feature_mask assignment in __smc_connect() and smc_listen_v2_check() compared to v4. - Patch #8: new added, compared to v3. v5->v4: Link: https://lore.kernel.org/netdev/1702021259-41504-1-git-send-email-guwen@linux.alibaba.com/ - Patch #6: improve the comment of SMCD_CLC_MAX_V2_GID_ENTRIES; - Patch #4: remove useless ini->feature_mask assignment; v4->v3: https://lore.kernel.org/netdev/1701920994-73705-1-git-send-email-guwen@linux.alibaba.com/ - Patch #6: use SMCD_CLC_MAX_V2_GID_ENTRIES to indicate the max gid entries in CLC proposal and using SMC_MAX_V2_ISM_DEVS to indicate the max devices to propose; - Patch #6: use i and i+1 in smc_find_ism_v2_device_serv(); - Patch #2: replace the large if-else block in smc_clc_send_confirm_accept() with 2 subfunctions; - Fix missing byte order conversion of GID and token in CLC handshake, which is in a separate patch sending to net: https://lore.kernel.org/netdev/1701882157-87956-1-git-send-email-guwen@linux.alibaba.com/ - Patch #7: add extended GID in SMC-D lgr netlink attribute; v3->v2: https://lore.kernel.org/netdev/1701343695-122657-1-git-send-email-guwen@linux.alibaba.com/ - Rename smc_clc_fill_fce as smc_clc_fill_fce_v2x; - Remove ISM_IDENT_MASK from drivers/s390/net/ism.h; - Add explicitly assigning 'false' to ism_v2_capable in ism_dev_init(); - Remove smc_ism_set_v2_capable() helper for now, and introduce it in later loopback-ism implementation; v2->v1: - Fix sparse complaint; - Rebase to the latest net-next; ==================== Signed-off-by: David S. Miller commit b3bf76024f645369e1fc45e0b08a2bd24f200d9b Author: Wen Gu Date: Tue Dec 19 22:26:16 2023 +0800 net/smc: manage system EID in SMC stack instead of ISM driver The System EID (SEID) is an internal EID that is used by the SMCv2 software stack that has a predefined and constant value representing the s390 physical machine that the OS is executing on. So it should be managed by SMC stack instead of ISM driver and be consistent for all ISMv2 device (including virtual ISM devices) on s390 architecture. Suggested-by: Alexandra Winter Signed-off-by: Wen Gu Reviewed-and-tested-by: Wenjia Zhang Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit c6b8b8eb49904018e22e4e4b1fa502e57dc747d9 Author: Wen Gu Date: Tue Dec 19 22:26:15 2023 +0800 net/smc: disable SEID on non-s390 archs where virtual ISM may be used The system EID (SEID) is an internal EID used by SMC-D to represent the s390 physical machine that OS is executing on. On s390 architecture, it predefined by fixed string and part of cpuid and is enabled regardless of whether underlay device is virtual ISM or platform firmware ISM. However on non-s390 architectures where SMC-D can be used with virtual ISM devices, there is no similar information to identify physical machines, especially in virtualization scenarios. So in such cases, SEID is forcibly disabled and the user-defined UEID will be used to represent the communicable space. Signed-off-by: Wen Gu Reviewed-and-tested-by: Wenjia Zhang Signed-off-by: David S. Miller commit 01fd1617dbc6f558efd1811f2bc433659d1e8304 Author: Wen Gu Date: Tue Dec 19 22:26:14 2023 +0800 net/smc: support extended GID in SMC-D lgr netlink attribute Virtual ISM devices introduced in SMCv2.1 requires a 128 bit extended GID vs. the existing ISM 64bit GID. So the 2nd 64 bit of extended GID should be included in SMC-D linkgroup netlink attribute as well. Signed-off-by: Wen Gu Signed-off-by: David S. Miller commit b40584d145700addc70cc29e4f0850a4ed955b1c Author: Wen Gu Date: Tue Dec 19 22:26:13 2023 +0800 net/smc: compatible with 128-bits extended GID of virtual ISM device According to virtual ISM support feature defined by SMCv2.1, GIDs of virtual ISM device are UUIDs defined by RFC4122, which are 128-bits long. So some adaptation work is required. And note that the GIDs of existing platform firmware ISM devices still remain 64-bits long. Signed-off-by: Wen Gu Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit 8dd512df3c98ce8081e3541990bf849157675723 Author: Wen Gu Date: Tue Dec 19 22:26:12 2023 +0800 net/smc: define a reserved CHID range for virtual ISM devices According to virtual ISM support feature defined by SMCv2.1, CHIDs in the range 0xFF00 to 0xFFFF are reserved for use by virtual ISM devices. And two helpers are introduced to distinguish virtual ISM devices from the existing platform firmware ISM devices. Signed-off-by: Wen Gu Reviewed-and-tested-by: Wenjia Zhang Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit 00e006a2571824b2ec26b45b089ed8523ec89b73 Author: Wen Gu Date: Tue Dec 19 22:26:11 2023 +0800 net/smc: introduce virtual ISM device support feature This introduces virtual ISM device support feature to SMCv2.1 as the first supplemental feature. Signed-off-by: Wen Gu Signed-off-by: David S. Miller commit ece60db3a4ce24a2a913a8960eb6fec561cdbcf6 Author: Wen Gu Date: Tue Dec 19 22:26:10 2023 +0800 net/smc: support SMCv2.x supplemental features negotiation This patch adds SMCv2.x supplemental features negotiation. Supported SMCv2.x supplemental features are represented by feature_mask in FCE field. The negotiation process is as follows. Server Client Proposal(features(c-mask bits)) <----------------------------------------- Accept(features(s-mask bits)) -----------------------------------------> Confirm(features(s&c-mask bits)) <----------------------------------------- Signed-off-by: Wen Gu Reviewed-and-tested-by: Wenjia Zhang Signed-off-by: David S. Miller commit 9505450d55b0f7809fe63c36ad9339a909461c87 Author: Wen Gu Date: Tue Dec 19 22:26:09 2023 +0800 net/smc: unify the structs of accept or confirm message for v1 and v2 The structs of CLC accept and confirm messages for SMCv1 and SMCv2 are separately defined and often casted to each other in the code, which may increase the risk of errors caused by future divergence of them. So unify them into one struct for better maintainability. Suggested-by: Alexandra Winter Signed-off-by: Wen Gu Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit 5205ac4483b630e47c65f192a3ac19be7a8ea648 Author: Wen Gu Date: Tue Dec 19 22:26:08 2023 +0800 net/smc: introduce sub-functions for smc_clc_send_confirm_accept() There is a large if-else block in smc_clc_send_confirm_accept() and it is better to split it into two sub-functions. Suggested-by: Alexandra Winter Signed-off-by: Wen Gu Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit ac053a169c71ceb0f25f784fce9ea720455097b4 Author: Wen Gu Date: Tue Dec 19 22:26:07 2023 +0800 net/smc: rename some 'fce' to 'fce_v2x' for clarity Rename some functions or variables with 'fce' in their name but used in SMCv2.1 as 'fce_v2x' for clarity. Signed-off-by: Wen Gu Signed-off-by: David S. Miller commit 315acff5196f4e2f84a2a2d093000e0c6b0b4d1c Author: Lucas De Marchi Date: Mon Dec 18 08:33:01 2023 -0800 drm/xe: Fix warning on impossible condition Having a different value for op is not possible: this is already kept out of user-visible warning by the check in xe_wait_user_fence_ioctl() if op > MAX_OP. The warning is useful as if this switch() is not update when a new op is added, it should be triggered. Fix warning as reported by 0-DAY CI Kernel: drivers/gpu/drm/xe/xe_wait_user_fence.c:46:2: warning: variable 'passed' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] Closes: https://lore.kernel.org/oe-kbuild-all/202312170357.KPSinwPs-lkp@intel.com/ Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20231218163301.3453285-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 75cbe49f9e2f71a73fed0b677d8d7ff1ffbeaa45 Author: Matthew Brost Date: Fri Dec 15 15:02:03 2023 -0800 drm/xe: Fix UBSAN splat in add_preempt_fences() add_preempt_fences() calls dma_resv_reserve_fences() with num_fences == 0 resulting in the below UBSAN splat. Short circuit add_preempt_fences() if num_fences == 0. [ 58.652241] ================================================================================ [ 58.660736] UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13 [ 58.667281] shift exponent 64 is too large for 64-bit type 'long unsigned int' [ 58.674539] CPU: 2 PID: 1170 Comm: xe_gpgpu_fill Not tainted 6.6.0-rc3-guc+ #630 [ 58.674545] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.3243.A01.2006102133 06/10/2020 [ 58.674547] Call Trace: [ 58.674548] [ 58.674550] dump_stack_lvl+0x92/0xb0 [ 58.674555] __ubsan_handle_shift_out_of_bounds+0x15a/0x300 [ 58.674559] ? rcu_is_watching+0x12/0x60 [ 58.674564] ? software_resume+0x141/0x210 [ 58.674575] ? new_vma+0x44b/0x600 [xe] [ 58.674606] dma_resv_reserve_fences.cold+0x40/0x66 [ 58.674612] new_vma+0x4b3/0x600 [xe] [ 58.674638] xe_vm_bind_ioctl+0xffd/0x1e00 [xe] [ 58.674663] ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] [ 58.674680] drm_ioctl_kernel+0xc1/0x170 [ 58.674686] ? __pfx_xe_vm_bind_ioctl+0x10/0x10 [xe] [ 58.674703] drm_ioctl+0x247/0x4c0 [ 58.674709] ? find_held_lock+0x2b/0x80 [ 58.674716] __x64_sys_ioctl+0x8c/0xb0 [ 58.674720] do_syscall_64+0x3c/0x90 [ 58.674723] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 [ 58.674727] RIP: 0033:0x7fce4bd1aaff [ 58.674730] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00 [ 58.674731] RSP: 002b:00007ffc57434050 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 58.674734] RAX: ffffffffffffffda RBX: 00007ffc574340e0 RCX: 00007fce4bd1aaff [ 58.674736] RDX: 00007ffc574340e0 RSI: 0000000040886445 RDI: 0000000000000003 [ 58.674737] RBP: 0000000040886445 R08: 0000000000000002 R09: 00007ffc574341b0 [ 58.674739] R10: 000055de43eb3780 R11: 0000000000000246 R12: 00007ffc574340e0 [ 58.674740] R13: 0000000000000003 R14: 00007ffc574341b0 R15: 0000000000000001 [ 58.674747] [ 58.674748] ================================================================================ Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Cc: Lucas De Marchi Signed-off-by: Matthew Brost Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231215230203.719244-1-matthew.brost@intel.com Signed-off-by: Rodrigo Vivi commit 5d13243820c457edf54a1fd848141ce7eb092671 Author: Christoph Hellwig Date: Tue Dec 26 09:07:47 2023 +0000 blk-wbt: remove the separate write cache tracking Use the queue wide write back cache tracking insted of duplicating the value in strut rq_wb. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231226090747.204969-1-hch@lst.de Signed-off-by: Jens Axboe commit 1c042f8d4bc342b7985b1de3d76836f1a1083b65 Author: Christoph Hellwig Date: Thu Dec 21 08:05:38 2023 +0100 block: reject invalid operation in submit_bio_noacct submit_bio_noacct allows completely invalid operations, or operations that are not supported in the bio path. Extent the existing switch statement to rejcect all invalid types. Move the code point for REQ_OP_ZONE_APPEND so that it's not right in the middle of the zone management operations and the switch statement can follow the numerical order of the operations. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231221070538.1112446-1-hch@lst.de Signed-off-by: Jens Axboe commit 8645e659e2d227f6ce8fcea1ac640c324fbbb3e6 Author: Randy Dunlap Date: Fri Dec 22 21:05:56 2023 -0800 iio: linux/iio.h: fix Excess kernel-doc description warning Remove the @of_xlate: lines to prevent the kernel-doc warning: include/linux/iio/iio.h:534: warning: Excess struct member 'of_xlate' description in 'iio_info' Signed-off-by: Randy Dunlap Cc: Jonathan Cameron Cc: Lars-Peter Clausen Cc: linux-iio@vger.kernel.org Link: https://lore.kernel.org/r/20231223050556.13948-1-rdunlap@infradead.org Signed-off-by: Jonathan Cameron commit de35d40926810cd3767f25a7ed24f890137f93b9 Author: Marcelo Schmitt Date: Tue Dec 19 17:32:59 2023 -0300 MAINTAINERS: Add MAINTAINERS entry for AD7091R The driver for AD7091R was added in ca693001: iio: adc: Add support for AD7091R5 ADC but no MAINTAINERS file entry was added for it since then. Add a proper MAINTAINERS file entry for the AD7091R driver. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/4247e653354f8eb362264189db24c612d5e4e131.1703013352.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit 0b76ff46c46332f3415be4dc5f9771d5eb2f0f18 Author: Marcelo Schmitt Date: Tue Dec 19 17:32:36 2023 -0300 iio: adc: Add support for AD7091R-8 Add support for Analog Devices AD7091R-2, AD7091R-4, and AD7091R-8 low power 12-Bit SAR ADCs with SPI interface. Extend ad7091r-base driver so it can be used by the AD7091R-8 driver. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/09d1d1c4b39cecc528488efac6094233715f5659.1703013352.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit 6875b85729f82614a8127792ad0b04c17fb56487 Author: Marcelo Schmitt Date: Tue Dec 19 17:32:04 2023 -0300 dt-bindings: iio: Add AD7091R-8 Add device tree documentation for AD7091R-8. Reviewed-by: Conor Dooley Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/632eb34801ae54feda453b6a65d60fc8ac2891fd.1703013352.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit 276ceecaa2e8bd0b7b0437e3556fccca991a04f7 Author: Marcelo Schmitt Date: Tue Dec 19 17:29:52 2023 -0300 iio: adc: Split AD7091R-5 config symbol Split AD7091R-5 kconfig symbol into one symbol for the base AD7091R driver and another one for the I2C interface AD7091R-5 driver. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/8cae37c611c1b0fe3faef7a4b8c4cc915eaeddc7.1703013352.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit 8eb5976abfc5990367ca660ce8e222bba6f812c3 Author: Marcelo Schmitt Date: Tue Dec 19 17:29:30 2023 -0300 iio: adc: ad7091r: Add chip_info callback to get conversion result channel AD7091R-5 and AD7091R-2/-4/-8 have slightly different register field layout and due to that require different masks for getting the index of the channel associated with each read. Add a callback function so the base driver can get correct channel ID for each chip variant. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/1f7a40b4839b3a1c3f1a0654a1b329bea870feb6.1703013352.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit 7e3ebda32d6e8f10acbde2b204f6bf4020f7ef95 Author: Marcelo Schmitt Date: Tue Dec 19 17:28:45 2023 -0300 iio: adc: ad7091r: Set device mode through chip_info callback AD7091R-5 devices have a few modes of operation (sample, command, autocycle) which are set by writing to configuration register fields. Follow up patches will add support for AD7091R-2/-4/-8 which don't have those operation modes nor the register fields for setting them. Make ad7091r_set_mode() a callback function of AD7091R chip_info struct so the base driver can appropriately handle each design without having to check which actual chip is connected. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/5140336980f66c2c45f05895c3b68e2f65fba1c2.1703013352.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit 6ff545a9b87cdc920ee9988fec2edae14c1f5ecb Author: Marcelo Schmitt Date: Tue Dec 19 17:28:05 2023 -0300 iio: adc: ad7091r: Remove unneeded probe parameters With the grouping of ad7091r initialization data and callbacks into the init_info struct, there is no more need to pass the device name and register map through probe function parameters as those will be available in the init_info object. Remove probe parameters that are not needed anymore. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/090a6b461410a374511a8c73659de28b2665f96b.1703013352.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit ca1a679049c12a100f8a72ff7e9363d08851f4d8 Author: Marcelo Schmitt Date: Tue Dec 19 17:27:36 2023 -0300 iio: adc: ad7091r: Move chip init data to container struct AD7091R designs may differ on their communication protocol and resources required for proper setup. Extract what is design specific into a init_info struct so the base driver can use data and callback functions from that struct rather than checking which specific chip is connected during device initialization. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/1aca2261e227474dc58ce26442845947bcde9b14.1703013352.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit 5b035ed0a5b4857f8e0dc1328dd66e930ea6eedc Author: Marcelo Schmitt Date: Tue Dec 19 17:27:04 2023 -0300 iio: adc: ad7091r: Move generic AD7091R code to base driver and header file Some code generic to AD7091R devices such as channel definitions were in the AD7091R-5 driver. There was also some generic register definitions declared in the base driver which would make more sense to be in the header file. The device state struct will be needed for the ad7091r8 driver in a follow up patch so that ought to be moved to the header file as well. Lastly, a couple of regmap callback functions are also capable of abstracting characteristics of different AD7091R devices and those are now being exported to IIO_AD7091R name space. Move AD7091R generic code either to the base driver or to the header file so both the ad7091r5 and the ad7091r8 driver can use those declaration in follow up patches. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/6376fc523ee503d47ec499e2cd2ef13bfb5fd8ba.1703013352.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit e71c5c89bcb165a02df35325aa13d1ee40112401 Author: Marcelo Schmitt Date: Tue Dec 19 17:26:27 2023 -0300 iio: adc: ad7091r: Enable internal vref if external vref is not supplied The ADC needs a voltage reference to work correctly. Users can provide an external voltage reference or use the chip internal reference to operate the ADC. The availability of an in chip reference for the ADC saves the user from having to supply an external voltage reference, which makes the external reference an optional property as described in the device tree documentation. Though, to use the internal reference, it must be enabled by writing to the configuration register. Enable AD7091R internal voltage reference if no external vref is supplied. Fixes: 260442cc5be4 ("iio: adc: ad7091r5: Add scale and external VREF support") Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/b865033fa6a4fc4bf2b4a98ec51a6144e0f64f77.1703013352.git.marcelo.schmitt1@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 020e71c7ffc25dfe29ed9be6c2d39af7bd7f661f Author: Marcelo Schmitt Date: Tue Dec 19 17:26:01 2023 -0300 iio: adc: ad7091r: Allow users to configure device events AD7091R-5 devices are supported by the ad7091r-5 driver together with the ad7091r-base driver. Those drivers declared iio events for notifying user space when ADC readings fall bellow the thresholds of low limit registers or above the values set in high limit registers. However, to configure iio events and their thresholds, a set of callback functions must be implemented and those were not present until now. The consequence of trying to configure ad7091r-5 events without the proper callback functions was a null pointer dereference in the kernel because the pointers to the callback functions were not set. Implement event configuration callbacks allowing users to read/write event thresholds and enable/disable event generation. Since the event spec structs are generic to AD7091R devices, also move those from the ad7091r-5 driver the base driver so they can be reused when support for ad7091r-2/-4/-8 be added. Fixes: ca69300173b6 ("iio: adc: Add support for AD7091R5 ADC") Suggested-by: David Lechner Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/59552d3548dabd56adc3107b7b4869afee2b0c3c.1703013352.git.marcelo.schmitt1@gmail.com Cc: Signed-off-by: Jonathan Cameron commit d42fafb895246e3f5a5e0f83e7485167fa651f5c Author: Randy Dunlap Date: Fri Dec 22 15:46:23 2023 -0800 IB/iser: iscsi_iser.h: fix kernel-doc warning and spellos Drop one kernel-doc comment to prevent a warning: iscsi_iser.h:313: warning: Excess struct member 'mr' description in 'iser_device' and spell 2 words correctly (buffer and deferred). Signed-off-by: Randy Dunlap Cc: Sagi Grimberg Cc: Max Gurtovoy Cc: Jason Gunthorpe Cc: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Link: https://lore.kernel.org/r/20231222234623.25231-1-rdunlap@infradead.org Reviewed-by: Sagi Grimberg Acked-by: Max Gurtovoy Signed-off-by: Leon Romanovsky commit c1b9f2c66eed3261db76cccd8a22a9affae8dcbf Author: Christophe JAILLET Date: Thu Oct 20 21:21:09 2022 +0200 vdpa: Fix an error handling path in eni_vdpa_probe() After a successful vp_legacy_probe() call, vp_legacy_remove() should be called in the error handling path, as already done in the remove function. Add the missing call. Fixes: e85087beedca ("eni_vdpa: add vDPA driver for Alibaba ENI") Signed-off-by: Christophe JAILLET Message-Id: Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit e9301af385e7864dea353f5e58cad7339dd6c718 Author: Marek Behún Date: Tue Dec 19 17:24:15 2023 +0100 net: sfp: fix PHY discovery for FS SFP-10G-T module Commit 2f3ce7a56c6e ("net: sfp: rework the RollBall PHY waiting code") changed the long wait before accessing RollBall / FS modules into probing for PHY every 1 second, and trying 25 times. Wei Lei reports that this does not work correctly on FS modules: when initializing, they may report values different from 0xffff in PHY ID registers for some MMDs, causing get_phy_c45_ids() to find some bogus MMD. Fix this by adding the module_t_wait member back, and setting it to 4 seconds for FS modules. Fixes: 2f3ce7a56c6e ("net: sfp: rework the RollBall PHY waiting code") Reported-by: Wei Lei Signed-off-by: Marek Behún Tested-by: Lei Wei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit b150a703b56fb6eb282d059b421652ccd9155c23 Author: Hermes Zhang Date: Fri Dec 8 11:47:08 2023 +0800 power: supply: bq24190_charger: Add support for BQ24296 The BQ24296 is most similar to the BQ24196, but the: 1. OTG config is split from CHG config (REG01) 2. ICHG (Fast Charge Current limit) range is smaller (<=3008mA) 3. NTC fault is simplified to 2 bits Signed-off-by: Hermes Zhang Link: https://lore.kernel.org/r/20231208034708.1248389-3-Hermes.Zhang@axis.com Signed-off-by: Sebastian Reichel commit 370cc1579a79a29a6dba4d9ea8d4d0147aa41861 Author: Hermes Zhang Date: Fri Dec 8 11:47:07 2023 +0800 dt-bindings: power: supply: bq24190: Add BQ24296 compatible The BQ24296 is most similar to the BQ24196, but the: 1. OTG config is split from CHG config (REG01) 2. ICHG (Fast Charge Current limit) range is smaller (<=3008mA) 3. NTC fault is simplified to 2 bits Signed-off-by: Hermes Zhang Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231208034708.1248389-2-Hermes.Zhang@axis.com Signed-off-by: Sebastian Reichel commit f40e61eb538d35661d6dda1de92867954d776c4a Author: Jiapeng Chong Date: Tue Dec 19 14:26:35 2023 +0800 drm/rockchip: vop2: clean up some inconsistent indenting No functional modification involved. drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:1708 rk3588_calc_cru_cfg() warn: inconsistent indenting. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7778 Signed-off-by: Jiapeng Chong Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231219062635.100718-1-jiapeng.chong@linux.alibaba.com commit 3ee348eb36f14e9303a7e9757efb91b0bbf3f7a9 Author: Andy Yan Date: Sun Dec 17 16:44:15 2023 +0800 drm/rockchip: vop2: Avoid use regmap_reinit_cache at runtime Marek Report a possible irq lock inversion dependency warning when commit 81a06f1d02e5 ("Revert "drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume"") lands linux-next. I can reproduce this warning with: CONFIG_PROVE_LOCKING=y CONFIG_DEBUG_LOCKDEP=y It seems than when use regmap_reinit_cache at runtime whith Mark's commit 3d59c22bbb8d ("drm/rockchip: vop2: Convert to use maple tree register cache"), it will trigger a possible irq lock inversion dependency warning. One solution is switch back to REGCACHE_RBTREE, but it seems that REGCACHE_MAPLE is the future, so I avoid using regmap_reinit_cache, and drop all the regcache when vop is disabled, then we get a fresh start at next enbable time. Fixes: 81a06f1d02e5 ("Revert "drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume"") Reported-by: Marek Szyprowski Closes: https://lore.kernel.org/all/98a9f15d-30ac-47bf-9b93-3aa2c9900f7b@samsung.com/ Signed-off-by: Andy Yan Tested-by: Marek Szyprowski [dropped the large kernel log of the lockdep report from the message] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231217084415.2373043-1-andyshrk@163.com commit 97b9b383976e3347b05d8c409527c6e03c90cf72 Author: Michal Simek Date: Thu Dec 21 13:27:56 2023 +0100 dt-bindings: power: reset: xilinx: Rename node names in examples Rename zynqmp-power node name to power-management which is more aligned with generic node name recommendation. Signed-off-by: Michal Simek Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/920c839ae2c9c5803c6c08b8705a0d8338bb94bc.1703161663.git.michal.simek@amd.com Signed-off-by: Sebastian Reichel commit b43f7ddc2b7a5a90447d96cb4d3c6d142dd4a810 Author: Konrad Dybcio Date: Mon Dec 18 15:41:52 2023 +0100 power: supply: qcom_battmgr: Register the power supplies after PDR is up Currently, a not-yet-entirely-initialized battmgr (e.g. with pd-mapper not having yet started or ADSP not being up etc.) results in a couple of zombie power supply devices hanging around. This is particularly noticeable when trying to suspend the device (even s2idle): the PSY-internal thermal zone is inaccessible and returns -ENODEV, which causes log spam. Register the power supplies only after we received some notification indicating battmgr is ready to take off. Signed-off-by: Konrad Dybcio Tested-by: Luca Weiss Link: https://lore.kernel.org/r/20231218-topic-battmgr_fixture_attempt-v1-1-6145745f34fe@linaro.org Signed-off-by: Sebastian Reichel commit 523100208bd22e3eee7b76025ee4584b5d1ea0ee Author: Johan Hovold Date: Thu Nov 30 18:30:17 2023 +0100 dt-bindings: power: reset: qcom-pon: fix inconsistent example The current PON example is a bit of a mess after converting the binding document to yaml and in the process updating parts of the example to match the pmk8350 binding while leaving parts from the older pm8998 example in place. Clean up the example and make it consistent by adding some newline separators; dropping labels; removing stray spaces; fixing the PON node name; and fixing the unit address so that it matches the interrupt specifiers (which re-encodes the PON base address, 0x800 => 0x8). Fixes: 76ba1900cb67 ("dt-bindings: power: reset: qcom-pon: Convert qcom PON binding to yaml") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231130173017.12723-1-johan+linaro@kernel.org Signed-off-by: Sebastian Reichel commit 88f04bc3e737155e13caddf0ba8ed19db87f0212 Author: Kunwu Chan Date: Fri Nov 24 15:50:21 2023 +0800 power: supply: Fix null pointer dereference in smb2_probe devm_kasprintf and devm_kzalloc return a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: 8648aeb5d7b7 ("power: supply: add Qualcomm PMI8998 SMB2 Charger driver") Signed-off-by: Kunwu Chan Link: https://lore.kernel.org/r/20231124075021.1335289-1-chentao@kylinos.cn Signed-off-by: Sebastian Reichel commit 195c3167865454ea909d717557c8585ccfe1b2a3 Author: Nathan Chancellor Date: Mon Nov 20 15:35:32 2023 -0700 power: reset: at91: Drop '__init' from at91_wakeup_status() When building with clang, there are two section mismatch warnings: WARNING: modpost: vmlinux: section mismatch in reference: at91_poweroff_probe+0x7c (section: .text) -> at91_wakeup_status (section: .init.text) WARNING: modpost: vmlinux: section mismatch in reference: at91_shdwc_probe+0xcc (section: .text) -> at91_wakeup_status (section: .init.text) Drop '__init' from at91_wakeup_status() to clear up the mismatch. Fixes: dde74a5de817 ("power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe()") Fixes: 099806de68b7 ("power: reset: at91-poweroff: Stop using module_platform_driver_probe()") Signed-off-by: Nathan Chancellor Acked-by: Nicolas Ferre Reviewed-by: Uwe Kleine-König Signed-off-by: Sebastian Reichel commit 3cbbe1be0e3bd4cac5502eb141dd257ab34a4460 Author: Charalampos Mitrodimas Date: Sat Nov 18 13:29:58 2023 +0000 power: supply: Use multiple MODULE_AUTHOR statements This resolves checkpatch warning "quoted string split across lines" on: 1640: WARNING: quoted string split across lines 1641: WARNING: quoted string split across lines The motive to use multiple MODULE_AUTHOR statements came from this comment from "include/linux/module.h": /* * Author(s), use "Name " or just "Name", for multiple * authors use multiple MODULE_AUTHOR() statements/lines. */ #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author) Signed-off-by: Charalampos Mitrodimas Signed-off-by: Sebastian Reichel commit c73cc447751898aeac5ef1c0012a03d45721949a Author: Charalampos Mitrodimas Date: Sat Nov 18 13:29:57 2023 +0000 power: supply: Fix indentation and some other warnings These were mentioned by checkpatch: Errors: (1) code indent should use tabs where possible (2) switch and case should be at the same indent Warnings: (1) Missing a blank line after declarations Signed-off-by: Charalampos Mitrodimas Signed-off-by: Sebastian Reichel commit c04c4ebd452476af1bdfa917105d9da97f01868d Author: Andrew Davis Date: Fri Nov 17 10:10:04 2023 -0600 power: reset: gpio-restart: Use devm_register_sys_off_handler() Use device life-cycle managed register function to simplify probe error path and eliminate need for explicit remove function. Signed-off-by: Andrew Davis Signed-off-by: Sebastian Reichel commit 7984d22f1315bf30433e11e5010e4ce09ca22037 Author: Alison Schofield Date: Fri Dec 22 16:47:40 2023 -0800 cxl/region: Add dev_dbg() detail on failure to allocate HPA space When the region driver fails while allocating HPA space for a new region it can be because the parent resource, the CXL Window, has no more available space. In that case, the debug user sees this message: cxl_core:alloc_hpa:555: cxl region2: failed to allocate HPA: -34 Expand the message like this: cxl_core:alloc_hpa:555: cxl region8: HPA allocation error (-34) for size:0x20000000 in CXL Window 0 [mem 0xf010000000-0xf04fffffff flags 0x200] Now the debug user can examine /proc/iomem and consider actions like removing other allocations in that space or reducing the size of their region request. Suggested-by: Dan Williams Signed-off-by: Alison Schofield Reviewed-by: Dave Jiang Reviewed-by: Vishal Verma Reviewed-by: Fan Ni Link: https://lore.kernel.org/r/20231223004740.1401858-1-alison.schofield@intel.com Signed-off-by: Dan Williams commit f1bb47a31dff6d4b34fb14e99850860ee74bb003 Author: Alfred Piccioni Date: Tue Dec 19 10:09:09 2023 +0100 lsm: new security_file_ioctl_compat() hook Some ioctl commands do not require ioctl permission, but are routed to other permissions such as FILE_GETATTR or FILE_SETATTR. This routing is done by comparing the ioctl cmd to a set of 64-bit flags (FS_IOC_*). However, if a 32-bit process is running on a 64-bit kernel, it emits 32-bit flags (FS_IOC32_*) for certain ioctl operations. These flags are being checked erroneously, which leads to these ioctl operations being routed to the ioctl permission, rather than the correct file permissions. This was also noted in a RED-PEN finding from a while back - "/* RED-PEN how should LSM module know it's handling 32bit? */". This patch introduces a new hook, security_file_ioctl_compat(), that is called from the compat ioctl syscall. All current LSMs have been changed to support this hook. Reviewing the three places where we are currently using security_file_ioctl(), it appears that only SELinux needs a dedicated compat change; TOMOYO and SMACK appear to be functional without any change. Cc: stable@vger.kernel.org Fixes: 0b24dcb7f2f7 ("Revert "selinux: simplify ioctl checking"") Signed-off-by: Alfred Piccioni Reviewed-by: Stephen Smalley [PM: subject tweak, line length fixes, and alignment corrections] Signed-off-by: Paul Moore commit 44de8996ed5a10f08f2fe947182da6535edcfae5 Author: Sam Edwards Date: Fri Dec 15 19:10:19 2023 -0700 arm64: dts: rockchip: Fix rk3588 USB power-domain clocks The QoS blocks saved/restored when toggling the PD_USB power domain are clocked by ACLK_USB. Attempting to access these memory regions without that clock running will result in an indefinite CPU stall. The PD_USB node wasn't specifying this clock dependency, resulting in hangs when trying to toggle the power domain (either on or off), unless we get "lucky" and have ACLK_USB running for another reason at the time. This "luck" can result from the bootloader leaving USB powered/clocked, and if no built-in driver wants USB, Linux will disable the unused PD+CLK on boot when {pd,clk}_ignore_unused aren't given. This can also be unlucky because the two cleanup tasks run in parallel and race: if the CLK is disabled first, the PD deactivation stalls the boot. In any case, the PD cannot then be reenabled (if e.g. the driver loads later) once the clock has been stopped. Fix this by specifying a dependency on ACLK_USB, instead of only ACLK_USB_ROOT. The child-parent relationship means the former implies the latter anyway. Fixes: c9211fa2602b8 ("arm64: dts: rockchip: Add base DT for rk3588 SoC") Cc: stable@vger.kernel.org Signed-off-by: Sam Edwards Link: https://lore.kernel.org/r/20231216021019.1543811-1-CFSworks@gmail.com [changed to only include the missing clock, not dropping the root-clocks] Signed-off-by: Heiko Stuebner commit fc5a80a432607d05e85bba37971712405f75c546 Author: Tianling Shen Date: Sat Dec 16 12:07:23 2023 +0800 arm64: dts: rockchip: configure eth pad driver strength for orangepi r1 plus lts The default strength is not enough to provide stable connection under 3.3v LDO voltage. Fixes: 387b3bbac5ea ("arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS") Cc: stable@vger.kernel.org # 6.6+ Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20231216040723.17864-1-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit c699fbfdfd54630fc51b96da577f02e7b772eb37 Author: Hugh Cole-Baker Date: Sat Dec 16 21:21:34 2023 +0000 arm64: dts: rockchip: Support poweroff on NanoPC-T6 The RK806 on the NanoPC-T6 can be used to power on/off the whole board. Mark it as the system power controller. Signed-off-by: Hugh Cole-Baker Link: https://lore.kernel.org/r/20231216212134.23314-1-sigmaris@gmail.com Signed-off-by: Heiko Stuebner commit 085021cc825ed90a6ddc4406f608fb8a85745f81 Author: Trevor Woerner Date: Tue Dec 19 12:38:13 2023 -0500 arm64: dts: rockchip: rk3308-rock-pi-s gpio-line-names cleanup Perform the following cleanups on a previous patch: - indent lines after "gpio-line-names" - fix D0-D8 -> D0-D7 - sort phandle references Fixes: c45de75d7a9a ("arm64: dts: rockchip: add gpio-line-names to rk3308-rock-pi-s") Signed-off-by: Trevor Woerner Link: https://lore.kernel.org/r/20231219173814.1569-1-twoerner@gmail.com Signed-off-by: Heiko Stuebner commit 791c154c3982bd5b8a2a5c15ef11ae41028d8d23 Author: Andy Yan Date: Tue Dec 12 20:44:07 2023 +0800 arm64: dts: rockchip: Add support for rk3588 based board Cool Pi CM5 EVB Cool Pi CM5 EVB works as a mother board connect with CM5. CM5 Specification: - Rockchip RK3588 - LPDDR4 2/4/8/16 GB - TF scard slot - eMMC 8/32/64/128 GB module - Gigabit ethernet x 1 with PHY YT8531 - Gigabit ethernet x 1 drived by PCIE with YT6801S CM5 EVB Specification: - HDMI Type A out x 2 - HDMI Type D in x 1 - USB 2.0 Host x 2 - USB 3.0 OTG x 1 - USB 3.0 Host x 1 - PCIE M.2 E Key for Wireless connection - PCIE M.2 M Key for NVME connection - 40 pin header Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20231212124407.1897604-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit e2637a4d67c6310871a1fd67595b0c201f3a83ba Author: Andy Yan Date: Tue Dec 12 20:43:40 2023 +0800 dt-bindings: arm: rockchip: Add Cool Pi CM5 Add Cool Pi CM5, a board powered by RK3588 CM5 EVB works with a mother board connect with CM5 Signed-off-by: Andy Yan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231212124340.1897502-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 3f5d336d64d634426b8733848d840ceb8fe96610 Author: Andy Yan Date: Tue Dec 12 20:42:53 2023 +0800 arm64: dts: rockchip: Add support for rk3588s based board Cool Pi 4B CoolPi 4B is a rk3588s based SBC. Specification: - Rockchip RK3588S - LPDDR4 2/4/8/16 GB - TF scard slot - eMMC 8/32/64/128 GB module - Gigabit ethernet drived by PCIE with RTL8111HS - HDMI Type D out - Mini DP out - USB 2.0 Host x 2 - USB 3.0 OTG x 1 - USB 3.0 Host x 1 - WIFI/BT module AIC8800 - 40 pin header Signed-off-by: Andy Yan arm64: dts: rockchip: Add support for rk3588s based board Cool Pi 4B Link: https://lore.kernel.org/r/20231212124253.1897438-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit c0a38606e6763f1d7152a644ad8bb8804f1756de Author: Andy Yan Date: Tue Dec 12 20:42:37 2023 +0800 dt-bindings: arm: rockchip: Add Cool Pi 4B Add Cool Pi 4B, a SBC powered by RK3588S Signed-off-by: Andy Yan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231212124237.1897378-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit a6c06d4469e745f78dd5b0a1515429ff18c83a53 Author: Andy Yan Date: Tue Dec 12 20:42:23 2023 +0800 dt-bindings: vendor-prefixes: Add Cool Pi Add vendor prefix for Cool Pi(https://cool-pi.com/) Signed-off-by: Andy Yan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231212124223.1897314-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit b34d5026b6418f8d1f1cbf38e62c584a1ab4a87d Author: Trevor Woerner Date: Wed Dec 13 11:05:55 2023 -0500 arm64: dts: rockchip: add gpio-line-names to rk3328-rock-pi-e Add names to the pins of the general-purpose expansion header as given in the Radxa GPIO page[1] following the conventions in the kernel documentation[2] to make it easier for users to correlate the pins with functions when using utilities such as 'gpioinfo'. Signed-off-by: Trevor Woerner Link: https://lore.kernel.org/r/20231213160556.14424-1-twoerner@gmail.com Signed-off-by: Heiko Stuebner commit bb0b255fb6f14b1620566d7d32c43adaca09c5e5 Author: Andy Yan Date: Mon Dec 18 18:55:23 2023 +0800 ARM: dts: rockchip: Remove rockchip,default-sample-phase from rk3036.dtsi This should be a per board property, should not be put in a soc core dtsi. And when this property convert from default-sample-phase in linux-5.7 by commit 8a385eb57296 ("ARM: dts: rockchip: fix rockchip,default-sample-phase property names"), the emmc on rk3036 kylin board get a initialising error: [ 4.512797] Freeing unused kernel memory: 8192K [ 4.519500] mmc_host mmc1: Bus speed (slot 0) = 37125000Hz (slot req 37500000Hz, actual 37125000HZ div = 0) [ 4.530971] mmc1: error -84 whilst initialising MMC card [ 4.537277] Run /init as init process [ 4.550932] mmc_host mmc1: Bus speed (slot 0) = 300000Hz (slot req 300000Hz, actual 300000HZ div = 0) [ 4.664717] mmc_host mmc1: Bus speed (slot 0) = 37125000Hz (slot req 37500000Hz, actual 37125000HZ div = 0) [ 4.676156] mmc1: error -84 whilst initialising MMC card I think the reason why the emmc on rk3036 kylin board was able to work before linux-5.7 was that the illegal property was not correctly identified by the rockchip dw_mmc driver. Fixes: faea098e1808 ("ARM: dts: rockchip: add core rk3036 dtsi") Signed-off-by: Andy Yan Reviewed-by: Shawn Lin Link: https://lore.kernel.org/r/20231218105523.2478315-4-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 1df4bc6908b2739f7ff28a1775729730d1addf16 Author: Andy Yan Date: Mon Dec 18 18:55:22 2023 +0800 ARM: dts: rockchip: Add stdout-path for rk3036 kylin Add stdout-path to get a uart console when system boot. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20231218105523.2478315-3-andyshrk@163.com Signed-off-by: Heiko Stuebner commit d2ce4a84c21f803cd65097d1112b60226b2a3467 Author: David Howells Date: Thu Oct 26 22:53:02 2023 +0100 rxrpc: Create a procfile to display outstanding client conn bundles Create /proc/net/rxrpc/bundles to display outstanding rxrpc client connection bundles. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 98f9fda2057ba34b720c4d353351024d6dcee90f Author: David Howells Date: Fri Oct 20 16:13:03 2023 +0100 afs: Fold the afs_addr_cursor struct in Fold the afs_addr_cursor struct into the afs_operation struct and the afs_vl_cursor struct and fold its operations into their callers also. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit e38f299ececc6b63a47074cc922ce8bbd3350c58 Author: David Howells Date: Thu Oct 26 18:13:13 2023 +0100 afs: Use peer + service_id as call address Use the rxrpc_peer plus the service ID as the call address instead of passing in a sockaddr_srx down to rxrpc. The peer record is obtained by using rxrpc_kernel_get_peer(). This avoids the need to repeatedly look up the peer and allows rxrpc to hold on to resources for it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 905b86156423de48480d915c5cd3c23bef1bc043 Author: David Howells Date: Thu Oct 26 15:56:39 2023 +0100 afs: Rename some fields Rename the ->index and ->untried fields of the afs_vl_cursor and afs_operation struct to ->server_index and ->untried_servers to avoid confusion with address iteration fields when those get folded in. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 1e5d8493254db9b28d4dce4fed87e56d9a2fefa5 Author: David Howells Date: Thu Oct 19 13:59:03 2023 +0100 afs: Add a tracepoint for struct afs_addr_list Add a tracepoint to track the lifetime of the afs_addr_list struct. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit aa453becce5d1ae1b94b7fc22f47d7b05d22b14e Author: David Howells Date: Wed Oct 25 17:53:33 2023 +0100 afs: Simplify error handling Simplify error handling a bit by moving it from the afs_addr_cursor struct to the afs_operation and afs_vl_cursor structs and using the error prioritisation function for accumulating errors from multiple sources (AFS tries to rotate between multiple fileservers, some of which may be inaccessible or in some state of offlinedness). Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 6f2ff7e89bd05677f4c08fccafcf625ca3e09c1c Author: David Howells Date: Thu Oct 26 09:54:07 2023 +0100 afs: Don't put afs_call in afs_wait_for_call_to_complete() Don't put the afs_call struct in afs_wait_for_call_to_complete() but rather have the caller do it. This will allow the caller to fish stuff out of the afs_call struct rather than the afs_addr_cursor struct, thereby allowing a subsequent patch to subsume it. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 2de5599f63babb416e09b1a6be429a47910dd47c Author: David Howells Date: Thu Oct 26 09:43:23 2023 +0100 afs: Wrap most op->error accesses with inline funcs Wrap most op->error accesses with inline funcs which will make it easier for a subsequent patch to replace op->error with something else. Two functions are added to this end: (1) afs_op_error() - Get the error code. (2) afs_op_set_error() - Set the error code. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 075171fd22be33acf4ab354814bfa6de1c3412ce Author: David Howells Date: Fri Oct 20 16:04:52 2023 +0100 afs: Use op->nr_iterations=-1 to indicate to begin fileserver iteration Set op->nr_iterations to -1 to indicate that we need to begin fileserver iteration rather than setting error to SHRT_MAX. This makes it easier to eliminate the address cursor. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit eb8eae65f0c713bcef84b082aa919f72c3d83268 Author: David Howells Date: Fri Oct 20 16:00:18 2023 +0100 afs: Handle the VIO and UAEIO aborts explicitly When processing the result of a call, handle the VIO and UAEIO abort specifically rather than leaving it to a default case. Rather than erroring out unconditionally, see if there's another server if the volume has more than one server available, otherwise return -EREMOTEIO. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit aa4917d6e59dc66ccffc8f449ea04f8236dd6ea4 Author: David Howells Date: Fri Oct 20 14:12:42 2023 +0100 afs: Rename addr_list::failed to probe_failed Rename the failed member of struct addr_list to probe_failed as it's specifically related to probe failures. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit a2aff7b5eb2584b8cb45820de025f786331eddc1 Author: David Howells Date: Mon Oct 30 16:40:57 2023 +0000 afs: Don't skip server addresses for which we didn't get an RTT reading In the rotation algorithms for iterating over volume location servers and file servers, don't skip servers from which we got a valid response to a probe (either a reply DATA packet or an ABORT) even if we didn't manage to get an RTT reading. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 72904d7b9bfbf2dd146254edea93958bc35bbbfe Author: David Howells Date: Thu Oct 19 12:55:11 2023 +0100 rxrpc, afs: Allow afs to pin rxrpc_peer objects Change rxrpc's API such that: (1) A new function, rxrpc_kernel_lookup_peer(), is provided to look up an rxrpc_peer record for a remote address and a corresponding function, rxrpc_kernel_put_peer(), is provided to dispose of it again. (2) When setting up a call, the rxrpc_peer object used during a call is now passed in rather than being set up by rxrpc_connect_call(). For afs, this meenat passing it to rxrpc_kernel_begin_call() rather than the full address (the service ID then has to be passed in as a separate parameter). (3) A new function, rxrpc_kernel_remote_addr(), is added so that afs can get a pointer to the transport address for display purposed, and another, rxrpc_kernel_remote_srx(), to gain a pointer to the full rxrpc address. (4) The function to retrieve the RTT from a call, rxrpc_kernel_get_srtt(), is then altered to take a peer. This now returns the RTT or -1 if there are insufficient samples. (5) Rename rxrpc_kernel_get_peer() to rxrpc_kernel_call_get_peer(). (6) Provide a new function, rxrpc_kernel_get_peer(), to get a ref on a peer the caller already has. This allows the afs filesystem to pin the rxrpc_peer records that it is using, allowing faster lookups and pointer comparisons rather than comparing sockaddr_rxrpc contents. It also makes it easier to get hold of the RTT. The following changes are made to afs: (1) The addr_list struct's addrs[] elements now hold a peer struct pointer and a service ID rather than a sockaddr_rxrpc. (2) When displaying the transport address, rxrpc_kernel_remote_addr() is used. (3) The port arg is removed from afs_alloc_addrlist() since it's always overridden. (4) afs_merge_fs_addr4() and afs_merge_fs_addr6() do peer lookup and may now return an error that must be handled. (5) afs_find_server() now takes a peer pointer to specify the address. (6) afs_find_server(), afs_compare_fs_alists() and afs_merge_fs_addr[46]{} now do peer pointer comparison rather than address comparison. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit 07f3502b33a260f873e35708d2fa693eb52225cb Author: David Howells Date: Wed Oct 18 15:38:14 2023 +0100 afs: Turn the afs_addr_list address array into an array of structs Turn the afs_addr_list address array into an array of structs, thereby allowing per-address (such as RTT) info to be added. Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org commit fe245c8fcdac339e6b42076c828a6bede3a5e948 Author: David Howells Date: Wed Oct 18 08:42:18 2023 +0100 afs: Add comments on abort handling Add some comments on AFS abort code handling in the rotation algorithm and adjust the errors produced to match. Reported-by: Jeffrey E Altman Signed-off-by: David Howells Reviewed-by: Jeffrey Altman cc: Marc Dionne cc: linux-afs@lists.infradead.org commit bad1a11c0f061aa073bab785389fe04f19ba02e1 Author: Oleg Nesterov Date: Fri Nov 17 17:48:46 2023 +0100 rxrpc_find_service_conn_rcu: fix the usage of read_seqbegin_or_lock() rxrpc_find_service_conn_rcu() should make the "seq" counter odd on the second pass, otherwise read_seqbegin_or_lock() never takes the lock. Signed-off-by: Oleg Nesterov Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20231117164846.GA10410@redhat.com/ commit df91b9dfdee23072641570b1efc049f19d839ae8 Author: Oleg Nesterov Date: Thu Nov 30 12:56:17 2023 +0100 afs: use read_seqbegin() in afs_check_validity() and afs_getattr() David Howells says: (3) afs_check_validity(). (4) afs_getattr(). These are both pretty short, so your solution is probably good for them. That said, afs_vnode_commit_status() can spend a long time under the write lock - and pretty much every file RPC op returns a status update. Change these functions to use read_seqbegin(). This simplifies the code and doesn't change the current behaviour, the "seq" counter is always even so read_seqbegin_or_lock() can never take the lock. Signed-off-by: Oleg Nesterov Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20231130115617.GA21584@redhat.com/ commit 1702e0654ca9a7bcd7c7619c8a5004db58945b71 Author: Oleg Nesterov Date: Thu Nov 30 12:56:14 2023 +0100 afs: fix the usage of read_seqbegin_or_lock() in afs_find_server*() David Howells says: (5) afs_find_server(). There could be a lot of servers in the list and each server can have multiple addresses, so I think this would be better with an exclusive second pass. The server list isn't likely to change all that often, but when it does change, there's a good chance several servers are going to be added/removed one after the other. Further, this is only going to be used for incoming cache management/callback requests from the server, which hopefully aren't going to happen too often - but it is remotely drivable. (6) afs_find_server_by_uuid(). Similarly to (5), there could be a lot of servers to search through, but they are in a tree not a flat list, so it should be faster to process. Again, it's not likely to change that often and, again, when it does change it's likely to involve multiple changes. This can be driven remotely by an incoming cache management request but is mostly going to be driven by setting up or reconfiguring a volume's server list - something that also isn't likely to happen often. Make the "seq" counter odd on the 2nd pass, otherwise read_seqbegin_or_lock() never takes the lock. Signed-off-by: Oleg Nesterov Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20231130115614.GA21581@redhat.com/ commit 4121b4337146b64560d1e46ebec77196d9287802 Author: Oleg Nesterov Date: Thu Nov 30 12:56:06 2023 +0100 afs: fix the usage of read_seqbegin_or_lock() in afs_lookup_volume_rcu() David Howells says: (2) afs_lookup_volume_rcu(). There can be a lot of volumes known by a system. A thousand would require a 10-step walk and this is drivable by remote operation, so I think this should probably take a lock on the second pass too. Make the "seq" counter odd on the 2nd pass, otherwise read_seqbegin_or_lock() never takes the lock. Signed-off-by: Oleg Nesterov Signed-off-by: David Howells cc: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20231130115606.GA21571@redhat.com/ commit 92b6cc5d1e7cbe569f00e9c1249ac8214fd5e2d2 Author: David Howells Date: Tue Sep 26 17:42:26 2023 +0100 netfs: Add iov_iters to (sub)requests to describe various buffers Add three iov_iter structs: (1) Add an iov_iter (->iter) to the I/O request to describe the unencrypted-side buffer. (2) Add an iov_iter (->io_iter) to the I/O request to describe the encrypted-side I/O buffer. This may be a different size to the buffer in (1). (3) Add an iov_iter (->io_iter) to the I/O subrequest to describe the part of the I/O buffer for that subrequest. This will allow future patches to point to a bounce buffer instead for purposes of handling oversize writes, decryption (where we want to save the encrypted data to the cache) and decompression. These iov_iters persist for the lifetime of the (sub)request, and so can be accessed multiple times without worrying about them being deallocated upon return to the caller. The network filesystem must appropriately advance the iterator before terminating the request. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 46ed60dcd4f2c94d27735743ce55cd8d6b93cc1d Author: David Howells Date: Wed Oct 11 15:34:07 2023 +0100 netfs: Implement unbuffered/DIO vs buffered I/O locking Borrow NFS's direct-vs-buffered I/O locking into netfslib. Similar code is also used in ceph. Modify it to have the correct checker annotations for i_rwsem lock acquisition/release and to return -ERESTARTSYS if waits are interrupted. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit c1ec4d7c2e13471558cfea302b7583856284f94c Author: David Howells Date: Fri Aug 20 17:08:30 2021 +0100 netfs: Provide invalidate_folio and release_folio calls Provide default invalidate_folio and release_folio calls. These will need to interact with invalidation correctly at some point. They will be needed if netfslib is to make use of folio->private for its own purposes. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit a34847d4b73c3a98b565b1d1cc6e1b70c661e18b Author: David Howells Date: Fri Dec 2 14:12:41 2022 +0000 afs: Don't use folio->private to record partial modification AFS currently uses folio->private to store the range of bytes within a folio that have been modified - the idea being that if we have, say, a 2MiB folio and someone writes a single byte, we only have to write back that single page and not the whole 2MiB folio - thereby saving on network bandwidth. Remove this, at least for now, and accept the extra network load (which doesn't matter in the common case of writing a whole file at a time from beginning to end). This makes folio->private available for netfslib to use. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 5f5ce7ba15e7e6a6539ac8e1f845757aaebecf0d Author: David Howells Date: Fri Feb 25 11:19:14 2022 +0000 netfs: Add a ->free_subrequest() op Add a ->free_subrequest() op so that the netfs can clean up data attached to a subrequest. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit cc3cb0a18da46a51d9fc173155576ba1d068e536 Author: David Howells Date: Wed Mar 9 11:01:12 2022 +0000 netfs: Allow the netfs to make the io (sub)request alloc larger Allow the network filesystem to specify extra space to be allocated on the end of the io (sub)request. This allows cifs, for example, to use this space rather than allocating its own cifs_readdata struct. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 87b57a048964abfd5f3d8b79bc55687327f5a380 Author: David Howells Date: Fri Mar 4 10:34:27 2022 +0000 netfs: Add a procfile to list in-progress requests Add a procfile, /proc/fs/netfs/requests, to list in-progress netfslib I/O requests. Signed-off-by: David Howells cc: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit c9c4ff12df110feb1b91951010f673f4b16e49e8 Author: David Howells Date: Mon Nov 27 13:58:07 2023 +0000 netfs: Move pinning-for-writeback from fscache to netfs Move the resource pinning-for-writeback from fscache code to netfslib code. This is used to keep a cache backing object pinned whilst we have dirty pages on the netfs inode in the pagecache such that VM writeback will be able to reach it. Whilst we're at it, switch the parameters of netfs_unpin_writeback() to match ->write_inode() so that it can be used for that directly. Note that this mechanism could be more generically useful than that for network filesystems. Quite often they have to keep around other resources (e.g. authentication tokens or network connections) until the writeback is complete. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org cc: linux-mm@kvack.org commit 7eb5b3e3a0a55f2d166ca949ef47ca6e0c704aab Author: David Howells Date: Tue Nov 21 15:43:52 2023 +0000 netfs, fscache: Move /proc/fs/fscache to /proc/fs/netfs and put in a symlink Rename /proc/fs/fscache to "netfs" and make a symlink from fscache to that. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: Christian Brauner cc: linux-fsdevel@vger.kernel.org cc: linux-cachefs@redhat.com commit 4498a8eccc97de3d65f876b6fdeddb439ef73abc Author: David Howells Date: Mon Nov 20 17:09:47 2023 +0000 netfs, fscache: Remove ->begin_cache_operation Remove ->begin_cache_operation() in favour of just calling fscache directly. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: Christian Brauner cc: linux-fsdevel@vger.kernel.org cc: linux-cachefs@redhat.com commit 915cd30cdea8811cddd8f59e57dd9dd0a814b76c Author: David Howells Date: Mon Nov 20 15:55:18 2023 +0000 netfs, fscache: Combine fscache with netfs Now that the fscache code is moved to be colocated with the netfslib code so that they combined into one module, do the combining. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: Christian Brauner cc: linux-fsdevel@vger.kernel.org cc: linux-cachefs@redhat.com cc: linux-nfs@vger.kernel.org, cc: linux-erofs@lists.ozlabs.org commit 2daa6404fd2f00985d5bfeb3c161f4630b46b6bf Author: David Howells Date: Thu Feb 23 15:24:24 2023 +0000 afs: Automatically generate trace tag enums Automatically generate trace tag enums from the symbol -> string mapping tables rather than having the enums as well, thereby reducing duplicated data. Signed-off-by: David Howells cc: Marc Dionne cc: Jeff Layton cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org commit 47757ea83a545536cdd418fec84b7a970710e48b Author: David Howells Date: Mon Nov 20 15:29:09 2023 +0000 netfs, fscache: Move fs/fscache/* into fs/netfs/ There's a problem with dependencies between netfslib and fscache as each wants to access some functions of the other. Deal with this by moving fs/fscache/* into fs/netfs/ and renaming those files to begin with "fscache-". For the moment, the moved files are changed as little as possible and an fscache module is still built. A subsequent patch will integrate them. Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: Christian Brauner cc: linux-fsdevel@vger.kernel.org cc: linux-cachefs@redhat.com commit a790c2584c02c5ce60db07ab601d55b7f539db34 Author: David Howells Date: Thu Feb 23 15:11:42 2023 +0000 afs: Remove whitespace before most ')' from the trace header checkpatch objects to whitespace before ')', so remove most of it from the afs trace header. Signed-off-by: David Howells cc: Marc Dionne cc: Jeff Layton cc: linux-afs@lists.infradead.org cc: linux-fsdevel@vger.kernel.org commit 9546b21ea672aa961d5a89ea754214afed013f02 Author: Randy Dunlap Date: Sun Dec 17 22:26:59 2023 -0800 watchdog: mlx_wdt: fix all kernel-doc warnings Correct kernel-doc warnings as reported by kernel test robot: mlx_wdt.c:56: warning: Function parameter or member 'wdt_type' not described in 'mlxreg_wdt' mlx_wdt.c:56: warning: Excess struct member 'device' description in 'mlxreg_wdt' mlx_wdt.c:56: warning: Excess struct member 'timeout' description in 'mlxreg_wdt' mlx_wdt.c:56: warning: Excess struct member 'wd_type' description in 'mlxreg_wdt' Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312171701.xNkzdgdi-lkp@intel.com/ Cc: Michael Shych Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: linux-watchdog@vger.kernel.org Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231218062659.26916-1-rdunlap@infradead.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 179c4acd55fb6cb9caa4d2eb6684e51ffebd6589 Author: Johan Hovold Date: Thu Nov 30 18:42:54 2023 +0100 dt-bindings: watchdog: qcom,pm8916-wdt: add parent spmi node to example The PM8916 watchdog is part of an SPMI PMIC, which lives on an SPMI bus. Add a parent SPMI bus node with an '#address-cells' of 2 and '#size-cells' of 0 instead of relying on the fact that the default number of register cells happen to match (i.e. 1 + 1). Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Reviewed-by: Wim Van Sebroeck Link: https://lore.kernel.org/r/20231130174254.13180-1-johan+linaro@kernel.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 1cb113c5d6c101ecf8b83c30b36ad50a5c8d0a8e Author: Nik Bune Date: Mon Nov 6 18:54:28 2023 +0100 dt-bindings: watchdog: nxp,pnx4008-wdt: convert txt to yaml Convert txt file to yaml. Add maintainers from git blame. Signed-off-by: Nik Bune Reviewed-by: Krzysztof Kozlowski Reviewed-by: Wim Van Sebroeck Link: https://lore.kernel.org/r/20231106175428.162256-1-n2h9z4@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 70f272bde8c31267288740fa8da587c74b03b33c Author: Nik Bune Date: Thu Nov 2 13:32:34 2023 +0100 dt-bindings: watchdog: qca,ar7130-wdt: convert txt to yaml Convert txt file to yaml. Add maintainers from git blame. Drop qca,ar9330-wdt from example of compatible property and leave only qca,ar7130-wdt, as description of property mentioned must be qca,ar7130-wdt. Signed-off-by: Nik Bune Reviewed-by: Krzysztof Kozlowski Reviewed-by: Wim Van Sebroeck Link: https://lore.kernel.org/r/20231102123234.62350-1-n2h9z4@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 31371c761ae56f4c2bd7cec9745c07365cb9d90c Author: Krzysztof Kozlowski Date: Sun Nov 5 19:41:54 2023 +0100 dt-bindings: watchdog: intel,keembay: reference common watchdog schema Reference common watchdog.yaml schema to allow "timeout-sec" property and enforce proper device node name. Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231105184154.43700-2-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0f108ccb55a1e23c81a0904daaaf3f34effa70df Author: Krzysztof Kozlowski Date: Sun Nov 5 19:41:53 2023 +0100 dt-bindings: watchdog: re-order entries to match coding convention The Devicetree bindings coding convention, as used in most of the files and expressed in Documentation/devicetree/bindings/example-schema.yaml, expects: 1. "allOf:" block just before "properties:" (or after "required:" for more complex cases), 2. additionalProperties/unevaluatedProperties at the end of the file, just before the examples section. Re-order few schemas to match the convention to avoid repeating review comments for new patches using existing code as template. No functional changes. Signed-off-by: Krzysztof Kozlowski Acked-by: Guenter Roeck Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231105184154.43700-1-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 435e84ec2009bf40625ee7ca1f8453d3b22edf75 Author: Andreas Kemnade Date: Sun Dec 24 00:04:23 2023 -0800 Input: zforce_ts - accept standard touchscreen properties Only driver-specific properties were accepted, change it to use the now-available standard properties. Signed-off-by: Andreas Kemnade Link: https://lore.kernel.org/r/20231223221213.774868-4-andreas@kemnade.info Signed-off-by: Dmitry Torokhov commit cc040e42fed8e80409ac5cf8663f0cd9b7951028 Author: Andreas Kemnade Date: Sun Dec 24 00:04:12 2023 -0800 dt-bindings: touchscreen: neonode,zforce: Use standard properties Enable touchscreen orientation to be specified by using standard properties. Signed-off-by: Andreas Kemnade Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231223221213.774868-3-andreas@kemnade.info Signed-off-by: Dmitry Torokhov commit ad7ced12a08b5cf8fd0df7d0f764d4801a2b545a Author: Andreas Kemnade Date: Sun Dec 24 00:04:00 2023 -0800 dt-bindings: touchscreen: convert neonode,zforce to json-schema Convert Neonode infrared touchscreen controller binding to DT schema. Signed-off-by: Andreas Kemnade Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231223221213.774868-2-andreas@kemnade.info Signed-off-by: Dmitry Torokhov commit 58824fa0087e1cb732edbf1f112a5ea0b2205c8b Author: Namhyung Kim Date: Tue Dec 12 16:13:23 2023 -0800 perf annotate: Add --insn-stat option for debugging This is for a debugging purpose. It'd be useful to see per-instrucion level success/failure stats. $ perf annotate --data-type --insn-stat Annotate Instruction stats total 264, ok 143 (54.2%), bad 121 (45.8%) Name : Good Bad ----------------------------------------------------------- movq : 45 31 movl : 22 11 popq : 0 19 cmpl : 16 3 addq : 8 7 cmpq : 11 3 cmpxchgl : 3 7 cmpxchgq : 8 0 incl : 3 3 movzbl : 4 2 incq : 4 2 decl : 6 0 ... Committer notes: So these are about being able to find the type for accesses from these instructions, we should improve the naming, but it is for debugging, we can improve this later: @@ -3726,6 +3759,10 @@ struct annotated_data_type *hist_entry__get_data_type(struct hist_entry *he) continue; mem_type = find_data_type(ms, ip, op_loc->reg, op_loc->offset); + if (mem_type) + istat->good++; + else + istat->bad++; Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-18-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 61a9741e9f78c64c5178e4ae9d405eeceff04c8f Author: Namhyung Kim Date: Tue Dec 12 16:13:22 2023 -0800 perf annotate: Add --type-stat option for debugging The --type-stat option is to be used with --data-type and to print detailed failure reasons for the data type annotation. $ perf annotate --data-type --type-stat Annotate data type stats: total 294, ok 116 (39.5%), bad 178 (60.5%) ----------------------------------------------------------- 30 : no_sym 40 : no_insn_ops 33 : no_mem_ops 63 : no_var 4 : no_typeinfo 8 : bad_offset Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-17-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 227ad323854ab48d45966461d7a0a94e03f19368 Author: Namhyung Kim Date: Tue Dec 12 16:13:21 2023 -0800 perf annotate: Support event group display When events are grouped together, it'd be natural to show them at once like in other mode. Handle group leaders with members to collect the number of samples together and display like below: $ perf annotate --data-type --group ... Annotate type: 'struct page' in vmlinux (1 samples): event[0] = cpu/mem-loads,ldlat=30/P event[1] = cpu/mem-stores/P event[2] = dummy:u ============================================================================ samples offset size field 1 0 0 0 64 struct page { 0 0 0 0 8 long unsigned int flags; 0 0 0 8 40 union { 0 0 0 8 40 struct { 0 0 0 8 16 union { 0 0 0 8 16 struct list_head lru { 0 0 0 8 8 struct list_head* next; 0 0 0 16 8 struct list_head* prev; }; 0 0 0 8 16 struct { 0 0 0 8 8 void* __filler; 0 0 0 16 4 unsigned int mlock_count; }; 0 0 0 8 16 struct list_head buddy_list { 0 0 0 8 8 struct list_head* next; 0 0 0 16 8 struct list_head* prev; }; Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-16-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 263925bf843f5ca8257317d74992f8e6b7d222e3 Author: Namhyung Kim Date: Tue Dec 12 16:13:20 2023 -0800 perf annotate: Add --data-type option Support data type annotation with new --data-type option. It internally uses type sort key to collect sample histogram for the type and display every members like below. $ perf annotate --data-type ... Annotate type: 'struct cfs_rq' in [kernel.kallsyms] (13 samples): ============================================================================ samples offset size field 13 0 640 struct cfs_rq { 2 0 16 struct load_weight load { 2 0 8 unsigned long weight; 0 8 4 u32 inv_weight; }; 0 16 8 unsigned long runnable_weight; 0 24 4 unsigned int nr_running; 1 28 4 unsigned int h_nr_running; ... For simplicity it prints the number of samples per field for now. But it should be easy to show the overhead percentage instead. The number at the outer struct is a sum of the numbers of the inner members. For example, struct cfs_rq got total 13 samples, and 2 came from the load (struct load_weight) and 1 from h_nr_running. Similarly, the struct load_weight got total 2 samples and they all came from the weight field. I've added two new flags in the symbol_conf for this. The annotate_data_member is to get the members of the type. This is also needed for perf report with typeoff sort key. The annotate_data_sample is to update sample stats for each offset and used only in annotate. Currently it only support stdio output mode, TUI support can be added later. Committer testing: With the perf.data from the previous csets, a very simple, short duration one: # perf annotate --data-type Annotate type: 'struct list_head' in [kernel.kallsyms] (1 samples): ============================================================================ samples offset size field 1 0 16 struct list_head { 0 0 8 struct list_head* next; 1 8 8 struct list_head* prev; }; Annotate type: 'char' in [kernel.kallsyms] (1 samples): ============================================================================ samples offset size field 1 0 1 char ; # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-15-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e2c1c8ff2d2ffec340b8fc73ee13b8fb516d1c6d Author: Namhyung Kim Date: Tue Dec 12 16:13:19 2023 -0800 perf report: Add 'symoff' sort key The symoff sort key is to print symbol and offset of sample. This is useful for data type profiling to show exact instruction in the function which refers the data. $ perf report -s type,sym,typeoff,symoff --hierarchy ... # Overhead Data Type / Symbol / Data Type Offset / Symbol Offset # .............. ..................................................... # 1.23% struct cfs_rq 0.84% update_blocked_averages 0.19% struct cfs_rq +336 (leaf_cfs_rq_list.next) 0.19% [k] update_blocked_averages+0x96 0.19% struct cfs_rq +0 (load.weight) 0.14% [k] update_blocked_averages+0x104 0.04% [k] update_blocked_averages+0x31c 0.17% struct cfs_rq +404 (throttle_count) 0.12% [k] update_blocked_averages+0x9d 0.05% [k] update_blocked_averages+0x1f9 0.08% struct cfs_rq +272 (propagate) 0.07% [k] update_blocked_averages+0x3d3 0.02% [k] update_blocked_averages+0x45b ... Committer testing: # perf report --stdio -s type,typeoff,symoff # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 4 of event 'cpu_atom/mem-loads,ldlat=30/P' # Event count (approx.): 7 # # Overhead Data Type Data Type Offset Symbol Offset # ........ ......... ................ ............. # 42.86% struct list_head struct list_head +8 (prev) [k] __list_del_entry_valid_or_report+0x7 28.57% (unknown) (unknown) +0 (no field) [.] _nl_intern_locale_data+0x25 14.29% char char +0 (no field) [k] strncpy_from_user+0xa5 14.29% (unknown) (unknown) +0 (no field) [.] _dl_lookup_symbol_x+0x50 # # (Tip: To change sampling frequency to 100 Hz: perf record -F 100) # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-14-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 871304a79f755b2ab594bbd21857ecb4c4aa57c9 Author: Namhyung Kim Date: Tue Dec 12 16:13:18 2023 -0800 perf report: Add 'typeoff' sort key The typeoff sort key shows the data type name, offset and the name of the field. This is useful to see which field in the struct is accessed most frequently. $ perf report -s type,typeoff --hierarchy --stdio ... # Overhead Data Type / Data Type Offset # ............ ............................ # ... 1.23% struct cfs_rq 0.19% struct cfs_rq +404 (throttle_count) 0.19% struct cfs_rq +0 (load.weight) 0.19% struct cfs_rq +336 (leaf_cfs_rq_list.next) 0.09% struct cfs_rq +272 (propagate) 0.09% struct cfs_rq +196 (removed.nr) 0.09% struct cfs_rq +80 (curr) 0.09% struct cfs_rq +544 (lt_b_children_throttled) 0.06% struct cfs_rq +320 (rq) Committer testing: Again with the perf.data from the previous csets: # perf report --stdio -s type,typeoff # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 4 of event 'cpu_atom/mem-loads,ldlat=30/P' # Event count (approx.): 7 # # Overhead Data Type Data Type Offset # ........ ......... ................ # 42.86% struct list_head struct list_head +8 (prev) 42.86% (unknown) (unknown) +0 (no field) 14.29% char char +0 (no field) # # (Tip: To see callchains in a more compact form: perf report -g folded) # # perf report --stdio -s dso,type,typeoff # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 4 of event 'cpu_atom/mem-loads,ldlat=30/P' # Event count (approx.): 7 # # Overhead Shared Object Data Type Data Type Offset # ........ .................... ......... ................ # 42.86% [kernel.kallsyms] struct list_head struct list_head +8 (prev) 28.57% libc.so.6 (unknown) (unknown) +0 (no field) 14.29% [kernel.kallsyms] char char +0 (no field) 14.29% ld-linux-x86-64.so.2 (unknown) (unknown) +0 (no field) # # (Tip: If you have debuginfo enabled, try: perf report -s sym,srcline) # # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-13-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9bd7ddd1576164fbb8d369c6a7b018af9544e202 Author: Namhyung Kim Date: Tue Dec 12 16:13:17 2023 -0800 perf annotate-data: Update sample histogram for type The annotated_data_type__update_samples() to get histogram for data type access. It'll be called by perf annotate to show which fields in the data type are accessed frequently. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-12-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4a111cadac85362ed9476737d7a36e8dd3a8e476 Author: Namhyung Kim Date: Tue Dec 12 16:13:16 2023 -0800 perf annotate-data: Add member field in the data type Add child member field if the current type is a composite type like a struct or union. The member fields are linked in the children list and do the same recursively if the child itself is a composite type. Add 'self' member to the annotated_data_type to handle the members in the same way. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-11-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 81e57deec32594b124d777b1d3ca8a1415410230 Author: Namhyung Kim Date: Tue Dec 12 16:13:15 2023 -0800 perf report: Support data type profiling Enable type annotation when the 'type' sort key is used. It shows type of variables the samples access at the moment. Users can see which types are accessed frequently. $ perf report -s dso,type --stdio ... # Overhead Shared Object Data Type # ........ ................. ......... # 35.47% [kernel.kallsyms] (unknown) 1.62% [kernel.kallsyms] struct sched_entry 1.23% [kernel.kallsyms] struct cfs_rq 0.83% [kernel.kallsyms] struct task_struct 0.34% [kernel.kallsyms] struct list_head 0.30% [kernel.kallsyms] struct mem_cgroup ... Committer testing: With the perf.data file collected in the previous cset: # perf report --stdio -s type # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 4 of event 'cpu_atom/mem-loads,ldlat=30/P' # Event count (approx.): 7 # # Overhead Data Type # ........ ......... # 42.86% struct list_head 42.86% (unknown) 14.29% char # # (Tip: To record callchains for each sample: perf record -g) # # perf report --stdio -s dso,type # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 4 of event 'cpu_atom/mem-loads,ldlat=30/P' # Event count (approx.): 7 # # Overhead Shared Object Data Type # ........ .................... ......... # 42.86% [kernel.kallsyms] struct list_head 28.57% libc.so.6 (unknown) 14.29% [kernel.kallsyms] char 14.29% ld-linux-x86-64.so.2 (unknown) # # (Tip: Save output of perf stat using: perf stat record ) # # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2f2c41bdd87f450a6a71c5d090d42c248ca4bf1e Author: Namhyung Kim Date: Tue Dec 12 16:13:14 2023 -0800 perf report: Add 'type' sort key The 'type' sort key is to aggregate hist entries by data type they access. Add mem_type field to hist_entry struct to save the type. If hist_entry__get_data_type() returns NULL, it'd use the 'unknown_type' instance. Committer testing: Before: # perf mem record sleep 2s [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.037 MB perf.data (4 samples) ] root@number:/home/acme/Downloads# perf report --stdio -s type Error: Unknown --sort key: `type' Usage: perf report [] -s, --sort sort by key(s): overhead overhead_sys overhead_us overhead_guest_sys overhead_guest_us overhead_children sample period pid comm dso symbol parent cpu socket srcline srcfile local_weight weight transaction trace symbol_size dso_size cgroup cgroup_id ipc_null time code_page_size local_ins_lat ins_lat local_p_stage_cyc p_stage_cyc addr local_retire_lat retire_lat simd dso_from dso_to symbol_from symbol_to mispredict abort in_tx cycles srcline_from srcline_to ipc_lbr addr_from addr_to symbol_daddr dso_daddr locked tlb mem snoop dcacheline symbol_iaddr phys_daddr data_page_size blocked # After: # perf report --stdio -s type # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 4 of event 'cpu_atom/mem-loads,ldlat=30/P' # Event count (approx.): 7 # # Overhead Data Type # ........ ......... # 100.00% (unknown) # # (Tip: Print event counts in CSV format with: perf stat -x,) # # rpm -q kernel-debuginfo kernel-debuginfo-6.6.4-200.fc39.x86_64 # uname -r 6.6.4-200.fc39.x86_64 # Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org> Cc: linux-trace-devel@vger.kernel.org> Link: https://lore.kernel.org/r/20231213001323.718046-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 67bc54bbc5a25c0488cc488558a11c14c10f5f14 Author: Namhyung Kim Date: Tue Dec 12 16:13:13 2023 -0800 perf annotate: Implement hist_entry__get_data_type() It's the function to find out the type info from the given sample data and will be called from the hist_entry sort logic when 'type' sort key is used. It first calls objdump to disassemble the instructions and figure out information about memory access at the location. Maybe we can do it better by analyzing the instruction directly, but I'll leave it for later work. The memory access is determined by checking instruction operands to have "(" and then extract register name and offset. It'll return NULL if no data type is found. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3a0c26edc3d2f39da3a91eb6eae404253e7ccbaa Author: Namhyung Kim Date: Tue Dec 12 16:13:12 2023 -0800 perf annotate: Add annotate_get_insn_location() The annotate_get_insn_location() is to get the detailed information of instruction locations like registers and offset. It has source and target operands locations in an array. Each operand can have a register and an offset. The offset is meaningful when mem_ref flag is set. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0669729eb0afb0cf55fe1b97d7a8b1315354910f Author: Namhyung Kim Date: Tue Dec 12 16:13:11 2023 -0800 perf annotate: Factor out evsel__get_arch() The evsel__get_arch() is to get architecture info from the environment. It'll be used by other places later so let's factor it out. Also add arch__is() to check the arch info by name. Committer notes: "get" is usually associated with refcounting, so we better rename this at some point to a better name. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fc044c53b99fad039ac30b95b289992ebf7dd6b4 Author: Namhyung Kim Date: Tue Dec 12 16:13:10 2023 -0800 perf annotate-data: Add dso->data_types tree To aggregate accesses to the same data type, add 'data_types' tree in DSO to maintain data types and find it by name and size. It might have different data types that happen to have the same name, so it also compares the size of the type. Even if it doesn't 100% guarantee, it reduces the possibility of mis-handling of such conflicts. And I don't think it's common to have different types with the same name. Committer notes: Very few cases on the Linux kernel, but there are some different types with the same name, unsure if there is a debug mode in libbpf dedup that warns about such cases, but there are provisions in pahole for that, see: "emit: Notice type shadowing, i.e. multiple types with the same name (enum, struct, union, etc)" https://git.kernel.org/pub/scm/devel/pahole/pahole.git/commit/?id=4f332dbfd02072e4f410db7bdcda8d6e3422974b $ pahole --compile > vmlinux.h $ rm -f a ; make a cc a.c -o a $ grep __[0-9] vmlinux.h union irte__1 { struct map_info__1; struct map_info__1 { struct map_info__1 * next; /* 0 8 */ $ drivers/iommu/amd/amd_iommu_types.h 'union irte' include/linux/dmar.h 'struct irte' include/linux/device-mapper.h: union map_info { void *ptr; }; include/linux/mtd/map.h: struct map_info { const char *name; unsigned long size; resource_size_t phys; kernel/events/uprobes.c: struct map_info { struct map_info *next; struct mm_struct *mm; unsigned long vaddr; }; Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b9c87f536c6f28c75ace8a014646faad00f0e1ec Author: Namhyung Kim Date: Tue Dec 12 16:13:09 2023 -0800 perf annotate-data: Add find_data_type() to get type from memory access The find_data_type() is to get a data type from the memory access at the given address (IP) using a register and an offset. It requires DWARF debug info in the DSO and searches the list of variables and function parameters in the scope. In a pseudo code, it does basically the following: find_data_type(dso, ip, reg, offset) { pc = map__rip_2objdump(ip); CU = dwarf_addrdie(dso->dwarf, pc); scopes = die_get_scopes(CU, pc); for_each_scope(S, scopes) { V = die_find_variable_by_reg(S, pc, reg); if (V && V.type == pointer_type) { T = die_get_real_type(V); if (offset < T.size) return T; } } return NULL; } Committer notes: The 'size' variable in check_variable() is 64-bit, so use PRIu64 and inttypes.h to debug it. Ditto at find_data_type_die(). Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7a18c0fff41ee60438ab2a1837d5b1a73ca2e2dd Merge: d9e5d31084b02 f567377e406c0 Author: Christian Brauner Date: Sat Dec 23 20:17:05 2023 +0100 Merge tag 'ovl-vfs-6.8' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs Pull backing file updates from Amir Goldstein: These patches essentially just lift some overlayfs code to common code. The motivation is to reuse common stacking code for the FUSE passthrough patches that I am shaping up for upstream. The FUSE passthrough work will be coming in over the next cycles. I have been testing those patches with my fuse-backing-fd development branch for quite some time and I think both you and Miklos gave a conceptual ACK to some version of this work. * tag 'ovl-vfs-6.8' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs: fs: factor out backing_file_mmap() helper fs: factor out backing_file_splice_{read,write}() helpers fs: factor out backing_file_{read,write}_iter() helpers fs: prepare for stackable filesystems backing file helpers Signed-off-by: Christian Brauner commit fbb66ce0b1d670c72def736a13ac9176b860df4e Author: Wang Jinchao Date: Thu Dec 14 13:20:29 2023 +0800 sched/fair: Remove unused 'next_buddy_marked' local variable in check_preempt_wakeup_fair() This variable became unused in: 5e963f2bd465 ("sched/fair: Commit to EEVDF") Signed-off-by: Wang Jinchao Signed-off-by: Ingo Molnar Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/202312141319+0800-wangjinchao@xfusion.com commit 3af7524b14198f5159a86692d57a9f28ec9375ce Author: Pierre Gondois Date: Wed Dec 6 10:00:43 2023 +0100 sched/fair: Use all little CPUs for CPU-bound workloads Running N CPU-bound tasks on an N CPUs platform: - with asymmetric CPU capacity - not being a DynamIq system (i.e. having a PKG level sched domain without the SD_SHARE_PKG_RESOURCES flag set) .. might result in a task placement where two tasks run on a big CPU and none on a little CPU. This placement could be more optimal by using all CPUs. Testing platform: Juno-r2: - 2 big CPUs (1-2), maximum capacity of 1024 - 4 little CPUs (0,3-5), maximum capacity of 383 Testing workload ([1]): Spawn 6 CPU-bound tasks. During the first 100ms (step 1), each tasks is affine to a CPU, except for: - one little CPU which is left idle. - one big CPU which has 2 tasks affine. After the 100ms (step 2), remove the cpumask affinity. Behavior before the patch: During step 2, the load balancer running from the idle CPU tags sched domains as: - little CPUs: 'group_has_spare'. Cf. group_has_capacity() and group_is_overloaded(), 3 CPU-bound tasks run on a 4 CPUs sched-domain, and the idle CPU provides enough spare capacity regarding the imbalance_pct - big CPUs: 'group_overloaded'. Indeed, 3 tasks run on a 2 CPUs sched-domain, so the following path is used: group_is_overloaded() \-if (sgs->sum_nr_running <= sgs->group_weight) return true; The following path which would change the migration type to 'migrate_task' is not taken: calculate_imbalance() \-if (env->idle != CPU_NOT_IDLE && env->imbalance == 0) as the local group has some spare capacity, so the imbalance is not 0. The migration type requested is 'migrate_util' and the busiest runqueue is the big CPU's runqueue having 2 tasks (each having a utilization of 512). The idle little CPU cannot pull one of these task as its capacity is too small for the task. The following path is used: detach_tasks() \-case migrate_util: \-if (util > env->imbalance) goto next; After the patch: As the number of failed balancing attempts grows (with 'nr_balance_failed'), progressively make it easier to migrate a big task to the idling little CPU. A similar mechanism is used for the 'migrate_load' migration type. Improvement: Running the testing workload [1] with the step 2 representing a ~10s load for a big CPU: Before patch: ~19.3s After patch: ~18s (-6.7%) Similar issue reported at: https://lore.kernel.org/lkml/20230716014125.139577-1-qyousef@layalina.io/ Suggested-by: Vincent Guittot Signed-off-by: Pierre Gondois Signed-off-by: Ingo Molnar Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Acked-by: Qais Yousef Link: https://lore.kernel.org/r/20231206090043.634697-1-pierre.gondois@arm.com commit 11137d384996bb05cf33c8163db271e1bac3f4bf Author: Vincent Guittot Date: Fri Dec 1 17:16:52 2023 +0100 sched/fair: Simplify util_est With UTIL_EST_FASTUP now being permanent, we can take advantage of the fact that the ewma jumps directly to a higher utilization at dequeue to simplify util_est and remove the enqueued field. Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Lukasz Luba Reviewed-by: Lukasz Luba Reviewed-by: Dietmar Eggemann Reviewed-by: Hongyan Xia Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20231201161652.1241695-3-vincent.guittot@linaro.org commit 7736ae5572eb344c090fbef9621a228e7e3d6276 Author: Vincent Guittot Date: Fri Dec 1 17:16:51 2023 +0100 sched/fair: Remove SCHED_FEAT(UTIL_EST_FASTUP, true) sched_feat(UTIL_EST_FASTUP) has been added to easily disable the feature in order to check for possibly related regressions. After 3 years, it has never been used and no regression has been reported. Let's remove it and make fast increase a permanent behavior. Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Lukasz Luba Reviewed-by: Lukasz Luba Reviewed-by: Dietmar Eggemann Reviewed-by: Hongyan Xia Reviewed-by: Tang Yizhou Reviewed-by: Yanteng Si [for the Chinese translation] Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20231201161652.1241695-2-vincent.guittot@linaro.org commit 1f023007f5e782bda19ad9104830c404fd622c5d Author: Vincent Guittot Date: Mon Dec 11 11:48:55 2023 +0100 arm64/amu: Use capacity_ref_freq() to set AMU ratio Use the new capacity_ref_freq() method to set the ratio that is used by AMU for computing the arch_scale_freq_capacity(). This helps to keep everything aligned using the same reference for computing CPUs capacity. The default value of the ratio (stored in per_cpu(arch_max_freq_scale)) ensures that arch_scale_freq_capacity() returns max capacity until it is set to its correct value with the cpu capacity and capacity_ref_freq(). Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Acked-by: Sudeep Holla Acked-by: Will Deacon Link: https://lore.kernel.org/r/20231211104855.558096-8-vincent.guittot@linaro.org commit 5477fa249b56c59c3baa1b237bf083cffa64c84a Author: Vincent Guittot Date: Mon Dec 11 11:48:54 2023 +0100 cpufreq/cppc: Set the frequency used for computing the capacity Save the frequency associated to the performance that has been used when initializing the capacity of CPUs. Also, cppc cpufreq driver can register an artificial energy model. In such case, it needs the frequency for this compute capacity. Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Pierre Gondois Acked-by: Sudeep Holla Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20231211104855.558096-7-vincent.guittot@linaro.org commit 50b813b147e9eb6546a1fc49d4e703e6d23691f2 Author: Vincent Guittot Date: Mon Dec 11 11:48:53 2023 +0100 cpufreq/cppc: Move and rename cppc_cpufreq_{perf_to_khz|khz_to_perf}() Move and rename cppc_cpufreq_perf_to_khz() and cppc_cpufreq_khz_to_perf() to use them outside cppc_cpufreq in topology_init_cpu_capacity_cppc(). Modify the interface to use struct cppc_perf_caps *caps instead of struct cppc_cpudata *cpu_data as we only use the fields of cppc_perf_caps. cppc_cpufreq was converting the lowest and nominal freq from MHz to kHz before using them. We move this conversion inside cppc_perf_to_khz and cppc_khz_to_perf to make them generic and usable outside cppc_cpufreq. No functional change Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Pierre Gondois Acked-by: Rafael J. Wysocki Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20231211104855.558096-6-vincent.guittot@linaro.org commit 15cbbd1d317e07b4e5c6aca5d4c5579539a82784 Author: Vincent Guittot Date: Mon Dec 11 11:48:52 2023 +0100 energy_model: Use a fixed reference frequency The last item of a performance domain is not always the performance point that has been used to compute CPU's capacity. This can lead to different target frequency compared with other part of the system like schedutil and would result in wrong energy estimation. A new arch_scale_freq_ref() is available to return a fixed and coherent frequency reference that can be used when computing the CPU's frequency for an level of utilization. Use this function to get this reference frequency. Energy model is never used without defining arch_scale_freq_ref() but can be compiled. Define a default arch_scale_freq_ref() returning 0 in such case. Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Lukasz Luba Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20231211104855.558096-5-vincent.guittot@linaro.org commit b3edde44e5d4504c23a176819865cd603fd16d6c Author: Vincent Guittot Date: Mon Dec 11 11:48:51 2023 +0100 cpufreq/schedutil: Use a fixed reference frequency cpuinfo.max_freq can change at runtime because of boost as an example. This implies that the value could be different than the one that has been used when computing the capacity of a CPU. The new arch_scale_freq_ref() returns a fixed and coherent reference frequency that can be used when computing a frequency based on utilization. Use this arch_scale_freq_ref() when available and fallback to policy otherwise. Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Lukasz Luba Reviewed-by: Lukasz Luba Reviewed-by: Dietmar Eggemann Acked-by: Rafael J. Wysocki Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20231211104855.558096-4-vincent.guittot@linaro.org commit 599457ba15403037b489fe536266a3d5f9efaed7 Author: Vincent Guittot Date: Mon Dec 11 11:48:50 2023 +0100 cpufreq: Use the fixed and coherent frequency for scaling capacity cpuinfo.max_freq can change at runtime because of boost as an example. This implies that the value could be different from the frequency that has been used to compute the capacity of a CPU. The new arch_scale_freq_ref() returns a fixed and coherent frequency that can be used to compute the capacity for a given frequency. [ Also fix a arch_set_freq_scale() newline style wart in . ] Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Lukasz Luba Reviewed-by: Lukasz Luba Acked-by: Viresh Kumar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20231211104855.558096-3-vincent.guittot@linaro.org commit 9942cb22ea458c34fa17b73d143ea32d4df1caca Author: Vincent Guittot Date: Mon Dec 11 11:48:49 2023 +0100 sched/topology: Add a new arch_scale_freq_ref() method Create a new method to get a unique and fixed max frequency. Currently cpuinfo.max_freq or the highest (or last) state of performance domain are used as the max frequency when computing the frequency for a level of utilization, but: - cpuinfo_max_freq can change at runtime. boost is one example of such change. - cpuinfo.max_freq and last item of the PD can be different leading to different results between cpufreq and energy model. We need to save the reference frequency that has been used when computing the CPUs capacity and use this fixed and coherent value to convert between frequency and CPU's capacity. In fact, we already save the frequency that has been used when computing the capacity of each CPU. We extend the precision to save kHz instead of MHz currently and we modify the type to be aligned with other variables used when converting frequency to capacity and the other way. [ mingo: Minor edits. ] Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Lukasz Luba Reviewed-by: Lukasz Luba Acked-by: Sudeep Holla Link: https://lore.kernel.org/r/20231211104855.558096-2-vincent.guittot@linaro.org commit d2e9f53ac5dd76dadc0b5f04f6c27640604ce2af Merge: 418146e39891e ceb6a6f023fd3 Author: Ingo Molnar Date: Sat Dec 23 15:52:13 2023 +0100 Merge tag 'v6.7-rc6' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit f567377e406c032fff0799bde4fdf4a977529b84 Author: Amir Goldstein Date: Fri Oct 13 12:49:37 2023 +0300 fs: factor out backing_file_mmap() helper Assert that the file object is allocated in a backing_file container so that file_user_path() could be used to display the user path and not the backing file's path in /proc//maps. Signed-off-by: Amir Goldstein commit 9b7e9e2f5d5c3d079ec46bc71b114012e362ea6e Author: Amir Goldstein Date: Fri Oct 13 12:13:12 2023 +0300 fs: factor out backing_file_splice_{read,write}() helpers There is not much in those helpers, but it makes sense to have them logically next to the backing_file_{read,write}_iter() helpers as they may grow more common logic in the future. Signed-off-by: Amir Goldstein commit a6293b3e285cd0d7692141d7981a5f144f0e2f0b Author: Amir Goldstein Date: Wed Nov 22 17:48:52 2023 +0200 fs: factor out backing_file_{read,write}_iter() helpers Overlayfs submits files io to backing files on other filesystems. Factor out some common helpers to perform io to backing files, into fs/backing-file.c. Suggested-by: Miklos Szeredi Link: https://lore.kernel.org/r/CAJfpeguhmZbjP3JLqtUy0AdWaHOkAPWeP827BBWwRFEAUgnUcQ@mail.gmail.com Signed-off-by: Amir Goldstein commit f91a704f7161c2cf0fcd41fa9fbec4355b813fff Author: Amir Goldstein Date: Mon Oct 2 17:19:46 2023 +0300 fs: prepare for stackable filesystems backing file helpers In preparation for factoring out some backing file io helpers from overlayfs, move backing_file_open() into a new file fs/backing-file.c and header. Add a MAINTAINERS entry for stackable filesystems and add a Kconfig FS_STACK which stackable filesystems need to select. For now, the backing_file struct, the backing_file alloc/free functions and the backing_file_real_path() accessor remain internal to file_table.c. We may change that in the future. Signed-off-by: Amir Goldstein commit 3eee606757ad82f32332a2da174aa032bfd9cc32 Author: Namhyung Kim Date: Tue Dec 12 16:13:08 2023 -0800 perf dwarf-regs: Add get_dwarf_regnum() The get_dwarf_regnum() returns a DWARF register number from a register name string according to the psABI. Also add two pseudo encodings of DWARF_REG_PC which is a register that are used by PC-relative addressing and DWARF_REG_FB which is a frame base register. They need to be handled in a special way. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 60cb19b485a534a896431393a877d853bbe51b67 Author: Namhyung Kim Date: Tue Dec 12 16:13:07 2023 -0800 perf dwarf-aux: Factor out die_get_typename_from_type() The die_get_typename_from_type() is to get the name of the given DIE in C-style type name. The difference from die_get_typename() is that it does not retrieve the DW_AT_type and use the given DIE directly. This will be used when users know the type DIE already. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231213001323.718046-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c9d98a562cafb6306c18e2544048ba909235d0ec Author: Randy Dunlap Date: Thu Dec 21 21:25:21 2023 -0800 virt: vbox: utils: fix all kernel-doc warnings Use kernel-doc format for functions that have comments that begin with "/**". This prevents 6 kernel-doc warnings. Signed-off-by: Randy Dunlap Cc: Hans de Goede Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231222052521.14333-3-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 2fd34a5d1df9e25edd87bc5805bf9c86aa4364fa Author: Randy Dunlap Date: Thu Dec 21 21:25:20 2023 -0800 virt: vbox: linux: fix all kernel-doc warnings Use kernel-doc format for functions that are almost complete in their kernel-doc comments. For other functions, just change the comment to a common C comment. This prevents 7 kernel-doc warnings. Signed-off-by: Randy Dunlap Cc: Hans de Goede Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231222052521.14333-2-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 8974a86d1edd9ae83e38c520d640ffc728092eac Author: Randy Dunlap Date: Thu Dec 21 21:25:19 2023 -0800 virt: vbox: core: fix all kernel-doc warnings Use kernel-doc format for functions that have comments that begin with "/**". This prevents 26 kernel-doc warnings. Signed-off-by: Randy Dunlap Cc: Hans de Goede Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231222052521.14333-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 7037f7141ce7f736aa2b96b48002c0a17bfcf741 Author: Andy Shevchenko Date: Thu Dec 21 16:44:47 2023 +0200 pvpanic: Don't use "proxy" headers Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko Reviewed-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20231221144447.2762077-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1760bfa7d7ca490cf8a61fe50ddeb1769cadd89e Author: Randy Dunlap Date: Fri Dec 22 21:06:36 2023 -0800 usb: linux/usb.h: fix Excess kernel-doc description warning Remove the @removable: line to prevent the kernel-doc warning: include/linux/usb.h:732: warning: Excess struct member 'removable' description in 'usb_device' Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20231223050636.14022-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit ae4d90f7ca49eb71f8a3dca64d06d4c4e2193705 Author: Randy Dunlap Date: Fri Dec 22 21:05:32 2023 -0800 driver core: device.h: fix Excess kernel-doc description warning Remove the @knode_class: line to prevent the kernel-doc warning: include/linux/device.h:807: warning: Excess struct member 'knode_class' description in 'device' Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20231223050532.13881-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 520adf3ba4a4bdd41450c57b17ef01f8a069fbfe Author: Randy Dunlap Date: Fri Dec 22 21:05:22 2023 -0800 driver core: class: fix Excess kernel-doc description warning Remove the @p: lines to prevent the kernel-doc warning: include/linux/device/class.h:72: warning: Excess struct member 'p' description in 'class' Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20231223050522.13867-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 9ebffbe2ad12b030b282796fed5117a182588c51 Author: Tree Davies Date: Fri Dec 22 17:59:42 2023 -0800 Staging: rtl8192e: Rename function rtllib_DisableNetMonitorMode() Rename function rtllib_DisableNetMonitorMode to rtllib_disable_net_monitor_mode to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-21-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 53156632ee3ceaf5a2c7a97505c24e9a8148b8d5 Author: Tree Davies Date: Fri Dec 22 17:59:41 2023 -0800 Staging: rtl8192e: Rename variable bInitState Rename variable bInitState to init_state to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-20-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 6a20007654b6fe4c60cae9cd157d2c49c2072fee Author: Tree Davies Date: Fri Dec 22 17:59:40 2023 -0800 Staging: rtl8192e: Rename variable skb_waitQ Rename variable skb_waitQ to skb_waitq to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-19-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 0edd0fb79ef6b8b6bf62c407dff276e2297abf36 Author: Tree Davies Date: Fri Dec 22 17:59:39 2023 -0800 Staging: rtl8192e: Rename variable BasicRate Rename variable BasicRate to basic_rate to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-18-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 66dda5e3e000e1a59af69f86672d963a5d0eae37 Author: Tree Davies Date: Fri Dec 22 17:59:38 2023 -0800 Staging: rtl8192e: Rename variable QueryRate Rename variable QueryRate to query_rate to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-17-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 8867af6775b58d152b4018f6156ab47cfa50e046 Author: Tree Davies Date: Fri Dec 22 17:59:37 2023 -0800 Staging: rtl8192e: Rename function rtllib_TURBO_Info() Rename function rtllib_TURBO_Info to rtllib_turbo_info to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-16-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 1ed0f611670d922bea2ac4c55878d73cb6d1fc0e Author: Tree Davies Date: Fri Dec 22 17:59:36 2023 -0800 Staging: rtl8192e: Rename function rtllib_WMM_Info() Rename function rtllib_WMM_Info to rtllib_wmm_info to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-15-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit d70c91a36e3111019bf0b18c4da7642867010abf Author: Tree Davies Date: Fri Dec 22 17:59:35 2023 -0800 Staging: rtl8192e: Rename function rtllib_MFIE_Grate() Rename function rtllib_MFIE_Grate to rtllib_mfie_grate to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-14-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 4f6054fb3d70b244984ac759003ecb552754fffb Author: Tree Davies Date: Fri Dec 22 17:59:34 2023 -0800 Staging: rtl8192e: Rename function rtllib_MFIE_Brate() Rename function rtllib_MFIE_Brate to rtllib_mfie_brate to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-13-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 75a946f9ac816caf394cdb71da2422d027010a3a Author: Tree Davies Date: Fri Dec 22 17:59:33 2023 -0800 Staging: rtl8192e: Fixup statement broken across 2 lines in rtllib_softmac_new_net() Join 2 lines to fix Warning: Lines should not end with a '(' Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-12-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 7fa14461160fe11cd57afa62d0f7f1b1ff328eb2 Author: Tree Davies Date: Fri Dec 22 17:59:32 2023 -0800 Staging: rtl8192e: Fixup statement broken across 2 lines in rtllib_softmac_xmit() Join 2 lines to fix Warning: Lines should not end with a '(' Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-11-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit afae5cd74171640bb677360b73d39559ea4a136a Author: Tree Davies Date: Fri Dec 22 17:59:31 2023 -0800 Staging: rtl8192e: Fix function definition broken across multiple lines Join 4 lines, so that function definition resides on a single line, to fix Warning: Lines should not end with a '(' Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-10-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit e946ef939ff73a80c6add269e46e33c378cd25bc Author: Tree Davies Date: Fri Dec 22 17:59:30 2023 -0800 Staging: rtl8192e: Fix statement broken across 2 lines in rtllib_rx_assoc_resp() Join 2 lines, so that statment resides on one line, to fix Warning: Lines should not end with a '(' Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-9-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 7d225068d3fe10818e8cb252f79c4e1ff368663d Author: Tree Davies Date: Fri Dec 22 17:59:29 2023 -0800 Staging: rtl8192e: Fixup multiple assinment in init_mgmt_queue() Break multiple assignment into 2 assignment statements to fix checkpatch Warning: multiple assignments should be avoided. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-8-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit eb2ebe15b83ead3d49a7087252c82cb1ddd7cace Author: Tree Davies Date: Fri Dec 22 17:59:28 2023 -0800 Staging: rtl8192e: Remove unnecessary parenthesis in rtllib_association_req() Remove parnthesis to fix checkpatch Warning: Unnecessary parentheses around ieee->ht_info->SelfHTCap Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit a87f009c4f897491246d9d8f8e5e8b644fb06342 Author: Tree Davies Date: Fri Dec 22 17:59:27 2023 -0800 Staging: rtl8192e: Remove unnecessary parenthesis in rtllib_ap_sec_type() Remove parnthesis to fix checkpatch Warning: Unnecessary parentheses around ieee->wpa_ie[14] Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit be0d49be0c97804ff051825e152c655ea02a774d Author: Tree Davies Date: Fri Dec 22 17:59:26 2023 -0800 Staging: rtl8192e: Remove unnecessary parenthesis in rtllib_rx_assoc_resp() Remove parentheses to fix checkpatch Warning: Unnecessary parentheses around resp->info_element[0].id Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 6bb7a078a0afdb0402bbfa6db3622c9212edbf1b Author: Tree Davies Date: Fri Dec 22 17:59:25 2023 -0800 Staging: rtl8192e: Remove unnecessary parenthesis in rtllib_association_req() Remove parentheses to fix checkpatch Warning: Unnecessary parentheses around hdr->info_element[0].id Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 1aa721a4648b71cee8159c5cb8af37518b8913fe Author: Tree Davies Date: Fri Dec 22 17:59:23 2023 -0800 Staging: rtl8192e: Remove unnecessary braces from MgntQuery_MgntFrameTxRate() Remove braces from if statement to fix checkpatch WARNING: 'braces {} are not necessary for single statement blocks' Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231223015942.418263-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit b249bedb76ddfb5634c1a68477ee5dd9cba60b69 Author: Ryan England Date: Thu Dec 21 20:22:48 2023 +0000 staging: rtl8712: fix open parentheses alignment Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Alignment should match open parenthesis Signed-off-by: Ryan England Link: https://lore.kernel.org/r/ZYSemFbzTlgLROMc@kernel.ryanengland.xyz Signed-off-by: Greg Kroah-Hartman commit 93235f62e8a1e111fc45c0143e0b27c6d6dd9cb6 Author: Gary Rookard Date: Thu Dec 21 13:34:13 2023 -0500 staging: rtl8192e: rename variable ePeerHTSpecVer Coding style issue, checkpatch Avoid CamelCase, rename it. ePeerHTSpecVer -> peer_ht_spec_ver Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231221183413.8349-6-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 35350898acc734b748b456a196a1e6eda316ef14 Author: Gary Rookard Date: Thu Dec 21 13:34:12 2023 -0500 staging: rtl8192e: rename variable HTSetConnectBwModeCallback Coding style issue, checkpatch Avoid CamelCase, rename it. HTSetConnectBwModeCallback -> ht_set_connect_bw_mode_callback Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231221183413.8349-5-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit b399e2397443b25ac6e0a83fa5daa1384cec4135 Author: Gary Rookard Date: Thu Dec 21 13:34:11 2023 -0500 staging: rtl8192e: rename variable HTCCheck Coding style issue, checkpatch Avoid CamelCase, rename it. HTCCheck -> ht_c_check Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231221183413.8349-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 0901e69611a1fbe03761d1024fd65b37aa33ab8d Author: Gary Rookard Date: Thu Dec 21 13:34:10 2023 -0500 staging: rtl8192e: rename variable HTResetSelfAndSavePeerSetting Coding style issue, checkpatch Avoid CamelCase, rename it. HTResetSelfAndSavePeerSetting -> ht_reset_self_and_save_peer_setting Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231221183413.8349-3-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 6911a08ce778bd15dd42306ab17594faf0ae6149 Author: Gary Rookard Date: Thu Dec 21 13:34:09 2023 -0500 staging: rtl8192e: rename variable HTInitializeBssDesc Coding style issue, checkpatch Avoid CamelCase, rename it. HTInitializeBssDesc -> ht_initialize_bss_desc Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231221183413.8349-2-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 5090a4bc2a2f04b7693b49500ad1287e8d0fb6c3 Author: Piro Yang Date: Wed Dec 20 01:04:47 2023 +0800 staging: vme_user: Fix the issue of return the wrong error code Fix the issue of returning the -ENOSYS error code when an error occurs. The error code of -ENOSYS indicates Invalid system call number, but there is not system call error. So replace -ENOSYS error code by the return -EINVAL error code. Signed-off-by: Piro Yang Link: https://lore.kernel.org/r/20231219170447.51237-1-piroyangg@gmail.com Signed-off-by: Greg Kroah-Hartman commit 907f999fc0e334b06f0d439c8a8bceff1fd4506a Merge: 228abb1d8e676 b7760cf94d4f2 Author: Greg Kroah-Hartman Date: Sat Dec 23 13:50:49 2023 +0100 Merge tag 'counter-updates-for-6.8a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next William writes: First set of Counter updates for the 6.8 cycle A new Counter tool is introduced to provide a generic and flexible way to watch Counter device events from userspace. * tag 'counter-updates-for-6.8a' of git://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter: tools/counter: Remove unneeded semicolon tools/counter: Fix spelling mistake "componend" -> "component" MAINTAINERS: add myself as counter watch events tool maintainer tools/counter: add a flexible watch events tool commit 228abb1d8e676ba809645b9764dd53959571ab8f Merge: b2231e4875e80 c849ecb2ae841 Author: Greg Kroah-Hartman Date: Sat Dec 23 13:49:44 2023 +0100 Merge tag 'fpga-for-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: FPGA Manager changes for 6.8-rc1 second part Not sure if it's too late for 6.8 rc1, but I try to speed up this intermediate change. - Uwe's change convert to new platform remove callback. All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun * tag 'fpga-for-6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: fpga: zynq-fpga: Convert to platform remove callback returning void fpga: xilinx-pr-decoupler: Convert to platform remove callback returning void fpga: stratix10-soc: Convert to platform remove callback returning void fpga: socfpga-a10: Convert to platform remove callback returning void fpga: of-fpga-region: Convert to platform remove callback returning void fpga: intel-m10-bmc-sec-update: Convert to platform remove callback returning void fpga: dfl-fme-region: Convert to platform remove callback returning void fpga: dfl-fme-main: Convert to platform remove callback returning void fpga: dfl-fme-br: Convert to platform remove callback returning void fpga: dfl-afu-main: Convert to platform remove callback returning void fpga: altera-hps2fpga: Convert to platform remove callback returning void fpga: altera-freeze-bridge: Convert to platform remove callback returning void fpga: altera-fpga2sdram: Convert to platform remove callback returning void commit b2231e4875e80de74e02f1664d5182242921acae Merge: e9215fcca2561 addb529540327 Author: Greg Kroah-Hartman Date: Sat Dec 23 13:48:17 2023 +0100 Merge tag 'icc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 6.8 This pull request contains the interconnect changes for the 6.8-rc1 merge window. These are just driver changes with the following highlights: Driver changes: - New interconnect driver for the SM8650 platform. - New interconnect driver for the SM6115 platform. - New interconnect driver for the X1E80100 (Snapdragon X Elite) platform. - Add compatible string for the BWMONv4 instance on the QCM2290 platform. - Complete the platform drivers conversion to the .remove_new callback returning void (mostly iMX, Exynos and the rest of Qcom drivers). Signed-off-by: Georgi Djakov * tag 'icc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: sm6115: Fix up includes dt-bindings: interconnect: qcom,msm8998-bwmon: Add QCM2290 bwmon instance dt-bindings: interconnect: qcom,msm8998-bwmon: Add SM6115 bwmon instance interconnect: qcom: Add SM6115 interconnect provider driver dt-bindings: interconnect: Add Qualcomm SM6115 NoC interconnect: qcom: Add X1E80100 interconnect provider driver dt-bindings: interconnect: Add Qualcomm X1E80100 SoC dt-bindings: interconnect: qcom-bwmon: document SM8650 BWMONs interconnect: qcom: introduce RPMh Network-On-Chip Interconnect on SM8650 SoC dt-bindings: interconnect: document the RPMh Network-On-Chip Interconnect in Qualcomm SM8650 SoC interconnect: exynos: Convert to platform remove callback returning void interconnect: qcom/smd-rpm: Convert to platform remove callback returning void interconnect: qcom/osm-l3: Convert to platform remove callback returning void interconnect: qcom/msm8974: Convert to platform remove callback returning void interconnect: imx8mq: Convert to platform remove callback returning void interconnect: imx8mp: Convert to platform remove callback returning void interconnect: imx8mn: Convert to platform remove callback returning void interconnect: imx8mm: Convert to platform remove callback returning void interconnect: qcom: Make qnoc_remove return void commit 10f7b1dcdfe05efcd26e90e337daf1bfd8f4a6da Author: Nina Schoetterl-Glausch Date: Tue Dec 19 15:08:52 2023 +0100 KVM: s390: cpu model: Use proper define for facility mask size Use the previously unused S390_ARCH_FAC_MASK_SIZE_U64 instead of S390_ARCH_FAC_LIST_SIZE_U64 for defining the fac_mask array. Note that both values are the same, there is no functional change. Reviewed-by: Claudio Imbrenda Reviewed-by: David Hildenbrand Reviewed-by: Janosch Frank Signed-off-by: Nina Schoetterl-Glausch Link: https://lore.kernel.org/r/20231219140854.1042599-4-nsg@linux.ibm.com Signed-off-by: Janosch Frank Message-ID: <20231219140854.1042599-4-nsg@linux.ibm.com> commit 682dbf430d27bc0e23d8d6921116b4f77f5dc9c6 Author: Nina Schoetterl-Glausch Date: Tue Dec 19 15:08:51 2023 +0100 KVM: s390: vsie: Fix length of facility list shadowed The length of the facility list accessed when interpretively executing STFLE is the same as the hosts facility list (in case of format-0) The memory following the facility list doesn't need to be accessible. The current VSIE implementation accesses a fixed length that exceeds the guest/host facility list length and can therefore wrongly inject a validity intercept. Instead, find out the host facility list length by running STFLE and copy only as much as necessary when shadowing. Acked-by: David Hildenbrand Reviewed-by: Claudio Imbrenda Acked-by: Heiko Carstens Signed-off-by: Nina Schoetterl-Glausch Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20231219140854.1042599-3-nsg@linux.ibm.com Signed-off-by: Janosch Frank Message-ID: <20231219140854.1042599-3-nsg@linux.ibm.com> commit 2731d605d5478052a10ac5a7c80f7aa7e1788cc5 Author: Nina Schoetterl-Glausch Date: Tue Dec 19 15:08:50 2023 +0100 KVM: s390: vsie: Fix STFLE interpretive execution identification STFLE can be interpretively executed. This occurs when the facility list designation is unequal to zero. Perform the check before applying the address mask instead of after. Fixes: 66b630d5b7f2 ("KVM: s390: vsie: support STFLE interpretation") Reviewed-by: Claudio Imbrenda Acked-by: David Hildenbrand Signed-off-by: Nina Schoetterl-Glausch Reviewed-by: Christian Borntraeger Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20231219140854.1042599-2-nsg@linux.ibm.com Signed-off-by: Janosch Frank Message-ID: <20231219140854.1042599-2-nsg@linux.ibm.com> commit aefebd19a8422eb9253cf137e526cc3b11c95a88 Author: Anshul Dalal Date: Fri Dec 22 00:01:08 2023 +0530 dt-bindings: input: convert drv266x to json-schema Convert devicetree binding documentation for ti drv2665 and drv2667 haptics driver to json-schema. The previously two separate bindings have been merged into a single drv266x.yaml. Signed-off-by: Anshul Dalal Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231221183109.684325-1-anshulusr@gmail.com Signed-off-by: Dmitry Torokhov commit 971740a4c3ac2692a8adb958d5f810c47f07e9b5 Author: Ville Syrjälä Date: Mon Dec 11 10:16:25 2023 +0200 drm: Warn when freeing a framebuffer that's still on a list Sprinkle some extra WARNs around so that we might catch premature framebuffer destruction more readily. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231211081625.25704-2-ville.syrjala@linux.intel.com Acked-by: Javier Martinez Canillas commit cb4daf271302d71a6b9a7c01bd0b6d76febd8f0c Author: Ville Syrjälä Date: Mon Dec 11 10:16:24 2023 +0200 drm: Don't unref the same fb many times by mistake due to deadlock handling If we get a deadlock after the fb lookup in drm_mode_page_flip_ioctl() we proceed to unref the fb and then retry the whole thing from the top. But we forget to reset the fb pointer back to NULL, and so if we then get another error during the retry, before the fb lookup, we proceed the unref the same fb again without having gotten another reference. The end result is that the fb will (eventually) end up being freed while it's still in use. Reset fb to NULL once we've unreffed it to avoid doing it again until we've done another fb lookup. This turned out to be pretty easy to hit on a DG2 when doing async flips (and CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y). The first symptom I saw that drm_closefb() simply got stuck in a busy loop while walking the framebuffer list. Fortunately I was able to convince it to oops instead, and from there it was easier to track down the culprit. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231211081625.25704-1-ville.syrjala@linux.intel.com Acked-by: Javier Martinez Canillas commit 191fcf77e304392cc330fc19595cb90fd52d595f Author: Bjorn Andersson Date: Thu Dec 21 20:47:16 2023 -0800 arm64: defconfig: Enable Qualcomm SC8280XP camera clock controller With the camera clock controller added to the DeviceTree of SC8280XP the interconnect providers no longer reaches sync_state, resulting in a noticeable reduction in battery life. Enable the camera clock controller (as a module) to avoid this, and hopefully soon provide some level of camera support. Signed-off-by: Bjorn Andersson Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20231221-enable-sc8280xp-camcc-v1-1-2249581dd538@quicinc.com Signed-off-by: Bjorn Andersson commit 3b83fa94cf316aaf9ad9a367ac8031a06d31649b Merge: d11db8ad38828 71150d9447c0f Author: David S. Miller Date: Sat Dec 23 01:18:59 2023 +0000 Merge branch 'dpaa2-switch-small-improvements' Ioana Ciornei says: ==================== dpaa2-switch: small improvements This patch set consists of a series of small improvements on the dpaa2-switch driver ranging from adding some more verbosity when encountering errors to reorganizing code to be easily extensible. Changes in v3: - 4/8: removed the fixes tag and moved it to the commit message - 5/8: specified that there is no user-visible effect - 6/8: removed the initialization of the err variable Changes in v2: - No changes to the actual diff, only rephrased some commit messages and added more information. ==================== Signed-off-by: David S. Miller commit 71150d9447c0f4d46403dca7342d149b626f0bc4 Author: Ioana Ciornei Date: Tue Dec 19 13:59:33 2023 +0200 dpaa2-switch: cleanup the egress flood of an unused FDB In case a DPAA2 switch interface joins a bridge, the FDB used on the port will be changed to the one associated with the bridge. What this means exactly is that any VLAN installed on the port will need to be removed and then installed back so that it points to the new FDB. Once this is done, the previous FDB will become unused (no VLAN to point to it). Even though no traffic will reach this FDB, it's best to just cleanup the state of the FDB by zeroing its egress flood domain. Reviewed-by: Simon Horman Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 6d46a4f10532ce59e88a58199b666cebf6625ec7 Author: Ioana Ciornei Date: Tue Dec 19 13:59:32 2023 +0200 dpaa2-switch: move a check to the prechangeupper stage Two different DPAA2 switch ports from two different DPSW instances cannot be under the same bridge. Instead of checking for this unsupported configuration in the CHANGEUPPER event, check it as early as possible in the PRECHANGEUPPER one. Reviewed-by: Simon Horman Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit a8150c9fb1d5c7ea190842ed8e5612ece0017e23 Author: Ioana Ciornei Date: Tue Dec 19 13:59:31 2023 +0200 dpaa2-switch: reorganize the [pre]changeupper events Create separate functions, dpaa2_switch_port_prechangeupper and dpaa2_switch_port_changeupper, to be called directly when a DPSW port changes its upper device. This way we are not open-coding everything in the main event callback and we can easily extent, for example, with bond offload. Signed-off-by: Ioana Ciornei Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit f6da276479c63ca29774bc331a537b92f0550c45 Author: Ioana Ciornei Date: Tue Dec 19 13:59:30 2023 +0200 dpaa2-switch: do not clear any interrupts automatically The DPSW object has multiple event sources multiplexed over the same IRQ. The driver has the capability to configure only some of these events to trigger the IRQ. The dpsw_get_irq_status() can clear events automatically based on the value stored in the 'status' variable passed to it. We don't want that to happen because we could get into a situation when we are clearing more events than we actually handled. Just resort to manually clearing the events that we handled. Also, since status is not used on the out path we remove its initialization to zero. This change does not have a user-visible effect because the dpaa2-switch driver enables and handles all the DPSW events which exist at the moment. Signed-off-by: Ioana Ciornei Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 77c42a3b0a3a68408976492d9e435a5adfeca5aa Author: Ioana Ciornei Date: Tue Dec 19 13:59:29 2023 +0200 dpaa2-switch: add ENDPOINT_CHANGED to the irq_mask Commit 84cba72956fd ("dpaa2-switch: integrate the MAC endpoint support") added support for MAC endpoints in the dpaa2-switch driver but omitted to add the ENDPOINT_CHANGED irq to the list of interrupt sources. Fix this by extending the list of events which can raise an interrupt by extending the mask passed to the dpsw_set_irq_mask() firmware API. There is no user visible impact even without this patch since whenever a switch interface is connected/disconnected from an endpoint both events are set (LINK_CHANGED and ENDPOINT_CHANGED) and, luckily, the LINK_CHANGED event could actually raise the interrupt and thus get the MAC/PHY SW configuration started. Even with this, it's better to just not rely on undocumented firmware behavior which can change. Signed-off-by: Ioana Ciornei Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit d50b1a8c3033bfb1cf97b0a8d0ce58e355c706e2 Author: Ioana Ciornei Date: Tue Dec 19 13:59:28 2023 +0200 dpaa2-switch: print an error when the vlan is already configured Print a netdev error when we hit a case in which a specific VLAN is already configured on the port. While at it, change the already existing netdev_warn into an _err for consistency purposes. Reviewed-by: Simon Horman Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 7218e963196e5f85008a8f86e5b4dd613fae0a4c Author: Ioana Ciornei Date: Tue Dec 19 13:59:27 2023 +0200 dpaa2-switch: declare the netdev as IFF_LIVE_ADDR_CHANGE capable There is no restriction around the change of the MAC address on the switch ports, thus declare the interface netdevs IFF_LIVE_ADDR_CHANGE capable. Reviewed-by: Simon Horman Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 365d0371a9ecf9f15fcf9e054e3bb7205603344d Author: Ioana Ciornei Date: Tue Dec 19 13:59:26 2023 +0200 dpaa2-switch: set interface MAC address only on endpoint change There is no point in updating the MAC address of a switch interface each time the link state changes, this only needs to happen in case the endpoint changes (the switch interface is [dis]connected from/to a MAC). Just move the call to dpaa2_switch_port_set_mac_addr() under DPSW_IRQ_EVENT_ENDPOINT_CHANGED. Reviewed-by: Simon Horman Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit d11db8ad388281cbf7aa3e6834253d844210f1e0 Merge: 2437c0f5147b8 e4918f9d48823 Author: David S. Miller Date: Sat Dec 23 01:01:20 2023 +0000 Merge branch 'am65-cpsw-preemption-coalescing' Roger Quadros says: ==================== net: ethernet: am65-cpsw: Add mqprio, frame preemption & coalescing This series adds mqprio qdisc offload in channel mode, Frame Preemption MAC merge support and RX/TX coalesing for AM65 CPSW driver. In v11 following changes were made - Fix patch "net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode" by including units.h Changelog information in each patch file. ==================== Signed-off-by: David S. Miller commit e4918f9d48823ea184534848d32a61a4fc02753f Author: Grygorii Strashko Date: Tue Dec 19 12:58:05 2023 +0200 net: ethernet: ti: am65-cpsw: add sw tx/rx irq coalescing based on hrtimers Add SW IRQ coalescing based on hrtimers for TX and RX data path which can be enabled by ethtool commands: - RX coalescing ethtool -C eth1 rx-usecs 50 - TX coalescing can be enabled per TX queue - by default enables coalesing for TX0 ethtool -C eth1 tx-usecs 50 - configure TX0 ethtool -Q eth0 queue_mask 1 --coalesce tx-usecs 100 - configure TX1 ethtool -Q eth0 queue_mask 2 --coalesce tx-usecs 100 - configure TX0 and TX1 ethtool -Q eth0 queue_mask 3 --coalesce tx-usecs 100 --coalesce tx-usecs 100 show configuration for TX0 and TX1: ethtool -Q eth0 queue_mask 3 --show-coalesce Comparing to gro_flush_timeout and napi_defer_hard_irqs, this patch allows to enable IRQ coalesing for RX path separately. Signed-off-by: Grygorii Strashko Signed-off-by: Roger Quadros Signed-off-by: David S. Miller commit 49a2eb90682469a7b171be79b2939e26091ce221 Author: Roger Quadros Date: Tue Dec 19 12:58:04 2023 +0200 net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support Add driver support for viewing / changing the MAC Merge sublayer parameters and seeing the verification state machine's current state via ethtool. As hardware does not support interrupt notification for verification events we resort to polling on link up. On link up we try a couple of times for verification success and if unsuccessful then give up. The Frame Preemption feature is described in the Technical Reference Manual [1] in section: 12.3.1.4.6.7 Intersperced Express Traffic (IET – P802.3br/D2.0) Due to Silicon Errata i2208 [2] we set limit min IET fragment size to 124 (excluding 4 bytes mCRC). [1] AM62x TRM - https://www.ti.com/lit/ug/spruiv7a/spruiv7a.pdf [2] AM62x Silicon Errata - https://www.ti.com/lit/er/sprz487c/sprz487c.pdf Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit bc8d62e16ec2f721f4edea12f2bbcf21405f43fa Author: Grygorii Strashko Date: Tue Dec 19 12:58:03 2023 +0200 net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode This patch adds MQPRIO Qdisc offload in full 'channel' mode which allows not only setting up pri:tc mapping, but also configuring TX shapers (rate-limiting) on external port FIFOs. The MQPRIO Qdisc offload is expected to work with or without VLAN/priority tagged packets. The CPSW external Port FIFO has 8 Priority queues. The rate-limit can be set for each of these priority queues. Which Priority queue a packet is assigned to depends on PN_REG_TX_PRI_MAP register which maps header priority to switch priority. The header priority of a packet is assigned via the RX_PRI_MAP_REG which maps packet priority to header priority. The packet priority is either the VLAN priority (for VLAN tagged packets) or the thread/channel offset. For simplicity, we assign the same priority queue to all queues of a Traffic Class so it can be rate-limited correctly. Configuration example: ethtool -L eth1 tx 5 ethtool --set-priv-flags eth1 p0-rx-ptype-rrobin off tc qdisc add dev eth1 parent root handle 100: mqprio num_tc 3 \ map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 \ queues 1@0 1@1 1@2 hw 1 mode channel \ shaper bw_rlimit min_rate 0 100mbit 200mbit max_rate 0 101mbit 202mbit tc qdisc replace dev eth2 handle 100: parent root mqprio num_tc 1 \ map 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 queues 1@0 hw 1 ip link add link eth1 name eth1.100 type vlan id 100 ip link set eth1.100 type vlan egress 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7 In the above example two ports share the same TX CPPI queue 0 for low priority traffic. 3 traffic classes are defined for eth1 and mapped to: TC0 - low priority, TX CPPI queue 0 -> ext Port 1 fifo0, no rate limit TC1 - prio 2, TX CPPI queue 1 -> ext Port 1 fifo1, CIR=100Mbit/s, EIR=1Mbit/s TC2 - prio 3, TX CPPI queue 2 -> ext Port 1 fifo2, CIR=200Mbit/s, EIR=2Mbit/s Signed-off-by: Grygorii Strashko Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8f5a7561069853166cd735e46c449f203d61bf18 Author: Roger Quadros Date: Tue Dec 19 12:58:02 2023 +0200 net: ethernet: am65-cpsw: Move register definitions to header file Move register definitions to header file. No functional change. Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1374841ad47724217f6e36510f7455602bd4bc90 Author: Roger Quadros Date: Tue Dec 19 12:58:01 2023 +0200 net: ethernet: ti: am65-cpsw: Move code to avoid forward declaration Move this code around to avoid forward declaration. No functional change. Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5db81bdc486da96cfbc6d2181dcdc91bacafc57b Author: Roger Quadros Date: Tue Dec 19 12:58:00 2023 +0200 net: ethernet: am65-cpsw: cleanup TAPRIO handling Handle offloading commands using switch-case in am65_cpsw_setup_taprio(). Move checks to am65_cpsw_taprio_replace(). Use NL_SET_ERR_MSG_MOD for error messages. Change error message from "Failed to set cycle time extension" to "cycle time extension not supported" Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit d0f9535b3182d4a918f5db01ea61b43c736463a7 Author: Roger Quadros Date: Tue Dec 19 12:57:59 2023 +0200 net: ethernet: am65-cpsw: Rename TI_AM65_CPSW_TAS to TI_AM65_CPSW_QOS We will use this Kconfig option to not only enable TAS/EST offload but also other QoS features like Multiqueue priority descriptors and MAC-Merge/Frame Preemption. TI_AM65_CPSW_QOS seems a more appropriate Kconfig option name than TI_AM65_CPSW_TAS. Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit c92b1321bbf3cd1285113838b45a9e3ea8a149b9 Author: Roger Quadros Date: Tue Dec 19 12:57:58 2023 +0200 net: ethernet: am65-cpsw: Build am65-cpsw-qos only if required Build am65-cpsw-qos only if CONFIG_TI_AM65_CPSW_TAS is enabled. Signed-off-by: Roger Quadros Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit c8659bd9d1c09300c6a30734d781096c1530c234 Author: Vladimir Oltean Date: Tue Dec 19 12:57:57 2023 +0200 selftests: forwarding: ethtool_mm: fall back to aggregate if device does not report pMAC stats Some devices do not support individual 'pmac' and 'emac' stats. For such devices, resort to 'aggregate' stats. Cc: Shuah Khan Signed-off-by: Vladimir Oltean Tested-by: Roger Quadros Signed-off-by: Roger Quadros Tested-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2491d66ae66cdd761c38563e17940a707d1b5e91 Author: Vladimir Oltean Date: Tue Dec 19 12:57:56 2023 +0200 selftests: forwarding: ethtool_mm: support devices with higher rx-min-frag-size Some devices have errata due to which they cannot report ETH_ZLEN (60) in the rx-min-frag-size. This was foreseen of course, and lldpad has logic that when we request it to advertise addFragSize 0, it will round it up to the lowest value that is _actually_ supported by the hardware. The problem is that the selftest expects lldpad to report back to us the same value as we requested. Make the selftest smarter by figuring out on its own what is a reasonable value to expect. Cc: Shuah Khan Signed-off-by: Vladimir Oltean Tested-by: Roger Quadros Signed-off-by: Roger Quadros Tested-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2437c0f5147b82b92075af6085b99051753f4a3c Merge: 6530b29f77c89 9d0b4ad82d611 Author: David S. Miller Date: Sat Dec 23 00:26:32 2023 +0000 Merge branch 'net-selftests-unique-namespace-last-part' Hangbin Liu says: ==================== Convert net selftests to run in unique namespace (last part) Here is the last part of converting net selftests to run in unique namespace. This part converts all left tests. After the conversion, we can run the net sleftests in parallel. e.g. # ./run_kselftest.sh -n -t net:reuseport_bpf TAP version 13 1..1 # selftests: net: reuseport_bpf ok 1 selftests: net: reuseport_bpf mod 10... # Socket 0: 0 # Socket 1: 1 ... # Socket 4: 19 # Testing filter add without bind... # SUCCESS # ./run_kselftest.sh -p -n -t net:cmsg_so_mark.sh -t net:cmsg_time.sh -t net:cmsg_ipv6.sh TAP version 13 1..3 # selftests: net: cmsg_so_mark.sh ok 1 selftests: net: cmsg_so_mark.sh # selftests: net: cmsg_time.sh ok 2 selftests: net: cmsg_time.sh # selftests: net: cmsg_ipv6.sh ok 3 selftests: net: cmsg_ipv6.sh # ./run_kselftest.sh -p -n -c net TAP version 13 1..95 # selftests: net: reuseport_bpf_numa ok 3 selftests: net: reuseport_bpf_numa # selftests: net: reuseport_bpf_cpu ok 2 selftests: net: reuseport_bpf_cpu # selftests: net: sk_bind_sendto_listen ok 9 selftests: net: sk_bind_sendto_listen # selftests: net: reuseaddr_conflict ok 5 selftests: net: reuseaddr_conflict ... Here is the part 1 link: https://lore.kernel.org/netdev/20231202020110.362433-1-liuhangbin@gmail.com part 2 link: https://lore.kernel.org/netdev/20231206070801.1691247-1-liuhangbin@gmail.com part 3 link: https://lore.kernel.org/netdev/20231213060856.4030084-1-liuhangbin@gmail.com ==================== Signed-off-by: David S. Miller commit 9d0b4ad82d6117e6d7ead50f64be54ec782aa1fe Author: Hangbin Liu Date: Tue Dec 19 17:48:56 2023 +0800 kselftest/runner.sh: add netns support Add a variable RUN_IN_NETNS if the user wants to run all the selected tests in namespace in parallel. With this, we can save a lot of testing time. Note that some tests may not fit to run in namespace, e.g. net/drop_monitor_tests.sh, as the dwdump needs to be run in init ns. I also added another parameter -p to make all the logs reported separately instead of mixing them in the stdout or output.log. Nit: the NUM in run_one is not used, rename it to test_num. Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 378f082eaf3760cd7430fbcb1e4f8626bb6bc0ae Author: Hangbin Liu Date: Tue Dec 19 17:48:55 2023 +0800 selftests/net: convert pmtu.sh to run it in unique namespace pmtu test use /bin/sh, so we need to source ./lib.sh instead of lib.sh Here is the test result after conversion. # ./pmtu.sh TEST: ipv4: PMTU exceptions [ OK ] TEST: ipv4: PMTU exceptions - nexthop objects [ OK ] TEST: ipv6: PMTU exceptions [ OK ] TEST: ipv6: PMTU exceptions - nexthop objects [ OK ] ... TEST: ipv4: list and flush cached exceptions - nexthop objects [ OK ] TEST: ipv6: list and flush cached exceptions [ OK ] TEST: ipv6: list and flush cached exceptions - nexthop objects [ OK ] TEST: ipv4: PMTU exception w/route replace [ OK ] TEST: ipv4: PMTU exception w/route replace - nexthop objects [ OK ] TEST: ipv6: PMTU exception w/route replace [ OK ] TEST: ipv6: PMTU exception w/route replace - nexthop objects [ OK ] Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 4416c5f53b439cec05a9ec88af71cb2e64a1e9aa Author: Hangbin Liu Date: Tue Dec 19 17:48:54 2023 +0800 selftests/net: use unique netns name for setup_loopback.sh setup_veth.sh The setup_loopback and setup_veth use their own way to create namespace. So let's just re-define server_ns/client_ns to unique name. At the same time update the namespace name in gro.sh and toeplitz.sh. As I don't have env to run toeplitz.sh. Here is only the gro test result. # ./gro.sh running test ipv4 data Expected {200 }, Total 1 packets Received {200 }, Total 1 packets. ... Gro::large test passed. All Tests Succeeded! Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 976fd1fe4f58ccb5762d1341a6e7524932a31557 Author: Hangbin Liu Date: Tue Dec 19 17:48:53 2023 +0800 selftests/net: convert xfrm_policy.sh to run it in unique namespace Here is the test result after conversion. # ./xfrm_policy.sh PASS: policy before exception matches PASS: ping to .254 bypassed ipsec tunnel (exceptions) PASS: direct policy matches (exceptions) PASS: policy matches (exceptions) PASS: ping to .254 bypassed ipsec tunnel (exceptions and block policies) PASS: direct policy matches (exceptions and block policies) PASS: policy matches (exceptions and block policies) PASS: ping to .254 bypassed ipsec tunnel (exceptions and block policies after hresh changes) PASS: direct policy matches (exceptions and block policies after hresh changes) PASS: policy matches (exceptions and block policies after hresh changes) PASS: ping to .254 bypassed ipsec tunnel (exceptions and block policies after hthresh change in ns3) PASS: direct policy matches (exceptions and block policies after hthresh change in ns3) PASS: policy matches (exceptions and block policies after hthresh change in ns3) PASS: ping to .254 bypassed ipsec tunnel (exceptions and block policies after htresh change to normal) PASS: direct policy matches (exceptions and block policies after htresh change to normal) PASS: policy matches (exceptions and block policies after htresh change to normal) PASS: policies with repeated htresh change Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 098f1ce08bbce6030e8c136f1efc753fd9199f33 Author: Hangbin Liu Date: Tue Dec 19 17:48:52 2023 +0800 selftests/net: convert stress_reuseport_listen.sh to run it in unique namespace Here is the test result after conversion. # ./stress_reuseport_listen.sh listen 24000 socks took 0.47714 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit d3b6b1116127123c15b85ce1ccd5f6d2d3317925 Author: Hangbin Liu Date: Tue Dec 19 17:48:51 2023 +0800 selftests/net: convert rtnetlink.sh to run it in unique namespace When running the test in namespace, the debugfs may not load automatically. So add a checking to make sure debugfs loaded. Here is the test result after conversion. # ./rtnetlink.sh PASS: policy routing PASS: route get ... PASS: address proto IPv4 PASS: address proto IPv6 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit f6476dedf08ded43bb9fb98ae634c2a1c56fdc06 Author: Hangbin Liu Date: Tue Dec 19 17:48:50 2023 +0800 selftests/net: convert netns-name.sh to run it in unique namespace This test will move the device to netns 1. Add a new test_ns to do this. Here is the test result after conversion. # ./netns-name.sh netns-name.sh [ OK ] Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit b84c2faeb986c73956fa897d14d2ecbc405abe08 Author: Hangbin Liu Date: Tue Dec 19 17:48:49 2023 +0800 selftests/net: convert gre_gso.sh to run it in unique namespace Here is the test result after conversion. # ./gre_gso.sh TEST: GREv6/v4 - copy file w/ TSO [ OK ] TEST: GREv6/v4 - copy file w/ GSO [ OK ] TEST: GREv6/v6 - copy file w/ TSO [ OK ] TEST: GREv6/v6 - copy file w/ GSO [ OK ] Tests passed: 4 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 6530b29f77c8960bd21639ce71070499d155396b Author: Jiapeng Chong Date: Tue Dec 19 13:54:04 2023 +0800 selftests/net: remove unneeded semicolon No functional modification involved. ./tools/testing/selftests/net/tcp_ao/setsockopt-closed.c:121:2-3: Unneeded semicolon. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7771 Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 185c1a489f873cb71520fc089401e02dbf302dcd Author: Dave Jiang Date: Thu Dec 21 15:04:23 2023 -0700 cxl: Check qos_class validity on memdev probe Add a check to make sure the qos_class for the device will match one of the root decoders qos_class. If no match is found, then the qos_class for the device is set to invalid. Also add a check to ensure that the device's host bridge matches to one of the root decoder's downstream targets. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319626313.2212653.9021004640856081917.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 42834b17cf1f00fa79ff1f02134f9c576a125252 Author: Dave Jiang Date: Thu Dec 21 15:04:16 2023 -0700 cxl: Export sysfs attributes for memory device QoS class Export qos_class sysfs attributes for the CXL memory device. The QoS clas should show up as /sys/bus/cxl/devices/memX/ram/qos_class for the volatile partition and /sys/bus/cxl/devices/memX/pmem/qos_class for the persistent partition. The QTG ID is retrieved via _DSM after supplying the calculated bandwidth and latency for the entire CXL path from device to the CPU. This ID is used to match up to the root decoder QoS class to determine which CFMWS the memory range of a hotplugged CXL mem device should be assigned under. While there may be multiple DSMAS exported by the device CDAT, the driver will only expose the first QTG ID per partition in sysfs for now. In the future when multiple QTG IDs are necessary, they can be exposed. [1] [1]: https://lore.kernel.org/linux-cxl/167571650007.587790.10040913293130712882.stgit@djiang5-mobl3.local/T/#md2a47b1ead3e1ba08f50eab29a4af1aed1d215ab Suggested-by: Dan Williams Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319625698.2212653.17544381274847420961.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 86557b7edf77d2a3835136c325c8baa6fe803234 Author: Dave Jiang Date: Thu Dec 21 15:04:11 2023 -0700 cxl: Store QTG IDs and related info to the CXL memory device context Once the QTG ID _DSM is executed successfully, the QTG ID is retrieved from the return package. Create a list of entries in the cxl_memdev context and store the QTG ID as qos_class token and the associated DPA range. This information can be exposed to user space via sysfs in order to help region setup for hot-plugged CXL memory devices. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319625109.2212653.11872111896220384056.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 7a4f148dd8d518bc1e012aa738b0ed6244959293 Author: Dave Jiang Date: Thu Dec 21 15:04:04 2023 -0700 cxl: Compute the entire CXL path latency and bandwidth data CXL Memory Device SW Guide [1] rev1.0 2.11.2 provides instruction on how to calculate latency and bandwidth for CXL memory device. Calculate minimum bandwidth and total latency for the path from the CXL device to the root port. The QTG id is retrieved by providing the performance data as input and calling the root port callback ->get_qos_class(). The retrieved id is stored with the cxl_port of the CXL device. For example for a device that is directly attached to a host bus: Total Latency = Device Latency (from CDAT) + Dev to Host Bus (HB) Link Latency + Generic Port Latency Min Bandwidth = Min bandwidth for link bandwidth between HB and CXL device, device CDAT bandwidth, and Generic Port Bandwidth For a device that has a switch in between host bus and CXL device: Total Latency = Device (CDAT) Latency + Dev to Switch Link Latency + Switch (CDAT) Latency + Switch to HB Link Latency + Generic Port Latency Min Bandwidth = Min bandwidth for link bandwidth between CXL device to CXL switch, CXL device CDAT bandwidth, CXL switch CDAT bandwidth, CXL switch to HB bandwidth, and Generic Port Bandwidth. [1]: https://cdrdv2-public.intel.com/643805/643805_CXL%20Memory%20Device%20SW%20Guide_Rev1p0.pdf Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319624458.2212653.13252496567443656371.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 14a6960b3e928ccea22d687fb0626237885a20bd Author: Dave Jiang Date: Thu Dec 21 15:03:58 2023 -0700 cxl: Add helper function that calculate performance data for downstream ports The CDAT information from the switch, Switch Scoped Latency and Bandwidth Information Structure (SSLBIS), is parsed and stored under a cxl_dport based on the correlated downstream port id from the SSLBIS entry. Walk the entire CXL port paths and collect all the performance data. Also pick up the link latency number that's stored under the dports. The entire path PCIe bandwidth can be retrieved using the pcie_bandwidth_available() call. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319623824.2212653.10302079766473698427.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 1037b82fccfe9c001ffa7a883651bb4cde7b705c Author: Dave Jiang Date: Thu Dec 21 15:03:51 2023 -0700 cxl: Store the access coordinates for the generic ports Each CXL host bridge is represented by an ACPI0016 device. A generic port device handle that is an ACPI device is represented by a string of ACPI0016 device HID and UID. Create a device handle from the ACPI device and retrieve the access coordinates from the stored memory targets. The access coordinates are stored under the cxl_dport that is associated with the CXL host bridge. The access coordinates struct is dynamically allocated under cxl_dport in order for code later on to detect whether the data exists or not. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319623196.2212653.17916695743464172534.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit f2202f990456acc52b50f6b14c95b232ac14429b Author: Dave Jiang Date: Thu Dec 21 15:03:45 2023 -0700 tools/testing/cxl: Add hostbridge UID string for cxl_test mock hb devices In order to support acpi_device_uid() call, add static string to acpi_device->pnp.unique_id. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319622564.2212653.1534465446670631698.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 826eb9bcc1844990e3c4a7c84846f1c1eaee0ed0 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Dec 19 02:03:05 2023 +0000 selftest/tcp-ao: Rectify out-of-tree build Trivial fix for out-of-tree build that I wasn't testing previously: 1. Create a directory for library object files, fixes: > gcc lib/kconfig.c -Wall -O2 -g -D_GNU_SOURCE -fno-strict-aliasing -I ../../../../../usr/include/ -iquote /tmp/kselftest/kselftest/net/tcp_ao/lib -I ../../../../include/ -o /tmp/kselftest/kselftest/net/tcp_ao/lib/kconfig.o -c > Assembler messages: > Fatal error: can't create /tmp/kselftest/kselftest/net/tcp_ao/lib/kconfig.o: No such file or directory > make[1]: *** [Makefile:46: /tmp/kselftest/kselftest/net/tcp_ao/lib/kconfig.o] Error 1 2. Include $(KHDR_INCLUDES) that's exported by selftests/Makefile, fixes: > In file included from lib/kconfig.c:6: > lib/aolib.h:320:45: warning: ‘struct tcp_ao_add’ declared inside parameter list will not be visible outside of this definition or declaration > 320 | extern int test_prepare_key_sockaddr(struct tcp_ao_add *ao, const char *alg, > | ^~~~~~~~~~ ... 3. While at here, clean-up $(KSFT_KHDR_INSTALL): it's not needed anymore since commit f2745dc0ba3d ("selftests: stop using KSFT_KHDR_INSTALL") 4. Also, while at here, drop .DEFAULT_GOAL definition: that has a self-explaining comment, that was valid when I made these selftests compile on local v4.19 kernel, but not needed since commit 8ce72dc32578 ("selftests: fix headers_install circular dependency") Fixes: cfbab37b3da0 ("selftests/net: Add TCP-AO library") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312190645.q76MmHyq-lkp@intel.com/ Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit 45248f29022922c300e5b48099500a58371f1eef Author: Jonathan Corbet Date: Mon Dec 18 17:28:13 2023 -0700 tipc: Remove some excess struct member documentation Remove documentation for nonexistent struct members, addressing these warnings: ./net/tipc/link.c:228: warning: Excess struct member 'media_addr' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'timer' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'refcnt' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'proto_msg' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'pmsg' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'backlog_limit' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'exp_msg_count' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'reset_rcv_checkpt' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'transmitq' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'snt_nxt' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'deferred_queue' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'unacked_window' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'next_out' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'long_msg_seq_no' description in 'tipc_link' ./net/tipc/link.c:228: warning: Excess struct member 'bc_rcvr' description in 'tipc_link' Signed-off-by: Jonathan Corbet Reviewed-by: Randy Dunlap Signed-off-by: David S. Miller commit dcc3e46472d678f4af5ce1194a23649231c5d241 Author: Jonathan Corbet Date: Mon Dec 18 17:26:26 2023 -0700 net: skbuff: Remove some excess struct-member documentation Remove documentation for nonexistent structure members, addressing these warnings: ./include/linux/skbuff.h:1063: warning: Excess struct member 'sp' description in 'sk_buff' ./include/linux/skbuff.h:1063: warning: Excess struct member 'nf_bridge' description in 'sk_buff' Signed-off-by: Jonathan Corbet Reviewed-by: Randy Dunlap Signed-off-by: David S. Miller commit cc2a7341994a5b46abd8a1e05ca018b88f29fe45 Author: Paul Moore Date: Thu Dec 21 17:18:58 2023 -0500 selinux: fix style issues in security/selinux/include/initial_sid_to_string.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit cea92163383709228207567ea4966954a136e3db Author: Paul Moore Date: Thu Dec 21 17:18:57 2023 -0500 selinux: fix style issues in security/selinux/include/xfrm.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit 7d1464bd1134461d4a6144b1514c2aa778af4f03 Author: Paul Moore Date: Thu Dec 21 17:18:56 2023 -0500 selinux: fix style issues in security/selinux/include/security.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit 376ef14d621d169534c143ef411d0b2303bb6f79 Author: Paul Moore Date: Thu Dec 21 17:18:55 2023 -0500 selinux: fix style issues with security/selinux/include/policycap_names.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit db896a00611d93e3f962dfc9b1c0b7788ec7952e Author: Paul Moore Date: Thu Dec 21 17:18:54 2023 -0500 selinux: fix style issues in security/selinux/include/policycap.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit c787022036663c538b14df6c5edcc2ab93a16eee Author: Paul Moore Date: Thu Dec 21 17:18:53 2023 -0500 selinux: fix style issues in security/selinux/include/objsec.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit 3e7773f8dabeb79a870d7d1155c395bf043498d0 Author: Paul Moore Date: Thu Dec 21 17:18:52 2023 -0500 selinux: fix style issues with security/selinux/include/netlabel.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit e04f8585d02242acb9ca418ad137c3f7a9429c13 Author: Paul Moore Date: Thu Dec 21 17:18:51 2023 -0500 selinux: fix style issues in security/selinux/include/netif.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit e5a4cc30cb9b04aad158cd3c905fbf5ce31c777c Author: Paul Moore Date: Thu Dec 21 17:18:50 2023 -0500 selinux: fix style issues in security/selinux/include/ima.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit ce4a781baec0d5393fa7da9e9588d12b482256e4 Author: Paul Moore Date: Thu Dec 21 17:18:49 2023 -0500 selinux: fix style issues in security/selinux/include/conditional.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit 27283b3118f4ab8e151f8c7c67ef6df00d9f40f9 Author: Paul Moore Date: Thu Dec 21 17:18:48 2023 -0500 selinux: fix style issues in security/selinux/include/classmap.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit 1d08fa8b9511153ec4fe06b166d65a700fbd0771 Author: Paul Moore Date: Thu Dec 21 17:18:47 2023 -0500 selinux: fix style issues in security/selinux/include/avc_ss.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit bb4e5993f1d5d9620b267a6a1ad345353860de6a Author: Paul Moore Date: Thu Dec 21 17:18:46 2023 -0500 selinux: align avc_has_perm_noaudit() prototype with definition A trivial correction to convert an 'unsigned' parameter into an 'unsigned int' parameter so the prototype matches the function definition. I really thought that someone submitted a patch for this a few years ago but sadly I can't find it now. Signed-off-by: Paul Moore commit bdaaf515ba8f38af6443d2e94ea3c7f502fe1b0e Author: Paul Moore Date: Thu Dec 21 17:18:45 2023 -0500 selinux: fix style issues in security/selinux/include/avc.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit e9b0748b6bb3deaeff967245d33117f29e12917c Author: Paul Moore Date: Thu Dec 21 17:18:44 2023 -0500 selinux: fix style issues in security/selinux/include/audit.h As part of on ongoing effort to perform more automated testing and provide more tools for individual developers to validate their patches before submitting, we are trying to make our code "clang-format clean". My hope is that once we have fixed all of our style "quirks", developers will be able to run clang-format on their patches to help avoid silly formatting problems and ensure their changes fit in well with the rest of the SELinux kernel code. Signed-off-by: Paul Moore commit 932b641837c8881a09b7b6f87d4f6925569d93e9 Author: Paul Moore Date: Wed Dec 20 11:53:49 2023 -0500 MAINTAINERS: drop Eric Paris from his SELinux role Eric Paris is an important part of SELinux history and we are all thankful not only for his stint as maintainer, but his numerous contributions over the years. Unfortunately for us, Eric has moved on to other things and hasn't contributed to the SELinux community in several years (his last SELinux kernel commit was in 2013) so it's time to officially drop Eric as a maintainer. I also want to get ahead of any claims of impropriety and state that this change has absolutely nothing to do with commit 2be4d74f2fd4 ;) Thanks for all you've done Eric, you'll always be welcome back. Reviewed-by: Stephen Smalley Signed-off-by: Paul Moore commit e24a6371282be83932b4254169bfb8216a8363ea Author: Paul Moore Date: Wed Dec 20 11:52:45 2023 -0500 MAINTAINERS: add Ondrej Mosnacek as a SELinux reviewer Add Ondrej as a trusted SELinux reviewer. Ondrej has a long history of providing quality SELinux kernel patches and we're lucky to have him as an official SELinux reviewer. Reviewed-by: Stephen Smalley Acked-by: Ondrej Mosnacek Signed-off-by: Paul Moore commit ea67677dbb0d30b993b15790d6cee24c900dd597 Author: Mark Brown Date: Fri Dec 22 14:54:37 2023 +0000 lsm: Add a __counted_by() annotation to lsm_ctx.ctx The ctx in struct lsm_ctx is an array of size ctx_len, tell the compiler about this using __counted_by() where supported to improve the ability to detect overflow issues. Reported-by: Aishwarya TCV Signed-off-by: Mark Brown Signed-off-by: Paul Moore commit 4d07a05397c8c15c37c8c3abb7afaea1dcd2f0e7 Author: Dave Jiang Date: Thu Dec 21 15:03:39 2023 -0700 cxl: Calculate and store PCI link latency for the downstream ports The latency is calculated by dividing the flit size over the bandwidth. Add support to retrieve the flit size for the CXL switch device and calculate the latency of the PCIe link. Cache the latency number with cxl_dport. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319621931.2212653.6800240203604822886.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 790815902ec61ba1715fd67d3cb9036e13c942bc Author: Dave Jiang Date: Thu Dec 21 15:03:32 2023 -0700 cxl: Add support for _DSM Function for retrieving QTG ID CXL spec v3.0 9.17.3 CXL Root Device Specific Methods (_DSM) Add support to retrieve QTG ID via ACPI _DSM call. The _DSM call requires an input of an ACPI package with 4 dwords (read latency, write latency, read bandwidth, write bandwidth). The call returns a package with 1 WORD that provides the max supported QTG ID and a package that may contain 0 or more WORDs as the recommended QTG IDs in the recommended order. Create a cxl_root container for the root cxl_port and provide a callback ->get_qos_class() in order to retrieve the QoS class. For the ACPI case, the _DSM helper is used to retrieve the QTG ID and returned. A devm_cxl_add_root() function is added for root port setup and registration of the cxl_root callback operation(s). Signed-off-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/170319621294.2212653.1649682083061569256.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 80aa780dda20618be76162bf991d49cf962fda38 Author: Dave Jiang Date: Thu Dec 21 15:03:26 2023 -0700 cxl: Add callback to parse the SSLBIS subtable from CDAT Provide a callback to parse the Switched Scoped Latency and Bandwidth Information Structure (SSLBIS) in the CDAT structures. The SSLBIS contains the bandwidth and latency information that's tied to the CXL switch that the data table has been read from. The extracted values are stored to the cxl_dport correlated by the port_id depending on the SSLBIS entry. Coherent Device Attribute Table 1.03 2.1 Switched Scoped Latency and Bandwidth Information Structure (DSLBIS) Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319620635.2212653.5194389158785365150.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 63cef81b9dca6ddf1c34d697016f830ddcfadf28 Author: Dave Jiang Date: Thu Dec 21 15:03:20 2023 -0700 cxl: Add callback to parse the DSLBIS subtable from CDAT Provide a callback to parse the Device Scoped Latency and Bandwidth Information Structure (DSLBIS) in the CDAT structures. The DSLBIS contains the bandwidth and latency information that's tied to a DSMAS handle. The driver will retrieve the read and write latency and bandwidth associated with the DSMAS which is tied to a DPA range. Coherent Device Attribute Table 1.03 2.1 Device Scoped Latency and Bandwidth Information Structure (DSLBIS) Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319620005.2212653.7475488478229720542.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit ad6f04c0269b0b7908f09621d3b3c90def39a297 Author: Dave Jiang Date: Thu Dec 21 15:03:13 2023 -0700 cxl: Add callback to parse the DSMAS subtables from CDAT Provide a callback function to the CDAT parser in order to parse the Device Scoped Memory Affinity Structure (DSMAS). Each DSMAS structure contains the DPA range and its associated attributes in each entry. See the CDAT specification for details. The device handle and the DPA range is saved and to be associated with the DSLBIS locality data when the DSLBIS entries are parsed. The xarray is a local variable. When the total path performance data is calculated and storred this xarray can be discarded. Coherent Device Attribute Table 1.03 2.1 Device Scoped memory Affinity Structure (DSMAS) Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/170319619355.2212653.2675953129671561293.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit ca53543d8e340070fb37fde93f36ed9012c76b90 Author: Dave Jiang Date: Thu Dec 21 15:03:07 2023 -0700 acpi: numa: Add helper function to retrieve the performance attributes Add helper to retrieve the performance attributes based on the device handle. The helper function is exported so the CXL driver can use that to acquire the performance data between the CPU and the CXL host bridge. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/170319618721.2212653.5552947472849081786.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit a3a3e341f169511823f7b2d140a0bdfbd620dcbd Author: Dave Jiang Date: Thu Dec 21 15:03:01 2023 -0700 acpi: numa: Add setting of generic port system locality attributes Add generic port support for the parsing of HMAT system locality sub-table. The attributes will be added to the third array member of the access coordinates in order to not mix with the existing memory attributes. It only provides the system locality attributes from initiator to the generic port targets and is missing the rest of the data to the actual memory device. The complete attributes will be updated when a memory device is attached and the system locality information is calculated end to end. Through hmat_update_target_attrs(), the best performance attributes will be setup in target->coord. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/170319618135.2212653.13778540010384821833.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 79205651120620c2683f90c25ef3d2ac8e454026 Author: Dave Jiang Date: Thu Dec 21 15:02:55 2023 -0700 acpi: Break out nesting for hmat_parse_locality() Refactor hmat_parse_locality() to break up the deep nesting of the function. Suggested-by: Jonathan Cameron Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/170319617537.2212653.10625501075519862509.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 6373c48b8c9dfb5c1e09fdb538e700d9cc91c45e Author: Dave Jiang Date: Thu Dec 21 15:02:49 2023 -0700 acpi: numa: Add genport target allocation to the HMAT parsing Add SRAT parsing for the HMAT init in order to collect the device handle from the Generic Port Affinity Structure. The device handle will serve as the key to search for target data. Consolidate the common code with alloc_memory_target() in a helper function alloc_target(). Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/170319616951.2212653.14862375982250406464.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 69b789b64456093819f730b3f9c13a593a5485d9 Author: Dave Jiang Date: Thu Dec 21 15:02:43 2023 -0700 acpi: numa: Create enum for memory_target access coordinates indexing Create enums to provide named indexing for the access coordinate array. This is in preparation for adding generic port support which will add a third index in the array to keep the generic port attributes separate from the memory attributes. Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/170319616332.2212653.3872789279950567889.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 6a954e94d038f41d79c4e04348c95774d1c9337d Author: Dave Jiang Date: Thu Dec 21 15:02:37 2023 -0700 base/node / acpi: Change 'node_hmem_attrs' to 'access_coordinates' Dan Williams suggested changing the struct 'node_hmem_attrs' to 'access_coordinates' [1]. The struct is a container of r/w-latency and r/w-bandwidth numbers. Moving forward, this container will also be used by CXL to store the performance characteristics of each link hop in the PCIE/CXL topology. So, where node_hmem_attrs is just the access parameters of a memory-node, access_coordinates applies more broadly to hardware topology characteristics. The observation is that seemed like an exercise in having the application identify "where" it falls on a spectrum of bandwidth and latency needs. For the tuple of read/write-latency and read/write-bandwidth, "coordinates" is not a perfect fit. Sometimes it is just conveying values in isolation and not a "location" relative to other performance points, but in the end this data is used to identify the performance operation point of a given memory-node. [2] Link: http://lore.kernel.org/r/64471313421f7_1b66294d5@dwillia2-xfh.jf.intel.com.notmuch/ Link: https://lore.kernel.org/linux-cxl/645e6215ee0de_1e6f2945e@dwillia2-xfh.jf.intel.com.notmuch/ Suggested-by: Dan Williams Reviewed-by: Dan Williams Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/170319615734.2212653.15319394025985499185.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 60e43fe5285e2077ce9904d78cd42a230d03b788 Author: Dave Jiang Date: Thu Dec 21 15:02:31 2023 -0700 lib/firmware_table: tables: Add CDAT table parsing support The CDAT table is very similar to ACPI tables when it comes to sub-table and entry structures. The helper functions can be also used to parse the CDAT table. Add support to the helper functions to deal with an external CDAT table, and also handle the endieness since CDAT can be processed by a BE host. Export a function cdat_table_parse() for CXL driver to parse a CDAT table. In order to minimize ACPICA code changes, __force is being utilized to deal with the case of a big endian (BE) host parsing a CDAT. All CDAT data structure variables are being force casted to __leX as appropriate. Cc: Rafael J. Wysocki Cc: Len Brown Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/170319615131.2212653.10932785667981494238.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit 5f12303528da5f369b8c3ecc3fb8e09a64478999 Merge: 67f440c05dd2f 8191792c18c55 Author: David S. Miller Date: Fri Dec 22 22:15:35 2023 +0000 Merge branch 'tcp-refactor-bhash2' Kuniyuki Iwashima says: ==================== tcp: Refactor bhash2 and remove sk_bind2_node. This series refactors code around bhash2 and remove some bhash2-specific fields; sock.sk_bind2_node, and inet_timewait_sock.tw_bind2_node. patch 1 : optimise bind() for non-wildcard v4-mapped-v6 address patch 2 - 4 : optimise bind() conflict tests patch 5 - 12 : Link bhash2 to bhash and unlink sk from bhash2 to remove sk_bind2_node The patch 8 will trigger a false-positive error by checkpatch. v2: resend of https://lore.kernel.org/netdev/20231213082029.35149-1-kuniyu@amazon.com/ * Rebase on latest net-next * Patch 11 * Add change in inet_diag_dump_icsk() for recent bhash dump patch v1: https://lore.kernel.org/netdev/20231023190255.39190-1-kuniyu@amazon.com/ ==================== Signed-off-by: David S. Miller commit 8191792c18c55ee444588100cf0464bd8c0bf5f3 Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:33 2023 +0900 tcp: Remove dead code and fields for bhash2. Now all sockets including TIME_WAIT are linked to bhash2 using sock_common.skc_bind_node. We no longer use inet_bind2_bucket.deathrow, sock.sk_bind2_node, and inet_timewait_sock.tw_bind2_node. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 770041d337a85923810dd3aeebea38037a28d534 Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:32 2023 +0900 tcp: Link sk and twsk to tb2->owners using skc_bind_node. Now we can use sk_bind_node/tw_bind_node for bhash2, which means we need not link TIME_WAIT sockets separately. The dead code and sk_bind2_node will be removed in the next patch. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit b2cb9f9ef240b4afaa1838b74fad077f17682f61 Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:31 2023 +0900 tcp: Unlink sk from bhash. Now we do not use tb->owners and can unlink sockets from bhash. sk_bind_node/tw_bind_node are available for bhash2 and will be used in the following patch. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 8002d44fe84dd7b98812aadcbc1bd897e270355c Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:30 2023 +0900 tcp: Check hlist_empty(&tb->bhash2) instead of hlist_empty(&tb->owners). We use hlist_empty(&tb->owners) to check if the bhash bucket has a socket. We can check the child bhash2 buckets instead. For this to work, the bhash2 bucket must be freed before the bhash bucket. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit b82ba728ccfecb4cee518199597598ef385b47d5 Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:29 2023 +0900 tcp: Iterate tb->bhash2 in inet_csk_bind_conflict(). Sockets in bhash are also linked to bhash2, but TIME_WAIT sockets are linked separately in tb2->deathrow. Let's replace tb->owners iteration in inet_csk_bind_conflict() with two iterations over tb2->owners and tb2->deathrow. This can be done safely under bhash's lock because socket insertion/ deletion in bhash2 happens with bhash's lock held. Note that twsk_for_each_bound_bhash() will be removed later. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 58655bc0ad7ccdd5b53319bcc091cb81b6aee7c3 Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:28 2023 +0900 tcp: Rearrange tests in inet_csk_bind_conflict(). The following patch adds code in the !inet_use_bhash2_on_bind(sk) case in inet_csk_bind_conflict(). To avoid adding nest and make the change cleaner, this patch rearranges tests in inet_csk_bind_conflict(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 822fb91fc724786372eed4f4397409c70afc08b8 Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:27 2023 +0900 tcp: Link bhash2 to bhash. bhash2 added a new member sk_bind2_node in struct sock to link sockets to bhash2 in addition to bhash. bhash is still needed to search conflicting sockets efficiently from a port for the wildcard address. However, bhash itself need not have sockets. If we link each bhash2 bucket to the corresponding bhash bucket, we can iterate the same set of the sockets from bhash2 via bhash. This patch links bhash2 to bhash only, and the actual use will be in the later patches. Finally, we will remove sk_bind2_node. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 4dd7108854304bd2052fa73e6889a5b1bbaca869 Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:26 2023 +0900 tcp: Rename tb in inet_bind2_bucket_(init|create)(). Later, we no longer link sockets to bhash. Instead, each bhash2 bucket is linked to the corresponding bhash bucket. Then, we pass the bhash bucket to bhash2 allocation functions as tb. However, tb is already used in inet_bind2_bucket_create() and inet_bind2_bucket_init() as the bhash2 bucket. To make the following diff clear, let's use tb2 for the bhash2 bucket there. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 5a22bba13d0162d278d6e31232259ddcce196b8e Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:25 2023 +0900 tcp: Save address type in inet_bind2_bucket. inet_bind2_bucket_addr_match() and inet_bind2_bucket_match_addr_any() are called for each bhash2 bucket to check conflicts. Thus, we call ipv6_addr_any() and ipv6_addr_v4mapped() over and over during bind(). Let's avoid calling them by saving the address type in inet_bind2_bucket. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 06a8c04f89949576b715f11350f1896b62cecb0a Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:24 2023 +0900 tcp: Save v4 address as v4-mapped-v6 in inet_bind2_bucket.v6_rcv_saddr. In bhash2, IPv4/IPv6 addresses are saved in two union members, which complicate address checks in inet_bind2_bucket_addr_match() and inet_bind2_bucket_match_addr_any() considering uninitialised memory and v4-mapped-v6 conflicts. Let's simplify that by saving IPv4 address as v4-mapped-v6 address and defining tb2.rcv_saddr as tb2.v6_rcv_saddr.s6_addr32[3]. Then, we can compare v6 address as is, and after checking v4-mapped-v6, we can compare v4 address easily. Also, we can remove tb2->family. Note these functions will be further refactored in the next patch. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 56f3e3f01f81dfb010598e01df033e8836f5c61a Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:23 2023 +0900 tcp: Rearrange tests in inet_bind2_bucket_(addr_match|match_addr_any)(). The protocol family tests in inet_bind2_bucket_addr_match() and inet_bind2_bucket_match_addr_any() are ordered as follows. if (sk->sk_family != tb2->family) else if (sk->sk_family == AF_INET6) else This patch rearranges them so that AF_INET6 socket is handled first to make the following patch tidy, where tb2->family will be removed. if (sk->sk_family == AF_INET6) else if (tb2->family == AF_INET6) else Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 5e07e672412bed473122813ab35d4f7d42fd9635 Author: Kuniyuki Iwashima Date: Tue Dec 19 09:18:22 2023 +0900 tcp: Use bhash2 for v4-mapped-v6 non-wildcard address. While checking port availability in bind() or listen(), we used only bhash for all v4-mapped-v6 addresses. But there is no good reason not to use bhash2 for v4-mapped-v6 non-wildcard addresses. Let's do it by returning true in inet_use_bhash2_on_bind(). Then, we also need to add a test in inet_bind2_bucket_match_addr_any() so that ::ffff:X.X.X.X will match with 0.0.0.0. Note that sk->sk_rcv_saddr is initialised for v4-mapped-v6 sk in __inet6_bind(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 67f440c05dd2fca9f26057e713d8618e23c4e021 Author: Colin Ian King Date: Mon Dec 18 13:30:22 2023 +0000 selftests/net: Fix various spelling mistakes in TCP-AO tests There are a handful of spelling mistakes in test messages in the TCP-AIO selftests. Fix these. Signed-off-by: Colin Ian King Reviewed-by: Dmitry Safonov Reviewed-by: Randy Dunlap Signed-off-by: David S. Miller commit 8e2f79f41a5d1b1a4a53ec524eb7609ca89f3c65 Author: Yauhen Kharuzhy Date: Wed Dec 20 01:15:03 2023 +0200 HID: sensor-hub: Enable hid core report processing for all devices After the commit 666cf30a589a ("HID: sensor-hub: Allow multi-function sensor devices") hub devices are claimed by hidraw driver in hid_connect(). This causes stoppping of processing HID reports by hid core due to optimization. In such case, the hid-sensor-custom driver cannot match a known custom sensor in hid_sensor_custom_get_known() because it try to check custom properties which weren't filled from the report because hid core didn't parsed it. As result, custom sensors like hinge angle sensor and LISS sensors don't work. Mark the sensor hub devices claimed by some driver to avoid hidraw-related optimizations. Fixes: 666cf30a589a ("HID: sensor-hub: Allow multi-function sensor devices") Cc: stable@vger.kernel.org Signed-off-by: Yauhen Kharuzhy Tested-by: Daniel Thompson Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20231219231503.1506801-1-jekhor@gmail.com Signed-off-by: Benjamin Tissoires commit da9065caa594d19b26e1a030fd0cc27bd365d685 Author: Gui-Dong Han <2045gemini@gmail.com> Date: Fri Dec 22 23:12:41 2023 +0800 Bluetooth: Fix atomicity violation in {min,max}_key_size_set In min_key_size_set(): if (val > hdev->le_max_key_size || val < SMP_MIN_ENC_KEY_SIZE) return -EINVAL; hci_dev_lock(hdev); hdev->le_min_key_size = val; hci_dev_unlock(hdev); In max_key_size_set(): if (val > SMP_MAX_ENC_KEY_SIZE || val < hdev->le_min_key_size) return -EINVAL; hci_dev_lock(hdev); hdev->le_max_key_size = val; hci_dev_unlock(hdev); The atomicity violation occurs due to concurrent execution of set_min and set_max funcs.Consider a scenario where setmin writes a new, valid 'min' value, and concurrently, setmax writes a value that is greater than the old 'min' but smaller than the new 'min'. In this case, setmax might check against the old 'min' value (before acquiring the lock) but write its value after the 'min' has been updated by setmin. This leads to a situation where the 'max' value ends up being smaller than the 'min' value, which is an inconsistency. This possible bug is found by an experimental static analysis tool developed by our team, BassCheck[1]. This tool analyzes the locking APIs to extract function pairs that can be concurrently executed, and then analyzes the instructions in the paired functions to identify possible concurrency bugs including data races and atomicity violations. The above possible bug is reported when our tool analyzes the source code of Linux 5.17. To resolve this issue, it is suggested to encompass the validity checks within the locked sections in both set_min and set_max funcs. The modification ensures that the validation of 'val' against the current min/max values is atomic, thus maintaining the integrity of the settings. With this patch applied, our tool no longer reports the bug, with the kernel configuration allyesconfig for x86_64. Due to the lack of associated hardware, we cannot test the patch in runtime testing, and just verify it according to the code logic. [1] https://sites.google.com/view/basscheck/ Fixes: 18f81241b74f ("Bluetooth: Move {min,max}_key_size debugfs ...") Cc: stable@vger.kernel.org Signed-off-by: Gui-Dong Han <2045gemini@gmail.com> Signed-off-by: Luiz Augusto von Dentz commit 3600860a719383a228f7c3e2648363d28ae478e2 Author: Jagan Teki Date: Tue Dec 19 23:05:47 2023 +0530 Bluetooth: Add device 13d3:3572 IMC Networks Bluetooth Radio This 13d3:3572 is part of Realtek RTW8852BE chip. The device table is: T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3572 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Jagan Teki Signed-off-by: Luiz Augusto von Dentz commit 96a3398b467ab8aada3df2f3a79f4b7835d068b8 Author: Frédéric Danis Date: Tue Dec 19 09:10:22 2023 +0100 Bluetooth: L2CAP: Fix possible multiple reject send In case of an incomplete command or a command with a null identifier 2 reject packets will be sent, one with the identifier and one with 0. Consuming the data of the command will prevent it. This allows to send a reject packet for each corrupted command in a multi-command packet. Signed-off-by: Frédéric Danis Signed-off-by: Luiz Augusto von Dentz commit d4b70ba1eab450eff9c5ef536f07c01d424b7eda Author: clancy shang Date: Mon Dec 18 18:24:17 2023 +0800 Bluetooth: hci_sync: fix BR/EDR wakeup bug when Bluetooth set the event mask and enter suspend, the controller has hci mode change event coming, it cause controller can not enter sleep mode. so it should to set the hci mode change event mask before enter suspend. Signed-off-by: clancy shang Signed-off-by: Luiz Augusto von Dentz commit 3c83800a6c5be446e35648ccaba7da88173acb37 Author: Francesco Dolcini Date: Mon Dec 11 17:40:20 2023 +0100 Bluetooth: btnxpuart: remove useless assignment Remove useless assignment of rx_skb to NULL in case the skb is in error, this is already done in h4_recv_buf() that is executed a few lines before. Signed-off-by: Francesco Dolcini Signed-off-by: Luiz Augusto von Dentz commit 64057f051f20c2a2184b9db7f8037d928d68a4f4 Author: Francesco Dolcini Date: Mon Dec 11 17:40:19 2023 +0100 Bluetooth: btmtkuart: fix recv_buf() return value Serdev recv_buf() callback is supposed to return the amount of bytes consumed, therefore an int in between 0 and count. Do not return negative number in case of issue, just print an error and return count. This fixes a WARN in ttyport_receive_buf(). Link: https://lore.kernel.org/all/087be419-ec6b-47ad-851a-5e1e3ea5cfcc@kernel.org/ Fixes: 7237c4c9ec92 ("Bluetooth: mediatek: Add protocol support for MediaTek serial devices") Signed-off-by: Francesco Dolcini Signed-off-by: Luiz Augusto von Dentz commit 94d05394254401e503867c16aff561d3e687dfdc Author: Francesco Dolcini Date: Mon Dec 11 17:40:18 2023 +0100 Bluetooth: btnxpuart: fix recv_buf() return value Serdev recv_buf() callback is supposed to return the amount of bytes consumed, therefore an int in between 0 and count. Do not return a negative number in case of issue, just print an error and return count. Before this change, in case of error, the returned negative number was internally converted to 0 in ttyport_receive_buf, now when the receive buffer is corrupted we return the size of the whole received data (`count`). This should allow for better recovery in case receiver/transmitter get out of sync if some data is lost. This fixes a WARN in ttyport_receive_buf(). Bluetooth: hci0: Frame reassembly failed (-84) ------------[ cut here ]------------ serial serial0: receive_buf returns -84 (count = 6) WARNING: CPU: 0 PID: 37 at drivers/tty/serdev/serdev-ttyport.c:37 ttyport_receive_buf+0xd8/0xf8 Modules linked in: mwifiex_sdio(+) ... CPU: 0 PID: 37 Comm: kworker/u4:2 Not tainted 6.7.0-rc2-00147-gf1a09972a45a #1 Hardware name: Toradex Verdin AM62 WB on Verdin Development Board (DT) Workqueue: events_unbound flush_to_ldisc pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : ttyport_receive_buf+0xd8/0xf8 lr : ttyport_receive_buf+0xd8/0xf8 ... Call trace: ttyport_receive_buf+0xd8/0xf8 flush_to_ldisc+0xbc/0x1a4 process_scheduled_works+0x16c/0x28c Closes: https://lore.kernel.org/all/ZWEIhcUXfutb5SY6@francesco-nb.int.toradex.com/ Fixes: 689ca16e5232 ("Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets") Signed-off-by: Francesco Dolcini Signed-off-by: Luiz Augusto von Dentz commit ca6d2adf8ded3eb3e64a01f339735c99e6c7260e Author: Zijun Hu Date: Fri Dec 8 09:51:27 2023 +0800 Bluetooth: qca: Support HFP offload for QCA2066 For QCA2066 HFP offload, HCI_Configure_Data_Path is not required since present HCI_Enhanced_Setup_Synchronous_Connection is enough to configure non-HCI data transport path when set both Input_Data_Path and Output_Data_Path parameters as 0x01, as is implemented by this change. Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz commit 132d0fd0b8418094c9e269e5bc33bf5b864f4a65 Author: Zijun Hu Date: Fri Dec 8 09:51:26 2023 +0800 Bluetooth: hci_conn: Check non NULL function before calling for HFP offload For some controllers such as QCA2066, it does not need to send HCI_Configure_Data_Path to configure non-HCI data transport path to support HFP offload, their device drivers may set hdev->get_codec_config_data as NULL, so Explicitly add this non NULL checking before calling the function. Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz commit 9f150019f176078144b02c4b9b9dbe7fd5a2fcc3 Author: Iulia Tanasescu Date: Tue Dec 5 18:11:40 2023 +0200 Bluetooth: ISO: Avoid creating child socket if PA sync is terminating When a PA sync socket is closed, the associated hcon is also unlinked and cleaned up. If there are no other hcons marked with the HCI_CONN_PA_SYNC flag, HCI_OP_LE_PA_TERM_SYNC is sent to controller. Between the time of the command and the moment PA sync is terminated in controller, residual BIGInfo reports might continue to come. This causes a new PA sync hcon to be added, and a new socket to be notified to user space. This commit fixs this by adding a flag on a Broadcast listening socket to mark when the PA sync child has been closed. This flag is checked when BIGInfo reports are indicated in iso_connect_ind, to avoid recreating a hcon and socket if residual reports arrive before PA sync is terminated. Signed-off-by: Iulia Tanasescu Signed-off-by: Luiz Augusto von Dentz commit d03376c185926098cb4d668d6458801eb785c0a5 Author: Luiz Augusto von Dentz Date: Thu Nov 30 14:58:03 2023 +0100 Bluetooth: Fix bogus check for re-auth no supported with non-ssp This reverts 19f8def031bfa50c579149b200bfeeb919727b27 "Bluetooth: Fix auth_complete_evt for legacy units" which seems to be working around a bug on a broken controller rather then any limitation imposed by the Bluetooth spec, in fact if there ws not possible to re-auth the command shall fail not succeed. Fixes: 19f8def031bf ("Bluetooth: Fix auth_complete_evt for legacy units") Signed-off-by: Luiz Augusto von Dentz commit a2e7707bba21b373c7b429ad7f9030d63dfb4542 Author: Kiran K Date: Mon Nov 27 10:12:02 2023 +0530 Bluetooth: btintel: Print firmware SHA1 Intel Read Version event contains a TLV(0x32) having firmware sha1 in operational image. Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz commit 78db544b5d276b70c6ea2c2909ffed96b10229a3 Author: Luiz Augusto von Dentz Date: Wed Sep 6 14:13:35 2023 -0700 Bluetooth: hci_core: Remove le_restart_scan work This removes le_restart_scan work and instead just disables controller duplicate filtering when discovery result_filtering is enabled and HCI_QUIRK_STRICT_DUPLICATE_FILTER is set. Link: https://github.com/bluez/bluez/issues/573 Link: https://github.com/bluez/bluez/issues/572 Signed-off-by: Luiz Augusto von Dentz commit ba9e401493148b82b0a74b89ee416851ede11a77 Author: Yuran Pereira Date: Tue Nov 21 22:06:36 2023 +0530 Bluetooth: Add documentation to exported functions in lib Most functions in `net/bluetooth/lib.c` lack propper documentation. This patch adds documentation to all exported functions in `net/bluetooth/lib.c`. Unnecessary or redundant comments are also removed to ensure the file looks clean. Signed-off-by: Yuran Pereira Signed-off-by: Luiz Augusto von Dentz commit 4e0a1d8b06751d9ea8357e1f29f6b31465856665 Author: Luiz Augusto von Dentz Date: Tue May 2 15:11:59 2023 -0700 Bluetooth: btusb: Don't suspend when there are connections This checks if there are connections before suspending since that may disrupt the connections making it stop receiving any data if remote wakeup is not enabled. Signed-off-by: Luiz Augusto von Dentz commit 5d192b697c7417254cdd9edc3d5e9e0364eb9045 Author: Zijun Hu Date: Mon Nov 6 14:02:46 2023 +0800 Bluetooth: qca: Set both WIDEBAND_SPEECH and LE_STATES quirks for QCA2066 Set both WIDEBAND_SPEECH_SUPPORTED and VALID_LE_STATES quirks for QCA2066. Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz commit fa224d0c094a458e9ebf5ea9b1c696136b7af427 Author: Iulia Tanasescu Date: Mon Nov 13 17:38:00 2023 +0200 Bluetooth: ISO: Reassociate a socket with an active BIS For ISO Broadcast, all BISes from a BIG have the same lifespan - they cannot be created or terminated independently from each other. This links together all BIS hcons that are part of the same BIG, so all hcons are kept alive as long as the BIG is active. If multiple BIS sockets are opened for a BIG handle, and only part of them are closed at some point, the associated hcons will be marked as open. If new sockets will later be opened for the same BIG, they will be reassociated with the open BIS hcons. All BIS hcons will be cleaned up and the BIG will be terminated when the last BIS socket is closed from userspace. Signed-off-by: Iulia Tanasescu Signed-off-by: Luiz Augusto von Dentz commit 80837140c1f2c05d566b49181785bced3ab6140e Author: Iulia Tanasescu Date: Tue Oct 24 13:57:35 2023 +0300 Bluetooth: ISO: Allow binding a PA sync socket This makes it possible to bind a PA sync socket to a number of BISes before issuing the BIG Create Sync command. Signed-off-by: Iulia Tanasescu Signed-off-by: Luiz Augusto von Dentz commit ee9793be08b1a1c29308a099c01790a3befb390a Author: Steven Rostedt (Google) Date: Fri Dec 22 11:34:59 2023 -0500 tracing/selftests: Add ownership modification tests for eventfs As there were bugs found with the ownership of eventfs dynamic file creation. Add a test to test it. It will remount tracefs with a different gid and check the ownership of the eventfs directory, as well as the system and event directories. It will also check the event file directories. It then does a chgrp on each of these as well to see if they all get updated as expected. Then it remounts the tracefs file system back to the original group and makes sure that all the updated files and directories were reset back to the original ownership. It does the same for instances that change the ownership of he instance directory. Note, because the uid is not reset by a remount, it is tested for every file by switching it to a new owner and then back again. Acked-by: Masami Hiramatsu (Google) Tested-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) Signed-off-by: Shuah Khan commit 26547691107eda45b0f20ee79bad19bbe5fcbfd7 Author: Steven Rostedt (Google) Date: Fri Dec 22 11:35:22 2023 -0500 tracing/selftests: Remove exec permissions from trace_marker.tc test The tests in the selftests should not have the exec permissions set. The trace_marker.tc test accidentally was committed with the exec permission. Set the permission to that file back to just read/write. No functional nor code changes. Link: https://lore.kernel.org/linux-trace-kernel/20231222112831.4c7fa500@gandalf.local.home/ Signed-off-by: Steven Rostedt (Google) commit 2029e71482fcd94dcc7df2c66c7fa635479748bf Author: Chintan Vankar Date: Thu Dec 21 15:59:56 2023 +0530 phy: ti: j721e-wiz: Add SGMII support in WIZ driver for J784S4 Enable full rate divider configuration support for J784S4_WIZ_10G for SGMII. Signed-off-by: Chintan Vankar Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20231221102956.754617-2-c-vankar@ti.com Signed-off-by: Vinod Koul commit d719915ad9706a16adde231789a1d46fc12fb9c7 Author: Chintan Vankar Date: Thu Dec 21 15:59:55 2023 +0530 phy: ti: gmii-sel: Enable SGMII mode for J784S4 TI's J784S4 SoC supports SGMII mode with the CPSW9G instance of the CPSW Ethernet Switch. Thus, enable it by adding SGMII mode to the list of the corresponding extra_modes member. Signed-off-by: Chintan Vankar Reviewed-by: Roger Quadros Link: https://lore.kernel.org/r/20231221102956.754617-1-c-vankar@ti.com Signed-off-by: Vinod Koul commit 3d0b2176e04261ab4ac095ff2a17db077fc1e46d Author: Vinod Koul Date: Fri Dec 22 15:10:01 2023 +0530 dmaengine: xilinx: xdma: statify xdma_prep_interleaved_dma xdma_prep_interleaved_dma() was local to file but not declared static, leading to warning: drivers/dma/xilinx/xdma.c:729:1: warning: no previous prototype for 'xdma_prep_interleaved_dma' [-Wmissing-prototypes] 729 | xdma_prep_interleaved_dma(struct dma_chan *chan Reported-by: Stephen Rothwell Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20231222094001.731889-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit bbcd7b588b0bf967f90df60fccd16c9c49b768ea Author: Vinod Koul Date: Fri Dec 22 15:10:17 2023 +0530 dmaengine: xilinx: xdma: Workaround truncation compilation error Increase length to be copied to be large enough to overcome the following compilation error. The buf is large enough for this purpose. drivers/dma/xilinx/xilinx_dpdma.c: In function ‘xilinx_dpdma_debugfs_desc_done_irq_read’: drivers/dma/xilinx/xilinx_dpdma.c:313:39: error: ‘snprintf’ output may be truncated before the last format character [-Werror=format-truncation=] 313 | snprintf(buf, out_str_len, "%d", | ^ drivers/dma/xilinx/xilinx_dpdma.c:313:9: note: ‘snprintf’ output between 2 and 6 bytes into a destination of size 5 313 | snprintf(buf, out_str_len, "%d", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 314 | dpdma_debugfs.xilinx_dpdma_irq_done_count); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20231222094017.731917-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit e2780a0b95a1b5d137ccf0e0747b77f174f55511 Author: Mickaël Salaün Date: Thu Nov 30 10:36:16 2023 +0100 selftests/landlock: Add tests to check unhandled rule's access rights Add two tests to make sure that we cannot add a rule to a ruleset if the rule's access rights that are not handled by the ruleset: * fs: layout1.rule_with_unhandled_access * net: mini.rule_with_unhandled_access Cc: Konstantin Meskhidze Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20231130093616.67340-3-mic@digikod.net Signed-off-by: Mickaël Salaün commit 6471c9c4c4d26f85d89e1493c0d51fb6f2b6f273 Author: Mickaël Salaün Date: Thu Nov 30 10:36:15 2023 +0100 selftests/landlock: Add tests to check unknown rule's access rights Add two tests to make sure that we cannot add a rule with access rights that are unknown: * fs: layout0.rule_with_unknown_access * net: mini.rule_with_unknown_access Rename unknown_access_rights tests to ruleset_with_unknown_access . Cc: Konstantin Meskhidze Reviewed-by: Günther Noack Link: https://lore.kernel.org/r/20231130093616.67340-2-mic@digikod.net Signed-off-by: Mickaël Salaün commit ccdc720fb73f0eb9266274b15c0ab653475ad33d Author: Andrew Davis Date: Mon Nov 13 09:13:14 2023 -0600 ARM: multi_v7_defconfig: Enable RPMSG CHAR and CTRL These allow user-space programs to create RPMSG endpoints and have those endpoints show up as device files. They are enabled in the ARM64 defconfig and are useful for the same reasons here. Signed-off-by: Andrew Davis Signed-off-by: Arnd Bergmann commit 671c08ec007b2f859d9075fc9bc0c06320c90cd4 Author: Andrew Davis Date: Mon Nov 13 08:43:59 2023 -0600 ARM: mach-nspire: Rework support and directory structure Having a platform need a mach-* directory should be seen as a negative, it means the platform needs special non-standard handling. ARM64 support does not allow mach-* directories at all. While we may not get to that given all the non-standard architectures we support, we should still try to get as close as we can and reduce the number of mach directories. The mach-nspire/ directory and files, provides just one "feature": having the kernel print the machine name if the DTB does not also contain a "model" string (which they always do). To reduce the number of mach-* directories let's do without that feature and remove this directory. NOTE: The default l2c_aux_mask is now ~0 but these devices never have this type of cache controller so this is safe. Signed-off-by: Andrew Davis Signed-off-by: Arnd Bergmann commit 8aabc11c8f4e0a57661a07f985ddc8a626ef9148 Author: Randy Dunlap Date: Thu Dec 21 22:19:08 2023 -0800 drbd: actlog: fix kernel-doc warnings and spelling Fix all kernel-doc warnings in drbd_actlog.c: drbd_actlog.c:963: warning: No description found for return value of 'drbd_rs_begin_io' drbd_actlog.c:1015: warning: Function parameter or member 'peer_device' not described in 'drbd_try_rs_begin_io' drbd_actlog.c:1015: warning: Excess function parameter 'device' description in 'drbd_try_rs_begin_io' drbd_actlog.c:1015: warning: No description found for return value of 'drbd_try_rs_begin_io' drbd_actlog.c:1197: warning: No description found for return value of 'drbd_rs_del_all' Fix one spelling error (s/ore/or/). Signed-off-by: Randy Dunlap Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Christoph Böhmwalder Cc: Cc: Jens Axboe Cc: Link: https://lore.kernel.org/r/20231222061909.8791-1-rdunlap@infradead.org Signed-off-by: Jens Axboe commit 8e6e83d77227d9ba39e0c7b50693f1b4f8728006 Author: Kundan Kumar Date: Fri Dec 22 15:47:07 2023 +0530 block: skip start/end time stamping for passthrough IO commit 41fa722239b4 ("blk-mq: do not include passthrough requests in I/O accounting")' disables I/O accounting for passthrough requests. Since tools like 'iostat' do not show anything useful for passthrough I/O, it's wasteful to do start/end time-stamping. So do away with that. Avoiding the time-stamping improves the I/O performance by ~7% Signed-off-by: Kundan Kumar Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20231222101707.6921-1-kundan.kumar@samsung.com Signed-off-by: Jens Axboe commit ae73dadb1285301967253c8f859116bf90b69b06 Author: Andrew Davis Date: Mon Nov 13 08:43:57 2023 -0600 ARM: mach-sunplus: Rework support and directory structure Having a platform need a mach-* directory should be seen as a negative, it means the platform needs special non-standard handling. ARM64 support does not allow mach-* directories at all. While we may not get to that given all the non-standard architectures we support, we should still try to get as close as we can and reduce the number of mach directories. The mach-sunplus/ directory and files, provides just one "feature": having the kernel print the machine name if the DTB does not also contain a "model" string (which they always do). To reduce the number of mach-* directories let's do without that feature and remove this directory. NOTE: The default l2c_aux_mask is now ~0 but these devices never have this type of cache controller so this is safe. Signed-off-by: Andrew Davis Signed-off-by: Arnd Bergmann commit 00e58c36d20aa011cb0e2f087d9422bf4c6da75d Author: Andrew Davis Date: Mon Nov 13 08:43:56 2023 -0600 ARM: mach-airoha: Rework support and directory structure Having a platform need a mach-* directory should be seen as a negative, it means the platform needs special non-standard handling. ARM64 support does not allow mach-* directories at all. While we may not get to that given all the non-standard architectures we support, we should still try to get as close as we can and reduce the number of mach directories. The mach-airoha/ directory, and files within, provide just one "feature": having the kernel print the machine name if the DTB does not also contain a "model" string (which they always do). To reduce the number of mach-* directories let's do without that feature and remove this directory. It also seems there was a copy/paste error and the "MEDIATEK_DT" name was re-used in the DT_MACHINE_START macro. This may have caused conflicts if this was built in a multi-arch configuration. NOTE: The default l2c_aux_mask is now ~0 but these devices never have this type of cache controller so this is safe. Signed-off-by: Andrew Davis Signed-off-by: Arnd Bergmann commit dcfbe025c29b0df82cadd25cc0bbb89a5bda71fb Author: Andrew Davis Date: Mon Nov 13 08:43:55 2023 -0600 ARM: mach-moxart: Move MOXA ART support into Kconfig.platforms This removes the need for a dedicated Kconfig and empty mach directory. Signed-off-by: Andrew Davis Signed-off-by: Arnd Bergmann commit 93911741574ea2334f3a36a3ec560f733692ee2a Author: Andrew Davis Date: Mon Nov 13 08:43:54 2023 -0600 ARM: mach-uniphier: Move Socionext UniPhier support into Kconfig.platforms This removes the need for a dedicated Kconfig and empty mach directory. Signed-off-by: Andrew Davis Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Arnd Bergmann commit 8b7776fe93de08188f91acf1b11eb0a08a2476a0 Author: Andrew Davis Date: Mon Nov 13 08:43:53 2023 -0600 ARM: mach-rda: Move RDA Micro support into Kconfig.platforms This removes the need for a dedicated Kconfig and empty mach directory. Signed-off-by: Andrew Davis Signed-off-by: Arnd Bergmann commit b6ed4800136f591cb9b1d95031ba1856f6647dcc Author: Andrew Davis Date: Mon Nov 13 08:43:52 2023 -0600 ARM: mach-asm9260: Move ASM9260 support into Kconfig.platforms This removes the need for a dedicated Kconfig and mach directory. Signed-off-by: Andrew Davis Reviewed-by: Oleksij Rempel Signed-off-by: Arnd Bergmann commit 20e3ab9ecb37a0e7ff4e820b79952280a3317d1d Author: Andrew Davis Date: Mon Nov 13 08:43:51 2023 -0600 ARM: Kconfig: move platform selection into its own Kconfig file Mostly just for better organization for now. This matches what is done on some other platforms including ARM64. This also lets us start to reduce the number of mach- directories that only exist to store the platform selection. Start with "Platform selection" and ARCH_VIRT. Signed-off-by: Andrew Davis Signed-off-by: Arnd Bergmann commit 27c346a22f816b1d02e9303c572b4b8e31b75f98 Author: Suman Ghosh Date: Mon Dec 18 23:32:58 2023 +0530 octeontx2-af: Fix a double free issue There was a memory leak during error handling in function npc_mcam_rsrcs_init(). Fixes: dd7842878633 ("octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs") Suggested-by: Simon Horman Signed-off-by: Suman Ghosh Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit afa9e267486321c93a2fd15ffa4dc8b2e76ca682 Merge: 56794e5358542 6aa7ca3c7dcc5 Author: David S. Miller Date: Fri Dec 22 12:09:52 2023 +0000 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== intel: use bitfield operations Jesse Brandeburg says: After repeatedly getting review comments on new patches, and sporadic patches to fix parts of our drivers, we should just convert the Intel code to use FIELD_PREP() and FIELD_GET(). It's then "common" in the code and hopefully future change-sets will see the context and do-the-right-thing. This conversion was done with a coccinelle script which is mentioned in the commit messages. Generally there were only a couple conversions that were "undone" after the automatic changes because they tried to convert a non-contiguous mask. Patch 1 is required at the beginning of this series to fix a "forever" issue in the e1000e driver that fails the compilation test after conversion because the shift / mask was out of range. The second patch just adds all the new #includes in one go. The patch titled: "ice: fix pre-shifted bit usage" is needed to allow the use of the FIELD_* macros and fix up the unexpected "shifts included" defines found while creating this series. The rest are the conversion to use FIELD_PREP()/FIELD_GET(), and the occasional leXX_{get,set,encode}_bits() call, as suggested by Alex. ==================== Signed-off-by: David S. Miller commit 98d4fda8f2d4bc3fb97958d2ef4c90e161a628f2 Merge: 67629667079ee 023e6aad7e5e7 Author: Miquel Raynal Date: Fri Dec 22 12:45:52 2023 +0100 Merge tag 'nand/for-6.8' into mtd/next * Raw NAND The most meaningful change being the conversion of the brcmnand driver to the ->exec_op() API, this series brought additional changes to the core in order to help controller drivers to handle themselves the WP pin during destructive operations when relevant. As always, there is as well a whole bunch of miscellaneous W=1 fixes, together with a few runtime fixes (double free, timeout value, OOB layout, missing register initialization) and the usual load of remove callbacks turned into void (which led to switch the txx9ndfmc driver to use module_platform_driver()). commit 2d7123c7e1678a01901887562f88890f39d1a51c Merge: dd937663963ea b7b9a6aa7aea2 Author: Arnd Bergmann Date: Fri Dec 22 11:45:14 2023 +0000 Merge tag 'qcom-arm64-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm ARM64 updates for v6.8 Support is added for the new Snapdragon 8 Gen 3 mobile platform, with support for the MTP and QRD development devices, the new Snapdragon X Elite compute platform with QCP and CRD development/references devices, the QCS6590/QCM6490 platform with support for the IDP development device and the Robotics RB3gen2 board, the Huawei Honor 5X/GR5 handset built on MSM8939, and Xiaomi Pad 6 on SM8250. On IPQ5018 and IPQ6018 platform support for CPUfreq, USB, and one additional QUP SPI controller is added. CPU OPP tables are selectively enabled based on fuses, for both IPQ5332 and IPQ6018. IPQ6018 gains description of a few more SPI and UART nodes. Common elements of the IPQ9574 RDP boards are refactored into a common include file. IPQ9574 also gains description of its LEDs and WPS busttons. MSM8916 finally gets the DSP-based audio described, and this is enabled for a variety of boards. Acer Iconia Talk S and Loncheer L8910 gains notification LED, battery and charger support is added to Loncheer L8150, and GPU is enabled for Samsung Galaxy Tab A. Similariy DSP-based audio is added on MSM8939, the BAM-DMUX support is enabled as well. The Longcheer L9100 gains RGB notification LED support, and the wireless subsystem is enabled. Missing SPI controllers are described on MSM8953. On MSM8996 the MPM is enabled, to allow using wakeup interrupts. Interconnect providers, MPM and display are added to QCM2290. UFS, remoteprocs and WiFi is enabled for Fairphone FP5. On Fairphone FP3 audio, WiFi and Bluetooth are enabled. On the Robotics RB1, HDMI and the CAN bus controller are added. On Robotics RB2 Bluetooth, the modem remoteproc and WiFi are enabled. Bluetooth is enabled on the Robotics RB5. On SA8775P tsens and thermal is added, as well as the random number generator. Sound and RTC support is added for the Acer Aspire 1. On SC7280 DeviceTree is refactored, in order to allow non-Chrome devices to inherit the base dtsi. Support for UFS, crypto, TrustZone based remoteprocs, the Camera Control Interface (CCI) and random number generator support are added. Additionally a variety of smaller fixes are introduced. A variety of fixes are introduced for SC8180X, in particular missing power-domains and interconnects. On SC8280XP the camera clock controller is added, and a number of smaller fixes are introduced. The display subsystem in SDM670 is described. On SDX75 interconnect providers are added, as is USB3 and the related PHY, which is then enabled on the IDP device. On SM6115 interconnect providers are added and existing clients are wired up. A UART controller is added as well. The MPM is added, to provide wakeup interrutps, on SM6375. The modem subsystem, and WiFi are enabled on Sony Xperia 10 IV, a few regulator supplies are corrected. On SM8150 the DisplayPort controller is added, for USB Type-C output, which together with the addition of HDMI is described on the HDK board. GPU and random number generator support are added to SM8450, and enabled on the HDK board. On SM8550 GPU, IPA, random number generator, missing SoundWire ports are added, and enabled on both MTP and QRD devices. Additionally a large number of smaller functional and DeviceTree binding validation issues are corrected across a variety of platforms. * tag 'qcom-arm64-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (288 commits) arm64: dts: qcom: sc8180x-primus: Allow UFS regulators load/mode setting arm64: dts: qcom: sc8180x: Describe the GIC redistributor arm64: dts: qcom: sc8180x: Add interconnects to UFS arm64: dts: qcom: sc8180x: Add missing MDP clocks arm64: dts: qcom: sc8180x: Add UFS GDSC arm64: dts: qcom: sc7280*: move MPSS and WPSS memory to dtsi arm64: dts: qcom: sc7280: Rename reserved-memory nodes arm64: dts: qcom: sc7280: Remove unused second MPSS reg arm64: dts: qcom: sdm670: add display subsystem arm64: dts: qcom: sm8150-hdk: enable DisplayPort and USB-C altmode arm64: dts: qcom: sm8150: add USB-C ports to the OTG USB host arm64: dts: qcom: sm8150: add USB-C ports to the USB+DP QMP PHY arm64: dts: qcom: sm8150: add DisplayPort controller arm64: dts: qcom: sm8150-hdk: fix SS USB regulators arm64: dts: qcom: sm8150-hdk: enable HDMI output arm64: dts: qcom: sm8150: make dispcc cast minimal vote on MMCX arm64: dts: qcom: sm8650: add fastrpc-compute-cb nodes arm64: dts: qcom: sm8550-qrd: add PM8010 regulators arm64: dts: qcom: sm8550-mtp: Add pm8010 regulators arm64: dts: qcom: qcm2290: Hook up MPM ... Link: https://lore.kernel.org/r/20231219145402.874161-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 2560cffd2134c2e070dee369b37f6e55438087f9 Author: Linus Walleij Date: Thu Dec 7 14:33:35 2023 +0100 ARM: Delete ARM11MPCore (ARM11 ARMv6K SMP) support This ARM11 SMP configuration was one of the first SMP configurations the ARM kernel supported, but it has the downside of odd DMA handling, odd cache tagging, and often (as of recent) completely broken cache handling on the ARM RealView PB11MPCore test chips. To boot the platform it was necessary to completely disable the cache. When it comes to the EB 11MPCore it is unclear if this ever worked. These reference designs are now the only ARMv6K SMP platforms. As only reference designs of purely academic interest remain, and since the special-cased DMA and PMU code is hard to maintain and doesn't really work, it is not really worth our time. Delete the ARM11MPCore support along with: - The special DMA quirk CONFIG_DMA_CACHE_RWFO that is only used on ARMv6K SMP, and we are the last ARMV6K system leaving the building and the cache handling is awkward, so good-bye. - The special PMU handling that was only used by ARM11MPCore. The following is left behind: - TIMER_OF_DECLARE(arm_twd_11mp, "arm,arm11mp-twd-timer", ...) in arch/arm/kernel/smp_twd.c, this is still in use by Marvell MMP3 arch/arm/boot/dts/marvell/mmp3.dtsi - IRQCHIP_DECLARE(arm11mp_gic, "arm,arm11mp-gic", ...) in drivers/irqchip/irq-gic.c, this is still in use by Marvell MMP3 arch/arm/boot/dts/marvell/mmp3.dtsi - A compatible for the arm11mpcore SCU, since this was mistakedly used for the Cortex-A9 version of RealView EB. These are unfortunate but will need to be kept around for compatibility. New Marvell-specific compatibles should however probably be added. Acked-by: Mark Rutland Reviewed-by: Arnd Bergmann Signed-off-by: Linus Walleij Acked-by: Liviu Dudau Link: https://lore.kernel.org/r/20231207-drop-11mpcore-v2-1-560b396f3bf5@linaro.org Signed-off-by: Arnd Bergmann commit 67629667079eeda723c6d9a8d56ccd569cfae5cc Merge: 828f6df1bcba7 3c0e1dfa703cd Author: Miquel Raynal Date: Fri Dec 22 12:43:00 2023 +0100 Merge tag 'spi-nor/for-6.8' into mtd/next SPI NOR comes with die erase support for multi die flashes, with new octal protocols (1-1-8 and 1-8-8) parsed from SFDP and with an updated documentation about what the contributors shall consider when proposing flash additions or updates. Michael Walle stepped out from the reviewer role to maintainer. commit ed27e15bc49097f26689b201af5ea89e7154d880 Author: Hugues Fruchet Date: Fri Dec 15 11:06:56 2023 +0100 ARM: multi_v7_defconfig: enable STM32 DCMIPP media support Enables support of STM32 DCMIPP V4L2 media driver. Signed-off-by: Hugues Fruchet Signed-off-by: Alain Volmat Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20231215100656.729094-1-alexandre.torgue@foss.st.com Signed-off-by: Arnd Bergmann commit 81f5afc68bfa3a6bc9cf40ab9deeb5f6af04da1f Merge: 6863c7c6357ca 48a9ba5eb4d72 Author: Arnd Bergmann Date: Fri Dec 22 11:41:53 2023 +0000 Merge tag 'qcom-arm64-defconfig-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig Qualcomm ARM64 defconfig updates for v6.8 Core platform-specific drivers for SM8650, SM4450, and SDX75 are enabled. The sound drivers for SC8280XP and SM8650 are enabled. Lastly the UEFI Secure App driver, providing EFI variable access on some platforms is enabled. * tag 'qcom-arm64-defconfig-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: enable Qualcomm WSA884x driver arm64: defconfig: enable Qualcomm UEFI Secure App driver arm64: defconfig: enable Qualcomm sc8280xp sound drivers arm64: defconfig: enable clock controller and pinctrl arm64: deconfig: enable Qualcomm SM8650 SoC drivers arm64: defconfig: Enable GCC, pinctrl and interconnect for SDX75 Signed-off-by: Arnd Bergmann commit 6863c7c6357cabcc6af43e0d085bdf2b88279f03 Merge: b9339f63ddee6 e8779517788fa Author: Arnd Bergmann Date: Fri Dec 22 11:41:01 2023 +0000 Merge tag 'ti-k3-config-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/defconfig TI K3 defconfig updates for v6.8 - Enable TI K3 SoC components PRUSS, CSI2RX, POWERVR for various boards. - Enable TC358767 for Iot2050 board - Increase 8250_NR_UARTS from 4 to 8 to support AM62x verdin boards (minor increase in kernel image) * tag 'ti-k3-config-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: arm64: defconfig: Enable DRM_POWERVR arm64: defconfig: Enable J721E CSI2RX arm64: defconfig: Increase SERIAL_8250_NR_UARTS arm64: defconfig: Enable TI_ICSSG_PRUETH arm64: defconfig: Enable Toshiba TC358767 bridge Link: https://lore.kernel.org/r/20231218153102.ptduqsvtsq7sxs5n@tinsel Signed-off-by: Arnd Bergmann commit b9339f63ddee6af15bb7aea34c969b9c17ee333c Merge: 9344204bb92a3 ebb78614ce2ff Author: Arnd Bergmann Date: Fri Dec 22 11:39:45 2023 +0000 Merge tag 'mtk-defconfig-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/defconfig MediaTek ARM64 defconfig updates for v6.8 Those defconfig changes enable booting the MT8173 Chromebooks with the enablement of the DA9211 regulator driver and adds modules for sound, AudioDSP, DisplayPort and LVTS Thermal for MT8192/MT8195, and module for the ChromeOS Keyboard LED backlight which is present on various Google Chromebooks. * tag 'mtk-defconfig-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: arm64: defconfig: Enable configs for MT8195-Cherry-Tomato Chromebook arm64: defconfig: Enable DA9211 regulator Link: https://lore.kernel.org/r/20231212114515.121695-3-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 828f6df1bcba7f64729166efc7086ea657070445 Author: Miquel Raynal Date: Fri Dec 15 13:32:08 2023 +0100 mtd: rawnand: Clarify conditions to enable continuous reads The current logic is probably fine but is a bit convoluted. Plus, we don't want partial pages to be part of the sequential operation just in case the core would optimize the page read with a subpage read (which would break the sequence). This may happen on the first and last page only, so if the start offset or the end offset is not aligned with a page boundary, better avoid them to prevent any risk. Cc: stable@vger.kernel.org Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads") Signed-off-by: Miquel Raynal Tested-by: Martin Hundebøll Link: https://lore.kernel.org/linux-mtd/20231215123208.516590-5-miquel.raynal@bootlin.com commit a62c4597953fe54c6af04166a5e2872efd0e1490 Author: Miquel Raynal Date: Fri Dec 15 13:32:07 2023 +0100 mtd: rawnand: Prevent sequential reads with on-die ECC engines Some devices support sequential reads when using the on-die ECC engines, some others do not. It is a bit hard to know which ones will break other than experimentally, so in order to avoid such a difficult and painful task, let's just pretend all devices should avoid using this optimization when configured like this. Cc: stable@vger.kernel.org Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads") Signed-off-by: Miquel Raynal Tested-by: Martin Hundebøll Link: https://lore.kernel.org/linux-mtd/20231215123208.516590-4-miquel.raynal@bootlin.com commit 9344204bb92a39cc165ce45b8bfeee4cfea68b7c Merge: 542b667fe9ee1 ac10d6c3c5f9b Author: Arnd Bergmann Date: Fri Dec 22 11:39:14 2023 +0000 Merge tag 'omap-for-v6.8/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/defconfig Defconfig changes for omaps Defconfig changes to enable I2C devices for bt200 as loadable modules for the PMIC, sensors and LEDs. * tag 'omap-for-v6.8/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: enable I2C devcies of bt200 Link: https://lore.kernel.org/r/pull-1702037869-295608@atomide.com-2 Signed-off-by: Arnd Bergmann commit 7c9414c870c027737d0f2ed7b0ed10f26edb1c61 Author: Miquel Raynal Date: Fri Dec 15 13:32:06 2023 +0100 mtd: rawnand: Fix core interference with sequential reads A couple of reports pointed at some strange failures happening a bit randomly since the introduction of sequential page reads support. After investigation it turned out the most likely reason for these issues was the fact that sometimes a (longer) read might happen, starting at the same page that was read previously. This is optimized by the raw NAND core, by not sending the READ_PAGE command to the NAND device and just reading out the data in a local cache. When this page is also flagged as being the starting point for a sequential read, it means the page right next will be accessed without the right instructions. The NAND chip will be confused and will not output correct data. In order to avoid such situation from happening anymore, we can however handle this case with a bit of additional logic, to postpone the initialization of the read sequence by one page. Reported-by: Alexander Shiyan Closes: https://lore.kernel.org/linux-mtd/CAP1tNvS=NVAm-vfvYWbc3k9Cx9YxMc2uZZkmXk8h1NhGX877Zg@mail.gmail.com/ Reported-by: Måns Rullgård Closes: https://lore.kernel.org/linux-mtd/yw1xfs6j4k6q.fsf@mansr.com/ Reported-by: Martin Hundebøll Closes: https://lore.kernel.org/linux-mtd/9d0c42fcde79bfedfe5b05d6a4e9fdef71d3dd52.camel@geanix.com/ Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Tested-by: Martin Hundebøll Link: https://lore.kernel.org/linux-mtd/20231215123208.516590-3-miquel.raynal@bootlin.com commit bbcd80f53a5e8c27c2511f539fec8c373f500cf4 Author: Miquel Raynal Date: Fri Dec 15 13:32:05 2023 +0100 mtd: rawnand: Prevent crossing LUN boundaries during sequential reads The ONFI specification states that devices do not need to support sequential reads across LUN boundaries. In order to prevent such event from happening and possibly failing, let's introduce the concept of "pause" in the sequential read to handle these cases. The first/last pages remain the same but any time we cross a LUN boundary we will end and restart (if relevant) the sequential read operation. Cc: stable@vger.kernel.org Fixes: 003fe4b9545b ("mtd: rawnand: Support for sequential cache reads") Signed-off-by: Miquel Raynal Tested-by: Martin Hundebøll Link: https://lore.kernel.org/linux-mtd/20231215123208.516590-2-miquel.raynal@bootlin.com commit db0a7c09b2a552c5028a29942e80a4848d182934 Merge: 3408005e304ee 7bdee41575919 Author: Arnd Bergmann Date: Fri Dec 22 11:38:02 2023 +0000 Merge tag 'tee-iov-iter-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers TEE: improve shared buffer registration compatibility * tag 'tee-iov-iter-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: Use iov_iter to better support shared buffer registration Link: https://lore.kernel.org/r/20231214134139.GA3098718@rayden Signed-off-by: Arnd Bergmann commit 3408005e304ee276ff1adf4169ac7c4345386cfa Merge: feb69ea40a964 b19773a1c6c02 Author: Arnd Bergmann Date: Fri Dec 22 11:37:09 2023 +0000 Merge tag 'optee-cleanup-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers OP-TEE cleanup - Remove a redundant custom workqueue in the OP-TEE driver. - Fix a missing description of an argument to optee_handle_rpc(). * tag 'optee-cleanup-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: add missing description of RPC argument reference tee: optee: Remove redundant custom workqueue tee: optee: Fix supplicant based device enumeration Link: https://lore.kernel.org/r/20231214132237.GA3092763@rayden Signed-off-by: Arnd Bergmann commit feb69ea40a96468249a23daff7d3249d1d7cb398 Merge: 740f4bd6e4fe1 c3c46acd5be9a Author: Arnd Bergmann Date: Fri Dec 22 11:36:16 2023 +0000 Merge tag 'reset-for-v6.8' of git://git.pengutronix.de/pza/linux into soc/drivers Reset controller updates for v6.8 Make use of devm_platform_get_and_ioremap_resource() and device_get_match_data() in several drivers, support the Amlogic C3 reset controller, and improve various device tree binding documents. * tag 'reset-for-v6.8' of git://git.pengutronix.de/pza/linux: dt-bindings: reset: hisilicon,hi3660-reset: Drop providers and consumers from example dt-bindings: reset: imx-src: Simplify compatible schema and drop unneeded quotes dt-bindings: reset: qcom: drop unneeded quotes dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/Five SoC reset: Use device_get_match_data() reset: reset-meson: add support for Amlogic C3 SoC Reset Controller dt-bindings: reset: Add compatible and DT bindings for Amlogic C3 Reset Controller reset: uniphier-glue: Use devm_platform_get_and_ioremap_resource() reset: sunplus: Use devm_platform_get_and_ioremap_resource() reset: simple: Convert to devm_platform_get_and_ioremap_resource() reset: qcom: Convert to devm_platform_ioremap_resource() reset: qcom-aoss: Convert to devm_platform_ioremap_resource() reset: meson-audio-arb: Convert to devm_platform_ioremap_resource() reset: brcmstb: Use devm_platform_get_and_ioremap_resource() Link: https://lore.kernel.org/r/20231213153313.278867-1-p.zabel@pengutronix.de Signed-off-by: Arnd Bergmann commit 740f4bd6e4fe114d4f7d3ead7e0f7be05e4104a2 Merge: 6fe341a24b9af b5efc28a754d2 Author: Arnd Bergmann Date: Fri Dec 22 11:34:12 2023 +0000 Merge tag 'scmi-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Arm SCMI updates for v6.8 Few minor updates: 1. Addition of protocol versioning checks to warn if the firmware version is newer or greater than the version supported by the kernel driver 2. Increment of the maximum OPP count in the perf protocol from 16 to 32 as needed by a few recent/future qualcomm platforms 3. Optimisation of set performance operations by returning error immediately and avoiding to send the command to the platform(which would return error eventually) if the domain doesn't support perf operations. Similarly, the fastchannel handling is also optimised by avoiding to initialise the corresponding set operations fastchannels. 4. Extension of extended names helper to accomodate recently added new flags parameter to be able to properly configure the command used to query the extended name of a resource. * tag 'scmi-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Add protocol versioning checks firmware: arm_scmi: Increase the maximum opp count in the perf protocol firmware: arm_scmi: Fix NULL pointer dereference during fastchannel init firmware: arm_scmi: Add optional flags to extended names helper firmware: arm_scmi: Populate fastchannel info only if set operations are allowed firmware: arm_scmi: Check beforehand if the perf domain set operations are allowed Link: https://lore.kernel.org/r/20231213115953.3578115-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit a43bdc376deab5fff1ceb93dca55bcab8dbdc1d6 Author: ZhaoLong Wang Date: Wed Dec 20 10:46:19 2023 +0800 mtd: Fix gluebi NULL pointer dereference caused by ftl notifier If both ftl.ko and gluebi.ko are loaded, the notifier of ftl triggers NULL pointer dereference when trying to access ‘gluebi->desc’ in gluebi_read(). ubi_gluebi_init ubi_register_volume_notifier ubi_enumerate_volumes ubi_notify_all gluebi_notify nb->notifier_call() gluebi_create mtd_device_register mtd_device_parse_register add_mtd_device blktrans_notify_add not->add() ftl_add_mtd tr->add_mtd() scan_header mtd_read mtd_read_oob mtd_read_oob_std gluebi_read mtd->read() gluebi->desc - NULL Detailed reproduction information available at the Link [1], In the normal case, obtain gluebi->desc in the gluebi_get_device(), and access gluebi->desc in the gluebi_read(). However, gluebi_get_device() is not executed in advance in the ftl_add_mtd() process, which leads to NULL pointer dereference. The solution for the gluebi module is to run jffs2 on the UBI volume without considering working with ftl or mtdblock [2]. Therefore, this problem can be avoided by preventing gluebi from creating the mtdblock device after creating mtd partition of the type MTD_UBIVOLUME. Fixes: 2ba3d76a1e29 ("UBI: make gluebi a separate module") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217992 [1] Link: https://lore.kernel.org/lkml/441107100.23734.1697904580252.JavaMail.zimbra@nod.at/ [2] Signed-off-by: ZhaoLong Wang Reviewed-by: Zhihao Cheng Acked-by: Richard Weinberger Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231220024619.2138625-1-wangzhaolong1@huawei.com commit b9e824f995ad46246fcc06bd43dc252916c32481 Author: Stefan Wahren Date: Mon Dec 18 14:06:55 2023 +0100 dt-bindings: mtd: partitions: u-boot: Fix typo The initial description contained a typo. Signed-off-by: Stefan Wahren Acked-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231218130656.9020-1-wahrenst@gmx.net commit 6fe341a24b9afe07b2b85b29efa91db9c8cf4bf8 Merge: 8d446ff13a2ab 365fcc03b6321 Author: Arnd Bergmann Date: Fri Dec 22 11:32:04 2023 +0000 Merge tag 'memory-controller-drv-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.8, part two Convert all drivers platform remove callback to the "remove_new" which returns void. Usual rationale from Uwe: The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. * tag 'memory-controller-drv-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: ti-emif-pm: Convert to platform remove callback returning void memory: ti-aemif: Convert to platform remove callback returning void memory: tegra210-emc: Convert to platform remove callback returning void memory: tegra186-emc: Convert to platform remove callback returning void memory: stm32-fmc2-ebi: Convert to platform remove callback returning void memory: exynos5422-dmc: Convert to platform remove callback returning void memory: renesas-rpc-if: Convert to platform remove callback returning void memory: omap-gpmc: Convert to platform remove callback returning void memory: mtk-smi: Convert to platform remove callback returning void memory: jz4780-nemc: Convert to platform remove callback returning void memory: fsl_ifc: Convert to platform remove callback returning void memory: fsl-corenet-cf: Convert to platform remove callback returning void memory: emif: Convert to platform remove callback returning void memory: brcmstb_memc: Convert to platform remove callback returning void memory: brcmstb_dpfe: Convert to platform remove callback returning void Link: https://lore.kernel.org/r/20231221101956.16351-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 8d446ff13a2abcfa39b6dcb28f10145db7c77818 Merge: 41ab5e162569a 4a23d0f9814c3 Author: Arnd Bergmann Date: Fri Dec 22 11:27:02 2023 +0000 Merge tag 'memory-controller-drv-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers Memory controller drivers for v6.8 Few improvements for Tegra Memory Controller: Override the SID programming in the device, if firmware or bootloader left it in bypass mode, e.g. after resuming from suspend. Skip prorgamming the SID, if given Memory Controller client does not support it. * tag 'memory-controller-drv-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: tegra: Protect SID override call under CONFIG_IOMMU_API memory: tegra: Skip SID programming if SID registers aren't set memory: tegra: Add SID override programming for MC clients Link: https://lore.kernel.org/r/20231213061523.4803-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 41ab5e162569a17070a03d4964750b884cb90595 Merge: cd845dfd46b01 9a9e8d8d2b6e6 Author: Arnd Bergmann Date: Fri Dec 22 11:24:43 2023 +0000 Merge tag 'riscv-cache-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers RISC-V cache drivers for v6.8 The SiFive composable cache driver moves to the cache driver subdirectory from the drivers/soc and grows support for non-coherent cache operations. The immediate user for these is the jh7100 SoC, that a rake of people have on VisionFive v1 or Beagle-V Starlight boards. Signed-off-by: Conor Dooley * tag 'riscv-cache-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: errata: Make ERRATA_STARFIVE_JH7100 depend on !DMA_DIRECT_REMAP riscv: errata: Add StarFive JH7100 errata soc: sifive: ccache: Add StarFive JH7100 support dt-bindings: cache: sifive,ccache0: Add StarFive JH7100 compatible soc: sifive: shunt ccache driver to drivers/cache Link: https://lore.kernel.org/r/20231221-catatonic-monday-d4c61283b136@spud Signed-off-by: Arnd Bergmann commit cd845dfd46b015191d7a6c9226cf0911a9b395a4 Merge: 418188d878d52 0f2d06dd1910c Author: Arnd Bergmann Date: Fri Dec 22 11:22:16 2023 +0000 Merge tag 'riscv-soc-drivers-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers RISC-V SoC drivers for v6.8 There's only one set of changes here, the addition of "Auto Update" support for PolarFire SoC. Auto Update is one of the ways that the FPGA bitstream can be updated, and the only one suitable for use from Linux as it does not immediately initiate a reboot when started. The driver was not accepted in the FPGA manager subsystem as the update only occurs after a reboot and makes no use of the FPGA manager framework. Signed-off-by: Conor Dooley * tag 'riscv-soc-drivers-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: MAINTAINERS: add auto-update driver to mpfs entry firmware: microchip: Replace of_device.h with explicit include firmware: microchip: add PolarFire SoC Auto Update support soc: microchip: mpfs: add auto-update subdev to system controller soc: microchip: mpfs: print service status in warning message soc: microchip: mpfs: enable access to the system controller's flash dt-bindings: soc: microchip: add a property for system controller flash firmware_loader: Expand Firmware upload error codes with firmware invalid error Link: https://lore.kernel.org/r/20231221-droop-unblock-81e4fe14acee@spud Signed-off-by: Arnd Bergmann commit 418188d878d522e751f7afcf08fd4f2b145fa854 Merge: 815cdfaf33914 d8385d7433f9c Author: Arnd Bergmann Date: Fri Dec 22 11:21:13 2023 +0000 Merge tag 'amlogic-drivers-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers Amlogic drivers changes for v6.8: - meson-sm: unmap out_base shmem in error path - meson-sm: use dev_groups attrs for sysfs entries * tag 'amlogic-drivers-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: firmware: meson-sm: unmap out_base shmem in error path firmware: meson_sm: refactor serial sysfs entry via dev_groups attrs Link: https://lore.kernel.org/r/a987f881-1c23-4528-9cb1-e5a875b7e7a8@linaro.org Signed-off-by: Arnd Bergmann commit 815cdfaf33914b15ede633ce9a7dfef0b3a3f053 Merge: ec5b7be617156 aaafe88d5500b Author: Arnd Bergmann Date: Fri Dec 22 11:20:04 2023 +0000 Merge tag 'mvebu-drivers-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/drivers mvebu drivers for 6.8 (part 1) moxtet bus fixes * tag 'mvebu-drivers-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: bus: moxtet: Add spi device table bus: moxtet: Mark the irq as shared Link: https://lore.kernel.org/r/87il4sbym0.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit ec5b7be617156d0144fbbb2558c03c7418a2e693 Merge: 8eb0b1ed65402 35f32e39b4d9b Author: Arnd Bergmann Date: Fri Dec 22 11:19:18 2023 +0000 Merge tag 'samsung-drivers-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/drivers Samsung SoC driver changes for v6.8 1. Add support for Google GS101 SoC to different drivers: clock controller, serial and watchdog. The clock driver changes depend on few bindings headers, which I put in a topic branch with the bindings refactoring and GS101 support, therefore this this pull request includes that bindings topic branch. The rest of the bindings topic branch is not necessary here, however keeping everything together makes it easier to share between branches. The bindings topic branch is mostly refactoring all the compatibles to add SoC-specific compatible followed by fallback. 2. Exynos ChipID: recognize ExynosAutov920. * tag 'samsung-drivers-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (40 commits) dt-bindings: clock: google,gs101: rename CMU_TOP gate defines watchdog: s3c2410_wdt: Add support for Google gs101 SoC watchdog: s3c2410_wdt: Update QUIRK macros to use BIT macro watchdog: s3c2410_wdt: Add support for WTCON register DBGACK_MASK bit tty: serial: samsung: Add gs101 compatible and common fifoszdt_serial_drv_data clk: samsung: clk-gs101: Add cmu_top, cmu_misc and cmu_apm support clk: samsung: clk-pll: Add support for pll_{0516,0517,518} dt-bindings: clock: google,gs101: fix incorrect numbering and DGB suffix dt-bindings: soc: samsung: usi: add google,gs101-usi compatible dt-bindings: serial: samsung: Make samsung,uart-fifosize a required property dt-bindings: serial: samsung: Add google-gs101-uart compatible dt-bindings: watchdog: Document Google gs101 watchdog bindings dt-bindings: samsung: exynos-sysreg: combine exynosautov920 with other enum dt-bindings: soc: google: exynos-sysreg: add dedicated SYSREG compatibles to GS101 dt-bindings: clock: Add Google gs101 clock management unit bindings dt-bindings: soc: samsung: exynos-pmu: Add gs101 compatible dt-bindings: watchdog: samsung: add specific compatible for Tesla FSD dt-bindings: samsung: exynos-pmu: add specific compatible for Tesla FSD dt-bindings: serial: samsung: add specific compatible for Tesla FSD dt-bindings: pwm: samsung: add specific compatible for Tesla FSD ... Link: https://lore.kernel.org/r/20231220084722.22149-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 8eb0b1ed65402fc71c8a419e8a7f1368420e9b95 Merge: 1b31719291073 110cb8d861cc1 Author: Arnd Bergmann Date: Fri Dec 22 11:17:03 2023 +0000 Merge tag 'qcom-drivers-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers Qualcomm driver updates for v6.8 Support for SM8650 and X1E is added to the LLCC driver, the LLCC_TRP_ATTR2_CFGn register stride is corrected, and a bug where for each iteration looping over slices previous settings for dis_cap_alloc and retain_on_pc are overwritten. A quirk is introduced in UCSI, for implementations that does not handle UCSI_GET_PDOS for non-PD partners. With this, USCI support is enabled by default in pmic_glink. It is later reverted for SC8280XP due reported errors. A few memory leaks in error paths of qseecom are taken care of. A small driver to expose the ADSP PDCharger ULOG debug log is introduced, to aid debugging issues with pmic_glink. The identiy of SM8650, PM8937 and a few DSPs are added to the Qualcomm socinfo driver. The Qualcomm sleep stats driver is extended to allow getting detailed statistics about usage of various DDR states. Unfortunately this ABI does not seem to be stable across platforms, so this addition is dropped again while the reported problems are investigated further. Andy is moved from MAINTAINERS to CREDITS. Thank you, Andy. * tag 'qcom-drivers-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (34 commits) soc: qcom: llcc: Fix LLCC_TRP_ATTR2_CFGn offset firmware: qcom: qseecom: fix memory leaks in error paths soc: qcom: llcc: Fix typo in kernel-doc dt-bindings: soc: qcom,aoss-qmp: document the X1E80100 Always-On Subsystem side channel MAINTAINERS: qcom: move Andy Gross to credits soc: qcom: pmic_glink: drop stray semicolons soc: qcom: pmic_glink: disable UCSI on sc8280xp soc: qcom: llcc: Fix dis_cap_alloc and retain_on_pc configuration soc: qcom: pmic_pdcharger_ulog: Fix hypothetical ulog request message endianess soc: qcom: pmic_pdcharger_ulog: Move TRACE_SYSTEM out of #if protection soc: qcom: pmic_pdcharger_ulog: Search current directory for headers soc: qcom: socinfo: Add few DSPs to get their image details soc: qcom: llcc: Add missing description for members in slice config Revert "soc: qcom: stats: Add DDR sleep stats" dt-bindings: firmware: qcom,scm: Allow interconnect for everyone dt-bindings: firmware: qcom,scm: document SCM on X1E80100 SoCs soc: qcom: socinfo: Add PM8937 Power IC soc: qcom: llcc: Add configuration data for X1E80100 dt-bindings: cache: qcom,llcc: Add X1E80100 compatible soc: qcom: pmic_glink_altmode: fix port sanity check ... Link: https://lore.kernel.org/r/20231219041855.732578-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 1b3171929107326e9525e88133c820697bcea717 Merge: c55a4983e93ff 2c2235292b33d Author: Arnd Bergmann Date: Fri Dec 22 11:16:11 2023 +0000 Merge tag 'ti-driver-soc-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers TI SoC driver updates for v6.8 - ti_sci: Minor fixup for off by one error in debugfs_create - k3-socinfo: Refactoring and add j721e detection, j722s * tag 'ti-driver-soc-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: soc: ti: k3-socinfo: Add JTAG ID for J722S soc: ti: k3-socinfo: Revamp driver to accommodate different rev structs firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create() Link: https://lore.kernel.org/r/20231218153043.r5psxbjjpccusjg4@september Signed-off-by: Arnd Bergmann commit c55a4983e93ff4d4ddb92ecd3d45c21066ed3b82 Merge: e85c036c99067 87fda1acfc3b9 Author: Arnd Bergmann Date: Fri Dec 22 11:15:29 2023 +0000 Merge tag 'zynqmp-soc-for-6.8' of https://github.com/Xilinx/linux-xlnx into soc/drivers arm64: ZynqMP SoC changes for 6.8 power driver: - Move to remove_new hook - Report error around unsupported callback - Fix long messages event driver: - Fix cpu_id handling - Fix warning message * tag 'zynqmp-soc-for-6.8' of https://github.com/Xilinx/linux-xlnx: soc: xilinx: Add error message for invalid payload received from IPI callback. soc: xilinx: fix unhandled SGI warning message soc: xilinx: fix quoted string split across lines soc: xilinx: Fix for call trace due to the usage of smp_processor_id() soc/xilinx: zynqmp_power: Convert to platform remove callback returning void Link: https://lore.kernel.org/r/CAHTX3dJ=6y=vEgmH7Qqe=6TJZT=D-egKDmLLER4fS0=OHJRGZA@mail.gmail.com Signed-off-by: Arnd Bergmann commit aaba7ddc8507f4ad5bbd07988573967632bc2385 Author: Pablo Neira Ayuso Date: Thu Dec 14 22:43:22 2023 +0100 netfilter: nf_tables: validate chain type update if available Parse netlink attribute containing the chain type in this update, to bail out if this is different from the existing type. Otherwise, it is possible to define a chain with the same name, hook and priority but different type, which is silently ignored. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso commit eff3c558bb7e61c41b53e4c8130e514a5a4df9ba Author: Felix Huettner Date: Mon Nov 27 11:49:16 2023 +0000 netfilter: ctnetlink: support filtering by zone conntrack zones are heavily used by tools like openvswitch to run multiple virtual "routers" on a single machine. In this context each conntrack zone matches to a single router, thereby preventing overlapping IPs from becoming issues. In these systems it is common to operate on all conntrack entries of a given zone, e.g. to delete them when a router is deleted. Previously this required these tools to dump the full conntrack table and filter out the relevant entries in userspace potentially causing performance issues. To do this we reuse the existing CTA_ZONE attribute. This was previous parsed but not used during dump and flush requests. Now if CTA_ZONE is set we filter these operations based on the provided zone. However this means that users that previously passed CTA_ZONE will experience a difference in functionality. Alternatively CTA_FILTER could have been used for the same functionality. However it is not yet supported during flush requests and is only available when using AF_INET or AF_INET6. Co-developed-by: Luca Czesla Signed-off-by: Luca Czesla Co-developed-by: Max Lamprecht Signed-off-by: Max Lamprecht Signed-off-by: Felix Huettner Signed-off-by: Pablo Neira Ayuso commit e85c036c990671c231e9d86b7fedca6cf2cb4e38 Merge: 827601c40c6de fcefbb49ebb7a Author: Arnd Bergmann Date: Fri Dec 22 11:14:54 2023 +0000 Merge tag 'imx-drivers-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/drivers i.MX drivers change for 6.8: - Change imx-weim bus driver to use device_get_match_data() * tag 'imx-drivers-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: bus: imx-weim: Use device_get_match_data() Link: https://lore.kernel.org/r/20231216064605.876196-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 827601c40c6ded52a02660f090e4ba82bfa1c26e Merge: e92c0b8b1592e 31b2daea07643 Author: Arnd Bergmann Date: Fri Dec 22 11:14:15 2023 +0000 Merge tag 'renesas-drivers-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/drivers Renesas driver updates for v6.8 - Remove duplicate setup of soc_device_attribute.family, - Make RZ/Five depend on !DMA_DIRECT_REMAP. * tag 'renesas-drivers-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Make RZ/Five depend on !DMA_DIRECT_REMAP soc: renesas: Remove duplicate setup of soc_device_attribute.family Link: https://lore.kernel.org/r/cover.1702642340.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit e92c0b8b1592ef58c5fb65625b5a90f84b6b4c44 Merge: 125b02edde58b 2bfbf82956e2d Author: Arnd Bergmann Date: Fri Dec 22 11:12:46 2023 +0000 Merge tag 'mtk-soc-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/drivers MediaTek soc driver updates for v6.8 This adds a refactoring of the MediaTek Smart Voltage Scaling (SVS) driver and the addition of support for MT8186 and MT8195 in it, and adds support for the MT8188 VDOSYS and resets in the MMSYS driver. * tag 'mtk-soc-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: (24 commits) soc: mediatek: mtk-svs: Constify runtime-immutable members of svs_bank soc: mediatek: mtk-svs: Use ULONG_MAX to compare floor frequency soc: mediatek: mtk-svs: Check if SVS mode is available in the beginning soc: mediatek: mtk-svs: Cleanup of svs_probe() function soc: mediatek: mtk-svs: Compress of_device_id entries soc: mediatek: mtk-svs: Remove redundant print in svs_get_efuse_data soc: mediatek: mtk-svs: Commonize MT8192 probe function for MT8186 soc: mediatek: mtk-svs: Drop supplementary svs per-bank pointer soc: mediatek: mtk-svs: Commonize efuse parse function for most SoCs soc: mediatek: mtk-svs: Move t-calibration-data retrieval to svs_probe() soc: mediatek: mtk-svs: Add SVS-Thermal coefficient to SoC platform data soc: mediatek: mtk-svs: Add a map to retrieve fused values soc: mediatek: mtk-svs: Change the thermal sensor device name soc: mediatek: mtk-svs: Reduce memory footprint of struct svs_bank soc: mediatek: mtk-svs: Build bank name string dynamically soc: mediatek: mtk-svs: Convert sw_id and type to enumerations soc: mediatek: mtk-svs: Subtract offset from regs_v2 to avoid conflict soc: mediatek: Add MT8188 VDOSYS reset bit map soc: mediatek: Support reset bit mapping in mmsys driver soc: mediatek: Support MT8188 VDOSYS1 Padding in mtk-mmsys ... Link: https://lore.kernel.org/r/20231212114515.121695-2-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 08e4c8c5919fd405a4d709b4ba43d836894a26eb Author: Florian Westphal Date: Mon Nov 27 11:00:37 2023 +0100 netfilter: nf_tables: mark newset as dead on transaction abort If a transaction is aborted, we should mark the to-be-released NEWSET dead, just like commit path does for DEL and DESTROYSET commands. In both cases all remaining elements will be released via set->ops->destroy(). The existing abort code does NOT post the actual release to the work queue. Also the entire __nf_tables_abort() function is wrapped in gc_seq begin/end pair. Therefore, async gc worker will never try to release the pending set elements, as gc sequence is always stale. It might be possible to speed up transaction aborts via work queue too, this would result in a race and a possible use-after-free. So fix this before it becomes an issue. Fixes: 5f68718b34a5 ("netfilter: nf_tables: GC transaction API to avoid race with control plane") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 3fde94b6e930f5a0fd4f6458da8d559c898f2322 Author: Florian Westphal Date: Mon Nov 20 17:29:58 2023 +0100 netfilter: flowtable: reorder nf_flowtable struct members Place the read-mostly parts accessed by the datapath first. In particular, we do access ->flags member (to see if HW offload is enabled) for every single packet, but this is placed in the 5th cacheline. priority could stay where it is, but move it too to cover a hole. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ffb40fba404561f141d37e5878ec542b67464d74 Author: Florian Westphal Date: Mon Nov 20 17:01:45 2023 +0100 netfilter: nft_set_pipapo: prefer gfp_kernel allocation No need to use GFP_ATOMIC here. Fixes: f6c383b8c31a ("netfilter: nf_tables: adapt set backend to use GC transaction API") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 3d483faa66639ad96d8373046c47f2b2d76fdf76 Author: Phil Sutter Date: Thu Nov 9 16:01:16 2023 +0100 netfilter: nf_tables: Add locking for NFT_MSG_GETSETELEM_RESET requests Set expressions' dump callbacks are not concurrency-safe per-se with reset bit set. If two CPUs reset the same element at the same time, values may underrun at least with element-attached counters and quotas. Prevent this by introducing dedicated callbacks for nfnetlink and the asynchronous dump handling to serialize access. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit f649be6d9c84960e358f350914a0673411467b11 Author: Phil Sutter Date: Thu Nov 9 16:01:15 2023 +0100 netfilter: nf_tables: Introduce nft_set_dump_ctx_init() This is a wrapper around nft_ctx_init() for use in nf_tables_getsetelem() and a resetting equivalent introduced later. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 5896e861a714b9b0acabbb17e61753cdb3b32b68 Author: Phil Sutter Date: Thu Nov 9 16:01:14 2023 +0100 netfilter: nf_tables: Pass const set to nft_get_set_elem The function is not supposed to alter the set, passing the pointer as const is fine and merely requires to adjust signatures of two called functions as well. Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 04b99eac389adc6485f7913d83ec9ed68bbc8326 Author: Werner Sembach Date: Wed Dec 20 16:09:56 2023 +0100 thunderbolt: Reduce retry timeout to speed up boot for some devices This is a followup to "thunderbolt: Workaround an IOMMU fault on certain systems with Intel Maple Ridge". It seems like the timeout can be reduced to 250ms. This reduces the overall delay caused by the retires to ~1s. This is about the time other things being initialized in parallel need anyway*, so like this the effective boot time is no longer compromised. *I only had a single device available for my measurements: A Clevo X170KM-G desktop replacement notebook. Signed-off-by: Werner Sembach Signed-off-by: Mika Westerberg commit ba2a2a86de04e67bb1d7f8251894eb11eed062e9 Author: Gil Fine Date: Mon Dec 4 15:14:58 2023 +0200 thunderbolt: Keep link as asymmetric if preferred by hardware In case of the link is brought up as asymmetric (due to hardware preference), we honor that and don't transition it to symmetric, unless a router with symmetric link got plugged below, in the topology (and a bandwidth allows transition to symmetric). Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 125b02edde58b316c2eeb078b7719dc21f5a979d Merge: daa554ab044b8 7a2ee1576dcc6 Author: Arnd Bergmann Date: Fri Dec 22 10:48:57 2023 +0000 Merge tag 'fsl_qmc_tsa_v6.8' of https://github.com//hcodina/linux into soc/drivers PowerQUICC QMC and TSA drivers updates for v6.8 This pull request contains updates to prepare the support for the QMC HDLC driver. - Perform some fixes - Add support for child devices - Add QMC dynamic timeslot support Signed-off-by: Herve Codina Signed-off-by: Arnd Bergmann commit daa554ab044b8f6ff0f1f3345326ce3ec0c6a272 Merge: 95c1e57a384be 225a36b96359a Author: Arnd Bergmann Date: Fri Dec 22 10:44:16 2023 +0000 Merge tag 'kern-priv-shm-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers OP-TEE kernel private shared memory optimizations Optimize OP-TEE driver private shared memory allocated as dynamic shared memory. Both to handle larger than one page allocations and for more efficient memory usage. * tag 'kern-priv-shm-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: allocate shared memory with alloc_pages_exact() optee: add page list to kernel private shared memory Link: https://lore.kernel.org/r/20231211115815.GA616539@rayden Signed-off-by: Arnd Bergmann commit 95c1e57a384be88431ac031560cc2ae50d021d2d Merge: 9d0e3c5a3d89b d0476a59de064 Author: Arnd Bergmann Date: Fri Dec 22 10:43:18 2023 +0000 Merge tag 'ffa-notif-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers OP-TEE: asynchronous notifications with FF-A Add support for asynchronous notifications in the OP-TEE FF-A driver. This is the FF-A counterpart to the asynchronous notifications already available in the OP-TEE SMC ABI. * tag 'ffa-notif-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: ffa_abi: add asynchronous notifications optee: provide optee_do_bottom_half() as a common function Link: https://lore.kernel.org/r/20231211105249.GA587253@rayden Signed-off-by: Arnd Bergmann commit 9d0e3c5a3d89bbd77c671a84301c38e0a71bfa14 Merge: 60cc77704eb23 4b391c9c37646 Author: Arnd Bergmann Date: Fri Dec 22 10:42:19 2023 +0000 Merge tag 'system-thread-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers OP-TEE add reserved system thread Add support for a reserved system thread in the SMC-ABI of the OP-TEE driver. SCMI with OP-TEE transport uses this to guarantee that it will always have a thread available in the secure world. * tag 'system-thread-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee: firmware: arm_scmi: optee: use optee system invocation tee: optee: support tracking system threads tee: system session tee: optee: system thread call property Link: https://lore.kernel.org/r/20231211102600.GA571787@rayden Signed-off-by: Arnd Bergmann commit 60cc77704eb23558c46a4428792515e48273dde0 Merge: a351940d61e60 be2f78a8a638e Author: Arnd Bergmann Date: Fri Dec 22 10:41:36 2023 +0000 Merge tag 'hisi-drivers-for-6.8' of https://github.com/hisilicon/linux-hisi into soc/drivers HiSilicon driver updates for v6.8 - Add support for the platform with PCC type3 and interrupt ack - Few cleanups and improvements: correct the format of some strings and domain typo, add failure log * tag 'hisi-drivers-for-6.8' of https://github.com/hisilicon/linux-hisi: soc: hisilicon: kunpeng_hccs: Support the platform with PCC type3 and interrupt ack doc: kunpeng_hccs: Fix incorrect email domain name soc: hisilicon: kunpeng_hccs: Remove an unused blank line soc: hisilicon: kunpeng_hccs: Add failure log for no _CRS method soc: hisilicon: kunpeng_hccs: Fix some incorrect format strings Link: https://lore.kernel.org/r/6572C41B.6050703@hisilicon.com Signed-off-by: Arnd Bergmann commit 64704ef17d0e1f15e0a5b5eea66e4f531bfd6eec Merge: fe0a6cebe9f35 a2c568ad99360 Author: Arnd Bergmann Date: Fri Dec 22 10:40:29 2023 +0000 Merge tag 'mvebu-arm-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/arm mvebu arm for 6.8 (part 1) Update MAINTAINRES entries for Marvell MBus driver * tag 'mvebu-arm-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: MAINTAINERS: add Marvell MBus driver to Marvell EBU SoCs support Link: https://lore.kernel.org/r/87r0jgbyz4.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit fe0a6cebe9f3556e811ae46b20ac573a280c5064 Merge: 6248b4095f404 c8705471b94d0 Author: Arnd Bergmann Date: Fri Dec 22 10:39:02 2023 +0000 Merge tag 'imx-soc-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/arm i.MX SoC change for 6.8: - Update mach-imx MMDC driver to use device_get_match_data(). - Drop the use of "fsl,clkctrl" from mach-mxs platform code, as it's an undocumented compatible. * tag 'imx-soc-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: mxs: Do not search for "fsl,clkctrl" ARM: imx: Use device_get_match_data() Link: https://lore.kernel.org/r/20231216064605.876196-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 6248b4095f4044fc7c10db1058b197414815df50 Merge: 7eda5fe9684ff aa1cfba75b77c Author: Arnd Bergmann Date: Fri Dec 22 10:38:35 2023 +0000 Merge tag 'at91-soc-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/arm Microchip AT91 SoC updates for v6.8 It contains: - one patch for secure mode to set the target power management mode in initialization process as at91_pm_begin() is not called on suspend path while in secure mode; this is necessary for different drivers to know which suspend mode the system is going to switch to and act accordingly * tag 'at91-soc-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: pm: set soc_pm.data.mode in at91_pm_secure_init() Link: https://lore.kernel.org/r/20231214174830.3045180-1-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit 7eda5fe9684ffcbaf2adb0c300f1060fc826ce38 Merge: 2cc14f52aeb78 6353ed6f311b9 Author: Arnd Bergmann Date: Fri Dec 22 10:33:12 2023 +0000 Merge tag 'omap-for-v6.8/maintainers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/arm Maintainer update for drivers/bus/omap* files Add for drivers/bus/omap* files to the omap section in the MAINTAINERS file. * tag 'omap-for-v6.8/maintainers-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: MAINTAINERS: add omap bus drivers to OMAP2+ SUPPORT Link: https://lore.kernel.org/r/pull-1702037869-295608@atomide.com-3 Signed-off-by: Arnd Bergmann commit 4afa688d7141ae7a166d32224abbfd536acccfca Author: Randy Dunlap Date: Thu Dec 21 22:19:23 2023 -0800 efi: memmap: fix kernel-doc warnings Correct all kernel-doc notation to repair warnings that are reported by scripts/kernel-doc: memmap.c:38: warning: No description found for return value of '__efi_memmap_init' memmap.c:82: warning: No description found for return value of 'efi_memmap_init_early' memmap.c:132: warning: Function parameter or member 'addr' not described in 'efi_memmap_init_late' memmap.c:132: warning: Excess function parameter 'phys_addr' description in 'efi_memmap_init_late' memmap.c:132: warning: No description found for return value of 'efi_memmap_init_late' Signed-off-by: Randy Dunlap Cc: Ard Biesheuvel Cc: linux-efi@vger.kernel.org Signed-off-by: Ard Biesheuvel commit 39084ba8d0fceb477a264e2bb8dfd3553876b84c Author: Oliver Upton Date: Tue Dec 19 06:58:55 2023 +0000 KVM: arm64: vgic-v3: Reinterpret user ISPENDR writes as I{C,S}PENDR User writes to ISPENDR for GICv3 are treated specially, as zeroes actually clear the pending state for interrupts (unlike HW). Reimplement it using the ISPENDR and ICPENDR user accessors. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231219065855.1019608-4-oliver.upton@linux.dev commit 561851424d93e91083df4071781b68dc4ba1fc5a Author: Oliver Upton Date: Tue Dec 19 06:58:54 2023 +0000 KVM: arm64: vgic: Use common accessor for writes to ICPENDR Fold MMIO and user accessors into a common helper while maintaining the distinction between the two. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231219065855.1019608-3-oliver.upton@linux.dev commit 13886f34444596e6eca124677cd8362a941b585b Author: Oliver Upton Date: Tue Dec 19 06:58:53 2023 +0000 KVM: arm64: vgic: Use common accessor for writes to ISPENDR Perhaps unsurprisingly, there is a considerable amount of duplicate code between the MMIO and user accessors for ISPENDR. At the same time there are some important differences between user and guest MMIO, like how SGIs can only be made pending from userspace. Fold user and MMIO accessors into a common helper, maintaining the distinction between the two. Signed-off-by: Oliver Upton Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231219065855.1019608-2-oliver.upton@linux.dev commit 7b95382f965133ef61ce44aaabc518c16eb46909 Author: Marc Zyngier Date: Sun Dec 17 11:15:09 2023 +0000 KVM: arm64: vgic-v4: Restore pending state on host userspace write When the VMM writes to ISPENDR0 to set the state pending state of an SGI, we fail to convey this to the HW if this SGI is already backed by a GICv4.1 vSGI. This is a bit of a corner case, as this would only occur if the vgic state is changed on an already running VM, but this can apparently happen across a guest reset driven by the VMM. Fix this by always writing out the pending_latch value to the HW, and reseting it to false. Reported-by: Kunkun Jiang Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Cc: stable@vger.kernel.org # 5.10+ Link: https://lore.kernel.org/r/7e7f2c0c-448b-10a9-8929-4b8f4f6e2a32@huawei.com commit 22a9d9585812440211b0b34a6bc02ade62314be4 Author: Bumyong Lee Date: Tue Dec 19 14:50:26 2023 +0900 dmaengine: pl330: issue_pending waits until WFP state According to DMA-330 errata notice[1] 71930, DMAKILL cannot clear internal signal, named pipeline_req_active. it makes that pl330 would wait forever in WFP state although dma already send dma request if pl330 gets dma request before entering WFP state. The errata suggests that polling until entering WFP state as workaround and then peripherals allows to issue dma request. [1]: https://developer.arm.com/documentation/genc008428/latest Signed-off-by: Bumyong Lee Link: https://lore.kernel.org/r/20231219055026.118695-1-bumyong.lee@samsung.com Signed-off-by: Vinod Koul commit 2f8f90cd2f8d237c51c2775a53ef0d8c8acaa707 Author: Jan Kuliga Date: Mon Dec 18 12:39:43 2023 +0100 dmaengine: xilinx: xdma: Implement interleaved DMA transfers Interleaved DMA functionality allows dmaengine clients' to express DMA transfers in an arbitrary way. This is extremely useful in FPGA environments, where a greater transfer flexibility is needed. For instance, in one FPGA design there may be need to do DMA to/from a FIFO at a fixed address, and also to do DMA to/from a (non)contiguous RAM memory. Introduce separate tx preparation callback and add tx-flags handling logic. Their behavior is based on the description of interleaved DMA transfers in both source code and the DMAEngine's documentation. Since XDMA is a fully-fledged scatter-gather dma engine, the logic of xdma_prep_interleaved_dma() is fairly simple and similar to the other tx preparation callbacks. The whole tx-flags handling logic resides in xdma_channel_isr(). Transfer of a single frame from a interleaved DMA transfer template is pretty similar to the single sg transaction. Therefore, the transaction of the whole interleaved DMA transfer template is basically a cyclic dma transaction with finite cycles/periods (equal to the frame of count) of a single sg transfers. Signed-off-by: Jan Kuliga Link: https://lore.kernel.org/r/20231218113943.9099-9-jankul@alatek.krakow.pl Signed-off-by: Vinod Koul commit 3e184e64c2e5145e51dc57872b0a64e3a6736888 Author: Jan Kuliga Date: Mon Dec 18 12:39:42 2023 +0100 dmaengine: xilinx: xdma: Prepare the introduction of interleaved DMA transfers Make generic code generic. As descriptor-filling logic stays the same regardless of a dmaengine's type of transfer, it is possible to write the descriptor-filling function in a generic way, so that it can be used for every single type of transfer preparation callback. Signed-off-by: Jan Kuliga Link: https://lore.kernel.org/r/20231218113943.9099-8-jankul@alatek.krakow.pl Signed-off-by: Vinod Koul commit fd0e1d83a813d48285d39eae0053b38828cf7e1a Author: Jan Kuliga Date: Mon Dec 18 12:39:41 2023 +0100 dmaengine: xilinx: xdma: Add transfer error reporting Extend the capability of transfer status reporting. Introduce error flag, which allows to report error in case of a interrupt-reported error condition. Signed-off-by: Jan Kuliga Link: https://lore.kernel.org/r/20231218113943.9099-7-jankul@alatek.krakow.pl Signed-off-by: Vinod Koul commit d0f22a3f55044f91b98e5536aa2c4d51d41cf8e7 Author: Jan Kuliga Date: Mon Dec 18 12:39:40 2023 +0100 dmaengine: xilinx: xdma: Add error checking in xdma_channel_isr() Check and clear the status register value before proceeding any further in xdma_channel_isr(). It is necessary to do it since the interrupt may occur on any error condition enabled at the start of a transfer. Signed-off-by: Jan Kuliga Link: https://lore.kernel.org/r/20231218113943.9099-6-jankul@alatek.krakow.pl Signed-off-by: Vinod Koul commit 855c2e1d1842f0101a051378094548ca581d7a7d Author: Jan Kuliga Date: Mon Dec 18 12:39:39 2023 +0100 dmaengine: xilinx: xdma: Rework xdma_terminate_all() Simplify xdma_xfer_stop(). Stop the dma engine and clear its status register unconditionally - just do what its name states. This change also allows to call it without grabbing a lock, which minimizes the total time spent with a spinlock held. Delete the currently processed vd.node from the vc.desc_issued list prior to passing it to vchan_terminate_vdesc(). In case there's more than one descriptor pending on vc.desc_issued list, calling vchan_terminate_desc() results in losing the link between vc.desc_issued list head and the second descriptor on the list. Doing so results in resources leakege, as vchan_dma_desc_free_list() won't be able to properly free memory resources attached to descriptors, resulting in dma_pool_destroy() failure. Don't call vchan_dma_desc_free_list() from within xdma_terminate_all(). Move all terminated descriptors to the vc.desc_terminated list instead. This allows to postpone freeing memory resources associated with descriptors until the call to vchan_synchronize(), which is called from xdma_synchronize() callback. This is the right way to do it - xdma_terminate_all() should return as soon as possible, while freeing resources (that may be time consuming in case of large number of descriptors) can be done safely later. Fixes: f5c392d106e7 ("dmaengine: xilinx: xdma: Add terminate_all/synchronize callbacks") Signed-off-by: Jan Kuliga Link: https://lore.kernel.org/r/20231218113943.9099-5-jankul@alatek.krakow.pl Signed-off-by: Vinod Koul commit e1ead237407a7f42957f6108a95cf093ce6c2c5d Author: Christoph Hellwig Date: Mon Dec 18 05:57:37 2023 +0100 xfs: fold xfs_rtallocate_extent into xfs_bmap_rtalloc There isn't really much left in xfs_rtallocate_extent now, fold it into the only caller. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit b6bb34588f4c95a56f23160bf3cadee74fa5480b Author: Christoph Hellwig Date: Mon Dec 18 05:57:36 2023 +0100 xfs: simplify and optimize the RT allocation fallback cascade There are currently multiple levels of fall back if an RT allocation can not be satisfied: 1) xfs_rtallocate_extent extends the minlen and reduces the maxlen due to the extent size hint. If that can't be done, it return -ENOSPC and let's xfs_bmap_rtalloc retry, which then not only drops the extent size hint based alignment, but also the minlen adjustment 2) if xfs_rtallocate_extent gets -ENOSPC from the underlying functions, it only drops the extent size hint based alignment and retries 3) if that still does not succeed, xfs_rtallocate_extent drops the extent size hint (which is a complex no-op at this point) and the minlen using the same code as (1) above 4) if that still doesn't success and the caller wanted an allocation near a blkno, drop that blkno hint. The handling in 1 is rather inefficient as we could just drop the alignment and continue, and 2/3 interact in really weird ways due to the duplicate policy. Move aligning the min and maxlen out of xfs_rtallocate_extent and into a helper called directly by xfs_bmap_rtalloc. This allows just continuing with the allocation if we have to drop the alignment instead of going through the retry loop and also dropping the perfectly usable minlen adjustment that didn't cause the problem, and then just use a single retry that drops both the minlen and alignment requirement when we really are out of space, thus consolidating cases (2) and (3) above. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 26e5eed7802299a666714ee511da58d906e8770c Author: Christoph Hellwig Date: Mon Dec 18 05:57:35 2023 +0100 xfs: reorder the minlen and prod calculations in xfs_bmap_rtalloc xfs_bmap_rtalloc is a bit of a mess in terms of calculating the locally need variables. Reorder them a bit so that related code is located next to each other - the raminlen calculation moves up next to where the maximum len is calculated, and all the prod calculation is move into a single place and rearranged so that the real prod calculation only happens when it actually is needed. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit a39f5ccc30d5a00b7e6d921aa387ad17d1e6d168 Author: Christoph Hellwig Date: Mon Dec 18 05:57:34 2023 +0100 xfs: remove XFS_RTMIN/XFS_RTMAX Use the kernel min/max helpers instead. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 3abfe6c2759e2e3000b13f8ce8a1a325e80987a1 Author: Christoph Hellwig Date: Mon Dec 18 05:57:33 2023 +0100 xfs: remove rt-wrappers from xfs_format.h xfs_format.h has a bunch odd wrappers for helper functions and mount structure access using RT* prefixes. Replace them with their open coded versions (for those that weren't entirely unused) and remove the wrappers. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 8ceee72fdb6f26fe924e02b3342353bac5efa42d Author: Christoph Hellwig Date: Mon Dec 18 05:57:32 2023 +0100 xfs: factor out a xfs_rtalloc_sumlevel helper xfs_rtallocate_extent_size has two loops with nearly identical logic in them. Split that logic into a separate xfs_rtalloc_sumlevel helper. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 3c97c9f78d23c7e449fc9a0865b40f44748c3011 Author: Christoph Hellwig Date: Mon Dec 18 05:57:31 2023 +0100 xfs: tidy up xfs_rtallocate_extent_exact Use common code for both xfs_rtallocate_range calls by moving the !isfree logic into the non-default branch. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit d9498fa8c8580b9cedb764e475503706ba7a0fbf Author: Christoph Hellwig Date: Mon Dec 18 05:57:30 2023 +0100 xfs: merge the calls to xfs_rtallocate_range in xfs_rtallocate_block Use a goto to use a common tail for the case of being able to allocate an extent. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 9ade45b08a685e121895228f344af1f8985adb2c Author: Christoph Hellwig Date: Mon Dec 18 05:57:29 2023 +0100 xfs: reflow the tail end of xfs_rtallocate_extent_block Change polarity of a check so that the successful case of being able to allocate an extent is in the main path of the function and error handling is on a branch. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit f3e509dd45c226aff268bab3695fded60e18f720 Author: Christoph Hellwig Date: Mon Dec 18 05:57:28 2023 +0100 xfs: invert a check in xfs_rtallocate_extent_block Doing a break in the else side of a conditional is rather silly. Invert the check, break ASAP and unindent the other leg. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit b271b314119eca1fb98a2c4e15304ce562802f0c Author: Christoph Hellwig Date: Mon Dec 18 05:57:27 2023 +0100 xfs: split xfs_rtmodify_summary_int Inline the logic of xfs_rtmodify_summary_int into xfs_rtmodify_summary and xfs_rtget_summary instead of having a somewhat awkward helper to share a little bit of code. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit c2adcfa31ff606264fab6e69129d6d45c9ddb7cb Author: Christoph Hellwig Date: Mon Dec 18 05:57:26 2023 +0100 xfs: move xfs_rtget_summary to xfs_rtbitmap.c xfs_rtmodify_summary_int is only used inside xfs_rtbitmap.c and to implement xfs_rtget_summary. Move xfs_rtget_summary to xfs_rtbitmap.c as the exported API and mark xfs_rtmodify_summary_int static. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit a3e48f68b5f4bc83cdded35be2c4c3cc23eb9e19 Author: Christoph Hellwig Date: Mon Dec 18 05:57:25 2023 +0100 xfs: cleanup picking the start extent hint in xfs_bmap_rtalloc Clean up the logical in xfs_bmap_rtalloc that tries to find a rtextent to start the search from by using a separate variable for the hint, not calling xfs_bmap_adjacent when we want to ignore the locality and avoid an extra roundtrip converting between block numbers and RT extent numbers. As a side-effect this doesn't pointlessly call xfs_rtpick_extent and increment the start rtextent hint if we are going to ignore the result anyway. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 676544c27e710aee7f8357f57abd348d98b1ccd4 Author: Christoph Hellwig Date: Mon Dec 18 05:57:24 2023 +0100 xfs: indicate if xfs_bmap_adjacent changed ap->blkno Add a return value to xfs_bmap_adjacent to indicate if it did change ap->blkno or not. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit db8616e2765a184a3ac7c0d5c901c39f0d3b1570 Author: Christoph Hellwig Date: Mon Dec 18 05:57:23 2023 +0100 xfs: reflow the tail end of xfs_bmap_rtalloc Reorder the tail end of xfs_bmap_rtalloc so that the successfully allocation is in the main path, and the error handling is on a branch. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit ce42b5d37527b282d38413c1b5f7283253f6562d Author: Christoph Hellwig Date: Mon Dec 18 05:57:22 2023 +0100 xfs: return -ENOSPC from xfs_rtallocate_* Just return -ENOSPC instead of returning 0 and setting the return rt extent number to NULLRTEXTNO. This is turn removes all users of NULLRTEXTNO, so remove that as well. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 152e21235727bbfe50ddc79a2d60f6bcf19d1640 Author: Christoph Hellwig Date: Mon Dec 18 05:57:21 2023 +0100 xfs: move xfs_bmap_rtalloc to xfs_rtalloc.c xfs_bmap_rtalloc is currently in xfs_bmap_util.c, which is a somewhat odd spot for it, given that is only called from xfs_bmap.c and calls into xfs_rtalloc.c to do the actual work. Move xfs_bmap_rtalloc to xfs_rtalloc.c and mark xfs_rtpick_extent xfs_rtallocate_extent and xfs_rtallocate_extent static now that they aren't called from outside of xfs_rtalloc.c. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 58643460546da1dc61593fc6fd78762798b4534f Author: Christoph Hellwig Date: Mon Dec 18 05:57:20 2023 +0100 xfs: also use xfs_bmap_btalloc_accounting for RT allocations Make xfs_bmap_btalloc_accounting more generic by handling the RT quota reservations and then also use it from xfs_bmap_rtalloc instead of open coding the accounting logic there. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit eef519d746bbfb90cbad4077c2d39d7a359c3282 Author: Christoph Hellwig Date: Mon Dec 18 05:57:19 2023 +0100 xfs: remove the xfs_alloc_arg argument to xfs_bmap_btalloc_accounting xfs_bmap_btalloc_accounting only uses the len field from args, but that has just been propagated to ap->length field by the caller. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 825b49e4dad8eba37d32bd12ceb436f1b0958fde Author: Christoph Hellwig Date: Mon Dec 18 05:57:18 2023 +0100 xfs: turn the xfs_trans_mod_dquot_byino stub into an inline function Without this upcoming change can cause an unused variable warning, when adding a local variable for the fields field passed to it. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 944df75958807d56f2db9fdc769eb15dd9f0366a Author: Christoph Hellwig Date: Mon Dec 18 05:57:17 2023 +0100 xfs: consider minlen sized extents in xfs_rtallocate_extent_block minlen is the lower bound on the extent length that the caller can accept, and maxlen is at this point the maximal available length. This means a minlen extent is perfectly fine to use, so do it. This matches the equivalent logic in xfs_rtallocate_extent_exact that also accepts a minlen sized extent. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit b5785f615918423f4ad4abe28eeb2679db8712b0 Author: Wang Jinchao Date: Fri Dec 15 18:24:34 2023 +0800 xfs/health: cleanup, remove duplicated including remove the second ones: \#include "xfs_trans_resv.h" \#include "xfs_mount.h" Signed-off-by: Wang Jinchao Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 7823921887750b39d02e6b44faafdd1cc617c651 Author: Long Li Date: Fri Dec 15 16:22:34 2023 +0800 xfs: fix perag leak when growfs fails During growfs, if new ag in memory has been initialized, however sb_agcount has not been updated, if an error occurs at this time it will cause perag leaks as follows, these new AGs will not been freed during umount , because of these new AGs are not visible(that is included in mp->m_sb.sb_agcount). unreferenced object 0xffff88810be40200 (size 512): comm "xfs_growfs", pid 857, jiffies 4294909093 hex dump (first 32 bytes): 00 c0 c1 05 81 88 ff ff 04 00 00 00 00 00 00 00 ................ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc 381741e2): [] __kmalloc+0x386/0x4f0 [] kmem_alloc+0xb5/0x2f0 [] xfs_initialize_perag+0xc5/0x810 [] xfs_growfs_data+0x9bc/0xbc0 [] xfs_file_ioctl+0x5fe/0x14d0 [] __x64_sys_ioctl+0x144/0x1c0 [] do_syscall_64+0x3f/0xe0 [] entry_SYSCALL_64_after_hwframe+0x62/0x6a unreferenced object 0xffff88810be40800 (size 512): comm "xfs_growfs", pid 857, jiffies 4294909093 hex dump (first 32 bytes): 20 00 00 00 00 00 00 00 57 ef be dc 00 00 00 00 .......W....... 10 08 e4 0b 81 88 ff ff 10 08 e4 0b 81 88 ff ff ................ backtrace (crc bde50e2d): [] __kmalloc_node+0x3da/0x540 [] kvmalloc_node+0x99/0x160 [] bucket_table_alloc.isra.0+0x5f/0x400 [] rhashtable_init+0x405/0x760 [] xfs_initialize_perag+0x3a3/0x810 [] xfs_growfs_data+0x9bc/0xbc0 [] xfs_file_ioctl+0x5fe/0x14d0 [] __x64_sys_ioctl+0x144/0x1c0 [] do_syscall_64+0x3f/0xe0 [] entry_SYSCALL_64_after_hwframe+0x62/0x6a Factor out xfs_free_unused_perag_range() from xfs_initialize_perag(), used for freeing unused perag within a specified range in error handling, included in the error path of the growfs failure. Fixes: 1c1c6ebcf528 ("xfs: Replace per-ag array with a radix tree") Signed-off-by: Long Li Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 07afd3173d0c6d24a47441839a835955ec6cf0d4 Author: Long Li Date: Fri Dec 15 16:22:33 2023 +0800 xfs: add lock protection when remove perag from radix tree Take mp->m_perag_lock for deletions from the perag radix tree in xfs_initialize_perag to prevent racing with tagging operations. Lookups are fine - they are RCU protected so already deal with the tree changing shape underneath the lookup - but tagging operations require the tree to be stable while the tags are propagated back up to the root. Right now there's nothing stopping radix tree tagging from operating while a growfs operation is progress and adding/removing new entries into the radix tree. Hence we can have traversals that require a stable tree occurring at the same time we are removing unused entries from the radix tree which causes the shape of the tree to change. Likely this hasn't caused a problem in the past because we are only doing append addition and removal so the active AG part of the tree is not changing shape, but that doesn't mean it is safe. Just making the radix tree modifications serialise against each other is obviously correct. Signed-off-by: Long Li Reviewed-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 92242716ee92d2aa3c38c736b53d8910d443566d Merge: dc83fb6e38fe5 a9f07790a4b22 Author: Dave Airlie Date: Fri Dec 22 14:37:19 2023 +1000 Merge tag 'drm-habanalabs-next-2023-12-19' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into drm-next This tag contains habanalabs driver changes for v6.8. The notable changes are: - uAPI changes: - Add sysfs entry to allow users to identify a device minor id with its debugfs path - Add sysfs entry to expose the device's module id as given to us from the f/w - Add signed device information retrieval through the INFO ioctl - New features and improvements: - Update documentation of debugfs paths - Add support for Gaudi2C device (new PCI revision number) - Add pcie reset prepare/done hooks - Firmware related fixes and changes: - Print three instances version numbers of Infineon second stage - Assume hard-reset is done by f/w upon PCIe AXI drain - Bug fixes and code cleanups: - Fix information leak in sec_attest_info() - Avoid overriding existing undefined opcode data in Gaudi2 - Multiple Queue Manager (QMAN) fixes for Gaudi2 - Set hard reset flag if graceful reset is skipped - Remove 'get temperature' debug print - Fix the new Event Queue heartbeat mechanism Signed-off-by: Dave Airlie From: Oded Gabbay Link: https://patchwork.freedesktop.org/patch/msgid/ZYFpihZscr/fsRRd@ogabbay-vm-u22.habana-labs.com commit dc83fb6e38fe5a507b4d714a5dfb0902790c3b3f Merge: ea97a66a22189 933a2a376fb3f Author: Dave Airlie Date: Fri Dec 22 13:13:36 2023 +1000 Merge tag 'drm-misc-next-fixes-2023-12-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next More fixes for the new imagination drier, a DT node refcount fix for the new aux bridge driver and a missing header fix for the LUT management code. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/42dw6ok2g5kz5xljrw7t6lzrgafhwslgw3j4rbaaivluv24vkj@k4smx5r3y2gh commit 37c6fc323a81a14612626a1eec64f4690d89f234 Author: Herbert Xu Date: Thu Dec 21 10:42:57 2023 +0800 crypto: skcipher - Pass statesize for simple lskcipher instances When ecb is used to wrap an lskcipher, the statesize isn't set correctly. Fix this by making the simple instance creator set the statesize. Reported-by: syzbot+8ffb0839a24e9c6bfa76@syzkaller.appspotmail.com Reported-by: Edward Adam Davis Fixes: 662ea18d089b ("crypto: skcipher - Make use of internal state") Signed-off-by: Herbert Xu commit 0eaef675b94c746900dcea7f6c41b9a103ed5d53 Author: Thomas Bourgoin Date: Fri Dec 15 12:17:24 2023 +0100 crypto: stm32/crc32 - fix parsing list of devices smatch warnings: drivers/crypto/stm32/stm32-crc32.c:108 stm32_crc_get_next_crc() warn: can 'crc' even be NULL? Use list_first_entry_or_null instead of list_first_entry to retrieve the first device registered. The function list_first_entry always return a non NULL pointer even if the list is empty. Hence checking if the pointer returned is NULL does not tell if the list is empty or not. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202311281111.ou2oUL2i-lkp@intel.com/ Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202311281111.ou2oUL2i-lkp@intel.com/ Signed-off-by: Thomas Bourgoin Signed-off-by: Herbert Xu commit fcf60f4bcf54952cc14d14178c358be222dbeb43 Author: Jie Wang Date: Fri Dec 15 05:01:48 2023 -0500 crypto: qat - add support for 420xx devices Add support for 420xx devices by including a new device driver that supports such devices, updates to the firmware loader and capabilities. Compared to 4xxx devices, 420xx devices have more acceleration engines (16 service engines and 1 admin) and support the wireless cipher algorithms ZUC and Snow 3G. Signed-off-by: Jie Wang Co-developed-by: Dong Xie Signed-off-by: Dong Xie Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 98a4f29fba0ffc1f1b026d9cb717fbe7edd66ffe Author: Jie Wang Date: Fri Dec 15 05:01:47 2023 -0500 crypto: qat - move fw config related structures Relocate the structures adf_fw_objs and adf_fw_config from the file adf_4xxx_hw_data.c to the newly created adf_fw_config.h. These structures will be used by new device drivers. This does not introduce any functional change. Signed-off-by: Jie Wang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit de51d22364921dcdb28ef34cd6276c38e126b899 Author: Jie Wang Date: Fri Dec 15 05:01:46 2023 -0500 crypto: qat - relocate portions of qat_4xxx code Move logic that is common between QAT GEN4 accelerators to the qat_common folder. This includes addresses of CSRs, setters and configuration logic. When moved, functions and defines have been renamed from 4XXX to GEN4. Code specific to the device is moved to the file adf_gen4_hw_data.c. Code related to configuration is moved to the newly created adf_gen4_config.c. This does not introduce any functional change. Signed-off-by: Jie Wang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit b34bd0fd563df763ccca998b3d5fc824c536c28a Author: Jie Wang Date: Fri Dec 15 05:01:45 2023 -0500 crypto: qat - change signature of uof_get_num_objs() Add accel_dev as parameter of the function uof_get_num_objs(). This is in preparation for the introduction of the QAT 420xx driver as it will allow to reconfigure the ae_mask when a configuration that does not require all AEs is loaded on the device. This does not introduce any functional change. Signed-off-by: Jie Wang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 4db87a5f9e3026d72e03bbdf1dac1dc5303e37f7 Author: Jie Wang Date: Fri Dec 15 05:01:44 2023 -0500 crypto: qat - relocate and rename get_service_enabled() Move the function get_service_enabled() from adf_4xxx_hw_data.c to adf_cfg_services.c and rename it as adf_get_service_enabled(). This function is not specific to the 4xxx and will be used by other QAT drivers. This does not introduce any functional change. Signed-off-by: Jie Wang Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit dd61d37370ce7944040a21b5dba59a860c6c2de0 Author: Om Prakash Singh Date: Thu Dec 14 16:05:59 2023 +0530 dt-bindings: crypto: qcom-qce: document the SC7280 crypto engine Document the crypto engine on the SM7280 Platform. Signed-off-by: Om Prakash Singh Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit ba3c5574203034781ac4231acf117da917efcd2a Author: Tianjia Zhang Date: Thu Dec 14 11:08:34 2023 +0800 crypto: lib/mpi - Fix unexpected pointer access in mpi_ec_init When the mpi_ec_ctx structure is initialized, some fields are not cleared, causing a crash when referencing the field when the structure was released. Initially, this issue was ignored because memory for mpi_ec_ctx is allocated with the __GFP_ZERO flag. For example, this error will be triggered when calculating the Za value for SM2 separately. Fixes: d58bb7e55a8a ("lib/mpi: Introduce ec implementation to MPI library") Cc: stable@vger.kernel.org # v6.5 Signed-off-by: Tianjia Zhang Signed-off-by: Herbert Xu commit ae3bed72ac00e07637bd9e40fce84ff1a20fbf3d Author: Krzysztof Kozlowski Date: Tue Dec 12 11:00:44 2023 +0100 dt-bindings: crypto: qcom-qce: constrain clocks for SM8150-compatible QCE All devices compatible with SM8150 QCE (so SM8250 and newer) do not have clock inputs (clocks are handled by secure firmware), so explicitly disallow the clocks in the bindings. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Herbert Xu commit 03b024887da4db8041fb64438cb02e55a409f007 Author: Krzysztof Kozlowski Date: Tue Dec 12 11:00:43 2023 +0100 dt-bindings: crypto: qcom-qce: constrain clocks for IPQ9574 QCE Binding marks several devices as compatible with IPQ4019 QCE. They have different number of clocks, thus the fallback does not define the clock constraints per variant and each specific compatible should have its clocks in if:then: section. Add missing clocks description for IPQ9574 QCE. Fixes: 1f5ce01d5d71 ("dt-bindings: crypto: qcom-qce: add SoC compatible string for ipq9574") Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Herbert Xu commit 9b2b61126a06bd272ce4783cf571b2e6a0474950 Author: Jia Jie Ho Date: Tue Dec 12 11:25:27 2023 +0800 hwrng: starfive - Add runtime pm ops Define SET_RUNTIME_PM_OPS for StarFive TRNG driver. Signed-off-by: Jia Jie Ho Signed-off-by: Herbert Xu commit f1b2fe908467f45ec465c7b912681c0ff019485e Author: Jia Jie Ho Date: Tue Dec 12 11:25:26 2023 +0800 dt-bindings: rng: starfive: Add jh8100 compatible string Add compatible string for StarFive JH8100 trng. Signed-off-by: Jia Jie Ho Acked-by: Conor Dooley Signed-off-by: Herbert Xu commit 67cc511e8d436456cc98033e6d4ba83ebfc8e672 Author: wangyangxin Date: Mon Dec 11 19:42:15 2023 +0800 crypto: virtio - Wait for tasklet to complete on device remove The scheduled tasklet needs to be executed on device remove. Fixes: fed93fb62e05 ("crypto: virtio - Handle dataq logic with tasklet") Signed-off-by: wangyangxin Signed-off-by: Gonglei Signed-off-by: Herbert Xu commit ea97a66a221893fb9b4d96688e759d1db2d6e683 Author: Lucas De Marchi Date: Thu Dec 21 14:28:04 2023 -0800 drm/xe: Disable 32bits build Add a dependency on CONFIG_64BIT since currently the xe driver doesn't build on 32bits. It may be enabled again after all the issues are fixed. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20231221222809.4123220-2-lucas.demarchi@intel.com commit d2197029026021ea4bc68475e5abef2213c8b01c Merge: 6aaff21547a08 b6e1b70817684 Author: Dave Airlie Date: Fri Dec 22 07:55:59 2023 +1000 Merge tag 'drm-xe-next-2023-12-21-pr1-1' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next Introduce a new DRM driver for Intel GPUs Xe, is a new driver for Intel GPUs that supports both integrated and discrete platforms. The experimental support starts with Tiger Lake. i915 will continue be the main production driver for the platforms up to Meteor Lake and Alchemist. Then the goal is to make this Intel Xe driver the primary driver for Lunar Lake and newer platforms. It uses most, if not all, of the key drm concepts, in special: TTM, drm-scheduler, drm-exec, drm-gpuvm/gpuva and others. Signed-off-by: Dave Airlie [airlied: add an extra X86 check, fix a typo, fix drm_exec_init interface change]. From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZYSwLgXZUZ57qGPQ@intel.com commit 221a164035fd8b554a44bd7c4bf8e7715a497561 Author: Sven Schnelle Date: Mon Dec 18 08:45:20 2023 +0100 entry: Move syscall_enter_from_user_mode() to header file To allow inlining of syscall_enter_from_user_mode(), move it to entry-common.h. Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231218074520.1998026-4-svens@linux.ibm.com commit caf4062e35b21cd7d3d35ac2f58f9765d02d32a0 Author: Sven Schnelle Date: Mon Dec 18 08:45:19 2023 +0100 entry: Move enter_from_user_mode() to header file To allow inlining of enter_from_user_mode(), move it to entry-common.h. Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231218074520.1998026-3-svens@linux.ibm.com commit d68019471995ba47e56a9da355df13a1cdb5bf7e Author: Sven Schnelle Date: Mon Dec 18 08:45:18 2023 +0100 entry: Move exit to usermode functions to header file To allow inlining, move exit_to_user_mode() to entry-common.h. Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231218074520.1998026-2-svens@linux.ibm.com commit edd13270fa0660fda608b5f2bf989c770d90d469 Author: Kevin Hao Date: Mon Dec 18 13:35:58 2023 +0800 gfs2: Use wait_event_freezable_timeout() for freezable kthread A freezable kernel thread can enter frozen state during freezing by either calling try_to_freeze() or using wait_event_freezable() and its variants. So for the following snippet of code in a kernel thread loop: try_to_freeze(); wait_event_interruptible_timeout(); We can change it to a simple wait_event_freezable_timeout() and then eliminate a function call. Signed-off-by: Kevin Hao Signed-off-by: Andreas Gruenbacher commit 76e7211ca129f6a9117ae88c020a4c1cafaa24cc Author: Kevin Hao Date: Mon Dec 18 13:35:57 2023 +0800 gfs2: Add missing set_freezable() for freezable kthread The kernel thread function gfs2_logd() and gfs2_quotad() invoke the try_to_freeze() in its loop. But all the kernel threads are no-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao Signed-off-by: Andreas Gruenbacher commit 711cbfc717650532624ca9f56fbaf191bed56e67 Author: Viresh Kumar Date: Tue Dec 12 13:13:48 2023 +0530 docs: rust: Clarify that 'rustup override' applies to build directory 'rustup override' is required to be set for the build directory and not necessarily the kernel source tree (unless the build directory is its subdir). Clarify the same in the Quick Start guide. Signed-off-by: Viresh Kumar Reviewed-by: Benno Lossin Reviewed-by: Alice Ryhl Originally-pointed-out-by: Masahiro Yamada Link: https://github.com/Rust-for-Linux/linux/commit/f2238e7 Link: https://lore.kernel.org/r/e2b943eca92abebbf035447b3569f09a7176c770.1702366951.git.viresh.kumar@linaro.org [ Reworded and fixed quotes for `--path` and `set`. ] Signed-off-by: Miguel Ojeda commit be412baf72402bd732e250033e03ad159d060a30 Author: Dirk Behme Date: Tue Dec 12 09:13:13 2023 +0100 docs: rust: Add rusttest info Searching the Rust kernel documentation all existing Rust Make targets (rustavailable, rustfmt, rustfmtcheck, rustdoc and rust-analyzer) are explicitly documented with their Make commands. While the Make target rusttest is mentioned two times in the existing documentation, it's Make command is not explicitly documented, yet. Add a test section to document this. While at it, add some info about the more important KUnit testing too. Reviewed-by: David Gow Signed-off-by: Dirk Behme Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20231212081313.226120-1-dirk.behme@de.bosch.com [ Added "the", newline and quotes for `.config`. Expanded "repos". ] Signed-off-by: Miguel Ojeda commit 7583ce66ddf7ed4f7aaa14b5e4cf78058ca597e1 Author: Miguel Ojeda Date: Fri Dec 15 13:47:51 2023 +0100 docs: rust: remove `CC=clang` mentions Nowadays all architectures except s390 recommend using `LLVM=1` instead of `CC=clang`, and since commit a3c6bfba4429 ("Documentation/llvm: refresh docs") the Kbuild LLVM documentation makes `LLVM=1` the way to go: We want to encourage the use of ``LLVM=1`` rather than just ``CC=clang``. Make that suggestion "above the fold" and "front and center" in our docs. In particular, that commit removes the examples with `CC=clang`. Thus do the same in the Rust Quick Start guide, i.e. remove the `CC=clang` mentions, especially since the architectures that have had their Rust support upstreamed (or soon to be upstreamed) are all `LLVM=1` ones. And perhaps by the time Rust is supported for s390 (or new architectures), it may have moved to `LLVM=1` anyway. Otherwise, this can be added back if needed (or perhaps an extra link to Documentation/kbuild/llvm.rst). This should also help avoiding potential confusion around `CC=clang` [1]. Link: https://lore.kernel.org/rust-for-linux/6df6e8e5-8d5b-4d3d-91b5-bc0e90c424ea@nvidia.com/ [1] Reviewed-by: Ariel Miculas Reviewed-by: Nathan Chancellor Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Reviewed-by: Justin Stitt Reviewed-by: John Hubbard Reviewed-by: Martin Rodriguez Reboredo Link: https://lore.kernel.org/r/20231215124751.175191-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit f70a4792287c71c13bf0d9193a5dfc5e411cf4e2 Merge: 5165799f0d071 5d51dc8db1019 Author: Jens Axboe Date: Thu Dec 21 14:44:17 2023 -0700 Merge tag 'nvme-6.8-2023-12-21' of git://git.infradead.org/nvme into for-6.8/block Pull NVMe updates from Keith: "nvme updates for Linux 6.8 - nvme fabrics spec updates (Guixin, Max) - nvme target udpates (Guixin, Evan) - nvme attribute refactoring (Daniel) - nvme-fc numa fix (Keith)" * tag 'nvme-6.8-2023-12-21' of git://git.infradead.org/nvme: nvme-fc: set numa_node after nvme_init_ctrl nvme-fabrics: don't check discovery ioccsz/iorcsz nvmet: configfs: use ctrl->instance to track passthru subsystems nvme: repack struct nvme_ns_head nvme: add csi, ms and nuse to sysfs nvme: rename ns attribute group nvme: refactor ns info setup function nvme: refactor ns info helpers nvme: move ns id info to struct nvme_ns_head nvmet: remove cntlid_min and cntlid_max check in nvmet_alloc_ctrl nvmet: allow identical cntlid_min and cntlid_max settings nvme-fabrics: check ioccsz and iorcsz nvme: introduce nvme_check_ctrl_fabric_info helper commit 5abde62465222edd3080b70099bd809f166d5d7d Author: Simon Horman Date: Thu Dec 21 18:03:52 2023 +0100 bpf: Avoid unnecessary use of comma operator in verifier Although it does not seem to have any untoward side-effects, the use of ';' to separate to assignments seems more appropriate than ','. Flagged by clang-17 -Wcomma No functional change intended. Compile tested only. Signed-off-by: Simon Horman Signed-off-by: Daniel Borkmann Reviewed-by: Dave Marchevsky Link: https://lore.kernel.org/bpf/20231221-bpf-verifier-comma-v1-1-cde2530912e9@kernel.org commit b6e1b708176846248c87318786d22465ac96dd2c Author: Lucas De Marchi Date: Wed Dec 20 08:19:23 2023 -0800 drm/xe: Remove uninitialized variable from warning "err" is not initialized when failing to create and add the freq0 sysfs file. Remove it from the message. This fixes the following warning with clang: ../drivers/gpu/drm/xe/xe_gt_freq.c:202:30: error: variable 'err' is uninitialized when used here [-Werror,-Wuninitialized] kobject_name(gt->sysfs), err); ^~~ Fixes: bef52b5c7a19 ("drm/xe: Create a xe_gt_freq component for raw management and sysfs") Reviewed-by: Michał Winiarski Link: https://lore.kernel.org/r/20231220161923.3740489-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 56794e5358542b7c652f202946e53bfd2373b5e0 Merge: 5a78a8121c4d8 7c5e046bdcb25 Author: Paolo Abeni Date: Thu Dec 21 22:17:23 2023 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Adjacent changes: drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c 23c93c3b6275 ("bnxt_en: do not map packet buffers twice") 6d1add95536b ("bnxt_en: Modify TX ring indexing logic.") tools/testing/selftests/net/Makefile 2258b666482d ("selftests: add vlan hw filter tests") a0bc96c0cd6e ("selftests: net: verify fq per-band packet limit") Signed-off-by: Paolo Abeni commit 5a78a8121c4d8e37035274c094e3af15fb79f004 Author: David Ahern Date: Mon Dec 18 20:07:42 2023 -0700 net/ipv6: Remove gc_link warn on in fib6_info_release A revert of 3dec89b14d37 ("net/ipv6: Remove expired routes with a separated list of routes") was sent for net-next. Revert the remainder of 5a08d0065a915 which added a warn on if a fib entry is still on the gc_link list to avoid compile failures when net is merged to net-next Signed-off-by: David Ahern Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231219030742.25715-1-dsahern@kernel.org Signed-off-by: Paolo Abeni commit f87b4402163be352601f7a012ab0d8dba7ecc64d Author: Hans de Goede Date: Sun Nov 26 22:40:24 2023 +0100 ASoC: Intel: cht_bsw_rt5645: Set card.components string Set the card.components string using the new rt5645_components() helper which returns a components string based on the DMI quirks inside the rt5645 codec driver. Signed-off-by: Hans de Goede Link: https://msgid.link/r/20231126214024.300505-8-hdegoede@redhat.com Signed-off-by: Mark Brown commit 8184e1db699befc5101bcfe401283becfc228a0b Author: Hans de Goede Date: Sun Nov 26 22:40:23 2023 +0100 ASoC: rt5645: Add mono speaker information to the components string The GPD Win and Teclast X80 Pro both only have 1 speaker add information about this to the components string. Signed-off-by: Hans de Goede Link: https://msgid.link/r/20231126214024.300505-7-hdegoede@redhat.com Signed-off-by: Mark Brown commit 4cd7654553b3cf1ce5a7560f0492f0431785dfae Author: Hans de Goede Date: Sun Nov 26 22:40:22 2023 +0100 ASoC: rt5645: Add a rt5645_components() helper The rt5645 codec driver uses DMI quirks to configure the DMIC data-pins, which means that it knows which DMIC interface is used on a specific device. ATM we duplicate this DMI matching inside the UCM profiles to select the right DMIC interface. Add a rt5645_components() helper which the machine-driver can use to set the components string of the card so that UCM can get the info from the components string. This way we only need to add new DMI quirks in one place. Signed-off-by: Hans de Goede Link: https://msgid.link/r/20231126214024.300505-6-hdegoede@redhat.com Signed-off-by: Mark Brown commit b4635b9cd9ae48050d72b645cc53175788bebf52 Author: Hans de Goede Date: Sun Nov 26 22:40:21 2023 +0100 ASoC: rt5645: Add rt5645_get_pdata() helper Add a rt5645_get_pdata() helper function which retreives the platform-data and overrides it with the quirks module parameter if that is set. This is a preparation patch for adding the rt5645_components() function. Signed-off-by: Hans de Goede Link: https://msgid.link/r/20231126214024.300505-5-hdegoede@redhat.com Signed-off-by: Mark Brown commit f72a9c2b8f1487181302d69fb82d5c76226be3fb Author: Hans de Goede Date: Sun Nov 26 22:40:20 2023 +0100 ASoC: rt5645: Refactor rt5645_parse_dt() Refactor rt5645_parse_dt(), make it take a pointer to struct rt5645_platform_data as argument instead of passing in the complete rt5645_priv struct. While at it also make it void since it always succeeds. This is a preparation patch for factoring the code to get the platform-data out into a separate helper function. Signed-off-by: Hans de Goede Link: https://msgid.link/r/20231126214024.300505-4-hdegoede@redhat.com Signed-off-by: Mark Brown commit 8f28e1996a786a7538d65e5258d3eecb92943673 Author: Hans de Goede Date: Sun Nov 26 22:40:19 2023 +0100 ASoC: rt5645: Add platform-data for Acer Switch V 10 The Acer Switch V 10 uses the default jack-detect mode 3, but instead of using an analog microphone it is using a DMIC on dmic-data-pin 1, like other models following Intel's Braswell's reference design. Add a DMI quirk pointing to the intel_braswell_platform_data for this. Signed-off-by: Hans de Goede Link: https://msgid.link/r/20231126214024.300505-3-hdegoede@redhat.com Signed-off-by: Mark Brown commit 51add1687f39292af626ac3c2046f49241713273 Author: Hans de Goede Date: Sun Nov 26 22:40:18 2023 +0100 ASoC: rt5645: Drop double EF20 entry from dmi_platform_data[] dmi_platform_data[] first contains a DMI entry matching: DMI_MATCH(DMI_PRODUCT_NAME, "EF20"), and then contains an identical entry except for the match being: DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"), Since these are partial (non exact) DMI matches the first match will also match any board with "EF20EA" in their DMI product-name, drop the second, redundant, entry. Fixes: a4dae468cfdd ("ASoC: rt5645: Add ACPI-defined GPIO for ECS EF20 series") Cc: Chris Chiu Signed-off-by: Hans de Goede Link: https://msgid.link/r/20231126214024.300505-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit f6cd66231aa58599526584ff4df1bdde8d86eac8 Author: Valentin Caron Date: Mon Dec 18 16:57:15 2023 +0100 spi: stm32: add st,stm32mp25-spi compatible supporting STM32MP25 soc Add support for the STM32MP25: - Burst should not be enabled with the new DMA used on STM32MP25. - STM32MP25 SPI8 has a limited feature set, it can only send words of 8 or 16 bits and with a maximum words number of 1024. Signed-off-by: Valentin Caron Signed-off-by: Alain Volmat Link: https://msgid.link/r/20231218155721.359198-4-alain.volmat@foss.st.com Signed-off-by: Mark Brown commit f034a151059a84cecaae68f5a72ee5d815e94625 Author: Valentin Caron Date: Mon Dec 18 16:57:14 2023 +0100 dt-bindings: spi: stm32: add st,stm32mp25-spi compatible Add st,stm32mp25-spi compatible in dt-bindings. STM32MP25 spi is similar to the STM32H7 except for the following two points: - Burst should not be enabled with the new DMA used on STM32MP25. - STM32MP25 SPI8 has a limited feature set, it can only send words of 8 or 16 bits and with a maximum words number of 1024. Signed-off-by: Valentin Caron Signed-off-by: Alain Volmat Reviewed-by: Fabrice Gasnier Acked-by: Conor Dooley Link: https://msgid.link/r/20231218155721.359198-3-alain.volmat@foss.st.com Signed-off-by: Mark Brown commit 6f98f25247b7ef03fb89030a3af6c0eb08132104 Author: Alain Volmat Date: Mon Dec 18 16:57:13 2023 +0100 spi: stm32: use dma_get_slave_caps prior to configuring dma channel First check the dma channel capabilities (max burst) before configuring the dma channel. Signed-off-by: Alain Volmat Link: https://msgid.link/r/20231218155721.359198-2-alain.volmat@foss.st.com Signed-off-by: Mark Brown commit bc2e7d5c298a86f2aa759cabe46f66f862fca3b3 Author: Miguel Ojeda Date: Sat Dec 16 00:54:28 2023 +0100 rust: support `srctree`-relative links Some of our links use relative paths in order to point to files in the source tree, e.g.: //! C header: [`include/linux/printk.h`](../../../../include/linux/printk.h) /// [`struct mutex`]: ../../../../include/linux/mutex.h These are problematic because they are hard to maintain and do not support `O=` builds. Instead, provide support for `srctree`-relative links, e.g.: //! C header: [`include/linux/printk.h`](srctree/include/linux/printk.h) /// [`struct mutex`]: srctree/include/linux/mutex.h The links are fixed after `rustdoc` generation to be based on the absolute path to the source tree. Essentially, this is the automatic version of Tomonori's fix [1], suggested by Gary [2]. Suggested-by: Gary Guo Reported-by: FUJITA Tomonori Closes: https://lore.kernel.org/r/20231026.204058.2167744626131849993.fujita.tomonori@gmail.com [1] Fixes: 48fadf440075 ("docs: Move rustdoc output, cross-reference it") Link: https://lore.kernel.org/rust-for-linux/20231026154525.6d14b495@eugeo/ [2] Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Benno Lossin Link: https://lore.kernel.org/r/20231215235428.243211-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 0a7f5ba73e57eaf7f2e5589d26bbe9bf6754c542 Author: Boqun Feng Date: Thu Dec 14 12:04:21 2023 -0800 rust: sync: Makes `CondVar::wait()` an uninterruptible wait Currently, `CondVar::wait()` is an interruptible wait, and this is different than `wait_event()` in include/linux/wait.h (which is an uninterruptible wait). To avoid confusion between different APIs on the interruptible/uninterruptible, make `CondVar::wait()` an uninterruptible wait same as `wait_event()`, also rename the old `wait()` to `CondVar::wait_interruptible()`. Spotted-by: Tiago Lam Signed-off-by: Boqun Feng Reviewed-by: Benno Lossin Reviewed-by: Alice Ryhl Reviewed-by: Tiago Lam Link: https://lore.kernel.org/r/20231214200421.690629-1-boqun.feng@gmail.com Signed-off-by: Miguel Ojeda commit ac254dfb983deb7840bc7267418d1ae231f5694f Author: JiaLong.Yang Date: Thu Dec 21 14:02:41 2023 +0800 perf vendor events powerpc: Add PVN for HX-C2000 CPU with Power8 Architecture HX-C2000 is a new CPU made by HEXIN Technologies Co., Ltd. And a new PVN 0x0066 has been applied from the OpenPower Community for this CPU. Here is a patch to make perf tool run in the CPU. Reviewed-by: Madhavan Srinivasan Signed-off-by: JiaLong.Yang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: shenghui.qu@shingroup.cn Cc: Zhao Ke Cc: zhijie.ren@shingroup.cn Link: https://lore.kernel.org/r/20231221060242.4532-1-jialong.yang@shingroup.cn Signed-off-by: Arnaldo Carvalho de Melo commit 968509128207f122d7177ffb6ff51c9c6fa7e13d Author: Andrei Otcheretianski Date: Tue Dec 19 21:59:02 2023 +0200 wifi: iwlwifi: replace ENOTSUPP with EOPNOTSUPP ENOTSUPP isn't a standard error code, don't use it. Replace with EOPNOTSUPP instead. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.a69f4347b5f8.I88429d5de8251287ec0b58ff26a588465b9049a5@changeid Signed-off-by: Johannes Berg commit 6f3afc6c19fcd2d04909d8e04c7de04879838d1e Author: Emmanuel Grumbach Date: Tue Dec 19 21:59:01 2023 +0200 wifi: iwlwifi: mvm: use the new command to clear the internal buffer The firmware can allow to clear the internal debug buffer. This can be used to sanitize the data when requested to. Signed-off-by: Emmanuel Grumbach Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.99aed3efbacb.Ib5bda1d1ff4bae476667737d4081ad066d1d7e6b@changeid Signed-off-by: Johannes Berg commit ea5cca78fa9db1904ab6ee74ca9d25541d418613 Author: Johannes Berg Date: Tue Dec 19 21:59:00 2023 +0200 wifi: iwlwifi: mvm: disallow puncturing in US/Canada For now, this isn't allowed. The API to mac80211 isn't great for this, but we need to change the API to move puncturing into the chanctx/chandef, and will do it better then. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.38955b68b429.I0c4ae99179b271648a747a51eb04853504c7952c@changeid Signed-off-by: Johannes Berg commit f7e3ab5c33834c0a699ef4b53417cfa2df2bca26 Author: Johannes Berg Date: Tue Dec 19 21:58:59 2023 +0200 wifi: iwlwifi: mvm: add US/Canada MCC to API We don't want to duplicate the definitions later, so add them to the API. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.6595e905997b.I12354d31676911b29ab30c81a4e9b87f59284d3b@changeid Signed-off-by: Johannes Berg commit 1c022d0145a60770b28e8c8768a24cc4868905ac Author: Mukesh Sisodiya Date: Tue Dec 19 21:58:58 2023 +0200 wifi: iwlwifi: Add rf_mapping of new wifi7 devices Add the CSR register details for new wifi7 devices and correctly set rf_name for devices with FM and WP radios. Signed-off-by: Mukesh Sisodiya Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.a9c04b1e9d13.Ibf258d5e6370d8840a2560282988a1c26377c410@changeid Signed-off-by: Johannes Berg commit 43ea4035ce7436e7a43a859f69b5d1dac304a99e Author: Miri Korenblit Date: Tue Dec 19 21:58:57 2023 +0200 wifi: iwlwifi: cleanup BT Shared Single Antenna code We don't support such device. Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.6e6961ac0ac5.I923024eac20efd24a5b42332d8e73ae756e0469a@changeid Signed-off-by: Johannes Berg commit 9b6614e5ead5d19a71893bcca3f1a6569ca0c456 Author: Miri Korenblit Date: Tue Dec 19 21:58:56 2023 +0200 wifi: iwlwifi: assign phy_ctxt before eSR activation eSR is activated when a chanctx is assigned to more than one link. During eSR activation we should disable RLC for both phys, and configure the FW with a special phy command for both phys. Currently we assign the phy_ctxt to the link only after eSR activation, so RLC is not disabled for the new phy_ctxt, and a cmd is not sent to FW. Fix this by first assigning the new phy_ctxt to the link and then doing the eSR activation. Fixes: 12bacfc2c065 ("wifi: iwlwifi: handle eSR transitions") Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.3d94507f5d9a.I537fcd73aedf94c7348c03157e486f24301fef14@changeid Signed-off-by: Johannes Berg commit cb2dfacb197bed0241fbb4f84bd0995a47f4465e Author: Anjaneyulu Date: Tue Dec 19 21:58:55 2023 +0200 wifi: iwlwifi: fix out of bound copy_from_user The driver copies the userspace buffer into an internal NUL byte terminated buffer. While doing so, it was reading beyond the end of the userspace buffer, overwriting its own NUL termination in the process. Fix this by only copying the correct number of bytes. Fixes: 3f244876ef73 ("wifi: iwlwifi: make debugfs entries link specific") Signed-off-by: Anjaneyulu Reviewed-by: Gregory Greenman Reviewed-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.e4913deb2ad4.Idcf6a7e909ff4b7801cd49c2f691f84a2f68eff9@changeid Signed-off-by: Johannes Berg commit c5bfdb46636a2ea7f0678243c6d3e9f8d26b027a Author: Ilan Peer Date: Tue Dec 19 21:58:54 2023 +0200 wifi: iwlwifi: mvm: Do not warn if valid link pair was not found It is possible that though multiple links are enabled we cannot enabled EMLSR enable more than a single link, e.g., all valid links are on the same band etc. Thus, do not warn in case no valid link pair is found. Fixes: b9be67fb4207 ("wifi: iwlwifi: mvm: Add basic link selection logic") Signed-off-by: Ilan Peer Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.142e57a05230.I7cfe78c94c3d15c4c744bccadd8f187e43594932@changeid Signed-off-by: Johannes Berg commit 6ba40cd3a99b8f56c3b2a321e622f1b6f94f97c2 Author: Johannes Berg Date: Tue Dec 19 21:58:53 2023 +0200 wifi: iwlwifi: mvm: d3: avoid intermediate/early mutex unlock Now with the mac80211 locking model changed, we no longer can cause any bad dependencies here between mvm->mutex and other mutexes in mac80211, so we no longer need to drop the mutex early or even temporarily. Clean this up. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.1f2f5289ecc6.I7e3b8e806b6d50e88ba0c26767da8261806eb9c7@changeid Signed-off-by: Johannes Berg commit 2afc3dad39ea84a072d04ff40a417234326adc47 Author: Johannes Berg Date: Tue Dec 19 21:58:52 2023 +0200 wifi: iwlwifi: mvm: send TX path flush in rfkill If we want to drop packets, that's surely a good thing to do when we want to enter rfkill. Send this command despite rfkill so we can successfully clean up everything, we need to handle it separately since it has CMD_WANT_SKB, so it's not going to automatically return success when in rfkill. Fixes: d4e3a341b87b ("iwlwifi: mvm: add support for new flush queue response") Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.c528a6fa6cec.Ibe5e9560359ccc0fba60c35e01de285c376748a2@changeid Signed-off-by: Johannes Berg commit 308cc451ef37003ee2e4ce373993f3bd5117e36f Author: Andrei Otcheretianski Date: Tue Dec 19 21:58:51 2023 +0200 wifi: iwlwifi: Don't mark DFS channels as NO-IR The NVM_CHANNEL_ACTIVE bit means that active scanning/beaconing is allowed, however it's not an exact opposite of IEEE80211_CHAN_NO_IR. For example, NVM_CHANNEL_ACTIVE bit is not set on DFS channels, while cfg80211 doesn't really expect NO-IR on DFS channels. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.94cd9b96a532.Ifb0e8d8a6a6384493758f26b811d58432536101a@changeid Signed-off-by: Johannes Berg commit a1910a7ffd171f9852af6d5408575609f381b2ad Author: Andrei Otcheretianski Date: Tue Dec 19 21:58:50 2023 +0200 wifi: iwlwifi: mvm: Allow DFS concurrent operation AX210 devices allow concurrent P2P operation on DFS channels. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.dc39b33bf507.I04dfda24d73091fb75701279d10ac400314de488@changeid Signed-off-by: Johannes Berg commit b1a2e5c310e063560760806d2cc5d2233c596067 Author: Johannes Berg Date: Tue Dec 19 21:58:49 2023 +0200 wifi: iwlwifi: mvm: set siso/mimo chains to 1 in FW SMPS request The firmware changed their mind, don't set the chains to zero, instead set them to 1 as we normally would for connections to APs that don't use MIMO. Fixes: 2a7ce54ccc23 ("iwlwifi: mvm: honour firmware SMPS requests") Signed-off-by: Johannes Berg Reviewed-by: Luciano Coelho Signed-off-by: Miri Korenblit Link: https://msgid.link/20231219215605.7f031f1a127f.Idc816e0f604b07d22a9d5352bc23c445512fad14@changeid Signed-off-by: Johannes Berg commit e993af2ed2882f5dade10474d7fd1e2403aa0ab7 Author: Miri Korenblit Date: Wed Dec 20 13:41:45 2023 +0200 wifi: mac80211: add a driver callback to check active_links During ieee80211_set_active_links() we do (among the others): 1. Call drv_change_vif_links() with both old_active and new_active 2. Unassign the chanctx for the removed link(s) (if any) 3. Assign chanctx to the added link(s) (if any) 4. Call drv_change_vif_links() with the new_active links bitmap The problem here is that during step #1 the driver doesn't know whether we will activate multiple links simultaneously or are just doing a link switch, so it can't check there if multiple links are supported/enabled. (Some of the drivers might enable/disable this option dynamically) And during step #3, in which the driver already knows that, returning an error code (for example when multiple links are not supported or disabled), will cause a warning, and we will still complete the transition to the new_active links. (It is hard to undo things in that stage, since we released channels etc.) Therefore add a driver callback to check if the desired new_active links will be supported by the driver or not. This callback will be called in the beginning of ieee80211_set_active_links() so we won't do anything before we are sure it is supported. Signed-off-by: Miri Korenblit Reviewed-by: Gregory Greenman Reviewed-by: Johannes Berg Link: https://msgid.link/20231220133549.64c4d70b33b8.I79708619be76b8ecd4ef3975205b8f903e24a2cd@changeid Signed-off-by: Johannes Berg commit b1a23f8ae0d76ad32fe36682730c050251275b0b Author: Ayala Beker Date: Wed Dec 20 13:41:44 2023 +0200 wifi: mac80211: fix advertised TTLM scheduling Handle a case of time overflow, where the switch time might be smaller than the partial TSF in the beacon. Additionally, apply advertised TTLM earlier in order to be ready on time on the newly activated links. Fixes: 702e80470a33 ("wifi: mac80211: support handling of advertised TID-to-link mapping") Signed-off-by: Ayala Beker Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.15079c34e5c8.I0dd50bcceff5953080cdd7aee5118b72c78c6507@changeid Signed-off-by: Johannes Berg commit acc44cbd7727115f9381c35c2898b1b5af665ec8 Author: Benjamin Berg Date: Wed Dec 20 13:41:43 2023 +0200 wifi: cfg80211: avoid double free if updating BSS fails cfg80211_update_known_bss will always consume the passed IEs. As such, cfg80211_update_assoc_bss_entry also needs to always set the pointers to NULL so that no double free can occur. Note that hitting this would probably require being connected to a hidden BSS which is then doing a channel switch while also switching to be not hidden anymore at the same time. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.8891edb28d51.Id09c5145363e990ff5237decd58296302e2d53c8@changeid Signed-off-by: Johannes Berg commit 31c5e92be5936adde55e783c0380264afc7218b0 Author: Benjamin Berg Date: Wed Dec 20 13:41:42 2023 +0200 wifi: cfg80211: ensure cfg80211_bss_update frees IEs on error cfg80211_bss_update is expected to consume the IEs that are passed into it in the temporary internal BSS. This did not happen in some error cases (which are also WARN_ON paths), so change the code to use a common label and use that everywhere. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.8e72ea105e17.Ic81e9431e980419360e97502ce8c75c58793f05a@changeid Signed-off-by: Johannes Berg commit 32af9a9e1069e55bc02741fb00ac9d0ca1a2eaef Author: Benjamin Berg Date: Wed Dec 20 13:41:41 2023 +0200 wifi: cfg80211: free beacon_ies when overridden from hidden BSS This is a more of a cosmetic fix. The branch will only be taken if proberesp_ies is set, which implies that beacon_ies is not set unless we are connected to an AP that just did a channel switch. And, in that case we should have found the BSS in the internal storage to begin with. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.b898e22dadff.Id8c4c10aedd176ef2e18a4cad747b299f150f9df@changeid Signed-off-by: Johannes Berg commit e62c0fcc0e06a36b40615885eb86eb407ac8d0dd Author: Johannes Berg Date: Wed Dec 20 13:41:40 2023 +0200 wifi: mac80211: allow 64-bit radiotap timestamps When reporting the radiotap timestamp, the mactime field is usually unused, we take the data from the device_timestamp. However, there can be cases where the radiotap timestamp is better reported as a 64-bit value, so since the mactime is free, add a flag to support using the mactime as a 64-bit radiotap timestamp. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Reviewed-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.00c8b9234f0c.Ie3ce5eae33cce88fa01178e7aea94661ded1ac24@changeid Signed-off-by: Johannes Berg commit d5b6f6d595b446c1693fdaa6aeb4a65b94d5fc90 Author: Johannes Berg Date: Wed Dec 20 13:41:39 2023 +0200 wifi: mac80211: rework RX timestamp flags We only have a single flag free, and before using that for another mactime flag, instead refactor the mactime flags to use a 2-bit field. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Reviewed-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.d0e664832d14.I20c8900106f9bf81316bed778b1e3ce145785274@changeid Signed-off-by: Johannes Berg commit 645f3d85129d8aac3b896ba685fbc20a31c2c036 Author: Mukesh Sisodiya Date: Wed Dec 20 13:41:38 2023 +0200 wifi: cfg80211: handle UHB AP and STA power type UHB AP send supported power type(LPI, SP, VLP) in beacon and probe response IE and STA should connect to these AP only if their regulatory support the AP power type. Beacon/Probe response are reported to userspace with reason "STA regulatory not supporting to connect to AP based on transmitted power type" and it should not connect to AP. Signed-off-by: Mukesh Sisodiya Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.cbfbef9170a9.I432f78438de18aa9f5c9006be12e41dc34cc47c5@changeid Signed-off-by: Johannes Berg commit 99b6877dce4e2517b9ba7d674759487ac34ecbfa Author: Andrei Otcheretianski Date: Wed Dec 20 13:41:37 2023 +0200 wifi: mac80211_hwsim: Add custom reg for DFS concurrent Add custom regulatory that marks DFS channels as DFS_CONCURRENT. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.4b08a6530fa3.Ic285ca7a4728e77a4bea1394a6a52cf286fbea22@changeid Signed-off-by: Johannes Berg commit 513b1a168c8767d5090493bd03ca7fa0a837e465 Author: Andrei Otcheretianski Date: Wed Dec 20 13:41:36 2023 +0200 wifi: mac80211: Schedule regulatory channels check on bandwith change Some devices may support concurrent DFS operation which relies on the BSS channel width for its relaxations. Notify cfg80211 about BW change so it can schedule regulatory checks. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.e08f8e9ebc67.If8915d13e203ebd380579f55fd9148e9b3f43306@changeid Signed-off-by: Johannes Berg commit 9be61558dec0af359ce3139c8450228de7f0796d Author: Andrei Otcheretianski Date: Wed Dec 20 13:41:35 2023 +0200 wifi: cfg80211: Schedule regulatory check on BSS STA channel change Due to different relaxation policies it may be needed to re-check channels after a BSS station interface is disconnected or performed a channel switch. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.1f2f8475bcf1.I1879d259d8d756159c8060f61f4bce172e6d323e@changeid Signed-off-by: Johannes Berg commit 41a313d875e0c5822efb50e8221b8d58811609bb Author: Andrei Otcheretianski Date: Wed Dec 20 13:41:34 2023 +0200 wifi: cfg80211: reg: Support P2P operation on DFS channels FCC-594280 D01 Section B.3 allows peer-to-peer and ad hoc devices to operate on DFS channels while they operate under the control of a concurrent DFS master. For example, it is possible to have a P2P GO on a DFS channel as long as BSS connection is active on the same channel. Allow such operation by adding additional regulatory flags to indicate DFS concurrent channels and capable devices. Add the required relaxations in DFS regulatory checks. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231220133549.bdfb8a9c7c54.I973563562969a27fea8ec5685b96a3a47afe142f@changeid Signed-off-by: Johannes Berg commit b133fdf07db849eb2ce25df19d88ff31701d3b6d Author: Jouni Malinen Date: Tue Dec 19 19:48:14 2023 +0200 wifi: mac80211: Skip association timeout update after comeback rejection It is possible for the TX status report for the (Re)Association Request frame to be delayed long enough for the AP's (Re)Association Response frame to be received and processed before it. If that were to happen for a case where the AP rejects the association with indication to come back later, the association timeout and retry state should not be modified anymore with the TX status information that would be processed after this. Updating the association timeout in such a reverse order of events could result in shortening the timeouts for the association comeback mechanism and that could result in the association failing. Track whether we have already processed association rejection with comeback time and if so, skip the timeout and retry update on any following TX status report. Signed-off-by: Jouni Malinen Link: https://msgid.link/20231219174814.2581575-1-j@w1.fi Signed-off-by: Johannes Berg commit 756df9853491e28acbe7fca9f8146a784f026117 Author: Jonathan Corbet Date: Wed Dec 20 15:57:55 2023 -0700 wifi: mac80211: address some kerneldoc warnings include/net/mac80111.h contains a number of either excess or incorrect kerneldoc entries for structure members, leading to these warnings: ./include/net/mac80211.h:491: warning: Excess struct member 'rssi' description in 'ieee80211_event' ./include/net/mac80211.h:491: warning: Excess struct member 'mlme' description in 'ieee80211_event' ./include/net/mac80211.h:491: warning: Excess struct member 'ba' description in 'ieee80211_event' ./include/net/mac80211.h:777: warning: Excess struct member 'ack_enabled' description in 'ieee80211_bss_conf' ./include/net/mac80211.h:1222: warning: Excess struct member 'ampdu_ack_len' description in 'ieee80211_tx_info' ./include/net/mac80211.h:1222: warning: Excess struct member 'ampdu_len' description in 'ieee80211_tx_info' ./include/net/mac80211.h:1222: warning: Excess struct member 'ack_signal' description in 'ieee80211_tx_info' ./include/net/mac80211.h:2920: warning: Excess struct member 'radiotap_he' description in 'ieee80211_hw' Fix or remove the entries as needed. This change removes 208 warnings from a "make htmldocs" build. Signed-off-by: Jonathan Corbet Reviewed-by: Simon Horman Link: https://msgid.link/87zfy4bhxo.fsf@meer.lwn.net Signed-off-by: Johannes Berg commit ce10e8653f8b6569ea5d4f96917b5eaee7437072 Author: Miri Korenblit Date: Wed Dec 20 08:02:12 2023 +0200 wifi: mac80211_hwsim: support HE 40 MHz in 2.4 GHz band We are missing the flag that indicates that capability of 40 MHz bandwidth support in HE on the LB. Add it. Signed-off-by: Miri Korenblit Reviewed-by: Gregory Greenman Link: https://msgid.link/20231220075830.4f10c6b64d1a.I1ba6905c806be6e0548ed15130c0bbb2ee04c9fd@changeid Signed-off-by: Johannes Berg commit 3361597890ba901e4b666c2467b2cba349b0f63b Author: Jonathan Corbet Date: Tue Dec 19 17:01:39 2023 -0700 wifi: cfg80211: address several kerneldoc warnings include/net/cfg80211.h includes a number of kerneldoc entries for struct members that do not exist, leading to these warnings: ./include/net/cfg80211.h:3192: warning: Excess struct member 'band_pref' description in 'cfg80211_bss_selection' ./include/net/cfg80211.h:3192: warning: Excess struct member 'adjust' description in 'cfg80211_bss_selection' ./include/net/cfg80211.h:6181: warning: Excess struct member 'bssid' description in 'wireless_dev' ./include/net/cfg80211.h:6181: warning: Excess struct member 'beacon_interval' description in 'wireless_dev' ./include/net/cfg80211.h:7299: warning: Excess struct member 'bss' description in 'cfg80211_rx_assoc_resp_data' Remove and/or repair each entry to address the warnings and ensure a proper docs build for the affected structures. Signed-off-by: Jonathan Corbet Reviewed-by: Randy Dunlap Link: https://msgid.link/87plz1g2sc.fsf@meer.lwn.net Signed-off-by: Johannes Berg commit 80fe9e51510b23472ad0f97175556490549ed714 Author: Miguel Ojeda Date: Thu Dec 14 10:29:58 2023 +0100 rust: upgrade to Rust 1.74.1 This is the next upgrade to the Rust toolchain, from 1.73.0 to 1.74.1 (i.e. the latest) [1]. See the upgrade policy [2] and the comments on the first upgrade in commit 3ed03f4da06e ("rust: upgrade to Rust 1.68.2"). # Unstable features No unstable features (that we use) were stabilized. Therefore, the only unstable features allowed to be used outside the `kernel` crate are still `new_uninit,offset_of`, though other code to be upstreamed may increase the list (e.g. `offset_of` was added recently). Please see [3] for details. # Other improvements Rust 1.74.0 allows to use `#[repr(Rust)]` explicitly [4], which can be useful to be explicit about particular cases that would normally use e.g. the C representation, such as silencing lints like the upcoming additions we requested [5] to the `no_mangle_with_rust_abi` Clippy lint (which in turn triggered the `#[repr(Rust)]` addition). Rust 1.74.0 includes a fix for one of the false negative cases we reported in Clippy's `disallowed_macros` lint [6] that we would like to use in the future. Rust 1.74.1 fixes an ICE that the Apple AGX GPU driver was hitting [7]. # Required changes For this upgrade, no changes were required (i.e. on our side). # `alloc` upgrade and reviewing The vast majority of changes are due to our `alloc` fork being upgraded at once. There are two kinds of changes to be aware of: the ones coming from upstream, which we should follow as closely as possible, and the updates needed in our added fallible APIs to keep them matching the newer infallible APIs coming from upstream. Instead of taking a look at the diff of this patch, an alternative approach is reviewing a diff of the changes between upstream `alloc` and the kernel's. This allows to easily inspect the kernel additions only, especially to check if the fallible methods we already have still match the infallible ones in the new version coming from upstream. Another approach is reviewing the changes introduced in the additions in the kernel fork between the two versions. This is useful to spot potentially unintended changes to our additions. To apply these approaches, one may follow steps similar to the following to generate a pair of patches that show the differences between upstream Rust and the kernel (for the subset of `alloc` we use) before and after applying this patch: # Get the difference with respect to the old version. git -C rust checkout $(linux/scripts/min-tool-version.sh rustc) git -C linux ls-tree -r --name-only HEAD -- rust/alloc | cut -d/ -f3- | grep -Fv README.md | xargs -IPATH cp rust/library/alloc/src/PATH linux/rust/alloc/PATH git -C linux diff --patch-with-stat --summary -R > old.patch git -C linux restore rust/alloc # Apply this patch. git -C linux am rust-upgrade.patch # Get the difference with respect to the new version. git -C rust checkout $(linux/scripts/min-tool-version.sh rustc) git -C linux ls-tree -r --name-only HEAD -- rust/alloc | cut -d/ -f3- | grep -Fv README.md | xargs -IPATH cp rust/library/alloc/src/PATH linux/rust/alloc/PATH git -C linux diff --patch-with-stat --summary -R > new.patch git -C linux restore rust/alloc Now one may check the `new.patch` to take a look at the additions (first approach) or at the difference between those two patches (second approach). For the latter, a side-by-side tool is recommended. Link: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1741-2023-12-07 [1] Link: https://rust-for-linux.com/rust-version-policy [2] Link: https://github.com/Rust-for-Linux/linux/issues/2 [3] Link: https://github.com/rust-lang/rust/pull/114201 [4] Link: https://github.com/rust-lang/rust-clippy/issues/11219 [5] Link: https://github.com/rust-lang/rust-clippy/issues/11431 [6] Link: https://github.com/rust-lang/rust/issues/117976#issuecomment-1822225691 [7] Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Tested-by: David Gow Link: https://lore.kernel.org/r/20231214092958.377061-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda commit 4515d08a742c76612b65d2f47a87d12860519842 Author: Marco Pagani Date: Thu Dec 21 17:58:47 2023 +0100 kernel/module: improve documentation for try_module_get() The sentence "this call will fail if the module is already being removed" is potentially confusing and may contradict the rest of the documentation. If one tries to get a module that has already been removed using a stale pointer, the kernel will crash. Signed-off-by: Marco Pagani Signed-off-by: Luis Chamberlain commit c5f3fd21789cff8fa1120e802dd1390d34e3eec0 Author: Al Viro Date: Sat Sep 16 12:49:26 2023 -0400 apparmorfs: don't duplicate kfree_link() rawdata_link_cb() is identical to it Signed-off-by: Al Viro commit 12c0c3a65a0f399e9bb582350314d59960e62919 Author: Al Viro Date: Thu Apr 20 15:36:12 2023 -0400 orangefs: saner arguments passing in readdir guts orangefs_dir_fill() doesn't use oi and dentry arguments at all do_readdir() gets dentry, uses only dentry->d_inode; it also gets oi, which is ORANGEFS_I(dentry->d_inode) (i.e. ->d_inode - constant offset). orangefs_dir_mode() gets dentry and oi, uses only to pass those to do_readdir(). orangefs_dir_iterate() uses dentry and oi only to pass those to orangefs_dir_fill() and orangefs_dir_more(). The only thing it really needs is ->d_inode; moreover, that's better expressed as file_inode(file) - no need to go through ->f_path.dentry->d_inode. Signed-off-by: Al Viro commit fda43691041c7ee685da903641402a0f913fe9e9 Author: Al Viro Date: Tue Nov 14 12:20:22 2023 -0500 ocfs2_find_match(): there's no such thing as NULL or negative ->d_parent Signed-off-by: Al Viro commit 3a1613672e859b85cf87bbe7569552b55612a0f5 Author: Al Viro Date: Sun Nov 12 17:08:50 2023 -0500 reiserfs_add_entry(): get rid of pointless namelen checks In all cases namelen is ->d_name.len of some dentry; moreover, a dentry that has passed ->lookup() without triggering ENAMETOOLONG check there. The comment next to these checks is either a rudiment of some other check that used to be there once upon a time, or an attempt to come up with the possible reason for that check (well, more like "why does ext3 do it?") Signed-off-by: Al Viro commit b64b0732c3eec11783dd6bb12757dc04395a73e1 Author: Al Viro Date: Sun Nov 12 17:03:14 2023 -0500 __ocfs2_add_entry(), ocfs2_prepare_dir_for_insert(): namelen checks namelen can't be zero; neither when it's coming from dentry name, nor when dealing with orphans (in ocfs2_orphan_add() and __ocfs2_prepare_orphan_dir()). Rudiment of old ext2 pointless check, long gone in ext2 itself... Signed-off-by: Al Viro commit 556f38bf457fee5d9f3ede65b67fd91dd2ea2ca1 Author: Al Viro Date: Sun Nov 12 16:25:46 2023 -0500 ext4_add_entry(): ->d_name.len is never 0 That bogosity goes back to the initial merge of ext3. Once upon a time ext2 used to have a similar check; that got taken out during the switch to page cache (June 2001). ext3 got merged into mainline 5 months later, still using buffer cache for directories; removal of the pointless check in ext2 should've been done as a separate patch, but it hadn't been, so that thing got missed... Signed-off-by: Al Viro commit f6c8bfcf951feeab716bd051e4c1d767fe82df0f Author: Al Viro Date: Sat Nov 11 01:52:25 2023 -0500 befs: d_obtain_alias(ERR_PTR(...)) will do the right thing Signed-off-by: Al Viro commit 155d46beea3dd1c26564856cbabf7f654ad094e6 Author: Al Viro Date: Sat Nov 11 01:51:48 2023 -0500 affs: d_obtain_alias(ERR_PTR(...)) will do the right thing Signed-off-by: Al Viro commit 1eae9a47835ed4703055afbb3c52fef6d07a8a4c Author: Al Viro Date: Sat Nov 11 01:13:08 2023 -0500 /proc/sys: use d_splice_alias() calling conventions to simplify failure exits Signed-off-by: Al Viro commit 6f36230e235da4f34a831d20c51f0472e1a36f48 Author: Al Viro Date: Sat Nov 11 01:11:47 2023 -0500 hostfs: use d_splice_alias() calling conventions to simplify failure exits Signed-off-by: Al Viro commit 5e7582f6e3a89d2fecf0a08e44ee02780c4cb4cf Author: Al Viro Date: Sun Nov 12 17:12:26 2023 -0500 udf_fiiter_add_entry(): check for zero ->d_name.len is bogus... Acked-by: Jan Kara Signed-off-by: Al Viro commit f58b8c3ef7b25582448c262e56f0414c48424952 Author: Al Viro Date: Sat Nov 11 01:55:30 2023 -0500 udf: d_obtain_alias(ERR_PTR(...)) will do the right thing... Acked-by: Jan Kara Signed-off-by: Al Viro commit 32328a73e0ad4a1babebf798c309c64ee3b97400 Author: Al Viro Date: Sat Nov 11 01:14:38 2023 -0500 udf: d_splice_alias() will do the right thing on ERR_PTR() inode Acked-by: Jan Kara Signed-off-by: Al Viro commit 5d51dc8db10190661232741c93a141bdfc05f5ee Author: Keith Busch Date: Mon Dec 18 15:22:24 2023 -0800 nvme-fc: set numa_node after nvme_init_ctrl nvme_init_ctrl() resets numa_node to NUMA_NO_NODE, so be sure to set the desired value after that function call so it won't be overwritten. Reviewed-by: Sagi Grimberg Reviewed-by: Jens Axboe Reviewed-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Signed-off-by: Keith Busch commit 7642138e17529b48b43c69faf5c6f45bb2b64234 Author: Max Gurtovoy Date: Wed Dec 20 11:27:45 2023 +0200 nvme-fabrics: don't check discovery ioccsz/iorcsz IOCCSZ and IORCSZ are reserved for discovery controllers. Avoid checking their values during identify controller phase. Fixes: 2fcd3ab39826 ("nvme-fabrics: check ioccsz and iorcsz") Reported-by: Daniel Wagner Tested-by: Daniel Wagner Signed-off-by: Max Gurtovoy Signed-off-by: Keith Busch commit dd937663963ea7f4ad09ee592cb69c747b1eb88d Merge: 3654ffdc138a9 56b10953da7e9 Author: Arnd Bergmann Date: Thu Dec 21 17:09:34 2023 +0000 Merge tag 'riscv-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/dt RISC-V Devicetrees for v6.8 StarFive: Key peripheral support for the jh7100 that depended on the non-standard non-coherent DMA operations, namely mmc, sdcard and sdio wifi. This platform has long been supported out of tree by Emil and Ubuntu etc ship images for it, so having mainline support for a wider range of peripherals (at last) is great. Microchip: The flash used by Auto Update support and the corresponding QSPI controller are added. On publicly available Icicle kits this flash is not usable (engineering sample silicon issues) but in the future Icicle kits will be available that have production silicon. T-Head: Jisheng is busy with RL this cycle and hence T-Head appears here. The Lichee Pi and BeagleV both grow eMMC and uSD support. Sopgho: Support for the Huashan Pi and the cv1812h SoC it uses. The cv1812h is almost identical to the existing cv1800b SoC. These SoCs are intended for use in IP camera type systems but also appear on SBCs, with the last digit denoting the amount integrated DDR3 the device has. The difference between the cv1812h and the existing cv180x devices appears to be the addition of video output interfaces. Signed-off-by: Conor Dooley * tag 'riscv-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: starfive: Enable SDIO wifi on JH7100 boards riscv: dts: starfive: Enable SD-card on JH7100 boards riscv: dts: starfive: Add JH7100 MMC nodes riscv: dts: starfive: Add pool for coherent DMA memory on JH7100 boards riscv: dts: starfive: Add JH7100 cache controller riscv: dts: starfive: Mark the JH7100 as having non-coherent DMAs riscv: dts: starfive: Group tuples in interrupt properties riscv: dts: thead: Enable LicheePi 4A eMMC and microSD riscv: dts: thead: Enable BeagleV Ahead eMMC and microSD riscv: dts: thead: Add TH1520 mmc controllers and sdhci clock riscv: dts: microchip: add the mpfs' system controller qspi & associated flash riscv: dts: sophgo: add Huashan Pi board device tree riscv: dts: sophgo: add initial CV1812H SoC device tree riscv: dts: sophgo: cv18xx: Add gpio devices riscv: dts: sophgo: Separate compatible specific for CV1800B soc dt-bindings: riscv: Add SOPHGO Huashan Pi board compatibles dt-bindings: timer: Add SOPHGO CV1812H clint dt-bindings: interrupt-controller: Add SOPHGO CV1812H plic Link: https://lore.kernel.org/r/20231221-skimmed-boxy-b78aed8afdc4@spud Signed-off-by: Arnd Bergmann commit 2daa9555ba9858c29b9734b3a104c338b718feab Author: Abel Vesa Date: Thu Dec 7 14:34:12 2023 +0200 phy: qcom-qmp-usb: Add Qualcomm X1E80100 USB3 PHY support The X1E80100 platform has two instances of the USB3 UNI phy attached to the multi-port USB controller, add definition for these. Reviewed-by: Dmitry Baryshkov Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20231122-phy-qualcomm-usb3-uniphy-x1e80100-v3-2-273814c300f8@linaro.org Signed-off-by: Vinod Koul commit c5ffffd714373e7c6b39d3b005dbfbaadbbb4d2d Author: Abel Vesa Date: Thu Dec 7 14:34:11 2023 +0200 dt-bindings: phy: qcom,sc8280xp-qmp-usb3-uni: Add X1E80100 USB PHY binding Add compatible string for Qualcomm QMP Super Speed (SS) UNI PHY found in X1E80100. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20231122-phy-qualcomm-usb3-uniphy-x1e80100-v3-1-273814c300f8@linaro.org Signed-off-by: Vinod Koul commit d7b3579f84f74e0f7d88d180d4e15c679786b648 Author: Abel Vesa Date: Thu Dec 7 15:16:42 2023 +0200 phy: qcom-qmp-combo: Add x1e80100 USB/DP combo phys The X1E80100 has three copies of an USB/DP compbo PHY, add support for this to the Qualcomm QMP PHY driver. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231201-x1e80100-phy-combo-v1-2-6938ec41f3ac@linaro.org Signed-off-by: Vinod Koul commit f11aeb9d49632afc7abd9dfea6bcf5b3dd8addc1 Author: Abel Vesa Date: Thu Dec 7 15:16:41 2023 +0200 dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: Document X1E80100 compatible Add the X1E80100 compatible to the list. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231201-x1e80100-phy-combo-v1-1-6938ec41f3ac@linaro.org Signed-off-by: Vinod Koul commit ec80c175c096eb752d581ef0aafb12ed46010b2a Author: Abel Vesa Date: Thu Dec 7 14:49:10 2023 +0200 dt-bindings: phy: qcom: snps-eusb2: Document the X1E80100 compatible Add the X1E80100 compatible to the list of supported PHYs. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231122-phy-qualcomm-eusb2-x1e80100-v2-1-3ba9a8e5ade4@linaro.org Signed-off-by: Vinod Koul commit 9b27303003f5af0d378f29ccccea57c7d65cc642 Author: Chunfeng Yun Date: Mon Dec 11 10:56:24 2023 +0800 phy: mediatek: tphy: add support force phy mode switch this is used to be compatible with old SoCs, such as mt8195, which shares t-phy between usb3 and pcie controller, usually, it's default mode is pcie rc mode, and could use force mode to switch into usb3 mode, because pericfg layer doesn't provide mode switch, also no efuse or jumper can be used; Currently, only support switch from default pcie mode to usb3; Note: don't use this way on new SoCs, use pericfg layer's mode switch instead (by perperty "mediatek,syscon-type"). Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20231211025624.28991-2-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit cc230a4cd8e91f64c90b5494dfd76848197418ed Author: Chunfeng Yun Date: Mon Dec 11 10:56:23 2023 +0800 dt-bindings: phy: mediatek: tphy: add a property for force-mode switch Due to some old SoCs with shared t-phy between usb3 and pcie only support force-mode switch, and shared and non-shared t-phy may exist at the same time on a SoC, can't use compatible to distinguish between shared and non-shared t-phy, add a property to supported it. Currently, only support switch from default pcie mode to usb3 mode. But now prefer to use "mediatek,syscon-type" on new SoC as far as possible. Signed-off-by: Chunfeng Yun Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231211025624.28991-1-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 57f31e911eaa5e682c0a03253f8b4348adee52cb Author: Wang Jinchao Date: Fri Dec 15 14:09:00 2023 +0800 phy: phy-can-transceiver: insert space after include Maintain Consistent Formatting: Insert Space after #include Signed-off-by: Wang Jinchao Reviewed-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/202312151407+0800-wangjinchao@xfusion.com Signed-off-by: Vinod Koul commit 5301b7a04040b0a6191856c765146e0a9ab88ebc Author: Can Guo Date: Sat Dec 2 04:36:15 2023 -0800 phy: qualcomm: phy-qcom-qmp-ufs: Rectify SM8550 UFS HS-G4 PHY Settings The registers, which are being touched in current SM8550 UFS PHY settings, and the values being programmed are mainly the ones working for HS-G4 mode, meanwhile, there are also a few ones somehow taken from HS-G5 PHY settings. However, even consider HS-G4 mode only, some of them are incorrect and some are missing. Rectify the HS-G4 PHY settings by strictly aligning with the SM8550 UFS PHY Hardware Programming Guide suggested HS-G4 PHY settings. Fixes: 1679bfef906f ("phy: qcom-qmp-ufs: Add SM8550 support") Reviewed-by: Dmitry Baryshkov Reviewed-by: Abel Vesa Reviewed-by: Manivannan Sadhasivam Signed-off-by: Can Guo Tested-by: Neil Armstrong # on SM8550-QRD Link: https://lore.kernel.org/r/1701520577-31163-10-git-send-email-quic_cang@quicinc.com Signed-off-by: Vinod Koul commit 21a1d02579ae75fd45555b84d20ba55632a14a19 Author: Krzysztof Kozlowski Date: Mon Dec 18 14:05:53 2023 +0100 dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: fix path to header Fix the path to bindings header in description. Fixes: e1c4c5436b4a ("dt-bindings: phy: qcom,qmp-usb3-dp: fix sc8280xp binding") Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Reviewed-by: Johan Hovold Link: https://lore.kernel.org/r/20231218130553.45893-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 54c899f0d647e5724b02486243da40134dc91c45 Author: Randy Dunlap Date: Mon Dec 4 15:49:17 2023 -0800 phy: renesas: phy-rcar-gen2: use select for GENERIC_PHY Change the last "depends on GENERIC_PHY" to use select, like the other 170+ Kconfig users do. This can help prevent circular dependency issues. Signed-off-by: Randy Dunlap Cc: Vinod Koul Cc: Kishon Vijay Abraham I Cc: linux-phy@lists.infradead.org Link: https://lore.kernel.org/r/20231204234917.23509-1-rdunlap@infradead.org Signed-off-by: Vinod Koul commit 3654ffdc138a9076805f4621b9aeba9487354496 Merge: 46a51dba9f31f eb54ef36282f6 Author: Arnd Bergmann Date: Thu Dec 21 17:07:47 2023 +0000 Merge tag 'amlogic-arm64-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/dt Amlogic ARM64 DT changes for v6.8: - DT cleanups - s4 uart node - drop redundant status=okay - minor whitespace cleanup around '=' - Watchdog nodes for S4 & C4 SoCs - Clock, I2C, SPICC, NAND, Ethernet nodes for S4 And the AQ222 dev board - Add EEPROM on the jethub-jxx boards - Update of the amlogic,meson-gx-hhi-sysctrl bindings * tag 'amlogic-arm64-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: dts: amlogic: fix format for s4 uart node arm64: dts: amlogic: drop redundant status=okay arm64: dts: amlogic: enable some nodes for board AQ222 arm64: dts: amlogic: add some device nodes for S4 arm64: dts: meson-axg: jethub-jxx add support for EEPROM arm64: dts: amlogic: meson-axg: pinctrl node for NAND arm64: dts: amlogic: minor whitespace cleanup around '=' arm64: dts: Add watchdog node for Amlogic S4 SoCs arm64: dts: Add watchdog node for Amlogic C3 SoCs dt-bindings: soc: amlogic,meson-gx-hhi-sysctrl: add example covering meson-axg-hhi-sysctrl Link: https://lore.kernel.org/r/e38724be-c9f0-4916-bfd0-d20b316db2da@linaro.org Signed-off-by: Arnd Bergmann commit ee6fcc0f337d6790b46838bab76c36e8bdd5658e Author: Abel Vesa Date: Thu Dec 7 14:19:16 2023 +0200 phy: qcom-qmp: qserdes-txrx: Add v7 register offsets The X1E80100 platform bumps the HW version of QMP phy to v7 for USB and PCIE. Add the new qserdes TX RX offsets in a dedicated header file. Reviewed-by: Dmitry Baryshkov Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20231122-phy-qualcomm-v6-v6-20-v7-new-offsets-v3-7-dfd1c375ef61@linaro.org Signed-off-by: Vinod Koul commit 762c3565f3c8105603089eeaa0501e5089922221 Author: Abel Vesa Date: Thu Dec 7 14:19:15 2023 +0200 phy: qcom-qmp: qserdes-txrx: Add V6 N4 register offsets There is a variant of V6 offsets that are different, the QMP PHY N4, and it is found on the X1E80100 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20231122-phy-qualcomm-v6-v6-20-v7-new-offsets-v3-6-dfd1c375ef61@linaro.org Signed-off-by: Vinod Koul commit bc546cc85c1d92d9ba7b278b77016b7d4334fafa Author: Abel Vesa Date: Thu Dec 7 14:19:14 2023 +0200 phy: qcom-qmp: qserdes-com: Add v7 register offsets The X1E80100 platform bumps the HW version of QMP phy to v7 for USB and PCIE g3x2. Add the new qserdes com offsets in a dedicated header file. Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20231122-phy-qualcomm-v6-v6-20-v7-new-offsets-v3-5-dfd1c375ef61@linaro.org Signed-off-by: Vinod Koul commit 8d4f9f801095b120e433d935b296baf0e3bdc6a0 Author: Abel Vesa Date: Thu Dec 7 14:19:13 2023 +0200 phy: qcom-qmp: pcs-usb: Add v7 register offsets The X1E80100 platform bumps the HW version of QMP phy to v7 for USB. Add the new PCS USB specific offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231122-phy-qualcomm-v6-v6-20-v7-new-offsets-v3-4-dfd1c375ef61@linaro.org Signed-off-by: Vinod Koul commit 7b98cf0e9b5f8a05a7f0f0d06d3cfa130bb576e2 Author: Abel Vesa Date: Thu Dec 7 14:19:12 2023 +0200 phy: qcom-qmp: pcs: Add v7 register offsets The X1E80100 platform bumps the HW version of QMP phy to v7 for USB, and PCIe. Add the new PCS offsets in a dedicated header file. Signed-off-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231122-phy-qualcomm-v6-v6-20-v7-new-offsets-v3-3-dfd1c375ef61@linaro.org Signed-off-by: Vinod Koul commit a40542507b9045da03f4e013ab8562f6e6fe8aad Author: Abel Vesa Date: Thu Dec 7 14:19:11 2023 +0200 phy: qcom-qmp: qserdes-txrx: Add some more v6.20 register offsets Add some missing v6.20 registers offsets that are needed by the new Snapdragon X Elite (X1E80100) platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20231122-phy-qualcomm-v6-v6-20-v7-new-offsets-v3-2-dfd1c375ef61@linaro.org Signed-off-by: Vinod Koul commit 2226ec072ed3f1bd3f8dbe0cbf0e6cad699aedc2 Author: Abel Vesa Date: Thu Dec 7 14:19:10 2023 +0200 phy: qcom-qmp: qserdes-com: Add some more v6 register offsets Add some missing V6 registers offsets that are needed by the new Snapdragon X Elite (X1E80100) platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20231122-phy-qualcomm-v6-v6-20-v7-new-offsets-v3-1-dfd1c375ef61@linaro.org Signed-off-by: Vinod Koul commit 46a51dba9f31fd285435873de0ccf5f565565130 Merge: 37782cc1c6b08 c11e7732a90c2 Author: Arnd Bergmann Date: Thu Dec 21 17:06:16 2023 +0000 Merge tag 'mvebu-dt64-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt64 for 6.8 (part 1) Add devices tree for CN9130 and CN9131 COM Express Boards Fix device tree for Turris Mox and for switch nodes * tag 'mvebu-dt64-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: cn913x: add device trees for COM Express boards dt-bindings: arm64: add Marvell COM Express boards MAINTAINERS: add ac5 to list of maintained Marvell dts files arm64: dts: armada-3720-turris-mox: set irq type for RTC ARM64: dts: Add special compatibles for the Turris Mox ARM64: dts: marvell: Fix some common switch mistakes Link: https://lore.kernel.org/r/87le9obypx.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 37782cc1c6b08dc8e2b7b4ab8625a8ec4d225df6 Merge: 450388847b3bf 62f34e3ec2bef Author: Arnd Bergmann Date: Thu Dec 21 17:05:33 2023 +0000 Merge tag 'mvebu-dt-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into soc/dt mvebu dt for 6.8 (part 1) Fix dt for gpio and switch nodes * tag 'mvebu-dt-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: dts: marvell: make dts use gpio-fan matrix instead of array ARM: dts: marvell: Fix some common switch mistakes Link: https://lore.kernel.org/r/87o7ekbyv2.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit cdf3ecb0d8d0a83c940a8892b3e8aeaf35dc4353 Author: Anshul Dalal Date: Wed Dec 20 20:49:53 2023 +0530 iio: dac: driver for MCP4821 Adds driver for the MCP48xx series of DACs. Device uses a simplex SPI channel. To set the value of an output channel, a 16-bit data of following format must be written: Bit field | Description 15 [MSB] | Channel selection bit 0 -> Channel A 1 -> Channel B 13 | Output Gain Selection bit 0 -> 2x Gain (Vref = 4.096V) 1 -> 1x Gain (Vref = 2.048V) 12 | Output Shutdown Control bit 0 -> Shutdown the selected channel 1 -> Active mode operation 11-0 [LSB]| DAC Input Data bits Value's big endian representation is taken as input for the selected DAC channel. For devices with a resolution of less than 12-bits, only the x most significant bits are considered where x is the resolution of the device. Reference: Page#22 [MCP48x2 Datasheet] Supported devices: +---------+--------------+-------------+ | Device | Resolution | Channels | |---------|--------------|-------------| | MCP4801 | 8-bit | 1 | | MCP4802 | 8-bit | 2 | | MCP4811 | 10-bit | 1 | | MCP4812 | 10-bit | 2 | | MCP4821 | 12-bit | 1 | | MCP4822 | 12-bit | 2 | +---------+--------------+-------------+ Devices tested: MCP4821 [12-bit single channel] MCP4802 [8-bit dual channel] Tested on Raspberry Pi Zero 2W Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdf #MCP48x1 Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/20002249B.pdf #MCP48x2 Signed-off-by: Anshul Dalal Link: https://lore.kernel.org/r/20231220151954.154595-2-anshulusr@gmail.com Signed-off-by: Jonathan Cameron commit 450388847b3bff7d96fe92fa4ce0b80b30aa538d Merge: 73ec27206059e d0da0de31e1d5 Author: Arnd Bergmann Date: Thu Dec 21 17:04:33 2023 +0000 Merge tag 'samsung-dt64-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM64 changes for v6.8, part two 1. Tesla FSD: Add Multi Format Codec (MFC) device nodes, for accelerated video de/encoding. 2. Add initial Google Tensor GS101 SoC support. The GS101 SoC can be found on Google Pixel 6 phones. Currently the DTS brings only basic support: core clock controllers, pin controllers, serial, watchdog and ARM core blocks. * tag 'samsung-dt64-6.8-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: MAINTAINERS: adjust file entry in GOOGLE TENSOR SoC SUPPORT MAINTAINERS: add entry for Google Tensor SoC arm64: dts: exynos: google: Add initial Oriole/pixel 6 board support arm64: dts: exynos: google: Add initial Google gs101 SoC support dt-bindings: arm: google: Add bindings for Google ARM platforms arm64: dts: fsd: Add MFC related DT enteries Link: https://lore.kernel.org/r/20231220084722.22149-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 73ec27206059ec7ce34a6b19876c430d73792932 Merge: 7af9a9f5e9d1f 648002a27c6b3 Author: Arnd Bergmann Date: Thu Dec 21 17:03:07 2023 +0000 Merge tag 'qcom-arm32-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/dt Qualcomm ARM32 DeviceTree updates for v6.8 Support is added for HTC One Mini 2, Nokia Lumia 630, Microsoft Lumia 640, Microsoft Lumia 640 XL, Nokia Lumia 735, Nokia Lumia 830, and Motorola Moto G 4G, all built on the MSM8226 platform. The GPU in MSM8226 is described, and MSM8974 gains watchdog support. The PMICs are transitioned to use interrupts-extended to properly reference the PMIC interrupt controller, in accordance with the DeviceTree specification. In addition to this, a variety of stylistic and DeviceTree validation issues are corrected. * tag 'qcom-arm32-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (60 commits) ARM: dts: qcom: msm8974*: Re-enable remoteprocs on various boards ARM: dts: qcom: msm8974: Remove bogus cd-gpio pinctrl ARM: dts: qcom: msm8974-klte: Remove unused property ARM: dts: qcom: msm8926-motorola-peregrine: Add initial device tree ARM: dts: qcom: ipq4019: add dedicated SDHCI compatible ARM: dts: qcom: Use "pcie" as the node name instead of "pci" ARM: dts: qcom: msm8226: Add GPU ARM: dts: qcom: Disable pm8941 & pm8226 smbb charger by default ARM: dts: qcom: minor whitespace cleanup around '=' ARM: dts: qcom: sdx55: fix USB wakeup interrupt types ARM: dts: qcom: Add support for HTC One Mini 2 ARM: dts: qcom: msm8974: Add watchdog node ARM: dts: qcom: sdx65: correct SPMI node name ARM: dts: qcom: sdx65: add missing GCC clocks ARM: dts: qcom: sdx65: correct PCIe EP phy-names ARM: dts: qcom: mdm9615: drop qcom, prefix from SSBI node name ARM: dts: qcom: ipq8064: drop qcom, prefix from SSBI node name ARM: dts: qcom: apq8060-dragonboard: rename mpp ADC channels to adc-channel ARM: dts: qcom: pm8921: Disable keypad by default ARM: dts: qcom: msm8974: move regulators to board files ... Link: https://lore.kernel.org/r/20231219042914.732684-1-andersson@kernel.org Signed-off-by: Arnd Bergmann commit 7af9a9f5e9d1f9d5c0b92291fb592c71925425eb Merge: c3426ae680303 8bbe8a7dbaabb Author: Arnd Bergmann Date: Thu Dec 21 17:01:15 2023 +0000 Merge tag 'ti-k3-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/dt TI K3 device tree updates for v6.8 New features across K3 SoCs: - ov5640 and imx219 sensor overlays added to various am62x/am62a boards. - TP6594 and family support for J7200, j721s2,j721e, am69/j784s4 boards Generic Fixes: - minor white space cleanups - Addition of optional regs for more complete DMA description across all K3 SoCs. Misc: - chip_id node moves under wkup_conf bus. - COMPILE_TEST+OF_ALL_DTBS is now standard usage for testing overlays. SoC specific Fixes/Features: AM62A - gpio pin count fixups. AM625 - Adds verdin am62x-mallow board - Adds IMG's AXE-RGX GPU support - Adds gpio-ranges support for main domain GPIOs. - SK now defaults to mcu gpio marked as reserved to cater to MCU use cases AM64 - EVM/SK now defaults to mcu gpio marked as reserved to cater to MCU use cases AM65 - Fix for DSS Irq trigger type, proper fixup for dss-oldi-io-ctrl node - misc splitup to make AM652 device variant reusable J7200 - mmc: itap delay fixups for DDR52 J721S2/AM68 - mmc: itap delay fixups for DDR50 J784S4/AM69 - mmc: itap delay fixups for DDR50 Board specific fixes/Features: - iot2050 cleanups for enabling icssg-prueth nodes, runtime pinmuxing, dropping ecap0pwm nodes, misc cleanups. - am62x-verdin adds uart2, minor fixups for spi1 chip-select pinctrl - am62-phycore adds hdmi support - am64-phycore adds R5F support. - am62x-beagleplay renames console uart pinmuxes. * tag 'ti-k3-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: (56 commits) arm64: dts: ti: k3-j784s4-main: Add Itap Delay Value For DDR50 speed mode arm64: dts: ti: k3-j721s2-main: Add Itap Delay Value For DDR50 speed mode arm64: dts: ti: k3-j7200-main: Add Itap Delay Value For DDR52 speed mode arm64: dts: ti: k3-am6*: Add additional regs for DMA components arm64: dts: ti: k3-j7*: Add additional regs for DMA components arm64: dts: ti: k3-am65: Add additional regs for DMA components arm64: dts: ti: k3-am62-main: Add GPU device node arm64: dts: ti: k3-j721s2-evm: Add overlay for PCIE1 Endpoint Mode arm64: dts: ti: k3-j721e-evm: Add overlay for PCIE0 Endpoint Mode arm64: dts: ti: k3-j721e-sk: Add TPS6594 family PMICs arm64: dts: ti: k3-am69-sk: Add support for TPS6594 PMIC arm64: dts: ti: k3-j784s4-evm: Add support for TPS6594 PMIC arm64: dts: ti: k3-j721e-som-p0: Add TP6594 family PMICs arm64: dts: ti: k3-j721s2-som-p0: Add TP6594 family PMICs arm64: dts: ti: k3-j7200-som-p0: Add TP6594 family PMICs arm64: dts: ti: Add verdin am62 mallow board dt-bindings: arm: ti: Add verdin am62 mallow board arm64: dts: ti: verdin-am62: Improve spi1 chip-select pinctrl arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Remove HDMI Reset Line Name arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Add HDMI support ... Link: https://lore.kernel.org/r/20231218153115.szyd22tmoumqkn6g@occupier Signed-off-by: Arnd Bergmann commit 6b626eee66a88b671585c1804667a4fb10a434ef Author: Anshul Dalal Date: Wed Dec 20 20:49:52 2023 +0530 dt-bindings: iio: dac: add MCP4821 Adds support for MCP48xx series of DACs. Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdf #MCP48x1 Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/20002249B.pdf #MCP48x2 Reviewed-by: Rob Herring Signed-off-by: Anshul Dalal Link: https://lore.kernel.org/r/20231220151954.154595-1-anshulusr@gmail.com Signed-off-by: Jonathan Cameron commit c3426ae68030353f1c4d5bdb5a954ce77e9105d0 Merge: 55bfefaabd452 c1170c1d04d5b Author: Arnd Bergmann Date: Thu Dec 21 17:00:48 2023 +0000 Merge tag 'ti-keystone-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/dt Keystone2 device tree updates for v6.8 Cosmetic cleanups: * white space cleanup around '=' * tag 'ti-keystone-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux: ARM: dts: ti: keystone: minor whitespace cleanup around '=' Link: https://lore.kernel.org/r/20231218153039.dok52xazqshbr6ie@playroom Signed-off-by: Arnd Bergmann commit 55bfefaabd45257e5846d7d0e5fd6d5eef2cb548 Merge: 5d9331b48d173 a98b6987de7d4 Author: Arnd Bergmann Date: Thu Dec 21 16:47:31 2023 +0000 Merge tag 'zynqmp-dt-for-6.8' of https://github.com/Xilinx/linux-xlnx into soc/dt arm64: ZynqMP DT changes for 6.8 - Fix overlay rules to remove KR260 targets - Move ethernet phys to mdio node - Fix couple of issues reported by W=1 - Do not use _ in node names - Use lowercase in register address - Remove address/size-cells from nodes without child - Moved fixed clock to root on KV260 - Fix issues reported by dt-schema - additional compatible string for qspi on SOM - Move arm/xilinx.yaml to soc vendor to cover also other archs - Describe new Microblaze V qemu platform - Add missing mailbox destination compatible string * tag 'zynqmp-dt-for-6.8' of https://github.com/Xilinx/linux-xlnx: arm64: zynqmp: Add missing destination mailbox compatible arm64: zynqmp: Fix clock node name in kv260 cards arm64: zynqmp: Move fixed clock to / for kv260 dt-bindings: soc: Add new board description for MicroBlaze V dt-bindings: soc: xilinx: Move xilinx.yaml from arm to soc arm64: xilinx: Remove address/size-cells from gem nodes arm64: xilinx: Remove address/size-cells from flash node arm64: xilinx: Put ethernet phys to mdio node arm64: xilinx: Remove mt25qu512a compatible string from SOM arm64: xilinx: Use lower case for partition address arm64: xilinx: Do not use '_' in DT node names arm64: dts: xilinx: Apply overlays to base dtbs Link: https://lore.kernel.org/r/CAHTX3dLyA1Y9guLKSNJTChFVvkspMfTa0odULyAdcuFUSiSH3A@mail.gmail.com Signed-off-by: Arnd Bergmann commit de991b9af0532a05d5206c065bf343d6a767a9d2 Author: Daniele Ceraolo Spurio Date: Tue Dec 19 12:00:20 2023 -0800 drm/xe: Remove ci-only GuC FW definitions As part of the FW definitions, we declare each blob as required via the MODULE_FIRMWARE() macro. This causes the initramfs update (or equivalent process) to look for the blobs on disk when the kernel is installed; therefore, we need to make sure that all FWs we define are available in linux-firmware. We currently don't plan to push the PVC blob to linux-firmware, while the LNL one will only be pushed once we have machines in CI to test it, so we need to remove them from the list for now. Signed-off-by: Daniele Ceraolo Spurio Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit e157f0f76258f11920fd5859a8ac1473a8ce5340 Author: Rodrigo Vivi Date: Mon Dec 18 08:47:02 2023 -0500 drm/xe: Fix build without CONFIG_FAULT_INJECTION Ideally this header could be included without the CONFIG_FAULT_INJECTION and it would take care itself for the includes it needs. So, let's temporary workaround this by moving this below and including only when CONFIG_FAULT_INJECTION is selected to avoid build breakages. Another solution would be us including the linux/types.h as well, but this creates unnecessary cases. Reference: https://lore.kernel.org/all/20230816134748.979231-1-himal.prasad.ghimiray@intel.com/ Cc: Himal Prasad Ghimiray Cc: Oded Gabbay Cc: Thomas Hellström Cc: Lucas De Marchi Signed-off-by: Rodrigo Vivi Reviewed-by: Thomas Hellström commit d9e41171e513b594470f81a97d26fe0f06f1fbd3 Author: Rodrigo Vivi Date: Mon Dec 11 11:30:56 2023 -0500 MAINTAINERS: Updates to Intel DRM Introduce the Maintainers of the new drm/xe driver for upcoming Intel GPUs. Since it has a shared display with drm/i915, let's also create a dedicated block to group display related files. But without any substantial change to the i915 side. The display patches will continue to flow through i915 from drm-intel-next branches for now. Acked-by: Jani Nikula Acked-by: Joonas Lahtinen Acked-by: Tvrtko Ursulin Acked-by: Lucas De Marchi Acked-by: Oded Gabbay Acked-by: Thomas Hellström Acked-by: Dave Airlie Signed-off-by: Rodrigo Vivi commit 77a0d4d1cea2140ef56929ab1cfa5e525772c90e Author: Rodrigo Vivi Date: Fri Dec 15 15:45:53 2023 +0000 drm/xe/uapi: Remove reset uevent for now This kernel uevent is getting removed for now. It will come back later with a better future proof name. v2: Rebase (Francois Dugast) Cc: Himal Prasad Ghimiray Cc: Lucas De Marchi Cc: Francois Dugast Cc: Aravind Iddamsetty Signed-off-by: Rodrigo Vivi Reviewed-by: Himal Prasad Ghimiray Acked-by: Lucas De Marchi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast commit 9f7ceec2cd25e7aea31cd0630b6fcf439770e322 Author: Francois Dugast Date: Fri Dec 15 15:45:52 2023 +0000 drm/xe/uapi: Move DRM_XE_ACC_GRANULARITY_* where they are used Bring those defines close to the context where they can be used. Also apply indentation as it is done for other subsets of defines. Reviewed-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit 0bf90a8c223759564964d4a1ecd44608876ab02d Author: Francois Dugast Date: Fri Dec 15 15:45:51 2023 +0000 drm/xe/uapi: Move CPU_CACHING defines before doc Move those defines to align on the rule used elsewhere in the file which was introduced by commit 4f082f2c3a37 ("drm/xe: Move defines before relevant fields"). Reviewed-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit d293b1a89694fc4918d9a4330a71ba2458f9d581 Author: Jens Axboe Date: Thu Dec 21 09:02:57 2023 -0700 io_uring/kbuf: add method for returning provided buffer ring head The tail of the provided ring buffer is shared between the kernel and the application, but the head is private to the kernel as the application doesn't need to see it. However, this also prevents the application from knowing how many buffers the kernel has consumed. Usually this is fine, as the information is inherently racy in that the kernel could be consuming buffers continually, but for cleanup purposes it may be relevant to know how many buffers are still left in the ring. Add IORING_REGISTER_PBUF_STATUS which will return status for a given provided buffer ring. Right now it just returns the head, but space is reserved for more information later in, if needed. Link: https://github.com/axboe/liburing/discussions/1020 Signed-off-by: Jens Axboe commit db35331176f93125cc4bfa0d05283688607200f5 Author: Francois Dugast Date: Fri Dec 15 15:45:50 2023 +0000 drm/xe/uapi: Add examples of user space code Complete the documentation of some structs by adding functional examples of user space code. Those examples are intentionally kept very simple. Put together, they provide a foundation for a minimal application that executes a job using the Xe driver. v2: Remove use of DRM_XE_VM_BIND_FLAG_ASYNC (Francois Dugast) Reviewed-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit 33c6fda687a37ef871ca04adf2e05ffc646e3b13 Author: Francois Dugast Date: Fri Dec 15 15:45:49 2023 +0000 drm/xe/uapi: Add block diagram of a device In order to make proper use the uAPI, a prerequisite is to understand some key concepts about the discrete GPU devices which are supported by the Xe driver. For example, some structs defined in the uAPI are an abstraction of a hardware component with a specific role. This diagram helps to build a mental representation of a device how it is seen by the Xe driver. As written in the documentation, it does not intend to be a literal representation of an existing device. A lot more information could be added but the intention for the overview is to keep it simple, and go into detail as needed in other sections. v2: Add GT1 inside Tile0 (José Roberto de Souza) Reviewed-by: José Roberto de Souza Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit 535881a8c50b79085327e7dbe26a4c55f3e1591b Author: Rodrigo Vivi Date: Fri Dec 15 15:45:48 2023 +0000 drm/xe/uapi: Document the memory_region bitmask The uAPI should stay generic in regarding to the bitmask. It is the userspace responsibility to check for the type/class of the memory, without any assumption. Also add comments inside the code to explain how it is actually constructed so we don't accidentally change the assignment of the instance and the masks. No functional change in this patch. It only explains and document the memory_region masks. A further follow-up work with the organization of all memory regions around struct xe_mem_regions is desired, but not part of this patch. Signed-off-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast commit 4b437893a826b2f1d15f73e72506349656ea14b2 Author: Rodrigo Vivi Date: Fri Dec 15 15:45:47 2023 +0000 drm/xe/uapi: More uAPI documentation additions and cosmetic updates No functional change in this patch. Let's ensure all of our structs are documented and with a certain standard. Also, let's have an overview and list of IOCTLs as the very beginning of the generated HTML doc. v2: Nits (Lucas De Marchi) Signed-off-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast commit 76ca3a22c00bed8a43afd14de4b42691f224801b Author: Rodrigo Vivi Date: Fri Dec 15 15:45:46 2023 +0000 drm/xe/uapi: Order sections This patch doesn't modify any text or uapi entries themselves. It only move things up and down aiming a better organization of the uAPI. While fixing the documentation I noticed that query_engine_cs_cycles was in the middle of the memory_region info. Then I noticed more mismatches on the order when compared to the order of the IOCTL and QUERY entries declaration. So this patch aims to bring some order to the uAPI so it gets easier to read and the documentation generated in the end is able to tell a consistent story. Overall order: 1. IOCTL definition 2. Extension definition and helper structs 3. IOCTL's Query structs in the order of the Query's entries. 4. The rest of IOCTL structs in the order of IOCTL declaration. 5. uEvents Signed-off-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast commit 801989b08aff35ef56743551f4cfeaed360bd201 Author: Francois Dugast Date: Fri Dec 15 15:45:45 2023 +0000 drm/xe/uapi: Make constant comments visible in kernel doc As there is no direct way to make comments of constants directly visible in the kernel doc, move them to the description of the structure where they can be used. By doing so they appear in the "Description" section of the struct documentation. v2: Remove DRM_XE_UFENCE_WAIT_MASK_* (Francois Dugast) Reviewed-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit 37958604e69485e9704f8483401b03679e3e4939 Author: Francois Dugast Date: Fri Dec 15 15:45:44 2023 +0000 drm/xe/uapi: Document DRM_XE_DEVICE_QUERY_HWCONFIG Add a documentation on the content and format of when using query type DRM_XE_DEVICE_QUERY_HWCONFIG. The list of keys can be found in IGT under lib/intel_hwconfig_types.h. Reviewed-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit af8ea4162b4cb6e83bfabaef3db3bf89d2a07cbc Author: Francois Dugast Date: Fri Dec 15 15:45:43 2023 +0000 drm/xe/uapi: Document drm_xe_query_config keys Provide a description of the keys used the struct drm_xe_query_config info array. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/637 Reviewed-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit ff6c6bc55258e7d0aabcfc41baa392fcedb450a2 Author: Francois Dugast Date: Fri Dec 15 15:45:42 2023 +0000 drm/xe/uapi: Document use of size in drm_xe_device_query Document the behavior of the driver for IOCTL DRM_IOCTL_XE_DEVICE_QUERY depending on the size value provided in struct drm_xe_device_query. Reviewed-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit 4efaadd38bc4c6c1016996669002994061990633 Author: Francois Dugast Date: Fri Dec 15 15:45:41 2023 +0000 drm/xe/uapi: Add missing documentation for struct members This removes the documentation build warnings below: include/uapi/drm/xe_drm.h:828: warning: Function parameter or \ member 'pad2' not described in 'drm_xe_vm_bind_op' include/uapi/drm/xe_drm.h:875: warning: Function parameter or \ member 'pad2' not described in 'drm_xe_vm_bind' include/uapi/drm/xe_drm.h:1006: warning: Function parameter or \ member 'handle' not described in 'drm_xe_sync' include/uapi/drm/xe_drm.h:1006: warning: Function parameter or \ member 'timeline_value' not described in 'drm_xe_sync' Reviewed-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit b0e47225a16f4e1ed53dd769588700a40d7b9950 Author: Francois Dugast Date: Fri Dec 15 15:45:40 2023 +0000 drm/xe/uapi: Add a comment to each struct Add a comment to each struct to complete documentation, ensure all struct appear in the kernel doc, and bind structs to IOCTLs. Reviewed-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit d3d767396a02fa225eab7f919b727cff4e3304bc Author: Matthew Brost Date: Fri Dec 15 15:45:39 2023 +0000 drm/xe/uapi: Remove sync binds Remove concept of async vs sync VM bind queues, rather make all binds async. The following bits have dropped from the uAPI: DRM_XE_ENGINE_CLASS_VM_BIND_ASYNC DRM_XE_ENGINE_CLASS_VM_BIND_SYNC DRM_XE_VM_CREATE_FLAG_ASYNC_DEFAULT DRM_XE_VM_BIND_FLAG_ASYNC To implement sync binds the UMD is expected to use the out-fence interface. v2: Send correct version v3: Drop drm_xe_syncs Cc: Rodrigo Vivi Cc: Thomas Hellström Cc: Francois Dugast Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Rodrigo Vivi commit 7e9337c29fb9251e27d7af092108f05857e733c1 Author: Rodrigo Vivi Date: Fri Dec 15 15:45:38 2023 +0000 drm/xe/uapi: Ensure every uapi struct has drm_xe prefix To ensure consistency and avoid possible later conflicts, let's add drm_xe prefix to xe_user_extension struct. Cc: Francois Dugast Suggested-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki commit 90a8b23f9b85a05ac3147498c42b32348bfcc274 Author: Ashutosh Dixit Date: Fri Dec 15 15:45:37 2023 +0000 drm/xe/pmu: Remove PMU from Xe till uapi is finalized PMU uapi is likely to change in the future. Till the uapi is finalized, remove PMU from Xe. PMU can be re-added after uapi is finalized. v2: Include xe_drm.h in xe/tests/xe_dma_buf.c (Francois) Signed-off-by: Ashutosh Dixit Acked-by: Aravind Iddamsetty Acked-by: Lucas De Marchi Reviewed-by: Umesh Nerlige Ramappa Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Rodrigo Vivi commit 9d329b4cea1449b4f4948a5f495e2d1db223ad7a Author: Francois Dugast Date: Fri Dec 15 15:45:36 2023 +0000 drm/xe/uapi: Remove DRM_XE_UFENCE_WAIT_MASK_* Those are just possible values for the comparison mask but they are not specific magic values. Let's keep them as examples in the documentation but remove them from the uAPI. Suggested-by: Matthew Brost Cc: Rodrigo Vivi Reviewed-by: Matthew Brost Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit e4f0cc64669bb52e259da49c7c1d5954ae8014c5 Author: Francois Dugast Date: Fri Dec 15 15:45:35 2023 +0000 drm/xe/uapi: Remove DRM_IOCTL_XE_EXEC_QUEUE_SET_PROPERTY The exec_queue_set_property feature was removed in a previous commit 0f1d88f27864 ("drm/xe/uapi: Kill exec_queue_set_property") and is no longer usable, struct drm_xe_exec_queue_set_property does not exist anymore, so let's remove this. Reviewed-by: Lucas De Marchi Acked-by: Rodrigo Vivi Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit e670f0b4ef2419a7a51d1726044c8715ff4d4cda Author: Bommu Krishnaiah Date: Fri Dec 15 15:45:34 2023 +0000 drm/xe/uapi: Return correct error code for xe_wait_user_fence_ioctl Currently xe_wait_user_fence_ioctl is not checking exec_queue state and blocking until timeout, with this patch wakeup the blocking wait if exec_queue reset happen and returning proper error code Signed-off-by: Bommu Krishnaiah Cc: Oak Zeng Cc: Kempczynski Zbigniew Cc: Matthew Brost Reviewed-by: Rodrigo Vivi Reviewed-by: Matthew Brost Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Rodrigo Vivi commit 9212da07187f86db8bd124b1ce551a18b8a710d6 Author: Bommu Krishnaiah Date: Fri Dec 15 15:45:33 2023 +0000 drm/xe/uapi: add exec_queue_id member to drm_xe_wait_user_fence structure remove the num_engines/instances members from drm_xe_wait_user_fence structure and add a exec_queue_id member Right now this is only checking if the engine list is sane and nothing else. In the end every operation with this IOCTL is a soft check. So, let's formalize that and only use this IOCTL to wait on the fence. exec_queue_id member will help to user space to get proper error code from kernel while in exec_queue reset Signed-off-by: Bommu Krishnaiah Signed-off-by: Rodrigo Vivi Acked-by: Matthew Brost Reviewed-by: Francois Dugast Acked-by: José Roberto de Souza Acked-by: Mateusz Naklicki Signed-off-by: Francois Dugast commit 7a8bc11782d39e4d35dc7e78405dfe052cbba9cf Author: Lucas De Marchi Date: Thu Dec 14 13:39:54 2023 -0800 drm/xe: Enable W=1 warnings by default Like done in commit 2250c7ead8ad ("drm/i915: enable W=1 warnings by default") for i915, enable W=1 warnings by default in xe. Reviewed-by: Rodrigo Vivi Acked-by: Jani Nikula Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 73486d750f56ec612b2e02aa06ceb2171a8c5e93 Author: Lucas De Marchi Date: Fri Dec 15 12:33:31 2023 -0800 drm/xe/display: Fix dummy __i915_inject_probe_error() When CONFIG_DRM_I915_DEBUG is not set, a dummy __i915_inject_probe_error() is provided on the xe side. Use the same logic as in drivers/gpu/drm/i915/i915_utils.c to ifdef it out. This fixes the build with W=1 and without that config: CC [M] drivers/gpu/drm/xe/display/ext/i915_utils.o ../drivers/gpu/drm/xe/display/ext/i915_utils.c:19:5: error: no previous prototype for ‘__i915_inject_probe_error’ [-Werror=missing-prototypes] 19 | int __i915_inject_probe_error(struct drm_i915_private *i915, int err, | ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 80166e95679742588bd6c17ede46fa46867739f7 Author: Lucas De Marchi Date: Thu Dec 14 13:39:53 2023 -0800 drm/xe/bo: Remove unusued variable bo is not used since all the checks are against tbo. Fix warning: ../drivers/gpu/drm/xe/xe_bo.c: In function ‘xe_evict_flags’: ../drivers/gpu/drm/xe/xe_bo.c:250:23: error: variable ‘bo’ set but not used [-Werror=unused-but-set-variable] 250 | struct xe_bo *bo; Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 40fb5ed290d49b568d8547ecfdc5bd83f217dfe1 Author: Lucas De Marchi Date: Thu Dec 14 13:39:52 2023 -0800 drm/xe: Return error if drm_buddy_init() fails Fix warning: ../drivers/gpu/drm/xe/xe_ttm_vram_mgr.c: In function ‘__xe_ttm_vram_mgr_init’: ../drivers/gpu/drm/xe/xe_ttm_vram_mgr.c:340:13: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable] 340 | int err; | ^~~ Check for the error return and return it, like done by other drivers. Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 1374df38e9267bf4588fbc665b3a20afb479f5ac Author: Matt Roper Date: Thu Dec 14 10:47:08 2023 -0800 drm/xe: Drop some unnecessary header includes Several files were including register headers that they no longer require. Drop the unnecessary includes to reduce build dependencies. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231214184659.2249559-18-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit aaa536a8877e61104ccb5ba5287beaa4e959539e Author: Matt Roper Date: Thu Dec 14 10:47:07 2023 -0800 drm/xe: Re-sort GT register header Keeping the register definitions sorted will make it easy to find existing definitions and prevent accidental introduction of duplicate definitions. v2: - Reorder FUSE3/FUSE4 registers and move GT0_PERF_LIMIT_REASONS / MTL_MEDIA_PERF_LIMIT_REASONS to proper places. (Lucas) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231214184659.2249559-17-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 93536c2bcfb2c3c5e9b53c83f333f57d9b632e83 Author: Matt Roper Date: Thu Dec 14 10:47:06 2023 -0800 drm/xe: Define interrupt vector bits with the interrupt registers The bit definitions had become a bit orphaned; move them to the same location as the interrupt registers that they're used with. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231214184659.2249559-16-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 48e70d2a1a9c8d58c48b2840feda3aa3bc330a94 Author: Matt Roper Date: Thu Dec 14 10:47:05 2023 -0800 drm/xe: Move GSC HECI base offsets out of register header These offsets are only used to setup the auxiliary device BAR information and are never used for driver read/write operations. Move them to the GSC HECI file where they're actually used. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231214184659.2249559-15-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit f52e4e9065786dd20477879d834c5c33a3ae9498 Author: Matt Roper Date: Thu Dec 14 10:47:04 2023 -0800 drm/xe: Move engine base offsets to engine register header These offsets are primarily used as parameters for the engine register definitions, so it makes more sense to define them in the engine header rather than the general register header. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231214184659.2249559-14-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 68df8642ea34bf313757b671f57a4d123458c3f8 Author: Matt Roper Date: Thu Dec 14 10:47:03 2023 -0800 drm/xe: Fix whitespace in register definitions Our register headers use tabs to align the definition values. Convert a few definitions that were using spaces instead. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231214184659.2249559-13-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 5ea7fe65fb1cf95d9b48fcc3c7c806ce417357c2 Author: Matt Roper Date: Thu Dec 14 10:47:02 2023 -0800 drm/xe: Move some per-engine register definitions to the engine header Although we only work with the RCS instances today, the FF_SLICE_CS_CHICKEN1[1,2] CS_DEBUG_MODE1, CS_CHICKEN1, and FF_THREAD_MODE registers all have instances on both the RCS and CCS engines. Convert these to parameterized macros and move them to the engine register header. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231214184659.2249559-12-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit bc17ec0b201ec7b8576576aa0785787671b4afe7 Author: Matt Roper Date: Thu Dec 14 10:47:01 2023 -0800 drm/xe: Drop "_REG" suffix from CSFE_CHICKEN1 We don't use this suffix on any other registers, and it isn't part of the register's official name either, so drop it for consistency. While at it, move the register definition slightly so that it isn't separating RING_CMD_CCTL's definition from its fields. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231214184659.2249559-11-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit cbdc52c11c9b1df40ade23f622abc3466e4ee96c Author: Himal Prasad Ghimiray Date: Tue Dec 12 23:55:33 2023 +0530 drm/xe/xe2: Support flat ccs Enable flat ccs for XE2_GFX_FEATURES. Cc: Thomas Hellström Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit d6abc18d66932adb163803f9c83a5fa90ca63ff4 Author: Himal Prasad Ghimiray Date: Tue Dec 12 23:55:32 2023 +0530 drm/xe/xe2: Modify xe_bo_test for system memory Modify test to valid ccs clear and copy during evict/restore on igfx. v2: -Vram is associated with tiles not with gt. Use tile based iterator for ccs_test_run_gt. (Matt) Cc: Matt Roper Cc: Thomas Hellström Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 266c85885263022954928b125d46ab7a78c77a69 Author: Himal Prasad Ghimiray Date: Tue Dec 12 23:55:31 2023 +0530 drm/xe/xe2: Handle flat ccs move for igfx. - Clear flat ccs during user bo creation. - copy ccs meta data between flat ccs and bo during eviction and restore. - Add a bool field ccs_cleared in bo, true means ccs region of bo is already cleared. v2: - Rebase. v3: - Maintain order of xe_bo_move_notify for ttm_bo_type_sg. v4: - xe_migrate_copy can be used to copy src to dst bo on igfx too. Add a bool which handles only ccs metadata copy. v5: - on dgfx ccs should be cleared even if the bo is not compression enabled. Cc: Thomas Hellström Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 65ef8dbad1db9e35ca7af90e6958134595938d24 Author: Himal Prasad Ghimiray Date: Tue Dec 12 23:55:30 2023 +0530 drm/xe/xe2: Update emit_pte to use compression enabled PAT index For indirect accessed buffer use compression enabled PAT index. v2: - Fix parameter name. v3: - use a relevant define instead of fix number. Cc: Thomas Hellström Cc: Matthew Auld Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 09427526793384fea6a13cc33ffebadb69fdcde4 Author: Himal Prasad Ghimiray Date: Tue Dec 5 17:56:34 2023 +0530 drm/xe/xe2: Update chunk size for each iteration of ccs copy In xe2 platform XY_CTRL_SURF_COPY_BLT can handle ccs copy for max of 1024 main surface pages. v2: - Use better logic to determine chunk size (Matt/Thomas) v3: - use function instead of macro(Thomas) Cc: Matt Roper Cc: Thomas Hellström Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 9116eabb6d5e26a7eceb6945327e9feb67019d41 Author: Himal Prasad Ghimiray Date: Tue Dec 12 23:55:28 2023 +0530 drm/xe/xe_migrate: Use NULL 1G PTE mapped at 255GiB VA for ccs clear Get rid of the cleared bo, instead use null 1G PTE mapped at 255GiB offset, this can be used for both dgfx and igfx. v2: - Remove xe_migrate::cleared_bo. - Add a comment for NULL mapping.(Thomas) Cc: Thomas Hellström Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 9cca49021c81d05b84916b87092602be2c412e04 Author: Himal Prasad Ghimiray Date: Tue Dec 12 23:55:27 2023 +0530 drm/xe/xe2: Updates on XY_CTRL_SURF_COPY_BLT - The XY_CTRL_SURF_COPY_BLT instruction operating on ccs data expects size in pages of main memory for which CCS data should be copied. - The bitfield representing copy size in XY_CTRL_SURF_COPY_BLT has shifted one bit higher in the instruction. v2: - Fix the num_pages for ccs size calculation. - Address nits (Thomas) v3: - Use FIELD_PREP and FIELD_FIT instead of shifts and numbers.(Matt) Cc: Matt Roper Cc: Thomas Hellström Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Matt Roper Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 20561efb0ffd199fec1caaa5a0de439fab69d89a Author: Himal Prasad Ghimiray Date: Tue Dec 12 23:55:26 2023 +0530 drm/xe/xe2: Allocate extra pages for ccs during bo create Incase of bo move from PL_TT to PL_SYSTEM these pages will be used to store ccs metadata from flat ccs. And during bo move to PL_TT from PL_SYSTEM the metadata will be copied from extra pages to flat ccs. This copy of ccs metadata ensures ccs remains unaltered between swapping out of bo to disk and its restore to PL_TT. Bspec:58796 v2: - For dgfx ensure system bit is not set. - Modify comments.(Thomas) v3: - Separate out patch to modify main memory to ccs memory ratio.(Matt) v4: - Update description for commit message. - Make bo allocation routine more readable.(Matt) Cc: Matt Roper Cc: Thomas Hellström Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 064686272b7a7371eea32d5e7b89597cf5c70c0b Author: Himal Prasad Ghimiray Date: Tue Dec 12 23:55:25 2023 +0530 drm/xe/xe2: Modify main memory to ccs memory ratio. On xe2 platforms each byte of CCS data now represents 512 bytes of main memory data. Cc: Matt Roper Cc: Thomas Hellström Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Thomas Hellström Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 4cb12b71923b6e2354093fbbde9bcadaec3d813f Author: Himal Prasad Ghimiray Date: Tue Dec 12 23:55:24 2023 +0530 drm/xe/xe2: Determine bios enablement for flat ccs on igfx If bios disables flat ccs on igfx make has_flat_ccs as 0 and notify via drm_dbg. Bspec:59255 v2: - Release forcewake. - Add registers in order. - drop dgfx condition and only add it back in the future when the support for an Xe2 dgpu will be added. - Use drm_dbg instead of drm_info. (Matt) v3: - Address nit(Matt) Cc: Matt Roper Cc: Thomas Hellström Signed-off-by: Himal Prasad Ghimiray Reviewed-by: Matt Roper Acked-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 7a18d36f88105c0964846dbf9f7f1b0d43e860db Author: Matt Roper Date: Tue Dec 12 13:56:04 2023 -0800 drm/xe: Remove duplicate RING_MAX_NONPRIV_SLOTS definition The engine register header wound up with two definitions for RING_MAX_NONPRIV_SLOTS, likely due to a rebase mistake. Keep the definition that's in an appropriate place (i.e., with the FORCE_TO_NONPRIV register definition) and remove the other. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20231212215603.2041841-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit eb9702ad29863c1ae41d17d8504c7444f280dfff Author: Matthew Brost Date: Tue Dec 5 10:39:54 2023 -0800 drm/xe: Allow num_batch_buffer / num_binds == 0 in IOCTLs The idea being out-syncs can signal indicating all previous operations on the bind queue are complete. An example use case of this would be support for implementing vkQueueWaitIdle easily. All in-syncs are waited on before signaling out-syncs. This is implemented by forming a composite software fence of in-syncs and installing this fence in the out-syncs and exec queue last fence slot. The last fence must be added as a dependency for jobs on user exec queues as it is possible for the last fence to be a composite software fence (unordered, ioctl with zero bb or binds) rather than hardware fence (ordered, previous job on queue). Cc: Thomas Hellström Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit f5783b5026f76083ef4c53f6240619bd5c7bb9a5 Author: Rodrigo Vivi Date: Mon Dec 11 19:20:58 2023 -0500 drm/xe: Remove vram size info from sysfs This information is already part of the query IOCTL. Let's not duplicate it here in the sysfs. Cc: Matt Roper Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 53bf60f6d8503c788fee9c30dacef682edbe61fd Author: Matthew Brost Date: Tue Dec 5 10:56:17 2023 -0800 drm/xe: Use a flags field instead of bools for sync parse Use a flags field instead of severval bools for sync parse as it is easier to read and less bug prone. v2: Pull in header change from subsequent patch Suggested-by: Thomas Hellström Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 3b97e3b265c97b7cd7dcbdb2f7ef93c6e6f94948 Author: Matthew Brost Date: Tue Dec 12 09:00:37 2023 -0800 drm/xe: Use a flags field instead of bools for VMA create Use a flags field instead of severval bools for VMA create as it is easier to read and less bug prone. Suggested-by: Thomas Hellström Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 35705e32b13cf800a47f10844c4f8d1334d411c7 Author: Thomas Hellström Date: Tue Dec 12 11:01:44 2023 +0100 drm/xe: Use DRM_GPUVM_RESV_PROTECTED for gpuvm Use DRM_GPUVM_RESV_PROTECTED to use corse-grained locking for the evict and external object list. Since we are already holding the relevant RESV locks, for now at least, we don't need the fine-grained locking. Signed-off-by: Thomas Hellström Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231212100144.6833-3-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 24f947d58fe554cf38507b94a43d373acf1e5e73 Author: Thomas Hellström Date: Tue Dec 12 11:01:43 2023 +0100 drm/xe: Use DRM GPUVM helpers for external- and evicted objects Adapt to the DRM_GPUVM helpers moving removing a lot of complicated driver-specific code. For now this uses fine-grained locking for the evict list and external object list, which may incur a slight performance penalty in some situations. v2: - Don't lock all bos and validate on LR exec submissions (Matthew Brost) - Add some kerneldoc Signed-off-by: Thomas Hellström Reviewed-by: Rodrigo Vivi Acked-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20231212100144.6833-2-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 49e134e16f8111f82f4067da38055db4b4b34a0b Author: Aravind Iddamsetty Date: Wed Dec 6 15:03:27 2023 +0530 drm/xe: Fix lockdep warning in xe_force_wake calls Use spin_lock_irqsave, spin_unlock_irqrestore Fix for below: [13994.811263] ======================================================== [13994.811295] WARNING: possible irq lock inversion dependency detected [13994.811326] 6.6.0-rc3-xe #2 Tainted: G U [13994.811358] -------------------------------------------------------- [13994.811388] swapper/0/0 just changed the state of lock: [13994.811416] ffff895c7e044db8 (&cpuctx_lock){-...}-{2:2}, at: __perf_event_read+0xb7/0x3a0 [13994.811494] but this lock took another, HARDIRQ-unsafe lock in the past: [13994.811528] (&fw->lock){+.+.}-{2:2} [13994.811544] and interrupts could create inverse lock ordering between them. [13994.811606] other info that might help us debug this: [13994.811636] Possible interrupt unsafe locking scenario: [13994.811667] CPU0 CPU1 [13994.811691] ---- ---- [13994.811715] lock(&fw->lock); [13994.811744] local_irq_disable(); [13994.811773] lock(&cpuctx_lock); [13994.811810] lock(&fw->lock); [13994.811846] [13994.811865] lock(&cpuctx_lock); [13994.811895] *** DEADLOCK *** v2: Use spin_lock in atomic context and spin_lock_irq in a non atomic context (Matthew Brost) v3: just use spin_lock_irqsave/restore Cc: Matthew Brost Cc: Anshuman Gupta Cc: Ville Syrjala Reviewed-by: Rodrigo Vivi Signed-off-by: Aravind Iddamsetty Signed-off-by: Rodrigo Vivi commit 68661c69e9fa86e78b8b6509aebeada5a15dada5 Author: Vinay Belgaumkar Date: Fri Dec 1 12:25:14 2023 -0800 drm/xe: Check skip_guc_pc before disabling gucrc Also, use the new C6 helper instead of duplicating that code. v2: Check skip flag at the beginning of the function (Rodrigo) Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is set") Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Signed-off-by: Rodrigo Vivi commit 06951c2ee72df2f53b71e7cf2b504d4fa6bba453 Author: Thomas Hellström Date: Sat Dec 9 16:18:42 2023 +0100 drm/xe: Use NULL PTEs as scratch PTEs Currently scratch PTEs are write-enabled and points to a single scratch page. This has the side effect that buggy applications with out-of-bounds memory accesses may not notice the bad access since what's written may be read back. Instead use NULL PTEs as scratch PTEs. These always return 0 when reading, and writing has no effect. As a slight benefit, we can also use huge NULL PTEs. One drawback pointed out is that debugging may be hampered since previously when inspecting the content of the scratch page, it might be possible to detect writes to out-of-bound addresses and possibly also from where the out-of-bounds address originated. However since the scratch page-table structure is kept, it will be easy to add back the single RW-enabled scratch page under a debug define if needed. Also update the kerneldoc accordingly and move the function to create the scratch page-tables from xe_pt.c to xe_pt.h since it is accessing vm structure internals and this also makes it possible to make it static. v2: - Don't try to encode scratch PTEs larger than 1GiB. - Move xe_pt_create_scratch(), Update kerneldoc. v3: - Rebase. Cc: Brian Welty Cc: Matt Roper Signed-off-by: Thomas Hellström Acked-by: Lucas De Marchi #for general direction. Reviewed-by: Brian Welty Link: https://patchwork.freedesktop.org/patch/msgid/20231209151843.7903-3-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit e84d716dd461928b3db344748cd7f87395a2ce74 Author: Thomas Hellström Date: Sat Dec 9 16:18:41 2023 +0100 drm/xe: Restrict huge PTEs to 1GiB Add a define for the highest level for which we can encode a huge PTE, and use it for page-table building. Also update an assert that checks that we don't try to encode for larger sizes. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Reviewed-by: Brian Welty Link: https://patchwork.freedesktop.org/patch/msgid/20231209151843.7903-2-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 1c8e9019033728093c04608f44c6e87fec6822e1 Author: Sujaritha Sundaresan Date: Fri Dec 8 00:11:52 2023 -0500 drm/xe: Add frequency throttle reasons sysfs attributes Add throttle reasons sysfs attributes under a separate directory. /device/tile/gt/freq0/throttle |- reason_pl1 |- reason_pl2 |- reason_pl4 |- reason_prochot |- reason_ratl |- reason_vr_tdc |- reason_vr_thermalert |- status v2: Remove unnecessary headers and clean-up action (Riana) Signed-off-by: Sujaritha Sundaresan Reviewed-by: Riana Tauro Signed-off-by: Rodrigo Vivi commit bef52b5c7a1904fc6e1bdda4a0e6dc460f562856 Author: Rodrigo Vivi Date: Fri Dec 8 00:11:51 2023 -0500 drm/xe: Create a xe_gt_freq component for raw management and sysfs Goals of this new xe_gt_freq component: 1. Detach sysfs controls and raw freq management from GuC SLPC. 2. Create a directory that could later be aligned with devfreq. 3. Encapsulate all the freq control in a single directory. Although we only have one freq domain per GT, already start with a numbered freq0 directory so it could be expanded in the future if multiple domains or PLL are needed. Note: Although in the goal #1, the raw freq management control is mentioned, this patch only starts by the sysfs control. The RP freq configuration and init freq selection are still under the guc_pc, but should be moved to this component in a follow-up patch. v2: - Add /tile# to the doc and remove unnecessary kobject_put (Riana) - s/ssize_t/int on some ret variables (Vinay) Cc: Sujaritha Sundaresan Cc: Vinay Belgaumkar Cc: Riana Tauro Reviewed-by: Vinay Belgaumkar Signed-off-by: Rodrigo Vivi commit 2ab3cc4bf5a3dd760b697650d5e5bdb240fdf94a Author: Sujaritha Sundaresan Date: Fri Dec 8 00:11:50 2023 -0500 drm/xe: Change the name of frequency sysfs attributes Switching the names of frequency sysfs attrbutes to align with required devfreq changes. The name changes are as below; -freq_act -> act_freq -freq_cur -> cur_freq -freq_rpn -> rpn_freq -freq_rpe -> rpe_freq -freq_rp0 -> rp0_freq -freq_min -> min_freq -freq_max -> max_freq Signed-off-by: Sujaritha Sundaresan Reviewed-by: Riana Tauro Signed-off-by: Rodrigo Vivi commit 06d5ae90579e774934552ca023c4bbc56e8253f4 Author: Mika Kuoppala Date: Tue Dec 5 16:41:42 2023 +0200 drm/xe/vm: Avoid asid lookup if none allocated The destroy path can and will get called for incomplete vm objects on error paths, where the asid is not yet allocated. This leads to lookup fail and assert triggered. Fix this by not asserting of asid existence if vm never got assigned one. Cc: Ohad Sharabi Cc: Thomas Hellström Cc: Matthew Auld Signed-off-by: Mika Kuoppala Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 5a92da34ddb4ec75a037d4a956afa993876c67d4 Author: Lucas De Marchi Date: Tue Dec 5 06:52:35 2023 -0800 drm/xe: Rename info.supports_* to info.has_* Rename supports_mmio_ext and supports_usm to use a has_ prefix so the flags are grouped together. This settles on just one variant for positive info matching ("has_") and one for negative ("skip_"). Also make sure the has_* flags are grouped together in xe_pci.c. Reviewed-by: Koby Elbaz Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20231205145235.2114761-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit f1a5d808b2a69304d0df06e23f4465a278b2cdd8 Author: Michal Wajdeczko Date: Tue Nov 28 16:15:07 2023 +0100 drm/xe/kunit: Add test for LMTT operations The LMTT variants are abstracted with xe_lmtt_ops. Make sure that both 2L and ML ops implementations are correct. Reviewed-by: Michał Winiarski Link: https://lore.kernel.org/r/20231128151507.1015-6-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit a43ac2de4c1c788a8731940470a7de77dd60ccea Author: Michal Wajdeczko Date: Tue Nov 28 16:15:06 2023 +0100 drm/xe/kunit: Enable CONFIG_PCI_IOV in .kunitconfig We will add kunit tests for the PF specific code that is by default enabled only under CONFIG_PCI_IOV. Update our .kunitconfig to allow running those test cases by our CI. Reviewed-by: Michał Winiarski Link: https://lore.kernel.org/r/20231128151507.1015-5-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit b1d20405821812ad70d95eefe58cadc6d50b0917 Author: Michal Wajdeczko Date: Tue Nov 28 16:15:05 2023 +0100 drm/xe/pf: Introduce Local Memory Translation Table The Local Memory Translation Table (LMTT) provides additional abstraction for Virtual Functions (VF) accessing device VRAM. This code is based on prior work of Michal Winiarski. In this patch we focus only on LMTT initialization. Remaining LMTT functions will be used once we add a VF provisioning to the PF. Bspec: 44117, 52404, 59314 Reviewed-by: Michał Winiarski Link: https://lore.kernel.org/r/20231128151507.1015-4-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit 5bcedc9eabdc6ecd7a11f1e6147f0f601d7cdc77 Author: Michal Wajdeczko Date: Tue Nov 28 16:15:04 2023 +0100 drm/xe: Introduce SR-IOV logging macros To simplify logging and help identify SR-IOV specific messages define set of helper macros that will prefix messages based on the current SR-IOV mode. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231128151507.1015-3-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit ed750833f165869abf5effed5e02418d754647b0 Author: Michal Wajdeczko Date: Tue Nov 28 16:15:03 2023 +0100 drm/xe: Define DRM_XE_DEBUG_SRIOV config We will be using extra logs during enabling of the SR-IOV features or when adding support for new platforms. Define separate config flag to keep that low level logs disabled if we're not debugging. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231128151507.1015-2-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit 78e2701a2614720d8c47b3a8490bf61c29718e8a Author: Niranjana Vishwanathapura Date: Wed Nov 1 19:02:53 2023 +0000 drm/xe: Avoid any races around ccs_mode update Ensure that there are no drm clients when changing CCS mode. Allow exec_queue creation only with enabled CCS engines. v2: Rebase Reviewed-by: Andi Shyti Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit f3bc5bb4d53d2091f03cf43f19e7c9b41db90367 Author: Niranjana Vishwanathapura Date: Wed Nov 15 21:59:04 2023 +0000 drm/xe: Allow userspace to configure CCS mode Allow user to configure the CCS mode setting through a 'ccs_mode' sysfs interface. Also report the current CCS mode configuration and number of compute slices available through this interface. v2: Rebase, make it platform agnostic v3: Separte out num_cslices sysfs interface and make xe_gt_ccs_mode_sysfs_init() return void Reviewed-by: Andi Shyti Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 0d97ecce16bd26a1f90022cf0466ff15c4a0bd91 Author: Niranjana Vishwanathapura Date: Mon Oct 9 13:10:27 2023 -0700 drm/xe: Enable Fixed CCS mode setting Disable dynamic HW load balancing of compute resource assignment to engines and instead enabled fixed mode of mapping compute resources to engines on all platforms with more than one compute engine. By default enable only one CCS engine with all compute slices assigned to it. This is the desired configuration for common workloads. PVC platform supports only the fixed CCS mode (workaround 16016805146). v2: Rebase, make it platform agnostic v3: Minor code refactoring Reviewed-by: Andi Shyti Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit b279b53015079bda2a311b48892dff362ac8ebc3 Author: Tejas Upadhyay Date: Wed Dec 6 22:20:20 2023 +0530 drm/xe/xe2: Add workaround 18032095049 and 16021639441 This workaround applies to graphics 20.04 on all engines. Workaround has three parts : 1. Pipe flush before MI_ATOMIC - This part isn't relevant to Xe (at least not right now) since we don't use MI_ATOMIC anywhere in the kernel mode driver. 2. Memory-based interrupt masking - Memory-based interrupt processing isn't supported on physical functions, only virtual functions, according to bspec 60352. So this is probably only relevant once SRIOV support lands in the driver. 3. Disabling CSB/timestamp updates to the ghwsp and pphwsp - Workaround is added by this change. The CSB reports to gHWSP and ppHWSP have been discussed as part of a different topic on some internal threads and we've confirmed that neither the KMD nor the GuC firmware use those for anything, so disabling them is always "safe" and should have no functional or performance impact on system operation. The same is true for the timestamp updates in the ppHWSP as well. Given that, it might make sense to just combine these two workarounds into a single record (and single patch) and apply it on all steppings. Disabling the reports for RCS on higher steppings doesn't have any kind of negative impact and will simplify the overall situation. V3(MattR): - Combine WA apply same WA for all engines, no performance impact V2(MattR): - Mention detail in commit message - Reorder bit define - Improve bit naming - Remove workaround part which isnt relevant Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 6a1fd6787d59a1852e89a9e8863673ae4dc9a2ca Author: Tejas Upadhyay Date: Tue Dec 5 10:51:59 2023 +0530 drm/xe/xe2: Add workaround 14019988906 This workaround applies to Graphics 20.04 as engine workaround V2(MattR): - Reorder bit define - Apply WA for RCS only Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit d8b1571312b7f77aeae2b2a7a138bb8edaa4f725 Author: Daniele Ceraolo Spurio Date: Tue Nov 28 17:17:19 2023 -0800 drm/xe/huc: HuC authentication via GSC HuC authentication via GSC is performed by submitting the appropriate PXP packet to the GSC FW. This packet can trigger a "pending" reply from the FW, so we need to handle that and resubmit. Note that the auth via GSC can only be performed if the HuC has already been authenticated by the GuC. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Cc: Vivaik Balasubrawmanian Reviewed-by: Vivaik Balasubrawmanian Signed-off-by: Rodrigo Vivi commit 7ce5716e13cfb37a86c02fe158403c002eb1b504 Author: Daniele Ceraolo Spurio Date: Tue Nov 28 17:17:18 2023 -0800 drm/xe/huc: Prepare for 2-step HuC authentication Starting on MTL, the HuC is authenticated twice, once via GuC (same as with older integrated platforms) and once via GSC; the first authentication allows the HuC to be used for clear-media workloads, while the second one unlocks support for protected content. Ahead of adding the authentication flow via GSC, this patch adds support for differentiating the 2 auth steps and checking if they're complete. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Reviewed-by: Vivaik Balasubrawmanian Signed-off-by: Rodrigo Vivi commit 2a70bbe6170fafde76cf0135c5cbee4bd4bfa0ec Author: Lucas De Marchi Date: Tue Dec 5 05:39:54 2023 -0800 drm/xe/kunit: Test WAs for MTL and LNL Now that the kunit infra has proper support for GMD_ID platforms, add a few variants of MTL and LNL. v2: Remove bogus check for setting both media and graphics version in test (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231129232807.1499826-6-lucas.demarchi@intel.com Link: https://lore.kernel.org/r/20231205133954.2089546-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 6cad22853cb89da857ff636607dd0e9880172a43 Author: Lucas De Marchi Date: Tue Dec 5 05:39:53 2023 -0800 drm/xe/kunit: Add stub to read_gmdid Currently it's not possible to test the WAs for platforms using gmdid since they don't have the IP information on the descriptor struct. In order to allow that, add a stub function for read_gmdid() that is activated when the test executes, replacing the iomap and read of the real register. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231129232807.1499826-5-lucas.demarchi@intel.com Link: https://lore.kernel.org/r/20231205133954.2089546-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 5b2a63b40d5620ce453f2a509334ae6feb7b884e Author: Lucas De Marchi Date: Tue Dec 5 05:39:52 2023 -0800 drm/xe/kunit: Move fake pci data to test-priv Instead of passing as parameter to xe_pci_fake_device_init(), use test->priv to pass parameters down the call stack. The main advantage is that then the data is readily available on other functions by using kunit_get_current_test(). This is a preparation to fix the initialization of fake devices when they were supposed to be using GMD_ID. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231129232807.1499826-4-lucas.demarchi@intel.com Link: https://lore.kernel.org/r/20231205133954.2089546-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 1da0e581983c6f212499d44573b23ae48c1a4d00 Author: Lucas De Marchi Date: Tue Dec 5 05:39:51 2023 -0800 drm/xe/kunit: Remove handling of XE_TEST_SUBPLATFORM_ANY The only user passing XE_TEST_SUBPLATFORM_ANY is xe_pci_fake_device_init_any(), but then the function would return earlier when handling XE_TEST_PLATFORM_ANY. Platforms without a subplatform use XE_SUBPLATFORM_NONE. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231129232807.1499826-3-lucas.demarchi@intel.com Link: https://lore.kernel.org/r/20231129232807.1499826-6-lucas.demarchi@intel.com Link: https://lore.kernel.org/r/20231205133954.2089546-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit c3ab84efbd05936cfac87ef6801e03534dc4b0b7 Author: Lucas De Marchi Date: Tue Dec 5 07:58:20 2023 -0800 drm/xe: Expand XE_REG_OPTION_MASKED documentation Expand documentation and add an example to make clear this isn't about generic masks in registers. Also, fix the doc regarding read operations: the mask part has no effect on them. Reviewed-by: Ashutosh Dixit Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231205155820.2133813-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 0f1d88f2786458a8986920669bd8fb3fec6e618d Author: Rodrigo Vivi Date: Wed Nov 29 11:41:15 2023 -0500 drm/xe/uapi: Kill exec_queue_set_property All the properties should be immutable and set upon exec_queue creation using the existent extension. So, let's kill this useless and dangerous uapi. Cc: Francois Dugast Cc: José Roberto de Souza Cc: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Signed-off-by: Francois Dugast commit 9209fbede74f202168f0b525060feb6bf67924ba Author: Rodrigo Vivi Date: Wed Nov 29 11:29:00 2023 -0500 drm/xe: Remove unused extension definition The vm_create ioctl function doesn't accept any extension. Remove this left over. A backward compatible change. Cc: Francois Dugast Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza commit 9329f0667215a5c22d650f870f8a9f5839a5bc5a Author: Thomas Hellström Date: Mon Nov 27 16:03:30 2023 +0100 drm/xe/uapi: Use LR abbrev for long-running vms Currently we're using "compute mode" for long running VMs using preempt-fences for memory management, and "fault mode" for long running VMs using page faults. Change this to use the terminology "long-running" abbreviated as LR for long-running VMs. These VMs can then either be in preempt-fence mode or fault mode. The user can force fault mode at creation time, but otherwise the driver can choose to use fault- or preempt-fence mode for long-running vms depending on the device capabilities. Initially unless fault-mode is specified, the driver uses preempt-fence mode. v2: - Fix commit message wording and the documentation around CREATE_FLAG_LR_MODE and CREATE_FLAG_FAULT_MODE Cc: Matthew Brost Cc: Rodrigo Vivi Cc: Francois Dugast Signed-off-by: Thomas Hellström Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 926ad2c38007bd490958164be2b30db80be59993 Author: Rodrigo Vivi Date: Wed Nov 22 14:38:33 2023 +0000 drm/xe/uapi: Move xe_exec after xe_exec_queue Although the exec ioctl is a very important one, it makes no sense to explain xe_exec before explaining the exec_queue. So, let's move this down to help bring a better flow on the documentation and code readability. It is important to highlight that this patch is changing all the ioctl numbers in a non-backward compatible way. However, we are doing this final uapi clean-up before we submit our first pull-request to be part of the upstream Kernel. Once we get there, no other change like this will ever happen and all the backward compatibility will be respected. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza commit 7a56bd0cfbeafab33030c782c40b009e39c4bbc0 Author: Rodrigo Vivi Date: Wed Nov 22 14:38:32 2023 +0000 drm/xe/uapi: Fix various struct padding for 64b alignment Let's respect Documentation/process/botching-up-ioctls.rst and add the proper padding for a 64b alignment with all as well as all the required checks and settings for the pads and the reserved entries. v2: Fix remaining holes and double check with pahole (Jose) Ensure with pahole that both 32b and 64b have exact same layout (Thomas) Do not set query's pad and reserved bits to zero since it is redundant and already done by kzalloc (Matt) v3: Fix alignment after rebase (José Roberto de Souza) v4: Fix pad check (Francois Dugast) Cc: Thomas Hellström Cc: Francois Dugast Cc: José Roberto de Souza Cc: Matt Roper Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza commit c3fca1077b9a19e679ec59ff2d2c5f4069e375ae Author: Rodrigo Vivi Date: Wed Nov 22 14:38:31 2023 +0000 drm/xe/uapi: Add Tile ID information to the GT info query As an information only. So Userspace can use this information and be able to correlate different GTs. Make API symmetric between Engine and GT info. There's no need right now to include a tile_query entry since there's no other information that we need from tile that is not already exposed through different queries. However, this could be added later if we have different Tile information that could matter to userspace. But let's keep the API ready for a direct reference to Tile ID based on the GT entry. Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza commit 4016d6bf368c4894c834e0652aecd93f7d2a2fab Author: Rodrigo Vivi Date: Wed Nov 22 14:38:29 2023 +0000 drm/xe/uapi: Crystal Reference Clock updates First of all, let's remove the duplication. But also, let's rename it to remove the word 'frequency' out of it. In general, the first thing people think of frequency is the frequency in which the GTs are operating to execute the GPU instructions. While this frequency here is a crystal reference clock frequency which is the base of everything else, and in this case of this uAPI it is used to calculate a better and precise timestamp. v2: (Suggested by Jose) Remove the engine_cs and keep the GT info one since it might be useful for other SRIOV cases where the engine_cs will be zeroed. So, grabbing from the GT_LIST should be cleaner. v3: Keep comment on put_user() call (José Roberto de Souza) Cc: Matt Roper Umesh Nerlige Ramappa Cc: Jose Souza Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza commit cad4a0d6af146e14a82a0f7d43613450dc56ff80 Author: Rodrigo Vivi Date: Wed Nov 22 14:38:28 2023 +0000 drm/xe/uapi: Kill tile_mask It is currently unused, so by the rules it cannot go upstream. Also there was the desire to convert that to align with the engine_class_instance selection, but the consensus on that one is to remain with the global gt_id. So we are keeping the gt_id there, not converting to a generic sched_group and also killing this tile_mask and only using the default behavior of 0 that is to create a mapping / page_table entry on every tile, similar to what i915. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: José Roberto de Souza commit 37d078e51b4cba30f90667a2b35e16725d649956 Author: Rodrigo Vivi Date: Wed Nov 22 14:38:27 2023 +0000 drm/xe/uapi: Split xe_sync types from flags Let's continue on the uapi clean-up with more splits with stuff into their own exclusive fields instead of reusing stuff. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: José Roberto de Souza commit 60a6a849fcb338b8a3f3d1ec9ec50c002add925a Author: Francois Dugast Date: Wed Nov 22 14:38:26 2023 +0000 drm/xe/uapi: Align on a common way to return arrays (engines) The uAPI provides queries which return arrays of elements. As of now the format used in the struct is different depending on which element is queried. Fix this for engines by applying the pattern below: struct drm_xe_query_Xs { __u32 num_Xs; struct drm_xe_X Xs[]; ... } Instead of directly returning an array of struct drm_xe_query_engine_info, a new struct drm_xe_query_engines is introduced. It contains itself an array of struct drm_xe_engine which holds the information about each engine. v2: Use plural for struct drm_xe_query_engines as multiple engines are returned (José Roberto de Souza) Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 71c625aa770d4bd2b0901a9da3820fb89636e1a1 Author: Francois Dugast Date: Wed Nov 22 14:38:25 2023 +0000 drm/xe/uapi: Align on a common way to return arrays (gt) The uAPI provides queries which return arrays of elements. As of now the format used in the struct is different depending on which element is queried. However, aligning on the new common pattern: struct drm_xe_query_Xs { __u32 num_Xs; struct drm_xe_X Xs[]; ... } ... would mean bringing back the name "gts" which is avoided per commit fca54ba12470 ("drm/xe/uapi: Rename gts to gt_list") so make an exception for gt and leave gt_list. Also, this change removes "query" in the name of struct drm_xe_query_gt as it is not returned from the query IOCTL. There is no functional change. v2: Leave gt_list (Matt Roper) Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Reviewed-by: Matt Roper Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 4bc9dd98e0a7e8a14386fc8341379ee09e594987 Author: Francois Dugast Date: Wed Nov 22 14:38:24 2023 +0000 drm/xe/uapi: Align on a common way to return arrays (memory regions) The uAPI provides queries which return arrays of elements. As of now the format used in the struct is different depending on which element is queried. Fix this for memory regions by applying the pattern below: struct drm_xe_query_Xs { __u32 num_Xs; struct drm_xe_X Xs[]; ... } This removes "query" in the name of struct drm_xe_query_mem_region as it is not returned from the query IOCTL. There is no functional change. v2: Only rename drm_xe_query_mem_region to drm_xe_mem_region (José Roberto de Souza) v3: Rename usage to mem_regions in xe_query.c (José Roberto de Souza) Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 4e03b584143e18eabd091061a1716515da928dcb Author: Mauro Carvalho Chehab Date: Wed Nov 22 14:38:23 2023 +0000 drm/xe/uapi: Reject bo creation of unaligned size For xe bo creation we request passing size which matches system or vram minimum page alignment. This way we want to ensure userspace is aware of region constraints and not aligned allocations will be rejected returning EINVAL. v2: - Rebase, Update uAPI documentation. (Thomas) v3: - Adjust the dma-buf kunit test accordingly. (Thomas) v4: - Fixed rebase conflicts and updated commit message. (Francois) Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Zbigniew Kempczyński Signed-off-by: Thomas Hellström Reviewed-by: Maarten Lankhorst Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 2bec30715435824c2ea03714038f0ee7a4b5c698 Author: José Roberto de Souza Date: Wed Nov 22 14:38:22 2023 +0000 drm/xe: Make DRM_XE_DEVICE_QUERY_ENGINES future proof We have at least 2 future features(OA and future media engines capabilities) that will require Xe to provide more information about engines to UMDs. But this information should not just be added to drm_xe_engine_class_instance for a couple of reasons: - drm_xe_engine_class_instance is used as input to other structs/uAPIs and those uAPIs don't care about any of these future new engine fields - those new fields are useless information after initialization for some UMDs, so it should not need to carry that around So here my proposal is to make DRM_XE_DEVICE_QUERY_ENGINES return an array of drm_xe_query_engine_info that contain drm_xe_engine_class_instance and 3 u64s to be used for future features. Reference OA: https://patchwork.freedesktop.org/patch/558362/?series=121084&rev=6 v2: Reduce reserved[] to 3 u64 (Matthew Brost) Cc: Francois Dugast Cc: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi [Rodrigo Rebased] Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza commit 6b8c1edc4f698d7e7e3cd5852bb5b20e93ab01b8 Author: Rodrigo Vivi Date: Wed Nov 22 14:38:21 2023 +0000 drm/xe/uapi: Separate bo_create placement from flags Although the flags are about the creation, the memory placement of the BO deserves a proper dedicated field in the uapi. Besides getting more clear, it also allows to remove the 'magic' shifts from the flags that was a concern during the uapi reviews. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: José Roberto de Souza commit c4ad3710f51e8f0f2e169315e07e9e0c62dcded3 Author: Mika Kuoppala Date: Wed Nov 22 14:38:20 2023 +0000 drm/xe: Extend drm_xe_vm_bind_op The bind api is extensible but for a single bind op, there is not a mechanism to extend. Add extensions field to struct drm_xe_vm_bind_op. Cc: Rodrigo Vivi Cc: Matthew Brost Cc: Lucas De Marchi Cc: Francois Dugast Cc: Joonas Lahtinen Cc: Dominik Grzegorzek Signed-off-by: Mika Kuoppala Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit ff765b7771d874efd3089f90a8944a958ab05874 Author: Matthew Auld Date: Mon Dec 4 10:51:27 2023 +0000 drm/xe: add some debug info for d3cold From the CI logs we want to easily know if the machine is capable and allowed to enter d3cold, and can therefore potentially trigger the d3cold RPM suspend and resume path. Signed-off-by: Matthew Auld Cc: Anshuman Gupta Cc: Riana Tauro Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 4d637a1de2e4da212c1fee505a213a158d6bee1d Author: Michał Winiarski Date: Tue Dec 5 02:33:08 2023 +0100 drm/xe/guc: Split GuC params used for "hwconfig" and "post-hwconfig" Move params that are not used for initial "hwconfig" load to "post-hwconfig" phase. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 7704f32c93cff69d8d0e842638f30e4dc9d93b2a Author: Michał Winiarski Date: Tue Dec 5 02:33:07 2023 +0100 drm/xe/uc: Extract xe_uc_sanitize_reset Earlier GuC load will require more fine-grained control over reset. Extract it outside of xe_uc_init_hw. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit bf2d0d88c3b8d325eee670b2e0b4545de6d30998 Author: Michał Winiarski Date: Tue Dec 5 02:33:06 2023 +0100 drm/xe/uc: Store firmware binary in system-memory backed BO The firmware loading for GuC is about to be moved, and will happen much earlier in the probe process, when local-memory is not yet available. While this has the potential to make the firmware loading process slower, this is only happening during probe and full device reset. Since both are not hot-paths - store all UC-like firmware in system memory. Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit c93ea05191c5b67ecaa784085f8a73e02abcfc76 Author: Michał Winiarski Date: Tue Dec 5 02:33:05 2023 +0100 drm/xe/uc: Split xe_uc_fw_init The function does a driver specific "request firmware" step that includes validating the input, followed by wrapping the firmware binary into a buffer object. Split it into smaller parts. Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 0e1a47fcabc8ffa6f460c60c2caa04e51170fa22 Author: Michał Winiarski Date: Tue Dec 5 02:33:04 2023 +0100 drm/xe: Add a helper for DRM device-lifetime BO create A helper for managed BO allocations makes it possible to remove specific "fini" actions and will simplify the following patches adding ability to execute a release action for specific BO directly. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 791d0362a9e2d47352ee6b35cc8999cb3404e27c Author: Michał Winiarski Date: Tue Dec 5 02:33:03 2023 +0100 drm/xe: Reorder GGTT init to earlier point in probe GuC will need to be loaded earlier during probe. Having functional GGTT is one of the prerequisites. Also rename xe_ggtt_init_noalloc to xe_ggtt_init_early to match the new call site. Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit b62f828a8368de59eb5b353788ace58fb6154495 Author: Michał Winiarski Date: Tue Dec 5 02:33:02 2023 +0100 drm/xe: Move force_wake init to earlier point in probe GuC will need to be loaded earlier during probe. And in order to load GuC, being able to take the forcewake is going to be needed. Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 1ccd68e967f13a584bf3d45a58865afb0abbf2a4 Author: Michał Winiarski Date: Tue Dec 5 02:33:01 2023 +0100 drm/xe: Move system memory management init to earlier point in probe GuC will need to be loaded earlier during probe. And in order to load GuC, we will need the ability to create system memory allocations. Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 51fb5ef209b988a3acee3bc7de04bb70aec51ff5 Author: Michał Winiarski Date: Tue Dec 5 02:33:00 2023 +0100 drm/xe: Don't "peek" into GMD_ID Now that MMIO init got moved to device early, we can use regular xe_mmio_read helpers to get to GMD_ID register. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 4f122766f9043c30b879b44f7dc2ca540b5422cd Author: Michał Winiarski Date: Tue Dec 5 02:32:59 2023 +0100 drm/xe/device: Introduce xe_device_probe_early SR-IOV VF doesn't have access to MMIO registers used to determine graphics/media ID. It can however communicate with GuC. Introduce xe_device_probe_early, which initializes enough HW to use MMIO GuC communication. This will allow both VF and PF/native driver to have unified probe ordering. Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 99e4b1aa8dbe2e23c73229ac1bbd9dc3e6b30c80 Author: Michał Winiarski Date: Tue Dec 5 02:32:58 2023 +0100 drm/xe: Map the entire BAR0 and hold onto the initial mapping Both MMIO registers and GGTT for root tile will need to be used earlier during probe. Don't rely on tile count to compute the mapping size. Further more, there's no need to remap after figuring out the real resource size. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 7e4ce4518b906a960122f29e8f3426ca95ebee0a Author: Michał Winiarski Date: Tue Dec 5 02:32:57 2023 +0100 drm/xe: Introduce xe_tile_init_early and use at earlier point in probe It also merges the GT (which is part of tile) initialization happening at xe_info_init with allocating other per-tile data structures into a common helper function. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 4f5ee007f62a1825cec8140b14b28ef532f570f8 Author: Michał Winiarski Date: Tue Dec 5 02:32:56 2023 +0100 drm/xe: Split xe_info_init Parts of xe_info_init are only dealing with processing driver_data. Extract it into xe_info_init_early to be able to use it earlier during probe. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit a754391f9c0e16f7ef82c90210da7a12b00dd70d Author: Animesh Manna Date: Fri Dec 1 14:44:05 2023 +0530 drm/xe/dsb: DSB implementation for xe Add xe specific DSB buffer handling methods. v1: Initial version. v2: Add null check after dynamic memory allocation of vma. [Uma] Reviewed-by: Uma Shankar Signed-off-by: Animesh Manna Signed-off-by: Rodrigo Vivi commit 0ac3d319cbdd25839c5034da65d57e3f82b53f6c Author: Tejas Upadhyay Date: Thu Nov 30 23:29:41 2023 +0530 drm/xe/xe2: Add workaround 16020292621 Workaround applies to Graphics 20.04 as part of ring submission V4(MattR): - Rule for engine in oob WA not supported, add explicitly V3(MattR): - Pass hwe and rename API name to hint end of ring work - Use existing RING_NOPID API V2: - Marking this WA for 20.04 instead of 20.00 Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 594b46ba0c8239f9531ac23a4c6eae5c0fad4cf3 Author: Brian Welty Date: Tue Nov 21 12:10:37 2023 -0800 drm/xe/xe2: Respond to TRTT faults as unsuccessful page fault SW is not expected to handle TRTT faults and should report these as unsuccessful page fault in the reply, such that HW can respond by raising a CAT error. Signed-off-by: Brian Welty Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit a682b6a42d4de68419f23d73afa57fc931fed3c6 Author: Brian Welty Date: Mon Nov 20 10:44:51 2023 -0800 drm/xe: Support device page faults on integrated platforms Update xe_migrate_prepare_vm() to use the usm batch buffer even for servicing device page faults on integrated platforms. And as we have no VRAM on integrated platforms, device pagefault handler should not attempt to migrate into VRAM. LNL is first integrated platform to support device pagefaults. Signed-off-by: Brian Welty Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit f4a0a113f103e23adb4f3ba8a0e02ce4973fdedf Author: Michał Winiarski Date: Wed Nov 29 22:45:01 2023 +0100 drm/xe: Move xe_mmio_probe_tiles outside of MMIO setup MMIO is going to be setup earlier during probe. Move xe_mmio_probe_tiles outside of MMIO setup. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20231129214509.1174116-6-michal.winiarski@intel.com Signed-off-by: Rodrigo Vivi commit 01c2413a5bc2c66ab54b4aebd3078823a148e69e Author: Michał Winiarski Date: Wed Nov 29 22:45:00 2023 +0100 drm/xe: Move xe_set_dma_info outside of MMIO setup MMIO is going to be setup earlier during probe. Move xe_set_dma_info outside of MMIO setup. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20231129214509.1174116-5-michal.winiarski@intel.com Signed-off-by: Rodrigo Vivi commit 604f7e7777d663033063886b6a5362d0e6092e3a Author: Michał Winiarski Date: Wed Nov 29 22:44:59 2023 +0100 drm/xe/irq: Don't call pci_free_irq_vectors For devres managed devices, pci_alloc_irq_vectors is also managed (see pci_setup_msi_context for reference). PCI device used by Xe is devres managed (it was enabled with pcim_enable_device), which means that calls to pci_free_irq_vectors are redundant and can be safely removed. Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231129214509.1174116-4-michal.winiarski@intel.com Signed-off-by: Rodrigo Vivi commit f321ef042e69859536ba6c97b9f25a2a8f761ef9 Author: Michał Winiarski Date: Wed Nov 29 22:44:58 2023 +0100 drm/xe: Use managed pci_enable_device Xe uses devres for most of its driver-lifetime resources, use it for pci device as well. Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231129214509.1174116-3-michal.winiarski@intel.com Signed-off-by: Rodrigo Vivi commit 0d29a76c639900747fd33b0774764aa78c9667da Author: Michał Winiarski Date: Wed Nov 29 22:44:57 2023 +0100 drm/xe: Skip calling drm_dev_put on probe error DRM device used by Xe is managed, which means that final ref will be dropped on driver detach. Signed-off-by: Michał Winiarski Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20231129214509.1174116-2-michal.winiarski@intel.com Signed-off-by: Rodrigo Vivi commit 33acfc7172ab7f9690536710f0938b787f16a46e Author: Michał Winiarski Date: Wed Nov 29 22:44:56 2023 +0100 drm/xe: Fix header guard warning Additional underscore in the header guard causes the build to fail with: drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.h:6:9: error: '_XE_ENGINE_CLASS_SYSFS_H_' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard] Signed-off-by: Michał Winiarski Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20231129214509.1174116-1-michal.winiarski@intel.com Signed-off-by: Rodrigo Vivi commit 0c923a68abbfe6d7b4fd2ee37c237aba9d870eaf Author: Koby Elbaz Date: Tue Nov 28 18:53:16 2023 +0200 drm/xe: rename bypass_mtcfg to skip_mtcfg Per device, set this flag to access the MTCFG register or to skip it. This is done to standardise Xe driver naming if an access to any HW should be avoided. Signed-off-by: Koby Elbaz Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 082802a3ee09e764bc1513988d6f5889712fe88f Author: Koby Elbaz Date: Tue Nov 28 18:53:15 2023 +0200 drm/xe: add skip_pcode flag Per device, set this flag to enable access to the PCODE uC or to skip it. Signed-off-by: Koby Elbaz Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 8e35780233cee1b2d257e6adf4d82b08ded15e88 Author: Matthew Auld Date: Wed Nov 29 10:37:07 2023 +0000 drm/xe/mocs: update MOCS table for xe2 Looks like there were some changes at some point here for preferring L4 uncached for some of the indexes. Triple checked the PAT settings also, but that looks all correct as per current BSpec. BSpec: 71582 Signed-off-by: Matthew Auld Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 975e4a3795d4f1373be538177525c0b714e0e65e Author: Vinay Belgaumkar Date: Fri Nov 17 16:14:49 2023 -0800 drm/xe: Manually setup C6 when skip_guc_pc is set Skip the init/start/stop GuC PC functions and toggle C6 using register writes instead. Also request max possible frequency as dynamic freq management is disabled. v2: Fix compile warning Reviewed-by: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Signed-off-by: Rodrigo Vivi commit f1cb5f647e8959a1034941d85b311d7485a7095f Author: Vinay Belgaumkar Date: Fri Nov 17 16:02:01 2023 -0800 drm/xe: Add skip_guc_pc flag This flag can be used to disable GuC based power management. This could be used for debug or comparison to host based C6. v2: Fix missing definition Reviewed-by: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Signed-off-by: Rodrigo Vivi commit c550f64f082b9da305ab7d07b8716389a80b641a Author: Vinay Belgaumkar Date: Fri Nov 17 18:06:16 2023 -0800 drm/xe: Rename xe_gt_idle_sysfs to xe_gt_idle Prep this file to contain C6 toggling as well instead of just sysfs related stuff. Reviewed-by: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Signed-off-by: Rodrigo Vivi commit 8cdcef1c2f82d207aa8b2a02298fbc17191c6261 Author: Michal Wajdeczko Date: Wed Nov 15 12:29:21 2023 +0100 drm/xe/doc: Include documentation about xe_assert() Our xe_assert() macros are well documented. Include that in master documentation. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231115112921.1905-1-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit b67cb798e4227d312fd221deb6a3f0b88b51fc6b Author: Michal Wajdeczko Date: Tue Nov 28 21:32:03 2023 +0100 drm/xe/guc: Include only required GuC ABI headers On i915 we were adding new GuC ABI headers directly to guc_fwif.h file since we were replacing old definitions from that file. On xe driver we could do more and better by including ABI headers only in files that need those definitions. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/741 Cc: Jani Nikula Acked-by: Jani Nikula Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20231128203203.1147-3-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit 0a39ad21796f2f67b7d384c0f0ec0ac901f76519 Author: Michal Wajdeczko Date: Tue Nov 28 21:32:02 2023 +0100 drm/xe/guc: Remove obsolete GuC CTB documentation Refer to already described CTB Descriptor and CTB HXG Message. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20231128203203.1147-2-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit e784f352f8a1142065a738f544a6566c873d73f6 Author: Michal Wajdeczko Date: Tue Nov 28 21:32:01 2023 +0100 drm/xe/guc: Drop ancient GuC CTB definitions Those definitions were applicable for old GuC firmwares only. Reviewed-by: Matthew Brost Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/741 Link: https://lore.kernel.org/r/20231128203203.1147-1-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit 473b62763b76e8bb0793ac5f030779c43ecd79e6 Author: Fei Yang Date: Wed Nov 22 12:45:01 2023 -0800 drm/xe: explicitly set GGTT access for GuC DMA Confirmed with hardware that setting GGTT memory access for GuC firmware loading is correct for all platforms and required for new platforms going forward. Signed-off-by: Fei Yang Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231122204501.1353325-2-fei.yang@intel.com Signed-off-by: Rodrigo Vivi commit e1fbc4f18d5b4405271e964670b9b054c4397127 Author: Matthew Auld Date: Mon Sep 25 12:42:18 2023 +0100 drm/xe/uapi: support pat_index selection with vm_bind Allow userspace to directly control the pat_index for a given vm binding. This should allow directly controlling the coherency, caching behaviour, compression and potentially other stuff in the future for the ppGTT binding. The exact meaning behind the pat_index is very platform specific (see BSpec or PRMs) but effectively maps to some predefined memory attributes. From the KMD pov we only care about the coherency that is provided by the pat_index, which falls into either NONE, 1WAY or 2WAY. The vm_bind coherency mode for the given pat_index needs to be at least 1way coherent when using cpu_caching with DRM_XE_GEM_CPU_CACHING_WB. For platforms that lack the explicit coherency mode attribute, we treat UC/WT/WC as NONE and WB as AT_LEAST_1WAY. For userptr mappings we lack a corresponding gem object, so the expected coherency mode is instead implicit and must fall into either 1WAY or 2WAY. Trying to use NONE will be rejected by the kernel. For imported dma-buf (from a different device) the coherency mode is also implicit and must also be either 1WAY or 2WAY. v2: - Undefined coh_mode(pat_index) can now be treated as programmer error. (Matt Roper) - We now allow gem_create.coh_mode <= coh_mode(pat_index), rather than having to match exactly. This ensures imported dma-buf can always just use 1way (or even 2way), now that we also bundle 1way/2way into at_least_1way. We still require 1way/2way for external dma-buf, but the policy can now be the same for self-import, if desired. - Use u16 for pat_index in uapi. u32 is massive overkill. (José) - Move as much of the pat_index validation as we can into vm_bind_ioctl_check_args. (José) v3 (Matt Roper): - Split the pte_encode() refactoring into separate patch. v4: - Rebase v5: - Check for and reject !coh_mode which would indicate hw reserved pat_index on xe2. v6: - Rebase on removal of coh_mode from uapi. We just need to reject cpu_caching=wb + pat_index with coh_none. Testcase: igt@xe_pat Bspec: 45101, 44235 #xe Bspec: 70552, 71582, 59400 #xe2 Signed-off-by: Matthew Auld Cc: Pallavi Mishra Cc: Thomas Hellström Cc: Joonas Lahtinen Cc: Lucas De Marchi Cc: Matt Roper Cc: José Roberto de Souza Cc: Filip Hazubski Cc: Carl Zhang Cc: Effie Yu Cc: Zhengguo Xu Cc: Francois Dugast Tested-by: José Roberto de Souza Reviewed-by: José Roberto de Souza Acked-by: Zhengguo Xu Acked-by: Bartosz Dunajski Signed-off-by: Rodrigo Vivi commit f6a22e6862737e31d2c0693d2a4f986e71d32da6 Author: Matthew Auld Date: Thu Aug 17 10:27:43 2023 +0100 drm/xe/pat: annotate pat_index with coherency mode Future uapi needs to give userspace the ability to select the pat_index for a given vm_bind. However we need to be able to extract the coherency mode from the provided pat_index to ensure it's compatible with the cpu_caching mode set at object creation. There are various security reasons for why this matters. However the pat_index itself is very platform specific, so seems reasonable to annotate each platform definition of the pat table. On some older platforms there is no explicit coherency mode, so we just pick whatever makes sense. v2: - Simplify with COH_AT_LEAST_1_WAY - Add some kernel-doc v3 (Matt Roper): - Some small tweaks v4: - Rebase v5: - Rebase on Xe2 PAT additions v6: - Rebase on removal of coh_mode from uapi Bspec: 45101, 44235 #xe Bspec: 70552, 71582, 59400 #xe2 Signed-off-by: Matthew Auld Cc: Pallavi Mishra Cc: Thomas Hellström Cc: Joonas Lahtinen Cc: Lucas De Marchi Cc: Matt Roper Cc: José Roberto de Souza Cc: Filip Hazubski Cc: Carl Zhang Cc: Effie Yu Cc: Zhengguo Xu Cc: Francois Dugast Reviewed-by: Matt Roper Reviewed-by: José Roberto de Souza Reviewed-by: Pallavi Mishra Signed-off-by: Rodrigo Vivi commit 622f709ca6297d838d9bd8b33196b388909d5951 Author: Pallavi Mishra Date: Fri Aug 11 01:36:43 2023 +0530 drm/xe/uapi: Add support for CPU caching mode Allow userspace to specify the CPU caching mode at object creation. Modify gem create handler and introduce xe_bo_create_user to replace xe_bo_create. In a later patch we will support setting the pat_index as part of vm_bind, where expectation is that the coherency mode extracted from the pat_index must be least 1way coherent if using cpu_caching=wb. v2 - s/smem_caching/smem_cpu_caching/ and s/XE_GEM_CACHING/XE_GEM_CPU_CACHING/. (Matt Roper) - Drop COH_2WAY and just use COH_NONE + COH_AT_LEAST_1WAY; KMD mostly just cares that zeroing/swap-in can't be bypassed with the given smem_caching mode. (Matt Roper) - Fix broken range check for coh_mode and smem_cpu_caching and also don't use constant value, but the already defined macros. (José) - Prefer switch statement for smem_cpu_caching -> ttm_caching. (José) - Add note in kernel-doc for dgpu and coherency modes for system memory. (José) v3 (José): - Make sure to reject coh_mode == 0 for VRAM-only. - Also make sure to actually pass along the (start, end) for __xe_bo_create_locked. v4 - Drop UC caching mode. Can be added back if we need it. (Matt Roper) - s/smem_cpu_caching/cpu_caching. Idea is that VRAM is always WC, but that is currently implicit and KMD controlled. Make it explicit in the uapi with the limitation that it currently must be WC. For VRAM + SYS objects userspace must now select WC. (José) - Make sure to initialize bo_flags. (José) v5 - Make to align with the other uapi and prefix uapi constants with DRM_ (José) v6: - Make it clear that zero cpu_caching is only allowed for kernel objects. (José) v7: (Oak) - With all the changes from the original design, it looks we can further simplify here and drop the explicit coh_mode. We can just infer the coh_mode from the cpu_caching. i.e reject cpu_caching=wb + coh_none. It's one less thing for userspace to maintain so seems worth it. v8: - Make sure to also update the kselftests. Testcase: igt@xe_mmap@cpu-caching Signed-off-by: Pallavi Mishra Co-developed-by: Matthew Auld Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Joonas Lahtinen Cc: Lucas De Marchi Cc: Matt Roper Cc: José Roberto de Souza Cc: Filip Hazubski Cc: Carl Zhang Cc: Effie Yu Cc: Zhengguo Xu Cc: Francois Dugast Cc: Oak Zeng Reviewed-by: José Roberto de Souza Acked-by: Zhengguo Xu Acked-by: Bartosz Dunajski Signed-off-by: Rodrigo Vivi commit 5bb83841a3b9cecc49ae1f02e85909b426a6facc Author: Michal Wajdeczko Date: Wed Nov 15 12:58:16 2023 +0100 drm/xe/kunit: Return number of iterated devices In xe_call_for_each_device() we are already counting number of iterated devices. Lets make that available to the caller too. We will use that functionality in upcoming patches. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231115115816.1993-1-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit fcf98d68c00216b61b034f4d164e5c3074db636a Author: Matthew Auld Date: Mon Nov 27 09:44:59 2023 +0000 drm/xe: fix mem_access for early lrc generation We spawn some hw queues during device probe to generate the default LRC for every engine type, however the queue destruction step is typically async. Queue destruction needs to do stuff like GuC context deregister which requires GuC CT, which in turn requires an active mem_access ref. The caller during probe is meant to hold the mem_access token, however due to the async destruction it might have already been dropped if we are unlucky. Similar to how we already handle migrate VMs for which there is no mem_access ref, fix this by keeping the callers token alive, releasing it only when destroying the queue. We can treat a NULL vm as indication that we need to grab our own extra ref. Fixes the following splat sometimes seen during load: [ 1682.899930] WARNING: CPU: 1 PID: 8642 at drivers/gpu/drm/xe/xe_device.c:537 xe_device_assert_mem_access+0x27/0x30 [xe] [ 1682.900209] CPU: 1 PID: 8642 Comm: kworker/u24:97 Tainted: G U W E N 6.6.0-rc3+ #6 [ 1682.900214] Workqueue: submit_wq xe_sched_process_msg_work [xe] [ 1682.900303] RIP: 0010:xe_device_assert_mem_access+0x27/0x30 [xe] [ 1682.900388] Code: 90 90 90 66 0f 1f 00 0f 1f 44 00 00 53 48 89 fb e8 1e 6c 03 00 48 85 c0 74 06 5b c3 cc cc cc cc 8b 83 28 23 00 00 85 c0 75 f0 <0f> 0b 5b c3 cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 [ 1682.900390] RSP: 0018:ffffc900021cfb68 EFLAGS: 00010246 [ 1682.900394] RAX: 0000000000000000 RBX: ffff8886a96d8000 RCX: 0000000000000000 [ 1682.900396] RDX: 0000000000000001 RSI: ffff8886a6311a00 RDI: ffff8886a96d8000 [ 1682.900398] RBP: ffffc900021cfcc0 R08: 0000000000000001 R09: 0000000000000000 [ 1682.900400] R10: ffffc900021cfcd0 R11: 0000000000000002 R12: 0000000000000004 [ 1682.900402] R13: 0000000000000000 R14: ffff8886a6311990 R15: ffffc900021cfd74 [ 1682.900405] FS: 0000000000000000(0000) GS:ffff888829880000(0000) knlGS:0000000000000000 [ 1682.900407] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1682.900409] CR2: 000055f70bad3fb0 CR3: 000000025243a004 CR4: 00000000003706e0 [ 1682.900412] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1682.900413] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1682.900415] Call Trace: [ 1682.900418] [ 1682.900420] ? xe_device_assert_mem_access+0x27/0x30 [xe] [ 1682.900504] ? __warn+0x85/0x170 [ 1682.900510] ? xe_device_assert_mem_access+0x27/0x30 [xe] [ 1682.900596] ? report_bug+0x171/0x1a0 [ 1682.900604] ? handle_bug+0x3c/0x80 [ 1682.900608] ? exc_invalid_op+0x17/0x70 [ 1682.900612] ? asm_exc_invalid_op+0x1a/0x20 [ 1682.900621] ? xe_device_assert_mem_access+0x27/0x30 [xe] [ 1682.900706] ? xe_device_assert_mem_access+0x12/0x30 [xe] [ 1682.900790] guc_ct_send_locked+0xb9/0x1550 [xe] [ 1682.900882] ? lock_acquire+0xca/0x2b0 [ 1682.900885] ? guc_ct_send+0x3c/0x1a0 [xe] [ 1682.900977] ? lock_is_held_type+0x9b/0x110 [ 1682.900984] ? __mutex_lock+0xc0/0xb90 [ 1682.900989] ? __pfx___drm_printfn_info+0x10/0x10 [ 1682.900999] guc_ct_send+0x53/0x1a0 [xe] [ 1682.901090] ? __lock_acquire+0xf22/0x21b0 [ 1682.901097] ? process_one_work+0x1a0/0x500 [ 1682.901109] xe_guc_ct_send+0x19/0x50 [xe] [ 1682.901202] set_min_preemption_timeout+0x75/0xa0 [xe] [ 1682.901294] disable_scheduling_deregister+0x55/0x250 [xe] [ 1682.901383] ? xe_sched_process_msg_work+0x76/0xd0 [xe] [ 1682.901467] ? lock_release+0xc9/0x260 [ 1682.901474] xe_sched_process_msg_work+0x82/0xd0 [xe] [ 1682.901559] process_one_work+0x20a/0x500 v2: Add the splat Signed-off-by: Matthew Auld Cc: Vinay Belgaumkar Cc: Matthew Brost Cc: Rodrigo Vivi Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 5152234e2e7a1d5b0897733f84597df23cde98b1 Author: Daniele Ceraolo Spurio Date: Fri Nov 17 14:51:52 2023 -0800 drm/xe/gsc: Define GSC FW for MTL We track GSC FW based on its compatibility version, which is what determines the interface it supports. Also add a modparam override like the ones for GuC and HuC. v2: fix module param description (John) Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit 9897eb855544f0ef0921a5cc4517deb1fcf06c6f Author: Daniele Ceraolo Spurio Date: Fri Nov 17 14:51:51 2023 -0800 drm/xe/gsc: Define GSCCS for MTL Add the GSCCS to the media_xelpmp engine list. Note that since the GSCCS is only used with the GSC FW, we can consider it disabled if we don't have the FW available. v2: mark GSCCS as allowed on the media IP in kunit tests Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit 0881cbe04077785f98496c236386099d20854ad7 Author: Daniele Ceraolo Spurio Date: Fri Nov 17 14:51:50 2023 -0800 drm/xe/gsc: Query GSC compatibility version The version is obtained via a dedicated MKHI GSC HECI command. The compatibility version is what we want to match against for the GSC, so we need to call the FW version checker after obtaining the version. Since this is the first time we send a GSC HECI command via the GSCCS, this patch also introduces common infrastructure to send such commands to the GSC. Communication with the GSC FW is done via input/output buffers, whose addresses are provided via a GSCCS command. The buffers contain a generic header and a client-specific packet (e.g. PXP, HDCP); the clients don't care about the header format and/or the GSCCS command in the batch, they only care about their client-specific header. This patch therefore introduces helpers that allow the callers to automatically fill in the input header, submit the GSCCS job and decode the output header, to make it so that the caller only needs to worry about their client-specific input and output messages. v3: squash of 2 separate patches ahead of merge, so that the common functions and their first user are added at the same time Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: Suraj Kandpal Cc: John Harrison Reviewed-by: John Harrison #v1 Reviewed-by: Suraj Kandpal Signed-off-by: Rodrigo Vivi commit f63182b45d67e1ff1e9c65f08adb4d803a5d861f Author: Daniele Ceraolo Spurio Date: Fri Nov 17 14:51:49 2023 -0800 drm/xe/gsc: Trigger a driver flr to cleanup the GSC on unload GSC is only killed by an FLR, so we need to trigger one on unload to make sure we stop it. This is because we assign a chunk of memory to the GSC as part of the FW load, so we need to make sure it stops using it when we release it to the system on driver unload. Note that this is not a problem of the unload per-se, because the GSC will not touch that memory unless there are requests for it coming from the driver; therefore, no accesses will happen while Xe is not loaded, but if we re-load the driver then the GSC might wake up and try to access that old memory location again. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit aae84bf1cd96889a7d80b6b50131f60aa63899d7 Author: Daniele Ceraolo Spurio Date: Fri Nov 17 14:51:48 2023 -0800 drm/xe/gsc: Implement WA 14015076503 When the GSC FW is loaded, we need to inform it when a GSCCS reset is coming and then wait 200ms for it to get ready to process the reset. v2: move WA code to GSC file, use variable in Makefile (John) Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit dd0e89e5edc20d3875ed7ded48e7e97118cdfbc8 Author: Daniele Ceraolo Spurio Date: Fri Nov 17 14:51:47 2023 -0800 drm/xe/gsc: GSC FW load The GSC FW must be copied in a 4MB stolen memory allocation, whose GGTT address is then passed as a parameter to a dedicated load instruction submitted via the GSC engine. Since the GSC load is relatively slow (up to 250ms), we perform it asynchronously via a worker. This requires us to make sure that the worker has stopped before suspending/unloading. Note that we can't yet use xe_migrate_copy for the copy because it doesn't work with stolen memory right now, so we do a memcpy from the CPU side instead. v2: add comment about timeout value, fix GSC status checking before load (John) Bspec: 65306, 65346 Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit 985d5a49e8454d64a01ab362e9091788eeed1839 Author: Daniele Ceraolo Spurio Date: Fri Nov 17 14:51:46 2023 -0800 drm/xe/gsc: Parse GSC FW header The GSC blob starts with a layout header, from which we can move to the boot directory, which in turns allows us to find the CPD. The CPD uses the same format as the one in the HuC binary, so we can re-use the same parsing code to get to the manifest, which contains the release and security versions of the FW. v2: Fix comments in struct definition (John) Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Cc: Lucas De Marchi Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit 0d1caff4a367e0cbc28622fab7e39576bac82bb9 Author: Daniele Ceraolo Spurio Date: Fri Nov 17 14:51:45 2023 -0800 drm/xe/gsc: Introduce GSC FW Add the basic definitions and init function. Same as HuC, GSC is only supported on the media GT on MTL and newer platforms. Note that the GSC requires submission resources which can't be allocated during init (because we don't have the hwconfig yet), so it can't be marked as loadable at the end of the init function. The allocation of those resources will come in the patch that makes use of them to load the FW. v2: better comment, move num FWs define inside the enum (John) Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit 2e7227b4b733223a0a5b6a7a2685c7ff089c21c5 Author: Daniele Ceraolo Spurio Date: Fri Nov 17 14:51:44 2023 -0800 drm/xe/uc: Rework uC version tracking The GSC firmware, support for which is coming soon for Xe, has both a release version (updated on every release) and a compatibility version (update only on interface changes). The GuC has something similar, with a global release version and a submission version (which is also known as the VF compatibility version). The main difference is that for the GuC we still want to check the driver requirement against the release version, while for the GSC we'll need to check against the compatibility version. Instead of special casing the GSC, this patch reworks the FW logic so that we store both versions at the uc_fw level for all binaries and we allow checking against either of the versions. Initially, we'll use it to support GSC, but the logic could be re-used to allow VFs to check against the GuC compatibility version. Note that the GSC version has 4 numbers (major, minor, hotfix, build), so support for that has been added as part of the rework and will be used in follow-up patches. Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Michal Wajdeczko Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit adce1b393f90c349820cb0cb907f94ce9b3a4485 Author: Bommithi Sakeena Date: Fri Nov 17 16:06:18 2023 +0000 drm/xe: Encapsulate all the module parameters Encapsulate all the module parameters in one single global struct variable. This also removes the extra xe_module.h from includes. v2: naming consistency as suggested by Jani and Lucas v3: fix checkpatch errors/warnings v4: adding blank line after struct declaration Cc: Jani Nikula Cc: Lucas De Marchi Signed-off-by: Bommithi Sakeena Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit a409901f516cf5e25180d98a510708013b33b8ee Author: Tejas Upadhyay Date: Mon Nov 20 10:51:45 2023 +0530 drm/xe/xe2: Add workaround 14020013138 This workaround applies to Xe2_LPG A0 V3: - Apply rule RENDER class V2(Matt): - Apply WA in lrc context Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit f91bacce8dbb5dcb395e1ab9750977fa70ad485e Author: Matt Roper Date: Mon Nov 27 11:03:33 2023 -0800 drm/xe/dg2: Drop Wa_22014600077 The workaround database has been updated to drop this workaround for all DG2 variants. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20231127190332.4099519-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 812ec747a354e00f5e789f3cdcfbc80f98f1d71d Author: Lucas De Marchi Date: Tue Nov 21 11:52:09 2023 -0800 drm/xe: Sync MTL PCI IDs with i915 For Xe1 platforms, it's better to follow the way i915 adds the PCI IDs to the header, so it's easier to catch up when there is an update. This brings the same logic applied in commit 2e3c369f23a7 ("drm/i915/mtl: Eliminate subplatforms") to the equivalent xe header. The end result of this header for Xe1 platforms is now in sync with i915 as of commit 5032c607e886 ("drm/i915: ATS-M device ID update"). This can be seen by $ git show 5032c607e886:include/drm/i915_pciids.h > a.h $ git diff --color-words --no-index a.h include/drm/xe_pciids.h Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231121195209.802235-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit fdb6a05383fab3952c9a56ac716e460134990a69 Author: Thomas Hellström Date: Mon Nov 27 13:33:49 2023 +0100 drm/xe: Internally change the compute_mode and no_dma_fence mode naming The name "compute_mode" can be confusing since compute uses either this mode or fault_mode to achieve the long-running semantics, and compute_mode can, moving forward, enable fault_mode under the hood to work around hardware limitations. Also the name no_dma_fence_mode really refers to what we elsewhere call long-running mode and the mode contrary to what its name suggests allows dma-fences as in-fences. So in an attempt to be more consistent, rename no_dma_fence_mode -> lr_mode compute_mode -> preempt_fence_mode And adjust flags so that preempt_fence_mode sets XE_VM_FLAG_LR_MODE fault_mode sets XE_VM_FLAG_LR_MODE | XE_VM_FLAG_FAULT_MODE v2: - Fix a typo in the commit message (Oak Zeng) Signed-off-by: Thomas Hellström Reviewed-by: Oak Zeng Link: https://patchwork.freedesktop.org/patch/msgid/20231127123349.23698-1-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit d2f51c50b941f89850c9a9561486938b71c0b9f8 Author: Thomas Hellström Date: Fri Nov 24 16:33:45 2023 +0100 drm/xe/vm: Fix ASID XA usage xa_alloc_cyclic() returns 1 on successful allocation, if wrapping occurs, but the code incorrectly treats that as an error. Fix that. Also, xa_alloc_cyclic() requires xa_init_flags(..., XA_FLAGS_ALLOC), so fix that, and assuming we don't want a zero ASID, instead of using XA_FLAGS_ALLOC1, adjust the xa limits at alloc_cyclic time. v2: - On CONFIG_DRM_XE_DEBUG, Initialize the cyclic ASID allocation in such a way that the next allocated ASID will be the maximum one, and the one following will cause an ASID wrap, (all to have CI test high ASIDs and ASID wraps). v3: - Stricter return value checking from xa_alloc_cyclic() (Matthew Auld) Suggested-by: Ohad Sharabi Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/946 Signed-off-by: Thomas Hellström Reviewed-by: Ohad Sharabi #v1 Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20231124153345.97385-5-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit e7c9e049e0ad256214d8c50454e7289174ffa33b Author: Thomas Hellström Date: Wed Nov 22 12:03:58 2023 +0100 drm/xe/bo: Remove leftover trace_printk() trace_printk() is not intended for production code. Remove it. Suggested-by: Ohad Sharabi Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/946 Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Reviewed-by: Ohad Sharabi Link: https://patchwork.freedesktop.org/patch/msgid/20231122110359.4087-4-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit a21fe5ee598109793546b67a32398076ddea2660 Author: Thomas Hellström Date: Wed Nov 22 12:03:57 2023 +0100 drm/xe/bo: Rename xe_bo_get_sg() to xe_bo_sg() Using "get" typically refers to obtaining a refcount, which we don't do here so rename to xe_bo_sg(). Suggested-by: Ohad Sharabi Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/946 Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Reviewed-by: Ohad Sharabi Link: https://patchwork.freedesktop.org/patch/msgid/20231122110359.4087-3-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 8c54ee8a8606a453a2c907989372aa6f004b7bec Author: Thomas Hellström Date: Thu Nov 23 16:31:55 2023 +0100 drm/xe: Ensure that we don't access the placements array out-of-bounds Ensure, using xe_assert that the various try_add_ functions don't access the bo placements array out-of-bounds. v2: - Remove the places argument to make sure the xe_assert operates on the array we're actually populating. (Matthew Auld) Suggested-by: Ohad Sharabi Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/946 Signed-off-by: Thomas Hellström Reviewed-by: Ohad Sharabi #v1 Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20231123153158.12779-2-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 2475ac27df597679ca0426d358877d6f1483d50f Author: Michal Wajdeczko Date: Wed Nov 15 08:38:04 2023 +0100 drm/xe: Print virtualization mode during probe We already print some basic information about the device, add virtualization information, until we expose that elsewhere. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231115073804.1861-3-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit 13e5c32c849ace3dd0af9049fc19ce910591db8b Author: Michal Wajdeczko Date: Wed Nov 15 08:38:03 2023 +0100 drm/xe: Prepare for running in different SR-IOV modes We will be adding support for the SR-IOV and driver might be then running, in addition to existing non-virtualized bare-metal mode, also in Physical Function (PF) or Virtual Function (VF) mode. Since these additional modes require some changes to the driver, define enum flag to represent different SR-IOV modes and add a function where we will detect the actual mode in the runtime. We start with a forced bare-metal mode as it is sufficient to enable basic functionality and ensures no impact to existing code. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231115073804.1861-2-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit d6d14854ddf362633fbcf050ce19bd0d7b0d9a3a Author: Michal Wajdeczko Date: Wed Nov 15 08:38:02 2023 +0100 drm/xe: Add device flag to indicate SR-IOV support The Single Root I/O Virtualization (SR-IOV) extension to the PCI Express (PCIe) specification suite is supported starting from 12th generation of Intel Graphics processors. Add a device flag that we will use to enable SR-IOV specific code paths and to indicate our readiness to support SR-IOV. We will enable this flag for the specific platforms once all required changes and additions will be ready and merged. Bspec: 52391 Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231115073804.1861-1-michal.wajdeczko@intel.com Signed-off-by: Michal Wajdeczko Signed-off-by: Rodrigo Vivi commit 8bfbe174d7fabf4c6d26e90a133b3129c4e98cbe Author: Tejas Upadhyay Date: Thu Nov 23 16:09:00 2023 +0530 drm/xe/xe2: Add workaround 14019449301 This workaround applies to Xe2_LPM V3(MattR): - Reorder reg and wa placement - Add base parameter to reg macro for better definition V2(MattR): - Change name of register - Loop for all engines - Driver permanent WA, applies to all steps Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit f25d8291aca1ccfb0118ec4c0e98f6301bff15ec Author: Tejas Upadhyay Date: Thu Nov 23 16:12:11 2023 +0530 drm/xe/xe2: Add workaround 16021867713 This workaround applies to Xe2_LPM as well Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 11ea758c145f8340d5ffd7b3831c2bd0e98f8024 Author: Tejas Upadhyay Date: Mon Nov 20 16:41:25 2023 +0530 drm/xe/xe2: Add workaround 14017421178 This workaround applies to Xe2_LPM Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit b3f0654f55859cfcd87d4ea5440247451902924b Author: Gustavo Sousa Date: Thu Nov 16 18:40:00 2023 -0300 drm/xe/mmio: Make xe_mmio_wait32() aware of interrupts With the current implementation, a preemption or other kind of interrupt might happen between xe_mmio_read32() and ktime_get_raw(). Such an interruption (specially in the case of preemption) might be long enough to cause a timeout without giving a chance of a new check on the register value on a next iteration, which would have happened otherwise. This issue causes some sporadic timeouts in some code paths. As an example, we were experiencing some rare timeouts when waiting for PLL unlock for C10/C20 PHYs (see intel_cx0pll_disable()). After debugging, we found out that the PLL unlock was happening within the expected time period (20us), which suggested a bug in xe_mmio_wait32(). To fix the issue, ensure that we do a last check out of the loop if necessary. This change was tested with the aforementioned PLL unlocking code path. Experiments showed that, before this change, we observed reported timeouts in 54 of 5000 runs; and, after this change, no timeouts were reported in 5000 runs. v2: - Prefer an implementation without a barrier (v1 switched the order of xe_mmio_read32() and ktime_get_raw() calls and added a barrier() in between). (Lucas, Rodrigo) Cc: Rodrigo Vivi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231116214000.70573-3-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit 5c09bd6ccd418f9dc221fd2544d613e3180b928e Author: Gustavo Sousa Date: Thu Nov 16 18:39:59 2023 -0300 drm/xe/mmio: Move xe_mmio_wait32() to xe_mmio.c This function is big enough, let's move it to a shared compilation unit. While at it, document it. Here is the output of running bloat-o-metter on the new and old module (execution provided by Lucas): $ ./scripts/bloat-o-meter build64/drivers/gpu/drm/xe/xe.ko{.old,} add/remove: 2/0 grow/shrink: 0/58 up/down: 554/-15645 (-15091) (...) # Lines in between omitted Total: Before=2181322, After=2166231, chg -0.69% The overall reduction in the size is not that significant. Nevertheless, keeping the function as inline arguably does not bring too much benefit as well. As noted by Lucas, we would probably benefit from an inline function that did the fast-path check: do an optimistic first check before entering the wait-logic, which itself would go to a compilation unit. We might come back to implement this in the future if we have data to justify it. v2: - Add note in documentation for @timeout_us regarding the exponential backoff strategy. (Lucas) - Share output of bloat-o-meter in the commit message. (Lucas) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231116214000.70573-2-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit a6a4ea6d7d37cea9132e67a4d3321a455a6b0736 Author: Ruthuvikas Ravikumar Date: Fri Nov 17 03:21:52 2023 +0530 drm/xe: Add mocs kunit This kunit verifies the hardware values of mocs and l3cc registers with the KMD programmed values. v14: Fix CHECK. v13: Remove ret after forcewake. v11: Add KUNIT_ASSERT_EQ_MSG for Forcewake. v9/v10: Add Forcewake Fail. v8: Remove xe_bo.h and xe_pm.h Remove mocs and l3cc from live_mocs. Pull debug and err msg for mocs/l3cc out of if else block. Add HAS_LNCF_MOCS. v7: correct checkpath v6: Change ssize_t type. Change forcewake domain to XE_FW_GT. Update change of MOCS registers are multicast on Xe_HP and beyond patch. v5: Release forcewake. Remove single statement braces. Fix debug statements. v4: Drop stratch and vaddr. Fix debug statements. Fix indentation. v3: Fix checkpath. v2: Fix checkpath. Cc: Aravind Iddamsetty Cc: Mathew D Roper Reviewed-by: Mathew D Roper Signed-off-by: Ruthuvikas Ravikumar Link: https://lore.kernel.org/r/20231116215152.2248859-1-ruthuvikas.ravikumar@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 1d425066f15faa6965fa6361da4c52e4020fd8d0 Author: Lucas De Marchi Date: Mon Nov 20 14:19:04 2023 -0800 drm/xe: Fix modpost warning on kunit modules When built with W=1, the following warnings show up on modpost: MODPOST drivers/gpu/drm/xe/Module.symvers WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/xe/tests/xe_bo_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/xe/tests/xe_dma_buf_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/xe/tests/xe_migrate_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/xe/tests/xe_pci_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/xe/tests/xe_rtp_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpu/drm/xe/tests/xe_wa_test.o Add the module description for each of these to fix the warning. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20231120221904.695630-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 1a3d4d76bacee545c620f5935a5bf4677ad88d4c Author: Haridhar Kalvala Date: Mon Nov 20 12:25:07 2023 +0530 drm/xe: ATS-M device ID update ATS-M device ID update. BSpec: 44477 Signed-off-by: Haridhar Kalvala Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231120065507.1543676-1-haridhar.kalvala@intel.com Signed-off-by: Rodrigo Vivi commit 1bec833316fffa110259093671d27be137be454d Author: José Roberto de Souza Date: Mon Nov 20 10:00:35 2023 -0800 drm/xe: Add missing RPL and ADL Those are ids present in i915 but missing in Xe. Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit baf9089c800c46f224f14e2a681ba3a7c1b09374 Author: José Roberto de Souza Date: Fri Nov 17 09:29:28 2023 -0800 drm/xe: Include RPL-U to pciidlist RPL-U is defined as a subplatform but those PCI ids were not included in pciidlist so Xe KMD would never probe device with those ids. This is following what i915 does to include RPL-U to PCI ids probe list. v2: - change order to match i915 Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 40709aa761acbc78fe6c0405720d79cbf8345095 Author: Matthew Brost Date: Mon Nov 20 12:08:48 2023 -0800 drm/xe: Only set xe_vma_op.map fields for GPUVA map operations DRM_XE_VM_BIND_OP_MAP_* IOCTL operations can result in GPUVA unmap, remap, or map operations in vm_bind_ioctl_ops_create. The xe_vma_op.map fields are blindly set which is incorrect for GPUVA unmap or remap operations. Fix this by only setting xe_vma_op.map for GPUVA map operations. Also restructure a bit vm_bind_ioctl_ops_create to make the code a bit more readable. Reported-by: Dafna Hirschfeld Signed-off-by: Matthew Brost Reviewed-by: Brian Welty Signed-off-by: Rodrigo Vivi commit 0bc519d20ffa7a450bfa21c644c2de95ae8027dc Author: Lucas De Marchi Date: Fri Nov 17 09:40:49 2023 -0800 drm/xe: Remove GEN[0-9]*_ prefixes After noticing in logs there were still mentions to GEN6 registers, it was clear commit d9b79ad275e7 ("drm/xe: Drop gen afixes from registers") didn't take care of all the afixes. Some were added later, but there are also constants and strings still using that. Continue the cleanup removing the remaining ones. To keep it consistent with code nearby, a few other changes are made: - Remove prefix in INTEL_LEGACY_64B_CONTEXT - Remove GEN8_CTX_L3LLC_COHERENT since it's unused - Rename GEN9_FREQ_SCALER to GT_FREQUENCY_SCALER v2: Use XELP_ as prefix for NUM_MOCS_ENTRIES and remove changes to MOCS_ENTRIES as this is now done as part of a previous commit (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231117174049.527192-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 4399e95102edfceb7a7dd7eb72cd27b776e7d38b Author: Lucas De Marchi Date: Fri Nov 17 09:40:48 2023 -0800 drm/xe/mocs: Bring comment about mocs back to reality The mocs documentation was copied from i915 and doesn't match the reality in xe. Reword it so it matches what the code is doing. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231117174049.527192-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 8735f8616d65816fd80a4958e570d8f448a6590f Author: Lucas De Marchi Date: Fri Nov 17 09:40:47 2023 -0800 drm/xe: Fold GEN11_MOCS_ENTRIES into gen12_mocs_desc GEN11_MOCS_ENTRIES dates back from importing the table from the i915 module. The macro was used so the it could be maintained in a single place and platforms would just override with additional entries. With the platforms supported by xe, each of them is just defining individual tables without re-using this define. Move it inside gen12_mocs_desc that is the only user. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231117174049.527192-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit e7b4ebd7c6b3d25557aa83b43c3497e31ac89101 Author: Matthew Auld Date: Mon Oct 9 10:00:38 2023 +0100 drm/xe/bo: don't hold dma-resv lock over drm_gem_handle_create This seems to create a locking inversion with object_name_lock. The lock is held by drm_prime_fd_to_handle when calling our xe_gem_prime_import hook, which might eventually go on to grab the dma-resv lock during the attach. However we also have the opposite locking order in xe_gem_create_ioctl which is holding the dma-resv lock when calling drm_gem_handle_create, which wants to eventually grab object_name_lock: -> #1 (reservation_ww_class_mutex){+.+.}-{3:3}: <4> [635.739288] lock_acquire+0x169/0x3d0 <4> [635.739294] __ww_mutex_lock.constprop.0+0x164/0x1e60 <4> [635.739300] ww_mutex_lock_interruptible+0x42/0x1a0 <4> [635.739305] drm_gem_shmem_pin+0x4b/0x140 [drm_shmem_helper] <4> [635.739317] dma_buf_dynamic_attach+0x101/0x430 <4> [635.739323] xe_gem_prime_import+0xcc/0x2e0 [xe] <4> [635.739499] drm_prime_fd_to_handle_ioctl+0x184/0x2e0 [drm] <4> [635.739594] drm_ioctl_kernel+0x16f/0x250 [drm] <4> [635.739693] drm_ioctl+0x35e/0x620 [drm] <4> [635.739789] __x64_sys_ioctl+0xb7/0xf0 <4> [635.739794] do_syscall_64+0x3c/0x90 <4> [635.739799] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 <4> [635.739805] -> #0 (&dev->object_name_lock){+.+.}-{3:3}: <4> [635.739813] check_prev_add+0x1ba/0x14a0 <4> [635.739818] __lock_acquire+0x203e/0x2ff0 <4> [635.739823] lock_acquire+0x169/0x3d0 <4> [635.739827] __mutex_lock+0x124/0x1310 <4> [635.739832] drm_gem_handle_create+0x32/0x50 [drm] <4> [635.739927] xe_gem_create_ioctl+0x1d3/0x550 [xe] <4> [635.740102] drm_ioctl_kernel+0x16f/0x250 [drm] <4> [635.740197] drm_ioctl+0x35e/0x620 [drm] <4> [635.740293] __x64_sys_ioctl+0xb7/0xf0 <4> [635.740297] do_syscall_64+0x3c/0x90 <4> [635.740302] entry_SYSCALL_64_after_hwframe+0x6e/0xd8 <4> [635.740307] It looks like it should be safe to simply drop the dma-resv lock prior to publishing the object when calling drm_gem_handle_create. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/743 Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Rodrigo Vivi Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit cac74742faea603b288592be118b4f100ed2c863 Author: Michal Wajdeczko Date: Thu Nov 16 16:12:42 2023 +0100 drm/xe/guc: Use valid scratch register for posting read There are only 4 scratch registers VF_SW_FLAG(0..3) on each GuC. We shouldn't use non-existing register VF_SW_FLAG(4) for posting read. Signed-off-by: Michal Wajdeczko Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 1d087cb7d81f9a17760154eef5ac8b894428cdbe Author: Michal Wajdeczko Date: Thu Nov 16 16:12:41 2023 +0100 drm/xe/guc: Fix handling of GUC_HXG_TYPE_NO_RESPONSE_BUSY If GuC responds with the NO_RESPONSE_BUSY message, we extend our timeout while waiting for the actual response, but we wrongly assumed that the next message will be RESPONSE_SUCCESS, missing that we still can get RESPONSE_FAILURE. Change the condition for the expected message type, using only common bits from RESPONSE_SUCCESS and RESPONSE_FAILURE (as they differ, by ABI design, only by the last bit). v2: add comment/checks to the code (Matt) Signed-off-by: Michal Wajdeczko Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit cd1c9c54c34b3a2540fdf49eafd49a61747a6342 Author: Michal Wajdeczko Date: Thu Nov 16 16:12:40 2023 +0100 drm/xe/guc: Copy response data from proper registers While copying GuC response from the scratch registers to the buffer, formula to identify next scratch register is broken. Fix it. Signed-off-by: Michal Wajdeczko Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 4a9b7d29c117fc6e49690728f35b6a16454556f2 Author: Michal Wajdeczko Date: Thu Nov 16 16:12:39 2023 +0100 drm/xe/guc: Fix wrong assert about full_len This variable holds full length of the message, including header length so it should be checked against GUC_CTB_MSG_MAX_LEN. Signed-off-by: Michal Wajdeczko Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 32dd40fb48c56265ab08d379fecb8bbf62e3c427 Author: Matt Roper Date: Wed Nov 15 10:30:30 2023 -0800 drm/xe/dg2: Wa_18028616096 now applies to all DG2 The workaround database was just updated to extend this workaround to DG2-G11 (whereas previously it applied only to G10 and G12). Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20231115183029.2649992-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit aaa115ffaa467782b01cfa81711424315823bdb5 Author: Rodrigo Vivi Date: Tue Nov 14 13:34:34 2023 +0000 drm/xe/uapi: Be more specific about the vm_bind prefetch region Let's bring a bit of clarity on this 'region' field that is part of vm_bind operation struct. Rename and document to make it more than obvious that it is a region instance and not a mask and also that it should only be used with the prefetch operation itself. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matt Roper commit 4a349c86110a6fab26ce5f4fcb545acf214efed5 Author: Rodrigo Vivi Date: Tue Nov 14 13:34:33 2023 +0000 drm/xe/uapi: Differentiate WAIT_OP from WAIT_MASK On one hand the WAIT_OP represents the operation use for waiting such as ==, !=, > and so on. On the other hand, the mask is applied to the value used for comparision. Split those two to bring clarity to the uapi. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matt Roper commit 9ad743515cc59275653f719886d1b93fa7a824ab Author: Rodrigo Vivi Date: Tue Nov 14 13:34:32 2023 +0000 drm/xe/uapi: Standardize the FLAG naming and assignment Only cosmetic things. No functional change on this patch. Define every flag with (1 << n) and use singular FLAG name. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost commit b02606d32376b8d51b33211f8c069b16165390eb Author: Rodrigo Vivi Date: Tue Nov 14 13:34:31 2023 +0000 drm/xe/uapi: Rename query's mem_usage to mem_regions 'Usage' gives an impression of telemetry information where someone would query to see how the memory is currently used and available size, etc. However this API is more than this. It is about a global view of all the memory regions available in the system and user space needs to have this information so they can then use the mem_region masks that are returned for the engine access. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matt Roper Reviewed-by: José Roberto de Souza commit 45c30d80008264d55915f4b87c6f9bbb3261071c Author: Rodrigo Vivi Date: Tue Nov 14 13:34:30 2023 +0000 drm/xe/uapi: Rename *_mem_regions masks - 'native' doesn't make much sense on integrated devices. - 'slow' is not necessarily true and doesn't go well with opposition to 'native'. Instead, let's use 'near' vs 'far'. It makes sense with all the current Intel GPUs and it is future proof. Right now, there's absolutely no need to define among the 'far' memory, which ones are slower, either in terms of latency, nunmber of hops or bandwidth. In case of this might become a requirement in the future, a new query could be added to indicate the certain 'distance' between a given engine and a memory_region. But for now, this fulfill all of the current requirements in the most straightforward way for the userspace drivers. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matt Roper Reviewed-by: José Roberto de Souza commit 5ca2c4b800194b55a863882273b8ca34b56afb35 Author: Francois Dugast Date: Tue Nov 14 13:34:29 2023 +0000 drm/xe/uapi: Change rsvd to pad in struct drm_xe_class_instance Change rsvd to pad in struct drm_xe_class_instance to prevent the field from being used in future. v2: Change from fixup to regular commit because this touches the uAPI (Francois Dugast) Signed-off-by: Umesh Nerlige Ramappa Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 3ac4a7896d1c02918ee76acaf7e8160f3d11fa75 Author: Francois Dugast Date: Tue Nov 14 13:34:28 2023 +0000 drm/xe/uapi: Add _FLAG to uAPI constants usable for flags Most constants defined in xe_drm.h which can be used for flags are named DRM_XE_*_FLAG_*, which is helpful to identify them. Make this systematic and add _FLAG where it was missing. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit d5dc73dbd148ef38dbe35f18d2908d2ff343c208 Author: Francois Dugast Date: Tue Nov 14 13:34:27 2023 +0000 drm/xe/uapi: Add missing DRM_ prefix in uAPI constants Most constants defined in xe_drm.h use DRM_XE_ as prefix which is helpful to identify the name space. Make this systematic and add this prefix where it was missing. v2: - fix vertical alignment of define values - remove double DRM_ in some variables (José Roberto de Souza) v3: Rebase Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit b646ce9ce99f74d3dee8fd56303b9255d3c278ec Author: Brian Welty Date: Mon Nov 13 16:49:43 2023 -0800 drm/xe: Make xe_mmio_tile_vram_size() static During xe_mmio_probe_vram(), we already store the values returned from xe_mmio_tile_vram_size() into the xe_tile structures. There is no need to call xe_mmio_tile_vram_size() again later during setup of the STOLEN region. Just use the values stored in the root tile. Signed-off-by: Brian Welty Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit be13336e07b5cc26c8b971a50ff6dc60d7050417 Author: Aravind Iddamsetty Date: Fri Nov 10 15:41:56 2023 +0000 drm/xe/pmu: Drop interrupt pmu event Drop interrupt event from PMU as that is not useful and not being used by any UMD. Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Francois Dugast Signed-off-by: Aravind Iddamsetty Reviewed-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit 60f3c7fc5c2464f73a7d64a4cc2dd4707a0d1831 Author: Francois Dugast Date: Fri Nov 10 15:41:55 2023 +0000 drm/xe/uapi: Remove unused QUERY_CONFIG_GT_COUNT As part of uAPI cleanup, remove this constant which is not used. Number of GTs are provided as num_gt in drm_xe_query_gt_list. Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 4195e5e5e3d544a90a1edac1e21cd53a5117bd1f Author: Francois Dugast Date: Fri Nov 10 15:41:54 2023 +0000 drm/xe/uapi: Remove unused QUERY_CONFIG_MEM_REGION_COUNT As part of uAPI cleanup, remove this constant which is not used. Memory regions can be queried with DRM_XE_DEVICE_QUERY_MEM_USAGE. Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 34f0cf6dc4c79a915c7e1022f232f592bfa6c078 Author: Francois Dugast Date: Fri Nov 10 15:41:53 2023 +0000 drm/xe/uapi: Remove unused inaccessible memory region This is not used and also the negative of the other 2 regions: native_mem_regions and slow_mem_regions. Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit ddfa2d6a846a571edb4dc6ed29d94b38558ae088 Author: Rodrigo Vivi Date: Fri Nov 10 15:41:52 2023 +0000 drm/xe/uapi: Kill VM_MADVISE IOCTL Remove unused IOCTL. Without any userspace using it we need to remove before we can be accepted upstream. At this point we are breaking the compatibility for good, so we don't need to break when we are in-tree. So, let's also use this breakage to sort out the IOCTL entries and fix all the small indentation and line issues. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza commit 1a912c90a278177423128e5b82673575821d0c35 Author: Rodrigo Vivi Date: Fri Nov 10 15:41:51 2023 +0000 drm/xe/uapi: Remove GT_TYPE_REMOTE With the split between tile and gt, this is currently unused. Also it is bringing confusion because main vs remote would be more a concept of the tile itself and not about GT. So, the MAIN one is the traditional GT used for every operation in older platforms, and for render/graphics and compute on platforms that contains the stand-alone Media GT. Cc: Matt Roper Cc: Francois Dugast Cc: Carl Zhang Cc: José Roberto de Souza Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza commit de84aa96e4427125d00af1706b59584b2cbb0085 Author: Francois Dugast Date: Fri Nov 10 15:41:50 2023 +0000 drm/xe/uapi: Remove useless XE_QUERY_CONFIG_NUM_PARAM num_params can be used to retrieve the size of the info array for the specific version of the kernel being used. v2: Also remove XE_QUERY_CONFIG_NUM_PARAM (José Roberto de Souza) Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 3d78923bd07ad99a33b06eaa69194b35ac1637f1 Author: Michal Wajdeczko Date: Wed Nov 15 15:15:23 2023 +0100 drm/xe/guc: Promote guc_to_gt/xe helpers to .h Duplicating these helpers in almost every .c file is a bad idea. Define them as inlines in .h file to allow proper reuse. Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Jani Nikula Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 216d62bb241a73b43dc89f67cdb60304f032956c Author: Juha-Pekka Heikkila Date: Thu Oct 12 16:52:09 2023 +0300 drm/xe/display: Add writing of remapped dpt Xe need to use remapped display page table for tiled framebuffers on anywhere else than DG2. Here add function to write such dpt and enable usage of remapped display page tables where needed. Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Michael J. Ruhl Signed-off-by: Rodrigo Vivi commit ff180adfb923b2619f6a46c5a369d833b543a9f1 Author: Juha-Pekka Heikkila Date: Thu Oct 12 16:52:08 2023 +0300 drm/xe/display: Don't try to use vram if not available Trying to get bo from vram when vram not available will cause WARN_ON() hence avoid touching vram if not available. Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Michael J. Ruhl Signed-off-by: Rodrigo Vivi commit 95ab70f134d837a566f2d998b3090f40227a1b60 Author: Suraj Kandpal Date: Mon Oct 16 14:31:41 2023 +0530 drm/xe/hdcp: Define intel_hdcp_gsc_check_status in Xe Define intel_hdcp_gsc_check_status in Xe to account for changes in i915 and Xe. intel_hdcp_check_status always returns false as gsc cs interface is not yet ported. intel_hdcp_gsc_cs_required always returns true as going forward gsc cs will always be required by upcoming platforms --v5 -Define intel_hdcp_gsc_cs_required() --v6 -Explain reasons for the return values [Chaitanya] Signed-off-by: Suraj Kandpal Reviewed-by: Chaitanya Kumar Borah Signed-off-by: Rodrigo Vivi commit c79802d100d1dd8b1748ea7dc232f5e059bdc7c5 Author: Uma Shankar Date: Fri Oct 6 17:26:45 2023 +0530 drm/xe/display: Create a dummy version for vga decode This introduces an exclusive version of vga decode for xe. Rest of the display changes will be re-used from i915. Currently it adds just a dummy implementation. VGA decode needs to be handled correctly in i915, proper implementation will be adopted once the i915 changes are finalized and merged in upstream. v2: Addressed Arun's review comments Signed-off-by: Uma Shankar Reviewed-by: Arun R Murthy Acked-by: Jani Nikula Signed-off-by: Rodrigo Vivi commit 08ea5ea2e890e8fbc9875294e6087179574a3057 Author: Jouni Högander Date: Wed Sep 13 12:54:12 2023 +0300 drm/xe/display: Add Xe implementation for fence checks used by fbc code Xe doesn't support legacy fences. Implement legacy fence and fence id checks accordingly. Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit c890be73933a3c124ffa08411d8d279aeede4384 Author: Jouni Högander Date: Wed Sep 13 12:54:11 2023 +0300 drm/xe/display: Add i915_gem.h compatibility header Add i915_gem.h compatibility header and include it in i915_drv.h. Add empty GEM_BUG_ON definition for fbc code. Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit c5a2eadd729ba3538f77ea2e055ca1f2efe82092 Author: Jouni Högander Date: Wed Sep 13 12:54:10 2023 +0300 drm/xe/display: Xe stolen memory handling for fbc support Add Xe stolen memory handling for fbc. v3: - v2: Add parenthesis around parameter in i915_gem_stolen_node_allocated v2: - define i915_gem_stolen_area_address/size as !WARN_ON(1) - squash common type addition into this patch Signed-off-by: Jouni Högander Signed-off-by: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit c3744ceb99e54e41f9f4a7a8938f2e12e0be23f0 Author: Jouni Högander Date: Tue Sep 12 09:47:09 2023 +0300 drm/xe/display: Add empty define for i915_ggtt_clear_scanout Add empty define for i915_ggtt_clear_scanout to avoid build failure. Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit fb764a35c7f45a378ae064016c321d61532113b9 Author: Jouni Högander Date: Mon Oct 2 13:23:56 2023 +0300 drm/xe/display: Add empty def for i915_gem_object_flush_if_display We don't need i915_gem_object_flush_if_display on Xe side. Add empty define to tackle compilation errors with display code where it's used. Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit 0071f1713dab8656e6c939d7be980f2ad3e8d312 Author: Jouni Högander Date: Tue Sep 12 09:47:05 2023 +0300 drm/xe/display: Add i915_active.h compatibility header Add empty definitions for i915_active_init/fini to kill ifdefs from frontbuffer tracking code. Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit cd494efdb8433f4a78f9bedb3e67d7505690f141 Author: Jouni Högander Date: Tue Sep 12 09:47:03 2023 +0300 drm/xe/display: Add frontbuffer setter/getter for xe_bo Xe is not carrying frontbuffer pointer in xe_bo. Define it's getter as NULL. Setter simply returns pointer which was provided as a parameter. v3: Do not take any references v2: Handle xe_bo_put as well Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit 1be5ff7f82063dab2e1d86bc21f2deb4cf4908bd Author: Jouni Högander Date: Tue Sep 12 09:47:01 2023 +0300 drm/xe/display: Add macro to get i915 device from xe_bo Add helper macro to kill couple of #ifdefs Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit 9aab7851ff1922930558274fd3983d047d1dfe22 Author: Jouni Högander Date: Tue Sep 12 09:47:07 2023 +0300 drm/xe/display: Add struct i915_active for Xe Add empty definition for struct i915_active to kill ifdefs from frontbuffer tracking code. Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit 04316b4ae6e094569737bababac6f2ef130c0020 Author: Francois Dugast Date: Tue Sep 5 19:49:42 2023 +0000 drm/xe/display: Use acpi_target_system_state only if ACPI_SLEEP is enabled This fixes the build error below with CONFIG_ACPI_SLEEP=n: drivers/gpu/drm/xe/xe_display.c:334:23: error: implicit declaration of function ‘acpi_target_system_state’; did you mean ‘acpi_get_system_info’? [-Werror=implicit-function-declaration] 334 | bool s2idle = acpi_target_system_state() < ACPI_STATE_S3; Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 9914e19cc215d339b618ccae993e16ed7aafb54e Author: Koby Elbaz Date: Wed Aug 30 09:33:32 2023 +0300 drm/xe/display: fix error handling flow when device probing fails Upon device probe failure, rolling back the initialization should be done in reversed order. Signed-off-by: Koby Elbaz Reviewed-by: Ohad Sharabi Signed-off-by: Rodrigo Vivi commit f02d48b881e2c0138f570884f8ead14d3f86ba21 Author: Matthew Auld Date: Fri Mar 31 09:46:27 2023 +0100 drm/xe/display: ensure clear-color surfaces are cpu mappable The KMD needs to access the clear-color value stored in the buffer via the CPU. On small-bar systems reject any buffers that are potentially not CPU accessible. Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: Thomas Hellström Cc: Gwan-gyeong Mun Cc: Lucas De Marchi Cc: José Roberto de Souza Cc: Filip Hazubski Cc: Carl Zhang Cc: Effie Yu Reviewed-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun [ Split display-related changes from small-bar support ] Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit e5b6e616c63f0d931e1be0d1c17cc80ec0fd3ea3 Author: Lucas De Marchi Date: Tue Mar 14 17:49:02 2023 -0700 drm/xe/display: Silence kernel-doc warnings related to display Add a "private:" comment to the part of the struct that is not expected to be documented, the one with display-related fields. This silence the following warnings: $ find drivers/gpu/drm/xe -name '*.[ch]' -not -path 'drivers/gpu/drm/xe/display/*' | xargs ./scripts/kernel-doc -Werror -none drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'display' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'pch_type' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'pch_id' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'wm_lv_0_adjust_needed' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'num_channels' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'symmetric_memory' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'type' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'num_qgv_points' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'num_psf_gv_points' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'dram_info' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'runtime_pm' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'sb_lock' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'skl_preferred_vco_freq' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'max_dotclk_freq' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'hti_state' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'snps_phy_failed_calibration' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'modeset_restore_state' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'global_obj_list' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'de_irq_mask' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'display_irqs_enabled' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'enabled_irq_mask' not described in 'xe_device' drivers/gpu/drm/xe/xe_device_types.h:316: warning: Function parameter or member 'params' not described in 'xe_device' 22 warnings as Errors Fixes: 44e694958b95 ("drm/xe/display: Implement display support") Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Link: https://lore.kernel.org/r/20230315004902.2622613-1-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 5d9331b48d17306e504c6c84be400f679d6684fa Merge: 8c5ce9094b0e2 f43c3a62e7d57 Author: Arnd Bergmann Date: Thu Dec 21 16:43:31 2023 +0000 Merge tag 'imx-dt64-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX arm64 device tree for 6.8: - New board support: MBa93xxCA starter kit, LX2160A based MBLX2160A, Dimonoff Gateway EVK, Verdin i.MX8M based Mallow, and SKOV i.MX8MP revB. - A set of changes from Adam Ford to enable MIPI_DSI, overdrive mode and NPU support for Beacon i.MX8M boards. - A number of changes from Alexander Stein to add CCM interrupts for CCM, 'chassis-type' property, and enable VPU and LVDS display for TQ-Systems boards. - i.MX93 update for AUDIO, I3C, ANATOP and uSDHC. - A couple of changes from David Heidelberg to correct dt-schema check errors for 'fsl,tmu-calibration' and 'gpio-fan,speed-map'. - A bunch of nice dt-schema check fix-ups from Fabio Estevam. - A couple of debix-som update from Kieran Bingham adding heartbeat LED and CSI power regulators. - White-space cleanup from Krzysztof Kozlowski. - Add display support for imx8mn-bsh-smm-s2/pro board. - A series from Tim Harvey to add TPM support for i.MX8M Venice devices. * tag 'imx-dt64-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (69 commits) arm64: dts: freescale: fix the schema check errors for fsl,tmu-calibration arm64: dts: freescale: imx8qxp: Disable dsp reserved memory by default arm64: dts: imx8qxp: Add VPU subsystem file arm64: dts: imx8qxp-mek: Move port under USB connector arm64: dts: imx8mn-bsh-smm-s2/pro: add display setup arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector arm64: dts: imx8mp-tqma8mpql-mba8mpxl: Fix USB connector description arm64: dts: imx8mp-venice: Fix USB connector description arm64: dts: imx8mp-verdin: Fix USB connector description arm64: dts: imx8dxl-ss-conn: Move clk_dummy out of USB node arm64: dts: imx8mn-evk: Move port under USB connector arm64: dts: imx8mm-evk: Move port under USB connector arm64: dts: freescale: introduce dimonoff-gateway-evk board arm64: dts: imx8m*-tqma8m*: Add chassis-type arm64: dts: imx8mn-beacon: Support overdrive mode arm64: dts: imx8mn: Enable Overdrive mode arm64: dts: imx8mm-beacon: Enable overdrive mode arm64: dts: imx8mm: Add optional overdrive DTSI arm64: dts: imx8mm: Reduce GPU to nominal speed ... Link: https://lore.kernel.org/r/20231216064605.876196-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit f6761c68c0ace6f4e3df6b03209fab09d472b727 Author: Maarten Lankhorst Date: Fri Jul 28 16:13:22 2023 +0200 drm/xe/display: Improve s2idle handling. We accidentally always pass true as s2idle argument, instead of calculating it in the same way as i915. Suspend modes were removed to achieve compatibility with i915, but accidentally left in the source code. While at it, fix all other cases too, s2idle will go into a D1 state and setting a lower power state should be handled by PCI core. Maybe my laptop stops draining so much power during suspend now? I can only hope.. Signed-off-by: Maarten Lankhorst Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 44e694958b95395bd1c41508c88c8ca141bf9bd7 Author: Maarten Lankhorst Date: Thu Aug 17 16:30:41 2023 -0400 drm/xe/display: Implement display support As for display, the intent is to share the display code with the i915 driver so that there is maximum reuse there. We do this by recompiling i915/display code twice. Now that i915 has been adapted to support the Xe build, we can add the xe/display support. This initial work is a collaboration of many people and unfortunately this squashed patch won't fully honor the proper credits. But let's try to add a few from the squashed patches: Co-developed-by: Matthew Brost Co-developed-by: Jani Nikula Co-developed-by: Lucas De Marchi Co-developed-by: Matt Roper Co-developed-by: Mauro Carvalho Chehab Co-developed-by: Rodrigo Vivi Co-developed-by: Dave Airlie Signed-off-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi Signed-off-by: Lucas De Marchi commit a839e365ac88f0fa9f8c7ae92b9e7e66bbd9e4d7 Author: Matthew Brost Date: Mon Nov 6 10:39:38 2023 -0800 drm/xe: Use pool of ordered wq for GuC submission To appease lockdep, use a pool of ordered wq for GuC submission rather tha leaving the ordered wq allocation to the drm sched. Without this change eventually lockdep runs out of hash entries (MAX_LOCKDEP_CHAINS is exceeded) as each user allocated exec queue adds more hash table entries to lockdep. A pool old of 256 ordered wq should be enough to have similar behavior with and without lockdep enabled. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 43efd3ba9f44c46fdb31c8b0f257cf9a2d1b58ae Author: Vinay Belgaumkar Date: Mon Nov 13 11:44:02 2023 -0800 drm/xe: Raise GT frequency before GuC/HuC load Starting GT freq is usually RPn. Raising freq to RP0 will help speed up GuC load times. As an example, this data was collected on DG2- GuC Load time @RPn ~ 41 ms GuC Load time @RP0 ~ 11 ms v2: Raise GT freq before hwconfig init. This will speed up both HuC and GuC loads. Address review comments (Rodrigo). Also add a small usleep after requesting frequency which gives pcode some time to react. v3: Address checkpatch issue Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Vinay Belgaumkar Signed-off-by: Rodrigo Vivi commit 08987a8b68207e782decb0f4037964ef036a9de4 Author: Lucas De Marchi Date: Thu Nov 9 09:51:32 2023 -0800 drm/xe: Fix build with KUNIT=m Due to the current integration between "live" xe kunit tests and kunit, it's not possible to have a build with the following combination: CONFIG_DRM_XE=y CONFIG_KUNIT=m ... even if kconfig doesn't block it. The reason for the failure is that some compilation units are pulled in xe.ko: drivers/gpu/drm/xe/xe_bo.c:#include "tests/xe_bo.c" drivers/gpu/drm/xe/xe_dma_buf.c:#include "tests/xe_dma_buf.c" drivers/gpu/drm/xe/xe_migrate.c:#include "tests/xe_migrate.c" drivers/gpu/drm/xe/xe_pci.c:#include "tests/xe_pci.c" Those files shouldn't use symbols from kunit, which should be reserved to the tests/*_test.c files. Detangling this dependency doesn't seem very straightforward, so fix the immediate issue instructing kconfig to block the problematic configuration. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20231109175132.3084142-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 80103a23da50bb3fc5c3c626ca7bc4d45b28340b Author: Matt Roper Date: Thu Nov 9 11:46:07 2023 -0800 drm/xe: Drop EXECLIST_CONTROL from error state dump EXECLIST_CONTROL ($enginebase + 0x550) is a write-only register; we shouldn't be trying to read or report it as part of the device error state. Bspec: 45910, 60335 Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20231109194606.1835284-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit fa85b083733abaef81eecd8693a065657d18e733 Author: Pallavi Mishra Date: Wed Nov 8 00:54:24 2023 +0530 drm/xe/tests: Fix migrate test Pass a valid vm to xe_migrate_update_pgtables. Resolves NPD crash seen with igt@xe_live_ktest@migrate Reviewed-by: Brian Welty Reviewed-by: Matthew Brost Signed-off-by: Pallavi Mishra Signed-off-by: Rodrigo Vivi commit 86017f3898d4ac0ab6c01376ef734c23347b38e7 Author: Alexander Usyskin Date: Tue Nov 7 13:55:58 2023 +0200 drm/xe/gsc: enable pvc support Configure and enable PVC HECI GSC support. Signed-off-by: Alexander Usyskin Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Rodrigo Vivi commit 047d1f6a2f171fc9ea4c286edd6ee0dfef41a298 Author: Haridhar Kalvala Date: Wed Nov 8 13:03:51 2023 +0530 drm/xe: Add Wa_14019877138 Enable Force Dispatch Ends Collection for DG2. BSpec: 46001 Signed-off-by: Haridhar Kalvala Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231108073351.3998413-1-haridhar.kalvala@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit d7925d04c062b8adcbbff9604422f979e9dbedb7 Author: Jonathan Cavitt Date: Fri Nov 3 14:03:24 2023 -0700 drm/xe: clear the serviced bits on INTR_IDENTITY_REG The spec for this register, like many other interrupt related ones, asks software to write back '1' to clear the serviced bits. Let's respect the spec. v2: - Update commit message - Add missing CC Signed-off-by: Jonathan Cavitt CC: Daniele Spurio Ceraolo CC: Lucas De Marchi CC: Rodrigo Vivi CC: Paulo Zanoni Reviewed-by: Rodrigo Vivi Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 37d1eaab34ab9cdd6022a188ce6b77a88f81c7e2 Author: Koby Elbaz Date: Sun Oct 29 19:53:26 2023 +0200 drm/xe: move the lmem verification code into a separate function If lmem (VRAM) is not fully initialized, the punit will power down the GT, which will prevent register access from the driver side. That code moved into a corresponding function (xe_verify_lmem_ready) to make the code clearer. Signed-off-by: Koby Elbaz Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231029175326.626745-1-kelbaz@habana.ai Signed-off-by: Rodrigo Vivi commit 04dfef5b41afc85e8de7b0397050cdb51db35eda Author: Brian Welty Date: Thu Nov 2 16:04:53 2023 -0700 drm/xe: Fix unbind of unaccessed VMA (fault mode) In fault mode, page table binding is deferred until fault handler. Thus vma->tile_present will be unset unless the VMA is accessed by GPU. During a later unbind, the logic doesn't account for the fact that local fence variable will be NULL in this case, leading to pass NULL into dma_fence_add_callback() and causing few WARN_ONs to print to console. The fix is already present in the code, just hoist the fence variable computation to be done earlier. Resolves warnings seen with igt@xe_exec_fault_mode@once-invalid-fault Signed-off-by: Brian Welty Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 6ffef7b6991b4e302dd0aa86f67a0d00b0b8e542 Author: Gustavo Sousa Date: Mon Nov 6 18:06:57 2023 -0300 drm/xe/xelpmp: Add Wa_16021867713 This workaround applies to all steppings of Xe_LPM+. Implement the KMD part. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231106210655.175109-3-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit 670e811d1fd6aaab485b33081a8b97fa62ff2095 Author: Thomas Hellström Date: Tue Nov 7 09:24:40 2023 +0100 drm/xe: Update SPDX deprecated license identifier The "GPL-2.0" SPDX license identifier is deprecated. Update the code to use "GPL-2.0-only" instead. Choose this identifier over "GPL-2.0-or-later" since it's the most restrictive of the two and it's not fully clear that "GPL-2.0" also allows "GPL-2.0-or-later". Cc: Francois Dugast Cc: Rodrigo Vivi Signed-off-by: Thomas Hellström Reviewed-by: Francois Dugast Link: https://patchwork.freedesktop.org/patch/msgid/20231107082440.7568-1-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit e4e4268d950034dc97fbeba480dd4741d72a8df3 Author: Brian Welty Date: Tue Oct 31 13:32:24 2023 -0700 drm/xe: Fix pagefault and access counter worker functions When processing G2H messages for pagefault or access counters, we queue a work item and call queue_work(). This fails if the worker thread is already queued to run. The expectation is that the worker function will do more than process a single item and return. It needs to either process all pending items or requeue itself if items are pending. But requeuing will add latency and potential context switch can occur. We don't want to add unnecessary latency and so the worker should process as many faults as it can within a reasonable duration of time. We also do not want to hog the cpu core, so here we execute in a loop and requeue if still running after more than 20 ms. This seems reasonable framework and easy to tune this futher if needed. This resolves issues seen with several igt@xe_exec_fault_mode subtests where the GPU will hang when KMD ignores a pending pagefault. v2: requeue the worker instead of having an internal processing loop. v3: implement hybrid model of v1 and v2 now, run for 20 msec before we will requeue if still running v4: only requeue in worker if queue is non-empty (Matt B) Signed-off-by: Brian Welty Reviewed-by: Matthew Brost Reviewed-by: Stuart Summers Signed-off-by: Rodrigo Vivi commit 571622740288f801042a28598440a098249213fa Author: Andrzej Hajda Date: Fri Oct 27 11:42:55 2023 +0200 drm/xe: implement driver initiated function-reset Driver initiated function-reset (FLR) is the highest level of reset that we can trigger from within the driver. In contrast to PCI FLR it doesn't require re-enumeration of PCI BAR. It can be useful in case GT fails to reset. It is also the only way to trigger GSC reset from the driver and can be used in future addition of GSC support. v2: - use regs from xe_regs.h - move the flag to xe.mmio - call flr only on root gt - use BIOS protection check - copy/paste comments from i915 v3: - flr code moved to xe_device.c v4: - needs_flr_on_fini moved to xe_device Signed-off-by: Andrzej Hajda Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Rodrigo Vivi commit 27a1a1e2e47d6f12a784413c194a94b6c0d7fdcb Author: Carlos Santa Date: Thu Oct 26 15:01:27 2023 -0700 drm/xe: stringify the argument to avoid potential vulnerability This error gets printed inside a sandbox with warnings turned on. /mnt/host/source/src/third_party/kernel/v5.15/drivers/ gpu/drm/xe/xe_gt_idle_sysfs.c:87:26: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] return sysfs_emit(buff, gtidle->name); ^~~~~~~~~~~~ /mnt/host/source/src/third_party/kernel/v5.15/drivers/ gpu/drm/xe/xe_gt_idle_sysfs.c:87:26: note: treat the string as an argument to avoid this return sysfs_emit(buff, gtidle->name); ^ "%s", 1 error generated. CC: Rodrigo Vivi Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 5d30cfe003a98d2f4ad28fe27226f3f2e6784c65 Author: Matt Roper Date: Thu Nov 2 05:48:55 2023 -0700 drm/xe: Add Wa_14019821291 This workaround is primarily implemented by the BIOS. However if the BIOS applies the workaround it will reserve a small piece of our DSM (which should be at the top, right below the WOPCM); we just need to keep that region reserved so that nothing else attempts to re-use it. v2 (Gustavo): - Check for NULL media_gt - Mask bits [5:0] to avoid potential issues in future platforms Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20231102124855.1940491-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit effc560d7a36b8c59219dd5374d9725a9edd85c4 Author: Badal Nilawar Date: Wed Nov 1 22:02:12 2023 +0530 drm/xe/mtl: Use 16.67 Mhz freq scale factor to get rpX For mtl and above 16.67 Mhz is the scale factor to calculate rpX frequencies. v2: Fix review comment (Ashutosh) Signed-off-by: Badal Nilawar Reviewed-by: Ashutosh Dixit Link: https://patchwork.freedesktop.org/patch/msgid/20231101163212.1629685-1-badal.nilawar@intel.com Signed-off-by: Rodrigo Vivi commit 4d5252b4ca1dc973b8b368c88f9d1e348f9c1906 Author: Matt Roper Date: Tue Oct 31 07:05:37 2023 -0700 drm/xe/xe2: Program correct MOCS registers The LNCFCMOCS registers no longer exist on Xe2 so there's no need to attempt to program them. Since GLOB_MOCS is the only set of MOCS registers now, it's expected to be used for all platforms (both igpu and dgpu) going forward, so adjust the MOCS programming flags accordingly. v2: - Fix typo (global mocs condition is >=, not >) Bspec: 71582 Reviewed-by: Pallavi Mishra Link: https://lore.kernel.org/r/20231031140536.303746-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 74a6c6438ee7b53e7711fc0b7000ed42edd7dad5 Author: Brian Welty Date: Tue Oct 31 14:12:16 2023 -0700 drm/xe: Fix dequeue of access counter work item The access counters worker function is fixed to advance the head pointer when dequeuing from the acc_queue. This now matches the similar logic in get_pagefault(). Signed-off-by: Bruce Chang Signed-off-by: Brian Welty Reviewed-by: Stuart Summers Signed-off-by: Rodrigo Vivi commit 81d11b9d6625d3c2a9ecf68f41f3575e653c0ac7 Author: Matthew Brost Date: Tue Oct 31 11:46:45 2023 -0700 drm/xe: Adjust tile_present mask when skipping rebinds If a rebind is skipped the tile_present mask needs to be updated for the newly created vma to properly reflect the state of the vma. Reported-by: Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit ebb00b285bef8bcdc46ac4e344d5748539bdd213 Author: Pallavi Mishra Date: Wed Nov 1 04:38:38 2023 +0530 drm/xe: Dump CTB during TLB timeout Print CTB info during TLB invalidation timeout event. Reviewed-by: Matthew Brost Signed-off-by: Pallavi Mishra Signed-off-by: Rodrigo Vivi commit fd0975b7cfee7d3e6db6771193b0cff230b7eec8 Author: Brian Welty Date: Mon Sep 25 17:12:48 2023 -0700 drm/xe: Replace usage of mem_type_to_tile Currently mem_type_to_tile() is being used to access the tile's underlying tile.mem.vram. However, this function makes the assumption that a mem_type will only ever map to a single tile. Now that the TTM vram manager contains a pointer to the memory_region, make use of this in xe_bo.c. As such, introduce a helper function res_to_mem_region() to get the ttm_vram_mgr->vram from the BO's resource, and use this to replace usage of mem_type_to_tile(). xe_tile is still needed to choose the migration context, so this part is unchanged. But as this is only renaming usage, function is renamed now to mem_type_to_migrate(). Signed-off-by: Brian Welty Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 4e11a1411ab41416be7f29716a767eb135f7aa74 Author: Brian Welty Date: Tue Sep 26 12:10:40 2023 -0700 drm/xe: Remove unused xe_bo_to_tile Unused and would like to remove the memtype_to_tile() which it calls. Signed-off-by: Brian Welty Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 4e002016a1e5b5d0b29191a82d4f561f175f3d33 Author: Brian Welty Date: Mon Sep 25 14:02:32 2023 -0700 drm/xe: Replace xe_ttm_vram_mgr.tile with xe_mem_region Replace the xe_ttm_vram_mgr.tile pointer with a xe_mem_region pointer instead. The former is currently unused. TTM VRAM regions are exposing device vram and is better to store a pointer directly to the xe_mem_region instead of the tile. This allows to cleanup unnecessary usage of xe_tile from xe_bo.c in later patch. Signed-off-by: Brian Welty Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 4446fcf220ceab4f6d0cc4ae3b1338a0ceeeb72e Author: Badal Nilawar Date: Mon Oct 30 17:26:18 2023 +0530 drm/xe/hwmon: Expose power1_max_interval Expose power1_max_interval, that is the tau corresponding to PL1, as a custom hwmon attribute. Some bit manipulation is needed because of the format of PKG_PWR_LIM_1_TIME in PACKAGE_RAPL_LIMIT register (1.x * power(2,y)) v2: Get rpm wake ref while accessing power1_max_interval v3: %s/hwmon/xe_hwmon/ v4: - As power1_max_interval is rw attr take lock in read function as well - Refine comment about val to fix point conversion (Andi) - Update kernel version and date in doc v5: Fix review comments (Anshuman) Acked-by: Rodrigo Vivi Reviewed-by: Himal Prasad Ghimiray Reviewed-by: Anshuman Gupta Signed-off-by: Badal Nilawar Link: https://patchwork.freedesktop.org/patch/msgid/20231030115618.1382200-4-badal.nilawar@intel.com Signed-off-by: Rodrigo Vivi commit fef6dd12b45a1a15c24c9df30fb2c27e68984665 Author: Badal Nilawar Date: Mon Oct 30 17:26:17 2023 +0530 drm/xe/hwmon: Protect hwmon rw attributes with hwmon_lock Take hwmon_lock while accessing hwmon rw attributes. For readonly attributes its not required to take lock as reads are protected by sysfs layer and therefore sequential. Cc: Ashutosh Dixit Cc: Anshuman Gupta Signed-off-by: Badal Nilawar Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20231030115618.1382200-3-badal.nilawar@intel.com Signed-off-by: Rodrigo Vivi commit b42ff0462d9eb7b84e31152c63c9809b6f743bf8 Author: Badal Nilawar Date: Mon Oct 30 17:26:16 2023 +0530 drm/xe/hwmon: Add kernel doc and refactor xe hwmon Add kernel doc and refactor some of the hwmon functions, there is no functionality change. Cc: Anshuman Gupta Cc: Ashutosh Dixit Signed-off-by: Badal Nilawar Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20231030115618.1382200-2-badal.nilawar@intel.com Signed-off-by: Rodrigo Vivi commit 503a6f4e4f961acbbcac8d36f51226f3d3cfa7b7 Author: Matthew Auld Date: Wed Oct 25 18:39:41 2023 +0100 drm/xe/bo: sync kernel fences for KMD buffers With things like pipelined evictions, VRAM pages can be marked as free and yet still have some active kernel fences, with the idea that the next caller to allocate the memory will respect them. However it looks like we are missing synchronisation for KMD internal buffers, like page-tables, lrc etc. For userspace objects we should already have the required synchronisation for CPU access via the fault handler, and likewise for GPU access when vm_binding them. To fix this synchronise against any kernel fences for all KMD objects at creation. This should resolve some severe corruption seen during evictions. v2 (Matt B): - Revamp the comment explaining this. Also mention why USAGE_KERNEL is correct here. v3 (Thomas): - Make sure to use ctx.interruptible for the wait. Testcase: igt@xe-evict-ccs Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/853 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/855 Reported-by: Zbigniew Kempczyński Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Thomas Hellström Tested-by: Zbigniew Kempczyński Signed-off-by: Rodrigo Vivi commit a667cf56dbd64e35f8f34ec47549888fa28878fb Author: Matthew Auld Date: Wed Oct 25 18:39:40 2023 +0100 drm/xe/bo: consider dma-resv fences for clear job There could be active fences already in the dma-resv for the object prior to clearing. Make sure to input them as dependencies for the clear job. v2 (Matt B): - We can use USAGE_KERNEL here, since it's only the move fences we care about here. Also add a comment. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 4202dd9fc43e9d9dba54e1b72a301108cdec84fb Author: Matthew Auld Date: Wed Oct 25 18:39:39 2023 +0100 drm/xe/migrate: fix MI_ARB_ON_OFF usage Spec says: "This is a privileged command; it will not be effective (will be converted to a no-op) if executed from within a non-privileged batch buffer." However here it looks like we are just emitting it inside some bb which was jumped to via the ppGTT, which should be considered a non-privileged address space. It looks like we just need some way of preventing things like the emit_pte() and later copy/clear being preempted in-between so rather just emit directly in the ring for migration jobs. Bspec: 45716 Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Matt Roper Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 7eea3fb67a30a81c1751097753885657a1ace021 Author: Shekhar Chauhan Date: Mon Oct 30 20:37:56 2023 +0530 drm/xe/xelpmp: Extend Wa_22016670082 to Xe_LPM+ Add Xe_LPM+ support to an existing workaround. BSpec: 51762 Signed-off-by: Shekhar Chauhan Link: https://lore.kernel.org/r/20231030150756.1011777-1-shekhar.chauhan@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit b8d70702def26d7597eded092fe43cc584c0d064 Author: Priyanka Dandamudi Date: Fri Oct 27 10:55:07 2023 +0530 drm/xe/xe_exec_queue: Add check for access counter granularity Add conditional check for access counter granularity. This check will return -EINVAL if granularity is beyond 64M which is a hardware limitation. v2: Defined XE_ACC_GRANULARITY_128K 0 XE_ACC_GRANULARITY_2M 1 XE_ACC_GRANULARITY_16M 2 XE_ACC_GRANULARITY_64M 3 as part of uAPI. So, that user can also use it.(Oak) v3: Move uAPI to proper location and give proper documentation.(Brian, Oak) Cc: Oak Zeng Cc: Janga Rahul Kumar Cc: Brian Welty Signed-off-by: Priyanka Dandamudi Reviewed-by: Oak Zeng Reviewed-by: Oak Zeng Signed-off-by: Rodrigo Vivi commit 65e95735882329632559cf71c9efbb4981473b07 Author: Lucas De Marchi Date: Tue Oct 24 15:04:12 2023 -0700 drm/xe: Fix WA 14010918519 write to wrong register FORCE_SLM_FENCE_SCOPE_TO_TILE and FORCE_UGM_FENCE_SCOPE_TO_TILE are in the up dword of LSC_CHICKEN_BIT_0 register. Also, the 14010918519 workaround only applies to early steppings, A*. Eventually those should be dropped, like they were in commit eaeb4b361452 ("drm/i915/dg2: Drop pre-production GT workarounds"), so let's make sure they are annotated appropriately. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20231024220412.223868-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit bfeb4ac55565f527f72e97020a244f8c3585154a Author: Daniele Ceraolo Spurio Date: Wed Oct 25 10:57:45 2023 -0700 drm/xe/huc: Define HuC for MTL MTL uses a versionless GSC-enabled binary. v2: don't use the filename to identify the header type (Lucas) v3: fix commit msg (Lucas) Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 185f93f3041fe520c6df16a58bea116077d3f848 Author: Daniele Ceraolo Spurio Date: Wed Oct 25 10:57:44 2023 -0700 drm/xe/huc: Don't re-auth HuC if it's already authenticated On newer platforms the HuC survives reset and stays authenticated, so no need to re-authenticate it. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit b77d8b5c5ec0673086f565f2c07ed6da081483b8 Author: Daniele Ceraolo Spurio Date: Wed Oct 25 10:57:43 2023 -0700 drm/xe/huc: HuC is not supported on GTs that don't have video engines On MTL-style multi-gt platforms, the HuC is only available on the media GT, so we need to consider it as not supported on the render GT. Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 484ecffac91067e44273afa727fb1b9855058c9a Author: Daniele Ceraolo Spurio Date: Wed Oct 25 10:57:42 2023 -0700 drm/xe/huc: Extract version and binary offset from new HuC headers The GSC-enabled HuC binary starts with a GSC header, which is followed by the legacy-style CSS header and the binary itself. We can parse the GSC headers to find the HuC version and the location of the binary to be used for the DMA transfer. The parsing function has been designed to be re-used for the GSC binary, so the entry names are external parameters (because the GSC uses different ones) and the CSS entry is optional (because the GSC doesn't have it). v2: move new code to uc_fw.c, better comments and error checking, split old code move to separate patch (Lucas), move headers and documentation to uc_fw_abi.h. v3: use 2 separate loops, rework marker check (Lucas) Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit a9a95523c84957b7863796b5d1df2f3f5dca4519 Author: Daniele Ceraolo Spurio Date: Wed Oct 25 10:57:41 2023 -0700 drm/xe/uc: Prepare for parsing of different header types GSC binaries and newer HuC ones use GSC-style headers instead of the CSS. In preparation for adding support for such parsing, split out the current parsing code to its own function, to make it cleaner to add the new paths. The existing doc section has also been renamed to narrow it to CSS-based binaries. v2: new patch in series, split out from next patch for easier reviewing v3: drop unneeded include (Lucas) Signed-off-by: Daniele Ceraolo Spurio Cc: Alan Previn Cc: John Harrison Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 8a93b0b4d1105b7d03b4768f1a08145b24cbd52a Author: Badal Nilawar Date: Wed Oct 25 21:42:01 2023 +0530 drm/xe: Extend rpX values extraction for future platforms In existing code flow for future platforms i.e. >1270, the rpX (rp0,rpn and rpe) fused values are read from gen 6 registers. Which is not correct. Unless specified gen 1270 regs should be valid for gen 1270+ platforms as well. Signed-off-by: Badal Nilawar Reviewed-by: Anshuman Gupta Signed-off-by: Rodrigo Vivi commit 83af834e711ce779afb1ee6a28977b3e4b164354 Author: Matt Roper Date: Mon Oct 23 13:41:13 2023 -0700 drm/xe/mocs: MOCS registers are multicast on Xe_HP and beyond The MOCS registers should be written in an MCR-specific manner on Xe_HP and beyond to prevent any other driver threads or external firmware from putting the hardware into unicast mode while we initialize the MOCS table. Bspec: 66534, 67609, 71185 Cc: Ruthuvikas Ravikumar Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20231023204112.2856331-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit fb24b858a20d720b7ee4396225569ff33a8a4fe3 Author: Matt Roper Date: Wed Oct 25 08:17:36 2023 -0700 drm/xe/xe2: Update SVG state handling As with DG2/MTL, Xe2 also fails to emit instruction headers for SVG state instructions if no explicit state has been set. The SVG part of the LRC is nearly identical to DG2/MTL; the only change is that 3DSTATE_DRAWING_RECTANGLE has been replaced by 3DSTATE_DRAWING_RECTANGLE_FAST, so we can just re-use the same state table and handle that single instruction when we encounter it. Bspec: 65182 Reviewed-by: Balasubramani Vivekanandan Link: https://lore.kernel.org/r/20231025151732.3461842-8-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 72ac304769dde2b84a5471e5db817a29d071fd73 Author: Matt Roper Date: Wed Oct 25 08:17:35 2023 -0700 drm/xe: Emit SVG state on RCS during driver load on DG2 and MTL When recording the default LRC, the expectation is that the hardware's original state settings (both register and instruction) will be written out to the LRC upon first context switch. For many 3DSTATE_* state instructions that don't truly have "default" values, this translates to a simple instruction header (opcodes + dword length) being written to the LRC, followed by an appropriate number of blank dwords as a place holder. When userspace creates a context (which starts as a copy of the default LRC), they'll generally emit real 3DSTATE_* as part of their initialization to select the settings they desire. If they don't emit one of the 3DSTATE instructions, then the zeroed dwords that remain in their LRC image generally translate to various state remaining disabled. This will either be what userspace wants or will lead to very reproducible and easily-debugged problems (rendering glitches, engine hangs). It turns out that a subset of the 3DSTATE instructions, specifically those belonging to the SVG (State Variable - Global) unit, are not only emitting 0's for the instruction's "body" dwords, but also for the instruction header dword if no specific state has been explicitly set before context switch. This means that when the hardware switches to a context that hasn't explicitly provided an appropriate state setting, the hardware will just see a sequence of NOOPs in the spot reserved for that 3DSTATE instruction while executing the LRC, and the actual hardware state setting will unintentionally inherit the configuration used by the previously running context. Now when userspace makes a mistake and forgets to emit an important state instruction they no longer get consistent, easily-reproducible corruption/hangs, but rather erratic behavior where the presence/absence of a problem depends on what other workloads are running on the system and what order the contexts are scheduled on the engine. A specific example of this that came up recently related to mesh shading The OpenGL driver was not specifically emitting a 3DSTATE_MESH_CONTROL to disable mesh shading at context init, so on context switch, mesh shading would either be on or off depending on what the previous context had been doing. Vulkan apps _were_ enabling mesh shading, so running a Vulkan app and then context switching to an OpenGL app resulted in mesh shading still unexpectedly being enabled during OpenGL operation, and since other Mesh-related state was not properly initialized for that context a GPU hang was seen. Due to the specific ordering requirements (Vulkan app runs first, followed by OpenGL app), it took additional debug effort to track down the cause of the problem. There are various workarounds related to this behavior, with current implementations handled in the userspace drivers. E.g., Wa_14019789679 and Wa_22018402687. However it's been suggested that the kernel driver can help simplify things here by emitting zeroed SVG state with proper instruction headers as part of our default context creation (i.e., at the same point we apply LRC workarounds). This will help ensure that any future cases where a userspace driver does not emit an important state setting will result in consistent behavior. Bspec: 46261 Reviewed-by: Balasubramani Vivekanandan Link: https://lore.kernel.org/r/20231025151732.3461842-7-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit b1543a494c52102f9f5ad29d3dc38d29c7fcfcc4 Author: Matt Roper Date: Wed Oct 25 08:17:34 2023 -0700 drm/xe: Prepare to emit non-register state while recording default LRC On some platforms we need to emit some non-register state while recording an engine class' default LRC. Add the infrastructure to support this; actual per-platform tables will be added in future patches. v2: - Checkpatch whitespace fix - Add extra assertion to ensure num_dw != 0. (Bala) Reviewed-by: Balasubramani Vivekanandan Link: https://lore.kernel.org/r/20231025151732.3461842-6-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 0d0dda27cf066d1e7537a815fb3990be04cff6bd Author: Balasubramani Vivekanandan Date: Thu Oct 19 15:01:40 2023 +0530 drm/xe/trace: Optimize trace definition Make use of EVENT_CLASS to group similar trace events Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Haridhar Kalvala Link: https://lore.kernel.org/intel-xe/20231019093140.1901665-3-balasubramani.vivekanandan@intel.com/ Signed-off-by: Rodrigo Vivi commit 8656ea9ae8b488ac25fdd332c60e6fd805cde171 Author: Balasubramani Vivekanandan Date: Thu Oct 19 15:01:39 2023 +0530 drm/xe: Add event tracing for CTB Event tracing enabled for CTB submissions. Additional minor refactor - Removed a unnecessary ct_to_xe() call. v2: Remove a unwanted comment (Hari) Add missing change to commit message Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Haridhar Kalvala Link: https://lore.kernel.org/intel-xe/20231019093140.1901665-2-balasubramani.vivekanandan@intel.com/ Signed-off-by: Rodrigo Vivi commit f6c39feed02117db5dfe988321a1a4dee2a9a3e2 Author: Shekhar Chauhan Date: Tue Oct 24 15:07:38 2023 -0700 drm/xe: Add performance tuning settings for MTL and Xe2 Add L3SQCREG5 as part of HW recommended settings. The recommended value in Bspec is 00e0007f. For Xe2-LPG, bits 23:21 don't exist anymore, but it's confirmed with HW engineers that setting them doesn't do anything. They still exist on the media GT, Xe2-LPM, but they are already they are already set as per HW default value. So for Xe2 platform, the only bits that need to be set are 9:0 since HW's default is 0x1ff and the recommended value is 0x7f. Unlike most registers, which have the same relative offset on both the primary and media GT, this register has a different base offset on the media GT. On MTL the register only exists for the primary (graphics) GT, so there's no need to program it on the media gt. Also, it's part of the RCS engine's context, so it needs to be added as a LRC workaround. Bspec: 72161 Signed-off-by: Shekhar Chauhan Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231024220739.224251-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit bad3644dd8d5b118cdf64dfc71ef9540ee288ddc Author: Dnyaneshwar Bhadane Date: Tue Oct 24 15:07:37 2023 -0700 drm/xe/xe2: Add initial workarounds Add the initial collection of gt/engine/lrc workarounds. While at it, add some newlines around the platform/IP comments to make them consistent across all workarounds. v2: - FF_MODE is an MCR register (Matt Roper) - Group 18032247524 with other Xe2 workarounds (Matt Roper) - Move WA changing PSS_CHICKEN to lrc_was[] as for Xe2 that register is part of the render context image (Matt Roper) - Apply WA 16020518922 only on render engine (Matt Roper) Signed-off-by: Dnyaneshwar Bhadane Signed-off-by: Shekhar Chauhan Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231024220739.224251-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit c85d36be2993d65cfd678e01659ff69a4a803cad Author: Brian Welty Date: Tue Sep 26 13:59:37 2023 -0700 drm/xe: Simplify xe_res_get_buddy() We can remove the unnecessary indirection thru xe->tiles[] to get the TTM VRAM manager. This code can be common for VRAM and STOLEN. Signed-off-by: Brian Welty Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit bf6d941c06c9681d0f3d8380e7093d7f79d3eef6 Author: Matthew Auld Date: Wed Oct 18 13:34:24 2023 +0100 drm/xe: fix pat[2] programming with 2M/1G pages Bit 7 in the leaf node is normally programmed with pat[2], however with 2M/1G pages that same bit in the PDE/PDPE also toggles 2M/1G pages. For 2M/1G entries the pat[2] is rather moved to bit 12, which is now free given that the address must be aligned to 2M or 1G, leaving bit 7 for toggling 2M/1G pages. Bspec: 59510, 45038 Signed-off-by: Matthew Auld Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 9b49762740e3f2c240877437116635e73718cd47 Author: Daniele Ceraolo Spurio Date: Wed Oct 4 10:33:41 2023 -0700 drm/xe/guc: Bump PVC GuC version to 70.9.1 The PVC GuC version that we're currently using (70.6.4) has a known issue that leads to dropping the disabling of contexts that have pending page faults. This is fixed in newer blobs, so we need to update to a more recent release. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/696 Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit e48d146456e34625c6edafd6350bfaac5004727c Author: Francois Dugast Date: Wed Sep 20 15:29:37 2023 -0400 drm/xe/uapi: Fix naming of XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY This is used for the priority of an exec queue (not an engine) and should be named accordingly. Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit e16b48378527dbe2f200b792922f59a2bf038507 Author: Rodrigo Vivi Date: Wed Sep 20 15:29:36 2023 -0400 drm/xe/uapi: Rename gts to gt_list During the uapi review it was identified a possible confusion with the plural of acronym with a new acronym. So the recommendation is to go with gt_list instead. Suggested-by: Matt Roper Signed-off-by: Rodrigo Vivi Reviewed-by: Matt Roper Signed-off-by: Francois Dugast commit 92296571546460bf9f4faf5e288d63f91d838968 Author: Rodrigo Vivi Date: Wed Sep 20 15:29:35 2023 -0400 drm/xe/uapi: Remove unused field of drm_xe_query_gt We already have many bits reserved at the end already. Let's kill the unused ones. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost commit 2519450aaa31948d27db0715c24398b2590517f1 Author: Rodrigo Vivi Date: Wed Sep 20 15:29:34 2023 -0400 drm/xe/uapi: Replace useless 'instance' per unique gt_id Let's have a single GT ID per GT within the PCI Device Card. Signed-off-by: Rodrigo Vivi Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost commit 25f656f534f4b4eb95140efce37328efbda13af7 Author: Rodrigo Vivi Date: Wed Sep 20 15:29:33 2023 -0400 drm/xe/uapi: Document drm_xe_query_gt Split drm_xe_query_gt out of the gt list one in order to better document it. No functional change at this point. Any actual change to the uapi should come in follow-up additions. v2: s/maks/mask Cc: Matt Roper Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit e669f10cd3182943058fa84b1e81f3727f6e0520 Author: Matthew Brost Date: Thu Sep 14 13:40:51 2023 -0700 drm/xe: Fix VM bind out-sync signaling ordering A case existed where an out-sync of a later VM bind operation could signal before a previous one if the later operation results in a NOP (e.g. a unbind or prefetch to a VA range without any mappings). This breaks the ordering rules, fix this. This patch also lays the groundwork for users to pass in num_binds == 0 and out-syncs. Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit f3e9b1f43458746e7e0211dbe4289412e5c0d16a Author: Matthew Brost Date: Thu Sep 14 13:40:50 2023 -0700 drm/xe: Remove async worker and rework sync binds Async worker is gone. All jobs and memory allocations done in IOCTL to align with dma fencing rules. Async vs. sync now means when do bind operations complete relative to the IOCTL. Async completes when out-syncs signal while sync completes when the IOCTL returns. In-syncs and out-syncs are only allowed in async mode. If memory allocations fail in the job creation step the VM is killed. This is temporary, eventually a proper unwind will be done and VM will be usable. Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit b21ae51dcf41ce12bb8e2a7c989863ee9d04ae4b Author: Matthew Brost Date: Thu Sep 14 13:40:49 2023 -0700 drm/xe/uapi: Kill DRM_XE_UFENCE_WAIT_VM_ERROR This is not used nor does it align VM async document, kill this. Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 7224788f675632956cb9177c039645d72d887cf8 Author: Rodrigo Vivi Date: Wed Sep 20 15:29:32 2023 -0400 drm/xe: Kill XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS extension This extension is currently not used and it is not aligned with the error handling on async VM_BIND. Let's remove it and along with that, since it was the only extension for the vm_create, remove VM extension entirely. v2: rebase on top of the removal of drm_xe_ext_exec_queue_set_property Cc: Thomas Hellström Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 5dc079d1a8e5e880ae18b4f4585d7dc28e51e68e Author: Ashutosh Dixit Date: Wed Sep 20 15:29:31 2023 -0400 drm/xe/uapi: Use common drm_xe_ext_set_property extension There really is no difference between 'struct drm_xe_ext_vm_set_property' and 'struct drm_xe_ext_exec_queue_set_property', they are extensions which specify a pair. Replace the two extensions with a single common 'struct drm_xe_ext_set_property' extension. The rationale is that rather than have each XE module (including future modules) invent their own property/value extensions, all XE modules use a common set_property extension when possible. Signed-off-by: Ashutosh Dixit Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit bffb2573726beabc8ad70532d5655a976f9053d8 Author: Matthew Brost Date: Wed Sep 20 15:29:30 2023 -0400 drm/xe: Remove XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE from uAPI Functionality of XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE deprecated in a previous patch, drop from uAPI. The property is just simply inherented from the VM. v2: - Update commit message (Niranjana) Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit abce4e4b0742f0a0773213144601ea7e18389228 Author: Matthew Brost Date: Wed Sep 20 15:29:29 2023 -0400 drm/xe: Rename exec_queue_kill_compute to xe_vm_remove_compute_exec_queue Much better name and aligns with xe_vm_add_compute_exec_queue. As part of the rename, move the implementation from xe_exec_queue.c to xe_vm.c. Suggested-by: Niranjana Vishwanathapura Signed-off-by: Matthew Brost Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit e05c6c9774630702143bf4d35f2a753e61a57622 Author: Matthew Brost Date: Wed Sep 20 15:29:28 2023 -0400 drm/xe: Deprecate XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE implementation We are going to remove XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE from the uAPI, deprecate the implementation first by making XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE a NOP. After removal of XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE the proper is simply inherented from the VM. v2: - Update commit message with explaination of removal (Niranjana) Signed-off-by: Matthew Brost Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 5009d554e0d501741de1411db797a593a6fa94bb Author: Matthew Brost Date: Wed Sep 20 15:29:27 2023 -0400 drm/xe: Fix xe_exec_queue_is_idle for parallel exec queues Last little piece to support parallel exec queue is compute mode. Signed-off-by: Matthew Brost Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 924e6a9789a05ef01ffdf849aa3a3c75f5a29a8b Author: Francois Dugast Date: Wed Sep 20 15:29:26 2023 -0400 drm/xe/uapi: Remove MMIO ioctl This was previously used in UMD for timestamp correlation, which can now be done with DRM_XE_QUERY_CS_CYCLES. Link: https://lore.kernel.org/all/20230706042044.GR6953@mdroper-desk1.amr.corp.intel.com/ Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/636 Signed-off-by: Francois Dugast Reviewed-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 78ddc872c6a91d8973ca89209793323efaa86345 Author: Francois Dugast Date: Wed Sep 20 15:29:25 2023 -0400 drm/xe/vm: Remove VM_BIND_OP macro This macro was necessary when bind operations were shifted but this is no longer the case, so removing to simplify code. Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit ea0640fc6971f555c8f921e2060376d768685805 Author: Francois Dugast Date: Wed Sep 20 15:29:24 2023 -0400 drm/xe/uapi: Separate VM_BIND's operation and flag Use different members in the drm_xe_vm_bind_op for op and for flags as it is done in other structures. Type is left to u32 to leave enough room for future operations and flags. v2: Remove the XE_VM_BIND_* flags shift (Rodrigo Vivi) Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/303 Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 7793d00d1bf5923e77bbe7ace8089bfdfa19dc38 Author: Umesh Nerlige Ramappa Date: Mon Aug 14 15:37:34 2023 -0700 drm/xe: Correlate engine and cpu timestamps with better accuracy Perf measurements rely on CPU and engine timestamps to correlate events of interest across these time domains. Current mechanisms get these timestamps separately and the calculated delta between these timestamps lack enough accuracy. To improve the accuracy of these time measurements to within a few us, add a query that returns the engine and cpu timestamps captured as close to each other as possible. Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24591 v2: - Fix kernel-doc warnings (CI) - Document input params and group them together (Jose) - s/cs/engine/ (Jose) - Remove padding in the query (Ashutosh) Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: José Roberto de Souza Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi [Rodrigo finished the s/cs/engine renaming] commit 61d63a59f68c7ab558b020cc675b9f94ef403c5f Author: Umesh Nerlige Ramappa Date: Wed Sep 20 15:29:22 2023 -0400 drm/xe: Set the correct type for xe_to_user_engine_class User engine class is of type u16. Set the same type for the array used to map xe engines to user engines. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit fd47ded2379265b58dd5ae699fa1f5a14e65fdfc Author: Umesh Nerlige Ramappa Date: Wed Sep 20 15:29:21 2023 -0400 drm/xe: Fix array bounds check for queries Queries are 0-indexed, so a query with value N is invalid if the ARRAY_SIZE is N. Modify the check to account for that. Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit 6de492ae5f5ee6edccf1e1fae472bc5f95cec8e6 Author: Matt Roper Date: Mon Oct 16 09:34:56 2023 -0700 drm/xe/debugfs: Include GFXPIPE commands in LRC dump RCS and CCS engines include several non-register gfxpipe commands in their LRC images. Include these in the dump output so that we can see exactly what's inside the context snapshot. v2: - Include raw instruction header in output - Add 3DSTATE_AMFS_TEXTURE_POINTERS and 3DSTATE_MONOFILTER_SIZE. The first was supposed to be removed in Xe_HPG, and the second by gen12, but both still show up in the RCS LRC. v3: - Sanity check that we don't have numdw > remaining_dw. (Lucas) Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231016163449.1300701-14-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 0f60547f7d2c3db16b151540e6697c7d90a9f93b Author: Matt Roper Date: Mon Oct 16 09:34:55 2023 -0700 drm/xe/debugfs: Add dump of default LRCs' MI instructions For non-RCS engines, nearly all of the LRC state is composed of MI instructions (specifically MI_LOAD_REGISTER_IMM). Providing a dump interface allows us to verify that the context image layout matches what's documented in the bspec, and also allows us to check whether LRC workarounds are being properly captured by the default state we record at startup. For now, the non-MI instructions found in the RCS and CCS engines will dump as "unknown;" parsing of those will be added in a follow-up patch. v2: - Add raw instruction header as well as decoded meaning. (Lucas) - Check that num_dw isn't greater than remaining_dw for instructions that have a "# dwords" field. (Lucas) - Clarify comment about skipping over ppHWSP. (Lucas) Bspec: 64993 Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231016163449.1300701-13-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 0134f130e76ad6e323e15ccb00624586c8763075 Author: Matt Roper Date: Mon Oct 16 09:34:54 2023 -0700 drm/xe: Extract MI_* instructions to their own header Extracting the common MI_* instructions that can be used with any engine to their own header will make it easier as we add additional engine instructions in upcoming patches. Also, since the majority of GPU instructions (both MI and non-MI) have a "length" field in bits 7:0 of the instruction header, a common define is added for that. Instruction-specific length fields are still defined for special case instructions that have larger/smaller length fields. v2: - Use "instr" instead of "inst" as the short form of "instruction" everywhere. (Lucas) - Include xe_reg_defs.h instead of the i915 compat header. (Lucas) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231016163449.1300701-12-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 14a1e6a4a460fceae50fc1cf6b50d36c4ba96a7b Author: Matt Roper Date: Mon Oct 16 09:34:53 2023 -0700 drm/xe: Clarify number of dwords/qwords stored by MI_STORE_DATA_IMM MI_STORE_DATA_IMM can store either dword values or qword values, and can store more than one value if the instruction's length field is large enough. Create explicit defines to specify the number of dwords/qwords to be stored, which will set the instruction length correctly and, if necessary, turn on the 'store qword' bit. While we're here, also replace an open-coded version of MI_STORE_DATA_IMM with the common macros. Bspec: 60246 Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231016163449.1300701-11-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit e12a64881e97a78694012646cabd211399db8753 Author: Matt Roper Date: Mon Oct 16 09:34:52 2023 -0700 drm/xe: Separate number of registers from MI_LRI opcode Keeping the number of registers to be loaded as a separate macro from the instruction opcode will simplify some upcoming LRC parsing code. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231016163449.1300701-10-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit de54bb81d9d43d0b66a63d839963e9d359e0467d Author: Matt Roper Date: Mon Oct 16 09:34:51 2023 -0700 drm/xe: Make MI_FLUSH_DW immediate size more explicit Despite its name, MI_FLUSH_DW instruction can write an immediate value of either dword size or qword size, depending on the 'length' field of the instruction. Since "length" excludes the first two dwords of the instruction, a value of 2 in the length field implies a dword write and a value of 3 implies a qword write. Even in cases where the flush instruction's post-sync operation is set to "no write" we're still expected to size the overall instruction as if we were doing a dword or qword write (i.e., a length of 1 shouldn't be used on modern platforms). Rather than baking a size of "1" into the #define and then adding another unexplained "+ 1" at all the spots where the definition gets used, lets just create MI_FLUSH_IMM_DW and MI_FLUSH_IMM_QW definitions that should be OR'd into the instruction header to make it more explicit what behavior we're requesting. Bspec: 60229 Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231016163449.1300701-9-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 87a4c85d3a3ed579c86fd2612715ccb94c4001ff Author: Vitaly Lubart Date: Mon Aug 28 19:24:03 2023 +0300 drm/xe/gsc: add gsc device support Create mei-gscfi auxiliary device and configure interrupts to be consumed by mei-gsc device driver. Reviewed-by: Rodrigo Vivi Signed-off-by: Vitaly Lubart Signed-off-by: Alexander Usyskin Signed-off-by: Rodrigo Vivi commit 437d7a84ada7a4cfeab2d9555c446936c3fb09f4 Author: Vitaly Lubart Date: Wed Aug 30 13:05:40 2023 +0300 drm/xe/gsc: add has_heci_gscfi indication to device Mark support of MEI-GSC interaction per device. Add has_heci_gscfi indication to xe_device and xe_pci structures. Mark DG1 and DG2 devices as supported. Reviewed-by: Rodrigo Vivi Signed-off-by: Vitaly Lubart Signed-off-by: Alexander Usyskin Signed-off-by: Rodrigo Vivi commit 5120243bfb0dabc9f16924a5fc66e8ef26f0f8d3 Author: Vitaly Lubart Date: Mon Aug 28 13:07:07 2023 +0300 drm/xe/gsc: add HECI2 register offsets Add HECI2 register offsets for DG1 and DG2 to regs/xe_regs.h Reviewed-by: Rodrigo Vivi Signed-off-by: Vitaly Lubart Signed-off-by: Alexander Usyskin Signed-off-by: Rodrigo Vivi commit cd0adf746527dc2d1410adf5bf09ee6f4cd22a79 Author: Shekhar Chauhan Date: Wed Oct 11 21:15:26 2023 +0530 drm/xe/dg2: Remove one PCI ID The bspec was recently updated to remove PCI ID 0x5698; this ID is actually reserved for future use and should not be treated as DG2-G11. BSpec: 44477 Signed-off-by: Shekhar Chauhan Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231011154526.2819754-1-shekhar.chauhan@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 3445166655cdcdcf18f10ffa124e6ae0ee3018c6 Author: Shekhar Chauhan Date: Wed Oct 11 10:44:18 2023 +0530 drm/xe: Add new DG2 PCI IDs Add recently added PCI IDs for DG2 BSpec: 44477 Signed-off-by: Shekhar Chauhan Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231011051418.2767145-1-shekhar.chauhan@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit b6f45db5d08ac6ac1827ed64d009f3a25ad293c8 Author: José Roberto de Souza Date: Wed Oct 4 14:01:42 2023 -0700 drm/xe: Set PTE_AE for smem allocations in integrated devices Without this if a atomic operation is executed in Xe2 integrated GPUs it causes engine memory catastrophic error. This fixes at least 3 failures in piglit sanity and 2 failures in crucible for LNL. v3: - only add PTE_AE to smem in integrated Cc: Matt Roper Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit a4e2f3a299ea1c9c4b6d0e51048273eac28256b9 Author: Koby Elbaz Date: Thu Oct 5 11:06:19 2023 -0400 drm/xe: refactor xe_mmio_probe_tiles to support MMIO extension In future ASICs, there will be an additional MMIO extension space for all tiles altogether, residing on top of MMIO address space. Signed-off-by: Koby Elbaz Reviewed-by: Ofir Bitton Reviewed-by: Moti Haimovski Signed-off-by: Rodrigo Vivi commit ef29b390c7345f081412454538ab94c395068153 Author: Koby Elbaz Date: Thu Oct 5 11:06:18 2023 -0400 drm/xe: map MMIO BAR according to the num of tiles in device desc When MMIO BAR is initially mapped, the driver assumes a single tile device. However, former memory allocations take all tiles into account. First, a common standard for resource usage is needed here. Second, with the next (6th) patch in this series, the MMIO BAR remapping will be done only if a reduced-tile device is attached. Signed-off-by: Koby Elbaz Reviewed-by: Ofir Bitton Reviewed-by: Moti Haimovski Signed-off-by: Rodrigo Vivi commit 866b2b1764341ada0611f54c6b19285c32d20efa Author: Koby Elbaz Date: Thu Oct 5 11:06:17 2023 -0400 drm/xe: add MMIO extension support flags Besides the regular MMIO space that exists by default, MMIO extension support & MMIO extension tile size should both be defined per device, and updated from the device's descriptor. Signed-off-by: Koby Elbaz Reviewed-by: Ofir Bitton Reviewed-by: Moti Haimovski Signed-off-by: Rodrigo Vivi commit fdef72e02e20d7bc3c4b25607a2f8afa99d509eb Author: Koby Elbaz Date: Thu Oct 5 11:06:16 2023 -0400 drm/xe: add a flag to bypass multi-tile config from MTCFG reg Skip reading this register as it is not relevant in the new devices. Signed-off-by: Koby Elbaz Reviewed-by: Ofir Bitton Reviewed-by: Moti Haimovski Signed-off-by: Rodrigo Vivi commit 6360ebd1a12384efa984b44b057b79edce6484df Author: Koby Elbaz Date: Thu Oct 5 11:06:15 2023 -0400 drm/xe: add read/write support for MMIO extension space A distinction has to be made when addressing the MMIO space or the additional MMIO extension space. Signed-off-by: Koby Elbaz Reviewed-by: Ofir Bitton Reviewed-by: Moti Haimovski Signed-off-by: Rodrigo Vivi commit 399a13323f0d148bf00eff7e9156efe8a97063c0 Author: Koby Elbaz Date: Thu Oct 5 11:06:14 2023 -0400 drm/xe: add 28-bit address support in struct xe_reg Xe driver currently supports 22-bit addresses for MMIO access. Future platforms will have additional MMIO extension with larger address spaces, and to access them, the driver will have to support wider address representation. Please note that while the XE_REG macro is used for MMIO access, XE_REG_EXT macro will be used for MMIO-extension access. Signed-off-by: Koby Elbaz Reviewed-by: Ofir Bitton Reviewed-by: Moti Haimovski Signed-off-by: Rodrigo Vivi commit e814389ff180514001df424f48645cf30f4a2a1e Author: Matthew Auld Date: Fri Oct 6 09:46:16 2023 +0100 drm/xe: directly use pat_index for pte_encode In a future patch userspace will be able to directly set the pat_index as part of vm_bind. To support this we need to get away from using xe_cache_level in the low level routines and rather just use the pat_index directly. v2: Rebase v3: Some missed conversions, also prefer tile_to_xe() (Niranjana) v4: remove leftover const (Lucas) Signed-off-by: Matthew Auld Cc: Niranjana Vishwanathapura Cc: Pallavi Mishra Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: José Roberto de Souza Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Reviewed-by: Pallavi Mishra Signed-off-by: Rodrigo Vivi commit 406be3cc186eec67367b87a2af91cb598ff8e239 Author: Matthew Auld Date: Fri Oct 6 09:46:15 2023 +0100 drm/xe/pat: trim the xelp PAT table We don't seem to use the 4-7 pat indexes, even though they are defined by the HW. In a future patch userspace will be able to directly set the pat_index as part of vm_bind and we don't want to allow setting 4-7. Simplest is to just ignore them here. Suggested-by: Matt Roper Signed-off-by: Matthew Auld Cc: Pallavi Mishra Cc: Lucas De Marchi Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit e3fee3aa7a8911b60776127cb2e1c25ef8584f42 Author: Anusha Srivatsa Date: Thu Oct 5 13:54:50 2023 -0700 drm/xe: Add missing ADL entries to xe_test_wa With all ADl platforms and subplatforms added, also add support to xe_wa_test kunit tests for checking their WAs. Cc: Lucas De Marchi Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231005205450.3177354-6-anusha.srivatsa@intel.com Signed-off-by: Rodrigo Vivi commit 93b1b5f59d34d86f3debc35693c47e99935c4429 Author: Anusha Srivatsa Date: Thu Oct 5 13:54:49 2023 -0700 drm/xe/rpls: Add Stepping info for RPLS Add stepping-substepping info. Though it looks weird, the revision ID for the newer stepping is indeed backwards and is in accordance to the spec. v2: s/RPLS/RAPTORLAKE_S (Anusha) v3: rebase (Anusha) Signed-off-by: Anusha Srivatsa Reviewed-by: Matt Roper (v1) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231005205450.3177354-5-anusha.srivatsa@intel.com Signed-off-by: Rodrigo Vivi commit fcb33ca6d6296d2bd45550e26271797801aeb640 Author: Anusha Srivatsa Date: Thu Oct 5 13:54:48 2023 -0700 drm/xe/rpls: Add RPLS Support Add RPLS support that was missing apart from the PCI IDs. v2: Also add the support in xe_wa_test kunit v3: rebased. Cc: Dnyaneshwar Bhadane Signed-off-by: Anusha Srivatsa Reviewed-by: Matt Roper (v1) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231005205450.3177354-4-anusha.srivatsa@intel.com Signed-off-by: Rodrigo Vivi commit 30e3b2cfb576f6ddf098f6de2a264b1ed75caa4c Author: Anusha Srivatsa Date: Thu Oct 5 13:54:47 2023 -0700 drm/xe/rplu: s/ADLP/ALDERLAKE_P i915 now uses full names for platforms. So we now have ALDERLAKE instead of ADL. Extend this to xe driver as well. This will make it easier for macro magic usages. v2: Do not make changes to compat-i915-headers/i915_drv.h file with the rest of the changes (Jani) Cc: Jani Nikula Cc: Dnyaneshwar Bhadane Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231005205450.3177354-3-anusha.srivatsa@intel.com Signed-off-by: Rodrigo Vivi commit 1db6f9d4134ec242d294061cdde475d824e1e9ba Author: Gustavo Sousa Date: Wed Oct 4 10:08:24 2023 -0300 drm/xe/rtp: Fix doc for XE_RTP_ACTIONS Replace the paragraph that was meant for XE_RTP_RULES with one proper for XE_RTP_ACTIONS. Signed-off-by: Gustavo Sousa Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20231004130824.13909-1-gustavo.sousa@intel.com Signed-off-by: Rodrigo Vivi commit d2300987cf5a483acde519d671421b646f8d5390 Author: Lucas De Marchi Date: Fri Oct 6 11:23:25 2023 -0700 drm/xe/gt: Dump PAT table when failing to initialize When failing on early initialization, one cause may be that the PAT configuration is not correct. Dump it for ease of debugging. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231006182325.3617685-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 34803f9a4b3ab20dbc09ad13ed5fa98263896b37 Author: Lucas De Marchi Date: Fri Oct 6 11:23:24 2023 -0700 drm/xe/pat: Add debugfs node to dump PAT This is useful to debug cache issues, to double check if the PAT indexes match what they were supposed to be set to from spec. v2: Add separate functions for XeHP, XeHPC and XeLPG so it correctly reads the index based on MCR/REG registers and also decodes the fields (Matt Roper) v3: Starting with XeHPC, do not translate values to human-readable formats as the main goal is to make it easy to compare the table with the spec. Also, share a single array for xelp/xehp str map (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231006182325.3617685-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 5803bdc8ad6f0320b3147de7e565c24b3afe31fb Author: Lucas De Marchi Date: Fri Oct 6 11:23:23 2023 -0700 drm/xe/xe2: Add one more bit to encode PAT to ppgtt entries Xe2 adds one more bit to cover all the possible 32 entries. Although those entries are not used by internal kernel code paths, it's expected that userspace will make use of it. Bspec: 59510, 67095 Reviewed-by: Pallavi Mishra Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231006182325.3617685-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 811aa4d2074a9e64baeaa4bbc2773ead6247f101 Author: Matt Roper Date: Fri Oct 6 11:23:22 2023 -0700 drm/xe/xe2: Program PAT tables The PAT tables become significantly more complicated on Xe2 platforms. They now control L3, L4, and coherency settings, as well as additional characteristics such as compression. Aside from the main PAT table, there's an additional register that also needs to be programmed with PAT settings for PCI Address Translation Services. Bspec: 71582 Signed-off-by: Matt Roper Reviewed-by: Balasubramani Vivekanandan Link: https://lore.kernel.org/r/20231006182325.3617685-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit cf0b9e94c8c755ae94787d638c655bb38e7a8048 Author: David Kershner Date: Thu Oct 5 18:00:40 2023 -0400 drm/xe/tests/xe_migrate.c: Add vram to vram KUNIT test Add missing kunit test to migrate a bo from vram to vram Reviewed-by: Niranjana Vishwanathapura Reviewed-by: "Michael J. Ruhl" Signed-off-by: David Kershner Signed-off-by: Rodrigo Vivi commit d9e85dd5c24d9503391440c65a09fdc69d486d55 Author: David Kershner Date: Thu Oct 5 18:00:39 2023 -0400 drm/xe/xe_migrate.c: Use DPA offset for page table entries. Device Physical Address (DPA) is the starting offset device memory. Update xe_migrate identity map base PTE entries to start at dpa_base instead of 0. The VM offset value should be 0 relative instead of DPA relative. Reviewed-by: Niranjana Vishwanathapura Reviewed-by: "Michael J. Ruhl" Signed-off-by: David Kershner Signed-off-by: Rodrigo Vivi commit dfc83d4293f3f0b26d38952b3e491c1ed5f36b38 Author: Lucas De Marchi Date: Thu Sep 28 22:02:49 2023 -0700 drm/xe/xe2: Follow XeHPC for TLB invalidation Register GUC_TLB_INV_CR is gone in xe2. When GuC submission is not yet enabled, make sure to follow the same path as XeHPC. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 285230832eb794dfd1c9dc63d80367a714dbf75f Author: Lucas De Marchi Date: Thu Sep 28 22:02:48 2023 -0700 drm/xe/vm: Prefer xe_assert() over XE_WARN_ON() When xelp_pte_encode_addr() was added in commit 23c8495efeed ("drm/xe/migrate: Do not hand-encode pte"), there was no xe pointer for using xe_assert(). This is not the case anymore, so prefer it over XE_WARN_ON(). Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit f8ebadd0df248d7f0b5060fd8a0d956e773d9d78 Author: Matt Atwood Date: Fri Oct 6 09:47:59 2023 -0700 drm/xe: add gt tuning for indirect state Force indirect state sampler data to only be in the dynamic state pool, which is more convienent for the UMD. Behavior change mirrors similar change for i915 in commit 16fc9c08f0ec ("drm/i915: disable sampler indirect state in bindless heap") v2: split out per engine tuning into separate patch, commit message (Lucas) v3: rebase v4: Change to match render only, g.ver 1200 to 1271 (MattR) Acked-by: Lionel Landwerlin Reviewed-by: Matt Roper Signed-off-by: Matt Atwood Signed-off-by: Rodrigo Vivi commit a617b3048abea1cb424963f4354941b335d5a911 Author: Matt Atwood Date: Fri Oct 6 09:11:47 2023 -0700 drm/xe: Add infrastructure for per engine tuning Add the infrastructure for per engine tuning in preparation for disable indirect state. v3: Rebase v4: Fix rebasing issues Reviewed-by: Matt Roper Signed-off-by: Matt Atwood Signed-off-by: Rodrigo Vivi commit 3a13c2de442d6bfaef9c102cd1092e6cae22b753 Author: Matthew Auld Date: Thu Oct 5 17:38:55 2023 +0100 drm/xe/hwmon: fix uaf on unload It doesn't look like you can mix and match devm_ and drmmm_ for a managed resource. For drmmm the resources are all tracked in drm with its own list, and there is only one devm_ resource for the entire list. If the driver itself also adds some of its own devm resources, then those will be released first. In the case of hwmon the devm_kzalloc will be freed before the drmmm_ action to destroy the mutex allocated within, leading to uaf. Since hwmon itself wants to use devm, rather use that for the mutex destroy. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/766 Signed-off-by: Matthew Auld Cc: Badal Nilawar Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 5708a1080a2e455ca9f35e372f107d0c030358de Author: Lucas De Marchi Date: Wed Oct 4 08:03:17 2023 -0700 drm/xe/xe2: Add missing mocs entry Add index 4 so WB on both L3 and L4 can be used by userspace. Bspec: 71582 Link: https://lore.kernel.org/all/7oqovb356dx2hm5muop3xjqr4kv7m5fzjisch3vmsmxm33ygtv@eib4jielia35/ Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20231004150317.3473731-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit a8e2e0d7fab79b83cdc3bb2dd192c94564fa4298 Author: José Roberto de Souza Date: Tue Oct 3 13:19:06 2023 -0700 drm/xe: Remove devcoredump readout of IPEIR This register don't exist in gfx12+, so here dropping the readout and print in devcoredump. Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit d32c49e318df0a3f334c2d2ff95ce4600df2d6bf Author: José Roberto de Souza Date: Tue Oct 3 13:16:28 2023 -0700 drm/xe: Fix devcoredump readout of IPEHR It was reading (base) + 0x8c but that is not a valid register and instead it should read (base) + 0x68. So here reading the correct register and removing the wrong and duplicated. Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit f24cf6cea519cd5c8110ac8dcbdad70e9f2dfb22 Author: José Roberto de Souza Date: Tue Oct 3 10:21:30 2023 -0700 drm/xe: Fix RING_MI_MODE label in devcoredump Fix a typo in RING_MI_MODE label. Signed-off-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 0e1a234618a86cd4f920a09cfe9ac35f87e8c3f6 Author: Paulo Zanoni Date: Fri Sep 29 10:31:04 2023 -0700 drm/xe: fix range printing for debug messages We're already using the half-open interval notation "[A, B)", that "- 1" there makes it wrong. Also, getting rid of the "-1" makes it much easier to grep for the logs when you're looking for an address that's the end of a vma and the start of another. Signed-off-by: Paulo Zanoni Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 66aca8f04bb982b9f429fbce384beaa4badae21a Author: Paulo Zanoni Date: Fri Sep 29 10:31:03 2023 -0700 drm/xe/vm: use list_last_entry() to fetch last_op I would imagine that it's more efficient to fetch ops_list->prev than to walk the whole list forward. Signed-off-by: Paulo Zanoni Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 5f01a35b10f3d2f55634a471c43e59e3c6f239fd Author: Paulo Zanoni Date: Fri Sep 29 10:31:02 2023 -0700 drm/xe/vm: print the correct 'keep' when printing gpuva ops Unions are cool, until they aren't. Signed-off-by: Paulo Zanoni Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 71d0a32524f98ebb5034d74f204b613bf06e6925 Author: Badal Nilawar Date: Mon Sep 25 13:48:41 2023 +0530 drm/xe/hwmon: Expose hwmon energy attribute Expose hwmon energy attribute to show device level energy usage v2: - %s/hwm_/hwmon_/ - Convert enums to upper case v3: - %s/hwmon_/xe_hwmon - Remove gt specific hwmon attributes v4: - %s/REG_PKG_ENERGY_STATUS/REG_ENERGY_STATUS_ALL (Riana) - %s/hwmon_energy_info/xe_hwmon_energy_info (Riana) Acked-by: Rodrigo Vivi Reviewed-by: Riana Tauro Signed-off-by: Badal Nilawar Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230925081842.3566834-5-badal.nilawar@intel.com Signed-off-by: Rodrigo Vivi commit fbcdc9d3bf586c459cc66ffe802b0d4ba92e8406 Author: Badal Nilawar Date: Mon Sep 25 13:48:40 2023 +0530 drm/xe/hwmon: Expose input voltage attribute Use Xe HWMON subsystem to display the input voltage. v2: - Rename hwm_get_vltg to hwm_get_voltage (Riana) - Use scale factor SF_VOLTAGE (Riana) v3: - %s/gt_perf_status/REG_GT_PERF_STATUS/ - Remove platform check from hwmon_get_voltage() v4: - Fix review comments (Andi) Acked-by: Rodrigo Vivi Reviewed-by: Riana Tauro Signed-off-by: Badal Nilawar Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230925081842.3566834-4-badal.nilawar@intel.com Signed-off-by: Rodrigo Vivi commit 92d44a422d0d9e08ed9020cbf11915909e1f2ad3 Author: Badal Nilawar Date: Mon Sep 25 13:48:39 2023 +0530 drm/xe/hwmon: Expose card reactive critical power Expose the card reactive critical (I1) power. I1 is exposed as power1_crit in microwatts (typically for client products) or as curr1_crit in milliamperes (typically for server). v2: Move PCODE_MBOX macro to pcode file (Riana) v3: s/IS_DG2/(gt_to_xe(gt)->info.platform == XE_DG2) v4: Fix review comments (Andi) Acked-by: Rodrigo Vivi Reviewed-by: Riana Tauro Signed-off-by: Badal Nilawar Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230925081842.3566834-3-badal.nilawar@intel.com Signed-off-by: Rodrigo Vivi commit fb1b70607f73af5e5c9d02af203197191ab7abae Author: Badal Nilawar Date: Mon Sep 25 13:48:38 2023 +0530 drm/xe/hwmon: Expose power attributes Expose Card reactive sustained (pl1) power limit as power_max and card default power limit (tdp) as power_rated_max. v2: - Fix review comments (Riana) v3: - Use drmm_mutex_init (Matt Brost) - Print error value (Matt Brost) - Convert enums to uppercase (Matt Brost) - Avoid extra reg read in hwmon_is_visible function (Riana) - Use xe_device_assert_mem_access when applicable (Matt Brost) - Add intel-xe@lists.freedesktop.org in Documentation (Matt Brost) v4: - Use prefix xe_hwmon prefix for all functions (Matt Brost/Andi) - %s/hwmon_reg/xe_hwmon_reg (Andi) - Fix review comments (Guenter/Andi) v5: - Fix review comments (Riana) v6: - Use drm_warn in default case (Rodrigo) - s/ENODEV/EOPNOTSUPP (Andi) Acked-by: Rodrigo Vivi Reviewed-by: Riana Tauro Signed-off-by: Badal Nilawar Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230925081842.3566834-2-badal.nilawar@intel.com Signed-off-by: Rodrigo Vivi commit 9a674bef6cf0ad2e7653381cacda9fbc9c1ea67e Author: Matthew Brost Date: Fri Sep 29 13:02:54 2023 -0700 drm/xe: Fix exec queue usage for unbinds Passing in a NULL exec queue to __xe_pt_unbind_vma results in the migrate exec queue being used. This is not the intent from the VM bind IOCTL, rather a NULL exec queue should use default VM exec queue. Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 328e089bfb376a9817a260542fbea0fe9e0975ac Author: Balasubramani Vivekanandan Date: Thu Sep 28 22:15:39 2023 -0700 drm/xe: Leverage ComputeCS read L3 caching On platforms that support read L3 caching, set the default mocs index in CCS RING_CMD_CTL to leverage the read caching in L3. Currently PVC and Xe2 platforms have the support. Bspec: 72161 Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230929051539.3157441-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 30603b5b0f8678fff799f4e3e2b45b8c08648575 Author: Haridhar Kalvala Date: Fri Sep 29 14:36:40 2023 -0700 drm/xe/xe2: Update MOCS fields in blitter instructions Xe2 changes or adds bits for mocs in a few BLT instructions: XY_CTRL_SURF_COPY_BLT, XY_FAST_COLOR_BLT, XY_FAST_COPY_BLT, and MEM_SET. Modify the code to deal with the new location. Unlike Xe1, the MOCS field in those instructions is only the MOCS index and not the Structure_MEMORY_OBJECT_CONTROL_STATE anymore. The pxp bit is now explicitly documented separately. Bspec: 57567,57566,57565,57562 Cc: Matt Roper Signed-off-by: Haridhar Kalvala Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230929213640.3189912-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 4bdd8c2ed9572b757521e981cfb35a3581c112c8 Author: Haridhar Kalvala Date: Fri Sep 29 14:36:39 2023 -0700 drm/xe/xe2: Set tile y type in XY_FAST_COPY_BLT to Tile4 Set bits 30 and 31 of XY_FAST_COPY_BLT's dword1 for XeHP and above. Destination or source being Y-Major is selected on dword0 and there's nothing to set on dword1. According to the bspec for Xe2, "Behavior is undefined when programmed the value 0". Also for XeHP, the only value allowed in those bits is 0b11, not being possible to select "Legacy Tile-Y" anymore, only the newer Tile4. So, unconditionally set those bits for graphics IP 12.50 and above. v2: Reword commit message and extend it to graphics version >= 12.50 (Matt Roper) Bspec: 57567 Cc: Matt Roper Signed-off-by: Haridhar Kalvala Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230929213640.3189912-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit c690f0e6b7e61826535eb91a28bf99197345faf2 Author: Haridhar Kalvala Date: Fri Sep 29 14:36:38 2023 -0700 drm/xe: Rename MEM_SET instruction PVC_MS_* doesn't reflect the real name of the instruction. Rename it to follow the name used in the bspec. Cc: Matt Roper Signed-off-by: Haridhar Kalvala Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230929213640.3189912-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 2c0ac321d9975d670541eb3da19064f67b3f995b Author: Haridhar Kalvala Date: Fri Sep 29 14:36:37 2023 -0700 drm/xe: Adjust mocs field mask definitions Instead of using xe_mocs_index_to_value(), simply define the bitmask with the shift left applied. This will make it easier to adapt to new platforms that simply use the index. This also fixes PVC bug in emit_clear_link_copy() where the MOCS was getting shifted both by PVC_MS_MOCS_INDEX_MASK definition and by the xe_moc_index_to_value function. Bspec: 44509 Cc: Matt Roper Signed-off-by: Haridhar Kalvala Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230929213640.3189912-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 0dcac63649e37e176224f11f69a3c85653d0d887 Author: Lucas De Marchi Date: Thu Sep 28 21:49:59 2023 -0700 drm/xe/xe2: Extend reserved stolen sizes For xe2, besides the previous sizes, the reserved portion of stolen can also have 16MB and 32MB. Bspec: 53148 Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230929044959.3149265-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit c489925a154e164a46e4d1f9c62da3332e496edd Author: Matt Roper Date: Fri Sep 29 16:03:33 2023 -0700 drm/xe/tuning: Add missing engine class rules for LRC tuning The LRC tuning settings we have today are modifying registers that are part of the RCS engine's context; they're not part of the general CSFE context that would apply to all engines. Add ENGINE_CLASS(RENDER) to the RTP rules to properly restrict these to the RCS. Bspec: 46255, 46261 Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230929230332.3348841-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit e2e2d9633706f79e6efaa826cf72cbc12cf531f8 Author: Fei Yang Date: Thu Sep 21 15:05:00 2023 -0700 drm/xe: timeout needs to be a signed value In xe_wait_user_fence_ioctl, the timeout is currently defined as unsigned long. That could potentially pass a negative value to the schedule_timeout() call because nsecs_to_jiffies() returns an unsigned long which gets used as signed long. [ 187.732238] schedule_timeout: wrong timeout value fffffffffffffc18 [ 187.733180] CPU: 0 PID: 792 Comm: test_thread_dim Tainted: G U 6.4.0-xe #1 [ 187.734251] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007 [ 187.735019] Call Trace: [ 187.735373] [ 187.735687] dump_stack_lvl+0x92/0xb0 [ 187.736193] schedule_timeout+0x348/0x430 [ 187.736739] ? __might_fault+0x67/0xd0 [ 187.737255] ? check_chain_key+0x224/0x2d0 [ 187.737812] ? __pfx_schedule_timeout+0x10/0x10 [ 187.738429] ? __might_fault+0x6b/0xd0 [ 187.738946] ? __pfx_lock_release+0x10/0x10 [ 187.739512] ? __pfx_lock_release+0x10/0x10 [ 187.740080] wait_woken+0x86/0x100 [ 187.740556] xe_wait_user_fence_ioctl+0x34b/0xe00 [xe] [ 187.741281] ? __pfx_xe_wait_user_fence_ioctl+0x10/0x10 [xe] [ 187.742075] ? lock_acquire+0x169/0x3d0 [ 187.742601] ? check_chain_key+0x224/0x2d0 [ 187.743158] ? drm_dev_enter+0x9/0xe0 [drm] [ 187.743740] ? __pfx_woken_wake_function+0x10/0x10 [ 187.744388] ? drm_dev_exit+0x11/0x50 [drm] [ 187.744969] ? __pfx_lock_release+0x10/0x10 [ 187.745536] ? __might_fault+0x67/0xd0 [ 187.746052] ? check_chain_key+0x224/0x2d0 [ 187.746610] drm_ioctl_kernel+0x172/0x250 [drm] [ 187.747242] ? __pfx_xe_wait_user_fence_ioctl+0x10/0x10 [xe] [ 187.748037] ? __pfx_drm_ioctl_kernel+0x10/0x10 [drm] [ 187.748729] ? __pfx_xe_wait_user_fence_ioctl+0x10/0x10 [xe] [ 187.749524] ? __pfx_xe_wait_user_fence_ioctl+0x10/0x10 [xe] [ 187.750319] drm_ioctl+0x35e/0x620 [drm] [ 187.750871] ? __pfx_drm_ioctl+0x10/0x10 [drm] [ 187.751495] ? restore_fpregs_from_fpstate+0x99/0x140 [ 187.752172] ? __pfx_restore_fpregs_from_fpstate+0x10/0x10 [ 187.752901] ? mark_held_locks+0x24/0x90 [ 187.753438] __x64_sys_ioctl+0xb4/0xf0 [ 187.753954] do_syscall_64+0x3f/0x90 [ 187.754450] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 187.755127] RIP: 0033:0x7f4e6651aaff [ 187.755623] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00 [ 187.757995] RSP: 002b:00007fff05f37a50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 187.758995] RAX: ffffffffffffffda RBX: 000055eca47c8130 RCX: 00007f4e6651aaff [ 187.759935] RDX: 00007fff05f37b60 RSI: 00000000c050644b RDI: 0000000000000004 [ 187.760874] RBP: 0000000000000017 R08: 0000000000000017 R09: 7fffffffffffffff [ 187.761814] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 187.762753] R13: 0000000000000000 R14: 0000000000000000 R15: 00007f4e65d19ce0 [ 187.763694] Fixes: 5572a0046857 ("drm/xe: Use nanoseconds instead of jiffies in uapi for user fence") Signed-off-by: Fei Yang Cc: Andi Shyti Cc: Zbigniew Kempczyński Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230921220500.994558-2-fei.yang@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 9be79251813d113f9157e92cd8b0eb8563253a09 Author: Fei Yang Date: Wed Sep 27 21:43:35 2023 -0700 drm/xe: set PTE_AE for all platforms supporting it Atomic access is supported by PVC, and became a common feature for all platforms starting from Xe2. To enable that XE_VMA_ATOMIC_PTE_BIT needs to be set, then pte encode will eventually set PTE_AE for devmem. Signed-off-by: Fei Yang Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230928044335.1474903-2-fei.yang@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 909faaa66c5ec0d789b6620127329f2b17b01602 Author: Bommithi Sakeena Date: Wed Sep 27 16:50:12 2023 +0000 drm/xe: Add a missing mutex_destroy to xe_ttm_vram_mgr Ensure that the mutex is destroyed at fini function. Cc: Maarten Lankhorst Signed-off-by: Bommithi Sakeena Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 28b1d9155c3c1651a6e184e1286cebb63ec6b51c Author: Bommithi Sakeena Date: Wed Sep 27 16:50:11 2023 +0000 drm/xe: Ensure mutex are destroyed Add missing mutex_destroy calls to fini functions or convert to drmm_mutex_init where fini function is not available. Cc: Matthew Brost Signed-off-by: Bommithi Sakeena Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 5349bb76d62048e73f6e4a863b40a309c62dc47f Author: Ohad Sharabi Date: Thu Sep 28 16:56:21 2023 +0300 drm/xe: do not register to PM if GuC is disabled When working without GuC (i.e. working with execlists), the flow attempts to perform suspend operation which is failing due to a lack of support without GuC. If PM ops are not supported without GuC we may as well avoid PM registration rather than returning errors from various PM flows. Signed-off-by: Ohad Sharabi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 1464f56b47d8db63ad95dad3fd8845ec412dc8d5 Author: Lucas De Marchi Date: Wed Sep 27 12:39:01 2023 -0700 drm/xe: Use vfunc for ggtt pte encoding Use 2 different functions for encoding the ggtt's pte, assigning them during initialization. Main difference is that before Xe-LPG, the pte didn't have the cache bits. v2: Re-use xelp_ggtt_pte_encode_bo() for the common part with xelpg_ggtt_pte_encode_bo() (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-11-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit fcd75139cd3c76467c8495c750fd6e27787f7e37 Author: Lucas De Marchi Date: Wed Sep 27 12:39:00 2023 -0700 drm/xe: Use pat_index to encode pde/pte Change the xelp_pte_encode() and xelp_pde_encode() functions to use the platform-dependent pat_index. The same function can be used for all platforms as they only need to encode the pat_index bits in the same pte/pde layout. For platforms that don't have the most significant bit, as long as they don't return a bogus index they should be fine. v2: Use the same logic to encode pde as it's compatible with previous logic, it's more future proof and also fixes the cache setting for PVC (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-10-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 0d68247efcdbf7791122071323719310207354f3 Author: Lucas De Marchi Date: Wed Sep 27 12:38:59 2023 -0700 drm/xe/pat: Keep track of relevant indexes Some of the PAT entries are relevant for internal driver use, which varies per platform. Let the PAT early initialization set what they should point to so the rest of the driver can use them where needed. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-9-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 451028644775a5e07aaab3f147fda583e7054de6 Author: Lucas De Marchi Date: Wed Sep 27 12:38:58 2023 -0700 drm/xe/pat: Prefer the arch/IP names Both DG2 and PVC are derived from XeHP, but DG2 should not really re-use something introduced by PVC, so it's odd to have DG2 re-using the PVC programming for PAT. Let's prefer using the architecture and/or IP names. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-8-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 194bdb859950a4223305ee766a3b9d90c398d158 Author: Lucas De Marchi Date: Wed Sep 27 12:38:57 2023 -0700 drm/xe/dg2: Fix using wrong PAT table DG2 should use the MCR variant to program the PAT registers, like PVC, but shouldn't use the same table as PVC. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-7-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit b445be5710200501bba693fe6f9c614895412b94 Author: Lucas De Marchi Date: Wed Sep 27 12:38:56 2023 -0700 drm/xe: Use vfunc to initialize PAT Split the PAT initialization between SW-only and HW. The _early() only sets up the ops and data structure that are used later to program the tables. This allows the PAT to be easily extended to other platforms. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 23c8495efeed0d83657de89b44a569ac406bdfad Author: Lucas De Marchi Date: Wed Sep 27 12:38:55 2023 -0700 drm/xe/migrate: Do not hand-encode pte Instead of encoding the pte, call a new vfunc from xe_vm to handle that. The encoding may not be the same on every platform, so keeping it in one place helps to better support them. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 0e5e77bd9704edf1713ebed37e2da1b4faa25a52 Author: Lucas De Marchi Date: Wed Sep 27 12:38:54 2023 -0700 drm/xe: Use vfunc for pte/pde ppgtt encoding Move the function to encode pte/pde to be vfuncs inside struct xe_vm. This will allow to easily extend to platforms that don't have a compatible encoding. v2: Fix kunit build Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit b3bb7d9c561d664707717f8887b665ce8fef69ff Author: Lucas De Marchi Date: Wed Sep 27 12:38:53 2023 -0700 drm/xe: Remove check for vma == NULL vma at this point can never be NULL as otherwise it would crash earlier in the only caller, xe_pt_stage_bind_entry(). Remove the extra check and avoid adding and removing the bits from the pte. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit f24081cd6275748d4f7c5925645436ed406cec12 Author: Lucas De Marchi Date: Wed Sep 27 12:38:52 2023 -0700 drm/xe: Normalize pte/pde encoding Split functions that do only part of the pde/pte encoding and that can be called by the different places. This normalizes how pde/pte are encoded so they can be moved elsewhere in a subsequent change. xe_pte_encode() was calling __pte_encode() with a NULL vma, which is the opposite of what xe_pt_stage_bind_entry() does. Stop passing a NULL vma and just split another function that deals with a vma rather than a bo. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230927193902.2849159-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 1951dad5347e8b618f545d2c14f8d2816be61b1f Author: Matt Roper Date: Wed Sep 27 13:51:44 2023 -0700 drm/xe: Infer service copy functionality from engine list On platforms with multiple BCS engines (i.e., PVC and Xe2), not all BCS engines are created equal. The BCS0 engine is what the specs refer to as a "resource copy engine," which supports the platform's full set of copy/fill instructions. In contast, the non-BCS0 "service copy" engines are more streamlined and only support a subset of the GPU instructions supported by the resource copy engine. Platforms with both types of copy engines always support the MEM_COPY and MEM_SET instructions which can be used for simple copy and fill operations on either type of BCS engine. Since the simple MEM_SET instruction meets the needs of Xe's migrate code (and since the more elaborate XY_FAST_COLOR_BLT instruction isn't available to use on service copy engines), we always prefer to use MEM_SET for clearing buffers on our newer platforms. We've been using a 'has_link_copy_engine' feature flag to keep track of which platforms should use MEM_SET for fills. However a feature flag like this is unnecessary since we can already derive the presence of service copy engines (and in turn the MEM_SET instruction) just by looking at the platform's pre-fusing engine list. Utilizing the engine list for this also avoids mistakes like we've made on Xe2 where we forget to set the feature flag in the IP definition. For clarity, "service copy" is a general term that covers any blitter engines that support a limited subset of the overall blitter instruction set (in practice this is any non-BCS0 blitter engine). The "link copy engines" introduced on PVC and the "paging copy engine" present in Xe2 are both instances of service copy engines. v2: - Rewrite / expand the commit message. (Bala) - Fix checkpatch whitespace error. Bspec: 65019 Cc: Lucas De Marchi Cc: Balasubramani Vivekanandan Reviewed-by: Haridhar Kalvala Link: https://lore.kernel.org/r/20230927205143.2695089-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 51a5d656090e0a865d91f1e6ce0c7a09d71a4b70 Author: Gustavo Sousa Date: Tue Sep 26 19:19:15 2023 -0300 drm/xe/irq: Clear GFX_MSTR_IRQ as part of IRQ reset Starting with Xe_LP+, GFX_MSTR_IRQ contains status bits that have W1C behavior. If we do not properly reset them, we would miss delivery of interrupts if a pending bit is set when enabling IRQs. As an example, the display part of our probe routine contains paths where we wait for vblank interrupts. If a display interrupt was already pending when enabling IRQs, we would time out waiting for the vblank. That in fact happened recently when modprobing Xe on a Lunar Lake with a specific configuration; and that's how we found out we were missing this step in the IRQ enabling logic. Fix the issue by clearing GFX_MSTR_IRQ as part of the IRQ reset. v2: - Make resetting GFX_MSTR_IRQ be the last step to avoid bit re-latching. (Ville) v3: - Swap nesting order: guard loop with the IP version check instead of doing the check at each iteration. (Lucas) v4: - Add braces for the "if" statement guarding the loop to make the compiler happy. (Gustavo) BSpec: 50875, 54028, 62357 Cc: Matt Roper Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230926221914.106843-2-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit 5fdd4b21aed8a33fd8e8f8fb3dc2f0c8f659918b Author: Shekhar Chauhan Date: Mon Sep 25 21:35:43 2023 +0530 drm/xe: Add Wa_18028616096 Drop UGM per set fragment threshold to 3 BSpec: 54833 Signed-off-by: Shekhar Chauhan Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230925160543.915217-1-shekhar.chauhan@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 02cadbb5d123204ce193672007868d18db762172 Author: Pallavi Mishra Date: Thu Sep 21 03:02:59 2023 +0530 drm/xe: Align size to PAGE_SIZE Ensure alignment with PAGE_SIZE for the size parameter passed to __xe_bo_create_locked() v2: move size alignment under else condition (Lucas) Signed-off-by: Pallavi Mishra Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230920213259.3458968-1-pallavi.mishra@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit babba646785d6855cba64fb0480beb8d3421cc52 Author: Lucas De Marchi Date: Fri Sep 22 10:43:20 2023 -0700 drm/xe: Accept a const xe device Depending on the context, it's preferred to have a const pointer to make sure nothing is modified underneath. The assert macros only ever read data from xe/tile/gt for printing, so they can be made const by default. Reviewed-by: Michal Wajdeczko Link: https://lore.kernel.org/r/20230922174320.2372617-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit bc18dae50f165bc1c18284fe59d77dd00617b530 Author: Dani Liberman Date: Mon Sep 18 14:48:48 2023 +0300 drm/xe: add msix support In future devices we will need to support msix interrupts. Reviewed-by: Ohad Sharabi Signed-off-by: Dani Liberman Signed-off-by: Rodrigo Vivi commit 14d25d8d684d0196d160653659c5afbf5af777f0 Author: Dani Liberman Date: Mon Sep 18 14:48:47 2023 +0300 drm/xe: change old msi irq api to a new one As a preparation for msix support, changing for new msi irq api which supports both msi and msix. Reviewed-by: Ohad Sharabi Signed-off-by: Dani Liberman Signed-off-by: Rodrigo Vivi [Rebase fixes by Rodrigo] commit dbac286d8529d6debc0f56fa9a3ea26f78826997 Author: Dani Liberman Date: Mon Sep 18 14:48:46 2023 +0300 drm/xe: proper setting of irq enabled flag IRQ enabled flag should be set only after request irq succeeds. Reviewed-by: Ohad Sharabi Signed-off-by: Dani Liberman Signed-off-by: Rodrigo Vivi commit 0845233388f8a26d00acf9bf230cfd4f36aa4c30 Author: Tejas Upadhyay Date: Fri Sep 15 23:39:01 2023 +0530 drm/xe: Implement fdinfo memory stats printing Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories. Objects with multiple possible placements are reported in multiple regions for total and shared sizes, while other categories are counted only for the currently active region. V4: - Remove rcu lock - Auld/Thomas - take refcnt only if its non-zero - Auld - DMA_RESV_USAGE_BOOKKEEP covers all fences - Auld - covert to xe_bo for public objects V3: - dont use xe_bo_get/put, not needed - use designated initializer - Jani - use list_for_each_entry_rcu - Fix Checkpatch err - CI V2: - Use static initializer for mem_type - Himal/Jani Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 303fb1165765e1629e2a82bd1ebbea676c86b33e Author: Tejas Upadhyay Date: Tue Aug 29 10:52:23 2023 +0530 drm/xe: Account ring buffer and context state storage Account ring buffers and logical context space against the owning client memory usage stats. Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 2ff00c4f77ab68e04f381c721117f98fb3228a11 Author: Tejas Upadhyay Date: Thu Sep 14 15:25:16 2023 +0530 drm/xe: Track page table memory usage for client Account page table memory usage in the owning client memory usage stats. V2: - Minor tweak to if (vm->pt_root[id]) check - Himal Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 9e4e9761e64ea1086629852d30c08307538154ec Author: Tejas Upadhyay Date: Thu Aug 10 11:33:24 2023 +0530 drm/xe: Record each drm client with its VM Enable accounting of indirect client memory usage. Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit b27970f3e11c616c7a5121537502f6e21a460881 Author: Tejas Upadhyay Date: Thu Sep 21 17:11:34 2023 +0530 drm/xe: Add tracking support for bos per client In order to show per client memory consumption, we need tracking support APIs to add at every bo consumption and removal. Adding APIs here to add tracking calls at places wherever it is applicable. V5: - Rebase V4: - remove client bo before vm_put - spin_lock_irqsave not required - Auld V3: - update .h to return xe_drm_client_remove_bo void - protect xe_drm_client_remove_bo under CONFIG_PROC_FS check - Himal - Fixed Checkpatch error - CI V2: - make xe_drm_client_remove_bo return void - Himal Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 85c6ad1aa263a852d51d980575e7c1c305f1697e Author: Tejas Upadhyay Date: Thu Sep 14 15:38:47 2023 +0530 drm/xe: Interface xe drm client with fdinfo interface DRM core driver has introduced recently fdinfo interface to show memory stats of individual drm client. Lets interface xe drm client to fdinfo interface. V2: - cover call to xe_drm_client_fdinfo under PROC_FS Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 8f965392c4d915195307979640295189eec94df4 Author: Tejas Upadhyay Date: Thu Sep 14 17:25:14 2023 +0530 drm/xe: Add drm-client infrastructure Add drm-client infrastructure to record stats of consumption done by individual drm client. V2: - Typo - CI Reviewed-by: Himal Prasad Ghimiray Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit cb90d469183cc8335d646484d66bd3c3643683cc Author: Daniele Ceraolo Spurio Date: Thu Sep 14 14:48:02 2023 -0700 drm/xe: Add child contexts to the GuC context lookup The CAT_ERROR message from the GuC provides the guc id of the context that caused the problem, which can be a child context. We therefore need to be able to match that id to the exec_queue that owns it, which we do by adding child context to the context lookup. While at it, fix the error path of the guc id allocation code to correctly free the ids allocated for parallel queues. v2: rebase on s/XE_WARN_ON/xe_assert Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/590 Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Brost Cc: John Harrison Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 0d0534750f9d4575abf0da3b41a78e5643e6c8dd Author: Matt Roper Date: Wed Sep 13 16:14:17 2023 -0700 drm/xe/wa: Apply tile workarounds at probe/resume Although the vast majority of workarounds the driver needs to implement are either GT-based or display-based, there are occasionally workarounds that reside outside those parts of the hardware (i.e., in they target registers in the sgunit/soc); we can consider these to be "tile" workarounds since there will be instance of these registers per tile. The registers in question should only lose their values during a function-level reset, so they only need to be applied during probe and resume; the registers will not be affected by GT/engine resets. Tile workarounds are rare (there's only one, 22010954014, that's relevant to Xe at the moment) so it's probably not worth updating the xe_rtp design to handle tile-level workarounds yet, although we may want to consider that in the future if/when more of these show up on future platforms. Reviewed-by: Lucas De Marchi Acked-by: Jani Nikula Link: https://lore.kernel.org/r/20230913231411.291933-13-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 7764222d54b71a9577cff9296420bf0a780b0c5d Author: Thomas Hellström Date: Wed Sep 20 11:50:01 2023 +0200 drm/xe: Disallow pinning dma-bufs in VRAM For now only support pinning in TT memory, for two reasons: 1) Avoid pinning in a placement not accessible to some importers. 2) Pinning in VRAM requires PIN accounting which is a to-do. v2: - Adjust the dma-buf kunit test accordingly. Suggested-by: Oded Gabbay Signed-off-by: Thomas Hellström Reviewed-by: Oded Gabbay Link: https://patchwork.freedesktop.org/patch/msgid/20230920095001.5539-1-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit d435a039646eee712f4d5da2405181015c30bb1a Author: Gustavo Sousa Date: Fri Sep 15 19:02:33 2023 -0300 drm/xe: Simplify final return from xe_irq_install() At the end of the function, we will always return err no matter it's value. Simplify this by just returning the result of drmm_add_action_or_reset(). Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230915220233.59736-1-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit fc678ec7c2e037fcc1bb678403036a9772e61dbd Author: Thomas Hellström Date: Fri Sep 15 19:26:06 2023 +0200 drm/xe: Reinstate pipelined fence enable_signaling With the GPUVA conversion, the xe_bo::vmas member became replaced with drm_gem_object::gpuva.list, however there was a couple of usage instances left using the old member. Most notably the pipelined fence enable_signaling. Remove the xe_bo::vmas member completely, fix usage instances and also enable this pipelined fence enable_signaling even for faulting VM:s since we actually wait for bind fences to complete. v2: - Rebase. v3: - Fix display code build error. Cc: Matthew Brost Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230915172606.14436-1-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit a455ed04669f03bbb1f22267f1237983e026739f Author: Daniele Ceraolo Spurio Date: Wed Sep 13 16:28:37 2023 -0700 drm/xe/uc: Add GuC/HuC firmware path overrides When testing a new binary and/or debugging binary-related issues, it is useful to have the option to change which binary is loaded without having to update and re-compile the kernel. To support this option, this patch adds 2 new modparams to override the FW path for GuC and HuC. The HuC modparam can also be set to an empty string to disable HuC loading. Note that those modparams only take effect on platforms where we already have a default FW, so we're sure there is support for FW loading and the kernel isn't going to explode in an undefined path. v2: simplify comment (John), rebase on s/guc_submission_enabled/uc_enabled Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Matthew Brost Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit 757308471dbe9aba28cdaf40848936923216a1f2 Author: Daniele Ceraolo Spurio Date: Wed Sep 13 16:28:36 2023 -0700 drm/xe/uc: Fix uC status tracking The current uC status tracking has a few issues: 1) the HuC is moved to "disabled" instead of "not supported" 2) the status is left uninitialized instead of "disabled" when the modparam is used to disable support 3) due to #1, a number of checks are done against "disabled" instead of the appropriate status. Address all of those by making sure to follow the appropriate state transition and checking against the required state. v2: rebase on s/guc_submission_enabled/uc_enabled/ Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Matthew Brost Reviewed-by: John Harrison Signed-off-by: Rodrigo Vivi commit c4991ee01d480c45c789b43eb001a978bf016f58 Author: Daniele Ceraolo Spurio Date: Wed Sep 13 16:28:35 2023 -0700 drm/xe/uc: Rename guc_submission_enabled() to uc_enabled() The guc_submission_enabled() function is being used as a boolean toggle for all firmwares and all related features, not just GuC submission. We could add additional flags/functions to distinguish and allow different use-cases (e.g. loading HuC but not using GuC submission), but given that not using GuC is a debug-only scenario having a global switch for all FWs is enough. However, we want to make it clear that this switch turns off everything, so rename it to uc_enabled(). v2: rebase on s/XE_WARN_ON/xe_assert Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Cc: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 3856b0f71f52b8397887c1765e14d0245d722233 Author: Aravind Iddamsetty Date: Wed Aug 30 08:48:53 2023 +0530 drm/xe/pmu: Enable PMU interface There are a set of engine group busyness counters provided by HW which are perfect fit to be exposed via PMU perf events. BSPEC: 46559, 46560, 46722, 46729, 52071, 71028 events can be listed using: perf list xe_0000_03_00.0/any-engine-group-busy-gt0/ [Kernel PMU event] xe_0000_03_00.0/copy-group-busy-gt0/ [Kernel PMU event] xe_0000_03_00.0/interrupts/ [Kernel PMU event] xe_0000_03_00.0/media-group-busy-gt0/ [Kernel PMU event] xe_0000_03_00.0/render-group-busy-gt0/ [Kernel PMU event] and can be read using: perf stat -e "xe_0000_8c_00.0/render-group-busy-gt0/" -I 1000 time counts unit events 1.001139062 0 ns xe_0000_8c_00.0/render-group-busy-gt0/ 2.003294678 0 ns xe_0000_8c_00.0/render-group-busy-gt0/ 3.005199582 0 ns xe_0000_8c_00.0/render-group-busy-gt0/ 4.007076497 0 ns xe_0000_8c_00.0/render-group-busy-gt0/ 5.008553068 0 ns xe_0000_8c_00.0/render-group-busy-gt0/ 6.010531563 43520 ns xe_0000_8c_00.0/render-group-busy-gt0/ 7.012468029 44800 ns xe_0000_8c_00.0/render-group-busy-gt0/ 8.013463515 0 ns xe_0000_8c_00.0/render-group-busy-gt0/ 9.015300183 0 ns xe_0000_8c_00.0/render-group-busy-gt0/ 10.017233010 0 ns xe_0000_8c_00.0/render-group-busy-gt0/ 10.971934120 0 ns xe_0000_8c_00.0/render-group-busy-gt0/ The pmu base implementation is taken from i915. v2: Store last known value when device is awake return that while the GT is suspended and then update the driver copy when read during awake. v3: 1. drop init_samples, as storing counters before going to suspend should be sufficient. 2. ported the "drm/i915/pmu: Make PMU sample array two-dimensional" and dropped helpers to store and read samples. 3. use xe_device_mem_access_get_if_ongoing to check if device is active before reading the OA registers. 4. dropped format attr as no longer needed 5. introduce xe_pmu_suspend to call engine_group_busyness_store 6. few other nits. v4: minor nits. v5: take forcewake when accessing the OAG registers v6: 1. drop engine_busyness_sample_type 2. update UAPI documentation v7: 1. update UAPI documentation 2. drop MEDIA_GT specific change for media busyness counter. Co-developed-by: Tvrtko Ursulin Co-developed-by: Bommu Krishnaiah Signed-off-by: Aravind Iddamsetty Reviewed-by: Ashutosh Dixit Signed-off-by: Rodrigo Vivi commit cd8534193a4b4e4e0f8c8ee99d96293035e0ffba Author: Aravind Iddamsetty Date: Wed Aug 30 08:38:33 2023 +0530 drm/xe: Use spinlock in forcewake instead of mutex In PMU we need to access certain registers which fall under GT power domain for which we need to take forcewake. But as PMU being an atomic context can't expect to have any sleeping calls. Reviewed-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi Signed-off-by: Aravind Iddamsetty Signed-off-by: Rodrigo Vivi commit 8d07691c35bfd08fe16f865b9df04204604b36d5 Author: Aravind Iddamsetty Date: Wed Aug 30 08:46:50 2023 +0530 drm/xe: Get GT clock to nanosecs Helper to convert GT clock cycles to nanoseconds. v2: Use DIV_ROUND_CLOSEST_ULL helper(Ashutosh) v3: rename xe_gt_clock_interval_to_ns to xe_gt_clock_cycles_to_ns Reviewed-by: Tejas Upadhyay Reviewed-by: Ashutosh Dixit Signed-off-by: Aravind Iddamsetty Signed-off-by: Rodrigo Vivi commit 430003b85ce36e6f9dd6799b6cd5690f9b6c8a2a Author: Daniele Ceraolo Spurio Date: Wed Sep 6 16:00:10 2023 -0700 drm/xe/guc: Switch to major-only GuC FW tracking for MTL Newer HuC binaries for MTL (8.5.1+) require GuC 70.7 or newer, so we need to move on from 70.6.4. Given that the MTL GuC uses major-only version matching in i915, we can do the same here instead of just bumping the version (and having to push the versioned binaries, because they're not there already for i915). Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit c73acc1eeba5e380a367087cb7b933b946613ee7 Author: Francois Dugast Date: Tue Sep 12 08:36:35 2023 +0000 drm/xe: Use Xe assert macros instead of XE_WARN_ON macro The XE_WARN_ON macro maps to WARN_ON which is not justified in many cases where only a simple debug check is needed. Replace the use of the XE_WARN_ON macro with the new xe_assert macros which relies on drm_*. This takes a struct drm_device argument, which is one of the main changes in this commit. The other main change is that the condition is reversed, as with XE_WARN_ON a message is displayed if the condition is true, whereas with xe_assert it is if the condition is false. v2: - Rebase - Keep WARN splats in xe_wopcm.c (Matt Roper) v3: - Rebase Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 1975b5917a94429096f6a2cccc97ed91e0425708 Author: Michal Wajdeczko Date: Tue Sep 12 20:29:56 2023 +0200 drm/xe: Introduce Xe assert macros As we are moving away from the controversial XE_BUG_ON macro, relying just on WARN_ON or drm_err does not cover the cases where we want to annotate functions with additional detailed debug checks to assert that all prerequisites are satisfied, without paying footprint or performance penalty on non-debug builds, where all misuses introduced during code integration were already fixed. Introduce family of Xe assert macros that try to follow classic assert() utility and can be compiled out on non-debug builds. Macros are based on drm_WARN, but unlikely to origin, disallow use in expressions since we will compile that code out. As we are operating on the xe pointers, we can print additional information about the device, like tile or GT identifier, that is not available from generic WARN report: [ ] xe 0000:00:02.0: [drm] Assertion `true == false` failed! platform: 1 subplatform: 1 graphics: Xe_LP 12.00 step B0 media: Xe_M 12.00 step B0 display: enabled step D0 tile: 0 VRAM 0 B GT: 0 type 1 [ ] xe 0000:b3:00.0: [drm] Assertion `true == false` failed! platform: 7 subplatform: 3 graphics: Xe_HPG 12.55 step A1 media: Xe_HPM 12.55 step A1 display: disabled step ** tile: 0 VRAM 14.0 GiB GT: 0 type 1 [ ] WARNING: CPU: 0 PID: 2687 at drivers/gpu/drm/xe/xe_device.c:281 xe_device_probe+0x374/0x520 [xe] [ ] RIP: 0010:xe_device_probe+0x374/0x520 [xe] [ ] Call Trace: [ ] ? __warn+0x7b/0x160 [ ] ? xe_device_probe+0x374/0x520 [xe] [ ] ? report_bug+0x1c3/0x1d0 [ ] ? handle_bug+0x42/0x70 [ ] ? exc_invalid_op+0x14/0x70 [ ] ? asm_exc_invalid_op+0x16/0x20 [ ] ? xe_device_probe+0x374/0x520 [xe] [ ] ? xe_device_probe+0x374/0x520 [xe] [ ] xe_pci_probe+0x6e3/0x950 [xe] [ ] ? lockdep_hardirqs_on+0xc7/0x140 [ ] pci_device_probe+0x9e/0x160 [ ] really_probe+0x19d/0x400 v2: use lowercase names v3: apply xe coding style v4: fix non-debug build and improve kernel-doc Signed-off-by: Michal Wajdeczko Cc: Oded Gabbay Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Matthew Brost Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: Lucas De Marchi Acked-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 5c0553cdc811bb6af4f1bfef178bd07fc16a797e Author: Francois Dugast Date: Tue Sep 12 08:36:33 2023 +0000 drm/xe: Replace XE_WARN_ON with drm_warn when just printing a string Use the generic drm_warn instead of the driver-specific XE_WARN_ON in cases where XE_WARN_ON is used to unconditionally print a debug message. v2: Rebase Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 30278e299646a1a8f9c1fd1da33768440f71bb42 Author: Matthew Brost Date: Mon Sep 11 14:10:32 2023 -0700 drm/xe: Fix fence reservation accouting Both execs and the preempt rebind worker can issue rebinds. Rebinds require a fence, per tile, inserted into dma-resv slots of the VM and BO (if external). The fence reservation accouting did not take into account the number of fences required for rebinds, fix this. v2: Rebase Reviewed-by: Thomas Hellström Reported-by: Christopher Snowhill Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/518 Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 1f72718215ff2763653a82d9cbc41bfed3186caa Author: Thomas Hellström Date: Fri Sep 8 11:17:16 2023 +0200 drm/xe: Convert remaining instances of ttm_eu_reserve_buffers to drm_exec The VM_BIND functionality and vma destruction was locking potentially multiple dma_resv objects using the ttm_eu_reserve_buffers() function. Rework those to use the drm_exec helper, taking care that any calls to xe_bo_validate() ends up inside an unsealed locking transaction. v4: - Remove an unbalanced xe_bo_put() (igt and Matthew Brost) v5: - Rebase conflict Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230908091716.36984-7-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 2714d50936200a65ae52f431b0c004b31655239f Author: Thomas Hellström Date: Fri Sep 8 11:17:15 2023 +0200 drm/xe: Convert pagefaulting code to use drm_exec Replace the calls into ttm_eu_reserve_buffers with the drm_exec helpers. Also reuse some code. v4: - Kerneldoc xe_vm_prepare_vma(). Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230908091716.36984-6-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit d490ecf577903ce5a9e6a3bb3bd08b5a550719c7 Author: Thomas Hellström Date: Fri Sep 8 11:17:14 2023 +0200 drm/xe: Rework xe_exec and the VM rebind worker to use the drm_exec helper Replace the calls to ttm_eu_reserve_buffers() by using the drm_exec helper instead. Also make sure the locking loop covers any calls to xe_bo_validate() / ttm_bo_validate() so that these function calls may easily benefit from being called from within an unsealed locking transaction and may thus perform blocking dma_resv locks in the future. For the unlock we remove an assert that the vm->rebind_list is empty when locks are released. Since if the error path is hit with a partly locked list, that assert may no longer hold true we chose to remove it. v3: - Don't accept duplicate bo locks in the rebind worker. v5: - Loop over drm_exec objects in reverse when unlocking. v6: - We can't keep the WW ticket when retrying validation on OOM. Fix. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230908091716.36984-5-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit b7ab8c4f028f87b8c79c9f99e12b891fd5430483 Author: Thomas Hellström Date: Fri Sep 8 11:17:13 2023 +0200 drm/xe/bo: Remove the lock_no_vm()/unlock_no_vm() interface Apart from asserts, it's essentially the same as xe_bo_lock()/xe_bo_unlock(), and the usage intentions of this interface was unclear. Remove it. v2: - Update the xe_display subsystem as well. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230908091716.36984-4-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit d00e9cc28e1e42108618e7a146969a26679170a2 Author: Thomas Hellström Date: Fri Sep 8 11:17:12 2023 +0200 drm/xe/vm: Simplify and document xe_vm_lock() The xe_vm_lock() function was unnecessarily using ttm_eu_reserve_buffers(). Simplify and document the interface. v4: - Improve on xe_vm_lock() documentation (Matthew Brost) v5: - Rebase conflict. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230908091716.36984-3-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 08a4f00e62bc96eabf7d876933f84600a3dc5e69 Author: Thomas Hellström Date: Fri Sep 8 11:17:11 2023 +0200 drm/xe/bo: Simplify xe_bo_lock() xe_bo_lock() was, although it only grabbed a single lock, unnecessarily using ttm_eu_reserve_buffers(). Simplify and document the interface. v2: - Update also the xe_display subsystem. v4: - Reinstate a lost dma_resv_reserve_fences(). - Improve on xe_bo_lock() documentation (Matthew Brost) Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230908091716.36984-2-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 9fa81f914a1ce8ee7a5a0ce6f275a636a15bb109 Author: Lucas De Marchi Date: Fri Sep 8 15:52:27 2023 -0700 drm/xe/mmio: Account for GSI offset when checking ranges Change xe_mmio_in_range() to use the same logic to account for the GT's adj_offset as the read and write functions. This is needed when checking ranges for the MCR registers if the GT has an offset to adjust. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230908225227.1276610-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 9e6fe003d8c7e35bcd93f0a962b8fdc8889db35b Author: Rodrigo Vivi Date: Wed Aug 30 17:47:15 2023 -0400 drm/xe/uapi: Remove useless max_page_size The min_page_size is useful information to ensure alignment and it is an API actually in use. However max_page_size doesn't bring any useful information to the userspace hence being not used at all. So, let's remove and only bring it back if that ever gets used. Suggested-by: Thomas Hellström Cc: Thomas Hellström Signed-off-by: Rodrigo Vivi Reviewed-by: Francois Dugast commit 2793fac1dbe068da5965acd9a78a181b33ad469b Author: Rodrigo Vivi Date: Wed Aug 30 17:47:14 2023 -0400 drm/xe/uapi: Typo lingo and other small backwards compatible fixes Fix typos, lingo and other small things identified during uapi review. v2: Also fix ALIGNMENT typo at xe_query.c v3: Do not touch property to get/set. (Francois) Link: https://lore.kernel.org/all/863bebd0c624d6fc2b38c0a06b63e468b4185128.camel@linux.intel.com/ Suggested-by: Thomas Hellström Cc: Thomas Hellström Signed-off-by: Rodrigo Vivi Reviewed-by: Thomas Hellström Reviewed-by: Francois Dugast commit 278c35822d61ae53d3a1d162b29adda671b11e3b Author: Lucas De Marchi Date: Tue Sep 5 18:20:53 2023 -0700 drm/xe: Fix LRC workarounds Fix 2 issues when writing LRC workarounds by copying the same handling done when processing other RTP entries: For masked registers, it was not correctly setting the upper 16bits. Differently than i915, the entry itself doesn't set the upper bits for masked registers: this is done when applying them. Testing on ADL-P: Before: [drm:xe_gt_record_default_lrcs [xe]] LRC WA rcs0 save-restore MMIOs [drm:xe_gt_record_default_lrcs [xe]] REG[0x2580] = 0x00000002 ... [drm:xe_gt_record_default_lrcs [xe]] REG[0x7018] = 0x00002000 [drm:xe_gt_record_default_lrcs [xe]] REG[0x7300] = 0x00000040 [drm:xe_gt_record_default_lrcs [xe]] REG[0x7304] = 0x00000200 After: [drm:xe_gt_record_default_lrcs [xe]] LRC WA rcs0 save-restore MMIOs [drm:xe_gt_record_default_lrcs [xe]] REG[0x2580] = 0x00060002 ... [drm:xe_gt_record_default_lrcs [xe]] REG[0x7018] = 0x20002000 [drm:xe_gt_record_default_lrcs [xe]] REG[0x7300] = 0x00400040 [drm:xe_gt_record_default_lrcs [xe]] REG[0x7304] = 0x02000200 All of these registers are masked registers, so writing to them without the relevant bits in the upper 16b doesn't have any effect. Also, this adds support to regular registers; previously it was assumed that LRC entries would only contain masked registers. However this is not true. 0x6604 is not a masked register, but used in workarounds for e.g. ADL-P. See commit 28cf243a341a ("drm/i915/gt: Fix context workarounds with non-masked regs"). In the same test with ADL-P as above: Before: [drm:xe_gt_record_default_lrcs [xe]] REG[0x6604] = 0xe0000000 After: [drm:xe_gt_record_default_lrcs [xe]] REG[0x6604] = 0xe0efef6f As can be seen, now it will read what was in the register rather than completely overwrite the other bits. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230906012053.1733755-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 12a66a47018aa2fbe60ea34a4de85a43c0799fb5 Author: Lucas De Marchi Date: Tue Sep 5 18:20:52 2023 -0700 drm/xe: Add dbg messages for LRC WAs Just like the GT and engine workarounds, add debug message with the final value being written to the register for easy debugging. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230906012053.1733755-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 46c63b6485b9029aae0a79a82c8c3e03548abc1b Author: Lucas De Marchi Date: Tue Sep 5 18:20:51 2023 -0700 drm/xe/reg_sr: Use xe_gt_dbg Use xe_gt_dbg() instead of drm_dbg() so the GT is added to the log for easy identification. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230906012053.1733755-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit a2112949e5f96c1b95aedfb9e2f0401e6c4f864f Author: Lucas De Marchi Date: Tue Sep 5 18:20:50 2023 -0700 drm/xe/reg_sr: Simplify check for masked registers For all RTP actions, clr_bits is a superset of the bits being modified. That's also why the check for "changing all bits" can be done with `clr_bits + 1`. So always use clr_bits for setting the upper bits of a masked register. Reviewed-by: Matt Roper Reviewed-by: Mika Kuoppala Link: https://lore.kernel.org/r/20230906012053.1733755-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 8bc454baf4036f4684bf30951dc3f6d96eb93f5f Author: Lucas De Marchi Date: Wed Sep 6 12:30:09 2023 -0700 drm/xe/pat: Use 0 instead of space on error Use 0 in format string instead of space so it shows as [drm] *ERROR* Missing PAT table for platform with graphics version 20.04! instead of [drm] *ERROR* Missing PAT table for platform with graphics version 20. 4! Reviewed-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230906193009.1912129-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit e6a373dc3d1267f828a3e6523fe2e46c6824d3e4 Author: Matthew Auld Date: Fri Sep 1 15:28:26 2023 +0100 drm/xe/selftests: make eviction test tile centric The concern here is that we may have platforms with dedicated media GT, and we anyway allocate the object on the tile, which just means running the same test twice (i.e primary vs media GT). Signed-off-by: Matthew Auld Cc: Nirmoy Das Reviewed-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit fba153b0d0b769bb2379c9e78968036d17bdfb6b Author: Matthew Auld Date: Fri Sep 1 15:28:25 2023 +0100 drm/xe/selftests: consider multi-GT for eviction test We need to sanitize and reset each GT, since xe_bo_evict_all() will evict everything regardless of GT, which can leave other GTs in a broken state. Signed-off-by: Matthew Auld Cc: Nirmoy Das Reviewed-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit 621fd7dc38b7c18d4946a05051f674fcab82d4dd Author: Francois Dugast Date: Wed Aug 23 09:10:20 2023 +0000 drm/xe/pm: Use PM functions only if CONFIG_PM_SLEEP is enabled This fixes the build without CONFIG_PM_SLEEP such as for riscv. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 617eebb9c4807be77ca6f02eee7469e5e111861d Author: Matthew Brost Date: Wed Aug 16 20:15:38 2023 -0700 drm/xe: Fix array of binds If multiple bind ops in an array of binds touch the same address range invalid GPUVA operations are generated as each GPUVA operation is generated based on the orignal GPUVA state. To fix this, after each GPUVA operations is generated, commit the GPUVA operation updating the GPUVA state so subsequent bind ops can see a current GPUVA state. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit bbd52b6153731908e52f68d7c797bef7c42af4f7 Author: Matthew Brost Date: Thu Aug 31 07:58:44 2023 -0700 drm/gpuva: Add drm_gpuva_for_each_op_reverse Add a helper to walk op list in reverse. Xe will make use of this when unwinding GPUVA operations. v2: (Rodrigo) reword commit message Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 5ef091fc32a4fe7116a4ecc778369f161de9c11a Author: Matthew Brost Date: Sun Aug 13 20:19:20 2023 -0700 drm/xe: Fixup unwind on VM ops errors Remap ops have 3 parts: unmap, prev, and next. The commit step can fail on any of these. Add a flag for each to these so the unwind is only done the steps that have been committed. v2: (Rodrigo) Use bit macros Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 35dfb48462d92ce5514f883c461857ca55bdb499 Author: Matthew Brost Date: Thu Aug 31 07:54:21 2023 -0700 drm/xe: Convert xe_vma_op_flags to BIT macros Rather than open code the shift for values, use BIT macros. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 9a4566d5e0ae9dd38ef20fab00990e6958c421b4 Author: Matthew Auld Date: Tue Aug 29 17:28:43 2023 +0100 drm/xe: fix has_llc on rkl Matches i915. Assumption going forward is that non-llc + igpu is only a thing on MTL+ which should have explicit coherency pat_index settings for COH_NONE, 1WAY and 2WAY. Signed-off-by: Matthew Auld Cc: Pallavi Mishra Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: Matt Roper Reviewed-by: Pallavi Mishra Signed-off-by: Rodrigo Vivi commit 1da0702c1701c2e1441d86facd9fbb5e73fa374b Author: Matthew Auld Date: Thu Aug 24 17:04:45 2023 +0100 drm/xe: nuke GuC on unload On PVC unloading followed by reloading the module often results in a completely dead machine (seems to be plaguing CI). Resetting the GuC like we do at load seems to cure it at least when locally testing this. v2: - Move pc_fini into guc_fini. We want to do the GuC reset just after calling pc_fini, otherwise we encounter communication failures. It also seems like a good idea to do the reset before we start releasing the various other GuC resources. In the case of pc_fini there is an explicit stop, but for other stuff like logs, ads, ctb there is not. References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/542 References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/597 Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: Rodrigo Vivi Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 9c0d779fc67bd1810f74c22e219f4af24a4e1e29 Author: Pallavi Mishra Date: Thu Aug 31 04:55:58 2023 +0530 drm/xe: Prevent return with locked vm Reorder vm_id check after the one for VISIBLE_VRAM. This should prevent returning with locked vm in error scenario. Signed-off-by: Pallavi Mishra Cc: Matthew Auld Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 14ec22408d2fa1d8671b619474381344b2bc859a Author: Zhanjun Dong Date: Thu Aug 17 14:30:28 2023 -0700 drm/xe: Add patch version on guc firmware init Add patch version info on GuC firmware init. This is required info for GuC log decoder. Signed-off-by: Zhanjun Dong Reviewed-by: Daniele Ceraolo Spurio Link: https://lore.kernel.org/r/20230817213028.838531-1-zhanjun.dong@intel.com Signed-off-by: Rodrigo Vivi commit a043fbab7af54c64017269dc96f43f441ed4bcaf Author: Niranjana Vishwanathapura Date: Wed Aug 16 22:14:10 2023 -0700 drm/xe/pvc: Use fast copy engines as migrate engine on PVC Some copy hardware engine instances are faster than others on PVC. Use a virtual engine of these plus the reserved instance for the migrate engine on PVC. The idea being if a fast instance is available it will be used and the throughput of kernel copies, clears, and pagefault servicing will be higher. v2: Use OOB WA, use all copy engines if no WA is required Reviewed-by: Matt Roper Signed-off-by: Matthew Brost Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 7407f2e5c356a73ec4a6d7f379e91f205025165c Author: Niranjana Vishwanathapura Date: Tue Jul 18 10:45:28 2023 +0000 drm/xe/pvc: Force even num engines to use 64B Wa_16017236439 requires that we update BCS_SWCTRL (via indirect context batch buffer) to set 64B transfers when running on an even-numbered BCS engine and 256B on an odd-numbered BCS engine. v2: Move WA from engine_was[] to lrc_was[] Reviewed-by: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 25063811d9c1f32c3223c27cafc0a95e7a86be26 Author: Niranjana Vishwanathapura Date: Thu Aug 17 09:20:44 2023 +0000 drm/xe/pvc: Blacklist BCS_SWCTRL register Wa_16017236439 requires the BCS_SWCTRL to be privileged. v2: Define and use BCS_SWCTRL() Reviewed-by: Matt Roper Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 429d56a6b12c4a00d22dcc8a1ac0394906c92b67 Author: Matthew Auld Date: Wed Aug 23 18:55:52 2023 +0100 drm/xe/ct: fix resv_space print Actually print the info.resv_space. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 9e9526352d6f7f94a4348cebce9859dfebed1dea Author: Daniele Ceraolo Spurio Date: Tue Aug 22 10:33:34 2023 -0700 drm/xe: standardize vm-less kernel submissions The current only submission in the driver that doesn't use a vm is the WA setup. We still pass a vm structure (the migration one), but we don't actually use it at submission time and we instead have an hack to use GGTT for this particular engine. Instead of special-casing the WA engine, we can skip providing a VM and use that as selector for whether to use GGTT or PPGTT. As part of this change, we can drop the special engine flag for the WA engine and switch the WA submission to use the standard job functions instead of dedicated ones. v2: rebased on s/engine/exec_queue Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230822173334.1664332-4-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit 923e42381745f55ba27a8805a055b51139af6830 Author: Daniele Ceraolo Spurio Date: Tue Aug 22 10:33:33 2023 -0700 drm/xe: split kernel vs permanent engine flags If an engine is only destroyed on driver unload, we can skip its clean-up steps with the GuC because the GuC is going to be tuned off as well, so it doesn't matter if we're in sync with it or not. Currently, we apply this optimization to all engines marked as kernel, but this stops us to supporting kernel engines that don't stick around until unload. To remove this limitation, add a separate flag to indicate if the engine is expected to only be destryed on driver unload and use that to trigger the optimzation. While at it, add a small comment to explain what each engine flag represents. v2: s/XE_BUG_ON/XE_WARN_ON, s/ENGINE/EXEC_QUEUE v3: rebased Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230822173334.1664332-3-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit 1c66c0f391da32534cf143e6a0f6391776aa9bf8 Author: Daniele Ceraolo Spurio Date: Tue Aug 22 10:33:32 2023 -0700 drm/xe: fix submissions without vm Kernel queues can submit privileged batches directly in GGTT, so they don't always need a vm. The submission front-end already supports creating and submitting jobs without a vm, but some parts of the back-end assume the vm is always there. Fix this by handling a lack of vm in the back-end as well. v2: s/XE_BUG_ON/XE_WARN_ON, s/engine/exec_queue Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230822173334.1664332-2-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit 486b2ef2768222bb4210709ccf5443c3e381346e Author: Matt Roper Date: Tue Aug 22 17:33:14 2023 -0700 drm/xe: Drop xe_mmio_write64() The only possible 64-bit register writes in the driver come from the highly questionable MMIO ioctl. That ioctl's register write support only operates for userspace running as root and cannot be used by any real userspace; it exists solely to support the "xe_reg" debug tool in IGT. Since the spec indicates that hardware does not officially support 64-bit register accesses, there's no reason to allow such 64-bit writes, even for debugging. Bspec: 60027 Reviewed-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://lore.kernel.org/r/20230823003312.1356779-4-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 07431945d8ae805746bbd01b052eeefb919911db Author: Matt Roper Date: Tue Aug 22 17:33:13 2023 -0700 drm/xe: Avoid 64-bit register reads Intel hardware officially only supports GTTMMADR register accesses of 32-bits or less (although 64-bit accesses to device memory and PTEs in the GSM are fine). Even though we do usually seem to get back reasonable values when performing readq() operations on registers in BAR0, we shouldn't rely on this violation of the spec working consistently. It's likely that even when we do get proper register values back the hardware is internally satisfying the request via a non-atomic sequence of two 32-bit reads, which can be problematic for timestamps and counters if rollover of the lower bits is not considered. Replace xe_mmio_read64() with xe_mmio_read64_2x32() that implements 64-bit register reads as two 32-bit reads and attempts to ensure that the upper dword has stabilized to avoid problematic rollovers for counter and timestamp registers. v2: - Move function from xe_mmio.h to xe_mmio.c. (Lucas) - Convert comment to kerneldoc and note that it shouldn't be used on registers where reads may trigger side effects. (Lucas) Bspec: 60027 Reviewed-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://lore.kernel.org/r/20230823003312.1356779-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 770576f1e1c001ba069e552e08893d56a64015c4 Author: Balasubramani Vivekanandan Date: Fri Aug 11 09:06:18 2023 -0700 drm/xe/lnl: Hook up MOCS table LNL uses the Xe2 MOCS table introduced in an earlier patch. Bspec: 71582 Cc: Matt Roper Signed-off-by: Balasubramani Vivekanandan Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 943c01b72f3e9332d7a52ecffa35ef7152e18c5c Author: Matt Roper Date: Fri Aug 11 09:06:17 2023 -0700 drm/xe/lnl: Add GuC firmware definition Define the GuC firmware to load on the platform. Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 3330361543fca2a60b71ebf02cd5e56bb417b159 Author: Matt Roper Date: Fri Aug 11 09:06:16 2023 -0700 drm/xe/lnl: Add LNL platform definition LNL is an integrated GPU based on the Xe2 architecture. Bspec: 70821 Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Balasubramani Vivekanandan Signed-off-by: Rodrigo Vivi commit 0993b22f93f867b4ed1c1fc3f077fa7e736353d6 Author: Matt Roper Date: Fri Aug 11 09:06:15 2023 -0700 drm/xe/xe2: Program GuC's MOCS on Xe2 and beyond As with PVC, Xe2 platforms require that the index of an uncached MOCS entry be programmed into the GUC_SHIM_CONTROL register. This will likely be needed on future platforms as well. Xe2 also extends the size of the MOCS index register field from two bits to four bits. Since these extra bits were unused on PVC, it should be safe to just increase the size of the mask. Bspec: 60592 Cc: Haridhar Kalvala Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Balasubramani Vivekanandan Signed-off-by: Rodrigo Vivi commit e4751ab5d2fef45d666e64a8766e08e9d60eccfd Author: Balasubramani Vivekanandan Date: Fri Aug 11 09:06:14 2023 -0700 drm/xe/xe2: Add MOCS table Additional minor change to remove L4_2_RESERVED, which will never be required. v2: Make L3/L4 names consistent for GLOB_MOCS defines (Matt Roper) Bspec: 71582 Cc: Matt Roper Signed-off-by: Balasubramani Vivekanandan Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit e9bb0891e69055cdfc1053f297b1b8b033372975 Author: Matt Roper Date: Fri Aug 11 09:06:13 2023 -0700 drm/xe/xe2: Track VA bits independently of max page table level Starting with Xe2, a 5-level page table is always used, regardless of the actual virtual address range supported by the platform. The two values need to be tracked separately in the device descriptor since Xe2 platforms only have a 48 bit virtual address range. Bspec: 59505, 65637, 70817 Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Balasubramani Vivekanandan Signed-off-by: Rodrigo Vivi commit 595e4a3aade359f8e3bc84bd30746cb5826c4e67 Author: Matt Roper Date: Fri Aug 11 09:06:12 2023 -0700 drm/xe/xe2: Define Xe2_LPM IP features Xe2_LPM media is represented by GMD_ID value 20.00. It provides 1 VD + 1 VE + 1 SFC. Bspec: 70821, 70819 Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Balasubramani Vivekanandan Signed-off-by: Rodrigo Vivi commit 2985bedc1c59441f4b0d4724a1c2211e0b6b4a19 Author: Matt Roper Date: Fri Aug 11 09:06:11 2023 -0700 drm/xe/xe2: Define Xe2_LPG IP features Define a common set of Xe2 graphics feature flags and definitions that will be used for all platforms in this family. Several of the feature flags are inherited unchanged from Xe_HP and/or Xe_HPC platforms: - dma_mask_size remains 46 (Bspec 70817) - supports_usm=1 (Bspec 59651) - has_flatccs=1 (Bspec 58797) - has_asid=1 (Bspec 59654, 59265, 60288) - has_range_tlb_invalidate=1 (Bspec 71126) However some of them still need proper implementation in the driver to be used, so they are disabled. Notable Xe2-specific changes: - All Xe2 platforms use a five-level page table, regardless of the virtual address space for the platform. (Bspec 59505) The graphics engine mask represents the Xe2 architecture engines (Bspec 60149), but individual platforms may have a reduced set of usable engines, as reflected by their fusing. Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Balasubramani Vivekanandan Signed-off-by: Rodrigo Vivi commit be6dd3c8e884f7b1a9f76c3ad1efd068b981f7d5 Author: Matt Roper Date: Fri Aug 11 09:06:10 2023 -0700 drm/xe/xe2: AuxCCS is no longer used Starting with Xe2, all platforms (including igpu platforms) use FlatCCS compression rather than AuxCCS. Similar to PVC, any future platforms that don't support FlatCCS should not attempt to fall back to AuxCCS programming. Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Balasubramani Vivekanandan Signed-off-by: Rodrigo Vivi commit 53497182ddf7a98fc33049d51ac3692c2f8097da Author: Matt Roper Date: Fri Aug 11 09:06:09 2023 -0700 drm/xe/xe2: Handle fused-off CCS engines On Xe2 platforms, availability of the CCS engines is reflected in the FUSE4 register. Bspec: 62483 Cc: Balasubramani Vivekanandan Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Matt Atwood Signed-off-by: Rodrigo Vivi commit c5fa58146ee0e55ef3e8b28c1aed705c97968336 Author: Matt Roper Date: Fri Aug 11 09:06:08 2023 -0700 drm/xe/xe2: Update context image layouts Engine register state layout has changed a bit on Xe2. We'll also explicitly define a BCS layout to ensure BLIT_SWCTL and BLIT_CCTL are included. Bspec: 65182, 60184, 55793 Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Matt Atwood Signed-off-by: Rodrigo Vivi commit 8e99b54508d6fb1a8d1c8d04128ea6634c00cb19 Author: Matt Roper Date: Fri Aug 11 09:06:07 2023 -0700 drm/xe/xe2: Add MCR register steering for media GT Xe2 media has a few types of MCR registers, but all except for "GPMXMT" can safely steer to instance 0,0. GPMXMT follows the same rules that MTL's OADDRM ranges did, so it can re-use the same enum value. Bspec: 71186 Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Matt Atwood Signed-off-by: Rodrigo Vivi commit 5c82000f54716685791f54330098dc93512d1716 Author: Matt Roper Date: Fri Aug 11 09:06:06 2023 -0700 drm/xe/xe2: Add MCR register steering for primary GT Xe2 uses the same steering control register and steering semaphore register as MTL. As with recent platforms, group/instance 0,0 is sufficient to target a non-terminated instance for most classes of MCR registers; the only types of ranges that need to consider platform fusing to find a non-terminated instance are SLICE/DSS ranges and a new SQIDI_PSMI type of range. Note that the range of valid bits in XE2_NODE_ENABLE_MASK may be reduced for some Xe2 SKUs. However the lowest bits are always valid and only the lowest instance is obtained via __ffs(), so there's no need to complicate the masking with extra platform/subplatform checks. Also note that Wa_14017387313 suggests skipping MCR lock acquisition around GAM and GAMWKR registers to prevent MCR register accesses in an interrupt handler from deadlocking when the steering semaphore is already held outside the interrupt context. At this time Xe never issues MCR accesses from within an interrupt handler so the workaround is not currently needed. v2: - [0x008700-0x0087FF] range to extend up to 0x887F (Matt Attwood) - [0x00EF00-0x00F4FF] -> [0x00F000, 0xFFFF] to follow latest bspec version (Bala) Bspec: 71185 Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Balasubramani Vivekanandan Reviewed-by: Matt Atwood Signed-off-by: Rodrigo Vivi commit 015906fff123a3d0c6a44b69663d3041bfaca928 Author: Matt Roper Date: Fri Aug 11 09:06:05 2023 -0700 drm/xe/xe2: Add GT topology readout Xe2 platforms have three DSS fuse registers for both geometry and compute. Bspec: 67171, 67537, 67401, 67536 Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Matt Atwood Reviewed-by: Balasubramani Vivekanandan Signed-off-by: Rodrigo Vivi commit 13a3398b927b1578440740f7684bc20883a08521 Author: Matt Roper Date: Fri Aug 11 09:06:04 2023 -0700 drm/xe/xe2: Update render/compute context image sizes The render and compute context are significantly smaller on Xe2 than on previous platforms. Registers: - Render: 3008 dwords -> 12032 bytes -> round to 3 pages - Compute: 1424 dwords -> 5696 bytes -> round to 2 pages We also allocate one additional page for the HWSP, so the total allocation sizes for render and compute are 4 and 3 pages respectively. Bspec: 65182, 56578, 55793 Signed-off-by: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Matt Atwood Signed-off-by: Rodrigo Vivi commit 0aef9ff75204485ae6bcc9f7a54f16b3a3536b49 Author: Matt Roper Date: Thu Aug 17 16:04:12 2023 -0700 drm/xe: Stop tracking 4-tile support The choice of Y-major tiling format (either the legacy "TileY" or the newer "Tile4") is based on graphics IP version (12.50 and beyond have Tile4, earlier platforms have TileY). The tracking in xe was originally added to allow re-using display from i915. However as of i915 commit 4ebf43d0488f ("drm/i915: Eliminate has_4tile feature flag"), the display code determines TileY vs Tile4 itself, so this can be removed from xe. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230817230407.909816-10-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 07d7ba13d80aa9a047ac4fa83f59f161ca5f0453 Author: Daniele Ceraolo Spurio Date: Thu Aug 17 15:17:07 2023 -0700 drm/xe: enable idle msg and set hysteresis for GSCCS On MTL (and only on MTL) the GSCCS defaults with idle messaging disabled. This means that, once awoken, the GSCCS will never signal its idleness to the GT. To allow the GT to enter the proper low-power state, we need therefore to turn idle messaging on. As part of this, we also need to set a proper hysteresis value for the engine. v2: use MEDIA_VERSION() and CLR() for the RTP rule and action, add reg bit define in descending order (Matt) Bspec: 71496 Signed-off-by: Daniele Ceraolo Spurio Cc: Vinay Belgaumkar Cc: Matt Roper Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230817221707.1602873-1-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit 92939935f478c5a0cc43f87652360ac5c70063b9 Author: Daniele Ceraolo Spurio Date: Thu Aug 17 13:18:30 2023 -0700 drm/xe: don't expose the GSCCS to users The kernel is the only expected user of the GSCCS, so we don't want to expose it to userspace. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230817201831.1583172-7-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit f4c33ae8eca2fa459d0d58baa1a26234598e6b32 Author: Daniele Ceraolo Spurio Date: Thu Aug 17 13:18:29 2023 -0700 drm/xe: GSC forcewake support The ID for the GSC forcewake domain already exists, but we're missing the register definitions and the domain intialization, so add that in. v2: move reg definition to be in address order (Matt) Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230817201831.1583172-6-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit aef61349ef1bf01badfa3ea955ba84048467f691 Author: Daniele Ceraolo Spurio Date: Thu Aug 17 13:18:28 2023 -0700 drm/xe: add GSCCS ring ops Like the BCS, the GSCCS doesn't have any special HW that needs handling when emitting commands, so we can re-use the same emit_job code. To make it clear that this is now a shared low-level function, it has been renamed to use the "simple" postfix, instead of "copy", to indicate that it applies to all engines that don't need any additional engine-specific handling. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230817201831.1583172-5-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit 3d2b5d4e28d9c58ea97704fe1eb663aee2556449 Author: Daniele Ceraolo Spurio Date: Thu Aug 17 13:18:27 2023 -0700 drm/xe: add GSCCS irq support The GSCCS has its own enable and mask registers. The interrupt identity for the GSCCS shows OTHER_CLASS instance 6. Bspec: 54029, 54030 Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230817201831.1583172-4-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit 296549107e4766bb927debd016527c71fb6faf36 Author: Daniele Ceraolo Spurio Date: Thu Aug 17 13:18:26 2023 -0700 drm/xe: base definitions for the GSCCS The first step in introducing the GSCCS is to add all the basic defs for it (name, mmio base, class/instance, lrc size etc). Bspec: 60149, 60421, 63752 Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230817201831.1583172-3-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit 0b1d1473b355ff3a1447048db24822eb7016c1c2 Author: Daniele Ceraolo Spurio Date: Thu Aug 17 13:18:25 2023 -0700 drm/xe: common function to assign queue name The queue name assignment is identical in both GuC and execlists backends, so we can move it to a common function. This will make adding a new entry in the next patch slightly cleaner. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230817201831.1583172-2-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit a863b4163ab9d3f173aef0f1191a0c0b8ea41634 Author: Niranjana Vishwanathapura Date: Mon Aug 7 14:58:38 2023 +0000 drm/xe: Add CONFIG_DRM_XE_PREEMPT_TIMEOUT Allow preemption timeout to be specified as a config option. v2: Change unit to microseconds (Tejas) v3: Remove get_default_preempt_timeout() Reviewed-by: Tejas Upadhyay Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 50b099030bb493604601a985b5fb3a8c5962aab9 Author: Niranjana Vishwanathapura Date: Mon Aug 7 15:43:35 2023 +0000 drm/xe: Simplify engine class sched_props setting Shortens the too long code lines. Reviewed-by: Tejas Upadhyay Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 0955d3be8b53971e4e72667918092674a233e329 Author: Shekhar Chauhan Date: Mon Aug 14 20:33:23 2023 +0530 drm/xe/dg2: Remove Wa_15010599737 Since this is specific to DirectX, we don't need it on Linux. Signed-off-by: Shekhar Chauhan Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230814150323.874033-1-shekhar.chauhan@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 286089ce692907c48a375676a0c828ac912856c9 Author: Oak Zeng Date: Fri Jul 14 10:42:07 2023 -0400 drm/xe: Improve vram info debug printing Print both device physical address range and CPU io range of vram. Also print vram's actual size, usable size excluding stolen memory, and CPU io accessible size. V1: - Add back small BAR device info (Matt) Signed-off-by: Oak Zeng Reviewed-by: Michael J. Ruhl Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 0887a2e7ab620510093d55f4587c407362363b6d Author: Oak Zeng Date: Tue Jul 11 17:46:09 2023 -0400 drm/xe: Make xe_mem_region struct Make a xe_mem_region structure which will be used in the coming patches. The new structure is used in both xe device level (xe->mem.vram) and xe_tile level (tile->vram). Make the definition of xe_mem_region.dpa_base to be the DPA base of this memory region and change codes according to this new definition. v1: - rename xe_mem_region.base to dpa_base per conversation with Mike Ruhl Signed-off-by: Oak Zeng Reviewed-by: Michael J. Ruhl Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit a20c75dba192af6ba63d618514a064268dbbe7db Author: Matthew Brost Date: Fri Aug 11 06:27:34 2023 -0700 drm/xe: Call __guc_exec_queue_fini_async direct for KERNEL exec_queues Usually we call __guc_exec_queue_fini_async via a worker as the exec_queue fini can be done from within the GPU scheduler which creates a circular dependency without a worker. Kernel exec_queues are fini'd at driver unload (not from within the GPU scheduler) so it is safe to directly call __guc_exec_queue_fini_async. Suggested-by: Oded Gabbay Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit ca8656a2eb0930b991151588fd04e60c75465543 Author: Matthew Auld Date: Tue Aug 8 10:12:09 2023 +0100 drm/xe: skip rebind_list if vma destroyed If we are closing a vm, mark each vma as XE_VMA_DESTROYED and skip touching the rebind_list if this is seen on the eviction path. That way we can safely drop the vm dma-resv lock on the close path without needing to worry about racing with the eviction path trying to add stuff to the rebind_list which can corrupt our contended list, since the destroy and rebind links are the same list entry underneath. References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/514 Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit ef6ea97228e1a742be64a76991686b7e98592c02 Author: Matthew Auld Date: Wed Aug 9 09:16:18 2023 +0100 drm/xe/guc_submit: fixup deregister in job timeout Rather check if the engine is still registered before proceeding with deregister steps. Also the engine being marked as disabled doesn't mean the engine has been disabled or deregistered from GuC pov, and here we are signalling fences so we need to be sure GuC is not still using this context. v2: - Drop the read_stopped() for this path. Since we are signalling fences on error here, best play it safe and wait for the GT reset to mark the engine as disabled, rather than it just being queued. v3 (Matt Brost): - Keep the read_stopped() on the wait event, since there is no need to wait for an already scheduled GT reset. If it is set we can then just bail without signalling anything. Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 3d4b0bfcd97fbb43d4848bafbf605f6d95afa7c8 Author: Anshuman Gupta Date: Wed Aug 2 12:34:49 2023 +0530 drm/xe/pm: Add vram_d3cold_threshold for d3cold capable device Do not register vram_d3cold_threshold device sysfs universally for each gfx device, only register sysfs and set the threshold value for d3cold capable devices. Cc: Rodrigo Vivi Signed-off-by: Anshuman Gupta Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/all/20230802070449.2426563-1-anshuman.gupta@intel.com/ Signed-off-by: Rodrigo Vivi commit c7e4a611f35c064ed7bf3f1614647941b0228334 Author: Matt Roper Date: Thu Jul 27 15:09:21 2023 -0700 drm/xe: Add Wa_14015150844 for DG2 and Xe_LPG The workaround database tells us to set this bit, even though the bspec indicates the bit doesn't exist on these platforms. Since this is a write-only register, we also can't read back its value to verify whether it's actually working or not. For now we'll trust that the workaround database knows what it's talking about; if not, the hardware will just ignore the attempt to write to a non-existent bit and it shouldn't cause any problems. Reviewed-by: Matt Atwood Link: https://lore.kernel.org/r/20230727220920.2291913-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 17d28aa8bdb11ba77d86a7ff228b1963afb7941d Author: Matthew Auld Date: Wed Aug 9 09:44:24 2023 +0100 drm/xe: don't warn for bogus pagefaults This appears to be easily user triggerable so warning is perhaps too much. Rather just make it debug print. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/534 Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 7f6c6e5085bd4e02f0fd555be76cf7f105c201e7 Author: Oak Zeng Date: Thu Aug 3 14:44:04 2023 -0400 drm/xe: Implement HW workaround 14016763929 To workaround a HW bug on DG2, driver is required to map the whole ppgtt virtual address space before GPU workload submission. Thus set the XE_VM_FLAG_SCRATCH_PAGE flag during vm create so the whole address space is mapped to point to scratch page. v1: - Move the workaround implementation from xe_vm_create to xe_vm_create_ioctl - Brian - Reorder error checking in xe_vm_create_ioctl - Jose - Implement WA only for DG2-G10 and DG2-G12 Signed-off-by: Oak Zeng Reviewed-by: Brian Welty Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit de4651d6dd04d173b50fa8631a9a3cdd897434c4 Author: Lucas De Marchi Date: Fri Aug 4 16:17:09 2023 -0700 drm/xe: Update ARL-S DevIDs to the latest BSpec BSpec changed with regard the DevIDs for ARL-S. Update the define accordingly. Bspec: 55420 Reviewed-by: Niranjana Vishwanathapura Link: https://lore.kernel.org/r/20230804231709.1065087-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit c47794bdd63d8304fa5d410039e81c6387388340 Author: Matthew Brost Date: Wed Aug 2 20:15:38 2023 -0700 drm/xe: Set max pte size when skipping rebinds When a rebind is skipped, we must set the max pte size of the newly created vma to value of the old vma as we do not pte walk for the new vma. Without this future rebinds may be incorrectly skipped due to the wrong max pte size. Null binds are more likely to expose this bug as larger ptes are more frequently used compared to normal bindings. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Testcase: dEQP-VK.sparse_resources.buffer.ssbo.sparse_residency.buffer_size_2_24 Reported-by: Paulo Zanoni Fixes: 8f33b4f054fc ("drm/xe: Avoid doing rebinds") Reference: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23045 Signed-off-by: Rodrigo Vivi commit 31b57683de2c98ac6a3de7223ef0afd47731265c Author: Matthew Auld Date: Thu Aug 3 18:38:50 2023 +0100 drm/xe/guc_submit: prevent repeated unregister It seems that various things can trigger the lr cleanup worker, including CAT error, engine reset and destroying the actual engine, so seems plausible to end up triggering the worker more than once in some cases. If that does happen we can race with an ongoing engine deregister before it has completed, thus triggering it again and also changing the state back into pending_disable. Checking if the engine has been marked as destroyed looks like it should prevent this. Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit d8b4494bf184d43295b89156d7656d69f931e418 Author: Lucas De Marchi Date: Thu Aug 3 16:42:09 2023 -0700 drm/xe: Fix error path in xe_guc_pc_start() If the forcewake failed, put xe_device_mem_access. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230803234209.881924-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 0c005429005228d7a82e4e8d5d8f24b6192e7aa6 Author: Lucas De Marchi Date: Thu Aug 3 16:42:08 2023 -0700 drm/xe: Fix error path in xe_guc_pc_gucrc_disable() Make sure to always call xe_device_mem_access_put(), even on error. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230803234209.881924-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit d2776564729739f459e108b5ac83bcea57c44bca Author: Tejas Upadhyay Date: Fri Aug 4 11:54:23 2023 +0530 drm/xe: Add min/max cap for engine scheduler properties Add sysfs entries for the min, max, and defaults for each of engine scheduler controls for every hardware engine class. Non-elevated user IOCTLs to set these controls must be within the min-max ranges of the sysfs entries, elevated user can set these controls to any value. However, introduced compile time CONFIG min-max values which restricts elevated user to be in compile time min-max range if at all sysfs min/max are violated. Sysfs entries examples are, DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/.defaults/ job_timeout_max job_timeout_ms preempt_timeout_min timeslice_duration_max timeslice_duration_us job_timeout_min preempt_timeout_max preempt_timeout_us timeslice_duration_min DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/ccs/ .defaults/ job_timeout_min preempt_timeout_max preempt_timeout_us timeslice_duration_min job_timeout_max job_timeout_ms preempt_timeout_min timeslice_duration_max timeslice_duration_us V12: - Rebase V11: - Make engine_get_prop_minmax and enforce_sched_limit static - Matt - use enum in place of string in engine_get_prop_minmax - Matt - no need to use enforce_sched_limit or no need to filter min/max per user type in sysfs - Matt V10: - Add kernel doc for non-static func - Make helper to get min/max for range validation - Matt - Filter min/max per user type V9 : - Rebase to use s/xe_engine/xe_hw_engine/ - Matt V8 : - fix enforce_sched_limit and avoid code duplication - Niranjana - Make sure min < max - Niranjana V7 : - Rebase to replace hw engine with eclass interface - return EINVAL in place of EPERM - Use some APIs to avoid code duplication V6 : - Rebase changes to reflect per engine class props interface - MattB - Use #if ENABLED - MattB - Remove MAX_SCHED_TIMEOUT check as range validation is enough V5 : - Rebase to resolve conflicts - CI V4 : - Rebase - Update commit to reflect tile addition - Use XE_HW macro directly as they are already filtered for CONFIG checks - Niranjana - Add CONFIG for enable/disable min/max limitation on elevated user. Default is enable - Matt/Joonas V3 : - Resolve CI hooks warning for kernel-doc V2 : - Restric min/max setting to #define default min/max for elevated user - Himal - Remove unrelated changes from patch - Niranjana Reviewed-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 69838d6330a7cc11de4f06f55122bfdb60693e70 Author: Tejas Upadhyay Date: Thu Aug 3 18:18:03 2023 +0530 drm/xe: Add sysfs for preempt reset timeout The preemption request and timeout is used for higher priority context or kill hung context and reset hardware engine. The preempt timeout can be adjusted per-engine class using, /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/preempt_timeout_us and can be disabled by setting it to 0. V7: - Rebase V6: - Rebase to use s/xe_engine/xe_hw_engine/ - Matt V5: - Remove timeout validation, not relevant - Niranjana V4: - Rebase to replace hw engine with eclass interface V3: - Rebase to per class engine props interface V2: - Rebase - Update commit message to add tile Reviewed-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit bc3a06ead1cd49d3a5e0f707cbd6c8e173307388 Author: Tejas Upadhyay Date: Thu Aug 3 18:14:04 2023 +0530 drm/xe: Add timeslice duration engine property to sysfs Timeslices between multiple context is supported via guc scheduling. Add sysfs entry to provide user defined timeslice duration to guc scheduling. The timeslice duration can be adjusted per-engine class using, /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/timeslice_duration_us V8: - Rebase V7: - Rebase to use s/xe_engine/xe_hw_engine/ - Matt V6: - Remove duration validation, not relevant - Niranjana V5: - Rebase to replace hw engine with eclass interface V4: - Rebase to per class engine props interface V3: - Rebase - Update commit messge to add tile V2: - Rebase Reviewed-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit e91a989ce151f022a7977c1ae4f21ac6d814d632 Author: Tejas Upadhyay Date: Fri Aug 4 18:08:25 2023 +0530 drm/xe: Add job timeout engine property to sysfs The time after which a job is removed from the scheduler. Add sysfs entry to provide user defined job timeout to scheduler. The job timeout can be adjusted per-engine class using, /sys/class/drm/cardX/device/tileN/gtN/engines/ccs/job_timeout_ms V8: - Rebase V7: - Rebase to use s/xe_engine/xe_hw_engine/ - Matt V6: - Remove timeout validation, not relevant - Niranjana - Rebase to use common error path V5: - Rebase to use engine class interface instead of hw engine V4: - Rebase to per class engine props interface V3: - Rebase - Update commit message to reflect tile update V2: - Use sysfs_create_files as part of this patch Reviewed-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit eef55700f302b9af3228f74997e82eaca8635d14 Author: Tejas Upadhyay Date: Fri Aug 4 17:36:25 2023 +0530 drm/xe: Add sysfs for default engine scheduler properties For each HW engine under GT we are adding defaults sysfs entry to list all engine scheduler properties and its default values. So that it will be easier for user to fetch default values of these properties anytime to go back to default. For example, DUT# cat /sys/class/drm/card1/device/tileN/gtN/engines/bcs/.defaults/ job_timeout_ms preempt_timeout_us timeslice_duration_us where, @job_timeout_ms: The time after which a job is removed from the scheduler. @preempt_timeout_us: How long to wait (in microseconds) for a preemption event to occur when submitting a new context. @timeslice_duration_us: Each context is scheduled for execution for the timeslice duration, before switching to the next context. V12: - Add missing drmm_add_action_or_reset and remove sysfs files V11: - Rebase V10: - Remove xe_gt.h inclusion from .h - Matt V9 : - Remove jiffies for job_timeout_ms - Matt V8 : - replace xe_engine with xe_hw_engine - Matt V7 : - Push all errors to one error path at every places - Niranjana - Describe struct member to resolve kernel doc err - CI hooks V6 : - Use engine class interface instead of hw engine in sysfs for better interfacing readability - Niranjana V5 : - Scheduling props should apply per class engine not per hardware engine - Matt - Do not record value of job_timeout_ms if changed based on dma_fence - Matt V4 : - Resolve merge conflicts - CI V3 : - Rearrange code in its own file - Rebase - Update commit message to reflect tile addition V2 : - Use sysfs_create_files in this patch - Niranjana - Handle prototype error for xe_add_engine_defaults - CI hooks - Remove unused member sysfs_hwe - Niranjana Reviewed-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 038ff941afe2b05273d5f07b12e976dae195d8b8 Author: Tejas Upadhyay Date: Fri Aug 4 17:17:56 2023 +0530 drm/xe: Add sysfs entries for engines under its GT Add engines sysfs directory under its GT and create sub directory for all engine class (note its not per instance) present on GT. For example, DUT# cat /sys/class/drm/cardX/device/tileN/gtN/engines/ bcs/ ccs/ V9 : - Add missing drmm_add_action_or_reset V8 : - Rebase V7 : - Remove xe_gt.h from .h and include in .c - Matt V6 : - Add kernel doc and arrange file in make file by alphabet - Matt V5 : - replace xe_engine with xe_hw_engine - Matt V4 : - Rebase to resolve conflicts - CI V3 : - Move code in its own file - Rename API name V2 : - Correct class mask logic - Himal - Remove extra parenthesis Reviewed-by: Niranjana Vishwanathapura Reviewed-by: Matthew Brost Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 9b9529ce379a08e68d65231497dd6bad94281902 Author: Francois Dugast Date: Mon Jul 31 17:30:02 2023 +0200 drm/xe: Rename engine to exec_queue Engine was inappropriately used to refer to execution queues and it also created some confusion with hardware engines. Where it applies the exec_queue variable name is changed to q and comments are also updated. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/162 Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit c22a4ed0c325cd29d7baf07d4cf2c127550b8859 Author: Francois Dugast Date: Tue Aug 1 12:28:14 2023 +0200 drm/xe: Rename xe_engine.[ch] to xe_exec_queue.[ch] This is a preparation commit for a larger renaming of engine to exec queue. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 2a368a09ae1c3f7aebe6210927a1335186d3c6f7 Author: Maarten Lankhorst Date: Tue Jul 25 17:12:39 2023 +0200 drm/xe: Fix error paths of __xe_bo_create_locked ttm_bo_init_reserved() calls the destroy() callback if it fails. Because of this, __xe_bo_create_locked is required to be responsible for freeing the bo even when it's passed in as argument. Additionally, if the placement check fails, the bo was kept alive. Fix it too. Reported-by: Oded Gabbay Signed-off-by: Maarten Lankhorst Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit f82686ef74b96a51ba6c38f3ce119ba7f7995210 Author: Matthew Brost Date: Fri Jul 28 20:53:41 2023 -0700 drm/xe: remove header variable from parse_g2h_msg The header variable is unused, remove it. Reviewed-by: Rodrigo Vivi Suggested-by: Oded Gabbay Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 99fea6828879381405dba598627aea79fa6edd78 Author: Francois Dugast Date: Thu Jul 27 14:55:29 2023 +0000 drm/xe: Prefer WARN() over BUG() to avoid crashing the kernel Replace calls to XE_BUG_ON() with calls XE_WARN_ON() which in turn calls WARN() instead of BUG(). BUG() crashes the kernel and should only be used when it is absolutely unavoidable in case of catastrophic and unrecoverable failures, which is not the case here. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 3207a32163cdf7b3345a44e255aae614859ea0d6 Author: Francois Dugast Date: Thu Jul 27 14:55:28 2023 +0000 drm/xe/macro: Remove unused constant Remove XE_EXTRA_DEBUG for cleanup as it is not used. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit e3828ebf6cde583b76143e283f8c4a4e8a252145 Author: Matthew Brost Date: Thu Jul 27 19:36:00 2023 -0700 drm/xe: Add define WQ_HEADER_SIZE Previously used a a magic '+ 3', use define instead. Suggested-by: Oded Gabbay Signed-off-by: Matthew Brost Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 8d7a91fe58c982a7709fabb53a51d87dbf94f6e9 Author: Matthew Brost Date: Thu Jul 27 19:10:51 2023 -0700 drm/xe: Remove ct->fence_context This is unused, remove it. Suggested-by: Oded Gabbay Signed-off-by: Matthew Brost Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 757d9fdfe3db4de6ed5ef9961a301e5be7b2cd74 Author: Matthew Brost Date: Thu Jul 27 19:00:14 2023 -0700 drm/xe: Remove XE_GUC_CT_SELFTEST XE_GUC_CT_SELFTEST enabled a debugfs entry to which ran a very simple selftest ensuring the GuC CT code worked. This was added before the kunit framework was available and before submissions were working too. This test isn't worth porting over to the kunit frame as if the GuC CT didn't work, literally almost nothing would work so just remove this. Suggested-by: Oded Gabbay Signed-off-by: Matthew Brost Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit fe58a2432b0d07cf56704ecf1ca5e52e6c1e8fff Author: Matt Roper Date: Fri Jul 28 10:56:02 2023 -0700 drm/xe/mtl: Reduce Wa_14018575942 scope to the CCS engine The MTL version of Wa_14018575942 has been updated to suggest only applying the register change on the CCS engine. Note that DG2 and PVC have a functionally equivalent workaround with Wa_18018781329; for now that one is still applying to all engines, although we'll keep an eye on it in case it changes to be CCS-specific too. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230728175601.2343755-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit d87c424afaf62f11ded6e66b4bdfbd5f5da8b330 Author: Rodrigo Vivi Date: Tue Jul 25 18:11:59 2023 -0400 drm/xe: Ensure memory eviction on s2idle. On discrete cards we cannot allow the pci subsystem to skip the regular suspend and we need to unblock the d3cold. Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Signed-off-by: Rodrigo Vivi commit a32d82b4cfd63a9bc198bd9faa54844b8d04c5d3 Author: Rodrigo Vivi Date: Tue Jul 25 18:11:58 2023 -0400 drm/xe: Only init runtime PM after all d3cold config is in place. We cannot allow runtime pm suspend after we configured the d3cold capable and threshold. Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Signed-off-by: Rodrigo Vivi commit bba2ec4144f5a7683d9a26cafffca6031361ee66 Author: Rodrigo Vivi Date: Tue Jul 25 18:11:57 2023 -0400 drm/xe: Fix the runtime_idle call and d3cold.allowed decision. According to Documentation/power/runtime_pm.txt: int pm_runtime_put(struct device *dev); - decrement the device's usage counter; if the result is 0 then run pm_request_idle(dev) and return its result int pm_runtime_put_autosuspend(struct device *dev); - decrement the device's usage counter; if the result is 0 then run pm_request_autosuspend(dev) and return its result We need to ensure that the idle function is called before suspending so we take the right d3cold.allowed decision and respect the values set on vram_d3cold_threshold sysfs. So we need pm_runtime_put() instead of pm_runtime_put_autosuspend(). Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Tested-by: Anshuman Gupta Signed-off-by: Rodrigo Vivi commit e07aa913161b0338708887a5e78bf57ffdfe67fa Author: Rodrigo Vivi Date: Tue Jul 25 18:11:56 2023 -0400 drm/xe: Move d3cold_allowed decision all together. And let's use the VRAM threshold to keep d3cold temporarily disabled. With this we have the ability to run D3Cold experiments just by touching the vram_d3cold_threshold sysfs entry. Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Signed-off-by: Rodrigo Vivi commit f026520367be5f7e05531d6e601c822596ebe65f Author: Rodrigo Vivi Date: Tue Jul 25 18:11:55 2023 -0400 drm/xe: Only set PCI d3cold_allowed when we are really allowing. First of all it was strange to see: if (allowed) { ... } else { D3COLD_ENABLE } But besides this misalignment, let's also use the pci d3cold_allowed useful to us and know that we are not really allowing d3cold. Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Signed-off-by: Rodrigo Vivi commit 8f3013e0b22206b27f37dcf1b96ce68df3393040 Author: Himal Prasad Ghimiray Date: Thu Jul 27 04:56:50 2023 +0530 drm/xe: Introduce fault injection for gt reset To trigger gt reset failure: echo 100 > /sys/kernel/debug/dri//fail_gt_reset/probability echo 2 > /sys/kernel/debug/dri//fail_gt_reset/times Cc: Rodrigo Vivi Cc: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Himal Prasad Ghimiray Signed-off-by: Rodrigo Vivi commit 4f027e304a6c7ae77150965d10b8a1edee0398a2 Author: Himal Prasad Ghimiray Date: Thu Jul 27 04:56:49 2023 +0530 drm/xe: Notify Userspace when gt reset fails Send uevent in case of gt reset failure. This intimation can be used by userspace monitoring tool to do the device level reset/reboot when GT reset fails. udevadm can be used to monitor the uevents. v2: - Support only gt failure notification (Rodrigo) v3 - Rectify the comments in header file. v4 - Use pci kobj instead of drm kobj for notification.(Rodrigo) - Cleanup (Badal) v5 - Add tile id and gt id as additional info provided by uevent. - Provide code documentation for the uevent. (Rodrigo) Cc: Aravind Iddamsetty Cc: Tejas Upadhyay Cc: Rodrigo Vivi Reviewed-by: Badal Nilawar Signed-off-by: Himal Prasad Ghimiray Signed-off-by: Rodrigo Vivi commit 063e09af6e1d9a4f26cdd0eb896c19526cb0afd3 Author: Rodrigo Vivi Date: Wed Jul 26 17:03:52 2023 -0400 drm/xe: Invert mask and val in xe_mmio_wait32. The order: 'offset, mask, val'; is more common in other drivers and in special in i915, where any dev could copy a sequence and end up with unexpected behavior. Done with coccinelle: @rule1@ expression gt, reg, val, mask, timeout, out, atomic; @@ - xe_mmio_wait32(gt, reg, val, mask, timeout, out, atomic) + xe_mmio_wait32(gt, reg, mask, val, timeout, out, atomic) spatch -sp_file mmio.cocci *.c *.h compat-i915-headers/intel_uncore.h \ --in-place v2: Rebased after changes on xe_guc_mcr usage of xe_mmio_wait32. Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit f83a30f466ebbd56355b1f65ec9bcd5087840ffc Author: Rodrigo Vivi Date: Wed Jul 26 17:30:42 2023 -0400 drm/xe: Fix an invalid locking wait context bug We cannot have spin locks around xe_irq_reset, since it will call the intel_display_power_is_enabled() function, and that needs a mutex lock. Hence causing the undesired "[ BUG: Invalid wait context ]" We cannot convert i915's power domain lock to spin lock due to the nested dependency of non-atomic context waits. So, let's move the xe_irq_reset functions from the critical area, while still ensuring that we are protecting the irq.enabled and ensuring the right serialization in the irq handlers. v2: On the first version, I had missed the fact that irq.enabled is checked on the xe/display glue layer, and that i915 display code is actually using the irq spin lock properly. So, this got changed to a version suggested by Matthew Auld. v3: do not use lockdep_assert for display glue. do not save restore irq from inside IRQ or we can get bogus irq restore warnings Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/463 Suggested-by: Matthew Auld Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit fda48d15a4eade29a41d46d5a6f0bfa7556ccb72 Author: Lucas De Marchi Date: Wed Jul 26 09:07:08 2023 -0700 drm/xe: Sort xe_regs.h Sort it by register address to make it easy to update when needed. v2: Do not create exception for registers with same functionality. Always sort it. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230726160708.3967790-11-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit c0d6b6163fd99c5e73eca3b747e704877e070acc Author: Lucas De Marchi Date: Wed Jul 26 09:07:07 2023 -0700 drm/xe: Carve out top of DSM as reserved Top of DSM contains the WOPCM where kernel driver shouldn't access as it contains data from other HW agents. Carve it out from the stolen memory. On a MTL system, the output now matches the expected values: Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230726160708.3967790-10-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 58052eb70cdeaaa2a48ec4369e702d097fee13f6 Author: Lucas De Marchi Date: Wed Jul 26 09:07:06 2023 -0700 drm/xe: Fix MTL+ stolen memory mapping Based on commit 8d8d062be6b9 ("drm/i915/mtl: Fix MTL stolen memory GGTT mapping"). For stolen on MTL and beyond, the address in the PTE is the offset from DSM base. While at it, update the comments explaining each part of the calculation. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230726160708.3967790-9-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit b23ebae7ab4142ffa53a3d80ba1189d0631994e8 Author: Lucas De Marchi Date: Wed Jul 26 09:07:04 2023 -0700 drm/xe: Set PTE_DM bit for stolen on MTL Integrated graphics 1270 and beyond should set the PTE_LM bit in the PTE when it's stolen memory. Add a new function, xe_bo_is_stolen_devmem(), and use it when encoding the PTE. In some places in the spec the PTE bit is called "Local Memory", abbreviated as LM, and in others it's called "Device Memory" (DM). Since we moved away from "Local Memory" and preferred the "vram" terminology, also rename the macros as DM to follow the name of the new function. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230726160708.3967790-7-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 937b4be72baaba00fa71a02adac3716332876fa3 Author: Lucas De Marchi Date: Wed Jul 26 09:07:03 2023 -0700 drm/xe: Decouple vram check from xe_bo_addr() The output arg is_vram in xe_bo_addr() is unused by several callers. It's also not what the function is mainly doing. Remove the argument and let the interested callers to call xe_bo_is_vram(). Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230726160708.3967790-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 621c1fbd9b83fb6a731e0063ad4ea2d89ec20a9c Author: Lucas De Marchi Date: Wed Jul 26 09:07:02 2023 -0700 drm/xe: Remove vma arg from xe_pte_encode() All the callers pass a NULL vma, so the buffer is always the BO. Remove the argument and the side effects of dealing with it. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230726160708.3967790-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 8c5ce9094b0e2d62abc719b21069073f8fa2b930 Merge: e802ed9e9bdc8 47360e40dcb92 Author: Arnd Bergmann Date: Thu Dec 21 16:37:27 2023 +0000 Merge tag 'imx-dt-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX ARM device tree for 6.8: - A bunch of changes from Fabio Estevam cleaning up dt-schema warnings. - A number of i.MX7 related small fixes and peripheral addition from Alexander Stein. - A set of changes from Hiago De Franco adding usdhc aliases for Apalis and Colibri boards. - A white-space cleanup from Krzysztof Kozlowski. - A change from Linus Walleij to correct errors in the Marvell MV88E6xxx switch descriptions. - Fix a couple of typo in comment for MBA6 and MBA6ULX board. - Add on-chip memory and enable MIPI-DSI support for i.MX7. - Add LM75A sensor for TQMA7 board. * tag 'imx-dt-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (41 commits) ARM: dts: imx27-phytec-phycore-som: Use 'rtc' as node name ARM: dts: imx25: Remove unneeded keypad properties ARM: dts: imx23/28: Fix the DMA controller node name ARM: dts: imx23-sansa: Use preferred i2c-gpios properties ARM: dts: imx27-apf27dev: Fix LED name ARM: dts: imx25/27: Pass timing0 ARM: dts: imx25: Fix the iim compatible string ARM: dts: imx25: Move usbphy nodes out of simple-bus ARM: dts: imx1: Use 'bus' for AIPI bus ARM: dts: imx27-phytec-phycore-rdk: Move usbphy nodes out of simple-bus ARM: dts: imx27-pdk: Move usbphy0 out of simple-bus ARM: dts: imx27: Use 'bus' for EMI bus ARM: dts: imx27: Use 'bus' for AIPI bus ARM: dts: imx27-phytec-phycore-som: Use the mux- prefix ARM: dts: imx1: Fix sram node ARM: dts: imx27: Fix sram node ARM: dts: imx: Use flash@0,0 pattern ARM: dts: imx25/27-eukrea: Fix RTC node name ARM: dts: imx25-pdk: Pass #sound-dai-cells ARM: dts: imx25: Pass I2C clock-names property ... Link: https://lore.kernel.org/r/20231216064605.876196-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 43b5d81e04773d08df1ed3ff8a40936dca726fda Author: Daniele Ceraolo Spurio Date: Wed Jul 26 15:25:28 2023 -0700 drm/xe: fix mcr semaphore locking for MTL in commit 81593af6c88d ("drm/xe: Convert xe_mmio_wait32 to us so we can stop using wait_for_us.") the mcr semaphore register read was accidentally switched from waiting for the register to go to 1 to waiting for the register to go to 0, so we need to flip it back. Signed-off-by: Daniele Ceraolo Spurio Cc: Rodrigo Vivi Cc: Matthew Brost Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 0e34fdb4a01a3e615c109694b5adc53590ccda19 Author: Lucas De Marchi Date: Wed Jul 26 09:07:01 2023 -0700 drm/xe: Fix checking for unset value Commit 37430402618d ("drm/xe: NULL binding implementation") introduced the NULL binding implementation, but left a case in which the out value is_vram is not set and the caller will use whatever was on stack. Eventually the is_vram out could be removed, but this should at least fix the current bug. Fixes: 37430402618d ("drm/xe: NULL binding implementation") Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230726160708.3967790-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 6aa26f6eb829fb208c569b92837a13e889891db4 Author: Matthew Auld Date: Wed Jul 26 10:23:49 2023 +0100 drm/xe/engine: add missing rpm for bind engines Bind engines need to use the migration vm, however we don't have any rpm for such a vm, otherwise the kernel would prevent rpm suspend-resume. There are two issues here, first is the actual engine create which needs to touch the lrc, but since that is in VRAM we trigger loads of missing mem_access asserts. The second issue is when destroying the actual engine, which requires GuC CT to deregister the context. v2 (Rodrigo): - Just use ENGINE_FLAG_VM as the indicator that we need to hold an rpm ref. This also handles the case in xe_vm_create() where we create default bind engines. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/499 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/504 Cc: Rodrigo Vivi Cc: Matthew Brost Signed-off-by: Matthew Auld Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 70748acb7fb4c9bba5364de0d6fe0801f2addebb Author: Matthew Brost Date: Wed Jul 26 09:41:43 2023 -0700 drm/xe: Signal out-syncs on VM binds if no operations If no operations are generated for VM binds the out-syncs must still be signaled. Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 342206b7cc064b8b004474c0baab2c67ced646d0 Author: Matthew Brost Date: Wed Jul 26 09:33:48 2023 -0700 drm/xe: Always use xe_vm_queue_rebind_worker helper Do not queue the rebind worker directly, rather use the helper xe_vm_queue_rebind_worker. This ensures we use the correct work queue. Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit c8dc15464880d725a18593bdfe6651bd235574c3 Author: Rodrigo Vivi Date: Fri Jul 21 15:56:36 2023 -0400 drm/xe: Invert guc vs execlists parameters and info. The module parameter should reflect the name of the optional, experimental and unsafe option, rather than the default one. Signed-off-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza commit c856cc138bf39aa38f1b97def8927c71b2a057c2 Author: Rodrigo Vivi Date: Fri Jul 21 15:44:50 2023 -0400 drm/xe/uapi: Remove XE_QUERY_CONFIG_FLAGS_USE_GUC This config is the only real one. If execlist remains in the code it will forever be experimental and we shouldn't maintain an uapi like that for that experimental piece of code that should never be used by real users. Signed-off-by: Rodrigo Vivi Reviewed-by: José Roberto de Souza commit c00ce7f22317006a3f14465637093ae3d2e53463 Author: Matthew Auld Date: Fri Mar 31 09:46:28 2023 +0100 drm/xe: fully turn on small-bar support This allows vram_size > io_size, instead of just clamping the vram size to the BAR size, now that the driver supports it. Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun Cc: Lucas De Marchi Cc: Michael J. Ruhl Reviewed-by: Maarten Lankhorst Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit cd928fced9968558f1c7d724c23b1f8868c39774 Author: Matthew Auld Date: Fri Mar 31 09:46:27 2023 +0100 drm/xe/uapi: add the userspace bits for small-bar Mostly the same as i915. We add a new hint for userspace to force an object into the mappable part of vram. We also need to tell userspace how large the mappable part is. In Vulkan for example, there will be two vram heaps for small-bar systems. And here the size of each heap needs to be known. Likewise the used/avail tracking needs to account for the mappable part. We also limit the available tracking going forward, such that we limit to privileged users only, since these values are system wide and are technically considered an info leak. v2 (Maarten): - s/NEEDS_CPU_ACCESS/NEEDS_VISIBLE_VRAM/ in the uapi. We also no longer require smem as an extra placement. This is more flexible, and lets us use this for clear-color surfaces, since we need CPU access there but we don't want to attach smem, since that effectively disables CCS from kernel pov. - Reject clear-color CCS buffers where NEEDS_VISIBLE_VRAM is not set, instead of migrating it behind the scenes. v3 (José): - Split the changes that limit the accounting for perfmon_capable() into a separate patch. - Use XE_BO_CREATE_VRAM_MASK. v4 (Gwan-gyeong Mun): - Add some kernel-doc for the query bits. v5: - One small kernel-doc correction. The cpu_visible_size and corresponding used tracking are always zero for non XE_MEM_REGION_CLASS_VRAM. v6: - Without perfmon_capable() it likely makes more sense to report as zero, instead of reporting as used == total size. This should give similar behaviour as i915 which rather tracks free instead of used. - Only enforce NEEDS_VISIBLE_VRAM on rc_ccs_cc_plane surfaces when the device is actually small-bar. Testcase: igt/tests/xe_query Testcase: igt/tests/xe_mmap@small-bar Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: Thomas Hellström Cc: Gwan-gyeong Mun Cc: Lucas De Marchi Cc: José Roberto de Souza Cc: Filip Hazubski Cc: Carl Zhang Cc: Effie Yu Reviewed-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 6a024f1bfdfe3b535786780f67c38429df17e857 Author: Matthew Auld Date: Fri Mar 31 09:46:26 2023 +0100 drm/xe/bo: support tiered vram allocation for small-bar Add the new flag XE_BO_NEEDS_CPU_ACCESS, to force allocating in the mappable part of vram. If no flag is specified we do a topdown allocation, to limit the chances of stealing the precious mappable part, if we don't need it. If this is a full-bar system, then this all gets nooped. For kernel users, it looks like xe_bo_create_pin_map() is the central place which users should call if they want CPU access to the object, so add the flag there. We still need to plumb this through for userspace allocations. Also it looks like page-tables are using pin_map(), which is less than ideal. If we can already use the GPU to do page-table management, then maybe we should just force that for small-bar. Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun Cc: Thomas Hellström Cc: Lucas De Marchi Reviewed-by: Maarten Lankhorst Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 2a6d871bd97722e899780a8e429b0fb5f11dadc6 Author: Matt Roper Date: Mon Jul 24 17:34:35 2023 -0700 drm/xe: xe_engine_create_ioctl should check gt_count, not tile_count Platforms like MTL only have a single tile, but multiple GTs. Ensure XE_ENGINE_CREATE accepts engine creation on gt1 on such platforms. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230725003433.1992137-4-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 7a060d786cc1d75ffa04256826d805686b8f1043 Author: Matt Roper Date: Mon Jul 24 17:34:34 2023 -0700 drm/xe/mtl: Map PPGTT as CPU:WC On MTL and beyond, the GPU performs non-coherent accesses to the PPGTT page tables. These page tables should be mapped as CPU:WC. Removes CAT errors triggered by xe_exec_basic@once-basic on MTL: xe 0000:00:02.0: [drm:__xe_pt_bind_vma [xe]] Preparing bind, with range [1a0000...1a0fff) engine 0000000000000000. xe 0000:00:02.0: [drm:xe_vm_dbg_print_entries [xe]] 1 entries to update xe 0000:00:02.0: [drm:xe_vm_dbg_print_entries [xe]] 0: Update level 3 at (0 + 1) [0...8000000000) f:0 xe 0000:00:02.0: [drm] Engine memory cat error: guc_id=2 xe 0000:00:02.0: [drm] Engine memory cat error: guc_id=2 xe 0000:00:02.0: [drm] Timedout job: seqno=4294967169, guc_id=2, flags=0x4 v2: - Rename to XE_BO_PAGETABLE to make it more clear that this BO is the pagetable itself, rather than just being bound in the PPGTT. (Lucas) Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Acked-by: Nirmoy Das Link: https://lore.kernel.org/r/20230725003433.1992137-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 9700a1df0a5568a3eb8483de103d4078e273b36b Author: Matthew Auld Date: Mon Jul 24 11:47:44 2023 +0100 drm/xe: add lockdep annotation for xe_device_mem_access_put() The main motivation is with d3cold which will make the suspend and resume callbacks even more scary, but is useful regardless. We already have the needed annotation on the acquire side with xe_device_mem_access_get(), and by adding the annotation on the release side we should have a lot more confidence that our locking hierarchy is correct. v2: - Move the annotation into both callbacks for better symmetry. Also don't hold over the entire mem_access_get(); we only need to lockep to understand what is being held upon entering mem_access_get(), and how that matches up with locks in the callbacks. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Anshuman Gupta Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 7ead33156483f5e7a699002f2480757aaa34ab08 Author: Matthew Brost Date: Fri Jul 21 12:16:13 2023 -0700 drm/xe: Use migrate engine for page fault binds We must use migrate engine for page fault binds in order to avoid a deadlock as the migrate engine has a reserved BCS instance which cannot be stuck on a fault. To use the migrate engine the engine argument to xe_migrate_update_pgtables must be NULL, this was incorrectly wired up so vm->eng[tile_id] was always being used. Fix this. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit a4cc60a55fd9a6bb8b50375d404f317ac2030941 Author: Matthew Brost Date: Wed Jul 19 21:05:42 2023 -0700 drm/xe: Only alloc userptr part of xe_vma for userptrs Only alloc userptr part of xe_vma for userptrs, this will save on space in the common BO case. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit eae553cbe03a7918f2b5dc9bda0dc35f7a7a308d Author: Matthew Brost Date: Wed Jul 19 21:04:01 2023 -0700 drm/xe: Combine destroy_cb and destroy_work in xe_vma into union The callback kicks the worker thus mutually exclusive execution, combining saves a bit of space in xe_vma. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 63412a5a6718771214900aec51fc9253b36efcc5 Author: Matthew Brost Date: Wed Jul 19 21:00:51 2023 -0700 drm/xe: Change tile masks from u64 to u8 This will save us a few bytes in the xe_vma structure. v2: Use hweight8 rather than hweight_long (Rodrigo) Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 3daf694ccf8afb936e3508c98738d52b13941397 Author: Matthew Brost Date: Wed Jul 19 20:50:24 2023 -0700 drm/xe: Replace list_del_init with list_del for userptr.invalidate_link cleanup This list isn't used again, list_del is the proper call. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 1655c893af08997175e3404039e79f384c925ee3 Author: Matthew Brost Date: Wed Jul 19 20:44:25 2023 -0700 drm/xe: Reduce the number list links in xe_vma Combine the userptr, rebind, and destroy links into a union as the lists these links belong to are mutually exclusive. v2: Adjust which lists are combined (Thomas H) v3: Add kernel doc why this is safe (Thomas H), remove related change of list_del_init -> list_del (Rodrigo) Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 8f33b4f054fc29a4774d8d10116ef460faeb84a8 Author: Matthew Brost Date: Wed Jul 19 14:46:01 2023 -0700 drm/xe: Avoid doing rebinds If we dont change page sizes we can avoid doing rebinds rather just do a partial unbind. The algorithm to determine its page size is greedy as we assume all pages in the removed VMA are the largest page used in the VMA. v2: Don't exceed 100 lines v3: struct xe_vma_op_unmap remove in different patch, remove XXX comment Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 3188c0f4c893ce1b232cdf8a3e26ff6139079908 Author: Matthew Brost Date: Wed Jul 19 14:31:21 2023 -0700 drm/xe: Remove xe_vma_op_unmap xe_vma_op_unmap isn't used, remove it. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit fd84041d094ce8feb730911ca9c7fdfff1d4fb94 Author: Matthew Brost Date: Wed Jul 19 14:10:11 2023 -0700 drm/xe: Make bind engines safe We currently have a race between bind engines which can result in corrupted page tables leading to faults. A simple example: bind A 0x0000-0x1000, engine A, has unsatisfied in-fence bind B 0x1000-0x2000, engine B, no in-fences exec A uses 0x1000-0x2000 Bind B will pass bind A and exec A will fault. This occurs as bind A programs the root of the page table in a bind job which is held up by an in-fence. Bind B in this case just programs a leaf entry of the structure. To fix use range-fence utility to track cross bind engine conflicts. In the above example bind A would insert an dependency into the range-fence tree with a key of 0x0-0x7fffffffff, bind B would find that dependency and its bind job would scheduled behind the unsatisfied in-fence and bind A's job. Reviewed-by: Maarten Lankhorst Co-developed-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 845f64bdbfc96cefd7070621b18ff8f50c7857fb Author: Thomas Hellström Date: Sun Jul 9 09:54:59 2023 -0700 drm/xe: Introduce a range-fence utility Add generic utility to track range conflicts signaled by a dma-fence. Tracking implemented via an interval tree. An example use case being tracking conflicts for pending (un)binds from multiple bind engines. By being generic ths idea would this could moved to the DRM level and used in multiple drivers for similar problems. v2: Make interval tree functions static (CI) v3: Remove non-static cleanup function (CI) Reviewed-by: Matthew Brost Signed-off-by: Matthew Brost Signed-off-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 0043a3e8a1f57e3aca91d4a99ff49031416119b6 Author: Francois Dugast Date: Wed Jul 19 18:57:07 2023 +0000 drm/xe/execlist: Log when using execlist submission Make explicit in the log that execlist submission is used to prevent from silently using it over GuC submission. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 72e8d73b712d2232019b33d2331099d3071ea94a Author: Francois Dugast Date: Wed Jul 19 13:51:08 2023 +0000 drm/xe: Cleanup style warnings and errors Fix 6 errors and 20 warnings reported by checkpatch.pl. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit ea82d5aab53f8f13fa0834d0b4341ca0788c2a8f Author: Francois Dugast Date: Wed Jul 19 13:51:07 2023 +0000 drm/xe/execlist: Remove leftover printk messages Those look like leftover debug and are not even being used. If they were real debug/info, they should be using the drm helpers. Signed-off-by: Francois Dugast Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 955c09e2cc4894b5997f548de1bd3bdfa18e60e4 Author: Francois Dugast Date: Wed Jul 19 13:20:59 2023 +0000 drm/xe: Rely on kmalloc/kzalloc log message Those messages are unnecessary because a generic message is already produced in case of allocation failure. Besides, this also removes a misuse of the XE_IOCTL_DBG macro. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 4d18eac03212fc2d8c3d9715e2261ac50e989403 Author: Lucas De Marchi Date: Tue Jul 18 12:39:24 2023 -0700 drm/xe: Use FIELD_PREP/FIELD_GET for tile id encoding Use FIELD_PREP()/FIELD_GET() to encode the tile id into flags. Besides protecting for eventual overflow it also makes it easier to see a new flag can't be added as BIT(7). Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230718193924.3084759-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 0d39b6daa5455354c485cb4d521b08740456758e Author: Lucas De Marchi Date: Tue Jul 18 12:39:23 2023 -0700 drm/xe: Normalize XE_VM_FLAG* names Rename XE_VM_FLAGS_64K to XE_VM_FLAG_64K to follow the other names and s/GT/TILE/ that got missed in commit 08dea7674533 ("drm/xe: Move migration from GT to tile"). Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230718193924.3084759-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit ee82d2da9c8ac13486550b2c86068e1d6edddf51 Author: Matthew Auld Date: Thu Jul 13 10:00:49 2023 +0100 drm/xe: add missing bulk_move reset It looks like bulk_move is set during object construction, but is only removed on object close, however in various places we might not yet have an actual fd to close, like on the error paths for the gem_create ioctl, and also one internal user for the evict_test_run_gt() selftest. Try to handle those cases by manually resetting the bulk_move. This should prevent triggering: WARNING: CPU: 7 PID: 8252 at drivers/gpu/drm/ttm/ttm_bo.c:327 ttm_bo_release+0x25e/0x2a0 [ttm] v2 (Nirmoy): - It should be safe to just unconditionally call __xe_bo_unset_bulk_move() in most places. Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit 5a142f9c675ab524a5f18457859ed2002507ea74 Author: Matthew Auld Date: Thu Jul 13 10:13:33 2023 +0100 drm/xe/selftests: restart GT after xe_bo_restore_kernel() Test seems to be failing badly after calling xe_bo_restore_kernel(). Taking a snapshot of the CTB and copying back a potentially old version seems risky, depending on what might have been inflight. Also it seems snapshotting the ADS object and copying back results in serious breakage. Normally when calling xe_bo_restore_kernel() we always fully restart the GT, which re-intializes such things. We could potentially skip saving and restoring such objects in xe_bo_evict_all() however seems quite fragile not to also restart the GT. Try to do that here by triggering a GT reset. Signed-off-by: Matthew Auld Cc: Matthew Brost Acked-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit 939902913a25a0feaa9ca34969dd7e5b43fc2502 Author: Matthew Auld Date: Wed Jul 12 16:27:21 2023 +0100 drm/xe/selftests: hold rpm for ccs_test_migrate() The GPU job will keep the device awake, however assumption here is that caller of xe_migrate_clear() is also holding mem_access.ref otherwise we hit the asserts in xe_sa_bo_flush_write() prior to the job construction. Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit 6a0612aeabcce6c951788384b94d503b99eefaca Author: Matthew Auld Date: Wed Jul 12 17:28:39 2023 +0100 drm/xe/selftests: hold rpm for evict_test_run_device() We are calling fairly low level things like xe_bo_restore_kernel() which expect caller to be holding mem_access.ref. Since we are doing stuff like evict_all we likely don't want to race with rpm suspend, since that potentially wants to do the same thing, so just wrap the whole test. Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit e3d2309250d49e4558b0abe95924b18f74995607 Author: Matthew Auld Date: Wed Jul 19 09:38:12 2023 +0100 drm/xe: add lockdep annotation for xe_device_mem_access_get() The atomics here might hide potential issues, also rpm core is not holding any lock when calling our rpm resume callback, so add a dummy lock with the idea that xe_pm_runtime_resume() is eventually going to be called when we are holding it. This only needs to happen once and then lockdep can validate all callers and their locks. v2: (Thomas Hellström) - Prefer static lockdep_map instead of full blown mutex. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Cc: Thomas Hellström Acked-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 7d623575a34539c0302a3ed3ec7321efcb281e37 Author: Matthew Auld Date: Wed Jul 19 09:38:11 2023 +0100 drm/xe: drop xe_device_mem_access_get() from invalidation_vma Lockdep gives the following splat: [ 594.158863] ffff888140da53f0 (&vm->userptr.notifier_lock){++++}-{3:3}, at: vma_userptr_invalidate+0xeb/0x330 [xe] [ 594.158921] but task is already holding lock: [ 594.158926] ffffffff82761940 (mmu_notifier_invalidate_range_start){+.+.}-{0:0}, at: unmap_vmas+0x0/0x1c0 [ 594.158941] which lock already depends on the new lock. [ 594.158947] the existing dependency chain (in reverse order) is: [ 594.158953] -> #5 (mmu_notifier_invalidate_range_start){+.+.}-{0:0}: [ 594.158961] fs_reclaim_acquire+0x68/0xd0 [ 594.158969] __kmem_cache_alloc_node+0x2c/0x1b0 [ 594.158975] kmalloc_node_trace+0x1d/0xb0 [ 594.158983] alloc_worker+0x18/0x50 [ 594.158989] init_rescuer.part.0+0x13/0xa0 [ 594.158995] workqueue_init+0xdf/0x210 [ 594.159001] kernel_init_freeable+0x5c/0x2f0 [ 594.159009] kernel_init+0x11/0x1a0 [ 594.159017] ret_from_fork+0x29/0x50 [ 594.159023] -> #4 (fs_reclaim){+.+.}-{0:0}: [ 594.159031] fs_reclaim_acquire+0xa0/0xd0 [ 594.159037] __kmem_cache_alloc_node+0x2c/0x1b0 [ 594.159042] kmalloc_trace+0x20/0xb0 [ 594.159048] acpi_device_add+0x25a/0x3f0 [ 594.159056] acpi_add_single_object+0x387/0x750 [ 594.159063] acpi_bus_check_add+0x108/0x280 [ 594.159069] acpi_bus_scan+0x34/0xf0 [ 594.159075] acpi_scan_init+0xed/0x2b0 [ 594.159082] acpi_init+0x21e/0x520 [ 594.159087] do_one_initcall+0x53/0x260 [ 594.159092] kernel_init_freeable+0x18a/0x2f0 [ 594.159099] kernel_init+0x11/0x1a0 [ 594.159105] ret_from_fork+0x29/0x50 [ 594.159110] -> #3 (acpi_device_lock){+.+.}-{3:3}: [ 594.159117] __mutex_lock+0x95/0xd10 [ 594.159122] acpi_enable_wakeup_device_power+0x30/0x120 [ 594.159130] __acpi_device_wakeup_enable+0x34/0x110 [ 594.159138] acpi_pm_set_device_wakeup+0x55/0x140 [ 594.159143] __pci_enable_wake+0x56/0xb0 [ 594.159150] pci_finish_runtime_suspend+0x35/0x80 [ 594.159157] pci_pm_runtime_suspend+0xb5/0x1a0 [ 594.159162] __rpm_callback+0x3c/0x110 [ 594.159170] rpm_callback+0x58/0x70 [ 594.159176] rpm_suspend+0x15c/0x6f0 [ 594.159182] pm_runtime_work+0x9b/0xb0 [ 594.159188] process_one_work+0x263/0x520 [ 594.159195] worker_thread+0x4d/0x3b0 [ 594.159200] kthread+0xeb/0x120 [ 594.159206] ret_from_fork+0x29/0x50 [ 594.159211] -> #2 (acpi_wakeup_lock){+.+.}-{3:3}: [ 594.159218] __mutex_lock+0x95/0xd10 [ 594.159223] acpi_pm_set_device_wakeup+0x7a/0x140 [ 594.159228] __pci_enable_wake+0x77/0xb0 [ 594.159234] pci_pm_runtime_resume+0x70/0xd0 [ 594.159240] __rpm_callback+0x3c/0x110 [ 594.159246] rpm_callback+0x58/0x70 [ 594.159252] rpm_resume+0x50d/0x7a0 [ 594.159258] rpm_resume+0x267/0x7a0 [ 594.159264] __pm_runtime_resume+0x45/0x90 [ 594.159270] xe_pm_runtime_resume_and_get+0x12/0x50 [xe] [ 594.159314] xe_device_mem_access_get+0x97/0xc0 [xe] [ 594.159346] hw_engines+0x65/0xf0 [xe] [ 594.159380] seq_read_iter+0x10d/0x4b0 [ 594.159385] seq_read+0x9e/0xd0 [ 594.159390] full_proxy_read+0x4e/0x80 [ 594.159396] vfs_read+0xb6/0x310 [ 594.159401] ksys_read+0x60/0xe0 [ 594.159406] do_syscall_64+0x38/0x90 [ 594.159413] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 594.159419] -> #1 (&xe->mem_access.lock){+.+.}-{3:3}: [ 594.159427] xe_device_mem_access_get+0x43/0xc0 [xe] [ 594.159457] xe_gt_tlb_invalidation_vma+0x53/0x190 [xe] [ 594.159490] invalidation_fence_init+0x1d2/0x2c0 [xe] [ 594.159529] __xe_pt_unbind_vma+0x151/0x4e0 [xe] [ 594.159564] vm_bind_ioctl+0x48a/0xae0 [xe] [ 594.159602] async_op_work_func+0x20c/0x530 [xe] [ 594.159634] process_one_work+0x263/0x520 [ 594.159640] worker_thread+0x4d/0x3b0 [ 594.159646] kthread+0xeb/0x120 [ 594.159650] ret_from_fork+0x29/0x50 [ 594.159655] -> #0 (&vm->userptr.notifier_lock){++++}-{3:3}: [ 594.159663] __lock_acquire+0x16fa/0x2850 [ 594.159670] lock_acquire+0xd2/0x2e0 [ 594.159676] down_write+0x36/0xd0 [ 594.159681] vma_userptr_invalidate+0xeb/0x330 [xe] [ 594.159714] __mmu_notifier_invalidate_range_start+0x239/0x2a0 [ 594.159722] unmap_vmas+0x1ac/0x1c0 [ 594.159727] unmap_region+0xb5/0x120 [ 594.159732] do_vmi_align_munmap+0x2be/0x430 [ 594.159739] do_vmi_munmap+0xea/0x120 [ 594.159744] __vm_munmap+0x9c/0x160 [ 594.159750] __x64_sys_munmap+0x12/0x20 [ 594.159756] do_syscall_64+0x38/0x90 [ 594.159761] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 594.159768] other info that might help us debug this: [ 594.159773] Chain exists of: &vm->userptr.notifier_lock --> fs_reclaim --> mmu_notifier_invalidate_range_start [ 594.159785] Possible unsafe locking scenario: [ 594.159790] CPU0 CPU1 [ 594.159794] ---- ---- [ 594.159797] lock(mmu_notifier_invalidate_range_start); [ 594.159802] lock(fs_reclaim); [ 594.159808] lock(mmu_notifier_invalidate_range_start); [ 594.159814] lock(&vm->userptr.notifier_lock); [ 594.159819] The VM should be holding a mem_access.ref so this looks like it should be a false positive and we can just drop the explicit mem_access in xe_gt_tlb_invalidation(). The GGTT invalidation path also takes care to hold mem_access.ref so should be fine there also, and we already assert that we hold access.ref for the GuC communication underneath. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Cc: Thomas Hellström Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit e018f44b29ed2de0a09186c728f173d0daaac448 Author: Matthew Auld Date: Wed Jul 19 09:38:10 2023 +0100 drm/xe/ggtt: prime ggtt->lock against FS_RECLAIM Increase the sensitivity of the ggtt->lock by priming it against FS_RECLAIM, such that allocating memory while holding will result in lockdep splats. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 7eed01a926838d4f6b8c655801e6af5366ccec46 Author: Matthew Auld Date: Wed Jul 19 09:38:09 2023 +0100 drm/xe: drop xe_device_mem_access_get() from guc_ct_send The callers should already be holding the mem_access reference, before calling into this. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 03af26c9c9767b096cf4b69544f0140898530531 Author: Matthew Auld Date: Wed Jul 19 09:38:08 2023 +0100 drm/xe: ensure correct access_put ordering Only call access_put after dropping the forcewake. In theory the device could suspend, but really we want to start asserting that we have a mem_access.ref when touching mmio. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 7da1d76ff647cc08d9400562a75a92e41ba6d7bc Author: Matthew Auld Date: Wed Jul 19 09:38:07 2023 +0100 drm/xe/mmio: grab mem_access in xe_mmio_ioctl Any kind of device memory access should first ensure the device is not suspended, mmio included. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 2d3ab1fa3195d2b0291625fcd0062796aaf15794 Author: Matthew Auld Date: Wed Jul 19 09:38:06 2023 +0100 drm/xe/guc_pc: add missing mem_access for freq_rpe_show The mem_access is meant to cover any kind of device level memory access, mmio included. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: Rodrigo Vivi Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Signed-off-by: Rodrigo Vivi commit 6bfbd0c589bb89581bb89d2776924c3853296cfc Author: Matthew Auld Date: Wed Jul 19 09:38:05 2023 +0100 drm/xe/debugfs: grab mem_access around forcewake We need keep the device awake when performing any kind of mmio operation. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/279 Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Cc: Thomas Hellström Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 2d30332a5ec004effe24d669003bf94e7f167387 Author: Matthew Auld Date: Wed Jul 19 09:38:04 2023 +0100 drm/xe/vm: tidy up xe_runtime_pm usage The xe_device_mem_access_get() should be all that's needed here and should now work as expected, without any strange races. In theory should be no functional changes here. Reported-by: Oded Gabbay Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Cc: Thomas Hellström Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit a00b8f1aae43c46658de0f7f55d8a65acb002159 Author: Matthew Auld Date: Wed Jul 19 09:38:03 2023 +0100 drm/xe: fix xe_device_mem_access_get() races It looks like there is at least one race here, given that the pm_runtime_suspended() check looks to return false if we are in the process of suspending the device (RPM_SUSPENDING vs RPM_SUSPENDED). We later also do xe_pm_runtime_get_if_active(), but since the device is suspending or has now suspended, this doesn't do anything either. Following from this we can potentially return from xe_device_mem_access_get() with the device suspended or about to be, leading to broken behaviour. Attempt to fix this by always grabbing the runtime ref when our internal ref transitions from 0 -> 1. The hard part is then dealing with the runtime_pm callbacks also calling xe_device_mem_access_get() and deadlocking, which the pm_runtime_suspended() check prevented. v2: - ct->lock looks to be primed with fs_reclaim, so holding that and then allocating memory will cause lockdep to complain. Now that we unconditionally grab the mem_access.lock around mem_access_{get,put}, we need to change the ordering wrt to grabbing the ct->lock, since some of the runtime_pm routines can allocate memory (or at least that's what lockdep seems to suggest). Hopefully not a big deal. It might be that there were already issues with this, just that the atomics where "hiding" the potential issues. v3: - Use Thomas Hellström' idea with tracking the active task that is executing in the resume or suspend callback, in order to avoid recursive resume/suspend calls deadlocking on itself. - Split the ct->lock change. v4: - Add smb_mb() around accessing the pm_callback_task for extra safety. (Thomas Hellström) v5: - Clarify the kernel-doc for the mem_access.lock, given that it is quite strange in what it protects (data vs code). The real motivation is to aid lockdep. (Rodrigo Vivi) v6: - Split out the lock change. We still want this as a lockdep aid but only for the xe_device_mem_access_get() path. Sticking a lock on the put() looks be a no-go, also the runtime_put() there is always async. - Now that the lock is gone move to atomics and rely on the pm code serialising multiple callers on the 0 -> 1 transition. - g2h_worker_func() looks to be the next issue, given that suspend-resume callbacks are using CT, so try to handle that. v7: - Add xe_device_mem_access_get_if_ongoing(), and use it in g2h_worker_func(). v8 (Anshuman): - Just always grab the rpm, instead of just on the 0 -> 1 transition, which is a lot clearer and simplifies the code quite a bit. v9: - Make sure we also adjust the CT fast-path with if-active. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/258 Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Cc: Thomas Hellström Cc: Matthew Brost Cc: Anshuman Gupta Acked-by: Anshuman Gupta Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 09d88e3beb64b8d2e3043fef72dda0df62487e44 Author: Anshuman Gupta Date: Tue Jul 18 13:37:03 2023 +0530 drm/xe/pm: Init pcode and restore vram on power lost Don't init pcode and restore VRAM objects in vain. We can rely on primary GT GUC_STATUS to detect whether card has really lost power even when d3cold is allowed by xe. Adding d3cold.lost_power flag to avoid pcode init and vram restoration. Also cleaning up the TODO code comment. v2: - %s/xe_guc_has_lost_power()/xe_guc_in_reset(). - Used existing gt instead of new variable. [Rodrigo] - Added kernel-doc function comment. [Rodrigo] - xe_guc_in_reset() return true if failed to get fw. Cc: Rodrigo Vivi Signed-off-by: Anshuman Gupta Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230718080703.239343-6-anshuman.gupta@intel.com Signed-off-by: Rodrigo Vivi commit 2ef08b98025bd09b74f68d1801995b0b068afbe7 Author: Anshuman Gupta Date: Tue Jul 18 13:37:02 2023 +0530 drm/xe/pm: Toggle d3cold_allowed using vram_usages Adding support to control d3cold by using vram_usages metric from ttm resource manager. When root port is capable of d3cold but xe has disallowed d3cold due to vram_usages above vram_d3ccold_threshol. It is required to disable d3cold to avoid any resume failure because root port can still transition to d3cold when all of pcie endpoints and {upstream, virtual} switch ports will transition to d3hot. Also cleaning up the TODO code comment. v2: - Modify d3cold.allowed in xe_pm_d3cold_allowed_toggle. [Riana] - Cond changed (total_vram_used_mb < xe->d3cold.vram_threshold) according to doc comment. v3: - Added enum instead of true/false argument in d3cold_toggle(). [Rodrigo] - Removed TODO comment. [Rodrigo] Cc: Rodrigo Vivi Signed-off-by: Anshuman Gupta Reviewed-by: Badal Nilawar Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230718080703.239343-5-anshuman.gupta@intel.com Signed-off-by: Rodrigo Vivi commit b2d756199be822f4de8dd18fe4e3a939e4a06e7a Author: Anshuman Gupta Date: Tue Jul 18 13:37:01 2023 +0530 drm/xe/pm: Add vram_d3cold_threshold Sysfs Add per pci device vram_d3cold_threshold Sysfs to control the d3cold allowed knob. Adding a d3cold structure embedded in xe_device to encapsulate d3cold related stuff. v2: - Check total vram before initializing default threshold. [Riana] - Add static scope to vram_d3cold_threshold DEVICE_ATTR. [Riana] v3: - Fixed cosmetics review comment. [Riana] - Fixed CI Hook failures. - Used drmm_mutex_init(). v4: - Fixed kernel-doc warnings. v5: - Added doc explaining need for the device sysfs. [Rodrigo] - Removed TODO comment. Cc: Rodrigo Vivi Signed-off-by: Anshuman Gupta Reviewed-by: Riana Tauro Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230718080703.239343-4-anshuman.gupta@intel.com Signed-off-by: Rodrigo Vivi commit fddebcbf7a47d661f3eb475de0b75be11c7c3bb8 Author: Anshuman Gupta Date: Tue Jul 18 13:37:00 2023 +0530 drm/xe/pm: Refactor xe_pm_runtime_init Wrap xe_pm_runtime_init inside xe_pm_init. Cc: Rodrigo Vivi Signed-off-by: Anshuman Gupta Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230718080703.239343-3-anshuman.gupta@intel.com Signed-off-by: Rodrigo Vivi commit ac0be3b5b28ecf4890b3fc3ebaec18e7ce5fcc86 Author: Anshuman Gupta Date: Tue Jul 18 13:36:59 2023 +0530 drm/xe/pm: Add pci d3cold_capable support Adding pci d3cold_capable check in order to initialize d3cold_allowed as false statically. It avoids vram save/restore latency during runtime suspend/resume v2: - Added else block to xe_pci_runtime_idle. [Rodrigo] Cc: Rodrigo Vivi Signed-off-by: Anshuman Gupta Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230718080703.239343-2-anshuman.gupta@intel.com Signed-off-by: Rodrigo Vivi commit 1737785ae5313e4941181025858fc90ed4acd314 Author: Riana Tauro Date: Mon Jul 17 15:29:00 2023 +0530 drm/xe: remove gucrc disable from suspend path Currently GuCRC is disabled in suspend path for xe. Rc6 is a prerequiste to enable s0ix and should not be disabled for s2idle. There is no requirement to disable GuCRC for S3+. Remove it from xe_guc_pc_stop, thus removing from suspend path. Retain the call in other places where xe_guc_pc_stop is called. v2: add description and return statement to kernel-doc (Rodrigo) v3: update commit message (Rodrigo) v4: add mem_access_get to the gucrc disable function Signed-off-by: Riana Tauro Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 3e8e7ee6a375217c4f6a9a96d50e3ae711832d37 Author: Francois Dugast Date: Mon Jul 17 16:53:55 2023 +0200 drm/xe: Cleanup style warnings Reduce the number of warnings reported by checkpatch.pl from 118 to 48 by addressing those warnings types: LEADING_SPACE LINE_SPACING BRACES TRAILING_SEMICOLON CONSTANT_COMPARISON BLOCK_COMMENT_STYLE RETURN_VOID ONE_SEMICOLON SUSPECT_CODE_INDENT LINE_CONTINUATIONS UNNECESSARY_ELSE UNSPECIFIED_INT UNNECESSARY_INT MISORDERED_TYPE Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit b8c1ba831e675005ff871cd4a4e04ff90326b4ae Author: Francois Dugast Date: Mon Jul 17 10:20:18 2023 +0200 drm/xe: Prevent flooding the kernel log with XE_IOCTL_ERR Lower log level of XE_IOCTL_ERR macro to debug in order to prevent flooding kernel log. v2: Rename XE_IOCTL_ERR to XE_IOCTL_DBG (Rodrigo Vivi) v3: Rebase v4: Fix style, remove unrelated change about __FILE__ and __LINE__ Link: https://lists.freedesktop.org/archives/intel-xe/2023-May/004704.html Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 5ce58303440b7efb21c554cb0b6614482aab8fe9 Author: Francois Dugast Date: Thu Jul 13 16:50:35 2023 +0200 drm/xe: Fix typos Fix minor issues: remove extra ';' and s/Initialise/Initialize/. Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit f5b85ab62b0ae0e6b5817312eeb252effaea2453 Author: Francois Dugast Date: Thu Jul 13 16:20:20 2023 +0200 drm/xe: Cleanup COMPLEX_MACRO style issues Remove some style issues of type COMPLEX_MACRO reported by checkpatch. Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 80c58bdf0ea28ccb2e78647d53524ef86486e3ec Author: Francois Dugast Date: Thu Jul 13 15:38:48 2023 +0200 drm/xe: Cleanup TRAILING_WHITESPACE style issues Remove all existing style issues of type TRAILING_WHITESPACE reported by checkpatch. Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 763931d25c7f40226c5e5edd8dcf90f2f2dfcddf Author: Francois Dugast Date: Tue Jul 11 17:35:57 2023 +0200 drm/xe: Cleanup CODE_INDENT style issues Remove all existing style issues of type CODE_INDENT reported by checkpatch. Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 4ab5901cc0ed8951ae58b01740d0037dbbca8558 Author: Francois Dugast Date: Tue Jul 11 17:33:55 2023 +0200 drm/xe: Cleanup POINTER_LOCATION style issues Remove all existing style issues of type POINTER_LOCATION reported by checkpatch. Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit fb1d55efdfcbfd8711f7b8db65267f370fa0e49b Author: Francois Dugast Date: Tue Jul 11 16:58:20 2023 +0200 drm/xe: Cleanup OPEN_BRACE style issues Remove almost all existing style issues of type OPEN_BRACE reported by checkpatch. Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 4cd6d492595fdcbb158def8b175ca1558363e742 Author: Francois Dugast Date: Tue Jul 11 16:24:30 2023 +0200 drm/xe: Cleanup SPACING style issues Remove almost all existing style issues of type SPACING reported by checkpatch. Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 04194a4f780895799cf83c86d5bb8bc11560a536 Author: Brian Welty Date: Wed Jul 12 18:25:42 2023 -0700 drm/xe: Fix lockdep warning from xe_vm_madvise We need to hold vm->lock before the xe_vm_is_closed_or_banned(). Else we get this splat: [ 802.555227] ------------[ cut here ]------------ [ 802.555234] WARNING: CPU: 33 PID: 3122 at drivers/gpu/drm/xe/xe_vm.h:60 [ 802.555515] CPU: 33 PID: 3122 Comm: xe_exec_fault_m Tainted: ... [ 802.555709] Call Trace: [ 802.555714] [ 802.555720] ? __warn+0x81/0x170 [ 802.555737] ? xe_vm_madvise_ioctl+0x2de/0x440 [xe] Fixes: 9d858b69b0cf ("drm/xe: Ban a VM if rebind worker hits an error") Reviewed-by: Matthew Brost Signed-off-by: Brian Welty Signed-off-by: Rodrigo Vivi commit b1f8f4b5eec62173955c04d98723a75f2cfd8f42 Author: Brian Welty Date: Wed Jul 12 18:25:21 2023 -0700 drm/xe: Fix BUG_ON during bind with prefetch It was missed that print_op needs to include DRM_GPUVA_OP_PREFETCH. Else we hit the impossible BUG_ON: [ 886.371040] ------------[ cut here ]------------ [ 886.371047] kernel BUG at drivers/gpu/drm/xe/xe_vm.c:2234! [ 886.371216] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI [ 886.371229] CPU: 1 PID: 3132 Comm: xe_exec_fault_m [ 886.371257] RIP: 0010:vm_bind_ioctl_ops_create+0x45f/0x470 [xe] ... [ 886.371517] Call Trace: [ 886.371525] [ 886.371531] ? __die_body+0x1a/0x60 [ 886.371546] ? die+0x38/0x60 [ 886.371557] ? do_trap+0x10a/0x120 [ 886.371568] ? vm_bind_ioctl_ops_create+0x45f/0x470 [xe] v2: add debug print for PREFETCH in print_op Fixes: b06d47be7c83 ("drm/xe: Port Xe to GPUVA") Reviewed-by: Matthew Brost Signed-off-by: Brian Welty Signed-off-by: Rodrigo Vivi commit e802ed9e9bdc890b013b850f49326d1b79e1e5f5 Merge: 5a256cf710cd8 6cbac23b309cc Author: Arnd Bergmann Date: Thu Dec 21 16:35:59 2023 +0000 Merge tag 'imx-bindgins-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/dt i.MX DT bindings for 6.8: - New vendor prefix for Dimonoff and echarge Véhicule Électrique (RVE). - New board compatible for TQ-Systems LX2160A, RVE gateway, Dimonoff gateway EVK, i.MX8M Mallow and SKOV i.MX8MP RevB board. * tag 'imx-bindgins-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: add Dimonoff gateway EVK board dt-bindings: vendor-prefixes: add dimonoff dt-bindings: arm: fsl: Add TQ-Systems LX2160A based boards dt-bindings: arm: fsl: add verdin imx8mp mallow board dt-bindings: arm: fsl: add verdin imx8mm mallow board dt-bindings: arm: Add compatible for SKOV i.MX8MP RevB board dt-bindings: arm: fsl: add RVE gateway board dt-bindings: vendor-prefixes: add rve Link: https://lore.kernel.org/r/20231216064605.876196-3-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 356010a1a0c9fbe55d6c7e5dbd273a0fd224469e Author: Matthew Auld Date: Mon Jun 26 18:20:40 2023 +0100 drm/xe/mmio: update gt_count when probing multi-tile It looks like the single-tile PVC in CI dies during module load when doing the pcode init. From the logs we try to access the address 0000000000138124 which doesn't map to anything, however 0x138124 also looks to be the PCODE_MAILBOX register. So looks like the per-tile mmio register mapping is NULL. During probe the tile count is potentially trimmed, since we don't know the real count until we actually probe the device. This seems to be the case for single-tile PVC or similar devices. However it looks like the gt_count is never adjusted to respect this updated tile count. As a result when later doing some for_each_gt() loop, like we do for the pcode, we can get back some GT that maps to some non-existent tile which hasn't been properly set up, leading to crashes. Try to fix this by adjusting the gt_count after probing the tiles for real. v2: Fix typo so it actually builds References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/383 Signed-off-by: Matthew Auld Cc: Lucas De Marchi Cc: Matt Roper Reviewed-by: Ofir Bitton Signed-off-by: Rodrigo Vivi commit 35c8a964398e1c57968cc94cd6f4e3a64c796357 Author: Matthew Auld Date: Mon Jul 10 10:40:49 2023 +0100 drm/xe: handle TLB invalidations from CT fast-path In various test cases that put the system under a heavy load, we can sometimes see errors with missed TLB invalidations. In such cases we see the interrupt arrive for the invalidation from the GuC, however the actual processing of the completion is pushed onto a workqueue and handled with all the other CT stuff, which might take longer than expected. Since we expect TLB invalidations to complete within a reasonable amount of time (at most ~250ms), and they do seem pretty critical, allow handling directly from the CT fast-path. v2 (José): - Actually use the correct spinlock/unlock_irq, since pending_lock is grabbed from IRQ. v3: - Don't publish the TLB fence on the list until after we fully initialize it and successfully do the CT send. The list is now only protected by the spin_lock pending_lock and we can't hold that across the entire TLB send operation. v4 (Matt Brost): - Be careful with racing against fast CT path writing the seqno, before we have actually published the fence. References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/297 References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/320 References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/449 Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 0b688f9b2880c655a8b161ec46932a6fe8da9ea9 Author: Matthew Auld Date: Mon Jul 10 10:40:48 2023 +0100 drm/xe/ct: update g2h outstanding for CTB capture Looks to always to be zero when inspecting the CTB dump. Signed-off-by: Matthew Auld Cc: José Roberto de Souza Cc: Rodrigo Vivi Cc: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 4aa5e3594f649d1bc202db302a8d5030d03c02fb Author: Matthew Auld Date: Mon Jul 10 10:40:47 2023 +0100 drm/xe/tlb: print seqno_recv on fence TLB timeout To help debugging, sample the current seqno_recv and dump it out if we encounter a TLB timeout for the fences path. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 2ca01fe31b68bab12ccccef91196ea21cd93e065 Author: Matthew Auld Date: Mon Jul 10 10:40:46 2023 +0100 drm/xe/tlb: also update seqno_recv during reset We might have various kworkers waiting for TLB flushes to complete which are not tracked with an explicit TLB fence, however at this stage that will never happen since the CT is already disabled, so make sure we signal them here under the assumption that we have completed a full GT reset. v2: - We need to use seqno - 1 here. After acquiring ct->lock the seqno is actually the next users seqno and not the pending one. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 7b24cc3e309f31ad77b2ed136ce7606e0b3f67bb Author: Matthew Auld Date: Mon Jul 10 10:40:45 2023 +0100 drm/xe/gt: tweak placement for signalling TLB fences after GT reset Assumption here is that submission is disabled along with CT, and full GT reset will also nuke TLBs, so should be safe to signal all in-flight TLB fences, but only after the actual reset so move the placement slightly. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit a4d362bbed8c86a632b5e22bf64d9c5564e3766e Author: Matthew Auld Date: Mon Jul 10 10:40:44 2023 +0100 drm/xe/ct: serialise fast_lock during CT disable The fast-path CT could be running as we enter a runtime-suspend or potentially a GT reset, however here we only use the ct->fast_lock and not the full ct->lock. Before disabling the CT, also serialise against the fast_lock to ensure any in-progress work finishes before we start nuking the CT related stuff. Once we disable ct->enabled and drop the lock, any new work should fail gracefully, and anything that was in progress should be finished. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 4803f6e26f1678b8b5af2924199bc137e7ec5fad Author: Matthew Auld Date: Mon Jul 10 10:40:43 2023 +0100 drm/xe/tlb: increment next seqno after successful CT send If we are in the middle of a GT reset or similar the CT might be disabled, such that the CT send fails. However we already incremented gt->tlb_invalidation.seqno which might lead to warnings, since we effectively just skipped a seqno: 0000:00:02.0: drm_WARN_ON(expected_seqno != msg[0]) Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit dad33831d8d137ee28b21c3c2296463a01aa5b78 Author: Matthew Auld Date: Mon Jul 10 10:40:42 2023 +0100 drm/xe/ct: hold fast_lock when reserving space for g2h Reserving and checking for space on the g2h side relies on the fast_lock, and not the CT lock since we need to release space from the fast CT path. Make sure we hold it when checking for space and reserving it. The main concern is calling __g2h_release_space() as we are reserving something and since the info.space and info.g2h_outstanding operations are not atomic we can get some nonsense values back. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit c4bbc32e09ab9f74c725a8719df2b509c8ad8780 Author: Matthew Auld Date: Mon Jul 10 10:40:41 2023 +0100 drm/xe: hold mem_access.ref for CT fast-path Just checking xe_device_mem_access_ongoing() is not enough, we also need to hold the reference otherwise the ref can transition from 1 -> 0 as we enter g2h_read(), leading to warnings. While we can't do a full rpm sync in the IRQ, we can keep the device awake if the ref is non-zero. Introduce a new helper for this and set it to work in for the CT fast-path. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 86ed09250e068faa840dadcd175d3cd8d174f998 Author: Matthew Auld Date: Mon Jul 10 10:40:40 2023 +0100 drm/xe/tlb: ensure we access seqno_recv once Ensure we load gt->tlb_invalidation.seqno_recv once, and use that for our seqno checking. The gt->tlb_invalidation_seqno_past is a shared global variable and can potentially change at any point here. However the checks here need to operate on a stable version of seqno_recv for this to make any sense. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 38fa29dc2b73b54299e973d292ec7fd507d3b8c0 Author: Matthew Auld Date: Mon Jul 10 10:40:39 2023 +0100 drm/xe/tlb: drop unnecessary smp_wmb() wake_up_all() and wait_event_timeout() already have the correct barriers as per https://www.kernel.org/doc/Documentation/memory-barriers.txt. This should ensure that the seqno_recv write can't be re-ordered wrt to the actual wake_up_all() i.e we get woken up but there is no write. The reader side with wait_event_timeout() also has the correct barriers. With that drop the hand rolled smp_wmb(), which is anyway missing some kind of matching barrier on the reader side. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit b06d47be7c83165d3b3e45e1d5f9520b79c7f5cc Author: Matthew Brost Date: Fri Jul 7 22:23:57 2023 -0700 drm/xe: Port Xe to GPUVA Rather than open coding VM binds and VMA tracking, use the GPUVA library. GPUVA provides a common infrastructure for VM binds to use mmap / munmap semantics and support for VK sparse bindings. The concepts are: 1) xe_vm inherits from drm_gpuva_manager 2) xe_vma inherits from drm_gpuva 3) xe_vma_op inherits from drm_gpuva_op 4) VM bind operations (MAP, UNMAP, PREFETCH, UNMAP_ALL) call into the GPUVA code to generate an VMA operations list which is parsed, committed, and executed. v2 (CI): Add break after default in case statement. v3: Rebase v4: Fix some error handling v5: Use unlocked version VMA in error paths v6: Rebase, address some review feedback mainly Thomas H v7: Fix compile error in xe_vma_op_unwind, address checkpatch Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 5cecdd0bb6bf4b8979b7d071017560daecfc9200 Author: Matthew Brost Date: Mon Jun 26 14:55:37 2023 -0700 drm/xe: Remove __xe_vm_bind forward declaration Not needed so remove it. Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 21ed3327e388c24ddbdc3b2e8533f0c3ab99953b Author: Matthew Brost Date: Thu Jun 22 13:03:04 2023 -0700 drm/xe: Add helpers to hide struct xe_vma internals This will help with the GPUVA port as the internals of struct xe_vma will change. v2: Update comment around helpers Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 9d858b69b0cfb56dd67943138c10d84eeb73380f Author: Matthew Brost Date: Thu Jun 22 12:39:48 2023 -0700 drm/xe: Ban a VM if rebind worker hits an error We cannot recover a VM if a rebind worker hits an error, ban the VM if happens to ensure we do not attempt to place this VM on the hardware again. A follow up will inform the user if this happens. v2: Return -ECANCELED in exec VM closed or banned, check for closed or banned within VM lock. v3: Fix lockdep splat by looking engine outside of vm->lock v4: Fix error path when engine lookup fails v5: Add debug message in rebind worker on error, update comments wrt locking, add xe_vm_close helper Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 54c9fb7e64fd3f0da1570e3d1c5446605e83210e Author: Matthew Brost Date: Mon Jul 10 07:41:21 2023 -0700 drm/xe: Use internal VM flags in xe_vm_create xe_vm_create used the IOCTL create flags in a few places rather than the internal VM flags and this just happened to work as these values matched. This is risky (and incorrect) as the internal flag values are free to change. Fix this and use the internal VM flag values. Signed-off-by: Matthew Brost Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 55d8ac9631aaa8ae3794341c52009f635a0d3188 Author: Tejas Upadhyay Date: Mon Jul 3 14:36:10 2023 +0530 drm/xe: make kobject type struct as constant Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Reviewed-by: Nirmoy Das Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 43e82fb9ecf0009aeb95e284067a9a24a55a93ed Author: Tejas Upadhyay Date: Wed Jul 5 14:06:33 2023 +0530 drm/xe: make GT sysfs init return void Currently return from xe_gt_sysfs_init() is ignored and also a failure in xe_gt_sysfs_init() isn't fatal so make it return void. V2 : - add drm_warn in error paths - Himal - Edit commit message - Nirmoy Acked-by: Ashutosh Dixit Reviewed-by: Himal Prasad Ghimiray Reviewed-by: Nirmoy Das Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit c7fac450dd865d2ad3400a1df0e8655df75a465f Author: Alan Previn Date: Fri Jun 2 11:16:50 2023 -0700 drm/xe/guc: Fix h2g_write usage of GUC_CTB_MSG_MAX_LEN In the ABI header, GUC_CTB_MSG_MIN_LEN is '1' because GUC_CTB_HDR_LEN is 1. This aligns with H2G/G2H CTB specification where all command formats are defined in units of dwords so that '1' is a dword. Accordingly, GUC_CTB_MSG_MAX_LEN is 256-1 (i.e. 255 dwords). However, h2g_write was incorrectly assuming that GUC_CTB_MSG_MAX_LEN was in bytes. Fix this. v3: Fix nit on #define location.(Matt) v2: By correctly treating GUC_CTB_MSG_MAX_LEN as dwords, it causes a local array to consume 4x the stack size. Rework the function to avoid consuming stack even if the action size is large. (Matt) Signed-off-by: Alan Previn Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 44869c72e847e015649ffd4366df88fe529826bb Author: Jani Nikula Date: Tue Jul 4 18:32:41 2023 +0300 drm/xe/mmio: add xe_mmio_read16() Little by little, make stuff feature complete. Signed-off-by: Jani Nikula Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit b747411964cd9011e05f4b9f5624be9ed71532c4 Author: Thomas Hellström Date: Thu Jun 29 22:51:33 2023 +0200 drm/xe: Make page-table updates using the default engine happen in order If the default engine m->eng was used, there is no check for idle and a cpu page-table update may thus happen in parallel with a gpu one. Don't allow CPU page-table updates with the default engine until the engine is idle. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230629205134.111849-2-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit c0ab10ee2ee6a2c423f95154e0842a1b19a4c13b Author: Matt Roper Date: Wed Jun 14 13:52:02 2023 -0700 drm/xe: Enable PCI device earlier Newer Intel platforms require that inspect the contents of the GMD_ID registers very early in the driver initialization process to determine the IP version (and proper init sequences), of the platform. Move the general PCI device setup and enablement slightly earlier, before we start trying to peek at the GMD_ID registers. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230614205202.3376752-5-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 98b6d092341128f753cff64b1bceda69c718b6af Author: Matt Roper Date: Wed Jun 14 13:52:01 2023 -0700 drm/xe: Print proper revid value for unknown media revision If the GMD_ID register reports a higher media revision ID than we're expecting, print the media revid, not the graphics revid, in the debug message. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230614205202.3376752-4-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 54c5b74a06939bec61aa59421aa1073c0b666c2c Author: Matt Roper Date: Wed Jun 14 13:52:00 2023 -0700 drm/xe: Don't raise error on fused-off media It's legitimate for the media GMD_ID register to read back as 0x0 if media functionality is fused off or otherwise not present on the platform. Avoid printing an "unknown media version" error message for this case. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230614205202.3376752-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 413343584725f1fab9c4c676504cf6478dc3281b Author: Matt Roper Date: Wed Jun 14 13:51:59 2023 -0700 drm/xe: Return GMD_ID revid properly peek_gmdid() returns the IP version, not the raw value of the GMD_ID register. Make sure we extract and return the rev_id field as well so that it can be used to determine the IP steppings properly. Reviewed-by: Lucas De Marchi Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230614205202.3376752-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit e4b2893c17048aecb195553b60631fcb07360c4e Author: Tejas Upadhyay Date: Wed Jun 28 11:53:16 2023 +0530 drm/xe: Make usable size of VRAM readable Current size member of vram struct does not give complete information as what "size" contains. Does it contain reserved portions or not. Name it usable size and accordingly describe other size members as well. Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 9641df819772662429721f4b14141308fcf2d667 Author: Tejas Upadhyay Date: Wed Jun 28 11:36:16 2023 +0530 drm/xe: Add sysfs entry to report per tile memory size Add sysfs entry to read per tile physical memory including stolen memory. V5: - rename var name and make it part of vram struct - Lucas V4: - %s/addr_range/physical_vram_size_byes, make it user readable name - Joonas/Aravind - Display in bytes - Joonas/Aravind V3: - Exclude DG1, replace sysfs_create_file/files - Aravind V2: - Use DEVICE_ATTR_RO - Aravind - Dont put kobj on sysfs_file_create fail - Himal - Skip addr_range sysfs create for non dgfx - Himal Reviewed-by: Aravind Iddamsetty Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 8c82f914a302e394e2a037241d84ca3af6577f97 Author: Tejas Upadhyay Date: Tue Jun 6 15:48:38 2023 +0530 drm/xe: Add GTs under respective tile sysfs With the separation of xe_tile and xe_gt, We now consider a PCI device (xe_device) to contain one or more tiles (struct xe_tile). Each tile will contain one or more GTs (struct xe_gt). So lets align sysfs paths accordingly. TODO: Currently we have gt0 under tile0 and gt1 under tile1 on multi-tile. This GT indexing still under discussion, when it is concluded we need to revisit this change. Reviewed-by: Aravind Iddamsetty Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit e5a845fd8fa4ce61a99c87f37b63530fa4995750 Author: Tejas Upadhyay Date: Wed Jun 28 11:08:35 2023 +0530 drm/xe: Add sysfs entry for tile We have recently introduced tile for each gpu, so lets add sysfs entry per tile for userspace to provide required information specific to tile. V5: - define ktype as const V4: - Reorder headers - Aravind V3: - Make API to return void and add drm_warn - Aravind V2: - Add logs in failure path Reviewed-by: Aravind Iddamsetty Signed-off-by: Tejas Upadhyay Signed-off-by: Rodrigo Vivi commit 5572a004685770f8daad7661c5494b65148ede9f Author: Zbigniew Kempczyński Date: Wed Jun 28 07:51:41 2023 +0200 drm/xe: Use nanoseconds instead of jiffies in uapi for user fence Using jiffies as a timeout from userspace is weird even if theoretically exists possiblity of acquiring jiffies via getconf. Unfortunately this method is unreliable and the returned value may vary from the one configured in the kernel config. Now timeout is expressed in nanoseconds and its interpretation depends on setting DRM_XE_UFENCE_WAIT_ABSTIME flag. Relative timeout (flag is not set) means fence expire at now() + timeout. Absolute timeout (flag is set) means that the fence expires at exact point of time. Passing negative timeout means we will wait "forever" by setting wait time to MAX_SCHEDULE_TIMEOUT. Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://lore.kernel.org/r/20230628055141.398036-2-zbigniew.kempczynski@intel.com Signed-off-by: Zbigniew Kempczyński Signed-off-by: Rodrigo Vivi commit 2e60442a4fef935c76cd70858775b92f565642cc Author: Paulo Zanoni Date: Mon Jun 26 14:22:21 2023 -0700 drm/xe: properly check bounds for xe_wait_user_fence_ioctl() If !no_engines, then we use copy_from_user to copy to the 'eci' array, which has XE_HW_ENGINE_MAX_INSTANCE members. The amount of members copied is given by the user in args->num_engines, so add code to check that args->num_engines does not exceed XE_HW_ENGINE_MAX_INSTANCE. It's an unsigned value so there's no need to check for negative values. Fixes error messages such as: Buffer overflow detected (54 < 18446744073709551520)! Reviewed-by: José Roberto de Souza Signed-off-by: Paulo Zanoni Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230626212221.136640-2-paulo.r.zanoni@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 7f38e1e1063e1b9b2c8368c741ff5e679091e9f8 Author: Paulo Zanoni Date: Mon Jun 26 14:22:20 2023 -0700 drm/xe: fix bounds checking for 'len' in xe_engine_create_ioctl There's this shared machine running xe.ko and I often log in to see my tmux corrupted by messages such as: usercopy: Kernel memory overwrite attempt detected to wrapped address (offset 0, size 18446660151965198754)! I also sometimes see: kernel BUG at mm/usercopy.c:102! Someone is running a program that's definitely submitting random numbers to this ioctl. If you pass width=65535 and num_placements=32769 then you get a negative 'len', which avoids the EINVAL check, leading to the bug. Switch 'len' to u32. It is the result of the multiplication of two u16 numbers, so it won't be able to overflow back into smaller numbers as an u32. v2: Make len u32 instead of checking for <=0 (José). Signed-off-by: Paulo Zanoni Reviewed-by: José Roberto de Souza Reviewed-by: Matthew Brost Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230626212221.136640-1-paulo.r.zanoni@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit f07d9a615b7b257bf2c2197262769286ddc75109 Author: Daniele Ceraolo Spurio Date: Tue Jun 27 17:16:42 2023 -0700 drm/xe/slpc: Start SLPC before GuC submission on reset The SLPC code has a strict 5ms timeout from when the start command is queued to when we expect the reply to appear in memory. This works if the CT channel is empty, but if the channel is busy there might be an extra delay that causes the process to exceeded the timeout. We see this issue when a reset occurs while userspace keeps submitting, because the submission code is re-enabled first and it will start using the channel to service those submissions. To fix this, we can simply start SLPC before re-enabling submission. This has also the benefit of not allowing submissions to go through with an uninitialized SLPC. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/375 Signed-off-by: Daniele Ceraolo Spurio Cc: Vinay Belgaumkar Cc: Matthew Brost Reviewed-by: Vinay Belgaumkar Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230628001642.3170070-1-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit 420c6a6f65f4856f77dba278ae32e2701d8838f3 Author: Daniele Ceraolo Spurio Date: Tue Jun 27 15:28:56 2023 -0700 drm/xe: fix HuC FW ordering for DG1 The firmware definitions must be ordered based on platform, from newer to older, which means that the DG1 FW must come before the ADL one. Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8699 Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230627222856.3165647-1-daniele.ceraolospurio@intel.com Signed-off-by: Rodrigo Vivi commit 807e7cee6981d9c570f986bebc07829094acb3cb Author: Anusha Srivatsa Date: Tue Jun 13 10:47:40 2023 -0700 drm/xe: Add missing ADL entries to xe_test_wa With the fake device creation fix in the previous patch, adding Alderlake P platform in xe_wa_test. With this, driver is able to run the kunit test for ADLP properly. Cc: Lucas De Marchi Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230613174740.786041-2-anusha.srivatsa@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 64c9ae213d2ab1cce824841518e9539f597ee91e Author: Anusha Srivatsa Date: Tue Jun 13 10:47:39 2023 -0700 drm/xe/kunit: Handle fake device creation for all platform/subplatform cases For platform like Alderlake P there are subplatforms and just Alderlake P. Unlike DG2 in which every flavour is either a G10,G11 or G12 variant. In this case(Alderlake P/S), the Kunit test evaluates the subplatform to NONE and is unable to create a fake device. Removing the condition in xe_pci_fake_device_init() to support this corner case so driver can proceed with the unit testing. Cc: Lucas De Marchi Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230613174740.786041-1-anusha.srivatsa@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit c8a740775dfff4467c9dd9f1cad22d8bdc7cccfa Author: Anshuman Gupta Date: Wed May 24 14:36:53 2023 +0530 drm/xe/pm: Disable PM on unbounded pcie parent bridge Intel Discrete GFX cards gfx may have multiple PCIe endpoints, they connects to root port via pcie upstream switch port(USP) and virtual pcie switch port(VSP), sometimes VSP pcie devices doesn't bind to pcieport driver. Without pcieport driver, pcie PM comes without any warranty and with unbounded VSP gfx card won't transition to low power pcie Device and Link states therefore assert drm_warn on unbounded VSP and disable xe driver PM support. v2: - Disable Xe PCI PM support. [Rodrigo] v3: - Changed subject and Rebase. v4: - %s/xe_pci_unbounded_bridge_disable_pm/xe_assert_on_unbounded_bridge. [Rodrigo] - Use device_set_pm_not_required() instead of dev_pm_ops NULL assignment. Cc: Rodrigo Vivi Signed-off-by: Anshuman Gupta Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20230524090653.1192566-1-anshuman.gupta@intel.com Signed-off-by: Rodrigo Vivi commit 5835dc7fa6e419627e23015c7dbde120a77ce738 Author: Thomas Hellström Date: Thu May 25 09:41:44 2023 +0200 drm/xe: Fix vm refcount races Fix a race in xe_vm_lookup() where the vm could disappear after the lookup mutex unlock but before the get. The xe_vm_get() call must be inside the lookup mutex. Also fix a vm close race where multiple callers could potentially succeed in calling xe_vm_close_and_put(). Reported-by: Oded Gabbay Link: https://lists.freedesktop.org/archives/intel-xe/2023-May/004704.html Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230525074144.178961-1-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit a201c6ee37d63e7c0a2973fb7790e94211b7fa83 Author: Thomas Hellström Date: Mon Jun 26 20:17:41 2023 +0200 drm/xe/bo: Evict VRAM to TT rather than to system The main difference is that we don't bounce and sync on eviction, allowing for pipelined eviction. Moving forward we also need to be careful with dma mappings which can be released in SYSTEM but may remain in TT. v2: - Remove a stale comment (Matthew Brost) Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230626181741.32820-5-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 70ff6a999d7cae52b6b418c3110b6245dde9271c Author: Thomas Hellström Date: Mon Jun 26 20:17:40 2023 +0200 drm/xe/bo: Gracefully handle errors from ttm_bo_move_accel_cleanup(). The function ttm_bo_move_accel_cleanup() attempts to help pipeline a move, and in doing so, needs memory allocations which may fail. Rather than failing in a state where the new resource may freed while accessed by the copy engine, sync uninterruptible and do a failsafe cleanup. v2: - Don't try to attach the signaled fence on ttm_bo_move_accel_cleanup() error. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230626181741.32820-4-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 3439cc46619a3f31780cbd4f820384f9586d5ee1 Author: Thomas Hellström Date: Mon Jun 26 20:17:39 2023 +0200 drm/xe/bo: Avoid creating a system resource when allocating a fresh VRAM bo When creating a new bo, on the first move the bo->resource is typically NULL. Our move callback rejected that instructing TTM to create a system resource. In addition a struct ttm_tt with a page-vector was created, although not populated with pages. Similarly when the clearing of VRAM was complete, the system resource was put on a ghost object and freed using the TTM delayed destroy mechanism. This is a lot of pointless work. So avoid creating the system resource and instead change the code to cope with a NULL bo->resource. v2: - Add some code comments (Matthew Brost) v3: - Fix a dereference of old_mem which might be NULL. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20230626181741.32820-3-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit bc2e0215deeaa88dec44ff07e3a2b19283d53cdb Author: Thomas Hellström Date: Mon Jun 26 20:17:38 2023 +0200 drm/xe/bo: Fix swapin when moving to VRAM When a source system resource had been swapped out, we incorrectly assumed that we were lacking source data for a move and therefore cleared the destination instead of swapping in and copying the swapped-out data. Fix this. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20230626181741.32820-2-thomas.hellstrom@linux.intel.com Signed-off-by: Rodrigo Vivi commit 7b076d14f21a48de572e5191614b3e6b2d6ab823 Author: Badal Nilawar Date: Fri Jun 23 10:54:31 2023 +0530 drm/xe/mtl: Add support to get C6 residency/status of MTL Add the registers to get C6 residency of MTL SAMedia and C6 status of MTL gts v2: - move register definitions to regs header (Anshuman) - correct reg definition for mtl rc status - make idle_status function common (Badal) v3: - remove extra line in commit message - use only media type check in initialization - use graphics ver check (Anshuman) v4: - remove extra lines (Anshuman) Bspec: 66300 Signed-off-by: Badal Nilawar Signed-off-by: Riana Tauro Reviewed-by: Andi Shyti Reviewed-by: Anshuman Gupta Signed-off-by: Rodrigo Vivi commit 1c2097bbde107effe2183891f92c060aa64bfa8b Author: Riana Tauro Date: Fri Jun 23 10:54:30 2023 +0530 drm/xe: add a new sysfs directory for gtidle properties 1) Add a new sysfs directory under devices/gt#/ called gtidle to contain idle properties of GT such as name, idle_status, idle_residency_ms 2) Remove forcewake calls for residency counter v2: - abstract using function pointers (Anshuman) - remove forcewake calls for residency counter - use device_attr (Badal) - move rc functions to guc_pc - change name to gt_idle (Rodrigo) v3: - return error for drmm_add_action_or_reset - replace file and functions with gt_idle prefix to gt_idle_sysfs (Himal) - use enum for gt idle state - move multiplier to gt idle and initialize (Anshuman) - correct doc annotation (Rodrigo) - remove return variable - use kobj_gt instead of new gtidle kobj - move residency_ms to gtidle file - retain xe_guc_pc prefix for functions in guc_rc file (Michal) v4: - fix doc errors in xe_guc_pc file - change u64 to u32 for reading residency counter - keep gtidle states generic GT_IDLE_C[0/6] (Anshuman) v5: - update commit message to include removal of forcewake calls (Anshuman) - return void from sysfs initialization function and add warnings (Andi) v6: - remove extra lines (Anshuman) Signed-off-by: Riana Tauro Acked-by: Rodrigo Vivi Reviewed-by: Anshuman Gupta Reviewed-by: Andi Shyti Signed-off-by: Rodrigo Vivi commit 513e82627931d0ac6b74b9c2595008b3573a5158 Author: Matthew Auld Date: Mon Jun 19 12:00:20 2023 +0100 drm/xe/bo: consider bo->flags in xe_bo_migrate() For VRAM allocations the bo->flags can control some characteristics of the underlying memory, like whether it needs to be contiguous, and in the future whether it needs to be in the CPU visible portion. Rather use add_vram() in xe_bo_migrate() which should take care of such things for us. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: José Roberto de Souza Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 83ee6699b5964ff3b904a7064a61b453236296d6 Author: Matthew Auld Date: Mon Jun 26 09:25:08 2023 +0100 drm/doc: include xe_drm.h Make sure the uapi gets picked up by the normal docs build. Signed-off-by: Matthew Auld Cc: Francois Dugast Cc: Lucas De Marchi Reviewed-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit 63f9c3cd36cad69d4422d86b2f86675f93df521a Author: Matthew Auld Date: Mon Jun 26 09:25:07 2023 +0100 drm/xe/uapi: silence kernel-doc errors ./include/uapi/drm/xe_drm.h:263: warning: Function parameter or member 'gts' not described in 'drm_xe_query_gts' ./include/uapi/drm/xe_drm.h:854: WARNING: Inline emphasis start-string without end-string. With the idea to also include the uapi file in the pre-merge CI hooks when building the kernel-doc, so first make sure it's clean: https://gitlab.freedesktop.org/drm/xe/ci/-/merge_requests/16 v2: (Francois) - It makes more sense to just fix the kernel-doc for 'gts' Signed-off-by: Matthew Auld Cc: Francois Dugast Cc: Lucas De Marchi Reviewed-by: Francois Dugast Signed-off-by: Rodrigo Vivi commit a9c4a069fbc3a1e115fead47145bc0257a7b3509 Author: Matthew Auld Date: Fri Mar 31 09:46:25 2023 +0100 drm/xe/uapi: add some kernel-doc for region query Since we need to extend this, we should also take the time to add some basic kernel-doc here for the existing bits. Note that this is all still subject to change when upstreaming. Also convert XE_MEM_REGION_CLASS_* into an enum, so we can more easily create links to it from other parts of the uapi. Suggested-by: Gwan-gyeong Mun Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: Thomas Hellström Cc: Lucas De Marchi Cc: José Roberto de Souza Cc: Filip Hazubski Cc: Carl Zhang Cc: Effie Yu Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 1105ac15d2a151bc87c3fe0e79f95c5cde90f1eb Author: Matthew Auld Date: Fri Mar 31 09:46:24 2023 +0100 drm/xe/uapi: restrict system wide accounting Since this is considered an info leak (system wide accounting), rather hide behind perfmon_capable(). v2: - Without perfmon_capable() it likely makes more sense to report as zero, instead of reporting as used == total size. This should give similar behaviour as i915 which rather tracks free instead of used. Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: Thomas Hellström Cc: Gwan-gyeong Mun Cc: Lucas De Marchi Cc: José Roberto de Souza Cc: Filip Hazubski Cc: Carl Zhang Cc: Effie Yu Cc: Gwan-gyeong Mun Reviewed-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 1bc56a934f11cc9bb859116d30e828ccf2df54cf Author: Francois Dugast Date: Thu Jun 22 14:32:03 2023 +0200 drm/xe: Document topology mask query Provide information on the types of topology masks that can be queried and add some examples. Signed-off-by: Francois Dugast Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 4f082f2c3a37d1b2fb90e048cc61616885b69648 Author: Francois Dugast Date: Thu Jun 22 13:59:20 2023 +0200 drm/xe: Move defines before relevant fields Align on same rule in the whole file: defines then doc then relevant field, with an empty line to separate fields. v2: - Rebase on drm-xe-next - Fix ordering of defines and fields in uAPI (Lucas De Marchi) v3: Remove useless empty lines (Lucas De Marchi) v4: Move changelog to commit v5: Rebase Reported-by: Oded Gabbay Link: https://lists.freedesktop.org/archives/intel-xe/2023-May/004704.html Signed-off-by: Francois Dugast Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit ffd6620fb746c59ad82070f1975c4a0e3d30520e Author: Francois Dugast Date: Fri Jun 9 07:37:12 2023 +0000 drm/xe: Document structures for device query This adds documentation to the various structures used to query memory, GTs, topology, engines, and so on. It includes a functional code snippet to query engines. v2: - Rebase on drm-xe-next - Also document structures related to drm_xe_device_query, changed pseudo code to snippet (Lucas De Marchi) v3: - Move changelog to commit - Fix warnings showed only using dim checkpath Reported-by: Oded Gabbay Link: https://lists.freedesktop.org/archives/intel-xe/2023-May/004704.html Signed-off-by: Francois Dugast Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 5db4afe1db56c10b6edef41ad9309bf0bed87f34 Author: Mika Kuoppala Date: Fri Jun 2 20:27:32 2023 +0300 drm/xe: Fix unreffed ptr leak on engine lookup The engine xarray holds a ref to engine, guarded by the lock. While we do lookup for engine, we need to take the ref inside the lock to prevent unreffed pointer escaping and causing potential use-after-free after. v2: remove branch prediction hint (Thomas) Cc: Thomas Hellström Signed-off-by: Mika Kuoppala Reviewed-by: Thomas Hellström Link: https://patchwork.freedesktop.org/patch/msgid/20230602172732.1001057-1-mika.kuoppala@linux.intel.com Signed-off-by: Rodrigo Vivi commit 898f86c23c600c8f70bf1a03e81a7be97038a72d Author: Lucas De Marchi Date: Tue Jun 13 11:03:55 2023 -0700 drm/xe: Skip applying copy engine fuses Like commit 69a3738ba57f ("drm/i915: Skip applying copy engine fuses"), do not apply copy engine fuses for platforms where MEML3_EN is not relevant for determining the presence of the copy engines. Acked-by: Gustavo Sousa Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230613180356.2906441-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 8489f30e0c8e47d2d654cfb31825ff37de7e5574 Author: Matthew Auld Date: Thu Jun 15 18:20:52 2023 +0100 drm/xe/bo: handle PL_TT -> PL_TT When moving between PL_VRAM <-> PL_SYSTEM we have to have use PL_TT in the middle as a temporary resource for the actual copy. In some GL workloads it can be seen that once the resource has been moved to the PL_TT we might have to bail out of the ttm_bo_validate(), before finishing the final hop. If this happens the resource is left as TTM_PL_FLAG_TEMPORARY, and when the ttm_bo_validate() is restarted the current placement is always seen as incompatible, requiring us to complete the move. However if the BO allows PL_TT as a possible placement we can end up attempting a PL_TT -> PL_TT move (like when running out of VRAM) which leads to explosions in xe_bo_move(), like triggering the XE_BUG_ON(!tile). Going from TTM_PL_FLAG_TEMPORARY with PL_TT -> PL_VRAM should already work as-is, so it looks like we only need to worry about PL_TT -> PL_TT and it looks like we can just treat it as a dummy move, since no real move is needed. Reported-by: José Roberto de Souza Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 7ba4c5f02763cc423bfa0c6a87a8dd5501dc3417 Author: Matthew Brost Date: Wed Jun 7 08:45:20 2023 -0700 drm/xe: VM LRU bulk move Use the TTM LRU bulk move for BOs tied to a VM. Update the bulk moves LRU position on every exec. v2: Bulk move for compute VMs, use WARN rather than BUG Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 73c09901b0240bb6acdd957330e456e808ec52e6 Author: Matthew Brost Date: Mon Mar 27 18:34:49 2023 -0700 drm/xe: Only try to lock external BOs in VM bind We only need to try to lock a BO if it's external as non-external BOs share the dma-resv with the already locked VM. Trying to lock non-external BOs caused an issue (list corruption) in an uncoming patch which adds bulk LRU move. Since this code isn't needed, remove it. v2: New commit message, s/mattthew/matthew/ Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 911cd9b3b4e1d10250987864fa19315c772edf9d Author: Matthew Brost Date: Wed Apr 12 18:48:41 2023 -0700 drm/xe: Ensure LR engines are not persistent With our ref counting scheme long running (LR) engines only close properly if not persistent, ensure that LR engines are non-persistent. v2: spell out LR Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 8ae8a2e8dd21bd8bc94c9817874a97239aa867a2 Author: Matthew Brost Date: Sun May 21 18:24:20 2023 -0700 drm/xe: Long running job update For long running (LR) jobs with the DRM scheduler we must return NULL in run_job which results in signaling the job's finished fence immediately. This prevents LR jobs from creating infinite dma-fences. Signaling job's finished fence immediately breaks flow controlling ring with the DRM scheduler. To work around this, the ring is flow controlled and written in the exec IOCTL. Signaling job's finished fence immediately also breaks the TDR which is used in reset / cleanup entity paths so write a new path for LR entities. v2: Better commit, white space, remove rmb(), better comment next to emit_job() v3 (Thomas): Change LR reference counting, fix working in commit Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 37430402618db90b53aa782a6c49f66ab0efced0 Author: Matthew Brost Date: Thu Jun 15 11:22:36 2023 -0700 drm/xe: NULL binding implementation Add uAPI and implementation for NULL bindings. A NULL binding is defined as writes dropped and read zero. A single bit in the uAPI has been added which results in a single bit in the PTEs being set. NULL bindings are intendedd to be used to implement VK sparse bindings, in particular residencyNonResidentStrict property. v2: Fix BUG_ON shown in VK testing, fix check patch warning, fix xe_pt_scan_64K, update __gen8_pte_encode to understand NULL bindings, remove else if vma_addr Reviewed-by: Thomas Hellström Suggested-by: Paulo Zanoni Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit ee6ad13705286b19f5ffc19000b1d1574208efc9 Author: Janga Rahul Kumar Date: Tue Jun 13 15:07:40 2023 +0530 drm/Xe: Use EOPNOTSUPP instead of ENOTSUPP ENOTSUPP is not a standard Unix error should use EOPNOTSUPP instead. v2: Update commit description (Aravind) Reviewed-by: Aravind Iddamsetty Signed-off-by: Janga Rahul Kumar Signed-off-by: Rodrigo Vivi commit ab10e976fbda8349163ceee2ce99b2bfc97031b8 Author: Daniele Ceraolo Spurio Date: Wed Jun 14 10:47:54 2023 -0700 drm/xe: limit GGTT size to GUC_GGTT_TOP The GuC can't access addresses above GUC_GGTT_TOP, so any GuC-accessible objects can't be mapped above that offset. Instead of checking each object to see if GuC may access it or not before mapping it, we just limit the GGTT size to GUC_GGTT_TOP. This wastes a bit of address space (about ~18 MBs, which is in addition to what already removed at the bottom of the GGTT), but it is a good tradeoff to keep the code simple. The in-code comment has also been updated to explain the limitation. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20230615002521.2587250-1-daniele.ceraolospurio@intel.com/ Signed-off-by: Rodrigo Vivi commit ff063430caa810f2195d2390e79a990eb101c527 Author: Matt Roper Date: Thu Jun 8 11:12:17 2023 -0700 drm/xe/mtl: Add some initial MTL workarounds This adds a handful of workarounds that apply to production steppings of MTL: - Wa_14018575942 - Wa_22016670082 - Wa_14017856879 - Wa_18019271663 Wa_22016670082 is currently only applied to the primary GT at the moment, but may need to be extended to the media GT in the future if a pending update to the workaround database gets finalized. OOB workarounds will need to be implemented separately in future patches for Wa_14016712196, Wa_16018063123, and Wa_18013179988. Reviewed-by: Radhakrishna Sripada Link: https://lore.kernel.org/r/20230608181217.2385932-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit d0e2dd764a6d55cff35e9f609b724fcc62469ba6 Author: Michał Winiarski Date: Tue May 23 15:50:20 2023 +0200 drm/xe: Fix check for platform without geometry pipeline It's not possible for the condition checking if we're running on platform without geometry pipeline to ever be true, since gt->fuse_topo.g_dss_mask is an array. It also breaks the build: ../drivers/gpu/drm/xe/xe_rtp.c:183:50: error: address of array 'gt->fuse_topo.g_dss_mask' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230523135020.345596-2-michal@hardline.pl Signed-off-by: Rodrigo Vivi commit 35cbfe561912874a1f0d4b2ceb5fe890f0f58e46 Author: Michał Winiarski Date: Tue May 23 15:50:19 2023 +0200 drm/xe: Fix uninitialized variables Using uninitialized variables leads to undefined behavior. Moreover, it causes the compiler to complain with: ../drivers/gpu/drm/xe/xe_vm.c:3265:40: error: variable 'vma' is uninitialized when used here [-Werror,-Wuninitialized] ../drivers/gpu/drm/xe/xe_rtp.c:118:36: error: variable 'i' is uninitialized when used here [-Werror,-Wuninitialized] ../drivers/gpu/drm/xe/xe_mocs.c:449:3: error: variable 'flags' is uninitialized when used here [-Werror,-Wuninitialized] Signed-off-by: Michał Winiarski Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230523135020.345596-1-michal@hardline.pl Signed-off-by: Rodrigo Vivi commit 1e80d0c3c44806e6ff885102a937ea838a01f560 Author: Riana Tauro Date: Tue Jun 13 15:12:32 2023 +0530 drm/xe: Fix GT looping for standalone media gt_count is only being incremented when initializing the primary GT; since the media GT sets the ID directly, gt_count is not incremented again, resulting in an incorrect count on MTL. Use autoincrement while assigning the media GTs ID to ensure gt_count is correct on MTL and other future platforms with standalone media. Signed-off-by: Riana Tauro Link: https://lore.kernel.org/r/20230613094232.3703549-1-riana.tauro@intel.com [mattrope: Tweaked commit message to focus on gt_count importance] Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 2846d10339a2cc304a1ae55ce75e61eb7f55eb0b Author: Badal Nilawar Date: Fri Jun 9 08:19:54 2023 +0530 drm/xe: Donot apply forcewake while reading actual frequency RPSTAT1 is an sgunit register and thus doesn't need forcewake. MTL_MIRROR_TARGET_WP1 is within an "always on" power domain and thus doesn't require any forcewake to ensure the register is powered up and usable. When GT is RC6 the actual frequency reported will be 0. v2: - Add bspec index (Anshuman) - %s/GEN12_RPSTAT1/GT_PERF_STATUS as per bspec v3: Update Fixes tag Bspec: 51837, 67651 Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Signed-off-by: Badal Nilawar Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230609024954.987039-1-badal.nilawar@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 6dc3a12fb8185f98b525dbdb02fa5b810c4ff0bc Author: Lucas De Marchi Date: Sun Jun 11 15:24:45 2023 -0700 drm/xe/guc: Normalize error messages with %#x One of the messages was printed without 0x prefix, so it was not clear if it was decimal or hex: make sure to add the prefix by using %#x. While at it, normalize the other messages in the same function to follow the same pattern. Reviewed-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230611222447.2837573-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 90738d86650729cafb6d92191e6568d4b425b20a Author: Lucas De Marchi Date: Sun Jun 11 15:24:44 2023 -0700 drm/xe/guc: Fix typo s/enabled/enable/ Fix the log message when it fails to enable CT. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230611222447.2837573-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit a0ea91db616c386a9b5689dbbb7f57073f993368 Author: Lucas De Marchi Date: Sun Jun 11 15:24:43 2023 -0700 drm/xe: Rename pte/pde encoding functions Remove the leftover TODO by renameing the functions to use xe prefix. Since the static __gen8_pte_encode() already has a double score, just remove the prefix. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230611222447.2837573-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 6713ee6ca19e3cd43798b4b40f8b13489c724a89 Author: Matthew Brost Date: Wed Jun 7 11:51:36 2023 -0700 drm/xe: Move XE_PTE_FLAG_READ_ONLY to xe_vm_types.h XE_PTE_FLAG_READ_ONLY is specific to struct xe_vma, move it from xe_bo.h to xe_vm_types.h to reflect that. Reviewed-by: Francois Dugast Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 5a256cf710cd8e2412e01de34e36239b848dbc0d Merge: 6af50f5af215b 4ecae2ae9535c Author: Arnd Bergmann Date: Thu Dec 21 16:33:56 2023 +0000 Merge tag 'ux500-dts-soc-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into soc/dt More Ux500 device tree updates for v6.8 The HREF520 reference design had the wrong analog baseband defined causing a boot regression. Was AB8500, but this board has AB8505. Rearrange the device trees to make it possible to define a different AB and slot it in. * tag 'ux500-dts-soc-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: dts: ux500-href: Switch HREF520 to AB8505 ARM: dts: ux500-href: Push AB8500 config out ARM: dts: ux500-href: Push AB8500 inclusion to the top Link: https://lore.kernel.org/r/CACRpkdZ9wCV7oohF2KX6MFwmuSPR_i7et8O5SH=op6gyQ4mOvQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 6af50f5af215bd13abf7bac72edef81a556e5ceb Merge: 084d415d219f8 fc67495680f60 Author: Arnd Bergmann Date: Thu Dec 21 16:25:46 2023 +0000 Merge tag 'renesas-dts-for-v6.8-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.8 (take two) - Add IA55 interrupt controller and Ethernet support for the RZ/G3S SoC and the RZ/G3S SMARC SoM, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.8-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: white-hawk-cpu: Fix missing serial console pin control arm64: dts: renesas: rzg3s-smarc-som: Enable the Ethernet interfaces arm64: dts: renesas: rzg3s-smarc-som: Use switches' names to select on-board functionalities arm64: dts: renesas: r9a08g045: Add Ethernet nodes arm64: dts: renesas: r9a08g045: Add IA55 interrupt controller node Link: https://lore.kernel.org/r/cover.1702642342.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 4289e434c46c8cbd32cf8b67fa7689b3d2ca4361 Author: Heiner Kallweit Date: Sun Dec 17 19:46:42 2023 +0100 leds: trigger: netdev: Add core support for hw not supporting fallback to LED sw control If hw doesn't support sw control of the LED and we switch to a mode not supported by hw, currently we get lots of errors because neither brigthness_set() nor brithness_set_blocking() is set. Deal with this by not falling back to sw control, and return -EOPNOTSUPP to the user. Note that we still store the new mode. This is needed in case an intermediate unsupported mode is necessary to switch from one supported mode to another. Add a comment explaining how a driver for such hw is supposed to behave. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/3fd5184c-3641-4b0b-b59a-f489ec69a6cd@gmail.com Signed-off-by: Lee Jones commit e5bc76b0e1c54906ca744ed1a7872f4f407d5d2e Author: Jan Kuliga Date: Mon Dec 18 12:39:38 2023 +0100 dmaengine: xilinx: xdma: Ease dma_pool alignment requirements According to the XDMA datasheet (PG195), the address of any descriptor must be 32 byte aligned. The datasheet also states that a contiguous block of descriptors must not cross a 4k address boundary. Therefore, it is possible to ease the pressure put on the dma_pool allocator just by requiring sufficient alignment and boundary values. Add proper macro definition and change the values passed into the dma_pool_create(). Signed-off-by: Jan Kuliga Link: https://lore.kernel.org/r/20231218113943.9099-4-jankul@alatek.krakow.pl Signed-off-by: Vinod Koul commit 7a9c7f46bd0abea214d96f00f78622f24c798ad8 Author: Jan Kuliga Date: Mon Dec 18 12:39:37 2023 +0100 dmaengine: xilinx: xdma: Add necessary macro definitions Complete lacking bits describing the status/control register values. Add macros describing the status/control registers. Signed-off-by: Jan Kuliga Link: https://lore.kernel.org/r/20231218113943.9099-3-jankul@alatek.krakow.pl Signed-off-by: Vinod Koul commit 6e2387183312cdfce6326b2626c0b801c2ffe686 Author: Jan Kuliga Date: Mon Dec 18 12:39:36 2023 +0100 dmaengine: xilinx: xdma: Get rid of unused code Get rid of duplicated macro definitions, as these macros are defined earlier in the file. Also, get rid of unused member of 'struct xdma_desc'. Signed-off-by: Jan Kuliga Link: https://lore.kernel.org/r/20231218113943.9099-2-jankul@alatek.krakow.pl Signed-off-by: Vinod Koul commit f5c392d106e7cc58c7705799ef4c36c3b2f60b31 Author: Miquel Raynal Date: Thu Nov 30 12:13:15 2023 +0100 dmaengine: xilinx: xdma: Add terminate_all/synchronize callbacks The driver is capable of starting scatter-gather transfers and needs to wait until their end. It is also capable of starting cyclic transfers and will only be "reset" next time the channel will be reused. In practice most of the time we hear no audio glitch because the sound card stops the flow on its side so the DMA transfers are just discarded. There are however some cases (when playing a bit with a number of frames and with a discontinuous sound file) when the sound card seems to be slightly too slow at stopping the flow, leading to a glitch that can be heard. In all cases, we need to earn better control of the DMA engine and adding proper ->device_terminate_all() and ->device_synchronize() callbacks feels totally relevant. With these two callbacks, no glitch can be heard anymore. Fixes: cd8c732ce1a5 ("dmaengine: xilinx: xdma: Support cyclic transfers") Signed-off-by: Miquel Raynal Tested-by: Lizhi Hou Link: https://lore.kernel.org/r/20231130111315.729430-5-miquel.raynal@bootlin.com Signed-off-by: Vinod Koul commit b3072be7f955e56789a0508c18e9870f45cd9a11 Author: Miquel Raynal Date: Thu Nov 30 12:13:14 2023 +0100 dmaengine: xilinx: xdma: Better handling of the busy variable The driver internal scatter-gather logic is: * set busy to true * start transfer * set busy to false * trigger next transfer if any * set busy to true Setting busy to false in cyclic transfers does not make any sense and is conceptually wrong. In order to ease the integration of additional callbacks let's move this change to the scatter-gather path. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20231130111315.729430-4-miquel.raynal@bootlin.com Signed-off-by: Vinod Koul commit 58b61fc75ba901b1fd63c911b31249f36d17e9c4 Author: Miquel Raynal Date: Thu Nov 30 12:13:13 2023 +0100 dmaengine: xilinx: xdma: Clarify the logic between cyclic/sg modes We support both modes, but they perform totally different taks in the interrupt handler. Clarify what shall be done in each case. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20231130111315.729430-3-miquel.raynal@bootlin.com Signed-off-by: Vinod Koul commit 26ee018ff6d1c326ac9b9be36513e35870ed09db Author: Miquel Raynal Date: Thu Nov 30 12:13:12 2023 +0100 dmaengine: xilinx: xdma: Fix the count of elapsed periods in cyclic mode Xilinx DMA engine is capable of keeping track of the number of elapsed periods and this is an increasing 32-bit counter which is only reset when turning off the engine. No need to add this value to our local counter. Fixes: cd8c732ce1a5 ("dmaengine: xilinx: xdma: Support cyclic transfers") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20231130111315.729430-2-miquel.raynal@bootlin.com Signed-off-by: Vinod Koul commit 084d415d219f81c3bdb7e8e94a8a07c59db054f4 Merge: e0a220a3adb35 2de1bb183a699 Author: Arnd Bergmann Date: Thu Dec 21 16:17:22 2023 +0000 Merge tag 'stm32-dt-for-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into soc/dt STM32 DT for v6.8, round 1 Highlights: ---------- - MCU: - Add SPI support on STM32F746. - Better describe vcc_3v3 for SD and DSI on stm32f469-disco. - MPU: - STM32MP13: - Add DCMIPP (Digital Camera Memory Interface Piwel Processor) on STM32MP135. - STMP32MP15: - Change "phys" affectation from board to Soc dtsi file for USB host as it is hard linked to the port 0 of usbphyc. - Fix SCMI and No-SCMI compatible in boards. - STM32MP25: - Add BSEC support to read the device part number OTP and the package data register OTP. * tag 'stm32-dt-for-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: ARM: dts: stm32: add dcmipp support to stm32mp135 arm64: dts: st: add bsec support to stm32mp25 ARM: dts: stm32: Consolidate usbh_[eo]hci phy properties on stm32mp15 ARM: dts: stm32: don't mix SCMI and non-SCMI board compatibles dt-bindings: arm: stm32: don't mix SCMI and non-SCMI board compatibles ARM: dts: stm32: minor whitespace cleanup around '=' ARM: dts: stm32: add SPI support on STM32F746 ARM: dts: stm32: add STM32F746 syscfg clock ARM: dts: stm32: use the same 3v3 for SD and DSI nodes on stm32f469-disco Link: https://lore.kernel.org/r/9363227b-1c44-4a20-b245-efbbbf9ab1dd@foss.st.com Signed-off-by: Arnd Bergmann commit e271c0ba3f919c48e90c64b703538fbb7865cb63 Author: Rex Zhang Date: Tue Dec 12 10:21:58 2023 +0800 dmaengine: idxd: Move dma_free_coherent() out of spinlocked context Task may be rescheduled within dma_free_coherent(). So dma_free_coherent() can't be called between spin_lock() and spin_unlock() to avoid Call Trace: Call Trace: dump_stack_lvl+0x37/0x50 __might_resched+0x16a/0x1c0 vunmap+0x2c/0x70 __iommu_dma_free+0x96/0x100 idxd_device_evl_free+0xd5/0x100 [idxd] device_release_driver_internal+0x197/0x200 unbind_store+0xa1/0xb0 kernfs_fop_write_iter+0x120/0x1c0 vfs_write+0x2d3/0x400 ksys_write+0x63/0xe0 do_syscall_64+0x44/0xa0 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 Move it out of the context. Fixes: 244da66cda35 ("dmaengine: idxd: setup event log configuration") Signed-off-by: Rex Zhang Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Link: https://lore.kernel.org/r/20231212022158.358619-2-rex.zhang@intel.com Signed-off-by: Vinod Koul commit 3b08b3775593442be52cbb99efbccbd7fe4fa3fe Author: Vignesh Raghavendra Date: Wed Dec 13 13:43:18 2023 +0530 dmaengine: ti: k3-udma: Add PSIL threads for AM62P and J722S Add PSIL thread information and enable UDMA support for AM62P and J722S SoC. J722S SoC family is a superset of AM62P, thus common PSIL thread ID map is reused for both devices. For those interested, more details about the SoC can be found in the Technical Reference Manual here: AM62P - https://www.ti.com/lit/pdf/spruj83 J722S - https://www.ti.com/lit/zip/sprujb3 Signed-off-by: Vignesh Raghavendra Signed-off-by: Bryan Brattlof Signed-off-by: Vaishnav Achath Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20231213081318.26203-1-vaishnav.a@ti.com Signed-off-by: Vinod Koul commit f5c24d94512f1b288262beda4d3dcb9629222fc7 Author: Amelie Delaunay Date: Wed Dec 13 17:04:52 2023 +0100 dmaengine: fix NULL pointer in channel unregistration function __dma_async_device_channel_register() can fail. In case of failure, chan->local is freed (with free_percpu()), and chan->local is nullified. When dma_async_device_unregister() is called (because of managed API or intentionally by DMA controller driver), channels are unconditionally unregistered, leading to this NULL pointer: [ 1.318693] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000d0 [...] [ 1.484499] Call trace: [ 1.486930] device_del+0x40/0x394 [ 1.490314] device_unregister+0x20/0x7c [ 1.494220] __dma_async_device_channel_unregister+0x68/0xc0 Look at dma_async_device_register() function error path, channel device unregistration is done only if chan->local is not NULL. Then add the same condition at the beginning of __dma_async_device_channel_unregister() function, to avoid NULL pointer issue whatever the API used to reach this function. Fixes: d2fb0a043838 ("dmaengine: break out channel registration") Signed-off-by: Amelie Delaunay Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/20231213160452.2598073-1-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit d0e217b72f9f5c5ef35e3423d393ea8093ce98ec Author: Frank Li Date: Tue Nov 14 10:48:23 2023 -0500 dmaengine: fsl-edma: utilize common dt-binding header file Refactor the code to use the common dt-binding header file, fsl-edma.h. Renaming ARGS* to FSL_EDMA*, ensuring no functional changes. Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231114154824.3617255-4-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit 1e9b05258271b76ccc04a4b535009d2cb596506a Author: Frank Li Date: Tue Nov 14 10:48:22 2023 -0500 dt-bindings: dma: fsl-edma: Add fsl-edma.h to prevent hardcoding in dts Introduce a common dt-bindings header file, fsl-edma.h, shared between the driver and dts files. This addition aims to eliminate hardcoded values in dts files, promoting maintainability and consistency. DTS header file not support BIT() macro yet. Directly use 2^n number. Signed-off-by: Frank Li Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231114154824.3617255-3-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit dc51b4442dd94ab12c146c1897bbdb40e16d5636 Author: Frank Li Date: Tue Nov 14 10:48:21 2023 -0500 dmaengine: fsl-edma: fix eDMAv4 channel allocation issue The eDMAv4 channel mux has a limitation where certain requests must use even channels, while others must use odd numbers. Add two flags (ARGS_EVEN_CH and ARGS_ODD_CH) to reflect this limitation. The device tree source (dts) files need to be updated accordingly. This issue was identified by the following commit: commit a725990557e7 ("arm64: dts: imx93: Fix the dmas entries order") Reverting channel orders triggered this problem. Fixes: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support") Signed-off-by: Frank Li Link: https://lore.kernel.org/r/20231114154824.3617255-2-Frank.Li@nxp.com Signed-off-by: Vinod Koul commit f60dfe0c561a8f1b8e30d3770997cbaa636f57f9 Author: Paul Cercueil Date: Fri Dec 15 14:13:13 2023 +0100 dmaengine: axi-dmac: Improve cyclic DMA transfers in SG mode For cyclic transfers, chain the last descriptor to the first one, and disable IRQ generation if there is no callback registered with the cyclic transfer. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20231215131313.23840-6-paul@crapouillou.net Signed-off-by: Vinod Koul commit 238f68a08e19a612b8912c8697901e9982f97811 Author: Paul Cercueil Date: Fri Dec 15 14:13:12 2023 +0100 dmaengine: axi-dmac: Use only EOT interrupts when doing scatter-gather Instead of notifying userspace in the end-of-transfer (EOT) interrupt and program the hardware in the start-of-transfer (SOT) interrupt, we can do both things in the EOT, allowing us to mask the SOT, and halve the number of interrupts sent by the HDL core. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20231215131313.23840-5-paul@crapouillou.net Signed-off-by: Vinod Koul commit e97dc7435972d28ac7d96d199d4aedb868d04fd8 Author: Paul Cercueil Date: Fri Dec 15 14:13:11 2023 +0100 dmaengine: axi-dmac: Add support for scatter-gather transfers Implement support for scatter-gather transfers. Build a chain of hardware descriptors, each one corresponding to a segment of the transfer, and linked to the next one. The hardware will transfer the chain and only fire interrupts when the whole chain has been transferred. Support for scatter-gather is automatically enabled when the driver detects that the hardware supports it, by writing then reading the AXI_DMAC_REG_SG_ADDRESS register. If not available, the driver will fall back to standard DMA transfers. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20231215131313.23840-4-paul@crapouillou.net Signed-off-by: Vinod Koul commit 3f8fd25936ee5f52596f10d420f650c5b5e3285f Author: Paul Cercueil Date: Fri Dec 15 14:13:10 2023 +0100 dmaengine: axi-dmac: Allocate hardware descriptors Change where and how the DMA transfers meta-data is stored, to prepare for the upcoming introduction of scatter-gather support. Allocate hardware descriptors in the format that the HDL core will be expecting them when the scatter-gather feature is enabled, and use these fields to store the data that was previously stored in the axi_dmac_sg structure. Note that the 'x_len' and 'y_len' fields now contain the transfer length minus one, since that's what the hardware will expect in these fields. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20231215131313.23840-3-paul@crapouillou.net Signed-off-by: Vinod Koul commit a2ab7045389feab1c26ebab105a8ad6bce74a4a7 Author: Paul Cercueil Date: Fri Dec 15 14:13:09 2023 +0100 dmaengine: axi-dmac: Small code cleanup Use a for() loop instead of a while() loop in axi_dmac_fill_linear_sg(). This makes the code leaner and cleaner overall, and does not introduce any functional change. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20231215131313.23840-2-paul@crapouillou.net Signed-off-by: Vinod Koul commit 71e7d3cb6e55ae2eadcdb178f9243dc18499d369 Author: Binbin Zhou Date: Mon Dec 18 09:56:39 2023 +0800 dmaengine: ls2x-apb: New driver for the Loongson LS2X APB DMA controller The Loongson LS2X APB DMA controller is available on Loongson-2K chips. It is a single-channel, configurable DMA controller IP core based on the AXI bus, whose main function is to integrate DMA functionality on a chip dedicated to carrying data between memory and peripherals in APB bus (e.g. nand). Signed-off-by: Binbin Zhou Signed-off-by: Yingkun Meng Link: https://lore.kernel.org/r/8df2a0199434fba3535831082966c2442ecf1cae.1702365725.git.zhoubinbin@loongson.cn Signed-off-by: Vinod Koul commit 3b3b5339cdc67e98817d08431f8443b08880084f Author: Binbin Zhou Date: Mon Dec 18 09:56:38 2023 +0800 dt-bindings: dmaengine: Add Loongson LS2X APB DMA controller Add Loongson LS2X APB DMA controller binding with DT schema format using json-schema. Reviewed-by: Conor Dooley Signed-off-by: Binbin Zhou Link: https://lore.kernel.org/r/078307641077edaf46dd986c6d31cea15545a208.1702365725.git.zhoubinbin@loongson.cn Signed-off-by: Vinod Koul commit 3cb3091138ca0921c4569bcf7ffa062519639b6a Author: Steven Rostedt (Google) Date: Tue Dec 19 17:38:00 2023 -0500 ring-buffer: Use subbuf_order for buffer page masking The comparisons to PAGE_SIZE were all converted to use the buffer->subbuf_order, but the use of PAGE_MASK was missed. Convert all the PAGE_MASK usages over to: (PAGE_SIZE << cpu_buffer->buffer->subbuf_order) - 1 Link: https://lore.kernel.org/linux-trace-kernel/20231219173800.66eefb7a@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Fixes: 139f84002145 ("ring-buffer: Page size per ring buffer") Signed-off-by: Steven Rostedt (Google) commit 2f84b39f48476615186af5b3220ad5a2c756679b Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:29 2023 -0500 tracing: Update subbuffer with kilobytes not page order Using page order for deciding what the size of the ring buffer sub buffers are is exposing a bit too much of the implementation. Although the sub buffers are only allocated in orders of pages, allow the user to specify the minimum size of each sub-buffer via kilobytes like they can with the buffer size itself. If the user specifies 3 via: echo 3 > buffer_subbuf_size_kb Then the sub-buffer size will round up to 4kb (on a 4kb page size system). If they specify: echo 6 > buffer_subbuf_size_kb The sub-buffer size will become 8kb. and so on. Link: https://lore.kernel.org/linux-trace-kernel/20231219185631.809766769@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Steven Rostedt (Google) commit 1acce70374caabc2945aa07a862f834fb7c2914f Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:28 2023 -0500 ringbuffer/selftest: Add basic selftest to test changing subbuf order Add a self test that will write into the trace buffer with differ trace sub buffer order sizes. Link: https://lore.kernel.org/linux-trace-kernel/20231219185631.520496304@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Steven Rostedt (Google) commit 7c3f48026589b532ebc0d12f939f6be78bd74a58 Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:27 2023 -0500 ring-buffer: Add documentation on the buffer_subbuf_order file Add to the documentation how to use the buffer_subbuf_order file to change the size and how it affects what events can be added to the ring buffer. Link: https://lore.kernel.org/linux-trace-kernel/20231219185631.230636734@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Steven Rostedt (Google) commit 8e7b58c27b3c567316a51079b375b846f9223bba Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:26 2023 -0500 ring-buffer: Just update the subbuffers when changing their allocation order The ring_buffer_subbuf_order_set() was creating ring_buffer_per_cpu cpu_buffers with the new subbuffers with the updated order, and if they all successfully were created, then they the ring_buffer's per_cpu buffers would be freed and replaced by them. The problem is that the freed per_cpu buffers contains state that would be lost. Running the following commands: 1. # echo 3 > /sys/kernel/tracing/buffer_subbuf_order 2. # echo 0 > /sys/kernel/tracing/tracing_cpumask 3. # echo 1 > /sys/kernel/tracing/snapshot 4. # echo ff > /sys/kernel/tracing/tracing_cpumask 5. # echo test > /sys/kernel/tracing/trace_marker Would result in: -bash: echo: write error: Bad file descriptor That's because the state of the per_cpu buffers of the snapshot buffer is lost when the order is changed (the order of a freed snapshot buffer goes to 0 to save memory, and when the snapshot buffer is allocated again, it goes back to what the main buffer is). In operation 2, the snapshot buffers were set to "disable" (as all the ring buffers CPUs were disabled). In operation 3, the snapshot is allocated and a call to ring_buffer_subbuf_order_set() replaced the per_cpu buffers losing the "record_disable" count. When it was enabled again, the atomic_dec(&cpu_buffer->record_disable) was decrementing a zero, setting it to -1. Writing 1 into the snapshot would swap the snapshot buffer with the main buffer, so now the main buffer is "disabled", and nothing can write to the ring buffer anymore. Instead of creating new per_cpu buffers and losing the state of the old buffers, basically do what the resize does and just allocate new subbuf pages into the new_pages link list of the per_cpu buffer and if they all succeed, then replace the old sub buffers with the new ones. This keeps the per_cpu buffer descriptor in tact and by doing so, keeps its state. Link: https://lore.kernel.org/linux-trace-kernel/20231219185630.944104939@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Fixes: f9b94daa542a ("ring-buffer: Set new size of the ring buffer sub page") Signed-off-by: Steven Rostedt (Google) commit 353cc219372935805218e05a7754a059ab104641 Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:25 2023 -0500 ring-buffer: Keep the same size when updating the order The function ring_buffer_subbuf_order_set() just updated the sub-buffers to the new size, but this also changes the size of the buffer in doing so. As the size is determined by nr_pages * subbuf_size. If the subbuf_size is increased without decreasing the nr_pages, this causes the total size of the buffer to increase. This broke the latency tracers as the snapshot needs to be the same size as the main buffer. The size of the snapshot buffer is only expanded when needed, and because the order is still the same, the size becomes out of sync with the main buffer, as the main buffer increased in size without the tracing system knowing. Calculate the nr_pages to allocate with the new subbuf_size to be buffer_size / new_subbuf_size. Link: https://lore.kernel.org/linux-trace-kernel/20231219185630.649397785@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Fixes: f9b94daa542a ("ring-buffer: Set new size of the ring buffer sub page") Signed-off-by: Steven Rostedt (Google) commit 71a5197e2b872afeef8ade3099ffc4050466b542 Author: Randy Dunlap Date: Sun Dec 17 22:08:34 2023 -0800 dmaengine: std_dma40: fix kernel-doc warnings and spelling Correct kernel-doc warnings as reported by kernel test robot: ste_dma40.c:57: warning: Excess struct member 'dev_tx' description in 'stedma40_platform_data' ste_dma40.c:57: warning: Excess struct member 'dev_rx' description in 'stedma40_platform_data' Correct spellos as reported by codespell. Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312171417.izbQThoU-lkp@intel.com/ Cc: Linus Walleij Cc: linux-arm-kernel@lists.infradead.org Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231218060834.19222-1-rdunlap@infradead.org Signed-off-by: Vinod Koul commit fa4b54af5ba17a59ce082e9d710eb638bdce7637 Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:24 2023 -0500 tracing: Stop the tracing while changing the ring buffer subbuf size Because the main buffer and the snapshot buffer need to be the same for some tracers, otherwise it will fail and disable all tracing, the tracers need to be stopped while updating the sub buffer sizes so that the tracers see the main and snapshot buffers with the same sub buffer size. Link: https://lore.kernel.org/linux-trace-kernel/20231219185630.353222794@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Fixes: 2808e31ec12e ("ring-buffer: Add interface for configuring trace sub buffer size") Signed-off-by: Steven Rostedt (Google) commit 1075ee66a8c19bfa375b19c236fd6a22a867f138 Author: Christophe JAILLET Date: Tue Dec 19 20:33:50 2023 +0100 dmaengine: idxd: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Note that the upper limit of ida_simple_get() is exclusive, but the one of ida_alloc_range() is inclusive. Sothis change allows one more device. MINORMASK is ((1U << MINORBITS) - 1), so allowing MINORMASK as a maximum value makes sense. It is also consistent with other "ida_.*MINORMASK" and "ida_*MINOR()" usages. Signed-off-by: Christophe JAILLET Reviewed-by: Fenghua Yu Acked-by: Lijun Pan Link: https://lore.kernel.org/r/ac991f5f42112fa782a881d391d447529cbc4a23.1702967302.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit e0a220a3adb35b2b282534d0fa1b2cfd50bab44c Merge: 210e1a339f937 557e5347ba8bb Author: Arnd Bergmann Date: Thu Dec 21 15:59:19 2023 +0000 Merge tag 'sunxi-dt-for-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into soc/dt - new boards: Orange Pi Zero 2W, Transpeed 8K618-T * tag 'sunxi-dt-for-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h618: add Transpeed 8K618-T TV box dt-bindings: arm: sunxi: document Transpeed 8K618-T board name dt-bindings: vendor-prefixes: add Transpeed arm64: dts: allwinner: h616: add Orange Pi Zero 2W support dt-bindings: arm: sunxi: add Orange Pi Zero 2W Link: https://lore.kernel.org/r/ZXtWFk-Bne835txP@archlinux Signed-off-by: Arnd Bergmann commit 210e1a339f937e72e052631072e08c20032544b6 Merge: 7b0ddbf748eaa abe18175269ac Author: Arnd Bergmann Date: Thu Dec 21 15:57:59 2023 +0000 Merge tag 'at91-dt-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into soc/dt Microchip AT91 device tree updates for v6.8 It contains: - IRQ support for Ethernet PHYs on SAM9X60-EK and SAM9X60-Curiosity boards - removal of the mmc-ddr-3_3v property from SD controllers connected to SD slots, for SAMA5D27-WLSOM1-EK and SAMA5D27-SOM1-EK boards, as this property is for eMMC devices * tag 'at91-dt-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: microchip: sama5d27_som1_ek: Remove mmc-ddr-3_3v property from sdmmc0 node ARM: dts: microchip: sama5d27_wlsom1_ek: Remove mmc-ddr-3_3v property from sdmmc0 node ARM: dts: microchip: sam9x60ek: Add IRQ support for ethernet PHY ARM: dts: microchip: sam9x60_curiosity: Add IRQ support for ethernet PHY Link: https://lore.kernel.org/r/20231214174954.3045355-1-claudiu.beznea@tuxon.dev Signed-off-by: Arnd Bergmann commit 7b0ddbf748eaa18dd95afcffda11a71aee87cdf4 Merge: 965c83326e18d fb4d25d7a33f5 Author: Arnd Bergmann Date: Thu Dec 21 15:57:22 2023 +0000 Merge tag 'juno-update-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/dt Arm Vexpress/Juno update for v6.8 Just a single update to align the thermal zone names with bindings matching [alphanumericals]*-thermal pattern. * tag 'juno-update-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: Align thermal zone names with bindings Link: https://lore.kernel.org/r/20231213115826.3577764-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 965c83326e18d060a8da3da8f8130437e9845e7b Merge: 16e6e974d17b7 569b26af7919c Author: Arnd Bergmann Date: Thu Dec 21 15:56:00 2023 +0000 Merge tag 'v6.8-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt New boards are the Geniatech XPI-3128 (RK3128), Sonoff iHost (rv1109) One "new" soc is the rv1109 which is a two-core variant of the rv1126 and everything else is identical. Lots of love for the old rk3128 (power-domains, gpu, gmac, usb) and rv1126 (uart pins, i2c2 special case) and rework of aliases to have core busses that are hard-numbered in boards and documentation centrally in the dtsi, but the per board aliases in the boards (ethernet). Plus the rk3036 got a yaml hdmi binding which required some small fixes. * tag 'v6.8-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (24 commits) ARM: dts: rockchip: add hdmi-connector node to rk3036-kylin ARM: dts: rockchip: fix rk3036 hdmi ports node ARM: dts: rockchip: add gpio alias for gpio dt nodes ARM: dts: rockchip: Move uart aliases to SoC dtsi for RK3128 ARM: dts: rockchip: Move i2c aliases to SoC dtsi for RK3128 ARM: dts: rockchip: Move gpio aliases to SoC dtsi for RK3128 ARM: dts: rockchip: Add Sonoff iHost Smart Home Hub dt-bindings: arm: rockchip: Add Sonoff iHost ARM: dts: rockchip: Add rv1109 SoC ARM: dts: rockchip: Split up rgmii1 pinctrl on rv1126 ARM: dts: rockchip: Add i2c2 node to rv1126 ARM: dts: rockchip: Serial aliases for rv1126 ARM: dts: rockchip: Add alternate UART pins to rv1126 ARM: dts: rockchip: Enable GPU for XPI-3128 ARM: dts: rockchip: Add GPU node for RK3128 ARM: dts: rockchip: Add power-controller for RK3128 ARM: dts: rockchip: Enable gmac for XPI-3128 ARM: dts: rockchip: Add gmac node for RK3128 ARM: dts: rockchip: Make usbphy the parent of SCLK_USB480M for RK3128 ARM: dts: rockchip: Add dwc2 otg fifo siztes for RK3128 ... Link: https://lore.kernel.org/r/3197878.5fSG56mABF@phil Signed-off-by: Arnd Bergmann commit aa067682adf19ca78f81cd57539282dbfd7cce21 Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:23 2023 -0500 tracing: Update snapshot order along with main buffer order When updating the order of the sub buffers for the main buffer, make sure that if the snapshot buffer exists, that it gets its order updated as well. Link: https://lore.kernel.org/linux-trace-kernel/20231219185630.054668186@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Steven Rostedt (Google) commit 4e958db34fd5324421ef9562c31c15e2d152dc63 Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:22 2023 -0500 ring-buffer: Make sure the spare sub buffer used for reads has same size Now that the ring buffer specifies the size of its sub buffers, they all need to be the same size. When doing a read, a swap is done with a spare page. Make sure they are the same size before doing the swap, otherwise the read will fail. Link: https://lore.kernel.org/linux-trace-kernel/20231219185629.763664788@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Steven Rostedt (Google) commit b81e03a24966dca0b119eff0549a4e44befff419 Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:21 2023 -0500 ring-buffer: Do no swap cpu buffers if order is different As all the subbuffer order (subbuffer sizes) must be the same throughout the ring buffer, check the order of the buffers that are doing a CPU buffer swap in ring_buffer_swap_cpu() to make sure they are the same. If the are not the same, then fail to do the swap, otherwise the ring buffer will think the CPU buffer has a specific subbuffer size when it does not. Link: https://lore.kernel.org/linux-trace-kernel/20231219185629.467894710@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Steven Rostedt (Google) commit 22887dfba0633c09444562722f0cf68f61ec9a50 Author: Steven Rostedt (Google) Date: Tue Dec 19 13:54:20 2023 -0500 ring-buffer: Clear pages on error in ring_buffer_subbuf_order_set() failure On failure to allocate ring buffer pages, the pointer to the CPU buffer pages is freed, but the pages that were allocated previously were not. Make sure they are freed too. Link: https://lore.kernel.org/linux-trace-kernel/20231219185629.179352802@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Tzvetomir Stoyanov Cc: Vincent Donnefort Cc: Kent Overstreet Fixes: f9b94daa542a ("tracing: Set new size of the ring buffer sub page") Signed-off-by: Steven Rostedt (Google) commit 457caadce7ab71a54ee2d4f032ee4a55b4a28776 Author: Jing Zhang Date: Thu Dec 21 14:03:13 2023 +0800 perf vendor events: Remove UTF-8 characters from cmn.json cmn.json contains UTF-8 characters in brief description which could break the perf build on some distros. Fix this issue by removing the UTF-8 characters from cmn.json. without this fix: $find tools/perf/pmu-events/ -name "*.json" | xargs file -i | grep -v us-ascii tools/perf/pmu-events/arch/arm64/arm/cmn/sys/cmn.json: application/json; charset=utf-8 with it: $ file -i tools/perf/pmu-events/arch/arm64/arm/cmn/sys/cmn.json tools/perf/pmu-events/arch/arm64/arm/cmn/sys/cmn.json: text/plain; charset=us-ascii Fixes: 0b4de7bdf46c5215 ("perf jevents: Add support for Arm CMN PMU aliasing") Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Jing Zhang Cc: Adrian Hunter Cc: Heiko Carstens Cc: Ian Rogers Cc: Jing Zhang Cc: Jiri Olsa Cc: Kajol Jain Cc: Namhyung Kim Cc: Sukadev Bhattiprolu Cc: Thomas Richter Link: https://lore.kernel.org/r/1703138593-50486-1-git-send-email-renyu.zj@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit 0a535eddbe0dc1de4386046ab849f08aeb2f8faf Author: Jens Axboe Date: Thu Dec 21 08:49:18 2023 -0700 io_uring/rw: ensure io->bytes_done is always initialized If IOSQE_ASYNC is set and we fail importing an iovec for a readv or writev request, then we leave ->bytes_done uninitialized and hence the eventual failure CQE posted can potentially have a random res value rather than the expected -EINVAL. Setup ->bytes_done before potentially failing, so we have a consistent value if we fail the request early. Cc: stable@vger.kernel.org Reported-by: xingwei lee Signed-off-by: Jens Axboe commit 16e6e974d17b7b49b354f263145fb0573702f260 Merge: 76955bc85b50e 8174dff9e583f Author: Arnd Bergmann Date: Thu Dec 21 15:46:17 2023 +0000 Merge tag 'v6.8-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into soc/dt New boards are the Anberic RG351V handheld (rk3326), Theobroma Systems Jaguar SBC (rk3588), Powkiddy X55 and RK2023 handheld (rk3566), Edgeble-Neu6b (rk3588) The rk3588 got attention with one working usb3 host on Rock-5a/5b, Orangepi-5 and audio for the EVB1. Some smaller improvements for the other socs (fifo-depths on rk3328, gpio-line-names on rk3308-rock-pi-s, gpu power-coefficients on rk3399, and a fix for the newly converted gpio-fan yaml binding). Also a number of aliases were moved. Always-numbered core busses can have their aliases in the soc dtsi, as is done in a number of cases already and other alises like ethernet really should be per board. * tag 'v6.8-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (31 commits) arm64: dts: rockchip: Add Anbernic RG351V arm64: dts: rockchip: Split RG351M from Odroid Go Advance dt-bindings: arm: rockchip: Add Anbernic RG351V arm64: dts: rockchip: Add ethernet0 alias to the dts for RK3588(S) boards arm64: dts: rockchip: Add ethernet0 alias to the dts for RK3566 boards arm64: dts: rockchip: Remove ethernet0 alias from the SoC dtsi for PX30 arm64: dts: rockchip: Remove ethernetX aliases from the SoC dtsi for RK3328 arm64: dts: rockchip: Remove ethernet0 alias from the SoC dtsi for RK3368 arm64: dts: rockchip: Remove ethernet0 alias from the SoC dtsi for RK3399 arm64: dts: rockchip: make dts use gpio-fan matrix instead of array arm64: dts: rockchip: add gpio alias for gpio dt nodes arm64: dts: rockchip: Add dynamic-power-coefficient to rk3399 GPU arm64: dts: rockchip: add rk3588 spi aliases to soc dtsi arm64: dts: rockchip: add rk3588 gpio aliases to soc dtsi arm64: dts: rockchip: add rk3588 i2c aliases to soc dtsi arm64: dts: rockchip: move rk3588 serial aliases to soc dtsi arm64: dts: rockchip: add Theobroma Jaguar SBC dt-bindings: arm: rockchip: Add Theobroma-Systems Jaguar SBC arm64: dts: rockchip: Add Powkiddy X55 dt-bindings: arm: rockchip: Add Powkiddy X55 ... Link: https://lore.kernel.org/r/3535836.iIbC2pHGDl@phil Signed-off-by: Arnd Bergmann commit 76955bc85b50eb32ad841256206d9025945aa7e0 Merge: 9bc75fe58d69c 5dc289e08a4d0 Author: Arnd Bergmann Date: Thu Dec 21 15:44:11 2023 +0000 Merge tag 'mtk-dts64-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux into soc/dt MediaTek ARM64 DeviceTree updates for v6.8 This adds devicetree bindings and nodes for: - Media Data Path 3 (MDP3) bindings and enablement on MT8195 - Smart Voltage Scaling (SVS) on MT8195 - LVTS SoC thermal on MT8192 - MT8188 SoC along with its resets, display bindings, and more - MT8183 hardware video decoder (mtk-vcodec-dec) Adds the following new machines: - MT8188 Evaluation Board (EVB) - MT8183 Chromebooks: Kukui-Katsu, Jacuzzi-Makomo, Pico, Pico6 Performs cleanups for various MediaTek SoCs and PMICs, and also includes some spare fixes. * tag 'mtk-dts64-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux: (60 commits) arm64: dts: mediatek: mt8192: Add Smart Voltage Scaling node arm64: dts: mediatek: mt8195: Add SVS node and reduce LVTS_AP iospace arm64: dts: mediatek: mt8183: Change iospaces for thermal and svs arm64: dts: mediatek: mt8186: fix address warning for ADSP mailboxes arm64: dts: mediatek: mt8186: Fix alias prefix for ovl_2l0 arm64: dts: mt6358: Drop bogus "regulator-fixed" compatible properties arm64: dts: mt8183: kukui-jacuzzi: Drop bogus anx7625 panel_flag property arm64: dts: Add MediaTek MT8188 dts and evaluation board and Makefile dt-bindings: soc: mediatek: pwrap: Modify compatible for MT8188 dt-bindings: arm: mediatek: Add mt8188 pericfg compatible dt-bindings: arm: Add compatible for MediaTek MT8188 arm64: dts: mediatek: mt8195: add DSI and MIPI DPHY nodes dt-bindings: display: mediatek: dsi: add compatible for MediaTek MT8195 arm64: dts: mediatek: mt6358: Merge ldo_vcn33_* regulators dt-bindings: arm: mediatek: convert audsys and mt2701-afe-pcm to yaml arm64: dts: mediatek: mt8195: add MDP3 nodes arm64: dts: mediatek: mt8195: revise VDOSYS RDMA node name arm64: dts: mediatek: mt8183: correct MDP3 DMA-related nodes dt-bindings: display: mediatek: padding: add compatible for MT8195 dt-bindings: display: mediatek: split: add compatible for MT8195 ... Link: https://lore.kernel.org/r/20231212114515.121695-1-angelogioacchino.delregno@collabora.com Signed-off-by: Arnd Bergmann commit 9bc75fe58d69cb1c7496cd9cb74b59e931c1e45b Merge: 2dfe48a85a070 50c7cdc9a4d2d Author: Arnd Bergmann Date: Thu Dec 21 15:42:39 2023 +0000 Merge tag 'samsung-dt-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM changes for v6.8 1. Exynos4212 and Exynos4412: Final fixes for dtbs_check warnings. Replace duplicate PMU node in FIMC IS node with syscon phandle. The old solution of duplicated PMU node was not a correct representation of the hardware and could have concurrent access issues. The DTS change depends on media FIMC IS drivers changes already merged in previous cycle, thus it is not fully backwards-compatible. It is a necessary trade-off in fixing wrong description in DTS. With this fix, `make dtbs_check` status looks like: S3C6410: no warnings Exynos: no warnings, one undocumented compatible S5PV210: one warning, one undocumented compatible 2. Exynos4210, Exynos4212, Exynos4412, S5PV210: Correct FIMC IS camera ranges and IO addresses to silence dtc W=1 warnings. No functional impact expected. After this fix, there are no dtc W=1 warnings on all ARMv7 platforms. 3. Galaxy I9100: Fix 12-second hang during boot by enabling regulator (real cause not really known), add touch keys and accelerometer. * tag 'samsung-dt-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: samsung: exynos4210-i9100: Add accelerometer node ARM: dts: samsung: exynos4210-i9100: Add node for touch keys ARM: dts: samsung: exynos4210-i9100: Unconditionally enable LDO12 ARM: dts: samsung: s5pv210: fix camera unit addresses/ranges ARM: dts: samsung: exynos4: fix camera unit addresses/ranges ARM: dts: samsung: exynos4x12: replace duplicate pmu node with phandle Link: https://lore.kernel.org/r/20231212093105.13938-2-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 2dfe48a85a0702cce70a35b1d9c13d7671ba5fa6 Merge: 487e6d8dc6aef 40af852a7ca59 Author: Arnd Bergmann Date: Thu Dec 21 15:41:22 2023 +0000 Merge tag 'samsung-dt64-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/dt Samsung DTS ARM64 changes for v6.8 Two (and a half) major items are coming with this pull request: 1. Add specific compatibles to all Samsung Exynos and Tesla FSD blocks, because that's what guidelines expect [1] and is generally recommended practice. Existing compatibles are left untouched, thus no driver changes are needed. The work only cleans things up, so any future contributions will use recommended style: specific and fallback compatibles. Since no driver changes are needed in this work and the DTS is directly affected by bindings change (running tests with `make dtbs_check`), this pull includes all bindings changes, even though usual practice is that bindings come via driver subsystem. Keeping everything here makes review and testing easier. Also will allow us to avoid conflicts related to new platforms (see below). 2. Add ExynosAutov920 SoC and SADK board (Samsung Automotive Development Kit) with minimal support so far: serial console, GPIO-based keys and PWM fan. 3. Add few bindings for upcoming Google GS101 SoC. This pull request does not include its DTS yet, just few reviewed dependencies. DTS will be coming soon. [1] Documentation/devicetree/bindings/writing-bindings.rst * tag 'samsung-dt64-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (38 commits) arm64: dts: exynos: add minimal support for exynosautov920 sadk board arm64: dts: exynos: add initial support for exynosautov920 SoC dt-bindings: samsung: exynos-sysreg: combine exynosautov920 with other enum dt-bindings: soc: google: exynos-sysreg: add dedicated SYSREG compatibles to GS101 dt-bindings: clock: Add Google gs101 clock management unit bindings dt-bindings: soc: samsung: exynos-pmu: Add gs101 compatible arm64: dts: fsd: add specific compatibles for Tesla FSD dt-bindings: watchdog: samsung: add specific compatible for Tesla FSD dt-bindings: samsung: exynos-pmu: add specific compatible for Tesla FSD dt-bindings: serial: samsung: add specific compatible for Tesla FSD dt-bindings: pwm: samsung: add specific compatible for Tesla FSD dt-bindings: i2c: exynos5: add specific compatible for Tesla FSD arm64: dts: exynosautov9: use Exynos7 fallbacks for pin wake-up controller arm64: dts: exynos850: use Exynos7 fallbacks for pin wake-up controllers dt-bindings: hwinfo: samsung,exynos-chipid: add exynosautov920 compatible dt-bindings: arm: samsung: Document exynosautov920 SADK board binding dt-bindings: pwm: samsung: add exynosautov920 compatible dt-bindings: serial: samsung: add exynosautov920-uart compatible dt-bindings: samsung: usi: add exynosautov920-usi compatible dt-bindings: samsung: exynos-pmu: add exynosautov920 compatible ... Link: https://lore.kernel.org/r/20231212093105.13938-1-krzysztof.kozlowski@linaro.org Signed-off-by: Arnd Bergmann commit 487e6d8dc6aefdbbdce94d693b1ed127fcf7d6f0 Author: Krzysztof Kozlowski Date: Tue Dec 12 00:39:25 2023 +0100 ARM: dts: ste: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231212-ux500-dts-v1-1-5a31b6742d85@linaro.org Signed-off-by: Arnd Bergmann commit 734e575fc6833a558cafbec35fbc9f5b214406b0 Merge: 6fab7e69de6a8 10dfde4bec529 Author: Arnd Bergmann Date: Thu Dec 21 15:38:28 2023 +0000 Merge tag 'omap-for-v6.8/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into soc/dt Devicetree changes for omaps - A series of patches to reorganize Motorola Mapphone related files to add support for tablets as the peripherals are different compared to the phones - Apply am57xx-idk overlays to base dtbs - Extcon update to use id-gpios and vbus-gpios - Update omap4-epson-embt2ws to enable wlan clock and bluetooth-gnss - Update for logicpd-torpedo to use bluetooth-gnss node name * tag 'omap-for-v6.8/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap4-embt2ws: Add Bluetooth ARM: dts: omap: logicpd-torpedo: do not disguise GNSS device ARM: dts: omap4-embt2ws: enable 32K clock on WLAN ARM: dts: ti/omap: Replace deprecated extcon-usb-gpio id-gpio/vbus-gpio properties arm: dts: omap: Apply am57xx-idk overlays to base dtbs ARM: dts: motorola-mapphone: Add basic support for mz609 and mz617 ARM: dts: motorola-mapphone: Move handset devices to a common file ARM: dts: motorola-mapphone: Move LCD to common file for xt875 and xt894 dt-bindings: omap: Add Motorola mapphone mz609 and mz617 tablets Link: https://lore.kernel.org/r/pull-1702037869-295608@atomide.com Signed-off-by: Arnd Bergmann commit 6fab7e69de6a8a6b9cec8c427a3ecf5386027264 Merge: 9ea6b7dfff2c7 94fa073377db0 Author: Arnd Bergmann Date: Thu Dec 21 15:37:23 2023 +0000 Merge tag 'hisi-arm64-dt-for-6.8' of https://github.com/hisilicon/linux-hisi into soc/dt ARM64: DT: HiSilicon ARM64 DT updates for v6.8 - Merge the hi3620-clock binding into hisilicon,sysctrl - Clean up the hikey970 PMIC dtsi * tag 'hisi-arm64-dt-for-6.8' of https://github.com/hisilicon/linux-hisi: arm64: dts: hisilicon: hikey970-pmic: clean up SPMI node arm64: dts: hisilicon: hikey970-pmic: fix regulator cells properties dt-bindings: hisilicon: Merge hi3620-clock into hisilicon,sysctrl binding Link: https://lore.kernel.org/r/6572C4C8.6050401@hisilicon.com Signed-off-by: Arnd Bergmann commit 652cdaa886e3ad1d051e5aef733c5a546171362f Author: Yue Hu Date: Thu Dec 21 14:23:41 2023 +0800 erofs: allow partially filled compressed bvecs In order to reduce memory footprints even further, let's allow partially filled compressed bvecs for readahead to bail out later. Signed-off-by: Yue Hu Reviewed-by: Gao Xiang Link: https://lore.kernel.org/r/20231221062341.23901-1-zbestahu@gmail.com Signed-off-by: Gao Xiang commit afacb21834bb02785ddb0c3ec197208803b74faa Author: Heiner Kallweit Date: Sat Dec 16 21:05:33 2023 +0100 leds: trigger: panic: Don't register panic notifier if creating the trigger failed It doesn't make sense to register the panic notifier if creating the panic trigger failed. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/8a61e229-5388-46c7-919a-4d18cc7362b2@gmail.com Signed-off-by: Lee Jones commit 06c5206ccdb459de95bb8d558602d2a722dd4bbc Author: Andy Shevchenko Date: Thu Dec 14 21:21:31 2023 +0200 leds: sun50i-a100: Convert to be agnostic to property provider Convert the driver to be agnostic to the property provider. LEDS subsytem is not dependent on OF, so no need to make drivers be a such. Signed-off-by: Andy Shevchenko Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20231214192131.1309912-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 808c7881876756dfcd8c4d0c3efc27c9262da822 Author: Andy Shevchenko Date: Thu Dec 14 20:40:11 2023 +0200 leds: max5970: Add missing headers Don't inherit headers "by chance" from others. Include the needed ones explicitly. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231214184050.1272848-5-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit e7baa5b437a782308b86c1517ae252fd1353eb0b Author: Andy Shevchenko Date: Thu Dec 14 20:40:10 2023 +0200 leds: max5970: Make use of dev_err_probe() Simplify the error handling in probe function by switching from dev_err() to dev_err_probe(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231214184050.1272848-4-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 6d63d05e26f8d5e22308efc25793660101fd7602 Author: Andy Shevchenko Date: Thu Dec 14 20:40:09 2023 +0200 leds: max5970: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Add mod_devicetable.h include. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231214184050.1272848-3-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit d3578b4982e6ebccbd898806ac86b2db4b2bcc5e Author: Andy Shevchenko Date: Thu Dec 14 20:40:08 2023 +0200 leds: max5970: Remove unused variable leds-max5970.c:50:21: warning: variable 'num_leds' set but not used [-Wunused-but-set-variable] Remove unused variable. Fixes: 736214b4b02a ("leds: max5970: Add support for max5970") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231214184050.1272848-2-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 3df95e265924ac898c1a38a0c01846dd0bd3b354 Author: David Lin Date: Thu Dec 21 09:55:11 2023 +0800 wifi: mwifiex: fix uninitialized firmware_stat Variable firmware_stat is possible to be used without initialization. Signed-off-by: David Lin Fixes: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready") Cc: stable@vger.kernel.org Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202312192236.ZflaWYCw-lkp@intel.com/ Acked-by: Brian Norris Signed-off-by: Kalle Valo Link: https://msgid.link/20231221015511.1032128-1-yu-hao.lin@nxp.com commit 5c16618bc06a41ad68fd8499a21d35ef57ca06c2 Author: Su Hui Date: Tue Dec 19 14:57:39 2023 +0800 wifi: rtlwifi: rtl8723{be,ae}: using calculate_bit_shift() Using calculate_bit_shift() to replace rtl8723_phy_calculate_bit_shift(). And fix an undefined bitwise shift behavior problem. Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-12-suhui@nfschina.com commit 98d9c7731dbb95dcddbea5330d2210036091f132 Author: Su Hui Date: Tue Dec 19 14:57:38 2023 +0800 wifi: rtlwifi: rtl8723_common: using calculate_bit_shift() Using calculate_bit_shift() to replace rtl8723_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: 0a168b48cdf7 ("rtlwifi: rtl8723ae: rtl8723-common: Create new driver for common code") Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-11-suhui@nfschina.com commit ac32b9317063b101a8ff3d3e885f76f87a280419 Author: Su Hui Date: Tue Dec 19 14:57:37 2023 +0800 wifi: rtlwifi: rtl8192se: using calculate_bit_shift() Using calculate_bit_shift() to replace _rtl92s_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: d15853163bea ("rtlwifi: rtl8192se: Merge phy routines") Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-10-suhui@nfschina.com commit 63526897fc0d086069bcab67c3a112caaec751cb Author: Su Hui Date: Tue Dec 19 14:57:36 2023 +0800 wifi: rtlwifi: rtl8192ee: using calculate_bit_shift() Using calculate_bit_shift() to replace _rtl92ee_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: b1a3bfc97cd9 ("rtlwifi: rtl8192ee: Move driver from staging to the regular tree") Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-9-suhui@nfschina.com commit b8b2baad2e652042cf8b6339939ac2f4e6f53de4 Author: Su Hui Date: Tue Dec 19 14:57:35 2023 +0800 wifi: rtlwifi: rtl8192de: using calculate_bit_shift() Using calculate_bit_shift() to replace _rtl92d_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: 7274a8c22980 ("rtlwifi: rtl8192de: Merge phy routines") Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-8-suhui@nfschina.com commit 3d03e8231031bcc65a48cd88ef9c71b6524ce70b Author: Su Hui Date: Tue Dec 19 14:57:34 2023 +0800 wifi: rtlwifi: rtl8192ce: using calculate_bit_shift() Using calculate_bit_shift() to replace _rtl92c_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: 0c8173385e54 ("rtl8192ce: Add new driver") Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-7-suhui@nfschina.com commit f4088c8fcbabadad9dd17d17ae9ba24e9e3221ec Author: Su Hui Date: Tue Dec 19 14:57:33 2023 +0800 wifi: rtlwifi: rtl8192cu: using calculate_bit_shift() Using calculate_bit_shift() to replace _rtl92c_phy_calculate_bit_shift(). And fix an undefined bitwise shift behavior problem. Fixes: f0a39ae738d6 ("rtlwifi: rtl8192cu: Add routine phy") Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-6-suhui@nfschina.com commit 1dedc3a6699d827d345019e921b8d8f37f694333 Author: Su Hui Date: Tue Dec 19 14:57:32 2023 +0800 wifi: rtlwifi: rtl8192c: using calculate_bit_shift() Using calculate_bit_shift() to replace _rtl92c_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: 4295cd254af3 ("rtlwifi: Move common parts of rtl8192ce/phy.c") Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-5-suhui@nfschina.com commit 969bc926f04b438676768aeffffffb050e480b62 Author: Su Hui Date: Tue Dec 19 14:57:31 2023 +0800 wifi: rtlwifi: rtl8188ee: phy: using calculate_bit_shift() Using calculate_bit_shift() to replace _rtl88e_phy_calculate_bit_shift(). And fix the undefined bitwise shift behavior problem. Fixes: f0eb856e0b6c ("rtlwifi: rtl8188ee: Add new driver") Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-4-suhui@nfschina.com commit acefef7a7e7aa46a804644321be70a4d33626523 Author: Su Hui Date: Tue Dec 19 14:57:30 2023 +0800 wifi: rtlwifi: rtl8821ae: phy: using calculate_bit_shift() using calculate_bit_shift() to replace _rtl8821ae_phy_calculate_bit_shift(). Signed-off-by: Su Hui Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-3-suhui@nfschina.com commit 52221dfddbbfb5b4e029bb2efe9bb7da33ec1e46 Author: Su Hui Date: Tue Dec 19 14:57:29 2023 +0800 wifi: rtlwifi: add calculate_bit_shift() There are many same functions like _rtl88e_phy_calculate_bit_shift(), _rtl92c_phy_calculate_bit_shift() and so on. And these functions can cause undefined bitwise shift behavior. Add calculate_bit_shift() to replace them and fix undefined behavior in subsequent patches. Signed-off-by: Su Hui Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231219065739.1895666-2-suhui@nfschina.com commit 5e72f1fe23839bd2093693a357a6fac8e5463483 Author: Jean Delvare Date: Sat Dec 2 21:43:53 2023 +0100 leds: rgb: Drop obsolete dependency on COMPILE_TEST Since commit 0166dc11be91 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. Signed-off-by: Jean Delvare Link: https://lore.kernel.org/r/20231202214353.7c02f23c@endymion.delvare Signed-off-by: Lee Jones commit c849ecb2ae8413f86c84627cb0af06dffce4e215 Author: Uwe Kleine-König Date: Tue Dec 19 18:32:11 2023 +0100 fpga: zynq-fpga: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/e63d4155f96f3504f7e3d6a4775c3807c90dd6ce.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit efe8ee1a8b9a89835dcbbec8cebc9d5a27428914 Author: Serge Semin Date: Sat Dec 2 14:14:23 2023 +0300 mips: Set dump-stack arch description In the framework of the MIPS architecture the mips_set_machine_name() method is defined to set the machine name. The name currently is only used in the /proc/cpuinfo file content generation. Let's have it utilized to mach-personalize the dump-stack data too in a way it's done on ARM, ARM64, RISC-V, etc. Signed-off-by: Serge Semin Signed-off-by: Thomas Bogendoerfer commit a584df303163e9aa8bdab3902fb0fb37ce1fa3ac Author: Uwe Kleine-König Date: Tue Dec 19 18:32:10 2023 +0100 fpga: xilinx-pr-decoupler: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/3e37e7cf91749fbaba67619f4ffc6a9a7352a671.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit 24bf6f4be4f80fd0ff3f7b2f5736ebe71dae4a28 Author: Uwe Kleine-König Date: Tue Dec 19 18:32:09 2023 +0100 fpga: stratix10-soc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/ab8328e82109b6ef14b2ad59889aee5f99264435.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit 4bfc170a319835a58ac94f2b95317632ee180584 Author: Uwe Kleine-König Date: Tue Dec 19 18:32:08 2023 +0100 fpga: socfpga-a10: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/da701d72522dde185becc15096342786a3a12153.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit 8abe405a5c5f07ddb6ca65e682ea95fdcaa3beca Author: Uwe Kleine-König Date: Tue Dec 19 18:32:07 2023 +0100 fpga: of-fpga-region: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/1ff30f297310bf048af567924c0fd4cb7c6c3240.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit 84a313b7d296bb12560bb8b5f21421be35c1704d Author: Uwe Kleine-König Date: Tue Dec 19 18:32:06 2023 +0100 fpga: intel-m10-bmc-sec-update: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/8d7b192ade744a70da4d7bc681ee4e00f9d04ba9.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit e540b8c5da04c66ff610d3bf84a7566d9f6bffcf Author: Serge Semin Date: Sat Dec 2 14:14:22 2023 +0300 mips: mm: add slab availability checking in ioremap_prot Recent commit a5f616483110 ("mm/ioremap: add slab availability checking in ioremap_prot") added the slab availability check to the generic ioremap_prot() implementation. It is reasonable to be done for the MIPS32-specific method too since it also relies on the get_vm_area_caller() function (by means of get_vm_area()) which requires the slab allocator being up and running before being called. Signed-off-by: Serge Semin Signed-off-by: Thomas Bogendoerfer commit 4af318c979ec79a201a297d89b93bec20099dbdd Author: Uwe Kleine-König Date: Tue Dec 19 18:32:05 2023 +0100 fpga: dfl-fme-region: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/13187db1642f81f04e55be0a26045f09ccc95d37.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit 851beb427b44c24dfa7baaa3ec4d790c33d43b93 Author: Uwe Kleine-König Date: Tue Dec 19 18:32:04 2023 +0100 fpga: dfl-fme-main: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/438bb4797984fbfd0cef501010a64fa1e42ad9f4.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit 1c0150229f6a658687c245dfc4dcfa3fae69df49 Author: Serge Semin Date: Sat Dec 2 14:14:21 2023 +0300 mips: Optimize max_mapnr init procedure max_mapnr defines the upper boundary of the pages space in the system. Currently in case if HIGHMEM is available it's calculated based on the upper high memory PFN limit value. Seeing there is a case when it isn't fully correct let's optimize out the max_mapnr variable initialization procedure to cover all the handled in the paging_init() method cases: 1. If CPU has DC-aliases, then high memory is unavailable so the PFNs upper boundary is determined by max_low_pfn. 2. Otherwise if high memory is available, use highend_pfn value representing the upper high memory PFNs limit. 3. Otherwise no high memory is available so set max_mapnr with the low-memory upper limit. Signed-off-by: Serge Semin Signed-off-by: Thomas Bogendoerfer commit f04ed6b174058d82a2230f70796633327dc758ba Author: Uwe Kleine-König Date: Tue Dec 19 18:32:03 2023 +0100 fpga: dfl-fme-br: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/be0728ae8e047c6b443492dc563cf92f397b269d.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit e1a9ae45736989c972a8d1c151bc390678ae6205 Author: Serge Semin Date: Sat Dec 2 14:14:20 2023 +0300 mips: Fix max_mapnr being uninitialized on early stages max_mapnr variable is utilized in the pfn_valid() method in order to determine the upper PFN space boundary. Having it uninitialized effectively makes any PFN passed to that method invalid. That in its turn causes the kernel mm-subsystem occasion malfunctions even after the max_mapnr variable is actually properly updated. For instance, pfn_valid() is called in the init_unavailable_range() method in the framework of the calls-chain on MIPS: setup_arch() +-> paging_init() +-> free_area_init() +-> memmap_init() +-> memmap_init_zone_range() +-> init_unavailable_range() Since pfn_valid() always returns "false" value before max_mapnr is initialized in the mem_init() method, any flatmem page-holes will be left in the poisoned/uninitialized state including the IO-memory pages. Thus any further attempts to map/remap the IO-memory by using MMU may fail. In particular it happened in my case on attempt to map the SRAM region. The kernel bootup procedure just crashed on the unhandled unaligned access bug raised in the __update_cache() method: > Unhandled kernel unaligned access[#1]: > CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.7.0-rc1-XXX-dirty #2056 > ... > Call Trace: > [<8011ef9c>] __update_cache+0x88/0x1bc > [<80385944>] ioremap_page_range+0x110/0x2a4 > [<80126948>] ioremap_prot+0x17c/0x1f4 > [<80711b80>] __devm_ioremap+0x8c/0x120 > [<80711e0c>] __devm_ioremap_resource+0xf4/0x218 > [<808bf244>] sram_probe+0x4f4/0x930 > [<80889d20>] platform_probe+0x68/0xec > ... Let's fix the problem by initializing the max_mapnr variable as soon as the required data is available. In particular it can be done right in the paging_init() method before free_area_init() is called since all the PFN zone boundaries have already been calculated by that time. Cc: stable@vger.kernel.org Signed-off-by: Serge Semin Signed-off-by: Thomas Bogendoerfer commit b27e9508288fbab8d95ef307d2ec124c0b5062f3 Author: Uwe Kleine-König Date: Tue Dec 19 18:32:02 2023 +0100 fpga: dfl-afu-main: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/351a4508a2feeba05b2c311fa8596ca1ad77f467.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit 52db8bdb6b1f87aa75e9991a47f5d42e22c2068f Author: Uwe Kleine-König Date: Tue Dec 19 18:32:01 2023 +0100 fpga: altera-hps2fpga: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/7a56558f7e5aa34bf0b21d22f9036a136a2b7322.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit 0f5cc249ff73552d3bd864e62f85841dafaa107d Author: Serge Semin Date: Sat Dec 2 14:14:19 2023 +0300 mips: Fix incorrect max_low_pfn adjustment max_low_pfn variable is incorrectly adjusted if the kernel is built with high memory support and the later is detected in a running system, so the memory which actually can be directly mapped is getting into the highmem zone. See the ZONE_NORMAL range on my MIPS32r5 system: > Zone ranges: > DMA [mem 0x0000000000000000-0x0000000000ffffff] > Normal [mem 0x0000000001000000-0x0000000007ffffff] > HighMem [mem 0x0000000008000000-0x000000020fffffff] while the zones are supposed to look as follows: > Zone ranges: > DMA [mem 0x0000000000000000-0x0000000000ffffff] > Normal [mem 0x0000000001000000-0x000000001fffffff] > HighMem [mem 0x0000000020000000-0x000000020fffffff] Even though the physical memory within the range [0x08000000;0x20000000] belongs to MMIO on our system, we don't really want it to be considered as high memory since on MIPS32 that range still can be directly mapped. Note there might be other problems caused by the max_low_pfn variable misconfiguration. For instance high_memory variable is initialize with virtual address corresponding to the max_low_pfn PFN, and by design it must define the upper bound on direct map memory, then end of the normal zone. That in its turn potentially may cause problems in accessing the memory by means of the /dev/mem and /dev/kmem devices. Let's fix the discovered misconfiguration then. It turns out the commit a94e4f24ec83 ("MIPS: init: Drop boot_mem_map") didn't introduce the max_low_pfn adjustment quite correct. If the kernel is built with high memory support and the system is equipped with high memory, the max_low_pfn variable will need to be initialized with PFN of the most upper directly reachable memory address so the zone normal would be correctly setup. On MIPS that PFN corresponds to PFN_DOWN(HIGHMEM_START). If the system is built with no high memory support and one is detected in the running system, we'll just need to adjust the max_pfn variable to discard the found high memory from the system and leave the max_low_pfn as is, since the later will be less than PFN_DOWN(HIGHMEM_START) anyway by design of the for_each_memblock() loop performed a bit early in the bootmem_init() method. Fixes: a94e4f24ec83 ("MIPS: init: Drop boot_mem_map") Signed-off-by: Serge Semin Signed-off-by: Thomas Bogendoerfer commit 15732fa43b50cdafb680a0389531fa75974114e6 Author: Uwe Kleine-König Date: Tue Dec 19 18:32:00 2023 +0100 fpga: altera-freeze-bridge: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/7f4fcb23b25400c6711848105823081e032c5266.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit 0d0a3748a2cb38f9da1f08d357688ebd982eb788 Author: Serge Semin Date: Sat Dec 2 14:14:18 2023 +0300 mips: dmi: Fix early remap on MIPS32 dmi_early_remap() has been defined as ioremap_cache() which on MIPS32 gets to be converted to the VM-based mapping. DMI early remapping is performed at the setup_arch() stage with no VM available. So calling the dmi_early_remap() for MIPS32 causes the system to crash at the early boot time. Fix that by converting dmi_early_remap() to the uncached remapping which is always available on both 32 and 64-bits MIPS systems. Note this change shall not cause any regressions on the current DMI support implementation because on the early boot-up stage neither MIPS32 nor MIPS64 has the cacheable ioremapping support anyway. Fixes: be8fa1cb444c ("MIPS: Add support for Desktop Management Interface (DMI)") Signed-off-by: Serge Semin Signed-off-by: Thomas Bogendoerfer commit d6c10a46b442c6998dee963f682e0b01727bc0ae Author: Uwe Kleine-König Date: Tue Dec 19 18:31:59 2023 +0100 fpga: altera-fpga2sdram: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Xu Yilun Link: https://lore.kernel.org/r/017b9e17a0c88b2a633467633d304639e7765926.1703006638.git.u.kleine-koenig@pengutronix.de Signed-off-by: Xu Yilun commit f99c37d562250cbceed262723f91944c981eeb7b Author: Gregory CLEMENT Date: Tue Dec 12 17:34:33 2023 +0100 MIPS: compressed: Use correct instruction for 64 bit code The code clearing BSS already use macro or use correct instruction depending if the CPU is 32 bits or 64 bits. However, a few instructions remained 32 bits only. By using the accurate MACRO, it is now possible to deal with memory address beyond 32 bits. As a side effect, when using 64bits processor, it also divides the loop number needed to clear the BSS by 2. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Florian Fainelli Signed-off-by: Gregory CLEMENT Signed-off-by: Thomas Bogendoerfer commit a70297d2213253853e95f5b49651f924990c6d3b Author: Shuai Xue Date: Mon Dec 18 14:45:18 2023 +0800 ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events There are two major types of uncorrected recoverable (UCR) errors : - Synchronous error: The error is detected and raised at the point of the consumption in the execution flow, e.g. when a CPU tries to access a poisoned cache line. The CPU will take a synchronous error exception such as Synchronous External Abort (SEA) on Arm64 and Machine Check Exception (MCE) on X86. OS requires to take action (for example, offline failure page/kill failure thread) to recover this uncorrectable error. - Asynchronous error: The error is detected out of processor execution context, e.g. when an error is detected by a background scrubber. Some data in the memory are corrupted. But the data have not been consumed. OS is optional to take action to recover this uncorrectable error. When APEI firmware first is enabled, a platform may describe one error source for the handling of synchronous errors (e.g. MCE or SEA notification ), or for handling asynchronous errors (e.g. SCI or External Interrupt notification). In other words, we can distinguish synchronous errors by APEI notification. For synchronous errors, kernel will kill the current process which accessing the poisoned page by sending SIGBUS with BUS_MCEERR_AR. In addition, for asynchronous errors, kernel will notify the process who owns the poisoned page by sending SIGBUS with BUS_MCEERR_AO in early kill mode. However, the GHES driver always sets mf_flags to 0 so that all synchronous errors are handled as asynchronous errors in memory failure. To this end, set memory failure flags as MF_ACTION_REQUIRED on synchronous events. Signed-off-by: Shuai Xue Tested-by: Ma Wupeng Reviewed-by: Kefeng Wang Reviewed-by: Xiaofei Tan Reviewed-by: Baolin Wang Reviewed-by: James Morse Signed-off-by: Rafael J. Wysocki commit bfd7b2d95ef467dd6bda7b90a3686f0fcf2d8b02 Merge: ceb6a6f023fd3 aed5ed595960c Author: Rafael J. Wysocki Date: Thu Dec 21 14:43:46 2023 +0100 Merge tag 'devfreq-next-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux into pm-devfreq Merge devfreq updates for v6.8 from Chanwoo Choi: "1. Fix buffer overflow of trans_stat_show sysfs node on devfreq core - Fix buffer overflow of trans_stat_show sysfs node to replace sprintf with scnprintf and then replace it with sysfs_emit according to the syfs guide. 2. Fix the timer list corruption when frequent switching of governor by synchronizing the devfreq_moniotr_start and _stop function." * tag 'devfreq-next-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: Synchronize devfreq_monitor_[start/stop] PM / devfreq: Convert to use sysfs_emit_at() API PM / devfreq: Fix buffer overflow in trans_stat_show commit b08c8fc0411dce0fc44b78ce4d67f1b67c35c196 Author: Daniel Borkmann Date: Wed Dec 20 14:38:05 2023 +0100 bpf: Re-support uid and gid when mounting bpffs For a clean, conflict-free revert of the token-related patches in commit d17aff807f84 ("Revert BPF token-related functionality"), the bpf fs commit 750e785796bb ("bpf: Support uid and gid when mounting bpffs") was undone temporarily as well. This patch manually re-adds the functionality from the original one back in 750e785796bb, no other functional changes intended. Testing: # mount -t bpf -o uid=65534,gid=65534 bpffs ./foo # ls -la . | grep foo drwxrwxrwt 2 nobody nogroup 0 Dec 20 13:16 foo # mount -t bpf bpffs on /root/foo type bpf (rw,relatime,uid=65534,gid=65534) Also, passing invalid arguments for uid/gid are properly rejected as expected. Fixes: d17aff807f84 ("Revert BPF token-related functionality") Signed-off-by: Daniel Borkmann Reviewed-by: Christian Brauner Cc: Jie Jiang Cc: Andrii Nakryiko Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/bpf/20231220133805.20953-1-daniel@iogearbox.net commit f52f00069888e410cec718792b3e314624f209ea Author: Shengjiu Wang Date: Wed Dec 20 18:33:09 2023 +0800 clk: imx: pll14xx: change naming of fvco to fout pll14xx_calc_rate() output the fout clock not the fvco clock The relation of fvco and fout is: fout = fvco / (1 << sdiv) So use correct naming for the clock. Signed-off-by: Shengjiu Wang Reviewed-by: Peng Fan Reviewed-by: Marco Felsch Link: https://lore.kernel.org/r/1703068389-6130-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Abel Vesa commit 580fc9c750fde7404f2d726637135fb785c67e86 Author: Greg Kroah-Hartman Date: Tue Dec 19 16:35:09 2023 +0100 driver core: mark remaining local bus_type variables as const Now that the driver core can properly handle constant struct bus_type, change the local driver core bus_type variables to be a constant structure as well, placing them into read-only memory which can not be modified at runtime. Cc: Ira Weiny Cc: Rafael J. Wysocki Cc: David Hildenbrand Cc: Oscar Salvador Cc: Kevin Hilman Cc: Ulf Hansson Cc: Len Brown Acked-by: William Breathitt Gray Acked-by: Dave Ertman Link: https://lore.kernel.org/r/2023121908-paver-follow-cc21@gregkh Signed-off-by: Greg Kroah-Hartman commit dedb868994d8308c6c4650203e190ec619005806 Author: Greg Kroah-Hartman Date: Tue Dec 19 16:03:20 2023 +0100 driver core: container: make container_subsys const Now that the driver core can properly handle constant struct bus_type, move the container_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/2023121919-chatter-grumbling-9ef3@gregkh Signed-off-by: Greg Kroah-Hartman commit 32f78abe59c740b6ec34c89dc10a09208eae7e1f Author: Greg Kroah-Hartman Date: Tue Dec 19 14:15:09 2023 +0100 driver core: bus: constantify subsys_register() calls The functions subsys_register() and subsys_virtual_register() should be taking a constant pointer to a struct bus_type, as they do not actually modify anything in it, so fix up the function definitions to do so properly. This also changes the pointer type in struct subsys_interface to be constant as well, as again, that's the proper signature of it. Cc: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/2023121908-grove-genetics-f8af@gregkh Signed-off-by: Greg Kroah-Hartman commit 5ae81209491ed3718fee798db6fb2cc81214824c Author: Greg Kroah-Hartman Date: Tue Dec 19 14:52:36 2023 +0100 driver core: bus: make bus_sort_breadthfirst() take a const pointer For some reason, during the big "clean up the driver core for a const struct bus_type" work, the bus_sort_breadthfirst() call was missed. Fix this up by changing the type to be a const * as it should be. Cc: Rafael J. Wysocki Link: https://lore.kernel.org/r/2023121935-stinking-ditzy-fd5d@gregkh Signed-off-by: Greg Kroah-Hartman commit 3ab5720881a924fb6405d9e6a3b09f1026467c47 Author: Christian Marangi Date: Mon Dec 18 00:25:08 2023 +0100 net: phy: at803x: replace msleep(1) with usleep_range Replace msleep(1) with usleep_range as suggested by timers-howto guide. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231217232508.26470-1-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni commit fc9d7264ddc32eaa647d6bfcdc25cdf9f786fde0 Author: Christian Marangi Date: Mon Dec 18 00:27:39 2023 +0100 net: phy: at803x: remove extra space after cast Remove extra space after cast as reported by checkpatch to keep code clean. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231217232739.27065-1-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni commit 2137e1564267001b25143d21bc619189c1f74bc6 Merge: 1bfc466b13cf6 4e94ddfe2aab7 Author: Christian Brauner Date: Thu Dec 21 13:21:52 2023 +0100 Merge branch 'vfs.file' Bring in the changes to the file infrastructure for this cycle. Mostly cleanups and some performance tweaks. * file: remove __receive_fd() * file: stop exposing receive_fd_user() * fs: replace f_rcuhead with f_task_work * file: remove pointless wrapper * file: s/close_fd_get_file()/file_close_fd()/g * Improve __fget_files_rcu() code generation (and thus __fget_light()) * file: massage cleanup of files that failed to open Signed-off-by: Christian Brauner commit 1bfc466b13cf6652ba227c282c27a30ffede69a5 Author: Dmitry Antipov Date: Thu Dec 21 12:01:21 2023 +0300 watch_queue: fix kcalloc() arguments order When compiling with gcc version 14.0.0 20231220 (experimental) and W=1, I've noticed the following warning: kernel/watch_queue.c: In function 'watch_queue_set_size': kernel/watch_queue.c:273:32: warning: 'kcalloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 273 | pages = kcalloc(sizeof(struct page *), nr_pages, GFP_KERNEL); | ^~~~~~ Since 'n' and 'size' arguments of 'kcalloc()' are multiplied to calculate the final size, their actual order doesn't affect the result and so this is not a bug. But it's still worth to fix it. Signed-off-by: Dmitry Antipov Link: https://lore.kernel.org/r/20231221090139.12579-1-dmantipov@yandex.ru Signed-off-by: Christian Brauner commit 4cf8249dc907398f694d310b89b494c144a4d9ec Author: Randy Dunlap Date: Mon Dec 18 20:54:14 2023 -0800 ntfs: dir.c: fix kernel-doc function parameter warnings Correct the kernel-doc function parameter warnings for function ntfs_dir_fsync() to prevent the following kernel-doc warnings: dir.c:1489: warning: Function parameter or member 'start' not described in 'ntfs_dir_fsync' dir.c:1489: warning: Function parameter or member 'end' not described in 'ntfs_dir_fsync' dir.c:1489: warning: Excess function parameter 'dentry' description in 'ntfs_dir_fsync' Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20231219045414.24670-1-rdunlap@infradead.org Reviewed-by: Namjae Jeon Cc: Anton Altaparmakov Cc: Namjae Jeon Cc: Cc: Andrew Morton Signed-off-by: Christian Brauner commit 376870aa2344397d6fbc3e7be036f2f4e9ba77c1 Author: Alexander Mikhalitsyn Date: Fri Dec 15 14:09:27 2023 +0100 fs: fix doc comment typo fs tree wide Do the replacement: s/simply passs @nop_mnt_idmap/simply pass @nop_mnt_idmap/ in the fs/ tree. Found by chance while working on support for idmapped mounts in fuse. Cc: Jan Kara Cc: Alexander Viro Cc: Christian Brauner Cc: Cc: Signed-off-by: Alexander Mikhalitsyn Link: https://lore.kernel.org/r/20231215130927.136917-1-aleksandr.mikhalitsyn@canonical.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit b5a78c7127f2007cfc7ad322b6ce0aa4bf347138 Author: Andrei Vagin Date: Wed Dec 13 22:44:39 2023 -0800 selftests/overlayfs: verify device and inode numbers in /proc/pid/maps When mapping a file on overlayfs, the file stored in ->vm_file is a backing file whose f_inode is on the underlying filesystem. We need to verify that /proc/pid/maps contains numbers of the overlayfs file, but not its backing file. Cc: Amir Goldstein Cc: Alexander Mikhalitsyn Signed-off-by: Andrei Vagin Link: https://lore.kernel.org/r/20231214064439.1023011-2-avagin@google.com Reviewed-by: Amir Goldstein Signed-off-by: Christian Brauner commit 3efdc78fdc21ab82694707eb234ab93f28d13ba8 Author: Andrei Vagin Date: Wed Dec 13 22:44:38 2023 -0800 fs/proc: show correct device and inode numbers in /proc/pid/maps /proc/pid/maps shows device and inode numbers of vma->vm_file-s. Here is an issue. If a mapped file is on a stackable file system (e.g., overlayfs), vma->vm_file is a backing file whose f_inode is on the underlying filesystem. To show correct numbers, we need to get a user file and shows its numbers. The same trick is used to show file paths in /proc/pid/maps. Cc: Alexander Mikhalitsyn Suggested-by: Amir Goldstein Signed-off-by: Andrei Vagin Link: https://lore.kernel.org/r/20231214064439.1023011-1-avagin@google.com Reviewed-by: Amir Goldstein Signed-off-by: Christian Brauner commit 996b2e046aee6e34f36c66254db128c10d6116f0 Author: Alexandru Ardelean Date: Tue Dec 19 18:50:03 2023 +0100 iio: buffer-dma: split iio_dma_buffer_fileio_free() function This change splits the logic into a separate function, which will be re-used later. Signed-off-by: Alexandru Ardelean Cc: Alexandru Ardelean Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20231219175009.65482-3-paul@crapouillou.net Signed-off-by: Jonathan Cameron commit ee9ec49046951eff704752669f0c388b506ddbdf Author: Paul Cercueil Date: Tue Dec 19 18:50:02 2023 +0100 iio: buffer-dma: Get rid of outgoing queue The buffer-dma code was using two queues, incoming and outgoing, to manage the state of the blocks in use. While this totally works, it adds some complexity to the code, especially since the code only manages 2 blocks. It is much easier to just check each block's state manually, and keep a counter for the next block to dequeue. Since the new DMABUF based API wouldn't use the outgoing queue anyway, getting rid of it now makes the upcoming changes simpler. With this change, the IIO_BLOCK_STATE_DEQUEUED is now useless, and can be removed. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20231219175009.65482-2-paul@crapouillou.net Signed-off-by: Jonathan Cameron commit 4cdfb6e7bc9c80142d33bf1d4653a73fa678ba56 Author: Konstantin Komarov Date: Thu Dec 21 13:59:43 2023 +0300 fs/ntfs3: Disable ATTR_LIST_ENTRY size check The use of sizeof(struct ATTR_LIST_ENTRY) has been replaced with le_size(0) due to alignment peculiarities on different platforms. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312071005.g6YrbaIe-lkp@intel.com/ Signed-off-by: Konstantin Komarov commit e6beb47edb89ca9dc8906515e2dfbeb5913312c8 Author: Haoran Liu Date: Mon Nov 27 06:41:08 2023 -0800 powerpc/powernv: Add error handling to opal_prd_range_is_valid In the opal_prd_range_is_valid function within opal-prd.c, error handling was missing for the of_get_address call. This patch adds necessary error checking, ensuring that the function gracefully handles scenarios where of_get_address fails. Signed-off-by: Haoran Liu Signed-off-by: Michael Ellerman Link: https://msgid.link/20231127144108.29782-1-liuhaoran14@163.com commit ba5b952ad5f52e58c0f288b9d5427ad734600568 Author: Colin Ian King Date: Fri Dec 15 11:24:56 2023 +0000 selftests/powerpc: Fix spelling mistake "EACCESS" -> "EACCES" There is a spelling mistake of the EACCES error name, fix it. Signed-off-by: Colin Ian King Signed-off-by: Michael Ellerman Link: https://msgid.link/20231215112456.13554-1-colin.i.king@gmail.com commit eb8446e164572180c2cd0ea4e8494e4419202396 Author: Vaibhav Jain Date: Tue Dec 19 14:52:36 2023 +0530 powerpc/hvcall: Reorder Nestedv2 hcall opcodes Reorder the newly introduced hcall opcodes for Nestedv2 to follow the increasing-opcode-number convention followed in 'hvcall.h'. Also updates the value for MAX_HCALL_OPCODE which is used in various places in arch code for range checking. Notably in the KVM enabled-hcall logic, and in hcall tracing. Fixes: 19d31c5f1157 ("KVM: PPC: Add support for nestedv2 guests") Suggested-by: Michael Ellerman Signed-off-by: Vaibhav Jain Signed-off-by: Michael Ellerman Link: https://msgid.link/20231219092309.118151-1-vaibhav@linux.ibm.com commit ccc0f7b7673e63139ba9d916f4567d4fadb14b55 Author: Kevin Hao Date: Thu Dec 21 12:45:10 2023 +0800 powerpc/ps3: Add missing set_freezable() for ps3_probe_thread() The kernel thread function ps3_probe_thread() invokes the try_to_freeze() in its loop. But all the kernel threads are non-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao Acked-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://msgid.link/20231221044510.1802429-4-haokexin@gmail.com commit 11611d254c15cce1f58431b2965c6edb5aa7e610 Author: Kevin Hao Date: Thu Dec 21 12:45:09 2023 +0800 powerpc/mpc83xx: Use wait_event_freezable() for freezable kthread A freezable kernel thread can enter frozen state during freezing by either calling try_to_freeze() or using wait_event_freezable() and its variants. So for the following snippet of code in a kernel thread loop: wait_event_interruptible(); try_to_freeze(); We can change it to a simple wait_event_freezable() and then eliminate a function call. Signed-off-by: Kevin Hao Signed-off-by: Michael Ellerman Link: https://msgid.link/20231221044510.1802429-3-haokexin@gmail.com commit 6addc560e69cd1b2e68ef43ad62a878ac1956f51 Author: Kevin Hao Date: Thu Dec 21 12:45:08 2023 +0800 powerpc/mpc83xx: Add the missing set_freezable() for agent_thread_fn() The kernel thread function agent_thread_fn() invokes the try_to_freeze() in its loop. But all the kernel threads are non-freezable by default. So if we want to make a kernel thread to be freezable, we have to invoke set_freezable() explicitly. Signed-off-by: Kevin Hao Signed-off-by: Michael Ellerman Link: https://msgid.link/20231221044510.1802429-2-haokexin@gmail.com commit 5f70413a85056db04050604a76b52e3f39a37f21 Author: Randy Dunlap Date: Wed Dec 20 21:51:44 2023 -0800 thermal: cpuidle_cooling: fix kernel-doc warning and a spello Correct one misuse of kernel-doc notation and one spelling error as reported by codespell. cpuidle_cooling.c:152: warning: cannot understand function prototype: 'struct thermal_cooling_device_ops cpuidle_cooling_ops = ' For the kernel-doc warning, don't use "/**" for a comment on data. kernel-doc can be used for structure declarations but not definitions. Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit 4bb104e4f30d2202657b77c948f9ef1366ac438e Author: Christophe JAILLET Date: Sun Dec 17 17:41:45 2023 +0100 iio: buffer: Use IIO_SEPARATE instead of a hard-coded 0 Use an explicit IIO_SEPARATE instead of 0 for the 'shared_by' parameter when calling __iio_add_chan_devattr(). For some reason, commit 3704432fb1fd ("iio: refactor info mask and ext_info attribute creation.") updated only 1 place out of 4. Update the remaining ones now. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/1d17f57423172fcb9d9797cfe7c8282f356049c2.1702831285.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jonathan Cameron commit fe752331d4b361d43cfd0b89534b4b2176057c32 Author: Christian Borntraeger Date: Wed Dec 20 13:53:17 2023 +0100 KVM: s390: vsie: fix race during shadow creation Right now it is possible to see gmap->private being zero in kvm_s390_vsie_gmap_notifier resulting in a crash. This is due to the fact that we add gmap->private == kvm after creation: static int acquire_gmap_shadow(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page) { [...] gmap = gmap_shadow(vcpu->arch.gmap, asce, edat); if (IS_ERR(gmap)) return PTR_ERR(gmap); gmap->private = vcpu->kvm; Let children inherit the private field of the parent. Reported-by: Marc Hartmayer Fixes: a3508fbe9dc6 ("KVM: s390: vsie: initial support for nested virtualization") Cc: Cc: David Hildenbrand Reviewed-by: Janosch Frank Reviewed-by: David Hildenbrand Reviewed-by: Claudio Imbrenda Signed-off-by: Christian Borntraeger Link: https://lore.kernel.org/r/20231220125317.4258-1-borntraeger@linux.ibm.com commit e9215fcca2561b208c78359110ee4009b454f761 Merge: 7050abeb8fe55 93c4bb3666a3d Author: Greg Kroah-Hartman Date: Thu Dec 21 11:23:10 2023 +0100 Merge tag 'w1-drv-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1 into char-misc-next Krzysztof writes: 1-Wire bus drivers for v6.8 1. Add new AMD AXI 1-wire host driver for AMD programmable logic IP core. 2. Add support for Analog Devices DS28EC20 EEPROM to existing DS2433 driver. 3. Few cleanups in W1 GPIO driver. * tag 'w1-drv-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-w1: w1: ds2433: add support for ds28ec20 eeprom w1: ds2433: use the kernel bitmap implementation w1: ds2433: introduce a configuration structure w1: ds2433: remove unused definitions w1: ds2490: support block sizes larger than 128 bytes in ds_read_block w1: amd_axi_w1: Explicitly include correct DT includes w1: gpio: rename pointer to driver data from pdata to ddata w1: gpio: Drop unused enable_external_pullup from driver data w1: gpio: Don't use platform data for driver data w1: Add AXI 1-wire host driver for AMD programmable logic IP core dt-bindings: w1: Add AMD AXI w1 host and MAINTAINERS entry commit fc3a5534e2a8855427403113cbeb54af5837bbe0 Author: Mingyi Zhang Date: Thu Dec 21 11:39:47 2023 +0800 libbpf: Fix NULL pointer dereference in bpf_object__collect_prog_relos An issue occurred while reading an ELF file in libbpf.c during fuzzing: Program received signal SIGSEGV, Segmentation fault. 0x0000000000958e97 in bpf_object.collect_prog_relos () at libbpf.c:4206 4206 in libbpf.c (gdb) bt #0 0x0000000000958e97 in bpf_object.collect_prog_relos () at libbpf.c:4206 #1 0x000000000094f9d6 in bpf_object.collect_relos () at libbpf.c:6706 #2 0x000000000092bef3 in bpf_object_open () at libbpf.c:7437 #3 0x000000000092c046 in bpf_object.open_mem () at libbpf.c:7497 #4 0x0000000000924afa in LLVMFuzzerTestOneInput () at fuzz/bpf-object-fuzzer.c:16 #5 0x000000000060be11 in testblitz_engine::fuzzer::Fuzzer::run_one () #6 0x000000000087ad92 in tracing::span::Span::in_scope () #7 0x00000000006078aa in testblitz_engine::fuzzer::util::walkdir () #8 0x00000000005f3217 in testblitz_engine::entrypoint::main::{{closure}} () #9 0x00000000005f2601 in main () (gdb) scn_data was null at this code(tools/lib/bpf/src/libbpf.c): if (rel->r_offset % BPF_INSN_SZ || rel->r_offset >= scn_data->d_size) { The scn_data is derived from the code above: scn = elf_sec_by_idx(obj, sec_idx); scn_data = elf_sec_data(obj, scn); relo_sec_name = elf_sec_str(obj, shdr->sh_name); sec_name = elf_sec_name(obj, scn); if (!relo_sec_name || !sec_name)// don't check whether scn_data is NULL return -EINVAL; In certain special scenarios, such as reading a malformed ELF file, it is possible that scn_data may be a null pointer Signed-off-by: Mingyi Zhang Signed-off-by: Xin Liu Signed-off-by: Changye Wu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231221033947.154564-1-liuxin350@huawei.com commit 812d8bf87678f77055b575d20636fdbbbf15edaf Author: Alyssa Ross Date: Tue Dec 19 12:03:24 2023 +0100 libbpf: Skip DWARF sections in linker sanity check clang can generate (with -g -Wa,--compress-debug-sections) 4-byte aligned DWARF sections that declare themselves to be 8-byte aligned in the section header. Since DWARF sections are dropped during linking anyway, just skip running the sanity checks on them. Reported-by: Sergei Trofimovich Suggested-by: Andrii Nakryiko Signed-off-by: Alyssa Ross Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Daniel Borkmann Closes: https://lore.kernel.org/bpf/ZXcFRJVKbKxtEL5t@nz.home/ Link: https://lore.kernel.org/bpf/20231219110324.8989-1-hi@alyssa.is commit 5165799f0d07184cabdd5e72e5b037271d128793 Author: Jens Axboe Date: Wed Dec 20 20:32:12 2023 -0700 block: export disk_clear_zoned() A previous commit split disk_set_zoned(..., bool) into not taking an argument for whether to set or clear, and instead added disk_clear_zoned() as the counterpart. However, that commit neglected to export the new symbol, causing failures for modular drivers that used it. Reported-by: Stephen Rothwell Fixes: d73e93b4dfab ("block: simplify disk_set_zoned") Signed-off-by: Jens Axboe commit 88388cb0c9b0c4cc337e4241fe6f905c89bd7acf Author: Al Viro Date: Fri Nov 3 03:25:18 2023 +0000 nfsctl: switch to simple_recursive_removal() Use simple_recursive_removal() in nfsd_client_rmdir() rather than open-coding it. And use less heavy-handed locking to get from nfsctl inode to its ->i_private... Reviewed-by: Jeff Layton Tested-by: Jeff Layton Signed-off-by: Al Viro commit 22c4640698a1d47606b5a4264a584e8046641784 Author: Armen Ratner Date: Fri Sep 8 14:53:09 2023 -0500 net/mlx5: Implement management PF Ethernet profile Add management PF modules, which introduce support for the structures needed to create the resources for the MGMT PF to work. Also, add the necessary calls and functions to establish this functionality. Signed-off-by: Armen Ratner Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Reviewed-by: Daniel Jurgens commit c88c49ac9c18fb7c3fa431126de1d8f8f555e912 Author: Tariq Toukan Date: Tue Dec 5 23:54:21 2023 +0200 net/mlx5: Enable SD feature Have an actual mlx5_sd instance in the core device, and fix the getter accordingly. This allows SD stuff to flow, the feature becomes supported only here. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 83a59ce0057b7753d7fbece194b89622c663b2a6 Author: Tariq Toukan Date: Wed Dec 13 13:11:47 2023 +0200 net/mlx5e: Block TLS device offload on combined SD netdev 1) Each TX TLS device offloaded context has its own TIS object. Extra work is needed to get it working in a SD environment, where a stream can move between different SQs (belonging to different mdevs). 2) Each RX TLS device offloaded context needs a DEK object from the DEK pool. Extra work is needed to get it working in a SD environment, as the DEK pool currently falsely depends on TX cap, and is on the primary device only. Disallow this combination for now. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit d72baceb92539a178d2610b0e9ceb75706a75b55 Author: Tariq Toukan Date: Tue Aug 8 19:50:34 2023 +0300 net/mlx5e: Support per-mdev queue counter Each queue counter object counts some events (in hardware) for the RQs that are attached to it, like events of packet drops due to no receive WQE (rx_out_of_buffer). Each RQ can be attached to a queue counter only within the same vhca. To still cover all RQs with these counters, we create multiple instances, one per vhca. The result that's shown to the user is now the sum of all instances. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c73a3ab8fa6e93a783bd563938d7cf00d62d5d34 Author: Tariq Toukan Date: Sun Aug 6 00:04:29 2023 +0300 net/mlx5e: Support cross-vhca RSS Implement driver support for the HW feature that allows RX steering of one device to target other device's RQs. In SD multi-mdev netdev mode, we set the secondaries into silent mode, disconnecting them from the network. This feature is then used to steer traffic from the primary to the secondaries. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit e4f9686bdee7b4dd89e0ed63cd03606e4bda4ced Author: Tariq Toukan Date: Mon Aug 7 11:33:41 2023 +0300 net/mlx5e: Let channels be SD-aware Distribute the channels between the different SD-devices to acheive local numa node performance on multiple numas. Each channel works against one specific mdev, creating all datapath queues against it. We distribute channels to mdevs in a round-robin policy. Example for 2 mdevs and 6 channels: +-------+---------+ | ch ix | mdev ix | +-------+---------+ | 0 | 0 | | 1 | 1 | | 2 | 0 | | 3 | 1 | | 4 | 0 | | 5 | 1 | +-------+---------+ This round-robin distribution policy is preferred over another suggested intuitive distribution, in which we first distribute one half of the channels to mdev #0 and then the second half to mdev #1. We prefer round-robin for a reason: it is less influenced by changes in the number of channels. The mapping between channel index and mdev is fixed, no matter how many channels the user configures. As the channel stats are persistent to channels closure, changing the mapping every single time would turn the accumulative stats less representing of the channel's history. Per-channel objects should stop using the primary mdev (priv->mdev) directly, and instead move to using their own channel's mdev. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit c4fb94aa822d6c9d05fc3c5aee35c7e339061dc1 Author: Tariq Toukan Date: Sun Aug 6 00:49:34 2023 +0300 net/mlx5e: Create EN core HW resources for all secondary devices Traffic queues will be created on all devices, including the secondaries. Create the needed core layer resources for them as well. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit e2578b4f983cfcd47837bbe3bcdbf5920e50b2ad Author: Tariq Toukan Date: Wed Dec 6 23:41:50 2023 +0200 net/mlx5e: Create single netdev per SD group Integrate the SD library calls into the auxiliary_driver ops in preparation for creating a single netdev for the multiple devices belonging to the same SD group. SD is still disabled at this stage. It is enabled by a downstream patch when all needed parts are implemented. The netdev is created only when the SD group, with all its participants, are ready. It is later destroyed if any of the participating devices drops. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit c82d360325112ccc512fc11a3b68cdcdf04a1478 Author: Tariq Toukan Date: Wed Dec 13 10:05:51 2023 +0200 net/mlx5: SD, Add informative prints in kernel log Print to kernel log when an SD group moves from/to ready state. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 605fcce33b2d1beb0139b6e5913fa0b2062116b2 Author: Tariq Toukan Date: Tue Dec 12 14:02:45 2023 +0200 net/mlx5: SD, Implement steering for primary and secondaries Implement the needed SD steering adjustments for the primary and secondaries. While the SD multiple devices are used to avoid cross-numa memory, when it comes to chip level all traffic goes only through the primary device. The secondaries are forced to silent mode, to guarantee they are not involved in any unexpected ingress/egress traffic. In RX, secondary devices will not have steering objects. Traffic will be steered from the primary device to the RQs of a secondary device using advanced cross-vhca RX steering capabilities. In TX, the primary creates a new TX flow table, which is aliased by the secondaries. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a45af9a96740873db9a4b5bb493ce2ad81ccb4d5 Author: Tariq Toukan Date: Sun Dec 10 16:24:36 2023 +0200 net/mlx5: SD, Implement devcom communication and primary election Use devcom to communicate between the different devices. Add a new devcom component type for this. Each device registers itself to the devcom component . Once all devices of a component are registered, the component becomes ready, and a primary device is elected. In principle, any of the devices can act as a primary, they are all capable, and a random election would've worked. However, we aim to achieve predictability and consistency, hence each group always choses the same device, with the lowest PCI BUS number, as primary. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 63b9ce944c0e26c44c42cdd5095c2e9851c1a8ff Author: Tariq Toukan Date: Tue Dec 12 17:04:25 2023 +0200 net/mlx5: SD, Implement basic query and instantiation Add implementation for querying the MPIR register for Socket-Direct attributes, and instantiating a SD struct accordingly. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4a04a31f49320d078b8078e1da4b0e2faca5dfa3 Author: Tariq Toukan Date: Mon Aug 7 11:40:01 2023 +0300 net/mlx5: SD, Introduce SD lib Add Socket-Direct API with empty/minimal implementation. We fill-in the implementation gradually in downstream patches. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit e04984a37398b3f4f5a79c993b94c6b1224184cc Author: Tariq Toukan Date: Tue Dec 19 14:46:20 2023 +0200 net/mlx5: Fix query of sd_group field The sd_group field moved in the HW spec from the MPIR register to the vport context. Align the query accordingly. Fixes: f5e956329960 ("net/mlx5: Expose Management PCIe Index Register (MPIR)") Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a7e7b40c4bc115dbf2a2bb453d7bbb2e0ea99703 Author: Saeed Mahameed Date: Fri Dec 15 19:31:14 2023 -0800 net/mlx5e: Use the correct lag ports number when creating TISes The cited commit moved the code of mlx5e_create_tises() and changed the loop to create TISes over MLX5_MAX_PORTS constant value, instead of getting the correct lag ports supported by the device, which can cause FW errors on devices with less than MLX5_MAX_PORTS ports. Change that back to mlx5e_get_num_lag_ports(mdev). Also IPoIB interfaces create there own TISes, they don't use the eth TISes, pass a flag to indicate that. Fixes: b25bd37c859f ("net/mlx5: Move TISes from priv to mdev HW resources") Signed-off-by: Saeed Mahameed commit cba6167f0adb07b6cd1b8758dd67718c772e108c Author: Kent Overstreet Date: Mon Dec 11 17:00:41 2023 -0500 restart_block: Trim includes We don't actually use any timekeeping types, no need to pull in time64.h. Also, sched.h uses restart_block; add it as a direct dependency. Signed-off-by: Kent Overstreet commit 99bac36667b6b20b9b0a20dc976365d23f90628b Author: Kent Overstreet Date: Mon Dec 11 16:58:51 2023 -0500 lockdep: move held_lock to lockdep_types.h held_lock is embedded in task_struct, and we don't want sched.h pulling in all of lockdep.h Signed-off-by: Kent Overstreet Acked-by: Waiman Long commit e034d49eb01c7c83a08a3ce2a1091b55f806b26b Author: Kent Overstreet Date: Mon Dec 11 15:52:17 2023 -0500 sem: Split out sem_types.h More sched.h dependency pruning. Signed-off-by: Kent Overstreet commit af6da56a223831cb74d1cf006f5742db6403398e Author: Kent Overstreet Date: Mon Dec 11 15:51:30 2023 -0500 uidgid: Split out uidgid_types.h More sched.h dependency pruning. Signed-off-by: Kent Overstreet Reviewed-by: Christian Brauner commit a6e1420ce4fc91da56c0a2444c4482245e7617d4 Author: Kent Overstreet Date: Mon Dec 11 15:30:14 2023 -0500 seccomp: Split out seccomp_types.h More pruning of sched.h dependencies. Signed-off-by: Kent Overstreet commit f9d6966b7f4182f612208f9dad9e2cfaaf667ba3 Author: Kent Overstreet Date: Mon Dec 11 15:15:38 2023 -0500 refcount: Split out refcount_types.h More trimming of sched.h dependencies. Signed-off-by: Kent Overstreet commit 1ef83969bb12e594fe44ceba406095e80a824c91 Author: Kent Overstreet Date: Mon Dec 11 15:12:04 2023 -0500 uapi/linux/resource.h: fix include We should't be depending on time.h; we should only be pulling in other uapi headers. Signed-off-by: Kent Overstreet commit 34470669829761424d231156eaa57115af975b51 Author: Kent Overstreet Date: Mon Dec 11 15:08:05 2023 -0500 x86/signal: kill dependency on time.h this is unecessary, and was pulling in printk.h from uapi headers Signed-off-by: Kent Overstreet commit 55b899aa3e7d0dc02ff9075b883d29eb2d0cb49a Author: Kent Overstreet Date: Mon Dec 11 14:25:40 2023 -0500 syscall_user_dispatch.h: split out *_types.h thread_info.h pulls in a lot of junk that sched.h that we don't need; in particular, this helps to kill the printk.h dependency. Signed-off-by: Kent Overstreet commit 959d8dc8046186ffea5410f51fcb309880f0dfaa Author: Kent Overstreet Date: Mon Dec 11 14:15:35 2023 -0500 mm_types_task.h: Trim dependencies more sched.h header dependency trimming Signed-off-by: Kent Overstreet commit 9983deb26d9021aecd971d25abf4cd263c72c385 Author: Kent Overstreet Date: Mon Dec 11 14:01:25 2023 -0500 Split out irqflags_types.h We're working on only pulling in type definitions to sched.h whenever possible. Signed-off-by: Kent Overstreet commit 72375a8864ebc0a20ca4a35f382441b01a0b85b9 Author: Kent Overstreet Date: Mon Dec 11 14:00:10 2023 -0500 ipc: Kill bogus dependency on spinlock.h pruning sched.h dependencies, headers shouldn't pull in more than they need. Signed-off-by: Kent Overstreet commit bc46ef3cea3d6f63952d7e29a324e889c34970a8 Author: Kent Overstreet Date: Mon Dec 11 13:58:25 2023 -0500 shm: Slim down dependencies list_head is in types.h, not list.h., and the uapi header wasn't needed. Signed-off-by: Kent Overstreet commit b2fa8443db320c4873feca2588b957439e350890 Author: Kent Overstreet Date: Mon Dec 11 13:55:01 2023 -0500 workqueue: Split out workqueue_types.h More sched.h dependency culling - this lets us kill a rhashtable-types.h dependency on workqueue.h. Signed-off-by: Kent Overstreet commit dff0fd233a5104337069603d201f8cad74bc0e5a Author: Kent Overstreet Date: Mon Dec 11 13:53:34 2023 -0500 timers: Split out timer_types.h Cutting down on sched.h dependencies: this is going to be used in workqueue_types.h in the next patch, so we can kill the sched.h dependency on workqueue.h. Signed-off-by: Kent Overstreet commit 22c336d0d3118824fed08834069568c57c5641a6 Author: Kent Overstreet Date: Mon Dec 11 13:34:45 2023 -0500 signal: Kill bogus dependency on list.h list_head is in types.h, not list.h. Signed-off-by: Kent Overstreet commit eee51b0ae5c52a77ed65ad59b55002d1397b40d5 Author: Kent Overstreet Date: Mon Dec 11 13:32:55 2023 -0500 timerqueue: Split out timerqueue_types.h Trimming down sched.h dependencies: timerqueue_types can include just rbtree_types.h instead of pulling in rbtree.h. Cc: Thomas Gleixner Signed-off-by: Kent Overstreet commit 097691960f7084ca82adb2e866d03a81753f0cb7 Author: Kent Overstreet Date: Mon Dec 11 13:28:46 2023 -0500 rslib: kill bogus dependency on list.h list_head is defined in types.h, not list.h - this kills a sched.h dependency. Signed-off-by: Kent Overstreet commit 6dfeff09d5ad331905c7066207053d286d58ac83 Author: Matthew Wilcox (Oracle) Date: Mon Dec 11 18:14:41 2023 +0000 wait: Remove uapi header file from main header file There's really no overlap between uapi/linux/wait.h and linux/wait.h. There are two files which rely on the uapi file being implcitly included, so explicitly include it there and remove it from the main header file. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Kent Overstreet Reviewed-by: Christian Brauner commit 8b7787a543cde905e53eaf29172c9472fe8a6a75 Author: Kent Overstreet Date: Mon Dec 11 13:12:49 2023 -0500 plist: Split out plist_types.h Trimming down sched.h dependencies: we don't want to include more than the base types. Signed-off-by: Kent Overstreet commit f551103cb964e9e6f5c03b3b8723424723731e76 Author: Kent Overstreet Date: Fri Dec 15 17:49:24 2023 -0500 sched.h: move pid helpers to pid.h This is needed for killing the sched.h dependency on rcupdate.h, and pid.h is a better place for this code anyways. Signed-off-by: Kent Overstreet commit 6d5e9d63683042a8d344cd5d6f9cf23613864a29 Author: Kent Overstreet Date: Mon Dec 11 13:03:22 2023 -0500 pid: Split out pid_types.h Trimming down sched.h dependencies: we dont't want to include more than the base types. Cc: Kees Cook Cc: Andy Lutomirski Cc: Will Drewry Signed-off-by: Kent Overstreet commit f038cc1379c0ff462d83895cae8beb75a0f6bf02 Author: Kent Overstreet Date: Mon Dec 11 13:01:06 2023 -0500 locking/seqlock: Split out seqlock_types.h Trimming down sched.h dependencies: we don't want to include more than the base types. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Signed-off-by: Kent Overstreet commit 53d31ba842d9cc391032d051a210c3c9941f1529 Author: Kent Overstreet Date: Mon Dec 11 12:43:30 2023 -0500 posix-cpu-timers: Split out posix-timers_types.h Trimming down sched.h dependencies: we don't want to include more than the base types. Cc: Thomas Gleixner Signed-off-by: Kent Overstreet commit d84f317915172c6511fd6c14ea3f70c9d67fdf67 Author: Kent Overstreet Date: Mon Dec 11 12:35:44 2023 -0500 locking/mutex: split out mutex_types.h Trimming down sched.h dependencies: we don't want to include more than the base types. Signed-off-by: Kent Overstreet Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Signed-off-by: Kent Overstreet commit 50d91c76582513852e38eb80491f54d44cfb51fc Author: Kent Overstreet Date: Mon Dec 11 11:52:02 2023 -0500 hrtimers: Split out hrtimer_types.h We need to reduce the scope of what's included in sched.h: task_struct includes a hrtimer, so split out the core types into their own header. Signed-off-by: Kent Overstreet Cc: Thomas Gleixner commit 2e346b19aab9ee40e5e429667a0a515f1d68b714 Author: Kent Overstreet Date: Mon Dec 11 14:11:05 2023 -0500 ktime.h: move ktime_t to types.h ktime.h pulls in quite a few headers recursively (including printk.h) - this is going to help with trimming sched.h dependencies. Signed-off-by: Kent Overstreet commit d1d71b30e1f85e8b5d7c0d8edc16869bdc4d535f Author: Kent Overstreet Date: Mon Dec 11 14:05:04 2023 -0500 sched.h: Move (spin|rwlock)_needbreak() to spinlock.h This lets us kill the dependency on spinlock.h. Signed-off-by: Kent Overstreet commit d7a73e3f089204aee3393687e23fd45a22657b08 Author: Kent Overstreet Date: Mon Dec 11 13:27:00 2023 -0500 kernel/numa.c: Move logging out of numa.h Moving these stub functions to a .c file means we can kill a sched.h dependency on printk.h. Signed-off-by: Kent Overstreet commit 04bc786d663543512d08f1b86c7bcefb5144afe3 Author: Kent Overstreet Date: Mon Jan 23 21:55:54 2023 -0500 arm64: Fix circular header dependency Replace linux/percpu.h include with asm/percpu.h to avoid circular dependency. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan commit 6060ef31f1162fb91a1688fa5098b38c4b9c680c Author: Kent Overstreet Date: Fri Dec 2 14:39:55 2022 -0500 timekeeping: Kill percpu.h dependency Slimming down recursive header includes. Signed-off-by: Kent Overstreet Cc: Thomas Gleixner commit d9f29deb7fe8137fd1954871443cbbc1b6125832 Author: Kent Overstreet Date: Mon Jan 23 21:32:18 2023 -0500 prandom: Remove unused include prandom.h doesn't use percpu.h - this fixes some circular header issues. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan commit bea32141764bc76db2d75c9484b71ded56119ab4 Author: Kent Overstreet Date: Tue Dec 6 14:32:23 2022 -0500 nodemask: Split out include/linux/nodemask_types.h sched.h, which defines task_struct, needs nodemask_t - but sched.h is a frequently used header and ideally shouldn't be pulling in any more code that it needs to. This splits out nodemask_types.h which has the definition sched.h needs, which will avoid a circular header dependency in the alloc tagging patch series, and as a bonus should speed up kernel build times. Signed-off-by: Kent Overstreet Signed-off-by: Suren Baghdasaryan Cc: Ingo Molnar Cc: Peter Zijlstra commit ea115c248a478ce1acbf4776e4666fb663285b2f Author: Kent Overstreet Date: Sun Dec 17 20:01:01 2023 -0500 torture: add missing dependency on hrtimer.h Signed-off-by: Kent Overstreet commit ed509c7e0785982dd05c42ed9a7be6f84141d3f7 Author: Kent Overstreet Date: Sun Dec 17 19:57:18 2023 -0500 PM: fix missing rculist.h dependency Signed-off-by: Kent Overstreet commit 058e0529d12ae9fed34c6eeef700cd294f9622a1 Author: Kent Overstreet Date: Fri Dec 15 20:22:22 2023 -0500 time_namespace.h: fix missing include Signed-off-by: Kent Overstreet commit 316aa04d1ffa61f73ce2679d1ae1dca8747aeb1f Author: Kent Overstreet Date: Mon Dec 11 14:00:59 2023 -0500 kmsan: add missing types.h dependency more header dependency pruning/fixing Signed-off-by: Kent Overstreet commit a2bef835d39c5c9d611e9420db4221b0eeec9944 Author: Kent Overstreet Date: Fri Dec 15 20:49:12 2023 -0500 kernel/fork.c: add missing include Signed-off-by: Kent Overstreet commit 6a2623b17634688cfec58dd44041c5db2143719d Author: Kent Overstreet Date: Fri Dec 15 20:00:15 2023 -0500 nsproxy.h: add missing include Signed-off-by: Kent Overstreet commit f6120d527b8611aeaa1a34a33337f530d78a789c Author: Kent Overstreet Date: Fri Dec 15 19:56:59 2023 -0500 task_stack.h: add missing include Signed-off-by: Kent Overstreet commit a484ba4e8b8f2b29377a09c3ffea74de7f877e37 Author: Kent Overstreet Date: Wed Dec 20 19:25:48 2023 -0500 microblaze: add missing forward declaration Signed-off-by: Kent Overstreet commit 4459cd2e167e7208e57d517d16282408d9035dad Author: Wang Jinchao Date: Fri Dec 15 16:54:51 2023 +0800 crash_core: remove duplicated including of kexec.h Remove second include of linux/kexec.h Link: https://lkml.kernel.org/r/202312151654+0800-wangjinchao@xfusion.com Signed-off-by: Wang Jinchao Acked-by: Baoquan He Cc: Dave Young Cc: Vivek Goyal Signed-off-by: Andrew Morton commit 8474f82ade6f361169d85177b22279dcbe813219 Author: Yuntao Wang Date: Tue Dec 12 23:05:06 2023 +0800 x86/kexec: simplify the logic of mem_region_callback() The expression `mstart + resource_size(res) - 1` is actually equivalent to `res->end`, simplify the logic of this function to improve readability. Link: https://lkml.kernel.org/r/20231212150506.31711-1-ytcoode@gmail.com Signed-off-by: Yuntao Wang Acked-by: Baoquan He Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Simon Horman Cc: Thomas Gleixner Signed-off-by: Andrew Morton commit db6b6fb70193f0defe4d5785e940156c06e9abbe Author: Yuntao Wang Date: Tue Dec 12 22:27:06 2023 +0800 kexec: use ALIGN macro instead of open-coding it Use ALIGN macro instead of open-coding it to improve code readability. Link: https://lkml.kernel.org/r/20231212142706.25149-1-ytcoode@gmail.com Signed-off-by: Yuntao Wang Acked-by: Baoquan He Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton commit e95d392d160baa2fbc1c0cac672abc472985418b Author: Randy Dunlap Date: Sat Dec 9 21:34:29 2023 -0800 usr/Kconfig: fix typos of "its" Use "Its" or "its" for possessive instead of "it's" (contraction for "it is"). Link: https://lkml.kernel.org/r/20231210053429.23146-1-rdunlap@infradead.org Fixes: db2aa7fd15e8 ("initramfs: allow again choice of the embedded initram compression algorithm") Signed-off-by: Randy Dunlap Reviewed-by: Nicolas Schier Acked-by: "Francisco Blas Izquierdo Riera (klondike)" Cc: Masahiro Yamada Cc: Nathan Chancellor Signed-off-by: Andrew Morton commit a751ea34f8c80f2c3cb8e26451a53f900a8b6214 Author: Randy Dunlap Date: Thu Dec 7 20:58:19 2023 -0800 init/Kconfig: move more items into the EXPERT menu KCMP, RSEQ, CACHESTAT_SYSCALL, and PC104 depend on EXPERT but not shown in the EXPERT menu. Move some lines around so that they are displayed in the EXPERT menu. Drop one useless comment. Change "enabled" to "enable" for DEBUG_RSEQ. Link: https://lkml.kernel.org/r/20231208045819.2922-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Reviewed-by: Mathieu Desnoyers Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Boqun Feng Signed-off-by: Andrew Morton commit a903904c5fa06e8d8472509741f79e8eb25ff864 Author: Kevin Hao Date: Fri Dec 8 16:41:15 2023 +0800 fork: remove redundant TASK_UNINTERRUPTIBLE TASK_KILLABLE already includes TASK_UNINTERRUPTIBLE, so there is no need to add a separate TASK_UNINTERRUPTIBLE. Link: https://lkml.kernel.org/r/20231208084115.1973285-1-haokexin@gmail.com Signed-off-by: Kevin Hao Cc: Peter Zijlstra Signed-off-by: Andrew Morton commit 2c20b0f26694e1d40bb9b86f8eff5675e87003d1 Author: Ryusuke Konishi Date: Thu Dec 7 13:57:30 2023 +0900 nilfs2: switch WARN_ONs to warning output in nilfs_sufile_do_free() nilfs_sufile_do_free(), which is called when log write fails or during GC, uses WARN_ONs to check for abnormal status of metadata. In the former case, these WARN_ONs will not be fired, but in the latter case they don't "never-happen". It is possible to trigger these by intentionally modifying the userland GC library to release segments that are not in the expected state. So, replace them with warning output using the dedicated macro nilfs_warn(). This replaces two potentially triggered WARN_ONs with ones that use a warning output macro. Link: https://lkml.kernel.org/r/20231207045730.5205-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 6915f40c3a43740207f7af70bab96c20eed22aa3 Author: Randy Dunlap Date: Thu Dec 7 13:20:35 2023 -0800 freevxfs: lookup: fix function params kernel-doc Correct the function parameter kernel-doc notation to prevent warnings: vxfs_lookup.c:192: warning: Function parameter or member 'ctx' not described in 'vxfs_readdir' vxfs_lookup.c:192: warning: Excess function parameter 'retp' description in 'vxfs_readdir' vxfs_lookup.c:192: warning: Excess function parameter 'filler' description in 'vxfs_readdir' Link: https://lkml.kernel.org/r/20231207212035.25345-3-rdunlap@infradead.org Signed-off-by: Randy Dunlap Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton commit 2bb31b37d3d339d8c59298b72d78ff5484eeb595 Author: Randy Dunlap Date: Thu Dec 7 13:20:34 2023 -0800 freevxfs: immed: fix kernel-doc param name Correct the function parameter name to prevent kernel-doc warnings: vxfs_immed.c:32: warning: Function parameter or member 'fp' not described in 'vxfs_immed_read_folio' vxfs_immed.c:32: warning: Excess function parameter 'file' description in 'vxfs_immed_read_folio' Link: https://lkml.kernel.org/r/20231207212035.25345-2-rdunlap@infradead.org Signed-off-by: Randy Dunlap Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton commit ec3a8dd38199ac201a83f81394b1d6caf02643f6 Author: Randy Dunlap Date: Thu Dec 7 13:20:33 2023 -0800 freevxfs: bmap: fix kernel-doc warnings Fix -Wall kernel-doc warnings in vxfs_bmap.c: vxfs_bmap.c:44: warning: Function parameter or member 'bn' not described in 'vxfs_bmap_ext4' vxfs_bmap.c:44: warning: Excess function parameter 'iblock' description in 'vxfs_bmap_ext4' vxfs_bmap.c:108: warning: No description found for return value of 'vxfs_bmap_indir' vxfs_bmap.c:187: warning: No description found for return value of 'vxfs_bmap_typed' vxfs_bmap.c:251: warning: No description found for return value of 'vxfs_bmap1' Link: https://lkml.kernel.org/r/20231207212035.25345-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Reviewed-by: Christoph Hellwig Signed-off-by: Andrew Morton commit 4600c4bcd9fca2d7e66963ce1d1132921250e585 Author: Randy Dunlap Date: Wed Dec 6 09:55:28 2023 -0800 rapidio/tsi721: fix kernel-doc warnings Correct kernel-doc comments in tsi721.c and tsi721_dma.c to prevent warnings from scripts/kernel-doc. tsi721_dma.c:293: warning: expecting prototype for tsi721_omsg_msix(). Prototype was for tsi721_bdma_msix() instead tsi721.c:215: warning: Function parameter or member 'data' not described in 'tsi721_cread_dma' tsi721.c:215: warning: Excess function parameter 'val' description in 'tsi721_cread_dma' tsi721.c:238: warning: Function parameter or member 'data' not described in 'tsi721_cwrite_dma' tsi721.c:238: warning: Excess function parameter 'val' description in 'tsi721_cwrite_dma' tsi721.c:2548: warning: Function parameter or member 'attr' not described in 'tsi721_query_mport' tsi721.c:2548: warning: Excess function parameter 'mbox' description in 'tsi721_query_mport' and 27 warnings like this one: tsi721.c:59: warning: No description found for return value of 'tsi721_lcread' Link: https://lkml.kernel.org/r/20231206175528.16386-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Matt Porter Cc: Alexandre Bounine Signed-off-by: Andrew Morton commit 0df52582e0154b2e05e9a5924cc60ac5f6f842b2 Author: Mark Rutland Date: Mon Dec 4 17:18:07 2023 +0000 kcov: remove stale RANDOMIZE_BASE text The Kconfig help text for CONFIG_KCOV describes that recorded PC values will not be stable across machines or reboots when RANDOMIZE_BASE is selected. This was the case when KCOV was introduced in commit: 5c9a8750a6409c63 ("kernel: add kcov code coverage") However, this changed in commit: 4983f0ab7ffaad1e ("kcov: make kcov work properly with KASLR enabled") Since that commit KCOV always subtracts the KASLR offset from PC values, which ensures that these are stable across machines and across reboots even when RANDOMIZE_BASE is selected. Unfortunately, that commit failed to update the Kconfig help text, which still suggests disabling RANDOMIZE_BASE even though this is no longer necessary. Remove the stale Kconfig text. Link: https://lkml.kernel.org/r/20231204171807.3313022-1-mark.rutland@arm.com Reported-by: Borislav Petkov Signed-off-by: Mark Rutland Reviewed-by: Dmitry Vyukov Cc: Alexander Popov Cc: Andrey Konovalov Signed-off-by: Andrew Morton commit d53a154cdc54b4fa2dbbf10646d613b0b664b82e Author: Baoquan He Date: Fri Dec 1 14:25:38 2023 +0800 riscv, kexec: fix the ifdeffery for AFLAGS_kexec_relocate.o This was introduced in commit fba8a8674f68 ("RISC-V: Add kexec support"). It should work on CONFIG_KEXEC_CORE, but not CONFIG_KEXEC only, since we could set CONFIG_KEXEC_FILE=y and CONFIG_KEXEC=N, or only set CONFIG_CRASH_DUMP=y and disable both CONFIG_KEXEC and CONFIG_KEXEC_FILE. In these cases, the AFLAGS won't take effect with the current ifdeffery for AFLAGS_kexec_relocate.o. So fix it now. Link: https://lkml.kernel.org/r/20231201062538.27240-1-bhe@redhat.com Signed-off-by: Baoquan He Cc: Albert Ou Cc: Changbin Du Cc: Nick Kossifidis Cc: Palmer Dabbelt Cc: Paul Walmsley Signed-off-by: Andrew Morton commit a78c668b9a411cbf9356cec9122ac3380016e1c6 Author: Baoquan He Date: Wed Dec 13 13:57:47 2023 +0800 kexec_file, parisc: print out debugging message if required Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. Link: https://lkml.kernel.org/r/20231213055747.61826-8-bhe@redhat.com Signed-off-by: Baoquan He Cc: Conor Dooley Cc: Joe Perches Cc: Nathan Chancellor Signed-off-by: Andrew Morton commit 63b642e952f62b41033e34e81b74b9d9db33144b Author: Baoquan He Date: Wed Dec 13 13:57:46 2023 +0800 kexec_file, power: print out debugging message if required Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. Link: https://lkml.kernel.org/r/20231213055747.61826-7-bhe@redhat.com Signed-off-by: Baoquan He Cc: Conor Dooley Cc: Joe Perches Cc: Nathan Chancellor Signed-off-by: Andrew Morton commit eb7622d908a097fe0b845cb2dc4b579b99f04b59 Author: Baoquan He Date: Wed Dec 13 13:57:45 2023 +0800 kexec_file, riscv: print out debugging message if required Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also replace pr_notice() with kexec_dprintk() in elf_kexec_load() because loaded location of purgatory and device tree are only printed out for debugging, it doesn't make sense to always print them out. And also remove kexec_image_info() because the content has been printed out in generic code. Link: https://lkml.kernel.org/r/20231213055747.61826-6-bhe@redhat.com Signed-off-by: Baoquan He Cc: Conor Dooley Cc: Joe Perches Cc: Nathan Chancellor Signed-off-by: Andrew Morton commit 6f8c1da071a46176966e377fb77a46366fb5af2d Author: Baoquan He Date: Wed Dec 13 13:57:44 2023 +0800 kexec_file, arm64: print out debugging message if required Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also remove the kimage->segment[] printing because the generic code has done the printing. Link: https://lkml.kernel.org/r/20231213055747.61826-5-bhe@redhat.com Signed-off-by: Baoquan He Cc: Conor Dooley Cc: Joe Perches Cc: Nathan Chancellor Signed-off-by: Andrew Morton commit e687b2fabd824d06e1126378b386c104341515f3 Author: Baoquan He Date: Wed Dec 13 13:57:43 2023 +0800 kexec_file, x86: print out debugging message if required Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also print out e820 memmap passed to 2nd kernel just as kexec_load interface has been doing. Link: https://lkml.kernel.org/r/20231213055747.61826-4-bhe@redhat.com Signed-off-by: Baoquan He Cc: Conor Dooley Cc: Joe Perches Cc: Nathan Chancellor Signed-off-by: Andrew Morton commit a85ee18c7900f001f42082d2fabce4eaf57e655f Author: Baoquan He Date: Wed Dec 13 13:57:42 2023 +0800 kexec_file: print out debugging message if required Then when specifying '-d' for kexec_file_load interface, loaded locations of kernel/initrd/cmdline etc can be printed out to help debug. Here replace pr_debug() with the newly added kexec_dprintk() in kexec_file loading related codes. And also print out type/start/head of kimage and flags to help debug. Link: https://lkml.kernel.org/r/20231213055747.61826-3-bhe@redhat.com Signed-off-by: Baoquan He Cc: Conor Dooley Cc: Joe Perches Cc: Nathan Chancellor Signed-off-by: Andrew Morton commit cbc2fe9d9cb226347365753f50d81bc48cc3c52e Author: Baoquan He Date: Wed Dec 13 13:57:41 2023 +0800 kexec_file: add kexec_file flag to control debug printing Patch series "kexec_file: print out debugging message if required", v4. Currently, specifying '-d' on kexec command will print a lot of debugging informationabout kexec/kdump loading with kexec_load interface. However, kexec_file_load prints nothing even though '-d' is specified. It's very inconvenient to debug or analyze the kexec/kdump loading when something wrong happened with kexec/kdump itself or develper want to check the kexec/kdump loading. In this patchset, a kexec_file flag is KEXEC_FILE_DEBUG added and checked in code. If it's passed in, debugging message of kexec_file code will be printed out and can be seen from console and dmesg. Otherwise, the debugging message is printed like beofre when pr_debug() is taken. Note: **** ===== 1) The code in kexec-tools utility also need be changed to support passing KEXEC_FILE_DEBUG to kernel when 'kexec -s -d' is specified. The patch link is here: ========= [PATCH] kexec_file: add kexec_file flag to support debug printing http://lists.infradead.org/pipermail/kexec/2023-November/028505.html 2) s390 also has kexec_file code, while I am not sure what debugging information is necessary. So leave it to s390 developer. Test: **** ==== Testing was done in v1 on x86_64 and arm64. For v4, tested on x86_64 again. And on x86_64, the printed messages look like below: -------------------------------------------------------------- kexec measurement buffer for the loaded kernel at 0x207fffe000. Loaded purgatory at 0x207fff9000 Loaded boot_param, command line and misc at 0x207fff3000 bufsz=0x1180 memsz=0x1180 Loaded 64bit kernel at 0x207c000000 bufsz=0xc88200 memsz=0x3c4a000 Loaded initrd at 0x2079e79000 bufsz=0x2186280 memsz=0x2186280 Final command line is: root=/dev/mapper/fedora_intel--knightslanding--lb--02-root ro rd.lvm.lv=fedora_intel-knightslanding-lb-02/root console=ttyS0,115200N81 crashkernel=256M E820 memmap: 0000000000000000-000000000009a3ff (1) 000000000009a400-000000000009ffff (2) 00000000000e0000-00000000000fffff (2) 0000000000100000-000000006ff83fff (1) 000000006ff84000-000000007ac50fff (2) ...... 000000207fff6150-000000207fff615f (128) 000000207fff6160-000000207fff714f (1) 000000207fff7150-000000207fff715f (128) 000000207fff7160-000000207fff814f (1) 000000207fff8150-000000207fff815f (128) 000000207fff8160-000000207fffffff (1) nr_segments = 5 segment[0]: buf=0x000000004e5ece74 bufsz=0x211 mem=0x207fffe000 memsz=0x1000 segment[1]: buf=0x000000009e871498 bufsz=0x4000 mem=0x207fff9000 memsz=0x5000 segment[2]: buf=0x00000000d879f1fe bufsz=0x1180 mem=0x207fff3000 memsz=0x2000 segment[3]: buf=0x000000001101cd86 bufsz=0xc88200 mem=0x207c000000 memsz=0x3c4a000 segment[4]: buf=0x00000000c6e38ac7 bufsz=0x2186280 mem=0x2079e79000 memsz=0x2187000 kexec_file_load: type:0, start:0x207fff91a0 head:0x109e004002 flags:0x8 --------------------------------------------------------------------------- This patch (of 7): When specifying 'kexec -c -d', kexec_load interface will print loading information, e.g the regions where kernel/initrd/purgatory/cmdline are put, the memmap passed to 2nd kernel taken as system RAM ranges, and printing all contents of struct kexec_segment, etc. These are very helpful for analyzing or positioning what's happening when kexec/kdump itself failed. The debugging printing for kexec_load interface is made in user space utility kexec-tools. Whereas, with kexec_file_load interface, 'kexec -s -d' print nothing. Because kexec_file code is mostly implemented in kernel space, and the debugging printing functionality is missed. It's not convenient when debugging kexec/kdump loading and jumping with kexec_file_load interface. Now add KEXEC_FILE_DEBUG to kexec_file flag to control the debugging message printing. And add global variable kexec_file_dbg_print and macro kexec_dprintk() to facilitate the printing. This is a preparation, later kexec_dprintk() will be used to replace the existing pr_debug(). Once 'kexec -s -d' is specified, it will print out kexec/kdump loading information. If '-d' is not specified, it regresses to pr_debug(). Link: https://lkml.kernel.org/r/20231213055747.61826-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20231213055747.61826-2-bhe@redhat.com Signed-off-by: Baoquan He Cc: Conor Dooley Cc: Joe Perches Cc: Nathan Chancellor Signed-off-by: Andrew Morton commit 0fcb70851fbfea1776ae62f67c503fef8f0292b9 Author: Arnd Bergmann Date: Thu Nov 23 12:05:06 2023 +0100 Makefile.extrawarn: turn on missing-prototypes globally Over the years we went from > 1000 of warnings to under 100 earlier this year, and I sent patches to address all the ones that I saw with compile testing randcom configs on arm64, arm and x86 kernels. This is a really useful warning, as it catches real bugs when there are mismatched prototypes. In particular with kernel control flow integrity enabled, those are no longer allowed. I have done extensive testing to ensure that there are no new build errors or warnings on any configuration of x86, arm and arm64 builds. I also made sure that at least both the normal defconfig and an allmodconfig build is clean for arc, csky, loongarch, m68k, microblaze, openrisc, parisc, powerpc, riscv, s390, and xtensa, with the respective maintainers doing most of the patches. At this point, there are five architectures with a number of known regressions: alpha, nios2, mips, sh and sparc. In the previous version of this patch, I had turned off the missing prototype warnings for the 15 architectures that still had issues, but since there are only five left, I think we can leave the rest to the maintainers (Cc'd here) as well. Link: https://lkml.kernel.org/r/20231123110506.707903-7-arnd@kernel.org Link: https://lore.kernel.org/lkml/20230810141947.1236730-1-arnd@kernel.org/ Signed-off-by: Arnd Bergmann Reviewed-by: Kees Cook Acked-by: Palmer Dabbelt # RISC-V Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Dinh Nguyen Cc: Thomas Bogendoerfer Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: "David S. Miller" Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Richard Weinberger Cc: Stephen Rothwell Cc: Tudor Ambarus Cc: Zhihao Cheng Signed-off-by: Andrew Morton commit bbe4f634f48cd832aa43e7f5a4edc7494ef7ff5f Author: Arnd Bergmann Date: Thu Dec 14 20:54:47 2023 +0000 mips: fix r3k_cache_init build regression My earlier patch removed __weak function declarations that used to be turned into wild branches by the linker, instead causing a link failure when the called functions are unavailable: mips-linux-ld: arch/mips/mm/cache.o: in function `cpu_cache_init': cache.c:(.text+0x670): undefined reference to `r3k_cache_init' The __weak method seems suboptimal, so rather than putting that back, make the function calls conditional on the Kconfig symbol that controls the compilation. [akpm@linux-foundation.org: fix whitespace while we're in there] Link: https://lkml.kernel.org/r/20231214205506.310402-1-arnd@kernel.org Fixes: 66445677f01e ("mips: move cache declarations into header") Signed-off-by: Arnd Bergmann Reported-by: kernelci.org bot Cc: Jiaxun Yang Cc: Thomas Bogendoerfer Cc: Zi Yan Signed-off-by: Andrew Morton commit ffda65568249f5388ed68fd15a6d96f1f496a425 Author: Borislav Petkov (AMD) Date: Mon Dec 18 14:53:39 2023 +0100 UBSAN: use the kernel panic message markers Use the same splat markers as panic does for easier matching by external tools scanning kernel dmesg for splats. Link: https://lkml.kernel.org/r/20231218135339.23209-1-bp@alien8.de Signed-off-by: Borislav Petkov (AMD) Cc: Andrey Ryabinin Signed-off-by: Andrew Morton commit 250ae189d98290d0539b4f9b8c4703e0bf24f9d3 Author: Yajun Deng Date: Sat Dec 16 11:05:03 2023 +0800 mm: page_alloc: simplify __free_pages_ok() There is redundant code in __free_pages_ok(). Use free_one_page() simplify it. Link: https://lkml.kernel.org/r/20231216030503.2126130-1-yajun.deng@linux.dev Signed-off-by: Yajun Deng Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 7e552dcd803f4ff60165271c573ab2e38d15769f Author: Peng Zhang Date: Fri Dec 15 15:46:32 2023 +0800 maple_tree: avoid checking other gaps after getting the largest gap The last range stored in maple tree is typically quite large. By checking if it exceeds the sum of the remaining ranges in that node, it is possible to avoid checking all other gaps. Running the maple tree test suite in user mode almost always results in a near 100% hit rate for this optimization. Link: https://lkml.kernel.org/r/20231215074632.82045-1-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit f7ef5fe74aaf634f2fe50e0f3339a405cced5d01 Author: Fabio M. De Francesco Date: Thu Dec 14 09:10:04 2023 +0100 mm/memory: replace kmap() with kmap_local_page() kmap() has been deprecated in favor of kmap_local_page(). Therefore, replace kmap() with kmap_local_page() in mm/memory.c. There are two main problems with kmap(): (1) It comes with an overhead as the mapping space is restricted and protected by a global lock for synchronization and (2) it also requires global TLB invalidation when the kmap's pool wraps and it might block when the mapping space is fully utilized until a slot becomes available. With kmap_local_page() the mappings are per thread, CPU local, can take page-faults, and can be called from any context (including interrupts). It is faster than kmap() in kernels with HIGHMEM enabled. The tasks can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and still valid. Obviously, thread locality implies that the kernel virtual addresses returned by kmap_local_page() are only valid in the context of the callers (i.e., they cannot be handed to other threads). The use of kmap_local_page() in mm/memory.c does not break the above-mentioned assumption, so it is allowed and preferred. Link: https://lkml.kernel.org/r/20231215084417.2002370-1-fabio.maria.de.francesco@linux.intel.com Link: https://lkml.kernel.org/r/20231214081039.1919328-1-fabio.maria.de.francesco@linux.intel.com Signed-off-by: Fabio M. De Francesco Reviewed-by: Ira Weiny Signed-off-by: Andrew Morton commit 0abfa8efad8dccc3899f64dafa985a251714a709 Author: Randy Dunlap Date: Tue Dec 12 20:33:16 2023 -0800 gfp: gfp_types.h: fix typos & punctuation Correct typos/spellos and punctutation. Link: https://lkml.kernel.org/r/20231213043316.10128-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton commit e93b81a3fcb8341b95eea6b6d7bdebaf529cb2e8 Author: SeongJae Park Date: Wed Dec 13 19:03:38 2023 +0000 Docs/admin-guide/mm/damon/usage: use a list for 'state' sysfs file input commands There are eight command inputs for 'state' DAMON sysfs file, and those are verbosely explained in multiple paragraphs. It is not easy to find explanation of specific command, and getting whole picture of supported commands. Replace the paragraphs with a list. Link: https://lkml.kernel.org/r/20231213190338.54146-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 9c8c315da254e9bed0b8b8cb883dfeef75e9ca54 Author: SeongJae Park Date: Wed Dec 13 19:03:37 2023 +0000 Docs/admin-guide/mm/damon/usage: add links to sysfs files hierarchy 'Sysfs Files Hierarchy' section of DAMON usage document shows whole picture of the interface. Then sections for detailed explanation of the files follow. Due to the amount of the files, navigating between the whole picture and the section for specific files sometimes require no subtle amount of scrolling. Add links from the whole picture to the dedicated sections for making the navigation easier. Link: https://lkml.kernel.org/r/20231213190338.54146-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit c7ae9634a4fb43cc40704c8e55f665c8b1e89534 Author: SeongJae Park Date: Wed Dec 13 19:03:36 2023 +0000 Docs/admin-guide/mm/damon/usage: update context directory section label The label for context DAMON sysfs directory section is having name sysfs_contexts. The name would be better to be used for the contexts directory. Rename it to represent a single context. Link: https://lkml.kernel.org/r/20231213190338.54146-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 1f1d83ca27a3bb5c39d434074f6c335f88090bac Author: SeongJae Park Date: Wed Dec 13 19:03:35 2023 +0000 Docs/mm/damon/design: place execution model and data structures at the beginning The execution model and data structures section at the end of the design document is briefly explaining how DAMON works overall. Knowing that first may help better drawing the overall picture. It may also help better understanding following detailed sections. Move it to the beginning of the document. Link: https://lkml.kernel.org/r/20231213190338.54146-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 5e06ad5900964a293da4bca2034899772efb02d4 Author: SeongJae Park Date: Wed Dec 13 19:03:34 2023 +0000 mm/damon/core-test: test max_nr_accesses overflow caused divide-by-zero Commit 35f5d94187a6 ("mm/damon: implement a function for max nr_accesses safe calculation") has fixed an overflow bug that could cause divide-by-zero. Add a kunit test for the bug to ensure similar bugs are not introduced again. Link: https://lkml.kernel.org/r/20231213190338.54146-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit 6ad59a3838cd0a8536721e60b8e4fbe5fdeb233a Author: SeongJae Park Date: Wed Dec 13 19:03:33 2023 +0000 mm/damon: update email of SeongJae Patch series "mm/damon: misc updates for 6.8". Update comments, tests, and documents for DAMON. This patch (of 6): SeongJae is using his kernel.org account for DAMON development. Update the old email addresses on the comments of DAMON source files. Link: https://lkml.kernel.org/r/20231213190338.54146-1-sj@kernel.org Link: https://lkml.kernel.org/r/20231213190338.54146-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Jonathan Corbet Signed-off-by: Andrew Morton commit f55afd954c12ae9a0beb242e749d671555334fce Author: Kevin Hao Date: Wed Dec 13 17:09:06 2023 +0800 mm: ksm: remove unnecessary try_to_freeze() A freezable kernel thread can enter frozen state during freezing by either calling try_to_freeze() or using wait_event_freezable() and its variants. However, there is no need to use both methods simultaneously. Link: https://lkml.kernel.org/r/20231213090906.1070985-1-haokexin@gmail.com Signed-off-by: Kevin Hao Acked-by: David Hildenbrand Cc: Andrea Arcangeli Cc: "Rafael J. Wysocki" Cc: Pavel Machek Signed-off-by: Andrew Morton commit e3898efaffdb8e78639e68e997e3b8b6d0ed4ebc Author: SeongJae Park Date: Tue Dec 12 19:48:10 2023 +0000 selftests/damon: add a test for update_schemes_tried_regions hang bug Add a test for reproducing the update_schemes_tried_{regions,bytes} command-causing indefinite hang bug that fixed by commit 7d6fa31a2fd7 ("mm/damon/sysfs-schemes: add timeout for update_schemes_tried_regions"), to avoid mistakenly re-introducing the bug. Refer to the fix commit for more details of the bug. Link: https://lkml.kernel.org/r/20231212194810.54457-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit b5906f5f7359f561c5915dc146ced1bc2733401c Author: SeongJae Park Date: Tue Dec 12 19:48:09 2023 +0000 selftests/damon: add a test for update_schemes_tried_regions sysfs command Add a selftest for verifying the accuracy of DAMON's access monitoring functionality. The test starts a program of artificial access pattern, monitor the access pattern using DAMON, and check if DAMON finds expected amount of hot data region (working set size) with only acceptable error rate. Note that the acceptable error rate is set with only naive assumptions and small number of tests. Hence failures of the test may not always mean DAMON is broken. Rather than that, those could be a signal to better understand the real accuracy level of DAMON in wider environments. Based on further finding, we could optimize DAMON or adjust the expectation of the test. Link: https://lkml.kernel.org/r/20231212194810.54457-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit 3402c6ce398e33bf1733f619756dd068ca2e2aa5 Author: SeongJae Park Date: Tue Dec 12 19:48:08 2023 +0000 selftests/damon/_damon_sysfs: implement updat_schemes_tried_bytes command Implement update_schemes_tried_bytes command of DAMON sysfs interface in _damon_sysfs.py. It is not only making the update, but also read the updated value from the sysfs interface and store it in the Kdamond python objects so that the user of the module can easily get the value. Link: https://lkml.kernel.org/r/20231212194810.54457-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit f5f0e5a2bef9e46f7a674b71d7f2a4c4b7e6bc5d Author: SeongJae Park Date: Tue Dec 12 19:48:07 2023 +0000 selftests/damon/_damon_sysfs: implement kdamonds start function Extend the tests-writing-purpose DAMON sysfs control module to support the kdamonds start functionality. Link: https://lkml.kernel.org/r/20231212194810.54457-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit 306abb63a8cab566bf80860c5430b1fa316646b7 Author: SeongJae Park Date: Tue Dec 12 19:48:06 2023 +0000 selftests/damon: implement a python module for test-purpose DAMON sysfs controls Patch series "selftests/damon: add Python-written DAMON functionality tests", v2. DAMON exports most of its functionality via its sysfs interface. Hence most DAMON functionality tests could be implemented using the interface. However, because the interfaces require simple but multiple operations for many controls, writing all such tests from the scratch could be repetitive and time consuming. Implement a minimum DAMON sysfs control module, and a couple of DAMON functionality tests using the control module. The first test is for ensuring minimum accuracy of data access monitoring, and the second test is for finding if a previously found and fixed bug is introduced again. Note that the DAMON sysfs control module is only for avoiding duplicating code in tests. For convenient and general control of DAMON, users should use DAMON user-space tools that developed for the purpose, such as damo[1]. [1] https://github.com/damonitor/damo Patches Sequence ---------------- This patchset is constructed with five patches. The first three patches implement a Python-written test implementation-purpose DAMON sysfs control module. The implementation is incrementally done in the sequence of the basic data structure (first patch) first, kdamonds start command (second patch) next, and finally DAMOS tried bytes update command (third patch). Then two patches for implementing selftests using the module follows. The fourth patch implements a basic functionality test of DAMON for working set estimation accuracy. Finally, the fifth patch implements a corner case test for a previously found bug. This patch (of 5): Implement a python module for DAMON sysfs controls. The module is aimed to be useful for writing DAMON functionality tests in future. Nonetheless, this module is only representing a subset of DAMON sysfs files. Following commits will implement more DAMON sysfs controls. Link: https://lkml.kernel.org/r/20231212194810.54457-1-sj@kernel.org Link: https://lkml.kernel.org/r/20231212194810.54457-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Shuah Khan Signed-off-by: Andrew Morton commit d5f6057cf0018dc8863239fc3142b8509b9221cf Author: Randy Dunlap Date: Sat Dec 9 22:38:39 2023 -0800 maple_tree: fix typos/spellos etc Fix typos/grammar and spellos in documentation. Link: https://lkml.kernel.org/r/20231210063839.29967-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Reviewed-by: Matthew Wilcox (Oracle) Cc: Liam R. Howlett Signed-off-by: Andrew Morton commit 03d69d49da496e31246f41a017b32b68b9d2362e Author: Jiapeng Chong Date: Fri Dec 8 10:04:50 2023 +0800 maple_tree: fix warning comparing pointer to 0 Avoid pointer type value compared with 0 to make code clear. ./tools/testing/radix-tree/maple.c:34142:15-16: WARNING comparing pointer to 0. Link: https://lkml.kernel.org/r/20231208020450.7003-1-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7696 Signed-off-by: Jiapeng Chong Cc: Liam R. Howlett Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit c0f79103322c322ea9342d52c2d81528b7b56232 Author: Ryan Roberts Date: Thu Dec 7 16:12:11 2023 +0000 selftests/mm/cow: add tests for anonymous multi-size THP Add tests similar to the existing PMD-sized THP tests, but which operate on memory backed by (PTE-mapped) multi-size THP. This reuses all the existing infrastructure. If the test suite detects that multi-size THP is not supported by the kernel, the new tests are skipped. Link: https://lkml.kernel.org/r/20231207161211.2374093-11-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Reviewed-by: David Hildenbrand Tested-by: Kefeng Wang Tested-by: John Hubbard Cc: Alistair Popple Cc: Anshuman Khandual Cc: Barry Song Cc: Catalin Marinas Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yang Shi Cc: Yin Fengwei Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 12dc16b38463a671bc91dc2df10f3a014a27ff3b Author: Ryan Roberts Date: Thu Dec 7 16:12:10 2023 +0000 selftests/mm/cow: generalize do_run_with_thp() helper do_run_with_thp() prepares (PMD-sized) THP memory into different states before running tests. With the introduction of multi-size THP, we would like to reuse this logic to also test those smaller THP sizes. So let's add a thpsize parameter which tells the function what size THP it should operate on. A separate commit will utilize this change to add new tests for multi-size THP, where available. Link: https://lkml.kernel.org/r/20231207161211.2374093-10-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Reviewed-by: David Hildenbrand Tested-by: Kefeng Wang Tested-by: John Hubbard Cc: Alistair Popple Cc: Anshuman Khandual Cc: Barry Song Cc: Catalin Marinas Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yang Shi Cc: Yin Fengwei Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 9f0704eae8a4edc8dca9c8a297f798d505a4103a Author: Ryan Roberts Date: Thu Dec 7 16:12:09 2023 +0000 selftests/mm/khugepaged: enlighten for multi-size THP The `collapse_max_ptes_none` test was previously failing when a THP size less than PMD-size had enabled="always". The root cause is because the test faults in 1 page less than the threshold it set for collapsing. But when THP is enabled always, we "over allocate" and therefore the threshold is passed, and collapse unexpectedly succeeds. Solve this by enlightening khugepaged selftest. Add a command line option to pass in the desired THP size that should be used for all anonymous allocations. The harness will then explicitly configure a THP size as requested and modify the `collapse_max_ptes_none` test so that it faults in the threshold minus the number of pages in the configured THP size. If no command line option is provided, default to order 0, as per previous behaviour. I chose to use an order in the command line interface, since this makes the interface agnostic of base page size, making it easier to invoke from run_vmtests.sh. Link: https://lkml.kernel.org/r/20231207161211.2374093-9-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Tested-by: Kefeng Wang Tested-by: John Hubbard Cc: Alistair Popple Cc: Anshuman Khandual Cc: Barry Song Cc: Catalin Marinas Cc: David Hildenbrand Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yang Shi Cc: Yin Fengwei Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 4f5070a5e40db2e9dbf5fff4ec678d6fbb338d5c Author: Ryan Roberts Date: Thu Dec 7 16:12:08 2023 +0000 selftests/mm: support multi-size THP interface in thp_settings Save and restore the new per-size hugepage enabled setting, if available on the running kernel. Since the number of per-size directories is not fixed, solve this as simply as possible by catering for a maximum number in the thp_settings struct (20). Each array index is the order. The value of THP_NEVER is changed to 0 so that all of these new settings default to THP_NEVER and the user only needs to fill in the ones they want to enable. Link: https://lkml.kernel.org/r/20231207161211.2374093-8-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Tested-by: Kefeng Wang Tested-by: John Hubbard Cc: Alistair Popple Cc: Anshuman Khandual Cc: Barry Song Cc: Catalin Marinas Cc: David Hildenbrand Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yang Shi Cc: Yin Fengwei Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 00679a183ac6d2584723cfc2a2c07c8285f802dc Author: Ryan Roberts Date: Thu Dec 7 16:12:07 2023 +0000 selftests/mm: factor out thp settings management The khugepaged test has a useful framework for save/restore/pop/push of all thp settings via the sysfs interface. This will be useful to explicitly control multi-size THP settings in other tests, so let's move it out of khugepaged and into its own thp_settings.[c|h] utility. Link: https://lkml.kernel.org/r/20231207161211.2374093-7-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Tested-by: Alistair Popple Acked-by: David Hildenbrand Tested-by: Kefeng Wang Tested-by: John Hubbard Cc: Anshuman Khandual Cc: Barry Song Cc: Catalin Marinas Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yang Shi Cc: Yin Fengwei Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit b6aab3384cafba151c53d3b5f7e1f8d073aadf03 Author: Ryan Roberts Date: Thu Dec 7 16:12:06 2023 +0000 selftests/mm/kugepaged: restore thp settings at exit Previously, the saved thp settings would be restored upon a signal or at the natural end of the test suite. But there are some tests that directly call exit() upon failure. In this case, the thp settings were not being restored, which could then influence other tests. Fix this by installing an atexit() handler to do the actual restore. The signal handler can now just call exit() and the atexit handler is invoked. Link: https://lkml.kernel.org/r/20231207161211.2374093-6-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Reviewed-by: Alistair Popple Reviewed-by: David Hildenbrand Tested-by: Kefeng Wang Tested-by: John Hubbard Cc: Anshuman Khandual Cc: Barry Song Cc: Catalin Marinas Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yang Shi Cc: Yin Fengwei Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 19eaf44954df64f9bc8dec398219e15ad0811497 Author: Ryan Roberts Date: Thu Dec 7 16:12:05 2023 +0000 mm: thp: support allocation of anonymous multi-size THP Introduce the logic to allow THP to be configured (through the new sysfs interface we just added) to allocate large folios to back anonymous memory, which are larger than the base page size but smaller than PMD-size. We call this new THP extension "multi-size THP" (mTHP). mTHP continues to be PTE-mapped, but in many cases can still provide similar benefits to traditional PMD-sized THP: Page faults are significantly reduced (by a factor of e.g. 4, 8, 16, etc. depending on the configured order), but latency spikes are much less prominent because the size of each page isn't as huge as the PMD-sized variant and there is less memory to clear in each page fault. The number of per-page operations (e.g. ref counting, rmap management, lru list management) are also significantly reduced since those ops now become per-folio. Some architectures also employ TLB compression mechanisms to squeeze more entries in when a set of PTEs are virtually and physically contiguous and approporiately aligned. In this case, TLB misses will occur less often. The new behaviour is disabled by default, but can be enabled at runtime by writing to /sys/kernel/mm/transparent_hugepage/hugepage-XXkb/enabled (see documentation in previous commit). The long term aim is to change the default to include suitable lower orders, but there are some risks around internal fragmentation that need to be better understood first. [ryan.roberts@arm.com: resolve some multi-size THP review nits] Link: https://lkml.kernel.org/r/20231214160251.3574571-1-ryan.roberts@arm.com Link: https://lkml.kernel.org/r/20231207161211.2374093-5-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Tested-by: Kefeng Wang Tested-by: John Hubbard Acked-by: David Hildenbrand Cc: Alistair Popple Cc: Anshuman Khandual Cc: Barry Song Cc: Catalin Marinas Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yang Shi Cc: Yin Fengwei Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 3485b88390b0af9e05dc2c3f57e9936f41e159a0 Author: Ryan Roberts Date: Thu Dec 7 16:12:04 2023 +0000 mm: thp: introduce multi-size THP sysfs interface In preparation for adding support for anonymous multi-size THP, introduce new sysfs structure that will be used to control the new behaviours. A new directory is added under transparent_hugepage for each supported THP size, and contains an `enabled` file, which can be set to "inherit" (to inherit the global setting), "always", "madvise" or "never". For now, the kernel still only supports PMD-sized anonymous THP, so only 1 directory is populated. The first half of the change converts transhuge_vma_suitable() and hugepage_vma_check() so that they take a bitfield of orders for which the user wants to determine support, and the functions filter out all the orders that can't be supported, given the current sysfs configuration and the VMA dimensions. The resulting functions are renamed to thp_vma_suitable_orders() and thp_vma_allowable_orders() respectively. Convenience functions that take a single, unencoded order and return a boolean are also defined as thp_vma_suitable_order() and thp_vma_allowable_order(). The second half of the change implements the new sysfs interface. It has been done so that each supported THP size has a `struct thpsize`, which describes the relevant metadata and is itself a kobject. This is pretty minimal for now, but should make it easy to add new per-thpsize files to the interface if needed in future (e.g. per-size defrag). Rather than keep the `enabled` state directly in the struct thpsize, I've elected to directly encode it into huge_anon_orders_[always|madvise|inherit] bitfields since this reduces the amount of work required in thp_vma_allowable_orders() which is called for every page fault. See Documentation/admin-guide/mm/transhuge.rst, as modified by this commit, for details of how the new sysfs interface works. [ryan.roberts@arm.com: fix build warning when CONFIG_SYSFS is disabled] Link: https://lkml.kernel.org/r/20231211125320.3997543-1-ryan.roberts@arm.com Link: https://lkml.kernel.org/r/20231207161211.2374093-4-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Reviewed-by: Barry Song Tested-by: Kefeng Wang Tested-by: John Hubbard Acked-by: David Hildenbrand Cc: Alistair Popple Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yang Shi Cc: Yin Fengwei Cc: Yu Zhao Cc: Zi Yan Signed-off-by: Andrew Morton commit 372cbd4d5a0665bf7e181c72f5e40e1bf59b0b08 Author: Ryan Roberts Date: Thu Dec 7 16:12:03 2023 +0000 mm: non-pmd-mappable, large folios for folio_add_new_anon_rmap() In preparation for supporting anonymous multi-size THP, improve folio_add_new_anon_rmap() to allow a non-pmd-mappable, large folio to be passed to it. In this case, all contained pages are accounted using the order-0 folio (or base page) scheme. Link: https://lkml.kernel.org/r/20231207161211.2374093-3-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Reviewed-by: Yu Zhao Reviewed-by: Yin Fengwei Reviewed-by: David Hildenbrand Reviewed-by: Barry Song Tested-by: Kefeng Wang Tested-by: John Hubbard Cc: Alistair Popple Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit 7dc7c5ef6463111991002f24c0aea08afe86f2cc Author: Ryan Roberts Date: Thu Dec 7 16:12:02 2023 +0000 mm: allow deferred splitting of arbitrary anon large folios Patch series "Multi-size THP for anonymous memory", v9. A series to implement multi-size THP (mTHP) for anonymous memory (previously called "small-sized THP" and "large anonymous folios"). The objective of this is to improve performance by allocating larger chunks of memory during anonymous page faults: 1) Since SW (the kernel) is dealing with larger chunks of memory than base pages, there are efficiency savings to be had; fewer page faults, batched PTE and RMAP manipulation, reduced lru list, etc. In short, we reduce kernel overhead. This should benefit all architectures. 2) Since we are now mapping physically contiguous chunks of memory, we can take advantage of HW TLB compression techniques. A reduction in TLB pressure speeds up kernel and user space. arm64 systems have 2 mechanisms to coalesce TLB entries; "the contiguous bit" (architectural) and HPA (uarch). This version incorporates David's feedback on the core patches (#3, #4) and adds some RB and TB tags (see change log for details). By default, the existing behaviour (and performance) is maintained. The user must explicitly enable multi-size THP to see the performance benefit. This is done via a new sysfs interface (as recommended by David Hildenbrand - thanks to David for the suggestion)! This interface is inspired by the existing per-hugepage-size sysfs interface used by hugetlb, provides full backwards compatibility with the existing PMD-size THP interface, and provides a base for future extensibility. See [9] for detailed discussion of the interface. This series is based on mm-unstable (715b67adf4c8). Prerequisites ============= I'm removing this section on the basis that I don't believe what we were previously calling prerequisites are really prerequisites anymore. We originally defined them when mTHP was a compile-time feature. There is now a runtime control to opt-in to mTHP; when disabled, correctness and performance are as before. When enabled, the code is still correct/robust, but in the absence of the one remaining item (compaction) there may be a performance impact in some corners. See the old list in the v8 cover letter at [8]. And a longer explanation of my thinking here [10]. SUMMARY: I don't think we should hold this series up, waiting for the items on the prerequisites list. I believe this series should be ready now so hopefully can be added to mm-unstable for some testing, then fingers crossed for v6.8. Testing ======= The series includes patches for mm selftests to enlighten the cow and khugepaged tests to explicitly test with multi-size THP, in the same way that PMD-sized THP is tested. The new tests all pass, and no regressions are observed in the mm selftest suite. I've also run my usual kernel compilation and java script benchmarks without any issues. Refer to my performance numbers posted with v6 [6]. (These are for multi-size THP only - they do not include the arm64 contpte follow-on series). John Hubbard at Nvidia has indicated dramatic 10x performance improvements for some workloads at [11]. (Observed using v6 of this series as well as the arm64 contpte series). Kefeng Wang at Huawei has also indicated he sees improvements at [12] although there are some latency regressions also. I've also checked that there is no regression in the write fault path when mTHP is disabled using a microbenchmark. I ran it for a baseline kernel, as well as v8 and v9. I repeated on Ampere Altra (bare metal) and Apple M2 (VM): | | m2 vm | altra | |--------------|---------------------|---------------------| | kernel | mean | std_rel | mean | std_rel | |--------------|----------|----------|----------|----------| | baseline | 0.000% | 0.341% | 0.000% | 3.581% | | anonfolio-v8 | 0.005% | 0.272% | 5.068% | 1.128% | | anonfolio-v9 | -0.013% | 0.442% | 0.107% | 1.788% | There is no measurable difference on M2, but altra has a slow down in v8 which is fixed in v9 by moving the THP order check to be inline within thp_vma_allowable_orders(), as suggested by David. This patch (of 10): In preparation for the introduction of anonymous multi-size THP, we would like to be able to split them when they have unmapped subpages, in order to free those unused pages under memory pressure. So remove the artificial requirement that the large folio needed to be at least PMD-sized. Link: https://lkml.kernel.org/r/20231207161211.2374093-1-ryan.roberts@arm.com Link: https://lkml.kernel.org/r/20231207161211.2374093-2-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Reviewed-by: Yu Zhao Reviewed-by: Yin Fengwei Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Reviewed-by: Barry Song Tested-by: Kefeng Wang Tested-by: John Hubbard Cc: Alistair Popple Cc: Anshuman Khandual Cc: Catalin Marinas Cc: David Rientjes Cc: "Huang, Ying" Cc: Hugh Dickins Cc: Itaru Kitayama Cc: Kirill A. Shutemov Cc: Luis Chamberlain Cc: Vlastimil Babka Cc: Yang Shi Cc: Zi Yan Signed-off-by: Andrew Morton commit 7d7ef0a4686abe43cd76a141b340a348f45ecdf2 Author: Yosry Ahmed Date: Wed Nov 29 03:21:53 2023 +0000 mm: memcg: restore subtree stats flushing Stats flushing for memcg currently follows the following rules: - Always flush the entire memcg hierarchy (i.e. flush the root). - Only one flusher is allowed at a time. If someone else tries to flush concurrently, they skip and return immediately. - A periodic flusher flushes all the stats every 2 seconds. The reason this approach is followed is because all flushes are serialized by a global rstat spinlock. On the memcg side, flushing is invoked from userspace reads as well as in-kernel flushers (e.g. reclaim, refault, etc). This approach aims to avoid serializing all flushers on the global lock, which can cause a significant performance hit under high concurrency. This approach has the following problems: - Occasionally a userspace read of the stats of a non-root cgroup will be too expensive as it has to flush the entire hierarchy [1]. - Sometimes the stats accuracy are compromised if there is an ongoing flush, and we skip and return before the subtree of interest is actually flushed, yielding stale stats (by up to 2s due to periodic flushing). This is more visible when reading stats from userspace, but can also affect in-kernel flushers. The latter problem is particulary a concern when userspace reads stats after an event occurs, but gets stats from before the event. Examples: - When memory usage / pressure spikes, a userspace OOM handler may look at the stats of different memcgs to select a victim based on various heuristics (e.g. how much private memory will be freed by killing this). Reading stale stats from before the usage spike in this case may cause a wrongful OOM kill. - A proactive reclaimer may read the stats after writing to memory.reclaim to measure the success of the reclaim operation. Stale stats from before reclaim may give a false negative. - Reading the stats of a parent and a child memcg may be inconsistent (child larger than parent), if the flush doesn't happen when the parent is read, but happens when the child is read. As for in-kernel flushers, they will occasionally get stale stats. No regressions are currently known from this, but if there are regressions, they would be very difficult to debug and link to the source of the problem. This patch aims to fix these problems by restoring subtree flushing, and removing the unified/coalesced flushing logic that skips flushing if there is an ongoing flush. This change would introduce a significant regression with global stats flushing thresholds. With per-memcg stats flushing thresholds, this seems to perform really well. The thresholds protect the underlying lock from unnecessary contention. This patch was tested in two ways to ensure the latency of flushing is up to par, on a machine with 384 cpus: - A synthetic test with 5000 concurrent workers in 500 cgroups doing allocations and reclaim, as well as 1000 readers for memory.stat (variation of [2]). No regressions were noticed in the total runtime. Note that significant regressions in this test are observed with global stats thresholds, but not with per-memcg thresholds. - A synthetic stress test for concurrently reading memcg stats while memory allocation/freeing workers are running in the background, provided by Wei Xu [3]. With 250k threads reading the stats every 100ms in 50k cgroups, 99.9% of reads take <= 50us. Less than 0.01% of reads take more than 1ms, and no reads take more than 100ms. [1] https://lore.kernel.org/lkml/CABWYdi0c6__rh-K7dcM_pkf9BJdTRtAU08M43KO9ME4-dsgfoQ@mail.gmail.com/ [2] https://lore.kernel.org/lkml/CAJD7tka13M-zVZTyQJYL1iUAYvuQ1fcHbCjcOBZcz6POYTV-4g@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CAAPL-u9D2b=iF5Lf_cRnKxUfkiEe0AMDTu6yhrUAzX0b6a6rDg@mail.gmail.com/ [akpm@linux-foundation.org: fix mm/zswap.c] [yosryahmed@google.com: remove stats flushing mutex] Link: https://lkml.kernel.org/r/CAJD7tkZgP3m-VVPn+fF_YuvXeQYK=tZZjJHj=dzD=CcSSpp2qg@mail.gmail.com Link: https://lkml.kernel.org/r/20231129032154.3710765-6-yosryahmed@google.com Signed-off-by: Yosry Ahmed Tested-by: Domenico Cerasuolo Acked-by: Shakeel Butt Cc: Chris Li Cc: Greg Thelen Cc: Ivan Babrou Cc: Johannes Weiner Cc: Michal Hocko Cc: Michal Koutny Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Waiman Long Cc: Wei Xu Signed-off-by: Andrew Morton commit b006847222623ac3cda8589d15379eac86a2bcb7 Author: Yosry Ahmed Date: Wed Nov 29 03:21:52 2023 +0000 mm: workingset: move the stats flush into workingset_test_recent() The workingset code flushes the stats in workingset_refault() to get accurate stats of the eviction memcg. In preparation for more scoped flushed and passing the eviction memcg to the flush call, move the call to workingset_test_recent() where we have a pointer to the eviction memcg. The flush call is sleepable, and cannot be made in an rcu read section. Hence, minimize the rcu read section by also moving it into workingset_test_recent(). Furthermore, instead of holding the rcu read lock throughout workingset_test_recent(), only hold it briefly to get a ref on the eviction memcg. This allows us to make the flush call after we get the eviction memcg. As for workingset_refault(), nothing else there appears to be protected by rcu. The memcg of the faulted folio (which is not necessarily the same as the eviction memcg) is protected by the folio lock, which is held from all callsites. Add a VM_BUG_ON() to make sure this doesn't change from under us. No functional change intended. Link: https://lkml.kernel.org/r/20231129032154.3710765-5-yosryahmed@google.com Signed-off-by: Yosry Ahmed Tested-by: Domenico Cerasuolo Acked-by: Shakeel Butt Cc: Chris Li Cc: Greg Thelen Cc: Ivan Babrou Cc: Johannes Weiner Cc: Michal Hocko Cc: Michal Koutny Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Waiman Long Cc: Wei Xu Signed-off-by: Andrew Morton commit 8d59d2214c2362e7a9d185d80b613e632581af7b Author: Yosry Ahmed Date: Wed Nov 29 03:21:51 2023 +0000 mm: memcg: make stats flushing threshold per-memcg A global counter for the magnitude of memcg stats update is maintained on the memcg side to avoid invoking rstat flushes when the pending updates are not significant. This avoids unnecessary flushes, which are not very cheap even if there isn't a lot of stats to flush. It also avoids unnecessary lock contention on the underlying global rstat lock. Make this threshold per-memcg. The scheme is followed where percpu (now also per-memcg) counters are incremented in the update path, and only propagated to per-memcg atomics when they exceed a certain threshold. This provides two benefits: (a) On large machines with a lot of memcgs, the global threshold can be reached relatively fast, so guarding the underlying lock becomes less effective. Making the threshold per-memcg avoids this. (b) Having a global threshold makes it hard to do subtree flushes, as we cannot reset the global counter except for a full flush. Per-memcg counters removes this as a blocker from doing subtree flushes, which helps avoid unnecessary work when the stats of a small subtree are needed. Nothing is free, of course. This comes at a cost: (a) A new per-cpu counter per memcg, consuming NR_CPUS * NR_MEMCGS * 4 bytes. The extra memory usage is insigificant. (b) More work on the update side, although in the common case it will only be percpu counter updates. The amount of work scales with the number of ancestors (i.e. tree depth). This is not a new concept, adding a cgroup to the rstat tree involves a parent loop, so is charging. Testing results below show no significant regressions. (c) The error margin in the stats for the system as a whole increases from NR_CPUS * MEMCG_CHARGE_BATCH to NR_CPUS * MEMCG_CHARGE_BATCH * NR_MEMCGS. This is probably fine because we have a similar per-memcg error in charges coming from percpu stocks, and we have a periodic flusher that makes sure we always flush all the stats every 2s anyway. This patch was tested to make sure no significant regressions are introduced on the update path as follows. The following benchmarks were ran in a cgroup that is 2 levels deep (/sys/fs/cgroup/a/b/): (1) Running 22 instances of netperf on a 44 cpu machine with hyperthreading disabled. All instances are run in a level 2 cgroup, as well as netserver: # netserver -6 # netperf -6 -H ::1 -l 60 -t TCP_SENDFILE -- -m 10K Averaging 20 runs, the numbers are as follows: Base: 40198.0 mbps Patched: 38629.7 mbps (-3.9%) The regression is minimal, especially for 22 instances in the same cgroup sharing all ancestors (so updating the same atomics). (2) will-it-scale page_fault tests. These tests (specifically per_process_ops in page_fault3 test) detected a 25.9% regression before for a change in the stats update path [1]. These are the numbers from 10 runs (+ is good) on a machine with 256 cpus: LABEL | MEAN | MEDIAN | STDDEV | ------------------------------+-------------+-------------+------------- page_fault1_per_process_ops | | | | (A) base | 270249.164 | 265437.000 | 13451.836 | (B) patched | 261368.709 | 255725.000 | 13394.767 | | -3.29% | -3.66% | | page_fault1_per_thread_ops | | | | (A) base | 242111.345 | 239737.000 | 10026.031 | (B) patched | 237057.109 | 235305.000 | 9769.687 | | -2.09% | -1.85% | | page_fault1_scalability | | | (A) base | 0.034387 | 0.035168 | 0.0018283 | (B) patched | 0.033988 | 0.034573 | 0.0018056 | | -1.16% | -1.69% | | page_fault2_per_process_ops | | | (A) base | 203561.836 | 203301.000 | 2550.764 | (B) patched | 197195.945 | 197746.000 | 2264.263 | | -3.13% | -2.73% | | page_fault2_per_thread_ops | | | (A) base | 171046.473 | 170776.000 | 1509.679 | (B) patched | 166626.327 | 166406.000 | 768.753 | | -2.58% | -2.56% | | page_fault2_scalability | | | (A) base | 0.054026 | 0.053821 | 0.00062121 | (B) patched | 0.053329 | 0.05306 | 0.00048394 | | -1.29% | -1.41% | | page_fault3_per_process_ops | | | (A) base | 1295807.782 | 1297550.000 | 5907.585 | (B) patched | 1275579.873 | 1273359.000 | 8759.160 | | -1.56% | -1.86% | | page_fault3_per_thread_ops | | | (A) base | 391234.164 | 390860.000 | 1760.720 | (B) patched | 377231.273 | 376369.000 | 1874.971 | | -3.58% | -3.71% | | page_fault3_scalability | | | (A) base | 0.60369 | 0.60072 | 0.0083029 | (B) patched | 0.61733 | 0.61544 | 0.009855 | | +2.26% | +2.45% | | All regressions seem to be minimal, and within the normal variance for the benchmark. The fix for [1] assumes that 3% is noise -- and there were no further practical complaints), so hopefully this means that such variations in these microbenchmarks do not reflect on practical workloads. (3) I also ran stress-ng in a nested cgroup and did not observe any obvious regressions. [1]https://lore.kernel.org/all/20190520063534.GB19312@shao2-debian/ Link: https://lkml.kernel.org/r/20231129032154.3710765-4-yosryahmed@google.com Signed-off-by: Yosry Ahmed Suggested-by: Johannes Weiner Tested-by: Domenico Cerasuolo Acked-by: Shakeel Butt Cc: Chris Li Cc: Greg Thelen Cc: Ivan Babrou Cc: Michal Hocko Cc: Michal Koutny Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Waiman Long Cc: Wei Xu Signed-off-by: Andrew Morton commit e0bf1dc859fdd08ef738824710770a30a8069433 Author: Yosry Ahmed Date: Wed Nov 29 03:21:50 2023 +0000 mm: memcg: move vmstats structs definition above flushing code The following patch will make use of those structs in the flushing code, so move their definitions (and a few other dependencies) a little bit up to reduce the diff noise in the following patch. No functional change intended. Link: https://lkml.kernel.org/r/20231129032154.3710765-3-yosryahmed@google.com Signed-off-by: Yosry Ahmed Tested-by: Domenico Cerasuolo Acked-by: Shakeel Butt Cc: Chris Li Cc: Greg Thelen Cc: Ivan Babrou Cc: Johannes Weiner Cc: Michal Hocko Cc: Michal Koutny Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Waiman Long Cc: Wei Xu Signed-off-by: Andrew Morton commit 508bed884767a8eb394640bae9edcdf082816c43 Author: Yosry Ahmed Date: Wed Nov 29 03:21:49 2023 +0000 mm: memcg: change flush_next_time to flush_last_time Patch series "mm: memcg: subtree stats flushing and thresholds", v4. This series attempts to address shortages in today's approach for memcg stats flushing, namely occasionally stale or expensive stat reads. The series does so by changing the threshold that we use to decide whether to trigger a flush to be per memcg instead of global (patch 3), and then changing flushing to be per memcg (i.e. subtree flushes) instead of global (patch 5). This patch (of 5): flush_next_time is an inaccurate name. It's not the next time that periodic flushing will happen, it's rather the next time that ratelimited flushing can happen if the periodic flusher is late. Simplify its semantics by just storing the timestamp of the last flush instead, flush_last_time. Move the 2*FLUSH_TIME addition to mem_cgroup_flush_stats_ratelimited(), and add a comment explaining it. This way, all the ratelimiting semantics live in one place. No functional change intended. Link: https://lkml.kernel.org/r/20231129032154.3710765-1-yosryahmed@google.com Link: https://lkml.kernel.org/r/20231129032154.3710765-2-yosryahmed@google.com Signed-off-by: Yosry Ahmed Tested-by: Domenico Cerasuolo Acked-by: Shakeel Butt Acked-by: Chris Li (Google) Tested-by: Bagas Sanjaya Cc: Greg Thelen Cc: Ivan Babrou Cc: Johannes Weiner Cc: Michal Hocko Cc: Michal Koutny Cc: Muchun Song Cc: Roman Gushchin Cc: Tejun Heo Cc: Waiman Long Cc: Wei Xu Signed-off-by: Andrew Morton commit 4a3bfbd1699e2306731809d50d480634012ed4de Author: Andrew Morton Date: Thu Dec 14 07:32:58 2023 -0800 mm/list_lru.c: remove unused list_lru_from_kmem() Fixes: 0a97c01cd20bb ("list_lru: allow explicit memcg and NUMA node selection) Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312141318.q8b5yrAq-lkp@intel.com/ Cc: Nhat Pham Cc: Johannes Weiner Cc: Johannes Weiner Cc: Bagas Sanjaya Signed-off-by: Andrew Morton commit 5143eecd2af2b5424f7b96d53f17bb4718e46bd3 Author: Andrew Morton Date: Wed Dec 13 12:59:49 2023 -0800 lib/maple_tree.c: fix build error due to hotfix alteration Commit 0de56e38b307 ("maple_tree: use maple state end for write operations") was broken by a later patch "maple_tree: do not preallocate nodes for slot stores". But the later patch was scheduled ahead of 0de56e38b307, for 6.7-rc. This fixlet undoes the damage. Fixes: 0de56e38b307 ("maple_tree: use maple state end for write operations") Cc: Liam R. Howlett Cc: Sidhartha Kumar Signed-off-by: Andrew Morton commit a721aeac8bc2cade37e68ea195f28d2ed28c1130 Merge: d9d9bd979cced 1803d0c5ee1a3 Author: Andrew Morton Date: Wed Dec 20 14:47:18 2023 -0800 sync mm-stable with mm-hotfixes-stable to pick up depended-upon changes commit 2596e51ad3e26236657b63e5b37405454a858c35 Author: Kent Overstreet Date: Wed Dec 20 16:39:21 2023 -0500 m68k: Fix missing include Signed-off-by: Kent Overstreet commit a5a0abfdb319713261f43a7fac0a1c3eb0e9d8ea Author: Kent Overstreet Date: Fri Dec 15 20:22:08 2023 -0500 x86: fix missing includes/forward declarations Signed-off-by: Kent Overstreet commit 5beebc1dda47719dac85830c53bca1a0ab497d96 Author: Alexander Aring Date: Wed Dec 20 14:38:59 2023 -0500 dlm: update format header reflect current format Over the time the dlm debugfs format string has been changed but the header wasn't updated. This patch changes the first line dump header and their meaning to reflect the current formats. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 367e753d5c54a414d82610eb709fe71fda6cf1c3 Author: Alexander Aring Date: Wed Dec 20 14:38:58 2023 -0500 dlm: fix format seq ops type 4 This patch fixes to set the type 4 format ops in case of table_open4(). It got accidentially changed by commit 541adb0d4d10 ("fs: dlm: debugfs for queued callbacks") and since them toss debug dumps the same format as format 5 that are the queued ast callbacks for lkbs. Fixes: 541adb0d4d10 ("fs: dlm: debugfs for queued callbacks") Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 92999245102a09ab2645424a9c9a0a5b16fda833 Merge: 32f24938a1fce 69ff403d87be4 Author: Alexei Starovoitov Date: Wed Dec 20 13:25:47 2023 -0800 Merge branch 'bpf-fix-warning-in-check_obj_size' Hou Tao says: ==================== bpf: Fix warning in check_obj_size() From: Hou Tao Hi, The patch set aims to fix the warning in check_obj_size() as reported by lkp [1]. Patch #1 fixes the warning by selecting target cache for free request through c->unit_size, so the unnecessary adjustment of size_index and the checking in check_obj_size() can be removed. Patch #2 fixes the test failure in test_bpf_ma after applying patch #1. Please see individual patches for more details. And comments are always welcome. [1]: https://lore.kernel.org/bpf/202310302113.9f8fe705-oliver.sang@intel.com/ ==================== Link: https://lore.kernel.org/r/20231216131052.27621-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 69ff403d87be4812571c54b1159e24998414bcab Author: Hou Tao Date: Sat Dec 16 21:10:52 2023 +0800 selftests/bpf: Remove tests for zeroed-array kptr bpf_mem_alloc() doesn't support zero-sized allocation, so removing these tests from test_bpf_ma test. After the removal, there will no definition for bin_data_8, so remove 8 from data_sizes array and adjust the index of data_btf_ids array in all test cases accordingly. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231216131052.27621-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 7ac5c53e00735d183a0f5e2cfce5eeb6c16319f2 Author: Hou Tao Date: Sat Dec 16 21:10:51 2023 +0800 bpf: Use c->unit_size to select target cache during free At present, bpf memory allocator uses check_obj_size() to ensure that ksize() of allocated pointer is equal with the unit_size of used bpf_mem_cache. Its purpose is to prevent bpf_mem_free() from selecting a bpf_mem_cache which has different unit_size compared with the bpf_mem_cache used for allocation. But as reported by lkp, the return value of ksize() or kmalloc_size_roundup() may change due to slab merge and it will lead to the warning report in check_obj_size(). The reported warning happened as follows: (1) in bpf_mem_cache_adjust_size(), kmalloc_size_roundup(96) returns the object_size of kmalloc-96 instead of kmalloc-cg-96. The object_size of kmalloc-96 is 96, so size_index for 96 is not adjusted accordingly. (2) the object_size of kmalloc-cg-96 is adjust from 96 to 128 due to slab merge in __kmem_cache_alias(). For SLAB, SLAB_HWCACHE_ALIGN is enabled by default for kmalloc slab, so align is 64 and size is 128 for kmalloc-cg-96. SLUB has a similar merge logic, but its object_size will not be changed, because its align is 8 under x86-64. (3) when unit_alloc() does kmalloc_node(96, __GFP_ACCOUNT, node), ksize() returns 128 instead of 96 for the returned pointer. (4) the warning in check_obj_size() is triggered. Considering the slab merge can happen in anytime (e.g, a slab created in a new module), the following case is also possible: during the initialization of bpf_global_ma, there is no slab merge and ksize() for a 96-bytes object returns 96. But after that a new slab created by a kernel module is merged to kmalloc-cg-96 and the object_size of kmalloc-cg-96 is adjust from 96 to 128 (which is possible for x86-64 + CONFIG_SLAB, because its alignment requirement is 64 for 96-bytes slab). So soon or later, when bpf_global_ma frees a 96-byte-sized pointer which is allocated from bpf_mem_cache with unit_size=96, bpf_mem_free() will free the pointer through a bpf_mem_cache in which unit_size is 128, because the return value of ksize() changes. The warning for the mismatch will be triggered again. A feasible fix is introducing similar APIs compared with ksize() and kmalloc_size_roundup() to return the actually-allocated size instead of size which may change due to slab merge, but it will introduce unnecessary dependency on the implementation details of mm subsystem. As for now the pointer of bpf_mem_cache is saved in the 8-bytes area (or 4-bytes under 32-bit host) above the returned pointer, using unit_size in the saved bpf_mem_cache to select the target cache instead of inferring the size from the pointer itself. Beside no extra dependency on mm subsystem, the performance for bpf_mem_free_rcu() is also improved as shown below. Before applying the patch, the performances of bpf_mem_alloc() and bpf_mem_free_rcu() on 8-CPUs VM with one producer are as follows: kmalloc : alloc 11.69 ± 0.28M/s free 29.58 ± 0.93M/s percpu : alloc 14.11 ± 0.52M/s free 14.29 ± 0.99M/s After apply the patch, the performance for bpf_mem_free_rcu() increases 9% and 146% for kmalloc memory and per-cpu memory respectively: kmalloc: alloc 11.01 ± 0.03M/s free 32.42 ± 0.48M/s percpu: alloc 12.84 ± 0.12M/s free 35.24 ± 0.23M/s After the fixes, there is no need to adjust size_index to fix the mismatch between allocation and free, so remove it as well. Also return NULL instead of ZERO_SIZE_PTR for zero-sized alloc in bpf_mem_alloc(), because there is no bpf_mem_cache pointer saved above ZERO_SIZE_PTR. Fixes: 9077fc228f09 ("bpf: Use kmalloc_size_roundup() to adjust size_index") Reported-by: kernel test robot Closes: https://lore.kernel.org/bpf/202310302113.9f8fe705-oliver.sang@intel.com Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231216131052.27621-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 257ca14f4d780e27a0605fd68053d2cc3178a232 Author: Colin Ian King Date: Tue Dec 19 14:13:04 2023 +0000 x86/boot: Remove redundant initialization of the 'delta' variable in strcmp() The 'delta' variable is zero-initialized, but never read before the real initialization happens. The assignment is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20231219141304.367200-1-colin.i.king@gmail.com commit ff7a85af5a5bdda04756a8cdbdc0dd9a7a8ea468 Author: Matthew Wilcox (Oracle) Date: Wed Dec 6 19:58:06 2023 +0000 gfs2: Remove use of error flag in journal reads Conventionally, we use the uptodate bit to signal whether a read encountered an error or not. Use folio_end_read() to set the uptodate bit on success. Also use filemap_set_wb_err() to communicate the errno instead of the more heavy-weight mapping_set_error(). Signed-off-by: "Matthew Wilcox (Oracle)" Signed-off-by: Andreas Gruenbacher commit e0f1f021782d6a2e719a451218554a8198c77120 Author: Andreas Gruenbacher Date: Wed Dec 20 18:09:22 2023 +0100 gfs2: Lift withdraw check out of gfs2_ail1_empty Lift the check for the SDF_WITHDRAWING flag out of gfs2_ail1_empty() and into its callers. This is needed so that gfs2_flush_revokes() can drop the sd_log_lock spinlock before triggering a withdraw if necessary. Instead of checking for the SDF_WITHDRAWING flag, use gfs2_withdrawing(). Also, the low-level code triggering the delayed withdraw reports when there is a problem, so there is no need to report that again. Signed-off-by: Andreas Gruenbacher commit 4d927b03a68846e4e791ccde6b4c274df02f11e9 Author: Andreas Gruenbacher Date: Wed Dec 20 17:16:29 2023 +0100 gfs2: Rename gfs2_withdrawn to gfs2_withdrawing_or_withdrawn This function checks whether the filesystem has been been marked to be withdrawn eventually or has been withdrawn already. Rename this function to avoid confusing code like checking for gfs2_withdrawing() when gfs2_withdrawn() has already returned true. Signed-off-by: Andreas Gruenbacher commit 015af1af44003fff797f8632e940824c07d282bf Author: Andreas Gruenbacher Date: Wed Dec 20 17:05:26 2023 +0100 gfs2: Mark withdraws as unlikely Mark the gfs2_withdrawn(), gfs2_withdrawing(), and gfs2_withdraw_in_prog() inline functions as likely to return %false. This allows to get rid of likely() and unlikely() annotations at the call sites of those functions. Signed-off-by: Andreas Gruenbacher commit 4710642807ac46942b08e9bcc39ae6fd91e947fa Author: Andreas Gruenbacher Date: Wed Dec 20 16:38:21 2023 +0100 gfs2: Minor gfs2_ail1_empty cleanup Change gfs2_ail1_empty() to return %true when the ail1 list is empty. Based on that, make the loop in empty_ail1_list() more obvious. Signed-off-by: Andreas Gruenbacher commit 5e3b5f31fc2c434d97f10f1facc3f08355adefee Merge: b85ea95d08647 5583e92be5c45 Author: Stephen Boyd Date: Wed Dec 20 11:54:42 2023 -0800 Merge tag 'samsung-clk-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into clk-samsung Pull Samsung SoC clk driver changes from Krzysztof Kozlowski: Few kernel-doc fixes for Samsung SoC clock controllers. * tag 'samsung-clk-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: clk: samsung: Improve kernel-doc comments clk: samsung: Fix kernel-doc comments commit e015eb628c450ad54105717848e898c0a1524ea3 Merge: 4a6b93f562966 edf9556472694 Author: Palmer Dabbelt Date: Wed Dec 20 10:48:17 2023 -0800 Merge patch series "riscv: Use READ_ONCE()/WRITE_ONCE() for pte accesses" Alexandre Ghiti says: This series is a follow-up for riscv of a recent series from Ryan [1] which converts all direct dereferences of pte_t into a ptet_get() access. The goal here for riscv is to use READ_ONCE()/WRITE_ONCE() for all page table entries accesses to avoid any compiler transformation when the hardware can concurrently modify the page tables entries (A/D bits for example). I went a bit further and added pud/p4d/pgd_get() helpers as such concurrent modifications can happen too at those levels. [1] https://lore.kernel.org/all/20230612151545.3317766-1-ryan.roberts@arm.com/ * b4-shazam-merge: riscv: Use accessors to page table entries instead of direct dereference riscv: mm: Only compile pgtable.c if MMU mm: Introduce pudp/p4dp/pgdp_get() functions riscv: Use WRITE_ONCE() when setting page table entries Link: https://lore.kernel.org/r/20231213203001.179237-1-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit edf955647269422e387732870d04fc15933a25ea Author: Alexandre Ghiti Date: Wed Dec 13 21:30:01 2023 +0100 riscv: Use accessors to page table entries instead of direct dereference As very well explained in commit 20a004e7b017 ("arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables"), an architecture whose page table walker can modify the PTE in parallel must use READ_ONCE()/WRITE_ONCE() macro to avoid any compiler transformation. So apply that to riscv which is such architecture. Signed-off-by: Alexandre Ghiti Acked-by: Anup Patel Link: https://lore.kernel.org/r/20231213203001.179237-5-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit d6508999d1882ddd0db8b3b4bd7967d83e9909fa Author: Alexandre Ghiti Date: Wed Dec 13 21:30:00 2023 +0100 riscv: mm: Only compile pgtable.c if MMU All functions defined in there depend on MMU, so no need to compile it for !MMU configs. Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20231213203001.179237-4-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit eba2591d99d1f14a04c8a8a845ab0795b93f5646 Author: Alexandre Ghiti Date: Wed Dec 13 21:29:59 2023 +0100 mm: Introduce pudp/p4dp/pgdp_get() functions Instead of directly dereferencing page tables entries, which can cause issues (see commit 20a004e7b017 ("arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables"), let's introduce new functions to get the pud/p4d/pgd entries (the pte and pmd versions already exist). Note that arm pgd_t is actually an array so pgdp_get() is defined as a macro to avoid a build error. Those new functions will be used in subsequent commits by the riscv architecture. Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20231213203001.179237-3-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit c30fa83b49897e708a52e122dd10616a52a4c82b Author: Alexandre Ghiti Date: Wed Dec 13 21:29:58 2023 +0100 riscv: Use WRITE_ONCE() when setting page table entries To avoid any compiler "weirdness" when accessing page table entries which are concurrently modified by the HW, let's use WRITE_ONCE() macro (commit 20a004e7b017 ("arm64: mm: Use READ_ONCE/WRITE_ONCE when accessing page tables") gives a great explanation with more details). Signed-off-by: Alexandre Ghiti Link: https://lore.kernel.org/r/20231213203001.179237-2-alexghiti@rivosinc.com Signed-off-by: Palmer Dabbelt commit 28a197af3fcbb47195d94cd6e612d9338aac9345 Author: Ching-Te Ku Date: Mon Dec 18 14:13:41 2023 +0800 wifi: rtw89: coex: To improve Wi-Fi performance while BT is idle Because some platform Bluetooth will have many background scan when idle. And the frequently Bluetooth scan will break Wi-Fi traffic many times at a short duration, it will make Wi-Fi throughput become lower. This patch will shorter Bluetooth slot and adjust priority settings, make Wi-Fi can have a more completed duration to do traffic. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-12-pkshih@realtek.com commit c744f523cecb4e7d036cd458946e7bb0e1ca5634 Author: Ching-Te Ku Date: Mon Dec 18 14:13:40 2023 +0800 wifi: rtw89: coex: Translate antenna configuration from ID to string More readable on the coexistence log. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-11-pkshih@realtek.com commit 6e5cf39f3107f9f21e3b4b9ee243897cd946473e Author: Ching-Te Ku Date: Mon Dec 18 14:13:39 2023 +0800 wifi: rtw89: coex: Update RF parameter control setting logic Coexistence will set the RF parameter according to Wi-Fi link mode, Wi-Fi/Bluetooth signal level, traffic direction, antenna type, and is there Bluetooth connection exist or not. Bluetooth will notify the current LNA level by scoreboard. If the setting not as expected, coexistence will try to assign the correct level. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-10-pkshih@realtek.com commit 221a72f73888f8de603e70bdda394d0fc110be2a Author: Ching-Te Ku Date: Mon Dec 18 14:13:38 2023 +0800 wifi: rtw89: coex: Add Bluetooth RSSI level information In order to control RF LNA setting, need Bluetooth RSSI level information. RSSI level separate Bluetooth RSSI to several level, so the mechanism can assign a corresponding setting. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-9-pkshih@realtek.com commit 0c1829dc7a5d0a9f7df952c543a5c86820d557c7 Author: Ching-Te Ku Date: Mon Dec 18 14:13:37 2023 +0800 wifi: rtw89: coex: Set Bluetooth scan low-priority when Wi-Fi link/scan To avoid Bluetooth reconnecting/pairing fail during Wi-Fi is link/scan, especially the Bluetooth connect event after the platform restart/boot up. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-8-pkshih@realtek.com commit 94fb737042c1c850c138eef7c661c3ea1d18ccab Author: Ching-Te Ku Date: Mon Dec 18 14:13:36 2023 +0800 wifi: rtw89: coex: Update coexistence policy for Wi-Fi LPS Including Wi-Fi RF mode to judge is Wi-Fi RF still on or off, if Wi-Fi is RF off should set scoreboard to let Bluetooth know Wi-Fi has gone. Every time the Wi-Fi radio state changed firmware should force execute refresh the TDMA coexistence mechanism to prevent incorrect mechanism runs at mismatch state. The coexistence antenna/TDMA settings should consider what the Wi-Fi mode it is now, this can help to solve some LPS transient state issue like A2DP slightly glitch. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-7-pkshih@realtek.com commit 3ac4b57ca12d5baaedd0d1a0cd532fa50911eaf0 Author: Ching-Te Ku Date: Mon Dec 18 14:13:35 2023 +0800 wifi: rtw89: coex: Still show hardware grant signal info even Wi-Fi is PS This can help to debug the grant signal and antenna path control issue during Wi-Fi power saving mode. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-6-pkshih@realtek.com commit 07912ecb3eb2a5c30d8b7d5285ef2304006377b9 Author: Ching-Te Ku Date: Mon Dec 18 14:13:34 2023 +0800 wifi: rtw89: coex: Update BTG control related logic BTG is a RF system type, it means Wi-Fi 2.4GHz and Bluetooth share RF gain and antenna. The RF gain must control by Wi-Fi or Bluetooth in single side. For example, if Bluetooth RX a very strong signal, then Bluetooth will adjust to a lower gain. And Wi-Fi will also use the same gain to do RX, then maybe the gain will not enough. This BTG control mechanism can do some refine to this situation. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-5-pkshih@realtek.com commit 21aa791b4367e9cd1473d5b81e70739ca48a2bd4 Author: Ching-Te Ku Date: Mon Dec 18 14:13:33 2023 +0800 wifi: rtw89: coex: Add Pre-AGC control to enhance Wi-Fi RX performance Pre-AGC(Auto gain control) is a hardware mechanism, it will auto adjust the RX gain for every packet, it can help to keep Wi-Fi signal on a well RX quality. The coexistence will give advice to control the API and monitor the settings by firmware report. Also add function to check register, these registers were monitoring by Wi-Fi firmware and report to coexistence driver periodically. This can help to track whether these settings were taking effect or not. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-4-pkshih@realtek.com commit e9ff8a96e3aa661d793139362b0ee852360fa36a Author: Ching-Te Ku Date: Mon Dec 18 14:13:32 2023 +0800 wifi: rtw89: coex: Record down Wi-Fi initial mode information This information will use as judgment about how to set RF/HW parameters. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-3-pkshih@realtek.com commit acc55d7dd4de525ac07e43e90ea3cc630677ec8a Author: Ching-Te Ku Date: Mon Dec 18 14:13:31 2023 +0800 wifi: rtw89: coex: Fix wrong Wi-Fi role info and FDDT parameter members The Wi-Fi firmware 29.29.X should use version 2 role info format. FDDT mechanism version 5 use the same cell members to judge traffic situation, don't need to add another new format. Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231218061341.51255-2-pkshih@realtek.com commit dadce3fbaf10250b35d540caff475ff93b259de0 Author: Randy Dunlap Date: Tue Dec 19 22:02:46 2023 -0800 PM: hibernate: Repair excess function parameter description warning Function swsusp_close() does not have any parameters, so remove the description of parameter @exclusive to prevent this warning. swap.c:1573: warning: Excess function parameter 'exclusive' description in 'swsusp_close' Signed-off-by: Randy Dunlap [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit e0f4bd26e29bf6162cdc9dc6fb7522bde7b74d07 Author: Kevin Hao Date: Wed Dec 20 08:35:35 2023 +0800 PM: sleep: Remove obsolete comment from unlock_system_sleep() With the freezer changes introduced by commit f5d39b020809 ("freezer,sched: Rewrite core freezer logic"), the comment in unlock_system_sleep() has become obsolete, there is no need to retain it. Signed-off-by: Kevin Hao Signed-off-by: Rafael J. Wysocki commit 3b201c9af7c0cad2e8311d96c0c1b399606c70fa Author: Dmitry Antipov Date: Wed Dec 20 20:58:19 2023 +0300 regmap: fix kcalloc() arguments order When compiling with gcc version 14.0.0 20231220 (experimental) and W=1, I've noticed a bunch of four similar warnings like: drivers/base/regmap/regmap-ram.c: In function '__regmap_init_ram': drivers/base/regmap/regmap-ram.c:68:37: warning: 'kcalloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 68 | data->read = kcalloc(sizeof(bool), config->max_register + 1, | ^~~~ Since 'n' and 'size' arguments of 'kcalloc()' are multiplied to calculate the final size, their actual order doesn't affect the result and so this is not a bug. But it's still worth to fix it. Signed-off-by: Dmitry Antipov Link: https://msgid.link/r/20231220175829.533700-1-dmantipov@yandex.ru Signed-off-by: Mark Brown commit 7887097c65446ff229099221975f6fc9ad9e378b Author: Ian Rogers Date: Wed Dec 6 17:16:56 2023 -0800 perf maps: Fix up overlaps during fixup_end Maps are sometimes made overlapping, in particular kernel maps. If the end of a map overlaps the start of the next, shorten the overlapping map. This should remove potential non-determinism in maps__find, ie finding maps by address. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-23-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 631bb236aa6f306fd2ba16aee9ae96083453eebc Author: Ian Rogers Date: Wed Dec 6 17:16:55 2023 -0800 perf maps: Reduce scope of map_rb_node and maps internals Avoid exposing the implementation of maps so that the internals can be refactored. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-22-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 75858007d101cf38e9a79d682d0361bb6493d7cc Author: Ian Rogers Date: Wed Dec 6 17:16:54 2023 -0800 perf maps: Add find next entry to give entry after the given map Use to remove map_rb_node use from machine.c. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-21-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e77b0236cd0cd1572c6a9b25097b207eab799e74 Author: Ian Rogers Date: Wed Dec 6 17:16:53 2023 -0800 perf maps: Add maps__load_first() Avoid bpf_lock_contention_read touching the internal maps data structure by adding a helper function. As access is done directly on the map in maps, hold the read lock to stop it being removed. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-20-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9084952704ba075de28684301ec282b6626b5e7a Author: Ian Rogers Date: Wed Dec 6 17:16:52 2023 -0800 perf maps: Rename clone to copy from Rename maps__clone() to maps__copy_from() to be more intention revealing of its behavior. Pass the underlying maps rather than the thread. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-19-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 980d7927213a57c9a31ff4ea685eb93fbe4b31ab Author: Ian Rogers Date: Wed Dec 6 17:16:51 2023 -0800 perf maps: Do simple merge if given map doesn't overlap Simplify merge in for the simple case of a non-overlapping map. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-18-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 07ef14d50cf1af1caa49cd183216a517e75e8a93 Author: Ian Rogers Date: Wed Dec 6 17:16:50 2023 -0800 perf maps: Refactor maps__fixup_overlappings() Rename to maps__fixup_overlap_and_insert() as the given mapping is always inserted. Factor out first_ending_after() as a utility function. Minor variable name changes. Switch to using debug_file() rather than passing a debug FILE*. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-17-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit ec49230cf6dda70437bf878281566dd82af9affa Author: Ian Rogers Date: Wed Dec 6 17:16:49 2023 -0800 perf debug: Expose debug file Some dumping call backs need to be passed a FILE*. Expose debug file via an accessor API for a consistent way to do this. Catch the unlikely failure of it not being set. Switch two cases where stderr was being used instead of debug_file. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-16-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8d5847a61723b4dbb3da3b356925c4928ed14de2 Author: Ian Rogers Date: Wed Dec 6 17:16:48 2023 -0800 perf maps: Add remove maps function to remove a map based on callback Removing maps wasn't being done under the write lock. Similar to maps__for_each_map(), iterate the entries but in this case remove the entry based on the result of the callback. If an entry was removed then maps_by_name() also needs updating, so add missed flush. In dso__load_kcore(), the test of map to save would always be false with REFCNT_CHECKING because of a missing RC_CHK_ACCESS/RC_CHK_EQUAL. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9cce3a161e17b5c1d50de75e85c1aeb7452d17e6 Author: Ian Rogers Date: Wed Dec 6 17:16:47 2023 -0800 perf maps: Reduce scope of maps__for_each_entry() Reduce scope of maps__for_each_entry() as maps__for_each_map() is a safer alternative holding the maps lock during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 51ab715e2bf037cd0525494b7ed496c46e4013c6 Author: Ian Rogers Date: Wed Dec 6 17:16:46 2023 -0800 perf vdso: Use function to add missing maps lock Switch machine__thread_dso_type() from loop macro maps__for_each_entry() to maps__for_each_map() function that takes a callback. The function holds the maps lock, which should be held during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 16f533ade706d33e60324ff32e526bda20bccbd9 Author: Ian Rogers Date: Wed Dec 6 17:16:45 2023 -0800 perf unwind: Use function to add missing maps lock Switch read_unwind_spec_eh_frame() from loop macro maps__for_each_entry() to maps__for_each_map() function that takes a callback. The function holds the maps lock, which should be held during iteration. Committer notes: Fixed up conflict with: 4fb54994b2360ab5 ("perf unwind-libunwind: Fix base address for .eh_frame") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: German Gomez Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Steinar H. Gunderson Cc: Wenyu Liu Cc: Yang Jihong Cc: changbin du Cc: colin ian king Cc: dmitrii dolgov <9erthalion6@gmail.com> Cc: guilherme amadio Cc: huacai chen Cc: k prateek nayak Cc: li dong Cc: liam howlett Cc: miguel ojeda Cc: ming wang Cc: sean christopherson Cc: vincent whitchurch Link: http://lore.kernel.org/lkml/20231207011722.1220634-12-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2d98dbb4c9c5b09c8d2411581ab17921f872dbd3 Author: Ruidong Tian Date: Thu Dec 14 20:33:04 2023 +0800 perf scripts python arm-cs-trace-disasm.py: Do not ignore disam first sample arm-cs-trace-disasm ignore disam the first branch sample, For example as follow, the instructions beteween 0x0000ffffae878750 and 0x0000ffffae878754 is lose: ARM CoreSight Trace Data Assembler Dump Event type: branches:uH Sample = { cpu: 0000 addr: 0x0000ffffae878750 phys_addr: 0x0000000000000000 ip: 0x0000000000000000 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 } Event type: branches:uH Sample = { cpu: 0000 addr: 0x0000000000000000 phys_addr: 0x0000000000000000 ip: 0x0000ffffae878754 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 } Initialize cpu_data earlier to fix it: ARM CoreSight Trace Data Assembler Dump Event type: branches:uH Sample = { cpu: 0000 addr: 0x0000000000000000 phys_addr: 0x0000000000000000 ip: 0x0000ffffae878754 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 } 0000000000028740 : (base address is 0x0000ffffae850000) 28750: b13ffc1f cmn x0, #4095 28754: 54000042 b.hs 0x2875c test 4003489/4003489 [0000] 26765.151766034 __GI___ioctl+0x14 /usr/lib64/libc-2.32.so Event type: branches:uH Sample = { cpu: 0000 addr: 0x0000ffffa67535ac phys_addr: 0x0000000000000000 ip: 0x0000000000000000 pid: 4003489 tid: 4003489 period: 1 time: 26765151766034 } Reviewed-by: James Clark Signed-off-by: Ruidong Tian Cc: Adrian Hunter Cc: Al Grant Cc: Alexander Shishkin Cc: Leo Yan Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki Poulouse Cc: Tor Jeremiassen Link: https://lore.kernel.org/r/20231214123304.34087-4-tianruidong@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit c344675ad267040b1794b0b5d85147a5023c548d Author: Ruidong Tian Date: Thu Dec 14 20:33:03 2023 +0800 perf scripts python arm-cs-trace-disasm.py: Set start vm addr of exectable file to 0 For exectable ELF file, which e_type is ET_EXEC, dso start address is a absolute address other than offset. Just set vm_start to zero when dso start is 0x400000, which means it is a exectable file. Reviewed-by: James Clark Signed-off-by: Ruidong Tian Cc: Adrian Hunter Cc: Al Grant Cc: Alexander Shishkin Cc: Leo Yan Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki Poulouse Cc: Tor Jeremiassen Link: https://lore.kernel.org/r/20231214123304.34087-3-tianruidong@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit 881791886bfa8e353c3203f95bfbaaeee25d2d50 Author: Uwe Kleine-König Date: Tue Dec 19 07:33:17 2023 +0100 pwm: cros-ec: Drop documentation for dropped struct member Recently an unused member was removed from struct cros_ec_pwm_device, but the kernel doc wasn't adapted accordingly. Catch up and drop the documentation, too. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312190757.O4M9dsln-lkp@intel.com/ Fixes: 6c4406ce609f ("pwm: cros-ec: Drop unused member from driver private data") Signed-off-by: Uwe Kleine-König Reviewed-by: Tzung-Bi Shih Signed-off-by: Thierry Reding commit 28403c09e36c84233db46ee29fdfc7124a8f576d Author: Al Viro Date: Sat Nov 11 19:27:17 2023 -0500 nfsd: kill stale comment about simple_fill_super() requirements That went into the tree back in 2005; the comment used to be true for predecessor of simple_fill_super() that happened to live in nfsd; that one didn't take care to skip the array entries with NULL ->name, so it could not tolerate any gaps. That had been fixed in 2003 when nfsd_fill_super() had been abstracted into simple_fill_super(); if Neil's patch lived out of tree during that time, he probably replaced the name of function when rebasing it and didn't notice that restriction in question was no longer there. Acked-by: Chuck Lever Signed-off-by: Al Viro commit 743cde7419bc9580a71a7e6f15eda66d6d8e71c2 Author: Al Viro Date: Sun Nov 12 16:56:19 2023 -0500 bfs_add_entry(): get rid of pointless ->d_name.len checks First of all, any dentry getting here would have passed bfs_lookup(), so it it passed ENAMETOOLONG check there, there's no need to repeat it. And we are not going to get dentries with zero name length - that check ultimately comes from ext2 and it's as pointless here as it used to be there. Acked-by: Tigran Aivazian Signed-off-by: Al Viro commit 96931dfe437cbd480fcfa72bd05b41b9ef15522e Author: Al Viro Date: Sat Nov 11 01:55:03 2023 -0500 nilfs2: d_obtain_alias(ERR_PTR(...)) will do the right thing... Acked-by: Ryusuke Konishi Signed-off-by: Al Viro commit 00488aa21150053a568343df2aca10a33559d7d8 Author: Al Viro Date: Sat Nov 11 01:13:58 2023 -0500 zonefs: d_splice_alias() will do the right thing on ERR_PTR() inode Acked-by: Damien Le Moal Signed-off-by: Al Viro commit b7760cf94d4f2665bf40d08dd69aa5d0b4aa593f Author: Yang Li Date: Wed Dec 20 08:51:43 2023 +0800 tools/counter: Remove unneeded semicolon ./tools/counter/counter_watch_events.c:233:3-4: Unneeded semicolon ./tools/counter/counter_watch_events.c:234:2-3: Unneeded semicolon ./tools/counter/counter_watch_events.c:333:2-3: Unneeded semicolon Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7782 Signed-off-by: Yang Li Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20231220005143.84987-1-yang.lee@linux.alibaba.com Signed-off-by: William Breathitt Gray commit 0647537df442e0ec818fc0bca347f13c11268202 Author: Colin Ian King Date: Tue Dec 19 13:30:15 2023 +0000 tools/counter: Fix spelling mistake "componend" -> "component" There are two spelling mistakes in the help text. Fix them. Signed-off-by: Colin Ian King Reviewed-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20231219133015.365943-1-colin.i.king@gmail.com Signed-off-by: William Breathitt Gray commit e43c64c971e48d11ee100c5a8b2eadbed056f924 Author: Veronika Molnarova Date: Tue Dec 12 17:59:09 2023 +0100 perf archive: Add new option '--unpack' to expand tarballs Archives generated by the command 'perf archive' have to be unpacked manually. Following the addition of option '--all' now there also exist a nested structure of tars, and after further discussion with Red Hat Global Support Services, they found a feature correctly unpacking archives of 'perf archive' convenient. Option '--unpack' of 'perf archive' unpacks archives generated by the command 'perf archive' as well as archives generated when used with option '--all'. The 'perf.data' file is placed in the current directory, while debug symbols are unpacked in '~/.debug' directory. A tar filename can be passed as an argument, and if not provided the command tries to find a viable perf.tar file for unpacking. Signed-off-by: Veronika Molnarova Tested-by: Arnaldo Carvalho de Melo Cc: Michael Petlan Link: https://lore.kernel.org/r/20231212165909.14459-2-vmolnaro@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 7050abeb8fe55878abd2b101a2304c03bd791318 Merge: a833c84a5ab0b 2dfef50589aef Author: Greg Kroah-Hartman Date: Wed Dec 20 17:13:16 2023 +0100 Merge tag 'iio-for-6.8a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next Jonathan writes: 1st set of IIO new device support, features and cleanup for 6.8 New device support ------------------ adi,hmc425a * Add support for ADRF5740 attenuators. Minor changes to driver needed alongside new IDs. aosong,ags02ma * New driver for this volatile organic compounds sensor. bosch,bmp280 * Add BMP390 (small amount of refactoring + ID) bosch,bmi323 * New driver to support the BMI323 6-axis IMU. honeywell,hsc030pa * New driver supporting a huge number of SSC and HSC series pressure and temperature sensors. isil,isl76682 * New driver for this simple Ambient Light sensor. liteon,ltr390 * New driver for this ambient and ultraviolet light sensor. maxim,max34408 * New driver to support the MAX34408 and MAX34409 current monitoring ADCs. melexis,mlx90635 * New driver for this Infrared contactless temperature sensor. mirochip,mcp9600 * New driver for this thermocouple EMF convertor. ti,hdc3020 * New driver for this integrated relative humidity and temperature sensor. vishay,veml6075 * New driver for this UVA and UVB light sensor. General features ---------------- Device properties * Add fwnode_property_match_property_string() helper to allow matching single value property against an array of predefined strings. * Use fwnode_property_string_array_count() inside fwnode_property_match_string() instead of open coding the same. checkpatch.pl * Add exclusion of __aligned() from a warning reducing false positives on IIO drivers (and hopefully beyond) IIO Features ------------ core * New light channel modifiers for UVA and UVB. * Add IIO_CHAN_INFO_TROUGH as counterpart to IIO_CHAN_INFO_PEAK so that we can support device that keep running track of the lowest value they have seen in similar fashion to the existing peak tracking. adi,adis library * Use spi cs inactive delay even when a burst reading is performed. As it's now used every time, can centralize the handling in the SPI setup code in the driver. adi,ad2s1210 * Support for fixed-mode to this resolver driver where the A0 and A1 pins are hard wired to config mode in which case position and config must be read from appropriate config registers. * Support reset GPIO if present. adi,ad5791 * Allow configuration of presence of external amplifier in DT binding. adi,adis16400 * Add spi-cs-inactive-delay-ns to bindings to allow it to be tweaked if default delays are not quite enough for a specific board. adi,adis16475 * Add spi-cs-inactive-delay-ns to bindings to allow it to be tweaked if default delays are not quite enough for a specific board. bosch,bmp280 * Enable multiple chip IDs per family of devices. rohm,bu27008 * Add an illuminance channel calculated from RGB and IR data. Cleanup ------- Minor white space, typos and tidy up not explicitly called out. Core * Check that the available_scan_masks array passed to the IIO core by a driver is sensible by ensuring the entries are ordered so the minimum number of channels is enabled in the earlier entries (as they will be selected if sufficient for the requested channels). * Document that the available_scan_masks infrastructure doesn't currently handle masks that don't fit in a long int. * Improve intensity documentation to reflect that there is no expectation of sensible units (it's dependent on a frequency sensitivity curve) Various * Use new device_property_match_property_string() to replace open coded versions of the same thing. * Fix a few MAINTAINERS filenames. * i2c_get_match_data() and spi_get_device_match_data() pushed into more drivers reducing boilerplate handling. * Some unnecessary headers removed. * ACPI_PTR() removals. It's rarely worth using this. adi,ad7091r (early part of a series adding device support - useful in their own right) * Pass iio_dev directly an event handler rather than relying on broken use of dev_get_drvdata() as drvdata is never set in this driver. * Make sure alert is turned on. adi,ad9467 (general driver fixing up as precursor to iio-backend proposal which is under review for 6.9) * Fix reset gpio handling to match expected polarity. * Always handle error codes from spi_writes. * Add a driver instance local mutex to avoid some races. * Fix scale setting to align with available scale values. * Split array of chip_info structures up into named individual elements. * Convert to regmap. honeywell,mprls0025pa * Drop now unnecessary type references in DT binding for properties in pascals. invensense,mpu6050 * Don't eat a potentially useful return value from regmap_bulk_write() invensense,icm42600 * Use max macro to improve code readability and save a few lines. liteon,ltrf216a * Improve prevision of light intensity. microchip,mcp3911 * Use cleanup.h magic. qcom,spmi* * Fix wrong descriptions of SPMI reg fields in bindings. Other ---- mailmap * Update for Matt Ranostay * tag 'iio-for-6.8a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (83 commits) iio: adc: ad7091r: Align arguments to function call parenthesis iio: adc: ad7091r: Set alert bit in config register iio: adc: ad7091r: Pass iio_dev to event handler scripts: checkpatch: Add __aligned to the list of attribute notes iio: chemical: add support for Aosong AGS02MA dt-bindings: iio: chemical: add aosong,ags02ma dt-bindings: vendor-prefixes: add aosong iio: accel: bmi088: update comments and Kconfig dt-bindings: iio: humidity: Add TI HDC302x support iio: humidity: Add driver for ti HDC302x humidity sensors iio: ABI: document temperature and humidity peak/trough raw attributes iio: core: introduce trough info element for minimum values iio: light: driver for Lite-On ltr390 dt-bindings: iio: light: add ltr390 iio: light: isl76682: remove unreachable code iio: pressure: driver for Honeywell HSC/SSC series dt-bindings: iio: pressure: add honeywell,hsc030 doc: iio: Document intensity scale as poorly defined dt-bindings: iio: temperature: add MLX90635 device iio: temperature: mlx90635 MLX90635 IR Temperature sensor ... commit 80e4a9987999e682366d60f43a7b2adefc48e222 Author: Uwe Kleine-König Date: Sun Dec 10 00:00:47 2023 +0100 pwm: Drop two unused API functions These functions are unused. Also I think there is no valid use case where these are correct to be called. So drop them. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 4430d02dc1dfb811b0b39bb58662f006f1e4749d Author: Uwe Kleine-König Date: Sun Dec 10 00:00:46 2023 +0100 pwm: lpc18xx-sct: Don't modify the cached period of other PWM outputs Even though the hardware only supports a single period for all PWM outputs, modifying the other (disabled) outputs's period is strange and wrong. Only the pwm core is supposed to update these values. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit da65f29dada7f7cbbf0d6375b88a0316f5f7d6f5 Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:34 2023 +0100 timers: Fix nextevt calculation when no timers are pending When no timer is queued into an empty timer base, the next_expiry will not be updated. It was originally calculated as base->clk + NEXT_TIMER_MAX_DELTA When the timer base stays empty long enough (> NEXT_TIMER_MAX_DELTA), the next_expiry value of the empty base suggests that there is a timer pending soon. This might be more a kind of a theoretical problem, but the fix doesn't hurt. Use only base->next_expiry value as nextevt when timers are pending. Otherwise nextevt will be jiffies + NEXT_TIMER_MAX_DELTA. As all information is in place, update base->next_expiry value of the empty timer base as well. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-13-anna-maria@linutronix.de commit bb8caad5083f8fbba70faf41f1d3bab7cf09da6d Author: Thomas Gleixner Date: Fri Dec 1 10:26:33 2023 +0100 timers: Rework idle logic To improve readability of the code, split base->idle calculation and expires calculation into separate parts. While at it, update the comment about timer base idle marking. Thereby the following subtle change happens if the next event is just one jiffy ahead and the tick was already stopped: Originally base->is_idle remains true in this situation. Now base->is_idle turns to false. This may spare an IPI if a timer is enqueued remotely to an idle CPU that is going to tick on the next jiffy. Signed-off-by: Thomas Gleixner Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-12-anna-maria@linutronix.de commit 7a39a5080ef0e3cf233d92165f6a778f08a08244 Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:32 2023 +0100 timers: Use already existing function for forwarding timer base There is an already existing function for forwarding the timer base. Forwarding the timer base is implemented directly in get_next_timer_interrupt() as well. Remove the code duplication and invoke __forward_timer_base() instead. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-11-anna-maria@linutronix.de commit 1e490484aa3af42d4eeffabf96d6a02be69d586b Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:31 2023 +0100 timers: Split out forward timer base functionality Forwarding timer base is done when the next expiry value is calculated and when a new timer is enqueued. When the next expiry value is calculated the jiffies value is already available and does not need to be reread a second time. Splitting out the forward timer base functionality to make it executable via both contextes - those where jiffies are already known and those, where jiffies need to be read. No functional change. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-10-anna-maria@linutronix.de commit 8a2c9c7e7848d7f63d38b698209148b5bb4ba7f3 Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:30 2023 +0100 timers: Clarify check in forward_timer_base() The current check whether a forward of the timer base is required can be simplified by using an already existing comparison function which is easier to read. The related comment is outdated and was not updated when the check changed in commit 36cd28a4cdd0 ("timers: Lower base clock forwarding threshold"). Use time_before_eq() for the check and replace the comment by copying the comment from the same check inside get_next_timer_interrupt(). Move the precious information of the outdated comment to the proper place in __run_timers(). No functional change. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-9-anna-maria@linutronix.de commit b5e6f59888c7bde3c05f61b3ce06b78a86713fc0 Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:29 2023 +0100 timers: Move store of next event into __next_timer_interrupt() Both call sites of __next_timer_interrupt() store the return value directly in base->next_expiry. Move the store into __next_timer_interrupt() and to make its purpose more clear, rename the function to next_expiry_recalc(). No functional change. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-8-anna-maria@linutronix.de commit d124c3393e798b1fb142ee728d5c8976d11e722d Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:28 2023 +0100 timers: Do not IPI for deferrable timers Deferrable timers do not prevent CPU from going idle and are not taken into account on idle path. Sending an IPI to a remote CPU when a new first deferrable timer was enqueued will wake up the remote CPU but nothing will be done regarding the deferrable timers. Drop IPI completely when a new first deferrable timer was enqueued. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-7-anna-maria@linutronix.de commit b573c73101d8786446535b2ab28cbc8907bda9a9 Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:27 2023 +0100 tracing/timers: Add tracepoint for tracking timer base is_idle flag When debugging timer code the timer tracepoints are very important. There is no tracepoint when the is_idle flag of the timer base changes. Instead of always adding manually trace_printk(), add tracepoints which can be easily enabled whenever required. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-6-anna-maria@linutronix.de commit dbcdcb62b59db2cf6a24113873b90da15c6f0b19 Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:26 2023 +0100 tracing/timers: Enhance timer_start tracepoint For starting a timer, the timer is enqueued into a bucket of the timer wheel. The bucket expiry is the defacto expiry of the timer but it is not equal the timer expiry because of increasing granularity when bucket is in a higher level of the wheel. To be able to figure out in a trace whether a timer expired in time or not, the bucket expiry time is required as well. Add bucket expiry time to the timer_start tracepoint and thereby simplify the arguments. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-5-anna-maria@linutronix.de commit cbf04a22026100dceeceec67fcbf1973383eb32f Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:25 2023 +0100 tick-sched: Warn when next tick seems to be in the past When the next tick is in the past, the delta between basemono and the next tick gets negativ. But the next tick should never be in the past. The negative effect of a wrong next tick might be a stop of the tick and timers might expire late. To prevent expensive debugging when changing underlying code, add a WARN_ON_ONCE into this code path. To prevent complete misbehaviour, also reset next_tick to basemono in this case. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-4-anna-maria@linutronix.de commit 318050671affa92fd166d988d08d4041c7b113c4 Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:24 2023 +0100 tick/sched: Cleanup confusing variables tick_nohz_stop_tick() contains the expires (u64 variable) and tick (ktime_t) variable. In the beginning the value of expires is written to tick. Afterwards none of the variables is changed. They are only used for checks. Drop the not required variable tick and use always expires instead. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-3-anna-maria@linutronix.de commit cb665db94fc61512c9c94ed1d42af67e7bf6ce01 Author: Anna-Maria Behnsen Date: Fri Dec 1 10:26:23 2023 +0100 tick-sched: Fix function names in comments When referencing functions in comments, it might be helpful to use full function names (including the prefix) to be able to find it when grepping. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-2-anna-maria@linutronix.de commit b41ccc3bc9da96678c1db31b9ed021b8388657f6 Author: Uwe Kleine-König Date: Wed Dec 6 22:48:18 2023 +0100 pwm: meson: Simplify using dev_err_probe() Using dev_err_probe() emitting an error message mentioning a return value and returning that value can be done in a single statement. Make use of that to simplify the probe part of the driver. This has the additional advantage to emit the symbolic name for the error instead of the integer error value. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit d9eb24c6f499bf8f6625c5fea05d7511a2fecf52 Author: Uwe Kleine-König Date: Wed Dec 6 18:30:43 2023 +0100 pwm: stmpe: Silence duplicate error messages stmpe_reg_read() and stmpe_reg_write() already emit error messages when they fail. So the extra error messages in the pwm driver are only little useful. They are useful in some situation, as they give a bit of context to the failing register write. So don't remove them but degrade them to dev_dbg(). Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fe22944cf05ede8e6f841cfecdb7093a53a3d9b3 Author: xiaoming Wang Date: Tue Dec 19 11:34:11 2023 +0800 cpu/hotplug: Increase the number of dynamic states The dynamically allocatable hotplug state space can be exhausted by the existing drivers and infrastructure which install CPU hotplug states dynamically. That prevents new drivers and infrastructure from installing dynamically allocated states. Increase the size of the CPUHP_AP_ONLINE_DYN state by 10 to make room. Signed-off-by: Xiaoming Wang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231219033411.816100-1-xiaoming.wang@intel.com commit efb704abedc7168cee8068da08eb2ca8c1eb1893 Author: Uwe Kleine-König Date: Thu Nov 30 08:21:06 2023 +0100 pwm: Reduce number of pointer dereferences in pwm_device_request() pwm->chip and pwm->chip->ops are used several times in this function. Introduce local variables for these. There is no semantical change, but with ARCH=arm, allmodconfig and gcc-13 bloat-o-meter reports a slight improvement: add/remove: 1/1 grow/shrink: 1/1 up/down: 8/-36 (-28) Function old new delta pwm_apply_state 476 480 +4 __initcall__kmod_core__307_1092_pwm_debugfs_init4 - 4 +4 __initcall__kmod_core__307_1090_pwm_debugfs_init4 4 - -4 pwm_request_from_chip 628 596 -32 Total: Before=15091, After=15063, chg -0.19% Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit d243221dc9e202d85ca196136d8eaa029091b42c Author: Uwe Kleine-König Date: Thu Nov 30 08:41:34 2023 +0100 pwm: crc: Use consistent variable naming for driver data All but one local variable of type pointer to struct crystalcove_pwm are called "crc_pwm", the one outlier is called "pwm" which is usually reserved for variables of type pointer to struct pwm_device. So rename that one "pwm" to "crc_pwm" for consistency. Signed-off-by: Uwe Kleine-König Reviewed-by: Hans de Goede Signed-off-by: Thierry Reding commit 01b571fbbac40bfc266c03e84ab9a8ab2ddd2486 Author: Uwe Kleine-König Date: Tue Dec 5 10:56:17 2023 +0100 pwm: omap-dmtimer: Drop locking The pwm driver only provides a single PWM line, so there are no concurrent calls of the callbacks from different consumers. A single consumer is expected not to do concurrent calls into the pwm framework. So there is nothing to serialize and the lock can go away. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 46cfec2a865ae967ea4366287a7d9a16ad5b8b6f Author: Tony Lindgren Date: Tue Nov 14 10:27:06 2023 +0200 dt-bindings: pwm: ti,pwm-omap-dmtimer: Update binding for yaml Update for yaml and remove the old txt binding. As we can replace most of the custom timer API with standard Linux frameworks such as clock framework, let's tag the properties for ti,prescaler and ti,clock-source as deprecated. Cc: Cc: Nishanth Menon Cc: Thierry Reding Cc: Uwe Kleine-König Cc: Vignesh Raghavendra Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 4a6b93f5629668d1dc8fa5945657fdd124629c55 Author: Michal Simek Date: Mon Nov 6 12:37:47 2023 +0100 dt-bindings: riscv: cpus: Add AMD MicroBlaze V compatible MicroBlaze V is new AMD/Xilinx soft-core 32bit RISC-V processor IP. It is hardware compatible with classic MicroBlaze processor. Signed-off-by: Michal Simek Acked-by: Rob Herring Acked-by: Conor Dooley Link: https://lore.kernel.org/r/d442d916204d26f82c1c3a924a4cdfb117960e1b.1699270661.git.michal.simek@amd.com Signed-off-by: Palmer Dabbelt commit 363d0e56285e80cda997d41d94c22313b673557d Author: Sean Young Date: Tue Dec 19 16:30:29 2023 +0000 media: pwm-ir-tx: Trigger edges from hrtimer interrupt context This makes the generated IR much more precise. Before this change, the driver is unreliable and many users opted to use gpio-ir-tx instead. Signed-off-by: Sean Young Signed-off-by: Thierry Reding commit fcc76072935935082efa127b97c7ddd880d2d793 Author: Sean Young Date: Wed Dec 20 14:24:25 2023 +0000 pwm: bcm2835: Allow PWM driver to be used in atomic context clk_get_rate() may do a mutex lock. Fetch the clock rate once, and prevent rate changes using clk_rate_exclusive_get(). Signed-off-by: Sean Young Reviewed-by: Florian Fainelli Signed-off-by: Thierry Reding commit daca194876a94565194f6e32ddb0355af8cf30f7 Author: Yishai Hadas Date: Wed Dec 20 10:24:56 2023 +0200 vfio/virtio: Declare virtiovf_pci_aer_reset_done() static Declare virtiovf_pci_aer_reset_done() as a static function to prevent the below build warning. "warning: no previous prototype for 'virtiovf_pci_aer_reset_done' [-Wmissing-prototypes]" Fixes: eb61eca0e8c3 ("vfio/virtio: Introduce a vfio driver over virtio devices") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/lkml/20231220143122.63337669@canb.auug.org.au/ Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20231220082456.241973-1-yishaih@nvidia.com Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312202115.oDmvN1VE-lkp@intel.com/ Signed-off-by: Alex Williamson commit 7170d3beafc2373dd76b6b5d6e617d89e4e42b8b Author: Sean Young Date: Tue Dec 19 16:30:27 2023 +0000 pwm: Make it possible to apply PWM changes in atomic context Some PWM devices require sleeping, for example if the pwm device is connected over I2C. However, many PWM devices could be used from atomic context, e.g. memory mapped PWM. This is useful for, for example, the pwm-ir-tx driver which requires precise timing. Sleeping causes havoc with the generated IR signal. Since not all PWM devices can support atomic context, we also add a pwm_might_sleep() function to check if is not supported. Signed-off-by: Sean Young Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 752193da3f8b0aa819a27fc741d46ab046be315e Author: Sean Young Date: Tue Dec 19 16:30:26 2023 +0000 pwm: renesas: Remove unused include No mutex is used in this driver. Reviewed-by: Uwe Kleine-König Signed-off-by: Sean Young Signed-off-by: Thierry Reding commit dc518b378dced419baa95d76a85f4c8c405722bc Author: Sean Young Date: Tue Dec 19 16:30:25 2023 +0000 pwm: Replace ENOTSUPP with EOPNOTSUPP According to Documentation/dev-tools/checkpatch.rst ENOTSUPP is not recommended and EOPNOTSUPP should be used instead. Signed-off-by: Sean Young Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c748a6d77c06a78651030e17da6beb278a1c9470 Author: Sean Young Date: Tue Dec 19 16:30:24 2023 +0000 pwm: Rename pwm_apply_state() to pwm_apply_might_sleep() In order to introduce a pwm api which can be used from atomic context, we will need two functions for applying pwm changes: int pwm_apply_might_sleep(struct pwm *, struct pwm_state *); int pwm_apply_atomic(struct pwm *, struct pwm_state *); This commit just deals with renaming pwm_apply_state(), a following commit will introduce the pwm_apply_atomic() function. Acked-by: Uwe Kleine-König Acked-by: Guenter Roeck Acked-by: Mark Brown Acked-by: Dmitry Torokhov # for input Acked-by: Hans de Goede Acked-by: Jani Nikula Acked-by: Lee Jones Signed-off-by: Sean Young Signed-off-by: Thierry Reding commit 80943bbdcfa8138eca3bfd71a8ed4bdf1e107f6b Author: Thierry Reding Date: Fri Dec 1 11:22:53 2023 +0100 pwm: Stop referencing pwm->chip Drivers have access to the chip via a function argument already, so there is no need to reference it via the PWM device. Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 2d91123ae5614b8737abd3a519b81265309a1ac3 Author: Uwe Kleine-König Date: Wed Nov 29 11:18:32 2023 +0100 pwm: Update kernel doc for struct pwm_chip Commit c572f3b9c8b7 ("pwm: Replace PWM chip unique base by unique ID") changed the members of struct pwm_chip, but failed to update the documentation accordingly. Catch up and document the new member and drop description for the two removed ones. Reported-by: Stephen Rothwell Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 74ade42105bb80e67b7b07b7e88cdaaa8c3402b6 Author: Michael Walle Date: Thu Nov 23 14:47:16 2023 +0100 dt-bindings: pwm: remove Xinlei's mail Xinlei Lee's mail is bouncing: : host mailgw02.mediatek.com[216.200.240.185] said: 550 Relaying mail to xinlei.lee@mediatek.com is not allowed (in reply to RCPT TO command) Remove it. Signed-off-by: Michael Walle Acked-by: Uwe Kleine-König Acked-by: Conor Dooley Signed-off-by: Thierry Reding commit 19f1016ea9600ed89bc24247c36ff5934ad94fbb Author: Philipp Zabel Date: Thu Oct 19 22:07:04 2023 +0200 pwm: stm32: Fix enable count for clk in .probe() Make the driver take over hardware state without disabling in .probe() and enable the clock for each enabled channel. Signed-off-by: Philipp Zabel [ukleinek: split off from a patch that also implemented .get_state()] Signed-off-by: Uwe Kleine-König Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm") Reviewed-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit e56ec7b7527c2be54a0c15064c71838fd5c49d4b Author: Philipp Zabel Date: Thu Oct 19 22:07:03 2023 +0200 pwm: stm32: Implement .get_state() Implement the &pwm_ops->get_state callback so drivers can inherit PWM state set by the bootloader. Signed-off-by: Philipp Zabel [ukl: split off from a patch that also fixes clk enable count in .probe()] Signed-off-by: Uwe Kleine-König Reviewed-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit 41fa8f57c0d269243fe3bde2bce71e82c884b9ad Author: Philipp Zabel Date: Thu Oct 19 22:07:02 2023 +0200 pwm: stm32: Use hweight32 in stm32_pwm_detect_channels Use hweight32() to count the CCxE bits in stm32_pwm_detect_channels(). Since the return value is assigned to chip.npwm, change it to unsigned int as well. Signed-off-by: Philipp Zabel Signed-off-by: Uwe Kleine-König Reviewed-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit c0504f59ced46b080520c2fc15b2b58d70f9ec83 Author: Philipp Zabel Date: Thu Oct 19 22:07:01 2023 +0200 pwm: stm32: Make ch parameter unsigned The channel parameter is only ever set to pwm->hwpwm. Make it unsigned int as well. Signed-off-by: Philipp Zabel Signed-off-by: Uwe Kleine-König Reviewed-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit e495f47274a145dd802748fed66608f46d9ae11d Author: Philipp Zabel Date: Thu Oct 19 22:07:00 2023 +0200 pwm: stm32: Replace write_ccrx with regmap_write The TIM_CCR1...4 registers are consecutive, so replace the switch case with a simple calculation. Since ch is known to be in the 0...3 range (it is set to hwpwm < npwm <= 4), drop the unnecessary error handling. The return value was not checked anyway. What remains does not warrant keeping the write_ccrx() function around, so instead call regmap_write() directly at the singular call site. Signed-off-by: Philipp Zabel Signed-off-by: Uwe Kleine-König Reviewed-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit 7ee2273197f1c1755ebdad8716eab50689401aff Author: Rob Herring Date: Thu Oct 26 14:54:17 2023 -0500 pwm: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. As these drivers only do DT based matching, of_match_device() will never return NULL if we've gotten to probe(). Therefore, the NULL check and error returns can be dropped. Signed-off-by: Rob Herring Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit b0445a18d3eef36b7dc4e07a0ccb4f7178251942 Author: Uwe Kleine-König Date: Thu Nov 23 10:56:20 2023 +0100 pwm: Narrow scope of struct pwm_device pointer In the expression determining the size of the allocation for chip->pwms it's more natural to use sizeof(*chip->pwms) than sizeof(*pwm). With that changed, the variable pwm is only used in a for loop and its scope can be reduced accordingly. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 1c9a2ad84f5a7450265a2ffcdb27715dbca2b980 Author: Uwe Kleine-König Date: Thu Nov 23 09:33:23 2023 +0100 pwm: jz4740: Add trailing \n to error messages Error messages are supposed to end in \n. Add the line terminator to the two error messages that lack this. Suggested-by: Paul Cercueil Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fb1b517fd87649add1e8acb813f4f8af5a28d4d9 Author: Uwe Kleine-König Date: Mon Oct 23 19:46:28 2023 +0200 pwm: tiehrpwm: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding #ifdef can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 5d5a0aa5e261eaaea81de4f30c26d22323026714 Author: Uwe Kleine-König Date: Mon Oct 23 19:46:27 2023 +0200 pwm: tiecap: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding #ifdef can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 3d67277607c755160531ebd6b756ffd7195de627 Author: Uwe Kleine-König Date: Mon Oct 23 19:46:26 2023 +0200 pwm: stm32: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding __maybe_unused can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Reviewed-by: Jonathan Cameron Signed-off-by: Uwe Kleine-König Reviewed-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit 39dfb60c724c59103412abe369d78b7243b31d35 Author: Uwe Kleine-König Date: Mon Oct 23 19:46:25 2023 +0200 pwm: stm32-lp: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding __maybe_unused can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Reviewed-by: Jonathan Cameron Signed-off-by: Uwe Kleine-König Reviewed-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit e9ebab624d0a8322203cfbcc15510656b0a177d0 Author: Uwe Kleine-König Date: Mon Oct 23 19:46:24 2023 +0200 pwm: samsung: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding #ifdef can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Reviewed-by: Jonathan Cameron Signed-off-by: Uwe Kleine-König Reviewed-by: Andi Shyti Signed-off-by: Thierry Reding commit 9676b40e1885fca203ced4be49adfc3ca6ed6f16 Author: Uwe Kleine-König Date: Mon Oct 23 19:46:23 2023 +0200 pwm: imx-tpm: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding __maybe_unused can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Reviewed-by: Jonathan Cameron Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 30b5b066fa839b7471ca1222713b055d93681a77 Author: Uwe Kleine-König Date: Mon Oct 23 19:46:22 2023 +0200 pwm: dwc: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding #ifdef can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit d6b81be1f5f991bdbeabc734db04cec7dd79426b Author: Uwe Kleine-König Date: Mon Oct 23 19:46:21 2023 +0200 pwm: brcmstb: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding #ifdef can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Acked-by: Florian Fainelli Reviewed-by: Jonathan Cameron Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fac37751c46836fa5dc9e1f958ae160e75cd24f1 Author: Uwe Kleine-König Date: Mon Oct 23 19:46:20 2023 +0200 pwm: berlin: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding #ifdef can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit a7bab37f87c2a551ce12aefc30648a206550cd78 Author: Uwe Kleine-König Date: Mon Oct 23 19:46:19 2023 +0200 pwm: atmel-tcb: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding #ifdef can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Reviewed-by: Jonathan Cameron Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Signed-off-by: Thierry Reding commit ded38f874eff2bb6fc46a0377aa8dcdcf4b43a2e Author: Uwe Kleine-König Date: Mon Oct 23 19:46:18 2023 +0200 pwm: atmel-hlcdc: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions This macro has the advantage over SIMPLE_DEV_PM_OPS that we don't have to care about when the functions are actually used, so the corresponding #ifdef can be dropped. Also make use of pm_ptr() to discard all PM related stuff if CONFIG_PM isn't enabled. Reviewed-by: Jonathan Cameron Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Signed-off-by: Thierry Reding commit 6c4406ce609fb5857d52c1e42a40cb5e7e8ee94a Author: Uwe Kleine-König Date: Thu Nov 16 11:52:13 2023 +0100 pwm: cros-ec: Drop unused member from driver private data .dev is unused since the driver was introduced in commit 1f0d3bb02785 ("pwm: Add ChromeOS EC PWM driver"). Drop it. Signed-off-by: Uwe Kleine-König Reviewed-by: Tzung-Bi Shih Signed-off-by: Thierry Reding commit 0360a48733729f9329483409acd048d04b43ee17 Author: Uwe Kleine-König Date: Tue Nov 14 12:20:13 2023 +0100 pwm: Mention PWM chip ID in /sys/kernel/debug/pwm While it's not hard to match the entries from /sys/kernel/debug/pwm to the corresponding pwmchip in /sys/class/pwm, it's a bit simpler to have the number mentioned in /sys/kernel/debug/pwm. Link: https://lore.kernel.org/r/20230808165250.942396-3-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 54c86dd20bba23109e32e4e2f94ff93dd9863bc3 Author: Uwe Kleine-König Date: Tue Nov 14 12:20:12 2023 +0100 pwm: Replace PWM chip unique base by unique ID Traditionally each PWM device had a unique ID stored in the "pwm" member of struct pwm_device. However this number was hardly used and dropped in the previous commit. To identify a certain PWM you're supposed to use the chip's ID and the hwpwm of the PWM device now. With the PWM chip base gone PWM chips can get their IDs better and simpler using an idr. This is expected to change the numbering of PWM chips, but nothing should rely on the numbering anyhow. Other than that the side effects are: - The PWM chip IDs are smaller and in most cases consecutive. - The ordering in /sys/kernel/debug/pwm is ordered by ascending PWM chip ID. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit f3e25e68ceb2abaeefcac8f930c940c4494705d0 Author: Uwe Kleine-König Date: Tue Nov 14 12:20:11 2023 +0100 pwm: Drop unused member "pwm" from struct pwm_device This member is only assigned to and never read. So drop it. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 32f24938a1fce95fce314c1fa9a72af74588ea6c Author: Colin Ian King Date: Tue Dec 19 15:23:07 2023 +0000 samples/bpf: Use %lu format specifier for unsigned long values Currently %ld format specifiers are being used for unsigned long values. Fix this by using %lu instead. Cleans up cppcheck warnings: warning: %ld in format string (no. 1) requires 'long' but the argument type is 'unsigned long'. [invalidPrintfArgType_sint] Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/bpf/20231219152307.368921-1-colin.i.king@gmail.com commit bce761d757452ba5eb77e11fecc37a04b67494e7 Author: Tzvetomir Stoyanov (VMware) Date: Tue Dec 19 13:54:19 2023 -0500 ring-buffer: Read and write to ring buffers with custom sub buffer size As the size of the ring sub buffer page can be changed dynamically, the logic that reads and writes to the buffer should be fixed to take that into account. Some internal ring buffer APIs are changed: ring_buffer_alloc_read_page() ring_buffer_free_read_page() ring_buffer_read_page() A new API is introduced: ring_buffer_read_page_data() Link: https://lore.kernel.org/linux-trace-devel/20211213094825.61876-6-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-kernel/20231219185628.875145995@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Tzvetomir Stoyanov (VMware) [ Fixed kerneldoc on data_page parameter in ring_buffer_free_read_page() ] Signed-off-by: Steven Rostedt (Google) commit f9b94daa542a8d2532f0930f01cd9aec2d19621b Author: Tzvetomir Stoyanov (VMware) Date: Tue Dec 19 13:54:18 2023 -0500 ring-buffer: Set new size of the ring buffer sub page There are two approaches when changing the size of the ring buffer sub page: 1. Destroying all pages and allocating new pages with the new size. 2. Allocating new pages, copying the content of the old pages before destroying them. The first approach is easier, it is selected in the proposed implementation. Changing the ring buffer sub page size is supposed to not happen frequently. Usually, that size should be set only once, when the buffer is not in use yet and is supposed to be empty. Link: https://lore.kernel.org/linux-trace-devel/20211213094825.61876-5-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-kernel/20231219185628.588995543@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Steven Rostedt (Google) commit 2808e31ec12e5fbe2ae25acc027fcdc67b1fb7f0 Author: Tzvetomir Stoyanov (VMware) Date: Tue Dec 19 13:54:17 2023 -0500 ring-buffer: Add interface for configuring trace sub buffer size The trace ring buffer sub page size can be configured, per trace instance. A new ftrace file "buffer_subbuf_order" is added to get and set the size of the ring buffer sub page for current trace instance. The size must be an order of system page size, that's why the new interface works with system page order, instead of absolute page size: 0 means the ring buffer sub page is equal to 1 system page and so forth: 0 - 1 system page 1 - 2 system pages 2 - 4 system pages ... The ring buffer sub page size is limited between 1 and 128 system pages. The default value is 1 system page. New ring buffer APIs are introduced: ring_buffer_subbuf_order_set() ring_buffer_subbuf_order_get() ring_buffer_subbuf_size_get() Link: https://lore.kernel.org/linux-trace-devel/20211213094825.61876-4-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-kernel/20231219185628.298324722@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Steven Rostedt (Google) commit 139f84002145d8624f0195fb090b3a7670744a13 Author: Tzvetomir Stoyanov (VMware) Date: Tue Dec 19 13:54:16 2023 -0500 ring-buffer: Page size per ring buffer Currently the size of one sub buffer page is global for all buffers and it is hard coded to one system page. In order to introduce configurable ring buffer sub page size, the internal logic should be refactored to work with sub page size per ring buffer. Link: https://lore.kernel.org/linux-trace-devel/20211213094825.61876-3-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-kernel/20231219185628.009147038@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Steven Rostedt (Google) commit d5cfbdfc96aadc96a2bf6176269b994e2ce31717 Author: Tzvetomir Stoyanov (VMware) Date: Tue Dec 19 13:54:15 2023 -0500 ring-buffer: Have ring_buffer_print_page_header() be able to access ring_buffer_iter In order to introduce sub-buffer size per ring buffer, some internal refactoring is needed. As ring_buffer_print_page_header() will depend on the trace_buffer structure, it is moved after the structure definition. Link: https://lore.kernel.org/linux-trace-devel/20211213094825.61876-2-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-kernel/20231219185627.723857541@goodmis.org Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Cc: Vincent Donnefort Cc: Kent Overstreet Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Steven Rostedt (Google) commit c00f94b3a5be428837868c0f2cdaa3fa5b4b1995 Author: Mimi Zohar Date: Tue Dec 19 10:11:25 2023 -0500 overlay: disable EVM Until a complete solution is developed, update 'sb->s_iflags' to disable EVM. Acked-by: Amir Goldstein Reviewed-by: Christian Brauner Signed-off-by: Mimi Zohar commit cd708c938f055c9eb5a366ec1c8edcefa28afc28 Author: Mimi Zohar Date: Mon Dec 18 08:06:40 2023 -0500 evm: add support to disable EVM on unsupported filesystems Identify EVM unsupported filesystems by defining a new flag SB_I_EVM_UNSUPPORTED. Don't verify, write, remove or update 'security.evm' on unsupported filesystems. Acked-by: Amir Goldstein Reviewed-by: Christian Brauner Signed-off-by: Mimi Zohar commit 40ca4ee3136d2d09977d1cab8c0c0e1582c3359d Author: Mimi Zohar Date: Tue Dec 12 06:12:43 2023 -0500 evm: don't copy up 'security.evm' xattr The security.evm HMAC and the original file signatures contain filesystem specific data. As a result, the HMAC and signature are not the same on the stacked and backing filesystems. Don't copy up 'security.evm'. Reviewed-by: Amir Goldstein Reviewed-by: Christian Brauner Signed-off-by: Mimi Zohar commit 78403b37f6770441f80a78d13772394731afe055 Author: Konrad Dybcio Date: Tue Dec 19 14:05:06 2023 +0100 arm64: dts: qcom: sc8180x: Fix up PCIe nodes Duplicated clock output names cause probe errors and wrong clocks cause hardware not to work. Fix such issues. Fixes: d20b6c84f56a ("arm64: dts: qcom: sc8180x: Add PCIe instances") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231219-topic-8180_pcie-v1-1-c2acbba4723c@linaro.org Signed-off-by: Bjorn Andersson commit 45e8c72712345263208f7c94f334fa718634f557 Author: Konrad Dybcio Date: Tue Dec 19 19:40:21 2023 +0100 arm64: dts: qcom: sc8180x: Mark PCIe hosts cache-coherent The PCIe controllers on 8180 are cache-coherent. Mark them as such. Fixes: d20b6c84f56a ("arm64: dts: qcom: sc8180x: Add PCIe instances") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231219-topic-8180_pcie_dmac-v1-1-5d00fc1b23fd@linaro.org Signed-off-by: Bjorn Andersson commit 7d7cd22dc497dc79c2b1ae0e26cada1c5207d5dd Author: Patrick Rudolph Date: Tue Dec 19 13:53:49 2023 +0100 pinctrl: cy8c95x0: Cache muxed registers Currently the port specific registers behind the PORTSEL mux aren't cached in the regmap and thus the typical setup time for a single pin on cy8c9560 is about 200msec on our system. The hotspot is the IRQ (un)masking, which causes lots of R/W operations. Introduce a separate regmap for muxed registers and helper functions to use the newly introduced regmap for muxed register access under the i2c lock. With the new cache in place the typical pin setup time is reduced to 20msec, making it about 10 times faster. As a side effect the system boot time is also reduced by 50%. Signed-off-by: Patrick Rudolph Link: https://lore.kernel.org/r/20231219125350.4031370-1-patrick.rudolph@9elements.com Signed-off-by: Linus Walleij commit 00bb152d62825b5f659d9b4ff87d49637e44eea0 Author: Michal Simek Date: Tue Dec 19 15:41:02 2023 +0100 dt-bindings: pinctrl: xilinx: Rename *gpio to *gpio-grp Anything ending with gpio/gpios is taken as gpio phande/description which is reported as the issue coming from gpio-consumer.yaml schema. That's why rename the gpio suffix to gpio-grp to avoid name collision. Signed-off-by: Michal Simek Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/2e3a1f1f57cf929bd05115bc081e6d01d5a53443.1702996859.git.michal.simek@amd.com Signed-off-by: Linus Walleij commit bee9705c679d0df8ee099e3c5312ac76f447848a Merge: 18764b883e157 4cf24dc893407 Author: David S. Miller Date: Wed Dec 20 11:50:13 2023 +0000 Merge branch 'net-sched-tc-drop-reason' Victor Nogueira says: ==================== net: sched: Make tc-related drop reason more flexible for remaining qdiscs This patch builds on Daniel's patch[1] to add initial support of tc drop reason. The main goal is to distinguish between policy and error drops for the remainder of the egress qdiscs (other than clsact). The drop reason is set by cls_api and act_api in the tc skb cb in case any error occurred in the data path. Also add new skb drop reasons that are idiosyncratic to TC. [1] https://lore.kernel.org/all/20231009092655.22025-1-daniel@iogearbox.net Changes in V5: - Drop "EXT_" from cookie error's drop reason name in doc Changes in V4: - Condense all the cookie drop reasons into one Changes in V3: - Removed duplicate assignment - Rename function tc_skb_cb_drop_reason to tcf_get_drop_reason - Move zone field upwards in struct tc_skb_cb to move hole to the end of the struct Changes in V2: - Dropped RFC tag - Removed check for drop reason being overwritten by filter in cls_api.c - Simplified logic and removed function tcf_init_drop_reason ==================== Signed-off-by: David S. Miller commit 4cf24dc8934074725042c0bd10b91f4d4b5269bb Author: Victor Nogueira Date: Sat Dec 16 17:44:36 2023 -0300 net: sched: Add initial TC error skb drop reasons Continue expanding Daniel's patch by adding new skb drop reasons that are idiosyncratic to TC. More specifically: - SKB_DROP_REASON_TC_COOKIE_ERROR: An error occurred whilst processing a tc ext cookie. - SKB_DROP_REASON_TC_CHAIN_NOTFOUND: tc chain lookup failed. - SKB_DROP_REASON_TC_RECLASSIFY_LOOP: tc exceeded max reclassify loop iterations Signed-off-by: Victor Nogueira Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit b6a3c6066afc2cb7b92f45c67ab0b12ded81cb11 Author: Victor Nogueira Date: Sat Dec 16 17:44:35 2023 -0300 net: sched: Make tc-related drop reason more flexible for remaining qdiscs Incrementing on Daniel's patch[1], make tc-related drop reason more flexible for remaining qdiscs - that is, all qdiscs aside from clsact. In essence, the drop reason will be set by cls_api and act_api in case any error occurred in the data path. With that, we can give the user more detailed information so that they can distinguish between a policy drop or an error drop. [1] https://lore.kernel.org/all/20231009092655.22025-1-daniel@iogearbox.net Signed-off-by: Victor Nogueira Acked-by: Daniel Borkmann Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit fb2780721ca5e9f78bbe4544b819b929a982df9c Author: Victor Nogueira Date: Sat Dec 16 17:44:34 2023 -0300 net: sched: Move drop_reason to struct tc_skb_cb Move drop_reason from struct tcf_result to skb cb - more specifically to struct tc_skb_cb. With that, we'll be able to also set the drop reason for the remaining qdiscs (aside from clsact) that do not have access to tcf_result when time comes to set the skb drop reason. Signed-off-by: Victor Nogueira Acked-by: Daniel Borkmann Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 18764b883e157e28126b54e7d4ba9dd487d5bf54 Author: Heiner Kallweit Date: Sat Dec 16 20:58:10 2023 +0100 r8169: add support for LED's on RTL8168/RTL8101 This adds support for the LED's on most chip versions. Excluded are the old non-PCIe versions and RTL8125. RTL8125 has a different LED register layout, support for it will follow later. LED's can be controlled from userspace using the netdev LED trigger. Tested on RTL8168h. Note: The driver can't know which LED's are actually physically wired. Therefore not every LED device may represent a physically available LED. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 34d63b8162b7b93e616212bb1026fdc51a35ee21 Author: Al Viro Date: Wed Dec 20 05:31:57 2023 +0000 gfs2: use is_subdir() ... instead of reimplementing it with misguiding name (is_ancestor(x, y) would normally imply "x is an ancestor of y", not the other way round). With races, while we are at it... Signed-off-by: Al Viro Signed-off-by: Andreas Gruenbacher commit 34d72246437155299dd08fd29277e6fa31081ea0 Author: Al Viro Date: Wed Dec 20 05:21:44 2023 +0000 gfs2: d_obtain_alias(ERR_PTR(...)) will do the right thing Signed-off-by: Al Viro Signed-off-by: Andreas Gruenbacher commit ff629d300413cf6c091b4f96cf4b14472ad39a3b Author: Wang Jinchao Date: Fri Dec 15 18:11:44 2023 +0800 pinctrl: qcom: lpass-lpi: remove duplicated include remove the second #include Signed-off-by: Wang Jinchao Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/202312151810+0800-wangjinchao@xfusion.com Signed-off-by: Linus Walleij commit d7a39d399a6dbc52dedde686e5dd40a3ae30f19f Merge: b6895d0ac9d7a c3e87a7fcd0bb Author: David S. Miller Date: Wed Dec 20 11:27:21 2023 +0000 Merge branch 'bridge-mdb-bulk-delete' Ido Schimmel says: ==================== Add MDB bulk deletion support This patchset adds MDB bulk deletion support, allowing user space to request the deletion of matching entries instead of dumping the entire MDB and issuing a separate deletion request for each matching entry. Support is added in both the bridge and VXLAN drivers in a similar fashion to the existing FDB bulk deletion support. The parameters according to which bulk deletion can be performed are similar to the FDB ones, namely: Destination port, VLAN ID, state (e.g., "permanent"), routing protocol, source / destination VNI, destination IP and UDP port. Flushing based on flags (e.g., "offload", "fast_leave", "added_by_star_ex", "blocked") is not currently supported, but can be added in the future, if a use case arises. Patch #1 adds a new uAPI attribute to allow specifying the state mask according to which bulk deletion will be performed, if any. Patch #2 adds a new policy according to which bulk deletion requests (with 'NLM_F_BULK' flag set) will be parsed. Patches #3-#4 add a new NDO for MDB bulk deletion and invoke it from the rtnetlink code when a bulk deletion request is made. Patches #5-#6 implement the MDB bulk deletion NDO in the bridge and VXLAN drivers, respectively. Patch #7 allows user space to issue MDB bulk deletion requests by no longer rejecting the 'NLM_F_BULK' flag when it is set in 'RTM_DELMDB' requests. Patches #8-#9 add selftests for both drivers, for both good and bad flows. iproute2 changes can be found here [1]. https://github.com/idosch/iproute2/tree/submit/mdb_flush_v1 ==================== Signed-off-by: David S. Miller commit c3e87a7fcd0bb5820ca6db9b385bbfacb556d083 Author: Ido Schimmel Date: Sun Dec 17 10:32:44 2023 +0200 selftests: vxlan_mdb: Add MDB bulk deletion test Add test cases to verify the behavior of the MDB bulk deletion functionality in the VXLAN driver. Signed-off-by: Ido Schimmel Acked-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit bd2dcb94c81e3408731d129e884954c36ef2f1fa Author: Ido Schimmel Date: Sun Dec 17 10:32:43 2023 +0200 selftests: bridge_mdb: Add MDB bulk deletion test Add test cases to verify the behavior of the MDB bulk deletion functionality in the bridge driver. Signed-off-by: Ido Schimmel Acked-by: Petr Machata Reviewed-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 2601e9c4b1176253e33025ca24e56ed67c8d434f Author: Ido Schimmel Date: Sun Dec 17 10:32:42 2023 +0200 rtnetlink: bridge: Enable MDB bulk deletion Now that both the common code as well as individual drivers support MDB bulk deletion, allow user space to make such requests. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 4cde72fead4cebb5b6b2fe9425904c2064739184 Author: Ido Schimmel Date: Sun Dec 17 10:32:41 2023 +0200 vxlan: mdb: Add MDB bulk deletion support Implement MDB bulk deletion support in the VXLAN driver, allowing MDB entries to be deleted in bulk according to provided parameters. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit a6acb535afb2a3b688a7858f05b61f0433e480d5 Author: Ido Schimmel Date: Sun Dec 17 10:32:40 2023 +0200 bridge: mdb: Add MDB bulk deletion support Implement MDB bulk deletion support in the bridge driver, allowing MDB entries to be deleted in bulk according to provided parameters. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit d8e81f131178dad603c6817421056030ed2f4ac2 Author: Ido Schimmel Date: Sun Dec 17 10:32:39 2023 +0200 rtnetlink: bridge: Invoke MDB bulk deletion when needed Invoke the new MDB bulk deletion device operation when the 'NLM_F_BULK' flag is set in the netlink message header. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 1a36e0f50f963465e9b2b980d250ab38b8fcd7a3 Author: Ido Schimmel Date: Sun Dec 17 10:32:38 2023 +0200 net: Add MDB bulk deletion device operation Add MDB net device operation that will be invoked by rtnetlink code in response to received 'RTM_DELMDB' messages with the 'NLM_F_BULK' flag set. Subsequent patches will implement the operation in the bridge and VXLAN drivers. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e0cd06f7fcb51b8acd6e68e64cc805be1283de9d Author: Ido Schimmel Date: Sun Dec 17 10:32:37 2023 +0200 rtnetlink: bridge: Use a different policy for MDB bulk delete For MDB bulk delete we will need to validate 'MDBA_SET_ENTRY' differently compared to regular delete. Specifically, allow the ifindex to be zero (in case not filtering on bridge port) and force the address to be zero as bulk delete based on address is not supported. Do that by introducing a new policy and choosing the correct policy based on the presence of the 'NLM_F_BULK' flag in the netlink message header. Use nlmsg_parse() for strict validation. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e37a11fca41864c9f652ff81296b82e6f65a4242 Author: Ido Schimmel Date: Sun Dec 17 10:32:36 2023 +0200 bridge: add MDB state mask uAPI attribute Currently, the 'state' field in 'struct br_port_msg' can be set to 1 if the MDB entry is permanent or 0 if it is temporary. Additional states might be added in the future. In a similar fashion to 'NDA_NDM_STATE_MASK', add an MDB state mask uAPI attribute that will allow the upcoming bulk deletion API to bulk delete MDB entries with a certain state or any state. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit b6895d0ac9d7a3d29f9f238a2688b3b66da71692 Author: Wang Jinchao Date: Mon Dec 18 15:04:07 2023 +0800 octeontx2-af: insert space after include Maintain Consistent Formatting: Insert Space after #include Suggested-by: Jakub Kicinski Reviewed-by: Subbaraya Sundeep Signed-off-by: Wang Jinchao Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit b22794c0f7b13ece8e44245ab99b2dcdd199caf2 Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:34 2023 +0100 dt-bindings: pinctrl: qcom: drop common properties and allow wakeup-parent Drop common properties already defined in referenced common Qualcomm SoC TLMM bindings and use "unevaluatedProperties: false". This makes the binding smaller and easier to review. Additionally this allows now "wakeup-parent" property coming from common TLMM bindings. In few places move the "required:" block to bottom, to match convention. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231208215534.195854-10-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 79d770afa0d582956bc2cb577fc9e3b413702ab8 Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:33 2023 +0100 dt-bindings: pinctrl: qcom: drop common properties Drop common properties already defined in referenced common Qualcomm SoC TLMM bindings and use "unevaluatedProperties: false". This makes the binding smaller and easier to review. In few places move the "required:" block to bottom, to match convention. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231208215534.195854-9-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 6bd410fcb24f2308a380b621c67c822c338f5805 Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:32 2023 +0100 dt-bindings: pinctrl: qcom,ipq5018-tlmm: use common TLMM bindings Reference common Qualcomm SoC TLMM bindings to drop commonly used properties and also bring other schemas for common definitions. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231208215534.195854-8-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 7e47d9d3750c17bdbbcbeac65f6ca54d633a58b5 Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:31 2023 +0100 dt-bindings: pinctrl: qcom,x1e80100-tlmm: restrict number of interrupts X1E80100 TLMM pin controller comes with only one interrupt, so narrow the number of interrupts previously defined in common TLMM bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231208215534.195854-7-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 6b7d9d4c0d496b2a27e7b2d10ec7679116450fbc Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:30 2023 +0100 dt-bindings: pinctrl: qcom,sm8650-tlmm: restrict number of interrupts SM8650 TLMM pin controller comes with only one interrupt, so narrow the number of interrupts previously defined in common TLMM bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231208215534.195854-6-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit fc19a5644b91bdfd141b911444f5238b6dc48562 Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:29 2023 +0100 dt-bindings: pinctrl: qcom,sm8550-tlmm: restrict number of interrupts SM8550 TLMM pin controller comes with only one interrupt, so narrow the number of interrupts previously defined in common TLMM bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231208215534.195854-5-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 8c0aa95bd0f885a9d87819e02bd28bc03630189d Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:28 2023 +0100 dt-bindings: pinctrl: qcom,sdx75-tlmm: restrict number of interrupts SDX75 TLMM pin controller comes with only one interrupt, so narrow the number of interrupts previously defined in common TLMM bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231208215534.195854-4-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 43c9dd099e91474ae99076e2aeb99f3a5e68a00a Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:27 2023 +0100 dt-bindings: pinctrl: qcom,sa8775p-tlmm: restrict number of interrupts SA8775p TLMM pin controller comes with only one interrupt, so narrow the number of interrupts previously defined in common TLMM bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231208215534.195854-3-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 98b94e055fcce71a4ccfc856e55d928218d9f612 Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:26 2023 +0100 dt-bindings: pinctrl: qcom,qdu1000-tlmm: restrict number of interrupts QDU1000 TLMM pin controller comes with only one interrupt, so narrow the number of interrupts previously defined in common TLMM bindings. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231208215534.195854-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 5a5ecedc4b57ec072b1ab780352087958fe2527e Author: Krzysztof Kozlowski Date: Fri Dec 8 22:55:25 2023 +0100 dt-bindings: pinctrl: qcom: create common LPASS LPI schema Just like regular TLMM pin controllers in Qualcomm SoCs, the Low Power Audio SubSystem (LPASS) Low Power Island (LPI) TLMM blocks share a lot of properties, so common part can be moved to separate schema to reduce code duplication and make reviewing easier. Except the move of common part, this introduces effective changes: 1. To all LPASS LPI bindings: Reference pinmux-node.yaml in each pin muxing and configuration node, to bring definition of "function" and "pins" properties. 2. qcom,sc7280-lpass-lpi-pinctrl: Reference pinctrl.yaml in top leve. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231208215534.195854-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit fa7b1fe24e10c62d3c14f3df16d5d7d5cffd1ddd Author: Tengfei Fan Date: Tue Dec 12 17:49:00 2023 +0800 pinctrl: qcom: sm4450: dd SM4450 pinctrl driver Add pinctrl driver for TLMM block found in SM4450 SoC. Can Guo helped out in reviewing the driver. Reviewed-by: Bjorn Andersson Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20231212094900.12615-3-quic_tengfan@quicinc.com Signed-off-by: Linus Walleij commit 7bf8b78f86dbac2f5b8332dcc91ff20cc3dfa3ce Author: Tengfei Fan Date: Tue Dec 12 17:48:59 2023 +0800 dt-bindings: pinctrl: qcom: Add SM4450 pinctrl Add device tree binding Documentation details for Qualcomm SM4450 TLMM device. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20231212094900.12615-2-quic_tengfan@quicinc.com Signed-off-by: Linus Walleij commit caf08a8250d619cfcd2b6f5967218a2e36133ecc Author: Johan Hovold Date: Thu Nov 30 18:28:34 2023 +0100 dt-bindings: pinctrl: qcom,pmic-mpp: clean up example The Multi-Purpose Pin controller block is part of an SPMI PMIC (which in turns sits on an SPMI bus) and uses a single value for the register property that corresponds to its base address. Clean up the example by adding a parent PMIC node with proper '#address-cells' and '#size-cells' properties, dropping the incorrect second register value, adding some newline separators and increasing the indentation to four spaces. Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231130172834.12653-1-johan+linaro@kernel.org Signed-off-by: Linus Walleij commit bc90aefa99f74452d549d503a3f1cbf3adc9c6bb Author: Vegard Nossum Date: Tue Dec 19 16:12:00 2023 +0100 x86/asm: Add DB flag to 32-bit percpu GDT entry The D/B size flag for the 32-bit percpu GDT entry was not set. The Intel manual (vol 3, section 3.4.5) only specifies the meaning of this flag for three cases: 1) code segments used for %cs -- doesn't apply here 2) stack segments used for %ss -- doesn't apply 3) expand-down data segments -- but we don't have the expand-down flag set, so it also doesn't apply here The flag likely doesn't do anything here, although the manual does also say: "This flag should always be set to 1 for 32-bit code and data segments [...]" so we should probably do it anyway. Signed-off-by: Vegard Nossum Signed-off-by: Ingo Molnar Acked-by: Linus Torvalds Link: https://lore.kernel.org/r/20231219151200.2878271-6-vegard.nossum@oracle.com commit 3b184b71dfcb156e08246f8fbe0cd088c6a6efed Author: Vegard Nossum Date: Tue Dec 19 16:11:59 2023 +0100 x86/asm: Always set A (accessed) flag in GDT descriptors We have no known use for having the CPU track whether GDT descriptors have been accessed or not. Simplify the code by adding the flag to the common flags and removing it everywhere else. Signed-off-by: Vegard Nossum Signed-off-by: Ingo Molnar Acked-by: Linus Torvalds Link: https://lore.kernel.org/r/20231219151200.2878271-5-vegard.nossum@oracle.com commit 1445f6e15f7ddd80311307475191e34c0b2312e8 Author: Vegard Nossum Date: Tue Dec 19 16:11:58 2023 +0100 x86/asm: Replace magic numbers in GDT descriptors, script-generated change Actually replace the numeric values by the new symbolic values. I used this to find all the existing users of the GDT_ENTRY*() macros: $ git grep -P 'GDT_ENTRY(_INIT)?\(' Some of the lines will exceed 80 characters, but some of them will be shorter again in the next couple of patches. Signed-off-by: Vegard Nossum Signed-off-by: Ingo Molnar Acked-by: Linus Torvalds Link: https://lore.kernel.org/r/20231219151200.2878271-4-vegard.nossum@oracle.com commit 41ef75c848e33beb1f7b981866b62b0066f744c7 Author: Vegard Nossum Date: Tue Dec 19 16:11:57 2023 +0100 x86/asm: Replace magic numbers in GDT descriptors, preparations We'd like to replace all the magic numbers in various GDT descriptors with new, semantically meaningful, symbolic values. In order to be able to verify that the change doesn't cause any actual changes to the compiled binary code, I've split the change into two patches: - Part 1 (this commit): everything _but_ actually replacing the numbers - Part 2 (the following commit): _only_ replacing the numbers The reason we need this split for verification is that including new headers causes some spurious changes to the object files, mostly line number changes in the debug info but occasionally other subtle codegen changes. Signed-off-by: Vegard Nossum Signed-off-by: Ingo Molnar Acked-by: Linus Torvalds Link: https://lore.kernel.org/r/20231219151200.2878271-3-vegard.nossum@oracle.com commit 016919c1f2e5b7ea3436abe6db0b73dbabd36682 Author: Vegard Nossum Date: Tue Dec 19 16:11:56 2023 +0100 x86/asm: Provide new infrastructure for GDT descriptors Linus suggested replacing the magic numbers in the GDT descriptors using preprocessor macros. Designing the interface properly is actually pretty hard -- there are several constraints: - you want the final expressions to be readable at a glance; something like GDT_ENTRY_FLAGS(5, 1, 0, 1, 0, 1, 1, 0) isn't because you need to visit the definition to understand what each parameter represents and then match up parameters in the user and the definition (which is hard when there are so many of them) - you want the final expressions to be fairly short/information-dense; something like GDT_ENTRY_PRESENT | GDT_ENTRY_DATA_WRITABLE | GDT_ENTRY_SYSTEM | GDT_ENTRY_DB | GDT_ENTRY_GRANULARITY_4K is a bit too verbose to write out every time and is actually hard to read as well because of all the repetition - you may want to assume defaults for some things (e.g. entries are DPL-0 a.k.a. kernel segments by default) and allow the user to override the default -- but this works best if you can OR in the override; if you want DPL-3 by default and override with DPL-0 you would need to start masking off bits instead of OR-ing them in and that just becomes harder to read - you may want to parameterize some things (e.g. CODE vs. DATA or KERNEL vs. USER) since both values are used and you don't really want prefer either one by default -- or DPL, which is always some value that is always specified This patch tries to balance these requirements and has two layers of definitions -- low-level and high-level: - the low-level defines are the mapping between human-readable names and the actual bit numbers - the high-level defines are the mapping from high-level intent to combinations of low-level flags, representing roughly a tuple (data/code/tss, 64/32/16-bits) plus an override for DPL-3 (= USER), since that's relatively rare but still very important to mark properly for those segments. - we have *_BIOS variants for 32-bit code and data segments that don't have the G flag set and give the limit in terms of bytes instead of pages [ mingo: Improved readability bit more. ] Signed-off-by: Vegard Nossum Signed-off-by: Ingo Molnar Acked-by: Linus Torvalds Link: https://lore.kernel.org/r/20231219151200.2878271-2-vegard.nossum@oracle.com commit 3f5f63adeea7e7aa715e101ffe4b4ac9705f9664 Author: Alexander Stein Date: Mon Dec 18 13:24:07 2023 +0100 clk: imx: clk-imx8qxp: fix LVDS bypass, pixel and phy clocks To be compatible with SCU firmware based on 1.15 a different clock routing for LVDS is needed. Signed-off-by: Oliver F. Brown Signed-off-by: Ranjani Vaidyanathan Signed-off-by: Alexander Stein Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20231218122407.2757175-1-alexander.stein@ew.tq-group.com/ Signed-off-by: Abel Vesa commit 21c0efbcb45cf94724d17b040ebc03fcd4a81f22 Author: Kuan-Wei Chiu Date: Mon Dec 11 01:19:07 2023 +0800 clk: imx: scu: Fix memory leak in __imx_clk_gpr_scu() In cases where imx_clk_is_resource_owned() returns false, the code path does not handle the failure gracefully, potentially leading to a memory leak. This fix ensures proper cleanup by freeing the allocated memory for 'clk_node' before returning. Signed-off-by: Kuan-Wei Chiu Reviewed-by: Peng Fan Link: https://lore.kernel.org/all/20231210171907.3410922-1-visitorckw@gmail.com/ Signed-off-by: Abel Vesa commit 023e6aad7e5e7f2e086c399abd0675589c123728 Author: Randy Dunlap Date: Fri Dec 15 20:41:46 2023 -0800 mtd: rawnand: s3c2410: fix Excess struct member description kernel-doc warnings Delete 2 lines to prevent warnings from scripts/kernel-doc: s3c2410.c:117: warning: Excess struct member 'mtd' description in 's3c2410_nand_mtd' s3c2410.c:168: warning: Excess struct member 'freq_transition' description in 's3c2410_nand_info' Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312150611.EZBAQYqf-lkp@intel.com/ Cc: Arnd Bergmann Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Cc: Krzysztof Kozlowski Cc: Alim Akhtar Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231216044146.18645-1-rdunlap@infradead.org commit 3c0e1dfa703cd2a16fbfb1290b0970b61add3cde Author: Michael Walle Date: Tue Dec 19 10:12:18 2023 +0100 MAINTAINERS: change my mail to the kernel.org one As I'm doing more and more work professionally, move away from my private mail address. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20231219091218.2846297-1-michael@walle.cc Signed-off-by: Tudor Ambarus commit af2792abd4555b676105fe3073a39cb0ed3e8bfa Author: JaimeLiao Date: Tue Dec 19 18:21:03 2023 +0800 mtd: spi-nor: sfdp: get the 1-1-8 and 1-8-8 protocol from SFDP BFPT 17th DWORD contains the information about 1-1-8 and 1-8-8. Parse BFPT DWORD[17] instruction to determine whether flash supports 1-1-8 and 1-8-8, and set its dummy cycles accordingly. Validated only the 1-1-8 read using a macronix flash with Xilinx board zynq-picozed. Signed-off-by: JaimeLiao Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20231219102103.92738-2-jaimeliao.tw@gmail.com [ta: update commit message, get rid of extra dereference] Signed-off-by: Tudor Ambarus commit c15d7802a42402a87880a17eee89ff023e49ecc0 Author: Long Li Date: Fri Dec 15 18:04:15 2023 -0800 RDMA/mana_ib: Add CQ interrupt support for RAW QP At probing time, the MANA core code allocates EQs for supporting interrupts on Ethernet queues. The same interrupt mechanisum is used by RAW QP. Use the same EQs for delivering interrupts on the CQ for the RAW QP. Signed-off-by: Long Li Link: https://lore.kernel.org/r/1702692255-23640-4-git-send-email-longli@linuxonhyperv.com Signed-off-by: Leon Romanovsky commit 2c20e20b22d9fc64072e3445ae3ca244cbd523a2 Author: Long Li Date: Fri Dec 15 18:04:14 2023 -0800 RDMA/mana_ib: query device capabilities With RDMA device registered, use it to query on hardware capabilities and cache this information for future query requests to the driver. Signed-off-by: Long Li Link: https://lore.kernel.org/r/1702692255-23640-3-git-send-email-longli@linuxonhyperv.com Signed-off-by: Leon Romanovsky commit a7f0636d223ca9d074eb5b4ae71425e082c5c1e1 Author: Long Li Date: Fri Dec 15 18:04:13 2023 -0800 RDMA/mana_ib: register RDMA device with GDMA Software client needs to register with the RDMA management interface on the SoC to access more features, including querying device capabilities and RC queue pair. Signed-off-by: Long Li Link: https://lore.kernel.org/r/1702692255-23640-2-git-send-email-longli@linuxonhyperv.com Signed-off-by: Leon Romanovsky commit 93c4bb3666a3d463c73a66ab3cc78a4c4b83631a Author: Marc Ferland Date: Mon Dec 18 10:02:30 2023 -0500 w1: ds2433: add support for ds28ec20 eeprom The ds28ec20 eeprom is (almost) backward compatible with the ds2433. The only differences are: - the eeprom size is now 2560 bytes instead of 512; - the number of pages is now 80 (same page size as the ds2433: 256 bits); - the programming time has increased from 5ms to 10ms; This patch adds support for the ds28ec20 to the ds2433 driver. From the datasheet: The DS28EC20 provides a high degree of backward compatibility with the DS2433. Besides the different family codes, the only protocol change that is required on an existing DS2433 implementation is a lengthening of the programming duration (tPROG) from 5ms to 10ms. dmesg now returns: w1_master_driver w1_bus_master1: Attaching one wire slave 43.000000478756 crc e0 instead of: w1_master_driver w1_bus_master1: Attaching one wire slave 43.000000478756 crc e0 w1_master_driver w1_bus_master1: Family 43 for 43.000000478756.e0 is not registered. Test script writing/reading random data (CONFIG_W1_SLAVE_DS2433_CRC is not set): #!/bin/sh EEPROM=/sys/bus/w1/devices/43-000000478756/eeprom BINFILE1=/home/root/file1.bin BINFILE2=/home/root/file2.bin for BS in 1 2 3 4 8 16 32 64 128 256 512 1024 2560; do dd if=/dev/random of=${BINFILE1} bs=${BS} count=1 status=none dd if=${BINFILE1} of=${EEPROM} status=none dd if=${EEPROM} of=${BINFILE2} bs=${BS} count=1 status=none if ! cmp --silent ${BINFILE1} ${BINFILE2}; then echo file1 hexdump ${BINFILE1} echo file2 hexdump ${BINFILE2} echo FAIL exit 1 fi echo "${BS} OK!" done Results: # ./test.sh 1 OK! 2 OK! 3 OK! 4 OK! 8 OK! 16 OK! 32 OK! 64 OK! 128 OK! 256 OK! 512 OK! 1024 OK! 2560 OK! Tests with CONFIG_W1_SLAVE_DS2433_CRC=y: $ cat /proc/config.gz | gunzip | grep CONFIG_W1_SLAVE_DS2433 CONFIG_W1_SLAVE_DS2433=m CONFIG_W1_SLAVE_DS2433_CRC=y # create a 32 bytes block with a crc, i.e.: 00000000 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 |123456789:;<=>?@| 00000010 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e ba 63 |ABCDEFGHIJKLMN.c| # fill all 80 blocks $ dd if=test.bin of=/sys/bus/w1/devices/43-000000478756/eeprom bs=32 count=80 # read back all blocks, i.e.: $ hexdump -C /sys/bus/w1/devices/43-000000478756/eeprom 00000000 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 |123456789:;<=>?@| 00000010 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e ba 63 |ABCDEFGHIJKLMN.c| 00000020 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 |123456789:;<=>?@| 00000030 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e ba 63 |ABCDEFGHIJKLMN.c| ... 000009e0 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 |123456789:;<=>?@| 000009f0 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e ba 63 |ABCDEFGHIJKLMN.c| 00000a00 Note: both memories (ds2433 and ds28ec20) have been tested with the new driver. Signed-off-by: Marc Ferland Co-developed-by: Jean-Francois Dagenais Signed-off-by: Jean-Francois Dagenais Link: https://lore.kernel.org/r/20231218150230.1992448-6-marc.ferland@sonatest.com Signed-off-by: Krzysztof Kozlowski commit 3fe3a1bfef75efcdfbcca955fe1d47ec07215110 Author: Marc Ferland Date: Mon Dec 18 10:02:29 2023 -0500 w1: ds2433: use the kernel bitmap implementation The ds2433 driver uses the 'validcrc' variable to mark out which pages have been successfully (crc is valid) retrieved from the eeprom and placed in the internal 'memory' buffer (see CONFIG_W1_SLAVE_DS2433_CRC). The current implementation assumes that the number of pages will never go beyond 32 pages (bit field is a u32). This is fine for the ds2433 since it only has 16 pages. On the ds28ec20 though, the number of pages increases to 80 which will not fit on a single u32. As a solution, I replaced the u32 variable with a standard bitmap and set the number of bits to 32 which is the same size we had before. Signed-off-by: Marc Ferland Link: https://lore.kernel.org/r/20231218150230.1992448-5-marc.ferland@sonatest.com Signed-off-by: Krzysztof Kozlowski commit 75f0c1c78d709f258004562a540c83bc05bfb962 Author: Marc Ferland Date: Mon Dec 18 10:02:28 2023 -0500 w1: ds2433: introduce a configuration structure Add a ds2433_config structure for parameters that are different between the ds2433 and the ds28ec20. The goal is to reuse the same code for both chips. A pointer to this config structure is added to w1_f23_data and the CONFIG_W1_SLAVE_DS2433_CRC ifdefs are adjusted since now both driver configurations (with or without crc support) will make use of w1_f23_data. Also, the 'memory' buffer is now dynamically allocated based on the size specififed in the config structure to help support memories of different sizes. Signed-off-by: Marc Ferland Link: https://lore.kernel.org/r/20231218150230.1992448-4-marc.ferland@sonatest.com Signed-off-by: Krzysztof Kozlowski commit 86626c06d651c72bc10c25f263e98fa90655b5ae Author: Marc Ferland Date: Mon Dec 18 10:02:27 2023 -0500 w1: ds2433: remove unused definitions Both W1_F23_TIME and W1_PAGE_COUNT are unused, get rid of them. Signed-off-by: Marc Ferland Link: https://lore.kernel.org/r/20231218150230.1992448-3-marc.ferland@sonatest.com Signed-off-by: Krzysztof Kozlowski commit d605ba72e9c04efc35fcf225df59d4ccb1d4061f Author: Marc Ferland Date: Mon Dec 18 10:02:26 2023 -0500 w1: ds2490: support block sizes larger than 128 bytes in ds_read_block The current ds_read_block function only supports block sizes up to 128 bytes, which is the depth of the 'data out' fifo on the ds2490. Reading larger blocks will fail with a: -110 (ETIMEDOUT) from usb_control_msg(). Example: $ dd if=/sys/bus/w1/devices/43-000000478756/eeprom bs=256 count=1 yields to the following message from the kernel: usb 5-1: Failed to write 1-wire data to ep0x2: err=-110. I discovered this issue while implementing support for the ds28ec20 eeprom in the w1-2433 driver. This driver accepts reading blocks of sizes up to the size of the entire memory (2560 bytes in the case of the ds28ec20). Note that this issue _does not_ arise when the kernel is configured with CONFIG_W1_SLAVE_DS2433_CRC enabled since in this mode the driver reads one 32 byte block at a time (a single memory page). Also, from the ds2490 datasheet (2995.pdf, page 22, BLOCK I/O command): For a block write sequence the EP2 FIFO must be pre-filled with data before command execution. Additionally, for block sizes greater then the FIFO size, the FIFO content status must be monitored by host SW so that additional data can be sent to the FIFO when necessary. A similar EP3 FIFO content monitoring requirement exists for block read sequences. During a block read the number of bytes loaded into the EP3 FIFO must be monitored so that the data can be read before the FIFO overflows. Breaking the block in smaller 128 bytes chunks and simply calling the original code sequence has solved the issue for me. Tested with a DS1490F usb<->one-wire adapter and both the DS28EC20 and DS2433 eeprom memories. Signed-off-by: Marc Ferland Link: https://lore.kernel.org/r/20231218150230.1992448-2-marc.ferland@sonatest.com [krzysztof: fix checkpatch 'spaces preferred around'] Signed-off-by: Krzysztof Kozlowski commit 82a8903a9f9f3ff31027b9a0b92f7505f981f09c Author: Selvin Xavier Date: Tue Dec 19 20:31:57 2023 -0800 RDMA/bnxt_re: Fix the sparse warnings Fix the following warnings reported drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: warning: invalid assignment: |= drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: left side has type restricted __le16 drivers/infiniband/hw/bnxt_re/qplib_rcfw.c:909:27: right side has type unsigned long ... drivers/infiniband/hw/bnxt_re/qplib_fp.c:1620:44: warning: invalid assignment: |= drivers/infiniband/hw/bnxt_re/qplib_fp.c:1620:44: left side has type restricted __le64 drivers/infiniband/hw/bnxt_re/qplib_fp.c:1620:44: right side has type unsigned long long Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312200537.HoNqPL5L-lkp@intel.com/ Fixes: 07f830ae4913 ("RDMA/bnxt_re: Adds MSN table capability for Gen P7 adapters") Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1703046717-8914-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 9248f363d0791a548a9c7711365b8be4c70bd375 Author: Selvin Xavier Date: Tue Dec 19 04:11:40 2023 -0800 RDMA/bnxt_re: Fix the offset for GenP7 adapters for user applications User Doorbell page indexes start at an offset for GenP7 adapters. Fix the offset that will be used for user doorbell page indexes. Fixes: a62d68581441 ("RDMA/bnxt_re: Update the BAR offsets") Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1702987900-5363-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 8be0c877fb3b671dac0cf56d1f1f9e65f9a9fb81 Author: Greg Kroah-Hartman Date: Tue Dec 19 16:43:05 2023 +0100 thunderbolt: make tb_bus_type const Now that the driver core can properly handle constant struct bus_type, move the tb_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Andreas Noever Cc: Michael Jamet Cc: Yehezkel Bernat Cc: Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/2023121904-utopia-broadcast-06d1@gregkh Signed-off-by: Greg Kroah-Hartman commit 64c166821e034dda14e7a1a2d648347662054e0e Author: Al Viro Date: Wed Dec 20 05:22:29 2023 +0000 kernfs: d_obtain_alias(NULL) will do the right thing... Signed-off-by: Al Viro Link: https://lore.kernel.org/r/20231220052229.GH1674809@ZenIV Signed-off-by: Greg Kroah-Hartman commit 5cc99b89785c55430a5674b32ad0d9e57a8ec251 Author: Christoph Hellwig Date: Sun Dec 17 17:53:59 2023 +0100 sd: only call disk_clear_zoned when needed disk_clear_zoned only needs to be called when a device reported zone managed mode first and we clear it. Add a check so that disk_clear_zoned isn't called on devices that were never zoned. This avoids a fairly expensive queue freezing when revalidating conventional devices. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20231217165359.604246-6-hch@lst.de Signed-off-by: Jens Axboe commit d73e93b4dfab10c80688b061c30048df05585c7e Author: Christoph Hellwig Date: Sun Dec 17 17:53:58 2023 +0100 block: simplify disk_set_zoned Only use disk_set_zoned to actually enable zoned device support. For clearing it, call disk_clear_zoned, which is renamed from disk_clear_zone_settings and now directly clears the zoned flag as well. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20231217165359.604246-5-hch@lst.de Signed-off-by: Jens Axboe commit 7437bb73f087e5f216f9c6603f5149d354e315af Author: Christoph Hellwig Date: Sun Dec 17 17:53:57 2023 +0100 block: remove support for the host aware zone model When zones were first added the SCSI and ATA specs, two different models were supported (in addition to the drive managed one that is invisible to the host): - host managed where non-conventional zones there is strict requirement to write at the write pointer, or else an error is returned - host aware where a write point is maintained if writes always happen at it, otherwise it is left in an under-defined state and the sequential write preferred zones behave like conventional zones (probably very badly performing ones, though) Not surprisingly this lukewarm model didn't prove to be very useful and was finally removed from the ZBC and SBC specs (NVMe never implemented it). Due to to the easily disappearing write pointer host software could never rely on the write pointer to actually be useful for say recovery. Fortunately only a few HDD prototypes shipped using this model which never made it to mass production. Drop the support before it is too late. Note that any such host aware prototype HDD can still be used with Linux as we'll now treat it as a conventional HDD. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20231217165359.604246-4-hch@lst.de Signed-off-by: Jens Axboe commit a971ed8002110f211899279cd7295756d263b771 Author: Christoph Hellwig Date: Sun Dec 17 17:53:56 2023 +0100 virtio_blk: remove the broken zone revalidation support virtblk_revalidate_zones is called unconditionally from virtblk_config_changed_work from the virtio config_changed callback. virtblk_revalidate_zones is a bit odd in that it re-clears the zoned state for host aware or non-zoned devices, which isn't needed unless the zoned mode changed - but a zone mode change to a host managed model isn't handled at all, and virtio_blk also doesn't handle any other config change except for a capacity change is handled (and even if it was the upper layers above virtio_blk wouldn't handle it very well). But even the useful case of a size change that would add or remove zones isn't handled properly as blk_revalidate_disk_zones expects the device capacity to cover all zones, but the capacity is only updated after virtblk_revalidate_zones. As this code appears to be entirely untested and is getting in the way remove it for now, but it can be readded in a fixed version with proper test coverage if needed. Fixes: 95bfec41bd3d ("virtio-blk: add support for zoned block devices") Fixes: f1ba4e674feb ("virtio-blk: fix to match virtio spec") Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Stefan Hajnoczi Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20231217165359.604246-3-hch@lst.de Signed-off-by: Jens Axboe commit 77360cadaae562f437b3e98dc3af748d8d75bdc2 Author: Christoph Hellwig Date: Sun Dec 17 17:53:55 2023 +0100 virtio_blk: cleanup zoned device probing Move reading and checking the zoned model from virtblk_probe_zoned_device into the caller, leaving only the code to perform the actual setup for host managed zoned devices in virtblk_probe_zoned_device. This allows to share the model reading and sharing between builds with and without CONFIG_BLK_DEV_ZONED, and improve it for the !CONFIG_BLK_DEV_ZONED case. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Reviewed-by: Stefan Hajnoczi Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20231217165359.604246-2-hch@lst.de Signed-off-by: Jens Axboe commit 441c725ed592cb22f2a82f2827dccd045356cc81 Author: Hou Tao Date: Tue Dec 19 21:57:27 2023 +0800 selftests/bpf: Close cgrp fd before calling cleanup_cgroup_environment() There is error log when htab-mem benchmark completes. The error log looks as follows: $ ./bench htab-mem -d1 Setting up benchmark 'htab-mem'... Benchmark 'htab-mem' started. ...... (cgroup_helpers.c:353: errno: Device or resource busy) umount cgroup2 Fix it by closing cgrp fd before invoking cleanup_cgroup_environment(). Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231219135727.2661527-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 85dd93ac6e00adf09fc27e4d2e7f5c9aaf275d38 Merge: c337f237291b4 f0a5056222f2c Author: Alexei Starovoitov Date: Tue Dec 19 18:06:47 2023 -0800 Merge branch 'enhance-bpf-global-subprogs-with-argument-tags' Andrii Nakryiko says: ==================== Enhance BPF global subprogs with argument tags This patch set adds verifier support for annotating user's global BPF subprog arguments with few commonly requested annotations, to improve global subprog verification experience. These tags are: - ability to annotate a special PTR_TO_CTX argument; - ability to annotate a generic PTR_TO_MEM as non-null. We utilize btf_decl_tag attribute for this and provide two helper macros as part of bpf_helpers.h in libbpf (patch #8). Besides this we also add abilit to pass a pointer to dynptr into global subprog. This is done based on type name match (struct bpf_dynptr *). This allows to pass dynptrs into global subprogs, for use cases that deal with variable-sized generic memory pointers. Big chunk of the patch set (patches #1 through #5) are various refactorings to make verifier internals around global subprog validation logic easier to extend and support long term, eliminating BTF parsing logic duplication, factoring out argument expectation definitions from BTF parsing, etc. New functionality is added in patch #6 (ctx and non-null) and patch #7 (dynptr), extending global subprog checks with awareness for arg tags. Patch #9 adds simple tests validating each of the added tags and dynptr argument passing. Patch #10 adds a simple negative case for freplace programs to make sure that target BPF programs with "unreliable" BTF func proto cannot be freplaced. v2->v3: - patch #10 improved by checking expected verifier error (Eduard); v1->v2: - dropped packet args for now (Eduard); - added back unreliable=true detection for entry BPF programs (Eduard); - improved subprog arg validation (Eduard); - switched dynptr arg from tag to just type name based check (Eduard). ==================== Link: https://lore.kernel.org/r/20231215011334.2307144-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit f0a5056222f2cfa6d40b4c888cb6b01e8569e282 Author: Andrii Nakryiko Date: Thu Dec 14 17:13:34 2023 -0800 selftests/bpf: add freplace of BTF-unreliable main prog test Add a test validating that freplace'ing another main (entry) BPF program fails if the target BPF program doesn't have valid/expected func proto BTF. We extend fexit_bpf2bpf test to allow to specify expected log message for negative test cases (where freplace program is expected to fail to load). Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-11-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 0a0ffcac92d5b41133c97d260ad1f320572783a5 Author: Andrii Nakryiko Date: Thu Dec 14 17:13:33 2023 -0800 selftests/bpf: add global subprog annotation tests Add test cases to validate semantics of global subprog argument annotations: - non-null pointers; - context argument; - const dynptr passing; - packet pointers (data, metadata, end). Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit aae9c25dda159045b223ecb471cd0729ccec8285 Author: Andrii Nakryiko Date: Thu Dec 14 17:13:32 2023 -0800 libbpf: add __arg_xxx macros for annotating global func args Add a set of __arg_xxx macros which can be used to augment BPF global subprogs/functions with extra information for use by BPF verifier. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit a64bfe618665ea9c722f922cba8c6e3234eac5ac Author: Andrii Nakryiko Date: Thu Dec 14 17:13:31 2023 -0800 bpf: add support for passing dynptr pointer to global subprog Add ability to pass a pointer to dynptr into global functions. This allows to have global subprogs that accept and work with generic dynptrs that are created by caller. Dynptr argument is detected based on the name of a struct type, if it's "bpf_dynptr", it's assumed to be a proper dynptr pointer. Both actual struct and forward struct declaration types are supported. This is conceptually exactly the same semantics as bpf_user_ringbuf_drain()'s use of dynptr to pass a variable-sized pointer to ringbuf record. So we heavily rely on CONST_PTR_TO_DYNPTR bits of already existing logic in the verifier. During global subprog validation, we mark such CONST_PTR_TO_DYNPTR as having LOCAL type, as that's the most unassuming type of dynptr and it doesn't have any special helpers that can try to free or acquire extra references (unlike skb, xdp, or ringbuf dynptr). So that seems like a safe "choice" to make from correctness standpoint. It's still possible to pass any type of dynptr to such subprog, though, because generic dynptr helpers, like getting data/slice pointers, read/write memory copying routines, dynptr adjustment and getter routines all work correctly with any type of dynptr. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 94e1c70a34523b5e1529e4ec508316acc6a26a2b Author: Andrii Nakryiko Date: Thu Dec 14 17:13:30 2023 -0800 bpf: support 'arg:xxx' btf_decl_tag-based hints for global subprog args Add support for annotating global BPF subprog arguments to provide more information about expected semantics of the argument. Currently, verifier relies purely on argument's BTF type information, and supports three general use cases: scalar, pointer-to-context, and pointer-to-fixed-size-memory. Scalar and pointer-to-fixed-mem work well in practice and are quite natural to use. But pointer-to-context is a bit problematic, as typical BPF users don't realize that they need to use a special type name to signal to verifier that argument is not just some pointer, but actually a PTR_TO_CTX. Further, even if users do know which type to use, it is limiting in situations where the same BPF program logic is used across few different program types. Common case is kprobes, tracepoints, and perf_event programs having a helper to send some data over BPF perf buffer. bpf_perf_event_output() requires `ctx` argument, and so it's quite cumbersome to share such global subprog across few BPF programs of different types, necessitating extra static subprog that is context type-agnostic. Long story short, there is a need to go beyond types and allow users to add hints to global subprog arguments to define expectations. This patch adds such support for two initial special tags: - pointer to context; - non-null qualifier for generic pointer arguments. All of the above came up in practice already and seem generally useful additions. Non-null qualifier is an often requested feature, which currently has to be worked around by having unnecessary NULL checks inside subprogs even if we know that arguments are never NULL. Pointer to context was discussed earlier. As for implementation, we utilize btf_decl_tag attribute and set up an "arg:xxx" convention to specify argument hint. As such: - btf_decl_tag("arg:ctx") is a PTR_TO_CTX hint; - btf_decl_tag("arg:nonnull") marks pointer argument as not allowed to be NULL, making NULL check inside global subprog unnecessary. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit f18c3d88deedf0defc3e4800341cc7bcaaabcdf9 Author: Andrii Nakryiko Date: Thu Dec 14 17:13:29 2023 -0800 bpf: reuse subprog argument parsing logic for subprog call checks Remove duplicated BTF parsing logic when it comes to subprog call check. Instead, use (potentially cached) results of btf_prepare_func_args() to abstract away expectations of each subprog argument in generic terms (e.g., "this is pointer to context", or "this is a pointer to memory of size X"), and then use those simple high-level argument type expectations to validate actual register states to check if they match expectations. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c5a7244759b1eeacc59d0426fb73859afa942d0d Author: Andrii Nakryiko Date: Thu Dec 14 17:13:28 2023 -0800 bpf: move subprog call logic back to verifier.c Subprog call logic in btf_check_subprog_call() currently has both a lot of BTF parsing logic (which is, presumably, what justified putting it into btf.c), but also a bunch of register state checks, some of each utilize deep verifier logic helpers, necessarily exported from verifier.c: check_ptr_off_reg(), check_func_arg_reg_off(), and check_mem_reg(). Going forward, btf_check_subprog_call() will have a minimum of BTF-related logic, but will get more internal verifier logic related to register state manipulation. So move it into verifier.c to minimize amount of verifier-specific logic exposed to btf.c. We do this move before refactoring btf_check_func_arg_match() to preserve as much history post-refactoring as possible. No functional changes. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit e26080d0da87f20222ca6712b65f95a856fadee0 Author: Andrii Nakryiko Date: Thu Dec 14 17:13:27 2023 -0800 bpf: prepare btf_prepare_func_args() for handling static subprogs Generalize btf_prepare_func_args() to support both global and static subprogs. We are going to utilize this property in the next patch, reusing btf_prepare_func_args() for subprog call logic instead of reparsing BTF information in a completely separate implementation. btf_prepare_func_args() now detects whether subprog is global or static makes slight logic adjustments for static func cases, like not failing fatally (-EFAULT) for conditions that are allowable for static subprogs. Somewhat subtle (but major!) difference is the handling of pointer arguments. Both global and static functions need to handle special context arguments (which are pointers to predefined type names), but static subprogs give up on any other pointers, falling back to marking subprog as "unreliable", disabling the use of BTF type information altogether. For global functions, though, we are assuming that such pointers to unrecognized types are just pointers to fixed-sized memory region (or error out if size cannot be established, like for `void *` pointers). This patch accommodates these small differences and sets up a stage for refactoring in the next patch, eliminating a separate BTF-based parsing logic in btf_check_func_arg_match(). Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 5eccd2db42d77e3570619c32d39e39bf486607cf Author: Andrii Nakryiko Date: Thu Dec 14 17:13:26 2023 -0800 bpf: reuse btf_prepare_func_args() check for main program BTF validation Instead of btf_check_subprog_arg_match(), use btf_prepare_func_args() logic to validate "trustworthiness" of main BPF program's BTF information, if it is present. We ignored results of original BTF check anyway, often times producing confusing and ominously-sounding "reg type unsupported for arg#0 function" message, which has no apparent effect on program correctness and verification process. All the -EFAULT returning sanity checks are already performed in check_btf_info_early(), so there is zero reason to have this duplication of logic between btf_check_subprog_call() and btf_check_subprog_arg_match(). Dropping btf_check_subprog_arg_match() simplifies btf_check_func_arg_match() further removing `bool processing_call` flag. One subtle bit that was done by btf_check_subprog_arg_match() was potentially marking main program's BTF as unreliable. We do this explicitly now with a dedicated simple check, preserving the original behavior, but now based on well factored btf_prepare_func_args() logic. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 4ba1d0f23414135e4f426dae4cb5cdc2ce246f89 Author: Andrii Nakryiko Date: Thu Dec 14 17:13:25 2023 -0800 bpf: abstract away global subprog arg preparation logic from reg state setup btf_prepare_func_args() is used to understand expectations and restrictions on global subprog arguments. But current implementation is hard to extend, as it intermixes BTF-based func prototype parsing and interpretation logic with setting up register state at subprog entry. Worse still, those registers are not completely set up inside btf_prepare_func_args(), requiring some more logic later in do_check_common(). Like calling mark_reg_unknown() and similar initialization operations. This intermixing of BTF interpretation and register state setup is problematic. First, it causes duplication of BTF parsing logic for global subprog verification (to set up initial state of global subprog) and global subprog call sites analysis (when we need to check that whatever is being passed into global subprog matches expectations), performed in btf_check_subprog_call(). Given we want to extend global func argument with tags later, this duplication is problematic. So refactor btf_prepare_func_args() to do only BTF-based func proto and args parsing, returning high-level argument "expectations" only, with no regard to specifics of register state. I.e., if it's a context argument, instead of setting register state to PTR_TO_CTX, we return ARG_PTR_TO_CTX enum for that argument as "an argument specification" for further processing inside do_check_common(). Similarly for SCALAR arguments, PTR_TO_MEM, etc. This allows to reuse btf_prepare_func_args() in following patches at global subprog call site analysis time. It also keeps register setup code consistently in one place, do_check_common(). Besides all this, we cache this argument specs information inside env->subprog_info, eliminating the need to redo these potentially expensive BTF traversals, especially if BPF program's BTF is big and/or there are lots of global subprog calls. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231215011334.2307144-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c337f237291b41b308c80124236876cf66c77906 Merge: 1728df7fc11bf 463ea64eb008b Author: Alexei Starovoitov Date: Tue Dec 19 17:18:56 2023 -0800 Merge branch 'bpf-support-to-track-bpf_jne' Menglong Dong says: ==================== bpf: support to track BPF_JNE For now, the reg bounds is not handled for BPF_JNE case, which can cause the failure of following case: /* The type of "a" is u32 */ if (a > 0 && a < 100) { /* the range of the register for a is [0, 99], not [1, 99], * and will cause the following error: * * invalid zero-sized read * * as a can be 0. */ bpf_skb_store_bytes(skb, xx, xx, a, 0); } In the code above, "a > 0" will be compiled to "if a == 0 goto xxx". In the TRUE branch, the dst_reg will be marked as known to 0. However, in the fallthrough(FALSE) branch, the dst_reg will not be handled, which makes the [min, max] for a is [0, 99], not [1, 99]. In the 1st patch, we reduce the range of the dst reg if the src reg is a const and is exactly the edge of the dst reg For BPF_JNE. In the 2nd patch, we remove reduplicated s32 casting in "crafted_cases". In the 3rd patch, we just activate the test case for this logic in range_cond(), which is committed by Andrii in the commit 8863238993e2 ("selftests/bpf: BPF register range bounds tester"). In the 4th patch, we convert the case above to a testcase and add it to verifier_bounds.c. Changes since v4: - add the 2nd patch - add "{U32, U32, {0, U32_MAX}, {U32_MAX, U32_MAX}}" that we missed in the 3rd patch - add some comments to the function that we add in the 4th patch - add reg_not_equal_const() in the 4th patch Changes since v3: - do some adjustment to the crafted cases that we added in the 2nd patch - add the 3rd patch Changes since v2: - fix a typo in the subject of the 1st patch - add some comments to the 1st patch, as Eduard advised - add some cases to the "crafted_cases" Changes since v1: - simplify the code in the 1st patch - introduce the 2nd patch for the testing ==================== Link: https://lore.kernel.org/r/20231219134800.1550388-1-menglong8.dong@gmail.com Signed-off-by: Alexei Starovoitov commit 463ea64eb008b7abb63245ed69446b404bf042b1 Author: Menglong Dong Date: Tue Dec 19 21:48:00 2023 +0800 selftests/bpf: add testcase to verifier_bounds.c for BPF_JNE Add testcase for the logic that the verifier tracks the BPF_JNE for regs. The assembly function "reg_not_equal_const()" and "reg_equal_const" that we add is exactly converted from the following case: u32 a = bpf_get_prandom_u32(); u64 b = 0; a %= 8; /* the "a > 0" here will be optimized to "a != 0" */ if (a > 0) { /* now the range of a should be [1, 7] */ bpf_skb_store_bytes(skb, 0, &b, a, 0); } Signed-off-by: Menglong Dong Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231219134800.1550388-5-menglong8.dong@gmail.com Signed-off-by: Alexei Starovoitov commit 31d9cc96b1e3b28daf74938cb1233231474bbcf6 Author: Menglong Dong Date: Tue Dec 19 21:47:59 2023 +0800 selftests/bpf: activate the OP_NE logic in range_cond() The edge range checking for the registers is supported by the verifier now, so we can activate the extended logic in tools/testing/selftests/bpf/prog_tests/reg_bounds.c/range_cond() to test such logic. Besides, I added some cases to the "crafted_cases" array for this logic. These cases are mainly used to test the edge of the src reg and dst reg. All reg bounds testings has passed in the SLOW_TESTS mode: $ export SLOW_TESTS=1 && ./test_progs -t reg_bounds -j Summary: 65/18959832 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Menglong Dong Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231219134800.1550388-4-menglong8.dong@gmail.com Signed-off-by: Alexei Starovoitov commit 1de584832375d0dc4234ee406185384a58fb96ac Author: Menglong Dong Date: Tue Dec 19 21:47:58 2023 +0800 selftests/bpf: remove reduplicated s32 casting in "crafted_cases" The "S32_MIN" is already defined with s32 casting, so there is no need to do it again. Signed-off-by: Menglong Dong Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231219134800.1550388-3-menglong8.dong@gmail.com Signed-off-by: Alexei Starovoitov commit d028f87517d6775dccff4ddbca2740826f9e53f1 Author: Menglong Dong Date: Tue Dec 19 21:47:57 2023 +0800 bpf: make the verifier tracks the "not equal" for regs We can derive some new information for BPF_JNE in regs_refine_cond_op(). Take following code for example: /* The type of "a" is u32 */ if (a > 0 && a < 100) { /* the range of the register for a is [0, 99], not [1, 99], * and will cause the following error: * * invalid zero-sized read * * as a can be 0. */ bpf_skb_store_bytes(skb, xx, xx, a, 0); } In the code above, "a > 0" will be compiled to "jmp xxx if a == 0". In the TRUE branch, the dst_reg will be marked as known to 0. However, in the fallthrough(FALSE) branch, the dst_reg will not be handled, which makes the [min, max] for a is [0, 99], not [1, 99]. For BPF_JNE, we can reduce the range of the dst reg if the src reg is a const and is exactly the edge of the dst reg. Signed-off-by: Menglong Dong Acked-by: Andrii Nakryiko Acked-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20231219134800.1550388-2-menglong8.dong@gmail.com Signed-off-by: Alexei Starovoitov commit 3534b18c360525b4cff67b90db45d7b9e365bdf2 Author: Matthew Brost Date: Wed Jun 7 11:43:52 2023 -0700 drm/xe: s/XE_PTE_READ_ONLY/XE_PTE_FLAG_READ_ONLY This define is for internal PTE flags rather than fields in the hardware PTEs, rename as such. This will help in an upcoming patch to avoid further confusion. Reviewed-by: Francois Dugast Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 5e3220de6c72349f77977c62a991748d4e0fea26 Author: Matthew Brost Date: Fri Jun 9 11:19:30 2023 -0700 drm/xe: Use Xe ordered workqueue for rebind worker A mix of the system unbound wq and Xe ordered wq was used for the rebind, only use the Xe ordered wq. This will ensure only 1 rebind is occuring at a time providing a somewhat clunky work around for short comings in TTM wrt to memory contention. Once the TTM memory contention is resolved we should be able to use a dedicated non-ordered workqueue. Also add helper to queue rebind worker to avoid using wrong workqueue going forward. Reviewed-by: José Roberto de Souza Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 790bdc7cb2e7dafbac0aafc016dcb7493c925bac Author: Matthew Brost Date: Fri Jun 9 11:09:37 2023 -0700 drm/xe: Handle unmapped userptr in analyze VM A corner exists where a userptr may have no mapping when analyze VM is called, handle this case. Reviewed-by: José Roberto de Souza Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 9f8f93bee3efdba3bf7853befe2219e3a300c305 Author: Thomas Hellström Date: Fri Jun 2 14:44:23 2023 +0200 drm/xe: Emit a render cache flush after each rcs/ccs batch We need to flush render caches before fence signalling, where we might release the memory for reuse. We can't rely on userspace doing this, so flush render caches after the batch, but before user fence- and dma_fence signalling. Copy the cache flush from i915, but omit PIPE_CONTROL_FLUSH_L3, since it should be implied by the other flushes. Also omit PIPE_CONTROL_TLB_INVALIDATE since there should be no apparent need to invalidate TLB after batch completion. v2: - Update Makefile for OOB WA. Signed-off-by: Thomas Hellström Tested-by: José Roberto de Souza Reviewed-by: José Roberto de Souza #1 Reported-by: José Roberto de Souza Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/291 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/291 Signed-off-by: Rodrigo Vivi commit 85dbfe47d07cddeac959ccc9352c4b0f1683225b Author: Thomas Hellström Date: Mon Jun 5 15:04:54 2023 +0200 drm/xe: Invalidate TLB also on bind if in scratch page mode For scratch table mode we need to cover the case where a scratch PTE might have been pre-fetched and cached and used instead of that of the newly bound vma. For compute vms, invalidate TLB globally using GuC before signalling bind complete. For !long-running vms, invalidate TLB at batch start. Also document how TLB invalidation works. v2: - Fix a pointer to the comment about TLB invalidation (Jose Souza). - Add a bool to the vm whether we want to invalidate TLB at batch start. - Invalidate TLB also on BCS- and video engines at batch start where needed. - Use BIT() macro instead of explicit shift. Signed-off-by: Thomas Hellström Tested-by: José Roberto de Souza #v1 Reported-by: José Roberto de Souza #v1 Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/291 Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/291 Acked-by: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 5eeb8b443875f2a6f751ed2c77cc410fad6b2e61 Author: Gustavo Sousa Date: Fri Jun 9 11:38:15 2023 -0300 drm/xe/reg_sr: Apply limit to register whitelisting If RING_MAX_NONPRIV_SLOTS denotes the maximum number of whitelisting slots, then it makes sense to refuse going above it. v2: - Use xe_gt_err() instead of drm_err() for more detailed info in the error message. (Matt) Cc: Matt Roper Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230609143815.302540-3-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit 1011812c642c664b254986fb34264c2ee8d2bb50 Author: Gustavo Sousa Date: Fri Jun 9 11:38:14 2023 -0300 drm/xe/reg_sr: Use a single parameter for xe_reg_sr_apply_whitelist() All other parameters can be extracted from a single struct xe_hw_engine reference. This removes redundancy and simplifies the code. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230609143815.302540-2-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit f1a5a9bf14182ae659cb3b5331021662c1ee1d9a Author: Matthew Brost Date: Tue Jan 17 18:34:34 2023 -0800 drm/xe/guc: Read HXG fields from DW1 of G2H response The HXG fields are DW1 not DW0, fix this. Reviewed-by: Rodrigo Vivi Acked-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit a0385a840ca02585d16a1ed4b10b501d17853d33 Author: Francois Dugast Date: Thu Jun 8 09:59:14 2023 +0200 drm/xe: Fix some formatting issues in uAPI Fix spacing, alignment, and repeated words in the documentation. Reported-by: Oded Gabbay Signed-off-by: Francois Dugast Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit fcca94c69b9539ed741ba5875ab4f1157cd781f8 Author: Francois Dugast Date: Wed May 31 15:23:35 2023 +0000 drm/xe: Group engine related structs Move the definition of drm_xe_engine_class_instance to group it with other engine related structs and to follow the ioctls order. Reported-by: Oded Gabbay Signed-off-by: Francois Dugast Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit a4f08dbb712135680d086ffa9e8ee5c07e5fc661 Author: Francois Dugast Date: Wed May 31 15:23:34 2023 +0000 drm/xe: Use SPDX-License-Identifier instead of license text Replace the license text with its SPDX-License-Identifier for quick identification of the license and consistency with the rest of the driver. Reported-by: Oded Gabbay Signed-off-by: Francois Dugast Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 882b5d00f96a3a02874da2ffee24508df6d6b860 Author: Matt Roper Date: Fri Jun 2 16:10:54 2023 -0700 drm/xe/wa: Extend scope of Wa_14015795083 Wa_14015795083 was already implemented for DG2 and PVC, but the workaround database has been updated to extend it to more platforms. It should now apply to all platforms with graphics versions 12.00 - 12.60, as well as A-step of Xe_LPG (12.70 / 12.71). Reviewed-by: José Roberto de Souza Link: https://lore.kernel.org/r/20230602231054.1306865-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 433002ca3670769270a2f8f3a5073e9f370b0562 Author: Michael J. Ruhl Date: Mon Jun 5 12:08:56 2023 -0400 drm/xe: REBAR resize should be best effort The resizing of the PCI BAR is a best effort feature. If it is not available, it should not fail the driver probe. Rework the resize to not exit on failure. Fixes: 7f075300a318 ("drm/xe: Simplify rebar sizing") Acked-by: Lucas De Marchi Reviewed-by: Matthew Auld Signed-off-by: Michael J. Ruhl Signed-off-by: Rodrigo Vivi commit 1fce9a6f69f57318842bd2771f761f203db6f49c Author: Matt Roper Date: Fri Jun 2 16:52:10 2023 -0700 drm/xe: Don't hardcode GuC's MOCS index in register header Although PVC is currently the only platform that needs us to program a GuC register with the index of an uncached MOCS entry, it's likely other platforms will need this in the future. Rather than hardcoding PVC's index into the register header, we should just pull the appropriate index from gt->mocs.uc_index to future-proof the code. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230602235210.1314028-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 17a6726c3d3040c0a47d7ec5bd8cc4056a379017 Author: Matt Roper Date: Fri Jun 2 16:52:09 2023 -0700 drm/xe: Initialize MOCS earlier xe_mocs_init_early doesn't touch the hardware, it just sets up internal software state. There's no need to perform this step in the "forcewake held" region. Moving the init earlier will also make the uc_index values available earlier which will be important for an upcoming GuC init patch. Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230602235210.1314028-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 066d0952489b6ea269823dbbbb85d580ee6d23e0 Author: Matt Roper Date: Fri Jun 2 16:52:08 2023 -0700 drm/xe: Reformat xe_guc_regs.h Reformat the GuC register header according to the same rules used by other register headers: - Register definitions are ordered by offset - Value of #define's start on column 49 - Lowercase used for hex values No functional change. This header has some things that aren't directly related to register definitions (e.g., number of doorbells, doorbell info structure, GuC interrupt vector layout, etc. These items have been moved to the bottom of the header. Cc: Michal Wajdeczko Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230602235210.1314028-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 437bcbab1023e06edd8dbca99f5c44e5d2b30133 Author: Gustavo Sousa Date: Thu Jun 1 16:44:19 2023 -0300 drm/xe: Replace deprecated DRM_ERROR() DRM_ERROR() has been deprecated in favor of pr_err(). However, we should prefer to use xe_gt_err() or drm_err() whenever possible so we get gt- or device-specific output with the error message. v2: - Prefer drm_err() over pr_err(). (Matt, Jani) v3: - Prefer xe_gt_err() over drm_err() when possible. (Matt) v4: - Use the already available dev variable instead of xe->drm as parameter to drm_err(). (Matt) Cc: Jani Nikula Cc: Lucas De Marchi Cc: Haridhar Kalvala Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230601194419.1179609-1-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit 08516de501fae647fb29bf3b62718de56cc24014 Author: Matt Roper Date: Thu Jun 1 14:52:44 2023 -0700 drm/xe: Add kerneldoc description of multi-tile devices v2: - Fix doubled word. (Lucas) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-32-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 7bfbad97d38f1de4ffbc7d9dce6ee0128459293c Author: Matt Roper Date: Thu Jun 1 14:52:43 2023 -0700 drm/xe: Reinstate media GT support Now that tiles and GTs are handled separately and other prerequisite changes are in place, we're ready to re-enable the media GT. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-31-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 1bc728dcb8adc9f9e88f34940a94bfa314d4f7c3 Author: Matt Roper Date: Thu Jun 1 14:52:42 2023 -0700 drm/xe: Update query uapi to support standalone media Now that a higher GT count can result from either multiple tiles (with one GT each) or an extra media GT within the root tile, we need to update the query code slightly to stop looking at tile_count. FIXME: As noted previously, we need to decide on a formal direction for exposing tiles and/or GTs to userspace. v2: - Drop num_gt() function in favor of stored xe->info.gt_count. (Brian) v3: - Keep XE_QUERY_GT_TYPE_REMOTE around for now. Userspace probably doesn't actually need this, and we may remove it in the future, but for now let's avoid changing uapi. (Brian) Cc: Brian Welty Reviewed-by: Brian Welty Link: https://lore.kernel.org/r/20230601215244.678611-30-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 37efea9ca2583990fbd706af0364ce9feb16bb1a Author: Matt Roper Date: Thu Jun 1 14:52:41 2023 -0700 drm/xe: Allow GT looping and lookup on standalone media Allow xe_device_get_gt() and for_each_gt() to operate as expected on platforms with standalone media. FIXME: We need to figure out a consistent ID scheme for GTs. This patch keeps the pre-existing behavior of 0/1 being the GT IDs for both PVC (multi-tile) and MTL (multi-GT), but depending on the direction we decide to go with uapi, we may change this in the future (e.g., to return 0/1 on PVC and 0/2 on MTL). Or if we decide we only need to expose tiles to userspace and not GTs, we may not even need ID numbers for the GTs anymore. v2: - Restructure a bit to make the assertions more clear. - Clarify in commit message that the goal here is to preserve existing behavior; UAPI-visible changes may be introduced in the future once we settle on what we really want. v3: - Store total GT count in xe_device for ease of lookup. (Brian) - s/(id__++)/(id__)++/ (Gustavo) Cc: Lucas De Marchi Cc: Gustavo Sousa Cc: Brian Welty Acked-by: Gustavo Sousa Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-29-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 933b78d678213f5c045c52cbc42bbee6653af250 Author: Matt Roper Date: Thu Jun 1 14:52:40 2023 -0700 drm/xe/tlb: Obtain forcewake when doing GGTT TLB invalidations Updates to the GGTT can happen when there are no in-flight jobs keeping the hardware awake. If the GT is powered down when invalidation is requested, we will not be able to communicate with the GuC (or MMIO) and the invalidation request will go missing. Explicitly grab GT forcewake to ensure the GT and GuC are powered up during the TLB invalidation. Reviewed-by: Lucas De Marchi Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/r/20230601215244.678611-28-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit d78a4778195079e0b2820550efeecb7b25fa764a Author: Matt Roper Date: Thu Jun 1 14:52:39 2023 -0700 drm/xe: Invalidate TLB on all affected GTs during GGTT updates The GGTT is part of the tile and is shared by the primary and media GTs on platforms with a standalone media architecture. However each of these GTs has its own TLBs caching the page table lookups, and each needs to be invalidated separately. Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/r/20230601215244.678611-27-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 3e29c149b3d813c25925636135c08bf5d51372b2 Author: Matt Roper Date: Thu Jun 1 14:52:38 2023 -0700 drm/xe: Replace xe_gt_irq_postinstall with xe_irq_enable_hwe The majority of xe_gt_irq_postinstall() is really focused on the hardware engine interrupts; other GT-related interrupts such as the GuC are enabled/disabled independently. Renaming the function and making it truly GT-specific will make it more clear what the intended focus is. Disabling/masking of other interrupts (such as GuC interrupts) is unnecessary since that has already happened during the irq_reset stage, and doing so will become harmful once the media GT is re-enabled since calls to xe_gt_irq_postinstall during media GT initialization would incorrectly disable the primary GT's GuC interrupts. Also, since this function is called from gt_fw_domain_init(), it's not necessary to also call it earlier during xe_irq_postinstall; just xe_irq_resume to handle runtime resume should be sufficient. v2: - Drop unnecessary !gt check. (Lucas) - Reword some comments about enable/unmask for clarity. (Lucas) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-26-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 22a22236017631d98c8780cf03734e4383ae69d9 Author: Matt Roper Date: Thu Jun 1 14:52:37 2023 -0700 drm/xe/irq: Untangle postinstall functions The xe_irq_postinstall() never actually gets called after installing the interrupt handler. This oversight seems to get papered over due to the fact that the (misnamed) xe_gt_irq_postinstall does more than it really should and gets called in the middle of the GT initialization. The callstack for postinstall is also a bit muddled with top-level device interrupt enablement happening within platform-specific functions called from the per-tile xe_gt_irq_postinstall() function. Clean this all up by adding the missing call to xe_irq_postinstall() after installing the interrupt handler and pull top-level irq enablement up to xe_irq_postinstall where we'd expect it to be. The xe_gt_irq_postinstall() function is still a bit misnamed here; an upcoming patch will refocus its purpose and rename it. v2: - Squash in patch to actually call xe_irq_postinstall() after installing the interrupt handler. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-25-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 80d6e5874af2bb4a2fdc59029be64aa1d89a196b Author: Matt Roper Date: Thu Jun 1 14:52:36 2023 -0700 drm/xe/irq: Ensure primary GuC won't clobber media GuC's interrupt mask Although primary and media GuC share a single interrupt enable bit, they each have distinct bits in the mask register. Although we always enable interrupts for the primary GuC before the media GuC today (and never disable either of them), this might not always be the case in the future, so use a RMW when updating the mask register to ensure the other GuC's mask doesn't get clobbered. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-24-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 8e758225e52ec1acb5a0645b3750ea85cad82bbc Author: Matt Roper Date: Thu Jun 1 14:52:35 2023 -0700 drm/xe/irq: Move ASLE backlight interrupt logic Our only use of GUnit interrupts is to handle ASLE backlight operations that are reported as GUnit GSE interrupts. Move the enable/disable of these interrupts to a more sensible place, in the same area where we expect display interrupt code to be added by future patches. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-23-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 7e485d9816c134c6b54707143ee84f0adcd6c1d7 Author: Matt Roper Date: Thu Jun 1 14:52:34 2023 -0700 drm/xe: Interrupts are delivered per-tile, not per-GT IRQ delivery and handling needs to be handled on a per-tile basis. Note that this is true even for the "GT interrupts" relating to engines and GuCs --- the interrupts relating to both GTs get raised through a single set of registers in the tile's sgunit range. On true multi-tile platforms, interrupts on remote tiles are internally forwarded to the root tile; the first thing the top-level interrupt handler should do is consult the root tile's instance of DG1_MSTR_TILE_INTR to determine which tile(s) had interrupts. This register is also responsible for enabling/disabling top-level reporting of any interrupts to the OS. Although this register technically exists on all tiles, it should only be used on the root tile. The (mis)use of struct xe_gt as a target for MMIO operations in the driver makes the code somewhat confusing since we wind up needing a GT pointer to handle programming that's unrelated to the GT. To mitigate this confusion, all of the xe_gt structures used solely as an MMIO target in interrupt code are renamed to 'mmio' so that it's clear that the structure being passed does not necessarily relate to any specific GT (primary or media) that we might be dealing with interrupts for. Reworking the driver's MMIO handling to not be dependent on xe_gt is planned as a future patch series. Note that GT initialization code currently calls xe_gt_irq_postinstall() in an attempt to enable the HWE interrupts for the GT being initialized. Unfortunately xe_gt_irq_postinstall() doesn't really match its name and does a bunch of other stuff unrelated to the GT interrupts (such as enabling the top-level device interrupts). That will be addressed in future patches. v2: - Clarify commit message with explanation of why DG1_MSTR_TILE_INTR is only used on the root tile, even though it's an sgunit register that is technically present in each tile's MMIO space. (Aravind) - Also clarify that the xe_gt used as a target for MMIO operations may or may not relate to the GT we're dealing with for interrupts. (Lucas) Cc: Aravind Iddamsetty Reviewed-by: Lucas De Marchi Reviewed-by: Aravind Iddamsetty Link: https://lore.kernel.org/r/20230601215244.678611-22-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit e2682f616b91c0000a02019047605956c85dcca1 Author: Matt Roper Date: Thu Jun 1 14:52:32 2023 -0700 drm/xe: Add media GT to tile This media_gt pointer isn't actually allocated yet. Future patches will start hooking it up at appropriate places in the code, and then creation of the media GT will be added once those infrastructure changes are in place. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230601215244.678611-20-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit f6929e80cdf540d7106764bda38c4ce0601fee7b Author: Matt Roper Date: Thu Jun 1 14:52:31 2023 -0700 drm/xe: Allocate GT dynamically In preparation for re-adding media GT support, switch the primary GT within the tile to a dynamic allocation. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-19-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 1e6c20be6c83817cf68637eb334dafac3a4b2512 Author: Matt Roper Date: Thu Jun 1 14:52:30 2023 -0700 drm/xe: Drop extra_gts[] declarations and XE_GT_TYPE_REMOTE Now that tiles and GTs are handled separately, extra_gts[] doesn't really provide any useful information that we can't just infer directly. The primary GT of the root tile and of the remote tiles behave the same way and don't need independent handling. When we re-add support for media GTs in a future patch, the presence of media can be determined from MEDIA_VER() (i.e., >= 13) and media's GSI offset handling is expected to remain constant for all forseeable future platforms, so it won't need to be provided in a definition structure either. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-18-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 68ccb9b2f71b5834b703b982a2a29d5bb3fabbe9 Author: Matt Roper Date: Thu Jun 1 14:52:29 2023 -0700 drm/xe: Drop vram_id The VRAM ID is always the tile ID; there's no need to track it separately within a GT. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-17-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit ed006ba5e6e8334deb86fbc1e35d2411a4870281 Author: Matt Roper Date: Thu Jun 1 14:52:28 2023 -0700 drm/xe: Clarify 'gt' retrieval for primary tile There are a bunch of places in the driver where we need to perform non-GT MMIO against the platform's primary tile (display code, top-level interrupt enable/disable, driver initialization, etc.). Rename 'to_gt()' to 'xe_primary_mmio_gt()' to clarify that we're trying to get a primary MMIO handle for these top-level operations. In the future we need to move away from xe_gt as the target for MMIO operations (most of which are completely unrelated to GT). v2: - s/xe_primary_mmio_gt/xe_root_mmio_gt/ for more consistency with how we refer to tile 0. (Lucas) v3: - Tweak comment on xe_root_mmio_gt(). (Lucas) Acked-by: Nirmoy Das Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-16-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 08dea7674533cfd49764bcd09ba84de7143361ab Author: Matt Roper Date: Thu Jun 1 14:52:27 2023 -0700 drm/xe: Move migration from GT to tile Migration primarily focuses on the memory associated with a tile, so it makes more sense to track this at the tile level (especially since the driver was already skipping migration operations on media GTs). Note that the blitter engine used to perform the migration always lives in the tile's primary GT today. In theory that could change if media GTs ever start including blitter engines in the future, but we can extend the design if/when that happens in the future. v2: - Fix kunit test build - Kerneldoc parameter name update v3: - Removed leftover prototype for removed function. (Gustavo) - Remove unrelated / unwanted error handling change. (Gustavo) Cc: Gustavo Sousa Reviewed-by: Lucas De Marchi Acked-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230601215244.678611-15-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 876611c2b75689c6bea43bdbbbef9b358f71526a Author: Matt Roper Date: Thu Jun 1 14:52:25 2023 -0700 drm/xe: Memory allocations are tile-based, not GT-based Since memory and address spaces are a tile concept rather than a GT concept, we need to plumb tile-based handling through lots of memory-related code. Note that one remaining shortcoming here that will need to be addressed before media GT support can be re-enabled is that although the address space is shared between a tile's GTs, each GT caches the PTEs independently in their own TLB and thus TLB invalidation should be handled at the GT level. v2: - Fix kunit test build. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-13-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit ebd288cba7db7097ad50a4736ded94cb0d92fadf Author: Matt Roper Date: Thu Jun 1 14:52:23 2023 -0700 drm/xe: Move VRAM from GT to tile On platforms with VRAM, the VRAM is associated with the tile, not the GT. v2: - Unsquash the GGTT handling back into its own patch. - Fix kunit test build v3: - Tweak the "FIXME" comment to clarify that this function will be completely gone by the end of the series. (Lucas) v4: - Move a few changes that were supposed to be part of the GGTT patch back to that commit. (Gustavo) v5: - Kerneldoc parameter name fix. Cc: Gustavo Sousa Reviewed-by: Lucas De Marchi Acked-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230601215244.678611-11-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit ad703e06376d5d71acf61cac0c136b53959506bc Author: Matt Roper Date: Thu Jun 1 14:52:21 2023 -0700 drm/xe: Move GGTT from GT to tile The GGTT exists at the tile level. When a tile contains multiple GTs, they share the same GGTT. v2: - Include some changes that were mis-squashed into the VRAM patch. (Gustavo) Cc: Gustavo Sousa Reviewed-by: Lucas De Marchi Acked-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230601215244.678611-9-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 3b0d4a5579968f1c42044142a4997bab9fe7ffed Author: Matt Roper Date: Thu Jun 1 14:52:19 2023 -0700 drm/xe: Move register MMIO into xe_tile Each tile has its own register region in the BAR, containing instances of all registers for the platform. In contrast, the multiple GTs within a tile share the same MMIO space; there's just a small subset of registers (the GSI registers) which have multiple copies at different offsets (0x0 for primary GT, 0x380000 for media GT). Move the register MMIO region size/pointers to the tile structure, leaving just the GSI offset information in the GT structure. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-7-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 3643e6371542cc4782d3700f07130c9d250666d8 Author: Matt Roper Date: Thu Jun 1 14:52:18 2023 -0700 drm/xe: Add for_each_tile iterator As we start splitting tile handling out from GT handling, we'll need to be able to iterate over tiles separately from GTs. This iterator will be used in upcoming patches. v2: - s/(id__++)/(id__)++/ (Gustavo) Cc: Gustavo Sousa Reviewed-by: Lucas De Marchi Acked-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230601215244.678611-6-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit f79ee3013ad57021f4557cd3aa964a14b5c94bd4 Author: Matt Roper Date: Thu Jun 1 14:52:16 2023 -0700 drm/xe: Add backpointer from gt to tile Rather than a backpointer to the xe_device, a GT should have a backpointer to its tile (which can then be used to lookup the device if necessary). The gt_to_xe() helper macro (which moves from xe_gt.h to xe_gt_types.h) can and should still be used to jump directly from an xe_gt to xe_device. v2: - Fix kunit test build - Move a couple changes to the previous patch. (Lucas) Reviewed-by: Matt Atwood Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-4-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit a5edc7cdb3875115d1798f4d2057569cf257e7d2 Author: Matt Roper Date: Thu Jun 1 14:52:15 2023 -0700 drm/xe: Introduce xe_tile Create a new xe_tile structure to begin separating the concept of "tile" from "GT." A tile is effectively a complete GPU, and a GT is just one part of that. On platforms like MTL, there's only a single full GPU (tile) which has its IP blocks provided by two GTs. In contrast, a "multi-tile" platform like PVC is basically multiple complete GPUs packed behind a single PCI device. For now, just create xe_tile as a simple wrapper around xe_gt. The items in xe_gt that are truly tied to the tile rather than the GT will be moved in future patches. Support for multiple GTs per tile (i.e., the MTL standalone media case) will also be re-introduced in a future patch. v2: - Fix kunit test build - Move hunk from next patch to use local tile variable rather than direct xe->tiles[id] accesses. (Lucas) - Mention compute in kerneldoc. (Rodrigo) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230601215244.678611-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit dbc4f5d15a8eecf0f5e7ba1a8e563c31237f6adb Author: Matt Roper Date: Thu Jun 1 14:52:14 2023 -0700 drm/xe/mtl: Disable media GT Xe incorrectly conflates the concept of 'tile' and 'GT.' Since MTL's media support is not yet functioning properly, let's just disable it completely for now while we fix the fundamental driver design. Support for media GTs on platforms like MTL will be re-added later. v2: - Drop some unrelated code cleanup that didn't belong in this patch. (Lucas) v3: - Drop unnecessary xe_gt.h include. (Gustavo) Cc: Lucas De Marchi Cc: Gustavo Sousa Reviewed-by: Matt Atwood Reviewed-by: Lucas De Marchi Acked-by: Gustavo Sousa Link: https://lore.kernel.org/r/20230601215244.678611-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit dbd6c64c99a8eb5ed85adec5a24e30a62ace7b91 Author: Matthew Auld Date: Thu Jun 1 13:35:05 2023 +0100 drm/xe/vm: fix double list add It looks like the driver only wants to track one vma for each external object per vm. However it looks like bo_has_vm_references_locked() will ignore any vma that is marked as vma->destroyed (not actually destroyed yet). If we then mark our externally tracked vma as destroyed and then create a new vma for the same object and vm, we can have two externally tracked vma for the same object and vm. When the destroy actually happens it tries to move the external tracking to a different vma, but in this case it is already being tracked, leading to double list add errors. It should be safe to simply drop the destroyed check in bo_has_vm_references(), since the actual destroy will switch the external tracking to the next available vma. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/290 Cc: Maarten Lankhorst Cc: Thomas Hellström Signed-off-by: Matthew Auld Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit 4e40483644098ef75ea1344e5cdc9285e30c28ae Author: José Roberto de Souza Date: Tue May 23 13:14:45 2023 -0700 drm/xe: Replace PVC check by engine type check __emit_job_gen12_render_compute() masks some PIPE_CONTROL bits that do not exist in platforms without render engine. So here replacing the PVC check by something more generic that will support any future platforms without render engine. Reviewed-by: Thomas Hellström Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit fb31517cd712f9a29608bc24fbcaf45d14e9c40e Author: Michael J. Ruhl Date: Thu May 25 15:43:26 2023 -0400 drm/xe: Rename GPU offset helper to reflect true usage The _io_offset helper function is returning an offset into the GPU address space. Using the CPU address offset (io_) is not correct. Rename to reflect usage. Update to use GPU offset information. Update PT dma_offset to use the helper Reviewed-by: Matthew Auld Signed-off-by: Michael J. Ruhl Signed-off-by: Rodrigo Vivi commit 2d830096e41403ba67c9d066de2fb818f81d9591 Author: Michael J. Ruhl Date: Thu May 25 15:43:25 2023 -0400 drm/xe: Size GT device memory correctly The current method of sizing GT device memory is not quite right. Update the algorithm to use the relevant HW information and offsets to set up the sizing correctly. Update the stolen memory sizing to reflect the changes, and to be GT specific. Reviewed-by: Matthew Auld Signed-off-by: Michael J. Ruhl Signed-off-by: Rodrigo Vivi commit 7f075300a31829a6a5a388313f1a67e31eba012e Author: Michael J. Ruhl Date: Thu May 25 15:43:24 2023 -0400 drm/xe: Simplify rebar sizing "Right sizing" the PCI BAR is not necessary. If rebar is needed size to the maximum available. Preserve the force_vram_bar_size sizing. Reviewed-by: Matthew Auld Signed-off-by: Michael J. Ruhl Signed-off-by: Rodrigo Vivi commit 61f288a8972253f4168f37331e26b6b0f7c9bc9d Author: Michael J. Ruhl Date: Thu May 25 15:43:23 2023 -0400 drm/xe: Rework size helper to be a little more correct The _total_vram_size helper is device based and is not complete. Teach the helper to be tile aware and add the ability to size DG1 correctly. Reviewed-by: Matthew Auld Signed-off-by: Michael J. Ruhl Signed-off-by: Rodrigo Vivi commit 094d739f4dbb6322ae21b3dab8e6a7d272347dc7 Author: Maarten Lankhorst Date: Thu May 25 21:14:29 2023 +0200 drm/xe: Prevent evicting for page tables When creating page tables from xe_exec_ioctl, we may end up freeing memory we just validated. To be certain this does not happen, do not allow the current reservation to be evicted from the ioctl. Callchain: [ 109.008522] xe_bo_move_notify+0x5c/0xf0 [xe] [ 109.008548] xe_bo_move+0x90/0x510 [xe] [ 109.008573] ttm_bo_handle_move_mem+0xb7/0x170 [ttm] [ 109.008581] ttm_bo_swapout+0x15e/0x360 [ttm] [ 109.008586] ttm_device_swapout+0xc2/0x110 [ttm] [ 109.008592] ttm_global_swapout+0x47/0xc0 [ttm] [ 109.008598] ttm_tt_populate+0x7a/0x130 [ttm] [ 109.008603] ttm_bo_handle_move_mem+0x160/0x170 [ttm] [ 109.008609] ttm_bo_validate+0xe5/0x1d0 [ttm] [ 109.008614] ttm_bo_init_reserved+0xac/0x190 [ttm] [ 109.008620] __xe_bo_create_locked+0x153/0x260 [xe] [ 109.008645] xe_bo_create_locked_range+0x77/0x360 [xe] [ 109.008671] xe_bo_create_pin_map_at+0x33/0x1f0 [xe] [ 109.008695] xe_bo_create_pin_map+0x11/0x20 [xe] [ 109.008721] xe_pt_create+0x69/0xf0 [xe] [ 109.008749] xe_pt_stage_bind_entry+0x208/0x430 [xe] [ 109.008776] xe_pt_walk_range+0xe9/0x2a0 [xe] [ 109.008802] xe_pt_walk_range+0x223/0x2a0 [xe] [ 109.008828] xe_pt_walk_range+0x223/0x2a0 [xe] [ 109.008853] __xe_pt_bind_vma+0x28d/0xbd0 [xe] [ 109.008878] xe_vm_bind_vma+0xc7/0x2f0 [xe] [ 109.008904] xe_vm_rebind+0x72/0x160 [xe] [ 109.008930] xe_exec_ioctl+0x22b/0xa70 [xe] [ 109.008955] drm_ioctl_kernel+0xb9/0x150 [drm] [ 109.008972] drm_ioctl+0x210/0x430 [drm] [ 109.008988] __x64_sys_ioctl+0x85/0xb0 [ 109.008990] do_syscall_64+0x38/0x90 [ 109.008991] entry_SYSCALL_64_after_hwframe+0x72/0xdc Original warning: [ 5613.149126] WARNING: CPU: 3 PID: 45883 at drivers/gpu/drm/xe/xe_vm.c:504 xe_vm_unlock_dma_resv+0x43/0x50 [xe] ... [ 5613.226398] RIP: 0010:xe_vm_unlock_dma_resv+0x43/0x50 [xe] [ 5613.316098] Call Trace: [ 5613.318595] [ 5613.320743] xe_exec_ioctl+0x383/0x8a0 [xe] [ 5613.325278] ? __is_insn_slot_addr+0x8e/0x110 [ 5613.329719] ? __is_insn_slot_addr+0x8e/0x110 [ 5613.334116] ? kernel_text_address+0x75/0xf0 [ 5613.338429] ? __pfx_stack_trace_consume_entry+0x10/0x10 [ 5613.343778] ? __kernel_text_address+0x9/0x40 [ 5613.348181] ? unwind_get_return_address+0x1a/0x30 [ 5613.353013] ? __pfx_stack_trace_consume_entry+0x10/0x10 [ 5613.358362] ? arch_stack_walk+0x99/0xf0 [ 5613.362329] ? rcu_read_lock_sched_held+0xb/0x70 [ 5613.366996] ? lock_acquire+0x287/0x2f0 [ 5613.370873] ? rcu_read_lock_sched_held+0xb/0x70 [ 5613.375530] ? rcu_read_lock_sched_held+0xb/0x70 [ 5613.380181] ? lock_release+0x225/0x2e0 [ 5613.384059] ? __pfx_xe_exec_ioctl+0x10/0x10 [xe] [ 5613.389092] drm_ioctl_kernel+0xc0/0x170 [ 5613.393068] drm_ioctl+0x1b7/0x490 [ 5613.396519] ? __pfx_xe_exec_ioctl+0x10/0x10 [xe] [ 5613.401547] ? lock_release+0x225/0x2e0 [ 5613.405432] __x64_sys_ioctl+0x8a/0xb0 [ 5613.409232] do_syscall_64+0x37/0x90 Signed-off-by: Maarten Lankhorst Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/239 Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 3af4365003971946fdd2cca44858d6d16929f2d3 Author: Matthew Auld Date: Wed May 24 18:56:54 2023 +0100 drm/xe: keep pulling mem_access_get further back Lockdep is unhappy about ggtt->lock -> runtime_pm, where it seems to think this can somehow get inverted. The ggtt->lock looks like a potentially sensitive driver lock, so likely a sensible move to never call the runtime_pm routines while holding it. Actually it looks like d3cold wants to grab this, so perhaps this can indeed deadlock. v2: - Don't forget about xe_gt_tlb_invalidation_vma(), which now needs explicit access_get. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 565ce72e1c2d540d36ade02e6a7479c4c6a7f2d4 Author: Matthew Auld Date: Wed May 24 18:56:53 2023 +0100 drm/xe: don't allocate under ct->lock Seems to be a sensitive lock, where ct->lock looks to be primed with fs_reclaim, so holding that and then allocating memory will cause lockdep to complain. We need to change the ordering wrt to grabbing the ct->lock and potentially grabbing the runtime_pm, since some of the runtime_pm routines can allocate memory (or at least that's what lockdep seems to suggest). Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit a2f9f4ff07aac81e80ff1e0913fdbfdde6ba6665 Author: Matthew Auld Date: Thu May 25 12:45:43 2023 +0100 drm/xe/migrate: retain CCS aux state for vram -> vram There is no mention that migrate_copy() will skip copying the CCS aux state for all types of vram -> vram transfers. Currently we don't need such a facility but might be surprising if we ever do. v2: (Lucas): - s/lmem/vram/ in the commit message - Tidy up the code a bit; use one emit_copy_ccs() v3: - Reword the commit message Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Lucas De Marchi Acked-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit 38453f826db89045d505c2122fd8e25cd6099007 Author: Matthew Auld Date: Thu May 25 12:45:42 2023 +0100 drm/xe/bo: further limit where CCS pages are needed No need to allocate extra pages for this if we know flat-ccs AUX state is not even possible, like for normal system memory objects. Signed-off-by: Matthew Auld Cc: Thomas Hellström Reviewed-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit 3690a01ba926e3f1314d805d1af500fcf3edef7e Author: Thomas Hellström Date: Wed May 24 16:52:29 2023 +0000 drm/xe: Support copying of data between system memory bos Modify the xe_migrate_copy() function somewhat to explicitly allow copying of data between two buffer objects including system memory buffer objects. Update the migrate test accordingly. v2: - Check that buffer object sizes match when copying (Matthew Auld) Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 9922bb40e2ef98c17fb142d22843c0c70ba35e5b Author: Thomas Hellström Date: Wed May 24 16:51:42 2023 +0000 drm/xe: Fix the migrate selftest for integrated GPUs The TTM resource cursor was set up incorrectly. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 87c299fa3a97740ddc0fa9b19ee4054004686f76 Author: Lucas De Marchi Date: Fri May 26 09:43:58 2023 -0700 drm/xe/guc: Port Wa_14014475959 to xe_wa and fix it Port Wa_14014475959 to xe_wa fixing its condition. The workaround should only be applied on the primary GT, not on media. So just checking by MTL platform is not enough: checking GT is of the right type is also needed. Since the GRAPHICS_STEP() does checks the GT type, we could leave the first check as a platform one: it'd would be easier to understand and not go out of sync with the graphics_ip_map[] in drivers/gpu/drm/xe/xe_pci.c. However it also means that new platforms using the same IP wouldn't match. Prefer using the IP version. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-22-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 3e488e98fb9eb4cd9220417e69e75c8271294a02 Author: Lucas De Marchi Date: Fri May 26 09:43:57 2023 -0700 drm/xe/rtp: Also check gt type When running rules on MTL and beyond that have media as a standalone GT, the rule should only match if the gt passed as parameter match the version/range/stepping that the rule is checking. This allows workarounds affecting only the media GT to be applied only on that GT and vice-versa. For platforms before MTL, the GT will not be of media type, even if it includes media engines. Make sure to cover that case by checking if the platforma has standalone media. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-21-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 5e782507f67ab378046f6fcb9de03fd25693fdc4 Author: Lucas De Marchi Date: Fri May 26 09:43:56 2023 -0700 drm/xe/guc: Port Wa_1509372804 to xe_wa Port Wa_1509372804 to xe_wa so it's reported as active. v2: Match workaround database, starting from A0 stepping (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-20-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 2b48b0df30cea3a617a69e44ca69bec7f01ed276 Author: Lucas De Marchi Date: Fri May 26 09:43:55 2023 -0700 drm/xe/guc: Port Wa_16015675438/Wa_18020744125 to xe_wa Wa_16015675438 and Wa_18020744125 apply to DG2 using the same action and conditions. Add both to the oob rules so they are both reported as active. Note that previously they were not checking by platform or IP version, hence making them not future-proof. Those workarounds should only be active in PVC and DG2, besides the check for "no render engine". v2: From current WA database, Wa_16015675438 applies to all DG2 subplatforms except G11. Migrate condition to use subplatform and remove G11 from the match (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-19-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 63bbd800ff013d2e6053ce94524e3219cabd8315 Author: Lucas De Marchi Date: Fri May 26 09:43:54 2023 -0700 drm/xe/guc: Port Wa_22012727170/Wa_22012727685 to xe_wa Wa_22012727170 and Wa_22012727685 apply to DG2 using the same action and conditions. Add both to the oob rules so they are both reported as active. Do not Wa_22012727170 to PVC and MTL since only early A* steppings are affected. v2: Remove DG2_G10 from Wa_22012727685 to match current WA database (Matt Roper) v3: GRAPHICS_STEP(A0, FOREVER) can be left alone for DG2 as this means all steppings Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-18-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit bb0f2e05ad6c5a9f1fa325f847ea5a82002ede1d Author: Lucas De Marchi Date: Fri May 26 09:43:53 2023 -0700 drm/xe/guc: Port Wa_16011777198 to xe_wa Port Wa_16011777198 to xe_wa so it's reported as active. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-17-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 57a148d63d0b67822c44ba7253625c8dd3c13531 Author: Lucas De Marchi Date: Fri May 26 09:43:52 2023 -0700 drm/xe/guc: Port Wa_14012197797/Wa_22011391025 to xe_wa Wa_14012197797 and Wa_22011391025 apply to DG2 using the same action. They apply to slightly different conditions. Add both to the oob rules so they are both reported as active. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-16-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit fb395db74b91dc60d928d7bd3f1c4b845efd950a Author: Lucas De Marchi Date: Fri May 26 09:43:51 2023 -0700 drm/xe/guc: Port Wa_16011759253 to xe_wa Port Wa_16011759253 to oob. Wa_22011383443, that has the same action, doesn't need to be ported as it targets early PVC steppings. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-15-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 7d356b25b32eec2a33bf2bc67974ef56f0778a7c Author: Lucas De Marchi Date: Fri May 26 09:43:50 2023 -0700 drm/xe/guc: Port Wa_22012773006 to xe_wa Let xe_guc.c start using XE_WA() for workarounds, starting from a simple one: Wa_22012773006. It's also changed to start with graphics version 12, since that is the first supported by xe. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-14-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 9616e74b796c752ec29c3c83f3e33277d2b25b8e Author: Lucas De Marchi Date: Fri May 26 09:43:49 2023 -0700 drm/xe: Add support for OOB workarounds There are WAs that, due to their nature, cannot be applied from a central place like xe_wa.c. Those are peppered around the rest of the code, as needed. Now they have a new name: "out-of-band workarounds". These workarounds have their names and rules still grouped in xe_wa.c, inside the xe_wa_oob array, which is generated at compile time by xe_wa_oob.rules and the hostprog xe_gen_wa_oob. The code generation guarantees that the header xe_wa_oob.h contains the IDs for the workarounds that match the index in the table. This way the runtime checks that are spread throughout the code are simple tests against the bitmap saved during initialization. v2: Fix prev_name tracking not working when it's empty, i.e. when there is more than 1 continuation rule. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-13-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 464f2243c1fb139d8200e96648131197bf50fb27 Author: Lucas De Marchi Date: Fri May 26 09:43:48 2023 -0700 drm/xe: Include build directory When doing out-of-tree builds with O= or KBUILD_OUTPUT=, it's important to also add the directory where the target is saved. Otherwise any file generated by the build system may not be available for other targets depending on it. The $(obj) is added automatically when building the entire kernel, but it's not added when M=drivers/gpu/drm/xe is added. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-12-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit fe19328b900cc2c92054259e16d99023111c57f3 Author: Lucas De Marchi Date: Fri May 26 09:43:47 2023 -0700 drm/xe/rtp: Add support for entries with no action Add a separate struct to hold entries in a table that has no action associated with each of them. The goal is that the caller in future can set a per-context callback, or just use the active entry marking feature. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-11-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit ed73d03c0803bdb70d7e56c7d8a2518fb9376047 Author: Lucas De Marchi Date: Fri May 26 09:43:46 2023 -0700 drm/xe/rtp: Add check for media stepping Start differentiating the media and graphics stepping as it will be important for MTL. Note that RTP is still not prepared to handle the different types of GT, i.e. checking for graphics version/range/stepping on a media gt or vice versa still matches regardless of the gt being passed as parameter. Changing it to accommodate MTL is left for a future patch. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-10-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 00a5912c020df0bd4b752db714cb7256a83c0701 Author: Lucas De Marchi Date: Fri May 26 09:43:45 2023 -0700 drm/xe/rtp: Rename STEP to GRAPHICS_STEP Rename the RTP match in order to prepare the code base to check for the media version. Up until MTL, the graphics vs media distinction wrt to stepping was not ver relevant as they were the same GT. However, with MTL this is no longer true. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-9-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 40a627cafe02d44d24fa800b1d93c5d17b4649a5 Author: Lucas De Marchi Date: Fri May 26 09:43:44 2023 -0700 drm/xe/debugfs: Dump active workarounds Add a "workarounds" node in debugfs that can dump all the active workarounds using the information recorded by rtp infra when those workarounds were processed. v2: move workarounds to be reported per-GT Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-8-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 49d329a0824df79bb04d720ccdc9dbc257ec7e6b Author: Lucas De Marchi Date: Fri May 26 09:43:43 2023 -0700 drm/xe/wa: Track gt/engine/lrc active workarounds Allocate the data to track workarounds on each gt of the device, and pass that to RTP so the active workarounds are tracked. Even if the workarounds available until now are mostly device or platform centric, with the different IP versions for media and graphics starting with MTL, it's possible that some workarounds need to be applied only on select GTs. Also, given the workaround database is per IP block, for tracking purposes there is no need to differentiate the workarounds per engine class. Hence the bitmask to track active workarounds can be tracked per GT. v2: Move the tracking from per-device to per-GT basis (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-7-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit cefeb7634136b7273dff7fe20cedc95e01e51209 Author: Lucas De Marchi Date: Fri May 26 09:43:42 2023 -0700 drm/xe/rtp: Allow to track active workarounds Add the metadata in struct xe_rtp_process_ctx, to be set by xe_rtp_process_ctx_enable_active_tracking(), so rtp knows how to mark the active entries while processing the table. This can be used by the WA infra to record what are the active workarounds. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 91042671d9f3102c7e100d2e9275cae13eb63462 Author: Lucas De Marchi Date: Fri May 26 09:43:41 2023 -0700 drm/xe/rtp: Add "_sr" to entry/function names The xe_rtp_process() function and xe_rtp_entry depend on the save-restore struct. In future it will be desired to process rtp rules, regardless of adding them to a save-restore. Rename the struct and function so the intent is clear and the name is freed for future uses. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit cc982f0c168149def829f204b575fad546e9d043 Author: Lucas De Marchi Date: Fri May 26 09:43:40 2023 -0700 drm/xe/rtp: Replace XE_WARN_ON Now that rule_matches() always has an xe pointer, replace the XE_WARN_ON with the more appropriate drm_warn(). Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 72906d340b60f3dae545deef77376a0f598bece7 Author: Lucas De Marchi Date: Fri May 26 09:43:39 2023 -0700 drm/xe/rtp: Split rtp process initialization The selection between hwe and gt is exposed to the outside of rtp, by the xe_rtp_process() function. However it doesn't make seense from the caller point of view to pass a hwe and a gt as argument since the gt should always be the one containing the hwe. This clarifies the interface by separating the context creation into an initializer. The initializer then passes the correct value and there should never be a case with hwe and gt set: when hwe is passed, the gt is the one containing it. Internally the functions continue receiving the argument separately. v2: Leave the device-only context to a separate patch if they are indeed needed later Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit a9bd807eb16be11e11f6c6d3921119381cc43135 Author: Lucas De Marchi Date: Fri May 26 09:43:38 2023 -0700 drm/xe: Fix Wa_22011802037 annotation It was missing one digit, so not showing up as a proper WA number. Add the missing number and annotate it with a FIXME as there are more to be implemented to consider this WA done: ensure CS is stop before doing a reset, wait for pending. Also, this WA applies to platforms up to graphics version 1270 (with the exception of MTL A*, that are not supported in xe). Fix platform check. Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/284 Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230526164358.86393-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 58e30342c75d38606e30e02ef125252b10829450 Author: Matt Roper Date: Wed May 24 12:26:35 2023 -0700 drm/xe/pvc: Don't try to invalidate AuxCCS TLB Generally !has_flatccs implies that a platform has AuxCCS compression and thus needs to invalidate the AuxCCS TLB. However PVC is a special case because it has no compression of either type (FlatCCS or AuxCCS) so we should avoid writing to non-existent AuxCCS registers. Reviewed-by: Haridhar Kalvala Link: https://lore.kernel.org/r/20230524192635.673293-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 1799c761c48059366f081adeef718fa13d4bb133 Author: Christopher Snowhill Date: Wed May 24 18:56:07 2023 -0700 drm/xe: Validate uAPI padding and reserved fields Padding and reserved fields are declared such that they must be zeroed, so verify that they're all zero in the respective ioctl functions. Derived from original patch by mlankhorst. v2: Removed extensions checks where there were none originally. (José) Moved extraneous parentheses to the correct places. (Lucas) Signed-off-by: Maarten Lankhorst Signed-off-by: Christopher Snowhill Reviewed-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit e2bd81af05cb6dc9cbf7a367a48e43316207dd0e Author: Christopher Snowhill Date: Wed May 24 18:56:06 2023 -0700 drm/xe: Add explicit padding to uAPI definition Pad the uAPI definition so that it would align identically between 64-bit and 32-bit uarch, so consumers using this header will work correctly from 32-bit compat userspace on a 64-bit kernel. Do it in a minimally invasive way, so that 64-bit userspace will still work with the previous header, and so that no fields suddenly change sizes. Originally inspired by mlankhorst. Signed-off-by: Christopher Snowhill Reviewed-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 1b1d3710380d5f0517dcaabe1b96b6401f68ec37 Author: Niranjana Vishwanathapura Date: Tue May 16 03:26:53 2023 +0000 drm/xe: Apply upper limit to sg element size The iommu_dma_map_sg() function ensures iova allocation doesn't cross dma segment boundary. It does so by padding some sg elements. This can cause overflow, ending up with sg->length being set to 0. Avoid this by halving the maximum segment size (rounded down to PAGE_SIZE). Specify maximum segment size for sg elements by using sg_alloc_table_from_pages_segment() to allocate sg_table. v2: Use correct max segment size in dma_set_max_seg_size() call Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Bruce Chang Signed-off-by: Rodrigo Vivi commit 6ed6ba32dba14ef851ecb7190597d6bac77618e2 Author: Matt Roper Date: Wed May 24 11:59:52 2023 -0700 drm/xe: Add stepping support for GMD_ID platforms For platforms with GMD_ID registers, the IP stepping should be determined from the 'revid' field of those registers rather than from the PCI revid. The hardware teams have indicated that they plan to keep the revid => stepping mapping consistent across all GMD_ID platforms, with major steppings (A0, B0, C0, etc.) having revids that are multiples of 4, and minor steppings (A1, A2, A3, etc.) taking the intermediate values. For now we'll trust that hardware follows through on this plan; if they have to change direction in the future (e.g., they wind up needing something like an "A4" that doesn't fit this scheme), we can add a GMD_ID-based lookup table when the time comes. v2: - Set xe->info.platform before finding stepping; the pre-GMD_ID code relies on this value to pick a lookup table. v3: - Also set xe->info.subplatform before picking the stepping for pre-GMD_ID lookup. Reviewed-by: Balasubramani Vivekanandan Link: https://lore.kernel.org/r/20230524185952.666158-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit c93b6de7cc7610a269afe0e84a0b3e2b81a746cd Author: Gustavo Sousa Date: Thu May 18 18:56:51 2023 -0300 drm/xe: Fail xe_device_create() if wq allocation fails Let's make sure we give the driver a valid workqueue. While at it, also make sure to call destroy_workqueue() only if the workqueue is a valid one. That is necessary because xe_device_destroy() is indirectly called as part of the cleanup process of a failed xe_device_create(). Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230518215651.502159-3-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit b67ece5b173375451de5c3a562c43aaf410001c5 Author: Gustavo Sousa Date: Thu May 18 18:56:50 2023 -0300 drm/xe: Call drmm_add_action_or_reset() early in xe_device_create() Otherwise no cleanup is actually done if we branch to err_put. This works for now: currently we do know that, once inside xe_device_destroy(), ttm_device_init() was successful so we can safely call ttm_device_fini(); and, for xe->ordered_wq, there is an upcoming commit to check its value before calling destroy_workqueue(). However, we might need change this in the future if we have more initializers called that can fail in a way that we can not know which one was it once inside xe_device_destroy(). Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230518215651.502159-2-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit 6fedf8426d377ea9b57c91870d495006a683605e Author: Gustavo Sousa Date: Fri May 19 16:48:02 2023 -0300 drm/xe: Do not forget to drm_dev_put() in xe_pci_probe() The function drm_dev_put() should also be called if xe_device_probe() fails. v2: - Improve commit message. (Lucas) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230519194802.578182-1-gustavo.sousa@intel.com Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit 82f428b627607cd4ae0355c09b3164961b041505 Author: Matthew Auld Date: Mon May 22 11:52:52 2023 +0100 drm/xe: fix kernel-doc issues drivers/gpu/drm/xe/xe_guc_submit_types.h:47: warning: cannot understand function prototype: 'struct guc_submit_parallel_scratch ' drivers/gpu/drm/xe/xe_devcoredump_types.h:38: warning: Function parameter or member 'ct' not described in 'xe_devcoredump_snapshot' CI doesn't appear to be running BAT anymore, assuming this is caused by the CI.Hooks now failing due to above warnings. Signed-off-by: Matthew Auld Cc: Rodrigo Vivi Reviewed-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit 915757a6cbf1d77877374627a284cafe9c0de7cd Author: Michal Wajdeczko Date: Fri May 19 11:19:02 2023 +0200 drm/xe: Change GuC interrupt data Both GUC_HOST_INTERRUPT and MED_GUC_HOST_INTERRUPT can pass additional payload data to the GuC but this capability is not used by the firmware yet. Stop using value mandated by legacy GuC interrupt register and use default notify value (zero) instead. Bspec: 49813, 63363 Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 5013ad8dd75fdc035ff068980c91cf2ea821d142 Author: Michal Wajdeczko Date: Thu May 11 20:19:09 2023 +0200 drm/xe: Move Media GuC register definition to regs/ This GuC register can be moved together with the rest of the GuC register definitions and be named in a similar way. v2: fix placement Bspec: 63363 Signed-off-by: Michal Wajdeczko Reviewed-by: Matt Atwood #v1 Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 328f3414b13c06a85e447d6f2d5abd70b547c3ee Author: Rodrigo Vivi Date: Tue May 16 10:54:16 2023 -0400 drm/xe: Limit CONFIG_DRM_XE_SIMPLE_ERROR_CAPTURE to itself. There are multiple kind of config prints and with the upcoming devcoredump there will be another layer. Let's limit the config to the top level functions and leave the clean-up work for the compilers so we don't create a spider-web of configs. No functional change. Just a preparation for the devcoredump. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 01a87f3181caab1b5eca8ae5a7436c1031b6f5a8 Author: Rodrigo Vivi Date: Tue May 16 10:54:15 2023 -0400 drm/xe: Add HW Engine snapshot to xe_devcoredump. Let's continue to add our existent simple logs to devcoredump one by one. Any format change should come on follow-up work. v2: remove unnecessary, and now duplicated, dma_fence annotation. (Matthew) v3: avoid for_each with faulty_engine since that can be already freed at the time of the read/free. Instead, iterate in the full array of hw_engines. (Kasan) Cc: Francois Dugast Cc: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost Reviewed-by: Francois Dugast commit a4db55558785191a9ff0d295ccf181f18856cb58 Author: Rodrigo Vivi Date: Tue May 16 10:54:14 2023 -0400 drm/xe: Convert Xe HW Engine print to snapshot capture and print. The goal is to allow for a snapshot capture to be taken at the time of the crash, while the print out can happen at a later time through the exposed devcoredump virtual device. v2: Addressing these Matthew comments: - Handle memory allocation failures. - Do not use GFP_ATOMIC on cases like debugfs prints. - placement of @reg doc. - identation issues. v3: checkpatch v4: Rebase and get back to GFP_ATOMIC only. Signed-off-by: Rodrigo Vivi Cc: Matthew Brost Reviewed-by: Matthew Brost commit 3847ec03ddd4b688cd02929356ee979acddfa03f Author: Rodrigo Vivi Date: Tue May 16 10:54:13 2023 -0400 drm/xe: Add GuC Submit Engine snapshot to xe_devcoredump. Let's start to move our existent logs to devcoredump one by one. Any format change should come on follow-up work. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit bbdf97c140064975552bedb70b2b4329ab758f0b Author: Rodrigo Vivi Date: Tue May 16 10:54:12 2023 -0400 drm/xe: Convert GuC Engine print to snapshot capture and print. The goal is to allow for a snapshot capture to be taken at the time of the crash, while the print out can happen at a later time through the exposed devcoredump virtual device. v2: Handle memory allocation failures. (Matthew) Do not use GFP_ATOMIC on cases like debugfs prints. (Matthew) v3: checkpatch v4: pending_list allocation needs to be atomic because of the spin_lock. (Matthew) get back to GFP_ATOMIC only. (lockdep). Cc: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 1825c492daafc39e2eaeacc0f05372aca4ab6f7f Author: Rodrigo Vivi Date: Tue May 16 10:54:11 2023 -0400 drm/xe: Introduce guc_submit_types.h with relevant structs. These structs and definitions are only used for the guc_submit and they were added specifically for the parallel submission. While doing that also delete the unused struct guc_wq_item. v2: checkpatch fixes. Cc: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 5ed53446325475514b78f9072a2f85ca24fc9548 Author: Rodrigo Vivi Date: Tue May 16 10:54:10 2023 -0400 drm/xe: Add GuC CT snapshot to xe_devcoredump. Let's start to move our existent logs to devcoredump one by one. Any format change should come on follow-up work. v2: Rebase and add the dma_fence locking annotation here. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 513260dfd150a49ad117f1b7c50097a1d74c0085 Author: Rodrigo Vivi Date: Tue May 16 10:54:09 2023 -0400 drm/xe: Convert GuC CT print to snapshot capture and print. The goal is to allow for a snapshot capture to be taken at the time of the crash, while the print out can happen at a later time through the exposed devcoredump virtual device. v2: Handle memory allocation failures. (Matthew) Do not use GFP_ATOMIC on cases like debugfs prints. (Matthew) v3: checkpatch fixes v4: Do not use atomic in the g2h_worker_func (Matthew) Signed-off-by: Rodrigo Vivi Cc: Matthew Brost Reviewed-by: Matthew Brost commit a7ca8157ec7b59b597ba47cb98eaa82cb0b1d4af Author: Rodrigo Vivi Date: Tue May 16 10:54:08 2023 -0400 drm/xe: Extract non mapped regions out of GuC CTB into its own struct. No functional change here. The goal is to have a clear split between the mapped portions of the CTB and the static information, so we can easily capture snapshots that will be used for later read out with the devcoredump infrastructure. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 656d29506ca89b4af1d2380ff4cab15f40ae9e19 Author: Rodrigo Vivi Date: Tue May 16 10:54:07 2023 -0400 drm/xe: Do not take any action if our device was removed. Unfortunately devcoredump infrastructure does not provide and interface for us to force the device removal upon the pci_remove time of our device. The devcoredump is linked at the device level, so when in use it will prevent the module removal, but it doesn't prevent the call of the pci_remove callback. This callback cannot fail anyway and we end up clearing and freeing the entire pci device. Hence, after we removed the pci device, we shouldn't allow any read or free operations to avoid segmentation fault. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit e799485044cb3c0019a226ff3a92a532ca2a4e7e Author: Rodrigo Vivi Date: Thu May 18 17:12:39 2023 -0400 drm/xe: Introduce the dev_coredump infrastructure. The goal is to use devcoredump infrastructure to report error states captured at the crash time. The error state will contain useful information for GPU hang debug, such as INSTDONE registers and the current buffers getting executed, as well as any other information that helps user space and allow later replays of the error. The proposal here is to avoid a Xe only error_state like i915 and use a standard dev_coredump infrastructure to expose the error state. For our own case, the data is only useful if it is a snapshot of the time when the GPU crash has happened, since we reset the GPU immediately after and the registers might have changed. So the proposal here is to have an internal snapshot to be printed out later. Also, usually a subsequent GPU hang can be only a cause of the initial one. So we only save the 'first' hang. The dev_coredump has a delayed work queue where it remove the coredump and free all the data within a few moments of the error. When that happens we also reset our capture state and allow further snapshots. Right now this infra only print out the time of the hang. More information will be migrated here on subsequent work. Also, in order to organize the dump better, the goal is to propose dev_coredump changes itself to allow multiple files and different controls. But for now we start Xe usage of it without any dependency on dev_coredump core changes. v2: Add dma_fence annotation for capture that might happen during long running. (Thomas and Matt) Use xe->drm.primary->index on drm_info msg. (Jani) v3: checkpatch fixes v4: Fix building and locking issues found by Francois. Actually let's kill all of the locking in here. gt_reset serialization already guarantee that there will be only one capture at the same time. Also, the devcoredump has its own locking to protect the free and reads and drivers don't need to duplicate it. Besides this, the dma_fence locking was pushed to a following patch since it is not needed in this one. Fix a use after free identified by KASAN: Do not stash the faulty_engine since that will be freed somewhere else. v5: Fix Uptime - ktime_get_boottime actually returns the Uptime. (Francois) Cc: Thomas Hellström Cc: Matthew Brost Cc: Jani Nikula Cc: Daniel Vetter Cc: Francois Dugast Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 3e535bd504057bab1970b2dd1b594908ca3de74d Author: Michal Wajdeczko Date: Sun Mar 12 15:48:21 2023 +0100 drm/xe: Use GT oriented log messages in xe_gt.c Replace generic log messages with ones dedicated for the GT. While around replace errno logs from plain %d to pretty %pe. v2: rebased v3: unify errno logs Signed-off-by: Michal Wajdeczko Cc: Rodrigo Vivi Cc: Matt Roper Reviewed-by: Rodrigo Vivi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 75a6aadb9ae71a046534fb781b7c832c6586131b Author: Michal Wajdeczko Date: Mon Jan 16 20:52:57 2023 +0100 drm/xe: Introduce GT oriented log messages While debugging GT related problems, it's good to know which GT was reporting problems. Introduce helper macros to allow prefix GT logs with GT identifier. We will use them in upcoming patches. v2: use xe_ prefix (Lucas) v3: use correct include Signed-off-by: Michal Wajdeczko Cc: Lucas De Marchi Cc: Jani Nikula Cc: Rodrigo Vivi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 7cabe5580cb9dc16dcda0a163dc718e069c4c199 Author: Matthew Brost Date: Sun Apr 16 16:14:26 2023 -0700 drm/xe: Allow dma-fences as in-syncs for compute / faulting VM This is allowed and encouraged by the dma-fencing rules. This along with allowing compute VMs to export dma-fences on binds will result in a simpler compute UMD. Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit ed1df9897434a1da3f86c868825450fef47def23 Author: Matthew Brost Date: Sun Apr 16 16:17:43 2023 -0700 drm/xe: Allow compute VMs to output dma-fences on binds Binds are not long running jobs thus we can export dma-fences even if a VM is in compute mode. Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 9afd4b2d2a8df9023849ddd25d5e064b6555ee34 Author: Gustavo Sousa Date: Thu May 11 16:48:22 2023 -0300 drm/xe: Call exit functions when xe_register_pci_driver() fails Move xe_register_pci_driver() and xe_unregister_pci_driver() to init_funcs to make sure that exit functions are also called when xe_register_pci_driver() fails. Note that this also allows adding init functions to be run after xe_register_pci_driver(). v2: - Move functions to init_funcs instead of having a special case for xe_register_pci_driver(). (Jani) Cc: Jani Nikula Reviewed-by: Matt Atwood Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit a029aecaa42018a9ebc90fbf6e2920acfc4c6b3f Author: Gustavo Sousa Date: Thu May 11 16:48:21 2023 -0300 drm/xe: Get rid of MAKE_INIT_EXIT_FUNCS There is not much of a benefit from using that macro as of now and it hurts grepability or other ways of cross-referencing. Cc: Jani Nikula Reviewed-by: Matt Atwood Signed-off-by: Gustavo Sousa Signed-off-by: Rodrigo Vivi commit d0e96f3d5255f62bc9721392b198acc4d302de32 Author: Francois Dugast Date: Fri May 12 14:10:04 2023 +0200 drm/xe: Remove unused define Signed-off-by: Francois Dugast Reviewed-by: Matt Atwood Signed-off-by: Rodrigo Vivi commit 85635f5d47d7304a44bc45b419f8f31423712ef8 Author: Lucas De Marchi Date: Fri May 12 16:36:49 2023 -0700 drm/xe: Load HuC on Alderlake P Alderlake P uses TGL HuC and it was not added together with ADL-S, because it was failing for unrelated reasons. Now that those are fixed, allow it to load HuC. # cat /sys/kernel/debug/dri/0/gt0/uc/huc_info HuC firmware: i915/tgl_huc.bin status: RUNNING version: wanted 0.0, found 7.9 uCode: 589504 bytes RSA: 256 bytes HuC status: 0x00090001 Reviewed-by: Anusha Srivatsa Link: https://lore.kernel.org/r/20230512233649.3218736-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 500f90620cce13e8fd9e7dfc19701d753c4b3625 Author: Matt Roper Date: Wed Apr 19 14:37:03 2023 -0700 drm/xe/adln: Enable ADL-N ADL-N is pretty much the same as ADL-P (i.e., Xe_LP graphics + Xe_M media + Xe_LPD display). However unlike ADL-P, there's no GuC hwconfig support so the "tgl" GuC firmware should be loaded (i.e., the same situation as ADL-S). Acked-by: Nirmoy Das Reviewed-by: Ravi Kumar Vodapalli Link: https://lore.kernel.org/r/20230419213703.3993439-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 5737f74e294775b9fa7fb07f80212c5bdffd5476 Author: Matt Roper Date: Wed Apr 19 14:37:02 2023 -0700 drm/xe/adlp: Add revid => step mapping Setup the mapping from PCI revid to IP stepping for ADL-P (and its RPL-P subplatform) in case this information becomes important for implementing workarounds. Bspec: 55376 Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230419213703.3993439-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit a2db3192115d8cafa3dcae024873957929a4eae0 Author: Matthew Auld Date: Fri May 5 15:49:10 2023 +0100 drm/xe: fix tlb_invalidation_seqno_past() Checking seqno_recv >= seqno looks like it will incorrectly report true when the seqno has wrapped (not unlikely given TLB_INVALIDATION_SEQNO_MAX). Calling xe_gt_tlb_invalidation_wait() might then return before the flush has been completed by the GuC. Fix this by treating a large negative delta as an indication that the seqno has wrapped around. Similar to how we treat a large positive delta as an indication that the seqno_recv must have wrapped around, but in that case the seqno has likely also signalled. It looks like we could also potentially make the seqno use the full 32bits as supported by the GuC. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 50f1f0591638ec43eb041e27ab5e4eae47882cbc Author: Lucas De Marchi Date: Mon May 8 15:53:22 2023 -0700 drm/xe: Fix indent in xe_hw_engine_print_state() Fix the indent to align with open parenthesis, following the coding style. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230508225322.2692066-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit ee21379acc1a5c0de612097de74213aa7015471b Author: Lucas De Marchi Date: Mon May 8 15:53:21 2023 -0700 drm/xe: Rename reg field to addr Rename the address field to "addr" rather than "reg" so it's easier to understand what it is. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230508225322.2692066-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit ce8bf5bd059542431230eac216693a579dc09dba Author: Lucas De Marchi Date: Mon May 8 15:53:19 2023 -0700 drm/xe/mmio: Use struct xe_reg Convert all the callers to deal with xe_mmio_*() using struct xe_reg instead of plain u32. In a few places there was also a rename s/reg/reg_val/ when dealing with the value returned so it doesn't get mixed up with the register address. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230508225322.2692066-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 34f89ac8e66cd5121fb05c765acc3c67ddbef7a0 Author: Niranjana Vishwanathapura Date: Tue May 9 05:08:24 2023 +0000 drm/xe: Handle -EDEADLK case in exec ioctl With multiple active VMs, under memory pressure, it is possible that ttm_bo_validate() run into -EDEADLK in ttm_mem_evict_wait_busy() and return -ENOMEM. Until ttm properly handles locking in such scenarios, best thing the driver can do is unwind the lock and retry. Update xe_exec_begin to retry validating BOs with a timeout upon -ENOMEM. Reviewed-by: Thomas Hellström Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 9ca14f94d294862d6f5ee30a6b73f295cfaa5d08 Author: Niranjana Vishwanathapura Date: Mon May 8 05:22:23 2023 +0000 drm/xe: Handle -EDEADLK case in preempt worker With multiple active VMs, under memory pressure, it is possible that ttm_bo_validate() run into -EDEADLK in ttm_mem_evict_wait_busy() and return -ENOMEM. Until ttm properly handles locking in such scenarios, best thing the driver can do is unwind the lock and retry. Update preempt worker to retry validating BOs with a timeout upon -ENOMEM. v2: revert retry timeout upon -EAGAIN (Thomas) Reviewed-by: Thomas Hellström Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit e3e4964d335c73e931ea21c8f318d419d3cdb4cc Author: Mika Kuoppala Date: Wed Apr 12 14:09:23 2023 +0300 drm/xe: destroy clients engine and vm xarrays on close xe_file_close cleanups the xarrays but forgets to destroy them causing a memleak in xarray internals. Found with kmemleak. Signed-off-by: Mika Kuoppala Reviewed-by: Christoph Manszewski Reviewed-by: Lucas De Marchi Signed-off-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit a5cecbac92d5a50dd2f70a01dc53e19312f4081f Author: Nirmoy Das Date: Fri May 5 15:34:33 2023 +0200 drm/xe: Print GT info on TLB inv failure Print GT info on TLB inv failure for better debugbility. Signed-off-by: Nirmoy Das Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit a56d8dabf134e30ed898128aae6ca830c03b6abb Author: Nirmoy Das Date: Fri May 5 14:40:19 2023 +0200 drm/xe: Do not sleep in atomic Set atomic in xe_mmio_wait32() otherwise we would be scheduling in atomic context. Fixes: 7dc9b92dcfef ("drm/xe: Remove i915_utils dependency from xe_pcode.") Cc: Rodrigo Vivi Signed-off-by: Nirmoy Das Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 98ce59e9ba5cd513bd57e0f4558a33833e07f7e8 Author: Lucas De Marchi Date: Fri Apr 28 23:23:27 2023 -0700 drm/xe/guc: Handle RCU_MODE as masked from definition guc_mmio_regset_write() had a flags for the registers to be added to the GuC's regset list. The only register actually using that was RCU_MODE, but it was setting the flags to a bogus value. From struct xe_guc_fwif.h, #define GUC_REGSET_MASKED BIT(0) #define GUC_REGSET_MASKED_WITH_VALUE BIT(2) #define GUC_REGSET_RESTORE_ONLY BIT(3) Cross checking with i915, the only flag to set in RCU_MODE is GUC_REGSET_MASKED. That can be done automatically from the register, as long as the definition is correct. Add the XE_REG_OPTION_MASKED annotation to RCU_MODE and kill the "flags" field in guc_mmio_regset_write(): guc_mmio_regset_write_one() can decide that based on the register being passed. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230429062332.354139-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit a31153fcb1dc2baaf13e520f71f332d4eae28b52 Author: Lucas De Marchi Date: Thu May 4 00:32:46 2023 -0700 drm/xe/guc: Remove special handling for PVC A* The rest of the driver doesn't really support PVC before B0 stepping. Drop the special handling in xe_guc.c. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230504073250.1436293-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 215bb2ce605bb182939e4dee445b6d95e0d1b843 Author: Lucas De Marchi Date: Thu May 4 00:32:45 2023 -0700 drm/xe: Fix comment on Wa_22013088509 On i915 the "see comment about Wa_22013088509" referred to the comment in the graphics version >= 11 branch, where there were more details about it. From the platforms supported by xe, only PVC needs Wa_22013088509, but as the comment says, it's simpler to do it for all platforms as there is no downside. Bring the missing comment over from i915 and reword it to fit xe better. Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230504073250.1436293-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit dbeb2bd25350c7e771547638e266ce16030ba91c Author: Lucas De Marchi Date: Thu May 4 00:32:44 2023 -0700 drm/xe: Do not mark 1809175790 as a WA Additional programming annotated with Wa_ should be reserved to those that have a official workaround. Just pointing to a bug or additional reference can be done with something else. Copy what i915 does and refer to it as "hsdes: ....". Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230504073250.1436293-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 14dac5a5748cc477f5d8887a45ca32011b9ffea3 Author: Christopher Snowhill Date: Mon Apr 24 19:19:21 2023 -0700 drm/xe: Enable the compat ioctl functionality This is required at the minimum for the DRM UAPI to function from 32-bit userspace with a 64-bit kernel. Signed-off-by: Christopher Snowhill Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 116d32515214910d8a34538dbd09ef26a878d5ae Author: Francois Dugast Date: Thu May 4 22:29:43 2023 +0200 drm/xe: Fix splat during error dump Allow xe_bo_addr without lock to print debug information, such as from xe_analyze_vm. Signed-off-by: Francois Dugast Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit bb95a4f9f5c2e9b0a43590958ba1430519592909 Author: José Roberto de Souza Date: Fri Apr 14 20:50:33 2023 -0700 drm/xe: Set default MOCS value for copy cs instructions copy cs instructions that dont have a explict MOCS field will use this default MOCS value. v2: - move to xe_hw_engine.c - remove BLIT_CCTL auxiliary macros - removed MASKED_REG v3: - rebased v4: - process workaround in hwe->reg_lrc v5: - add a new function and call it from xe_gt_record_default_lrcs() because hwe->reg_lrc is initialized later BSpec: 45807 Cc: Matt Roper Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit e3ec5e75911b04b5e9ce67907024d7c5d9a6cb99 Author: José Roberto de Souza Date: Fri Apr 14 15:08:33 2023 -0700 drm/xe: Set default MOCS value for cs instructions CS instructions that dont have a explicit MOCS field will use this default MOCS value. To do this, it was necessary to initialize part of the mocs earlier and add new function that loads another array of rtp entries set during run-time. This is still missing to handle of mocs read for platforms with HAS_L3_CCS_READ(aka PVC). v2: - move to xe_hw_engine.c - remove CMD_CCTL auxiliary macros v3: - rebased Bspec: 45826 Cc: Matt Roper Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 9bc252522dbb0e6c34e9e0e26a599fa28555d907 Author: Gustavo Sousa Date: Wed May 3 14:49:22 2023 -0300 drm/xe: Include only relevant header in xe_module.h Things defined in are not really used by that header. Replace that with , to have bool and u32 available. Signed-off-by: Gustavo Sousa Reviewed-by: Matthew Brost Signed-off-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230503174922.252111-1-gustavo.sousa@intel.com Signed-off-by: Rodrigo Vivi commit 4c69e4b4c60a855e6726034e68d0f23029c19301 Author: José Roberto de Souza Date: Tue Apr 25 12:26:24 2023 -0700 drm/xe: Enable Raptorlake-P Raptorlake-P was tested and it is working as the same as Alderlake-P. Reviewed-by: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit ad799e4ace0dd8b81ff698dc92d6f1419fc49d4f Author: Lucas De Marchi Date: Thu Apr 27 11:44:09 2023 -0700 drm/xe: Fix media detection for pre-GMD_ID platforms Reading the GMD_ID register on platforms before that register became available is not reliable. The assumption was that since the register was not allocated, it would return 0. But on PVC for example it returns garbage (or a very specific number), triggering the following error: xe 0000:8c:00.0: [drm] *ERROR* Hardware reports unknown media version 1025.55 Fix it by stop relying on the value returned by that registers on platforms before GMD_ID. Instead this relies on the graphics description struct being already pre-set on the device: this can only ever be true for platforms before the GMD_ID support. In that case, GMD_ID is skipped and the hardcoded values are used. This should also help on early bring-up in case the GMD_ID returns something not expected and we need to temporarily hardcode values. With this, PVC doesn't trigger the error and goes straight to: xe 0000:8c:00.0: [drm:xe_display_info_init [xe]] No display IP, skipping xe 0000:8c:00.0: [drm:xe_pci_probe [xe]] XE_PVC 0bd5:002f dgfx:1 gfx:Xe_HPC (12.60) media:none (0.00) dma_m_s:52 tc:2 xe 0000:8c:00.0: [drm:xe_pci_probe [xe]] Stepping = (G:C0, M:**, D:**, B:B3) Fixes: 5822bba943ad ("drm/xe: Select graphics/media descriptors from GMD_ID") Reviewed-by: José Roberto de Souza Link: https://lore.kernel.org/r/20230427184408.1340988-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 9a56502fe1815f0032eea07ce3584acf17173ce1 Author: Lucas De Marchi Date: Thu Apr 27 15:32:56 2023 -0700 drm/xe: Move helper macros to separate header The macros to handle the RTP tables are very scary, but shouldn't be used outside of the header adding the infra. Move it to a separate header and make sure it's only included when it can be. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230427223256.1432787-11-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 07fbd1f85df18a9a33556de76499fd3693639a7d Author: Lucas De Marchi Date: Thu Apr 27 15:32:55 2023 -0700 drm/xe: Plumb xe_reg into WAs, rtp, etc Now that struct xe_reg and struct xe_reg_mcr are types that can be used by xe, convert more of the driver to use them. Some notes about the conversions: - The RTP tables don't need the MASKED flags anymore in the actions as that information now comes from the register definition - There is no need for the _XE_RTP_REG/_XE_RTP_REG_MCR macros and the register types on RTP infra: that comes from the register definitions. - When declaring the RTP entries, there is no need anymore to undef XE_REG and friends: the RTP macros deal with removing the cast where needed due to not being able to use a compound statement for initialization in the tables - The index in the reg-sr xarray is the register offset only. Otherwise we wouldn't catch mistakes about adding both a MCR-style and normal-style registers. For that, the register is now also part of the entry, so the options can be compared to check for compatible entries. In order to be able to accomplish this, some improvements are needed on the RTP macros. Change its implementation to concentrate on "pasting a prefix to each argument" rather than the more general "call any macro for each argument". Hopefully this will avoid trying to extend this infra and making it more complex. With the use of tuples for building the arguments, it's not possible to pass additional register fields and using xe_reg in the RTP tables. xe_mmio_* still need to be converted, from u32 to xe_reg, but that is left for another change. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230427223256.1432787-10-lucas.demarchi@intel.com Link: https://lore.kernel.org/r/20230427223256.1432787-6-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit ca2acce76d81fda9520b8b797119deddbe660968 Author: Lucas De Marchi Date: Thu Apr 27 15:32:54 2023 -0700 drm/xe: Annotate masked registers used by RTP Go over all registers used in xe_rtp tables and mark the registers as masked if they were passed a XE_RTP_ACTION_FLAG(MASKED_REG) flag. This will allow the flag to be removed in future when xe_rtp starts using the real xe_reg_t type. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230427223256.1432787-9-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 3512a78a3cefcd9ec0177771f637de0fe4a64ea2 Author: Lucas De Marchi Date: Thu Apr 27 15:32:53 2023 -0700 drm/xe: Use XE_REG/XE_REG_MCR These should replace the _MMIO() and MCR_REG() from i915, with the goal of being more extensible, allowing to pass the additional fields for struct xe_reg and struct xe_reg_mcr. Replace all uses of _MMIO() and MCR_REG() in xe. Since the RTP, reg-save-restore and WA infra are not ready to use the new type, just undef the macro like was done for the i915 types previously. That conversion will come later. v2: Remove MEDIA_SOFT_SCRATCH_COUNT/MEDIA_SOFT_SCRATCH re-added by mistake (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230427223256.1432787-8-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 36e22be498fb8361ef411ac7d8cf9404338f6fc2 Author: Lucas De Marchi Date: Thu Apr 27 15:32:52 2023 -0700 drm/xe: Introduce xe_reg/xe_reg_mcr Stop using i915 types for registers. Use our own types. Differently from i915, this will keep under the register definition the knowledge for the different types of registers. For now, the "flags"/"options" are mcr and masked, although only the former is being used. Additionally MCR registers have their own type. The only place that should really look inside a xe_mcr_reg_t is that code dealing with the steering and using other APIs when the register is MCR has been a source of problem in the past. Most of the driver is agnostic to the register differences since they either use the definition from the header or already call the correct MCR_REG()/_MMIO() macros. By embeding the struct xe_reg inside the struct it's also possible to guarantee the compiler will break if using RANDOM_MCR_REG.reg is attempted, since now the u32 is inside the inner struct. v2: - Deep a dedicated type for MCR registers to avoid misuse (Matt Roper, Jani) - Drop the typedef and just use a struct since it's not an opaque type (Jani) - Add more kernel-doc v3: - Use only 22 bits for the register address since all the platforms supported so far have only 4MB of MMIO per tile (Matt Roper) Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230427223256.1432787-7-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 143e3bc7832f85676d0e4235d4238f0c9b0682da Author: Lucas De Marchi Date: Thu Apr 27 15:32:50 2023 -0700 drm/xe: Clarify register types on PAT programming Clarify a few things related to the PAT programming, particularly on MTL: - The register type doesn't change depending on the GT - what happens is that media GT writes to other set of registers that are not MCR - Remove "UNICAST": otherwise it's confusing why it's not using MCR registers with the unicast function variant Also, there isn't much reason to keep those parts as macros: promote them to proper functions and let the compiler inline if it sees fit. Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230427223256.1432787-5-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 5f230a144a33d9a33448063a23d65c53b6d84cea Author: Lucas De Marchi Date: Thu Apr 27 15:32:49 2023 -0700 drm/xe: Use REG_FIELD/REG_BIT for all regs/*.h Convert the macro declarations to the equivalent GENMASK and and bitfield prep for all registers. v2 (Matt Roper): - Fix wrong conversion of RPM_CONFIG0_CRYSTAL_CLOCK_FREQ_MASK - Reorder fields of XEHP_SLICE_UNIT_LEVEL_CLKGATE for consistency - Simplify CTC_SOURCE_* by only defining CTC_SOURCE_DIVIDE_LOGIC as REG_BIT(0) v3: Also remove DOP_CLOCK_GATE_ENABLE that is unused and wrongly defined Reviewed-by: Matt Atwood Link: https://lore.kernel.org/r/20230427223256.1432787-4-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit d9b79ad275e7a98c566b3ac4b32950142d6bf9ad Author: Lucas De Marchi Date: Thu Apr 27 15:32:48 2023 -0700 drm/xe: Drop gen afixes from registers The defines for the registers were brought over from i915 while bootstrapping the driver. As xe supports TGL and later only, it doesn't make sense to keep the GEN* prefixes and suffixes in the registers: TGL is graphics version 12, previously called "GEN12". So drop the prefix everywhere. v2: - Also drop _TGL suffix and reword commit message as suggested by Matt Roper. While at it, rename VSUNIT_CLKGATE_DIS_TGL to VSUNIT_CLKGATE2_DIS with the additional "2", so it doesn't clash with the define for the other register Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230427223256.1432787-3-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 7b829f6dd638c2cb45c7710bc7cd1d0395ea9bc1 Author: Lucas De Marchi Date: Thu Apr 27 15:32:47 2023 -0700 drm/xe/guc: Convert GuC registers to REG_FIELD/REG_BIT Cleanup GuC register declarations by converting them to use REG_FIELD, REG_BIT and REG_GENMASK. While converting, also reorder the bitfields so they follow the convention of declaring the higher bits first. v2: - Drop unused HUC_LOADING_AGENT_VCR and DMA_ADDRESS_SPACE_GTT (Matt Roper) - Simplify HUC_LOADING_AGENT_GUC define (Matt Roper) Reviewed-by: Matt Atwood Link: https://lore.kernel.org/r/20230427223256.1432787-2-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 1bd4db39dee51161c48e8669e410fff0a0f69be1 Author: Maarten Lankhorst Date: Thu Apr 27 13:44:46 2023 +0200 drm/xe: Remove extra xe_mmio_read32 from xe_mmio_wait32 Commit 7aaec3a623ad ("drm/xe: Let's return last value read on xe_mmio_wait32.") mentions that we should return the last value read, but we never actually return it. This breaks display which depends on the value being actually returned where needed. Signed-off-by: Maarten Lankhorst Cc: Rodrigo Vivi Fixes: 7aaec3a623ad ("drm/xe: Let's return last value read on xe_mmio_wait32.") Reviewed-by: Lucas De Marchi Reviewed-by: Mika Kuoppala Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/257 Signed-off-by: Rodrigo Vivi commit a9b1a1361472f9094a6a3d6216d46d14b5bcc6f5 Author: Lucas De Marchi Date: Sat Apr 15 23:37:12 2023 -0700 drm/xe/guc: Move GuC registers to regs/ There's no good reason to keep the GuC registers outside the regs/ directory: move the header with GuC registers under that. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit e8178f8076dedf8526f8dc78f8fb9b3017991641 Author: Lucas De Marchi Date: Sun Apr 16 23:54:14 2023 -0700 drm/xe/guc: Rename GEN11_SOFT_SCRATCH for clarity That register is a completely different register, it's not the same as SOFT_SCRATCH for GEN11 and beyond. Rename to to the same name as the bspec uses, including the new variant for media. Also, move the definitions to the guc header. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 56492dacee943dd8241e29fe6a2d698d0029035c Author: Lucas De Marchi Date: Wed Apr 12 16:28:45 2023 -0700 drm/xe: Rename instruction field to avoid confusion There was both BLT_DEPTH_32 and XY_FAST_COLOR_BLT_DEPTH_32 - also add the prefix to the first to make it clear this is about the FAST_**COPY** operation. While at it, remove the GEN9_ prefix. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit bb36f4b4ed279c7deed936957f733b2af0d3d78f Author: Lucas De Marchi Date: Wed Apr 12 16:28:44 2023 -0700 drm/xe: Rename RC0/RC6 macros Follow up commits will mass-remove the gen prefix/suffix. For GEN6_RC0 and GEN6_RC6 that would make the variable too short and easy to conflict. So, add "GT_" prefix that is also part of the register name. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 58e19acf0cdf3f18c1c868165f45d3ea626b9c3f Author: Lucas De Marchi Date: Wed Apr 12 16:28:41 2023 -0700 drm/xe: Cleanup page-related defines Rename the following defines to lose the GEN* prefixes since they don't make sense for xe: GEN8_PTE_SHIFT -> XE_PTE_SHIFT GEN8_PAGE_SIZE -> XE_PAGE_SIZE GEN8_PTE_MASK -> XE_PTE_MASK GEN8_PDE_SHIFT -> XE_PDE_SHIFT GEN8_PDES -> XE_PDES GEN8_PDE_MASK -> XE_PDE_MASK GEN8_64K_PTE_SHIFT -> XE_64K_PTE_SHIFT GEN8_64K_PAGE_SIZE -> XE_64K_PAGE_SIZE GEN8_64K_PTE_MASK -> XE_64K_PTE_MASK GEN8_64K_PDE_MASK -> XE_64K_PDE_MASK GEN8_PDE_PS_2M -> XE_PDE_PS_2M GEN8_PDPE_PS_1G -> XE_PDPE_PS_1G GEN8_PDE_IPS_64K -> XE_PDE_IPS_64K GEN12_GGTT_PTE_LM -> XE_GGTT_PTE_LM GEN12_USM_PPGTT_PTE_AE -> XE_USM_PPGTT_PTE_AE GEN12_PPGTT_PTE_LM -> XE_PPGTT_PTE_LM GEN12_PDE_64K -> XE_PDE_64K GEN12_PTE_PS64 -> XE_PTE_PS64 GEN8_PAGE_PRESENT -> XE_PAGE_PRESENT GEN8_PAGE_RW -> XE_PAGE_RW PTE_READ_ONLY -> XE_PTE_READ_ONLY Keep an XE_ prefix to make sure we don't mix the defines for the CPU (e.g. PAGE_SIZE) with the ones fro the GPU). Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 9d3c8fb98ba31873c0ebbc42c5d8133fa59f7ac7 Author: Rodrigo Vivi Date: Wed Apr 26 12:07:20 2023 -0400 drm/xe: Fix print of RING_EXECLIST_SQ_CONTENTS_HI On xe_hw_engine_print_state we were printing: value_of(0x510) + 4 instead of value_of(0x514) as desired. So, let's properly define a RING_EXECLIST_SQ_CONTENTS_HI register to fix the issue and also to avoid other issues like that. Signed-off-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi commit 052df73b9e90305487ad9349d0fc8b59ddb6007b Author: Rodrigo Vivi Date: Wed Apr 26 09:09:40 2023 -0400 drm/xe: Update comment on why d3cold is still blocked. The main issue with buddy allocator was fixed, but then we ended up on other issues, so we need to step back and rethink our strategy with D3cold. So, let's update the comment with a todo list so we don't get tempted in removing it before we are really ready. Cc: Matthew Auld Cc: Thomas Hellström Cc: Riana Tauro Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Auld commit a121594006813eff7864a63e14573f3f5523e29c Author: José Roberto de Souza Date: Wed Apr 26 09:20:05 2023 -0700 drm/xe: Limit the system memory size to half of the system memory ttm_global_init() imposes this limitation. Cc: Matthew Auld Reviewed-by: Matthew Auld Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit fdb3abcebba5d4a647739bb79a3818bd81956f64 Author: Francois Dugast Date: Tue Apr 25 10:51:16 2023 +0200 drm/xe: Fix build without CONFIG_PM_SLEEP Build without CONFIG_PM_SLEEP (such as for riscv) was failing due to unused xe_pci_runtime_* functions. Signed-off-by: Francois Dugast Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit a180f4e13c4473f4e66e5666dbb6157d56d83dcf Author: Riana Tauro Date: Thu Apr 20 11:26:48 2023 +0530 drm/xe/guc_pc: Reorder forcewake and xe_pm_runtime calls When the device is runtime suspended, reading some of the sysfs entries under device/gt#/ causes a resume error This is due to the ordering of pm_runtime and forcewake calls. Reorder to wake up using xe_pm_runtime_get and then forcewake v2: add goto statements (Rodrigo) Signed-off-by: Riana Tauro Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 96cb46df567e04bcc569ffde9c426b078c5601b1 Author: Balasubramani Vivekanandan Date: Tue Apr 25 16:31:07 2023 +0530 drm/xe: Keep all resize bar related prints inside xe_resize_vram_bar xe_resize_vram_bar() function is already printing the status of bar resizing. It has prints covering both success and failure. There is no need of additional prints in the caller which were not so easily to follow. Modified all BAR size prints to consistently print the size in MiB. Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit e881b1292f1791826476f1a2eaf80cc85e2677c5 Author: Matt Roper Date: Tue Apr 18 16:02:47 2023 -0700 drm/xe: Drop GFX_FLSH_CNTL_GEN6 write during GGTT invalidation The write of GFX_FLSH_CNTL_GEN6 was inherited from the i915 codebase where it was used to force a flush of the write-combine buffer in cases where the GSM/GGTT were mapped as WC. Since Xe never uses WC mappings of the GGTT, this register write is unnecessary. Furthermore, this register was removed on Xe_HP-based platforms, so this write winds up clobbering an unrelated register. v2: - Also drop GFX_FLSH_CNTL_GEN6 from the register file now that it's no longer used. (Lucas) Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230418230247.3802438-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit d33dc1dc29cab7871f9b0adee7b94b4dc5de5cb1 Author: Matt Roper Date: Fri Apr 21 07:50:05 2023 -0700 drm/xe: Fix xe_mmio_rmw32 operation xe_mmio_rmw32 was failing to invert the passed in mask, resulting in a register update that wasn't the expected RMW operation. Fortunately the impact of this mistake was limited, since this function isn't heavily used in Xe right now; this will mostly fix some GuC PM interrupt unmasking. v2: - Rename parameters as 'clr' and 'set' to clarify semantics. (Lucas) Cc: Lucas De Marchi Cc: Maarten Lankhorst Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230421145006.10940-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 7500477ded53343921b24e7ec5770197af710d94 Author: Matthew Auld Date: Thu Apr 6 17:26:25 2023 +0100 drm/xe/lrc: give start_seqno a better default If looking at the initial engine dump we should expect this to match XE_FENCE_INITIAL_SEQNO - 1. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 1a9d163c4243c679e7a8d4c4abd787e40249485f Author: Matthew Auld Date: Thu Apr 6 17:26:24 2023 +0100 drm/xe/sched_job: prefer dma_fence_is_later Doesn't look like we are accounting for seqno wrap. Just use __dma_fence_is_later() like we already do for xe_hw_fence_signaled(). Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 79f2432e3138a3240a99441fc077181e2e8c8fb9 Author: Matt Roper Date: Wed Apr 19 15:49:09 2023 -0700 drm/xe/sr: Apply masked registers properly The 'clear' field for register save/restore entries was being placed in the value bits of the register rather than the mask bits; make sure it gets shifted into the mask bits. Cc: Lucas De Marchi Cc: Matt Atwood Reviewed-by: Matt Atwood Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230419224909.4000920-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit fa4fe0db0885b089200cc336207e40f6902ebbb2 Author: Matthew Auld Date: Tue Apr 18 13:41:47 2023 +0100 drm/xe/tlb: fix expected_seqno calculation It looks like when tlb_invalidation.seqno overflows TLB_INVALIDATION_SEQNO_MAX, we start counting again from one, as per send_tlb_invalidation(). This is also inline with initial value we give it in xe_gt_tlb_invalidation_init(). When calculating the expected_seqno we should also take this into account. While we are here also print out the values if we ever trigger the warning. v2 (José): - drm_WARN_ON() is preferred over plain WARN_ON(), since it gives information on the originating device. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/248 Signed-off-by: Matthew Auld Cc: José Roberto de Souza Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit a8a39c15b011b8ed986f55c6e52e015b0d81da8a Author: Anusha Srivatsa Date: Tue Apr 11 15:53:51 2023 -0700 drm/xe: Add Rocketlake device info Add missing device info for Rocketlake. While at it, also set the value for IS_ROCKETLAKE macro which is right now set to 0. v2: Also add abox_mask to the device info(Lucas) v3: rebase v4: Set IS_ROCKETLAKE (Anusha) Cc: Matt Roper Signed-off-by: Anusha Srivatsa Tested-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi (v2) Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 221896e54a30282e7dce2f7f228d4f49b2b970c2 Author: Matthew Auld Date: Tue Apr 11 11:04:58 2023 +0100 drm/xe/mmio: stop incorrectly triggering drm_warn CI keeps triggering: xe 0000:03:00.0: [drm] Restricting VRAM size to PCI resource size (0x400000000->0x3fa000000) Due to usable_size vs vram_size differences. However, we only want to trigger the drm_warn() to let developers know that the system they are using is going clamp the VRAM size to match the IO size, where they can likely only use 256M of VRAM. Once we properly support small-bar we can revisit this. v2 (Lucas): Drop the TODO for now Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 94324e6bed4b5d973c0df5d2d7d0f50503306a28 Author: Anusha Srivatsa Date: Thu Apr 6 10:58:11 2023 -0700 drm/xe: GuC and HuC loading support for RKL Rocketlake uses TGL GuC and HuC Cc: Lucas De Marchi Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 3c6be2542e353268b27ca4d3cc433c9e6a49bd26 Author: Matt Roper Date: Mon Apr 10 11:39:10 2023 -0700 drm/xe: Only request PCODE_WRITE_MIN_FREQ_TABLE on LLC platforms PCODE_WRITE_MIN_FREQ_TABLE is only applicable to platforms with an LLC. Change the discrete GPU check to an LLC check instead; this take care of skipping not only the discrete platforms, but also integrated platforms like MTL that do not have an LLC. Fixes MTL dmesg error: xe 0000:00:02.0: [drm] *ERROR* PCODE Mailbox failed: 1 Illegal Command Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230410183910.2696628-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit bf08dd47d1567cb922d60a669e5a8a0c40253840 Author: Matt Roper Date: Mon Apr 10 11:39:09 2023 -0700 drm/xe: Track whether platform has LLC Some driver initialization is conditional on the presence of an LLC. Add an extra feature flag to support this. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230410183910.2696628-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 689f40f520b6434db29f7b3d7c64b3305b310992 Author: Matt Roper Date: Mon Apr 10 11:39:08 2023 -0700 drm/xe: Use packed bitfields for xe->info feature flags Replace 'bool' fields with single bits to allow the various device feature flags to pack more tightly. Reviewed-by: Lucas De Marchi Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230410183910.2696628-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 67f2f0d7371709cb91d46d4c557aaa28b902674c Author: Matthew Brost Date: Mon Apr 10 14:26:58 2023 -0700 drm/xe: Don't grab runtime PM ref in engine create IOCTL A VM had a runtime PM ref, a engine can't be created without a VM, and the engine holds a ref to the VM thus this is unnecessary. Beyond that taking a ref in the engine create IOCTL and dropping it in the destroy IOCTL is wrong as a user doesn't have to call the destroy IOCTL (e.g. they can just kill the process or close the driver FD). If a user does this PM refs are leaked. Reviewed-by: Rodrigo Vivi Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 0a12a612c870231172d30196e6245ea471fabaed Author: Matt Roper Date: Mon Apr 10 13:02:29 2023 -0700 drm/xe: Let primary and media GT share a kernel_bb_pool The media GT requires a valid gt->kernel_bb_pool during driver probe to allocate the WA and NOOP batchbuffers used to record default context images. Dynamically allocate the bb_pools so that the primary and media GT can use the same pool during driver init. The media GT still shouldn't be need the USM pool, so only hook up the kernel_bb_pool for now. Cc: Maarten Lankhorst Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230410200229.2726648-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 2988cf02ee303a96052a6c486b9bbb6e4fd5c030 Author: Niranjana Vishwanathapura Date: Fri Apr 7 13:55:22 2023 -0700 drm/xe: Fix memory use after free The wait_event_timeout() on g2h_fence.wq which is declared on stack can return before the wake_up() gets called, resulting in a stack out of bound access when wake_up() accesses the g2h_fene.wq. Do not declare g2h_fence related wait_queue_head_t on stack. Fixes the below KASAN BUG and associated kernel crashes. BUG: KASAN: stack-out-of-bounds in do_raw_spin_lock+0x6f/0x1e0 Read of size 4 at addr ffff88826252f4ac by task kworker/u128:5/467 CPU: 25 PID: 467 Comm: kworker/u128:5 Tainted: G U 6.3.0-rc4-xe #1 Workqueue: events_unbound g2h_worker_func [xe] Call Trace: dump_stack_lvl+0x64/0xb0 print_report+0xc2/0x600 kasan_report+0x96/0xc0 do_raw_spin_lock+0x6f/0x1e0 _raw_spin_lock_irqsave+0x47/0x60 __wake_up_common_lock+0xc0/0x150 dequeue_one_g2h+0x20f/0x6a0 [xe] g2h_worker_func+0xa9/0x180 [xe] process_one_work+0x527/0x990 worker_thread+0x2d1/0x640 kthread+0x174/0x1b0 ret_from_fork+0x29/0x50 Tested-by: Matt Roper Reviewed-by: Bruce Chang Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 36919ebeaacab3409c8266248221f392ee7ea9d8 Author: Matthew Auld Date: Thu Apr 6 16:18:45 2023 +0100 drm/xe: fix suspend-resume for dgfx This stopped working now that TTM treats moving a pinned object through ttm_bo_validate() as an error, for the general case. Add some new routines to handle the new special casing needed for suspend-resume. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/244 Signed-off-by: Matthew Auld Cc: Matthew Brost Reviewed-by: Rodrigo Vivi Tested-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 21cc8aadddf9feca921389beafaad40224f8d219 Author: Matt Roper Date: Thu Apr 6 16:56:21 2023 -0700 drm/xe: Clean up xe_device_desc Now that most of the characteristics of a device are associated with the graphics and media IPs, the remaining contents of xe_device_desc can be cleaned up a bit: * 'gt' is unused; drop it * DEV_INFO_FOR_EACH_FLAG only covers two flags and is only used in this one file; drop the unnecessary macro complexity * Convert .has_4tile to a single bitfield bit so that it can be packed with the other feature flags * Move 'platform' lower in the structure for better packing Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230406235621.1914492-10-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 3713ed52ef2bc9272afdd195fe24b011a4dcd44d Author: Matt Roper Date: Thu Apr 6 16:56:20 2023 -0700 drm/xe: Add KUnit test for xe_pci.c IP engine lists Add a simple KUnit test to ensure that the hardware engine lists for GMD_ID IP definitions are sensible (i.e., no graphics engines defined for the media IP and vice versa). Only the IP descriptors for GMD_ID platforms are checked for now. Presumably the engine lists on older pre-GMD_ID platforms shouldn't be changing. We can extend the KUnit testing in the future if we decide we want to check those as well. v2: - Add missing 'const' in xe_call_for_each_media_ip to avoid compiler warning. Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230406235621.1914492-9-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 5822bba943ad2ecb386e8a27614e753ad7e285fa Author: Matt Roper Date: Thu Apr 6 16:56:19 2023 -0700 drm/xe: Select graphics/media descriptors from GMD_ID If graphics_desc and media_desc are not specified in a platform's xe_device_desc, treat this as an indication that the IP version should be determined from the hardware's GMD_ID register. Note that leaving media_desc unset for a platform that simply doesn't have the IP (e.g., PVC) is also okay --- a read of the GMD_ID register offset will be attempted, but since there's no register at that location a value of '0' will be returned, effectively disabling media support. Mapping of version -> IP description is done via a table lookup; this table will be re-used in future patches for some KUnit testing. v2: - Drop dummy structures. NULL can be safely used for both the GMD_ID cases and the "media not present case." - Use a table-based lookup of GMD_ID versions rather than a simple switch statement; the table will allow us to easily perform kunit testing of all the IP descriptors. Cc: Lucas De Marchi Cc: Balasubramani Vivekanandan Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230406235621.1914492-8-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 9a08b2b935cedec1c563b03999cb37bfbeeb8b22 Author: Matt Roper Date: Thu Apr 6 16:56:18 2023 -0700 drm/xe: Add printable name to IP descriptors Printing the name, along with the IP version number, will help reduce confusion about which IP is present on a platform. Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230406235621.1914492-7-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit bd75664b9c3ff1829bc5acfd6789c0094e7bd617 Author: Matt Roper Date: Thu Apr 6 16:56:17 2023 -0700 drm/xe: Clarify GT counting logic The total number of GTs supported by a platform should be one primary GT, one media GT (if media version >= 13), and a number of remote tile GTs dependent on the graphics IP present. Express this more clearly in the device setup. Note that xe->info.tile_count is inaccurately named; the rest of the driver treats this as the GT count, not just the tile count. This will need to be cleaned up at some point down the road. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230406235621.1914492-6-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 33b270d9392825874c4e484e8652dad2cf901c97 Author: Matt Roper Date: Thu Apr 6 16:56:16 2023 -0700 drm/xe: Move engine masks into IP descriptor structures Break the top-level platform_engine_mask field into separate hw_engine_mask fields in the graphics and media structures. Since hardware has more flexibility to mix-and-match IP versions going forward, this allows each IP to list exactly which engines it provides; the final per-GT engine list can then be constructured from those: * On platforms without a standalone media GT (i.e., media IP versions prior to 13), the primary GT's engine list is the union of the graphics IP's engine list and the media IP's engine list. * Otherwise, GT0's engine list is the graphics IP's engine list. * For GT1 and beyond, the type of GT determines which IP's engine list is used. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230406235621.1914492-5-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit ce22dece001d6dfedbff0b63596e9aaa5b5ae78b Author: Matt Roper Date: Thu Apr 6 16:56:15 2023 -0700 drm/xe: Move most platform traits to graphics IP Most of the traits currently in the device descriptor structures are either tied to the graphics IP or should be inferred from the graphics IP. This becomes important on MTL and beyond where IP versions are supposed to be detected from the hardware's GMD_ID registers rather than mapped from PCI devid. Engine masks are left where they are for now; they'll be dealt with separately in a future patch. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230406235621.1914492-4-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit c94f32e4f5453a55c1c83a81481784f617f96df8 Author: Matt Roper Date: Thu Apr 6 16:56:14 2023 -0700 drm/xe: Set require_force_probe in each platform's description Set require_force_probe explicitly in each platform's description structure rather than embedding it within the FOO_FEATURES macros. Even though we expect all platforms currently supported by the Xe driver to be under force_probe protection, this will help prepare for some other upcoming restructuring. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230406235621.1914492-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit c8d72dfb288740a59afaf135da15db598fae0475 Author: Matt Roper Date: Thu Apr 6 16:56:13 2023 -0700 drm/xe: Start splitting xe_device_desc into graphics/media structures Rather than storing all characteristics for an entire platform in the xe_device_desc structure, create secondary graphics and media structures to hold traits and feature flags specific to those IPs. This will eventually allow us to assign the graphics and media characteristics at runtime based on the contents of the relevant GMD_ID registers. For now, just move the IP versions into the new structures to keep things simple. Other IP-specific fields will migrate to these structures in future patches. Note that there's one functional change introduced by this: previously PVC was recognized as media version 12.60. That's technically true, but in practice the media engines are fused off on all production hardware. By simply not assigning a media IP structure to PVC it will effectively be treated as IP version 0.0 now (which the rest of the driver should treat as non-existent media). v2: - Split the new structures out to their own header. This will ease the addition of KUnit tests later. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230406235621.1914492-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 61e72e77b66259945fca89dcbfea32f7cbfc3b07 Author: Lucas De Marchi Date: Wed Apr 5 15:47:25 2023 -0700 drm/xe: Always log GuC/HuC firmware versions When debugging issues related to GuC/HuC, it's important to know what is the firmware version being used. The version from the filename can't be relied upon, also because it normally only contains the major version (except for the ones under experimental support). Log the version from the blob after reading the CSS header. Example: xe 0000:03:00.0: [drm] Using GuC firmware (70.5) from i915/dg2_guc_70.bin Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Brost Link: https://lore.kernel.org/r/20230405224725.1993719-1-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 1c060057ec29e0305aa314c19a80090c21524faa Author: Matthew Brost Date: Wed Apr 5 16:20:03 2023 -0700 drm/xe: Always write GEN12_RCU_MODE.GEN12_RCU_MODE_CCS_ENABLE for CCS engines If CCS0 was fused we did not write this register thus CCS engine were not enabled resulting in driver load failures. Signed-off-by: Matthew Brost Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit ad55ead7f3c7b041dbf058a9c4b954be5929bb5e Author: Lucas De Marchi Date: Thu Mar 23 22:17:54 2023 -0700 drm/xe: Update GuC/HuC firmware autoselect logic Update the logic to autoselect GuC/HuC for the platforms with the following improvements: - Document what is the firmware file that is expected to be loaded and what is checked from blob headers - When the platform is under force-probe it's desired to enforce the full-version requirement so the correct firmware is used before widespread adoption and backward-compatibility commitments - Directory from which we expect firmware blobs to be available in upstream linux-firmware repository depends on the platform: for the ones supported by i915 it uses the i915/ directory, but the ones expected to be supported by xe, it's on the xe/ directory. This means that for platforms in the intersection, the firmware is loaded from a different directory, but that is not much important in the firmware repo and it avoids firmware duplication. - Make the table with the firmware definitions clearly state the versions being expected. Now with macros to select the version it's possible to choose between full-version/major-version for GuC and full-version/no-version for HuC. These are similar to the macros used in i915, but implemented in a slightly different way to avoid duplicating the macros for each firmware/type and functionality, besides adding the support for different directories. - There is no check added regarding force-probe since xe should reuse the same firmware files published for i915 for past platforms. This can be improved later with additional kunit checking against a hardcoded list of platforms that falls in this category. - As mentioned in the TODO, the major version fallback was not implemented before as currently each platform only supports one major. That can be easily added later. - GuC version for MTL and PVC were updated to 70.6.4, using the exact full version, while the After this the GuC firmware used by PVC changes to pvc_guc_70.5.2.bin since it's using a file not published yet. Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://lore.kernel.org/r/20230324051754.1346390-4-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit b9d773fc515a2d57ca96a6a368ac6e8845b2b3c5 Author: Lucas De Marchi Date: Sat Apr 1 01:51:51 2023 -0700 drm/xe: Add test for GT workarounds and tunings In order to avoid mistakes when populating the workarounds, it's good to be able to test if the entries added are all compatible for a certain platform. The platform itself is not needed as long as we create fake devices with enough configuration for the RTP helpers to process the tables. Common mistakes that can be avoided: - Entries clashing the bitfields being updated - Register type being mixed (MCR vs regular / masked vs regular) - Unexpected errors while adding the reg_sr entry To test, inject a duplicate entry in gt_was, but with platform == tigerlake rather than the currenct graphics version check: { XE_RTP_NAME("14011059788"), XE_RTP_RULES(PLATFORM(TIGERLAKE)), XE_RTP_ACTIONS(SET(GEN10_DFR_RATIO_EN_AND_CHICKEN, DFR_DISABLE)) }, This produces the following result: $ ./tools/testing/kunit/kunit.py run \ --kunitconfig drivers/gpu/drm/xe/.kunitconfig xe_wa [14:18:02] Starting KUnit Kernel (1/1)... [14:18:02] ============================================================ [14:18:02] ==================== xe_wa (1 subtest) ===================== [14:18:02] ======================== xe_wa_gt ========================= [14:18:02] [drm:xe_reg_sr_add] *ERROR* Discarding save-restore reg 9550 (clear: 00000200, set: 00000200, masked: no): ret=-22 [14:18:02] # xe_wa_gt: ASSERTION FAILED at drivers/gpu/drm/xe/tests/xe_wa_test.c:116 [14:18:02] Expected gt->reg_sr.errors == 0, but [14:18:02] gt->reg_sr.errors == 1 (0x1) [14:18:02] [FAILED] TIGERLAKE (B0) [14:18:02] [PASSED] DG1 (A0) [14:18:02] [PASSED] DG1 (B0) ... Signed-off-by: Lucas De Marchi Reviewed-by: Michał Winiarski Link: https://lore.kernel.org/r/20230401085151.1786204-8-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 4cc0440229c61dca680f5acaf2e529e67f9bde72 Author: Lucas De Marchi Date: Sat Apr 1 01:51:50 2023 -0700 drm/xe: Add basic unit tests for rtp Add some basic unit tests for rtp. This is intended to prove the functionality of the rtp itself, like coalescing entries, rejecting non-disjoint values, etc. Contrary to the other tests in xe, this is a unit test to test the sw-side only, so it can be executed on any machine - it doesn't interact with the real hardware. Running it produces the following output: $ ./tools/testing/kunit/kunit.py run --raw_output-kunit \ --kunitconfig drivers/gpu/drm/xe/.kunitconfig xe_rtp ... [01:26:27] Starting KUnit Kernel (1/1)... KTAP version 1 1..1 KTAP version 1 # Subtest: xe_rtp 1..1 KTAP version 1 # Subtest: xe_rtp_process_tests ok 1 coalesce-same-reg ok 2 no-match-no-add ok 3 no-match-no-add-multiple-rules ok 4 two-regs-two-entries ok 5 clr-one-set-other ok 6 set-field [drm:xe_reg_sr_add] *ERROR* Discarding save-restore reg 0001 (clear: 00000001, set: 00000001, masked: no): ret=-22 ok 7 conflict-duplicate [drm:xe_reg_sr_add] *ERROR* Discarding save-restore reg 0001 (clear: 00000003, set: 00000000, masked: no): ret=-22 ok 8 conflict-not-disjoint [drm:xe_reg_sr_add] *ERROR* Discarding save-restore reg 0001 (clear: 00000002, set: 00000002, masked: no): ret=-22 [drm:xe_reg_sr_add] *ERROR* Discarding save-restore reg 0001 (clear: 00000001, set: 00000001, masked: yes): ret=-22 ok 9 conflict-reg-type # xe_rtp_process_tests: pass:9 fail:0 skip:0 total:9 ok 1 xe_rtp_process_tests # Totals: pass:9 fail:0 skip:0 total:9 ok 1 xe_rtp ... Note that the ERRORs in the kernel log are expected since it's testing incompatible entries. v2: - Use parameterized table for tests (Michał Winiarski) - Move everything to the xe_rtp_test.ko and only add a few exports to the right namespace - Add more tests to cover FIELD_SET, CLR, partially true rules, etc Signed-off-by: Lucas De Marchi Reviewed-by: Maarten Lankhorst # v1 Reviewed-by: Michał Winiarski Link: https://lore.kernel.org/r/20230401085151.1786204-7-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 7bf350ecb240c9db63031e3a1b6c99acd73c90ed Author: Lucas De Marchi Date: Sat Apr 1 01:51:49 2023 -0700 drm/xe/reg_sr: Save errors for kunit integration When there's an entry that is dropped when xe_reg_sr_add(), there's not much we can do other than reporting the error - it's for certain a driver issue or conflicting workarounds/tunings. Save the number of errors to be used later by kunit to report where it happens. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230401085151.1786204-6-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit e460410023d95b0845aa99f2d9c0625b143ca593 Author: Lucas De Marchi Date: Sat Apr 1 01:51:48 2023 -0700 drm/xe: Generalize fake device creation Instead of requiring tests to initialize a fake device an keep it in sync with xe_pci.c when it's platform-dependent, export a function from xe_pci.c to be used and piggy back on the device info creation. For simpler tests that don't need any specific platform and just need a fake xe device to pass around, xe_pci_fake_device_init_any() can be used. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230401085151.1786204-5-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 60d5c6abc289cc5d561758e71fb2c392c1ec2161 Author: Lucas De Marchi Date: Sat Apr 1 01:51:47 2023 -0700 drm/xe: Use symbol namespace for kunit tests Instead of simply using EXPORT_SYMBOL() to export the functions needed in xe.ko to be be called across modules, use EXPORT_SYMBOL_IF_KUNIT() which will export the symbol under the EXPORTED_FOR_KUNIT_TESTING namespace. This avoids accidentally "leaking" these functions and letting them be called from outside the kunit tests. If these functiosn are accidentally called from another module, they receive a modpost error like below: ERROR: modpost: module XXXXXXX uses symbol xe_ccs_migrate_kunit from namespace EXPORTED_FOR_KUNIT_TESTING, but does not import it. Signed-off-by: Lucas De Marchi Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20230401085151.1786204-4-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit af049be5a33e12fb993028eb378fd61545e72f5e Author: Lucas De Marchi Date: Sat Apr 1 01:51:46 2023 -0700 drm/xe: Move test infra out of xe_pci.[ch] Move code out of xe_pci.[ch] into tests/*.[ch], like is done in other similar compilation units. Even if this is not part of "tests for xe_pci.c", they are functions exported and required by other tests. It's better not to clutter the module headers and sources with them. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230401085151.1786204-3-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit d19ad0e80ebe3da48dc8122d6beca9d3d35df454 Author: Lucas De Marchi Date: Sat Apr 1 01:51:45 2023 -0700 drm/xe: Extract function to initialize xe->info Extract the part setting up from xe->info from xe_pci_probe() into its own function. This pairs nicely with the display counterpart, avoids info initialization to be placed elsewhere and helps future improvements to build fake devices for tests. While at it, normalize the names a little bit: the _get() suffix may be mistaken by lock-related operation, so rename the function to "find_subplatform()". Also rename the variable to subplatform_desc to make it easier to understand, even if longer. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230401085151.1786204-2-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit b73d520b3d0ff559da7e15a49ef12a591c61105a Author: Matt Roper Date: Fri Mar 31 17:21:06 2023 -0700 drm/xe/irq: Don't clobber display interrupts on multi-tile platforms Although our only multi-tile platform today (PVC) doesn't support display, it's possible that some future multi-tile platform will. If/when this happens, display interrupts (both traditional display and ASLE backlight interrupts raised as a Gunit interrupt) should be delivered to the primary tile. Save away tile0's master_ctl value so that it can still be used for display interrupt handling after the GT loop. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230401002106.588656-9-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit bf26d6984c28f319eeca22bc8b76399e93613dea Author: Matt Roper Date: Fri Mar 31 17:21:05 2023 -0700 drm/xe/irq: Drop commented-out code for non-existent media engines Although the hardware team has set aside some register bits for extra media engines, no platform supported by the Xe driver today has VCS4-7 or VECS2-3. Drop the corresponding code (which was already commented out); we can bring it back easily enough if such engines show up on a future platform. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230401002106.588656-8-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit c94cd8f2d2784dff57581389f59d3051bc312fc2 Author: Matt Roper Date: Fri Mar 31 17:21:04 2023 -0700 drm/xe/irq: Drop remaining "gen11_" prefix from IRQ functions The remaining "gen11_*" IRQ functions are common to all platforms supported by the Xe driver. Drop the unnecessary prefix. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230401002106.588656-7-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit dd12b0ff2cf29904194bc8a5f0a8bc7a2b7041fa Author: Matt Roper Date: Fri Mar 31 17:21:03 2023 -0700 drm/xe/irq: Rename and clarify top-level interrupt handling routines Platforms supported by the Xe driver handle top-level interrupts in one of two ways: - Xe_LP platforms only have a "graphics master" register and lack a "master tile" register, so top-level interrupt detection and enable/disable happens in the graphics master. - Xe_LP+ (aka DG1) and beyond have a "master tile" interrupt register that controls the enable/disable of top-level interrupts and must also be consulted to determine which tiles have received interrupts before the driver moves on the process the graphics master register. For functions that are only relevant to the first set of platforms, rename the function prefix to Xe_LP since "gen11" doesn't make sense in the Xe driver. Also add some comments briefly describing the two top-level handlers. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230401002106.588656-6-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 6b7ece97dd21d2b80a41f6192f89f8848c3b1d76 Author: Matt Roper Date: Fri Mar 31 17:21:02 2023 -0700 drm/xe/irq: Drop unnecessary GEN11_ and GEN12_ register prefixes Any interrupt registers that were introduced by platforms i915 considered to be "gen11" or "gen12" are present on all platforms that the Xe driver supports; drop the unnecessary prefixes. While working in the area, also convert a few open-coded bit manipulations over to REG_BIT and REG_FIELD_GET notation. Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230401002106.588656-5-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi [Rodrigo: removed display. That was later squashed to the xe Display patch] commit ca14d553434ed1e1522afb8f37ed7b6fb2b9f043 Author: Matt Roper Date: Fri Mar 31 17:21:01 2023 -0700 drm/xe/irq: Drop IRQ_INIT and IRQ_RESET macros It's no longer necessary to wrap these operations in macros; a simple function will suffice. Also switch to function names that more clearly describe what operation is being performed: unmask_and_enable() and mask_and_disable(). Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230401002106.588656-4-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 9293b67de6602bcf0415da0f3ae3dbf98396183c Author: Matt Roper Date: Fri Mar 31 17:21:00 2023 -0700 drm/xe/irq: Add helpers to find ISR/IIR/IMR/IER registers For cases where IRQ_INIT and IRQ_RESET are used, the relevant interrupt registers are always consecutive and ordered ISR, IMR, IIR, IER. Adding helpers to look these up from a base offset will let us eliminate some of the CPP pasting and simplify other upcoming patches. v2: - s/_REGS/_OFFSET/ for consistency. (Lucas) - Move IMR/IIR/IER helpers into xe_irq.c; they aren't needed anywhere else. (Lucas) Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230401002106.588656-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 06d06064f725c207a4d14b7410f5498d68c1fb86 Author: Matt Roper Date: Fri Mar 31 17:20:59 2023 -0700 drm/xe/irq: Drop gen3_ prefixes "Gen" terminology should be avoided in the Xe driver and "gen3" refers to platforms that are 9 (!!) graphics generations earlier than the oldest supported by the Xe driver, so this prefix really doesn't make sense. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230401002106.588656-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 1a545ed74b33eaf6dee6d4159be07819ad89a569 Author: Chang, Bruce Date: Mon Apr 3 22:20:31 2023 +0000 drm/xe: fix pvc unload issue Currently, unload pvc driver will generate a null dereference and the call stack is as below. [ 4850.618000] Call Trace: [ 4850.620740] [ 4850.623134] ttm_bo_cleanup_memtype_use+0x3f/0x50 [ttm] [ 4850.628661] ttm_bo_release+0x154/0x2c0 [ttm] [ 4850.633317] ? drm_buddy_fini+0x62/0x80 [drm_buddy] [ 4850.638487] ? __kmem_cache_free+0x27d/0x2c0 [ 4850.643054] ttm_bo_put+0x38/0x60 [ttm] [ 4850.647190] xe_gem_object_free+0x1f/0x30 [xe] [ 4850.651945] drm_gem_object_free+0x1e/0x30 [drm] [ 4850.656904] ggtt_fini_noalloc+0x9d/0xe0 [xe] [ 4850.661574] drm_managed_release+0xb5/0x150 [drm] [ 4850.666617] drm_dev_release+0x30/0x50 [drm] [ 4850.671209] devm_drm_dev_init_release+0x3c/0x60 [drm] There are a couple issues, but the main one is due to TTM has only one TTM_PL_TT region, but since pvc has 2 tiles and tries to setup 1 TTM_PL_TT each tile. The second will overwrite the first one. During unload time, the first tile will reset the TTM_PL_TT manger and when the second tile is trying to free Bo and it will generate the null reference since the TTM manage is already got reset to 0. The fix is to use one global TTM_PL_TT manager. v2: make gtt mgr global and change the name to sys_mgr Cc: Stuart Summers Cc: Matthew Brost Cc: Vivi, Rodrigo Signed-off-by: Bruce Chang Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 96578d106b30dc3a6550624477a092d793052660 Author: Lucas De Marchi Date: Fri Mar 31 16:09:02 2023 -0700 drm/xe: Fix platform order Platform order in enum xe_platform started to be used by some parts of the code, like the GuC/HuC firmware loading logic. The order itself is not very important, but it's better to follow a convention: as was documented in the comment above the enum, reorder the platforms by graphics version. While at it, remove the gen terminology. v2: - Use "graphics version" instead of chronological order (Matt Roper) - Also change pciidlist to follow the same order - Remove "gen" from comments around enum xe_platform Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230331230902.1603294-1-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit c33a721943f46851f10eb34852a3fd1fedcd3639 Author: Niranjana Vishwanathapura Date: Fri Mar 31 16:52:50 2023 +0000 drm/xe: Use proper vram offset In xe_migrate functions, use proper vram io offset of the tiles while calculating addresses. Reviewed-by: Matthew Brost Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 370997d168d64e84c12164bffdd326fd240a9790 Author: Niranjana Vishwanathapura Date: Fri Mar 31 16:40:12 2023 +0000 drm/xe/tests: Set correct expectation In xe_migrate_sanity_kunit test, use correct expected value as the expected value was not only used for the xe_migrate_clear(), but also for the xe_migrate_copy() operation. v2: Add 'Fixes' tag and update commit text Fixes: 11a2407ed5f0 ("drm/xe: Stop accepting value in xe_migrate_clear") Reviewed-by: Matthew Brost Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit f7339fe79654c2b63634d65eb72c089d45029065 Author: Niranjana Vishwanathapura Date: Thu Mar 30 21:41:05 2023 +0000 drm/xe/tests: Use proper batch base address In xe_migrate_sanity_kunit test, use proper batch base address by considering usm case. Reviewed-by: Matthew Brost Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 6b8ddaf3721e86bacc0be72bf12fa76233b9becf Author: Lucas De Marchi Date: Thu Mar 23 22:17:52 2023 -0700 drm/xe: Remove unused revid from firmware name The rev field is always 0 so it ends up never used. In i915 it was introduced because of CML: up to rev 5 it reuses the guc and huc firmware blobs from KBL. After that there is a specific firmware for that platform. This can be reintroduced later if ever needed. With the removal of revid the packed attribute in uc_fw_platform_requirement, which is there only for reducing the space these tables take, can also be removed since it has even more limited usefulness: currently there's only padding of 2 bytes. Remove the attribute to avoid the unaligned access. $ pahole -C uc_fw_platform_requirement build64/drivers/gpu/drm/xe/xe_uc_fw.o struct uc_fw_platform_requirement { enum xe_platform p; /* 0 4 */ const struct uc_fw_blob blob; /* 4 10 */ /* size: 16, cachelines: 1, members: 2 */ /* padding: 2 */ /* last cacheline: 16 bytes */ }; Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230324051754.1346390-2-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 1bf1d86f12d4d07108d480878193acd1e4d87668 Author: Matt Roper Date: Wed Mar 29 10:33:34 2023 -0700 drm/xe: Don't emit extra MI_BATCH_BUFFER_END in WA batchbuffer The MI_BATCH_BUFFER_END is already added automatically by __xe_bb_create_job(); including it in the construction of the workaround batchbuffer results in an unnecessary duplicate. Link: https://lore.kernel.org/r/20230329173334.4015124-4-matthew.d.roper@intel.com Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 9b36f7af2024ef30866f5fa0b1132ca924fd81fc Author: Matt Roper Date: Wed Mar 29 10:33:33 2023 -0700 drm/xe: Adjust batchbuffer space warning when creating a job We should WARN (not BUG) when creating a job if the batchbuffer does not have sufficient space and padding. The hardware prefetch requirements should also be considered. Link: https://lore.kernel.org/r/20230329173334.4015124-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 681818fdb97de821cc1ee6b81c7a09f3ef8fc96d Author: Matt Roper Date: Wed Mar 29 10:33:32 2023 -0700 drm/xe: Include hardware prefetch buffer in batchbuffer allocations The hardware prefetches several cachelines of data from batchbuffers before they are parsed. This prefetching only stops when the parser encounters an MI_BATCH_BUFFER_END instruction (or a nested MI_BATCH_BUFFER_START), so we must ensure that there is enough padding at the end of the batchbuffer to prevent the prefetcher from running past the end of the allocation and potentially faulting. Bspec: 45717 Link: https://lore.kernel.org/r/20230329173334.4015124-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 3d4451d30f36ffe21f8c5eea7db9678330ee83c4 Author: Matthew Brost Date: Tue Mar 28 12:30:39 2023 -0700 drm/xe: Better error messages for xe_gt_record_default_lrcs Add some error messages describing the problem when xe_gt_record_default_lrcs fails. Signed-off-by: Matthew Brost Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 33de290bd1792b7e60b1379f1eb9185c481e06eb Author: Chang, Bruce Date: Thu Mar 23 19:38:58 2023 +0000 drm/xe: don't auto fall back to execlist mode if guc failed to init In general, this is due to FW load failure, should just report error and fail the probe so that user can easily retry again. Reviewed-by: Matthew Brost Signed-off-by: Bruce Chang Signed-off-by: Rodrigo Vivi commit 011d8fa362962424c3f444c1dac3653f86f350b3 Author: Matt Roper Date: Mon Mar 27 10:58:24 2023 -0700 drm/xe/pat: Define PAT tables as static The tables are only used within this file; there's no reason for them not to be static. Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/r/20230327175824.2967914-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit e7dc1341f0dab3363baac28044b46237ed251802 Author: Matthew Auld Date: Thu Mar 23 11:59:22 2023 +0000 drm/xe/bo: refactor try_add_vram Get rid of some of the duplication here. In a future patch we need to also consider [fpfn, lpfn], so better adjust in only one place. Suggested-by: José Roberto de Souza Signed-off-by: Matthew Auld Reviewed-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 8deba79f5deb0a751894a0cf74eff3806e7adfb4 Author: Matthew Auld Date: Thu Mar 23 11:59:21 2023 +0000 drm/xe: add XE_BO_CREATE_VRAM_MASK So we don't have to keep repeating VRAM0 | VRAM1. Also if there are ever more instances, then we have less places to update. Suggested-by: José Roberto de Souza Signed-off-by: Matthew Auld Reviewed-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 7321a713c6c952d66d5fae8e8478c904b61bb735 Author: Matt Roper Date: Fri Mar 24 14:04:15 2023 -0700 drm/xe/mtl: Handle PAT_INDEX offset jump Starting with MTL, the number of entries in the PAT table increased to 16. The register offset jumped between index 7 and index 8, so a slight adjustment is needed to ensure the PAT_INDEX macros select the proper offset for the upper half of the table. Note that although there are 16 registers in the hardware, the driver is currently only asked to program the first 5, and we leave the rest at their hardware default values. That means we don't actually touch the upper half of the PAT table in the driver today and this patch won't have any functional effect [yet]. Bspec: 44235 Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/r/20230324210415.2434992-7-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit f16a3f6335e84c07de4b5dd263f0c26e3a3fa5a4 Author: Matt Roper Date: Fri Mar 24 14:04:14 2023 -0700 drm/xe/mtl: Fix PAT table coherency settings Re-sync our MTL PAT table with the bspec. 1-way coherency should only be set on table entry 3. We do not want an incorrect setting here to accidentally paper over other bugs elsewhere in the driver. Bspec: 45101 Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/r/20230324210415.2434992-6-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 366974e4a69c09a441eca7802028e60b39903386 Author: Matt Roper Date: Fri Mar 24 14:04:13 2023 -0700 drm/xe/pat: Clean up PAT register definitions Replace the deprecated "GEN" terminology in the PAT definitions. Acked-by: Nirmoy Das Link: https://lore.kernel.org/r/20230324210415.2434992-5-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 152d7f2db978780f6c7e95711c00dc1e0888535b Author: Matt Roper Date: Fri Mar 24 14:04:12 2023 -0700 drm/xe/pat: Handle unicast vs MCR PAT registers The PAT_INDEX registers are MCR registers on some platforms and unicast on others. On MTL the handling even varies between GTs: the primary GT uses MCR registers while the media GT uses unicast registers. Let's add proper MCR programming on the relevant platforms/GTs. Given that we PAT tables to change pretty regularly on future platforms, we'll make PAT programming an exception to the usual model of assuming new platforms should inherit the previous platform's behavior. Instead we'll raise a warning if the current platform isn't handled in the if/else ladder. This should help prevent subtle cache misbehavior if we forget to add the table for a new platform. Bspec: 66534, 67609, 67788 Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/r/20230324210415.2434992-4-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 4f843703133970c852cf4661e584bdea55fd1a7a Author: Matt Roper Date: Fri Mar 24 14:04:11 2023 -0700 drm/xe/pat: Use table-based programming of PAT settings Provide per-platform tables of PAT values rather than per-platform functions. This will simplify the handling of unicast vs MCR registers in the upcoming patches. Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/r/20230324210415.2434992-3-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 576c6380da47592dc793669c6738742385f1bbf1 Author: Matt Roper Date: Fri Mar 24 14:04:10 2023 -0700 drm/xe/pat: Move PAT setup to a dedicated file PAT handling is growing in complexity and will continue to do so in upcoming platforms. Separate it out to a dedicated file to keep things tidy. The code is moved as-is here (aside from a few unused #define's that are just dropped); further changes will come in future patches. Reviewed-by: Nirmoy Das Link: https://lore.kernel.org/r/20230324210415.2434992-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit cf667aec0abeda839937cbd92884799b19df1ab7 Author: Matthew Brost Date: Fri Mar 24 09:33:36 2023 -0700 drm/xe: Decrement fault mode counts in xe_vm_close_and_put Rather waiting for the VM to be destroyed (all refs to VM go to zero), drop the fault mode counts when the VM is closed in xe_vm_close_and_put. This avoids a window where user space can create a faulting VM, close it, and a subsequent creation of a non-faulting VM fails. v2 (Lucas): Drop VLK reference in commit message Reviewed-by: Maarten Lankhorst Suggested-by: Niranjana Vishwanathapura Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit ef5e3c2f703d05c9d296d8f8ad0a0f48f6c1fcc9 Author: José Roberto de Souza Date: Thu Mar 23 12:24:59 2023 -0700 drm/xe: Add max engine priority to xe query Intel Vulkan driver needs to know what is the maximum priority to fill a device info struct for applications. Right now we getting this information by creating a engine and setting priorities from min to high to know what is the maximum priority for running process but this leads to info messages to be printed to dmesg: xe 0000:03:00.0: [drm] Ioctl argument check failed at drivers/gpu/drm/xe/xe_engine.c:178: value == DRM_SCHED_PRIORITY_HIGH && !capable(CAP_SYS_NICE) It does not cause any harm but when executing a test suite like crucible it causes thousands of those messages to be printed. So here adding one more property to drm_xe_query_config to fetch the max engine priority. Cc: Matthew Brost Reviewed-by: Matthew Brost Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 9bddebf1f0f6e7a8a6418dfc14fdaa6233ba0524 Author: Anusha Srivatsa Date: Thu Mar 23 15:46:51 2023 -0700 drm/xe: Load HuC on Alderlake S Alderlake S uses TGL HuC. Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230323224651.1187366-3-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 85ea2bd2fd18ec43e2569da3e21c91fc6832b464 Author: Anusha Srivatsa Date: Thu Mar 23 15:46:50 2023 -0700 drm/xe/huc: Support for loading unversiond HuC Follow the new direction of firmware and add macro support for loading unversioned HuC. Keep HuC versioned loading support as well for platforms that fall under force_probe support Add check to ensure driver does not do any version check for HuC if going through unversioned load. v2: unversioned firmware to be the default for platforms not under force_probe. Maintain versioned firmware macro support for platforms under force-probe protection. v3: Minor style and naming adjustments (Lucas) Cc: Matt Roper Cc: Daniele Ceraolo Spurio Signed-off-by: Anusha Srivatsa Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230323224651.1187366-2-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit b4eecedc75c1b75eee359c806fc964f70e0fc983 Author: Matthew Brost Date: Mon Mar 20 13:58:36 2023 -0700 drm/xe: Fix potential deadlock handling page faults Within a class the GuC will hault scheduling if the head of the queue can't be scheduled the queue will block. This can lead to deadlock if BCS0-7 all have faults and another engine on BCS0-7 is at head of the GuC scheduling queue as the migration engine used to fix tthe fault will be blocked. To work around this set the migration engine to the highest priority when servicing page faults. v2 (Maarten): Set priority to kernel once at creation Signed-off-by: Matthew Brost Reviewed-by: Brian Welty Signed-off-by: Rodrigo Vivi commit 59ea53eecb7154a2ac8aa39f21f16a144be3eecc Author: Matthew Brost Date: Thu Mar 23 09:25:00 2023 -0700 drm/xe: Use BO's GT to determine dma_offset when programming PTEs Rather than using the passed in GT, use the BO's GT determine dma_offset when programming PTEs as these two GT's could differ (i.e. mapping a BO from a remote GT). The BO's GT is correct GT to use as this where BO resides, while the passed in GT is where the mapping is created. v2: (Thomas) - Kernel doc, extra new line (CI) - Rebase to tip Reviewed-by: Thomas Hellström Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 99c5952fe36107ee57fa0ad7115ffa76222a8810 Author: Matthew Auld Date: Wed Mar 22 10:35:45 2023 +0000 drm/xe/gt: some error handling fixes Make sure we pass along the correct errors. Signed-off-by: Matthew Auld Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 4f1411e2dab7a398c31cebbeedebbe11b239c9d9 Author: Matthew Brost Date: Tue Mar 21 18:16:47 2023 -0700 drm/xe: Reinstate render / compute cache invalidation in ring ops Render / compute engines have additional caches (not just TLBs) that need to be invalidated each batch, reinstate these invalidations in ring ops. Reviewed-by: Matt Roper Suggested-by: Matt Roper Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 38c04b47cec861cf4007b3e53cbf584e494e2762 Author: Maarten Lankhorst Date: Tue Feb 28 11:17:30 2023 +0100 drm/xe: Use atomic instead of mutex for xe_device_mem_access_ongoing xe_guc_ct_fast_path() is called from an irq context, and cannot lock the mutex used by xe_device_mem_access_ongoing(). Fortunately it is easy to fix, and the atomic guarantees are good enough to ensure xe->mem_access.hold_rpm is set before last ref is dropped. As far as I can tell, the runtime ref in device access should be killable, but don't dare to do it yet. Signed-off-by: Maarten Lankhorst Reviewed-by: Matthew Brost Acked-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 044f0cfb19473cd1b60a69c802cac0651066fa21 Author: Matthew Brost Date: Mon Mar 20 10:46:24 2023 -0700 drm/xe: Drop zero length arrays Zero-length arrays as fake flexible arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. Reviewed-by: Matthew Auld Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit ce79c6c43af7280c1f26d700959d04a7e62092af Author: Matthew Auld Date: Tue Mar 21 11:44:07 2023 +0000 drm/xe/buddy: add compatible and intersects hooks Copy this from i915. We need .compatible for vram -> vram transfers, so they don't just get nooped by ttm, if need to move something from mappable to non-mappble or vice versa. The .intersects is needed for eviction, to determine if a victim resource is worth eviction. e.g if we need mappable space there is no point in evicting a resource that has zero mappable pages. Signed-off-by: Matthew Auld Cc: Lucas De Marchi Reviewed-by: Maarten Lankhorst Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 793e6612deea5cf8117100b1d47754800b24dcfa Author: Matthew Auld Date: Tue Mar 21 11:44:06 2023 +0000 drm/xe/buddy: add visible tracking Replace the allocation code with the i915 version. This simplifies the code a little, and importantly we get the accounting at the mgr level, which is useful for debug (and maybe userspace), plus per resource tracking so we can easily check if a resource is using one or pages in the mappable part of vram (useful for eviction), or if the resource is completely within the mappable portion (useful for checking if the resource can be safely CPU mapped). v2: Fix missing PAGE_SHIFT v3: (Gwan-gyeong Mun) - Fix incorrect usage of ilog2(mm.chunk_size). - Fix calculation when checking for impossible allocation sizes, also check much earlier. v4: (Gwan-gyeong Mun) - Fix calculation when extending the [fpfn, lpfn] range due to the roundup_pow_of_two(). v5: (Gwan-gyeong Mun) - Move the check for running out of mappable VRAM to before doing any of the roundup_pow_of_two(). v6: (Jani) - Stop abusing BUG_ON(). We can easily just use WARN_ON() here and return a proper error to the caller, which is much nicer if we ever trigger these. Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun Cc: Thomas Hellström Cc: Maarten Lankhorst Cc: Lucas De Marchi Cc: Jani Nikula Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 11a2407ed5f017edcea436220ebba7c8619924f2 Author: Balasubramani Vivekanandan Date: Fri Mar 17 21:05:30 2023 +0530 drm/xe: Stop accepting value in xe_migrate_clear Although xe_migrate_clear() has a value argument, currently the driver is only passing 0 at all the places this function is invoked with the exception the kunit tests are using the parameter to validate this function with different values. xe_migrate_clear() is failing on platforms with link copy engines because xe_migrate_clear() via emit_clear() is using the blitter instruction XY_FAST_COLOR_BLT to clear the memory. But this instruction is not supported by link copy engine. So the solution is to use the alternate instruction MEM_SET when platform contains link copy engine. But MEM_SET instruction accepts only 8-bit value for setting whereas the value agrument of xe_migrate_clear() is 32-bit. So instead of spreading this limitation around all invocations of xe_migrate_clear() and causing more confusion, it was decided to not accept any value itself as driver does not really need this currently. All the kunit tests are adapted as per the new function prototype. This will be followed by a patch to add support for link copy engines. Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit eb230dc47dd6f543ae2ff9c85bbe86243502e171 Author: Balasubramani Vivekanandan Date: Fri Mar 17 22:23:35 2023 +0530 drm/xe: Use max wopcm size when validating the preset GuC wopcm size When the GuC wopcm base and size registers are populated by BIOS/IFWI, validate the parameters against the maximum allowed wopcm size. Bpsec: 44982 Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 1a653b879d6e408813096434ece5fa46c0752343 Author: Matthew Auld Date: Tue Mar 14 08:58:40 2023 +0000 drm/xe/buddy: remove the virtualized start Hopefully not needed anymore. We can add a .compatible() hook once we need to differentiate between mappable and non-mappable vram. If the allocation is not contiguous then the start value is kind of meaningless, so rather just mark as invalid. In upstream, TTM wants to eventually remove the ttm_resource.start usage. References: 544432703b2f ("drm/ttm: Add new callbacks to ttm res mgr") Signed-off-by: Matthew Auld Cc: Lucas De Marchi Reviewed-by: Maarten Lankhorst Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 436dbd6bffbf895ea151cf21af410ec1978cc10d Author: Lucas De Marchi Date: Fri Mar 17 15:34:41 2023 -0700 drm/xe/mcr: Separate version from engine type selection In order to improve readability and make it more future proof, split the engine type from the graphics/platform checks. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230317223441.3891073-1-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 2492f4544e6f81c3bb37abdcbc027bf7934b0310 Author: Matthew Auld Date: Tue Mar 14 08:58:39 2023 +0000 drm/xe/vram: start tracking the io_size First step towards supporting small-bar is to track the io_size for vram. We can longer assume that the io_size == vram size. This way we know how much is CPU accessible via the BAR, and how much is not. Effectively giving us a two tiered vram, where in some later patches we can support different allocation strategies depending on if the memory needs to be CPU accessible or not. Note as this stage we still clamp the vram size to the usable vram size. Only in the final patch do we turn this on for real, and allow distinct io_size and vram_size. v2: (Lucas): - Improve the commit message, plus improve the kernel-doc for the io_size to give a better sense of what it actually is. Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun Cc: Lucas De Marchi Reviewed-by: Maarten Lankhorst Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 8e41443e1bb7a9aa03263ab9e317ef04927be5aa Author: Thomas Hellström Date: Tue Mar 14 15:56:44 2023 +0100 drm/xe/vm: Defer vm rebind until next exec if nothing to execute If all compute engines of a vm in compute mode are idle, defer a rebind to the next exec to avoid the VM unnecessarily trying to make memory resident and compete with other VMs for available memory space. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 7cba3396fd7e87a976b8ad1e30d734b72dec7e31 Author: Thomas Hellström Date: Mon Mar 13 20:37:24 2023 +0100 drm/xe/tests: Test both CPU- and GPU page-table updates with the migrate test Add a test parameter to force GPU page-table updates with the migrate test and test both CPU- and GPU updates. Also provide some timing results. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit a5dfb471bba18fc38dc623ff1fa4387f48dacba6 Author: Thomas Hellström Date: Fri Mar 10 12:07:12 2023 +0100 drm/xe: Use a small negative initial seqno Causes an early 32-bit wrap and may thus help CI catch wrapping errors that may otherwise not show early enough. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 155c9165542863c97b5284afa37e3d8e385a8815 Author: Thomas Hellström Date: Fri Mar 10 12:03:47 2023 +0100 drm/xe: Introduce xe_engine_is_idle() Introduce xe_engine_is_idle, and replace the static function in xe_migrate.c. The latter had two flaws. First the seqno == 1 test might return a false true value each time the seqno counter wrapped, Second, the cur_seqno == next_seqno test would never return true. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 17a28ea23c4087cf4580744a70105ccc83efc769 Author: Thomas Hellström Date: Fri Mar 10 16:41:08 2023 +0100 drm/xe/tests: Support CPU page-table updates in the migrate test The migrate test currently supports only GPU pagetable updates and will thus break if we fix the CPU pagetable update selection. Fix the migrate test first. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit fc1cc680304db1c452156968f4ab95f9c553f746 Author: Thomas Hellström Date: Fri Mar 10 17:56:55 2023 +0100 drm/xe/migrate: Update cpu page-table updates Don't wait for GPU to be able to update page-tables using CPU. Putting ourselves to sleep may be more of a problem than using GPU for page-table updates. Also allow the vm to be NULL since the migrate kunit test uses NULL for vm. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 7c51050b3b0799f5d74331a7eb81a7066d520731 Author: Thomas Hellström Date: Thu Mar 9 17:20:20 2023 +0100 drm/xe: Use a define to set initial seqno for fences Also for HW fences, write the initial seqno - 1 to the HW completed seqno to initialize. v2: - Use __dma_fence_is_later() to compare hw fence seqnos. (Matthew Auld) Signed-off-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 8eb7ad99ae66b4244a1239bfa8723d1a06beddb9 Author: Mauro Carvalho Chehab Date: Fri Mar 10 09:13:39 2023 +0100 drm/xe/xe_uc_fw: Use firmware files from standard locations The GuC/HuC firmware files used by Xe drivers are the same as used by i915. Use the already-known location to find those firmware files, for a couple of reasons: 1. Avoid having the same firmware placed on two different places on MODULE_FIRMWARE(), if both 915 and xe drivers are compiled; 2. Having firmware files located on different locations may end creating bigger initramfs, as the same files will be copied twice my mkinitrd/dracut/...; 3. this is the place where those firmware files are located at https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git Upstream doesn't expect them to have on other places; 4. When built with display support, DMC firmware will be loaded from i915/ directory. It is very confusing to have some firmware files on a different place for the same driver. Cc: Matthew Brost Cc: Lucas de Marchi Cc: Rodrigo Vivi Cc: Thomas Hellstrom Cc: Daniel Vetter Cc: David Airlie Signed-off-by: Mauro Carvalho Chehab [ Mostly agree with the direction of "use the firmware blobs from upstream at their current location for these platforms". Previous directory was not wrong as the plan was to have it handled in the upstream firmware repo. For future platforms the location can be changed if the support is only in xe ] Signed-off-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230310081338.3275583-1-mauro.chehab@linux.intel.com Signed-off-by: Rodrigo Vivi commit 5fd92bdd54e2f0e0611e690f3e03d6d3fa9621d8 Author: Jani Nikula Date: Thu Mar 9 14:21:33 2023 +0200 drm/xe/irq: the irq handler local variable need not be static It's just a local variable. Signed-off-by: Jani Nikula Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit ccbb6ad52ab1a0fa4d386dc9f591240f5eb81646 Author: Lucas De Marchi Date: Mon Mar 13 14:16:28 2023 -0700 drm/xe: Replace i915 with xe in uapi All structs and defines had already been renamed to "xe", but some comments with "i915" were left over. Rename them. Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Link: https://lore.kernel.org/r/20230313211628.2492587-1-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit fd93946d594efc6df3f48c684ce87cbbde82dcb9 Author: Lucas De Marchi Date: Mon Mar 13 17:30:11 2023 -0700 drm/xe: Add missing LRC workarounds for graphics 1200 Synchronize LRC workarounds for graphics version 1200 with i915 up to commit 7cdae9e9ee5e ("drm/i915: Move DG2 tuning to the right function"). These were probably missed for TGL/RKL before because in i915 it uses a !IS_DG1() condition. Avoid a similar issue by just checking the graphics version 1200 since DG1 is 1210. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-14-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 95ff48c2e7a6f4968b1f795462e7e3af334c2749 Author: Lucas De Marchi Date: Mon Mar 13 17:30:10 2023 -0700 drm/xe: Add missing ADL-P engine workaround Add the one missing workaround for ADL-P when comparing to i915 up to commit 7cdae9e9ee5e ("drm/i915: Move DG2 tuning to the right function"). Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-13-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 8cd7e9759766d717cf4c7be53e17acf6dff19283 Author: Lucas De Marchi Date: Mon Mar 13 17:30:09 2023 -0700 drm/xe: Add missing DG2 lrc workarounds Synchronize with i915 the DG2 lrc workarounds as of commit 4d14d7717f19 ("drm/i915/selftest: Fix ktime_get() and h/w access order"). A few simplifications were done when the WA should be applied to some steps of a subplatform and all the steppings of the other subplatforms. In this case, it was simply applied to all the steppings, which only means applying it to a few more A* steppings. The implementation of the workaround 16011186671 triggers a bug in the RTP infra: it's not possible to set the flag the usual way when having multiple actions in the entry. This may be fixed later, but for now it's sufficient to just set the flag directly without the helper macro. v2: Fix 14014947963 to use FIELD_SET (Matt Roper) Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-12-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 11f78b130835695150ddeae98a90d433e5b02d1e Author: Lucas De Marchi Date: Mon Mar 13 17:30:08 2023 -0700 drm/xe: Add missing DG2 lrc tunings Synchronize with i915 the DG2 tunings as of commit 4d14d7717f19 ("drm/i915/selftest: Fix ktime_get() and h/w access order"). Contrary to the tuning "gang timer" for TGL, there is no quick justification for why the read back is disabled in i915. Keep it with that flag for now. That can be tentatively removed later when the read values are checked. v2: Use XEHP_FF_MODE2 instead of GEN12_FF_MODE2 (Matt Roper) Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-11-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 4d5ab1216385941fa9336b13cb27c259b149ab43 Author: Lucas De Marchi Date: Mon Mar 13 17:30:07 2023 -0700 drm/xe: Add missing DG2 engine workarounds Synchronize with i915 the DG2 gt workarounds as of commit 4d14d7717f19 ("drm/i915/selftest: Fix ktime_get() and h/w access order"). A few simplifications were done when the WA should be applied to some steps of a subplatform and all the steppings of the other subplatforms. This happened with Wa_1509727124, Wa_22012856258 and a few others. In figure the pre-production steppings will be removed, so this can be already simplified a little bit. v2: - Make 1308578152 conditional on first gslice fused off - Add the missing Wa_1608949956/Wa_14010198302 (Matt Roper) v3: - Do not duplicate the implementation of 18019627453 since it's already covered by other WA numbers in graphics versions 1200 and 1210 Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-10-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 911aeb0f61b8cb9b903105d2e585e80baadb513b Author: Lucas De Marchi Date: Mon Mar 13 17:30:06 2023 -0700 drm/xe: Add missing DG2 gt workarounds and tunings Synchronize with i915 the DG2 gt workarounds as of commit 4d14d7717f19 ("drm/i915/selftest: Fix ktime_get() and h/w access order"). Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-9-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 4688d9ce2e3d0ad59147970295018cec4c67afa5 Author: Lucas De Marchi Date: Mon Mar 13 17:30:05 2023 -0700 drm/xe: Add PVC engine workarounds Sync PVC engine workarounds with i915. v2: Remove 16016694945. It was added by mistake. It's a GT workaround, already present in the GT table (Matt Roper) Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-8-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit a19220fa5f1a740d98654ee1d6cf11a8e0158018 Author: Lucas De Marchi Date: Mon Mar 13 17:30:04 2023 -0700 drm/xe: Add PVC gt workarounds Synchronize with i915 the PVC gt workarounds as of committ commit 4d14d7717f19 ("drm/i915/selftest: Fix ktime_get() and h/w access order"). v2: Add masked flag to XEHPC_LNCFMISCCFGREG0 (Matt Roper) Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-7-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 6b5ccd6360e29e67a760f82d0b28cf7c058732f7 Author: Lucas De Marchi Date: Mon Mar 13 17:30:03 2023 -0700 drm/xe: Reorder WAs to consider the platform Now that number of platforms is growing, it's getting hard to know the workarounds for each platform. Split the entries inside the same table so the workarounds checking IP version are listed first, followed by each platform. Next step when it grows too much is to split in smaller tables. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-6-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 6647e2fe23f595dc46780b7cc26be872ca168643 Author: Lucas De Marchi Date: Mon Mar 13 17:30:02 2023 -0700 drm/xe/debugfs: Dump register save-restore tables Add debugfs entry to dump the final tables with register save-restore information. For the workarounds, this has a format a little bit different than when the values are applied because we don't want to read the values from the HW when dumping via debugfs. For whitelist it just re-uses the print function added for when the whitelist is being built. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-5-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit d855d2246ea6b04cbda372846b21c040fb068575 Author: Lucas De Marchi Date: Mon Mar 13 17:30:01 2023 -0700 drm/xe: Print whitelist while applying Besides printing the various register save-restore, it's also useful to know the register being allowed/denied access from unprivileged batch buffers. Print them during device probe. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-4-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 5be84050ddce298503e7290d375b6dcf3ce920d2 Author: Lucas De Marchi Date: Mon Mar 13 17:30:00 2023 -0700 drm/xe/reg_sr: Tweak verbosity for register printing If there is no register to save-restore or whitelist, just return. This drops some noise from the log, particurlarly for platforms with several engines like PVC: [drm:xe_reg_sr_apply_mmio [xe]] Applying bcs0 save-restore MMIOs [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs0 registers [drm:xe_reg_sr_apply_mmio [xe]] Applying bcs1 save-restore MMIOs [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs1 registers [drm:xe_reg_sr_apply_mmio [xe]] Applying bcs2 save-restore MMIOs [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs2 registers [drm:xe_reg_sr_apply_mmio [xe]] Applying bcs5 save-restore MMIOs [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs5 registers [drm:xe_reg_sr_apply_mmio [xe]] Applying bcs6 save-restore MMIOs [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs6 registers [drm:xe_reg_sr_apply_mmio [xe]] Applying bcs7 save-restore MMIOs [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs7 registers [drm:xe_reg_sr_apply_mmio [xe]] Applying bcs8 save-restore MMIOs [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs8 registers [drm:xe_reg_sr_apply_mmio [xe]] Applying ccs0 save-restore MMIOs [drm:xe_reg_sr_apply_mmio [xe]] REG[0x20e4] = 0x00008000 [drm:xe_reg_sr_apply_mmio [xe]] REG[0xb01c] = 0x00000001 [drm:xe_reg_sr_apply_mmio [xe]] REG[0xe48c] = 0x00000800 [drm:xe_reg_sr_apply_mmio [xe]] REG[0xe7c8] = 0x40000000 ... On a PVC system it should show something like below. Whitelist calls are still there since they aren't actually empty - driver just doesn't print each individual entry. This will be fixed in future. [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs0 registers [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs1 registers [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs2 registers [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs5 registers [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs6 registers [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs7 registers [drm:xe_reg_sr_apply_whitelist [xe]] Whitelisting bcs8 registers [drm:xe_reg_sr_apply_mmio [xe]] Applying ccs0 save-restore MMIOs [drm:xe_reg_sr_apply_mmio [xe]] REG[0x20e4] = 0x00008000 [drm:xe_reg_sr_apply_mmio [xe]] REG[0xb01c] = 0x00000001 [drm:xe_reg_sr_apply_mmio [xe]] REG[0xe48c] = 0x00000800 [drm:xe_reg_sr_apply_mmio [xe]] REG[0xe7c8] = 0x40000000 v2: Only tweak log verbosity, leave the whitelist printout for later since decoding the whitelist is more complex. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-3-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 143800547b96dfc56d1f50a135c367fbfd40fd5d Author: Lucas De Marchi Date: Mon Mar 13 17:29:59 2023 -0700 drm/xe/rtp: Add match helper for gslice fused off Add match helper to detect when the first gslice is fused off, as needed by future workarounds. v2: - Add warning if called on a platform without geometry pipeline (Matt Roper) - Hardcode 4 as the number of gslices, which matches all the currently supported platforms. PVC doesn't have geometry pipeline and shouldn't use this function (Matt Roper) Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230314003012.2600353-2-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 69db25e447b8a3b9153db8a9004c50b080d0497e Author: Matthew Auld Date: Tue Mar 14 08:58:38 2023 +0000 drm/xe: add xe_ttm_stolen_cpu_access_needs_ggtt() xe_ttm_stolen_cpu_inaccessible() was originally meant to just cover the case where stolen is not directly CPU accessible on some older integrated platforms, and as such a GGTT mapping was also required for CPU access (as per the check in xe_bo_create_pin_map_at()). However with small-bar systems on dgfx we have one more case where stolen is also inaccessible, however here we don't have any fallback GGTT mode for CPU access. Fix the check in xe_bo_create_pin_map_at() to make this distinction clear. In such a case the later vmap() will fail anyway. v2: fix kernel-doc warning v3: Simplify further and remove cpu_inaccessible() Suggested-by: Maarten Lankhorst Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit ddad061e8fbcba69bbdd9ee05b1749810c419920 Author: Matthew Auld Date: Tue Mar 14 08:58:37 2023 +0000 drm/xe: one more s/lmem/vram/ Looks to have been introduced in some very recent changes, in-between merging the driver wide s/lmem/vram/. Signed-off-by: Matthew Auld Cc: Gwan-gyeong Mun Cc: Lucas De Marchi Cc: Rodrigo Vivi Reviewed-by: Thomas Hellström Reviewed-by: Gwan-gyeong Mun Signed-off-by: Rodrigo Vivi commit 11823d48abce17d45e7e8c9bd525203f0096c6e8 Author: Riana Tauro Date: Thu Mar 9 18:48:56 2023 +0530 drm/xe: Fix overflow in vram manager The overflow caused xe_bo_restore_kernel to return an error Fix overflow in vram manager alloc function. Signed-off-by: Riana Tauro Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 6d4f49b7dec3126c6d5491bcea5ae815b025d042 Author: Jani Nikula Date: Thu Mar 9 14:17:46 2023 +0200 drm/xe: make compound literal initialization const Be careful about having const in the compound literal initialization to keep the initializers in rodata. Here, the impact is 1.8k of mutable data moved to rodata. add/remove: 0/1 grow/shrink: 0/0 up/down: 0/-1804 (-1804) Data old new delta __compound_literal 1804 - -1804 Total: Before=42425, After=40621, chg -4.25% add/remove: 0/0 grow/shrink: 1/0 up/down: 1804/0 (1804) RO Data old new delta __compound_literal 7696 9500 +1804 Total: Before=138535, After=140339, chg +1.30% Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Signed-off-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230309121746.479146-1-jani.nikula@intel.com Signed-off-by: Rodrigo Vivi commit 91ed180b419a1b2ccf9cc41999cb87eb9805fa38 Author: Lucas De Marchi Date: Wed Mar 1 01:31:12 2023 -0800 drm/xe/pvc: Remove A* steppings The PVC pre-production A* steppings are not going to be supported in xe driver - the steppings are important for the WAs and since we are not adding the pre-productions ones, there is no need to add the stepping. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 766849c4accad67f8affa37c580d44f48be193b6 Author: Lucas De Marchi Date: Wed Mar 1 01:31:09 2023 -0800 drm/xe: Name LRC wa after the engine it belongs This makes it easier when printing the register-save-restore values to know what is the engine. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit f647eff1725430dd835ac05a9f8f1661e2765f8e Author: Lucas De Marchi Date: Wed Mar 1 01:31:08 2023 -0800 drm/xe: Remove dump function from reg_sr The dump function was originally added with the idea that it could be re-used both for printing the reg-sr data and saving it to pass to GuC via ADS. This was not used by the GuC integration, so remove it now to give place to a new debug. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 043790f3edb554f8db3e841fd17a33b622bc2b31 Author: Lucas De Marchi Date: Wed Mar 1 01:31:07 2023 -0800 drm/xe/rtp: Add match for render reset domain This allows to create WA/tuning rules that match the first engine that is either of compute or render class. This matters for platforms that don't have a render engine and that may have arbitrary compute engines fused off: some register programming need to be added to one of those engines. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 4c128558fe16b77013a251bcc3af8caa77fb7732 Author: Lucas De Marchi Date: Wed Mar 1 01:31:06 2023 -0800 drm/xe/rtp: Move match function from wa to rtp Match functions are generally useful for other parts of the code (e.g. xe_tuning.c). Move and rename the single one available to create a place where similar match functions can be added. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 1415283befa0e47df1270d10356a074793664757 Author: Lucas De Marchi Date: Fri Mar 3 22:30:04 2023 -0800 drm/xe: Constify xe_dss_mask_group_ffs() Due to how xe_dss_mask_t is implemented, the type is a pointer. Since this is only used for looking up the bits, make it const so it can be used together with a const gt passed around. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 8846ffb457587e5d393a83ce977c3db7c800fe58 Author: Lucas De Marchi Date: Fri Mar 3 22:26:55 2023 -0800 drm/xe: Allow const propagation in gt_to_xe() Replace the inline function with a _Generic() so gt_to_xe() can work with a const struct xe_gt*, which leads to a const struct xe *. This allows a const gt being passed around and when the xe device is needed, compiler won't issue a warning that calling gt_to_xe() would discard the const. Rather, just propagate the const to the xe pointer being returned. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 6b980aa88d403db3e4cf5b58965dfa9a5f27c740 Author: Lucas De Marchi Date: Wed Mar 8 18:18:57 2023 -0800 drm/xe/mcr: Document how to initialize group/instance Add a sentence about the initialization so it's clear for newcomers how to tweak the init functions for new platforms. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit e84535d86043af8fc9edcbbeb00f2e47e8ccb130 Author: Lucas De Marchi Date: Mon Mar 6 16:40:27 2023 -0800 drm/xe/mcr: Add L3BANK steering for DG2 Some register ranges with replication type L3BANK were missing from the driver table. The following warning was triggering when adding a workaround touching the register 0xb188: xe 0000:03:00.0: Did not find MCR register 0xb188 in any MCR steering table Add the L3BANK ranges according to the spec. v2: - Fix typo in one of the ranges: s/0x00BCFF/0x008CFF/ (Matt Roper) - Add termination rule in the init function for L3BANK (Matt Roper) Bspec: 66534 Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 4b1430f77553ca3e4f9033d4d614b193da233a30 Author: Thomas Hellström Date: Wed Mar 8 19:49:22 2023 +0100 drm/xe/vm: Use the correct vma destroy sequence on userptr failure Fix the below warning by using the correct vma destroy sequence: [ 92.204921] ------------[ cut here ]------------ [ 92.204954] WARNING: CPU: 3 PID: 2449 at drivers/gpu/drm/xe/xe_vm.c:933 xe_vma_destroy+0x280/0x290 [xe] [ 92.205002] Modules linked in: ccm nft_objref cmac nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_mangle iptable_raw iptable_security ip_set nf_tables nfnetlink ip6table_filter iptable_filter bnep sunrpc vfat fat iwlmvm mac80211 intel_rapl_msr ee1004 ppdev intel_rapl_common snd_hda_codec_realtek libarc4 iTCO_wdt snd_hda_codec_generic intel_pmc_bxt x86_pkg_temp_thermal iTCO_vendor_support intel_powerclamp coretemp intel_cstate iwlwifi btusb btrtl btbcm snd_hda_intel btintel snd_intel_dspcfg eeepc_wmi snd_hda_codec asus_wmi bluetooth snd_hwdep snd_seq ledtrig_audio snd_hda_core snd_seq_device sparse_keymap cfg80211 snd_pcm intel_uncore joydev platform_profile mei_me wmi_bmof intel_wmi_thunderbolt snd_timer pcspkr ecdh_generic i2c_i801 snd [ 92.205060] ecc mei rfkill soundcore idma64 i2c_smbus parport_pc parport acpi_pad acpi_tad xe drm_ttm_helper ttm i2c_algo_bit drm_suballoc_helper kunit drm_buddy gpu_sched drm_display_helper drm_kms_helper drm crct10dif_pclmul crc32_pclmul crc32c_intel nvme nvme_core e1000e ghash_clmulni_intel drm_panel_orientation_quirks video wmi pinctrl_tigerlake usb_storage ip6_tables ip_tables fuse [ 92.205242] CPU: 3 PID: 2449 Comm: xe_vm Tainted: G U 6.1.0+ #120 [ 92.205254] Hardware name: ASUS System Product Name/PRIME B560M-A AC, BIOS 0403 01/26/2021 [ 92.205266] RIP: 0010:xe_vma_destroy+0x280/0x290 [xe] [ 92.205299] Code: 74 15 48 8b 93 a0 01 00 00 48 8b 83 a8 01 00 00 48 89 42 08 48 89 10 4c 89 ab a0 01 00 00 4c 89 ab a8 01 00 00 e9 1b fe ff ff <0f> 0b e9 a3 fe ff ff 0f 0b e9 82 fe ff ff 66 90 0f 1f 44 00 00 48 [ 92.205322] RSP: 0018:ffffaadd465c3a58 EFLAGS: 00010246 [ 92.205331] RAX: 0000000000000000 RBX: ffff9706d53ed400 RCX: 0000000000000001 [ 92.205341] RDX: ffff9706d53ed480 RSI: ffffffffa756dc2b RDI: ffffffffa760a05e [ 92.205351] RBP: 0000000000000000 R08: 0000000000000000 R09: 000000002c5370a2 [ 92.205361] R10: ffff9706ca520000 R11: 0000000022c5370a R12: ffff9706cad03800 [ 92.205370] R13: 000000000004ffff R14: fffffffffffffff2 R15: 0000000000000000 [ 92.205380] FS: 00007fe98203a940(0000) GS:ffff970dffac0000(0000) knlGS:0000000000000000 [ 92.205392] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 92.205400] CR2: 00007fe982ccb000 CR3: 000000010d6e6003 CR4: 0000000000770ee0 [ 92.205410] PKRU: 55555554 [ 92.205415] Call Trace: [ 92.205419] [ 92.205426] vm_bind_ioctl_lookup_vma+0x9bb/0xbf0 [xe] [ 92.205461] ? lock_is_held_type+0xe3/0x140 [ 92.205472] ? xe_vm_find_overlapping_vma+0x77/0x90 [xe] [ 92.205503] ? __vm_bind_ioctl_lookup_vma.constprop.0+0x9e/0xe0 [xe] [ 92.205533] ? __lock_acquire+0x3a3/0x1fb0 [ 92.205543] ? register_lock_class+0x38/0x480 [ 92.205550] ? __lock_acquire+0x3a3/0x1fb0 [ 92.205558] ? __lock_acquire+0x3a3/0x1fb0 [ 92.205567] ? __lock_acquire+0x3a3/0x1fb0 [ 92.205579] ? lock_acquire+0xbf/0x2b0 [ 92.205586] ? lock_acquire+0xcf/0x2b0 [ 92.205597] xe_vm_bind_ioctl+0x977/0x1c30 [xe] [ 92.205630] ? find_held_lock+0x2b/0x80 [ 92.205640] ? lock_release+0x131/0x2c0 [ 92.205648] ? xe_vm_ttm_bo+0x40/0x40 [xe] [ 92.205677] drm_ioctl_kernel+0xa1/0x150 [drm] [ 92.205706] drm_ioctl+0x221/0x420 [drm] [ 92.205727] ? xe_vm_ttm_bo+0x40/0x40 [xe] [ 92.205764] __x64_sys_ioctl+0x8d/0xd0 [ 92.205774] do_syscall_64+0x37/0x90 [ 92.205781] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 92.205790] RIP: 0033:0x7fe982be8d6f [ 92.205797] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00 [ 92.205821] RSP: 002b:00007ffde9f9c560 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 92.205832] RAX: ffffffffffffffda RBX: 00007fadeadbe000 RCX: 00007fe982be8d6f [ 92.205842] RDX: 00007ffde9f9c5f0 RSI: 0000000040786445 RDI: 0000000000000003 [ 92.205851] RBP: 00007ffde9f9c5f0 R08: 00007fadeadbe000 R09: 0000000000040000 [ 92.205861] R10: 0000000000000003 R11: 0000000000000246 R12: 0000000040786445 [ 92.205871] R13: 0000000000000003 R14: 0000000000000003 R15: 00007fe982e02000 [ 92.205888] [ 92.205892] irq event stamp: 82723 [ 92.205897] hardirqs last enabled at (82731): [] __up_console_sem+0x5e/0x70 [ 92.205910] hardirqs last disabled at (82738): [] __up_console_sem+0x43/0x70 [ 92.205922] softirqs last enabled at (82182): [] __irq_exit_rcu+0xed/0x160 [ 92.205935] softirqs last disabled at (82163): [] __irq_exit_rcu+0xed/0x160 [ 92.205947] ---[ end trace 0000000000000000 ]--- Reported-by: Francois Dugast Signed-off-by: Thomas Hellström Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 13fb0c98723f54a884090864983fff4953deb185 Author: Matt Roper Date: Wed Mar 8 16:55:30 2023 -0800 drm/xe: Add support for CCS engine fusing For Xe_HP platforms that can have multiple CCS engines, the presence/absence of each CCS is inferred by the presence/absence of any DSS in the corresponding quadrant of the GT's DSS mask. This handling is only needed on platforms that can have more than one CCS. The CCS is never fused off on platforms like MTL that can only have one. v2: - Add extra warnings to try to catch mistakes where the register counts in get_num_dss_regs() are updated without corresponding updates to the register parameters passed to load_dss_mask(). (Lucas) - Add kerneldoc for xe_gt_topology_has_dss_in_quadrant() and clarify why we care about quadrants of the DSS space. (Lucas) - Ensure CCS engine counting treats engine mask as 64-bit. (Lucas) Cc: Lucas De Marchi Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230309005530.3140173-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 7c7225ddaa343a3f380f8b92cd2b30e1b5701cb1 Author: Matt Roper Date: Wed Mar 8 16:55:29 2023 -0800 drm/xe: Separate engine fuse handling into dedicated functions The single function to handle fuse registers for all types of engines is becoming a bit long and hard to follow (and we haven't even added the compute engines yet). Let's split it into dedicated functions for each engine class. v2: - Add note about BCS0 always being present. (Bala) - Add forcewake assertion to read_copy_fuses. (Bala) Cc: Balasubramani Vivekanandan Reviewed-by: Balasubramani Vivekanandan Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230309005530.3140173-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 2a8477f7614a62b41b034e3eaf017d41e8a58ce9 Author: Matthew Auld Date: Wed Mar 8 12:30:08 2023 +0000 drm/xe: s/lmem/vram/ This seems to be the preferred nomenclature in xe. Currently we are intermixing vram and lmem, which is confusing. v2 (Gwan-gyeong Mun & Lucas): - Rather apply to the entire driver Signed-off-by: Matthew Auld Cc: Maarten Lankhorst Cc: Gwan-gyeong Mun Cc: Lucas De Marchi Acked-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 39fd0b4507c3ba86ef04827208dd3aa85d2d796e Author: Matt Roper Date: Tue Mar 7 16:55:08 2023 -0800 drm/xe/guc: Handle regset overflow check for entire GT Checking whether a single engine's register save/restore entries overflow the expected/pre-allocated GuC ADS regset area isn't terribly useful; we actually want to check whether the combined entries from all engines on the GT overflow the regset space. Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230308005509.2975663-1-matthew.d.roper@intel.com Signed-off-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 6db7761bbca649319096431c38670c596107596d Author: Nirmoy Das Date: Wed Mar 8 17:23:22 2023 +0100 drm/xe/stolen: Exclude reserved lmem portion The address set by firmware in GEN12_DSMBASE in driver initialization doesn't mean "anything above that and until end of lmem is part of DSM". In fact, there may be a few KB that is not part of DSM on the end of lmem. How large is that space is platform-dependent, but since it's always less than the DSM granularity, it can be simplified by simply aligning the size down. Suggested-by: Lucas De Marchi Signed-off-by: Nirmoy Das Signed-off-by: Rodrigo Vivi commit b99cb6216bdf350e2d94c547c27f063b4434ae5d Author: Niranjana Vishwanathapura Date: Mon Mar 6 05:34:59 2023 -0800 drm/xe/migrate: Fix number of PT structs in docbook Update xe_migrate_doc.h with 32 page table structs (not 48) v2: minor typo fix Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Maarten Lankhorst Signed-off-by: Lucas De Marchi Link: https://lore.kernel.org/r/20230306133459.7803-1-niranjana.vishwanathapura@intel.com Signed-off-by: Rodrigo Vivi commit 907a319c8c8e125224b088f91f468f549f1e1da7 Author: Thomas Hellström Date: Thu Mar 2 10:01:41 2023 +0100 drm/xe/tests: Grab a memory access reference around the migrate sanity test It appears we don't hold a memory access reference for the accesses in this test, which may results in printed warnings and possibly the GT not woken up for the memory accesses. Add a memory access reference around the test. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 282c683a56e9713a3b70c4cffd17cb48bdbacca2 Author: Thomas Hellström Date: Thu Mar 2 09:54:59 2023 +0100 drm/xe/tests: Remove CONFIG_FB dependency We currently don't have any tests that explicitly depends on this config option, so remove that build dependency. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 7dae750dde42459483054384a5d234b54e643cdd Author: Lucas De Marchi Date: Mon Mar 6 08:57:57 2023 -0800 drm/xe: Fix ROW_CHICKEN2 define When this register was added in xe for some workarounds, it was copied from i915 before the registers got changed to add the MCR annotation. The register 0xe4f4 is MCR since gen8, long before any GPU supported by the xe driver. Replace all occurrences with the right register. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230306165757.633796-1-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit cedbc0b75790a1ee4f0bad0124c84b6813c2ef8c Author: Lucas De Marchi Date: Mon Mar 6 13:24:50 2023 -0800 drm/xe: Fix duplicated setting for register 0x6604 The following warning shows up for TGL: [drm:xe_reg_sr_add [xe]] *ERROR* Discarding save-restore reg 6604 (clear: 00ff0000, set: 00040000, masked: no): ret=-22 [drm:xe_reg_sr_add [xe]] *ERROR* Discarding save-restore reg 6604 (clear: 00ff0000, set: 00040000, masked: no): ret=-22 That is because the same register is being set both by the WAs and the tunings. Like was done in i915, prefer the tuning over the workaround since that is applicable for more platforms. Also fix the tuning: it was incorrectly using the MCR version of the register, but that only became true in XEHP. References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/233 Reported-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://lore.kernel.org/r/20230306212450.803557-1-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 63239946bc0101c2b10c119c77cd4b132d2c6484 Author: José Roberto de Souza Date: Thu Mar 2 08:00:38 2023 -0800 drm/xe: Fix size of xe_eu_mask_t XE_MAX_DSS_FUSE_REGS was being used to calculate the size of xe_eu_mask_t while it should use XE_MAX_EU_FUSE_REGS. There are no know issues about this but fixing it anyways. Reviewed-by: Lucas De Marchi Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 541623a406fe1fd516ac9564b2388a3ec31610fe Author: Lucas De Marchi Date: Wed Mar 1 17:34:05 2023 -0800 drm/xe: Fix typo persitent->persistent Fix typo as noticed by Matt Roper: git grep -l persitent | xargs sed -i 's/persitent/persistent/g' ... and then fix coding style issues. Signed-off-by: Lucas De Marchi Reviewed-by: Maarten Lankhorst Link: https://lore.kernel.org/r/20230302013411.3262608-2-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 3ea9f1f1f699c44b3064006b51566ed6accc6a53 Author: Lucas De Marchi Date: Fri Feb 24 16:21:37 2023 -0800 drm/xe/device: Prefer the drm-managed mutex_init There's inconsistent use of mutex_init(), in xe_device_create(), with several of them never calling mutex_destroy() in xe_device_destroy(). Migrate all of them to drmm_mutex_init(), so the destroy part is automatically called. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://lore.kernel.org/r/20230225002138.1759016-2-lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit d79bdcdf06a3b421ac386f3513365f0bf2a5649a Author: Matthew Auld Date: Thu Dec 22 10:36:47 2022 +0000 drm/xe/bo: explicitly reject zero sized BO In the depths of ttm, when allocating the vma node this should result in -ENOSPC it seems. However we should probably rather reject as part of our own ioctl sanity checking, and then treat as programmer error in the lower levels. Signed-off-by: Matthew Auld Cc: Lucas De Marchi Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit e103c45f501a32eaa9e0a12db1c1e167b06f78cf Author: Matthew Auld Date: Thu Dec 22 10:53:59 2022 +0000 drm/xe: prefer xe_bo_create_pin_map() With small-bar we likely want to annotate all the kernel users that require CPU access with vram. If xe_bo_create_pin_map() is the central place for that then we should have a central place to annotate. This also simplifies the code and fixes what appears to be a double xe_bo_put(hwe->hwsp) in the error handling. Signed-off-by: Matthew Auld Cc: Lucas De Marchi Reviewed-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi commit 90385dcfc040648e928a883298a19e2afbba41e5 Author: Matt Roper Date: Thu Feb 23 10:57:40 2023 -0800 drm/xe/mocs: Drop HAS_RENDER_L3CC flag The HAS_RENDER_L3CC is set unconditionally so there's no need to keep it as a dedicated flag. For error checking purposes, we can just make sure the 'table' field is initialized properly. Cc: Lucas De Marchi Suggested-by: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit f659ac1564d96b1ba19694db9899d6fb18ffc3e7 Author: Matt Roper Date: Thu Feb 23 10:57:39 2023 -0800 drm/xe/mocs: LNCF MOCS settings only need to be restored on pre-Xe_HP Reprogramming the LNCF MOCS registers on render domain reset is not intended to be regular driver programming, but rather the implementation of a specific workaround (Wa_1607983814). This workaround no longer applies on Xe_HP any beyond, so we can expect that these registers, like the rest of the LNCF/LBCF registers, will maintain their values through all engine resets. We should only add these registers to the GuC's save/restore list on platforms that need the workaround. Furthermore, xe_mocs_init_engine() appears to be another attempt to satisfy this same workaround. This is unnecessary on the Xe driver since even on platforms where the workaround is necessary, all single-engine resets are initiated by the GuC and thus the GuC will take care of saving/restoring these registers. The only host-initiated resets we have in Xe are full GT resets which will already (re)initialize these registers as part of the regular xe_mocs_init() flow. v2: - Add needs_wa_1607983814() so that calculate_regset_size() doesn't overallocate regset space when the workaround isn't needed. (Lucas) - On platforms affected by Wa_1607983814, only add the LNCF MOCS registers to the render engine's GuC save/restore list; resets of other engines don't need to save/restore these. Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit ee17e7f34a5e8a996da0c54e31584c5b089d65ff Author: Philippe Lecluse Date: Thu Feb 23 10:57:38 2023 -0800 drm/xe/mocs: add MTL mocs It was incorrectly using dg2_mocs for now. v2 (MattR): - Use REG_GENMASK/REG_FIELD_PREP for bitfields - Add bspec references Bspec: 45101, 45410, 63882 Signed-off-by: Philippe Lecluse Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 6c57023ec42713e6cb91fdfbbd77147979e597e2 Author: Matt Roper Date: Thu Feb 23 10:57:37 2023 -0800 drm/xe/mocs: Drop duplicate assignment of uc_index The DG1 branch needlessly assigns uc_index twice. Drop the second instance. Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit d1000e3fc9fa6bfb88d37a177542b9b24802081f Author: Matt Roper Date: Thu Feb 23 10:57:36 2023 -0800 drm/xe/mocs: Drop xe_mocs_info_index The values in the xe_mocs_info_index enum only match old pre-gen12 hardware not supported by the Xe driver. The only usage of this enum was to set a default value for info->unused_entries_index, but this is unnecessary since every platform in the subsequent switch statement sets a proper platform-specific value (and the XE_MOCS_PTE default doesn't even make sense since the hardware dropped the "use PAT settings" capability in gen12). v2: - Add a check that unusued_entries_index is non-zero; even for platforms where this is a valid table entry, it's never the one we want this value assigned to. (Lucas) Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 579a6546d33c92d810d19e971fd85ee4d0b9a5ce Author: Matt Roper Date: Thu Feb 23 10:57:35 2023 -0800 drm/xe/mocs: Add missing RKL handling RKL should use the same "gen12" MOCS handling as TGL/ADL-S/ADL-P. Bspec: 45101 Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 7bc08d2f49b065cbabca8caad142df147b96dfff Author: Matt Roper Date: Thu Feb 23 10:57:34 2023 -0800 drm/xe/mocs: Drop unwanted TGL table TGL/RKL/ADLS/ADLP are all supposed to use the same MOCS table, with values defined in the bspec. Any entries listed in the bspec as reserved/error/undefined should always be initialized to the most cached and least coherent setting possible so that any userspace accidentally referencing those undefined entries will only experience an increase in coherency if spec updates down the road start defining real values. The TGL and gen12 table entries defined in the driver today are identical except that the TGL includes one additional (incorrect) setting for table index 1. Furthermore, the TGL-specific initialization does not define a dedicated value for info->unused_entries_index, so this incorrect table entry 1 also gets used to populate the MOCS registers for all reserved/unused table entries. This incorrect behavior is a holdover from i915 where the platform was enabled with an incorrect setting and by the time we noticed, it was too late to fix the table without breaking ABI compatibility (and on TGL we did indeed have some buggy userspace that was referencing the 'reserved' entry 1). Since the Xe driver starts fresh with a clean slate on ABI, there's no need to repeat the mistakes of i915 here. v2: - Reword/clarify commit message. (Lucas) Bspec: 45101 Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 8cb49012ac171698b1253dea45e56c284e997d38 Author: Lucas De Marchi Date: Sat Feb 25 12:10:39 2023 -0800 drm/xe: Do not spread i915_reg_defs.h include Reduce the use of i915_reg_defs.h so it can be encapsulated in a single place. 1) If it was being included by mistake, remove 2) If it was included for FIELD_GET()/FIELD_PREP()/GENMASK() and the like, just include 3) If it was included to be able to define additional registers, move the registers to the relavant headers (regs/xe_regs.h or regs/xe_gt_regs.h) v2: - Squash commit fixing i915_reg_defs.h include and with the one introducing regs/xe_reg_defs.h - Remove more cases of i915_reg_defs.h being used when all it was needed was linux/bitfield.h (Matt Roper) - Move some registers to the corresponding regs/*.h file (Matt Roper) Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi [Rodrigo squashed here the removal of the i915 include] commit 3457388fcd145d64e6852ca60084e822bec81e9f Author: Lucas De Marchi Date: Fri Feb 24 16:15:48 2023 -0800 drm/xe: Prefer single underscore for header guards Keep header guards consistent with regard to ifdef used. Prefer the more commonly used in the driver. $ git grep "ifndef __XE_" -- drivers/gpu/drm/xe | wc -l 8 $ git grep "ifndef _XE_" -- drivers/gpu/drm/xe | wc -l 112 Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 5ec15f83117f2f89af39109c264c1fb0bbf8b5f0 Author: Lucas De Marchi Date: Fri Feb 24 16:15:45 2023 -0800 drm/xe: Remove dependency on intel_mchbar_regs.h The only thing really needed is the base offset, MCHBAR_MIRROR_BASE_SNB. Remove the include and just define it inplace. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit e12ef39272a3690bc779e2d4d812e36c0e7d45f8 Author: Lucas De Marchi Date: Fri Feb 24 16:15:44 2023 -0800 drm/xe/guc_pc: Move gt register to the proper place Move a few defines from xe_guc_pc.c to the right register, now that there is one: xe_gt_regs.h. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit c584148145f73819a5ed968dc64ae10060fcd2c5 Author: Lucas De Marchi Date: Fri Feb 24 16:15:43 2023 -0800 drm/xe: Remove dependency on i915_reg.h Copy the macros used by xe in i915_reg.h to regs/xe_regs.h. A minimal cleanup is done while copying so they adhere minimally to the coding style. Further reordering and cleaning is left for later. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 63955b3bfa0b69fd86b9e827e0f14f3fa4508826 Author: Lucas De Marchi Date: Fri Feb 24 16:15:42 2023 -0800 drm/xe: Remove dependency on intel_gpu_commands.h Copy the macros used by xe in intel_gpu_commands.h to regs/xe_gpu_commands.h. PIPE_CONTROL_3D_ENGINE_FLAGS and PIPE_CONTROL_3D_ARCH_FLAGS were already defined in drivers/gpu/drm/xe/xe_ring_ops.c and only used there. So let that define to be used instead of also adding to the new header. v2: Let PIPE_CONTROL_3D_ENGINE_FLAGS/PIPE_CONTROL_3D_ARCH_FLAGS in the only .c that uses it instead of redefining (Matt Roper) Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 0992884d09cc1c91e9c3310a9204eb080db37714 Author: Lucas De Marchi Date: Fri Feb 24 16:15:41 2023 -0800 drm/xe: Remove dependency on intel_lrc_reg.h Create regs/xe_lrc_layout.h file with all the offsets used by the xe driver. Eventually the xe driver may use a different way to define them since it doesn't supported below gen12. v2: Rename file to intel_lrc_layout.h since it's not really about registers (Matt Roper) Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 226bfec858c93797dbd3d47d1418ed68684fa752 Author: Lucas De Marchi Date: Fri Feb 24 16:15:40 2023 -0800 drm/xe: Remove dependency on intel_gt_regs.h Create regs/xe_gt_regs.h file with all the registers and bit definitions used by the xe driver. Eventually the registers may be defined in a different way and since xe doesn't supported below gen12, the number of registers touched is much smaller, so create a new header. The definitions themselves are direct copy from the gt/intel_gt_regs.h file, just sorting the registers by address. Cleaning those up and adhering to a common coding style is left for later. v2: Make the change to MCR_REG location in a separate patch to go through the i915 branch (Matt Roper / Rodrigo) Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit b79e8fd954c48fba74b2c3807f6093ce40e9ab7f Author: Lucas De Marchi Date: Fri Feb 24 16:15:39 2023 -0800 drm/xe: Remove dependency on intel_engine_regs.h Create regs/xe_engine_regs.h file with all the registers and bit definitions used by the xe driver. Eventually the registers may be defined in a different way and since xe doesn't supported below gen12, the number of registers touched is much smaller, so create a new header. The definitions themselves are direct copy from the gt/intel_engine_regs.h file, just sorting the registers by address. Cleaning those up and adhering to a common coding style is left for later. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit ea9f879d037ff4d7851f35ba91dc774dd9033308 Author: Lucas De Marchi Date: Fri Feb 24 16:15:38 2023 -0800 drm/xe: Sort includes Sort includes and split them in blocks: 1) .h corresponding to the .c. Example: xe_bb.c should have a "#include "xe_bb.h" first. 2) #include 3) #include 4) local includes 5) i915 includes This is accomplished by running `clang-format --style=file -i --sort-includes drivers/gpu/drm/xe/*.[ch]` and ignoring all the changes after the includes. There are also some manual tweaks to split the blocks. v2: Also sort includes in headers Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit ba11f1b7ea5b59fdf58e5dec7b73fa914de65f8d Author: Matt Roper Date: Fri Feb 24 14:16:01 2023 -0800 drm/xe: Assume MTL's forcewake register continues to future platforms Starting with MTL, the GT forcewake ack register moved from 0x130044 to 0xDFC. We expect this change to carry forward to future platforms as well, so forcewake initialization should use an IP version check instead of matching the MTL platform specifically. The (re)definition of FORCEWAKE_ACK_GT_MTL in the forcewake file is also unnecessary; we can take the definition that already exists in the dedicated register header. Bspec: 65031, 64629 Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 74f800c7a982db1d10e2c0c0a0164ee1db878652 Author: Matt Roper Date: Fri Feb 24 11:08:14 2023 -0800 drm/xe: Remove gen-based mmio offsets from hw engine init During early generations of Intel GPUs, hardware engines would sometimes move to new MMIO offsets from one platform/generation to the next. These days engines the hardware teams put more effort into ensuring that engines stay at consistent locations; even major design changes (like the introduction of standalone media) keep the MMIO locations of the engines constant. Since all platforms supported by the Xe driver are new enough to have a single MMIO offset for each engine (and since our crystal ball says that these offsets are very unlikely to change again in the foreseeable future), we can simplify the driver's engine definitions and remove the gen-based MMIO bases. Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 353dfaaa31648c4e6f7f3fee5001f047ebf3ed67 Author: Lucas De Marchi Date: Wed Feb 22 21:00:35 2023 -0800 drm/xe: Fix kunit integration due to missing prototypes In order to avoid -Werror=missing-prototypes, add the prototypes in a separate tests/_test.h file that is included by both the implementation (tests/xe_.c, injected in xe.ko) and the kunit module (tests/xe__test.c -> xe--test.ko). v2: Add header and don't add ifdef to files that are already not built when not using kunit (Matt Auld) Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 5b7e50e2ea1745bd09c3d99a4f7c49d630124825 Author: Matthew Auld Date: Wed Feb 22 12:18:45 2023 +0000 drm/xe/pm: fix unbalanced ref handling In local_pci_probe() the core kernel increments the rpm for the device, just before calling into the probe hook. If the driver/device supports runtime pm it is then meant to put this ref during probe (like we do in xe_pm_runtime_init()). However when removing the device we then also need to take the reference back, otherwise the ref that is put in pci_device_remove() will be unbalanced when for example unloading the driver, leading to warnings like: [ 3808.596345] xe 0000:03:00.0: Runtime PM usage count underflow! Fix this by incrementing the rpm ref when removing the device. v2: - Improve the terminology in the commit message; s/drop/put/ etc (Lucas & Rodrigo) - Also call pm_runtime_forbid(dev) (Rodrigo) Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/193 Signed-off-by: Matthew Auld Cc: Lucas De Marchi Cc: Rodrigo Vivi Reviewed-by: Rodrigo Vivi Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 84ff55006578d169b9331014bd34f0da2ca0616b Author: Lucas De Marchi Date: Tue Feb 21 11:39:52 2023 -0800 drm/xe/guc: Remove i915_regs.h include i915_regs.h is not needed, particularly in a header file. What is needed is i915_reg_defs.h for use of _MMIO() and similar macros. Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 5a4a8e8b3b0be40c7cdf928ad8b6cfe6e5c465fd Author: Lucas De Marchi Date: Tue Feb 21 11:39:50 2023 -0800 drm/xe: Remove outdated build workaround Use the more common "call cc-disable-warning" way to disable warnings. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit e50bbbb9baf64dfe77f236636961b1ceb1b4c19d Author: Lucas De Marchi Date: Tue Feb 21 16:27:05 2023 -0800 drm/xe: Remove duplicate media_ver media_verx100 supersedes the info from media_ver. Leave media_ver in the struct xe_device_desc, used in xe_pci.c since it's easier to define common parts of the platforms like that. However all the rest of the driver should be using media_verx100 that is more future proof. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/216 Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit cb30cfdce50011ea53f5425b8be264f26cef60d8 Author: Lucas De Marchi Date: Tue Feb 21 15:33:48 2023 -0800 drm/xe: Add missing include xe_wait_user_fence.h Make xe_wait_user_fence.c include xe_wait_user_fence.h so it doesn't rely on indirect includes and also doesn't fail the build due to missing prototype for xe_wait_user_fence_ioctl(). Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 1d1b9262c5cb3c7c3d2a9f63e207dbb3d17bb3cc Author: Lucas De Marchi Date: Tue Feb 21 15:33:47 2023 -0800 drm/xe: Add missing doc for xe parameter Fix the following warning: ../drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c:55: warning: Function parameter or member 'xe' not described in 'xe_ttm_stolen_cpu_inaccessible' Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 220d957b5954ee4631fe781adfbfae8592b34811 Author: Lucas De Marchi Date: Tue Feb 21 15:33:46 2023 -0800 drm/xe: Remove unused functions xe_gt_topology_dss_group_mask and xe_gt_topology_count_dss are probably leftover from initial implementation - they are not called from anywhere. Remove those functions. Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 3dbec4703ee7b67a8dba47e5f1e668b7b17aeb1b Author: Lucas De Marchi Date: Tue Feb 21 15:33:44 2023 -0800 drm/xe: Fix application of LRC tunings LRC tunings were added after the gt ones and didn't add the call in xe_gt_record_default_lrcs() to process them like is done for workarounds. Add such a function and call it from xe_gt_record_default_lrcs(). Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 671ca05d7c9766407d7d7e4785d52e4a15d56027 Author: Lucas De Marchi Date: Tue Feb 21 15:33:43 2023 -0800 drm/xe: Make local functions static A few static functions not being declared like that break the build with W=1, like e.g. cc1: all warnings being treated as errors make[2]: *** [../scripts/Makefile.build:250: drivers/gpu/drm/xe/xe_gt.o] Error 1 ../drivers/gpu/drm/xe/xe_guc.c:240:6: error: no previous prototype for ‘guc_write_params’ [-Werror=missing-prototypes] 240 | void guc_write_params(struct xe_guc *guc) | ^~~~~~~~~~~~~~~~ Make them static. Signed-off-by: Lucas De Marchi Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit b47b0ef1ba34e351228b57ce7ba74efc6d7b2c24 Author: Matthew Auld Date: Wed Feb 15 10:28:45 2023 +0000 drm/xe/query: zero the region info There are also some reserved fields in here which are not currently cleared when handing back to userspace. Otherwise we might run into issues if we later wish to use them. Signed-off-by: Matthew Auld Reviewed-by: Lucas De Marchi lucas.demarchi@intel.com Signed-off-by: Rodrigo Vivi commit 6062acc1b8664ade91b4609ea056badd6f1e6802 Author: Matthew Auld Date: Wed Feb 15 10:28:44 2023 +0000 drm/xe/stolen: don't map stolen on small-bar The driver should still be functional with small-bar, just that the vram size is clamped to the BAR size (until we add proper support for tiered vram). For stolen vram we shouldn't iomap anything if the BAR size doesn't also contain the stolen portion, since on discrete the stolen portion is always at the end of normal vram. Stolen should still be functional, just that allocating CPU visible io memory will always return an error. v2 (Lucas) - Mention in the commit message that stolen vram is always as the end of normal vram, which is why stolen in not mappable on small-bar systems. - Just make xe_ttm_stolen_inaccessible() return true for such cases. Also rename to xe_ttm_stolen_cpu_inaccessible to better describe that we are talking about direct CPU access. Plus add some kernel-doc. Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/209 Reported-by: Lucas De Marchi Signed-off-by: Matthew Auld Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit 0d83be772c1f8e0d3db4a26a5f1308e058a98354 Author: Matthew Auld Date: Wed Feb 15 10:28:43 2023 +0000 drm/xe/mmio: fix forcewake ref leak in xe_mmio_ioctl Make sure we properly release the forcewake ref on all error paths. v2(Lucas): - Make it less verbose and just fold the unimplemented options into the default. The exact return value doesn't seem to matter for the corresponding IGT. - Replace the user triggerable WARN() with drm_dbg(). Signed-off-by: Matthew Auld Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit ba00da78ce4d2a7fe7ef245e1168b7946827995d Author: Rodrigo Vivi Date: Fri Feb 17 12:12:17 2023 -0500 drm/xe: Remove unseless xe_force_wake_prune. (!(gt->info.engine_mask & BIT(i))) cases are already handled in the init function. And these masks are not modified between the init and the prune. Suggested-by: Matt Roper Signed-off-by: Rodrigo Vivi Reviewed-by: Matt Roper commit 780637e28783af505864151da78e713f62ed64ae Author: Carlos Santa Date: Wed Feb 15 12:34:25 2023 -0800 drm/xe: Update the list of devices to add even more TGL devices The list of GTs got splitted a while back between GT1 and GT2 on TGL. References: https://patchwork.freedesktop.org/patch/388414/ CC: Rodrigo Vivi Signed-off-by: Carlos Santa Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit dc97898e8121878829ee3cf48fa8ce154807f90b Author: José Roberto de Souza Date: Thu Feb 16 06:16:44 2023 -0800 drm/xe: Initialize ret in mcr_lock() ret is not initialized in mcr_lock() when running in platforms with graphics IP version < 1270, this could cause drm_WARN_ON_ONCE() to hit eventually(what just happened to me). Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs") Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Signed-off-by: Rodrigo Vivi commit 844c0700a675a5e30644c867ae7b30cb680d176d Author: Lucas De Marchi Date: Wed Jan 25 23:33:38 2023 -0800 drm/xe/rtp: Support multiple actions per entry Just like there is support for multiple rules per entry in an rtp table, also support multiple actions. This makes it easier to add support for workarounds that need to change multiple registers. It also makes it slightly more readable as now the action part resembles the rule part. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 944a5e993a3e8a54ec56feec3253bb6b6f5c90d7 Author: Lucas De Marchi Date: Wed Jan 25 16:40:02 2023 -0800 drm/xe/rtp: Split action and entry flags Entry flags is meant for the whole entry, including the rule evaluation. Action flags are for flags applied to the register or action being taken. Since there's only one action per entry, the distinction was not important and a u8 was spared. However more and more workarounds are needing multiple actions. This prepares for multiple action support. Right now there are these action flags: - XE_RTP_ACTION_FLAG_MASKED_REG: register in the action is a masked register - XE_RTP_ACTION_FLAG_ENGINE_BASE: the engine base should be added to the register in order to form the real address And this entry flag: - XE_RTP_ENTRY_FLAG_FOREACH_ENGINE: the rules should be evaluated for each engine on the gt. It also automatically implies XE_RTP_ACTION_FLAG_ENGINE_BASE. Since there are likely not that many rules, reduce n_rules to u8 so the overall entry size doesn't increase more than needed. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 3747c88428a199620ca626a196781516c6da12e6 Author: Lucas De Marchi Date: Wed Jan 25 15:03:07 2023 -0800 drm/xe: Rename xe_rtp_regval to xe_rtp_action It's true that the struct records the register and the value (in form of 2 masks) to restore, but it also records more fields important to the application of workarounds/tuning, etc. One important part is what is the macro used to record these fields: SET/CLR/WR/FIELD_SET/etc. Thinking of the table as a set of rules + actions is more intuitive than rules + regval. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 564d64f83de9759c1faa4a64ee4aed8465281ecb Author: Lucas De Marchi Date: Mon Jan 30 17:08:37 2023 -0800 drm/xe/mcr: Add SQIDI steering for DG2 Like detailed in commit 927dfdd09d8c ("drm/i915/dg2: Add SQIDI steering"), some registers are expected to have the selector initialized just once and never set to anything else. For xe, the registers with SQIDI replication type (SF and MCFG) were missing, resulting in warnings like: [ 410.685565] xe 0000:03:00.0: Did not find MCR register 0x8724 in any MCR steering table While adding these registers, abstract the handling for "dg2_gam_ranges", moving them together with SF/MCFG to a dedicated table. This also avoids that range to be checked for platforms other than DG2. For DG2, this is the new steering output: # cat /sys/kernel/debug/dri/0/gt0/steering ... IMPLICIT steering: group=0x0, instance=0x0 0x000b00 - 0x000bff 0x001000 - 0x001fff 0x004000 - 0x004aff 0x008700 - 0x0087ff 0x00c800 - 0x00cfff 0x00f000 - 0x00ffff Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: Rodrigo Vivi commit 3319b213d7c8bdeaa001fec7b60aefa2390112d4 Author: Lucas De Marchi Date: Mon Jan 30 14:14:37 2023 -0800 drm/xe/mcr: Use designated init for xe_steering_types There is already a BUILD_BUG_ON() check to make sure the size follow the number of steering types. Also make sure the right index is being used for each steering type. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 43f98df1f5f0ef94d79ba2ef4f841a3f547f7a04 Author: Lucas De Marchi Date: Wed Jan 25 13:10:24 2023 -0800 drm/xe: Remove TODO from workaround documentation LRC workarounds are already implemented: remove leftover TODO. Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 2679be71f1372e8fac07d1be5443a5ba26b27345 Author: Lucas De Marchi Date: Mon Jan 23 09:38:27 2023 -0800 drm/xe: Remove TODO from rtp infra The function pointer is already present as match_func, inside struct xe_rtp_rule and handled as so instead of inside rtp_regval as originally thought out when this was written. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit b799aa5a04d09c4b3abe79b1c6563d54823410e6 Author: Lucas De Marchi Date: Wed Jan 25 14:14:38 2023 -0800 drm/xe: Fix xe_tuning include xe_tuning.c should include xe_tuning.h, not xe_wa.h Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 62421b45d431dc6f023334800eae1bffb1e77eb2 Author: Lucas De Marchi Date: Fri Jan 20 16:59:09 2023 -0800 drm/xe: Fix typo in MCR documentation Add missing "multicast" word and adapt/wrap the rest of the sentence. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 77775e24e684c761d44ba2f804581c0c42e0ad38 Author: Maarten Lankhorst Date: Tue Jan 31 23:36:39 2023 +0100 drm/xe: Add debugfs for dumping GGTT mappings Adding a debugfs dump of GGTT was useful for some debugging I did, and easy to add. Might be useful for others too. Signed-off-by: Maarten Lankhorst Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit 50a48cca608102a53a0961bd95aefb53a8ced3ab Author: Matthew Brost Date: Thu Jan 26 10:40:41 2023 -0800 drm/xe: Drop TLB invalidation from ring operations Now that we issue TLB invalidations on unbinds and rebind from execs we no longer need to issue TLB invalidations from the ring operations. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit 5387e865d90e927ba0af9d37855c9bd47cc9d00a Author: Matthew Brost Date: Fri Jan 27 13:00:28 2023 -0800 drm/xe: Add TLB invalidation fence after rebinds issued from execs If we add an TLB invalidation fence for rebinds issued from execs we should be able to drop the TLB invalidation from the ring operations. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit 5669899e9b3c3f38252902141483f5a09c8eedd3 Author: Matthew Brost Date: Fri Jan 27 12:53:14 2023 -0800 drm/xe: Add has_asid to device info Rather than alias supports_usm to ASIS support, add an explicit variable to indicate ASID support. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit 9f9f09d4071685855d43a77c8799578d26ba3f24 Author: Matthew Brost Date: Thu Jan 26 10:05:53 2023 -0800 drm/xe: Signal invalidation fence immediately if CT send fails This means we are in the middle of a GT reset and no need to do TLB invalidation so just signal invalidation fence immediately. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit bae8ddae1881f645d679cd8189de995c26e9d694 Author: Matthew Brost Date: Thu Jan 26 09:54:20 2023 -0800 drm/xe: Propagate VM unbind error to invalidation fence If a VM unbind hits an error, do not issue a TLB invalidation and propagate the error the invalidation fence. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit c3ca5465564e7b6459e868b3433fff4e44a7fd64 Author: Matthew Brost Date: Wed Jan 25 15:27:21 2023 -0800 drm/xe: Lock GGTT on when restoring kernel BOs Make lockdep happy as we required to hold the GGTT when calling xe_ggtt_map_bo. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit da3799c975726572066f1c6bc6a6f65cb1f01c84 Author: Matthew Brost Date: Mon Jan 30 10:55:35 2023 -0800 drm/xe: Use GuC to do GGTT invalidations for the GuC firmware Only the GuC should be issuing TLB invalidations if it is enabled. Part of this patch is sanitize the device on driver unload to ensure we do not send GuC based TLB invalidations during driver unload. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit 74a8b2c6e2d6f17fcd9977de298eff20a46b0af7 Author: Matthew Brost Date: Wed Jan 25 10:36:05 2023 -0800 drm/xe: Propagate error from bind operations to async fence If an bind operation fails we need to report it via the async fence. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit 332dd0116c82a75df175a459fa69dda3f23491a7 Author: Matthew Brost Date: Tue Jan 24 16:21:58 2023 -0800 drm/xe: Add range based TLB invalidations If the platform supports range based TLB invalidations use them. Hide these details in the xe_gt_tlb_invalidation layer. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit 9d25e284ea468930b0310b432784eef45e83e378 Author: Matthew Brost Date: Tue Jan 24 16:33:09 2023 -0800 drm/xe: Add has_range_tlb_invalidation device attribute This will help implementing range based TLB invalidations. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit 0335b53cc48cab91bb089ee5c7558cc84da3958d Author: Matthew Brost Date: Tue Jan 24 16:21:11 2023 -0800 drm/xe: Delete debugfs entry to issue TLB invalidation Not used, let's remove this. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit a12d9216740c23dc7f526db108b4a82f1e0807e2 Author: Matthew Brost Date: Tue Jan 24 16:14:55 2023 -0800 drm/xe: Only set VM->asid for platforms that support a ASID This will help with TLB invalidation as the ASID in TLB invalidate should be zero for platforms that do not support a ASID. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit 38224c00d9c284030d60be83571e5f1bd5fc79c6 Author: Matthew Brost Date: Tue Jan 24 10:35:59 2023 -0800 drm/xe: Add TDR for invalidation fence timeout cleanup Endless fences are not good, add a TDR to cleanup any invalidation fences which have not received an invalidation message within a timeout period. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura commit 24b52db6ae00d8e8c4a7af5622890b70d4de51b9 Author: Matthew Brost Date: Thu Jan 19 19:21:35 2023 -0800 drm/xe: Add TLB invalidation fence ftrace This will help debug issues with TLB invalidation fences. Signed-off-by: Matthew Brost Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit c6b0948ff8d0842b55f05b794590ffc0a44c0656 Author: Matthew Brost Date: Fri Jan 20 09:38:03 2023 -0800 drm/xe: Kernel doc GT TLB invalidations Document all exported functions. Signed-off-by: Matthew Brost Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit f4a8add94f2f28bd215b07b72abcbd2fd17d2012 Author: Matthew Brost Date: Wed Jan 18 14:43:56 2023 -0800 drm/xe: Invalidate TLB after unbind is complete This gets tricky as we can't do the TLB invalidation until the unbind operation is done on the hardware and we can't signal the unbind as complete until the TLB invalidation is done. To work around this we create an unbind fence which does a TLB invalidation after unbind is done on the hardware, signals on TLB invalidation completion, and this fence is installed in the BO dma-resv slot and installed in out-syncs for the unbind operation. Signed-off-by: Matthew Brost Suggested-by: Niranjana Vishwanathapura Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit fc108a8b759f52b879e9a39642ee7988d251e453 Author: Matthew Brost Date: Tue Jan 17 21:11:43 2023 -0800 drm/xe: Add TLB invalidation fence Fence will be signaled when TLB invalidation completion. Signed-off-by: Matthew Brost Suggested-by: Thomas Hellström Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 62ad062150c2ab72b0881c2f24f710e4c0bc4cd7 Author: Matthew Brost Date: Tue Jan 17 20:49:38 2023 -0800 drm/xe: Move TLB invalidation variable to own sub-structure in GT TLB invalidations no longer just restricted to USM, move the variables to own sub-structure. Signed-off-by: Matthew Brost Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit a9351846d94568d96e7400be343392c58e4f82e6 Author: Matthew Brost Date: Tue Jan 17 20:31:24 2023 -0800 drm/xe: Break of TLB invalidation into its own file TLB invalidation is used by more than USM (page faults) so break this code out into its own file. Signed-off-by: Matthew Brost Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit 5b643660875d01c203782a86ac5e3353849bc513 Author: Matthew Brost Date: Fri Jan 20 09:17:50 2023 -0800 drm/xe: Don't process TLB invalidation done in CT fast-path We can't currently do this due to TLB invalidation done handler expecting the seqno being received in-order, with the fast-path a TLB invalidation done could pass one being processed in the slow-path in an extreme corner case. Remove TLB invalidation done from the fast-path for now and in a follow up reenable this once the TLB invalidation done handler can deal with out of order seqno. Signed-off-by: Matthew Brost Reviewed-by: Niranjana Vishwanathapura Signed-off-by: Rodrigo Vivi commit e89b384cde622f6f553a740c73870327ee86fcc5 Author: Matthew Brost Date: Fri Jan 6 11:34:57 2023 -0800 drm/xe/migrate: Update emit_pte to cope with a size level than 4k emit_pte assumes the size argument is 4k aligned, this may not be true for the PTEs emitted for CSS as seen by below call stack: [ 56.734228] xe_migrate_copy:585: size=327680, ccs_start=327680, css_size=1280,4096 [ 56.734250] xe_migrate_copy:643: size=262144 [ 56.734252] emit_pte:404: ptes=64 [ 56.734255] emit_pte:418: chunk=64 [ 56.734257] xe_migrate_copy:650: size=1024 @ CCS emit PTE [ 56.734259] emit_pte:404: ptes=1 [ 56.734261] emit_pte:418: chunk=1 [ 56.734339] xe_migrate_copy:643: size=65536 [ 56.734342] emit_pte:404: ptes=16 [ 56.734344] emit_pte:418: chunk=16 [ 56.734346] xe_migrate_copy:650: size=256 # CCS emit PTE [ 56.734348] emit_pte:404: ptes=1 [ 56.734350] emit_pte:418: chunk=1 [ 56.734352] xe_res_next:174: size=4096, remaining=0 Update emit_pte to handle sizes less than 4k. Signed-off-by: Matthew Brost Reviewed-by: Thomas Hellström Signed-off-by: Rodrigo Vivi commit c5151fa80060a869c0308067e758a271c217ff61 Author: Matthew Auld Date: Mon Jan 16 10:46:21 2023 +0000 drm/xe/ggtt: fix GGTT scratch usage for DG2 Scratch page is in VRAM, and therefore requires 64K GTT layout. In GGTT world this just means having 16 consecutive entries, with 64K GTT alignment for the GTT address of the first entry (also matching physical alignment). However to keep things simple just dump it into system memory, like we already do for ppGTT. While we are here, also give it known default value. Signed-off-by: Matthew Auld Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 5e53d1e806aeb2b05c85d24cd75f848631e8a121 Author: Matthew Auld Date: Thu Jan 26 11:31:34 2023 +0000 drm/xe/ggtt: fix alignment usage for DG2 Spec says we need to use 64K VRAM pages for GGTT on platforms like DG2. In GGTT this just means aligning the GTT address to 64K and ensuring that we have 16 consecutive entries each pointing to the respective 4K entry. We already ensure we have 64K pages underneath, so it's just a case of forcing the GTT alignment. Signed-off-by: Matthew Auld Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit b1e52b65712969a74f0ba9ffbf67dde98ce33c2f Author: Matthew Auld Date: Thu Jan 19 12:16:51 2023 +0000 drm/xe/ppgtt: fix scratch page usage on DG2 On DG2 when running the xe_vm IGT, the kernel generates loads of CAT errors and GT resets (sometimes at least). On small-bar systems seems to trigger a lot more easily (maybe due to difference in allocation strategy). Appears to be related to scratch, since we seem to use the 64K TLB hint on scratch entries, even though the scratch page is a 4K vram page. Bumping the scratch page size and physical alignment seems to fix it. Or at least we no longer hit: [ 148.872683] xe 0000:03:00.0: [drm] Engine memory cat error: guc_id=0 [ 148.872701] xe 0000:03:00.0: [drm] Engine memory cat error: guc_id=0 [ 148.875108] WARNING: CPU: 0 PID: 953 at drivers/gpu/drm/xe/xe_guc_submit.c:797 However to keep things simple, so we don't have to deal with 64K TLB hints, just move the scratch page into system memory on platforms that require 64K VRAM pages. Signed-off-by: Matthew Auld Reviewed-by: Matthew Brost Cc: Thomas Hellström Signed-off-by: Rodrigo Vivi commit e63f81adcc4283aed7d4fe5da1219881cc6f67d4 Author: Matthew Auld Date: Thu Dec 22 14:09:02 2022 +0000 drm/xe/ppgtt: clear the scratch page We need to ensure we don't leak the contents to userspace. Signed-off-by: Matthew Auld Reviewed-by: Matthew Brost Cc: Thomas Hellström Signed-off-by: Rodrigo Vivi commit f3edf6917ca8e4e11a6af39e926558d4609dd9ea Author: Matthew Auld Date: Fri Jan 20 11:48:53 2023 +0000 drm/xe/bo: reduce xe_bo_create_pin_map() restrictions On DGFX this blows up if can call this with a system memory object: XE_BUG_ON(!mem_type_is_vram(place->mem_type) && place->mem_type != XE_PL_STOLEN); If we consider dpt it looks like we can already in theory hit this, if we run out of vram and stolen vram. It at least seems reasonable to allow calling this on any object which supports CPU access. Note this also changes the behaviour with stolen VRAM and suspend, such that we no longer attempt to migrate stolen objects into system memory. However nothing in stolen should ever need to be restored (same on integrated), so should be fine. Also on small-bar systems the stolen portion is pretty much always non-CPU accessible, and currently pinned objects use plain memcpy when being moved, which doesn't play nicely. Signed-off-by: Matthew Auld Reviewed-by: Matthew Brost Cc: Thomas Hellström Signed-off-by: Rodrigo Vivi commit 9b6483af3709386fe0e544bfa8cc01f8a92e0d57 Author: Maarten Lankhorst Date: Tue Jan 24 18:28:03 2023 +0100 drm/xe: Map initial FB at the same place in GGTT too I saw a flicker when booting xe, and it's very likely that the original FB was not mapped at the same place when inheriting, fix it. Signed-off-by: Maarten Lankhorst Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 09a68b4a76e3d870d2fad34099d27cc7e2c9939b Author: Maarten Lankhorst Date: Mon Jan 23 15:41:58 2023 +0100 drm/xe: Convert memory device refcount to s32 The comparison with < 0 suggests that the memory device access should be signed to handle underflow. This makes it work more reliably. As a result, the max refcount is now S32_MAX instead. Signed-off-by: Maarten Lankhorst Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 19431b029b8b5d095e77767f269cb142c687084e Author: José Roberto de Souza Date: Mon Jan 23 09:11:32 2023 -0800 drm/xe/uapi: Add XE_ENGINE_GET_PROPERTY uAPI This is intended to get some properties that are of interest of UMDs like the ban state. Cc: Matthew Brost Cc: Maarten Lankhorst Signed-off-by: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 3949d57f1ef62ea00344617fd638ed6c778db8d8 Author: José Roberto de Souza Date: Mon Jan 23 08:43:10 2023 -0800 drm/xe/uapi: Rename XE_ENGINE_PROPERTY_X to XE_ENGINE_SET_PROPERTY_X Engine property get uAPI will be added, so to avoid ambiguity here renaming XE_ENGINE_PROPERTY_X to XE_ENGINE_SET_PROPERTY_X. No changes in behavior. Cc: Matthew Brost Cc: Maarten Lankhorst Signed-off-by: José Roberto de Souza Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 8375e58c3ac96a43603530a6f02fc81a455982e7 Author: Francois Dugast Date: Mon Jan 23 18:17:56 2023 +0100 drm/xe: Use global macros to set PM functions This aligns with other drivers and fixes build failure when CONFIG_PM_SLEEP is not set, such as on RISC-V. Signed-off-by: Francois Dugast Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit a93bcc3acf1fdf55b1906e37744ebab9be884a5d Author: Mauro Carvalho Chehab Date: Fri Jan 20 15:43:58 2023 +0100 drm/xe: skip Kunit tests requiring real hardware when running on UML Some tests are meant to run only on real hardware. Skip those, if no device was found. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi commit b3ab1b918e59c84ddaf190f75ba93be6cdea1fcb Author: Rodrigo Vivi Date: Thu Jan 19 12:41:17 2023 -0500 drm/xe/guc_pc: Fix Meteor Lake registers. When adding the frequency management, Meteor Lake platform was left behind. Handling it properly now. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost Cc: Francois Dugast Signed-off-by: Rodrigo Vivi commit 6c8c1e74faecb6ca3057f154e911a52cf6a53d32 Author: Philippe Lecluse Date: Fri Jan 20 16:30:25 2023 +0100 drm/xe: Fix Meteor Lake rsa issue on guc loading [ 117.901473] xe 0000:00:02.0: [drm] GuC load failed: status = 0x400000A0 [ 117.901506] xe 0000:00:02.0: [drm] GuC load failed: status: Reset = 0, BootROM = 0x50, UKernel = 0x00, MIA = 0x00, Auth = 0x01 Signed-off-by: Philippe Lecluse Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 9484c7dce4e99a38970baebe9ffdd5d76d757f2c Author: Balasubramani Vivekanandan Date: Fri Jan 20 16:43:27 2023 +0530 drm/xe/gt: Enable interrupt while initializing root gt At present the interrupts are enabled while initializing the last GT. But this is incorrect for a Multi-GT platform, as root GT initialization will fail with interrupt disabled. Interrupts are required for the GuC submission triggered during initialization. Enable the interrupt during the root GT initialization. Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit a4c75c0fd613a1cfb7f5ba6b494b80b40adbc78f Author: Mauro Carvalho Chehab Date: Thu Jan 19 21:26:49 2023 +0100 drm/xe: KUnit tests depend on CONFIG_DRM_FBDEV_EMULATION ERROR:root:../drivers/gpu/drm/xe/display/intel_fbdev.c:585:5: error: redefinition of ‘intel_fbdev_init’ 585 | int intel_fbdev_init(struct drm_device *dev) | ^~~~~~~~~~~~~~~~ In file included from ../drivers/gpu/drm/xe/display/intel_fbdev.c:55: ../drivers/gpu/drm/xe/display/intel_fbdev.h:26:19: note: previous definition of ‘intel_fbdev_init’ with type ‘int(struct drm_device *)’ 26 | static inline int intel_fbdev_init(struct drm_device *dev) | ^~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.c:626:6: error: redefinition of ‘intel_fbdev_initial_config_async’ 626 | void intel_fbdev_initial_config_async(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.h:31:20: note: previous definition of ‘intel_fbdev_initial_config_async’ with type ‘void(struct drm_device *)’ 31 | static inline void intel_fbdev_initial_config_async(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.c:646:6: error: redefinition of ‘intel_fbdev_unregister’ 646 | void intel_fbdev_unregister(struct drm_i915_private *dev_priv) | ^~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.h:35:20: note: previous definition of ‘intel_fbdev_unregister’ with type ‘void(struct xe_device *)’ 35 | static inline void intel_fbdev_unregister(struct drm_i915_private *dev_priv) | ^~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.c:661:6: error: redefinition of ‘intel_fbdev_fini’ 661 | void intel_fbdev_fini(struct drm_i915_private *dev_priv) | ^~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.h:39:20: note: previous definition of ‘intel_fbdev_fini’ with type ‘void(struct xe_device *)’ 39 | static inline void intel_fbdev_fini(struct drm_i915_private *dev_priv) | ^~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.c:692:6: error: redefinition of ‘intel_fbdev_set_suspend’ 692 | void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous) | ^~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.h:43:20: note: previous definition of ‘intel_fbdev_set_suspend’ with type ‘void(struct drm_device *, int, bool)’ {aka ‘void(struct drm_device *, int, _Bool)’} 43 | static inline void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous) | ^~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.c:751:6: error: redefinition of ‘intel_fbdev_output_poll_changed’ 751 | void intel_fbdev_output_poll_changed(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.h:47:20: note: previous definition of ‘intel_fbdev_output_poll_changed’ with type ‘void(struct drm_device *)’ 47 | static inline void intel_fbdev_output_poll_changed(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.c:770:6: error: redefinition of ‘intel_fbdev_restore_mode’ 770 | void intel_fbdev_restore_mode(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.h:51:20: note: previous definition of ‘intel_fbdev_restore_mode’ with type ‘void(struct drm_device *)’ 51 | static inline void intel_fbdev_restore_mode(struct drm_device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.c:785:27: error: redefinition of ‘intel_fbdev_framebuffer’ 785 | struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev) | ^~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_fbdev.h:54:41: note: previous definition of ‘intel_fbdev_framebuffer’ with type ‘struct intel_framebuffer *(struct intel_fbdev *)’ 54 | static inline struct intel_framebuffer *intel_fbdev_framebuffer(struct intel_fbdev *fbdev) | ^~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab Cc: Thomas Hellström Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 1598955dfce242113c4ba2cbdb5d4c7c28695a70 Author: Mauro Carvalho Chehab Date: Thu Jan 19 21:18:44 2023 +0100 drm/xe/Kconfig.debug: select DEBUG_FS for KUnit runs KUnit reuquires debugfs, as otherwise, it won't build: $ make ARCH=x86_64 O=.kunit --jobs=8 ERROR:root:../drivers/gpu/drm/xe/display/intel_display_debugfs.c:1612:6: error: redefinition of ‘intel_display_debugfs_register’ 1612 | void intel_display_debugfs_register(struct drm_i915_private *i915) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../drivers/gpu/drm/xe/display/intel_display_debugfs.c:18: ../drivers/gpu/drm/xe/display/intel_display_debugfs.h:18:20: note: previous definition of ‘intel_display_debugfs_register’ with type ‘void(struct xe_device *)’ 18 | static inline void intel_display_debugfs_register(struct drm_i915_private *i915) {} | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_display_debugfs.c:1935:6: error: redefinition of ‘intel_connector_debugfs_add’ 1935 | void intel_connector_debugfs_add(struct intel_connector *intel_connector) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_display_debugfs.h:19:20: note: previous definition of ‘intel_connector_debugfs_add’ with type ‘void(struct intel_connector *)’ 19 | static inline void intel_connector_debugfs_add(struct intel_connector *connector) {} | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_display_debugfs.c:1993:6: error: redefinition of ‘intel_crtc_debugfs_add’ 1993 | void intel_crtc_debugfs_add(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/xe/display/intel_display_debugfs.h:20:20: note: previous definition of ‘intel_crtc_debugfs_add’ with type ‘void(struct drm_crtc *)’ 20 | static inline void intel_crtc_debugfs_add(struct drm_crtc *crtc) {} | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab Cc: Thomas Hellström Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit a02a0c6d53099579e3b7aa811e1e254a11681c8a Author: Lucas De Marchi Date: Mon Dec 5 21:07:56 2022 -0800 drm/xe: Add min config for kunit integration ARCH=um Some of the tests may benefit from running with ARCH=um, forgoing any additional setup on the CI build side. Add min config for that. Tested with: ./tools/testing/kunit/kunit.py build \ --kunitconfig drivers/gpu/drm/xe/.kunitconfig \ --jobs $(nproc) \ --build_dir build_kunit Signed-off-by: Lucas De Marchi Cc: Mauro Carvalho Chehab Signed-off-by: Rodrigo Vivi Reviewed-by: Mauro Carvalho Chehab commit 1ef151d7aa0a36050fab8063ec35b2c7c0f9870c Author: Lucas De Marchi Date: Fri Jan 13 15:09:07 2023 -0800 drm/xe: Add documentation for mem_type mem_type field was added in commit d8b52a02cb40 ("drm/xe: Implement stolen memory.") to designate the TTM memory type for that mgr. Add kernel-doc with its description. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit ee0cf5e07f44a10fce8f1bfa9db226c0b5ecf880 Author: Théo Lebrun Date: Mon Dec 18 18:14:16 2023 +0100 clk: fixed-rate: fix clk_hw_register_fixed_rate_with_accuracy_parent_hw Add missing comma and remove extraneous NULL argument. The macro is currently used by no one which explains why the typo slipped by. Fixes: 2d34f09e79c9 ("clk: fixed-rate: Add support for specifying parents via DT/pointers") Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231218-mbly-clk-v1-1-44ce54108f06@bootlin.com Signed-off-by: Stephen Boyd commit b0fb904d074e810c22c26883b8ed4489c17d1292 Author: Jason Gerecke Date: Tue Dec 19 13:33:44 2023 -0800 HID: wacom: Add additional tests of confidence behavior Test for proper driver behavior when the touch confidence bit is set or cleared. Test the three flavors of touch confidence loss (tipswitch cleared before confidence, tipswitch and confidence cleared at the same time, and tipswitch only cleared when touch is actually removed). Also test two flavors of touch confidence gain (confidence added to a touch that was "never" confident, and confidence added to a touch that was previously confident). Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina commit 502296030ec6b0329e00f9fb15018e170cc63037 Author: Jason Gerecke Date: Tue Dec 19 13:33:43 2023 -0800 HID: wacom: Correct behavior when processing some confidence == false touches There appear to be a few different ways that Wacom devices can deal with confidence: 1. If the device looses confidence in a touch, it will first clear the tipswitch flag in one report, and then clear the confidence flag in a second report. This behavior is used by e.g. DTH-2452. 2. If the device looses confidence in a touch, it will clear both the tipswitch and confidence flags within the same report. This behavior is used by some AES devices. 3. If the device looses confidence in a touch, it will clear *only* the confidence bit. The tipswitch bit will remain set so long as the touch is tracked. This behavior may be used in future devices. The driver does not currently handle situation 3 properly. Touches that loose confidence will remain "in prox" and essentially frozen in place until the tipswitch bit is finally cleared. Not only does this result in userspace seeing a stuck touch, but it also prevents pen arbitration from working properly (the pen won't send events until all touches are up, but we don't currently process events from non-confident touches). This commit centralizes the checking of the confidence bit in the wacom_wac_finger_slot() function and has 'prox' depend on it. In the case where situation 3 is encountered, the treat the touch as though it was removed, allowing both userspace and the pen arbitration to act normally. Signed-off-by: Tatsunosuke Tobita Signed-off-by: Ping Cheng Signed-off-by: Jason Gerecke Fixes: 7fb0413baa7f ("HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts") Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina commit 0bd7c5d802586e9d86c09f79cbf5ca8fdbec57ec Merge: 4c434392c4777 415c7451872b0 Author: Jens Axboe Date: Tue Dec 19 15:49:23 2023 -0700 Merge tag 'md-next-20231219' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.8/block Pull MD updates from Song: "1. Remove deprecated flavors, by Song Liu; 2. raid1 read error check support, by Li Nan; 3. Better handle events off-by-1 case, by Alex Lyakas." * tag 'md-next-20231219' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: Remove deprecated CONFIG_MD_FAULTY md: Remove deprecated CONFIG_MD_MULTIPATH md: Remove deprecated CONFIG_MD_LINEAR md/raid1: support read error check md: factor out a helper exceed_read_errors() to check read_errors md: Whenassemble the array, consult the superblock of the freshest device md/raid1: remove unnecessary null checking commit 6aaff21547a08e5a151fbf7a3f7be5a68877d9e3 Merge: 4f88cfd4a666c 716c3cf217844 Author: Dave Airlie Date: Wed Dec 20 08:32:48 2023 +1000 Merge tag 'drm-intel-next-2023-12-18' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Drop pointless null checks and fix a scaler bug (Ville) - Meteor Lake display fixes and clean-ups (RK, Jani, Andrzej, Mika, Imre) - Clean-up around flip done IRQ (Ville) - Fix eDP Meteor Lake bug (Jani) - Bigjoiner fixes (Ankit, Ville) - Cdclk/voltage_level cleanups and fixes (Ville) - DMC event stuff (Ville) - Remove dead code around intel_atomic_helper->free_list (Jouni) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZYB5XBRdWWgWoMKc@intel.com commit 4f88cfd4a666c354e4cf5b4e82c9c11820c39835 Merge: 22a2decedfbeb c8048dd0b07df Author: Dave Airlie Date: Wed Dec 20 08:18:34 2023 +1000 Merge tag 'mediatek-drm-next-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 6.8 1. Use devm_platform_ioremap_resource() 2. Stop using iommu_present() 3. Add display driver for MT8188 VDOSYS1 4. Add phy_mtk_dp module as pre-dependency Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20231218145826.5643-1-chunkuang.hu@kernel.org commit 22a2decedfbeb981df04dca880412b9520b2f8a1 Merge: d2be61f8438fe d4ca26ac4be0d Author: Dave Airlie Date: Wed Dec 20 07:43:25 2023 +1000 Merge tag 'drm-msm-next-2023-12-15' of https://gitlab.freedesktop.org/drm/msm into drm-next Updates for v6.8: Core: - Add support for SDM670, SM8650 - Handle the CFG interconnect to fix the obscure hangs / timeouts on register write - Kconfig fix for QMP dependency - DT schema fixes DPU: - Add support for SDM670, SM8650 - Enable SmartDMA on SM8350 and SM8450 - Correct UBWC settings for SC8280XP - Fix catalog settings for SC8180X - Actually make use of the version to switch between QSEED3/3LITE/4 scalers - Use devres-managed and drm-managed allocations where appropriate - misc other fixes - Enabled YUV writeback on SC7280, SM8250 - Enabled writeback on SM8350, SM8450 - CRC fix when encoder is selected as the input source - other misc fixes MDP4: - Use devres-managed and drm-managed allocations where appropriate - flush vblank event on CRTC disable MDP5: - Use devres-managed and drm-managed allocations where appropriate DP: - Add support for SM8650 - Enable PM runtime support - Merge msm-specific debugfs dir with the generic one - Described DisplayPort on SM8150 in DeviceTree bindings - Moved dp_display_get_next_bridge() to probe() DSI: - Add support for SM8650 - Enable PM runtime support GPU/GEM: - demote userspace triggerable warnings to debug - add GEM object metadata UAPI - move GPU devcoredumps to GPU device - fix hangcheck to skip retired submits - expose UBWC config to userspace - fix a680 chip-id - drm_exec conversion - drm/ci: remove rebase-merge directory (to unblock CI) [airlied: fix drm_exec/amd interaction] Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGs9auYqmo-7NSd9FsbNBCDf7aBevd=4xkcF3A5G_OGvMQ@mail.gmail.com commit 7418ec5b151f5591f750d57705cbb633c084a434 Author: Vegard Nossum Date: Fri Dec 15 13:37:01 2023 +0100 docs: translations: add translations links when they exist Add a new Sphinx extension that knows about the translations of kernel documentation and can insert links to the translations at the top of the document. It basically works like this: 1. Register a new node type, LanguagesNode. 2. Register a new transform, TranslationsTransform, that inserts a new LanguageNode at the top of every document. The LanguageNode contains "pending references" to translations of the document. The key here is that these are pending (i.e. unresolved) references that may or may not actually exist. 3. Register a 'doctree-resolved' event that iterates over all the LanguageNode nodes. Any unresolved references are filtered out; the list of resolved references is passed to the 'translations.html' template and rendered as an HTML node (if HTML output is selected). Testing: make htmldocs, make latexdocs with Sphinx v4.3.2 and Firefox. v2: - changed bar into a drop-down menu - fixed language labels - fixed hysteresis reported by Akira Yokosawa Cc: Federico Vaga Cc: Jani Nikula Cc: Akira Yokosawa Cc: Yanteng Si Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231215123701.2712807-1-vegard.nossum@oracle.com commit f17f2c13d613cbeef529b03ca17ae2581b2e6cb8 Author: Kevin Hao Date: Fri Dec 8 16:29:34 2023 +0800 module: Remove redundant TASK_UNINTERRUPTIBLE TASK_KILLABLE already includes TASK_UNINTERRUPTIBLE, so there is no need to add a separate TASK_UNINTERRUPTIBLE. Signed-off-by: Kevin Hao Signed-off-by: Luis Chamberlain commit dcd39fa2be95efd5cbce74661151f68510cb67fe Author: Andy Shevchenko Date: Fri Dec 15 17:03:41 2023 +0200 kernel-doc: Align quick help and the code The update to the quick help mentions -Wshort-description, but code never supported for that. Align that with the code by allowing both: -Wshort-description and -Wshort-desc. Fixes: 56b0f453db74 ("kernel-doc: don't let V=1 change outcome") Signed-off-by: Andy Shevchenko Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231215150341.1996720-1-andriy.shevchenko@linux.intel.com commit cfecf5d7ffbad4f053b79d78091bd2af78c1ea79 Author: Carlos Bilbao Date: Mon Dec 18 09:43:08 2023 -0600 MAINTAINERS: add reviewer for Spanish translations Add Avadhut Naik as reviewer of the Spanish translations of the documentation. Signed-off-by: Carlos Bilbao Acked-by: Avadhut Naik Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231218154308.3314929-1-carlos.bilbao@amd.com commit e95013156ad88e6a1e1db6545881f49183e2ee0a Author: Zhenguo Yao Date: Wed Dec 13 18:28:08 2023 +0800 cpufreq: intel_pstate: Add Emerald Rapids support in no-HWP mode Users may disable HWP in firmware, in which case intel_pstate will give up unless the CPU model is explicitly supported. See also the following past commits: - commit df51f287b5de ("cpufreq: intel_pstate: Add Sapphire Rapids support in no-HWP mode") - commit d8de7a44e11f ("cpufreq: intel_pstate: Add Skylake servers support") - commit 706c5328851d ("cpufreq: intel_pstate: Add Cometlake support in no-HWP mode") - commit fbdc21e9b038 ("cpufreq: intel_pstate: Add Icelake servers support in no-HWP mode") - commit 71bb5c82aaae ("cpufreq: intel_pstate: Add Tigerlake support in no-HWP mode") Signed-off-by: Zhenguo Yao Acked-by: Srinivas Pandruvada [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 4bbf0b6a64455c95586caf130e374586caef9986 Author: Kevin Hao Date: Tue Dec 12 22:00:43 2023 +0800 Documentation: PM: Adjust freezing-of-tasks.rst to the freezer changes The core freezer logic has been modified by commit f5d39b020809 ("freezer,sched: Rewrite core freezer logic"), so adjust the documentation to reflect the new code. The main changes include: - Drop references to PF_FROZEN and PF_FREEZER_SKIP - Describe TASK_FROZEN, TASK_FREEZABLE and __TASK_FREEZABLE_UNSAFE - Replace system_freezing_cnt with freezer_active - Use a different example for the loop of a freezable kernel thread, since the old code is gone gone Signed-off-by: Kevin Hao [ rjw: Subject and changelog edits, doc text adjustments ] Signed-off-by: Rafael J. Wysocki commit 757d1ca14f94e4e00777491dcab0b4abee18f9bf Author: Konrad Dybcio Date: Tue Dec 19 19:55:33 2023 +0100 clk: qcom: dispcc-sm8650: Add test_ctl parameters to PLL config These values were missing. Add them. Fixes: 9e939f008338 ("clk: qcom: add the SM8650 Display Clock Controller driver") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231219-topic-8650_clks-v1-2-5672bfa0eb05@linaro.org Signed-off-by: Bjorn Andersson commit 3f8d7f490a33625786b427ec925215c4c1f191d1 Author: Konrad Dybcio Date: Tue Dec 19 19:55:32 2023 +0100 clk: qcom: gpucc-sm8650: Add test_ctl parameters to PLL config These values were missing. Add them. Fixes: 8676fd4f3874 ("clk: qcom: add the SM8650 GPU Clock Controller driver") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231219-topic-8650_clks-v1-1-5672bfa0eb05@linaro.org Signed-off-by: Bjorn Andersson commit d2be61f8438feb2e356187acdfeef26fd777602a Merge: 48b272853e5ca 669080888691c Author: Dave Airlie Date: Wed Dec 20 05:59:40 2023 +1000 Merge tag 'amd-drm-next-6.8-2023-12-15' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.8-2023-12-15: amdgpu: - Suspend fixes - Misc code cleanups - JPEG fix - Add AMD specific color management (protected by AMD_PRIVATE_COLOR) - UHBR13.5 cable fixes - Misc display fixes - Display WB fixes - PSR fixes - XGMI fix - ACPI WBRF support for handling potential RF interference from GPU clocks - Enable tunneling on high priority compute queues - drm_edid.h include cleanup - VPE DPM support - SMU 13 fixes - Fix possible double frees in error paths - Misc fixes amdkfd: - Support import and export of dma-bufs using GEM handles - MES shader debugger fixes - SVM fixes radeon: - drm_edid.h include cleanup - Misc code cleanups - Fix possible memory leak in error path drm: - Increase max objects to accomodate new color props - Make replace_property_blob_from_id a DRM helper - Track color management changes per plane platform-x86: - Merge immutable branch from Hans for platform dependencies for WBRF to coordinate merge of WBRF feature across wifi, platform, and GPU Signed-off-by: Dave Airlie # -----BEGIN PGP SIGNATURE----- # # iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCZXygTgAKCRC93/aFa7yZ # 2EW1AQCILfGTtDWXzgLSpUBtt9jOooHqaSrah19Cfw0HlA3QIQD+OCohXH1LLZo1 # tYHyfsLv0LsNawI198qABzB1PwptSAI= # =M1AO # -----END PGP SIGNATURE----- # gpg: Signature made Sat 16 Dec 2023 04:51:58 AEST # gpg: using EDDSA key 203B921D836B5735349902BDBDDFF6856BBC99D8 # gpg: Can't check signature: No public key From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231215193519.5040-1-alexander.deucher@amd.com commit 87825c860eb8e4b80391c51ea1bb99e5cbac0025 Author: ZhenGuo Yin Date: Tue Dec 19 14:39:42 2023 +0800 drm/amdgpu: re-create idle bo's PTE during VM state machine reset Idle bo's PTE needs to be re-created when resetting VM state machine. Set idle bo's vm_bo as moved to mark it as invalid. Fixes: 55bf196f60df ("drm/amdgpu: reset VM when an error is detected") Signed-off-by: ZhenGuo Yin Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 99cab331a4ee621e3604542ca88f9d76f2865aef Author: YiPeng Chai Date: Tue Dec 12 17:23:23 2023 +0800 drm/amdgpu: Add umc page retirement for umc v12_0 Add umc page retirement for umc v12_0. V2: 1. Changed umc page retirement check condition to call umc_v12_0_is_uncorrectable_error. 2. Use memset to clear the contents of the umc error address structure. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6fe08f56db798659beca41ab5b1727a31518f794 Author: YiPeng Chai Date: Wed Dec 13 16:15:30 2023 +0800 drm/amd/pm: smu v13_0_6 supports ecc info by default smu v13_0_6 supports ecc info by default. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a8c77a121ce12d5ce5500f5777e00e5a841ad51a Author: YiPeng Chai Date: Wed Dec 13 16:14:40 2023 +0800 drm/amdgpu: Add poison mode check error condition for umc v12_0 Add poison mode check error condition for umc v12_0. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9f91e983ee82d3b6f6d713e1c84ebb8d53180b3d Author: YiPeng Chai Date: Tue Dec 12 17:26:58 2023 +0800 drm/amdgpu: MCA supports recording umc address information MCA supports recording umc address information. V2: Move err_addr variable from struct ras_err_node to struct ras_err_info. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 731b2f6e6be4a4946724e47c15cba1e40568ad13 Author: Aric Cyr Date: Sun Dec 10 21:20:56 2023 -0500 drm/amd/display: 3.2.265 This DC patchset brings improvements in multiple areas. In summary, we highlight: - change static screen wait frame_count for ips - Fix hang/underflow when transitioning to ODM4:1 - Only clear symclk otg flag for HDMI - Fix lightup regression with DP2 single display configs - Refactor phantom resource allocation - Refactor dc_state interface - Wake DMCUB before executing GPINT commands - Wake DMCUB before sending a command - Refactor DMCUB enter/exit idle interface - enable dcn35 idle power optimization - fix usb-c connector_type - add debug option for ExtendedVBlank DLG adjust - Set test_pattern_changed update flag on pipe enable - dereference variable before checking for zero - get dprefclk ss info from integration info table - skip error logging when DMUB is inactive from S3 - make flip_timestamp_in_us a 64-bit variable - Add case for dcn35 to support usb4 dmub hpd event - Add function for dumping clk registers - Unify optimize_required flags and VRR adjustments - Revert using channel_width as 2 for vram table 3.0 - remove HPO PG in driver side - do not send commands to DMUB if DMUB is inactive from S3 Acked-by: Wayne Lin Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0061080e5d1982e4dd424c4ba1d6ae20f11eb03d Author: Anthony Koo Date: Sat Dec 9 12:35:25 2023 -0500 drm/amd/display: [FW Promotion] Release 0.0.197.0 - Remove unused dmub_fw_boot_options flag Acked-by: Wayne Lin Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 85fce153995e177ca307786b4ecf190b4daa540c Author: Allen Pan Date: Fri Dec 8 18:49:19 2023 -0500 drm/amd/display: change static screen wait frame_count for ips [Why] the original wait for 2 static frames before enter static screen was not good enough for IPS-enabled case since enter/exit takes more time. [How] Changed logic for hardcoded wait frame values. Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: Allen Pan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e7b2b108cdeab76a7e7324459e50b0c1214c0386 Author: Ilya Bakoulin Date: Fri Dec 8 12:19:33 2023 -0500 drm/amd/display: Fix hang/underflow when transitioning to ODM4:1 [Why] Under some circumstances, disabling an OPTC and attempting to reclaim its OPP(s) for a different OPTC could cause a hang/underflow due to OPPs not being properly disconnected from the disabled OPTC. [How] Ensure that all OPPs are unassigned from an OPTC when it gets disabled. Reviewed-by: Alvin Lee Acked-by: Wayne Lin Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dff45f03f508c92cd8eb2050e27b726726b8ae0b Author: Alvin Lee Date: Fri Dec 8 11:56:56 2023 -0500 drm/amd/display: Only clear symclk otg flag for HDMI [Description] There is a corner case where the symclk otg flag is cleared when disabling the phantom pipe for subvp (because the phantom and main pipe share the same link). This is undesired because we need the maintain the correct symclk otg flag state for the main pipe. For now only clear the flag only for HDMI signal type, since it's only set for HDMI signal type (phantom is virtual). The ideal solution is to not clear it if the stream is phantom but currently there's a bug that doesn't allow us to do this. Once this issue is fixed the proper fix can be implemented. Reviewed-by: Samson Tam Acked-by: Wayne Lin Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5a82b8d6c05f9b30828ede1b103b9ee5cb5c912e Author: Michael Strauss Date: Thu Nov 30 10:44:36 2023 -0500 drm/amd/display: Fix lightup regression with DP2 single display configs [WHY] Previous fix for multiple displays downstream of DP2 MST hub caused regression [HOW] Match sink IDs instead of sink struct addresses Reviewed-by: Nicholas Kazlauskas Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 08daec77fddf23cd246a0662c6dc0d60229caaee Author: Dillon Varone Date: Wed Dec 13 16:39:22 2023 -0500 drm/amd/display: Deep copy dml2_context when copying dc_state [WHY&HOW] dml2_context should be deep copied from src to dst dc_state. Reviewed-by: George Shen Acked-by: Wayne Lin Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 760ed918fb1f857490868e4bc91265a4d5d37f37 Author: Dillon Varone Date: Wed Dec 13 15:04:42 2023 -0500 drm/amd/display: Create dc_state after resource initialization [WHY&HOW] After refactoring dc_state, it is always constructed at the time of its creation. Construction can only happen after dc resources are initialized, so move creation to be after this. Reviewed-by: George Shen Acked-by: Wayne Lin Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b03281e925f996ffc850ad25de10f4586a8c7435 Author: Dillon Varone Date: Mon Dec 11 16:49:20 2023 -0500 drm/amd/display: Fix null reference to state when getting subvp type [WHY&HOW] Need to provide valid pointer to dc_state when getting subvp pipe type. Reviewed-by: Alvin Lee Acked-by: Wayne Lin Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 012a04b1d6af629077bf98e172d946bf893a4726 Author: Dillon Varone Date: Tue Nov 21 15:07:01 2023 -0500 drm/amd/display: Refactor phantom resource allocation [WHY?] Phantom streams and planes were previously not referenced explcitly on creation. [HOW?] To reduce memory management complexity, add an additional phantom streams and planes reference into dc_state, and move mall_stream_config to stream_status inside the state to make it safe to modify in shallow copies. Also consildates any logic that is affected by this change to dc_state. Reviewed-by: Nicholas Kazlauskas Reviewed-by: Jun Lei Acked-by: Wayne Lin Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 09a4ec5da92c84952db117f0d576fdd8368c873a Author: Dillon Varone Date: Fri Nov 17 16:37:50 2023 -0500 drm/amd/display: Refactor dc_state interface [WHY?] Part of the dc_state interface that deals with adding streams and planes should remain public, while others that deal with internal status' and subvp should be private to DC. [HOW?] Move and rename the public functions to dc_state.h and private functions to dc_state_priv.h. Also add some additional functions for extracting subvp meta data from the state. Reviewed-by: Nicholas Kazlauskas Reviewed-by: Jun Lei Acked-by: Wayne Lin Signed-off-by: Dillon Varone Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e5ffd1263dd5b44929c676171802e7b6af483f21 Author: Nicholas Kazlauskas Date: Tue Dec 5 11:22:56 2023 -0500 drm/amd/display: Wake DMCUB before executing GPINT commands [Why] DMCUB can be in idle when we attempt to interface with the HW through the GPINT mailbox resulting in a system hang. [How] Add dc_wake_and_execute_gpint() to wrap the wake, execute, sleep sequence. If the GPINT executes successfully then DMCUB will be put back into sleep after the optional response is returned. It functions similar to the inbox command interface. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Hansen Dsouza Acked-by: Wayne Lin Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8892780834ae294bc3697c7d0e056d7743900b39 Author: Nicholas Kazlauskas Date: Mon Dec 4 16:35:04 2023 -0500 drm/amd/display: Wake DMCUB before sending a command [Why] We can hang in place trying to send commands when the DMCUB isn't powered on. [How] For functions that execute within a DC context or DC lock we can wrap the direct calls to dm_execute_dmub_cmd/list with code that exits idle power optimizations and reallows once we're done with the command submission on success. For DM direct submissions the DM will need to manage the enter/exit sequencing manually. We cannot invoke a DMCUB command directly within the DM execution helper or we can deadlock. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Hansen Dsouza Acked-by: Wayne Lin Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8e57c06bf4b0f51a4d6958e15e1a99c9520d00fa Author: Nicholas Kazlauskas Date: Mon Dec 4 14:10:05 2023 -0500 drm/amd/display: Refactor DMCUB enter/exit idle interface [Why] We can hang in place trying to send commands when the DMCUB isn't powered on. [How] We need to exit out of the idle state prior to sending a command, but the process that performs the exit also invokes a command itself. Fixing this issue involves the following: 1. Using a software state to track whether or not we need to start the process to exit idle or notify idle. It's possible for the hardware to have exited an idle state without driver knowledge, but entering one is always restricted to a driver allow - which makes the SW state vs HW state mismatch issue purely one of optimization, which should seldomly be hit, if at all. 2. Refactor any instances of exit/notify idle to use a single wrapper that maintains this SW state. This works simialr to dc_allow_idle_optimizations, but works at the DMCUB level and makes sure the state is marked prior to any notify/exit idle so we don't enter an infinite loop. 3. Make sure we exit out of idle prior to sending any commands or waiting for DMCUB idle. This patch takes care of 1/2. A future patch will take care of wrapping DMCUB command submission with calls to this new interface. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Hansen Dsouza Acked-by: Wayne Lin Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0d26644bc57d8737c8e2fb3145366f7d0b941935 Author: Allen Pan Date: Thu Dec 7 17:26:10 2023 -0500 drm/amd/display: fix usb-c connector_type [why] BIOS switches to use USB-C connector type 0x18, but VBIOS's objectInfo table not supported yet. driver needs to patch it based on enc_cap from system integration info table. Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: Allen Pan Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ec39a6d00382dfd23bf74ec28c7cf4b87884ae1b Author: Muhammad Ahmed Date: Wed Dec 6 18:07:57 2023 -0500 drm/amd/display: add debug option for ExtendedVBlank DLG adjust [why & how] Add new option for debug usage Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: Muhammad Ahmed Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b5882675074086245589daa21c9d2b205810b83f Author: George Shen Date: Tue Dec 5 18:34:47 2023 -0500 drm/amd/display: Set test_pattern_changed update flag on pipe enable [Why] In certain cases, ODM pipe split can occur while stream already has test pattern enabled. The new pipe used in the ODM combine config must be configured to output the test pattern in this case. [How] If the stream is configured to output test pattern, then set the test_pattern_changed update flag for the new pipe when it gets enabled. Reviewed-by: Alvin Lee Acked-by: Wayne Lin Signed-off-by: George Shen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3582e0ba8a675d72c3cc6dd1b847e6aa757845da Author: Josip Pavic Date: Tue Dec 5 16:57:27 2023 -0500 drm/amd/display: dereference variable before checking for zero [Why] Driver incorrectly checks if pointer variable OutBpp is null instead of if the value being pointed to is zero. [How] Dereference OutBpp before checking for a value of zero. Reviewed-by: Chaitanya Dhere Acked-by: Wayne Lin Signed-off-by: Josip Pavic Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 72eaa723187b87f1793529eaadbcfaa836c17812 Author: Charlene Liu Date: Wed Dec 6 17:14:48 2023 -0500 drm/amd/display: get dprefclk ss info from integration info table [why & how] we have two SSC_En: we get ssc_info from dce_info for MPLL_SSC_EN. we used to call VBIOS cmdtbl's smu_info's SS persentage for DPRECLK SS info, is used for DP AUDIO and VBIOS' smu_info table was from systemIntegrationInfoTable. since dcn35 VBIOS removed smu_info, driver need to use integrationInfotable directly. Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Signed-off-by: Charlene Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8b09656b22c052d02e4761eb4cbe611289866245 Author: Samson Tam Date: Tue Dec 5 21:25:36 2023 -0500 drm/amd/display: skip error logging when DMUB is inactive from S3 [Why] On resume from S3, while DMUB is inactive, DMUB queue and execute calls will not work. Skip reporting errors in these scenarios [How] Add new return code during DMUB queue and execute calls when DMUB is in S3 state. Skip logging errors in these scenarios Reviewed-by: Alvin Lee Acked-by: Wayne Lin Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 006ad514a50cc49d904fd004b69c842ddfaabf1f Author: Xiaogang Chen Date: Fri Dec 15 17:14:07 2023 -0600 drm/amdkfd: Use partial hmm page walk during buffer validation in SVM SVM uses hmm page walk to valid buffer before map to gpu vm. After have partial migration/mapping do validation on same vm range as migration/map do instead of whole svm range that can be very large. This change is expected to improve svm code performance. Signed-off-by: Xiaogang Chen Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit 489c693bd04a2308865dc50f37bd0b5f6ad52deb Author: Chen Haonan Date: Tue Dec 19 21:06:25 2023 +0800 PM: hibernate: Use kmap_local_page() in copy_data_page() kmap_atomic() has been deprecated in favor of kmap_local_page(). kmap_atomic() disables page-faults and preemption (the latter only for !PREEMPT_RT kernels).The code between the mapping and un-mapping in this patch does not depend on the above-mentioned side effects.So simply replaced kmap_atomic() with kmap_local_page(). Signed-off-by: Chen Haonan [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit e48c8cbeebbd7e2e4d3fe8508b4beb7c00800de4 Author: Mario Limonciello Date: Fri Dec 15 14:37:45 2023 -0600 drm/amd: Add missing definitions for `SMU_MAX_LEVELS_VDDGFX` It is reported that on a Topaz dGPU the kernel emits: amdgpu: can't get the mac of 5 This is because there is no definition for max levels of VDDGFX declared for SMU71 or SMU7. The correct definition is VDDC so use this. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3049 Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit ab44f9daa89c0f081cfd2d79bfe40b27b556a946 Author: Mario Limonciello Date: Fri Dec 15 15:44:16 2023 -0600 Documentation/amdgpu: Remove a spurious character `/` wasn't meant to be in the Dragon Range line Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit b55349a03837213f2b32af9e7d3d7c9083f297d1 Author: Mario Limonciello Date: Fri Dec 15 15:42:38 2023 -0600 Documentation/amdgpu: Add Hawk Point processors These have been announced so add them to the table. Link: https://www.amd.com/en/product/13971 Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 6fb12518ca58412dc51054e2a7400afb41328d85 Author: Josip Pavic Date: Tue Dec 5 12:01:05 2023 -0500 drm/amd/display: make flip_timestamp_in_us a 64-bit variable [Why] This variable currently overflows after about 71 minutes. This doesn't cause any known functional issues but it does make debugging more difficult. [How] Make it a 64-bit variable. Reviewed-by: Aric Cyr Acked-by: Wayne Lin Signed-off-by: Josip Pavic Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5dd0bd06cb6c02b445d28144a83c561225c2fa5f Author: Wayne Lin Date: Tue Dec 5 14:55:31 2023 +0800 drm/amd/display: Add case for dcn35 to support usb4 dmub hpd event [Why & how] Refactor dc_is_dmub_outbox_supported() a bit and add case for dcn35 to register dmub outbox notification irq to handle usb4 relevant hpd event. Reviewed-by: Roman Li Reviewed-by: Jun Lei Signed-off-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 65550a9cc5c371b4027c8e8199293899cb2f5af7 Author: Hamza Mahfooz Date: Fri Dec 15 10:37:39 2023 -0500 drm/amd/display: disable FPO and SubVP for older DMUB versions on DCN32x There have recently been changes that break backwards compatibility, that were introduced into DMUB firmware (for DCN32x) concerning FPO and SubVP. So, since those are just power optimization features, we can just disable them unless the user is using a new enough version of DMUB firmware. Cc: stable@vger.kernel.org Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2870 Fixes: ed6e2782e974 ("drm/amd/display: For cursor P-State allow for SubVP") Reported-by: Mikhail Gavrilov Closes: https://lore.kernel.org/r/CABXGCsNRb0QbF2pKLJMDhVOKxyGD6-E+8p-4QO6FOWa6zp22_A@mail.gmail.com/ Reviewed-by: Harry Wentland Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 4e08378b2dc1fbe64c9e1730f3260672b22fac03 Author: Mario Limonciello Date: Thu Dec 14 15:07:32 2023 -0600 drm/amd/display: Add a new DC debug mask for PSR-SU Some issues have been raised that appear to be tied to PSR-SU. To allow users to confirm they're tied to PSR-SU without turning off PSR entirely introduce a new debug mask: amdgpu.dcdebugmask=0x200 Reviewed-by: Harry Wentland Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit a0d25fcd75d40441712ff210cba2e49fc771a8b3 Author: Johnson Chen Date: Mon Dec 4 18:48:15 2023 -0500 drm/amd/display: Add function for dumping clk registers [why] Allow devs to check raw clk register values by dumping them on the log [how] Add clk register dump implementation Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: Johnson Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6e4337f695c25162f0296934152506ad596fcebf Author: Aric Cyr Date: Thu Nov 30 18:54:48 2023 -0500 drm/amd/display: Unify optimize_required flags and VRR adjustments [why] There is only a single call to dc_post_update_surfaces_to_stream so there is no need to have two flags to control it. Unifying this to a single flag allows dc_stream_adjust_vmin_vmax to skip actual programming when there is no change required. [how] Remove wm_optimze_required flag and set only optimize_required in its place. Then in dc_stream_adjust_vmin_vmax, check that the stream timing range matches the requested one and skip programming if they are equal. Reviewed-by: Jun Lei Acked-by: Wayne Lin Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6e5e6d274956305f1fc0340522b38f5f5be74bdb Author: Jens Axboe Date: Tue Dec 19 12:36:34 2023 -0700 io_uring: drop any code related to SCM_RIGHTS This is dead code after we dropped support for passing io_uring fds over SCM_RIGHTS, get rid of it. Signed-off-by: Jens Axboe commit a4104821ad651d8a0b374f0b2474c345bbb42f82 Author: Jens Axboe Date: Tue Dec 19 12:30:43 2023 -0700 io_uring/unix: drop usage of io_uring socket Since we no longer allow sending io_uring fds over SCM_RIGHTS, move to using io_is_uring_fops() to detect whether this is a io_uring fd or not. With that done, kill off io_uring_get_socket() as nobody calls it anymore. This is in preparation to yanking out the rest of the core related to unix gc with io_uring. Signed-off-by: Jens Axboe commit 0214392d5dd13876852be0dcf7a939fd5aa07da0 Merge: 946cff255dfaa eb61eca0e8c3e Author: Alex Williamson Date: Tue Dec 19 12:16:24 2023 -0700 Merge branch 'v6.8/vfio/virtio' into v6.8/vfio/next commit eb61eca0e8c3efbdd6d3c9d2b7f70bf67e165f7d Author: Yishai Hadas Date: Tue Dec 19 11:32:47 2023 +0200 vfio/virtio: Introduce a vfio driver over virtio devices Introduce a vfio driver over virtio devices to support the legacy interface functionality for VFs. Background, from the virtio spec [1]. -------------------------------------------------------------------- In some systems, there is a need to support a virtio legacy driver with a device that does not directly support the legacy interface. In such scenarios, a group owner device can provide the legacy interface functionality for the group member devices. The driver of the owner device can then access the legacy interface of a member device on behalf of the legacy member device driver. For example, with the SR-IOV group type, group members (VFs) can not present the legacy interface in an I/O BAR in BAR0 as expected by the legacy pci driver. If the legacy driver is running inside a virtual machine, the hypervisor executing the virtual machine can present a virtual device with an I/O BAR in BAR0. The hypervisor intercepts the legacy driver accesses to this I/O BAR and forwards them to the group owner device (PF) using group administration commands. -------------------------------------------------------------------- Specifically, this driver adds support for a virtio-net VF to be exposed as a transitional device to a guest driver and allows the legacy IO BAR functionality on top. This allows a VM which uses a legacy virtio-net driver in the guest to work transparently over a VF which its driver in the host is that new driver. The driver can be extended easily to support some other types of virtio devices (e.g virtio-blk), by adding in a few places the specific type properties as was done for virtio-net. For now, only the virtio-net use case was tested and as such we introduce the support only for such a device. Practically, Upon probing a VF for a virtio-net device, in case its PF supports legacy access over the virtio admin commands and the VF doesn't have BAR 0, we set some specific 'vfio_device_ops' to be able to simulate in SW a transitional device with I/O BAR in BAR 0. The existence of the simulated I/O bar is reported later on by overwriting the VFIO_DEVICE_GET_REGION_INFO command and the device exposes itself as a transitional device by overwriting some properties upon reading its config space. Once we report the existence of I/O BAR as BAR 0 a legacy driver in the guest may use it via read/write calls according to the virtio specification. Any read/write towards the control parts of the BAR will be captured by the new driver and will be translated into admin commands towards the device. In addition, any data path read/write access (i.e. virtio driver notifications) will be captured by the driver and forwarded to the physical BAR which its properties were supplied by the admin command VIRTIO_ADMIN_CMD_LEGACY_NOTIFY_INFO upon the probing/init flow. With that code in place a legacy driver in the guest has the look and feel as if having a transitional device with legacy support for both its control and data path flows. [1] https://github.com/oasis-tcs/virtio-spec/commit/03c2d32e5093ca9f2a17797242fbef88efe94b8c Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20231219093247.170936-10-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 8486ae162b3b6cc1055366f044495cf1966231f1 Author: Yishai Hadas Date: Tue Dec 19 11:32:46 2023 +0200 vfio/pci: Expose vfio_pci_core_iowrite/read##size() Expose vfio_pci_core_iowrite/read##size() to let it be used by drivers. This functionality is needed to enable direct access to some physical BAR of the device with the proper locks/checks in place. The next patches from this series will use this functionality on a data path flow when a direct access to the BAR is needed. Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20231219093247.170936-9-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 8bccc5b80678c69f7729ce4cd232c0aa98fa6277 Author: Yishai Hadas Date: Tue Dec 19 11:32:45 2023 +0200 vfio/pci: Expose vfio_pci_core_setup_barmap() Expose vfio_pci_core_setup_barmap() to be used by drivers. This will let drivers to mmap a BAR and re-use it from both vfio and the driver when it's applicable. This API will be used in the next patches by the vfio/virtio coming driver. Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Signed-off-by: Yishai Hadas Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20231219093247.170936-8-yishaih@nvidia.com Signed-off-by: Alex Williamson commit c3fc3e098bd64c560dde49a6e72b21b055150abe Author: Yishai Hadas Date: Tue Dec 19 11:32:44 2023 +0200 virtio-pci: Introduce APIs to execute legacy IO admin commands Introduce APIs to execute legacy IO admin commands. It includes: io_legacy_read/write for both common and the device configuration, io_legacy_notify_info. In addition, exposing an API to check whether the legacy IO commands are supported. (i.e. virtio_pci_admin_has_legacy_io()). Those APIs will be used by the next patches from this series. Note: Unlike modern drivers which support hardware virtio devices, legacy drivers assume software-based devices: e.g. they don't use proper memory barriers on ARM, use big endian on PPC, etc. X86 drivers are mostly ok though, more or less by chance. For now, only support legacy IO on X86. Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20231219093247.170936-7-yishaih@nvidia.com Signed-off-by: Alex Williamson commit f51e146f1e5c9de02433e51f5a344556502d9c6a Author: Yishai Hadas Date: Tue Dec 19 11:32:43 2023 +0200 virtio-pci: Initialize the supported admin commands Initialize the supported admin commands upon activating the admin queue. The supported commands are saved as part of the admin queue context. Next patches in this series will expose APIs to use them. Reviewed-by: Feng Liu Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20231219093247.170936-6-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 388431b9f59bbfde2b5f2fe032b0836158b09ad0 Author: Feng Liu Date: Tue Dec 19 11:32:42 2023 +0200 virtio-pci: Introduce admin commands Introduces admin commands, as follow: The "list query" command can be used by the driver to query the set of admin commands supported by the virtio device. The "list use" command is used to inform the virtio device which admin commands the driver will use. The "legacy common cfg rd/wr" commands are used to read from/write into the legacy common configuration structure. The "legacy dev cfg rd/wr" commands are used to read from/write into the legacy device configuration structure. The "notify info" command is used to query the notification region information. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20231219093247.170936-5-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 92792ac752aa80d5ee71bc291d90edd06cd76bd1 Author: Feng Liu Date: Tue Dec 19 11:32:41 2023 +0200 virtio-pci: Introduce admin command sending function Add support for sending admin command through admin virtqueue interface. Abort any inflight admin commands once device reset completes. Activate admin queue when device becomes ready; deactivate on device reset. To comply to the below specification statement [1], the admin virtqueue is activated for upper layer users only after setting DRIVER_OK status. [1] The driver MUST NOT send any buffer available notifications to the device before setting DRIVER_OK. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20231219093247.170936-4-yishaih@nvidia.com Signed-off-by: Alex Williamson commit fd27ef6b44bec26915c5b2b22c13856d9f0ba17a Author: Feng Liu Date: Tue Dec 19 11:32:40 2023 +0200 virtio-pci: Introduce admin virtqueue Introduce support for the admin virtqueue. By negotiating VIRTIO_F_ADMIN_VQ feature, driver detects capability and creates one administration virtqueue. Administration virtqueue implementation in virtio pci generic layer, enables multiple types of upper layer drivers such as vfio, net, blk to utilize it. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20231219093247.170936-3-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 838bebb4c926a573839ff1bfe1b654a6ed0f9779 Author: Feng Liu Date: Tue Dec 19 11:32:39 2023 +0200 virtio: Define feature bit for administration virtqueue Introduce VIRTIO_F_ADMIN_VQ which is used for administration virtqueue support. Signed-off-by: Feng Liu Reviewed-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Michael S. Tsirkin Signed-off-by: Yishai Hadas Link: https://lore.kernel.org/r/20231219093247.170936-2-yishaih@nvidia.com Signed-off-by: Alex Williamson commit 415c7451872b0d037760795edd3961eaa63276ea Author: Song Liu Date: Thu Dec 14 14:21:07 2023 -0800 md: Remove deprecated CONFIG_MD_FAULTY md-faulty has been marked as deprecated for 2.5 years. Remove it. Cc: Christoph Hellwig Cc: Jens Axboe Cc: Neil Brown Cc: Guoqing Jiang Cc: Mateusz Grzonka Cc: Jes Sorensen Signed-off-by: Song Liu Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20231214222107.2016042-4-song@kernel.org commit d8730f0cf4effa015bc5e8840d8f8fb3cdb01aab Author: Song Liu Date: Thu Dec 14 14:21:06 2023 -0800 md: Remove deprecated CONFIG_MD_MULTIPATH md-multipath has been marked as deprecated for 2.5 years. Remove it. Cc: Christoph Hellwig Cc: Jens Axboe Cc: Neil Brown Cc: Guoqing Jiang Cc: Mateusz Grzonka Cc: Jes Sorensen Signed-off-by: Song Liu Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20231214222107.2016042-3-song@kernel.org commit 849d18e27be9a1253f2318cb4549cc857219d991 Author: Song Liu Date: Thu Dec 14 14:21:05 2023 -0800 md: Remove deprecated CONFIG_MD_LINEAR md-linear has been marked as deprecated for 2.5 years. Remove it. Cc: Christoph Hellwig Cc: Jens Axboe Cc: Neil Brown Cc: Guoqing Jiang Cc: Mateusz Grzonka Cc: Jes Sorensen Signed-off-by: Song Liu Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20231214222107.2016042-2-song@kernel.org commit 92813fd5b1562e547120c8489137b040892fe1bc Author: Artem Bityutskiy Date: Thu Dec 14 18:56:22 2023 +0200 intel_idle: add Sierra Forest SoC support Add Sierra Forest SoC C-states, which are C1, C1E, C6S, and C6SP. Sierra Forest SoC is built with modules, each module includes 4 cores (Crestmont microarchitecture). There is one L2 cache per module, shared between the 4 cores. There is no core C6 state, but there is C6S state, which has module scope: when all 4 cores request C6S, the entire module (4 cores + L2 cache) enters the low power state. C6SP state has package scope - when all modules in the package enter C6S, the package enters the power state mode. Signed-off-by: Artem Bityutskiy Signed-off-by: Rafael J. Wysocki commit ac89d11b93cc37c52dc38206c3eaffd4fa603f91 Author: Artem Bityutskiy Date: Thu Dec 14 18:56:21 2023 +0200 intel_idle: add Grand Ridge SoC support Add Intel Grand Ridge SoC C-states, which are C1, C1E, and C6S. The Grand Ridge SoC is built with modules, each module includes 4 cores (Crestmont microarchitecture). There is one L2 cache per module, shared between the 4 cores. There is no core C6 state, but there is C6S state, which has module scope: when all 4 cores request C6S, the entire module (4 cores + L2 cache) enters the low power state. Package C6 is not supported by Grand Ridge SoC. Signed-off-by: Artem Bityutskiy Signed-off-by: Rafael J. Wysocki commit 1728df7fc11bf09322852ff05e73908244011594 Merge: 62ed78f3baff3 d17aff807f845 Author: Paolo Abeni Date: Tue Dec 19 18:35:28 2023 +0100 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2023-12-19 Hi David, hi Jakub, hi Paolo, hi Eric, The following pull-request contains BPF updates for your *net-next* tree. We've added 2 non-merge commits during the last 1 day(s) which contain a total of 40 files changed, 642 insertions(+), 2926 deletions(-). The main changes are: 1) Revert all of BPF token-related patches for now as per list discussion [0], from Andrii Nakryiko. [0] https://lore.kernel.org/bpf/CAHk-=wg7JuFYwGy=GOMbRCtOL+jwSQsdUaBsRWkDVYbxipbM5A@mail.gmail.com 2) Fix a syzbot-reported use-after-free read in nla_find() triggered from bpf_skb_get_nlattr_nest() helper, from Jakub Kicinski. bpf-next-for-netdev * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: Revert BPF token-related functionality bpf: Use nla_ok() instead of checking nla_len directly ==================== Link: https://lore.kernel.org/r/20231219170359.11035-1-daniel@iogearbox.net Signed-off-by: Paolo Abeni commit 49b0f4f141465b6446c0ade851ac11b13a888fa9 Author: Abel Vesa Date: Mon Dec 18 18:36:40 2023 +0200 arm64: dts: qcom: x1e80100-qcp: Fix supplies for some LDOs in PM8550 The LDOs 1, 4 and 10 from PM8550 share the same supply, the SMPS 4 from PM8550ve. This needs to be done through shared supply approach otherwise the parsing will fail. Also fix a bindings check failure. Fixes: af16b00578a7 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts") Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231218-x1e80100-qcp-dts-fix-pm8550-regulators-supplies-v1-1-0a313ce87745@linaro.org Signed-off-by: Bjorn Andersson commit ad6556fb45d4ab91ad786a2025cbe2b0f2e6cf77 Author: Konrad Dybcio Date: Mon Dec 18 17:02:13 2023 +0100 arm64: dts: qcom: sm8550: Update idle state time requirements The idle state entry/exit/residency times differ from what shipped on production devices, mostly being overly optimistic in entry times and overly pessimistic in minimal residency times. Align them with downstream sources. Fixes: ffc50b2d3828 ("arm64: dts: qcom: Add base SM8550 dtsi") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-12-ce1272d77540@linaro.org Signed-off-by: Bjorn Andersson commit 28b735232d5e16a34f98dbac1e7b5401c1c16d89 Author: Konrad Dybcio Date: Mon Dec 18 17:02:12 2023 +0100 arm64: dts: qcom: sm8550: Separate out X3 idle state The X3 core has different entry/exit/residency time requirements than the big cluster. Denote them to stop confusing the scheduler. Fixes: ffc50b2d3828 ("arm64: dts: qcom: Add base SM8550 dtsi") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-11-ce1272d77540@linaro.org Signed-off-by: Bjorn Andersson commit c559bcb92564cbaedd43c749cf9b6fbb3d53ad5e Author: Konrad Dybcio Date: Mon Dec 18 17:02:10 2023 +0100 clk: qcom: dispcc-sm8550: Use the correct PLL configuration function To ensure that all fields (particularly CAL_L and CAL_L_RINGOSC) are filled properly, use the correct prepare function for OLE PLLs. Fixes: 90114ca11476 ("clk: qcom: add SM8550 DISPCC driver") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-9-ce1272d77540@linaro.org Signed-off-by: Bjorn Andersson commit febd251d8775c4fb6e4acd6b5d7b0ed707f4611f Author: Konrad Dybcio Date: Mon Dec 18 17:02:09 2023 +0100 clk: qcom: dispcc-sm8550: Update disp PLL settings The settings in the driver seem to have been taken from an older release. Update them to match the latest values. Fixes: 90114ca11476 ("clk: qcom: add SM8550 DISPCC driver") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-8-ce1272d77540@linaro.org Signed-off-by: Bjorn Andersson commit 1d595972da12b5a78748eeb3ba1ff58bb0283b91 Author: Konrad Dybcio Date: Mon Dec 18 17:02:08 2023 +0100 clk: qcom: gpucc-sm8550: Update GPU PLL settings The settings in the driver seem to have been taken from an older release. Update them to match the latest values. Fixes: bfae40744b33 ("clk: qcom: gpucc-sm8550: Add support for graphics clock controller") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-7-ce1272d77540@linaro.org Signed-off-by: Bjorn Andersson commit 929c75d575667af389c8a9e03cebc93d43bb7f31 Author: Konrad Dybcio Date: Mon Dec 18 17:02:07 2023 +0100 clk: qcom: gcc-sm8550: Mark RCGs shared where applicable The vast majority of shared RCGs were not marked as such. Fix it. Fixes: 955f2ea3b9e9 ("clk: qcom: Add GCC driver for SM8550") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-6-ce1272d77540@linaro.org Signed-off-by: Bjorn Andersson commit 7e77a39265293ea4f05e20fff180755503c49918 Author: Konrad Dybcio Date: Mon Dec 18 17:02:06 2023 +0100 clk: qcom: gcc-sm8550: use collapse-voting for PCIe GDSCs The PCIe GDSCs can be shared with other masters and should use the APCS collapse-vote register when updating the power state. This is specifically also needed to be able to disable power domains that have been enabled by boot firmware using the vote register. Following other recent Qualcomm platforms, describe this register and the corresponding mask for the PCIe (and _phy) GDSCs. Fixes: 955f2ea3b9e9 ("clk: qcom: Add GCC driver for SM8550") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-5-ce1272d77540@linaro.org Signed-off-by: Bjorn Andersson commit e7fe73fc6b68ee97b1e8f124a66a5ee50d8d5e5b Author: Konrad Dybcio Date: Mon Dec 18 17:02:05 2023 +0100 clk: qcom: gcc-sm8550: Mark the PCIe GDSCs votable The PCIe GDSCs on most Qualcomm platforms expect the OS to always consider collapse requests as successful. This also concerns SM8550. Add the VOTABLE flag to the GDSCs in question to comply with these expectations. Fixes: 955f2ea3b9e9 ("clk: qcom: Add GCC driver for SM8550") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-4-ce1272d77540@linaro.org Signed-off-by: Bjorn Andersson commit 1fe8273c8d4088dd68faaab8640ec95f381cbf1e Author: Konrad Dybcio Date: Mon Dec 18 17:02:04 2023 +0100 clk: qcom: gcc-sm8550: Add the missing RETAIN_FF_ENABLE GDSC flag All of the 8550's GCC GDSCs can and should use the retain registers so as not to lose their state when entering lower power modes. Fixes: 955f2ea3b9e9 ("clk: qcom: Add GCC driver for SM8550") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-8550_fixes-v1-3-ce1272d77540@linaro.org Signed-off-by: Bjorn Andersson commit d70d141bb15f328528f94557ddf754abeb027365 Author: Rafael J. Wysocki Date: Thu Dec 14 12:07:55 2023 +0100 ACPI: utils: Introduce helper for _DEP list lookup The ACPI LPSS driver and the Surface platform driver code use almost the same code pattern for checking if one ACPI device is present in the list returned by _DEP for another ACPI device. To reduce the resulting code duplication, introduce a helper for that called acpi_device_dep() and invoke it from both places. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg commit e45167b2d3fd98b6553c30360f9d9bcbd737ce6c Author: Neil Armstrong Date: Mon Dec 18 11:30:23 2023 +0100 arm64: defconfig: enable GPU clock controller for SM8[45]50 Enable GPU Clock Controller for SM8450 and SM8550 to allow using Adreno GPU on these SoCs. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231218-topic-sm8x50-upstream-gpucc-defconfig-v2-1-e5892470a10b@linaro.org Signed-off-by: Bjorn Andersson commit cc6fc55c7ae04ab19b3972f78d3a8b1be32bf533 Author: Manivannan Sadhasivam Date: Mon Dec 11 22:54:11 2023 +0530 ARM: dts: qcom: sdx55: Fix the base address of PCIe PHY While convering the binding to new format, serdes address specified in the old binding was used as the base address. This causes a boot hang as the driver tries to access memory region outside of the specified address. Fix it! Cc: Dmitry Baryshkov Cc: stable@vger.kernel.org # 6.6 Fixes: bb56cff4ac03 ("ARM: dts: qcom-sdx55: switch PCIe QMP PHY to new style of bindings") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231211172411.141289-1-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 2e86e6300c4a98b1d0c93e03c491b0fd5d552eb5 Author: Rajendra Nayak Date: Tue Dec 5 11:54:03 2023 +0530 arm64: defconfig: Enable X1E80100 SoC base configs Enable GCC, Pinctrl and Interconnect configs for Qualcomm's X1E80100 SoC which is required to boot X1E80100 QCP/CRD boards to a console shell. The configs are required to be marked as builtin and not modules due to the console driver dependencies. Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231205062403.14848-6-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 5c0dbe8b058436ad5daecb19c60869f832607ea3 Author: Chukun Pan Date: Mon Dec 18 23:08:05 2023 +0800 arm64: dts: qcom: ipq6018: fix clock rates for GCC_USB0_MOCK_UTMI_CLK The downstream QSDK kernel [1] and GCC_USB1_MOCK_UTMI_CLK are both 24MHz. Adjust GCC_USB0_MOCK_UTMI_CLK to 24MHz to avoid the following error: clk: couldn't set gcc_usb0_mock_utmi_clk clk rate to 20000000 (-22), current rate: 24000000 1. https://git.codelinaro.org/clo/qsdk/oss/kernel/linux-ipq-5.4/-/commit/486c8485f59 Fixes: 5726079cd486 ("arm64: dts: ipq6018: Use reference clock to set dwc3 period") Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20231218150805.1228160-1-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit d336355492e4ab8c1fd78e582077146e065d1924 Author: Krzysztof Kozlowski Date: Mon Dec 18 16:06:56 2023 +0100 arm64: dts: qcom: x1e80100: align mem timer size cells with bindings The ARMv7 memory mapped architected timer bindings expect MMIO sizes up to 32-bit. Keep 64-bit addressing but change the size of memory mapping to 32-bit (size-cells=1) and adjust the ranges to match this. This fixes dtbs_check warnings like: x1e80100-qcp.dtb: timer@17800000: #size-cells:0:0: 1 was expected Fixes: af16b00578a7 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20231218150656.72892-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 827f5fc8d912203c1f971e47d61130b13c6820ba Author: Konrad Dybcio Date: Mon Dec 18 15:38:33 2023 +0100 arm64: dts: qcom: sc7280: Mark SDHCI hosts as cache-coherent The SDHCI hosts on SC7280 are cache-coherent, just like on most fairly recent Qualcomm SoCs. Mark them as such. Fixes: 298c81a7d44f ("arm64: dts: qcom: sc7280: Add nodes for eMMC and SD card") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231218-topic-7280_dmac_sdhci-v1-1-97af7efd64a1@linaro.org Signed-off-by: Bjorn Andersson commit 536ecccbaf1fe6319c3af635596748c19208e627 Author: Evan Burgess Date: Mon Dec 18 19:03:32 2023 +0000 nvmet: configfs: use ctrl->instance to track passthru subsystems To prevent enabling more than one passthrough subsystem per NVMe controller, passthru.c maintains an xarray indexed by cntlid values. Passthrough for a given nvmet subsystem cannot be enabled by configfs if the subsystem's passthru_ctrl->cntlid value is already accounted for in the xarray. However, according to the NVMe spec (rev 2.0c, p.145), "The Controller ID (CNTLID) value returned in the Identify Controller data structure may be used to uniquely identify a controller within an NVM subsystem," meaning that cntlid values are not guaranteed to be globally unique across multiple subsystems. Instead, the cntlid only uniquely identifies multiple controllers _within_ a subsystem. As a result, multiple unique & valid NVMe targets can be blocked from enabling passthrough at the same time if their controllers share cntlid values, a behavior allowed by the spec. Fix this by indexing the xarray with passthru_ctrl->instance values, which are allocated per controller by IDA and thus should be truly unique. Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Evan Burgess Signed-off-by: Keith Busch commit 963929615194d163a25e3b536cd990a05d7e9439 Author: Daniel Wagner Date: Mon Dec 18 17:59:54 2023 +0100 nvme: repack struct nvme_ns_head ns_id, lba_shift and ms are always accessed for every read/write I/O in nvme_setup_rw. By grouping these variables into one cacheline we can safe some cycles. 4k sequential reads: baseline patched Bandwidth: 1620 1634 IOPs 66345579 66910939 Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit a1a825ab6a60380240ca136596732fdb80bad87a Author: Daniel Wagner Date: Mon Dec 18 17:59:53 2023 +0100 nvme: add csi, ms and nuse to sysfs libnvme is using the sysfs for enumarating the nvme resources. Though there are few missing attritbutes in the sysfs. For these libnvme issues commands during discovering. As the kernel already knows all these attributes and we would like to avoid libnvme to issue commands all the time, expose these missing attributes. The nuse value is updated on request because the nuse is a volatile value. Since any user can read the sysfs attribute, a very simple rate limit is added (update once every 5 seconds). A more sophisticated update strategy can be added later if there is actually a need for it. Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 83ac678e599f0cee4056594111612946a381fa0b Author: Daniel Wagner Date: Mon Dec 18 17:59:52 2023 +0100 nvme: rename ns attribute group Drop the 'id' part of the attribute group name because we want to expose non 'id' related attributes via the ns attribute group. Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit d386aedc94efe249b0071b0ad969a6bce2e505bd Author: Daniel Wagner Date: Mon Dec 18 17:59:51 2023 +0100 nvme: refactor ns info setup function Use nvme_ns_head instead of nvme_ns where possible. This reduces the coupling between the different data structures. Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 0372dd4e36171708f90192d5d4a3dcab7159df09 Author: Daniel Wagner Date: Mon Dec 18 17:59:50 2023 +0100 nvme: refactor ns info helpers Pass in the nvme_ns_head pointer directly. This reduces the necessity on the caller side have the nvme_ns data structure present. Thus we can refactor the caller side in the next step as well. Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 9419e71b8d67312dbe267968b2bec0ebc449dc73 Author: Daniel Wagner Date: Mon Dec 18 17:59:49 2023 +0100 nvme: move ns id info to struct nvme_ns_head Move the namesapce info to struct nvme_ns_head, because it's the same for all associated namespaces. Note: with multipathing enabled the PI information is shared between all paths. If a path is using a different PI configuration it will overwrite the previous settings. This is obviously not correct and such configuration will be rejected in future. For the time being we expect a correctly configured storage. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch commit 710dd03464e4ab5b3d329768388b165d61958577 Author: Johan Hovold Date: Wed Dec 13 18:31:31 2023 +0100 ARM: dts: qcom: sdx55: fix USB SS wakeup The USB SS PHY interrupt needs to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states. Fixes: fea4b41022f3 ("ARM: dts: qcom: sdx55: Add USB3 and PHY support") Cc: stable@vger.kernel.org # 5.12 Cc: Manivannan Sadhasivam Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231213173131.29436-4-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit de95f139394a5ed82270f005bc441d2e7c1e51b7 Author: Johan Hovold Date: Wed Dec 13 18:31:30 2023 +0100 ARM: dts: qcom: sdx55: fix USB DP/DM HS PHY interrupts The USB DP/DM HS PHY interrupts need to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states and to be able to detect disconnect events, which requires triggering on falling edges. A recent commit updated the trigger type but failed to change the interrupt provider as required. This leads to the current Linux driver failing to probe instead of printing an error during suspend and USB wakeup not working as intended. Fixes: d0ec3c4c11c3 ("ARM: dts: qcom: sdx55: fix USB wakeup interrupt types") Fixes: fea4b41022f3 ("ARM: dts: qcom: sdx55: Add USB3 and PHY support") Cc: stable@vger.kernel.org # 5.12 Cc: Manivannan Sadhasivam Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231213173131.29436-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit cc25bd06c16aa582596a058d375b2e3133f79b93 Author: Johan Hovold Date: Wed Dec 13 18:31:29 2023 +0100 ARM: dts: qcom: sdx55: fix pdc '#interrupt-cells' The Qualcomm PDC interrupt controller binding expects two cells in interrupt specifiers. Fixes: 9d038b2e62de ("ARM: dts: qcom: Add SDX55 platform and MTP board support") Cc: stable@vger.kernel.org # 5.12 Cc: Manivannan Sadhasivam Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231213173131.29436-2-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 2f2998895cc29e8660d848d2580b1787710e93f6 Merge: 791667f7f0dfb 7211094dd0659 Author: Mark Brown Date: Tue Dec 19 16:46:16 2023 +0000 ASoC: qcom: add sound card support for SM8650 Merge series from Neil Armstrong : Document the SM8650 sound card using the SM8450 fallback and add the SM8650 compatible to the sc8280xp sound card driver to use the sm8650 card driver_name like SM8450 & SM8550. commit 791667f7f0dfb65eb472b1dae84524ec9bfc1ff4 Merge: f51daa78063e4 3423c3db22e92 Author: Mark Brown Date: Tue Dec 19 16:46:07 2023 +0000 add es8326 dt-bindings, commonize headset codec Merge series from Rui Zhou : Add dt-bindings for es8326 and codec es8326 support. Remove duplicate code, commonize headset codec init/exit API. At the same time, Enable dual amp max98390 for rt5682s. commit f51daa78063e4f078054b12f37b3cc699e2715f2 Merge: 7a27dbf7b1f95 576f3aef47f42 Author: Mark Brown Date: Tue Dec 19 16:45:59 2023 +0000 Improve AMD ACP Vangogh audio support for Steam Deck Merge series from Cristian Ciocaltea : This patch series provides several fixes and improvements to AMD ACP drivers targeting the Vangogh platform, as found on the Valve's new Steam Deck OLED. Although in theory the board should have been supported by both SOF and legacy ACP drivers, as of next-20231208 the audio seems to be completely broken. Please note this only restores the legacy support, while SOF will be handled in a separate series. commit 7a27dbf7b1f95de8c8f609753e4167cf4bbddfe6 Merge: aefe7a8e26874 13f58267cda3d Author: Mark Brown Date: Tue Dec 19 16:45:51 2023 +0000 ASoC: don't use original dummy dlc Merge series from Kuninori Morimoto : "Empty" dlc might be used on Platform, but "dummy" dlc is not needed for it. [PATCH 1/5][PATCH 2/5] removes "dummy" dlc from Platform. Now ASoC have common dummy dlc (= snd_soc_dummy_dlc). [PATCH 3/5][PATCH 4/5] will use it instead of original dummy dlc. Many drivers are using below macro SND_SOC_DAILINK_DEFS(link, DAILINK_COMP_ARRAY(COMP_CPU(...)), (X) DAILINK_COMP_ARRAY(COMP_DUMMY()), DAILINK_COMP_ARRAY(COMP_EMPTY())); But (X) part will create original dummy dlc. [PATCH 5/5] will try not to create original dummy dlc, and replace it to common dummy dlc. commit aefe7a8e268742ec9183f94e1380873802961c33 Merge: c13cf1991f423 26e91f61d6b91 Author: Mark Brown Date: Tue Dec 19 16:45:42 2023 +0000 GPIO inclusion fixes to misc sound drivers Merge series from Linus Walleij : Mostly dropping unused headers, and a single driver rewrite. commit aa3e193d66db56b3331142509acb4b5bad4e7f4f Author: Dmitry Antipov Date: Fri Dec 15 15:38:53 2023 +0300 wifi: rtw88: use cfg80211_ssid_eq() instead of rtw_ssid_equal() Prefer generic 'cfg80211_ssid_eq()' over dropped 'rtw_ssid_equal()'. Compile tested only. Signed-off-by: Dmitry Antipov Link: https://msgid.link/20231215123859.196350-3-dmantipov@yandex.ru Signed-off-by: Johannes Berg commit 323e79d4387a89e546cf6b435e68e109a8f0e69e Author: Dmitry Antipov Date: Fri Dec 15 15:38:52 2023 +0300 wifi: mwifiex: use cfg80211_ssid_eq() instead of mwifiex_ssid_cmp() Prefer generic 'cfg80211_ssid_eq()' over dropped 'mwifiex_ssid_cmp()'. Compile tested only. Signed-off-by: Dmitry Antipov Link: https://msgid.link/20231215123859.196350-2-dmantipov@yandex.ru Signed-off-by: Johannes Berg commit 1c1c2b37325934b4318c46966feb03ad9fe83d8a Author: Dmitry Antipov Date: Fri Dec 15 15:38:51 2023 +0300 wifi: cfg80211: introduce cfg80211_ssid_eq() Since SSIDs comparison is commonly used across many drivers, introduce generic 'cfg80211_ssid_eq()' to replace driver-private implementations. Signed-off-by: Dmitry Antipov Link: https://msgid.link/20231215123859.196350-1-dmantipov@yandex.ru [fix kernel-doc return docs] Signed-off-by: Johannes Berg commit 0afa885d42d05d30161ab8eab1ebacd993edb82b Author: Johan Hovold Date: Thu Dec 14 08:43:19 2023 +0100 arm64: dts: qcom: sc8180x: fix USB SS wakeup The USB SS PHY interrupt needs to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states. Fixes: b080f53a8f44 ("arm64: dts: qcom: sc8180x: Add remoteprocs, wifi and usb nodes") Cc: stable@vger.kernel.org # 6.5 Cc: Vinod Koul Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214074319.11023-4-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 047b2edc35b8db22354b4fba37818b548fc18896 Author: Johan Hovold Date: Thu Dec 14 08:43:18 2023 +0100 arm64: dts: qcom: sdm670: fix USB SS wakeup The USB SS PHY interrupt needs to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states. Fixes: 07c8ded6e373 ("arm64: dts: qcom: add sdm670 and pixel 3a device trees") Cc: stable@vger.kernel.org # 6.2 Cc: Richard Acayan Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Tested-by: Richard Acayan Link: https://lore.kernel.org/r/20231214074319.11023-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit c42d12ea105f67b0f137f1e52d5c59d13fe12b1f Author: Johan Hovold Date: Thu Dec 14 08:43:17 2023 +0100 arm64: dts: qcom: sdm670: fix USB DP/DM HS PHY interrupts The USB DP/DM HS PHY interrupts need to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states and to be able to detect disconnect events, which requires triggering on falling edges. A recent commit updated the trigger type but failed to change the interrupt provider as required. This leads to the current Linux driver failing to probe instead of printing an error during suspend and USB wakeup not working as intended. Fixes: de3b3de30999 ("arm64: dts: qcom: sdm670: fix USB wakeup interrupt types") Fixes: 07c8ded6e373 ("arm64: dts: qcom: add sdm670 and pixel 3a device trees") Cc: stable@vger.kernel.org # 6.2 Cc: Richard Acayan Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Tested-by: Richard Acayan Link: https://lore.kernel.org/r/20231214074319.11023-2-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit d17aff807f845cf93926c28705216639c7279110 Author: Andrii Nakryiko Date: Tue Dec 19 07:37:35 2023 -0800 Revert BPF token-related functionality This patch includes the following revert (one conflicting BPF FS patch and three token patch sets, represented by merge commits): - revert 0f5d5454c723 "Merge branch 'bpf-fs-mount-options-parsing-follow-ups'"; - revert 750e785796bb "bpf: Support uid and gid when mounting bpffs"; - revert 733763285acf "Merge branch 'bpf-token-support-in-libbpf-s-bpf-object'"; - revert c35919dcce28 "Merge branch 'bpf-token-and-bpf-fs-based-delegation'". Link: https://lore.kernel.org/bpf/CAHk-=wg7JuFYwGy=GOMbRCtOL+jwSQsdUaBsRWkDVYbxipbM5A@mail.gmail.com Signed-off-by: Andrii Nakryiko commit 67ba055dd7758c34f6e64c9d35132362c1e1f0b5 Author: Andy Shevchenko Date: Tue Dec 19 17:40:12 2023 +0200 regulator: Reuse LINEAR_RANGE() in REGULATOR_LINEAR_RANGE() REGULATOR_LINEAR_RANGE() repeats what LINEAR_RANGE() provides. Deduplicate the former by using the latter. No functional change intended. Signed-off-by: Andy Shevchenko Link: https://msgid.link/r/20231219154012.2478688-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit c43203154d8ac579537aa0c7802b77d463b1f53a Author: Jens Axboe Date: Tue Dec 19 08:54:20 2023 -0700 io_uring/register: move io_uring_register(2) related code to register.c Most of this code is basically self contained, move it out of the core io_uring file to bring a bit more separation to the registration related bits. This moves another ~10% of the code into register.c. Signed-off-by: Jens Axboe commit 1d62ada48d41d72d72232585eed0f3e1136ae1fb Author: Rajvi Jingar Date: Mon Dec 18 20:22:14 2023 -0800 platform/x86/intel/pmc: Add ssram_init flag in PMC discovery in Meteor Lake If PMC discovery using pmc_core_ssram_init() was unsuccessful for the Meteor Lake platform, the legacy enumeration method is used. In this case pci device struct for the PMC SSRAM is not available and pmc_core_ssram_get_lpm_reqs() will not work. Add ssram_init flag to indicate if the PMC SSRAM initialization was successful or not. Call pmc_core_ssram_get_lpm_reqs() only if the ssram_init flag is set to true. Signed-off-by: Rajvi Jingar Link: https://lore.kernel.org/r/20231219042216.2592029-6-rajvi.jingar@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d79c3c82ee82cc99ffde4c4f5fe69db35bcfb733 Author: Rajvi Jingar Date: Mon Dec 18 20:22:13 2023 -0800 platform/x86/intel/pmc: Move common code to core.c Functions like mtl_set_device_d3() and mtl_punit_pmt_init() were added for Meteor Lake. To be able to use them in Arrow Lake and future platforms, move them to core.c. Also, to support different guids, add guid argument in pmc_core_punit_pmt_init() and to support different PCI function numbers, add func arg in pmc_core_ssram_init(). Signed-off-by: Rajvi Jingar Link: https://lore.kernel.org/r/20231219042216.2592029-5-rajvi.jingar@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d873f380525c502904737f592008d509cff20c78 Author: Rajvi Jingar Date: Mon Dec 18 20:22:12 2023 -0800 platform/x86/intel/pmc: Add PSON residency counter for Alder Lake Add PSON register offsets for Alder Lake PCH that provides an access to PSON residency counter. Signed-off-by: Rajvi Jingar Link: https://lore.kernel.org/r/20231219042216.2592029-4-rajvi.jingar@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 544f7b7f651cf5745f3a1f3d28b298ee2b128eb1 Author: Rajvi Jingar Date: Mon Dec 18 20:22:11 2023 -0800 platform/x86/intel/pmc: Add regmap for Tiger Lake H PCH Tiger Lake H PCH is same as Tiger Lake LP PCH from the driver perspective with the addition of the PSON residency counter. Add regmap for TGP H to add PSON register offsets for Tiger Lake H PCH. Signed-off-by: Rajvi Jingar Link: https://lore.kernel.org/r/20231219042216.2592029-3-rajvi.jingar@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b6258fa2c7b3dd23e362801410f171567d0d16af Author: Rajvi Jingar Date: Mon Dec 18 20:22:10 2023 -0800 platform/x86/intel/pmc: Add PSON residency counter Tiger Lake platform onwards, devices have the capability to track the duration of time that their Power Supply Units (PSUs) are turned off during S0ix. This patch adds a debugfs file `pson_residency_usec` to provide access to this counter. Signed-off-by: Michael Bottini Signed-off-by: Rajvi Jingar Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20231219042216.2592029-2-rajvi.jingar@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 1f5e56c9f6cc92c45d27adfe78fb54c716fed2e2 Author: Rajvi Jingar Date: Mon Dec 18 20:22:09 2023 -0800 platform/x86/intel/pmc: Fix in mtl_punit_pmt_init() pci_get_domain_bus_and_slot() increases the reference count on the pci device that is used to register the endpoint. In case of failure in registration, decrease reference count using pci_dev_put(pcidev) before returning. Fixes: 6e7964855381 ("platform/x86/intel/pmc: Show Die C6 counter on Meteor Lake") Signed-off-by: Rajvi Jingar Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20231219042216.2592029-1-rajvi.jingar@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit bd142914f805b88dcb15acaab9fbc9bea666dd32 Author: Armin Wolf Date: Mon Dec 18 20:24:20 2023 +0100 platform/x86: wmi: Simplify get_subobj_info() All callers who call get_subobj_info() with **info being NULL should better use acpi_has_method() instead. Convert the only caller who does this to acpi_has_method() to drop the dummy info handling. Reviewed-by: Hans de Goede Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231218192420.305411-7-W_Armin@gmx.de Signed-off-by: Hans de Goede commit 2c933755eaaa82fffe0201f376713fa2070b9428 Author: Armin Wolf Date: Mon Dec 18 20:24:19 2023 +0100 platform/x86: wmi: Decouple ACPI notify handler from wmi_block_list Currently, the ACPI notify handler searches all WMI devices for a matching WMI event device. This is inefficient since only WMI devices associated with the notified ACPI device need to be searched. Use the WMI bus device and device_for_each_child() to search for a matching WMI event device instead. Reviewed-by: Hans de Goede Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231218192420.305411-6-W_Armin@gmx.de Signed-off-by: Hans de Goede commit 095fa72a19f13b15629611d52447cb17ce223bcd Author: Armin Wolf Date: Mon Dec 18 20:24:18 2023 +0100 platform/x86: wmi: Create WMI bus device first Create the WMI bus device first so that it can be used by the ACPI handlers. Reviewed-by: Hans de Goede Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231218192420.305411-5-W_Armin@gmx.de Signed-off-by: Hans de Goede commit 08e7f4d61d3f043f32e35c224898d0869f8b1530 Author: Armin Wolf Date: Mon Dec 18 20:24:17 2023 +0100 platform/x86: wmi: Use devres for resource handling Use devres for cleaning up the ACPI handlers and the WMI bus device to simplify the error handling. Reviewed-by: Hans de Goede Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231218192420.305411-4-W_Armin@gmx.de Signed-off-by: Hans de Goede commit 22574e17626391ad969af9a13aaa58a1b37ad384 Author: Armin Wolf Date: Mon Dec 18 20:24:16 2023 +0100 platform/x86: wmi: Remove ACPI handlers after WMI devices When removing the ACPI notify/address space handlers, the WMI devices are still active and might still depend on ACPI EC access or WMI events. Fix this by removing the ACPI handlers after all WMI devices associated with an ACPI device have been removed. Reviewed-by: Hans de Goede Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231218192420.305411-3-W_Armin@gmx.de Signed-off-by: Hans de Goede commit 41dd6822949ec6e83416a0e245f32a726110056a Author: Armin Wolf Date: Mon Dec 18 20:24:15 2023 +0100 platform/x86: wmi: Remove unused variable in address space handler The variable "i" is always zero and only used in shift operations. Remove it to make the code more readable. Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231218192420.305411-2-W_Armin@gmx.de Signed-off-by: Hans de Goede commit 4c434392c4777881d01beada6701eff8c76b43fe Author: Li Nan Date: Tue Dec 19 15:59:42 2023 +0800 block: add check of 'minors' and 'first_minor' in device_add_disk() 'first_minor' represents the starting minor number of disks, and 'minors' represents the number of partitions in the device. Neither of them can be greater than MINORMASK + 1. Commit e338924bd05d ("block: check minor range in device_add_disk()") only added the check of 'first_minor + minors'. However, their sum might be less than MINORMASK but their values are wrong. Complete the checks now. Fixes: e338924bd05d ("block: check minor range in device_add_disk()") Signed-off-by: Li Nan Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231219075942.840255-1-linan666@huaweicloud.com Signed-off-by: Jens Axboe commit 4e87ca403e2008b9e182239e1abbf6876a55eb33 Author: Zenm Chen Date: Sun Dec 17 20:30:17 2023 +0800 wifi: rtl8xxxu: Add additional USB IDs for RTL8192EU devices Add additional USB IDs found in the vendor driver from https://github.com/Mange/rtl8192eu-linux-driver to support more RTL8192EU devices. Signed-off-by: Zenm Chen Reviewed-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231217123017.1982-1-zenmchen@gmail.com commit bad7aaef31162ed71c469a38f7636ec8c8fb9306 Author: Ping-Ke Shih Date: Sat Dec 16 12:57:39 2023 +0800 wifi: rtw89: mac: implement to configure TX/RX engines for WiFi 7 chips After enabling DMAC and CMAC, configure detail registers one by one. DMAC includes DLE (data link engine), packet preload engine, HFC (HCI flow control) for DMA channels, security egine and etc. CMAC includes scheduler, address CAM, RX filter, CCA control and etc. The SER IMR is to configure to help SER. When hardware TX/RX get abnormal, it raises an interrupt to firmware to determine if send C2H events to notify driver to reset PCI bus or call ieee80211_restart_hw(). Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231216045739.10432-3-pkshih@realtek.com commit 694c626bcfe2525142635a3d24edb6509943f2d8 Author: Ping-Ke Shih Date: Sat Dec 16 12:57:38 2023 +0800 wifi: rtw89: mac: add sys_init and filter option for WiFi 7 chips The sys_init is to enable hardware function block of DMAC (data-path MAC), CMAC (control-path MAC) and others called 'chip_func'. To understand the functionality of this function, we keep some functions as empty. The other is typ_fltr_opt that is to configure filter option to decide whether RX packets engine can forward packets to host or WiFi CPU. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231216045739.10432-2-pkshih@realtek.com commit 62ed78f3baff396bd928ee77077580c5aa940149 Merge: f7dd48ea76be3 ded6f77c05b11 Author: Paolo Abeni Date: Tue Dec 19 15:31:43 2023 +0100 Merge branch 'devlink-introduce-notifications-filtering' Jiri Pirko says: ==================== devlink: introduce notifications filtering From: Jiri Pirko Currently the user listening on a socket for devlink notifications gets always all messages for all existing devlink instances and objects, even if he is interested only in one of those. That may cause unnecessary overhead on setups with thousands of instances present. User is currently able to narrow down the devlink objects replies to dump commands by specifying select attributes. Allow similar approach for notifications providing user a new notify-filter-set command to select attributes with values the notification message has to match. In that case, it is delivered to the socket. Note that the filtering is done per-socket, so multiple users may specify different selection of attributes with values. This patchset initially introduces support for following attributes: DEVLINK_ATTR_BUS_NAME DEVLINK_ATTR_DEV_NAME DEVLINK_ATTR_PORT_INDEX Patches #1 - #4 are preparations in devlink code, patch #3 is an optimization done on the way. Patches #5 - #7 are preparations in netlink and generic netlink code. Patch #8 is the main one in this set implementing of the notify-filter-set command and the actual per-socket filtering. Patch #9 extends the infrastructure allowing to filter according to a port index. Example: $ devlink mon port pci/0000:08:00.0/32768 [port,new] pci/0000:08:00.0/32768: type notset flavour pcisf controller 0 pfnum 0 sfnum 107 splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached roce enable [port,new] pci/0000:08:00.0/32768: type eth flavour pcisf controller 0 pfnum 0 sfnum 107 splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached roce enable [port,new] pci/0000:08:00.0/32768: type eth netdev eth3 flavour pcisf controller 0 pfnum 0 sfnum 107 splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached roce enable [port,new] pci/0000:08:00.0/32768: type eth netdev eth3 flavour pcisf controller 0 pfnum 0 sfnum 107 splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached roce enable [port,new] pci/0000:08:00.0/32768: type eth flavour pcisf controller 0 pfnum 0 sfnum 107 splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached roce enable [port,new] pci/0000:08:00.0/32768: type notset flavour pcisf controller 0 pfnum 0 sfnum 107 splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached roce enable [port,del] pci/0000:08:00.0/32768: type notset flavour pcisf controller 0 pfnum 0 sfnum 107 splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached roce enable ==================== Link: https://lore.kernel.org/r/20231216123001.1293639-1-jiri@resnulli.us Signed-off-by: Paolo Abeni commit ded6f77c05b113001d449cf2cc810e090f20ec4a Author: Jiri Pirko Date: Sat Dec 16 13:30:01 2023 +0100 devlink: extend multicast filtering by port index Expose the previously introduced notification multicast messages filtering infrastructure and allow the user to select messages using port index. Signed-off-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 13b127d2578432e1e521310b69944c5a1b30679c Author: Jiri Pirko Date: Sat Dec 16 13:30:00 2023 +0100 devlink: add a command to set notification filter and use it for multicasts Currently the user listening on a socket for devlink notifications gets always all messages for all existing instances, even if he is interested only in one of those. That may cause unnecessary overhead on setups with thousands of instances present. User is currently able to narrow down the devlink objects replies to dump commands by specifying select attributes. Allow similar approach for notifications. Introduce a new devlink NOTIFY_FILTER_SET which the user passes the select attributes. Store these per-socket and use them for filtering messages during multicast send. Signed-off-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 971b4ad88293bef00160e1d38659077fe3a93af6 Author: Jiri Pirko Date: Sat Dec 16 13:29:59 2023 +0100 genetlink: introduce helpers to do filtered multicast Currently it is possible for netlink kernel user to pass custom filter function to broadcast send function netlink_broadcast_filtered(). However, this is not exposed to multicast send and to generic netlink users. Extend the api and introduce a netlink helper nlmsg_multicast_filtered() and a generic netlink helper genlmsg_multicast_netns_filtered() to allow generic netlink families to specify filter function while sending multicast messages. Signed-off-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 403863e985e8eba608d53b2907caaf37b6176290 Author: Jiri Pirko Date: Sat Dec 16 13:29:58 2023 +0100 netlink: introduce typedef for filter function Make the code using filter function a bit nicer by consolidating the filter function arguments using typedef. Suggested-by: Andy Shevchenko Signed-off-by: Jiri Pirko Signed-off-by: Paolo Abeni commit a731132424adeda4d5383ef61afae2e804063fb7 Author: Jiri Pirko Date: Sat Dec 16 13:29:57 2023 +0100 genetlink: introduce per-sock family private storage Introduce an xarray for Generic netlink family to store per-socket private. Initialize this xarray only if family uses per-socket privs. Introduce genl_sk_priv_get() to get the socket priv pointer for a family and initialize it in case it does not exist. Introduce __genl_sk_priv_get() to obtain socket priv pointer for a family under RCU read lock. Allow family to specify the priv size, init() and destroy() callbacks. Signed-off-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 5648de0b1f2b68bffce9bdd49a276607b9a3e3d4 Author: Jiri Pirko Date: Sat Dec 16 13:29:56 2023 +0100 devlink: introduce a helper for netlink multicast send Introduce a helper devlink_nl_notify_send() so each object notification function does not have to call genlmsg_multicast_netns() with the same arguments. Signed-off-by: Jiri Pirko Signed-off-by: Paolo Abeni commit cddbff470e3318834af518168d3a917b6e975062 Author: Jiri Pirko Date: Sat Dec 16 13:29:55 2023 +0100 devlink: send notifications only if there are listeners Introduce devlink_nl_notify_need() helper and using it to check at the beginning of notification functions to avoid overhead of composing notification messages in case nobody listens. Signed-off-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 11280ddeae238e3ea27d153794472cfca5e8d121 Author: Jiri Pirko Date: Sat Dec 16 13:29:54 2023 +0100 devlink: introduce __devl_is_registered() helper and use it instead of xa_get_mark() Introduce __devl_is_registered() which does not assert on devlink instance lock and use it in notifications which may be called without devlink instance lock held. Signed-off-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 337ad364c48a0db7cedb5abb8d5e9163792fd596 Author: Jiri Pirko Date: Sat Dec 16 13:29:53 2023 +0100 devlink: use devl_is_registered() helper instead xa_get_mark() Instead of checking the xarray mark directly using xa_get_mark() helper use devl_is_registered() helper which wraps it up. Note that there are couple more users of xa_get_mark() left which are going to be handled by the next patch. Signed-off-by: Jiri Pirko Signed-off-by: Paolo Abeni commit 4e8daa792742635ea57c625098165eef64661901 Author: Mimi Zohar Date: Fri Dec 8 11:13:22 2023 -0500 MAINTAINERS: Add Eric Snowberg as a reviewer to IMA Digital signature based IMA-appraisal relies heavily on kernel keyrings. Eric Snowberg has been involved in adding the machine keyring to allow the system owner to add their own keys. With this addition, IMA-appraisal usage can be extended to allow loading local and 3rd party software keys onto the IMA keyring. Add Eric as a reviewer. Acked-by: Eric Snowberg Signed-off-by: Mimi Zohar commit bdd7c5a5afdfad7b92178bba518e6ff40191eb09 Author: Mimi Zohar Date: Thu Dec 7 08:38:12 2023 -0500 MAINTAINERS: Add Roberto Sassu as co-maintainer to IMA and EVM Roberto Sassu has been actively involved in IMA and EVM since 2011. His first major IMA contribution was IMA template support. He also contributed extending TPM 2.0 PCRs with properly calculated per TPM bank digests and included file metadata information in the IMA measurement list. Regarding EVM, Roberto contributed to making EVM portable and immutable signatures more usable. He also prepared the LSM infrastructure to support EVM as a fully fledged LSM, by ensuring that the latter receives from the former all xattrs provided by other registered LSMs at inode creation time, for HMAC calculation. Roberto is currently working on making IMA and EVM full fledged LSMs. Add Roberto as an IMA and EVM maintainer. Acked-by: Roberto Sassu Signed-off-by: Mimi Zohar commit 2130c519a401e576647040043cb46d6fdc361dcc Author: Jakub Kicinski Date: Mon Dec 18 15:19:04 2023 -0800 bpf: Use nla_ok() instead of checking nla_len directly nla_len may also be too short to be sane, in which case after recent changes nla_len() will return a wrapped value. Fixes: 172db56d90d2 ("netlink: Return unsigned value for nla_len()") Reported-by: syzbot+f43a23b6e622797c7a28@syzkaller.appspotmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Daniel Borkmann Reviewed-by: Simon Horman Link: https://lore.kernel.org/bpf/20231218231904.260440-1-kuba@kernel.org commit c13cf1991f4231d38f1c43fcf51ec1cf29c8c82d Author: Neil Armstrong Date: Tue Dec 19 14:23:37 2023 +0100 ASoC: dt-bindings: qcom,lpass-va-macro: remove spurious contains in if statement Remove this spurious "contains" which causes the bindings check of qcom,sm8450-lpass-va-macro compatible to fail with: codec@33f0000: clocks: [[156, 57, 1], [156, 102, 1], [156, 103, 1], [156, 70, 1]] is too long from schema $id: http://devicetree.org/schemas/sound/qcom,lpass-va-macro.yaml# codec@33f0000: clock-names: ['mclk', 'macro', 'dcodec', 'npl'] is too long from schema $id: http://devicetree.org/schemas/sound/qcom,lpass-va-macro.yaml# Seems the double "contains" was considered as valid by the tool but broke the entire if statements. Fixes: f243ef746d0a ("ASoC: dt-bindings: qcom,lpass-va-macro: Add SM8650 LPASS VA") Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231219-topic-sm8x50-upstream-va-macro-bindings-fix-v1-1-ae133886f70e@linaro.org Signed-off-by: Mark Brown commit 1b08e7697f1eef88de902820d181d5c4291f074c Author: Christophe JAILLET Date: Tue Dec 19 05:41:19 2023 +0100 ASoC: sprd: Simplify memory allocation in sprd_platform_compr_dma_config() 'sg' is freed at the end sprd_platform_compr_dma_config() both in the normal and in the error handling path. There is no need to use the devm_kcalloc()/devm_kfree(), kcalloc()/kfree() is enough. Signed-off-by: Christophe JAILLET Link: https://msgid.link/r/d16f22ae0627249a9fc658927832590cd88c544e.1702960856.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 55d7bbe433467a64ac82c41b4efd425aa24acdce Author: Venkata Prasad Potturu Date: Tue Dec 19 16:54:13 2023 +0530 ASoC: SOF: amd: Add acp-psp mailbox interface for iram-dram fence register modification Add acp-psp mailbox communication interface for iram-dram size modification to notify psp. Signed-off-by: Venkata Prasad Potturu Link: https://msgid.link/r/20231219112416.3334928-5-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit ced7151b9b0c74af1bc05ac4ad93648900709bb0 Author: Venkata Prasad Potturu Date: Tue Dec 19 16:54:12 2023 +0530 ASoC: SOF: Rename amd_bt sof_dai_type Rename amd_bt sof_dai_type from ACP to ACP_BT. Signed-off-by: Venkata Prasad Potturu Link: https://msgid.link/r/20231219112416.3334928-4-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit de111c9b521ddea4c7609155a617b5a0e93ad833 Author: Venkata Prasad Potturu Date: Tue Dec 19 16:54:11 2023 +0530 ASoC: SOF: Add i2s bt dai configuration support for AMD platforms Add support for i2s bt dai configuration from topology. Signed-off-by: Venkata Prasad Potturu Link: https://msgid.link/r/20231219112416.3334928-3-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 3953de2dbdcd0592aa7f877b67135a51e18f006a Author: Venkata Prasad Potturu Date: Tue Dec 19 16:54:10 2023 +0530 ASoC: SOF: Refactor sof_i2s_tokens reading to update acpbt dai Refactor sof_i2s_tokens reading to update config->acpbt. Signed-off-by: Venkata Prasad Potturu Link: https://msgid.link/r/20231219112416.3334928-2-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 802134c8c2c8889f7cc504ab1ba6ada9816ca969 Author: Venkata Prasad Potturu Date: Tue Dec 19 16:54:09 2023 +0530 ASoC: SOF: amd: Refactor spinlock_irq(&sdev->ipc_lock) sequence in irq_handler Refactor spinlock_irq(&sdev->ipc_lock) sequence in irq_handler to avoid race conditions for acquiring hw_semaphore. Signed-off-by: Venkata Prasad Potturu Link: https://msgid.link/r/20231219112416.3334928-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 624dda101e03c3a3a155d51e37a7bb7607cb760b Author: Veronika Molnarova Date: Tue Dec 12 17:59:08 2023 +0100 perf archive: Add new option '--all' to pack perf.data with DSOs 'perf archive' has limited functionality and people from Red Hat Global Support Services sent a request for a new feature that would pack perf.data file together with an archive with debug symbols created by the command 'perf archive' as customers were being confused and often would forget to send perf.data file with the debug symbols. With this patch 'perf archive' now accepts an option '--all' that generates archive 'perf.all-hostname-date-time.tar.bz2' that holds file 'perf.data' and a sub-tar 'perf.symbols.tar.bz2' with debug symbols. The functionality of the command 'perf archive' was not changed. Committer testing: Run 'perf record' on a Intel 14900K machine, hybrid: root@number:~# perf record -a sleep 5s [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 4.006 MB perf.data (15427 samples) ] root@number:~# perf archive --all Now please run: $ tar xvf perf.all-number-20231219-104854.tar.bz2 && tar xvf perf.symbols.tar.bz2 -C ~/.debug wherever you need to run 'perf report' on. root@number:~# root@number:~# perf report --header-only # ======== # captured on : Tue Dec 19 10:48:48 2023 # header version : 1 # data offset : 1008 # data size : 4199936 # feat offset : 4200944 # hostname : number # os release : 6.6.4-200.fc39.x86_64 # perf version : 6.7.rc6.gca90f8e17b84 # arch : x86_64 # nrcpus online : 28 # nrcpus avail : 28 # cpudesc : Intel(R) Core(TM) i7-14700K # cpuid : GenuineIntel,6,183,1 # total memory : 32610508 kB # cmdline : /home/acme/bin/perf (deleted) record -a sleep 5s # event : name = cpu_atom/cycles/P, , id = { 5088024, 5088025, 5088026, 5088027, 5088028, 5088029, 5088030, 5088031, 5088032, 5088033, 5088034, 5088035 }, type = 0 (PERF_TYPE_HARDWARE), size> # event : name = cpu_core/cycles/P, , id = { 5088036, 5088037, 5088038, 5088039, 5088040, 5088041, 5088042, 5088043, 5088044, 5088045, 5088046, 5088047, 5088048, 5088049, 5088050, 5088051 },> # event : name = dummy:u, , id = { 5088052, 5088053, 5088054, 5088055, 5088056, 5088057, 5088058, 5088059, 5088060, 5088061, 5088062, 5088063, 5088064, 5088065, 5088066, 5088067, 5088068, 50> # CPU_TOPOLOGY info available, use -I to display # NUMA_TOPOLOGY info available, use -I to display # pmu mappings: cpu_atom = 10, cpu_core = 4, breakpoint = 5, cstate_core = 34, cstate_pkg = 35, i915 = 14, intel_bts = 11, intel_pt = 12, kprobe = 8, msr = 13, power = 36, software = 1, trac> # CACHE info available, use -I to display # time of first sample : 124739.850375 # time of last sample : 124744.855181 # sample duration : 5004.806 ms # sample duration : 5004.806 ms # MEM_TOPOLOGY info available, use -I to display # bpf_prog_info 2: bpf_prog_7cc47bbf07148bfe_hid_tail_call addr 0xffffffffc0000978 size 113 # bpf_prog_info 47: bpf_prog_713a545fe0530ce7_restrict_filesystems addr 0xffffffffc0000748 size 305 # bpf_prog_info 163: bpf_prog_bd834b0730296056 addr 0xffffffffc000df14 size 331 # bpf_prog_info 258: bpf_prog_ee0e253c78993a24_sd_devices addr 0xffffffffc001fc08 size 264 # bpf_prog_info 259: bpf_prog_40ddf486530245f5_sd_devices addr 0xffffffffc00204bc size 318 # bpf_prog_info 260: bpf_prog_6deef7357e7b4530_sd_fw_egress addr 0xffffffffc0020630 size 63 # bpf_prog_info 261: bpf_prog_6deef7357e7b4530_sd_fw_ingress addr 0xffffffffc0020688 size 63 # bpf_prog_info 262: bpf_prog_b37200ab714f0e17_sd_devices addr 0xffffffffc002072c size 110 # bpf_prog_info 263: bpf_prog_b90a282ee45cfed9_sd_devices addr 0xffffffffc00207d8 size 393 # bpf_prog_info 264: bpf_prog_ee0e253c78993a24_sd_devices addr 0xffffffffc002099c size 264 # bpf_prog_info 265: bpf_prog_6deef7357e7b4530_sd_fw_egress addr 0xffffffffc0020ad4 size 63 # bpf_prog_info 266: bpf_prog_6deef7357e7b4530_sd_fw_ingress addr 0xffffffffc0020b50 size 63 # bpf_prog_info 267: bpf_prog_ee0e253c78993a24_sd_devices addr 0xffffffffc002d98c size 264 # bpf_prog_info 268: bpf_prog_be31ae23198a0378_sd_devices addr 0xffffffffc002dac8 size 297 # bpf_prog_info 269: bpf_prog_ccbbf91f3c6979c7_sd_devices addr 0xffffffffc002dc54 size 360 # bpf_prog_info 270: bpf_prog_3a0ef5414c2f6fca_sd_devices addr 0xffffffffc002dde8 size 456 # bpf_prog_info 271: bpf_prog_6deef7357e7b4530_sd_fw_egress addr 0xffffffffc0020bd4 size 63 # bpf_prog_info 272: bpf_prog_6deef7357e7b4530_sd_fw_ingress addr 0xffffffffc00299b4 size 63 # bpf_prog_info 273: bpf_prog_ee0e253c78993a24_sd_devices addr 0xffffffffc002dfd0 size 264 # bpf_prog_info 274: bpf_prog_6deef7357e7b4530_sd_fw_egress addr 0xffffffffc0029a3c size 63 # bpf_prog_info 275: bpf_prog_6deef7357e7b4530_sd_fw_ingress addr 0xffffffffc002d71c size 63 # bpf_prog_info 276: bpf_prog_6deef7357e7b4530_sd_fw_egress addr 0xffffffffc002d7a8 size 63 # bpf_prog_info 277: bpf_prog_6deef7357e7b4530_sd_fw_ingress addr 0xffffffffc002e13c size 63 # bpf_prog_info 278: bpf_prog_6deef7357e7b4530_sd_fw_egress addr 0xffffffffc002e1a8 size 63 # bpf_prog_info 279: bpf_prog_6deef7357e7b4530_sd_fw_ingress addr 0xffffffffc002e234 size 63 # bpf_prog_info 280: bpf_prog_be31ae23198a0378_sd_devices addr 0xffffffffc002e2ac size 297 # bpf_prog_info 281: bpf_prog_6deef7357e7b4530_sd_fw_egress addr 0xffffffffc002e42c size 63 # bpf_prog_info 282: bpf_prog_6deef7357e7b4530_sd_fw_ingress addr 0xffffffffc002e49c size 63 # bpf_prog_info 290: bpf_prog_ee0e253c78993a24_sd_devices addr 0xffffffffc0004b18 size 264 # bpf_prog_info 294: bpf_prog_0b1566e4b83190c5_sd_devices addr 0xffffffffc0004c50 size 360 # bpf_prog_info 295: bpf_prog_ee0e253c78993a24_sd_devices addr 0xffffffffc001cfc8 size 264 # bpf_prog_info 296: bpf_prog_6deef7357e7b4530_sd_fw_egress addr 0xffffffffc0013abc size 63 # bpf_prog_info 297: bpf_prog_6deef7357e7b4530_sd_fw_ingress addr 0xffffffffc0013b24 size 63 # btf info of id 2 # btf info of id 52 # HYBRID_TOPOLOGY info available, use -I to display # cpu_atom pmu capabilities: branches=32, max_precise=3, pmu_name=alderlake_hybrid # cpu_core pmu capabilities: branches=32, max_precise=3, pmu_name=alderlake_hybrid # intel_pt pmu capabilities: topa_multiple_entries=1, psb_cyc=1, single_range_output=1, mtc_periods=249, ip_filtering=1, output_subsys=0, cr3_filtering=1, psb_periods=3f, event_trace=0, cycl> # missing features: TRACING_DATA BRANCH_STACK GROUP_DESC AUXTRACE STAT CLOCKID DIR_FORMAT COMPRESSED CPU_PMU_CAPS CLOCK_DATA # ======== # root@number:~# And then transferring it to a ARM64 machine, a Libre Computer RK3399-PC: root@number:~# scp perf.all-number-20231219-104854.tar.bz2 acme@192.168.86.114:. acme@192.168.86.114's password: perf.all-number-20231219-104854.tar.bz2 100% 145MB 85.4MB/s 00:01 root@number:~# root@number:~# ssh acme@192.168.86.114 acme@192.168.86.114's password: Welcome to Ubuntu 23.04 (GNU/Linux 6.1.68-12200-g1c40dda3081e aarch64) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage Last login: Tue Dec 19 14:53:18 2023 from 192.168.86.42 acme@roc-rk3399-pc:~$ tar xvf perf.all-number-20231219-104854.tar.bz2 && tar xvf perf.symbols.tar.bz2 -C ~/.debug perf.data perf.symbols.tar.bz2 .build-id/ad/acc227f470409213308050b71f664322e2956c [kernel.kallsyms]/adacc227f470409213308050b71f664322e2956c/ [kernel.kallsyms]/adacc227f470409213308050b71f664322e2956c/kallsyms [kernel.kallsyms]/adacc227f470409213308050b71f664322e2956c/probes .build-id/76/c91f4d62baa06bb52e07e20aba36d21a8f9797 usr/lib64/libz.so.1.2.13/76c91f4d62baa06bb52e07e20aba36d21a8f9797/ .build-id/09/d7e96bc1e3f599d15ca28b36959124b2d74410 usr/lib64/librpm_sequoia.so.1/09d7e96bc1e3f599d15ca28b36959124b2d74410/ usr/lib64/librpm_sequoia.so.1/09d7e96bc1e3f599d15ca28b36959124b2d74410/elf usr/lib64/librpm_sequoia.so.1/09d7e96bc1e3f599d15ca28b36959124b2d74410/probes acme@roc-rk3399-pc:~$ acme@roc-rk3399-pc:~$ perf report --stdio | head -40 # To display the perf.data header info, please use --header/--header-only options. # # Total Lost Samples: 0 # # Samples: 6K of event 'cpu_atom/cycles/P' # Event count (approx.): 4519946621 # # Overhead Command Shared Object Symbol # ........ ............... .............................................. ......................................................................................................................................................... # 1.73% swapper [kernel.kallsyms] [k] intel_idle 1.43% sh [kernel.kallsyms] [k] next_uptodate_folio 0.94% make ld-linux-x86-64.so.2 [.] do_lookup_x 0.90% sh ld-linux-x86-64.so.2 [.] do_lookup_x 0.82% sh [kernel.kallsyms] [k] perf_event_mmap_output 0.74% sh [kernel.kallsyms] [k] filemap_map_pages 0.72% sh ld-linux-x86-64.so.2 [.] _dl_relocate_object 0.69% cc1 [kernel.kallsyms] [k] clear_page_erms 0.61% sh [kernel.kallsyms] [k] unmap_page_range 0.56% swapper [kernel.kallsyms] [k] poll_idle 0.52% cc1 ld-linux-x86-64.so.2 [.] do_lookup_x 0.47% make ld-linux-x86-64.so.2 [.] _dl_relocate_object 0.44% cc1 cc1 [.] make_node(tree_code) 0.43% sh [kernel.kallsyms] [k] native_irq_return_iret 0.38% sh libc.so.6 [.] _int_malloc 0.38% cc1 cc1 [.] decl_attributes(tree_node**, tree_node*, int, tree_node*) 0.38% sh [kernel.kallsyms] [k] clear_page_erms 0.37% cc1 cc1 [.] ht_lookup_with_hash(ht*, unsigned char const*, unsigned long, unsigned int, ht_lookup_option) 0.37% make [kernel.kallsyms] [k] perf_event_mmap_output 0.37% make ld-linux-x86-64.so.2 [.] _dl_lookup_symbol_x 0.35% sh [kernel.kallsyms] [k] _compound_head 0.35% make make [.] hash_find_slot 0.33% sh libc.so.6 [.] __strlen_avx2 0.33% cc1 cc1 [.] ggc_internal_alloc(unsigned long, void (*)(void*), unsigned long, unsigned long) 0.33% sh [kernel.kallsyms] [k] perf_iterate_ctx 0.31% make make [.] jhash_string 0.31% sh [kernel.kallsyms] [k] page_remove_rmap 0.30% cc1 libc.so.6 [.] _int_malloc 0.30% make libc.so.6 [.] _int_malloc acme@roc-rk3399-pc:~$ Signed-off-by: Veronika Molnarova Tested-by: Arnaldo Carvalho de Melo Cc: Michael Petlan Link: https://lore.kernel.org/r/20231212165909.14459-1-vmolnaro@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit bb57f6705960bebeb832142ce9abf43220c3eab1 Author: Ashish Mhetre Date: Tue Dec 5 12:26:56 2023 +0530 iommu: Don't reserve 0-length IOVA region When the bootloader/firmware doesn't setup the framebuffers, their address and size are 0 in "iommu-addresses" property. If IOVA region is reserved with 0 length, then it ends up corrupting the IOVA rbtree with an entry which has pfn_hi < pfn_lo. If we intend to use display driver in kernel without framebuffer then it's causing the display IOMMU mappings to fail as entire valid IOVA space is reserved when address and length are passed as 0. An ideal solution would be firmware removing the "iommu-addresses" property and corresponding "memory-region" if display is not present. But the kernel should be able to handle this by checking for size of IOVA region and skipping the IOVA reservation if size is 0. Also, add a warning if firmware is requesting 0-length IOVA region reservation. Fixes: a5bf3cfce8cb ("iommu: Implement of_iommu_get_resv_regions()") Signed-off-by: Ashish Mhetre Acked-by: Robin Murphy Link: https://lore.kernel.org/r/20231205065656.9544-1-amhetre@nvidia.com Signed-off-by: Joerg Roedel commit 80b79e141da7251d6ea82573f058ee9418896465 Author: Lu Baolu Date: Mon Dec 18 15:34:45 2023 +0800 iommu/vt-d: Move inline helpers to header files Move inline helpers to header files so that other files can use them without duplicating the code. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20231116015048.29675-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit d2b66903464ec29e54ac0991fa43c0da2c2a4892 Author: Lu Baolu Date: Mon Dec 18 15:34:44 2023 +0800 iommu/vt-d: Remove unused vcmd interfaces Commit 99b5726b4423 ("iommu: Remove ioasid infrastructure") has removed ioasid allocation interfaces from the iommu subsystem. As a result, these vcmd interfaces have become obsolete. Remove them to avoid dead code. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20231116015048.29675-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 47642bdd5a25cd46228221719af2902b583bd36c Author: Lu Baolu Date: Mon Dec 18 15:34:43 2023 +0800 iommu/vt-d: Remove unused parameter of intel_pasid_setup_pass_through() The domain parameter of this helper is unused and can be deleted to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20231116015048.29675-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 1903ef8f0d77680e6eb36bd0cc3ea3aa6e95a050 Author: Lu Baolu Date: Mon Dec 18 15:34:42 2023 +0800 iommu/vt-d: Refactor device_to_iommu() to retrieve iommu directly The device_to_iommu() helper was originally designed to look up the DMAR ACPI table to retrieve the iommu device and the request ID for a given device. However, it was also being used in other places where there was no need to lookup the ACPI table at all. Retrieve the iommu device directly from the per-device iommu private data in functions called after device is probed. Rename the original device_to_iommu() function to a more meaningful name, device_lookup_iommu(), to avoid mis-using it. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20231116015048.29675-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 933a2a376fb3f22ba4774f74233571504ac56b02 Author: Stephen Rothwell Date: Tue Dec 19 14:57:34 2023 +1100 drm: using mul_u32_u32() requires linux/math64.h Some pending include file cleanups produced this error: In file included from include/linux/kernel.h:27, from drivers/gpu/ipu-v3/ipu-dp.c:7: include/drm/drm_color_mgmt.h: In function 'drm_color_lut_extract': include/drm/drm_color_mgmt.h:45:46: error: implicit declaration of function 'mul_u32_u32' [-Werror=implicit-function-declaration] 45 | return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(user_input, (1 << bit_precision) - 1), | ^~~~~~~~~~~ Fixes: c6fbb6bca108 ("drm: Fix color LUT rounding") Signed-off-by: Stephen Rothwell Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231219145734.13e40e1e@canb.auug.org.au commit d939c02359a656a624d03c6f14ccadae4a1c66ac Author: Johan Hovold Date: Tue Dec 19 08:57:49 2023 +0100 dt-bindings: regulator: qcom,usb-vbus-regulator: clean up example Devicetree node names should be generic; fix up the qcom,usb-vbus-regulator binding example accordingly. While at it, drop an unnecessary label and add a newline separator before the child node to improve readability. Signed-off-by: Johan Hovold Link: https://msgid.link/r/20231219075749.25308-1-johan+linaro@kernel.org Signed-off-by: Mark Brown commit 13f58267cda3d6946c8f4de368ad5d4a003baa61 Author: Kuninori Morimoto Date: Tue Dec 19 05:10:33 2023 +0000 ASoC: soc.h: don't create dummy Component via COMP_DUMMY() Many ASoC drivers define CPU/Codec/Platform dai_link by below macro. SND_SOC_DAILINK_DEFS(link, (A) DAILINK_COMP_ARRAY(COMP_CPU("cpu_dai")), (B) DAILINK_COMP_ARRAY(COMP_CODEC("codec", "dai1"), (B) COMP_CODEC("codec", "dai2")), (C) DAILINK_COMP_ARRAY(COMP_EMPTY())); In this case, this macro will be converted to like below [o] = static struct snd_soc_dai_link_component (A) [o] link_cpus[] = {{ .dai_name = "cpu_dai" }}; (B) [o] link_codecs[] = {{ .dai_name = "dai1", .name = "codec" }, { .dai_name = "dai2", .name = "codec" }} (C) [o] link_platforms[] = {{ }}; CPU and Codec info will be filled by COMP_CPU() / COMP_CODEC (= A,B), and Platform will have empty data by COMP_EMPTY() (= C) in this case. Platform empty info will be filled when driver probe() (most of case, CPU info will be copied to use soc-generic-dmaengine-pcm). For example in case of DPCM FE/BE, it will be like below. Codec will be dummy Component / DAI in this case (X). SND_SOC_DAILINK_DEFS(link, DAILINK_COMP_ARRAY(COMP_CPU(...)), (X) DAILINK_COMP_ARRAY(COMP_DUMMY()), DAILINK_COMP_ARRAY(COMP_EMPTY())); (X) part will converted like below [o] link_codecs[] = {{ .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", }} Even though we already have common asoc_dummy_dlc for dummy Component / DAI, this macro will re-create new dummy dlc. Some drivers defines many dai_link info via SND_SOC_DAILINK_DEFS(), this means many dummy dlc also will be re-created. This is waste of memory. If we can use existing common asoc_dummy_dlc at (X), we can avoid to re-creating dummy dlc, then, we can save the memory. At that time, we want to keep existing code as much as possible, because too many drivers are using this macro. But because of its original style, using common asoc_dummy_dlc from it is very difficult or impossible. So let's change the mind. The macro is used like below SND_SOC_DAILINK_DEFS(link, DAILINK_COMP_ARRAY(COMP_CPU(...)), (x) DAILINK_COMP_ARRAY(COMP_DUMMY()), DAILINK_COMP_ARRAY(COMP_EMPTY())); static struct snd_soc_dai_link dai_links[] = { { .name = ..., .stream_name = ..., (y) SND_SOC_DAILINK_REG(link), }, (y) part will be like below static struct snd_soc_dai_link dai_links[] = { { .name = ..., .stream_name = ..., ^ ... | .codecs = link_codecs, (y) .num_codecs = ARRAY_SIZE(link_codecs), v ... } This patch try to use trick on COMP_DUMMY() - #define COMP_DUMMY() { .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", } + #define COMP_DUMMY() By this tric, (x) part will be like below. before [o] link_codecs[] = {{ .name = "snd-soc-dummy", .dai_name = "snd-soc-dummy-dai", }} after [o] link_codecs[] = { }; This is same as below [o] link_codecs[0]; This means it has pointer (link_codecs), but the array size is 0. (y) part will be like below. static struct snd_soc_dai_link dai_links[] = { { ... .codecs = link_codecs, .num_codecs = 0, ... }, This is very special settings that normal use usually not do, but new macro do. We can find this special settings on soc-core.c and fill it as "dummy DAI" (= asoc_dummy_dlc). By this tric, we can avoid to re-create dummy dlc and save the memory. This patch add tric at COMP_DUMMY() and add snd_soc_fill_dummy_dai() to fill dummy DAI. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/871qbi93qu.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e8776ff9ce9f5a8a9d8294101fd2924cebdd2da1 Author: Kuninori Morimoto Date: Tue Dec 19 05:10:19 2023 +0000 ASoC: sof: use snd_soc_dummy_dlc We already have snd_soc_dummy_dlc. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/8734vy93r8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c2dfe29f30d8850af324449f416491b171af19aa Author: Kuninori Morimoto Date: Tue Dec 19 05:10:09 2023 +0000 ASoC: intel: hdaudio.c: use snd_soc_dummy_dlc We already have snd_soc_dummy_dlc. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/874jge93ri.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 56558d6ab8c09c416bdb6d72b7e02894539a882a Author: Kuninori Morimoto Date: Tue Dec 19 05:10:02 2023 +0000 ASoC: samsung: odroid: don't need DUMMY Platform We can use SND_SOC_DAILINK_REG() with 2 parameter. DUMMY Platform is not needed. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/875y0u93rq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7465582e0b18859d3681192ec2ccf22a81370040 Author: Kuninori Morimoto Date: Tue Dec 19 05:09:53 2023 +0000 ASoC: fsl: fsl-asoc-card: don't need DUMMY Platform We can use SND_SOC_DAILINK_REG() with 2 parameter. DUMMY Platform is not needed. Signed-off-by: Kuninori Morimoto Link: https://msgid.link/r/877cla93ry.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f50345b49b16f7fe6dbebbec065b9248c38556ff Author: Steven Rostedt (Google) Date: Tue Dec 19 07:47:32 2023 -0500 ring-buffer: Check if absolute timestamp goes backwards The check_buffer() which checks the timestamps of the ring buffer sub-buffer page, when enabled, only checks if the adding of deltas of the events from the last absolute timestamp or the timestamp of the sub-buffer page adds up to the current event. What it does not check is if the absolute timestamp causes the time of the events to go backwards, as that can cause issues elsewhere. Test for the timestamp going backwards too. This also fixes a slight issue where if the warning triggers at boot up (because of the resetting of the tsc), it will disable all further checks, even those that are after boot Have it continue checking if the warning was ignored during boot up. Link: https://lore.kernel.org/linux-trace-kernel/20231219074732.18b092d4@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Signed-off-by: Steven Rostedt (Google) commit d40dbb617ae9a8fe57343b26b4ad2bd7bb05c130 Author: Steven Rostedt (Google) Date: Tue Dec 19 07:45:42 2023 -0500 ring-buffer: Add interrupt information to dump of data sub-buffer When the ring buffer timestamp verifier triggers, it dumps the content of the sub-buffer. But currently it only dumps the timestamps and the offset of the data as well as the deltas. It would be even more informative if the event data also showed the interrupt context level it was in. That is, if each event showed that the event was written in normal, softirq, irq or NMI context. Then a better idea about how the events may have been interrupted from each other. As the payload of the ring buffer is really a black box of the ring buffer, just assume that if the payload is larger than a trace entry, that it is a trace entry. As trace entries have the interrupt context information saved in a flags field, look at that location and report the output of the flags. If the payload is not a trace entry, there's no way to really know, and the information will be garbage. But that's OK, because this is for debugging only (this output is not used in production as the buffer check that calls it causes a huge overhead to the tracing). This information, when available, is crucial for debugging timestamp issues. If it's garbage, it will also be pretty obvious that its garbage too. As this output usually happens in kselftests of the tracing code, the user will know what the payload is at the time. Link: https://lore.kernel.org/linux-trace-kernel/20231219074542.6f304601@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Suggested-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (Google) commit c84897c0ff5925090af0c6a8bf61424b71481764 Author: Steven Rostedt (Google) Date: Tue Dec 19 07:43:03 2023 -0500 ring-buffer: Remove 32bit timestamp logic Each event has a 27 bit timestamp delta that is used to hold the delta from the last event. If the time between events is greater than 2^27, then a timestamp is added that holds a 59 bit absolute timestamp. Until a389d86f7fd09 ("ring-buffer: Have nested events still record running time stamp"), if an interrupt interrupted an event in progress, all the events delta would be zero to not deal with the races that need to be handled. The commit a389d86f7fd09 changed that to handle the races giving all events, even those that preempt other events, still have an accurate timestamp. To handle those races requires performing 64-bit cmpxchg on the timestamps. But doing 64-bit cmpxchg on 32-bit architectures is considered very slow. To try to deal with this the timestamp logic was broken into two and then three 32-bit cmpxchgs, with the thought that two (or three) 32-bit cmpxchgs are still faster than a single 64-bit cmpxchg on 32-bit architectures. Part of the problem with this is that I didn't have any 32-bit architectures to test on. After hitting several subtle bugs in this code, an effort was made to try and see if three 32-bit cmpxchgs are indeed faster than a single 64-bit. After a few people brushed off the dust of their old 32-bit machines, tests were done, and even though 32-bit cmpxchg was faster than a single 64-bit, it was in the order of 50% at best, not 300%. After some more refactoring of the code, all 4 64-bit cmpxchg were removed: https://lore.kernel.org/linux-trace-kernel/20231211114420.36dde01b@gandalf.local.home https://lore.kernel.org/linux-trace-kernel/20231214222921.193037a7@gandalf.local.home https://lore.kernel.org/linux-trace-kernel/20231215081810.1f4f38fe@rorschach.local.home https://lore.kernel.org/linux-trace-kernel/20231218230712.3a76b081@gandalf.local.home/ With all the 64-bit cmpxchg removed, the complex 32-bit workaround can also be removed. The 32-bit and 64-bit logic is now exactly the same. Link: https://lore.kernel.org/all/20231213214632.15047c40@gandalf.local.home/ Link: https://lore.kernel.org/linux-trace-kernel/20231219074303.28f9abda@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Linus Torvalds Signed-off-by: Steven Rostedt (Google) commit 3bf7009251f0f41cdd0188ab7b3879df81810703 Author: Steven Rostedt (Google) Date: Wed Dec 13 11:15:27 2023 -0500 tracing/selftests: Add test to test the trace_marker Add a test that writes longs strings, some over the size of the sub buffer and make sure that the entire content is there. Link: https://lore.kernel.org/linux-trace-kernel/20231213111527.6a4c9b58@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Acked-by: Shuah Khan Signed-off-by: Steven Rostedt (Google) commit 9bd9fbd9032a3b7e9ea916d6e58ba0116e0621be Author: Christophe JAILLET Date: Tue Dec 19 06:00:39 2023 +0100 ipmi: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Message-Id: Signed-off-by: Corey Minyard commit 242c6fd473a6a74eac4d4002be715a0d0dede036 Author: Emilio Perez Date: Wed Nov 22 20:34:28 2023 +0000 ipmi: Use regspacings passed as a module parameter regspacings parameter is currently ignored and the platform data uses a default value of 0, this has been fixed by setting the appropriate field in the platform data. Fixes: 3cd83bac481d ("ipmi: Consolidate the adding of platform devices") Signed-off-by: Emilio Perez Message-Id: <20231122203433.443098-1-emiliopeju@gmail.com> Signed-off-by: Corey Minyard commit 5be50eb5ae99d890cc22ab49753330cce8731599 Author: Rob Herring Date: Wed Nov 15 15:02:29 2023 -0600 ipmi: si: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Message-Id: <20231115210230.3744198-1-robh@kernel.org> Signed-off-by: Corey Minyard commit 88a2b4edda3d0709727be53f4423b0b832d91de3 Author: Arnd Bergmann Date: Mon Dec 4 09:47:02 2023 +0100 x86/Kconfig: Rework CONFIG_X86_PAE dependency While looking at a Xen Kconfig dependency issue, I tried to understand the exact dependencies for CONFIG_X86_PAE, which is selected by CONFIG_HIGHMEM64G but can also be enabled manually. Apparently the dependencies for CONFIG_HIGHMEM64G are strictly about CPUs that do support PAE, but the actual feature can be incorrectly enabled on older CPUs as well. The CONFIG_X86_CMPXCHG64 dependencies on the other hand include X86_PAE because cmpxchg8b is requried for PAE to work. Rework this for readability and correctness, using a positive list of CPUs that support PAE in a new X86_HAVE_PAE symbol that can serve as a dependency for both X86_PAE and HIGHMEM64G as well as simplify the X86_CMPXCHG64 dependency list. Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231204084722.3789473-2-arnd@kernel.org commit f7dd48ea76be30666f0614d6a06061185ed38c60 Merge: c49b292d031e3 4ebb86a97ceb9 Author: Paolo Abeni Date: Tue Dec 19 12:00:55 2023 +0100 Merge branch 'add-pf-vf-mailbox-support' Shinas Rasheed says: ==================== add PF-VF mailbox support This patchset aims to add PF-VF mailbox support, its related version support, and relevant control net support for immediate functionalities such as firmware notifications to VF. Changes: V6: - Fixed 1/4 patch to apply to top of net-next merged with net fixes V5: https://lore.kernel.org/all/20231214164536.2670006-1-srasheed@marvell.com/ - Refactored patches to cut out redundant changes in 1/4 patch. V4: https://lore.kernel.org/all/20231213035816.2656851-1-srasheed@marvell.com/ - Included tag [1/4] in subject of first patch of series which was lost in V3 V3: https://lore.kernel.org/all/20231211063355.2630028-1-srasheed@marvell.com/ - Corrected error cleanup logic for PF-VF mbox setup - Removed double inclusion of types.h header file in octep_pfvf_mbox.c V2: https://lore.kernel.org/all/20231209081450.2613561-1-srasheed@marvell.com/ - Removed unused variable in PATCH 1/4 V1: https://lore.kernel.org/all/20231208070352.2606192-1-srasheed@marvell.com/ ==================== Link: https://lore.kernel.org/r/20231215181425.2681426-1-srasheed@marvell.com Signed-off-by: Paolo Abeni commit 4ebb86a97ceb948b32cbeafb598617a6c8748376 Author: Shinas Rasheed Date: Fri Dec 15 10:14:25 2023 -0800 octeon_ep: support firmware notifications for VFs Notifications from firmware to vf has to pass through PF control mbox and via PF-VF mailboxes. The notifications have to be parsed out from the control mbox and passed to the PF-VF mailbox in order to reach the corresponding VF. Version compatibility should also be checked before messages are passed to the mailboxes. Signed-off-by: Shinas Rasheed Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit e28db8cbeba3a55dfaf43554d2c2ce05da6f4a04 Author: Shinas Rasheed Date: Fri Dec 15 10:14:24 2023 -0800 octeon_ep: control net framework to support VF offloads Inquire firmware on supported offloads, as well as convey offloads enabled dynamically to firmware for the VFs. Implement control net API to support the same. Signed-off-by: Shinas Rasheed Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit c130e589d50bbf43eb77d45b806b38cf95e2bad9 Author: Shinas Rasheed Date: Fri Dec 15 10:14:23 2023 -0800 octeon_ep: PF-VF mailbox version support Add PF-VF mailbox initial version support Signed-off-by: Shinas Rasheed Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit cde29af9e68e757824821d290842fbceeae11f88 Author: Shinas Rasheed Date: Fri Dec 15 10:14:22 2023 -0800 octeon_ep: add PF-VF mailbox communication Implement mailbox communication between PF and VFs. PF-VF mailbox is used for all control commands from VF to PF and asynchronous notification messages from PF to VF. Signed-off-by: Shinas Rasheed Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit 9ec1d7486e2520b4898d7f8e1ec3acc7c13c8dc8 Author: David Heidelberg Date: Tue Dec 12 19:44:58 2023 +0100 powerpc/fsl: Fix fsl,tmu-calibration to match the schema fsl,tmu-calibration is defined as a u32 matrix in Documentation/devicetree/bindings/thermal/qoriq-thermal.yaml. Use matching property syntax. No functional changes. Signed-off-by: David Heidelberg Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212184515.82886-2-david@ixit.cz commit 174a0c565cea74a7811ff79fbee1b70247570ade Author: Wang Yao Date: Tue Dec 19 17:14:05 2023 +0800 efi/loongarch: Directly position the loaded image file The use of the 'kernel_offset' variable to position the image file that has been loaded by UEFI or GRUB is unnecessary, because we can directly position the loaded image file through using the image_base field of the efi_loaded_image struct provided by UEFI. Replace kernel_offset with image_base to position the image file that has been loaded by UEFI or GRUB. Signed-off-by: Wang Yao Signed-off-by: Ard Biesheuvel commit a42da7f0f94eaac5beae0da7da51ce9c30352b7e Merge: 94f7f6182c72b 50d7cdf7a9b1a Author: Ard Biesheuvel Date: Tue Dec 19 11:11:12 2023 +0100 Merge branch 'efi/urgent' into efi/next commit d016264d0765e57747c927881cb135fa74df1236 Merge: 53d5486114ae2 fedc612314acf Author: Marc Zyngier Date: Tue Dec 19 10:06:58 2023 +0000 Merge branch kvm-arm64/nv-6.8-prefix into kvmarm-master/next * kvm-arm64/nv-6.8-prefix: : . : Nested Virtualization support update, focussing on the : NV2 support (VNCR mapping and such). : . KVM: arm64: nv: Handle virtual EL2 registers in vcpu_read/write_sys_reg() KVM: arm64: nv: Map VNCR-capable registers to a separate page KVM: arm64: nv: Add EL2_REG_VNCR()/EL2_REG_REDIR() sysreg helpers KVM: arm64: Introduce a bad_trap() primitive for unexpected trap handling KVM: arm64: nv: Add include containing the VNCR_EL2 offsets KVM: arm64: nv: Add non-VHE-EL2->EL1 translation helpers KVM: arm64: nv: Drop EL12 register traps that are redirected to VNCR KVM: arm64: nv: Compute NV view of idregs as a one-off KVM: arm64: nv: Hoist vcpu_has_nv() into is_hyp_ctxt() arm64: cpufeatures: Restrict NV support to FEAT_NV2 Signed-off-by: Marc Zyngier commit 9a802ddb2123e5adec394d35cd539cc0b15bc830 Author: Mark Brown Date: Mon Dec 18 23:39:32 2023 +0000 kselftest/arm64: Don't probe the current VL for unsupported vector types The vec-syscfg selftest verifies that setting the VL of the currently tested vector type does not disrupt the VL of the other vector type. To do this it records the current vector length for each type but neglects to guard this with a check for that vector type actually being supported. Add one, using a helper function which we also update all the other instances of this pattern. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231218-kselftest-arm64-vec-syscfg-rdvl-v1-1-0ac22d47e81f@kernel.org Signed-off-by: Will Deacon commit fedc612314acfebf506e071bf3a941076aa56d10 Author: Marc Zyngier Date: Sat Dec 17 13:28:40 2022 +0000 KVM: arm64: nv: Handle virtual EL2 registers in vcpu_read/write_sys_reg() KVM internally uses accessor functions when reading or writing the guest's system registers. This takes care of accessing either the stored copy or using the "live" EL1 system registers when the host uses VHE. With the introduction of virtual EL2 we add a bunch of EL2 system registers, which now must also be taken care of: - If the guest is running in vEL2, and we access an EL1 sysreg, we must revert to the stored version of that, and not use the CPU's copy. - If the guest is running in vEL1, and we access an EL2 sysreg, we must also use the stored version, since the CPU carries the EL1 copy. - Some EL2 system registers are supposed to affect the current execution of the system, so we need to put them into their respective EL1 counterparts. For this we need to define a mapping between the two. - Some EL2 system registers have a different format than their EL1 counterpart, so we need to translate them before writing them to the CPU. This is done using an (optional) translate function in the map. All of these cases are now wrapped into the existing accessor functions, so KVM users wouldn't need to care whether they access EL2 or EL1 registers and also which state the guest is in. Reviewed-by: Ganapatrao Kulkarni Reviewed-by: Alexandru Elisei Reviewed-by: Russell King (Oracle) Reviewed-by: Oliver Upton Co-developed-by: Andre Przywara Signed-off-by: Andre Przywara Signed-off-by: Marc Zyngier commit d8bd48e3f0ee9e1fdba2a2e453155a5354e48a8d Author: Marc Zyngier Date: Wed Jun 26 19:59:56 2019 +0100 KVM: arm64: nv: Map VNCR-capable registers to a separate page With ARMv8.4-NV, registers that can be directly accessed in memory by the guest have to live at architected offsets in a special page. Let's annotate the sysreg enum to reflect the offset at which they are in this page, whith a little twist: If running on HW that doesn't have the ARMv8.4-NV feature, or even a VM that doesn't use NV, we store all the system registers in the usual sys_regs array. The only difference with the pre-8.4 situation is that VNCR-capable registers are at a "similar" offset as in the VNCR page (we can compute the actual offset at compile time), and that the sys_regs array is both bigger and sparse. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 97ba4416d6dd53c4202038ee7d86dfb29774e00f Author: Masahiro Yamada Date: Mon Dec 18 17:01:27 2023 +0900 efi/libstub: zboot: do not use $(shell ...) in cmd_copy_and_pad You do not need to use $(shell ...) in recipe lines, as they are already executed in a shell. An alternative solution is $$(...), which is an escaped sequence of the shell's command substituion, $(...). For this case, there is a reason to avoid $(shell ...). Kbuild detects command changes by using the if_changed macro, which compares the previous command recorded in .*.cmd with the current command from Makefile. If they differ, Kbuild re-runs the build rule. To diff the commands, Make must expand $(shell ...) first. It means that hexdump is executed every time, even when nothing needs rebuilding. If Kbuild determines that vmlinux.bin needs rebuilding, hexdump will be executed again to evaluate the 'cmd' macro, one more time to really build vmlinux.bin, and finally yet again to record the expanded command into .*.cmd. Replace $(shell ...) with $$(...) to avoid multiple, unnecessay shell evaluations. Since Make is agnostic about the shell code, $(...), the if_changed macro compares the string "$(hexdump -s16 -n4 ...)" verbatim, so hexdump is run only for building vmlinux.bin. For the same reason, $(shell ...) in EFI_ZBOOT_OBJCOPY_FLAGS should be eliminated. While I was here, I replaced '&&' with ';' because a command for if_changed is executed with 'set -e'. Signed-off-by: Masahiro Yamada Reviewed-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20231218080127.907460-1-masahiroy@kernel.org Signed-off-by: Will Deacon commit 9b9cce60be85e6807bdb0eaa2f520e78dbab0659 Author: Marc Zyngier Date: Tue Nov 7 09:02:10 2023 +0000 KVM: arm64: nv: Add EL2_REG_VNCR()/EL2_REG_REDIR() sysreg helpers Add two helpers to deal with EL2 registers are are either redirected to the VNCR page, or that are redirected to their EL1 counterpart. In either cases, no trap is expected. THe relevant register descriptors are repainted accordingly. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 2733dd10701abc6ab23d65a732f58fbeb80bd203 Author: Marc Zyngier Date: Mon Nov 6 16:42:13 2023 +0000 KVM: arm64: Introduce a bad_trap() primitive for unexpected trap handling In order to ease the debugging of NV, it is helpful to have the kernel shout at you when an unexpected trap is handled. We already have this in a couple of cases. Make this a more generic infrastructure that we will make use of very shortly. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 60ce16cc122aad999129d23061fa35f63d5b1e9b Author: Marc Zyngier Date: Fri Jun 21 13:54:37 2019 +0100 KVM: arm64: nv: Add include containing the VNCR_EL2 offsets VNCR_EL2 points to a page containing a number of system registers accessed by a guest hypervisor when ARMv8.4-NV is enabled. Let's document the offsets in that page, as we are going to use this layout. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 3606e0b2e462164bced151dbb54ccfe42ac6c35b Author: Marc Zyngier Date: Sun Dec 25 10:49:48 2016 -0500 KVM: arm64: nv: Add non-VHE-EL2->EL1 translation helpers Some EL2 system registers immediately affect the current execution of the system, so we need to use their respective EL1 counterparts. For this we need to define a mapping between the two. In general, this only affects non-VHE guest hypervisors, as VHE system registers are compatible with the EL1 counterparts. These helpers will get used in subsequent patches. Reviewed-by: Oliver Upton Co-developed-by: Andre Przywara Signed-off-by: Andre Przywara Signed-off-by: Marc Zyngier commit 4d4f52052ba8357f1591cb9bc3086541070711af Author: Marc Zyngier Date: Wed Nov 8 19:10:12 2023 +0000 KVM: arm64: nv: Drop EL12 register traps that are redirected to VNCR With FEAT_NV2, a bunch of system register writes are turned into memory writes. This is specially the fate of the EL12 registers that the guest hypervisor manipulates out of context. Remove the trap descriptors for those, as they are never going to be used again. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 3ed0b5123cd5a2a4f1fe4e594e7bf319e9eaf1da Author: Marc Zyngier Date: Sun Nov 12 21:05:14 2023 +0000 KVM: arm64: nv: Compute NV view of idregs as a one-off Now that we have a full copy of the idregs for each VM, there is no point in repainting the sysregs on each access. Instead, we can simply perform the transmation as a one-off and be done with it. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 111903d1f5b9334d1100e1c6ee08e740fa374d91 Author: Marc Zyngier Date: Mon Nov 13 14:16:02 2023 +0000 KVM: arm64: nv: Hoist vcpu_has_nv() into is_hyp_ctxt() A rather common idiom when writing NV code as part of KVM is to have things such has: if (vcpu_has_nv(vcpu) && is_hyp_ctxt(vcpu)) { [...] } to check that we are in a hyp-related context. The second part of the conjunction would be enough, but the first one contains a static key that allows the rest of the checkis to be elided when in a non-NV environment. Rewrite is_hyp_ctxt() to directly use vcpu_has_nv(). The result is the same, and the code easier to read. The one occurence of this that is already merged is rewritten in the process. In order to avoid nasty cirtular dependencies between kvm_emulate.h and kvm_nested.h, vcpu_has_feature() is itself hoisted into kvm_host.h, at the cost of some #deferry... Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 2bfc654b89c4dd1c372bb2cbba6b5a0eb578d214 Author: Marc Zyngier Date: Thu Nov 9 15:47:49 2023 +0000 arm64: cpufeatures: Restrict NV support to FEAT_NV2 To anyone who has played with FEAT_NV, it is obvious that the level of performance is rather low due to the trap amplification that it imposes on the host hypervisor. FEAT_NV2 solves a number of the problems that FEAT_NV had. It also turns out that all the existing hardware that has FEAT_NV also has FEAT_NV2. Finally, it is now allowed by the architecture to build FEAT_NV2 *only* (as denoted by ID_AA64MMFR4_EL1.NV_frac), which effectively seals the fate of FEAT_NV. Restrict the NV support to NV2, and be done with it. Nobody will cry over the old crap. NV_frac will eventually be supported once the intrastructure is ready. Reviewed-by: Oliver Upton Signed-off-by: Marc Zyngier commit 1cdc605c7d70a390ff75a814a26c6f45d75778be Author: Kent Gibson Date: Tue Dec 19 08:41:56 2023 +0800 gpiolib: cdev: reduce locking in gpio_desc_to_lineinfo() Reduce the time holding the gpio_lock by snapshotting the desc flags, rather than testing them individually while holding the lock. Accept that the calculation of the used field is inherently racy, and only check the availability of the line from pinctrl if other checks pass, so avoiding the check for lines that are otherwise in use. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit eb54ef36282f670c704ed5af8593da62bebba80d Author: Xianwei Zhao Date: Fri Dec 15 16:28:00 2023 +0800 arm64: dts: amlogic: fix format for s4 uart node Aliases use lowercase letters and place status in end. Signed-off-by: Xianwei Zhao Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231215-s4-dts-v1-1-7831ab6972be@amlogic.com Signed-off-by: Neil Armstrong commit 34010db2916c567a7759f8b0878201551ce628bd Author: Krzysztof Kozlowski Date: Sat Dec 9 13:44:01 2023 +0100 arm64: dts: amlogic: drop redundant status=okay New device nodes are enabled by default, so no need for status=okay. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231209124401.93814-1-krzysztof.kozlowski@linaro.org Signed-off-by: Neil Armstrong commit b0c0f19d2a973294cadb0cea661291f648fe2263 Author: Xianwei Zhao Date: Fri Dec 8 15:16:27 2023 +0800 arm64: dts: amlogic: enable some nodes for board AQ222 Add reserved memory for board AQ222 which is used by ATF. Enable NAND, SPICC nodes for board AQ222. Signed-off-by: Xianwei Zhao Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231208-s4-dts-v2-2-5a93fa356c5d@amlogic.com Signed-off-by: Neil Armstrong commit 40ae67292eea512f1a2b690fa1e94691f848d655 Author: Xianwei Zhao Date: Fri Dec 8 15:16:26 2023 +0800 arm64: dts: amlogic: add some device nodes for S4 Add some device nodes for SoC S4, including periphs clock controller node, PLL clock controller node, I2C nodes, SPICC node, NAND controller node, Ethernet MAC and PHY node. Signed-off-by: Xianwei Zhao Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231208-s4-dts-v2-1-5a93fa356c5d@amlogic.com Signed-off-by: Neil Armstrong commit 193b6b0902bf57ff13bbadaa037a288c73c9d126 Author: Kent Gibson Date: Tue Dec 19 08:41:58 2023 +0800 gpiolib: cdev: improve documentation of get/set values Add documentation of the algorithm used to perform scatter/gather of the requested lines and values in linereq_get_values() and linereq_set_values_unlocked() to improve maintainability. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 0ebeaab4d59eb373e17ffbc50d8c4e9665418cbe Author: Kent Gibson Date: Tue Dec 19 08:41:57 2023 +0800 gpiolib: cdev: fully adopt guard() and scoped_guard() Use guard() or scoped_guard() for critical sections rather than discrete lock/unlock pairs. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit a9f07790a4b2250f0140e9a61c7f842fd9b618c7 Author: Xingyuan Mo Date: Fri Dec 8 21:00:59 2023 +0800 accel/habanalabs: fix information leak in sec_attest_info() This function may copy the pad0 field of struct hl_info_sec_attest to user mode which has not been initialized, resulting in leakage of kernel heap data to user mode. To prevent this, use kzalloc() to allocate and zero out the buffer, which can also eliminate other uninitialized holes, if any. Fixes: 0c88760f8f5e ("habanalabs/gaudi2: add secured attestation info uapi") Signed-off-by: Xingyuan Mo Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit bc5f15abcf95ce7e4c2e33daddcb5850ee5e671d Author: Tomer Tayar Date: Wed Nov 29 16:20:31 2023 +0200 accel/habanalabs/gaudi2: avoid overriding existing undefined opcode data Part of the undefined opcode data is updated in gaudi2_handle_qman_err_generic() and some in handle_lower_qman_data_on_err(). However, the 'write_enable' flag is checked only in gaudi2_handle_qman_err_generic(), and information of more than a single error can be mixed there. Moreover, handle_lower_qman_data_on_err() is called only for the lower QMAN, so for an error in the upper QMAN there is only a partial info. Move all the data update to be done in a single place, protected by the 'write_enable' flag. As mainly the lower QMAN's info is interesting, avoid saving the partial info for the upper QMAN. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit aa5cea38ce687021bf97f9f4cdb18b26db290964 Author: Tomer Tayar Date: Wed May 3 13:19:17 2023 +0300 accel/habanalabs: add parent_device sysfs attribute The device debugfs directory was modified to be named as the device-name. This name is the parent device name, i.e. either the PCI address in case of an ASIC, or the simulator device name in case of a simulator. This change makes it more difficult for a user to access the debugfs directory for a specific accel device, because he can't just use the accel minor id, but he needs to do more device-dependent operations to get the device name. To make it easier to get this name, add a 'parent_device' sysfs attribute that the user can read using the minor id before accessing debugfs. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit cf0719a8a3e72cb82d83f79aa57ae11d86324915 Author: Tomer Tayar Date: Wed Sep 27 18:50:30 2023 +0300 accel/habanalabs: update debugfs-driver-habanalabs with the device-name directory The device debugfs directory was modified to be named as the parent device name. Update the paths accordingly. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 565ee78840906da33f124c143e0c788e42f824e8 Author: Tomer Tayar Date: Thu Nov 23 09:49:36 2023 +0200 accel/habanalabs/gaudi2: add zero padding when printing QM CP instruction QM instructions are in multiples of 64 bits and the command type is in the upper bits of first QWORD. To make it clearer that an undefined command is due to a type of 0x0, always print all 64 bits and add a zero padding if needed. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d980e1ced9899451d2d2a84030ce9f2a04eae7e8 Author: Ariel Suller Date: Thu Nov 23 16:27:07 2023 +0200 accel/habanalabs: report 3 instances of Infineon second stage Infineon controller second stage has 3 instances that their version need to be reported by driver. Signed-off-by: Ariel Suller Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7259eb7b534735b9c1153654c0bb4c5f059c0dd3 Author: Moti Haimovski Date: Sun Nov 12 18:07:10 2023 +0200 accel/habanalabs/gaudi2: add signed dev info uAPI User will provide a nonce via the INFO ioctl, and will retrieve the signed device info generated using given nonce. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5bc155cfea605cd64aa372b44a67473b49c4726c Author: Tomer Tayar Date: Fri Nov 17 12:49:19 2023 +0200 accel/habanalabs/gaudi2: use correct registers to dump QM CQ info The QM CQ PTR_LO/PTR_HI/TSIZE registers are for pushing a CQ entry, and although they are updated by HW even when descriptors are fetched by PQ and CB addresses are fed into CQ, the correct registers to use when dumping the CQ info are the ones with the _STS suffix. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 47a552863d6c9ea26abe9ad35d2c35e4d6896551 Author: Dani Liberman Date: Mon Nov 13 21:11:13 2023 +0200 accel/habanalabs: expose module id through sysfs Module ID exposes the physical location of the device in the server, from the pov of the devices in regard to how they are connected by internal fabric. This information is already exposed in our INFO ioctl, but there are utilities and scripts running in data-center which are already accessing sysfs for topology information and it is easier for them to continue getting that information from sysfs instead of opening a file descriptor. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c9f9d0e3d0db300315d3bde7f122439633e6f007 Author: Dani Liberman Date: Sun Nov 12 13:38:42 2023 +0200 accel/habanalabs: print error code when mapping fails Failure to map is considered a non-trivial error and we need to notify the user about it. Signed-off-by: Dani Liberman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ae303d885d4a0fcea65330de9327d28edfebd206 Author: Tomer Tayar Date: Mon Nov 6 18:41:35 2023 +0200 accel/habanalabs/gaudi2: get the correct QM CQ info upon an error Upon a QM error, the address/size from both the CQ and the ARC_CQ are printed, although the instruction that led to the error was received from only one of them. Moreover, in case of a QM undefined opcode, only one of these address/size sets will be captured based on the value of ARC_CQ_PTR. However, this value can be non-zero even if currently the CQ is used, in case the CQ/ARC_CQ are alternately used. Under the assumption of having a stop-on-error configuration, modify to use CP_STS.CUR_CQ field to get the relevant CQ for the QM error. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 4b0b1fbc7757169b6d304545a321c7a88f13f8f0 Author: Tomer Tayar Date: Thu Jul 20 16:50:39 2023 +0300 accel/habanalabs: set hard reset flag if graceful reset is skipped hl_device_cond_reset() might be called with the hard reset flag unset, because a compute reset upon device release as part of a graceful reset is valid. If the conditions for graceful reset are not met, hl_device_reset() will be called for an immediate reset. In this case a compute reset is not valid, so it will be replaced with a hard reset together with a debug message about it. This message might be confusing, as it implies that a compute reset was requested when it shouldn't. To prevent this confusion, set the hard reset flag in hl_device_cond_reset() if going to an immediate reset. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 571cdb6e3b9a9c077b39047091f0ccc721b92b83 Author: Ofir Bitton Date: Thu Nov 9 10:53:10 2023 +0200 accel/habanalabs: remove 'get temperature' debug print The print was added long back for a specific debug and can now be removed. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0ec346779644039c4c05cfa7f071b1a24e54d8d9 Author: Dafna Hirschfeld Date: Tue Oct 31 13:51:10 2023 +0200 accel/habanalabs/gaudi2: fix undef opcode reporting currently the undefined opcode event bit in set only for lower cp and only if 'write_enable' is true. It should be set anyway and for all streams in order to report that event to userspace. Signed-off-by: Dafna Hirschfeld Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d1958dce5ab6a3e089c60cf474e8c9b7e96e70ad Author: Farah Kassabri Date: Tue Oct 31 12:20:36 2023 +0200 accel/habanalabs: fix EQ heartbeat mechanism Stop rescheduling another heartbeat check when EQ heartbeat check fails as it generates confusing logs in dmesg that the heartbeat fails. Signed-off-by: Farah Kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 42422993cf28d456778ee9168d73758ec037cd51 Author: Oded Gabbay Date: Mon Oct 30 12:23:57 2023 +0200 accel/habanalabs: add support for Gaudi2C device Gaudi2 with PCI revision ID with the value of '3' represents Gaudi2C device and should be detected and initialized as Gaudi2. Signed-off-by: Oded Gabbay commit e8bc0c1b1b730eb8759f5305ebd2d6876952e539 Author: Farah Kassabri Date: Sun Oct 29 16:16:16 2023 +0200 accel/habanalabs: add log when eq event is not received Add error log when no eq event is received from FW, to cover a scenario when FW is stuck for some reason. In such case driver will not receive neither the eq error interrupt or the eq heartbeat event, and will just initiate a reset without indication in the dmesg about the reason. Signed-off-by: Farah Kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c6485482330d9f9a745d4bfec4dca722bd2bd75f Author: Tomer Tayar Date: Sun Oct 15 14:04:53 2023 +0300 accel/habanalabs/gaudi2: assume hard-reset by FW upon PCIe AXI drain When a PCIe AXI drain event happens, it is possible that the driver cannot access the device through PCIe, and therefore cannot send a hard-reset request to FW. Starting from FW version 1.13, FW will initiate a hard-reset in such a case without waiting for a reset request from the driver. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit fbc2a09e09201eb64b94c0c7e4d2b4ec5337f844 Author: Farah Kassabri Date: Wed Oct 18 16:22:13 2023 +0300 accel/habanalabs: update device boot error check Use a predefined mask which set the device critical boot errors. Driver will fail and stop its loading, only upon detecting at least one of those errors defined in this mask. Signed-off-by: Farah Kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f64fa332602c311a76495fd0139bd4abb9aa7bbf Author: farah kassabri Date: Mon Oct 9 15:07:38 2023 +0300 accel/habanalabs: add pcie reset prepare/done hooks When working on a bare-metal system, if FLR will happen the firmware will handle it and driver will have no knowledge of it, and this will cause two issues: 1.The driver will be in operational state while it should be in reset. This will cause the heartbeat mechanism to keep sending messages to FW while pci device is in reset. Eventually heartbeat will fail and the device will end up in non-operational state. 2. After FW handles the FLR, and due to the reset it'll go back to preboot stage, and driver need to perform hard reset in order to load the boot fit binary. This patch will add reset_prepare hook that will set the device to be in disabled state, so it'll be not operational, and also reset_done hook which will be called after the actual FLR handling, then it will perform hard reset. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d8543cbaf979271bee97278b1f95240661b96500 Author: Kent Gibson Date: Tue Dec 19 08:41:55 2023 +0800 gpiolib: remove debounce_period_us from struct gpio_desc cdev is the only user of the debounce_period_us field in struct gpio_desc, and it no longer uses it, so remove it. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 9344e34e7992fec95ce6210d95ac01437dd327ab Author: Kent Gibson Date: Tue Dec 19 08:41:54 2023 +0800 gpiolib: cdev: relocate debounce_period_us from struct gpio_desc Store the debounce period for a requested line locally, rather than in the debounce_period_us field in the gpiolib struct gpio_desc. Add a global tree of lines containing supplemental line information to make the debounce period available to be reported by the GPIO_V2_GET_LINEINFO_IOCTL and the line change notifier. Signed-off-by: Kent Gibson Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 354b2bd38aeae8af066d9b92ab1ea4d608e64562 Author: Damien Le Moal Date: Wed Nov 22 15:04:06 2023 +0900 PCI: xilinx-nwl: Use INTX instead of legacy In the xilinx-nwl controller driver, change all use of "legacy" and "leg" to "intx", to match the term used in the PCI specifications. Link: https://lore.kernel.org/r/20231122060406.14695-17-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit 95da5fedd325a6f953e06933249f371f72b41df7 Author: Damien Le Moal Date: Wed Nov 22 15:04:05 2023 +0900 PCI: rockchip-host: Rename rockchip_pcie_legacy_int_handler() Rename the function rockchip_pcie_legacy_int_handler() of the rockchip host driver to rockchip_pcie_intx_handler() to match the PCI_IRQ_INTX macro name used to control this function execution, and to match the term used in the PCI specifications. Link: https://lore.kernel.org/r/20231122060406.14695-16-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit 5815c2d17a74927c627f5c759bd9d772ac4c3981 Author: Damien Le Moal Date: Wed Nov 22 15:04:04 2023 +0900 PCI: rockchip-ep: Use INTX instead of legacy Rename the function rockchip_pcie_ep_send_legacy_irq() of the rockchip endpoint driver to rockchip_pcie_ep_send_intx_irq(). Uses of the term "legacy" are also replaced with "INTX" in comments. Link: https://lore.kernel.org/r/20231122060406.14695-15-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit c0dcdeea085053f3f25ee0ad262aa0aaa86df82b Author: Damien Le Moal Date: Wed Nov 22 15:04:03 2023 +0900 PCI: uniphier: Use INTX instead of legacy In the Designware uniphier controller driver, including the endpoint driver, change all names using "legacy" to use "intx", to match the term used in the PCI specifications. Link: https://lore.kernel.org/r/20231122060406.14695-14-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit 3ba180c45b309db39eef2bd595a2564b294ea1e7 Author: Damien Le Moal Date: Wed Nov 22 15:04:02 2023 +0900 PCI: tegra194: Use INTX instead of legacy In the Designware tegra194 controller driver, change all names using "legacy" to use "intx", to match the term used in the PCI specifications. Link: https://lore.kernel.org/r/20231122060406.14695-13-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit 1b79b2aa9f6c20dfc1b77b51b06d5f8a6fd90a6d Author: Damien Le Moal Date: Wed Nov 22 15:04:01 2023 +0900 PCI: dw-rockchip: Rename rockchip_pcie_legacy_int_handler() Rename the function rockchip_pcie_legacy_int_handler() to rockchip_pcie_intx_handler() to match the code managing INTX interrupts (e.g. intx_domain_ops) and the term used in the PCI specifications. Link: https://lore.kernel.org/r/20231122060406.14695-12-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit 81957ace190f979c5e9ce6a30deca6639f959350 Author: Damien Le Moal Date: Wed Nov 22 15:04:00 2023 +0900 PCI: keystone: Use INTX instead of legacy In the Keystone controller driver, change all names using "legacy" to use "intx" instead, to match the term used in the PCI specifications. Given that the field legacy_intc_np of struct keystone_pcie is unused, this field is removed instead of being renamed. Link: https://lore.kernel.org/r/20231122060406.14695-11-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit e9af4800d448c8e0ebfe3a1c7a29836b729d969d Author: Damien Le Moal Date: Wed Nov 22 15:03:59 2023 +0900 PCI: dwc: Rename dw_pcie_ep_raise_legacy_irq() Rename the function dw_pcie_ep_raise_legacy_irq() of the Designware endpoint controller driver to dw_pcie_ep_raise_intx_irq() to match the name of the PCI_IRQ_INTX macro. Link: https://lore.kernel.org/r/20231122060406.14695-10-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Serge Semin Reviewed-by: Christoph Hellwig commit 570e8579761a68d80c29034c291b34cff732d76d Author: Damien Le Moal Date: Wed Nov 22 15:03:58 2023 +0900 PCI: cadence: Use INTX instead of legacy In the Cadence endpoint controller driver, rename the function cdns_pcie_ep_send_legacy_irq() to cdns_pcie_ep_send_intx_irq() to match the macro PCI_IRQ_INTX name. Related comments and messages mentioning "legacy" are also changed to refer to "intx". Link: https://lore.kernel.org/r/20231122060406.14695-9-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit c5d973a07bb141fe1baa558dcf7cac855b030405 Author: Damien Le Moal Date: Wed Nov 22 15:03:57 2023 +0900 PCI: dra7xx: Rename dra7xx_pcie_raise_legacy_irq() Rename the function dra7xx_pcie_raise_legacy_irq() to dra7xx_pcie_raise_intx_irq() to match the use of the PCI_IRQ_INTX macro. Link: https://lore.kernel.org/r/20231122060406.14695-8-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit 365fcc03b6321f36eb7cbda8baa737238c387907 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:41 2023 +0100 memory: ti-emif-pm: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/c69f64ad0e89fe2a37b281d44ebfb55b565b50bf.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 7852eb8c8ac7e0164b43cc5f8d8245cc3a037620 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:40 2023 +0100 memory: ti-aemif: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/bef01091df036c82a6a6144d3aafd1d7b7be109e.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 622fa819a2f0f3e6d8322a0b6d3177302ae937b6 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:39 2023 +0100 memory: tegra210-emc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/3e2951685dddbc0ab32244916a9849af206a6730.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit dcefa0368458e9e20642dbd2608adae6b22e6464 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:38 2023 +0100 memory: tegra186-emc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/8481c7e7d5b024325e6b1aabf7cb3a3707d211d6.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 1455b6b0c83132960826d0e527a79a355e096a80 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:37 2023 +0100 memory: stm32-fmc2-ebi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/fa74d4ae3cbf337dcae66db8479125fec8078153.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 8013408e4912fb7e469bb8b14fd3a5c956257eec Author: Uwe Kleine-König Date: Sun Dec 17 15:29:36 2023 +0100 memory: exynos5422-dmc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/167dbda286584eafec07da8c11673da07ba72362.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 961abc9f7d6771e8f13db1f4d8b0ffff3f0f41a4 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:35 2023 +0100 memory: renesas-rpc-if: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/a7d47700879e10384080b20728aa13ff349fc321.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 6a4edb1a4f61e28cc127cd06c470ce3599ee0d9c Author: Uwe Kleine-König Date: Sun Dec 17 15:29:34 2023 +0100 memory: omap-gpmc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/019d9dc31af9b30a6b675fec219e64b667475efd.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 08c1aeaa45ce0fd18912e92c6705586c8aa5240f Author: Uwe Kleine-König Date: Sun Dec 17 15:29:33 2023 +0100 memory: mtk-smi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/5c35a33cfdc359842e034ddd2e9358f10e91fa1f.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 9024fbbd77b4d73279bbbe2c748a4e4b414d50cc Author: Uwe Kleine-König Date: Sun Dec 17 15:29:32 2023 +0100 memory: jz4780-nemc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/fa609b805a7ed6e4c6ce81464528ea4163625d67.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit f17130855d51f24563a24cd957add769ad59eee9 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:31 2023 +0100 memory: fsl_ifc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/4c90b971e9816320586f4e01e68c95331b8e524a.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 021d044b0f9c9a09aa2f778e876e467a8810fb4a Author: Uwe Kleine-König Date: Sun Dec 17 15:29:30 2023 +0100 memory: fsl-corenet-cf: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/3b506dcf90b57c341e59bcf5af7ee69092a2d857.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit c8a53461990cb697ca494d6671fab9e196d20ce4 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:29 2023 +0100 memory: emif: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/da2fa8d040d542edc1318aeae5117317bb22aa06.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit f7754712ad6094de5be18674777b265ed4db2f45 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:28 2023 +0100 memory: brcmstb_memc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/e4f3c86270161ce231cd0e4f3be9c632578e17a2.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 431187eadbc7b0f2650d4e55111b3fff4720f867 Author: Uwe Kleine-König Date: Sun Dec 17 15:29:27 2023 +0100 memory: brcmstb_dpfe: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Markus Mayer Link: https://lore.kernel.org/r/94780e5a414b20b6effa1e87208c14620c854e88.1702822744.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit a833c84a5ab0b05e61708130885f90388baba133 Merge: 687a28590c860 7803680964c02 Author: Greg Kroah-Hartman Date: Tue Dec 19 08:57:56 2023 +0100 Merge tag 'extcon-next-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon next for v6.8 Detailed description for this pull request: 1. Fix possible memory leak of device name in extcon_dev_register() : Fix memory leak on error path of extcon_dev_register(). 2. Set interrupt polarity based on device-tree for extcon-usbc-tusb320.c :Remove 'IRQF_TRIGGER_FALLING' request which is not allowed on every interrupt controller (i.e. arm64 GIC). Replace flag by a request that depends on the actual device-tree setting. 3. Fix the comment style according to guide on extcon-qcom-spmi-misc.c. * tag 'extcon-next-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: qcom-spmi-misc: don't use kernel-doc marker for comment extcon: usbc-tusb320: Set interrupt polarity based on device-tree extcon: fix possible name leak in extcon_dev_register() commit 687a28590c8608496b704ead76224c021ec00881 Merge: 093976dd953c6 01bd694ac2f68 Author: Greg Kroah-Hartman Date: Tue Dec 19 08:57:03 2023 +0100 Merge tag 'mhi-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host ======== - Added alignment check for event ring read pointer to avoid the potential buffer corruption issue. - Added support for SDX75 modem which takes longer time to enter READY state. - Added spinlock to protect concurrent access while queuing transfer ring elements. - Dropped the read channel lock before invoking the client callback as the client can potentially queue buffers thus ending up wtih soft lockup. MHI Endpoint ============ - Used kzalloc() to allocate event ring elements instead of allocating the elements on the stack, as the endpoint controller trying to queue them may not be able to use vmalloc memory (using DMA). - Used slab allocator for allocting the memory for objects used frequently and are of fixed size. - Added support for interrupt moderation timer feature which is used by the host to limit the number of interrupts raised by the device for an event ring. - Added async read/write DMA support for transferring data between host and the endpoint. So far MHI EP stack assumed that the data will be transferred synchronously (i.e., it sends completion once the transfer APIs are returned). But this impacts the throughput if the controller is using DMA to do the transfer. So to add async suport, existing sync transfer APIs are renamed to {read/write}_sync and also introduced two new APIs {read/write}_async for carrying out the async transfer. Controllers implementing the async APIs should queue the buffers and return immediately without waiting for transfer completion. Once the transfer completion happens later, they should invoke the completion callback so that the MHI EP stack can send the completion event to the host. The controller driver patches (PCI EPF) for this async support are also merged to the MHI tree with Acks from PCI maintainers. - Fixed the DMA channel direction in error path of the PCI EPF driver. * tag 'mhi-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: Drop chan lock before queuing buffers bus: mhi: host: Add spinlock to protect WP access when queueing TREs PCI: epf-mhi: Fix the DMA data direction of dma_unmap_single() bus: mhi: ep: Add checks for read/write callbacks while registering controllers bus: mhi: ep: Add support for async DMA read operation bus: mhi: ep: Add support for async DMA write operation PCI: epf-mhi: Enable MHI async read/write support PCI: epf-mhi: Add support for DMA async read/write operation PCI: epf-mhi: Simulate async read/write using iATU bus: mhi: ep: Introduce async read/write callbacks bus: mhi: ep: Rename read_from_host() and write_to_host() APIs bus: mhi: ep: Pass mhi_ep_buf_info struct to read/write APIs bus: mhi: ep: Add support for interrupt moderation timer bus: mhi: ep: Use slab allocator where applicable bus: mhi: host: Add alignment check for event ring read pointer bus: mhi: host: pci_generic: Add SDX75 based modem support bus: mhi: host: Add a separate timeout parameter for waiting ready bus: mhi: ep: Do not allocate event ring element on stack commit 48b272853e5ca6680eb7d019347126923da1a2eb Merge: a0a28956b46ec b1a2aa9bcbb88 Author: Dave Airlie Date: Tue Dec 19 17:07:25 2023 +1000 Merge tag 'drm-misc-next-2023-12-14' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for $kernel-version: UAPI Changes: Cross-subsystem Changes: - A few fixes for usb/typec Core Changes: - ci: Updates to the defconfig, igt version, etc. - writeback: Move the atomic_check helper from the encoder to connector Driver Changes: - rockchip: Add support for rk3588 - xe: Update the TODO list - panel: - nv3052c: Register documentation, init sequence improvements and support for the Fascontek FS035VG158 - st7701: Add support for the Anbernic RG-ARC - new driver: Synaptics R63353 panel controller, Ilitek ILI9805 panel controller - new panel: AUO G156HAN04.0 Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/aqpn5miejmkks7pbcfex7b6u63uwsruywxsnr3x5ljs45qatin@nbkkej2elk46 commit 76ca20c748684f63bb985166850049f242797f65 Author: Steven Rostedt (Google) Date: Wed Dec 13 10:42:18 2023 -0500 tracing: Increase size of trace_marker_raw to max ring buffer entry There's no reason to give an arbitrary limit to the size of a raw trace marker. Just let it be as big as the size that is allowed by the ring buffer itself. And there's also no reason to artificially break up the write to TRACE_BUF_SIZE, as that's not even used. Link: https://lore.kernel.org/linux-trace-kernel/20231213104218.2efc70c1@gandalf.local.home Cc: Mark Rutland Cc: Mathieu Desnoyers Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 9482341d9bdaf194552673b6c1c81a824e985e7f Author: Steven Rostedt (Google) Date: Tue Dec 12 19:04:22 2023 -0500 tracing: Have trace_marker break up by lines by size of trace_seq If a trace_marker write is bigger than what trace_seq can hold, then it will print "LINE TOO BIG" message and not what was written. Instead, check if the write is bigger than the trace_seq and break it up by that size. Ideally, we could make the trace_seq dynamic that could hold this. But that's for another time. Link: https://lore.kernel.org/linux-trace-kernel/20231212190422.1eaf224f@gandalf.local.home Cc: Mark Rutland Cc: Mathieu Desnoyers Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 40fc60e36c60ba85b2974e507b67df40c94e9578 Author: Steven Rostedt (Google) Date: Sat Dec 9 17:52:20 2023 -0500 trace_seq: Increase the buffer size to almost two pages Now that trace_marker can hold more than 1KB string, and can write as much as the ring buffer can hold, the trace_seq is not big enough to hold writes: ~# a="1234567890" ~# cnt=4080 ~# s="" ~# while [ $cnt -gt 10 ]; do ~# s="${s}${a}" ~# cnt=$((cnt-10)) ~# done ~# echo $s > trace_marker ~# cat trace # tracer: nop # # entries-in-buffer/entries-written: 2/2 #P:8 # # _-----=> irqs-off/BH-disabled # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / _-=> migrate-disable # |||| / delay # TASK-PID CPU# ||||| TIMESTAMP FUNCTION # | | | ||||| | | <...>-860 [002] ..... 105.543465: tracing_mark_write[LINE TOO BIG] <...>-860 [002] ..... 105.543496: tracing_mark_write: 789012345678901234567890 By increasing the trace_seq buffer to almost two pages, it can now print out the first line. This also subtracts the rest of the trace_seq fields from the buffer, so that the entire trace_seq is now PAGE_SIZE aligned. Link: https://lore.kernel.org/linux-trace-kernel/20231209175220.19867af4@gandalf.local.home Cc: Mark Rutland Cc: Mathieu Desnoyers Reviewed-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit 8ec90be7f15fac42992ea821be929d3b06cd0fd9 Author: Steven Rostedt (Google) Date: Tue Dec 12 13:19:01 2023 -0500 tracing: Allow for max buffer data size trace_marker writes Allow a trace write to be as big as the ring buffer tracing data will allow. Currently, it only allows writes of 1KB in size, but there's no reason that it cannot allow what the ring buffer can hold. Link: https://lore.kernel.org/linux-trace-kernel/20231212131901.5f501e72@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Signed-off-by: Steven Rostedt (Google) commit 0b9036efd83d4adefab197a1ec98c496c9df44f0 Author: Steven Rostedt (Google) Date: Mon Dec 11 13:16:23 2023 -0500 ring-buffer: Add offset of events in dump on mismatch On bugs that have the ring buffer timestamp get out of sync, the config CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS, that checks for it and if it is detected it causes a dump of the bad sub buffer. It shows each event and their timestamp as well as the delta in the event. But it's also good to see the offset into the subbuffer for that event to know if how close to the end it is. Also print where the last event actually ended compared to where it was expected to end. Link: https://lore.kernel.org/linux-trace-kernel/20231211131623.59eaebd2@gandalf.local.home Cc: Mark Rutland Cc: Mathieu Desnoyers Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) commit d23569979ca1cd139a42c410e0c7b9e6014c3b3a Author: Steven Rostedt (Google) Date: Wed Dec 13 09:37:01 2023 -0500 tracing: Allow creating instances with specified system events A trace instance may only need to enable specific events. As the eventfs directory of an instance currently creates all events which adds overhead, allow internal instances to be created with just the events in systems that they care about. This currently only deals with systems and not individual events, but this should bring down the overhead of creating instances for specific use cases quite bit. The trace_array_get_by_name() now has another parameter "systems". This parameter is a const string pointer of a comma/space separated list of event systems that should be created by the trace_array. (Note if the trace_array already exists, this parameter is ignored). The list of systems is saved and if a module is loaded, its events will not be added unless the system for those events also match the systems string. Link: https://lore.kernel.org/linux-trace-kernel/20231213093701.03fddec0@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Sean Paul Cc: Arun Easi Cc: Daniel Wagner Tested-by: Dmytro Maluka Signed-off-by: Steven Rostedt (Google) commit 110cb8d861cc1a040cdab495b22ac436c49d1454 Author: Abel Vesa Date: Thu Oct 12 19:05:09 2023 +0300 soc: qcom: llcc: Fix LLCC_TRP_ATTR2_CFGn offset According to documentation, it has increments of 4, not 8. Fixes: c72ca343f911 ("soc: qcom: llcc: Add v4.1 HW version support") Reported-by: Unnathi Chalicheemala Reviewed-by: Satya Durga Srinivasu Prabhala Reviewed-by: Konrad Dybcio Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20231012160509.184891-1-abel.vesa@linaro.org Signed-off-by: Bjorn Andersson commit 6c57d7b593c4a4e60db65d5ce0fe1d9f79ccbe9b Author: Bartosz Golaszewski Date: Mon Nov 27 15:15:48 2023 +0100 firmware: qcom: qseecom: fix memory leaks in error paths Fix instances of returning error codes directly instead of jumping to the relevant labels where memory allocated for the SCM calls would be freed. Fixes: 759e7a2b62eb ("firmware: Add support for Qualcomm UEFI Secure Application") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202311270828.k4HGcjiL-lkp@intel.com/ Signed-off-by: Bartosz Golaszewski Reviewed-by: Maximilian Luz Tested-by: Deepti Jaggi #sa8775p-ride Link: https://lore.kernel.org/r/20231127141600.20929-2-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit fe18e22fa779718b7ec0effe8d5f10d86a124e31 Author: Tudor Ambarus Date: Fri Dec 15 10:21:38 2023 +0200 mtd: spi-nor: drop superfluous debug prints The mtd data shall be obtained with the mtd ioctls or with new debugfs entries if one cares. Drop the debug prints. Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20231215082138.16063-5-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit fc2efaf90a4538781aac26cf44d705c1d93fb9f5 Author: JaimeLiao Date: Fri Dec 15 10:21:37 2023 +0200 mtd: spi-nor: sysfs: hide the flash name if not set The flash name is not reliable as we saw flash ID collisions. Hide the flash name if not set. Signed-off-by: JaimeLiao Reviewed-by: Michael Walle [ta: update commit subject and description and the sysfs description] Link: https://lore.kernel.org/r/20231215082138.16063-4-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 118e10cd893d57df55b3302dfd188a981b6e6d1c Author: Tianrui Zhao Date: Tue Dec 19 10:48:28 2023 +0800 LoongArch: KVM: Add LASX (256bit SIMD) support This patch adds LASX (256bit SIMD) support for LoongArch KVM. There will be LASX exception in KVM when guest use the LASX instructions. KVM will enable LASX and restore the vector registers for guest and then return to guest to continue running. Reviewed-by: Bibo Mao Signed-off-by: Tianrui Zhao Signed-off-by: Huacai Chen commit db1ecca22edf27c5a3dd66af406c88b5b5ac7cc1 Author: Tianrui Zhao Date: Tue Dec 19 10:48:28 2023 +0800 LoongArch: KVM: Add LSX (128bit SIMD) support This patch adds LSX (128bit SIMD) support for LoongArch KVM. There will be LSX exception in KVM when guest use the LSX instructions. KVM will enable LSX and restore the vector registers for guest and then return to guest to continue running. Signed-off-by: Tianrui Zhao Signed-off-by: Huacai Chen commit 5b3d524993ff1fb36089be850ccb121ac3296bcf Author: Bibo Mao Date: Tue Dec 19 10:48:28 2023 +0800 LoongArch: KVM: Fix timer emulation with oneshot mode When timer is fired in oneshot mode, CSR TVAL will be -1 rather than 0. There needs special handing for this situation. There are two scenarios when oneshot timer is fired. One scenario is that time is fired after exiting to host, CSR TVAL is set with 0 in order to inject hw interrupt, and -1 will assigned to CSR TVAL soon. The other situation is that timer is fired in VM and guest kernel is hanlding timer IRQ, IRQ is acked and is ready to set next expired timer value, then vm exits to host. Timer interrupt should not be inject at this point, else there will be spurious timer interrupt. Here hw timer irq status in CSR ESTAT is used to judge these two scenarios. If CSR TVAL is -1, the oneshot timer is fired; and if timer hw irq is on in CSR ESTAT register, it happens after exiting to host; else if timer hw irq is off, we think that it happens in vm and timer IRQ handler has already acked IRQ. With this patch, runltp with version ltp20230516 passes to run in vm. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 1ab9c6099495f79bfbcd6058d02d7556034a89b0 Author: Bibo Mao Date: Tue Dec 19 10:48:28 2023 +0800 LoongArch: KVM: Remove kvm_acquire_timer() before entering guest Timer emulation method in VM is switch to SW timer, there are two places where timer emulation is needed. One is during vcpu thread context switch, the other is halt-polling with idle instruction emulation. SW timer switching is removed during halt-polling mode, so it is not necessary to disable SW timer before entering to guest. This patch removes SW timer handling before entering guest mode, and put it in HW timer restoring flow when vcpu thread is sched-in. With this patch, vm timer emulation is simpler, there is SW/HW timer switch only in vcpu thread context switch scenario. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 0d2abe67029644741bf7400b0d00c2faa3e1c455 Author: Bibo Mao Date: Tue Dec 19 10:48:27 2023 +0800 LoongArch: KVM: Allow to access HW timer CSR registers always Currently HW timer CSR registers are allowed to access before entering to vm and disabled if switch to SW timer in host mode, instead it is not necessary to do so. HW timer CSR registers can be accessed always, it is nothing to do with whether it is in vm mode or host mode. This patch removes the limitation. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 161267320158920a601e40d83fdac60bcaa2acb5 Author: Bibo Mao Date: Tue Dec 19 10:48:27 2023 +0800 LoongArch: KVM: Remove SW timer switch when vcpu is halt polling With halt-polling supported, there is checking for pending events or interrupts when vcpu executes idle instruction. Pending interrupts include injected SW interrupts and passthrough HW interrupts, such as HW timer interrupts, since HW timer works still even if vcpu exists from VM mode. Since HW timer pending interrupt can be set directly with CSR status register, and pending HW timer interrupt checking is used in vcpu block checking function, it is not necessary to switch to SW timer during halt-polling. This patch adds preemption disabling in function kvm_cpu_has_pending_timer(), and removes SW timer switching in idle instruction emulation function. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 7ab6fb505b2a7447c4a7237a12c59e3ad0c7298c Author: Bibo Mao Date: Tue Dec 19 10:48:27 2023 +0800 LoongArch: KVM: Optimization for memslot hugepage checking During shadow mmu page fault, there is checking for huge page for specified memslot. Page fault is hot path, check logic can be done when memslot is created. Here two flags are added for huge page checking, KVM_MEM_HUGEPAGE_CAPABLE and KVM_MEM_HUGEPAGE_INCAPABLE. Indeed for an optimized qemu, memslot for DRAM is always huge page aligned. The flag is firstly checked during hot page fault path. Now only huge page flag is supported, there is a long way for super page support in LoongArch system. Since super page size is 64G for 16K pagesize and 1G for 4K pagesize, 64G physical address is rarely used and LoongArch kernel needs support super page for 4K. Also memory layout of LoongArch qemu VM should be 1G aligned. Signed-off-by: Bibo Mao Signed-off-by: Huacai Chen commit 15eb8303bb424e36a7f5f411c6bb489bc0c1c06e Author: Tudor Ambarus Date: Fri Dec 15 10:21:36 2023 +0200 mtd: spi-nor: mark the flash name as obsolete The flash name is unreliable as we saw flash ID collisions. Mark the name as obsolete. Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20231215082138.16063-3-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 9fcb0999345e94303a0514f2d2850246c11308f4 Author: Tudor Ambarus Date: Fri Dec 15 10:21:35 2023 +0200 mtd: spi-nor: print flash ID instead of name We saw flash ID collisions which make the flash name unreliable. Print the manufacturer and device ID instead of the flash name. Lower the print to dev_dbg to stop polluting the kernel log. Suggested-by: Miquel Raynal Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20231215082138.16063-2-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 41e9a7faff514fcb2d4396b0ffde30386a153c7f Author: Al Viro Date: Mon Mar 6 11:37:19 2023 -0500 minixfs: switch to kmap_local_page() Again, a counterpart of Fabio's fs/sysv patch Reviewed-by: Fabio M. De Francesco Signed-off-by: Al Viro commit 6628f69ee66a24602a6007ecfb9ab66390475b98 Author: Al Viro Date: Mon Mar 6 11:36:24 2023 -0500 minixfs: Use dir_put_page() in minix_unlink() and minix_rename() ... rather than open-coding it there. Counterpart of the corresponding fs/sysv commit from Fabio's series... Reviewed-by: Fabio M. De Francesco Signed-off-by: Al Viro commit ee0d27c90777da4c1da633aa7b91dbafd176c0c4 Author: Al Viro Date: Mon Mar 6 11:35:52 2023 -0500 minixfs: change the signature of dir_get_page() Change the signature of dir_get_page() in order to prepare this function to the conversion to the use of kmap_local_page(). Change also those call sites which are required to adjust to the new signature. Essentially a copy of the corresponding fs/sysv commit by Fabio M. De Francesco Reviewed-by: Fabio M. De Francesco Signed-off-by: Al Viro commit 4812509e916bd79a17708de8371a94265f47a7bf Author: Al Viro Date: Mon Mar 6 11:35:29 2023 -0500 minixfs: use offset_in_page() It's cheaper and more idiomatic than subtracting page_address() of the corresponding page... Reviewed-by: Fabio M. De Francesco Signed-off-by: Al Viro commit 45a2c87f28ad0ee8c286bb6dd5686bc54f5b7160 Author: Bart Van Assche Date: Thu Dec 14 11:23:58 2023 -0800 scsi: ufs: core: Simplify ufshcd_auto_hibern8_update() Calls to ufshcd_auto_hibern8_update() are already serialized: this function is either called if user space software is not running (preparing to suspend) or from a single sysfs store callback function. Kernfs serializes sysfs .store() callbacks. No functionality is changed. Reviewed-by: Bao D. Nguyen Reviewed-by: Can Guo Cc: Avri Altman Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20231214192416.3638077-3-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit bdf5c0bb4dd9e7a8a4423643e6c73a7114bd58d8 Author: Bart Van Assche Date: Thu Dec 14 11:23:57 2023 -0800 scsi: ufs: core: Rename ufshcd_auto_hibern8_enable() and make it static Rename ufshcd_auto_hibern8_enable() into ufshcd_configure_auto_hibern8() since this function can enable or disable auto-hibernation. Since ufshcd_auto_hibern8_enable() is only used inside the UFSHCI driver core, declare it static. Additionally, move the definition of this function to just before its first caller. Suggested-by: Bao D. Nguyen Reviewed-by: Bao D. Nguyen Reviewed-by: Can Guo Cc: Avri Altman Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20231214192416.3638077-2-bvanassche@acm.org Reviewed-by: Peter Wang Signed-off-by: Martin K. Petersen commit 26cdd6940c94cbd81cc524093bd689b061df58c4 Author: Manivannan Sadhasivam Date: Thu Dec 14 18:25:32 2023 +0530 scsi: ufs: qcom: Fix ESI vector mask While cleaning up the code to use ufshcd_rmwl() helper, the ESI vector mask was changed incorrectly. Fix it and also define a proper macro for the value together with FIELD_PREP(). Reported-by: Andrew Halaney Fixes: 0e9f4375db1c ("scsi: ufs: qcom: Use ufshcd_rmwl() where applicable") Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231214125532.55109-1-manivannan.sadhasivam@linaro.org Reviewed-by: Konrad Dybcio Signed-off-by: Martin K. Petersen commit 24db9626baedf9520f13af58cc5c02756721ec04 Author: Martin K. Petersen Date: Mon Dec 18 20:23:57 2023 -0500 scsi: ufs: host: Fix kernel-doc warning Commit fa3dca8251c4 ("scsi: ufs: host: Rename structure ufs_dev_params to ufs_host_params") inadvertently introduced a comment line without '*' prefix. Format the comment section correctly. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312171915.YhlTLvLL-lkp@intel.com/ Fixes: fa3dca8251c4 ("scsi: ufs: host: Rename structure ufs_dev_params to ufs_host_params") Signed-off-by: Martin K. Petersen commit c49b292d031e385abf764ded32cd953c77e73f2d Merge: 0ee28c9ae042e 8e432e6197cef Author: Jakub Kicinski Date: Mon Dec 18 16:46:07 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2023-12-18 This PR is larger than usual and contains changes in various parts of the kernel. The main changes are: 1) Fix kCFI bugs in BPF, from Peter Zijlstra. End result: all forms of indirect calls from BPF into kernel and from kernel into BPF work with CFI enabled. This allows BPF to work with CONFIG_FINEIBT=y. 2) Introduce BPF token object, from Andrii Nakryiko. It adds an ability to delegate a subset of BPF features from privileged daemon (e.g., systemd) through special mount options for userns-bound BPF FS to a trusted unprivileged application. The design accommodates suggestions from Christian Brauner and Paul Moore. Example: $ sudo mkdir -p /sys/fs/bpf/token $ sudo mount -t bpf bpffs /sys/fs/bpf/token \ -o delegate_cmds=prog_load:MAP_CREATE \ -o delegate_progs=kprobe \ -o delegate_attachs=xdp 3) Various verifier improvements and fixes, from Andrii Nakryiko, Andrei Matei. - Complete precision tracking support for register spills - Fix verification of possibly-zero-sized stack accesses - Fix access to uninit stack slots - Track aligned STACK_ZERO cases as imprecise spilled registers. It improves the verifier "instructions processed" metric from single digit to 50-60% for some programs. - Fix verifier retval logic 4) Support for VLAN tag in XDP hints, from Larysa Zaremba. 5) Allocate BPF trampoline via bpf_prog_pack mechanism, from Song Liu. End result: better memory utilization and lower I$ miss for calls to BPF via BPF trampoline. 6) Fix race between BPF prog accessing inner map and parallel delete, from Hou Tao. 7) Add bpf_xdp_get_xfrm_state() kfunc, from Daniel Xu. It allows BPF interact with IPSEC infra. The intent is to support software RSS (via XDP) for the upcoming ipsec pcpu work. Experiments on AWS demonstrate single tunnel pcpu ipsec reaching line rate on 100G ENA nics. 8) Expand bpf_cgrp_storage to support cgroup1 non-attach, from Yafang Shao. 9) BPF file verification via fsverity, from Song Liu. It allows BPF progs get fsverity digest. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (164 commits) bpf: Ensure precise is reset to false in __mark_reg_const_zero() selftests/bpf: Add more uprobe multi fail tests bpf: Fail uprobe multi link with negative offset selftests/bpf: Test the release of map btf s390/bpf: Fix indirect trampoline generation selftests/bpf: Temporarily disable dummy_struct_ops test on s390 x86/cfi,bpf: Fix bpf_exception_cb() signature bpf: Fix dtor CFI cfi: Add CFI_NOSEAL() x86/cfi,bpf: Fix bpf_struct_ops CFI x86/cfi,bpf: Fix bpf_callback_t CFI x86/cfi,bpf: Fix BPF JIT call cfi: Flip headers selftests/bpf: Add test for abnormal cnt during multi-kprobe attachment selftests/bpf: Don't use libbpf_get_error() in kprobe_multi_test selftests/bpf: Add test for abnormal cnt during multi-uprobe attachment bpf: Limit the number of kprobes when attaching program to multiple kprobes bpf: Limit the number of uprobes when attaching program to multiple uprobes bpf: xdp: Register generic_kfunc_set with XDP programs selftests/bpf: utilize string values for delegate_xxx mount options ... ==================== Link: https://lore.kernel.org/r/20231219000520.34178-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski commit ab1c247094e323177a578b38f0325bf79f0317ac Merge: 71225af17f611 2cf4f94d8e864 Author: Arnaldo Carvalho de Melo Date: Mon Dec 18 21:37:07 2023 -0300 Merge remote-tracking branch 'torvalds/master' into perf-tools-next To pick up fixes that went thru perf-tools for v6.7 and to get in sync with upstream to check for drift in the copies of headers, etc. Signed-off-by: Arnaldo Carvalho de Melo commit 71225af17f611632226a4a2fae25235fd8dad268 Author: Ian Rogers Date: Wed Dec 6 17:16:44 2023 -0800 perf thread: Use function to add missing maps lock Switch thread__prepare_access from loop macro maps__for_each_entry to maps__for_each_map function that takes a callback. The function holds the maps lock, which should be held during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 228493d0a83bc2aec7f4a25491621f9d3b6d7bf2 Author: Ian Rogers Date: Wed Dec 6 17:16:43 2023 -0800 perf synthetic-events: Use function to add missing maps lock Switch perf_event__synthesize_modules from loop macro maps__for_each_entry to maps__for_each_map function that takes a callback. The function holds the maps lock, which should be held during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-10-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 111350c67d15ffc284801509acdcf256d77876ca Author: Ian Rogers Date: Wed Dec 6 17:16:42 2023 -0800 perf symbol: Use function to add missing maps lock Switch do_validate_kcore_modules from loop macro maps__for_each_entry to maps__for_each_map function that takes a callback. The function holds the maps lock, which should be held during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 300b53d5b819a33e2d4567cc35e1d92b4b49cd9c Author: Ian Rogers Date: Wed Dec 6 17:16:41 2023 -0800 perf probe-event: Use function to add missing maps lock Switch kernel_get_module_map from loop macro maps__for_each_entry to maps__for_each_map function that takes a callback. The function holds the maps lock, which should be held during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2dc549b1dd495e7cdaa822a0af97365a8a1de840 Author: Ian Rogers Date: Wed Dec 6 17:16:40 2023 -0800 perf machine: Use function to add missing maps lock Switch machine__map_x86_64_entry_trampolines and machine__for_each_kernel_map from loop macro maps__for_each_entry to maps__for_each_map function that takes a callback. The function holds the maps lock, which should be held during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b1928ca950386729b3bcd555efe559eaa1e2c8cc Author: Ian Rogers Date: Wed Dec 6 17:16:39 2023 -0800 perf tests: Use function to add missing maps lock Switch loop macro maps__for_each_entry to maps__for_each_map function that takes a callback. The function holds the maps lock, which should be held during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 431be14b193ad19946aeb26a6016dc5b8eb6a248 Author: Ian Rogers Date: Wed Dec 6 17:16:38 2023 -0800 perf report: Use function to add missing maps lock Switch maps__fprintf_task from loop macro maps__for_each_entry to maps__for_each_map function that takes a callback. The function holds the maps lock, which should be held during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit bc4bc56d9d74f4593f253531edcea9ea8e30e7f1 Author: Ian Rogers Date: Wed Dec 6 17:16:37 2023 -0800 perf events x86: Use function to add missing lock Switch from loop macro maps__for_each_entry to maps__for_each_map function that takes a callback. The function holds the maps lock, which should be held during iteration. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 19b5bd9a59bed4e9937092e2b685d69656bfc606 Author: Ian Rogers Date: Wed Dec 6 17:16:36 2023 -0800 perf maps: Add maps__for_each_map to iterate maps holding the lock The macro maps__for_each_entry is error prone as it doesn't require holding the maps lock. Add a new function that iterates the maps holding the read lock. Convert maps__find_symbol_by_name() and maps__fprintf() to use callbacks, the latter being an example of where the read lock wasn't being held. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5cc47ffba7b71e37d65c259f7f5778b3622f1e8f Author: Ian Rogers Date: Wed Dec 6 17:16:35 2023 -0800 perf map: Improve map/unmap parameter names The u64 values are either absolute or relative, try to hint better in the parameter names. Suggested-by: Namhyung Kim Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Rajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231207011722.1220634-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 67bc993446d340d4f059014f6be6ead35ec5f88b Author: Ian Rogers Date: Tue Nov 28 22:02:11 2023 -0800 libperf cpumap: Document perf_cpu_map__nr()'s behavior perf_cpu_map__nr()'s behavior around an empty CPU map is strange as it returns that there is 1 CPU. Changing code that may rely on this behavior is hard, we can at least document the behavior. Reviewed-by: James Clark Signed-off-by: Ian Rogers Acked-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Alexandre Ghiti Cc: Andrew Jones Cc: André Almeida Cc: Athira Rajeev Cc: Atish Patra Cc: Changbin Du Cc: Darren Hart Cc: Davidlohr Bueso Cc: Huacai Chen Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Nick Desaulniers Cc: Paolo Bonzini Cc: Paran Lee Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Will Deacon Cc: Yang Jihong Cc: Yang Li Cc: Yanteng Si Link: https://lore.kernel.org/r/20231129060211.1890454-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3e0594f9f0f774918d63701dc7de634bb1bc7b1e Author: Ian Rogers Date: Tue Nov 28 22:02:07 2023 -0800 perf top: Avoid repeated function calls to perf_cpu_map__nr(). Add a local variable to avoid repeated calls to perf_cpu_map__nr(). Reviewed-by: James Clark Signed-off-by: Adrian Hunter Signed-off-by: Ian Rogers Acked-by: Adrian Hunter Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Alexandre Ghiti Cc: Andrew Jones Cc: André Almeida Cc: Athira Rajeev Cc: Atish Patra Cc: Changbin Du Cc: Darren Hart Cc: Davidlohr Bueso Cc: Huacai Chen Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Nick Desaulniers Cc: Paolo Bonzini Cc: Paran Lee Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Will Deacon Cc: Yang Jihong Cc: Yang Li Cc: Yanteng Si Link: https://lore.kernel.org/r/20231129060211.1890454-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9a07a71ed3d23b56e1f05ea808ec5f59448fcc16 Author: Ian Rogers Date: Tue Nov 28 11:46:24 2023 -0800 perf tests: Make DSO tests a suite rather than individual Make the DSO data tests a suite rather than individual so their output is grouped. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Yang Jihong Link: https://lore.kernel.org/r/20231128194624.1419260-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0b4b785d1f2557678c493dc1b431ca4ad16fde9b Author: Arnaldo Carvalho de Melo Date: Fri Dec 15 15:23:30 2023 -0300 perf evlist: Move event attributes to after the / when uniquefying using the PMU name When turning an event with attributes to the format including the PMU we need to move the "event:attributes" format to "event/attributes/" so that we can copy the event displayed and use it in the command line, i.e. in 'perf top' we had: 1K cpu_atom/cycles:P/ 11K cpu_core/cycles:P/ If I try to use that on the command line: # perf top -e cpu_atom/cycles:P/ event syntax error: 'cpu_atom/cycles:P/' \___ Bad event or PMU Unable to find PMU or event on a PMU of 'cpu_atom' Initial error: event syntax error: 'cpu_atom/cycles:P/' \___ unknown term 'cycles:P' for pmu 'cpu_atom' valid terms: event,pc,edge,offcore_rsp,ldlat,inv,umask,cmask,config,config1,config2,config3,name,period,freq,branch_type,time,call-graph,stack-size,no-inherit,inherit,max-stack,nr,no-overwrite,overwrite ,driver-config,percore,aux-output,aux-sample-size,metric-id,raw,legacy-cache,hardware Run 'perf list' for a list of valid events Usage: perf top [] -e, --event event selector. use 'perf list' to list available events # Tested-by: Kan Liang Cc: Hector Martin Cc: Ian Rogers Cc: Marc Zyngier Cc: Mark Rutland Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZXxyanyZgWBTOnoK@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f600c77aeaff6e59806d7eef9ac269a7c1a6d817 Author: Jonathan Corbet Date: Mon Dec 18 17:18:08 2023 -0700 docs: ignore __counted_by attribute in structure definitions kernel-doc appeared to ignore __counted_by, but appearances can be deceiving; it caused member names to not be recognized, which manifested as a number of spurious "Excess struct member" warnings. Filter that attribute out and reduce the warning onslaught slightly. Signed-off-by: Jonathan Corbet commit 0ee28c9ae042e77100fae2cd82a54750668aafce Merge: 509afc7452707 c5a3f56fcdb0a Author: Jakub Kicinski Date: Mon Dec 18 16:17:33 2023 -0800 Merge tag 'wireless-next-2023-12-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.8 The second features pull request for v6.8. A bigger one this time with changes both to stack and drivers. We have a new Wifi band RFI (WBRF) mitigation feature for which we pulled an immutable branch shared with other subsystems. And, as always, other new features and bug fixes all over. Major changes: cfg80211/mac80211 * AMD ACPI based Wifi band RFI (WBRF) mitigation feature * Basic Service Set (BSS) usage reporting * TID to link mapping support * mac80211 hardware flag to disallow puncturing iwlwifi * new debugfs file fw_dbg_clear mt76 * NVMEM EEPROM improvements * mt7996 Extremely High Throughpu (EHT) improvements * mt7996 Wireless Ethernet Dispatcher (WED) support * mt7996 36-bit DMA support ath12k * support one MSI vector * WCN7850: support AP mode * tag 'wireless-next-2023-12-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (207 commits) wifi: mt76: mt7996: Use DECLARE_FLEX_ARRAY() and fix -Warray-bounds warnings wifi: ath11k: workaround too long expansion sparse warnings Revert "wifi: ath12k: use ATH12K_PCI_IRQ_DP_OFFSET for DP IRQ" wifi: rt2x00: remove useless code in rt2x00queue_create_tx_descriptor() wifi: rtw89: only reset BB/RF for existing WiFi 6 chips while starting up wifi: rtw89: add DBCC H2C to notify firmware the status wifi: rtw89: mac: add suffix _ax to MAC functions wifi: rtw89: mac: add flags to check if CMAC and DMAC are enabled wifi: rtw89: 8922a: add power on/off functions wifi: rtw89: add XTAL SI for WiFi 7 chips wifi: rtw89: phy: print out RFK log with formatted string wifi: rtw89: parse and print out RFK log from C2H events wifi: rtw89: add C2H event handlers of RFK log and report wifi: rtw89: load RFK log format string from firmware file wifi: rtw89: fw: add version field to BB MCU firmware element wifi: rtw89: fw: load TX power track tables from fw_element wifi: mwifiex: configure BSSID consistently when starting AP wifi: mwifiex: add extra delay for firmware ready wifi: mac80211: sta_info.c: fix sentence grammar wifi: mac80211: rx.c: fix sentence grammar ... ==================== Link: https://lore.kernel.org/r/20231218163900.C031DC433C9@smtp.kernel.org Signed-off-by: Jakub Kicinski commit 6914968a0b52507bf19d85e5fb9e35272e17cd35 Author: Dmitry Baryshkov Date: Sun Dec 17 01:59:10 2023 +0200 drm/bridge: properly refcount DT nodes in aux bridge drivers The aux-bridge and aux-hpd-bridge drivers didn't call of_node_get() on the device nodes further used for dev->of_node and platform data. When bridge devices are released, the reference counts are decreased, resulting in refcount underflow / use-after-free warnings. Get corresponding refcounts during AUX bridge allocation. Reported-by: Luca Weiss Fixes: 2a04739139b2 ("drm/bridge: add transparent bridge helper") Fixes: 26f4bac3d884 ("drm/bridge: aux-hpd: Replace of_device.h with explicit include") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231216235910.911958-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit ace196de694ebea5e2b3161e21ad169eb45accc6 Author: Dave Jiang Date: Thu Dec 14 12:13:58 2023 -0700 cxl: Fix unregister_region() callback parameter assignment In devm_cxl_add_region(), devm_add_action_or_reset() is called by passing in unregister_region() with data ptr of 'cxlr'. However, in unregister_region(), the passed in parameter is incorrectly assumed to be a 'struct device' rather than the 'cxlr' pointer. The code has been working because 'struct device' is the first member of 'struct cxl_region'. Issue found by inspection. Fix the assignment so that cxlr is pointing directly to the passed in parameter. Not flagged for -stable since there is no functional impact of this fix. Signed-off-by: Dave Jiang Reviewed-by: Ira Weiny Link: https://lore.kernel.org/r/170258123810.952211.3907381447996426480.stgit@djiang5-mobl3 Signed-off-by: Dan Williams commit aed5ed595960c6d301dcd4ed31aeaa7a8054c0c6 Author: Mukesh Ojha Date: Sat Nov 25 02:41:58 2023 +0530 PM / devfreq: Synchronize devfreq_monitor_[start/stop] There is a chance if a frequent switch of the governor done in a loop result in timer list corruption where timer cancel being done from two place one from cancel_delayed_work_sync() and followed by expire_timers() can be seen from the traces[1]. while true do echo "simple_ondemand" > /sys/class/devfreq/1d84000.ufshc/governor echo "performance" > /sys/class/devfreq/1d84000.ufshc/governor done It looks to be issue with devfreq driver where device_monitor_[start/stop] need to synchronized so that delayed work should get corrupted while it is either being queued or running or being cancelled. Let's use polling flag and devfreq lock to synchronize the queueing the timer instance twice and work data being corrupted. [1] ... .. -0 [003] 9436.209662: timer_cancel timer=0xffffff80444f0428 -0 [003] 9436.209664: timer_expire_entry timer=0xffffff80444f0428 now=0x10022da1c function=__typeid__ZTSFvP10timer_listE_global_addr baseclk=0x10022da1c -0 [003] 9436.209718: timer_expire_exit timer=0xffffff80444f0428 kworker/u16:6-14217 [003] 9436.209863: timer_start timer=0xffffff80444f0428 function=__typeid__ZTSFvP10timer_listE_global_addr expires=0x10022da2b now=0x10022da1c flags=182452227 vendor.xxxyyy.ha-1593 [004] 9436.209888: timer_cancel timer=0xffffff80444f0428 vendor.xxxyyy.ha-1593 [004] 9436.216390: timer_init timer=0xffffff80444f0428 vendor.xxxyyy.ha-1593 [004] 9436.216392: timer_start timer=0xffffff80444f0428 function=__typeid__ZTSFvP10timer_listE_global_addr expires=0x10022da2c now=0x10022da1d flags=186646532 vendor.xxxyyy.ha-1593 [005] 9436.220992: timer_cancel timer=0xffffff80444f0428 xxxyyyTraceManag-7795 [004] 9436.261641: timer_cancel timer=0xffffff80444f0428 [2] 9436.261653][ C4] Unable to handle kernel paging request at virtual address dead00000000012a [ 9436.261664][ C4] Mem abort info: [ 9436.261666][ C4] ESR = 0x96000044 [ 9436.261669][ C4] EC = 0x25: DABT (current EL), IL = 32 bits [ 9436.261671][ C4] SET = 0, FnV = 0 [ 9436.261673][ C4] EA = 0, S1PTW = 0 [ 9436.261675][ C4] Data abort info: [ 9436.261677][ C4] ISV = 0, ISS = 0x00000044 [ 9436.261680][ C4] CM = 0, WnR = 1 [ 9436.261682][ C4] [dead00000000012a] address between user and kernel address ranges [ 9436.261685][ C4] Internal error: Oops: 96000044 [#1] PREEMPT SMP [ 9436.261701][ C4] Skip md ftrace buffer dump for: 0x3a982d0 ... [ 9436.262138][ C4] CPU: 4 PID: 7795 Comm: TraceManag Tainted: G S W O 5.10.149-android12-9-o-g17f915d29d0c #1 [ 9436.262141][ C4] Hardware name: Qualcomm Technologies, Inc. (DT) [ 9436.262144][ C4] pstate: 22400085 (nzCv daIf +PAN -UAO +TCO BTYPE=--) [ 9436.262161][ C4] pc : expire_timers+0x9c/0x438 [ 9436.262164][ C4] lr : expire_timers+0x2a4/0x438 [ 9436.262168][ C4] sp : ffffffc010023dd0 [ 9436.262171][ C4] x29: ffffffc010023df0 x28: ffffffd0636fdc18 [ 9436.262178][ C4] x27: ffffffd063569dd0 x26: ffffffd063536008 [ 9436.262182][ C4] x25: 0000000000000001 x24: ffffff88f7c69280 [ 9436.262185][ C4] x23: 00000000000000e0 x22: dead000000000122 [ 9436.262188][ C4] x21: 000000010022da29 x20: ffffff8af72b4e80 [ 9436.262191][ C4] x19: ffffffc010023e50 x18: ffffffc010025038 [ 9436.262195][ C4] x17: 0000000000000240 x16: 0000000000000201 [ 9436.262199][ C4] x15: ffffffffffffffff x14: ffffff889f3c3100 [ 9436.262203][ C4] x13: ffffff889f3c3100 x12: 00000000049f56b8 [ 9436.262207][ C4] x11: 00000000049f56b8 x10: 00000000ffffffff [ 9436.262212][ C4] x9 : ffffffc010023e50 x8 : dead000000000122 [ 9436.262216][ C4] x7 : ffffffffffffffff x6 : ffffffc0100239d8 [ 9436.262220][ C4] x5 : 0000000000000000 x4 : 0000000000000101 [ 9436.262223][ C4] x3 : 0000000000000080 x2 : ffffff889edc155c [ 9436.262227][ C4] x1 : ffffff8001005200 x0 : ffffff80444f0428 [ 9436.262232][ C4] Call trace: [ 9436.262236][ C4] expire_timers+0x9c/0x438 [ 9436.262240][ C4] __run_timers+0x1f0/0x330 [ 9436.262245][ C4] run_timer_softirq+0x28/0x58 [ 9436.262255][ C4] efi_header_end+0x168/0x5ec [ 9436.262265][ C4] __irq_exit_rcu+0x108/0x124 [ 9436.262274][ C4] __handle_domain_irq+0x118/0x1e4 [ 9436.262282][ C4] gic_handle_irq.30369+0x6c/0x2bc [ 9436.262286][ C4] el0_irq_naked+0x60/0x6c Link: https://lore.kernel.org/all/1700860318-4025-1-git-send-email-quic_mojha@quicinc.com/ Reported-by: Joyyoung Huang Acked-by: MyungJoo Ham Signed-off-by: Mukesh Ojha Signed-off-by: Chanwoo Choi commit 8e432e6197cef6250dfd6fdffd41c06613c874ca Author: Andrii Nakryiko Date: Mon Dec 18 09:36:01 2023 -0800 bpf: Ensure precise is reset to false in __mark_reg_const_zero() It is safe to always start with imprecise SCALAR_VALUE register. Previously __mark_reg_const_zero() relied on caller to reset precise mark, but it's very error prone and we already missed it in a few places. So instead make __mark_reg_const_zero() reset precision always, as it's a safe default for SCALAR_VALUE. Explanation is basically the same as for why we are resetting (or rather not setting) precision in current state. If necessary, precision propagation will set it to precise correctly. As such, also remove a big comment about forward precision propagation in mark_reg_stack_read() and avoid unnecessarily setting precision to true after reading from STACK_ZERO stack. Again, precision propagation will correctly handle this, if that SCALAR_VALUE register will ever be needed to be precise. Reported-by: Maxim Mikityanskiy Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Maxim Mikityanskiy Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231218173601.53047-1-andrii@kernel.org commit 7085e4e2ff436df5d65811b39923dae3c218d843 Merge: 915fdc94f16e2 ebe7f33937848 Author: Linus Walleij Date: Mon Dec 18 23:42:42 2023 +0100 Merge tag 'intel-pinctrl-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v6.8-1 * New agnostic driver to support Lunar Lake and newer platforms * New driver for Intel Meteor Point-S (PCH for Meteor Lake-S) * Update drivers to use new PM helpers * Use RAII for locking in a few drivers (Raag, Andy) * Reduce locking scope in some functions (Raag) * Miscellaneous cleanups (Raag) The following is an automated git shortlog grouped by driver: alderlake: - Switch to use Intel pin control PM ops baytrail: - Simplify code with cleanup helpers - Move default strength assignment to a switch-case - Factor out byt_gpio_force_input_mode() - Fix types of config value in byt_pin_config_set() broxton: - Switch to use Intel pin control PM ops cannonlake: - Switch to use Intel pin control PM ops cedarfork: - Switch to use Intel pin control PM ops denverton: - Switch to use Intel pin control PM ops elkhartlake: - Switch to use Intel pin control PM ops emmitsburg: - Switch to use Intel pin control PM ops geminilake: - Switch to use Intel pin control PM ops icelake: - Switch to use Intel pin control PM ops intel: - Add Intel Meteor Point pin controller and GPIO support - use the correct _PM_OPS() export macro - Add a generic Intel pin control platform driver - Revert "Unexport intel_pinctrl_probe()" - allow independent COMPILE_TEST - Refactor intel_pinctrl_get_soc_data() - Move default strength assignment to a switch-case - Make PM ops functions static - Provide Intel pin control wide PM ops structure jasperlake: - Switch to use Intel pin control PM ops lakefield: - Switch to use Intel pin control PM ops lewisburg: - Switch to use Intel pin control PM ops lynxpoint: - Simplify code with cleanup helpers meteorlake: - Switch to use Intel pin control PM ops sunrisepoint: - Switch to use Intel pin control PM ops tangier: - simplify locking using cleanup helpers - Move default strength assignment to a switch-case - Enable 910 Ohm bias tigerlake: - Switch to use Intel pin control PM ops Signed-off-by: Linus Walleij commit 509afc7452707e62fb7c4bb257f111617332ffad Merge: 610a689d2a57a 9b0aa2244d9d1 Author: Jakub Kicinski Date: Mon Dec 18 14:40:42 2023 -0800 Merge branch 'tools-net-ynl-add-sub-message-support-to-ynl' Donald Hunter says: ==================== tools/net/ynl: Add 'sub-message' support to ynl This patchset adds a 'sub-message' attribute type to the netlink-raw schema and implements it in ynl. This provides support for kind-specific options attributes as used in rt_link and tc raw netlink families. A description of the new 'sub-message' attribute type and the corresponding sub-message definitions is provided in patch 3. The patchset includes updates to the rt_link spec and a new tc spec that make use of the new 'sub-message' attribute type. As mentioned in patch 4, encode support is not yet implemented in ynl and support for sub-message selectors at a different nest level from the key attribute is not yet supported. I plan to work on these in follow-up patches. Patches 1 is code cleanup in ynl Patches 2-4 add sub-message support to the schema and ynl with documentation updates. Patch 5 adds binary and pad support to structs in netlink-raw. Patches 6-8 contain specs that use the sub-message attribute type. Patches 9-13 update ynl-gen-rst and its make target ==================== Link: https://lore.kernel.org/r/20231215093720.18774-1-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 9b0aa2244d9d12cc39726ffabc0609a029fda95c Author: Donald Hunter Date: Fri Dec 15 09:37:20 2023 +0000 tools/net/ynl-gen-rst: Remove extra indentation from generated docs The output from ynl-gen-rst.py has extra indentation that causes extra
elements to be generated in the HTML output. Reduce the indentation so that sphinx doesn't generate unnecessary
elements. Reviewed-by: Breno Leitao Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-14-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit e9d7c59212e43f079dffaf65001b006da6a12580 Author: Donald Hunter Date: Fri Dec 15 09:37:19 2023 +0000 tools/net/ynl-gen-rst: Remove bold from attribute-set headings The generated .rst for attribute-sets currently uses a sub-sub-heading for each attribute, with the attribute name in bold. This makes attributes stand out more than the attribute-set sub-headings they are part of. Remove the bold markup from attribute sub-sub-headings. Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-13-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit e8c32339cf49cd9c2626e143c548f5897aa58b17 Author: Donald Hunter Date: Fri Dec 15 09:37:18 2023 +0000 tools/net/ynl-gen-rst: Sort the index of generated netlink specs The index of netlink specs was being generated unsorted. Sort the output before generating the index entries. Reviewed-by: Jakub Kicinski Reviewed-by: Breno Leitao Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-12-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 6235b3d8bc3f81e81561c151237503fcf7868a98 Author: Donald Hunter Date: Fri Dec 15 09:37:17 2023 +0000 tools/net/ynl-gen-rst: Add sub-messages to generated docs Add a section for sub-messages to the generated .rst files. Reviewed-by: Breno Leitao Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-11-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 646158f20cbc4f93f5318f8adee0f3f5b92ff6a8 Author: Donald Hunter Date: Fri Dec 15 09:37:16 2023 +0000 doc/netlink: Regenerate netlink .rst files if ynl-gen-rst changes Add ynl-gen-rst.py to the dependencies for the netlink .rst files in the doc Makefile so that the docs get regenerated if the ynl-gen-rst.py script is modified. Use $(Q) to honour V=1 in the rules that run ynl-gen-rst.py Reviewed-by: Jakub Kicinski Reviewed-by: Breno Leitao Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-10-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit a1bcfde83669accf5890ff33e4ba5f3ccbbc3047 Author: Donald Hunter Date: Fri Dec 15 09:37:15 2023 +0000 doc/netlink/specs: Add a spec for tc This is a work-in-progress spec for tc that covers: - most of the qdiscs - the flower classifier - new, del, get for qdisc, chain, class and filter Notable omissions: - most of the stats attrs are left as binary blobs - notifications are not yet implemented Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-9-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 6b4b0754ef8a3fb3c5f772cf6c70bd33936b6431 Author: Donald Hunter Date: Fri Dec 15 09:37:14 2023 +0000 doc/netlink/specs: use pad in structs in rt_link The rt_link spec was using pad1, pad2 attributes in structs which appears in the ynl output. Replace this with the 'pad' type which doesn't pollute the output. Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-8-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 077b6022d24bef54f72d0aeb81fbeca8e900c94e Author: Donald Hunter Date: Fri Dec 15 09:37:13 2023 +0000 doc/netlink/specs: Add sub-message type to rt_link family Start using sub-message selectors in the rt_link spec for the link-specific 'data' and 'slave-data' attributes. Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-7-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 8b6811d96666b7ea0a53f56e65cc656d390feb19 Author: Donald Hunter Date: Fri Dec 15 09:37:12 2023 +0000 tools/net/ynl: Add binary and pad support to structs for tc The tc netlink-raw family needs binary and pad types for several qopt C structs. Add support for them to ynl. Reviewed-by: Jakub Kicinski Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-6-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 1769e2be4baaa3273b56d1137bf67a6a747222ed Author: Donald Hunter Date: Fri Dec 15 09:37:11 2023 +0000 tools/net/ynl: Add 'sub-message' attribute decoding to ynl Implement the 'sub-message' attribute type in ynl. Encode support is not yet implemented. Support for sub-message selectors at a different nest level from the key attribute is not yet supported. Reviewed-by: Jakub Kicinski Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-5-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 17ed5c1a9e3674a7e6b3e7bd66824ecd79ecce02 Author: Donald Hunter Date: Fri Dec 15 09:37:10 2023 +0000 doc/netlink: Document the sub-message format for netlink-raw Document the spec format used by netlink-raw families like rt and tc. Reviewed-by: Jakub Kicinski Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-4-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit de2d98743b83cf970f75b7cbf650c08a659121a5 Author: Donald Hunter Date: Fri Dec 15 09:37:09 2023 +0000 doc/netlink: Add sub-message support to netlink-raw Add a 'sub-message' attribute type with a selector that supports polymorphic attribute formats for raw netlink families like tc. A sub-message attribute uses the value of another attribute as a selector key to choose the right sub-message format. For example if the following attribute has already been decoded: { "kind": "gre" } and we encounter the following attribute spec: - name: data type: sub-message sub-message: linkinfo-data-msg selector: kind Then we look for a sub-message definition called 'linkinfo-data-msg' and use the value of the 'kind' attribute i.e. 'gre' as the key to choose the correct format for the sub-message: sub-messages: name: linkinfo-data-msg formats: - value: bridge attribute-set: linkinfo-bridge-attrs - value: gre attribute-set: linkinfo-gre-attrs - value: geneve attribute-set: linkinfo-geneve-attrs This would decode the attribute value as a sub-message with the attribute-set called 'linkinfo-gre-attrs' as the attribute space. A sub-message can have an optional 'fixed-header' followed by zero or more attributes from an attribute-set. For example the following 'tc-options-msg' sub-message defines message formats that use a mixture of fixed-header, attribute-set or both together: sub-messages: - name: tc-options-msg formats: - value: bfifo fixed-header: tc-fifo-qopt - value: cake attribute-set: tc-cake-attrs - value: netem fixed-header: tc-netem-qopt attribute-set: tc-netem-attrs Reviewed-by: Jakub Kicinski Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-3-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 62691b801daa497e36ad77636c3a6cd0f6dda440 Author: Donald Hunter Date: Fri Dec 15 09:37:08 2023 +0000 tools/net/ynl: Use consistent array index expression formatting Use expression formatting that conforms to the python style guide. Reviewed-by: Jakub Kicinski Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231215093720.18774-2-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 6f517e044096fd78fa6f19b3da20579426980af7 Author: Lars-Peter Clausen Date: Sat Jul 22 16:08:48 2023 -0700 PCI: endpoint: pci-epf-test: Make struct pci_epf_ops const The pci_epf_ops struct for the PCI endpoint test driver is never modified. Mark it as const so it can be placed in the read-only section. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230722230848.589428-5-lars@metafoo.de Signed-off-by: Lars-Peter Clausen Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit c21b53deda09a5502f0201750fe61512345468e2 Author: Lars-Peter Clausen Date: Sat Jul 22 16:08:47 2023 -0700 PCI: endpoint: pci-epf-vntb: Make struct pci_epf_ops const The pci_epf_ops struct for the PCI endpoint vNTB driver is never modified. Mark it as const so it can be placed in the read-only section. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230722230848.589428-4-lars@metafoo.de Signed-off-by: Lars-Peter Clausen Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit 54f22c9758dcde2dfde4bf91c8fd0bdc952f1e14 Author: Lars-Peter Clausen Date: Sat Jul 22 16:08:46 2023 -0700 PCI: endpoint: pci-epf-ntb: Make struct pci_epf_ops const The pci_epf_ops struct for the PCI endpoint NTB driver is never modified. Mark it as const so it can be placed in the read-only section. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230722230848.589428-3-lars@metafoo.de Signed-off-by: Lars-Peter Clausen Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit 150d04ddf3861c079fa1e9d96d3b52c399944f85 Author: Lars-Peter Clausen Date: Sat Jul 22 16:08:45 2023 -0700 PCI: endpoint: pci-epf-mhi: Make structs pci_epf_ops and pci_epf_event_ops const Both the pci_epf_ops and pci_epf_evnt_ops structs for the PCI endpoint MHI driver are never modified. Mark them as const so they can be placed in the read-only section. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230722230848.589428-2-lars@metafoo.de Signed-off-by: Lars-Peter Clausen Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit 86362293044b382aece355f9e4e3f7116dcd1eae Author: Lars-Peter Clausen Date: Sat Jul 22 16:08:44 2023 -0700 PCI: endpoint: Make struct pci_epf_ops in pci_epf_driver const The pci_epf_ops struct contains a set of callbacks that are used by the pci_epf_driver, and is never modified by the EPF core itself. Marking the struct pointer const allows EPF drivers to declare their pci_epf_ops struct to be const. This allows the struct to be placed in the read-only section. Which for example brings some security benefits as the callbacks can not be overwritten. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230722230848.589428-1-lars@metafoo.de Signed-off-by: Lars-Peter Clausen Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam commit 342fb9789267ee3908959bfa136b82e88e2ce918 Author: Michal Wajdeczko Date: Fri Dec 15 16:13:27 2023 +0100 kunit: Reset test->priv after each param iteration If we run parameterized test that uses test->priv to prepare some custom data, then value of test->priv will leak to the next param iteration and may be unexpected. This could be easily seen if we promote example_priv_test to parameterized test as then only first test iteration will be successful: $ ./tools/testing/kunit/kunit.py run \ --kunitconfig ./lib/kunit/.kunitconfig *.example_priv* [ ] Starting KUnit Kernel (1/1)... [ ] ============================================================ [ ] =================== example (1 subtest) ==================== [ ] ==================== example_priv_test ==================== [ ] [PASSED] example value 3 [ ] # example_priv_test: initializing [ ] # example_priv_test: ASSERTION FAILED at lib/kunit/kunit-example-test.c:230 [ ] Expected test->priv == ((void *)0), but [ ] test->priv == 0000000060dfe290 [ ] ((void *)0) == 0000000000000000 [ ] # example_priv_test: cleaning up [ ] [FAILED] example value 2 [ ] # example_priv_test: initializing [ ] # example_priv_test: ASSERTION FAILED at lib/kunit/kunit-example-test.c:230 [ ] Expected test->priv == ((void *)0), but [ ] test->priv == 0000000060dfe290 [ ] ((void *)0) == 0000000000000000 [ ] # example_priv_test: cleaning up [ ] [FAILED] example value 1 [ ] # example_priv_test: initializing [ ] # example_priv_test: ASSERTION FAILED at lib/kunit/kunit-example-test.c:230 [ ] Expected test->priv == ((void *)0), but [ ] test->priv == 0000000060dfe290 [ ] ((void *)0) == 0000000000000000 [ ] # example_priv_test: cleaning up [ ] [FAILED] example value 0 [ ] # example_priv_test: initializing [ ] # example_priv_test: cleaning up [ ] # example_priv_test: pass:1 fail:3 skip:0 total:4 [ ] ================ [FAILED] example_priv_test ================ [ ] # example: initializing suite [ ] # module: kunit_example_test [ ] # example: exiting suite [ ] # Totals: pass:1 fail:3 skip:0 total:4 [ ] ===================== [FAILED] example ===================== Fix that by resetting test->priv after each param iteration, in similar way what we did for the test->status. Signed-off-by: Michal Wajdeczko Cc: David Gow Cc: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 2b61582acd19c1a3693b02f50b681a05236305ad Author: Michal Wajdeczko Date: Fri Dec 15 16:13:26 2023 +0100 kunit: Add example for using test->priv In a test->priv field the user can store arbitrary data. Add example how to use this feature in the test code. Signed-off-by: Michal Wajdeczko Cc: David Gow Cc: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit d393acce7b3f046a1086362317a05f2cac01fa89 Author: Maxime Ripard Date: Fri Dec 15 15:39:12 2023 +0800 drm/tests: Switch to kunit devices Kunit recently gained helpers to create test managed devices. This means that we no longer have to roll our own helpers in KMS and we can reuse them. Signed-off-by: Maxime Ripard Tested-by: David Gow Signed-off-by: David Gow Signed-off-by: Shuah Khan commit e57cdff0ddc493f23d510b0848a17d81028e329b Author: davidgow@google.com Date: Fri Dec 15 15:39:11 2023 +0800 ASoC: topology: Replace fake root_device with kunit_device in tests Using struct root_device to create fake devices for tests is something of a hack. The new struct kunit_device is meant for this purpose, so use it instead. Acked-by: Mark Brown Signed-off-by: David Gow Signed-off-by: Shuah Khan commit 837018388e18bd740fb4f4371858f3e3a477fab8 Author: davidgow@google.com Date: Fri Dec 15 15:39:10 2023 +0800 overflow: Replace fake root_device with kunit_device Using struct root_device to create fake devices for tests is something of a hack. The new struct kunit_device is meant for this purpose, so use it instead. Reviewed-by: Matti Vaittinen Acked-by: Kees Cook Signed-off-by: David Gow Signed-off-by: Shuah Khan commit 46ee8f688e43d1b3a81a3494e59f9861d4de73bf Author: davidgow@google.com Date: Fri Dec 15 15:39:09 2023 +0800 fortify: test: Use kunit_device Using struct root_device to create fake devices for tests is something of a hack. The new struct kunit_device is meant for this purpose, so use it instead. Reviewed-by: Matti Vaittinen Acked-by: Kees Cook Signed-off-by: David Gow Signed-off-by: Shuah Khan commit d03c720e03bd9bf0b784d80b5d3ede7e2daf3b6e Author: davidgow@google.com Date: Fri Dec 15 15:39:08 2023 +0800 kunit: Add APIs for managing devices Tests for drivers often require a struct device to pass to other functions. While it's possible to create these with root_device_register(), or to use something like a platform device, this is both a misuse of those APIs, and can be difficult to clean up after, for example, a failed assertion. Add some KUnit-specific functions for registering and unregistering a struct device: - kunit_device_register() - kunit_device_register_with_driver() - kunit_device_unregister() These helpers allocate a on a 'kunit' bus which will either probe the driver passed in (kunit_device_register_with_driver), or will create a stub driver (kunit_device_register) which is cleaned up on test shutdown. Devices are automatically unregistered on test shutdown, but can be manually unregistered earlier with kunit_device_unregister() in order to, for example, test device release code. Reviewed-by: Matti Vaittinen Reviewed-by: Maxime Ripard Signed-off-by: David Gow Reviewed-by: Greg Kroah-Hartman Signed-off-by: Shuah Khan commit e9f0e21ceb65ea5e450ede7c9b9a5bfc90a403ae Author: Rae Moar Date: Wed Dec 13 19:44:21 2023 +0000 Documentation: Add debugfs docs with run after boot Expand the documentation on the KUnit debugfs filesystem on the run_manual.rst page. Add section describing how to access results using debugfs. Add section describing how to run tests after boot using debugfs. Reviewed-by: David Gow Signed-off-by: Rae Moar Signed-off-by: Shuah Khan commit c72a870926c2de694942aaac2b49e59ce789bb74 Author: Rae Moar Date: Wed Dec 13 19:44:20 2023 +0000 kunit: add ability to run tests after boot using debugfs Add functionality to run built-in tests after boot by writing to a debugfs file. Add a new debugfs file labeled "run" for each test suite to use for this purpose. As an example, write to the file using the following: echo "any string" > /sys/kernel/debugfs/kunit//run This will trigger the test suite to run and will print results to the kernel log. To guard against running tests concurrently with this feature, add a mutex lock around running kunit. This supports the current practice of not allowing tests to be run concurrently on the same kernel. This new functionality could be used to design a parameter injection feature in the future. Fixed up merge conflict duing rebase to Linux 6.7-rc6 Signed-off-by: Shuah Khan Reviewed-by: David Gow Signed-off-by: Rae Moar Signed-off-by: Shuah Khan commit 6c4ea2f48de9860217ddfedee081d485dbeea7e8 Author: Rae Moar Date: Wed Dec 13 19:44:19 2023 +0000 kunit: add is_init test attribute Add is_init test attribute of type bool. Add to_string, get, and filter methods to lib/kunit/attributes.c. Mark each of the tests in the init section with the is_init=true attribute. Add is_init to the attributes documentation. Reviewed-by: David Gow Signed-off-by: Rae Moar Signed-off-by: Shuah Khan commit 2cf45281570f76f973bd8d17596684d1875002df Author: Rae Moar Date: Wed Dec 13 19:44:18 2023 +0000 kunit: add example suite to test init suites Add example_init_test_suite to allow for testing the feature of running test suites marked as init to indicate they use init data and/or functions. This suite should always pass and uses a simple init function. This suite can also be used to test the is_init attribute introduced in the next patch. Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit d81f0d7b8b23ec79f80be602ed6129ded27862e8 Author: Rae Moar Date: Wed Dec 13 19:44:17 2023 +0000 kunit: add KUNIT_INIT_TABLE to init linker section Add KUNIT_INIT_TABLE to the INIT_DATA linker section. Alter the KUnit macros to create init tests: kunit_test_init_section_suites Update lib/kunit/executor.c to run both the suites in KUNIT_TABLE and KUNIT_INIT_TABLE. Reviewed-by: David Gow Signed-off-by: Rae Moar Signed-off-by: Shuah Khan commit 69dfdce1c5161a37a14720e5f6f62a36e387aa33 Author: Rae Moar Date: Wed Dec 13 19:44:16 2023 +0000 kunit: move KUNIT_TABLE out of INIT_DATA Alter the linker section of KUNIT_TABLE to move it out of INIT_DATA and into DATA_DATA. Data for KUnit tests does not need to be in the init section. In order to run tests again after boot the KUnit data cannot be labeled as init data as the kernel could write over it. Add a KUNIT_INIT_TABLE in the next patch for KUnit tests that test init data/functions. Reviewed-by: David Gow Signed-off-by: Rae Moar Signed-off-by: Shuah Khan commit 6eb0ea28c8e80ead03f08cf8cbdacf08d3073bd6 Author: Rae Moar Date: Thu Dec 7 21:34:10 2023 +0000 kunit: tool: add test for parsing attributes Add test for parsing attributes to kunit_tool_test.py. Test checks attributes are parsed and saved in the test logs. This test also checks that the attributes have not interfered with the parsing of other test information, specifically the suite header as the test plan was being incorrectely parsed. Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 8ae27bc7fff4ef467a7964821a6cedb34a05d3b2 Author: Rae Moar Date: Thu Dec 7 21:34:09 2023 +0000 kunit: tool: fix parsing of test attributes Add parsing of attributes as diagnostic data. Fixes issue with test plan being parsed incorrectly as diagnostic data when located after suite-level attributes. Note that if there does not exist a test plan line, the diagnostic lines between the suite header and the first result will be saved in the suite log rather than the first test case log. Signed-off-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 1557e89d3af51a4f1bd6870b3117bed651de5dbf Author: Richard Fitzgerald Date: Mon Oct 30 10:47:32 2023 +0000 kunit: debugfs: Handle errors from alloc_string_stream() In kunit_debugfs_create_suite() give up and skip creating the debugfs file if any of the alloc_string_stream() calls return an error or NULL. Only put a value in the log pointer of kunit_suite and kunit_test if it is a valid pointer to a log. This prevents the potential invalid dereference reported by smatch: lib/kunit/debugfs.c:115 kunit_debugfs_create_suite() error: 'suite->log' dereferencing possible ERR_PTR() lib/kunit/debugfs.c:119 kunit_debugfs_create_suite() error: 'test_case->log' dereferencing possible ERR_PTR() Signed-off-by: Richard Fitzgerald Reported-by: Dan Carpenter Fixes: 05e2006ce493 ("kunit: Use string_stream for test log") Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 34dfd5bb2e5507e69d9b6d6c90f546600c7a4977 Author: Richard Fitzgerald Date: Mon Oct 30 10:47:58 2023 +0000 kunit: debugfs: Fix unchecked dereference in debugfs_print_results() Move the call to kunit_suite_has_succeeded() after the check that the kunit_suite pointer is valid. This was found by smatch: lib/kunit/debugfs.c:66 debugfs_print_results() warn: variable dereferenced before check 'suite' (see line 63) Signed-off-by: Richard Fitzgerald Reported-by: Dan Carpenter Fixes: 38289a26e1b8 ("kunit: fix debugfs code to use enum kunit_status, not bool") Reviewed-by: Rae Moar Signed-off-by: Shuah Khan commit 15bf0000147ae9fc8fa4969025f71848fc558cba Author: Richard Fitzgerald Date: Mon Oct 30 10:47:46 2023 +0000 kunit: string-stream: Allow ERR_PTR to be passed to string_stream_destroy() Check the stream pointer passed to string_stream_destroy() for IS_ERR_OR_NULL() instead of only NULL. Whatever alloc_string_stream() returns should be safe to pass to string_stream_destroy(), and that will be an ERR_PTR. It's obviously good practise and generally helpful to also check for NULL pointers so that client cleanup code can call string_stream_destroy() unconditionally - which could include pointers that have never been set to anything and so are NULL. Signed-off-by: Richard Fitzgerald Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit 37f0d37ffce1d162bfaf7f426afca38f6fe15472 Author: Richard Fitzgerald Date: Tue Nov 21 16:24:57 2023 +0000 kunit: string-stream-test: Avoid cast warning when testing gfp_t flags Passing a gfp_t to KUNIT_EXPECT_EQ() causes a cast warning: lib/kunit/string-stream-test.c:73:9: sparse: sparse: incorrect type in initializer (different base types) expected long long right_value got restricted gfp_t const __right Avoid this by testing stream->gfp for the expected value and passing the boolean result of this comparison to KUNIT_EXPECT_TRUE(), as was already done a few lines above in string_stream_managed_init_test(). Signed-off-by: Richard Fitzgerald Fixes: d1a0d699bfc0 ("kunit: string-stream: Add tests for freeing resource-managed string_stream") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311181918.0mpCu2Xh-lkp@intel.com/ Reviewed-by: Rae Moar Reviewed-by: David Gow Signed-off-by: Shuah Khan commit a08d4d6284393d44ef4e076288c31d04fc469a58 Author: David Gow Date: Tue Nov 28 15:24:07 2023 +0800 drm/vc4: tests: Use KUNIT_DEFINE_ACTION_WRAPPER In order to pass functions to kunit_add_action(), they need to be of the kunit_action_t type. While casting the function pointer can work, it will break control-flow integrity. vc4_mock already defines such a wrapper for drm_dev_unregister(), but it involves less boilerplate to use the new macro, so replace the manual implementation. Signed-off-by: David Gow Reviewed-by: Maxime Ripard Signed-off-by: Shuah Khan commit e847934bb124b2ad14bf967d6682e43b0b94c78a Author: David Gow Date: Tue Nov 28 15:24:06 2023 +0800 drm/tests: Use KUNIT_DEFINE_ACTION_WRAPPER() In order to pass functions to kunit_add_action(), they need to be of the kunit_action_t type. While casting the function pointer can work, it will break control-flow integrity. drm_kunit_helpers already defines wrappers, but we now have a macro which does this automatically. Using this greatly reduces the boilerplate needed. Acked-by: Maxime Ripard Signed-off-by: David Gow Signed-off-by: Shuah Khan commit 56778b49c9a2cbc32c6b0fbd3ba1a9d64192d3af Author: David Gow Date: Tue Nov 28 15:24:05 2023 +0800 kunit: Add a macro to wrap a deferred action function KUnit's deferred action API accepts a void(*)(void *) function pointer which is called when the test is exited. However, we very frequently want to use existing functions which accept a single pointer, but which may not be of type void*. While this is probably dodgy enough to be on the wrong side of the C standard, it's been often used for similar callbacks, and gcc's -Wcast-function-type seems to ignore cases where the only difference is the type of the argument, assuming it's compatible (i.e., they're both pointers to data). However, clang 16 has introduced -Wcast-function-type-strict, which no longer permits any deviation in function pointer type. This seems to be because it'd break CFI, which validates the type of function calls. This rather ruins our attempts to cast functions to defer them, and leaves us with a few options. The one we've chosen is to implement a macro which will generate a wrapper function which accepts a void*, and casts the argument to the appropriate type. For example, if you were trying to wrap: void foo_close(struct foo *handle); you could use: KUNIT_DEFINE_ACTION_WRAPPER(kunit_action_foo_close, foo_close, struct foo *); This would create a new kunit_action_foo_close() function, of type kunit_action_t, which could be passed into kunit_add_action() and similar functions. In addition to defining this macro, update KUnit and its tests to use it. Link: https://github.com/ClangBuiltLinux/linux/issues/1750 Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Acked-by: Daniel Vetter Reviewed-by: Maxime Ripard Signed-off-by: David Gow Signed-off-by: Shuah Khan commit 6aa7ca3c7dcc5effc4963d18b300fc942e738a3b Author: Jesse Brandeburg Date: Tue Dec 5 17:01:14 2023 -0800 idpf: refactor some missing field get/prep conversions Most of idpf correctly uses FIELD_GET and FIELD_PREP, but a couple spots were missed so fix those. Automated conversion with coccinelle script and manually fixed up, including audits for opportunities to convert to {get,encode,replace} bits functions. Add conversions to le16_get/encode/replace_bits where appropriate. And in one place fix up a cast from a u16 to a u16. @prep2@ constant shift,mask; type T; expression a; @@ -(((T)(a) << shift) & mask) +FIELD_PREP(mask, a) @prep@ constant shift,mask; type T; expression a; @@ -((T)((a) << shift) & mask) +FIELD_PREP(mask, a) @get@ constant shift,mask; type T; expression a; @@ -((T)((a) & mask) >> shift) +FIELD_GET(mask, a) and applied via: spatch --sp-file field_prep.cocci --in-place --dir \ drivers/net/ethernet/intel/ CC: Alexander Lobakin Reviewed-by: Przemek Kitszel Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit 316a28daa805b553d11499d0436ebd87529e9189 Author: Jesse Brandeburg Date: Tue Dec 5 17:01:13 2023 -0800 ice: cleanup inconsistent code It was found while doing further testing of the previous commit fbf32a9bab91 ("ice: field get conversion") that one of the FIELD_GET conversions should really be a FIELD_PREP. The previous code was styled as a match to the FIELD_GET conversion, which always worked because the shift value was 0. The code makes way more sense as a FIELD_PREP and was in fact the only FIELD_GET with two constant arguments in this series. Didn't squash this patch to make it easier to call out the (non-impactful) bug. Signed-off-by: Jesse Brandeburg Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 5a259f8e0bafaa8d2a0e6d61f1c64e10b3139901 Author: Jesse Brandeburg Date: Tue Dec 5 17:01:12 2023 -0800 ice: field get conversion Refactor the ice driver to use FIELD_GET() for mask and shift reads, which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired. @get@ constant shift,mask; type T; expression a; @@ -(((T)(a) & mask) >> shift) +FIELD_GET(mask, a) and applied via: spatch --sp-file field_prep.cocci --in-place --dir \ drivers/net/ethernet/intel/ CC: Alexander Lobakin Cc: Julia Lawall Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 65db56d5fa8f9c4ee269eeb3c85fbb6acef79c6b Author: Jesse Brandeburg Date: Tue Dec 5 17:01:11 2023 -0800 iavf: field get conversion Refactor the iavf driver to use FIELD_GET() for mask and shift reads, which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired in a later patch. @get@ constant shift,mask; type T; expression a; @@ -((T)((a) & mask) >> shift) +FIELD_GET(mask, a) and applied via: spatch --sp-file field_prep.cocci --in-place --dir \ drivers/net/ethernet/intel/ Cc: Julia Lawall Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 62589808d73b24eaf552bf9b69ba97f8db8f7b41 Author: Jesse Brandeburg Date: Tue Dec 5 17:01:10 2023 -0800 i40e: field get conversion Refactor the i40e driver to use FIELD_GET() for mask and shift reads, which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired. While making one of the conversions, an if() check was inverted to return early and avoid un-necessary indentation of the remainder of the function. In some other cases a stack variable was moved inside the block where it was used while doing cleanups/review. A couple places were changed to use le16_get_bits() instead of FIELD_GET with a le16_to_cpu combination. @get@ constant shift,mask; metavariable type T; expression a; @@ -(((T)(a) & mask) >> shift) +FIELD_GET(mask, a) and applied via: spatch --sp-file field_prep.cocci --in-place --dir \ drivers/net/ethernet/intel/ Cc: Julia Lawall Reviewed-by: Aleksandr Loktionov Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit a8e0c7a6800dc466ac815264c16971b9adf7ffbd Author: Jesse Brandeburg Date: Tue Dec 5 17:01:09 2023 -0800 igc: field get conversion Refactor the igc driver to use FIELD_GET() for mask and shift reads, which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired in a later patch. @get@ constant shift,mask; type T; expression a; @@ -((T)((a) & mask) >> shift) +FIELD_GET(mask, a) and applied via: spatch --sp-file field_prep.cocci --in-place --dir \ drivers/net/ethernet/intel/ Cc: Julia Lawall Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit b9a4525450758dd75edbdaee97425ba7546c2b5c Author: Jesse Brandeburg Date: Tue Dec 5 17:01:08 2023 -0800 intel: legacy: field get conversion Refactor several older Intel drivers to use FIELD_GET(), which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired. @get@ constant shift,mask; type T; expression a; @@ ( -((T)((a) & mask) >> shift) +FIELD_GET(mask, a) and applied via: spatch --sp-file field_prep.cocci --in-place --dir \ drivers/net/ethernet/intel/ Cc: Julia Lawall CC: Alexander Lobakin Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit c82e64868afd2656452b430c3976a8b39f1cafe5 Author: Jesse Brandeburg Date: Tue Dec 5 17:01:07 2023 -0800 igc: field prep conversion Refactor igc driver to use FIELD_PREP(), which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired in a later patch. @prep2@ constant shift,mask; type T; expression a; @@ -(((T)(a) << shift) & mask) +FIELD_PREP(mask, a) @prep@ constant shift,mask; type T; expression a; @@ -((T)((a) << shift) & mask) +FIELD_PREP(mask, a) Cc: Julia Lawall Cc: Sasha Neftin Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit 7173be21ae29ef50ada42fd4464056a9d3f55bb3 Author: Jesse Brandeburg Date: Tue Dec 5 17:01:06 2023 -0800 ice: fix pre-shifted bit usage While converting to FIELD_PREP() and FIELD_GET(), it was noticed that some of the RSS defines had *included* the shift in their definitions. This is completely outside of normal, such that a developer could easily make a mistake and shift at the usage site (like when using FIELD_PREP()). Rename the defines and set them to the "pre-shifted values" so they match the template the driver normally uses for masks and the member bits of the mask, which also allows the driver to use FIELD_PREP correctly with these values. Use GENMASK() for this changed MASK value. Do the same for the VLAN EMODE defines as well. Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 23eca34e55586099fd4c6edcd0abd60df9456020 Author: Jesse Brandeburg Date: Tue Dec 5 17:01:05 2023 -0800 ice: field prep conversion Refactor ice driver to use FIELD_PREP(), which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired. Several places I changed to OR into a single variable with |= instead of using a multi-line statement with trailing OR operators, as it (subjectively) makes the code clearer. A local variable vmvf_and_timeout was created and used to avoid multiple logical ORs being __le16 converted, which shortened some lines and makes the code cleaner. Also clean up a couple of places where conversions were made to have the code read more clearly/consistently. @prep2@ constant shift,mask; type T; expression a; @@ -(((T)(a) << shift) & mask) +FIELD_PREP(mask, a) @prep@ constant shift,mask; type T; expression a; @@ -((T)((a) << shift) & mask) +FIELD_PREP(mask, a) Cc: Julia Lawall CC: Alexander Lobakin Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 9b7f18042d4c12ecc5fc797c0a31b0ff0bcef3cc Author: Jesse Brandeburg Date: Tue Dec 5 17:01:04 2023 -0800 iavf: field prep conversion Refactor iavf driver to use FIELD_PREP(), which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired. Clean up a couple spots in the code that had repetitive y = cpu_to_*((blah << blah_blah) & blat) y |= cpu_to_*((blahs << blahs_blahs) & blats) to x = FIELD_PREP(blat blah) x |= FIELD_PREP(blats, blahs) y = cpu_to_*(x); @prep2@ constant shift,mask; type T; expression a; @@ -(((T)(a) << shift) & mask) +FIELD_PREP(mask, a) @prep@ constant shift,mask; type T; expression a; @@ -((T)((a) << shift) & mask) +FIELD_PREP(mask, a) Cc: Julia Lawall Cc: Ahmed Zaki Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit 9e3ab72c049929afccea62a08dbaeaeee8e06c46 Author: Jesse Brandeburg Date: Tue Dec 5 17:01:03 2023 -0800 i40e: field prep conversion Refactor i40e driver to use FIELD_PREP(), which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired. Refactor one function with multiple if's to return quickly to make lines fit in 80 columns. @prep2@ constant shift,mask; type T; expression a; @@ -(((T)(a) << shift) & mask) +FIELD_PREP(mask, a) @prep@ constant shift,mask; type T; expression a; @@ -((T)((a) << shift) & mask) +FIELD_PREP(mask, a) Cc: Julia Lawall Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 4d893c104cda8961b8885737b2de73b83f7b6d0d Author: Jesse Brandeburg Date: Tue Dec 5 17:01:02 2023 -0800 intel: legacy: field prep conversion Refactor several older Intel drivers to use FIELD_PREP(), which reduces lines of code and adds clarity of intent. This code was generated by the following coccinelle/spatch script and then manually repaired. @prep2@ constant shift,mask; type T; expression a; @@ -(((T)(a) << shift) & mask) +FIELD_PREP(mask, a) @prep@ constant shift,mask; type T; expression a; @@ -((T)((a) << shift) & mask) +FIELD_PREP(mask, a) Cc: Julia Lawall Reviewed-by: Marcin Szycik Reviewed-by: Simon Horman Signed-off-by: Jesse Brandeburg Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 3314f2097dee43defc20554f961a8b17f4787e2d Author: Jesse Brandeburg Date: Tue Dec 5 17:01:01 2023 -0800 intel: add bit macro includes where needed This series is introducing the use of FIELD_GET and FIELD_PREP which requires bitfield.h to be included. Fix all the includes in this one change, and rearrange includes into alphabetical order to ease readability and future maintenance. virtchnl.h and it's usage was modified to have it's own includes as it should. This required including bits.h for virtchnl.h. Reviewed-by: Marcin Szycik Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit 236f31bb21c00b0d926916d43bee09100432b8d0 Author: Jesse Brandeburg Date: Tue Dec 5 17:01:00 2023 -0800 e1000e: make lost bits explicit For more than 15 years this code has passed in a request for a page and masked off that page when read/writing. This code has been here forever, but FIELD_PREP finds the bug when converted to use it. Change the code to do exactly the same thing but allow the conversion to FIELD_PREP in a later patch. To make it clear what we lost when making this change I left a comment, but there is no point to change the code to generate a correct sequence at this point. This is not a Fixes tagged patch on purpose because it doesn't change the binary output. Reviewed-by: Marcin Szycik Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit d5362c37e1f8a40096452fc201c30e705750e687 Author: Xiaolei Wang Date: Fri Dec 15 10:00:49 2023 +0800 rpmsg: virtio: Free driver_override when rpmsg_remove() Free driver_override when rpmsg_remove(), otherwise the following memory leak will occur: unreferenced object 0xffff0000d55d7080 (size 128): comm "kworker/u8:2", pid 56, jiffies 4294893188 (age 214.272s) hex dump (first 32 bytes): 72 70 6d 73 67 5f 6e 73 00 00 00 00 00 00 00 00 rpmsg_ns........ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000009c94c9c1>] __kmem_cache_alloc_node+0x1f8/0x320 [<000000002300d89b>] __kmalloc_node_track_caller+0x44/0x70 [<00000000228a60c3>] kstrndup+0x4c/0x90 [<0000000077158695>] driver_set_override+0xd0/0x164 [<000000003e9c4ea5>] rpmsg_register_device_override+0x98/0x170 [<000000001c0c89a8>] rpmsg_ns_register_device+0x24/0x30 [<000000008bbf8fa2>] rpmsg_probe+0x2e0/0x3ec [<00000000e65a68df>] virtio_dev_probe+0x1c0/0x280 [<00000000443331cc>] really_probe+0xbc/0x2dc [<00000000391064b1>] __driver_probe_device+0x78/0xe0 [<00000000a41c9a5b>] driver_probe_device+0xd8/0x160 [<000000009c3bd5df>] __device_attach_driver+0xb8/0x140 [<0000000043cd7614>] bus_for_each_drv+0x7c/0xd4 [<000000003b929a36>] __device_attach+0x9c/0x19c [<00000000a94e0ba8>] device_initial_probe+0x14/0x20 [<000000003c999637>] bus_probe_device+0xa0/0xac Signed-off-by: Xiaolei Wang Fixes: b0b03b811963 ("rpmsg: Release rpmsg devices in backends") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20231215020049.78750-1-xiaolei.wang@windriver.com Signed-off-by: Mathieu Poirier commit 6079ae6376181b49c9e4d65ef9fe954cca4974bd Merge: e58aac1a9a179 f17d1a18a3dd6 Author: Andrii Nakryiko Date: Mon Dec 18 09:51:31 2023 -0800 Merge branch 'bpf-add-check-for-negative-uprobe-multi-offset' Jiri Olsa says: ==================== bpf: Add check for negative uprobe multi offset hi, adding the check for negative offset for uprobe multi link. v2 changes: - add more failure checks [Alan] - move the offset retrieval/check up in the loop to be done earlier [Song] thanks, jirka --- ==================== Link: https://lore.kernel.org/r/20231217215538.3361991-1-jolsa@kernel.org Signed-off-by: Andrii Nakryiko commit f17d1a18a3dd6cc4b38a5226b0acbbad3f2063ae Author: Jiri Olsa Date: Sun Dec 17 22:55:38 2023 +0100 selftests/bpf: Add more uprobe multi fail tests We fail to create uprobe if we pass negative offset. Add more tests validating kernel-side error checking code. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20231217215538.3361991-3-jolsa@kernel.org commit 3983c00281d96af2ba611254d679107b5c390627 Author: Jiri Olsa Date: Sun Dec 17 22:55:37 2023 +0100 bpf: Fail uprobe multi link with negative offset Currently the __uprobe_register will return 0 (success) when called with negative offset. The reason is that the call to register_for_each_vma and then build_map_info won't return error for negative offset. They just won't do anything - no matching vma is found so there's no registered breakpoint for the uprobe. I don't think we can change the behaviour of __uprobe_register and fail for negative uprobe offset, because apps might depend on that already. But I think we can still make the change and check for it on bpf multi link syscall level. Also moving the __get_user call and check for the offsets to the top of loop, to fail early without extra __get_user calls for ref_ctr_offset and cookie arrays. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20231217215538.3361991-2-jolsa@kernel.org commit 8b69dba103650b8247a336945c5fedc64ab5ddea Author: Himanshu Bhavani Date: Mon Dec 18 20:02:08 2023 +0530 ASoC: amd: acp: Remove redundant ret variable Removed Unneeded variable: "ret" Signed-off-by: Himanshu Bhavani Link: https://msgid.link/r/20231218143214.939885-1-himanshu.bhavani@siliconsignals.io Signed-off-by: Mark Brown commit e58aac1a9a179fa9dab3025ef955cdb548c439f2 Author: Hou Tao Date: Sat Dec 16 11:55:10 2023 +0800 selftests/bpf: Test the release of map btf When there is bpf_list_head or bpf_rb_root field in map value, the free of map btf and the free of map value may run concurrently and there may be use-after-free problem, so add two test cases to demonstrate it. And the use-after-free problem can been easily reproduced by using bpf_next tree and a KASAN-enabled kernel. The first test case tests the racing between the free of map btf and the free of array map. It constructs the racing by releasing the array map in the end after other ref-counter of map btf has been released. To delay the free of array map and make it be invoked after btf_free_rcu() is invoked, it stresses system_unbound_wq by closing multiple percpu array maps before it closes the array map. The second case tests the racing between the free of map btf and the free of inner map. Beside using the similar method as the first one does, it uses bpf_map_delete_elem() to delete the inner map and to defer the release of inner map after one RCU grace period. The reason for using two skeletons is to prevent the release of outer map and inner map in map_in_map_btf.c interfering the release of bpf map in normal_map_btf.c. Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20231216035510.4030605-1-houtao@huaweicloud.com commit 53d5486114ae23d36145a1e40d2b9de7a6247c1e Merge: 189f2c8e0c420 9d52612690985 Author: Marc Zyngier Date: Mon Dec 18 17:09:32 2023 +0000 Merge branch kvm-arm64/fgt-rework into kvmarm-master/next * kvm-arm64/fgt-rework: (30 commits) : . : Fine Grain Trapping update, courtesy of Fuad Tabba. : : From the cover letter: : : "This patch series has fixes, updates, and code for validating : fine grain trap register masks, as well as some fixes to feature : trapping in pKVM. : : New fine grain trap (FGT) bits have been defined in the latest : Arm Architecture System Registers xml specification (DDI0601 and : DDI0602 2023-09) [1], so the code is updated to reflect them. : Moreover, some of the already-defined masks overlap with RES0, : which this series fixes. : : It also adds FGT register masks that weren't defined earlier, : handling of HAFGRTR_EL2 in nested virt, as well as build time : validation that the bits of the various masks are all accounted : for and without overlap." : : This branch also drags the arm64/for-next/sysregs branch, : which is a dependency on this work. : . KVM: arm64: Trap external trace for protected VMs KVM: arm64: Mark PAuth as a restricted feature for protected VMs KVM: arm64: Fix which features are marked as allowed for protected VMs KVM: arm64: Macros for setting/clearing FGT bits KVM: arm64: Define FGT nMASK bits relative to other fields KVM: arm64: Use generated FGT RES0 bits instead of specifying them KVM: arm64: Add build validation for FGT trap mask values KVM: arm64: Update and fix FGT register masks KVM: arm64: Handle HAFGRTR_EL2 trapping in nested virt KVM: arm64: Add bit masks for HAFGRTR_EL2 KVM: arm64: Add missing HFGITR_EL2 FGT entries to nested virt KVM: arm64: Add missing HFGxTR_EL2 FGT entries to nested virt KVM: arm64: Explicitly trap unsupported HFGxTR_EL2 features arm64/sysreg: Add missing system instruction definitions for FGT arm64/sysreg: Add missing system register definitions for FGT arm64/sysreg: Add missing ExtTrcBuff field definition to ID_AA64DFR0_EL1 arm64/sysreg: Add missing Pauth_LR field definitions to ID_AA64ISAR1_EL1 arm64/sysreg: Add new system registers for GCS arm64/sysreg: Add definition for FPMR arm64/sysreg: Update HCRX_EL2 definition for DDI0601 2023-09 ... Signed-off-by: Marc Zyngier commit 189f2c8e0c420b194af0ee22b8f247948cb577be Merge: 2cc14f52aeb78 11e5ea5242e38 Author: Marc Zyngier Date: Mon Dec 18 17:07:34 2023 +0000 Merge branch kvm-arm64/lpa2 into kvmarm-master/next * kvm-arm64/lpa2: : . : Support FEAT_LPA2 at EL2 S1 and S2, courtesy of Ryan Roberts : : From the cover letter: : : "This adds support for FEAT_LPA2 to KVM for both hypervisor stage 1 (for the : nvhe/protected modes) and the vm stage 2 translation tables (for all modes). : FEAT_LPA2 enables 52 bit PAs and VAs for 4KB and 16KB granules (note this is : already supported for 64KB granules via the FEAT_LPA and FEAT_LVA extensions)." : . KVM: arm64: Use helpers to classify exception types reported via ESR KVM: selftests: arm64: Support P52V48 4K and 16K guest_modes KVM: selftests: arm64: Determine max ipa size per-page size KVM: arm64: Allow guests with >48-bit IPA size on FEAT_LPA2 systems KVM: arm64: Support up to 5 levels of translation in kvm_pgtable KVM: arm64: Convert translation level parameter to s8 KVM: arm64: Use LPA2 page-tables for stage2 and hyp stage1 KVM: arm64: Add new (V)TCR_EL2 field definitions for FEAT_LPA2 arm64: Add ARM64_HAS_LPA2 CPU capability arm64/mm: Add FEAT_LPA2 specific ID_AA64MMFR0.TGRAN[2] arm64/mm: Update tlb invalidation routines for FEAT_LPA2 arm64/mm: Add lpa2_is_enabled() kvm_lpa2_is_enabled() stubs arm64/mm: Modify range-based tlbi to decrement scale Signed-off-by: Marc Zyngier commit 6c9b97085c473e380e57cf33c95d2c74444b2a5d Author: Kundan Kumar Date: Mon Dec 18 20:57:22 2023 +0530 block: skip cgroups for passthrough io Even if BLK_CGROUP is enabled, it does not work for passthrough io. So skip setting up blkg for passthrough bio. Reduced processing gives ~5% hike in peak-performance workload. Signed-off-by: Kundan Kumar Signed-off-by: Kanchan Joshi Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20231218152722.1768-1-joshi.k@samsung.com Signed-off-by: Jens Axboe commit 15009a1b145b033c39a6b65d529c83de71a8d732 Author: David Lechner Date: Mon Dec 18 08:53:45 2023 -0600 spi: axi-spi-engine: fix struct member doc warnings The build bots are complaining that the members of struct spi_engine_message_state are not described. This adds the proper @name: syntax to the comments to fix this. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312182101.QOWovo29-lkp@intel.com/ Signed-off-by: David Lechner Link: https://msgid.link/r/20231218145348.339470-1-dlechner@baylibre.com Signed-off-by: Mark Brown commit 7f2c9c0bb8d575ed289943ad782776649343ee7e Author: Tree Davies Date: Sun Dec 17 15:55:20 2023 -0800 Staging: rtl8192e: Rename variable pBaStartSeqCtrl Rename variable pBaStartSeqCtrl to ba_start_seq_ctrl to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231217235520.30377-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 4497af9ea95f38651451cbf08d3485cf830ffc8d Author: Tree Davies Date: Sun Dec 17 15:55:18 2023 -0800 Staging: rtl8192e: Rename variable pDelBaParamSet Rename variable pDelBaParamSet to del_ba_param_set to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231217235520.30377-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 66547657a8c46fda873b85b283445a400e308a5c Author: Tree Davies Date: Sun Dec 17 15:55:17 2023 -0800 Staging: rtl8192e: Rename variable ucTSID Rename variable ucTSID to ts_id to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231217235520.30377-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 1cf5e0a3668eaf6770e2013eebb3dcfebb08771d Author: Tree Davies Date: Sun Dec 17 15:55:16 2023 -0800 Staging: rtl8192e: Rename array variable TxTsRecord Rename array variable TxTsRecord to tx_ts_records to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231217235520.30377-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit fd00f665454fef2bdbcf27c7efceaf5f1b880bc9 Author: Tree Davies Date: Sun Dec 17 15:55:15 2023 -0800 Staging: rtl8192e: Rename array variable RxTsRecord Rename array variable RxTsRecord to rx_ts_records to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231217235520.30377-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 4f8a3fffdff13bd44123d1957fd4455f49464e4f Author: Dipendra Khadka Date: Sun Dec 17 16:54:43 2023 +0000 drivers: staging: rtl8712: Fixes spelling mistake in rtl871x_mp_phy_regdef.h The script checkpatch.pl reported spelling error in rtl871x_mp_phy_regdef.h as below: ''' WARNING: 'Tranceiver' may be misspelled - perhaps 'Transceiver'? #129: #define rFPGA0_XA_LSSIReadBack 0x8a0 /* Tranceiver LSSI Readback */ ^^^^^^^^^^ ''' This patch corrects a spelling error, changing "Tranceiver" to "Transceiver." Signed-off-by: Dipendra Khadka Link: https://lore.kernel.org/r/20231217165444.448133-1-kdipendra88@gmail.com Signed-off-by: Greg Kroah-Hartman commit a99ead4e2b9f75fa29e49ba6c2c42834eb0cc60c Author: Tree Davies Date: Sat Dec 16 12:20:38 2023 -0800 Staging: rtl8192e: rename linked list reference: List Rename variable List to list, to fix Avoid CamelCase checkpatch warning. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231216202038.10777-1-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 936637892020a6d7a566e86ef29be0a8a825354c Author: Gary Rookard Date: Sat Dec 16 07:53:03 2023 -0500 staging: rtl8192e: renamed variable HTFilterMCSRate Coding style issue, checkpatch Avoid CamelCase, rename it. HTFilterMCSRate -> ht_filter_mcs_rate Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231216125303.3404-5-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 2e9b84b7f28fcc73570c5a50a8e08087d15bb893 Author: Gary Rookard Date: Sat Dec 16 07:53:02 2023 -0500 staging: rtl8192e: rename variable HTGetHighestMCSRate Coding style issue, checkpatch Avoid CamelCase, rename it. HTGetHighestMCSRate -> ht_get_highest_mcs_rate Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231216125303.3404-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit d08c910ea89cf2f7e0252bb717adeb27379a119f Author: Gary Rookard Date: Sat Dec 16 07:53:01 2023 -0500 staging: rtl8192e: rename variable pCapELE Coding style issue, checkpatch Avoid CamelCase, rename it. pCapELE -> cap_ele Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231216125303.3404-3-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit b2264b62defb42abd748d8937b8de758f8fcabf2 Author: Gary Rookard Date: Sat Dec 16 07:53:00 2023 -0500 staging: rtl8192e: rename variable pHT Coding style issue, checkpatch Avoid CamelCase, rename it. pHT -> ht Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231216125303.3404-2-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 40aa7e290b8eff56b7235ece108f11e48210f262 Merge: c9bd27c880b00 92fc925f83866 Author: Bartosz Golaszewski Date: Mon Dec 18 16:26:26 2023 +0100 Merge tag 'intel-gpio-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-next intel-gpio for v6.8-1 * Use RAII for locking in the Tangier family of drivers (Raag) * Update Tangier family of drivers to use new PM helpers (Raag) The following is an automated git shortlog grouped by driver: elkhartlake: - reuse pm_ops from Intel Tangier driver tangier: - simplify locking using cleanup helpers - unexport suspend/resume handles - use EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() helper commit c8048dd0b07df68724805254b9e994d99e9a7af4 Author: Nícolas F. R. A. Prado Date: Tue Nov 21 09:29:27 2023 -0500 drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency The mtk_dp driver registers a phy device which is handled by the phy_mtk_dp driver and assumes that the phy probe will complete synchronously, proceeding to make use of functionality exposed by that driver right away. This assumption however is false when the phy driver is built as a module, causing the mtk_dp driver to fail probe in this case. Add the phy_mtk_dp module as a pre-dependency to the mtk_dp module to ensure the phy module has been loaded before the dp, so that the phy probe happens synchrounously and the mtk_dp driver can probe successfully even with the phy driver built as a module. Suggested-by: AngeloGioacchino Del Regno Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Guillaume Ranquet Link: https://patchwork.kernel.org/project/dri-devel/patch/20231121142938.460846-1-nfraprado@collabora.com/ Signed-off-by: Chun-Kuang Hu commit 915fdc94f16e2332c72e04785bb675021c8a4a0a Merge: 84e769e67e32b 6cf96df77338c Author: Linus Walleij Date: Mon Dec 18 15:07:23 2023 +0100 Merge tag 'samsung-pinctrl-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel Samsung pinctrl drivers changes for v6.8 1. New hardware: Add pin controllers for Samsung ExynosAutov920 and Google Tensor GS101. 2. Few DT bindings cleanups: add specific compatibles for each device using generic compatible as fallback. This affects only DTS, no driver changes are needed. 3. Allow setting affinity on non wake-up external GPIO interrupts. Signed-off-by: Linus Walleij commit 84e769e67e32bd7040355bcc66242311090bc978 Merge: 2ddb7c424a60c 9e5889c68d992 Author: Linus Walleij Date: Mon Dec 18 15:06:18 2023 +0100 Merge tag 'renesas-pinctrl-for-v6.8-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.8 (take two) - Add pinmux groups, power source, and input/output enable support for Ethernet pins on RZ/G2L SoCs, - Miscellaneous fixes and improvements. Signed-off-by: Linus Walleij commit ad663ce6780477177e301756ade6cf236f36ae4c Author: Varadarajan Narayanan Date: Thu Dec 14 16:10:52 2023 +0530 regulator: qcom_smd: Add LDO5 MP5496 regulator Add support for LDO5 regulator. This is used by IPQ9574 USB. Signed-off-by: Varadarajan Narayanan Rule: Link: https://lore.kernel.org/stable/20231214104052.3267039-1-quic_varada%40quicinc.com Link: https://msgid.link/r/20231214104052.3267039-1-quic_varada@quicinc.com Signed-off-by: Mark Brown commit ee00330a5b78e2acf4b3aac32913da43e2c12a26 Author: Gergo Koteles Date: Thu Dec 14 01:25:39 2023 +0100 ASoC: tas2781: add support for FW version 0x0503 Layout of FW version 0x0503 is compatible with 0x0502. Already supported by TI's tas2781-linux-driver tree. https://git.ti.com/cgit/tas2781-linux-drivers/tas2781-linux-driver/ Fixes: 915f5eadebd2 ("ASoC: tas2781: firmware lib") Signed-off-by: Gergo Koteles Link: https://msgid.link/r/98d4ee4e01e834af72a1a0bea6736facf43582e0.1702513517.git.soyer@irl.hu Signed-off-by: Mark Brown commit 173a3b20a4980265bab52dbc60b616e739664b0d Author: Krzysztof Kozlowski Date: Mon Dec 11 13:31:04 2023 +0100 ASoC: dt-bindings: qcom,lpass-rx-macro: Add X1E80100 LPASS WSA Add bindings for Qualcomm X1E80100 SoC Low Power Audio SubSystem (LPASS) WSA macro codec, which looks like compatible with earlier SM8550. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231211123104.72963-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit f990306adf2715cc2bdb85470065f7326a42081b Author: Krzysztof Kozlowski Date: Mon Dec 11 13:31:03 2023 +0100 ASoC: dt-bindings: qcom,lpass-rx-macro: Add X1E80100 LPASS VA Add bindings for Qualcomm X1E80100 SoC Low Power Audio SubSystem (LPASS) VA macro codec, which looks like compatible with earlier SM8550. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231211123104.72963-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 7de2109ce1619951e957eaafab83545a4cab8609 Author: Krzysztof Kozlowski Date: Mon Dec 11 13:31:02 2023 +0100 ASoC: dt-bindings: qcom,lpass-rx-macro: Add X1E80100 LPASS TX Add bindings for Qualcomm X1E80100 SoC Low Power Audio SubSystem (LPASS) TX macro codec, which looks like compatible with earlier SM8550. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231211123104.72963-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 2f4734f3f48fff9437e4d38531c699b0a62ff8a8 Author: Krzysztof Kozlowski Date: Mon Dec 11 13:31:01 2023 +0100 ASoC: dt-bindings: qcom,lpass-rx-macro: Add X1E80100 LPASS RX Add bindings for Qualcomm X1E80100 SoC Low Power Audio SubSystem (LPASS) RX macro codec, which looks like compatible with earlier SM8550. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231211123104.72963-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit bb3392453d3ba44e60b85381e3bfa3c551a44e5d Author: Krzysztof Kozlowski Date: Mon Dec 4 11:00:48 2023 +0100 ASoC: qcom: Fix trivial code style issues Fix few trivial code style issues, pointed out by checkpatch, so they do not get copied to new code (when old code is used as template): WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity") WARNING: function definition argument 'struct platform_device *' should also have an identifier name ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line WARNING: Missing a blank line after declarations WARNING: unnecessary whitespace before a quoted newline Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231204100048.211800-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 8f039360897bdd2f1f455b46a7f504b677405913 Author: Chancel Liu Date: Mon Dec 4 19:15:32 2023 +0800 ASoC: soc-pcm.c: Complete the active count for components without DAIs Some components like platforms don't have DAIs. If the active count of these components is ignored pinctrl may be wrongly selected between default and sleep state. So need to increment or decrement the active count for components without DAIs to avoid it. Signed-off-by: Chancel Liu Link: https://msgid.link/r/20231204111532.3165-1-chancel.liu@nxp.com Signed-off-by: Mark Brown commit 337d93b4285a92280edd7d0a910c3b7cbc70d717 Author: Krzysztof Kozlowski Date: Mon Dec 4 11:01:16 2023 +0100 ASoC: dt-bindings: qcom,sm8250: Add X1E80100 sound card Document bindings for the Qualcomm X1E80100 SoC sound card. The bindings are the same as for other newer Qualcomm ADSP sound cards, thus keep them in existing qcom,sm8250.yaml file, even though Linux driver is separate. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://msgid.link/r/20231204100116.211898-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 6b9dc2da66578acff36401ba87fee93c2abf2a6e Author: Krzysztof Kozlowski Date: Mon Dec 4 11:01:15 2023 +0100 ASoC: qcom: Add x1e80100 sound machine driver Add sound machine driver for the soundcards on Qualcomm X1E80100 SoC, supporting up to four channel audio playback over Soundwire bus. The driver is based on existing sc8280xp.c driver. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231204100116.211898-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 3423c3db22e9213acd279ff3800bb1e91aa2ac89 Author: Rui Zhou Date: Tue Dec 12 20:30:50 2023 +0800 ASoC: mediatek: mt8188-mt6359: Enable dual amp for mt8188-rt5682s Enable support for dual MAX98390 amplifiers on the mt8188-rt5682s board. Reviewed-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Rui Zhou Link: https://msgid.link/r/20231212123050.4080083-5-zhourui@huaqin.corp-partner.google.com Signed-off-by: Mark Brown commit e794a894427b1d64f2ebff24f003c60373d68c2c Author: Rui Zhou Date: Tue Dec 12 20:30:49 2023 +0800 ASoC: mediatek: mt8188-mt6359: add es8326 support To use ES8326 as the codec, add a new sound card named mt8186_es8326. Reviewed-by: Trevor Wu Signed-off-by: Rui Zhou Reviewed-by: AngeloGioacchino Del Regno Link: https://msgid.link/r/20231212123050.4080083-4-zhourui@huaqin.corp-partner.google.com Signed-off-by: Mark Brown commit 1a268000b03a162bd5feb7fce1c130f1b31602b5 Author: Rui Zhou Date: Tue Dec 12 20:30:48 2023 +0800 ASoC: mediatek: mt8188-mt6359: commonize headset codec init/exit api Reduce code duplication, unify the headset codec init/exit api. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Rui Zhou Link: https://msgid.link/r/20231212123050.4080083-3-zhourui@huaqin.corp-partner.google.com Signed-off-by: Mark Brown commit ea244b35a4da60a92d0e3be528f82ebcbcf10753 Author: Rui Zhou Date: Tue Dec 12 20:30:47 2023 +0800 ASoC: dt-bindings: mt8188-mt6359: add es8326 support Add compatible string "mediatek,mt8188-es8326" to support new board with es8326 codec. Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Rui Zhou Link: https://msgid.link/r/20231212123050.4080083-2-zhourui@huaqin.corp-partner.google.com Signed-off-by: Mark Brown commit 576f3aef47f42f368db08fd5e3f49880c4493bf5 Author: Cristian Ciocaltea Date: Sat Dec 9 22:32:23 2023 +0200 ASoC: amd: acp: Add missing MODULE_DESCRIPTION in mach-common Add a MODULE_DESCRIPTION() in the generic ACP machine driver to avoid the following warning when building with W=1: WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/acp/snd-acp-mach.o Fixes: d4c750f2c7d4 ("ASoC: amd: acp: Add generic machine driver support for ACP cards") Signed-off-by: Cristian Ciocaltea Reviewed-by: Emil Velikov Link: https://msgid.link/r/20231209203229.878730-6-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 6e202e758b4b8d85dfb909c8eb710db8c6160303 Author: Cristian Ciocaltea Date: Sat Dec 9 22:32:22 2023 +0200 ASoC: amd: acp-config: Add missing MODULE_DESCRIPTION Add the missing MODULE_DESCRIPTION() to avoid the following warning when building with W=1: WARNING: modpost: missing MODULE_DESCRIPTION() in sound/soc/amd/snd-acp-config.o Fixes: f1bdd8d385a8 ("ASoC: amd: Add module to determine ACP configuration") Signed-off-by: Cristian Ciocaltea Reviewed-by: Emil Velikov Link: https://msgid.link/r/20231209203229.878730-5-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 78d3924675d4e076faa5600b48b8565fcb135ee0 Author: Cristian Ciocaltea Date: Sat Dec 9 22:32:21 2023 +0200 ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS Replace the old SET_{RUNTIME,SYSTEM_SLEEP}_PM_OPS() helpers with their modern alternatives and drop the now unnecessary __maybe_unused qualifier in the suspend and resume functions. Additionally, make use of pm_ptr() to ensure the PM ops are dropped when building with CONFIG_PM disabled. Signed-off-by: Cristian Ciocaltea Reviewed-by: Emil Velikov Link: https://msgid.link/r/20231209203229.878730-4-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 2cef11ec3dfd5f14d8ddef917682408ed01e5805 Author: Cristian Ciocaltea Date: Sat Dec 9 22:32:20 2023 +0200 ASoC: amd: vangogh: Allow probing ACP PCI when SOF is disabled Since commit e89f45edb747 ("ASoC: amd: vangogh: Add check for acp config flags in vangogh platform"), the Vangogh ACP PCI driver could not be used anymore for boards which happen to have a matching entry in acp-config list. Commit f18818eb0dbe ("ASoC: amd: vangogh: Add condition check for acp config flag") slightly changed the behaviour to permit loading the driver if AMD_LEGACY flag is set. However, for AMD_SOF flag the probing is still denied, even if SOF support is disabled in kernel configuration. While this helps preventing conflicts between SOF and generic ACP drivers, there are cases where a fallback to the generic non-SOF support would still be needed or useful, e.g. SOF firmware is not available or doesn't work properly, SOF driver is broken or doesn't provide full support for a particular hardware, or simply for testing/debugging the alternative solution. A real-life example is Steam Deck OLED, which works with both drivers. Prevent returning from probe() when ACP config indicates SOF support for the current board *and* the Vangogh SOF driver is not enabled in kernel configuration. Signed-off-by: Cristian Ciocaltea Reviewed-by: Emil Velikov Link: https://msgid.link/r/20231209203229.878730-3-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit ddd1ee12a8fb6e4d6f86eddeba64c135eee56623 Author: Cristian Ciocaltea Date: Sat Dec 9 22:32:19 2023 +0200 ASoC: amd: vangogh: Drop conflicting ACPI-based probing The Vangogh machine driver variant based on the MAX98388 amplifier, as found on Valve's Steam Deck OLED, relies on probing via an ACPI match table. This worked fine until commit 197b1f7f0df1 ("ASoC: amd: Add new dmi entries to config entry") enabled SOF support for the target machine (i.e. Galileo product), causing the sound card to enter the deferred probe state indefinitely: $ cat /sys/kernel/debug/devices_deferred AMDI8821:00 acp5x_mach: Register card (acp5x-max98388) failed The issue is related to commit e89f45edb747 ("ASoC: amd: vangogh: Add check for acp config flags in vangogh platform"), which tries to mitigate potential conflicts between SOF and generic ACP Vangogh drivers, due to sharing the PCI device IDs. However, the solution is effective only if the machine driver is directly probed by pci-acp5x through platform_device_register_full(). Hence, remove the conflicting ACPI based probing and rely exclusively on DMI quirks for sound card setup. Fixes: dba22efd0d17 ("ASoC: amd: vangogh: Add support for NAU8821/MAX98388 variant") Signed-off-by: Cristian Ciocaltea Reviewed-by: Emil Velikov Link: https://msgid.link/r/20231209203229.878730-2-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit 7211094dd065908747a143f9adeff41cfdcf37c0 Author: Neil Armstrong Date: Tue Dec 12 09:08:20 2023 +0100 ASoC: qcom: sc8280xp: Add support for SM8650 Add compatibles for sound card on Qualcomm SM8650 boards. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231212-topic-sm8650-upstream-snd-card-v1-2-fbfc38471204@linaro.org Signed-off-by: Mark Brown commit 773df207fdd6e17d7a43abf83ea155ade9a95f79 Author: Neil Armstrong Date: Tue Dec 12 09:08:19 2023 +0100 ASoC: dt-bindings: qcom,sm8250: document SM8650 sound card Add sound card for SM8650, which as of now looks fully compatible with SM8450. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231212-topic-sm8650-upstream-snd-card-v1-1-fbfc38471204@linaro.org Signed-off-by: Mark Brown commit 26e91f61d6b91ccfb0bbb15cbc81845dd1d223af Author: Linus Walleij Date: Thu Dec 14 14:15:45 2023 +0100 ASoC: tegra: tegra20_ac97: Convert to use GPIO descriptors The Tegra20 AC97 driver is using the legacy GPIO APIs in and to obtain GPIOs for reset and sync. Convert it over and fix the polarity error on the RESET line in the process: this reset line is clearly active low. Just fix the one in-tree device tree site using it at the same time. Signed-off-by: Linus Walleij Link: https://msgid.link/r/20231214-gpio-descriptors-sound-misc-v1-4-e3004176bd8b@linaro.org Signed-off-by: Mark Brown commit 4504f63321e1a581a3c0cbc8de91bd0175d94783 Author: Linus Walleij Date: Thu Dec 14 14:15:44 2023 +0100 ASoC: simple-card-utils: Drop GPIO include The generic card utilities are including the legacy GPIO header but not using any symbols from it. Drop the include from all files. Signed-off-by: Linus Walleij Link: https://msgid.link/r/20231214-gpio-descriptors-sound-misc-v1-3-e3004176bd8b@linaro.org Signed-off-by: Mark Brown commit 809fc84b371a0364160254037d2bc34a8f5ce372 Author: Linus Walleij Date: Thu Dec 14 14:15:43 2023 +0100 ASoC: qcom: sc7180: Drop GPIO include This driver is including the legacy GPIO header but not using any symbols from it. Drop the include. Signed-off-by: Linus Walleij Link: https://msgid.link/r/20231214-gpio-descriptors-sound-misc-v1-2-e3004176bd8b@linaro.org Signed-off-by: Mark Brown commit 487b467206fb2f3a21c93759d3b0ffe7044ed197 Author: Linus Walleij Date: Thu Dec 14 14:15:42 2023 +0100 ASoC: hisilicon: Drop GPIO include This driver is including the legacy GPIO header but not using any symbols from it. Drop the include. Signed-off-by: Linus Walleij Link: https://msgid.link/r/20231214-gpio-descriptors-sound-misc-v1-1-e3004176bd8b@linaro.org Signed-off-by: Mark Brown commit a92d3078244891c1bc4dc2112ae58b416875d296 Author: Rajvi Jingar Date: Fri Dec 15 17:17:02 2023 -0800 platform/x86/intel/pmc: Fix in pmc_core_ssram_get_pmc() Passing PMC_IDX_MAIN in pmc_core_pmc_add() adds only primary pmc to pmcdev. Use pmc_idx instead to add all available pmcs. Fixes: a01486dc4bb1 ("platform/x86/intel/pmc: Cleanup SSRAM discovery") Signed-off-by: Rajvi Jingar Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231216011702.1976408-1-rajvi.jingar@linux.intel.com Signed-off-by: Hans de Goede commit 784a00474633aa7ff4940b3adf74d900e54f6a36 Author: Rajvi Jingar Date: Fri Dec 15 16:51:46 2023 -0800 platform/x86/intel/vsec: Add support for Lunar Lake M Add Lunar Lake M PMT telemetry support. Signed-off-by: Rajvi Jingar Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231216005146.1735455-1-rajvi.jingar@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b23ae451d7b1ddb10536fa10f5dc9842ef66f387 Author: Colin Ian King Date: Fri Dec 15 11:27:46 2023 +0000 platform/x86: silicom-platform: Fix spelling mistake "platfomr" -> "platform" There is a spelling mistake in a literal string. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231215112746.13752-1-colin.i.king@gmail.com Signed-off-by: Hans de Goede commit 8e21e4693d8502ee31ef7984e16c3d9cab6c926a Author: Fabrice Gasnier Date: Wed Dec 13 18:31:17 2023 +0100 MAINTAINERS: add myself as counter watch events tool maintainer Add MAINTAINERS entry for the counter watch events tool. William has been asking to add at least me as the point of contact for this utility. Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20231213173117.4174511-3-fabrice.gasnier@foss.st.com Signed-off-by: William Breathitt Gray commit 1e73427f66353b7fe21c138787ff2b711ca1c0dd Author: Fabrice Gasnier Date: Wed Dec 13 18:31:16 2023 +0100 tools/counter: add a flexible watch events tool This adds a new counter tool to be able to test various watch events. A flexible watch array can be populated from command line, each field may be tuned with a dedicated command line sub-option in "--watch" string. Several watch events can be defined, each can have specific watch options, by using "--watch --watch ". Watch options is a comma separated list. It also comes with a simple default watch (to monitor overflow/underflow events), used when no watch parameters are provided. It's equivalent to: counter_watch_events -w comp_count,scope_count,evt_ovf_udf The print_usage() routine proposes another example, from the command line, which generates a 2 elements watch array, to monitor: - overflow underflow events - capture events, on channel 3, that reads read captured data by specifying the component id (capture3_component_id being 7 here). Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20231213173117.4174511-2-fabrice.gasnier@foss.st.com Signed-off-by: William Breathitt Gray commit dd00aaeb343255a8a30de671bd27bde79a47c8e5 Author: Abhi Das Date: Fri Nov 10 13:10:08 2023 +0100 gfs2: Use GL_NOBLOCK flag for non-blocking lookups Add the GL_NOBLOCK flag to the locking requests in gfs2_permission() and gfs2_drevalidate() when called with the MAY_NOT_BLOCK flag and LOOKUP_RCU flag, respectively. This will cause the locking requests to be handled without sleeping if possible. We bail out with -ECHILD if we can't grant the glock immediately. Make sure not to dget() + dput() the parent dentry in gfs2_drevalidate() in LOOKUP_RCU mode; dput() is a sleeping operation. Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher commit f9f229c1f75df2f1fe63b16615d184da4e90bb10 Author: Andreas Gruenbacher Date: Mon Nov 13 16:49:38 2023 +0100 gfs2: Add GL_NOBLOCK flag Add a GL_NOBLOCK flag for trying to take a glock without sleeping. This will be used for implementing non-blocking lookup (MAY_NOT_BLOCK in gfs2_permission, LOOKUP_RCU in gfs2_drevalidate). Signed-off-by: Andreas Gruenbacher commit 95d0f6252564420d6c660593db8505af61c2dd0a Author: Randy Dunlap Date: Tue Dec 5 18:36:36 2023 -0800 gfs2: rgrp: fix kernel-doc warnings Fix kernel-doc warnings found when using "W=1". rgrp.c:162: warning: missing initial short description on line: * gfs2_bit_search rgrp.c:1200: warning: Function parameter or member 'gl' not described in 'gfs2_rgrp_go_instantiate' rgrp.c:1200: warning: Excess function parameter 'gh' description in 'gfs2_rgrp_go_instantiate' rgrp.c:1970: warning: missing initial short description on line: * gfs2_rgrp_used_recently Signed-off-by: Randy Dunlap Signed-off-by: Andreas Gruenbacher commit 71733b4922007500ae259af9e96017080f5d36d9 Author: Edward Adam Davis Date: Sat Dec 2 17:25:49 2023 +0800 gfs2: fix kernel BUG in gfs2_quota_cleanup [Syz report] kernel BUG at fs/gfs2/quota.c:1508! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 5060 Comm: syz-executor505 Not tainted 6.7.0-rc3-syzkaller-00134-g994d5c58e50e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 RIP: 0010:gfs2_quota_cleanup+0x6b5/0x6c0 fs/gfs2/quota.c:1508 Code: fe e9 cf fd ff ff 44 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c 2d fe ff ff 4c 89 ef e8 b6 19 23 fe e9 20 fe ff ff e8 ec 11 c7 fd 90 <0f> 0b e8 84 9c 4f 07 0f 1f 40 00 66 0f 1f 00 55 41 57 41 56 41 54 RSP: 0018:ffffc9000409f9e0 EFLAGS: 00010293 RAX: ffffffff83c76854 RBX: 0000000000000002 RCX: ffff888026001dc0 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000 RBP: ffffc9000409fb00 R08: ffffffff83c762b0 R09: 1ffff1100fd38015 R10: dffffc0000000000 R11: ffffed100fd38016 R12: dffffc0000000000 R13: ffff88807e9c0828 R14: ffff888014693580 R15: ffff88807e9c0000 FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f16d1bd70f8 CR3: 0000000027199000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: gfs2_put_super+0x2e1/0x940 fs/gfs2/super.c:611 generic_shutdown_super+0x13a/0x2c0 fs/super.c:696 kill_block_super+0x44/0x90 fs/super.c:1667 deactivate_locked_super+0xc1/0x130 fs/super.c:484 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1256 task_work_run+0x24a/0x300 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa34/0x2750 kernel/exit.c:871 do_group_exit+0x206/0x2c0 kernel/exit.c:1021 __do_sys_exit_group kernel/exit.c:1032 [inline] __se_sys_exit_group kernel/exit.c:1030 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1030 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x45/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b ... [pid 5060] fsconfig(4, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0) = 0 [pid 5060] exit_group(1) = ? ... [Analysis] When the task exits, it will execute cleanup_mnt() to recycle the mounted gfs2 file system, but it performs a system call fsconfig(4, FSCONFIG_CMD_RECONFIGURE, NULL, NULL, 0) before executing the task exit operation. This will execute the following kernel path to complete the setting of SDF_JOURNAL_LIVE for sd_flags: SYSCALL_DEFINE5(fsconfig, ..)-> vfs_fsconfig_locked()-> vfs_cmd_reconfigure()-> gfs2_reconfigure()-> gfs2_make_fs_rw()-> set_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags); [Fix] Add SDF_NORECOVERY check in gfs2_quota_cleanup() to avoid checking SDF_JOURNAL_LIVE on the path where gfs2 is being unmounted. Reported-and-tested-by: syzbot+3b6e67ac2b646da57862@syzkaller.appspotmail.com Fixes: f66af88e3321 ("gfs2: Stop using gfs2_make_fs_ro for withdraw") Signed-off-by: Edward Adam Davis Signed-off-by: Andreas Gruenbacher commit 1181f2d9fef7307b46850bc11e043f2180d636c1 Author: Andreas Gruenbacher Date: Mon Nov 13 16:54:59 2023 +0100 gfs2: Fix inode_go_instantiate description Fixes a "function parameter or member gl not described in inode_go_instantiate" warning. Signed-off-by: Andreas Gruenbacher commit 8877243beafa7c6bfc42022cbfdf9e39b25bd4fa Author: Osama Muhammad Date: Mon Nov 6 21:21:29 2023 +0500 gfs2: Fix kernel NULL pointer dereference in gfs2_rgrp_dump Syzkaller has reported a NULL pointer dereference when accessing rgd->rd_rgl in gfs2_rgrp_dump(). This can happen when creating rgd->rd_gl fails in read_rindex_entry(). Add a NULL pointer check in gfs2_rgrp_dump() to prevent that. Reported-and-tested-by: syzbot+da0fc229cc1ff4bb2e6d@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=da0fc229cc1ff4bb2e6d Fixes: 72244b6bc752 ("gfs2: improve debug information when lvb mismatches are found") Signed-off-by: Osama Muhammad Signed-off-by: Andreas Gruenbacher commit c9bd27c880b00bac48b4d6aacaca127d8cfc4fd6 Author: Andy Shevchenko Date: Wed Oct 25 21:42:59 2023 +0300 gpio: mmio: Clean up headers There is a few things done: - include only the headers we are direct user of - add missing headers - group generic headers and subsystem headers - sort each group alphabetically Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 001cf2dec38c85d2fa123c0c4e75145cdfc6486d Author: Andy Shevchenko Date: Wed Oct 25 21:42:58 2023 +0300 gpio: mmio: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit becfce5233a78956654f36555f1b9187f8d11d56 Author: Vinod Koul Date: Wed Nov 29 18:34:48 2023 +0530 soundwire: amd: drop bus freq calculation and set 'max_clk_freq' max_dr_freq and curr_dr_freq is calculated and set in sdw_bus_master_add(). Setting in the driver is reduanant, so drop that. Set max_clk_freq instead. Signed-off-by: Vinod Koul Tested-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20231129130449.9892-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 12b7f4ddfcb66dafed432cf4a987f5b40179c0f1 Merge: 0e6e3c6f7cb47 826a5d8c9df96 Author: Bartosz Golaszewski Date: Mon Dec 18 13:31:29 2023 +0100 Merge tag 'device_is_big_endian-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into gpio/for-next Tag for the device_is_big_endian() addition to property.h For others to be able to pull from in a stable way. Signed-off-by: Greg Kroah-Hartman commit f533fa142258024dfe9a8fcba1a28d25a3cbe51b Author: Shyam Sundar S K Date: Tue Dec 12 07:17:05 2023 +0530 platform/x86/amd/pmf: dump policy binary data Sometimes policy binary retrieved from the BIOS maybe incorrect that can end up in failing to enable the Smart PC solution feature. Use print_hex_dump_debug() to dump the policy binary in hex, so that we debug the issues related to the binary even before sending that to TA. Reviewed-by: Mario Limonciello Reviewed-by: Ilpo Järvinen Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-13-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 10817f28e5337e5ddb873c8431d4db8d93712587 Author: Shyam Sundar S K Date: Tue Dec 12 07:17:04 2023 +0530 platform/x86/amd/pmf: Add capability to sideload of policy binary A policy binary is OS agnostic, and the same policies are expected to work across the OSes. At times it becomes difficult to debug when the policies inside the policy binaries starts to misbehave. Add a way to sideload such policies independently to debug them via a debugfs entry. Reviewed-by: Mario Limonciello Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-12-Shyam-sundar.S-k@amd.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d6948c13b663a284574cb9e502dd663e70d910e8 Author: Ulf Hansson Date: Wed Dec 13 12:33:05 2023 +0100 PM: domains: Move genpd and its governor to the pmdomain subsystem It seems reasonable to collect the core parts for the generic PM domain, along with its corresponding provider drivers. Therefore let's move the files from drivers/base/power/ to drivers/pmdomain/ and while at it, let's also rename the files accordingly. Moreover, let's also update MAINTAINERS to reflect the update. Cc: Kevin Hilman Signed-off-by: Ulf Hansson Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20231213113305.29098-1-ulf.hansson@linaro.org commit f871e716058988ee1f97263f3247a2cf998f9579 Author: Ulf Hansson Date: Wed Dec 13 12:32:45 2023 +0100 PM: domains: Drop redundant header for genpd The "power.h" is no longer needed by genpd, so let's simply drop the include of it. Signed-off-by: Ulf Hansson Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20231213113245.29075-1-ulf.hansson@linaro.org commit 69e76c5af973854556625a8e156a39d1edbe8d6f Author: Shyam Sundar S K Date: Tue Dec 12 07:17:03 2023 +0530 platform/x86/amd/pmf: Add facility to dump TA inputs PMF driver sends constant inputs to TA which its gets via the other subsystems in the kernel. To debug certain TA issues knowing what inputs being sent to TA becomes critical. Add debug facility to the driver which can isolate Smart PC and TA related issues. Also, make source_as_str() as non-static function as this helper is required outside of sps.c file. Reviewed-by: Mario Limonciello Reviewed-by: Ilpo Järvinen Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-11-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 4984dbb60789ccb8674708446431f3bc0dc73100 Author: Shyam Sundar S K Date: Tue Dec 12 07:17:02 2023 +0530 platform/x86/amd/pmf: Make source_as_str() as non-static Add amd_pmf prefix to source_as_str() function, so that the function name does not look generic. As this is a helper function make it as non-static so that it can be reused across multiple PMF features. Reviewed-by: Mario Limonciello Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-10-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit d0ba7ad438dfed944232cf8c96141ae5057605ee Author: Shyam Sundar S K Date: Tue Dec 12 07:17:01 2023 +0530 platform/x86/amd/pmf: Add support to update system state PMF driver based on the output actions from the TA can request to update the system states like entering s0i3, lock screen etc. by generating an uevent. Based on the udev rules set in the userspace the event id matching the uevent shall get updated accordingly using the systemctl. Sample udev rules under Documentation/admin-guide/pmf.rst. Reviewed-by: Mario Limonciello Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-9-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit c3b40930a214545919d1385b8aa71cb665904571 Author: Shyam Sundar S K Date: Tue Dec 12 07:17:00 2023 +0530 platform/x86/amd/pmf: Add support update p3t limit P3T (Peak Package Power Limit) is a metric within the SMU controller that can influence the power limits. Add support from the driver to update P3T limits accordingly. Reviewed-by: Mario Limonciello Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-8-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit f4627dfd0e1924ad31c6476c0fc2308cfe12b561 Author: Shyam Sundar S K Date: Tue Dec 12 07:16:59 2023 +0530 platform/x86/amd/pmf: Add support to get inputs from other subsystems PMF driver sends changing inputs from each subystem to TA for evaluating the conditions in the policy binary. Add initial support of plumbing in the PMF driver for Smart PC to get information from other subsystems in the kernel. Reviewed-by: Mario Limonciello Reviewed-by: Ilpo Järvinen Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-7-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit c7af165372a8612eae08dbbab787d1d84d7f0384 Author: Shyam Sundar S K Date: Tue Dec 12 07:16:58 2023 +0530 platform/x86/amd/pmf: change amd_pmf_init_features() call sequence To sideload pmf policy binaries, the Smart PC Solution Builder provides a debugfs file called "update_policy"; that gets created under a new debugfs directory called "pb" and this new directory has to be associated with existing parent directory for PMF driver called "amd_pmf". In the current code structure, amd_pmf_dbgfs_register() is called after amd_pmf_init_features(). This will not help when the Smart PC builder feature has to be assoicated to the parent directory. Hence change the order of amd_pmf_dbgfs_register() and call it before amd_pmf_init_features() so that when the Smart PC init happens, it has the parent debugfs directory to get itself hooked. Reviewed-by: Mario Limonciello Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-6-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 7c45534afa4435c9fceeeb8ca33c0fdc269c2240 Author: Shyam Sundar S K Date: Tue Dec 12 07:16:57 2023 +0530 platform/x86/amd/pmf: Add support for PMF Policy Binary PMF Policy binary is a encrypted and signed binary that will be part of the BIOS. PMF driver via the ACPI interface checks the existence of Smart PC bit. If the advertised bit is found, PMF driver walks the acpi namespace to find out the policy binary size and the address which has to be passed to the TA during the TA init sequence. The policy binary is comprised of inputs (or the events) and outputs (or the actions). With the PMF ecosystem, OEMs generate the policy binary (or could be multiple binaries) that contains a supported set of inputs and outputs which could be specifically carved out for each usage segment (or for each user also) that could influence the system behavior either by enriching the user experience or/and boost/throttle power limits. Once the TA init command succeeds, the PMF driver sends the changing events in the current environment to the TA for a constant sampling frequency time (the event here could be a lid close or open) and if the policy binary has corresponding action built within it, the TA sends the action for it in the subsequent enact command. If the inputs sent to the TA has no output defined in the policy binary generated by OEMs, there will be no action to be performed by the PMF driver. Example policies: 1) if slider is performance ; set the SPL to 40W Here PMF driver registers with the platform profile interface and when the slider position is changed, PMF driver lets the TA know about this. TA sends back an action to update the Sustained Power Limit (SPL). PMF driver updates this limit via the PMFW mailbox. 2) if user_away ; then lock the system Here PMF driver hooks to the AMD SFH driver to know the user presence and send the inputs to TA and if the condition is met, the TA sends the action of locking the system. PMF driver generates a uevent and based on the udev rule in the userland the system gets locked with systemctl. The intent here is to provide the OEM's to make a policy to lock the system when the user is away ; but the userland can make a choice to ignore it. The OEMs will have an utility to create numerous such policies and the policies shall be reviewed by AMD before signing and encrypting them. Policies are shared between operating systems to have seemless user experience. Since all this action has to happen via the "amdtee" driver, currently there is no caller for it in the kernel which can load the amdtee driver. Without amdtee driver loading onto the system the "tee" calls shall fail from the PMF driver. Hence an explicit MODULE_SOFTDEP has been added to address this. Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-5-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 2b3a7f06caaf1aa7379cc0233462799852fcd8b4 Author: Shyam Sundar S K Date: Tue Dec 12 07:16:56 2023 +0530 platform/x86/amd/pmf: Change return type of amd_pmf_set_dram_addr() In the current code, the metrics table information was required only for auto-mode or CnQF at a given time. Hence keeping the return type of amd_pmf_set_dram_addr() as static made sense. But with the addition of Smart PC builder feature, the metrics table information has to be shared by the Smart PC also and this feature resides outside of core.c. To make amd_pmf_set_dram_addr() visible outside of core.c make it as a non-static function and move the allocation of memory for metrics table from amd_pmf_init_metrics_table() to amd_pmf_set_dram_addr() as amd_pmf_set_dram_addr() is the common function to set the DRAM address. Add a suspend handler that can free up the allocated memory for getting the metrics table information. Reviewed-by: Mario Limonciello Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-4-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit ae82cef7d9c53cad0852d2d79d430b210432a025 Author: Shyam Sundar S K Date: Tue Dec 12 07:16:55 2023 +0530 platform/x86/amd/pmf: Add support for PMF-TA interaction PMF TA (Trusted Application) loads via the TEE environment into the AMD ASP. PMF-TA supports two commands: 1) Init: Initialize the TA with the PMF Smart PC policy binary and start the policy engine. A policy is a combination of inputs and outputs, where; - the inputs are the changing dynamics of the system like the user behaviour, system heuristics etc. - the outputs, which are the actions to be set on the system which lead to better power management and enhanced user experience. PMF driver acts as a central manager in this case to supply the inputs required to the TA (either by getting the information from the other kernel subsystems or from userland) 2) Enact: Enact the output actions from the TA. The action could be applying a new thermal limit to boost/throttle the power limits or change system behavior. Reviewed-by: Mario Limonciello Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-3-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit ac052d8c08f9da225bea09c7e71527831368462b Author: Shyam Sundar S K Date: Tue Dec 12 07:16:54 2023 +0530 platform/x86/amd/pmf: Add PMF TEE interface AMD PMF driver loads the PMF TA (Trusted Application) into the AMD ASP's (AMD Security Processor) TEE (Trusted Execution Environment). PMF Trusted Application is a secured firmware placed under /lib/firmware/amdtee gets loaded only when the TEE environment is initialized. Add the initial code path to build these pipes. Reviewed-by: Mario Limonciello Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20231212014705.2017474-2-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit 716c3cf21784479a1934b670ec67f320cbb5d308 Author: Jouni Högander Date: Tue Nov 14 15:41:41 2023 +0200 drm/i915/display: Remove dead code around intel_atomic_helper->free_list After switching to directly using dma_fence instead of i915_sw_fence we have left some dead code around intel_atomic_helper->free_list. Remove that dead code. v2: Remove intel_atomic_state->freed as well Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231114134141.2527694-1-jouni.hogander@intel.com commit 9d52612690985fc0ee1ae1fbad61530a4f6bbb53 Author: Fuad Tabba Date: Thu Dec 14 10:01:57 2023 +0000 KVM: arm64: Trap external trace for protected VMs pKVM does not support external trace for protected VMs. Trap external trace, and add the ExtTrcBuff to make it possible to check for the feature. Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-18-tabba@google.com commit 21de26dbc5170dde8e4dfbfa1ecb77804ed6a377 Author: Fuad Tabba Date: Thu Dec 14 10:01:56 2023 +0000 KVM: arm64: Mark PAuth as a restricted feature for protected VMs Protected VMs will only support basic PAuth (FEAT_PAuth). Mark it as restricted to ensure that later versions aren't supported for protected guests. Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-17-tabba@google.com commit 73e3ce3f4a0e561e24ca71b20de00f03b427981e Author: Fuad Tabba Date: Thu Dec 14 10:01:55 2023 +0000 KVM: arm64: Fix which features are marked as allowed for protected VMs Cache maintenance operations are not trapped for protected VMs, and shouldn't be. Mark them as allowed. Moreover, features advertised by ID_AA64PFR2 and ID_AA64MMFR3 are (already) not allowed, mark them as such. Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-16-tabba@google.com commit 0ccd901da1886cf9dc53ab36ad8f1160b65e41f1 Author: Fuad Tabba Date: Thu Dec 14 10:01:54 2023 +0000 KVM: arm64: Macros for setting/clearing FGT bits There's a lot of boilerplate code for setting and clearing FGT bits when activating guest traps. Refactor it into macros. These macros will also be used in future patch series. No functional change intended. Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-15-tabba@google.com commit 5f6bd3f3daaaab8559ad7d2266ba38345231b7ae Author: Fuad Tabba Date: Thu Dec 14 10:01:53 2023 +0000 KVM: arm64: Define FGT nMASK bits relative to other fields Now that RES0 and MASK have full coverage, no need to manually encode nMASK. Calculate it relative to the other fields. No functional change intended. Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-14-tabba@google.com commit 9ff67dd26a9eed9d73dc23aa63e87b16b3382184 Author: Fuad Tabba Date: Thu Dec 14 10:01:52 2023 +0000 KVM: arm64: Use generated FGT RES0 bits instead of specifying them Now that all FGT fields are accounted for and represented, use the generated value instead of manually specifying them. For __HFGWTR_EL2_RES0, however, there is no generated value. Its fields are subset of HFGRTR_EL2, with the remaining being RES0. Therefore, add a mask that represents the HFGRTR_EL2 only bits and define __HFGWTR_EL2_* using those and the __HFGRTR_EL2_* fields. No functional change intended. Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-13-tabba@google.com commit 6c4abbea6d9c09df448b43624074a208c38e68e0 Author: Fuad Tabba Date: Thu Dec 14 10:01:51 2023 +0000 KVM: arm64: Add build validation for FGT trap mask values These checks help ensure that all the bits are accounted for, that there hasn't been a transcribing error from the spec nor from the generated mask values, which will be used in subsequent patches. Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-12-tabba@google.com commit fc04838f9c00fcbc90a8926bbd46928d6fb36477 Author: Fuad Tabba Date: Thu Dec 14 10:01:50 2023 +0000 KVM: arm64: Update and fix FGT register masks New trap bits have been defined since the latest update to this patch. Moreover, the existing definitions of some of the mask and the RES0 bits overlap, which could be wrong, confusing, or both. Update the bits based on DDI0601 2023-09, and ensure that the existing bits are consistent. Subsequent patches will use the generated RES0 fields instead of specifying them manually. This patch keeps the manual encoding of the bits to make it easier to review the series. Fixes: 0fd76865006d ("KVM: arm64: Add nPIR{E0}_EL1 to HFG traps") Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-11-tabba@google.com commit 676f482354886caa9b0cfa9236f5d20ac78f8c6a Author: Fuad Tabba Date: Thu Dec 14 10:01:49 2023 +0000 KVM: arm64: Handle HAFGRTR_EL2 trapping in nested virt Add the encodings to fine grain trapping fields for HAFGRTR_EL2 and add the associated handling code in nested virt. Based on DDI0601 2023-09. Add the missing field definitions as well, both to generate the correct RES0 mask and to be able to toggle their FGT bits. Also add the code for handling FGT trapping, reading of the register, to nested virt. Reviewed-by: Mark Brown Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-10-tabba@google.com commit 0c970ed2f87c058fe3ddeb4d7d8f64f72cf41d7a Author: Alexei Starovoitov Date: Fri Dec 15 16:45:49 2023 -0800 s390/bpf: Fix indirect trampoline generation The func_addr used to be NULL for indirect trampolines used by struct_ops. Now func_addr is a valid function pointer. Hence use BPF_TRAMP_F_INDIRECT flag to detect such condition. Fixes: 2cd3e3772e41 ("x86/cfi,bpf: Fix bpf_struct_ops CFI") Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Reviewed-by: Ilya Leoshkevich Link: https://lore.kernel.org/bpf/20231216004549.78355-1-alexei.starovoitov@gmail.com commit acd288666979a49538d70e0c0d86e1118b445058 Author: Damien Le Moal Date: Wed Nov 22 15:03:55 2023 +0900 misc: pci_endpoint_test: Use INTX instead of LEGACY In the root complex pci endpoint test function driver, change macros and functions names using the term "legacy" to use "intx" instead to match the term used in the PCI specifications. Link: https://lore.kernel.org/r/20231122060406.14695-6-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit 5b0fbadc0f87364ccbfb064789a6b790b99539ea Author: Damien Le Moal Date: Wed Nov 22 15:03:54 2023 +0900 PCI: endpoint: Rename LEGACY to INTX in test function driver In the endpoint test function driver, rename IRQ_TYPE_LEGACY to IRQ_TYPE_INTX and COMMAND_RAISE_LEGACY_IRQ to COMMAND_RAISE_INTX_IRQ to match the term used in the PCI specifications. Link: https://lore.kernel.org/r/20231122060406.14695-5-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit 8a608dac4bf6ca90f0ab7b9f99c738d4def74452 Author: Damien Le Moal Date: Wed Nov 22 15:03:53 2023 +0900 PCI: endpoint: Use INTX instead of legacy In the endpoint controller core code, change references to "legacy" interrupts to "INTX" interrupts to match the term used in the PCI specifications. Link: https://lore.kernel.org/r/20231122060406.14695-4-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Christoph Hellwig commit 74955cb8ccc38539f8c029336e07e6b43b6a942e Author: Damien Le Moal Date: Wed Nov 22 15:03:52 2023 +0900 PCI: endpoint: Drop PCI_EPC_IRQ_XXX definitions linux/pci.h defines the IRQ flags PCI_IRQ_INTX, PCI_IRQ_MSI and PCI_IRQ_MSIX. Let's use these flags directly instead of the endpoint definitions provided by enum pci_epc_irq_type. This removes the need for defining this enum type completely. Link: https://lore.kernel.org/r/20231122060406.14695-3-dlemoal@kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Serge Semin Reviewed-by: Christoph Hellwig Acked-by: Manivannan Sadhasivam commit 58ff9c5acb4aef58e118bbf39736cc4d6c11a3d3 Author: Bjorn Helgaas Date: Wed Nov 22 15:03:51 2023 +0900 PCI: Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX Rename PCI_IRQ_LEGACY to PCI_IRQ_INTX to be more explicit about the type of IRQ being referenced as well as to match the PCI specifications terms. Redefine PCI_IRQ_LEGACY as an alias to PCI_IRQ_INTX to avoid the need for doing the renaming tree-wide. New drivers and new code should now prefer using PCI_IRQ_INTX instead of PCI_IRQ_LEGACY. Link: https://lore.kernel.org/r/20231122060406.14695-2-dlemoal@kernel.org Signed-off-by: Bjorn Helgaas Signed-off-by: Damien Le Moal Signed-off-by: Lorenzo Pieralisi Reviewed-by: Yoshihiro Shimoda Reviewed-by: Serge Semin Reviewed-by: Christoph Hellwig Acked-by: Manivannan Sadhasivam commit 093976dd953c6d170b4562e4229be7c9314950e9 Merge: 08b3485540d9e 5496fb8eedd63 Author: Greg Kroah-Hartman Date: Mon Dec 18 11:27:47 2023 +0100 Merge tag 'fpga-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga into char-misc-next Xu writes: FPGA Manager changes for 6.8-rc1 DFL: - Philipp's change uses memdup_array_user() to do better overflow check All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of our for-next branch). Signed-off-by: Xu Yilun * tag 'fpga-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/fpga/linux-fpga: drivers/fpga: use standard array-copy function commit 5f23cea2d9ccc94c5de236312649fe85b89d6f26 Author: Ville Syrjälä Date: Mon Dec 11 23:37:50 2023 +0200 drm/i915/dmc: Print out the DMC mmio register list at fw load time To help with debugging print out the mmio list contained in the DMC firmware. Also highlight the event registers, and whether we're going to disable them or not. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231211213750.27109-5-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit e1a4e3cb3ac67ced1fe9e83fea6d8d91f7c4e864 Author: Ville Syrjälä Date: Wed Dec 13 17:08:07 2023 +0200 drm/i915/dmc: Also disable HRR event on TGL/ADLS main DMC Unlike later platforms TGL/ADLS has the half refresh rate (HRR) event on the main DMC (as opposed to the pipe DMC). Since we're disabling that event on all later platforms already let's do the same on TGL/ADLS as well. There is supposedly a bit somewhere (DMC_CHICKEN on TGL) to make the handler not do anything, but we don't currently have code to frob it. Though that bit should be off by default, the ADL+ experience has shown us that trusting any of this isn't a good idea. So seems safer to just disable all event handlers we know that we don't need. Also the TGL/ADLS DMC firmware is apparently using the wrong event (undelayed vblank) here anyway. It should be using the delayed vblank event instead (like ADL+ firmware does), but they didn't release a firmware fix for this and instead just hacked around this in the Windows driver code :/ v2: Also disable the event on ADLS (Imre) Cc: Imre Deak Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231213150807.21331-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit be2fce7891e20bdd1c785dd590c59d0ad6a1525a Author: Ville Syrjälä Date: Mon Dec 11 23:37:48 2023 +0200 drm/i915/dmc: Also disable the flip queue event on TGL main DMC Unlike later platforms TGL has its flip queue event (CLK_MSEC) on the main DMC (as opposed to the pipe DMC). Currently we're doing a second pass to disable that, but let's just follow the same approach as the later platforms and never even enable the event in the first place. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231211213750.27109-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 648d7be8ecf47b0556e32550145c70db153b16fb Author: Ville Syrjälä Date: Mon Dec 11 23:37:47 2023 +0200 drm/i915/dmc: Don't enable any pipe DMC events The pipe DMC seems to be making a mess of things in ADL. Various weird symptoms have been observed such as missing vblank irqs, typicalle happening when using multiple displays. Keep all pipe DMC event handlers disabled until needed (which is never atm). This is also what Windows does on ADL+. We can also drop DG2 from disable_all_flip_queue_events() since on DG2 the pipe DMC is the one that handles the flip queue events. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8685 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231211213750.27109-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit d0da0de31e1d50ff905eb8f095628eea666f8c67 Author: Lukas Bulwahn Date: Mon Dec 18 11:12:25 2023 +0100 MAINTAINERS: adjust file entry in GOOGLE TENSOR SoC SUPPORT Commit 0a910f160638 ("dt-bindings: clock: Add Google gs101 clock management unit bindings") adds the file google,gs101.h in include/dt-bindings/clock/. However, commit 9d71df3e6eb7 ("MAINTAINERS: add entry for Google Tensor SoC") wrongly refers to the file google,clk-gs101.h in that directory. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Adjust the file entry to the actual file in GOOGLE TENSOR SoC SUPPORT. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20231218101225.27637-1-lukas.bulwahn@gmail.com Signed-off-by: Krzysztof Kozlowski commit 0e6e3c6f7cb47ea1ae15a8148a6ddb30035c210e Author: Emil Renner Berthing Date: Fri Dec 15 15:39:02 2023 +0100 dt-bindings: gpio: dwapb: allow gpio-ranges Allow the generic gpio-ranges property so GPIOs can be mapped to their corresponding pin. This way control of GPIO on pins that are already used by other peripherals can be denied and basic pinconf can be done on pin controllers that support it. Signed-off-by: Emil Renner Berthing Acked-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit b2b97a62f055dd638f7f02087331a8380d8f139a Author: Alexander Gordeev Date: Mon Dec 18 10:58:58 2023 +0100 Revert "s390: update defconfigs" This reverts commit 7fe228e1866f3a270a1f963c9f2ae3ba1eae7411. CONFIG_IOMMU_DEFAULT_DMA_STRICT option needs to be disabled. Signed-off-by: Alexander Gordeev commit f9d6ed0213021ea00af30efbfa33e9a06c0610f2 Author: Fuad Tabba Date: Thu Dec 14 10:01:48 2023 +0000 KVM: arm64: Add bit masks for HAFGRTR_EL2 To support HAFGRTR_EL2 supported in nested virt in the following patch, first add its bitmask definitions based on DDI0601 2023-09. Reviewed-by: Mark Brown Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-9-tabba@google.com commit 863ac38984a822ff9f4337d70853d771dcf7aae5 Author: Fuad Tabba Date: Thu Dec 14 10:01:47 2023 +0000 KVM: arm64: Add missing HFGITR_EL2 FGT entries to nested virt Add the missing nested virt FGT table entries HFGITR_EL2. Based on DDI0601 and DDI0602 2023-09. Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-8-tabba@google.com commit 9d400eb722bd1be712b007149ff1d8fb2d6470db Author: Fuad Tabba Date: Thu Dec 14 10:01:46 2023 +0000 KVM: arm64: Add missing HFGxTR_EL2 FGT entries to nested virt Add the missing nested virt FGT table entries HFGxTR_EL2. Based on DDI0601 2023-09. Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-7-tabba@google.com commit 1565c881c3df053447309ff69ec7fd5dee2085e4 Author: Fuad Tabba Date: Thu Dec 14 10:01:45 2023 +0000 KVM: arm64: Explicitly trap unsupported HFGxTR_EL2 features Do not rely on the value of __HFGRTR_EL2_nMASK to trap unsupported features, since the nMASK can (and will) change as new traps are added and as its value is updated. Instead, explicitly specify the trap bits. Suggested-by: Joey Gouly Signed-off-by: Fuad Tabba Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231214100158.2305400-6-tabba@google.com commit e32afede682ee6c3ad2f1990967dc90dac51b9f6 Merge: 2cc14f52aeb78 4ebee8cebdf6d Author: Marc Zyngier Date: Mon Dec 18 09:19:35 2023 +0000 Merge remote-tracking branch 'arm64/for-next/sysregs' into kvm-arm64/fgt-rework Add shared arm64/for-next/sysregs branch to deal with conflict resolution. Signed-off-by: Marc Zyngier commit 65a828bab15887b33336d251fd659b2ae86de6d6 Author: Bartosz Golaszewski Date: Fri Dec 15 16:53:00 2023 +0100 gpiolib: use a mutex to protect the list of GPIO devices The global list of GPIO devices is never modified or accessed from atomic context so it's fine to protect it using a mutex. Add a new global lock dedicated to the gpio_devices list and use it whenever accessing or modifying it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 35f32e39b4d9b436354c2a37623c393a2ac7cf87 Author: Tudor Ambarus Date: Mon Dec 18 06:43:33 2023 +0000 dt-bindings: clock: google,gs101: rename CMU_TOP gate defines The gs101 clock defines from the bindings header are derived from the clock register names found in the datasheet under some certain rules. The CMU TOP gate clock defines missed to include the required "CMU" differentiator which will cause collisions with the gate clock defines of other clock units. Rename the TOP gate clock defines to include "CMU". Update the clock driver to use the new defines in order to not break compilation and bisect-ability. There are no device trees that use the previous defines. Fixes: 0a910f160638 ("dt-bindings: clock: Add Google gs101 clock management unit bindings") Signed-off-by: Tudor Ambarus Reviewed-by: Sam Protsenko Reviewed-by: Peter Griffin Link: https://lore.kernel.org/r/20231218064333.479885-1-tudor.ambarus@linaro.org Signed-off-by: Krzysztof Kozlowski commit f95fd4ac155733b5735c84a2e56eee8321232095 Author: Bartosz Golaszewski Date: Fri Dec 15 16:52:59 2023 +0100 gpiolib: rename static functions that are called with the lock taken Rename two functions that read or modify the global GPIO device list but don't take the lock themselves (and need to be called with it already acquired). Use the _unlocked() suffix which seems to be used quite consistently across the kernel despite there also existing the _locked() suffix for the same purpose. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 4c7fcbf5077532b80bc233c83d56e09a6bfa16b0 Author: Bartosz Golaszewski Date: Fri Dec 15 10:09:43 2023 +0100 gpio: xilinx: remove excess kernel doc The irqchip field has been removed from struct xgpio_instance so remove the doc as well. Fixes: b4510f8fd5d0 ("gpio: xilinx: Convert to immutable irq_chip") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312150239.IyuTVvrL-lkp@intel.com/ Signed-off-by: Bartosz Golaszewski Reviewed-by: Michal Simek Reviewed-by: Randy Dunlap commit 5a2a2cda916335fff4d804e58f36b2305926841e Author: Wang Jinchao Date: Mon Dec 18 15:16:16 2023 +0800 gpiolib: remove duplicate inclusions Remove second `#include `. Remove `#include ` too as it's included by `err.h`. Signed-off-by: Wang Jinchao Signed-off-by: Bartosz Golaszewski commit c7e37b07cc7564a07125ae48c11fd1ca2bcbeae2 Author: Ghanshyam Agrawal Date: Mon Dec 18 12:24:42 2023 +0530 ALSA: au88x0: fixed a typo Fixed typo in the word communicate Signed-off-by: Ghanshyam Agrawal Link: https://lore.kernel.org/r/20231218065442.43523-1-ghanshyam1898@gmail.com Signed-off-by: Takashi Iwai commit 0ee3a0d59e007320167a2e9f4b8bf1304ada7771 Author: Gao Xiang Date: Wed Dec 6 17:10:57 2023 +0800 erofs: enable sub-page compressed block support Let's just disable cached decompression and inplace I/Os for partial pages as the first step in order to enable sub-page block initial support. In other words, currently it works primarily based on temporary short-lived pages. Don't expect too much in terms of performance. Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231206091057.87027-6-hsiangkao@linux.alibaba.com commit 1ca01520148af399899ed66af5c78330bb9ecaf2 Author: Gao Xiang Date: Wed Dec 6 17:10:56 2023 +0800 erofs: refine z_erofs_transform_plain() for sub-page block support Sub-page block support is still unusable even with previous commits if interlaced PLAIN pclusters exist. Such pclusters can be found if the fragment feature is enabled. This commit tries to handle "the head part" of interlaced PLAIN pclusters first: it was once explained in commit fdffc091e6f9 ("erofs: support interlaced uncompressed data for compressed files"). It uses a unique way for both shifted and interlaced PLAIN pclusters. As an added bonus, PLAIN pclusters larger than the block size is also supported now for the upcoming large lclusters. Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231206091057.87027-5-hsiangkao@linux.alibaba.com commit e5aba911dee5e20fa82efbe13e0af8f38ea459e7 Author: Gao Xiang Date: Fri Dec 15 00:13:37 2023 +0800 erofs: fix ztailpacking for subpage compressed blocks `pageofs_in` should be the compressed data offset of the page rather than of the block. Acked-by: Chao Yu Reviewed-by: Yue Hu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231214161337.753049-1-hsiangkao@linux.alibaba.com commit b2adbc9cea752539f6421e9d4642408f666c1251 Author: Alvin Šipraga Date: Fri Nov 24 14:17:44 2023 +0100 clk: si5351: allow PLLs to be adjusted without reset Introduce a new PLL reset mode flag which controls whether or not to reset a PLL after adjusting its rate. The mode can be configured through platform data or device tree. Since commit 6dc669a22c77 ("clk: si5351: Add PLL soft reset"), the driver unconditionally resets a PLL whenever its rate is adjusted. The rationale was that a PLL reset was required to get three outputs working at the same time. Before this change, the driver never reset the PLLs. Commit b26ff127c52c ("clk: si5351: Apply PLL soft reset before enabling the outputs") subsequently introduced an option to reset the PLL when enabling a clock output that sourced it. Here, the rationale was that this is required to get a deterministic phase relationship between multiple output clocks. This clearly shows that it is useful to reset the PLLs in applications where multiple clock outputs are used. However, the Si5351 also allows for glitch-free rate adjustment of its PLLs if one avoids resetting the PLL. In our audio application where a single Si5351 clock output is used to supply a runtime adjustable bit clock, this unconditional PLL reset behaviour introduces unwanted glitches in the clock output. It would appear that the problem being solved in the former commit may be solved by using the optional device tree property introduced in the latter commit, obviating the need for an unconditional PLL reset after rate adjustment. But it's not OK to break the default behaviour of the driver, and it cannot be assumed that all device trees are using the property introduced in the latter commit. Hence, the new behaviour is made opt-in. Cc: Sebastian Hesselbarth Cc: Rabeeh Khoury Cc: Jacob Siverskog Cc: Sergej Sawazki Signed-off-by: Alvin Šipraga Acked-by: Sebastian Hesselbarth Link: https://lore.kernel.org/r/20231124-alvin-clk-si5351-no-pll-reset-v6-3-69b82311cb90@bang-olufsen.dk Signed-off-by: Stephen Boyd commit 9f950e7d45ea5595f36a7222571834aba6abad6d Author: Alvin Šipraga Date: Fri Nov 24 14:17:43 2023 +0100 dt-bindings: clock: si5351: add PLL reset mode property For applications where the PLL must be adjusted without glitches in the clock output(s), a new silabs,pll-reset-mode property is added. It can be used to specify whether or not the PLL should be reset after adjustment. Resetting is known to cause glitches. For compatibility with older device trees, it must be assumed that the default PLL reset mode is to unconditionally reset after adjustment. Cc: Sebastian Hesselbarth Cc: Rabeeh Khoury Cc: Jacob Siverskog Cc: Sergej Sawazki Reviewed-by: Rob Herring Signed-off-by: Alvin Šipraga Link: https://lore.kernel.org/r/20231124-alvin-clk-si5351-no-pll-reset-v6-2-69b82311cb90@bang-olufsen.dk Signed-off-by: Stephen Boyd commit 524dfbc4e9fc08384c6a426d1f0561a71ad2038e Author: Alvin Šipraga Date: Fri Nov 24 14:17:42 2023 +0100 dt-bindings: clock: si5351: convert to yaml The following additional properties are described: - clock-names - clock-frequency of the clkout child nodes In order to suppress warnings from the DT schema validator, the clkout child nodes are prescribed names clkout@[0-7] rather than clkout[0-7]. The example is refined as follows: - correct the usage of property pll-master -> silabs,pll-master - give an example of how the silabs,pll-reset property can be used I made myself maintainer of the file as I cannot presume that anybody else wants the responsibility. Cc: Sebastian Hesselbarth Cc: Rabeeh Khoury Reviewed-by: Rob Herring Signed-off-by: Alvin Šipraga Link: https://lore.kernel.org/r/20231124-alvin-clk-si5351-no-pll-reset-v6-1-69b82311cb90@bang-olufsen.dk Signed-off-by: Stephen Boyd commit 0990319a0400db1d6069b5549327cd9105a266d5 Author: Gregory CLEMENT Date: Fri Dec 15 16:37:06 2023 +0100 cpufreq: armada-8k: Fix parameter type warning The second parameter of clk_get() is of type 'const char *', so use NULL instead of the integer 0 to resolve a sparse warning: drivers/cpufreq/armada-8k-cpufreq.c:60:40: warning: Using plain integer as NULL pointer drivers/cpufreq/armada-8k-cpufreq.c:168:40: warning: Using plain integer as NULL pointer Reported-by: kernel test robot Signed-off-by: Gregory CLEMENT Reviewed-by: Andrew Lunn Signed-off-by: Viresh Kumar commit fc09b4919cab2a5d78250f557a4fcdd16340c1b2 Author: Kent Overstreet Date: Sun Dec 17 22:39:57 2023 -0500 media: vidtv: fix missing include Signed-off-by: Kent Overstreet commit 57eb6dcd32cf6b49c38eff81e60e8fd471aa05a8 Author: Christophe JAILLET Date: Sat Dec 16 17:59:38 2023 +0100 platform/chrome/wilco_ec: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/898d9aa181a84f1d17725ca047004bad532c37e9.1702745959.git.christophe.jaillet@wanadoo.fr Signed-off-by: Tzung-Bi Shih commit b642e081f46cc95c7f1468cab1ea3c2d5e11fdab Author: Yang Li Date: Mon Oct 30 14:12:42 2023 +0800 PCI: xilinx-xdma: Remove redundant dev_err() There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. ./drivers/pci/controller/pcie-xilinx-dma-pl.c:688:2-9: line 688 is redundant because platform_get_irq() already prints an error ./drivers/pci/controller/pcie-xilinx-dma-pl.c:702:2-9: line 702 is redundant because platform_get_irq() already prints an error Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7074 Link: https://lore.kernel.org/linux-pci/20231030061242.51475-1-yang.lee@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Krzysztof Wilczyński commit 610a689d2a57af3e21993cb6d8c3e5f839a8c89e Merge: 54f4c2570a191 174523479aae3 Author: David S. Miller Date: Mon Dec 18 02:05:45 2023 +0000 Merge branch 'rtnl-rcu' Pedro Tammela says: ==================== net: rtnl: introduce rcu_replace_pointer_rtnl Introduce the rcu_replace_pointer_rtnl helper to lockdep check rtnl lock rcu replacements, alongside the already existing helpers. Patch 2 uses the new helper in the rtnl_unregister_* functions. Originally this change was part of the P4TC series, as it's a recurrent pattern there, but since it has a use case in mainline we are pushing it separately. ==================== Signed-off-by: David S. Miller commit 174523479aae31b17c043de127c87ff2aef3d54e Author: Pedro Tammela Date: Fri Dec 15 14:57:11 2023 -0300 net: rtnl: use rcu_replace_pointer_rtnl in rtnl_unregister_* With the introduction of the rcu_replace_pointer_rtnl helper, cleanup the rtnl_unregister_* functions to use the helper instead of open coding it. Signed-off-by: Pedro Tammela Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 32da0f00ddcb101730cf242289b2b10ede0e1156 Author: Jamal Hadi Salim Date: Fri Dec 15 14:57:10 2023 -0300 net: rtnl: introduce rcu_replace_pointer_rtnl Introduce the rcu_replace_pointer_rtnl helper to lockdep check rtnl lock rcu replacements, alongside the already existing helpers. This is a quality of life helper so instead of using: rcu_replace_pointer(rp, p, lockdep_rtnl_is_held()) .. or the open coded.. rtnl_dereference() / rcu_assign_pointer() .. or the lazy check version .. rcu_replace_pointer(rp, p, 1) Use: rcu_replace_pointer_rtnl(rp, p) Signed-off-by: Jamal Hadi Salim Signed-off-by: Victor Nogueira Signed-off-by: Pedro Tammela Reviewed-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 5607068ae5ab02c3ac9cabc6859d36e98004c341 Author: Su Hui Date: Wed Nov 1 11:16:36 2023 +0800 clk: si5341: fix an error code problem in si5341_output_clk_set_rate regmap_bulk_write() return zero or negative error code, return the value of regmap_bulk_write() rather than '0'. Fixes: 3044a860fd09 ("clk: Add Si5341/Si5340 driver") Acked-by: Mike Looijmans Signed-off-by: Su Hui Link: https://lore.kernel.org/r/20231101031633.996124-1-suhui@nfschina.com Signed-off-by: Stephen Boyd commit 86b9357c1bbe993e74a304b3f7783d7d0c79c40c Author: Kent Overstreet Date: Fri Dec 15 20:21:52 2023 -0500 drivers/gpu/drm/i915/i915_memcpy.c: fix missing includes Signed-off-by: Kent Overstreet commit 2217fffcd63f86776c985d42e76daa43a56abdf1 Author: Niklas Cassel Date: Tue Nov 28 14:22:30 2023 +0100 PCI: dwc: endpoint: Fix dw_pcie_ep_raise_msix_irq() alignment support Commit 6f5e193bfb55 ("PCI: dwc: Fix dw_pcie_ep_raise_msix_irq() to get correct MSI-X table address") modified dw_pcie_ep_raise_msix_irq() to support iATUs which require a specific alignment. However, this support cannot have been properly tested. The whole point is for the iATU to map an address that is aligned, using dw_pcie_ep_map_addr(), and then let the writel() write to ep->msi_mem + aligned_offset. Thus, modify the address that is mapped such that it is aligned. With this change, dw_pcie_ep_raise_msix_irq() matches the logic in dw_pcie_ep_raise_msi_irq(). Link: https://lore.kernel.org/linux-pci/20231128132231.2221614-1-nks@flawful.org Fixes: 6f5e193bfb55 ("PCI: dwc: Fix dw_pcie_ep_raise_msix_irq() to get correct MSI-X table address") Signed-off-by: Niklas Cassel Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Cc: stable@vger.kernel.org # 5.7 Cc: Kishon Vijay Abraham I commit b08fa385937c1b6baae24683f6430230212b43e5 Author: Biju Das Date: Wed Nov 22 14:23:10 2023 +0000 clk: versaclock3: Drop ret variable Drop ret variable from vc3_clk_mux_determine_rate(). While at it, return the value returned by regmap_* wherever possible instead of returning 0. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20231122142310.203169-6-biju.das.jz@bp.renesas.com Signed-off-by: Stephen Boyd commit 123511056263bf1dce005f56bf76ba610d83e157 Author: Biju Das Date: Wed Nov 22 14:23:09 2023 +0000 clk: versaclock3: Add missing space between ')' and '{' Add missing space between ')' and '{' for hw.init initialization. While at it, update the macro VC3_PLL1_LOOP_FILTER_N_DIV_MSB 0x0a->0xa. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20231122142310.203169-5-biju.das.jz@bp.renesas.com Signed-off-by: Stephen Boyd commit a72956c82eebd138764fa214968571b0e455378e Author: Biju Das Date: Wed Nov 22 14:23:08 2023 +0000 clk: versaclock3: Use u8 return type for get_parent() callback The return type of get_parent() member in struct clk_ops is u8. Use same return type for corresponding callback function as well. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20231122142310.203169-4-biju.das.jz@bp.renesas.com Signed-off-by: Stephen Boyd commit 1e8ce92afdbf2dafa345a9b1d91fb14a1487dc7f Author: Biju Das Date: Wed Nov 22 14:23:07 2023 +0000 clk: versaclock3: Avoid unnecessary padding Move long/pointer variables at the beginning of struct to avoid unnecessary padding. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20231122142310.203169-3-biju.das.jz@bp.renesas.com Signed-off-by: Stephen Boyd commit eb16ddb838dd8602961b5fc17d1350cd41ae69e0 Author: Biju Das Date: Wed Nov 22 14:23:06 2023 +0000 clk: versaclock3: Update vc3_get_div() to avoid divide by zero Update vc3_get_div() to avoid divide by zero operation on vc3_div_round_rate() by returning1, if there is no table match found. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20231122142310.203169-2-biju.das.jz@bp.renesas.com Signed-off-by: Stephen Boyd commit b5be49db3d47eae30998174410a0eaac9816c0cf Author: Gabriel Fernandez Date: Fri Dec 8 15:36:58 2023 +0100 dt-bindings: stm32: add clocks and reset binding for stm32mp25 platform Adds clock and reset binding entries for STM32MP25 SoC family Signed-off-by: Gabriel Fernandez Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231208143700.354785-4-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 30500c2ad9c440d1a81e7a5dac3bcef62e21d910 Author: Gabriel Fernandez Date: Fri Dec 8 15:36:57 2023 +0100 clk: stm32mp1: use stm32mp13 reset driver STM32MP15 is now using the same reset driver as STM32MP13 as they have the same binding requirement. Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20231208143700.354785-3-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit 3ac7ca599515d335a55009c9c1016f244ef82a79 Author: Gabriel Fernandez Date: Fri Dec 8 15:36:56 2023 +0100 clk: stm32mp1: move stm32mp1 clock driver into stm32 directory Move all STM32MP clock drivers into same directory (stm32). Signed-off-by: Gabriel Fernandez Link: https://lore.kernel.org/r/20231208143700.354785-2-gabriel.fernandez@foss.st.com Signed-off-by: Stephen Boyd commit f0e5e1800204b82af6d3e8ef03012ab4afc22358 Author: Marek Vasut Date: Mon Nov 13 23:18:54 2023 +0100 clk: rs9: Add support for 9FGV0841 This model is similar to 9FGV0441, the DIFx bits start at bit 0 again, except this chip has 8 outputs. Reviewed-by: Biju Das Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20231113221949.111964-4-marek.vasut+renesas@mailbox.org Signed-off-by: Stephen Boyd commit cd9a5c97dfdaeb9c8ac02e14d7ccbd445e8b5265 Author: Marek Vasut Date: Mon Nov 13 23:18:53 2023 +0100 clk: rs9: Replace model check with bitshift from chip data Adjust rs9_calc_dif() to special-case the 9FGV0241 where DIFx bits start at 1, encode this shift into chip data and drop the model check entirely. Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20231113221949.111964-3-marek.vasut+renesas@mailbox.org Signed-off-by: Stephen Boyd commit 780da7f11a81aab64b90c2c978e2a574c0a59c83 Author: Marek Vasut Date: Mon Nov 13 23:18:52 2023 +0100 clk: rs9: Limit check to vendor ID in VID register Extract only vendor ID from VID register, the top 4 bits are revision ID which are not useful for the vendor ID check. Reviewed-by: Biju Das Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20231113221949.111964-2-marek.vasut+renesas@mailbox.org Signed-off-by: Stephen Boyd commit ff1b5154b57c32bc00861d705db30edb05f38ab5 Author: Marek Vasut Date: Mon Nov 13 23:18:51 2023 +0100 dt-bindings: clk: rs9: Add 9FGV0841 This is an 8-channel variant of 9FGV series. Acked-by: Alexander Stein Acked-by: Conor Dooley Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20231113221949.111964-1-marek.vasut+renesas@mailbox.org Signed-off-by: Stephen Boyd commit 616eceb1372be8043917515c41c511e2eb914e57 Author: Stanislav Jakubek Date: Sun Nov 12 17:56:51 2023 +0100 dt-bindings: clock: brcm,kona-ccu: convert to YAML Convert Broadcom Kona family clock controller unit (CCU) bindings to DT schema. Changes during conversion: - remove "dmac" from clock-output-names for brcm,bcm11351-master-ccu, such a clock doesn't exist - remove "uartb4" from clock-output-names for brcm,bcm21664-slave-ccu, such a clock doesn't exist Signed-off-by: Stanislav Jakubek Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/ZVED01t3+coBd44x@standask-GA-A55M-S2HP Signed-off-by: Stephen Boyd commit 94b0f301f6ee92f79a2fe2c655dfdbdfe2aec536 Author: Rafał Miłecki Date: Sun Nov 19 22:24:16 2023 +0100 dt-bindings: arm: mediatek: move ethsys controller & convert to DT schema DT schema helps validating DTS files. Binding was moved to clock/ as this hardware is a clock provider. Example required a small fix for "reg" value (1 address cell + 1 size cell). Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231119212416.2682-1-zajec5@gmail.com Signed-off-by: Stephen Boyd commit 3a96393a46e780d14a8592d7265b5a639fa7e5c9 Author: Shubhrajyoti Datta Date: Thu Dec 14 16:21:25 2023 +0530 clocking-wizard: Add support for versal clocking wizard Add support for Clocking Wizard for Versal adaptive compute acceleration platforms. The Versal clocking wizard differs in the programming model and the register layout. The CLKFBOUT_1 registers are at offset of 0x200 instead of the 0x330 in Versal. In Versal clocking wizard the low and high time is programmed instead of the divisor. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/20231214105125.26919-3-shubhrajyoti.datta@amd.com [sboyd@kernel.org: Stop initializing spinlock flags] Signed-off-by: Stephen Boyd commit 86b1ec23bb8132aee1ab33c98ca1849f2d1ab044 Author: Shubhrajyoti Datta Date: Thu Dec 14 16:21:24 2023 +0530 dt-bindings: clock: xilinx: add versal compatible Add the devicetree compatible for Versal clocking wizard. Acked-by: Krzysztof Kozlowski Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/20231214105125.26919-2-shubhrajyoti.datta@amd.com Signed-off-by: Stephen Boyd commit 2c973fb5d37f5a017fc1dfbe449b468cd46fab8f Author: Conor Dooley Date: Thu Dec 14 10:59:57 2023 +0000 clk: microchip: mpfs-ccc: replace include of asm-generic/errno-base.h As evidenced by the fact that only 2 other drivers include this header, it is not a normal thing to do. Including the regular version of this header is far more conventional for drivers. Acked-by: Al Viro Signed-off-by: Conor Dooley Link: https://lore.kernel.org/r/20231214-dipper-earshot-72eef3059961@spud Signed-off-by: Stephen Boyd commit dc0684adf3b6be6b20fec9295027980021d30353 Author: Jacky Huang Date: Mon Sep 25 07:02:51 2023 +0000 rtc: Add driver for Nuvoton ma35d1 rtc controller The ma35d1 rtc controller provides real-time and calendar messaging capabilities. It supports programmable time tick and alarm match interrupts. The time and calendar messages are expressed in BCD format. This driver supports the built-in rtc controller of the ma35d1. It enables setting and reading the rtc time and configuring and reading the rtc alarm. Signed-off-by: Jacky Huang Link: https://lore.kernel.org/r/20230925070251.28-4-ychuang570808@gmail.com Signed-off-by: Alexandre Belloni commit 3767bba698707d7bad5099371b797d0fd6d39709 Author: Jacky Huang Date: Mon Sep 25 07:02:49 2023 +0000 dt-bindings: rtc: Add Nuvoton ma35d1 rtc Add documentation describing the Nuvoton ma35d1 rtc controller. Signed-off-by: Jacky Huang Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230925070251.28-2-ychuang570808@gmail.com Signed-off-by: Alexandre Belloni commit 39118392d19aebd8e89ba0d73c0da2a5b1f3d1a2 Author: Shubhrajyoti Datta Date: Tue Nov 28 16:13:48 2023 +0530 dt-bindings: Remove alt_ref from versal The alt_ref is present only in Versal-net devices. Other versal devices do not have it. So remove alt_ref for versal. Fixes: 352546805a44 ("dt-bindings: clock: Add bindings for versal clock driver") Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/20231128104348.16372-1-shubhrajyoti.datta@amd.com Acked-by: Conor Dooley Signed-off-by: Stephen Boyd commit 29d861b5d29b6c80a887e93ad982cbbf4af2a06b Author: Marek Vasut Date: Sun Nov 5 21:06:15 2023 +0100 clk: rs9: Fix DIF OEn bit placement on 9FGV0241 On 9FGV0241, the DIF OE0 is BIT(1) and DIF OE1 is BIT(2), on the other chips like 9FGV0441 and 9FGV0841 DIF OE0 is BIT(0) and so on. Increment the index in BIT() macro instead of the result of BIT() macro to shift the bit correctly on 9FGV0241. Fixes: 603df193ec51 ("clk: rs9: Support device specific dif bit calculation") Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20231105200642.62792-1-marek.vasut+renesas@mailbox.org Reviewed-by: Alexander Stein Signed-off-by: Stephen Boyd commit cef9ecc8e938dd48a560f7dd9be1246359248d20 Author: Mario Limonciello Date: Mon Nov 27 23:36:53 2023 -0600 rtc: Extend timeout for waiting for UIP to clear to 1s Specs don't say anything about UIP being cleared within 10ms. They only say that UIP won't occur for another 244uS. If a long NMI occurs while UIP is still updating it might not be possible to get valid data in 10ms. This has been observed in the wild that around s2idle some calls can take up to 480ms before UIP is clear. Adjust callers from outside an interrupt context to wait for up to a 1s instead of 10ms. Cc: # 6.1.y Fixes: ec5895c0f2d8 ("rtc: mc146818-lib: extract mc146818_avoid_UIP") Reported-by: Carsten Hatger Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217626 Tested-by: Mateusz Jończyk Reviewed-by: Mateusz Jończyk Acked-by: Mateusz Jończyk Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20231128053653.101798-5-mario.limonciello@amd.com Signed-off-by: Alexandre Belloni commit 120931db07b49252aba2073096b595482d71857c Author: Mario Limonciello Date: Mon Nov 27 23:36:52 2023 -0600 rtc: Add support for configuring the UIP timeout for RTC reads The UIP timeout is hardcoded to 10ms for all RTC reads, but in some contexts this might not be enough time. Add a timeout parameter to mc146818_get_time() and mc146818_get_time_callback(). If UIP timeout is configured by caller to be >=100 ms and a call takes this long, log a warning. Make all callers use 10ms to ensure no functional changes. Cc: # 6.1.y Fixes: ec5895c0f2d8 ("rtc: mc146818-lib: extract mc146818_avoid_UIP") Signed-off-by: Mario Limonciello Tested-by: Mateusz Jończyk Reviewed-by: Mateusz Jończyk Acked-by: Mateusz Jończyk Link: https://lore.kernel.org/r/20231128053653.101798-4-mario.limonciello@amd.com Signed-off-by: Alexandre Belloni commit 1311a8f0d4b23f58bbababa13623aa40b8ad4e0c Author: Mario Limonciello Date: Mon Nov 27 23:36:51 2023 -0600 rtc: Adjust failure return code for cmos_set_alarm() When mc146818_avoid_UIP() fails to return a valid value, this is because UIP didn't clear in the timeout period. Adjust the return code in this case to -ETIMEDOUT. Tested-by: Mateusz Jończyk Reviewed-by: Mateusz Jończyk Acked-by: Mateusz Jończyk Cc: Fixes: cdedc45c579f ("rtc: cmos: avoid UIP when reading alarm time") Fixes: cd17420ebea5 ("rtc: cmos: avoid UIP when writing alarm time") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20231128053653.101798-3-mario.limonciello@amd.com Signed-off-by: Alexandre Belloni commit af838635a3eb9b1bc0d98599c101ebca98f31311 Author: Mario Limonciello Date: Mon Nov 27 23:36:50 2023 -0600 rtc: mc146818-lib: Adjust failure return code for mc146818_get_time() mc146818_get_time() calls mc146818_avoid_UIP() to avoid fetching the time while RTC update is in progress (UIP). When this fails, the return code is -EIO, but actually there was no IO failure. The reason for the return from mc146818_avoid_UIP() is that the UIP wasn't cleared in the time period. Adjust the return code to -ETIMEDOUT to match the behavior. Tested-by: Mateusz Jończyk Reviewed-by: Mateusz Jończyk Acked-by: Mateusz Jończyk Cc: Fixes: 2a61b0ac5493 ("rtc: mc146818-lib: refactor mc146818_get_time") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20231128053653.101798-2-mario.limonciello@amd.com Signed-off-by: Alexandre Belloni commit 48a9ba5eb4d720c6e21c6e4d2a6fb6e1a97f5f2a Author: Krzysztof Kozlowski Date: Mon Nov 6 08:30:48 2023 +0100 arm64: defconfig: enable Qualcomm WSA884x driver Enable the Qualcomm WSA884x driver, used speakers on boards with Qualcomm SM8550 like QRD8550. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231106073048.24553-1-krzysztof.kozlowski@linaro.org [bjorn: Rebased on Johan's patch adding SC8280XP and WSA883x, rewrote commit message] Signed-off-by: Bjorn Andersson commit 48490899007ae98faf8a0071a602174502b8eefc Author: Johan Hovold Date: Thu Oct 12 10:01:57 2023 +0200 arm64: defconfig: enable Qualcomm UEFI Secure App driver Enable the Qualcomm QSEECOM interface driver and the UEFI Secure Application client driver which are needed to access EFI variables on machines like the Lenovo ThinkPad X13s. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231012080157.4616-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 223e8af324985de9e0b5b4cda2ec29783410f13f Author: Johan Hovold Date: Thu Oct 12 10:01:56 2023 +0200 arm64: defconfig: enable Qualcomm sc8280xp sound drivers Enable the Qualcomm sc8280xp machine driver and the wsa833x speaker codec driver that are needed for sound on machines like the Lenovo ThinkPad X13s. Note that the wcd938x headphone codec driver is currently implicitly enabled as it is selected by the sc7280 machine driver. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231012080157.4616-2-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit b7b9a6aa7aea2bcba2d35d65e4ce2913115485a3 Author: Konrad Dybcio Date: Thu Dec 14 19:13:43 2023 +0100 arm64: dts: qcom: sc8180x-primus: Allow UFS regulators load/mode setting The UFS driver expects to be able to set load (and by extension, mode) on the supplied regulators. Add the necessary properties to make that possible. Fixes: 2ce38cc1e8fe ("arm64: dts: qcom: sc8180x: Introduce Primus") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214-topic-sc8180_fixes-v1-6-421904863006@linaro.org Signed-off-by: Bjorn Andersson commit c879ee11791adf7e29d2fb615bf176504ed51465 Author: Konrad Dybcio Date: Thu Dec 14 19:13:42 2023 +0100 arm64: dts: qcom: sc8180x: Describe the GIC redistributor The redistributor properties were absent in the initial submission, add them. Fixes: 8575f197b077 ("arm64: dts: qcom: Introduce the SC8180x platform") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214-topic-sc8180_fixes-v1-5-421904863006@linaro.org Signed-off-by: Bjorn Andersson commit 384ea2aa2066d27c20257550ba91418401b91199 Author: Konrad Dybcio Date: Thu Dec 14 19:13:41 2023 +0100 arm64: dts: qcom: sc8180x: Add interconnects to UFS To ensure the required paths don't collapse, add interconnect properties to the UFS controller. Fixes: 8575f197b077 ("arm64: dts: qcom: Introduce the SC8180x platform") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214-topic-sc8180_fixes-v1-4-421904863006@linaro.org Signed-off-by: Bjorn Andersson commit 4978dfde89b1f454c88bc5519dc996cc5b58d72e Author: Konrad Dybcio Date: Thu Dec 14 19:13:40 2023 +0100 arm64: dts: qcom: sc8180x: Add missing MDP clocks The ROT clock is required for the MDP block to function (looks like some others depend on it), and whike the LUT clock's purpose is not clear, it's likely better to turn on all of MDP's dependencies rather than not doing so. Add these clocks under the MDP node. This also makes Primus work without clk_ignore_unused (as far as the dmesg-visible errors go, anyway). Fixes: 494dec9b6f54 ("arm64: dts: qcom: sc8180x: Add display and gpu nodes") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214-topic-sc8180_fixes-v1-3-421904863006@linaro.org Signed-off-by: Bjorn Andersson commit 2564209891a436f71c6c8a245d3b56cf4382d65d Author: Konrad Dybcio Date: Thu Dec 14 19:13:39 2023 +0100 arm64: dts: qcom: sc8180x: Add UFS GDSC To make sure the UFS controller and some relevant clocks have power flowing to them, hook up the forgotten-about GDSC. Fixes: 8575f197b077 ("arm64: dts: qcom: Introduce the SC8180x platform") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214-topic-sc8180_fixes-v1-2-421904863006@linaro.org Signed-off-by: Bjorn Andersson commit 5037ca35ce42a962ea1b03895effd632a516b3b7 Author: Luca Weiss Date: Fri Dec 8 16:08:00 2023 +0100 arm64: dts: qcom: sc7280*: move MPSS and WPSS memory to dtsi It appears that all SC7280-based devices so far have mpss_mem and wpss_mem on the same reg with the same size. Also these memory regions are referenced already in sc7280.dtsi so that's where they should also be defined. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-4-6aa394d33edf@fairphone.com [bjorn: delete-node &wpss_mem in qcs6490 rb3gen2, and qcm6490 idp] Signed-off-by: Bjorn Andersson commit 54f4c2570a19186dfebd555b163084c1824cf1d6 Merge: dd78428786334 d63710fc0f1a5 Author: David S. Miller Date: Sun Dec 17 20:10:08 2023 +0000 Merge branch 'phy-ackage-addr-mmd-apis' Christian Marangi says: ==================== net: phy: add PHY package base addr + mmd APIs This small series is required for the upcoming qca807x PHY that will make use of PHY package mmd API and the new implementation with read/write based on base addr. The MMD PHY package patch currently has no use but it will be used in the upcoming patch and it does complete what a PHY package may require in addition to basic read/write to setup global PHY address. (Changelog for all the revision is present in the single patch) ==================== Signed-off-by: David S. Miller commit d63710fc0f1a501fd75a7025e3070a96ffa1645f Author: Christian Marangi Date: Fri Dec 15 14:15:34 2023 +0100 net: phy: add support for PHY package MMD read/write Some PHY in PHY package may require to read/write MMD regs to correctly configure the PHY package. Add support for these additional required function in both lock and no lock variant. It's assumed that the entire PHY package is either C22 or C45. We use C22 or C45 way of writing/reading to mmd regs based on the passed phydev whether it's C22 or C45. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 028672bd1d73cf65249a420c1de75e8d2acd2f6a Author: Christian Marangi Date: Fri Dec 15 14:15:33 2023 +0100 net: phy: restructure __phy_write/read_mmd to helper and phydev user Restructure phy_write_mmd and phy_read_mmd to implement generic helper for direct mdiobus access for mmd and use these helper for phydev user. This is needed in preparation of PHY package API that requires generic access to the mdiobus and are deatched from phydev struct but instead access them based on PHY package base_addr and offsets. Signed-off-by: Christian Marangi Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit 9eea577eb1155fe4a183bc5e7bf269b0b2e7a6ba Author: Christian Marangi Date: Fri Dec 15 14:15:32 2023 +0100 net: phy: extend PHY package API to support multiple global address Current API for PHY package are limited to single address to configure global settings for the PHY package. It was found that some PHY package (for example the qca807x, a PHY package that is shipped with a bundle of 5 PHY) requires multiple PHY address to configure global settings. An example scenario is a PHY that have a dedicated PHY for PSGMII/serdes calibrarion and have a specific PHY in the package where the global PHY mode is set and affects every other PHY in the package. Change the API in the following way: - Change phy_package_join() to take the base addr of the PHY package instead of the global PHY addr. - Make __/phy_package_write/read() require an additional arg that select what global PHY address to use by passing the offset from the base addr passed on phy_package_join(). Each user of this API is updated to follow this new implementation following a pattern where an enum is defined to declare the offset of the addr. We also drop the check if shared is defined as any user of the phy_package_read/write is expected to use phy_package_join first. Misuse of this will correctly trigger a kernel panic for NULL pointer exception. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit ebb30ccbbdbd6fae5177b676da4f4ac92bb4f635 Author: Christian Marangi Date: Fri Dec 15 14:15:31 2023 +0100 net: phy: make addr type u8 in phy_package_shared struct Switch addr type in phy_package_shared struct to u8. The value is already checked to be non negative and to be less than PHY_MAX_ADDR, hence u8 is better suited than using int. Signed-off-by: Christian Marangi Reviewed-by: Russell King (Oracle) Signed-off-by: David S. Miller commit dd7842878633453e38d6a4927593dd28b9d8ab91 Author: Suman Ghosh Date: Fri Dec 15 17:31:49 2023 +0530 octeontx2-af: Add new devlink param to configure maximum usable NIX block LFs On some silicon variants the number of available CAM entries are less. Reserving one entry for each NIX-LF for default DMAC based pkt forwarding rules will reduce the number of available CAM entries further. Hence add configurability via devlink to set maximum number of NIX-LFs needed which inturn frees up some CAM entries. Signed-off-by: Suman Ghosh Signed-off-by: David S. Miller commit 648002a27c6b3ae293cc415e1fbf20aaa6af8bd3 Author: Luca Weiss Date: Sun Dec 17 16:22:55 2023 +0100 ARM: dts: qcom: msm8974*: Re-enable remoteprocs on various boards Even though a previous patch re-added the supplies to the adsp and modem remoteprocs, due to timing differences in the meantime the remoteprocs were disabled by default, but the commit re-adding the supplies didn't enable them. Enable them now to hopefully properly resolve the fallout now. Fixes: 6d933c0ec171 ("ARM: dts: qcom: msm8974-*: re-add remoteproc supplies") Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231217-msm8974-misc-v1-3-bece1ba2667d@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 1522b3bb306986e2f3923152a05939176b2a8a0c Author: Luca Weiss Date: Sun Dec 17 16:22:54 2023 +0100 ARM: dts: qcom: msm8974: Remove bogus cd-gpio pinctrl No board in mainline uses GPIO 54 for card-detect on sdhc_2, and this also causes conflict when both sdhc_2 and blsp2_uart4 are used, such as on qcom-msm8974-lge-nexus5-hammerhead. Fixes: 1dfe967ec7cf ("ARM: dts: qcom-msm8974*: Consolidate I2C/UART/SDHCI") Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231217-msm8974-misc-v1-2-bece1ba2667d@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 32b075f8a2d4fefb8d791431606930883a5d5f15 Author: Alexey Minnekhanov Date: Sun Dec 17 16:22:53 2023 +0100 ARM: dts: qcom: msm8974-klte: Remove unused property Panel driver samsung,s6e3fa2 does not use te-gpios. The pin is already configured properly through pinctrl. Fixes: 3657b677d20d ("ARM: dts: qcom: msm8974-klte: add support for display") Signed-off-by: Alexey Minnekhanov [luca: adjust commit message, add Fixes tag] Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231217-msm8974-misc-v1-1-bece1ba2667d@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 6615713c10c974d13a13297e95acd304e419dfba Author: Luca Weiss Date: Fri Dec 8 16:07:59 2023 +0100 arm64: dts: qcom: sc7280: Rename reserved-memory nodes It was clarified a while ago that reserved-memory nodes shouldn't be called memory@ but should have a descriptive name. Update sc7280.dtsi to follow that. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-3-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit 300ed425dfa99f6926299ec196a1eedf05f47b21 Author: Luca Weiss Date: Fri Dec 8 16:08:02 2023 +0100 remoteproc: qcom_q6v5_pas: Add SC7280 ADSP, CDSP & WPSS Add support for the ADSP, CDSP and WPSS remoteprocs found on the SC7280 SoC using the q6v5-pas driver. This driver can be used on regular LA ("Linux Android") based releases, however the SC7280 ChromeOS devices need different driver support due to firmware differences. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-6-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit 11eff1020440060c53d2261531432927c9fb4ee3 Author: Luca Weiss Date: Fri Dec 8 16:08:01 2023 +0100 dt-bindings: remoteproc: qcom: sc7180-pas: Add SC7280 compatibles Add the compatibles and constraints for the ADSP, CDSP and WPSS found on the SC7280 SoC. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-5-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit 9d598fab9731055638c6e9333c4f21aa0d174a48 Author: Luca Weiss Date: Fri Dec 8 16:07:57 2023 +0100 dt-bindings: remoteproc: qcom: sc7180-pas: Fix SC7280 MPSS PD-names The power domains for MPSS on SC7280 are actually named CX and MSS, and not CX and MX. Adjust the name which also aligns the bindings with the dts and fixes validation. Fixes: 8bb92d6fd0b3 ("dt-bindings: remoteproc: qcom,sc7180-pas: split into separate file") Acked-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-1-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit 419618bd90f6b2c3adec87beb0d62adfcae619eb Author: Luca Weiss Date: Fri Dec 8 16:07:58 2023 +0100 arm64: dts: qcom: sc7280: Remove unused second MPSS reg The bindings for sc7280-mpss-pas neither expects a second reg nor a reg-names property, which is only required by the sc7280-mss-pil bindings. Move it to sc7280-herobrine-lte-sku.dtsi, the only place where that other compatible is used. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-2-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit 5f8ba4f28ddb432c8a9720c337f9047e38fa7e36 Author: Richard Acayan Date: Mon Oct 16 22:18:13 2023 -0400 arm64: dts: qcom: sdm670: add display subsystem The Snapdragon 670 has a display subsystem for controlling and outputting to the display. Add support for it in the device tree. Reviewed-by: Dmitry Baryshkov Signed-off-by: Richard Acayan Link: https://lore.kernel.org/r/20231017021805.1083350-15-mailingradian@gmail.com Signed-off-by: Bjorn Andersson commit ff5fed86be58a8351938bb4c828f77329cde4cbd Author: Ghanshyam Agrawal Date: Fri Dec 15 12:37:07 2023 +0530 soc: qcom: llcc: Fix typo in kernel-doc Fixed spelling of "descriptor". Signed-off-by: Ghanshyam Agrawal Link: https://lore.kernel.org/r/20231215070707.560350-1-ghanshyam1898@gmail.com [bjorn: Rewrote commit message] Signed-off-by: Bjorn Andersson commit ce2e6658cfa02ef7fb7b697abac85742af4cc0c0 Author: Abel Vesa Date: Thu Dec 14 19:35:50 2023 +0200 dt-bindings: soc: qcom,aoss-qmp: document the X1E80100 Always-On Subsystem side channel Document the Always-On Subsystem side channel on the X1E80100 Platform. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231214-x1e80100-soc-qcom-aoss-v1-1-94c46c5182fd@linaro.org Signed-off-by: Bjorn Andersson commit 6594a847820b7ab817b376cd2817c6cce0285062 Author: Krzysztof Kozlowski Date: Mon Dec 11 16:55:33 2023 +0100 MAINTAINERS: qcom: move Andy Gross to credits Andy's last emails related to Qualcomm SoC ARM subarchitecture are from November 2019, so move him to credits. Stale maintainer entries hide information whether subsystem needs help, has a bus-factor or is even orphaned. Link: https://lore.kernel.org/all/?q=f%3A%22Andy+Gross%22 Cc: Arnd Bergmann Cc: Andy Gross Cc: Bjorn Andersson Cc: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231211155533.106003-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit d12971849d71781c1e4ffd1117d4878ce233d319 Author: Werner Fischer Date: Wed Dec 13 10:45:25 2023 +0100 watchdog: it87_wdt: Keep WDTCTRL bit 3 unmodified for IT8784/IT8786 WDTCTRL bit 3 sets the mode choice for the clock input of IT8784/IT8786. Some motherboards require this bit to be set to 1 (= PCICLK mode), otherwise the watchdog functionality gets broken. The BIOS of those motherboards sets WDTCTRL bit 3 already to 1. Instead of setting all bits of WDTCTRL to 0 by writing 0x00 to it, keep bit 3 of it unchanged for IT8784/IT8786 chips. In this way, bit 3 keeps the status as set by the BIOS of the motherboard. Watchdog tests have been successful with this patch with the following systems: IT8784: Thomas-Krenn LES plus v2 (YANLING YL-KBRL2 V2) IT8786: Thomas-Krenn LES plus v3 (YANLING YL-CLU L2) IT8786: Thomas-Krenn LES network 6L v2 (YANLING YL-CLU6L) Link: https://lore.kernel.org/all/140b264d-341f-465b-8715-dacfe84b3f71@roeck-us.net/ Signed-off-by: Werner Fischer Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231213094525.11849-4-devlists@wefi.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ab6dea00fd6d148deecf2e8baaf0c110b35d7cea Author: Werner Fischer Date: Wed Dec 13 10:45:24 2023 +0100 watchdog: it87_wdt: Add IT8659 ID This patch adds watchdog support for the ITE IT8659 watchdog. IT8659 watchdog works in the same way as the other watchdogs supported by it87_wdt. Before this patch, IT8659 watchdog is not supported. After a modprobe, dmesg reports: it87_wdt: Unknown Chip found, Chip 8659 Revision 0007 With this patch, modprobe it87_wdt recognizes the watchdog as the dmesg output shows: it87_wdt: Chip IT8659 revision 7 initialized. timeout=60 sec (nowayout=0 testmode=0) Watchdog tests on a YANLING YL-ALP3L2C-1235U system have been successful, the watchdog works as expected with this patch. Signed-off-by: Werner Fischer Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231213094525.11849-3-devlists@wefi.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 133530a5b99d6755bb9f712405d5d1a493cbaeab Author: Werner Fischer Date: Wed Dec 13 10:45:23 2023 +0100 watchdog: it87_wdt: Remove redundant max_units setting Commit 893dc8b5c978 ("watchdog: it87: Drop support for resetting watchdog though CIR and Game port") removed the try_gameport variable, and left max_units setting redundant. To clean up the code, this patch removes this redundant setting. Signed-off-by: Werner Fischer Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231213094525.11849-2-devlists@wefi.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fed7d05382abca82883a8213d42601235073869b Author: Werner Fischer Date: Wed Dec 13 10:45:22 2023 +0100 watchdog: it87_wdt: add blank line after variable declaration This patch fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations Signed-off-by: Werner Fischer Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231213094525.11849-1-devlists@wefi.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a79b4a4906b1b0c15a5efc2959bc2086a10a02b5 Author: Nikita Shubin Date: Tue Dec 12 11:20:42 2023 +0300 dt-bindings: wdt: Add ts72xx Add DT binding for Technologic Systems TS-72xx watchdog. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Nikita Shubin Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231212-ep93xx-v6-25-c307b8ac9aa8@maquefel.me Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f84ce9f29de988fac9c7dbe7cd5faf313bbd9414 Author: Biju Das Date: Sun Dec 10 13:47:12 2023 +0000 dt-bindings: watchdog: dlg,da9062-watchdog: Document DA9063 watchdog Document DA9063 watchdog device as it is similar to DA9062 watchdog. Signed-off-by: Biju Das Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231210134717.94020-4-biju.das.jz@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ddba46c82729a77dd4b43b9e8c960fd239dee99f Author: Biju Das Date: Sun Dec 10 13:47:11 2023 +0000 dt-bindings: watchdog: dlg,da9062-watchdog: Add fallback for DA9061 watchdog The DA9061 watchdog is identical to DA9062 watchdog, so no driver changes are required. The fallback compatible string "dlg,da9062-watchdog" will be used on DA9061 watchdog. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Conor Dooley Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231210134717.94020-3-biju.das.jz@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c1a6edf3b541e44e78f10bc6024df779715723f1 Author: Vignesh Raghavendra Date: Wed Dec 13 19:31:10 2023 +0530 watchdog: rti_wdt: Drop runtime pm reference count when watchdog is unused Call runtime_pm_put*() if watchdog is not already started during probe and re enable it in watchdog start as required. On K3 SoCs, watchdogs and their corresponding CPUs are under same power-domain, so if the reference count of unused watchdogs aren't dropped, it will lead to CPU hotplug failures as Device Management firmware won't allow to turn off the power-domain due to dangling reference count. Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support") Signed-off-by: Vignesh Raghavendra Tested-by: Manorit Chawdhry Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231213140110.938129-1-vigneshr@ti.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f77999887235f8c378af343df11a6bcedda5b284 Author: Ben Dooks Date: Wed Nov 22 08:51:18 2023 +0000 watchdog: starfive: add lock annotations to fix context imbalances Add the necessary __acquires() and __releases() to the functions that take and release the wdt lock to avoid the following sparse warnings: drivers/watchdog/starfive-wdt.c:204:13: warning: context imbalance in 'starfive_wdt_unlock' - wrong count at exit drivers/watchdog/starfive-wdt.c:212:9: warning: context imbalance in 'starfive_wdt_lock' - unexpected unlock Signed-off-by: Ben Dooks Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231122085118.177589-1-ben.dooks@codethink.co.uk Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 137c9e08e5e542d58aa606b0bb4f0990117309a0 Author: Daniel Golle Date: Mon Nov 20 18:22:31 2023 +0000 watchdog: mediatek: mt7988: add wdt support Add support for watchdog and reset generator unit of the MediaTek MT7988 SoC. Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/c0cf5f701801cce60470853fa15f1d9dced78c4f.1700504385.git.daniel@makrotopia.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a4d2116ee1df93bbb210466b77d63feb3fbb7b78 Author: Daniel Golle Date: Mon Nov 20 18:21:56 2023 +0000 dt-bindings: watchdog: mediatek,mtk-wdt: add MT7988 watchdog and toprgu Add binding description for mediatek,mt7988-wdt. Signed-off-by: Daniel Golle Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/6478f8d2af59736d23a96b52891bb541de33870d.1700504385.git.daniel@makrotopia.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c622a9538aabd1f02fe7271f15325bfa0909ef94 Author: Nik Bune Date: Sun Nov 12 17:20:49 2023 +0100 dt-bindings: watchdog: realtek,rtd1295-watchdog: convert txt to yaml Convert txt file to yaml. Add maintainers from git blame. Signed-off-by: Nik Bune Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231112162049.12633-1-n2h9z4@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f33f5b1fd1be5f5106d16f831309648cb0f1c31d Author: Stefan Wahren Date: Sun Nov 12 18:32:51 2023 +0100 watchdog: bcm2835_wdt: Fix WDIOC_SETTIMEOUT handling Users report about the unexpected behavior for setting timeouts above 15 sec on Raspberry Pi. According to watchdog-api.rst the ioctl WDIOC_SETTIMEOUT shouldn't fail because of hardware limitations. But looking at the code shows that max_timeout based on the register value PM_WDOG_TIME_SET, which is the maximum. Since 664a39236e71 ("watchdog: Introduce hardware maximum heartbeat in watchdog core") the watchdog core is able to handle this problem. This fix has been tested with watchdog-test from selftests. Link: https://bugzilla.kernel.org/show_bug.cgi?id=217374 Fixes: 664a39236e71 ("watchdog: Introduce hardware maximum heartbeat in watchdog core") Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231112173251.4827-1-wahrenst@gmx.net Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 91c437ea47045379db870fd0454d8778573b41e0 Author: Jerry Hoemann Date: Wed Dec 13 14:53:40 2023 -0700 watchdog/hpwdt: Remove unused variable Remove the unused variable ilo5. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231213215340.495734-4-jerry.hoemann@hpe.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2b276d52d83d1e48af53646b4c03c171b2d7d4f4 Author: Jerry Hoemann Date: Wed Dec 13 14:53:39 2023 -0700 watchdog/hpwdt: Remove redundant test. ProLiants of vintage to have an iLO 5, no longer send watchdog NMI as an IO CHECK. They are presented to hpwdt_pretimeout as NMI_UNKNOWN. The preceding if statement rejects if !mynmi irrespective of value of pretimeout making this if statement redundant. Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231213215340.495734-3-jerry.hoemann@hpe.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit dced0b3e51dd2af3730efe14dd86b5e3173f0a65 Author: Jerry Hoemann Date: Wed Dec 13 14:53:38 2023 -0700 watchdog/hpwdt: Only claim UNKNOWN NMI if from iLO Avoid unnecessary crashes by claiming only NMIs that are due to ERROR signalling or generated by the hpwdt hardware device. The code does this, but only for iLO5. The intent was to preserve legacy, Gen9 and earlier, semantics of using hpwdt for error containtment as hardware/firmware would signal fatal IO errors as an NMI with the expectation of hpwdt crashing the system. Howerver, these IO errors should be received by hpwdt as an NMI_IO_CHECK. So the test is overly permissive and should not be limited to only ilo5. We need to enable this protection for future iLOs not matching the current PCI IDs. Fixes: 62290a5c194b ("watchdog: hpwdt: Claim NMIs generated by iLO5") Signed-off-by: Jerry Hoemann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231213215340.495734-2-jerry.hoemann@hpe.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit da24118732925d5fd5b9ce8aff58b213a2e051ed Author: Uwe Kleine-König Date: Mon Nov 6 16:48:13 2023 +0100 watchdog: txx9wdt: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231106154807.3866712-6-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2faef2754409a8d26ea7cec1ca369fabb97b5327 Author: Uwe Kleine-König Date: Mon Nov 6 16:48:12 2023 +0100 watchdog: starfive-wdt: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231106154807.3866712-5-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6a7b3de6a35a8bcdf28f33d70d2b30655da29a4d Author: Uwe Kleine-König Date: Mon Nov 6 16:48:11 2023 +0100 watchdog: at91sam9_wdt: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231106154807.3866712-4-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit de81f74b11e9ffdf5362961c2efea13bef11aefd Author: Uwe Kleine-König Date: Mon Nov 6 16:48:10 2023 +0100 watchdog: txx9: Stop using module_platform_driver_probe() On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_driver_probe() is that the driver cannot be bound and unbound at runtime which is ancient and also slightly complicates testing. There are also thoughts to deprecate platform_driver_probe() because it adds some complexity in the driver core for little gain. Also many drivers don't use it correctly. This driver for example misses to mark the driver struct with __refdata which is needed to suppress a (W=1) modpost warning: WARNING: modpost: drivers/watchdog/txx9wdt: section mismatch in reference: txx9wdt_driver+0x4 (section: .data) -> txx9wdt_remove (section: .exit.text) Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231106154807.3866712-3-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 86aa2919f1ae4ee7f90260d028f7572263d1c715 Author: Uwe Kleine-König Date: Mon Nov 6 16:48:09 2023 +0100 watchdog: at91sam9: Stop using module_platform_driver_probe() On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_driver_probe() is that the driver cannot be bound and unbound at runtime which is ancient and also slightly complicates testing. There are also thoughts to deprecate platform_driver_probe() because it adds some complexity in the driver core for little gain. Also many drivers don't use it correctly. This driver for example misses to mark the driver struct with __refdata which is needed to suppress a (W=1) modpost warning: WARNING: modpost: drivers/watchdog/at91sam9_wdt: section mismatch in reference: at91wdt_driver+0x4 (section: .data) -> at91wdt_remove (section: .exit.text) Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231106154807.3866712-2-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit dc805ea058c0e6b319ee95e61a5b4b61b0e8fe54 Author: Lukas Bulwahn Date: Mon Nov 6 10:53:49 2023 +0100 MAINTAINERS: rectify entry for DIALOG SEMICONDUCTOR DRIVERS Commit bd888a4377ae ("dt-bindings: watchdog: da9062-wdt: convert txt to yaml") converts da9062-wdt.txt to dlg,da9062-watchdog.yaml, but misses to adjust its reference in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. Repair this file pattern in DIALOG SEMICONDUCTOR DRIVERS. Signed-off-by: Lukas Bulwahn Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231106095349.9564-1-lukas.bulwahn@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit eaea10a2d10898cd5e999a7b25af42c888b1df73 Author: Douglas Anderson Date: Mon Nov 6 14:43:36 2023 -0800 dt-bindings: watchdog: qcom-wdt: Make the interrupt example edge triggered As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Update the example in the bindings. Fixes: 7c631cdff391 ("dt-bindings: watchdog: qcom-wdt: allow interrupts") Signed-off-by: Douglas Anderson Acked-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231106144335.v2.9.Ie30c1d3f780666f6906fd2fd7c437632c229d987@changeid Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 38d75297745f04206db9c29bdd75557f0344c7cc Author: Curtis Klein Date: Tue Dec 5 11:05:22 2023 -0800 watchdog: set cdev owner before adding When the new watchdog character device is registered, it becomes available for opening. This creates a race where userspace may open the device before the character device's owner is set. This results in an imbalance in module_get calls as the cdev_get in cdev_open will not increment the reference count on the watchdog driver module. This causes problems when the watchdog character device is released as the module loader's reference will also be released. This makes it impossible to open the watchdog device later on as it now appears that the module is being unloaded. The open will fail with -ENXIO from chrdev_open. The legacy watchdog device will fail with -EBUSY from the try_module_get in watchdog_open because it's module owner is the watchdog core module so it can still be opened but it will fail to get a refcount on the underlying watchdog device driver. Fixes: 72139dfa2464 ("watchdog: Fix the race between the release of watchdog_core_data and cdev") Signed-off-by: Curtis Klein Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231205190522.55153-1-curtis.klein@hpe.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2dfef50589aef3b9a2fa2190ae95b328fb664f89 Author: Marcelo Schmitt Date: Sat Dec 16 14:47:01 2023 -0300 iio: adc: ad7091r: Align arguments to function call parenthesis Align arguments to function call open parenthesis to comply with the Linux kernel coding style. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/fc71a82d3b4a6bc6f511f27451dbd7a3280a8c95.1702746240.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit 149694f5e79b0c7a36ceb76e7c0d590db8f151c1 Author: Marcelo Schmitt Date: Sat Dec 16 14:46:37 2023 -0300 iio: adc: ad7091r: Set alert bit in config register The ad7091r-base driver sets up an interrupt handler for firing events when inputs are either above or below a certain threshold. However, for the interrupt signal to come from the device it must be configured to enable the ALERT/BUSY/GPO pin to be used as ALERT, which was not being done until now. Enable interrupt signals on the ALERT/BUSY/GPO pin by setting the proper bit in the configuration register. Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/e8da2ee98d6df88318b14baf3dc9630e20218418.1702746240.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit a25a7df518fc71b1ba981d691e9322e645d2689c Author: Marcelo Schmitt Date: Sat Dec 16 14:46:11 2023 -0300 iio: adc: ad7091r: Pass iio_dev to event handler Previous version of ad7091r event handler received the ADC state pointer and retrieved the iio device from driver data field with dev_get_drvdata(). However, no driver data have ever been set, which led to null pointer dereference when running the event handler. Pass the iio device to the event handler and retrieve the ADC state struct from it so we avoid the null pointer dereference and save the driver from filling the driver data field. Fixes: ca69300173b6 ("iio: adc: Add support for AD7091R5 ADC") Signed-off-by: Marcelo Schmitt Link: https://lore.kernel.org/r/5024b764107463de9578d5b3b0a3d5678e307b1a.1702746240.git.marcelo.schmitt1@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 2f9dadba5ba02e1510a04ce57ebfb9e08fd872a8 Author: Marcelo Schmitt Date: Sat Dec 16 14:45:27 2023 -0300 scripts: checkpatch: Add __aligned to the list of attribute notes Checkpatch presumes attributes marked with __aligned(alignment) are part of a function declaration and throws a warning stating that those compiler attributes should have an identifier name which is not correct. Add __aligned compiler attributes to the list of attribute notes so they don't cause warnings anymore. Signed-off-by: Marcelo Schmitt Acked-by: Joe Perches Link: https://lore.kernel.org/r/1c5c93ecbd8c46a338b22a4ef52e51648e333c01.1702746240.git.marcelo.schmitt1@gmail.com Signed-off-by: Jonathan Cameron commit d58013f39b302512b02cbf4826dd9f194bdf1865 Author: Anshul Dalal Date: Fri Dec 15 21:53:11 2023 +0530 iio: chemical: add support for Aosong AGS02MA A simple driver for the TVOC (Total Volatile Organic Compounds) sensor from Aosong: AGS02MA Steps in reading the VOC sensor value over i2c: 1. Read 5 bytes from the register `AGS02MA_TVOC_READ_REG` [0x00] 2. The first 4 bytes are taken as the big endian sensor data with final byte being the CRC 3. The CRC is verified and the value is returned over an `IIO_CHAN_INFO_RAW` channel as percents Tested on Raspberry Pi Zero 2W Datasheet: https://asairsensors.com/wp-content/uploads/2021/09/AGS02MA.pdf Signed-off-by: Anshul Dalal Link: https://lore.kernel.org/r/20231215162312.143568-3-anshulusr@gmail.com Signed-off-by: Jonathan Cameron commit c9c6f564b28ce68c5bb79afa282de1946e106421 Author: Anshul Dalal Date: Fri Dec 15 21:53:10 2023 +0530 dt-bindings: iio: chemical: add aosong,ags02ma Add bindings for Aosong AGS02MA TVOC sensor. The sensor communicates over i2c with the default address 0x1a. TVOC values can be read in the units of ppb and ug/m^3 at register 0x00. Datasheet: https://asairsensors.com/wp-content/uploads/2021/09/AGS02MA.pdf Reviewed-by: Krzysztof Kozlowski Signed-off-by: Anshul Dalal Link: https://lore.kernel.org/r/20231215162312.143568-2-anshulusr@gmail.com Signed-off-by: Jonathan Cameron commit e68eaae67021d2e393c31c86955c675922d0870a Author: Anshul Dalal Date: Fri Dec 15 21:53:09 2023 +0530 dt-bindings: vendor-prefixes: add aosong Aosong Electronic Co., LTD. is a supplier for MEMS sensors such as AHT20 temperature and humidity sensor under the brand name Asair Acked-by: Krzysztof Kozlowski Signed-off-by: Anshul Dalal Link: https://lore.kernel.org/r/20231215162312.143568-1-anshulusr@gmail.com Signed-off-by: Jonathan Cameron commit 38f0bd4cd34588b788228af081a1c86df4f494fa Author: Jun Yan Date: Thu Dec 14 22:27:33 2023 +0800 iio: accel: bmi088: update comments and Kconfig update the comments and Kconfig file with more descriptive and accurate information about newly added device: BMI085, BMI090L. Signed-off-by: Jun Yan Signed-off-by: Jonathan Cameron commit e275919d96693c5ca964b20d73a33d52a7e57f04 Author: Selvin Xavier Date: Wed Dec 13 22:31:24 2023 -0800 RDMA/bnxt_re: Share a page to expose per CQ info with userspace Gen P7 adapters needs to share a toggle bits information received in kernel driver with the user space. User space needs this info during the request notify call back to arm the CQ. User space application can get this page using the UAPI routines. Library will mmap this page and get the toggle bits to be used in the next ARM Doorbell. Uses a hash list to map the CQ structure from the CQ ID. CQ structure is retrieved from the hash list while the library calls the UAPI routine to get the toggle page mapping. Currently the full page is mapped per CQ. This can be optimized to enable multiple CQs from the same application share the same page and different offsets in the page. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1702535484-26844-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 9b0a7a2cb87d9c430a3588d7d2b6e471200b86ad Author: Selvin Xavier Date: Wed Dec 13 22:31:23 2023 -0800 RDMA/bnxt_re: Add UAPI to share a page with user space Gen P7 adapters require to share a toggle value for CQ and SRQ. This is received by the driver as part of interrupt notifications and needs to be shared with the user space. Add a new UAPI infrastructure to get the shared page for CQ and SRQ. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1702535484-26844-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 08b3485540d9e94ed8335f82e5fc491fc02f8423 Author: Ayush Singh Date: Sun Dec 17 17:41:32 2023 +0530 greybus: gb-beagleplay: Remove use of pad bytes Make gb-beagleplay greybus spec compliant by moving cport information to transport layer instead of using `header->pad` bytes. Greybus HDLC frame now has the following payload: 1. le16 cport 2. gb_operation_msg_hdr msg_header 3. u8 *msg_payload Fixes: ec558bbfea67 ("greybus: Add BeaglePlay Linux Driver") Signed-off-by: Ayush Singh Link: https://lore.kernel.org/r/20231217121133.74703-2-ayushdevel1325@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7b21ed7d119dc06b0ed2ba3e406a02cafe3a8d03 Author: Josef Bacik Date: Thu Dec 14 11:18:50 2023 -0500 arm64: properly install vmlinuz.efi If you select CONFIG_EFI_ZBOOT, we will generate vmlinuz.efi, and then when we go to install the kernel we'll install the vmlinux instead because install.sh only recognizes Image.gz as wanting the compressed install image. With CONFIG_EFI_ZBOOT we don't get the proper kernel installed, which means it doesn't boot, which makes for a very confused and subsequently angry kernel developer. Fix this by properly installing our compressed kernel if we've enabled CONFIG_EFI_ZBOOT. Signed-off-by: Josef Bacik Cc: # 6.1.x Fixes: c37b830fef13 ("arm64: efi: enable generic EFI compressed boot") Reviewed-by: Simon Glass Link: https://lore.kernel.org/r/6edb1402769c2c14c4fbef8f7eaedb3167558789.1702570674.git.josef@toxicpanda.com Signed-off-by: Will Deacon commit 4ebee8cebdf6d661dfe7272cf74d378108160a3e Author: Fuad Tabba Date: Thu Dec 14 10:01:44 2023 +0000 arm64/sysreg: Add missing system instruction definitions for FGT Add the definitions of missing system instructions that are trappable by fine grain traps. The definitions are based on DDI0602 2023-09. Signed-off-by: Fuad Tabba Link: https://lore.kernel.org/r/20231214100158.2305400-5-tabba@google.com Signed-off-by: Will Deacon commit 885c6d8e2885915451dd4f4a90ddd1bb82ba5a4f Author: Fuad Tabba Date: Thu Dec 14 10:01:43 2023 +0000 arm64/sysreg: Add missing system register definitions for FGT Add the definitions of missing system registers that are trappable by fine grain traps. The definitions are based on DDI0601 2023-09. Signed-off-by: Fuad Tabba Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20231214100158.2305400-4-tabba@google.com Signed-off-by: Will Deacon commit 4f101cdcb578638454eeff3e1d6c2cb2495d8005 Author: Fuad Tabba Date: Thu Dec 14 10:01:42 2023 +0000 arm64/sysreg: Add missing ExtTrcBuff field definition to ID_AA64DFR0_EL1 Add the ExtTrcBuff field definitions to ID_AA64DFR0_EL1 from DDI0601 2023-09. This field isn't used yet. Adding it for completeness and because it will be used in future patches. Signed-off-by: Fuad Tabba Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20231214100158.2305400-3-tabba@google.com Signed-off-by: Will Deacon commit 3b077ad8cb25c936ff55780c517dbd8ea36fb018 Author: Fuad Tabba Date: Thu Dec 14 10:01:41 2023 +0000 arm64/sysreg: Add missing Pauth_LR field definitions to ID_AA64ISAR1_EL1 Add the Pauth_LR field definitions to ID_AA64ISAR1_EL1, based on DDI0601 2023-09. These fields aren't used yet. Adding them for completeness and consistency (definition already exists for ID_AA64ISAR2_EL1). Signed-off-by: Fuad Tabba Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20231214100158.2305400-2-tabba@google.com Signed-off-by: Will Deacon commit 5cc5ed7a668dcfb62c02f380c7cca9c808242ed0 Author: Wang Jinchao Date: Fri Dec 15 14:40:08 2023 +0800 arm64: memory: remove duplicated include remove duplicated include Signed-off-by: Wang Jinchao Link: https://lore.kernel.org/r/202312151439+0800-wangjinchao@xfusion.com Signed-off-by: Will Deacon commit bb339db4d363c84e0a8d70827df591397ccd7312 Author: James Clark Date: Fri Dec 15 17:56:48 2023 +0000 arm: perf: Fix ARCH=arm build with GCC LLVM ignores everything inside the if statement and doesn't generate errors, but GCC doesn't ignore it, resulting in the following error: drivers/perf/arm_pmuv3.c: In function ‘armv8pmu_write_evtype’: include/linux/bits.h:34:29: error: left shift count >= width of type [-Werror=shift-count-overflow] 34 | (((~UL(0)) - (UL(1) << (l)) + 1) & \ Fix it by using GENMASK_ULL which doesn't overflow on arm32 (even though the value is never used there). Fixes: 3115ee021bfb ("arm64: perf: Include threshold control fields in PMEVTYPER mask") Reported-by: Uwe Kleine-König Closes: https://lore.kernel.org/linux-arm-kernel/20231215120817.h2f3akgv72zhrtqo@pengutronix.de/ Signed-off-by: James Clark Acked-by: Mark Rutland Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231215175648.3397170-2-james.clark@arm.com Signed-off-by: Will Deacon commit c5a3f56fcdb0a48a20772e4c9b8adc6c7256a461 Merge: 40d51f70f0827 fd6ed1772b2c6 Author: Kalle Valo Date: Sun Dec 17 13:20:18 2023 +0200 Merge tag 'ath-next-20231215' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath ath.git patches for v6.8. We have new features only for ath12k but lots of small cleanup for ath10k, ath11k and ath12k. And of course smaller fixes to several drivers. Major changes: ath12k * support one MSI vector * WCN7850: support AP mode commit 40d51f70f08273b0a515a8a0829c2740f4f1eb7f Author: Gustavo A. R. Silva Date: Tue Dec 12 11:14:29 2023 -0600 wifi: mt76: mt7996: Use DECLARE_FLEX_ARRAY() and fix -Warray-bounds warnings Transform zero-length arrays `rate`, `adm_stat` and `msdu_cnt` into proper flexible-array members in anonymous union in `struct mt7996_mcu_all_sta_info_event` via the DECLARE_FLEX_ARRAY() helper; and fix multiple -Warray-bounds warnings: drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:544:61: warning: array subscript is outside array bounds of 'struct [0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:551:58: warning: array subscript is outside array bounds of 'struct [0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:553:58: warning: array subscript is outside array bounds of 'struct [0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:530:61: warning: array subscript is outside array bounds of 'struct [0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:538:66: warning: array subscript is outside array bounds of 'struct [0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:540:66: warning: array subscript is outside array bounds of 'struct [0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:520:57: warning: array subscript is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] drivers/net/wireless/mediatek/mt76/mt7996/mcu.c:526:76: warning: array subscript is outside array bounds of 'struct all_sta_trx_rate[0]' [-Warray-bounds=] This results in no differences in binary output, helps with the ongoing efforts to globally enable -Warray-bounds. Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://msgid.link/ZXiU9ayVCslt3qiI@work commit 3a3af3aedb00258f0bd49f260eabcea1d88108a1 Merge: 66fe896351d05 f7dc3248dcfbd Author: David S. Miller Date: Sun Dec 17 10:56:33 2023 +0000 Merge branch 'skb-coalescing-page_pool' Liang Chen says: ==================== skbuff: Optimize SKB coalescing for page pool The combination of the following condition was excluded from skb coalescing: from->pp_recycle = 1 from->cloned = 1 to->pp_recycle = 1 With page pool in use, this combination can be quite common(ex. NetworkMananger may lead to the additional packet_type being registered, thus the cloning). In scenarios with a higher number of small packets, it can significantly affect the success rate of coalescing. This patchset aims to optimize this scenario and enable coalescing of this particular combination. That also involves supporting multiple users referencing the same fragment of a pp page to accomondate the need to increment the "from" SKB page's pp page reference count. Changes from v10: - re-number patches to 1/3, 2/3, 3/3 Changes from v9: - patch 1 was already applied - imporve description for patch 2 - make sure skb_pp_frag_ref only work for pp aware skbs ==================== Signed-off-by: David S. Miller commit f7dc3248dcfbdd81b5be64272f38b87a8e8085e7 Author: Liang Chen Date: Fri Dec 15 11:30:11 2023 +0800 skbuff: Optimization of SKB coalescing for page pool In order to address the issues encountered with commit 1effe8ca4e34 ("skbuff: fix coalescing for page_pool fragment recycling"), the combination of the following condition was excluded from skb coalescing: from->pp_recycle = 1 from->cloned = 1 to->pp_recycle = 1 However, with page pool environments, the aforementioned combination can be quite common(ex. NetworkMananger may lead to the additional packet_type being registered, thus the cloning). In scenarios with a higher number of small packets, it can significantly affect the success rate of coalescing. For example, considering packets of 256 bytes size, our comparison of coalescing success rate is as follows: Without page pool: 70% With page pool: 13% Consequently, this has an impact on performance: Without page pool: 2.57 Gbits/sec With page pool: 2.26 Gbits/sec Therefore, it seems worthwhile to optimize this scenario and enable coalescing of this particular combination. To achieve this, we need to ensure the correct increment of the "from" SKB page's page pool reference count (pp_ref_count). Following this optimization, the success rate of coalescing measured in our environment has improved as follows: With page pool: 60% This success rate is approaching the rate achieved without using page pool, and the performance has also been improved: With page pool: 2.52 Gbits/sec Below is the performance comparison for small packets before and after this optimization. We observe no impact to packets larger than 4K. packet size before after improved (bytes) (Gbits/sec) (Gbits/sec) 128 1.19 1.27 7.13% 256 2.26 2.52 11.75% 512 4.13 4.81 16.50% 1024 6.17 6.73 9.05% 2048 14.54 15.47 6.45% 4096 25.44 27.87 9.52% Signed-off-by: Liang Chen Reviewed-by: Yunsheng Lin Suggested-by: Jason Wang Reviewed-by: Mina Almasry Signed-off-by: David S. Miller commit 8cfa2dee325f72f286f8f3210f867cbb981f2302 Author: Liang Chen Date: Fri Dec 15 11:30:10 2023 +0800 skbuff: Add a function to check if a page belongs to page_pool Wrap code for checking if a page is a page_pool page into a function for better readability and ease of reuse. Signed-off-by: Liang Chen Reviewed-by: Yunsheng Lin Reviewed-by: Ilias Apalodimas Reviewed-by: Mina Almasry Signed-off-by: David S. Miller commit aaf153aecef1d1831d0d6d371d5c11cf02f0337e Author: Liang Chen Date: Fri Dec 15 11:30:09 2023 +0800 page_pool: halve BIAS_MAX for multiple user references of a fragment Up to now, we were only subtracting from the number of used page fragments to figure out when a page could be freed or recycled. A following patch introduces support for multiple users referencing the same fragment. So reduce the initial page fragments value to half to avoid overflowing. Signed-off-by: Liang Chen Reviewed-by: Yunsheng Lin Reviewed-by: Mina Almasry Reviewed-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 66fe896351d0505f529eefe4715f6c669f49cbd9 Merge: 37a8997fc5a5a 3c3ead5556482 Author: David S. Miller Date: Sun Dec 17 10:41:55 2023 +0000 Merge branch 'tcp-ao-selftests' Dmitry Safonov says: ==================== selftests/net: Add TCP-AO tests An essential part of any big kernel submissions is selftests. At the beginning of TCP-AO project, I made patches to fcnal-test.sh and nettest.c to have the benefits of easy refactoring, early noticing breakages, putting a moat around the code, documenting and designing uAPI. While tests based on fcnal-test.sh/nettest.c provided initial testing* and were very easy to add, the pile of TCP-AO quickly grew out of one-binary + shell-script testing. The design of the TCP-AO testing is a bit different than one-big selftest binary as I did previously in net/ipsec.c. I found it beneficial to avoid implementing a tests runner/scheduler and delegate it to the user or Makefile. The approach is very influenced by CRIU/ZDTM testing[1]: it provides a static library with helper functions and selftest binaries that create specific scenarios. I also tried to utilize kselftest.h. test_init() function does all needed preparations. To not leave any traces after a selftest exists, it creates a network namespace and if the test wants to establish a TCP connection, a child netns. The parent and child netns have veth pair with proper ip addresses and routes set up. Both peers, the client and server are different pthreads. The treading model was chosen over forking mostly by easiness of cleanup on a failure: no need to search for children, handle SIGCHLD, make sure not to wait for a dead peer to perform anything, etc. Any thread that does exit() naturally kills the tests, sweet! The selftests are compiled currently in two variants: ipv4 and ipv6. Ipv4-mapped-ipv6 addresses might be a third variant to add, but it's not there in this version. As pretty much all tests are shared between two address families, most of the code can be shared, too. To differ in code what kind of test is running, Makefile supplies -DIPV6_TEST to compiler and ifdeffery in tests can do things that have to be different between address families. This is similar to TARGETS_C_BOTHBITS in x86 selftests and also to tests code sharing in CRIU/ZDTM. The total number of tests is 832. From them rst_ipv{4,6} has currently one flaky subtest, that may fail: > not ok 9 client connection was not reset: 0 I'll investigate what happens there. Also, unsigned-md5_ipv{4,6} are flaky because of netns counter checks: it doesn't expect that there may be retransmitted TCP segments from a previous sub-selftest. That will be fixed. Besides, key-management_ipv{4,6} has 3 sub-tests passing with XFAIL: > ok 15 # XFAIL listen() after current/rnext keys set: the socket has current/rnext keys: 100:200 > ok 16 # XFAIL listen socket, delete current key from before listen(): failed to delete the key 100:100 -16 > ok 17 # XFAIL listen socket, delete rnext key from before listen(): failed to delete the key 200:200 -16 ... > # Totals: pass:117 fail:0 xfail:3 xpass:0 skip:0 error:0 Those need some more kernel work to pass instead of xfail. The overview of selftests (see the diffstat at the bottom): ├── lib │ ├── aolib.h │ │ The header for all selftests to include. │ ├── kconfig.c │ │ Kernel kconfig detector to SKIP tests that depend on something. │ ├── netlink.c │ │ Netlink helper to add/modify/delete VETH/IPs/routes/VRFs │ │ I considered just using libmnl, but this is around 400 lines │ │ and avoids selftests dependency on out-of-tree sources/packets. │ ├── proc.c │ │ SNMP/netstat procfs parser and the counters comparator. │ ├── repair.c │ │ Heavily influenced by libsoccr and reduced to minimum TCP │ │ socket checkpoint/repair. Shouldn't be used out of selftests, │ │ though. │ ├── setup.c │ │ All the needed netns/veth/ips/etc preparations for test init. │ ├── sock.c │ │ Socket helpers: {s,g}etsockopt()s/connect()/listen()/etc. │ └── utils.c │ Random stuff (a pun intended). ├── bench-lookups.c │ The only benchmark in selftests currently: checks how well TCP-AO │ setsockopt()s perform, depending on the amount of keys on a socket. ├── connect.c │ Trivial sample, can be used as a boilerplate to write a new test. ├── connect-deny.c │ More-or-less what could be expected for TCP-AO in fcnal-test.sh ├── icmps-accept.c -> icmps-discard.c ├── icmps-discard.c │ Verifies RFC5925 (7.8) by checking that TCP-AO connection can be │ broken if ICMPs are accepted and survives when ::accept_icmps = 0 ├── key-management.c │ Key manipulations, rotations between randomized hashing algorithms │ and counter checks for those scenarios. ├── restore.c │ TCP_AO_REPAIR: verifies that a socket can be re-created without │ TCP-AO connection being interrupted. ├── rst.c │ As RST segments are signed on a separate code-path in kernel, │ verifies passive/active TCP send_reset(). ├── self-connect.c │ Verifies that TCP self-connect and also simultaneous open work. ├── seq-ext.c │ Utilizes TCP_AO_REPAIR to check that on SEQ roll-over SNE │ increment is performed and segments with different SNEs fail to │ pass verification. ├── setsockopt-closed.c │ Checks that {s,g}etsockopt()s are extendable syscalls and common │ error-paths for them. └── unsigned-md5.c Checks listen() socket for (non-)matching peers with: AO/MD5/none keys. As well as their interaction with VRFs and AO_REQUIRED flag. There are certainly more test scenarios that can be added, but even so, I'm pretty happy that this much of TCP-AO functionality and uAPIs got covered. These selftests were iteratively developed by me during TCP-AO kernel upstreaming and the resulting kernel patches would have been worse without having these tests. They provided the user-side perspective but also allowed safer refactoring with less possibility of introducing a regression. Now it's time to use them to dig a moat around the TCP-AO code! There are also people from other network companies that work on TCP-AO (+testing), so sharing these selftests will allow them to contribute and may benefit from their efforts. ==================== Signed-off-by: David S. Miller commit 3c3ead55564825975cc40e59bfaf6c4834ea9745 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:26 2023 +0000 selftests/net: Add TCP-AO key-management test Check multiple keys on a socket: - rotation on closed socket - current/rnext operations shouldn't be possible on listen sockets - current/rnext key set should be the one, that's used on connect() - key rotations with pseudo-random generated keys - copying matching keys on connect() and on accept() At this moment there are 3 tests that are "expected" to fail: a kernel fix is needed to improve the situation, they are marked XFAIL. Sample output: > # ./key-management_ipv4 > 1..120 > # 1601[lib/setup.c:239] rand seed 1700526653 > TAP version 13 > ok 1 closed socket, delete a key: the key was deleted > ok 2 closed socket, delete all keys: the key was deleted > ok 3 closed socket, delete current key: key deletion was prevented > ok 4 closed socket, delete rnext key: key deletion was prevented > ok 5 closed socket, delete a key + set current/rnext: the key was deleted > ok 6 closed socket, force-delete current key: the key was deleted > ok 7 closed socket, force-delete rnext key: the key was deleted > ok 8 closed socket, delete current+rnext key: key deletion was prevented > ok 9 closed socket, add + change current key > ok 10 closed socket, add + change rnext key > ok 11 listen socket, delete a key: the key was deleted > ok 12 listen socket, delete all keys: the key was deleted > ok 13 listen socket, setting current key not allowed > ok 14 listen socket, setting rnext key not allowed > ok 15 # XFAIL listen() after current/rnext keys set: the socket has current/rnext keys: 100:200 > ok 16 # XFAIL listen socket, delete current key from before listen(): failed to delete the key 100:100 -16 > ok 17 # XFAIL listen socket, delete rnext key from before listen(): failed to delete the key 200:200 -16 > ok 18 listen socket, getsockopt(TCP_AO_REPAIR) is restricted > ok 19 listen socket, setsockopt(TCP_AO_REPAIR) is restricted > ok 20 listen socket, delete a key + set current/rnext: key deletion was prevented > ok 21 listen socket, force-delete current key: key deletion was prevented > ok 22 listen socket, force-delete rnext key: key deletion was prevented > ok 23 listen socket, delete a key: the key was deleted > ok 24 listen socket, add + change current key > ok 25 listen socket, add + change rnext key > ok 26 server: Check current/rnext keys unset before connect(): The socket keys are consistent with the expectations > ok 27 client: Check current/rnext keys unset before connect(): current key 19 as expected > ok 28 client: Check current/rnext keys unset before connect(): rnext key 146 as expected > ok 29 server: Check current/rnext keys unset before connect(): server alive > ok 30 server: Check current/rnext keys unset before connect(): passed counters checks > ok 31 client: Check current/rnext keys unset before connect(): The socket keys are consistent with the expectations > ok 32 server: Check current/rnext keys unset before connect(): The socket keys are consistent with the expectations > ok 33 server: Check current/rnext keys unset before connect(): passed counters checks > ok 34 client: Check current/rnext keys unset before connect(): passed counters checks > ok 35 server: Check current/rnext keys set before connect(): The socket keys are consistent with the expectations > ok 36 server: Check current/rnext keys set before connect(): server alive > ok 37 server: Check current/rnext keys set before connect(): passed counters checks > ok 38 client: Check current/rnext keys set before connect(): current key 10 as expected > ok 39 client: Check current/rnext keys set before connect(): rnext key 137 as expected > ok 40 server: Check current/rnext keys set before connect(): The socket keys are consistent with the expectations > ok 41 client: Check current/rnext keys set before connect(): The socket keys are consistent with the expectations > ok 42 client: Check current/rnext keys set before connect(): passed counters checks > ok 43 server: Check current/rnext keys set before connect(): passed counters checks > ok 44 server: Check current != rnext keys set before connect(): The socket keys are consistent with the expectations > ok 45 server: Check current != rnext keys set before connect(): server alive > ok 46 server: Check current != rnext keys set before connect(): passed counters checks > ok 47 client: Check current != rnext keys set before connect(): current key 10 as expected > ok 48 client: Check current != rnext keys set before connect(): rnext key 132 as expected > ok 49 server: Check current != rnext keys set before connect(): The socket keys are consistent with the expectations > ok 50 client: Check current != rnext keys set before connect(): The socket keys are consistent with the expectations > ok 51 client: Check current != rnext keys set before connect(): passed counters checks > ok 52 server: Check current != rnext keys set before connect(): passed counters checks > ok 53 server: Check current flapping back on peer's RnextKey request: The socket keys are consistent with the expectations > ok 54 server: Check current flapping back on peer's RnextKey request: server alive > ok 55 server: Check current flapping back on peer's RnextKey request: passed counters checks > ok 56 client: Check current flapping back on peer's RnextKey request: current key 10 as expected > ok 57 client: Check current flapping back on peer's RnextKey request: rnext key 132 as expected > ok 58 server: Check current flapping back on peer's RnextKey request: The socket keys are consistent with the expectations > ok 59 client: Check current flapping back on peer's RnextKey request: The socket keys are consistent with the expectations > ok 60 server: Check current flapping back on peer's RnextKey request: passed counters checks > ok 61 client: Check current flapping back on peer's RnextKey request: passed counters checks > ok 62 server: Rotate over all different keys: The socket keys are consistent with the expectations > ok 63 server: Rotate over all different keys: server alive > ok 64 server: Rotate over all different keys: passed counters checks > ok 65 server: Rotate over all different keys: current key 128 as expected > ok 66 client: Rotate over all different keys: rnext key 128 as expected > ok 67 server: Rotate over all different keys: current key 129 as expected > ok 68 client: Rotate over all different keys: rnext key 129 as expected > ok 69 server: Rotate over all different keys: current key 130 as expected > ok 70 client: Rotate over all different keys: rnext key 130 as expected > ok 71 server: Rotate over all different keys: current key 131 as expected > ok 72 client: Rotate over all different keys: rnext key 131 as expected > ok 73 server: Rotate over all different keys: current key 132 as expected > ok 74 client: Rotate over all different keys: rnext key 132 as expected > ok 75 server: Rotate over all different keys: current key 133 as expected > ok 76 client: Rotate over all different keys: rnext key 133 as expected > ok 77 server: Rotate over all different keys: current key 134 as expected > ok 78 client: Rotate over all different keys: rnext key 134 as expected > ok 79 server: Rotate over all different keys: current key 135 as expected > ok 80 client: Rotate over all different keys: rnext key 135 as expected > ok 81 server: Rotate over all different keys: current key 136 as expected > ok 82 client: Rotate over all different keys: rnext key 136 as expected > ok 83 server: Rotate over all different keys: current key 137 as expected > ok 84 client: Rotate over all different keys: rnext key 137 as expected > ok 85 server: Rotate over all different keys: current key 138 as expected > ok 86 client: Rotate over all different keys: rnext key 138 as expected > ok 87 server: Rotate over all different keys: current key 139 as expected > ok 88 client: Rotate over all different keys: rnext key 139 as expected > ok 89 server: Rotate over all different keys: current key 140 as expected > ok 90 client: Rotate over all different keys: rnext key 140 as expected > ok 91 server: Rotate over all different keys: current key 141 as expected > ok 92 client: Rotate over all different keys: rnext key 141 as expected > ok 93 server: Rotate over all different keys: current key 142 as expected > ok 94 client: Rotate over all different keys: rnext key 142 as expected > ok 95 server: Rotate over all different keys: current key 143 as expected > ok 96 client: Rotate over all different keys: rnext key 143 as expected > ok 97 server: Rotate over all different keys: current key 144 as expected > ok 98 client: Rotate over all different keys: rnext key 144 as expected > ok 99 server: Rotate over all different keys: current key 145 as expected > ok 100 client: Rotate over all different keys: rnext key 145 as expected > ok 101 server: Rotate over all different keys: current key 146 as expected > ok 102 client: Rotate over all different keys: rnext key 146 as expected > ok 103 server: Rotate over all different keys: current key 127 as expected > ok 104 client: Rotate over all different keys: rnext key 127 as expected > ok 105 client: Rotate over all different keys: current key 0 as expected > ok 106 client: Rotate over all different keys: rnext key 127 as expected > ok 107 server: Rotate over all different keys: The socket keys are consistent with the expectations > ok 108 client: Rotate over all different keys: The socket keys are consistent with the expectations > ok 109 client: Rotate over all different keys: passed counters checks > ok 110 server: Rotate over all different keys: passed counters checks > ok 111 server: Check accept() => established key matching: The socket keys are consistent with the expectations > ok 112 Can't add a key with non-matching ip-address for established sk > ok 113 Can't add a key with non-matching VRF for established sk > ok 114 server: Check accept() => established key matching: server alive > ok 115 server: Check accept() => established key matching: passed counters checks > ok 116 client: Check connect() => established key matching: current key 0 as expected > ok 117 client: Check connect() => established key matching: rnext key 128 as expected > ok 118 client: Check connect() => established key matching: The socket keys are consistent with the expectations > ok 119 server: Check accept() => established key matching: The socket keys are consistent with the expectations > ok 120 server: Check accept() => established key matching: passed counters checks > # Totals: pass:120 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit 8c4e8dd0c047db7c68be01e6c30ada320b8babbc Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:25 2023 +0000 selftests/net: Add TCP-AO selfconnect/simultaneous connect test Check that a rare functionality of TCP named self-connect works with TCP-AO. This "under the cover" also checks TCP simultaneous connect (TCP_SYN_RECV socket state), which would be harder to check other ways. In order to verify that it's indeed TCP simultaneous connect, check the counters TCPChallengeACK and TCPSYNChallenge. Sample of the output: > # ./self-connect_ipv6 > 1..4 > # 1738[lib/setup.c:254] rand seed 1696451931 > TAP version 13 > ok 1 self-connect(same keyids): connect TCPAOGood 0 => 24 > ok 2 self-connect(different keyids): connect TCPAOGood 26 => 50 > ok 3 self-connect(restore): connect TCPAOGood 52 => 97 > ok 4 self-connect(restore, different keyids): connect TCPAOGood 99 => 144 > # Totals: pass:4 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit c6df7b2361d721f40610df5c832ea0fa73e918b1 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:24 2023 +0000 selftests/net: Add TCP-AO RST test Check that both active and passive reset works and correctly sign segments with TCP-AO or don't send RSTs if not possible to sign. A listening socket with backlog = 0 gets one connection in accept queue, another in syn queue. Once the server/listener socket is forcibly closed, client sockets aren't connected to anything. In regular situation they would receive RST on any segment, but with TCP-AO as there's no listener, no AO-key and unknown ISNs, no RST should be sent. And "passive" reset, where RST is sent on reply for some segment (tcp_v{4,6}_send_reset()) - there use TCP_REPAIR to corrupt SEQ numbers, which later results in TCP-AO signed RST, which will be verified and client socket will get EPIPE. No TCPAORequired/TCPAOBad segments are expected during these tests. Sample of the output: > # ./rst_ipv4 > 1..15 > # 1462[lib/setup.c:254] rand seed 1686611171 > TAP version 13 > ok 1 servered 1000 bytes > ok 2 Verified established tcp connection > ok 3 sk[0] = 7, connection was reset > ok 4 sk[1] = 8, connection was reset > ok 5 sk[2] = 9 > ok 6 MKT counters are good on server > ok 7 Verified established tcp connection > ok 8 client connection broken post-seq-adjust > ok 9 client connection was reset > ok 10 No segments without AO sign (server) > ok 11 Signed AO segments (server): 0 => 30 > ok 12 No segments with bad AO sign (server) > ok 13 No segments without AO sign (client) > ok 14 Signed AO segments (client): 0 => 30 > ok 15 No segments with bad AO sign (client) > # Totals: pass:15 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit 0d16eae57456bbbd7eee45caee53f8d6c4d7ea17 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:23 2023 +0000 selftests/net: Add SEQ number extension test Check that on SEQ number wraparound there is no disruption or TCPAOBad segments produced. Sample of expected output: > # ./seq-ext_ipv4 > 1..7 > # 1436[lib/setup.c:254] rand seed 1686611079 > TAP version 13 > ok 1 server alive > ok 2 post-migrate connection alive > ok 3 TCPAOGood counter increased 1002 => 3002 > ok 4 TCPAOGood counter increased 1003 => 3003 > ok 5 TCPAOBad counter didn't increase > ok 6 TCPAOBad counter didn't increase > ok 7 SEQ extension incremented: 1/1999, 1/998999 > # Totals: pass:7 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit 3715d32dc97698e6d2f59b1579577178a1361686 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:22 2023 +0000 selftests/net: Add TCP_REPAIR TCP-AO tests The test plan is: 1. check that TCP-AO connection may be restored on another socket 2. check restore with wrong send/recv ISN (checking that they are part of MAC generation) 3. check restore with wrong SEQ number extension (checking that high bytes of it taken into MAC generation) Sample output expected: > # ./restore_ipv4 > 1..20 > # 1412[lib/setup.c:254] rand seed 1686610825 > TAP version 13 > ok 1 TCP-AO migrate to another socket: server alive > ok 2 TCP-AO migrate to another socket: post-migrate connection is alive > ok 3 TCP-AO migrate to another socket: counter TCPAOGood increased 23 => 44 > ok 4 TCP-AO migrate to another socket: counter TCPAOGood increased 22 => 42 > ok 5 TCP-AO with wrong send ISN: server couldn't serve > ok 6 TCP-AO with wrong send ISN: post-migrate connection is broken > ok 7 TCP-AO with wrong send ISN: counter TCPAOBad increased 0 => 4 > ok 8 TCP-AO with wrong send ISN: counter TCPAOBad increased 0 => 3 > ok 9 TCP-AO with wrong receive ISN: server couldn't serve > ok 10 TCP-AO with wrong receive ISN: post-migrate connection is broken > ok 11 TCP-AO with wrong receive ISN: counter TCPAOBad increased 4 => 8 > ok 12 TCP-AO with wrong receive ISN: counter TCPAOBad increased 5 => 10 > ok 13 TCP-AO with wrong send SEQ ext number: server couldn't serve > ok 14 TCP-AO with wrong send SEQ ext number: post-migrate connection is broken > ok 15 TCP-AO with wrong send SEQ ext number: counter TCPAOBad increased 9 => 10 > ok 16 TCP-AO with wrong send SEQ ext number: counter TCPAOBad increased 11 => 19 > ok 17 TCP-AO with wrong receive SEQ ext number: post-migrate connection is broken > ok 18 TCP-AO with wrong receive SEQ ext number: server couldn't serve > ok 19 TCP-AO with wrong receive SEQ ext number: counter TCPAOBad increased 10 => 18 > ok 20 TCP-AO with wrong receive SEQ ext number: counter TCPAOBad increased 20 => 23 > # Totals: pass:20 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit d1066c9c58d48bdbda0236b4744dc03f8a903d49 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:21 2023 +0000 selftests/net: Add test/benchmark for removing MKTs Sample output: > 1..36 > # 1106[lib/setup.c:207] rand seed 1660754406 > TAP version 13 > ok 1 Worst case connect 512 keys: min=0ms max=1ms mean=0.583329ms stddev=0.076376 > ok 2 Connect random-search 512 keys: min=0ms max=1ms mean=0.53412ms stddev=0.0516779 > ok 3 Worst case delete 512 keys: min=2ms max=11ms mean=6.04139ms stddev=0.245792 > ok 4 Add a new key 512 keys: min=0ms max=13ms mean=0.673415ms stddev=0.0820618 > ok 5 Remove random-search 512 keys: min=5ms max=9ms mean=6.65969ms stddev=0.258064 > ok 6 Remove async 512 keys: min=0ms max=0ms mean=0.041825ms stddev=0.0204512 > ok 7 Worst case connect 1024 keys: min=0ms max=2ms mean=0.520357ms stddev=0.0721358 > ok 8 Connect random-search 1024 keys: min=0ms max=2ms mean=0.535312ms stddev=0.0517355 > ok 9 Worst case delete 1024 keys: min=5ms max=9ms mean=8.27219ms stddev=0.287614 > ok 10 Add a new key 1024 keys: min=0ms max=1ms mean=0.688121ms stddev=0.0829531 > ok 11 Remove random-search 1024 keys: min=5ms max=9ms mean=8.37649ms stddev=0.289422 > ok 12 Remove async 1024 keys: min=0ms max=0ms mean=0.0457096ms stddev=0.0213798 > ok 13 Worst case connect 2048 keys: min=0ms max=2ms mean=0.748804ms stddev=0.0865335 > ok 14 Connect random-search 2048 keys: min=0ms max=2ms mean=0.782993ms stddev=0.0625697 > ok 15 Worst case delete 2048 keys: min=5ms max=10ms mean=8.23106ms stddev=0.286898 > ok 16 Add a new key 2048 keys: min=0ms max=1ms mean=0.812988ms stddev=0.0901658 > ok 17 Remove random-search 2048 keys: min=8ms max=9ms mean=8.84949ms stddev=0.297481 > ok 18 Remove async 2048 keys: min=0ms max=0ms mean=0.0297223ms stddev=0.0172402 > ok 19 Worst case connect 4096 keys: min=1ms max=5ms mean=1.53352ms stddev=0.123836 > ok 20 Connect random-search 4096 keys: min=1ms max=5ms mean=1.52226ms stddev=0.0872429 > ok 21 Worst case delete 4096 keys: min=5ms max=9ms mean=8.25874ms stddev=0.28738 > ok 22 Add a new key 4096 keys: min=0ms max=3ms mean=1.67382ms stddev=0.129376 > ok 23 Remove random-search 4096 keys: min=5ms max=10ms mean=8.26178ms stddev=0.287433 > ok 24 Remove async 4096 keys: min=0ms max=0ms mean=0.0340009ms stddev=0.0184393 > ok 25 Worst case connect 8192 keys: min=2ms max=4ms mean=2.86208ms stddev=0.169177 > ok 26 Connect random-search 8192 keys: min=2ms max=4ms mean=2.87592ms stddev=0.119915 > ok 27 Worst case delete 8192 keys: min=6ms max=11ms mean=7.55291ms stddev=0.274826 > ok 28 Add a new key 8192 keys: min=1ms max=5ms mean=2.56797ms stddev=0.160249 > ok 29 Remove random-search 8192 keys: min=5ms max=10ms mean=7.14002ms stddev=0.267208 > ok 30 Remove async 8192 keys: min=0ms max=0ms mean=0.0320066ms stddev=0.0178904 > ok 31 Worst case connect 16384 keys: min=5ms max=6ms mean=5.55334ms stddev=0.235655 > ok 32 Connect random-search 16384 keys: min=5ms max=6ms mean=5.52614ms stddev=0.166225 > ok 33 Worst case delete 16384 keys: min=5ms max=11ms mean=7.39109ms stddev=0.271866 > ok 34 Add a new key 16384 keys: min=2ms max=4ms mean=3.35799ms stddev=0.183248 > ok 35 Remove random-search 16384 keys: min=5ms max=8ms mean=6.86078ms stddev=0.261931 > ok 36 Remove async 16384 keys: min=0ms max=0ms mean=0.0302384ms stddev=0.0173892 > # Totals: pass:36 fail:0 xfail:0 xpass:0 skip:0 error:0 >From the output it's visible that the current simplified approach with linked-list of MKTs scales quite fine even for thousands of keys. And that also means that the majority of the time for delete is eaten by synchronize_rcu() [which I can confirm separately by tracing]. Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit 6f0c472a681586161e4b3988243754514eef8a0d Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:20 2023 +0000 selftests/net: Add TCP-AO + TCP-MD5 + no sign listen socket tests The test plan was (most of tests have all 3 client types): 1. TCP-AO listen (INADDR_ANY) 2. TCP-MD5 listen (INADDR_ANY) 3. non-signed listen (INADDR_ANY) 4. TCP-AO + TCP-MD5 listen (prefix) 5. TCP-AO subprefix add failure [checked in setsockopt-closed.c] 6. TCP-AO out of prefix connect [checked in connect-deny.c] 7. TCP-AO + TCP-MD5 on connect() 8. TCP-AO intersect with TCP-MD5 failure 9. Established TCP-AO: add TCP-MD5 key 10. Established TCP-MD5: add TCP-AO key 11. Established non-signed: add TCP-AO key Output produced: > # ./unsigned-md5_ipv6 > 1..72 > # 1592[lib/setup.c:239] rand seed 1697567046 > TAP version 13 > ok 1 AO server (INADDR_ANY): AO client: counter TCPAOGood increased 0 => 2 > ok 2 AO server (INADDR_ANY): AO client: connected > ok 3 AO server (INADDR_ANY): MD5 client > ok 4 AO server (INADDR_ANY): MD5 client: counter TCPMD5Unexpected increased 0 => 1 > ok 5 AO server (INADDR_ANY): no sign client: counter TCPAORequired increased 0 => 1 > ok 6 AO server (INADDR_ANY): unsigned client > ok 7 AO server (AO_REQUIRED): AO client: connected > ok 8 AO server (AO_REQUIRED): AO client: counter TCPAOGood increased 4 => 6 > ok 9 AO server (AO_REQUIRED): unsigned client > ok 10 AO server (AO_REQUIRED): unsigned client: counter TCPAORequired increased 1 => 2 > ok 11 MD5 server (INADDR_ANY): AO client: counter TCPAOKeyNotFound increased 0 => 1 > ok 12 MD5 server (INADDR_ANY): AO client > ok 13 MD5 server (INADDR_ANY): MD5 client: connected > ok 14 MD5 server (INADDR_ANY): MD5 client: no counter checks > ok 15 MD5 server (INADDR_ANY): no sign client > ok 16 MD5 server (INADDR_ANY): no sign client: counter TCPMD5NotFound increased 0 => 1 > ok 17 no sign server: AO client > ok 18 no sign server: AO client: counter TCPAOKeyNotFound increased 1 => 2 > ok 19 no sign server: MD5 client > ok 20 no sign server: MD5 client: counter TCPMD5Unexpected increased 1 => 2 > ok 21 no sign server: no sign client: connected > ok 22 no sign server: no sign client: counter CurrEstab increased 0 => 1 > ok 23 AO+MD5 server: AO client (matching): connected > ok 24 AO+MD5 server: AO client (matching): counter TCPAOGood increased 8 => 10 > ok 25 AO+MD5 server: AO client (misconfig, matching MD5) > ok 26 AO+MD5 server: AO client (misconfig, matching MD5): counter TCPAOKeyNotFound increased 2 => 3 > ok 27 AO+MD5 server: AO client (misconfig, non-matching): counter TCPAOKeyNotFound increased 3 => 4 > ok 28 AO+MD5 server: AO client (misconfig, non-matching) > ok 29 AO+MD5 server: MD5 client (matching): connected > ok 30 AO+MD5 server: MD5 client (matching): no counter checks > ok 31 AO+MD5 server: MD5 client (misconfig, matching AO) > ok 32 AO+MD5 server: MD5 client (misconfig, matching AO): counter TCPMD5Unexpected increased 2 => 3 > ok 33 AO+MD5 server: MD5 client (misconfig, non-matching) > ok 34 AO+MD5 server: MD5 client (misconfig, non-matching): counter TCPMD5Unexpected increased 3 => 4 > ok 35 AO+MD5 server: no sign client (unmatched): connected > ok 36 AO+MD5 server: no sign client (unmatched): counter CurrEstab increased 0 => 1 > ok 37 AO+MD5 server: no sign client (misconfig, matching AO) > ok 38 AO+MD5 server: no sign client (misconfig, matching AO): counter TCPAORequired increased 2 => 3 > ok 39 AO+MD5 server: no sign client (misconfig, matching MD5) > ok 40 AO+MD5 server: no sign client (misconfig, matching MD5): counter TCPMD5NotFound increased 1 => 2 > ok 41 AO+MD5 server: client with both [TCP-MD5] and TCP-AO keys: connect() was prevented > ok 42 AO+MD5 server: client with both [TCP-MD5] and TCP-AO keys: no counter checks > ok 43 AO+MD5 server: client with both TCP-MD5 and [TCP-AO] keys: connect() was prevented > ok 44 AO+MD5 server: client with both TCP-MD5 and [TCP-AO] keys: no counter checks > ok 45 TCP-AO established: add TCP-MD5 key: postfailed as expected > ok 46 TCP-AO established: add TCP-MD5 key: counter TCPAOGood increased 12 => 14 > ok 47 TCP-MD5 established: add TCP-AO key: postfailed as expected > ok 48 TCP-MD5 established: add TCP-AO key: no counter checks > ok 49 non-signed established: add TCP-AO key: postfailed as expected > ok 50 non-signed established: add TCP-AO key: counter CurrEstab increased 0 => 1 > ok 51 TCP-AO key intersects with existing TCP-MD5 key: prefailed as expected: Key was rejected by service > ok 52 TCP-MD5 key intersects with existing TCP-AO key: prefailed as expected: Key was rejected by service > ok 53 TCP-MD5 key + TCP-AO required: prefailed as expected: Key was rejected by service > ok 54 TCP-AO required on socket + TCP-MD5 key: prefailed as expected: Key was rejected by service > ok 55 VRF: TCP-AO key (no l3index) + TCP-MD5 key (no l3index): prefailed as expected: Key was rejected by service > ok 56 VRF: TCP-MD5 key (no l3index) + TCP-AO key (no l3index): prefailed as expected: Key was rejected by service > ok 57 VRF: TCP-AO key (no l3index) + TCP-MD5 key (l3index=0): prefailed as expected: Key was rejected by service > ok 58 VRF: TCP-MD5 key (l3index=0) + TCP-AO key (no l3index): prefailed as expected: Key was rejected by service > ok 59 VRF: TCP-AO key (no l3index) + TCP-MD5 key (l3index=N): prefailed as expected: Key was rejected by service > ok 60 VRF: TCP-MD5 key (l3index=N) + TCP-AO key (no l3index): prefailed as expected: Key was rejected by service > ok 61 VRF: TCP-AO key (l3index=0) + TCP-MD5 key (no l3index): prefailed as expected: Key was rejected by service > ok 62 VRF: TCP-MD5 key (no l3index) + TCP-AO key (l3index=0): prefailed as expected: Key was rejected by service > ok 63 VRF: TCP-AO key (l3index=0) + TCP-MD5 key (l3index=0): prefailed as expected: Key was rejected by service > ok 64 VRF: TCP-MD5 key (l3index=0) + TCP-AO key (l3index=0): prefailed as expected: Key was rejected by service > ok 65 VRF: TCP-AO key (l3index=0) + TCP-MD5 key (l3index=N) > ok 66 VRF: TCP-MD5 key (l3index=N) + TCP-AO key (l3index=0) > ok 67 VRF: TCP-AO key (l3index=N) + TCP-MD5 key (no l3index): prefailed as expected: Key was rejected by service > ok 68 VRF: TCP-MD5 key (no l3index) + TCP-AO key (l3index=N): prefailed as expected: Key was rejected by service > ok 69 VRF: TCP-AO key (l3index=N) + TCP-MD5 key (l3index=0) > ok 70 VRF: TCP-MD5 key (l3index=0) + TCP-AO key (l3index=N) > ok 71 VRF: TCP-AO key (l3index=N) + TCP-MD5 key (l3index=N): prefailed as expected: Key was rejected by service > ok 72 VRF: TCP-MD5 key (l3index=N) + TCP-AO key (l3index=N): prefailed as expected: Key was rejected by service > # Totals: pass:72 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit b26660531cf66e1c8daab551535d3ad07b78fa54 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:19 2023 +0000 selftests/net: Add test for TCP-AO add setsockopt() command Verify corner-cases for UAPI. Sample output: > # ./setsockopt-closed_ipv4 > 1..120 > # 1657[lib/setup.c:254] rand seed 1681938184 > TAP version 13 > ok 1 AO add: minimum size > ok 2 AO add: extended size > ok 3 AO add: null optval > ok 4 AO del: minimum size > ok 5 AO del: extended size > ok 6 AO del: null optval > ok 7 AO set info: minimum size > ok 8 AO set info: extended size > ok 9 AO info get: : extended size > ok 10 AO set info: null optval > ok 11 AO get info: minimum size > ok 12 AO get info: extended size > ok 13 AO get info: null optval > ok 14 AO get info: null optlen > ok 15 AO get keys: minimum size > ok 16 AO get keys: extended size > ok 17 AO get keys: null optval > ok 18 AO get keys: null optlen > ok 19 key add: too big keylen > ok 20 key add: using reserved padding > ok 21 key add: using reserved2 padding > ok 22 key add: wrong address family > ok 23 key add: port (unsupported) > ok 24 key add: no prefix, addr > ok 25 key add: no prefix, any addr > ok 26 key add: prefix, any addr > ok 27 key add: too big prefix > ok 28 key add: too short prefix > ok 29 key add: bad key flags > ok 30 key add: add current key on a listen socket > ok 31 key add: add rnext key on a listen socket > ok 32 key add: add current+rnext key on a listen socket > ok 33 key add: add key and set as current > ok 34 key add: add key and set as rnext > ok 35 key add: add key and set as current+rnext > ok 36 key add: ifindex without TCP_AO_KEYF_IFNINDEX > ok 37 key add: non-existent VRF > ok 38 optmem limit was hit on adding 69 key > ok 39 key add: maclen bigger than TCP hdr > ok 40 key add: bad algo > ok 41 key del: using reserved padding > ok 42 key del: using reserved2 padding > ok 43 key del: del and set current key on a listen socket > ok 44 key del: del and set rnext key on a listen socket > ok 45 key del: del and set current+rnext key on a listen socket > ok 46 key del: bad key flags > ok 47 key del: ifindex without TCP_AO_KEYF_IFNINDEX > ok 48 key del: non-existent VRF > ok 49 key del: set non-exising current key > ok 50 key del: set non-existing rnext key > ok 51 key del: set non-existing current+rnext key > ok 52 key del: set current key > ok 53 key del: set rnext key > ok 54 key del: set current+rnext key > ok 55 key del: set as current key to be removed > ok 56 key del: set as rnext key to be removed > ok 57 key del: set as current+rnext key to be removed > ok 58 key del: async on non-listen > ok 59 key del: non-existing sndid > ok 60 key del: non-existing rcvid > ok 61 key del: incorrect addr > ok 62 key del: correct key delete > ok 63 AO info set: set current key on a listen socket > ok 64 AO info set: set rnext key on a listen socket > ok 65 AO info set: set current+rnext key on a listen socket > ok 66 AO info set: using reserved padding > ok 67 AO info set: using reserved2 padding > ok 68 AO info set: accept_icmps > ok 69 AO info get: accept_icmps > ok 70 AO info set: ao required > ok 71 AO info get: ao required > ok 72 AO info set: ao required with MD5 key > ok 73 AO info set: set non-existing current key > ok 74 AO info set: set non-existing rnext key > ok 75 AO info set: set non-existing current+rnext key > ok 76 AO info set: set current key > ok 77 AO info get: set current key > ok 78 AO info set: set rnext key > ok 79 AO info get: set rnext key > ok 80 AO info set: set current+rnext key > ok 81 AO info get: set current+rnext key > ok 82 AO info set: set counters > ok 83 AO info get: set counters > ok 84 AO info set: no-op > ok 85 AO info get: no-op > ok 86 get keys: no ao_info > ok 87 get keys: proper tcp_ao_get_mkts() > ok 88 get keys: set out-only pkt_good counter > ok 89 get keys: set out-only pkt_bad counter > ok 90 get keys: bad keyflags > ok 91 get keys: ifindex without TCP_AO_KEYF_IFNINDEX > ok 92 get keys: using reserved field > ok 93 get keys: no prefix, addr > ok 94 get keys: no prefix, any addr > ok 95 get keys: prefix, any addr > ok 96 get keys: too big prefix > ok 97 get keys: too short prefix > ok 98 get keys: prefix + addr > ok 99 get keys: get_all + prefix > ok 100 get keys: get_all + addr > ok 101 get keys: get_all + sndid > ok 102 get keys: get_all + rcvid > ok 103 get keys: current + prefix > ok 104 get keys: current + addr > ok 105 get keys: current + sndid > ok 106 get keys: current + rcvid > ok 107 get keys: rnext + prefix > ok 108 get keys: rnext + addr > ok 109 get keys: rnext + sndid > ok 110 get keys: rnext + rcvid > ok 111 get keys: get_all + current > ok 112 get keys: get_all + rnext > ok 113 get keys: current + rnext > ok 114 key add: duplicate: full copy > ok 115 key add: duplicate: any addr key on the socket > ok 116 key add: duplicate: add any addr key > ok 117 key add: duplicate: add any addr for the same subnet > ok 118 key add: duplicate: full copy of a key > ok 119 key add: duplicate: RecvID differs > ok 120 key add: duplicate: SendID differs > # Totals: pass:120 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit ed9d09b309b17cead3bbb910894399da6b74e898 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:18 2023 +0000 selftests/net: Add a test for TCP-AO keys matching Add TCP-AO tests on connect()/accept() pair. SNMP counters exposed by kernel are very useful here to verify the expected behavior of TCP-AO. Expected output for ipv4 version: > # ./connect-deny_ipv4 > 1..19 > # 1702[lib/setup.c:254] rand seed 1680553689 > TAP version 13 > ok 1 Non-AO server + AO client > ok 2 Non-AO server + AO client: counter TCPAOKeyNotFound increased 0 => 1 > ok 3 AO server + Non-AO client > ok 4 AO server + Non-AO client: counter TCPAORequired increased 0 => 1 > ok 5 Wrong password > ok 6 Wrong password: counter TCPAOBad increased 0 => 1 > ok 7 Wrong rcv id > ok 8 Wrong rcv id: counter TCPAOKeyNotFound increased 1 => 2 > ok 9 Wrong snd id > ok 10 Wrong snd id: counter TCPAOGood increased 0 => 1 > ok 11 Server: Wrong addr: counter TCPAOKeyNotFound increased 2 => 3 > ok 12 Server: Wrong addr > ok 13 Client: Wrong addr: connect() was prevented > ok 14 rcv id != snd id: connected > ok 15 rcv id != snd id: counter TCPAOGood increased 1 => 3 > ok 16 Server: prefix match: connected > ok 17 Server: prefix match: counter TCPAOGood increased 4 => 6 > ok 18 Client: prefix match: connected > ok 19 Client: prefix match: counter TCPAOGood increased 7 => 9 > # Totals: pass:19 fail:0 xfail:0 xpass:0 skip:0 error:0 Expected output for ipv6 version: > # ./connect-deny_ipv6 > 1..19 > # 1725[lib/setup.c:254] rand seed 1680553711 > TAP version 13 > ok 1 Non-AO server + AO client > ok 2 Non-AO server + AO client: counter TCPAOKeyNotFound increased 0 => 1 > ok 3 AO server + Non-AO client: counter TCPAORequired increased 0 => 1 > ok 4 AO server + Non-AO client > ok 5 Wrong password: counter TCPAOBad increased 0 => 1 > ok 6 Wrong password > ok 7 Wrong rcv id: counter TCPAOKeyNotFound increased 1 => 2 > ok 8 Wrong rcv id > ok 9 Wrong snd id: counter TCPAOGood increased 0 => 1 > ok 10 Wrong snd id > ok 11 Server: Wrong addr > ok 12 Server: Wrong addr: counter TCPAOKeyNotFound increased 2 => 3 > ok 13 Client: Wrong addr: connect() was prevented > ok 14 rcv id != snd id: connected > ok 15 rcv id != snd id: counter TCPAOGood increased 1 => 3 > ok 16 Server: prefix match: connected > ok 17 Server: prefix match: counter TCPAOGood increased 5 => 7 > ok 18 Client: prefix match: connected > ok 19 Client: prefix match: counter TCPAOGood increased 8 => 10 > # Totals: pass:19 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit d11301f65977244ca8bdcc6ac80431683b9b3b0a Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:17 2023 +0000 selftests/net: Add TCP-AO ICMPs accept test Reverse to icmps-discard test: the server accepts ICMPs, using TCP_AO_CMDF_ACCEPT_ICMP and it is expected to fail under ICMP flood from client. Test that the default pre-TCP-AO behaviour functions when TCP_AO_CMDF_ACCEPT_ICMP is set. Expected output for ipv4 version (in case it receives ICMP_PROT_UNREACH): > # ./icmps-accept_ipv4 > 1..3 > # 3209[lib/setup.c:166] rand seed 1642623870 > TAP version 13 > # 3209[lib/proc.c:207] Snmp6 Ip6InReceives: 0 => 1 > # 3209[lib/proc.c:207] Snmp6 Ip6InNoRoutes: 0 => 1 > # 3209[lib/proc.c:207] Snmp6 Ip6InOctets: 0 => 76 > # 3209[lib/proc.c:207] Snmp6 Ip6InNoECTPkts: 0 => 1 > # 3209[lib/proc.c:207] Tcp InSegs: 3 => 23 > # 3209[lib/proc.c:207] Tcp OutSegs: 2 => 22 > # 3209[lib/proc.c:207] IcmpMsg InType3: 0 => 4 > # 3209[lib/proc.c:207] Icmp InMsgs: 0 => 4 > # 3209[lib/proc.c:207] Icmp InDestUnreachs: 0 => 4 > # 3209[lib/proc.c:207] Ip InReceives: 3 => 27 > # 3209[lib/proc.c:207] Ip InDelivers: 3 => 27 > # 3209[lib/proc.c:207] Ip OutRequests: 2 => 22 > # 3209[lib/proc.c:207] IpExt InOctets: 288 => 3420 > # 3209[lib/proc.c:207] IpExt OutOctets: 124 => 3244 > # 3209[lib/proc.c:207] IpExt InNoECTPkts: 3 => 25 > # 3209[lib/proc.c:207] TcpExt TCPPureAcks: 1 => 2 > # 3209[lib/proc.c:207] TcpExt TCPOrigDataSent: 0 => 20 > # 3209[lib/proc.c:207] TcpExt TCPDelivered: 0 => 19 > # 3209[lib/proc.c:207] TcpExt TCPAOGood: 3 => 23 > ok 1 InDestUnreachs delivered 4 > ok 2 server failed with -92: Protocol not available > ok 3 TCPAODroppedIcmps counter didn't change: 0 >= 0 > # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 Expected output for ipv6 version (in case it receives ADM_PROHIBITED): > # ./icmps-accept_ipv6 > 1..3 > # 3277[lib/setup.c:166] rand seed 1642624035 > TAP version 13 > # 3277[lib/proc.c:207] Snmp6 Ip6InReceives: 6 => 31 > # 3277[lib/proc.c:207] Snmp6 Ip6InDelivers: 4 => 29 > # 3277[lib/proc.c:207] Snmp6 Ip6OutRequests: 4 => 24 > # 3277[lib/proc.c:207] Snmp6 Ip6InOctets: 592 => 4492 > # 3277[lib/proc.c:207] Snmp6 Ip6OutOctets: 332 => 3852 > # 3277[lib/proc.c:207] Snmp6 Ip6InNoECTPkts: 6 => 31 > # 3277[lib/proc.c:207] Snmp6 Icmp6InMsgs: 1 => 6 > # 3277[lib/proc.c:207] Snmp6 Icmp6InDestUnreachs: 0 => 5 > # 3277[lib/proc.c:207] Snmp6 Icmp6InType1: 0 => 5 > # 3277[lib/proc.c:207] Tcp InSegs: 3 => 23 > # 3277[lib/proc.c:207] Tcp OutSegs: 2 => 22 > # 3277[lib/proc.c:207] TcpExt TCPPureAcks: 1 => 2 > # 3277[lib/proc.c:207] TcpExt TCPOrigDataSent: 0 => 20 > # 3277[lib/proc.c:207] TcpExt TCPDelivered: 0 => 19 > # 3277[lib/proc.c:207] TcpExt TCPAOGood: 3 => 23 > ok 1 Icmp6InDestUnreachs delivered 5 > ok 2 server failed with -13: Permission denied > ok 3 TCPAODroppedIcmps counter didn't change: 0 >= 0 > # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 With some luck the server may fail with ECONNREFUSED (depending on what icmp packet was delivered firstly). For the kernel error handlers see: tab_unreach[] and icmp_err_convert[]. Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit a8fcf8ca14d7b374519e5637d7b49b03ebaf580d Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:16 2023 +0000 selftests/net: Verify that TCP-AO complies with ignoring ICMPs Hand-crafted ICMP packets are sent to the server, the server checks for hard/soft errors and fails if any. Expected output for ipv4 version: > # ./icmps-discard_ipv4 > 1..3 > # 3164[lib/setup.c:166] rand seed 1642623745 > TAP version 13 > # 3164[lib/proc.c:207] Snmp6 Ip6InReceives: 0 => 1 > # 3164[lib/proc.c:207] Snmp6 Ip6InNoRoutes: 0 => 1 > # 3164[lib/proc.c:207] Snmp6 Ip6InOctets: 0 => 76 > # 3164[lib/proc.c:207] Snmp6 Ip6InNoECTPkts: 0 => 1 > # 3164[lib/proc.c:207] Tcp InSegs: 2 => 203 > # 3164[lib/proc.c:207] Tcp OutSegs: 1 => 202 > # 3164[lib/proc.c:207] IcmpMsg InType3: 0 => 543 > # 3164[lib/proc.c:207] Icmp InMsgs: 0 => 543 > # 3164[lib/proc.c:207] Icmp InDestUnreachs: 0 => 543 > # 3164[lib/proc.c:207] Ip InReceives: 2 => 746 > # 3164[lib/proc.c:207] Ip InDelivers: 2 => 746 > # 3164[lib/proc.c:207] Ip OutRequests: 1 => 202 > # 3164[lib/proc.c:207] IpExt InOctets: 132 => 61684 > # 3164[lib/proc.c:207] IpExt OutOctets: 68 => 31324 > # 3164[lib/proc.c:207] IpExt InNoECTPkts: 2 => 744 > # 3164[lib/proc.c:207] TcpExt TCPPureAcks: 1 => 2 > # 3164[lib/proc.c:207] TcpExt TCPOrigDataSent: 0 => 200 > # 3164[lib/proc.c:207] TcpExt TCPDelivered: 0 => 199 > # 3164[lib/proc.c:207] TcpExt TCPAOGood: 2 => 203 > # 3164[lib/proc.c:207] TcpExt TCPAODroppedIcmps: 0 => 541 > ok 1 InDestUnreachs delivered 543 > ok 2 Server survived 20000 bytes of traffic > ok 3 ICMPs ignored 541 > # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 Expected output for ipv6 version: > # ./icmps-discard_ipv6 > 1..3 > # 3186[lib/setup.c:166] rand seed 1642623803 > TAP version 13 > # 3186[lib/proc.c:207] Snmp6 Ip6InReceives: 4 => 568 > # 3186[lib/proc.c:207] Snmp6 Ip6InDelivers: 3 => 564 > # 3186[lib/proc.c:207] Snmp6 Ip6OutRequests: 2 => 204 > # 3186[lib/proc.c:207] Snmp6 Ip6InMcastPkts: 1 => 4 > # 3186[lib/proc.c:207] Snmp6 Ip6OutMcastPkts: 0 => 1 > # 3186[lib/proc.c:207] Snmp6 Ip6InOctets: 320 => 70420 > # 3186[lib/proc.c:207] Snmp6 Ip6OutOctets: 160 => 35512 > # 3186[lib/proc.c:207] Snmp6 Ip6InMcastOctets: 72 => 336 > # 3186[lib/proc.c:207] Snmp6 Ip6OutMcastOctets: 0 => 76 > # 3186[lib/proc.c:207] Snmp6 Ip6InNoECTPkts: 4 => 568 > # 3186[lib/proc.c:207] Snmp6 Icmp6InMsgs: 1 => 361 > # 3186[lib/proc.c:207] Snmp6 Icmp6OutMsgs: 1 => 2 > # 3186[lib/proc.c:207] Snmp6 Icmp6InDestUnreachs: 0 => 360 > # 3186[lib/proc.c:207] Snmp6 Icmp6OutMLDv2Reports: 0 => 1 > # 3186[lib/proc.c:207] Snmp6 Icmp6InType1: 0 => 360 > # 3186[lib/proc.c:207] Snmp6 Icmp6OutType143: 0 => 1 > # 3186[lib/proc.c:207] Tcp InSegs: 2 => 203 > # 3186[lib/proc.c:207] Tcp OutSegs: 1 => 202 > # 3186[lib/proc.c:207] TcpExt TCPPureAcks: 1 => 2 > # 3186[lib/proc.c:207] TcpExt TCPOrigDataSent: 0 => 200 > # 3186[lib/proc.c:207] TcpExt TCPDelivered: 0 => 199 > # 3186[lib/proc.c:207] TcpExt TCPAOGood: 2 => 203 > # 3186[lib/proc.c:207] TcpExt TCPAODroppedIcmps: 0 => 360 > ok 1 Icmp6InDestUnreachs delivered 360 > ok 2 Server survived 20000 bytes of traffic > ok 3 ICMPs ignored 360 > # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0 Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit cfbab37b3da094579b8f7492e4df8a8a4c8c41b0 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 15 02:36:15 2023 +0000 selftests/net: Add TCP-AO library Provide functions to create selftests dedicated to TCP-AO. They can run in parallel, as they use temporary net namespaces. They can be very specific to the feature being tested. This will allow to create a lot of TCP-AO tests, without complicating one binary with many --options and to create scenarios, that are hard to put in bash script that uses one binary. Signed-off-by: Dmitry Safonov Signed-off-by: David S. Miller commit 9c556b7c3f520d42c435c0d78b25c719c060f8a1 Author: Naveen N Rao Date: Thu Dec 14 10:47:02 2023 +0530 trace/kprobe: Display the actual notrace function when rejecting a probe Trying to probe update_sd_lb_stats() using perf results in the below message in the kernel log: trace_kprobe: Could not probe notrace function _text This is because 'perf probe' specifies the kprobe location as an offset from '_text': $ sudo perf probe -D update_sd_lb_stats p:probe/update_sd_lb_stats _text+1830728 However, the error message is misleading and doesn't help convey the actual notrace function that is being probed. Fix this by looking up the actual function name that is being probed. With this fix, we now get the below message in the kernel log: trace_kprobe: Could not probe notrace function update_sd_lb_stats.constprop.0 Link: https://lore.kernel.org/all/20231214051702.1687300-1-naveen@kernel.org/ Signed-off-by: Naveen N Rao Acked-by: Masami Hiramatsu (Google) Signed-off-by: Masami Hiramatsu (Google) commit ba712fd55c7b635ad73c48b087a44e0e77d32abf Author: Dmitry Baryshkov Date: Fri Dec 15 19:40:39 2023 +0200 arm64: dts: qcom: sm8150-hdk: enable DisplayPort and USB-C altmode Enable the USB-C related functionality for the USB-C port on this board. This includes OTG, PowerDelivery and DP AltMode. Also enable the DisplayPort itself. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231215174152.315403-8-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 10da1b9a44281718f470c9dd084be2db618e36bc Author: Dmitry Baryshkov Date: Fri Dec 15 19:40:38 2023 +0200 arm64: dts: qcom: sm8150: add USB-C ports to the OTG USB host Expand first USB host controller device node with the OF ports required to support USB-C / DisplayPort switching. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231215174152.315403-7-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 4eb60569e2556da0079b8959017a469d7e47ca34 Author: Dmitry Baryshkov Date: Fri Dec 15 19:40:37 2023 +0200 arm64: dts: qcom: sm8150: add USB-C ports to the USB+DP QMP PHY Expand Combo USB+DP QMP PHY device node with the OF ports required to support USB-C / DisplayPort switching. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231215174152.315403-6-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 5dd110c90a5011012d50174740e8a2dff37826be Author: Dmitry Baryshkov Date: Fri Dec 15 19:40:36 2023 +0200 arm64: dts: qcom: sm8150: add DisplayPort controller Add device tree node for the DisplayPort controller and link it to the display controller interface. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231215174152.315403-5-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit a509adf05b2aac31b22781f5aa09e4768a5b6c39 Author: Dmitry Baryshkov Date: Fri Dec 15 19:40:35 2023 +0200 arm64: dts: qcom: sm8150-hdk: fix SS USB regulators The SM8150-HDK uses two different regulators to power up SuperSpeed USB PHYs. The L5A regulator is used for the second USB host, while the first (OTG) USB host uses different regulator, L18A. Fix the regulator for the usb_1 QMPPHY and (to remove possible confusion) drop the usb_ss_dp_core_1/_2 labels. Fixes: 0ab1b2d10afe ("arm64: dts: qcom: add sm8150 hdk dts") Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231215174152.315403-4-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 73d1d5b153fe143ad53bef3bc089fb1b9b463e5d Author: Dmitry Baryshkov Date: Fri Dec 15 19:40:34 2023 +0200 arm64: dts: qcom: sm8150-hdk: enable HDMI output Add DSI outputs and link them to the onboard Lontium LT9611 DSI-to-HDMI bridge, enabling HDMI output on this board. While adding the display resources, also drop the headless ("amd,imageon") compat string from the GPU node, since the board now has output. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231215174152.315403-3-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 617de4ce7b1c4b41c1316e493d4717cd2f208def Author: Dmitry Baryshkov Date: Fri Dec 15 19:40:33 2023 +0200 arm64: dts: qcom: sm8150: make dispcc cast minimal vote on MMCX Add required-opps property to the display clock controller. This makes it cast minimal vote on the MMCX lane and prevents further 'clock stuck' errors when enabling the display. Fixes: 2ef3bb17c45c ("arm64: dts: qcom: sm8150: Add DISPCC node") Acked-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231215174152.315403-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit b0fd89bc1aeca3bb9cfccd1cadf4cbd31f8e8a19 Author: Neil Armstrong Date: Fri Dec 15 12:45:53 2023 +0100 arm64: dts: qcom: sm8650: add fastrpc-compute-cb nodes Add the missing aDSP and cDSP fastrpc compute-cb nodes for the SM8650 SoC. Fixes: 10e024671295 ("arm64: dts: qcom: sm8650: add interconnect dependent device nodes") Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231215-topic-sm8650-upstream-dt-fastrpc-v1-1-5016f685ab5a@linaro.org Signed-off-by: Bjorn Andersson commit 1d01007a62df2e49854d5727ba2b0ad794d2eb22 Author: Fenglin Wu Date: Fri Dec 15 16:01:46 2023 +0800 arm64: dts: qcom: sm8550-qrd: add PM8010 regulators Add PM8010 regulator device nodes for sm8550-qrd board. Reviewed-by: Konrad Dybcio Signed-off-by: Fenglin Wu Link: https://lore.kernel.org/r/20231215-pm8010-regulator-v3-2-1bfc4b7ee5ab@quicinc.com Signed-off-by: Bjorn Andersson commit 64dcc3d779abd4065d919d855979b33026370125 Author: Fenglin Wu Date: Fri Dec 15 16:01:45 2023 +0800 arm64: dts: qcom: sm8550-mtp: Add pm8010 regulators Add PM8010 regulator device nodes for sm8550-mtp board. Reviewed-by: Konrad Dybcio Signed-off-by: Fenglin Wu Link: https://lore.kernel.org/r/20231215-pm8010-regulator-v3-1-1bfc4b7ee5ab@quicinc.com Signed-off-by: Bjorn Andersson commit e3f6a699404154e7e103f8055f21c3556721603f Author: Konrad Dybcio Date: Fri Dec 15 01:01:10 2023 +0100 arm64: dts: qcom: qcm2290: Hook up MPM Wire up MPM and the interrupts it provides. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231215-topic-mpm_dt-v1-3-c6636fc75ce3@linaro.org Signed-off-by: Bjorn Andersson commit 09896da07315cce07b019ab00750c8a57e1b53a3 Author: Konrad Dybcio Date: Fri Dec 15 01:01:09 2023 +0100 arm64: dts: qcom: msm8996: Hook up MPM Wire up MPM and the interrupts it provides. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231215-topic-mpm_dt-v1-2-c6636fc75ce3@linaro.org Signed-off-by: Bjorn Andersson commit d3246a0cf43fd24a1986163284edd2389143809d Author: Konrad Dybcio Date: Fri Dec 15 01:01:08 2023 +0100 arm64: dts: qcom: sm6375: Hook up MPM Add a node for MPM and wire it up on consumers that use it. This also fixes a very bad and sad assumption I made when initially porting this SoC that the downstream MPM-TLMM mappings were 1-1. That apparently changed some time ago, so with this patch the MPM consumers will actually be hooked up to the correct interrupt lines. Fixes: 59d34ca97f91 ("arm64: dts: qcom: Add initial device tree for SM6375") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231215-topic-mpm_dt-v1-1-c6636fc75ce3@linaro.org Signed-off-by: Bjorn Andersson commit 4029bd91c34956add282632cd3b5ec858d010eb9 Author: André Apitzsch Date: Thu Dec 14 21:59:33 2023 +0100 dt-bindings: arm: qcom: Add Motorola Moto G 4G (2013) Document the compatible for the MSM8926-based Motorola Moto G 4G smartphone released in 2013. Acked-by: Krzysztof Kozlowski Signed-off-by: André Apitzsch Link: https://lore.kernel.org/r/20231214-peregrine-v2-1-a35102268442@apitzsch.eu Signed-off-by: Bjorn Andersson commit f8ab2984e5b0f1aaf94e3810b809bae055020e11 Author: Abel Vesa Date: Thu Dec 14 21:24:50 2023 +0200 arm64: dts: qcom: x1e80100-crd: Fix supplies for some LDOs in PM8550 The LDOs 1, 4 and 10 from PM8550 share the same supply, the SMPS 4 from PM8550ve. This needs to be done through shared supply approach otherwise the bindings check fails. Fixes: bd50b1f5b6f3 ("arm64: dts: qcom: x1e80100: Add Compute Reference Device") Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214-x1e80100-dts-fix-pm8550-regulators-supplies-v1-1-6b5830dc337e@linaro.org Signed-off-by: Bjorn Andersson commit d488f903a8600203dc367985a0a7a742b530adc0 Author: Om Prakash Singh Date: Thu Dec 14 16:06:00 2023 +0530 arm64: dts: qcom: sc7280: add QCrypto nodes Add the QCE and Crypto BAM DMA nodes. Signed-off-by: Om Prakash Singh Link: https://lore.kernel.org/r/20231214103600.2613988-3-quic_omprsing@quicinc.com Signed-off-by: Bjorn Andersson commit 97d1926892955c109e412d2359dc32691eec95ce Author: Douglas Anderson Date: Wed Dec 13 16:35:02 2023 -0800 arm64: dts: qcom: sc7180: Switch pompom to the generic edp-panel Pompom has several sources for its panel. Let's switch it to the generic edp-panel compatible string to account for this. This fixes a problem where the panel wouldn't come up on some pompon devices after commit fb3f43d50d9b ("drm/panel-edp: Avoid adding multiple preferred modes"). Specifically, some models of pompom have a 1920x1080 panel which is _very_ different than the 1366x768 panel specified in the dts. Before the recent panel-edp fix on Linux things kinda/sorta worked because the panel-edp driver would include both the hardcoded and probed mode, AKA: * #0 1920x1080 60.00 1920 1944 1960 2000 1080 1083 1088 1111 133320 flags: nhsync, nvsync; type: preferred, driver * #1 1366x768 60.00 1366 1406 1438 1500 768 773 778 900 81000 flags: nhsync, nvsync; type: preferred, driver ...and, at least on ChromeOS, the userspace was consistently picking the first mode even though both were marked as "preferred". Now that the Linux driver is fixed we only get the hardcoded mode. That means we end up trying to drive a 1920x1080 panel at 1366x768 and it doesn't work so well. Let's switch over to the generic panel-edp. Fixes: fb3f43d50d9b ("drm/panel-edp: Avoid adding multiple preferred modes") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231213163501.1.I8c20f926d15c9ddc12e423e07df1e89db1105d93@changeid Signed-off-by: Bjorn Andersson commit cc4e1da491b84ca05339a19893884cda78f74aef Author: Johan Hovold Date: Wed Dec 13 18:34:03 2023 +0100 arm64: dts: qcom: sm8150: fix USB SS wakeup The USB SS PHY interrupts need to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states. Fixes: 0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes") Fixes: b33d2868e8d3 ("arm64: dts: qcom: sm8150: Add USB and PHY device nodes") Cc: stable@vger.kernel.org # 5.10 Cc: Jack Pham Cc: Jonathan Marek Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231213173403.29544-6-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 134de5e831775e8b178db9b131c1d3769a766982 Author: Johan Hovold Date: Wed Dec 13 18:34:02 2023 +0100 arm64: dts: qcom: sm8150: fix USB DP/DM HS PHY interrupts The USB DP/DM HS PHY interrupts need to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states and to be able to detect disconnect events, which requires triggering on falling edges. A recent commit updated the trigger type but failed to change the interrupt provider as required. This leads to the current Linux driver failing to probe instead of printing an error during suspend and USB wakeup not working as intended. Fixes: 54524b6987d1 ("arm64: dts: qcom: sm8150: fix USB wakeup interrupt types") Fixes: 0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes") Fixes: b33d2868e8d3 ("arm64: dts: qcom: sm8150: Add USB and PHY device nodes") Cc: stable@vger.kernel.org # 5.10 Cc: Jack Pham Cc: Jonathan Marek Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231213173403.29544-5-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 971f5d8b0618d09db75184ddd8cca0767514db5d Author: Johan Hovold Date: Wed Dec 13 18:34:01 2023 +0100 arm64: dts: qcom: sdm845: fix USB SS wakeup The USB SS PHY interrupts need to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states. Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes") Cc: stable@vger.kernel.org # 4.20 Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231213173403.29544-4-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 204f9ed4bad6293933179517624143b8f412347c Author: Johan Hovold Date: Wed Dec 13 18:34:00 2023 +0100 arm64: dts: qcom: sdm845: fix USB DP/DM HS PHY interrupts The USB DP/DM HS PHY interrupts need to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states and to be able to detect disconnect events, which requires triggering on falling edges. A recent commit updated the trigger type but failed to change the interrupt provider as required. This leads to the current Linux driver failing to probe instead of printing an error during suspend and USB wakeup not working as intended. Fixes: 84ad9ac8d9ca ("arm64: dts: qcom: sdm845: fix USB wakeup interrupt types") Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes") Cc: stable@vger.kernel.org # 4.20 Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231213173403.29544-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 687d402bb350b392fa330e9d9d1b917777ee9ed1 Author: Johan Hovold Date: Wed Dec 13 18:33:59 2023 +0100 arm64: dts: qcom: sc8180x: fix USB DP/DM HS PHY interrupts The USB DP/DM HS PHY interrupts need to be provided by the PDC interrupt controller in order to be able to wake the system up from low-power states and to be able to detect disconnect events, which requires triggering on falling edges. A recent commit updated the trigger type but failed to change the interrupt provider as required. This leads to the current Linux driver failing to probe instead of printing an error during suspend and USB wakeup not working as intended. Fixes: 0dc0f6da3d43 ("arm64: dts: qcom: sc8180x: fix USB wakeup interrupt types") Fixes: b080f53a8f44 ("arm64: dts: qcom: sc8180x: Add remoteprocs, wifi and usb nodes") Cc: stable@vger.kernel.org # 6.5 Cc: Vinod Koul Reported-by: Konrad Dybcio Signed-off-by: Johan Hovold Reviewed-by: Konrad Dybcio Tested-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231213173403.29544-2-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 738387a1f8fa72c0f6db3fb659c60a1ff3c5a736 Author: Krzysztof Kozlowski Date: Wed Dec 13 17:28:56 2023 +0100 arm64: dts: qcom: sm8550: drop unneeded assigned-clocks from codec macros The MCLK clocks of codec macros have fixed 19.2 MHz frequency and assigning clock rates is redundant. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231213162856.188566-5-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit a25d2dbb68aab84a4431d382d6a21539ed6760e5 Author: Krzysztof Kozlowski Date: Wed Dec 13 17:28:55 2023 +0100 arm64: dts: qcom: sm8550: move Soundwire pinctrl to its nodes Pin configuration for Soundwire bus should be set in Soundwire controller nodes, not in the associated macro codec node. This placement change should not have big impact in general, because macro codec is a clock provider for Soundwire controller, thus its devices is probed first. However it will have impact for disabled Soundwire buses, e.g. WSA2, because after this change the pins will be left in default state. We also follow similar approach in newer SoCs, like Qualcomm SM8650. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231213162856.188566-4-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 39859a1206e9ec47a00e7e712c5aecb4d352e001 Author: Krzysztof Kozlowski Date: Wed Dec 13 17:28:54 2023 +0100 arm64: dts: qcom: sm8450: drop unneeded assigned-clocks from codec macros The MCLK clocks of codec macros have fixed 19.2 MHz frequency and assigning clock rates is redundant. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231213162856.188566-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 565f4d00cde3e2e7c84fc81eb72f220eb048fcf1 Author: Krzysztof Kozlowski Date: Wed Dec 13 17:28:53 2023 +0100 arm64: dts: qcom: sm8450: move Soundwire pinctrl to its nodes Pin configuration for Soundwire bus should be set in Soundwire controller nodes, not in the associated macro codec node. This placement change should not have big impact in general, because macro codec is a clock provider for Soundwire controller, thus its devices is probed first. However it will have impact for disabled Soundwire buses, e.g. WSA2, because after this change the pins will be left in default state. We also follow similar approach in newer SoCs, like Qualcomm SM8650. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231213162856.188566-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit cf58c96c4f82cb09556e20a48ef93bdadf05b705 Author: Krzysztof Kozlowski Date: Tue Dec 12 19:54:15 2023 +0100 arm64: dts: qcom: sm8550: add missing two RX Soundwire ports in configuration The Qualcomm SM8550 RX Soundwire port configuration was taken from downstream sources ("rx_frame_params_default"), but without two ports. Correct the DTS, even though no practical impact was observed. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231212185415.228003-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 55855d20208a5048ab44ccaf2d5aedd8f9f70e86 Author: Krzysztof Kozlowski Date: Tue Dec 12 14:31:43 2023 +0100 arm64: dts: qcom: sm8650: drop unneeded assigned-clocks from WSA macro Review of v1 patch resulting in commit 58872a54e4a8 ("arm64: dts: qcom: sm8650: add ADSP audio codec macros") pointed to remove unneeded assigned-clock-rates from macro codecs. One assignment was left in WSA macro codec, so drop it now as it is redundant: these clocks have fixed 19.2 MHz frequency. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231212133143.100575-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 82d8c1e49c1be63c6927842a7c3042d4d53fe8b2 Author: Luca Weiss Date: Mon Dec 11 20:28:07 2023 +0100 dt-bindings: arm: qcom: Fix up htc-memul compatible While applying the original patch, some things got messed up and it didn't apply to the correct section. Move the compatible to the correct location to fix that. Fixes: bfccc195192e ("dt-bindings: arm: qcom: Add HTC One Mini 2") Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231211-htc-memul-fixup-v1-1-c0aeab5aaf44@z3ntu.xyz Signed-off-by: Bjorn Andersson commit b3eaa47395b9d0fc593e7f8b8b0abb4c769ad30d Author: Konrad Dybcio Date: Mon Dec 11 10:23:59 2023 +0100 arm64: dts: qcom: sm6115: Hook up interconnects Add interconnect provider nodes and hook up interconnects to consumer devices, including bwmon. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231209-topic-6115iccdt-v1-2-f62da62b7276@linaro.org Signed-off-by: Bjorn Andersson commit ea0b1a4c5a6ff1338ccffb8aad1ababf42d7bb0d Merge: 8ed697393e37f 658902913c704 Author: Bjorn Andersson Date: Sat Dec 16 23:18:16 2023 -0600 Merge branch 'icc-sm6115' of https://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into HEAD Merge the SM6115 interconnect binding to allow referecing the interconnect header files and the ports defined in these. commit 9f5077ef8f8157270f51f4ebd782c985d56d33c6 Author: Christophe JAILLET Date: Sat Nov 18 08:55:48 2023 +0100 PCI: kirin: Use devm_kasprintf() to dynamically allocate clock names Use devm_kasprintf() instead of open coding it. This saves the need of an intermediate buffer. There was also no reason to use devm_kstrdup_const() as string is known to be constant. [kwilczynski: commit log, and add missing Reviewed-by tag] Link: https://lore.kernel.org/linux-pci/1bad6879083a7d836c8a47418a0afa22485e8f69.1700294127.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Krzysztof Wilczyński Reviewed-by: Ilpo Järvinen commit 1fe15be1fb613534ecbac5f8c3f8744f757d237d Author: Jay Buddhabhatti Date: Wed Nov 29 03:29:16 2023 -0800 drivers: clk: zynqmp: update divider round rate logic Currently zynqmp divider round rate is considering single parent and calculating rate and parent rate accordingly. But if divider clock flag is set to SET_RATE_PARENT then its not trying to traverse through all parent rate and not selecting best parent rate from that. So use common divider_round_rate() which is traversing through all clock parents and its rate and calculating proper parent rate. Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver") Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231129112916.23125-3-jay.buddhabhatti@amd.com Signed-off-by: Stephen Boyd commit b782921ddd7f84f524723090377903f399fdbbcb Author: Jay Buddhabhatti Date: Wed Nov 29 03:29:15 2023 -0800 drivers: clk: zynqmp: calculate closest mux rate Currently zynqmp clock driver is not calculating closest mux rate and because of that Linux is not setting proper frequency for CPU and not able to set given frequency for dynamic frequency scaling. E.g., In current logic initial acpu clock parent and frequency as below apll1 0 0 0 2199999978 0 0 50000 Y acpu0_mux 0 0 0 2199999978 0 0 50000 Y acpu0_idiv1 0 0 0 2199999978 0 0 50000 Y acpu0 0 0 0 2199999978 0 0 50000 Y After changing acpu frequency to 549999994 Hz using CPU freq scaling its selecting incorrect parent which is not closest frequency. rpll_to_xpd 0 0 0 1599999984 0 0 50000 Y acpu0_mux 0 0 0 1599999984 0 0 50000 Y acpu0_div1 0 0 0 533333328 0 0 50000 Y acpu0 0 0 0 533333328 0 0 50000 Y Parent should remain same since 549999994 = 2199999978 / 4. So use __clk_mux_determine_rate_closest() generic function to calculate closest rate for mux clock. After this change its selecting correct parent and correct clock rate. apll1 0 0 0 2199999978 0 0 50000 Y acpu0_mux 0 0 0 2199999978 0 0 50000 Y acpu0_div1 0 0 0 549999995 0 0 50000 Y acpu0 0 0 0 549999995 0 0 50000 Y Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver") Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231129112916.23125-2-jay.buddhabhatti@amd.com Signed-off-by: Stephen Boyd commit 2fbabea626b6467eb4e6c4cb7a16523da12e43b4 Author: Kuan-Wei Chiu Date: Mon Dec 11 01:52:32 2023 +0800 clk: mmp: pxa168: Fix memory leak in pxa168_clk_init() In cases where mapping of mpmu/apmu/apbc registers fails, the code path does not handle the failure gracefully, potentially leading to a memory leak. This fix ensures proper cleanup by freeing the allocated memory for 'pxa_unit' before returning. Signed-off-by: Kuan-Wei Chiu Link: https://lore.kernel.org/r/20231210175232.3414584-1-visitorckw@gmail.com Signed-off-by: Stephen Boyd commit bfbea9e5667cfa9552c3d88f023386f017f6c308 Author: Kuan-Wei Chiu Date: Mon Dec 11 00:50:40 2023 +0800 clk: hi3620: Fix memory leak in hi3620_mmc_clk_init() In cases where kcalloc() fails for the 'clk_data->clks' allocation, the code path does not handle the failure gracefully, potentially leading to a memory leak. This fix ensures proper cleanup by freeing the allocated memory for 'clk_data' before returning. Signed-off-by: Kuan-Wei Chiu Link: https://lore.kernel.org/r/20231210165040.3407545-1-visitorckw@gmail.com Signed-off-by: Stephen Boyd commit 1004c346a2b7393fce37dd1f320555e0a0d71e3f Author: Yang Yingliang Date: Tue Nov 28 21:30:16 2023 +0800 clk: sp7021: fix return value check in sp7021_clk_probe() devm_platform_ioremap_resource() never returns NULL pointer, it will return ERR_PTR() when it fails, so replace the check with IS_ERR(). Fixes: d54c1fd4a51e ("clk: Add Sunplus SP7021 clock driver") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20231128133016.2494699-1-yangyingliang@huawei.com Signed-off-by: Stephen Boyd commit 37a8997fc5a5a6ffc60b197d048a9351d1043efd Author: Vladimir Oltean Date: Wed Dec 13 17:51:42 2023 +0200 net: phylink: reimplement population of pl->supported for in-band phylink_parse_mode() populates all possible supported link modes for a given phy_interface_t, for the case where a phylib phy may be absent and we can't retrieve the supported link modes from that. Russell points out that since the introduction of the generic validation helpers phylink_get_capabilities() and phylink_caps_to_linkmodes(), we can rewrite this procedure to populate the pl->supported mask, so that instead of spelling out the link modes, we derive an intermediary mac_capabilities bit field, and we convert that to the equivalent link modes. Suggested-by: Russell King (Oracle) Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit c46104f0c53d0da31fa338ff5ff8fb6c3ea14061 Merge: be587cb5293ec 515f05da372ae Author: Stephen Boyd Date: Sat Dec 16 16:36:25 2023 -0800 Merge tag 'renesas-clk-for-v6.8-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 interrupt controller and Ethernet clocks and resets on Renesas RZ/G3S - Check reset monitor registers on Renesas RZ/G2L-alike SoCs * tag 'renesas-clk-for-v6.8-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r9a08g045: Add clock and reset support for ETH0 and ETH1 clk: renesas: rzg2l: Check reset monitor registers clk: renesas: r9a08g045: Add IA55 pclk and its reset commit 72449a9035f80a0a1f50580147c2c07c8ab391df Merge: b85ea95d08647 89e00444cb894 Author: Stephen Boyd Date: Sat Dec 16 16:30:45 2023 -0800 Merge tag 'sunxi-clk-for-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull an Allwinner clk driver update from Jernej Skrabec: - cleanup variable init in Allwinner nkm module * tag 'sunxi-clk-for-6.8-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi-ng: nkm: remove redundant initialization of tmp_parent commit 723facbbb56048645ab59554801b278c3b7f08b7 Merge: b85ea95d08647 721bf080f249a Author: Stephen Boyd Date: Sat Dec 16 16:28:56 2023 -0800 Merge tag 'v6.8-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: Two new pll rates and an additional critical clock on rk3568. * tag 'v6.8-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: rk3568: Mark pclk_usb as critical clk: rockchip: rk3568: Add PLL rate for 126.4MHz clk: rockchip: rk3568: Add PLL rate for 115.2MHz commit 9a9e8d8d2b6e61a516cbb8a43c5cec51c065ffa4 Author: Emil Renner Berthing Date: Fri Dec 15 20:09:09 2023 +0100 riscv: errata: Make ERRATA_STARFIVE_JH7100 depend on !DMA_DIRECT_REMAP Similar to the Renesas RZ/Five[1] the JH7100 SoC needs the non-portable CONFIG_DMA_GLOBAL_POOL enabled which is incompatible with DMA_DIRECT_REMAP selected by RISCV_ISA_ZICBOM. [1]: commit 31b2daea0764 ("soc: renesas: Make RZ/Five depend on !DMA_DIRECT_REMAP") Link: https://lore.kernel.org/all/24942b4d-d16a-463f-b39a-f9dfcb89d742@infradead.org/ Fixes: 64fc984a8a54 ("riscv: errata: Add StarFive JH7100 errata") Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 690e367e0e75a46a0b3d76ae42a14f7f31f451dd Author: André Apitzsch Date: Thu Dec 14 21:59:34 2023 +0100 ARM: dts: qcom: msm8926-motorola-peregrine: Add initial device tree This dts adds support for Motorola Moto G 4G released in 2013. Add a device tree with initial support for: - GPIO keys - Hall sensor - SDHCI - Vibrator Signed-off-by: André Apitzsch Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214-peregrine-v2-2-a35102268442@apitzsch.eu Signed-off-by: Bjorn Andersson commit df14d214105e29d0e734aa36445888bd2b0dde78 Author: Dan Carpenter Date: Tue Dec 12 12:21:51 2023 +0300 clk: qcom: camcc-sc8280xp: Prevent error pointer dereference If "regmap" is an error pointer then calling regmap_update_bits() will crash. We only need to call regmap_update_bits() if we had written to it earlier. Fixes: ff93872a9c61 ("clk: qcom: camcc-sc8280xp: Add sc8280xp CAMCC") Signed-off-by: Dan Carpenter Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/210d48ce-6ebc-4a6b-b30f-866d10d41a16@moroto.mountain Signed-off-by: Bjorn Andersson commit 7514b28f7a016845a6b912783c4c7f4caf37788a Author: Krzysztof Kozlowski Date: Mon Dec 11 09:58:29 2023 +0100 ARM: dts: qcom: ipq4019: add dedicated SDHCI compatible Add dedicated compatible for the SDHCI MMC controller, because usage of generic qcom,sdhci-msm-v4 compatible alone is deprecated. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231211085830.25380-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 8ed697393e37f901074084445db273c56cf86ad5 Author: Krzysztof Kozlowski Date: Mon Dec 11 09:58:30 2023 +0100 arm64: dts: qcom: ipq8074: add dedicated SDHCI compatible Add dedicated compatible for the SDHCI MMC controller, because usage of generic qcom,sdhci-msm-v4 compatible alone is deprecated. Cc: Chukun Pan Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231211085830.25380-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit bdb6339fd46b8702ea7411b0b414587b86a40562 Author: Mao Jinlong Date: Sat Dec 9 23:26:31 2023 -0800 arm64: dts: qcom: Fix coresight warnings in in-ports and out-ports When a node is only one in port or one out port, address-cells and size-cells are not required in in-ports and out-ports. And the number and reg of the port need to be removed. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mao Jinlong Link: https://lore.kernel.org/r/20231210072633.4243-5-quic_jinlmao@quicinc.com Signed-off-by: Bjorn Andersson commit ae5ee3562a2519214b12228545e88a203dd68bbd Author: Mao Jinlong Date: Sat Dec 9 23:26:30 2023 -0800 arm64: dts: qcom: msm8998: Fix 'out-ports' is a required property out-ports is a required property for coresight ETM. Add out-ports for ETM nodes to fix the warning. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mao Jinlong Link: https://lore.kernel.org/r/20231210072633.4243-4-quic_jinlmao@quicinc.com Signed-off-by: Bjorn Andersson commit 9a6fc510a6a3ec150cb7450aec1e5f257e6fc77b Author: Mao Jinlong Date: Sat Dec 9 23:26:29 2023 -0800 arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property Add the inport of funnel@3023000 to fix 'in-ports' is a required property warning. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Mao Jinlong Link: https://lore.kernel.org/r/20231210072633.4243-3-quic_jinlmao@quicinc.com Signed-off-by: Bjorn Andersson commit 27117558bbfde4e439230cdb5dda2d12ba801af9 Author: Johan Hovold Date: Fri Dec 8 13:58:27 2023 +0100 soc: qcom: pmic_glink: drop stray semicolons Drop stray semicolons after function definitions to avoid having this be reproduced elsewhere. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231208125827.10363-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 3581cb91543967ee1a57849116e26036f6240e6d Author: Johan Hovold Date: Fri Dec 8 13:57:30 2023 +0100 soc: qcom: pmic_glink: disable UCSI on sc8280xp Enabling UCSI on sc8280xp and the Lenovo ThinkPad X13s in particular results in a number of errors and timeouts during boot: [ 9.012421] ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: GET_CONNECTOR_STATUS failed (-95) [ 14.047379] ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: timeout waiting for UCSI sync write response [ 14.050708] ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: GET_CONNECTOR_STATUS failed (-110) [ 20.192382] ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: timeout waiting for UCSI sync write response [ 20.192542] ucsi_glink.pmic_glink_ucsi pmic_glink.ucsi.0: GET_CONNECTOR_STATUS failed (-110) Disable UCSI on sc8280xp until this has been resolved. Fixes: 4db09e7b967b ("soc: qcom: pmic_glink: enable UCSI by default) Link: https://lore.kernel.org/r/ZXL5jvDHr-MuxMoz@hovoldconsulting.com Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231208125730.10323-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 01bd694ac2f682fb8017e16148b928482bc8fa4b Author: Qiang Yu Date: Mon Dec 11 14:42:52 2023 +0800 bus: mhi: host: Drop chan lock before queuing buffers Ensure read and write locks for the channel are not taken in succession by dropping the read lock from parse_xfer_event() such that a callback given to client can potentially queue buffers and acquire the write lock in that process. Any queueing of buffers should be done without channel read lock acquired as it can result in multiple locks and a soft lockup. Cc: # 5.7 Fixes: 1d3173a3bae7 ("bus: mhi: core: Add support for processing events from client device") Signed-off-by: Qiang Yu Reviewed-by: Jeffrey Hugo Tested-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1702276972-41296-3-git-send-email-quic_qianyu@quicinc.com [mani: added fixes tag and cc'ed stable] Signed-off-by: Manivannan Sadhasivam commit 71a73864e144aadaa582fe8296ef73fcf3ea7377 Author: Bartosz Golaszewski Date: Thu Dec 7 10:07:06 2023 +0100 arm64: dts: qcom: qrb5165-rb5: add the Bluetooth node Add the Bluetooth node for RB5 as well as its dependencies in the form of the uart6 -> serial1 alias and the pin function for the Bluetooth enable GPIO. Signed-off-by: Bartosz Golaszewski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231207090706.19134-1-brgl@bgdev.pl Signed-off-by: Bjorn Andersson commit eed6e57e9f3e2beac37563eb6a0129549daa330e Author: Atul Dhudase Date: Wed Dec 6 21:02:51 2023 +0530 soc: qcom: llcc: Fix dis_cap_alloc and retain_on_pc configuration Commit c14e64b46944 ("soc: qcom: llcc: Support chipsets that can write to llcc") add the support for chipset where capacity based allocation and retention through power collapse can be programmed based on content of SCT table mentioned in the llcc driver where the target like sdm845 where the entire programming related to it is controlled in firmware. However, the commit introduces a bug where capacity/retention register get overwritten each time it gets programmed for each slice and that results in misconfiguration of the register based on SCT table and that is not expected behaviour instead it should be read modify write to retain the configuration of other slices. This issue is totally caught from code review and programming test and not through any power/perf numbers so, it is not known what impact this could make if we don't have this change however, this feature are for these targets and they should have been programmed accordingly as per their configuration mentioned in SCT table like others bits information. This change brings one difference where it keeps capacity/retention bits of the slices that are not mentioned in SCT table in unknown state where as earlier it was initialized to zero. Fixes: c14e64b46944 ("soc: qcom: llcc: Support chipsets that can write to llcc") Signed-off-by: Atul Dhudase Signed-off-by: Mukesh Ojha Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/1701876771-10695-1-git-send-email-quic_mojha@quicinc.com Signed-off-by: Bjorn Andersson commit b89b6a863dd53bc70d8e52d50f9cfaef8ef5e9c9 Author: Bhaumik Bhatt Date: Mon Dec 11 14:42:51 2023 +0800 bus: mhi: host: Add spinlock to protect WP access when queueing TREs Protect WP accesses such that multiple threads queueing buffers for incoming data do not race. Meanwhile, if CONFIG_TRACE_IRQFLAGS is enabled, irq will be enabled once __local_bh_enable_ip is called as part of write_unlock_bh. Hence, let's take irqsave lock after TRE is generated to avoid running write_unlock_bh when irqsave lock is held. Cc: stable@vger.kernel.org Fixes: 189ff97cca53 ("bus: mhi: core: Add support for data transfer") Signed-off-by: Bhaumik Bhatt Signed-off-by: Qiang Yu Reviewed-by: Jeffrey Hugo Tested-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1702276972-41296-2-git-send-email-quic_qianyu@quicinc.com Signed-off-by: Manivannan Sadhasivam commit 809ec4c5a5ab8ac080adbd9624d0040850725acc Author: Manivannan Sadhasivam Date: Wed Dec 6 19:25:40 2023 +0530 arm64: dts: qcom: sa8775p: Add missing space between node name and braces Add missing space between node name and braces to match the style. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231206135540.17068-4-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 052c9a1f1400f1b3fe9555bd029ee9a8a0db3cd0 Author: Manivannan Sadhasivam Date: Wed Dec 6 19:25:39 2023 +0530 arm64: dts: qcom: Use "pcie" as the node name instead of "pci" Qcom SoCs doesn't support the legacy PCI, but only PCIe. So use the correct node name for the controller instances. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231206135540.17068-3-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 07299ba2e7d98045e6b522f7c5b97f402b15bc82 Author: Manivannan Sadhasivam Date: Wed Dec 6 19:25:38 2023 +0530 ARM: dts: qcom: Use "pcie" as the node name instead of "pci" Qcom SoCs doesn't support the legacy PCI, but only PCIe. So use the correct node name for the controller instances. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231206135540.17068-2-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit fbfd1f55ad34be14e52b39a1b83ae1f0d29b890c Author: Andrew Halaney Date: Tue Dec 5 17:05:11 2023 -0600 soc: qcom: pmic_pdcharger_ulog: Fix hypothetical ulog request message endianess Sparse reports the following: % ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make C=2 W=1 drivers/soc/qcom/pmic_pdcharger_ulog.o ... CC drivers/soc/qcom/pmic_pdcharger_ulog.o CHECK drivers/soc/qcom/pmic_pdcharger_ulog.c drivers/soc/qcom/pmic_pdcharger_ulog.c:57:34: warning: incorrect type in initializer (different base types) drivers/soc/qcom/pmic_pdcharger_ulog.c:57:34: expected restricted __le32 [usertype] owner drivers/soc/qcom/pmic_pdcharger_ulog.c:57:34: got int drivers/soc/qcom/pmic_pdcharger_ulog.c:58:33: warning: incorrect type in initializer (different base types) drivers/soc/qcom/pmic_pdcharger_ulog.c:58:33: expected restricted __le32 [usertype] type drivers/soc/qcom/pmic_pdcharger_ulog.c:58:33: got int drivers/soc/qcom/pmic_pdcharger_ulog.c:59:35: warning: incorrect type in initializer (different base types) drivers/soc/qcom/pmic_pdcharger_ulog.c:59:35: expected restricted __le32 [usertype] opcode drivers/soc/qcom/pmic_pdcharger_ulog.c:59:35: got int Let's deal with endianness conversion in the rare case this ever runs on a big-endian machine (and to quiet down sparse for this file). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312060355.M0eJtq4X-lkp@intel.com/ Fixes: 086fdb48bc65 ("soc: qcom: add ADSP PDCharger ULOG driver") Signed-off-by: Andrew Halaney Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231205-pmicpdcharger-ulog-fixups-v1-3-71c95162cb84@redhat.com Signed-off-by: Bjorn Andersson commit a74ebfcd60c649f1bff7c369e432c322ae0a0d6a Author: Andrew Halaney Date: Tue Dec 5 17:05:10 2023 -0600 soc: qcom: pmic_pdcharger_ulog: Move TRACE_SYSTEM out of #if protection As specified in samples/trace_events/trace-events-sample.h: * Notice that TRACE_SYSTEM should be defined outside of #if * protection, just like TRACE_INCLUDE_FILE. Fixes: 086fdb48bc65 ("soc: qcom: add ADSP PDCharger ULOG driver") Signed-off-by: Andrew Halaney Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231205-pmicpdcharger-ulog-fixups-v1-2-71c95162cb84@redhat.com Signed-off-by: Bjorn Andersson commit 4d2b810f44f1c7b65d374b0128dabb15f1fd6c09 Author: Andrew Halaney Date: Tue Dec 5 17:05:09 2023 -0600 soc: qcom: pmic_pdcharger_ulog: Search current directory for headers As specified in samples/trace_events/Makefile: If you include a trace header outside of include/trace/events then the file that does the #define CREATE_TRACE_POINTS must have that tracer file in its main search path. This is because define_trace.h will include it, and must be able to find it from the include/trace directory. Without this the following compilation error is seen: CC drivers/soc/qcom/pmic_pdcharger_ulog.o In file included from drivers/soc/qcom/pmic_pdcharger_ulog.h:36, from drivers/soc/qcom/pmic_pdcharger_ulog.c:15: ./include/trace/define_trace.h:95:42: fatal error: ./pmic_pdcharger_ulog.h: No such file or directory 95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ^ compilation terminated. Fixes: 086fdb48bc65 ("soc: qcom: add ADSP PDCharger ULOG driver") Signed-off-by: Andrew Halaney Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231205-pmicpdcharger-ulog-fixups-v1-1-71c95162cb84@redhat.com Signed-off-by: Bjorn Andersson commit 4555798a21c973c66c8de91b58a2d0b4d0df4af3 Author: Nikita Travkin Date: Tue Dec 5 16:48:12 2023 +0500 arm64: dts: qcom: acer-aspire1: Add sound This laptop has two i2s speakers; an i2s audio codec for the headset jack; two DMIC microphones in the lid and the displayport audio channel. This commit adds the audio node that describes all of the above with the exception of the DMICs that require in-SoC digital codec to be brought up, which will be done later. Note that the displayport channel is connected here for completeness, but the displayport can't be used yet since the HPD signal is created by the embedded controller, which will be added later. Reviewed-by: Konrad Dybcio Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20231205-aspire1-sound-v2-3-443b7ac0a06f@trvn.ru Signed-off-by: Bjorn Andersson commit feec9f0add432a867f23e29afcd2f7088889b8e2 Author: Nikita Travkin Date: Tue Dec 5 16:48:11 2023 +0500 arm64: dts: qcom: acer-aspire1: Correct audio codec definition When initially added, a mistake was made in the definition of the codec. Despite the fact that the DMIC line is connected on the side of the codec chip, and relevant passive components, including 0-ohm resistors connecting the dmics, are present, the dmic line is still cut in another place on the board, which was overlooked. Correct this by replacing the dmic configuration with a comment describing this hardware detail. While at it, also add missing regulators definitions. This is not a functional change as all the relevant regulators were already added via the other rail supplies. Fixes: 4a9f8f8f2ada ("arm64: dts: qcom: Add Acer Aspire 1") Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20231205-aspire1-sound-v2-2-443b7ac0a06f@trvn.ru Signed-off-by: Bjorn Andersson commit 04fe8f0a68a346048f2432380a74a5e393d59a4c Author: Nikita Travkin Date: Tue Dec 5 16:48:10 2023 +0500 arm64: dts: qcom: acer-aspire1: Enable RTC pm6150 has a read-only RTC that can be used to keep the time with some extra userspace tools. Enable it. Reviewed-by: Konrad Dybcio Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20231205-aspire1-sound-v2-1-443b7ac0a06f@trvn.ru Signed-off-by: Bjorn Andersson commit cea0585caf068a068bddf2e985ad781c926e3cea Author: Naman Jain Date: Tue Dec 5 15:40:18 2023 +0530 soc: qcom: socinfo: Add few DSPs to get their image details Add support to get image details from SMEM for DSPs like DSPS (Sensors DSP), CDSP (Compute DSP), GPDSP (General purpose DSP) while also supporting this for more than one DSP of certain types. Signed-off-by: Naman Jain Link: https://lore.kernel.org/r/20231205101018.6079-1-quic_namajain@quicinc.com Signed-off-by: Bjorn Andersson commit fd4b634f9b9b3dc059cf1c0ff243711bb245c004 Author: Abel Vesa Date: Tue Dec 5 10:10:29 2023 +0200 soc: qcom: llcc: Add missing description for members in slice config Fix all warnings thrown due to missing description for some of the members in llcc_slice_config. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312050519.mup4Q8mD-lkp@intel.com/ Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20231205-llcc-fix-slice-config-warnings-v1-1-d6331d601dd3@linaro.org Signed-off-by: Bjorn Andersson commit 75390b69d5df49d828d0af278c7f27ed74e33064 Author: Dmitry Baryshkov Date: Tue Dec 5 06:25:52 2023 +0300 arm64: dts: qcom: sm8450: switch UFS QMP PHY to new style of bindings Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231205032552.1583336-10-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 002a13ed10136e4f59013adbf097b31d608caf67 Author: Dmitry Baryshkov Date: Tue Dec 5 06:25:51 2023 +0300 arm64: dts: qcom: sm8350: switch UFS QMP PHY to new style of bindings Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231205032552.1583336-9-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit ba865bdcc688932980b8e5ec2154eaa33cd4a981 Author: Dmitry Baryshkov Date: Tue Dec 5 06:25:50 2023 +0300 arm64: dts: qcom: sm8250: switch UFS QMP PHY to new style of bindings Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231205032552.1583336-8-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 935c76f7f85912962d72eceabdfa2c38c4c07f02 Author: Dmitry Baryshkov Date: Tue Dec 5 06:25:49 2023 +0300 arm64: dts: qcom: sm8150: switch UFS QMP PHY to new style of bindings Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231205032552.1583336-7-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 8e89beb32e1f81807c17af8eb07bd681b9ae229b Author: Dmitry Baryshkov Date: Tue Dec 5 06:25:48 2023 +0300 arm64: dts: qcom: sm6350: switch UFS QMP PHY to new style of bindings Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231205032552.1583336-6-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit f6874706e311a8743b678613b083e9bf0e1fd112 Author: Dmitry Baryshkov Date: Tue Dec 5 06:25:47 2023 +0300 arm64: dts: qcom: sm6115: switch UFS QMP PHY to new style of bindings Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231205032552.1583336-5-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 760baba5e79bae651c59df89d441fad2bd0be4a5 Author: Dmitry Baryshkov Date: Tue Dec 5 06:25:46 2023 +0300 arm64: dts: qcom: sdm845: switch UFS QMP PHY to new style of bindings Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231205032552.1583336-4-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 963ff488afe100c8ee9fb80933e342719c6fa63d Author: Dmitry Baryshkov Date: Tue Dec 5 06:25:45 2023 +0300 arm64: dts: qcom: msm8998: switch UFS QMP PHY to new style of bindings Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231205032552.1583336-3-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit f63ba6aa80f520678f35640b347e75c46bd49612 Author: Dmitry Baryshkov Date: Tue Dec 5 06:25:44 2023 +0300 arm64: dts: qcom: msm8996: switch UFS QMP PHY to new style of bindings Change the UFS QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231205032552.1583336-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 0f6f5a220543d1239dc7fc04c9f8f8885fa05637 Author: Konrad Dybcio Date: Mon Dec 4 13:55:25 2023 +0100 arm64: dts: qcom: sm8450-hdk: Enable the A730 GPU Enable the GPU and provide a path for the ZAP blob. Reviewed-by: Neil Armstrong Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231127-topic-a7xx_dt-v2-6-2a437588e563@linaro.org Signed-off-by: Bjorn Andersson commit e877f075a52c485742cfd170f5557fc49972979e Author: Konrad Dybcio Date: Mon Dec 4 13:55:24 2023 +0100 arm64: dts: qcom: sm8550-mtp: Enable the A740 GPU Enable the GPU and provide a path for the ZAP blob. Reviewed-by: Neil Armstrong Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231127-topic-a7xx_dt-v2-5-2a437588e563@linaro.org Signed-off-by: Bjorn Andersson commit c9f785d7d546c3f38c2e0308fa91e27ae7ec3fda Author: Konrad Dybcio Date: Mon Dec 4 13:55:23 2023 +0100 arm64: dts: qcom: sm8550-qrd: Enable the A740 GPU Enable the GPU and provide a path for the ZAP blob. Reviewed-by: Neil Armstrong Signed-off-by: Konrad Dybcio Tested-by: Neil Armstrong # on SM8550-QRD Link: https://lore.kernel.org/r/20231127-topic-a7xx_dt-v2-4-2a437588e563@linaro.org Signed-off-by: Bjorn Andersson commit ef19923ae103b527e6762a63024dc7f0b1055546 Author: Konrad Dybcio Date: Mon Dec 4 13:55:22 2023 +0100 arm64: dts: qcom: sm8550: Add GPU nodes Add the required nodes to support the A740 GPU. Signed-off-by: Konrad Dybcio Tested-by: Neil Armstrong # on SM8550-QRD Link: https://lore.kernel.org/r/20231127-topic-a7xx_dt-v2-3-2a437588e563@linaro.org Signed-off-by: Bjorn Andersson commit 9810647a043678638f3b98ab48ee030bc00c8270 Author: Konrad Dybcio Date: Mon Dec 4 13:55:21 2023 +0100 arm64: dts: qcom: sm8450: Add GPU nodes Add the required nodes to support the A730 GPU. Reviewed-by: Neil Armstrong Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231127-topic-a7xx_dt-v2-2-2a437588e563@linaro.org Signed-off-by: Bjorn Andersson commit 4bbda9421f316efdaef5dbf642e24925ef7de130 Author: Stephan Gerhold Date: Mon Dec 4 11:21:21 2023 +0100 arm64: dts: qcom: msm8939: Make blsp_dma controlled-remotely The blsp_dma controller is shared between the different subsystems, which is why it is already initialized by the firmware. We should not reinitialize it from Linux to avoid potential other users of the DMA engine to misbehave. In mainline this can be described using the "qcom,controlled-remotely" property. In the downstream/vendor kernel from Qualcomm there is an opposite "qcom,managed-locally" property. This property is *not* set for the qcom,sps-dma@7884000 [1] so adding "qcom,controlled-remotely" upstream matches the behavior of the downstream/vendor kernel. Adding this seems to fix some weird issues with UART where both input/output becomes garbled with certain obscure firmware versions on some devices. [1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blob/LA.BR.1.2.9.1-02310-8x16.0/arch/arm/boot/dts/qcom/msm8939-common.dtsi#L866-872 Cc: stable@vger.kernel.org # 6.5 Fixes: 61550c6c156c ("arm64: dts: qcom: Add msm8939 SoC") Signed-off-by: Stephan Gerhold Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20231204-msm8916-blsp-dma-remote-v1-2-3e49c8838c8d@gerhold.net Signed-off-by: Bjorn Andersson commit 7c45b6ddbcff01f9934d11802010cfeb0879e693 Author: Stephan Gerhold Date: Mon Dec 4 11:21:20 2023 +0100 arm64: dts: qcom: msm8916: Make blsp_dma controlled-remotely The blsp_dma controller is shared between the different subsystems, which is why it is already initialized by the firmware. We should not reinitialize it from Linux to avoid potential other users of the DMA engine to misbehave. In mainline this can be described using the "qcom,controlled-remotely" property. In the downstream/vendor kernel from Qualcomm there is an opposite "qcom,managed-locally" property. This property is *not* set for the qcom,sps-dma@7884000 [1] so adding "qcom,controlled-remotely" upstream matches the behavior of the downstream/vendor kernel. Adding this seems to fix some weird issues with UART where both input/output becomes garbled with certain obscure firmware versions on some devices. [1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blob/LA.BR.1.2.9.1-02310-8x16.0/arch/arm/boot/dts/qcom/msm8916.dtsi#L1466-1472 Cc: stable@vger.kernel.org # 6.5 Fixes: a0e5fb103150 ("arm64: dts: qcom: Add msm8916 BLSP device nodes") Signed-off-by: Stephan Gerhold Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20231204-msm8916-blsp-dma-remote-v1-1-3e49c8838c8d@gerhold.net Signed-off-by: Bjorn Andersson commit 12844ac08c593c2dd232b1b0d96ee21944dfb044 Author: Stephan Gerhold Date: Mon Dec 4 10:55:53 2023 +0100 arm64: dts: qcom: msm8939: Add clock-frequency for broadcast timer Looks like not all firmware versions used for MSM8939 program the timer frequency for both broadcast/MMIO timers, causing a WARNING at runtime: WARNING: CPU: 0 PID: 0 at kernel/time/clockevents.c:38 cev_delta2ns+0x74/0x90 pc : cev_delta2ns+0x74/0x90 lr : clockevents_config.part.0+0x64/0x8c Call trace: cev_delta2ns+0x74/0x90 clockevents_config_and_register+0x20/0x34 arch_timer_mem_of_init+0x374/0x534 timer_probe+0x88/0x110 time_init+0x14/0x4c start_kernel+0x2c0/0x640 Unfortunately there is no way to fix the firmware on most of these devices since it's proprietary and signed. As a workaround, specify the clock-frequency explicitly in the DT to fix the warning. Fixes: 61550c6c156c ("arm64: dts: qcom: Add msm8939 SoC") Reported-by: Vincent Knecht Signed-off-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231204-msm8939-timer-v1-1-a2486c625786@gerhold.net Signed-off-by: Bjorn Andersson commit cc1ec484f2d0f464ad11b56fe3de2589c23f73ec Author: Stephan Gerhold Date: Mon Dec 4 10:46:11 2023 +0100 arm64: dts: qcom: Add missing vio-supply for AW2013 Add the missing vio-supply to all usages of the AW2013 LED controller to ensure that the regulator needed for pull-up of the interrupt and I2C lines is really turned on. While this seems to have worked fine so far some of these regulators are not guaranteed to be always-on. For example, pm8916_l6 is typically turned off together with the display if there aren't any other devices (e.g. sensors) keeping it always-on. Cc: stable@vger.kernel.org # 6.6 Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231204-qcom-aw2013-vio-v1-1-5d264bb5c0b2@gerhold.net Signed-off-by: Bjorn Andersson commit 2e16f9dc9be07f08442d63d682cdf89d6321b408 Author: Chukun Pan Date: Sun Dec 3 23:40:03 2023 +0800 arm64: dts: qcom: ipq6018: Add QUP5 SPI node Add node to support the QUP5 SPI controller inside of IPQ6018. Some routers use this bus to connect SPI TPM chips. Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20231203154003.532765-1-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit e6c32770ef83f3e8cc057f3920b1c06aa9d1c9c2 Author: Chukun Pan Date: Sun Dec 3 23:39:14 2023 +0800 arm64: dts: qcom: ipq6018: Add remaining QUP UART node Add node to support all the QUP UART node controller inside of IPQ6018. Some routers use these bus to connect Bluetooth chips. Signed-off-by: Chukun Pan Link: https://lore.kernel.org/r/20231203153914.532654-1-amadeus@jmu.edu.cn Signed-off-by: Bjorn Andersson commit f6bda45310ff165fdd69b8c3eb6679f0552f8a5f Author: Satya Priya Kakitapalli Date: Fri Dec 1 15:20:27 2023 +0530 clk: qcom: videocc-sm8150: Add runtime PM support Add runtime PM support to ensure the supply rails are enabled when necessary. Signed-off-by: Satya Priya Kakitapalli Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231201-videocc-8150-v3-4-56bec3a5e443@quicinc.com Signed-off-by: Bjorn Andersson commit 71f130c9193f613d497f7245365ed05ffdb0a401 Author: Satya Priya Kakitapalli Date: Fri Dec 1 15:20:26 2023 +0530 clk: qcom: videocc-sm8150: Add missing PLL config property When the driver was ported upstream, PLL test_ctl_hi1 register value was omitted. Add it to ensure the PLLs are fully configured. Fixes: 5658e8cf1a8a ("clk: qcom: add video clock controller driver for SM8150") Signed-off-by: Satya Priya Kakitapalli Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231201-videocc-8150-v3-3-56bec3a5e443@quicinc.com Signed-off-by: Bjorn Andersson commit 1fd9a939db24d2f66e48f8bca3e3654add3fa205 Author: Satya Priya Kakitapalli Date: Fri Dec 1 15:20:25 2023 +0530 clk: qcom: videocc-sm8150: Update the videocc resets Add all the available resets for the video clock controller on sm8150. Fixes: 5658e8cf1a8a ("clk: qcom: add video clock controller driver for SM8150") Signed-off-by: Satya Priya Kakitapalli Reviewed-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231201-videocc-8150-v3-2-56bec3a5e443@quicinc.com Signed-off-by: Bjorn Andersson commit d00e87f0e2013a898ccb01bde71b1b6f0848a967 Merge: 874bc7be1e08b 3185f96968eed Author: Bjorn Andersson Date: Fri Dec 15 22:59:48 2023 -0600 Merge branch '20231201-videocc-8150-v3-1-56bec3a5e443@quicinc.com' into clk-for-6.8 Merge SM8150 Video clock controller through a topic branch, to allow constants to be made available in the DeviceTree branch as well. commit 3185f96968eedd117ec72ee7b87ead44b6d1bbbd Author: Satya Priya Kakitapalli Date: Fri Dec 1 15:20:24 2023 +0530 dt-bindings: clock: Update the videocc resets for sm8150 Add all the available resets for the video clock controller on sm8150. Signed-off-by: Satya Priya Kakitapalli Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231201-videocc-8150-v3-1-56bec3a5e443@quicinc.com Signed-off-by: Bjorn Andersson commit cdd97e07e5fa6babc8f620951efa517a1e29d6e2 Author: Tengfei Fan Date: Wed Nov 29 18:33:25 2023 +0800 arm64: defconfig: enable clock controller and pinctrl Enable global clock controller and pinctrl for support the Qualcomm SM4450 platform to boot to UART console. The serial engine depends on some global clock controller and pinctrl, but as the serial console driver is only available as built-in, so the global clock controller and pinctrl also needs be built-in for the UART device to probe and register the console. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20231129103325.24854-7-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit ff753723bf3916770c1e2580fe1f34ad9d6f0283 Author: Konrad Dybcio Date: Sat Nov 4 21:56:35 2023 +0100 arm64: dts: qcom: qrb4210-rb2: Enable MPSS and Wi-Fi Enable the remote processors and tighten up the regulators to enable Wi-Fi functionality on the RB2. For reference, the hw/sw identifies as: qmi chip_id 0x150 chip_family 0x4002 board_id 0xff soc_id 0x40670000 qmi fw_version 0x337302d3 fw_build_timestamp 2023-01-06 01:50 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.3.3.7.c2-00723-QCAHLSWMTPLZ-1 wcn3990 hw1.0 target 0x00000008 chip_id 0x00000000 sub 0000:0000 kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0 firmware ver api 5 features wowlan,mgmt-tx-by-reference,non-bmi crc32 b3d4b790 htt-ver 3.114 wmi-op 4 htt-op 3 cal file max-sta 32 raw 0 hwcrypto 1 Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231104-topic-rb2_wifi-v1-1-fd45ae535d2f@linaro.org Signed-off-by: Bjorn Andersson commit a7dc6343519752eb6d86bfa78378a8af5da1f475 Author: Konrad Dybcio Date: Thu Dec 14 13:25:15 2023 +0100 Revert "soc: qcom: stats: Add DDR sleep stats" After recent reports ([1], [2]) of older platforms (particularly 8150 and 7180) breaking after DDR sleep stats introduction, revert the following: Commit 73380e2573c3 ("soc: qcom: stats: fix 64-bit division") Commit e84e61bdb97c ("soc: qcom: stats: Add DDR sleep stats") The feature itself is rather useful for debugging DRAM power management, however it looks like the shared RPMh stats data structures differ on previous SoCs. Revert its addition for now to un-break booting on these earlier SoCs, while I try to come up with a better way to enable it conditionally. [1] https://lore.kernel.org/linux-arm-msm/20231209215601.3543895-2-dmitry.baryshkov@linaro.org/ [2] https://lore.kernel.org/linux-arm-msm/CAD=FV=XX4wLg1NNVL15RK4D4tLvuSzZyUv=k_tS4bSb3=7QJzQ@mail.gmail.com/ Reported-by: Dmitry Baryshkov Reported-by: Doug Anderson Signed-off-by: Konrad Dybcio Tested-by: Douglas Anderson Link: https://lore.kernel.org/r/20231214-topic-undo_ddr_stats-v1-1-1fe32c258e56@linaro.org Signed-off-by: Bjorn Andersson commit 98bdbf60cca858f4bc993895b738c6ae1bef42b8 Merge: 5bb4ad95c1c61 a5b91555403e3 Author: Chandan Babu R Date: Sat Dec 16 08:53:55 2023 +0530 Merge tag 'repair-quota-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeB xfs: online repair of quota and rt metadata files XFS stores quota records and free space bitmap information in files. Add the necessary infrastructure to enable repairing metadata inodes and their forks, and then make it so that we can repair the file metadata for the rtbitmap. Repairing the bitmap contents (and the summary file) is left for subsequent patchsets. We also add the ability to repair file metadata the quota files. As part of these repairs, we also reinitialize the ondisk dquot records as necessary to get the incore dquots working. We can also correct obviously bad dquot record attributes, but we leave checking the resource usage counts for the next patchsets. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'repair-quota-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: repair quotas xfs: improve dquot iteration for scrub xfs: check dquot resource timers xfs: check the ondisk space mapping behind a dquot commit 5bb4ad95c1c619e78cdbe8b31a2946b9204090ba Merge: 98e63b91cd431 ffd37b22bd2b7 Author: Chandan Babu R Date: Sat Dec 16 08:50:01 2023 +0530 Merge tag 'repair-rtbitmap-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeB xfs: online repair of rt bitmap file Add in the necessary infrastructure to check the inode and data forks of metadata files, then apply that to the realtime bitmap file. We won't be able to reconstruct the contents of the rtbitmap file until rmapbt is added for realtime volumes, but we can at least get the basics started. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'repair-rtbitmap-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: online repair of realtime bitmaps xfs: create a new inode fork block unmap helper xfs: repair the inode core and forks of a metadata inode xfs: always check the rtbitmap and rtsummary files xfs: check rt summary file geometry more thoroughly xfs: check rt bitmap file geometry more thoroughly commit 98e63b91cd4310aed82e8dac736db47938882bc7 Merge: 7b63ce86f9d4e dbbdbd0086320 Author: Chandan Babu R Date: Sat Dec 16 08:44:55 2023 +0530 Merge tag 'repair-file-mappings-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeB xfs: online repair of file fork mappings In this series, online repair gains the ability to rebuild data and attr fork mappings from the reverse mapping information. It is at this point where we reintroduce the ability to reap file extents. Repair of CoW forks is a little different -- on disk, CoW staging extents are owned by the refcount btree and cannot be mapped back to individual files. Hence we can only detect staging extents that don't quite look right (missing reverse mappings, shared staging extents) and replace them with fresh allocations. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'repair-file-mappings-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: repair problems in CoW forks xfs: create a ranged query function for refcount btrees xfs: refactor repair forcing tests into a repair.c helper xfs: repair inode fork block mapping data structures xfs: reintroduce reaping of file metadata blocks to xrep_reap_extents commit 7b63ce86f9d4ea16695890d8cbd9b76f6b03642f Merge: 6e1d7b894129b c3a22c2e4b45f Author: Chandan Babu R Date: Sat Dec 16 08:37:00 2023 +0530 Merge tag 'repair-inodes-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeB xfs: online repair of inodes and forks In this series, online repair gains the ability to repair inode records. To do this, we must repair the ondisk inode and fork information enough to pass the iget verifiers and hence make the inode igettable again. Once that's done, we can perform higher level repairs on the incore inode. The fstests counterpart of this patchset implements stress testing of repair. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'repair-inodes-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: skip the rmapbt search on an empty attr fork unless we know it was zapped xfs: abort directory parent scrub scans if we encounter a zapped directory xfs: zap broken inode forks xfs: repair inode records xfs: set inode sick state flags when we zap either ondisk fork xfs: dont cast to char * for XFS_DFORK_*PTR macros xfs: add missing nrext64 inode flag check to scrub xfs: try to attach dquots to files before repairing them xfs: disable online repair quota helpers when quota not enabled commit 6e1d7b894129be2b0f1cad6994638a88b6a51d0b Merge: 5e60ca3fada4f 9099cd38002f8 Author: Chandan Babu R Date: Sat Dec 16 08:32:05 2023 +0530 Merge tag 'repair-ag-btrees-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeB xfs: online repair of AG btrees Now that we've spent a lot of time reworking common code in online fsck, we're ready to start rebuilding the AG space btrees. This series implements repair functions for the free space, inode, and refcount btrees. Rebuilding the reverse mapping btree is much more intense and is left for a subsequent patchset. The fstests counterpart of this patchset implements stress testing of repair. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'repair-ag-btrees-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: repair refcount btrees xfs: repair inode btrees xfs: repair free space btrees xfs: remove trivial bnobt/inobt scrub helpers xfs: roll the scrub transaction after completing a repair xfs: move the per-AG datatype bitmaps to separate files xfs: create separate structures and code for u32 bitmaps commit 5e60ca3fada4f31ce2916102d7fd3807f764ad56 Merge: 0573676fdde7c e069d549705e4 Author: Chandan Babu R Date: Sat Dec 16 08:27:42 2023 +0530 Merge tag 'repair-prep-for-bulk-loading-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeB xfs: prepare repair for bulk loading Before we start merging the online repair functions, let's improve the bulk loading code a bit. First, we need to fix a misinteraction between the AIL and the btree bulkloader wherein the delwri at the end of the bulk load fails to queue a buffer for writeback if it happens to be on the AIL list. Second, we introduce a defer ops barrier object so that the process of reaping blocks after a repair cannot queue more than two extents per EFI log item. This increases our exposure to leaking blocks if the system goes down during a reap, but also should prevent transaction overflows, which result in the system going down. Third, we change the bulkloader itself to copy multiple records into a block if possible, and add some debugging knobs so that developers can control the slack factors, just like they can do for xfs_repair. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'repair-prep-for-bulk-loading-6.8_2023-12-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: constrain dirty buffers while formatting a staged btree xfs: move btree bulkload record initialization to ->get_record implementations xfs: add debug knobs to control btree bulk load slack factors xfs: read leaf blocks when computing keys for bulkloading into node blocks xfs: set XBF_DONE on newly formatted btree block that are ready for writing xfs: force all buffers to be written during btree bulk load commit 358105ab92fc588aee0f37402f5705b031dc6f6f Merge: 758a8d5b6a64a 207184853dbdb Author: Jakub Kicinski Date: Fri Dec 15 17:56:29 2023 -0800 Merge branch 'tcp-dccp-refine-source-port-selection' Eric Dumazet says: ==================== tcp/dccp: refine source port selection This patch series leverages IP_LOCAL_PORT_RANGE option to no longer favor even source port selection at connect() time. This should lower time taken by connect() for hosts having many active connections to the same destination. ==================== Link: https://lore.kernel.org/r/20231214192939.1962891-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 207184853dbdb62d8b02c7a141d3297e94e33451 Author: Eric Dumazet Date: Thu Dec 14 19:29:39 2023 +0000 tcp/dccp: change source port selection at connect() time In commit 1580ab63fc9a ("tcp/dccp: better use of ephemeral ports in connect()") we added an heuristic to select even ports for connect() and odd ports for bind(). This was nice because no applications changes were needed. But it added more costs when all even ports are in use, when there are few listeners and many active connections. Since then, IP_LOCAL_PORT_RANGE has been added to permit an application to partition ephemeral port range at will. This patch extends the idea so that if IP_LOCAL_PORT_RANGE is set on a socket before accept(), port selection no longer favors even ports. This means that connect() can find a suitable source port faster, and applications can use a different split between connect() and bind() users. This should give more entropy to Toeplitz hash used in RSS: Using even ports was wasting one bit from the 16bit sport. A similar change can be done in inet_csk_find_open_port() if needed. Signed-off-by: Eric Dumazet Cc: Jakub Sitnicki Reviewed-by: Kuniyuki Iwashima Reviewed-by: Jason Xing Link: https://lore.kernel.org/r/20231214192939.1962891-3-edumazet@google.com Signed-off-by: Jakub Kicinski commit 41db7626b73210cb99eea9cf672dcfce58c68ab2 Author: Eric Dumazet Date: Thu Dec 14 19:29:38 2023 +0000 inet: returns a bool from inet_sk_get_local_port_range() Change inet_sk_get_local_port_range() to return a boolean, telling the callers if the port range was provided by IP_LOCAL_PORT_RANGE socket option. Adds documentation while we are at it. Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/20231214192939.1962891-2-edumazet@google.com Signed-off-by: Jakub Kicinski commit f43c3a62e7d57e5da8d5f0c50d7254808af15920 Author: David Heidelberg Date: Sat Dec 16 00:07:35 2023 +0100 arm64: dts: freescale: fix the schema check errors for fsl,tmu-calibration fsl,tmu-calibration contains cell pairs (u32-matrix). Mark them as such. Use matching property syntax and allow correct validation. No functional changes. Signed-off-by: David Heidelberg Signed-off-by: Shawn Guo commit 47360e40dcb92c09f417ccbe956e646bd95a09b6 Author: Fabio Estevam Date: Fri Dec 15 09:18:45 2023 -0300 ARM: dts: imx27-phytec-phycore-som: Use 'rtc' as node name Node names should be generic. Use 'rtc' for the rtc node to fix the following dt-schema warning: imx27-phytec-phycore-rdk.dtb: pcf8563@51: $nodename:0: 'pcf8563@51' does not match '^rtc(@.*|-([0-9]|[1-9][0-9]+))?$' from schema $id: http://devicetree.org/schemas/rtc/nxp,pcf8563.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 480a9c4e7dfd56c2bcac7a5d415f16458f3f434e Author: Fabio Estevam Date: Fri Dec 15 09:14:33 2023 -0300 ARM: dts: imx25: Remove unneeded keypad properties Per imx-keypad.yaml, '#address-cells', '#size-cells', 'clock-names' are not valid properties. Remove them to fix the following dt-schema warning: imx25-pdk.dtb: kpp@43fa8000: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'clock-names' were unexpected) from schema $id: http://devicetree.org/schemas/input/imx-keypad.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 758a8d5b6a64ad63a8c0728f68dd3e21481013db Author: Rob Herring Date: Wed Dec 13 17:24:55 2023 -0600 dt-bindings: net: marvell,orion-mdio: Drop "reg" sizes schema Defining the size of register regions is not really in scope of what bindings need to cover. The schema for this is also not completely correct as a reg entry can be variable number of cells for the address and size, but the schema assumes 1 cell. Signed-off-by: Rob Herring Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231213232455.2248056-1-robh@kernel.org Signed-off-by: Jakub Kicinski commit c0d327443b718db0a4be0999b7a8bd49aa7c065f Author: Alexander Stein Date: Thu Dec 14 14:42:59 2023 +0100 arm64: dts: freescale: imx8qxp: Disable dsp reserved memory by default Even if the 'dsp' node is disabled the memory intended to be used by the DSP is reserved. This limits the memory range suitable for CMA allocation. Thus disable the dsp_reserved node. DSP users need to enable it in parallel to the 'dsp' node. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 6bcd8b2fa2a9826fb6a849a9bfd7bdef145cabb6 Author: Alexander Stein Date: Thu Dec 14 14:20:00 2023 +0100 arm64: dts: imx8qxp: Add VPU subsystem file imx8qxp re-uses imx8qm VPU subsystem file, but it has different base addresses. Also imx8qxp has only two VPU cores, delete vpu_vore2 and mu2_m0 accordingly. Signed-off-by: Alexander Stein Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 9ff5a14432179d566a0b4d7edca73d4fb4a7cd86 Author: Fabio Estevam Date: Thu Dec 14 06:16:53 2023 -0300 arm64: dts: imx8qxp-mek: Move port under USB connector Per nxp,ptn5110.yaml, 'port' should be placed under 'connector'. Do as requested to fix the following dt-schema warning: imx8qxp-mek.dtb: tcpc@50: connector:ports: 'port@0' is a required property from schema $id: http://devicetree.org/schemas/usb/nxp,ptn5110.yaml# imx8qxp-mek.dtb: tcpc@50: connector: Unevaluated properties are not allowed ('ports' was unexpected) from schema $id: http://devicetree.org/schemas/usb/nxp,ptn5110.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 33f1be2df81a2861c58115c95af5f3daee40f4d5 Author: Michael Trimarchi Date: Thu Dec 14 09:24:06 2023 +0100 arm64: dts: imx8mn-bsh-smm-s2/pro: add display setup Add the display and nodes required for its operation. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Signed-off-by: Shawn Guo commit a5eee68931fcc6ecabd35651fed0c31439078e67 Author: Uwe Kleine-König Date: Mon Dec 4 10:47:42 2023 +0100 PCI: kirin: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/linux-pci/c3a51791d54deaa818b8526975fc4e16ef1090ce.1701682617.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Krzysztof Wilczyński commit 93d61d3aa996ede34226055a2525c0c2e28258db Author: Uwe Kleine-König Date: Mon Dec 4 10:47:41 2023 +0100 PCI: keystone: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/linux-pci/06612aff79dfb52d5b0b20129dff5e4b1f04d3a7.1701682617.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Krzysztof Wilczyński commit 4fbd8b788258bb636b007f5baf440262cbff1a00 Author: Uwe Kleine-König Date: Mon Dec 4 10:47:40 2023 +0100 PCI: exynos: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/linux-pci/50de44ea8931465fd9cdc821854ea761cb43adf6.1701682617.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Krzysztof Wilczyński commit 42d45c45624a098a9fdc477c7a8b86167f948c77 Author: Alexei Starovoitov Date: Fri Dec 15 16:28:25 2023 -0800 selftests/bpf: Temporarily disable dummy_struct_ops test on s390 Temporarily disable dummy_struct_ops test on s390. The breakage is likely due to commit 2cd3e3772e41 ("x86/cfi,bpf: Fix bpf_struct_ops CFI"). Signed-off-by: Alexei Starovoitov commit 3c302e14bd9d7698ea24885a7eee2b44c1a014be Merge: 1467affd16b23 852486b35f344 Author: Alexei Starovoitov Date: Fri Dec 15 11:24:51 2023 -0800 Merge branch 'x86-cfi-bpf-fix-cfi-vs-ebpf' Peter Zijlstra says: ==================== x86/cfi,bpf: Fix CFI vs eBPF Hi! What started with the simple observation that bpf_dispatcher_*_func() was broken for calling CFI functions with a __nocfi calling context for FineIBT ended up with a complete BPF wide CFI fixup. With these changes on the BPF selftest suite passes without crashing -- there's still a few failures, but Alexei has graciously offered to look into those. (Alexei, I have presumed your SoB on the very last patch, please update as you see fit) Changes since v2 are numerous but include: - cfi_get_offset() -- as a means to communicate the offset (ast) - 5 new patches fixing various BPF internals to be CFI clean Note: it *might* be possible to merge the bpf_bpf_tcp_ca.c:unsupported_ops[] thing into the CFI stubs, as is get_info will have a NULL stub, unlike the others. --- arch/riscv/include/asm/cfi.h | 3 +- arch/riscv/kernel/cfi.c | 2 +- arch/x86/include/asm/cfi.h | 126 +++++++++++++++++++++++++++++++++++++- arch/x86/kernel/alternative.c | 87 +++++++++++++++++++++++--- arch/x86/kernel/cfi.c | 4 +- arch/x86/net/bpf_jit_comp.c | 134 +++++++++++++++++++++++++++++++++++------ include/asm-generic/Kbuild | 1 + include/linux/bpf.h | 27 ++++++++- include/linux/cfi.h | 12 ++++ kernel/bpf/bpf_struct_ops.c | 16 ++--- kernel/bpf/core.c | 25 ++++++++ kernel/bpf/cpumask.c | 8 ++- kernel/bpf/helpers.c | 18 +++++- net/bpf/bpf_dummy_struct_ops.c | 31 +++++++++- net/bpf/test_run.c | 15 ++++- net/ipv4/bpf_tcp_ca.c | 69 +++++++++++++++++++++ 16 files changed, 528 insertions(+), 50 deletions(-) ==================== Link: https://lore.kernel.org/r/20231215091216.135791411@infradead.org Signed-off-by: Alexei Starovoitov commit 852486b35f344887786d63250946dd921a05d7e8 Author: Alexei Starovoitov Date: Fri Dec 15 10:12:23 2023 +0100 x86/cfi,bpf: Fix bpf_exception_cb() signature As per the earlier patches, BPF sub-programs have bpf_callback_t signature and CFI expects callers to have matching signature. This is violated by bpf_prog_aux::bpf_exception_cb(). [peterz: Changelog] Reported-by: Peter Zijlstra Signed-off-by: Alexei Starovoitov Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/CAADnVQ+Z7UcXXBBhMubhcMM=R-dExk-uHtfOLtoLxQ1XxEpqEA@mail.gmail.com Link: https://lore.kernel.org/r/20231215092707.910319166@infradead.org Signed-off-by: Alexei Starovoitov commit e4c00339891c074c76f626ac82981963cbba5332 Author: Peter Zijlstra Date: Fri Dec 15 10:12:22 2023 +0100 bpf: Fix dtor CFI Ensure the various dtor functions match their prototype and retain their CFI signatures, since they don't have their address taken, they are prone to not getting CFI, making them impossible to call indirectly. Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231215092707.799451071@infradead.org Signed-off-by: Alexei Starovoitov commit e9d13b9d2f99ccf7afeab490d97eaa5ac9846598 Author: Peter Zijlstra Date: Fri Dec 15 10:12:21 2023 +0100 cfi: Add CFI_NOSEAL() Add a CFI_NOSEAL() helper to mark functions that need to retain their CFI information, despite not otherwise leaking their address. Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231215092707.669401084@infradead.org Signed-off-by: Alexei Starovoitov commit 2cd3e3772e41377f32d6eea643e0590774e9187c Author: Peter Zijlstra Date: Fri Dec 15 10:12:20 2023 +0100 x86/cfi,bpf: Fix bpf_struct_ops CFI BPF struct_ops uses __arch_prepare_bpf_trampoline() to write trampolines for indirect function calls. These tramplines much have matching CFI. In order to obtain the correct CFI hash for the various methods, add a matching structure that contains stub functions, the compiler will generate correct CFI which we can pilfer for the trampolines. Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231215092707.566977112@infradead.org Signed-off-by: Alexei Starovoitov commit e72d88d18df4e03c80e64c2535f70c64f1dc6fc1 Author: Peter Zijlstra Date: Fri Dec 15 10:12:19 2023 +0100 x86/cfi,bpf: Fix bpf_callback_t CFI Where the main BPF program is expected to match bpf_func_t, sub-programs are expected to match bpf_callback_t. This fixes things like: tools/testing/selftests/bpf/progs/bloom_filter_bench.c: bpf_for_each_map_elem(&array_map, bloom_callback, &data, 0); Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231215092707.451956710@infradead.org Signed-off-by: Alexei Starovoitov commit 4f9087f16651aca4a5f32da840a53f6660f0579a Author: Peter Zijlstra Date: Fri Dec 15 10:12:18 2023 +0100 x86/cfi,bpf: Fix BPF JIT call The current BPF call convention is __nocfi, except when it calls !JIT things, then it calls regular C functions. It so happens that with FineIBT the __nocfi and C calling conventions are incompatible. Specifically __nocfi will call at func+0, while FineIBT will have endbr-poison there, which is not a valid indirect target. Causing #CP. Notably this only triggers on IBT enabled hardware, which is probably why this hasn't been reported (also, most people will have JIT on anyway). Implement proper CFI prologues for the BPF JIT codegen and drop __nocfi for x86. Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231215092707.345270396@infradead.org Signed-off-by: Alexei Starovoitov commit 4382159696c9af67ee047ed55f2dbf05480f52f6 Author: Peter Zijlstra Date: Fri Dec 15 10:12:17 2023 +0100 cfi: Flip headers Normal include order is that linux/foo.h should include asm/foo.h, CFI has it the wrong way around. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Sami Tolvanen Link: https://lore.kernel.org/r/20231215092707.231038174@infradead.org Signed-off-by: Alexei Starovoitov commit edd6ae1022a659b47586b64fa93c615ee14efd94 Author: Conor Dooley Date: Mon Sep 18 11:22:47 2023 +0100 PCI: dwc: Convert SOC_SIFIVE to ARCH_SIFIVE As part of converting RISC-V SOC_FOO symbols to ARCH_FOO to match the use of such symbols on other architectures, convert the SiFive PCI drivers to use the newer symbol. Link: https://lore.kernel.org/linux-pci/20230918-safeness-cornflake-62278bc3aaaa@wendy Signed-off-by: Conor Dooley Signed-off-by: Krzysztof Wilczyński commit 41f757713ac38ae2f63bc02d5653aac254c5bdbf Author: Neil Armstrong Date: Tue Nov 28 09:43:53 2023 +0100 dt-bindings: PCI: qcom: Document the SM8650 PCIe Controller Document the PCIe Controller on the SM8650 platform by using the SM8550 bindings as a fallback. Link: https://lore.kernel.org/linux-pci/20231128-topic-sm8650-upstream-bindings-pcie-v2-1-b72e2d13bcf1@linaro.org Signed-off-by: Neil Armstrong Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Acked-by: Rob Herring commit 639f666cf84e9192ef2ca0b5d638a258062513b7 Author: Heiko Stuebner Date: Wed Dec 6 15:50:41 2023 +0100 dt-bindings: PCI: dwc: rockchip: Document optional PCIe reference clock input On some boards the 100MHz PCIe reference clock to both controller and devices is controllable. Add that clock to the list of clocks. The clock is optional, so the minItems stays the same. Link: https://lore.kernel.org/linux-pci/20231206145041.667900-1-heiko@sntech.de Signed-off-by: Heiko Stuebner Signed-off-by: Krzysztof Wilczyński Acked-by: Krzysztof Kozlowski commit 3b74713a0321de5e4b1507990ef87049f8c887d8 Author: Krzysztof Kozlowski Date: Sat Nov 11 15:20:06 2023 +0100 dt-bindings: PCI: qcom: Correct reset-names property There is no "resets-names" property, but "reset-names". Fixes: 075a9d55932e ("dt-bindings: PCI: qcom: Convert to YAML") Link: https://lore.kernel.org/linux-pci/20231111142006.51883-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Acked-by: Conor Dooley commit a711253d5f706dfc018a4a193ef401b7e8cf1d93 Author: Krzysztof Kozlowski Date: Fri Dec 8 11:51:54 2023 +0100 dt-bindings: PCI: qcom: Correct clocks for SM8150 PCI node in Qualcomm SM8150 should have exactly 8 clocks, including the ref clock. Suggested-by: Manivannan Sadhasivam Link: https://lore.kernel.org/linux-pci/20231208105155.36097-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Wilczyński Acked-by: Rob Herring commit f2ab5a2455d95e50ebbd835c92ddb2a632b2d301 Author: Krzysztof Kozlowski Date: Fri Dec 8 11:51:53 2023 +0100 dt-bindings: PCI: qcom: Correct clocks for SC8180x PCI node in Qualcomm SC8180x DTS has 8 clocks: sc8180x-primus.dtb: pci@1c00000: 'oneOf' conditional failed, one must be fixed: ['pipe', 'aux', 'cfg', 'bus_master', 'bus_slave', 'slave_q2a', 'ref', 'tbu'] is too short Link: https://lore.kernel.org/linux-pci/20231208105155.36097-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Wilczyński Acked-by: Rob Herring commit 4791c44c0a982051713458cf4e66855e9f092713 Author: Krzysztof Kozlowski Date: Fri Dec 8 11:51:52 2023 +0100 dt-bindings: PCI: qcom: Adjust iommu-map for different SoC The PCIe controller on SDX55 has five entries in its iommu-map, MSM8998 has one and SDM845 has sixteen, so allow wider number of items to fix dtbs_check warnings like: qcom-sdx55-mtp.dtb: pcie@1c00000: iommu-map: [[0, 21, 512, 1], [256, 21, 513, 1], [512, 21, 514, 1], [768, 21, 515, 1], [1024, 21, 516, 1]] is too long Link: https://lore.kernel.org/linux-pci/20231208105155.36097-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Krzysztof Wilczyński Reviewed-by: Manivannan Sadhasivam Acked-by: Conor Dooley commit 95140c2fbfdf3b6ca98578e5bdbc82d9922f08b9 Author: Bjorn Helgaas Date: Wed Nov 22 10:34:07 2023 -0600 PCI: Log bridge info when first enumerating bridge Log bridge secondary/subordinate bus and window information at the same time we log the bridge BARs, just after discovering the bridge and before scanning the bridge's secondary bus. This logs the bridge and downstream devices in a more logical order: - pci 0000:00:01.0: [8086:1901] type 01 class 0x060400 - pci 0000:01:00.0: [10de:13b6] type 00 class 0x030200 - pci 0000:01:00.0: reg 0x10: [mem 0xec000000-0xecffffff] - pci 0000:00:01.0: PCI bridge to [bus 01] - pci 0000:00:01.0: bridge window [io 0xe000-0xefff] + pci 0000:00:01.0: [8086:1901] type 01 class 0x060400 + pci 0000:00:01.0: PCI bridge to [bus 01] + pci 0000:00:01.0: bridge window [io 0xe000-0xefff] + pci 0000:01:00.0: [10de:13b6] type 00 class 0x030200 + pci 0000:01:00.0: reg 0x10: [mem 0xec000000-0xecffffff] Note that we read the windows into a temporary struct resource that is thrown away, not into the resources in the struct pci_bus. The windows may be adjusted after we know what downstream devices require, and those adjustments are logged as they are made. Signed-off-by: Bjorn Helgaas commit 63c6ebb294b7c708cc987d621e59499686650683 Author: Bjorn Helgaas Date: Mon Dec 4 17:53:32 2023 -0600 PCI: Log bridge windows conditionally Previously pci_read_bridge_io(), pci_read_bridge_mmio(), and pci_read_bridge_mmio_pref() unconditionally logged the bridge window resource. A future change will call these functions earlier and more often. Add a "log" parameter so callers can control whether to generate the log message. No functional change intended. Signed-off-by: Bjorn Helgaas commit 281e1f137a97dae4fe47a7d30635c5b83def790b Author: Bjorn Helgaas Date: Wed Nov 22 10:13:03 2023 -0600 PCI: Supply bridge device, not secondary bus, to read window details Previously we logged information about devices *below* the bridge before logging information about the bridge itself, e.g., pci 0000:00:01.0: [8086:1901] type 01 class 0x060400 pci 0000:01:00.0: [10de:13b6] type 00 class 0x030200 pci 0000:01:00.0: reg 0x10: [mem 0xec000000-0xecffffff] pci 0000:00:01.0: PCI bridge to [bus 01] pci 0000:00:01.0: bridge window [io 0xe000-0xefff] This is partly because the bridge windows are read in this path: pci_scan_child_bus_extend for (devfn = 0; devfn < 256; devfn += 8) pci_scan_slot(bus, devfn) # scan below bridge pcibios_fixup_bus(bus) pci_read_bridge_bases(bus) # read bridge windows pci_read_bridge_io(bus) Remove the assumption that the secondary (child) pci_bus already exists by passing in the bridge device (instead of the pci_bus) and a resource pointer when reading bridge windows. A future change can use this to log the bridge details before we enumerate the devices below the bridge. No functional change intended. Signed-off-by: Bjorn Helgaas commit 6f32099a91720b6d91da961858d48173f01a729d Author: Bjorn Helgaas Date: Mon Dec 4 17:39:15 2023 -0600 PCI: Move pci_read_bridge_windows() below individual window accessors Move pci_read_bridge_windows() below the functions that read the I/O, memory, and prefetchable memory windows, so pci_read_bridge_windows() can use them in the future. No functional change intended. Signed-off-by: Bjorn Helgaas commit dc4e6f21c3f844ebc1c52b6920b8ec5dfc73f4e8 Author: Puranjay Mohan Date: Sat Nov 6 16:56:06 2021 +0530 PCI: Use resource names in PCI log messages Use the pci_resource_name() to get the name of the resource and use it while printing log messages. [bhelgaas: rename to match struct resource * names, also use names in other BAR messages] Link: https://lore.kernel.org/r/20211106112606.192563-3-puranjay12@gmail.com Signed-off-by: Puranjay Mohan Signed-off-by: Bjorn Helgaas commit 65f8e0beac5a495b8f3b387add1f9f4470678cb5 Author: Puranjay Mohan Date: Sat Nov 6 16:56:05 2021 +0530 PCI: Update BAR # and window messages The PCI log messages print the register offsets at some places and BAR numbers at other places. There is no uniformity in this logging mechanism. It would be better to print names than register offsets. Add a helper function that aids in printing more meaningful information about the BAR numbers like "VF BAR", "ROM", "bridge window", etc. This function can be called while printing PCI log messages. [bhelgaas: fold in Lukas' static array suggestion from https://lore.kernel.org/all/20211106115831.GA7452@wunner.de/] Link: https://lore.kernel.org/r/20211106112606.192563-2-puranjay12@gmail.com Signed-off-by: Puranjay Mohan Signed-off-by: Bjorn Helgaas commit 35259ff188e028b8fee8f1e973d0a7466df76d13 Author: Bjorn Helgaas Date: Fri Nov 10 15:43:15 2023 -0600 PCI: Log device type during enumeration Log the device type when enumeration a device. Sample output changes: - pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 + pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 conventional PCI endpoint - pci 0000:00:1c.0: [8086:a110] type 01 class 0x060400 + pci 0000:00:1c.0: [8086:a110] type 01 class 0x060400 PCIe Root Port Signed-off-by: Bjorn Helgaas commit ca294b34aaf3a417fe9069b174e52508ac918ec8 Author: Li Nan Date: Fri Dec 15 10:38:52 2023 +0800 md/raid1: support read error check After commit 1e50915fe0bb ("raid: improve MD/raid10 handling of correctable read errors."), rdev will be set to faulty if it reads data error to many times in raid10. Add this mechanism to raid1 now. Signed-off-by: Li Nan Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231215023852.3478228-3-linan666@huaweicloud.com commit 1979dbbe328ca4e1d0f061c94381cfa03388088d Author: Li Nan Date: Fri Dec 15 10:38:51 2023 +0800 md: factor out a helper exceed_read_errors() to check read_errors Move check_decay_read_errors() to raid1-10.c and factor out a helper exceed_read_errors() to check if read_errors exceeds the limit, so that raid1 can also use it. There are no functional changes. Signed-off-by: Li Nan Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231215023852.3478228-2-linan666@huaweicloud.com commit dc1cc22ed58f11d58d8553c5ec5f11cbfc3e3039 Author: Alex Lyakas Date: Wed Dec 13 14:24:31 2023 +0200 md: Whenassemble the array, consult the superblock of the freshest device Upon assembling the array, both kernel and mdadm allow the devices to have event counter difference of 1, and still consider them as up-to-date. However, a device whose event count is behind by 1, may in fact not be up-to-date, and array resync with such a device may cause data corruption. To avoid this, consult the superblock of the freshest device about the status of a device, whose event counter is behind by 1. Signed-off-by: Alex Lyakas Signed-off-by: Song Liu Link: https://lore.kernel.org/r/1702470271-16073-1-git-send-email-alex.lyakas@zadara.com commit 86d7d57a3f096c8349b32a0cd5f6f314e4416a6d Author: Zhiguo Niu Date: Tue Dec 12 10:15:27 2023 +0800 f2fs: fix to check return value of f2fs_recover_xattr_data Should check return value of f2fs_recover_xattr_data in __f2fs_setxattr rather than doing invalid retry if error happen. Also just do set_page_dirty in f2fs_recover_xattr_data when page is changed really. Fixes: 50a472bbc79f ("f2fs: do not return EFSCORRUPTED, but try to run online repair") Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e94dfb7a2935cb91faca88bf7136177d1ce0dda8 Author: Johannes Thumshirn Date: Wed Dec 13 06:43:08 2023 -0800 btrfs: pass btrfs_io_geometry into btrfs_max_io_len Instead of passing three individual members of 'struct btrfs_io_geometry' into btrfs_max_io_len(), pass a pointer to btrfs_io_geometry. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6edf68223679be380e567e664f97043871133537 Author: Johannes Thumshirn Date: Wed Dec 13 06:43:07 2023 -0800 btrfs: pass struct btrfs_io_geometry to set_io_stripe Instead of passing three members of 'struct btrfs_io_geometry' into set_io_stripe() pass a pointer to the whole structure and then get the needed members out of btrfs_io_geometry. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 89f547c6cc61baa77bb226c0a5284f56871d6080 Author: Johannes Thumshirn Date: Wed Dec 13 06:43:06 2023 -0800 btrfs: open code set_io_stripe for RAID56 Open code set_io_stripe() for RAID56, as it a) uses a different method to calculate the stripe_index b) doesn't need to go through raid-stripe-tree mapping code. Reviewed-by: Christoph Hellwig Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit b55b307785ad88298914bc5c18c7d37bc5b88cb7 Author: Johannes Thumshirn Date: Wed Dec 13 06:43:05 2023 -0800 btrfs: change block mapping to switch/case in btrfs_map_block Now that all the per-profile if/else statement blocks have been converted to calls to helper the conversion to switch/case is straightforward. Reviewed-by: Christoph Hellwig Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit a16fb8c6f61863f18fab61eeba10a457ff6d71d2 Author: Johannes Thumshirn Date: Wed Dec 13 06:43:04 2023 -0800 btrfs: factor out block mapping for single profiles Now that we have a container for the I/O geometry that has all the needed information for the block mappings of SINGLE profiles, factor out a helper calculating this information. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 089221d3457b8756d6823be9857884d938af817c Author: Johannes Thumshirn Date: Wed Dec 13 06:43:03 2023 -0800 btrfs: factor out block mapping for RAID5/6 Now that we have a container for the I/O geometry that has all the needed information for the block mappings of RAID5 and RAID6, factor out a helper calculating this information. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit d9d4ce9f297febc1463872475e4d1f6a97deb357 Author: Johannes Thumshirn Date: Wed Dec 13 06:43:02 2023 -0800 btrfs: reduce scope of data_stripes in btrfs_map_block Reduce the scope of 'data_stripes' in btrfs_map_block(). While the change alone may not make too much sense, it helps us factoring out a helper function for the block mapping of RAID56 I/O. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8938f112b9c41aaf66f652fc18aa424d2990e15c Author: Johannes Thumshirn Date: Wed Dec 13 06:43:01 2023 -0800 btrfs: factor out block mapping for RAID10 Now that we have a container for the I/O geometry that has all the needed information for the block mappings of RAID10, factor out a helper calculating this information. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5aeb15c8ca0d0cbd30e21391d2c7e25554f1e65e Author: Johannes Thumshirn Date: Wed Dec 13 06:43:00 2023 -0800 btrfs: factor out block mapping for DUP profiles Now that we have a container for the I/O geometry that has all the needed information for the block mappings of DUP, factor out a helper calculating this information. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5e36aba8377b78b4ec8e15d29a1dee0d626d735d Author: Johannes Thumshirn Date: Wed Dec 13 06:42:59 2023 -0800 btrfs: factor out RAID1 block mapping Now that we have a container for the I/O geometry that has all the needed information for the block mappings of RAID1, factor out a helper calculating this information. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 30e8534b538e8e7372e49516a8cddacdfd80f863 Author: Johannes Thumshirn Date: Wed Dec 13 06:42:58 2023 -0800 btrfs: factor out block-mapping for RAID0 Now that we have a container for the I/O geometry that has all the needed information for the block mappings of RAID0, factor out a helper calculating this information. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit fd747f2d5f9bdf16b65326be9742338c770ba35f Author: Johannes Thumshirn Date: Wed Dec 13 06:42:57 2023 -0800 btrfs: re-introduce struct btrfs_io_geometry Re-introduce struct btrfs_io_geometry, holding the necessary bits and pieces needed in btrfs_map_block() to decide the I/O geometry of a specific block mapping. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 02d05b6416b1f09a877c71c2761b45d1548d8856 Author: Johannes Thumshirn Date: Wed Dec 13 06:42:56 2023 -0800 btrfs: factor out helper for single device IO check The check in btrfs_map_block() deciding if a particular I/O is targeting a single device is getting more and more convoluted. Factor out the check conditions into a helper function, with no functional change otherwise. Reviewed-by: Christoph Hellwig Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 96c36eaa7730081e5c946819e4dfad0f432c70f7 Author: Qu Wenruo Date: Tue Dec 12 15:54:10 2023 +1030 btrfs: migrate btrfs_repair_io_failure() to folio interfaces [BUG] Test case btrfs/124 failed if larger metadata folio is enabled, the dying message looks like this: BTRFS error (device dm-2): bad tree block start, mirror 2 want 31686656 have 0 BTRFS info (device dm-2): read error corrected: ino 0 off 31686656 (dev /dev/mapper/test-scratch2 sector 20928) BUG: kernel NULL pointer dereference, address: 0000000000000020 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page CPU: 6 PID: 350881 Comm: btrfs Tainted: G OE 6.7.0-rc3-custom+ #128 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 2/2/2022 RIP: 0010:btrfs_read_extent_buffer+0x106/0x180 [btrfs] PKRU: 55555554 Call Trace: read_tree_block+0x33/0xb0 [btrfs] read_block_for_search+0x23e/0x340 [btrfs] btrfs_search_slot+0x2f9/0xe60 [btrfs] btrfs_lookup_csum+0x75/0x160 [btrfs] btrfs_lookup_bio_sums+0x21a/0x560 [btrfs] btrfs_submit_chunk+0x152/0x680 [btrfs] btrfs_submit_bio+0x1c/0x50 [btrfs] submit_one_bio+0x40/0x80 [btrfs] submit_extent_page+0x158/0x390 [btrfs] btrfs_do_readpage+0x330/0x740 [btrfs] extent_readahead+0x38d/0x6c0 [btrfs] read_pages+0x94/0x2c0 page_cache_ra_unbounded+0x12d/0x190 relocate_file_extent_cluster+0x7c1/0x9d0 [btrfs] relocate_block_group+0x2d3/0x560 [btrfs] btrfs_relocate_block_group+0x2c7/0x4b0 [btrfs] btrfs_relocate_chunk+0x4c/0x1a0 [btrfs] btrfs_balance+0x925/0x13c0 [btrfs] btrfs_ioctl+0x19f1/0x25d0 [btrfs] __x64_sys_ioctl+0x90/0xd0 do_syscall_64+0x3f/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 [CAUSE] The dying line is at btrfs_repair_io_failure() call inside btrfs_repair_eb_io_failure(). The function is still relying on the extent buffer using page sized folios. When the extent buffer is using larger folio, we go into the 2nd slot of folios[], and triggered the NULL pointer dereference. [FIX] Migrate btrfs_repair_io_failure() to folio interfaces. So that when we hit a larger folio, we just submit the whole folio in one go. This also affects data repair path through btrfs_end_repair_bio(), thankfully data is still fully page based, we can just add an ASSERT(), and use page_folio() to convert the page to folio. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit f4521b01c5246b921debc6db6f112f89f94cc61b Author: Qu Wenruo Date: Tue Dec 12 15:54:09 2023 +1030 btrfs: migrate eb_bitmap_offset() to folio interfaces [BUG] Test case btrfs/002 would fail if larger folios are enabled for metadata: assertion failed: folio, in fs/btrfs/extent_io.c:4358 ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent_io.c:4358! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 1 PID: 30916 Comm: fsstress Tainted: G OE 6.7.0-rc3-custom+ #128 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 2/2/2022 RIP: 0010:assert_eb_folio_uptodate+0x98/0xe0 [btrfs] Call Trace: extent_buffer_test_bit+0x3c/0x70 [btrfs] free_space_test_bit+0xcd/0x140 [btrfs] modify_free_space_bitmap+0x27a/0x430 [btrfs] add_to_free_space_tree+0x8d/0x160 [btrfs] __btrfs_free_extent.isra.0+0xef1/0x13c0 [btrfs] __btrfs_run_delayed_refs+0x786/0x13c0 [btrfs] btrfs_run_delayed_refs+0x33/0x120 [btrfs] btrfs_commit_transaction+0xa2/0x1350 [btrfs] iterate_supers+0x77/0xe0 ksys_sync+0x60/0xa0 __do_sys_sync+0xa/0x20 do_syscall_64+0x3f/0xf0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 [CAUSE] The function extent_buffer_test_bit() is not folio compatible. It still assumes the old fixed page size, when an extent buffer with large folio passed in, only eb->folios[0] is populated. Then if the target bit range falls in the 2nd page of the folio, then we would check eb->folios[1], and trigger the ASSERT(). [FIX] Just migrate eb_bitmap_offset() to folio interfaces, using the folio_size() to replace PAGE_SIZE. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit a700ca5ec4ee9c2feb6e56469ce808f9769dc9f3 Author: Qu Wenruo Date: Tue Dec 12 12:58:38 2023 +1030 btrfs: migrate various end io functions to folios If we still go the old page based iterator functions, like bio_for_each_segment_all(), we can hit middle pages of a folio (compound page). In that case if we set any page flag on those middle pages, we can easily trigger VM_BUG_ON(), as for compound page flags, they should follow their flag policies (normally only set on leading or tail pages). To avoid such problem in the future full folio migration, here we do: - Change from bio_for_each_segment_all() to bio_for_each_folio_all() This completely removes the ability to access the middle page. - Add extra ASSERT()s for data read/write paths To ensure we only get single paged folio for data now. - Rename those end io functions to follow a certain schema * end_bbio_compressed_read() * end_bbio_compressed_write() These two endio functions don't set any page flags, as they use pages not mapped to any address space. They can be very good candidates for higher order folio testing. And they are shared between compression and encoded IO. * end_bbio_data_read() * end_bbio_data_write() * end_bbio_meta_read() * end_bbio_meta_write() The old function names are not unified: - end_bio_extent_writepage() - end_bio_extent_readpage() - extent_buffer_write_end_io() - extent_buffer_read_end_io() They share no schema on where the "end_*io" string should be, nor can be confusing just using "extent_buffer" and "extent" to distinguish data and metadata paths. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 55151ea9ec1b40170dad5766c2d7f36105be42cd Author: Qu Wenruo Date: Tue Dec 12 12:58:37 2023 +1030 btrfs: migrate subpage code to folio interfaces Although subpage itself is conflicting with higher folio, since subpage (sectorsize < PAGE_SIZE and nodesize < PAGE_SIZE) means we will never need higher order folio, there is a hidden pitfall: - btrfs_page_*() helpers Those helpers are an abstraction to handle both subpage and non-subpage cases, which means we're going to pass pages pointers to those helpers. And since those helpers are shared between data and metadata paths, it's unavoidable to let them to handle folios, including higher order folios). Meanwhile for true subpage case, we should only have a single page backed folios anyway, thus add a new ASSERT() for btrfs_subpage_assert() to ensure that. Also since those helpers are shared between both data and metadata, add some extra ASSERT()s for data path to make sure we only get single page backed folio for now. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 8d993618350c86da11cb408ba529c13e83d09527 Author: Qu Wenruo Date: Tue Dec 12 12:58:36 2023 +1030 btrfs: migrate get_eb_page_index() and get_eb_offset_in_page() to folios These two functions are still using the old page based code, which is not going to handle larger folios at all. The migration itself is going to involve the following changes: - PAGE_SIZE -> folio_size() - PAGE_SHIFT -> folio_shift() - get_eb_page_index() -> get_eb_folio_index() - get_eb_offset_in_page() -> get_eb_offset_in_folio() And since we're going to support larger folios, although above straight conversion is good enough, this patch would add extra comments in the involved functions to explain why the same single line code can now cover 3 cases: - folio_size == PAGE_SIZE, sectorsize == PAGE_SIZE, nodesize >= PAGE_SIZE The common, non-subpage case with per-page folio. - folio_size > PAGE_SIZE, sectorsize == PAGE_SIZE, nodesize >= PAGE_SIZE The incoming larger folio, non-subpage case. - folio_size == PAGE_SIZE, sectorsize < PAGE_SIZE, nodesize < PAGE_SIZE The existing subpage case, we won't larger folio anyway. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 4a565c8069b7578a79d193d277e9c760aacf3e75 Author: Josef Bacik Date: Thu Dec 14 17:39:38 2023 -0500 btrfs: don't double put our subpage reference in alloc_extent_buffer This fixes as case in "btrfs: refactor alloc_extent_buffer() to allocate-then-attach method". We have been seeing panics in the CI for the subpage stuff recently, it happens on btrfs/187 but could potentially happen anywhere. In the subpage case, if we race with somebody else inserting the same extent buffer, the error case will end up calling detach_extent_buffer_page() on the page twice. This is done first in the bit for (int i = 0; i < attached; i++) detach_extent_buffer_page(eb, eb->pages[i]; and then again in btrfs_release_extent_buffer(). This works fine for !subpage because we're the only person who ever has ourselves on the private, and so when we do the initial detach_extent_buffer_page() we know we've completely removed it. However for subpage we could be using this page private elsewhere, so this results in a double put on the subpage, which can result in an early freeing. The fix here is to clear eb->pages[i] for everything we detach. Then anything still attached to the eb is freed in btrfs_release_extent_buffer(). Because of this change we must update btrfs_release_extent_buffer_pages() to not use num_extent_folios, because it assumes eb->folio[0] is set properly. Since this is only interested in freeing any pages we have on the extent buffer we can simply use INLINE_EXTENT_BUFFER_PAGES. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 13df3775efcaf412980c45aba2c321479bfc209a Author: Qu Wenruo Date: Thu Dec 7 09:39:28 2023 +1030 btrfs: cleanup metadata page pointer usage Although we have migrated extent_buffer::pages[] to folios[], we're still mostly using the folio_page() help to grab the page. This patch would do the following cleanups for metadata: - Introduce num_extent_folios() helper This is to replace most num_extent_pages() callers. - Use num_extent_folios() to iterate future large folios This allows us to use things like bio_add_folio()/bio_add_folio_nofail(), and only set the needed flags for the folio (aka the leading/tailing page), which reduces the loop iteration to 1 for large folios. - Change metadata related functions to use folio pointers Including their function name, involving: * attach_extent_buffer_page() * detach_extent_buffer_page() * page_range_has_eb() * btrfs_release_extent_buffer_pages() * btree_clear_page_dirty() * btrfs_page_inc_eb_refs() * btrfs_page_dec_eb_refs() - Change btrfs_is_subpage() to accept an address_space pointer This is to allow both page->mapping and folio->mapping to be utilized. As data is still using the old per-page code, and may keep so for a while. - Special corner case place holder for future order mismatches between extent buffer and inode filemap For now it's just a block of comments and a dead ASSERT(), no real handling yet. The subpage code would still go page, just because subpage and large folio are conflicting conditions, thus we don't need to bother subpage with higher order folios at all. Just folio_page(folio, 0) would be enough. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba [ minor styling tweaks ] Signed-off-by: David Sterba commit 082d5bb9b336d533b7b968f4f8712e7755a9876a Author: Qu Wenruo Date: Thu Dec 7 09:39:27 2023 +1030 btrfs: migrate extent_buffer::pages[] to folio For now extent_buffer::pages[] are still only accepting single page pointer, thus we can migrate to folios pretty easily. As for single page, page and folio are 1:1 mapped, including their page flags. This patch would just do the conversion from struct page to struct folio, providing the first step to higher order folio in the future. This conversion is pretty simple: - extent_buffer::pages[] -> extent_buffer::folios[] - page_address(eb->pages[i]) -> folio_address(eb->pages[i]) - eb->pages[i] -> folio_page(eb->folios[i], 0) There would be more specific cleanups preparing for the incoming higher order folio support. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 09e6cef19c9fc0e10547135476865b5272aa0406 Author: Qu Wenruo Date: Thu Nov 30 09:02:08 2023 +1030 btrfs: refactor alloc_extent_buffer() to allocate-then-attach method Currently alloc_extent_buffer() utilizes find_or_create_page() to allocate one page a time for an extent buffer. This method has the following disadvantages: - find_or_create_page() is the legacy way of allocating new pages With the new folio infrastructure, find_or_create_page() is just redirected to filemap_get_folio(). - Lacks the way to support higher order (order >= 1) folios As we can not yet let filemap give us a higher order folio. This patch would change the workflow by the following way: Old | new -----------------------------------+------------------------------------- | ret = btrfs_alloc_page_array(); for (i = 0; i < num_pages; i++) { | for (i = 0; i < num_pages; i++) { p = find_or_create_page(); | ret = filemap_add_folio(); /* Attach page private */ | /* Reuse page cache if needed */ /* Reused eb if needed */ | | /* Attach page private and | reuse eb if needed */ | } By this we split the page allocation and private attaching into two parts, allowing future updates to each part more easily, and migrate to folio interfaces (especially for possible higher order folios). Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 2b0122aaa800b021e36027d7f29e206f87c761d6 Author: David Disseldorp Date: Fri Dec 8 11:41:56 2023 +1100 btrfs: sysfs: validate scrub_speed_max value The value set as scrub_speed_max accepts size with suffixes (k/m/g/t/p/e) but we should still validate it for trailing characters, similar to what we do with chunk_size_store. CC: stable@vger.kernel.org # 5.15+ Signed-off-by: David Disseldorp Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6140ba8a0a1460986ee98b4062df7d4876b88295 Author: David Sterba Date: Wed Dec 6 15:16:03 2023 +0100 btrfs: switch btrfs_root::delayed_nodes_tree to xarray from radix-tree The radix-tree has been superseded by the xarray (https://lwn.net/Articles/745073), this patch converts the btrfs_root::delayed_nodes, the APIs are used in a simple way. First idea is to do xa_insert() but this would require GFP_ATOMIC allocation which we want to avoid if possible. The preload mechanism of radix-tree can be emulated within the xarray API. - xa_reserve() with GFP_NOFS outside of the lock, the reserved entry is inserted atomically at most once - xa_store() under a lock, in case something races in we can detect that and xa_load() returns a valid pointer All uses of xa_load() must check for a valid pointer in case they manage to get between the xa_reserve() and xa_store(), this is handled in btrfs_get_delayed_node(). Otherwise the functionality is equivalent, xarray implements the radix-tree and there should be no performance difference. The patch continues the efforts started in 253bf57555e451 ("btrfs: turn delayed_nodes_tree into an XArray") and fixes the problems with locking and GFP flags 088aea3b97e0ae ("Revert "btrfs: turn delayed_nodes_tree into an XArray""). Reviewed-by: Filipe Manana Signed-off-by: David Sterba commit eefaf0a1a6f10726faa4d1b7800fdf307e97ef55 Author: David Sterba Date: Tue Dec 5 19:26:39 2023 +0100 btrfs: fix typos found by codespell Signed-off-by: David Sterba commit 4618d0a66b505a81cc39b17935118227a7fc24f8 Author: Qu Wenruo Date: Tue Dec 5 18:21:29 2023 +1030 btrfs: fix mismatching parameter names for btrfs_get_extent() The definition for btrfs_get_extent() is using "u64 end" as the last parameter, but in implementation we go "u64 len", and all call sites follows the implementation. This can be very confusing during development, as most developers including me, would just use the snippet returned by LSP (clangd in my case), which would only check the definition. Unfortunately this mismatch is introduced from the very beginning of btrfs. Fix it to prevent further confusion. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit f86f7a75e2fb5fd7d31d00eab8a392f97ba42ce9 Author: Filipe Manana Date: Mon Dec 4 16:20:33 2023 +0000 btrfs: use the flags of an extent map to identify the compression type Currently, in struct extent_map, we use an unsigned int (32 bits) to identify the compression type of an extent and an unsigned long (64 bits on a 64 bits platform, 32 bits otherwise) for flags. We are only using 6 different flags, so an unsigned long is excessive and we can use flags to identify the compression type instead of using a dedicated 32 bits field. We can easily have tens or hundreds of thousands (or more) of extent maps on busy and large filesystems, specially with compression enabled or many or large files with tons of small extents. So it's convenient to have the extent_map structure as small as possible in order to use less memory. So remove the compression type field from struct extent_map, use flags to identify the compression type and shorten the flags field from an unsigned long to a u32. This saves 8 bytes (on 64 bits platforms) and reduces the size of the structure from 136 bytes down to 128 bytes, using now only two cache lines, and increases the number of extent maps we can have per 4K page from 30 to 32. By using a u32 for the flags instead of an unsigned long, we no longer use test_bit(), set_bit() and clear_bit(), but that level of atomicity is not needed as most flags are never cleared once set (before adding an extent map to the tree), and the ones that can be cleared or set after an extent map is added to the tree, are always performed while holding the write lock on the extent map tree, while the reader holds a lock on the tree or tests for a flag that never changes once the extent map is in the tree (such as compression flags). Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 27f0d9c98d1554a3c0021116aef1a250088d35a0 Author: Filipe Manana Date: Mon Dec 4 16:20:32 2023 +0000 btrfs: refactor mergable_maps() for more readability At mergable_maps() instead of having a single if statement with many ORed and ANDed conditions, refactor it with multiple if statements that check a single condition and return immediately once a requirement fails. This makes it easier to read. Also change the return type from int to bool, make the arguments const and rename the function from mergable_maps() to mergeable_maps(). Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b144cc0415e76b29bde86a969a0e1e8b4c8dbce2 Author: Filipe Manana Date: Mon Dec 4 16:20:31 2023 +0000 btrfs: make extent_map_end() argument const The extent map pointer argument for extent_map_end() can be const as we are not modifyng anything in the extent map. So make it const, as it will allow further changes to callers that have a const extent map pointer. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1a9fb16c60526253ecf9913b6ea48cfcdcb4c023 Author: Filipe Manana Date: Mon Dec 4 16:20:30 2023 +0000 btrfs: avoid useless rbtree iterations when attempting to merge extent map When trying to merge an extent map that was just inserted or unpinned, we will try to merge it with any adjacent extent map that is suitable. However we will only check if our extent map is mergeable after searching for the previous and next extent maps in the rbtree, meaning that we are doing unnecessary calls to rb_prev() and rb_next() in case our extent map is not mergeable (it's compressed, in the list of modifed extents, being logged or pinned), wasting CPU time chasing rbtree pointers and pulling in unnecessary cache lines. So change the logic to check first if an extent map is mergeable before searching for the next and previous extent maps in the rbtree. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 00deaf04df35536d192544ea57b6da9a88519422 Author: Filipe Manana Date: Mon Dec 4 16:20:29 2023 +0000 btrfs: log messages at unpin_extent_range() during unexpected cases At unpin_extent_range() we trigger a WARN_ON() when we don't find an extent map or we find one with a start offset not matching the start offset of the target range. This however isn't very useful for debugging because: 1) We don't know which condition was triggered, as they are both in the same WARN_ON() call; 2) We don't know which inode was affected, from which root, for which range, what's the start offset of the extent map, and so on. So trigger a separate warning for each case and log a message for each case providing information about the inode, its root, the target range, the generation and the start offset of the extent map we found. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit d224d2ef959a768fc88242224d8527e5f88789b6 Author: Filipe Manana Date: Mon Dec 4 16:20:28 2023 +0000 btrfs: remove redundant value assignment at btrfs_add_extent_mapping() At btrfs_add_extent_mapping(), in case add_extent_mapping() returned -EEXIST, it's pointless to assign 0 to 'ret' since we will assign a value to it shortly after, without 'ret' being used before that. So remove that pointless assignment. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit db9d94464a7acb149d014de1b0aa982b8c3856a6 Author: Filipe Manana Date: Mon Dec 4 16:20:27 2023 +0000 btrfs: unexport add_extent_mapping() There's no need to export add_extent_mapping(), as it's only used inside extent_map.c and in the self tests. For the tests we can use instead btrfs_add_extent_mapping(), which will accomplish exactly the same as we don't expect collisions in any of them. So unexport it and make the tests use btrfs_add_extent_mapping() instead of add_extent_mapping(). Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit c9201b4fec0d8ebac1399825353c7a266665cccd Author: Filipe Manana Date: Mon Dec 4 16:20:26 2023 +0000 btrfs: tests: print all values as decimal in messages for extent map tests Some error messages of the extent map tests print decimal values of start offsets and lengths, while other are oddly printing in hexadecimal, which is far less human friendly, specially taking into consideration that all the values are small and multiples of 4K, so it's a lot easier to read them as decimal values. Change the format specifiers to print as decimal instead. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit eca3aaec0de1e7059340f906a0741a68c1cf9e2b Author: Filipe Manana Date: Mon Dec 4 16:20:25 2023 +0000 btrfs: tests: do not ignore NULL extent maps for extent maps tests Several of the extent map tests call btrfs_add_extent_mapping() which is supposed to succeed and return an extent map through the pointer to pointer argument. However the tests are deliberately ignoring a NULL extent map, which is not expected to happen. So change the tests to error out if a NULL extent map is found. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b30aa1c176ba86a035d40c2d2f12dc0e0f687e0e Author: Filipe Manana Date: Mon Dec 4 16:20:24 2023 +0000 btrfs: tests: fix error messages for test case 4 of extent map tests In test case 4 for extent maps, if we error out we are supposed to print in interval but instead of printing a non-inclusive end offset, we are printing the length of the interval, which makes it confusing. So fix that to print the exclusive end offset instead. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 32d53f6f7b01f572dac6f0c2f4dbfc03ebe38112 Author: Filipe Manana Date: Mon Dec 4 16:20:23 2023 +0000 btrfs: assert extent map is not in a list when setting it up When setting up a new extent map, at setup_extent_mapping(), we're doing a list move operation to add the extent map the tree's list of modified extents. This is confusing because at this point the extent map can not be in any list, because it's a new extent map. So replace the list move with a list add and add an assertion that checks that the extent map is not currently in any list. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 637e6e0f50d20dcf2f37d62b3f9edf9567b69503 Author: David Sterba Date: Thu Nov 30 23:42:01 2023 +0100 btrfs: allocate btrfs_inode::file_extent_tree only without NO_HOLES The file_extent_tree was added in 41a2ee75aab0 ("btrfs: introduce per-inode file extent tree") so we have an explicit mapping of the file extents to know where it is safe to update i_size. When the feature NO_HOLES is enabled, and it's been a mkfs default since 5.15, the tree is not necessary. To save some space in the inode, allocate the tree only when necessary. This reduces size by 16 bytes from 1096 to 1080 on a x86_64 release config. Reviewed-by: Anand Jain Signed-off-by: David Sterba commit 1467affd16b236fc86e1b8ec5eaa147e104cd2a6 Author: Hou Tao Date: Fri Dec 15 18:07:08 2023 +0800 selftests/bpf: Add test for abnormal cnt during multi-kprobe attachment If an abnormally huge cnt is used for multi-kprobes attachment, the following warning will be reported: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 392 at mm/util.c:632 kvmalloc_node+0xd9/0xe0 Modules linked in: bpf_testmod(O) CPU: 1 PID: 392 Comm: test_progs Tainted: G ...... 6.7.0-rc3+ #32 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) ...... RIP: 0010:kvmalloc_node+0xd9/0xe0 ? __warn+0x89/0x150 ? kvmalloc_node+0xd9/0xe0 bpf_kprobe_multi_link_attach+0x87/0x670 __sys_bpf+0x2a28/0x2bc0 __x64_sys_bpf+0x1a/0x30 do_syscall_64+0x36/0xb0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 RIP: 0033:0x7fbe067f0e0d ...... ---[ end trace 0000000000000000 ]--- So add a test to ensure the warning is fixed. Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231215100708.2265609-6-houtao@huaweicloud.com commit 00cdcd2900bdb9190d1e75438b39cef74cd99232 Author: Hou Tao Date: Fri Dec 15 18:07:07 2023 +0800 selftests/bpf: Don't use libbpf_get_error() in kprobe_multi_test Since libbpf v1.0, libbpf doesn't return error code embedded into the pointer iteself, libbpf_get_error() is deprecated and it is basically the same as using -errno directly. So replace the invocations of libbpf_get_error() by -errno in kprobe_multi_test. For libbpf_get_error() in test_attach_api_fails(), saving -errno before invoking ASSERT_xx() macros just in case that errno is overwritten by these macros. However, the invocation of libbpf_get_error() in get_syms() should be kept intact, because hashmap__new() still returns a pointer with embedded error code. Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231215100708.2265609-5-houtao@huaweicloud.com commit 0d83786f5661154d015b498a3d23d4c37e30f6ef Author: Hou Tao Date: Fri Dec 15 18:07:06 2023 +0800 selftests/bpf: Add test for abnormal cnt during multi-uprobe attachment If an abnormally huge cnt is used for multi-uprobes attachment, the following warning will be reported: ------------[ cut here ]------------ WARNING: CPU: 7 PID: 406 at mm/util.c:632 kvmalloc_node+0xd9/0xe0 Modules linked in: bpf_testmod(O) CPU: 7 PID: 406 Comm: test_progs Tainted: G ...... 6.7.0-rc3+ #32 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) ...... RIP: 0010:kvmalloc_node+0xd9/0xe0 ...... Call Trace: ? __warn+0x89/0x150 ? kvmalloc_node+0xd9/0xe0 bpf_uprobe_multi_link_attach+0x14a/0x480 __sys_bpf+0x14a9/0x2bc0 do_syscall_64+0x36/0xb0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 ...... ---[ end trace 0000000000000000 ]--- So add a test to ensure the warning is fixed. Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231215100708.2265609-4-houtao@huaweicloud.com commit d6d1e6c17cab2dcb7b8530c599f00e7de906d380 Author: Hou Tao Date: Fri Dec 15 18:07:05 2023 +0800 bpf: Limit the number of kprobes when attaching program to multiple kprobes An abnormally big cnt may also be assigned to kprobe_multi.cnt when attaching multiple kprobes. It will trigger the following warning in kvmalloc_node(): if (unlikely(size > INT_MAX)) { WARN_ON_ONCE(!(flags & __GFP_NOWARN)); return NULL; } Fix the warning by limiting the maximal number of kprobes in bpf_kprobe_multi_link_attach(). If the number of kprobes is greater than MAX_KPROBE_MULTI_CNT, the attachment will fail and return -E2BIG. Fixes: 0dcac2725406 ("bpf: Add multi kprobe link") Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231215100708.2265609-3-houtao@huaweicloud.com commit 8b2efe51ba85ca83460941672afac6fca4199df6 Author: Hou Tao Date: Fri Dec 15 18:07:04 2023 +0800 bpf: Limit the number of uprobes when attaching program to multiple uprobes An abnormally big cnt may be passed to link_create.uprobe_multi.cnt, and it will trigger the following warning in kvmalloc_node(): if (unlikely(size > INT_MAX)) { WARN_ON_ONCE(!(flags & __GFP_NOWARN)); return NULL; } Fix the warning by limiting the maximal number of uprobes in bpf_uprobe_multi_link_attach(). If the number of uprobes is greater than MAX_UPROBE_MULTI_CNT, the attachment will return -E2BIG. Fixes: 89ae89f53d20 ("bpf: Add multi uprobe link") Reported-by: Xingwei Lee Signed-off-by: Hou Tao Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Acked-by: Andrii Nakryiko Closes: https://lore.kernel.org/bpf/CABOYnLwwJY=yFAGie59LFsUsBAgHfroVqbzZ5edAXbFE3YiNVA@mail.gmail.com Link: https://lore.kernel.org/bpf/20231215100708.2265609-2-houtao@huaweicloud.com commit c95a2a0be0b1bba2e051faa105c2e0401fc2de33 Author: Syed Saba Kareem Date: Fri Dec 15 18:32:42 2023 +0530 ASoC: amd: acp: add pm ops support for renoir platform. Add pm ops for renoir platform. Signed-off-by: Syed Saba Kareem Reviewed-by: Mario Limonciello Link: https://msgid.link/r/20231215130300.1247475-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown commit 4a8cd5cb583b99b06d2f3e2acb38c5957dd4e92e Author: Vahe Grigoryan Date: Thu Dec 14 13:28:01 2023 +0100 arm64: dts: rockchip: make use gpio-keys for buttons on puma-haikou Haikou is an evaluation and development platform for System on Modules (SOMs). Haikou devkit exposes multiple buttons so let's register them as such so that the input subsystem can generate events when pressed or switched. Signed-off-by: Vahe Grigoryan Link: https://lore.kernel.org/r/20231214122801.3144180-3-vahe.grigoryan@theobroma-systems.com Signed-off-by: Heiko Stuebner commit 39d95566231d483a1c89e74cbcadc4394bfd53ef Author: Vahe Grigoryan Date: Thu Dec 14 13:28:00 2023 +0100 arm64: dts: rockchip: expose BIOS Disable feedback pin on rk3399-puma The Puma SoM allows to select in hardware directly which storage medium to try for loading the bootloader, either SPI-NOR followed by eMMC followed by SD card, or SD card only. This signal is exposed on the Q7 connector and allows carrierboards to control it however they want. This feedback pin allows to know in which state the SoM currently is and provided the current state isn't modified until next reboot, know from which storage medium the bootloader could be loaded from next time. Signed-off-by: Vahe Grigoryan Link: https://lore.kernel.org/r/20231214122801.3144180-2-vahe.grigoryan@theobroma-systems.com Signed-off-by: Heiko Stuebner commit 9050aefab15b2da2c7d65d794ca445919ae4c235 Author: Vahe Grigoryan Date: Thu Dec 14 13:27:59 2023 +0100 arm64: dts: rockchip: fix misleading comment in rk3399-puma-haikou.dts Haikou is an evaluation and development platform for System on Modules (SOMs). The GPIO0_B1 is routed to the Wake button instead of BIOS_DISABLE, update the comment to reflect that. Signed-off-by: Vahe Grigoryan Link: https://lore.kernel.org/r/20231214122801.3144180-1-vahe.grigoryan@theobroma-systems.com Signed-off-by: Heiko Stuebner commit ed9b50a13edf442f5493603cc54f73bfc6eca1e9 Author: Josef Bacik Date: Wed Nov 29 13:10:31 2023 -0500 btrfs: cache that we don't have security.capability set When profiling a workload I noticed we were constantly calling getxattr. These were mostly coming from __remove_privs, which will lookup if security.capability exists to remove it. However instrumenting getxattr showed we get called nearly constantly on an idle machine on a lot of accesses. These are wasteful and not free. Other security LSMs have a way to cache their results, but capability doesn't have this, so it's asking us all the time for the xattr. Fix this by setting a flag in our inode that it doesn't have a security.capability xattr. We set this on new inodes and after a failed lookup of security.capability. If we set this xattr at all we'll clear the flag. I haven't found a test in fsperf that this makes a visible difference on, but I assume fs_mark related tests would show it clearly. This is a perf report output of the smallfiles100k run where it shows 20% of our time spent in __remove_privs because we're looking up the non-existent xattr. --21.86%--btrfs_write_check.constprop.0 --21.62%--__file_remove_privs --21.55%--security_inode_need_killpriv --21.54%--cap_inode_need_killpriv --21.53%--__vfs_getxattr --20.89%--btrfs_getxattr Obviously this is just CPU time in a mostly IO bound test, so the actual effect of removing this callchain is minimal. However in just normal testing of an idle system tracing showed around 100 getxattr calls per minute, and with this patch there are 0. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a1912f712188291f9d7d434fba155461f1ebef66 Author: Josef Bacik Date: Wed Nov 22 12:17:55 2023 -0500 btrfs: remove code for inode_cache and recovery mount options We've deprecated these a while ago in 5.11, go ahead and remove the code for them. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9fb3b1a7fed796510a5c34f5d492840dfd0eb96c Author: Josef Bacik Date: Wed Nov 22 12:17:54 2023 -0500 btrfs: set clear_cache if we use usebackuproot We're currently setting this when we try to load the roots and we see that usebackuproot is set. Instead set this at mount option parsing time. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 83e3a40a69f8dd57048089af31a1430c1808d924 Author: Josef Bacik Date: Wed Nov 22 12:17:53 2023 -0500 btrfs: move one shot mount option clearing to super.c There's no reason this has to happen in open_ctree, and in fact in the old mount API we had to call this from remount. Move this to super.c, unexport it, and call it from both mount and reconfigure. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6941823cc87812dba4d02c67f46768cba372970b Author: Josef Bacik Date: Wed Nov 22 12:17:52 2023 -0500 btrfs: remove old mount API code Now that we've switched to the new mount API, remove the old stuff. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 41d46b290ef9b5563ae5b3c46cf86e0ae1e4bf95 Author: Josef Bacik Date: Wed Nov 22 12:17:51 2023 -0500 btrfs: move the device specific mount options to super.c We add these mount options based on the fs_devices settings, which can be set once we've opened the fs_devices. Move these into their own helper and call it from get_tree_super. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit ad21f15b0f795daf8723dddbcb61797d4f1c2aed Author: Josef Bacik Date: Wed Nov 22 12:17:50 2023 -0500 btrfs: switch to the new mount API Now that we have all of the parts in place to use the new mount API, switch our fs_type to use the new callbacks. There are a few things that have to be done at the same time because of the order of operations changes that come along with the new mount API. These must be done in the same patch otherwise things will go wrong. 1. Export and use btrfs_check_options in open_ctree(). This is because the options are done ahead of time, and we need to check them once we have the feature flags loaded. 2. Update the free space cache settings. Since we're coming in with the options already set we need to make sure we don't undo what the user has asked for. 3. Set our sb_flags at init_fs_context time, the fs_context stuff is trying to manage the sb_flagss itself, so move that into init_fs_context and out of the fill super part. Additionally I've marked the unused functions with __maybe_unused and will remove them in a future patch. Reviewed-by: Johannes Thumshirn Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit f044b318675f0347ecfb88377542651ba4eb9e1f Author: Josef Bacik Date: Wed Nov 22 12:17:49 2023 -0500 btrfs: handle the ro->rw transition for mounting different subvolumes This is a special case that we've carried around since 0723a0473fb4 ("btrfs: allow mounting btrfs subvolumes with different ro/rw options") where we'll under the covers flip the file system to RW if you're mixing and matching ro/rw options with different subvol mounts. The first mount is what the super gets setup as, so we'd handle this by remount the super as rw under the covers to facilitate this behavior. With the new mount API we can't really allow this, because user space has the ability to specify the super block settings, and the mount settings. So if the user explicitly sets the super block as read only, and then tried to mount a rw mount with the super block we'll reject this. However the old API was less descriptive and thus we allowed this kind of behavior. This patch preserves this behavior for the old API calls. This is inspired by Christians work [1], and includes his comment in btrfs_get_tree_super() explaining the history and how it all works in the old and new APIs. Link: https://lore.kernel.org/all/20230626-fs-btrfs-mount-api-v1-2-045e9735a00b@kernel.org/ Reviewed-by: Christian Brauner Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3bb17a25bcb09abbd667c6ac86c7c9109ae82bcd Author: Josef Bacik Date: Wed Nov 22 12:17:48 2023 -0500 btrfs: add get_tree callback for new mount API This is the actual mounting callback for the new mount API. Implement this using our current fill super as a guideline, making the appropriate adjustments for the new mount API. Our old mount operation had two fs_types, one to handle the actual opening, and the one that we called to handle the actual opening and then did the subvol lookup for returning the actual root dentry. This is mirrored here, but simply with different behaviors for ->get_tree. We use the existence of ->s_fs_info to tell which part we're in. The initial call allocates the fs_info, then call mount_fc() with a duplicated fc to do the actual open_ctree part. Then we take that vfsmount and use it to look up our subvolume that we're mounting and return that as our s_root. This idea was taken from Christians attempt to convert us to the new mount API [1]. In btrfs_get_tree_super() the mount device is scanned and opened in one go under uuid_mutex we expect that all related devices have been already scanned, either by mount or from the outside. A device forget can be called on some of the devices as the whole context is not protected but it's an unlikely event, though it's a minor behaviour change. References: https://lore.kernel.org/all/20230626-fs-btrfs-mount-api-v1-2-045e9735a00b@kernel.org/ Reviewed-by: Christian Brauner Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add note about device scanning ] Signed-off-by: David Sterba commit eddb1a433f2631ef211b3253ba7e7aba20310ebc Author: Josef Bacik Date: Wed Nov 22 12:17:47 2023 -0500 btrfs: add reconfigure callback for fs_context This is what is used to remount the file system with the new mount API. Because the mount options are parsed separately and one at a time I've added a helper to emit the mount options after the fact once the mount is configured, this matches the dmesg output for what happens with the old mount API. Reviewed-by: Johannes Thumshirn Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0f85e244dfc5c22cb5e115ccad651df65e6fd68a Author: Josef Bacik Date: Wed Nov 22 12:17:46 2023 -0500 btrfs: add fs context handling functions We are going to use the fs context to hold the mount options, so allocate the btrfs_fs_context when we're asked to init the fs context, and free it in the free callback. Reviewed-by: Christian Brauner Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 17b3612022fe533e70c0a83ea7634069e5ce33f1 Author: Josef Bacik Date: Wed Nov 22 12:17:45 2023 -0500 btrfs: add parse_param callback for the new mount API The parse_param callback handles one parameter at a time, take our existing mount option parsing loop and adjust it to handle one parameter at a time, and tie it into the fs_context_operations. Create a btrfs_fs_context object that will store the various mount properties, we'll house this in fc->fs_private. This is necessary to separate because remounting will use ->reconfigure, and we'll get a new copy of the parsed parameters, so we can no longer directly mess with the fs_info in this stage. In the future we'll add this to the btrfs_fs_info and update the users to use the new context object instead. There's a change how the option device= is processed. Previously all mount options were parsed in one go under uuid_mutex and the devices opened. This prevented a concurrent scan to happen during mount. Now we could see a device scan happen (e.g. by udev) but this should not affect the end result, mount will either see the populated fs_devices or will scan the device by itself. Alternatively we could save all the device paths first and then process them in one go as before but this does not seem to be necessary. Reviewed-by: Johannes Thumshirn Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add note about device scanning ] Signed-off-by: David Sterba commit 15ddcdd34ebfe7ab58ff4ef4199fd5796da6a6e3 Author: Josef Bacik Date: Wed Nov 22 12:17:44 2023 -0500 btrfs: add fs_parameter definitions In order to convert to the new mount API we have to change how we do the mount option parsing. For now we're going to duplicate these helpers to make it easier to follow, and then remove the old code once everything is in place. This patch contains the re-definition of all of our mount options into the new fs_parameter_spec format. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2496bff6e53d3ad0541a5a3f720c3f7924bb2550 Author: Josef Bacik Date: Wed Nov 22 12:17:43 2023 -0500 btrfs: add a NOSPACECACHE mount option flag With the old mount API we'd pre-populate the mount options with the space cache settings of the file system, and then the user toggled them on or off with the mount options. When we switch to the new mount API the mount options will be set before we get into opening the file system, so we need a flag to indicate that the user explicitly asked for -o nospace_cache so we can make the appropriate changes after the fact. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9ef40c2e9b26bbf9b2110003107e46dabfd4e7dd Author: Josef Bacik Date: Wed Nov 22 12:17:42 2023 -0500 btrfs: split out ro->rw and rw->ro helpers into their own functions When we remount ro->rw or rw->ro we have some cleanup tasks that have to be managed. Split these out into their own function to make btrfs_remount smaller. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 272efa308fb6bfc7b04a4b6f6dde7b0431b51fee Author: Josef Bacik Date: Wed Nov 22 12:17:41 2023 -0500 btrfs: do not allow free space tree rebuild on extent tree v2 We currently don't allow these options to be set if we're extent tree v2 via the mount option parsing. However when we switch to the new mount API we'll no longer have the super block loaded, so won't be able to make this distinction at mount option parsing time. Address this by checking for extent tree v2 at the point where we make the decision to rebuild the free space tree. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a6a8f22a4af6c572d9e01ca9f7b515bf0cbb63b1 Author: Josef Bacik Date: Wed Nov 22 12:17:40 2023 -0500 btrfs: move space cache settings into open_ctree Currently we pre-load the space cache settings in btrfs_parse_options, however when we switch to the new mount API the mount option parsing will happen before we have the super block loaded. Add a helper to set the appropriate options based on the fs settings, this will allow us to have consistent free space cache settings. This also folds in the space cache related decisions we make for subpage sectorsize support, so all of this is done in one place. Since this was being called by parse options it looks like we're changing the behavior of remount, but in fact we aren't. The pre-loading of the free space cache settings is done because we want to handle the case of users not using any space_cache options, we'll derive the appropriate mount option based on the on disk state. On remount this wouldn't reset anything as we'll have cleared the v1 cache generation if we mounted -o nospace_cache. Similarly it's impossible to turn off the free space tree without specifically saying -o nospace_cache,clear_cache, which will delete the free space tree and clear the compat_ro option. Again in this case calling this code in remount wouldn't result in any change. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6207c9e3c2059530e4f9b885c61ef2fb4e200036 Author: Josef Bacik Date: Wed Nov 22 12:17:39 2023 -0500 btrfs: set default compress type at btrfs_init_fs_info time With the new mount API we'll be setting our compression well before we call open_ctree. We don't want to overwrite our settings, so set the default in btrfs_init_fs_info instead of open_ctree. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2b41b19dd6d063a3dca8c1f855a056515f0f678d Author: Josef Bacik Date: Wed Nov 22 12:17:38 2023 -0500 btrfs: split out the mount option validation code into its own helper We're going to need to validate mount options after they're all parsed with the new mount API, split this code out into its own helper so we can use it when we swap over to the new mount API. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Acked-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ minor adjustments in the messages ] Signed-off-by: David Sterba commit f67d922edb4e95a4a56d07d5d40a76dd4f23a85b Author: Christian Brauner Date: Wed Nov 22 12:17:37 2023 -0500 fs: indicate request originates from old mount API We already communicate to filesystems when a remount request comes from the old mount API as some filesystems choose to implement different behavior in the new mount API than the old mount API to e.g., take the chance to fix significant API bugs. Allow the same for regular mount requests. Fixes: b330966f79fb ("fuse: reject options on reconfigure via fsconfig(2)") Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Christian Brauner Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3c0e918b8fb3a6a7da1558913302a3e89cf87343 Author: Filipe Manana Date: Thu Nov 23 23:53:51 2023 +0000 btrfs: remove no longer used EXTENT_MAP_DELALLOC block start value After commit ac3c0d36a2a2 ("btrfs: make fiemap more efficient and accurate reporting extent sharedness") we no longer need to create special extent maps during fiemap that have a block start with the EXTENT_MAP_DELALLOC value. So this block start value for extent maps is no longer used since then, therefore remove it. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 397239ed6a6c88b002fbba0b25ed5a719c578c2f Author: Qu Wenruo Date: Thu Nov 16 15:49:06 2023 +1030 btrfs: allow extent buffer helpers to skip cross-page handling Currently btrfs extent buffer helpers are doing all the cross-page handling, as there is no guarantee that all those eb pages are contiguous. However on systems with enough memory, there is a very high chance the page cache for btree_inode are allocated with physically contiguous pages. In that case, we can skip all the complex cross-page handling, thus speeding up the code. This patch adds a new member, extent_buffer::addr, which is only set to non-NULL if all the extent buffer pages are physically contiguous. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3ba2d3648f9dcd6af6326352bb2775e8b31372e0 Author: Johannes Thumshirn Date: Thu Nov 23 07:47:19 2023 -0800 btrfs: reflow btrfs_free_tree_block Reflow btrfs_free_tree_block() so that there is one level of indentation needed. This patch has no functional changes. Reviewed-by: Christoph Hellwig Reviewed-by: Josef Bacik Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit b0d823840936dd63ae41d93b690288de767849d6 Author: Johannes Thumshirn Date: Thu Nov 23 07:47:18 2023 -0800 btrfs: use memset_page instead of opencoding it Use memset_page() in memset_extent_buffer() instead of opencoding it. This does not not change any functionality. Reviewed-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2aae747a4938c2c3c398ff55aa2ddaf51b135899 Author: Johannes Thumshirn Date: Thu Nov 23 07:47:17 2023 -0800 btrfs: remove now unneeded btrfs_redirty_list_add Now that we're not clearing the dirty flag off of extent_buffers in zoned mode, all that is left of btrfs_redirty_list_add() is a memzero() and some ASSERT()ions. As we're also memzero()ing the buffer on write-out btrfs_redirty_list_add() has become obsolete and can be removed. Reviewed-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit aa6313e6ff2bfbf736a2739047bba355d8241584 Author: Johannes Thumshirn Date: Thu Nov 23 07:47:16 2023 -0800 btrfs: zoned: don't clear dirty flag of extent buffer One a zoned filesystem, never clear the dirty flag of an extent buffer, but instead mark it as zeroout. On writeout, when encountering a marked extent_buffer, zero it out. Reviewed-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit cbf44cd93db3a470ead92a938210f41095cea562 Author: Johannes Thumshirn Date: Thu Nov 23 07:47:15 2023 -0800 btrfs: rename EXTENT_BUFFER_NO_CHECK to EXTENT_BUFFER_ZONED_ZEROOUT EXTENT_BUFFER_ZONED_ZEROOUT better describes the state of the extent buffer, namely it is written as all zeros. This is needed in zoned mode, to preserve I/O ordering. Reviewed-by: Christoph Hellwig Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 738290c056e28d83177ecbed3894e094e161939e Author: David Sterba Date: Tue Nov 21 14:20:24 2023 +0100 btrfs: always set extent_io_tree::inode and drop fs_info The extent_io_tree is embedded in several structures, notably in struct btrfs_inode. The fs_info is only used for reporting errors and for reference in trace points. We can get to the pointer through the inode, but not all io trees set it. However, we always know the owner and can recognize if inode is valid. For access helpers are provided, const variant for the trace points. This reduces size of extent_io_tree by 8 bytes and following structures in turn: - btrfs_inode 1104 -> 1088 - btrfs_device 520 -> 512 - btrfs_root 1360 -> 1344 - btrfs_transaction 456 -> 440 - btrfs_fs_info 3600 -> 3592 - reloc_control 1520 -> 1512 Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 70146f2b093844c656774bfc9a98b79e2177893a Author: David Sterba Date: Tue Nov 21 14:20:21 2023 +0100 btrfs: enhance extent_io_tree error reports Pass the type of the extent io tree operation which failed in the report helper. The message wording and contents is updated, though locking might be the cause of the error it's probably not the only one and we're interested in the state. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 3a97347ea694b6c091513135095128f099b73143 Author: David Sterba Date: Tue Nov 21 14:20:19 2023 +0100 btrfs: constify fs_info parameter in __btrfs_panic() The printk helpers take const fs_info if it's used just for the identifier in the messages, __btrfs_panic() lacks that. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit ab76c43e7474eafdc95f7d83aa6ab1a53fde01c4 Author: David Sterba Date: Tue Nov 21 14:20:17 2023 +0100 btrfs: drop error message in extent_io_tree insert_state() The helper insert_state errors are handled in all callers and reported by extent_io_tree_panic so we don't need to do it twice. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 516095cdf07af0c7223681079d87e9c42c7cf599 Author: David Sterba Date: Tue Nov 21 14:20:15 2023 +0100 btrfs: move lockdep class setting out of extent_io_tree_init The per-inode file extent tree was added in 41a2ee75aab0 ("btrfs: introduce per-inode file extent tree"), it's the only tree type that requires the lockdep class. Move it to the file where it is actually used. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 71fca47b644910485c49d1da31bc963cf286fe77 Author: Filipe Manana Date: Tue Nov 21 13:38:39 2023 +0000 btrfs: remove stripe size local variable from insert_dev_extents() It's not needed to have a local variable to store the stripe size at insert_dev_extents(), we can just take from the chunk map as it's only used once and typing 'map->stripe_size' is not much more verbose than simply typing 'stripe_size'. So remove the local variable. This was added before the recent addition of a dedicated structure for chunk mappings because the stripe size was encoded in the 'orig_block_len' field of an extent_map structure, so the use of the local variable made things more readable. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7dc66abb5a47778d7db327783a0ba172b8cff0b5 Author: Filipe Manana Date: Tue Nov 21 13:38:38 2023 +0000 btrfs: use a dedicated data structure for chunk maps Currently we abuse the extent_map structure for two purposes: 1) To actually represent extents for inodes; 2) To represent chunk mappings. This is odd and has several disadvantages: 1) To create a chunk map, we need to do two memory allocations: one for an extent_map structure and another one for a map_lookup structure, so more potential for an allocation failure and more complicated code to manage and link two structures; 2) For a chunk map we actually only use 3 fields (24 bytes) of the respective extent map structure: the 'start' field to have the logical start address of the chunk, the 'len' field to have the chunk's size, and the 'orig_block_len' field to contain the chunk's stripe size. Besides wasting a memory, it's also odd and not intuitive at all to have the stripe size in a field named 'orig_block_len'. We are also using 'block_len' of the extent_map structure to contain the chunk size, so we have 2 fields for the same value, 'len' and 'block_len', which is pointless; 3) When an extent map is associated to a chunk mapping, we set the bit EXTENT_FLAG_FS_MAPPING on its flags and then make its member named 'map_lookup' point to the associated map_lookup structure. This means that for an extent map associated to an inode extent, we are not using this 'map_lookup' pointer, so wasting 8 bytes (on a 64 bits platform); 4) Extent maps associated to a chunk mapping are never merged or split so it's pointless to use the existing extent map infrastructure. So add a dedicated data structure named 'btrfs_chunk_map' to represent chunk mappings, this is basically the existing map_lookup structure with some extra fields: 1) 'start' to contain the chunk logical address; 2) 'chunk_len' to contain the chunk's length; 3) 'stripe_size' for the stripe size; 4) 'rb_node' for insertion into a rb tree; 5) 'refs' for reference counting. This way we do a single memory allocation for chunk mappings and we don't waste memory for them with unused/unnecessary fields from an extent_map. We also save 8 bytes from the extent_map structure by removing the 'map_lookup' pointer, so the size of struct extent_map is reduced from 144 bytes down to 136 bytes, and we can now have 30 extents map per 4K page instead of 28. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ebb0beca6c6a2d33f809a74bad63261651237833 Author: Filipe Manana Date: Tue Nov 21 13:38:37 2023 +0000 btrfs: use btrfs_next_item() at scrub.c:find_first_extent_item() There's no reason to open code what btrfs_next_item() does when searching for extent items at scrub.c:scrub.c:find_first_extent_item(), so remove the logic to find the next item and use btrfs_next_item() instead, making the code shorter and less nested code blocks. While at it also fix the comment to the plural "items" instead of "item" and end it with proper punctuation. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2ecec0d6a5b5817edf50fe80196ca774e72dae46 Author: Filipe Manana Date: Tue Nov 21 13:38:36 2023 +0000 btrfs: unexport extent_map_block_end() The helper extent_map_block_end() is currently not used anywhere outside extent_map.c, so move into from extent_map.h into extent_map.c. While at it, also make the extent map pointer argument as const. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3128b548c759da4263b44306093d3a1751dcc58d Author: Filipe Manana Date: Tue Nov 21 13:38:35 2023 +0000 btrfs: split assert into two different asserts when removing block group When starting a transaction to remove a block group we have one ASSERT that checks we found an extent map and that the extent map's start offset matches the desired chunk offset. In case one of the conditions fails, we get a stack trace that point to the respective line of code, however we can't tell which condition failed: either there's no extent map or we got one with an unexpected start offset. To make such an issue easier to debug and analyse, split the assertion into two, one for each condition. This was actually triggered during development of another upcoming change. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5031660a1b6a7ca7f9a1c55ebf0c157255826915 Author: Filipe Manana Date: Tue Nov 21 13:38:34 2023 +0000 btrfs: mark sanity checks when getting chunk map as unlikely When getting a chunk map, at btrfs_get_chunk_map(), we do some sanity checks to verify that we found an extent map and that it includes the requested logical address. These are never expected to fail, so mark them as unlikely to make it more clear as well as to allow a compiler to generate more efficient code. Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 46524fab690ea5ee7b7a8c6b788d06765cdf8db1 Author: David Sterba Date: Tue Nov 21 02:50:21 2023 +0100 btrfs: remove unused btrfs_root::type Looks like the struct member was added in 2007 in 2.6.29 in commit 87ee04eb0f2f ("Btrfs: Add simple stripe size parameter") but hasn't been used at all since. So let's remove it. This was found by tool https://github.com/jirislaby/clang-struct, then build tested after removing the struct member. Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 49542050b1a172c67005e4d63f90429b4ae50b01 Author: David Sterba Date: Tue Nov 21 02:50:19 2023 +0100 btrfs: remove unused definition of tree_entry in extent-io-tree.c The declaration was temporarily moved in a4055213bf69 ("btrfs: unexport all the temporary exports for extent-io-tree.c") and then should have been removed in 6.0 in 071d19f5130f ("btrfs: remove struct tree_entry in extent-io-tree.c") but was not. This was found by tool https://github.com/jirislaby/clang-struct . Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit a0df0a2680353fbfd7a14aaab4624f22d539b876 Author: David Sterba Date: Tue Nov 21 02:50:17 2023 +0100 btrfs: raid56: remove unused btrfs_plug_cb::work The raid56 changes in 6.2 reworked the IO path to RMW, commit 93723095b5d5 ("btrfs: raid56: switch write path to rmw_rbio()") in particular removed the last use of the work member so it can be removed as well. This was found by tool https://github.com/jirislaby/clang-struct . Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 3d72941664460153362f81ed66089d65538c3d39 Author: David Sterba Date: Tue Nov 21 02:50:15 2023 +0100 btrfs: remove unused btrfs_ordered_extent::outstanding_isize The whole isize code was deleted in 5.6 3f1c64ce0438 ("btrfs: delete the ordered isize update code"), except the struct member. This was found by tool https://github.com/jirislaby/clang-struct . Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit a5e182d85fa55557496ad751c88a37f3c0590242 Author: David Sterba Date: Tue Nov 21 02:50:13 2023 +0100 btrfs: scrub: remove unused scrub_ctx::sectors_per_bio The recent scrub rewrite forgot to remove the sectors_per_bio in 6.3 in 13a62fd997f0 ("btrfs: scrub: remove scrub_bio structure"). This was found by tool https://github.com/jirislaby/clang-struct . Reviewed-by: Qu Wenruo Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit cfbf07e2787e4da79c63622f1a6e64cc89f3a829 Author: Qu Wenruo Date: Fri Nov 17 14:24:14 2023 +1030 btrfs: migrate to use folio private instead of page private As a cleanup and preparation for future folio migration, this patch would replace all page->private to folio version. This includes: - PagePrivate() -> folio_test_private() - page->private -> folio_get_private() - attach_page_private() -> folio_attach_private() - detach_page_private() -> folio_detach_private() Since we're here, also remove the forced cast on page->private, since it's (void *) already, we don't really need to do the cast. For now even if we missed some call sites, it won't cause any problem yet, as we're only using order 0 folio (single page), thus all those folio/page flags should be synced. But for the future conversion to utilize higher order folio, the page <-> folio flag sync is no longer guaranteed, thus we have to migrate to utilize folio flags. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4cea422a776558ccf84e918205d0c162a516502c Author: David Sterba Date: Wed Nov 15 17:59:41 2023 +0100 btrfs: use shrinker for compression page pool The pages are now allocated and freed centrally, so we can extend the logic to manage the lifetime. The main idea is to keep a few recently used pages and hand them to all writers. Ideally we won't have to go to allocator at all (a slight performance gain) and also raise chance that we'll have the pages available (slightly increased reliability). In order to avoid gathering too many pages, the shrinker is attached to the cache so we can free them on when MM demands that. The first implementation will drain the whole cache. Further this can be refined to keep some minimal number of pages for emergency purposes. The ultimate goal to avoid memory allocation failures on the write out path from the compression. The pool threshold is set to cover full BTRFS_MAX_COMPRESSED / PAGE_SIZE for minimal thread pool, which is 8 (btrfs_init_fs_info()). This is 128K / 4K * 8 = 256 pages at maximum, which is 1MiB. This is for all filesystems currently mounted, with heavy use of compression IO the allocator is still needed. The cache helps for short burst IO. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 9ba965dca3b13757e49f98bbea7cf48f07633ff9 Author: David Sterba Date: Wed Nov 15 17:59:39 2023 +0100 btrfs: use page alloc/free wrappers for compression pages This is a preparation for managing compression pages in a cache-like manner, instead of asking the allocator each time. The common allocation and free wrappers are introduced and are functionally equivalent to the current code. The freeing helpers need to be carefully placed where the last reference is dropped. This is either after directly allocating (error handling) or when there are no other users of the pages (after copying the contents). It's safe to not use the helper and use put_page() that will handle the reference count. Not using the helper means there's lower number of pages that could be reused without passing them back to allocator. Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 9ba7c686feb04f16088ca4523c204ed49b07fc0a Author: Qu Wenruo Date: Tue Oct 31 07:37:20 2023 +1030 btrfs: do not utilize goto to implement delayed inode ref deletion [PROBLEM] The function __btrfs_update_delayed_inode() is doing something not meeting the code standard of today: path->slots[0]++ if (path->slots[0] >= btrfs_header_nritems(leaf)) goto search; again: if (!is_the_target_inode_ref()) goto out; ret = btrfs_delete_item(); /* Some cleanup. */ return ret; search: ret = search_for_the_last_inode_ref(); goto again; With the tag named "again", it's pretty common to think it's a loop, but the truth is, we only need to do the search once, to locate the last (also the first, since there should only be one INODE_REF or INODE_EXTREF now) ref of the inode. [FIX] Instead of the weird jumps, just do them in a stream-lined fashion. This removes those weird labels, and add extra comments on why we can do the different searches. Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 80d197fe04e87602be402337854321c59a31acf9 Author: Filipe Manana Date: Thu Oct 19 13:19:30 2023 +0100 btrfs: make the logic from btrfs_block_can_be_shared() easier to read The logic in btrfs_block_can_be_shared() is hard to follow as we have a lot of conditions in a single if statement including a subexpression with a logical or and two nested if statements inside the main if statement. Make this easier to read by using separate if statements that return immediately when we find a condition that determines if a block can be or can not be shared. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6e5de50fc5d71e0a5fe2357c067cea752fe375d7 Author: Filipe Manana Date: Thu Oct 19 13:19:29 2023 +0100 btrfs: use bool for return type of btrfs_block_can_be_shared() Currently btrfs_block_can_be_shared() returns an int that is used as a boolean. Since it all it needs is to return true or false, and it can't return errors for example, change the return type from int to bool to make it a bit more readable and obvious. Reviewed-by: Anand Jain Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6000d9313f20e6587a9e5506b4ea169ed61ab686 Author: Filipe Manana Date: Thu Oct 19 12:52:18 2023 +0100 btrfs: remove log_extents_lock and logged_list from struct btrfs_root The logged_list[2] and log_extents_lock[2] members of struct btrfs_root are no longer used, their last use was removed in commit 5636cf7d6dc8 ("btrfs: remove the logged extents infrastructure"). So remove these fields. This reduces the size of struct btrfs_root, on a release kernel, from 1392 bytes down to 1352 bytes. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit b1dd019de6f34db7a4ec9ee74cb02493135880b2 Author: Filipe Manana Date: Fri Oct 13 12:38:32 2023 +0100 btrfs: remove duplicate btrfs_clear_buffer_dirty() prototype from disk-io.h The prototype for btrfs_clear_buffer_dirty() is declared in both disk-io.h and extent_io.h, but the function is defined at extent_io.c. So remove the prototype declaration from disk-io.h. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6aa1fc5a8085bbc01687aa708dcf2dbe637a5ee3 Author: Cameron Williams Date: Thu Nov 2 21:07:06 2023 +0000 parport: parport_serial: Add Brainboxes device IDs and geometry Add device IDs for the Brainboxes UC-203, UC-257, UC-414, UC-475, IS-300/IS-500 and PX-263/PX-295 and define the relevant "geometry" for the cards. This patch requires part 1 of this series. Cc: Signed-off-by: Cameron Williams Acked-by: Sudip Mukherjee Link: https://lore.kernel.org/r/AS4PR02MB7903A4094564BE28F1F926A6C4A6A@AS4PR02MB7903.eurprd02.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit 65fde134b0a4ffe838729f9ee11b459a2f6f2815 Author: Cameron Williams Date: Thu Nov 2 21:07:05 2023 +0000 parport: parport_serial: Add Brainboxes BAR details Add BAR/enum entries for Brainboxes serial/parallel cards. Cc: Signed-off-by: Cameron Williams Acked-by: Sudip Mukherjee Link: https://lore.kernel.org/r/AS4PR02MB79035155C2D5C3333AE6FA52C4A6A@AS4PR02MB7903.eurprd02.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit 4ecae2ae9535cf1509b9404080b448bce179d662 Author: Linus Walleij Date: Thu Dec 14 23:29:14 2023 +0100 ARM: dts: ux500-href: Switch HREF520 to AB8505 After noticing a tendency to misbehave and randomly power down: switch the HREF520 AB8500 to the AB8505, which is what it has mounted. After this the board works better. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231214-ux500-no-turnoff-lowbatt-v1-3-9dcff0783d62@linaro.org commit b2144043103fd0e2d49dabbb0ba9623f8a3cf0af Author: Linus Walleij Date: Thu Dec 14 23:29:13 2023 +0100 ARM: dts: ux500-href: Push AB8500 config out Push out some AB8500 setup of regulators and phy out to the per-AB850x variant file ste-href-ab8500.dtsi so it becomes self-contained for each AB850x chip. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231214-ux500-no-turnoff-lowbatt-v1-2-9dcff0783d62@linaro.org commit beed2cc890b7c8fd983ca9f86b5f93a98bb559d8 Author: Linus Walleij Date: Thu Dec 14 23:29:12 2023 +0100 ARM: dts: ux500-href: Push AB8500 inclusion to the top On the hardware reference designs, include the AB8500 definitions on the top level in the DTS files, this is to make it possible to use the AB8505 in the HREF520. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231214-ux500-no-turnoff-lowbatt-v1-1-9dcff0783d62@linaro.org commit a5b91555403e3a09ae00bed85fc78b60801dda24 Author: Darrick J. Wong Date: Fri Dec 15 10:03:45 2023 -0800 xfs: repair quotas Fix anything that causes the quota verifiers to fail. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 21d7500929c8a0b10e22a6755850c6f9a9280284 Author: Darrick J. Wong Date: Fri Dec 15 10:03:45 2023 -0800 xfs: improve dquot iteration for scrub Upon a closer inspection of the quota record scrubber, I noticed that dqiterate wasn't actually walking all possible dquots for the mapped blocks in the quota file. This is due to xfs_qm_dqget_next skipping all XFS_IS_DQUOT_UNINITIALIZED dquots. For a fsck program, we really want to look at all the dquots, even if all counters and limits in the dquot record are zero. Rewrite the implementation to do this, as well as switching to an iterator paradigm to reduce the number of indirect calls. This enables removal of the old broken dqiterate code from xfs_dquot.c. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 774b5c0a5152892bf5f43ce560f3a814b1fdf3b7 Author: Darrick J. Wong Date: Fri Dec 15 10:03:44 2023 -0800 xfs: check dquot resource timers For each dquot resource, ensure either (a) the resource usage is over the soft limit and there is a nonzero timer; or (b) usage is at or under the soft limit and the timer is unset. (a) is redundant with the dquot buffer verifier, but (b) isn't checked anywhere. Found by fuzzing xfs/426 and noticing that diskdq.btimer = add didn't trip any kind of warning for having a timer set even with no limits. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 7d1f0e167a067ed741dec08b7614d76893422b04 Author: Darrick J. Wong Date: Fri Dec 15 10:03:44 2023 -0800 xfs: check the ondisk space mapping behind a dquot Each xfs_dquot object caches the file offset and daddr of the ondisk block that backs the dquot. Make sure these cached values are the same as the bmapi data, and that the block state is written. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit ffd37b22bd2b7cca7749c85a0a08268158903e55 Author: Darrick J. Wong Date: Fri Dec 15 10:03:43 2023 -0800 xfs: online repair of realtime bitmaps Fix all the file metadata surrounding the realtime bitmap file, which includes the rt geometry, file size, forks, and space mappings. The bitmap contents themselves cannot be fixed without rt rmap, so that will come later. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a59eb5fc21b2a6dc160ee6cdf77f20bc186a88fd Author: Darrick J. Wong Date: Fri Dec 15 10:03:43 2023 -0800 xfs: create a new inode fork block unmap helper Create a new helper to unmap blocks from an inode's fork. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 5a8e07e799721ba68dd6d713d4a68598eab3bea1 Author: Darrick J. Wong Date: Fri Dec 15 10:03:42 2023 -0800 xfs: repair the inode core and forks of a metadata inode Add a helper function to repair the core and forks of a metadata inode, so that we can get move onto the task of repairing higher level metadata that lives in an inode. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 20cc0d398e89d1f735c8e2815defc8ba9fdcce3f Author: Darrick J. Wong Date: Fri Dec 15 10:03:42 2023 -0800 xfs: always check the rtbitmap and rtsummary files XFS filesystems always have a realtime bitmap and summary file, even if there has never been a realtime volume attached. Always check them. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 04f0c3269b41f28c041980a30514850453ded251 Author: Darrick J. Wong Date: Fri Dec 15 10:03:41 2023 -0800 xfs: check rt summary file geometry more thoroughly I forgot that the xfs_mount tracks the size and number of levels in the realtime summary file, and that the rt summary file can have more blocks mapped to the data fork than m_rsumsize implies if growfsrt fails. So. Add to the rtsummary scrubber an explicit check that all the summary geometry values are correct, then adjust the rtsummary i_size checks to allow for the growfsrt failure case. Finally, flag post-eof blocks in the summary file. While we're at it, split the extent map checking so that we only call xfs_bmapi_read once per extent instead of once per rtsummary block. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 41991cf298919de211c63251d72266aff70ecad0 Author: Darrick J. Wong Date: Fri Dec 15 10:03:41 2023 -0800 xfs: check rt bitmap file geometry more thoroughly I forgot that the superblock tracks the number of blocks that are in the realtime bitmap, and that the rt bitmap file can have more blocks mapped to the data fork than sb_rbmblocks if growfsrt fails. So. Add to the rtbitmap scrubber an explicit check that sb_rextents and sb_rbmblocks are correct, then adjust the rtbitmap i_size checks to allow for the growfsrt failure case. Finally, flag post-eof blocks in the rtbitmap. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit dbbdbd0086320a026903ca34efedb6abf55230ed Author: Darrick J. Wong Date: Fri Dec 15 10:03:40 2023 -0800 xfs: repair problems in CoW forks Try to repair errors that we see in file CoW forks so that we don't do stupid things like remap garbage into a file. There's not a lot we can do with the COW fork -- the ondisk metadata record only that the COW staging extents are owned by the refcount btree, which effectively means that we can't reconstruct this incore structure from scratch. Actually, this is even worse -- we can't touch written extents, because those map space that are actively under writeback, and there's not much to do with delalloc reservations. Hence we can only detect crosslinked unwritten extents and fix them by punching out the problematic parts and replacing them with delalloc extents. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit d12bf8bac87a0d93e6e5fab67f399d1e3d3d5767 Author: Darrick J. Wong Date: Fri Dec 15 10:03:40 2023 -0800 xfs: create a ranged query function for refcount btrees Implement ranged queries for refcount records. The next patch will use this to scan refcount data. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 48a72f60861f790dd7c2db04d69c3a1ce606984e Author: Darrick J. Wong Date: Fri Dec 15 10:03:39 2023 -0800 xfs: refactor repair forcing tests into a repair.c helper There are a couple of conditions that userspace can set to force repairs of metadata. These really belong in the repair code and not open-coded into the check code, so refactor them into a helper. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 8f71bede8efd820627ac05c19eac2758214bc896 Author: Darrick J. Wong Date: Fri Dec 15 10:03:39 2023 -0800 xfs: repair inode fork block mapping data structures Use the reverse-mapping btree information to rebuild an inode block map. Update the btree bulk loading code as necessary to support inode rooted btrees and fix some bitrot problems. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c3a22c2e4b45fcf3184e7dd1c755e6b45dc9f499 Author: Darrick J. Wong Date: Fri Dec 15 10:03:38 2023 -0800 xfs: skip the rmapbt search on an empty attr fork unless we know it was zapped The attribute fork scrubber can optionally scan the reverse mapping records of the filesystem to determine if the fork is missing mappings that it should have. However, this is a very expensive operation, so we only want to do this if we suspect that the fork is missing records. For attribute forks the criteria for suspicion is that the attr fork is in EXTENTS format and has zero extents. However, there are several ways that a file can end up in this state through regular filesystem usage. For example, an LSM can set a s_security hook but then decide not to set an ACL; or an attr set can create the attr fork but then the actual set operation fails with ENOSPC; or we can delete all the attrs on a file whose data fork is in btree format, in which case we do not delete the attr fork. We don't want to run the expensive check for any case that can be arrived at through regular operations. However. When online inode repair decides to zap an attribute fork, it cannot determine if it is zapping ACL information. As a precaution it removes all the discretionary access control permissions and sets the user and group ids to zero. Check these three additional conditions to decide if we want to scan the rmap records. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 66da11280f7ecd77abd999c469efc0dd643f26f5 Author: Darrick J. Wong Date: Fri Dec 15 10:03:38 2023 -0800 xfs: reintroduce reaping of file metadata blocks to xrep_reap_extents Back in commit a55e07308831b ("xfs: only allow reaping of per-AG blocks in xrep_reap_extents"), we removed from the reaping code the ability to handle bmbt blocks. At the time, the reaping code only walked single blocks, didn't correctly detect crosslinked blocks, and the special casing made the function hard to understand. It was easier to remove unneeded functionality prior to fixing all the bugs. Now that we've fixed the problems, we want again the ability to reap file metadata blocks. Reintroduce the per-file reaping functionality atop the current implementation. We require that sc->sa is uninitialized, so that we can use it to hold all the per-AG context for a given extent. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 6c7289528d3c91855d78c56bb35fa360ed9a40bd Author: Darrick J. Wong Date: Fri Dec 15 10:03:37 2023 -0800 xfs: abort directory parent scrub scans if we encounter a zapped directory In a previous patch, we added some code to perform sufficient repairs to an ondisk inode record such that the inode cache would be willing to load the inode. If the broken inode was a shortform directory, it will reset the directory to something plausible, which is to say an empty subdirectory of the root. The telltale signs that something is seriously wrong is the broken link count. Such directories look clean, but they shouldn't participate in a filesystem scan to find or confirm a directory parent pointer. Create a predicate that identifies such directories and abort the scrub. Found by fuzzing xfs/1554 with multithreaded xfs_scrub enabled and u3.bmx[0].startblock = zeroes. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e744cef206055954517648070d2b3aaa3d2515ba Author: Darrick J. Wong Date: Fri Dec 15 10:03:37 2023 -0800 xfs: zap broken inode forks Determine if inode fork damage is responsible for the inode being unable to pass the ifork verifiers in xfs_iget and zap the fork contents if this is true. Once this is done the fork will be empty but we'll be able to construct an in-core inode, and a subsequent call to the inode fork repair ioctl will search the rmapbt to rebuild the records that were in the fork. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 2d295fe65776d15c06d53dbe3064f62e036e7c46 Author: Darrick J. Wong Date: Fri Dec 15 10:03:36 2023 -0800 xfs: repair inode records If an inode is so badly damaged that it cannot be loaded into the cache, fix the ondisk metadata and try again. If there /is/ a cached inode, fix any problems and apply any optimizations that can be solved incore. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit d9041681dd2f5334529a68868c9266631c384de4 Author: Darrick J. Wong Date: Fri Dec 15 10:03:35 2023 -0800 xfs: set inode sick state flags when we zap either ondisk fork In a few patches, we'll add some online repair code that tries to massage the ondisk inode record just enough to get it to pass the inode verifiers so that we can continue with more file repairs. Part of that massaging can include zapping the ondisk forks to clear errors. After that point, the bmap fork repair functions will rebuild the zapped forks. Christoph asked for stronger protections against online repair zapping a fork to get the inode to load vs. other threads trying to access the partially repaired file. Do this by adding a special "[DA]FORK_ZAPPED" inode health flag whenever repair zaps a fork, and sprinkling checks for that flag into the various file operations for things that don't like handling an unexpected zero-extents fork. In practice xfs_scrub will scrub and fix the forks almost immediately after zapping them, so the window is very small. However, if a crash or unmount should occur, we can still detect these zapped inode forks by looking for a zero-extents fork when data was expected. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 6b5d917780219d0d8f8e2cefefcb6f50987d0fa3 Author: Darrick J. Wong Date: Fri Dec 15 10:03:35 2023 -0800 xfs: dont cast to char * for XFS_DFORK_*PTR macros Code in the next patch will assign the return value of XFS_DFORK_*PTR macros to a struct pointer. gcc complains about casting char* strings to struct pointers, so let's fix the macro's cast to void* to shut up the warnings. While we're at it, fix one of the scrub tests that uses PTR to use BOFF instead for a simpler integer comparison, since other linters whine about char* and void* comparisons. Can't satisfy all these dman bots. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 576d30ecb620ae3bc156dfb2a4e91143e7f3256d Author: Darrick J. Wong Date: Fri Dec 15 10:03:34 2023 -0800 xfs: add missing nrext64 inode flag check to scrub Add this missing check that the superblock nrext64 flag is set if the inode flag is set. Fixes: 9b7d16e34bbeb ("xfs: Introduce XFS_DIFLAG2_NREXT64 and associated helpers") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 259ba1d36f559653390c0e9dbdee5c4ffc28bb29 Author: Darrick J. Wong Date: Fri Dec 15 10:03:34 2023 -0800 xfs: try to attach dquots to files before repairing them Inode resource usage is tracked in the quota metadata. Repairing a file might change the resources used by that file, which means that we need to attach dquots to the file that we're examining before accessing anything in the file protected by the ILOCK. However, there's a twist: a dquot cache miss requires the dquot to be read in from the quota file, during which we drop the ILOCK on the file being examined. This means that we *must* try to attach the dquots before taking the ILOCK. Therefore, dquots must be attached to files in the scrub setup function. If doing so yields corruption errors (or unknown dquot errors), we instead clear the quotachecked status, which will cause a quotacheck on next mount. A future series will make this trigger live quotacheck. While we're here, change the xrep_ino_dqattach function to use the unlocked dqattach functions so that we avoid cycling the ILOCK if the inode already has dquots attached. This makes the naming and locking requirements consistent with the rest of the filesystem. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 9099cd38002f8029c9a1da08e6832d1cd18e8451 Author: Darrick J. Wong Date: Fri Dec 15 10:03:33 2023 -0800 xfs: repair refcount btrees Reconstruct the refcount data from the rmap btree. Link: https://docs.kernel.org/filesystems/xfs-online-fsck-design.html#case-study-rebuilding-the-space-reference-counts Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit d5aa62de1efe0fb8c52acf7103808048ddd38767 Author: Darrick J. Wong Date: Fri Dec 15 10:03:33 2023 -0800 xfs: disable online repair quota helpers when quota not enabled Don't compile the quota helper functions if quota isn't being built into the XFS module. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit dbfbf3bdf639a20da7d5fb390cd2e197d25aa418 Author: Darrick J. Wong Date: Fri Dec 15 10:03:32 2023 -0800 xfs: repair inode btrees Use the rmapbt to find inode chunks, query the chunks to compute hole and free masks, and with that information rebuild the inobt and finobt. Refer to the case study in Documentation/filesystems/xfs-online-fsck-design.rst for more details. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 4bdfd7d15747b170ce93a06fafccaf20544b6684 Author: Darrick J. Wong Date: Fri Dec 15 10:03:32 2023 -0800 xfs: repair free space btrees Rebuild the free space btrees from the gaps in the rmap btree. Refer to the case study in Documentation/filesystems/xfs-online-fsck-design.rst for more details. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 8bd0bf570bd7b5cbcce3f70b760d8dcccd8df6c8 Author: Darrick J. Wong Date: Fri Dec 15 10:03:31 2023 -0800 xfs: remove trivial bnobt/inobt scrub helpers Christoph Hellwig complained about awkward code in the next two repair patches such as: sc->sm->sm_type = XFS_SCRUB_TYPE_BNOBT; error = xchk_bnobt(sc); This is a little silly, so let's export the xchk_{,i}allocbt functions to the dispatch table in scrub.c directly and get rid of the helpers. Originally I had planned each btree gets its own separate entry point, but since repair doesn't work that way, it no longer makes sense to complicate the call chain that way. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit efb43b355457dab474c7eb40d6b2f3cb04c24ecf Author: Darrick J. Wong Date: Fri Dec 15 10:03:31 2023 -0800 xfs: roll the scrub transaction after completing a repair When we've finished repairing an AG header, roll the scrub transaction. This ensure that any failures caused by defer ops failing are captured by the xrep_done tracepoint and that any stacktraces that occur will point to the repair code that caused it, instead of xchk_teardown. Going forward, repair functions should commit the transaction if they're going to return success. Usually the space reaping functions that run after a successful atomic commit of the new metadata will take care of that for us. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 0f08af0f9f3eb4a67fa3849c63e918bac9773da8 Author: Darrick J. Wong Date: Fri Dec 15 10:03:30 2023 -0800 xfs: move the per-AG datatype bitmaps to separate files Move struct xagb_bitmap to its own pair of C and header files per request of Christoph. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 6ece924b95226235059ed2ffc2c0f44a124c5910 Author: Darrick J. Wong Date: Fri Dec 15 10:03:30 2023 -0800 xfs: create separate structures and code for u32 bitmaps Create a version of the xbitmap that handles 32-bit integer intervals and adapt the xfs_agblock_t bitmap to use it. This reduces the size of the interval tree nodes from 48 to 36 bytes and enables us to use a more efficient slab (:0000040 instead of :0000048) which allows us to pack more nodes into a single slab page (102 vs 85). As a side effect, the users of these bitmaps no longer have to convert between u32 and u64 quantities just to use the bitmap; and the hairy overflow checking code in xagb_bitmap_test goes away. Later in this patchset we're going to add bitmaps for xfs_agino_t, xfs_rgblock_t, and xfs_dablk_t, so the increase in code size (5622 vs. 9959 bytes) seems worth it. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e069d549705e49841247acf9b3176744e27d5425 Author: Darrick J. Wong Date: Fri Dec 15 10:03:29 2023 -0800 xfs: constrain dirty buffers while formatting a staged btree Constrain the number of dirty buffers that are locked by the btree staging code at any given time by establishing a threshold at which we put them all on the delwri queue and push them to disk. This limits memory consumption while writing out new btrees. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 6dfeb0c2ecde71d61af77f65eabbdd6ca9315161 Author: Darrick J. Wong Date: Fri Dec 15 10:03:29 2023 -0800 xfs: move btree bulkload record initialization to ->get_record implementations When we're performing a bulk load of a btree, move the code that actually stores the btree record in the new btree block out of the generic code and into the individual ->get_record implementations. This is preparation for being able to store multiple records with a single indirect call. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a20ffa7d9f863056364b11a680145a76ef15acb2 Author: Darrick J. Wong Date: Fri Dec 15 10:03:28 2023 -0800 xfs: add debug knobs to control btree bulk load slack factors Add some debug knobs so that we can control the leaf and node block slack when rebuilding btrees. For developers, it might be useful to construct btrees of various heights by crafting a filesystem with a certain number of records and then using repair+knobs to rebuild the index with a certain shape. Practically speaking, you'd only ever do that for extreme stress testing of the runtime code or the btree generator. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 26de64629d8b439a03bce243f14a46f7440729f3 Author: Darrick J. Wong Date: Fri Dec 15 10:03:28 2023 -0800 xfs: read leaf blocks when computing keys for bulkloading into node blocks When constructing a new btree, xfs_btree_bload_node needs to read the btree blocks for level N to compute the keyptrs for the blocks that will be loaded into level N+1. The level N blocks must be formatted at that point. A subsequent patch will change the btree bulkloader to write new btree blocks in 256K chunks to moderate memory consumption if the new btree is very large. As a consequence of that, it's possible that the buffers for lower level blocks might have been reclaimed by the time the node builder comes back to the block. Therefore, change xfs_btree_bload_node to read the lower level blocks to handle the reclaimed buffer case. As a side effect, the read will increase the LRU refs, which will bias towards keeping new btree buffers in memory after the new btree commits. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c1e0f8e6fb060b23b6f1b82eb4265983f7d271f8 Author: Darrick J. Wong Date: Fri Dec 15 10:03:27 2023 -0800 xfs: set XBF_DONE on newly formatted btree block that are ready for writing The btree bulkloading code calls xfs_buf_delwri_queue_here when it has finished formatting a new btree block and wants to queue it to be written to disk. Once the new btree root has been committed, the blocks (and hence the buffers) will be accessible to the rest of the filesystem. Mark each new buffer as DONE when adding it to the delwri list so that the next btree traversal can skip reloading the contents from disk. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 13ae04d8d45227c2ba51e188daf9fc13d08a1b12 Author: Darrick J. Wong Date: Fri Dec 15 10:03:27 2023 -0800 xfs: force all buffers to be written during btree bulk load While stress-testing online repair of btrees, I noticed periodic assertion failures from the buffer cache about buffers with incorrect DELWRI_Q state. Looking further, I observed this race between the AIL trying to write out a btree block and repair zapping a btree block after the fact: AIL: Repair0: pin buffer X delwri_queue: set DELWRI_Q add to delwri list stale buf X: clear DELWRI_Q does not clear b_list free space X commit delwri_submit # oops Worse yet, I discovered that running the same repair over and over in a tight loop can result in a second race that cause data integrity problems with the repair: AIL: Repair0: Repair1: pin buffer X delwri_queue: set DELWRI_Q add to delwri list stale buf X: clear DELWRI_Q does not clear b_list free space X commit find free space X get buffer rewrite buffer delwri_queue: set DELWRI_Q already on a list, do not add commit BAD: committed tree root before all blocks written delwri_submit # too late now I traced this to my own misunderstanding of how the delwri lists work, particularly with regards to the AIL's buffer list. If a buffer is logged and committed, the buffer can end up on that AIL buffer list. If btree repairs are run twice in rapid succession, it's possible that the first repair will invalidate the buffer and free it before the next time the AIL wakes up. Marking the buffer stale clears DELWRI_Q from the buffer state without removing the buffer from its delwri list. The buffer doesn't know which list it's on, so it cannot know which lock to take to protect the list for a removal. If the second repair allocates the same block, it will then recycle the buffer to start writing the new btree block. Meanwhile, if the AIL wakes up and walks the buffer list, it will ignore the buffer because it can't lock it, and go back to sleep. When the second repair calls delwri_queue to put the buffer on the list of buffers to write before committing the new btree, it will set DELWRI_Q again, but since the buffer hasn't been removed from the AIL's buffer list, it won't add it to the bulkload buffer's list. This is incorrect, because the bulkload caller relies on delwri_submit to ensure that all the buffers have been sent to disk /before/ committing the new btree root pointer. This ordering requirement is required for data consistency. Worse, the AIL won't clear DELWRI_Q from the buffer when it does finally drop it, so the next thread to walk through the btree will trip over a debug assertion on that flag. To fix this, create a new function that waits for the buffer to be removed from any other delwri lists before adding the buffer to the caller's delwri list. By waiting for the buffer to clear both the delwri list and any potential delwri wait list, we can be sure that repair will initiate writes of all buffers and report all write errors back to userspace instead of committing the new structure. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c27032b402a10d9f258224685322f121de0808e5 Merge: e7a4a2fd9a411 3a0e7bb86f872 Author: Mark Brown Date: Fri Dec 15 17:56:07 2023 +0000 ASoC: SOF: query FW config to reload library Merge series from Bard Liao : We should query FW config if context save is supported, and no need to reload FW if hda->booted_from_imr and ipc4_data->fw_context_save are true. commit e9158c7e55339737847cebbfa397c668713f1a15 Author: Dmitry Baryshkov Date: Fri Dec 15 19:30:05 2023 +0200 usb: typec: tcpm: Parse Accessory Mode information Some of the boards supported by the TCPM drivers can support USB-C Accessory Modes (Analog Audio, Debug). Parse information about supported modes from the device tree. Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231215173005.313422-3-dmitry.baryshkov@linaro.org Signed-off-by: Greg Kroah-Hartman commit 76cd718a9ffda837d4b4f1558c6e6ea08a9a7c59 Author: Dmitry Baryshkov Date: Fri Dec 15 19:30:04 2023 +0200 dt-bindings: connector: usb: add accessory mode description Add description of the USB-C Accessory Modes supported on the particular USB-C connector. This is required for devices like Qualcomm SM8150-HDK, which have no other way to express accessory modes supported by the hardware platform. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231215173005.313422-2-dmitry.baryshkov@linaro.org Signed-off-by: Greg Kroah-Hartman commit 532888a59505da2a3fbb4abac6adad381cedb374 Author: Uwe Kleine-König Date: Fri Dec 15 18:45:41 2023 +0100 driver core: Better advertise dev_err_probe() Describing the usage of dev_err_probe() as being (only?) "deemed acceptable" has a bad connotation. In fact dev_err_probe() fulfills three tasks: - handling of EPROBE_DEFER (even more than degrading to dev_dbg()) - symbolic output of the error code - return err for compact error code paths Advertise these better and claim the usage to be "fine" to get rid of the bad connotation. Acked-by: Rafael J. Wysocki Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231215174540.2438601-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 80602b6b5a23b210224a5b44d9e5b5c1dc193632 Author: Mathias Nyman Date: Fri Dec 15 14:57:07 2023 +0200 xhci: Fix null pointer dereference during S4 resume when resetting ep0 During device enumeration usb core resets endpoint 0 if the max packet size value differs from the one read from the device descriptor. usb core will additionally reset endpoint 0 during S4 resume, before re-enumerating the device, if the device has a reset-resume flag set. In this case the xhci device representation vdev may be lost due to xHC restore error and re-initialization during S4 resume. Make sure slot_id and vdev are valid before trying to re-configure max packet size during endpoint 0 reset. max packet size will be re-configured later during re-enumeration. This fixes commit e34900f46cd6 ("xhci: Reconfigure endpoint 0 max packet size only during endpoint reset") which is currently in usb-next, on its way to 6.8 Fixes: e34900f46cd6 ("xhci: Reconfigure endpoint 0 max packet size only during endpoint reset") Tested-by: Wendy Wang Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231215125707.1732989-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c084af69a8f425b8cb56479ff0ea11e48aba0c62 Author: Himanshu Bhavani Date: Fri Dec 15 20:04:57 2023 +0530 usb: dwc3: imx8mp: Fix smatch warning dwc3_imx8mp_pm_resume() warn: 'dwc3_imx->suspend_clk' from clk_prepare_enable() not released Signed-off-by: Himanshu Bhavani Link: https://lore.kernel.org/r/20231215143458.158810-1-himanshu.bhavani@siliconsignals.io Signed-off-by: Greg Kroah-Hartman commit f1fd91a0924b6bff91ca1287461fb8e3b3b61d92 Author: Andrzej Pietrasiewicz Date: Fri Dec 15 14:16:14 2023 +0100 usb: gadget: webcam: Make g_webcam loadable again commit 588b9e85609b ("usb: gadget: uvc: add v4l2 enumeration api calls") has rendered the precomposed (aka legacy) webcam gadget unloadable. uvc_alloc() since then has depended on certain config groups being available in configfs tree related to the UVC function. However, legacy gadgets do not create anything in configfs, so uvc_alloc() must fail with -ENOENT no matter what. This patch mimics the required configfs hierarchy to satisfy the code which inspects formats and frames found in uvcg_streaming_header. This has been tested with guvcview on the host side, using vivid as a source of video stream on the device side and using the userspace program found at https://gitlab.freedesktop.org/camera/uvc-gadget.git. Signed-off-by: Andrzej Pietrasiewicz Fixes: 588b9e85609b ("usb: gadget: uvc: add v4l2 enumeration api calls") Link: https://lore.kernel.org/r/20231215131614.29132-1-andrzej.p@collabora.com Signed-off-by: Greg Kroah-Hartman commit 04e6ccfc93c5a1aa1d75a537cf27e418895e20ea Author: Rafael J. Wysocki Date: Thu Dec 14 11:52:25 2023 +0100 thermal: core: Fix NULL pointer dereference in zone registration error path If device_register() in thermal_zone_device_register_with_trips() returns an error, the tz variable is set to NULL and subsequently dereferenced in kfree(tz->tzp). Commit adc8749b150c ("thermal/drivers/core: Use put_device() if device_register() fails") added the tz = NULL assignment in question to avoid a possible double-free after dropping the reference to the zone device. However, after commit 4649620d9404 ("thermal: core: Make thermal_zone_device_unregister() return after freeing the zone"), that assignment has become redundant, because dropping the reference to the zone device does not cause the zone object to be freed any more. Drop it to address the NULL pointer dereference. Fixes: 3d439b1a2ad3 ("thermal/core: Alloc-copy-free the thermal zone parameters structure") Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba commit 669080888691c312cc926322a7b24600121c90fb Author: Alvin Lee Date: Mon Dec 4 15:19:34 2023 -0500 drm/amd/display: Revert " drm/amd/display: Use channel_width = 2 for vram table 3.0" [Description] Revert commit fec05adc40c2 ("drm/amd/display: Use channel_width = 2 for vram table 3.0") Because the issue is being fixed from VBIOS side. Reviewed-by: Samson Tam Acked-by: Wayne Lin Signed-off-by: Alvin Lee Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c57a0f50c060b7c58f974306fe103eabb881ccbc Author: Muhammad Ahmed Date: Fri Dec 1 19:11:50 2023 -0500 drm/amd/display: remove HPO PG in driver side [why & how] Add config to make HPO PG handled in dmubfw ips entry/exit Reviewed-by: Charlene Liu Acked-by: Wayne Lin Signed-off-by: Muhammad Ahmed Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0f657938e4345a77be871d906f3e0de3c58a7a49 Author: Samson Tam Date: Tue Nov 28 16:53:12 2023 -0500 drm/amd/display: do not send commands to DMUB if DMUB is inactive from S3 [Why] On resume from S3, may get apply_idle_optimizations call while DMUB is inactive which will just time out. [How] Set and track power state in dmub_srv and check power state before sending commands to DMUB. Add interface in both dmub_srv and dc_dmub_srv Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Signed-off-by: Samson Tam Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7046ca9c1ba64938f1b498026419d47b0993c69f Author: Li Ma Date: Fri Dec 15 11:37:20 2023 +0800 drm/amd/swsmu: remove duplicate definition of smu v14_0_0 driver if version There is a repeated define of smu v14_0_0 driver if version, so delete one in driver if header. Signed-off-by: Li Ma Reviewed-by: Kenneth Feng Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit 0c8c0e7a9eebc2de03d161de4376e0d9158b6817 Author: James Zhu Date: Fri Dec 8 17:49:54 2023 -0500 drm/amdgpu: make an improvement on amdgpu_hmm_range_get_pages Only schedule when hmm_range_fault returns error. Signed-off-by: James Zhu Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 78b4dfd35999e22b4f589a3e070c4aa5f07ce3a2 Author: James Zhu Date: Fri Dec 8 17:41:25 2023 -0500 drm/amdgpu: increase hmm range get pages timeout When application tries to allocate all system memory and cause memory to swap out. Needs more time for hmm_range_fault to validate the remaining page for allocation. To be safe, increase timeout value to 1 second for 64MB range. Signed-off-by: James Zhu Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 65a618dd73216e111baab144a837f842dbb6a738 Author: Philip Yang Date: Thu Dec 14 09:42:03 2023 -0500 drm/amdkfd: svm range always mapped flag not working on APU On gfx943 APU there is no VRAM and page migration, queue CWSR area, svm range with always mapped flag, is not mapped to GPU correctly. This works fine if retry fault on CWSR area can be recovered, but could cause deadlock if there is another retry fault recover waiting for CWSR to finish. Fix this by mapping svm range with always mapped flag to GPU with ACCESS attribute if XNACK ON. There is side effect, because all GPUs have ACCESS attribute by default on new svm range with XNACK on, the CWSR area will be mapped to all GPUs after this change. This side effect will be fixed with Thunk change to set CWSR svm range with ACCESS_IN_PLACE attribute on the GPU that user queue is created. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 24149412dfc71f7f4a54868702e9145e396263d3 Author: Jonathan Kim Date: Wed Dec 13 22:08:03 2023 -0500 drm/amdkfd: only flush mes process context if mes support is there Fix up on mes process context flush to prevent non-mes devices from spamming error messages or running into undefined behaviour during process termination. Fixes: bd33bb1409b4 ("drm/amdkfd: fix mes set shader debugger process management") Signed-off-by: Jonathan Kim Reviewed-by: Eric Huang Signed-off-by: Alex Deucher commit d895dbef3f3a31ab50491bb48552e798cf555987 Author: Andy Yan Date: Mon Dec 11 20:00:04 2023 +0800 arm64: dts: rockchip: Add vop on rk3588 Add vop dt node for rk3588. Signed-off-by: Andy Yan Link: https://lore.kernel.org/r/20231211120004.1785616-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit 0c3ebff535956d2718594dc90aa9cc87521ec9fd Author: Kees Cook Date: Thu Dec 14 16:15:13 2023 -0800 scripts: kernel-doc: Clarify missing struct member description The output "or member" should be more specific, instead saying "struct member". Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231215001513.work.563-kees@kernel.org commit eeddfa5be17ba0fa2d98874aa881683373bf7180 Author: Kees Cook Date: Thu Dec 14 16:13:54 2023 -0800 docs: conf.py: Ignore __counted_by attribute It seems that Sphinx is confused by the __counted_by attribute on struct members. Add it to the list of known attributes. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312150614.kOx8xUkr-lkp@intel.com/ Cc: Jonathan Corbet Cc: "Gustavo A. R. Silva" Cc: linux-doc@vger.kernel.org Cc: linux-hardening@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231215001347.work.151-kees@kernel.org commit a3a27827452fdc64fb39698909df9a75021c018d Author: Vlastimil Babka Date: Thu Dec 14 13:22:52 2023 +0100 Documentation, mm/unaccepted: document accept_memory kernel parameter The accept_memory kernel parameter was added in commit dcdfdd40fa82 ("mm: Add support for unaccepted memory") but not listed in the kernel-parameters doc. Add it there. Acked-by: "Kirill A. Shutemov" Signed-off-by: Vlastimil Babka Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231214-accept_memory_param-v2-1-f38cd20a0247@suse.cz commit b9ae996210163e89a2a9aece7c582fb43694485a Author: Michal Simek Date: Thu Dec 14 15:53:48 2023 +0100 firmware: xilinx: Remove zynqmp_pm_pinctrl_get_function() There is no user for this interface that's why remove it. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/e52a415a004e28a43e6d08e9e22d9e8fef3737df.1702565618.git.michal.simek@amd.com Signed-off-by: Greg Kroah-Hartman commit 8d6608e4f89a0a21caadcf32fb5ed700e2f5682d Author: Michal Simek Date: Thu Dec 14 15:53:47 2023 +0100 firmware: xilinx: Remove clock_setrate and clock_getrate api As per the current code base, PM_CLOCK_SETRATE and PM_CLOCK_GETRATE APIs are not supported for the runtime operations. In the case of ZynqMP returning an error from TF-A when there is any request to access these APIs and for Versal also it is returning an error like NO_ACCESS from the firmware. So, just removing the unused code to avoid the confusion around these APIs. Also, there is no issue with the backward compatibility as these APIs were never used since implemented. Hence no need to bump up the version of the feature check API as well. Signed-off-by: Ronak Jain Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/6ccbffbafd1f0f48f6574d5a3bf2db6a5603fdb0.1702565618.git.michal.simek@amd.com Signed-off-by: Greg Kroah-Hartman commit de264ddea73d445d3982a6defae334d6b5ebc05e Author: Christophe JAILLET Date: Sat Dec 9 13:36:15 2023 +0100 VMCI: Remove VMCI_HANDLE_ARRAY_HEADER_SIZE and VMCI_HANDLE_ARRAY_MAX_CAPACITY Remove VMCI_HANDLE_ARRAY_HEADER_SIZE and VMCI_HANDLE_ARRAY_MAX_CAPACITY that are unused. Suggested-by: Kees Cook Signed-off-by: Christophe JAILLET Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/00547fe74efe329b266eb8074c41f286758a3c64.1702125347.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit bda910d81843228c18d1ac51af6b149f2e8261c7 Author: Christophe JAILLET Date: Sat Dec 9 13:36:14 2023 +0100 VMCI: Remove handle_arr_calc_size() Use struct_size() instead of handle_arr_calc_size(). This is much more conventional. While at it, use size_add() when computing the needed size in vmci_handle_arr_append_entry(). This prevents from (unlikely) overflow when computing the new size to reallocate. Suggested-by: Kees Cook Signed-off-by: Christophe JAILLET Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/84e7f2d8e7c4c2eab68f958307d56546978f76e3.1702125347.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit c49739235c426b05539589de2ffde2bbf71ae468 Author: Sen Chu Date: Wed Dec 6 15:17:31 2023 -0800 spmi: mediatek: add device id check Add device id check for spmi write API. Signed-off-by: Sen Chu Link: https://lore.kernel.org/r/20230518040729.8789-1-sen.chu@mediatek.com Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231206231733.4031901-9-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3ae3cf418a01203c33113e19cc1029ac434c96b5 Author: Fei Shao Date: Wed Dec 6 15:17:30 2023 -0800 spmi: Return meaningful errors in spmi_controller_alloc() spmi_controller_alloc() currently returns NULL to all types of errors, which can be improved. Use appropriate error code in returns and pass the errors from used functions where possible. Signed-off-by: Fei Shao Link: https://lore.kernel.org/r/20230824104101.4083400-6-fshao@chromium.org Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231206231733.4031901-8-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 490d88ef548d463c85bd75ef5300b25c92d71e5a Author: Fei Shao Date: Wed Dec 6 15:17:29 2023 -0800 spmi: hisi-spmi-controller: Use devm_spmi_controller_add() Convert to the device-managed version of spmi_controller_add() and delete the unnecessary driver remove callback. Signed-off-by: Fei Shao Link: https://lore.kernel.org/r/20230824104101.4083400-5-fshao@chromium.org Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231206231733.4031901-7-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit f3e67fc406909fca9429b4283f243e855fab5c59 Author: Fei Shao Date: Wed Dec 6 15:17:28 2023 -0800 spmi: mtk-pmif: Reorder driver remove sequence This driver enables clocks and then adds SPMI controller in probing, so we expect the reversed sequence in removal. Fix the order in the remove callback. Signed-off-by: Fei Shao Link: https://lore.kernel.org/r/20230824104101.4083400-4-fshao@chromium.org Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231206231733.4031901-6-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit ffdfbafdc4f46a92e6bebaa61048b9f56301e2fa Author: Fei Shao Date: Wed Dec 6 15:17:27 2023 -0800 spmi: Use devm_spmi_controller_alloc() Convert to the device-managed version of spmi_controller_alloc() and simplify the excess error handling code. Signed-off-by: Fei Shao Link: https://lore.kernel.org/r/20230824104101.4083400-3-fshao@chromium.org Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231206231733.4031901-5-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit b6e53731e07db7e8d35b789fd83565fe75540180 Author: Fei Shao Date: Wed Dec 6 15:17:26 2023 -0800 spmi: Introduce device-managed functions Utilize the managed resource (devres) framework and add the following devm_* helpers for the SPMI driver: - devm_spmi_controller_alloc() - devm_spmi_controller_add() [sboyd@kernel.org: Rename to spmi-devres for module niceness, slap on GPL module license] Signed-off-by: Fei Shao Link: https://lore.kernel.org/r/20230824104101.4083400-2-fshao@chromium.org Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231206231733.4031901-4-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit e821d50ab5b956ed0effa49faaf29912fd4106d9 Author: Yu-Che Cheng Date: Wed Dec 6 15:17:25 2023 -0800 spmi: mediatek: Fix UAF on device remove The pmif driver data that contains the clocks is allocated along with spmi_controller. On device remove, spmi_controller will be freed first, and then devres , including the clocks, will be cleanup. This leads to UAF because putting the clocks will access the clocks in the pmif driver data, which is already freed along with spmi_controller. This can be reproduced by enabling DEBUG_TEST_DRIVER_REMOVE and building the kernel with KASAN. Fix the UAF issue by using unmanaged clk_bulk_get() and putting the clocks before freeing spmi_controller. Reported-by: Fei Shao Signed-off-by: Yu-Che Cheng Link: https://lore.kernel.org/r/20230717173934.1.If004a6e055a189c7f2d0724fa814422c26789839@changeid Tested-by: Fei Shao Reviewed-by: Fei Shao Reviewed-by: Chen-Yu Tsai Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231206231733.4031901-3-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit f200fff8d019f2754f91f5d715652e3e3fdf3604 Author: Nícolas F. R. A. Prado Date: Wed Dec 6 15:17:24 2023 -0800 spmi: mtk-pmif: Serialize PMIF status check and command submission Before writing the read or write command to the SPMI arbiter through the PMIF interface, the current status of the channel is checked to ensure it is idle. However, since the status only changes from idle when the command is written, it is possible for two concurrent calls to determine that the channel is idle and simultaneously send their commands. At this point the PMIF interface hangs, with the status register no longer being updated, and thus causing all subsequent operations to time out. This was observed on the mt8195-cherry-tomato-r2 machine, particularly after commit 46600ab142f8 ("regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.10 and 5.15") was applied, since then the two MT6315 devices present on the SPMI bus would probe assynchronously and sometimes (during probe or at a later point) read the bus simultaneously, breaking the PMIF interface and consequently slowing down the whole system. To fix the issue at its root cause, introduce locking around the channel status check and the command write, so that both become an atomic operation, preventing race conditions between two (or more) SPMI bus read/write operations. A spinlock is used since this is a fast bus, as indicated by the usage of the atomic variant of readl_poll, and '.fast_io = true' being used in the mt6315 driver, so spinlocks are already used for the regmap access. Fixes: b45b3ccef8c0 ("spmi: mediatek: Add support for MT6873/8192") Signed-off-by: Nícolas F. R. A. Prado Link: https://lore.kernel.org/r/20230724154739.493724-1-nfraprado@collabora.com Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231206231733.4031901-2-sboyd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 117cc0efb02374fb84bd546e2e706637db167bd6 Author: Ricky Wu Date: Fri Dec 8 11:21:45 2023 +0800 mmc: rtsx: add rts5264 to support sd express card rts5264 can support sd express card, so add the id in sd express card init to do rts5264 register setting when the sd express card insert Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20231208032145.2143580-4-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit 6a511c9b3a0df7a10b06694c20f3ebdc08be98cd Author: Ricky Wu Date: Fri Dec 8 11:21:44 2023 +0800 misc: rtsx: add to support new card reader rts5264 in order to support rts5264 in rtsx_pcr add the id in and determine whether the device is rts5264 to call rts5264 functions and do rts5264 workflows or set rts5264 registers Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20231208032145.2143580-3-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit c27dfca4555bf74dd7dd7161d8ef2790ec1c7283 Author: Ricky Wu Date: Fri Dec 8 11:21:43 2023 +0800 misc: rtsx: add to support new card reader rts5264 new definition and function in order to support NEW chip rts5264, the definitions of some internal registers are define in new file rts5264.h, and some callback functions and the workflow for rts5264 are define in new file rts5264.c also add rts5264.o to Makefile Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20231208032145.2143580-2-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit aaee477e3e2c7305a95ffc528bf831a13da3dacb Author: Rob Herring Date: Thu Dec 7 10:31:27 2023 -0600 cdx: Explicitly include correct DT includes, again The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. CDX was fixed once, but commit ("cdx: Remove cdx controller list from cdx bus system") added another occurrence. Fixes: 54b406e10f03 ("cdx: Remove cdx controller list from cdx bus system") Signed-off-by: Rob Herring Acked-by: Nikhil Agarwal Link: https://lore.kernel.org/r/20231207163128.2707993-2-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit ff6d413b0b59466e5acf2e42f294b1842ae130a1 Author: Kees Cook Date: Tue Dec 12 13:17:40 2023 -0800 kernfs: Convert kernfs_path_from_node_locked() from strlcpy() to strscpy() One of the last remaining users of strlcpy() in the kernel is kernfs_path_from_node_locked(), which passes back the problematic "length we _would_ have copied" return value to indicate truncation. Convert the chain of all callers to use the negative return value (some of which already doing this explicitly). All callers were already also checking for negative return values, so the risk to missed checks looks very low. In this analysis, it was found that cgroup1_release_agent() actually didn't handle the "too large" condition, so this is technically also a bug fix. :) Here's the chain of callers, and resolution identifying each one as now handling the correct return value: kernfs_path_from_node_locked() kernfs_path_from_node() pr_cont_kernfs_path() returns void kernfs_path() sysfs_warn_dup() return value ignored cgroup_path() blkg_path() bfq_bic_update_cgroup() return value ignored TRACE_IOCG_PATH() return value ignored TRACE_CGROUP_PATH() return value ignored perf_event_cgroup() return value ignored task_group_path() return value ignored damon_sysfs_memcg_path_eq() return value ignored get_mm_memcg_path() return value ignored lru_gen_seq_show() return value ignored cgroup_path_from_kernfs_id() return value ignored cgroup_show_path() already converted "too large" error to negative value cgroup_path_ns_locked() cgroup_path_ns() bpf_iter_cgroup_show_fdinfo() return value ignored cgroup1_release_agent() wasn't checking "too large" error proc_cgroup_show() already converted "too large" to negative value Cc: Greg Kroah-Hartman Cc: Tejun Heo Cc: Zefan Li Cc: Johannes Weiner Cc: Waiman Long Cc: Co-developed-by: Azeem Shaikh Signed-off-by: Azeem Shaikh Link: https://lore.kernel.org/r/20231116192127.1558276-3-keescook@chromium.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20231212211741.164376-3-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 5b56bf5cdb8b7c989055fe4d73fe3f409427d1d5 Author: Kees Cook Date: Tue Dec 12 13:17:39 2023 -0800 kernfs: Convert kernfs_name_locked() from strlcpy() to strscpy() strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). Nothing actually checks the return value coming from kernfs_name_locked(), so this has no impact on error paths. The caller hierarchy is: kernfs_name_locked() kernfs_name() pr_cont_kernfs_name() return value ignored cgroup_name() current_css_set_cg_links_read() return value ignored print_page_owner_memcg() return value ignored Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Cc: Greg Kroah-Hartman Cc: Tejun Heo Cc: Azeem Shaikh Link: https://lore.kernel.org/r/20231116192127.1558276-2-keescook@chromium.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20231212211741.164376-2-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 792e04768efbf2a1b49a7162a9fa06c1fa584723 Author: Kees Cook Date: Tue Dec 12 13:17:38 2023 -0800 kernfs: Convert kernfs_walk_ns() from strlcpy() to strscpy() strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Cc: Greg Kroah-Hartman Cc: Tejun Heo Cc: Azeem Shaikh Link: https://lore.kernel.org/r/20231116192127.1558276-1-keescook@chromium.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20231212211741.164376-1-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 2678fd2fe9ee2c569e9cb6b17e786bc8f0753538 Author: Alexander Graf Date: Thu Dec 7 23:56:54 2023 +0000 initramfs: Expose retained initrd as sysfs file When the kernel command line option "retain_initrd" is set, we do not free the initrd memory. However, we also don't expose it to anyone for consumption. That leaves us in a weird situation where the only user of this feature is ppc64 and arm64 specific kexec tooling. To make it more generally useful, this patch adds a kobject to the firmware object that contains the initrd context when "retain_initrd" is set. That way, we can access the initrd any time after boot from user space and for example hand it into kexec as --initrd parameter if we want to reboot the same initrd. Or inspect it directly locally. With this patch applied, there is a new /sys/firmware/initrd file when the kernel was booted with an initrd and "retain_initrd" command line option is set. Signed-off-by: Alexander Graf Tested-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20231207235654.16622-1-graf@amazon.com Signed-off-by: Greg Kroah-Hartman commit 5133bee62f0ea5d4c316d503cc0040cac5637601 Author: Max Kellermann Date: Fri Dec 8 10:33:10 2023 +0100 fs/kernfs/dir: obey S_ISGID Handling of S_ISGID is usually done by inode_init_owner() in all other filesystems, but kernfs doesn't use that function. In kernfs, struct kernfs_node is the primary data structure, and struct inode is only created from it on demand. Therefore, inode_init_owner() can't be used and we need to imitate its behavior. S_ISGID support is useful for the cgroup filesystem; it allows subtrees managed by an unprivileged process to retain a certain owner gid, which then enables sharing access to the subtree with another unprivileged process. -- v1 -> v2: minor coding style fix (comment) Signed-off-by: Max Kellermann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20231208093310.297233-2-max.kellermann@ionos.com Signed-off-by: Greg Kroah-Hartman commit fe3de0102bc830e78d80dbf6e2dd29c520d68575 Author: Max Kellermann Date: Fri Dec 8 10:33:09 2023 +0100 kernel/cgroup: use kernfs_create_dir_ns() By passing the fsugid to kernfs_create_dir_ns(), we don't need cgroup_kn_set_ugid() any longer. That function was added for exactly this purpose by commit 49957f8e2a43 ("cgroup: newly created dirs and files should be owned by the creator"). Eliminating this piece of duplicate code means we benefit from future improvements to kernfs_create_dir_ns(); for example, both are lacking S_ISGID support currently, which my next patch will add to kernfs_create_dir_ns(). It cannot (easily) be added to cgroup_kn_set_ugid() because we can't dereference struct kernfs_iattrs from there. -- v1 -> v2: 12-digit commit id Signed-off-by: Max Kellermann Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20231208093310.297233-1-max.kellermann@ionos.com Signed-off-by: Greg Kroah-Hartman commit b77fdd6a48e60a0ed1865edbe6d9bf0538551f85 Author: Randy Dunlap Date: Wed Dec 13 23:02:00 2023 -0800 scripts/kernel-doc: restore warning for Excess struct/union The warning for Excess struct or union member description was removed when the $nested parameter of check_sections() was removed. This causes some kernel-doc notation warnings to be missed. Recently the kernel test robot somehow reported an Excess member. The code in kernel-doc has not issued that warning since kernel v4.16, so I don't know how the robot did it. (See the Link for the report.) drivers/net/wireless/intel/iwlwifi/fw/dbg.c:86: warning: Excess struct/union/enum/typedef member 'trans_len' description in 'iwl_fw_dump_ptrs' I patched that warning away even though I could not reproduce the warning from kernel-doc. The warning should be issued for extraneous struct member or union member description, so restore it. Fixes: 1081de2d2f91 ("scripts: kernel-doc: get rid of $nested parameter") Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/all/202312060810.QT9zourt-lkp@intel.com/ Cc: Mauro Carvalho Chehab Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Reviewed-by: Kees Cook Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231214070200.24405-1-rdunlap@infradead.org commit 121d0ba224d94ba7c16cc40faa48895496cb560c Author: Rex Nie Date: Wed Dec 13 15:37:35 2023 +0800 Documentation: Remove redundant file names from examples Since most examples use the ddcmd alias, remove the redundant file names Signed-off-by: Rex Nie Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231213073735.2850-1-rex.nie@jaguarmicro.com commit 1a737d5ea69d220463150523e41efa70ff17ecf4 Author: Lukas Bulwahn Date: Mon Dec 11 08:42:42 2023 +0100 misc: nsm: remove selecting the non-existing config CBOR Commit b9873755a6c8 ("misc: Add Nitro Secure Module driver") adds Nitro Security Module support, which selects the non-existing config CBOR. In the development of the commit, there was initially some code for CBOR independent of the driver, and the driver included this code with the line 'select CBOR'. This code for CBOR was later reduced to its bare minimum of functionality and included into the driver itself. The select CBOR remained unnoticed and was left behind without having any further purpose. Remove selecting the non-existing config CBOR. Signed-off-by: Lukas Bulwahn Reviewed-by: Alexander Graf Link: https://lore.kernel.org/r/20231211074242.22999-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1b775e616ec8ea1e4faa326a73640c9cc1087368 Author: Uwe Kleine-König Date: Fri Dec 8 17:08:12 2023 +0100 pcmcia: xxs1500_ss: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/09a89926787cb9f64caa73c510f04d9f04a5136f.1702051073.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit c1991d49bb95be1086e5b9e6980fd00cb3d06bc3 Author: Uwe Kleine-König Date: Fri Dec 8 17:08:11 2023 +0100 pcmcia: sa1100: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/6473afe67fc5c320a8184d0871a8561f7685e265.1702051073.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit e5b25d20b6017a808bb6a46caa7a3094813d069f Author: Uwe Kleine-König Date: Fri Dec 8 17:08:10 2023 +0100 pcmcia: pxa2xx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/fb750d46ac80b6dfdeaa26053a2cf9d2dc875d4d.1702051073.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 560bb502ea1639fc3ab839c00bb28c05591fdb1b Author: Uwe Kleine-König Date: Fri Dec 8 17:08:09 2023 +0100 pcmcia: omap_cf: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/9d96646b75b10f7562d4d18010e885b7fc55e0ab.1702051073.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 292006710d87cb54927e551bc306401fb398a3ed Author: Uwe Kleine-König Date: Fri Dec 8 17:08:08 2023 +0100 pcmcia: electra_cf: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/7b07c8624ab53ec90554b7a665bef7662bd94295.1702051073.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 89493fc6bd2aeccfaae776b3f8a2a4a2ab69825d Author: Uwe Kleine-König Date: Fri Dec 8 17:08:07 2023 +0100 pcmcia: db1xxx_ss: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/3d4c108421f2b1175d3a75ee6854e7772f8a0f82.1702051073.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ed2b5f50b043edcaa044da6ba254877224511802 Author: Uwe Kleine-König Date: Fri Dec 8 17:08:06 2023 +0100 pcmcia: bcm63xx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/33611a4245b4dabc609a75cf0e0db5e06e9a6fc8.1702051073.git.u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit fddd9e3e4e716e3c484413b95579b40a7b6dbe41 Author: Dan Williams Date: Wed Dec 6 17:59:38 2023 -0800 tools/testing/nvdimm: Add compile-test coverage for ndtest Greg lamented: "Ick, sorry about that, obviously this test isn't actually built by any bots :(" A quick and dirty way to prevent this problem going forward is to always compile ndtest.ko whenever nfit_test is built. While this still does not expose the test code to any of the known build bots, it at least makes it the case that anyone that runs the x86 tests also compiles the powerpc test. I.e. the Intel NVDIMM maintainers are less likely to fall into this hole in the future. Link: http://lore.kernel.org/r/2023112729-aids-drainable-5744@gregkh Cc: Greg KH Cc: Yi Zhang Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams Reviewed-by: Ira Weiny Reviewed-by: Dave Jiang Link: https://lore.kernel.org/r/170191437889.426826.15528612879942432918.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Greg Kroah-Hartman commit ce8df3f4d0d99ee2f76d1260fe69793ad05a13bf Author: Randy Dunlap Date: Tue Dec 5 21:58:21 2023 -0800 mcb: core: fix kernel-doc warnings Correct function comments to prevent warnings from scripts/kernel-doc. mcb-core.c:270: warning: Function parameter or member 'carrier' not described in 'mcb_alloc_bus' mcb-core.c:336: warning: expecting prototype for mcb_bus_put(). Prototype was for mcb_bus_get() instead mcb-core.c:463: warning: Function parameter or member 'mem' not described in 'mcb_release_mem' mcb-core.c:463: warning: Excess function parameter 'dev' description in 'mcb_release_mem' Signed-off-by: Randy Dunlap Cc: Johannes Thumshirn Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231206055821.17284-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 3634783be125381c6d390938d08cbcc47fed3b73 Author: Alice Ryhl Date: Fri Dec 8 15:28:01 2023 +0000 binder: use enum for binder ioctls All of the other constants in this file are defined using enums, so make the constants more consistent by defining the ioctls in an enum as well. This is necessary for Rust Binder since the _IO macros are too complicated for bindgen to see that they expand to integer constants. Replacing the #defines with an enum forces bindgen to evaluate them properly, which allows us to access them from Rust. I originally intended to include this change in the first patch of the Rust Binder patchset [1], but at plumbers Carlos Llamas told me that this change has been discussed previously [2] and suggested that I send it upstream separately. Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-1-08ba9197f637@google.com/ [1] Link: https://lore.kernel.org/all/YoIK2l6xbQMPGZHy@kroah.com/ [2] Signed-off-by: Alice Ryhl Acked-by: Carlos Llamas Link: https://lore.kernel.org/r/20231208152801.3425772-1-aliceryhl@google.com Signed-off-by: Greg Kroah-Hartman commit 8bbe8a7dbaabb84d93321f116966af73ba6a7233 Author: Bhavya Kapoor Date: Fri Dec 1 13:50:45 2023 +0530 arm64: dts: ti: k3-j784s4-main: Add Itap Delay Value For DDR50 speed mode DDR50 speed mode is enabled for MMCSD in J784s4 but its Itap Delay Value is not present in the device tree. Thus, add Itap Delay Value for MMCSD High Speed DDR which is DDR50 speed mode for J784s4 SoC according to datasheet for J784s4. [+] Refer to : section 7.10.5.17.2 MMC1/2 - SD/SDIO Interface, in J784s4 datasheet - https://www.ti.com/lit/ds/symlink/tda4vh-q1.pdf Signed-off-by: Bhavya Kapoor Reviewed-by: Judith Mendez Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20231201082045.790478-4-b-kapoor@ti.com Signed-off-by: Nishanth Menon commit 4a52a8208568a85b0d51e5ca81be5925973ef108 Author: Bhavya Kapoor Date: Fri Dec 1 13:50:44 2023 +0530 arm64: dts: ti: k3-j721s2-main: Add Itap Delay Value For DDR50 speed mode DDR50 speed mode is enabled for MMCSD in J721s2 but its Itap Delay Value is not present in the device tree. Thus, add Itap Delay Value for MMCSD High Speed DDR which is DDR50 speed mode for J721s2 SoC according to datasheet for J721s2. [+] Refer to : section 7.10.5.17.2 MMC1/2 - SD/SDIO Interface, in J721s2 datasheet - https://www.ti.com/lit/ds/symlink/tda4vl-q1.pdf Signed-off-by: Bhavya Kapoor Reviewed-by: Judith Mendez Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20231201082045.790478-3-b-kapoor@ti.com Signed-off-by: Nishanth Menon commit 908999561b4340089896b89cef51dae07fc001cb Author: Bhavya Kapoor Date: Fri Dec 1 13:50:43 2023 +0530 arm64: dts: ti: k3-j7200-main: Add Itap Delay Value For DDR52 speed mode DDR52 speed mode is enabled for eMMC in J7200 but its Itap Delay Value is not present in the device tree. Thus, add Itap Delay Value for eMMC High Speed DDR which is DDR52 speed mode for J7200 SoC according to datasheet for J7200. [+] Refer to : section 7.9.5.16.1 MMCSD0 - eMMC Interface, in J7200 datasheet - https://www.ti.com/lit/ds/symlink/dra821u-q1.pdf Signed-off-by: Bhavya Kapoor Reviewed-by: Judith Mendez Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20231201082045.790478-2-b-kapoor@ti.com Signed-off-by: Nishanth Menon commit 7643f7ebcbc723e682d22c207ac35b41d7248650 Author: Vignesh Raghavendra Date: Wed Dec 13 19:21:38 2023 +0530 arm64: dts: ti: k3-am6*: Add additional regs for DMA components Add additional reg properties for BCDMA and PKTDMA nodes which are mostly used by bootloader components before Device Manager firmware services are available, in order to setup DMA transfers. Signed-off-by: Vignesh Raghavendra Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20231213135138.929517-4-vigneshr@ti.com Signed-off-by: Nishanth Menon commit 1b62a3cfddbb5664bc4360b3cb0d76b9b99abdc5 Author: Manorit Chawdhry Date: Wed Dec 13 19:21:37 2023 +0530 arm64: dts: ti: k3-j7*: Add additional regs for DMA components Add additional reg properties for UDMA and RingAcc nodes which are mostly used by bootloader components before Device Manager firmware services are available, in order to setup DMA transfers. Signed-off-by: Manorit Chawdhry Signed-off-by: Vignesh Raghavendra Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20231213135138.929517-3-vigneshr@ti.com Signed-off-by: Nishanth Menon commit 0fa8d3a5eb8e737726a3c7376222ee40fae1988d Author: Manorit Chawdhry Date: Wed Dec 13 19:21:36 2023 +0530 arm64: dts: ti: k3-am65: Add additional regs for DMA components Add additional reg properties for UDMA and RingAcc nodes which are mostly used by bootloader components before Device Manager firmware services are available, in order to setup DMA transfers. Signed-off-by: Manorit Chawdhry Signed-off-by: Vignesh Raghavendra Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20231213135138.929517-2-vigneshr@ti.com Signed-off-by: Nishanth Menon commit 99aa6117a34eef02c135a7199c709541d4445677 Author: Donald Hunter Date: Tue Dec 12 21:31:37 2023 +0000 docs: Change

style to use smaller font size than

The docs currently have

and

set to the same font size which makes headings hard to distinguish.

to

already have entries in sphinx-static/custom.css to shrink their size a bit from the alabaster theme. Add

to custom.css and set it to be smaller than

. Signed-off-by: Donald Hunter Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231212213137.98453-1-donald.hunter@gmail.com commit d667378ade2367fc0423ebcfd79d3a0e813ebd5c Author: Arnd Bergmann Date: Thu Dec 14 18:39:32 2023 +0000 mei: rework Kconfig dependencies The dependencies in the mei framework are inconsistent, with some symbols using 'select INTEL_MEI' to force it being enabled and others using 'depends on INTEL_MEI'. In general, one should not select user-visible symbols, so change all of these to normal dependencies, but change the default on INTEL_MEI to be enabled when building a kernel for an Intel CPU with ME or a generic x86 kernel. Having consistent dependencies makes the 'menuconfig' listing more readable by using proper indentation. A large if/endif block is just a simpler syntax than repeating the dependencies for each symbol. Signed-off-by: Arnd Bergmann Reviewed-by: Wentong Wu Link: https://lore.kernel.org/r/20231214183946.109124-2-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 95171e45663307fc33a939f0220b39afadfe7cb9 Author: Arnd Bergmann Date: Thu Dec 14 18:39:31 2023 +0000 mei: fix vsc dependency CONFIG_INTEL_MEI_VSC_HW can be set to built-in even with CONFIG_MEI=m, but then the driver is not built because Kbuild never enters the drivers/misc/mei directory for built-in files, leading to a link failure: ERROR: modpost: "vsc_tp_reset" [drivers/misc/mei/mei-vsc.ko] undefined! ERROR: modpost: "vsc_tp_init" [drivers/misc/mei/mei-vsc.ko] undefined! ERROR: modpost: "vsc_tp_xfer" [drivers/misc/mei/mei-vsc.ko] undefined! ERROR: modpost: "vsc_tp_need_read" [drivers/misc/mei/mei-vsc.ko] undefined! ERROR: modpost: "vsc_tp_intr_enable" [drivers/misc/mei/mei-vsc.ko] undefined! ERROR: modpost: "vsc_tp_intr_synchronize" [drivers/misc/mei/mei-vsc.ko] undefined! ERROR: modpost: "vsc_tp_intr_disable" [drivers/misc/mei/mei-vsc.ko] undefined! ERROR: modpost: "vsc_tp_register_event_cb" [drivers/misc/mei/mei-vsc.ko] undefined! Add an explicit dependency on CONFIG_MEI that was apparently missing, to ensure the VSC_HW driver cannot be built-in with MEI itself being a loadable module. Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device") Signed-off-by: Arnd Bergmann Reviewed-by: Sakari Ailus Reviewed-by: Wentong Wu Link: https://lore.kernel.org/r/20231214183946.109124-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5370a431ef915b52697d25a5a32cbaf9a4cbef95 Author: Sakari Ailus Date: Wed Dec 13 11:40:55 2023 +0200 mei: vsc: Rework firmware image names Rework firmware image names with the users in mind---there's no need for variation between firmware names, apart from connected sensors. All supported SoCs use the same firmware, too. Use a single set of firmware binaries and assume they'll be found under intel/vsc directory. Signed-off-by: Sakari Ailus Tested-by: Wentong Wu Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231213094055.446611-1-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ea0e635fe53409fc6c1060eb1851b986bf07061e Author: Alexander Usyskin Date: Thu Dec 14 16:37:52 2023 +0200 mei: pxp: spdx should be at first line Remove stray empty line at the beginning of the file to have SPDX header t the first line. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20231214143752.294008-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit a7565fc8399725d00cc006c35d0621a5cb5f9554 Author: Randy Dunlap Date: Wed Dec 13 14:40:14 2023 -0800 mei: fix spellos in mei.h For include/uapi/linux/mei.h, correct spellos reported by codespell. Signed-off-by: Randy Dunlap Cc: Tomas Winkler Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231213224014.23187-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit fd6ed1772b2c639370b7b41602d4c925dbd003d4 Author: Kalle Valo Date: Thu Dec 14 18:17:40 2023 +0200 wifi: ath11k: workaround too long expansion sparse warnings In v6.7-rc1 sparse warns: drivers/net/wireless/ath/ath11k/mac.c:4702:15: error: too long token expansion drivers/net/wireless/ath/ath11k/mac.c:4702:15: error: too long token expansion drivers/net/wireless/ath/ath11k/mac.c:8393:23: error: too long token expansion drivers/net/wireless/ath/ath11k/mac.c:8393:23: error: too long token expansion Workaround the warnings by refactoring the code to a new function, which also reduces code duplication. And in the new function use max3() to make the code more readable. No functional changes, compile tested only. Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20231214161740.1582340-1-kvalo@kernel.org commit e75fda64f0fee2599e28b123594375ccd8991507 Author: Karthikeyan Periyasamy Date: Thu Dec 14 11:02:15 2023 +0530 Revert "wifi: ath12k: use ATH12K_PCI_IRQ_DP_OFFSET for DP IRQ" This reverts commit 1f1f7d548a00ebe50808cb1f580df9693e194a7c. The commit caused bootup failure on QCN9274 hw2.0 platform. Incorrect hardcode DP irq offset overwrite the CE irq, which caused the driver to miss the mandatory bootup message from the firmware through the CE interrupt. This occurs because the CE count differs between platforms. The revert has no impact since the original change was based on an incorrect assumption. Log: ath12k_pci 0000:06:00.0: fw_version 0x1011001d fw_build_timestamp 2022-12-02 01:16 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 ath12k_pci 0000:06:00.0: failed to receive control response completion, polling.. ath12k_pci 0000:06:00.0: Service connect timeout ath12k_pci 0000:06:00.0: failed to connect to HTT: -110 ath12k_pci 0000:06:00.0: failed to start core: -110 Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://msgid.link/20231214053215.2087308-1-quic_periyasa@quicinc.com commit 3a21a218a7b6cc92588e6c7a11bfa9b723020094 Author: Avadhut Naik Date: Sun Dec 10 20:37:30 2023 -0600 docs/sp_SP: Move howto.rst into /sp_SP/process/ Move the howto.rst file in Spanish translation to /sp_SP/process/ to ensure its location is symmetrical to its corresponding version in English. Signed-off-by: Avadhut Naik Reviewed-by: Carlos Bilbao Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231211023730.2026204-5-avadhut.naik@amd.com commit b194e3b72300162753dd05b0a9a9506ac58c0347 Author: Avadhut Naik Date: Sun Dec 10 20:37:29 2023 -0600 docs/sp_SP: Warn of links pointing to documentation in English By default, links in translated Spanish documentation redirect to documents in English, even if their corresponding Spanish version exists. Warn readers about this beforehand through disclaimer.rst. Signed-off-by: Avadhut Naik Reviewed-by: Carlos Bilbao Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231211023730.2026204-4-avadhut.naik@amd.com commit f12cf74e137517e0507c437de98494c332215238 Author: Avadhut Naik Date: Sun Dec 10 20:37:28 2023 -0600 docs/sp_SP: Add translation of process/submit-checklist Translate Documentation/process/submit-checklist.rst into Spanish. Signed-off-by: Avadhut Naik Reviewed-by: Carlos Bilbao Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231211023730.2026204-3-avadhut.naik@amd.com commit c8de8230de17bfe5a18d6e1f636008fc9deb2284 Author: Avadhut Naik Date: Sun Dec 10 20:37:27 2023 -0600 docs/sp_SP: Add translation of process/management-style Translate Documentation/process/management-style.rst into Spanish. Signed-off-by: Avadhut Naik Reviewed-by: Carlos Bilbao Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231211023730.2026204-2-avadhut.naik@amd.com commit 0a10d107818cc4def73723ba3101aae0d25ea353 Author: Bartosz Golaszewski Date: Tue Dec 12 11:55:01 2023 +0100 gpiolib: allocate memory atomically with a spinlock held We will eventually switch to protecting the GPIO descriptors with a mutex but until then, we need to allocate memory for the label copy atomically while we're holding the global spinlock. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-gpio/62588146-eed6-42f7-ba26-160226b109fe@moroto.mountain/T/#u Fixes: f8d05e276b45 ("gpiolib: remove gpiochip_is_requested()") Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij commit 3e893e16af55eeeca8faebabcb36fe78c854ba21 Author: Jonathan Corbet Date: Fri Dec 8 16:10:17 2023 -0700 docs: Raise the minimum Sphinx requirement to 2.4.4 Commit 31abfdda6527 (docs: Deprecate use of Sphinx < 2.4.x) in 6.2 added a warning that support for older versions of Sphinx would be going away. There have been no complaints, so the time has come. Raise the minimum Sphinx version to 2.4.4 and clean out some compatibility code that we no longer need. Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/874jgs47fq.fsf@meer.lwn.net Signed-off-by: Jonathan Corbet commit ebe7f3393784857c487bf82f86813a8b1384e278 Author: Andy Shevchenko Date: Thu Dec 14 17:46:53 2023 +0200 pinctrl: intel: Add Intel Meteor Point pin controller and GPIO support This driver supports pinctrl/GPIO hardware found on Intel Meteor Point (a Meteor Lake PCH) providing users a pinctrl and GPIO interfaces including GPIO interrupts. Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit c11e7732a90c21155de8db40dbba84f043520821 Author: Elad Nachman Date: Mon Dec 11 19:17:39 2023 +0200 arm64: dts: cn913x: add device trees for COM Express boards Add support for CN9130 and CN9131 COM Express Type 7 CPU module boards by Marvell. Define these COM Express CPU modules as dtsi and provide a dtsi file for a carrier board (Marvell AC5X RD COM Express type 7 carrier board). This Carrier board only utilizes the PCIe link, hence no special device / driver support is provided by this dtsi file. Finally, provide a dts file for the com express carrier and CPU module combination. These COM Express boards differ from the existing CN913x DB boards by the type of ethernet connection (RGMII), the type of voltage regulators (not i2c expander based) and the USB phy (not UTMI based). Note - PHY + RGMII connector is OOB on CPU module. CN9131 COM Express board is basically CN9130 COM Express board with an additional CP115 I/O co-processor, which in this case provides an additional USB host controller on the board. Signed-off-by: Elad Nachman Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit c604a4d1833c1affc7717117a8ea499d2b8a321b Author: Elad Nachman Date: Mon Dec 11 19:17:38 2023 +0200 dt-bindings: arm64: add Marvell COM Express boards Add dt bindings for: CN9130 COM Express CPU module CN9131 COM Express CPU module AC5X RD COM Express Type 7 carrier board. AC5X RD COM Express board with a CN9131 COM Express Type 7 CPU module. Signed-off-by: Elad Nachman Reviewed-by: Andrew Lunn Acked-by: Conor Dooley Signed-off-by: Gregory CLEMENT commit 0d203341d8fe6132f3ccd13dcfea5d7601ea1094 Author: Elad Nachman Date: Mon Dec 11 19:17:37 2023 +0200 MAINTAINERS: add ac5 to list of maintained Marvell dts files Add ac5 dts files to the list of maintained Marvell Armada dts files by defining the entry as covering the entire marvell arm64 directory Signed-off-by: Elad Nachman Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 7c23fb2e6e3b40db5abbead64842060f13c4bb15 Merge: 7c41da586e9f4 826a5d8c9df96 Author: Greg Kroah-Hartman Date: Fri Dec 15 15:49:51 2023 +0100 Merge tag 'device_is_big_endian-6.8-rc1' into driver-core-next Tag for the device_is_big_endian() addition to property.h For others to be able to pull from in a stable way. Signed-off-by: Greg Kroah-Hartman commit 826a5d8c9df9605fb4fdefa45432f95580241a1f Author: Andy Shevchenko Date: Wed Oct 25 21:42:57 2023 +0300 device property: Implement device_is_big_endian() Some users want to use the struct device pointer to see if the device is big endian in terms of Open Firmware specifications, i.e. if it has a "big-endian" property, or if the kernel was compiled for BE *and* the device has a "native-endian" property. Provide inline helper for the users. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231025184259.250588-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fca8a117c1c9a0f8b8feed117db34cf58134dc2c Author: Sjoerd Simons Date: Tue Nov 28 22:35:06 2023 +0100 arm64: dts: armada-3720-turris-mox: set irq type for RTC The rtc on the mox shares its interrupt line with the moxtet bus. Set the interrupt type to be consistent between both devices. This ensures correct setup of the interrupt line regardless of probing order. Signed-off-by: Sjoerd Simons Cc: # v6.2+ Fixes: 21aad8ba615e ("arm64: dts: armada-3720-turris-mox: Add missing interrupt for RTC") Reviewed-by: Marek Behún Signed-off-by: Gregory CLEMENT commit aaafe88d5500ba18b33be72458439367ef878788 Author: Sjoerd Simons Date: Tue Nov 28 22:35:05 2023 +0100 bus: moxtet: Add spi device table The moxtet module fails to auto-load on. Add a SPI id table to allow it to do so. Signed-off-by: Sjoerd Simons Cc: Reviewed-by: Marek Behún Signed-off-by: Gregory CLEMENT commit e7830f5a83e96d8cb8efc0412902a03008f8fbe3 Author: Sjoerd Simons Date: Tue Nov 28 22:35:04 2023 +0100 bus: moxtet: Mark the irq as shared The Turris Mox shares the moxtet IRQ with various devices on the board, so mark the IRQ as shared in the driver as well. Without this loading the module will fail with: genirq: Flags mismatch irq 40. 00002002 (moxtet) vs. 00002080 (mcp7940x) Signed-off-by: Sjoerd Simons Cc: # v6.2+ Reviewed-by: Marek Behún Signed-off-by: Gregory CLEMENT commit 0c734c5ea76e333fbb8dd83b5bab46291b38096b Author: Jens Axboe Date: Thu Dec 14 11:08:15 2023 -0700 block: improve struct request_queue layout It's clearly been a while since someone looked at this, so I gave it a quick shot. There are few issues in here: - Random bundling of members that are mostly read-only and often written - Random holes that need not be there This moves the most frequently used bits into cacheline 1 and 2, with the 2nd one being more write intensive than the first one, which is basically read-only. Outside of making this work a bit more efficiently, it also reduces the size of struct request_queue for my test setup from 864 bytes (spanning 14 cachelines!) to 832 bytes and 13 cachelines. Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/d2b7b61c-4868-45c0-9060-4f9c73de9d7e@kernel.dk Signed-off-by: Jens Axboe commit 6ef02df154a245a4a7c0a66daa5a353daa788dba Author: Christoph Hellwig Date: Mon Dec 4 18:34:19 2023 +0100 block: support adding less than len in bio_add_hw_page bio_add_hw_page currently always fails or succeeds. This is fine for the existing callers that always add PAGE_SIZE worth given that the max_segment_size and max_sectors must always allow at least a page worth of data. But when we want to add it for bigger amounts of data this means it can also fail when adding the data to a bio, and creating a fallback for that becomes really annoying in the callers. Make use of the existing API design that allows to return a smaller length than the one passed in and add up to max_segment_size worth of data from a larger input. All the existing callers are fine with this - not because they handle this return correctly, but because they never pass more than a page in. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20231204173419.782378-3-hch@lst.de Signed-off-by: Jens Axboe commit 3f034c374ad55773c12dd8f3c1607328e17c0072 Author: Christoph Hellwig Date: Mon Dec 4 18:34:18 2023 +0100 block: prevent an integer overflow in bvec_try_merge_hw_page Reordered a check to avoid a possible overflow when adding len to bv_len. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20231204173419.782378-2-hch@lst.de Signed-off-by: Jens Axboe commit f1b45de716440452d230925c449722521856c9e6 Author: Linus Walleij Date: Mon Nov 27 16:51:02 2023 +0100 ARM64: dts: Add special compatibles for the Turris Mox These special compatibles are added to the Marvell Armada 3720 Turris Mox in order to be able to special-case and avoid warnings on the non-standard nodenames that are ABI on this one board due to being used in deployed versions of U-Boot. Signed-off-by: Linus Walleij Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit fedb923aaf611e36adad4cd8c91d35bc283d3eea Author: Linus Walleij Date: Mon Nov 27 16:51:01 2023 +0100 ARM64: dts: marvell: Fix some common switch mistakes Fix some errors in the Marvell MV88E6xxx switch descriptions: - The top node had no address size or cells. - switch0@0 is not OK, should be ethernet-switch@0. - ports should be ethernet-ports - port@0 should be ethernet-port@0 - PHYs should be named ethernet-phy@ Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Gregory CLEMENT commit 62f34e3ec2befcbe5d8a5003f21d53dab80bb03c Author: David Heidelberg Date: Sat Dec 2 23:29:04 2023 +0100 ARM: dts: marvell: make dts use gpio-fan matrix instead of array No functional changes. Adjust to comply with dt-schema requirements and make possible to validate values. Acked-by: Simon Guinot Signed-off-by: David Heidelberg Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 6e75ac5a824e1551764cd4bfce5ede3d5fafc407 Author: Linus Walleij Date: Mon Nov 27 16:51:00 2023 +0100 ARM: dts: marvell: Fix some common switch mistakes Fix some errors in the Marvell MV88E6xxx switch descriptions: - The top node had no address size or cells. - switch0@0 is not OK, should be ethernet-switch@0. - The ports node should be named ethernet-ports - The ethernet-ports node should have port@0 etc children, no plural "ports" in the children. - Ports should be named ethernet-port@0 etc - PHYs should be named ethernet-phy@0 etc This serves as an example of fixes needed for introducing a schema for the bindings, but the patch can simply be applied. Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Gregory CLEMENT commit a2c568ad9936014020e5586a0bdb5f5bf1d94e21 Author: Lukas Bulwahn Date: Tue Nov 21 10:34:14 2023 +0100 MAINTAINERS: add Marvell MBus driver to Marvell EBU SoCs support While doing some code cleanup in drivers/bus/, I noticed that the file drivers/bus/mvebu-mbus.c has no maintainer. Although the file has not been touched a lot lately, the git history tells us that Gregory Clement and Andrew Lunn integrated patches specific to this driver code. Further, the driver's config depends on config PLAT_ORION, and the code for this platform is defined in arch/arm/plat-orion/, which is part of ARM/Marvell Dove/MV78xx0/Orion SOC support with Gregory and Andrew already being its maintainer. Add drivers/bus/mvebu-mbus.c to ARM/Marvell Dove/MV78xx0/Orion SOC support. Signed-off-by: Lukas Bulwahn Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 1f68ce2a027250aeeb1756391110cdc4dc97c797 Author: Tony Luck Date: Wed Nov 15 11:54:50 2023 -0800 x86/mce: Handle Intel threshold interrupt storms Add an Intel specific hook into machine_check_poll() to keep track of per-CPU, per-bank corrected error logs (with a stub for the CONFIG_MCE_INTEL=n case). When a storm is observed the rate of interrupts is reduced by setting a large threshold value for this bank in IA32_MCi_CTL2. This bank is added to the bitmap of banks for this CPU to poll. The polling rate is increased to once per second. When a storm ends reset the threshold in IA32_MCi_CTL2 back to 1, remove the bank from the bitmap for polling, and change the polling rate back to the default. If a CPU with banks in storm mode is taken offline, the new CPU that inherits ownership of those banks takes over management of storm(s) in the inherited bank(s). The cmci_discover() function was already very large. These changes pushed it well over the top. Refactor with three helper functions to bring it back under control. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231115195450.12963-4-tony.luck@intel.com commit 7eae17c4add5de46efcca45356388f480103e6d9 Author: Tony Luck Date: Wed Nov 15 11:54:49 2023 -0800 x86/mce: Add per-bank CMCI storm mitigation This is the core functionality to track CMCI storms at the machine check bank granularity. Subsequent patches will add the vendor specific hooks to supply input to the storm detection and take actions on the start/end of a storm. machine_check_poll() is called both by the CMCI interrupt code, and for periodic polls from a timer. Add a hook in this routine to maintain a bitmap history for each bank showing whether the bank logged an corrected error or not each time it is polled. In normal operation the interval between polls of these banks determines how far to shift the history. The 64 bit width corresponds to about one second. When a storm is observed a CPU vendor specific action is taken to reduce or stop CMCI from the bank that is the source of the storm. The bank is added to the bitmap of banks for this CPU to poll. The polling rate is increased to once per second. During a storm each bit in the history indicates the status of the bank each time it is polled. Thus the history covers just over a minute. Declare a storm for that bank if the number of corrected interrupts seen in that history is above some threshold (defined as 5 in this series, could be tuned later if there is data to suggest a better value). A storm on a bank ends if enough consecutive polls of the bank show no corrected errors (defined as 30, may also change). That calls the CPU vendor specific function to revert to normal operational mode, and changes the polling rate back to the default. [ bp: Massage. ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231115195450.12963-3-tony.luck@intel.com commit 5a1745807580618e2524913f0c71bd779d94f0e5 Author: Dmitry Antipov Date: Wed Dec 13 08:14:43 2023 +0300 wifi: rt2x00: remove useless code in rt2x00queue_create_tx_descriptor() In 'rt2x00queue_create_tx_descriptor()', there is no need to call 'ieee80211_get_rts_cts_rate()' while checking for RTS/CTS frame since this function returns NULL or pointer to internal bitrate table entry, and the return value is not actually used. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://msgid.link/20231213051449.126963-1-dmantipov@yandex.ru commit 48fa9b61ae1692befb7e3661e8e708c2ba16f536 Author: Ping-Ke Shih Date: Mon Dec 11 16:33:41 2023 +0800 wifi: rtw89: only reset BB/RF for existing WiFi 6 chips while starting up The new WiFi 7 chips change the design, so no need to disable/enable BB/RF when core_start(). Keep the same logic for existing chips. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231211083341.118047-7-pkshih@realtek.com commit 293f7bdca2692e183676493d11759b42c9c8a258 Author: Ping-Ke Shih Date: Mon Dec 11 16:33:40 2023 +0800 wifi: rtw89: add DBCC H2C to notify firmware the status To support MLO of WiFi 7, we should configure hardware as DBCC mode, and notify this status to firmware. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231211083341.118047-6-pkshih@realtek.com commit fc663fa02532be3206e8f8c85725ab3d010305f9 Author: Ping-Ke Shih Date: Mon Dec 11 16:33:39 2023 +0800 wifi: rtw89: mac: add suffix _ax to MAC functions Many existing MAC access functions are used by WiFi 6 chips only, so add suffix _ax to be clearer. Some are common and can be used by WiFi 7, so export this kind of functions. This patch doesn't change logic at all. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231211083341.118047-5-pkshih@realtek.com commit cfb99433662c08f7e19f9c7a05d6e71607d81522 Author: Ping-Ke Shih Date: Mon Dec 11 16:33:38 2023 +0800 wifi: rtw89: mac: add flags to check if CMAC and DMAC are enabled Before accessing CMAC and DMAC registers, we should ensure they have been powered on, so add flag to determine the state. For old chips, we read registers and check corresponding bit, but it takes extra cost to read. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231211083341.118047-4-pkshih@realtek.com commit f20b2b7d3f1b1dd008955f42655d0620daf714a3 Author: Ping-Ke Shih Date: Mon Dec 11 16:33:37 2023 +0800 wifi: rtw89: 8922a: add power on/off functions The power on/off functions are to turn on hardware function blocks and to turn off them if we are going to stay in idle state. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231211083341.118047-3-pkshih@realtek.com commit efde4f6dd13acd22f9dfb2faaea0f8c08d4e94ad Author: Ping-Ke Shih Date: Mon Dec 11 16:33:36 2023 +0800 wifi: rtw89: add XTAL SI for WiFi 7 chips The XTAL SI is a serial interface to indirectly access registers of analog hardware circuit. Since WiFi 7 chips use different registers, add a ops to access them via common functions. This patch doesn't change logic for existing chips. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231211083341.118047-2-pkshih@realtek.com commit f0536b0d5fa87475a747afa79ffe913533a196a0 Author: Ping-Ke Shih Date: Wed Dec 13 08:50:54 2023 +0800 wifi: rtw89: phy: print out RFK log with formatted string With formatted string loaded from firmware file, we can use the formatted string ID and get corresponding string, and then use regular rtw89_debug() to show the message if debug mask of RFK is enabled. If the string ID doesn't present, fallback to print plain hexadecimal. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231213005054.10568-7-pkshih@realtek.com commit edd77bb091d181f517702e8878430e7064428630 Author: Ping-Ke Shih Date: Wed Dec 13 08:50:53 2023 +0800 wifi: rtw89: parse and print out RFK log from C2H events RFK log events contains two types. One called RUN log is to reflect state during RFK is running, and it replies on formatted string loaded from firmware file, but print this type as plain hexadecimal only in this patch. The other is REPORT log that reflects the final result of a RFK, and each calibration has its own struct to carry many specific information. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231213005054.10568-6-pkshih@realtek.com commit 178b8e7d8a59fe773e2e16c84254f5380f6a6c16 Author: Ping-Ke Shih Date: Wed Dec 13 08:50:52 2023 +0800 wifi: rtw89: add C2H event handlers of RFK log and report Trigger a RFK (RF calibration) in firmware by a H2C command, and in progress it reports log and a result finally by C2H events. Firstly, add prototype of the C2H event handlers to have a simple picture of framework. The callers who trigger H2C will wait until a C2H event is received, so we must process these C2H events in receiving process. Thus, mark this kind of C2H events as atomic. Also, timestamp is also useful for debugging, mark C2H events carrying RFK log as atomic as well. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231213005054.10568-5-pkshih@realtek.com commit 7a9192eecf2704ac10d91ca677433148e1720291 Author: Ping-Ke Shih Date: Wed Dec 13 08:50:51 2023 +0800 wifi: rtw89: load RFK log format string from firmware file To debug RFK (RF calibration) in firmware, it sends log via firmware C2H events to driver with string format ID and four arguments. Load formatted string from firmware file, and the string ID can get back its string. Then, use regular print format to show the message. This firmware element layout looks like +============================================+ | elm ID | elm size | version | | +----------+----------+----------+-----------+ | | nr |rsvd |rfk_id|rsvd| +--------------------------------------------+ | offset[] (__le16 * nr) | | ... | +--------------------------------------------+ | formatted string with null termintor (*nr) | | ... | +============================================+ * a firmware file can contains more than one elements with this element ID named RTW89_FW_ELEMENT_ID_RFKLOG_FMT (19), because many RFK needs its own formatted strings, so add 'rfk_id' to know it belongs to which RFK. * the 'formatted string' just follow 'offset[]' without padding to align 32bits. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231213005054.10568-4-pkshih@realtek.com commit 344c066f2f5afe73d584b9fc0236e98f8e75c911 Author: Ping-Ke Shih Date: Wed Dec 13 08:50:50 2023 +0800 wifi: rtw89: fw: add version field to BB MCU firmware element 8922AE has more than one hardware version, and they use different BB MCU firmware, so occupy a byte from element priv[] to annotate version. Since there are more than one firmware and only matched version is adopted, return 1 to ignore not matched firmware. +===========================================+ | elm ID | elm size | version | | +----------+----------+----------+----------+ | | element_priv[] | +-------------------------------------------+ change to | v +===========================================+ | elm ID | elm size | version | | +----------+----------+----------+----------+ | | cv | element_rsvd[] | +-------------------------------------------+ Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231213005054.10568-3-pkshih@realtek.com commit d60e73e5dd703d7b7323abf7d2cf5233dfa18835 Author: Ping-Ke Shih Date: Wed Dec 13 08:50:49 2023 +0800 wifi: rtw89: fw: load TX power track tables from fw_element The TX power track tables are used to define compensation power reflected to thermal value. Currently, we have 16 (2 * 4 * 2) tables made by combinations of {negative/positive thermal value, 2GHz/2GHz-CCK/5GHz/6GHz, path A/B} Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://msgid.link/20231213005054.10568-2-pkshih@realtek.com commit f0dd488e11e71ac095df7638d892209c629d9af2 Author: David Lin Date: Fri Dec 15 08:51:18 2023 +0800 wifi: mwifiex: configure BSSID consistently when starting AP AP BSSID configuration is missing at AP start. Without this fix, FW returns STA interface MAC address after first init. When hostapd restarts, it gets MAC address from netdev before driver sets STA MAC to netdev again. Now MAC address between hostapd and net interface are different causes STA cannot connect to AP. After that MAC address of uap0 mlan0 become the same. And issue disappears after following hostapd restart (another issue is AP/STA MAC address become the same). This patch fixes the issue cleanly. Signed-off-by: David Lin Fixes: 12190c5d80bd ("mwifiex: add cfg80211 start_ap and stop_ap handlers") Cc: stable@vger.kernel.org Reviewed-by: Francesco Dolcini Tested-by: Rafael Beims # Verdin iMX8MP/SD8997 SD Acked-by: Brian Norris Signed-off-by: Kalle Valo Link: https://msgid.link/20231215005118.17031-1-yu-hao.lin@nxp.com commit 43f012df3c1e979966524f79b5371fde6545488a Author: Crescent CY Hsieh Date: Thu Dec 14 14:02:34 2023 +0800 tty: serial: 8250: Set RS422 interface by default to fix Moxa RS422/RS485 PCIe boards MOXA PCIe RS422/RS485 boards will not function by default because of the initial default serial interface of all MOXA PCIe boards is set to RS232. This patch fixes the problem above by setting the initial default serial interface to RS422 for those MOXA RS422/RS485 PCIe boards. Signed-off-by: Crescent CY Hsieh Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20231214060234.6147-1-crescentcy.hsieh@moxa.com Signed-off-by: Greg Kroah-Hartman commit a49a8b9d7cf5da42e61d73bd502b5a0e2b7e61c3 Author: Théo Lebrun Date: Thu Dec 7 18:56:13 2023 +0100 tty: serial: amba-pl011: factor QDF2400 SoC erratum 44 out of probe On this platform, different vendor data is used. That requires a compile-time check as we access (1) a global boolean & (2) our local vendor data. Both symbols are accessible only when CONFIG_ACPI_SPCR_TABLE is enabled. Factor the vendor data overriding to a separate function that is empty when CONFIG_ACPI_SPCR_TABLE is not defined. Suggested-by: Ilpo Järvinen Reviewed-by: Linus Walleij Reviewed-by: Ilpo Järvinen Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-8-e384afa5e78c@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 8ff87406c29b43fa0d807ce80601c94821cab9bc Author: Théo Lebrun Date: Thu Dec 7 18:56:12 2023 +0100 tty: serial: amba-pl011: unindent pl011_console_get_options function body The whole function body is encapsulated inside an if-condition. Reverse the if logic and early return to remove one indentation level. Also turn two nested ifs into a single one at the end of the function. Reviewed-by: Linus Walleij Reviewed-by: Ilpo Järvinen Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-7-e384afa5e78c@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 826bd77ae5e8fec91a5fddb189adbdbaef3050ef Author: Théo Lebrun Date: Thu Dec 7 18:56:11 2023 +0100 tty: serial: amba-pl011: fix miscellaneous checkpatch warnings Fix the following messages from checkpatch: $ ./scripts/checkpatch.pl --strict --file \ drivers/tty/serial/amba-pl011.c ERROR: do not initialise statics to false WARNING: Possible unnecessary 'out of memory' message WARNING: Prefer 'unsigned int' to bare use of 'unsigned' WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to CHECK: Prefer using the BIT macro Reviewed-by: Linus Walleij Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-6-e384afa5e78c@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 28a7ec8c6679f594b4218090fe2932a647594fe2 Author: Théo Lebrun Date: Thu Dec 7 18:56:10 2023 +0100 tty: serial: amba-pl011: fix formatting of conditions Fix the following checkpatch warnings & checks: $ ./scripts/checkpatch.pl --strict --file \ drivers/tty/serial/amba-pl011.c CHECK: Unbalanced braces around else statement CHECK: Unnecessary parentheses around '[...]' CHECK: braces {} should be used on all arms of this statement CHECK: Comparison to NULL could be written "[...]" WARNING: Comparisons should place the constant on the right side of the test Reviewed-by: Linus Walleij Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-5-e384afa5e78c@bootlin.com Signed-off-by: Greg Kroah-Hartman commit fd64ff0966d39422f547d7935b8988e962f9f91e Author: Théo Lebrun Date: Thu Dec 7 18:56:09 2023 +0100 tty: serial: amba-pl011: avoid quoted string split across lines Remove all instances of quoted strings split across lines. Fix four checkpatch warnings: $ ./scripts/checkpatch.pl --strict --file \ drivers/tty/serial/amba-pl011.c WARNING: quoted string split across lines [...] Reviewed-by: Ilpo Järvinen Reviewed-by: Linus Walleij Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-4-e384afa5e78c@bootlin.com Signed-off-by: Greg Kroah-Hartman commit dc00f0cc5e04490416d4c2164011e39b4a2d29df Author: Théo Lebrun Date: Thu Dec 7 18:56:08 2023 +0100 tty: serial: amba-pl011: replace TIOCMBIT macros by static functions The driver uses two TIOCMBIT macros inside pl011_{get,set}_mctrl to simplify the logic. Those look scary to checkpatch because they contain ifs without do-while loops. Avoid the macros by creating small equivalent static functions; that lets the compiler do its type checking & avoids checkpatch errors. For the second instance __assign_bit is not usable because it deals with unsigned long pointers whereas we have an unsigned int in pl011_set_mctrl. This addresses the following checkpatch warnings: $ ./scripts/checkpatch.pl --strict --file \ drivers/tty/serial/amba-pl011.c ERROR: Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects CHECK: Macro argument 'uartbit' may be better as '(uartbit)' to avoid precedence issues ERROR: Macros starting with if should be enclosed by a do - while loop to avoid possible if/else logic defects CHECK: Macro argument 'tiocmbit' may be better as '(tiocmbit)' to avoid precedence issues Reviewed-by: Linus Walleij Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-3-e384afa5e78c@bootlin.com Signed-off-by: Greg Kroah-Hartman commit d93ebe0fcfbd29e2b93850b5f66f98b0d63cce9c Author: Théo Lebrun Date: Thu Dec 7 18:56:07 2023 +0100 tty: serial: amba-pl011: fix whitespace formatting Follow recommandations from: $ ./scripts/checkpatch.pl --strict --file \ drivers/tty/serial/amba-pl011.c We fix 5 warnings and 48 checks, all related to whitespace. Culprits are: CHECK: Alignment should match open parenthesis CHECK: Blank lines aren't necessary after an open brace '{' CHECK: Lines should not end with a '(' CHECK: Please don't use multiple blank lines CHECK: Please use a blank line after function/struct/union/enum declarations CHECK: spaces preferred around that '/' (ctx:VxV) CHECK: spaces preferred around that '|' (ctx:VxV) WARNING: Missing a blank line after declarations WARNING: please, no spaces at the start of a line Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-2-e384afa5e78c@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 1f78c56007ba61b7b8c3f7dbb6787b6af116d3f0 Author: Théo Lebrun Date: Thu Dec 7 18:56:06 2023 +0100 tty: serial: amba: Use linux/{bits,bitfield}.h macros The driver uses bit shifts and hexadecimal expressions to declare constants. Replace that with the BIT(), GENMASK() & FIELD_PREP_CONST() macros to clarify intent. include/linux/amba/serial.h gets included from arch/arm/include/debug/pl01x.S. Avoid includes and macro tricks for the four defines that are involved: UART01x_DR, UART01x_FR, UART01x_FR_TXFF and UART01x_FR_BUSY. Reviewed-by: Linus Walleij Reviewed-by: Ilpo Järvinen Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231207-mbly-uart-v6-1-e384afa5e78c@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 1c5d463c0770c6fa2037511a24fb17966fd07d97 Author: David Lin Date: Sat Dec 9 07:40:29 2023 +0800 wifi: mwifiex: add extra delay for firmware ready For SDIO IW416, due to a bug, FW may return ready before complete full initialization. Command timeout may occur at driver load after reboot. Workaround by adding 100ms delay at checking FW status. Signed-off-by: David Lin Cc: stable@vger.kernel.org Reviewed-by: Francesco Dolcini Acked-by: Brian Norris Tested-by: Marcel Ziswiler # Verdin AM62 (IW416) Signed-off-by: Kalle Valo Link: https://msgid.link/20231208234029.2197-1-yu-hao.lin@nxp.com commit a5f18286083fe450d6080abc8d4341c630f682dd Author: Uwe Kleine-König Date: Wed Dec 13 18:43:12 2023 +0100 serial: 8250-fsl: Only do the break workaround if IIR signals RLSI It can happen that while a break is received the transmitter gets empty and IIR signals a Transmitter holding register empty (THRI) event. In this case it's too early for the break workaround. Still doing it then results in the THRI event not being rereported which makes the driver miss that and e.g. for RS485 half-duplex communication it fails to switch back to RX mode. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231213174312.2341013-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 6b64f8e360c00f180cffa1806095cdd2abc55b16 Author: Colin Ian King Date: Fri Dec 8 10:23:31 2023 +0000 serial: ma35d1: Fix spelling mistake "ononsole" -> "console" There is a spelling mistake in a pr_warn message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20231208102331.3267192-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman commit d54cbe1db72dbfc664bc21b40c324a624faacb16 Author: Chunyan Zhang Date: Fri Dec 15 16:56:29 2023 +0800 dt-bindings: serial: Add a new compatible string for UMS9620 The UMS9620 also uses the same serial device with SC9836. Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20231215085630.984892-4-chunyan.zhang@unisoc.com Acked-by: Krzysztof Kozlowski Signed-off-by: Greg Kroah-Hartman commit 9915753037eba7135b209fef4f2afeca841af816 Author: Hugo Villeneuve Date: Mon Dec 11 12:13:53 2023 -0500 serial: sc16is7xx: fix unconditional activation of THRI interrupt Commit cc4c1d05eb10 ("sc16is7xx: Properly resume TX after stop") changed behavior to unconditionnaly set the THRI interrupt in sc16is7xx_tx_proc(). For example when sending a 65 bytes message, and assuming the Tx FIFO is initially empty, sc16is7xx_handle_tx() will write the first 64 bytes of the message to the FIFO and sc16is7xx_tx_proc() will then activate THRI. When the THRI IRQ is fired, the driver will write the remaining byte of the message to the FIFO, and disable THRI by calling sc16is7xx_stop_tx(). When sending a 2 bytes message, sc16is7xx_handle_tx() will write the 2 bytes of the message to the FIFO and call sc16is7xx_stop_tx(), disabling THRI. After sc16is7xx_handle_tx() exits, control returns to sc16is7xx_tx_proc() which will unconditionally set THRI. When the THRI IRQ is fired, the driver simply acknowledges the interrupt and does nothing more, since all the data has already been written to the FIFO. This results in 2 register writes and 4 register reads all for nothing and taking precious cycles from the I2C/SPI bus. Fix this by enabling the THRI interrupt only when we fill the Tx FIFO to its maximum capacity and there are remaining bytes to send in the message. Fixes: cc4c1d05eb10 ("sc16is7xx: Properly resume TX after stop") Cc: Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231211171353.2901416-7-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit dbf4ab821804df071c8b566d9813083125e6d97b Author: Hugo Villeneuve Date: Mon Dec 11 12:13:52 2023 -0500 serial: sc16is7xx: convert from _raw_ to _noinc_ regmap functions for FIFO The SC16IS7XX IC supports a burst mode to access the FIFOs where the initial register address is sent ($00), followed by all the FIFO data without having to resend the register address each time. In this mode, the IC doesn't increment the register address for each R/W byte. The regmap_raw_read() and regmap_raw_write() are functions which can perform IO over multiple registers. They are currently used to read/write from/to the FIFO, and although they operate correctly in this burst mode on the SPI bus, they would corrupt the regmap cache if it was not disabled manually. The reason is that when the R/W size is more than 1 byte, these functions assume that the register address is incremented and handle the cache accordingly. Convert FIFO R/W functions to use the regmap _noinc_ versions in order to remove the manual cache control which was a workaround when using the _raw_ versions. FIFO registers are properly declared as volatile so cache will not be used/updated for FIFO accesses. Fixes: dfeae619d781 ("serial: sc16is7xx") Cc: Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231211171353.2901416-6-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 4409df5866b7ff7686ba27e449ca97a92ee063c9 Author: Hugo Villeneuve Date: Mon Dec 11 12:13:51 2023 -0500 serial: sc16is7xx: change EFR lock to operate on each channels Now that the driver has been converted to use one regmap per port, change efr locking to operate on a channel basis instead of on the whole IC. Fixes: 3837a0379533 ("serial: sc16is7xx: improve regmap debugfs by using one regmap per port") Cc: # 6.1.x: 3837a03 serial: sc16is7xx: improve regmap debugfs by using one regmap per port Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231211171353.2901416-5-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 41a308cbedb2a68a6831f0f2e992e296c4b8aff0 Author: Hugo Villeneuve Date: Mon Dec 11 12:13:50 2023 -0500 serial: sc16is7xx: remove unused line structure member Now that the driver has been converted to use one regmap per port, the line structure member is no longer used, so remove it. Fixes: 3837a0379533 ("serial: sc16is7xx: improve regmap debugfs by using one regmap per port") Cc: Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231211171353.2901416-4-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit f6959c5217bd799bcb770b95d3c09b3244e175c6 Author: Hugo Villeneuve Date: Mon Dec 11 12:13:49 2023 -0500 serial: sc16is7xx: remove global regmap from struct sc16is7xx_port Remove global struct regmap so that it is more obvious that this regmap is to be used only in the probe function. Also add a comment to that effect in probe function. Fixes: 3837a0379533 ("serial: sc16is7xx: improve regmap debugfs by using one regmap per port") Cc: Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231211171353.2901416-3-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 6bcab3c8acc88e265c570dea969fd04f137c8a4c Author: Hugo Villeneuve Date: Mon Dec 11 12:13:48 2023 -0500 serial: sc16is7xx: remove wasteful static buffer in sc16is7xx_regmap_name() Using a static buffer inside sc16is7xx_regmap_name() was a convenient and simple way to set the regmap name without having to allocate and free a buffer each time it is called. The drawback is that the static buffer wastes memory for nothing once regmap is fully initialized. Remove static buffer and use constant strings instead. This also avoids a truncation warning when using "%d" or "%u" in snprintf which was flagged by kernel test robot. Fixes: 3837a0379533 ("serial: sc16is7xx: improve regmap debugfs by using one regmap per port") Cc: # 6.1.x: 3837a03 serial: sc16is7xx: improve regmap debugfs by using one regmap per port Suggested-by: Andy Shevchenko Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231211171353.2901416-2-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 96d7e361ca4cb0e8b6fa0635a04609b6367257e6 Author: Christophe JAILLET Date: Sun Dec 10 18:45:58 2023 +0100 serdev: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d20d3ac106bac6b7cabe39f22ad00ac86910e0a5.1702230342.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit e0f25b8992345aa5f113da2815f5add98738c611 Author: Adrian Reber Date: Fri Dec 8 15:36:56 2023 +0100 tty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE The capability CAP_CHECKPOINT_RESTORE was introduced to allow non-root users to checkpoint and restore processes as non-root with CRIU. This change extends CAP_CHECKPOINT_RESTORE to enable the CRIU option '--shell-job' as non-root. CRIU's man-page describes the '--shell-job' option like this: Allow one to dump shell jobs. This implies the restored task will inherit session and process group ID from the criu itself. This option also allows to migrate a single external tty connection, to migrate applications like top. TIOCSLCKTRMIOS can only be done if the process has CAP_SYS_ADMIN and this change extends it to CAP_SYS_ADMIN or CAP_CHECKPOINT_RESTORE. With this change it is possible to checkpoint and restore processes which have a tty connection as non-root if CAP_CHECKPOINT_RESTORE is set. Acked-by: Christian Brauner Signed-off-by: Adrian Reber Acked-by: Andrei Vagin Link: https://lore.kernel.org/r/20231208143656.1019-1-areber@redhat.com Signed-off-by: Greg Kroah-Hartman commit 3d19ff562d0618a17c4f2c42c8fc84de4e2880e2 Author: Rob Herring Date: Thu Dec 7 10:26:31 2023 -0600 serial: esp32_uart: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Error checking for matching was not necessary as matching is always successful if we're already in probe and the match tables always have data pointers. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231207162632.2650356-2-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2600d9939440d608e1c8128e9e47e7948c024442 Author: Rob Herring Date: Thu Dec 7 10:26:30 2023 -0600 serial: esp32_acm: Add explicit platform_device.h include The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. Soon the implicit includes are going to be removed. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231207162632.2650356-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9df1dd450689dccc19fa471b91c71fc977dab946 Author: Fabio Estevam Date: Wed Dec 6 13:28:41 2023 -0300 dt-bindings: serial: imx: Properly describe the i.MX1 interrupts i.MX1 has three UART interrupts instead of a single one like other i.MX devices. Take this into account for properly describing the i.MX1 UART interrupts. This fixes the following dt-schema warning: from schema $id: http://devicetree.org/schemas/serial/fsl-imx-uart.yaml#yaml# imx1-ads.dtb: serial@206000: interrupts: [[30], [29], [26]] is too long Signed-off-by: Fabio Estevam Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231206162841.2326201-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8a53e29fe05c56f643eaab285f224c09b9c3dd4c Author: Donald Robson Date: Wed Dec 13 14:44:31 2023 +0000 drm/imagination: Fix error path in pvr_vm_create_context It is possible to double free the vm_ctx->mmu_ctx object in this function.     630 err_page_table_destroy: --> 631         pvr_mmu_context_destroy(vm_ctx->mmu_ctx); The pvr_vm_context_put() function does:         kref_put(&vm_ctx->ref_count, pvr_vm_context_release); Here the pvr_vm_context_release() will call:         pvr_mmu_context_destroy(vm_ctx->mmu_ctx); Refactor to an unwind style. Reported-by: Dan Carpenter Signed-off-by: Donald Robson Reviewed-by: Dan Carpenter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231213144431.94956-2-donald.robson@imgtec.com commit f175498378bdae2ebcf61170a2a866cb96e8a69a Author: Donald Robson Date: Wed Dec 13 14:44:30 2023 +0000 drm/imagination: Fix ERR_PTR test on pointer to pointer. drivers/gpu/drm/imagination/pvr_vm.c:631 pvr_vm_create_context() error: 'vm_ctx->mmu_ctx' dereferencing possible ERR_PTR() 612 vm_ctx->mmu_ctx = pvr_mmu_context_create(pvr_dev); 613 err = PTR_ERR_OR_ZERO(&vm_ctx->mmu_ctx); ^ The address is never an error pointer so this will always return 0. Remove the ampersand. Reported-by: Dan Carpenter Signed-off-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231213144431.94956-1-donald.robson@imgtec.com commit f1f55ed3ffe4212f5c96106bf6396c461a2bf223 Author: Donald Robson Date: Fri Dec 8 16:30:19 2023 +0000 drm/imagination: Fixed oops when misusing ioctl CREATE_HWRT_DATASET While writing the matching IGT suite I discovered that it's possible to cause a kernel oops when using DRM_IOCTL_PVR_CREATE_HWRT_DATASET when the call to hwrt_init_common_fw_structure() fails. Use an unwind-type error path to avoid cleaning up the object using the the release function before it is fully resolved. Signed-off-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231208163019.95913-1-donald.robson@imgtec.com commit b39610c773431ac7991cf6235e26d693ccabd9e9 Author: Donald Robson Date: Fri Dec 8 16:08:25 2023 +0000 drm/imagination: Fixed infinite loop in pvr_vm_mips_map() Unwinding loop in error path for this function uses unsigned limit variable, causing the promotion of the signed counter variable. --> 204 for (; pfn >= start_pfn; pfn--) ^^^^^^^^^^^^^^^^ If start_pfn can be zero then this is an endless loop. I've seen this code in other places as well. This loop is slightly off as well. It should decrement pfn on the first iteration. Fix by making the loop limit variables signed. Also fix missing predecrement by modifying to while loop. Reported-by: Dan Carpenter Signed-off-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231208160825.92933-1-donald.robson@imgtec.com commit 644f315d12ea29a67bc985d06ab0962452eb3605 Author: Nam Cao Date: Fri Dec 15 12:33:38 2023 +0100 spi: pl022: update description of internal_cs_control() The arguments of internal_cs_control() was changed, but its description was not updated. Update the description to match the expected arguments. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312151816.munFeE4L-lkp@intel.com/ Signed-off-by: Nam Cao Reviewed-by: Linus Walleij Link: https://msgid.link/r/4036d8d5845c04179f330f83e825a3921aa50c5a.1702639801.git.namcao@linutronix.de Signed-off-by: Mark Brown commit e695c1fc5a3db1e161abe8061d715a504aff3f9f Author: Nam Cao Date: Fri Dec 15 12:33:37 2023 +0100 spi: pl022: delete description of cur_msg The variable cur_msg was removed, but its description is left behind. Delete this description. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312151816.munFeE4L-lkp@intel.com/ Signed-off-by: Nam Cao Reviewed-by: Linus Walleij Link: https://msgid.link/r/f06a9b6eac184cc648ae7444c480add6da87a84d.1702639801.git.namcao@linutronix.de Signed-off-by: Mark Brown commit e7a4a2fd9a4116286a1523ea1a5cbabd2c36f5b9 Author: Wang Jinchao Date: Fri Dec 15 17:13:51 2023 +0800 ASoC: fsl_mqs: remove duplicated including rm the second \#include Signed-off-by: Wang Jinchao Link: https://msgid.link/r/202312151713+0800-wangjinchao@xfusion.com Signed-off-by: Mark Brown commit 02842209fc29bddb2b673ceb8f681267857c4bc1 Author: Wang Jinchao Date: Fri Dec 15 17:20:00 2023 +0800 ASoC: SOF: amd: remove duplicated including remove the second \#include "../sof-audio.h" Signed-off-by: Wang Jinchao Link: https://msgid.link/r/202312151719+0800-wangjinchao@xfusion.com Signed-off-by: Mark Brown commit 3a0e7bb86f8728d94d55c56fb73e86be7976c163 Author: Rander Wang Date: Fri Dec 15 16:31:02 2023 +0800 ASoC: SOF: Intel: check fw_context_save for library reload If fw_context_save is defined by fw, driver can skip library reload on d3 exit or reload library. Signed-off-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://msgid.link/r/20231215083102.3064200-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 855a4772be9dc777cbcd580c8a07d9c54908219b Author: Rander Wang Date: Fri Dec 15 16:31:01 2023 +0800 ASoC: SOF: IPC4: query fw_context_save feature from fw Driver queries fw_context_save feature when fw is ready and can skip library reload with this feature since library is saved in persistent memory. The default value of fw_context_save is true unless fw reports false. Signed-off-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://msgid.link/r/20231215083102.3064200-3-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit 57cd29a82574b0e9d99ed5789801c96f765e8fcb Author: Rander Wang Date: Fri Dec 15 16:31:00 2023 +0800 ASoC: SOF: IPC4: synchronize fw_config_params with fw definitions Update fw_config_params in driver. Signed-off-by: Rander Wang Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Link: https://msgid.link/r/20231215083102.3064200-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown commit c51ffe929f3b34999ce19f413d3950ea72e1e5ad Author: Abel Vesa Date: Thu Dec 14 19:06:52 2023 +0200 dt-bindings: usb: qcom,dwc3: Add X1E80100 binding Add X1E80100 to the DT schema. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231214-x1e80100-usb-v1-1-c22be5c0109e@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4d2f8c859146672ce84f49648121c70ea84e246c Author: Ghanshyam Agrawal Date: Fri Dec 15 14:09:30 2023 +0530 usb: typec: fixed a typo Fixed one typo. Signed-off-by: Ghanshyam Agrawal Link: https://lore.kernel.org/r/20231215083930.566164-1-ghanshyam1898@gmail.com Signed-off-by: Greg Kroah-Hartman commit 776630be36935be3a51e5ecfa7fc7614c4d4e46e Author: Alexander Stein Date: Thu Dec 14 15:40:11 2023 +0100 usb: cdns3: Use dev_err_probe Create an error message or upon deferral add a description for sysfs. Signed-off-by: Alexander Stein Link: https://lore.kernel.org/r/20231214144011.1987586-1-alexander.stein@ew.tq-group.com Signed-off-by: Greg Kroah-Hartman commit 61fbf20312bdd1394a9cac67ed8f706e205511af Author: Dmitry Antipov Date: Thu Dec 14 12:04:15 2023 +0300 usb: gadget: f_fs: fix fortify warning When compiling with gcc version 14.0.0 20231206 (experimental) and CONFIG_FORTIFY_SOURCE=y, I've noticed the following warning: ... In function 'fortify_memcpy_chk', inlined from '__ffs_func_bind_do_os_desc' at drivers/usb/gadget/function/f_fs.c:2934:3: ./include/linux/fortify-string.h:588:25: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning] 588 | __read_overflow2_field(q_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This call to 'memcpy()' is interpreted as an attempt to copy both 'CompatibleID' and 'SubCompatibleID' of 'struct usb_ext_compat_desc' from an address of the first one, which causes an overread warning. Since we actually want to copy both of them at once, use the convenient 'struct_group()' and 'sizeof_field()' here. Signed-off-by: Dmitry Antipov Link: https://lore.kernel.org/r/20231214090428.27292-1-dmantipov@yandex.ru Signed-off-by: Greg Kroah-Hartman commit 3e42084a1c4790364c28b5cafd5c66fc25396a64 Author: Lee Jones Date: Wed Dec 13 16:42:41 2023 +0000 usb: storage: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() Since snprintf() has the documented, but still rather strange trait of returning the length of the data that *would have been* written to the array if space were available, rather than the arguably more useful length of data *actually* written, it is usually considered wise to use something else instead in order to avoid confusion. In the case of sysfs call-backs, new wrappers exist that do just that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Alan Stern Cc: Signed-off-by: Lee Jones Acked-by: Alan Stern Link: https://lore.kernel.org/r/20231213164246.1021885-13-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit e5892ea81515366588e8fb00a5a3cdca687355dc Author: Lee Jones Date: Wed Dec 13 16:42:40 2023 +0000 usb: phy: twl6030: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() Since snprintf() has the documented, but still rather strange trait of returning the length of the data that *would have been* written to the array if space were available, rather than the arguably more useful length of data *actually* written, it is usually considered wise to use something else instead in order to avoid confusion. In the case of sysfs call-backs, new wrappers exist that do just that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Hema HK Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-12-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9d4e3d15d7bf3439a6f3fb4aafc4f92ea2c5c5fd Author: Lee Jones Date: Wed Dec 13 16:42:39 2023 +0000 usb: mon_text: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-11-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 79632569619f4d57ff745398dba98e09105b5108 Author: Lee Jones Date: Wed Dec 13 16:42:38 2023 +0000 usb: mon_stat: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-10-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 86b20af11e84c26ae3fde4dcc4f490948e3f8035 Author: Lee Jones Date: Wed Dec 13 16:42:37 2023 +0000 usb: yurex: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Whilst we're at it, let's define some magic numbers to increase readability and ease of maintenance. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Tomoki Sekiyama Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-9-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit a6eef67cdb84e06112fc29176d6c6061d3ea8d79 Author: Lee Jones Date: Wed Dec 13 16:42:36 2023 +0000 usb: host: max3421-hcd: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Cristian Birsan Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-8-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 01dc7f7c29be8b4fa853eb300f54065d981b31a9 Author: Lee Jones Date: Wed Dec 13 16:42:35 2023 +0000 usb: cdns2: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Pawel Laszczak Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-7-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit d32dcb0659bcb3b68878a985280024ec92d0db5b Author: Lee Jones Date: Wed Dec 13 16:42:34 2023 +0000 usb: gadget: udc: atmel: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Cristian Birsan Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea Cc: Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-6-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0d12c1cca7883620b1888ce4b892a9ed27bf3682 Author: Lee Jones Date: Wed Dec 13 16:42:33 2023 +0000 usb: gadget: uvc: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Laurent Pinchart Cc: Daniel Scally Cc: Andrzej Pietrasiewicz Signed-off-by: Lee Jones Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20231213164246.1021885-5-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 60034e0aedf507888c4a880f57011bb7f5d7700c Author: Lee Jones Date: Wed Dec 13 16:42:32 2023 +0000 usb: gadget: f_uac2: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: James Gruber Cc: Yadwinder Singh Cc: Jaswinder Singh Cc: Ruslan Bilovol Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-4-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit c1a371866db9c44ab3004b5fc06df066a1b96262 Author: Lee Jones Date: Wed Dec 13 16:42:31 2023 +0000 usb: gadget: f_uac1: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Ruslan Bilovol Cc: Julian Scheel Cc: Bryan Wu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-3-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0466e7e693efe6647f23532529a9c41a1fa5f4ac Author: Lee Jones Date: Wed Dec 13 16:42:30 2023 +0000 usb: gadget: configfs: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231213164246.1021885-2-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit b8fb6db6cb04e3c35d661d0f6cf6f8dc7444ce0c Author: Perr Zhang Date: Wed Dec 13 19:21:06 2023 +0800 usb: f_uac1: adds support for SS and SSP Patch adds support of SS and SSP speed. Tested with rockchip rk3399 dwc3 Signed-off-by: Perr Zhang Link: https://lore.kernel.org/r/20231213112106.605260-1-strongbox8@zoho.com Signed-off-by: Greg Kroah-Hartman commit 36d586c0570e075c18bcc3b4ec4de11fcdbf5dd1 Author: Neil Armstrong Date: Tue Dec 12 09:54:29 2023 +0100 usb: typec: mux: add Qualcomm WCD939X USB SubSystem Altmode Mux driver Qualcomm WCD9390/WCD9395 is a standalone Hi-Fi audio codec IC with a functionally separate USB SubSystem for Altmode/Analog Audio Switch accessible over an I2C interface. It provides switching USB-C USB2.0 lines between USB and Audio Headphones speaker lines, and the USB-C SBU lines between DisplayPort AUX and Audio Headphones Microphone/Ground. The Audio Headphone and Microphone data path between the Codec and the USB-C Mux subsystems are external to the IC, thus requiring DT port-endpoint graph description to handle USB-C altmode & orientation switching for Audio Accessory Mode. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231212-topic-sm8650-upstream-wcd939x-usbss-v2-2-38961fea5867@linaro.org Signed-off-by: Greg Kroah-Hartman commit de12c5384307d2fa2a735b7d21cf7603e1bcb5c9 Author: Neil Armstrong Date: Tue Dec 12 09:54:28 2023 +0100 dt-bindings: usb: Document WCD939x USB SubSystem Altmode/Analog Audio Switch Document the Qualcomm WCD9390/WCD9395 USB SubSystem Altmode/Analog Audio Switch which is a separate USB SubSystem for Altmode/Analog Audio Switch accessible over an I2C interface. Since Audio Headphone and Microphone data path between the Codec and the USB-C Mux subsystems are external to the IC, it requires a second port to handle USB-C altmode & orientation switching for Audio Accessory Mode to the Codec SubSystem. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231212-topic-sm8650-upstream-wcd939x-usbss-v2-1-38961fea5867@linaro.org Signed-off-by: Greg Kroah-Hartman commit 44995e6f07028f798efd0c3c11a1efc78330f600 Author: Douglas Anderson Date: Mon Dec 11 07:32:41 2023 -0800 usb: core: Fix crash w/ usb_choose_configuration() if no driver It's possible that usb_choose_configuration() can get called when a USB device has no driver. In this case the recent commit a87b8e3be926 ("usb: core: Allow subclassed USB drivers to override usb_choose_configuration()") can cause a crash since it dereferenced the driver structure without checking for NULL. Let's add a check. A USB device with no driver is an anomaly, so make usb_choose_configuration() return immediately if there is no driver. This was seen in the real world when usbguard got ahold of a r8152 device at the wrong time. It can also be simulated via this on a computer with one r8152-based USB Ethernet adapter: cd /sys/bus/usb/drivers/r8152-cfgselector to_unbind="$(ls -d *-*)" real_dir="$(readlink -f "${to_unbind}")" echo "${to_unbind}" > unbind cd "${real_dir}" echo 0 > authorized echo 1 > authorized Fixes: a87b8e3be926 ("usb: core: Allow subclassed USB drivers to override usb_choose_configuration()") Reviewed-by: Alan Stern Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20231211073237.v3.1.If27eb3bf7812f91ab83810f232292f032f4203e0@changeid Signed-off-by: Greg Kroah-Hartman commit 7d530f4cc0632056d9f8f207245aa3d91a25d168 Author: Kyle Tso Date: Tue Dec 5 15:47:46 2023 +0800 usb: typec: tcpm: Query Source partner for FRS capability only if it is DRP Source-only port partner will always respond NOT_SUPPORTED to GET_SINK_CAP. Avoid this redundant AMS by bailing out querying the FRS capability if the Source port partner is not DRP. Signed-off-by: Kyle Tso Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231205074747.1821297-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 70e6163d17dd501ef27680eeb80d78b2cf823c5e Author: Dmitry Baryshkov Date: Mon Dec 4 04:03:02 2023 +0200 arm64: dts: qcom: qrb5165-rb5: use u16 for DP altmode svid Follow the bindings and use 16-bit value for AltMode SVID instead of using the full u32. Fixes: b3dea914127e ("arm64: dts: qcom: qrb5165-rb5: enable DP altmode") Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231204020303.2287338-4-dmitry.baryshkov@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0dbda971860c702c33df173b627f9d74b3152b75 Author: Dmitry Baryshkov Date: Mon Dec 4 04:03:01 2023 +0200 usb: typec: change altmode SVID to u16 entry As stated in the changelog for the commit 7b458a4c5d73 ("usb: typec: Add typec_port_register_altmodes()"), the code should be adjusted according to the AltMode bindings. As the SVID is 16 bits wide (according to the USB PD Spec), use fwnode_property_read_u16() to read it. Acked-by: Hans de Goede Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231204020303.2287338-3-dmitry.baryshkov@linaro.org Signed-off-by: Greg Kroah-Hartman commit d1756ac67e7f8d4c15ba4dd0c132e593b0a56de6 Author: Dmitry Baryshkov Date: Mon Dec 4 04:03:00 2023 +0200 dt-bindings: connector: usb: add altmodes description Add description of the USB-C AltModes supported on the particular USB-C connector. This is required for devices like Qualcomm Robotics RB5, which have no other way to express alternative modes supported by the hardware platform. Reviewed-by: Rob Herring Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231204020303.2287338-2-dmitry.baryshkov@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7516f86aa5ec9f3f2ae1c5c12b56eef76c7b1a15 Author: Christophe JAILLET Date: Sun Dec 10 18:36:15 2023 +0100 usb: typec: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/c7b99c4f52649ce6405779fbf9170edc5633fdbb.1702229697.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit e4e5f9e3bff79951cef7fd6912049b1cecf8a72d Author: Christophe JAILLET Date: Sun Dec 10 18:43:56 2023 +0100 usb: chipidea: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Acked-by: Peter Chen Link: https://lore.kernel.org/r/8bf382976c0ba0986c0dbe93427266273f0776ef.1702230217.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 2ddc97a71a27b6f940f1ed0f1e70a4e8e62b77e5 Author: Fabio Estevam Date: Thu Dec 7 14:29:12 2023 -0300 dt-bindings: usb: nxp,ptn5110: Fix typos in the title Fix the misspelled "Controller" and "Type-C" words. Signed-off-by: Fabio Estevam Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231207172912.2658226-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit ecb43ef59498628a9df79afb47e67dadf777e3cd Author: Fabio Estevam Date: Thu Dec 7 09:42:17 2023 -0300 dt-bindings: usb: genesys,gl850g: Document 'peer-hub' The 'peer-hub' is a valid property for the hub. Document it to fix the following dt-schema warning: imx8mp-debix-som-a-bmb-08.dtb: hub@1: 'peer-hub' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/usb/genesys,gl850g.yaml# Signed-off-by: Fabio Estevam Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231207124217.2530457-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 66aad7d8d3ec5a3a8ec2023841bcec2ded5f65c9 Author: Oliver Neukum Date: Thu Dec 7 14:26:30 2023 +0100 usb: cdc-acm: return correct error code on unsupported break In ACM support for sending breaks to devices is optional. If a device says that it doenot support sending breaks, the host must respect that. Given the number of optional features providing tty operations for each combination is not practical and errors need to be returned dynamically if unsupported features are requested. In case a device does not support break, we want the tty layer to treat that like it treats drivers that statically cannot support sending a break. It ignores the inability and does nothing. This patch uses EOPNOTSUPP to indicate that. Signed-off-by: Oliver Neukum Fixes: 9e98966c7bb94 ("tty: rework break handling") Link: https://lore.kernel.org/r/20231207132639.18250-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 53b5ff83d89349778bc61e67237f72c5dc6536c2 Author: Piyush Mehta Date: Tue Nov 21 23:51:18 2023 +0530 usb: dwc3: xilinx: improve error handling for PM APIs Improve error handling for PM APIs in the dwc3_xlnx_probe function by introducing devm_pm_runtime_enable and error label. Removed unnecessary API pm_runtime_disable call in dwc3_xlnx_remove. Signed-off-by: Piyush Mehta Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1700590878-124335-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Greg Kroah-Hartman commit 3ed57b41a4125609e9fd03e32228aec61d95fe1f Author: Tony Luck Date: Wed Nov 15 11:54:48 2023 -0800 x86/mce: Remove old CMCI storm mitigation code When a "storm" of corrected machine check interrupts (CMCI) is detected this code mitigates by disabling CMCI interrupt signalling from all of the banks owned by the CPU that saw the storm. There are problems with this approach: 1) It is very coarse grained. In all likelihood only one of the banks was generating the interrupts, but CMCI is disabled for all. This means Linux may delay seeing and processing errors logged from other banks. 2) Although CMCI stands for Corrected Machine Check Interrupt, it is also used to signal when an uncorrected error is logged. This is a problem because these errors should be handled in a timely manner. Delete all this code in preparation for a finer grained solution. Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Yazen Ghannam Tested-by: Yazen Ghannam Link: https://lore.kernel.org/r/20231115195450.12963-2-tony.luck@intel.com commit 5e8cdb6f6ebe28976876ab04995a5d3779b85082 Author: Gary Rookard Date: Wed Dec 13 12:54:59 2023 -0500 staging: rtl8192e: rename variable HTInitializeHTInfo Coding style issue, checkpatch Avoid CamelCase, rename it. HTInitializeHTInfo -> ht_initialize_ht_info Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231213175459.5425-6-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 8caf3a8e5d54466b2efc6aa979364bf6f60cd29d Author: Gary Rookard Date: Wed Dec 13 12:54:58 2023 -0500 staging: rtl8192e: rename variable HTOnAssocRsp Coding style issue, checkpatch Avoid CamelCase, rename it. HTOnAssocRsp -> ht_on_assoc_rsp Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231213175459.5425-5-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 36802495f55813bd5a3139b6b5e2e36001fc5fe4 Author: Gary Rookard Date: Wed Dec 13 12:54:57 2023 -0500 staging: rtl8192e: rename variable HTSetConnectBwMode Coding style issue, checkpatch Avoid CamelCase, rename it. HTSetConnectBwMode -> ht_set_connect_bw_mode Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231213175459.5425-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 162440f2d7c721170917dccb2d91a932c43fe302 Author: Philipp Hortmann Date: Wed Dec 13 17:52:55 2023 +0100 staging: rtl8192e: Remove constant variable reg_rx_reorder_enable Remove constant variable reg_rx_reorder_enable and replace it at the place of usage with the value. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/c9bf183b78bfe1fc242dc496786cd0c9f20262a4.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 286f01ea0fcf244d72a8bde11d87eaaa0b0ffd80 Author: Philipp Hortmann Date: Wed Dec 13 17:52:46 2023 +0100 staging: rtl8192e: Remove constant variable reg_rt2rt_aggregation ht_info->reg_rt2rt_aggregation is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_rt2rt_aggregation can be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/07a0954cc6fd730d9d42054fa36346d1de07cd06.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f77cf88b9e3f8a04c69ea685b9959022721f587d Author: Philipp Hortmann Date: Wed Dec 13 17:52:38 2023 +0100 staging: rtl8192e: Remove variable ht_info->RT2RT_HT_Mode Remove variable ht_info->RT2RT_HT_Mode as it is always set but never evaluated. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b6253e56cdb346045a234d1f545d7ef92cdd220d.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 584c18e21dfa056f554d89819a88b3de8c6109d3 Author: Philipp Hortmann Date: Wed Dec 13 17:52:29 2023 +0100 staging: rtl8192e: Remove variable ht_info->mpdu_density ht_info->mpdu_density is set to 0 and unchanged. Therefore all equations result accordingly and ht_info->forced_short_gi can be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ef90d31e0e8281235ae4d138ce2de26e35c1bbd1.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a78952c055b9b3c3423c1dfdff7be0be158f0621 Author: Philipp Hortmann Date: Wed Dec 13 17:52:21 2023 +0100 staging: rtl8192e: Remove unused variable ht_info->amsdu_support Remove unused variable ht_info->amsdu_support. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b3ea8ddd16a753d9ee1ee8b99e31e990ce89133b.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 57125eee5f032cbdf6ef3027c829200ac3a39ad5 Author: Philipp Hortmann Date: Wed Dec 13 17:52:12 2023 +0100 staging: rtl8192e: Remove constant variable forced_short_gi ht_info->forced_short_gi is set to 0 and unchanged. Therefore all equations result accordingly and ht_info->forced_short_gi can be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/fc5711032c658af6ae6c5a7a98c52871c29f8c33.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit e7eeb02bf8edd17f0d8851404a3917d8c10daf7b Author: Philipp Hortmann Date: Wed Dec 13 17:52:04 2023 +0100 staging: rtl8192e: Remove constant variable peer_mimo_ps MimoPwrSave is set to 3 and not changed. peer_mimo_ps is set to MimoPwrSave and not changed. All evaluations of peer_mimo_ps with 0 will have a constant result and can be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/7b2ccccde769133db9365c693fdd0c42e9dc75f9.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit bd027a93da95e04e72cb13665503f0a2870b774b Author: Philipp Hortmann Date: Wed Dec 13 17:51:54 2023 +0100 staging: rtl8192e: Remove constant variable self_mimo_ps Remove constant variable self_mimo_ps and replace it at the place of usage with the value. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/9e1bec657ddb22eec54e441a4341ddbe4ed7568e.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ce839694c5ebce6dba6ac0f40267fa203b83b2c2 Author: Philipp Hortmann Date: Wed Dec 13 17:51:45 2023 +0100 staging: rtl8192e: Remove unused variable nMaxAMSDUSize Remove unused variables nMaxAMSDUSize and amsdu_max_size. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/4df74fda70535ddbdfc90ba7c98e9d4a773f944d.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 76cf79dac048d4a1ce4200c41b755a77b567acf2 Author: Philipp Hortmann Date: Wed Dec 13 17:51:32 2023 +0100 staging: rtl8192e: Remove variable bCurrent_AMSDU_Support bCurrent_AMSDU_Support and nCurrent_AMSDU_MaxSize are set but never evaluated. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d2711450dbc62974162abd4db070e34c9828997d.1702406712.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 145524f81550730be117c3ccfa7b2edd902ee28a Author: Gary Rookard Date: Tue Dec 12 11:56:35 2023 -0500 staging: rtl8192e: rename variable bAssoc Coding style issue, checkpatch Avoid CamelCase, rename it. bAssoc -> assoc Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231212165637.17618-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 1a469abcb76e4bcb487f641daea23650c584f1a4 Author: Gary Rookard Date: Tue Dec 12 11:56:34 2023 -0500 staging: rtl8192e: rename variable IsEncrypt Coding style issue, checkpatch Avoid CamelCase, rename it. IsEncrypt -> is_encrypt Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231212165637.17618-3-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 078330abda79bf56c35dd570a989d30008618d83 Author: Gary Rookard Date: Tue Dec 12 11:56:33 2023 -0500 staging: rtl8192e: rename variable posHTCap Coding style issue, checkpatch Avoid CamelCase, rename it. posHTCap -> pos_ht_cap Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231212165637.17618-2-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 9b1763331ddfbd9767d0f86edfc8eace74a3aad7 Author: Tree Davies Date: Sun Dec 10 11:37:05 2023 -0800 Staging: rtl8192e: Remove variable macId Remove variable macId as it is defined but never used. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231210193705.2131807-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 0c5e85dd078a2e57ff93a6607071f049ca919b58 Author: Tree Davies Date: Sun Dec 10 11:37:04 2023 -0800 Staging: rtl8192e: Remove variable bEncrypt Remove variable bEncrypt as it is defined but never used. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231210193705.2131807-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit f9f0bcaa91c802c0cfb241d082e6bec306166475 Author: Tree Davies Date: Sun Dec 10 11:37:03 2023 -0800 Staging: rtl8192e: Remove variable bLastSeg Remove variable bLastSeg as it is defined but never used. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231210193705.2131807-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit e90337ccf4e7ac63ecaa95833df206f177343bdc Author: Tree Davies Date: Sun Dec 10 11:37:02 2023 -0800 Staging: rtl8192e: Remove variable bFirstSeg Remove variable bFirstSeg as it is defined but never used. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231210193705.2131807-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 07c9ef14073e96c3ef749b3830f8f0973774e860 Author: Gary Rookard Date: Sun Dec 10 19:13:35 2023 -0500 staging: rtl8192e: rename variable HT_PickMCSRate Coding style issue, checkpatch Avoid CamelCase, rename it. HT_PickMCSRate -> ht_pick_mcs_rate Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231211001335.26169-6-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 83280534e7c5775e5271bd7cf12c5b2999011a17 Author: Gary Rookard Date: Sun Dec 10 19:13:34 2023 -0500 staging: rtl8192e: rename variable HTConstructRT2RTAggElement Coding style issue, checkpatch Avoid CamelCase, rename it. HTConstructRT2RTAggElement -> ht_construct_rt2rt_agg_element Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231211001335.26169-5-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 9ee07ff4aefb9c5b7d447e3e454cf5700866303d Author: Gary Rookard Date: Sun Dec 10 19:13:33 2023 -0500 staging: rtl8192e: rename variable HTConstructCapabilityElement Coding style issue, checkpatch Avoid CamelCase, rename it. HTConstructCapabilityElement -> ht_construct_capability_element Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231211001335.26169-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 9ba1a16005dbe7d56dfe9920b6c6c8fc8ab6ef7a Author: Gary Rookard Date: Sun Dec 10 19:13:32 2023 -0500 staging: rtl8192e: rename variable HTResetIOTSetting Coding style issue, checkpatch Avoid CamelCase, rename it. HTResetIOTSetting -> ht_reset_iot_setting Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231211001335.26169-3-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 6bcb6ec33b1b680f14d91d11bd2a36bb6781465b Author: Gary Rookard Date: Sun Dec 10 19:13:31 2023 -0500 staging: rtl8192e: rename variable HTIOTActDetermineRaFunc Coding style issue, checkpatch Avoid CamelCase, rename it. HTIOTActDetermineRaFunc -> ht_iot_act_determine_ra_function Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231211001335.26169-2-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 374d8bbd1445a827d029500e43d07c4492ec745b Author: Philipp Hortmann Date: Sun Dec 10 16:27:03 2023 +0100 staging: rtl8192e: Remove struct ht_info_ele SelfHTInfo Remove struct ht_info_ele SelfHTInfo as it is unused. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e8692d40b3cba3de1b4ceb8e72186e8d40afec73.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit a496db4815bf649bcfcd6b31dc327fa1fa76dbba Author: Philipp Hortmann Date: Sun Dec 10 16:26:58 2023 +0100 staging: rtl8192e: Remove variable ht_info->bCurSuppCCK ht_info->bCurSuppCCK is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->bCurSuppCCK can be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/159a1a84c7bc90042bf1618a067f02ac123dd15d.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0588787b2d60ad6c5a30d2be918db8c85fc4f61 Author: Philipp Hortmann Date: Sun Dec 10 16:26:51 2023 +0100 staging: rtl8192e: Remove equation with pPeerHTCap->DssCCk Remove equation with pPeerHTCap->DssCCk as it is set to 1 and unchanged. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/16ec7f928d1c51ffe68b9a1a68d09abaaa79924a.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b1691deaec49715fbdf73ae7184bc2f3a3944b77 Author: Philipp Hortmann Date: Sun Dec 10 16:26:44 2023 +0100 staging: rtl8192e: Remove variable ForcedAMSDUMode ForcedAMSDUMode is set to 1 and then never evaluated. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ae8ea27e2c3708754b798f09ba43ed50a24b8a55.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7419f917d321546d9587656dbd41337c238dfa8d Author: Philipp Hortmann Date: Sun Dec 10 16:26:38 2023 +0100 staging: rtl8192e: Remove variable ForcedAMPDUMode ForcedAMPDUMode is set to 0 and unchanged. Therefore all equations result accordingly and ForcedAMPDUMode can be removed. As a result label FORCED_AGG_SETTING is unused and can be removed as well. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/5bf740a2da78ec3b54249a30cbee70301b37e7eb.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit e5d021b73bf8cbff52ea11cc4c1191ef5f7e5aff Author: Philipp Hortmann Date: Sun Dec 10 16:26:30 2023 +0100 staging: rtl8192e: Remove variable ht_info->reg_short_gi_40mhz ht_info->reg_short_gi_40mhz is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_short_gi_40mhz can be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/255039e0cb27582a98a0b86340dfe88f14c08a76.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 97c75386a5f38e3213a2cb1e450b8e51337e4198 Author: Philipp Hortmann Date: Sun Dec 10 16:26:24 2023 +0100 staging: rtl8192e: Remove variable ht_info->reg_short_gi_20mhz ht_info->reg_short_gi_20mhz is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_short_gi_20mhz can be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/a2778d12a2bb104a980a69f8eb05ba1cabf7b545.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 923f0052a3057a84b1b1aff971e47fdca13213f0 Author: Philipp Hortmann Date: Sun Dec 10 16:26:18 2023 +0100 staging: rtl8192e: Remove variable ht_info->reg_supp_cck ht_info->reg_supp_cck is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_supp_cck can be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/2c9be9efb1c0608a7fc2658d813b9adbc1185db1.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit c2386096b8317c79d4644d960d32de00dc38915b Author: Philipp Hortmann Date: Sun Dec 10 16:26:10 2023 +0100 staging: rtl8192e: Remove variable ht_info->reg_bw_40mhz ht_info->reg_bw_40mhz is set to 1 and unchanged. Therefore all equations result accordingly and ht_info->reg_bw_40mhz can be removed. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/4ff7afdc2ada8095c95f053381834cea9f5796bf.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1f76ce4fc0e3fcc17468ad5d7ae7fb2a8e0c4b43 Author: Philipp Hortmann Date: Sun Dec 10 16:25:58 2023 +0100 staging: rtl8192e: Remove unused struct iw_range_with_scan_capa Remove unused struct iw_range_with_scan_capa. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/8b4532b8739ca0baa9fa7c736dab68130510ffe8.1702212003.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f0ac5b23039610619ca4a4805528553ecb6bc815 Author: Patrick Delaunay Date: Fri Dec 15 11:15:36 2023 +0000 nvmem: stm32: add support for STM32MP25 BSEC to control OTP data On STM32MP25, OTP area may be read/written by using BSEC (boot, security and OTP control). The BSEC internal peripheral is only managed by the secure world. The 12 Kbits of OTP (effective) are organized into the following regions: - lower OTP (OTP0 to OTP127) = 4096 lower OTP bits, bitwise (1-bit) programmable - mid OTP (OTP128 to OTP255) = 4096 middle OTP bits, bulk (32-bit) programmable - upper OTP (OTP256 to OTP383) = 4096 upper OTP bits, bulk (32-bit) programmable, only accessible when BSEC is in closed state. As HWKEY and ECIES key are only accessible by ROM code; only 368 OTP words are managed in this driver (OTP0 to OTP267). This patch adds the STM32MP25 configuration for reading and writing the OTP data using the OP-TEE BSEC TA services. Signed-off-by: Patrick Delaunay Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a729c0f57dc84da3f884d8f6090a8fd2798e32b2 Author: Patrick Delaunay Date: Fri Dec 15 11:15:35 2023 +0000 dt-bindings: nvmem: add new stm32mp25 compatible for stm32-romem Add a new compatible for stm32mp25 support. Signed-off-by: Patrick Delaunay Acked-by: Conor Dooley Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0331c611949fffdf486652450901a4dc52bc5cca Author: Miquel Raynal Date: Fri Dec 15 11:15:34 2023 +0000 nvmem: core: Expose cells through sysfs The binary content of nvmem devices is available to the user so in the easiest cases, finding the content of a cell is rather easy as it is just a matter of looking at a known and fixed offset. However, nvmem layouts have been recently introduced to cope with more advanced situations, where the offset and size of the cells is not known in advance or is dynamic. When using layouts, more advanced parsers are used by the kernel in order to give direct access to the content of each cell, regardless of its position/size in the underlying device. Unfortunately, these information are not accessible by users, unless by fully re-implementing the parser logic in userland. Let's expose the cells and their content through sysfs to avoid these situations. Of course the relevant NVMEM sysfs Kconfig option must be enabled for this support to be available. Not all nvmem devices expose cells. Indeed, the .bin_attrs attribute group member will be filled at runtime only when relevant and will remain empty otherwise. In this case, as the cells attribute group will be empty, it will not lead to any additional folder/file creation. Exposed cells are read-only. There is, in practice, everything in the core to support a write path, but as I don't see any need for that, I prefer to keep the interface simple (and probably safer). The interface is documented as being in the "testing" state which means we can later add a write attribute if though relevant. Signed-off-by: Miquel Raynal Tested-by: Rafał Miłecki Tested-by: Chen-Yu Tsai Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 192048e5a5b6660079ba4fce679e82adc05cfece Author: Miquel Raynal Date: Fri Dec 15 11:15:33 2023 +0000 ABI: sysfs-nvmem-cells: Expose cells through sysfs The binary content of nvmem devices is available to the user so in the easiest cases, finding the content of a cell is rather easy as it is just a matter of looking at a known and fixed offset. However, nvmem layouts have been recently introduced to cope with more advanced situations, where the offset and size of the cells is not known in advance or is dynamic. When using layouts, more advanced parsers are used by the kernel in order to give direct access to the content of each cell regardless of their position/size in the underlying device, but these information were not accessible to the user. By exposing the nvmem cells to the user through a dedicated cell/ folder containing one file per cell, we provide a straightforward access to useful user information without the need for re-writing a userland parser. Content of nvmem cells is usually: product names, manufacturing date, MAC addresses, etc, Signed-off-by: Miquel Raynal Reviewed-by: Greg Kroah-Hartman Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit fc29fd821d9ac2ae3d32a722fac39ce874efb883 Author: Miquel Raynal Date: Fri Dec 15 11:15:32 2023 +0000 nvmem: core: Rework layouts to become regular devices Current layout support was initially written without modules support in mind. When the requirement for module support rose, the existing base was improved to adopt modularization support, but kind of a design flaw was introduced. With the existing implementation, when a storage device registers into NVMEM, the core tries to hook a layout (if any) and populates its cells immediately. This means, if the hardware description expects a layout to be hooked up, but no driver was provided for that, the storage medium will fail to probe and try later from scratch. Even if we consider that the hardware description shall be correct, we could still probe the storage device (especially if it contains the rootfs). One way to overcome this situation is to consider the layouts as devices, and leverage the native notifier mechanism. When a new NVMEM device is registered, we can populate its nvmem-layout child, if any, and wait for the matching to be done in order to get the cells (the waiting can be easily done with the NVMEM notifiers). If the layout driver is compiled as a module, it should automatically be loaded. This way, there is no strong order to enforce, any NVMEM device creation or NVMEM layout driver insertion will be observed as a new event which may lead to the creation of additional cells, without disturbing the probes with costly (and sometimes endless) deferrals. In order to achieve that goal we create a new bus for the nvmem-layouts with minimal logic to match nvmem-layout devices with nvmem-layout drivers. All this infrastructure code is created in the layouts.c file. Signed-off-by: Miquel Raynal Tested-by: Rafał Miłecki Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1172460e716784ac7e1049a537bdca8edbf97360 Author: Miquel Raynal Date: Fri Dec 15 11:15:31 2023 +0000 nvmem: Move and rename ->fixup_cell_info() This hook is meant to be used by any provider and instantiating a layout just for this is useless. Let's instead move this hook to the nvmem device and add it to the config structure to be easily shared by the providers. While at moving this hook, rename it ->fixup_dt_cell_info() to clarify its main intended purpose. Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1b7c298a4ecbc28cc6ee94005734bff55eb83d22 Author: Miquel Raynal Date: Fri Dec 15 11:15:30 2023 +0000 nvmem: Simplify the ->add_cells() hook The layout entry is not used and will anyway be made useless by the new layout bus infrastructure coming next, so drop it. While at it, clarify the kdoc entry. Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit ec9c08a1cb8dc5e8e003f95f5f62de41dde235bb Author: Miquel Raynal Date: Fri Dec 15 11:15:29 2023 +0000 nvmem: Create a header for internal sharing Before adding all the NVMEM layout bus infrastructure to the core, let's move the main nvmem_device structure in an internal header, only available to the core. This way all the additional code can be added in a dedicated file in order to keep the current core file tidy. Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4a1a40233b4a9fc159a5c7a27dc34c5c7bc5be55 Author: Miquel Raynal Date: Fri Dec 15 11:15:28 2023 +0000 nvmem: Move of_nvmem_layout_get_container() in another header nvmem-consumer.h is included by consumer devices, extracting data from NVMEM devices whereas nvmem-provider.h is included by devices providing NVMEM content. The only users of of_nvmem_layout_get_container() outside of the core are layout drivers, so better move its prototype to nvmem-provider.h. While we do so, we also move the kdoc associated with the function to the header rather than the .c file. Signed-off-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7f38b70042fcaa49219045bd1a9a2836e27a58ac Author: Miquel Raynal Date: Fri Dec 15 11:15:27 2023 +0000 of: device: Export of_device_make_bus_id() This helper is really handy to create unique device names based on their device tree path, we may need it outside of the OF core (in the NVMEM subsystem) so let's export it. As this helper has nothing patform specific, let's move it to of/device.c instead of of/platform.c so we can add its prototype to of_device.h. Signed-off-by: Miquel Raynal Acked-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231215111536.316972-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit e91db1614abae0cca248040c78b2c25f8dd97872 Author: Wang Jinchao Date: Fri Dec 15 18:06:59 2023 +0800 hv_netvsc: remove duplicated including of slab.h rm the second include Signed-off-by: Wang Jinchao Signed-off-by: David S. Miller commit f06f0891ce21d01517d88122b97caa2dbb8dc96d Merge: 283f105bc8252 b059aef76c519 Author: David S. Miller Date: Fri Dec 15 12:17:17 2023 +0000 Merge branch 'netlink-specs-legacy' Jakub Kicinski says: ==================== netlink: specs: prep legacy specs for C code gen Minor adjustments to some specs to make them ready for C code gen. v2: - fix MAINATINERS and subject of patch 3 ==================== Signed-off-by: David S. Miller commit b059aef76c519226730dd18777c0e15dad4fae21 Author: Jakub Kicinski Date: Thu Dec 14 17:57:35 2023 -0800 netlink: specs: mptcp: rename the MPTCP path management spec We assume in handful of places that the name of the spec is the same as the name of the family. We could fix that but it seems like a fair assumption to make. Rename the MPTCP spec instead. Reviewed-by: Mat Martineau Reviewed-by: Donald Hunter Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 209bcb9af8f166ed6ed81dd550d41b8b64b2ac09 Author: Jakub Kicinski Date: Thu Dec 14 17:57:34 2023 -0800 netlink: specs: ovs: correct enum names in specs Align the enum-names of OVS with what's actually in the uAPI. Either correct the names, or mark the enum as empty because the values are in fact #defines. Reviewed-by: Donald Hunter Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3ada0b33c454e2c8e3909b6d90576e993ac52d78 Author: Jakub Kicinski Date: Thu Dec 14 17:57:33 2023 -0800 netlink: specs: ovs: remove fixed header fields from attrs Op's "attributes" list is a workaround for families with a single attr set. We don't want to render a single huge request structure, the same for each op since we know that most ops accept only a small set of attributes. "Attributes" list lets us narrow down the attributes to what op acctually pays attention to. It doesn't make sense to put names of fixed headers in there. They are not "attributes" and we can't really narrow down the struct members. Remove the fixed header fields from attrs for ovs families in preparation for C codegen support. Reviewed-by: Donald Hunter Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 283f105bc82529648fa640e647095743d63283e0 Merge: b84d66b0fd370 d96f04e05f263 Author: David S. Miller Date: Fri Dec 15 12:03:20 2023 +0000 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== add v2 FW logging for ice driver Paul Stillwell says: Firmware (FW) log support was added to the ice driver, but that version is no longer supported. There is a newer version of FW logging (v2) that adds more control knobs to get the exact data out of the FW for debugging. The interface for FW logging is debugfs. This was chosen based on discussions here: https://lore.kernel.org/netdev/20230214180712.53fc8ba2@kernel.org/ and https://lore.kernel.org/netdev/20231012164033.1069fb4b@kernel.org/ We talked about using devlink in a variety of ways, but none of those options made any sense for the way the FW reports data. We briefly talked about using ethtool, but that seemed to go by the wayside. Ultimately it seems like using debugfs is the way to go so re-implement the code to use that. FW logging is across all the PFs on the device so restrict the commands to only PF0. If the device supports FW logging then a directory named 'fwlog' will be created under '/sys/kernel/debug/ice/'. A variety of files will be created to manage the behavior of logging. The following files will be created: - modules/ - nr_messages - enable - log_size - data where modules/ is used to read/write the log level for a specific module nr_messages is used to determine how many events should be in each message sent to the driver enable is used to start/stop FW logging. This is a boolean value so only 1 or 0 are permissible values log_size is used to configure the amount of memory the driver uses for log data data is used to read/clear the log data Generally there is a lot of data and dumping that data to syslog will result in a loss of data. This causes problems when decoding the data and the user doesn't know that data is missing until later. Instead of dumping the FW log output to syslog use debugfs. This ensures that all the data the driver has gets retrieved correctly. The FW log data is binary data that the FW team decodes to determine what happened in firmware. The binary blob is sent to Intel for decoding. --- v6: - use seq_printf() for outputting module info when reading from 'module' file - replace code that created argc and argv for handling command line input - removed checks in all the _read() and _write() functions to see if FW logging is supported because the files will not exist if it is not supported - removed warnings on allocation failures on debugfs file creation failures - removed a newline between memory allocation and checking if the memory was allocated - fixed cases where we could just return the value from a function call instead of saving the value in a variable - moved the check for PFO in ice_fwlog_init() to an earlier patch - reworked all of argument scanning in the _write() functions in ice_debugfs.c to remove adding characters past the end of the buffer v5: https://lore.kernel.org/netdev/20231205211251.2122874-1-anthony.l.nguyen@intel.com/ - changed the log level configuration from a single file for all modules to a file per module. - changed 'nr_buffs' to 'log_size' because users understand memory sizes better than a number of buffers - changed 'resolution' to 'nr_messages' to better reflect what it represents - updated documentation to reflect these changes - updated documentation to indicate that FW logging must be disabled to clear the data. also clarified that any value written to the 'data' file will clear the data v4: https://lore.kernel.org/netdev/20231005170110.3221306-1-anthony.l.nguyen@intel.com/ - removed CONFIG_DEBUG_FS wrapper around code because the debugfs calls handle this case already - moved ice_debugfs_exit() call to remove unreachable code issue - minor changes to documentation based on feedback v3: https://lore.kernel.org/netdev/20230815165750.2789609-1-anthony.l.nguyen@intel.com/ - Adjust error path cleanup in ice_module_init() for unreachable code. v2: https://lore.kernel.org/netdev/20230810170109.1963832-1-anthony.l.nguyen@intel.com/ - Rewrote code to use debugfs instead of devlink v1: https://lore.kernel.org/netdev/20230209190702.3638688-1-anthony.l.nguyen@intel.com/ ==================== Signed-off-by: David S. Miller commit 71cd7e80cfde548959952eac7063aeaea1f2e1c6 Author: Hongchen Zhang Date: Thu Nov 16 08:56:09 2023 +0800 PM: hibernate: Enforce ordering during image compression/decompression An S4 (suspend to disk) test on the LoongArch 3A6000 platform sometimes fails with the following error messaged in the dmesg log: Invalid LZO compressed length That happens because when compressing/decompressing the image, the synchronization between the control thread and the compress/decompress/crc thread is based on a relaxed ordering interface, which is unreliable, and the following situation may occur: CPU 0 CPU 1 save_image_lzo lzo_compress_threadfn atomic_set(&d->stop, 1); atomic_read(&data[thr].stop) data[thr].cmp = data[thr].cmp_len; WRITE data[thr].cmp_len Then CPU0 gets a stale cmp_len and writes it to disk. During resume from S4, wrong cmp_len is loaded. To maintain data consistency between the two threads, use the acquire/release variants of atomic set and read operations. Fixes: 081a9d043c98 ("PM / Hibernate: Improve performance of LZO/plain hibernation, checksum image") Cc: All applicable Signed-off-by: Hongchen Zhang Co-developed-by: Weihao Li Signed-off-by: Weihao Li [ rjw: Subject rewrite and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 0c4cae1bc00d31c78858c184ede351baea232bdb Author: Chris Feng Date: Wed Dec 13 16:32:51 2023 +0800 PM: hibernate: Avoid missing wakeup events during hibernation Wakeup events that occur in the hibernation process's hibernation_platform_enter() cannot wake up the system. Although the current hibernation framework will execute part of the recovery process after a wakeup event occurs, it ultimately performs a shutdown operation because the system does not check the return value of hibernation_platform_enter(). In short, if a wakeup event occurs before putting the system into the final low-power state, it will be missed. To solve this problem, check the return value of hibernation_platform_enter(). When it returns -EAGAIN or -EBUSY (indicate the occurrence of a wakeup event), execute the hibernation recovery process, discard the previously saved image, and ultimately return to the working state. Signed-off-by: Chris Feng [ rjw: Rephrase the message printed when going back to the working state ] Signed-off-by: Rafael J. Wysocki commit b07bc2347672cc8c7293c64499f1488278c5ca3d Author: Joakim Zhang Date: Thu Dec 14 16:25:26 2023 +0800 dma-mapping: clear dev->dma_mem to NULL after freeing it Reproduced with below sequence: dma_declare_coherent_memory()->dma_release_coherent_memory() ->dma_declare_coherent_memory()->"return -EBUSY" error It will return -EBUSY from the dma_assign_coherent_memory() in dma_declare_coherent_memory(), the reason is that dev->dma_mem pointer has not been set to NULL after it's freed. Fixes: cf65a0f6f6ff ("dma-mapping: move all DMA mapping code to kernel/dma") Signed-off-by: Joakim Zhang Signed-off-by: Christoph Hellwig commit 55c543865b76830f524ce5ce1243266a93d06f84 Author: Petr Tesarik Date: Fri Dec 1 13:13:52 2023 +0100 swiotlb: reduce area lock contention for non-primary IO TLB pools If multiple areas and multiple IO TLB pools exist, first iterate the current CPU specific area in all pools. Then move to the next area index. This is best illustrated by a diagram: area 0 | area 1 | ... | area M | pool 0 A B C pool 1 D E ... pool N F G H Currently, each pool is searched before moving on to the next pool, i.e. the search order is A, B ... C, D, E ... F, G ... H. With this patch, each area is searched in all pools before moving on to the next area, i.e. the search order is A, D ... F, B, E ... G ... C ... H. Note that preemption is not disabled, and raw_smp_processor_id() may not return a stable result, but it is called only once to determine the initial area index. The search will iterate over all areas eventually, even if the current task is preempted. Next, some pools may have less (but not more) areas than default_nareas. Skip such pools if the distance from the initial area index is greater than pool->nareas. This logic ensures that for every pool the search starts in the initial CPU's own area and never tries any area twice. To verify performance impact, I booted the kernel with a minimum pool size ("swiotlb=512,4,force"), so multiple pools get allocated, and I ran these benchmarks: - small: single-threaded I/O of 4 KiB blocks, - big: single-threaded I/O of 64 KiB blocks, - 4way: 4-way parallel I/O of 4 KiB blocks. The "var" column in the tables below is the coefficient of variance over 5 runs of the test, the "diff" column is the relative difference against base in read-write I/O bandwidth (MiB/s). Tested on an x86 VM against a QEMU virtio SATA driver backed by a RAM-based block device on the host: base patched var var diff small 0.69% 0.62% +25.4% big 2.14% 2.27% +25.7% 4way 2.65% 1.70% +23.6% Tested on a Raspberry Pi against a class-10 A1 microSD card: base patched var var diff small 0.53% 1.96% -0.3% big 0.02% 0.57% +0.8% 4way 6.17% 0.40% +0.3% These results confirm that there is significant performance boost in the software IO TLB slot allocation itself. Where performance is dominated by actual hardware, there is no measurable change. Signed-off-by: Petr Tesarik Reviewed-by: Mirsad Todorovac Signed-off-by: Christoph Hellwig commit 4ad4c1f394b84f9941a10aa8aaf11102478a390b Author: Robin Murphy Date: Fri Nov 24 18:10:03 2023 +0000 dma-mapping: don't store redundant offsets A bus_dma_region necessarily stores both CPU and DMA base addresses for a range, so there's no need to also store the difference between them. Signed-off-by: Robin Murphy Acked-by: Rob Herring Signed-off-by: Christoph Hellwig commit b84d66b0fd3709e36384a2cd893fbdddfc423f1f Merge: 9ed816b106bb4 00e7f29d9b895 Author: David S. Miller Date: Fri Dec 15 11:05:03 2023 +0000 Merge branch 'mv88e6xxx-counters' Tobias Waldekranz says: ==================== net: dsa: mv88e6xxx: Add "eth-mac" and "rmon" counter group support The majority of the changes (2/8) are about refactoring the existing ethtool statistics support to make it possible to read individual counters, rather than the whole set. 4/8 tries to collect all information about a stat in a single place using a mapper macro, which is then used to generate the original list of stats, along with a matching enum. checkpatch is less than amused with this construct, but prior art exists (__BPF_FUNC_MAPPER in include/uapi/linux/bpf.h, for example). To support the histogram counters from the "rmon" group, we have to change mv88e6xxx's configuration of them. Instead of counting rx and tx, we restrict them to rx-only. 6/8 has the details. With that in place, adding the actual counter groups is pretty straight forward (5,7/8). Tie it all together with a selftest (8/8). v3 -> v4: - Return size_t from mv88e6xxx_stats_get_stats - Spelling errors in commit message of 6/8 - Improve selftest: - Report progress per-bucket - Test both ports in the pair - Increase MTU, if required v2 -> v3: - Added 6/8 - Added 8/8 v1 -> v2: - Added 1/6 - Added 3/6 - Changed prototype of stats operation to reflect the fact that the number of read stats are returned, no errors - Moved comma into MV88E6XXX_HW_STAT_MAPPER definition - Avoid the construction of mapping table iteration which relied on struct layouts outside of mv88e6xxx's control ==================== Signed-off-by: David S. Miller commit 00e7f29d9b895cbee58b7071900dd52ed6dcec1e Author: Tobias Waldekranz Date: Thu Dec 14 14:50:29 2023 +0100 selftests: forwarding: ethtool_rmon: Add histogram counter test Validate the operation of rx and tx histogram counters, if supported by the interface, by sending batches of packets targeted for each bucket. Signed-off-by: Tobias Waldekranz Tested-by: Vladimir Oltean Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 394518e3c119dac737a363cd9d3ad9c70246521e Author: Tobias Waldekranz Date: Thu Dec 14 14:50:28 2023 +0100 net: dsa: mv88e6xxx: Add "rmon" counter group support Report the applicable subset of an mv88e6xxx port's counters using ethtool's standardized "rmon" counter group. Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller commit ceea48efa35839ed3ddebb7fe9c00308fbf6d9cd Author: Tobias Waldekranz Date: Thu Dec 14 14:50:27 2023 +0100 net: dsa: mv88e6xxx: Limit histogram counters to ingress traffic Chips in this family only have one set of histogram counters, which can be used to count ingressing and/or egressing traffic. mv88e6xxx has, up until this point, kept the hardware default of counting both directions. In the mean time, standard counter group support has been added to ethtool. Via that interface, drivers may report ingress-only and egress-only histograms separately - but not combined. In order for mv88e6xxx to maximize amount of diagnostic information that can be exported via standard interfaces, we opt to limit the histogram counters to ingress traffic only. Which will allow us to export them via the standard "rmon" group in an upcoming commit. The reason for choosing ingress-only over egress-only, is to be compatible with RFC2819 (RMON MIB). Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller commit 0e047cec779697764af371df3db2a3e6d865c185 Author: Tobias Waldekranz Date: Thu Dec 14 14:50:26 2023 +0100 net: dsa: mv88e6xxx: Add "eth-mac" counter group support Report the applicable subset of an mv88e6xxx port's counters using ethtool's standardized "eth-mac" counter group. Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller commit 5780acbd249911fa101c53f3616d0aec5906211e Author: Tobias Waldekranz Date: Thu Dec 14 14:50:25 2023 +0100 net: dsa: mv88e6xxx: Give each hw stat an ID With the upcoming standard counter group support, we are no longer reading out the whole set of counters, but rather mapping a subset to the requested group. Therefore, create an enum with an ID for each stat, such that mv88e6xxx_hw_stats[] can be subscripted with a human-readable ID corresponding to the counter's name. Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller commit fc82a08ae795ee6b73fb6b50785f7be248bec7b5 Author: Tobias Waldekranz Date: Thu Dec 14 14:50:24 2023 +0100 net: dsa: mv88e6xxx: Fix mv88e6352_serdes_get_stats error path mv88e6xxx_get_stats, which collects stats from various sources, expects all callees to return the number of stats read. If an error occurs, 0 should be returned. Prevent future mishaps of this kind by updating the return type to reflect this contract. Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller commit 3def80e52db3ab5e1097b13a87a7a65b909630d3 Author: Tobias Waldekranz Date: Thu Dec 14 14:50:23 2023 +0100 net: dsa: mv88e6xxx: Create API to read a single stat counter This change contains no functional change. We simply push the hardware specific stats logic to a function reading a single counter, rather than the whole set. This is a preparatory change for the upcoming standard ethtool statistics support (i.e. "eth-mac", "eth-ctrl" etc.). Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller commit d624afaf4c792457d5ffa0037156f66cdfc1df18 Author: Tobias Waldekranz Date: Thu Dec 14 14:50:22 2023 +0100 net: dsa: mv88e6xxx: Push locking into stats snapshotting This is more consistent with the driver's general structure. Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller commit 9ed816b106bb40be6f1254696c6887e48f2a2b8f Merge: e16064c9af7fe 18872ba8cd240 Author: David S. Miller Date: Fri Dec 15 11:01:27 2023 +0000 Merge branch 'net-optmem_max-changes' Eric Dumazet says: ==================== net: optmem_max changes optmem_max default value is too small for tx zerocopy workloads. First patch increases default from 20KB to 128 KB, which is the value we have used for seven years. Second patch makes optmem_max sysctl per netns. Last patch tweaks two tests accordingly. ==================== Signed-off-by: David S. Miller commit 18872ba8cd2406ffa835f9f6276e47ed86fbb5d6 Author: Eric Dumazet Date: Thu Dec 14 10:49:01 2023 +0000 selftests/net: optmem_max became per netns /proc/sys/net/core/optmem_max is now per netns, change two tests that were saving/changing/restoring its value on the parent netns. Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit f5769faeec36b9d5b9df2c3e4f05a76d04ffd9c9 Author: Eric Dumazet Date: Thu Dec 14 10:49:00 2023 +0000 net: Namespace-ify sysctl_optmem_max optmem_max being used in tx zerocopy, we want to be able to control it on a netns basis. Following patch changes two tests. Tested: oqq130:~# cat /proc/sys/net/core/optmem_max 131072 oqq130:~# echo 1000000 >/proc/sys/net/core/optmem_max oqq130:~# cat /proc/sys/net/core/optmem_max 1000000 oqq130:~# unshare -n oqq130:~# cat /proc/sys/net/core/optmem_max 131072 oqq130:~# exit logout oqq130:~# cat /proc/sys/net/core/optmem_max 1000000 Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit 4944566706b27918ca15eda913889db296792415 Author: Eric Dumazet Date: Thu Dec 14 10:48:59 2023 +0000 net: increase optmem_max default value For many years, /proc/sys/net/core/optmem_max default value on a 64bit kernel has been 20 KB. Regular usage of TCP tx zerocopy needs a bit more. Google has used 128KB as the default value for 7 years without any problem. Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Reviewed-by: Willem de Bruijn Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit 327ec5f70609cf00c6f961073c01857555c6a8eb Author: Manivannan Sadhasivam Date: Thu Dec 14 12:03:28 2023 +0530 PCI: epf-mhi: Fix the DMA data direction of dma_unmap_single() In the error path of pci_epf_mhi_edma_write() function, the DMA data direction passed (DMA_FROM_DEVICE) doesn't match the actual direction used for the data transfer. Fix it by passing the correct one (DMA_TO_DEVICE). Fixes: 7b99aaaddabb ("PCI: epf-mhi: Add eDMA support") Reviewed-by: Krzysztof Wilczyński Link: https://lore.kernel.org/r/20231214063328.40657-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit e16064c9af7fe5a2220f7ad5f9be6fd7516e427c Merge: 523e1f5f3754f 6dab4083260b5 Author: David S. Miller Date: Fri Dec 15 10:58:00 2023 +0000 Merge branch 'mlxsw-CFF-flood-mode' Petr Machata says: ==================== mlxsw: CFF flood mode: NVE underlay configuration Recently, support for CFF flood mode (for Compressed FID Flooding) was added to the mlxsw driver. The most recent patchset has a detailed coverage of what CFF is and what has changed and how: https://lore.kernel.org/netdev/cover.1701183891.git.petrm@nvidia.com/ In CFF flood mode, each FID allocates a handful (in our implementation two or three) consecutive PGT entries. One entry holds the flood vector for unknown-UC traffic, one for MC, one for BC. To determine how to look up flood vectors, the CFF flood mode uses a concept of flood profiles, which are IDs that reference mappings from traffic types to offsets. In the case of CFF flood mode, the offset in question is applied to the PGT address configured at a FID. The same mechanism is used by NVE underlay for flooding. Again the profile ID and the traffic type determine the offset to apply, this time to KVD address used to look up flooding entries. Since mlxsw configures NVE underlay flood the same regardless of traffic type, only one offset was ever needed: the zero, which is the default, and thus no explicit configuration was needed. Now that CFF uses profiles as well, it would be better to configure the profile used by NVE explicitly, to make the configuration visible in the source code. In this patchset, add the register support (in patch #1), add a new traffic type to refer to "any traffic at all" (in patch #2) and finally configure the NVE profile explicitly for FIDs (in patch #3). So far, the implicitly configured flood profile was the ID 0. With this patchset, it changes to 3, leaving the 0 free to allow us to spot missed configuration. ==================== Signed-off-by: David S. Miller commit 6dab4083260b5fb46ec6e6ffd463b877127ab521 Author: Petr Machata Date: Thu Dec 14 14:19:07 2023 +0100 mlxsw: spectrum_fid: Set NVE flood profile as part of FID configuration The NVE flood profile is used for determining of offset applied to KVD address for NVE flood. We currently do not set it, leaving it at the default value of 0. That is not an issue: all the traffic-type-to-offset mappings (as configured by SFFP) default to offset of 0. This is what we need anyway, as mlxsw only allocates a single KVD entry for NVE underlay. The field is only relevant on Spectrum-2 and above. So to be fully consistent, we should split the existing controlled ops to Spectrum-1 and Spectrum>1 variants, with only the latter setting the field. But that seems like a lot of overhead for a single field whose meaning is "everything is the default". So instead pretend that the NVE flood profile does not exist in the controlled flood mode, like we have so far, and only set it when flood mode is CFF. Setting this at all serves dual purpose. First, it is now clear which profile belongs to NVE, because in the CFF mode, we have multiple users. This should prevent bugs in flood profile management. Second, using specifically non-zero value means there will be no valid uses of the profile 0, which we can therefore use as a sentinel. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit b2f5eb5a6509f055e24d141aeebb0d9d9f69d1f4 Author: Petr Machata Date: Thu Dec 14 14:19:06 2023 +0100 mlxsw: spectrum_fid: Add an "any" packet type Flood profiles have been used prior to CFF support for NVE underlay. Like is the case with FID flooding, an NVE profile describes at which offset a datum is located given traffic type. mlxsw currently only ever uses one KVD entry for NVE lookup, i.e. regardless of traffic type, the offset is always zero. To be able to describe this, add a traffic type enumerator describing "any traffic type". Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit d9d441e8e89db78683032bcedb74964575a8eafe Author: Petr Machata Date: Thu Dec 14 14:19:05 2023 +0100 mlxsw: reg: Add nve_flood_prf_id field to SFMR The field is used for setting a flood profile for lookup of KVD entry for NVE underlay. As the other uses of flood profile, this references a traffic type-to-offset mapping, except here it is not applied to PGT offsets, but KVD offsets. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 523e1f5f3754fa738f2ab6eb6f4d2b6f51d10b83 Merge: 6da0bcb820376 38eb804e8458b Author: David S. Miller Date: Fri Dec 15 10:45:57 2023 +0000 Merge branch 'net-at803x-cleanups' Christian Marangi says: ==================== net: phy: at803x: additional cleanup for qca808x This small series is a preparation for the big code split. While the qca808x code is waiting to be reviwed and merged, we can further cleanup and generalize shared functions between at803x and qca808x. With these last 2 patch everything is ready to move the driver to a dedicated directory and split the code by creating a library module for the few shared functions between the 2 driver. Eventually at803x can be further cleaned and generalized but everything will be already self contained and related only to at803x family of PHYs. ==================== Signed-off-by: David S. Miller commit 38eb804e8458ba181a03a0498ce4bf84eebd1931 Author: Christian Marangi Date: Thu Dec 14 01:44:32 2023 +0100 net: phy: at803x: make read specific status function more generic Rework read specific status function to be more generic. The function apply different speed mask based on the PHY ID. Make it more generic by adding an additional arg to pass the specific speed (ss) mask and use the provided mask to parse the speed value. This is needed to permit an easier deatch of qca808x code from the at803x driver. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 8e732f1c6f2dc5e18f766d0f1b11df9db2dd044a Author: Christian Marangi Date: Thu Dec 14 01:44:31 2023 +0100 net: phy: at803x: move specific qca808x config_aneg to dedicated function Move specific qca808x config_aneg to dedicated function to permit easier split of qca808x portion from at803x driver. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 6da0bcb82037655fa538293552aa52311f9c11fa Merge: bb7403655b3c3 542e893fbadc5 Author: David S. Miller Date: Fri Dec 15 10:37:36 2023 +0000 Merge branch 'vsock-credit-update' Arseniy Krasnov says: ==================== send credit update during setting SO_RCVLOWAT DESCRIPTION This patchset fixes old problem with hungup of both rx/tx sides and adds test for it. This happens due to non-default SO_RCVLOWAT value and deferred credit update in virtio/vsock. Link to previous old patchset: https://lore.kernel.org/netdev/39b2e9fd-601b-189d-39a9-914e5574524c@sberdevices.ru/ Here is what happens step by step: TEST INITIAL CONDITIONS 1) Vsock buffer size is 128KB. 2) Maximum packet size is also 64KB as defined in header (yes it is hardcoded, just to remind about that value). 3) SO_RCVLOWAT is default, e.g. 1 byte. STEPS SENDER RECEIVER 1) sends 128KB + 1 byte in a single buffer. 128KB will be sent, but for 1 byte sender will wait for free space at peer. Sender goes to sleep. 2) reads 64KB, credit update not sent 3) sets SO_RCVLOWAT to 64KB + 1 4) poll() -> wait forever, there is only 64KB available to read. So in step 4) receiver also goes to sleep, waiting for enough data or connection shutdown message from the sender. Idea to fix it is that rx kicks tx side to continue transmission (and may be close connection) when rx changes number of bytes to be woken up (e.g. SO_RCVLOWAT) and this value is bigger than number of available bytes to read. I've added small test for this, but not sure as it uses hardcoded value for maximum packet length, this value is defined in kernel header and used to control deferred credit update. And as this is not available to userspace, I can't control test parameters correctly (if one day this define will be changed - test may become useless). Head for this patchset is: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=9bab51bd662be4c3ebb18a28879981d69f3ef15a Link to v1: https://lore.kernel.org/netdev/20231108072004.1045669-1-avkrasnov@salutedevices.com/ Link to v2: https://lore.kernel.org/netdev/20231119204922.2251912-1-avkrasnov@salutedevices.com/ Link to v3: https://lore.kernel.org/netdev/20231122180510.2297075-1-avkrasnov@salutedevices.com/ Link to v4: https://lore.kernel.org/netdev/20231129212519.2938875-1-avkrasnov@salutedevices.com/ Link to v5: https://lore.kernel.org/netdev/20231130130840.253733-1-avkrasnov@salutedevices.com/ Link to v6: https://lore.kernel.org/netdev/20231205064806.2851305-1-avkrasnov@salutedevices.com/ Link to v7: https://lore.kernel.org/netdev/20231206211849.2707151-1-avkrasnov@salutedevices.com/ Link to v8: https://lore.kernel.org/netdev/20231211211658.2904268-1-avkrasnov@salutedevices.com/ Link to v9: https://lore.kernel.org/netdev/20231214091947.395892-1-avkrasnov@salutedevices.com/ Changelog: v1 -> v2: * Patchset rebased and tested on new HEAD of net-next (see hash above). * New patch is added as 0001 - it removes return from SO_RCVLOWAT set callback in 'af_vsock.c' when transport callback is set - with that we can set 'sk_rcvlowat' only once in 'af_vsock.c' and in future do not copy-paste it to every transport. It was discussed in v1. * See per-patch changelog after ---. v2 -> v3: * See changelog after --- in 0003 only (0001 and 0002 still same). v3 -> v4: * Patchset rebased and tested on new HEAD of net-next (see hash above). * See per-patch changelog after ---. v4 -> v5: * Change patchset tag 'RFC' -> 'net-next'. * See per-patch changelog after ---. v5 -> v6: * New patch 0003 which sends credit update during reading bytes from socket. * See per-patch changelog after ---. v6 -> v7: * Patchset rebased and tested on new HEAD of net-next (see hash above). * See per-patch changelog after ---. v7 -> v8: * See per-patch changelog after ---. v8 -> v9: * Patchset rebased and tested on new HEAD of net-next (see hash above). * Add 'Fixes' tag for the current 0002. * Reorder patches by moving two fixes first. v9 -> v10: * Squash 0002 and 0003 and update commit message in result. ==================== Signed-off-by: David S. Miller commit 542e893fbadc51caa38a7c4c2a8f8e822cdba2b1 Author: Arseniy Krasnov Date: Thu Dec 14 15:52:30 2023 +0300 vsock/test: two tests to check credit update logic Both tests are almost same, only differs in two 'if' conditions, so implemented in a single function. Tests check, that credit update message is sent: 1) During setting SO_RCVLOWAT value of the socket. 2) When number of 'rx_bytes' become smaller than SO_RCVLOWAT value. Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 0fe1798968115488c0c02f4633032a015b1faf97 Author: Arseniy Krasnov Date: Thu Dec 14 15:52:29 2023 +0300 virtio/vsock: send credit update during setting SO_RCVLOWAT Send credit update message when SO_RCVLOWAT is updated and it is bigger than number of bytes in rx queue. It is needed, because 'poll()' will wait until number of bytes in rx queue will be not smaller than O_RCVLOWAT, so kick sender to send more data. Otherwise mutual hungup for tx/rx is possible: sender waits for free space and receiver is waiting data in 'poll()'. Rename 'set_rcvlowat' callback to 'notify_set_rcvlowat' and set 'sk->sk_rcvlowat' only in one place (i.e. 'vsock_set_rcvlowat'), so the transport doesn't need to do it. Fixes: b89d882dc9fc ("vsock/virtio: reduce credit update messages") Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 93b80887668226180ea5f5349cc728ca6dc700ab Author: Arseniy Krasnov Date: Thu Dec 14 15:52:28 2023 +0300 virtio/vsock: fix logic which reduces credit update messages Add one more condition for sending credit update during dequeue from stream socket: when number of bytes in the rx queue is smaller than SO_RCVLOWAT value of the socket. This is actual for non-default value of SO_RCVLOWAT (e.g. not 1) - idea is to "kick" peer to continue data transmission, because we need at least SO_RCVLOWAT bytes in our rx queue to wake up user for reading data (in corner case it is also possible to stuck both tx and rx sides, this is why 'Fixes' is used). Fixes: b89d882dc9fc ("vsock/virtio: reduce credit update messages") Signed-off-by: Arseniy Krasnov Reviewed-by: Stefano Garzarella Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 9e5889c68d992b65efd10aa0a4523c96fd07077f Author: Claudiu Beznea Date: Thu Dec 7 09:06:56 2023 +0200 pinctrl: renesas: rzg2l: Add input enable to the Ethernet pins Some of the RZ/G3S Ethernet pins (P1_0, P7_0) can be configured with input enable. Enable this functionality for these pins. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-8-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 1bbc8ee40826164d16e32d377654c93ef48d1458 Author: Claudiu Beznea Date: Thu Dec 7 09:06:55 2023 +0200 pinctrl: renesas: rzg2l: Add output enable support Some of the Ethernet pins on RZ/G3S (but also valid for RZ/G2L) need to have the direction of the IO buffer set as output for Ethernet to work properly. On RZ/G3S, these pins are P1_0/P7_0, P1_1/P7_1, and can have the following Ethernet functions: TXC/TX_CLK or TX_CTL/TX_EN. As the pins supporting output enable are SoC specific, and there is a limited number of these pins (TXC/TX_CLK and/or TX_CTL/TX_EN), specify output enable capable port limits in the platform-based configuration data structure, to ensure proper validation. The OEN support has been intantiated for RZ/G3S at the moment. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-7-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 51996952b8b50942ed3069141ebc1dee13756b95 Author: Claudiu Beznea Date: Thu Dec 7 09:06:54 2023 +0200 pinctrl: renesas: rzg2l: Add support to select power source for Ethernet pins The GPIO controller available on RZ/G3S (but also on RZ/G2L) supports setting the power source for Ethernet pins. Based on the interface b/w the Ethernet controller and the Ethernet PHY, and on board design, a specific power source needs to be selected. The GPIO controller supports 1.8V, 2.5V, and 3.3V power source selection for the Ethernet pins. This can be selected though the ETHx_POC registers (x={0, 1}). Adjust the driver to support this, and to do proper instantiation for the RZ/G3S and RZ/G2L SoCs. On RZ/G2L only the get operation has been tested at the moment. While at it, as the power registers on RZ/G2L support access sizes of 8 bits, and these registers on RZ/G3S support access sizes of 8/16/32 bits, replace writel()/readl() on these registers with writeb()/readb(). This should allow us to use the same code on both SoCs w/o any issues. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-6-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d3aaa7203a17e8399df41e7c3f088f51368b001c Author: Claudiu Beznea Date: Thu Dec 7 09:06:53 2023 +0200 pinctrl: renesas: rzg2l: Add pin configuration support for pinmux groups On RZ/G3S different Ethernet pins need to be configured with different settings (e.g. power-source needs to be set, RGMII TXC and TX_CTL pins need output-enable). Adjust the driver to allow specifying pin configuration for pinmux groups. With this, DT settings like the following are taken into account by the driver: eth0_pins: eth0 { tx_ctl { pinmux = ; /* ET0_TX_CTL */ power-source = <1800>; output-enable; drive-strength-microamp = <5200>; }; }; Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-5-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d17bb4620f90f81d8a8a45c3d025c679a1b5efcd Author: Amir Goldstein Date: Tue Dec 12 08:19:30 2023 +0200 overlayfs.rst: fix ReST formatting Fix some indentation issues and fix missing newlines in quoted text by converting quoted text to code blocks. Reported-by: Christian Brauner Suggested-by: Bagas Sanjaya Reviewed-by: Bagas Sanjaya Reviewed-by: Akira Yokosawa Signed-off-by: Amir Goldstein commit bb7403655b3c3eb245d0ee330047cd3e20b3c4af Author: Leone Fernando Date: Wed Dec 13 17:19:35 2023 +0100 ipmr: support IP_PKTINFO on cache report IGMP msg In order to support IP_PKTINFO on those packets, we need to call ipv4_pktinfo_prepare. When sending mrouted/pimd daemons a cache report IGMP msg, it is unnecessary to set dst on the newly created skb. It used to be necessary on older versions until commit d826eb14ecef ("ipv4: PKTINFO doesnt need dst reference") which changed the way IP_PKTINFO struct is been retrieved. Changes from v1: 1. Undo changes in ipv4_pktinfo_prepare function. use it directly and copy the control block. Fixes: d826eb14ecef ("ipv4: PKTINFO doesnt need dst reference") Signed-off-by: Leone Fernando Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 02fed6d92badf08e2ac2cd1755d14c45c8f3d0ca Author: Konstantin Taranov Date: Wed Dec 13 02:01:47 2023 -0800 net: mana: add msix index sharing between EQs This patch allows to assign and poll more than one EQ on the same msix index. It is achieved by introducing a list of attached EQs in each IRQ context. It also removes the existing msix_index map that tried to ensure that there is only one EQ at each msix_index. This patch exports symbols for creating EQs from other MANA kernel modules. Signed-off-by: Konstantin Taranov Signed-off-by: David S. Miller commit 2373699560a754079579b7722b50d1d38de1960e Author: Miquel Raynal Date: Tue Nov 28 12:16:55 2023 +0100 mac802154: Avoid new associations while disassociating While disassociating from a PAN ourselves, let's set the maximum number of associations temporarily to zero to be sure no new device tries to associate with us. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20231128111655.507479-6-miquel.raynal@bootlin.com commit b720383ab1cfd584c8c0d9fc7b8cc541ed76dba5 Author: Miquel Raynal Date: Tue Nov 28 12:16:54 2023 +0100 ieee802154: Avoid confusing changes after associating Once associated with any device, we are part of a PAN (with a specific PAN ID), and we are expected to be present on a particular channel. Let's avoid confusing other devices by preventing any PAN ID/channel change once associated. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20231128111655.507479-5-miquel.raynal@bootlin.com commit 95d92505b6063896d7a1e6fcadd07e8552653cfb Author: Miquel Raynal Date: Tue Nov 28 12:16:53 2023 +0100 mac802154: Only allow PAN controllers to process association requests It is not very clear in the specification whether simple coordinators are allowed or not to answer to association requests themselves. As there is no synchronization mechanism, it is probably best to rely on the relay feature of these coordinators and avoid processing them in this case. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20231128111655.507479-4-miquel.raynal@bootlin.com commit e9dc1bc9b8dc3aa5380678c5a60593fb6abac68f Author: Miquel Raynal Date: Tue Nov 28 12:16:52 2023 +0100 mac802154: Use the PAN coordinator parameter when stamping packets ACKs come with the source and destination address empty, this has been clarified already. But there is something else: if the destination address is empty but the source address is valid, it may be a way to reach the PAN coordinator. Either the device receiving this frame is the PAN coordinator itself and should process what it just received (PACKET_HOST) or it is not and may, if supported, relay the packet as it is targeted to another device in the network. Right now we do not support relaying so the packet should be dropped in the first place, but the stamping looks more accurate this way. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20231128111655.507479-3-miquel.raynal@bootlin.com commit cf1b830e625baaee5bf1ae4ba4b562cbec5ad012 Author: Miquel Raynal Date: Tue Nov 28 12:16:51 2023 +0100 mac80254: Provide real PAN coordinator info in beacons Sending a beacon is a way to advertise a PAN, but also ourselves as coordinator in the PAN. There is only one PAN coordinator in a PAN, this is the device without parent (not associated itself to an "upper" coordinator). Instead of blindly saying that we are the PAN coordinator, let's actually use our internal information to fill this field. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20231128111655.507479-2-miquel.raynal@bootlin.com commit 10b7572d17871b027de1d17152f08a2dc9c3aef6 Author: Suman Ghosh Date: Wed Dec 13 15:23:49 2023 +0530 octeontx2-af: Fix multicast/mirror group lock/unlock issue As per the existing implementation, there exists a race between finding a multicast/mirror group entry and deleting that entry. The group lock was taken and released independently by rvu_nix_mcast_find_grp_elem() function. Which is incorrect and group lock should be taken during the entire operation of group updation/deletion. This patch fixes the same. Fixes: 51b2804c19cd ("octeontx2-af: Add new mbox to support multicast/mirror offload") Signed-off-by: Suman Ghosh Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 12da68e27b476fa38cf9c72c1d3887f3698d1f2c Merge: d6beb085e8ff3 952f9a5f4b090 Author: David S. Miller Date: Fri Dec 15 10:00:02 2023 +0000 Merge tag 'mlx5-updates-2023-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2023-12-13 Preparation for mlx5e socket direct feature. Socket direct will allow multiple PF devices attached to different NUMA nodes but sharing the same physical port. The following series is a small refactoring series in preparation to support socket direct in the following submission. Highlights: - Define required device registers and bits related to socket direct - Flow steering re-arrangements - Generalize TX objects (TISs) and store them in a common object, will be useful in the next series for per function object management. - Decouple raw CQ objects from their parent netdev priv - Prepare devcom for Socket Direct device group discovery. Please see the individual patches for more information. ==================== Signed-off-by: David S. Miller commit c480a421a4faf693c38e60b0fe6e554c9a3fee02 Author: Bharat Bhushan Date: Mon Dec 11 15:59:11 2023 +0530 crypto: octeontx2 - Fix cptvf driver cleanup This patch fixes following cleanup issues: - Missing instruction queue free on cleanup. This will lead to memory leak. - lfs->lfs_num is set to zero before cleanup, which will lead to improper cleanup. Signed-off-by: Bharat Bhushan Signed-off-by: Herbert Xu commit 9d7edaae7c1fbbc4d34124d41ac846a8b9ba5359 Author: Uwe Kleine-König Date: Sun Dec 10 23:12:27 2023 +0100 hwrng: xgene - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit b74bc79fff3eea72fc2e165fd7509a72d316d8cc Author: Uwe Kleine-König Date: Sun Dec 10 23:12:26 2023 +0100 hwrng: timeriomem - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 541b07190b408c311e84869d48efc921196c3efa Author: Uwe Kleine-König Date: Sun Dec 10 23:12:25 2023 +0100 hwrng: stm32 - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 4da4a48b41c90105c557cd31bed4aebe81f98d3a Author: Uwe Kleine-König Date: Sun Dec 10 23:12:24 2023 +0100 hwrng: omap - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit e5906ee3643817f2c56e6f16e4b840b418f25a02 Author: Uwe Kleine-König Date: Sun Dec 10 23:12:23 2023 +0100 hwrng: npcm - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 550b48d113b39612a5ee5324ab034d3f6ddb013d Author: Uwe Kleine-König Date: Sun Dec 10 23:12:22 2023 +0100 hwrng: n2 - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 0791bdf56112d90d0a04cbbf644d0211d05faeb6 Author: Uwe Kleine-König Date: Sun Dec 10 23:12:21 2023 +0100 hwrng: mxc - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 724989b8301728963e9e374a5d5186bfa5d43973 Author: Uwe Kleine-König Date: Sun Dec 10 23:12:20 2023 +0100 hwrng: ks-sa - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit b383836dfd535167dc1e3b64e03ceb7d2231ae85 Author: Uwe Kleine-König Date: Sun Dec 10 23:12:19 2023 +0100 hwrng: ingenic - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 9daec3cba0668ab7b6999487b990d21c24e8d6a6 Author: Uwe Kleine-König Date: Sun Dec 10 23:12:18 2023 +0100 hwrng: exynos - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Lukasz Stelmach Signed-off-by: Herbert Xu commit 0e00c5266fcf7d9e497fcf4ef9985f7cc56a8eb8 Author: Uwe Kleine-König Date: Sun Dec 10 23:12:17 2023 +0100 hwrng: cctrng - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Herbert Xu commit 30a7821f12353b3833b2dc28ced3ff4ec840df08 Author: Uwe Kleine-König Date: Sun Dec 10 23:12:16 2023 +0100 hwrng: atmel - Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Signed-off-by: Herbert Xu commit e4db80d80cff590eb5fe0444b665cec839c34133 Author: Christophe JAILLET Date: Sun Dec 10 19:41:51 2023 +0100 hwrng: virtio - Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit 1bed82257b1881b689ee41f14ecb4c20a273cac0 Author: Chenghai Huang Date: Sat Dec 9 15:01:35 2023 +0800 crypto: hisilicon/sec2 - optimize the error return process Add the printf of an error message and optimized the handling process of ret. Signed-off-by: Chenghai Huang Signed-off-by: Herbert Xu commit 03fa301230b6c2b11adcf4f89ecf4ae47ec446b7 Author: Chenghai Huang Date: Sat Dec 9 15:01:34 2023 +0800 crypto: hisilicon/qm - delete a dbg function Deleted a dbg function because this function has the risk of address leakage. In addition, this function is only used for debugging in the early stage and is not required in the future. Signed-off-by: Chenghai Huang Signed-off-by: Herbert Xu commit 27016f75f5ed47e2d8e0ca75a8ff1f40bc1a5e27 Author: Herbert Xu Date: Thu Dec 7 18:36:57 2023 +0800 crypto: api - Disallow identical driver names Disallow registration of two algorithms with identical driver names. Cc: Reported-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 979f6ded93ac5ca0fec2b4c5b7b668c8a2a65e1b Author: Tom Zanussi Date: Tue Dec 5 15:25:30 2023 -0600 dmaengine: idxd: Add support for device/wq defaults Add a load_device_defaults() function pointer to struct idxd_driver_data, which if defined, will be called when an idxd device is probed and will allow the idxd device to be configured with default values. The load_device_defaults() function is passed an idxd device to work with to set specific device attributes. Also add a load_device_defaults() implementation IAA devices; future patches would add default functions for other device types such as DSA. The way idxd device probing works, if the device configuration is valid at that point e.g. at least one workqueue and engine is properly configured then the device will be enabled and ready to go. The IAA implementation, idxd_load_iaa_device_defaults(), configures a single workqueue (wq0) for each device with the following default values: mode "dedicated" threshold 0 size Total WQ Size from WQCAP priority 10 type IDXD_WQT_KERNEL group 0 name "iaa_crypto" driver_name "crypto" Note that this now adds another configuration step for any users that want to configure their own devices/workqueus with something different in that they'll first need to disable (in the case of IAA) wq0 and the device itself before they can set their own attributes and re-enable, since they've been already been auto-enabled. Note also that in order for the new configuration to be applied to the deflate-iaa crypto algorithm the iaa_crypto module needs to unregister the old version, which is accomplished by removing the iaa_crypto module, and re-registering it with the new configuration by reinserting the iaa_crypto module. Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Signed-off-by: Herbert Xu commit 93382a91632a5d88bb9bb0ff1fea872fe87f5dc2 Author: Tom Zanussi Date: Tue Dec 5 15:25:29 2023 -0600 crypto: iaa - Add IAA Compression Accelerator stats Add support for optional debugfs statistics support for the IAA Compression Accelerator. This is enabled by the kernel config item: CRYPTO_DEV_IAA_CRYPTO_STATS When enabled, the IAA crypto driver will generate statistics which can be accessed at /sys/kernel/debug/iaa-crypto/. See Documentation/driver-api/crypto/iax/iax-crypto.rst for details. Signed-off-by: Tom Zanussi Signed-off-by: Herbert Xu commit 09646c98d0bfed47930d9eb0d66c323fae70a5e0 Author: Tom Zanussi Date: Tue Dec 5 15:25:28 2023 -0600 crypto: iaa - Add irq support for the crypto async interface The existing iaa crypto async support provides an implementation that satisfies the interface but does so in a synchronous manner - it fills and submits the IDXD descriptor and then waits for it to complete before returning. This isn't a problem at the moment, since all existing callers (e.g. zswap) wrap any asynchronous callees in a synchronous wrapper anyway. This change makes the iaa crypto async implementation truly asynchronous: it fills and submits the IDXD descriptor, then returns immediately with -EINPROGRESS. It also sets the descriptor's 'request completion irq' bit and sets up a callback with the IDXD driver which is called when the operation completes and the irq fires. The existing callers such as zswap use synchronous wrappers to deal with -EINPROGRESS and so work as expected without any changes. This mode can be enabled by writing 'async_irq' to the sync_mode iaa_crypto driver attribute: echo async_irq > /sys/bus/dsa/drivers/crypto/sync_mode Async mode without interrupts (caller must poll) can be enabled by writing 'async' to it: echo async > /sys/bus/dsa/drivers/crypto/sync_mode The default sync mode can be enabled by writing 'sync' to it: echo sync > /sys/bus/dsa/drivers/crypto/sync_mode The sync_mode value setting at the time the IAA algorithms are registered is captured in each algorithm's crypto_ctx and used for all compresses and decompresses when using a given algorithm. Signed-off-by: Tom Zanussi Signed-off-by: Herbert Xu commit 2ec6761df889fdf896fde761abd447596dd8f8c2 Author: Tom Zanussi Date: Tue Dec 5 15:25:27 2023 -0600 crypto: iaa - Add support for deflate-iaa compression algorithm This patch registers the deflate-iaa deflate compression algorithm and hooks it up to the IAA hardware using the 'fixed' compression mode introduced in the previous patch. Because the IAA hardware has a 4k history-window limitation, only buffers <= 4k, or that have been compressed using a <= 4k history window, are technically compliant with the deflate spec, which allows for a window of up to 32k. Because of this limitation, the IAA fixed mode deflate algorithm is given its own algorithm name, 'deflate-iaa'. With this change, the deflate-iaa crypto algorithm is registered and operational, and compression and decompression operations are fully enabled following the successful binding of the first IAA workqueue to the iaa_crypto sub-driver. when there are no IAA workqueues bound to the driver, the IAA crypto algorithm can be unregistered by removing the module. A new iaa_crypto 'verify_compress' driver attribute is also added, allowing the user to toggle compression verification. If set, each compress will be internally decompressed and the contents verified, returning error codes if unsuccessful. This can be toggled with 0/1: echo 0 > /sys/bus/dsa/drivers/crypto/verify_compress The default setting is '1' - verify all compresses. The verify_compress value setting at the time the algorithm is registered is captured in the algorithm's crypto_ctx and used for all compresses when using the algorithm. [ Based on work originally by George Powley, Jing Lin and Kyung Min Park ] Signed-off-by: Tom Zanussi Signed-off-by: Herbert Xu commit b190447e0fa3ef7355480d641d078962e03768b4 Author: Tom Zanussi Date: Tue Dec 5 15:25:26 2023 -0600 crypto: iaa - Add compression mode management along with fixed mode Define an in-kernel API for adding and removing compression modes, which can be used by kernel modules or other kernel code that implements IAA compression modes. Also add a separate file, iaa_crypto_comp_fixed.c, containing huffman tables generated for the IAA 'fixed' compression mode. Future compression modes can be added in a similar fashion. One or more crypto compression algorithms will be created for each compression mode, each of which can be selected as the compression algorithm to be used by a particular facility. Signed-off-by: Tom Zanussi Signed-off-by: Herbert Xu commit f57bf3f78377d66af89a6d0c6d926ffb1f590b5d Author: Tom Zanussi Date: Tue Dec 5 15:25:25 2023 -0600 crypto: iaa - Add per-cpu workqueue table with rebalancing The iaa compression/decompression algorithms in later patches need a way to retrieve an appropriate IAA workqueue depending on how close the associated IAA device is to the current cpu. For this purpose, add a per-cpu array of workqueues such that an appropriate workqueue can be retrieved by simply accessing the per-cpu array. Whenever a new workqueue is bound to or unbound from the iaa_crypto driver, the available workqueues are 'rebalanced' such that work submitted from a particular CPU is given to the most appropriate workqueue available. There currently isn't any way for the user to tweak the way this is done internally - if necessary, knobs can be added later for that purpose. Current best practice is to configure and bind at least one workqueue for each IAA device, but as long as there is at least one workqueue configured and bound to any IAA device in the system, the iaa_crypto driver will work, albeit most likely not as efficiently. [ Based on work originally by George Powley, Jing Lin and Kyung Min Park ] Signed-off-by: Tom Zanussi Signed-off-by: Herbert Xu commit ea7a5cbb43696cfacf73e61916d1860ac30b5b2f Author: Tom Zanussi Date: Tue Dec 5 15:25:24 2023 -0600 crypto: iaa - Add Intel IAA Compression Accelerator crypto driver core The Intel Analytics Accelerator (IAA) is a hardware accelerator that provides very high thoughput compression/decompression compatible with the DEFLATE compression standard described in RFC 1951, which is the compression/decompression algorithm exported by this module. Users can select IAA compress/decompress acceleration by specifying one of the deflate-iaa* algorithms as the compression algorithm to use by whatever facility allows asynchronous compression algorithms to be selected. For example, zswap can select the IAA fixed deflate algorithm 'deflate-iaa' via: # echo deflate-iaa > /sys/module/zswap/parameters/compressor This patch adds iaa_crypto as an idxd sub-driver and tracks iaa devices and workqueues as they are probed or removed. [ Based on work originally by George Powley, Jing Lin and Kyung Min Park ] Signed-off-by: Tom Zanussi Signed-off-by: Herbert Xu commit 8ccc257b29a183c42830aa854ed7b50fa22f8731 Author: Tom Zanussi Date: Tue Dec 5 15:25:23 2023 -0600 crypto: iaa - Add IAA Compression Accelerator Documentation Because the IAA Compression Accelerator requires significant user setup in order to be used properly, this adds documentation on the iaa_crypto driver including setup, usage, and examples. Signed-off-by: Tom Zanussi Signed-off-by: Herbert Xu commit aa8d18becc0c14aa3eb46d6d1b81450446e11b87 Author: Tom Zanussi Date: Tue Dec 5 15:25:22 2023 -0600 dmaengine: idxd: add callback support for iaa crypto Create a lightweight callback interface to allow idxd sub-drivers to be notified when work sent to idxd wqs has completed. For a sub-driver to be notified of work completion, it needs to: - Set the descriptor's 'Request Completion Interrupt' (IDXD_OP_FLAG_RCI) - Set the sub-driver desc_complete() callback when registering the sub-driver e.g.: struct idxd_device_driver my_drv = { .probe = my_probe, .desc_complete = my_complete, } - Set the sub-driver-specific context in the sub-driver's descriptor e.g: idxd_desc->crypto.req = req; idxd_desc->crypto.tfm = tfm; idxd_desc->crypto.src_addr = src_addr; idxd_desc->crypto.dst_addr = dst_addr; When the work completes and the completion irq fires, idxd will invoke the desc_complete() callback with pointers to the descriptor, context, and completion_type. Signed-off-by: Dave Jiang Signed-off-by: Tom Zanussi Reviewed-by: Fenghua Yu Acked-by: Vinod Koul Signed-off-by: Herbert Xu commit 786d0e7f183ac1c1aef1801c2110f7582f0a6a83 Author: Tom Zanussi Date: Tue Dec 5 15:25:21 2023 -0600 dmaengine: idxd: Add wq private data accessors Add the accessors idxd_wq_set_private() and idxd_wq_get_private() allowing users to set and retrieve a private void * associated with an idxd_wq. The private data is stored in the idxd_dev.conf_dev associated with each idxd_wq. Signed-off-by: Tom Zanussi Reviewed-by: Fenghua Yu Acked-by: Vinod Koul Signed-off-by: Herbert Xu commit 86d3a34144fd634861d4401903ac9a21bb87f025 Author: Tom Zanussi Date: Tue Dec 5 15:25:20 2023 -0600 dmaengine: idxd: Export wq resource management functions To allow idxd sub-drivers to access the wq resource management functions, export them. Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Acked-by: Vinod Koul Signed-off-by: Herbert Xu commit 8621f99bde2c3232ec254bae67f91bc6ca7b02b9 Author: Tom Zanussi Date: Tue Dec 5 15:25:19 2023 -0600 dmaengine: idxd: Export descriptor management functions To allow idxd sub-drivers to access the descriptor management functions, export them. Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Acked-by: Vinod Koul Signed-off-by: Herbert Xu commit d7ad915d817c8ce07a6101292497dddbab0429a3 Author: Tom Zanussi Date: Tue Dec 5 15:25:18 2023 -0600 dmaengine: idxd: Rename drv_enable/disable_wq to idxd_drv_enable/disable_wq, and export Rename drv_enable_wq and drv_disable_wq to idxd_drv_enable_wq and idxd_drv_disable_wq respectively, so that they're no longer too generic to be exported. This also matches existing naming within the idxd driver. And to allow idxd sub-drivers to enable and disable wqs, export them. Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Acked-by: Vinod Koul Signed-off-by: Herbert Xu commit 15a611015224c6698801ab9a2c2321742c39174e Author: Dave Jiang Date: Tue Dec 5 15:25:17 2023 -0600 dmaengine: idxd: add external module driver support for dsa_bus_type Add support to allow an external driver to be registered to the dsa_bus_type and also auto-loaded. Signed-off-by: Dave Jiang Signed-off-by: Tom Zanussi Reviewed-by: Fenghua Yu Acked-by: Vinod Koul Signed-off-by: Herbert Xu commit 8517c34e87025b3f74f3c07813d493828f369598 Author: Jia Jie Ho Date: Mon Dec 4 11:04:13 2023 +0800 crypto: starfive - Fix dev_err_probe return error Current dev_err_probe will return 0 instead of proper error code if driver failed to get irq number. Fix the return code. Signed-off-by: Jia Jie Ho Signed-off-by: Herbert Xu commit 555e387047761eb909a0a1a8230efad3fa3e82ca Author: Jia Jie Ho Date: Mon Dec 4 11:02:39 2023 +0800 crypto: starfive - Remove unneeded NULL checks NULL check before kfree_sensitive function is not needed. Signed-off-by: Jia Jie Ho Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311301702.LxswfETY-lkp@intel.com/ Signed-off-by: Herbert Xu commit 4c660ffef34b7d645ae3144369bc50257f295212 Author: Rafael J. Wysocki Date: Fri Dec 8 21:07:41 2023 +0100 ACPI: utils: Fix white space in struct acpi_handle_list definition Fix inadvertently introduced white space damage in the struct acpi_handle_list definition. No functional impact. Fixes: 2e57d10a6591 ("ACPI: utils: Dynamically determine acpi_handle_list size") Signed-off-by: Rafael J. Wysocki commit 1feb042d4e9b30b3ec3363e557d2ba884485f835 Author: Rafael J. Wysocki Date: Fri Dec 8 21:06:45 2023 +0100 ACPI: utils: Refine acpi_handle_list_equal() slightly It is somewhat better to use the size of the first array element for computing the size of the entire array than to rely on the array element data type definition knowledge and the former is also consistent with the array allocation in acpi_evaluate_reference(), so modify the code accordingly. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 6909e0f322b0527fee9fdc54685e6cad69008713 Author: Rafael J. Wysocki Date: Fri Dec 8 21:06:04 2023 +0100 ACPI: utils: Return bool from acpi_evaluate_reference() There are only 4 users of acpi_evaluate_reference() and none of them actually cares about the reason why it fails. All of them are only interested in whether or not it is successful, so it can return a bool value indicating that. Modify acpi_evaluate_reference() as per the observation above and update its callers accordingly so as to get rid of useless code and local variables. The observable behavior of the kernel is not expected to change after this modification of the code. Signed-off-by: Rafael J. Wysocki commit 87824da27b0aee399600d313667c1d812c2749d8 Author: Rafael J. Wysocki Date: Fri Dec 8 21:05:19 2023 +0100 ACPI: utils: Rearrange in acpi_evaluate_reference() The code in acpi_evaluate_reference() can be improved in some ways without changing its observable behavior. Among other things: * None of the local variables in that function except for buffer needs to be initialized. * The element local variable is only used in the for () loop block, so it can be defined there. * Multiple checks can be combined. * Code duplication related to error handling can be eliminated. * Redundant inner parens can be dropped. Modify the function as per the above. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit d6beb085e8ff3d9547df8a5a55f15ccc7552c5d0 Merge: f3c2caacee824 cbe0e41508963 Author: David S. Miller Date: Fri Dec 15 09:35:50 2023 +0000 Merge branch 'net-phy-rust' FUJITA Tomonori says: ==================== Rust abstractions for network PHY drivers No functional change since v10; only comment and commit log updates. This patchset adds Rust abstractions for phylib. It doesn't fully cover the C APIs yet but I think that it's already useful. I implement two PHY drivers (Asix AX88772A PHYs and Realtek Generic FE-GE). Seems they work well with real hardware. The first patch introduces Rust bindings for phylib. The second patch adds a macro to declare a kernel module for PHYs drivers. The third adds the Rust ETHERNET PHY LIBRARY entry to MAINTAINERS file; adds the binding file and me as a maintainer (as Andrew Lunn suggested) with Trevor Gross as a reviewer. The last patch introduces the Rust version of Asix PHY driver, drivers/net/phy/ax88796b.c. The features are equivalent to the C version. You can choose C (by default) or Rust version on kernel configuration. v11: - adds Andrew, Alice, and Trevor's Reviewed-by - comment update v10: https://lore.kernel.org/netdev/20231210234924.1453917-1-fujita.tomonori@gmail.com/T/ - adds Trevor's SoB to the third patch - adds Benno's Reviewed-by to the second patch v9: https://lore.kernel.org/netdev/20231205.124531.842372711631366729.fujita.tomonori@gmail.com/T/ - adds a workaround to access to a bit field in phy_device - fixes a comment typo v8: https://lore.kernel.org/netdev/20231123050412.1012252-1-fujita.tomonori@gmail.com/ - updates the safety comments on Device and its related code - uses _phy_start_aneg instead of phy_start_aneg - drops the patch for enum synchronization - moves Sync From Registration to DriverVTable - fixes doctest errors - minor cleanups v7: https://lore.kernel.org/netdev/20231026001050.1720612-1-fujita.tomonori@gmail.com/T/ - renames get_link() to is_link_up() - improves the macro format - improves the commit log in the third patch - improves comments v6: https://lore.kernel.org/netdev/20231025.090243.1437967503809186729.fujita.tomonori@gmail.com/T/ - improves comments - makes the requirement of phy_drivers_register clear - fixes Makefile of the third patch v5: https://lore.kernel.org/all/20231019.094147.1808345526469629486.fujita.tomonori@gmail.com/T/ - drops the rustified-enum option, writes match by hand; no *risk* of UB - adds Miguel's patch for enum checking - moves CONFIG_RUST_PHYLIB_ABSTRACTIONS to drivers/net/phy/Kconfig - adds a new entry for this abstractions in MAINTAINERS - changes some of Device's methods to take &mut self - comment improvment v4: https://lore.kernel.org/netdev/20231012125349.2702474-1-fujita.tomonori@gmail.com/T/ - split the core patch - making Device::from_raw() private - comment improvement with code update - commit message improvement - avoiding using bindings::phy_driver in public functions - using an anonymous constant in module_phy_driver macro v3: https://lore.kernel.org/netdev/20231011.231607.1747074555988728415.fujita.tomonori@gmail.com/T/ - changes the base tree to net-next from rust-next - makes this feature optional; only enabled with CONFIG_RUST_PHYLIB_BINDINGS=y - cosmetic code and comment improvement - adds copyright v2: https://lore.kernel.org/netdev/20231006094911.3305152-2-fujita.tomonori@gmail.com/T/ - build failure fix - function renaming v1: https://lore.kernel.org/netdev/20231002085302.2274260-3-fujita.tomonori@gmail.com/T/ ==================== Signed-off-by: David S. Miller commit cbe0e415089636170aa6eb540ca4af5dc9842a60 Author: FUJITA Tomonori Date: Wed Dec 13 09:42:11 2023 +0900 net: phy: add Rust Asix PHY driver This is the Rust implementation of drivers/net/phy/ax88796b.c. The features are equivalent. You can choose C or Rust version kernel configuration. Signed-off-by: FUJITA Tomonori Reviewed-by: Trevor Gross Reviewed-by: Benno Lossin Reviewed-by: Andrew Lunn Reviewed-by: Alice Ryhl Signed-off-by: David S. Miller commit cbaa28f970a1d01528ed7c3a376a54fc68c24056 Author: FUJITA Tomonori Date: Wed Dec 13 09:42:10 2023 +0900 MAINTAINERS: add Rust PHY abstractions for ETHERNET PHY LIBRARY Adds me as a maintainer and Trevor as a reviewer. The files are placed at rust/kernel/ directory for now but the files are likely to be moved to net/ directory once a new Rust build system is implemented. Signed-off-by: FUJITA Tomonori Signed-off-by: Trevor Gross Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 2fe11d5ab35daee5e8f5ecf49767ddd3204fdfa9 Author: FUJITA Tomonori Date: Wed Dec 13 09:42:09 2023 +0900 rust: net::phy add module_phy_driver macro This macro creates an array of kernel's `struct phy_driver` and registers it. This also corresponds to the kernel's `MODULE_DEVICE_TABLE` macro, which embeds the information for module loading into the module binary file. A PHY driver should use this macro. Signed-off-by: FUJITA Tomonori Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Reviewed-by: Andrew Lunn Reviewed-by: Trevor Gross Signed-off-by: David S. Miller commit f20fd5449ada3872dcd67aca397f0e27ca2e8ad6 Author: FUJITA Tomonori Date: Wed Dec 13 09:42:08 2023 +0900 rust: core abstractions for network PHY drivers This patch adds abstractions to implement network PHY drivers; the driver registration and bindings for some of callback functions in struct phy_driver and many genphy_ functions. This feature is enabled with CONFIG_RUST_PHYLIB_ABSTRACTIONS=y. This patch enables unstable const_maybe_uninit_zeroed feature for kernel crate to enable unsafe code to handle a constant value with uninitialized data. With the feature, the abstractions can initialize a phy_driver structure with zero easily; instead of initializing all the members by hand. It's supposed to be stable in the not so distant future. Link: https://github.com/rust-lang/rust/pull/116218 Signed-off-by: FUJITA Tomonori Reviewed-by: Andrew Lunn Reviewed-by: Alice Ryhl Signed-off-by: David S. Miller commit 31accc37eaee98a90b25809ed58c6ee4956ab642 Author: Zhao Liu Date: Sun Dec 3 21:29:47 2023 +0800 drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the calls from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the preemption is disabled for !PREEMPT_RT case, otherwise it only disables migration). With kmap_local_page(), we can avoid the often unwanted side effect of unnecessary page faults and preemption disables. In i915_gem_execbuffer.c, eb->reloc_cache.vaddr is mapped by kmap_atomic() in eb_relocate_entry(), and is unmapped by kunmap_atomic() in reloc_cache_reset(). And this mapping/unmapping occurs in two places: one is in eb_relocate_vma(), and another is in eb_relocate_vma_slow(). The function eb_relocate_vma() or eb_relocate_vma_slow() doesn't need to disable pagefaults and preemption during the above mapping/ unmapping. So it can simply use kmap_local_page() / kunmap_local() that can instead do the mapping / unmapping regardless of the context. Convert the calls of kmap_atomic() / kunmap_atomic() to kmap_local_page() / kunmap_local(). [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Ira Weiny Reviewed-by: Fabio M. De Francesco Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231203132947.2328805-10-zhao1.liu@linux.intel.com commit e4865c60dd6e312e58c85247e48899af7e19041a Author: Zhao Liu Date: Sun Dec 3 21:29:46 2023 +0800 drm/i915: Use kmap_local_page() in i915_cmd_parser.c The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the preemption is disabled for !PREEMPT_RT case, otherwise it only disables migration). With kmap_local_page(), we can avoid the often unwanted side effect of unnecessary page faults and preemption disables. There're 2 reasons why function copy_batch() doesn't need to disable pagefaults and preemption for mapping: 1. The flush operation is safe. In i915_cmd_parser.c, copy_batch() calls drm_clflush_virt_range() to use CLFLUSHOPT or WBINVD to flush. Since CLFLUSHOPT is global on x86 and WBINVD is called on each cpu in drm_clflush_virt_range(), the flush operation is global. 2. Any context switch caused by preemption or page faults (page fault may cause sleep) doesn't affect the validity of local mapping. Therefore, copy_batch() is a function where the use of kmap_local_page() in place of kmap_atomic() is correctly suited. Convert the calls of kmap_atomic() / kunmap_atomic() to kmap_local_page() / kunmap_local(). [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com Suggested-by: Dave Hansen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Ira Weiny Reviewed-by: Fabio M. De Francesco Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231203132947.2328805-9-zhao1.liu@linux.intel.com commit 55a6e46180cb8b36fb1076501b569bfd42df1644 Author: Zhao Liu Date: Sun Dec 3 21:29:45 2023 +0800 drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the preemption is disabled for !PREEMPT_RT case, otherwise it only disables migration). With kmap_local_page(), we can avoid the often unwanted side effect of unnecessary page faults or preemption disables. In drm/i915/gt/uc/intel_us_fw.c, the function intel_uc_fw_copy_rsa() just use the mapping to do memory copy so it doesn't need to disable pagefaults and preemption for mapping. Thus the local mapping without atomic context (not disable pagefaults / preemption) is enough. Therefore, intel_uc_fw_copy_rsa() is a function where the use of memcpy_from_page() with kmap_local_page() in place of memcpy() with kmap_atomic() is correctly suited. Convert the calls of memcpy() with kmap_atomic() / kunmap_atomic() to memcpy_from_page() which uses local mapping to copy. [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com/T/#u Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Ira Weiny Reviewed-by: Fabio M. De Francesco Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231203132947.2328805-8-zhao1.liu@linux.intel.com commit b1c51b0e2e7cb98f643a801c50f8ad76ebc36450 Author: Zhao Liu Date: Sun Dec 3 21:29:44 2023 +0800 drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption. With kmap_local_page(), we can avoid the often unwanted side effect of unnecessary page faults or preemption disables. In drm/i915/gem/selftests/i915_gem_context.c, functions cpu_fill() and cpu_check() mainly uses mapping to flush cache and check/assign the value. There're 2 reasons why cpu_fill() and cpu_check() don't need to disable pagefaults and preemption for mapping: 1. The flush operation is safe. cpu_fill() and cpu_check() call drm_clflush_virt_range() to use CLFLUSHOPT or WBINVD to flush. Since CLFLUSHOPT is global on x86 and WBINVD is called on each cpu in drm_clflush_virt_range(), the flush operation is global. 2. Any context switch caused by preemption or page faults (page fault may cause sleep) doesn't affect the validity of local mapping. Therefore, cpu_fill() and cpu_check() are functions where the use of kmap_local_page() in place of kmap_atomic() is correctly suited. Convert the calls of kmap_atomic() / kunmap_atomic() to kmap_local_page() / kunmap_local(). [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com Suggested-by: Dave Hansen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Ira Weiny Reviewed-by: Fabio M. De Francesco Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231203132947.2328805-7-zhao1.liu@linux.intel.com commit 40b399000665ee154927a8e0d7b0c7e7505bbaef Author: Zhao Liu Date: Sun Dec 3 21:29:43 2023 +0800 drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the preemption is disabled for !PREEMPT_RT case, otherwise it only disables migration).. With kmap_local_page(), we can avoid the often unwanted side effect of unnecessary page faults or preemption disables. In drm/i915/gem/selftests/i915_gem_coherency.c, functions cpu_set() and cpu_get() mainly uses mapping to flush cache and assign the value. There're 2 reasons why cpu_set() and cpu_get() don't need to disable pagefaults and preemption for mapping: 1. The flush operation is safe. cpu_set() and cpu_get() call drm_clflush_virt_range() to use CLFLUSHOPT or WBINVD to flush. Since CLFLUSHOPT is global on x86 and WBINVD is called on each cpu in drm_clflush_virt_range(), the flush operation is global. 2. Any context switch caused by preemption or page faults (page fault may cause sleep) doesn't affect the validity of local mapping. Therefore, cpu_set() and cpu_get() are functions where the use of kmap_local_page() in place of kmap_atomic() is correctly suited. Convert the calls of kmap_atomic() / kunmap_atomic() to kmap_local_page() / kunmap_local(). [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com Suggested-by: Dave Hansen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Ira Weiny Reviewed-by: Fabio M. De Francesco Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231203132947.2328805-6-zhao1.liu@linux.intel.com commit 1fcb967595a5156da2f081a5ade319c60fc5af72 Author: Zhao Liu Date: Sun Dec 3 21:29:42 2023 +0800 drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the preemption is disabled for !PREEMPT_RT case, otherwise it only disables migration). With kmap_local_page(), we can avoid the often unwanted side effect of unnecessary page faults or preemption disables. In drm/i915/gem/selftests/huge_pages.c, function __cpu_check_shmem() mainly uses mapping to flush cache and check the value. There're 2 reasons why __cpu_check_shmem() doesn't need to disable pagefaults and preemption for mapping: 1. The flush operation is safe. Function __cpu_check_shmem() calls drm_clflush_virt_range() to use CLFLUSHOPT or WBINVD to flush. Since CLFLUSHOPT is global on x86 and WBINVD is called on each cpu in drm_clflush_virt_range(), the flush operation is global. 2. Any context switch caused by preemption or page faults (page fault may cause sleep) doesn't affect the validity of local mapping. Therefore, __cpu_check_shmem() is a function where the use of kmap_local_page() in place of kmap_atomic() is correctly suited. Convert the calls of kmap_atomic() / kunmap_atomic() to kmap_local_page() / kunmap_local(). [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com Suggested-by: Dave Hansen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Ira Weiny Reviewed-by: Fabio M. De Francesco Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231203132947.2328805-5-zhao1.liu@linux.intel.com commit 756eed0f2602f73df8d6c5bc8418ecd11cce9803 Author: Zhao Liu Date: Sun Dec 3 21:29:41 2023 +0800 drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1]. The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the preemption is disabled for !PREEMPT_RT case, otherwise it only disables migration). With kmap_local_page(), we can avoid the often unwanted side effect of unnecessary page faults or preemption disables. In drm/i915/gem/i915_gem_shmem.c, the function shmem_pwrite() need to disable pagefault to eliminate the potential recursion fault[2]. But here __copy_from_user_inatomic() doesn't need to disable preemption and local mapping is valid for sched in/out. So it can use kmap_local_page() / kunmap_local() with pagefault_disable() / pagefault_enable() to replace atomic mapping. [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com [2]: https://patchwork.freedesktop.org/patch/295840/ Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Ira Weiny Reviewed-by: Fabio M. De Francesco Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231203132947.2328805-4-zhao1.liu@linux.intel.com commit f4d88908cd9a430a7473eea6ff2300a3b728e11c Author: Zhao Liu Date: Sun Dec 3 21:29:40 2023 +0800 drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() + memcpy() to memcpy_[from/to]_page(), which use kmap_local_page() to build local mapping and then do memcpy(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the preemption is disabled for !PREEMPT_RT case, otherwise it only disables migration). With kmap_local_page(), we can avoid the often unwanted side effect of unnecessary page faults and preemption disables. In drm/i915/gem/i915_gem_phys.c, the functions i915_gem_object_get_pages_phys() and i915_gem_object_put_pages_phys() don't need to disable pagefaults and preemption for mapping because of 2 reasons: 1. The flush operation is safe. In drm/i915/gem/i915_gem_object.c, i915_gem_object_get_pages_phys() and i915_gem_object_put_pages_phys() calls drm_clflush_virt_range() to use CLFLUSHOPT or WBINVD to flush. Since CLFLUSHOPT is global on x86 and WBINVD is called on each cpu in drm_clflush_virt_range(), the flush operation is global. 2. Any context switch caused by preemption or page faults (page fault may cause sleep) doesn't affect the validity of local mapping. Therefore, i915_gem_object_get_pages_phys() and i915_gem_object_put_pages_phys() are two functions where the uses of local mappings in place of atomic mappings are correctly suited. Convert the calls of kmap_atomic() / kunmap_atomic() + memcpy() to memcpy_from_page() and memcpy_to_page(). [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com Suggested-by: Dave Hansen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Ira Weiny Reviewed-by: Fabio M. De Francesco Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231203132947.2328805-3-zhao1.liu@linux.intel.com commit e6174e8e19e8fd26016c941c7271868326cd861a Author: Zhao Liu Date: Sun Dec 3 21:29:39 2023 +0800 drm/i915: Use kmap_local_page() in gem/i915_gem_object.c The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the preemption is disabled for !PREEMPT_RT case, otherwise it only disables migration). With kmap_local_page(), we can avoid the often unwanted side effect of unnecessary page faults and preemption disables. There're 2 reasons why i915_gem_object_read_from_page_kmap() doesn't need to disable pagefaults and preemption for mapping: 1. The flush operation is safe. In drm/i915/gem/i915_gem_object.c, i915_gem_object_read_from_page_kmap() calls drm_clflush_virt_range() to use CLFLUSHOPT or WBINVD to flush. Since CLFLUSHOPT is global on x86 and WBINVD is called on each cpu in drm_clflush_virt_range(), the flush operation is global. 2. Any context switch caused by preemption or page faults (page fault may cause sleep) doesn't affect the validity of local mapping. Therefore, i915_gem_object_read_from_page_kmap() is a function where the use of kmap_local_page() in place of kmap_atomic() is correctly suited. Convert the calls of kmap_atomic() / kunmap_atomic() to kmap_local_page() / kunmap_local(). And remove the redundant variable that stores the address of the mapped page since kunmap_local() can accept any pointer within the page. [1]: https://lore.kernel.org/all/20220813220034.806698-1-ira.weiny@intel.com Suggested-by: Dave Hansen Suggested-by: Ira Weiny Suggested-by: Fabio M. De Francesco Signed-off-by: Zhao Liu Reviewed-by: Ira Weiny Reviewed-by: Fabio M. De Francesco Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231203132947.2328805-2-zhao1.liu@linux.intel.com commit f3c2caacee824ce4a331cdafb0b8dc8e987f105e Author: Andrew Halaney Date: Tue Dec 12 16:07:36 2023 -0600 net: stmmac: don't create a MDIO bus if unnecessary Currently a MDIO bus is created if the devicetree description is either: 1. Not fixed-link 2. fixed-link but contains a MDIO bus as well The "1" case above isn't always accurate. If there's a phy-handle, it could be referencing a phy on another MDIO controller's bus[1]. In this case, where the MDIO bus is not described at all, currently stmmac will make a MDIO bus and scan its address space to discover phys (of which there are none). This process takes time scanning a bus that is known to be empty, delaying time to complete probe. There are also a lot of upstream devicetrees[2] that expect a MDIO bus to be created, scanned for phys, and the first one found connected to the MAC. This case can be inferred from the platform description by not having a phy-handle && not being fixed-link. This hits case "1" in the current driver's logic, and must be handled in any logic change here since it is a valid legacy dt-binding. Let's improve the logic to create a MDIO bus if either: - Devicetree contains a MDIO bus - !fixed-link && !phy-handle (legacy handling) This way the case where no MDIO bus should be made is handled, as well as retaining backwards compatibility with the valid cases. Below devicetree snippets can be found that explain some of the cases above more concretely. Here's[0] a devicetree example where the MAC is both fixed-link and driving a switch on MDIO (case "2" above). This needs a MDIO bus to be created: &fec1 { phy-mode = "rmii"; fixed-link { speed = <100>; full-duplex; }; mdio1: mdio { switch0: switch0@0 { compatible = "marvell,mv88e6190"; pinctrl-0 = <&pinctrl_gpio_switch0>; }; }; }; Here's[1] an example where there is no MDIO bus or fixed-link for the ethernet1 MAC, so no MDIO bus should be created since ethernet0 is the MDIO master for ethernet1's phy: ðernet0 { phy-mode = "sgmii"; phy-handle = <&sgmii_phy0>; mdio { compatible = "snps,dwmac-mdio"; sgmii_phy0: phy@8 { compatible = "ethernet-phy-id0141.0dd4"; reg = <0x8>; device_type = "ethernet-phy"; }; sgmii_phy1: phy@a { compatible = "ethernet-phy-id0141.0dd4"; reg = <0xa>; device_type = "ethernet-phy"; }; }; }; ðernet1 { phy-mode = "sgmii"; phy-handle = <&sgmii_phy1>; }; Finally there's descriptions like this[2] which don't describe the MDIO bus but expect it to be created and the whole address space scanned for a phy since there's no phy-handle or fixed-link described: &gmac { phy-supply = <&vcc_lan>; phy-mode = "rmii"; snps,reset-gpio = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>; snps,reset-active-low; snps,reset-delays-us = <0 10000 1000000>; }; [0] https://elixir.bootlin.com/linux/v6.5-rc5/source/arch/arm/boot/dts/nxp/vf/vf610-zii-ssmb-dtu.dts [1] https://elixir.bootlin.com/linux/v6.6-rc5/source/arch/arm64/boot/dts/qcom/sa8775p-ride.dts [2] https://elixir.bootlin.com/linux/v6.6-rc5/source/arch/arm64/boot/dts/rockchip/rk3368-r88.dts#L164 Reviewed-by: Serge Semin Co-developed-by: Bartosz Golaszewski Signed-off-by: Bartosz Golaszewski Signed-off-by: Andrew Halaney Signed-off-by: David S. Miller commit 309ab14f70d137f708ca52e275dc9fd20d3e9147 Author: Manivannan Sadhasivam Date: Mon Nov 27 16:52:07 2023 +0530 bus: mhi: ep: Add checks for read/write callbacks while registering controllers The MHI EP controller drivers has to support both sync and async read/write callbacks. Hence, add a check for it. Signed-off-by: Manivannan Sadhasivam commit 2547beb00ddb40e55b773970622421d978f71473 Author: Manivannan Sadhasivam Date: Mon Aug 21 16:53:24 2023 +0530 bus: mhi: ep: Add support for async DMA read operation As like the async DMA write operation, let's add support for async DMA read operation. In the async path, the data will be read from the transfer ring continuously and when the controller driver notifies the stack using the completion callback (mhi_ep_read_completion), then the client driver will be notified with the read data and the completion event will be sent to the host for the respective ring element (if requested by the host). Signed-off-by: Manivannan Sadhasivam commit ee08acb58fe47fc3bc2c137965985cdb1df40b35 Author: Manivannan Sadhasivam Date: Thu Nov 2 20:33:18 2023 +0530 bus: mhi: ep: Add support for async DMA write operation In order to optimize the data transfer, let's use the async DMA operation for writing (queuing) data to the host. In the async path, the completion event for the transfer ring will only be sent to the host when the controller driver notifies the MHI stack of the actual transfer completion using the callback (mhi_ep_skb_completion) supplied in "struct mhi_ep_buf_info". Also to accommodate the async operation, the transfer ring read offset (ring->rd_offset) is cached in the "struct mhi_ep_chan" and updated locally to let the stack queue further ring items to the controller driver. But the actual read offset of the transfer ring will only be updated in the completion callback. Signed-off-by: Manivannan Sadhasivam commit af140f806ae2679f9dba48ea0f5811da83854eb6 Author: Gou Hao Date: Thu Dec 14 23:14:58 2023 +0800 md/raid1: remove unnecessary null checking If %__GFP_DIRECT_RECLAIM is set then bio_alloc_bioset will always be able to allocate a bio. See comment of bio_alloc_bioset. Signed-off-by: Gou Hao Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231214151458.28970-1-gouhao@uniontech.com commit 0cbbbe09d49b959d0225f7f2223a8ae3b2c1964c Author: Wolfram Sang Date: Sun Nov 12 19:51:51 2023 -0500 gnss: ubx: add support for the reset gpio The Renesas KingFisher board includes a U-Blox Neo-M8 chip. This chip has a reset pin which is also wired on the board. When Linux starts, reset is asserted by the firmware. Deassert the reset pin when probing this driver. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven [ johan: rename gpio descriptor variable ] Signed-off-by: Johan Hovold commit 2de1bb183a6999521a114d3ed0b17d15b8e75e04 Author: Hugues Fruchet Date: Mon Nov 27 18:08:18 2023 +0100 ARM: dts: stm32: add dcmipp support to stm32mp135 Add dcmipp support to STM32MP135. Signed-off-by: Hugues Fruchet Signed-off-by: Alain Volmat Reviewed-by: Laurent Pinchart Signed-off-by: Alexandre Torgue commit aba9f8b07ddb179204378f30798bf577043722c0 Author: Wolfram Sang Date: Sun Nov 12 19:51:50 2023 -0500 dt-bindings: gnss: u-blox: add "reset-gpios" binding The Renesas KingFisher board includes a U-Blox Neo-M8 chip. This chip has a reset pin which is also wired on the board. Introduce a binding to support this reset pin. Signed-off-by: Wolfram Sang Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Signed-off-by: Johan Hovold commit ac142f2b1673bb305cf7a6c042363fb8ede7dbe8 Author: Wolfram Sang Date: Sun Nov 12 19:51:49 2023 -0500 gnss: ubx: use new helper to remove open coded regulator handling v_bckp shall always be enabled as long as the device exists. We now have a regulator helper for that, use it. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Signed-off-by: Johan Hovold commit 9991a82a38174672273df44a3cc6c87ef74b18e9 Author: Harshit Mogalapalli Date: Wed Dec 13 03:14:50 2023 -0800 iommu/sva: Fix memory leak in iommu_sva_bind_device() Free the handle when the domain allocation fails before unlocking and returning. Fixes: 092edaddb660 ("iommu: Support mm PASID 1:n with sva domains") Signed-off-by: Harshit Mogalapalli Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20231213111450.2487861-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Joerg Roedel commit f8aa519976b38e67aae02d2db3e2998513305e80 Author: Andy Yan Date: Tue Dec 12 08:57:10 2023 +0800 dt-bindings: iommu: rockchip: Add Rockchip RK3588 Add a Rockchip RK3588 compatible I split it from the vop2 patch series as suggested by Heiko[0] Signed-off-by: Andy Yan Reviewed-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski [0]https://patchwork.kernel.org/project/dri-devel/patch/20231207080235.652719-1-andyshrk@163.com/ Link: https://lore.kernel.org/r/20231212005710.1837066-1-andyshrk@163.com Signed-off-by: Joerg Roedel commit a63c357b9fd56ad5fe64616f5b22835252c6a76a Author: Isaac J. Manjarres Date: Fri Dec 8 15:41:40 2023 -0800 iommu/dma: Trace bounce buffer usage when mapping buffers When commit 82612d66d51d ("iommu: Allow the dma-iommu api to use bounce buffers") was introduced, it did not add the logic for tracing the bounce buffer usage from iommu_dma_map_page(). All of the users of swiotlb_tbl_map_single() trace their bounce buffer usage, except iommu_dma_map_page(). This makes it difficult to track SWIOTLB usage from that function. Thus, trace bounce buffer usage from iommu_dma_map_page(). Fixes: 82612d66d51d ("iommu: Allow the dma-iommu api to use bounce buffers") Cc: stable@vger.kernel.org # v5.15+ Cc: Tom Murphy Cc: Lu Baolu Cc: Saravana Kannan Signed-off-by: Isaac J. Manjarres Link: https://lore.kernel.org/r/20231208234141.2356157-1-isaacmanjarres@google.com Signed-off-by: Joerg Roedel commit 59a9ccf19ee03179faf047822bbec76cac7467a4 Author: Gustavo A. R. Silva Date: Wed Mar 29 19:54:02 2023 -0600 platform/chrome: cros_ec_vbc: Fix -Warray-bounds warnings GCC-13 (and Clang) does not like having a partially allocated object, since it cannot reason about it for bounds checking. Notice that the compiler is legitimately complaining about accessing an object (params, in this case) for which not enough memory was allocated. The object is of size 20 bytes: struct ec_params_vbnvcontext { uint32_t op; /* 0 4 */ uint8_t block[16]; /* 4 16 */ /* size: 20, cachelines: 1, members: 2 */ /* last cacheline: 20 bytes */ }; but only 16 bytes are allocated: sizeof(struct ec_response_vbnvcontext) == 16 In this case, as only enough space for the op field is allocated, we can use an object of type uint32_t instead of a whole struct ec_params_vbnvcontext (for which not enough memory is allocated). Fix the following warning seen under GCC 13: drivers/platform/chrome/cros_ec_vbc.c: In function ‘vboot_context_read’: drivers/platform/chrome/cros_ec_vbc.c:36:15: warning: array subscript ‘struct ec_params_vbnvcontext[1]’ is partly outside array bounds of ‘unsigned char[36]’ [-Warray-bounds=] 36 | params->op = EC_VBNV_CONTEXT_OP_READ; | ^~ In file included from drivers/platform/chrome/cros_ec_vbc.c:12: In function ‘kmalloc’, inlined from ‘vboot_context_read’ at drivers/platform/chrome/cros_ec_vbc.c:30:8: ./include/linux/slab.h:580:24: note: at offset 20 into object of size 36 allocated by ‘kmalloc_trace’ 580 | return kmalloc_trace( | ^~~~~~~~~~~~~~ 581 | kmalloc_caches[kmalloc_type(flags)][index], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 582 | flags, size); | ~~~~~~~~~~~~ Link: https://github.com/KSPP/linux/issues/278 Signed-off-by: "Gustavo A. R. Silva" Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/ZCTrutoN+9TiJM8u@work Signed-off-by: Tzung-Bi Shih commit 937d02cc79c6828fef28a4d80d8d0ad2f7bf2b62 Author: Imre Deak Date: Thu Dec 14 00:05:26 2023 +0200 drm/i915/mtl: Fix HDMI/DP PLL clock selection Select the HDMI specific PLL clock only for HDMI outputs. Fixes: 62618c7f117e ("drm/i915/mtl: C20 PLL programming") Cc: Mika Kahola Cc: Radhakrishna Sripada Reviewed-by: Radhakrishna Sripada Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231213220526.1828827-1-imre.deak@intel.com commit c18852cf16dc0ee98d661f48edfa815ee240ee57 Author: Ghanshyam Agrawal Date: Fri Dec 15 08:41:44 2023 +0530 ALSA: au88x0: fixed spelling mistakes in au88x0_core.c Multiple spelling mistakes were reported by codespell. They were fixed. Signed-off-by: Ghanshyam Agrawal Link: https://lore.kernel.org/r/20231215031144.521359-1-ghanshyam1898@gmail.com Signed-off-by: Takashi Iwai commit c67f8a13be4e9ffc862c7f60ec97a799a1547486 Author: Biju Das Date: Thu Dec 14 22:05:20 2023 -0800 Input: da9063 - use dev_err_probe() Replace dev_err()->dev_err_probe() to simplify probe(). Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20231213214803.9931-4-biju.das.jz@bp.renesas.com Signed-off-by: Dmitry Torokhov commit bd2334eda183a2888b5541605b39617c1e6b4b71 Author: Biju Das Date: Wed Dec 13 23:48:38 2023 -0800 Input: da9063 - drop redundant prints in probe() The memory allocation core code already prints error message in case of OOM. So, drop additional print messages for OOM cases. While at it, input_register_device() is already printing error messages on failure. Drop the redundant print. Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20231213214803.9931-3-biju.das.jz@bp.renesas.com Signed-off-by: Dmitry Torokhov commit 9594f273fafe76663e502337eaf393dc4f7bf8fa Author: Biju Das Date: Wed Dec 13 21:37:15 2023 -0800 Input: da9063 - simplify obtaining OF match data Simplify probe() by replacing of_match_node() for retrieving match data by device_get_match_data(). Some minor cleanups: * Remove the trailing comma in the terminator entry for the OF table making code robust against (theoretical) misrebases or other similar things where the new entry goes _after_ the termination without the compiler noticing. * Move OF table near to the user. * Arrange variables in reverse xmas tree order in probe(). Signed-off-by: Biju Das Link: https://lore.kernel.org/r/20231213214803.9931-2-biju.das.jz@bp.renesas.com Signed-off-by: Dmitry Torokhov commit 0573676fdde7ce3829ee6a42a8e5a56355234712 Author: Dave Chinner Date: Fri Dec 15 08:40:35 2023 +1100 xfs: initialise di_crc in xfs_log_dinode Alexander Potapenko report that KMSAN was issuing these warnings: kmalloc-ed xlog buffer of size 512 : ffff88802fc26200 kmalloc-ed xlog buffer of size 368 : ffff88802fc24a00 kmalloc-ed xlog buffer of size 648 : ffff88802b631000 kmalloc-ed xlog buffer of size 648 : ffff88802b632800 kmalloc-ed xlog buffer of size 648 : ffff88802b631c00 xlog_write_iovec: copying 12 bytes from ffff888017ddbbd8 to ffff88802c300400 xlog_write_iovec: copying 28 bytes from ffff888017ddbbe4 to ffff88802c30040c xlog_write_iovec: copying 68 bytes from ffff88802fc26274 to ffff88802c300428 xlog_write_iovec: copying 188 bytes from ffff88802fc262bc to ffff88802c30046c ===================================================== BUG: KMSAN: uninit-value in xlog_write_iovec fs/xfs/xfs_log.c:2227 BUG: KMSAN: uninit-value in xlog_write_full fs/xfs/xfs_log.c:2263 BUG: KMSAN: uninit-value in xlog_write+0x1fac/0x2600 fs/xfs/xfs_log.c:2532 xlog_write_iovec fs/xfs/xfs_log.c:2227 xlog_write_full fs/xfs/xfs_log.c:2263 xlog_write+0x1fac/0x2600 fs/xfs/xfs_log.c:2532 xlog_cil_write_chain fs/xfs/xfs_log_cil.c:918 xlog_cil_push_work+0x30f2/0x44e0 fs/xfs/xfs_log_cil.c:1263 process_one_work kernel/workqueue.c:2630 process_scheduled_works+0x1188/0x1e30 kernel/workqueue.c:2703 worker_thread+0xee5/0x14f0 kernel/workqueue.c:2784 kthread+0x391/0x500 kernel/kthread.c:388 ret_from_fork+0x66/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Uninit was created at: slab_post_alloc_hook+0x101/0xac0 mm/slab.h:768 slab_alloc_node mm/slub.c:3482 __kmem_cache_alloc_node+0x612/0xae0 mm/slub.c:3521 __do_kmalloc_node mm/slab_common.c:1006 __kmalloc+0x11a/0x410 mm/slab_common.c:1020 kmalloc ./include/linux/slab.h:604 xlog_kvmalloc fs/xfs/xfs_log_priv.h:704 xlog_cil_alloc_shadow_bufs fs/xfs/xfs_log_cil.c:343 xlog_cil_commit+0x487/0x4dc0 fs/xfs/xfs_log_cil.c:1574 __xfs_trans_commit+0x8df/0x1930 fs/xfs/xfs_trans.c:1017 xfs_trans_commit+0x30/0x40 fs/xfs/xfs_trans.c:1061 xfs_create+0x15af/0x2150 fs/xfs/xfs_inode.c:1076 xfs_generic_create+0x4cd/0x1550 fs/xfs/xfs_iops.c:199 xfs_vn_create+0x4a/0x60 fs/xfs/xfs_iops.c:275 lookup_open fs/namei.c:3477 open_last_lookups fs/namei.c:3546 path_openat+0x29ac/0x6180 fs/namei.c:3776 do_filp_open+0x24d/0x680 fs/namei.c:3809 do_sys_openat2+0x1bc/0x330 fs/open.c:1440 do_sys_open fs/open.c:1455 __do_sys_openat fs/open.c:1471 __se_sys_openat fs/open.c:1466 __x64_sys_openat+0x253/0x330 fs/open.c:1466 do_syscall_x64 arch/x86/entry/common.c:51 do_syscall_64+0x4f/0x140 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b arch/x86/entry/entry_64.S:120 Bytes 112-115 of 188 are uninitialized Memory access of size 188 starts at ffff88802fc262bc This is caused by the struct xfs_log_dinode not having the di_crc field initialised. Log recovery never uses this field (it is only present these days for on-disk format compatibility reasons) and so it's value is never checked so nothing in XFS has caught this. Further, none of the uninitialised memory access warning tools have caught this (despite catching other uninit memory accesses in the struct xfs_log_dinode back in 2017!) until recently. Alexander annotated the XFS code to get the dump of the actual bytes that were detected as uninitialised, and from that report it took me about 30s to realise what the issue was. The issue was introduced back in 2016 and every inode that is logged fails to initialise this field. This is no actual bad behaviour caused by this issue - I find it hard to even classify it as a bug... Reported-and-tested-by: Alexander Potapenko Fixes: f8d55aa0523a ("xfs: introduce inode log format object") Signed-off-by: Dave Chinner Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit c0e37f07d2bd3c1ee3fb5a650da7d8673557ed16 Author: Darrick J. Wong Date: Thu Dec 14 13:38:45 2023 -0800 xfs: fix an off-by-one error in xreap_agextent_binval Overall, this function tries to find and invalidate all buffers for a given extent of space on the data device. The inner for loop in this function tries to find all xfs_bufs for a given daddr. The lengths of all possible cached buffers range from 1 fsblock to the largest needed to contain a 64k xattr value (~17fsb). The scan is capped to avoid looking at anything buffer going past the given extent. Unfortunately, the loop continuation test is wrong -- max_fsbs is the largest size we want to scan, not one past that. Put another way, this loop is actually 1-indexed, not 0-indexed. Therefore, the continuation test should use <=, not <. As a result, online repairs of btree blocks fails to stale any buffers for btrees that are being torn down, which causes later assertions in the buffer cache when another thread creates a different-sized buffer. This happens in xfs/709 when allocating an inode cluster buffer: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 3346128 at fs/xfs/xfs_message.c:104 assfail+0x3a/0x40 [xfs] CPU: 0 PID: 3346128 Comm: fsstress Not tainted 6.7.0-rc4-djwx #rc4 RIP: 0010:assfail+0x3a/0x40 [xfs] Call Trace: _xfs_buf_obj_cmp+0x4a/0x50 xfs_buf_get_map+0x191/0xba0 xfs_trans_get_buf_map+0x136/0x280 xfs_ialloc_inode_init+0x186/0x340 xfs_ialloc_ag_alloc+0x254/0x720 xfs_dialloc+0x21f/0x870 xfs_create_tmpfile+0x1a9/0x2f0 xfs_rename+0x369/0xfd0 xfs_vn_rename+0xfa/0x170 vfs_rename+0x5fb/0xc30 do_renameat2+0x52d/0x6e0 __x64_sys_renameat2+0x4b/0x60 do_syscall_64+0x3b/0xe0 entry_SYSCALL_64_after_hwframe+0x46/0x4e A later refactoring patch in the online repair series fixed this by accident, which is why I didn't notice this until I started testing only the patches that are likely to end up in 6.8. Fixes: 1c7ce115e521 ("xfs: reap large AG metadata extents when possible") Signed-off-by: "Darrick J. Wong" Reviewed-by: Dave Chinner Signed-off-by: Chandan Babu R commit 84712492e6dab803bf595fb8494d11098b74a652 Author: Eric Sandeen Date: Thu Dec 14 13:28:08 2023 -0600 xfs: short circuit xfs_growfs_data_private() if delta is zero Although xfs_growfs_data() doesn't call xfs_growfs_data_private() if in->newblocks == mp->m_sb.sb_dblocks, xfs_growfs_data_private() further massages the new block count so that we don't i.e. try to create a too-small new AG. This may lead to a delta of "0" in xfs_growfs_data_private(), so we end up in the shrink case and emit the EXPERIMENTAL warning even if we're not changing anything at all. Fix this by returning straightaway if the block delta is zero. (nb: in older kernels, the result of entering the shrink case with delta == 0 may actually let an -ENOSPC escape to userspace, which is confusing for users.) Fixes: fb2fc1720185 ("xfs: support shrinking unused space in the last AG") Signed-off-by: Eric Sandeen Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 7489723c2e26504573dbb49b66bbc59092840008 Author: Daniel Xu Date: Thu Dec 14 15:56:25 2023 -0700 bpf: xdp: Register generic_kfunc_set with XDP programs Registering generic_kfunc_set with XDP programs enables some of the newer BPF features inside XDP -- namely tree based data structures and BPF exceptions. The current motivation for this commit is to enable assertions inside XDP bpf progs. Assertions are a standard and useful tool to encode intent. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/d07d4614b81ca6aada44fcb89bb6b618fb66e4ca.1702594357.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 8d182d5869b3c1a3072c3d51aa81be2be77cfc67 Author: Jason Xing Date: Wed Dec 13 10:44:05 2023 -0800 i40e: remove fake support of rx-frames-irq Since we never support this feature for I40E driver, we don't have to display the value when using 'ethtool -c eth0'. Before this patch applied, the rx-frames-irq is 256 which is consistent with tx-frames-irq. Apparently it could mislead users. Signed-off-by: Jason Xing Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231213184406.1306602-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 0d2f3b87d5017ffe8d6f2c6d8339a53fe871cf97 Merge: b3cb7a830a245 10ad63da5c036 Author: Jakub Kicinski Date: Thu Dec 14 18:55:40 2023 -0800 Merge branch 'mdio-mux-cleanup' Vladimir Oltean says: ==================== MDIO mux cleanup This small patch set resolves some technical debt in the MDIO mux driver which was discovered during the investigation for commit 1f9f2143f24e ("net: mdio-mux: fix C45 access returning -EIO after API change"). The patches have been sitting for 2 months in the NXP SDK kernel and haven't caused issues. ==================== Link: https://lore.kernel.org/r/20231213152712.320842-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit 10ad63da5c036b2fd61600b43217cfa9b4d66f52 Author: Vladimir Oltean Date: Wed Dec 13 17:27:12 2023 +0200 net: mdio-mux: be compatible with parent buses which only support C45 After the mii_bus API conversion to a split read() / read_c45(), there might be MDIO parent buses which only populate the read_c45() and write_c45() function pointers but not the C22 variants. We haven't seen these in the wild paired with MDIO multiplexers, but Andrew points out we should treat the corner case. Link: https://lore.kernel.org/netdev/4ccd7dc9-b611-48aa-865f-68d3a1327ce8@lunn.ch/ Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231213152712.320842-3-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit d215ab4d6ae8bea8f66a50399745791b7de5b7d8 Author: Vladimir Oltean Date: Wed Dec 13 17:27:11 2023 +0200 net: mdio-mux: show errors on probe failure Showing the precise error symbols can help debugging probe issues, such as the recent -EIO error in of_mdiobus_register() caused by the lack of bus->read_c45() and bus->write_c45() methods. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231213152712.320842-2-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski commit b3cb7a830a24527877b0bc900b9bd74a96aea928 Author: Igor Russkikh Date: Wed Dec 13 10:50:44 2023 +0100 net: atlantic: eliminate double free in error handling logic Driver has a logic leak in ring data allocation/free, where aq_ring_free could be called multiple times on same ring, if system is under stress and got memory allocation error. Ring pointer was used as an indicator of failure, but this is not correct since only ring data is allocated/deallocated. Ring itself is an array member. Changing ring allocation functions to return error code directly. This simplifies error handling and eliminates aq_ring_free on higher layer. Signed-off-by: Igor Russkikh Link: https://lore.kernel.org/r/20231213095044.23146-1-irusskikh@marvell.com Signed-off-by: Jakub Kicinski commit 8fc63a91e785ef06fb7f1aba59297793d85095f7 Merge: 6f4b7052daa06 c46975715f5a7 Author: Michael Ellerman Date: Fri Dec 15 13:51:56 2023 +1100 Merge branch 'smp-topo' into next Merge a branch containing SMP topology updates from Srikar, purely so we can include the cover letter which has a lot of good detail here: PowerVM systems configured in shared processors mode have some unique challenges. Some device-tree properties will be missing on a shared processor. Hence some sched domains may not make sense for shared processor systems. Most shared processor systems are over-provisioned. Underlying PowerVM Hypervisor would schedule at a Big Core (SMT8) granularity. The most recent power processors support two almost independent cores. In a lightly loaded condition, it helps the overall system performance if we pack to lesser number of Big Cores. Since each thread-group is independent, running threads on both the thread-groups of a SMT8 core, should have a minimal adverse impact in non over provisioned scenarios. These changes in this patchset will not affect in the over provisioned scenario. If there are more threads than SMT domains, then asym_packing will not kick-in. System Configuration type=Shared mode=Uncapped smt=8 lcpu=96 mem=1066409344 kB cpus=96 ent=64.00 So *64 Entitled cores/ 96 Virtual processor* Scenario lscpu Architecture: ppc64le Byte Order: Little Endian CPU(s): 768 On-line CPU(s) list: 0-767 Model name: POWER10 (architected), altivec supported Model: 2.0 (pvr 0080 0200) Thread(s) per core: 8 Core(s) per socket: 16 Socket(s): 6 Hypervisor vendor: pHyp Virtualization type: para L1d cache: 6 MiB (192 instances) L1i cache: 9 MiB (192 instances) NUMA node(s): 6 NUMA node0 CPU(s): 0-7,32-39,80-87,128-135,176-183,224-231,272-279,320-327,368-375,416-423,464-471,512-519,560-567,608-615,656-663,704-711,752-759 NUMA node1 CPU(s): 8-15,40-47,88-95,136-143,184-191,232-239,280-287,328-335,376-383,424-431,472-479,520-527,568-575,616-623,664-671,712-719,760-767 NUMA node4 CPU(s): 64-71,112-119,160-167,208-215,256-263,304-311,352-359,400-407,448-455,496-503,544-551,592-599,640-647,688-695,736-743 NUMA node5 CPU(s): 16-23,48-55,96-103,144-151,192-199,240-247,288-295,336-343,384-391,432-439,480-487,528-535,576-583,624-631,672-679,720-727 NUMA node6 CPU(s): 72-79,120-127,168-175,216-223,264-271,312-319,360-367,408-415,456-463,504-511,552-559,600-607,648-655,696-703,744-751 NUMA node7 CPU(s): 24-31,56-63,104-111,152-159,200-207,248-255,296-303,344-351,392-399,440-447,488-495,536-543,584-591,632-639,680-687,728-735 ebizzy -t 32 -S 200 (5 iterations) Records per second. (Higher is better) Kernel N Min Max Median Avg Stddev %Change 6.6.0-rc3 5 3840178 4059268 3978042 3973936.6 84264.456 +patch 5 3768393 3927901 3874994 3854046 71532.926 -3.01692 >From lparstat (when the workload stabilized) Kernel %user %sys %wait %idle physc %entc lbusy app vcsw phint 6.6.0-rc3 4.16 0.00 0.00 95.84 26.06 40.72 4.16 69.88 276906989 578 +patch 4.16 0.00 0.00 95.83 17.70 27.66 4.17 78.26 70436663 119 ebizzy -t 128 -S 200 (5 iterations) Records per second. (Higher is better) Kernel N Min Max Median Avg Stddev %Change 6.6.0-rc3 5 5520692 5981856 5717709 5727053.2 176093.2 +patch 5 5305888 6259610 5854590 5843311 375917.03 2.02998 >From lparstat (when the workload stabilized) Kernel %user %sys %wait %idle physc %entc lbusy app vcsw phint 6.6.0-rc3 16.66 0.00 0.00 83.33 45.49 71.08 16.67 50.50 288778533 581 +patch 16.65 0.00 0.00 83.35 30.15 47.11 16.65 65.76 85196150 133 ebizzy -t 512 -S 200 (5 iterations) Records per second. (Higher is better) Kernel N Min Max Median Avg Stddev %Change 6.6.0-rc3 5 19563921 20049955 19701510 19728733 198295.18 +patch 5 19455992 20176445 19718427 19832017 304094.05 0.523521 >From lparstat (when the workload stabilized) %Kernel user %sys %wait %idle physc %entc lbusy app vcsw phint 66.6.0-rc3 6.44 0.01 0.00 33.55 94.14 147.09 66.45 1.33 313345175 621 6+patch 6.44 0.01 0.00 33.55 94.15 147.11 66.45 1.33 109193889 309 System Configuration type=Shared mode=Uncapped smt=8 lcpu=40 mem=1067539392 kB cpus=96 ent=40.00 So *40 Entitled cores/ 40 Virtual processor* Scenario lscpu Architecture: ppc64le Byte Order: Little Endian CPU(s): 320 On-line CPU(s) list: 0-319 Model name: POWER10 (architected), altivec supported Model: 2.0 (pvr 0080 0200) Thread(s) per core: 8 Core(s) per socket: 10 Socket(s): 4 Hypervisor vendor: pHyp Virtualization type: para L1d cache: 2.5 MiB (80 instances) L1i cache: 3.8 MiB (80 instances) NUMA node(s): 4 NUMA node0 CPU(s): 0-7,32-39,64-71,96-103,128-135,160-167,192-199,224-231,256-263,288-295 NUMA node1 CPU(s): 8-15,40-47,72-79,104-111,136-143,168-175,200-207,232-239,264-271,296-303 NUMA node4 CPU(s): 16-23,48-55,80-87,112-119,144-151,176-183,208-215,240-247,272-279,304-311 NUMA node5 CPU(s): 24-31,56-63,88-95,120-127,152-159,184-191,216-223,248-255,280-287,312-319 ebizzy -t 32 -S 200 (5 iterations) Records per second. (Higher is better) Kernel N Min Max Median Avg Stddev %Change 6.6.0-rc3 5 3535518 3864532 3745967 3704233.2 130216.76 +patch 5 3608385 3708026 3649379 3651596.6 37862.163 -1.42099 %Kernel user %sys %wait %idle physc %entc lbusy app vcsw phint 6.6.0-rc3 10.00 0.01 0.00 89.99 22.98 57.45 10.01 41.01 1135139 262 +patch 10.00 0.00 0.00 90.00 16.95 42.37 10.00 47.05 925561 19 ebizzy -t 64 -S 200 (5 iterations) Records per second. (Higher is better) Kernel N Min Max Median Avg Stddev %Change 6.6.0-rc3 5 4434984 4957281 4548786 4591298.2 211770.2 +patch 5 4461115 4835167 4544716 4607795.8 151474.85 0.359323 %Kernel user %sys %wait %idle physc %entc lbusy app vcsw phint 6.6.0-rc3 20.01 0.00 0.00 79.99 38.22 95.55 20.01 25.77 1287553 265 +patch 19.99 0.00 0.00 80.01 25.55 63.88 19.99 38.44 1077341 20 ebizzy -t 256 -S 200 (5 iterations) Records per second. (Higher is better) Kernel N Min Max Median Avg Stddev %Change 6.6.0-rc3 5 8850648 8982659 8951911 8936869.2 52278.031 +patch 5 8751038 9060510 8981409 8942268.4 117070.6 0.0604149 %Kernel user %sys %wait %idle physc %entc lbusy app vcsw phint 6.6.0-rc3 80.02 0.01 0.01 19.96 40.00 100.00 80.03 24.00 1597665 276 +patch 80.02 0.01 0.01 19.96 40.00 100.00 80.03 23.99 1383921 63 Observation: We are able to see Improvement in ebizzy throughput even with lesser core utilization (almost half the core utilization) in low utilization scenarios while still retaining throughput in mid and higher utilization scenarios. Note: The numbers are with Uncapped + no-noise case. In the Capped and/or noise case, due to contention on the Cores, the numbers are expected to further improve. Note: The numbers included (sched/fair: Enable group_asym_packing in find_idlest_group) https://lore.kernel.org/all/20231018155036.2314342-1-srikar@linux.vnet.ibm.com/ commit c46975715f5a7b941aa09bc0539a8dbe297f308f Author: Srikar Dronamraju Date: Thu Dec 14 23:37:15 2023 +0530 powerpc/smp: Dynamically build Powerpc topology Currently there are four Powerpc specific sched topologies. These are all statically defined. However not all these topologies are used by all Powerpc systems. To avoid unnecessary degenerations by the scheduler, masks and flags are compared. However if the sched topologies are build dynamically then the code is simpler and there are greater chances of avoiding degenerations. Note: Even X86 builds its sched topologies dynamically and proposed changes are very similar to the way X86 is building its topologies. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://msgid.link/20231214180720.310852-6-srikar@linux.vnet.ibm.com commit 0e93f1c780e8fd315f1262467b7d35eb6f766d2f Author: Srikar Dronamraju Date: Thu Dec 14 23:37:14 2023 +0530 powerpc/smp: Avoid asym packing within thread_group of a core PowerVM Hypervisor will schedule at a core granularity. However each core can have more than one thread_groups. For better utilization in case of a shared processor, its preferable for the scheduler to pack to the lowest core. However there is no benefit of moving a thread between two thread groups of the same core. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://msgid.link/20231214180720.310852-5-srikar@linux.vnet.ibm.com commit fd535a858ebeb1f478b1d065b6c057f52aad483a Author: Srikar Dronamraju Date: Thu Dec 14 23:37:13 2023 +0530 powerpc/smp: Add __ro_after_init attribute There are some variables that are only updated at boot time. So add __ro_after_init attribute to such variables Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://msgid.link/20231214180720.310852-4-srikar@linux.vnet.ibm.com commit 0e1c1986e0e65746daa05405d7747ce882f83cf1 Author: Srikar Dronamraju Date: Thu Dec 14 23:37:12 2023 +0530 powerpc/smp: Disable MC domain for shared processor Like L2-cache info, coregroup information which is used to determine MC sched domains is only present on dedicated LPARs. i.e PowerVM doesn't export coregroup information for shared processor LPARs. Hence disable creating MC domains on shared LPAR Systems. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://msgid.link/20231214180720.310852-3-srikar@linux.vnet.ibm.com commit aa80c6343fcf53cbc29f84ba9f89ca87d4e41350 Author: Srikar Dronamraju Date: Thu Dec 14 23:37:11 2023 +0530 powerpc/smp: Enable Asym packing for cores on shared processor If there are shared processor LPARs, underlying Hypervisor can have more virtual cores to handle than actual physical cores. Starting with Power 9, a big core (aka SMT8 core) has 2 nearly independent thread groups. On a shared processors LPARs, it helps to pack threads to lesser number of cores so that the overall system performance and utilization improves. PowerVM schedules at a big core level. Hence packing to fewer cores helps. Since each thread-group is independent, running threads on both the thread-groups of a SMT8 core, should have a minimal adverse impact in non over provisioned scenarios. These changes in this patchset will not affect in the over provisioned scenario. If there are more threads than SMT domains, then asym_packing will not kick-in For example: Lets says there are two 8-core Shared LPARs that are actually sharing a 8 Core shared physical pool, each running 8 threads each. Then Consolidating 8 threads to 4 cores on each LPAR would help them to perform better. This is because each of the LPAR will get 100% time to run applications and there will no switching required by the Hypervisor. To achieve this, enable SD_ASYM_PACKING flag at CACHE, MC and DIE level when the system is running in shared processor mode and has big cores. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://msgid.link/20231214180720.310852-2-srikar@linux.vnet.ibm.com commit 6f4b7052daa060e7d20d6d599697b8ac702a7e69 Author: Aneesh Kumar K.V Date: Tue Nov 14 12:42:19 2023 +0530 powerpc/sched: Cleanup vcpu_is_preempted() No functional change in this patch. A helper is added to find if vcpu is dispatched by hypervisor. Use that instead of opencoding. Also clarify some of the comments. Signed-off-by: "Aneesh Kumar K.V" Signed-off-by: Michael Ellerman Link: https://msgid.link/20231114071219.198222-1-aneesh.kumar@linux.ibm.com commit 1891cfe3b38b3afd54cc652f8eb8e2d0d7353301 Merge: fcb29877f7e18 b795db185e326 Author: Jakub Kicinski Date: Thu Dec 14 18:38:37 2023 -0800 Merge branch 'convert-net-selftests-to-run-in-unique-namespace-part-3' Hangbin Liu says: ==================== Convert net selftests to run in unique namespace (Part 3) Here is the 3rd part of converting net selftests to run in unique namespace. This part converts all srv6 and fib tests. Note that patch 06 is a fix for testing fib_nexthop_multiprefix. Here is the part 1 link: https://lore.kernel.org/netdev/20231202020110.362433-1-liuhangbin@gmail.com And part 2 link: https://lore.kernel.org/netdev/20231206070801.1691247-1-liuhangbin@gmail.com ==================== Link: https://lore.kernel.org/r/20231213060856.4030084-1-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit b795db185e3260c8022dbfd01c12a05dcfe51b7a Author: Hangbin Liu Date: Wed Dec 13 14:08:56 2023 +0800 selftests/net: convert fdb_flush.sh to run it in unique namespace Here is the test result after conversion. # ./fdb_flush.sh TEST: vx10: Expected 5 FDB entries, got 5 [ OK ] TEST: vx20: Expected 5 FDB entries, got 5 [ OK ] ... TEST: vx10: Expected 5 FDB entries, got 5 [ OK ] TEST: Test entries with dst 192.0.2.1 [ OK ] Acked-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Link: https://lore.kernel.org/r/20231213060856.4030084-14-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit f6fc5b949911efb758e13bc4a1a10c9a473b6254 Author: Hangbin Liu Date: Wed Dec 13 14:08:55 2023 +0800 selftests/net: convert fib_tests.sh to run it in unique namespace Here is the test result after conversion. # ./fib_tests.sh Single path route test Start point TEST: IPv4 fibmatch [ OK ] ... Fib6 garbage collection test TEST: ipv6 route garbage collection [ OK ] IPv4 multipath list receive tests TEST: Multipath route hit ratio (1.00) [ OK ] IPv6 multipath list receive tests TEST: Multipath route hit ratio (1.00) [ OK ] Tests passed: 225 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Link: https://lore.kernel.org/r/20231213060856.4030084-13-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 6c0ee7b4d69d5545d28f81ceabf89a5b7d86d1dd Author: Hangbin Liu Date: Wed Dec 13 14:08:54 2023 +0800 selftests/net: convert fib_rule_tests.sh to run it in unique namespace Here is the test result after conversion. ]# ./fib_rule_tests.sh TEST: rule6 check: oif redirect to table [ OK ] ... TEST: rule4 dsfield tcp connect (dsfield 0x07) [ OK ] Tests passed: 66 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-12-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 3a06833b2adc0a902f2469ad4ce41ccd64f1f3ab Author: Hangbin Liu Date: Wed Dec 13 14:08:53 2023 +0800 selftests/net: convert fib-onlink-tests.sh to run it in unique namespace Remove PEER_CMD, which is not used in this test Here is the test result after conversion. ]# ./fib-onlink-tests.sh Error: ipv4: FIB table does not exist. Flush terminated Error: ipv6: FIB table does not exist. Flush terminated ######################################## Configuring interfaces ... TEST: Gateway resolves to wrong nexthop device - VRF [ OK ] Tests passed: 38 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-11-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 39333e31672cfc35430d1f5e411188553936b64d Author: Hangbin Liu Date: Wed Dec 13 14:08:52 2023 +0800 selftests/net: convert fib_nexthops.sh to run it in unique namespace Here is the test result after conversion. ]# ./fib_nexthops.sh Basic functional tests ---------------------- TEST: List with nothing defined [ OK ] TEST: Nexthop get on non-existent id [ OK ] ... TEST: IPv6 resilient nexthop group torture test [ OK ] Tests passed: 234 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Link: https://lore.kernel.org/r/20231213060856.4030084-10-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit d2168ea792345938c4f53c22126066fbe7a6001c Author: Hangbin Liu Date: Wed Dec 13 14:08:51 2023 +0800 selftests/net: convert fib_nexthop_nongw.sh to run it in unique namespace Here is the test result after conversion. ]# ./fib_nexthop_nongw.sh TEST: nexthop: get route with nexthop without gw [ OK ] TEST: nexthop: ping through nexthop without gw [ OK ] Acked-by: David Ahern Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-9-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 5ae89fe43a4e889249fa700d0da5aa5d3e64e972 Author: Hangbin Liu Date: Wed Dec 13 14:08:50 2023 +0800 selftests/net: convert fib_nexthop_multiprefix to run it in unique namespace Here is the test result after conversion. ]# ./fib_nexthop_multiprefix.sh TEST: IPv4: host 0 to host 1, mtu 1300 [ OK ] TEST: IPv6: host 0 to host 1, mtu 1300 [ OK ] TEST: IPv4: host 0 to host 2, mtu 1350 [ OK ] TEST: IPv6: host 0 to host 2, mtu 1350 [ OK ] TEST: IPv4: host 0 to host 3, mtu 1400 [ OK ] TEST: IPv6: host 0 to host 3, mtu 1400 [ OK ] TEST: IPv4: host 0 to host 1, mtu 1300 [ OK ] TEST: IPv6: host 0 to host 1, mtu 1300 [ OK ] TEST: IPv4: host 0 to host 2, mtu 1350 [ OK ] TEST: IPv6: host 0 to host 2, mtu 1350 [ OK ] TEST: IPv4: host 0 to host 3, mtu 1400 [ OK ] TEST: IPv6: host 0 to host 3, mtu 1400 [ OK ] Acked-by: David Ahern Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-8-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit a33e9da3470499e9ff476138f271fb52d6bfe767 Author: Hangbin Liu Date: Wed Dec 13 14:08:49 2023 +0800 selftests/net: fix grep checking for fib_nexthop_multiprefix When running fib_nexthop_multiprefix test I saw all IPv6 test failed. e.g. ]# ./fib_nexthop_multiprefix.sh TEST: IPv4: host 0 to host 1, mtu 1300 [ OK ] TEST: IPv6: host 0 to host 1, mtu 1300 [FAIL] With -v it shows COMMAND: ip netns exec h0 /usr/sbin/ping6 -s 1350 -c5 -w5 2001:db8:101::1 PING 2001:db8:101::1(2001:db8:101::1) 1350 data bytes From 2001:db8:100::64 icmp_seq=1 Packet too big: mtu=1300 --- 2001:db8:101::1 ping statistics --- 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms Route get 2001:db8:101::1 via 2001:db8:100::64 dev eth0 src 2001:db8:100::1 metric 1024 expires 599sec mtu 1300 pref medium Searching for: 2001:db8:101::1 from :: via 2001:db8:100::64 dev eth0 src 2001:db8:100::1 .* mtu 1300 The reason is when CONFIG_IPV6_SUBTREES is not enabled, rt6_fill_node() will not put RTA_SRC info. After fix: ]# ./fib_nexthop_multiprefix.sh TEST: IPv4: host 0 to host 1, mtu 1300 [ OK ] TEST: IPv6: host 0 to host 1, mtu 1300 [ OK ] Fixes: 735ab2f65dce ("selftests: Add test with multiple prefixes using single nexthop") Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-7-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 779283b7770f4580afa6691aa7fc6519d60f0e88 Author: Hangbin Liu Date: Wed Dec 13 14:08:48 2023 +0800 selftests/net: convert fcnal-test.sh to run it in unique namespace Here is the test result after conversion. There are some failures, but it also exists on my system without this patch. So it's not affectec by this patch and I will check the reason later. ]# time ./fcnal-test.sh /usr/bin/which: no nettest in (/root/.local/bin:/root/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin) ########################################################################### IPv4 ping ########################################################################### ################################################################# No VRF SYSCTL: net.ipv4.raw_l3mdev_accept=0 TEST: ping out - ns-B IP [ OK ] TEST: ping out, device bind - ns-B IP [ OK ] TEST: ping out, address bind - ns-B IP [ OK ] ... ################################################################# SNAT on VRF TEST: IPv4 TCP connection over VRF with SNAT [ OK ] TEST: IPv6 TCP connection over VRF with SNAT [ OK ] Tests passed: 893 Tests failed: 21 real 52m48.178s user 0m34.158s sys 1m42.976s BTW, this test needs a really long time. So expand the timeout to 1h. Acked-by: David Ahern Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-6-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 792cd1dbc8a253c67f715ae6f987b8b28dbbcbbf Author: Hangbin Liu Date: Wed Dec 13 14:08:47 2023 +0800 selftests/net: convert srv6_end_dt6_l3vpn_test.sh to run it in unique namespace As the name \${rt-${rt}} may make reader confuse, convert the variable hs/rt in setup_rt/hs to hid, rid. Here is the test result after conversion. ]# ./srv6_end_dt6_l3vpn_test.sh ################################################################################ TEST SECTION: IPv6 routers connectivity test ################################################################################ TEST: Routers connectivity: rt-1 -> rt-2 [ OK ] TEST: Routers connectivity: rt-2 -> rt-1 [ OK ] ... TEST: Hosts isolation: hs-t200-4 -X-> hs-t100-2 [ OK ] Tests passed: 18 Tests failed: 0 Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-5-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 7b2d941c81bc110925870b6f0c1a071a20850b7c Author: Hangbin Liu Date: Wed Dec 13 14:08:46 2023 +0800 selftests/net: convert srv6_end_dt4_l3vpn_test.sh to run it in unique namespace As the name \${rt-${rt}} may make reader confuse, convert the variable hs/rt in setup_rt/hs to hid, rid. Here is the test result after conversion. ]# ./srv6_end_dt4_l3vpn_test.sh ################################################################################ TEST SECTION: IPv6 routers connectivity test ################################################################################ TEST: Routers connectivity: rt-1 -> rt-2 [ OK ] TEST: Routers connectivity: rt-2 -> rt-1 [ OK ] ... TEST: Hosts isolation: hs-t200-4 -X-> hs-t100-2 [ OK ] Tests passed: 18 Tests failed: 0 Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-4-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit 59cac2efd378811822ee320777116845b3e30722 Author: Hangbin Liu Date: Wed Dec 13 14:08:45 2023 +0800 selftests/net: convert srv6_end_dt46_l3vpn_test.sh to run it in unique namespace As the name \${rt-${rt}} may make reader confuse, convert the variable hs/rt in setup_rt/hs to hid, rid. Here is the test result after conversion. ]# ./srv6_end_dt46_l3vpn_test.sh ################################################################################ TEST SECTION: IPv6 routers connectivity test ################################################################################ TEST: Routers connectivity: rt-1 -> rt-2 [ OK ] TEST: Routers connectivity: rt-2 -> rt-1 [ OK ] ... TEST: IPv4 Hosts isolation: hs-t200-4 -X-> hs-t100-2 [ OK ] Tests passed: 34 Tests failed: 0 Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-3-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit b6925b4ed57cccf42ca0fb46c7446f0859e7ad4b Author: Hangbin Liu Date: Wed Dec 13 14:08:44 2023 +0800 selftests/net: add variable NS_LIST for lib.sh Add a global variable NS_LIST to store all the namespaces that setup_ns created, so the caller could call cleanup_all_ns() instead of remember all the netns names when using cleanup_ns(). Signed-off-by: Hangbin Liu Link: https://lore.kernel.org/r/20231213060856.4030084-2-liuhangbin@gmail.com Signed-off-by: Jakub Kicinski commit fcb29877f7e18a1f27d7d6871f5f7bb6aaade575 Author: Randy Dunlap Date: Tue Dec 12 20:36:50 2023 -0800 page_pool: fix typos and punctuation Correct spelling (s/and/any) and a run-on sentence. Spell out "multi". Signed-off-by: Randy Dunlap Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Link: https://lore.kernel.org/r/20231213043650.12672-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit bf873a800ac3234eba991603a450eaa517d27022 Author: Randy Dunlap Date: Tue Dec 12 20:35:11 2023 -0800 net: skbuff: fix spelling errors Correct spelling as reported by codespell. Signed-off-by: Randy Dunlap Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20231213043511.10357-1-rdunlap@infradead.org Signed-off-by: Jakub Kicinski commit 81d56f567a3f124c21c7c97f4a895296021b8943 Merge: c2d919cdfe56d 54a600ed21703 Author: Jakub Kicinski Date: Thu Dec 14 17:59:00 2023 -0800 Merge branch 'net-mdio-mdio-bcm-unimac-optimizations-and-clean-up' Justin Chen says: ==================== net: mdio: mdio-bcm-unimac: optimizations and clean up Clean up mdio poll to use read_poll_timeout() and reduce the potential poll time. ==================== Link: https://lore.kernel.org/r/20231213222744.2891184-1-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit 54a600ed217036f231805703cedd9f8f98d3f40a Author: Justin Chen Date: Wed Dec 13 14:27:44 2023 -0800 net: mdio: mdio-bcm-unimac: Use read_poll_timeout Simplify the code by using read_poll_timeout(). Signed-off-by: Justin Chen Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231213222744.2891184-3-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit 268531be211f18c55f7ff5a1641d32c0fd0571cd Author: Justin Chen Date: Wed Dec 13 14:27:43 2023 -0800 net: mdio: mdio-bcm-unimac: Delay before first poll With a clock interval of 400 nsec and a 64 bit transactions (32 bit preamble & 16 bit control & 16 bit data), it is reasonable to assume the mdio transaction will take 25.6 usec. Add a 30 usec delay before the first poll to reduce the chance of a 1000-2000 usec sleep. Reduce the timeout from 1000ms to 100ms as it is unlikely for the bus to take this long. Signed-off-by: Justin Chen Acked-by: Florian Fainelli Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231213222744.2891184-2-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski commit c2d919cdfe56de1b3ba0ec019e6367957dd39f14 Merge: 8f674972d698c 7b5fe80ebc631 Author: Jakub Kicinski Date: Thu Dec 14 17:51:23 2023 -0800 Merge branch 'tools-ynl-gen-fill-in-the-gaps-in-support-of-legacy-families' Jakub Kicinski says: ==================== tools: ynl-gen: fill in the gaps in support of legacy families Fill in the gaps in YNL C code gen so that we can generate user space code for all genetlink families for which we have specs. The two major changes we need are support for fixed headers and support for recursive nests. For fixed header support - place the struct for the fixed header directly in the request struct (and don't bother generating access helpers). The member of a fixed header can't be too complex, and also are by definition not optional so the user has to fill them in. The YNL core needs a bit of a tweak to understand that the attrs may now start at a fixed offset, which is not necessarily equal to sizeof(struct genlmsghdr). Dealing with nested sets is much harder. Previously we'd gen the nested structs as: struct outer { struct inner inner; }; If structs are recursive (e.g. inner contains outer again) we must break this chain and allocate one of the structs dynamically (store a pointer rather than full struct). ==================== Link: https://lore.kernel.org/r/20231213231432.2944749-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 7b5fe80ebc6312896a72f0187b00f7840579d4fd Author: Jakub Kicinski Date: Wed Dec 13 15:14:32 2023 -0800 tools: ynl-gen: print prototypes for recursive stuff We avoid printing forward declarations and prototypes for most types by sorting things topologically. But if structs nest we do need the forward declarations, there's no other way. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/r/20231213231432.2944749-9-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 461f25a2e4334767d3e306b08dbda054da1aaa30 Author: Jakub Kicinski Date: Wed Dec 13 15:14:31 2023 -0800 tools: ynl-gen: store recursive nests by a pointer To avoid infinite nesting store recursive structs by pointer. If recursive struct is placed in the op directly - the first instance can be stored by value. That makes the code much less of a pain for majority of practical uses. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/r/20231213231432.2944749-8-kuba@kernel.org Signed-off-by: Jakub Kicinski commit aa75783b95a1e7fc09129f5364476e6effe47392 Author: Jakub Kicinski Date: Wed Dec 13 15:14:30 2023 -0800 tools: ynl-gen: re-sort ignoring recursive nests We try to keep the structures and helpers "topologically sorted", to avoid forward declarations. When recursive nests are at play we need to sort twice, because structs which end up being marked as recursive will get a full set of forward declarations, so we should ignore them for the purpose of sorting. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/r/20231213231432.2944749-7-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 38329fcfb757b8215c07a77b6657721cc7e9530e Author: Jakub Kicinski Date: Wed Dec 13 15:14:29 2023 -0800 tools: ynl-gen: record information about recursive nests Track which nests are recursive. Non-recursive nesting gets rendered in C as directly nested structs. For recursive ones we need to put a pointer in, rather than full struct. Track this information, no change to generated code, yet. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/r/20231213231432.2944749-6-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f967a498fce89e9291f01b8f29109fe782d7670a Author: Jakub Kicinski Date: Wed Dec 13 15:14:28 2023 -0800 tools: ynl-gen: fill in implementations for TypeUnused Fill in more empty handlers for TypeUnused. When 'unused' attr gets specified in a nested set we have to cleanly skip it during code generation. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/r/20231213231432.2944749-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f6805072c2aa81e6441c797bd074f4ae2db0c66e Author: Jakub Kicinski Date: Wed Dec 13 15:14:27 2023 -0800 tools: ynl-gen: support fixed headers in genetlink Support genetlink families using simple fixed headers. Assume fixed header is identical for all ops of the family for now. Fixed headers are added to the request and reply structs as a _hdr member, and copied to/from netlink messages appropriately. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/r/20231213231432.2944749-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 139c163b5b0b7095bf88415da030795c403baa33 Author: Jakub Kicinski Date: Wed Dec 13 15:14:26 2023 -0800 tools: ynl-gen: use enum user type for members and args Commit 30c902001534 ("tools: ynl-gen: use enum name from the spec") added pre-cooked user type for enums. Use it to fix ignoring enum-name provided in the spec. This changes a type in struct ethtool_tunnel_udp_entry but is generally inconsequential for current families. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/r/20231213231432.2944749-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 4dc27587dcbaf9f6229222ba015344c0edce24c9 Author: Jakub Kicinski Date: Wed Dec 13 15:14:25 2023 -0800 tools: ynl-gen: add missing request free helpers for dumps The code gen generates a prototype for dump request free in the header, but no implementation in the source. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/r/20231213231432.2944749-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 0f5d5454c723d5c729d4676860a390c31c466f50 Merge: 403f3e8fda60f f2d0ffee1f033 Author: Alexei Starovoitov Date: Thu Dec 14 17:30:27 2023 -0800 Merge branch 'bpf-fs-mount-options-parsing-follow-ups' Andrii Nakryiko says: ==================== BPF FS mount options parsing follow ups Original BPF token patch set ([0]) added delegate_xxx mount options which supported only special "any" value and hexadecimal bitmask. This patch set attempts to make specifying and inspecting these mount options more human-friendly by supporting string constants matching corresponding bpf_cmd, bpf_map_type, bpf_prog_type, and bpf_attach_type enumerators. This implementation relies on BTF information to find all supported symbolic names. If kernel wasn't built with BTF, BPF FS will still support "any" and hex-based mask. [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=805707&state=* v1->v2: - strip BPF_, BPF_MAP_TYPE_, and BPF_PROG_TYPE_ prefixes, do case-insensitive comparison, normalize to lower case (Alexei). ==================== Link: https://lore.kernel.org/r/20231214225016.1209867-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit f2d0ffee1f03395d9ae65f9c615b6a0ee05d0e12 Author: Andrii Nakryiko Date: Thu Dec 14 14:50:16 2023 -0800 selftests/bpf: utilize string values for delegate_xxx mount options Use both hex-based and string-based way to specify delegate mount options for BPF FS. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231214225016.1209867-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c5707b2146d229691e193d5158ea70b21b8ba180 Author: Andrii Nakryiko Date: Thu Dec 14 14:50:15 2023 -0800 bpf: support symbolic BPF FS delegation mount options Besides already supported special "any" value and hex bit mask, support string-based parsing of delegation masks based on exact enumerator names. Utilize BTF information of `enum bpf_cmd`, `enum bpf_map_type`, `enum bpf_prog_type`, and `enum bpf_attach_type` types to find supported symbolic names (ignoring __MAX_xxx guard values and stripping repetitive prefixes like BPF_ for cmd and attach types, BPF_MAP_TYPE_ for maps, and BPF_PROG_TYPE_ for prog types). The case doesn't matter, but it is normalized to lower case in mount option output. So "PROG_LOAD", "prog_load", and "MAP_create" are all valid values to specify for delegate_cmds options, "array" is among supported for map types, etc. Besides supporting string values, we also support multiple values specified at the same time, using colon (':') separator. There are corresponding changes on bpf_show_options side to use known values to print them in human-readable format, falling back to hex mask printing, if there are any unrecognized bits. This shouldn't be necessary when enum BTF information is present, but in general we should always be able to fall back to this even if kernel was built without BTF. As mentioned, emitted symbolic names are normalized to be all lower case. Example below shows various ways to specify delegate_cmds options through mount command and how mount options are printed back: 12/14 14:39:07.604 vmuser@archvm:~/local/linux/tools/testing/selftests/bpf $ mount | rg token $ sudo mkdir -p /sys/fs/bpf/token $ sudo mount -t bpf bpffs /sys/fs/bpf/token \ -o delegate_cmds=prog_load:MAP_CREATE \ -o delegate_progs=kprobe \ -o delegate_attachs=xdp $ mount | grep token bpffs on /sys/fs/bpf/token type bpf (rw,relatime,delegate_cmds=map_create:prog_load,delegate_progs=kprobe,delegate_attachs=xdp) Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231214225016.1209867-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 8f674972d698c1223b6b4f374df5dde835b88c34 Merge: 1b666016d0ad4 c7402612e2e61 Author: Jakub Kicinski Date: Thu Dec 14 17:13:35 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/ethernet/intel/iavf/iavf_ethtool.c 3a0b5a2929fd ("iavf: Introduce new state machines for flow director") 95260816b489 ("iavf: use iavf_schedule_aq_request() helper") https://lore.kernel.org/all/84e12519-04dc-bd80-bc34-8cf50d7898ce@intel.com/ drivers/net/ethernet/broadcom/bnxt/bnxt.c c13e268c0768 ("bnxt_en: Fix HWTSTAMP_FILTER_ALL packet timestamp logic") c2f8063309da ("bnxt_en: Refactor RX VLAN acceleration logic.") a7445d69809f ("bnxt_en: Add support for new RX and TPA_START completion types for P7") 1c7fd6ee2fe4 ("bnxt_en: Rename some macros for the P5 chips") https://lore.kernel.org/all/20231211110022.27926ad9@canb.auug.org.au/ drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c bd6781c18cb5 ("bnxt_en: Fix wrong return value check in bnxt_close_nic()") 84793a499578 ("bnxt_en: Skip nic close/open when configuring tstamp filters") https://lore.kernel.org/all/20231214113041.3a0c003c@canb.auug.org.au/ drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c 3d7a3f2612d7 ("net/mlx5: Nack sync reset request when HotPlug is enabled") cecf44ea1a1f ("net/mlx5: Allow sync reset flow when BF MGT interface device is present") https://lore.kernel.org/all/20231211110328.76c925af@canb.auug.org.au/ No adjacent changes. Signed-off-by: Jakub Kicinski commit 403f3e8fda60f1a3e54741742d46aea98ecf671e Merge: 56925f389e152 2cd07b0eb08c0 Author: Alexei Starovoitov Date: Thu Dec 14 17:12:49 2023 -0800 Merge branch 'add-bpf_xdp_get_xfrm_state-kfunc' Daniel Xu says: ==================== Add bpf_xdp_get_xfrm_state() kfunc This patchset adds two kfunc helpers, bpf_xdp_get_xfrm_state() and bpf_xdp_xfrm_state_release() that wrap xfrm_state_lookup() and xfrm_state_put(). The intent is to support software RSS (via XDP) for the ongoing/upcoming ipsec pcpu work [0]. Recent experiments performed on (hopefully) reproducible AWS testbeds indicate that single tunnel pcpu ipsec can reach line rate on 100G ENA nics. Note this patchset only tests/shows generic xfrm_state access. The "secret sauce" (if you can really even call it that) involves accessing a soon-to-be-upstreamed pcpu_num field in xfrm_state. Early example is available here [1]. [0]: https://datatracker.ietf.org/doc/draft-ietf-ipsecme-multi-sa-performance/03/ [1]: https://github.com/danobi/xdp-tools/blob/e89a1c617aba3b50d990f779357d6ce2863ecb27/xdp-bench/xdp_redirect_cpumap.bpf.c#L385-L406 Changes from v5: * Improve kfunc doc comments * Remove extraneous replay-window setting on selftest reverse path * Squash two kfunc commits into one * Rebase to bpf-next to pick up bitfield write patches * Remove testing of opts.error in selftest prog Changes from v4: * Fixup commit message for selftest * Set opts->error -ENOENT for !x * Revert single file xfrm + bpf Changes from v3: * Place all xfrm bpf integrations in xfrm_bpf.c * Avoid using nval as a temporary * Rebase to bpf-next * Remove extraneous __failure_unpriv annotation for verifier tests Changes from v2: * Fix/simplify BPF_CORE_WRITE_BITFIELD() algorithm * Added verifier tests for bitfield writes * Fix state leakage across test_tunnel subtests Changes from v1: * Move xfrm tunnel tests to test_progs * Fix writing to opts->error when opts is invalid * Use __bpf_kfunc_start_defs() * Remove unused vxlanhdr definition * Add and use BPF_CORE_WRITE_BITFIELD() macro * Make series bisect clean Changes from RFCv2: * Rebased to ipsec-next * Fix netns leak Changes from RFCv1: * Add Antony's commit tags * Add KF_ACQUIRE and KF_RELEASE semantics ==================== Reviewed-by: Eyal Birger Link: https://lore.kernel.org/r/cover.1702593901.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 2cd07b0eb08c0ed63b1bd0bf0114146b19a4ab1f Author: Daniel Xu Date: Thu Dec 14 15:49:06 2023 -0700 bpf: xfrm: Add selftest for bpf_xdp_get_xfrm_state() This commit extends test_tunnel selftest to test the new XDP xfrm state lookup kfunc. Co-developed-by: Antony Antony Signed-off-by: Antony Antony Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/e704e9a4332e3eac7b458e4bfdec8fcc6984cdb6.1702593901.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit e7adc8291a9e9c232d600d82465cbbb682164ca3 Author: Daniel Xu Date: Thu Dec 14 15:49:05 2023 -0700 bpf: selftests: Move xfrm tunnel test to test_progs test_progs is better than a shell script b/c C is a bit easier to maintain than shell. Also it's easier to use new infra like memory mapped global variables from C via bpf skeleton. Co-developed-by: Antony Antony Signed-off-by: Antony Antony Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/a350db9e08520c64544562d88ec005a039124d9b.1702593901.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 02b4e126e6a5f5552da2ccec47a028984d2d9654 Author: Daniel Xu Date: Thu Dec 14 15:49:04 2023 -0700 bpf: selftests: test_tunnel: Use vmlinux.h declarations vmlinux.h declarations are more ergnomic, especially when working with kfuncs. The uapi headers are often incomplete for kfunc definitions. This commit also switches bitfield accesses to use CO-RE helpers. Switching to vmlinux.h definitions makes the verifier very unhappy with raw bitfield accesses. The error is: ; md.u.md2.dir = direction; 33: (69) r1 = *(u16 *)(r2 +11) misaligned stack access off (0x0; 0x0)+-64+11 size 2 Fix by using CO-RE-aware bitfield reads and writes. Co-developed-by: Antony Antony Signed-off-by: Antony Antony Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/884bde1d9a351d126a3923886b945ea6b1b0776b.1702593901.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 77a7a8220f0d87c44425c0a12e0a72b14962535b Author: Daniel Xu Date: Thu Dec 14 15:49:03 2023 -0700 bpf: selftests: test_tunnel: Setup fresh topology for each subtest This helps with determinism b/c individual setup/teardown prevents leaking state between different subtests. Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/0fb59fa16fb58cca7def5239df606005a3e8dd0e.1702593901.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 8f0ec8c681755f523cf842bfe350ea40609b83a9 Author: Daniel Xu Date: Thu Dec 14 15:49:02 2023 -0700 bpf: xfrm: Add bpf_xdp_get_xfrm_state() kfunc This commit adds an unstable kfunc helper to access internal xfrm_state associated with an SA. This is intended to be used for the upcoming IPsec pcpu work to assign special pcpu SAs to a particular CPU. In other words: for custom software RSS. That being said, the function that this kfunc wraps is fairly generic and used for a lot of xfrm tasks. I'm sure people will find uses elsewhere over time. This commit also adds a corresponding bpf_xdp_xfrm_state_release() kfunc to release the refcnt acquired by bpf_xdp_get_xfrm_state(). The verifier will require that all acquired xfrm_state's are released. Co-developed-by: Antony Antony Signed-off-by: Antony Antony Acked-by: Steffen Klassert Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/a29699c42f5fad456b875c98dd11c6afc3ffb707.1702593901.git.dxu@dxuuu.xyz Signed-off-by: Alexei Starovoitov commit 56925f389e152dcb8d093435d43b78a310539c23 Author: Yonghong Song Date: Thu Dec 14 12:38:20 2023 -0800 selftests/bpf: Remove flaky test_btf_id test With previous patch, one of subtests in test_btf_id becomes flaky and may fail. The following is a failing example: Error: #26 btf Error: #26/174 btf/BTF ID Error: #26/174 btf/BTF ID btf_raw_create:PASS:check 0 nsec btf_raw_create:PASS:check 0 nsec test_btf_id:PASS:check 0 nsec ... test_btf_id:PASS:check 0 nsec test_btf_id:FAIL:check BTF lingersdo_test_get_info:FAIL:check failed: -1 The test tries to prove a btf_id not available after the map is closed. But btf_id is freed only after workqueue and a rcu grace period, compared to previous case just after a rcu grade period. Depending on system workload, workqueue could take quite some time to execute function bpf_map_free_deferred() which may cause the test failure. Instead of adding arbitrary delays, let us remove the logic to check btf_id availability after map is closed. Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20231214203820.1469402-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 59e5791f59dd83e8aa72a4e74217eabb6e8cfd90 Author: Yonghong Song Date: Thu Dec 14 12:38:15 2023 -0800 bpf: Fix a race condition between btf_put() and map_free() When running `./test_progs -j` in my local vm with latest kernel, I once hit a kasan error like below: [ 1887.184724] BUG: KASAN: slab-use-after-free in bpf_rb_root_free+0x1f8/0x2b0 [ 1887.185599] Read of size 4 at addr ffff888106806910 by task kworker/u12:2/2830 [ 1887.186498] [ 1887.186712] CPU: 3 PID: 2830 Comm: kworker/u12:2 Tainted: G OEL 6.7.0-rc3-00699-g90679706d486-dirty #494 [ 1887.188034] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 1887.189618] Workqueue: events_unbound bpf_map_free_deferred [ 1887.190341] Call Trace: [ 1887.190666] [ 1887.190949] dump_stack_lvl+0xac/0xe0 [ 1887.191423] ? nf_tcp_handle_invalid+0x1b0/0x1b0 [ 1887.192019] ? panic+0x3c0/0x3c0 [ 1887.192449] print_report+0x14f/0x720 [ 1887.192930] ? preempt_count_sub+0x1c/0xd0 [ 1887.193459] ? __virt_addr_valid+0xac/0x120 [ 1887.194004] ? bpf_rb_root_free+0x1f8/0x2b0 [ 1887.194572] kasan_report+0xc3/0x100 [ 1887.195085] ? bpf_rb_root_free+0x1f8/0x2b0 [ 1887.195668] bpf_rb_root_free+0x1f8/0x2b0 [ 1887.196183] ? __bpf_obj_drop_impl+0xb0/0xb0 [ 1887.196736] ? preempt_count_sub+0x1c/0xd0 [ 1887.197270] ? preempt_count_sub+0x1c/0xd0 [ 1887.197802] ? _raw_spin_unlock+0x1f/0x40 [ 1887.198319] bpf_obj_free_fields+0x1d4/0x260 [ 1887.198883] array_map_free+0x1a3/0x260 [ 1887.199380] bpf_map_free_deferred+0x7b/0xe0 [ 1887.199943] process_scheduled_works+0x3a2/0x6c0 [ 1887.200549] worker_thread+0x633/0x890 [ 1887.201047] ? __kthread_parkme+0xd7/0xf0 [ 1887.201574] ? kthread+0x102/0x1d0 [ 1887.202020] kthread+0x1ab/0x1d0 [ 1887.202447] ? pr_cont_work+0x270/0x270 [ 1887.202954] ? kthread_blkcg+0x50/0x50 [ 1887.203444] ret_from_fork+0x34/0x50 [ 1887.203914] ? kthread_blkcg+0x50/0x50 [ 1887.204397] ret_from_fork_asm+0x11/0x20 [ 1887.204913] [ 1887.204913] [ 1887.205209] [ 1887.205416] Allocated by task 2197: [ 1887.205881] kasan_set_track+0x3f/0x60 [ 1887.206366] __kasan_kmalloc+0x6e/0x80 [ 1887.206856] __kmalloc+0xac/0x1a0 [ 1887.207293] btf_parse_fields+0xa15/0x1480 [ 1887.207836] btf_parse_struct_metas+0x566/0x670 [ 1887.208387] btf_new_fd+0x294/0x4d0 [ 1887.208851] __sys_bpf+0x4ba/0x600 [ 1887.209292] __x64_sys_bpf+0x41/0x50 [ 1887.209762] do_syscall_64+0x4c/0xf0 [ 1887.210222] entry_SYSCALL_64_after_hwframe+0x63/0x6b [ 1887.210868] [ 1887.211074] Freed by task 36: [ 1887.211460] kasan_set_track+0x3f/0x60 [ 1887.211951] kasan_save_free_info+0x28/0x40 [ 1887.212485] ____kasan_slab_free+0x101/0x180 [ 1887.213027] __kmem_cache_free+0xe4/0x210 [ 1887.213514] btf_free+0x5b/0x130 [ 1887.213918] rcu_core+0x638/0xcc0 [ 1887.214347] __do_softirq+0x114/0x37e The error happens at bpf_rb_root_free+0x1f8/0x2b0: 00000000000034c0 : ; { 34c0: f3 0f 1e fa endbr64 34c4: e8 00 00 00 00 callq 0x34c9 34c9: 55 pushq %rbp 34ca: 48 89 e5 movq %rsp, %rbp ... ; if (rec && rec->refcount_off >= 0 && 36aa: 4d 85 ed testq %r13, %r13 36ad: 74 a9 je 0x3658 36af: 49 8d 7d 10 leaq 0x10(%r13), %rdi 36b3: e8 00 00 00 00 callq 0x36b8 <==== kasan function 36b8: 45 8b 7d 10 movl 0x10(%r13), %r15d <==== use-after-free load 36bc: 45 85 ff testl %r15d, %r15d 36bf: 78 8c js 0x364d So the problem is at rec->refcount_off in the above. I did some source code analysis and find the reason. CPU A CPU B bpf_map_put: ... btf_put with rcu callback ... bpf_map_free_deferred with system_unbound_wq ... ... ... ... btf_free_rcu: ... ... ... bpf_map_free_deferred: ... ... ... ---------> btf_struct_metas_free() ... | race condition ... ... ---------> map->ops->map_free() ... ... btf->struct_meta_tab = NULL In the above, map_free() corresponds to array_map_free() and eventually calling bpf_rb_root_free() which calls: ... __bpf_obj_drop_impl(obj, field->graph_root.value_rec, false); ... Here, 'value_rec' is assigned in btf_check_and_fixup_fields() with following code: meta = btf_find_struct_meta(btf, btf_id); if (!meta) return -EFAULT; rec->fields[i].graph_root.value_rec = meta->record; So basically, 'value_rec' is a pointer to the record in struct_metas_tab. And it is possible that that particular record has been freed by btf_struct_metas_free() and hence we have a kasan error here. Actually it is very hard to reproduce the failure with current bpf/bpf-next code, I only got the above error once. To increase reproducibility, I added a delay in bpf_map_free_deferred() to delay map->ops->map_free(), which significantly increased reproducibility. diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 5e43ddd1b83f..aae5b5213e93 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -695,6 +695,7 @@ static void bpf_map_free_deferred(struct work_struct *work) struct bpf_map *map = container_of(work, struct bpf_map, work); struct btf_record *rec = map->record; + mdelay(100); security_bpf_map_free(map); bpf_map_release_memcg(map); /* implementation dependent freeing */ Hao also provided test cases ([1]) for easily reproducing the above issue. There are two ways to fix the issue, the v1 of the patch ([2]) moving btf_put() after map_free callback, and the v5 of the patch ([3]) using a kptr style fix which tries to get a btf reference during map_check_btf(). Each approach has its pro and cons. The first approach delays freeing btf while the second approach needs to acquire reference depending on context which makes logic not very elegant and may complicate things with future new data structures. Alexei suggested in [4] going back to v1 which is what this patch tries to do. Rerun './test_progs -j' with the above mdelay() hack for a couple of times and didn't observe the error for the above rb_root test cases. Running Hou's test ([1]) is also successful. [1] https://lore.kernel.org/bpf/20231207141500.917136-1-houtao@huaweicloud.com/ [2] v1: https://lore.kernel.org/bpf/20231204173946.3066377-1-yonghong.song@linux.dev/ [3] v5: https://lore.kernel.org/bpf/20231208041621.2968241-1-yonghong.song@linux.dev/ [4] v4: https://lore.kernel.org/bpf/CAADnVQJ3FiXUhZJwX_81sjZvSYYKCFB3BT6P8D59RS2Gu+0Z7g@mail.gmail.com/ Cc: Hou Tao Fixes: 958cf2e273f0 ("bpf: Introduce bpf_obj_new") Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20231214203815.1469107-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit addb5295403270f9b287f2d76f1072b6f653af1d Merge: c9de516ef6339 85bfa5d497b41 Author: Georgi Djakov Date: Fri Dec 15 00:43:01 2023 +0200 Merge branch 'icc-qcm2290' into icc-next More QCM2290-related patches to document the bandwidth monitor instance. * icc-qcm2290 dt-bindings: interconnect: qcom,msm8998-bwmon: Add QCM2290 bwmon instance Signed-off-by: Georgi Djakov commit c9de516ef6339f42d80da73c7f827390309a73b5 Merge: ecd3439595d3a a9a36e4b4adf6 Author: Georgi Djakov Date: Fri Dec 15 00:42:07 2023 +0200 Merge branch 'icc-sm6115' into icc-next Add DT bindings and a driver for managing NoC providers on SM6115. * icc-sm6115 dt-bindings: interconnect: Add Qualcomm SM6115 NoC interconnect: qcom: Add SM6115 interconnect provider driver dt-bindings: interconnect: qcom,msm8998-bwmon: Add SM6115 bwmon instance interconnect: qcom: sm6115: Fix up includes Link: https://lore.kernel.org/r/20231125-topic-6115icc-v3-2-bd8907b8cfd7@linaro.org Signed-off-by: Georgi Djakov commit a9a36e4b4adf63e3a2ea9eed730de50d9b28302e Author: Konrad Dybcio Date: Thu Dec 14 19:36:41 2023 +0100 interconnect: qcom: sm6115: Fix up includes Remove some unnecessary includes and get rid of the abusive of_platform in favor of the correct headers. Reported-by: Rob Herring Reported-by: Georgi Djakov Fixes: 2eab57b131bd ("interconnect: qcom: Add SM6115 interconnect provider driver") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231214-topic-6115iccfix-v1-1-9ad999683a7d@linaro.org Signed-off-by: Georgi Djakov commit a61f89bf76ef6f87ec48dd90dbc73a6cf9952edc Author: Kan Liang Date: Thu Dec 14 06:46:12 2023 -0800 perf top: Uniform the event name for the hybrid machine It's hard to distinguish the default cycles events among hybrid PMUs. For example, $ perf top Available samples 385 cycles:P 903 cycles:P The other tool, e.g., perf record, uniforms the event name and adds the hybrid PMU name before opening the event. So the events can be easily distinguished. Apply the same methodology for the perf top as well. The evlist__uniquify_name() will be invoked by both record and top. Move it to util/evlist.c With the patch: $ perf top Available samples 148 cpu_atom/cycles:P/ 1K cpu_core/cycles:P/ Reviewed-by: Ian Rogers Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Hector Martin Cc: Marc Zyngier Cc: Mark Rutland Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231214144612.1092028-2-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5fa695e7da4975e8d21ce49f3718d6cf00ecb75e Author: Kan Liang Date: Thu Dec 14 06:46:11 2023 -0800 perf top: Use evsel's cpus to replace user_requested_cpus perf top errors out on a hybrid machine $perf top Error: The cycles:P event is not supported. The perf top expects that the "cycles" is collected on all CPUs in the system. But for hybrid there is no single "cycles" event which can cover all CPUs. Perf has to split it into two cycles events, e.g., cpu_core/cycles/ and cpu_atom/cycles/. Each event has its own CPU mask. If a event is opened on the unsupported CPU. The open fails. That's the reason of the above error out. Perf should only open the cycles event on the corresponding CPU. The commit ef91871c960e ("perf evlist: Propagate user CPU maps intersecting core PMU maps") intersect the requested CPU map with the CPU map of the PMU. Use the evsel's cpus to replace user_requested_cpus. The evlist's threads are also propagated to the evsel's threads in __perf_evlist__propagate_maps(). For a system-wide event, perf appends a dummy event and assign it to the evsel's threads. For a per-thread event, the evlist's thread_map is assigned to the evsel's threads. The same as the other tools, e.g., perf record, using the evsel's threads when opening an event. Reported-by: Arnaldo Carvalho de Melo Reviewed-by: Ian Rogers Signed-off-by: Kan Liang Tested-by: Arnaldo Carvalho de Melo Cc: Hector Martin Cc: Marc Zyngier Cc: Mark Rutland Cc: Namhyung Kim Closes: https://lore.kernel.org/linux-perf-users/ZXNnDrGKXbEELMXV@kernel.org/ Link: https://lore.kernel.org/r/20231214144612.1092028-1-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 4fb54994b2360ab5029ee3a959161f6fe6bbb349 Author: Namhyung Kim Date: Mon Dec 11 23:05:46 2023 -0800 perf unwind-libunwind: Fix base address for .eh_frame The base address of a DSO mapping should start at the start of the file. Usually DSOs are mapped from the pgoff 0 so it doesn't matter when it uses the start of the map address. But generated DSOs for JIT codes doesn't start from the 0 so it should subtract the offset to calculate the .eh_frame table offsets correctly. Fixes: dc2cf4ca866f5715 ("perf unwind: Fix segbase for ld.lld linked objects") Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Fangrui Song Cc: Ingo Molnar Cc: Jiri Olsa Cc: Milian Wolff Cc: Pablo Galindo Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231212070547.612536-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c966d23a351a33f8a977fd7efbb6f467132f7383 Author: Namhyung Kim Date: Mon Dec 11 23:05:45 2023 -0800 perf unwind-libdw: Handle JIT-generated DSOs properly Usually DSOs are mapped from the beginning of the file, so the base address of the DSO can be calculated by map->start - map->pgoff. However, JIT DSOs which are generated by `perf inject -j`, are mapped only the code segment. This makes unwind-libdw code confusing and rejects processing unwinds in the JIT DSOs. It should use the map start address as base for them to fix the confusion. Fixes: 1fe627da30331024 ("perf unwind: Take pgoff into account when reporting elf to libdwfl") Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Fangrui Song Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Milian Wolff Cc: Pablo Galindo Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231212070547.612536-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 83e1bdc94f32dcf52dfcd2025acc7a2b9376b1e8 Author: Kai Huang Date: Thu Dec 14 11:28:25 2023 +1300 x86/virt/tdx: Make TDX host depend on X86_MCE A build failure was reported that when INTEL_TDX_HOST is enabled but X86_MCE is not, the tdx_dump_mce_info() function fails to link: ld: vmlinux.o: in function `tdx_dump_mce_info': ...: undefined reference to `mce_is_memory_error' ...: undefined reference to `mce_usable_address' The reason is in such configuration, despite there's no caller of tdx_dump_mce_info() it is still built and there's no implementation for the two "mce_*()" functions. Make INTEL_TDX_HOST depend on X86_MCE to fix. It makes sense to enable MCE support for the TDX host anyway. Because the only way that TDX has to report integrity errors is an MCE, and it is not good to silently ignore such MCE. The TDX spec also suggests the host VMM is expected to implement the MCE handler. Note it also makes sense to make INTEL_TDX_HOST select X86_MCE but this generates "recursive dependency detected!" error in the Kconfig. Closes: https://lore.kernel.org/all/20231212214612.GHZXjUpBFa1IwVMTI7@fat_crate.local/T/ Fixes: 70060463cb2b ("x86/mce: Differentiate real hardware #MCs from TDX erratum ones") Reported-by: Arnd Bergmann Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Link: https://lore.kernel.org/all/20231212214612.GHZXjUpBFa1IwVMTI7@fat_crate.local/T/#m1a109c29324b2bbd0b3b1d45c218012cd3a13be6 Link: https://lore.kernel.org/all/20231213222825.286809-1-kai.huang%40intel.com commit 97bb5e691189d342fc617dc0f1ab3e51a3676602 Author: Haridhar Kalvala Date: Wed Dec 13 12:16:12 2023 +0530 drm/i915: Add Wa_14019877138 Enable Force Dispatch Ends Collection for DG2. BSpec: 46001 Signed-off-by: Haridhar Kalvala Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20231213064612.480032-1-haridhar.kalvala@intel.com commit 1af478903fc48c1409a8dd6b698383b62387adf1 Author: Namhyung Kim Date: Mon Dec 11 23:05:44 2023 -0800 perf genelf: Set ELF program header addresses properly The text section starts after the ELF headers so PHDR.p_vaddr and others should have the correct addresses. Fixes: babd04386b1df8c3 ("perf jit: Include program header in ELF files") Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Fangrui Song Cc: Ingo Molnar Cc: Jiri Olsa Cc: Lieven Hey Cc: Milian Wolff Cc: Pablo Galindo Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231212070547.612536-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6f33e6fa29d0366d6e5b3ea2930dbc0b648151fe Author: Ian Rogers Date: Wed Dec 13 22:02:56 2023 -0800 perf stat: Combine the -A/--no-aggr and --no-merge options The -A or --no-aggr option disables aggregation of core events: $ perf stat -A -e cycles,data_total -a true Performance counter stats for 'system wide': CPU0 1,287,665 cycles CPU1 1,831,681 cycles CPU2 27,345,998 cycles CPU3 1,964,799 cycles CPU4 236,174 cycles CPU5 3,302,825 cycles CPU6 9,201,446 cycles CPU7 1,403,043 cycles CPU0 110.90 MiB data_total 0.008961761 seconds time elapsed The --no-merge option disables the aggregation of uncore events: $ perf stat --no-merge -e cycles,data_total -a true Performance counter stats for 'system wide': 38,482,778 cycles 15.04 MiB data_total [uncore_imc_free_running_1] 15.00 MiB data_total [uncore_imc_free_running_0] 0.005915155 seconds time elapsed Having two options confuses users who generally don't appreciate the difference in PMUs. Keep all the options but make it so they all disable aggregation both of core and uncore events: $ perf stat -A -e cycles,data_total -a true Performance counter stats for 'system wide': CPU0 85,878 cycles CPU1 88,179 cycles CPU2 60,872 cycles CPU3 3,265,567 cycles CPU4 82,357 cycles CPU5 83,383 cycles CPU6 84,156 cycles CPU7 220,803 cycles CPU0 2.38 MiB data_total [uncore_imc_free_running_0] CPU0 2.38 MiB data_total [uncore_imc_free_running_1] 0.001397205 seconds time elapsed Update the relevant 'perf stat' man page information. Reviewed-by: Kan Liang Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Jajeev Cc: Changbin Du Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: K Prateek Nayak Cc: Kaige Ye Cc: Mark Rutland Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231214060256.2094017-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c6ef0a2265c518aa6699b64d10a7e5a9049ac96a Author: Melissa Wen Date: Thu Dec 14 18:45:16 2023 -0100 drm/amd/display: fix documentation for dm_crtc_additional_color_mgmt() warning: expecting prototype for drm_crtc_additional_color_mgmt(). Prototype was for dm_crtc_additional_color_mgmt() instead Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312141801.o9eBCxt9-lkp@intel.com/ Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 8b881b5d6fe9ebb7736097f37103c9b07ea45642 Author: Alex Deucher Date: Thu Dec 14 10:41:41 2023 -0500 drm/amd/display: fix documentation for amdgpu_dm_verify_lut3d_size() It takes the plane state rather than the crtc state. Fixes: aba8b76baabd ("drm/amd/display: add plane shaper LUT support") Reported-by: Stephen Rothwell Reviewed-by: Melissa Wen Signed-off-by: Alex Deucher Cc: Melissa Wen Cc: Harry.Wentland@amd.com commit a6582701178a47c4d0cb2188c965c59c0c0647c8 Author: Zhipeng Lu Date: Fri Dec 15 00:59:38 2023 +0800 drm/amd/pm: fix a double-free in amdgpu_parse_extended_power_table The amdgpu_free_extended_power_table is called in every error-handling paths of amdgpu_parse_extended_power_table. However, after the following call chain of returning: amdgpu_parse_extended_power_table |-> kv_dpm_init / si_dpm_init (the only two caller of amdgpu_parse_extended_power_table) |-> kv_dpm_sw_init / si_dpm_sw_init (the only caller of kv_dpm_init / si_dpm_init, accordingly) |-> kv_dpm_fini / si_dpm_fini (goto dpm_failed in xx_dpm_sw_init) |-> amdgpu_free_extended_power_table As above, the amdgpu_free_extended_power_table is called twice in this returning chain and thus a double-free is triggered. Similarily, the last kfree in amdgpu_parse_extended_power_table also cause a double free with amdgpu_free_extended_power_table in kv_dpm_fini. Fixes: 84176663e70d ("drm/amd/pm: create a new holder for those APIs used only by legacy ASICs(si/kv)") Signed-off-by: Zhipeng Lu Signed-off-by: Alex Deucher commit c2709b2d6a537ca0fa0f1da36fdaf07e48ef447d Author: Zhipeng Lu Date: Fri Dec 15 00:58:42 2023 +0800 gpu/drm/radeon: fix two memleaks in radeon_vm_init When radeon_bo_create and radeon_vm_clear_bo fail, the vm->page_tables allocated before need to be freed. However, neither radeon_vm_init itself nor its caller have done such deallocation. Fixes: 6d2f2944e95e ("drm/radeon: use normal BOs for the page tables v4") Signed-off-by: Zhipeng Lu Signed-off-by: Alex Deucher commit 28dd788382c43b330480f57cd34cde0840896743 Author: Zhipeng Lu Date: Fri Dec 15 00:24:58 2023 +0800 drivers/amd/pm: fix a use-after-free in kv_parse_power_table When ps allocated by kzalloc equals to NULL, kv_parse_power_table frees adev->pm.dpm.ps that allocated before. However, after the control flow goes through the following call chains: kv_parse_power_table |-> kv_dpm_init |-> kv_dpm_sw_init |-> kv_dpm_fini The adev->pm.dpm.ps is used in the for loop of kv_dpm_fini after its first free in kv_parse_power_table and causes a use-after-free bug. Fixes: a2e73f56fa62 ("drm/amdgpu: Add support for CIK parts") Signed-off-by: Zhipeng Lu Signed-off-by: Alex Deucher commit ac16667237a82e2597e329eb9bc520d1cf9dff30 Author: Zhipeng Lu Date: Thu Dec 14 23:24:11 2023 +0800 drm/amd/pm: fix a double-free in si_dpm_init When the allocation of adev->pm.dpm.dyn_state.vddc_dependency_on_dispclk.entries fails, amdgpu_free_extended_power_table is called to free some fields of adev. However, when the control flow returns to si_dpm_sw_init, it goes to label dpm_failed and calls si_dpm_fini, which calls amdgpu_free_extended_power_table again and free those fields again. Thus a double-free is triggered. Fixes: 841686df9f7d ("drm/amdgpu: add SI DPM support (v4)") Signed-off-by: Zhipeng Lu Signed-off-by: Alex Deucher commit 804c49ef30735d70c1df0c58ebec313149a3933c Author: Yang Li Date: Thu Dec 14 09:01:54 2023 +0800 drm/amd/pm: Remove unneeded semicolon ./drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c:1418:2-3: Unneeded semicolon Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7743 Signed-off-by: Yang Li Signed-off-by: Alex Deucher commit afe58346d5d3887b3e49ff623d2f2e471f232a8d Author: Alex Deucher Date: Mon Nov 27 17:26:29 2023 -0500 drm/amdgpu/debugfs: fix error code when smc register accessors are NULL Should be -EOPNOTSUPP. Fixes: 5104fdf50d32 ("drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL") Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 6872a189be508b9383bc081d462a5d99cbb8319d Author: Joshua Ashton Date: Thu Nov 16 18:58:12 2023 -0100 drm/amd/display: Add 3x4 CTM support for plane CTM Create drm_color_ctm_3x4 to support 3x4-dimension plane CTM matrix and convert DRM CTM to DC CSC float matrix. v3: - rename ctm2 to ctm_3x4 (Harry) Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Alex Deucher commit 3dad69090743c5f4642aeb628b8542a1e335dded Author: Melissa Wen Date: Thu Nov 16 18:58:11 2023 -0100 drm/amd/display: add plane CTM support Map the plane CTM driver-specific property to DC plane, instead of DC stream. The remaining steps to program DPP block are already implemented on DC shared-code. v3: - fix comment about plane and CRTC CTMs priorities (Harry) Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 34dc227bf2f34085313be39d76b12f08bfe8efc0 Author: Kenneth Feng Date: Wed Dec 13 14:58:34 2023 +0800 drm/amd/pm: add power save mode workload for smu 13.0.10 add power save mode workload for smu 13.0.10, so that in compute mode, pmfw will add margin since some applications requres higher margin. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 5f82a0c90ccaf0d1390b5c1b83a83d38bca526da Author: Peyton Lee Date: Tue Dec 12 11:11:24 2023 +0800 drm/amdgpu/vpe: enable vpe dpm enable vpe dpm Signed-off-by: Peyton Lee Reviewed-by: Lang Yu Signed-off-by: Alex Deucher commit b8b92c1bd7788b1f13d547ee2ce8a93baf55b814 Author: Melissa Wen Date: Thu Nov 16 18:58:10 2023 -0100 drm/amd/display: add plane CTM driver-specific property Plane CTM for pre-blending color space conversion. Only enable driver-specific plane CTM property on drivers that support both pre- and post-blending gamut remap matrix, i.e., DCN3+ family. Otherwise it conflits with DRM CRTC CTM property. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit cb19dc4a64598ffbfd4354083f809fae082fa4c3 Author: Joshua Ashton Date: Thu Nov 16 18:58:09 2023 -0100 drm/amd/display: copy 3D LUT settings from crtc state to stream_update When commiting planes, we copy color mgmt resources to the stream state. Do the same for shaper and 3D LUTs. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit a2f2f43f74cd050146cd2660bbc3c7e1e7c0da0b Author: Peyton Lee Date: Tue Dec 12 10:12:33 2023 +0800 drm/amd/pm: support return vpe clock table pm supports return vpe clock table and soc clock table Signed-off-by: Peyton Lee Reviewed-by: Li Ma Signed-off-by: Alex Deucher commit 94aeb4117343d072e3a35b9595bcbfc0058ee724 Author: Wang, Beyond Date: Tue Dec 12 21:03:04 2023 +0800 drm/amdgpu: fix ftrace event amdgpu_bo_move always move on same heap Issue: during evict or validate happened on amdgpu_bo, the 'from' and 'to' is always same in ftrace event of amdgpu_bo_move where calling the 'trace_amdgpu_bo_move', the comment says move_notify is called before move happens, but actually it is called after move happens, here the new_mem is same as bo->resource Fix: move trace_amdgpu_bo_move from move_notify to amdgpu_bo_move Signed-off-by: Wang, Beyond Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f81996637000a050477d597ef99e832079f99bd2 Author: Joshua Ashton Date: Thu Nov 16 18:58:08 2023 -0100 drm/amd/display: allow newer DC hardware to use degamma ROM for PQ/HLG Need to funnel the color caps through to these functions so it can check that the hardware is capable. v2: - remove redundant color caps assignment on plane degamma map (Harry) - pass color caps to degamma params v3: - remove unused color_caps parameter from set_color_properties (Harry) Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 783ed4460fe55b01ff32a7c6ad8239974874a16a Author: Joshua Ashton Date: Thu Nov 16 18:58:07 2023 -0100 drm/amd/display: add plane blend LUT and TF support Map plane blend properties to DPP blend gamma. Plane blend is a post-3D LUT curve that linearizes color space for blending. It may be defined by a user-blob LUT and/or predefined transfer function. As hardcoded curve (ROM) is not supported on blend gamma, we use AMD color module to fill parameters when setting non-linear TF with empty LUT. v2: - rename DRM TFs to AMDGPU TFs Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 8d26795ae61a5f64ba7db4f3240dc9ab2138d361 Author: Joshua Ashton Date: Thu Nov 16 18:58:06 2023 -0100 drm/amd/display: handle empty LUTs in __set_input_tf Unlike degamma, blend gamma doesn't support hardcoded curve (predefined/ROM), but we can use AMD color module to fill blend gamma parameters when we have non-linear plane gamma TF without plane gamma LUT. The regular degamma path doesn't hit this. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 486c95af5d76047d5cb50727270b1961dacb9380 Author: Melissa Wen Date: Thu Nov 16 18:58:05 2023 -0100 drm/amd/display: add plane 3D LUT support Wire up DC 3D LUT to DM plane color management (pre-blending). On AMD display HW, 3D LUT comes after a shaper curve and we always have to program a shaper curve to delinearize or normalize the color space before applying a 3D LUT (since we have a reduced number of LUT entries). In this version, the default values of 3D LUT for size and bit_depth are 17x17x17 and 12-bit, but we already provide here a more generic mechanisms to program other supported values (9x9x9 size and 10-bit). v2: - started with plane 3D LUT instead of CRTC 3D LUT support v4: - lut3d_size is the max dimension size instead of # of entries Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 71479eee9da8ddb53f3ddb91bc8591d90fb8b142 Author: Matthew Maurer Date: Tue Oct 31 20:10:14 2023 +0000 rust: Suppress searching builtin sysroot By default, if Rust is passed `--target=foo` rather than a target.json file, it will infer a default sysroot if that component is installed. As the proposed aarch64 support [1] uses `aarch64-unknown-none` rather than a target.json file, this is needed [2] to prevent rustc from being confused between the custom kernel sysroot and the pre-installed one. [ Miguel: Applied Boqun's extra case (for `rusttest`) and reworded to add links to the arm64 patch series discussion. In addition, fixed the `rustdoc` target too (which requires a conditional since `cmd_rustdoc` is also used for host crates like `macros`). ] Signed-off-by: Matthew Maurer Tested-by: Boqun Feng Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/rust-for-linux/20231020155056.3495121-1-Jamie.Cunliffe@arm.com/ [1] Link: https://lore.kernel.org/rust-for-linux/CAGSQo01pOixiPXkW867h4vPUaAjtKtHGKhkV-rpifJvKxAf4Ww@mail.gmail.com/ [2] Link: https://lore.kernel.org/r/20231031201752.1189213-1-mmaurer@google.com Signed-off-by: Miguel Ojeda commit 88c2e1169f5f0c2ccdd0a001e4447a1b0da2b661 Author: Benno Lossin Date: Thu Oct 26 20:19:33 2023 +0000 rust: macros: improve `#[vtable]` documentation Traits marked with `#[vtable]` need to provide default implementations for optional functions. The C side represents these with `NULL` in the vtable, so the default functions are never actually called. We do not want to replicate the default behavior from C in Rust, because that is not maintainable. Therefore we should use `build_error` in those default implementations. The error message for that is provided at `kernel::error::VTABLE_DEFAULT_ERROR`. Signed-off-by: Benno Lossin Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Andreas Hindborg Reviewed-by: Alice Ryhl Reviewed-by: Finn Behrens Link: https://lore.kernel.org/r/20231026201855.1497680-1-benno.lossin@proton.me [ Wrapped paragraph to 80 as requested and capitalized sentence. ] Signed-off-by: Miguel Ojeda commit 2dc318ea9681c14c37bad2715097df4380a3c547 Author: Trevor Gross Date: Fri Nov 17 20:39:59 2023 -0500 rust: macros: update 'paste!' macro to accept string literals Enable combining identifiers with literals in the 'paste!' macro. This allows combining user-specified strings with affixes to create namespaced identifiers. This sample code: macro_rules! m { ($name:lit) => { paste!(struct [<_some_ $name _struct_>] {}) } } m!("foo_bar"); Would previously cause a compilation error. It will now generate: struct _some_foo_bar_struct_ {} Signed-off-by: Trevor Gross Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Vincenzo Palazzo Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Reviewed-by: Gary Guo Link: https://lore.kernel.org/r/20231118013959.37384-1-tmgross@umich.edu [ Added `:` before example block. ] Signed-off-by: Miguel Ojeda commit 743766565dc0bdeedf7db419500031c7bdc84033 Author: Gary Guo Date: Sat Nov 4 14:56:56 2023 +0000 rust: bindings: rename const binding using sed Currently, for `const`s that bindgen doesn't recognise, we define a helper constant with const BINDINGS_ = ; in `bindings_helper.h` and then we put pub const : = BINDINGS_; in `bindings/lib.rs`. This is fine since we currently only have 3 constants that are defined this way, but is going to be more annoying when more constants are added since every new constant needs to be defined in two places. This patch changes the way we define constant helpers to const RUST_CONST_HELPER_ = ; and then use `sed` to postprocess Rust code generated by bindgen to remove the distinct prefix, so users of the `bindings` crate can refer to the name directly. Reviewed-by: Benno Lossin Reviewed-by: Andreas Hindborg Reviewed-by: Martin Rodriguez Reboredo Signed-off-by: Gary Guo Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231104145700.2495176-1-gary@garyguo.net [ Reworded for typos. ] Signed-off-by: Miguel Ojeda commit 6797e4da2dd1e2c8dc8cec73447c77abe2a7655b Author: Wolfram Sang Date: Sun Nov 5 10:29:08 2023 +0100 PCI: rcar-host: Add support for optional regulators The KingFisher board has regulators for miniPCIe, so enable these optional regulators using devm. devm will automatically disable them when the driver releases the device. Order variables in reverse-xmas while we are here. [kwilczynski: update style to match rest of the code] Link: https://lore.kernel.org/linux-pci/20231105092908.3792-3-wsa+renesas@sang-engineering.com Signed-off-by: Wolfram Sang Signed-off-by: Krzysztof Wilczyński Reviewed-by: Geert Uytterhoeven Acked-by: Manivannan Sadhasivam commit b952f96a57e6fb4528c1d6be19e941c3322f9905 Author: Wolfram Sang Date: Sun Nov 5 10:29:07 2023 +0100 dt-bindings: PCI: rcar-pci-host: Add optional regulators Support regulators found on the KingFisher board for miniPCIe (1.5 and 3.3v). For completeness, describe a 12v regulator while we are here. Link: https://lore.kernel.org/linux-pci/20231105092908.3792-2-wsa+renesas@sang-engineering.com Signed-off-by: Wolfram Sang Signed-off-by: Krzysztof Wilczyński Reviewed-by: Geert Uytterhoeven Acked-by: Krzysztof Kozlowski commit ec215237480478ca5523ea12f58803d9b7a8a0ea Author: Rob Herring Date: Thu Dec 7 10:52:50 2023 -0600 PCI: rcar-gen4: Replace of_device.h with explicit of.h include The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20231207165251.2855783-1-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Krzysztof Wilczyński Reviewed-by: Yoshihiro Shimoda commit 557e5347ba8bb050fec39c488486c4a948f2e4aa Author: Andre Przywara Date: Thu Dec 14 01:53:12 2023 +0000 arm64: dts: allwinner: h618: add Transpeed 8K618-T TV box This is a Chinese TV box, probably very similar if not identical to various other cheap TV boxes with the same specs: - Allwinner H618 SoC (4 * Arm Cortex-A53 cores, 1MB L2 cache) - 2 or 4GiB DDR3L DRAM - 32, 64, or 128 GiB eMMC flash - AXP313a PMIC - 100 Mbit/s Ethernet (using yet unsupported internal PHY) - HDMI port - 2 * USB 2.0 ports - microSD card slot - 3.5mm A/V port - 7-segment display - 5V barrel plug power supply The PCB provides holes for soldering a UART header or cable, this is connected to the debug UART0. UART1 is used for the Bluetooth chip, although this isn't working yet. Signed-off-by: Andre Przywara Acked-by: Jernej Skrabec Link: https://lore.kernel.org/r/20231214015312.17363-4-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit 3094e7282f6bae36520ca2807303adea7ae5ab50 Author: Andre Przywara Date: Thu Dec 14 01:53:11 2023 +0000 dt-bindings: arm: sunxi: document Transpeed 8K618-T board name The Transpeed 8K618-T TV box is a Chinese Android TV box, using the Allwinner H618 SoC. Add the board/SoC compatible string pair to the list of known boards. Signed-off-by: Andre Przywara Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231214015312.17363-3-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit a0b4600c777d6ab74a3c2857026a0a3c3e1f7100 Author: Andre Przywara Date: Thu Dec 14 01:53:10 2023 +0000 dt-bindings: vendor-prefixes: add Transpeed This is a name used by some Chinese TV boxes, add it to the bindings. Signed-off-by: Andre Przywara Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231214015312.17363-2-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit d96f04e05f2634b2dea3cdfc9651f5704d829292 Author: Paul M Stillwell Jr Date: Tue Dec 12 21:07:15 2023 -0800 ice: add documentation for FW logging Add documentation for FW logging in Documentation/networking/device_drivers/ethernet/intel/ice.rst Signed-off-by: Paul M Stillwell Jr Signed-off-by: Tony Nguyen commit 9d3535e71985beb738c4ad2b772c6f0efdce0202 Author: Paul M Stillwell Jr Date: Tue Dec 12 21:07:14 2023 -0800 ice: add ability to read and configure FW log data Once logging is enabled the user should read the data from the 'data' file. The data is in the form of a binary blob that can be sent to Intel for decoding. To read the data use a command like: # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data > log_data.bin If the user wants to clear the FW log data that has been stored in the driver then they can write any value to the 'data' file and that will clear the data. An example is: # echo 34 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/data In addition to being able to read the data the user can configure how much memory is used to store FW log data. This allows the user to increase/decrease the amount of memory based on the users situation. The data is stored such that if the memory fills up then the oldest data will get overwritten in a circular manner. To change the amount of memory the user can write to the 'log_size' file like this: # echo > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/log_size Where is one of 128K, 256K, 512K, 1M, and 2M. The default value is 1M. The user can see the current value of 'log_size' by reading the file: # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/log_size Signed-off-by: Paul M Stillwell Jr Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 73671c3162c83a689342fd57f00b5f261682e49b Author: Paul M Stillwell Jr Date: Tue Dec 12 21:07:13 2023 -0800 ice: enable FW logging Once users have configured the FW logging then allow them to enable it by writing to the 'fwlog/enable' file. The file accepts a boolean value (0 or 1) where 1 means enable FW logging and 0 means disable FW logging. # echo > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/enable Where is 0 or 1. The user can read the 'fwlog/enable' file to see whether logging is enabled or not. Reading the actual data is a separate patch. To see the current value then: # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/enable Signed-off-by: Paul M Stillwell Jr Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 96a9a9341cdaea0c3bce4c134e04a2a42ae899ac Author: Paul M Stillwell Jr Date: Tue Dec 12 21:07:12 2023 -0800 ice: configure FW logging Users want the ability to debug FW issues by retrieving the FW logs from the E8xx devices. Use debugfs to allow the user to configure the log level and number of messages for FW logging. If FW logging is supported on the E8xx then the file 'fwlog' will be created under the PCI device ID for the ice driver. If the file does not exist then either the E8xx doesn't support FW logging or debugfs is not enabled on the system. One thing users want to do is control which events are reported. The user can read and write the 'fwlog/modules/' to get/set the log levels. Each module in the FW that supports logging ht as a file under 'fwlog/modules' that supports reading (to see what the current log level is) and writing (to change the log level). The format to set the log levels for a module are: # echo > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules/ The supported log levels are: * none * error * warning * normal * verbose Each level includes the messages from the previous/lower level The modules that are supported are: * general * ctrl * link * link_topo * dnl * i2c * sdp * mdio * adminq * hdma * lldp * dcbx * dcb * xlr * nvm * auth * vpd * iosf * parser * sw * scheduler * txq * rsvd * post * watchdog * task_dispatch * mng * synce * health * tsdrv * pfreg * mdlver * all The module 'all' is a special module which allows the user to read or write to all of the modules. The following example command would set the DCB module to the 'normal' log level: # echo normal > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules/dcb If the user wants to set the DCB, Link, and the AdminQ modules to 'verbose' then the commands are: # echo verbose > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules/dcb # echo verbose > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules/link # echo verbose > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules/adminq If the user wants to set all modules to the 'warning' level then the command is: # echo warning > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules/all If the user wants to disable logging for a module then they can set the level to 'none'. An example setting the 'watchdog' module is: # echo none > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules/watchdog If the user wants to see what the log level is for a specific module then the command is: # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules/dcb This will return the log level for the DCB module. If the user wants to see the log level for all the modules then the command is: # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/modules/all Writing to the module file will update the configuration, but NOT enable the configuration (that is a separate command). In addition to configuring the modules, the user can also configure the number of log messages (nr_messages) to include in a single Admin Receive Queue (ARQ) event.The range is 1-128 (1 means push every log message, 128 means push only when the max AQ command buffer is full). The suggested value is 10. To see/change the resolution the user can read/write the 'fwlog/nr_messages' file. An example changing the value to 50 is # echo 50 > /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/nr_messages To see the current value of 'nr_messages' then the command is: # cat /sys/kernel/debug/ice/0000\:18\:00.0/fwlog/nr_messages Signed-off-by: Paul M Stillwell Jr Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 8d2517aaeea3ab8651bb517bca8f3c8664d318ea Author: Gao Xiang Date: Wed Dec 6 17:10:55 2023 +0800 erofs: fix up compacted indexes for block size < 4096 Previously, the block size always equaled to PAGE_SIZE, therefore `lclusterbits` couldn't be less than 12. Since sub-page compressed blocks are now considered, `lobits` for a lcluster in each pack cannot always be `lclusterbits` as before. Otherwise, there is no enough room for the special value `Z_EROFS_LI_D0_CBLKCNT`. To support smaller block sizes, `lobits` for each compacted lcluster is now calculated as: lobits = max(lclusterbits, ilog2(Z_EROFS_LI_D0_CBLKCNT) + 1) Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231206091057.87027-4-hsiangkao@linux.alibaba.com commit 54ed3fdd66055d073cb1cd2c6c65bbc0683c40cf Author: Gao Xiang Date: Wed Dec 6 17:10:54 2023 +0800 erofs: record `pclustersize` in bytes instead of pages Currently, compressed sizes are recorded in pages using `pclusterpages`, However, for tailpacking pclusters, `tailpacking_size` is used instead. This approach doesn't work when dealing with sub-page blocks. To address this, let's switch them to the unified `pclustersize` in bytes. Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231206091057.87027-3-hsiangkao@linux.alibaba.com commit 192351616a9dde686492bcb9d1e4895a1411a527 Author: Gao Xiang Date: Wed Dec 6 17:10:53 2023 +0800 erofs: support I/O submission for sub-page compressed blocks Add a basic I/O submission path first to support sub-page blocks: - Temporary short-lived pages will be used entirely; - In-place I/O pages can be used partially, but compressed pages need to be able to be mapped in contiguous virtual memory. As a start, currently cache decompression is explicitly disabled for sub-page blocks, which will be supported in the future. Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231206091057.87027-2-hsiangkao@linux.alibaba.com commit 1953fc720e603721764f31daae216a2851664167 Author: Paul M Stillwell Jr Date: Tue Dec 12 21:07:11 2023 -0800 ice: remove FW logging code The FW logging code doesn't work because there is no way to set cq_ena or uart_ena so remove the code. This code is the original (v1) way of FW logging so it should be replaced with the v2 way. Signed-off-by: Paul M Stillwell Jr Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit f19d1e3b17acc8173cd83b189f4c9506889b1c49 Author: Bart Van Assche Date: Wed Dec 13 11:47:02 2023 -0800 block: Use pr_info() instead of printk(KERN_INFO ...) Switch to the modern style of printing kernel messages. Use %u instead of %d to print unsigned integers. Reviewed-by: Luis Chamberlain Cc: Christoph Hellwig Cc: Ming Lei Cc: Keith Busch Signed-off-by: Bart Van Assche Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20231213194702.90381-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 4fb98bed8ae61c6cb44dec9b0d4f03c1628e320a Author: Patrick Delaunay Date: Fri Nov 17 15:33:37 2023 +0100 arm64: dts: st: add bsec support to stm32mp25 Add BSEC support to STM32MP25 SoC family with SoC information: - RPN = Device part number (BSEC_OTP_DATA9) - PKG = package data register (Bits 2:0 of BSEC_OTP_DATA122) Signed-off-by: Patrick Delaunay Signed-off-by: Alexandre Torgue commit 3c12466b6b7bf1e56f9b32c366a3d83d87afb4de Author: Gao Xiang Date: Wed Dec 6 12:55:34 2023 +0800 erofs: fix lz4 inplace decompression Currently EROFS can map another compressed buffer for inplace decompression, that was used to handle the cases that some pages of compressed data are actually not in-place I/O. However, like most simple LZ77 algorithms, LZ4 expects the compressed data is arranged at the end of the decompressed buffer and it explicitly uses memmove() to handle overlapping: __________________________________________________________ |_ direction of decompression --> ____ |_ compressed data _| Although EROFS arranges compressed data like this, it typically maps two individual virtual buffers so the relative order is uncertain. Previously, it was hardly observed since LZ4 only uses memmove() for short overlapped literals and x86/arm64 memmove implementations seem to completely cover it up and they don't have this issue. Juhyung reported that EROFS data corruption can be found on a new Intel x86 processor. After some analysis, it seems that recent x86 processors with the new FSRM feature expose this issue with "rep movsb". Let's strictly use the decompressed buffer for lz4 inplace decompression for now. Later, as an useful improvement, we could try to tie up these two buffers together in the correct order. Reported-and-tested-by: Juhyung Park Closes: https://lore.kernel.org/r/CAD14+f2AVKf8Fa2OO1aAUdDNTDsVzzR6ctU_oJSmTyd6zSYR2Q@mail.gmail.com Fixes: 0ffd71bcc3a0 ("staging: erofs: introduce LZ4 decompression inplace") Fixes: 598162d05080 ("erofs: support decompress big pcluster for lz4 backend") Cc: stable # 5.4+ Tested-by: Yifan Zhao Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231206045534.3920847-1-hsiangkao@linux.alibaba.com commit 93d6fda7f926451a0fa1121b9558d75ca47e861e Author: Gao Xiang Date: Wed Nov 29 02:04:31 2023 +0800 erofs: fix memory leak on short-lived bounced pages Both MicroLZMA and DEFLATE algorithms can use short-lived pages on demand for the overlapped inplace I/O decompression. However, those short-lived pages are actually added to `be->compressed_pages`. Thus, it should be checked instead of `pcl->compressed_bvecs`. The LZ4 algorithm doesn't work like this, so it won't be impacted. Fixes: 67139e36d970 ("erofs: introduce `z_erofs_parse_in_bvecs'") Reviewed-by: Yue Hu Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Link: https://lore.kernel.org/r/20231128180431.4116991-1-hsiangkao@linux.alibaba.com commit caa3415f34ce24b6d4e3f5f9d12cb0e96f6919cd Author: Uwe Kleine-König Date: Wed Dec 6 09:31:43 2023 +0100 ARM: dts: stm32: Consolidate usbh_[eo]hci phy properties on stm32mp15 All machines making use of &usbh_ehci and/or &usbh_ohci use phys = <&usbphyc_port0>; So move this setting into the .dtsi. Also add phy-names = "usb"; which isn't used by all machines, but nice for consistency. Signed-off-by: Uwe Kleine-König Signed-off-by: Alexandre Torgue commit 665d3e0af4d35acf9a5f58dfd471bc27dbf55880 Author: Baokun Li Date: Mon Oct 23 09:30:57 2023 +0800 ext4: reduce unnecessary memory allocation in alloc_flex_gd() When a large flex_bg file system is resized, the number of groups to be added may be small, and a large amount of memory that will not be used will be allocated. Therefore, resize_bg can be set to the size after the number of new_group_data to be used is aligned upwards to the power of 2. This does not affect the disk layout after online resize and saves some memory. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231023013057.2117948-5-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 5d1935ac02ca5aee364a449a35e2977ea84509b0 Author: Baokun Li Date: Mon Oct 23 09:30:56 2023 +0800 ext4: avoid online resizing failures due to oversized flex bg When we online resize an ext4 filesystem with a oversized flexbg_size, mkfs.ext4 -F -G 67108864 $dev -b 4096 100M mount $dev $dir resize2fs $dev 16G the following WARN_ON is triggered: ================================================================== WARNING: CPU: 0 PID: 427 at mm/page_alloc.c:4402 __alloc_pages+0x411/0x550 Modules linked in: sg(E) CPU: 0 PID: 427 Comm: resize2fs Tainted: G E 6.6.0-rc5+ #314 RIP: 0010:__alloc_pages+0x411/0x550 Call Trace: __kmalloc_large_node+0xa2/0x200 __kmalloc+0x16e/0x290 ext4_resize_fs+0x481/0xd80 __ext4_ioctl+0x1616/0x1d90 ext4_ioctl+0x12/0x20 __x64_sys_ioctl+0xf0/0x150 do_syscall_64+0x3b/0x90 ================================================================== This is because flexbg_size is too large and the size of the new_group_data array to be allocated exceeds MAX_ORDER. Currently, the minimum value of MAX_ORDER is 8, the minimum value of PAGE_SIZE is 4096, the corresponding maximum number of groups that can be allocated is: (PAGE_SIZE << MAX_ORDER) / sizeof(struct ext4_new_group_data) ≈ 21845 And the value that is down-aligned to the power of 2 is 16384. Therefore, this value is defined as MAX_RESIZE_BG, and the number of groups added each time does not exceed this value during resizing, and is added multiple times to complete the online resizing. The difference is that the metadata in a flex_bg may be more dispersed. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231023013057.2117948-4-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit b099eb87de105cf07cad731ded6fb40b2675108b Author: Baokun Li Date: Mon Oct 23 09:30:55 2023 +0800 ext4: remove unnecessary check from alloc_flex_gd() In commit 967ac8af4475 ("ext4: fix potential integer overflow in alloc_flex_gd()"), an overflow check is added to alloc_flex_gd() to prevent the allocated memory from being smaller than expected due to the overflow. However, after kmalloc() is replaced with kmalloc_array() in commit 6da2ec56059c ("treewide: kmalloc() -> kmalloc_array()"), the kmalloc_array() function has an overflow check, so the above problem will not occur. Therefore, the extra check is removed. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231023013057.2117948-3-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit 658a52344fb139f9531e7543a6e0015b630feb38 Author: Baokun Li Date: Mon Oct 23 09:30:54 2023 +0800 ext4: unify the type of flexbg_size to unsigned int The maximum value of flexbg_size is 2^31, but the maximum value of int is (2^31 - 1), so overflow may occur when the type of flexbg_size is declared as int. For example, when uninit_mask is initialized in ext4_alloc_group_tables(), if flexbg_size == 2^31, the initialized uninit_mask is incorrect, and this may causes set_flexbg_block_bitmap() to trigger a BUG_ON(). Therefore, the flexbg_size type is declared as unsigned int to avoid overflow and memory waste. Signed-off-by: Baokun Li Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20231023013057.2117948-2-libaokun1@huawei.com Signed-off-by: Theodore Ts'o commit a7d84a2e7663bbe12394cc771107e04668ea313a Author: Miquel Raynal Date: Tue Dec 5 08:59:36 2023 +0100 mtd: maps: vmu-flash: Fix the (mtd core) switch to ref counters While switching to ref counters for track mtd devices use, the vmu-flash driver was forgotten. The reason for reading the ref counter seems debatable, but let's just fix the build for now. Fixes: 19bfa9ebebb5 ("mtd: use refcount to prevent corruption") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312022315.79twVRZw-lkp@intel.com/ Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231205075936.13831-1-miquel.raynal@bootlin.com commit b511e8e05b32d028d8369af3e369c924f98323ec Author: Miquel Raynal Date: Tue Dec 5 08:54:31 2023 +0100 mtd: ssfdc: Remove an unused variable Since its introduction the driver was declaring a "usecount" variable, but nobody ever used it upstream. This was spot while grepping for usecount through mtd/ for other reasons. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231205075431.13401-1-miquel.raynal@bootlin.com commit 2b8aa4c3e6a5d41b10b53da2017852f647d0345b Author: Dinghao Liu Date: Thu Dec 14 15:29:43 2023 +0800 mtd: rawnand: diskonchip: fix a potential double free in doc_probe When nand_scan() fails, it has cleaned up related resources in its error paths. Therefore, the following nand_cleanup() may lead to a double-free. One possible trace is: doc_probe |-> nand_scan | |-> nand_scan_with_ids | |-> nand_scan_tail | |-> kfree(chip->data_buf) [First free] | |-> nand_cleanup |-> kfree(chip->data_buf) [Double free here] Fix this by removing nand_cleanup() on failure of nand_scan(). Signed-off-by: Dinghao Liu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231214072946.10285-1-dinghao.liu@zju.edu.cn commit b6c985dd9a2d5902e413c2e9ba5a770fbca12322 Author: Miquel Raynal Date: Mon Dec 11 16:07:04 2023 +0100 mtd: rawnand: rockchip: Add missing title to a kernel doc comment All fields of the nfc_cfg structure are documented but the name, which leads to a W=1 warning. Add a title. Fixes: 058e0e847d54 ("mtd: rawnand: rockchip: NFC driver for RK3308, RK2928 and others") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231211150704.109138-2-miquel.raynal@bootlin.com commit 2ca8718be0c469a99435f6330904364f8dc5a094 Author: Miquel Raynal Date: Mon Dec 11 16:07:03 2023 +0100 mtd: rawnand: rockchip: Rename a structure Robots are unhappy with the ecc_cnt_status structure because the kernel doc says it should be called rk_ecc_cnt_status. In general, it is considered a better practice to prefix all symbols in a file with the same prexif, and thus it seems more relevant to rename the structure rather than changing the kernel doc header. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312102130.geZ4dqyN-lkp@intel.com/ Fixes: 058e0e847d54 ("mtd: rawnand: rockchip: NFC driver for RK3308, RK2928 and others") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231211150704.109138-1-miquel.raynal@bootlin.com commit 199d1402229f26804c81508346b57a0e9c094bb6 Author: Miquel Raynal Date: Mon Dec 11 16:05:24 2023 +0100 mtd: rawnand: pl353: Fix kernel doc Both the "chip" kernel doc member and description are wrong. This field is called "chips" and describes the list of NAND chips connected to the controller. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312102130.geZ4dqyN-lkp@intel.com/ Fixes: 08d8c62164a3 ("mtd: rawnand: pl353: Add support for the ARM PL353 SMC NAND controller") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231211150524.108803-1-miquel.raynal@bootlin.com commit 04d25ccea2b3199269b7e500da33023b51418fde Author: Randy Dunlap Date: Tue Dec 12 20:37:35 2023 -0800 net, xdp: Correct grammar Use the correct verb form in 2 places in the XDP rx-queue comment. Signed-off-by: Randy Dunlap Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20231213043735.30208-1-rdunlap@infradead.org commit bfc3c6743de0ecb169026c36cbdbc0d12d22a528 Author: Ahmad Fatoum Date: Wed Nov 22 19:52:34 2023 +0100 ARM: dts: stm32: don't mix SCMI and non-SCMI board compatibles The binding erroneously decreed that the SCMI variants of the ST evaluation kits are compatible with the non-SCMI variants. This is not correct, as a kernel or bootloader compatible with the non-SCMI variant is not necessarily able to function, when direct access to resources is replaced by having to talk SCMI to the secure monitor. The binding has been adjusted to reflect thus, so synchronize the device trees now. Fixes: 5b7e58313a77 ("ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)") Signed-off-by: Ahmad Fatoum Signed-off-by: Alexandre Torgue commit a55383dec6056928dc06ff9acd88f4f974dd1f9b Author: Ahmad Fatoum Date: Wed Nov 22 19:52:33 2023 +0100 dt-bindings: arm: stm32: don't mix SCMI and non-SCMI board compatibles SCMI-enabled boards may restrict access to resources like clocks, resets and regulators to the secure world. A normal world bootloader or kernel compatible with the non-SCMI-enabled board is thus not guaranteed to be able to deal with the SCMI variant. It follows, that the SCMI-enabled board is not compatible with the non-SCMI enabled board, so drop that compatible. This change is motivated by the barebox' bootloader's use of bootloader specification files[1][2]: barebox for non-SCMI DK2 will compare its own top-level "stm32mp157c-dk2" compatible with all compatibles listed in the device tree referenced by each bootloader spec file. If the boot medium contains a configuration with compatible = "st,stm32mp157c-dk2-scmi", "st,stm32mp157c-dk2", "st,stm32mp157"; it will match, because of the second compatible and boot a kernel with SCMI enabled, although no SCMI may exist on the platform. [1]: https://uapi-group.org/specifications/specs/boot_loader_specification/ [2]: https://www.barebox.org/doc/latest/user/booting-linux.html#boot-loader-specification Fixes: 8e14ebb1f08f ("dt-bindings: arm: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)") Signed-off-by: Ahmad Fatoum Acked-by: Rob Herring Signed-off-by: Alexandre Torgue commit 5bd3cf8cbc8a286308ef3f40656659d5abc89995 Author: Miklos Szeredi Date: Wed Dec 13 17:11:03 2023 +0100 add selftest for statmount/listmount Initial selftest for the new statmount() and listmount() syscalls. Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20231213161104.403171-1-mszeredi@redhat.com Signed-off-by: Christian Brauner commit 2e1d6a04116c373fbd25beddba4267178535bc60 Author: Tushar Vyavahare Date: Thu Dec 14 13:00:07 2023 +0000 selftests/xsk: Fix for SEND_RECEIVE_UNALIGNED test Fix test broken by shared umem test and framework enhancement commit. Correct the current implementation of pkt_stream_replace_half() by ensuring that nb_valid_entries are not set to half, as this is not true for all the tests. Ensure that the expected value for valid_entries for the SEND_RECEIVE_UNALIGNED test equals the total number of packets sent, which is 4096. Create a new function called pkt_stream_pkt_set() that allows for packet modification to meet specific requirements while ensuring the accurate maintenance of the valid packet count to prevent inconsistencies in packet tracking. Fixes: 6d198a89c004 ("selftests/xsk: Add a test for shared umem feature") Reported-by: Maciej Fijalkowski Signed-off-by: Tushar Vyavahare Signed-off-by: Daniel Borkmann Reviewed-by: Maciej Fijalkowski Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20231214130007.33281-1-tushar.vyavahare@intel.com commit de4ec11145c252e38c48d1694f419914606b3c16 Author: Krzysztof Kozlowski Date: Mon Nov 27 10:34:20 2023 +0100 ARM: dts: stm32: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Torgue commit 1b666016d0ad4a879dcd3d9188635ad68c4b16ce Author: Stefan Eichenberger Date: Tue Dec 12 15:12:00 2023 +0100 net: mvpp2: add support for mii Currently, mvpp2 only supports RGMII. This commit adds support for MII. The description in Marvell's functional specification seems to be wrong. To enable MII, we need to set GENCONF_CTRL0_PORT3_RGMII, while for RGMII we need to clear it. This is also how U-Boot handles it. Signed-off-by: Stefan Eichenberger Reviewed-by: Maxime Chevallier Reviewed-by: Marcin Wojtas Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20231212141200.62579-1-eichest@gmail.com Signed-off-by: Paolo Abeni commit 73b5ab27ab2ee616f2709dc212c2b0007894a12e Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:46 2023 +0800 drm/mediatek: Fix underrun in VDO1 when switches off the layer Do not reset Merge while using CMDQ because reset API doesn't wait for frame done event as CMDQ does and could lead to underrun when the layer is switching off. Fixes: aaf94f7c3ae6 ("drm/mediatek: Add display merge async reset control") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-23-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 8ac6935e5689a491f0bec78fec732722b3dad094 Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:45 2023 +0800 drm/mediatek: Remove the redundant driver data for DPI DPI input is in 1T2P mode on both MT8195 and MT8188. Remove the redundant driver data to align the settings, or the screen will glitch. Fixes: 2847cd7e6403 ("drm/mediatek: Add mt8188 dpi compatibles and platform data") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-22-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 21b287146adf39304193e4c49198021e06a28ded Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:44 2023 +0800 drm/mediatek: Return error if MDP RDMA failed to enable the clock Return the result of clk_prepare_enable() instead of always returns 0. Fixes: f8946e2b6bb2 ("drm/mediatek: Add display MDP RDMA support for MT8195") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-21-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit ba527e9a11b33cc7315171807add5b2f594b23ac Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:42 2023 +0800 drm/mediatek: Support MT8188 Padding in display driver Padding is a new display module on MT8188, it provides ability to add pixels to width and height of a layer with specified colors. Due to hardware design, Mixer in VDOSYS1 requires width of a layer to be 2-pixel-align, or 4-pixel-align when ETHDR is enabled, we need Padding to deal with odd width. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-19-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 1168bb692bb9c45a31deda73cc3c87d368c7f490 Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:41 2023 +0800 drm/mediatek: Refine device table of OVL adaptor - Adjust indentation to align with other files - Sort device table in alphabetical order - Add sentinel to device table Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-18-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 9c5a05fc8fca2d3be919f92816fc8d11ebdfd7be Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:40 2023 +0800 drm/mediatek: Sort OVL adaptor components Sort OVL adaptor components' names in alphabetical order. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-17-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit c90ca391c1e4b7fca1648e5015a57e39080e7ab3 Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:39 2023 +0800 drm/mediatek: Start/Stop components with function pointers By registering component related functions to the pointers, we can easily manage them within a for-loop and simplify the logic of component start/stop process. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-16-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit b97fa2f3e19b9bbac934a2cfa9218aa67f12240e Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:38 2023 +0800 drm/mediatek: Power on/off devices with function pointers Different from OVL, OVL adaptor is a pseudo device so we didn't define it in the device tree, consequently, pm_runtime_resume_and_get() called by .atomic_enable() powers on no device. For this reason, we implement a function to power on the RDMAs in OVL adaptor, and the system will make sure the IOMMUs are powered on as well because of the device link (iommus) in the RDMA nodes in DTS. This patch separates power and clock management process, it would be easier to maintain and add extensions. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-15-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 7bacaee4f5d0fdf00b1734c1be67cc415b3822c0 Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:37 2023 +0800 drm/mediatek: Manage component's clock with function pointers By registering component related functions to the pointers, we can easily manage them within a for-loop and simplify the logic of clock control significantly. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-14-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 3453c2b1d17784722b4b965b63a0b4a5a985006f Merge: 2cc14f52aeb78 1343121f08e6d Author: Joerg Roedel Date: Thu Dec 14 15:32:01 2023 +0100 Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu Arm SMMU updates for 6.8 - Device-tree binding updates: * Add additional compatible strings for Qualcomm SoCs * Document Adreno clocks for Qualcomm's SM8350 SoC - SMMUv2: * Implement support for the ->domain_alloc_paging() callback * Ensure Secure context is restored following suspend of Qualcomm SMMU implementation - SMMUv3: * Disable stalling mode for the "quiet" context descriptor * Minor refactoring and driver cleanups commit 8daf02f03ca4cf70b1f985293b8515252f9767aa Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:36 2023 +0800 drm/mediatek: Add component ID to component match structure Add component ID to component match structure so we can configure them with a for-loop. The main reason we do such code refactoring is that there is a new hardware component called "Padding" since MT8188, while MT8195 doesn't have this module, we can't use the original logic to manage the components. While MT8195 does not define Padding in the device tree, the corresponding components will be NULL and being skipped by the functions. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-13-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit a7430e2bf950394cc44b523184338b092dc6aef6 Author: Hsiao Chien Sung Date: Thu Dec 14 13:58:35 2023 +0800 drm/mediatek: Rename OVL_ADAPTOR_TYPE_RDMA Rename OVL_ADAPTOR_TYPE_RDMA to OVL_ADAPTOR_TYPE_MDP_RDMA to align the naming rule of mtk_ovl_adaptor_comp_id. Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231214055847.4936-12-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit cd48f7419ad1cece97f735e5234a133be1716480 Merge: a142ae76e1e11 2544631faa7f3 Author: Mark Brown Date: Thu Dec 14 14:17:59 2023 +0000 Add pm8010 RPMH regulators for sm8550 boards Merge series from Fenglin Wu : There are 2 PM8010 PMICs present in sm8550-mtp/sm8550-qrd boards and each of them exposes 7 LDOs. Add RPMH regulator support for them. Signed-off-by: Fenglin Wu --- Changes in v2: - Updated subject prefix in the dt-binding commit and fixed the typo. - Separate the DTS commit with board name prefixes. - Link to v1: https://lore.kernel.org/r/20231211-pm8010-regulator-v1-0-571e05fb4ecc@quicinc.com --- Fenglin Wu (5): regulator: qcom-rpmh: extend to support multiple linear voltage ranges regulator: dt-bindings: qcom,rpmh: add compatible for pm8010 regulator: qcom-rpmh: add support for pm8010 regulators arm64: dts: qcom: sm8550-mtp: Add pm8010 regulators arm64: dts: qcom: sm8550-qrd: add PM8010 regulators .../bindings/regulator/qcom,rpmh-regulator.yaml | 14 ++ arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 120 ++++++++++++++ arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 120 ++++++++++++++ drivers/regulator/qcom-rpmh-regulator.c | 177 ++++++++++++++++++--- 4 files changed, 405 insertions(+), 26 deletions(-) --- base-commit: 753e4d5c433da57da75dd4c3e1aececc8e874a62 change-id: 20231205-pm8010-regulator-0348cb19087a Best regards, -- Fenglin Wu commit cc6bbfe84f30fa9c70327c6a098e709f3f876a6d Author: Randy Dunlap Date: Tue Dec 12 21:48:09 2023 -0800 wifi: mac80211: sta_info.c: fix sentence grammar Correct run-on sentences by changing "," to ";". Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Link: https://msgid.link/20231213054809.23475-1-rdunlap@infradead.org Signed-off-by: Johannes Berg commit cd336152856a383d811fe76bd4db43b87e2e003e Author: Randy Dunlap Date: Tue Dec 12 21:48:00 2023 -0800 wifi: mac80211: rx.c: fix sentence grammar Correct a run-on sentence by changing "," to ";". Add a subject in one sentence. Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Link: https://msgid.link/20231213054800.22561-1-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 074b3cf442c518631f4b6d11d7fdfe143e17e955 Author: Randy Dunlap Date: Tue Dec 12 20:43:15 2023 -0800 wifi: nl80211: fix grammar & spellos Correct spelling as reported by codespell. Correct run-on sentences and other grammar issues. Add hyphenation of adjectives. Correct some punctuation. Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: linux-wireless@vger.kernel.org Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Link: https://msgid.link/20231213044315.19459-1-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 05b234565e02ec51df75ec48eb7370e64ed05e04 Author: Randy Dunlap Date: Tue Dec 12 20:35:58 2023 -0800 wifi: cfg80211: fix spelling & punctutation Correct spelling and run-on sentences. Signed-off-by: Randy Dunlap Cc: Johannes Berg Cc: linux-wireless@vger.kernel.org Cc: Kalle Valo Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Link: https://msgid.link/20231213043558.10409-1-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 02d4e62ae2452c83e4a3e279b8e4cb4dcbad4b31 Author: Arnd Bergmann Date: Wed Dec 13 12:23:07 2023 +0100 media: i2c: mt9m114: use fsleep() in place of udelay() With clang-16, building without COMMON_CLK triggers a range check on udelay() because of a constant division-by-zero calculation: ld.lld: error: undefined symbol: __bad_udelay >>> referenced by mt9m114.c >>> drivers/media/i2c/mt9m114.o:(mt9m114_power_on) in archive vmlinux.a In this configuration, the driver already fails to probe, before this function gets called, so it's enough to suppress the assertion. Do this by using fsleep(), which turns long delays into sleep() calls in place of the link failure. This is probably a good idea regardless to avoid overly long dynamic udelay() calls on a slow clock. Cc: Sakari Ailus Fixes: 24d756e914fc ("media: i2c: Add driver for onsemi MT9M114 camera sensor") Signed-off-by: Arnd Bergmann Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit bf6b980f6caf0ba8404a4bc4b4c419fff36a342b Author: Johannes Berg Date: Thu Dec 14 12:03:49 2023 +0100 wifi: cfg80211: sort certificates in build The build can become unreproducible if the list of files found by $(wildcard ...) differs. Sort the list to avoid this. Signed-off-by: Johannes Berg commit 2544631faa7f3244c9bcb9b511ca4f1a4f5a3ba0 Author: Fenglin Wu Date: Thu Dec 14 10:59:13 2023 +0800 regulator: qcom-rpmh: add support for pm8010 regulators Add RPMH regulators exposed by Qualcomm Technologies, Inc. PM8010 PMIC. It has 7 LDOs with 3 different types, LDO1 - LDO2 are L502 NMOS LDOs, LDO5 and LDO7 are L502 PMOS LDOs, LDO3/LDO4/LDO6 are L502 PMOS LDO for low noise applications. Also, LDO3 - LDO7 don't support LPM. Suggested-by: David Collins Reviewed-by: David Collins Signed-off-by: Fenglin Wu Link: https://msgid.link/r/20231214-pm8010-regulator-v2-3-82131df6b97b@quicinc.com Signed-off-by: Mark Brown commit 638baabe951eb16607b7e4bb197998562afd57a6 Author: Fenglin Wu Date: Thu Dec 14 10:59:12 2023 +0800 regulator: dt-bindings: qcom,rpmh: add compatible for pm8010 Add compatible for PM8010 RPMH regulators present on sm8550-qrd and sm8550-mtp boards. Suggested-by: David Collins Reviewed-by: Krzysztof Kozlowski Signed-off-by: Fenglin Wu Link: https://msgid.link/r/20231214-pm8010-regulator-v2-2-82131df6b97b@quicinc.com Signed-off-by: Mark Brown commit 27591ea2f7751223e79fa41f11bf687777a38399 Author: Fenglin Wu Date: Thu Dec 14 10:59:11 2023 +0800 regulator: qcom-rpmh: extend to support multiple linear voltage ranges Update rpmh_vreg_hw_data to support multiple linear voltage ranges for potential regulators which have discrete voltage program ranges. Suggested-by: David Collins Reviewed-by: David Collins Signed-off-by: Fenglin Wu Link: https://msgid.link/r/20231214-pm8010-regulator-v2-1-82131df6b97b@quicinc.com Signed-off-by: Mark Brown commit af29e51bee8223d8b26e574489d2433b88cdeb2f Author: Daniel Baluta Date: Tue Nov 28 10:11:19 2023 +0200 ASoC: dt-bindings: audio-graph-port: Document new DAI link flags playback-only/capture-only Document new playback-only and capture-only flags which can be used when dai link can only support just one direction: playback or capture but not both. Signed-off-by: Daniel Baluta Link: https://msgid.link/r/20231128081119.106360-3-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit d29351e8c20d61a852bbdfcab7bb7166bd916558 Author: Daniel Baluta Date: Tue Nov 28 10:11:18 2023 +0200 ASoC: audio-graph-card2: Introduce playback-only/capture-only DAI link flags We need this to support MICFIL PDM found on i.MX8MP where the DAI link supports only capture direction. Signed-off-by: Daniel Baluta Link: https://msgid.link/r/20231128081119.106360-2-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 35e27a5744131996061e6e323f1bcb4c827ae867 Author: Christian Brauner Date: Wed Nov 29 12:27:15 2023 +0100 fs: keep struct mnt_id_req extensible Make it extensible so that we have the liberty to reuse it in future mount-id based apis. Treat zero size as the first published struct. Signed-off-by: Christian Brauner commit d8b0f5465012538cc4bb10ddc4affadbab73465b Author: Miklos Szeredi Date: Wed Oct 25 16:02:04 2023 +0200 wire up syscalls for statmount/listmount Wire up all archs. Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20231025140205.3586473-7-mszeredi@redhat.com Reviewed-by: Ian Kent Signed-off-by: Christian Brauner commit b4c2bea8ceaa50cd42a8f73667389d801a3ecf2d Author: Miklos Szeredi Date: Wed Oct 25 16:02:03 2023 +0200 add listmount(2) syscall Add way to query the children of a particular mount. This is a more flexible way to iterate the mount tree than having to parse /proc/self/mountinfo. Lookup the mount by the new 64bit mount ID. If a mount needs to be queried based on path, then statx(2) can be used to first query the mount ID belonging to the path. Return an array of new (64bit) mount ID's. Without privileges only mounts are listed which are reachable from the task's root. Folded into this patch are several later improvements. Keeping them separate would make the history pointlessly confusing: * Recursive listing of mounts is the default now (cf. [1]). * Remove explicit LISTMOUNT_UNREACHABLE flag (cf. [1]) and fail if mount is unreachable from current root. This also makes permission checking consistent with statmount() (cf. [3]). * Start listing mounts in unique mount ID order (cf. [2]) to allow continuing listmount() from a midpoint. * Allow to continue listmount(). The @request_mask parameter is renamed and to @param to be usable by both statmount() and listmount(). If @param is set to a mount id then listmount() will continue listing mounts from that id on. This allows listing mounts in multiple listmount invocations without having to resize the buffer. If @param is zero then the listing starts from the beginning (cf. [4]). * Don't return EOVERFLOW, instead return the buffer size which allows to detect a full buffer as well (cf. [4]). Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20231025140205.3586473-6-mszeredi@redhat.com Reviewed-by: Ian Kent Link: https://lore.kernel.org/r/20231128160337.29094-2-mszeredi@redhat.com [1] (folded) Link: https://lore.kernel.org/r/20231128160337.29094-3-mszeredi@redhat.com [2] (folded) Link: https://lore.kernel.org/r/20231128160337.29094-4-mszeredi@redhat.com [3] (folded) Link: https://lore.kernel.org/r/20231128160337.29094-5-mszeredi@redhat.com [4] (folded) [Christian Brauner : various smaller fixes] Signed-off-by: Christian Brauner commit 68385d77c05b401f748acecc0e0a8eff10489334 Author: Christian Brauner Date: Sun Nov 19 20:58:49 2023 +0100 statmount: simplify string option retrieval The previous code was a bit too clever for what we currently support. A few minor changes: * Avoid indirect function calls and use a simple switch statement. We really only have three cases to handle so it's not like it's massively complex. We can switch to something more elaborate should we introduce more complex options. * Defer all copy_to_user() calls until after we've given up namespace semaphore. On kernels with userfaultfd it's possible to abuse copy_from/to_user() calls to indefinitely block on page faults. That's usually a privileged operation but may be made available to unprivileged users. Independent of userfaultfd it's better to not do all the copy_to_user() work while holding namespace semaphore. Instead collect the information and then copy it out after we've given up all locks. * This also folds a change from Arnd to reduce the stack size in prepare_kstatmount() to avoid warning such as: fs/namespace.c:4995:1: error: stack frame size (1536) exceeds limit (1024) in '__se_sys_statmount' [-Werror,-Wframe-larger-than] 4995 | SYSCALL_DEFINE4(statmount, const struct mnt_id_req __user *, req, Reviewed-by: Ian Kent Link: https://lore.kernel.org/r/20231213090015.518044-1-arnd@kernel.org Signed-off-by: Christian Brauner commit ed289b98c2aeb35f1d4198933315a9c5c30e961a Merge: 704af3a40747e 58e82a62669da Author: Hans de Goede Date: Thu Dec 14 10:33:40 2023 +0100 Merge tag 'platform-drivers-x86-amd-wbrf-v6.8-1' into review-hans Immutable branch between pdx86 amd wbrf branch and wifi / amdgpu due for the v6.8 merge window platform-drivers-x86-amd-wbrf-v6.8-1: v6.7-rc1 + AMD WBRF support for merging into the wifi subsys and amdgpu driver for 6.8. commit afa5cf3175a22b719a65fc0b13dbf78196a60869 Author: Randy Dunlap Date: Tue Dec 12 20:40:14 2023 -0800 drm/i915/uapi: fix typos/spellos and punctuation Use "its" for possessive form instead of "it's". Hyphenate multi-word adjectives. Correct some spelling. End one line of code with ';' instead of ','. The before and after object files are identical. Signed-off-by: Randy Dunlap Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231213044014.21410-1-rdunlap@infradead.org commit 6b9f29b81b155af023da95f560f738f29722b306 Author: Alexandre Ghiti Date: Tue Dec 12 22:34:57 2023 +0100 riscv: Enable pcpu page first chunk allocator As explained in commit 6ea529a2037c ("percpu: make embedding first chunk allocator check vmalloc space size"), the embedding first chunk allocator needs the vmalloc space to be larger than the maximum distance between units which are grouped into NUMA nodes. On a very sparse NUMA configurations and a small vmalloc area (for example, it is 64GB in sv39), the allocation of dynamic percpu data in the vmalloc area could fail. So provide the pcpu page allocator as a fallback in case we fall into such a sparse configuration (which happened in arm64 as shown by commit 09cea6195073 ("arm64: support page mapping percpu first chunk allocator")). Signed-off-by: Alexandre Ghiti Signed-off-by: Dennis Zhou commit 7a92fc8b4d20680e4c20289a670d8fca2d1f2c1b Author: Alexandre Ghiti Date: Tue Dec 12 22:34:56 2023 +0100 mm: Introduce flush_cache_vmap_early() The pcpu setup when using the page allocator sets up a new vmalloc mapping very early in the boot process, so early that it cannot use the flush_cache_vmap() function which may depend on structures not yet initialized (for example in riscv, we currently send an IPI to flush other cpus TLB). But on some architectures, we must call flush_cache_vmap(): for example, in riscv, some uarchs can cache invalid TLB entries so we need to flush the new established mapping to avoid taking an exception. So fix this by introducing a new function flush_cache_vmap_early() which is called right after setting the new page table entry and before accessing this new mapping. This new function implements a local flush tlb on riscv and is no-op for other architectures (same as today). Signed-off-by: Alexandre Ghiti Acked-by: Geert Uytterhoeven Signed-off-by: Dennis Zhou commit bdc10bdf4b03dccaead3cdb90b3963d416de6fe0 Author: Amir Goldstein Date: Tue Dec 12 09:15:47 2023 +0200 overlayfs.rst: use consistent feature names Use the feature names "metacopy" and "index" consistently throughout the document. Covert the numbered list of features "redirect_dir", "index", "xino" to section headings, so that those features could be referenced in the document by their name. Reviewed-by: Bagas Sanjaya Signed-off-by: Amir Goldstein commit d4ca26ac4be0d9aea7005c40df75e6775749671b Author: Dmitry Baryshkov Date: Tue Nov 7 02:43:33 2023 +0200 drm/msm/dp: call dp_display_get_next_bridge() during probe The funcion dp_display_get_next_bridge() can return -EPROBE_DEFER if the next bridge is not (yet) available. However returning -EPROBE_DEFER from msm_dp_modeset_init() is not ideal. This leads to -EPROBE return from component_bind, which can easily result in -EPROBE_DEFR loops. Signed-off-by: Dmitry Baryshkov Tested-by: Konrad Dybcio # sc8180x-primus Reviewed-by: Bjorn Andersson Reviewed-by: Kuogee Hsieh Patchwork: https://patchwork.freedesktop.org/patch/566208/ Link: https://lore.kernel.org/r/20231107004424.2112698-1-dmitry.baryshkov@linaro.org commit 3313c23f3eab698bc6b904520ee608fc0f7b03d0 Author: Jessica Zhang Date: Wed Dec 13 13:30:18 2023 -0800 drm/msm/dpu: Drop enable and frame_count parameters from dpu_hw_setup_misr() Drop the enable and frame_count parameters from dpu_hw_setup_misr() as they are always set to the same values. In addition, replace MISR_FRAME_COUNT_MASK with MISR_FRAME_COUNT as frame_count is always set to the same value. Fixes: 7b37523fb1d1 ("drm/msm/dpu: Move MISR methods to dpu_hw_util") Signed-off-by: Jessica Zhang Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/572009/ Link: https://lore.kernel.org/r/20231213-encoder-fixup-v4-2-6da6cd1bf118@quicinc.com Signed-off-by: Dmitry Baryshkov commit 980fffd0c69e5df0f67ee089d405899d532aeeab Author: Jessica Zhang Date: Wed Dec 13 13:30:17 2023 -0800 drm/msm/dpu: Set input_sel bit for INTF Set the input_sel bit for encoders as it was missed in the initial implementation. Reported-by: Rob Clark Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/39 Fixes: 91143873a05d ("drm/msm/dpu: Add MISR register support for interface") Signed-off-by: Jessica Zhang Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/572007/ Link: https://lore.kernel.org/r/20231213-encoder-fixup-v4-1-6da6cd1bf118@quicinc.com Signed-off-by: Dmitry Baryshkov commit aee797df03c69ae39822848ac36e8fd6ed41cf4e Author: Dmitry Baryshkov Date: Wed Dec 13 02:57:28 2023 +0200 drm/msm/dpu: move CSC tables to dpu_hw_util.c Move CSC tables out of the header file to fix following kind of warnings: In file included from drivers/gpu/drm/msm/disp/dpu1/dpu_hwio.h:8, from drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c:5: drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h:54:33: warning: ‘dpu_csc10_rgb2yuv_601l’ defined but not used [-Wunused-const-variable=] 54 | static const struct dpu_csc_cfg dpu_csc10_rgb2yuv_601l = { | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h:39:33: warning: ‘dpu_csc10_YUV2RGB_601L’ defined but not used [-Wunused-const-variable=] 39 | static const struct dpu_csc_cfg dpu_csc10_YUV2RGB_601L = { | ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h:24:33: warning: ‘dpu_csc_YUV2RGB_601L’ defined but not used [-Wunused-const-variable=] 24 | static const struct dpu_csc_cfg dpu_csc_YUV2RGB_601L = { | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/571869/ Link: https://lore.kernel.org/r/20231213005728.53060-1-dmitry.baryshkov@linaro.org commit 45284ff733e4caf6c118aae5131eb7e7cf3eea5a Author: Paloma Arellano Date: Tue Dec 12 15:10:58 2023 -0800 drm/msm/dpu: Add mutex lock in control vblank irq Add a mutex lock to control vblank irq to synchronize vblank enable/disable operations happening from different threads to prevent race conditions while registering/unregistering the vblank irq callback. v4: -Removed vblank_ctl_lock from dpu_encoder_virt, so it is only a parameter of dpu_encoder_phys. -Switch from atomic refcnt to a simple int counter as mutex has now been added v3: Mistakenly did not change wording in last version. It is done now. v2: Slightly changed wording of commit message Signed-off-by: Paloma Arellano Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571854/ Link: https://lore.kernel.org/r/20231212231101.9240-2-quic_parellan@quicinc.com Signed-off-by: Dmitry Baryshkov commit 341fb24a67663ec0e6b8cd012a3892d92d133349 Author: Abhinav Kumar Date: Tue Dec 12 12:52:53 2023 -0800 drm/msm/dpu: add cdm blocks to dpu snapshot Now that CDM block support has been added to DPU lets also add its entry to the DPU snapshot to help debugging. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571835/ Link: https://lore.kernel.org/r/20231212205254.12422-16-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 8c16b988ba2d3dfc38fc8def0a9ccaefa50debd4 Author: Abhinav Kumar Date: Tue Dec 12 12:52:52 2023 -0800 drm/msm/dpu: introduce separate wb2_format arrays for rgb and yuv Lets rename the existing wb2_formats array wb2_formats_rgb to indicate that it has only RGB formats and can be used on any chipset having a WB block. Introduce a new wb2_formats_rgb_yuv array to the catalog to indicate support for YUV formats to writeback in addition to RGB. Chipsets which have support for CDM block will use the newly added wb2_formats_rgb_yuv array. changes in v3: - change type of wb2_formats_rgb/wb2_formats_rgb_yuv to u32 to fix checkpatch warnings Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571837/ Link: https://lore.kernel.org/r/20231212205254.12422-15-quic_abhinavk@quicinc.com [DB: fixed newer catalog entries] Signed-off-by: Dmitry Baryshkov commit 8b45a26f2ba9a052a8b46163fbc9d0d8739ca15d Author: Abhinav Kumar Date: Tue Dec 12 12:52:51 2023 -0800 drm/msm/dpu: reserve cdm blocks for writeback in case of YUV output Reserve CDM blocks for writeback if the format of the output fb is YUV. At the moment, the reservation is done only for writeback but can easily be extended by relaxing the checks once other interfaces are ready to output YUV. changes in v3: - squash CDM disable during encoder cleanup into this change changes in v2: - use needs_cdm from topology struct - drop fb related checks from atomic_mode_set() Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571838/ Link: https://lore.kernel.org/r/20231212205254.12422-14-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit f88c0c8fdb6bb49fc969e5adfcf8ee69bdb753df Author: Abhinav Kumar Date: Tue Dec 12 12:52:50 2023 -0800 drm/msm/dpu: plug-in the cdm related bits to writeback setup To setup and enable CDM block for the writeback pipeline, lets add the pieces together to set the active bits and the flush bits for the CDM block. changes in v2: - passed the cdm idx to update_pending_flush_cdm() (have retained the R-b as its a minor change) Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571831/ Link: https://lore.kernel.org/r/20231212205254.12422-13-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit a780a82a58eccb73fda4b0712c5cc189be7c92b3 Author: Abhinav Kumar Date: Tue Dec 12 12:52:49 2023 -0800 drm/msm/dpu: add an API to setup the CDM block for writeback Add an API dpu_encoder_helper_phys_setup_cdm() which can be used by the writeback encoder to setup the CDM block. Currently, this is defined and used within the writeback's physical encoder layer however, the function can be modified to be used to setup the CDM block even for non-writeback interfaces. Until those modifications are planned and made, keep it local to writeback. changes in v3: - call bind_pingpong_blk() directly as disable() is dropped - add dpu_csc10_rgb2yuv_601l to dpu_hw_util.h and use it - fix kbot error on the function doc - document that dpu_encoder_helper_phys_setup_cdm() doesn't handle DPU_CHROMA_H1V2 changes in v2: - add the RGB2YUV CSC matrix to dpu util as needed by CDM - use dpu_hw_get_csc_cfg() to get and program CSC - drop usage of setup_csc_data() and setup_cdwn() cdm ops as they both have been merged into enable() - drop reduntant hw_cdm and hw_pp checks Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312102149.qmbCdsg2-lkp@intel.com/ Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571833/ Link: https://lore.kernel.org/r/20231212205254.12422-12-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 53d5abe67e5870142f970064b1371a10d2fe7a15 Author: Abhinav Kumar Date: Tue Dec 12 12:52:48 2023 -0800 drm/msm/dpu: add CDM related logic to dpu_hw_ctl layer CDM block will need its own logic to program the flush and active bits in the dpu_hw_ctl layer. Make necessary changes in dpu_hw_ctl to support CDM programming. changes in v3: - drop unused cdm_active as reported by kbot - retained the R-b as its a trivial change changes in v2: - remove unused empty line - pass in cdm_num to update_pending_flush_cdm() Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312102047.S0I69pCs-lkp@intel.com/ Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571829/ Link: https://lore.kernel.org/r/20231212205254.12422-11-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 5ef42da742e1ddf35f4a417f8117d10936f45d92 Author: Abhinav Kumar Date: Tue Dec 12 12:52:47 2023 -0800 drm/msm/dpu: add support to allocate CDM from RM Even though there is usually only one CDM block, it can be used by either HDMI, DisplayPort OR Writeback interfaces. Hence its allocation needs to be tracked properly by the resource manager to ensure appropriate availability of the block. changes in v2: - move needs_cdm to topology struct Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571827/ Link: https://lore.kernel.org/r/20231212205254.12422-10-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit f58a6bf404b3cd6127d022350e67560ed323ee52 Author: Abhinav Kumar Date: Tue Dec 12 12:52:46 2023 -0800 drm/msm/dpu: add cdm blocks to RM Add the RM APIs necessary to initialize and allocate CDM blocks to be used by the rest of the DPU pipeline. changes in v2: - treat cdm_init() failure as fatal - fixed the commit text Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571822/ Link: https://lore.kernel.org/r/20231212205254.12422-9-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 0afac0ba60242ff827f4ffe56375c421a4e69a0f Author: Abhinav Kumar Date: Tue Dec 12 12:52:45 2023 -0800 drm/msm/dpu: add dpu_hw_cdm abstraction for CDM block CDM block comes with its own set of registers and operations which can be done. In-line with other hardware blocks, this change adds the dpu_hw_cdm abstraction for the CDM block. changes in v4: - used FIELD_PREP() for dpu_hw_cdm_setup_cdwn() operations - change to lowercase hex in dpu_hw_cdm_bind_pingpong_blk() - move disable assignment inside else in dpu_hw_cdm_bind_pingpong_blk() changes in v3: - fix commit text from sub-blk to blk for CDM - fix kbot issue for missing static for dpu_hw_cdm_enable() - fix kbot issue for incorrect documentation style - add more documentation for enums and struct in dpu_hw_cdm.h - drop "enable" parameter from bind_pingpong_blk() as we can just use PINGPONG_NONE for disable cases - drop unnecessary bit operation for zero value of cdm_cfg changes in v2: - replace bit magic with relevant defines - use drmm_kzalloc instead of kzalloc/free - some formatting fixes - inline _setup_cdm_ops() - protect bind_pingpong_blk with core_rev check - drop setup_csc_data() and setup_cdwn() ops as they are merged into enable() Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312101815.B3ZH7Pfy-lkp@intel.com/ Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571824/ Link: https://lore.kernel.org/r/20231212205254.12422-8-quic_abhinavk@quicinc.com [DB: Added linux/bitfield.h inclusion] Signed-off-by: Dmitry Baryshkov commit e1239661c9e9a628e0871f461bafebba324658d9 Author: Abhinav Kumar Date: Tue Dec 12 12:52:44 2023 -0800 drm/msm/dpu: add cdm blocks to sm8250 dpu_hw_catalog Add CDM blocks to the sm8250 dpu_hw_catalog to support YUV format output from writeback block. changes in v2: - re-use the cdm definition from sc7280 Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571819/ Link: https://lore.kernel.org/r/20231212205254.12422-7-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit a5ec9a44d8a3ae09fdf6dfc12e89c8663bb631ea Author: Abhinav Kumar Date: Tue Dec 12 12:52:43 2023 -0800 drm/msm/dpu: add cdm blocks to sc7280 dpu_hw_catalog Add CDM blocks to the sc7280 dpu_hw_catalog to support YUV format output from writeback block. changes in v3: - change the comment from sub-blk to clk for CDM changes in v2: - remove explicit zero assignment for features - move sc7280_cdm to dpu_hw_catalog from the sc7280 catalog file as its definition can be re-used Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571818/ Link: https://lore.kernel.org/r/20231212205254.12422-6-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 9c4998efec47a6f92d53bdcfea2b48783e4fedb5 Author: Abhinav Kumar Date: Tue Dec 12 12:52:42 2023 -0800 drm/msm/dpu: move csc matrices to dpu_hw_util Since the type and usage of CSC matrices is spanning across DPU lets introduce a helper to the dpu_hw_util to return the CSC corresponding to the request type. This will help to add more supported CSC types such as the RGB to YUV one which is used in the case of CDM. changes in v3: - drop the extra wrapper and export the matrices directly Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571816/ Link: https://lore.kernel.org/r/20231212205254.12422-5-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 79caf2f2202b9eaad3a5a726e4b33807f67d0f1b Author: Abhinav Kumar Date: Tue Dec 12 12:52:41 2023 -0800 drm/msm/dpu: fix writeback programming for YUV cases For YUV cases, setting the required format bits was missed out in the register programming. Lets fix it now in preparation of adding YUV formats support for writeback. changes in v2: - dropped the fixes tag as its not a fix but adding new functionality Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571814/ Link: https://lore.kernel.org/r/20231212205254.12422-4-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit ecf594453a6fbc6c06278cf815e3ece4a1b8261b Author: Abhinav Kumar Date: Tue Dec 12 12:52:40 2023 -0800 drm/msm/dpu: rename dpu_encoder_phys_wb_setup_cdp to match its functionality dpu_encoder_phys_wb_setup_cdp() is not programming the chroma down prefetch block. Its setting up the display ctl path for writeback. Hence rename it to dpu_encoder_phys_wb_setup_ctl() to match what its actually doing. Fixes: d7d0e73f7de3 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback") Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571812/ Link: https://lore.kernel.org/r/20231212205254.12422-3-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 043e5b302625634f5590f3da09652cdfa1037851 Author: Abhinav Kumar Date: Tue Dec 12 12:52:39 2023 -0800 drm/msm/dpu: add formats check for writeback encoder In preparation for adding more formats to dpu writeback add format validation to it to fail any unsupported formats. changes in v4: - change the failure message of the API drm_atomic_helper_check_wb_connector_state() to a generic one in case it checks more errors later and moreoever it already has debug message to indicate its failure - change the corresponding DPU_ERROR to DPU_DEBUG in-line with other atomic_check failure messages changes in v3: - rebase on top of msm-next - replace drm_atomic_helper_check_wb_encoder_state() with drm_atomic_helper_check_wb_connector_state() due to the rebase changes in v2: - correct some grammar in the commit text Fixes: d7d0e73f7de3 ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback") Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571811/ Link: https://lore.kernel.org/r/20231212205254.12422-2-quic_abhinavk@quicinc.com [DB: removed extra debug message] Signed-off-by: Dmitry Baryshkov commit c806d59695e1cdd288e11f8dcc8abdd187a3570e Author: Dmitry Baryshkov Date: Mon Dec 11 17:54:40 2023 +0300 drm/msm/dpu: remove extra drm_encoder_cleanup from the error path The drmm handler will perform drm_encoder_cleanup() for us. Moreover if we call drm_encoder_cleanup() manually, the drmm_encoder_alloc_release() will spawn warnings at drivers/gpu/drm/drm_encoder.c:214. Drop these extra drm_encoder_cleanup() calls. Fixes: cd42c56d9c0b ("drm/msm/dpu: use drmm-managed allocation for dpu_encoder_virt") Signed-off-by: Dmitry Baryshkov Reported-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Tested-by: Abhinav Kumar #sm8250 CI Patchwork: https://patchwork.freedesktop.org/patch/571562/ Link: https://lore.kernel.org/r/20231211145440.3647001-1-dmitry.baryshkov@linaro.org commit 88806318e2c2f212e91da2c4143509db4b16c9cb Author: Dmitry Baryshkov Date: Sun Dec 10 02:21:24 2023 +0300 dt-bindings: display: msm: dp: declare compatible string for sm8150 Add compatible string for the DisplayPort controller found on the Qualcomm SM8150 platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Acked-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/571438/ Link: https://lore.kernel.org/r/20231209232132.3580045-2-dmitry.baryshkov@linaro.org commit 2b72e50c62de60ad2d6bcd86aa38d4ccbdd633f2 Author: Rob Clark Date: Mon Dec 11 10:19:55 2023 -0800 drm/msm/dpu: Ratelimit framedone timeout msgs When we start getting these, we get a *lot*. So ratelimit it to not flood dmesg. Signed-off-by: Rob Clark Reviewed-by: Abhinav Kumar Reviewed-by: Marijn Suijten Patchwork: https://patchwork.freedesktop.org/patch/571584/ Link: https://lore.kernel.org/r/20231211182000.218088-1-robdclark@gmail.com Signed-off-by: Dmitry Baryshkov commit eaa647cdbf2e357b4a14903f2f1e47ed9c4f8df3 Author: Dmitry Baryshkov Date: Sun Dec 3 03:27:43 2023 +0300 drm/msm/dpu: enable writeback on SM8450 Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/570187/ Link: https://lore.kernel.org/r/20231203002743.1291956-4-dmitry.baryshkov@linaro.org commit c2949a49dfe960e952400029e14751dceff79d38 Author: Dmitry Baryshkov Date: Sun Dec 3 03:27:42 2023 +0300 drm/msm/dpu: enable writeback on SM8350 Enable WB2 hardware block, enabling writeback support on this platform. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/570188/ Link: https://lore.kernel.org/r/20231203002743.1291956-3-dmitry.baryshkov@linaro.org commit d1c6f4ba4746ed41fde8269cb5fea88bddb60504 Author: Manivannan Sadhasivam Date: Mon Nov 27 16:36:24 2023 +0530 PCI: epf-mhi: Enable MHI async read/write support Now that both eDMA and iATU are prepared to support async transfer, let's enable MHI async read/write by supplying the relevant callbacks. In the absence of eDMA, iATU will be used for both sync and async operations. Acked-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński Signed-off-by: Manivannan Sadhasivam commit 0d5d5738dc206e531d3a70c6a81fde4e9fa40b5d Author: Manivannan Sadhasivam Date: Thu Nov 2 20:03:58 2023 +0530 PCI: epf-mhi: Add support for DMA async read/write operation The driver currently supports only the sync read/write operation i.e., it waits for the DMA transfer to complete before returning to the caller (MHI stack). But it is sub-optimal and defeats the actual purpose of using DMA. So let's add support for DMA async read/write operation by skipping the DMA transfer completion and returning to the caller immediately. When the completion actually happens later, the driver will be notified using the DMA completion handler and in turn it will notify the caller using the newly introduced callback in "struct mhi_ep_buf_info". Since the DMA completion handler is invoked from the interrupt context, a separate workqueue (epf_mhi->dma_wq) is used to notify the caller about the completion of the transfer. Acked-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński Signed-off-by: Manivannan Sadhasivam commit 5424be958b446601d6176396d9dbaad2178db610 Author: Manivannan Sadhasivam Date: Mon Nov 27 15:48:54 2023 +0530 PCI: epf-mhi: Simulate async read/write using iATU Even though iATU only supports synchronous read/write, the MHI stack may call async read/write callbacks without knowing the limitations of the controller driver. So in order to maintain compatibility, let's simulate async read/write operation with iATU by invoking the completion callback after memcpy. Acked-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński Signed-off-by: Manivannan Sadhasivam commit 8b786ed8fb089e347af21d13ba5677325fcd4cd8 Author: Manivannan Sadhasivam Date: Mon Nov 27 15:35:50 2023 +0530 bus: mhi: ep: Introduce async read/write callbacks These callbacks can be implemented by the controller drivers to perform async read/write operation that increases the throughput. For aiding the async operation, a completion callback is also introduced. Signed-off-by: Manivannan Sadhasivam commit 927105244f8bc48e6841826a5644c6a961e03b5d Author: Manivannan Sadhasivam Date: Mon Nov 27 13:57:37 2023 +0530 bus: mhi: ep: Rename read_from_host() and write_to_host() APIs In the preparation for adding async API support, let's rename the existing APIs to read_sync() and write_sync() to make it explicit that these APIs are used for synchronous read/write. Signed-off-by: Manivannan Sadhasivam commit b08ded2ef2e98768d5ee5f71da8fe768b1f7774b Author: Manivannan Sadhasivam Date: Thu Aug 17 23:24:52 2023 +0530 bus: mhi: ep: Pass mhi_ep_buf_info struct to read/write APIs In the preparation of DMA async support, let's pass the parameters to read_from_host() and write_to_host() APIs using mhi_ep_buf_info structure. No functional change. Signed-off-by: Manivannan Sadhasivam commit cea4bcbf997ab2f6c8d242f41785b21ea91d53c3 Author: Manivannan Sadhasivam Date: Thu Oct 26 10:25:13 2023 +0530 bus: mhi: ep: Add support for interrupt moderation timer MHI spec defines the interrupt moderation timer feature using which the host can limit the number of interrupts being raised for an event ring by the device. This feature allows the host to process multiple event ring elements by a single IRQ from the device, thereby eliminating the need to process IRQ for each element. The INTMODT field in the event context array provides the value to be used for delaying the IRQ generation from device. This value, along with the Block Event Interrupt (BEI) flag of the TRE defines how IRQ is generated to the host. Support for interrupt moderation timer is implemented using delayed workqueue in kernel. And a separate delayed work item is used for each event ring. Link: https://lore.kernel.org/r/20231026045513.12981-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit 62210a26cd4f8ad52683a71c0226dfe85de1144d Author: Manivannan Sadhasivam Date: Wed Oct 18 17:58:12 2023 +0530 bus: mhi: ep: Use slab allocator where applicable Use slab allocator for allocating the memory for objects used frequently and are of fixed size. This reduces the overheard associated with kmalloc(). Suggested-by: Alex Elder Link: https://lore.kernel.org/r/20231018122812.47261-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit 00b1b2296b581067a4da78111f9e6f0984f7a284 Merge: 04c04725c1d0a bf88f7d920da2 Author: Jakub Kicinski Date: Wed Dec 13 22:08:58 2023 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-12-12 (igb, e1000e) This series contains updates to igb and e1000e drivers. Ilpo Järvinen does some cleanups to both drivers: utilizing FIELD_GET() helpers and using standard kernel defines over driver created ones. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: e1000e: Use pcie_capability_read_word() for reading LNKSTA e1000e: Use PCI_EXP_LNKSTA_NLW & FIELD_GET() instead of custom defines/code igb: Use FIELD_GET() to extract Link Width ==================== Link: https://lore.kernel.org/r/20231212204947.513563-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 2cd3da4e37453019e21a486d9de3144f46b4fdf7 Author: Mika Westerberg Date: Fri May 20 13:47:11 2022 +0300 thunderbolt: Add support for Intel Lunar Lake Intel Lunar Lake has similar integrated Thunderbolt/USB4 controller as Intel Meteor Lake with some small differences in the host router (it has 3 DP IN adapters for instance). Add the Intel Lunar Lake PCI IDs to the driver list of supported devices. Tested-by: Pengfei Xu Signed-off-by: Mika Westerberg commit 2b3a6239d286d6b74295ccf21905ba6533bcf3a9 Author: Gil Fine Date: Wed Nov 15 12:09:57 2023 +0200 thunderbolt: Disable PCIe extended encapsulation upon teardown properly In case of PCIe tunnel teardown (including if caused by router unplug), PCIe extended encapsulation bit should be cleared in downstream and upstream routers accordingly. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 54967f4177d3d8d6231eeedee669c2512bcbf172 Author: Gil Fine Date: Wed Nov 15 12:09:56 2023 +0200 thunderbolt: Make PCIe tunnel setup and teardown follow CM guide The USB4 Connection Manager guide suggests that the PCIe paths are enabled from the upstream adapter to the downstream adapter and vice versa on disable so make the driver follows this sequence. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 0b663ec9fe07e5c46ede45da75951eb11fc2f215 Author: Gil Fine Date: Wed Nov 15 12:09:58 2023 +0200 thunderbolt: Improve logging when DisplayPort resource is added due to hotplug To allow us differentiate how DisplayPort resource is added to the DisplayPort resources list make the debug log to append "hotplug" when this was due to an actual hotplug. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 97e0a21ce835603b81a5c11de5bf45820194db10 Author: Mika Westerberg Date: Thu Nov 23 13:39:21 2023 +0200 thunderbolt: Use tb_dp_read_cap() to read DP_COMMON_CAP as well There is no point doing this separately as the register layout is the same. For this reason rename tb_dp_read_dprx() to tb_dp_wait_dprx() and call tb_dp_read_cap() instead. While there add debug log if the DPRX capability read times out. Signed-off-by: Mika Westerberg commit 09dc766bd60b7bc6a2742aaf2410e434f458893c Author: Mika Westerberg Date: Fri Nov 17 12:58:39 2023 +0200 thunderbolt: Disable CL states only when actually needed If there is not going to be an actual transition to asymmetric or symmetric, there is no point to disable and re-enable CL states either. So instead disable them only when we know that an actual transition is going to take place. Signed-off-by: Mika Westerberg commit 3c052ec6f4f866163573445a02d60b629805a6e7 Author: Gil Fine Date: Wed Nov 15 12:09:53 2023 +0200 thunderbolt: Transition link to asymmetric only when both sides support it We can transition Gen 4 link to asymmetric only when both sides of the link support it in the required direction. For this reason make sure that the downstream adapter also supports asymmetric link before starting the transition. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit ea20adddd6c154e9e107c47fbf1b4697e68180df Author: Gil Fine Date: Tue Nov 7 13:00:53 2023 +0200 thunderbolt: Log XDomain link speed and width In the same way we do for routers. This is useful for debugging purposes. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 30c6759b232bf42297a9ee6c60debf9082005d41 Author: Gil Fine Date: Sun Nov 5 17:52:19 2023 +0200 thunderbolt: Move width_name() helper to tb.h We are going to use it in subsequent patches, so make it available outside of switch.c. Also, change the name to tb_width_name() to follow the naming conventions. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 36b6ad6ad0350554e611a8cb754ccd40857416a8 Author: Gil Fine Date: Wed Nov 15 15:01:36 2023 +0200 thunderbolt: Handle lane bonding of Gen 4 XDomain links properly Gen 4 links come up as bonded already so we are not supposed to initiate lane bonding on them. However, we should still update the port structures accordingly. Split these into their own functions to make it easier to follow. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 79fff9379e6c928d376e5d8f7f63894ebff67865 Author: Mika Westerberg Date: Tue Nov 7 13:06:25 2023 +0200 thunderbolt: Unwind TMU configuration if tb_switch_set_tmu_mode_params() fails Dan reported that the kernel test robot found an issue with the TMU code namely in tb_switch_tmu_change_mode() where we should actually go back to the previous mode in case of failure instead of just returning back the error. Fix this by unwinding the configuration as we do with the other error paths in this function. Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202311030814.AXtCk7PO-lkp@intel.com/ Signed-off-by: Mika Westerberg commit 04c04725c1d0a71a3f30033a794738b49d1f2111 Merge: c3f687d8dfeb3 4a3de3fb0eb68 Author: Jakub Kicinski Date: Wed Dec 13 22:07:19 2023 -0800 Merge branch 'support-symmetric-xor-rss-hash' Ahmed Zaki says: ==================== Support symmetric-xor RSS hash Patches 1 and 2 modify the get/set_rxh ethtool API to take a pointer to struct of parameters instead of individual params. This will allow future changes to the uAPI-shared struct ethtool_rxfh without changing the drivers' API. Patch 3 adds the support at the Kernel level, allowing the user to set a symmetric-xor RSS hash for a netdevice via: # ethtool -X eth0 hfunc toeplitz symmetric-xor and clears the flag via: # ethtool -X eth0 hfunc toeplitz The "symmetric-xor" is set in a new "input_xfrm" field in struct ethtool_rxfh. Support for the new "symmetric-xor" flag will be later sent to the "ethtool" user-space tool. Patch 4 fixes a long standing bug with the ice hash function register values. The bug has been benign for now since only (asymmetric) Toeplitz hash (Zero) has been used. Patches 5 and 6 lay some groundwork refactoring. While the first is mainly cosmetic, the second is needed since there is no more room in the previous 64-bit RSS profile ID for the symmetric attribute introduced in the next patch. Finally, patches 7 and 8 add the symmetric-xor support for the ice (E800 PFs) and the iAVF drivers. ==================== Link: https://lore.kernel.org/r/20231213003321.605376-1-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit 4a3de3fb0eb6897488dd510006abd9673f1fb34c Author: Ahmed Zaki Date: Tue Dec 12 17:33:21 2023 -0700 iavf: enable symmetric-xor RSS for Toeplitz hash function Allow the user to set the symmetric Toeplitz hash function via: # ethtool -X eth0 hfunc toeplitz symmetric-xor The driver will reject any new RSS configuration if a field other than (IP src/dst and L4 src/dst ports) is requested for hashing. The symmetric RSS will not be supported on PFs not advertising the ADV RSS Offload flag (ADV_RSS_SUPPORT()), for example the E700 series (i40e). Reviewed-by: Madhu Chittim Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231213003321.605376-9-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit 352e9bf238133882dfaebc0dc59a590732a92006 Author: Jeff Guo Date: Tue Dec 12 17:33:20 2023 -0700 ice: enable symmetric-xor RSS for Toeplitz hash function Allow the user to set the symmetric Toeplitz hash function via: # ethtool -X eth0 hfunc toeplitz symmetric-xor All existing RSS configurations will be converted to symmetric unless they have a non-symmetric field (other than IP src/dst and L4 src/dst ports) used for hashing. The driver will reject a new RSS configuration if such a field is requested. The hash function in the E800 NICs is set per-VSI and a specific AQ command is needed to modify the hash function. Use the AQ command to enable setting the symmetric Toeplitz RSS hash function for any VSI in the new ice_set_rss_hfunc(). When the Symmetric Toeplitz hash function is used, the hardware sets the input set of the RSS (Toeplitz) algorithm to be the XOR of the fields index by HSYMM and the fields index by the INSET registers. We use this to create a symmetric hash by setting the HSYMM registers to point to their counterparts in the INSET registers: HSYMM [src_fv] = dst_fv; HSYMM [dst_fv] = src_fv; where src_fv and dst_fv are the indexes of the protocol's src and dst fields. Reviewed-by: Wojciech Drewek Signed-off-by: Jeff Guo Signed-off-by: Jesse Brandeburg Co-developed-by: Ahmed Zaki Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231213003321.605376-8-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit b1f5921a99ac8dedadf1f2599486b2ca9e01cc0f Author: Ahmed Zaki Date: Tue Dec 12 17:33:19 2023 -0700 ice: refactor the FD and RSS flow ID generation The flow director and RSS blocks use separate methods to generate a unique 64 bit ID for the flow. This is not extendable, especially for the RSS that already uses all 64 bit space. Refactor the flow generation API so that the ID is generated within ice_flow_add_prof(). The FD and RSS blocks caches the generated ID for later use. Suggested-by: Dan Nowlin Reviewed-by: Wojciech Drewek Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231213003321.605376-7-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit dc6e44c9d6d68e8aa5de78d15f43f93145719b72 Author: Qi Zhang Date: Tue Dec 12 17:33:18 2023 -0700 ice: refactor RSS configuration Refactor the driver to use a communication data structure for RSS config. To do so we introduce the new ice_rss_hash_cfg struct, and then pass it as an argument to several functions. Also introduce enum ice_rss_cfg_hdr_type to specify a more granular and flexible RSS configuration: ICE_RSS_OUTER_HEADERS - take outer layer as RSS input set ICE_RSS_INNER_HEADERS - take inner layer as RSS input set ICE_RSS_INNER_HEADERS_W_OUTER_IPV4 - take inner layer as RSS input set for packet with outer IPV4 ICE_RSS_INNER_HEADERS_W_OUTER_IPV6 - take inner layer as RSS input set for packet with outer IPV6 ICE_RSS_ANY_HEADERS - try with outer first then inner (same as the behaviour without this change) Finally, move the virtchnl_rss_algorithm enum to be with the other RSS related structures in the virtchnl.h file. There should be no functional change due to this patch. Reviewed-by: Wojciech Drewek Signed-off-by: Qi Zhang Co-developed-by: Jesse Brandeburg Signed-off-by: Jesse Brandeburg Co-developed-by: Ahmed Zaki Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231213003321.605376-6-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit 20f73b60bb5c276cee9b1a530f100c677bc74af8 Author: Ahmed Zaki Date: Tue Dec 12 17:33:17 2023 -0700 ice: fix ICE_AQ_VSI_Q_OPT_RSS_* register values Fix the values of the ICE_AQ_VSI_Q_OPT_RSS_* registers. Shifting is already done when the values are used, no need to double shift. Bug was not discovered earlier since only ICE_AQ_VSI_Q_OPT_RSS_TPLZ (Zero) is currently used. Also, rename ICE_AQ_VSI_Q_OPT_RSS_XXX to ICE_AQ_VSI_Q_OPT_RSS_HASH_XXX for consistency. Co-developed-by: Jesse Brandeburg Signed-off-by: Jesse Brandeburg Reviewed-by: Wojciech Drewek Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231213003321.605376-5-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit 13e59344fb9d3c9d3acd138ae320b5b67b658694 Author: Ahmed Zaki Date: Tue Dec 12 17:33:16 2023 -0700 net: ethtool: add support for symmetric-xor RSS hash Symmetric RSS hash functions are beneficial in applications that monitor both Tx and Rx packets of the same flow (IDS, software firewalls, ..etc). Getting all traffic of the same flow on the same RX queue results in higher CPU cache efficiency. A NIC that supports "symmetric-xor" can achieve this RSS hash symmetry by XORing the source and destination fields and pass the values to the RSS hash algorithm. The user may request RSS hash symmetry for a specific algorithm, via: # ethtool -X eth0 hfunc symmetric-xor or turn symmetry off (asymmetric) by: # ethtool -X eth0 hfunc The specific fields for each flow type should then be specified as usual via: # ethtool -N|-U eth0 rx-flow-hash s|d|f|n Reviewed-by: Wojciech Drewek Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231213003321.605376-4-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit dcd8dbf9e734eb334113ea43186c1c26e9f497bb Author: Ahmed Zaki Date: Tue Dec 12 17:33:15 2023 -0700 net: ethtool: get rid of get/set_rxfh_context functions Add the RSS context parameters to struct ethtool_rxfh_param and use the get/set_rxfh to handle the RSS contexts as well. This is part 2/2 of the fix suggested in [1]: - Add a rss_context member to the argument struct and a capability like cap_link_lanes_supported to indicate whether driver supports rss contexts, then you can remove *et_rxfh_context functions, and instead call *et_rxfh() with a non-zero rss_context. Link: https://lore.kernel.org/netdev/20231121152906.2dd5f487@kernel.org/ [1] CC: Jesse Brandeburg CC: Tony Nguyen CC: Marcin Wojtas CC: Russell King CC: Sunil Goutham CC: Geetha sowjanya CC: Subbaraya Sundeep CC: hariprasad CC: Saeed Mahameed CC: Leon Romanovsky CC: Edward Cree CC: Martin Habets Suggested-by: Jakub Kicinski Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231213003321.605376-3-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit fb6e30a72539ce28c1323aef4190d35aac106f6f Author: Ahmed Zaki Date: Tue Dec 12 17:33:14 2023 -0700 net: ethtool: pass a pointer to parameters to get/set_rxfh ethtool ops The get/set_rxfh ethtool ops currently takes the rxfh (RSS) parameters as direct function arguments. This will force us to change the API (and all drivers' functions) every time some new parameters are added. This is part 1/2 of the fix, as suggested in [1]: - First simplify the code by always providing a pointer to all params (indir, key and func); the fact that some of them may be NULL seems like a weird historic thing or a premature optimization. It will simplify the drivers if all pointers are always present. - Then make the functions take a dev pointer, and a pointer to a single struct wrapping all arguments. The set_* should also take an extack. Link: https://lore.kernel.org/netdev/20231121152906.2dd5f487@kernel.org/ [1] Suggested-by: Jakub Kicinski Suggested-by: Jacob Keller Signed-off-by: Ahmed Zaki Link: https://lore.kernel.org/r/20231213003321.605376-2-ahmed.zaki@intel.com Signed-off-by: Jakub Kicinski commit c3f687d8dfeb33cffbb8f47c30002babfc4895d2 Author: Jakub Kicinski Date: Thu Dec 7 16:52:32 2023 -0800 net: page_pool: factor out releasing DMA from releasing the page Releasing the DMA mapping will be useful for other types of pages, so factor it out. Make sure compiler inlines it, to avoid any regressions. Signed-off-by: Mina Almasry Reviewed-by: Shakeel Butt Reviewed-by: Ilias Apalodimas Signed-off-by: Jakub Kicinski commit 603ce8ab12094a2d9483c79a7541335e258a5328 Author: Christoph Hellwig Date: Wed Dec 13 10:06:33 2023 +0100 xfs: pass the defer ops directly to xfs_defer_add Pass a pointer to the xfs_defer_op_type structure to xfs_defer_add and remove the indirection through the xfs_defer_ops_type enum and a global table of all possible operations. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit dc22af64368291a86fb6b7eb2adab21c815836b7 Author: Christoph Hellwig Date: Thu Dec 14 06:16:32 2023 +0100 xfs: pass the defer ops instead of type to xfs_defer_start_recovery xfs_defer_start_recovery is only called from xlog_recover_intent_item, and the callers of that all have the actual xfs_defer_ops_type operation vector at hand. Pass that directly instead of looking it up from the defer_op_types table. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Chandan Babu R commit 7f2f7531e0d455f1abb9f48fbbe17c37e8742590 Author: Christoph Hellwig Date: Wed Dec 13 10:06:31 2023 +0100 xfs: store an ops pointer in struct xfs_defer_pending The dfp_type field in struct xfs_defer_pending is only used to either look up the operations associated with the pending word or in trace points. Replace it with a direct pointer to the operations vector, and store a pretty name in the vector for tracing. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 2e8f7b6f4a15ea92cb2186ad300ae4191d0edcef Author: Christoph Hellwig Date: Wed Dec 13 10:06:30 2023 +0100 xfs: move xfs_attr_defer_type up in xfs_attr_item.c We'll reference it directly in xlog_recover_attri_commit_pass2, so move it up a bit. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit c00eebd09e95757c9c1d08f0a6bbc32c543daf90 Author: Christoph Hellwig Date: Wed Dec 13 10:06:29 2023 +0100 xfs: consolidate the xfs_attr_defer_* helpers Consolidate the xfs_attr_defer_* helpers into a single xfs_attr_defer_add one that picks the right dela_state based on the passed in operation. Also move to a single trace point as the actual operation is visible through the flags in the delta_state passed to the trace point. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit eff9704f5332a13b08fbdbe0f84059c9e7051d5f Author: Krishna chaitanya chundru Date: Tue Oct 31 15:21:05 2023 +0530 bus: mhi: host: Add alignment check for event ring read pointer Though we do check the event ring read pointer by "is_valid_ring_ptr" to make sure it is in the buffer range, but there is another risk the pointer may be not aligned. Since we are expecting event ring elements are 128 bits(struct mhi_ring_element) aligned, an unaligned read pointer could lead to multiple issues like DoS or ring buffer memory corruption. So add a alignment check for event ring read pointer. Fixes: ec32332df764 ("bus: mhi: core: Sanity check values from remote device before use") cc: stable@vger.kernel.org Signed-off-by: Krishna chaitanya chundru Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231031-alignment_check-v2-1-1441db7c5efd@quicinc.com Signed-off-by: Manivannan Sadhasivam commit 5571519009d09a52c42231b2425a8ff1cc6cd813 Author: Qiang Yu Date: Tue Nov 7 16:14:50 2023 +0800 bus: mhi: host: pci_generic: Add SDX75 based modem support Add generic info for SDX75 based modems. SDX75 takes longer to set ready during power up. Hence use separate configuration. Signed-off-by: Qiang Yu Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1699344890-87076-3-git-send-email-quic_qianyu@quicinc.com Signed-off-by: Manivannan Sadhasivam commit 6ab3d50b106c9aea123a80551a6c9deace83b914 Author: Qiang Yu Date: Tue Nov 7 16:14:49 2023 +0800 bus: mhi: host: Add a separate timeout parameter for waiting ready Some devices(eg. SDX75) take longer than expected (default, 8 seconds) to set ready after reboot. Hence add optional ready timeout parameter and pass the appropriate timeout value to mhi_poll_reg_field() to wait enough for device ready as part of power up sequence. Signed-off-by: Qiang Yu Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1699344890-87076-2-git-send-email-quic_qianyu@quicinc.com Signed-off-by: Manivannan Sadhasivam commit 987fdb5a43a66764808371b54e6047834170d565 Author: Manivannan Sadhasivam Date: Fri Sep 1 13:05:02 2023 +0530 bus: mhi: ep: Do not allocate event ring element on stack It is possible that the host controller driver would use DMA framework to write the event ring element. So avoid allocating event ring element on the stack as DMA cannot work on vmalloc memory. Cc: stable@vger.kernel.org Fixes: 961aeb689224 ("bus: mhi: ep: Add support for sending events to the host") Link: https://lore.kernel.org/r/20230901073502.69385-1-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam commit 7395de647e87476f5b5d2f9a9fe80cee86b4e7cc Author: Linus Walleij Date: Tue Dec 12 23:04:47 2023 -0800 Input: as5011 - convert to GPIO descriptor This driver does not have any in-tree users but is passing a legacy GPIO number through platform data. Convert it to use a GPIO descriptor, new users or outoftree users can easily be implemented using GPIO descriptor tables or software nodes. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231129-descriptors-input-v1-4-9433162914a3@linaro.org Signed-off-by: Dmitry Torokhov commit e53c18da99c75f080bd99436c57824f2ab657f03 Author: Linus Walleij Date: Tue Dec 12 23:06:55 2023 -0800 Input: omap-keypad - drop optional GPIO support The driver supports passing some GPIO lines for rows and columns through the driver data, but there is no in-kernel user of this. Further the use seems convoluted because the GPIO lines are unused in the driver, then explicitly free:ed when removing it without being requested when probing it, which is assymetric and just a recepie for disaster. Remove the support for these unused GPIOs, if need be support can be reestablished in an organized fashion using GPIO descriptors. Signed-off-by: Linus Walleij Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20231129-descriptors-input-v1-3-9433162914a3@linaro.org Signed-off-by: Dmitry Torokhov commit 1ba05c92682fcc6d0ffb2fce5db68fb517278797 Author: Linus Walleij Date: Tue Dec 12 23:04:35 2023 -0800 Input: tca6416-keypad - drop unused include The TCA6416 keypad driver is including the legacy GPIO header for no reason, it is not using any of its symbols. Drop the header. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231129-descriptors-input-v1-2-9433162914a3@linaro.org Signed-off-by: Dmitry Torokhov commit 6caa290684255991ffeebf228b2fd9e7e4da8f34 Author: Linus Walleij Date: Tue Dec 12 23:02:56 2023 -0800 Input: navpoint - convert to use GPIO descriptor The Navpoint driver uses a GPIO line, convert this to use a GPIO descriptor. There are no in-kernel users but out of tree users can easily be added or converted using a GPIO descriptor table as with numerous other drivers. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231129-descriptors-input-v1-1-9433162914a3@linaro.org Signed-off-by: Dmitry Torokhov commit 51835758e8a9ce089c47358ea373de82309234de Author: ye xingchen Date: Tue Dec 12 22:41:50 2023 -0800 Input: vivaldi - convert to use sysfs_emit_at() API Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212071644171074630@zte.com.cn Signed-off-by: Dmitry Torokhov commit 7c73226525702e89aad9fe4c4683826ed5e24361 Author: ye xingchen Date: Tue Dec 12 22:28:54 2023 -0800 Input: iqs269a - use sysfs_emit() instead of scnprintf() Replace calls to scnprintf() in the methods showing device attributes with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212011548387254492@zte.com.cn Signed-off-by: Dmitry Torokhov commit 3e39104ba81dc8738c3706b55f737db5da4dbbfd Author: ye xingchen Date: Tue Dec 12 22:21:11 2023 -0800 Input: ims-pcu - use sysfs_emit() instead of scnprintf() Replace calls to scnprintf() in the methods showing device attributes with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212011548387254492@zte.com.cn Signed-off-by: Dmitry Torokhov commit 8fbdb8fb36c68a00555a1a2593c6fff1244a65b3 Author: ye xingchen Date: Tue Dec 12 22:31:44 2023 -0800 Input: synaptics-rmi4 - use sysfs_emit() to instead of scnprintf() Replace calls to scnprintf() in the methods showing device attributes with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212011551429834598@zte.com.cn Signed-off-by: Dmitry Torokhov commit e50389f208daf1d60810e789b8860063e3256693 Author: ye xingchen Date: Tue Dec 12 21:53:40 2023 -0800 Input: touchscreen - use sysfs_emit[_at]() instead of scnprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen Acked-by: Uwe Kleine-König Acked-by: Oliver Graute Signed-off-by: Dmitry Torokhov commit 1864a2006ee1e41960b63ca63aa79fabb690e71b Author: ye xingchen Date: Tue Dec 12 22:12:01 2023 -0800 Input: mouse - use sysfs_emit[_at]() instead of scnprintf() Replace the calls to various *printf() functions with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212021453578171100@zte.com.cn Signed-off-by: Dmitry Torokhov commit d4db8762dc4c364dce89901ed4690588ad310bfc Author: ye xingchen Date: Tue Dec 12 22:37:16 2023 -0800 Input: use sysfs_emit() instead of scnprintf() Replace calls to scnprintf() in the methods showing device attributes with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen Link: https://lore.kernel.org/r/202212021133398847947@zte.com.cn Signed-off-by: Dmitry Torokhov commit 19b366dae1c17cdc580f564ecc4b7f8ca52543b4 Merge: 18793e0505042 578bd4ce7100a Author: Chandan Babu R Date: Thu Dec 14 10:50:35 2023 +0530 Merge tag 'fix-growfsrt-failures-6.8_2023-12-13' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeB xfs: fix growfsrt failure during rt volume attach One more series to fix a transaction reservation overrun while trying to attach a very large rt volume to a filesystem. Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'fix-growfsrt-failures-6.8_2023-12-13' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: recompute growfsrtfree transaction reservation while growing rt volume commit c838fe1282df540ebf6e24e386ac34acb3ef3115 Merge: 2a0c6b41eec90 dc68540913ac5 Author: Alexei Starovoitov Date: Wed Dec 13 20:49:11 2023 -0800 Merge branch 'bpf-use-gfp_kernel-in-bpf_event_entry_gen' Hou Tao says: ==================== The simple patch set aims to replace GFP_ATOMIC by GFP_KERNEL in bpf_event_entry_gen(). These two patches in the patch set were preparatory patches in "Fix the release of inner map" patchset [1] and are not needed for v2, so re-post it to bpf-next tree. Patch #1 reduces the scope of rcu_read_lock when updating fd map and patch #2 replaces GFP_ATOMIC by GFP_KERNEL. Please see individual patches for more details. Change Log: v3: * patch #1: fallback to patch #1 in v1. Update comments in bpf_fd_htab_map_update_elem() to explain the reason for rcu_read_lock() (Alexei) v2: https://lore.kernel.org/bpf/20231211073843.1888058-1-houtao@huaweicloud.com/ * patch #1: add rcu_read_lock/unlock() for bpf_fd_array_map_update_elem as well to make it consistent with bpf_fd_htab_map_update_elem and update commit message accordingly (Alexei) * patch #1/#2: collects ack tags from Yonghong v1: https://lore.kernel.org/bpf/20231208103357.2637299-1-houtao@huaweicloud.com/ [1]: https://lore.kernel.org/bpf/20231107140702.1891778-1-houtao@huaweicloud.com/ ==================== Link: https://lore.kernel.org/r/20231214043010.3458072-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit dc68540913ac523b46ebda3843cec179362c7a72 Author: Hou Tao Date: Thu Dec 14 12:30:10 2023 +0800 bpf: Use GFP_KERNEL in bpf_event_entry_gen() rcu_read_lock() is no longer held when invoking bpf_event_entry_gen() which is called by perf_event_fd_array_get_ptr(), so using GFP_KERNEL instead of GFP_ATOMIC to reduce the possibility of failures due to out-of-memory. Acked-by: Yonghong Song Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231214043010.3458072-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 8f82583f9527b3be9d70d9a5d1f33435e29d0480 Author: Hou Tao Date: Thu Dec 14 12:30:09 2023 +0800 bpf: Reduce the scope of rcu_read_lock when updating fd map There is no rcu-read-lock requirement for ops->map_fd_get_ptr() or ops->map_fd_put_ptr(), so doesn't use rcu-read-lock for these two callbacks. For bpf_fd_array_map_update_elem(), accessing array->ptrs doesn't need rcu-read-lock because array->ptrs must still be allocated. For bpf_fd_htab_map_update_elem(), htab_map_update_elem() only requires rcu-read-lock to be held to avoid the WARN_ON_ONCE(), so only use rcu_read_lock() during the invocation of htab_map_update_elem(). Acked-by: Yonghong Song Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231214043010.3458072-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit ed340d13aa1db6773667ed4bf907738df203fbda Merge: 6df14a32e935b 73e33f969ef05 Author: Martin K. Petersen Date: Wed Dec 13 23:25:04 2023 -0500 Merge patch series "scsi: hisi_sas: Minor fixes and cleanups" chenxiang says: This series contain some fixes and cleanups including: - Set .phy_attached before notifying phyup event HISI_PHYEE_PHY_UP_PM; - Use standard error code instead of hardcode; - Check before using pointer variable; - Rollback some operations if FLR failed; - Correct the number of global debugfs registers; Link: https://lore.kernel.org/r/1702525516-51258-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit 73e33f969ef05328766b23a99b2c07bfff765009 Author: Yihang Li Date: Thu Dec 14 11:45:16 2023 +0800 scsi: hisi_sas: Correct the number of global debugfs registers In function debugfs_debugfs_snapshot_global_reg_v3_hw() it uses debugfs_axi_reg.count (which is the number of axi debugfs registers) to acquire the number of global debugfs registers. Use debugfs_global_reg.count to acquire the number of global debugfs registers instead. Fixes: 623a4b6d5c2a ("scsi: hisi_sas: Move debugfs code to v3 hw driver") Signed-off-by: Yihang Li Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1702525516-51258-6-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit 7ea3e7763c50b20a8bd25cf524ea0c6463de69be Author: Yihang Li Date: Thu Dec 14 11:45:15 2023 +0800 scsi: hisi_sas: Rollback some operations if FLR failed We obtain the semaphore and set HISI_SAS_RESETTING_BIT in hisi_sas_reset_prepare_v3_hw(), block the scsi host and set HISI_SAS_REJECT_CMD_BIT in hisi_sas_controller_reset_prepare(), released them in hisi_sas_controller_reset_done(). However, if the HW reset failure in FLR results in early return, the semaphore and flag bits will not be release. Rollback some operations including clearing flags / releasing semaphore when FLR is failed. Fixes: e5ea48014adc ("scsi: hisi_sas: Implement handlers of PCIe FLR for v3 hw") Signed-off-by: Yihang Li Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1702525516-51258-5-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit 8dd10296be8562a45c6c6794dd492a2b7dccede8 Author: Yihang Li Date: Thu Dec 14 11:45:14 2023 +0800 scsi: hisi_sas: Check before using pointer variables In commit 4b329abc9180 ("scsi: hisi_sas: Move slot variable definition in hisi_sas_abort_task()"), we move the variables slot to the function head. However, the variable slot may be NULL, we should check it in each branch. Fixes: 4b329abc9180 ("scsi: hisi_sas: Move slot variable definition in hisi_sas_abort_task()") Signed-off-by: Yihang Li Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1702525516-51258-4-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit d34ee535705eb43885bc0f561c63046f697355ad Author: Yihang Li Date: Thu Dec 14 11:45:13 2023 +0800 scsi: hisi_sas: Replace with standard error code return value In function hisi_sas_controller_prereset(), -ENOSYS (Function not implemented) should be returned if the driver does not support .soft_reset. Returns -EPERM (Operation not permitted) if HISI_SAS_RESETTING_BIT is already be set. In function _suspend_v3_hw(), returns -EPERM (Operation not permitted) if HISI_SAS_RESETTING_BIT is already be set. Fixes: 4522204ab218 ("scsi: hisi_sas: tidy host controller reset function a bit") Signed-off-by: Yihang Li Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1702525516-51258-3-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit ce26497c745d0541aec930d5211b431a1c26af97 Author: Yihang Li Date: Thu Dec 14 11:45:12 2023 +0800 scsi: hisi_sas: Set .phy_attached before notifing phyup event HISI_PHYE_PHY_UP_PM Currently in directly attached scenario, the phyup event HISI_PHYE_PHY_UP_PM is notified before .phy_attached is set - this may cause the phyup work hisi_sas_bytes_dmaed() execution failed and the attached device will not be found. To fix it, set .phy_attached before notifing phyup event. Signed-off-by: Yihang Li Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1702525516-51258-2-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Martin K. Petersen commit 6df14a32e935bf40f4e4916ff38202c111c79862 Merge: ae6fd54e60576 838f595a56725 Author: Martin K. Petersen Date: Wed Dec 13 23:17:17 2023 -0500 Merge patch series "Add UFS RTC support" Bean Huo says: Adding RTC support for embedded storage device UFS in its driver, it is important for a few key reasons: 1. Helps with Regular Maintenance: The RTC provides a basic way to keep track of time, making it useful for scheduling routine maintenance tasks in the storage device. This includes things like making sure data is spread evenly across the storage to extend its life. 2. Figuring Out How Old Data Is: The RTC helps the device estimate how long ago certain parts of the storage were last used. This is handy for deciding when to do maintenance tasks to keep the storage working well over time. 3. Making Devices Last Longer: By using the RTC for regular upkeep, we can make sure the storage device lasts longer and stays reliable. This is especially important for devices that need to work well for a long time. 4.Fitting In with Other Devices: The inclusion of RTC support aligns with existing UFS specifications (starting from UFS Spec 2.0) and is consistent with the prevalent industry practice. Many UFS devices currently on the market utilize RTC for internal timekeeping. By ensuring compatibility with this widely adopted standard, the embedded storage device becomes seamlessly integrable with existing hardware and software ecosystems, reducing the risk of compatibility issues. In short, adding RTC support to embedded storage device UFS helps with regular upkeep, extends the device's life, ensures compatibility, and keeps everything running smoothly with the rest of the system. Link: https://lore.kernel.org/r/20231212220825.85255-1-beanhuo@iokpp.de Signed-off-by: Martin K. Petersen commit 838f595a567257e3ac0ac33cdb6bb644ca326cc1 Author: Bean Huo Date: Tue Dec 12 23:08:25 2023 +0100 scsi: ufs: core: Add sysfs node for UFS RTC update Introduce a sysfs node named 'rtc_update_ms' within the kernel, enabling user to adjust the RTC periodic update frequency to suit the specific requirements of the system and UFS. Also, this patch allows the user to disable/enable periodic update RTC in the UFS idle time. Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20231212220825.85255-4-beanhuo@iokpp.de Acked-by: Avri Altman Reviewed-by: Thomas Weißschuh Signed-off-by: Martin K. Petersen commit 6bf999e0eb41850d5c857102535d5c53b2ede224 Author: Bean Huo Date: Tue Dec 12 23:08:24 2023 +0100 scsi: ufs: core: Add UFS RTC support Add Real Time Clock (RTC) support for UFS device. This enhancement is crucial for the internal maintenance operations of the UFS device. The patch enables the device to handle both absolute and relative time information. Furthermore, it includes periodic task to update the RTC in accordance with the UFS Spec, ensuring the accuracy of RTC information for the device's internal processes. RTC and qTimestamp serve distinct purposes. The RTC provides a coarse level of granularity with, at best, approximate single-second resolution. This makes the RTC well-suited for the device to determine the approximate age of programmed blocks after being updated by the host. On the other hand, qTimestamp offers nanosecond granularity and is specifically designed for synchronizing Device Error Log entries with corresponding host-side logs. Given that the RTC has been a standard feature since UFS Spec 2.0, and qTimestamp was introduced in UFS Spec 4.0, the majority of UFS devices currently on the market rely on RTC. Therefore, it is advisable to continue supporting RTC in the Linux kernel. This ensures compatibility with the prevailing UFS device implementations and facilitates seamless integration with existing hardware. By maintaining support for RTC, we ensure broad compatibility and avoid potential issues arising from deviations in device specifications across different UFS versions. Signed-off-by: Bean Huo Signed-off-by: Mike Bi Signed-off-by: Luca Porzio Link: https://lore.kernel.org/r/20231212220825.85255-3-beanhuo@iokpp.de Acked-by: Avri Altman Reviewed-by: Thomas Weißschuh Signed-off-by: Martin K. Petersen commit 9fa268875ca4ff5cad0c1b957388a0aef39920c3 Author: Bean Huo Date: Tue Dec 12 23:08:23 2023 +0100 scsi: ufs: core: Add ufshcd_is_ufs_dev_busy() Add helper inline for retrieving whether UFS device is busy or not. Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20231212220825.85255-2-beanhuo@iokpp.de Reviewed-by: Avri Altman Reviewed-by: Thomas Weißschuh Signed-off-by: Martin K. Petersen commit ae6fd54e605761259d13b4abbee5557f096b0413 Merge: 98bfeda319691 cac50d04fffe2 Author: Martin K. Petersen Date: Wed Dec 13 23:08:18 2023 -0500 Merge patch series "scsi: ufs: qcom: Code cleanups" Manivannan Sadhasivam says: Hello, This series has code some cleanups to the Qcom UFS driver. No functional change. In this version, I've removed code supporting legacy controllers ver < 2.0, as the respective platforms were never supported in upstream. Tested on: RB5 development board based on Qcom SM8250 SoC. Link: https://lore.kernel.org/r/20231208065902.11006-1-manivannan.sadhasivam@linaro.org Signed-off-by: Martin K. Petersen commit cac50d04fffe2ac546a406ea8f5759e0741b2c16 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:29:02 2023 +0530 scsi: ufs: qcom: Remove unused definitions Remove unused definitions. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-18-manivannan.sadhasivam@linaro.org Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 0e9f4375db1ce3fa231d8c7b27dbec9341a2e3ef Author: Manivannan Sadhasivam Date: Fri Dec 8 12:29:01 2023 +0530 scsi: ufs: qcom: Use ufshcd_rmwl() where applicable Instead of using both ufshcd_readl() and ufshcd_writel() to read/modify/ write a register, let's make use of the existing helper. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-17-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 104cd58d9af80f03993607ac86bcd88c10cfba3d Author: Manivannan Sadhasivam Date: Fri Dec 8 12:29:00 2023 +0530 scsi: ufs: qcom: Remove support for host controllers older than v2.0 The legacy platforms making use of host controllers older than version 2.0 are not supported in upstream. So there is no need to carry code to support them. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-16-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 6b481af25ec0edaff8d7b39b2fa17e2f645afc8d Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:59 2023 +0530 scsi: ufs: qcom: Simplify ufs_qcom_{assert/deassert}_reset In both the functions, UFS_PHY_SOFT_RESET contains the mask of the reset bit. So this can be passed directly as the value to be written for asserting the reset. For deasserting, 0 can be passed. This gets rid of the FIELD_PREP() inside these functions and also UFS_PHY_RESET_{ENABLE/DISABLE} definitions. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-15-manivannan.sadhasivam@linaro.org Reviewed-by: Andrew Halaney Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 3b60f4564ff5b0e33d0d256b17594e223f0bcac8 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:58 2023 +0530 scsi: ufs: qcom: Initialize cycles_in_1us variable in ufs_qcom_set_core_clk_ctrl() In case the "core_clk_unipro" clock is not provided, "cycles_in_1us" variable will be used as uninitialized. So initialize it with 0. Issue reported by Smatch tool: drivers/ufs/host/ufs-qcom.c:1336 ufs_qcom_set_core_clk_ctrl() error: uninitialized symbol 'cycles_in_1us'. drivers/ufs/host/ufs-qcom.c:1341 ufs_qcom_set_core_clk_ctrl() error: uninitialized symbol 'cycles_in_1us'. Reviewed-by: Nitin Rawat Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-14-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit be2e06c81a31cf4cf388d80af5ebc9bdc7a8430e Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:57 2023 +0530 scsi: ufs: qcom: Sort includes alphabetically Sort includes alphabetically. Reviewed-by: Nitin Rawat Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-13-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit e7458beab8094bc9b0e1feecaa2c7bef1718aa2f Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:56 2023 +0530 scsi: ufs: qcom: Remove unused ufs_qcom_hosts struct array ufs_qcom_hosts array is assigned, but not used anywhere. So let's remove it. Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-12-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit c7afadacc180ae655aa98577aca8fb5fdfb4a761 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:55 2023 +0530 scsi: ufs: qcom: Use dev_err_probe() to simplify error handling of devm_gpiod_get_optional() As done in other places, let's use dev_err_probe() to simplify the error handling while acquiring the device reset gpio using devm_gpiod_get_optional(). While at it, let's reword the error message to make it clear that the failure is due to acquiring "device reset gpio". Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-11-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 8291652ed8a20b7c19a6fce0ad04cccbd629a620 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:54 2023 +0530 scsi: ufs: qcom: Remove redundant error print for devm_kzalloc() failure devm_kzalloc() will itself print the error message on failure. So let's get rid of the redundant error message in ufs_qcom_init(). Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-10-manivannan.sadhasivam@linaro.org Reviewed-by: Nitin Rawat Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit e430c0e08957d111b068d5c0a3f4ddd1b8d790cb Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:53 2023 +0530 scsi: ufs: qcom: Check the return value of ufs_qcom_power_up_sequence() If ufs_qcom_power_up_sequence() fails, then it makes no sense to enable the lane clocks and continue ufshcd_hba_enable(). So let's check the return value of ufs_qcom_power_up_sequence(). Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-9-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit d11954711499f02fb57d1f6a7022f13b5380c046 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:52 2023 +0530 scsi: ufs: qcom: Fail ufs_qcom_power_up_sequence() when core_reset fails Even though core_reset is optional, a failure during assert/deassert should be considered fatal, if core_reset is available. So fail ufs_qcom_power_up_sequence() if an error happens during reset and also get rid of the redundant warning as the ufs_qcom_host_reset() function itself prints error messages. Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-8-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 0ae7a02726bca95ee9d17de0ccfcd1de0ff4e429 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:51 2023 +0530 scsi: ufs: qcom: Export ufshcd_{enable/disable}_irq helpers and make use of them Instead of duplicating the enable/disable IRQ part, let's export the helpers available in ufshcd driver and make use of them. This also fixes the possible redundant IRQ disable before asserting reset (when IRQ was already disabled). Fixes: 4a791574a0cc ("scsi: ufs: ufs-qcom: Disable interrupt in reset path") Reviewed-by: Bart Van Assche Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-7-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit d42d368647dac42e8e91c10daf3f8261d7996380 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:50 2023 +0530 scsi: ufs: qcom: Remove the warning message when core_reset is not available core_reset is optional, so there is no need to warn the user if it is not available. Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-6-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 1f165c87ec3ec9bd87860f2adef3f1333106f082 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:49 2023 +0530 scsi: ufs: qcom: Remove superfluous variable assignments There are many instances where the variable assignments are not needed. Remove them. Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-5-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 3a747c5cf9b6c36649783b28d2ef8f9c92b16a0f Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:48 2023 +0530 scsi: ufs: qcom: Fix the return value when platform_get_resource_byname() fails The return value should be -ENODEV indicating that the resource is not provided in DT, not -ENOMEM. Fix it! Fixes: c263b4ef737e ("scsi: ufs: core: mcq: Configure resource regions") Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-4-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 3bf7ab4ac30c03beecf57c052e87d5a38fb8aed6 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:47 2023 +0530 scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key() Currently, the function returns -EINVAL if algorithm other than AES-256-XTS is requested. But the correct error code is -EOPNOTSUPP. Fix it! Cc: Abel Vesa Fixes: 56541c7c4468 ("scsi: ufs: ufs-qcom: Switch to the new ICE API") Reviewed-by: Abel Vesa Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-3-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 9caef8568831c3e4bff77036d1515c7abb79eb92 Author: Manivannan Sadhasivam Date: Fri Dec 8 12:28:46 2023 +0530 scsi: ufs: qcom: Use clk_bulk APIs for managing lane clocks Lane clock handling can be simplified by using the clk_bulk APIs. So let's make use of them. This also get's rid of the clock validation in the driver as kernel should just rely on the firmware (DT/ACPI) to provide the clocks required for proper functioning. Reviewed-by: Andrew Halaney Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231208065902.11006-2-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney # sa8775p-ride Signed-off-by: Martin K. Petersen commit 98bfeda319691c2f337b83774c067f5708b802f5 Author: Nitin Rawat Date: Tue Dec 5 15:38:54 2023 +0100 scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string Document the compatible string for the UFS found on SC7280. Signed-off-by: Nitin Rawat Reviewed-by: Krzysztof Kozlowski Reviewed-by: Bao D. Nguyen Acked-by: Manivannan Sadhasivam Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231205-sc7280-ufs-v6-1-ad6ca7796de7@fairphone.com Signed-off-by: Martin K. Petersen commit 90b74d5df60024c79ab64ac4bf306b92a40f0194 Merge: edc22a7c86888 dc7c948d74e12 Author: Martin K. Petersen Date: Wed Dec 13 22:42:38 2023 -0500 Merge patch series "Enable HS-G5 support on SM8550" Can Guo says: This series enables HS-G5 support on SM8550. This series is rebased on below changes from Mani - https://patchwork.kernel.org/project/linux-scsi/patch/20230908145329.154024-1-manivannan.sadhasivam@linaro.org/ https://patchwork.kernel.org/project/linux-scsi/patch/20230908145329.154024-2-manivannan.sadhasivam@linaro.org/ This series is tested on below HW combinations - SM8550 MTP + UFS4.0 SM8550 QRD + UFS3.1 SM8450 MTP + UFS3.1 (for regression test) SM8350 MTP + UFS3.1 (for regression test) Note that during reboot test on above platforms, I occasinally hit PA (PHY) error during the 2nd init, this is not related with this series. A fix for this is mentioned in below patchwork - https://patchwork.kernel.org/project/linux-scsi/patch/1698145815-17396-1-git-send-email-quic_ziqichen@quicinc.com/ Also note that on platforms, which have two sets of UFS PHY settings are provided (say G4 and no-G4, G5 and no-G5). The two sets of PHY settings are basically programming different values to different registers, mixing the two sets and/or overwriting one set with another set is definitely not blessed by UFS PHY designers. For SM8550, this series will make sure we honor the rule. However, for old targets Mani and I will fix them in another series in future. Link: https://lore.kernel.org/r/1701520577-31163-1-git-send-email-quic_cang@quicinc.com Signed-off-by: Martin K. Petersen commit dc7c948d74e12ed9f40328696b301860243a1ae8 Author: Bao D. Nguyen Date: Sat Dec 2 04:36:14 2023 -0800 scsi: ufs: ufs-qcom: Add support for UFS device version detection Start from HW ver 5, a spare register in UFS host controller is added and used to indicate the UFS device version. The spare register is populated by bootloader for now, but in future it will be populated by HW automatically during link startup with its best efforts in any boot stage prior to Linux. During host driver init, read the spare register, if it is not populated with a UFS device version, go ahead with the dual init mechanism. If a UFS device version is in there, use the UFS device version together with host controller's HW version to decide the proper PHY gear which should be used to configure the UFS PHY without going through the second init. Signed-off-by: Bao D. Nguyen Signed-off-by: Can Guo Link: https://lore.kernel.org/r/1701520577-31163-9-git-send-email-quic_cang@quicinc.com Reviewed-by: Manivannan Sadhasivam Reviewed-by: Nitin Rawat Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Martin K. Petersen commit a68abdadfe13fa95a306363fa284b5cf0b79776d Author: Can Guo Date: Sat Dec 2 04:36:13 2023 -0800 scsi: ufs: ufs-qcom: Check return value of phy_set_mode_ext() In ufs_qcom_power_up_sequence(), check return value of phy_set_mode_ext() and stop proceeding if phy_set_mode_ext() fails. Reviewed-by: Nitin Rawat Reviewed-by: Manivannan Sadhasivam Signed-off-by: Can Guo Link: https://lore.kernel.org/r/1701520577-31163-8-git-send-email-quic_cang@quicinc.com Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Martin K. Petersen commit 0bd3cb895d195cdd44da9186bb5b3e0333f1d381 Author: Can Guo Date: Sat Dec 2 04:36:12 2023 -0800 scsi: ufs: ufs-qcom: Set initial PHY gear to max HS gear for HW ver 4 and newer Since HW ver 4, max HS gear can be get from UFS host controller's register, use the max HS gear as the initial PHY gear instead of UFS_HS_G2, so that we don't need to update the hard code for newer targets in future. Reviewed-by: Nitin Rawat Reviewed-by: Manivannan Sadhasivam Signed-off-by: Can Guo Link: https://lore.kernel.org/r/1701520577-31163-7-git-send-email-quic_cang@quicinc.com Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Martin K. Petersen commit 9d8528a833fc0b4f47f7e43481c037390dd9ed71 Author: Can Guo Date: Sat Dec 2 04:36:11 2023 -0800 scsi: ufs: ufs-qcom: Limit HS-G5 Rate-A to hosts with HW version 5 Qcom UFS hosts, with HW ver 5, can only support up to HS-G5 Rate-A due to HW limitations. If the HS-G5 PHY gear is used, update host_params->hs_rate to Rate-A, so that the subsequent power mode changes shall stick to Rate-A. Reviewed-by: Nitin Rawat Reviewed-by: Manivannan Sadhasivam Signed-off-by: Can Guo Link: https://lore.kernel.org/r/1701520577-31163-6-git-send-email-quic_cang@quicinc.com Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Martin K. Petersen commit 743e1f596cccd371e7467fe585a1836773fbd922 Author: Can Guo Date: Sat Dec 2 04:36:10 2023 -0800 scsi: ufs: ufs-qcom: Allow the first init start with the maximum supported gear During host driver init, the phy_gear is set to the minimum supported gear (HS_G2). Then, during the first power mode change, the negotiated gear, say HS-G4, is updated to the phy_gear variable so that in the second init the updated phy_gear can be used to program the PHY. But the current code only allows update the phy_gear to a higher value. If one wants to start the first init with the maximum support gear, say HS-G4, the phy_gear is not updated to HS-G3 if the device only supports HS-G3. The original check added there is intend to make sure the phy_gear won't be updated when gear is scaled down (during clock scaling). Update the check so that one can start the first init with the maximum support gear without breaking the original fix by checking the ufshcd_state, that is, allow update to phy_gear only if power mode change is invoked from ufshcd_probe_hba(). Reviewed-by: Manivannan Sadhasivam Reviewed-by: Nitin Rawat Signed-off-by: Can Guo Link: https://lore.kernel.org/r/1701520577-31163-5-git-send-email-quic_cang@quicinc.com Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Martin K. Petersen commit 55820a7f2cb9b9a4b603cc22dcf0ca5331f86d25 Author: Can Guo Date: Sat Dec 2 04:36:09 2023 -0800 scsi: ufs: ufs-qcom: Setup host power mode during init Setup host power mode and its limitations during UFS host driver init to avoid repetitive work during every power mode change. Acked-by: Andrew Halaney Reviewed-by: Nitin Rawat Reviewed-by: Manivannan Sadhasivam Co-developed-by: Bao D. Nguyen Signed-off-by: Bao D. Nguyen Signed-off-by: Can Guo Link: https://lore.kernel.org/r/1701520577-31163-4-git-send-email-quic_cang@quicinc.com Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Martin K. Petersen commit dc604b4c9d6007c0a03ad90296e849bc38c0d2cc Author: Can Guo Date: Sat Dec 2 04:36:08 2023 -0800 scsi: ufs: ufs-qcom: No need to set hs_rate after ufshcd_init_host_param() In ufs_qcom_pwr_change_notify(), host_params.hs_rate has been set to PA_HS_MODE_B by ufshcd_init_host_param(), hence remove the duplicated line of work. Meanwhile, removed the macro UFS_QCOM_LIMIT_HS_RATE as it is only used here. Reviewed-by: Nitin Rawat Reviewed-by: Manivannan Sadhasivam Reviewed-by: Andrew Halaney Signed-off-by: Can Guo Link: https://lore.kernel.org/r/1701520577-31163-3-git-send-email-quic_cang@quicinc.com Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Martin K. Petersen commit fa3dca8251c4fff88da9f64ba931942638ab0c00 Author: Can Guo Date: Sat Dec 2 04:36:07 2023 -0800 scsi: ufs: host: Rename structure ufs_dev_params to ufs_host_params Structure ufs_dev_params is actually used in UFS host drivers to declare host specific power mode parameters, like ufs__params or host_cap, which makes the code not very straightforward to read. Rename the structure ufs_dev_params to ufs_host_params and unify the declarations in all drivers to host_params. In addition, rename the two functions ufshcd_init_pwr_dev_param() and ufshcd_get_pwr_dev_param() which work based on the ufs_host_params to ufshcd_init_host_params() and ufshcd_negotiate_pwr_params() respectively to avoid confusions. This change does not change any functionalities or logic. Acked-by: Andrew Halaney Reviewed-by: Nitin Rawat Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bart Van Assche Signed-off-by: Can Guo Link: https://lore.kernel.org/r/1701520577-31163-2-git-send-email-quic_cang@quicinc.com Reviewed-by: Peter Wang Tested-by: Neil Armstrong # on SM8550-QRD Signed-off-by: Martin K. Petersen commit edc22a7c86888d1f2442e359c3b33a861045e9cd Author: Justin Stitt Date: Tue Dec 12 23:19:06 2023 +0000 scsi: fcoe: Use sysfs_match_string() over fcoe_parse_mode() Instead of copying @buf into a new buffer and carefully managing its newline/null-terminating status, we can just use sysfs_match_string() as it uses sysfs_streq() internally which handles newline/null-term: | /** | * sysfs_streq - return true if strings are equal, modulo trailing newline | * @s1: one string | * @s2: another string | * | * This routine returns true iff two strings are equal, treating both | * NUL and newline-then-NUL as equivalent string terminations. It's | * geared for use with sysfs input strings, which generally terminate | * with newlines but are compared against values without newlines. | */ | bool sysfs_streq(const char *s1, const char *s2) | ... Then entirely drop the now unused fcoe_parse_mode(), being careful to change if condition from checking for FIP_CONN_TYPE_UNKNOWN to < 0 as sysfs_match_string() can return -EINVAL. Also check explicitly if ctlr->mode is equal to FIP_CONN_TYPE_UNKNOWN -- this is probably preferred to "<=" as the behavior is more obvious while maintaining functionality. To get the compiler not to complain, make fip_conn_type_names const char * const. Perhaps, this should also be done for fcf_state_names. This also removes an instance of strncpy() which helps [1]. Link: https://github.com/KSPP/linux/issues/90 [1] Cc: Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20231212-strncpy-drivers-scsi-fcoe-fcoe_sysfs-c-v2-1-1f2d6b2fc409@google.com Reviewed-by: Kees Cook Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 33c3e71066b8cab41d51c503f032bb540ed5e1ca Merge: a6478b26c88a6 819952d58478b Author: Martin K. Petersen Date: Wed Dec 13 22:19:32 2023 -0500 Merge patch series "lpfc: Update lpfc to revision 14.2.0.17" Justin Tee says: Update lpfc to revision 14.2.0.17 This patch set contains bug fixes for the VMID feature. The patches were cut against Martin's 6.8/scsi-queue tree. Link: https://lore.kernel.org/r/20231207224039.35466-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 819952d58478b121bab52c1bf6ec21e46e752191 Author: Justin Tee Date: Thu Dec 7 14:40:39 2023 -0800 scsi: lpfc: Update lpfc version to 14.2.0.17 Update lpfc version to 14.2.0.17 Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231207224039.35466-5-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit aba0fb0ef607a71511d23a07406f11130c1a54c5 Author: Justin Tee Date: Thu Dec 7 14:40:38 2023 -0800 scsi: lpfc: Move determination of vmid_flag after VMID reinitialization completes If priority tagging is set in the service parameters of a FLOGI cmpl, then we update the vmid_flag. In the current logic, if a follow up FLOGI cmpl updates its service parameters such that priority tagging is no longer set, then the vmid_flag ends up keeping stale data. Fix by ensuring we clear the vmid_flag member during lpfc_reinit_vmid, and check the priority tagging service parameter after reinitialization of the vmid data structures. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231207224039.35466-4-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 8dc8eb89f4df74593ba4bf30c3d31a0fc6d3ea47 Author: Justin Tee Date: Thu Dec 7 14:40:37 2023 -0800 scsi: lpfc: Reinitialize an NPIV's VMID data structures after FDISC After a follow up FDISC cmpl, an NPIV's VMID data structures are not updated. Fix by calling lpfc_reinit_vmid and copying the physical port's vmid_flag to the NPIV's vmid_flag in the NPIV registration cmpl code path. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231207224039.35466-3-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit 0653d40935f7cc125bfab34fd702559c61ce7560 Author: Justin Tee Date: Thu Dec 7 14:40:36 2023 -0800 scsi: lpfc: Change VMID driver load time parameters to read only VMID driver support is a load time configuration setting. Thus, change sysfs attributes to read only. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231207224039.35466-2-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit a6478b26c88a68fb43e7fc3d6ef603b47832e3d7 Merge: fc1fbd13a2059 53021c192cc55 Author: Martin K. Petersen Date: Wed Dec 13 22:13:38 2023 -0500 Merge patch series "Introduce support for multiqueue (MQ) in fnic" Karan Tilak Kumar says: Hi Martin, reviewers, This cover letter describes the feature: add support for multiqueue (MQ) to fnic driver. Background: The Virtual Interface Card (VIC) firmware exposes several queues that can be configured for sending IOs and receiving IO responses. Unified Computing System Manager (UCSM) and Intersight Manager (IMM) allows users to configure the number of queues to be used for IOs. The number of IO queues to be used is stored in a configuration file by the VIC firmware. The fNIC driver reads the configuration file and sets the number of queues to be used. Previously, the driver was hard-coded to use only one queue. With this set of changes, the fNIC driver will configure itself to use multiple queues. This feature takes advantage of the block multiqueue layer to parallelize IOs being sent out of the VIC card. Here's a brief description of some of the salient patches: - vnic_scsi.h needs to be in sync with VIC firmware to be able to read the number of queues from the firmware config file. A patch has been created for this. - In an environment with many fnics (like we see in our customer environments), it is hard to distinguish which fnic is printing logs. Therefore, an fnic number has been included in the logs. - read the number of queues from the firmware config file. - include definitions in fnic.h to support multiqueue. - modify the interrupt service routines (ISRs) to read from the correct registers. The numbers that are used here come from discussions with the VIC firmware team. - track IO statistics for different queues. - remove usage of host_lock, and only use fnic_lock in the fnic driver. - use a hardware queue based spinlock to protect io_req. - replace the hard-coded zeroth queue with a hardware queue number. This presents a bulk of the changes. - modify the definition of fnic_queuecommand to accept multiqueue tags. - improve log messages, and indicate fnic number and multiqueue tags for effective debugging. Even though the patches have been made into a series, some patches are heavier than others. But, every effort has been made to keep the purpose of each patch as a single-purpose, and to compile cleanly. This patchset has been tested as a whole. Therefore, the tested-by fields have been added only to two patches in the set. All the individual patches compile cleanly. However, I've refrained from adding tested-by to most of the patches, so as to not mislead the reviewer/reader. A brief note on the unit tests: 1. Increase number of queues to 64. Load driver. Run IOs via Medusa. 12+ hour run successful. 2. Configure multipathing, and run link flaps on single link. IOs drop briefly, but pick up as expected. 3. Configure multipathing, and run link flaps on two links, with a 30 second delay in between. IOs drop briefly, but pick up as expected. Repeat the above tests with 1 queue and 32 queues. All tests were successful. Please consider this patch series for the next merge window. Link: https://lore.kernel.org/r/20231211173617.932990-1-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 53021c192cc55074eee744cb41dcdfb9318d1f80 Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:17 2023 -0800 scsi: fnic: Increment driver version Increment driver version for multiqueue (MQ). Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-14-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 55cf715244a7dfda42191445d97628e837158091 Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:16 2023 -0800 scsi: fnic: Improve logs and add support for multiqueue (MQ) Improve existing logs by adding fnic number, hardware queue, tag, and mqtag in the prints. Add logs with the above elements for effective debugging. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Tested-by: Karan Tilak Kumar Reviewed-by: Hannes Reinecke Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-13-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit c81df08cd2944f89921033e5f1744ae2960f4e69 Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:15 2023 -0800 scsi: fnic: Add support for multiqueue (MQ) in fnic driver Implement support for MQ in fnic driver: The block multiqueue layer issues IO to the fnic driver with an MQ tag. Use the mqtag and derive a tag from it. Derive the hardware queue from the mqtag and use it in all paths. Modify queuecommand to handle mqtag. Replace wq and cq indices to support MQ. Replace the zeroth queue with a hardware queue. Implement spin locks on a per hardware queue basis. Replace io_lock with per hardware queue spinlock. Implement out of range tag checks. Allocate an io_req_table to track status of the io_req. Test the driver by building it, loading it, and configuring 64 queues in UCSM. Issue IOs using Medusa on multiple fnics. Enable/disable links to exercise the abort and clean up path. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310300032.2awCqkfn-lkp@intel.com/ Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Tested-by: Karan Tilak Kumar Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-12-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 52f6e196e52ef834f928aac297d895f4c32276ea Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:14 2023 -0800 scsi: fnic: Add support for multiqueue (MQ) in fnic_main.c Set map_queues in the fnic_host_template to fnic_mq_map_queues_cpus. Define fnic_mq_map_queues_cpus to set cpu assignment to fnic queues. Refactor code in fnic_probe to enable vnic queues before scsi_add_host. Modify notify set to the correct index. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-11-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 848d010ab934f1b4326a516396873ddae41db056 Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:13 2023 -0800 scsi: fnic: Remove usage of host_lock Remove usage of host_lock. Replace with fnic_lock, where necessary. fnic does not use host_lock. fnic uses fnic_lock. Use fnic lock to protect fnic members in fnic_queuecommand. Add log messages in error cases. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-10-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit b559b827716cadba8b87620ab15e39fe22160cf2 Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:12 2023 -0800 scsi: fnic: Define stats to track multiqueue (MQ) IOs Define an array to track IOs for the different queues, print the IO stats in fnic get stats data. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Reviewed-by: Hannes Reinecke Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-9-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 8a8449ca5e33b96515ea5c46de217e697d249cf9 Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:11 2023 -0800 scsi: fnic: Modify ISRs to support multiqueue (MQ) Modify interrupt service routines for INTx, MSI, and MSI-x to support multiqueue. Modify parameter list of fnic_wq_copy_cmpl_handler to take cq_index. Modify fnic_cleanup function to use the new function call of fnic_wq_copy_cmpl_handler. Refactor code to set interrupt mode to MSI-x to a new function. Add a new stat for intx_dummy. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310251847.4T8BVZAZ-lkp@intel.com/ Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-8-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 554a1482602099efc9a3d0921a0e8f6123dc09cd Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:10 2023 -0800 scsi: fnic: Refactor and redefine fnic.h for multiqueue Refactor and re-define values in fnic.h to implement multiqueue (MQ) functionality. VIC firmware allows fnic to create up to 64 copy workqueues. Update the copy workqueue max to 64. Modify the interrupt index to be in sync with the firmware to support MQ. Add irq number to the MSIX entry. Define a software workqueue table to track the status of io_reqs. Define a base for the copy workqueue. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-7-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 8c2a6f815a18f261a03b387cd4236886aad68d7f Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:09 2023 -0800 scsi: fnic: Get copy workqueue count and interrupt mode from config Get the copy workqueue count and interrupt mode from the configuration. The config can be changed via UCSM. Add logs to print the interrupt mode and copy workqueue count. Add logs to print the vNIC resources. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Reviewed-by: Hannes Reinecke Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-6-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 86b86a7d2fdaf989af1aca2a8e7e2380fb4388ad Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:08 2023 -0800 scsi: fnic: Rename wq_copy to hw_copy_wq Rename wq_copy to hw_copy_wq to accurately describe the copy workqueue. This will also help distinguish this data structure from software data structures that can be introduced. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Reviewed-by: Hannes Reinecke Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-5-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 3df9dd0d51c2e4b0c4a400f8ce94308a2d93ef61 Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:07 2023 -0800 scsi: fnic: Add and improve log messages Add link related log messages in fnic_fcs.c, Improve log message in fnic_fcs.c, Add log message in vnic_dev.c. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-4-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit ca008aeeb02cb15eba4acc6c82e3432a1757b642 Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:06 2023 -0800 scsi: fnic: Add and use fnic number Add fnic_num in fnic.h to identify fnic in a multi-fnic environment. Increment and set the fnic number during driver load in fnic_probe. Replace the host number with fnic number in debugfs. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-3-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit 2cda90e6f6493622bb68e0dd073c5b5746a480cb Author: Karan Tilak Kumar Date: Mon Dec 11 09:36:05 2023 -0800 scsi: fnic: Modify definitions to sync with VIC firmware VIC firmware has updated definitions. Modify structure and definitions to sync with the latest VIC firmware. Reviewed-by: Sesidhar Baddela Reviewed-by: Arulprabhu Ponnusamy Reviewed-by: Hannes Reinecke Signed-off-by: Karan Tilak Kumar Link: https://lore.kernel.org/r/20231211173617.932990-2-kartilak@cisco.com Signed-off-by: Martin K. Petersen commit a4dca89fe8a1585af73e362f5f4e3189a00abf8e Author: Fabio Estevam Date: Tue Dec 12 14:48:47 2023 -0300 arm64: dts: imx8mp-dhcom-pdk3: Describe the USB-C connector Describe the PTN5150 USB-C connector to improve the devicetree description and fix the following dt-schema warning: imx8mp-dhcom-pdk3.dtb: typec@3d: 'port' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 095b96b2b8c6dcabf40bbfe4bb99a95fe55c7463 Author: Fabio Estevam Date: Tue Dec 12 14:48:46 2023 -0300 arm64: dts: imx8mn-var-som-symphony: Describe the USB-C connector Describe the PTN5150 USB-C connector to improve the devicetree description and fix the following dt-schema warning: imx8mn-var-som-symphony.dtb: typec@3d: 'port' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/extcon/extcon-ptn5150.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 18783f5cf350a65bc2082dd234f11b1a83d083af Author: Fabio Estevam Date: Wed Dec 13 18:18:47 2023 -0300 arm64: dts: imx8mp-tqma8mpql-mba8mpxl: Fix USB connector description The USB connector should not be placed under the dwc3 node. Move the USB connector out of the SoC level and use port to describe the connection to the dwc3 controller. This fixes the following dt-schema warning: imx8mp-tqma8mpql-mba8mpxl.dtb: usb@38100000: Unevaluated properties are not allowed ('connector' was unexpected) from schema $id: http://devicetree.org/schemas/usb/snps,dwc3.yaml# Signed-off-by: Fabio Estevam Reviewed-by: Alexander Stein Tested-by: Alexander Stein Signed-off-by: Shawn Guo commit ad9a12f7a5227c7603ff41963a493cea89b88d88 Author: Fabio Estevam Date: Wed Dec 13 18:18:46 2023 -0300 arm64: dts: imx8mp-venice: Fix USB connector description The USB connector should not be placed under the dwc3 node. Move the USB connector out of the SoC level and use port to describe the connection to the dwc3 controller. This fixes the following dt-schema warning: imx8mp-venice-gw72xx-2x.dtb: usb@38100000: Unevaluated properties are not allowed ('connector' was unexpected) from schema $id: http://devicetree.org/schemas/usb/snps,dwc3.yaml# Signed-off-by: Fabio Estevam Acked-by: Tim Harvey Signed-off-by: Shawn Guo commit 742e163a791b0d4f992fdf28d20f7b80e0408708 Author: Fabio Estevam Date: Wed Dec 13 18:18:45 2023 -0300 arm64: dts: imx8mp-verdin: Fix USB connector description The USB connector should not be placed under the dwc3 node. Move the USB connector out of the SoC level and use port to describe the connection to the dwc3 controller. This fixes the following dt-schema warning: imx8mp-verdin-wifi-mallow.dtb: usb@32f10100: usb@38100000: Unevaluated properties are not allowed ('connector' was unexpected) from schema $id: http://devicetree.org/schemas/usb/fsl,imx8mp-dwc3.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit b34dd34d12e04740085058b7e612f56a980a3f83 Author: Fabio Estevam Date: Mon Dec 11 14:24:35 2023 -0300 arm64: dts: imx8dxl-ss-conn: Move clk_dummy out of USB node The clk_dummy is not part of the usbotg2 block, so move it to the root node to fix the following dt-schema warning: imx8dxl-evk.dtb: usb@5b0e0000: Unevaluated properties are not allowed ('clock-dummy' was unexpected) from schema $id: http://devicetree.org/schemas/usb/ci-hdrc-usb2.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit ded572f3e05dcf527ef4f6cbabedfe471eb5a3fb Author: Fabio Estevam Date: Thu Dec 7 12:58:42 2023 -0300 arm64: dts: imx8mn-evk: Move port under USB connector Per nxp,ptn5110.yaml, 'port' should be placed under 'connector'. Do as requested to fix the following dt-schema warning: imx8mn-evk.dtb: tcpc@50: 'port' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/usb/nxp,ptn5110.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit de0bae0b75f288381746bb9f6d6fd1b30f397975 Author: Fabio Estevam Date: Thu Dec 7 12:58:41 2023 -0300 arm64: dts: imx8mm-evk: Move port under USB connector Per nxp,ptn5110.yaml, 'port' should be placed under 'connector'. Do as requested to fix the following dt-schema warning: imx8mm-evkb.dtb: tcpc@50: 'port' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/usb/nxp,ptn5110.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit b11c01579b48390569c1565f0e7897c77e38dd9c Author: Hugo Villeneuve Date: Thu Dec 7 10:05:19 2023 -0500 arm64: dts: freescale: introduce dimonoff-gateway-evk board The Dimonoff gateway EVK board is based on a Variscite VAR-SOM-NANO, with a NXP MX8MN nano CPU and also based on a Symphony mx8mn EVK. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Hugo Villeneuve Signed-off-by: Shawn Guo commit 6cbac23b309cc6454779703a741392df4e80455f Author: Hugo Villeneuve Date: Thu Dec 7 10:05:18 2023 -0500 dt-bindings: arm: fsl: add Dimonoff gateway EVK board Add DT compatible string for Dimonoff gateway EVK board based on a Variscite VAR-SOM-NANO with a NXP MX8MN nano CPU. Signed-off-by: Hugo Villeneuve Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ef510cbd92c0ba9cf770c9e1fcdefbd7d0837d8c Author: Hugo Villeneuve Date: Thu Dec 7 10:05:17 2023 -0500 dt-bindings: vendor-prefixes: add dimonoff Add vendor prefix for Dimonoff, which provides IoT smart solutions and custom engineering services. Acked-by: Krzysztof Kozlowski Signed-off-by: Hugo Villeneuve Signed-off-by: Shawn Guo commit 0a149ab78ee220c75eef797abea7a29f4490e226 Author: Liang Chen Date: Tue Dec 12 12:46:11 2023 +0800 page_pool: transition to reference count management after page draining To support multiple users referencing the same fragment, 'pp_frag_count' is renamed to 'pp_ref_count', transitioning pp pages from fragment management to reference count management after draining based on the suggestion from [1]. The idea is that the concept of fragmenting exists before the page is drained, and all related functions retain their current names. However, once the page is drained, its management shifts to being governed by 'pp_ref_count'. Therefore, all functions associated with that lifecycle stage of a pp page are renamed. [1] http://lore.kernel.org/netdev/f71d9448-70c8-8793-dc9a-0eb48a570300@huawei.com Signed-off-by: Liang Chen Reviewed-by: Yunsheng Lin Reviewed-by: Ilias Apalodimas Reviewed-by: Mina Almasry Link: https://lore.kernel.org/r/20231212044614.42733-2-liangchen.linux@gmail.com Signed-off-by: Jakub Kicinski commit bc044ae9d64b1b23fa3a3aa5c162afec8348b412 Author: Kees Cook Date: Tue Dec 12 14:09:57 2023 -0800 cxgb3: Avoid potential string truncation in desc Builds with W=1 were warning about potential string truncations: drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c: In function 'cxgb_up': drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:394:38: warning: '%d' directive output may be truncated writing between 1 and 11 bytes into a region of size between 5 and 20 [-Wformat-truncation=] 394 | "%s-%d", d->name, pi->first_qset + i); | ^~ In function 'name_msix_vecs', inlined from 'cxgb_up' at drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:1264:3: drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:394:34: note: directive argument in the range [-2147483641, 509] 394 | "%s-%d", d->name, pi->first_qset + i); | ^~~~~~~ drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c:393:25: note: 'snprintf' output between 3 and 28 bytes into a destination of size 21 393 | snprintf(adap->msix_info[msi_idx].desc, n, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 394 | "%s-%d", d->name, pi->first_qset + i); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Avoid open-coded %NUL-termination (this code was assuming snprintf wasn't %NUL terminating when it does -- likely thinking of strncpy), and grow the size of the string to handle a maximal value. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312100937.ZPZCARhB-lkp@intel.com/ Cc: Raju Rangoju Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20231212220954.work.219-kees@kernel.org Signed-off-by: Jakub Kicinski commit 84cc99199a34ba894371041caacc95c2a03b3700 Author: Kees Cook Date: Tue Dec 12 14:13:12 2023 -0800 amd-xgbe: Avoid potential string truncation in name Build with W=1 were warning about a potential string truncation: drivers/net/ethernet/amd/xgbe/xgbe-drv.c: In function 'xgbe_alloc_channels': drivers/net/ethernet/amd/xgbe/xgbe-drv.c:211:73: warning: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size 8 [-Wformat-truncation=] 211 | snprintf(channel->name, sizeof(channel->name), "channel-%u", i); | ^~ drivers/net/ethernet/amd/xgbe/xgbe-drv.c:211:64: note: directive argument in the range [0, 4294967294] 211 | snprintf(channel->name, sizeof(channel->name), "channel-%u", i); | ^~~~~~~~~~~~ drivers/net/ethernet/amd/xgbe/xgbe-drv.c:211:17: note: 'snprintf' output between 10 and 19 bytes into a destination of size 16 211 | snprintf(channel->name, sizeof(channel->name), "channel-%u", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Increase the size of the "name" buffer to handle the full format range. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312100937.ZPZCARhB-lkp@intel.com/ Cc: Shyam Sundar S K Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20231212221312.work.830-kees@kernel.org Signed-off-by: Jakub Kicinski commit 97f265ef7f5b526b33d6030b2a1fc69a2259bf4a Author: Jiri Pirko Date: Tue Dec 12 16:06:05 2023 +0100 dpll: allocate pin ids in cycle Pin ID is just a number. Nobody should rely on a certain value, instead, user should use either pin-id-get op or RTNetlink to get it. Unify the pin ID allocation behavior with what there is already implemented for dpll devices. Signed-off-by: Jiri Pirko Link: https://lore.kernel.org/r/20231212150605.1141261-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit 4746b36b1abe11ca32987b2d21e1e770deab17cc Author: Eric Dumazet Date: Tue Dec 12 14:55:50 2023 +0000 sctp: support MSG_ERRQUEUE flag in recvmsg() For some reason sctp_poll() generates EPOLLERR if sk->sk_error_queue is not empty but recvmsg() can not drain the error queue yet. This is needed to better support timestamping. I had to export inet_recv_error(), since sctp can be compiled as a module. Signed-off-by: Eric Dumazet Cc: Marcelo Ricardo Leitner Cc: Willem de Bruijn Acked-by: Xin Long Link: https://lore.kernel.org/r/20231212145550.3872051-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 3e33493b44809664b6d796d24292b3f678f58001 Author: Alexander Stein Date: Thu Dec 7 15:54:01 2023 +0100 arm64: dts: imx8m*-tqma8m*: Add chassis-type Device tree specification 0.4 defines an optional, but recommended 'chassis-type' property. Add it to TQMa8M* based board files. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 0987be3931ad92336cd9409fde3a977403d8592d Author: Adam Ford Date: Tue Nov 28 15:18:32 2023 -0600 arm64: dts: imx8mn-beacon: Support overdrive mode The SoC is configured to operate in overdrive mode, so it is safe to include imx8mn-overdrive to run the GPU faster. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit dc1c6cf226dc99161a477e8b4488dfe97e0fa928 Author: Adam Ford Date: Tue Nov 28 15:18:31 2023 -0600 arm64: dts: imx8mn: Enable Overdrive mode The i.MX8M Nano supports and overdrive mode if the SoC is given the proper voltage. Add imx8mn-overdrive.dtsi file which can be included by boards who support the voltage necessary to handle the faster clocks. This increases the GPU clocks from 400MHz to 600MHz. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 36d8afbb2b89cdd4af1051d0a9afebb5511099df Merge: 173b6d1cdf582 9b1aa3ef2328a Author: Jakub Kicinski Date: Wed Dec 13 18:22:10 2023 -0800 Merge branch 'idpf-add-get-set-for-ethtool-s-header-split-ringparam' Alexander Lobakin says: ==================== idpf: add get/set for Ethtool's header split ringparam Currently, the header split feature (putting headers in one smaller buffer and then the data in a separate bigger one) is always enabled in idpf when supported. One may want to not have fragmented frames per each packet, for example, to avoid XDP frags. To better optimize setups for particular workloads, add ability to switch the header split state on and off via Ethtool's ringparams, as well as to query the current status. There's currently only GET in the Ethtool Netlink interface for now, so add SET first. I suspect idpf is not the only one supporting this. ==================== Link: https://lore.kernel.org/r/20231212142752.935000-1-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski commit 9b1aa3ef2328aeef35b388c4c22323eaa792c1aa Author: Michal Kubiak Date: Tue Dec 12 15:27:52 2023 +0100 idpf: add get/set for Ethtool's header split ringparam idpf supports the header split feature and that feature is always enabled by default. However, for flexibility reasons and to simplify some scenarios, it would be useful to have the support for switching the header split off (and on) from the userspace. Address that need by adding the user config parameter, the functions for disabling (or enabling) the header split feature, and calls to them from the Ethtool ringparam callbacks. It still is enabled by default if supported by the hardware. Reviewed-by: Przemek Kitszel Signed-off-by: Michal Kubiak Co-developed-by: Alexander Lobakin Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20231212142752.935000-3-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski commit 50d73710715de7d1a2c88194562f520816af9c2a Author: Alexander Lobakin Date: Tue Dec 12 15:27:51 2023 +0100 ethtool: add SET for TCP_DATA_SPLIT ringparam Follow up commit 9690ae604290 ("ethtool: add header/data split indication") and add the set part of Ethtool's header split, i.e. ability to enable/disable header split via the Ethtool Netlink interface. This might be helpful to optimize the setup for particular workloads, for example, to avoid XDP frags, and so on. A driver should advertise ``ETHTOOL_RING_USE_TCP_DATA_SPLIT`` in its ops->supported_ring_params to allow doing that. "Unknown" passed from the userspace when the header split is supported means the driver is free to choose the preferred state. Reviewed-by: Przemek Kitszel Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/20231212142752.935000-2-aleksander.lobakin@intel.com Signed-off-by: Jakub Kicinski commit 6557e92e233644172eeb31c900b1c9711fcdf5c8 Author: Adam Ford Date: Tue Nov 28 14:02:18 2023 -0600 arm64: dts: imx8mm-beacon: Enable overdrive mode The SoC runs at a high enough voltage to support overdrive mode, so include the imx8mm-overdrive.dtsi file to increase the VPU and GPU clocks to their overdrive speeds. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 7832a091d768a005020a37c2568f76ae4147b809 Author: Adam Ford Date: Tue Nov 28 14:02:17 2023 -0600 arm64: dts: imx8mm: Add optional overdrive DTSI For boards who run their SoC at a higher voltage than nominal, the boards can run several clocks at an overdrive rate for better performance. Add an optional DTSI file which can be included by various boards to run in overdrive mode. This raises the GPU PLL to 1000MHz, and the VPU PLL to 700MHz while moving VPU_G1 and VPU_H1 to the SYS_PLL3_OUT which runs at 750MHz. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 1f794d3eed5345413c2b0cf1bcccc92d77681220 Author: Adam Ford Date: Tue Nov 28 14:02:16 2023 -0600 arm64: dts: imx8mm: Reduce GPU to nominal speed When the GPU nodes were added, the GPU_PLL_OUT was configured for 1000MHz, but this requires the SoC to run in overdrive mode which requires an elevated voltage operating point. Since this may run some boards out of spec, the default clock should be set to 800MHz for nominal operating mode. Boards that run at the higher voltage can update their clocks accordingly. Fixes: 4523be8e46be ("arm64: dts: imx8mm: Add GPU nodes for 2D and 3D core") Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 173b6d1cdf582e7438b3ab4ef2f40e6833579490 Author: Eric Dumazet Date: Tue Dec 12 11:06:08 2023 +0000 docs: networking: timestamping: mention MSG_EOR flag TCP got MSG_EOR support in linux-4.7. This is a canonical way of making sure no coalescing will be performed on the skb, even if it could not be immediately sent. Signed-off-by: Eric Dumazet Cc: Martin KaFai Lau Acked-by: Willem de Bruijn Link: https://lore.kernel.org/r/20231212110608.3673677-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 30ee6bf64ce8a1b2321265b105972618891977be Author: Fabio Estevam Date: Thu Dec 7 09:20:56 2023 -0300 arm64: dts: imx93: Fix the micfil clock-names entries fsl,micfil.yaml defines the clock-names in the following sequence: clock-names: items: - const: ipg_clk - const: ipg_clk_app - const: pll8k - const: pll11k - const: clkext3 minItems: 2 imx93.dtsi currently misses the 'pll11k' entry and jump to 'clkext3'. This leads to the following dt-schema warning: imx93-11x11-evk.dtb: micfil@44520000: clock-names:3: 'pll11k' was expected from schema $id: http://devicetree.org/schemas/sound/fsl,micfil.yaml# Fix the warning by describing the clocks up to 'pll8k' as 'clkext3' is assigned to a dummy clock. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 858d83ca4b50bbc8693d95cc94310e6d791fb2e6 Author: Fabio Estevam Date: Thu Dec 7 07:26:31 2023 -0300 ARM: dts: imx23/28: Fix the DMA controller node name Per fsl,mxs-dma.yaml, the node name should be 'dma-controller'. Change it to fix the following dt-schema warning. imx28-apf28.dtb: dma-apbx@80024000: $nodename:0: 'dma-apbx@80024000' does not match '^dma-controller(@.*)?$' from schema $id: http://devicetree.org/schemas/dma/fsl,mxs-dma.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit e3aa1a82fb20ee97597022f6528823a8ab82bde6 Author: Fabio Estevam Date: Thu Dec 7 07:12:12 2023 -0300 ARM: dts: imx23-sansa: Use preferred i2c-gpios properties The 'gpios' property to describe the SDA and SCL GPIOs is considered deprecated according to i2c-gpio.yaml. Switch to the preferred 'sda-gpios' and 'scl-gpios' properties. This fixes the following schema warnings: imx23-sansa.dtb: i2c-0: 'sda-gpios' is a required property from schema $id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml# imx23-sansa.dtb: i2c-0: 'scl-gpios' is a required property from schema $id: http://devicetree.org/schemas/i2c/i2c-gpio.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit dc35e253d032b959d92e12f081db5b00db26ae64 Author: Fabio Estevam Date: Wed Dec 6 17:19:05 2023 -0300 ARM: dts: imx27-apf27dev: Fix LED name Per leds-gpio.yaml, the led names should start with 'led'. Change it to fix the following dt-schema warning: imx27-apf27dev.dtb: leds: 'user' does not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/leds/leds-gpio.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 952f9a5f4b0904255ef3dfa58f325fa3e5f045fb Author: Jiapeng Chong Date: Fri Nov 17 15:19:47 2023 +0800 net/mlx5: DR, Use swap() instead of open coding it Swap is a function interface that provides exchange function. To avoid code duplication, we can use swap function. ./drivers/net/ethernet/mellanox/mlx5/core/steering/dr_action.c:1254:50-51: WARNING opportunity for swap(). Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7580 Signed-off-by: Jiapeng Chong Reviewed-by: Przemek Kitszel Signed-off-by: Saeed Mahameed commit 9bb1ac80738a699d911684a67333d9cc8a95739a Author: Tariq Toukan Date: Mon Aug 21 14:31:35 2023 +0300 net/mlx5: devcom, Add component size getter Add a getter for the number of participants in a devcom component (those who share the same component id and key). Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit db52aa6df8559759f0c0dc2cd5e4da0cc54d8f65 Author: Tariq Toukan Date: Fri Aug 4 21:46:18 2023 +0300 net/mlx5e: Decouple CQ from priv Make CQ struct and methods independent of "priv", use more basic arguments instead. This will ease the transition to netdev with multiple mdevs. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit b1a33e65134786b9ef97f978572531c6004c8526 Author: Tariq Toukan Date: Thu Aug 17 11:49:04 2023 +0300 net/mlx5e: Add wrapping for auxiliary_driver ops and remove unused args Turn some of the struct auxiliary_driver ops into wrappers to stop having dummy local vars passed as unused arguments. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit c909eec537ce18e779f781f1763d1d1c991419e8 Author: Tariq Toukan Date: Tue Aug 22 13:49:22 2023 +0300 net/mlx5e: Statify function mlx5e_monitor_counter_arm Function usage is limited to the monitor_stats.c file, do not expose it. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit b25bd37c859f32e50a436ab9d2078b76e433008e Author: Tariq Toukan Date: Sun Aug 6 14:01:10 2023 +0300 net/mlx5: Move TISes from priv to mdev HW resources The transport interface send (TIS) object is responsible for performing all transport related operations of the transmit side. Messages from Send Queues get segmented and transmitted by the TIS including all transport required implications, e.g. in the case of large send offload, the TIS is responsible for the segmentation. These are stateless objects and can be used by multiple netdevs (e.g. representors) who share the same core device. Providing the TISes as a service from the core layer to the netdev layer reduces the number of replecated TIS objects (in case of multiple netdevs), and will ease the transition to netdev with multiple mdevs. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 249e521741de23c0103d5ffd19b1fb1181575041 Author: Tariq Toukan Date: Thu Aug 10 17:42:36 2023 +0300 net/mlx5e: Remove TLS-specific logic in generic create TIS API TLS TISes are created using their own dedicated functions, don't honor their specific logic here. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 3c9c34c32bc653a8992fef7d525889254d90b307 Author: Tariq Toukan Date: Tue Dec 5 12:07:29 2023 +0200 net/mlx5: fs, Command to control TX flow table root Introduce an API to set/unset the TX flow table root for a device. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit dc6981ebc922e50798f3f080dfa53ac210109533 Author: Tariq Toukan Date: Mon Aug 7 09:09:04 2023 +0300 net/mlx5: fs, Command to control L2TABLE entry silent mode Introduce an API to set/unset the L2TABLE entry silent mode for a device. If silent, no north/south traffic is allowed, the device won't be able to communicate with the port directly to send/receive traffic by its own. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit f5e956329960903d908668d7a20bbc08e0a8b92b Author: Tariq Toukan Date: Mon Aug 7 09:05:34 2023 +0300 net/mlx5: Expose Management PCIe Index Register (MPIR) MPIR register allows to query the PCIe indexes and Socket-Direct related parameters. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 13049408a4bd29c92227ca2d6befab80dbb96663 Author: Tariq Toukan Date: Sun May 7 16:47:42 2023 +0300 net/mlx5: Add mlx5_ifc bits used for supporting single netdev Socket-Direct Multiple device caps and features are required to support single netdev Socket-Direct. Add them here in preparation for the feature implementation. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit 11ab7ad6f795ae23c398a4a5c56505d3dab27c4c Author: Fabio Estevam Date: Wed Dec 6 17:14:05 2023 -0300 ARM: dts: imx25/27: Pass timing0 Per display-timings.yaml, the 'timing' pattern should be used to describe the display timings. Change it accordingly to fix the following dt-schema warning: imx27-apf27dev.dtb: display-timings: '800x480' does not match any of the regexes: '^timing', 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/display/panel/display-timings.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 85c2674d537bd8f68afa9dad49981f7e227f1131 Merge: a25ebbf332fd2 cb80ee2f9bee1 Author: Jakub Kicinski Date: Wed Dec 13 18:01:09 2023 -0800 Merge branch 'add-support-for-dp83tg720s-phy' Oleksij Rempel says: ==================== add support for DP83TG720S PHY ==================== Link: https://lore.kernel.org/r/20231212054144.87527-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit cb80ee2f9bee1502e805acff64e2133e254ec240 Author: Oleksij Rempel Date: Tue Dec 12 06:41:44 2023 +0100 net: phy: Add support for the DP83TG720S Ethernet PHY The DP83TG720S-Q1 device is an IEEE 802.3bp and Open Alliance compliant automotive Ethernet physical layer transceiver. This driver was tested with i.MX8MP EQOS (stmmac) on the MAC side and same TI PHY on other side. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20231212054144.87527-3-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 0c476157085fe2ad13b9bec70ea672e86647fa1a Author: Oleksij Rempel Date: Tue Dec 12 06:41:43 2023 +0100 net: phy: c45: add genphy_c45_pma_read_ext_abilities() function Move part of the genphy_c45_pma_read_abilities() code to a separate function. Some PHYs do not implement PMA/PMD status 2 register (Register 1.8) but do implement PMA/PMD extended ability register (Register 1.11). To make use of it, we need to be able to access this part of code separately. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20231212054144.87527-2-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit a25ebbf332fd2d948937c6ef016e66db62e1abf2 Merge: 604ca8ee7bdc6 1dd7f18fc0ed7 Author: Jakub Kicinski Date: Wed Dec 13 17:54:01 2023 -0800 Merge branch 'net-sched-optimizations-around-action-binding-and-init' Pedro Tammela says: ==================== net/sched: optimizations around action binding and init Scaling optimizations for action binding in rtnl-less filters. We saw a noticeable lock contention around idrinfo->lock when testing in a 56 core system, which disappeared after the patches. ==================== Link: https://lore.kernel.org/r/20231211181807.96028-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 1dd7f18fc0ed75dad4d5f2ecc84f69c6b62b6a81 Author: Pedro Tammela Date: Mon Dec 11 15:18:07 2023 -0300 net/sched: act_api: skip idr replace on bound actions tcf_idr_insert_many will replace the allocated -EBUSY pointer in tcf_idr_check_alloc with the real action pointer, exposing it to all operations. This operation is only needed when the action pointer is created (ACT_P_CREATED). For actions which are bound to (returned 0), the pointer already resides in the idr making such operation a nop. Even though it's a nop, it's still not a cheap operation as internally the idr code walks the idr and then does a replace on the appropriate slot. So if the action was bound, better skip the idr replace entirely. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Reviewed-by: Vlad Buslov Link: https://lore.kernel.org/r/20231211181807.96028-3-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 4b55e86736d5b492cf689125da2600f59c7d2c39 Author: Pedro Tammela Date: Mon Dec 11 15:18:06 2023 -0300 net/sched: act_api: rely on rcu in tcf_idr_check_alloc Instead of relying only on the idrinfo->lock mutex for bind/alloc logic, rely on a combination of rcu + mutex + atomics to better scale the case where multiple rtnl-less filters are binding to the same action object. Action binding happens when an action index is specified explicitly and an action exists which such index exists. Example: tc actions add action drop index 1 tc filter add ... matchall action drop index 1 tc filter add ... matchall action drop index 1 tc filter add ... matchall action drop index 1 tc filter ls ... filter protocol all pref 49150 matchall chain 0 filter protocol all pref 49150 matchall chain 0 handle 0x1 not_in_hw action order 1: gact action drop random type none pass val 0 index 1 ref 4 bind 3 filter protocol all pref 49151 matchall chain 0 filter protocol all pref 49151 matchall chain 0 handle 0x1 not_in_hw action order 1: gact action drop random type none pass val 0 index 1 ref 4 bind 3 filter protocol all pref 49152 matchall chain 0 filter protocol all pref 49152 matchall chain 0 handle 0x1 not_in_hw action order 1: gact action drop random type none pass val 0 index 1 ref 4 bind 3 When no index is specified, as before, grab the mutex and allocate in the idr the next available id. In this version, as opposed to before, it's simplified to store the -EBUSY pointer instead of the previous alloc + replace combination. When an index is specified, rely on rcu to find if there's an object in such index. If there's none, fallback to the above, serializing on the mutex and reserving the specified id. If there's one, it can be an -EBUSY pointer, in which case we just try again until it's an action, or an action. Given the rcu guarantees, the action found could be dead and therefore we need to bump the refcount if it's not 0, handling the case it's in fact 0. As bind and the action refcount are already atomics, these increments can happen without the mutex protection while many tcf_idr_check_alloc race to bind to the same action instance. In case binding encounters a parallel delete or add, it will return -EAGAIN in order to try again. Both filter and action apis already have the retry machinery in-place. In case it's an unlocked filter it retries under the rtnl lock. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Reviewed-by: Vlad Buslov Link: https://lore.kernel.org/r/20231211181807.96028-2-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit f0b929f58719fc57a4926ab4fc972f185453d6a5 Author: Fabio Estevam Date: Wed Dec 6 17:00:33 2023 -0300 ARM: dts: imx25: Fix the iim compatible string Per imx-iim.yaml, the compatible string should only contain a single entry. Use it as "fsl,imx25-iim" to fix the following dt-schema warning: imx25-karo-tx25.dtb: efuse@53ff0000: compatible: ['fsl,imx25-iim', 'fsl,imx27-iim'] is too long from schema $id: http://devicetree.org/schemas/nvmem/imx-iim.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 2a0c6b41eec90c2a138ea8b574836744783c67ff Author: Hou Tao Date: Mon Dec 11 16:34:47 2023 +0800 bpf: Update the comments in maybe_wait_bpf_programs() Since commit 638e4b825d52 ("bpf: Allows per-cpu maps and map-in-map in sleepable programs"), sleepable BPF program can also use map-in-map, but maybe_wait_bpf_programs() doesn't handle it accordingly. The main reason is that using synchronize_rcu_tasks_trace() to wait for the completions of these sleepable BPF programs may incur a very long delay and userspace may think it is hung, so the wait for sleepable BPF programs is skipped. Update the comments in maybe_wait_bpf_programs() to reflect the reason. Signed-off-by: Hou Tao Acked-by: Yonghong Song Acked-by: John Fastabend Link: https://lore.kernel.org/r/20231211083447.1921178-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit b13cddf633562b9b2c34fd63471d377019704ebe Author: Matt Bobrowski Date: Fri Dec 8 15:32:48 2023 +0000 bpf: add small subset of SECURITY_PATH hooks to BPF sleepable_lsm_hooks list security_path_* based LSM hooks appear to be generally missing from the sleepable_lsm_hooks list. Initially add a small subset of them to the preexisting sleepable_lsm_hooks list so that sleepable BPF helpers like bpf_d_path() can be used from sleepable BPF LSM based programs. The security_path_* hooks added in this patch are similar to the security_inode_* counterparts that already exist in the sleepable_lsm_hooks list, and are called in roughly similar points and contexts. Presumably, making them OK to be also annotated as sleepable. Building a kernel with DEBUG_ATOMIC_SLEEP options enabled and running reasonable workloads stimulating activity that would be intercepted by such security hooks didn't show any splats. Notably, I haven't added all the security_path_* LSM hooks that are available as I don't need them at this point in time. Signed-off-by: Matt Bobrowski Acked-by: KP Singh Link: https://lore.kernel.org/r/ZXM3IHHXpNY9y82a@google.com Signed-off-by: Alexei Starovoitov commit ec14325c7339bf1d40fc29bb8a0d2121cfe649aa Merge: 733763285acfe 4c6612f6100c2 Author: Alexei Starovoitov Date: Wed Dec 13 16:16:42 2023 -0800 Merge branch 'xdp-metadata-via-kfuncs-for-ice-vlan-hint' Larysa Zaremba says: ==================== XDP metadata via kfuncs for ice + VLAN hint This series introduces XDP hints via kfuncs [0] to the ice driver. Series brings the following existing hints to the ice driver: - HW timestamp - RX hash with type Series also introduces VLAN tag with protocol XDP hint, it now be accessed by XDP and userspace (AF_XDP) programs. They can also be checked with xdp_metadata test and xdp_hw_metadata program. Impact of these patches on ice performance: ZC: * Full hints implementation decreases pps in ZC mode by less than 3% (64B, rxdrop) skb (packets with invalid IP, dropped by stack): * Overall, patchset improves peak performance in skb mode by about 0.5% [0] https://patchwork.kernel.org/project/netdevbpf/cover/20230119221536.3349901-1-sdf@google.com/ v7: https://lore.kernel.org/bpf/20231115175301.534113-1-larysa.zaremba@intel.com/ v6: https://lore.kernel.org/bpf/20231012170524.21085-1-larysa.zaremba@intel.com/ Intermediate RFC v2: https://lore.kernel.org/bpf/20230927075124.23941-1-larysa.zaremba@intel.com/ Intermediate RFC v1: https://lore.kernel.org/bpf/20230824192703.712881-1-larysa.zaremba@intel.com/ v5: https://lore.kernel.org/bpf/20230811161509.19722-1-larysa.zaremba@intel.com/ v4: https://lore.kernel.org/bpf/20230728173923.1318596-1-larysa.zaremba@intel.com/ v3: https://lore.kernel.org/bpf/20230719183734.21681-1-larysa.zaremba@intel.com/ v2: https://lore.kernel.org/bpf/20230703181226.19380-1-larysa.zaremba@intel.com/ v1: https://lore.kernel.org/all/20230512152607.992209-1-larysa.zaremba@intel.com/ Changes since v7: * shorten timestamp assignment in ice * change first argument of ice_fill_rx_descs back to xsk_buff_pool * fix kernel-doc for ice_run_xdp_zc * add missing XSK_CHECK_PRIV_TYPE() in ice * resolved selftests merge conflicts with TX hints * AF_INET patch adds new packet generation, not replaces AF_XDP one * fix destination port in xdp_metadata Changes since v6: * add ability to fill cb of all xdp_buffs in xsk_buff_pool * place just pointer to packet context in ice_xdp_buff * add const qualifiers in veth implementation * generate uapi for VLAN hint Changes since v5: * drop checksum hint from the patchset entirely * Alex's patch that lifts the data_meta size limitation is no longer required in this patchset, so will be sent separately * new patch: hide some ice hints code behind a static key * fix several bugs in ZC mode (ice) * change argument order in VLAN hint kfunc (tci, proto -> proto, tci) * cosmetic changes * analyze performance impact Changes since v4: * Drop the concept of partial checksum from the hint design * Drop the concept of checksum level from the hint design Changes since v3: * use XDP_CHECKSUM_VALID_LVL0 + csum_level instead of csum_level + 1 * fix spelling mistakes * read XDP timestamp unconditionally * add TO_STR() macro Changes since v2: * redesign checksum hint, so now it gives full status * rename vlan_tag -> vlan_tci, where applicable * use open_netns() and close_netns() in xdp_metadata * improve VLAN hint documentation * replace CFI with DEI * use VLAN_VID_MASK in xdp_metadata * make vlan_get_tag() return -ENODATA * remove unused rx_ptype in ice_xsk.c * fix ice timestamp code division between patches Changes since v1: * directly return RX hash, RX timestamp and RX checksum status in skb-common functions * use intermediate enum value for checksum status in ice * get rid of ring structure dependency in ice kfunc implementation * make variables const, when possible, in ice implementation * use -ENODATA instead of -EOPNOTSUPP for driver implementation * instead of having 2 separate functions for c-tag and s-tag, use 1 function that outputs both VLAN tag and protocol ID * improve documentation for introduced hints * update xdp_metadata selftest to test new hints * implement new hints in veth, so they can be tested in xdp_metadata * parse VLAN tag in xdp_hw_metadata ==================== Link: https://lore.kernel.org/r/20231205210847.28460-1-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 4c6612f6100c2d85212865dbd1a5d8a7e391d3cb Author: Larysa Zaremba Date: Tue Dec 5 22:08:47 2023 +0100 selftests/bpf: Check VLAN tag and proto in xdp_metadata Verify, whether VLAN tag and proto are set correctly. To simulate "stripped" VLAN tag on veth, send test packet from VLAN interface. Also, add TO_STR() macro for convenience. Acked-by: Stanislav Fomichev Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-19-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit a3850af4ea25dadc8b35edf132340907d523657e Author: Larysa Zaremba Date: Tue Dec 5 22:08:46 2023 +0100 selftests/bpf: Add AF_INET packet generation to xdp_metadata The easiest way to simulate stripped VLAN tag in veth is to send a packet from VLAN interface, attached to veth. Unfortunately, this approach is incompatible with AF_XDP on TX side, because VLAN interfaces do not have such feature. Check both packets sent via AF_XDP TX and regular socket. AF_INET packet will also have a filled-in hash type (XDP_RSS_TYPE_L4), unlike AF_XDP packet, so more values can be checked. Signed-off-by: Larysa Zaremba Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231205210847.28460-18-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 8e68a4beba943bdffb342c601c649223f44b7329 Author: Larysa Zaremba Date: Tue Dec 5 22:08:45 2023 +0100 selftests/bpf: Add flags and VLAN hint to xdp_hw_metadata Add VLAN hint to the xdp_hw_metadata program. Also, to make metadata layout more straightforward, add flags field to pass information about validity of every separate hint separately. Acked-by: Stanislav Fomichev Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-17-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit e71a9fa7fdb2effcaaed37c207ec4f634c8f4901 Author: Larysa Zaremba Date: Tue Dec 5 22:08:44 2023 +0100 selftests/bpf: Allow VLAN packets in xdp_hw_metadata Make VLAN c-tag and s-tag XDP hint testing more convenient by not skipping VLAN-ed packets. Allow both 802.1ad and 802.1Q headers. Acked-by: Stanislav Fomichev Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-16-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 7978bad4b6b9265a1e808a5f679ee428d1dd6523 Author: Larysa Zaremba Date: Tue Dec 5 22:08:43 2023 +0100 mlx5: implement VLAN tag XDP hint Implement the newly added .xmo_rx_vlan_tag() hint function. Reviewed-by: Tariq Toukan Signed-off-by: Larysa Zaremba Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/r/20231205210847.28460-15-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 537fec0733c4a72e2a2b69fee365459c5b75d92e Author: Larysa Zaremba Date: Tue Dec 5 22:08:42 2023 +0100 net: make vlan_get_tag() return -ENODATA instead of -EINVAL __vlan_hwaccel_get_tag() is used in veth XDP hints implementation, its return value (-EINVAL if skb is not VLAN tagged) is passed to bpf code, but XDP hints specification requires drivers to return -ENODATA, if a hint cannot be provided for a particular packet. Solve this inconsistency by changing error return value of __vlan_hwaccel_get_tag() from -EINVAL to -ENODATA, do the same thing to __vlan_get_tag(), because this function is supposed to follow the same convention. This, in turn, makes -ENODATA the only non-zero value vlan_get_tag() can return. We can do this with no side effects, because none of the users of the 3 above-mentioned functions rely on the exact value. Suggested-by: Jesper Dangaard Brouer Acked-by: Stanislav Fomichev Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-14-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit fca783799f64ac0a4f20228ff6a6d7598db11e64 Author: Larysa Zaremba Date: Tue Dec 5 22:08:41 2023 +0100 veth: Implement VLAN tag XDP hint In order to test VLAN tag hint in hardware-independent selftests, implement newly added hint in veth driver. Acked-by: Stanislav Fomichev Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-13-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit b591137c4ec35ed3f8478f5bb69a22ef4834f04a Author: Larysa Zaremba Date: Tue Dec 5 22:08:40 2023 +0100 ice: use VLAN proto from ring packet context in skb path VLAN proto, used in ice XDP hints implementation is stored in ring packet context. Utilize this value in skb VLAN processing too instead of checking netdev features. At the same time, use vlan_tci instead of vlan_tag in touched code, because VLAN tag often refers to VLAN proto and VLAN TCI combined, while in the code we clearly store only VLAN TCI. Signed-off-by: Larysa Zaremba Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20231205210847.28460-12-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 714ed949c6f3ebdff562bd9eb7247abf6a79a416 Author: Larysa Zaremba Date: Tue Dec 5 22:08:39 2023 +0100 ice: Implement VLAN tag hint Implement .xmo_rx_vlan_tag callback to allow XDP code to read packet's VLAN tag. At the same time, use vlan_tci instead of vlan_tag in touched code, because VLAN tag often refers to VLAN proto and VLAN TCI combined, while in the code we clearly store only VLAN TCI. Reviewed-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-11-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit e6795330f88b4f643c649a02662d47b779340535 Author: Larysa Zaremba Date: Tue Dec 5 22:08:38 2023 +0100 xdp: Add VLAN tag hint Implement functionality that enables drivers to expose VLAN tag to XDP code. VLAN tag is represented by 2 variables: - protocol ID, which is passed to bpf code in BE - VLAN TCI, in host byte order Acked-by: Stanislav Fomichev Signed-off-by: Larysa Zaremba Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/r/20231205210847.28460-10-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit d68d707dcbbf6a9cfe378fc2eb3ffffd5b47727e Author: Larysa Zaremba Date: Tue Dec 5 22:08:37 2023 +0100 ice: Support XDP hints in AF_XDP ZC mode In AF_XDP ZC, xdp_buff is not stored on ring, instead it is provided by xsk_buff_pool. Space for metadata sources right after such buffers was already reserved in commit 94ecc5ca4dbf ("xsk: Add cb area to struct xdp_buff_xsk"). Some things (such as pointer to packet context) do not change on a per-packet basis, so they can be set at the same time as RX queue info. On the other hand, RX descriptor is unique for each packet, but is already known when setting DMA addresses. This minimizes performance impact of hints on regular packet processing. Update AF_XDP ZC packet processing to support XDP hints. Co-developed-by: Maciej Fijalkowski Signed-off-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20231205210847.28460-9-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit b4e352ff1169ebce930c734630f9587b1677d163 Author: Maciej Fijalkowski Date: Tue Dec 5 22:08:36 2023 +0100 xsk: add functions to fill control buffer Commit 94ecc5ca4dbf ("xsk: Add cb area to struct xdp_buff_xsk") has added a buffer for custom data to xdp_buff_xsk. Particularly, this memory is used for data, consumed by XDP hints kfuncs. It does not always change on a per-packet basis and some parts can be set for example, at the same time as RX queue info. Add functions to fill all cbs in xsk_buff_pool with the same metadata. Signed-off-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Acked-by: Magnus Karlsson Link: https://lore.kernel.org/r/20231205210847.28460-8-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 0e6a7b09597011985d7aad3b747c43e9b2a43555 Author: Larysa Zaremba Date: Tue Dec 5 22:08:35 2023 +0100 ice: Support RX hash XDP hint RX hash XDP hint requests both hash value and type. Type is XDP-specific, so we need a separate way to map these values to the hardware ptypes, so create a lookup table. Instead of creating a new long list, reuse contents of ice_decode_rx_desc_ptype[] through preprocessor. Current hash type enum does not contain ICMP packet type, but ice devices support it, so also add a new type into core code. Then use previously refactored code and create a function that allows XDP code to read RX hash. Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-7-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 9031d5f491b95710a1cf871818c7c9730ec50a1b Author: Larysa Zaremba Date: Tue Dec 5 22:08:34 2023 +0100 ice: Support HW timestamp hint Use previously refactored code and create a function that allows XDP code to read HW timestamp. Also, introduce packet context, where hints-related data will be stored. ice_xdp_buff contains only a pointer to this structure, to avoid copying it in ZC mode later in the series. HW timestamp is the first supported hint in the driver, so also add xdp_metadata_ops. Reviewed-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-6-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit d951c14ad237b087f0d1377c44932fcc0b322c40 Author: Larysa Zaremba Date: Tue Dec 5 22:08:33 2023 +0100 ice: Introduce ice_xdp_buff In order to use XDP hints via kfuncs we need to put RX descriptor and miscellaneous data next to xdp_buff. Same as in hints implementations in other drivers, we achieve this through putting xdp_buff into a child structure. Currently, xdp_buff is stored in the ring structure, so replace it with union that includes child structure. This way enough memory is available while existing XDP code remains isolated from hints. Minimum size of the new child structure (ice_xdp_buff) is exactly 64 bytes (single cache line). To place it at the start of a cache line, move 'next' field from CL1 to CL4, as it isn't used often. This still leaves 192 bits available in CL3 for packet context extensions. Signed-off-by: Larysa Zaremba Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/r/20231205210847.28460-5-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 6b62a42149032db305dfd687d7118aa870b4a2f9 Author: Larysa Zaremba Date: Tue Dec 5 22:08:32 2023 +0100 ice: Make ptype internal to descriptor info processing Currently, rx_ptype variable is used only as an argument to ice_process_skb_fields() and is computed just before the function call. Therefore, there is no reason to pass this value as an argument. Instead, remove this argument and compute the value directly inside ice_process_skb_fields() function. Also, separate its calculation into a short function, so the code can later be reused in .xmo_() callbacks. Reviewed-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-4-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 3310aad20defb96eaf363ab2643e876a6275c72b Author: Larysa Zaremba Date: Tue Dec 5 22:08:31 2023 +0100 ice: make RX HW timestamp reading code more reusable Previously, we only needed RX HW timestamp in skb path, hence all related code was written with skb in mind. But with the addition of XDP hints via kfuncs to the ice driver, the same logic will be needed in .xmo_() callbacks. Put generic process of reading RX HW timestamp from a descriptor into a separate function. Move skb-related code into another source file. Reviewed-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-3-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 9244384e811ecff6b05290ccf82a2540feaa7214 Author: Larysa Zaremba Date: Tue Dec 5 22:08:30 2023 +0100 ice: make RX hash reading code more reusable Previously, we only needed RX hash in skb path, hence all related code was written with skb in mind. But with the addition of XDP hints via kfuncs to the ice driver, the same logic will be needed in .xmo_() callbacks. Separate generic process of reading RX hash from a descriptor into a separate function. Reviewed-by: Maciej Fijalkowski Signed-off-by: Larysa Zaremba Link: https://lore.kernel.org/r/20231205210847.28460-2-larysa.zaremba@intel.com Signed-off-by: Alexei Starovoitov commit 733763285acfe8dffd6e39ad2ed3d1222b32a901 Merge: f04f2ce6018f3 322122bf8c75b Author: Alexei Starovoitov Date: Wed Dec 13 15:47:06 2023 -0800 Merge branch 'bpf-token-support-in-libbpf-s-bpf-object' Andrii Nakryiko says: ==================== BPF token support in libbpf's BPF object Add fuller support for BPF token in high-level BPF object APIs. This is the most frequently used way to work with BPF using libbpf, so supporting BPF token there is critical. Patch #1 is improving kernel-side BPF_TOKEN_CREATE behavior by rejecting to create "empty" BPF token with no delegation. This seems like saner behavior which also makes libbpf's caching better overall. If we ever want to create BPF token with no delegate_xxx options set on BPF FS, we can use a new flag to enable that. Patches #2-#5 refactor libbpf internals, mostly feature detection code, to prepare it from BPF token FD. Patch #6 adds options to pass BPF token into BPF object open options. It also adds implicit BPF token creation logic to BPF object load step, even without any explicit involvement of the user. If the environment is setup properly, BPF token will be created transparently and used implicitly. This allows for all existing application to gain BPF token support by just linking with latest version of libbpf library. No source code modifications are required. All that under assumption that privileged container management agent properly set up default BPF FS instance at /sys/bpf/fs to allow BPF token creation. Patches #7-#8 adds more selftests, validating BPF object APIs work as expected under unprivileged user namespaced conditions in the presence of BPF token. Patch #9 extends libbpf with LIBBPF_BPF_TOKEN_PATH envvar knowledge, which can be used to override custom BPF FS location used for implicit BPF token creation logic without needing to adjust application code. This allows admins or container managers to mount BPF token-enabled BPF FS at non-standard location without the need to coordinate with applications. LIBBPF_BPF_TOKEN_PATH can also be used to disable BPF token implicit creation by setting it to an empty value. Patch #10 tests this new envvar functionality. v2->v3: - move some stray feature cache refactorings into patch #4 (Alexei); - add LIBBPF_BPF_TOKEN_PATH envvar support (Alexei); v1->v2: - remove minor code redundancies (Eduard, John); - add acks and rebase. ==================== Link: https://lore.kernel.org/r/20231213190842.3844987-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 322122bf8c75b1df78d6608516807a0354f6ab3c Author: Andrii Nakryiko Date: Wed Dec 13 11:08:42 2023 -0800 selftests/bpf: add tests for LIBBPF_BPF_TOKEN_PATH envvar Add new subtest validating LIBBPF_BPF_TOKEN_PATH envvar semantics. Extend existing test to validate that LIBBPF_BPF_TOKEN_PATH allows to disable implicit BPF token creation by setting envvar to empty string. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-11-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit ed54124b88056fd629c6af71664dfcd4d3b3e0b8 Author: Andrii Nakryiko Date: Wed Dec 13 11:08:41 2023 -0800 libbpf: support BPF token path setting through LIBBPF_BPF_TOKEN_PATH envvar To allow external admin authority to override default BPF FS location (/sys/fs/bpf) for implicit BPF token creation, teach libbpf to recognize LIBBPF_BPF_TOKEN_PATH envvar. If it is specified and user application didn't explicitly specify neither bpf_token_path nor bpf_token_fd option, it will be treated exactly like bpf_token_path option, overriding default /sys/fs/bpf location and making BPF token mandatory. Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 18678cf0ee13cf19bac4ecd55665e6d1d63108b3 Author: Andrii Nakryiko Date: Wed Dec 13 11:08:40 2023 -0800 selftests/bpf: add tests for BPF object load with implicit token Add a test to validate libbpf's implicit BPF token creation from default BPF FS location (/sys/fs/bpf). Also validate that disabling this implicit BPF token creation works. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 98e0eaa36adfb580a3aa43fca62847ec0f625d3f Author: Andrii Nakryiko Date: Wed Dec 13 11:08:39 2023 -0800 selftests/bpf: add BPF object loading tests with explicit token passing Add a few tests that attempt to load BPF object containing privileged map, program, and the one requiring mandatory BTF uploading into the kernel (to validate token FD propagation to BPF_BTF_LOAD command). Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 1d0dd6ea2e38c18e1b31a8c3c59b6bdfe4f4efde Author: Andrii Nakryiko Date: Wed Dec 13 11:08:38 2023 -0800 libbpf: wire up BPF token support at BPF object level Add BPF token support to BPF object-level functionality. BPF token is supported by BPF object logic either as an explicitly provided BPF token from outside (through BPF FS path or explicit BPF token FD), or implicitly (unless prevented through bpf_object_open_opts). Implicit mode is assumed to be the most common one for user namespaced unprivileged workloads. The assumption is that privileged container manager sets up default BPF FS mount point at /sys/fs/bpf with BPF token delegation options (delegate_{cmds,maps,progs,attachs} mount options). BPF object during loading will attempt to create BPF token from /sys/fs/bpf location, and pass it for all relevant operations (currently, map creation, BTF load, and program load). In this implicit mode, if BPF token creation fails due to whatever reason (BPF FS is not mounted, or kernel doesn't support BPF token, etc), this is not considered an error. BPF object loading sequence will proceed with no BPF token. In explicit BPF token mode, user provides explicitly either custom BPF FS mount point path or creates BPF token on their own and just passes token FD directly. In such case, BPF object will either dup() token FD (to not require caller to hold onto it for entire duration of BPF object lifetime) or will attempt to create BPF token from provided BPF FS location. If BPF token creation fails, that is considered a critical error and BPF object load fails with an error. Libbpf provides a way to disable implicit BPF token creation, if it causes any troubles (BPF token is designed to be completely optional and shouldn't cause any problems even if provided, but in the world of BPF LSM, custom security logic can be installed that might change outcome dependin on the presence of BPF token). To disable libbpf's default BPF token creation behavior user should provide either invalid BPF token FD (negative), or empty bpf_token_path option. BPF token presence can influence libbpf's feature probing, so if BPF object has associated BPF token, feature probing is instructed to use BPF object-specific feature detection cache and token FD. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit a75bb6a16518d4a224f24116633f3f9d5787f6d1 Author: Andrii Nakryiko Date: Wed Dec 13 11:08:37 2023 -0800 libbpf: wire up token_fd into feature probing logic Adjust feature probing callbacks to take into account optional token_fd. In unprivileged contexts, some feature detectors would fail to detect kernel support just because BPF program, BPF map, or BTF object can't be loaded due to privileged nature of those operations. So when BPF object is loaded with BPF token, this token should be used for feature probing. This patch is setting support for this scenario, but we don't yet pass non-zero token FD. This will be added in the next patch. We also switched BPF cookie detector from using kprobe program to tracepoint one, as tracepoint is somewhat less dangerous BPF program type and has higher likelihood of being allowed through BPF token in the future. This change has no effect on detection behavior. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit ab8fc393b27cd2d6dd1ced1ba2358ddcd123fc15 Author: Andrii Nakryiko Date: Wed Dec 13 11:08:36 2023 -0800 libbpf: move feature detection code into its own file It's quite a lot of well isolated code, so it seems like a good candidate to move it out of libbpf.c to reduce its size. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 29c302a2e265a356434b005155990a9e766db75d Author: Andrii Nakryiko Date: Wed Dec 13 11:08:35 2023 -0800 libbpf: further decouple feature checking logic from bpf_object Add feat_supported() helper that accepts feature cache instead of bpf_object. This allows low-level code in bpf.c to not know or care about higher-level concept of bpf_object, yet it will be able to utilize custom feature checking in cases where BPF token might influence the outcome. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c6c5be3eee975ae640966844db66d404c1de79b1 Author: Andrii Nakryiko Date: Wed Dec 13 11:08:34 2023 -0800 libbpf: split feature detectors definitions from cached results Split a list of supported feature detectors with their corresponding callbacks from actual cached supported/missing values. This will allow to have more flexible per-token or per-object feature detectors in subsequent refactorings. Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit f5fdb51fb980077a4c6c78f3f775821f611fb38b Author: Andrii Nakryiko Date: Wed Dec 13 11:08:33 2023 -0800 bpf: fail BPF_TOKEN_CREATE if no delegation option was set on BPF FS It's quite confusing in practice when it's possible to successfully create a BPF token from BPF FS that didn't have any of delegate_xxx mount options set up. While it's not wrong, it's actually more meaningful to reject BPF_TOKEN_CREATE with specific error code (-ENOENT) to let user-space know that no token delegation is setup up. So, instead of creating empty BPF token that will be always ignored because it doesn't have any of the allow_xxx bits set, reject it with -ENOENT. If we ever need empty BPF token to be possible, we can support that with extra flag passed into BPF_TOKEN_CREATE. Acked-by: Christian Brauner Acked-by: John Fastabend Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231213190842.3844987-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit f04f2ce6018f3cb33ac96270b9153c2920ead190 Author: Daniel Xu Date: Mon Dec 11 13:20:09 2023 -0700 bpf: selftests: Add verifier tests for CO-RE bitfield writes Add some tests that exercise BPF_CORE_WRITE_BITFIELD() macro. Since some non-trivial bit fiddling is going on, make sure various edge cases (such as adjacent bitfields and bitfields at the edge of structs) are exercised. Acked-by: Andrii Nakryiko Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/72698a1080fa565f541d5654705255984ea2a029.1702325874.git.dxu@dxuuu.xyz Signed-off-by: Martin KaFai Lau commit 7d19c00e9abc8ad3b3b72a1989331f45287e6bf5 Author: Daniel Xu Date: Mon Dec 11 13:20:08 2023 -0700 bpf: selftests: test_loader: Support __btf_path() annotation This commit adds support for per-prog btf_custom_path. This is necessary for testing CO-RE relocations on non-vmlinux types using test_loader infrastructure. Acked-by: Andrii Nakryiko Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/660ea7f2fdbdd5103bc1af87c9fc931f05327926.1702325874.git.dxu@dxuuu.xyz Signed-off-by: Martin KaFai Lau commit 2f70803532e9b7f14897d17f8944d431755661a7 Author: Daniel Xu Date: Mon Dec 11 13:20:07 2023 -0700 libbpf: Add BPF_CORE_WRITE_BITFIELD() macro === Motivation === Similar to reading from CO-RE bitfields, we need a CO-RE aware bitfield writing wrapper to make the verifier happy. Two alternatives to this approach are: 1. Use the upcoming `preserve_static_offset` [0] attribute to disable CO-RE on specific structs. 2. Use broader byte-sized writes to write to bitfields. (1) is a bit hard to use. It requires specific and not-very-obvious annotations to bpftool generated vmlinux.h. It's also not generally available in released LLVM versions yet. (2) makes the code quite hard to read and write. And especially if BPF_CORE_READ_BITFIELD() is already being used, it makes more sense to to have an inverse helper for writing. === Implementation details === Since the logic is a bit non-obvious, I thought it would be helpful to explain exactly what's going on. To start, it helps by explaining what LSHIFT_U64 (lshift) and RSHIFT_U64 (rshift) is designed to mean. Consider the core of the BPF_CORE_READ_BITFIELD() algorithm: val <<= __CORE_RELO(s, field, LSHIFT_U64); val = val >> __CORE_RELO(s, field, RSHIFT_U64); Basically what happens is we lshift to clear the non-relevant (blank) higher order bits. Then we rshift to bring the relevant bits (bitfield) down to LSB position (while also clearing blank lower order bits). To illustrate: Start: ........XXX...... Lshift: XXX......00000000 Rshift: 00000000000000XXX where `.` means blank bit, `0` means 0 bit, and `X` means bitfield bit. After the two operations, the bitfield is ready to be interpreted as a regular integer. Next, we want to build an alternative (but more helpful) mental model on lshift and rshift. That is, to consider: * rshift as the total number of blank bits in the u64 * lshift as number of blank bits left of the bitfield in the u64 Take a moment to consider why that is true by consulting the above diagram. With this insight, we can now define the following relationship: bitfield _ | | 0.....00XXX0...00 | | | | |______| | | lshift | | |____| (rshift - lshift) That is, we know the number of higher order blank bits is just lshift. And the number of lower order blank bits is (rshift - lshift). Finally, we can examine the core of the write side algorithm: mask = (~0ULL << rshift) >> lshift; // 1 val = (val & ~mask) | ((nval << rpad) & mask); // 2 1. Compute a mask where the set bits are the bitfield bits. The first left shift zeros out exactly the number of blank bits, leaving a bitfield sized set of 1s. The subsequent right shift inserts the correct amount of higher order blank bits. 2. On the left of the `|`, mask out the bitfield bits. This creates 0s where the new bitfield bits will go. On the right of the `|`, bring nval into the correct bit position and mask out any bits that fall outside of the bitfield. Finally, by bor'ing the two halves, we get the final set of bits to write back. [0]: https://reviews.llvm.org/D133361 Co-developed-by: Eduard Zingerman Signed-off-by: Eduard Zingerman Co-developed-by: Jonathan Lemon Signed-off-by: Jonathan Lemon Acked-by: Andrii Nakryiko Signed-off-by: Daniel Xu Link: https://lore.kernel.org/r/4d3dd215a4fd57d980733886f9c11a45e1a9adf3.1702325874.git.dxu@dxuuu.xyz Signed-off-by: Martin KaFai Lau commit 750e785796bb72423b97cac21ecd0fa3b3b65610 Author: Jie Jiang Date: Tue Dec 12 09:39:23 2023 +0000 bpf: Support uid and gid when mounting bpffs Parse uid and gid in bpf_parse_param() so that they can be passed in as the `data` parameter when mount() bpffs. This will be useful when we want to control which user/group has the control to the mounted bpffs, otherwise a separate chown() call will be needed. Signed-off-by: Jie Jiang Signed-off-by: Andrii Nakryiko Acked-by: Mike Frysinger Acked-by: Christian Brauner Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231212093923.497838-1-jiejiang@chromium.org commit 4ba8b3f7d368279d3d3bde788394c7f6b3e0c061 Author: Guixin Liu Date: Wed Dec 13 14:32:50 2023 +0800 nvmet: remove cntlid_min and cntlid_max check in nvmet_alloc_ctrl The cntlid_min and cntlid_max are checked in configfs, don't check again in nvmet_alloc_ctrl(). Signed-off-by: Guixin Liu Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 906dbc47b1d540961a2ffddc7a095196d1a39b93 Author: Guixin Liu Date: Wed Dec 13 14:32:49 2023 +0800 nvmet: allow identical cntlid_min and cntlid_max settings When the user wants to restrict to only creating one controller, they can set cntlid_min and cntlid_max to the same value. Signed-off-by: Guixin Liu Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch commit 578bd4ce7100ae34f98c6b0147fe75cfa0dadbac Author: Darrick J. Wong Date: Mon Dec 11 10:41:51 2023 -0800 xfs: recompute growfsrtfree transaction reservation while growing rt volume While playing with growfs to create a 20TB realtime section on a filesystem that didn't previously have an rt section, I noticed that growfs would occasionally shut down the log due to a transaction reservation overflow. xfs_calc_growrtfree_reservation uses the current size of the realtime summary file (m_rsumsize) to compute the transaction reservation for a growrtfree transaction. The reservations are computed at mount time, which means that m_rsumsize is zero when growfs starts "freeing" the new realtime extents into the rt volume. As a result, the transaction is undersized and fails. Fix this by recomputing the transaction reservations every time we change m_rsumsize. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 65d2765d6291a49d5cdfc0fd88ba5689ed27dbe2 Author: Christian König Date: Mon Dec 4 15:51:50 2023 +0100 drm/amdgpu: warn when there are still mappings when a BO is destroyed v2 This can only happen when there is a reference counting bug. v2: fix typo Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 69a83fd3f0a86374b2fcfab1c02363495704e652 Author: Woody Suwalski Date: Tue Dec 12 18:31:34 2023 -0500 drm/radeon: Prevent multiple debug error lines on suspend Fix to avoid multiple debug error lines printed on every suspend by Radeon driver's debugfs. radeon_debugfs_init() calls debugfs_create_file() for every ring. This results in printing multiple error lines to the screen and dmesg similar to this: [   92.378726] debugfs: File 'radeon_ring_gfx' in directory '0000:00:01.0' already present! [   92.378732] debugfs: File 'radeon_ring_cp1' in directory '0000:00:01.0' already present! [   92.378734] debugfs: File 'radeon_ring_cp2' in directory '0000:00:01.0' already present! [   92.378737] debugfs: File 'radeon_ring_dma1' in directory '0000:00:01.0' already present! [   92.378739] debugfs: File 'radeon_ring_dma2' in directory '0000:00:01.0' already present! [   92.380775] debugfs: File 'radeon_ring_uvd' in directory '0000:00:01.0' already present! [   92.406620] debugfs: File 'radeon_ring_vce1' in directory '0000:00:01.0' already present! [   92.406624] debugfs: File 'radeon_ring_vce2' in directory '0000:00:01.0' already present! Patch v1: The fix was to run lookup() for the file before trying to (re)create that debug file. Patch v2: Call the radeon_debugfs_init() only once when radeon ring is initialized (as suggested by Christian K. - thanks) Reviewed-by: Christian König Signed-off-by: Woody Suwalski Signed-off-by: Alex Deucher commit 99de686115b00e765a5e9345e10c9d7312e4c7ea Author: Melissa Wen Date: Thu Nov 16 18:58:04 2023 -0100 drm/amd/display: add plane shaper TF support Enable usage of predefined transfer func in addition to shaper 1D LUT. That means we can save some complexity by just setting a predefined curve, instead of programming a custom curve when preparing color space for applying 3D LUT. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit aba8b76baabde681ab4ff686452005d80d949345 Author: Melissa Wen Date: Thu Nov 16 18:58:03 2023 -0100 drm/amd/display: add plane shaper LUT support Map DC shaper LUT to DM plane color management. Shaper LUT can be used to delinearize and/or normalize the color space for computational efficiency and achiving specific visual styles. If a plane degamma is apply to linearize the color space, a custom shaper 1D LUT can be used just before applying 3D LUT. v2: - use DPP color caps to verify plane 3D LUT support - add debug message if shaper LUT programming fails v4: - remove helper to check 3D LUT color caps (Harry) - update desc of lut3d-setup helper from MPC to DPP v5: - remove color_mgmt_changed check that prevents color updates (Joshua) Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 4bc59ddf57c1f68ea035c4f242108f29d91797fd Author: Joshua Ashton Date: Thu Nov 16 18:58:02 2023 -0100 drm/amd/display: add HDR multiplier support With `dc_fixpt_from_s3132()` translation, we can just use it to set hdr_mult. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 889044f9e04f0829dd92640c551941bbe77bc0ea Author: Joshua Ashton Date: Thu Nov 16 18:58:01 2023 -0100 drm/amd/display: add dc_fixpt_from_s3132 helper Detach value translation from CTM to reuse it for programming HDR multiplier property. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit ef113a3b1964b40dd87287806865b947d70f7df5 Author: Melissa Wen Date: Thu Nov 16 18:58:00 2023 -0100 drm/amd/display: reject atomic commit if setting both plane and CRTC degamma DC only has pre-blending degamma caps (plane/DPP) that is currently in use for CRTC/post-blending degamma, so that we don't have HW caps to perform plane and CRTC degamma at the same time. Reject atomic updates when serspace sets both plane and CRTC degamma properties. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 980f8710075acaeb226a94cde6dda8ffad30123c Author: Joshua Ashton Date: Thu Nov 16 18:57:59 2023 -0100 drm/amd/display: add plane degamma TF and LUT support Set DC plane with user degamma LUT or predefined TF from driver-specific plane color properties. If plane and CRTC degamma are set in the same time, plane degamma has priority. That means, we only set CRTC degamma if we don't have plane degamma LUT or TF to configure. We return -EINVAL if we don't have plane degamma settings, so we can continue and check CRTC degamma. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 683b8c7e7a94fb7445b8d300c7404322ad040bab Author: Christian König Date: Fri Dec 8 13:43:09 2023 +0100 drm/amdgpu: fix tear down order in amdgpu_vm_pt_free When freeing PD/PT with shadows it can happen that the shadow destruction races with detaching the PD/PT from the VM causing a NULL pointer dereference in the invalidation code. Fix this by detaching the the PD/PT from the VM first and then freeing the shadow instead. Signed-off-by: Christian König Fixes: https://gitlab.freedesktop.org/drm/amd/-/issues/2867 Cc: Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 73e5ea616a9f8c261d07e63b421947949ad6cbce Author: Melissa Wen Date: Thu Nov 16 18:57:58 2023 -0100 drm/amd/display: decouple steps for mapping CRTC degamma to DC plane The next patch adds pre-blending degamma to AMD color mgmt pipeline, but pre-blending degamma caps (DPP) is currently in use to provide DRM CRTC atomic degamma or implict degamma on legacy gamma. Detach degamma usage regarging CRTC color properties to manage plane and CRTC color correction combinations. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 6bed9d550e51534415a56f8de33f5b9d4e728e53 Author: Joshua Ashton Date: Thu Nov 16 18:57:57 2023 -0100 drm/amd/display: mark plane as needing reset if color props change We should reset a plane state if at least one of the color management properties differs from old and new state. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 88d26ea639a8e9d314e6bffef5f382167e7203e2 Author: Joshua Ashton Date: Thu Nov 16 18:57:56 2023 -0100 drm/amd/display: set sdr_ref_white_level to 80 for out_transfer_func Otherwise this is just initialized to 0. This needs to actually have a value so that compute_curve can work for PQ EOTF. Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit d9501844d53897ca7ac04697b8504940c6dfdbb3 Author: Jani Nikula Date: Tue Dec 12 15:53:09 2023 +0200 drm/amd: include drm/drm_edid.h only where needed Including drm_edid.h from amdgpu_mode.h causes the rebuild of literally hundreds of files when drm_edid.h is modified, while there are only a handful of files that actually need to include drm_edid.h. Signed-off-by: Jani Nikula Signed-off-by: Alex Deucher commit 6bd20f0f165f444c1d8184ebd238dd92966c9dca Author: Joshua Ashton Date: Thu Nov 16 18:57:55 2023 -0100 drm/amd/display: add CRTC gamma TF support Add predefined transfer function programming. There is no post-blending out gamma ROM for hardcoded curves, but we can use AMD color modules to program LUT parameters from pre-defined coefficients and an empty regamma LUT (or bump up LUT parameters with pre-defined TF values). v2: - update crtc color mgmt if regamma TF differs between states (Joshua) - map inverse EOTF to DC transfer function (Melissa) v3: - update AMDGPU TF list v4: - update comment regarding regamma behavior Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 8b6b3f668f31a24b5406661388b9a69202e83e9d Author: Melissa Wen Date: Thu Nov 16 18:57:54 2023 -0100 drm/amd/display: encapsulate atomic regamma operation We will wire up MPC 3D LUT to DM CRTC color pipeline in the next patch, but so far, only for atomic interface. By checking set_output_transfer_func in DC drivers with MPC 3D LUT support, we can verify that regamma is only programmed when 3D LUT programming fails. As a groundwork to introduce 3D LUT programming and better understand each step, detach atomic regamma programming from the crtc colocr updating code. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 98fbb52772063ad2547d6d1b80ff99bc26761e79 Author: Melissa Wen Date: Thu Nov 16 18:57:53 2023 -0100 drm/amd/display: add comments to describe DM crtc color mgmt behavior Describe some expected behavior of the AMD DM color mgmt programming. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 0f5afa190b890052cae187496f660699f00067ef Author: Melissa Wen Date: Thu Nov 16 18:57:52 2023 -0100 drm/amd/display: add CRTC gamma TF driver-specific property Add AMD pre-defined transfer function property to default DRM CRTC gamma to convert to wire encoding with or without a user gamma LUT. There is no post-blending regamma ROM for pre-defined TF. When setting Gamma TF (!= Identity) and LUT at the same time, the color module will combine the pre-defined TF and the custom LUT values into the LUT that's actually programmed. v2: - enable CRTC prop in the end of driver-specific prop sequence - define inverse EOTFs as supported regamma TFs - reword driver-specific function doc to remove shaper/3D LUT v3: - spell out TF+LUT behavior in the commit and comments (Harry) Reviewed-by: Harry Wentland Co-developed-by: Joshua Ashton Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 0ef47454dc82358b62a424b37c7520a84f307edb Author: Joshua Ashton Date: Thu Nov 16 18:57:51 2023 -0100 drm/amd/display: add plane blend LUT and TF driver-specific properties Blend 1D LUT or a pre-defined transfer function (TF) can be set to linearize content before blending, so that it's positioned just before blending planes in the AMD color mgmt pipeline, and after 3D LUT (non-linear space). Shaper and Blend LUTs are 1D LUTs that sandwich 3D LUT. Drivers should advertize blend properties according to HW caps. There is no blend ROM for pre-defined TF. When setting blend TF (!= Identity) and LUT at the same time, the color module will combine the pre-defined TF and the custom LUT values into the LUT that's actually programmed. v3: - spell out TF+LUT behavior in the commit and comments (Harry) v5: - get blend blob correctly Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit f545d82479b46368bf00d0bfecf33fa914bd5f8f Author: Melissa Wen Date: Thu Nov 16 18:57:50 2023 -0100 drm/amd/display: add plane shaper LUT and TF driver-specific properties On AMD HW, 3D LUT always assumes a preceding shaper 1D LUT used for delinearizing and/or normalizing the color space before applying a 3D LUT. Add pre-defined transfer function to enable delinearizing content with or without shaper LUT, where AMD color module calculates the resulted shaper curve. We apply an inverse EOTF to go from linear values to encoded values. If we are already in a non-linear space and/or don't need to normalize values, we can bypass shaper LUT with a linear transfer function that is also the default TF value. There is no shaper ROM. When setting shaper TF (!= Identity) and LUT at the same time, the color module will combine the pre-defined TF and the custom LUT values into the LUT that's actually programmed. v2: - squash commits for shaper LUT and shaper TF - define inverse EOTF as supported shaper TFs v3: - spell out TF+LUT behavior in the commit and comments (Harry) - replace BT709 EOTF by inv OETF v5: - get shaper blob correctly (Joshua) Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit bd33bb1409b494558a2935f7bbc7842def957fcd Author: Jonathan Kim Date: Tue Dec 5 12:22:07 2023 -0500 drm/amdkfd: fix mes set shader debugger process management MES provides the driver a call to explicitly flush stale process memory within the MES to avoid a race condition that results in a fatal memory violation. When SET_SHADER_DEBUGGER is called, the driver passes a memory address that represents a process context address MES uses to keep track of future per-process calls. Normally, MES will purge its process context list when the last queue has been removed. The driver, however, can call SET_SHADER_DEBUGGER regardless of whether a queue has been added or not. If SET_SHADER_DEBUGGER has been called with no queues as the last call prior to process termination, the passed process context address will still reside within MES. On a new process call to SET_SHADER_DEBUGGER, the driver may end up passing an identical process context address value (based on per-process gpu memory address) to MES but is now pointing to a new allocated buffer object during KFD process creation. Since the MES is unaware of this, access of the passed address points to the stale object within MES and triggers a fatal memory violation. The solution is for KFD to explicitly flush the process context address from MES on process termination. Note that the flush call and the MES debugger calls use the same MES interface but are separated as KFD calls to avoid conflicting with each other. Signed-off-by: Jonathan Kim Tested-by: Alice Wong Reviewed-by: Eric Huang Signed-off-by: Alex Deucher commit c01b9be7b20999bfeaacc1e574be0db93c14c478 Author: Mario Limonciello Date: Tue Dec 12 01:09:16 2023 -0600 drm/amd: Fix a probing order problem on SDMA 2.4 commit 751e293f2c99 ("drm/amd: Move microcode init from sw_init to early_init for SDMA v2.4") made a fateful mistake in `adev->sdma.num_instances` wasn't declared when sdma_v2_4_init_microcode() was run. This caused probing to fail. Move the declaration to right before sdma_v2_4_init_microcode(). Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3043 Fixes: 751e293f2c99 ("drm/amd: Move microcode init from sw_init to early_init for SDMA v2.4") Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 058eb51912ca3a5fb121668b30e8e94d976afb27 Author: Hawking Zhang Date: Tue Dec 12 16:46:30 2023 +0800 drm/amdgpu: Switch to aca bank for xgmi pcs err cnt Instead of software managed counters. Signed-off-by: Hawking Zhang Reviewed-by: Yang Wang Reviewed-by: Stanley.Yang Signed-off-by: Alex Deucher commit 671994e3bf33a414dc6a8c147969dae3a15ba9de Author: Melissa Wen Date: Thu Nov 16 18:57:49 2023 -0100 drm/amd/display: add plane 3D LUT driver-specific properties Add 3D LUT property for plane color transformations using a 3D lookup table. 3D LUT allows for highly accurate and complex color transformations and is suitable to adjust the balance between color channels. It's also more complex to manage and require more computational resources. Since a 3D LUT has a limited number of entries in each dimension we want to use them in an optimal fashion. This means using the 3D LUT in a colorspace that is optimized for human vision, such as sRGB, PQ, or another non-linear space. Therefore, userpace may need one 1D LUT (shaper) before it to delinearize content and another 1D LUT after 3D LUT (blend) to linearize content again for blending. The next patches add these 1D LUTs to the plane color mgmt pipeline. v3: - improve commit message about 3D LUT - describe the 3D LUT entries and size (Harry) v4: - advertise 3D LUT max size as the size of a single-dimension v5: - get lut3d blob correctly (Joshua) - fix doc about 3d-lut dimension size (Sebastian) Signed-off-by: Melissa Wen Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit e747235ef3c253298157b6cd634b9b2695f33d20 Author: Jani Nikula Date: Tue Dec 12 15:53:38 2023 +0200 drm/radeon: include drm/drm_edid.h only where needed Including drm_edid.h from radeon_mode.h causes the rebuild of more than a hundred files when drm_edid.h is modified, while there are only a handful of files that actually need to include drm_edid.h. Signed-off-by: Jani Nikula Signed-off-by: Alex Deucher commit 91963397c49aa2907aeafa52d929555dcbc9cd07 Author: Friedrich Vock Date: Sat Dec 2 01:17:40 2023 +0100 drm/amdgpu: Enable tunneling on high-priority compute queues This improves latency if the GPU is already busy with other work. This is useful for VR compositors that submit highly latency-sensitive compositing work on high-priority compute queues while the GPU is busy rendering the next frame. Userspace merge request: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26462 v2: bump driver version (Alex) Reviewed-by: Marek Olšák Signed-off-by: Friedrich Vock Signed-off-by: Alex Deucher commit 94b1e028e15c94362420f9f3f711fafbf9d52996 Author: Alex Deucher Date: Thu Dec 7 10:14:41 2023 -0500 drm/amdgpu/sdma5.2: add begin/end_use ring callbacks Add begin/end_use ring callbacks to disallow GFXOFF when SDMA work is submitted and allow it again afterward. This should avoid corner cases where GFXOFF is erroneously entered when SDMA is still active. For now just allow/disallow GFXOFF in the begin and end helpers until we root cause the issue. This should not impact power as SDMA usage is pretty minimal and GFXOSS should not be active when SDMA is active anyway, this just makes it explicit. v2: move everything into sdma5.2 code. No reason for this to be generic at this point. v3: Add comments in new code Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2220 Reviewed-by: Mario Limonciello (v1) Tested-by: Mario Limonciello (v1) Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.15+ commit cca850267d33f1153e16e07dc7c32ce5bc3df1fe Author: Evan Quan Date: Mon Dec 11 18:06:30 2023 +0800 drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7 Fulfill the SMU13.0.7 support for Wifi RFI mitigation feature. -- v10->v11: - downgrade the prompt level on message failure(Lijo) v13: - Fix the format issue (IIpo Jarvinen) - Remove duplicate code (IIpo Jarvinen) Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello Signed-off-by: Ma Jun Signed-off-by: Alex Deucher commit 18df969b44a0bdc1f24f6ca6b10595dad6f57398 Author: Ma Jun Date: Mon Dec 11 18:06:29 2023 +0800 drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0 Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. -- v10->v11: - downgrade the prompt level on message failure(Lijo) v13: - Fix the format issue (IIpo Jarvinen) - Move function smu_v13_0_0_set_wbrf_exclusion_ranges to smu_v13_0.c as a generic code for later use (IIpo Jarvinen) Co-developed-by: Evan Quan Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello Signed-off-by: Ma Jun Signed-off-by: Alex Deucher commit 71f69557cb12a4674a05b4c5fb730880f13366b1 Author: Evan Quan Date: Mon Dec 11 18:06:28 2023 +0800 drm/amd/pm: add flood detection for wbrf events To protect PMFW from being overloaded. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello Signed-off-by: Ma Jun Signed-off-by: Alex Deucher commit b8b39de646274366d17a3614fdaf65fa0716ab32 Author: Evan Quan Date: Mon Dec 11 18:06:27 2023 +0800 drm/amd/pm: setup the framework to support Wifi RFI mitigation feature With WBRF feature supported, as a driver responding to the frequencies, amdgpu driver is able to do shadow pstate switching to mitigate possible interference(between its (G-)DDR memory clocks and local radio module frequency bands used by Wifi 6/6e/7). -- v1->v2: - update the prompt for feature support(Lijo) v8->v9: - update parameter document for smu_wbrf_event_handler(Simon) v9->v10: v10->v11: - correct the logics for wbrf range sorting(Lijo) v13: - Fix the format issue (IIpo Jarvinen) Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello Signed-off-by: Ma Jun Signed-off-by: Ma Jun Signed-off-by: Alex Deucher commit 296b29ce8acb5dbb3ca1937f1b537b3f6be0460a Author: Evan Quan Date: Mon Dec 11 18:06:26 2023 +0800 drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature Add those data structures to support Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello Signed-off-by: Ma Jun Signed-off-by: Alex Deucher commit 4f914d75a1238555764ba4c2ae1116ed062bd976 Merge: 0188006d7c797 58e82a62669da Author: Alex Deucher Date: Wed Dec 13 15:22:29 2023 -0500 Merge tag 'platform-drivers-x86-amd-wbrf-v6.8-1' into amd-drm-next Immutable branch between pdx86 amd wbrf branch and wifi / amdgpu due for the v6.8 merge window platform-drivers-x86-amd-wbrf-v6.8-1: v6.7-rc1 + AMD WBRF support for merging into the wifi subsys and amdgpu driver for 6.8. Signed-off-by: Alex Deucher commit 0188006d7c797a37c04471a2b4a34a7dfb21f363 Author: Felix Kuehling Date: Tue Sep 19 14:57:02 2023 -0400 drm/amdkfd: Import DMABufs for interop through DRM Use drm_gem_prime_fd_to_handle to import DMABufs for interop. This ensures that a GEM handle is created on import and that obj->dma_buf will be set and remain set as long as the object is imported into KFD. Signed-off-by: Felix Kuehling Reviewed-by: Ramesh Errabolu Reviewed-by: Xiaogang.Chen Acked-by: Christian König Signed-off-by: Alex Deucher commit 1819200166ce511ac298dc96b9b17eb655a9edc4 Author: Felix Kuehling Date: Thu Aug 24 14:41:30 2023 -0400 drm/amdkfd: Export DMABufs from KFD using GEM handles Create GEM handles for exporting DMABufs using GEM-Prime APIs. The GEM handles are created in a drm_client_dev context to avoid exposing them in user mode contexts through a DMABuf import. Signed-off-by: Felix Kuehling Reviewed-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 4e95669ecb03d797355bc23871c5c43b9475d3dc Author: Vignesh Chander Date: Fri Dec 8 12:00:26 2023 -0600 drm/amdgpu: xgmi_fill_topology_info 1. Use the mirrored topology info to fill links for VF. The new solution is required to simplify and optimize host driver logic. Only use the new solution for VFs that support full duplex and extended_peer_link_info otherwise the info would be incomplete. 2. avoid calling extended_link_info on VF as its not supported Signed-off-by: Vignesh Chander Reviewed-by: Zhigang Luo Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher commit a9210714d23190b44eed32f8bcadbe3b18d51a1d Author: Harshit Mogalapalli Date: Fri Dec 8 01:58:24 2023 -0800 drm/amd/display: Fix memory leak in dm_set_writeback() 'wb_info' needs to be freed on error paths or it would leak the memory. Smatch pointed this out. Fixes: c81e13b929df ("drm/amd/display: Hande writeback request from userspace") Signed-off-by: Harshit Mogalapalli Reviewed-by: Alex Hung Signed-off-by: Alex Deucher commit ec7b2a55463ea50401a8146793b61ee590255a45 Author: Joshua Ashton Date: Thu Nov 16 18:57:48 2023 -0100 drm/amd/display: add plane HDR multiplier driver-specific property Multiplier to 'gain' the plane. When PQ is decoded using the fixed func transfer function to the internal FP16 fb, 1.0 -> 80 nits (on AMD at least) When sRGB is decoded, 1.0 -> 1.0. Therefore, 1.0 multiplier = 80 nits for SDR content. So if you want, 203 nits for SDR content, pass in (203.0 / 80.0). v4: - comment about the PQ TF need for L-to-NL (from Harry's review) Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit e4cddd51bfab2a40529a4af35bd2c912b5a0c239 Author: Melissa Wen Date: Thu Nov 16 18:57:47 2023 -0100 drm/amd/display: document AMDGPU pre-defined transfer functions Brief documentation about pre-defined transfer function usage on AMD display driver and standardized EOTFs and inverse EOTFs. v3: - Document BT709 OETF (Pekka) - Fix description of sRGB and pure power funcs (Pekka) v4: - Add description of linear and non-linear forms (Harry) Reviewed-by: Harry Wentland Co-developed-by: Harry Wentland Signed-off-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 5a3b965b5810bd602d2c7d8ea79ffe8c6e81268d Author: Melissa Wen Date: Thu Nov 16 18:57:46 2023 -0100 drm/amd/display: explicitly define EOTF and inverse EOTF Instead of relying on color block names to get the transfer function intention regarding encoding pixel's luminance, define supported Electro-Optical Transfer Functions (EOTFs) and inverse EOTFs, that includes pure gamma or standardized transfer functions. v3: - squash linear and unity TFs to identity (Pekka) - define the right TFs for BT.709 (Pekka and Harry) - add comment about AMD TF coefficients Suggested-by: Harry Wentland Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit d5a348d96e4e2b924fa83e729f8791c03a4f8e24 Author: Joshua Ashton Date: Thu Nov 16 18:57:45 2023 -0100 drm/amd/display: add plane degamma TF driver-specific property Allow userspace to tell the kernel driver the input space and, therefore, uses correct predefined transfer function (TF) to go from encoded values to linear values. v2: - rename TF enum prefix from DRM_ to AMDGPU_ (Harry) - remove HLG TF Reviewed-by: Harry Wentland Signed-off-by: Joshua Ashton Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 571c2fa26aa654946447c282a09d40a56c7ff128 Author: Mario Limonciello Date: Mon Jun 19 15:04:24 2023 -0500 drm/amd/display: Disable PSR-SU on Parade 0803 TCON again When screen brightness is rapidly changed and PSR-SU is enabled the display hangs on panels with this TCON even on the latest DCN 3.1.4 microcode (0x8002a81 at this time). This was disabled previously as commit 072030b17830 ("drm/amd: Disable PSR-SU on Parade 0803 TCON") but reverted as commit 1e66a17ce546 ("Revert "drm/amd: Disable PSR-SU on Parade 0803 TCON"") in favor of testing for a new enough microcode (commit cd2e31a9ab93 ("drm/amd/display: Set minimum requirement for using PSR-SU on Phoenix")). As hangs are still happening specifically with this TCON, disable PSR-SU again for it until it can be root caused. Cc: stable@vger.kernel.org Cc: aaron.ma@canonical.com Cc: binli@gnome.org Cc: Marc Rossi Cc: Hamza Mahfooz Signed-off-by: Mario Limonciello Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2046131 Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit bcbd0787f8be31b17125d05cfaf71724774b9964 Author: Aric Cyr Date: Wed Dec 6 14:52:34 2023 -0500 drm/amd/display: 3.2.264 Summary: Bug fixes for: * DCN35 power gating * P-state change, & prefetch logic * ABM * DP 2.1 Acked-by: Aurabindo Pillai Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher commit 7253c36b1febe7e76be3da26fbf875978b37e92c Author: Charlene Liu Date: Wed Dec 6 14:52:33 2023 -0500 drm/amd/display: fix HW block PG sequence [why] Power up and power down has reverted programming order. also make sure disable root clock last. Reviewed-by: Muhammad Ahmed Acked-by: Aurabindo Pillai Signed-off-by: Charlene Liu Signed-off-by: Alex Deucher commit 9a902a9073c287353e25913c0761bfed49d75a88 Author: Alvin Lee Date: Wed Dec 6 14:52:32 2023 -0500 drm/amd/display: Force p-state disallow if leaving no plane config [Description] - When we're in a no plane config, DCN is always asserting P-State allow - This creates a scenario where the P-State blackout can start just as VUPDATE takes place and transitions the DCN config to a one where one or more HUBP's are active which can result in underflow - To fix this issue, force p-state disallow and unforce after the transition from no planes case -> one or more planes active Reviewed-by: Samson Tam Acked-by: Aurabindo Pillai Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit dd4e4bb28843393065eed279e869fac248d03f0f Author: Alvin Lee Date: Wed Dec 6 14:52:31 2023 -0500 drm/amd/display: For prefetch mode > 0, extend prefetch if possible [Description] For mode programming we want to extend the prefetch as much as possible (up to oto, or as long as we can for equ) if we're not already applying the 60us prefetch requirement. This is to avoid intermittent underflow issues during prefetch. The prefetch extension is applied under the following scenarios: 1. We're in prefetch mode 1 (i.e. we don't support MCLK switch in blank) 2. We're using subvp or drr methods of p-state switch, in which case we we don't care if prefetch takes up more of the blanking time Mode programming typically chooses the smallest prefetch time possible (i.e. highest bandwidth during prefetch) presumably to create margin between p-states / c-states that happen in vblank and prefetch. Therefore we only apply this prefetch extension when p-state in vblank is not required (UCLK p-states take up the most vblank time). Reviewed-by: Jun Lei Acked-by: Aurabindo Pillai Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit fdb0ad2ff7c84bda30bfe3b8f90abd1f8d8788a0 Author: Sung Joon Kim Date: Wed Dec 6 14:52:30 2023 -0500 drm/amd/display: Exit from idle state before accessing HW data [why & how] User interface cannot guarantee system is in idle state, so need to ensure we exit idle state before accessing any HW data. Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Sung Joon Kim Signed-off-by: Alex Deucher commit bbc42960f9b68e548403e57b2cfd6e93e684864f Author: Allen Date: Wed Dec 6 14:52:29 2023 -0500 drm/amd/display: Disable OPTC pg to match DC Hubp/dpp pg [Why] To match the hardware sequence Reviewed-by: Charlene Liu Acked-by: Aurabindo Pillai Signed-off-by: Allen Signed-off-by: Alex Deucher commit c1afbb715e33a2b208c27a989c5f929029ffe7d3 Author: Fangzhi Zuo Date: Wed Dec 6 14:52:28 2023 -0500 drm/amd/display: Populate dtbclk from bounding box dtbclk is unavaliable from pmfw. Try to grab the value from bounding box Reviewed-by: Charlene Liu Acked-by: Aurabindo Pillai Signed-off-by: Fangzhi Zuo Signed-off-by: Alex Deucher commit 2170fb03be28ad7807ea460101a60689c3f383e4 Author: Michael Strauss Date: Wed Dec 6 14:52:27 2023 -0500 drm/amd/display: Revert DP2 MST hub triple display fix [WHY] Introduces regression with DP2 native displays [HOW] Revert the change Reviewed-by: Charlene Liu Acked-by: Aurabindo Pillai Signed-off-by: Michael Strauss Signed-off-by: Alex Deucher commit 11edbb4497504540f5e73a8aabf1254b31cf0a82 Author: Aurabindo Pillai Date: Wed Dec 6 14:52:26 2023 -0500 drm/amd/display: trivial comment change FP guard is valid for all recent asics, not just RV, so fix the comment. Reviewed-by: Chaitanya Dhere Acked-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit d0f639c5869399bf6dde4d694d5f8c0ab8c0ec46 Author: Taimur Hassan Date: Wed Dec 6 14:52:25 2023 -0500 drm/amd/display: Revert "Fix conversions between bytes and KB" [Why & How] HostVMMinPageSize is expected to be in KB according to spec, the checks later down the line reflect this as well. Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Signed-off-by: Taimur Hassan Signed-off-by: Alex Deucher commit af68153ffe8c4f778ba9cbe1d1725a939ab94576 Author: Ran Shi Date: Wed Dec 6 14:52:24 2023 -0500 drm/amd/display: allow DP40 cables to do UHBR13.5 why: With DP2.1a expansion we are allowing DP40 cables to do UHBR13.5 how: Assume UHBR10 means UHBR13.5 also for unknown cable type and passive cable type. Reviewed-by: George Shen Acked-by: Aurabindo Pillai Signed-off-by: Ran Shi Signed-off-by: Alex Deucher commit 7f9b4fb450a65a46df3d454a53836cad7e1c79c6 Author: Aurabindo Pillai Date: Wed Dec 6 14:52:23 2023 -0500 drm/amd/display: Use explicit size for types in DCCG's struct dp_dto_params Reviewed-by: Alvin Lee Acked-by: Aurabindo Pillai Signed-off-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 9a10bd0df618f500ca526cf99f42504900020c2c Author: Joshua Aberback Date: Wed Dec 6 14:52:22 2023 -0500 drm/amd/display: Remove minor revision 5 until proper parser is ready Reviewed-by: Dillon Varone Acked-by: Aurabindo Pillai Signed-off-by: Joshua Aberback Signed-off-by: Alex Deucher commit 31e6af1ff77533df2e8e006974a9b57adece0488 Author: Ma Jun Date: Fri Nov 3 13:41:42 2023 +0800 drm/amd/pm: Remove redundant function members of pptable_funcs Remove redundant functions members of pptable_funcs and change the function type as static because they are not called by other files. Signed-off-by: Ma Jun Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit b70aed8f5d7686c4343f9ae618287404fa5a703e Author: Saleemkhan Jamadar Date: Tue Nov 28 17:02:06 2023 +0530 drm/amdgpu/jpeg: configure doorbell for each playback Doorbell is configured during start of each playback. v1 - add comment for the doorbell programming change Signed-off-by: Saleemkhan Jamadar Acked-by: Leo Liu Reviewed-by: Veerabadhran Gopalakrishnan Signed-off-by: Alex Deucher commit ed342a2e78c4e4a8d82c2d19c95e8a3eb092c0d0 Author: Lijo Lazar Date: Fri Dec 1 17:13:46 2023 +0530 drm/amdgpu: Use the right method to get IP version Replace direct usage of adev->ip_versions with amdgpu_ip_version. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9342a9ae54ef299ffe5e4ce3d0be6a4da5edba0e Author: Melissa Wen Date: Thu Nov 16 18:57:44 2023 -0100 drm/amd/display: add driver-specific property for plane degamma LUT Hook up driver-specific atomic operations for managing AMD color properties. Create AMD driver-specific color management properties and attach them according to HW capabilities defined by `struct dc_color_caps`. First add plane degamma LUT properties that means user-blob and its size. We will add more plane color properties in the next patches. In addition, we define AMD_PRIVATE_COLOR to guard these driver-specific plane properties. Plane degamma can be used to linearize input space for arithmetical operations that are more accurate when applied in linear color. v2: - update degamma LUT prop description - move private color operations from amdgpu_display to amdgpu_dm_color v5: - get degamma blob correctly (Joshua) Reviewed-by: Harry Wentland Co-developed-by: Joshua Ashton Signed-off-by: Joshua Ashton Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher commit 24013b9301349881c9fcd27e7edacc672e0bf6d3 Author: Melissa Wen Date: Thu Nov 16 18:57:43 2023 -0100 drm/drm_plane: track color mgmt changes per plane We will add color mgmt properties to DRM planes in the next patches and we want to track when one of this properties change to define atomic commit behaviors. Using a similar approach from CRTC color props, we set a color_mgmt_changed boolean whenever a plane color prop changes. Reviewed-by: Harry Wentland Signed-off-by: Melissa Wen Acked-by: Maxime Ripard Signed-off-by: Alex Deucher commit 601603105325ad4ec62db95c9bc428202ece2c8f Author: Melissa Wen Date: Thu Nov 16 18:57:42 2023 -0100 drm/drm_property: make replace_property_blob_from_id a DRM helper Place it in drm_property where drm_property_replace_blob and drm_property_lookup_blob live. Then we can use the DRM helper for driver-specific KMS properties too. Reviewed-by: Harry Wentland Reviewed-by: Liviu Dudau Signed-off-by: Melissa Wen Acked-by: Maxime Ripard Signed-off-by: Alex Deucher commit 1e13c5644c443dee727ac1330bc118c909a1cf07 Author: Melissa Wen Date: Thu Nov 16 18:57:41 2023 -0100 drm/drm_mode_object: increase max objects to accommodate new color props DRM_OBJECT_MAX_PROPERTY limits the number of properties to be attached and we are increasing that value all time we add a new property (generic or driver-specific). In this series, we are adding 13 new KMS driver-specific properties for AMD color manage: - CRTC Gamma enumerated Transfer Function - Plane: Degamma LUT+size+TF, HDR multiplier, shaper LUT+size+TF, 3D LUT+size, blend LUT+size+TF (12) Therefore, just increase DRM_OBJECT_MAX_PROPERTY to a number (64) that accomodates these new properties and gives some room for others, avoiding change this number everytime we add a new KMS property. Reviewed-by: Harry Wentland Reviewed-by: Simon Ser Signed-off-by: Melissa Wen Reviewed-by: Abhinav Kumar Acked-by: Maxime Ripard Signed-off-by: Alex Deucher commit 5d1ff65f80fd8c11476bd10d10aa2b2b639de432 Author: Colin Ian King Date: Thu Dec 7 10:54:54 2023 +0000 drm/amd/display: Fix spelling mistake "SMC_MSG_AllowZstatesEntr" -> "SMC_MSG_AllowZstatesEntry" There is a spelling mistake in a smu_print message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 51ea405c47f833e55d19401b35b71100197e6d5d Author: Alex Deucher Date: Mon Dec 11 11:28:30 2023 -0500 drm/amdgpu: fix buffer funcs setting order on suspend harder Part of commit c03581986234 ("drm/amdgpu: fix buffer funcs setting order on suspend") got dropped accidently. Add it back. Fixes: c03581986234 ("drm/amdgpu: fix buffer funcs setting order on suspend") Signed-off-by: Alex Deucher commit 30579c8baa5b4bd986420a984dad2940f1ff65d3 Author: Borislav Petkov (AMD) Date: Thu Nov 30 14:26:01 2023 +0100 x86/sev: Do the C-bit verification only on the BSP There's no need to do it on every AP. The C-bit value read on the BSP and also verified there, is used everywhere from now on. No functional changes - just a bit faster booting APs. Signed-off-by: Borislav Petkov (AMD) Acked-by: Tom Lendacky Link: https://lore.kernel.org/r/20231130132601.10317-1-bp@alien8.de commit 7dfb03dd24d43b9e7a725e70d2e8a83bb29df294 Merge: ad9446302919e 90f1015dfee3d dee39c0c1e962 18966f7b9458d 3c6b0c1c28184 Author: Neeraj Upadhyay (AMD) Date: Thu Dec 14 01:21:31 2023 +0530 Merge branches 'doc.2023.12.13a', 'torture.2023.11.23a', 'fixes.2023.12.13a', 'rcu-tasks.2023.12.12b' and 'srcu.2023.12.13a' into rcu-merge.2023.12.13a commit dee39c0c1e9624f925da4ca0bece46bdc7427257 Author: Zqiang Date: Wed Nov 1 11:35:07 2023 +0800 rcu: Force quiescent states only for ongoing grace period If an rcutorture test scenario creates an fqs_task kthread, it will periodically invoke rcu_force_quiescent_state() in order to start force-quiescent-state (FQS) operations. However, an FQS operation will be started even if there is no RCU grace period in progress. Although testing FQS operations startup when there is no grace period in progress is necessary, it need not happen all that often. This commit therefore causes rcu_force_quiescent_state() to take an early exit if there is no grace period in progress. Note that there will still be attempts to start an FQS scan in the absence of a grace period because the grace period might end right after the rcu_force_quiescent_state() function's check. In actual testing, this happens about once every ten minutes, which should provide adequate testing. Signed-off-by: Zqiang Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit ad9446302919ee3a646ad667a9ea15f992685dca Author: Paul E. McKenney Date: Fri Oct 20 11:04:27 2023 -0700 doc: Clarify historical disclaimers in memory-barriers.txt This commit makes it clear that the reason that these sections are historical is that smp_read_barrier_depends() is no more. It also removes the point about comparison operations, given that there are other optimizations that can break address dependencies. Suggested-by: Jonas Oberhauser Signed-off-by: Paul E. McKenney Cc: Alan Stern Cc: Andrea Parri Cc: Will Deacon Cc: Peter Zijlstra Cc: Boqun Feng Cc: Nicholas Piggin Cc: David Howells Cc: Jade Alglave Cc: Luc Maranget Cc: Akira Yokosawa Cc: Daniel Lustig Cc: Joel Fernandes Cc: Jonathan Corbet Cc: Cc: Signed-off-by: Neeraj Upadhyay (AMD) commit c49956be75152a533787f5daa06ef4b710207499 Author: Paul E. McKenney Date: Fri Oct 20 10:51:26 2023 -0700 doc: Mention address and data dependencies in rcu_dereference.rst This commit adds discussion of address and data dependencies to the beginning of rcu_dereference.rst in order to enable readers to more easily make the connection to the Linux-kernel memory model in general and to memory-barriers.txt in particular. Reported-by: Jonas Oberhauser Reported-by: Akira Yokosawa Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 1b7178b23dc915fc6801ff3eeb6c4ffa51b562f7 Author: Paul E. McKenney Date: Tue Oct 3 10:30:01 2023 -0700 doc: Clarify RCU Tasks reader/updater checklist Currently, the reader/updater compatibility rules for the three RCU Tasks flavors are squished together in a single paragraph, which can result in confusion. This commit therefore splits them out into a list, clearly showing the distinction between these flavors. Link: https://lore.kernel.org/all/20231002211936.5948253e@gandalf.local.home/ Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney Reviewed-by: Mathieu Desnoyers Reviewed-by: Steven Rostedt (Google) Signed-off-by: Neeraj Upadhyay (AMD) commit 493dffa3ab07b5d2c0b7bd5de5bff6e85f01f52a Author: Philipp Stanner Date: Wed Sep 20 11:22:12 2023 +0200 rculist.h: docs: Fix wrong function summary The brief summary in the docstring for function list_next_or_null_rcu() states that the function is supposed to provide the "first" member of a list, whereas in truth it returns the next member. Change the docstring so it describes what the function actually does. Signed-off-by: Philipp Stanner Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit fb91e42fe3bfca0293cb85c5fbb6f98d9d173aec Author: Charles Han Date: Mon Sep 18 11:13:09 2023 +0800 Documentation: RCU: Remove repeated word in comments Remove the repeated word "of" in comments. Signed-off-by: Charles Han Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 991801bc4722e287035e907a0202954a2ffb2798 Author: Christophe JAILLET Date: Sun Dec 10 18:50:03 2023 +0100 PCI: vmd: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Link: https://lore.kernel.org/linux-pci/270f25cdc154f3b0309e57b2f6421776752e2170.1702230593.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Krzysztof Wilczyński commit a75b3809dce2ad006ebf7fa641f49881fa0d79d7 Author: Kees Cook Date: Thu Nov 30 12:51:19 2023 -0800 qnx4: Use get_directory_fname() in qnx4_match() Use the new common directory entry name accessor helper to avoid confusing the compiler about over-running the file name buffer. Avoids false positive buffer overflow warning: [ 4849.636861] detected buffer overflow in strlen [ 4849.636897] ------------[ cut here ]------------ [ 4849.636902] kernel BUG at lib/string.c:1165! ... [ 4849.637047] Call Trace: ... [ 4849.637251] qnx4_find_entry.cold+0xc/0x18 [qnx4] [ 4849.637264] qnx4_lookup+0x3c/0xa0 [qnx4] Reported-by: Ronald Monthero Closes: https://lore.kernel.org/lkml/20231112095353.579855-1-debug.penguin32@gmail.com/ Acked-by: Anders Larsen Link: https://lore.kernel.org/r/20231130205120.3642477-2-keescook@chromium.org Signed-off-by: Kees Cook commit 53853995c6652e12b0aa0d15aecda4cbba5183ec Author: Kees Cook Date: Thu Nov 30 12:51:18 2023 -0800 qnx4: Extract dir entry filename processing into helper Both dir.c and namei.c need to perform the same work to figure out a directory entry's name and size. Extract this into a helper for use in the next patch. Acked-by: Anders Larsen Link: https://lore.kernel.org/r/20231130205120.3642477-1-keescook@chromium.org Signed-off-by: Kees Cook commit 9d71df3e6eb773f23d6f1f3f8790bae6aba1a088 Author: Peter Griffin Date: Mon Dec 11 16:23:31 2023 +0000 MAINTAINERS: add entry for Google Tensor SoC Add maintainers entry for the Google tensor SoC based platforms. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20231211162331.435900-17-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 6a5713fc7853c3998c706cb809c5d9fd1c6acaa5 Author: Peter Griffin Date: Mon Dec 11 16:23:30 2023 +0000 arm64: dts: exynos: google: Add initial Oriole/pixel 6 board support Add initial board support for the Pixel 6 phone code named Oriole. This has been tested with a minimal busybox initramfs and boots to a shell. Tested-by: Will McVicker Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20231211162331.435900-16-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit ea89fdf24fd94cd37a7e2c51e09c39423ced7ccb Author: Peter Griffin Date: Mon Dec 11 16:23:29 2023 +0000 arm64: dts: exynos: google: Add initial Google gs101 SoC support Google gs101 SoC is a ARMv8 mobile SoC found in the Pixel 6 (oriole), Pixel 6a (bluejay) and Pixel 6 pro (raven) mobile phones. It features: * 4xA55 Little cluster * 2xA76 Mid cluster * 2xX1 Big cluster This commit adds the basic device tree for gs101 (SoC). Further platform support will be added over time. Reviewed-by: Sam Protsenko Tested-by: Will McVicker Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-15-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 796bb2d3a16c1e786ed51183162783405b5c8f85 Author: Peter Griffin Date: Mon Dec 11 16:23:27 2023 +0000 watchdog: s3c2410_wdt: Add support for Google gs101 SoC This patch adds the compatibles and drvdata for the Google gs101 SoC found in Pixel 6, Pixel 6a & Pixel 6 pro phones. Similar to Exynos850 it has two watchdog instances, one for each cluster and has some control bits in PMU registers. gs101 also has the dbgack_mask bit in wtcon register, so we also enable QUIRK_HAS_DBGACK_BIT. Tested-by: Will McVicker Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231211162331.435900-13-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit d429928dde2d7e3e98cbea5f170d089d10a45c39 Author: Peter Griffin Date: Mon Dec 11 16:23:26 2023 +0000 watchdog: s3c2410_wdt: Update QUIRK macros to use BIT macro Update the remaining QUIRK macros to use the BIT macro. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-12-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 6584cd34901056bc12e015781e4adf03b44ba485 Author: Peter Griffin Date: Mon Dec 11 16:23:25 2023 +0000 watchdog: s3c2410_wdt: Add support for WTCON register DBGACK_MASK bit The WDT uses the CPU core signal DBGACK to determine whether the SoC is running in debug mode or not. If the DBGACK signal is asserted and DBGACK_MASK bit is enabled, then WDT output and interrupt is masked (disabled). Presence of the DBGACK_MASK bit is determined by adding a new QUIRK_HAS_DBGACK_BIT quirk. Also update to use BIT macro to avoid checkpatch --strict warnings. Tested-by: Will McVicker Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-11-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit b3582328b9c52f179de7fdd7694c42548d416e39 Author: Peter Griffin Date: Mon Dec 11 16:23:17 2023 +0000 dt-bindings: arm: google: Add bindings for Google ARM platforms This introduces bindings and dt-schema for the Google Tensor SoCs. Currently just gs101 and pixel 6 are supported. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231211162331.435900-3-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 515f05da372aedf347a1ac99d17fb832ba371d4d Author: Claudiu Beznea Date: Thu Dec 7 09:06:51 2023 +0200 clk: renesas: r9a08g045: Add clock and reset support for ETH0 and ETH1 RZ/G3S has 2 Gigabit Ethernet interfaces available. Add clock and reset support for both of them. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-3-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit da235d2fac212d0add570e755feb1167a830bc99 Author: Claudiu Beznea Date: Thu Dec 7 09:06:50 2023 +0200 clk: renesas: rzg2l: Check reset monitor registers The hardware manual of both RZ/G2L and RZ/G3S specifies that the reset monitor registers need to be interrogated when the reset signals are toggled (chapters "Procedures for Supplying and Stopping Reset Signals" and "Procedure for Activating Modules"). Without this, there is a chance that different modules (e.g. Ethernet) are not ready after their reset signal is toggled, leading to failures (on probe or resume from deep sleep states). The same indications are available for RZ/V2M for TYPE-B reset controls. Fixes: ef3c613ccd68 ("clk: renesas: Add CPG core wrapper for RZ/G2L SoC") Fixes: 8090bea32484 ("clk: renesas: rzg2l: Add support for RZ/V2M reset monitor reg") Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8cd53c6b200e6a4522524e8cf45adc45a35814e1 Author: Ville Syrjälä Date: Tue Nov 28 13:51:38 2023 +0200 drm/i915: Simplify intel_ddi_compute_min_voltage_level() Drop the redundant dev_priv parameters from intel_ddi_compute_min_voltage_level() to make life easier. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231128115138.13238-9-ville.syrjala@linux.intel.com Reviewed-by: Gustavo Sousa commit 0656afab88a6cf0efb3fbef394b68a4451b40365 Author: Ville Syrjälä Date: Tue Nov 28 13:51:37 2023 +0200 drm/i915/mtl: Calculate the correct voltage level from port_clock On MTL we need to bump the voltage level to only 1 (not 2) when port clock exceeds 594MHz. Make it so. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231128115138.13238-8-ville.syrjala@linux.intel.com Reviewed-by: Gustavo Sousa commit 46bdb77d8b61e560ebb95c8d3a355be84b5492d2 Author: Ville Syrjälä Date: Tue Nov 28 13:51:36 2023 +0200 drm/i915: Split intel_ddi_compute_min_voltage_level() into platform variants The mess inside intel_ddi_compute_min_voltage_level() is illegible. Clean it up a bit by splitting the internals into per-platform functions. TODO: make it a vfunc? Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231128115138.13238-7-ville.syrjala@linux.intel.com Reviewed-by: Gustavo Sousa commit 273361f54e5bcaccdd725a9ffac14a9fac672451 Author: Ville Syrjälä Date: Tue Nov 28 13:51:35 2023 +0200 drm/i915/mtl: Fix voltage_level for cdclk==480MHz Allow MTL to use voltage level 1 for 480MHz cdclk, instead of the voltage level 2 that it's currently using. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231128115138.13238-6-ville.syrjala@linux.intel.com Reviewed-by: Gustavo Sousa commit f23fe4d7d794c6d71dc6b8fdc510da2fc2174369 Author: Ville Syrjälä Date: Tue Dec 12 00:17:59 2023 +0200 drm/i915/cdclk: Rewrite cdclk->voltage_level selection to use tables The cdclk->voltage_level if ladders are hard to read, especially as they're written the other way around compared to how bspec lists the limits. Let's rewrite them to use simple arrays that gives us the max cdclk for each voltage level. v2: Bump the jsl/ehl max cdclk in the table to 652.8 MHz to accommodate JSL machines in CI that boot with high cdclk Reviewed-by: Gustavo Sousa Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231211221759.29725-1-ville.syrjala@linux.intel.com commit e1a914aef28f39aec5f107f31478d95aff3ae6db Author: Ville Syrjälä Date: Tue Dec 12 00:16:36 2023 +0200 drm/i915/cdclk: Remove the assumption that cdclk divider==2 when using squashing Currently we have a hardcoded assumption that the cdclk divider (2*cd2x divider) is always 2 when squashing is used. While that is true for all current platforms it might not hold in the future. So eliminate the assumption and calculate the correct divider from the other parameters. v2: s/cd2x divider/cdclk divider/ (Gustavo) s/clock/unsquashed_cdclk/ (Gustavo) Reviewed-by: Gustavo Sousa Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231211221636.29658-1-ville.syrjala@linux.intel.com commit 2581547335ff8acd877f1acd4ee57527eaaa0bde Author: Ville Syrjälä Date: Tue Nov 28 13:51:32 2023 +0200 drm/i915/cdclk: Give the squash waveform length a name Replace the slightly magic 'size = 16' with a bit more descriptive name. We'll have another user for this value later on. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231128115138.13238-3-ville.syrjala@linux.intel.com Reviewed-by: Gustavo Sousa commit e2e1916008aacf706ffa6bba65714c6d6200b196 Author: Ville Syrjälä Date: Tue Nov 28 13:51:31 2023 +0200 drm/i915/cdclk: s/-1/~0/ when dealing with unsigned values cdclk_pll_is_unknown() used ~0 when checking for the "VCO is unknown" value, but the assignment uses -1. They are the same in the end, but let's use the same ~0 form on both sides for consistency. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231128115138.13238-2-ville.syrjala@linux.intel.com Reviewed-by: Gustavo Sousa commit e93bffc2ac0a833b42841f31fff955549d38ce98 Author: Ville Syrjälä Date: Mon Dec 11 10:11:34 2023 +0200 drm/i915: Reject async flips with bigjoiner Currently async flips are busted when bigjoiner is in use. As a short term fix simply reject async flips in that case. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9769 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231211081134.2698-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 906b545b16594e45f2d3433028dcf649d2c05ebb Author: Claudiu Beznea Date: Thu Dec 7 09:06:52 2023 +0200 pinctrl: renesas: rzg2l: Move arg and index in the main function block Move arg and index in the main block of the function as they are used by more than one case block of switch-case (3 out of 4 for arg, 2 out of 4 for index). In this way some lines of code are removed. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-4-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 62d9a969f4a95219c757831e9ad66cd4dd9edee5 Author: Andrii Nakryiko Date: Tue Dec 12 14:53:43 2023 -0800 selftests/bpf: fix compiler warnings in RELEASE=1 mode When compiling BPF selftests with RELEASE=1, we get two new warnings, which are treated as errors. Fix them. Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Acked-by: John Fastabend Link: https://lore.kernel.org/r/20231212225343.1723081-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 4490f559f75514d5a6f0e729e85235a7be6216bf Author: Matt Ranostay Date: Tue Nov 28 11:14:01 2023 +0530 PCI: j721e: Add PCIe 4x lane selection support Add support for setting of two-bit field that allows selection of 4x lane PCIe which was previously limited to only 2x lanes. Link: https://lore.kernel.org/linux-pci/20231128054402.2155183-5-s-vadapalli@ti.com Signed-off-by: Matt Ranostay Signed-off-by: Achal Verma Signed-off-by: Siddharth Vadapalli Signed-off-by: Krzysztof Wilczyński Reviewed-by: Vignesh Raghavendra Reviewed-by: Roger Quadros commit 3ac7f14084f54bff9c31573d1ed59d047a34fe03 Author: Matt Ranostay Date: Tue Nov 28 11:14:00 2023 +0530 PCI: j721e: Add per platform maximum lane settings Various platforms have different maximum amount of lanes that can be selected. Add max_lanes to struct j721e_pcie to allow for detection of this which is needed to calculate the needed bitmask size for the possible lane count. Link: https://lore.kernel.org/linux-pci/20231128054402.2155183-4-s-vadapalli@ti.com Signed-off-by: Matt Ranostay Signed-off-by: Achal Verma Signed-off-by: Siddharth Vadapalli Signed-off-by: Krzysztof Wilczyński Reviewed-by: Ravi Gunasekaran commit adc14d44d7cb676a5e2105a711e8a168eaebed6e Author: Matt Ranostay Date: Tue Nov 28 11:13:59 2023 +0530 dt-bindings: PCI: ti,j721e-pci-*: Add j784s4-pci-* compatible strings Add definition for j784s4-pci-ep and j784s4-pci-host devices along with schema checks for num-lanes. Link: https://lore.kernel.org/linux-pci/20231128054402.2155183-3-s-vadapalli@ti.com Signed-off-by: Matt Ranostay Signed-off-by: Achal Verma Signed-off-by: Siddharth Vadapalli Signed-off-by: Krzysztof Wilczyński Acked-by: Krzysztof Kozlowski commit b3ba0f6e82cb9a88d64519f1a0c455bca39d343e Author: Matt Ranostay Date: Tue Nov 28 11:13:58 2023 +0530 dt-bindings: PCI: ti,j721e-pci-*: Add checks for num-lanes Add num-lanes schema checks based on compatible string on available lanes for that platform. Link: https://lore.kernel.org/linux-pci/20231128054402.2155183-2-s-vadapalli@ti.com Signed-off-by: Matt Ranostay Signed-off-by: Achal Verma Signed-off-by: Siddharth Vadapalli Signed-off-by: Krzysztof Wilczyński Reviewed-by: Krzysztof Kozlowski commit 755cb955e2e7a2ef65e7a782925585ef1cce53b6 Author: Claudiu Beznea Date: Mon Nov 20 13:18:12 2023 +0200 clk: renesas: r9a08g045: Add IA55 pclk and its reset An IA55 interrupt controller is available on the RZ/G3S SoC. Add the IA55 pclk and its reset. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231120111820.87398-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b1a2aa9bcbb88a7dc1c4df98dbf4f4df9ca79c9f Author: Vignesh Raman Date: Thu Dec 7 14:48:31 2023 +0530 drm: ci: Update xfails Update msm-apq8016-fails, mediatek-mt8173-fails and virtio_gpu-none-fails to include the tests which fail. Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-11-vignesh.raman@collabora.com commit 5f15dc44a99d78e86913c2c6bc59dfd8543c7cd6 Author: Vignesh Raman Date: Thu Dec 7 14:48:30 2023 +0530 drm/doc: ci: Add IGT version details for flaky tests Document the IGT version in the flaky tests reporting template. Acked-by: Helen Koike Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-10-vignesh.raman@collabora.com commit 09ac9260916d3678bedc3fd2099a7e485d13e9b4 Author: Vignesh Raman Date: Thu Dec 7 14:48:29 2023 +0530 drm: ci: uprev IGT virtio-gpu kernel driver reports 16 for count_crtcs which exceeds IGT_MAX_PIPES set to 8 in igt-gpu-tools. This results in below memory corruption,  malloc(): corrupted top size  Received signal SIGABRT.  Stack trace:   #0 [fatal_sig_handler+0x17b]   #1 [__sigaction+0x40]   #2 [pthread_key_delete+0x14c]   #3 [gsignal+0x12]   #4 [abort+0xd3]   #5 [__fsetlocking+0x290]   #6 [timer_settime+0x37a]   #7 [__default_morecore+0x1f1b]   #8 [__libc_calloc+0x161]   #9 [drmModeGetPlaneResources+0x44]   #10 [igt_display_require+0x194]   #11 [__igt_unique____real_main1356+0x93c]   #12 [main+0x3f]   #13 [__libc_init_first+0x8a]   #14 [__libc_start_main+0x85]   #15 [_start+0x21]   This is fixed in igt-gpu-tools by increasing IGT_MAX_PIPES to 16.   https://patchwork.freedesktop.org/series/126327/   Uprev IGT to include the patches which fixes this issue. Acked-by: Helen Koike Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-9-vignesh.raman@collabora.com commit dd1581a35e2fe3179e3c6f7622739b00ea9c2f3d Author: Vignesh Raman Date: Thu Dec 7 14:48:28 2023 +0530 drm: ci: virtio: Make artifacts available There were no artifacts available for virtio job. So make the artifacts available in the pipeline job. Acked-by: Helen Koike Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-8-vignesh.raman@collabora.com commit 3f1c87ddfa7915527da99eff4fe24edc96b52bd8 Author: Vignesh Raman Date: Thu Dec 7 14:48:27 2023 +0530 drm: ci: mt8173: Do not set IGT_FORCE_DRIVER to panfrost Mediatek 8173 and 8183 SOCs have a separate display controller and GPU with different drivers for each. For mt8173, the GPU driver is powervr and the display driver is mediatek. In the case of mt8183, the GPU driver is panfrost and the display driver is mediatek. Setting IGT_FORCE_DRIVER to panfrost for mt8173 is not the expected driver. So set mediatek for mt8173. Support to test both GPU and display drivers for these ARM SOCs will be added in the next patch series to increase test coverage. Acked-by: Helen Koike Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-7-vignesh.raman@collabora.com commit 34ec92879b379b52cc2581d5392b7dfb8c45857f Author: Vignesh Raman Date: Thu Dec 7 14:48:26 2023 +0530 drm: ci: Use scripts/config to enable/disable configs Instead of modifying files in git to enable/disable configs, use scripts/config on the .config file which will be used for building the kernel. Acked-by: Helen Koike Suggested-by: Jani Nikula Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-6-vignesh.raman@collabora.com commit 7879c158a153f1cd113640c5644260cb1f619c35 Author: Vignesh Raman Date: Thu Dec 7 14:48:25 2023 +0530 drm: ci: Enable new jobs Enable the following jobs, as the issues noted in the TODO comments have been resolved. This will ensure that these jobs are now included and executed as part of the CI/CD pipeline. msm:apq8016: TODO: current issue: it is not fiding the NFS root. mediatek:mt8173: TODO: current issue: device is hanging. virtio_gpu:none: TODO: current issue: malloc(): corrupted top size. Acked-by: Helen Koike Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-5-vignesh.raman@collabora.com commit 257893829a7f077153f437fe8b0d56f74251ad31 Author: Vignesh Raman Date: Thu Dec 7 14:48:24 2023 +0530 drm: ci: arm64.config: Enable DA9211 regulator Mediatek mt8173 board fails to boot with DA9211 regulator disabled. Enable CONFIG_REGULATOR_DA9211=y in arm64.config to fix mt8173 boot issue. Acked-by: Helen Koike Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-4-vignesh.raman@collabora.com commit 910d2d85febf93a115cdec961c75e6b208532eac Author: Vignesh Raman Date: Thu Dec 7 14:48:23 2023 +0530 drm: ci: Force db410c to host mode Force db410c to host mode to fix network issue which results in failure to mount root fs via NFS. See https://gitlab.freedesktop.org/gfx-ci/linux/-/commit/cb72a629 Use apq8016-sbc-usb-host.dtb which allows the USB controllers to work in host mode. Acked-by: Helen Koike Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-3-vignesh.raman@collabora.com commit 7b1f8da7e17418831839e2d11774e2090cdbe473 Author: Vignesh Raman Date: Thu Dec 7 14:48:22 2023 +0530 drm: ci: igt_runner: Remove todo /sys/kernel/debug/dri/*/state exist for every atomic KMS driver. We do not test non-atomic drivers, so remove the todo. Acked-by: Helen Koike Signed-off-by: Vignesh Raman Signed-off-by: Helen Koike Link: https://patchwork.freedesktop.org/patch/msgid/20231207091831.660054-2-vignesh.raman@collabora.com commit 3c6b0c1c28184038d90dffe8eb542bedcb8ccf98 Author: Sebastian Andrzej Siewior Date: Thu Nov 30 14:27:29 2023 +0100 srcu: Use try-lock lockdep annotation for NMI-safe access. It is claimed that srcu_read_lock_nmisafe() NMI-safe. However it triggers a lockdep if used from NMI because lockdep expects a deadlock since nothing disables NMIs while the lock is acquired. This is because commit f0f44752f5f61 ("rcu: Annotate SRCU's update-side lockdep dependencies") annotates synchronize_srcu() as a write lock usage. This helps to detect a deadlocks such as srcu_read_lock(); synchronize_srcu(); srcu_read_unlock(); The side effect is that the lock srcu_struct now has a USED usage in normal contexts, so it conflicts with a USED_READ usage in NMI. But this shouldn't cause a real deadlock because the write lock usage from synchronize_srcu() is a fake one and only used for read/write deadlock detection. Use a try-lock annotation for srcu_read_lock_nmisafe() to avoid lockdep complains if used from NMI. Fixes: f0f44752f5f6 ("rcu: Annotate SRCU's update-side lockdep dependencies") Link: https://lore.kernel.org/r/20230927160231.XRCDDSK4@linutronix.de Reviewed-by: Boqun Feng Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 1bc479d665bc25a9a4e8168d5b400a47491511f9 Author: Yicong Yang Date: Thu Dec 7 16:16:35 2023 +0800 perf hisi-ptt: Fix one memory leakage in hisi_ptt_process_auxtrace_event() ASan complains a memory leakage in hisi_ptt_process_auxtrace_event() that the data buffer is not freed. Since currently we only support the raw dump trace mode, the data buffer is used only within this function. So fix this by freeing the data buffer before going out. Fixes: 5e91e57e68090c0e ("perf auxtrace arm64: Add support for parsing HiSilicon PCIe Trace packet") Reviewed-by: Ian Rogers Signed-off-by: Yicong Yang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Jonathan Cameron Cc: Junhao He Cc: Mark Rutland Cc: Peter Zijlstra Cc: Qi Liu Link: https://lore.kernel.org/r/20231207081635.8427-3-yangyicong@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 813900d19b923fc1b241c1ce292472f68066092b Author: Yicong Yang Date: Thu Dec 7 16:16:34 2023 +0800 perf header: Fix one memory leakage in perf_event__fprintf_event_update() When dump the raw trace by `perf report -D` ASan reports a memory leakage in perf_event__fprintf_event_update(). It shows that we allocated a temporary cpumap for dumping the CPUs but doesn't release it and it's not used elsewhere. Fix this by free the cpumap after the dumping. Fixes: c853f9394b7bc189 ("perf tools: Add perf_event__fprintf_event_update function") Reviewed-by: Ian Rogers Signed-off-by: Yicong Yang Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Jonathan Cameron Cc: Junhao He Cc: Mark Rutland Cc: Peter Zijlstra Cc: linuxarm@huawei.com Link: https://lore.kernel.org/r/20231207081635.8427-2-yangyicong@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit fc67495680f60e88bb8ca43421c1dd628928d581 Author: Geert Uytterhoeven Date: Wed Dec 13 10:32:25 2023 +0100 arm64: dts: renesas: white-hawk-cpu: Fix missing serial console pin control The pin control description for the serial console was added, but not enabled, due to missing pinctrl properties in the serial port device node. Fixes: 7a8d590de8132853 ("arm64: dts: renesas: white-hawk-cpu: Add serial port pin control") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/8a51516581cd71ecbfa174af9c7cebad1fc83c5b.1702459865.git.geert+renesas@glider.be commit 932ff0c802c678bb6c7a98740eff930dad41fece Author: Claudiu Beznea Date: Thu Dec 7 09:07:00 2023 +0200 arm64: dts: renesas: rzg3s-smarc-som: Enable the Ethernet interfaces The RZ/G3S Smarc Module has Ethernet PHYs (KSZ9131) connected to each Ethernet IP. For this, add proper DT descriptions to enable Ethernet communication through these PHYs. The interface b/w PHYs and MACs is RGMII. The skew settings were set to zero as based on phy-mode (rgmii-id) the KSZ9131 driver enables internal DLL, which adds a 2ns delay b/w clocks (TX/RX) and data signals. Different pin settings were applied to TXC and TX_CTL compared with the rest of the RGMII pins to comply with requirements for these pins imposed by HW manual of RZ/G3S (see chapters "Ether Ch0 Voltage Mode Control Register (ETH0_POC)", "Ether Ch1 Voltage Mode Control Register (ETH1_POC)", for power source selection, "Ether MII/RGMII Mode Control Register (ETH_MODE)" for output-enable and "Input Enable Control Register (IEN_m)" for input-enable configurations). Also enable the Ethernet interfaces by selecting SW_CONFIG3 = SW_ON. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-12-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 447765986dbfc321e37b13d7c276b106a469ec0b Author: Claudiu Beznea Date: Thu Dec 7 09:06:59 2023 +0200 arm64: dts: renesas: rzg3s-smarc-som: Use switches' names to select on-board functionalities The intention of the SW_SD0_DEV_SEL and SW_SD2_EN macros was to reflect the state of the SW_CONFIG individual switches available on the RZ/G3S Smarc Module, and at the same time to have a descriptive name for the switches themselves. Each individual switch is associated with a signal name, which might be active-low or not on the board. Using signal names instead of SW_CONFIG switch names may be confusing for a user who just playes with switches to select individual functionalities, but also for an advanced user who looks at the schematics. To avoid even further confusion, use the switches' names here and instantiate them with an ON/OFF state. This should be simpler, even though the name of the switches is not that intuitive. The switches' names documentation reflects the switches' purposes. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-11-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit aefd220c5791ea3471fc920feba380aacd2dcfa7 Author: Claudiu Beznea Date: Thu Dec 7 09:06:58 2023 +0200 arm64: dts: renesas: r9a08g045: Add Ethernet nodes Add the Ethernet nodes available on RZ/G3S (R9A08G045). Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231207070700.4156557-10-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 80c2b40a51393add616a1fd186a1cc10bd676a3f Author: Benjamin Gaignard Date: Mon Dec 11 14:32:49 2023 +0100 media: videobuf2: core: Rename min_buffers_needed field in vb2_queue Rename min_buffers_needed into min_queued_buffers and update the documentation about it. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil [hverkuil: Drop the change where min_queued_buffers + 1 buffers would be] [hverkuil: allocated. Now this patch only renames this field instead of making] [hverkuil: a functional change as well.] [hverkuil: Renamed 3 remaining min_buffers_needed occurrences.] commit 837918aa3fdd6ecdc24c9dbfaa4e5ed8151acc60 Author: Claudiu Beznea Date: Mon Nov 20 13:18:20 2023 +0200 arm64: dts: renesas: r9a08g045: Add IA55 interrupt controller node Add IA55 interrupt controller node and set it as interrupt parent for pin controller. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231120111820.87398-10-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 31b2daea07643d8b83d62c670c76d95acca84f06 Author: Conor Dooley Date: Mon Dec 11 22:06:36 2023 +0000 soc: renesas: Make RZ/Five depend on !DMA_DIRECT_REMAP Randy reported yet another build issue with randconfigs on rv32: WARNING: unmet direct dependencies detected for DMA_GLOBAL_POOL Depends on [n]: !ARCH_HAS_DMA_SET_UNCACHED [=n] && !DMA_DIRECT_REMAP [=y] Selected by [y]: - ARCH_R9A07G043 [=y] && SOC_RENESAS [=y] && RISCV [=y] && NONPORTABLE [=y] && RISCV_ALTERNATIVE [=y] && !RISCV_ISA_ZICBOM [=n] && RISCV_SBI [=y] This happens when DMA_DIRECT_REMAP is selected by the T-Head CMO erratum option and DMA_GLOBAL_POOL is selected by the Andes CMO erratum. Block selecting the RZ/Five config option, and by extension DMA_GLOBAL_POOL, if DMA_DIRECT_REMAP has already been enabled. Reported-by: Randy Dunlap Closes: https://lore.kernel.org/all/24942b4d-d16a-463f-b39a-f9dfcb89d742@infradead.org/ Tested-by: Randy Dunlap # build-tested Signed-off-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231211-primate-arbitrate-fbcd307a0b00@spud Signed-off-by: Geert Uytterhoeven commit a6921e6f41e8237ac355aac242cca237251a07a1 Author: Geert Uytterhoeven Date: Mon Dec 4 14:32:03 2023 +0100 soc: renesas: Remove duplicate setup of soc_device_attribute.family As of commit 3f84aa5ec052dba9 ("base: soc: populate machine name in soc_device_register if empty") in v6.4, soc_device_register() fills in soc_device_attribute.family when it is still empty. Hence the identical code in renesas_soc_init() doing the same can be removed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/4c5e4d0d1819028466748ed684254fec41aae816.1701696627.git.geert+renesas@glider.be commit 40cfa414e7f99ea0aa3b578e382eed93540c3641 Author: Arnd Bergmann Date: Tue Dec 12 22:45:22 2023 +0100 leds: sun50i-a100: Avoid division-by-zero warning When CONFIG_COMMON_CLK is disabled, e.g. on an x86 randconfig compile test, clang reports a field overflow from propagating the result of a division by zero: drivers/leds/leds-sun50i-a100.c:309:12: error: call to '__compiletime_assert_265' declared with 'error' attribute: FIELD_PREP: value too large for the field control = FIELD_PREP(LEDC_T01_TIMING_CTRL_REG_T1H, timing->t1h_ns / cycle_ns) | Avoid the problem by adding an explicit check for the zero value here. Alternatively the assertion could be avoided with a Kconfig dependency on COMMON_CLK. Fixes: 090a25ad9798 ("leds: sun50i-a100: New driver for the A100 LED controller") Signed-off-by: Arnd Bergmann Reviewed-by: Guo Ren Link: https://lore.kernel.org/r/20231212214536.175327-1-arnd@kernel.org Signed-off-by: Lee Jones commit 03d790f04fb2507173913cad9c213272ac983a60 Author: Andy Shevchenko Date: Mon Dec 11 13:14:41 2023 +0200 mfd: intel-lpss: Fix the fractional clock divider flags The conversion to CLK_FRAC_DIVIDER_POWER_OF_TWO_PS uses wrong flags in the parameters and hence miscalculates the values in the clock divider. Fix this by applying the flag to the proper parameter. Fixes: 82f53f9ee577 ("clk: fractional-divider: Introduce POWER_OF_TWO_PS flag") Signed-off-by: Andy Shevchenko Reported-by: Alex Vinarskis Link: https://lore.kernel.org/r/20231211111441.3910083-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit eb15d707c252c3fb56e3ea57a185976c67e5a07f Author: Mark Rutland Date: Tue Dec 12 17:09:10 2023 +0000 arm64: Align boot cpucap handling with system cpucap handling Currently the detection+enablement of boot cpucaps is separate from the patching of boot cpucap alternatives, which means there's a period where cpus_have_cap($CAP) and alternative_has_cap($CAP) may be mismatched. It would be preferable to manage the boot cpucaps in the same way as the system cpucaps, both for clarity and to minimize the risk of accidental usage of code relying upon an alternative which has not yet been patched. This patch aligns the handling of boot cpucaps with the handling of system cpucaps: * The existing setup_boot_cpu_capabilities() function is moved to be closer to the setup_system_capabilities() and setup_system_features() functions so that they're more clearly related and more likely to be updated together in future. * The patching of boot cpucap alternatives is moved into setup_boot_cpu_capabilities(), immediately after boot cpucaps are detected and enabled. * A new setup_boot_cpu_features() function is added to mirror setup_system_features(); this handles initialization of cpucap data structures and calls setup_boot_cpu_capabilities(). This makes init_cpu_features() a closer mirror to update_cpu_features(), and makes smp_prepare_boot_cpu() a closer mirror to smp_cpus_done(). Importantly, while these changes alter the structure of the code, they retain the existing order of calls to: init_cpu_features(); // prefix initializing feature regs init_cpucap_indirect_list(); detect_system_supports_pseudo_nmi(); update_cpu_capabilities(SCOPE_BOOT_CPU | SCOPE_LOCAL_CPU); enable_cpu_capabilities(SCOPE_BOOT_CPU); apply_boot_alternatives(); ... and hence there should be no functional change as a result of this patch; this is purely a structural cleanup. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20231212170910.3745497-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 63a2d92e1461396cd83742cbaf20af240b7a94e9 Author: Mark Rutland Date: Tue Dec 12 17:09:09 2023 +0000 arm64: Cleanup system cpucap handling Recent changes to remove cpus_have_const_cap() introduced new users of cpus_have_cap() in the period between detecting system cpucaps and patching alternatives. It would be preferable to defer these until after the relevant cpucaps have been patched so that these can use the usual feature check helper functions, which is clearer and has less risk of accidental usage of code relying upon an alternative which has not yet been patched. This patch reworks the system-wide cpucap detection and patching to minimize this transient period: * The detection, enablement, and patching of system cpucaps is moved into a new setup_system_capabilities() function so that these can be grouped together more clearly, with no other functions called in the period between detection and patching. This is called from setup_system_features() before the subsequent checks that depend on the cpucaps. The logging of TTBR0 PAN and cpucaps with a mask is also moved here to keep these as close as possible to update_cpu_capabilities(). At the same time, comments are corrected and improved to make the intent clearer. * As hyp_mode_check() only tests system register values (not hwcaps) and must be called prior to patching, the call to hyp_mode_check() is moved before the call to setup_system_features(). * In setup_system_features(), the use of system_uses_ttbr0_pan() is restored, now that this occurs after alternatives are patched. This is a partial revert of commit: 53d62e995d9eaed1 ("arm64: Avoid cpus_have_const_cap() for ARM64_HAS_PAN") * In sve_setup() and sme_setup(), the use of system_supports_sve() and system_supports_sme() respectively are restored, now that these occur after alternatives are patched. This is a partial revert of commit: a76521d160284a1e ("arm64: Avoid cpus_have_const_cap() for ARM64_{SVE,SME,SME2,FA64}") Signed-off-by: Mark Rutland Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20231212170910.3745497-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 87fda1acfc3b9048261799817ef749e6deb95724 Author: Naman Trivedi Manojbhai Date: Thu Dec 7 16:24:08 2023 +0100 soc: xilinx: Add error message for invalid payload received from IPI callback. payload[0] of response buffer of zynqmp_pm_get_callback_data() contains valid payload or error code in case of error. Added error message to inform user about the error code received in payload[0]. Signed-off-by: Naman Trivedi Manojbhai Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/85749bde3e71148533d31ea2092f4514ec347768.1701962639.git.michal.simek@amd.com commit c82a1662d4548c454de5343b88f69b9fc82266b3 Author: Heiner Kallweit Date: Fri Dec 8 23:56:41 2023 +0100 leds: trigger: Remove unused function led_trigger_rename_static() This function was added with a8df7b1ab70b ("leds: add led_trigger_rename function") 11 yrs ago, but it has no users. So remove it. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/d90f30be-f661-4db7-b0b5-d09d07a78a68@gmail.com Signed-off-by: Lee Jones commit 1343121f08e6df62b14e6c0a8c193256ac225b0c Merge: 9b3febc3a3da7 4fff78dc2490f Author: Will Deacon Date: Wed Dec 13 15:53:02 2023 +0000 Merge branch 'for-joerg/arm-smmu/bindings' into for-joerg/arm-smmu/updates Updates to the Arm SMMU device-tree bindings. * for-joerg/arm-smmu/bindings: dt-bindings: arm-smmu: Document SM8[45]50 GPU SMMU dt-bindings: arm-smmu: Add compatible for X1E80100 SoC dt-bindings: iommu: arm,smmu: document the SM8650 System MMU dt-bindings: iommu: arm,smmu: document clocks for the SM8350 GPU SMMU commit 825906f2ebe83977d747d8bce61675dddd72485d Author: Kunwu Chan Date: Fri Dec 8 11:33:20 2023 +0800 mfd: tps6594: Add null pointer check to tps6594_device_init() devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: 325bec7157b3 ("mfd: tps6594: Add driver for TI TPS6594 PMIC") Suggested-by: Lee Jones Signed-off-by: Kunwu Chan Link: https://lore.kernel.org/r/20231208033320.49345-1-chentao@kylinos.cn Signed-off-by: Lee Jones commit a98b6987de7d44cb621294041364f70285b3d2c6 Author: Michal Simek Date: Thu Nov 30 10:19:15 2023 +0100 arm64: zynqmp: Add missing destination mailbox compatible The commit 81186dc16101 ("dt-bindings: zynqmp: add destination mailbox compatible") make compatible string for child nodes mandatory that's why add it. Signed-off-by: Michal Simek commit 0bfb7950cc1975372c4c58c3d3f9803f05245d46 Author: Michal Simek Date: Thu Nov 30 10:59:16 2023 +0100 arm64: zynqmp: Fix clock node name in kv260 cards node name shouldn't use '_' that's why convert it to '-'. Signed-off-by: Michal Simek commit 6a10a19a6bd2fd8d27a510678bf87bd9408f51d8 Author: Michal Simek Date: Thu Nov 30 10:59:15 2023 +0100 arm64: zynqmp: Move fixed clock to / for kv260 fixed clock nodes can't be on the bus because they are missing reg property. That's why move them to root. And because it is root it is good to have it as the first node in a file. Signed-off-by: Michal Simek commit fc622c97d3e290437bb48d2fcb0987dd73234b90 Author: Michal Simek Date: Thu Nov 23 08:02:28 2023 +0100 dt-bindings: soc: Add new board description for MicroBlaze V MicroBlaze V is new AMD/Xilinx soft-core 32bit RISC-V processor IP. It is hardware compatible with classic MicroBlaze processor. Processor can be used with standard AMD/Xilinx IPs including interrupt controller and timer. Acked-by: Krzysztof Kozlowski Signed-off-by: Michal Simek commit 6f3ecaea6324e77ad9d8f4a27345f59f47b5025f Author: Michal Simek Date: Thu Nov 23 08:02:27 2023 +0100 dt-bindings: soc: xilinx: Move xilinx.yaml from arm to soc All Xilinx boards can hosts also soft core CPUs like MicroBlaze or MicroBlaze V (RISC-V ISA) that's why move boards description from arm folder to soc folder. Similar change was done for Renesas by commit c27ce08b806d ("dt-bindings: soc: renesas: Move renesas.yaml from arm to soc"). Acked-by: Krzysztof Kozlowski Signed-off-by: Michal Simek commit eb2f7ff7de56a75159e960337711f501f3a42544 Author: Michal Simek Date: Mon Sep 18 14:41:17 2023 +0200 arm64: xilinx: Remove address/size-cells from gem nodes Some boards are using one mdio bus which holds multiple phys and also boards are using mdio node for bus description. That's why there are cases where address/size-cells are unnecessary which is also reported by make W=1 dtbs. That's why remove them from zynqmp.dtsi and let board DTSes to handle it based on used description. Error log: /axi/ethernet@ff0e0000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/7252203d52af3ca8867764c8514affc4828e530d.1695040866.git.michal.simek@amd.com commit aa2fda88527259121efd4d44bf4128d2089e811a Author: Michal Simek Date: Mon Sep 18 14:41:16 2023 +0200 arm64: xilinx: Remove address/size-cells from flash node Partitions are described via fixed-partitions that's why there is no need to have address/size-cells in flash node. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/c4447028f914e77b8c28640dc458b8409198ee30.1695040866.git.michal.simek@amd.com commit 2da2ac3c8d11bd57cf00d06985a3d9ca5969abae Author: Michal Simek Date: Mon Sep 18 14:41:15 2023 +0200 arm64: xilinx: Put ethernet phys to mdio node All zynqmp boards have been already described via mdio node that's why also convert zc1751. With using mdio node there is an option to add reset property for the whole mdio bus. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/dc228a27579b48f3e768fcb439d118b4a0f0ef5b.1695040866.git.michal.simek@amd.com commit fb1580d51c4e16dbc389149ce015ab650cd6456e Author: Michal Simek Date: Mon Sep 18 14:41:14 2023 +0200 arm64: xilinx: Remove mt25qu512a compatible string from SOM mt25qu512a is not documented in DT binding that's why remove it. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/a1e975f5785dfb6eb04e8d5905dcaa7467ccd585.1695040866.git.michal.simek@amd.com commit e0df41b82b1235c0a0f7bb8ec3f4341d9e69b72b Author: Michal Simek Date: Mon Sep 18 14:41:13 2023 +0200 arm64: xilinx: Use lower case for partition address Lower case should be used for register address. Issue is reported as: flash@0: partitions: Unevaluated properties are not allowed ('partition@22A0000' was unexpected) Reviewed-by: Laurent Pinchart Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/a96ac9a32a363b04958157548f290d480c21590c.1695040866.git.michal.simek@amd.com commit 995d4ef062ec7faee419fce9afc230d76b510c9e Author: Michal Simek Date: Mon Sep 18 14:41:12 2023 +0200 arm64: xilinx: Do not use '_' in DT node names Character '_' not recommended in node name. Use '-' instead. Pretty much run seds below for node names. s/zynqmp_ipi/zynqmp-ipi/ s/nvmem_firmware/nvmem-firmware/ s/soc_revision/soc-revision/ s/si5335_/si5335-/ Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/5137958580c85a35cf6aadd1c33a2f6bcf81a9e5.1695040866.git.michal.simek@amd.com commit 23b697ec85f3e7beed271b9f344c54821de2251e Author: Rob Herring Date: Mon Sep 11 16:47:47 2023 -0500 arm64: dts: xilinx: Apply overlays to base dtbs DT overlays in tree need to be applied to a base DTB to validate they apply, to run schema checks on them, and to catch any errors at compile time. Defining the "-dtbs" variable is not enough as the combined DT must be added to dtbs-y. zynqmp-sck-kr-g-revA.dtso and zynqmp-sck-kr-g-revB.dtso don't exist, so drop them. Signed-off-by: Rob Herring Fixes: 45fe0dc4ea2e ("arm64: xilinx: Use zynqmp prefix for SOM dt overlays") Link: https://lore.kernel.org/r/20230911214751.2202913-1-robh@kernel.org Signed-off-by: Michal Simek commit a3e28ea7771794c2938637f95a4d7a957f45465e Author: Laurent Pinchart Date: Wed Dec 13 17:00:10 2023 +0200 media: i2c: thp7312: Store frame interval in subdev state Use the newly added storage for frame interval in the subdev state to simplify the driver. Signed-off-by: Laurent Pinchart Acked-by: Hans Verkuil Signed-off-by: Hans Verkuil commit 95e802a2bfffee15200a773a3ab0242f78812577 Author: Laurent Pinchart Date: Wed Dec 13 17:00:09 2023 +0200 media: docs: uAPI: Fix documentation of 'which' field for routing ioctls The routing ioctls documentation incorrectly describes the 'which' field, due to a bad copy & paste. Fix it. Fixes: ea73eda50813 ("media: Documentation: Add GS_ROUTING documentation") Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit a5113ac8752e5ed0bbaa8f99b2a42d5273dd7fc5 Author: Laurent Pinchart Date: Wed Dec 13 17:00:08 2023 +0200 media: docs: uAPI: Expand error documentation for invalid 'which' value Multiple subdev ioctls that take a 'which' field do not document the error returned when the field has an invalid value. Expand the documentation to fix this. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 2b455a551f2e428d18086393f54ddf921193f208 Author: Laurent Pinchart Date: Wed Dec 13 17:00:07 2023 +0200 media: docs: uAPI: Clarify error documentation for invalid 'which' value Invalid values for the 'which' field of structures passed to multiple subdev ioctls result in an EINVAL error being returned. The documentation of the corresponding ioctls indicates this with sentences such as the following: the ``which`` field references a non-existing format This is confusing. Clarify the documentation. Suggested-by: Hans Verkuil Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 6b456240b301956227d8a9b86e13e7d0d4f9429e Author: Laurent Pinchart Date: Wed Dec 13 17:00:06 2023 +0200 media: v4l2-subdev: Store frame interval in subdev state Subdev states store all standard pad configuration data, except for frame intervals. Fix it by adding interval fields in the v4l2_subdev_pad_config and v4l2_subdev_stream_config structures, with corresponding accessor functions and a helper function to implement the .get_frame_interval() operation. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 805d4311a54a25d7347684fdf778c6239b190864 Author: Laurent Pinchart Date: Wed Dec 13 17:00:05 2023 +0200 media: v4l2-subdev: Add which field to struct v4l2_subdev_frame_interval Due to a historical mishap, the v4l2_subdev_frame_interval structure is the only part of the V4L2 subdev userspace API that doesn't contain a 'which' field. This prevents trying frame intervals using the subdev 'TRY' state mechanism. Adding a 'which' field is simple as the structure has 8 reserved fields. This would however break userspace as the field is currently set to 0, corresponding to V4L2_SUBDEV_FORMAT_TRY, while the corresponding ioctls currently operate on the 'ACTIVE' state. We thus need to add a new subdev client cap, V4L2_SUBDEV_CLIENT_CAP_INTERVAL_USES_WHICH, to indicate that userspace is aware of this new field. All drivers that implement the subdev .get_frame_interval() and .set_frame_interval() operations are updated to return -EINVAL when operating on the TRY state, preserving the current behaviour. While at it, fix a bad copy&paste in the documentation of the struct v4l2_subdev_frame_interval_enum 'which' field. Signed-off-by: Laurent Pinchart Reviewed-by: Philipp Zabel # for imx-media Reviewed-by: Hans Verkuil Reviewed-by: Luca Ceresoli # for tegra-video Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Hans Verkuil commit 287fe160834acdf9c44e5b73676180c6dbdedf76 Author: Laurent Pinchart Date: Wed Dec 13 17:00:04 2023 +0200 media: v4l2-subdev: Turn .[gs]_frame_interval into pad operations The subdev .[gs]_frame_interval are video operations, but they operate on pads (and even on streams). Not only is this confusing, it causes practical issues for drivers as the operations don't receive a subdev state pointer, requiring manual state handling. To improve the situation, turn the operations into pad operations, and extend them to receive a state pointer like other pad operations. While at it, rename the operations to .[gs]et_frame_interval at the same time to match the naming scheme of other pad operations. This isn't strictly necessary, but given that all drivers using those operations need to be modified, handling the rename separately would generate more churn for very little gain (if at all). Signed-off-by: Laurent Pinchart Reviewed-by: Hans Verkuil Reviewed-by: Philipp Zabel # for imx-media Reviewed-by: Luca Ceresoli # for tegra-video Signed-off-by: Hans Verkuil commit 08e5c36410ca5cb14237e47e6dfe3fde02e0f275 Author: Tomi Valkeinen Date: Wed Dec 13 17:00:03 2023 +0200 media: v4l: subdev: Move out subdev state lock macros outside CONFIG_MEDIA_CONTROLLER The subdev state locking macros and macros to get the active state are currently behind CONFIG_MEDIA_CONTROLLER. This makes sense, as there can be no subdev state without MC. However, we have code paths common to MC and non-MC cases which call subdev operations that have subdev state as a parameter. In the non-MC case the state parameter would always be NULL. Thus it makes sense to allow, e.g.: v4l2_subdev_call_state_active(sd, pad, get_fmt, fmt) which for non-MC case would call the subdev passing NULL as the state. This currently fails: https://lore.kernel.org/oe-kbuild-all/202312061101.PLrz5NnJ-lkp@intel.com/ Fix the issue by moving the related macros to be outside CONFIG_MEDIA_CONTROLLER. The v4l2_subdev_lock_state() and v4l2_subdev_unlock_state() macros will crash if given NULL as the state, but the other macros behave correctly even when there's no active state, and they will only call the lock/unlock macros if there is a state. An alternative fix would be to make another version of v4l2_subdev_call_state_try() with ifdefs, which would not use any state macros and would always pass NULL as the state. But having two version of a macro/function is always more confusing than having just one, so I went this way. So, this fixes the v4l2_subdev_call_state_active() macro. But we also have v4l2_subdev_call_state_try(). It would be possible to fix that macro by additionally creating "no-op" variants of the state alloc and free functions. However, v4l2_subdev_call_state_try() is only used by a single driver (stm32-dcmi), which selects MC, and the macro is supposed to be removed as soon as the users have been converted away from the macro. Thus I have not touched the state alloc/free functions, and I think it makes sense to keep alloc/free functions available only if there's actually something that can be allocated or freed. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart Reviewed-by: Hans Verkuil Link: https://lore.kernel.org/r/20231208-v4l2-state-mc-fix-v1-1-a0c8162557c6@ideasonboard.com Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 9e314ded2832908ef270468a5d8337c83f25f550 Author: Uwe Kleine-König Date: Wed Dec 6 12:43:19 2023 +0100 leds: qcom-lpg: Introduce a wrapper for getting driver data from a pwm chip Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/4785982785812615d15c7dd6d2755270bd8670b2.1701860672.git.u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 56b10953da7e9e92eb1a72860db656ac6a5699a1 Author: Emil Renner Berthing Date: Thu Nov 30 16:19:32 2023 +0100 riscv: dts: starfive: Enable SDIO wifi on JH7100 boards Add pinctrl and MMC controller nodes for the Broadcom wifi controller on the BeagleV Starlight and StarFive VisionFive V1 boards. Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit c548409cfe03d2ed73a7ea25499ae8f3a8e69551 Author: Emil Renner Berthing Date: Thu Nov 30 16:19:31 2023 +0100 riscv: dts: starfive: Enable SD-card on JH7100 boards Add pinctrl and MMC device tree nodes for the SD-card on the BeagleV Starlight and StarFive VisionFive V1 boards. Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit a29bb6564e1229da3c84c9123286ae19530c2190 Author: Emil Renner Berthing Date: Thu Nov 30 16:19:30 2023 +0100 riscv: dts: starfive: Add JH7100 MMC nodes Add device tree nodes for the Synopsis MMC controllers on the StarFive JH7100 SoC. Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 0a99b562e81554c4397ba6331e9b00501c88b15c Author: Emil Renner Berthing Date: Thu Nov 30 16:19:29 2023 +0100 riscv: dts: starfive: Add pool for coherent DMA memory on JH7100 boards The StarFive JH7100 SoC has non-coherent device DMAs, but most drivers expect to be able to allocate coherent memory for DMA descriptors and such. However on the JH7100 DDR memory appears twice in the physical memory map, once cached and once uncached: 0x00_8000_0000 - 0x08_7fff_ffff : Off chip DDR memory, cached 0x10_0000_0000 - 0x17_ffff_ffff : Off chip DDR memory, uncached To use this uncached region we create a global DMA memory pool there and reserve the corresponding area in the cached region. However the uncached region is fully above the 32bit address limit, so add a dma-ranges map so the DMA address used for peripherals is still in the regular cached region below the limit. Link: https://github.com/starfive-tech/JH7100_Docs/blob/main/JH7100%20Data%20Sheet%20V01.01.04-EN%20(4-21-2021).pdf Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit d4b95c445cab0fb583eed7caafbc1b734f6a3a59 Author: Emil Renner Berthing Date: Thu Nov 30 16:19:28 2023 +0100 riscv: dts: starfive: Add JH7100 cache controller The StarFive JH7100 SoC also features the SiFive L2 cache controller, so add the device tree nodes for it. Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit ba0074972ee9b3231b3de44650583654422e9758 Author: Emil Renner Berthing Date: Thu Nov 30 16:19:27 2023 +0100 riscv: dts: starfive: Mark the JH7100 as having non-coherent DMAs The StarFive JH7100 SoC has non-coherent device DMAs, so mark the soc bus as such. Link: https://github.com/starfive-tech/JH7100_Docs/blob/main/JH7100%20Cache%20Coherence%20V1.0.pdf Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit dd3c1b365fe92eefeae8bb0ac08e29b7ccdc3ca7 Author: Geert Uytterhoeven Date: Thu Nov 30 16:19:26 2023 +0100 riscv: dts: starfive: Group tuples in interrupt properties To improve human readability and enable automatic validation, the tuples in the various properties containing interrupt specifiers should be grouped. Fix this by grouping the tuples of "interrupts-extended" properties using angle brackets. Signed-off-by: Geert Uytterhoeven Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit e7431bd7899c955e126c742fe608512f7e2e111a Author: Stefan Wahren Date: Sat Dec 2 19:36:36 2023 +0100 leds: gpio: Add kernel log if devm_fwnode_gpiod_get() fails In case leds-gpio fails to get at least one of possibly many GPIOs from the DT (e.g. the GPIO is already requested) neither gpiolib nor the driver does provide any helpful error log: leds-gpio: probe of leds failed with error -16 As the driver knows better how to handle errors with such mandatory GPIOs, let's implement an error log which points to the affected GPIO. Signed-off-by: Stefan Wahren Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231202183636.7055-1-wahrenst@gmx.net Signed-off-by: Lee Jones commit 7d84a63a39b78443d09f2b4edf7ecb1d586379b4 Author: Andy Shevchenko Date: Thu Dec 7 18:14:32 2023 +0200 backlight: hx8357: Convert to agnostic GPIO API The of_gpio.h is going to be removed. In preparation of that convert the driver to the agnostic API. Fixes: fbbbcd177a27 ("gpiolib: of: add quirk for locating reset lines with legacy bindings") Signed-off-by: Andy Shevchenko Reviewed-by: Daniel Thompson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231207161513.3195509-2-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 64fc984a8a54163a5c44e15a54b574a2c5564d8f Author: Emil Renner Berthing Date: Thu Nov 30 16:19:25 2023 +0100 riscv: errata: Add StarFive JH7100 errata This not really an errata, but since the JH7100 was made before the standard Zicbom extension it needs the DMA_GLOBAL_POOL and RISCV_NONSTANDARD_CACHE_OPS enabled to work correctly. Acked-by: Conor Dooley Signed-off-by: Emil Renner Berthing Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Signed-off-by: Conor Dooley commit f56bb3de66bc7db90cd6df0a9866167e8a79317e Author: Shuai Xue Date: Fri Dec 8 10:56:52 2023 +0800 MAINTAINERS: add maintainers for DesignWare PCIe PMU driver Add maintainers for Synopsys DesignWare PCIe PMU driver and driver document. Signed-off-by: Shuai Xue Link: https://lore.kernel.org/r/20231208025652.87192-6-xueshuai@linux.alibaba.com Signed-off-by: Will Deacon commit af9597adc2f1e3609c67c9792a2469bb64e43ae9 Author: Shuai Xue Date: Fri Dec 8 10:56:51 2023 +0800 drivers/perf: add DesignWare PCIe PMU driver This commit adds the PCIe Performance Monitoring Unit (PMU) driver support for T-Head Yitian SoC chip. Yitian is based on the Synopsys PCI Express Core controller IP which provides statistics feature. The PMU is a PCIe configuration space register block provided by each PCIe Root Port in a Vendor-Specific Extended Capability named RAS D.E.S (Debug, Error injection, and Statistics). To facilitate collection of statistics the controller provides the following two features for each Root Port: - one 64-bit counter for Time Based Analysis (RX/TX data throughput and time spent in each low-power LTSSM state) and - one 32-bit counter for Event Counting (error and non-error events for a specified lane) Note: There is no interrupt for counter overflow. This driver adds PMU devices for each PCIe Root Port. And the PMU device is named based the BDF of Root Port. For example, 30:03.0 PCI bridge: Device 1ded:8000 (rev 01) the PMU device name for this Root Port is dwc_rootport_3018. Example usage of counting PCIe RX TLP data payload (Units of bytes):: $# perf stat -a -e dwc_rootport_3018/Rx_PCIe_TLP_Data_Payload/ average RX bandwidth can be calculated like this: PCIe TX Bandwidth = Rx_PCIe_TLP_Data_Payload / Measure_Time_Window Signed-off-by: Shuai Xue Reviewed-by: Baolin Wang Reviewed-by: Jonathan Cameron Reviewed-by: Yicong Yang Reviewed-and-tested-by: Ilkka Koskinen Link: https://lore.kernel.org/r/20231208025652.87192-5-xueshuai@linux.alibaba.com [will: Fix sparse error due to use of uninitialised 'vsec' symbol in dwc_pcie_match_des_cap()] Signed-off-by: Will Deacon commit 6f64f866aa1ae6975c95d805ed51d7e9433a0016 Author: Min Li Date: Thu Jun 29 14:25:17 2023 +0000 block: add check that partition length needs to be aligned with block size Before calling add partition or resize partition, there is no check on whether the length is aligned with the logical block size. If the logical block size of the disk is larger than 512 bytes, then the partition size maybe not the multiple of the logical block size, and when the last sector is read, bio_truncate() will adjust the bio size, resulting in an IO error if the size of the read command is smaller than the logical block size.If integrity data is supported, this will also result in a null pointer dereference when calling bio_integrity_free. Cc: Signed-off-by: Min Li Reviewed-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20230629142517.121241-1-min15.li@samsung.com Signed-off-by: Jens Axboe commit ec2cbaf604f4a5f4bc5484ae86016ebe91236fdc Author: Alex Bee Date: Fri Dec 8 18:08:56 2023 +0100 drm/imagination: vm: Fix heap lookup condition When conditionally checking for heap existence of a certian address in pvr_vm_bind_op_map_init the condition whether the map request comes from a user is incorrect: The context must not be the kernel-context to be a user(space) context and should be looked up in pvr_heaps. That makes addresses coming from userspace not being verfied against the defined ranges and prevents firmware loading for meta cores. Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Alex Bee Reviewed-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231208170856.1748413-1-knaerzche@gmail.com commit 1e9974c7583456ca0bb9ccbf028c86154560f819 Author: Maxime Ripard Date: Thu Dec 7 16:49:41 2023 +0100 drm/vc4: hdmi: Create destroy state implementation Even though we were rolling our own custom state for the vc4 HDMI controller driver, we were still using the generic helper to destroy that state. It was mostly working since the underlying state is the first member of our state so the pointers are probably equal in all relevant cases, but it's still fragile so let's fix this properly. Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231207-kms-hdmi-connector-state-v5-18-6538e19d634d@kernel.org commit 1faed97a0a51a098ec5633d65455318f9e4ffc15 Author: Dario Binacchi Date: Wed Dec 13 12:24:01 2023 +0100 drm/panel: ilitek-ili9805: adjust the includes Adjust the includes to explicitly include the correct headers. Suggested-by: Rob Herring Signed-off-by: Dario Binacchi Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231213112401.2000837-1-dario.binacchi@amarulasolutions.com commit 7d66c8d7398d34b0aca788d21ad63f07ab1a3dbe Author: Dario Binacchi Date: Wed Dec 13 12:24:32 2023 +0100 drm/panel: synaptics-r63353: adjust the includes Adjust the includes to explicitly include the correct headers. Suggested-by: Rob Herring Signed-off-by: Dario Binacchi Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231213112432.2002832-1-dario.binacchi@amarulasolutions.com commit 9567dab3a8cb4dfc4b0382c2678ad01bff13a3bf Author: Randy Dunlap Date: Tue Dec 12 20:41:07 2023 -0800 drm/uapi: drm_mode.h: fix spellos and grammar Correct spellos reported by codespell. Fix some grammar (as 's' to a few words). Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Reviewed-by: Jani Nikula Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231213044107.29214-1-rdunlap@infradead.org commit 37c476d68d29051f333944bd784d1054b495c5a8 Author: Randy Dunlap Date: Tue Dec 12 20:32:26 2023 -0800 drm/drm_modeset_helper_vtables.h: fix typos/spellos Fix spelling problems as identified by codespell. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Reviewed-by: Jani Nikula Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231213043226.10046-1-rdunlap@infradead.org commit c4c5391adae2c5a328232bb4fecd9510310b2fdf Author: Randy Dunlap Date: Tue Dec 12 20:39:25 2023 -0800 drm/fourcc: fix spelling/typos Correct spelling mistakes that were identified by codespell. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Reviewed-by: Jani Nikula Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231213043925.13852-1-rdunlap@infradead.org commit 5fa3d1a00c2d4ba14f1300371ad39d5456e890d7 Author: Li Nan Date: Mon Dec 11 15:53:56 2023 +0800 block: Set memalloc_noio to false on device_add_disk() error path On the error path of device_add_disk(), device's memalloc_noio flag was set but not cleared. As the comment of pm_runtime_set_memalloc_noio(), "The function should be called between device_add() and device_del()". Clear this flag before device_del() now. Fixes: 25e823c8c37d ("block/genhd.c: apply pm_runtime_set_memalloc_noio on block devices") Signed-off-by: Li Nan Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231211075356.1839282-1-linan666@huaweicloud.com Signed-off-by: Jens Axboe commit 9e4bf6a08d1e127bcc4bd72557f2dfafc6bc7f41 Author: Kees Cook Date: Tue Dec 12 13:47:42 2023 -0800 block/rnbd-srv: Check for unlikely string overflow Since "dev_search_path" can technically be as large as PATH_MAX, there was a risk of truncation when copying it and a second string into "full_path" since it was also PATH_MAX sized. The W=1 builds were reporting this warning: drivers/block/rnbd/rnbd-srv.c: In function 'process_msg_open.isra': drivers/block/rnbd/rnbd-srv.c:616:51: warning: '%s' directive output may be truncated writing up to 254 bytes into a region of size between 0 and 4095 [-Wformat-truncation=] 616 | snprintf(full_path, PATH_MAX, "%s/%s", | ^~ In function 'rnbd_srv_get_full_path', inlined from 'process_msg_open.isra' at drivers/block/rnbd/rnbd-srv.c:721:14: drivers/block/rnbd/rnbd-srv.c:616:17: note: 'snprintf' output between 2 and 4351 bytes into a destination of size 4096 616 | snprintf(full_path, PATH_MAX, "%s/%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 617 | dev_search_path, dev_name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~ To fix this, unconditionally check for truncation (as was already done for the case where "%SESSNAME%" was present). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312100355.lHoJPgKy-lkp@intel.com/ Cc: Md. Haris Iqbal Cc: Jack Wang Cc: Jens Axboe Cc: Signed-off-by: Kees Cook Acked-by: Guoqing Jiang Acked-by: Jack Wang Link: https://lore.kernel.org/r/20231212214738.work.169-kees@kernel.org Signed-off-by: Jens Axboe commit a5683d26e09e46362fb3fa87e834cf7073b6a2ec Author: Sarah Walker Date: Tue Dec 5 11:39:33 2023 +0000 arm64: dts: ti: k3-am62-main: Add GPU device node Add the Series AXE GPU node to the AM62 device tree. Tested-by: Alexander Sverdlin Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Acked-by: Darren Etheridge Link: https://lore.kernel.org/r/7088cc032374ae517191b1dadf5bb5f0440eac81.1701773390.git.donald.robson@imgtec.com Signed-off-by: Nishanth Menon commit e8779517788fa0f3d04840cb7d4121d3df8dfd54 Author: Donald Robson Date: Tue Dec 5 11:39:32 2023 +0000 arm64: defconfig: Enable DRM_POWERVR Enable the PowerVR DRM driver, as it's used for the GPU in platforms using the TI AM62x SoCs, such as the TI SK-AM62 and BeaglePlay (2023). Signed-off-by: Donald Robson Acked-by: Darren Etheridge Link: https://lore.kernel.org/r/2f6af3ebfe9e36c80c03de2dcc2e940dd5dc2c4b.1701773390.git.donald.robson@imgtec.com Signed-off-by: Nishanth Menon commit 85bfa5d497b41dbd02f247dfda04076b935728c1 Author: Konrad Dybcio Date: Wed Nov 29 15:44:00 2023 +0100 dt-bindings: interconnect: qcom,msm8998-bwmon: Add QCM2290 bwmon instance QCM2290 has a single BWMONv4 intance for CPU. Document it. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-3-4cbb567743bb@linaro.org Signed-off-by: Georgi Djakov commit 6c3ab21f37a97a868193ccbeb8a492e51210ff31 Author: Andy Yan Date: Mon Dec 11 20:00:23 2023 +0800 MAINTAINERS: Add myself as a reviewer for rockchip drm As I am familiar with all the details of vop2 display architecture, I can help review and test all related changes in this subsystem, so add my email here to make sure I get CC'd on rockchip drm changes. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211120023.1785687-1-andyshrk@163.com commit 9d7fe7704d534c2d043aff2987f10671a8b4373d Author: Andy Yan Date: Mon Dec 11 19:59:31 2023 +0800 drm/rockchip: vop2: rename VOP_FEATURE_OUTPUT_10BIT to VOP2_VP_FEATURE_OUTPUT_10BIT VOP2 has multiple independent video ports with different feature, so rename VOP_FEATURE_OUTPUT_10BIT to VOP2_VP_FEATURE_OUTPUT_10BIT for more clearly meaning. Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115931.1785495-1-andyshrk@163.com commit 5a028e8f062fc862f051f8e62a0d5a1abac91955 Author: Andy Yan Date: Mon Dec 11 19:59:19 2023 +0800 drm/rockchip: vop2: Add support for rk3588 VOP2 on rk3588: Four video ports: VP0 Max 4096x2160 VP1 Max 4096x2160 VP2 Max 4096x2160 VP3 Max 2048x1080 4 4K Cluster windows with AFBC/line RGB and AFBC-only YUV support 4 4K Esmart windows with line RGB/YUV support Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115919.1785435-1-andyshrk@163.com commit dc7226acacc6502291446f9e33cf96246ec49a30 Author: Andy Yan Date: Mon Dec 11 19:59:07 2023 +0800 dt-bindings: rockchip,vop2: Add more endpoint definition There are 2 HDMI, 2 DP, 2 eDP on rk3588, so add corresponding endpoint definition for it. Signed-off-by: Andy Yan Acked-by: Krzysztof Kozlowski Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115907.1785377-1-andyshrk@163.com commit 4ccdc92c1fea732fac8f3438d6288719055fa141 Author: Andy Yan Date: Mon Dec 11 19:58:50 2023 +0800 dt-bindings: display: vop2: Add rk3588 support The vop2 on rk3588 is similar to which on rk356x but with 4 video ports and need to reference more grf modules. Signed-off-by: Andy Yan Reviewed-by: Krzysztof Kozlowski Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115850.1785311-1-andyshrk@163.com commit 80c5227af3ba3a93b33e6e78c65d38a6f191ca91 Author: Konrad Dybcio Date: Mon Dec 11 10:23:58 2023 +0100 dt-bindings: interconnect: qcom,msm8998-bwmon: Add SM6115 bwmon instance SM6115 has a single BWMONv4 intance for CPU. Document it. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231209-topic-6115iccdt-v1-1-f62da62b7276@linaro.org Signed-off-by: Georgi Djakov commit c408af1afc4b74ea6df69e0313be97f1f83e981a Author: Andy Yan Date: Mon Dec 11 19:58:26 2023 +0800 drm/rockchip: vop2: rename grf to sys_grf The vop2 need to reference more grf(system grf, vop grf, vo0/1 grf,etc) in the upcoming rk3588. So we rename the current system grf to sys_grf. Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115826.1785190-1-andyshrk@163.com commit 075a5b3969becb1ebc2f1d4fa1a1fe9163679273 Author: Andy Yan Date: Mon Dec 11 19:58:15 2023 +0800 drm/rockchip: vop2: set bg dly and prescan dly at vop2_post_config We need to setup background delay cycle and prescan delay cycle when a mode is enable to avoid trigger POST_BUF_EMPTY irq on rk3588. Note: RK356x has no such requirement. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115815.1785131-1-andyshrk@163.com commit dd49ee4614cfb0b1f627c4353b60cecfe998a374 Author: Andy Yan Date: Mon Dec 11 19:58:05 2023 +0800 drm/rockchip: vop2: Set YUV/RGB overlay mode Set overlay mode register according to the output mode is yuv or rgb. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115805.1785073-1-andyshrk@163.com commit d1f8face0fc1298c88ef4a0479c3027b46ca2c77 Author: Andy Yan Date: Mon Dec 11 19:57:52 2023 +0800 drm/rockchip: vop2: Add write mask for VP config done The write mask bit is used to make sure when writing config done bit for one VP will not overwrite the other. Unfortunately, the write mask bit is missing on rk3566/8, that means when we write to these bits, it will not take any effect. We need this to make the vop work properly after rk3566/8 variants. Signed-off-by: Andy Yan Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115752.1785013-1-andyshrk@163.com commit 20529a68307feed00dd3d431d3fff0572616b0f2 Author: Andy Yan Date: Mon Dec 11 19:57:41 2023 +0800 drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode The enable bit and transform offset of cluster windows should be cleared when it work at linear mode, or we may have a iommu fault issue on rk3588 which cluster windows switch between afbc and linear mode. As the cluster windows of rk3568 only supports afbc format so is therefore not affected. Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115741.1784954-1-andyshrk@163.com commit bebad6bd4fbdc448ad3b337ad281b813e68f6f53 Author: Andy Yan Date: Mon Dec 11 19:57:30 2023 +0800 drm/rockchip: vop2: set half_block_en bit in all mode At first we thought the half_block_en bit in AFBCD_CTRL register only work in afbc mode. But the fact is that it control the line buffer in all mode(afbc/tile/linear), so we need configure it in all case. As the cluster windows of rk3568 only supports afbc format so is therefore not affected. Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115730.1784893-1-andyshrk@163.com commit 81a06f1d02e588cfa14c5e5953d9dc50b1d404be Author: Andy Yan Date: Mon Dec 11 19:57:19 2023 +0800 Revert "drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume" This reverts commit b63a553e8f5aa6574eeb535a551817a93c426d8c. regcache_sync will try to reload the configuration in regcache to hardware, but the registers of 4 Cluster windows and Esmart1/2/3 on the upcoming rk3588 can not be set successfully before internal PD power on. Also it's better to keep the hardware register as it is before we really enable it. So let's revert this version, and keep the first version: commit afa965a45e01 ("drm/rockchip: vop2: fix suspend/resume") Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115719.1784834-1-andyshrk@163.com commit 8c8546546f256f834e9c7cab48e5946df340d1a8 Author: Andy Yan Date: Mon Dec 11 19:56:27 2023 +0800 drm/rockchip: move output interface related definition to rockchip_drm_drv.h The output interface related definition can shared between vop and vop2, move them to rockchip_drm_drv.h can avoid duplicated definition. Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231211115627.1784735-1-andyshrk@163.com commit a41d9b3287b1d2d737984465e6efbf09a4fb51d2 Author: Aakarsh Jain Date: Wed Dec 6 12:00:45 2023 +0530 arm64: dts: fsd: Add MFC related DT enteries Add MFC DT node and reserve memory node for MFC usage. Cc: Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Link: https://lore.kernel.org/r/20231206063045.97234-12-aakarsh.jain@samsung.com Signed-off-by: Krzysztof Kozlowski commit 2c2235292b33d788a1436f1d2a6108184a657f51 Author: Vaishnav Achath Date: Mon Dec 11 18:56:00 2023 +0530 soc: ti: k3-socinfo: Add JTAG ID for J722S Add JTAG ID info for the J722S SoC family to enable SoC detection. More details about this SoC can be found in the TRM: https://www.ti.com/lit/zip/sprujb3 Signed-off-by: Vaishnav Achath Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20231211132600.25289-1-vaishnav.a@ti.com Signed-off-by: Nishanth Menon commit 729cfcf8ac2447f175eb4b6a0604983618ba07d5 Author: Siddharth Vadapalli Date: Mon Dec 11 17:25:35 2023 +0530 arm64: dts: ti: k3-j721s2-evm: Add overlay for PCIE1 Endpoint Mode Add overlay to enable the PCIE1 instance of PCIe on J721S2-EVM in Endpoint mode of operation. Signed-off-by: Siddharth Vadapalli Reviewed-by: Ravi Gunasekaran Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20231211115535.1264353-3-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 3942697901eb5340dc51202352f035ae191c37f2 Author: Siddharth Vadapalli Date: Mon Dec 11 17:25:34 2023 +0530 arm64: dts: ti: k3-j721e-evm: Add overlay for PCIE0 Endpoint Mode Add overlay to enable the PCIE0 instance of PCIe on J721E-EVM in Endpoint mode of operation. Signed-off-by: Siddharth Vadapalli Reviewed-by: Ravi Gunasekaran Reviewed-by: Andrew Davis Link: https://lore.kernel.org/r/20231211115535.1264353-2-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit b808cef0be467318d862f87b64d7eddde6906ba3 Author: Neha Malcom Francis Date: Fri Dec 8 17:19:18 2023 +0530 arm64: dts: ti: k3-j721e-sk: Add TPS6594 family PMICs This patch adds support for TPS6594 PMIC family on wakeup I2C0 bus. These devices provide regulators (bucks and LDOs), but also GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor) which monitors the SoC error output signal, and a PFSM (Pre-configurable Finite State Machine) which manages the operational modes of the PMIC. Signed-off-by: Neha Malcom Francis Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20231208114919.3429562-7-n-francis@ti.com Signed-off-by: Nishanth Menon commit 865a1593bf99e1b3d4ffa6182919429694b17a36 Author: Neha Malcom Francis Date: Fri Dec 8 17:19:17 2023 +0530 arm64: dts: ti: k3-am69-sk: Add support for TPS6594 PMIC This patch adds support for TPS6594 PMIC on wkup I2C0 bus. This device provides regulators (bucks and LDOs), but also GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor) which monitors the SoC error output signal, and a PFSM (Pre-configurable Finite State Machine) which manages the operational modes of the PMIC. Signed-off-by: Neha Malcom Francis Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20231208114919.3429562-6-n-francis@ti.com Signed-off-by: Nishanth Menon commit 3044f0184089e910f4da923bf64dca60ff47a117 Author: Jerome Neanne Date: Fri Dec 8 17:19:16 2023 +0530 arm64: dts: ti: k3-j784s4-evm: Add support for TPS6594 PMIC This patch adds support for TPS6593 PMIC on wkup I2C0 bus. This device provides regulators (bucks and LDOs), but also GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor) which monitors the SoC error output signal, and a PFSM (Pre-configurable Finite State Machine) which manages the operational modes of the PMIC. Signed-off-by: Jerome Neanne Signed-off-by: Esteban Blanc Signed-off-by: Jai Luthra Signed-off-by: Neha Malcom Francis Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20231208114919.3429562-5-n-francis@ti.com Signed-off-by: Nishanth Menon commit 46774eddde0ce499621cc8887106bcb449856e1f Author: Jerome Neanne Date: Fri Dec 8 17:19:15 2023 +0530 arm64: dts: ti: k3-j721e-som-p0: Add TP6594 family PMICs This patch adds support for TPS6594 PMIC family on wakup I2C0 bus. Theses devices provides regulators (bucks and LDOs), but also GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor) which monitors the SoC error output signal, and a PFSM (Pre-configurable Finite State Machine) which manages the operational modes of the PMIC. Signed-off-by: Jerome Neanne Signed-off-by: Esteban Blanc Signed-off-by: Jai Luthra Signed-off-by: Neha Malcom Francis Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20231208114919.3429562-4-n-francis@ti.com Signed-off-by: Nishanth Menon commit f4eb94b898f5b708d024a70fd544cdd76537bcf9 Author: Esteban Blanc Date: Fri Dec 8 17:19:14 2023 +0530 arm64: dts: ti: k3-j721s2-som-p0: Add TP6594 family PMICs This patch adds support for TPS6594 PMIC family on wakup I2C0 bus. Theses devices provides regulators (bucks and LDOs), but also GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor) which monitors the SoC error output signal, and a PFSM (Pre-configurable Finite State Machine) which manages the operational modes of the PMIC. Signed-off-by: Esteban Blanc Signed-off-by: Jai Luthra Signed-off-by: Neha Malcom Francis Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20231208114919.3429562-3-n-francis@ti.com Signed-off-by: Nishanth Menon commit 08aaf5f02e9d593cf6b2dc7da9c568e19199e00e Author: Esteban Blanc Date: Fri Dec 8 17:19:13 2023 +0530 arm64: dts: ti: k3-j7200-som-p0: Add TP6594 family PMICs This patch adds support for TPS6594 PMIC family on wakup I2C0 bus. Theses devices provides regulators (bucks and LDOs), but also GPIOs, a RTC, a watchdog, an ESM (Error Signal Monitor) which monitors the SoC error output signal, and a PFSM (Pre-configurable Finite State Machine) which manages the operational modes of the PMIC. Signed-off-by: Esteban Blanc Signed-off-by: Jai Luthra Signed-off-by: Neha Malcom Francis Reviewed-by: Reid Tonking Reviewed-by: Udit Kumar Link: https://lore.kernel.org/r/20231208114919.3429562-2-n-francis@ti.com Signed-off-by: Nishanth Menon commit e1fca6957f1966cb6e75cdc354f4bcaed230a454 Author: Nandhini Srikandan Date: Wed Dec 13 14:08:36 2023 +0800 spi: dw: Remove Intel Thunder Bay SOC support Remove Intel Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: Nandhini Srikandan Acked-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231213060836.29203-3-nandhini.srikandan@intel.com Signed-off-by: Mark Brown commit 36f7050b29f3d736b5faf1059bd43baec04db9fb Author: Nandhini Srikandan Date: Wed Dec 13 14:08:35 2023 +0800 spi: dw: Remove Intel Thunder Bay SOC support Remove Intel Thunder Bay specific code as the product got cancelled and there are no end customers or users. Signed-off-by: Nandhini Srikandan Reviewed-by: Andy Shevchenko Link: https://msgid.link/r/20231213060836.29203-2-nandhini.srikandan@intel.com Signed-off-by: Mark Brown commit ac16087134b837d42b75bb1c741070b6c142f258 Author: Shuai Xue Date: Fri Dec 8 10:56:50 2023 +0800 PCI: Move pci_clear_and_set_dword() helper to PCI header The clear and set pattern is commonly used for accessing PCI config, move the helper pci_clear_and_set_dword() from aspm.c into PCI header. In addition, rename to pci_clear_and_set_config_dword() to retain the "config" information and match the other accessors. No functional change intended. Signed-off-by: Shuai Xue Acked-by: Bjorn Helgaas Tested-by: Ilkka Koskinen Link: https://lore.kernel.org/r/20231208025652.87192-4-xueshuai@linux.alibaba.com Signed-off-by: Will Deacon commit ad6534c626fedd818718d76c36d69c7d8e7b61cc Author: Shuai Xue Date: Fri Dec 8 10:56:49 2023 +0800 PCI: Add Alibaba Vendor ID to linux/pci_ids.h The Alibaba Vendor ID (0x1ded) is now used by Alibaba elasticRDMA ("erdma") and will be shared with the upcoming PCIe PMU ("dwc_pcie_pmu"). Move the Vendor ID to linux/pci_ids.h so that it can shared by several drivers later. Signed-off-by: Shuai Xue Acked-by: Bjorn Helgaas # pci_ids.h Tested-by: Ilkka Koskinen Link: https://lore.kernel.org/r/20231208025652.87192-3-xueshuai@linux.alibaba.com Signed-off-by: Will Deacon commit cae40614cdd61a6601dc87c6e07c06bf642a125b Author: Shuai Xue Date: Fri Dec 8 10:56:48 2023 +0800 docs: perf: Add description for Synopsys DesignWare PCIe PMU driver Alibaba's T-Head Yitan 710 SoC includes Synopsys' DesignWare Core PCIe controller which implements PMU for performance and functional debugging to facilitate system maintenance. Document it to provide guidance on how to use it. Signed-off-by: Shuai Xue Reviewed-by: Baolin Wang Reviewed-by: Jonathan Cameron Reviewed-by: Yicong Yang Tested-by: Ilkka Koskinen Link: https://lore.kernel.org/r/20231208025652.87192-2-xueshuai@linux.alibaba.com Signed-off-by: Will Deacon commit 404f62cd6407f163e03cfaca97e27c1c4c62eb3c Author: Daniel Lezcano Date: Wed Dec 13 13:13:22 2023 +0100 thermal/core: Check get_temp ops is present when registering a tz Initially the check against the get_temp ops in the thermal_zone_device_update() was put in there in order to catch drivers not providing this method. Instead of checking again and again the function if the ops exists in the update function, let's do the check at registration time, so it is checked one time and for all. Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit e4af84f34c5a7e951464ab51021764c7c1204d70 Author: Aakarsh Jain Date: Wed Dec 13 13:41:05 2023 +0530 media: s5p-mfc: DPB Count Independent of VIDIOC_REQBUF Add allocation of DPB buffers based on MFC requirement so, codec buffers allocations has been moved after state MFCINST_HEAD_PRODUCED. It is taken care that codec buffer allocation is performed in process context from userspace IOCTL call. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil commit f30d7cfac41783327fee87950f243165508f9cea Author: Aakarsh Jain Date: Wed Dec 13 13:41:04 2023 +0530 media: s5p-mfc: Load firmware for each run in MFCv12. In MFCv12, some section of firmware gets updated at each MFC run. Hence we need to reload original firmware for each run at the start. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil commit a394c3ff5f98389aa19e036b4fe3cd46c2d3c60f Author: Aakarsh Jain Date: Wed Dec 13 13:41:03 2023 +0530 media: s5p-mfc: Set context for valid case before calling try_run Context bit is set for hardware execution if there is a buffer in source and destination queue before calling try_run in the init_buffers function. Now there will be a new context created and hardware will be invoked for the buffer queued instead of waiting for another buffer to be queued from userspace to set this context bit for hw execution. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil commit ff3f4490625bac7c42f5a09a72d9ff5cf4e64fa5 Author: Aakarsh Jain Date: Wed Dec 13 13:41:02 2023 +0530 media: s5p-mfc: Add support for DMABUF for encoder Add dmabuf support for mfc encoder Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil commit 15fe06f7dcb9cd661ef62720f84cb3b3e0760026 Author: Aakarsh Jain Date: Wed Dec 13 13:41:01 2023 +0530 media: s5p-mfc: Add support for UHD encoding. MFC driver had restriction on max resolution of 1080p, updated it for UHD. Added corresponding support to set recommended profile and level for H264 in UHD scenario. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil commit c639899bb66742f39cd6a0a4c27eb3240e309bff Author: Aakarsh Jain Date: Wed Dec 13 13:41:00 2023 +0530 media: s5p-mfc: Add support for rate controls in MFCv12 In MFCv12, the rc configs are changed with support for CBR loose, CBR tight and Variable Bitrate (VBR) added. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil commit 6f1466123d731265e607df3a0ea79bfc7531a564 Author: Aakarsh Jain Date: Wed Dec 13 13:40:59 2023 +0530 media: s5p-mfc: Add YV12 and I420 multiplanar format support YV12 and I420 format (3-plane) support is added. Stride information is added to all formats and planes since it is necessary for YV12/I420 which are different from width. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil commit e57b6d326f94a4e4b13625b3b5533e1be4be81c6 Author: Aakarsh Jain Date: Wed Dec 13 13:40:58 2023 +0530 media: s5p-mfc: Add initial support for MFCv12 Add support for MFCv12, with a new register file and necessary hw control, decoder, encoder and structural changes. Add luma dbp, chroma dpb and mv sizes for each codec as per the UM for MFCv12, along with appropriate alignment. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Signed-off-by: Hans Verkuil commit 199643db9ac2919140cc77a9e71057a4d1bf1959 Author: Aakarsh Jain Date: Wed Dec 13 13:40:57 2023 +0530 media: s5p-mfc: Rename IS_MFCV10 macro Renames macro IS_MFCV10 to IS_MFCV10_PLUS so that the MFCv10 code can be resued for MFCv12 support. Since some part of MFCv10 specific code holds good for MFCv12 also. Cc: linux-fsd@tesla.com Signed-off-by: Smitha T Murthy Signed-off-by: Aakarsh Jain Reviewed-by: Alim Akhtar Signed-off-by: Hans Verkuil commit 3253a8cdd7fe0c62607edad5e0369435a5160439 Author: Aakarsh Jain Date: Wed Dec 13 13:40:56 2023 +0530 dt-bindings: media: s5p-mfc: Add mfcv12 variant Add Tesla FSD MFC(MFC v12) compatible. Cc: linux-fsd@tesla.com Signed-off-by: Aakarsh Jain Reviewed-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil commit 6475b8e1821c9d14e60592a74c10d75431500c7c Author: Daniel Golle Date: Tue Dec 12 23:10:07 2023 +0000 ASoC: mediatek: mt7986: silence error in case of -EPROBE_DEFER If probe is defered no error should be printed. Use dev_err_probe() to have it muted. Signed-off-by: Daniel Golle Reviewed-by: Maso Huang Reviewed-by: AngeloGioacchino Del Regno Link: https://msgid.link/r/b941a404d97c01ef3e30c49925927b9a7dafeb19.1702422544.git.daniel@makrotopia.org Signed-off-by: Mark Brown commit 9b3febc3a3da7fcd81ece10614b7fd6c729ba8b4 Author: Jason Gunthorpe Date: Tue Oct 17 15:11:44 2023 -0300 iommu/arm-smmu: Convert to domain_alloc_paging() Now that the BLOCKED and IDENTITY behaviors are managed with their own domains change to the domain_alloc_paging() op. The check for using_legacy_binding is now redundant, arm_smmu_def_domain_type() always returns IOMMU_DOMAIN_IDENTITY for this mode, so the core code will never attempt to create a DMA domain in the first place. Since commit a4fdd9762272 ("iommu: Use flush queue capability") the core code only passes in IDENTITY/BLOCKED/UNMANAGED/DMA domain types. It will not pass in IDENTITY or BLOCKED if the global statics exist, so the test for DMA is also redundant now too. Call arm_smmu_init_domain_context() early if a dev is available. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/5-v2-c86cc8c2230e+160bb-smmu_newapi_jgg@nvidia.com [will: Simplify arm_smmu_domain_alloc_paging() since 'cfg' cannot be NULL] Signed-off-by: Will Deacon commit e0976331ad114af8e379e18483c346c6c79ca858 Author: Jason Gunthorpe Date: Tue Oct 17 15:11:43 2023 -0300 iommu/arm-smmu: Pass arm_smmu_domain to internal functions Keep the types consistent, all the callers of these functions already have obtained a struct arm_smmu_domain, don't needlessly go to/from an iommu_domain through the internal call chains. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/4-v2-c86cc8c2230e+160bb-smmu_newapi_jgg@nvidia.com Signed-off-by: Will Deacon commit bbbf11eea38c0cb167edc5ce5fe76324e87ad074 Author: Jason Gunthorpe Date: Tue Oct 17 15:11:42 2023 -0300 iommu/arm-smmu: Implement IOMMU_DOMAIN_BLOCKED Using the same design as IDENTITY setup a S2CR_TYPE_FAULT s2cr for the device. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/3-v2-c86cc8c2230e+160bb-smmu_newapi_jgg@nvidia.com Signed-off-by: Will Deacon commit 22bb7b41476a1b8dc282dc5b3ca5470090b52e46 Author: Jason Gunthorpe Date: Tue Oct 17 15:11:41 2023 -0300 iommu/arm-smmu: Convert to a global static identity domain Create a global static identity domain with it's own arm_smmu_attach_dev_identity() that simply calls arm_smmu_master_install_s2crs() with the identity parameters. This is done by giving the attach path for identity its own unique implementation that simply calls arm_smmu_master_install_s2crs(). Remove ARM_SMMU_DOMAIN_BYPASS and all checks of IOMMU_DOMAIN_IDENTITY. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/2-v2-c86cc8c2230e+160bb-smmu_newapi_jgg@nvidia.com [will: Move duplicated autosuspend logic into a helper function] Signed-off-by: Will Deacon commit 1a648f8b7994dca4c323911607cf28d1eb44c198 Author: Andy Yan Date: Mon Dec 11 19:58:36 2023 +0800 dt-bindings: soc: rockchip: add rk3588 vop/vo syscon Add VOP and VO GRF syscon compatibles for RK3588 Signed-off-by: Andy Yan Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231211115836.1785248-1-andyshrk@163.com Signed-off-by: Heiko Stuebner commit ccb45b34d44016b91fa75646741d317d6d6fdeea Author: Arnd Bergmann Date: Tue Dec 12 22:48:38 2023 +0100 ACPI: arm64: export acpi_arch_thermal_cpufreq_pctg() The cpufreq code can be in a loadable module, so the architecture support for it has to be exported: ERROR: modpost: "acpi_arch_thermal_cpufreq_pctg" [drivers/acpi/processor.ko] undefined! Fixes: 310293a2b941 ("ACPI: processor: reduce CPUFREQ thermal reduction pctg for Tegra241") Signed-off-by: Arnd Bergmann Signed-off-by: Rafael J. Wysocki commit 38c872a9e96f72f2947affc0526cc05659367d3d Author: Tony Luck Date: Tue Dec 12 13:22:39 2023 -0800 ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error When both CONFIG_RAS_CEC and CONFIG_ACPI_EXTLOG are enabled, Linux does not clear the status word of the BIOS supplied error record for corrected errors. This may prevent logging of subsequent uncorrected errors. Fix by clearing the status. Fixes: 23ba710a0864 ("x86/mce: Fix all mce notifiers to update the mce->kflags bitmask") Reported-by: Erwin Tsaur Signed-off-by: Tony Luck Signed-off-by: Rafael J. Wysocki commit 604ca8ee7bdc62488af1da1231026d3b71f17725 Merge: d2e9464e63366 6208799553a85 Author: David S. Miller Date: Wed Dec 13 12:49:05 2023 +0000 Merge branch 'virtio-net-dynamic-coalescing-moderation' Heng Qi says: ==================== virtio-net: support dynamic coalescing moderation Now, virtio-net already supports per-queue moderation parameter setting. Based on this, we use the linux dimlib to support dynamic coalescing moderation for virtio-net. Due to some scheduling issues, we only support and test the rx dim. Some test results: I. Sockperf UDP ================================================= 1. Env rxq_0 with affinity to cpu_0. 2. Cmd client: taskset -c 0 sockperf tp -p 8989 -i $IP -t 10 -m 16B server: taskset -c 0 sockperf sr -p 8989 3. Result dim off: 1143277.00 rxpps, throughput 17.844 MBps, cpu is 100%. dim on: 1124161.00 rxpps, throughput 17.610 MBps, cpu is 83.5%. ================================================= II. Redis ================================================= 1. Env There are 8 rxqs, and rxq_i with affinity to cpu_i. 2. Result When all cpus are 100%, ops/sec of memtier_benchmark client is dim off: 978437.23 dim on: 1143638.28 ================================================= III. Nginx ================================================= 1. Env There are 8 rxqs and rxq_i with affinity to cpu_i. 2. Result When all cpus are 100%, requests/sec of wrk client is dim off: 877931.67 dim on: 1019160.31 ================================================= IV. Latency of sockperf udp ================================================= 1. Rx cmd taskset -c 0 sockperf sr -p 8989 2. Tx cmd taskset -c 0 sockperf pp -i ${ip} -p 8989 -t 10 After running this cmd 5 times and averaging the results, 3. Result dim off: 17.7735 usec dim on: 18.0110 usec ================================================= Changelog: v7->v8: - Add select DIMLIB. v6->v7: - Drop the patch titled "spin lock for ctrl cmd access" - Use rtnl_trylock to avoid the deadlock. v5->v6: - Add patch(4/5): spin lock for ctrl cmd access - Patch(5/5): - Use spin lock and cancel_work_sync to synchronize v4->v5: - Patch(4/4): - Fix possible synchronization issues with cancel_work_sync. - Reduce if/else nesting levels v3->v4: - Patch(5/5): drop. v2->v3: - Patch(4/5): some minor modifications. v1->v2: - Patch(2/5): a minor fix. - Patch(4/5): - improve the judgment of dim switch conditions. - Cancel the work when vq reset. - Patch(5/5): drop the tx dim implementation. ==================== Signed-off-by: David S. Miller commit 6208799553a85875c9f812ba8e4c99d1fc69e8b9 Author: Heng Qi Date: Mon Dec 11 18:36:07 2023 +0800 virtio-net: support rx netdim By comparing the traffic information in the complete napi processes, let the virtio-net driver automatically adjust the coalescing moderation parameters of each receive queue. Signed-off-by: Heng Qi Signed-off-by: David S. Miller commit 1db43c0818e29f24665e38c8878418f597e130ec Author: Heng Qi Date: Mon Dec 11 18:36:06 2023 +0800 virtio-net: extract virtqueue coalescig cmd for reuse Extract commands to set virtqueue coalescing parameters for reuse by ethtool -Q, vq resize and netdim. Signed-off-by: Heng Qi Acked-by: Jason Wang Signed-off-by: David S. Miller commit d7180080ddf7dc283e93e009662d308de733f805 Author: Heng Qi Date: Mon Dec 11 18:36:05 2023 +0800 virtio-net: separate rx/tx coalescing moderation cmds This patch separates the rx and tx global coalescing moderation commands to support netdim switches in subsequent patches. Signed-off-by: Heng Qi Acked-by: Jason Wang Signed-off-by: David S. Miller commit 7949c06ad9a8fefc4aabe4baed057f8f4a8e33d8 Author: Heng Qi Date: Mon Dec 11 18:36:04 2023 +0800 virtio-net: returns whether napi is complete rx netdim needs to count the traffic during a complete napi process, and start updating and comparing samples to make decisions after the napi ends. Let virtqueue_napi_complete() return true if napi is done, otherwise vice versa. Signed-off-by: Heng Qi Acked-by: Jason Wang Signed-off-by: David S. Miller commit ff0f802974136c7f4c576da227565dc27cc1c69d Author: Jason Gunthorpe Date: Tue Oct 17 15:11:40 2023 -0300 iommu/arm-smmu: Reorganize arm_smmu_domain_add_master() Make arm_smmu_domain_add_master() not use the smmu_domain to detect the s2cr configuration, instead pass it in as a parameter. It always returns zero so make it return void. Since it no longer really does anything to do with a domain call it arm_smmu_master_install_s2crs(). This is done to make the next two patches able to re-use this code without forcing the creation of a struct arm_smmu_domain. Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1-v2-c86cc8c2230e+160bb-smmu_newapi_jgg@nvidia.com Signed-off-by: Will Deacon commit d2e9464e63366a2a89375a2b14e8a5adb4d0b1d5 Merge: e5bc1f4c6554b c3a910e1c47a3 Author: David S. Miller Date: Wed Dec 13 12:35:55 2023 +0000 Merge branch 'ionic-pci-errors' Shannon Nelson says: ==================== ionic: updates to PCI error handling These are improvements to our PCI error handling, including FLR and AER events. ==================== Signed-off-by: David S. Miller commit c3a910e1c47a3f033f14a76624711deeb2a0cfff Author: Shannon Nelson Date: Mon Dec 11 10:58:04 2023 -0800 ionic: fill out pci error handlers Set up the pci_error_handlers error_detected and resume to be useful in handling AER events. If the error detected is pci_channel_io_frozen we set up to do an FLR at the end of the AER handling - this tends to clear things up well enough that traffic can continue. Else, let the AER/PCI machinery do what is needed for the less serious errors seen. Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley Signed-off-by: David S. Miller commit ce66172d33935df630c9b71a95cff685e12ad506 Author: Shannon Nelson Date: Mon Dec 11 10:58:03 2023 -0800 ionic: lif debugfs refresh on reset Remove and restore the lif's debugfs pointers on a reset, and make sure to check for the dentry before removing it in case an earlier reset failed to rebuild the lif. Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley Signed-off-by: David S. Miller commit b0dbe358fbb416877d32a79a586ded50040467d6 Author: Shannon Nelson Date: Mon Dec 11 10:58:02 2023 -0800 ionic: use timer_shutdown_sync When stopping the watchdog timer at remove time we should be using the new timer_shutdown_sync to assure the timer doesn't ever get rearmed. Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley Signed-off-by: David S. Miller commit 219e183272b4a566650a37264aff90a8c613d9b5 Author: Shannon Nelson Date: Mon Dec 11 10:58:01 2023 -0800 ionic: no fw read when PCI reset failed If there was a failed attempt to reset the PCI connection, don't later try to read from PCI as the space is unmapped and will cause a paging request crash. When clearing the PCI setup we can clear the dev_info register pointer, and check it before using it in the fw_running test. Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley Signed-off-by: David S. Miller commit 13943d6c82730a2a4e40e05d6deaca26a8de0a4d Author: Shannon Nelson Date: Mon Dec 11 10:58:00 2023 -0800 ionic: prevent pci disable of already disabled device If a reset fails, the PCI device is left in a disabled state, so don't try to disable it again on driver remove. This prevents a scary looking WARN trace in the kernel log. ionic 0000:2b:00.0: disabling already-disabled device Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley Signed-off-by: David S. Miller commit ca5fdf9a7c5b65968c718f2be159cda4c13556a1 Author: Shannon Nelson Date: Mon Dec 11 10:57:59 2023 -0800 ionic: bypass firmware cmds when stuck in reset If the driver or firmware is stuck in reset state, don't bother trying to use adminq commands. This speeds up shutdown and prevents unnecessary timeouts and error messages. This includes a bit of rework on ionic_adminq_post_wait() and ionic_adminq_post_wait_nomsg() to both use __ionic_adminq_post_wait() which can do the checks needed in both cases. Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley Signed-off-by: David S. Miller commit 45b84188a0a4b91c9763105381486916cc4b861f Author: Shannon Nelson Date: Mon Dec 11 10:57:58 2023 -0800 ionic: keep filters across FLR Make sure we keep and replay the filters and RSS config across an FLR by using our FW_RESET flag. This gets checked on the way down and on the way back up to help determine how much LIF state to keep and restore across a reset action. Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley Signed-off-by: David S. Miller commit 24f110240c03c6b5368f1203bac72883d511e606 Author: Shannon Nelson Date: Mon Dec 11 10:57:57 2023 -0800 ionic: pass opcode to devcmd_wait Don't rely on the PCI memory for the devcmd opcode because we read a 0xff value if the PCI bus is broken, which can cause us to report a bogus dev_cmd opcode later. Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley Signed-off-by: David S. Miller commit 7d28365a06af74cee015a448d32ab6e98cd05cfb Author: Uros Bizjak Date: Thu Nov 9 21:09:56 2023 +0100 x86/head_64: Use TESTB instead of TESTL in secondary_startup_64_no_verify() There is no need to use TESTL when checking the least-significant bit with a TEST instruction. Use TESTB, which is three bytes shorter: f6 05 00 00 00 00 01 testb $0x1,0x0(%rip) vs: f7 05 00 00 00 00 01 testl $0x1,0x0(%rip) 00 00 00 for the same effect. No functional changes intended. Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231109201032.4439-1-ubizjak@gmail.com commit 9fde008337d3be8afa7b3b42c1787aac4b6853c9 Author: Jason Gunthorpe Date: Tue Dec 5 15:14:35 2023 -0400 iommu/arm-smmu-v3: Remove ARM_SMMU_DOMAIN_NESTED Currently this is exactly the same as ARM_SMMU_DOMAIN_S2, so just remove it. The ongoing work to add nesting support through iommufd will do something a little different. Reviewed-by: Moritz Fischer Reviewed-by: Eric Auger Reviewed-by: Nicolin Chen Tested-by: Shameer Kolothum Tested-by: Nicolin Chen Signed-off-by: Jason Gunthorpe Signed-off-by: Will Deacon commit 12a48fe90d0919e4e594815122403f793a090803 Author: Jason Gunthorpe Date: Tue Dec 5 15:14:34 2023 -0400 iommu/arm-smmu-v3: Master cannot be NULL in arm_smmu_write_strtab_ent() The only caller is arm_smmu_install_ste_for_dev() which never has a NULL master. Remove the confusing if. Reviewed-by: Moritz Fischer Reviewed-by: Michael Shavit Reviewed-by: Eric Auger Reviewed-by: Nicolin Chen Tested-by: Shameer Kolothum Tested-by: Nicolin Chen Signed-off-by: Jason Gunthorpe Signed-off-by: Will Deacon commit 57b89048874c9edd4a17f34c126b4a4188b7b444 Author: Jason Gunthorpe Date: Tue Dec 5 15:14:33 2023 -0400 iommu/arm-smmu-v3: Add a type for the STE Instead of passing a naked __le16 * around to represent a STE wrap it in a "struct arm_smmu_ste" with an array of the correct size. This makes it much clearer which functions will comprise the "STE API". Reviewed-by: Moritz Fischer Reviewed-by: Michael Shavit Reviewed-by: Eric Auger Reviewed-by: Nicolin Chen Tested-by: Shameer Kolothum Tested-by: Nicolin Chen Signed-off-by: Jason Gunthorpe Signed-off-by: Will Deacon commit 03d93f8ed7e3db7351462c2d94fb010ad82ca0ea Author: Jacopo Mondi Date: Wed Dec 13 09:29:19 2023 +0100 media: i2c: Add driver for OmniVision OV64A40 Add a driver for the OmniVision OV64A40 image sensor. Co-developed-by: Lee Jackson Signed-off-by: Lee Jackson Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 00c68a4b5a6081f370ec39abf310c681744902a1 Author: Jacopo Mondi Date: Wed Dec 13 09:29:18 2023 +0100 media: dt-bindings: Add OmniVision OV64A40 Add bindings for OmniVision OV64A40. Co-developed-by: Lee Jackson Signed-off-by: Lee Jackson Signed-off-by: Jacopo Mondi Acked-by: Conor Dooley Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit cfa49ff0558a3269cd62bb91ec20364a77f8138a Author: Umang Jain Date: Mon Dec 11 18:29:49 2023 +0530 media: i2c: imx335: Support 2592x1940 10-bit mode In addition to the existing 2592x1940 12-bit mode, introduce support for 2592x1940 10-bit mode. Following are the register set which control the 10/12 bit mode setting: MDBIT 0x319d ADBIT 0x3050 ADBIT1 0x341c 0x341d Signed-off-by: Umang Jain Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d7b95ad7a8d56248dfc34f861e445fad7a4004f4 Author: Kieran Bingham Date: Mon Dec 11 18:29:48 2023 +0530 media: i2c: imx335: Fix hblank min/max values The V4L2_CID_HBLANK control is marked as readonly and can only be a single value. Set the minimum and maximum value to match the mode value. Reviewed-by: Umang Jain Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 252b2caaf2cbbf2bfab483af200d58a7a5bfe87f Author: Kieran Bingham Date: Mon Dec 11 18:29:47 2023 +0530 media: i2c: imx335: Implement get selection API Support reporting of the Sensor Native and Active pixel array areas through the Selection API. The implementation reports a single target crop only for the mode that is presently exposed by the driver. Reviewed-by: Umang Jain Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit fea91ee73b7cd19f08017221923d789f984abc54 Author: Kieran Bingham Date: Mon Dec 11 18:29:46 2023 +0530 media: i2c: imx335: Enable regulator supplies Provide support for enabling and disabling regulator supplies to control power to the camera sensor. While updating the power on function, document that a sleep is represented as 'T4' in the datasheet power on sequence. Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1af87779e9f7dcdd4f219b355ae090ca18028540 Author: Kieran Bingham Date: Mon Dec 11 18:29:45 2023 +0530 media: i2c: imx335: Improve configuration error reporting The existing imx335_parse_hw_config function has two paths that can be taken without reporting to the user the reason for failing to accept the hardware configuration. Extend the error reporting paths to identify failures when probing the device. Reviewed-by: Umang Jain Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d5ca45b8b91ea40696aaceb3f93d207b25b26d50 Author: Kieran Bingham Date: Mon Dec 11 18:29:44 2023 +0530 media: i2c: imx335: Fix logging line endings The use of \n as a line ending throughout the driver is inconsistent. While it is possible for logging messages to automatically have newlines added by the kernel printk mechanisms, this is specifically to support continued lines with PR_CONT and the lack of a new line character indicates that the text is a fragment of a continuation line. As each of these lines are whole and not fragments, explicitly define the newline for consistency. Signed-off-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit bd4eadc4536fc3a52c9794e59f29e274ba1e5d82 Author: Kieran Bingham Date: Mon Dec 11 18:29:43 2023 +0530 media: dt-bindings: media: imx335: Add supply bindings Add the bindings for the supply references used on the IMX335. Reviewed-by: Umang Jain Reviewed-by: Marco Felsch Signed-off-by: Kieran Bingham Acked-by: Conor Dooley Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 79e3a67a203ae1a66849427e03ae30117a31d35d Author: André Apitzsch Date: Wed Dec 6 23:33:58 2023 +0100 media: i2c: imx214: Add sensor's pixel matrix size Set effective and active sensor pixel sizes as shown in product brief[1]. [1]: https://www.mouser.com/datasheet/2/897/ProductBrief_IMX214_20150428-1289331.pdf Reviewed-by: Jacopo Mondi Signed-off-by: André Apitzsch Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 2ae9f9780d8097289f7c2921990c41a7494a7bae Author: André Apitzsch Date: Wed Dec 6 23:33:57 2023 +0100 media: i2c: imx214: Read orientation and rotation from system firmware Obtain rotation and orientation information from system firmware and register the appropriate controls. While at it, update number of pre-allocated control slots. Reviewed-by: Jacopo Mondi Reviewed-by: Ricardo Ribalda Signed-off-by: André Apitzsch Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4f302d004bd0fc6ac392d5e92b290e637ec19999 Author: André Apitzsch Date: Wed Dec 6 23:33:56 2023 +0100 media: i2c: imx214: Move controls init to separate function Code refinement. While at it, don't destroy the mutex not initialized yet if the controls are initialized incorrectly. Reviewed-by: Jacopo Mondi Reviewed-by: Ricardo Ribalda Signed-off-by: André Apitzsch Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 657cd1fab06e357eab7c93e574f6c99c2cc8422a Author: André Apitzsch Date: Wed Dec 6 23:33:55 2023 +0100 media: i2c: imx214: Explain some magic numbers Code refinement, no functional changes. Reviewed-by: Ricardo Ribalda Reviewed-by: Kieran Bingham Signed-off-by: André Apitzsch [Sakari Ailus: The control handler remains in the context struct still.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3ae52083b5338f756c503034ad58feb869e217c0 Author: Sebastian Reichel Date: Sat Dec 9 00:18:19 2023 +0100 media: i2c: gc0308: new driver Introduce new driver for GalaxyCore GC0308, which is a cheap 640x480 with an on-chip ISP sensor sold since 2010. Data is provided via parallel bus. Reviewed-by: Jacopo Mondi Signed-off-by: Sebastian Reichel [Sakari Ailus: Changed MAINTAINERS to match GC2145 entry.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d91123d7c9d4302befc3a699090ae1a757d76ed3 Author: Sebastian Reichel Date: Sat Dec 9 00:18:18 2023 +0100 media: MAINTAINERS: Add GalaxyCore in camera sensor section "gc" prefixed i2c media drivers are most likely GalaxyCore camera sensor drivers, so add it to the list. Signed-off-by: Sebastian Reichel Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7e6b4371504267fe4b7506f4ea111af107beec77 Author: Sebastian Reichel Date: Sat Dec 9 00:18:17 2023 +0100 media: dt-bindings: gc0308: add binding Add DT binding for GalaxyCore GC0308 camera sensor. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 458492e8d81ef3e32339c3560de223e6c11fc75c Author: Krzysztof Kozlowski Date: Fri Dec 8 20:52:53 2023 +0100 media: dt-bindings: ov8856: decouple lanes and link frequency from driver The data lanes and link frequency were set to match existing Linux driver limitations, however bindings should be independent of chosen Linux driver support. Decouple these properties from the driver to match what is actually supported by the hardware. This also fixes DTS example: ov8856.example.dtb: camera@10: port:endpoint:link-frequencies:0: [360000000] is too short Fixes: 066a94e28a23 ("media: dt-bindings: media: Use graph and video-interfaces schemas") Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 16be18d71cc79738ff1b3c186dd49f8f7e06aa75 Author: Sakari Ailus Date: Tue Oct 17 13:33:59 2023 +0300 media: Documentation: LP-11 and LP-111 are states, not modes LP-11 and LP-111 are CSI-2 bus states, not modes. Fix this. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit cff18d8f8bf158701da815c8443c2363abb945ad Author: Sakari Ailus Date: Tue Oct 17 13:31:19 2023 +0300 media: Documentation: BT.601 is not a bus BT.601 is not actually a bus specification, leaving parallel bus without a specification to refer to. Fix this. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit ab8d7194acd1fea1702fff41a1ec93e458b6dcbf Author: Sakari Ailus Date: Thu Dec 7 12:00:02 2023 +0200 media: v4l: Safely to call v4l2_subdev_cleanup on an uninitialised subdev Graciously handle an uninitialised (but still zeroed) sub-device in v4l2_subdev_cleanup(). The list_empty() check there is unnecessary, too, so replace that by cheking whether the lists's next field is NULL. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit fb16c04a538e1fa177bf2dcdf763292d51fe6e2b Author: Hans de Goede Date: Mon Dec 4 13:39:46 2023 +0100 media: ipu-bridge: Change ov2740 link-frequency to 180 MHz The only known devices that use an ov2740 sensor in combination with the ipu-bridge code are various Lenovo ThinkPad models, which all need the link-frequency to be 180 MHz for things to work properly. The ov2740 driver used to only support 360 MHz link-frequency, which is why the ipu-bridge entry used 360 MHz, but now the ov2740 driver has been extended to also support 180 MHz. The ov2740 is actually used with 360 MHz link-frequency on Chromebooks. On Chromebooks the camera/sensor fwnode graph is part of the ACPI tables. The ipu-bridge code is used to dynamically generate the graph when it is missing, so it is not used on Chromebooks and the ov2740 will keep using 360 MHz link-frequency there as before. Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit efff0a80bc66dcba08e4810fc9eb91c78d5586cf Author: Hans de Goede Date: Mon Dec 4 13:39:45 2023 +0100 media: ov2740: Add a sleep after resetting the sensor Split the resetting of the sensor out of the link_freq_config reg_list and add a delay after this. This hopefully fixes the stream sometimes not starting, this was taken from the ov2740 sensor driver in the out of tree IPU6 driver: https://github.com/intel/ipu6-drivers/ Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0677a2d9b735c1d57410dd188eb93ce61635987c Author: Hans de Goede Date: Mon Dec 4 13:39:44 2023 +0100 media: ov2740: Add support for 180 MHz link frequency On various Lenovo Thinkpad models with an ov2740 sensor the 360 MHz link frequency is not supported. Add support for 180 MHz link frequency, even though this has half the pixel clock, this supports the same framerate by using half the VTS value (significantly reducing the amount of empty lines send during vblank). Normally if there are multiple link-frequencies then the sensor driver choses the lowest link-frequency still usable for the chosen resolution. In this case the board supports only 1 link-frequency. Which frequency is supported is checked in ov2740_check_hwcfg() and then a different set of supported_modes (using only the supported link-freq) is selected. The register settings for this were taken from the ov2740 sensor driver in the out of tree IPU6 driver: https://github.com/intel/ipu6-drivers/ Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4024107e104c06ac497b87bfd063c377b0b74527 Author: Hans de Goede Date: Mon Dec 4 13:39:43 2023 +0100 media: ov2740: Check hwcfg after allocating the ov2740 struct Alloc ov2740_data and set up the drvdata pointer before calling ov2740_check_hwcfg(). This is a preparation patch to allow ov2740_check_hwcfg() to store some of the parsed data in the ov2740 struct. Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3735228bbe3511f844e03dfcc4003fadb59dde23 Author: Hans de Goede Date: Mon Dec 4 13:39:42 2023 +0100 media: ov2740: Fix hts value HTS must be more then width, so the 1080 value clearly is wrong, this is then corrected with some weird math dividing clocks in to_pixels_per_line() which results in the hts getting multiplied by 2, resulting in 2160. Instead just directly set hts to the correct value of 2160 and drop to_pixels_per_line(). Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 41543c7ccc682f7ec713dbe19be67fa694088f9c Author: Hans de Goede Date: Mon Dec 4 13:39:41 2023 +0100 media: ov2740: Improve ov2740_check_hwcfg() error reporting Make ov2740_check_hwcfg() report an error on failure in all error paths, so that it is always clear why the probe() failed. Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 47913c1f554c31350af36130b208a0bf7754e8d0 Author: Hans de Goede Date: Mon Dec 4 13:39:40 2023 +0100 media: ov2740: Move fwnode_graph_get_next_endpoint() call up If the bridge has not yet setup the fwnode-graph then the fwnode_property_read_u32("clock-frequency") call will fail. Move the fwnode_graph_get_next_endpoint() call to above reading the clock-frequency. Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 846a37cf470f489ad1713e143083d17630c73056 Author: Hans de Goede Date: Mon Dec 4 13:39:39 2023 +0100 media: ov2740: Add support for external clock On some ACPI platforms, such as Chromebooks the ACPI methods to change the power-state (_PS0 and _PS3) fully take care of powering on/off the sensor. On other ACPI platforms, such as e.g. various ThinkPad models with IPU6 + ov2740 sensor, the sensor driver must control the reset GPIO and the sensor's clock itself. Add support for having the driver control an optional clock. Reviewed-by: Bingbu Cao Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1a140854bc8c9d258ddb31912b80f63faf760144 Author: Hans de Goede Date: Mon Dec 4 13:39:38 2023 +0100 media: ov2740: Add support for reset GPIO On some ACPI platforms, such as Chromebooks the ACPI methods to change the power-state (_PS0 and _PS3) fully take care of powering on/off the sensor. On other ACPI platforms, such as e.g. various ThinkPad models with IPU6 + ov2740 sensor, the sensor driver must control the reset GPIO and the sensor's clock itself. Add support for having the driver control an optional reset GPIO. Reviewed-by: Bingbu Cao Signed-off-by: Hans de Goede Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0a7af872915ee34668edf7e4018648a226d9e7f9 Author: Tommaso Merciai Date: Mon Dec 4 10:47:16 2023 +0100 media: i2c: Add support for alvium camera The Alvium camera is shipped with sensor + isp in the same housing. The camera can be equipped with one out of various sensor and abstract the user from this. Camera is connected via MIPI CSI-2. Most of the camera module features are supported, with the main exception being fw update. The driver provides all mandatory, optional and recommended V4L2 controls for maximum compatibility with libcamera References: - https://www.alliedvision.com/en/products/embedded-vision-solutions Signed-off-by: Tommaso Merciai [Sakari Ailus: Assign ret before using it in probe and squash Tommaso's other fixes.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil [hverkuil: alvium-csi2.h: SPDX must use /* */ instead of //] commit 381d661a00e96f5d84a8ca2bd83cdb96a9f2d07a Author: Tommaso Merciai Date: Mon Dec 4 10:47:15 2023 +0100 media: dt-bindings: alvium: add document YAML binding Add documentation of device tree in YAML schema for the ALVIUM Camera from Allied Vision Inc. References: - https://www.alliedvision.com/en/products/embedded-vision-solutions Signed-off-by: Tommaso Merciai Reviewed-by: Laurent Pinchart Reviewed-by: Conor Dooley Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 164bf1728651ee08b530d811879b4610d07a2e4e Author: Tommaso Merciai Date: Mon Dec 4 10:47:14 2023 +0100 dt-bindings: vendor-prefixes: Add prefix alliedvision Add a vendor prefix entry for Allied Vision Technologies GmbH (https://www.alliedvision.com) Signed-off-by: Tommaso Merciai Reviewed-by: Laurent Pinchart Acked-by: Conor Dooley Acked-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit df15385e6793e62f1537c5069680ac12049b4a5f Author: Vincent Knecht Date: Fri Dec 1 19:13:50 2023 +0100 media: i2c: ak7375: Add support for ak7345 Add support for ak7345 VCM, which has 9 bits position values, longer power-up delay, and no known standby register setting. Might be compatible as-is with ak7348. Tested on msm8916-alcatel-idol347 phone. Signed-off-by: Vincent Knecht Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit f8e004714a94ae683771529c5795c6ee4612dd8c Author: Vincent Knecht Date: Fri Dec 1 19:13:49 2023 +0100 media: dt-bindings: ak7375: Add ak7345 support Document AK7345 bindings. Compared to AK7375, it has only 9 bits position values (instead of 12), 20 ms power-up delay (instead of 10), and no known standby register setting. Acked-by: Conor Dooley Signed-off-by: Vincent Knecht [Sakari Ailus: Rewrap commit message.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 4e671eb56b95de1433da00b4f2c86a21b485fa20 Author: Vincent Knecht Date: Fri Dec 1 19:13:48 2023 +0100 media: i2c: ak7375: Prepare for supporting another chip In view of adding support for at least one other chip, change the driver to move chip-specific properties and values in a common structure. No functional changes. Signed-off-by: Vincent Knecht Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 60fc87a69523c294eb23a1316af922f6665a6f8c Author: Alexander Stein Date: Thu Nov 2 10:50:48 2023 +0100 media: i2c: imx290: Properly encode registers as little-endian The conversion to CCI also converted the multi-byte register access to big-endian. Correct the register definition by using the correct little-endian ones. Fixes: af73323b9770 ("media: imx290: Convert to new CCI register access helpers") Cc: stable@vger.kernel.org Signed-off-by: Alexander Stein Reviewed-by: Hans de Goede Reviewed-by: Laurent Pinchart [Sakari Ailus: Fixed the Fixes: tag.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d92e7a013ff33f4e0b31bbf768d0c85a8acefebf Author: Alexander Stein Date: Thu Nov 2 10:50:47 2023 +0100 media: v4l2-cci: Add support for little-endian encoded registers Some sensors, e.g. Sony IMX290, are using little-endian registers. Add support for those by encoding the endianness into Bit 20 of the register address. Fixes: af73323b9770 ("media: imx290: Convert to new CCI register access helpers") Cc: stable@vger.kernel.org Signed-off-by: Alexander Stein Reviewed-by: Hans de Goede Reviewed-by: Laurent Pinchart [Sakari Ailus: Fixed commit message.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1545c2b92bdf408e860dea2cf958b65e17a0ce18 Author: Laurent Pinchart Date: Fri Dec 8 14:06:37 2023 +0200 media: atmel-isi: Fix crash due to missing subdev in state As a result of converting to the stream-aware state functions, commit bc0e8d91feec ("media: v4l: subdev: Switch to stream-aware state functions") caused the sd pointer of the state passed to the v4l2_subdev_state_get_crop() function to be dereferenced. It however missed that the atmel-isi driver creates the v4l2_subdev_state instance on the stack (which it shouldn't do, but that's a separate problem), without initializing the sd field. This results in a null pointer dereference. Fix it by initializing the sd field. Fixes: bc0e8d91feec ("media: v4l: subdev: Switch to stream-aware state functions") Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7b1a09e44dc64f4f5930659b6d14a27183c00705 Author: Huang Shijie Date: Wed Dec 13 09:20:46 2023 +0800 arm64: irq: set the correct node for shadow call stack The init_irq_stacks() has been changed to use the correct node: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=75b5e0bf90bf The init_irq_scs() has the same issue with init_irq_stacks(): cpu_to_node() is not initialized yet, it does not work. This patch uses early_cpu_to_node() to set the init_irq_scs() with the correct node. Signed-off-by: Huang Shijie Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20231213012046.12014-1-shijie@os.amperecomputing.com Signed-off-by: Will Deacon commit 4f9b632e1bb28e0b5ec6d63a51ea727ce0581ec0 Author: Johan Hovold Date: Wed Dec 6 12:17:54 2023 +0100 dt-bindings: mfd: pm8008: Clean up example node names Devicetree node names should be generic; fix up the pm8008 binding example accordingly. Signed-off-by: Johan Hovold Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231206111754.7410-5-johan+linaro@kernel.org Signed-off-by: Lee Jones commit bdc22c8d52d70fc5655ab4dbf72fa79b034bb7b5 Author: Rafael J. Wysocki Date: Tue Dec 5 20:18:39 2023 +0100 thermal: trip: Send trip change notifications on all trip updates The _store callbacks of the trip point temperature and hysteresis sysfs attributes invoke thermal_notify_tz_trip_change() to send a notification regarding the trip point change, but when trip points are updated by the platform firmware, trip point change notifications are not sent. To make the behavior after a trip point change more consistent, modify all of the 3 places where trip point temperature is updated to use a new function called thermal_zone_set_trip_temp() for this purpose and make that function call thermal_notify_tz_trip_change(). Note that trip point hysteresis can only be updated via sysfs and trip_point_hyst_store() calls thermal_notify_tz_trip_change() already, so this code path need not be changed. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 183b64132f9692b15545c1aad755e71a53bcfb94 Author: Rafael J. Wysocki Date: Mon Dec 4 20:49:03 2023 +0100 thermal: netlink: Use for_each_trip() in thermal_genl_cmd_tz_get_trip() Make thermal_genl_cmd_tz_get_trip() use for_each_trip() instead of an open- coded loop over trip indices. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Reviewed-by: Lukasz Luba commit 2e3e7dad4bf5ad869e8dc9fa09151913154318b0 Author: Rafael J. Wysocki Date: Mon Dec 4 20:46:35 2023 +0100 thermal: helpers: Use for_each_trip() in __thermal_zone_get_temp() Make __thermal_zone_get_temp() use for_each_trip() instead of an open- coded loop over trip indices. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Reviewed-by: Lukasz Luba commit 0c0c4740c9d2668a234f7743ba50d54acab0821c Author: Rafael J. Wysocki Date: Mon Dec 4 20:41:30 2023 +0100 thermal: trip: Use for_each_trip() in __thermal_zone_set_trips() Make __thermal_zone_set_trips() use for_each_trip() instead of an open- coded loop over trip indices. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano Reviewed-by: Lukasz Luba commit b6515a88baf4628e93fcc39c2b81fc1740eb3c3f Author: Rafael J. Wysocki Date: Mon Dec 4 20:36:14 2023 +0100 thermal: trip: Drop redundant __thermal_zone_get_trip() header The __thermal_zone_get_trip() header in drivers/thermal/thermal_core.h is redundant, because there is one already in thermal.h, so drop it. No functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 78da55c804cb9fb4ef3f839f4b284542a59b1a45 Author: Johan Hovold Date: Thu Nov 30 18:19:40 2023 +0100 dt-bindings: leds: qcom,spmi-flash-led: Fix example node name The led controller is a child of an SPMI PMIC, which in turn sits on an SPMI bus. While at it, add some newline separators to improve readability. Signed-off-by: Johan Hovold Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231130171940.12391-1-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 94d4090b61395ca5542d4af72db464eeaa298088 Author: Dmitry Rokosov Date: Sat Nov 25 23:05:19 2023 +0300 dt-bindings: leds: aw200xx: Fix led pattern and add reg constraints AW200XX controllers have the capability to declare more than 0xf LEDs, therefore, it is necessary to accept LED names using an appropriate regex pattern. The register offsets can be adjusted within the specified range, with the maximum value corresponding to the highest number of LEDs that can be connected to the controller. Fixes: e338a05e76ca ("dt-bindings: leds: Add binding for AW200xx") Signed-off-by: Dmitry Rokosov Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231125200519.1750-12-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit 13b93b1dca355ac87f470b12c72c0788a3a10da5 Author: George Stark Date: Sat Nov 25 23:05:18 2023 +0300 dt-bindings: leds: awinic,aw200xx: Add AW20108 device Add aw20108 compatible for Awinic AW20108 led controller. Signed-off-by: George Stark Signed-off-by: Dmitry Rokosov Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231125200519.1750-11-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit 634fea792a31717669094f7866cf32b8eeb932c0 Author: George Stark Date: Sat Nov 25 23:05:17 2023 +0300 leds: aw200xx: Add support for aw20108 device Add support for the Awinic aw20108 device, which belongs to the same LED drivers family. The new device supports 108 LEDs using a matrix of 12x9 outputs." Signed-off-by: George Stark Signed-off-by: Dmitry Rokosov Link: https://lore.kernel.org/r/20231125200519.1750-10-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit 150bca53652d8dcef9714d0873a86e129391f1e6 Author: George Stark Date: Sat Nov 25 23:05:16 2023 +0300 leds: aw200xx: Improve autodim calculation method It is highly recommended to leverage the DIV_ROUND_UP() function as a more refined and mathematically precise alternative to employing a coarse division method. Signed-off-by: George Stark Signed-off-by: Dmitry Rokosov Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231125200519.1750-9-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit 96b43a108bd689159486e97cb5a8b0170fa46657 Author: George Stark Date: Sat Nov 25 23:05:15 2023 +0300 leds: aw200xx: Enable disable_locking flag in regmap config In the driver regmap is always used under mutex so regmap's inner lock can be disabled. Signed-off-by: George Stark Signed-off-by: Dmitry Rokosov Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231125200519.1750-8-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit d883a5ab2f345c2adca781901731795ab94886fb Author: George Stark Date: Sat Nov 25 23:05:14 2023 +0300 leds: aw200xx: Add delay after software reset According to the datasheets of AW200xx devices, the software reset takes at least 1ms. Therefore, it is required to add a delay after the reset before issuing commands to the device. Signed-off-by: George Stark Signed-off-by: Dmitry Rokosov Link: https://lore.kernel.org/r/20231125200519.1750-7-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit aa4ed49f42400b503690fd3184d93eee0d765a88 Author: George Stark Date: Sat Nov 25 23:05:13 2023 +0300 dt-bindings: leds: aw200xx: Remove property "awinic,display-rows" Get rid of the property "awinic,display-rows" and calculate it in the driver using led definition nodes. Signed-off-by: George Stark Signed-off-by: Dmitry Rokosov Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231125200519.1750-6-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit 2b8db5729d10b23edd61e018c18fa7b865e2d76c Author: George Stark Date: Sat Nov 25 23:05:12 2023 +0300 leds: aw200xx: Calculate dts property display_rows in the driver Get rid of device tree property "awinic,display-rows". The property value actually means number of current switches and depends on how LEDs are connected to the device. It should be calculated manually by max used LED number. In the same way it is computed automatically now. Max used LED is taken from LED definition subnodes. Signed-off-by: George Stark Signed-off-by: Dmitry Rokosov Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231125200519.1750-5-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit 20dbf6d4a19c5bb5d2521c4993d4373fbe05f1bc Author: Dmitry Rokosov Date: Sat Nov 25 23:05:11 2023 +0300 dt-bindings: leds: aw200xx: Introduce optional enable-gpios property Property 'enable-gpios' is optional, it can be used by the board developer to connect AW200XX LED controller with appropriate 'enable' GPIO pad. Signed-off-by: Dmitry Rokosov Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231125200519.1750-4-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit d882762f7950c3dfd56c786a35d1518397773947 Author: Dmitry Rokosov Date: Sat Nov 25 23:05:10 2023 +0300 leds: aw200xx: Support HWEN hardware control HWEN is hardware control, which is used for enable/disable aw200xx chip. It's high active, internally pulled down to GND. After HWEN pin set high the chip begins to load the OTP information, which takes 200us to complete. About 200us wait time is needed for internal oscillator startup and display SRAM initialization. After display SRAM initialization, the registers in page 1 to page 5 can be configured via i2c interface. Signed-off-by: Dmitry Rokosov Link: https://lore.kernel.org/r/20231125200519.1750-3-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit adfd4621b78d0c02da91335da2b9ad847cb7b39e Author: Martin Kurbanov Date: Sat Nov 25 23:05:09 2023 +0300 leds: aw200xx: Fix write to DIM parameter If write only DIM value to the page 4, LED brightness will not be updated, as both DIM and FADE need to be written to the page 4. Therefore, write DIM to the page 1. Fixes: 36a87f371b7a ("leds: Add AW20xx driver") Signed-off-by: Martin Kurbanov Signed-off-by: Dmitry Rokosov Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231125200519.1750-2-ddrokosov@salutedevices.com Signed-off-by: Lee Jones commit 6dec659896b4e683beaea223d306e71e174e84cd Author: Florian Eckert Date: Mon Nov 27 12:03:11 2023 +0100 leds: ledtrig-tty: Add additional line state evaluation The serial tty interface also supports additional input signals, that can also be evaluated within this trigger. This change is adding the following additional input sources, which could be controlled via the '/sys/class//' sysfs interface. Explanation: DCE = Data Communication Equipment (Modem) DTE = Data Terminal Equipment (Computer) - cts: DCE is ready to accept data from the DTE (CTS = Clear To Send). If the line state is detected, the LED is switched on. If set to 0 (default), the LED will not evaluate CTS. If set to 1, the LED will evaluate CTS. - dsr: DCE is ready to receive and send data (DSR = Data Set Ready). If the line state is detected, the LED is switched on. If set to 0 (default), the LED will not evaluate DSR. If set to 1, the LED will evaluate DSR. - dcd: DTE is receiving a carrier from the DCE (DCD = Data Carrier Detect). If the line state is detected, the LED is switched on. If set to 0 (default), the LED will not evaluate DCD. If set to 1, the LED will evaluate DCD. - rng: DCE has detected an incoming ring signal on the telephone line (RNG = Ring Indicator). If the line state is detected, the LED is switched on. If set to 0 (default), the LED will not evaluate RNG. If set to 1, the LED will evaluate RNG. Also add an invert flag on LED blink, so that the LED blinks in the correct order. * If one off the new enabled input signals are evaluatet as 'enabled', and data are transmitted, then the LED should first blink 'off' and then 'on' (invert). * If all the new enabled input signals are evaluatet as 'disabled', and data are transmitted, then the LED should first blink 'on' and then 'off'. Signed-off-by: Florian Eckert Reviewed-by: Maarten Brock Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231127110311.3583957-5-fe@dev.tdt.de Signed-off-by: Lee Jones commit 5b755ca677dba117063c6fd8d7ce21b67376deba Author: Florian Eckert Date: Mon Nov 27 12:03:10 2023 +0100 leds: ledtrig-tty: Make rx tx activitate configurable Until now, the LED blinks when data is sent via the tty (rx/tx). This is not configurable. This change adds the possibility to make the indication for the direction of the transmitted data independently controllable via the new rx and tx sysfs entries. - rx: Signal reception (rx) of data on the named tty device. If set to 0, the LED will not blink on reception. If set to 1 (default), the LED will blink on reception. - tx: Signal transmission (tx) of data on the named tty device. If set to 0, the LED will not blink on transmission. If set to 1 (default), the LED will blink on transmission. This new sysfs entry are on by default. Thus the trigger behaves as before this change. Signed-off-by: Florian Eckert Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231127110311.3583957-4-fe@dev.tdt.de Signed-off-by: Lee Jones commit 76675f69bed5f1e8ae44ba72904ff7f97aa95c0a Author: Florian Eckert Date: Mon Nov 27 12:03:09 2023 +0100 leds: ledtrig-tty: Replace mutex with completion With this commit, the mutex handling is replaced by the completion handling. When handling mutex, it must always be ensured that the held mutex is also released again. This is more error-prone should the number of code paths increase. This is a preparatory commit to make the trigger more configurable via additional sysfs parameters. With this change, the worker always runs and is no longer stopped if no ttyname is set. Signed-off-by: Florian Eckert Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231127110311.3583957-3-fe@dev.tdt.de Signed-off-by: Lee Jones commit 4ff4379ce6eefe81695bcc2e021ce1dac3d707d2 Author: Florian Eckert Date: Mon Nov 27 12:03:08 2023 +0100 tty: add new helper function tty_get_tiocm There is no in-kernel function to get the status register of a tty device like the TIOCMGET ioctl returns to userspace. Create a new function, tty_get_tiocm(), to obtain the status register that other portions of the kernel can call if they need this information, and move the existing internal tty_tiocmget() function to use this interface. Signed-off-by: Florian Eckert Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231127110311.3583957-2-fe@dev.tdt.de Signed-off-by: Lee Jones commit 793bf5510d5e30dff2ce1d6e446b385cd494d5af Author: Uwe Kleine-König Date: Sun Nov 26 10:52:33 2023 +0100 leds: qcom-lpg: Consistenly use dev_err_probe() in .probe()'s error path One error path already used dev_err_probe(). Adapt the other error paths that emit an error message to also use this function for consistency and slightly simplified code. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231126095230.683204-3-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 9e1815f8c77155aa0818d65b1903a5a39af0ab75 Author: Uwe Kleine-König Date: Sun Nov 26 10:52:32 2023 +0100 leds: qcom-lpg: Use devm_pwmchip_add() simplifying driver removal With pwmchip_remove() being automatically called after switching to devm_pwmchip_add() the remove function can be dropped completely. Yay! With lpg_remove() gone there is no user of the platform device's drvdata left, so platform_set_drvdata() can be dropped from .probe(), too. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231126095230.683204-2-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 25054b232681c286fca9c678854f56494d1352cc Author: Florian Eckert Date: Mon Nov 27 09:16:21 2023 +0100 leds: ledtrig-tty: Free allocated ttyname buffer on deactivate The ttyname buffer for the ledtrig_tty_data struct is allocated in the sysfs ttyname_store() function. This buffer must be released on trigger deactivation. This was missing and is thus a memory leak. While we are at it, the TTY handler in the ledtrig_tty_data struct should also be returned in case of the trigger deactivation call. Cc: stable@vger.kernel.org Fixes: fd4a641ac88f ("leds: trigger: implement a tty trigger") Signed-off-by: Florian Eckert Reviewed-by: Uwe Kleine-König Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20231127081621.774866-1-fe@dev.tdt.de Signed-off-by: Lee Jones commit 736214b4b02adf8734206599e36e2081d47554a2 Author: Patrick Rudolph Date: Thu Nov 23 13:28:02 2023 +0000 leds: max5970: Add support for max5970 The MAX5970 is hot swap controller and has 4 indication LED. Signed-off-by: Patrick Rudolph Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20231123132803.1107174-1-naresh.solanki@9elements.com Signed-off-by: Lee Jones commit 1b5c2fa7081cca586237b97379f478460ec8d702 Author: Andrew Davis Date: Thu Nov 16 16:41:21 2023 -0600 leds: tca6507: Use devm_led_classdev_register() to simplify remove path Use devm version of LED classdev register add function to handle removal. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231116224121.302150-2-afd@ti.com Signed-off-by: Lee Jones commit 130199ec02b2cf16aed5ab0d2553da60df2c794a Author: Andrew Davis Date: Thu Nov 16 16:41:20 2023 -0600 leds: tca6507: Use devm_gpiochip_add_data() to simplify remove path Use devm version of gpiochip add function to handle removal for us. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231116224121.302150-1-afd@ti.com Signed-off-by: Lee Jones commit 804073f542077a8de17494fb3577a49513788a71 Author: Andy Shevchenko Date: Fri Nov 3 21:53:10 2023 +0200 leds: trigger: gpio: Convert to DEVICE_ATTR_RW() Instead of custom wrapper, use DEVICE_ATTR_RW() directly. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231103195310.948327-4-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 7b9c5500f42e92992fe7b012974e0dddb673b1f5 Author: Andy Shevchenko Date: Fri Nov 3 21:53:09 2023 +0200 leds: trigger: gpio: Use sysfs_emit() to instead of s*printf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231103195310.948327-3-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 7d6766f5377686b871ab52c564327718ece233ad Author: Andy Shevchenko Date: Fri Nov 3 21:53:08 2023 +0200 leds: trigger: gpio: Convert to use kstrtox() sscanf() is a heavy one and moreover requires additional boundary checks. Convert driver to use kstrtou8() in gpio_trig_inverted_store(). Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231103195310.948327-2-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 9bbd6b7209cf1e26390975b7617a29901c8990a1 Author: Andy Shevchenko Date: Fri Nov 3 21:53:07 2023 +0200 leds: trigger: gpio: Replace custom code for gpiod_get_optional() gpiod_get_optional() and currently used fwnode_gpiod_get_index() are both wrappers against the same engine internally. Since we have a pointer to struct device there is no reason to use fwnode type of GPIO call. So, replace the current fwnode call by respective gpiod ones. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231103195310.948327-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 75469bb0537ad2ab0fc1fb6e534a79cfc03f3b3f Author: Dang Huynh Date: Fri Nov 3 18:42:03 2023 +0700 leds: aw2013: Select missing dependency REGMAP_I2C The AW2013 driver uses devm_regmap_init_i2c, so REGMAP_I2C needs to be selected. Otherwise build process may fail with: ld: drivers/leds/leds-aw2013.o: in function `aw2013_probe': leds-aw2013.c:345: undefined reference to `__devm_regmap_init_i2c' Signed-off-by: Dang Huynh Acked-by: Nikita Travkin Fixes: 59ea3c9faf32 ("leds: add aw2013 driver") Link: https://lore.kernel.org/r/20231103114203.1108922-1-danct12@riseup.net Signed-off-by: Lee Jones commit ec95a68dad00c81d53ab9aa9bcbdf0a86347e0d9 Author: Samuel Holland Date: Sun Oct 29 16:26:56 2023 -0500 leds: sun50i-a100: New driver for the A100 LED controller Some Allwinner sunxi SoCs, starting with the A100, contain an LED controller designed to drive RGB LED pixels. Add a driver for it using the multicolor LED framework, and with LEDs defined in the device tree. Acked-by: Guo Ren Acked-by: Jernej Skrabec Acked-by: Palmer Dabbelt Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20231029212738.7871-3-samuel@sholland.org Signed-off-by: Lee Jones commit 65dcdf495a79e2b502e58a38588aeea1e92708aa Author: Samuel Holland Date: Sun Oct 29 16:26:55 2023 -0500 dt-bindings: leds: Add Allwinner A100 LED controller The Allwinner A100, R329, and D1 SoCs contain an LED controller designed to drive a series of RGB LED pixels. It supports PIO and DMA transfers, and has configurable timing and pixel format. All three implementations appear to be identical, so use the oldest as the fallback compatible. Acked-by: Guo Ren Acked-by: Maxime Ripard Acked-by: Palmer Dabbelt Reviewed-by: Rob Herring Tested-by: Trevor Woerner Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20231029212738.7871-2-samuel@sholland.org Signed-off-by: Lee Jones commit 1de1da7b07822d290c5ba0f48829c7be1c684c0f Author: Rob Herring Date: Wed Nov 22 13:54:17 2023 -0700 dt-bindings: leds: Fix JSON pointer in max-brightness A valid JSON pointer should begin with a '/'. The json-schema package is lax on this allowing either form, but that's changing in new versions. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231122205418.2482076-1-robh@kernel.org Signed-off-by: Lee Jones commit a82cc9b8debfa3e71098a71bece2a696cc1d9624 Author: Rob Herring Date: Wed Oct 25 14:06:19 2023 -0500 leds: syscon: Support 'reg' in addition to 'offset' for register address The register-bit-led binding now also supports 'reg' in addition to 'offset' for the register address. Add support to the driver to get the address from 'reg'. Signed-off-by: Rob Herring Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231025190619.881090-2-robh@kernel.org Signed-off-by: Lee Jones commit a143892cb77c5397fd4356bbef9982abe4f3c5a5 Author: Aditya Gupta Date: Wed Sep 20 16:27:06 2023 +0530 powerpc: add cpu_spec.cpu_features to vmcoreinfo CPU features can be determined in makedumpfile, using 'cur_cpu_spec.cpu_features'. This provides more data to makedumpfile about the crashed system, and can help in filtering the vmcore accordingly. Signed-off-by: Aditya Gupta Signed-off-by: Michael Ellerman Link: https://msgid.link/20230920105706.853626-2-adityag@linux.ibm.com commit ee8bfb47222a5cc59dee345b7369c5f2068e78cd Author: Daniel Golle Date: Tue Nov 28 04:00:39 2023 +0000 docs: ABI: sysfs-class-led-trigger-netdev: Add new modes and entry Document newly introduced modes for the LED netdev trigger. Add documentation for new modes: - link_2500 - link_5000 - link_10000 Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/e72a6794639cf3881d698e1d34b456e747da1b95.1701143925.git.daniel@makrotopia.org Signed-off-by: Lee Jones commit 59b3e31e73322ec195e45e0a1da712c752ee1b0c Author: Daniel Golle Date: Tue Nov 28 04:00:10 2023 +0000 leds: trigger: netdev: Extend speeds up to 10G Add 2.5G, 5G and 10G as available speeds to the netdev LED trigger. Signed-off-by: Daniel Golle Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/99e7d3304c6bba7f4863a4a80764a869855f2085.1701143925.git.daniel@makrotopia.org Signed-off-by: Lee Jones commit 0a233867a39078ebb0f575e2948593bbff5826b3 Author: Kunwu Chan Date: Sun Nov 26 17:37:19 2023 +0800 powerpc/imc-pmu: Add a null pointer check in update_events_in_group() kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: 885dcd709ba9 ("powerpc/perf: Add nest IMC PMU support") Signed-off-by: Kunwu Chan Signed-off-by: Michael Ellerman Link: https://msgid.link/20231126093719.1440305-1-chentao@kylinos.cn commit e123015c0ba859cf48aa7f89c5016cc6e98e018d Author: Kunwu Chan Date: Sun Nov 26 17:57:39 2023 +0800 powerpc/powernv: Add a null pointer check in opal_powercap_init() kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: b9ef7b4b867f ("powerpc: Convert to using %pOFn instead of device_node.name") Signed-off-by: Kunwu Chan Signed-off-by: Michael Ellerman Link: https://msgid.link/20231126095739.1501990-1-chentao@kylinos.cn commit 8649829a1dd25199bbf557b2621cedb4bf9b3050 Author: Kunwu Chan Date: Mon Nov 27 11:07:55 2023 +0800 powerpc/powernv: Add a null pointer check in opal_event_init() kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: 2717a33d6074 ("powerpc/opal-irqchip: Use interrupt names if present") Signed-off-by: Kunwu Chan Signed-off-by: Michael Ellerman Link: https://msgid.link/20231127030755.1546750-1-chentao@kylinos.cn commit 9a260f2dd827bbc82cc60eb4f4d8c22707d80742 Author: Kunwu Chan Date: Fri Dec 8 16:59:37 2023 +0800 powerpc/powernv: Add a null pointer check to scom_debug_init_one() kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Add a null pointer check, and release 'ent' to avoid memory leaks. Fixes: bfd2f0d49aef ("powerpc/powernv: Get rid of old scom_controller abstraction") Signed-off-by: Kunwu Chan Signed-off-by: Michael Ellerman Link: https://msgid.link/20231208085937.107210-1-chentao@kylinos.cn commit f46c8a75263f97bda13c739ba1c90aced0d3b071 Author: Kunwu Chan Date: Mon Dec 4 10:32:23 2023 +0800 powerpc/mm: Fix null-pointer dereference in pgtable_cache_add kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Suggested-by: Christophe Leroy Suggested-by: Michael Ellerman Signed-off-by: Kunwu Chan Signed-off-by: Michael Ellerman Link: https://msgid.link/20231204023223.2447523-1-chentao@kylinos.cn commit f3263307171e3752039e3f83c5978ba695f669d2 Author: Fabio Estevam Date: Wed Dec 6 12:00:23 2023 -0300 ARM: dts: imx25: Move usbphy nodes out of simple-bus The USB PHY nodes should not be described under 'simple-bus'. Move it out of simple-bus. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 0bc9c2dd3d25c7081bb15333277027252efdf38a Author: Fabio Estevam Date: Wed Dec 6 12:00:22 2023 -0300 ARM: dts: imx1: Use 'bus' for AIPI bus Per simple-bus.yaml, 'aipi' is not a valid node name. Change it to 'bus' to fix the following dt-schema warning: imx1-apf9328.dtb: aipi@200000: $nodename:0: 'aipi@200000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' from schema $id: http://devicetree.org/schemas/simple-bus.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 86051155d89ae13c9523f5af93c7772565483dbe Author: Fabio Estevam Date: Wed Dec 6 12:00:21 2023 -0300 ARM: dts: imx27-phytec-phycore-rdk: Move usbphy nodes out of simple-bus The USB PHY nodes should not be described under 'simple-bus'. Move it out of simple-bus. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 542106cec2cf75af885e21b781f650d59dc71dbc Author: Fabio Estevam Date: Wed Dec 6 12:00:20 2023 -0300 ARM: dts: imx27-pdk: Move usbphy0 out of simple-bus The USB PHY should not be described under 'simple-bus'. Move it out of simple-bus. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit febc9b2fed1bceee0ab5edb831a7ad8c5afb53da Author: Fabio Estevam Date: Wed Dec 6 12:00:19 2023 -0300 ARM: dts: imx27: Use 'bus' for EMI bus Per simple-bus.yaml, 'emi' is not a valid node name. Change it to 'bus' to fix the following dt-schema warning: imx25-pdk.dtb: emi@80000000: $nodename:0: 'emi@80000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' from schema $id: http://devicetree.org/schemas/simple-bus.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit cbe2cc9686aef036278c8fef3fa6ee443ef8548f Author: Fabio Estevam Date: Wed Dec 6 12:00:18 2023 -0300 ARM: dts: imx27: Use 'bus' for AIPI bus Per simple-bus.yaml, 'aipi' is not a valid node name. Change it to 'bus' to fix the following dt-schema warning: imx27-pdk.dtb: aipi@10020000: $nodename:0: 'aipi@10020000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$' from schema $id: http://devicetree.org/schemas/simple-bus.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit b20f98e8b3deb50247603f0242ee2d1e38726635 Author: Sathvika Vasireddy Date: Fri Dec 8 22:00:43 2023 +0530 powerpc/Kconfig: Select FUNCTION_ALIGNMENT_4B Commit d49a0626216b95 ("arch: Introduce CONFIG_FUNCTION_ALIGNMENT") introduced a generic function-alignment infrastructure. Move to using FUNCTION_ALIGNMENT_4B on powerpc, to use the same alignment as that of the existing _GLOBAL macro. Signed-off-by: Sathvika Vasireddy Signed-off-by: Michael Ellerman Link: https://msgid.link/21892186ec44abe24df0daf64f577dac0e78783f.1702045299.git.naveen@kernel.org commit ae24db43b3b427eb290b58d55179c32f0a7539d1 Author: Naveen N Rao Date: Fri Dec 8 22:00:42 2023 +0530 powerpc/ftrace: Remove nops after the call to ftrace_stub ftrace_stub is within the same CU, so there is no need for a subsequent nop instruction. Signed-off-by: Naveen N Rao Signed-off-by: Michael Ellerman Link: https://msgid.link/8ee5ec520e37d5523654bb2cd65a17512fb774e2.1702045299.git.naveen@kernel.org commit 2ec36570c3581285d15de672eaed10ce7e9218cd Author: Naveen N Rao Date: Fri Dec 8 22:00:40 2023 +0530 powerpc/ftrace: Fix indentation in ftrace.h Replace seven spaces with a tab character to fix an indentation issue reported by the kernel test robot. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311221731.alUwTDIm-lkp@intel.com/ Signed-off-by: Naveen N Rao Signed-off-by: Michael Ellerman Link: https://msgid.link/9f058227bd9243f0842786ef7228d87ab10d29f6.1702045299.git.naveen@kernel.org commit 4fadce88cb9fe95cfa7000c4ec041acf47b67447 Author: Hancheng Yang Date: Tue Dec 5 18:06:23 2023 +0100 wifi: ath9k: reset survey of current channel after a scan started In the `ath_set_channel()` function, we only reset surveys that are not from the current channel. This leads to the accumulation of survey data for the current channel indefinitely. This may not be the most optimal approach, as we want the ACS to rely on the most recent survey. So reset the survey data for the current channel at the start of each scan. Signed-off-by: Hancheng Yang Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231205170623.3029689-1-hyang@freebox.fr commit e5bc1f4c6554b464005d52b940630bb4d276137a Author: Furong Xu <0x1207@gmail.com> Date: Mon Dec 11 14:08:28 2023 +0800 net: stmmac: mmc: Support more counters for XGMAC Core Complete all counters on XGMAC Core. These can be useful for debugging. Signed-off-by: Furong Xu <0x1207@gmail.com> Signed-off-by: David S. Miller commit 76b2ec3faeaa0c8d84705acd64ac0e5a307ce9c2 Author: Nathan Lynch Date: Tue Dec 12 11:02:00 2023 -0600 powerpc/selftests: Add test for papr-sysparm Consistently testing system parameter access is a bit difficult by nature -- the set of parameters available depends on the model and system configuration, and updating a parameter should be considered a destructive operation reserved for the admin. So we validate some of the error paths and retrieve the SPLPAR characteristics string, but not much else. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-13-e9eafd0c8c6c@linux.ibm.com commit 9118c5d32bddb5f75bc4f9f31218e70317702502 Author: Nathan Lynch Date: Tue Dec 12 11:01:59 2023 -0600 powerpc/selftests: Add test for papr-vpd Add selftests for /dev/papr-vpd, exercising the common expected use cases: * Retrieve all VPD by passing an empty location code. * Retrieve the "system VPD" by passing a location code derived from DT root node properties, as done by the vpdupdate command. The tests also verify that certain intended properties of the driver hold: * Passing an unterminated location code to PAPR_VPD_CREATE_HANDLE gets EINVAL. * Passing a NULL location code pointer to PAPR_VPD_CREATE_HANDLE gets EFAULT. * Closing the device node without first issuing a PAPR_VPD_CREATE_HANDLE command to it succeeds. * Releasing a handle without first consuming any data from it succeeds. * Re-reading the contents of a handle returns the same data as the first time. Some minimal validation of the returned data is performed. The tests are skipped on systems where the papr-vpd driver does not initialize, making this useful only on PowerVM LPARs at this point. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-12-e9eafd0c8c6c@linux.ibm.com commit 905b9e48786ec55b2c469db77fb46e20bf3e4901 Author: Nathan Lynch Date: Tue Dec 12 11:01:58 2023 -0600 powerpc/pseries/papr-sysparm: Expose character device to user space Until now the papr_sysparm APIs have been kernel-internal. But user space needs access to PAPR system parameters too. The only method available to user space today to get or set system parameters is using sys_rtas() and /dev/mem to pass RTAS-addressable buffers between user space and firmware. This is incompatible with lockdown and should be deprecated. So provide an alternative ABI to user space in the form of a /dev/papr-sysparm character device with just two ioctl commands (get and set). The data payloads involved are small enough to fit in the ioctl argument buffer, making the code relatively simple. Exposing the system parameters through sysfs has been considered but it would be too awkward: * The kernel currently does not have to contain an exhaustive list of defined system parameters. This is a convenient property to maintain because we don't have to update the kernel whenever a new parameter is added to PAPR. Exporting a named attribute in sysfs for each parameter would negate this. * Some system parameters are text-based and some are not. * Retrieval of at least one system parameter requires input data, which a simple read-oriented interface can't support. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-11-e9eafd0c8c6c@linux.ibm.com commit 35aae182bd7b422be3cefc08c12207bf2b973364 Author: Nathan Lynch Date: Tue Dec 12 11:01:57 2023 -0600 powerpc/pseries/papr-sysparm: Validate buffer object lengths The ability to get and set system parameters will be exposed to user space, so let's get a little more strict about malformed papr_sysparm_buf objects. * Create accessors for the length field of struct papr_sysparm_buf. The length is always stored in MSB order and this is better than spreading the necessary conversions all over. * Reject attempts to submit invalid buffers to RTAS. * Warn if RTAS returns a buffer with an invalid length, clamping the returned length to a safe value that won't overrun the buffer. These are meant as precautionary measures to mitigate both firmware and kernel bugs in this area, should they arise, but I am not aware of any. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-10-e9eafd0c8c6c@linux.ibm.com commit 514f6ff4369a30bf0da71a1a09fd47b2fca5d76f Author: Nathan Lynch Date: Tue Dec 12 11:01:56 2023 -0600 powerpc/pseries: Add papr-vpd character driver for VPD retrieval PowerVM LPARs may retrieve Vital Product Data (VPD) for system components using the ibm,get-vpd RTAS function. We can expose this to user space with a /dev/papr-vpd character device, where the programming model is: struct papr_location_code plc = { .str = "", }; /* obtain all VPD */ int devfd = open("/dev/papr-vpd", O_RDONLY); int vpdfd = ioctl(devfd, PAPR_VPD_CREATE_HANDLE, &plc); size_t size = lseek(vpdfd, 0, SEEK_END); char *buf = malloc(size); pread(devfd, buf, size, 0); When a file descriptor is obtained from ioctl(PAPR_VPD_CREATE_HANDLE), the file contains the result of a complete ibm,get-vpd sequence. The file contents are immutable from the POV of user space. To get a new view of the VPD, the client must create a new handle. This design choice insulates user space from most of the complexities that ibm,get-vpd brings: * ibm,get-vpd must be called more than once to obtain complete results. * Only one ibm,get-vpd call sequence should be in progress at a time; interleaved sequences will disrupt each other. Callers must have a protocol for serializing their use of the function. * A call sequence in progress may receive a "VPD changed, try again" status, requiring the client to abandon the sequence and start over. The memory required for the VPD buffers seems acceptable, around 20KB for all VPD on one of my systems. And the value of the /rtas/ibm,vpd-size DT property (the estimated maximum size of VPD) is consistently 300KB across various systems I've checked. I've implemented support for this new ABI in the rtas_get_vpd() function in librtas, which the vpdupdate command currently uses to populate its VPD database. I've verified that an unmodified vpdupdate binary generates an identical database when using a librtas.so that prefers the new ABI. Along with the papr-vpd.h header exposed to user space, this introduces a common papr-miscdev.h uapi header to share a base ioctl ID with similar drivers to come. Tested-by: Michal Suchánek Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-9-e9eafd0c8c6c@linux.ibm.com commit e3681107bc9f97c5948a1c8a3a97ac64907210ce Author: Nathan Lynch Date: Tue Dec 12 11:01:55 2023 -0600 powerpc/rtas: Warn if per-function lock isn't held If the function descriptor has a populated lock member, then callers are required to hold it across calls. Now that the firmware activation sequence is appropriately guarded, we can warn when the requirement isn't satisfied. __do_enter_rtas_trace() gets reorganized a bit as a result of performing the function descriptor lookup unconditionally now. Reviewed-by: "Aneesh Kumar K.V (IBM)" Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-8-e9eafd0c8c6c@linux.ibm.com commit dc7637c402b90a197d3f21a3d78f2b00b67ea22a Author: Nathan Lynch Date: Tue Dec 12 11:01:54 2023 -0600 powerpc/rtas: Serialize firmware activation sequences Use rtas_ibm_activate_firmware_lock to prevent interleaving call sequences of the ibm,activate-firmware RTAS function, which typically requires multiple calls to complete the update. While the spec does not specifically prohibit interleaved sequences, there's almost certainly no advantage to allowing them. Reviewed-by: "Aneesh Kumar K.V (IBM)" Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-7-e9eafd0c8c6c@linux.ibm.com commit adf7a019e5f82607fc0f0079926d0178afe8f4ef Author: Nathan Lynch Date: Tue Dec 12 11:01:53 2023 -0600 powerpc/rtas: Facilitate high-level call sequences On RTAS platforms there is a general restriction that the OS must not enter RTAS on more than one CPU at a time. This low-level serialization requirement is satisfied by holding a spin lock (rtas_lock) across most RTAS function invocations. However, some pseries RTAS functions require multiple successive calls to complete a logical operation. Beginning a new call sequence for such a function may disrupt any other sequences of that function already in progress. Safe and reliable use of these functions effectively requires higher-level serialization beyond what is already done at the level of RTAS entry and exit. Where a sequence-based RTAS function is invoked only through sys_rtas(), with no in-kernel users, there is no issue as far as the kernel is concerned. User space is responsible for appropriately serializing its call sequences. (Whether user space code actually takes measures to prevent sequence interleaving is another matter.) Examples of such functions currently include ibm,platform-dump and ibm,get-vpd. But where a sequence-based RTAS function has both user space and in-kernel uesrs, there is a hazard. Even if the in-kernel call sites of such a function serialize their sequences correctly, a user of sys_rtas() can invoke the same function at any time, potentially disrupting a sequence in progress. So in order to prevent disruption of kernel-based RTAS call sequences, they must serialize not only with themselves but also with sys_rtas() users, somehow. Preferably without adding more function-specific hacks to sys_rtas(). This is a prerequisite for adding an in-kernel call sequence of ibm,get-vpd, which is in a change to follow. Note that it has never been feasible for the kernel to prevent sys_rtas()-based sequences from being disrupted because control returns to user space on every call. sys_rtas()-based users of these functions have always been, and continue to be, responsible for coordinating their call sequences with other users, even those which may invoke the RTAS functions through less direct means than sys_rtas(). This is an unavoidable consequence of exposing sequence-based RTAS functions through sys_rtas(). * Add an optional mutex member to struct rtas_function. * Statically define a mutex for each RTAS function with known call sequence serialization requirements, and assign its address to the .lock member of the corresponding function table entry, along with justifying commentary. * In sys_rtas(), if the table entry for the RTAS function being called has a populated lock member, acquire it before taking rtas_lock and entering RTAS. * Kernel-based RTAS call sequences are expected to access the appropriate mutex explicitly by name. For example, a user of the ibm,activate-firmware RTAS function would do: int token = rtas_function_token(RTAS_FN_IBM_ACTIVATE_FIRMWARE); int fwrc; mutex_lock(&rtas_ibm_activate_firmware_lock); do { fwrc = rtas_call(token, 0, 1, NULL); } while (rtas_busy_delay(fwrc)); mutex_unlock(&rtas_ibm_activate_firmware_lock); There should be no perceivable change introduced here except that concurrent callers of the same RTAS function via sys_rtas() may block on a mutex instead of spinning on rtas_lock. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-6-e9eafd0c8c6c@linux.ibm.com commit e7582edb78619abb4ebf0a6e1fed125dcd7243b6 Author: Nathan Lynch Date: Tue Dec 12 11:01:52 2023 -0600 powerpc/rtas: Move token validation from block_rtas_call() to sys_rtas() The rtas system call handler sys_rtas() delegates certain input validation steps to a helper function: block_rtas_call(). One of these steps ensures that the user-supplied token value maps to a known RTAS function. This is done by performing a "reverse" token-to-function lookup via rtas_token_to_function_untrusted() to obtain an rtas_function object. In changes to come, sys_rtas() itself will need the function descriptor for the token. To prepare: * Move the lookup and validation up into sys_rtas() and pass the resulting rtas_function pointer to block_rtas_call(), which is otherwise unconcerned with the token value. * Change block_rtas_call() to report the RTAS function name instead of the token value on validation failures, since it can now rely on having a valid function descriptor. One behavior change is that sys_rtas() now silently errors out when passed a bad token, before calling block_rtas_call(). So we will no longer log "RTAS call blocked - exploit attempt?" on invalid tokens. This is consistent with how sys_rtas() currently handles other "metadata" (nargs and nret), while block_rtas_call() is primarily concerned with validating the arguments to be passed to specific RTAS functions. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-5-e9eafd0c8c6c@linux.ibm.com commit 9592aa5ad59e736727fe7894e6e820e2d851abcf Author: Nathan Lynch Date: Tue Dec 12 11:01:51 2023 -0600 powerpc/rtas: Add function return status constants Not all of the generic RTAS function statuses specified in PAPR have symbolic constants and descriptions in rtas.h. Fix this, providing a little more background, slightly updating the existing wording, and improving the formatting. Reviewed-by: "Aneesh Kumar K.V (IBM)" Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-4-e9eafd0c8c6c@linux.ibm.com commit 669acc7eec223a81ea5e2420de85b61979ab7dad Author: Nathan Lynch Date: Tue Dec 12 11:01:50 2023 -0600 powerpc/rtas: Fall back to linear search on failed token->function lookup Enabling any of the powerpc:rtas_* tracepoints at boot is likely to result in an oops on RTAS platforms. For example, booting a QEMU pseries model with 'trace_event=powerpc:rtas_input' in the command line leads to: BUG: Kernel NULL pointer dereference on read at 0x00000008 Oops: Kernel access of bad area, sig: 7 [#1] NIP [c00000000004231c] do_enter_rtas+0x1bc/0x460 LR [c00000000004231c] do_enter_rtas+0x1bc/0x460 Call Trace: do_enter_rtas+0x1bc/0x460 (unreliable) rtas_call+0x22c/0x4a0 rtas_get_boot_time+0x80/0x14c read_persistent_clock64+0x124/0x150 read_persistent_wall_and_boot_offset+0x28/0x58 timekeeping_init+0x70/0x348 start_kernel+0xa0c/0xc1c start_here_common+0x1c/0x20 (This is preceded by a warning for the failed lookup in rtas_token_to_function().) This happens when __do_enter_rtas_trace() attempts a token to function descriptor lookup before the xarray containing the mappings has been set up. Fall back to linear scan of the table if rtas_token_to_function_xarray is empty. Fixes: 24098f580e2b ("powerpc/rtas: add tracepoints around RTAS entry") Reviewed-by: "Aneesh Kumar K.V (IBM)" Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-3-e9eafd0c8c6c@linux.ibm.com commit c500c6e736df030f8956080738f59701c0b43dd8 Author: Nathan Lynch Date: Tue Dec 12 11:01:49 2023 -0600 powerpc/rtas: Add for_each_rtas_function() iterator Add a convenience macro for iterating over every element of the internal function table and convert the one site that can use it. An additional user of the macro is anticipated in changes to follow. Reviewed-by: "Aneesh Kumar K.V (IBM)" Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-2-e9eafd0c8c6c@linux.ibm.com commit 01e346ffefda3a7088afebf02b940614179688e7 Author: Nathan Lynch Date: Tue Dec 12 11:01:48 2023 -0600 powerpc/rtas: Avoid warning on invalid token argument to sys_rtas() rtas_token_to_function() WARNs when passed an invalid token; it's meant to catch bugs in kernel-based users of RTAS functions. However, user space controls the token value passed to rtas_token_to_function() by block_rtas_call(), so user space with sufficient privilege to use sys_rtas() can trigger the warnings at will: unexpected failed lookup for token 2048 WARNING: CPU: 20 PID: 2247 at arch/powerpc/kernel/rtas.c:556 rtas_token_to_function+0xfc/0x110 ... NIP rtas_token_to_function+0xfc/0x110 LR rtas_token_to_function+0xf8/0x110 Call Trace: rtas_token_to_function+0xf8/0x110 (unreliable) sys_rtas+0x188/0x880 system_call_exception+0x268/0x530 system_call_common+0x160/0x2c4 It's desirable to continue warning on bogus tokens in rtas_token_to_function(). Currently it is used to look up RTAS function descriptors when tracing, where we know there has to have been a successful descriptor lookup by different means already, and it would be a serious inconsistency for the reverse lookup to fail. So instead of weakening rtas_token_to_function()'s contract by removing the warnings, introduce rtas_token_to_function_untrusted(), which has no opinion on failed lookups. Convert block_rtas_call() and rtas_token_to_function() to use it. Fixes: 8252b88294d2 ("powerpc/rtas: improve function information lookups") Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-1-e9eafd0c8c6c@linux.ibm.com commit 83691d6fa7897e2a8858ff1b9c9a0e5092c8783e Merge: 4f7aa122bc921 ef9df47b449e3 Author: David S. Miller Date: Wed Dec 13 10:34:28 2023 +0000 Merge branch 'net-at803x-cleanups' Christian Marangi says: ==================== net: phy: at803x: cleanup The intention of this big series is to try to cleanup the big at803x PHY driver. It currently have 3 different family of PHY in it. at803x, qca83xx and qca808x. The current codebase required lots of cleanup and reworking to make the split possible as currently there is a greater use of adding special function matching the phy_id. This has been reworked to make the function actually generic and make the change only in more specific one. The result is the addition of micro additional function but that is for good as it massively simplify splitting the driver later. Consider that this is all in preparation for the addition of qca807x PHY driver that will also uso some of the functions of at803x. Subsequent series will come with the actual PHY split and other required cleanup. This is only to start the process with minor changes. Changes v4: - Improve at8031_probe function Changes v3: - Add Reviewed-by tag from Andrew - Split patch 10 (at8031 rename) to rename and move Changes v2: - Drop split part due to series too big - Split changes even more - Fix problem pointed out by Russell (flawed reworked function logic) - Add Reviewed-by tag from Andrew - Minor rework to prevent further code duplication for cdt ==================== Signed-off-by: David S. Miller commit ef9df47b449e32e06501a11272809be49019bdb6 Author: Christian Marangi Date: Fri Dec 8 15:52:00 2023 +0100 net: phy: at803x: drop specific PHY ID check from cable test functions Drop specific PHY ID check for cable test functions for at803x. This is done to make functions more generic. While at it better describe what the functions does by using more symbolic function names. PHYs that requires to set additional reg are moved to specific function calling the more generic one. cdt_start and cdt_wait_for_completion are changed to take an additional arg to pass specific values specific to the PHY. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 21a2802a8365cfa82cc02187c1f95136d85592ad Author: Christian Marangi Date: Fri Dec 8 15:51:59 2023 +0100 net: phy: at803x: move at8035 specific DT parse to dedicated probe Move at8035 specific DT parse for clock out frequency to dedicated probe to make at803x probe function more generic. This is to tidy code and no behaviour change are intended. Detection logic is changed, we check if the clk 25m mask is set and if it's not zero, we assume the qca,clk-out-frequency property is set. The property is checked in the generic at803x_parse_dt called by at803x_probe. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f932a6dc8bae0dae9645b5b1b4c65aed8a8acb2a Author: Christian Marangi Date: Fri Dec 8 15:51:58 2023 +0100 net: phy: at803x: move at8031 functions in dedicated section Move at8031 functions in dedicated section with dedicated at8031 parse_dt and probe. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit a5ab9d8e7ae0da8328ac1637a9755311508dc8ab Author: Christian Marangi Date: Fri Dec 8 15:51:57 2023 +0100 net: phy: at803x: make at8031 related DT functions name more specific Rename at8031 related DT function name to a more specific name referencing they are only related to at8031 and not to the generic at803x PHY family. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 30dd62191d3dd97c08f7f9dc9ce77ffab457e4fb Author: Christian Marangi Date: Fri Dec 8 15:51:56 2023 +0100 net: phy: at803x: move specific at8031 config_intr to dedicated function Move specific at8031 config_intr bits to dedicated function to make at803x_config_initr more generic. This is needed in preparation for PHY driver split as qca8081 share the same function to setup interrupts. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 27b89c9dc1b0393090d68d651b82f30ad2696baa Author: Christian Marangi Date: Fri Dec 8 15:51:55 2023 +0100 net: phy: at803x: move specific at8031 WOL bits to dedicated function Move specific at8031 WOL enable/disable to dedicated function to make at803x_set_wol more generic. This is needed in preparation for PHY driver split as qca8081 share the same function to toggle WOL settings. In this new implementation WOL module in at8031 is enabled after the generic interrupt is setup. This should not cause any problem as the WOL_INT has a separate implementation and only relay on MAC bits. Signed-off-by: Christian Marangi Signed-off-by: David S. Miller commit 3ae3bc426eaf57ca8f53d75777d9a5ef779bc7b7 Author: Christian Marangi Date: Fri Dec 8 15:51:54 2023 +0100 net: phy: at803x: move specific at8031 config_init to dedicated function Move specific at8031 config_init to dedicated function to make at803x_config_init more generic and tidy things up. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 25d2ba94005fac18fe68878cddff59a67e115554 Author: Christian Marangi Date: Fri Dec 8 15:51:53 2023 +0100 net: phy: at803x: move specific at8031 probe mode check to dedicated probe Move specific at8031 probe mode check to dedicated probe to make at803x_probe more generic and keep code tidy. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 900eef75cc5018e149c52fe305c9c3fe424c52a7 Author: Christian Marangi Date: Fri Dec 8 15:51:52 2023 +0100 net: phy: at803x: move specific DT option for at8031 to specific probe Move specific DT options for at8031 to specific probe to tidy things up and make at803x_parse_dt more generic. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d43cff3f82336c0bd965ea552232d9f4ddac71a6 Author: Christian Marangi Date: Fri Dec 8 15:51:51 2023 +0100 net: phy: at803x: move qca83xx specific check in dedicated functions Rework qca83xx specific check to dedicated function to tidy things up and drop useless phy_id check. Also drop an useless link_change_notify for QCA8337 as it did nothing an returned early. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 07b1ad83b9ed6db1735ba10baf67b7a565ac0cef Author: Christian Marangi Date: Fri Dec 8 15:51:50 2023 +0100 net: phy: at803x: raname hw_stats functions to qca83xx specific name The function and the struct related to hw_stats were specific to qca83xx PHY but were called following the convention in the driver of calling everything with at803x prefix. To better organize the code, rename these function a more specific name to better describe that they are specific to 83xx PHY family. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6a3b8c573b5a152a6aa7a0b54c5e18b84c6ba6f5 Author: Christian Marangi Date: Fri Dec 8 15:51:49 2023 +0100 net: phy: at803x: move disable WOL to specific at8031 probe Move the WOL disable call to specific at8031 probe to make at803x_probe more generic and drop extra check for PHY ID. Keep the same previous behaviour by first calling at803x_probe and then disabling WOL. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f8fdbf3389f44c7026f16e36cb1f2ff017f7f5b2 Author: Christian Marangi Date: Fri Dec 8 15:51:48 2023 +0100 net: phy: at803x: fix passing the wrong reference for config_intr Fix passing the wrong reference for config_initr on passing the function pointer, drop the wrong & from at803x_config_intr in the PHY struct. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4f7aa122bc9219baca0bfface5917062d6c45ee8 Author: Jiri Pirko Date: Thu Dec 7 16:12:04 2023 +0100 dpll: remove leftover mode_supported() op and use mode_get() instead Mode supported is currently reported to the user exactly the same, as the current mode. That's because mode changing is not implemented. Remove the leftover mode_supported() op and use mode_get() to fill up the supported mode exposed to user. One, if even, mode changing is going to be introduced, this could be very easily taken back. In the meantime, prevent drivers form implementing this in wrong way (as for example recent netdevsim implementation attempt intended to do). Signed-off-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 05ce71929efc79f5978589e0456a54eb0fe6485e Author: Ulf Hansson Date: Mon Nov 27 16:19:31 2023 +0100 PM: domains: Drop the unused pm_genpd_opp_to_performance_state() Since commit 7c41cdcd3bbe ("OPP: Simplify the over-designed pstate <-> level dance"), there is no longer any users of the pm_genpd_opp_to_performance_state() API. Let's therefore drop it and its corresponding ->opp_to_performance_state() callback, which also no longer has any users. Signed-off-by: Ulf Hansson Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20231127151931.47055-1-ulf.hansson@linaro.org commit ac3420d3d428443a08b923f9118121c170192b62 Author: Karthik Poosa Date: Mon Dec 4 20:18:09 2023 +0530 drm/i915/hwmon: Fix static analysis tool reported issues Updated i915 hwmon with fixes for issues reported by static analysis tool. Fixed integer overflow with upcasting. v2: - Added Fixes tag (Badal). - Updated commit message as per review comments (Anshuman). Fixes: 4c2572fe0ae7 ("drm/i915/hwmon: Expose power1_max_interval") Reviewed-by: Badal Nilawar Reviewed-by: Anshuman Gupta Signed-off-by: Karthik Poosa Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20231204144809.1518704-1-karthik.poosa@intel.com commit 3b2714c5d2d26d12b759f7cee9a802a9c8c33936 Author: Randy Dunlap Date: Tue Dec 5 14:58:56 2023 -0800 PM: domains: fix domain_governor kernel-doc warnings Fix kernel-doc warnings found when using "W=1". domain_governor.c:54: warning: No description found for return value of 'default_suspend_ok' domain_governor.c:266: warning: No description found for return value of '_default_power_down_ok' domain_governor.c:412: warning: cannot understand function prototype: 'struct dev_power_governor pm_domain_always_on_gov = ' Signed-off-by: Randy Dunlap Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20231205225856.32739-1-rdunlap@infradead.org Signed-off-by: Ulf Hansson commit 070b71f428facd9130319707db854ed8bd24637a Author: Kajol Jain Date: Thu Nov 16 17:50:32 2023 +0530 powerpc/hv-gpci: Add return value check in affinity_domain_via_partition_show function To access hv-gpci kernel interface files data, the "Enable Performance Information Collection" option has to be set in hmc. Incase that option is not set and user try to read the interface files, it should give error message as operation not permitted. Result of accessing added interface files with disabled performance collection option: [command]# cat processor_bus_topology cat: processor_bus_topology: Operation not permitted [command]# cat processor_config cat: processor_config: Operation not permitted [command]# cat affinity_domain_via_domain cat: affinity_domain_via_domain: Operation not permitted [command]# cat affinity_domain_via_virtual_processor cat: affinity_domain_via_virtual_processor: Operation not permitted [command]# cat affinity_domain_via_partition Based on above result there is no error message when reading affinity_domain_via_partition file because of missing check for failed hcall. Fix this issue by adding a check in the start of affinity_domain_via_partition_show function, to return error incase hcall fails, with error type other then H_PARAMETER. Fixes: a15e0d6a6929 ("powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show affinity domain via partition information") Reported-by: Disha Goel Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://msgid.link/20231116122033.160964-1-kjain@linux.ibm.com commit 09b4195021be69af1e1936cca995712a6d0f2562 Author: Su Hui Date: Fri Oct 20 17:17:23 2023 +0800 media: ddbridge: fix an error code problem in ddb_probe Error code is assigned to 'stat', return 'stat' rather than '-1'. Signed-off-by: Su Hui Signed-off-by: Hans Verkuil commit 5b2f885e2f6f482d05c23f04c8240f7b4fc5bdb5 Author: Christophe JAILLET Date: Mon Oct 30 08:20:26 2023 +0100 media: dvb-frontends: m88ds3103: Fix a memory leak in an error handling path of m88ds3103_probe() If an error occurs after a successful i2c_mux_add_adapter(), then i2c_mux_del_adapters() should be called to free some resources, as already done in the remove function. Fixes: e6089feca460 ("media: m88ds3103: Add support for ds3103b demod") Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil commit a2dd235df435a05d389240be748909ada91201d2 Author: Dan Carpenter Date: Tue Oct 31 12:53:33 2023 +0300 media: dvbdev: drop refcount on error path in dvb_device_open() If call to file->f_op->open() fails, then call dvb_device_put(dvbdev). Fixes: 0fc044b2b5e2 ("media: dvbdev: adopts refcnt to avoid UAF") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil commit d8b45ee43a0562867d4fbe196e7747226c0a3d13 Author: Su Hui Date: Wed Nov 15 16:57:54 2023 +0800 media: platform: exynos4-is: return callee's error code rather than -ENXIO Clang static analyzer complains that value stored to 'ret' is never read. Return the callee's error code to fix this. Signed-off-by: Su Hui Signed-off-by: Hans Verkuil commit 20a4ecc7860ae65e2327524d826c152b6d4f79c0 Author: Niklas Söderlund Date: Wed Nov 15 17:41:27 2023 +0100 MAINTAINERS: Add missing bindings for max96712 Add the binding documentation to the entry in the MAINTAINERS file. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil commit 918b14a26b12c3959f58997f9557d350fec33bf1 Author: Mehdi Djait Date: Thu Nov 30 18:46:47 2023 +0100 media: i2c: Introduce a driver for the Techwell TW9900 decoder The Techwell video decoder supports PAL, NTSC standards and has a parallel BT.656 output interface. This commit adds support for this device, with basic support for NTSC and PAL, along with brightness and contrast controls. The TW9900 is capable of automatic standard detection. This driver is implemented with support for PAL and NTSC autodetection. Reviewed-by: Paul Kocialkowski Signed-off-by: Mehdi Djait Signed-off-by: Hans Verkuil commit 0f82ffa9a295601e76c48c67f2295aa19a7899d4 Author: Mehdi Djait Date: Thu Nov 30 18:46:46 2023 +0100 media: dt-bindings: media: i2c: Add bindings for TW9900 The Techwell TW9900 is a video decoder supporting multiple input standards such as PAL and NTSC and has a parallel BT.656 output interface. It's designed to be low-power, posesses some features such as a programmable comb-filter, and automatic input standard detection Reviewed-by: Paul Kocialkowski Reviewed-by: Rob Herring Signed-off-by: Mehdi Djait Signed-off-by: Hans Verkuil commit 7b9df4ac0d7d9759d750304bf28540b2af2f8ba4 Author: Mehdi Djait Date: Thu Nov 30 18:46:45 2023 +0100 dt-bindings: vendor-prefixes: Add techwell vendor prefix Add prefix for Techwell, Inc. Acked-by: Krzysztof Kozlowski Signed-off-by: Mehdi Djait Signed-off-by: Hans Verkuil commit f9c8ddce2fe3b767582f299d03fc8fb85943568c Author: Ming Qian Date: Fri Dec 8 15:33:42 2023 +0800 media: amphion: remove mutext lock in condition of wait_event mutext_lock should not be called in condition of wait_event, otherwise, when CONFIG_DEBUG_ATOMIC_SLEEP is enabled, we may meet the following warning: do not call blocking ops when !TASK_RUNNING; state=2 WARNING: CPU: 5 PID: 741 at kernel/sched/core.c:9859 __might_sleep+0x80/0xa4 Hardware name: Freescale i.MX8QM MEK (DT) pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __might_sleep+0x80/0xa4 lr : __might_sleep+0x80/0xa4 sp : ffffffc0123738a0 x29: ffffffc0123738a0 x28: ffffffc009194c48 x27: ffffffc00bbc1050 x26: ffffff8814b282f0 x25: ffffff8814b280d0 x24: ffffff8814b28080 x23: 0000000000000001 x22: 0000000000000032 x21: ffffffc00bbc1000 x20: 000000000000011b x19: ffffffc009324670 x18: 00000000fffffffd x17: 30303c5b20746120 x16: 74657320323d6574 x15: 617473203b474e49 x14: 00058b5b8b9aa1f1 x13: ffffffc00903cda0 x12: 00000000d744fcc9 x11: 000000000000001c x10: 00000000000009a0 x9 : ffffffc0090201f4 x8 : ffffff8828245000 x7 : 0000000000000001 x6 : 0000000000000001 x5 : 00000000410fd080 x4 : 0000000000000002 x3 : ffffff8815aab4c8 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffff8828244600 Call trace: __might_sleep+0x80/0xa4 mutex_lock+0x2c/0x80 sync_session_response+0x110/0x310 vpu_session_send_cmd+0x18c/0x244 vpu_session_start+0x38/0x70 vdec_start_session+0x1b4/0x3e0 vpu_vb2_start_streaming+0xa0/0x1c4 vb2_start_streaming+0x74/0x160 vb2_core_qbuf+0x488/0x650 vb2_qbuf+0x9c/0x100 v4l2_m2m_qbuf+0x7c/0x224 v4l2_m2m_ioctl_qbuf+0x20/0x2c v4l_qbuf+0x50/0x6c __video_do_ioctl+0x174/0x3f0 video_usercopy+0x210/0x7cc video_ioctl2+0x20/0x30 v4l2_ioctl+0x48/0x6c we need to refine check_is_responsed() to remove the mutext_lock, each cmd has a monotonically increasing id, and cmds are executed sequentially, so we can check the id of the last reponsed cmd, then determine whether a command has been responded or not. Signed-off-by: Ming Qian CC: Xiaolei Wang Signed-off-by: Hans Verkuil commit eb183b2cd0a6549992eca3c4ada0b1bc1d9340f5 Author: Will Deacon Date: Wed Dec 13 09:47:52 2023 +0000 Revert "perf/arm_dmc620: Remove duplicate format attribute #defines" This reverts commit a5f4ca68f348ac059efd6a3d7ad4040aed1c0818. Pulling in the Arm-specific 'linux/perf/arm_pmu.h' header breaks the allmodconfig build for x86: > In file included from drivers/perf/arm_dmc620_pmu.c:26: > include/linux/perf/arm_pmu.h:15:10: fatal error: asm/cputype.h: No such file or directory > 15 | #include > | ^~~~~~~~~~~~~~~ Just put things back like they were so that the driver can continue to be compile-tested on a variety of architectures. Link: https://lore.kernel.org/r/20231213100931.12d9d85e@canb.auug.org.au Reported-by: Stephen Rothwell Signed-off-by: Will Deacon commit 04b77e0124eff723de580e97ba9000fae563b2e4 Author: Gregor Herburger Date: Wed Dec 6 15:01:02 2023 +0100 arm64: dts: freescale: add fsl-lx2160a-mblx2160a board Add the different serdes configurations as overlays. Signed-off-by: Gregor Herburger Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo commit bb65de5becfe9ce5d11a2d99647ee817d51b0213 Author: Gregor Herburger Date: Wed Dec 6 15:01:01 2023 +0100 dt-bindings: arm: fsl: Add TQ-Systems LX2160A based boards TQMLX2160A is a TQ-Systems GmbH SoM using the LX2160A SoC. MBLX2160a is the starterkit baseboard for TQMLX2160A. Signed-off-by: Gregor Herburger Acked-by: Conor Dooley Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo commit 28990f17a8df7e112c685a9eb874912a5073b358 Author: Fabio Estevam Date: Wed Dec 6 09:45:29 2023 -0300 ARM: dts: imx27-phytec-phycore-som: Use the mux- prefix According to Documentation/devicetree/bindings/sound/imx-audmux.yaml, there must be a "mux-" prefix in the audmux port nodes. Add the "mux-" prefix to avoid the following dt-schema warning: imx27-phytec-phycore-rdk.dtb: audmux@10016000: 'pins4', 'ssi0' do not match any of the regexes: '^mux-[0-9a-z]*$', 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/sound/imx-audmux.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit c248e535973088ba7071ff6f26ab7951143450af Author: Fabio Estevam Date: Wed Dec 6 09:39:21 2023 -0300 ARM: dts: imx1: Fix sram node Per sram.yaml, address-cells, size-cells and ranges are mandatory. The node name should be sram. Change the node name and pass the required properties to fix the following dt-schema warnings: imx1-apf9328.dtb: esram@300000: $nodename:0: 'esram@300000' does not match '^sram(@.*)?' from schema $id: http://devicetree.org/schemas/sram/sram.yaml# imx1-apf9328.dtb: esram@300000: '#address-cells' is a required property from schema $id: http://devicetree.org/schemas/sram/sram.yaml# imx1-apf9328.dtb: esram@300000: '#size-cells' is a required property from schema $id: http://devicetree.org/schemas/sram/sram.yaml# imx1-apf9328.dtb: esram@300000: 'ranges' is a required property from schema $id: http://devicetree.org/schemas/sram/sram.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 2fb7b2a2f06bb3f8321cf26c33e4e820c5b238b6 Author: Fabio Estevam Date: Wed Dec 6 09:39:20 2023 -0300 ARM: dts: imx27: Fix sram node Per sram.yaml, address-cells, size-cells and ranges are mandatory. Pass them to fix the following dt-schema warnings: Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 1e1d7cc478fb16816de09740e3c323c0c188d58f Author: Fabio Estevam Date: Wed Dec 6 09:36:05 2023 -0300 ARM: dts: imx: Use flash@0,0 pattern Per mtd-physmap.yaml, 'nor@0,0' is not a valid node pattern. Change it to 'flash@0,0' to fix the following dt-schema warning: imx1-ads.dtb: nor@0,0: $nodename:0: 'nor@0,0' does not match '^(flash|.*sram|nand)(@.*)?$' from schema $id: http://devicetree.org/schemas/mtd/mtd-physmap.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 68c711b882c262e36895547cddea2c2d56ce611d Author: Fabio Estevam Date: Wed Dec 6 08:58:26 2023 -0300 ARM: dts: imx25/27-eukrea: Fix RTC node name Node names should be generic. Use 'rtc' as node name to fix the following dt-schema warning: imx25-eukrea-mbimxsd25-baseboard.dtb: pcf8563@51: $nodename:0: 'pcf8563@51' does not match '^rtc(@.*|-([0-9]|[1-9][0-9]+))?$' from schema $id: http://devicetree.org/schemas/rtc/nxp,pcf8563.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit a3027a58c6c76cb39bd63fdeab289c597af06402 Author: Fabio Estevam Date: Wed Dec 6 08:58:25 2023 -0300 ARM: dts: imx25-pdk: Pass #sound-dai-cells Per sgtl5000.yaml, '#sound-dai-cells' is a required property. Pass it to fix the following dt-schema warning: imx25-pdk.dtb: sgtl5000@a: '#sound-dai-cells' is a required property from schema $id: http://devicetree.org/schemas/sound/sgtl5000.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 5fe9490a6ed441c140413fb55e50fa0526d4fcc3 Author: Fabio Estevam Date: Wed Dec 6 08:58:24 2023 -0300 ARM: dts: imx25: Pass I2C clock-names property Per i2c-imx.yaml, 'clock-names' is a required property. Pass it to fix the following dt-schema warning: imx25-pdk.dtb: i2c@43f80000: clock-names:0: 'ipg' was expected from schema $id: http://devicetree.org/schemas/i2c/i2c-imx.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 1ddeeac2dffdf77890fb040bd016d2a158b0ff99 Author: Randy Dunlap Date: Wed Dec 6 12:48:36 2023 -0800 media: chips-media: wave5: Requires GENERIC_ALLOCATOR This driver uses the API that is provided by GENERIC_ALLOCATOR API, so select it to prevent build errors: riscv32-linux-ld: drivers/media/platform/chips-media/wave5/wave5-vpu.o: in function `.L37': wave5-vpu.c:(.text+0x468): undefined reference to `of_gen_pool_get' riscv32-linux-ld: drivers/media/platform/chips-media/wave5/wave5-vdi.o: in function `.L116': wave5-vdi.c:(.text+0xaac): undefined reference to `gen_pool_dma_alloc' riscv32-linux-ld: drivers/media/platform/chips-media/wave5/wave5-vdi.o: in function `wave5_vdi_free_sram': wave5-vdi.c:(.text+0xb60): undefined reference to `gen_pool_free_owner' Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer") Signed-off-by: Randy Dunlap Cc: Nas Chung Cc: Jackson Lee Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 4e4103d6f3e99e5f056cbdf94dc1948e8de8ad1a Author: Mattijs Korpershoek Date: Wed Nov 29 11:37:40 2023 +0100 media: chips-media: wave5: Fix panic on decoding DECODED_IDX_FLAG_SKIP The display frame region information received from the vpu also contains the frame display index: info->index_frame_display. This index, being a s32, can be negative when a skip option is passed. In that case, its value is DECODED_IDX_FLAG_SKIP (-2). When disp_idx == -2, the following exception occurs: [ 1530.782246][ T1900] Hardware name: Texas Instruments AM62P5 SK (DT) [ 1530.788501][ T1900] pstate: a0400005 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 1530.796144][ T1900] pc : wave5_vpu_dec_get_output_info+0x300/0x308 [wave5] [ 1530.803060][ T1900] lr : wave5_vpu_dec_get_output_info+0x80/0x308 [wave5] [ 1530.809873][ T1900] sp : ffffffc00b85bc00 [ 1530.813872][ T1900] x29: ffffffc00b85bc00 x28: 0000000000000000 x27: 0000000000000001 [ 1530.821695][ T1900] x26: 00000000fffffffd x25: 00000000ffffffff x24: ffffff8812820000 [ 1530.829516][ T1900] x23: ffffff88199f7840 x22: ffffff8873f5e000 x21: ffffffc00b85bc58 [ 1530.837336][ T1900] x20: 0000000000000000 x19: ffffff88199f7920 x18: ffffffc00a899030 [ 1530.845156][ T1900] x17: 00000000529c6ef0 x16: 00000000529c6ef0 x15: 0000000000198487 [ 1530.852975][ T1900] x14: ffffffc009f2b650 x13: 0000000000058016 x12: 0000000005000000 [ 1530.860795][ T1900] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 [ 1530.868615][ T1900] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000004086 [ 1530.876434][ T1900] x5 : 0000000000000001 x4 : ffffffc001454b94 x3 : ffffffc001454d94 [ 1530.884256][ T1900] x2 : ffffffc00b8201d0 x1 : 0000000000000020 x0 : 0000000000000000 [ 1530.892087][ T1900] Call trace: [ 1530.895225][ T1900] wave5_vpu_dec_get_output_info+0x300/0x308 [wave5] [ 1530.901788][ T1900] wave5_vpu_dec_finish_decode+0x6c/0x3dc [wave5] [ 1530.908081][ T1900] wave5_vpu_irq_thread+0x140/0x168 [wave5] [ 1530.913856][ T1900] irq_thread_fn+0x44/0xa4 [ 1530.918154][ T1900] irq_thread+0x15c/0x288 [ 1530.922330][ T1900] kthread+0x104/0x1d4 [ 1530.926247][ T1900] ret_from_fork+0x10/0x20 [ 1530.930520][ T1900] Code: 2a1f03ea 2a1f03eb 35ffef2c 17ffff74 (d42aa240) [ 1530.937296][ T1900] ---[ end trace 0000000000000000 ]--- [ 1530.942596][ T1900] Kernel panic - not syncing: BRK handler: Fatal exception [ 1530.949629][ T1900] SMP: stopping secondary CPUs [ 1530.954244][ T1900] Kernel Offset: disabled [ 1530.958415][ T1900] CPU features: 0x00,00000000,00800184,0000421b [ 1530.964496][ T1900] Memory Limit: none Move the disp_info assignment after testing that the index is positive to avoid the exception. Fixes: 45d1a2b93277 ("media: chips-media: wave5: Add vpuapi layer") Signed-off-by: Mattijs Korpershoek Reviewed-by: Nicolas Dufresne Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit a3d51462804f7de2b8cbbdbaa569fa9b2d9a8fd9 Author: Colin Ian King Date: Fri Nov 24 16:41:23 2023 +0000 media: chips-media: wave5: Fix spelling mistake "bufferur" -> "buffer" There is a spelling mistake in a dev_dbg message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit f54ce765d69118546f9ba3c57fab4a09933aa0aa Author: Lukas Bulwahn Date: Wed Nov 29 17:03:13 2023 +0100 media: MAINTAINERS: Correct file entry in WAVE5 VPU CODEC DRIVER Commit 26dde1beb359 ("media: chips-media: wave5: Add wave5 driver to maintainers file") adds the MAINTAINERS section WAVE5 VPU CODEC DRIVER referring to the 'cnm,wave5.yaml' media devicetree binding, but the file actually added in the commit de4b9f7e371a ("dt-bindings: media: wave5: add yaml devicetree bindings") is named 'cnm,wave521c.yaml'. Correct the file entry in WAVE5 VPU CODEC DRIVER. Fixes: 26dde1beb359 ("media: chips-media: wave5: Add wave5 driver to maintainers file") Signed-off-by: Lukas Bulwahn Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit b9407b259f70e6d14d5258045b78e274cc77d51d Author: Dan Carpenter Date: Tue Nov 28 17:39:58 2023 +0300 media: chips-media: wave5: Remove duplicate check We already verified that "ret" is zero a few lines earlier. Delete this duplicate check. Signed-off-by: Dan Carpenter Reviewed-by: Nicolas Dufresne Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit b8ec0f3b42a3498d5115d1fb1490082ab525747b Author: Frank Li Date: Tue Oct 17 15:46:57 2023 -0400 arm64: dts: freescale: imx93: add i3c1 and i3c2 Add I3C1 and I3C2. Signed-off-by: Frank Li Signed-off-by: Shawn Guo commit aaa50f9c6008204132c895763ce4eb2d3663940c Author: Fabio Estevam Date: Fri Sep 29 15:55:10 2023 -0300 arm64: dts: ls1012a: Remove big-endian from thermal Per qoriq-thermal.yaml, 'big-endian' is not a valid property. When the 'little-endian' property is absent, the default is big endian. Remove it to fix the following schema warning: tmu@1f00000: 'big-endian' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/thermal/qoriq-thermal.yaml# Signed-off-by: Fabio Estevam Acked-by: Li Yang Signed-off-by: Shawn Guo commit 3203009fe58d407a150e1116d6900d6ddbbaa542 Author: Mika Kahola Date: Tue Dec 12 13:51:30 2023 +0200 drm/i915/display: Wait for PHY readiness not needed for disabling sequence When going through the disconnection flow we don't need to wait for PHY readiness and hence we can skip the wait part. For disabling the function returns false as an indicator that the power is not enabled. After all, we are not even using the return value when Type-C is disconnecting. v2: Cleanup for increased readibility (Imre) BSpec: 65380 For VLK-53734 Signed-off-by: Mika Kahola Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231212115130.485911-1-mika.kahola@intel.com commit 6cf96df77338c6a7e753229fe6d330ab60e28cda Author: Jaewon Kim Date: Mon Dec 11 20:41:45 2023 +0900 pinctrl: samsung: add exynosautov920 pinctrl Add pinctrl data for ExynosAutov920 SoC. It has a newly applied pinctrl register layer for ExynosAuto series. Pinctrl data for ExynosAutoV920 SoC. - GPA0,GPA1 (10): External wake up interrupt - GPQ0 (2): SPMI (PMIC I/F) - GPB0,GPB1,GPB2,GPB3,GPB4,GPB5,GPB6 (47): I2S Audio - GPH0,GPH1,GPH2,GPH3,GPH4,GPH5,GPH6,GPH8 (49): PCIE, UFS, Ethernet - GPG0,GPG1,GPG2,GPG3,GPG4,GPG5 (29): General purpose - GPP0,GPP1,GPP2,GPP3,GPP4,GPP5,GPP6,GPP7,GPP8,GPP9,GPP10 (77): USI Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231211114145.106255-3-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit 884fdaa53b38921165cd9afdb230502b4e1690b0 Author: Jaewon Kim Date: Mon Dec 11 20:41:44 2023 +0900 pinctrl: samsung: support ExynosAuto GPIO structure New ExynosAuto series GPIO have a different register structure. In the existing Exynos series, EINT control register is enumerated after a specific offset (e.g EXYNOS_GPIO_ECON_OFFSET, EXYNOS_GPIO_EMASK_OFFSET). However, from ExynosAutov920 SoC, the register that controls EINT belongs to each GPIO bank, and each GPIO bank has 0x1000 align. This is a structure to protect the GPIO bank using S2MPU in VM environment, and will only be applied in ExynosAuto series SoCs. -------------------------------------------------------------- | Original Exynos | ExynosAuto | |------------------------------------------------------------| | 0x0 GPIO_CON | 0x0 GPIO_CON | | 0x4 GPIO_DAT | 0x4 GPIO_DAT | | 0x8 GPIO_PUD | 0x8 GPIO_PUD | | 0xc GPIO_DRV | 0xc GPIO_DRV | | 0x10 GPIO_CONPDN | 0x10 GPIO_CONPDN | | 0x14 GPIO_PUDPDN | 0x14 GPIO_PUDPDN | |----------------------------| 0x18 EINT_CON (per_bank) | | ... | 0x1c EINT_FLTCON0 (per_bank) | | ... | 0x20 EINT_FLTCON1 (per_bank) | | ... | 0x24 EINT_MASK (per_bank) | | ... | 0x28 EINT_PEND (per_bank) | |----------------------------|-------------------------------| | 0x700 EINT_CON (global) | ... | | 0x800 EINT_FLTCON (global) | ... | | 0x900 EINT_MASK (global) | ... | | 0xa00 EINT_FEND (global) | ... | -------------------------------------------------------------- Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231211114145.106255-2-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit baf31a20fa7f3538d68ffa5262a715eb1d699cdd Author: Ankit Nautiyal Date: Wed Nov 22 12:16:27 2023 +0530 drm/i915/display: Get bigjoiner config before dsc config during readout Currently we get bigjoiner config after the dsc get config, during HW readout. Since dsc_get_config now uses bigjoiner flags/pipes to compute DSC PPS parameter pic_width, this results in a state mismatch when Bigjoiner and DSC are used together. So call get bigjoiner config before calling dsc get config function. Fixes: 8b70b5691704 ("drm/i915/vdsc: Fill the intel_dsc_get_pps_config function") Cc: Suraj Kandpal Cc: Ankit Nautiyal Cc: Animesh Manna Cc: Jani Nikula Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Link: https://patchwork.freedesktop.org/patch/msgid/20231122064627.905828-1-ankit.k.nautiyal@intel.com commit 7bdee41575919773818e525ea19e54eb817770af Author: Arnaud Pouliquen Date: Tue Dec 5 17:23:30 2023 +0100 tee: Use iov_iter to better support shared buffer registration Currently it's not possible to register kernel buffers with TEE which are allocated via vmalloc. Use iov_iter and associated helper functions to manage the page registration for all type of memories. Suggested-by: Christoph Hellwig Signed-off-by: Arnaud Pouliquen Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit a0a28956b46ec7f16ce5d762ac5a124bb532da0d Merge: 6734cd03f7e20 47c4533543af4 Author: Dave Airlie Date: Wed Dec 13 15:42:00 2023 +1000 Merge tag 'amd-drm-next-6.8-2023-12-08' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.8-2023-12-08: amdgpu: - SR-IOV fixes - DCN 3.5 updates - Backlight fixes - MST fixes - DMCUB fixes - DPIA fixes - Display powergating updates - Enable writeback connectors - Misc code cleanups - Add more register state debugging for aquavanjaram - Suspend fix - Clockgating fixes - SMU 14 updates - PSR fixes - MES logging updates - Misc fixes amdkfd: - SVM fix radeon: - Fix potential memory leaks in error paths Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231208205613.4861-1-alexander.deucher@amd.com commit f737020d24e47d6e8b893a2fee2b43268a6af629 Author: Marek Szyprowski Date: Fri Oct 6 12:03:20 2023 +0200 Input: max77693-haptic - add device-tree compatible strings Add the needed device-tree compatible strings to the MAX77693 haptic driver, so it can be automatically loaded when compiled as a kernel module and given device-tree contains separate (i.e. 'motor-driver') node under the main PMIC node. When device is instantiated from device-tree, the driver data cannot be read via platform_get_device_id(), so get device type from the parent MFD device instead, what works for both cases. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231006100320.2908210-1-m.szyprowski@samsung.com Signed-off-by: Dmitry Torokhov commit 5958274f1de5bcc435a11a92a5d555775c5ed341 Author: Mark Brown Date: Sun Oct 1 01:43:40 2023 +0200 Input: qt1050 - convert to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231001-input-maple-v1-3-ed3716051431@kernel.org Signed-off-by: Dmitry Torokhov commit 718963d94197626f83544b63ca5581d16cffdac2 Author: Mark Brown Date: Sun Oct 1 01:43:39 2023 +0200 Input: cap11xx - convert to use maple tree register cache The maple tree register cache is based on a much more modern data structure than the rbtree cache and makes optimisation choices which are probably more appropriate for modern systems than those made by the rbtree cache. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231001-input-maple-v1-2-ed3716051431@kernel.org Signed-off-by: Dmitry Torokhov commit 39bd68d422ba085997fb1f26160d7c686915b3cb Author: Mark Brown Date: Sun Oct 1 01:43:38 2023 +0200 Input: cap11xx - cache hardware ID registers The cap11xx devices have three hardware identification registers which are currently marked as volatile, preventing caching of those registers. This is not ideal since the registers should never change at runtime, we should be able to cache the value after the first read. Stop marking the registers as volatile, we don't have register defaults specified in the driver so this will result in reading from the hardware on first use. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231001-input-maple-v1-1-ed3716051431@kernel.org Signed-off-by: Dmitry Torokhov commit 2e3ae00021901461455b6a9ff4ef850817e9ab6d Author: Jiri Valek - 2N Date: Mon Dec 11 18:54:45 2023 -0800 Input: cap11xx - add advanced sensitivity settings Add support for advanced sensitivity settings that allows more precise tunig of touch buttons. Input-treshold allows to set the sensitivity for each channel separately. Also add signal guard feature for CAP129x chips. Signed-off-by: Jiri Valek - 2N Link: https://lore.kernel.org/r/20231121155250.613242-3-jiriv@axis.com Signed-off-by: Dmitry Torokhov commit e4af6bb1f62fe30f19171322374f021bbcdc5b04 Author: Jiri Valek - 2N Date: Mon Dec 11 18:54:22 2023 -0800 dt-bindings: input: microchip,cap11xx: add advanced sensitivity settings Add support for advanced sensitivity settings and signal guard feature. Signed-off-by: Jiri Valek - 2N Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231121155250.613242-2-jiriv@axis.com Signed-off-by: Dmitry Torokhov commit 1bdf22580b794a498b17617bcd7ae417d6b78444 Author: Michael Ellerman Date: Wed Nov 29 00:27:48 2023 +1100 selftests/powerpc: Check all FPRs in fpu_syscall test There is a selftest that checks if FPRs are corrupted across a fork, aka clone. It was added as part of the series that optimised the clone path to save the parent's FP state without "giving up" (turning off FP). See commit 8792468da5e1 ("powerpc: Add the ability to save FPU without giving it up"). The test encodes the assumption that FPRs 0-13 are volatile across the syscall, by only checking the volatile FPRs are not changed by the fork. There was also a comment in the fpu_preempt test alluding to that: The check_fpu function in asm only checks the non volatile registers as it is reused from the syscall test It is true that the function call ABI treats f0-f13 as volatile, however the syscall ABI has since been documented as *not* treating those registers as volatile. See commit 7b8845a2a2ec ("powerpc/64: Document the syscall ABI"). So change the test to check all FPRs are not corrupted by the syscall. Note that this currently fails, because save_fpu() etc. do not restore f0/vsr0. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231128132748.1990179-5-mpe@ellerman.id.au commit 60d2c3af9a0c04dc2d34a62e9f5e7033b40dfed8 Author: Michael Ellerman Date: Wed Nov 29 00:27:47 2023 +1100 selftests/powerpc: Run fpu_preempt test for 60 seconds The FPU preempt test only runs for 20 seconds, which is not particularly long. Run it for 60 seconds to increase the chance of detecting corruption. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231128132748.1990179-4-mpe@ellerman.id.au commit 2ba107f6795d780bb54b85040a9b2c6a60fccb15 Author: Michael Ellerman Date: Wed Nov 29 00:27:46 2023 +1100 selftests/powerpc: Generate better bit patterns for FPU tests The fpu_preempt test randomly initialises an array of doubles to try and detect FPU register corruption. However the values it generates do not occupy the full range of values possible in the 64-bit double, meaning some partial register corruption could go undetected. Without getting too carried away, add some better initialisation to generate values that occupy more bits. Sample values before: f0 902677510 (raw 0x41cae6e203000000) f1 325217596 (raw 0x41b3626d3c000000) f2 1856578300 (raw 0x41dbaa48bf000000) f3 1247189984 (raw 0x41d295a6f8000000) And after: f0 1.1078153481413311e-09 (raw 0x3e13083932805cc2) f1 1.0576648474801922e+17 (raw 0x43777c20eb88c261) f2 -6.6245033413594075e-10 (raw 0xbe06c2f989facae9) f3 3.0085988827156291e+18 (raw 0x43c4e0585f2df37b) Signed-off-by: Michael Ellerman Link: https://msgid.link/20231128132748.1990179-3-mpe@ellerman.id.au commit e5d00aaac651a69b8016d355123438387bfd37be Author: Michael Ellerman Date: Wed Nov 29 00:27:45 2023 +1100 selftests/powerpc: Check all FPRs in fpu_preempt There's a selftest that checks FPRs aren't corrupted by preemption, or just process scheduling. However it only checks the non-volatile FPRs, meaning corruption of the volatile FPRs could go undetected. The check_fpu function it calls is used by several other tests, so for now add a new routine to check all the FPRs. Increase the size of the array of FPRs to 32, and initialise them all with random values. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231128132748.1990179-2-mpe@ellerman.id.au commit 9dbd5927408c4a0707de73ae9dd9306b184e8fee Author: Michael Ellerman Date: Wed Nov 29 00:27:44 2023 +1100 selftests/powerpc: Fix error handling in FPU/VMX preemption tests The FPU & VMX preemption tests do not check for errors returned by the low-level asm routines, preempt_fpu() / preempt_vsx() respectively. That means any register corruption detected by the asm routines does not result in a test failure. Fix it by returning the return value of the asm routines from the pthread child routines. Fixes: e5ab8be68e44 ("selftests/powerpc: Test preservation of FPU and VMX regs across preemption") Signed-off-by: Michael Ellerman Link: https://msgid.link/20231128132748.1990179-1-mpe@ellerman.id.au commit fc0fbad122a7609d785ee754c2b6e1e3265547d0 Merge: e52ec6a2db2e0 4376807bf2d53 Author: Andrew Morton Date: Tue Dec 12 17:39:11 2023 -0800 merge mm-hotfixes-stable into mm-nonmm-stable to pick up depended-upon changes commit 6734cd03f7e203d63337c236228617dace4c630a Merge: 3c2eb7806f641 be5bcc4be9d9d Author: Dave Airlie Date: Wed Dec 13 11:20:49 2023 +1000 Merge tag 'drm-intel-gt-next-2023-12-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-next UAPI Changes: - drm/i915: Implement fdinfo memory stats printing Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories. Cross-subsystem Changes: - Backmerge of drm-next (to bring drm-intel-next for PXP changes) Driver Changes: - Wa_18028616096 now applies to all DG2 (Matt R) - Drop Wa_22014600077 on all DG2 (Matt R) - Add new ATS-M device ID (Haridhar) - More Meteorlake (MTL) workarounds (Matt R, Dnyaneshwar, Jonathan, Gustavo, Radhakrishna) - PMU WARN_ON cleanup on driver unbind (Umesh) - Limit GGTT WC flushing workaround to pre BXT/ICL platforms - Complement implementation for Wa_16018031267 / Wa_16018063123 (Andrzej, Jonathan, Nirmoy, Chris) - Properly print internal GSC engine in trace logs (Tvrtko) - Track gt pm wakerefs (Andrzej) - Fix null deref bugs on perf code when perf is disabled (Harshit, Tvrtko) - Fix __i915_request_create memory leak on driver unbind (Andrzej) - Remove spurious unsupported HuC message on MTL (Daniele) - Read a shadowed mmio register for ggtt flush (Vinay) - Add missing new-line to GT_TRACE (Andrzej) - Add drm_dbgs for critical PXP events (Alan) - Skip pxp init if gt is wedged (Zhanjun) - Replace custom intel runtime_pm tracker with ref_tracker library (Andrzej) - Compiler warning/static checker/coding style cleanups (Arnd, Nirmoy, Soumya, Gilbert, Dorcas, Kunwu, Sam, Tvrtko) - Code structure and helper cleanups (Jani, Tvrtko, Andi) - Selftest improvements (John, Tvrtko, Andrzej) Signed-off-by: Dave Airlie # Conflicts: # drivers/gpu/drm/i915/gt/intel_gt_mcr.c From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/ZXNBcsSwJEVsq9On@jlahtine-mobl.ger.corp.intel.com commit 3c2eb7806f641f2516d8265bdc324bfc680cc5ed Merge: c1ee197d64f49 ead5a41c8f8a1 Author: Dave Airlie Date: Wed Dec 13 11:01:30 2023 +1000 Merge tag 'exynos-drm-next-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next One bug fix - Add a missing call to drm_atomic_helper_shutdown() in Exynos DRM driver. This function is necessary during system shutdown and when the driver is unbound. Without this function, components like panels may not shut down properly, potentially leading to power issue as mentioned in the kernel documentation, specially in the "driver instance overview" secstion of 'drm_drv.c'. Two cleanups - Convert '.remove()' callback function in the Exynos DRM platform driver to a version that returns void instead of an integer. - Change connector type of exynos_drm_dpi.c module to DPI. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20231212051134.48524-1-inki.dae@samsung.com commit bad098d76835c1379e1cf6afc935f8a7e050f83c Author: Matthew Maurer Date: Tue Oct 31 20:19:44 2023 +0000 rust: Ignore preserve-most functions Neither bindgen nor Rust know about the preserve-most calling convention, and Clang describes it as unstable. Since we aren't using functions with this calling convention from Rust, blocklist them. These functions are only added to the build when list hardening is enabled, which is likely why others didn't notice this yet. Signed-off-by: Matthew Maurer Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231031201945.1412345-1-mmaurer@google.com [ Used Markdown for consistency with the other comments in the file. ] Signed-off-by: Miguel Ojeda commit dc92ac9f6383a5026d6070a79035ebcc28c59d1b Author: Masahiro Yamada Date: Fri Nov 24 23:26:17 2023 +0900 rust: replace with in rust/exports.c is the right header to include for using EXPORT_SYMBOL_GPL. includes much more bloat. Signed-off-by: Masahiro Yamada Reviewed-by: Martin Rodriguez Reboredo Link: https://lore.kernel.org/r/20231124142617.713096-1-masahiroy@kernel.org Signed-off-by: Miguel Ojeda commit 9bab51bd662be4c3ebb18a28879981d69f3ef15a Merge: 79ac11393328f 056bce63c469c Author: Jakub Kicinski Date: Tue Dec 12 16:06:00 2023 -0800 Merge branch 'bnxt_en-update-for-net-next' Michael Chan says: ==================== bnxt_en: Update for net-next The first 4 patches in the series fix issues in the net-next tree introduced in the last 4 weeks. The first 3 patches fix ring accounting and indexing logic. The 4th patch fix TX timeout when the TX ring is very small. The next 7 patches add new features on the P7 chips, including TX coalesced completions, VXLAN GPE and UDP GSO stateless offload, a new rx_filter_miss counters, and more QP backing store memory for RoCE. The last 2 patches are PTP improvements. ==================== Link: https://lore.kernel.org/r/20231212005122.2401-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 056bce63c469ca397e30d16bdbd4408489f089a9 Author: Pavan Chebbi Date: Mon Dec 11 16:51:22 2023 -0800 bnxt_en: Make PTP TX timestamp HWRM query silent In a busy network, especially with flow control enabled, we may experience timestamp query failures fairly regularly. After a while, dmesg may be flooded with timestamp query failure error messages. Silence the error message from the low level hwrm function that sends the firmware message. Change netdev_err() to netdev_WARN_ONCE() if this FW call ever fails. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-14-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 84793a499578a5447b90b298aa8ac4fd314f6f9f Author: Pavan Chebbi Date: Mon Dec 11 16:51:21 2023 -0800 bnxt_en: Skip nic close/open when configuring tstamp filters We don't have to close and open the nic to make sure we have valid rx timestamps. Once we have the timestamp filter applied to the HW and the timestamp_fld_format bit is cleared in the rx completion and the timestamp is non-zero, we can be sure that rx timestamp is valid data. Skip close/open when we set any timestamp filter. Reviewed-by: Andy Gospodarek Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-13-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit feeef68f6f3d21a1ebda7eb00d4f7aa5423d17be Author: Michael Chan Date: Mon Dec 11 16:51:20 2023 -0800 bnxt_en: Add support for UDP GSO on 5760X chips The new 5760X chips supports UDP GSO. Tested using udpgso_bench_tx. Reviewed-by: Andy Gospodarek Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-12-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 6ce30622547d54eb47cdf55609ad68590c314b50 Author: Damodharam Ammepalli Date: Mon Dec 11 16:51:19 2023 -0800 bnxt_en: add rx_filter_miss extended stats rx_filter_miss counter is newly added to the rx_port_stats_ext stats structure for newer chips. Newer firmware will return the structure size that includes this counter. Add this entry to the bnxt_port_stats_ext_arr array and the ethtool -S code will pick up this counter if it is supported. Signed-off-by: Damodharam Ammepalli Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-11-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 960096334417d841593f848323a35ff6c7dacffe Author: Michael Chan Date: Mon Dec 11 16:51:18 2023 -0800 bnxt_en: Configure UDP tunnel TPA On the new P7 chips, TPA for tunnel packets can be independently enabled for each VNIC. The default TPA configuration should not include UDP tunnels because the UDP ports for these tunnels are not known yet. The chip should not aggregate these UDP tunneled packets using default UDP ports until the ports are known. Add a new function bnxt_hwrm_vnic_update_tunl_tpa() to enable VXLAN and Geneve TPA if the corresponding UDP ports are known. Reviewed-by: Ajit Khaparde Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-10-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 77b0fff55dcd34b41d879ab20d3c13cfc9672179 Author: Michael Chan Date: Mon Dec 11 16:51:17 2023 -0800 bnxt_en: Add support for VXLAN GPE Add a new bnxt_udp_tunnels_p7 struct to support the new P7 chips that can parse VXLAN GPE packets. Add VXLAN GPE tunnel type handling to the .set_port() and .unset_port() functions. .ndo_features_check() is also enhanced to support VXLAN GPE which may encapsulate inner IP packets instead of ethernet packets. Reviewed-by: Damodharam Ammepalli Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-9-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit e6f8a5a8ecc93aeead0fbd372018a4780585a525 Author: Michael Chan Date: Mon Dec 11 16:51:16 2023 -0800 bnxt_en: Use proper TUNNEL_DST_PORT_ALLOC* commands In bnxt_udp_tunnel_set_port(), use the proper ALLOC commands instead of the FREE commands for correctness. The ALLOC and FREE commands happen to be identical so this is just a cosmetic fix for correctness. Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-8-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 297e625bf89e78c5c1c74c571c5f4315bebc67e6 Author: Selvin Xavier Date: Mon Dec 11 16:51:15 2023 -0800 bnxt_en: Allocate extra QP backing store memory when RoCE FW reports it The Fast QP modify destroy RoCE feature requires additional QP entries in QP context backing store. FW reports the extra count to be allocated during backing store query. Use this value and allocate extra memory. Note that this works for both the V1 and V1 backing store FW APIs. Signed-off-by: Selvin Xavier Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-7-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 6dea3ebe0d226e021970f3552ed37fdcedca8773 Author: Michael Chan Date: Mon Dec 11 16:51:14 2023 -0800 bnxt_en: Support TX coalesced completion on 5760X chips TX coalesced completions are supported on newer chips to provide one TX completion record for multiple TX packets up to the sq_cons_idx in the completion record. This method saves PCIe bandwidth by reducing the number of TX completions. Only very minor changes are now required to support this mode with the new framework that handles TX completions based on the consumer indices. Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-6-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit f12f551b5b966ec58bfba9daa15f3cb99a92c1f9 Author: Michael Chan Date: Mon Dec 11 16:51:13 2023 -0800 bnxt_en: Prevent TX timeout with a very small TX ring If xmit_more condition is true, the driver may set the TX_BD_FLAGS_NO_CMPL flag. If after this packet, the TX ring can no longer hold a packet with maximum fragments, we will stop the TX queue. When this happens, we must clear the TX_BD_FLAGS_NO_CMPL flag on the last packet or there will be no completion and cause TX timeout. Fixes: c1056a59aee1 ("bnxt_en: Optimize xmit_more TX path") Reviewed-by: Somnath Kotur Reviewed-by: Andy Gospodarek Reviewed-by: Hongguang Gao Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-5-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 18fe0a383cca78cfb183f83f947e75bebc7b3a20 Author: Michael Chan Date: Mon Dec 11 16:51:12 2023 -0800 bnxt_en: Fix TX ring indexing logic Two spots were missed when modifying the TX ring indexing logic. The use of unmasked TX index in bnxt_tx_int() will cause unnecessary __bnxt_tx_int() calls. The same issue in bnxt_tx_int_xdp() can result in illegal array index. Fixes: 6d1add95536b ("bnxt_en: Modify TX ring indexing logic.") Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 7fb17a0c18b68b64d0d91480b558089dec017e63 Author: Somnath Kotur Date: Mon Dec 11 16:51:11 2023 -0800 bnxt_en: Fix AGG ring check logic in bnxt_check_rings() _bnxt_get_max_rings() that is invoked in bnxt_check_rings() already accounts for the AGG ring(s) and gives a max value based on that. Increasing for AGG rings before calling _bnxt_get_max_rings() will result in checking for twice the number of rings than required and it can fail. Fix it by adjusting for AGG rings after calling _bnxt_get_max_rings(). Fixes: f5b29c6afe36 ("bnxt_en: Add helper to get the number of CP rings required for TX rings") Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit f1e50b276d37f21b10c4d122e02a81cd202cde3b Author: Michael Chan Date: Mon Dec 11 16:51:10 2023 -0800 bnxt_en: Fix trimming of P5 RX and TX rings The recent commit to trim the RX and TX rings on P5 chips by assigning each with max CP rings divided by 2 is not correct. Max CP rings divided by 2 may be bigger than the original RX or TX and would lead to failure. In other words, we may be checking for increased RX/TX rings than required and it may fail. Fix it by calling __bnxt_trim_rings() instead that would properly trim RX and TX without the possibility of increasing their values. Fixes: f5b29c6afe36 ("bnxt_en: Add helper to get the number of CP rings required for TX rings") Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231212005122.2401-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 79ac11393328fb1717d17c12e3c0eef0e9fa0647 Author: Justin Stitt Date: Mon Dec 11 19:10:00 2023 +0000 net: mdio-gpio: replace deprecated strncpy with strscpy strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect new_bus->id to be NUL-terminated but not NUL-padded based on its prior assignment through snprintf: | snprintf(new_bus->id, MII_BUS_ID_SIZE, "gpio-%x", bus_id); Due to this, a suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. We can also use sizeof() instead of a length macro as this more closely ties the maximum buffer size to the destination buffer. Do this for two instances. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Signed-off-by: Justin Stitt Reviewed-by: Russell King (Oracle) Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20231211-strncpy-drivers-net-mdio-mdio-gpio-c-v3-1-76dea53a1a52@google.com Signed-off-by: Jakub Kicinski commit e1ba7f64b192f083b4423644be03bb9e3dc8ae84 Author: YiFei Zhu Date: Tue Dec 12 18:29:11 2023 +0000 selftests/bpf: Relax time_tai test for equal timestamps in tai_forward We're observing test flakiness on an arm64 platform which might not have timestamps as precise as x86. The test log looks like: test_time_tai:PASS:tai_open 0 nsec test_time_tai:PASS:test_run 0 nsec test_time_tai:PASS:tai_ts1 0 nsec test_time_tai:PASS:tai_ts2 0 nsec test_time_tai:FAIL:tai_forward unexpected tai_forward: actual 1702348135471494160 <= expected 1702348135471494160 test_time_tai:PASS:tai_gettime 0 nsec test_time_tai:PASS:tai_future_ts1 0 nsec test_time_tai:PASS:tai_future_ts2 0 nsec test_time_tai:PASS:tai_range_ts1 0 nsec test_time_tai:PASS:tai_range_ts2 0 nsec #199 time_tai:FAIL This patch changes ASSERT_GT to ASSERT_GE in the tai_forward assertion so that equal timestamps are permitted. Fixes: 64e15820b987 ("selftests/bpf: Add BPF-helper test for CLOCK_TAI access") Signed-off-by: YiFei Zhu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231212182911.3784108-1-zhuyifei@google.com commit f352a28cc2fb4ee8d08c6a6362c9a861fcc84236 Merge: b85ea95d08647 9726acfdfa3bb Author: Palmer Dabbelt Date: Thu Dec 7 07:33:36 2023 -0800 Merge patch series "riscv: report more ISA extensions through hwprobe" Clément Léger says: In order to be able to gather more information about the supported ISA extensions from userspace using the hwprobe syscall, add more ISA extensions report. This series adds the following ISA extensions parsing support: - Zfh[min] - Zvfh[min] - Zihintntl - Zbc - Zvbb - Zvbc - Zvkb - Zvkg - Zvkned - Zvknh[ab] - Zvksed - Zvksh - Zvkn - Zvknc - Zvkng - Zvks - Zvksc - Zvksg - Zvkt - Zfa - Zbkb - Zbkc - Zbkx - Zknd - Zkne - Zknh - Zkr - Zksed - Zksh - Zkt Some of these extensions are actually shorthands for other "sub" extensions. This series includes a patch from Conor/Evan that adds a way to specify such "bundled" extensions. When exposing these bundled extensions to userspace through hwprobe, only the "sub" extensions are exposed. In order to test it, one can use qemu and the small hwprobe utility provided[1]. Run qemu by specifying additional ISA extensions, for instance: $ qemu-system-riscv64 -cpu rv64,v=true,zk=true,zvksh=true,zvkned=true Then, run hwprobe: $ ./hwprobe Base system ISA: - IMA_FD - C - V Supported extensions: - Zba - Zbb - Zbs - Zbc - Zbkb - Zbkc - Zbkx - Zknd - Zkne - Zknh - Zkt - Zvkned - Zvksh - Zihintntl - Zfa * b4-shazam-merge: dt-bindings: riscv: add Zfa ISA extension description riscv: hwprobe: export Zfa ISA extension riscv: add ISA extension parsing for Zfa dt-bindings: riscv: add Zvfh[min] ISA extension description riscv: hwprobe: export Zvfh[min] ISA extensions riscv: add ISA extension parsing for Zvfh[min] dt-bindings: riscv: add Zihintntl ISA extension description riscv: hwprobe: export Zhintntl ISA extension riscv: add ISA extension parsing for Zihintntl dt-bindings: riscv: add Zfh[min] ISA extensions description riscv: hwprobe: export Zfh[min] ISA extensions riscv: add ISA extension parsing for Zfh/Zfh[min] dt-bindings: riscv: add vector crypto ISA extensions description riscv: hwprobe: export vector crypto ISA extensions riscv: add ISA extension parsing for vector crypto dt-bindings: riscv: add scalar crypto ISA extensions description riscv: hwprobe: add support for scalar crypto ISA extensions riscv: add ISA extension parsing for scalar crypto riscv: hwprobe: export missing Zbc ISA extension riscv: add ISA extension parsing for Zbc Link: https://lore.kernel.org/r/20231114141256.126749-1-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 9726acfdfa3bbf324b305e0b32fc028c278f6d43 Author: Clément Léger Date: Tue Nov 14 09:12:56 2023 -0500 dt-bindings: riscv: add Zfa ISA extension description Add description for the Zfa ISA extension[1]. Link: https://drive.google.com/file/d/1VT6QIggpb59-8QRV266dEE4T8FZTxGq4/view [1] Signed-off-by: Clément Léger Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231114141256.126749-21-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit dc6ccb21f42ce5b3e4df6f52e14edab721e1b26e Author: Clément Léger Date: Tue Nov 14 09:12:55 2023 -0500 riscv: hwprobe: export Zfa ISA extension Export Zfa ISA extension[1] through hwprobe. Link: https://drive.google.com/file/d/1VT6QIggpb59-8QRV266dEE4T8FZTxGq4/view [1] Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231114141256.126749-20-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit fe987e84b0120e2b41db69ed4ede166797aa8d2e Author: Clément Léger Date: Tue Nov 14 09:12:54 2023 -0500 riscv: add ISA extension parsing for Zfa Add parsing for Zfa ISA extension [1] which were ratified in commit 056b6ff467c7 ("Zfa is ratified") of riscv-isa-manual[2]. Link: https://drive.google.com/file/d/1VT6QIggpb59-8QRV266dEE4T8FZTxGq4/view [1] Link: https://github.com/riscv/riscv-isa-manual/commits/056b6ff467c7 [2] Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231114141256.126749-19-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit e11880b4be3a8db558147409b9ed0d1855526910 Author: Clément Léger Date: Tue Nov 14 09:12:53 2023 -0500 dt-bindings: riscv: add Zvfh[min] ISA extension description Add description for Zvfh[min] ISA extension[1]. Link: https://drive.google.com/file/d/1_Yt60HGAf1r1hx7JnsIptw0sqkBd9BQ8/view [1] Signed-off-by: Clément Léger Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231114141256.126749-18-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 5dadda5e6a59a5b4f547a1b14d9518e4074c6966 Author: Clément Léger Date: Tue Nov 14 09:12:52 2023 -0500 riscv: hwprobe: export Zvfh[min] ISA extensions Export Zvfh[min] ISA extension[1] through hwprobe. Link: https://drive.google.com/file/d/1_Yt60HGAf1r1hx7JnsIptw0sqkBd9BQ8/view [1] Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231114141256.126749-17-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit f4961b78c37b64f48cc5c376f8aef5e1823201c1 Author: Clément Léger Date: Tue Nov 14 09:12:51 2023 -0500 riscv: add ISA extension parsing for Zvfh[min] Add parsing for Zvfh[min] ISA extension[1] which were ratified in june 2023 around commit e2ccd0548d6c ("Remove draft warnings from Zvfh[min]") in riscv-v-spec[2]. Link: https://drive.google.com/file/d/1_Yt60HGAf1r1hx7JnsIptw0sqkBd9BQ8/view [1] Link: https://github.com/riscv/riscv-v-spec/commits/e2ccd0548d6c [2] Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231114141256.126749-16-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 892f10c8d6ca4b3c12d149085243ad8cd75f09b3 Author: Clément Léger Date: Tue Nov 14 09:12:50 2023 -0500 dt-bindings: riscv: add Zihintntl ISA extension description Add description for Zihintntl ISA extension[1]. Link: https://drive.google.com/file/d/13_wsN8YmRfH8YWysFyTX-DjTkCnBd9hj/view [1] Signed-off-by: Clément Léger Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231114141256.126749-15-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 74ba42b250a7339c72e5803490b1ea42c3556f26 Author: Clément Léger Date: Tue Nov 14 09:12:49 2023 -0500 riscv: hwprobe: export Zhintntl ISA extension Export Zihintntl extension[1] through hwprobe. Link: https://drive.google.com/file/d/13_wsN8YmRfH8YWysFyTX-DjTkCnBd9hj/view [1] Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231114141256.126749-14-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit eddbfa0d849fa5a315840e8c501962252b48484d Author: Clément Léger Date: Tue Nov 14 09:12:48 2023 -0500 riscv: add ISA extension parsing for Zihintntl Add parsing for Zihintntl ISA extension[1] that was ratified in commit 0dc91f5 ("Zihintntl is ratified") of riscv-isa-manual[2]. Link: https://drive.google.com/file/d/13_wsN8YmRfH8YWysFyTX-DjTkCnBd9hj/view [1] Link: https://github.com/riscv/riscv-isa-manual/commit/0dc91f505e6d [2] Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231114141256.126749-13-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit c44714c35ff861d69db9c8bb4ae1347373f817f0 Author: Clément Léger Date: Tue Nov 14 09:12:47 2023 -0500 dt-bindings: riscv: add Zfh[min] ISA extensions description Add description of Zfh[min] ISA extensions[1]. Link: https://drive.google.com/file/d/1z3tQQLm5ALsAD77PM0l0CHnapxWCeVzP/view [1] Signed-off-by: Clément Léger Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231114141256.126749-12-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit bf4cd84111c6139313504310ff934df901a5ed3e Author: Clément Léger Date: Tue Nov 14 09:12:46 2023 -0500 riscv: hwprobe: export Zfh[min] ISA extensions Export Zfh[min] ISA extensions[1] through hwprobe only if FPU support is available. Link: https://drive.google.com/file/d/1z3tQQLm5ALsAD77PM0l0CHnapxWCeVzP/view [1] Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231114141256.126749-11-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 11e8e1ee2c223585f1776e5c5d21bdae7184ca34 Author: Clément Léger Date: Tue Nov 14 09:12:45 2023 -0500 riscv: add ISA extension parsing for Zfh/Zfh[min] Add parsing for Zfh[min] ISA extensions[1]. Link: https://drive.google.com/file/d/1z3tQQLm5ALsAD77PM0l0CHnapxWCeVzP/view [1] Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231114141256.126749-10-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 10815531c513f449ce477fb97e3f6e6962c14eaf Author: Clément Léger Date: Tue Nov 14 09:12:44 2023 -0500 dt-bindings: riscv: add vector crypto ISA extensions description Add Zv* vector crypto extensions that were added in "RISC-V Cryptography Extensions Volume II" specificationi[1]: - Zvbb: Vector Basic Bit-manipulation - Zvbc: Vector Carryless Multiplication - Zvkb: Vector Cryptography Bit-manipulation - Zvkg: Vector GCM/GMAC. - Zvkned: NIST Suite: Vector AES Block Cipher - Zvknh[ab]: NIST Suite: Vector SHA-2 Secure Hash - Zvksed: ShangMi Suite: SM4 Block Cipher - Zvksh: ShangMi Suite: SM3 Secure Hash - Zvkn: NIST Algorithm Suite - Zvknc: NIST Algorithm Suite with carryless multiply - Zvkng: NIST Algorithm Suite with GCM. - Zvks: ShangMi Algorithm Suite - Zvksc: ShangMi Algorithm Suite with carryless multiplication - Zvksg: ShangMi Algorithm Suite with GCM. - Zvkt: Vector Data-Independent Execution Latency. Link: https://drive.google.com/file/d/1gb9OLH-DhbCgWp7VwpPOVrrY6f3oSJLL/view [1] Signed-off-by: Clément Léger Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231114141256.126749-9-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit ca35b5b115856973620f425955fd0ce2505a51c4 Author: Clément Léger Date: Tue Nov 14 09:12:43 2023 -0500 riscv: hwprobe: export vector crypto ISA extensions Export Zv* vector crypto ISA extensions that were added in "RISC-V Cryptography Extensions Volume II" specification[1] through hwprobe. This adds support for the following instructions: - Zvbb: Vector Basic Bit-manipulation - Zvbc: Vector Carryless Multiplication - Zvkb: Vector Cryptography Bit-manipulation - Zvkg: Vector GCM/GMAC. - Zvkned: NIST Suite: Vector AES Block Cipher - Zvknh[ab]: NIST Suite: Vector SHA-2 Secure Hash - Zvksed: ShangMi Suite: SM4 Block Cipher - Zvksh: ShangMi Suite: SM3 Secure Hash - Zvknc: NIST Algorithm Suite with carryless multiply - Zvkng: NIST Algorithm Suite with GCM. - Zvksc: ShangMi Algorithm Suite with carryless multiplication - Zvksg: ShangMi Algorithm Suite with GCM. - Zvkt: Vector Data-Independent Execution Latency. Zvkn and Zvks are ommited since they are a superset of other extensions. Link: https://drive.google.com/file/d/1gb9OLH-DhbCgWp7VwpPOVrrY6f3oSJLL/view [1] Signed-off-by: Clément Léger Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20231114141256.126749-8-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit aec3353963b8de889c3f1ab7cc8ba11e99626606 Author: Clément Léger Date: Tue Nov 14 09:12:42 2023 -0500 riscv: add ISA extension parsing for vector crypto Add parsing of some Zv* vector crypto ISA extensions that are mentioned in "RISC-V Cryptography Extensions Volume II" [1]. These ISA extensions are the following: - Zvbb: Vector Basic Bit-manipulation - Zvbc: Vector Carryless Multiplication - Zvkb: Vector Cryptography Bit-manipulation - Zvkg: Vector GCM/GMAC. - Zvkned: NIST Suite: Vector AES Block Cipher - Zvknh[ab]: NIST Suite: Vector SHA-2 Secure Hash - Zvksed: ShangMi Suite: SM4 Block Cipher - Zvksh: ShangMi Suite: SM3 Secure Hash - Zvkn: NIST Algorithm Suite - Zvknc: NIST Algorithm Suite with carryless multiply - Zvkng: NIST Algorithm Suite with GCM. - Zvks: ShangMi Algorithm Suite - Zvksc: ShangMi Algorithm Suite with carryless multiplication - Zvksg: ShangMi Algorithm Suite with GCM. - Zvkt: Vector Data-Independent Execution Latency. Link: https://drive.google.com/file/d/1gb9OLH-DhbCgWp7VwpPOVrrY6f3oSJLL/view [1] Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231114141256.126749-7-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 9376396251c8a927018d465b4cc396af4b25b8d0 Author: Clément Léger Date: Tue Nov 14 09:12:41 2023 -0500 dt-bindings: riscv: add scalar crypto ISA extensions description Add description for scalar crypto ISA extensions: - Zbkb - Zbkc - Zbkx - Zknd - Zkne - Zknh - Zkr - Zksed - Zksh - Zkt Signed-off-by: Clément Léger Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231114141256.126749-6-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 794983f292cd71b27106f1226360b2cf0f4a881b Author: Clément Léger Date: Tue Nov 14 09:12:40 2023 -0500 riscv: hwprobe: add support for scalar crypto ISA extensions Export the following scalar crypto extensions through hwprobe: - Zbkb - Zbkc - Zbkx - Zknd - Zkne - Zknh - Zksed - Zksh - Zkt Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231114141256.126749-5-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 0d8295ed975b6df487f0b4018770a60b070fc76d Author: Evan Green Date: Tue Nov 14 09:12:39 2023 -0500 riscv: add ISA extension parsing for scalar crypto The Scalar Crypto specification defines Zk as a shorthand for the Zkn, Zkr and Zkt extensions. The same follows for both Zkn, Zks and Zbk, which are all shorthands for various other extensions. The detailed breakdown can be found in their dt-binding entries. Since Zkn also implies the Zbkb, Zbkc and Zbkx extensions, simply passing "zk" through a DT should enable all of Zbkb, Zbkc, Zbkx, Zkn, Zkr and Zkt. For example, setting the "riscv,isa" DT property to "rv64imafdc_zk" should generate the following cpuinfo output: "rv64imafdc_zicntr_zicsr_zifencei_zihpm_zbkb_zbkc_zbkx_zknd_zkne_zknh_zkr_zkt" riscv_isa_ext_data grows a pair of new members, to permit setting the relevant bits for "bundled" extensions, both while parsing the ISA string and the new dedicated extension properties. Co-developed-by: Conor Dooley Signed-off-by: Conor Dooley Signed-off-by: Evan Green Signed-off-by: Clément Léger Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231114141256.126749-4-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit be6bef2acb75ca980671de19d406c0310d646d2b Author: Clément Léger Date: Tue Nov 14 09:12:38 2023 -0500 riscv: hwprobe: export missing Zbc ISA extension While Zba and Zbb were exported through hwprobe, Zbc was not. Export it. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231114141256.126749-3-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit e45f463a9b01aabd03c49390fc5249eeba0abc5e Author: Clément Léger Date: Tue Nov 14 09:12:37 2023 -0500 riscv: add ISA extension parsing for Zbc Zbc was documented in the dt-bindings but actually not supported in ISA string parsing. Add it. Signed-off-by: Clément Léger Link: https://lore.kernel.org/r/20231114141256.126749-2-cleger@rivosinc.com Signed-off-by: Palmer Dabbelt commit 745e0311306507ddbe1727ac798c8f956812b810 Author: Andrei Matei Date: Sun Dec 10 17:51:50 2023 -0500 bpf: Comment on check_mem_size_reg This patch adds a comment to check_mem_size_reg -- a function whose meaning is not very transparent. The function implicitly deals with two registers connected by convention, which is not obvious. Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231210225149.67639-1-andreimatei1@gmail.com commit bbc49c7a4e0f6c1b0dd779267aaf9746dd9a46f7 Merge: 2a62644800208 1e95d20ae8e6a Author: Jakub Kicinski Date: Tue Dec 12 15:14:16 2023 -0800 Merge tag 'pef2256-framer' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Linus Walleij says: ==================== Immutable tag for the PEF2256 framer * tag 'pef2256-framer' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: MAINTAINERS: Add the Lantiq PEF2256 driver entry pinctrl: Add support for the Lantic PEF2256 pinmux net: wan: framer: Add support for the Lantiq PEF2256 framer dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer net: wan: Add framer framework support ==================== Link: https://lore.kernel.org/all/CACRpkdYT1J7noFUhObFgfA60XQAfL4rb=knEmWS__TKKtCMh7Q@mail.gmail.com/ Signed-off-by: Jakub Kicinski commit c3f41b00307f796756ec494b90c9e238800a0ff8 Author: Asahi Lina Date: Fri Jul 14 18:19:33 2023 +0900 rust: kernel: str: Implement Debug for CString Make it possible to use a `CString` with the `pr_*` macros directly. That is, instead of: pr_debug!("trying to open {:?}\n", &*filename); we can now write: pr_debug!("trying to open {:?}\n", filename); Signed-off-by: Asahi Lina Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Reviewed-by: Martin Rodriguez Reboredo Link: https://lore.kernel.org/r/20230714-cstring-debug-v1-1-4e7c3018dd4f@asahilina.net [ Reworded to use Alice's commit message as discussed. ] Signed-off-by: Miguel Ojeda commit 2ddb7c424a60c2bbcffd582aeb75b24bdd7db241 Merge: db4a9133511c4 1e95d20ae8e6a Author: Linus Walleij Date: Tue Dec 12 23:08:30 2023 +0100 Merge tag 'pef2256-framer' into devel Immutable tag for the PEF2256 framer commit 1e95d20ae8e6a383b4c1dd2282e5259790724037 Author: Herve Codina Date: Tue Nov 28 14:25:34 2023 +0100 MAINTAINERS: Add the Lantiq PEF2256 driver entry After contributing the driver, add myself as the maintainer for the Lantiq PEF2256 driver. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231128132534.258459-6-herve.codina@bootlin.com Signed-off-by: Linus Walleij commit 37c646dc515a28eb38cc2495c34fb219f153e916 Author: Herve Codina Date: Tue Nov 28 14:25:33 2023 +0100 pinctrl: Add support for the Lantic PEF2256 pinmux The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. This kind of component can be found in old telecommunication system. It was used to digital transmission of many simultaneous telephone calls by time-division multiplexing. Also using HDLC protocol, WAN networks can be reached through the framer. This pinmux support handles the pin muxing part (pins RP(A..D) and pins XP(A..D)) of the PEF2256. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231128132534.258459-5-herve.codina@bootlin.com Signed-off-by: Linus Walleij commit c96e976d9a05d559f4ac4f617ea0f798c75a1799 Author: Herve Codina Date: Tue Nov 28 14:25:32 2023 +0100 net: wan: framer: Add support for the Lantiq PEF2256 framer The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Reviewed-by: Linus Walleij Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20231128132534.258459-4-herve.codina@bootlin.com Signed-off-by: Linus Walleij commit 766f5f900f156655c04230403fffdfb169a511ed Author: Herve Codina Date: Tue Nov 28 14:25:31 2023 +0100 dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231128132534.258459-3-herve.codina@bootlin.com Signed-off-by: Linus Walleij commit 82c944d05b1a24c76948ee9d6bb1d7de1ebb8b3a Author: Herve Codina Date: Tue Nov 28 14:25:30 2023 +0100 net: wan: Add framer framework support A framer is a component in charge of an E1/T1 line interface. Connected usually to a TDM bus, it converts TDM frames to/from E1/T1 frames. It also provides information related to the E1/T1 line. The framer framework provides a set of APIs for the framer drivers (framer provider) to create/destroy a framer and APIs for the framer users (framer consumer) to obtain a reference to the framer, and use the framer. This basic implementation provides a framer abstraction for: - power on/off the framer - get the framer status (line state) - be notified on framer status changes - get/set the framer configuration Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20231128132534.258459-2-herve.codina@bootlin.com Signed-off-by: Linus Walleij commit 2a62644800208fcba79a55b297ec0d9aad115221 Author: Dmitry Antipov Date: Mon Dec 11 12:05:32 2023 +0300 net: asix: fix fortify warning When compiling with gcc version 14.0.0 20231129 (experimental) and CONFIG_FORTIFY_SOURCE=y, I've noticed the following warning: ... In function 'fortify_memcpy_chk', inlined from 'ax88796c_tx_fixup' at drivers/net/ethernet/asix/ax88796c_main.c:287:2: ./include/linux/fortify-string.h:588:25: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning] 588 | __read_overflow2_field(q_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... This call to 'memcpy()' is interpreted as an attempt to copy TX_OVERHEAD (which is 8) bytes from 4-byte 'sop' field of 'struct tx_pkt_info' and thus overread warning is issued. Since we actually want to copy both 'sop' and 'seg' fields at once, use the convenient 'struct_group()' here. Signed-off-by: Dmitry Antipov Acked-by: Łukasz Stelmach Link: https://lore.kernel.org/r/20231211090535.9730-1-dmantipov@yandex.ru Signed-off-by: Jakub Kicinski commit 8174dff9e583f7791dacf6d8ce034eb18ec2b292 Author: Chris Morgan Date: Mon Nov 20 17:01:31 2023 -0600 arm64: dts: rockchip: Add Anbernic RG351V Add support for the Anbernic RG351V, which is a handheld gaming console from Anbernic with an RK3326 SoC, a 640x480 LCD display, a single analog joystick with several face buttons, two USB C ports, and internal WiFi over USB. All hardware has been tested as working except for the battery, which will require further modification to the mainline rk817 battery driver before it can be used (the device was built without a shunt resistor, and as such the battery cannot measure current; only voltage). Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20231120230131.57705-4-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 9e63209d2099b89d5148379f879c9cd5841599dd Author: Chris Morgan Date: Mon Nov 20 17:01:30 2023 -0600 arm64: dts: rockchip: Split RG351M from Odroid Go Advance Split the RG351M into its own DTSI file. The RG351M, unlike the Odroid Go Advance, has no ADC joysticks, no GPIO buttons (except for volume on the RG351V), a PWM vibrator that interferes with an Odroid regulator, and different LEDs. Split the RG351M into a DTSI file that can then be imported into the DTS files for the RG351M and a new RG351V. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20231120230131.57705-3-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 8a64f5f0c692261a3e6686aee89f5c7136f54b89 Author: Chris Morgan Date: Mon Nov 20 17:01:29 2023 -0600 dt-bindings: arm: rockchip: Add Anbernic RG351V The Anbernic RG351V is a portable gaming console from Anbernic with the RK3326 SoC. Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231120230131.57705-2-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit b0140a1b3b1deeb1af557a275eeae99e7f40763f Author: Dragan Simic Date: Tue Dec 12 09:01:40 2023 +0100 arm64: dts: rockchip: Add ethernet0 alias to the dts for RK3588(S) boards Add ethernet0 alias to the board dts files for a few supported RK3588 and RK3588S boards that had it missing. Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/9af2026bf8a5538aff627381289cb06f2fab4263.1702368023.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit 36d9b3ae708e865cdab95692db5a24c5d975383d Author: Dragan Simic Date: Tue Dec 12 09:01:39 2023 +0100 arm64: dts: rockchip: Add ethernet0 alias to the dts for RK3566 boards Add ethernet0 alias to the board dts files for a few supported RK3566 boards that had it missing. Also, remove the ethernet0 alias from one RK3566 SoM dtsi file, which doesn't enable the GMAC, and add the ethernet0 alias back to the dependent board dts files, which actually enable the GMAC. Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/d2a272e0ae0fff0adfab8bb0238243b11d348799.1702368023.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit b110e4cc44c9c59600397a4c042c3e419edf05f1 Author: Dragan Simic Date: Tue Dec 12 08:53:51 2023 +0100 arm64: dts: rockchip: Remove ethernet0 alias from the SoC dtsi for PX30 Not all supported boards actually use the PX30's built-in (G)MAC, while the SoC TRM and the datasheet don't define some standard numbering in this case. Thus, remove the ethernet0 alias from the PX30 SoC dtsi file, and add the same alias back to the appropriate board dts(i) files. This is quite similar to the already performed migration of the mmcX aliases from the Rockchip SoC dtsi files to the board dts(i) files. Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/0d9da8959b4f567622676c34b5feb74c49489554.1702366958.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit 9012ab6bd092691d0655a2ffca1108b306cb9446 Author: Dragan Simic Date: Tue Dec 12 08:53:50 2023 +0100 arm64: dts: rockchip: Remove ethernetX aliases from the SoC dtsi for RK3328 Not all supported boards actually use the RK3328's built-in GMACs, while the SoC TRM and the datasheet don't define some standard numbering in this case. Thus, remove the ethernet0 and ethernet1 aliases from the RK3328 SoC dtsi file, and add the same alias back to the appropriate board dts(i) files. These changes also touch one RK3318-based board dts, because it actually depends on the RK3328 SoC dtsi and enables one of the GMACs. This is quite similar to the already performed migration of the mmcX aliases from the Rockchip SoC dtsi files to the board dts(i) files. Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/0c14f2e354d32f5d45c718ce16643553ca72f6a5.1702366958.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit c900fef5deffdc533a6468cc4e72eda348e1857e Author: Dragan Simic Date: Tue Dec 12 08:53:49 2023 +0100 arm64: dts: rockchip: Remove ethernet0 alias from the SoC dtsi for RK3368 Not all supported boards actually use the RK3368's built-in GMAC, while the SoC TRM and the datasheet don't define some standard numbering in this case. Thus, remove the ethernet0 alias from the RK3368 SoC dtsi file, and add the same alias back to the appropriate board dts(i) files. This is quite similar to the already performed migration of the mmcX aliases from the Rockchip SoC dtsi files to the board dts(i) files. Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/77115184d633190c917d868f883070e100d93dbc.1702366958.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit 5d90cb1edcf7c1854e4cecb52871421f29d3d849 Author: Dragan Simic Date: Tue Dec 12 08:53:48 2023 +0100 arm64: dts: rockchip: Remove ethernet0 alias from the SoC dtsi for RK3399 Not all supported boards actually use the RK3399's built-in GMAC, while the SoC TRM and the datasheet don't define some standard numbering in this case. Thus, remove the ethernet0 alias from the RK3399 SoC dtsi file, and add the same alias back to the appropriate board dts(i) files. This is quite similar to the already performed migration of the mmcX aliases from the Rockchip SoC dtsi files to the board dts(i) files. Signed-off-by: Dragan Simic Link: https://lore.kernel.org/r/20879826c01fb9ead71c339866846ea794669802.1702366958.git.dsimic@manjaro.org Signed-off-by: Heiko Stuebner commit c87847cfc1f4e09a1ad9a5dd04b862da81c8102e Author: David Heidelberg Date: Sat Dec 9 18:15:40 2023 +0100 arm64: dts: rockchip: make dts use gpio-fan matrix instead of array No functional changes. Adjust to comply with dt-schema requirements and make possible to validate values. Acked-by: Heiko Stuebner Signed-off-by: David Heidelberg Link: https://lore.kernel.org/r/20231209171653.85468-2-david@ixit.cz Signed-off-by: Heiko Stuebner commit 998513442cb2e3a8c3a538584f784eccef122a6e Author: Johan Jonker Date: Sat Dec 2 19:22:58 2023 +0100 arm64: dts: rockchip: add gpio alias for gpio dt nodes Rockchip SoC TRM, SoC datasheet and board schematics always refer to the same gpio numbers - even if not all are used for a specific board. In order to not have to re-define them for every board add the aliases to SoC dtsi files. Co-developed-by: Jianqun Xu Signed-off-by: Jianqun Xu Signed-off-by: Johan Jonker Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/56daeead-1d35-44bb-00c0-614b84a986de@gmail.com Signed-off-by: Heiko Stuebner commit f56804453a7f41a37d14f7ad325af6231a84a82a Author: Lukasz Luba Date: Mon Nov 27 08:15:11 2023 +0000 arm64: dts: rockchip: Add dynamic-power-coefficient to rk3399 GPU Add dynamic-power-coefficient to the GPU node. That will create Energy Model for the GPU based on the coefficient and OPP table information. It will enable mechanism such as DTMP or IPA to work with the GPU DVFS. In similar way the Energy Model for CPUs in rk3399 is created, so both are aligned in power scale. The maximum power used from this coefficient is 1.5W at 600MHz. Signed-off-by: Lukasz Luba Link: https://lore.kernel.org/r/20231127081511.1911706-1-lukasz.luba@arm.com Signed-off-by: Heiko Stuebner commit a86e88043de929da76f7f6cf0990ba92aed8391a Author: Heiko Stuebner Date: Tue Dec 5 17:48:42 2023 +0100 arm64: dts: rockchip: add rk3588 spi aliases to soc dtsi The spi controllers on rk3588 are named spi0 - spi4. Board schematics also use these exact numbers and we want those names to also reflect in the OS devices because everything else would just cause confusion. Userspace spi access is a thing afterall. To prevent each board repeating their list of spi aliases, define them in the soc dtsi, as previous Rockchip soc like the rk356x do already. Signed-off-by: Heiko Stuebner Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20231205164842.556684-5-heiko@sntech.de commit a024abedbca99a20aeb96f5beec9ded13c85dcb3 Author: Heiko Stuebner Date: Tue Dec 5 17:48:41 2023 +0100 arm64: dts: rockchip: add rk3588 gpio aliases to soc dtsi The gpio controllers on rk3588 are named gpio0 - gpio4. Board schematics also use these exact numbers and we want those names to also reflect in the OS devices because everything else would just cause confusion. Userspace gpio access is a thing afterall. To prevent each board repeating their list of gpio aliases, define them in the soc dtsi, as previous Rockchip soc like the rk356x do already. Signed-off-by: Heiko Stuebner Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20231205164842.556684-4-heiko@sntech.de commit 328e901b7b03d292c1520ffb38e9164feef4f1ea Author: Heiko Stuebner Date: Tue Dec 5 17:48:40 2023 +0100 arm64: dts: rockchip: add rk3588 i2c aliases to soc dtsi The i2c controllers on rk3588 are named i2c0 - i2c8. Board schematics also use these exact numbers and we want those names to also reflect in the OS devices because everything else would just cause confusion. Userspace i2c access is a thing afterall. To prevent each board repeating their list of i2c aliases, define them in the soc dtsi, as all previous Rockchip soc do already. Signed-off-by: Heiko Stuebner Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20231205164842.556684-3-heiko@sntech.de commit 9918d10d16665527e59fdb87c5acac70cc1cfe8f Author: Heiko Stuebner Date: Tue Dec 5 17:48:39 2023 +0100 arm64: dts: rockchip: move rk3588 serial aliases to soc dtsi The serial ports on rk3588 are named uart0 - uart9. Board schematics also use these exact numbers and we want those names to also reflect in the OS devices because everything else would just cause confusion. To prevent each board repeating their list of serial aliases, move them to the soc dtsi, as all previous Rockchip soc do already. Signed-off-by: Heiko Stuebner Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/20231205164842.556684-2-heiko@sntech.de commit d1b8b36a2cc5f4ef14774e37e09ebbe3bd702dbd Author: Heiko Stuebner Date: Fri Dec 1 20:11:03 2023 +0100 arm64: dts: rockchip: add Theobroma Jaguar SBC Add a board dts for the Jaguar SBC from Theobroma-Systems JAGUAR is a Single-Board Computer (SBC) based around the rk3588 SoC and is targeting Autonomous Mobile Robots (AMR). It features: * LPDDR4X (up to 16GB) * 1Gbps Ethernet on RJ45 connector (KSZ9031 or KSZ9131) * PCIe 3.0 4-lane on M.2 M-key connector * PCIe 2.1 1-lane on M.2 E-key * USB 2.0 on M.2 E-key * 2x USB3 OTG type-c ports with DP Alt-Mode * USB2 host port * HDMI output * 2x camera connectors, each exposing: * 2-lane MIPI-CSI * 1v2, 1v8, 2v8 power rails * I2C bus * GPIOs * PPS input * CAN * RS485 UART * FAN connector * SD card slot * eMMC (up to 256GB) * RTC backup battery * Companion microcontroller * ISL1208 RTC emulation * AMC6821 PWM emulation * On/off buzzer control * Secure Element * 80-pin Mezzanine connector for daughterboards: * GPIOs * 1Gbps Ethernet * PCIe 2.1 1-lane * 2x 2-lane MIPI-CSI * ADC channel * I2C bus * PWM * UART * SPI * SDIO * CAN * I2S * 1v8, 3v3, 5v0, dc-in (12-24V) power rails Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20231201191103.343097-3-heiko@sntech.de commit ba2110e546705f410cea7bff06e1f19453290996 Author: Heiko Stuebner Date: Fri Dec 1 20:11:02 2023 +0100 dt-bindings: arm: rockchip: Add Theobroma-Systems Jaguar SBC Add the binding for the Jaguar board from Theobroma-Systems. Signed-off-by: Heiko Stuebner Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231201191103.343097-2-heiko@sntech.de commit e99adc97e21afbe33cd2b20b9869dbdc682e2b06 Author: Chris Morgan Date: Mon Dec 4 12:57:19 2023 -0600 arm64: dts: rockchip: Add Powkiddy X55 Add support for the Powkiddy X55. The Powkiddy X55 is a handheld gaming device with a 720p 5.5 inch screen powered by the Rockchip RK3566 SoC. It includes a Realtek 8821cs WiFi/BT module, 2 ADC joysticks powered by 4 dedicated ADC channels, and several GPIO face buttons. There are 2 SDMMC slots (sdmmc1 and sdmmc3), and an 8GB internal eMMC. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20231204185719.569021-11-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 18f413c5dc285373ad440a5054f760a6a0452d48 Author: Chris Morgan Date: Mon Dec 4 12:57:18 2023 -0600 dt-bindings: arm: rockchip: Add Powkiddy X55 The Powkiddy X55 is a handheld gaming device made by Powkiddy and powered by the Rockchip RK3566 SoC. This device is somewhat similar to the existing Powkiddy RK3566 devices, which have been grouped together with a previous commit[1]. [1] https://lore.kernel.org/linux-rockchip/20231117202536.1387815-1-macroalpha82@gmail.com/T/#m4764997cfafaca22fe677200de96caa5fb8f0005 Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231204185719.569021-10-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 0773a4a199aabb60afe50f5a19a6772abf4ad0bf Author: Sebastian Reichel Date: Mon Nov 6 16:54:32 2023 +0100 arm64: dts: rockchip: add USB3 host to rock-5a Enable USB3 host controller for the Radxa ROCK 5 Model A. This adds USB3 for the lower USB3 port (the one closer to the PCB). The upper USB3 port uses the RK3588 USB TypeC host controller, which use a different PHY without upstream support. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20231106155934.80838-2-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit f97d78b9f6cff4c680206a8c8b03f726f0dc2c8b Author: Sebastian Reichel Date: Mon Nov 6 16:54:31 2023 +0100 arm64: dts: rockchip: add USB3 host to rock-5b Enable USB3 host controller for the Radxa ROCK 5 Model B. This adds USB3 for the upper USB3 port (the one further away from the PCB). The lower USB3 and the USB-C ports use the RK3588 USB TypeC host controller, which use a different PHY without upstream support. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20231106155934.80838-1-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit 20d03e13841e299ec665a4297865cf37fb6ca36d Author: shironeko Date: Thu Nov 16 16:40:43 2023 -0500 arm64: dts: rockchip: add missing tx/rx-fifo-depth for rk3328 gmac Without fifo depths attempting to change the MTU will fail. These values are from the RK3328 Technical Reference Manual, gmac2io interface tested with Rock64. Signed-off-by: shironeko Link: https://lore.kernel.org/r/20231116214042.11134-2-shironeko@tesaguri.club Signed-off-by: Heiko Stuebner commit c45de75d7a9ab44a15dedc7a121d6371d6891301 Author: Trevor Woerner Date: Mon Nov 20 11:22:32 2023 -0500 arm64: dts: rockchip: add gpio-line-names to rk3308-rock-pi-s Add names to the pins of the general-purpose expansion header as given in the Radxa GPIO page[1] following the conventions in the kernel documentation[2] to make it easier for users to correlate the pins with functions when using utilities such as gpioinfo. [1] https://wiki.radxa.com/RockpiS/hardware/gpio [2] Documentation/devicetree/bindings/gpio/gpio.txt Signed-off-by: Trevor Woerner Link: https://lore.kernel.org/r/20231120162232.27653-1-twoerner@gmail.com Signed-off-by: Heiko Stuebner commit bf88f7d920da2bbabef16404a449a4f72cc0ffcd Author: Ilpo Järvinen Date: Tue Nov 21 14:34:28 2023 +0200 e1000e: Use pcie_capability_read_word() for reading LNKSTA Use pcie_capability_read_word() for reading LNKSTA and remove the custom define that matches to PCI_EXP_LNKSTA. As only single user for cap_offset remains, replace it with a call to pci_pcie_cap(). Instead of e1000_adapter, make local variable out of pci_dev because both users are interested in it. Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Reviewed-by: Simon Horman Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 3ebccf1d1ca74bbb78e6f8c38d1d172e468d91f8 Author: Andy Shevchenko Date: Mon Dec 11 13:14:29 2023 +0200 ACPI: LPSS: Fix the fractional clock divider flags The conversion to CLK_FRAC_DIVIDER_POWER_OF_TWO_PS uses wrong flags in the parameters and hence miscalculates the values in the clock divider. Fix this by applying the flag to the proper parameter. Fixes: 82f53f9ee577 ("clk: fractional-divider: Introduce POWER_OF_TWO_PS flag") Reported-by: Alex Vinarskis Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 569b26af7919c15a8ce231b4fae29cfbd811f144 Author: Johan Jonker Date: Mon Dec 4 18:40:58 2023 +0100 ARM: dts: rockchip: add hdmi-connector node to rk3036-kylin Add hdmi-connector node to comply with the inno_hdmi binding. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/f5bc182b-f9b6-26a8-8649-19ce33e3c0e1@gmail.com Signed-off-by: Heiko Stuebner commit 27ded76ef0fcfcf939914532aae575cf23c221b4 Author: Johan Jonker Date: Mon Dec 4 18:40:27 2023 +0100 ARM: dts: rockchip: fix rk3036 hdmi ports node Fix hdmi ports node so that it matches the rockchip,inno-hdmi.yaml binding. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/9a2afac1-ed5c-382d-02b0-b2f5f1af3abb@gmail.com Signed-off-by: Heiko Stuebner commit e3f577830ce216b0ca21d4750cbbd64cfc21efff Author: Yuntao Wang Date: Wed Dec 6 18:43:18 2023 +0800 ACPI: NUMA: Fix the logic of getting the fake_pxm value The for loop does not iterate over the last element of the node_to_pxm_map array. This could lead to a conflict between the final fake_pxm value and the existing pxm values. That is, the final fake_pxm value can not be guaranteed to be an unused pxm value. While at it, fix up white space in slit_valid(). Signed-off-by: Yuntao Wang [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit ec0f96260737ae23dcad57463fdc32eba025b11d Author: Yuntao Wang Date: Wed Dec 6 18:43:17 2023 +0800 ACPI: NUMA: Optimize the check for the availability of node values The first_unset_node() function returns the first unused node in nodes_found_map. If all nodes are in use, the function returns MAX_NUMNODES. Use this return value to determine whether there are any available node values in nodes_found_map, eliminating the need to use nodes_weight() for this purpose. Signed-off-by: Yuntao Wang [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 9ecc3b38abebd18998af40f42029ba84f3f4311c Author: Yuntao Wang Date: Wed Dec 6 18:43:16 2023 +0800 ACPI: NUMA: Remove unnecessary check in acpi_parse_gi_affinity() The acpi_map_pxm_to_node() function will never return a node value that is greater than or equal to MAX_NUMNODES. Remove the unnecessary `node >= MAX_NUMNODES` check to keep the code consistent with other users of the acpi_map_pxm_to_node() function. Signed-off-by: Yuntao Wang Signed-off-by: Rafael J. Wysocki commit c95f5b21a0eaa4a2701c28e2b209f9a7e09cd4f0 Author: Peter Griffin Date: Mon Dec 11 16:23:28 2023 +0000 tty: serial: samsung: Add gs101 compatible and common fifoszdt_serial_drv_data Add serial driver data for Google Tensor gs101 SoC and a common fifoszdt_serial_drv_data that can be used by platforms that specify the samsung,uart-fifosize DT property. A corresponding dt-bindings patch updates the yaml to ensure samsung,uart-fifosize is a required property. Tested-by: Will McVicker Acked-by: Greg Kroah-Hartman Reviewed-by: Sam Protsenko Reviewed-by: Arnd Bergmann Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-14-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2c597bb7d66a55f2af2fff9bf4629dd07b3b9a1e Author: Peter Griffin Date: Mon Dec 11 16:23:23 2023 +0000 clk: samsung: clk-gs101: Add cmu_top, cmu_misc and cmu_apm support cmu_top is the top level clock management unit which contains PLLs, muxes, dividers and gates that feed the other clock management units. cmu_misc clocks IPs such as Watchdog and cmu_apm clocks ips part of the APM module. Reviewed-by: Sam Protsenko Reviewed-by: André Draszik Acked-by: Chanwoo Choi Tested-by: Will McVicker Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-9-peter.griffin@linaro.org [krzysztof: drop not needed linux/of_device.h include] Signed-off-by: Krzysztof Kozlowski commit 13ff3bdafdd569e62e59330de18aae25ec15c97b Author: Peter Griffin Date: Mon Dec 11 16:23:22 2023 +0000 clk: samsung: clk-pll: Add support for pll_{0516,0517,518} These plls are found in the Tensor gs101 SoC found in the Pixel 6. pll0516x: Integer PLL with high frequency pll0517x: Integer PLL with middle frequency pll0518x: Integer PLL with low frequency PLL0516x FOUT = (MDIV * 2 * FIN)/PDIV * 2^SDIV) PLL0517x and PLL0518x FOUT = (MDIV * FIN)/PDIV*2^SDIV) The PLLs are similar enough to pll_0822x that the same code can handle both. The main difference is the change in the fout formula for the high frequency 0516 pll. Locktime for 516,517 & 518 is 150 the same as the pll_0822x lock factor. MDIV, SDIV PDIV masks and bit shifts are also the same as 0822x. When defining the PLL the "con" parameter should be set to CON3 register, like this PLL(pll_0517x, CLK_FOUT_SHARED0_PLL, "fout_shared0_pll", "oscclk", PLL_LOCKTIME_PLL_SHARED0, PLL_CON3_PLL_SHARED0, NULL), Acked-by: Chanwoo Choi Tested-by: Will McVicker Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-8-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 803b60b72df4ae2daeea62c7734a299bc28a8553 Merge: beea67c7c2ef1 5b02a863ba502 Author: Krzysztof Kozlowski Date: Tue Dec 12 20:27:59 2023 +0100 Merge tag 'samsung-dt-bindings-refactoring-and-google-gs101-6.8' into next/drivers Samsung Devicetree bindings topic branch for v6.8 Topic branch collecting several changes to Samsung SoC Devicetree bindings: 1. Add specific compatibles to all Samsung Exynos and Tesla FSD blocks, because that's what guidelines expect [1] and is generally recommended practice. Existing compatibles are left untouched, thus no driver changes are needed. The work only cleans things up, so any future contributions will use recommended style: specific and fallback compatibles. 2. Add bindings for new devices: Samsung ExynosAutov920 and Google GS101. These bindings are needed for both DTS and drivers, e.g. clock drivers. commit 8a3134a02538096e35dddc3c80676505c2edf57c Author: Randy Dunlap Date: Tue Dec 5 14:50:45 2023 -0800 ACPI: watchdog: fix kernel-doc warnings Fix kernel-doc warnings found when using "W=1". acpi_watchdog.c:85: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst acpi_watchdog.c:85: warning: missing initial short description on line: * Returns true if this system should prefer ACPI based watchdog instead of Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit 5b02a863ba502482f25ae3a1bfa259838793785b Author: Peter Griffin Date: Mon Dec 11 16:23:21 2023 +0000 dt-bindings: clock: google,gs101: fix incorrect numbering and DGB suffix 166 was skipped by mistake and two clocks: * CLK_MOUT_CMU_HSI0_USBDPDGB * CLK_GOUT_HSI0_USBDPDGB Have an incorrect DGB ending instead of DBG. This is an ABI break, but as the patch was only applied yesterday this header has never been in an actual release so it seems better to fix this early than ignore it. Fixes: 0a910f160638 ("dt-bindings: clock: Add Google gs101 clock management unit bindings") Signed-off-by: Peter Griffin Reviewed-by: Chanwoo Choi Reviewed-by: Sam Protsenko Reviewed-by: André Draszik Link: https://lore.kernel.org/r/20231211162331.435900-7-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit d793f7c471fb1cc9b5cf5aee5484f4231ef48dc8 Author: Tudor Ambarus Date: Mon Dec 11 16:23:20 2023 +0000 dt-bindings: soc: samsung: usi: add google,gs101-usi compatible Add google,gs101-usi dedicated compatible for representing USI of Google GS101 SoC. Reviewed-by: Sam Protsenko Signed-off-by: Tudor Ambarus Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-6-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2072496129b7d7448f969b6334b4fd2e876a642d Author: Peter Griffin Date: Mon Dec 11 16:23:19 2023 +0000 dt-bindings: serial: samsung: Make samsung,uart-fifosize a required property Specifying samsung,uart-fifosize in both DT and driver static data is error prone and relies on driver probe order and dt aliases to be correct. Additionally on many Exynos platforms these are (USI) universal serial interfaces which can be uart, spi or i2c, so it can change per board. For google,gs101-uart make samsung,uart-fifosize a required property. For this platform fifosize now *only* comes from DT. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-5-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit bad3bc0a23b74e7b353978b6f58eed6c0f3b51a0 Author: Peter Griffin Date: Mon Dec 11 16:23:18 2023 +0000 dt-bindings: serial: samsung: Add google-gs101-uart compatible Add dedicated google-gs101-uart compatible to the dt-schema for representing uart of the Google Tensor gs101 SoC. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-4-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 81306efd22fff7eecf4e62919283dd27111f0173 Author: Peter Griffin Date: Mon Dec 11 16:23:16 2023 +0000 dt-bindings: watchdog: Document Google gs101 watchdog bindings Add the "google,gs101-wdt" compatible to the dt-schema documentation. gs101 SoC has two CPU clusters and each cluster has its own dedicated watchdog timer (similar to exynos850 and exynosautov9 SoCs). These WDT instances are controlled using different bits in PMU registers. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231211162331.435900-2-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4a8be01a1a7a030ae7b6138602d2e060cf7a0946 Author: Peter Griffin Date: Mon Dec 11 16:23:24 2023 +0000 pinctrl: samsung: Add gs101 SoC pinctrl configuration Add support for the pin-controller found on the gs101 SoC used in Pixel 6 phones. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231211162331.435900-10-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit b6b5028473ceb3054f8a440f85e3d728a3fba1dc Author: Drew Fustini Date: Wed Dec 6 00:09:24 2023 -0800 riscv: dts: thead: Enable LicheePi 4A eMMC and microSD Add emmc node properties for the eMMC device and add sdio0 node properties for the microSD slot. Set the frequency for the sdhci reference clock. Signed-off-by: Drew Fustini Reviewed-by: Guo Ren Reviewed-by: Jisheng Zhang Signed-off-by: Conor Dooley commit 18d92a03b319b10269a8aca478b31496a9701326 Author: Drew Fustini Date: Wed Dec 6 00:09:23 2023 -0800 riscv: dts: thead: Enable BeagleV Ahead eMMC and microSD Add emmc node properties for the eMMC device and add sdio0 node properties for the microSD slot. Set the frequency for the sdhci reference clock. Signed-off-by: Drew Fustini Reviewed-by: Guo Ren Reviewed-by: Jisheng Zhang Signed-off-by: Conor Dooley commit a77f02e8489673cc80948a6f30ed262db1dee8d6 Author: Drew Fustini Date: Wed Dec 6 00:09:22 2023 -0800 riscv: dts: thead: Add TH1520 mmc controllers and sdhci clock Add node for the fixed reference clock used for emmc and sdio nodes. Add emmc node for the 1st dwcmshc instance which is typically connected to an eMMC device. Add sdio0 node for the 2nd dwcmshc instance which is typically connected to microSD slot. Add sdio1 node for the 3rd dwcmshc instance which is typically connected to an SDIO WiFi module. The node names are based on Table 1-2 C910/C906 memory map in the TH1520 System User Manual. Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs Signed-off-by: Drew Fustini Reviewed-by: Emil Renner Berthing Reviewed-by: Guo Ren Reviewed-by: Jisheng Zhang Signed-off-by: Conor Dooley commit 2c3878820bf0bbd659c2b897add8a011b5e9f2e1 Author: Lucas De Marchi Date: Thu Dec 22 13:58:12 2022 -0800 drm/xe/gt: Fix min() with u32 and u64 Fix the following error while building for 32b: In file included from ../drivers/gpu/drm/xe/xe_gt.c:6: ../drivers/gpu/drm/xe/xe_gt.c: In function ‘gt_ttm_mgr_init’: ../include/linux/minmax.h:20:35: error: comparison of distinct pointer types lacks a cast [-Werror] 20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ^~ Cast it to u64 so size of the second operand matches the first one when building it for 32 bits. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit ebec269c522fc9bb48d11b65456b01adbdecb97d Author: Lucas De Marchi Date: Thu Dec 22 12:18:26 2022 -0800 drm/xe: Fix tracepoints on 32b Leave the types as u64, but cast the pointers to unsigned long before assigning so the compiler doesn't throw warning about casting a pointer to integer of different size. Also, size_t should use %zu, not %ld. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 9a6e6c14bfde967fca5a052cbee206d0b6169a1e Author: Lucas De Marchi Date: Thu Dec 22 12:15:24 2022 -0800 drm/xe/mmio: Use non-atomic writeq/readq variant for 32b writeq() and readq() and other functions working on 64 bit variables are not provided by 32b arch. For that it's needed to choose between linux/io-64-nonatomic-hi-lo.h and linux/io-64-nonatomic-lo-hi.h, spliting the read/write in 2 accesses. For xe driver, it doesn't matter much, so just choose one and include in xe_mmio.h. This also removes some ifdef CONFIG_64BIT we had around because of the missing 64bit functions. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 857912c37ea786715e03b5bf25db07e28fc2ba73 Author: Lucas De Marchi Date: Thu Dec 22 12:14:27 2022 -0800 drm/xe: Fix some log messages on 32b Either use the proper format or cast up to 64b depending on the case. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 4aa18ae44686144c5c5d29113d6e2c5c3ebb349d Author: Lucas De Marchi Date: Thu Dec 22 12:11:45 2022 -0800 drm/xe/ggtt: Use BIT_ULL() for 64bit Make sure it's 64bit value in both 32b and 64b arch. Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit 760f168db30a5c06893e87c88f25cd3578a8453a Author: Philippe Lecluse Date: Fri Jan 13 14:07:17 2023 +0000 drm/xe: fix xe_mmio_total_vram_size As also cause issue on PVC, moving back to what we did before stolen was introduced Signed-off-by: Philippe Lecluse Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit d8731500721d5ae26819de36c63921f4baaafe00 Author: Matthew Auld Date: Thu Jan 12 16:34:09 2023 +0000 drm/xe/pcode: fix pcode error check On DG2 we are now getting: [ 104.456607] xe 0000:03:00.0: [drm] *ERROR* PCODE timeout, retrying with preemption disabled Looks like we just need to invert the error check for xe_pcode_try_request(), which returns zero on success. Signed-off-by: Matthew Auld Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 2c33b49a6e6f8e176735eaca9ec6170478e0a426 Author: Philippe Lecluse Date: Thu Jan 12 17:25:38 2023 -0500 drm/xe: enforce GSMBASE for DG1 instead of BAR2 On DG1, BAR2 is not reliable for reporting Vram size, need to use GSMBASE. Simplify xe_mmio_total_vram_size to report vram size and usable size. Signed-off-by: Philippe Lecluse Reviewed-by: Matthew Auld Signed-off-by: Rodrigo Vivi commit c343bacfad5db03c4156ff3a44e3a5547afb246f Author: Maarten Lankhorst Date: Thu Jan 12 17:25:36 2023 -0500 drm/xe: Fix hidden gotcha regression with bo create The bo_create ioctl relied on the internal ordering of memory regions to be the same, make sure we don't allocate stolen instead of VRAM0. Also remove a debug warning left in. Signed-off-by: Maarten Lankhorst Reviewed-by: Philippe Lecluse Signed-off-by: Rodrigo Vivi commit 5e37266307df08f981d929c267bab6bfae8c4d53 Author: Matthew Brost Date: Thu Jan 12 17:25:33 2023 -0500 drm/xe/guc: Add support GuC MMIO send / recv SRIOV has a use case of GuC MMIO send / recv, add a function for it. Signed-off-by: Matthew Brost Reviewed-by: Philippe Lecluse Signed-off-by: Rodrigo Vivi commit f900725af8b66ec8484680c693fa4ae93cb7259d Author: Matthew Brost Date: Thu Jan 12 17:25:32 2023 -0500 drm/xe/guc: s/xe_guc_send_mmio/xe_guc_mmio_send Now aligns with the xe_guc_ct_send naming. Signed-off-by: Matthew Brost Reviewed-by: Philippe Lecluse Signed-off-by: Rodrigo Vivi commit 99c821b00bf65e76415bf4c8d04d4d92987505cb Author: Matthew Brost Date: Thu Jan 12 17:25:31 2023 -0500 drm/xe/guc: Report submission version of GuC firmware Starting in 70.6.* GuC firmware the CSS header includes the submission version, pull this from the CSS header. Prior 70.* versions accidentally omitted this informatio so hard code to the correct values. This information will be used by VFs when communicating with the PF. Signed-off-by: Matthew Brost Reviewed-by: Philippe Lecluse Signed-off-by: Rodrigo Vivi commit da34c2cf85a4739d4e2b1b5515a0fbc8f8e60358 Author: Matthew Brost Date: Thu Jan 12 17:25:30 2023 -0500 drm/xe: Fake pulling gt->info.engine_mask from hwconfig blob The blob doesn't fully support this yet, so fake for now to ensure our driver load order is correct. Once the blob supports pulling gt->info.engine_mask from the blob, this patch can be removed. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Rodrigo Vivi commit 60694edf668a5c837d7bf05bd2250388e2ada9a8 Author: Matthew Brost Date: Thu Jan 12 17:25:28 2023 -0500 drm/xe: Ensure VMA not userptr before calling xe_bo_is_stolen Fix the below splat: [ 142.510525] [IGT] xe_exec_basic: starting subtest once-userptr [ 142.511339] BUG: kernel NULL pointer dereference, address: 0000000000000228 [ 142.518311] #PF: supervisor read access in kernel mode [ 142.523458] #PF: error_code(0x0000) - not-present page [ 142.528604] PGD 0 P4D 0 [ 142.531153] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 142.535518] CPU: 4 PID: 1199 Comm: kworker/u16:8 Not tainted 6.1.0-rc1-xe+ #1 [ 142.542656] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.3243.A01.2006102133 06/10/2020 [ 142.556033] Workqueue: events_unbound async_op_work_func [xe] [ 142.561810] RIP: 0010:xe_bo_is_stolen+0x0/0x20 [xe] [ 142.566709] Code: 20 c8 75 05 83 fa 07 74 05 c3 cc cc cc cc 48 8b 87 08 02 00 00 0f b6 80 2c ff ff ff c3 cc cc cc cc 66 0f 1f 84 00 00 00 00 00 <48> 8b 87 28 02 00 00 83 78 10 07 0f 94 c0 c3 cc cc cc cc 66 66 2e [ 142.585447] RSP: 0018:ffffc900019eb888 EFLAGS: 00010246 [ 142.590678] RAX: 0000000000000002 RBX: 0000000000000000 RCX: ffff88813f6a2108 [ 142.597821] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 142.604962] RBP: ffffc900019ebbc0 R08: 0000000000000001 R09: 0000000000000000 [ 142.612101] R10: 0000000000000001 R11: 0000000000000001 R12: ffff88814107d600 [ 142.619242] R13: ffffc900019eba20 R14: ffff888140442000 R15: 0000000000000000 [ 142.626378] FS: 0000000000000000(0000) GS:ffff88849fa00000(0000) knlGS:0000000000000000 [ 142.634468] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 142.640219] CR2: 0000000000000228 CR3: 000000010a4c0006 CR4: 0000000000770ee0 [ 142.647361] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 142.654505] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 142.661639] PKRU: 55555554 [ 142.664367] Call Trace: [ 142.666830] [ 142.668947] __xe_pt_bind_vma+0x1a1/0xa50 [xe] [ 142.673417] ? unwind_next_frame+0x187/0x770 [ 142.677699] ? __thaw_task+0xc0/0xc0 [ 142.681293] ? __lock_acquire+0x5e4/0x26e0 [ 142.685409] ? lockdep_hardirqs_on+0xbf/0x140 [ 142.689779] ? lock_acquire+0xd2/0x310 [ 142.693548] ? mark_held_locks+0x49/0x80 [ 142.697485] ? xe_vm_bind_vma+0xf1/0x3d0 [xe] [ 142.701866] xe_vm_bind_vma+0xf1/0x3d0 [xe] [ 142.706082] xe_vm_bind+0x76/0x140 [xe] [ 142.709944] vm_bind_ioctl+0x26f/0xb40 [xe] [ 142.714161] ? async_op_work_func+0x20c/0x450 [xe] [ 142.718974] async_op_work_func+0x20c/0x450 [xe] [ 142.723620] process_one_work+0x263/0x580 [ 142.727645] ? process_one_work+0x580/0x580 [ 142.731839] worker_thread+0x4d/0x3b0 [ 142.735518] ? process_one_work+0x580/0x580 [ 142.739714] kthread+0xeb/0x120 [ 142.742872] ? kthread_complete_and_exit+0x20/0x20 [ 142.747671] ret_from_fork+0x1f/0x30 [ 142.751264] Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Rodrigo Vivi commit d8b52a02cb40fe355374e8b0b89763fefc697b53 Author: Maarten Lankhorst Date: Thu Jan 12 17:25:17 2023 -0500 drm/xe: Implement stolen memory. This adds support for stolen memory, with the same allocator as vram_mgr. This allows us to skip a whole lot of copy-paste, by re-using parts of xe_ttm_vram_mgr. The stolen memory may be bound using VM_BIND, so it performs like any other memory region. We should be able to map a stolen BO directly using the physical memory location instead of through GGTT even on old platforms, but I don't know what the effects are on coherency. Signed-off-by: Maarten Lankhorst Reviewed-by: Matthew Brost Signed-off-by: Rodrigo Vivi commit 765b65e5bde79a9e8332c58f54a98e20fdb25fc7 Author: Matthew Brost Date: Thu Jan 12 17:25:14 2023 -0500 drm/xe: Take memory ref on kernel job creation When a job is inflight we may access memory to read the hardware seqno. All user jobs have VM open which has a ref but kernel jobs do not require VM so it is possible to not have memory ref. To avoid this, take a memory ref on kernel job creation. Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi commit e9d285ff9d4998d20790395adc8a62f283bdb72b Author: Thomas Hellström Date: Thu Jan 12 17:25:13 2023 -0500 drm/xe/migrate: Add kerneldoc for the migrate subsystem Add kerneldoc for structs and external functions. Signed-off-by: Thomas Hellström Cc: Matthew Brost Signed-off-by: Rodrigo Vivi Reviewed-by: Mauro Carvalho Chehab commit 7dc9b92dcfeff727776bca5ab11b3e0f3445ece2 Author: Rodrigo Vivi Date: Thu Jan 12 17:25:12 2023 -0500 drm/xe: Remove i915_utils dependency from xe_pcode. Expand xe_mmio_wait32 to accept atomic and then use that directly when possible, and create own routine to wait for the pcode status. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 81593af6c88d3482997e43f0a85ccd93cc4928df Author: Rodrigo Vivi Date: Thu Jan 12 17:25:11 2023 -0500 drm/xe: Convert xe_mmio_wait32 to us so we can stop using wait_for_us. Another clean-up towards killing the usage of i915_utils.h Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit eeb8019d8c6fba1eae6ef8a238b42ff9b39dbaa4 Author: Rodrigo Vivi Date: Thu Jan 12 17:25:10 2023 -0500 drm/xe: Let's avoid i915_utils in the xe_force_wake. We can run the bit operation locally without yet another macro. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit b56d208273bf5be6593d0dcd2d471f771c08a805 Author: Rodrigo Vivi Date: Thu Jan 12 17:25:09 2023 -0500 drm/xe: Stop using i915_utils in xe_wopcm. We don't need any macro for a simple check we can do explicitly and clear. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit b6f468b847d09ca1fe5cea2606a323be892f8893 Author: Rodrigo Vivi Date: Thu Jan 12 17:25:08 2023 -0500 drm/xe: Remove i915_utils dependency from xe_guc_pc. To make it simpler, all of the status checks also waits and times out. Also, no ktime precision is needed in this case, and we can use usleep_range because we are not in atomic paths here. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit eb04985d7211a5fc651f8cca588b2d78d3a36cee Author: Rodrigo Vivi Date: Thu Jan 12 17:25:07 2023 -0500 drm/xe: Wait for success on guc done. Rather than a constant check on proto and wait not busy, let's wait for the expected success and then check the protocol afterwards. With this, we can now use the regular xe_mmio_wait32 and kill this local need for the wait_for. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 2e5be5d57dbe5e04a5abbd01417fc098f8925a35 Author: Rodrigo Vivi Date: Thu Jan 12 17:25:06 2023 -0500 drm/xe: Convert guc_ready to regular xe_mmio_wait32 Possible now that the wait function returns the last read value. So we can remove the users of i915's wait_for one by one... Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 7aaec3a623adda324f2435153a105088a8556b9a Author: Rodrigo Vivi Date: Fri Mar 31 14:21:34 2023 -0400 drm/xe: Let's return last value read on xe_mmio_wait32. This is already useful because it avoids some extra reads where registers might have changed after the timeout decision. But also, it will be important to end the kill of i915's wait_for. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 86011ae21c15a779dcf25b97d5670371dc14e4c3 Author: Rodrigo Vivi Date: Thu Jan 12 17:25:04 2023 -0500 drm/xe: Stop using i915's range_overflows_t macro. Let's do it directly. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit 0f06dc101972d598d1c6bb356436c3dbf1e4b646 Author: Rodrigo Vivi Date: Thu Jan 12 17:25:03 2023 -0500 drm/xe: Implement a local xe_mmio_wait32 Then, move the i915_utils.h include to its user. The overall goal is to kill all the usages of the i915_utils stuff. Yes, wait_for also depends on , so they go together to where it is needed. It will be likely needed anyway directly for udelay or usleep_range. Signed-off-by: Rodrigo Vivi Reviewed-by: Matthew Brost commit dd08ebf6c3525a7ea2186e636df064ea47281987 Author: Matthew Brost Date: Thu Mar 30 17:31:57 2023 -0400 drm/xe: Introduce a new DRM driver for Intel GPUs Xe, is a new driver for Intel GPUs that supports both integrated and discrete platforms starting with Tiger Lake (first Intel Xe Architecture). The code is at a stage where it is already functional and has experimental support for multiple platforms starting from Tiger Lake, with initial support implemented in Mesa (for Iris and Anv, our OpenGL and Vulkan drivers), as well as in NEO (for OpenCL and Level0). The new Xe driver leverages a lot from i915. As for display, the intent is to share the display code with the i915 driver so that there is maximum reuse there. But it is not added in this patch. This initial work is a collaboration of many people and unfortunately the big squashed patch won't fully honor the proper credits. But let's get some git quick stats so we can at least try to preserve some of the credits: Co-developed-by: Matthew Brost Co-developed-by: Matthew Auld Co-developed-by: Matt Roper Co-developed-by: Thomas Hellström Co-developed-by: Francois Dugast Co-developed-by: Lucas De Marchi Co-developed-by: Maarten Lankhorst Co-developed-by: Philippe Lecluse Co-developed-by: Nirmoy Das Co-developed-by: Jani Nikula Co-developed-by: José Roberto de Souza Co-developed-by: Rodrigo Vivi Co-developed-by: Dave Airlie Co-developed-by: Faith Ekstrand Co-developed-by: Daniel Vetter Co-developed-by: Mauro Carvalho Chehab Signed-off-by: Rodrigo Vivi Signed-off-by: Matthew Brost commit d9d9bd979cced7d4a51b65224b1d7f396c8b4eea Author: Levi Yun Date: Thu Nov 9 16:08:22 2023 +0000 maple_tree: change return type of mas_split_final_node as void. mas_split_final_node() always returns true and its return value is never checked. Change return type to void. Link: https://lkml.kernel.org/r/20231109160821.16248-2-ppbuk5246@gmail.com Signed-off-by: Levi Yun Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit d19b1a1797d8e73eebce7eced289e0c7c1b5de80 Author: Barry Song <21cnbao@gmail.com> Date: Thu Dec 7 00:00:54 2023 +1300 mm: compaction: avoid fast_isolate_freepages blindly choose improper pageblock Testing shows fast_isolate_freepages can blindly choose an unsuitable pageblock from time to time particularly while the min mark is used from XXX path: if (!page) { cc->fast_search_fail++; if (scan_start) { /* * Use the highest PFN found above min. If one was * not found, be pessimistic for direct compaction * and use the min mark. */ if (highest >= min_pfn) { page = pfn_to_page(highest); cc->free_pfn = highest; } else { if (cc->direct_compaction && pfn_valid(min_pfn)) { /* XXX */ page = pageblock_pfn_to_page(min_pfn, min(pageblock_end_pfn(min_pfn), zone_end_pfn(cc->zone)), cc->zone); cc->free_pfn = min_pfn; } } } } The reason is that no code is doing any check on the min_pfn min_pfn = pageblock_start_pfn(cc->free_pfn - (distance >> 1)); In contrast, slow path of isolate_freepages() is always skipping unsuitable pageblocks in a decent way. This issue doesn't happen quite often. When running 25 machines with 16GiB memory for one night, most of them can hit this unexpected code path. However the frequency isn't like many times per second. It might be one time in a couple of hours. Thus, it is very hard to measure the visible performance impact in my machines though the affection of choosing the unsuitable migration_target should be negative in theory. I feel it's still worth fixing this to at least make the code theoretically self-explanatory as it is quite odd an unsuitable migration_target can be still migration_target. Link: https://lkml.kernel.org/r/20231206110054.61617-1-v-songbaohua@oppo.com Signed-off-by: Barry Song Reported-by: Zhanyuan Hu Reviewed-by: Baolin Wang Cc: David Hildenbrand Cc: Johannes Weiner Cc: Kemeng Shi Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Signed-off-by: Andrew Morton commit dd05f5ec1e468b7dd723e1571dbd41d6f30a201d Author: Chen Haonan Date: Wed Dec 6 18:36:27 2023 +0800 mm: use vma_pages() for vma objects vma_pages() is more readable and also better at avoiding error codes, so use vma_pages() instead of direct operations on vma Link: https://lkml.kernel.org/r/tencent_151850CF327EB055BBC83298A929BD06CD0A@qq.com Signed-off-by: Chen Haonan Signed-off-by: Andrew Morton commit 4196810a2542562c9a2ae4146f2908e7858d6af4 Author: Li zeming Date: Tue Dec 5 10:17:51 2023 +0800 mm: cma: remove unnecessary initialization of ret The ret variable can be defined without assigning a value, as it is assigned before use. Link: https://lkml.kernel.org/r/20231205021751.100459-1-zeming@nfschina.com Signed-off-by: Li zeming Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton commit 49b960de6b323c34a79e6e92219fac31b12268a3 Author: Muchun Song Date: Tue Dec 5 11:08:53 2023 +0800 mm: hugetlb_vmemmap: move mmap lock to vmemmap_remap_range() All the users of vmemmap_remap_range() will hold the mmap lock and release it once it returns, it is naturally to move the lock to vmemmap_remap_range() to simplify the code and the users. Link: https://lkml.kernel.org/r/20231205030853.3921-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Cc: Mike Kravetz Signed-off-by: Andrew Morton commit 47e61d8874cca8070d4f9295819876c18b5207b2 Author: Muchun Song Date: Tue Dec 5 11:05:30 2023 +0800 mm: hugetlb_vmemmap: add check of CONFIG_MEMORY_HOTPLUG back The compiler will optimize the code as much as possible if we add the check of CONFIG_MEMORY_HOTPLUG back. Link: https://lkml.kernel.org/r/20231205030530.3802-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Cc: Mike Kravetz Signed-off-by: Andrew Morton commit a1748f85bec936d87cac8a9785fb2a38147fc998 Author: Li zeming Date: Tue Dec 5 10:29:54 2023 +0800 mm: filemap: remove unnecessary iitialization of ret The ret variable can be defined without assigning a value, as it is assigned before use. Link: https://lkml.kernel.org/r/20231205022954.101045-1-zeming@nfschina.com Signed-off-by: Li zeming Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 683ec99f12f4c386c23bed7f6a8ef44db5a4999a Author: Dmytro Maluka Date: Tue Dec 5 18:02:44 2023 +0100 mm/thp: add CONFIG_TRANSPARENT_HUGEPAGE_NEVER option Currently enabling THP support (CONFIG_TRANSPARENT_HUGEPAGE) requires enabling either CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS or CONFIG_TRANSPARENT_HUGEPAGE_MADVISE, which both cause khugepaged starting by default at kernel bootup. Add the third choice CONFIG_TRANSPARENT_HUGEPAGE_NEVER, in line with the existing kernel command line setting transparent_hugepage=never, to disable THP by default (in particular, to prevent starting khugepaged by default) but still allow enabling it at runtime via sysfs. Rationale: khugepaged has its own non-negligible memory cost even if it is not used by any applications, since it bumps up vm.min_free_kbytes to its own required minimum in set_recommended_min_free_kbytes(). For example, on a machine with 4GB RAM, with 3 mm zones and pageblock_order == MAX_ORDER, starting khugepaged causes vm.min_free_kbytes increase from 8MB to 132MB. So if we use THP on machines with e.g. >=8GB of memory for better performance, but avoid using it on lower-memory machines to avoid its memory overhead, then for the same reason we also want to avoid even starting khugepaged on those <8GB machines. So with CONFIG_TRANSPARENT_HUGEPAGE_NEVER we can use the same kernel image on both >=8GB and <8GB machines, with THP support enabled but khugepaged not started by default. The userspace can then decide to enable THP via sysfs if needed, based on the total amount of memory. This could also be achieved with the existing transparent_hugepage=never setting in the kernel command line instead. But it seems cleaner to avoid tweaking the command line for such a basic setting. P.S. I see that CONFIG_TRANSPARENT_HUGEPAGE_NEVER was already proposed in the past [1] but without an explanation of the purpose. [1] https://lore.kernel.org/all/202211301651462590168@zte.com.cn/ Link: https://lkml.kernel.org/r/20231205170244.2746210-1-dmaluka@chromium.org Link: https://lore.kernel.org/all/20231204163254.2636289-1-dmaluka@chromium.org/ Signed-off-by: Dmytro Maluka Signed-off-by: Andrew Morton commit b75427691f4a1fd3625d1f4c016832b8c75c2326 Author: Kefeng Wang Date: Fri Nov 10 11:33:21 2023 +0800 mm: huge_memory: use more folio api in __split_huge_page_tail() Use more folio APIs to save six compound_head() calls in __split_huge_page_tail(). Link: https://lkml.kernel.org/r/20231110033324.2455523-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 39042079a0c241d09fa6fc3bb67c2ddf60011d0f Author: Catalin Marinas Date: Fri Dec 1 19:08:29 2023 +0000 kmemleak: avoid RCU stalls when freeing metadata for per-CPU pointers On systems with large number of CPUs, the following soft lockup splat might sometimes happen: [ 2656.001617] watchdog: BUG: soft lockup - CPU#364 stuck for 21s! [ksoftirqd/364:2206] : [ 2656.141194] RIP: 0010:_raw_spin_unlock_irqrestore+0x3d/0x70 : 2656.241214] Call Trace: [ 2656.243971] [ 2656.246237] ? show_trace_log_lvl+0x1c4/0x2df [ 2656.251152] ? show_trace_log_lvl+0x1c4/0x2df [ 2656.256066] ? kmemleak_free_percpu+0x11f/0x1f0 [ 2656.261173] ? watchdog_timer_fn+0x379/0x470 [ 2656.265984] ? __pfx_watchdog_timer_fn+0x10/0x10 [ 2656.271179] ? __hrtimer_run_queues+0x5f3/0xd00 [ 2656.276283] ? __pfx___hrtimer_run_queues+0x10/0x10 [ 2656.281783] ? ktime_get_update_offsets_now+0x95/0x2c0 [ 2656.287573] ? ktime_get_update_offsets_now+0xdd/0x2c0 [ 2656.293380] ? hrtimer_interrupt+0x2e9/0x780 [ 2656.298221] ? __sysvec_apic_timer_interrupt+0x184/0x640 [ 2656.304211] ? sysvec_apic_timer_interrupt+0x8e/0xc0 [ 2656.309807] [ 2656.312169] [ 2656.326110] kmemleak_free_percpu+0x11f/0x1f0 [ 2656.331015] free_percpu.part.0+0x1b/0xe70 [ 2656.335635] free_vfsmnt+0xb9/0x100 [ 2656.339567] rcu_do_batch+0x3c8/0xe30 [ 2656.363693] rcu_core+0x3de/0x5a0 [ 2656.367433] __do_softirq+0x2d0/0x9a8 [ 2656.381119] run_ksoftirqd+0x36/0x60 [ 2656.385145] smpboot_thread_fn+0x556/0x910 [ 2656.394971] kthread+0x2a4/0x350 [ 2656.402826] ret_from_fork+0x29/0x50 [ 2656.406861] The issue is caused by kmemleak registering each per_cpu_ptr() corresponding to the __percpu pointer. This is unnecessary since such individual per-CPU pointers are not tracked anyway. Create a new object_percpu_tree_root rbtree that stores a single __percpu pointer together with an OBJECT_PERCPU flag for the kmemleak metadata. Scanning needs to be done for all per_cpu_ptr() pointers with a cond_resched() between each CPU iteration to avoid RCU stalls. [catalin.marinas@arm.com: update comment] Link: https://lkml.kernel.org/r/20231206114414.2085824-1-catalin.marinas@arm.com Link: https://lore.kernel.org/r/20231127194153.289626-1-longman@redhat.comLink: https://lkml.kernel.org/r/20231201190829.825856-1-catalin.marinas@arm.com Signed-off-by: Catalin Marinas Reported-by: Waiman Long Closes: https://lore.kernel.org/r/20231127194153.289626-1-longman@redhat.com Reviewed-by: Waiman Long Signed-off-by: Andrew Morton commit f67f8d4a8c1e1ebc85a6cbdb9a7266f14863461c Author: Steven Rostedt (Google) Date: Fri Dec 1 14:59:36 2023 -0500 mm/rmap: fix misplaced parenthesis of a likely() Running my yearly branch profiler to see where likely/unlikely annotation may be added or removed, I discovered this: correct incorrect % Function File Line ------- --------- - -------- ---- ---- 0 457918 100 page_try_dup_anon_rmap rmap.h 264 [..] 458021 0 0 page_try_dup_anon_rmap rmap.h 265 I thought it was interesting that line 264 of rmap.h had a 100% incorrect annotation, but the line directly below it was 100% correct. Looking at the code: if (likely(!is_device_private_page(page) && unlikely(page_needs_cow_for_dma(vma, page)))) It didn't make sense. The "likely()" was around the entire if statement (not just the "!is_device_private_page(page)"), which also included the "unlikely()" portion of that if condition. If the unlikely portion is unlikely to be true, that would make the entire if condition unlikely to be true, so it made no sense at all to say the entire if condition is true. What is more likely to be likely is just the first part of the if statement before the && operation. It's likely to be a misplaced parenthesis. And after making the if condition broken into a likely() && unlikely(), both now appear to be correct! Link: https://lkml.kernel.org/r/20231201145936.5ddfdb50@gandalf.local.home Fixes:fb3d824d1a46c ("mm/rmap: split page_dup_rmap() into page_dup_file_rmap() and page_try_dup_anon_rmap()") Signed-off-by: Steven Rostedt (Google) Acked-by: Vlastimil Babka Cc: David Hildenbrand Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton commit ec056cef76a525706601b32048f174f9bea72c7c Author: Ryan Roberts Date: Fri Dec 1 16:10:45 2023 +0000 mm/readahead: do not allow order-1 folio The THP machinery does not support order-1 folios because it requires meta data spanning the first 3 `struct page`s. So order-2 is the smallest large folio that we can safely create. There was a theoretical bug whereby if ra->size was 2 or 3 pages (due to the device-specific bdi->ra_pages being set that way), we could end up with order = 1. Fix this by unconditionally checking if the preferred order is 1 and if so, set it to 0. Previously this was done in a few specific places, but with this refactoring it is done just once, unconditionally, at the end of the calculation. This is a theoretical bug found during review of the code; I have no evidence to suggest this manifests in the real world (I expect all device-specific ra_pages values are much bigger than 3). Link: https://lkml.kernel.org/r/20231201161045.3962614-1-ryan.roberts@arm.com Signed-off-by: Ryan Roberts Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit cf503cc665c442ce9893cb12561c57a328465e29 Author: Kefeng Wang Date: Sat Nov 18 10:32:32 2023 +0800 mm: memory: use folio_prealloc() in wp_page_copy() Use folio_prealloc() helper to simplify code a bit. Link: https://lkml.kernel.org/r/20231118023232.1409103-6-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Sidhartha Kumar Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit e4621e70469c3ac6e1b6914f1c42941a8a6e44d2 Author: Kefeng Wang Date: Sat Nov 18 10:32:31 2023 +0800 mm: memory: use a folio in do_cow_fault() Use folio_prealloc() helper and convert to use a folio in do_cow_fault(), which save five compound_head() calls. Link: https://lkml.kernel.org/r/20231118023232.1409103-5-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Vishal Moola (Oracle) Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Sidhartha Kumar Signed-off-by: Andrew Morton commit 294de6d8f14a69f1251b94223ba9d90d64b28cec Author: Kefeng Wang Date: Sat Nov 18 10:32:30 2023 +0800 mm: memory: rename page_copy_prealloc() to folio_prealloc() Let's rename page_copy_prealloc() to folio_prealloc(), which could be reused in more functons, as it maybe zero the new page, pass a new need_zero to it, and call the vma_alloc_zeroed_movable_folio() if need_zero is true. Link: https://lkml.kernel.org/r/20231118023232.1409103-4-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Sidhartha Kumar Reviewed-by: Vishal Moola (Oracle) Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit f8b6187d8dd98fd32fe393071f362a7b6beaad0a Author: Kefeng Wang Date: Sat Nov 18 10:32:29 2023 +0800 mm: memory: use a folio in validate_page_before_insert() Use a folio in validate_page_before_insert() to save two compound_head() calls. Link: https://lkml.kernel.org/r/20231118023232.1409103-3-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Reviewed-by: Sidhartha Kumar Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 1486fb50136f4799946f5ecfe050094574647153 Author: Kefeng Wang Date: Sat Nov 18 10:32:28 2023 +0800 mm: ksm: use more folio api in ksm_might_need_to_copy() Patch series "mm: cleanup and use more folio in page fault", v3. Rename page_copy_prealloc() to folio_prealloc(), which is used by more functions, also do more folio conversion in page fault. This patch (of 5): Since ksm only support normal page, no swapout/in for ksm large folio too, add large folio check in ksm_might_need_to_copy(), also convert page->index to folio->index as page->index is going away. Then convert ksm_might_need_to_copy() to use more folio api to save nine compound_head() calls, short 'address' to reduce max-line-length. Link: https://lkml.kernel.org/r/20231118023232.1409103-1-wangkefeng.wang@huawei.com Link: https://lkml.kernel.org/r/20231118023232.1409103-2-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Cc: David Hildenbrand Cc: Matthew Wilcox (Oracle) Cc: Sidhartha Kumar Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 6140edeea8bf30bf94c23b18c39448b43f528f46 Author: SeongJae Park Date: Thu Nov 30 02:36:52 2023 +0000 Docs/admin-guide/mm/damon/usage: document for quota goals Update DAMON sysfs usage for newly added DAMOS quota goals interface. Link: https://lkml.kernel.org/r/20231130023652.50284-10-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 0972913f9673b13f18c9d72199e25ae07cc1876b Author: SeongJae Park Date: Thu Nov 30 02:36:51 2023 +0000 Docs/ABI/damon: document DAMOS quota goals Update DAMON ABI document for the newly added DAMON sysfs files and inputs for DAMOS quota goals. Link: https://lkml.kernel.org/r/20231130023652.50284-9-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 3143a7bfd2a9852d63a2d88109cf5af49fcf4950 Author: SeongJae Park Date: Thu Nov 30 02:36:50 2023 +0000 Docs/mm/damon/design: document DAMOS quota auto tuning Document the DAMOS quota auto tuning feature on the design document. Link: https://lkml.kernel.org/r/20231130023652.50284-8-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 3649caed1c9b7aa57049620c498596c17fc7af9e Author: SeongJae Park Date: Thu Nov 30 02:36:49 2023 +0000 selftests/damon: test quota goals directory Add DAMON selftests for testing creation/existence of quota goals directories and files, and simple valid input writes. Link: https://lkml.kernel.org/r/20231130023652.50284-7-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit f1762cb3eaea34add3655ecd0be9a77aca4e884c Author: SeongJae Park Date: Thu Nov 30 02:36:48 2023 +0000 mm/damon/core-test: add a unit test for the feedback loop algorithm Implement a simple kunit test for testing the behavior of the feedback loop algorithm for the aim-oriented feedback-friven DAMOS aggressiveness auto tuning. Link: https://lkml.kernel.org/r/20231130023652.50284-6-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit d91beaa505a0789c78adcf3ab021f5ed79794697 Author: SeongJae Park Date: Thu Nov 30 02:36:47 2023 +0000 mm/damon/sysfs-schemes: implement a command for scheme quota goals only commit To update DAMOS quota goals, users need to enter 'commit' command to the 'state' file of the kdamond, which applies not only the goals but entire inputs. It is inefficient. Implement yet another 'state' file input command for reading and committing only the scheme quota goals, namely 'commit_schemes_quota_goals'. Link: https://lkml.kernel.org/r/20231130023652.50284-5-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 8b549a4fd3c5fd721e268564596095398b0469bc Author: SeongJae Park Date: Thu Nov 30 02:36:46 2023 +0000 mm/damon/sysfs-schemes: commit damos quota goals user input to DAMOS Make DAMON sysfs interface to read the user inputs for DAMOS quota goals and pass those to DAMOS, so that the users can use the quota auto-tuning feature. It uses the DAMON sysfs interface's user input commit mechanism, which applies all user inputs for initial starting of DAMON and online input updates, which can be done by writing 'on' and 'commit' to the kdamond's 'state' file, respectively. In other words, the user should periodically write appropriate value to 'current_value' files and 'commit' command to the 'state' file. 'target_value' files could also be similarly updated at any time. Note that the interface is supporting multiple goals while the core logic supports only one goal. DAMON sysfs interface passes only best feedback among the given inputs, to avoid making DAMOS too aggressive. Link: https://lkml.kernel.org/r/20231130023652.50284-4-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 7f262da0a30df32a960f90ab6c11b08a7233ea34 Author: SeongJae Park Date: Thu Nov 30 02:36:45 2023 +0000 mm/damon/sysfs-schemes: implement files for scheme quota goals setup Implement DAMON sysfs directories and files for the goals of DAMOS quota. Those allow users set multiple goals for their aim, with target values. Users can further enter the current score value for each goal as feedback for DAMOS. Note that this commit is implementing only the basic file operations, and not connecting the files with the DAMOS core logic. Hence writing something to the files makes no real effect. The following commit will connect the file operations and the core logic. Link: https://lkml.kernel.org/r/20231130023652.50284-3-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 9294a037c01564786abb15436529fae3863268a2 Author: SeongJae Park Date: Thu Nov 30 02:36:44 2023 +0000 mm/damon/core: implement goal-oriented feedback-driven quota auto-tuning Patch series "mm/damon: let users feed and tame/auto-tune DAMOS". Introduce Aim-oriented Feedback-driven DAMOS Aggressiveness Auto-tuning. It makes DAMOS self-tuned with periodic simple user feedback. Background: DAMOS Control Difficulty ==================================== DAMOS helps users easily implement access pattern aware system operations. However, controlling DAMOS in the wild is not that easy. The basic way for DAMOS control is specifying the target access pattern. In this approach, the user is assumed to well understand the access pattern and the characteristics of the system and the workloads. Though there are useful tools for that, it takes time and effort depending on the complexity and the dynamicity of the system and the workloads. After all, the access pattern consists of three ranges, namely the size, the access rate, and the age of the regions. It means users need to tune six parameters, which is anyway not a simple task. One of the worst cases would be DAMOS being too aggressive like a berserker, and therefore consuming too much system resource and making unwanted radical system operations. To let users avoid such cases, DAMOS allows users to set the upper-limit of the schemes' aggressiveness, namely DAMOS quota. DAMOS further provides its best-effort under the limit by prioritizing regions based on the access pattern of the regions. For example, users can ask DAMOS to page out up to 100 MiB of memory regions per second. Then DAMOS pages out regions that are not accessed for a longer time (colder) first under the limit. This allows users to set the target access pattern a bit naive with wider ranges, and focus on tuning only one parameter, the quota. In other words, the number of parameters to tune can be reduced from six to one. Still, however, the optimum value for the quota depends on the system and the workloads' characteristics, so not that simple. The number of parameters to tune can also increase again if the user needs to run multiple schemes. Aim-oriented Feedback-driven DAMOS Aggressiveness Auto Tuning ============================================================= Users would use DAMOS since they want to achieve something with it. They will likely have measurable metrics representing the achievement and the target number of the metric like SLO, and continuously measure that anyway. While the additional cost of getting the information is nearly zero, it could be useful for DAMOS to understand how appropriate its current aggressiveness is set, and adjust it on its own to make the metric value more close to the target. Based on this idea, we introduce a new way of tuning DAMOS with nearly zero additional effort, namely Aim-oriented Feedback-driven DAMOS Aggressiveness Auto Tuning. It asks users to provide feedback representing how well DAMOS is doing relative to the users' aim. Then DAMOS adjusts its aggressiveness, specifically the quota that provides the best effort result under the limit, based on the current level of the aggressiveness and the users' feedback. Implementation ============== The implementation asks users to represent the feedback with score numbers. The scores could be anything including user-space specific metrics including latency and throughput of special user-space workloads, and system metrics including free memory ratio, memory pressure stall time (PSI), and active to inactive LRU lists size ratio. The feedback scores and the aggressiveness of the given DAMOS scheme are assumed to be positively proportional, though. Selecting metrics of the assumption is the users' responsibility. The core logic uses the below simple feedback loop algorithm to calculate the next aggressiveness level of the scheme from the current aggressiveness level and the current feedback (target_score and current_score). It calculates the compensation for next aggressiveness as a proportion of current aggressiveness and distance to the target score. As a result, it arrives at the near-goal state in a short time using big steps when it's far from the goal, but avoids making unnecessarily radical changes that could turn out to be a bad decision using small steps when its near to the goal. f(n) = max(1, f(n - 1) * ((target_score - current_score) / target_score + 1)) Note that the compensation value becomes negative when it's over achieving the goal. That's why the feedback metric and the aggressiveness of the scheme should be positively proportional. The distance-adaptive speed manipulation is simply applied. Example Use Cases ================= If users want to reduce the memory footprint of the system as much as possible as long as the time spent for handling the resulting memory pressure is within a threshold, they could use DAMOS scheme that reclaims cold memory regions aiming for a little level of memory pressure stall time. If users want the active/inactive LRU lists well balanced to reduce the performance impact due to possible future memory pressure, they could use two schemes. The first one would be set to locate hot pages in the active LRU list, aiming for a specific active-to-inactive LRU list size ratio, say, 70%. The second one would be to locate cold pages in the inactive LRU list, aiming for a specific inactive-to-active LRU list size ratio, say, 30%. Then, DAMOS will balance the two schemes based on the goal and feedback. This aim-oriented auto tuning could also be useful for general balancing-required access aware system operations such as system memory auto scaling[3] and tiered memory management[4]. These two example usages are not what current DAMOS implementation is already supporting, but require additional DAMOS action developments, though. Evaluation: subtle memory pressure aiming proactive reclamation =============================================================== To show if the implementation works as expected, we prepare four different system configurations on AWS i3.metal instances. The first setup (original) runs the workload without any DAMOS scheme. The second setup (not-tuned) runs the workload with a virtual address space-based proactive reclamation scheme that pages out memory regions that are not accessed for five seconds or more. The third setup (offline-tuned) runs the same proactive reclamation DAMOS scheme, but after making it tuned for each workload offline, using our previous user-space driven automatic tuning approach, namely DAMOOS[1]. The fourth and final setup (AFDAA) runs the scheme that is the same as that of 'not-tuned' setup, but aims to keep 0.5% of 'some' memory pressure stall time (PSI) for the last 10 seconds using the aiming-oriented auto tuning. For each setup, we run realistic workloads from PARSEC3 and SPLASH-2X benchmark suites. For each run, we measure RSS and runtime of the workload, and 'some' memory pressure stall time (PSI) of the system. We repeat the runs five times and use averaged measurements. For simple comparison of the results, we normalize the measurements to those of 'original'. In the case of the PSI, though, the measurement for 'original' was zero, so we normalize the value to that of 'not-tuned' scheme's result. The normalized results are shown below. Not-tuned Offline-tuned AFDAA RSS 0.622688178226118 0.787950678944904 0.740093483278979 runtime 1.11767826657912 1.0564674983585 1.0910833880499 PSI 1 0.727521443794069 0.308498846350299 The 'not-tuned' scheme achieves about 38.7% memory saving but incur about 11.7% runtime slowdown. The 'offline-tuned' scheme achieves about 22.2% memory saving with about 5.5% runtime slowdown. It also achieves about 28.2% memory pressure stall time saving. AFDAA achieves about 26% memory saving with about 9.1% runtime slowdown. It also achieves about 69.1% memory pressure stall time saving. We repeat this test multiple times, and get consistent results. AFDAA is now integrated in our daily DAMON performance test setup. Apparently the aggressiveness of 'AFDAA' setup is somewhere between those of 'not-tuned' and 'offline-tuned' setup, since its memory saving and runtime overhead are between those of the other two setups. Actually we set the memory pressure stall time goal aiming for this middle aggressiveness. The difference in the two metrics are not significant, though. However, it shows significant saving of the memory pressure stall time, which was the goal of the auto-tuning, over the two variants. Hence, we conclude the automatic tuning is working as expected. Please note that the AFDAA setup is only for the evaluation, and therefore intentionally set a bit aggressive. It might not be appropriate for production environments. The test code is also available[2], so you could reproduce it on your system and workloads. Patches Sequence ================ The first four patches implement the core logic and user interfaces for the auto tuning. The first patch implements the core logic for the auto tuning, and the API for DAMOS users in the kernel space. The second patch implements basic file operations of DAMON sysfs directories and files that will be used for setting the goals and providing the feedback. The third patch connects the quota goals files inputs to the DAMOS core logic. Finally the fourth patch implements a dedicated DAMOS sysfs command for efficiently committing the quota goals feedback. Two patches for simple tests of the logic and interfaces follow. The fifth patch implements the core logic unit test. The sixth patch implements a selftest for the DAMON Sysfs interface for the goals. Finally, three patches for documentation follows. The seventh patch documents the design of the feature. The eighth patch updates the API doc for the new sysfs files. The final eighth patch updates the usage document for the features. References ========== [1] DAOS paper: https://www.amazon.science/publications/daos-data-access-aware-operating-system [2] Evaluation code: https://github.com/damonitor/damon-tests/commit/3f884e61193f0166b8724554b6d06b0c449a712d [3] Memory auto scaling RFC idea: https://lore.kernel.org/damon/20231112195114.61474-1-sj@kernel.org/ [4] DAMON-based tiered memory management RFC idea: https://lore.kernel.org/damon/20231112195602.61525-1-sj@kernel.org/ This patch (of 9) Users can effectively control the upper-limit aggressiveness of DAMOS schemes using the quota feature. The quota provides best result under the limit by prioritizing regions based on the access pattern. That said, finding the best value, which could depend on dynamic characteristics of the system and the workloads, is still challenging. Implement a simple feedback-driven tuning mechanism and use it for automatic tuning of DAMOS quota. The implementation allows users to provide the feedback by setting a feedback score returning callback function. Then DAMOS periodically calls the function back and adjusts the quota based on the return value of the callback and current quota value. Note that the absolute-value based time/size quotas still work as the maximum hard limits of the scheme's aggressiveness. The feedback-driven auto-tuned quota is applied only if it is not exceeding the manually set maximum limits. Same for the scheme-target access pattern and filters like other features. [sj@kernel.org: document get_score_arg field of struct damos_quota] Link: https://lkml.kernel.org/r/20231204170106.60992-1-sj@kernel.org Link: https://lkml.kernel.org/r/20231130023652.50284-1-sj@kernel.org Link: https://lkml.kernel.org/r/20231130023652.50284-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Cc: Jonathan Corbet Cc: Shuah Khan Signed-off-by: Andrew Morton commit 4b86316ef18231109e4ebb3661ffc69d816fb56f Author: Nico Pache Date: Wed Nov 29 15:11:40 2023 -0700 selftests/mm: dont run ksm_functional_tests twice ksm functional test is already being run. Remove the duplicate call to ./ksm_functional_tests. Link: https://lkml.kernel.org/r/20231129221140.614713-1-npache@redhat.com Fixes: 93fb70aa5904 ("selftests/vm: add KSM unmerge tests") Signed-off-by: Nico Pache Acked-by: Joel Savitz Cc: David Hildenbrand Cc: Shuah Khan Signed-off-by: Andrew Morton commit b5ba474f3f518701249598b35c581b92a3c95b48 Author: Nhat Pham Date: Thu Nov 30 11:40:23 2023 -0800 zswap: shrink zswap pool based on memory pressure Currently, we only shrink the zswap pool when the user-defined limit is hit. This means that if we set the limit too high, cold data that are unlikely to be used again will reside in the pool, wasting precious memory. It is hard to predict how much zswap space will be needed ahead of time, as this depends on the workload (specifically, on factors such as memory access patterns and compressibility of the memory pages). This patch implements a memcg- and NUMA-aware shrinker for zswap, that is initiated when there is memory pressure. The shrinker does not have any parameter that must be tuned by the user, and can be opted in or out on a per-memcg basis. Furthermore, to make it more robust for many workloads and prevent overshrinking (i.e evicting warm pages that might be refaulted into memory), we build in the following heuristics: * Estimate the number of warm pages residing in zswap, and attempt to protect this region of the zswap LRU. * Scale the number of freeable objects by an estimate of the memory saving factor. The better zswap compresses the data, the fewer pages we will evict to swap (as we will otherwise incur IO for relatively small memory saving). * During reclaim, if the shrinker encounters a page that is also being brought into memory, the shrinker will cautiously terminate its shrinking action, as this is a sign that it is touching the warmer region of the zswap LRU. As a proof of concept, we ran the following synthetic benchmark: build the linux kernel in a memory-limited cgroup, and allocate some cold data in tmpfs to see if the shrinker could write them out and improved the overall performance. Depending on the amount of cold data generated, we observe from 14% to 35% reduction in kernel CPU time used in the kernel builds. [nphamcs@gmail.com: check shrinker enablement early, use less costly stat flushing] Link: https://lkml.kernel.org/r/20231206194456.3234203-1-nphamcs@gmail.com Link: https://lkml.kernel.org/r/20231130194023.4102148-7-nphamcs@gmail.com Signed-off-by: Nhat Pham Acked-by: Johannes Weiner Tested-by: Bagas Sanjaya Cc: Chris Li Cc: Dan Streetman Cc: Domenico Cerasuolo Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Seth Jennings Cc: Shakeel Butt Cc: Shuah Khan Cc: Vitaly Wool Cc: Yosry Ahmed Cc: Chengming Zhou Signed-off-by: Andrew Morton commit a697dc2be925d4814f26d7588347ccdd2c5525ed Author: Domenico Cerasuolo Date: Thu Nov 30 11:40:22 2023 -0800 selftests: cgroup: update per-memcg zswap writeback selftest The memcg-zswap self test is updated to adjust to the behavior change implemented by commit 87730b165089 ("zswap: make shrinking memcg-aware"), where zswap performs writeback for specific memcg. Link: https://lkml.kernel.org/r/20231130194023.4102148-6-nphamcs@gmail.com Signed-off-by: Domenico Cerasuolo Signed-off-by: Nhat Pham Tested-by: Bagas Sanjaya Acked-by: Chris Li (Google) Cc: Dan Streetman Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Seth Jennings Cc: Shakeel Butt Cc: Shuah Khan Cc: Vitaly Wool Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 7108cc3f765cafd48a6a35f8add140beaecfa75b Author: Domenico Cerasuolo Date: Thu Nov 30 11:40:21 2023 -0800 mm: memcg: add per-memcg zswap writeback stat Since zswap now writes back pages from memcg-specific LRUs, we now need a new stat to show writebacks count for each memcg. [nphamcs@gmail.com: rename ZSWP_WB to ZSWPWB] Link: https://lkml.kernel.org/r/20231205193307.2432803-1-nphamcs@gmail.com Link: https://lkml.kernel.org/r/20231130194023.4102148-5-nphamcs@gmail.com Suggested-by: Nhat Pham Signed-off-by: Domenico Cerasuolo Signed-off-by: Nhat Pham Tested-by: Bagas Sanjaya Reviewed-by: Yosry Ahmed Cc: Chris Li Cc: Dan Streetman Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Seth Jennings Cc: Shakeel Butt Cc: Shuah Khan Cc: Vitaly Wool Signed-off-by: Andrew Morton commit a65b0e7607ccb5e5184591f73e48512f25c76061 Author: Domenico Cerasuolo Date: Thu Nov 30 11:40:20 2023 -0800 zswap: make shrinking memcg-aware Currently, we only have a single global LRU for zswap. This makes it impossible to perform worload-specific shrinking - an memcg cannot determine which pages in the pool it owns, and often ends up writing pages from other memcgs. This issue has been previously observed in practice and mitigated by simply disabling memcg-initiated shrinking: https://lore.kernel.org/all/20230530232435.3097106-1-nphamcs@gmail.com/T/#u This patch fully resolves the issue by replacing the global zswap LRU with memcg- and NUMA-specific LRUs, and modify the reclaim logic: a) When a store attempt hits an memcg limit, it now triggers a synchronous reclaim attempt that, if successful, allows the new hotter page to be accepted by zswap. b) If the store attempt instead hits the global zswap limit, it will trigger an asynchronous reclaim attempt, in which an memcg is selected for reclaim in a round-robin-like fashion. [nphamcs@gmail.com: use correct function for the onlineness check, use mem_cgroup_iter_break()] Link: https://lkml.kernel.org/r/20231205195419.2563217-1-nphamcs@gmail.com [nphamcs@gmail.com: drop the pool's reference at the end of the writeback step] Link: https://lkml.kernel.org/r/20231206030627.4155634-1-nphamcs@gmail.com Link: https://lkml.kernel.org/r/20231130194023.4102148-4-nphamcs@gmail.com Signed-off-by: Domenico Cerasuolo Co-developed-by: Nhat Pham Signed-off-by: Nhat Pham Tested-by: Bagas Sanjaya Cc: Chris Li Cc: Dan Streetman Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Seth Jennings Cc: Shakeel Butt Cc: Shuah Khan Cc: Vitaly Wool Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit fdc4161ff6a5e96222e159c1f1b28d31a985130d Author: Nhat Pham Date: Thu Nov 30 11:40:19 2023 -0800 memcontrol: implement mem_cgroup_tryget_online() This patch implements a helper function that try to get a reference to an memcg's css, as well as checking if it is online. This new function is almost exactly the same as the existing mem_cgroup_tryget(), except for the onlineness check. In the !CONFIG_MEMCG case, it always returns true, analogous to mem_cgroup_tryget(). This is useful for e.g to the new zswap writeback scheme, where we need to select the next online memcg as a candidate for the global limit reclaim. Link: https://lkml.kernel.org/r/20231130194023.4102148-3-nphamcs@gmail.com Signed-off-by: Nhat Pham Tested-by: Bagas Sanjaya Reviewed-by: Yosry Ahmed Cc: Chris Li Cc: Dan Streetman Cc: Domenico Cerasuolo Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Seth Jennings Cc: Shakeel Butt Cc: Shuah Khan Cc: Vitaly Wool Signed-off-by: Andrew Morton commit 0a97c01cd20bb96359d8c9dedad92a061ed34e0b Author: Nhat Pham Date: Thu Nov 30 11:40:18 2023 -0800 list_lru: allow explicit memcg and NUMA node selection Patch series "workload-specific and memory pressure-driven zswap writeback", v8. There are currently several issues with zswap writeback: 1. There is only a single global LRU for zswap, making it impossible to perform worload-specific shrinking - an memcg under memory pressure cannot determine which pages in the pool it owns, and often ends up writing pages from other memcgs. This issue has been previously observed in practice and mitigated by simply disabling memcg-initiated shrinking: https://lore.kernel.org/all/20230530232435.3097106-1-nphamcs@gmail.com/T/#u But this solution leaves a lot to be desired, as we still do not have an avenue for an memcg to free up its own memory locked up in the zswap pool. 2. We only shrink the zswap pool when the user-defined limit is hit. This means that if we set the limit too high, cold data that are unlikely to be used again will reside in the pool, wasting precious memory. It is hard to predict how much zswap space will be needed ahead of time, as this depends on the workload (specifically, on factors such as memory access patterns and compressibility of the memory pages). This patch series solves these issues by separating the global zswap LRU into per-memcg and per-NUMA LRUs, and performs workload-specific (i.e memcg- and NUMA-aware) zswap writeback under memory pressure. The new shrinker does not have any parameter that must be tuned by the user, and can be opted in or out on a per-memcg basis. As a proof of concept, we ran the following synthetic benchmark: build the linux kernel in a memory-limited cgroup, and allocate some cold data in tmpfs to see if the shrinker could write them out and improved the overall performance. Depending on the amount of cold data generated, we observe from 14% to 35% reduction in kernel CPU time used in the kernel builds. This patch (of 6): The interface of list_lru is based on the assumption that the list node and the data it represents belong to the same allocated on the correct node/memcg. While this assumption is valid for existing slab objects LRU such as dentries and inodes, it is undocumented, and rather inflexible for certain potential list_lru users (such as the upcoming zswap shrinker and the THP shrinker). It has caused us a lot of issues during our development. This patch changes list_lru interface so that the caller must explicitly specify numa node and memcg when adding and removing objects. The old list_lru_add() and list_lru_del() are renamed to list_lru_add_obj() and list_lru_del_obj(), respectively. It also extends the list_lru API with a new function, list_lru_putback, which undoes a previous list_lru_isolate call. Unlike list_lru_add, it does not increment the LRU node count (as list_lru_isolate does not decrement the node count). list_lru_putback also allows for explicit memcg and NUMA node selection. Link: https://lkml.kernel.org/r/20231130194023.4102148-1-nphamcs@gmail.com Link: https://lkml.kernel.org/r/20231130194023.4102148-2-nphamcs@gmail.com Signed-off-by: Nhat Pham Suggested-by: Johannes Weiner Acked-by: Johannes Weiner Tested-by: Bagas Sanjaya Cc: Chris Li Cc: Dan Streetman Cc: Domenico Cerasuolo Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Seth Jennings Cc: Shakeel Butt Cc: Shuah Khan Cc: Vitaly Wool Cc: Yosry Ahmed Signed-off-by: Andrew Morton commit 330018fe69c66333cb2115e54f1844e471668fc3 Author: Peng Zhang Date: Mon Nov 20 15:09:37 2023 +0800 maple_tree: simplify mas_leaf_set_meta() Now it seems that the incoming 'end' is already pointing to the last item, so we can simplify this function, considering only whether the last slot is being used. This has passed the maple tree test suite. Link: https://lkml.kernel.org/r/20231120070937.35481-6-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Dan Carpenter Signed-off-by: Andrew Morton commit 026b935cd929c18d496fbf9432e8174ec40cdbc8 Author: Peng Zhang Date: Mon Nov 20 15:09:36 2023 +0800 maple_tree: delete one of the two identical checks There are two identical checks, delete one of them. Link: https://lkml.kernel.org/r/20231120070937.35481-5-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Dan Carpenter Signed-off-by: Andrew Morton commit c5e941213826d68b0d938dae540d9d6c143560ec Author: Peng Zhang Date: Mon Nov 20 15:09:35 2023 +0800 maple_tree: remove an unused parameter for ma_meta_end() The parameter maple_type is not used, so remove it. Link: https://lkml.kernel.org/r/20231120070937.35481-4-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Dan Carpenter Signed-off-by: Andrew Morton commit 3f05fcdebf2979569802e1ee94cf4c7d887546e2 Author: Peng Zhang Date: Mon Nov 20 15:09:34 2023 +0800 maple_tree: avoid ascending when mas->min is also the parent's minimum When the child node is the first child of its parent node, mas->min does not need to be updated. This can reduce the number of ascending times in some cases. Link: https://lkml.kernel.org/r/20231120070937.35481-3-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Dan Carpenter Signed-off-by: Andrew Morton commit 2e783f0c1a0d9017209f2ed243960924ebb602cb Author: Peng Zhang Date: Mon Nov 20 15:09:33 2023 +0800 maple_tree: move the check forward to avoid static check warning Patch series "Some cleanups of maple tree", v2. These are some small cleanups of maple tree. This patch (of 5): Put the check for gap before its reference to avoid Smatch static check warnings. This is not a bug, it's just a validation program. Even with this change, Smatch may still generate warnings because MT_BUG_ON() doesn't necessarily stop the program. It may require fixing Smatch itself to avoid these warnings. Link: https://lkml.kernel.org/r/20231120070937.35481-1-zhangpeng.00@bytedance.com Link: https://lkml.kernel.org/r/20231120070937.35481-2-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reported-by: Dan Carpenter Closes: http://lists.infradead.org/pipermail/maple-tree/2023-November/003046.html Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit d1fefa3d22447923e75ab2cd7abe302e43b77d0c Author: Jiapeng Chong Date: Fri Oct 27 16:49:44 2023 +0800 maple_tree: remove unused function The function are defined in the maple_tree.c file, but not called elsewhere, so delete the unused function. lib/maple_tree.c:689:29: warning: unused function 'mas_pivot'. Link: https://lkml.kernel.org/r/20231027084944.24888-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jiapeng Chong Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7064 Acked-by: David Hildenbrand Reviewed-by: Liam R. Howlett Signed-off-by: Andrew Morton commit a3c63c8c5df6406e79490456a1fc41a287676070 Author: Liam R. Howlett Date: Wed Nov 1 13:16:29 2023 -0400 maple_tree: mtree_range_walk() clean up mtree_range_walk() needed to be updated to avoid checking if there was a pivot value. On closer examination, the code could avoid setting min or max in certain scenarios. The commit removes the extra check for pivot[offset] before setting max and only sets max when necessary. It also only sets min if it is necessary by checking offset 0 prior to the loop (as it has always done). The commit also drops a dead node check since the end of the node will return the array size when the last slot is occupied (by a potential reuse in a dead node). The data will be discarded later if the node is marked dead. Benchmarking these changes results in an increase in performance of 5.45% using the BENCH_WALK in the maple tree test code. Link: https://lkml.kernel.org/r/20231101171629.3612299-13-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit 24662decdd44645e8f027d7912be962dd461d1aa Author: Liam R. Howlett Date: Wed Nov 1 13:16:28 2023 -0400 maple_tree: don't find node end in mtree_lookup_walk() Since the pivot being set is now reliable, the optimized loop no longer needs to find the node end. The redundant check for a dead node can also be avoided as there is no danger of using the wrong pivot since the results will be thrown out in the case of a dead node by the later check. This patch also adds a benchmark test for the function to the maple tree test framework. The benchmark shows an average increase performance of 5.98% over 3 runs with this commit. Link: https://lkml.kernel.org/r/20231101171629.3612299-12-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit 0de56e38b307b0cb2ac825e8e7cb371a28daf844 Author: Liam R. Howlett Date: Wed Nov 1 13:16:27 2023 -0400 maple_tree: use maple state end for write operations ma_wr_state was previously tracking the end of the node for writing. Since the implementation of the ma_state end tracking, this is duplicated work. This patch removes the maple write state tracking of the end of the node and uses the maple state end instead. Link: https://lkml.kernel.org/r/20231101171629.3612299-11-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit 9a40d45c1f2c49273c04938ec3d7849f685eb3c1 Author: Liam R. Howlett Date: Wed Nov 1 13:16:26 2023 -0400 maple_tree: remove mas_searchable() Now that the status of the maple state is outside of the node, the mas_searchable() function can be dropped for easier open-coding of what is going on. Link: https://lkml.kernel.org/r/20231101171629.3612299-10-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit 067311d33e650adfe7ae23765959ddcc1ba18510 Author: Liam R. Howlett Date: Wed Nov 1 13:16:25 2023 -0400 maple_tree: separate ma_state node from status The maple tree node is overloaded to keep status as well as the active node. This, unfortunately, results in a re-walk on underflow or overflow. Since the maple state has room, the status can be placed in its own enum in the structure. Once an underflow/overflow is detected, certain modes can restore the status to active and others may need to re-walk just that one node to see the entry. The status being an enum has the benefit of detecting unhandled status in switch statements. [Liam.Howlett@oracle.com: fix comments about MAS_*] Link: https://lkml.kernel.org/r/20231106154124.614247-1-Liam.Howlett@oracle.com [Liam.Howlett@oracle.com: update forking to separate maple state and node] Link: https://lkml.kernel.org/r/20231106154551.615042-1-Liam.Howlett@oracle.com [Liam.Howlett@oracle.com: fix mas_prev() state separation code] Link: https://lkml.kernel.org/r/20231207193319.4025462-1-Liam.Howlett@oracle.com Link: https://lkml.kernel.org/r/20231101171629.3612299-9-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit 271f61a8b41dcd86e1ecc2e0455bcc071bc7dde4 Author: Liam R. Howlett Date: Wed Nov 1 13:16:24 2023 -0400 maple_tree: clean up inlines for some functions There are a few functions which were inlined but are somewhat too large to inline, so remove the inline key word. There are also several very small functions which are used in critical code sections which gcc was not inlining, so make this more strict and use __always_line for these functions. Link: https://lkml.kernel.org/r/20231101171629.3612299-8-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit 1f41ef12abf8538b3d82cdae14c06aa171cb71ce Author: Liam R. Howlett Date: Wed Nov 1 13:16:23 2023 -0400 maple_tree: use cached node end in mas_destroy() The node end is set during the walk, so use the resulting end instead of re-fetching it. Link: https://lkml.kernel.org/r/20231101171629.3612299-7-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit e9c52d8940cbfd94b36035bbebce7f55954e7728 Author: Liam R. Howlett Date: Wed Nov 1 13:16:22 2023 -0400 maple_tree: use cached node end in mas_next() When looking for the next entry, don't recalculate the node end as it is now tracked in the maple state. Link: https://lkml.kernel.org/r/20231101171629.3612299-6-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit 31c532a8af57513228c2b12d281104198ff412b8 Author: Liam R. Howlett Date: Wed Nov 1 13:16:21 2023 -0400 maple_tree: add end of node tracking to the maple state Analysis of the mas_for_each() iteration showed that there is a significant time spent finding the end of a node. This time can be greatly reduced if the end of the node is cached in the maple state. Care must be taken to update & invalidate as necessary. Link: https://lkml.kernel.org/r/20231101171629.3612299-5-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit bf857ddd21d0bffc1edafc317e8e2ce0d6d5950c Author: Liam R. Howlett Date: Wed Nov 1 13:16:20 2023 -0400 maple_tree: move debug check to __mas_set_range() __mas_set_range() was created to shortcut resetting the maple state and a debug check was added to the caller (the vma iterator) to ensure the internal maple state remains safe to use. Move the debug check from the vma iterator into the maple tree itself so other users do not incorrectly use the advanced maple state modification. Fallout from this change include a large amount of debug setup needed to be moved to earlier in the header, and the maple_tree.h radix-tree test code needed to move the inclusion of the header to after the atomic define. None of those changes have functional changes. Link: https://lkml.kernel.org/r/20231101171629.3612299-4-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit f7a59018953910032231c0a019208c4b0a4a8bc3 Author: Liam R. Howlett Date: Wed Nov 1 13:16:19 2023 -0400 maple_tree: make mas_erase() more robust mas_erase() may not deal correctly with all maple states. Make the function more robust by ensuring the state is in one of the two acceptable states. Link: https://lkml.kernel.org/r/20231101171629.3612299-3-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Cc: Peng Zhang Signed-off-by: Andrew Morton commit 37a8ab24d3d4c465b070bd704e2ad2fa277df9d7 Author: Liam R. Howlett Date: Wed Nov 1 13:16:18 2023 -0400 maple_tree: remove unnecessary default labels from switch statements Patch series "maple_tree: iterator state changes". These patches have some general cleanup and a change to separate the maple state status tracking from the maple state node. The maple state status change allows for walks to continue from previous places when the status needs to be recorded to make logical sense for the next call to the maple state. For instance, it allows for prev/next to function in a way that better resembles the linked list. It also allows switch statements to be used to detect missed states during compile, and the addition of fast-path "active" state is cleaner as an enum. While making the status change, perf showed some very small (one line) functions that were not inlined even with the inline key word. Making these small functions __always_inline is less expensive according to perf. As part of that change, some inlines have been dropped from larger functions. Perf also showed that the commonly used mas_for_each() iterator was spending a lot of time finding the end of the node. This series introduces caching of the end of the node in the maple state (and updating it during writes). This caching along with the inline changes yielded at 23.25% improvement on the BENCH_MAS_FOR_EACH maple tree test framework benchmark. I've also included a change to mtree_range_walk and mtree_lookup_walk to take advantage of Peng's change [1] to the initial pivot setup. mmtests did not produce any significant gains. [1] https://lore.kernel.org/all/20230711035444.526-1-zhangpeng.00@bytedance.com/T/#u This patch (of 12): Removing the default types from the switch statements will cause compile warnings on missing cases. Link: https://lkml.kernel.org/r/20231101171629.3612299-2-Liam.Howlett@oracle.com Signed-off-by: Liam R. Howlett Suggested-by: Andrew Morton Signed-off-by: Andrew Morton commit 4c39e76846b2500910b5378b1e868e6c4d5e6df8 Author: Ilpo Järvinen Date: Tue Nov 21 14:34:27 2023 +0200 e1000e: Use PCI_EXP_LNKSTA_NLW & FIELD_GET() instead of custom defines/code e1000e has own copy of PCI Negotiated Link Width field defines. Use the ones from include/uapi/linux/pci_regs.h instead of the custom ones and remove the custom ones and convert to FIELD_GET(). Suggested-by: Jonathan Cameron Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Reviewed-by: Simon Horman Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 4f6011678d3828e31a6371b3f05605e0dc1659bb Author: Ilpo Järvinen Date: Tue Nov 21 14:34:26 2023 +0200 igb: Use FIELD_GET() to extract Link Width Use FIELD_GET() to extract PCIe Negotiated Link Width field instead of custom masking and shifting. Signed-off-by: Ilpo Järvinen Reviewed-by: Jonathan Cameron Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 5805c82513c444333efb086017be8d666336858a Author: Ian Rogers Date: Tue Nov 28 22:02:02 2023 -0800 libperf cpumap: Add for_each_cpu() that skips the "any CPU" case When iterating CPUs in a CPU map it is often desirable to skip the "any CPU" (aka dummy) case. Add a helper for this and use in builtin-record. Reviewed-by: James Clark Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Ghiti Cc: Andrew Jones Cc: André Almeida Cc: Athira Jajeev Cc: Atish Patra Cc: Changbin Du Cc: Darren Hart Cc: Davidlohr Bueso Cc: Huacai Chen Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Paolo Bonzini Cc: Paran Lee Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Will Deacon Cc: Yang Jihong Cc: Yang Li Cc: Yanteng Si Cc: bpf@vger.kernel.org Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20231129060211.1890454-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit effe957c6bb70cac12918c0f5fd4cefb35967618 Author: Ian Rogers Date: Tue Nov 28 22:02:01 2023 -0800 libperf cpumap: Replace usage of perf_cpu_map__new(NULL) with perf_cpu_map__new_online_cpus() Passing NULL to perf_cpu_map__new() performs perf_cpu_map__new_online_cpus(), just directly call perf_cpu_map__new_online_cpus() to be more intention revealing. Reviewed-by: James Clark Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Ghiti Cc: Andrew Jones Cc: André Almeida Cc: Athira Jajeev Cc: Atish Patra Cc: Changbin Du Cc: Darren Hart Cc: Davidlohr Bueso Cc: Huacai Chen Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Paolo Bonzini Cc: Paran Lee Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Will Deacon Cc: Yang Jihong Cc: Yang Li Cc: Yanteng Si Cc: bpf@vger.kernel.org Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20231129060211.1890454-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 923ca62a7b1edceaa61eb6ac8dc56fdac51913b8 Author: Ian Rogers Date: Tue Nov 28 22:02:00 2023 -0800 libperf cpumap: Rename perf_cpu_map__empty() to perf_cpu_map__has_any_cpu_or_is_empty() The name perf_cpu_map_empty is misleading as true is also returned when the map contains an "any" CPU (aka dummy) map. Rename to perf_cpu_map__has_any_cpu_or_is_empty(), later changes will (re)introduce perf_cpu_map__empty() and perf_cpu_map__has_any_cpu(). Reviewed-by: James Clark Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Ghiti Cc: Andrew Jones Cc: André Almeida Cc: Athira Jajeev Cc: Atish Patra Cc: Changbin Du Cc: Darren Hart Cc: Davidlohr Bueso Cc: Huacai Chen Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Paolo Bonzini Cc: Paran Lee Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Will Deacon Cc: Yang Jihong Cc: Yang Li Cc: Yanteng Si Cc: bpf@vger.kernel.org Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20231129060211.1890454-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8f60f870a9af53295ab4301da05ca453f115a6b6 Author: Ian Rogers Date: Tue Nov 28 22:01:59 2023 -0800 libperf cpumap: Rename perf_cpu_map__default_new() to perf_cpu_map__new_online_cpus() and prefer sysfs Rename perf_cpu_map__default_new() to perf_cpu_map__new_online_cpus() to better indicate what the implementation does. Read the online CPUs from /sys/devices/system/cpu/online first before using sysconf() as it can't accurately configure holes in the CPU map. If sysconf() is used, warn when the configured and online processors disagree. When reading from a file, if the read doesn't yield a CPU map then return an empty map rather than the default online. This avoids recursion but also better yields being able to detect failures. Add more comments. Reviewed-by: James Clark Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Ghiti Cc: Andrew Jones Cc: André Almeida Cc: Athira Jajeev Cc: Atish Patra Cc: Changbin Du Cc: Darren Hart Cc: Davidlohr Bueso Cc: Huacai Chen Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Paolo Bonzini Cc: Paran Lee Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Will Deacon Cc: Yang Jihong Cc: Yang Li Cc: Yanteng Si Cc: bpf@vger.kernel.org Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20231129060211.1890454-3-irogers@google.com [ s/syfs/sysfs/g typo ] Signed-off-by: Arnaldo Carvalho de Melo commit 56c26d5ad86dfe48a76855a91b523ab4f372c003 Author: Yang Li Date: Tue Dec 12 08:54:36 2023 +0800 bpf: Remove unused backtrack_state helper functions The function are defined in the verifier.c file, but not called elsewhere, so delete the unused function. kernel/bpf/verifier.c:3448:20: warning: unused function 'bt_set_slot' kernel/bpf/verifier.c:3453:20: warning: unused function 'bt_clear_slot' kernel/bpf/verifier.c:3488:20: warning: unused function 'bt_is_slot_set' Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20231212005436.103829-1-yang.lee@linux.alibaba.com Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7714 commit f77d795618b92ac6fdb43de0d4036c6ce49f0b82 Author: Manu Bretelle Date: Mon Dec 11 10:07:33 2023 -0800 selftests/bpf: Fixes tests for filesystem kfuncs `fs_kfuncs.c`'s `test_xattr` would fail the test even when the filesystem did not support xattr, for instance when /tmp is mounted as tmpfs. This change checks errno when setxattr fail. If the failure is due to the operation being unsupported, we will skip the test (just like we would if verity was not enabled on the FS. Before the change, fs_kfuncs test would fail in test_axattr: $ vmtest -k $(make -s image_name) './tools/testing/selftests/bpf/test_progs -a fs_kfuncs' => bzImage ===> Booting [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=128 to nr_cpu_ ===> Setting up VM ===> Running command [ 4.157491] bpf_testmod: loading out-of-tree module taints kernel. [ 4.161515] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel test_xattr:PASS:create_file 0 nsec test_xattr:FAIL:setxattr unexpected error: -1 (errno 95) #90/1 fs_kfuncs/xattr:FAIL #90/2 fs_kfuncs/fsverity:SKIP #90 fs_kfuncs:FAIL All error logs: test_xattr:PASS:create_file 0 nsec test_xattr:FAIL:setxattr unexpected error: -1 (errno 95) #90/1 fs_kfuncs/xattr:FAIL #90 fs_kfuncs:FAIL Summary: 0/0 PASSED, 1 SKIPPED, 1 FAILED Test plan: $ touch tmpfs_file && truncate -s 1G tmpfs_file && mkfs.ext4 tmpfs_file # /tmp mounted as tmpfs $ vmtest -k $(make -s image_name) './tools/testing/selftests/bpf/test_progs -a fs_kfuncs' => bzImage ===> Booting ===> Setting up VM ===> Running command WARNING! Selftests relying on bpf_testmod.ko will be skipped. Can't find bpf_testmod.ko kernel module: -2 #90/1 fs_kfuncs/xattr:SKIP #90/2 fs_kfuncs/fsverity:SKIP #90 fs_kfuncs:SKIP Summary: 1/0 PASSED, 2 SKIPPED, 0 FAILED # /tmp mounted as ext4 with xattr enabled but not verity $ vmtest -k $(make -s image_name) 'mount -o loop tmpfs_file /tmp && \ /tools/testing/selftests/bpf/test_progs -a fs_kfuncs' => bzImage ===> Booting ===> Setting up VM ===> Running command [ 4.067071] loop0: detected capacity change from 0 to 2097152 [ 4.191882] EXT4-fs (loop0): mounted filesystem 407ffa36-4553-4c8c-8c78-134443630f69 r/w with ordered data mode. Quota mode: none. WARNING! Selftests relying on bpf_testmod.ko will be skipped. Can't find bpf_testmod.ko kernel module: -2 #90/1 fs_kfuncs/xattr:OK #90/2 fs_kfuncs/fsverity:SKIP #90 fs_kfuncs:OK (SKIP: 1/2) Summary: 1/1 PASSED, 1 SKIPPED, 0 FAILED $ tune2fs -O verity tmpfs_file # /tmp as ext4 with both xattr and verity enabled $ vmtest -k $(make -s image_name) 'mount -o loop tmpfs_file /tmp && \ ./tools/testing/selftests/bpf/test_progs -a fs_kfuncs' => bzImage ===> Booting ===> Setting up VM ===> Running command [ 4.291434] loop0: detected capacity change from 0 to 2097152 [ 4.460828] EXT4-fs (loop0): recovery complete [ 4.468631] EXT4-fs (loop0): mounted filesystem 7b4a7b7f-c442-4b06-9ede-254e63cceb52 r/w with ordered data mode. Quota mode: none. [ 4.988074] fs-verity: sha256 using implementation "sha256-generic" WARNING! Selftests relying on bpf_testmod.ko will be skipped. Can't find bpf_testmod.ko kernel module: -2 #90/1 fs_kfuncs/xattr:OK #90/2 fs_kfuncs/fsverity:OK #90 fs_kfuncs:OK Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED Fixes: 341f06fdddf7 ("selftests/bpf: Add tests for filesystem kfuncs") Signed-off-by: Manu Bretelle Signed-off-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20231211180733.763025-1-chantr4@gmail.com commit 7133b072dfbfac8763ffb017642c9c894894c50d Author: Lingbo Kong Date: Wed Dec 6 22:17:59 2023 +0800 wifi: ath12k: fix the issue that the multicast/broadcast indicator is not read correctly for WCN7850 We observe some packets are discarded in ieee80211_rx_handlers_result function for WCN7850. This is because the way to get multicast/broadcast indicator with RX_MSDU_END_INFO5_DA_IS_MCBC & info5 is incorrect. It should use RX_MSDU_END_INFO13_MCAST_BCAST & info13 to get multicast/broadcast indicator. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Lingbo Kong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231206141759.5430-1-quic_lingbok@quicinc.com commit add731385eed7b2c8298e3f97250e6057d7ca9cf Author: Jeff Johnson Date: Tue Dec 5 13:00:17 2023 -0800 wifi: ath11k: Fix ath11k_htc_record flexible record Transform the zero-length ath11k_htc_record::credit_report array into a proper flexible array. Since this is the only array in ath11k_htc_record, remove the unnecessary union. Signed-off-by: Jeff Johnson Reviewed-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231205-flexarray-htc_record-v2-1-fbb56d436951@quicinc.com commit 48219b089d84f109e8a81d8a7fa1bbc2e6e5f97d Author: Ian Rogers Date: Tue Nov 28 22:01:58 2023 -0800 libperf cpumap: Rename perf_cpu_map__dummy_new() to perf_cpu_map__new_any_cpu() Rename perf_cpu_map__dummy_new() to perf_cpu_map__new_any_cpu() to better indicate this is creating a CPU map for the perf_event_open "any" CPU case. Reviewed-by: James Clark Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexandre Ghiti Cc: Andrew Jones Cc: André Almeida Cc: Athira Jajeev Cc: Atish Patra Cc: Changbin Du Cc: Darren Hart Cc: Davidlohr Bueso Cc: Huacai Chen Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Paolo Bonzini Cc: Paran Lee Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Suzuki Poulouse Cc: Thomas Gleixner Cc: Will Deacon Cc: Yang Jihong Cc: Yang Li Cc: Yanteng Si Cc: bpf@vger.kernel.org Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20231129060211.1890454-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit cb8eb06d50fcf4a478813a612f68c38cca45c742 Author: Dave Hansen Date: Fri Dec 8 09:07:40 2023 -0800 x86/virt/tdx: Disable TDX host support when kexec is enabled TDX host support currently lacks the ability to handle kexec. Disable TDX when kexec is enabled. Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-20-dave.hansen%40intel.com commit 4e1c7dddc71708c21d7fe69cc5f8297ffb7c6965 Author: Kai Huang Date: Fri Dec 8 09:07:39 2023 -0800 Documentation/x86: Add documentation for TDX host support Add documentation for TDX host kernel support. There is already one file Documentation/x86/tdx.rst containing documentation for TDX guest internals. Also reuse it for TDX host kernel support. Introduce a new level menu "TDX Guest Support" and move existing materials under it, and add a new menu for TDX host kernel support. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-19-dave.hansen%40intel.com commit 70060463cb2ba72bbb77c7ced503f53e09380f17 Author: Kai Huang Date: Fri Dec 8 09:07:38 2023 -0800 x86/mce: Differentiate real hardware #MCs from TDX erratum ones The first few generations of TDX hardware have an erratum. Triggering it in Linux requires some kind of kernel bug involving relatively exotic memory writes to TDX private memory and will manifest via spurious-looking machine checks when reading the affected memory. Make an effort to detect these TDX-induced machine checks and spit out a new blurb to dmesg so folks do not think their hardware is failing. == Background == Virtually all kernel memory accesses operations happen in full cachelines. In practice, writing a "byte" of memory usually reads a 64 byte cacheline of memory, modifies it, then writes the whole line back. Those operations do not trigger this problem. This problem is triggered by "partial" writes where a write transaction of less than cacheline lands at the memory controller. The CPU does these via non-temporal write instructions (like MOVNTI), or through UC/WC memory mappings. The issue can also be triggered away from the CPU by devices doing partial writes via DMA. == Problem == A partial write to a TDX private memory cacheline will silently "poison" the line. Subsequent reads will consume the poison and generate a machine check. According to the TDX hardware spec, neither of these things should have happened. To add insult to injury, the Linux machine code will present these as a literal "Hardware error" when they were, in fact, a software-triggered issue. == Solution == In the end, this issue is hard to trigger. Rather than do something rash (and incomplete) like unmap TDX private memory from the direct map, improve the machine check handler. Currently, the #MC handler doesn't distinguish whether the memory is TDX private memory or not but just dump, for instance, below message: [...] mce: [Hardware Error]: CPU 147: Machine Check Exception: f Bank 1: bd80000000100134 [...] mce: [Hardware Error]: RIP 10: {__tlb_remove_page_size+0x10/0xa0} ... [...] mce: [Hardware Error]: Run the above through 'mcelog --ascii' [...] mce: [Hardware Error]: Machine check: Data load in unrecoverable area of kernel [...] Kernel panic - not syncing: Fatal local machine check Which says "Hardware Error" and "Data load in unrecoverable area of kernel". Ideally, it's better for the log to say "software bug around TDX private memory" instead of "Hardware Error". But in reality the real hardware memory error can happen, and sadly such software-triggered #MC cannot be distinguished from the real hardware error. Also, the error message is used by userspace tool 'mcelog' to parse, so changing the output may break userspace. So keep the "Hardware Error". The "Data load in unrecoverable area of kernel" is also helpful, so keep it too. Instead of modifying above error log, improve the error log by printing additional TDX related message to make the log like: ... [...] mce: [Hardware Error]: Machine check: Data load in unrecoverable area of kernel [...] mce: [Hardware Error]: Machine Check: TDX private memory error. Possible kernel bug. Adding this additional message requires determination of whether the memory page is TDX private memory. There is no existing infrastructure to do that. Add an interface to query the TDX module to fill this gap. == Impact == This issue requires some kind of kernel bug to trigger. TDX private memory should never be mapped UC/WC. A partial write originating from these mappings would require *two* bugs, first mapping the wrong page, then writing the wrong memory. It would also be detectable using traditional memory corruption techniques like DEBUG_PAGEALLOC. MOVNTI (and friends) could cause this issue with something like a simple buffer overrun or use-after-free on the direct map. It should also be detectable with normal debug techniques. The one place where this might get nasty would be if the CPU read data then wrote back the same data. That would trigger this problem but would not, for instance, set off mechanisms like slab redzoning because it doesn't actually corrupt data. With an IOMMU at least, the DMA exposure is similar to the UC/WC issue. TDX private memory would first need to be incorrectly mapped into the I/O space and then a later DMA to that mapping would actually cause the poisoning event. [ dhansen: changelog tweaks ] Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: Yuan Yao Reviewed-by: Dave Hansen Reviewed-by: Tony Luck Link: https://lore.kernel.org/all/20231208170740.53979-18-dave.hansen%40intel.com commit 1e536e10689700e006989dea33918cce348e04b6 Author: Kai Huang Date: Fri Dec 8 09:07:37 2023 -0800 x86/cpu: Detect TDX partial write machine check erratum TDX memory has integrity and confidentiality protections. Violations of this integrity protection are supposed to only affect TDX operations and are never supposed to affect the host kernel itself. In other words, the host kernel should never, itself, see machine checks induced by the TDX integrity hardware. Alas, the first few generations of TDX hardware have an erratum. A partial write to a TDX private memory cacheline will silently "poison" the line. Subsequent reads will consume the poison and generate a machine check. According to the TDX hardware spec, neither of these things should have happened. Virtually all kernel memory accesses operations happen in full cachelines. In practice, writing a "byte" of memory usually reads a 64 byte cacheline of memory, modifies it, then writes the whole line back. Those operations do not trigger this problem. This problem is triggered by "partial" writes where a write transaction of less than cacheline lands at the memory controller. The CPU does these via non-temporal write instructions (like MOVNTI), or through UC/WC memory mappings. The issue can also be triggered away from the CPU by devices doing partial writes via DMA. With this erratum, there are additional things need to be done. To prepare for those changes, add a CPU bug bit to indicate this erratum. Note this bug reflects the hardware thus it is detected regardless of whether the kernel is built with TDX support or not. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: David Hildenbrand Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-17-dave.hansen%40intel.com commit abe18175269ac8433c9cd52efd72d16b1731d479 Author: Mihai Sain Date: Mon Dec 11 09:03:45 2023 +0200 ARM: dts: microchip: sama5d27_som1_ek: Remove mmc-ddr-3_3v property from sdmmc0 node On board the sdmmc0 interface is wired to a SD Card socket. According with mmc-controller bindings, the mmc-ddr-3_3v property is used for eMMC devices to enable high-speed DDR mode (3.3V I/O). Remove the mmc-ddr-3_3v property from sdmmc0 node. Signed-off-by: Mihai Sain Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20231211070345.2792-1-mihai.sain@microchip.com Signed-off-by: Claudiu Beznea commit afd549903ea98bd21b9db2a409b227e893b7a70f Author: Kunwu Chan Date: Mon Dec 11 11:30:19 2023 +0800 wifi: iwlegacy: Add null pointer check to il_leds_init() kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Cc: Kunwu Chan Signed-off-by: Kunwu Chan Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231211033019.238149-1-chentao@kylinos.cn commit 0a999d82b782b55626e370ae2006dd51b48923ee Author: Chris Morgan Date: Fri Dec 8 09:07:39 2023 -0600 wifi: rtw88: Use random MAC when efuse MAC invalid When the MAC address read from the efuse data is invalid, warn the user and use a random MAC address instead. On a device I am currently using (Anbernic RG-ARC) with a rtw8821cs the efuse appears to be incompletely/improperly programmed. The MAC address reads as ff:ff:ff:ff:ff:ff. When networkmanager attempts to initiate a connection (and I haven't hard-coded a MAC address or set it to random) it fails to establish a connection. Signed-off-by: Chris Morgan Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231208150739.129753-1-macroalpha82@gmail.com commit fe0a7776d4d19e613bb8dd80fe2d78ae49e8b49d Author: Dmitry Antipov Date: Mon Dec 4 20:11:28 2023 +0300 wifi: wfx: fix possible NULL pointer dereference in wfx_set_mfp_ap() Since 'ieee80211_beacon_get()' can return NULL, 'wfx_set_mfp_ap()' should check the return value before examining skb data. So convert the latter to return an appropriate error code and propagate it to return from 'wfx_start_ap()' as well. Compile tested only. Signed-off-by: Dmitry Antipov Tested-by: Jérôme Pouiller Acked-by: Jérôme Pouiller Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231204171130.141394-1-dmantipov@yandex.ru commit d9e5d31084b024734e64307521414ef0ae1d5333 Author: Amir Goldstein Date: Tue Dec 12 11:44:40 2023 +0200 fsnotify: optionally pass access range in file permission hooks In preparation for pre-content permission events with file access range, move fsnotify_file_perm() hook out of security_file_permission() and into the callers. Callers that have the access range information call the new hook fsnotify_file_area_perm() with the access range. Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231212094440.250945-6-amir73il@gmail.com Signed-off-by: Christian Brauner commit cb383f06686734ef04daf63a4369566800717b7b Author: Amir Goldstein Date: Tue Dec 12 11:44:39 2023 +0200 fsnotify: assert that file_start_write() is not held in permission hooks filesystem may be modified in the context of fanotify permission events (e.g. by HSM service), so assert that sb freeze protection is not held. If the assertion fails, then the following deadlock would be possible: CPU0 CPU1 CPU2 ------------------------------------------------------------------------- file_start_write()#0 ... fsnotify_perm() fanotify_get_response() => (read event and fill file) ... ... freeze_super() ... sb_wait_write() ... vfs_write() file_start_write()#1 This example demonstrates a use case of an hierarchical storage management (HSM) service that uses fanotify permission events to fill the content of a file before access, while a 3rd process starts fsfreeze. This creates a circular dependeny: file_start_write()#0 => fanotify_get_response => file_start_write()#1 => sb_wait_write() => file_end_write()#0 Where file_end_write()#0 can never be called and none of the threads can make progress. The assertion is checked for both MAY_READ and MAY_WRITE permission hooks in preparation for a pre-modify permission event. The assertion is not checked for an open permission event, because do_open() takes mnt_want_write() in O_TRUNC case, meaning that it is not safe to write to filesystem in the content of an open permission event. Reviewed-by: Josef Bacik Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231212094440.250945-5-amir73il@gmail.com Signed-off-by: Christian Brauner commit 36e28c42187c95eb148873ffb059bfdcb8cdb75b Author: Amir Goldstein Date: Tue Dec 12 11:44:38 2023 +0200 fsnotify: split fsnotify_perm() into two hooks We would like to make changes to the fsnotify access permission hook - add file range arguments and add the pre modify event. In preparation for these changes, split the fsnotify_perm() hook into fsnotify_open_perm() and fsnotify_file_perm(). This is needed for fanotify "pre content" events. Reviewed-by: Josef Bacik Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231212094440.250945-4-amir73il@gmail.com Signed-off-by: Christian Brauner commit 705bcfcbde38b9dd4db00cd3deb0b98bddb0dd4a Author: Amir Goldstein Date: Tue Dec 12 11:44:37 2023 +0200 fs: use splice_copy_file_range() inline helper generic_copy_file_range() is just a wrapper around splice_file_range(), which caps the maximum copy length. The only caller of splice_file_range(), namely __ceph_copy_file_range() is already ready to cope with short copy. Move the length capping into splice_file_range() and replace the exported symbol generic_copy_file_range() with a simple inline helper. Suggested-by: Christoph Hellwig Link: https://lore.kernel.org/linux-fsdevel/20231204083849.GC32438@lst.de/ Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231212094440.250945-3-amir73il@gmail.com Signed-off-by: Christian Brauner commit 0f292086c22b43202daffc14b585d3b54b9a1206 Author: Amir Goldstein Date: Tue Dec 12 11:44:36 2023 +0200 splice: return type ssize_t from all helpers Not sure why some splice helpers return long, maybe historic reasons. Change them all to return ssize_t to conform to the splice methods and to the rest of the helpers. Suggested-by: Christian Brauner Link: https://lore.kernel.org/r/20231208-horchen-helium-d3ec1535ede5@brauner/ Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231212094440.250945-2-amir73il@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 595b1280e2c95ea53fbb228bb90d834caa0f86f1 Author: Arnd Bergmann Date: Mon Dec 4 08:30:13 2023 +0100 wifi: rtw89: avoid stringop-overflow warning After -Wstringop-overflow got enabled, the rtw89 driver produced two odd warnings with gcc-13: drivers/net/wireless/realtek/rtw89/coex.c: In function 'rtw89_btc_ntfy_scan_start': drivers/net/wireless/realtek/rtw89/coex.c:5362:50: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 5362 | wl->dbcc_info.scan_band[phy_idx] = band; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from drivers/net/wireless/realtek/rtw89/coex.h:8, from drivers/net/wireless/realtek/rtw89/coex.c:5: drivers/net/wireless/realtek/rtw89/core.h:1441:12: note: at offset [64, 255] into destination object 'scan_band' of size 2 1441 | u8 scan_band[RTW89_PHY_MAX]; /* scan band in each phy */ | ^~~~~~~~~ drivers/net/wireless/realtek/rtw89/coex.c: In function 'rtw89_btc_ntfy_switch_band': drivers/net/wireless/realtek/rtw89/coex.c:5406:50: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 5406 | wl->dbcc_info.scan_band[phy_idx] = band; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ drivers/net/wireless/realtek/rtw89/core.h:1441:12: note: at offset [64, 255] into destination object 'scan_band' of size 2 1441 | u8 scan_band[RTW89_PHY_MAX]; /* scan band in each phy */ | ^~~~~~~~~ I don't know what happened here, but adding an explicit range check shuts up the output. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231204073020.1105416-1-arnd@kernel.org commit 379872288fd353119d15c65f11d20a219e09d6b2 Merge: 68d83f0a5c4cc 10f2903147ed0 Author: Kalle Valo Date: Tue Dec 12 17:03:55 2023 +0200 Merge tag 'mt76-for-kvalo-2023-12-06' of https://github.com/nbd168/wireless mt76 patches for 6.8 * fixes * nvmem eeprom improvements * mt7996 eht improvements * mt7996 wed support * mt7996 36-bit DMA support commit 69ffab9b9e698248cbb4042e47f82afb00dc1bb4 Author: Max Filippov Date: Fri Dec 8 08:38:57 2023 -0800 irqchip/irq-xtensa-pic: Clean up - get rid of the cached_irq_mask variable - use BIT() macro instead of bit shifts - drop .disable and .enable as they are equivalent to the default implementations Signed-off-by: Max Filippov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231208163857.82644-1-jcmvbkbc@gmail.com commit dc18b89ab113e9c6c7a529316ddf7029fb55132d Author: Jens Axboe Date: Thu Dec 7 20:06:02 2023 -0700 io_uring/openclose: add support for IORING_OP_FIXED_FD_INSTALL io_uring can currently open/close regular files or fixed/direct descriptors. Or you can instantiate a fixed descriptor from a regular one, and then close the regular descriptor. But you currently can't turn a purely fixed/direct descriptor into a regular file descriptor. IORING_OP_FIXED_FD_INSTALL adds support for installing a direct descriptor into the normal file table, just like receiving a file descriptor or opening a new file would do. This is all nicely abstracted into receive_fd(), and hence adding support for this is truly trivial. Since direct descriptors are only usable within io_uring itself, it can be useful to turn them into real file descriptors if they ever need to be accessed via normal syscalls. This can either be a transitory thing, or just a permanent transition for a given direct descriptor. By default, new fds are installed with O_CLOEXEC set. The application can disable O_CLOEXEC by setting IORING_FIXED_FD_NO_CLOEXEC in the sqe->install_fd_flags member. Suggested-by: Christian Brauner Reviewed-by: Christian Brauner Signed-off-by: Jens Axboe commit 055c15626a45b1ebc9f2f34981e705e1af171236 Author: Pavel Begunkov Date: Fri Dec 1 00:57:37 2023 +0000 io_uring/cmd: inline io_uring_cmd_get_task With io_uring_types.h we see all required definitions to inline io_uring_cmd_get_task(). Signed-off-by: Pavel Begunkov Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/aa8e317f09e651a5f3e72f8c0ad3902084c1f930.1701391955.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 6b04a3737057ddfed396c954f9e4be4fe6d53c62 Author: Pavel Begunkov Date: Fri Dec 1 00:57:36 2023 +0000 io_uring/cmd: inline io_uring_cmd_do_in_task_lazy Now as we can easily include io_uring_types.h, move IOU_F_TWQ_LAZY_WAKE and inline io_uring_cmd_do_in_task_lazy(). Signed-off-by: Pavel Begunkov Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/2ec9fb31dd192d1c5cf26d0a2dec5657d88a8e48.1701391955.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b66509b8497f2b002a2654e386a440f1274ddcc7 Author: Pavel Begunkov Date: Fri Dec 1 00:57:35 2023 +0000 io_uring: split out cmd api into a separate header linux/io_uring.h is slowly becoming a rubbish bin where we put anything exposed to other subsystems. For instance, the task exit hooks and io_uring cmd infra are completely orthogonal and don't need each other's definitions. Start cleaning it up by splitting out all command bits into a new header file. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7ec50bae6e21f371d3850796e716917fc141225a.1701391955.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e0b23d9953b0c1cf498f1ae2cba8032d0fb733cb Author: Pavel Begunkov Date: Fri Dec 1 00:38:53 2023 +0000 io_uring: optimise ltimeout for inline execution At one point in time we had an optimisation that would not spin up a linked timeout timer when the master request successfully completes inline (during the first nowait execution attempt). We somehow lost it, so this patch restores it back. Note, that it's fine using io_arm_ltimeout() after the io_issue_sqe() completes the request because of delayed completion, but that that adds unwanted overhead. Reported-by: Christian Mazakas Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/8bf69c2a4beec14c565c85c86edb871ca8b8bcc8.1701390926.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9b43ef3d52532a0175ed6654618f7db61d390d2e Author: Pavel Begunkov Date: Fri Dec 1 00:38:52 2023 +0000 io_uring: don't check iopoll if request completes IOPOLL request should never return IOU_OK, so the following iopoll queueing check in io_issue_sqe() after getting IOU_OK doesn't make any sense as would never turn true. Let's optimise on that and return a bit earlier. It's also much more resilient to potential bugs from mischieving iopoll implementations. Cc: Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2f8690e2fa5213a2ff292fac29a7143c036cdd60.1701390926.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2394b311c6b5bab225e5307c819eb1ea59de49de Merge: a39b6ac3781d4 4e94ddfe2aab7 Author: Jens Axboe Date: Tue Dec 12 07:42:24 2023 -0700 Merge branch 'vfs.file' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs into for-6.8/io_uring Merge vfs.file from the VFS tree to avoid conflicts with receive_fd() now having 3 arguments rather than just 2. * 'vfs.file' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: file: remove __receive_fd() file: stop exposing receive_fd_user() fs: replace f_rcuhead with f_task_work file: remove pointless wrapper file: s/close_fd_get_file()/file_close_fd()/g Improve __fget_files_rcu() code generation (and thus __fget_light()) file: massage cleanup of files that failed to open commit 221b110d87c2d3ea113ad784b2c6505726a3e157 Author: Konrad Dybcio Date: Mon Nov 27 16:52:13 2023 +0100 irqchip/qcom-mpm: Support passing a slice of SRAM as reg space The MPM hardware is accessible from the ARM CPUs through a shared memory region (RPM MSG RAM) which is also concurrently accessed by other kinds of cores on the system like modem, ADSP etc. Modeling this relation in a (somewhat) sane manner in the device tree requires to - either present the MPM as a child of said memory region, which makes little sense, as a mapped memory carveout is not a bus. - define nodes which bleed their register spaces into one another - or passing their slice of the MSG RAM through a property Go with the third option and add a way to map a region passed through the "qcom,rpm-msg-ram" property as register space for the MPM interrupt controller. The current way of using 'reg' is preserved for backwards compatibility reasons. [ tglx: Massaged changelog ] Signed-off-by: Konrad Dybcio Signed-off-by: Thomas Gleixner Reviewed-by: Bryan O'Donoghue Acked-by: Shawn Guo Link: https://lore.kernel.org/r/20230328-topic-msgram_mpm-v7-2-6ee2bfeaac2c@linaro.org commit ca596295f4c9ec803d3379635ad175897993f121 Author: Konrad Dybcio Date: Mon Nov 27 16:52:12 2023 +0100 dt-bindings: interrupt-controller: mpm: Pass MSG RAM slice through phandle Due to the wild nature of the Qualcomm RPM Message RAM, the kernel can't really use 'reg' to point to the MPM's slice of Message RAM without cutting into an already-defined RPM MSG RAM node used for GLINK and SMEM. Document passing the register space as a slice of SRAM through the qcom,rpm-msg-ram property. This also makes 'reg' deprecated. Signed-off-by: Konrad Dybcio Signed-off-by: Thomas Gleixner Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230328-topic-msgram_mpm-v7-1-6ee2bfeaac2c@linaro.org commit 1cf0697a24ef60b3ce8be47090a6e8e79329d962 Author: Claudiu Beznea Date: Mon Nov 20 13:18:19 2023 +0200 dt-bindings: interrupt-controller: renesas,rzg2l-irqc: Document RZ/G3S Document the RZ/G3S (R9108G045) interrupt controller. This has few extra functionalities compared with RZ/G2UL but the already existing driver can still be used. Signed-off-by: Claudiu Beznea Signed-off-by: Thomas Gleixner Reviewed-by: Geert Uytterhoeven Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231120111820.87398-9-claudiu.beznea.uj@bp.renesas.com commit 74d2ef5f6f4b2437e6292ab2502400e8048db4aa Author: Claudiu Beznea Date: Mon Nov 20 13:18:18 2023 +0200 irqchip/renesas-rzg2l: Add support for suspend to RAM The irqchip-renesas-rzg2l driver is used on RZ/G3S SoC. RZ/G3S can go into deep sleep states where power to different SoC's parts is cut off and RAM is switched to self-refresh. The resume from these states is done with the help of the bootloader. The IA55 IRQ controller needs to be reconfigured when resuming from deep sleep state. For this the IA55 registers are cached in suspend and restored in resume. The IA55 IRQ controller is connected to GPIO controller and GIC as follows: ┌──────────┐ ┌──────────┐ │ │ SPIX │ │ │ ├─────────►│ │ │ │ │ │ │ │ │ │ ┌────────┐IRQ0-7 │ IA55 │ │ GIC │ Pin0 ───────►│ ├─────────────►│ │ │ │ │ │ │ │ PPIY │ │ ... │ GPIO │ │ ├─────────►│ │ │ │GPIOINT0-127 │ │ │ │ PinN ───────►│ ├─────────────►│ │ │ │ └────────┘ └──────────┘ └──────────┘ where: - Pin0 is the first GPIO controller pin - PinN is the last GPIO controller pin - SPIX is the SPI interrupt with identifier X - PPIY is the PPI interrupt with identifier Y Implement suspend/resume functionality with syscore_ops to be able to cache/restore the registers after/before the GPIO controller suspend/resume functions are invoked. As the syscore_ops suspend/resume functions do not take any argument make the driver private data static so it can be accessed from the suspend/resume functions. The IA55 interrupt controller is resumed before the GPIO controller. As GPIO pins could be in an a state which causes spurious interrupts, the reconfiguration of the interrupt controller is restricted to restore the interrupt type and leave them disabled. An eventually required interrupt enable operation will be done as part of the GPIO controller resume function after restoring the GPIO state. [ tglx: Massaged changelog ] Signed-off-by: Claudiu Beznea Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231120111820.87398-8-claudiu.beznea.uj@bp.renesas.com commit 2eca4731cc66563b3919d8753dbd74d18c39f662 Author: Claudiu Beznea Date: Mon Nov 20 13:18:17 2023 +0200 irqchip/renesas-rzg2l: Add macro to retrieve TITSR register offset based on register's index There are 2 TITSR registers available on the IA55 interrupt controller. Add a macro that retrieves the TITSR register offset based on it's index. This macro is useful in when adding suspend/resume support so both TITSR registers can be accessed in a for loop. Signed-off-by: Claudiu Beznea Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231120111820.87398-7-claudiu.beznea.uj@bp.renesas.com commit ef88eefb1a81a8701eabb7d5ced761a66a465a49 Author: Claudiu Beznea Date: Mon Nov 20 13:18:16 2023 +0200 irqchip/renesas-rzg2l: Implement restriction when writing ISCR register The RZ/G2L manual (chapter "IRQ Status Control Register (ISCR)") describes the operation to clear interrupts through the ISCR register as follows: [Write operation] When "Falling-edge detection", "Rising-edge detection" or "Falling/Rising-edge detection" is set in IITSR: - In case ISTAT is 1 0: IRQn interrupt detection status is cleared. 1: Invalid to write. - In case ISTAT is 0 Invalid to write. When "Low-level detection" is set in IITSR.: Invalid to write. Take the interrupt type into account when clearing interrupts through the ISCR register to avoid writing the ISCR when the interrupt type is level. Signed-off-by: Claudiu Beznea Signed-off-by: Thomas Gleixner Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231120111820.87398-6-claudiu.beznea.uj@bp.renesas.com commit b94f455372ad6e6b4da8e8ed9864d9c7daaf54b8 Author: Claudiu Beznea Date: Mon Nov 20 13:18:15 2023 +0200 irqchip/renesas-rzg2l: Document structure members Document structure members to follow the requirements specified in maintainer-tip, section 4.3.7. Struct declarations and initializers. Signed-off-by: Claudiu Beznea Signed-off-by: Thomas Gleixner Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231120111820.87398-5-claudiu.beznea.uj@bp.renesas.com commit 02f6507640173addeeb3af035d2c6f0b3cff1567 Author: Claudiu Beznea Date: Mon Nov 20 13:18:14 2023 +0200 irqchip/renesas-rzg2l: Align struct member names to tabs Align struct member names to tabs to follow the requirements from maintainer-tip file. 3 tabs were used at the moment as the next commits will add a new member which requires 3 tabs for a better view. Signed-off-by: Claudiu Beznea Signed-off-by: Thomas Gleixner Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231120111820.87398-4-claudiu.beznea.uj@bp.renesas.com commit c90b5c4e6554c1194d5f7cfe13dfd710a7661cab Author: Claudiu Beznea Date: Mon Nov 20 13:18:13 2023 +0200 irqchip/renesas-rzg2l: Use tabs instead of spaces Use tabs instead of spaces in definition of TINT_EXTRACT_HWIRQ() and TINT_EXTRACT_GPIOINT() macros to align with coding style requirements described in Documentation/process/coding-style.rst, "Indentation" chapter. Signed-off-by: Claudiu Beznea Signed-off-by: Thomas Gleixner Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231120111820.87398-3-claudiu.beznea.uj@bp.renesas.com commit 2632e25217696712681dd1f3ecc0d71624ea3b23 Author: Ard Biesheuvel Date: Fri Dec 8 12:32:22 2023 +0100 arm64: fpsimd: Implement lazy restore for kernel mode FPSIMD Now that kernel mode FPSIMD state is context switched along with other task state, we can enable the existing logic that keeps track of which task's FPSIMD state the CPU is holding in its registers. If it is the context of the task that we are switching to, we can elide the reload of the FPSIMD state from memory. Note that we also need to check whether the FPSIMD state on this CPU is the most recent: if a task gets migrated away and back again, the state in memory may be more recent than the state in the CPU. So add another CPU id field to task_struct to keep track of this. (We could reuse the existing CPU id field used for user mode context, but that might result in user state to be discarded unnecessarily, given that two distinct CPUs could be holding the most recent user mode state and the most recent kernel mode state) Signed-off-by: Ard Biesheuvel Reviewed-by: Mark Brown Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20231208113218.3001940-9-ardb@google.com Signed-off-by: Will Deacon commit aefbab8e77eb16b56e18f24b85a09ebf4dc60e93 Author: Ard Biesheuvel Date: Fri Dec 8 12:32:21 2023 +0100 arm64: fpsimd: Preserve/restore kernel mode NEON at context switch Currently, the FPSIMD register file is not preserved and restored along with the general registers on exception entry/exit or context switch. For this reason, we disable preemption when enabling FPSIMD for kernel mode use in task context, and suspend the processing of softirqs so that there are no concurrent uses in the kernel. (Kernel mode FPSIMD may not be used at all in other contexts). Disabling preemption while doing CPU intensive work on inputs of potentially unbounded size is bad for real-time performance, which is why we try and ensure that SIMD crypto code does not operate on more than ~4k at a time, which is an arbitrary limit and requires assembler code to implement efficiently. We can avoid the need for disabling preemption if we can ensure that any in-kernel users of the NEON will not lose the FPSIMD register state across a context switch. And given that disabling softirqs implicitly disables preemption as well, we will also have to ensure that a softirq that runs code using FPSIMD can safely interrupt an in-kernel user. So introduce a thread_info flag TIF_KERNEL_FPSTATE, and modify the context switch hook for FPSIMD to preserve and restore the kernel mode FPSIMD to/from struct thread_struct when it is set. This avoids any scheduling blackouts due to prolonged use of FPSIMD in kernel mode, without the need for manual yielding. In order to support softirq processing while FPSIMD is being used in kernel task context, use the same flag to decide whether the kernel mode FPSIMD state needs to be preserved and restored before allowing FPSIMD to be used in softirq context. Signed-off-by: Ard Biesheuvel Reviewed-by: Mark Brown Reviewed-by: Mark Rutland Link: https://lore.kernel.org/r/20231208113218.3001940-8-ardb@google.com Signed-off-by: Will Deacon commit 9b19700e623f96222c69ecb2adecb1a3e3664cc0 Author: Ard Biesheuvel Date: Fri Dec 8 12:32:20 2023 +0100 arm64: fpsimd: Drop unneeded 'busy' flag Kernel mode NEON will preserve the user mode FPSIMD state by saving it into the task struct before clobbering the registers. In order to avoid the need for preserving kernel mode state too, we disallow nested use of kernel mode NEON, i..e, use in softirq context while the interrupted task context was using kernel mode NEON too. Originally, this policy was implemented using a per-CPU flag which was exposed via may_use_simd(), requiring the users of the kernel mode NEON to deal with the possibility that it might return false, and having NEON and non-NEON code paths. This policy was changed by commit 13150149aa6ded1 ("arm64: fpsimd: run kernel mode NEON with softirqs disabled"), and now, softirq processing is disabled entirely instead, and so may_use_simd() can never fail when called from task or softirq context. This means we can drop the fpsimd_context_busy flag entirely, and instead, ensure that we disable softirq processing in places where we formerly relied on the flag for preventing races in the FPSIMD preserve routines. Signed-off-by: Ard Biesheuvel Reviewed-by: Mark Brown Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231208113218.3001940-7-ardb@google.com [will: Folded in fix from CAMj1kXFhzbJRyWHELCivQW1yJaF=p07LLtbuyXYX3G1WtsdyQg@mail.gmail.com] Signed-off-by: Will Deacon commit 94f18bb19945915fcdfd1903841020ef1b6af44a Author: Ryan McClelland Date: Mon Dec 4 00:17:21 2023 -0800 HID: nintendo: add support for nso controllers This adds support for the nintendo switch online controllers which include the SNES, Genesis, and N64 Controllers. As each nso controller only implements a subset of what a pro controller can do. Each of these 'features' were broken up in to seperate functions which include right stick, left stick, imu, and dpad and depending on the controller type that it is, it will call the supported functions appropriately. Each controller now has a struct which maps the bit within the hid in report to a button. The name given to the device now comes directly from the hid device name rather than looking up a predefined string. Signed-off-by: Ryan McClelland Reviewed-by: Daniel J. Ogorchock Tested-by: Daniel J. Ogorchock Signed-off-by: Jiri Kosina commit 7a0a6d55ed93fe064039c4e014d5cf3a97391bbb Author: Nikolay Borisov Date: Thu Nov 2 15:02:04 2023 +0200 x86/docs: Remove reference to syscall trampoline in PTI Commit bf904d2762ee ("x86/pti/64: Remove the SYSCALL64 entry trampoline") removed the syscall trampoline and instead opted to enable using the default SYSCALL64 entry point by mapping the percpu TSS. Unfortunately, the PTI documentation wasn't updated when the respective changes were made, so bring the doc up to speed. Signed-off-by: Nikolay Borisov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231102130204.41043-1-nik.borisov@suse.com commit b8fa3e90965eeb2f83aa637ba0d0d6fd2a524004 Author: Halil Pasic Date: Wed Nov 1 12:57:51 2023 +0100 s390/cio: make sch->lock spinlock pointer a member The lock member of struct subchannel used to be a spinlock, but became a pointer to a spinlock with commit 2ec2298412e1 ("[S390] subchannel lock conversion."). This might have been justified back then, but with the current state of affairs, there is no reason to manage a separate spinlock object. Let's simplify things and pull the spinlock back into struct subchannel. Signed-off-by: Halil Pasic Reviewed-by: Vineeth Vijayan Link: https://lore.kernel.org/r/20231101115751.2308307-1-pasic@linux.ibm.com Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev commit e909abe885e2f399be7ac0560a010d7429f951e1 Merge: 0e42b5fee8a8c 60e5f23dc5d68 Author: Greg Kroah-Hartman Date: Tue Dec 12 14:34:15 2023 +0100 Merge tag 'coresight-next-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next Suzuki writes: coresight: Updates for Linux v6.8 Updates for the hwtracing subsystem includes : - Support for CoreSight TPDM DSB set - Support for tuning Cycle count Threshold for CoreSight ETM via perf - Support for TRBE on ACPI based systems - Support for choosing buffer mode in ETR for sysfs mode - Improvements to HiSilicon PTT driver - Cleanups to Ultrasoc SMB driver - Cleanup .remove callback for various Coresight platform drivers - Remove Leo Yan from Reviewers Signed-off-by: Suzuki K Poulose * tag 'coresight-next-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux: (32 commits) coresight: ultrasoc-smb: Use guards to cleanup coresight: ultrasoc-smb: Convert to platform remove callback returning void coresight: trbe: Convert to platform remove callback returning void coresight: replicator: Convert to platform remove callback returning void coresight: funnel: Convert to platform remove callback returning void coresight: etm4x: Convert to platform remove callback returning void coresight: dummy: Convert to platform remove callback returning void coresight: etm4x: Fix width of CCITMIN field coresight-tpdm: Correct the property name of MSR number hwtracing: hisi_ptt: Optimize the trace data committing hwtracing: hisi_ptt: Disable interrupt after trace end Documentation: ABI: coresight-tpdm: Fix Bit[3] description indentation coresight-tpdm: Add nodes for dsb msr support dt-bindings: arm: Add support for DSB MSR register coresight-tpdm: Add nodes for timestamp request coresight-tpdm: Add nodes to configure pattern match output coresight-tpdm: Add nodes for dsb edge control coresight-tpdm: Add node to set dsb programming mode coresight-tpdm: Add nodes to set trigger timestamp and type coresight-tpdm: Add reset node to TPDM node ... commit e5c7bcb499840551cfbe85c6df177ebc50432bf0 Author: Wolfram Sang Date: Tue Dec 12 09:12:38 2023 +0100 spi: sh-msiof: Enforce fixed DTDL for R-Car H3 Documentation says only DTDL of 200 is allowed for this SoC. Fixes: 4286db8456f4 ("spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings") Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://msgid.link/r/20231212081239.14254-1-wsa+renesas@sang-engineering.com Signed-off-by: Mark Brown commit 5ed06e489d20dca141047bdb025d885306ea66da Author: Charles Keepax Date: Tue Dec 12 10:41:49 2023 +0000 ASoC: cs42l43: Add missing statics for hp_ilimit functions Fixes: bbbc18d8c27c ("ASoC: cs42l43: Allow HP amp to cool off after current limit") Reported-by: Stephen Rothwell Signed-off-by: Charles Keepax Link: https://msgid.link/r/20231212104149.2388753-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 434225230081b2b3435703decfa9c4214aac22ce Author: Christophe JAILLET Date: Sun Dec 10 18:32:18 2023 +0100 eventfd: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/575dcecd51097dd30c5515f9f0ed92076b4ef403.1702229520.git.christophe.jaillet@wanadoo.fr Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 2b46a19db0a1769a25adc65d1784b68bd8b60046 Author: Alexander Mikhalitsyn Date: Fri Dec 8 16:10:22 2023 +0100 fs: super: use GFP_KERNEL instead of GFP_USER for super block allocation There is no reason to use a GFP_USER flag for struct super_block allocation in the alloc_super(). Instead, let's use GFP_KERNEL for that. >From the memory management perspective, the only difference between GFP_USER and GFP_KERNEL is that GFP_USER allocations are tied to a cpuset, while GFP_KERNEL ones are not. There is no real issue and this is not a candidate to go to the stable, but let's fix it for a consistency sake. Cc: Jan Kara Cc: Alexander Viro Cc: Christian Brauner Cc: Cc: Signed-off-by: Alexander Mikhalitsyn Link: https://lore.kernel.org/r/20231208151022.156273-1-aleksandr.mikhalitsyn@canonical.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 02105f18a26c985a47b40b7401541535ab78a1dd Author: Randy Dunlap Date: Tue Dec 5 18:43:17 2023 -0800 fs/hfsplus: wrapper.c: fix kernel-doc warnings Fix kernel-doc warnings found when using "W=1". wrapper.c:48: warning: No description found for return value of 'hfsplus_submit_bio' wrapper.c:49: warning: Function parameter or member 'opf' not described in 'hfsplus_submit_bio' wrapper.c:49: warning: Excess function parameter 'op' description in 'hfsplus_submit_bio' wrapper.c:49: warning: Excess function parameter 'op_flags' description in 'hfsplus_submit_bio' Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20231206024317.31020-1-rdunlap@infradead.org Cc: Cc: Alexander Viro Cc: Christian Brauner Cc: Jens Axboe Signed-off-by: Christian Brauner commit 67ca056bf1f6e6078c66032cded8ef74920d52d7 Author: Christian Brauner Date: Tue Dec 5 12:43:37 2023 +0100 fs: add Jan Kara as reviewer Jan's been really essential in help deal with reviews in a bunch of areas and we should really make him an official reviewer. This is long overdue imho. Link: https://lore.kernel.org/r/20231205-aufkam-neukunden-d14970a0a6cc@brauner Signed-off-by: Christian Brauner commit effa1870b29c39a520c115aa33fd1814e3610249 Author: Hao Ge Date: Tue Dec 5 14:45:45 2023 +0800 fs/inode: Make relatime_need_update return bool relatime_need_update should return bool to consistent with the function __atime_needs_update that is caller Signed-off-by: Hao Ge Link: https://lore.kernel.org/r/20231205064545.332322-1-gehao@kylinos.cn Signed-off-by: Christian Brauner commit e95aada4cb93d42e25c30a0ef9eb2923d9711d4a Author: Lukas Schauer Date: Fri Dec 1 11:11:28 2023 +0100 pipe: wakeup wr_wait after setting max_usage Commit c73be61cede5 ("pipe: Add general notification queue support") a regression was introduced that would lock up resized pipes under certain conditions. See the reproducer in [1]. The commit resizing the pipe ring size was moved to a different function, doing that moved the wakeup for pipe->wr_wait before actually raising pipe->max_usage. If a pipe was full before the resize occured it would result in the wakeup never actually triggering pipe_write. Set @max_usage and @nr_accounted before waking writers if this isn't a watch queue. Link: https://bugzilla.kernel.org/show_bug.cgi?id=212295 [1] Link: https://lore.kernel.org/r/20231201-orchideen-modewelt-e009de4562c6@brauner Fixes: c73be61cede5 ("pipe: Add general notification queue support") Reviewed-by: David Howells Cc: Signed-off-by: Lukas Schauer [Christian Brauner : rewrite to account for watch queues] Signed-off-by: Christian Brauner commit 4e94ddfe2aab72139acb8d5372fac9e6c3f3e383 Author: Christian Brauner Date: Thu Nov 30 13:49:11 2023 +0100 file: remove __receive_fd() Honestly, there's little value in having a helper with and without that int __user *ufd argument. It's just messy and doesn't really give us anything. Just expose receive_fd() with that argument and get rid of that helper. Link: https://lore.kernel.org/r/20231130-vfs-files-fixes-v1-5-e73ca6f4ea83@kernel.org Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit eac9189c96196574a83a553ca5a7543dd9f5fe3e Author: Christian Brauner Date: Thu Nov 30 13:49:10 2023 +0100 file: stop exposing receive_fd_user() Not every subsystem needs to have their own specialized helper. Just us the __receive_fd() helper. Link: https://lore.kernel.org/r/20231130-vfs-files-fixes-v1-4-e73ca6f4ea83@kernel.org Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 372a34e66fb7f95124fadae9c600b231c35696a7 Author: Christian Brauner Date: Thu Nov 30 13:49:09 2023 +0100 fs: replace f_rcuhead with f_task_work The naming is actively misleading since we switched to SLAB_TYPESAFE_BY_RCU. rcu_head is #define callback_head. Use callback_head directly and rename f_rcuhead to f_task_work. Add comments in there to explain what it's used for. Link: https://lore.kernel.org/r/20231130-vfs-files-fixes-v1-3-e73ca6f4ea83@kernel.org Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 24fa3ae9467f49dd9698fd884f2c6b13cc8ea12d Author: Christian Brauner Date: Thu Nov 30 13:49:08 2023 +0100 file: remove pointless wrapper Only io_uring uses __close_fd_get_file(). All it does is hide current->files but io_uring accesses files_struct directly right now anyway so it's a bit pointless. Just rename pick_file() to file_close_fd_locked() and let io_uring use it. Add a lockdep assert in there that we expect the caller to hold file_lock while we're at it. Link: https://lore.kernel.org/r/20231130-vfs-files-fixes-v1-2-e73ca6f4ea83@kernel.org Reviewed-by: Jens Axboe Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit a88c955fcfb49727d0ed86b47410f6555a8e69e4 Author: Christian Brauner Date: Thu Nov 30 13:49:07 2023 +0100 file: s/close_fd_get_file()/file_close_fd()/g That really shouldn't have "get" in there as that implies we're bumping the reference count which we don't do at all. We used to but not anmore. Now we're just closing the fd and pick that file from the fdtable without bumping the reference count. Update the wrong documentation while at it. Link: https://lore.kernel.org/r/20231130-vfs-files-fixes-v1-1-e73ca6f4ea83@kernel.org Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 253ca8678d30bcf94410b54476fc1e0f1627a137 Author: Linus Torvalds Date: Sun Nov 26 12:24:38 2023 -0800 Improve __fget_files_rcu() code generation (and thus __fget_light()) Commit 0ede61d8589c ("file: convert to SLAB_TYPESAFE_BY_RCU") caused a performance regression as reported by the kernel test robot. The __fget_light() function is one of those critical ones for some loads, and the code generation was unnecessarily impacted. Let's just write that function to better. Reported-by: kernel test robot Cc: Christian Brauner Cc: Jann Horn Cc: Mateusz Guzik Closes: https://lore.kernel.org/oe-lkp/202311201406.2022ca3f-oliver.sang@intel.com Signed-off-by: Linus Torvalds Link: https://lore.kernel.org/r/CAHk-=wiCJtLbFWNURB34b9a_R_unaH3CiMRXfkR0-iihB_z68A@mail.gmail.com Signed-off-by: Christian Brauner commit 7cb537b6f6d7d6529be04139178f929d9a63b918 Author: Al Viro Date: Sun Nov 26 02:08:34 2023 +0000 file: massage cleanup of files that failed to open A file that has never gotten FMODE_OPENED will never have RCU-accessed references, its final fput() is equivalent to file_free() and if it doesn't have FMODE_BACKING either, it can be done from any context and won't need task_work treatment. Now that we have SLAB_TYPESAFE_BY_RCU we can simplify this and have other callers benefit. All of that can be achieved easier is to make fput() recoginze that case and call file_free() directly. No need to introduce a special primitive for that. It also allowed things like failing dentry_open() could benefit from that as well. Signed-off-by: Al Viro [Christian Brauner : massage commit message] Link: https://lore.kernel.org/r/20231126020834.GC38156@ZenIV Signed-off-by: Christian Brauner commit 609c767f2c5505f104ed6bbb3554158131913f86 Merge: 26c79ec96e77a d577ca429af36 Author: Paolo Abeni Date: Tue Dec 12 14:17:08 2023 +0100 Merge branch 'net-dsa-realtek-two-rtl8366rb-fixes' Linus Walleij says: ==================== net: dsa: realtek: Two RTL8366RB fixes These minor fixes were found while digging into other issues: a weirdly named variable and bogus MTU handling. Fix it up. Signed-off-by: Linus Walleij ==================== Link: https://lore.kernel.org/r/20231209-rtl8366rb-mtu-fix-v1-0-df863e2b2b2a@linaro.org Signed-off-by: Paolo Abeni commit d577ca429af36a3aea38d53d11be56dff015dfc9 Author: Linus Walleij Date: Sat Dec 9 23:37:35 2023 +0100 net: dsa: realtek: Rewrite RTL8366RB MTU handling The MTU callbacks are in layer 1 size, so for example 1500 bytes is a normal setting. Cache this size, and only add the layer 2 framing right before choosing the setting. On the CPU port this will however include the DSA tag since this is transmitted from the parent ethernet interface! Add the layer 2 overhead such as ethernet and VLAN framing and FCS before selecting the size in the register. This will make the code easier to understand. The rtl8366rb_max_mtu() callback returns a bogus MTU just subtracting the CPU tag, which is the only thing we should NOT subtract. Return the correct layer 1 max MTU after removing headers and checksum. Signed-off-by: Linus Walleij Reviewed-by: Alvin Šipraga Reviewed-by: Florian Fainelli Signed-off-by: Paolo Abeni commit 389119c842187e2425d8e0354aabe5c3383c5020 Author: Linus Walleij Date: Sat Dec 9 23:37:34 2023 +0100 net: dsa: realtek: Rename bogus RTL8368S variable Rename the register name to RTL8366RB instead of the bogus RTL8368S (internal product name?) Signed-off-by: Linus Walleij Reviewed-by: Alvin Šipraga Reviewed-by: Luiz Angelo Daros de Luca Reviewed-by: Florian Fainelli Signed-off-by: Paolo Abeni commit b41932f544586e606a7493cbc6dfb3c97c6b44d7 Author: Wenkai Lin Date: Wed Dec 6 08:57:27 2023 +0800 iommu/arm-smmu-v3: disable stall for quiet_cd In the stall model, invalid transactions were expected to be stalled and aborted by the IOPF handler. However, when killing a test case with a huge amount of data, the accelerator streamline can not stop until all data is consumed even if the page fault handler reports errors. As a result, the kill may take a long time, about 10 seconds with numerous iopf interrupts. So disable stall for quiet_cd in the non-force stall model, since force stall model (STALL_MODEL==0b10) requires CD.S must be 1. Signed-off-by: Zhangfei Gao Signed-off-by: Wenkai Lin Suggested-by: Jean-Philippe Brucker Reviewed-by: Jason Gunthorpe Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20231206005727.46150-1-zhangfei.gao@linaro.org Signed-off-by: Will Deacon commit 268dd4edb748a1e2f298b04854681453df6e77a2 Author: Vladimir Lypak Date: Wed Oct 11 19:57:26 2023 +0200 iommu/qcom: restore IOMMU state if needed If the IOMMU has a power domain then some state will be lost in qcom_iommu_suspend and TZ will reset device if we don't call qcom_scm_restore_sec_cfg before accessing it again. Signed-off-by: Vladimir Lypak [luca@z3ntu.xyz: reword commit message a bit] Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231011-msm8953-iommu-restore-v1-1-48a0c93809a2@z3ntu.xyz Signed-off-by: Will Deacon commit 28af105cb65043f20a16c5e2519d66390b1f9bb9 Author: Konrad Dybcio Date: Wed Nov 29 15:44:02 2023 +0100 iommu/arm-smmu-qcom: Add QCM2290 MDSS compatible Add the QCM2290 MDSS compatible to clients compatible list, as it also needs the workarounds. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-5-4cbb567743bb@linaro.org Signed-off-by: Will Deacon commit afc95681c3068956fed1241a1ff1612c066c75ac Author: Rob Clark Date: Sun Dec 10 10:06:53 2023 -0800 iommu/arm-smmu-qcom: Add missing GMU entry to match table In some cases the firmware expects cbndx 1 to be assigned to the GMU, so we also want the default domain for the GMU to be an identy domain. This way it does not get a context bank assigned. Without this, both of_dma_configure() and drm/msm's iommu_domain_attach() will trigger allocating and configuring a context bank. So GMU ends up attached to both cbndx 1 and later cbndx 2. This arrangement seemingly confounds and surprises the firmware if the GPU later triggers a translation fault, resulting (on sc8280xp / lenovo x13s, at least) in the SMMU getting wedged and the GPU stuck without memory access. Cc: stable@vger.kernel.org Signed-off-by: Rob Clark Tested-by: Johan Hovold Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20231210180655.75542-1-robdclark@gmail.com Signed-off-by: Will Deacon commit 4fff78dc2490fc0c67669c610dbc42921dd23a1c Author: Konrad Dybcio Date: Mon Dec 4 13:55:20 2023 +0100 dt-bindings: arm-smmu: Document SM8[45]50 GPU SMMU SM8450 and SM8550 both use a Qualcomm-modified MMU500 for their GPU. In both cases, it requires a set of clocks to be enabled. Describe that. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231127-topic-a7xx_dt-v2-1-2a437588e563@linaro.org Signed-off-by: Will Deacon commit fa27b35c9102e3e2b75455517f7091b294cc0552 Author: Rajendra Nayak Date: Fri Nov 24 15:36:05 2023 +0530 dt-bindings: arm-smmu: Add compatible for X1E80100 SoC Add the SoC specific compatible for X1E80100 implementing arm,mmu-500. Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124100608.29964-3-quic_sibis@quicinc.com Signed-off-by: Will Deacon commit 61683b47df44fa7efd4039676436e711f7e31c70 Author: Neil Armstrong Date: Tue Nov 28 09:41:23 2023 +0100 dt-bindings: iommu: arm,smmu: document the SM8650 System MMU Document the System MMU on the SM8650 Platform. Acked-by: Rob Herring Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231128-topic-sm8650-upstream-bindings-smmu-v2-1-d3fbcaf1ea92@linaro.org Signed-off-by: Will Deacon commit 54dae6d5d3f091568322c4a69ddd3459a81545ad Author: Krzysztof Kozlowski Date: Sun Nov 12 19:45:22 2023 +0100 dt-bindings: iommu: arm,smmu: document clocks for the SM8350 GPU SMMU Document the clocks for Qualcomm SM8350 Adreno GPU SMMU, already used in DTS: sm8350-hdk.dtb: iommu@3da0000: clock-names: False schema does not allow ['bus', 'iface', 'ahb', 'hlos1_vote_gpu_smmu', 'cx_gmu', 'hub_cx_int', 'hub_aon'] Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231112184522.3759-1-krzysztof.kozlowski@linaro.org Signed-off-by: Will Deacon commit b38aa87f67931e23ebc32c0ca00a86dfa4688719 Author: Rafael J. Wysocki Date: Fri Dec 8 20:20:00 2023 +0100 thermal: core: Rework thermal zone availability check In order to avoid running __thermal_zone_device_update() for thermal zones going away, the thermal zone lock is held around device_del() in thermal_zone_device_unregister() and thermal_zone_device_update() passes the given thermal zone device to device_is_registered(). This allows thermal_zone_device_update() to skip the __thermal_zone_device_update() if device_del() has already run for the thermal zone at hand. However, instead of looking at driver core internals, the thermal subsystem may as well rely on its own data structures for this purpose. Namely, if the thermal zone is not present in thermal_tz_list, it can be regarded as unavailable, which in fact is already the case in thermal_zone_device_unregister(). Accordingly, the device_is_registered() check in thermal_zone_device_update() can be replaced with checking whether or not the node list_head in struct thermal_zone_device is empty, in which case it is not there in thermal_tz_list. To make this work, though, it is necessary to initialize tz->node in thermal_zone_device_register_with_trips() before registering the thermal zone device and it needs to be added to thermal_tz_list and deleted from it under its zone lock. After the above modifications, the zone lock does not need to be held around device_del() in thermal_zone_device_unregister() any more. Signed-off-by: Rafael J. Wysocki Reviewed-and-tested-by: Lukasz Luba Acked-by: Daniel Lezcano commit c3ffdfff978a089f2d678571664eecd41953253d Author: Rafael J. Wysocki Date: Fri Dec 8 20:19:03 2023 +0100 thermal: Drop redundant and confusing device_is_registered() checks Multiple places in the thermal subsystem (most importantly, sysfs attribute callback functions) check if the given thermal zone device is still registered in order to return early in case the device_del() in thermal_zone_device_unregister() has run already. However, after thermal_zone_device_unregister() has been made wait for all of the zone-related activity to complete before returning, it is not necessary to do that any more, because all of the code holding a reference to the thermal zone device object will be waited for even if it does not do anything special to enforce this. Accordingly, drop all of the device_is_registered() checks that are now redundant and get rid of the zone locking that is not necessary any more after dropping them. Signed-off-by: Rafael J. Wysocki Reviewed-and-tested-by: Lukasz Luba Acked-by: Daniel Lezcano commit 26c79ec96e77a54e446a40c8f2c0af66afd0327b Author: Ahelenia Ziemiańska Date: Fri Dec 8 21:16:12 2023 +0100 net: dns_resolver: the module is called dns_resolver, not dnsresolver $ modinfo dnsresolver dns_resolver | grep name modinfo: ERROR: Module dnsresolver not found. filename: /lib/modules/6.1.0-9-amd64/kernel/net/dns_resolver/dns_resolver.ko name: dns_resolver Signed-off-by: Ahelenia Ziemiańska Link: https://lore.kernel.org/r/gh4sxphjxbo56n2spgmc66vtazyxgiehpmv5f2gkvgicy6f4rs@tarta.nabijaczleweli.xyz Signed-off-by: Paolo Abeni commit 50f176175e96ea5d7cbd8536c0dd774de796ef63 Author: Ard Biesheuvel Date: Wed Nov 29 12:16:16 2023 +0100 arm64/kernel: Move 'nokaslr' parsing out of early idreg code Parsing and ignoring 'nokaslr' can be done from anywhere, except from the code that runs very early and is therefore built with limitations on the kind of relocations it is permitted to use. So move it to a source file that is part of the ordinary kernel build. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20231129111555.3594833-63-ardb@google.com Signed-off-by: Will Deacon commit ea48626f8f0efc697555d17bb5853df92461e280 Author: Ard Biesheuvel Date: Wed Nov 29 12:16:15 2023 +0100 arm64: idreg-override: Avoid kstrtou64() to parse a single hex digit All ID register value overrides are =0 with the exception of the nokaslr pseudo feature which uses =1. In order to remove the dependency on kstrtou64(), which is part of the core kernel and no longer usable once we move idreg-override into the early mini C runtime, let's just parse a single hex digit (with optional leading 0x) and set the output value accordingly. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20231129111555.3594833-62-ardb@google.com Signed-off-by: Will Deacon commit 060260a6be47ae163b0c71a6d0902d065b68f3d2 Author: Ard Biesheuvel Date: Wed Nov 29 12:16:14 2023 +0100 arm64: idreg-override: Avoid sprintf() for simple string concatenation Instead of using sprintf() with the "%s.%s=" format, where the first string argument is always the same in the inner loop of match_options(), use simple memcpy() for string concatenation, and move the first copy to the outer loop. This removes the dependency on sprintf(), which will be difficult to fulfil when we move this code into the early mini C runtime. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20231129111555.3594833-61-ardb@google.com Signed-off-by: Will Deacon commit bcf1eed3f8a0b83824b41da82d226cf36320be76 Author: Ard Biesheuvel Date: Wed Nov 29 12:16:13 2023 +0100 arm64: idreg-override: avoid strlen() to check for empty strings strlen() is a costly way to decide whether a string is empty, as in that case, the first character will be NUL so we can check for that directly. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20231129111555.3594833-60-ardb@google.com Signed-off-by: Will Deacon commit dc3f5aae06381b43bc9d0d416bd15ee1682940e9 Author: Ard Biesheuvel Date: Wed Nov 29 12:16:12 2023 +0100 arm64: idreg-override: Avoid parameq() and parameqn() The only way parameq() and parameqn() deviate from the ordinary string and memory routines is that they ignore the difference between dashes and underscores. Since we copy each command line argument into a buffer before passing it to parameq() and parameqn() numerous times, let's just convert all dashes to underscores just once, and update the alias array accordingly. This also helps reduce the dependency on kernel APIs that are no longer available once we move this code into the early mini C runtime. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20231129111555.3594833-59-ardb@google.com Signed-off-by: Will Deacon commit 01fd29092a35833ef87bd13c0a025e726550d646 Author: Ard Biesheuvel Date: Wed Nov 29 12:16:11 2023 +0100 arm64: idreg-override: Prepare for place relative reloc patching The ID reg override handling code uses a rather elaborate data structure that relies on statically initialized absolute address values in pointer fields. This means that this code cannot run until relocation fixups have been applied, and this is unfortunate, because it means we cannot discover overrides for KASLR or LVA/LPA without creating the kernel mapping and performing the relocations first. This can be solved by switching to place-relative relocations, which can be applied by the linker at build time. This means some additional arithmetic is required when dereferencing these pointers, as we can no longer dereference the pointer members directly. So let's implement this for idreg-override.c in a preliminary way, i.e., convert all the references in code to use a special accessor that produces the correct absolute value at runtime. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20231129111555.3594833-58-ardb@google.com Signed-off-by: Will Deacon commit cbc59c9a4e5785796ccac9a975a94cb52c87feb1 Author: Ard Biesheuvel Date: Wed Nov 29 12:16:10 2023 +0100 arm64: idreg-override: Omit non-NULL checks for override pointer Now that override pointers are always set, we can drop the various non-NULL checks that we have in the code. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20231129111555.3594833-57-ardb@google.com Signed-off-by: Will Deacon commit 376f5a3bd7e21337dc41f7abb56c2c74ac63038a Author: Ard Biesheuvel Date: Wed Nov 29 12:15:59 2023 +0100 arm64: mm: get rid of kimage_vaddr global variable We store the address of _text in kimage_vaddr, but since commit 09e3c22a86f6889d ("arm64: Use a variable to store non-global mappings decision"), we no longer reference this variable from modules so we no longer need to export it. In fact, we don't need it at all so let's just get rid of it. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20231129111555.3594833-46-ardb@google.com Signed-off-by: Will Deacon commit a22fc8e102dc475e91dc13e6e1e395f4d95ae684 Author: Ard Biesheuvel Date: Wed Nov 29 12:15:58 2023 +0100 arm64: mm: Take potential load offset into account when KASLR is off We enable CONFIG_RELOCATABLE even when CONFIG_RANDOMIZE_BASE is disabled, and this permits the loader (i.e., EFI) to place the kernel anywhere in physical memory as long as the base address is 64k aligned. This means that the 'KASLR' case described in the header that defines the size of the statically allocated page tables could take effect even when CONFIG_RANDMIZE_BASE=n. So check for CONFIG_RELOCATABLE instead. Signed-off-by: Ard Biesheuvel Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20231129111555.3594833-45-ardb@google.com Signed-off-by: Will Deacon commit 3dfdc2750c6cdc6a5ebf5effb07f92db761de35d Author: Ard Biesheuvel Date: Wed Nov 29 12:15:57 2023 +0100 arm64: kernel: Disable latent_entropy GCC plugin in early C runtime In subsequent patches, mark portions of the early C code will be marked as __init. Unfortunarely, __init implies __latent_entropy, and this would result in the early C code being instrumented in an unsafe manner. Disable the latent entropy plugin for the early C code. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20231129111555.3594833-44-ardb@google.com Signed-off-by: Will Deacon commit ebb78614ce2ff73be14ed7339b832e24e381d3fc Author: Nícolas F. R. A. Prado Date: Wed Nov 22 13:13:33 2023 -0500 arm64: defconfig: Enable configs for MT8195-Cherry-Tomato Chromebook Enable missing configs needed to boot the MT8195-Cherry-Tomato Chromebook with full support on the defconfig. The configs enabled bring in support for the DSP and sound card, display, thermal sensor and keyboard backlight. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231122181335.535498-1-nfraprado@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 806f49a6eadc008cb86a110727e394389ccde379 Author: Vignesh Raman Date: Mon Sep 11 16:11:39 2023 +0530 arm64: defconfig: Enable DA9211 regulator Mediatek mt8173 board fails to boot with DA9211 regulator disabled. Enabling CONFIG_REGULATOR_DA9211=y in drm-ci fixes the issue. So enable it in the defconfig since kernel-ci also requires it. Suggested-by: AngeloGioacchino Del Regno Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Vignesh Raman Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230911104139.617448-1-vignesh.raman@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 68cbdb150d55834ed0a52352684ba2cc554c8a08 Author: Andy Shevchenko Date: Fri Dec 8 17:33:27 2023 +0200 net: dl2k: Use proper conversion of dev_addr before IO to device The driver is using iowriteXX()/ioreadXX() APIs which are LE IO accessors simplified as 1. Convert given value _from_ CPU _to_ LE 2. Write it to the device as is The dev_addr is a byte stream, but because the driver uses 16-bit IO accessors, it wants to perform double conversion on BE CPUs, but it took it wrong, as it effectivelly does two times _from_ CPU _to_ LE. What it has to do is to consider dev_addr as an array of LE16 and hence do _from_ LE _to_ CPU conversion, followed by implied _from_ CPU _to_ LE in the iowrite16(). To achieve that, use get_unaligned_le16(). This will make it correct and allows to avoid sparse warning as reported by LKP. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312030058.hfZPTXd7-lkp@intel.com/ Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231208153327.3306798-1-andriy.shevchenko@linux.intel.com Signed-off-by: Paolo Abeni commit 232afb557835d6f6859c73bf610bad308c96b131 Author: Borislav Petkov (AMD) Date: Sat Dec 2 12:50:23 2023 +0100 x86/CPU/AMD: Add X86_FEATURE_ZEN1 Add a synthetic feature flag specifically for first generation Zen machines. There's need to have a generic flag for all Zen generations so make X86_FEATURE_ZEN be that flag. Fixes: 30fa92832f40 ("x86/CPU/AMD: Add ZenX generations flags") Suggested-by: Brian Gerst Suggested-by: Tom Lendacky Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/dc3835e3-0731-4230-bbb9-336bbe3d042b@amd.com commit 27b3bcbf8a797d3b18c2aa95928fe65a50066159 Author: Frank Li Date: Mon Dec 4 11:08:29 2023 -0500 PCI: layerscape: Add suspend/resume for ls1043a Add suspend/resume support for Layerscape LS1043a. In the suspend path, PME_Turn_Off message is sent to the endpoint to transition the link to L2/L3_Ready state. In this SoC, there is no way to check if the controller has received the PME_To_Ack from the endpoint or not. So to be on the safer side, the driver just waits for PCIE_PME_TO_L2_TIMEOUT_US before asserting the SoC specific PMXMTTURNOFF bit to complete the PME_Turn_Off handshake. Then the link would enter L2/L3 state depending on the VAUX supply. In the resume path, the link is brought back from L2 to L0 by doing a software reset. Link: https://lore.kernel.org/r/20231204160829.2498703-5-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi Reviewed-by: Manivannan Sadhasivam Acked-by: Roy Zang commit 762ef94b45d97c220f865f4ea288d2c488c9fd3c Author: Frank Li Date: Mon Dec 4 11:08:28 2023 -0500 PCI: layerscape(ep): Rename pf_* as pf_lut_* 'pf' and 'lut' are two different acronyms describing the same thing, basically it is a MMIO base address plus an offset. Rename them to avoid duplicate pf_* and lut_* naming schemes in the driver. Link: https://lore.kernel.org/r/20231204160829.2498703-4-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi Reviewed-by: Manivannan Sadhasivam Acked-by: Roy Zang commit 6f8a41ba26230f6c04edad7daa25bd1c254c83b4 Author: Frank Li Date: Mon Dec 4 11:08:27 2023 -0500 PCI: layerscape: Add suspend/resume for ls1021a Add suspend/resume support for Layerscape LS1021a. In the suspend path, PME_Turn_Off message is sent to the endpoint to transition the link to L2/L3_Ready state. In this SoC, there is no way to check if the controller has received the PME_To_Ack from the endpoint or not. So to be on the safer side, the driver just waits for PCIE_PME_TO_L2_TIMEOUT_US before asserting the SoC specific PMXMTTURNOFF bit to complete the PME_Turn_Off handshake. Then the link would enter L2/L3 state depending on the VAUX supply. In the resume path, the link is brought back from L2 to L0 by doing a software reset. Link: https://lore.kernel.org/r/20231204160829.2498703-3-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi Reviewed-by: Manivannan Sadhasivam Acked-by: Roy Zang commit 123971a193d9ac70b207c24c9f4ed6908b837bb6 Author: Frank Li Date: Mon Dec 4 11:08:26 2023 -0500 PCI: layerscape: Add function pointer for exit_from_l2() Since different SoCs require different sequences for exiting L2, let's add a separate "exit_from_l2()" callback to handle SoC specific sequences. Change ls_pcie_exit_from_l2() return value from void to int in order to propagate errors. Return an error if the exit_from_l2() callback fails in the resume flow. Link: https://lore.kernel.org/r/20231204160829.2498703-2-Frank.Li@nxp.com Signed-off-by: Frank Li Signed-off-by: Lorenzo Pieralisi Reviewed-by: Manivannan Sadhasivam Acked-by: Roy Zang commit fb4d25d7a33f568bcbb945e64fb94d18ddf229fd Author: Krzysztof Kozlowski Date: Sat Dec 9 18:16:12 2023 +0100 arm64: dts: juno: Align thermal zone names with bindings Thermal bindings require thermal zone node names to match certain patterns: | juno.dtb: thermal-zones: 'big-cluster', 'gpu0', 'gpu1', | 'little-cluster', 'pmic', 'soc' | do not match any of the regexes: | '^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Liviu Dudau Link: https://lore.kernel.org/r/20231209171612.250868-1-krzysztof.kozlowski@linaro.org Signed-off-by: Sudeep Holla commit bd690638e2c27dcea1d56376aa4bf3995d82ccfc Author: James Clark Date: Mon Dec 11 16:13:23 2023 +0000 Documentation: arm64: Document the PMU event counting threshold feature Add documentation for the new Perf event open parameters and the threshold_max capability file. Reviewed-by: Anshuman Khandual Reviewed-by: Suzuki K Poulose Acked-by: Namhyung Kim Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-12-james.clark@arm.com Signed-off-by: Will Deacon commit 816c26754447e8b28d6c604e1f5b1d205b2586ee Author: James Clark Date: Mon Dec 11 16:13:22 2023 +0000 arm64: perf: Add support for event counting threshold FEAT_PMUv3_TH (Armv8.8) permits a PMU counter to increment only on events whose count meets a specified threshold condition. For example if PMEVTYPERn.TC (Threshold Control) is set to 0b101 (Greater than or equal, count), and the threshold is set to 2, then the PMU counter will now only increment by 1 when an event would have previously incremented the PMU counter by 2 or more on a single processor cycle. Three new Perf event config fields, 'threshold', 'threshold_compare' and 'threshold_count' have been added to control the feature. threshold_compare maps to the upper two bits of PMEVTYPERn.TC and threshold_count maps to the first bit of TC. These separate attributes have been picked rather than enumerating all the possible combinations of the TC field as in the Arm ARM. The attributes would be used on a Perf command line like this: $ perf stat -e stall_slot/threshold=2,threshold_compare=2/ A new capability for reading out the maximum supported threshold value has also been added: $ cat /sys/bus/event_source/devices/armv8_pmuv3/caps/threshold_max 0x000000ff If a threshold higher than threshold_max is provided, then an error is generated. If FEAT_PMUv3_TH isn't implemented or a 32 bit kernel is running, then threshold_max reads zero, and attempting to set a threshold value will also result in an error. The threshold is per PMU counter, and there are potentially different threshold_max values per PMU type on heterogeneous systems. Bits higher than 32 now need to be written into PMEVTYPER, so armv8pmu_write_evtype() has to be updated to take an unsigned long value rather than u32 which gives the correct behavior on both aarch32 and 64. Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-11-james.clark@arm.com Signed-off-by: Will Deacon commit 186c91aaf54989a9c74869dcc6ba031313d8e2b8 Author: James Clark Date: Mon Dec 11 16:13:21 2023 +0000 arm: pmu: Move error message and -EOPNOTSUPP to individual PMUs -EPERM or -EINVAL always get converted to -EOPNOTSUPP, so replace them. This will allow __hw_perf_event_init() to return a different code or not print that particular message for a different error in the next commit. Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-10-james.clark@arm.com Signed-off-by: Will Deacon commit c7b98bf0fc79bd2d91f6ef84e07b5f648d43c13e Author: James Clark Date: Mon Dec 11 16:13:20 2023 +0000 KVM: selftests: aarch64: Update tools copy of arm_pmuv3.h Now that ARMV8_PMU_PMCR_N is made with GENMASK, update usages to treat it as a pre-shifted mask. Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-9-james.clark@arm.com Signed-off-by: Will Deacon commit a5f4ca68f348ac059efd6a3d7ad4040aed1c0818 Author: James Clark Date: Mon Dec 11 16:13:19 2023 +0000 perf/arm_dmc620: Remove duplicate format attribute #defines These were copied from the SPE driver, but now they're in the arm_pmu.h header so delete them and use the header instead. Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-8-james.clark@arm.com Signed-off-by: Will Deacon commit f6da86969a3c284466ab6080764b2ed91689f262 Author: James Clark Date: Mon Dec 11 16:13:18 2023 +0000 arm: pmu: Share user ABI format mechanism with SPE This mechanism makes it much easier to define and read new attributes so move it to the arm_pmu.h header so that it can be shared. At the same time update the existing format attributes to use it. GENMASK has to be changed to GENMASK_ULL because the config fields are 64 bits even on arm32 where this will also be used now. Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-7-james.clark@arm.com Signed-off-by: Will Deacon commit 3115ee021bfb04efde2e96507bfcc1330261a6a1 Author: James Clark Date: Mon Dec 11 16:13:17 2023 +0000 arm64: perf: Include threshold control fields in PMEVTYPER mask FEAT_PMUv3_TH (Armv8.8) adds two new fields to PMEVTYPER, so include them in the mask. These aren't writable on 32 bit kernels as they are in the high part of the register, so only include them for arm64. It would be difficult to do this statically in the asm header files for each platform without resulting in circular includes or #ifdefs inline in the code. For that reason the ARMV8_PMU_EVTYPE_MASK definition has been removed and the mask is constructed programmatically. Reviewed-by: Suzuki K Poulose Reviewed-by: Anshuman Khandual Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-6-james.clark@arm.com Signed-off-by: Will Deacon commit d30f09b6d7de5d159dbb537f9d67dceb67409420 Author: James Clark Date: Mon Dec 11 16:13:16 2023 +0000 arm: perf: Convert remaining fields to use GENMASK Convert the remaining fields to use either GENMASK or be built from other fields. These all already started at bit 0 so don't need a code change for the lack of _SHIFT. Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-5-james.clark@arm.com Signed-off-by: Will Deacon commit 2f6a00f30600417ee2737f2b1229c75663f1e3c9 Author: James Clark Date: Mon Dec 11 16:13:15 2023 +0000 arm: perf: Use GENMASK for PMMIR fields This is so that FIELD_GET and FIELD_PREP can be used and that the fields are in a consistent format to arm64/tools/sysreg Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-4-james.clark@arm.com Signed-off-by: Will Deacon commit 62e1f212e5fe7624249212813ee96202e0c31430 Author: James Clark Date: Mon Dec 11 16:13:14 2023 +0000 arm: perf/kvm: Use GENMASK for ARMV8_PMU_PMCR_N This is so that FIELD_GET and FIELD_PREP can be used and that the fields are in a consistent format to arm64/tools/sysreg Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-3-james.clark@arm.com Signed-off-by: Will Deacon commit 9343c790e6de7edd2bab17572832f4f21c748dc2 Author: James Clark Date: Mon Dec 11 16:13:13 2023 +0000 arm: perf: Remove inlines from arm_pmuv3.c These are all static and in one compilation unit so the inline has no effect on the binary. Except if FTRACE is enabled, then 3 functions which were already not inlined now get the nops added which allows them to be traced. Signed-off-by: James Clark Link: https://lore.kernel.org/r/20231211161331.1277825-2-james.clark@arm.com Signed-off-by: Will Deacon commit 68d83f0a5c4cc12993ade338ca939d30171c9807 Author: Dmitry Antipov Date: Fri Dec 8 18:31:25 2023 +0300 wifi: mac80211: drop spurious WARN_ON() in ieee80211_ibss_csa_beacon() The WARN_ON() in subject was actually seen only once, with 5.10.200 under syzkaller. It looks like a weird artifact of (ab?)using the syzkaller itself [1], and hopefully may be safely removed. [1] https://lore.kernel.org/linux-wireless/1bd8f266-dee0-4d4e-9b50-e22546b55763@yandex.ru/T/#u Signed-off-by: Dmitry Antipov Link: https://msgid.link/20231208153130.107409-1-dmantipov@yandex.ru Signed-off-by: Johannes Berg commit 6a9c8ed0eeb1997c8926af9f33695a203a75b814 Author: Johannes Berg Date: Mon Dec 11 09:05:29 2023 +0200 wifi: mac80211: don't set ESS capab bit in assoc request The ESS capability bit is reserved in frames transmitted by the client, so we shouldn't set it. Since we've set it for decades, keep that old behaviour unless we're connection to a new EHT AP. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231211085121.65005aba900b.I3d00c8741400572a89a7508b5ae612c968874ad7@changeid Signed-off-by: Johannes Berg commit f510bcc21ed97911b811c5bf36ed43a0e94ab702 Author: Benjamin Berg Date: Mon Dec 11 09:05:28 2023 +0200 wifi: cfg80211: consume both probe response and beacon IEs When doing a channel switch, cfg80211_update_known_bss may be called with a BSS where both proberesp_ies and beacon_ies is set. If that happens, both need to be consumed. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231211085121.07a88656d7df.I0fe9fc599382de0eccf96455617e377d9c231966@changeid Signed-off-by: Johannes Berg commit 5f478adf1f992d4a680c341d49122224286c805f Author: Benjamin Berg Date: Mon Dec 11 09:05:27 2023 +0200 wifi: cfg80211: generate an ML element for per-STA profiles The specification says that this information should not be explicitly included in the per-STA profile. However, we need this information readily available in the BSS for userspace and also internally when associating. As such, append the appropriate element before adding/updating the BSS. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231211085121.abde63d9cc6d.I3d346be0f84f51dccf4f4f92a3e997e6102b9456@changeid Signed-off-by: Johannes Berg commit f6289e5d319b547b93c85c9aef3ec02be860b415 Author: Andrei Otcheretianski Date: Mon Dec 11 09:05:26 2023 +0200 wifi: cfg80211: Replace ENOTSUPP with EOPNOTSUPP ENOTSUPP isn't a standard error code, don't use it. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231211085121.0214b6c79756.I2536bc8426ae15c8cff7ad199e57f06e2e404f13@changeid Signed-off-by: Johannes Berg commit 0528e0fdba9e6b1e9502344f5217b699075667a7 Author: Andrei Otcheretianski Date: Mon Dec 11 09:05:25 2023 +0200 wifi: mac80211: Replace ENOTSUPP with EOPNOTSUPP ENOTSUP isn't a standard error code. EOPNOTSUPP should be used instead. Signed-off-by: Andrei Otcheretianski Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231211085121.3841b71c867d.Idf2ad01d9dfe8d6d6c352bf02deb06e49701ad1d@changeid Signed-off-by: Johannes Berg commit 42b941cd6738d26abdae2f3fee520b79ea77e2fe Author: Johannes Berg Date: Mon Dec 11 09:05:23 2023 +0200 wifi: mac80211: add a flag to disallow puncturing There may be cases where puncturing isn't possible, and a connection needs to be downgraded. Add a hardware flag to support this. This is likely temporary: it seems we will need to move puncturing to the chandef/channel context. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231211085121.c1e89ea55e93.I37b8ca0ee64d5d7699e351785a9010afc106da3c@changeid Signed-off-by: Johannes Berg commit b61e6b41a2f6818ee7b8f92f670a8a6ebcd25a71 Author: Ilan Peer Date: Mon Dec 11 09:05:22 2023 +0200 wifi: cfg80211: Add support for setting TID to link mapping Add support for setting the TID to link mapping for a non-AP MLD station. This is useful in cases user space needs to restrict the possible set of active links, e.g., since it got a BSS Transition Management request forcing to use only a subset of the valid links etc. Signed-off-by: Ilan Peer Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231211085121.da4d56a5f3ff.Iacf88e943326bf9c169c49b728c4a3445fdedc97@changeid Signed-off-by: Johannes Berg commit 9adc8b65218f70cbf50151fc6c2c40949e29eb4f Author: Johannes Berg Date: Mon Dec 11 09:05:21 2023 +0200 wifi: mac80211: update some locking documentation With the locking rework, more functions need to be called with the wiphy mutex held. Document that, and for that use the "Context" description that shows up more nicely in the generated documentation. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231211085121.24fa44c7eeb4.I8c9e030ddd78e07c99dd21fe1d5156555390f92e@changeid Signed-off-by: Johannes Berg commit d02a12b8e4bbd188f38321849791af02d494c7fd Author: Johannes Berg Date: Mon Dec 11 09:05:20 2023 +0200 wifi: cfg80211: add BSS usage reporting Sometimes there may be reasons for which a BSS that's actually found in scan cannot be used to connect to, for example a nonprimary link of an NSTR mobile AP MLD cannot be used for normal direct connections to it. Not indicating these to userspace as we do now of course avoids being able to connect to them, but it's better if they're shown to userspace and it can make an appropriate decision, without e.g. doing an additional ML probe. Thus add an indication of what a BSS can be used for, currently "normal" and "MLD link", including a reason bitmap for it being not usable. The latter can be extended later for certain BSSes if there are other reasons they cannot be used. Signed-off-by: Johannes Berg Reviewed-by: Ilan Peer Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit Link: https://msgid.link/20231211085121.0464f25e0b1d.I9f70ca9f1440565ad9a5207d0f4d00a20cca67e7@changeid Signed-off-by: Johannes Berg commit 32dc0f8edc65ec74ed813309798ddb07325b9ecc Author: Emmanuel Grumbach Date: Thu Dec 7 04:50:16 2023 +0200 wifi: iwlwifi: mvm: do not send STA_DISABLE_TX_CMD for newer firmware Newest firmware has completely offloaded this logic and this command will be deprecated soon. Based on a capability bit advertised by the firmware, skip this command. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.e64ef70c0133.I9f47cdef2ba45f1f383b70023857376973de3a8c@changeid Signed-off-by: Johannes Berg commit 14c1b6f430e3582b3ef2ce1e3016de829b520f77 Author: Johannes Berg Date: Thu Dec 7 04:50:15 2023 +0200 wifi: iwlwifi: remove async command callback There's only one user of this code, which is STA unblock during sleep for uAPSD on really old devices. Instead of having this all through the API with calls up and down, just implemented a special-case CMD_BLOCK_TXQS flag for this, it's only needed in the old gen1 transport. While at it, fix a complain that lockdep would have, as we lock the cmd queue and then the TXQs in the reclaim by using spin_lock_nested(). We no longer need to disable BHs in iwl_trans_pcie_block_txq_ptrs() since it's called with them disabled already. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.2bd95e0570fc.I16486dbc82570d2f73a585872f5394698627310d@changeid Signed-off-by: Johannes Berg commit ed44bab6ba2112824b27bdfe185c8f18d6017e56 Author: Johannes Berg Date: Thu Dec 7 04:50:14 2023 +0200 wifi: iwlwifi: fw: file: don't use [0] for variable arrays This causes fortify warnings when compiled against recent kernels with recent compilers, and generally is not supported in the kernel anymore. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.367a2c77b9be.I4964ec8ca1d30c7c3163f9873814c8205a1a14eb@changeid Signed-off-by: Johannes Berg commit de9131b7e28ab06492f67e74cc9af696aa0abae7 Author: Johannes Berg Date: Thu Dec 7 04:50:13 2023 +0200 wifi: iwlwifi: pcie: get_crf_id() can be void This never returns an error and the return value is never checked anyway, so it can just be void. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.898b7e99206f.I61378115093fe70e6f5baca7f334651e4190eb3b@changeid Signed-off-by: Johannes Berg commit 79a5d10135cbefe89c04f8508d344fad15210aec Author: Johannes Berg Date: Thu Dec 7 04:50:12 2023 +0200 wifi: iwlwifi: pcie: dump CSRs before removal Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.a0e2198e9afd.I3bf737ba5ec1b3013218001e808f6bae0c834543@changeid Signed-off-by: Johannes Berg commit 47b17879f9837d317a0f9e3203b9231fea82b018 Author: Johannes Berg Date: Thu Dec 7 04:50:11 2023 +0200 wifi: iwlwifi: pcie: clean up device removal work We shouldn't access the device if we don't hold a reference, and if - after locking - we see that it has no bus, we also can't do anything, in fact, pci_stop_and_remove_bus_device() will be a no-op. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.6c0879e695f7.I1d3ce75ecad32a4cbf1b9dad61bfb7bc7821fdd9@changeid Signed-off-by: Johannes Berg commit 268712dc3b344f3a835211e5846e6ebfd7a13cbd Author: Emmanuel Grumbach Date: Thu Dec 7 04:50:10 2023 +0200 wifi: iwlwifi: mvm: add a debugfs hook to clear the monitor data This can be used by the user space when it wants to clear the data we collected so far for privacy reasons. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.d5e97d5ec0d9.I7a5e836e6109e1fce7e6301dba8d1f28e60a5440@changeid Signed-off-by: Johannes Berg commit 1261fefa647fc1a57621b0f12cef9c08e819a5dc Author: Johannes Berg Date: Thu Dec 7 04:50:09 2023 +0200 wifi: iwlwifi: refactor RX tracing When there's not going to be any data in the data event, we don't need to add it at all (unlike the TX version, it has no data at all.) Also combine the tracing into a separate inline so we only call iwl_rx_trace_len() once, which also simplifies things, and lets us have a single place to later add other checks. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.13325a4848d2.Ic9e7d794fc4aebfe5ac5136b539ee62789f210f3@changeid Signed-off-by: Johannes Berg commit 637bbd5b3cbd0fc6945ebd2e311315b6cca1f9c5 Author: Miri Korenblit Date: Thu Dec 7 04:50:08 2023 +0200 wifi: iwlwifi: don't support triggered EHT CQI feedback EHT CQI is one of the EHT PHY capabilities. We don't support EHT CQI. The non-triggered CQI feedback bit was unset in a previous patch, but the triggered CQI feedback bit wasn't. Unset it. Fixes: 0e21ec6edbb5 ("wifi: iwlwifi: nvm: Update EHT capabilities for GL device") Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.092528daf59e.I5715769490835819beddb00c91bbc9e806e170cb@changeid Signed-off-by: Johannes Berg commit 3a5a5cb06700522b9e928cabe1285e6531316d3e Author: Ilan Peer Date: Thu Dec 7 04:50:07 2023 +0200 wifi: iwlwifi: mvm: Correctly report TSF data in scan complete For an MLO connection, the BSSID of the link used during the scanning should be used (and not the one from the default link). Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.1e67dba640c1.I6c4941bfab3a04498370e58b402c64d990c39fbf@changeid Signed-off-by: Johannes Berg commit 85e7f823582453222cd8b52a1b11e256d9af2d30 Author: Ilan Peer Date: Thu Dec 7 04:50:06 2023 +0200 wifi: iwlwifi: mvm: Use the link ID provided in scan request If a valid link ID was provided in the scan request use it instead of picking one of the active links. Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://msgid.link/20231207044813.84e21c01b79d.Ib5f546d35542c6c561f5b944c08c9b1850f44146@changeid Signed-off-by: Johannes Berg commit aa0887c4f18e280f8c2aa6964af602bd16c37f54 Author: Vinayak Yadawad Date: Wed Nov 29 18:20:43 2023 +0530 wifi: nl80211: Extend del pmksa support for SAE and OWE security Current handling of del pmksa with SSID is limited to FILS security. In the current change the del pmksa support is extended to SAE/OWE security offloads as well. For OWE/SAE offloads, the PMK is generated and cached at driver/FW, so user app needs the capability to request cache deletion based on SSID for drivers supporting SAE/OWE offload. Signed-off-by: Vinayak Yadawad Link: https://msgid.link/ecdae726459e0944c377a6a6f6cb2c34d2e057d0.1701262123.git.vinayak.yadawad@broadcom.com [drop whitespace-damaged rdev_ops pointer completely, enabling tracing] Signed-off-by: Johannes Berg commit ea855f0b38b0fce2124841d15777bbf1c7e1ded2 Author: Dmitry Antipov Date: Wed Dec 6 09:09:27 2023 +0300 wifi: mac80211: cleanup airtime arithmetic with ieee80211_sta_keep_active() Prefer native jiffies-wide 'unsigned long' for the 'last_active' field of 'struct airtime_info' and introduce 'ieee80211_sta_keep_active()' for airtime check in 'ieee80211_txq_keep_active()' and 'ieee80211_sta_register_airtime()'. Signed-off-by: Dmitry Antipov Reviewed-by: Toke Høiland-Jørgensen Link: https://msgid.link/20231206060935.612241-1-dmantipov@yandex.ru Signed-off-by: Johannes Berg commit d34be4310cbe3a01a7bef10c5adcb0a7faafa1d2 Author: Evan Quan Date: Mon Dec 11 18:06:25 2023 +0800 wifi: mac80211: Add support for WBRF features To support the WBRF mechanism, Wifi adapters utilized in the system must register the frequencies in use (or unregister those frequencies no longer used) via the dedicated calls. So that, other drivers responding to the frequencies can take proper actions to mitigate possible interference. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Evan Quan Signed-off-by: Evan Quan Signed-off-by: Ma Jun Link: https://msgid.link/20231211100630.2170152-5-Jun.Ma2@amd.com Signed-off-by: Johannes Berg commit 10fa22b6fb68198ab6bf2ab468a11c54f083761d Author: Evan Quan Date: Mon Dec 11 18:06:24 2023 +0800 wifi: cfg80211: expose nl80211_chan_width_to_mhz for wide sharing The newly added WBRF feature needs this interface for channel width calculation. Signed-off-by: Evan Quan Signed-off-by: Ma Jun Reviewed-by: Mario Limonciello Link: https://msgid.link/20231211100630.2170152-4-Jun.Ma2@amd.com Signed-off-by: Johannes Berg commit 7a2ee1576dcc6bbe017a8283fba237b05b13fd15 Author: Herve Codina Date: Tue Dec 5 16:21:14 2023 +0100 soc: fsl: cpm1: qmc: Introduce functions to change timeslots at runtime Introduce qmc_chan_{get,set}_ts_info() function to allow timeslots modification at runtime. The modification is provided using qmc_chan_set_ts_info() and will be applied on next qmc_chan_start(). qmc_chan_set_ts_info() must be called with the channel rx and/or tx stopped. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-18-herve.codina@bootlin.com commit 0d75119d08448cb94583467c01adb212b0728502 Author: Herve Codina Date: Tue Dec 5 16:21:13 2023 +0100 soc: fsl: cpm1: qmc: Remove timeslots handling from setup_chan() Timeslots setting is done at channel start() and stop(). There is no more need to do that during setup_chan(). Simply remove timeslot setting from setup_chan(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-17-herve.codina@bootlin.com commit 7cc9bda9c163877255a61a052987ce6b85da1263 Author: Herve Codina Date: Tue Dec 5 16:21:12 2023 +0100 soc: fsl: cpm1: qmc: Handle timeslot entries at channel start() and stop() In order to support runtime timeslot route changes, enable the channel timeslot entries at channel start() and disable them at channel stop(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-16-herve.codina@bootlin.com commit 0e85feacc8156b230285040d82537c922cc15fe6 Author: Herve Codina Date: Tue Dec 5 16:21:11 2023 +0100 soc: fsl: cpm1: qmc: Introduce is_tsa_64rxtx flag In order to support runtime timeslot route changes, some operations will be different according the routing table used (common Rx and Tx table or one table for Rx and one for Tx). The is_tsa_64rxtx flag is introduced to avoid extra computation to determine the table format each time we need it. It is set once at initialization. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-15-herve.codina@bootlin.com commit 32881b253c945ea1493abc18e25928808331f5df Author: Herve Codina Date: Tue Dec 5 16:21:10 2023 +0100 soc: fsl: cpm1: qmc: Split Tx and Rx TSA entries setup The Tx and Rx entries for a given channel are set in one function. In order to modify Rx entries and Tx entries independently of one other, split this function in one for the Rx part and one for the Tx part. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-14-herve.codina@bootlin.com commit 9217161115bfb76ae7b3b9e5a803f554a1c5e76a Author: Herve Codina Date: Tue Dec 5 16:21:09 2023 +0100 soc: fsl: cpm1: qmc: Add support for disabling channel TSA entries In order to allow runtime timeslot route changes, disabling channel TSA entries needs to be supported. Add support for this new feature. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-13-herve.codina@bootlin.com commit f2deea16bf187ad6e1f2a7b0d2fd0b1a4db0b1b7 Author: Herve Codina Date: Tue Dec 5 16:21:08 2023 +0100 soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans() The timeslots checked in qmc_check_chans() are the timeslots used. With the introduction of the available timeslots, the used timeslots are a subset of the available timeslots. The timeslots checked during the qmc_check_chans() call should be the available ones. Simply update and check the available timeslots instead of the used timeslots in qmc_check_chans(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-12-herve.codina@bootlin.com commit b1891c13645b67c9cd2c661a693b9b6b56b87e80 Author: Herve Codina Date: Tue Dec 5 16:21:07 2023 +0100 soc: fsl: cpm1: qmc: Remove no more needed checks from qmc_check_chans() The newly introduced qmc_chan_setup_tsa* functions check that the channel entries are not already used. These checks are also performed by qmc_check_chans() and are no more needed. Remove them from qmc_check_chans(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-11-herve.codina@bootlin.com commit 6f9b814d3765b2425da235570b1318c952142f1a Author: Herve Codina Date: Tue Dec 5 16:21:06 2023 +0100 soc: fsl: cpm1: qmc: Introduce qmc_chan_setup_tsa* Introduce the qmc_chan_setup_tsa* functions to setup entries related to the given channel. Use them during QMC channels setup. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-10-herve.codina@bootlin.com commit 2d965e25fa4180988a1ef4f07803fa7a182a4ae5 Author: Herve Codina Date: Tue Dec 5 16:21:05 2023 +0100 soc: fsl: cpm1: qmc: Rename qmc_setup_tsa* to qmc_init_tsa* qmc_setup_tsa* are called once at initialisation. They initialize the QMC TSA table. In order to introduce setup function later on for dynamic timeslots management, rename the function to avoid later confusion. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-9-herve.codina@bootlin.com commit 9b7a69d0bd2bb7bcf1b811f273a27be929520b61 Author: Herve Codina Date: Tue Dec 5 16:21:04 2023 +0100 soc: fsl: cpm1: qmc: Introduce available timeslots masks Available timeslots masks define timeslots available for the related channel. These timeslots are defined by the QMC binding. Timeslots used are initialized to available timeslots but can be a subset of available timeslots. This prepares the dynamic timeslots management (ie. changing timeslots at runtime). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-8-herve.codina@bootlin.com commit ba3b7e4753c5ad80b3670277a2104aeb421e0d7d Author: Herve Codina Date: Tue Dec 5 16:21:03 2023 +0100 soc: fsl: cpm1: qmc: Add support for child devices QMC child devices support is needed to avoid orphan DT nodes that use a simple DT phandle to reference a QMC channel. Allow to instantiate child devices and also extend the API to get the qmc_chan using a child device. Signed-off-by: Herve Codina Link: https://lore.kernel.org/r/20231205152116.122512-7-herve.codina@bootlin.com commit 48490dc36742b616f846368f300ebedfe9323da1 Author: Herve Codina Date: Tue Dec 5 16:21:02 2023 +0100 soc: fsl: cpm1: qmc: Remove inline function specifiers The inline function specifier is present on some functions but it is better to let the compiler decide inlining or not these functions. Remove inline specifiers. Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC") Signed-off-by: Herve Codina Suggested-by: Andrew Lunn Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-6-herve.codina@bootlin.com commit 0e034aec5be2e8b1199b87b04d32e4a8b805a9db Author: Herve Codina Date: Tue Dec 5 16:21:01 2023 +0100 soc: fsl: cpm1: qmc: Extend the API to provide Rx status In HDLC mode, some status flags related to the data read transfer can be set by the hardware and need to be known by a QMC consumer for further analysis. Extend the API in order to provide these transfer status flags at the read complete() call. In TRANSPARENT mode, these flags have no meaning. Keep only one read complete() API and update the consumers working in transparent mode. In this case, the newly introduced flags parameter is simply unused. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-5-herve.codina@bootlin.com commit dfe66d012af2ddfa566cf9c860b8472b412fb7e4 Author: Herve Codina Date: Tue Dec 5 16:21:00 2023 +0100 soc: fsl: cpm1: qmc: Fix rx channel reset The qmc_chan_reset_rx() set the is_rx_stopped flag. This leads to an inconsistent state in the following sequence. qmc_chan_stop() qmc_chan_reset() Indeed, after the qmc_chan_reset() call, the channel must still be stopped. Only a qmc_chan_start() call can move the channel from stopped state to started state. Fix the issue removing the is_rx_stopped flag setting from qmc_chan_reset() Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-4-herve.codina@bootlin.com commit a5ec3a21220da06bdda2e686012ca64fdb6c513d Author: Herve Codina Date: Tue Dec 5 16:20:59 2023 +0100 soc: fsl: cpm1: qmc: Fix __iomem addresses declaration Running sparse (make C=1) on qmc.c raises a lot of warning such as: ... warning: incorrect type in assignment (different address spaces) expected struct cpm_buf_desc [usertype] *[noderef] __iomem bd got struct cpm_buf_desc [noderef] [usertype] __iomem *txbd_free ... Indeed, some variable were declared 'type *__iomem var' instead of 'type __iomem *var'. Use the correct declaration to remove these warnings. Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC") Cc: stable@vger.kernel.org Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-3-herve.codina@bootlin.com commit fc0c64154e5ddeb6f63c954735bd646ce5b8d9a4 Author: Herve Codina Date: Tue Dec 5 16:20:58 2023 +0100 soc: fsl: cpm1: tsa: Fix __iomem addresses declaration Running sparse (make C=1) on tsa.c raises a lot of warning such as: --- 8< --- warning: incorrect type in assignment (different address spaces) expected void *[noderef] si_regs got void [noderef] __iomem * --- 8< --- Indeed, some variable were declared 'type *__iomem var' instead of 'type __iomem *var'. Use the correct declaration to remove these warnings. Fixes: 1d4ba0b81c1c ("soc: fsl: cpm1: Add support for TSA") Cc: stable@vger.kernel.org Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312051959.9YdRIYbg-lkp@intel.com/ Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20231205152116.122512-2-herve.codina@bootlin.com commit 5ca8ab55084de7b92a5979a2d9fa233158cb1ac2 Author: Will Deacon Date: Tue Dec 12 09:26:38 2023 +0000 drivers/perf: arm_dsu_pmu: Remove kerneldoc-style comment syntax For some reason, the Arm DSU PMU driver uses kerneldoc-style comment syntax (i.e. /** ) for non-kerneldoc comments. This makes the robots very angry indeed, so just revert these to normal comments to stop the noise. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312092000.8ltwotjt-lkp@intel.com/ Signed-off-by: Will Deacon commit 79c03ed4b896513d226abdd83214b8436efdc22c Author: Christophe JAILLET Date: Sun Dec 10 18:48:18 2023 +0100 drivers/perf: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/85b0b73a1b2f743dd5db15d4765c7685100de27f.1702230488.git.christophe.jaillet@wanadoo.fr Signed-off-by: Will Deacon commit bf9cd9fef9f15531680325f956f81317d46a159d Author: Jason Gunthorpe Date: Thu Dec 7 14:03:14 2023 -0400 iommu/tegra: Use tegra_dev_iommu_get_stream_id() in the remaining places This API was defined to formalize the access to internal iommu details on some Tegra SOCs, but a few callers got missed. Add them. The helper already masks by 0xFFFF so remove this code from the callers. Suggested-by: Thierry Reding Reviewed-by: Thierry Reding Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/7-v2-16e4def25ebb+820-iommu_fwspec_p1_jgg@nvidia.com Signed-off-by: Joerg Roedel commit cdbc723f2da11331bc92858da50dc7a7610ed9bd Author: Jason Gunthorpe Date: Thu Dec 7 14:03:13 2023 -0400 acpi: Do not return struct iommu_ops from acpi_iommu_configure_id() Nothing needs this pointer. Return a normal error code with the usual IOMMU semantic that ENODEV means 'there is no IOMMU driver'. Acked-by: Rafael J. Wysocki Reviewed-by: Jerry Snitselaar Reviewed-by: Lu Baolu Reviewed-by: Moritz Fischer Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/6-v2-16e4def25ebb+820-iommu_fwspec_p1_jgg@nvidia.com Signed-off-by: Joerg Roedel commit eda1a94caf6b05482bbf57dc244e7a31a9dba77c Author: Jason Gunthorpe Date: Thu Dec 7 14:03:12 2023 -0400 iommu: Mark dev_iommu_priv_set() with a lockdep A perfect driver would only call dev_iommu_priv_set() from its probe callback. We've made it functionally correct to call it from the of_xlate by adding a lock around that call. lockdep assert that iommu_probe_device_lock is held to discourage misuse. Exclude PPC kernels with CONFIG_FSL_PAMU turned on because FSL_PAMU uses a global static for its priv and abuses priv for its domain. Remove the pointless stores of NULL, all these are on paths where the core code will free dev->iommu after the op returns. Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/5-v2-16e4def25ebb+820-iommu_fwspec_p1_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 64945d1b0ed169aeffa59020941e4ac45ebc315a Author: Jason Gunthorpe Date: Thu Dec 7 14:03:11 2023 -0400 iommu: Mark dev_iommu_get() with lockdep Allocation of dev->iommu must be done under the iommu_probe_device_lock. Mark this with lockdep to discourage future mistakes. Reviewed-by: Jerry Snitselaar Tested-by: Hector Martin Reviewed-by: Lu Baolu Reviewed-by: Moritz Fischer Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/4-v2-16e4def25ebb+820-iommu_fwspec_p1_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 5b4ea8b06eb79234a244ffc1f7405aa968f62069 Author: Jason Gunthorpe Date: Thu Dec 7 14:03:10 2023 -0400 iommu/of: Use -ENODEV consistently in of_iommu_configure() Instead of returning 1 and trying to handle positive error codes just stick to the convention of returning -ENODEV. Remove references to ops from of_iommu_configure(), a NULL ops will already generate an error code. There is no reason to check dev->bus, if err=0 at this point then the called configure functions thought there was an iommu and we should try to probe it. Remove it. Reviewed-by: Jerry Snitselaar Reviewed-by: Moritz Fischer Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/3-v2-16e4def25ebb+820-iommu_fwspec_p1_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 6ff6e184f1f4d4993d45ca3f934c8288890965fe Author: Jason Gunthorpe Date: Thu Dec 7 14:03:09 2023 -0400 iommmu/of: Do not return struct iommu_ops from of_iommu_configure() Nothing needs this pointer. Return a normal error code with the usual IOMMU semantic that ENODEV means 'there is no IOMMU driver'. Reviewed-by: Jerry Snitselaar Reviewed-by: Lu Baolu Acked-by: Rob Herring Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/2-v2-16e4def25ebb+820-iommu_fwspec_p1_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 4720287c7bf76e59d19d4dfbdc3f54eeea6fd46b Author: Jason Gunthorpe Date: Thu Dec 7 14:03:08 2023 -0400 iommu: Remove struct iommu_ops *iommu from arch_setup_dma_ops() This is not being used to pass ops, it is just a way to tell if an iommu driver was probed. These days this can be detected directly via device_iommu_mapped(). Call device_iommu_mapped() in the two places that need to check it and remove the iommu parameter everywhere. Reviewed-by: Jerry Snitselaar Reviewed-by: Lu Baolu Reviewed-by: Moritz Fischer Acked-by: Christoph Hellwig Acked-by: Rob Herring Tested-by: Hector Martin Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/1-v2-16e4def25ebb+820-iommu_fwspec_p1_jgg@nvidia.com Signed-off-by: Joerg Roedel commit 7be423336eccc872249d37900c19c1d24f171353 Author: Lu Baolu Date: Fri Dec 8 09:53:14 2023 +0800 iommu: Set owner token to SVA domain Commit a9c362db3920 ("iommu: Validate that devices match domains") added an owner token to the iommu_domain. This token is checked during domain attachment to RID or PASID through the generic iommu interfaces. The SVA domains are attached to PASIDs through those iommu interfaces. Therefore, they require the owner token to be set during allocation. Otherwise, they fail to attach. Set the owner token for SVA domains. Fixes: a9c362db3920 ("iommu: Validate that devices match domains") Cc: Robin Murphy Signed-off-by: Lu Baolu Reviewed-by: Robin Murphy Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231208015314.320663-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 1fa05c932dc71c474da38e4fd0456131128f8486 Author: Tina Zhang Date: Fri Oct 27 08:05:25 2023 +0800 mm: Deprecate pasid field Drop the pasid field, as all the information needed for sva domain management has been moved to the newly added iommu_mm field. Reviewed-by: Lu Baolu Reviewed-by: Vasant Hegde Reviewed-by: Jason Gunthorpe Signed-off-by: Tina Zhang Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231027000525.1278806-7-tina.zhang@intel.com Signed-off-by: Joerg Roedel commit 092edaddb660376648acb97678570ed5d8299768 Author: Tina Zhang Date: Fri Oct 27 08:05:24 2023 +0800 iommu: Support mm PASID 1:n with sva domains Each mm bound to devices gets a PASID and corresponding sva domains allocated in iommu_sva_bind_device(), which are referenced by iommu_mm field of the mm. The PASID is released in __mmdrop(), while a sva domain is released when no one is using it (the reference count is decremented in iommu_sva_unbind_device()). However, although sva domains and their PASID are separate objects such that their own life cycles could be handled independently, an enqcmd use case may require releasing the PASID in releasing the mm (i.e., once a PASID is allocated for a mm, it will be permanently used by the mm and won't be released until the end of mm) and only allows to drop the PASID after the sva domains are released. To this end, mmgrab() is called in iommu_sva_domain_alloc() to increment the mm reference count and mmdrop() is invoked in iommu_domain_free() to decrement the mm reference count. Since the required info of PASID and sva domains is kept in struct iommu_mm_data of a mm, use mm->iommu_mm field instead of the old pasid field in mm struct. The sva domain list is protected by iommu_sva_lock. Besides, this patch removes mm_pasid_init(), as with the introduced iommu_mm structure, initializing mm pasid in mm_init() is unnecessary. Reviewed-by: Lu Baolu Reviewed-by: Vasant Hegde Reviewed-by: Jason Gunthorpe Tested-by: Nicolin Chen Signed-off-by: Tina Zhang Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231027000525.1278806-6-tina.zhang@intel.com Signed-off-by: Joerg Roedel commit 541a3e257d48c16b77d19f39ed939ef5832046df Author: Tina Zhang Date: Fri Oct 27 08:05:23 2023 +0800 mm: Add structure to keep sva information Introduce iommu_mm_data structure to keep sva information (pasid and the related sva domains). Add iommu_mm pointer, pointing to an instance of iommu_mm_data structure, to mm. Reviewed-by: Vasant Hegde Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Tested-by: Nicolin Chen Signed-off-by: Tina Zhang Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231027000525.1278806-5-tina.zhang@intel.com Signed-off-by: Joerg Roedel commit 2396046d75d3c0b2cfead852a77efd023f8539dc Author: Tina Zhang Date: Fri Oct 27 08:05:22 2023 +0800 iommu: Add mm_get_enqcmd_pasid() helper function mm_get_enqcmd_pasid() should be used by architecture code and closely related to learn the PASID value that the x86 ENQCMD operation should use for the mm. For the moment SMMUv3 uses this without any connection to ENQCMD, it will be cleaned up similar to how the prior patch made VT-d use the PASID argument of set_dev_pasid(). The motivation is to replace mm->pasid with an iommu private data structure that is introduced in a later patch. Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Tested-by: Nicolin Chen Signed-off-by: Tina Zhang Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231027000525.1278806-4-tina.zhang@intel.com Signed-off-by: Joerg Roedel commit 5c79705d7ce8986036c73e89024d189d4f9df1ff Author: Tina Zhang Date: Fri Oct 27 08:05:21 2023 +0800 iommu/vt-d: Remove mm->pasid in intel_sva_bind_mm() The pasid is passed in as a parameter through .set_dev_pasid() callback. Thus, intel_sva_bind_mm() can directly use it instead of retrieving the pasid value from mm->pasid. Suggested-by: Lu Baolu Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Signed-off-by: Tina Zhang Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231027000525.1278806-3-tina.zhang@intel.com Signed-off-by: Joerg Roedel commit 8f23f5dba6b4693448144bde4dd6f537543442c2 Author: Jason Gunthorpe Date: Fri Oct 27 08:05:20 2023 +0800 iommu: Change kconfig around IOMMU_SVA Linus suggested that the kconfig here is confusing: https://lore.kernel.org/all/CAHk-=wgUiAtiszwseM1p2fCJ+sC4XWQ+YN4TanFhUgvUqjr9Xw@mail.gmail.com/ Let's break it into three kconfigs controlling distinct things: - CONFIG_IOMMU_MM_DATA controls if the mm_struct has the additional fields for the IOMMU. Currently only PASID, but later patches store a struct iommu_mm_data * - CONFIG_ARCH_HAS_CPU_PASID controls if the arch needs the scheduling bit for keeping track of the ENQCMD instruction. x86 will select this if IOMMU_SVA is enabled - IOMMU_SVA controls if the IOMMU core compiles in the SVA support code for iommu driver use and the IOMMU exported API This way ARM will not enable CONFIG_ARCH_HAS_CPU_PASID Signed-off-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231027000525.1278806-2-tina.zhang@intel.com Signed-off-by: Joerg Roedel commit 383052d09a305e045a30ea387eb588390984cffb Merge: db7fac15eaf0f 58e82a62669da Author: Johannes Berg Date: Tue Dec 12 09:36:25 2023 +0100 Merge tag 'platform-drivers-x86-amd-wbrf-v6.8-1' into wireless-next Merge the platform drivers tag for WRBF. Hans says: Immutable branch between pdx86 amd wbrf branch and wifi / amdgpu due for the v6.8 merge window platform-drivers-x86-amd-wbrf-v6.8-1: v6.7-rc1 + AMD WBRF support for merging into the wifi subsys and amdgpu driver for 6.8. Merge it so we can apply the wifi tie-in for this feature. Signed-off-by: Johannes Berg commit 4f973e211b3b1c6d36f7c6a19239d258856749f9 Author: Daniel Vacek Date: Tue Dec 12 09:07:45 2023 +0100 IB/ipoib: Fix mcast list locking Releasing the `priv->lock` while iterating the `priv->multicast_list` in `ipoib_mcast_join_task()` opens a window for `ipoib_mcast_dev_flush()` to remove the items while in the middle of iteration. If the mcast is removed while the lock was dropped, the for loop spins forever resulting in a hard lockup (as was reported on RHEL 4.18.0-372.75.1.el8_6 kernel): Task A (kworker/u72:2 below) | Task B (kworker/u72:0 below) -----------------------------------+----------------------------------- ipoib_mcast_join_task(work) | ipoib_ib_dev_flush_light(work) spin_lock_irq(&priv->lock) | __ipoib_ib_dev_flush(priv, ...) list_for_each_entry(mcast, | ipoib_mcast_dev_flush(dev = priv->dev) &priv->multicast_list, list) | ipoib_mcast_join(dev, mcast) | spin_unlock_irq(&priv->lock) | | spin_lock_irqsave(&priv->lock, flags) | list_for_each_entry_safe(mcast, tmcast, | &priv->multicast_list, list) | list_del(&mcast->list); | list_add_tail(&mcast->list, &remove_list) | spin_unlock_irqrestore(&priv->lock, flags) spin_lock_irq(&priv->lock) | | ipoib_mcast_remove_list(&remove_list) (Here, `mcast` is no longer on the | list_for_each_entry_safe(mcast, tmcast, `priv->multicast_list` and we keep | remove_list, list) spinning on the `remove_list` of | >>> wait_for_completion(&mcast->done) the other thread which is blocked | and the list is still valid on | it's stack.) Fix this by keeping the lock held and changing to GFP_ATOMIC to prevent eventual sleeps. Unfortunately we could not reproduce the lockup and confirm this fix but based on the code review I think this fix should address such lockups. crash> bc 31 PID: 747 TASK: ff1c6a1a007e8000 CPU: 31 COMMAND: "kworker/u72:2" -- [exception RIP: ipoib_mcast_join_task+0x1b1] RIP: ffffffffc0944ac1 RSP: ff646f199a8c7e00 RFLAGS: 00000002 RAX: 0000000000000000 RBX: ff1c6a1a04dc82f8 RCX: 0000000000000000 work (&priv->mcast_task{,.work}) RDX: ff1c6a192d60ac68 RSI: 0000000000000286 RDI: ff1c6a1a04dc8000 &mcast->list RBP: ff646f199a8c7e90 R8: ff1c699980019420 R9: ff1c6a1920c9a000 R10: ff646f199a8c7e00 R11: ff1c6a191a7d9800 R12: ff1c6a192d60ac00 mcast R13: ff1c6a1d82200000 R14: ff1c6a1a04dc8000 R15: ff1c6a1a04dc82d8 dev priv (&priv->lock) &priv->multicast_list (aka head) ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 --- --- #5 [ff646f199a8c7e00] ipoib_mcast_join_task+0x1b1 at ffffffffc0944ac1 [ib_ipoib] #6 [ff646f199a8c7e98] process_one_work+0x1a7 at ffffffff9bf10967 crash> rx ff646f199a8c7e68 ff646f199a8c7e68: ff1c6a1a04dc82f8 <<< work = &priv->mcast_task.work crash> list -hO ipoib_dev_priv.multicast_list ff1c6a1a04dc8000 (empty) crash> ipoib_dev_priv.mcast_task.work.func,mcast_mutex.owner.counter ff1c6a1a04dc8000 mcast_task.work.func = 0xffffffffc0944910 , mcast_mutex.owner.counter = 0xff1c69998efec000 crash> b 8 PID: 8 TASK: ff1c69998efec000 CPU: 33 COMMAND: "kworker/u72:0" -- #3 [ff646f1980153d50] wait_for_completion+0x96 at ffffffff9c7d7646 #4 [ff646f1980153d90] ipoib_mcast_remove_list+0x56 at ffffffffc0944dc6 [ib_ipoib] #5 [ff646f1980153de8] ipoib_mcast_dev_flush+0x1a7 at ffffffffc09455a7 [ib_ipoib] #6 [ff646f1980153e58] __ipoib_ib_dev_flush+0x1a4 at ffffffffc09431a4 [ib_ipoib] #7 [ff646f1980153e98] process_one_work+0x1a7 at ffffffff9bf10967 crash> rx ff646f1980153e68 ff646f1980153e68: ff1c6a1a04dc83f0 <<< work = &priv->flush_light crash> ipoib_dev_priv.flush_light.func,broadcast ff1c6a1a04dc8000 flush_light.func = 0xffffffffc0943820 , broadcast = 0x0, The mcast(s) on the `remove_list` (the remaining part of the ex `priv->multicast_list`): crash> list -s ipoib_mcast.done.done ipoib_mcast.list -H ff646f1980153e10 | paste - - ff1c6a192bd0c200 done.done = 0x0, ff1c6a192d60ac00 done.done = 0x0, Reported-by: Yuya Fujita-bishamonten Signed-off-by: Daniel Vacek Link: https://lore.kernel.org/all/20231212080746.1528802-1-neelx@redhat.com Signed-off-by: Leon Romanovsky commit c2a8653c197d67f8ad563f5417f2e9bcaad913f3 Author: Luca Weiss Date: Fri Dec 1 10:33:18 2023 +0100 media: venus: core: Set up secure memory ranges for SC7280 Not all SC7280 devices ship with ChromeOS firmware. Other devices need PAS for image authentication. That requires the predefined virtual address ranges to be passed via scm calls. Define them to enable Venus on non-CrOS SC7280 devices. Reviewed-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Reviewed-by: Vikash Garodia Signed-off-by: Luca Weiss Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil commit afcda192dbab7df48dfedb1813a6d03bf6bd4996 Merge: 07f830ae4913d d727d27db536f Author: Leon Romanovsky Date: Tue Dec 12 09:04:59 2023 +0200 Expose c0 and SW encap ICM for RDMA These two series from Mark and Shun extend RDMA mlx5 API. Mark's series provides c0 register used to match egress traffic sent by local device. Shun's series adds new type for ICM area. Link: https://lore.kernel.org/all/cover.1701871118.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit d727d27db536faea7178290c677cc0567f647231 Author: Mark Bloch Date: Wed Dec 6 16:01:38 2023 +0200 RDMA/mlx5: Expose register c0 for RDMA device This patch introduces improvements for matching egress traffic sent by the local device. When applicable, all egress traffic from the local vport is now tagged with the provided value. This enhancement is particularly useful for FDB steering purposes. The primary focus of this update is facilitating the transmission of traffic from the hypervisor to a VF. To achieve this, one must initiate an SQ on the hypervisor and subsequently create a rule in the FDB that matches on the eswitch manager vport and the SQN of the aforementioned SQ. Obtaining the SQN can be had from SQ opened, and the eswitch manager vport match can be substituted with the register c0 value exposed by this patch. Signed-off-by: Mark Bloch Reviewed-by: Michael Guralnik Link: https://lore.kernel.org/r/aa4120a91c98ff1c44f1213388c744d4cb0324d6.1701871118.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit eb524d0fd46249b0b9e5d52372dc65d8b32430c3 Author: Mark Bloch Date: Wed Dec 6 16:01:37 2023 +0200 net/mlx5: E-Switch, expose eswitch manager vport Expose the ability the query the eswitch manager vport number. Next patch will utilize this capability to reveal the correct register C0 value to the users. Signed-off-by: Mark Bloch Link: https://lore.kernel.org/r/614fb0e216250e2ce3340471ec141b83ec45c7f4.1701871118.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit abf8e8f29a3cb6d9c0f599d335f9ad3dcf2dcf11 Author: Shun Hao Date: Wed Dec 6 16:01:36 2023 +0200 net/mlx5: Manage ICM type of SW encap Support allocate/deallocate the new SW encap ICM type memory. The new ICM type is used for encap context allocation managed by SW, instead FW. It can increase encap context maximum number and allocation speed Signed-off-by: Shun Hao Link: https://lore.kernel.org/r/bed5121255918eb132a1334141c76a0594df8143.1701871118.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit a429ec96c07f3020af12029acefc46f42ff5c91c Author: Shun Hao Date: Wed Dec 6 16:01:35 2023 +0200 RDMA/mlx5: Support handling of SW encap ICM area New type for this ICM area, now the user can allocate/deallocate the new type of SW encap ICM memory, to store the encap header data which are managed by SW. Signed-off-by: Shun Hao Link: https://lore.kernel.org/r/546fe43fc700240709e30acf7713ec6834d652bd.1701871118.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 1ca51628e7303718fdabe29c7d36f582500d5cf2 Author: Shun Hao Date: Wed Dec 6 16:01:34 2023 +0200 net/mlx5: Introduce indirect-sw-encap ICM properties Add new fields for device memory capabilities, in order to support creation of new ICM memory type of SW encap. Signed-off-by: Shun Hao Link: https://lore.kernel.org/r/107cca7dd6a932a1704abf6ebd1b801105546a8e.1701871118.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit 7707cf82e1380776afc0fcd276ce48b71c521801 Author: Delphine CC Chiu Date: Thu Nov 23 09:54:36 2023 +0800 dt-bindings: hwmon: Add lltc ltc4286 driver bindings Add a device tree bindings for ltc4286 device. Signed-off-by: Delphine CC Chiu Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231123015440.199822-2-Delphine_CC_Chiu@Wiwynn.com [groeck: Fixed path to ltc4286.rst] Signed-off-by: Guenter Roeck commit ead5a41c8f8a13ad7b1c9fd2d7edb1ea909b777f Author: Paul Cercueil Date: Wed Nov 1 21:17:31 2023 +0100 drm/exynos: dpi: Change connector type to DPI When exynos_drm_dpi.c was written, DRM_MODE_CONNECTOR_DPI did not exist yet and I guess that's the reason why DRM_MODE_CONNECTOR_VGA was used as the connector type. However, now it makes more sense to use DRM_MODE_CONNECTOR_DPI as the connector type. Signed-off-by: Paul Cercueil Signed-off-by: Inki Dae commit 4fe7a1ecaa4104c58c58a12ec29f24894381bdcc Author: Uwe Kleine-König Date: Wed Nov 8 13:09:12 2023 +0900 drm/exynos: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König fix merge conflict and drop duplicated patch description. Signed-off-by: Inki Dae commit 16ac5b21b31b439f03cdf44c153c5f5af94fb3eb Author: Douglas Anderson Date: Thu Sep 21 12:26:52 2023 -0700 drm/exynos: Call drm_atomic_helper_shutdown() at shutdown/unbind time Based on grepping through the source code this driver appears to be missing a call to drm_atomic_helper_shutdown() at system shutdown time and at driver unbind time. Among other things, this means that if a panel is in use that it won't be cleanly powered off at system shutdown time. The fact that we should call drm_atomic_helper_shutdown() in the case of OS shutdown/restart and at driver remove (or unbind) time comes straight out of the kernel doc "driver instance overview" in drm_drv.c. A few notes about this fix: - When adding drm_atomic_helper_shutdown() to the unbind path, I added it after drm_kms_helper_poll_fini() since that's when other drivers seemed to have it. - Technically with a previous patch, ("drm/atomic-helper: drm_atomic_helper_shutdown(NULL) should be a noop"), we don't actually need to check to see if our "drm" pointer is NULL before calling drm_atomic_helper_shutdown(). We'll leave the "if" test in, though, so that this patch can land without any dependencies. It could potentially be removed later. - This patch also makes sure to set the drvdata to NULL in the case of bind errors to make sure that shutdown can't access freed data. Suggested-by: Maxime Ripard Reviewed-by: Maxime Ripard Signed-off-by: Douglas Anderson Tested-by: Marek Szyprowski Reviewed-by: Marek Szyprowski Signed-off-by: Inki Dae commit a2f8994c1001cfa48483a3afa3550016a3ab0a3e Merge: a60501d7c2d3e 8d1b7809684c6 Author: Inki Dae Date: Tue Dec 12 13:06:29 2023 +0900 Merge tag 'exynos-drm-next-for-v6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into exynos-drm-next Two fixups - Fix a potential error pointer dereference by checking the return value of exynos_drm_crtc_get_by_type() function before accessing to crtc object. - Fix a wrong error checking in exynos_drm_dma.c modules, which was reported by Dan[1] [1] https://lore.kernel.org/all/33e52277-1349-472b-a55b-ab5c3462bfcf@moroto.mountain/ commit 406a6fa44bfbc8563f0612b08d43df2fa65e8bc5 Author: Andrii Nakryiko Date: Mon Dec 4 15:39:22 2023 -0800 bpf: use bitfields for simple per-subprog bool flags We have a bunch of bool flags for each subprog. Instead of wasting bytes for them, use bitfields instead. Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20231204233931.49758-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 1a1ad782dcbbacd9e8d4e2e7ff1bf14d1db80727 Author: Andrii Nakryiko Date: Mon Dec 4 15:39:21 2023 -0800 bpf: tidy up exception callback management a bit Use the fact that we are passing subprog index around and have a corresponding struct bpf_subprog_info in bpf_verifier_env for each subprogram. We don't need to separately pass around a flag whether subprog is exception callback or not, each relevant verifier function can determine this using provided subprog index if we maintain bpf_subprog_info properly. Also move out exception callback-specific logic from btf_prepare_func_args(), keeping it generic. We can enforce all these restriction right before exception callback verification pass. We add out parameter, arg_cnt, for now, but this will be unnecessary with subsequent refactoring and will be removed. Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20231204233931.49758-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 22b769bb4f87060774bfdd6facbab438ed3b8453 Author: Andrii Nakryiko Date: Mon Dec 4 15:39:20 2023 -0800 bpf: emit more dynptr information in verifier log Emit dynptr type for CONST_PTR_TO_DYNPTR register. Also emit id, ref_obj_id, and dynptr_id fields for STACK_DYNPTR stack slots. Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20231204233931.49758-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 1e68485d8299860e68c4e1d29589ff0d20db0287 Author: Andrii Nakryiko Date: Mon Dec 4 15:39:19 2023 -0800 bpf: log PTR_TO_MEM memory size in verifier log Emit valid memory size addressable through PTR_TO_MEM register. Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20231204233931.49758-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit e72c1ccfd449598f7eda10d3bb7441d501ddcfc3 Author: Andrii Nakryiko Date: Mon Dec 11 09:41:31 2023 -0800 selftests/bpf: validate eliminated global subprog is not freplaceable Add selftest that establishes dead code-eliminated valid global subprog (global_dead) and makes sure that it's not possible to freplace it, as it's effectively not there. This test will fail with unexpected success before 2afae08c9dcb ("bpf: Validate global subprogs lazily"). v2->v3: - add missing err assignment (Alan); - undo unnecessary signature changes in verifier_global_subprogs.c (Eduard); v1->v2: - don't rely on assembly output in verifier log, which changes between compiler versions (CI). Acked-by: Eduard Zingerman Reviewed-by: Alan Maguire Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/r/20231211174131.2324306-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 68c84289bcc0dc75c1d27caccb55134e8d39dcc2 Author: Swarup Laxman Kotiaklapudi Date: Fri Dec 8 23:55:15 2023 +0530 netlink: specs: devlink: add some(not all) missing attributes in devlink.yaml Add some missing(not all) attributes in devlink.yaml. Signed-off-by: Swarup Laxman Kotiaklapudi Suggested-by: Jiri Pirko Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20231208182515.1206616-1-swarupkotikalapudi@gmail.com Signed-off-by: Jakub Kicinski commit b72137ecd5e6f445ecbe8e5ebd867dd25125bc66 Merge: 70028b2e51c61 93775590b1ee9 Author: Jakub Kicinski Date: Mon Dec 11 18:53:00 2023 -0800 Merge branch 'net-sched-conditional-notification-of-events-for-cls-and-act' Pedro Tammela says: ==================== net/sched: conditional notification of events for cls and act This is an optimization we have been leveraging on P4TC but we believe it will benefit rtnl users in general. It's common to allocate an skb, build a notification message and then broadcast an event. In the absence of any user space listeners, these resources (cpu and memory operations) are wasted. In cases where the subsystem is lockless (such as in tc-flower) this waste is more prominent. For the scenarios where the rtnl_lock is held it is not as prominent. The idea is simple. Build and send the notification iif: - The user requests via NLM_F_ECHO or - Someone is listening to the rtnl group (tc mon) On a simple test with tc-flower adding 1M entries, using just a single core, there's already a noticeable difference in the cycles spent in tc_new_tfilter with this patchset. before: - 43.68% tc_new_tfilter + 31.73% fl_change + 6.35% tfilter_notify + 1.62% nlmsg_notify 0.66% __tcf_qdisc_find.part.0 0.64% __tcf_chain_get 0.54% fl_get + 0.53% tcf_proto_lookup_ops after: - 39.20% tc_new_tfilter + 34.58% fl_change 0.69% __tcf_qdisc_find.part.0 0.67% __tcf_chain_get + 0.61% tcf_proto_lookup_ops Note, the above test is using iproute2:tc which execs a shell. We expect people using netlink directly to observe even greater reductions. The qdisc side needs some refactoring of the notification routines to fit in this new model, so they will be sent in a later patchset. ==================== Link: https://lore.kernel.org/r/20231208192847.714940-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 93775590b1ee98bf2976b1f4a1ed24e9ff76170f Author: Pedro Tammela Date: Fri Dec 8 16:28:47 2023 -0300 net/sched: cls_api: conditional notification of events As of today tc-filter/chain events are unconditionally built and sent to RTNLGRP_TC. As with the introduction of rtnl_notify_needed we can check before-hand if they are really needed. This will help to alleviate system pressure when filters are concurrently added without the rtnl lock as in tc-flower. Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: Pedro Tammela Link: https://lore.kernel.org/r/20231208192847.714940-8-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit e522755520ef63b121ddd5808197a370be212e9a Author: Pedro Tammela Date: Fri Dec 8 16:28:46 2023 -0300 net/sched: cls_api: remove 'unicast' argument from delete notification This argument is never called while set to true, so remove it as there's no need for it. Signed-off-by: Pedro Tammela Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20231208192847.714940-7-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 8d4390f51920c1edb2d09d44d918c7940ac51e54 Author: Pedro Tammela Date: Fri Dec 8 16:28:45 2023 -0300 net/sched: act_api: conditional notification of events As of today tc-action events are unconditionally built and sent to RTNLGRP_TC. As with the introduction of rtnl_notify_needed we can check before-hand if they are really needed. Signed-off-by: Pedro Tammela Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20231208192847.714940-6-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit c73724bfde0932cb0cafff2855e8ce81e12fd594 Author: Pedro Tammela Date: Fri Dec 8 16:28:44 2023 -0300 net/sched: act_api: don't open code max() Use max() in a couple of places that are open coding it with the ternary operator. Signed-off-by: Pedro Tammela Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20231208192847.714940-5-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit ddb6b284bdc32b6e218b3d90b5a745ea26620812 Author: Pedro Tammela Date: Fri Dec 8 16:28:43 2023 -0300 rtnl: add helper to send if skb is not null This is a convenience helper for routines handling conditional rtnl events, that is code that might send a notification depending on rtnl_has_listeners/rtnl_notify_needed. Instead of: if (skb) rtnetlink_send(...) Use: rtnetlink_maybe_send(...) Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: Pedro Tammela Link: https://lore.kernel.org/r/20231208192847.714940-4-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 8439109b76a3c405808383bf9dd532fc4b9c2dbd Author: Victor Nogueira Date: Fri Dec 8 16:28:42 2023 -0300 rtnl: add helper to check if a notification is needed Building on the rtnl_has_listeners helper, add the rtnl_notify_needed helper to check if we can bail out early in the notification routines. Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: Victor Nogueira Signed-off-by: Pedro Tammela Link: https://lore.kernel.org/r/20231208192847.714940-3-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit c5e2a973448d958feb7881e4d875eac59fdeff3d Author: Jamal Hadi Salim Date: Fri Dec 8 16:28:41 2023 -0300 rtnl: add helper to check if rtnl group has listeners As of today, rtnl code creates a new skb and unconditionally fills and broadcasts it to the relevant group. For most operations this is okay and doesn't waste resources in general. When operations are done without the rtnl_lock, as in tc-flower, such skb allocation, message fill and no-op broadcasting can happen in all cores of the system, which contributes to system pressure and wastes precious cpu cycles when no one will receive the built message. Introduce this helper so rtnetlink operations can simply check if someone is listening and then proceed if necessary. Reviewed-by: Jiri Pirko Reviewed-by: Simon Horman Signed-off-by: Jamal Hadi Salim Signed-off-by: Victor Nogueira Signed-off-by: Pedro Tammela Link: https://lore.kernel.org/r/20231208192847.714940-2-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 97a7d8950f676862aa5d26c50cbcdeb6304f31be Author: Christophe JAILLET Date: Sun Dec 10 18:20:57 2023 +0100 Input: xpad - remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/a3e30e30f18cc5d6f032c8013ce9d900c8e223e5.1702228806.git.christophe.jaillet@wanadoo.fr Signed-off-by: Dmitry Torokhov commit 02db1749f30fb88638e19fb16f2470724529eb81 Author: Andreas Kemnade Date: Mon Dec 11 23:17:57 2023 +0100 Input: omap4-keypad - react on keypresses if device is runtime-suspended According to SWPU235AB, table 26-6, fclk is required to generate events at least on OMAP4460, so keep fclk enabled all the time the device is opened. Suggested-by: Tony Lindgren Signed-off-by: Andreas Kemnade Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20231211221757.517427-1-andreas@kemnade.info Signed-off-by: Dmitry Torokhov commit 394e7f4dbb32a44ad1a1569d55aa680e28ab3315 Author: Chao Yu Date: Tue Dec 12 09:01:20 2023 +0800 f2fs: don't set FI_PREALLOCATED_ALL for partial write In f2fs_preallocate_blocks(), if it is partial write in 4KB, it's not necessary to call f2fs_map_blocks() and set FI_PREALLOCATED_ALL flag. Cc: Eric Biggers Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c1ee197d64f49c9e2a6c8e6a168083c411c1362c Merge: a60501d7c2d3e a39b6ac3781d4 Author: Dave Airlie Date: Tue Dec 12 11:32:33 2023 +1000 Backmerge tag 'v6.7-rc5' into drm-next Linux 6.7-rc5 Alex requested this for some amdkfd work relying on the symbols exports. Signed-off-by: Dave Airlie commit 7803680964c025f598f827b7ea7433467ef21a56 Author: Randy Dunlap Date: Tue Dec 5 15:12:04 2023 -0800 extcon: qcom-spmi-misc: don't use kernel-doc marker for comment Do not use "/**" for non-kernel-doc comments. This prevents a warning from scripts/kernel-doc: warning: expecting prototype for extcon(). Prototype was for USB_ID_DEBOUNCE_MS() instead Link: https://lore.kernel.org/lkml/20231205231204.1130-1-rdunlap@infradead.org/ Signed-off-by: Randy Dunlap Signed-off-by: Chanwoo Choi commit db4a9133511c4a325be04644bf8754ffdfc550bc Author: Andy Shevchenko Date: Mon Dec 11 20:58:06 2023 +0200 pinctrl: core: Remove unused members from struct group_desc All drivers are converted to use embedded struct pingroup. Remove unused members from struct group_desc. Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-14-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit fcbcfe5cb7eab04df04df5228524e0e62d1c51c9 Author: Andy Shevchenko Date: Mon Dec 11 20:58:05 2023 +0200 pinctrl: starfive: Convert to use grp member Convert drivers to use grp member embedded in struct group_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin group description. Reviewed-by: Emil Renner Berthing Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-13-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit fc7d3b60a8fd9f7ee07f7f6cb015819da18d0113 Author: Andy Shevchenko Date: Mon Dec 11 20:58:04 2023 +0200 pinctrl: renesas: Convert to use grp member Convert drivers to use grp member embedded in struct group_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin group description. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-12-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit a1cf1a5f9b60fbccd96b24ec295e50a84cc0c503 Author: Andy Shevchenko Date: Mon Dec 11 20:58:03 2023 +0200 pinctrl: mediatek: Convert to use grp member Convert drivers to use grp member embedded in struct group_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin group description. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-11-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit ffc1945e1958634860a95dafb1821d10ea32e033 Author: Andy Shevchenko Date: Mon Dec 11 20:58:02 2023 +0200 pinctrl: keembay: Convert to use grp member Convert drivers to use grp member embedded in struct group_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin group description. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-10-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 10ce59c6bb51c37759147948a87b9e7debcc40ee Author: Andy Shevchenko Date: Mon Dec 11 20:58:01 2023 +0200 pinctrl: ingenic: Convert to use grp member Convert drivers to use grp member embedded in struct group_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin group description. Acked-by: Paul Cercueil Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-9-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 390270f25b414fd54b307cd68851b36b52f952b5 Author: Andy Shevchenko Date: Mon Dec 11 20:58:00 2023 +0200 pinctrl: imx: Convert to use grp member Convert drivers to use grp member embedded in struct group_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin group description. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-8-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 7e976117b1859fc849842b68935a74854157217c Author: Andy Shevchenko Date: Mon Dec 11 20:57:59 2023 +0200 pinctrl: equilibrium: Convert to use grp member Convert drivers to use grp member embedded in struct group_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin group description. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-7-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 2a0674f25bf0f08e5756b5287205a30252b48796 Author: Andy Shevchenko Date: Mon Dec 11 20:57:58 2023 +0200 pinctrl: bcm: Convert to use grp member Convert drivers to use grp member embedded in struct group_desc, because other members will be removed to avoid duplication and desynchronisation of the generic pin group description. Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-6-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 85174ad7c30fca29a354221e01fad82c0d00d644 Author: Andy Shevchenko Date: Mon Dec 11 20:57:57 2023 +0200 pinctrl: core: Embed struct pingroup into struct group_desc struct group_desc is a particular version of the struct pingroup with associated opaque data. Start switching pin control core and drivers to use it explicitly. Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-5-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit b0f24e021d58d74b83857b9d5c468bcda3785572 Author: Andy Shevchenko Date: Mon Dec 11 20:57:56 2023 +0200 pinctrl: ingenic: Use C99 initializers in PINCTRL_PIN_GROUP() For the better flexibility use C99 initializers in PINCTRL_PIN_GROUP(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-4-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit bb5eace1562fcef3c7ac9d0bd3e01af1187e46d0 Author: Andy Shevchenko Date: Mon Dec 11 20:57:55 2023 +0200 pinctrl: mediatek: Use C99 initializers in PINCTRL_PIN_GROUP() For the better flexibility use C99 initializers in PINCTRL_PIN_GROUP(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 383da0c7f25428de5ad09dc2cfed7cd43c4fb6ba Author: Andy Shevchenko Date: Mon Dec 11 20:57:54 2023 +0200 pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC() Add PINCTRL_GROUP_DESC() macro for inline use. Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231211190321.307330-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 78b778e3630cac5e384a5f23401f5fc2fc1fd723 Merge: 583b5273a624e f8d05e276b45e Author: Linus Walleij Date: Tue Dec 12 00:46:23 2023 +0100 Merge tag 'gpio-remove-gpiochip_is_requested-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio: remove gpiochip_is_requested() - provide a safer alternative to gpiochip_is_requested() - convert all existing users - remove gpiochip_is_requested() commit bb34cc6ca87ff78f9fb5913d7619dc1389554da6 Author: Chao Yu Date: Sun Dec 10 19:35:47 2023 +0800 f2fs: fix to update iostat correctly in f2fs_filemap_fault() In f2fs_filemap_fault(), it fixes to update iostat info only if VM_FAULT_LOCKED is tagged in return value of filemap_fault(). Fixes: 8b83ac81f428 ("f2fs: support read iostat") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit fb9b65340c818875ea86464faf3c744bdce0055c Author: Chao Yu Date: Sun Dec 10 19:35:44 2023 +0800 f2fs: fix to check compress file in f2fs_move_file_range() f2fs_move_file_range() doesn't support migrating compressed cluster data, let's add the missing check condition and return -EOPNOTSUPP for the case until we support it. Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 55fdc1c24a1d6229fe0ecf31335fb9a2eceaaa00 Author: Chao Yu Date: Sun Dec 10 19:35:43 2023 +0800 f2fs: fix to wait on block writeback for post_read case If inode is compressed, but not encrypted, it missed to call f2fs_wait_on_block_writeback() to wait for GCed page writeback in IPU write path. Thread A GC-Thread - f2fs_gc - do_garbage_collect - gc_data_segment - move_data_block - f2fs_submit_page_write migrate normal cluster's block via meta_inode's page cache - f2fs_write_single_data_page - f2fs_do_write_data_page - f2fs_inplace_write_data - f2fs_submit_page_bio IRQ - f2fs_read_end_io IRQ old data overrides new data due to out-of-order GC and common IO. - f2fs_read_end_io Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4961acdd65c956e97c1a000c82d91a8c1cdbe44b Author: Chao Yu Date: Sun Dec 10 19:35:42 2023 +0800 f2fs: fix to tag gcing flag on page during block migration It needs to add missing gcing flag on page during block migration, in order to garantee migrated data be persisted during checkpoint, otherwise out-of-order persistency between data and node may cause data corruption after SPOR. Similar issue was fixed by commit 2d1fe8a86bf5 ("f2fs: fix to tag gcing flag on page during file defragment"). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d543d9ddf593b1f4cb1d57d9ac0ad279fe18adaf Author: Thomas Weißschuh Date: Wed Nov 22 23:49:52 2023 +0100 selftests/nolibc: disable coredump via setrlimit qemu-user does has its own implementation of coredumping. That implementation does not respect the call to prctl(PR_SET_DUMPABLE, 0) in run_protection(). This leads to a coredump for every test run under qemu-user. Use also setrlimit() to inhibit coredump creation which is respected by qemu-user. Link: https://lore.kernel.org/qemu-devel/20231115-qemu-user-dumpable-v1-2-edbe7f0fbb02@t-8ch.de/ Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/lkml/20231123-nolibc-rlimit-v1-3-a428b131de2a@weissschuh.net/ Acked-by: Willy Tarreau commit a0bb5f88fc3d72bc92c24a631f2c7794362efac1 Author: Thomas Weißschuh Date: Wed Nov 22 23:49:43 2023 +0100 tools/nolibc: add support for getrlimit/setrlimit The implementation uses the prlimit64 systemcall as that is available on all architectures. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/lkml/20231123-nolibc-rlimit-v1-2-a428b131de2a@weissschuh.net/ Acked-by: Willy Tarreau commit 7b20478b777c3be39a2b69b08a6c0b50c10105f1 Author: Thomas Weißschuh Date: Wed Nov 22 23:22:52 2023 +0100 tools/nolibc: drop custom definition of struct rusage A future commit will include linux/resource.h, which will conflict with the private definition of struct rusage in nolibc. Avoid the conflict by dropping the private definition and use the one from the UAPI headers. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/lkml/20231123-nolibc-rlimit-v1-1-a428b131de2a@weissschuh.net/ Acked-by: Willy Tarreau commit 825f404776b4f9d5f4a35545ea2d258bb16c0d4e Author: Thomas Weißschuh Date: Sat Nov 25 11:54:02 2023 +0100 tools/nolibc: drop duplicated testcase ioctl_tiocinq The same testcase is present on the line above. Fixes: b4844fa0bdb4 ("selftests/nolibc: implement a few tests for various syscalls") Signed-off-by: Thomas Weißschuh commit dece8476d6dda087cacb8e105bb70e02a9ef9387 Author: Thomas Weißschuh Date: Thu Nov 23 22:53:13 2023 +0100 tools/nolibc: annotate va_list printf formats __attribute__(format(printf)) can also be used for functions that take a va_list argument. As per the GCC docs: For functions where the arguments are not available to be checked (such as vprintf), specify the third parameter as zero. Link: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html Signed-off-by: Thomas Weißschuh commit b9e64724cd8aeca9e7ab4523a92ccf2ba0cd1de2 Author: Thomas Weißschuh Date: Wed Nov 22 08:27:59 2023 +0100 selftests/nolibc: make result alignment more robust Move the check of the existing length into the function so it can't be forgotten by the caller. Also hardcode the padding character as only spaces are ever used. Signed-off-by: Thomas Weißschuh commit 544102458a8d1c33f9f5f99f9bda8e2b858bcb10 Author: Thomas Weißschuh Date: Wed Nov 8 19:14:43 2023 +0100 tools/nolibc: mips: add support for PIC MIPS requires some extra instructions to set up the $gp register for the with a pointer to the global data area. This isn't needed for non-PIC builds, but this patch enables the code unconditionally to prevent bitrot. Also enable PIC in one of the test configurations for ongoing validation. Link: https://lore.kernel.org/r/20231108-nolibc-pic-v2-1-4fb0d6284757@weissschuh.net Signed-off-by: Thomas Weißschuh commit 8bcf9a485541fe0079483162496db1add932689b Author: Thomas Weißschuh Date: Wed Sep 15 02:13:53 2077 +0200 selftests/nolibc: run-tests.sh: enable testing via qemu-user qemu-user is faster than a full system test. Link: https://lore.kernel.org/r/20770915-nolibc-run-user-v1-2-3caec61726dc@weissschuh.net Signed-off-by: Thomas Weißschuh commit d7233e2b758b927695e63e078fe55abcc6ecd3a2 Author: Thomas Weißschuh Date: Wed Sep 15 02:13:52 2077 +0200 selftests/nolibc: introduce QEMU_ARCH_USER While ppc64le shares the same executable with regular ppc64 the user variant needs has a dedicated executable. Introduce a new QEMU_ARCH_USER Makefile variable to accommodate that. Fixes: 17362f3d0bd3 ("selftests/nolibc: use qemu-system-ppc64 for ppc64le") Link: https://lore.kernel.org/r/20770915-nolibc-run-user-v1-1-3caec61726dc@weissschuh.net Signed-off-by: Thomas Weißschuh commit 07f679b50252dc9e3d0c19aca5801f82c230c527 Author: Thomas Weißschuh Date: Sun Nov 5 15:16:38 2023 +0100 selftests/nolibc: fix testcase status alignment Center-align all possible status reports. Before OK and FAIL were center-aligned in relation to each other but SKIPPED and FAILED would be left-aligned. Before: 7 environ_addr = <0x7fffef3e7c50> [OK] 8 environ_envp = <0x7fffef3e7c58> [FAIL] 9 environ_auxv [SKIPPED] 10 environ_total [SKIPPED] 11 environ_HOME = <0x7fffef3e99bd> [OK] 12 auxv_addr [SKIPPED] 13 auxv_AT_UID = 1000 [OK] After: 7 environ_addr = <0x7ffff13b00a0> [OK] 8 environ_envp = <0x7ffff13b00a8> [FAIL] 9 environ_auxv [SKIPPED] 10 environ_total [SKIPPED] 11 environ_HOME = <0x7ffff13b19bd> [OK] 12 auxv_addr [SKIPPED] 13 auxv_AT_UID = 1000 [OK] Signed-off-by: Thomas Weißschuh commit b4b9fb91da99035ce59ac74c9a27562afddfc21d Author: Thomas Weißschuh Date: Fri Oct 20 11:04:10 2023 +0200 selftests/nolibc: add configuration for mipso32be Allow testing MIPS O32 big endian. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 3ab1e9db098a41dcfc0d93ae964bd5901e4ef1b2 Author: Thomas Weißschuh Date: Fri Oct 20 13:34:27 2023 +0200 selftests/nolibc: extraconfig support Allow some postprocessing of defconfig files. Suggested-by: Zhangjin Wu Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit bb503f5f01546c65fc510787b2964de3b62b6646 Author: Thomas Weißschuh Date: Fri Oct 20 13:39:39 2023 +0200 selftests/nolibc: explicitly specify ABI for MIPS More ABIs exist, for better clarity specify it explicitly everywhere. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit c4c20a7d6ef9d5a4330a63c1fd4553dac5f93c04 Author: Thomas Weißschuh Date: Fri Oct 20 09:36:18 2023 +0200 selftests/nolibc: use XARCH for MIPS MIPS has many different configurations prepare the support of additional ones by moving the build of MIPS to the generic XARCH infrastructure. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit aa68a5a83a0acc4c1babcb4f8be49261514ab65c Author: Thomas Weißschuh Date: Fri Oct 20 09:30:33 2023 +0200 tools/nolibc: move MIPS ABI validation into arch-mips.h When installing nolibc to a sysroot arch.h is not used so its ABI check is bypassed. This makes is possible to compile nolibc with a non O32 ABI which may build but can not run. Move the check into arch-mips.h so it will always be evaluated. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 48946c5aa7a848c7dfc2151267af92956f492f58 Author: Thomas Weißschuh Date: Sun Nov 5 11:07:05 2023 +0100 tools/nolibc: error out on unsupported architecture When an architecture is unsupported arch.h would silently continue. This leads to a lot of followup errors because my_syscallX() is not defined and the startup code is missing. Avoid these confusing errors and fail the build early with a clear error message and location. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau commit 91f16451593b4709036e72a6aaccadc16d87a339 Author: Thomas Weißschuh Date: Sun Nov 5 10:23:05 2023 +0100 selftests/nolibc: add script to run testsuite The script can run the testsuite for multiple architectures and provides an overall test report. Furthermore it can automatically download crosstools from mirrors.kernel.org if requested by the user. Example execution: $ ./run-tests.sh i386: 162 test(s): 162 passed, 0 skipped, 0 failed => status: success x86_64: 162 test(s): 162 passed, 0 skipped, 0 failed => status: success arm64: 162 test(s): 162 passed, 0 skipped, 0 failed => status: success arm: 162 test(s): 162 passed, 0 skipped, 0 failed => status: success mips: 162 test(s): 161 passed, 1 skipped, 0 failed => status: warning ppc: 162 test(s): 162 passed, 0 skipped, 0 failed => status: success ppc64: 162 test(s): 162 passed, 0 skipped, 0 failed => status: success ppc64le: 162 test(s): 162 passed, 0 skipped, 0 failed => status: success riscv: 162 test(s): 162 passed, 0 skipped, 0 failed => status: success s390: 162 test(s): 161 passed, 1 skipped, 0 failed => status: warning loongarch: 162 test(s): 161 passed, 1 skipped, 0 failed => status: warning Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20231105-nolibc-run-tests-v1-1-b59ff770a978@weissschuh.net commit 69620b3a5bc5e6798724ab9bf0dd1b3c980a4949 Author: Thomas Weißschuh Date: Tue Oct 31 21:37:00 2023 +0100 selftests/nolibc: support out-of-tree builds Out of tree builds are much more convenient when building for multiple architectures or configurations in parallel. Only absolute O= parameters are supported as Makefile.include will always resolve relative paths in relation to $(srctree) instead of the current directory. Add a call to "make outputmakefile" to verify that the sourcetree is clean. This is based on Zhangjins out-of-tree patch. It extends that work for get_init_cpio support and also drops relative O= specifications explicitly. Link: https://lore.kernel.org/lkml/06d96bd81fe812a9718098a383678ad3beba98b1.1691215074.git.falcon@tinylab.org/ Co-developed-by: Zhangjin Wu Signed-off-by: Zhangjin Wu Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20231031-nolibc-out-of-tree-v1-3-47c92f73590a@weissschuh.net commit 7263c9d9b67a9412fcfc2c90b259a28d55d0e970 Author: Thomas Weißschuh Date: Tue Oct 31 21:36:59 2023 +0100 selftests/nolibc: anchor paths in $(srcdir) if possible It is easier to recognize paths from their well-known location in the source tree than having to resolve the relative path in ones head. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20231031-nolibc-out-of-tree-v1-2-47c92f73590a@weissschuh.net commit bdeeeaba83682225a7bf5f100fe8652a59590d33 Author: Thomas Weißschuh Date: Tue Oct 31 21:36:58 2023 +0100 selftests/nolibc: use EFI -bios for LoongArch qemu qemu for LoongArch does not work properly with direct kernel boot. The kernel will panic during initialization and hang without any output. When booting in EFI mode everything work correctly. While users most likely don't have the LoongArch EFI binary installed at least an explicit error about 'file not found' is better than a hanging test without output that can never succeed. Link: https://lore.kernel.org/loongarch/1738d60a-df3a-4102-b1da-d16a29b6e06a@t-8ch.de/ Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20231031-nolibc-out-of-tree-v1-1-47c92f73590a@weissschuh.net commit bb6ec2e9fd8b83b2db68a449754c899a211bf84b Author: Mark Brown Date: Mon Oct 23 19:42:45 2023 +0100 tools/nolibc: Use linux/wait.h rather than duplicating it Linux defines a few custom flags for waitpid() which aren't currently provided by nolibc, make them available to nolibc based programs by just including linux/wait.h where they are defined instead of defining our own copy of the flags. Signed-off-by: Mark Brown Signed-off-by: Willy Tarreau Signed-off-by: Thomas Weißschuh commit 87f3afd366f7c668be0269efda8a89741a3ea6b3 Author: Chao Yu Date: Sun Dec 10 17:20:40 2023 +0800 f2fs: add tracepoint for f2fs_vm_page_mkwrite() This patch adds to support tracepoint for f2fs_vm_page_mkwrite(), meanwhile it prints more details for trace_f2fs_filemap_fault(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4e4f1eb9949b10cb7d76370fd27d41f20ef2b32b Author: Chao Yu Date: Sun Dec 10 17:20:39 2023 +0800 f2fs: introduce f2fs_invalidate_internal_cache() for cleanup Just cleanup, no logic changes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 59d0d4c3eae0f3dd8886ed59f89f21fa09e324f5 Author: Chao Yu Date: Sun Dec 10 17:20:38 2023 +0800 f2fs: update blkaddr in __set_data_blkaddr() for cleanup This patch allows caller to pass blkaddr to f2fs_set_data_blkaddr() and let __set_data_blkaddr() inside f2fs_set_data_blkaddr() to update dn->data_blkaddr w/ last value of blkaddr. Just cleanup, no logic changes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2020cd48e41cb8470bb1ca0835033d13d3178425 Author: Chao Yu Date: Sun Dec 10 17:20:37 2023 +0800 f2fs: introduce get_dnode_addr() to clean up codes Just cleanup, no logic changes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8596ba324356a7392a6639024de8c9ae7a9fce92 Author: Ian Rogers Date: Wed Nov 29 14:35:40 2023 -0800 perf stat: Fix help message for --metric-no-threshold option Copy-paste error led to help message for metric-no-threshold repeating that of metric-no-merge. Fixes: 1fd09e299bdd434b ("perf metric: Add --metric-no-threshold option") Reported-by: Stephane Eranian Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231129223540.2247030-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit bb6e1c8fa5b9b95bbb8e39b6105f8f6550e070fc Author: Chao Yu Date: Sun Dec 10 17:20:36 2023 +0800 f2fs: delete obsolete FI_DROP_CACHE FI_DROP_CACHE was introduced in commit 1e84371ffeef ("f2fs: change atomic and volatile write policies") for volatile write feature, after commit 7bc155fec5b3 ("f2fs: kill volatile write support"), we won't support volatile write, let's delete related codes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a53936361330e4c55c0654605178281387d9c761 Author: Chao Yu Date: Sun Dec 10 17:20:35 2023 +0800 f2fs: delete obsolete FI_FIRST_BLOCK_WRITTEN Commit 3c6c2bebef79 ("f2fs: avoid punch_hole overhead when releasing volatile data") introduced FI_FIRST_BLOCK_WRITTEN as below reason: This patch is to avoid some punch_hole overhead when releasing volatile data. If volatile data was not written yet, we just can make the first page as zero. After commit 7bc155fec5b3 ("f2fs: kill volatile write support"), we won't support volatile write, but it missed to remove obsolete FI_FIRST_BLOCK_WRITTEN, delete it in this patch. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c21357e4461f3f9c8ff93302906b5372411ee108 Author: Frederic Weisbecker Date: Wed Oct 4 01:29:03 2023 +0200 srcu: Explain why callbacks invocations can't run concurrently If an SRCU barrier is queued while callbacks are running and a new callbacks invocator for the same sdp were to run concurrently, the RCU barrier might execute too early. As this requirement is non-obvious, make sure to keep a record. Signed-off-by: Frederic Weisbecker Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 94c55b9e21979daa88e190bf971c47432a818ebe Author: Frederic Weisbecker Date: Wed Oct 4 01:29:02 2023 +0200 srcu: No need to advance/accelerate if no callback enqueued While in grace period start, there is nothing to accelerate and therefore no need to advance the callbacks either if no callback is to be enqueued. Spare these needless operations in this case. Signed-off-by: Frederic Weisbecker Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 20eb4142397cf3ec221de43f10ea149af462c572 Author: Frederic Weisbecker Date: Wed Oct 4 01:29:01 2023 +0200 srcu: Remove superfluous callbacks advancing from srcu_gp_start() Callbacks advancing on SRCU must be performed on two specific places: 1) On enqueue time in order to make room for the acceleration of the new callback. 2) On invocation time in order to move the callbacks ready to invoke. Any other callback advancing callsite is needless. Remove the remaining one in srcu_gp_start(). Co-developed-by: Yong He Signed-off-by: Yong He Co-developed-by: Joel Fernandes Signed-off-by: Joel Fernandes Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney Co-developed-by: Neeraj Upadhyay (AMD) Signed-off-by: Neeraj Upadhyay (AMD) commit 4ac934b1aaa99e00ca25875d55094a4fe34e212d Author: Li zeming Date: Tue Oct 24 10:04:34 2023 +0800 PM: hibernate: Do not initialize error in snapshot_write_next() The error variable in snapshot_write_next() gets a value before it is used, so don't initialize it to 0 upfront. Signed-off-by: Li zeming [ rjw: Subject and changelog rewrite ] Signed-off-by: Rafael J. Wysocki commit bbeaa4691fa8682e2fe2e87f28d5fce39805fa68 Author: Li zeming Date: Fri Oct 27 09:55:33 2023 +0800 PM: hibernate: Do not initialize error in swap_write_page() 'error' first receives the function result before it is used, and it does not need to be assigned a value during definition. Signed-off-by: Li zeming [ rjw: Subject rewrite ] Signed-off-by: Rafael J. Wysocki commit a1ca8295ee53a2fc57085fae26df37228c655791 Author: Wang chaodong Date: Fri Oct 20 16:51:06 2023 +0800 PM: hibernate: Drop unnecessary local variable initialization It is not necessary to intialize the error variable in create_basic_memory_bitmaps(), because it is only read after being assigned a value. Signed-off-by: Wang chaodong [ rjw: Subject and changelog rewrite ] Signed-off-by: Rafael J. Wysocki commit 23d90b2404050c00c15058710d56bb46e1c5ab36 Author: Pedro Falcato Date: Fri Oct 20 18:30:15 2023 +0100 rcu: Remove unused macros from rcupdate.h ulong2long, USHORT_CMP_GE and USHORT_CMP_LT are redundant and have been unused for quite a few releases. Signed-off-by: Pedro Falcato Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 4e58aaeebb3c27993c734c99eae6881b196b1ddb Author: Paul E. McKenney Date: Wed Nov 1 18:28:38 2023 -0700 rcu: Restrict access to RCU CPU stall notifiers Although the RCU CPU stall notifiers can be useful for dumping state when tracking down delicate forward-progress bugs where NUMA effects cause cache lines to be delivered to a given CPU regularly, but always in a state that prevents that CPU from making forward progress. These bugs can be detected by the RCU CPU stall-warning mechanism, but in some cases, the stall-warnings printk()s disrupt the forward-progress bug before any useful state can be obtained. Unfortunately, the notifier mechanism added by commit 5b404fdabacf ("rcu: Add RCU CPU stall notifier") can make matters worse if used at all carelessly. For example, if the stall warning was caused by a lock not being released, then any attempt to acquire that lock in the notifier will hang. This will prevent not only the notifier from producing any useful output, but it will also prevent the stall-warning message from ever appearing. This commit therefore hides this new RCU CPU stall notifier mechanism under a new RCU_CPU_STALL_NOTIFIER Kconfig option that depends on both DEBUG_KERNEL and RCU_EXPERT. In addition, the rcupdate.rcu_cpu_stall_notifiers=1 kernel boot parameter must also be specified. The RCU_CPU_STALL_NOTIFIER Kconfig option's help text contains a warning and explains the dangers of careless use, recommending lockless notifier code. In addition, a WARN() is triggered each time that an attempt is made to register a stall-warning notifier in kernels built with CONFIG_RCU_CPU_STALL_NOTIFIER=y. This combination of measures will keep use of this mechanism confined to debug kernels and away from routine deployments. [ paulmck: Apply Dan Carpenter feedback. ] Fixes: 5b404fdabacf ("rcu: Add RCU CPU stall notifier") Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) Signed-off-by: Neeraj Upadhyay (AMD) commit 18966f7b9458d3b19412fe9dfb421ab59401bfe1 Author: Paul E. McKenney Date: Wed Oct 11 09:45:54 2023 -0700 rcu-tasks: Mark RCU Tasks accesses to current->rcu_tasks_idle_cpu The task_struct structure's ->rcu_tasks_idle_cpu can be concurrently read and written from the RCU Tasks grace-period kthread and from the CPU on which the task_struct structure's task is running. This commit therefore marks the accesses appropriately. Reported-by: Boqun Feng Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) Signed-off-by: Neeraj Upadhyay (AMD) commit 01940cd4a6b9c47995a0cdaaafdd459b0d2221a2 Author: Randy Dunlap Date: Fri Nov 10 19:02:13 2023 -0800 MIPS: SGI-IP27: hubio: fix nasid kernel-doc warning ip27-hubio.c:32: warning: Function parameter or member 'nasid' not described in 'hub_pio_map' ip27-hubio.c:32: warning: Excess function parameter 'hub' description in 'hub_pio_map' Fixes: 4bf841ebf17a ("MIPS: SGI-IP27: get rid of compact node ids") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: lore.kernel.org/r/202311101336.BUL1JuvU-lkp@intel.com Cc: Thomas Bogendoerfer Cc: Paul Burton Cc: Ralf Baechle Cc: Jiri Slaby Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit 06dc6a869597ec68b2e4ebcde8147f4a52965e96 Author: Sergio Paracuellos Date: Sun Oct 22 11:06:33 2023 +0200 MAINTAINERS: Add myself as maintainer of the Ralink architecture Its been a while since I am making contributions to this architecture. Hence add myself as maintainer. Signed-off-by: Sergio Paracuellos Acked-by: John Crispin Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 15d03119ed215177c52fb5c9edbe184b78263b65 Author: Andrzej Hajda Date: Fri Nov 24 08:53:04 2023 +0100 drm/i915/display: do not use cursor size reduction on MTL Cursor size reduction is not supported since MTL. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231124-cur_size_reduction-v1-1-30495dba475f@intel.com commit e367e3c765f5477b2e79da0f1399aed49e2d1e37 Author: LeoLiuoc Date: Mon Dec 11 17:15:43 2023 +0800 PCI: Add ACS quirk for more Zhaoxin Root Ports Add more Root Port Device IDs to pci_quirk_zhaoxin_pcie_ports_acs() for some new Zhaoxin platforms. Fixes: 299bd044a6f3 ("PCI: Add ACS quirk for Zhaoxin Root/Downstream Ports") Link: https://lore.kernel.org/r/20231211091543.735903-1-LeoLiu-oc@zhaoxin.com Signed-off-by: LeoLiuoc [bhelgaas: update subject, drop changelog, add Fixes, add stable tag, fix whitespace, wrap code comment] Signed-off-by: Bjorn Helgaas Cc: # 5.7 commit eeae55ed9c0a74604a49789e36b7cdf0ee8bd69c Author: Zhang Rui Date: Sat Dec 2 02:09:28 2023 +0800 intel_idle: Add Meteorlake support Add intel_idle support for MeteorLake. C1 and C1E states on Meteorlake are mutually exclusive, like Alderlake and Raptorlake, but they have little latency difference with measureable power difference, so always enable "C1E promotion" bit and expose C1E only. Expose C6 because it has less power compared with C1E, and smaller latency compared with C8/C10. Ignore C8 and expose C10, because C8 does not show latency advantage compared with C10. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 4649620d9404d3aceb25891c24bab77143e3f21c Author: Rafael J. Wysocki Date: Fri Dec 8 20:13:44 2023 +0100 thermal: core: Make thermal_zone_device_unregister() return after freeing the zone Make thermal_zone_device_unregister() wait until all of the references to the given thermal zone object have been dropped and free it before returning. This guarantees that when thermal_zone_device_unregister() returns, there is no leftover activity regarding the thermal zone in question which is required by some of its callers (for instance, modular driver code that wants to know when it is safe to let the module go away). Subsequently, this will allow some confusing device_is_registered() checks to be dropped from the thermal sysfs and core code. Signed-off-by: Rafael J. Wysocki Reviewed-and-tested-by: Lukasz Luba Acked-by: Daniel Lezcano commit 693af17bcee427fd9d14942fee2b03a397e06b3e Author: Li peiyu <579lpy@gmail.com> Date: Mon Dec 11 20:31:01 2023 +0800 dt-bindings: iio: humidity: Add TI HDC302x support Add device tree bindings for HDC3020/HDC3021/HDC3022 humidity and temperature sensors. Signed-off-by: Li peiyu <579lpy@gmail.com> Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231211123101.9868-1-579lpy@gmail.com Signed-off-by: Jonathan Cameron commit c9180b8e39befcc703940873ac49e0603ef42bf7 Author: Li peiyu <579lpy@gmail.com> Date: Mon Dec 11 20:29:40 2023 +0800 iio: humidity: Add driver for ti HDC302x humidity sensors Add support for HDC302x integrated capacitive based relative humidity (RH) and temperature sensor. This driver supports reading values, reading the maximum and minimum of values and controlling the integrated heater of the sensor. Co-developed-by: Javier Carrasco Signed-off-by: Javier Carrasco Signed-off-by: Li peiyu <579lpy@gmail.com> Link: https://lore.kernel.org/r/20231211122940.9791-1-579lpy@gmail.com Signed-off-by: Jonathan Cameron commit a4887e9782959e3e8f756412b53808157803de60 Author: Javier Carrasco Date: Mon Dec 11 20:28:40 2023 +0800 iio: ABI: document temperature and humidity peak/trough raw attributes The in_temp_peak_raw attribute is already in use, but its documentation is still missing. The in_humidityrelative_raw must be documented for a new iio user that supports this attribute. Add temp and humidityrelative use cases. When at it, remove an extra blank space in the description. For users that support minimum values, a new in__trough_raw attribute is required. Add this attribute and document the first uses of it for temp and humidityrelative types. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20231211122840.9760-1-579lpy@gmail.com Signed-off-by: Jonathan Cameron commit 5bc2ea60897e0f899fb93930dd867dae7c8eb11f Author: Javier Carrasco Date: Mon Dec 11 20:27:47 2023 +0800 iio: core: introduce trough info element for minimum values The IIO_CHAN_INFO_PEAK info element is used for maximum values and currently there is no equivalent for minimum values. Instead of overloading the existing peak info element, a new info element can be added. In principle there is no need to add a _TROUGH_SCALE element as the scale will be the same as the one required for INFO_PEAK, which in turn is sometimes omitted if a single scale for peaks and raw values is required. Add an IIO_CHAN_INFO_TROUGH info element for minimum values. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20231211122747.9723-1-579lpy@gmail.com Signed-off-by: Jonathan Cameron commit 8b0d4c40d704cb7d01ad4f647ff5a51881767acd Author: Anshul Dalal Date: Fri Dec 8 15:52:10 2023 +0530 iio: light: driver for Lite-On ltr390 Implements driver for the Ambient/UV Light sensor LTR390. The driver exposes two ways of getting sensor readings: 1. Raw UV Counts directly from the sensor 2. The computed UV Index value with a percision of 2 decimal places [NOTE] Ambient light sensing has not been implemented yet. Driver tested on RPi Zero 2W Datasheet: https://optoelectronics.liteon.com/upload/download/DS86-2015-0004/LTR-390UV_Final_%20DS_V1%201.pdf Signed-off-by: Anshul Dalal Link: https://lore.kernel.org/r/20231208102211.413019-2-anshulusr@gmail.com Signed-off-by: Jonathan Cameron commit 48ba7d2f24f18c6752275c18f25a396221aa2787 Author: Anshul Dalal Date: Fri Dec 8 15:52:09 2023 +0530 dt-bindings: iio: light: add ltr390 Add binding for Lite-On LTR390 which is an Ambient/UV light sensor that communicates over i2c with an address of 0x53. Datasheet: https://optoelectronics.liteon.com/upload/download/DS86-2015-0004/LTR-390UV_Final_%20DS_V1%201.pdf Reviewed-by: Krzysztof Kozlowski Signed-off-by: Anshul Dalal Link: https://lore.kernel.org/r/20231208102211.413019-1-anshulusr@gmail.com Signed-off-by: Jonathan Cameron commit c95e0a719820054b28ef8687cc05b8deeb1c9106 Author: Jiapeng Chong Date: Fri Dec 8 10:17:15 2023 +0800 iio: light: isl76682: remove unreachable code The function isl76682_read_raw cannot execute return -EINVAL up to 145 lines, delete the invalid code. drivers/iio/light/isl76682.c:145 isl76682_read_raw() warn: ignoring unreachable code. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7698 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20231208021715.32450-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jonathan Cameron commit 6362d96585e35b433981b3833a9e2737cec33774 Author: Petre Rodan Date: Thu Dec 7 18:46:29 2023 +0200 iio: pressure: driver for Honeywell HSC/SSC series Adds driver for digital Honeywell TruStability HSC and SSC series pressure and temperature sensors. Communication is one way. The sensor only requires 4 bytes worth of clock pulses on both i2c and spi in order to push the data out. The i2c address is hardcoded and depends on the part number. There is no additional GPIO control. code is now based on iio/togreg Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf [HSC] Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-ssc-series/documents/sps-siot-trustability-ssc-series-standard-accuracy-board-mount-pressure-sensors-50099533-a-en-ciid-151134.pdf [SSC] Signed-off-by: Petre Rodan Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231207164634.11998-2-petre.rodan@subdimension.ro Signed-off-by: Jonathan Cameron commit 5fc0a980cca0b0d98558abbc7691b5f24d573b1a Author: Petre Rodan Date: Thu Dec 7 18:46:28 2023 +0200 dt-bindings: iio: pressure: add honeywell,hsc030 Adds binding for digital Honeywell TruStability HSC and SSC series pressure and temperature sensors. Communication is one way. The sensor only requires 4 bytes worth of clock pulses on both i2c and spi in order to push the data out. The i2c address is hardcoded and depends on the part number. There is no additional GPIO control. driver is based on iio/togreg Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-hsc-series/documents/sps-siot-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en-ciid-151133.pdf [HSC] Datasheet: https://prod-edam.honeywell.com/content/dam/honeywell-edam/sps/siot/en-us/products/sensors/pressure-sensors/board-mount-pressure-sensors/trustability-ssc-series/documents/sps-siot-trustability-ssc-series-standard-accuracy-board-mount-pressure-sensors-50099533-a-en-ciid-151134.pdf [SSC] Reviewed-by: Krzysztof Kozlowski Signed-off-by: Petre Rodan Link: https://lore.kernel.org/r/20231207164634.11998-1-petre.rodan@subdimension.ro Signed-off-by: Jonathan Cameron commit 608531bd8615766fda6f423c746d89ac9db5c0d0 Author: Marek Vasut Date: Thu Dec 7 14:41:50 2023 +0100 doc: iio: Document intensity scale as poorly defined Add comment about intensity scale being poorly defined and having no proper units. Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20231207134200.329174-1-marex@denx.de Signed-off-by: Jonathan Cameron commit 464cb187585fc46decf5058d0a92e46d59582cdc Author: Crt Mori Date: Wed Dec 6 21:49:42 2023 +0100 dt-bindings: iio: temperature: add MLX90635 device Add device tree bindings for MLX90635 Infra Red contactless temperature sensor. Signed-off-by: Crt Mori Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/0313c3b9f7490c32891627feb5ef35d5e5d9aae9.1701872051.git.cmo@melexis.com Signed-off-by: Jonathan Cameron commit a1d1ba5e1c28b9887be1bdb3630caf0b532ec980 Author: Crt Mori Date: Wed Dec 6 21:49:33 2023 +0100 iio: temperature: mlx90635 MLX90635 IR Temperature sensor MLX90635 is an Infra Red contactless temperature sensor most suitable for consumer applications where measured object temperature is in range between -20 to 100 degrees Celsius. It has improved accuracy for measurements within temperature range of human body and can operate in ambient temperature range between -20 to 85 degrees Celsius. Driver provides simple power management possibility as it returns to lowest possible power mode (Step sleep mode) in which temperature measurements can still be performed, yet for continuous measuring it switches to Continuous power mode where measurements constantly change without triggering. Signed-off-by: Crt Mori Link: https://lore.kernel.org/r/c6590e4fb8d993a5317b486a3e45e1bb6e9e3318.1701872051.git.cmo@melexis.com Signed-off-by: Jonathan Cameron commit 21aa971d3e295c2c81d0887f8a3e85a95dd687c5 Author: Nuno Sa Date: Thu Dec 7 13:39:31 2023 +0100 iio: adc: adi-axi-adc: convert to regmap Use MMIO regmap interface. It makes things easier for manipulating bits. Reviewed-by: David Lechner Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-8-a4a33bc4d70e@analog.com Signed-off-by: Jonathan Cameron commit 0d7096c1dddbd6635fc9a819e98d0aa130deaf2b Merge: 4ac9ed81aaaab 3c49d848d2d3c Author: Mark Brown Date: Mon Dec 11 19:04:43 2023 +0000 spi: pl022: clean up some unused variables Merge series from Nam Cao : The driver was refactored in 9b2ef250b31d ("spi: spl022: switch to use default spi_transfer_one_message()"), and some variables are now unused because of that. Clean them up. commit a142ae76e1e11dc4c5f563ada2a1cfc53378e432 Merge: 16e5ac127d8d1 8d6fab52f3fda Author: Mark Brown Date: Mon Dec 11 19:04:19 2023 +0000 regulator: Convert to platform remove callback Merge series from Uwe Kleine-König : Hello, this series converts all drivers below drivers/regulator to struct platform_driver::remove_new(). See commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") for an extended explanation and the eventual goal. All conversations are trivial, because all .remove() callbacks returned zero unconditionally. There are no interdependencies between these patches, so they could be picked up individually. However I'd expect them to go in all together via Mark's regulator tree. Best regards Uwe Uwe Kleine-König (8): regulator: arizona-ldo1: Convert to platform remove callback returning void regulator: bd9571mwv: Convert to platform remove callback returning void regulator: db8500-prcmu: Convert to platform remove callback returning void regulator: stm32-vrefbuf: Convert to platform remove callback returning void regulator: uniphier: Convert to platform remove callback returning void regulator: userspace-consumer: Convert to platform remove callback returning void regulator: virtual: Convert to platform remove callback returning void regulator: wm8350: Convert to platform remove callback returning void drivers/regulator/arizona-ldo1.c | 8 +++----- drivers/regulator/bd9571mwv-regulator.c | 5 ++--- drivers/regulator/db8500-prcmu.c | 6 ++---- drivers/regulator/stm32-vrefbuf.c | 6 ++---- drivers/regulator/uniphier-regulator.c | 6 ++---- drivers/regulator/userspace-consumer.c | 6 ++---- drivers/regulator/virtual.c | 6 ++---- drivers/regulator/wm8350-regulator.c | 6 ++---- 8 files changed, 17 insertions(+), 32 deletions(-) base-commit: 0f5f12ac05f36f117e793656c3f560625e927f1b -- 2.42.0 commit e94e06d8a7960fd840ea92021ca1bf1362ea67f8 Author: Mark Brown Date: Sat Dec 9 01:02:59 2023 +0000 arm64/sysreg: Add new system registers for GCS FEAT_GCS introduces a number of new system registers. Add the registers available up to EL2 to sysreg as per DDI0601 2022-12. Signed-off-by: Mark Brown Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-13-45284e538474@kernel.org Signed-off-by: Will Deacon commit e3a649ecf8b9253cb1d05ceb085544472b06446f Author: Mark Brown Date: Sat Dec 9 01:02:58 2023 +0000 arm64/sysreg: Add definition for FPMR DDI0601 2023-09 defines a new sysrem register FPMR (Floating Point Mode Register) which configures the new FP8 features. Add a definition of this register. Signed-off-by: Mark Brown Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-12-45284e538474@kernel.org Signed-off-by: Will Deacon commit 126cb3a60d35cc2ce7db090b087e00ff85b12cfc Author: Mark Brown Date: Sat Dec 9 01:02:57 2023 +0000 arm64/sysreg: Update HCRX_EL2 definition for DDI0601 2023-09 DDI0601 2023-09 defines new fields in HCRX_EL2 controlling access to new system registers, update our definition of HCRX_EL2 to reflect this. Signed-off-by: Mark Brown Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-11-45284e538474@kernel.org Signed-off-by: Will Deacon commit a6052284a9f9bcfb982edfe00044ecdfdf72eaa7 Author: Mark Brown Date: Sat Dec 9 01:02:56 2023 +0000 arm64/sysreg: Update SCTLR_EL1 for DDI0601 2023-09 DDI0601 2023-09 defines some new fields in SCTLR_EL1 controlling new MTE and floating point features. Update our sysreg definition to reflect these. Signed-off-by: Mark Brown Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-10-45284e538474@kernel.org Signed-off-by: Will Deacon commit 8afe582d77000ad244b66ed278aedc4ab5ee1634 Author: Mark Brown Date: Sat Dec 9 01:02:55 2023 +0000 arm64/sysreg: Update ID_AA64SMFR0_EL1 definition for DDI0601 2023-09 The 2023-09 release of DDI0601 defines a number of new feature enumeration fields in ID_AA64SMFR0_EL1. Add these fields. Signed-off-by: Mark Brown Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-9-45284e538474@kernel.org Signed-off-by: Will Deacon commit 9e4f409b07df14443ae4840f17f07e5025435e3d Author: Mark Brown Date: Sat Dec 9 01:02:54 2023 +0000 arm64/sysreg: Add definition for ID_AA64FPFR0_EL1 DDI0601 2023-09 defines a new feature register ID_AA64FPFR0_EL1 which enumerates a number of FP8 related features. Add a definition for it. Signed-off-by: Mark Brown Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-8-45284e538474@kernel.org Signed-off-by: Will Deacon commit b5aefb668701c2b019011f6f8fe29814b8529ecd Author: Mark Brown Date: Sat Dec 9 01:02:53 2023 +0000 arm64/sysreg: Add definition for ID_AA64ISAR3_EL1 DDI0601 2023-09 adds a new system register ID_AA64ISAR3_EL1 enumerating new floating point and TLB invalidation features. Add a defintion for it. Signed-off-by: Mark Brown Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-7-45284e538474@kernel.org Signed-off-by: Will Deacon commit 6e3dcfd139755d95f2c0d1f865f2e093d2b35c91 Author: Mark Brown Date: Sat Dec 9 01:02:52 2023 +0000 arm64/sysreg: Update ID_AA64ISAR2_EL1 defintion for DDI0601 2023-09 DDI0601 2023-09 defines some new fields in previously RES0 space in ID_AA64ISAR2_EL1, together with one new enum value. Update the system register definition to reflect this. Signed-off-by: Mark Brown Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-6-45284e538474@kernel.org Signed-off-by: Will Deacon commit 9fb5dc53a1176402905a7dde6cd812bc01ce6831 Author: Mark Brown Date: Sat Dec 9 01:02:51 2023 +0000 arm64/sysreg: Add definition for ID_AA64PFR2_EL1 DDI0601 2023-09 defines a new system register ID_AA64PFR2_EL1 which enumerates FPMR and some new MTE features. Add a definition of this register. Signed-off-by: Mark Brown Reviewed-by: Fuad Tabba Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-5-45284e538474@kernel.org Signed-off-by: Will Deacon commit 35768b23d830302c9b818a213a9c1e5efb618218 Author: Joey Gouly Date: Sat Dec 9 01:02:50 2023 +0000 arm64/sysreg: update CPACR_EL1 register Add E0POE bit that traps accesses to POR_EL0 from EL0. Updated according to DDI0601 2023-03. Signed-off-by: Joey Gouly Reviewed-by: Mark Brown Acked-by: Catalin Marinas Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-4-45284e538474@kernel.org Signed-off-by: Will Deacon commit c0c5a8ea96b877e903b40ed2345e73f83b0ed612 Author: Joey Gouly Date: Sat Dec 9 01:02:49 2023 +0000 arm64/sysreg: add system register POR_EL{0,1} Add POR_EL{0,1} according to DDI0601 2023-03. Signed-off-by: Joey Gouly Reviewed-by: Mark Brown Acked-by: Catalin Marinas Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-3-45284e538474@kernel.org Signed-off-by: Will Deacon commit 41bb68fbd016f0735798348dee2034f35cc06a17 Author: Fuad Tabba Date: Sat Dec 9 01:02:48 2023 +0000 arm64/sysreg: Add definition for HAFGRTR_EL2 Add a definition of HAFGRTR_EL2 (fine grained trap control for the AMU) as per DDI0601 2023-09. This was extracted from Fuad Tabba's patch "KVM: arm64: Handle HAFGRTR_EL2 trapping in nested virt". Signed-off-by: Fuad Tabba Link: https://lore.kernel.org/r/20231206100503.564090-6-tabba@google.com [Extract sysreg update and rewrite commit message -- broonie] Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-2-45284e538474@kernel.org Signed-off-by: Will Deacon commit 256f442895ed9846bddf020d95c112de830c336c Author: Fuad Tabba Date: Sat Dec 9 01:02:47 2023 +0000 arm64/sysreg: Update HFGITR_EL2 definiton to DDI0601 2023-09 The 2023-09 release of the architecture XML (DDI0601) adds a new field ATS1E1A to HFGITR_EL2, update our definition of the register to match. This was extracted from Faud Tabba's patch "KVM: arm64: Add latest HFGITR_EL2 FGT entries to nested virt" [Extracted the sysreg definition from Faud's original patch and reword subject to match -- broonie] Signed-off-by: Fuad Tabba Message-Id: <20231206100503.564090-4-tabba@google.com> Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231209-b4-arm64-sysreg-additions-v1-1-45284e538474@kernel.org Signed-off-by: Will Deacon commit 6971beb4ec52ad7b26f5b5eedf19d4963be7df1b Author: Christian Brauner Date: Sun Nov 19 19:03:33 2023 +0100 statmount: simplify numeric option retrieval Don't use all of this indirection which makes it really hard to follow the code which is very basic. Error handling is also not really neede here at all. Signed-off-by: Christian Brauner commit 46eae99ef73302f9fb3dddcd67c374b3dffe8fd6 Author: Miklos Szeredi Date: Wed Oct 25 16:02:02 2023 +0200 add statmount(2) syscall Add a way to query attributes of a single mount instead of having to parse the complete /proc/$PID/mountinfo, which might be huge. Lookup the mount the new 64bit mount ID. If a mount needs to be queried based on path, then statx(2) can be used to first query the mount ID belonging to the path. Design is based on a suggestion by Linus: "So I'd suggest something that is very much like "statfsat()", which gets a buffer and a length, and returns an extended "struct statfs" *AND* just a string description at the end." The interface closely mimics that of statx. Handle ASCII attributes by appending after the end of the structure (as per above suggestion). Pointers to strings are stored in u64 members to make the structure the same regardless of pointer size. Strings are nul terminated. Link: https://lore.kernel.org/all/CAHk-=wh5YifP7hzKSbwJj94+DZ2czjrZsczy6GBimiogZws=rg@mail.gmail.com/ Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20231025140205.3586473-5-mszeredi@redhat.com Reviewed-by: Ian Kent [Christian Brauner : various minor changes] Signed-off-by: Christian Brauner commit bbbc18d8c27cc9d40cc9a3b03b61e4df85311146 Author: Charles Keepax Date: Mon Dec 11 16:00:19 2023 +0000 ASoC: cs42l43: Allow HP amp to cool off after current limit Whilst occasional current limiting is fine, constant current limiting should be avoided. Add a back off system that will disable the headphone amp, if a lot of current limiting is seen in a short window of time. Signed-off-by: Charles Keepax Link: https://msgid.link/r/20231211160019.2034442-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 62d35629da807d3a0729980e8012263ff84a0966 Author: Dmitry Baryshkov Date: Sun Dec 3 14:53:15 2023 +0300 drm/msm/dpu: move encoder status to standard encoder debugfs dir Now as we have standard per-encoder debugfs directory, move DPU encoder status file to that directory. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/570219/ Link: https://lore.kernel.org/r/20231203115315.1306124-4-dmitry.baryshkov@linaro.org commit eb3f7cbee2942b2c98c1af1652199c46d507153e Author: Uwe Kleine-König Date: Sat Dec 9 16:31:09 2023 +0100 drm/bridge: ti-sn65dsi86: Associate PWM device to auxiliary device It's the ti_sn65dsi86.pwm auxiliary driver that creates the pwmchip, so let the auxiliary device be the parent of the pwm device. Note that getting a reference to the ti-sn65dsi86's pwm using pwm_get() isn't affected by this change as ti_sn65dsi86_add_aux_device() sets the auxiliary device's of_node to that of the main device. Also change PM runtime tracking and diagnostic messages to use that one. After enabling runtime PM operation for the auxiliary device, all works as expected as parent devices are handled just fine. Signed-off-by: Uwe Kleine-König Tested-by: Nikita Travkin # Acer Aspire 1 Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231209153108.1988551-2-u.kleine-koenig@pengutronix.de commit 2ebe81c814355d000fe49d9c4213983844dcb32b Author: Aleksander Lobakin Date: Wed Dec 6 21:59:19 2023 +0100 net, xdp: Allow metadata > 32 32 bytes may be not enough for some custom metadata. Relax the restriction, allow metadata larger than 32 bytes and make __skb_metadata_differs() work with bigger lengths. Now size of metadata is only limited by the fact it is stored as u8 in skb_shared_info, so maximum possible value is 255. Size still has to be aligned to 4, so the actual upper limit becomes 252. Most driver implementations will offer less, none can offer more. Other important conditions, such as having enough space for xdp_frame building, are already checked in bpf_xdp_adjust_meta(). Signed-off-by: Aleksander Lobakin Signed-off-by: Larysa Zaremba Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/eb87653c-8ff8-447d-a7a1-25961f60518a@kernel.org Link: https://lore.kernel.org/bpf/20231206205919.404415-3-larysa.zaremba@intel.com commit 15c79c6507c0eab5ec0d4cd402ac52d42735a43e Author: Larysa Zaremba Date: Wed Dec 6 21:59:18 2023 +0100 selftests/bpf: Increase invalid metadata size Changed check expects passed data meta to be deemed invalid. After loosening the requirement, the size of 36 bytes becomes valid. Therefore, increase tested meta size to 256, so we do not get an unexpected success. Signed-off-by: Larysa Zaremba Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231206205919.404415-2-larysa.zaremba@intel.com commit 70f008fb3ea9bd2e6727eebc858405acd49a212b Author: Amelie Delaunay Date: Fri Nov 24 17:02:35 2023 +0100 dmaengine: dmatest: prevent using swiotlb buffer with nobounce parameter Source and destination data buffers are allocated with GPF_KERNEL flag. It means that, if the DDR is more than 2GB, buffers can be allocated above the 32-bit addressable space. In this case, and if the dma controller is only 32-bit compatible, swiotlb bounce buffer, located in the 32-bit addressable space, is used and introduces a memcpy. To prevent this extra memcpy, due to swiotlb bounce buffer use because source or destination data buffer is allocated above the 32-bit addressable space, force source and destination data buffers allocation with GPF_DMA instead, when nobounce parameter is true. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20231124160235.2459326-1-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 29a9ac6414abd634e7f460a250b70a452d9a04b9 Author: Daniel Matyas Date: Tue Oct 31 20:21:57 2023 +0200 hwmon: (max31827) Add custom attribute for resolution Added custom channel-specific (temp1) attribute for resolution. The wait time for a conversion in one-shot mode (enable = 0) depends on the resolution. When resolution is 12-bit, the conversion time is 140ms, but the minimum update_interval is 125ms. Handled this problem by waiting an additional 15ms (125ms + 15ms = 140ms). Added 'mask' parameter to the shutdown_write() function. Now it can either write or update bits, depending on the value of mask. This is needed, because for alarms a write is necessary, but for resolution only the resolution bits should be updated. Signed-off-by: Daniel Matyas Link: https://lore.kernel.org/r/20231031182158.124608-5-daniel.matyas@analog.com Signed-off-by: Guenter Roeck commit 64176bde4645686590bb0e5efcbcd18497ee4389 Author: Daniel Matyas Date: Tue Oct 31 20:21:56 2023 +0200 hwmon: (max31827) Return closest value in update_interval When user writes a value to update_interval which does not match the possible values, instead of returning invalid error, return the closest value. Signed-off-by: Daniel Matyas Link: https://lore.kernel.org/r/20231031182158.124608-4-daniel.matyas@analog.com Signed-off-by: Guenter Roeck commit 8a0806df46b62e88793cab0035da477092bda09a Author: Daniel Matyas Date: Tue Oct 31 20:21:55 2023 +0200 hwmon: (max31827) Update bits with shutdown_write() Added 'mask' parameter to the shutdown_write() function. Now it can either write or update bits, depending on the value of mask. This is needed, because for alarms a write is necessary, but for resolution only the resolution bits should be updated. Signed-off-by: Daniel Matyas Link: https://lore.kernel.org/r/20231031182158.124608-3-daniel.matyas@analog.com Signed-off-by: Guenter Roeck commit cbeb1d2acf5d28debbe710dff6357c859eee061a Author: Daniel Matyas Date: Tue Oct 31 20:21:54 2023 +0200 hwmon: (max31827) Add support for max31828 and max31829 Created of_match_table and id_table entries for max31828 and max31829. When adi,flt-q and/or adi,alrm-pol are not mentioned, the default configuration is loaded based on the type of the chip. Signed-off-by: Daniel Matyas Link: https://lore.kernel.org/r/20231031182158.124608-2-daniel.matyas@analog.com Signed-off-by: Guenter Roeck commit 88548710d2aed71677f7594a78219bf081d4297f Author: Daniel Matyas Date: Tue Oct 31 20:21:53 2023 +0200 hwmon: (max31827) Handle new properties from the devicetree Used fwnode to retrieve data from the devicetree in the init_client function. If the uint32 properties are not present, the default values are used for max31827 chip. Signed-off-by: Daniel Matyas Link: https://lore.kernel.org/r/20231031182158.124608-1-daniel.matyas@analog.com Signed-off-by: Guenter Roeck commit b449879243dbd141b5a50ecb4a312ab87d313390 Author: Marius Zachmann Date: Sun Dec 10 23:03:57 2023 +0100 hwmon: (corsair-cpro) use NULL instead of 0 Replaces the integer 0 with NULL. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312100455.k6m2eO4N-lkp@intel.com/ Signed-off-by: Marius Zachmann Link: https://lore.kernel.org/r/20231210220357.77036-1-mail@mariuszachmann.de Signed-off-by: Guenter Roeck commit b6b2264ba2090bb63665458e4b9369781df7dd4d Author: Colin Ian King Date: Sat Dec 9 23:12:40 2023 +0000 iommu/apple-dart: Fix spelling mistake "grups" -> "groups" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20231209231240.4056082-1-colin.i.king@gmail.com Signed-off-by: Joerg Roedel commit c7fc12354be0ba47566d55f4ebdc6a47bd69d5ed Author: Vasant Hegde Date: Wed Nov 22 09:02:15 2023 +0000 iommu/amd/pgtbl_v2: Invalidate updated page ranges only Enhance __domain_flush_pages() to detect domain page table mode and use that info to build invalidation commands. So that we can use amd_iommu_domain_flush_pages() to invalidate v2 page table. Also pass PASID, gn variable to device_flush_iotlb() so that it can build IOTLB invalidation command for both v1 and v2 page table. Signed-off-by: Vasant Hegde Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231122090215.6191-10-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 2c535dd37d677abd11b278fce89b8bdb0a55facb Author: Vasant Hegde Date: Wed Nov 22 09:02:14 2023 +0000 iommu/amd: Make domain_flush_pages as global function - Rename domain_flush_pages() -> amd_iommu_domain_flush_pages() and make it as global function. - Rename amd_iommu_domain_flush_tlb_pde() -> amd_iommu_domain_flush_all() and make it as static. - Convert v1 page table (io_pgtble.c) to use amd_iommu_domain_flush_pages(). Signed-off-by: Vasant Hegde Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231122090215.6191-9-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 8d004ac1c67bc1584b4b6b90429487dac5b2d83f Author: Vasant Hegde Date: Wed Nov 22 09:02:13 2023 +0000 iommu/amd: Consolidate amd_iommu_domain_flush_complete() call Call amd_iommu_domain_flush_complete() from domain_flush_pages(). That way we can remove explicit call of amd_iommu_domain_flush_complete() from various places. Signed-off-by: Vasant Hegde Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231122090215.6191-8-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit bbf85fe10faadbd237a7b8df4423de4ab4bd67e7 Author: Vasant Hegde Date: Wed Nov 22 09:02:12 2023 +0000 iommu/amd: Refactor device iotlb invalidation code build_inv_iotlb_pages() and build_inv_iotlb_pasid() pretty much duplicates the code. Enhance build_inv_iotlb_pages() to invalidate guest IOTLB as well. And remove build_inv_iotlb_pasid() function. Suggested-by: Kishon Vijay Abraham I Signed-off-by: Vasant Hegde Reviewed-by: Suravee Suthikulpanit Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231122090215.6191-7-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 4f0a600799237ed95b403f24354305b0f81ccbb4 Author: Vasant Hegde Date: Wed Nov 22 09:02:11 2023 +0000 iommu/amd: Refactor IOMMU tlb invalidation code build_inv_iommu_pages() and build_inv_iommu_pasid() pretty much duplicates the code. Hence enhance build_inv_iommu_pages() to invalidate guest pages as well. And remove build_inv_iommu_pasid(). Suggested-by: Kishon Vijay Abraham I Signed-off-by: Vasant Hegde Reviewed-by: Suravee Suthikulpanit Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231122090215.6191-6-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit cf62924daf9f0363c82e4332d9ac9630f1d76c42 Author: Vasant Hegde Date: Wed Nov 22 09:02:10 2023 +0000 iommu/amd: Add support to invalidate multiple guest pages Current interface supports invalidating single page or entire guest translation information for a single process address space. IOMMU CMD_INV_IOMMU_PAGES and CMD_INV_IOTLB_PAGES commands supports invalidating range of pages. Add support to invalidate multiple pages. This is preparatory patch before consolidating host and guest invalidation code into single function. Following patches will consolidation tlb invalidation code. Signed-off-by: Vasant Hegde Reviewed-by: Suravee Suthikulpanit Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231122090215.6191-5-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit a976da66e8e547cd07a9792f5854c2f73c456a21 Author: Vasant Hegde Date: Wed Nov 22 09:02:09 2023 +0000 iommu/amd: Remove redundant passing of PDE bit Current code always sets PDE bit in INVALIDATE_IOMMU_PAGES command. Hence get rid of 'pde' variable across functions. We can re-introduce this bit whenever its needed. Suggested-by: Suravee Suthikulpanit Signed-off-by: Vasant Hegde Reviewed-by: Suravee Suthikulpanit Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231122090215.6191-4-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 3f2571fed2fa9e9ea61fd990a9a4fc20ca83b62e Author: Vasant Hegde Date: Wed Nov 22 09:02:08 2023 +0000 iommu/amd: Remove redundant domain flush from attach_device() Domain flush was introduced in attach_device() path to handle kdump scenario. Later init code was enhanced to handle kdump scenario where it also takes care of flushing everything including TLB (see early_enable_iommus()). Hence remove redundant flush from attach_device() function. Signed-off-by: Vasant Hegde Reviewed-by: Suravee Suthikulpanit Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231122090215.6191-3-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit af3263758bf0b65a040e90190ab708b8a4027947 Author: Vasant Hegde Date: Wed Nov 22 09:02:07 2023 +0000 iommu/amd: Rename iommu_flush_all_caches() -> amd_iommu_flush_all_caches() Rename function inline with driver naming convention. No functional changes. Signed-off-by: Vasant Hegde Reviewed-by: Suravee Suthikulpanit Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231122090215.6191-2-vasant.hegde@amd.com Signed-off-by: Joerg Roedel commit 57cdb720eaa5c4b2fcf04ba6ff6a26f638b0b474 Author: Suravee Suthikulpanit Date: Tue Oct 17 09:42:36 2023 -0500 iommu/amd: Do not flush IRTE when only updating isRun and destination fields According to the recent update in the AMD IOMMU spec [1], the IsRun and Destination fields of the Interrupt Remapping Table Entry (IRTE) are not cached by the IOMMU hardware. Therefore, do not issue the INVALIDATE_INTERRUPT_TABLE command when updating IRTE[IsRun] and IRTE[Destination] when IRTE[GuestMode]=1, which should help improve IOMMU AVIC/x2AVIC performance. References: [1] AMD IOMMU Spec Revision (Rev 3.08-PUB) (Link: https://www.amd.com/content/dam/amd/en/documents/processor-tech-docs/specifications/48882_IOMMU.pdf) Cc: Joao Martins Cc: Alejandro Jimenez Signed-off-by: Suravee Suthikulpanit Reviewed-by: Vasant Hegde Tested-by: Alejandro Jimenez Link: https://lore.kernel.org/r/20231017144236.8287-1-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit 62361638ae39d59eac974e5f8c7d6bfc66bec3b9 Author: Michal Simek Date: Fri Dec 1 09:35:00 2023 +0100 dt-bindings: hwmon: Increase max number of io-channels The Analog Monitoring System (AMS) defines 51 channels (Documentation/devicetree/bindings/iio/adc/xlnx,zynqmp-ams.yaml) that's why increase number to 51. Signed-off-by: Michal Simek Acked-by: Conor Dooley Link: https://lore.kernel.org/r/5110a313a5ce52ce6d7b5cb6b08368d42063dc30.1701419691.git.michal.simek@amd.com Signed-off-by: Guenter Roeck commit 159e459c0161c61d9fdb978e78f93c54184ee929 Author: Armin Wolf Date: Thu Nov 23 01:48:20 2023 +0100 hwmon: (dell-smm) Add Optiplex 7000 to fan control whitelist A user reported that on this machine, disabling BIOS fan control is necessary in order to change the fan speed. Tested-by: Reviewed-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231123004820.50635-10-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit e7caf3d1e8fd48aa93d2b61bb62bfe3e383edc4f Author: Armin Wolf Date: Thu Nov 23 01:48:19 2023 +0100 hwmon: (dell-smm) Document the WMI SMM interface Document the WMI SMM interface so that future developers can better understand how it works. Signed-off-by: Armin Wolf Reviewed-by: Hans de Goede Reviewed-by: Pali Rohár Link: https://lore.kernel.org/r/20231123004820.50635-9-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit b7a4706f66e5dfbb981c4f669e5b3fa92ad80fe1 Author: Armin Wolf Date: Thu Nov 23 01:48:18 2023 +0100 hwmon: (dell-smm) Add support for WMI SMM interface Some Dell machines like the Dell Optiplex 7000 do not support the legacy SMM interface, but instead expect all SMM calls to be issued over a special WMI interface. Add support for this interface so users can control the fans on those machines. Tested-by: Reviewed-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231123004820.50635-8-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 20bdeebc882698f4be862f98d41119c129031039 Author: Armin Wolf Date: Thu Nov 23 01:48:17 2023 +0100 hwmon: (dell-smm) Introduce helper function for data init In the future, multiple SMM calling backends will exist, with each backend being required to initialize its data. Introduce a helper function for this so the code necessary to initialize dell_smm_data is not duplicated between different backends. Tested-by: Reviewed-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231123004820.50635-7-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 5aad36f43be580b0814b878f96477e5b58f902ce Author: Armin Wolf Date: Thu Nov 23 01:48:16 2023 +0100 hwmon: (dell-smm) Move config entries out of i8k_dmi_table Currently, i8k_dmi_table contains both entries used for DMI matching and entries used to override config options. This does not allow for differentiating between "its safe to issue raw SMM calls on this machine" and "its not safe to issue raw SMM calls on this machine, but here are some config values". Since future SMM backends will need to differentiate between those two cases, move those config entries into a separate table. i8k_dmi_table now serves as a general "its safe to issue raw SMM calls" table. Tested-by: Reviewed-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231123004820.50635-6-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 2615f1ee7f67a7be0c565abc4b54eb226ad0d79f Author: Armin Wolf Date: Thu Nov 23 01:48:15 2023 +0100 hwmon: (dell-smm) Move DMI config handling to module init Future SMM calling backends will not be able to probe during module init, meaning the DMI tables holding config data would have to drop their __initconst attribute. Prevent this by moving the config handling to module init. Tested-by: Reviewed-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231123004820.50635-5-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 9848fcf431906ead348bc5f8ccaad8b20ee97d93 Author: Armin Wolf Date: Thu Nov 23 01:48:14 2023 +0100 hwmon: (dell-smm) Move whitelist handling to module init Future SMM calling backends will not be able to probe during module init, meaning the DMI tables used for whitelisting features would have to drop their __initconst attribute. Prevent this by moving the whitelist handling to module init. Tested-by: Reviewed-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231123004820.50635-4-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 7fd2e1cac5eb5461793e7b0f8689b01720f2dc1b Author: Armin Wolf Date: Thu Nov 23 01:48:13 2023 +0100 hwmon: (dell-smm) Move blacklist handling to module init Future SMM calling backends will not be able to probe during module init, meaning the DMI tables used for backlisting broken features would have to drop their __initconst attribute. Prevent this by moving the blacklist handling to module init. Tested-by: Reviewed-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231123004820.50635-3-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 744f7be3937d0362064d8e679a370e5a0296e82c Author: Armin Wolf Date: Thu Nov 23 01:48:12 2023 +0100 hwmon: (dell-smm) Prepare for multiple SMM calling backends Modern Dell machines support multiple ways to issue an SMM call. Prepare support for those by introducing dell_smm_ops, which is used by dell_smm_call() to perform a SMM call. Each SMM backend needs to provide a dell_smm_ops structure. Tested-by: Reviewed-by: Hans de Goede Reviewed-by: Pali Rohár Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231123004820.50635-2-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit c9ba592580947b81f33f514320aeef02ddc001fd Author: James Seo Date: Wed Nov 22 21:49:19 2023 -0800 hwmon: (hp-wmi-sensors) Fix failure to load on EliteDesk 800 G6 The EliteDesk 800 G6 stores a raw WMI string within the ACPI object in its BIOS corresponding to one instance of HPBIOS_PlatformEvents.Name. This is evidently a valid way of representing a WMI data item as far as the Microsoft ACPI-WMI mapper is concerned, but is preventing the driver from loading. This seems quite rare, but add support for such strings. Treating this as a quirk pretty much means adding that support anyway. Also clean up an oversight in update_numeric_sensor_from_wobj() in which the result of hp_wmi_strdup() was being used without error checking. Reported-by: Lukasz Stelmach Closes: https://lore.kernel.org/linux-hwmon/7850a0bd-60e7-88f8-1d6c-0bb0e3234fdc@roeck-us.net/ Tested-by: Lukasz Stelmach Signed-off-by: James Seo Link: https://lore.kernel.org/r/20231123054918.157098-1-james@equiv.tech Signed-off-by: Guenter Roeck commit f07f9d2467f4a298d24e186ddee6f69724903067 Author: Andy Shevchenko Date: Tue Nov 28 20:06:04 2023 +0200 hwmon: (tmp513) Use SI constants from units.h MILLI and MICRO may be used in the driver to make code more robust against possible miscalculations. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231128180654.395692-4-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck commit df989762bc4b71068e6adc0c2b5ef6f76b6acf74 Author: Andy Shevchenko Date: Tue Nov 28 20:06:03 2023 +0200 hwmon: (tmp513) Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and also it prints the error value. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231128180654.395692-3-andriy.shevchenko@linux.intel.com [groeck: Fixed excessive line length] Signed-off-by: Guenter Roeck commit 5d9ad4e0fa7cc27199fdb94beb6ec5f655ba9489 Author: Andy Shevchenko Date: Tue Nov 28 20:06:02 2023 +0200 hwmon: (tmp513) Don't use "proxy" headers The driver uses math.h and not util_macros.h. All the same for the kernel.h, replace it with what the driver is using. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231128180654.395692-2-andriy.shevchenko@linux.intel.com Signed-off-by: Guenter Roeck commit 24921dbd2969869e5a34cc6d44a8526342a74e40 Author: Patrick Rudolph Date: Thu Nov 30 10:04:21 2023 +0100 hwmon: (peci/dimmtemp) Bump timeout The PECI CPU sensors are available as soon as the CPU is powered, however the PECI DIMM sensors are available after DRAM has been trained and thresholds have been written by host firmware. The default timeout of 30 seconds isn't enough for modern multisocket platforms utilizing DDR5 memory to bring up the memory and enable PECI sensor data. Bump the default timeout to 10 minutes in case the system starts without cached DDR5 training data. Signed-off-by: Patrick Rudolph Link: https://lore.kernel.org/r/20231130090422.2535542-1-patrick.rudolph@9elements.com [groeck: List affected driver in patch subject] Signed-off-by: Guenter Roeck commit 4265eb062a7303e537ab3792ade31f424c3c5189 Author: Kees Cook Date: Thu Nov 30 12:02:07 2023 -0800 hwmon: (pc87360) Bounds check data->innr usage Without visibility into the initializers for data->innr, GCC suspects using it as an index could walk off the end of the various 14-element arrays in data. Perform an explicit clamp to the array size. Silences the following warning with GCC 12+: ../drivers/hwmon/pc87360.c: In function 'pc87360_update_device': ../drivers/hwmon/pc87360.c:341:49: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 341 | data->in_max[i] = pc87360_read_value(data, | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ 342 | LD_IN, i, | ~~~~~~~~~ 343 | PC87365_REG_IN_MAX); | ~~~~~~~~~~~~~~~~~~~ ../drivers/hwmon/pc87360.c:209:12: note: at offset 255 into destination object 'in_max' of size 14 209 | u8 in_max[14]; /* Register value */ | ^~~~~~ Cc: Jim Cromie Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20231130200207.work.679-kees@kernel.org [groeck: Added comment into code clarifying context] Signed-off-by: Guenter Roeck commit 8b3800256abad20e91c2698607f9b28591407b19 Author: Xing Tong Wu Date: Tue Nov 21 16:16:04 2023 +0800 hwmon: (nct6775) Fix fan speed set failure in automatic mode Setting the fan speed is only valid in manual mode; it is not possible to set the fan's speed in automatic mode. Return error when attempting to set the fan speed in automatic mode. Signed-off-by: Xing Tong Wu Link: https://lore.kernel.org/r/20231121081604.2499-3-xingtong_wu@163.com Signed-off-by: Guenter Roeck commit ff629afe7ffdfdfee15c75e9a22c67d316338cc5 Author: Xing Tong Wu Date: Tue Nov 21 16:16:03 2023 +0800 hwmon: (nct6775) Add support for 2 additional fan controls The nct6116 has 2 additional PWM pins compared to the nct6106. Extend the nct6106 PWM arrays to support the nct6116. Signed-off-by: Xing Tong Wu Link: https://lore.kernel.org/r/20231121081604.2499-2-xingtong_wu@163.com Signed-off-by: Guenter Roeck commit 16693c27253b9be8388df307649d48c9a899a5af Author: Javier Carrasco Date: Fri Nov 17 07:40:37 2023 +0100 ABI: sysfs-class-hwmon: document emergency/max/min temperature alarms These attributes are widely used in the hwmon subsystem, but they still must be documented. Add tempY_emergency_alarm, tempY_max_alarm and tempY_min_alarm to the ABI documentation according to their current usage and access rights in the hwmon subsystem. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20231116-hwmon_abi-v1-4-8bfb7f51145a@gmail.com Signed-off-by: Guenter Roeck commit 2de83b67cf8ca122c94132088c8985f1b81b8a97 Author: Javier Carrasco Date: Fri Nov 17 07:40:36 2023 +0100 ABI: sysfs-class-hwmon: fix tempY_crit_alarm access rights This attribute is defined as read-only by all drivers that support it. It seems that the access rights and description for this attribute were copied from the intrusionY_alarm, which has indeed RW rights and must be cleared by the user. These are the modules that currently use this attribute: - adt7x10 - i5500_temp - jc42 - lm83 - lm90 - lm95245 - max31760 - max6621 - mc34vr500 - tmp401 - tmp464 - tmp513 Fix the attribute description and make it read-only. Fixes: 365b5d63a505 ("ABI: sysfs-class-hwmon: add a description for tempY_crit_alarm") Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20231116-hwmon_abi-v1-3-8bfb7f51145a@gmail.com Signed-off-by: Guenter Roeck commit d0d710554ef0454a97dde2c114f7d5b2a3c2b4de Author: Javier Carrasco Date: Fri Nov 17 07:40:35 2023 +0100 ABI: sysfs-class-hwmon: document missing humidity attributes All these attributes already exist and are used by the hwmon subsystem, but they still must be documented. The missing attributes are the following: - humidityY_alarm - humidityY_fault - humidityY_label - humidityY_max - humidityY_max_hyst - humidityY_min - humidityY_min_hyst Add the missing humidity attributes to the ABI documentation according to their current usage and access rights in the hwmon subsystem. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20231116-hwmon_abi-v1-2-8bfb7f51145a@gmail.com Signed-off-by: Guenter Roeck commit 02d0fdd4842500c27c0c5e2759de29bc79f1924d Author: Javier Carrasco Date: Fri Nov 17 07:40:34 2023 +0100 ABI: sysfs-class-hwmon: rearrange humidity attributes alphabetically Preliminary step to add the missing humidity attributes in the ABI documentation. Adding new elements alphabetically is a common practice that has been loosely followed in the sysfs-class-hwmon documentation. Since most of the humidity attributes must be added to the file, a single attribute needs to be rearranged to reinforce alphabetical order. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20231116-hwmon_abi-v1-1-8bfb7f51145a@gmail.com Signed-off-by: Guenter Roeck commit ce0742404ad7b616811294844dbddac0fb6dcd32 Author: Peter Yin Date: Mon Nov 13 23:50:08 2023 +0800 hwmon: (pmbus) Add support for MPS Multi-phase mp5990 Add support for mp5990 device from Monolithic Power Systems, Inc. (MPS) vendor. This is a Hot-Swap Controller. Signed-off-by: Peter Yin Link: https://lore.kernel.org/r/20231113155008.2147090-3-peteryin.openbmc@gmail.com [groeck: Improved and clarified comments] Signed-off-by: Guenter Roeck commit 599617301e54e82c0abdeb55495c4f27924ef716 Author: Peter Yin Date: Mon Nov 13 23:50:07 2023 +0800 dt-bindings: hwmon: Add mps mp5990 driver bindings Add a device tree bindings for mp5990 device. Signed-off-by: Peter Yin Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231113155008.2147090-2-peteryin.openbmc@gmail.com Signed-off-by: Guenter Roeck commit ac0c26bae662138eac9b49215e505b402f7e80e3 Author: Rob Herring Date: Wed Nov 15 14:57:02 2023 -0600 hwmon: (lm25066) Use i2c_get_match_data() Use preferred i2c_get_match_data() instead of of_match_device() and i2c_match_id() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Adjust the 'chips' enum to not use 0, so that no match data can be distinguished from a valid enum value. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231115205703.3730448-3-robh@kernel.org [groeck: Use double cast for enum chips assignment to make compiler happy] Signed-off-by: Guenter Roeck commit 2792fc8f8c834e035b09be42d445085bd8bcac7e Author: Guenter Roeck Date: Thu Nov 16 15:57:45 2023 -0800 hwmon: (nct6775-core) Explicitly initialize nct6775_device_names indexes Changing the "kinds" enum start value to be 1-indexed instead of 0-indexed caused look-ups in nct6775_device_names[] to be misaligned or off the end. Initialize the string list with explicit indexes. Cc: Rob Herring Cc: Kees Cook Fixes: 10a0575ea09d ("hwmon: nct6775-i2c: Use i2c_get_match_data()") Reviewed-by: Rob Herring Signed-off-by: Guenter Roeck commit efe86092ab316db8d3c6e98f57b193511a09a073 Author: Kees Cook Date: Thu Nov 16 06:01:47 2023 -0800 hwmon: (nct6775-platform) Explicitly initialize nct6775_sio_names indexes Changing the "kinds" enum start value to be 1-indexed instead of 0-indexed caused look-ups in nct6775_sio_namesp[] to be misaligned or off the end. Coverity reported: *** CID 1571052: Memory - illegal accesses (OVERRUN) drivers/hwmon/nct6775-platform.c:1075 in nct6775_find() 1069 sio_data->kind == nct6793 || sio_data->kind == nct6795 || 1070 sio_data->kind == nct6796 || sio_data->kind == nct6797 || 1071 sio_data->kind == nct6798 || sio_data->kind == nct6799) 1072 nct6791_enable_io_mapping(sio_data); 1073 1074 sio_data->sio_exit(sio_data); vvv CID 1571052: Memory - illegal accesses (OVERRUN) vvv Overrunning array "nct6775_sio_names" of 13 8-byte elements at element index 13 (byte offset 111) using index "sio_data->kind" (which evaluates to 13). 1075 pr_info("Found %s or compatible chip at %#x:%#x\n", 1076 nct6775_sio_names[sio_data->kind], sioaddr, addr); 1077 1078 return addr; 1079 } 1080 Initialize the string list with explicit indexes. Cc: Guenter Roeck Cc: Rob Herring Cc: Jean Delvare Cc: linux-hwmon@vger.kernel.org Fixes: 10a0575ea09d ("hwmon: nct6775-i2c: Use i2c_get_match_data()") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20231116140144.work.027-kees@kernel.org Signed-off-by: Guenter Roeck commit 10a0575ea09dbc333ee952b707ea216020d8f77c Author: Rob Herring Date: Wed Nov 15 14:57:01 2023 -0600 hwmon: (nct6775-i2c) Use i2c_get_match_data() Use preferred i2c_get_match_data() instead of of_match_device() and i2c_match_id() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Adjust the 'kinds' enum to not use 0, so that no match data can be distinguished from a valid enum value. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231115205703.3730448-2-robh@kernel.org [groeck: Use double cast for i2c_get_match_data() to make clang happy] Signed-off-by: Guenter Roeck commit 5cfc392cc93b42d5b0bdea12eecb649887b9991d Author: Rob Herring Date: Wed Nov 15 14:57:00 2023 -0600 hwmon: (max6650) Use i2c_get_match_data() Use preferred i2c_get_match_data() instead of of_match_device() and i2c_match_id() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231115205703.3730448-1-robh@kernel.org Signed-off-by: Guenter Roeck commit b0d51ada88a326e2bb58323b64879a596cd339f3 Author: Gustavo A. R. Silva Date: Tue Nov 14 13:53:08 2023 -0600 hwmon: (aspeed-pwm-tacho) Fix -Wstringop-overflow warning in aspeed_create_fan_tach_channel() Based on the documentation below, the maximum number of Fan tach channels is 16: Documentation/devicetree/bindings/hwmon/aspeed-pwm-tacho.txt:45: 45 - aspeed,fan-tach-ch : should specify the Fan tach input channel. 46 integer value in the range 0 through 15, with 0 indicating 47 Fan tach channel 0 and 15 indicating Fan tach channel 15. 48 At least one Fan tach input channel is required. However, the compiler doesn't know that, and legitimaly warns about a potential overwrite in array `u8 fan_tach_ch_source[16]` in `struct aspeed_pwm_tacho_data`, in case `index` takes a value outside the boundaries of the array: drivers/hwmon/aspeed-pwm-tacho.c: 179 struct aspeed_pwm_tacho_data { ... 184 bool fan_tach_present[16]; ... 193 u8 fan_tach_ch_source[16]; 196 }; In function ‘aspeed_create_fan_tach_channel’, inlined from ‘aspeed_create_fan’ at drivers/hwmon/aspeed-pwm-tacho.c:877:2, inlined from ‘aspeed_pwm_tacho_probe’ at drivers/hwmon/aspeed-pwm-tacho.c:936:9: drivers/hwmon/aspeed-pwm-tacho.c:751:49: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 751 | priv->fan_tach_ch_source[index] = pwm_source; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ drivers/hwmon/aspeed-pwm-tacho.c: In function ‘aspeed_pwm_tacho_probe’: drivers/hwmon/aspeed-pwm-tacho.c:193:12: note: at offset [48, 255] into destination object ‘fan_tach_ch_source’ of size 16 193 | u8 fan_tach_ch_source[16]; | ^~~~~~~~~~~~~~~~~~ Fix this by sanity checking `index` before using it to index arrays of size 16 elements in `struct aspeed_pwm_tacho_data`. Also, pass `dev` as argument to function `aspeed_create_fan_tach_channel()`, and add an error message in case `index` is out-of-bounds, in which case return `-EINVAL`. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/ZVPQJIP26dIzRAr6@work [groeck: Fixed continuation line alignment] Signed-off-by: Guenter Roeck commit 10bd80e0b3160008d65c9240ca9660c596e2f269 Author: Yang Li Date: Fri Nov 10 13:53:41 2023 +0800 hwmon: Fix some kernel-doc comments Fix some kernel-doc comments to silence the warnings: drivers/hwmon/sht4x.c:65: warning: Function parameter or member 'valid' not described in 'sht4x_data' drivers/hwmon/sht4x.c:73: warning: Function parameter or member 'data' not described in 'sht4x_read_values' drivers/hwmon/sht4x.c:73: warning: Excess function parameter 'sht4x_data' description in 'sht4x_read_values' Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7220 Signed-off-by: Yang Li Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20231110055341.39939-1-yang.lee@linux.alibaba.com Signed-off-by: Guenter Roeck commit 9350163aff24530f2aa3357ee1c7bd8771a443e4 Author: Delphine CC Chiu Date: Thu Nov 2 17:08:07 2023 +0800 hwmon: (emc1403) Add support for EMC1442 Add support for EMC1442 which is compatible with EMC1402. Signed-off-by: Delphine CC Chiu Reviewed-by: Patrick Williams Link: https://lore.kernel.org/r/20231102090808.427351-1-Delphine_CC_Chiu@wiwynn.com [groeck: compatible with EMC1402, not EMC1403] Signed-off-by: Guenter Roeck commit 34c76a51205a32f2665cc2ef1247b4408187d4f0 Author: Antoniu Miclaus Date: Tue Oct 31 11:56:46 2023 +0200 hwmon: (ltc2991) remove device reference from state Remove device reference from struct ltc2991_state since it is used only inside the init function. Pass the struct device as parameter to the init function instead. Signed-off-by: Antoniu Miclaus Link: https://lore.kernel.org/r/20231031095647.48376-1-antoniu.miclaus@analog.com Signed-off-by: Guenter Roeck commit 89fec128d5d10d3e09553975d19d8b1f29b429d4 Author: Tomer Maimon Date: Tue Oct 31 09:58:06 2023 +0200 hwmon: (npcm750-pwm-fan) Add NPCM8xx support Adding Pulse Width Modulation (PWM) and fan tacho NPCM8xx support to NPCM PWM and fan tacho driver. NPCM8xx uses a different number of PWM devices. As part of adding NPCM8XX support: - Add NPCM8xx specific compatible string. - Add data to handle architecture-specific PWM parameters. Signed-off-by: Tomer Maimon Link: https://lore.kernel.org/r/20231031075806.400872-2-tmaimon77@gmail.com Signed-off-by: Guenter Roeck commit b19773a1c6c02f5efc35e9f506aeddd2c7d2ac29 Author: Etienne Carriere Date: Mon Oct 30 09:55:15 2023 +0100 optee: add missing description of RPC argument reference Adds missing inline description comment for RPC optional arguments reference. Reported-by: kernel test robot Closes: https://lore.kernel.org/lkml/202310192021.fvb6JDOY-lkp@intel.com/ Signed-off-by: Etienne Carriere Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 7fe228e1866f3a270a1f963c9f2ae3ba1eae7411 Author: Heiko Carstens Date: Thu Dec 7 15:24:34 2023 +0100 s390: update defconfigs Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit a6d27ea01a702b51b9dc102aebcae39151bea8e3 Author: Claudio Imbrenda Date: Tue Dec 5 18:32:52 2023 +0100 s390/mm: convert pgste locking functions to C Convert pgste_get_lock() and pgste_set_unlock() to C. There is no real reasons to keep them in assembler. Having them in C makes them more readable and maintainable, and better instructions are used automatically when available. Signed-off-by: Claudio Imbrenda Acked-by: Alexander Gordeev Reviewed-by: Heiko Carstens Link: https://lore.kernel.org/r/20231205173252.62305-1-imbrenda@linux.ibm.com Signed-off-by: Alexander Gordeev commit 18564756ab328dfdc84d09b8150f5e4d2bb96753 Author: Heiko Carstens Date: Fri Dec 1 15:42:19 2023 +0100 s390/fpu: get rid of MACHINE_HAS_VX Get rid of MACHINE_HAS_VX and replace it with cpu_has_vx() which is a short readable wrapper for "test_facility(129)". Facility bit 129 is set if the vector facility is present. test_facility() returns also true for all bits which are set in the architecture level set of the cpu that the kernel is compiled for. This means that test_facility(129) is a compile time constant which returns true for z13 and later, since the vector facility bit is part of the z13 kernel ALS. In result the compiled code will have less runtime checks, and less code. Reviewed-by: Hendrik Brueckner Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 68422c0069990e5fe2a7dc2c6c995a48c0bdec26 Author: Heiko Carstens Date: Fri Dec 1 15:42:18 2023 +0100 s390/als: add vector facility to z13 architecture level set Add the vector facility to the z13 architecture level set (ALS). All hypervisors support the vector facility since many years. Adding the facility to the ALS allows for compile time optimizations of the kernel: if the kernel is compiled for z13 or later, all tests which verify if the vector facility is present can return "true". This will be implemented with a subsequent patch. Reviewed-by: Hendrik Brueckner Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit af6ed37eb0bebc5661f653ed3704d606c2e8ec94 Author: Heiko Carstens Date: Fri Dec 1 15:42:17 2023 +0100 s390/fpu: remove "novx" option Remove the "novx" kernel command line option: the vector code runs without any problems since many years. Reviewed-by: Hendrik Brueckner Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit d7f679ec868e8675c269c742a2ba58c6aceaf52b Author: Heiko Carstens Date: Fri Dec 1 15:42:16 2023 +0100 s390/fpu: remove ARCH_WANTS_DYNAMIC_TASK_STRUCT support s390 selects ARCH_WANTS_DYNAMIC_TASK_STRUCT in order to make the size of the task structure dependent on the availability of the vector facility. This doesn't make sense anymore because since many years all machines provide the vector facility. Therefore simplify the code a bit and remove s390 support for ARCH_WANTS_DYNAMIC_TASK_STRUCT. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit d7271ba40155d5e5c28e13516df5d9c69f40ef20 Author: Heiko Carstens Date: Mon Dec 4 15:46:41 2023 +0100 KVM: s390: remove superfluous save_fpu_regs() call The save_fpu_regs() call in kvm_arch_vcpu_ioctl_get_fpu() is pointless: it will save the current user space fpu context to the thread's save area. But the code is accessing only the vcpu's save are / mapped register area, which in this case are not the same. Therefore remove the confusing call. Reviewed-by: Claudio Imbrenda Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 702644249d3e03333f16273a3a3ebedecfb7f2c6 Author: Heiko Carstens Date: Thu Nov 30 18:56:02 2023 +0100 s390/fpu: get rid of test_fp_ctl() It is quite subtle to use test_fp_ctl() correctly. Therefore remove it - instead copy whatever new floating point control (fpc) register values are supposed to be used into its save area. Test the validity of the new value when loading it. If the new value is invalid, load the fpc register with zero. This seems to be a the best way to approach this problem. Even though this changes behavior: - sigreturn with an invalid fpc value on the stack will succeed, and continue with zero value, instead of returning with SIGSEGV - ptraced processes will also use a zero value instead of letting the request fail with -EINVAL However all of this seems to acceptable. After all testing of the value was only implemented to avoid that user space can crash the kernel. It is not there to test values for validity; and the assumption is that there is no existing user space which is doing this. Reviewed-by: Claudio Imbrenda Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 3b2e00f167f493ca1de7451310f1ce56f0b27fcb Author: Heiko Carstens Date: Thu Nov 30 18:56:01 2023 +0100 KVM: s390: use READ_ONCE() to read fpc register value Use READ_ONCE() to read a vcpu's floating point register value from the memory mapped area. This avoids that, depending on code generation, a different value is tested for validity than the one that is used, since user space can modify the area concurrently and the compiler is free to generate code that reads the value multiple times. Reviewed-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit b988b1bb0053c0dcd26187d29ef07566a565cf55 Author: Heiko Carstens Date: Thu Nov 30 18:56:00 2023 +0100 KVM: s390: fix setting of fpc register kvm_arch_vcpu_ioctl_set_fpu() allows to set the floating point control (fpc) register of a guest cpu. The new value is tested for validity by temporarily loading it into the fpc register. This may lead to corruption of the fpc register of the host process: if an interrupt happens while the value is temporarily loaded into the fpc register, and within interrupt context floating point or vector registers are used, the current fp/vx registers are saved with save_fpu_regs() assuming they belong to user space and will be loaded into fp/vx registers when returning to user space. test_fp_ctl() restores the original user space / host process fpc register value, however it will be discarded, when returning to user space. In result the host process will incorrectly continue to run with the value that was supposed to be used for a guest cpu. Fix this by simply removing the test. There is another test right before the SIE context is entered which will handles invalid values. This results in a change of behaviour: invalid values will now be accepted instead of that the ioctl fails with -EINVAL. This seems to be acceptable, given that this interface is most likely not used anymore, and this is in addition the same behaviour implemented with the memory mapped interface (replace invalid values with zero) - see sync_regs() in kvm-s390.c. Reviewed-by: Christian Borntraeger Reviewed-by: Claudio Imbrenda Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 8b13601d19c541158a6e18b278c00ba69ae37829 Author: Heiko Carstens Date: Thu Nov 30 18:55:59 2023 +0100 s390/ptrace: handle setting of fpc register correctly If the content of the floating point control (fpc) register of a traced process is modified with the ptrace interface the new value is tested for validity by temporarily loading it into the fpc register. This may lead to corruption of the fpc register of the tracing process: if an interrupt happens while the value is temporarily loaded into the fpc register, and within interrupt context floating point or vector registers are used, the current fp/vx registers are saved with save_fpu_regs() assuming they belong to user space and will be loaded into fp/vx registers when returning to user space. test_fp_ctl() restores the original user space fpc register value, however it will be discarded, when returning to user space. In result the tracer will incorrectly continue to run with the value that was supposed to be used for the traced process. Fix this by saving fpu register contents with save_fpu_regs() before using test_fp_ctl(). Reviewed-by: Claudio Imbrenda Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 1c8b8cf28f18ef57d189a170eaf6e0d3d3794ec5 Author: Heiko Carstens Date: Fri Dec 1 14:09:31 2023 +0100 s390/nmi: implement and use local_mcck_save() / local_mcck_restore() Instead of using local_mcck_disable() / local_mcck_enable() implement and use local_mcck_save() / local_mcck_restore() to disable machine checks, and restoring the previous state. The problem with using local_mcck_disable() / local_mcck_enable() is that there is an assumption that machine checks are always enabled. While this is currently the case the code still looks quite odd, readers need to double check if the code is correct. In order to increase readability save and then restore the old machine check mask bit, instead of assuming that it must have been enabled. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 84e599e3adc78800f8517f22f65b7a181cbb824b Author: Heiko Carstens Date: Fri Dec 1 14:09:30 2023 +0100 s390/nmi: consistently enable machine checks in trap_init() The kernel starts with machine checks disabled (machine check mask bit in the PSW is zero), and machine checks are enabled when trap_init() is called. The rationale is that this allows to assume that the system is initialized up to a certain point before the machine check handler may be invoked. However the implementation is incomplete: all new PSW masks in lowcore have the machine check mask bit. This means that e.g. for any early program check machine checks are enabled within the program check handler. This contradicts the whole point of enabling machine checks at a single place. Change this and initialize all new PSWs in lowcore so they have the machine check mask bit not set. Set the bit in all masks in trap_init(). This way machine check enabling is consistent. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit f88d36845391f8df8faa9d28818bfbdd67af0d91 Author: Heiko Carstens Date: Fri Dec 1 14:09:29 2023 +0100 s390/ctlreg: return old register contents when changing bits Change local_ctl_set_bit() and local_ctl_clear_bit() so they return the previous value of the to be changed control register. This is useful if a bit is only changed temporarily and the previous content needs to be restored. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit 86d1921c9d5a25ff057284f1208e731145e24508 Author: Zenghui Yu Date: Wed Dec 6 00:01:40 2023 +0800 arm64: Delete the zero_za macro zero_za was introduced in commit ca8a4ebcff44 ("arm64/sme: Manually encode SME instructions") but doesn't appear to have any in kernel user. Drop it. Signed-off-by: Zenghui Yu Acked-by: Mark Brown Link: https://lore.kernel.org/r/20231205160140.1438-1-yuzenghui@huawei.com Signed-off-by: Will Deacon commit 4ac9ed81aaaab128b98855cd6005a52fa65dd4da Author: Yang Yingliang Date: Tue Nov 28 17:30:31 2023 +0800 spi: ljca: switch to use devm_spi_alloc_host() Switch to use modern name function devm_spi_alloc_host(). No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-27-yangyingliang@huawei.com Signed-off-by: Mark Brown commit a23271718e767e8b701693b140fcc021a4e90b1b Author: Yang Yingliang Date: Tue Nov 28 17:30:30 2023 +0800 spi: cs42l43: switch to use devm_spi_alloc_host() Switch to use modern name function devm_spi_alloc_host(). No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-26-yangyingliang@huawei.com Signed-off-by: Mark Brown commit ca6f114372ae4d05387f0ccb5d4b2b1320bf22b3 Author: Yang Yingliang Date: Tue Nov 28 17:30:29 2023 +0800 spi: zynqmp-gqspi: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-25-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 178ebb0c505b0a35edb4fb2a0e23a1f29e1db14d Author: Yang Yingliang Date: Tue Nov 28 17:30:28 2023 +0800 spi: zynq-qspi: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-24-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 061851a0cc5dae1a992edd4d573a7dc514bb7fbe Author: Yang Yingliang Date: Tue Nov 28 17:30:27 2023 +0800 spi: xtensa-xtfpga: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-23-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 1633ffd290c77eb6e2c5500a25faf9fc2640b0d1 Author: Yang Yingliang Date: Tue Nov 28 17:30:26 2023 +0800 spi: xlp: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-22-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 709b785a377c06535a98663a227fa82f61b08aec Author: Yang Yingliang Date: Tue Nov 28 17:30:25 2023 +0800 spi: xilinx: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-21-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 4e4856e721041fb6e7386369433a4850b34dde1e Author: Yang Yingliang Date: Tue Nov 28 17:30:24 2023 +0800 spi: xcomm: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-20-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 4c2ee0991013ca8a32bb093a017d460204790112 Author: Yang Yingliang Date: Tue Nov 28 17:30:23 2023 +0800 spi: uniphier: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-19-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 40daed14705ee76b35717ffedc80a7f281023bca Author: Yang Yingliang Date: Tue Nov 28 17:30:22 2023 +0800 spi: topcliff-pch: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-18-yangyingliang@huawei.com Signed-off-by: Mark Brown commit d1d8b09d0a0a86fb785dbb0d69765fb98dde429c Author: Yang Yingliang Date: Tue Nov 28 17:30:21 2023 +0800 spi: wpcm-fiu: switch to use devm_spi_alloc_host() Switch to use modern name function devm_spi_alloc_host(). No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-17-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 9d93c8d97b4cdb5edddb4c5530881c90eecb7e44 Author: Yang Yingliang Date: Tue Nov 28 17:30:20 2023 +0800 spi: spi-ti-qspi: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-16-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 767e45324bf8fbbaa5463a692ad697226425d28b Author: Yang Yingliang Date: Tue Nov 28 17:30:19 2023 +0800 spi: tegra210-quad: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-15-yangyingliang@huawei.com Signed-off-by: Mark Brown commit db34aad4d61b0034c896a7abb481b32fcdcd8332 Author: Yang Yingliang Date: Tue Nov 28 17:30:18 2023 +0800 spi: tegra20-slink: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-14-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 5ee8cd26d8ebd889c270a6851824b7aeec38f3a8 Author: Yang Yingliang Date: Tue Nov 28 17:30:17 2023 +0800 spi: tegra20-sflash: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-13-yangyingliang@huawei.com Signed-off-by: Mark Brown commit fe2e1c2225986b49988189ecd42dc233c10f237f Author: Yang Yingliang Date: Tue Nov 28 17:30:16 2023 +0800 spi: tegra114: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-12-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 8726bdcef62eac46c80830e6154c442fbca6d928 Author: Yang Yingliang Date: Tue Nov 28 17:30:15 2023 +0800 spi: geni-qcom: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-11-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 3524d1b727a66712f02f92807219a3650e5cf910 Author: Yang Yingliang Date: Tue Nov 28 17:30:14 2023 +0800 spi: synquacer: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-10-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 90bbb007a06aa7b0f428a89531dec064ec584d8a Author: Yang Yingliang Date: Tue Nov 28 17:30:13 2023 +0800 spi: sunplus-sp7021: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-9-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 9f55bb79893a9dc75982372bee1307bdce48976b Author: Yang Yingliang Date: Tue Nov 28 17:30:12 2023 +0800 spi: sun6i: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-8-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 6d232cc8a7e59af0c083319827541966a68817a0 Author: Yang Yingliang Date: Tue Nov 28 17:30:11 2023 +0800 spi: sun4i: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-7-yangyingliang@huawei.com Signed-off-by: Mark Brown commit a5c1fa1318ee72b9809f105207570ef55c7992d9 Author: Yang Yingliang Date: Tue Nov 28 17:30:10 2023 +0800 spi: stm32: switch to use modern name Change legacy name master/slave to modern name host/target. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-6-yangyingliang@huawei.com Signed-off-by: Mark Brown commit d9ea4bcf244d936d74a5993ae1f778f8cb9a479b Author: Yang Yingliang Date: Tue Nov 28 17:30:09 2023 +0800 spi: stm32-qspi: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-5-yangyingliang@huawei.com Signed-off-by: Mark Brown commit e6b7e64cb11966b26646a362677ca5a08481157e Author: Yang Yingliang Date: Tue Nov 28 17:30:08 2023 +0800 spi: st-ssc4: switch to use modern name Change legacy name master/slave to modern name host/target or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-4-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 8c53784757b7fb2bf75e36ae5356628a8baeffd9 Author: Yang Yingliang Date: Tue Nov 28 17:30:07 2023 +0800 spi: sprd: switch to use modern name Change legacy name master to modern name host or controller. No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-3-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 0a3d087d09a8f52c02d0014bad63be99c53c4812 Author: Yang Yingliang Date: Tue Nov 28 17:30:06 2023 +0800 spi: sprd-adi: switch to use spi_alloc_host() Switch to use modern name function spi_alloc_host(). No functional changed. Signed-off-by: Yang Yingliang Link: https://msgid.link/r/20231128093031.3707034-2-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 3c49d848d2d3c6fe46522e4d750fc3a18e699997 Author: Nam Cao Date: Mon Dec 11 13:49:15 2023 +0100 spi: pl022: delete unused next_msg_cs_active in struct pl022 The member next_msg_cs_active of struct pl022 is not used anywhere. Delete it. Signed-off-by: Nam Cao Link: https://msgid.link/r/424fec01a75f6a881edcce189ac68b3408b62f29.1702298527.git.namcao@linutronix.de Signed-off-by: Mark Brown commit 4c6dd33de9d3148909bc403d394f527bec4aec27 Author: Nam Cao Date: Mon Dec 11 13:49:14 2023 +0100 spi: pl022: delete unused cur_gpiod in struct pl022 The member cur_gpiod of struct pl022 is not used anywhere. Delete it. Signed-off-by: Nam Cao Link: https://msgid.link/r/7618c9d714aa1c16c7cb06f9d1fb1c074d1d9c65.1702298527.git.namcao@linutronix.de Signed-off-by: Mark Brown commit 8d6fab52f3fdaeb8aabfd046d95e5d3f9464399e Author: Uwe Kleine-König Date: Tue Dec 5 13:26:23 2023 +0100 regulator: wm8350: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://msgid.link/r/1f7bbc545829a1cc3df40be0424fe46d7449fb72.1701778038.git.u.kleine-koenig@pengutronix.de Acked-by: Charles Keepax Signed-off-by: Mark Brown commit d637a75ede3db84f7ae4bc2ab398fe2232f22c26 Author: Uwe Kleine-König Date: Tue Dec 5 13:26:22 2023 +0100 regulator: virtual: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://msgid.link/r/d9954f02ae51b1b0b0077c710d16bfaeafa216ec.1701778038.git.u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 3b2e8e98692b20436d0346fc6adffff1b596d50f Author: Uwe Kleine-König Date: Tue Dec 5 13:26:21 2023 +0100 regulator: userspace-consumer: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://msgid.link/r/89c5f261707bf178e1508cf5dd55121f0da2dc3f.1701778038.git.u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 964575179663db70832e374edfacc91539e783d3 Author: Uwe Kleine-König Date: Tue Dec 5 13:26:20 2023 +0100 regulator: uniphier: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://msgid.link/r/ced2a73a1aeca3f33d4b194e4dbe2672ad84a50a.1701778038.git.u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 6f382a0c7ec12f85f4e40d5343ba53f16f543ccb Author: Uwe Kleine-König Date: Tue Dec 5 13:26:19 2023 +0100 regulator: stm32-vrefbuf: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://msgid.link/r/2e96cf99c8d97b728d891a745e8f94ee39fbfee8.1701778038.git.u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 0210a60aad02149d8503d259525bfbe0e99f8cb2 Author: Uwe Kleine-König Date: Tue Dec 5 13:26:18 2023 +0100 regulator: db8500-prcmu: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://msgid.link/r/fcaa42d7dd707031ed8dd9e8c28483891b879965.1701778038.git.u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit cddda6f5f47f7cb13191b7753bc3882940b6f325 Author: Uwe Kleine-König Date: Tue Dec 5 13:26:17 2023 +0100 regulator: bd9571mwv: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://msgid.link/r/639e796b36815a219ff1172cc758ba7378211d74.1701778038.git.u.kleine-koenig@pengutronix.de Reviewed-by: Geert Uytterhoeven Signed-off-by: Mark Brown commit 03560ff08d2839d7381f18576b329a2eee5cfb37 Author: Uwe Kleine-König Date: Tue Dec 5 13:26:16 2023 +0100 regulator: arizona-ldo1: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://msgid.link/r/76c7af01e2c8b3ab6585a04bc3f0d163fbb7fdf7.1701778038.git.u.kleine-koenig@pengutronix.de Acked-by: Charles Keepax Signed-off-by: Mark Brown commit 28b0b18d53469833bf513a87732c638775073ba4 Author: Neil Armstrong Date: Mon Dec 11 12:40:57 2023 +0100 ASoC: codec: wsa884x: make use of new mute_unmute_on_trigger flag This fix is based on commit [1] fixing click and pop sounds during SoundWire port start because PA is left unmuted. making use of new mute_unmute_on_trigger flag and removing unmute at PA setup, removes the Click/Pop issue at SoundWire enable. [1] 805ce81826c8 ("ASoC: codecs: wsa883x: make use of new mute_unmute_on_trigger flag") Cc: Srinivas Kandagatla Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231211-topic-sm8x50-upstream-wsa884x-fix-plop-v1-1-0dc630a19172@linaro.org Signed-off-by: Mark Brown commit ab8921e1da8fdca14192c44775151f50c1cdb763 Author: Krzysztof Kozlowski Date: Wed Nov 29 12:30:14 2023 +0100 ASoC: dt-bindings: qcom,lpass-wsa-macro: Add SM8650 LPASS WSA Add bindings for Qualcomm SM8650 Low Power Audio SubSystem (LPASS) WSA macro codec, which looks like compatible with earlier SM8550. Cc: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://msgid.link/r/20231129113014.38837-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit f243ef746d0ace20fe092fc1ee9987ecf003f7a4 Author: Krzysztof Kozlowski Date: Wed Nov 29 12:30:13 2023 +0100 ASoC: dt-bindings: qcom,lpass-va-macro: Add SM8650 LPASS VA Add bindings for Qualcomm SM8650 Low Power Audio SubSystem (LPASS) VA macro codec, which looks like compatible with earlier SM8550. Cc: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231129113014.38837-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 5a5085c9ce381f92399c755be6deaf1d76ad57e8 Author: Krzysztof Kozlowski Date: Wed Nov 29 12:30:12 2023 +0100 ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM8650 LPASS TX Add bindings for Qualcomm SM8650 Low Power Audio SubSystem (LPASS) TX macro codec, which looks like compatible with earlier SM8550. Cc: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://msgid.link/r/20231129113014.38837-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 0bfa20b18acbcdd133d41e04e07a2d78bcc04bc5 Author: Krzysztof Kozlowski Date: Wed Nov 29 12:30:11 2023 +0100 ASoC: dt-bindings: qcom,lpass-rx-macro: Add SM8650 LPASS RX Add bindings for Qualcomm SM8650 Low Power Audio SubSystem (LPASS) RX macro codec, which looks like compatible with earlier SM8550. Cc: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://msgid.link/r/20231129113014.38837-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 3c5fcb20e07e3681a645fc3a8d890478ca320825 Author: Krzysztof Kozlowski Date: Thu Nov 30 19:07:58 2023 +0100 ASoC: qcom: audioreach: Add 4 channel support Add support four channel streams. Map channel 3 and 4 to left/right surround ("quad(side)" from ffmpeg standard channel list) to match what is in qdsp6/q6dsp-common.c driver. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231130180758.212172-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit bcd684eae5aefc0688fcf43fd555155dd57f27c9 Author: Krzysztof Kozlowski Date: Thu Nov 30 19:07:57 2023 +0100 ASoC: qcom: audioreach: drop duplicate channel defines q6apm.h header already defines channel mapping values, so drop duplicated devices from audioreach.h. Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231130180758.212172-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit ef14f40a3613ddd43a8dd736b5df6f865dcbb817 Author: Krzysztof Kozlowski Date: Thu Nov 30 19:07:56 2023 +0100 ASoC: qcom: audioreach: Commonize setting channel mappings Move code assigning channel mapping values to a common helper function. This simplifies three out of four cases, with the last case using incompatible type (uint16_t array instead of uint8_t array). Signed-off-by: Krzysztof Kozlowski Link: https://msgid.link/r/20231130180758.212172-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit d1c371035c8204112d84266e6bde7537f25448f7 Author: Chao Yu Date: Sun Dec 10 10:50:28 2023 +0800 quota: convert dquot_claim_space_nodirty() to return void dquot_claim_space_nodirty() always return zero, let's convert it to return void, then, its caller can get rid of handling failure case. Signed-off-by: Chao Yu Signed-off-by: Jan Kara Message-Id: <20231210025028.3262900-1-chao@kernel.org> commit 25b636225a0816eac20b02fcb37daf6c722d0bed Author: Mohan Kumar Date: Tue Nov 28 12:46:15 2023 +0530 dmaengine: tegra210-adma: Support dma-channel-mask property To support the flexibility to reserve the specific dma channels add the support of dma-channel-mask property in the tegra210-adma driver Signed-off-by: Mohan Kumar Link: https://lore.kernel.org/r/20231128071615.31447-3-mkumard@nvidia.com Signed-off-by: Vinod Koul commit d95fcb78e7f263f909ce492c3882a704067dc534 Author: Mohan Kumar Date: Tue Nov 28 12:46:14 2023 +0530 dt-bindings: dma: Add dma-channel-mask to nvidia,tegra210-adma Add dma-channel-mask binding doc support to nvidia,tegra210-adma to reserve the adma channel usage Acked-by: Rob Herring Signed-off-by: Mohan Kumar Link: https://lore.kernel.org/r/20231128071615.31447-2-mkumard@nvidia.com Signed-off-by: Vinod Koul commit 10f2903147ed04784522ab841c20bb469bdd8681 Author: Ming Yen Hsieh Date: Wed Nov 22 11:06:46 2023 +0800 wifi: mt76: mt7921: fix wrong 6Ghz power type To avoid using incorrect 6g power settings after disconnection, it should to update back to the default state when disconnected. Fixes: 51ba0e3a15eb ("wifi: mt76: mt7921: add 6GHz power type support for clc") Signed-off-by: Ming Yen Hsieh Signed-off-by: Felix Fietkau commit d0a2bc5fe712217d2c73822ae75fd4e69a15cb2c Author: Ming Yen Hsieh Date: Wed Nov 22 11:06:45 2023 +0800 wifi: mt76: mt7921: fix CLC command timeout when suspend/resume When enter suspend/resume while in a connected state, the upper layer will trigger disconnection before entering suspend, and at the same time, it will trigger regd_notifier() and update CLC, causing the CLC event to not be received due to suspend, resulting in a command timeout. Therefore, the update of CLC is postponed until resume, to ensure data consistency and avoid the occurrence of command timeout. Fixes: 4fc8df50fd41 ("wifi: mt76: mt7921: get regulatory information from the clc event") Signed-off-by: Ming Yen Hsieh Signed-off-by: Felix Fietkau commit fa6ad88e023ddfa6c5dcdb466d159e89f451e305 Author: Ming Yen Hsieh Date: Wed Nov 22 11:06:44 2023 +0800 wifi: mt76: mt7921: fix country count limitation for CLC Due to the increase in the number of power tables for 6Ghz on CLC, the variable nr_country is no longer sufficient to represent the total quantity. Therefore, we have switched to calculating the length of clc buf to obtain the correct power table. Additionally, the version number has been incremented to 1. Fixes: 23bdc5d8cadf ("wifi: mt76: mt7921: introduce Country Location Control support") Signed-off-by: Ming Yen Hsieh Signed-off-by: Felix Fietkau commit 4812ba9ab9408f3aa5bcbb4ff80ddca84611ea17 Author: Sean Wang Date: Wed Nov 22 06:27:22 2023 +0800 wifi: mt76: mt7921: reduce the size of MCU firmware download Rx queue We actually don't need the reserve the 512 entries for the MCU firmware download Rx queue because the queue was only used in the firmware download phase to save the most of space and the reduction can significantly help with reducing latency we spent by ~20% further in resetting the Rx queue as the device was waking up from deep sleep mode. Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 4920a3a1285f5fd0b4f7c2cbd589903d3fc2824b Author: Sujuan Chen Date: Fri Nov 17 18:13:19 2023 +0100 wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM Introduce the capability to run mt7996 driver on boards with more than 4GB of memory. Co-developed-by: Rex Lu Signed-off-by: Rex Lu Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 48f7ab21f731f5a02ec34a4b83ae88c4a41d6a10 Author: Mark Brown Date: Tue Dec 5 14:24:44 2023 +0000 kselftest/arm64: Log SVCR when the SME tests barf On failure we log the actual and expected value of the register we detect a mismatch in. For SME one obvious potential source of corruption would be if we had corrupted SVCR since changes in streaming mode will reset the register values, log the value to aid in understanding issues. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231205-arm64-kselftest-log-svcr-v1-1-b77abd9ee7f3@kernel.org Signed-off-by: Will Deacon commit 33c1a7785a41216ec44d0fadc1890103e2db88b0 Author: Mark Brown Date: Fri Nov 24 15:22:21 2023 +0000 kselftest/arm64: Improve output for skipped TPIDR2 ABI test When TPIDR2 is not supported the tpidr2 ABI test prints the same message for each skipped test: ok 1 skipped, TPIDR2 not supported which isn't ideal for test automation software since it tracks kselftest results based on the string used to describe the test. This is also not standard KTAP output, the expected format is: ok 1 # SKIP default_value Updated the program to generate this, using the same set of test names that we would run if the test actually executed. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20231124-kselftest-arm64-tpidr2-skip-v1-1-e05d0ccef101@kernel.org Signed-off-by: Will Deacon commit 1aba06e7b2b49c1a0e905fcaf9c56d70164fbd8d Author: Mark Rutland Date: Fri Nov 24 11:05:11 2023 +0000 arm64: stacktrace: factor out kunwind_stack_walk() Currently arm64 uses the generic arch_stack_walk() interface for all stack walking code. This only passes a PC value and cookie to the unwind callback, whereas we'd like to pass some additional information in some cases. For example, the BPF exception unwinder wants the FP, for reliable stacktrace we'll want to perform additional checks on other portions of unwind state, and we'd like to expand the information printed by dump_backtrace() to include provenance and reliability information. As preparation for all of the above, this patch factors the core unwind logic out of arch_stack_walk() and into a new kunwind_stack_walk() function which provides all of the unwind state to a callback function. The existing arch_stack_walk() interface is implemented atop this. The kunwind_stack_walk() function is intended to be a private implementation detail of unwinders in stacktrace.c, and not something to be exported generally to kernel code. It is __always_inline'd into its caller so that neither it or its caller appear in stactraces (which is the existing/required behavior for arch_stack_walk() and friends) and so that the compiler can optimize away some of the indirection. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Kalesh Singh Cc: Madhavan T. Venkataraman Cc: Mark Brown Cc: Puranjay Mohan Cc: Will Deacon Reviewed-by: Kalesh Singh Reviewed-by: Puranjay Mohan Reviewed-by: Madhavan T. Venkataraman Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20231124110511.2795958-3-mark.rutland@arm.com Signed-off-by: Will Deacon commit 1beef60e7d6b90be826a73f626204f55a4cd7640 Author: Mark Rutland Date: Fri Nov 24 11:05:10 2023 +0000 arm64: stacktrace: factor out kernel unwind state On arm64 we share some unwinding code between the regular kernel unwinder and the KVM hyp unwinder. Some of this common code only matters to the regular unwinder, e.g. the `kr_cur` and `task` fields in the common struct unwind_state. We're likely to add more state which only matters for regular kernel unwinding (or only for hyp unwinding). In preparation for such changes, this patch factors out the kernel-specific state into a new struct kunwind_state, and updates the kernel unwind code accordingly. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Kalesh Singh Cc: Madhavan T. Venkataraman Cc: Mark Brown Cc: Puranjay Mohan Cc: Will Deacon Reviewed-by: Puranjay Mohan Reviewed-by: Kalesh Singh Reviewed-by: Madhavan T. Venkataraman Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20231124110511.2795958-2-mark.rutland@arm.com Signed-off-by: Will Deacon commit 7540f70df98f5c46feb5fe2257f93f543e5821e5 Author: Ard Biesheuvel Date: Mon Nov 27 13:00:53 2023 +0100 arm64: Kconfig: drop KAISER reference from KPTI option description KAISER is a reference to the KASLR hardening technique that already existed before Meltdown happened, and by now, it is sufficiently obscure that mentioning it does not actually clarify anything. So remove this reference, and replace it with KPTI. Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20231127120049.2258650-8-ardb@google.com Signed-off-by: Will Deacon commit 8885c7398fe56c49f14be6ce0ac202385f3cd818 Author: Ard Biesheuvel Date: Mon Nov 27 13:00:52 2023 +0100 arm64: mm: Only map KPTI trampoline if it is going to be used Avoid creating the fixmap entries for the KPTI trampoline if KPTI is not in use. Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20231127120049.2258650-7-ardb@google.com Signed-off-by: Will Deacon commit 58eea79a1cf285a62af886851b1a91ed5aceb401 Author: Shravan Chippa Date: Fri Dec 8 16:08:55 2023 +0530 dmaengine: sf-pdma: add mpfs-pdma compatible name Sifive platform dma (sf-pdma) has both in-order and out-of-order configurations but sf-pdam driver configured to do in-order DMA transfers, with out-of-order configuration got better throughput in the PolarFire SoC platform. Add a PolarFire SoC specific compatible and code to support for out-of-order dma transfers Reviewed-by: Emil Renner Berthing Signed-off-by: Shravan Chippa Link: https://lore.kernel.org/r/20231208103856.3732998-4-shravan.chippa@microchip.com Signed-off-by: Vinod Koul commit 72b22006ba78c2e3bf39b486a7b8155dc9020133 Author: Shravan Chippa Date: Fri Dec 8 16:08:54 2023 +0530 dt-bindings: dma: sf-pdma: add new compatible name Add new compatible name microchip,mpfs-pdma to support out of order dma transfers Reviewed-by: Conor Dooley Signed-off-by: Shravan Chippa Link: https://lore.kernel.org/r/20231208103856.3732998-3-shravan.chippa@microchip.com Signed-off-by: Vinod Koul commit 8e578b47e6d92d5e43982ddc54045973dd4a7de5 Author: Shravan Chippa Date: Fri Dec 8 16:08:53 2023 +0530 dmaengine: sf-pdma: Support of_dma_controller_register() Update sf-pdma driver to adopt generic DMA device tree bindings. It calls of_dma_controller_register() with of_dma_xlate_by_chan_id to get the generic DMA device tree helper support and the DMA clients can look up the sf-pdma controller using standard APIs. Signed-off-by: Shravan Chippa Link: https://lore.kernel.org/r/20231208103856.3732998-2-shravan.chippa@microchip.com Signed-off-by: Vinod Koul commit 70028b2e51c61d8dda0a31985978f4745da6a11b Merge: 9a64d4c93eee6 1ac13efd614c7 Author: David S. Miller Date: Mon Dec 11 10:59:17 2023 +0000 Merge branch 'ipv6-data-races' Eric Dumazet says: ==================== ipv6: more data-race annotations Small follow up series, taking care of races around np->mcast_oif and np->ucast_oif. ==================== Signed-off-by: David S. Miller commit 1ac13efd614c752d3b47bbfb58e7c36eeb92cb5a Author: Eric Dumazet Date: Fri Dec 8 10:12:44 2023 +0000 ipv6: annotate data-races around np->ucast_oif np->ucast_oif is read locklessly in some contexts. Make all accesses to this field lockless, adding appropriate annotations. This also makes setsockopt( IPV6_UNICAST_IF ) lockless. Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Signed-off-by: David S. Miller commit d2f011a0bf28c090ad75c9b1d306f2e1dda1c9bc Author: Eric Dumazet Date: Fri Dec 8 10:12:43 2023 +0000 ipv6: annotate data-races around np->mcast_oif np->mcast_oif is read locklessly in some contexts. Make all accesses to this field lockless, adding appropriate annotations. This also makes setsockopt( IPV6_MULTICAST_IF ) lockless. Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 9a64d4c93eee6b2efb7a02ec98d9480946424509 Author: Johannes Berg Date: Fri Dec 8 10:52:15 2023 +0100 Revert "net: rtnetlink: remove local list in __linkwatch_run_queue()" This reverts commit b8dbbbc535a9 ("net: rtnetlink: remove local list in __linkwatch_run_queue()"). It's evidently broken when there's a non-urgent work that gets added back, and then the loop can never finish. While reverting, add a note about that. Reported-by: Marek Szyprowski Fixes: b8dbbbc535a9 ("net: rtnetlink: remove local list in __linkwatch_run_queue()") Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 2bfbf82956e2de75249ce83901800c68d17d9e62 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:42 2023 +0100 soc: mediatek: mtk-svs: Constify runtime-immutable members of svs_bank Some members of struct svs_bank are not changed during runtime, so those are not variables but constants: move all of those to a new structure called svs_bank_pdata and refactor the code to make use of that and reorder members by size where possible. This effectively moves at least 50 bytes to the text segment. While at it, also uniform the thermal zone names across the banks. Link: https://lore.kernel.org/r/20231121125044.78642-19-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit f6c5f285e357aa2d7521f802d13b655068229e27 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:41 2023 +0100 soc: mediatek: mtk-svs: Use ULONG_MAX to compare floor frequency The `freq` variable is of type unsigned long and, even though it does currently work with u32 because no frequency is higher than U32_MAX, it is not guaranteed that in the future we will see one. Initialize the freq variable with ULONG_MAX instead of U32_MAX. Link: https://lore.kernel.org/r/20231121125044.78642-18-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit b74cac09c009bd797da0dedd84415c4c9f586201 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:40 2023 +0100 soc: mediatek: mtk-svs: Check if SVS mode is available in the beginning The svs_init01() and svs_init02() functions are already checking if the INIT01 and INIT02 modes are available - but that's done in for loops and for each SVS bank. Give those a shortcut to get out early if no SVS bank features the desired init mode: this is especially done to avoid some locking in the svs_init01(), but also to avoid multiple for loops to check the same, when no bank supports a specific mode. Link: https://lore.kernel.org/r/20231121125044.78642-17-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit b77f0c305ad7edba8274641bcd7fc67995a561e6 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:39 2023 +0100 soc: mediatek: mtk-svs: Cleanup of svs_probe() function Cleanup the svs_probe() function: use dev_err_probe() where possible, change some efuse read failure gotos and then remove now impossible IS_ERR_OR_NULL() checks (as they will never return true) for nvmem (efuse read) failures. Also remove some unnecessary blank lines. Link: https://lore.kernel.org/r/20231121125044.78642-16-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 69d2bf2efd60f7d71b6a3b6c894a0dc2b488adda Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:38 2023 +0100 soc: mediatek: mtk-svs: Compress of_device_id entries Compress each entry to one line, as they fit in 84 columns, which is acceptable. While at it, also change the capital 'S' to 's' in 'sentinel'. Link: https://lore.kernel.org/r/20231121125044.78642-15-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit a60641b0ddfbc1b85d71202568e7a2c47949a453 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:37 2023 +0100 soc: mediatek: mtk-svs: Remove redundant print in svs_get_efuse_data Callers of svs_get_efuse_data() are already printing an error in case anything goes wrong, and the error print for nvmem_cell_read() failure is redundant: remove it. Link: https://lore.kernel.org/r/20231121125044.78642-14-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 947f4252e27ff0654fe4b34e1bef0e095ae39bd5 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:36 2023 +0100 soc: mediatek: mtk-svs: Commonize MT8192 probe function for MT8186 Include the additions of svs_mt8186_platform_probe() in the common svs_mt8192_platform_probe() function, remove the former, and use the latter as .probe() callback for MT8186. Link: https://lore.kernel.org/r/20231121125044.78642-13-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 63077f99b18bedd06f843057ac5b1bbe290e06a1 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:35 2023 +0100 soc: mediatek: mtk-svs: Drop supplementary svs per-bank pointer Drop the "pbank" pointer from struct svs_bank: this was used to simply pass a pointer to the SVS bank that the flow was working on. That for instance needs more locking, and it's avoidable by adding one more parameter to functions working on specific banks, either a bank index number, or passing the svs_bank pointer directly from the caller. Even if the locking can now be reduced, for now, it was still left in place for the sake of making sure to not introduce any stability and/or reliability regression. Link: https://lore.kernel.org/r/20231121125044.78642-12-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 97c224fa8f84ee08f5aeeae7e791941a0ccbf8a0 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:34 2023 +0100 soc: mediatek: mtk-svs: Commonize efuse parse function for most SoCs Remove almost all of the per-SoC .efuse_parsing() callbacks and replace them with one common callback svs_common_parse_efuse(): to do that, also change the function signature of the callback to add the newly required pointer to struct svs_platform_data, containing the SVS-global fuse map. This is done for MT8186, MT8188, MT8192, MT8195. As for MT8183, the efuse parse function was simplified by using the new fuse maps. Link: https://lore.kernel.org/r/20231121125044.78642-11-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 1712c8969b55a3b68dee25a23c46a4743520fd8a Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:33 2023 +0100 soc: mediatek: mtk-svs: Move t-calibration-data retrieval to svs_probe() The t-calibration-data (SVS-Thermal calibration data) shall exist for all SoCs or SVS won't work anyway: move it to the common svs_probe() function and remove it from all of the per-SoC efuse_parsing() probe callbacks. Link: https://lore.kernel.org/r/20231121125044.78642-10-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 34f806b76894a5f68d41a74970a4c2bbf91ccdf7 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:32 2023 +0100 soc: mediatek: mtk-svs: Add SVS-Thermal coefficient to SoC platform data In preparation for commonizing the efuse parsing function, add the SVS-Thermal coefficients for all SoCs for which said function can be commonized (MT8186, MT8188, MT8192, MT8195) and assign those to their platform data structure. That will be used to calculate the MTS parameter with the equation MTS = (ts_coeff * 2) / 1000 This commit brings no functional changes. Link: https://lore.kernel.org/r/20231121125044.78642-9-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 7d23d4879e41382f2969d6da82f2c1ec5abf1c09 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:31 2023 +0100 soc: mediatek: mtk-svs: Add a map to retrieve fused values In preparation for adding a common efuse parsing function which will greatly reduce code duplication, add a SoC-specific mapping that will be used to retrieve the right SVS calibration values from the fuses. The maps are two: one is a Global Map used for reading parameters that are SVS-global, and one is a Bank Map for reading calibrations for each SVS Bank. While at it, also populate the map in the platform data for each SoC. Being this a preparation commit, there are no functional changes. Link: https://lore.kernel.org/r/20231121125044.78642-8-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 30d83ef88feb79a3c9c940c404b30bd351d9f327 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:30 2023 +0100 soc: mediatek: mtk-svs: Change the thermal sensor device name This driver tries to create a device link to the thermal sensor device: change all instances of "lvts" and "thermal" to "thermal-sensor", as that's what the devicetree node name must be. Note for MT8183: As specified in a previous commit, this SoC never got SVS probing, so this is not a breaking change and it does not require fallback for older device trees. Link: https://lore.kernel.org/r/20231121125044.78642-7-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 904d2dc4e9670850b81b952774edea4988b5ca6e Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:29 2023 +0100 soc: mediatek: mtk-svs: Reduce memory footprint of struct svs_bank Many 32-bit members of this struct can be size reduced to either 16-bit or even 8-bit, for a total saving of ~61 bytes per bank. Keeping in mind that one SoC declares at least two banks, this brings a minimum of ~122 bytes saving (depending on compiler optimization). Link: https://lore.kernel.org/r/20231121125044.78642-6-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 07933fe29f9473f2cf42a70605e51b13b743133a Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:28 2023 +0100 soc: mediatek: mtk-svs: Build bank name string dynamically In svs_bank_resource_setup() there is a "big" switch assigning different names depending on sw_id and type and this will surely grow: for example MT8186 has got a two-line type (high/low) SVS bank for CPU_BIG, and this would require more switch nesting. Simplify all of this by changing that to a devm_kasprintf() call that will concatenate the SW_ID string (e.g. SVSB_CPU_LITTLE) with the Type string (e.g. _LOW), resulting in the expected full bank name (e.g. SVSB_CPU_LITTLE_LOW). This being a dynamic allocation can be slower, but this happens only once in the life of this driver and it's not a performance path, so it's totally acceptable. Link: https://lore.kernel.org/r/20231121125044.78642-5-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 259919b3aa8eda1b27cc49855a8a534c4a0b9797 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:27 2023 +0100 soc: mediatek: mtk-svs: Convert sw_id and type to enumerations The sw_id and type specifiers currently are defined as BIT(x) for unknown reasons: nothing in this code makes any AND/OR check for those, and that would never happen anyway because both sw_id and type are exclusive, as in: - There will never be a bank that is for both CPU and GPU, or for CPU and CCI together; - A bank cannot be contemporarily of one-line and two-line type, as much as it cannot contemporarily have both HIGH and LOW roles Change those definitions to enumerations and also add some kerneldoc to better describe what they are for and what they indicate. While at it, also change the names adding _SWID or _TYPE to increase human readability. Link: https://lore.kernel.org/r/20231121125044.78642-4-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 40d59dc92e6fa5ef9a140d1de6977e733afb3fc0 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:26 2023 +0100 soc: mediatek: mtk-svs: Subtract offset from regs_v2 to avoid conflict The svs_regs_v2 array of registers was offsetted by 0xc00 because the SVS node was supposed to have the same iostart as the thermal sensors. That's wrong for two reasons: 1. Two different devices cannot have the same iostart in devicetree, as those would technically be the same device otherwise; and 2. SVS and Thermal Sensor (be it LVTS or AUXADC thermal) are not the same IP, and those two do obviously have a different iospace. Even though there already are users of this register array, the only one that declares a devicetree node for SVS is MT8183 - but it never actually worked because the "tzts1" thermal zone missed thermal trips, hence this driver's probe always failed on that SoC. Knowing this - it is safe to say that keeping compatibility with older device trees is pointless, hence simply subtract the 0xc00 offset from the register offset array. Link: https://lore.kernel.org/r/20231121125044.78642-3-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 27222a779d0404d6faab8aeaf028db4ac4de9b1f Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:35 2023 +0800 soc: mediatek: Add MT8188 VDOSYS reset bit map Add MT8188 reset bit map for VDOSYS0 and VDOSYS1. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit 67637de7bbdea8356ecfd37b545c906961e1137f Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:34 2023 +0800 soc: mediatek: Support reset bit mapping in mmsys driver - Reset ID must starts from 0 and be consecutive, but the reset bits in our hardware design is not continuous, some bits are left unused, we need a map to solve the problem - Use old style 1-to-1 mapping if .rst_tb is not defined Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit 2ffdd4773d98b1f7488f8e37bd881bbecec24d85 Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:33 2023 +0800 soc: mediatek: Support MT8188 VDOSYS1 Padding in mtk-mmsys - Add Padding components - Add Mutex module definitions for Padding Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit c0349314d5a0ddabdde136c1ac72e0254beb36bb Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:32 2023 +0800 soc: mediatek: Support MT8188 VDOSYS1 in mtk-mmsys - Add register definitions for MT8188 - Add VDOSYS1 routing table - Update MUTEX definitions accordingly - Set VSYNC length from 0x40 (default) to 1 since ETHDR is bypassed Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit dfd78c1e1c1628b5c5b4d7b4cd4d51f3ef6593ff Author: yu-chang.lee Date: Fri Nov 17 13:43:45 2023 +0800 soc: mediatek: mmsys: Add support for MT8188 VPPSYS Add MT8188 VPPSYS0 and VPPSYS1 driver data. Signed-off-by: yu-chang.lee Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 58dbf59308c903567c536f974c4dbc09fec90874 Author: Mark Tseng Date: Thu Nov 16 19:04:46 2023 +0800 soc: mediatek: svs: Add support for MT8186 SoC MT8186 svs has a number of banks which used as optimization of opp voltage table for corresponding dvfs drivers. MT8186 svs big core uses 2-line high bank and low bank to optimize the voltage of opp table for higher and lower frequency respectively. Signed-off-by: Mark Tseng Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 8ccda5cecaed26260bff798550c0403ac845d361 Author: Mark Tseng Date: Thu Nov 16 19:04:45 2023 +0800 soc: mediatek: svs: Add support for MT8195 SoC MT8195 svs gpu uses 2-line high bank and low bank to optimize the voltage of opp table for higher and lower frequency respectively. Signed-off-by: Mark Tseng Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 58e82a62669da52e688f4a8b89922c1839bf1001 Author: Ma Jun Date: Mon Dec 11 18:06:23 2023 +0800 platform/x86/amd: Add support for AMD ACPI based Wifi band RFI mitigation feature Due to electrical and mechanical constraints in certain platform designs there may be likely interference of relatively high-powered harmonics of the (G-)DDR memory clocks with local radio module frequency bands used by Wifi 6/6e/7. To mitigate this, AMD has introduced a mechanism that devices can use to notify active use of particular frequencies so that other devices can make relative internal adjustments as necessary to avoid this resonance. Co-developed-by: Evan Quan Signed-off-by: Evan Quan Signed-off-by: Ma Jun Reviewed-by: Mario Limonciello Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 2128f3cca5a2e7ab4d1ffb16c0e0431c3a0106a1 Author: Ma Jun Date: Mon Dec 11 18:06:22 2023 +0800 Documentation/driver-api: Add document about WBRF mechanism Add documentation about AMD's Wifi band RFI mitigation (WBRF) mechanism explaining the theory and how it is used. Signed-off-by: Ma Jun Reviewed-by: Hans de Goede Reviewed-by: Mario Limonciello Signed-off-by: Hans de Goede commit 5dc289e08a4d0704583d8df70181cbeb47c817d9 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:43 2023 +0100 arm64: dts: mediatek: mt8192: Add Smart Voltage Scaling node Add the MediaTek SVS node: this will lower the voltage of various components of the SoC based on chip quality (read from fuses) in order to save power and generate less heat. Link: https://lore.kernel.org/r/20231121125044.78642-20-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit f4747b91dbc6a388240e4bfd929b7e17f2598f99 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:44 2023 +0100 arm64: dts: mediatek: mt8195: Add SVS node and reduce LVTS_AP iospace Add the MediaTek SVS node: this will lower the voltage of various components of the SoC based on chip quality (read from fuses) in order to save power and generate less heat. Also, reduce the LVTS_AP iospace to 0xc00, because that's exactly where SVS starts. - LVTS_AP start: 0x1100b000 length: 0xc00 - SVS start: 0x1100bc00 length: 0x400 Link: https://lore.kernel.org/r/20231121125044.78642-21-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit e9ff6cdad87343447bf1a103068d91c0502e4629 Author: AngeloGioacchino Del Regno Date: Tue Nov 21 13:50:25 2023 +0100 arm64: dts: mediatek: mt8183: Change iospaces for thermal and svs The SVS iospace starts at 0x1100bc00 and not at 0x1100b000 as the latter is the thermal sensor iospace instead. Change the iospaces for both as following: - Thermal: 0x1100b000, length 0xc00 - SVS: 0x1100bc00, length 0x400 Please note that while this would be a breaking change for SVS (but not for thermal sensors), it doesn't matter because the svs driver never worked anyway because of the missing trips in tzts2, causing that thermal zone to never actually register, hence the SVS driver to fail probing anyway. Link: https://lore.kernel.org/r/20231121125044.78642-2-angelogioacchino.delregno@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 704af3a40747e395b67892127943e6ffd5e2b642 Author: Armin Wolf Date: Sun Dec 10 21:24:43 2023 +0100 platform/x86: wmi: Remove chardev interface The design of the WMI chardev interface is broken: - it assumes that WMI drivers are not instantiated twice - it offers next to no abstractions, the WMI driver gets a raw byte buffer - it is only used by a single driver, something which is unlikely to change Since the only user (dell-smbios-wmi) has been migrated to his own ioctl interface, remove it. Reviewed-by: Ilpo Järvinen Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231210202443.646427-6-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 93885e85a77f25a1de57d47572a00633717fe1d4 Author: Armin Wolf Date: Sun Dec 10 21:24:42 2023 +0100 platform/x86: dell-smbios-wmi: Stop using WMI chardev The WMI chardev API will be removed in the near future. Reimplement the necessary bits used by this driver so that userspace software depending on it does no break. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231210202443.646427-5-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ba358964cb8f24f28d543c6ce18a4af64961ab62 Author: Armin Wolf Date: Sun Dec 10 21:24:41 2023 +0100 platform/x86: dell-smbios-wmi: Use devm_get_free_pages() Use devres version of __get_free_pages() to simplify the error handling code. Signed-off-by: Armin Wolf Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231210202443.646427-4-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ed72a2b50b755327f411f8199c4120d8bc7687cf Author: Armin Wolf Date: Sun Dec 10 21:24:40 2023 +0100 platform/x86: wmi: Remove debug_event module param Users can already listen to ACPI WMI events through the ACPI netlink interface. The old wmi_notify_debug() interface also uses the deprecated GUID-based interface. Remove it to make the event handling code more readable. Reviewed-by: Ilpo Järvinen Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231210202443.646427-3-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit f763fd73b181c7c5117e0d8a4da3dd4237737b86 Author: Armin Wolf Date: Sun Dec 10 21:24:39 2023 +0100 platform/x86: wmi: Remove debug_dump_wdg module param The functionality of dumping WDG entries is better provided by userspace tools like "fwts wmi", which also does not suffer from garbled printk output caused by pr_cont(). Reviewed-by: Ilpo Järvinen Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231210202443.646427-2-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 23e652467d2d5b21a76083b317841b54769ee48c Merge: 682b43a049c89 3494a594315b5 Author: Hans de Goede Date: Mon Dec 11 11:22:02 2023 +0100 Merge tag 'platform-drivers-x86-v6.7-3' into pdx86/for-next Back merge pdx86 fixes into pdx86/for-next for further WMI work depending on some of the fixes. platform-drivers-x86 for v6.7-3 Highlights: - asus-wmi: Solve i8042 filter resource handling, input, and suspend issues - wmi: Skip zero instance WMI blocks to avoid issues with some laptops - mlxbf-bootctl: Differentiate dev/production keys - platform/surface: Correct serdev related return value to avoid leaking errno into userspace - Error checking fixes The following is an automated shortlog grouped by driver: asus-wmi: - Change q500a_i8042_filter() into a generic i8042-filter - disable USB0 hub on ROG Ally before suspend - Filter Volume key presses if also reported via atkbd - Move i8042 filter install to shared asus-wmi code mellanox: - Add null pointer checks for devm_kasprintf() - Check devm_hwmon_device_register_with_groups() return value mlxbf-bootctl: - correctly identify secure boot with development keys surface: aggregator: - fix recv_buf() return value wmi: - Skip blocks with zero instances commit 94f7f6182c72ba642c1f20111681f9cc8621c95f Author: Masahisa Kojima Date: Tue Nov 7 14:40:55 2023 +0900 efivarfs: automatically update super block flag efivar operation is updated when the tee_stmm_efi module is probed. tee_stmm_efi module supports SetVariable runtime service, but user needs to manually remount the efivarfs as RW to enable the write access if the previous efivar operation does not support SetVariable and efivarfs is mounted as read-only. This commit notifies the update of efivar operation to efivarfs subsystem, then drops SB_RDONLY flag if the efivar operation supports SetVariable. Signed-off-by: Masahisa Kojima [ardb: use per-superblock instance of the notifier block] Signed-off-by: Ard Biesheuvel commit c44b6be62e8dd4ee0a308c36a70620613e6fc55f Author: Masahisa Kojima Date: Tue Nov 7 14:40:54 2023 +0900 efi: Add tee-based EFI variable driver When the flash is not owned by the non-secure world, accessing the EFI variables is straight-forward and done via EFI Runtime Variable Services. In this case, critical variables for system integrity and security are normally stored in the dedicated secure storage and can only be manipulated directly from the secure world. Usually, small embedded devices don't have the special dedicated secure storage. The eMMC device with an RPMB partition is becoming more common, and we can use this RPMB partition to store the EFI Variables. The eMMC device is typically owned by the non-secure world (Linux in our case). There is an existing solution utilizing eMMC RPMB partition for EFI Variables, it is implemented by interacting with TEE (OP-TEE in this case), StandaloneMM (as EFI Variable Service Pseudo TA), eMMC driver and tee-supplicant. The last piece is the tee-based variable access driver to interact with TEE and StandaloneMM. So let's add the kernel functions needed. This feature is implemented as a kernel module. StMM PTA has TA_FLAG_DEVICE_ENUM_SUPP flag when registered to OP-TEE so that this tee_stmm_efi module is probed after tee-supplicant starts, since "SetVariable" EFI Runtime Variable Service requires to interact with tee-supplicant. Acked-by: Sumit Garg Co-developed-by: Ilias Apalodimas Signed-off-by: Ilias Apalodimas Signed-off-by: Masahisa Kojima Signed-off-by: Ard Biesheuvel commit 1f71f37fbbd065b3326d9b7d8bb5ae688cd653d0 Author: Masahisa Kojima Date: Tue Nov 7 14:40:53 2023 +0900 efi: Add EFI_ACCESS_DENIED status code This commit adds the EFI_ACCESS_DENIED status code. Acked-by: Sumit Garg Co-developed-by: Ilias Apalodimas Signed-off-by: Ilias Apalodimas Signed-off-by: Masahisa Kojima Signed-off-by: Ard Biesheuvel commit 6bb3703aa52c9b5bb9716cbeae7350247b675209 Author: Masahisa Kojima Date: Tue Nov 7 14:40:52 2023 +0900 efi: expose efivar generic ops register function This is a preparation for supporting efivar operations provided by other than efi subsystem. Both register and unregister functions are exposed so that non-efi subsystem can revert the efi generic operation. Acked-by: Sumit Garg Co-developed-by: Ilias Apalodimas Signed-off-by: Ilias Apalodimas Signed-off-by: Masahisa Kojima Signed-off-by: Ard Biesheuvel commit cdb46a8aefbf7fd36772bb206aaaf7e45d7cf8f6 Author: Ard Biesheuvel Date: Fri Dec 8 17:39:29 2023 +0100 efivarfs: Move efivarfs list into superblock s_fs_info syzbot reports issues with concurrent fsopen()/fsconfig() invocations on efivarfs, which are the result of the fact that the efivarfs list (which caches the names and GUIDs of existing EFI variables) is a global structure. In normal use, these issues are unlikely to trigger, even in the presence of multiple mounts of efivarfs, but the execution pattern used by the syzkaller reproducer may result in multiple instances of the superblock that share the global efivarfs list, and this causes list corruption when the list is reinitialized by one user while another is traversing it. So let's move the list head into the superblock s_fs_info field, so that it will never be shared between distinct instances of the superblock. In the common case, there will still be a single instance of this list, but in the artificial syzkaller case, no list corruption can occur any longer. Reported-by: syzbot+1902c359bfcaf39c46f2@syzkaller.appspotmail.com Signed-off-by: Ard Biesheuvel commit 547713d502f7b4b8efccd409cff84d731a23853b Author: Ard Biesheuvel Date: Fri Dec 8 17:39:28 2023 +0100 efivarfs: Free s_fs_info on unmount Now that we allocate a s_fs_info struct on fs context creation, we should ensure that we free it again when the superblock goes away. Fixes: 5329aa5101f7 ("efivarfs: Add uid/gid mount options") Signed-off-by: Ard Biesheuvel commit d28076ddda34d13aee675fbed52e3275af00f64d Author: Ard Biesheuvel Date: Fri Dec 8 17:39:27 2023 +0100 efivarfs: Move efivar availability check into FS context init Instead of checking whether or not EFI variables are available when creating the superblock, check it one step earlier, when initializing the FS context for the mount. This way, no FS context will be created at all, and we can drop the second check at .kill_sb() time entirely. Signed-off-by: Ard Biesheuvel commit 0e8d2444168dd519fea501599d150e62718ed2fe Author: Ilias Apalodimas Date: Tue Nov 7 14:40:56 2023 +0900 efivarfs: force RO when remounting if SetVariable is not supported If SetVariable at runtime is not supported by the firmware we never assign a callback for that function. At the same time mount the efivarfs as RO so no one can call that. However, we never check the permission flags when someone remounts the filesystem as RW. As a result this leads to a crash looking like this: $ mount -o remount,rw /sys/firmware/efi/efivars $ efi-updatevar -f PK.auth PK [ 303.279166] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 303.280482] Mem abort info: [ 303.280854] ESR = 0x0000000086000004 [ 303.281338] EC = 0x21: IABT (current EL), IL = 32 bits [ 303.282016] SET = 0, FnV = 0 [ 303.282414] EA = 0, S1PTW = 0 [ 303.282821] FSC = 0x04: level 0 translation fault [ 303.283771] user pgtable: 4k pages, 48-bit VAs, pgdp=000000004258c000 [ 303.284913] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000 [ 303.286076] Internal error: Oops: 0000000086000004 [#1] PREEMPT SMP [ 303.286936] Modules linked in: qrtr tpm_tis tpm_tis_core crct10dif_ce arm_smccc_trng rng_core drm fuse ip_tables x_tables ipv6 [ 303.288586] CPU: 1 PID: 755 Comm: efi-updatevar Not tainted 6.3.0-rc1-00108-gc7d0c4695c68 #1 [ 303.289748] Hardware name: Unknown Unknown Product/Unknown Product, BIOS 2023.04-00627-g88336918701d 04/01/2023 [ 303.291150] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 303.292123] pc : 0x0 [ 303.292443] lr : efivar_set_variable_locked+0x74/0xec [ 303.293156] sp : ffff800008673c10 [ 303.293619] x29: ffff800008673c10 x28: ffff0000037e8000 x27: 0000000000000000 [ 303.294592] x26: 0000000000000800 x25: ffff000002467400 x24: 0000000000000027 [ 303.295572] x23: ffffd49ea9832000 x22: ffff0000020c9800 x21: ffff000002467000 [ 303.296566] x20: 0000000000000001 x19: 00000000000007fc x18: 0000000000000000 [ 303.297531] x17: 0000000000000000 x16: 0000000000000000 x15: 0000aaaac807ab54 [ 303.298495] x14: ed37489f673633c0 x13: 71c45c606de13f80 x12: 47464259e219acf4 [ 303.299453] x11: ffff000002af7b01 x10: 0000000000000003 x9 : 0000000000000002 [ 303.300431] x8 : 0000000000000010 x7 : ffffd49ea8973230 x6 : 0000000000a85201 [ 303.301412] x5 : 0000000000000000 x4 : ffff0000020c9800 x3 : 00000000000007fc [ 303.302370] x2 : 0000000000000027 x1 : ffff000002467400 x0 : ffff000002467000 [ 303.303341] Call trace: [ 303.303679] 0x0 [ 303.303938] efivar_entry_set_get_size+0x98/0x16c [ 303.304585] efivarfs_file_write+0xd0/0x1a4 [ 303.305148] vfs_write+0xc4/0x2e4 [ 303.305601] ksys_write+0x70/0x104 [ 303.306073] __arm64_sys_write+0x1c/0x28 [ 303.306622] invoke_syscall+0x48/0x114 [ 303.307156] el0_svc_common.constprop.0+0x44/0xec [ 303.307803] do_el0_svc+0x38/0x98 [ 303.308268] el0_svc+0x2c/0x84 [ 303.308702] el0t_64_sync_handler+0xf4/0x120 [ 303.309293] el0t_64_sync+0x190/0x194 [ 303.309794] Code: ???????? ???????? ???????? ???????? (????????) [ 303.310612] ---[ end trace 0000000000000000 ]--- Fix this by adding a .reconfigure() function to the fs operations which we can use to check the requested flags and deny anything that's not RO if the firmware doesn't implement SetVariable at runtime. Fixes: f88814cc2578 ("efi/efivars: Expose RT service availability via efivars abstraction") Signed-off-by: Ilias Apalodimas Signed-off-by: Ard Biesheuvel commit 840e341bed3c4331061031dc9db0aff04abafb4b Author: Eugen Hristev Date: Mon Dec 4 15:55:33 2023 +0200 arm64: dts: mediatek: mt8186: fix address warning for ADSP mailboxes Fix warnings reported by dtbs_check : arch/arm64/boot/dts/mediatek/mt8186.dtsi:1163.35-1168.5: Warning (simple_bus_reg): /soc/mailbox@10686000: simple-bus unit address format error, expected "10686100" arch/arm64/boot/dts/mediatek/mt8186.dtsi:1170.35-1175.5: Warning (simple_bus_reg): /soc/mailbox@10687000: simple-bus unit address format error, expected "10687100" by having the right bus address as node name. Fixes: 379cf0e639ae ("arm64: dts: mediatek: mt8186: Add ADSP mailbox nodes") Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/20231204135533.21327-1-eugen.hristev@collabora.com Signed-off-by: AngeloGioacchino Del Regno commit 6ed159e499bc2ebedf94c9086244220824e71672 Author: Chen-Yu Tsai Date: Thu Nov 30 15:40:31 2023 +0800 arm64: dts: mediatek: mt8186: Fix alias prefix for ovl_2l0 The alias prefix for ovl_2l (2 layer overlay) is "ovl-2l", not "ovl_2l". Fix this. Fixes: 7e07d3322de2 ("arm64: dts: mediatek: mt8186: Add display nodes") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20231130074032.913511-4-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 26af327371a992f3eef4d1de1df888d3ebc05d00 Author: Chen-Yu Tsai Date: Thu Nov 30 15:40:30 2023 +0800 arm64: dts: mt6358: Drop bogus "regulator-fixed" compatible properties Whether a regulator under the MT6358 PMIC is a fixed regulator or not is derived from the node name. Compatible string properties are not used. This causes validation errors after the regulator binding is converted to DT schema. Drop the bogus "regulator-fixed" compatible properties from the PMIC's regulator sub-nodes. Fixes: 9f8872221674 ("arm64: dts: mt6358: add PMIC MT6358 related nodes") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20231130074032.913511-3-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 561003e16490760042c6fd6e8880d9406916a9e5 Author: Chen-Yu Tsai Date: Thu Nov 30 15:40:29 2023 +0800 arm64: dts: mt8183: kukui-jacuzzi: Drop bogus anx7625 panel_flag property The panel_flag property was used in ChromeOS's downstream kernel. It was used to signal whether the downstream device was a fixed panel or a connector for an external display. This property was dropped in favor of standard OF graph descrptions of downstream display panels and bridges. Drop the property from the device tree file. Fixes: cabc71b08eb5 ("arm64: dts: mt8183: Add kukui-jacuzzi-damu board") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20231130074032.913511-2-wenst@chromium.org Signed-off-by: AngeloGioacchino Del Regno commit 9461e0caac9e4c621c3956bafaa262ee435956b5 Author: jason-ch chen Date: Mon Oct 23 16:38:39 2023 +0800 arm64: dts: Add MediaTek MT8188 dts and evaluation board and Makefile MT8188 is a SoC based on 64bit ARMv8 architecture. It contains 6 CA55 and 2 CA78 cores. MT8188 share many HW IP with MT65xx series. We add basic chip support for MediaTek MT8188 on evaluation board. Signed-off-by: jason-ch chen Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat Link: https://lore.kernel.org/r/20231023083839.24453-5-jason-ch.chen@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 040c3303f1106f95a1f2ee0231f959f2b6fa730e Author: jason-ch chen Date: Mon Oct 23 16:38:38 2023 +0800 dt-bindings: soc: mediatek: pwrap: Modify compatible for MT8188 The reason for changing the patch was that while MT8188 uses the same pwrap as MT8195, the original code was only applicable to 'compatible = "mediatek,mt8188-pwrap"'. To resolve the DTBS check warning that '['mediatek,mt8188-pwrap', 'mediatek,mt8195-pwrap', 'syscon'] is too long', it is necessary to modify the code. Signed-off-by: jason-ch chen Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231023083839.24453-4-jason-ch.chen@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 7711c3c46249344fcbbfdb3ba626801e4392fa5c Author: jason-ch chen Date: Mon Oct 23 16:38:37 2023 +0800 dt-bindings: arm: mediatek: Add mt8188 pericfg compatible Add mt8188 pericfg compatible to binding document. Signed-off-by: jason-ch chen Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231023083839.24453-3-jason-ch.chen@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit 6741cbb7875d12c7bb33099aeb4eafa497008ce0 Author: jason-ch chen Date: Mon Oct 23 16:38:36 2023 +0800 dt-bindings: arm: Add compatible for MediaTek MT8188 This commit adds dt-binding documentation for the MediaTek MT8188 reference board. Signed-off-by: jason-ch chen Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231023083839.24453-2-jason-ch.chen@mediatek.com Signed-off-by: AngeloGioacchino Del Regno commit b7f638d6bab947cf19ba33a453070077c5fb6c49 Author: Michael Walle Date: Thu Nov 23 14:37:48 2023 +0100 arm64: dts: mediatek: mt8195: add DSI and MIPI DPHY nodes Add the two DSI controller node and the associated DPHY nodes. Individual boards have to enable them in the board device tree. Signed-off-by: Michael Walle Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 9d1029e76700a097c1a2e850d24ac747564efb16 Author: Michael Walle Date: Thu Nov 23 14:37:46 2023 +0100 dt-bindings: display: mediatek: dsi: add compatible for MediaTek MT8195 Add the compatible string for MediaTek MT8195 SoC, using the same DSI block as the MT8183. Signed-off-by: Michael Walle Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 9a8014b1d4d2b1ffc53a844e07dfdd814b70dad0 Author: Chen-Yu Tsai Date: Wed Sep 13 16:44:56 2023 +0800 arm64: dts: mediatek: mt6358: Merge ldo_vcn33_* regulators The ldo_vcn33_bt and ldo_vcn33_wifi regulators are actually the same regulator, having the same voltage setting and output pin. There are simply two enable bits that are ORed together to enable the regulator. Having two regulators representing the same output pin is misleading from a design matching standpoint, and also error-prone in driver implementations. Now that the bindings have these two merged, merge them in the device tree as well. Neither vcn33 regulators are referenced in upstream device trees. As far as hardware designs go, none of the Chromebooks using MT8183 w/ MT6358 use this output. Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit e97c618234d930469a080051c20d4261d27de34b Author: Eugen Hristev Date: Mon Oct 16 23:39:15 2023 +0300 dt-bindings: arm: mediatek: convert audsys and mt2701-afe-pcm to yaml Convert the mediatek,audsys binding to YAML, together with the associated binding bindings/sound/mt2701-afe-pcm.yaml . Signed-off-by: Eugen Hristev Reviewed-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 5710462a116c70c31427bc6eca6542aa606a5994 Author: Moudy Ho Date: Mon Oct 30 17:48:40 2023 +0800 arm64: dts: mediatek: mt8195: add MDP3 nodes Add device nodes for Media Data Path 3 (MDP3) modules. Signed-off-by: Moudy Ho Signed-off-by: AngeloGioacchino Del Regno commit 52f4a10f2a860402c130c5c21d055e721d63a7e9 Author: Moudy Ho Date: Mon Oct 30 17:48:39 2023 +0800 arm64: dts: mediatek: mt8195: revise VDOSYS RDMA node name DMA-related nodes have their own standardized naming. Therefore, the MT8195 VDOSYS RDMA has been unified and corrected. Additionally, these modifications will facilitate the further integration of bindings. Fixes: 92d2c23dc269 ("arm64: dts: mt8195: add display node for vdosys1") Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 188ffcd7fea79af3cac441268fc99f60e87f03b3 Author: Moudy Ho Date: Mon Oct 30 17:48:38 2023 +0800 arm64: dts: mediatek: mt8183: correct MDP3 DMA-related nodes In order to generalize the node names, the DMA-related nodes corresponding to MT8183 MDP3 need to be corrected. Fixes: 60a2fb8d202a ("arm64: dts: mt8183: add MediaTek MDP3 nodes") Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 6b7e0eb682af13cb603d8151ddbbfec064e96086 Author: Moudy Ho Date: Tue Oct 31 16:33:57 2023 +0800 dt-bindings: display: mediatek: padding: add compatible for MT8195 Add a compatible string for the PADDING block in MediaTek MT8195 that is controlled by MDP3. Signed-off-by: Moudy Ho Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 739058a9c5c31181a3f5599c30690be82d252428 Author: Moudy Ho Date: Tue Oct 31 16:33:56 2023 +0800 dt-bindings: display: mediatek: split: add compatible for MT8195 Add compatible string and GCE property for MT8195 SPLIT, of which is operated by MDP3. Signed-off-by: Moudy Ho Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit fe49f432abf267a167cb4318093e97c92f21dae6 Author: Moudy Ho Date: Tue Oct 31 16:33:55 2023 +0800 dt-bindings: display: mediatek: ovl: add compatible for MT8195 Add a compatible string for the OVL block in MediaTek MT8195 that is controlled by MDP3. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: AngeloGioacchino Del Regno commit 4ae88e9c53a48eaf21209d400c7374374934bf83 Author: Moudy Ho Date: Tue Oct 31 16:33:54 2023 +0800 dt-bindings: display: mediatek: merge: add compatible for MT8195 Add a compatible string for the MERGE block in MediaTek MT8195 that is controlled by MDP3. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: AngeloGioacchino Del Regno commit 3e54624f946b4a7e0948f0953c776b287a36f208 Author: Moudy Ho Date: Tue Oct 31 16:33:53 2023 +0800 dt-bindings: display: mediatek: color: add compatible for MT8195 Add a compatible string for the COLOR block in MediaTek MT8195 that is controlled by MDP3. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: AngeloGioacchino Del Regno commit dacfb5dd8ffe3e35c7bdee670a82c000bf7c66fd Author: Moudy Ho Date: Tue Oct 31 16:33:52 2023 +0800 dt-bindings: display: mediatek: aal: add compatible for MT8195 Add a compatible string for the AAL block in MediaTek MT8195 that is controlled by MDP3. Signed-off-by: Moudy Ho Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 8bf482aff22bdeee0b531bb133a8bd7abe6ee8fd Author: Moudy Ho Date: Tue Oct 31 16:33:51 2023 +0800 dt-bindings: media: mediatek: mdp3: add component TDSHP for MT8195 Add the fundamental hardware configuration of component TDSHP, which is controlled by MDP3 on MT8195. Signed-off-by: Moudy Ho Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 6af46f2c33766f74e8562a48bf03960a7529f532 Author: Moudy Ho Date: Tue Oct 31 16:33:50 2023 +0800 dt-bindings: media: mediatek: mdp3: add component TCC for MT8195 Add the fundamental hardware configuration of component TCC, which is controlled by MDP3 on MT8195. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: AngeloGioacchino Del Regno commit e078d0c0246ea5924a43bd50c4268c84d79df89a Author: Moudy Ho Date: Tue Oct 31 16:33:49 2023 +0800 dt-bindings: media: mediatek: mdp3: add component STITCH for MT8195 Add the fundamental hardware configuration of component STITCH, which is controlled by MDP3 on MT8195. Signed-off-by: Moudy Ho Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 8109d8ecb5b94ed1ed4c37070aa0e59405e55922 Author: Moudy Ho Date: Tue Oct 31 16:33:48 2023 +0800 dt-bindings: media: mediatek: mdp3: add component HDR for MT8195 Add the fundamental hardware configuration of component HDR, which is controlled by MDP3 on MT8195. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: AngeloGioacchino Del Regno commit 936996afa440426c27473a6c2da4d5adcaa6b7dd Author: Moudy Ho Date: Tue Oct 31 16:33:47 2023 +0800 dt-bindings: media: mediatek: mdp3: add component FG for MT8195 Add the fundamental hardware configuration of component FG, which is controlled by MDP3 on MT8195. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Signed-off-by: AngeloGioacchino Del Regno commit 032388dd6d17670cf4dec933543b0937011dc07f Author: Moudy Ho Date: Tue Oct 31 16:33:46 2023 +0800 dt-bindings: media: mediatek: mdp3: add compatible for MT8195 WROT MT8195 WROT inherited from MT8183, add the corresponding compatible name to it. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: AngeloGioacchino Del Regno commit ba61ee5bf4849abedbdf6161ca232aa6c248fc19 Author: Moudy Ho Date: Tue Oct 31 16:33:45 2023 +0800 dt-bindings: media: mediatek: mdp3: add compatible for MT8195 RSZ MT8195 RSZ inherited from MT8183, add the corresponding compatible name to it. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: AngeloGioacchino Del Regno commit f0c9cafda864fd66d3a3f63e5371bcc8d98f9b8e Author: Moudy Ho Date: Tue Oct 31 16:33:44 2023 +0800 dt-bindings: media: mediatek: mdp3: add config for MT8195 RDMA Added the configuration for MT8195 RDMA. In comparison to MT8183, it no longer shares SRAM with RSZ, and there are now preconfigured 5 mbox. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Signed-off-by: AngeloGioacchino Del Regno commit 3bae0d638a37122e7f372376d9572dfc5620afa2 Author: Moudy Ho Date: Tue Oct 31 16:33:43 2023 +0800 dt-bindings: media: mediatek: mdp3: merge the indentical RDMA under display To simplify maintenance and avoid branches, the identical component should be merged and placed in the path belonging to the MDP (from display/* to media/*). In addition, currently only MDP utilizes RDMA through CMDQ, and the necessary properties for "mediatek,gce-events", and "mboxes" have been set up for this purpose. Within DISP, it directly receives component interrupt signals. Signed-off-by: Moudy Ho Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Signed-off-by: AngeloGioacchino Del Regno commit f5f185bf7c42f6ca885202fefc40fc871d08a722 Author: Moudy Ho Date: Tue Oct 31 16:33:42 2023 +0800 dt-bindings: media: mediatek: mdp3: correct RDMA and WROT node with generic names The DMA-related nodes RDMA/WROT in MDP3 should be changed to generic names. In addition, fix improper space indent in example. Fixes: 4ad7b39623ab ("media: dt-binding: mediatek: add bindings for MediaTek MDP3 components") Signed-off-by: Moudy Ho Acked-by: Rob Herring Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit a17cf4c6de2defcd4a2205671a8ed8ff5a6500dd Author: AngeloGioacchino Del Regno Date: Thu Oct 5 12:49:04 2023 +0200 media: dt-bindings: mediatek: Add phandle to mediatek,scp on MDP3 RDMA The MDP3 RDMA needs to communicate with the SCP remote processor: allow specifying a phandle to a SCP core. Reviewed-by: Conor Dooley Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno commit 3106b14c1cb4b745dd0413dc392418d301f3b1d1 Author: AngeloGioacchino Del Regno Date: Mon Oct 30 14:25:23 2023 +0100 arm64: dts: mediatek: mt8195-cherry: Assign sram supply to MFG1 pd Add a phandle to the MT8195_POWER_DOMAIN_MFG1 power domain and assign the GPU SRAM (vsram_others) supply to that in mt8195-cherry: this allows to keep the sram powered up while the GPU is used. This means that it's now possible to remove the regulator-always-on property from the mt6359_vsram_others_ldo_reg vreg, so that it will be switched on and off during suspend. Tested-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno commit 063821ae4b01a57d8c913f8f644a24b807f3e3b6 Author: AngeloGioacchino Del Regno Date: Mon Oct 30 14:25:22 2023 +0100 arm64: dts: mediatek: mt8195-cherry: Add MFG0 domain supply MFG0 is the main power domain for the GPU and its surrounding glue logic, and has a specific power rail. Add its power supply on Cherry platforms and remove the now useless (and wrong) regulator-always-on property from the vbuck1 regulator. Tested-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno commit 3526cfaed24269918135d09626afc5a155e4811a Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:31 2023 +0800 dt-bindings: reset: mt8188: Add VDOSYS reset control bits Add MT8188 VDOSYS0 and VDOSYS1 reset control bits. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit 41b3a96c4a0365ec5e2b308268f3509999dcfac4 Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:30 2023 +0800 dt-bindings: arm: mediatek: Add compatible for MT8188 Add compatible name for MediaTek MT8188 VDOSYS1. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit 64e5d3ada25433c04c496e035677ddd165a63c9a Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:29 2023 +0800 dt-bindings: display: mediatek: padding: Add MT8188 Padding is a new hardware module on MediaTek MT8188, add dt-bindings for it. Reviewed-by: Krzysztof Kozlowski Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit c2501ad27a59cf1756a9a838782df52bca45b7b3 Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:28 2023 +0800 dt-bindings: display: mediatek: merge: Add compatible for MT8188 Add compatible name for MediaTek MT8188 MERGE. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit ba0a6faceee073f752cca4fcc2e206f33c1e16a8 Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:27 2023 +0800 dt-bindings: display: mediatek: mdp-rdma: Add compatible for MT8188 Add compatible name for MediaTek MT8188 MDP-RDMA. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit 2381de61fef91900341c4a5cbab7d562353d194a Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:26 2023 +0800 dt-bindings: display: mediatek: ethdr: Add compatible for MT8188 Add compatible name for MediaTek MT8188 ETHDR. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung Signed-off-by: AngeloGioacchino Del Regno commit 10bbf22de75a43e63d10e2763e74e930e797a621 Author: Rafał Miłecki Date: Fri Nov 17 06:22:14 2023 +0100 dt-bindings: thermal: convert Mediatek Thermal to the json-schema This helps validating DTS files. Introduced changes: 1. Improved title 2. Simplified description (dropped "This describes the device tree...") 3. Dropped undocumented "reset-names" from example Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: AngeloGioacchino Del Regno commit 055ef10ccdd430973e1f05530cedcdd44cf744da Author: Hsin-Yi Wang Date: Thu Oct 26 12:09:16 2023 -0700 arm64: dts: mt8183: Add jacuzzi pico/pico6 board pico is also known as Acer Chromebook Spin 311. Signed-off-by: Hsin-Yi Wang Reviewed-by: AngeloGioacchino Del Regno [Angelo: Fixed blank lines at the end for pico.dts] Signed-off-by: AngeloGioacchino Del Regno commit c0860b688af7d5660d6ea0f7480cb1fc0f032ecb Author: Hsin-Yi Wang Date: Thu Oct 26 12:09:15 2023 -0700 dt-bindings: arm64: mediatek: Add mt8183-kukui-jacuzzi-pico Add pico (sku1) and pico6 (sku2). Signed-off-by: Hsin-Yi Wang Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 4f5d946ce43de73baed71589c057b9550e56bada Author: Hsin-Yi Wang Date: Thu Oct 26 12:09:14 2023 -0700 arm64: dts: mt8183: Add jacuzzi makomo board makomo is also known as Lenovo 100e Chromebook 2nd Gen MTK 2. Signed-off-by: Hsin-Yi Wang Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit d056270bdb70beae8aa70e71a06ffddbf5cf0d47 Author: Hsin-Yi Wang Date: Thu Oct 26 12:09:13 2023 -0700 dt-bindings: arm64: mediatek: Add mt8183-kukui-jacuzzi-makomo Add makomo sku0 and sku1 which uses different audio codec. Signed-off-by: Hsin-Yi Wang Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Signed-off-by: AngeloGioacchino Del Regno commit 91e7286b5d82fba1803c1d9d7a7bf91a193a347e Author: Hsin-Yi Wang Date: Thu Oct 26 12:09:12 2023 -0700 arm64: dts: mt8183: Add kukui katsu board katsu is also known as ASUS Chromebook Detachable CZ1. Let katsu and kakadu set its own touchscreen and panel compatible. Remove these setting from the common dtsi for readability. Signed-off-by: Hsin-Yi Wang Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit fddb94ff7a5765368131aaf5c8b2dfb28f8e84b1 Author: Hsin-Yi Wang Date: Thu Oct 26 12:09:11 2023 -0700 dt-bindings: arm64: mediatek: Add mt8183-kukui-katsu Add katsu sku32 and sku38 which uses different audio codec. Signed-off-by: Hsin-Yi Wang Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring Signed-off-by: AngeloGioacchino Del Regno commit b924b73835c17206c419a64706346b9f71aaf007 Author: AngeloGioacchino Del Regno Date: Wed Oct 25 11:38:12 2023 +0200 arm64: dts: mediatek: Move MT6358 PMIC interrupts to MT8183 boards MT6358 is a PMIC that is typically used on MT8183 boards, and it has its own dtsi file, declaring interrupts-extended on its node. The interrupt pin of that PMIC is connected to a SoC GPIO and that is therefore not only SoC-specific, but board-specific: this means that the interrupt-extended property does not belong to the PMIC dtsi file, but to board files using that PMIC. For correctness, transfer the interrupts-extended property from the PMIC-specific mt6358.dtsi to board files. Signed-off-by: AngeloGioacchino Del Regno commit de7e42e9949885c18e0a192119fa4a93422de18e Author: AngeloGioacchino Del Regno Date: Wed Oct 25 11:38:11 2023 +0200 arm64: dts: mediatek: Use interrupts-extended where possible As already done for MT8173 and MT8183 devicetrees, change all instances of interrupt-parent + interrupts to one line as interrupts-extended where possible across all remaining device trees to both simplify and reduce code size. Signed-off-by: AngeloGioacchino Del Regno commit 355f0a4c6965847834fed6cff49026cb6506a0b3 Author: AngeloGioacchino Del Regno Date: Wed Oct 25 11:38:10 2023 +0200 arm64: dts: mediatek: mt8173: Use interrupts-extended where possible Change all instances of interrupt-parent + interrupts to one line as interrupts-extended where possible across all MT8173 DTs to both simplify and reduce code size. Signed-off-by: AngeloGioacchino Del Regno commit d0ad611c855008ace797aaabfe11094997fea342 Author: AngeloGioacchino Del Regno Date: Wed Oct 25 11:38:09 2023 +0200 arm64: dts: mediatek: mt8183: Use interrupts-extended where possible Change all instances of interrupt-parent + interrupts to one line as interrupts-extended where possible across all MT8183 DTs to both simplify and reduce code size. Signed-off-by: AngeloGioacchino Del Regno commit a37edd208ab38ab9234de62499f8d8e4daf6dcbd Author: Mark Tseng Date: Thu Nov 16 19:04:47 2023 +0800 dt-bindings: soc: mediatek: add mt8186 and mt8195 svs dt-bindings Support more SoC svs compatible in dt-bindings. 1. MT8186 2. MT8195 Signed-off-by: Mark Tseng Acked-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 26bcd8a53098f8cb8f6101a52aa79fabac3bfd9b Author: yu-chang.lee Date: Mon Nov 20 18:02:58 2023 +0800 dt-bindings: arm: mediatek: mmsys: Add VPPSYS compatible for MT8188 For MT8188, VPPSYS0 and VPPSYS1 are 2 display pipes with hardware differences in power domains, clocks and subsystem counts, which should be probed from mtk-mmsys driver to populate device by platform_device_register_data then start its own clock driver. Signed-off-by: yu-chang.lee Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit c7a728051f4e55cf8d9a4ac4f75662a328c34626 Author: Balsam CHIHI Date: Tue Oct 17 21:05:44 2023 +0200 arm64: dts: mediatek: mt8192: Add thermal nodes and thermal zones Add thermal nodes and thermal zones for the mt8192. The mt8192 SoC has several hotspots around the CPUs. Specify the targeted temperature threshold to apply the mitigation and define the associated cooling devices. Signed-off-by: Balsam CHIHI Reviewed-by: Nícolas F. R. A. Prado [bero@baylibre.com: cosmetic changes, reduce lvts_ap size] Signed-off-by: Bernhard Rosenkränzer Reviewed-by: Alexandre Mergnat Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno commit 89ce5a091bc589fefd23f24e7d7acba7ccd21501 Author: Yunfei Dong Date: Fri Jun 30 11:14:13 2023 -0400 arm64: dts: mediatek: mt8183: Add decoder Add node for the hardware decoder present on the MT8183 SoC. Signed-off-by: Yunfei Dong Signed-off-by: Qianqian Yan Signed-off-by: Frederic Chen Signed-off-by: Alexandre Courbot Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230630151436.155586-8-nfraprado@collabora.com commit cacb3fdaf13419555a2501d2ac8d0b10ef33a793 Author: Nícolas F. R. A. Prado Date: Fri Jun 30 11:14:12 2023 -0400 arm64: dts: mediatek: mt8173: Drop VDEC_SYS reg from decoder Remove the VDEC_SYS register space from the decoder, so that the node address becomes that of VDEC_MISC, solving the long-standing conflicting addresses between this node and the vdecsys clock-controller node: arch/arm64/boot/dts/mediatek/mt8173.dtsi:1365.38-1369.5: Warning (unique_unit_address_if_enabled): /soc/clock-controller@16000000: duplicate unit-address (also used in node /soc/vcodec@16000000) The driver makes use of this register space, however, so also add a phandle to the VDEC_SYS syscon to maintain functionality. Signed-off-by: Nícolas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230630151436.155586-7-nfraprado@collabora.com commit 729f30eac8bce6783f889cf8390ea869d03407e6 Author: AngeloGioacchino Del Regno Date: Mon Apr 24 13:25:20 2023 +0200 arm64: dts: mediatek: cherry: Add platform thermal configuration This platform has three auxiliary NTC thermistors, connected to the SoC's ADC pins. Enable the auxadc in order to be able to read the ADC values, add a generic-adc-thermal LUT for each and finally assign them to the SoC's thermal zones. Tested-by: Chen-Yu Tsai Reviewed-by: Chen-Yu Tsai Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20230424112523.1436926-2-angelogioacchino.delregno@collabora.com commit 682b43a049c898d060bb1bd7af4cac0d91b3594d Author: Ilpo Järvinen Date: Fri Dec 8 15:48:45 2023 +0200 platform/x86: ips: Remove unused debug code Remove unused debug code inside #if 0 ... #endif. Signed-off-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231208134845.3900-1-ilpo.jarvinen@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b06458d1b1cbb99635c7bb4f9a4f4c4cef2ed984 Author: Srinivas Pandruvada Date: Mon Dec 4 14:17:40 2023 -0800 platform/x86/intel-uncore-freq: Process read/write blocked feature status When a feature is read blocked, don't continue to read uncore information and register with uncore core. When the feature is write blocked, continue to offer read interface but block setting uncore limits. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231204221740.3645130-6-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 8bed9ff7dbcce4d1a436f7839be48c6fd5fac0ce Author: Srinivas Pandruvada Date: Mon Dec 4 14:17:39 2023 -0800 platform/x86: ISST: Process read/write blocked feature status When a feature is read blocked, don't continue to read SST information and register with SST core. When the feature is write blocked, continue to offer read interface for SST parameters, but don't allow any operation to change state. A state change results from SST level change, feature change or class of service change. Signed-off-by: Srinivas Pandruvada Reviewed-by: Hans de Goede Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231204221740.3645130-5-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 046d7be6210e7f870e53eb38fd410237e9d1d88f Author: Srinivas Pandruvada Date: Mon Dec 4 14:17:38 2023 -0800 platform/x86/intel/tpmi: Move TPMI ID definition Move TPMI ID definitions to common include file. In this way other feature drivers don't have to redefine. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231204221740.3645130-4-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 72dd14d241e1c6e241fc5b265746c59f306c6aa3 Author: Srinivas Pandruvada Date: Mon Dec 4 14:17:37 2023 -0800 platform/x86/intel/tpmi: Modify external interface to get read/write state Modify the external interface tpmi_get_feature_status() to get read and write blocked instead of locked and disabled. Since auxiliary device is not created when disabled, no use of returning disabled state. Also locked state is not useful as feature driver can't use locked state in a meaningful way. Using read and write state, feature driver can decide which operations to restrict for that feature. Signed-off-by: Srinivas Pandruvada Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231204221740.3645130-3-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit b87434f2e6fe81362d2ac57f3aba45ba89a11399 Author: Srinivas Pandruvada Date: Mon Dec 4 14:17:36 2023 -0800 platform/x86/intel/tpmi: Don't create devices for disabled features If some TPMI features are disabled, don't create auxiliary devices. In this way feature drivers will not load. While creating auxiliary devices, call tpmi_read_feature_status() to check feature state and return if the feature is disabled without creating a device. Signed-off-by: Srinivas Pandruvada Reviewed-by: Hans de Goede Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231204221740.3645130-2-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 7973be94724464222ae0b1860a25be04ab7b0132 Author: Andy Shevchenko Date: Fri Dec 8 18:52:38 2023 +0200 clk: x86: lpss-atom: Drop unneeded 'extern' in the header 'extern' for the functions is not needed, drop it. Signed-off-by: Andy Shevchenko Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231208165238.3309058-1-andriy.shevchenko@linux.intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3df692169e8486fc3dd91fcd5ea81c27a0bac033 Author: Uwe Kleine-König Date: Mon Dec 4 22:52:12 2023 +0100 platform/x86: hp-wmi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/a6b074b7ee37f3682da4b3f39ea40af97add64c2.1701726190.git.u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit f2a2d85a9374b771474aeefe4b27cc725f0cfcb0 Author: Uwe Kleine-König Date: Mon Dec 4 22:52:11 2023 +0100 platform/x86: asus-wmi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/639b9ffc18422fe59125893bd7909e8a73cffb72.1701726190.git.u.kleine-koenig@pengutronix.de Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 18c5c0a845b3fd834e6a3f5d7f2cbf336e23e918 Author: Fei Qin Date: Fri Dec 8 08:03:01 2023 +0200 nfp: support UDP segmentation offload The device supports UDP hardware segmentation offload, which helps improving the performance. Thus, this patch adds support for UDP segmentation offload from the driver side. Signed-off-by: Fei Qin Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit 23b392b94acb0499f69706c5808c099f590ebcf4 Author: Jani Nikula Date: Tue Dec 5 20:05:51 2023 +0200 drm/i915/edp: don't write to DP_LINK_BW_SET when using rate select The eDP 1.5 spec adds a clarification for eDP 1.4x: > For eDP v1.4x, if the Source device chooses the Main-Link rate by way > of DPCD 00100h, the Sink device shall ignore DPCD 00115h[2:0]. We write 0 to DP_LINK_BW_SET (DPCD 100h) even when using DP_LINK_RATE_SET (DPCD 114h). Stop doing that, as it can cause the panel to ignore the rate set method. Moreover, 0 is a reserved value for DP_LINK_BW_SET, and should not be used. v2: Improve the comments (Ville) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9081 Tested-by: Animesh Manna Reviewed-by: Uma Shankar Cc: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231205180551.2476228-1-jani.nikula@intel.com commit f789383fa34a266d0c1a76f272043a15a8edf733 Author: Borislav Petkov (AMD) Date: Thu Nov 30 16:39:33 2023 +0100 x86/ia32: State that IA32 emulation is disabled Issue a short message once, on the first try to load a 32-bit process to save people time when wondering why it won't load and trying to execute it, would say: -bash: ./strsep32: cannot execute binary file: Exec format error Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: https://lore.kernel.org/r/20231130155213.1407-1-bp@alien8.de commit 9e52d5c808215b0033cdbeca72700b1e401ea987 Author: Elmar Albert Date: Sat Dec 9 07:37:00 2023 +0100 drm/panel: simple: Add AUO G156HAN04.0 LVDS display support G156HAN04.0 is a Color Active Matrix Liquid Crystal Display composed of a TFT LCD panel, a driver circuit, and LED backlight system. The screen format is intended to support the 16:9 FHD, 1920(H) x 1080(V) screen and 16.7M colors (RGB 8-bits) with LED backlight driving circuit. All input signals are LVDS interface compatible. G156HAN04.0 is designed for a display unit of notebook style personal computer and industrial machine. Signed-off-by: Elmar Albert Signed-off-by: Marek Vasut Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20231209063714.1381913-2-marex@denx.de Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231209063714.1381913-2-marex@denx.de commit bf7f730dea3125b2272ad7268f59e8992c5b7822 Author: Elmar Albert Date: Sat Dec 9 07:36:59 2023 +0100 dt-bindings: display: simple: Add AUO G156HAN04.0 LVDS display Document support for the AUO G156HAN04.0 LVDS display. G156HAN04.0 is a Color Active Matrix Liquid Crystal Display composed of a TFT LCD panel, a driver circuit, and LED backlight system. The screen format is intended to support the 16:9 FHD, 1920(H) x 1080(V) screen and 16.7M colors (RGB 8-bits) with LED backlight driving circuit. All input signals are LVDS interface compatible. G156HAN04.0 is designed for a display unit of notebook style personal computer and industrial machine. Acked-by: Krzysztof Kozlowski Signed-off-by: Elmar Albert Signed-off-by: Marek Vasut Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20231209063714.1381913-1-marex@denx.de Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231209063714.1381913-1-marex@denx.de commit b1fcb7ee3707290466b2cc4956325fb91f09f13b Author: Michael Trimarchi Date: Thu Dec 7 15:16:38 2023 +0100 drm/panel: ilitek-ili9805: add support for Tianma TM041XDHG01 panel Tianma TM041XDHG01 utilizes the Ilitek ILI9805 controller. Add this panel's initialzation sequence and timing to ILI9805 driver. Signed-off-by: Michael Trimarchi Reviewed-by: Neil Armstrong Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20231207141723.108004-10-dario.binacchi@amarulasolutions.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231207141723.108004-10-dario.binacchi@amarulasolutions.com commit edbf1d506ebe8c0857c406bd5d5b81d46ffd8437 Author: Michael Trimarchi Date: Thu Dec 7 15:16:37 2023 +0100 drm/panel: Add Ilitek ILI9805 panel driver The GPM1790A0 panel is based on the Ilitek ILI9805 Controller. Add a driver for it. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231207141723.108004-9-dario.binacchi@amarulasolutions.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231207141723.108004-9-dario.binacchi@amarulasolutions.com commit 549240c98e50207244bc1ac182622b8daba89a89 Author: Michael Trimarchi Date: Thu Dec 7 15:16:36 2023 +0100 dt-bindings: display: panel: Add Ilitek ili9805 panel controller Add documentation for "ilitek,ili9805" panel. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231207141723.108004-8-dario.binacchi@amarulasolutions.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231207141723.108004-8-dario.binacchi@amarulasolutions.com commit 2e87bad7cd339882cf26b7101a1c87dab71962c9 Author: Michael Trimarchi Date: Thu Dec 7 15:16:35 2023 +0100 drm/panel: Add Synaptics R63353 panel driver The LS068B3SX02 panel is based on the Synaptics R63353 Controller. Add a driver for it. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231207141723.108004-7-dario.binacchi@amarulasolutions.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231207141723.108004-7-dario.binacchi@amarulasolutions.com commit a7890252c1a314654862944cf4733e4333b76e25 Author: Chris Morgan Date: Fri Dec 8 09:48:47 2023 -0600 drm/panel: st7701: Add Anbernic RG-ARC Panel Support The Powkiddy RG-ARC is a series of 2 handheld devices, each with a 4 inch 480x640 display. Add support for the display. Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231208154847.130615-4-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231208154847.130615-4-macroalpha82@gmail.com commit acbf9184a87d5d6868809baa3a6c7d0537d1f321 Author: Chris Morgan Date: Fri Dec 8 09:48:46 2023 -0600 dt-bindings: display: st7701: Add Anbernic RG-ARC panel The RG-ARC panel is a panel specific to the Anbernic RG-ARC. It is 4 inches in size (diagonally) with a resolution of 480x640. Signed-off-by: Chris Morgan Reviewed-by: Linus Walleij Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231208154847.130615-3-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231208154847.130615-3-macroalpha82@gmail.com commit 799825aa87200ade1ba21db853d1c2ff720dcfe0 Author: Chris Morgan Date: Fri Dec 8 09:48:45 2023 -0600 drm/panel: st7701: Fix AVCL calculation The AVCL register, according to the datasheet, comes in increments of -0.2v between -4.4v (represented by 0x0) to -5.0v (represented by 0x3). The current calculation is done by adding the defined AVCL value in mV to -4400 and then dividing by 200 to get the register value. Unfortunately if I subtract -4400 from -4400 I get -8800, which divided by 200 gives me -44. If I instead subtract -4400 from -4400 I get 0, which divided by 200 gives me 0. Based on the datasheet this is the expected register value. Fixes: 83b7a8e7e88e ("drm/panel/panel-sitronix-st7701: Parametrize voltage and timing") Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231208154847.130615-2-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231208154847.130615-2-macroalpha82@gmail.com commit 267624378ed6bebd733b4917452d78780db032dc Author: John Watts Date: Sun Dec 10 17:55:55 2023 +1100 dt-bindings: display: panel: add Fascontek FS035VG158 panel This is a small 3.5" 640x480 IPS LCD panel. Signed-off-by: John Watts Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-7-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-7-d75adc75571f@jookia.org commit 8fcb387a210cfc30a3b61abae21d5c8c4a55e470 Author: John Watts Date: Sun Dec 10 17:55:54 2023 +1100 dt-bindings: vendor-prefixes: Add fascontek Fascontek manufactures LCD panels such as the FS035VG158. Signed-off-by: John Watts Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-6-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-6-d75adc75571f@jookia.org commit 43cc1ce456b57ad48220393bbb7fac6e32369233 Author: John Watts Date: Sun Dec 10 17:55:53 2023 +1100 dt-bindings: display: panel: Clean up leadtek,ltk035c5444t properties Remove common properties listed in common yaml files. Add required properties needed to describe the panel. Signed-off-by: John Watts Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-5-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-5-d75adc75571f@jookia.org commit bf92f9163097dc717518d598116c1e385004b5ce Author: John Watts Date: Sun Dec 10 17:55:52 2023 +1100 drm/panel: nv3052c: Add Fascontek FS035VG158 LCD display This display is extremely similar to the LTK035C5444T, but still has some minor variations in panel initialization. Signed-off-by: John Watts Reviewed-by: Jessica Zhang Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-4-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-4-d75adc75571f@jookia.org commit 2e6b7be84d88c0af927967418a56e22d372ce98c Author: John Watts Date: Sun Dec 10 17:55:51 2023 +1100 drm/panel: nv3052c: Allow specifying registers per panel Panel initialization registers are per-display and not tied to the controller itself. Different panels will specify their own registers. Attach the sequences to the panel info struct so future panels can specify their own sequences. Signed-off-by: John Watts Reviewed-by: Jessica Zhang Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-3-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-3-d75adc75571f@jookia.org commit 095e3a99e793767ca6c0483d31fb5d4087966d51 Author: John Watts Date: Sun Dec 10 17:55:50 2023 +1100 drm/panel: nv3052c: Add SPI device IDs SPI drivers needs their own list of compatible device IDs in order for automatic module loading to work. Add those for this driver. Signed-off-by: John Watts Reviewed-by: Jessica Zhang Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-2-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-2-d75adc75571f@jookia.org commit f48dee9ed7c992eaf6a3635db304a61ed82827b3 Author: John Watts Date: Sun Dec 10 17:55:49 2023 +1100 drm/panel: nv3052c: Document known register names Many of these registers have a known name in the public datasheet. Document them as comments for reference. Signed-off-by: John Watts Reviewed-by: Jessica Zhang Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231210-fs035vg158-v5-1-d75adc75571f@jookia.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231210-fs035vg158-v5-1-d75adc75571f@jookia.org commit 5169477081a1ed08924949e4893732de92ad7d25 Author: Colin Ian King Date: Sat Dec 9 23:05:41 2023 +0000 drm/i915/selftests: Fix spelling mistake "initialiased" -> "initialised" There is a spelling mistake in a pr_err error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231209230541.4055786-1-colin.i.king@gmail.com commit e045e18dbf3eaac32cdeb2799a5ec84fa694636c Merge: ae5af710f369a a39b6ac3781d4 Author: Greg Kroah-Hartman Date: Mon Dec 11 09:10:42 2023 +0100 Merge 6.7-rc5 into tty-next We need the serial fixes in here as well to build off of. Signed-off-by: Greg Kroah-Hartman commit 51920207674e9e3475a91d2091583889792df99a Author: Randy Dunlap Date: Wed Dec 6 10:13:35 2023 -0800 usb: fotg210-udc: fix function kernel-doc comments Correct kernel-doc comments to prevent warnings from scripts/kernel-doc. fotg210-udc.c:1103: warning: Function parameter or member 'g' not described in 'fotg210_vbus_session' fotg210-udc.c:1103: warning: Excess function parameter '_gadget' description in 'fotg210_vbus_session' fotg210-udc.c:1103: warning: No description found for return value of 'fotg210_vbus_session' fotg210-udc.c:1129: warning: No description found for return value of 'fotg210_phy_event' Signed-off-by: Randy Dunlap Cc: Linus Walleij Cc: Greg Kroah-Hartman Cc: Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231206181335.27540-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 5cc623a4edaf383eea39546104084b089f3035ca Author: Randy Dunlap Date: Wed Dec 6 10:13:17 2023 -0800 usb: cdns3: starfive: don't misuse /** comment Use a common C comment "/*" instead of "/**" to prevent a warning from scripts/kernel-doc. cdns3-starfive.c:23: warning: expecting prototype for cdns3(). Prototype was for USB_STRAP_HOST() instead Signed-off-by: Randy Dunlap Cc: Minda Chen Cc: Peter Chen Cc: Pawel Laszczak Cc: Roger Quadros Cc: Greg Kroah-Hartman Cc: Acked-by: Peter Chen Link: https://lore.kernel.org/r/20231206181317.27515-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 07f830ae4913d0b986c8c0ff88a7d597948b9bd8 Author: Selvin Xavier Date: Thu Dec 7 02:47:40 2023 -0800 RDMA/bnxt_re: Adds MSN table capability for Gen P7 adapters GenP7 HW expects an MSN table instead of PSN table. Check for the HW retransmission capability and populate the MSN table if HW retansmission is supported. Signed-off-by: Damodharam Ammepalli Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1701946060-13931-7-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit cdae3936b2fe7f943e8b5b46f3b3d8446aeb2e0c Author: Selvin Xavier Date: Thu Dec 7 02:47:39 2023 -0800 RDMA/bnxt_re: Doorbell changes Update the Doorbell routines to support the latest HW definitions. Use common routine to prepare the Doorbell key. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1701946060-13931-6-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 6027c20dad1ad1da45877151d8b75dc51a928ccd Author: Selvin Xavier Date: Thu Dec 7 02:47:38 2023 -0800 RDMA/bnxt_re: Get the toggle bits from CQ completions Get the toggle bits from CQ completions. For older adapters these values are 0. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1701946060-13931-5-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 880a5dd1880a296575e92dec9816a7f35a7011d1 Author: Selvin Xavier Date: Thu Dec 7 02:47:37 2023 -0800 RDMA/bnxt_re: Update the HW interface definitions Adds HW interface definitions to support the new chip revision. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1701946060-13931-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit a62d685814416647fbb28b3eb2617744adef2d4f Author: Selvin Xavier Date: Thu Dec 7 02:47:36 2023 -0800 RDMA/bnxt_re: Update the BAR offsets Update the BAR offsets for handling GenP7 adapters. Use the values populated by L2 driver for getting the Doorbell offsets. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1701946060-13931-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 1801d87b3598b173bce3fbf15c5517796f38db96 Author: Selvin Xavier Date: Thu Dec 7 02:47:35 2023 -0800 RDMA/bnxt_re: Support new 5760X P7 devices Add basic support for 5760X P7 devices. Add new chip revisions. The first version support is similar to the existing P5 adapters. Extend the current support for P5 adapters to P7 also. Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1701946060-13931-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 112345a4046838d97a2bd030a98297ff7e2c9f2d Merge: 522c35e08b53f a39b6ac3781d4 Author: Greg Kroah-Hartman Date: Mon Dec 11 08:44:28 2023 +0100 Merge 6.7-rc5 into usb-next We need the USB fixes in here as well to build off of. Signed-off-by: Greg Kroah-Hartman commit 40af852a7ca59d23ab4afd02af2623121da2f116 Merge: 57de428eaca2b e4f027756dff6 Author: Krzysztof Kozlowski Date: Mon Dec 11 08:41:24 2023 +0100 Merge branch 'for-v6.8/samsung-bindings-compatibles' into next/dt64 commit 57de428eaca2b9af1a35df96c7adcad4b5ea79f9 Author: Jaewon Kim Date: Fri Dec 8 16:45:25 2023 +0900 arm64: dts: exynos: add minimal support for exynosautov920 sadk board ExynosAutov920 SADK is ExynosAutov920 SoC based SADK(Samsung Automotive Development Kit) board. It has 16GB(8GB + 8GB) LPDDR5 RAM and 256GB (128GB + 128GB) UFS. This is minimal support board device-tree. * Serial console * GPIO Key * PWM FAN Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231208074527.50840-3-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit c96dab1993d247b7b05ba2fdef8f185cbbd5454e Author: Jaewon Kim Date: Fri Dec 8 16:45:24 2023 +0900 arm64: dts: exynos: add initial support for exynosautov920 SoC Samsung ExynosAutov920 is ARMv8-based automotive-oriented SoC. It has AE(Automotive Enhanced) IPs for safety. * Cortex-A78AE 10-cores * GIC-600AE This is minimal support for ExynosAutov920 SoC. * Enumerate all pinctrl nodes * Enable Chip-Id * Serial0 for console * PWM Since the clock driver is not yet implemented, it is supported as fixed-clock. Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231208074527.50840-2-jaewon02.kim@samsung.com [krzysztof: Re-order nodes to match coding style: UFS reset pins, gpg/gpp in peric0 and peric1, all nodes in the soc@0; drop fallback compatibles from wakeup-interrupt-controller] Signed-off-by: Krzysztof Kozlowski commit 0e42b5fee8a8c5bc173f702b0745da6d9329c714 Merge: 386a766c41690 a39b6ac3781d4 Author: Greg Kroah-Hartman Date: Mon Dec 11 08:39:35 2023 +0100 Merge 6.7-rc5 into char-misc-next We need the char/misc fixes in here as well for testing and to build off of. Signed-off-by: Greg Kroah-Hartman commit e1564d6f93496bcea3a6b2110eb54cc08f2aca72 Author: Krzysztof Kozlowski Date: Sun Dec 10 14:39:15 2023 +0100 dt-bindings: pinctrl: samsung: correct ExynosAutov920 wake-up compatibles ExynosAutov920 SoC wake-up pin controller has different register layout than Exynos7, thus it should not be marked as compatible. Neither DTS nor Linux driver was merged yet, so the change does not impact ABI. Cc: Jaewon Kim Fixes: 904140fa4553 ("dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers") Link: https://lore.kernel.org/r/20231210133915.42112-1-krzysztof.kozlowski@linaro.org Reviewed-by: Jaewon Kim Signed-off-by: Krzysztof Kozlowski commit e4f027756dff6a4e2abc640f276f91219559a3c9 Author: Krzysztof Kozlowski Date: Sun Dec 10 14:48:34 2023 +0100 dt-bindings: samsung: exynos-sysreg: combine exynosautov920 with other enum No need to create a new enum every time we bring-up new SoC. Reviewed-by: Sam Protsenko Reviewed-by: Jaewon Kim Link: https://lore.kernel.org/r/20231210134834.43943-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4a8ececbb50f0dd9395ffc4188ae780916df4a9c Author: Rob Herring Date: Wed Nov 22 16:50:50 2023 -0700 dt-bindings: dma: Drop undocumented examples The compatibles "ti,omap-sdma" and "ti,dra7-dma-crossbar" aren't documented by a schema which causes warnings: Documentation/devicetree/bindings/dma/dma-controller.example.dtb: /example-0/dma-controller@48000000: failed to match any schema with compatible: ['ti,omap-sdma'] Documentation/devicetree/bindings/dma/dma-router.example.dtb: /example-0/dma-router@4a002b78: failed to match any schema with compatible: ['ti,dra7-dma-crossbar'] As no one has cared to fix them, just drop them. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231122235050.2966280-1-robh@kernel.org Signed-off-by: Vinod Koul commit e52ec6a2db2e01e6a8cdfbe4fee1f89f57cdf723 Author: Kuan-Ying Lee Date: Mon Nov 27 15:04:03 2023 +0800 scripts/gdb: remove exception handling and refine print format 1. When we crash on a page, we want to check what happened on this page instead of skipping this page by try-except block. Thus, removing the try-except block. 2. Remove redundant comma and print the task name properly. Link: https://lkml.kernel.org/r/20231127070404.4192-4-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Cc: Andrey Konovalov Cc: AngeloGioacchino Del Regno Cc: Chinwen Chang Cc: Matthias Brugger Cc: Oleg Nesterov Cc: Qun-Wei Lin Signed-off-by: Andrew Morton commit 125e9987a2d9016f78d0a020cec7d55fd0f29501 Author: Kuan-Ying Lee Date: Wed Nov 29 14:51:39 2023 +0800 scripts/gdb/stackdepot: rename pool_index to pools_num After stackdepot evicting support patchset[1], we rename pool_index to pools_num. To avoid from the below issue, we rename consistently in gdb scripts. Python Exception : No symbol "pool_index" in current context. Error occurred in Python: No symbol "pool_index" in current context. [1] https://lore.kernel.org/linux-mm/cover.1700502145.git.andreyknvl@google.com/ Link: https://lkml.kernel.org/r/20231129065142.13375-3-Kuan-Ying.Lee@mediatek.com Signed-off-by: Kuan-Ying Lee Reviewed-by: Florian Fainelli Cc: Andrey Konovalov Cc: AngeloGioacchino Del Regno Cc: Chinwen Chang Cc: Matthias Brugger Cc: Oleg Nesterov Cc: Qun-Wei Lin Signed-off-by: Andrew Morton commit b4f19e3bce903712e347ce7f88d0c4f6e43277f9 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:36 2023 +0900 nilfs2: convert nilfs_page_bug() to nilfs_folio_bug() All callers have a folio now, so convert it. Link: https://lkml.kernel.org/r/20231127143036.2425-18-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 9bff5f980eb78b04627d6d8f69869d9fb8aa6ff7 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:35 2023 +0900 nilfs2: convert nilfs_prepare_chunk() and nilfs_commit_chunk() to folios All callers now have a folio, so convert these two functions. Saves one call to compound_head() in unlock_page(). [konishi.ryusuke: resolved conflicts in nilfs_{set_link,delete_entry}] Link: https://lkml.kernel.org/r/20231127143036.2425-17-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 0743230fff17f729a56c35869e20a5f090a8fdc2 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:34 2023 +0900 nilfs2: convert nilfs_make_empty() to use a folio Remove two calls to compound_head() and switch from kmap_atomic to kmap_local. Link: https://lkml.kernel.org/r/20231127143036.2425-16-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 18f03ddf4db8cecfc6337d7a6775545fdbdc1713 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:33 2023 +0900 nilfs2: convert nilfs_empty_dir() to use a folio Remove three calls to compound_head() by using the folio API. Link: https://lkml.kernel.org/r/20231127143036.2425-15-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit f59bb60f7d56a0f93570dfb6d221b62495c63ead Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:32 2023 +0900 nilfs2: convert nilfs_add_link() to use a folio Remove six calls to compound_head() by using the folio API. Link: https://lkml.kernel.org/r/20231127143036.2425-14-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 6f133c97e5ced9a2adc983683684a06df27bb2c2 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:31 2023 +0900 nilfs2: convert nilfs_rename() to use folios This involves converting nilfs_find_entry(), nilfs_dotdot(), nilfs_set_link(), nilfs_delete_entry() and nilfs_do_unlink() to use folios as well. [konishi.ryusuke: followed the change of page release helper call sites] Link: https://lkml.kernel.org/r/20231127143036.2425-13-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit a4bf041e44d571837d8c1d2da890aa0b65f76639 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:30 2023 +0900 nilfs2: convert nilfs_find_entry to use a folio Use the new folio APIs to remove calls to compound_head(). [konishi.ryusuke: resolved a conflict due to style warning correction] Link: https://lkml.kernel.org/r/20231127143036.2425-12-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit b37b2bec46bf11bbf20b3de22a45260292325cee Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:29 2023 +0900 nilfs2: convert nilfs_readdir to use a folio Use the new folio APIs to remove calls to compound_head(). Link: https://lkml.kernel.org/r/20231127143036.2425-11-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 75ad5db662b24584bc640d043802bc194dab9014 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:28 2023 +0900 nilfs2: add nilfs_get_folio() Convert nilfs_get_page() to be a wrapper. Also convert nilfs_check_page() to nilfs_check_folio(). Link: https://lkml.kernel.org/r/20231127143036.2425-10-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 9b77f66f992733069543638afe591f94e1d30291 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:27 2023 +0900 nilfs2: switch to kmap_local for directory handling Match ext2 by using kmap_local() instead of kmap(). This is more efficient. Also use unmap_and_put_page() instead of duplicating it as a nilfs function. [konishi.ryusuke: followed the change of page release helper call sites] Link: https://lkml.kernel.org/r/20231127143036.2425-9-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit a8e610353bf94c279d0ca6d3711aa84728d80a46 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:26 2023 +0900 nilfs2: pass the mapped address to nilfs_check_page() Remove another use of page_address() as part of preparing for the kmap to kmap_local transition. Link: https://lkml.kernel.org/r/20231127143036.2425-8-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 09a46acb3697e50548bb265afa1d79163659dd85 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:25 2023 +0900 nilfs2: return the mapped address from nilfs_get_page() In prepartion for switching from kmap() to kmap_local(), return the kmap address from nilfs_get_page() instead of having the caller look up page_address(). [konishi.ryusuke: fixed a missing blank line after declaration] Link: https://lkml.kernel.org/r/20231127143036.2425-7-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 6af2191f8358fa89061df70bf68a1fd616e49a06 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:24 2023 +0900 nilfs2: remove page_address() from nilfs_delete_entry In preparation for removing kmap from directory handling, mask the directory entry pointer to discover the start address of the page. Matches ext2. Link: https://lkml.kernel.org/r/20231127143036.2425-6-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 2197f5aed404216ec8035bcf726ad808418fd691 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:23 2023 +0900 nilfs2: remove page_address() from nilfs_add_link In preparation for removing kmap from directory handling, use offset_in_page() to calculate 'from'. Matches ext2. Link: https://lkml.kernel.org/r/20231127143036.2425-5-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 6bb09fa1b44f8634e7091d6186bcba80edebfce7 Author: Matthew Wilcox (Oracle) Date: Mon Nov 27 23:30:22 2023 +0900 nilfs2: remove page_address() from nilfs_set_link In preparation for removing kmap from directory handling, use offset_in_page() to calculate 'from'. Matches ext2. Link: https://lkml.kernel.org/r/20231127143036.2425-4-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 8cf57c6df818f58fdad16a909506be213623a88e Author: Ryusuke Konishi Date: Mon Nov 27 23:30:21 2023 +0900 nilfs2: eliminate staggered calls to kunmap in nilfs_rename In nilfs_rename(), calls to nilfs_put_page() to release pages obtained with nilfs_find_entry() or nilfs_dotdot() are alternated in the normal path. When replacing the kernel memory mapping method from kmap to kmap_local_{page,folio}, this violates the constraint on the calling order of kunmap_local(). Swap the order of nilfs_put_page calls where the kmap sections of multiple pages overlap so that they are nested, allowing direct replacement of nilfs_put_page() -> unmap_and_put_page(). Without this reordering, that replacement will cause a kernel WARNING in kunmap_local_indexed() on architectures with high memory mapping. Link: https://lkml.kernel.org/r/20231127143036.2425-3-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 584db20c181f5e28c0386d7987406ace7fbd3e49 Author: Ryusuke Konishi Date: Mon Nov 27 23:30:20 2023 +0900 nilfs2: move page release outside of nilfs_delete_entry and nilfs_set_link Patch series "nilfs2: Folio conversions for directory paths". This series applies page->folio conversions to nilfs2 directory operations. This reduces hidden compound_head() calls and also converts deprecated kmap calls to kmap_local in the directory code. Although nilfs2 does not yet support large folios, Matthew has done his best here to include support for large folios, which will be needed for devices with large block sizes. This series corresponds to the second half of the original post [1], but with two complementary patches inserted at the beginning and some adjustments, to prevent a kmap_local constraint violation found during testing with highmem mapping. [1] https://lkml.kernel.org/r/20231106173903.1734114-1-willy@infradead.org I have reviewed all changes and tested this for regular and small block sizes, both on machines with and without highmem mapping. No issues found. This patch (of 17): In a few directory operations, the call to nilfs_put_page() for a page obtained using nilfs_find_entry() or nilfs_dotdot() is hidden in nilfs_set_link() and nilfs_delete_entry(), making it difficult to track page release and preventing change of its call position. By moving nilfs_put_page() out of these functions, this makes the page get/put correspondence clearer and makes it easier to swap nilfs_put_page() calls (and kunmap calls within them) when modifying multiple directory entries simultaneously in nilfs_rename(). Also, update comments for nilfs_set_link() and nilfs_delete_entry() to reflect changes in their behavior. To make nilfs_put_page() visible from namei.c, this moves its definition to nilfs.h and replaces existing equivalents to use it, but the exposure of that definition is temporary and will be removed on a later kmap -> kmap_local conversion. Link: https://lkml.kernel.org/r/20231127143036.2425-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20231127143036.2425-2-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 9d02330abd3ecdacc43fc6b16a5668e7e94b7562 Author: Li Zhe Date: Thu Nov 23 16:40:22 2023 +0800 softlockup: serialized softlockup's log If multiple CPUs trigger softlockup at the same time with 'softlockup_all_cpu_backtrace=0', the softlockup's logs will appear staggeredly in dmesg, which will affect the viewing of the logs for developer. Since the code path for outputting softlockup logs is not a kernel hotspot and the performance requirements for the code are not strict, locks are used to serialize the softlockup log output to improve the readability of the logs. Link: https://lkml.kernel.org/r/20231123084022.10302-1-lizhe.67@bytedance.com Signed-off-by: Li Zhe Reviewed-by: Petr Mladek Reviewed-by: Douglas Anderson Cc: Lecopzer Chen Cc: Pingfan Liu Cc: Zefan Li Cc: John Ogness Signed-off-by: Andrew Morton commit b3ba234171cd0d58df0a13c262210ff8b5fd2830 Author: Baoquan He Date: Tue Nov 14 17:16:58 2023 +0800 kexec_file: load kernel at top of system RAM if required Patch series "kexec_file: Load kernel at top of system RAM if required". Justification: ============== Kexec_load interface has been doing top down searching and loading kernel/initrd/purgtory etc to prepare for kexec reboot. In that way, the benefits are that it avoids to consume and fragment limited low memory which satisfy DMA buffer allocation and big chunk of continuous memory during system init; and avoids to stir with BIOS/FW reserved or occupied areas, or corner case handling/work around/quirk occupied areas when doing system init. By the way, the top-down searching and loading of kexec-ed kernel is done in user space utility code. For kexec_file loading, even if kexec_buf.top_down is 'true', it's simply ignored. It calls walk_system_ram_res() directly to go through all resources of System RAM bottom up, to find an available memory region, then call locate_mem_hole_callback() to allocate memory in that found memory region from top to down. This is not expected and inconsistent with kexec_load. Implementation =============== In patch 1, introduce a new function walk_system_ram_res_rev() which is a variant of walk_system_ram_res(), it walks through a list of all the resources of System RAM in reversed order, i.e., from higher to lower. In patch 2, check if kexec_buf.top_down is 'true' in kexec_walk_resources(), if yes, call walk_system_ram_res_rev() to find memory region of system RAM from top to down to load kernel/initrd etc. Background information: ======================= And I ever tried this in the past in a different way, please see below link. In the post, I tried to adjust struct sibling linking code, replace the the singly linked list with list_head so that walk_system_ram_res_rev() can be implemented in a much easier way. Finally I failed. https://lore.kernel.org/all/20180718024944.577-4-bhe@redhat.com/ This time, I picked up the patch from AKASHI Takahiro's old post and made some change to take as the current patch 1: https://lists.infradead.org/pipermail/linux-arm-kernel/2017-September/531456.html This patch (of 2): Kexec_load interface has been doing top down searching and loading kernel/initrd/purgtory etc to prepare for kexec reboot. In that way, the benefits are that it avoids to consume and fragment limited low memory which satisfy DMA buffer allocation and big chunk of continuous memory during system init; and avoids to stir with BIOS/FW reserved or occupied areas, or corner case handling/work around/quirk occupied areas when doing system init. By the way, the top-down searching and loading of kexec-ed kernel is done in user space utility code. For kexec_file loading, even if kexec_buf.top_down is 'true', it's simply ignored. It calls walk_system_ram_res() directly to go through all resources of System RAM bottom up, to find an available memory region, then call locate_mem_hole_callback() to allocate memory in that found memory region from top to down. This is not expected and inconsistent with kexec_load. Here check if kexec_buf.top_down is 'true' in kexec_walk_resources(), if yes, call the newly added walk_system_ram_res_rev() to find memory region of system RAM from top to down to load kernel/initrd etc. Link: https://lkml.kernel.org/r/20231114091658.228030-1-bhe@redhat.com Link: https://lkml.kernel.org/r/20231114091658.228030-3-bhe@redhat.com Signed-off-by: Baoquan He Cc: AKASHI Takahiro Cc: Baoquan He Cc: Eric Biederman Signed-off-by: Andrew Morton commit 7acf164b259d9007264d9d8501da1023f140a3b4 Author: Baoquan He Date: Wed Nov 15 21:00:27 2023 +0800 resource: add walk_system_ram_res_rev() This function, being a variant of walk_system_ram_res() introduced in commit 8c86e70acead ("resource: provide new functions to walk through resources"), walks through a list of all the resources of System RAM in reversed order, i.e., from higher to lower. It will be used in kexec_file code to load kernel, initrd etc when preparing kexec reboot. Link: https://lkml.kernel.org/r/ZVTA6z/06cLnWKUz@MiWiFi-R3L-srv Signed-off-by: AKASHI Takahiro Signed-off-by: Baoquan He Cc: Eric Biederman Signed-off-by: Andrew Morton commit bfc4372b86085ec947fdcef20cbe40c55066394f Author: Stephen Rothwell Date: Mon Nov 27 13:08:57 2023 +1100 powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE This is required for the later patch "Makefile.extrawarn: turn on missing-prototypes globally". Link: https://lkml.kernel.org/r/20231127132809.45c2b398@canb.auug.org.au Signed-off-by: Stephen Rothwell Acked-by: Michael Ellerman Cc: Arnd Bergmann Signed-off-by: Andrew Morton commit 0025aa93d70278e8a13c07c0b308630575f4e805 Author: Arnd Bergmann Date: Thu Nov 23 12:05:05 2023 +0100 usb: fsl-mph-dr-of: mark fsl_usb2_mpc5121_init() static This function is only called locally and should always have been static: drivers/usb/host/fsl-mph-dr-of.c:291:5: error: no previous prototype for 'fsl_usb2_mpc5121_init' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231123110506.707903-6-arnd@kernel.org Fixes: 230f7ede6c2f ("USB: add USB EHCI support for MPC5121 SoC") Acked-by: Greg Kroah-Hartman Signed-off-by: Arnd Bergmann Cc: "David S. Miller" Cc: David Woodhouse Cc: Dinh Nguyen Cc: Ivan Kokshaysky Cc: John Paul Adrian Glaubitz Cc: Kees Cook Cc: Masahiro Yamada Cc: Matt Turner Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Palmer Dabbelt Cc: Peter Zijlstra Cc: Richard Henderson Cc: Richard Weinberger Cc: Rich Felker Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Cc: Tudor Ambarus Cc: Yoshinori Sato Cc: Zhihao Cheng Signed-off-by: Andrew Morton commit 9fcba2e95980704cdca56892481f76a92621095d Author: Arnd Bergmann Date: Thu Nov 23 12:05:04 2023 +0100 x86: sta2x11: include header for sta2x11_get_instance() prototype sta2x11_get_instance() is a global function declared in asm/sta2x11.h, but this header is not included before the definition, causing a warning: arch/x86/pci/sta2x11-fixup.c:95:26: error: no previous prototype for 'sta2x11_get_instance' [-Werror=missing-prototypes] Add the missing #include. Link: https://lkml.kernel.org/r/20231123110506.707903-5-arnd@kernel.org Fixes: 83125a3a189e ("x86, platform: Initial support for sta2x11 I/O hub") Signed-off-by: Arnd Bergmann Cc: "David S. Miller" Cc: David Woodhouse Cc: Dinh Nguyen Cc: Greg Kroah-Hartman Cc: Ivan Kokshaysky Cc: John Paul Adrian Glaubitz Cc: Kees Cook Cc: Masahiro Yamada Cc: Matt Turner Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Palmer Dabbelt Cc: Peter Zijlstra Cc: Richard Henderson Cc: Richard Weinberger Cc: Rich Felker Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Cc: Tudor Ambarus Cc: Yoshinori Sato Cc: Zhihao Cheng Signed-off-by: Andrew Morton commit b1c3efe07987592c16d5f59ce235e6ddbea65a73 Author: Arnd Bergmann Date: Thu Nov 23 12:05:03 2023 +0100 sched: fair: move unused stub functions to header These four functions have a normal definition for CONFIG_FAIR_GROUP_SCHED, and empty one that is only referenced when FAIR_GROUP_SCHED is disabled but CGROUP_SCHED is still enabled. If both are turned off, the functions are still defined but the misisng prototype causes a W=1 warning: kernel/sched/fair.c:12544:6: error: no previous prototype for 'free_fair_sched_group' kernel/sched/fair.c:12546:5: error: no previous prototype for 'alloc_fair_sched_group' kernel/sched/fair.c:12553:6: error: no previous prototype for 'online_fair_sched_group' kernel/sched/fair.c:12555:6: error: no previous prototype for 'unregister_fair_sched_group' Move the alternatives into the header as static inline functions with the correct combination of #ifdef checks to avoid the warning without adding even more complexity. [A different patch with the same description got applied by accident and was later reverted, but the original patch is still missing] Link: https://lkml.kernel.org/r/20231123110506.707903-4-arnd@kernel.org Fixes: 7aa55f2a5902 ("sched/fair: Move unused stub functions to header") Signed-off-by: Arnd Bergmann Cc: "David S. Miller" Cc: David Woodhouse Cc: Dinh Nguyen Cc: Greg Kroah-Hartman Cc: Ivan Kokshaysky Cc: John Paul Adrian Glaubitz Cc: Kees Cook Cc: Masahiro Yamada Cc: Matt Turner Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Palmer Dabbelt Cc: Peter Zijlstra Cc: Richard Henderson Cc: Richard Weinberger Cc: Rich Felker Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Cc: Tudor Ambarus Cc: Yoshinori Sato Cc: Zhihao Cheng Signed-off-by: Andrew Morton commit a9a6c365f3edfd5b9e50f182171bcf96c8bedcbb Author: Arnd Bergmann Date: Thu Nov 23 12:05:02 2023 +0100 jffs2: mark __jffs2_dbg_superblock_counts() static This function is only called locally and does not need to be global. Since there is no external prototype, gcc warns about the non-static definition: fs/jffs2/debug.c:160:6: error: no previous prototype for '__jffs2_dbg_superblock_counts' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231123110506.707903-3-arnd@kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: Tudor Ambarus Reviewed-by: Zhihao Cheng Cc: "David S. Miller" Cc: David Woodhouse Cc: Dinh Nguyen Cc: Greg Kroah-Hartman Cc: Ivan Kokshaysky Cc: John Paul Adrian Glaubitz Cc: Kees Cook Cc: Masahiro Yamada Cc: Matt Turner Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Palmer Dabbelt Cc: Peter Zijlstra Cc: Richard Henderson Cc: Richard Weinberger Cc: Rich Felker Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Cc: Yoshinori Sato Signed-off-by: Andrew Morton commit fd6f52e3fa9b681ec3bee79e3a0935b22082cf64 Author: Arnd Bergmann Date: Thu Nov 23 12:05:01 2023 +0100 ida: make 'ida_dump' static Patch series "Treewide: enable -Wmissing-prototypes", v3. At this point, there are five architectures with a number of known regressions: alpha, nios2, mips, sh and sparc. In the previous version of this patch, I had turned off the missing prototype warnings for the 15 architectures that still had issues, but since there are only five left, I think we can leave the rest to the maintainers (Cc'd here) as well. The series is also likely to cause occasional build regressions on linux-next as developers add new code that misses prototypes. Hopefully this should be resolved by the time the patches make it into a release and everyone gets the warnings right away. This patch (of 6): There is no global declaration for ida_dump() and no other callers, so make it static to avoid this warning: lib/test_ida.c:16:6: error: no previous prototype for 'ida_dump' Link: https://lkml.kernel.org/r/20231123110506.707903-1-arnd@kernel.org Link: https://lkml.kernel.org/r/20231123110506.707903-2-arnd@kernel.org Fixes: 8ab8ba38d488 ("ida: Start new test_ida module") Signed-off-by: Arnd Bergmann Cc: "David S. Miller" Cc: David Woodhouse Cc: Dinh Nguyen Cc: Greg Kroah-Hartman Cc: Ivan Kokshaysky Cc: John Paul Adrian Glaubitz Cc: Masahiro Yamada Cc: Matt Turner Cc: Michael Ellerman Cc: Nathan Chancellor Cc: Nicolas Schier Cc: Peter Zijlstra Cc: Richard Henderson Cc: Richard Weinberger Cc: Rich Felker Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Cc: Tudor Ambarus Cc: Yoshinori Sato Cc: Kees Cook Cc: Palmer Dabbelt Cc: Zhihao Cheng Signed-off-by: Andrew Morton commit 430b6ac059399828ca864979ad3685a3511c4984 Author: Arnd Bergmann Date: Mon Dec 4 12:57:10 2023 +0100 mips: kexec: include linux/reboot.h Two functions are provided for kexec, but the mips implementation is missing the corresponding #include statment: arch/mips/kernel/machine_kexec.c:136:1: error: no previous prototype for 'machine_shutdown' [-Werror=missing-prototypes] arch/mips/kernel/machine_kexec.c:152:1: error: no previous prototype for 'machine_crash_shutdown' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-21-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit d1f4b2b875e49dbbc9114bf340ee6871a892d014 Author: Arnd Bergmann Date: Mon Dec 4 12:57:09 2023 +0100 mips: smp: fix setup_profiling_timer() prototype The function is unconditionally defined in smp.c but is conditionally declared in a header that is not included here. arch/mips/kernel/smp.c:473:5: error: no previous prototype for 'setup_profiling_timer' [-Werror=missing-prototypes] Add the missing #include and #ifdef to match the declaration. Link: https://lkml.kernel.org/r/20231204115710.2247097-20-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit b4fc7a3c37c3cd053f3ccf0553d7837e9d3e810b Author: Arnd Bergmann Date: Mon Dec 4 12:57:08 2023 +0100 mips: hide conditionally unused functions A couple of functions are defined unconditionally but have a conditional declaration: arch/mips/mm/tlb-r4k.c:461:12: error: no previous prototype for 'add_temporary_entry' [-Werror=missing-prototypes] arch/mips/mm/pgtable-64.c:92:7: error: no previous prototype for 'mk_pmd' [-Werror=missing-prototypes] arch/mips/mm/pgtable-64.c:101:6: error: no previous prototype for 'set_pmd_at' [-Werror=missing-prototypes] Since there are no callers in these configurations, add the same #ifdef checks around the definitions. Link: https://lkml.kernel.org/r/20231204115710.2247097-19-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit a3075dcb1757e641321290ea62197d2f8b185c45 Author: Arnd Bergmann Date: Mon Dec 4 12:57:07 2023 +0100 mips: suspend: include linux/suspend.h as needed A couple of functions are defined by the architecture and declared in linux/suspend.h, but mips is lacking the corresponding #include statement before the definition: arch/mips/power/cpu.c:16:6: warning: no previous prototype for 'save_processor_state' [-Wmissing-prototypes] arch/mips/power/cpu.c:26:6: warning: no previous prototype for 'restore_processor_state' [-Wmissing-prototypes] arch/mips/power/cpu.c:36:5: warning: no previous prototype for 'pfn_is_nosave' [-Wmissing-prototypes] arch/mips/power/hibernate.c:6:5: warning: no previous prototype for 'swsusp_arch_resume' [-Wmissing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-18-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 4666cf018a26d89f2ee1ad6023227caa37f1a799 Author: Arnd Bergmann Date: Mon Dec 4 12:57:05 2023 +0100 mips: mt: include asm/mips_mt.h These two functions have a global prototype but the header is not included before the function definitions: arch/mips/kernel/mips-mt.c:50:6: error: no previous prototype for 'mips_mt_regdump' [-Werror=missing-prototypes] arch/mips/kernel/mips-mt.c:159:6: error: no previous prototype for 'mips_mt_set_cpuoptions' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-16-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 858c638c2fafb404d16453ee09aa1099f858178d Author: Arnd Bergmann Date: Mon Dec 4 12:57:04 2023 +0100 mips: spram: fix missing prototype warning for spram_config arch/mips/kernel/spram.c:194:6: error: no previous prototype for 'spram_config' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-15-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 7dc5b89251840ff1071eb47ad3dd83ff2b24a4c6 Author: Arnd Bergmann Date: Mon Dec 4 12:57:03 2023 +0100 mips: add missing declarations These are three more functions that are only called from assembler and only need a declaration to avoid the -Wmissing-prototypes warnings: arch/mips/kernel/signal.c:904:17: error: no previous prototype for 'do_notify_resume' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:370:6: error: no previous prototype for 'show_registers' [-Werror=missing-prototypes] arch/mips/kernel/smp.c:352:17: error: no previous prototype for 'start_secondary' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-14-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 66445677f01effe40a6fc725021db6bfa1e47aad Author: Arnd Bergmann Date: Mon Dec 4 12:57:02 2023 +0100 mips: move cache declarations into header Some of the cache functions are declared only for their callers, e.g. arch/mips/mm/c-r3k.c:28:15: error: no previous prototype for 'r3k_cache_size' [-Werror=missing-prototypes] arch/mips/mm/c-r3k.c:63:15: error: no previous prototype for 'r3k_cache_lsize' [-Werror=missing-prototypes] arch/mips/mm/c-r4k.c:1703:6: error: no previous prototype for 'r4k_cache_init' [-Werror=missing-prototypes] arch/mips/mm/sc-mips.c:255:5: error: no previous prototype for 'mips_sc_init' [-Werror=missing-prototypes] Move all the declarations to asm/cache.h and asm/r4kcache.h where they can be seen by the function definitions. Link: https://lkml.kernel.org/r/20231204115710.2247097-13-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit ec47b986e53e5617e9ed1c74fc3db04983a2d782 Author: Arnd Bergmann Date: Mon Dec 4 12:57:01 2023 +0100 mips: fix tlb_init() prototype There are two definitions for tlb_init(), but no global declaration: arch/mips/mm/tlb-r4k.c:552:6: error: no previous prototype for 'tlb_init' [-Werror=missing-prototypes] arch/mips/mm/tlb-r3k.c:244:6: error: no previous prototype for 'tlb_init' [-Werror=missing-prototypes] Move the declaration to asm/setup.h and included it as needed. Link: https://lkml.kernel.org/r/20231204115710.2247097-12-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit e021227afb5867738482c2dc0970191772cd0d4e Author: Arnd Bergmann Date: Mon Dec 4 12:57:00 2023 +0100 mips: fix setup_zero_pages() prototype setup_zero_pages() has a local declaration in a platform specific header, but that is not seen in the file it is defined in: arch/mips/mm/init.c:60:6: error: no previous prototype for 'setup_zero_pages' [-Werror=missing-prototypes] Move it to the corresponding global header and include that where needed. Link: https://lkml.kernel.org/r/20231204115710.2247097-11-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit e9f98feb17207addcd66435d8211ccf9c0a563dd Author: Arnd Bergmann Date: Mon Dec 4 12:56:59 2023 +0100 mips: unhide uasm_in_compat_space_p() declaration uasm_in_compat_space_p() has a conditional declaration but is defined unconditionally because of another local user, which causes a warning: arch/mips/mm/uasm.c:421:5: error: no previous prototype for 'uasm_in_compat_space_p' [-Werror=missing-prototypes] Make the declaration unconditional to avoid this. Link: https://lkml.kernel.org/r/20231204115710.2247097-10-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit ad6eb1ec6a590168b0f3add844bdf2b8bd422714 Author: Arnd Bergmann Date: Mon Dec 4 12:56:58 2023 +0100 mips: move jump_label_apply_nops() declaration to header Instead of an extern declaration in the C file with the caller, move it to an appropriate header, avoiding arch/mips/kernel/jump_label.c:93:6: error: no previous prototype for 'jump_label_apply_nops' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-9-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 6fb04df9b9b49891eebbdab6728f92091540e166 Author: Arnd Bergmann Date: Mon Dec 4 12:56:57 2023 +0100 mips: move build_tlb_refill_handler() prototype Instead of having a declaration for each caller, have one that is shared with the function definition, which avoids a warning: arch/mips/mm/tlbex.c:2547:6: error: no previous prototype for 'build_tlb_refill_handler' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-8-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 9a2036724cd693fef6c7609a856e56fa0d348be9 Author: Arnd Bergmann Date: Mon Dec 4 12:56:56 2023 +0100 mips: mark local function static if possible These two functions are global but have no extern prototypes or other callers, so it's best to mark them as static, avoiding these warnings: arch/mips/kernel/mips-cm.c:204:13: error: no previous prototype for '__mips_cm_l2sync_phys_base' [-Werror=missing-prototypes] arch/mips/mm/c-r4k.c:1827:12: error: no previous prototype for 'r4k_cache_init_pm' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-7-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 2894a8c4bcdc41d72d9d6c080901101e48fd6195 Author: Arnd Bergmann Date: Mon Dec 4 12:56:55 2023 +0100 mips: signal: move sigcontext declarations to header Function declarations should be in a shared header to ensure the prototypes match the definition: arch/mips/kernel/signal.c:439:5: error: no previous prototype for 'setup_sigcontext' [-Werror=missing-prototypes] arch/mips/kernel/signal.c:516:5: error: no previous prototype for 'restore_sigcontext' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-6-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 2657bc63d34ec0ca40244e7d1cfa78c742d905f2 Author: Arnd Bergmann Date: Mon Dec 4 12:56:54 2023 +0100 mips: rs870e: stop exporting local functions These four functions are exported, but don't have any users, and no prototypes, which now causes warnings: drivers/platform/mips/rs780e-acpi.c:35:6: error: no previous prototype for 'pm_iowrite' [-Werror=missing-prototypes] drivers/platform/mips/rs780e-acpi.c:41:4: error: no previous prototype for 'pm_ioread' [-Werror=missing-prototypes] drivers/platform/mips/rs780e-acpi.c:47:6: error: no previous prototype for 'pm2_iowrite' [-Werror=missing-prototypes] drivers/platform/mips/rs780e-acpi.c:53:4: error: no previous prototype for 'pm2_ioread' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-5-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 09fc778e1b96539166e2745187310d266d2e4c29 Author: Arnd Bergmann Date: Mon Dec 4 12:56:53 2023 +0100 mips: add missing declarations for trap handlers These exception handlers are all called from assembly code, so they don't normally need a declaration, but without one we now get warnings: arch/mips/mm/fault.c:323:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:447:17: error: no previous prototype for 'do_be' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:752:17: error: no previous prototype for 'do_ov' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:874:17: error: no previous prototype for 'do_fpe' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1027:17: error: no previous prototype for 'do_bp' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1114:17: error: no previous prototype for 'do_tr' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1151:17: error: no previous prototype for 'do_ri' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1402:17: error: no previous prototype for 'do_cpu' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1507:17: error: no previous prototype for 'do_msa_fpe' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1527:17: error: no previous prototype for 'do_msa' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1548:17: error: no previous prototype for 'do_mdmx' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1560:17: error: no previous prototype for 'do_watch' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1587:17: error: no previous prototype for 'do_mcheck' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1612:17: error: no previous prototype for 'do_mt' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1648:17: error: no previous prototype for 'do_dsp' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1656:17: error: no previous prototype for 'do_reserved' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1832:17: error: no previous prototype for 'cache_parity_error' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1880:17: error: no previous prototype for 'do_ftlb' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1909:17: error: no previous prototype for 'do_gsexc' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1944:6: error: no previous prototype for 'ejtag_exception_handler' [-Werror=missing-prototypes] arch/mips/kernel/traps.c:1989:17: error: no previous prototype for 'nmi_exception_handler' [-Werror=missing-prototypes] arch/mips/kernel/unaligned.c:1516:17: error: no previous prototype for 'do_ade' [-Werror=missing-prototypes] Link: https://lkml.kernel.org/r/20231204115710.2247097-4-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit be018aaa158ad5155f21a85faf3865cb0a379d09 Author: Arnd Bergmann Date: Mon Dec 4 12:56:52 2023 +0100 mips: add asm/syscalls.h header System call prototypes are generally in linux/syscalls.h, but there are a couple of mips specific entry points that are missing there: arch/mips/kernel/signal.c:636:17: error: no previous prototype for 'sys_sigreturn' [-Werror=missing-prototypes] arch/mips/kernel/signal.c:673:17: error: no previous prototype for 'sys_rt_sigreturn' [-Werror=missing-prototypes] arch/mips/kernel/syscall.c:51:16: error: no previous prototype for 'sysm_pipe' [-Werror=missing-prototypes] arch/mips/kernel/mips-mt-fpaff.c:65:17: error: no previous prototype for 'mipsmt_sys_sched_setaffinity' [-Werror=missing-prototypes] arch/mips/kernel/mips-mt-fpaff.c:157:17: error: no previous prototype for 'mipsmt_sys_sched_getaffinity' [-Werror=missing-prototypes] Add these to a new asm/syscalls.h as we have in other architectures. Link: https://lkml.kernel.org/r/20231204115710.2247097-3-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 1b5e6f4ec0870cc11250f627d26ad939d22cc2f6 Author: Arnd Bergmann Date: Mon Dec 4 12:56:51 2023 +0100 mips: decompress: fix add missing prototypes Patch series "mips: address -Wmissing-prototypes warnings". Address the -Wmissing-prototypes warnings that showed up in mips as the last major architecture after my patch to enable the option everywhere. This patch (of 20): The mips decompressor has some string functions defined locally that are not declared in the right place: arch/mips/boot/compressed/dbg.c:12:13: error: no previous prototype for 'putc' [-Werror=missing-prototypes] arch/mips/boot/compressed/dbg.c:16:6: error: no previous prototype for 'puts' [-Werror=missing-prototypes] arch/mips/boot/compressed/dbg.c:26:6: error: no previous prototype for 'puthex' [-Werror=missing-prototypes] arch/mips/boot/compressed/string.c:11:7: error: no previous prototype for 'memcpy' [-Werror=missing-prototypes] arch/mips/boot/compressed/string.c:22:7: error: no previous prototype for 'memset' [-Werror=missing-prototypes] arch/mips/boot/compressed/string.c:32:15: error: no previous prototype for 'memmove' [-Werror=missing-prototypes] arch/mips/boot/compressed/decompress.c:43:6: error: no previous prototype for 'error' [-Werror=missing-prototypes] arch/mips/boot/compressed/decompress.c:91:6: error: no previous prototype for 'decompress_kernel' [-Werror=missing-prototypes] Include the string.h header where needed and add a decompress.h header to have shared prototypes for the rest. Link: https://lkml.kernel.org/r/20231204115710.2247097-1-arnd@kernel.org Link: https://lkml.kernel.org/r/20231204115710.2247097-2-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 78af7920d0eb7659a30dde3e3214b2b920f8fdf3 Author: Nathan Chancellor Date: Thu Nov 30 17:22:33 2023 -0700 s390/traps: only define is_valid_bugaddr() under CONFIG_GENERIC_BUG When building with -Wmissing-prototypes without CONFIG_GENERIC_BUG, there is a warning about a missing prototype for is_valid_bugaddr(): arch/s390/kernel/traps.c:46:5: warning: no previous prototype for 'is_valid_bugaddr' [-Wmissing-prototypes] 46 | int is_valid_bugaddr(unsigned long addr) | ^~~~~~~~~~~~~~~~ The prototype is only declared with CONFIG_GENERIC_BUG, so only define the function under the same condition to clear up the warning, which matches other architectures. Link: https://lkml.kernel.org/r/20231130-s390-missing-prototypes-v1-2-799d3cf07fb7@kernel.org Signed-off-by: Nathan Chancellor Reviewed-by: Alexander Gordeev Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Jan Höppner Cc: Stefan Haberland Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Arnd Bergmann Signed-off-by: Andrew Morton commit c0706cfc7a5e9ddef1949520059798e8aea4c7d3 Author: Nathan Chancellor Date: Thu Nov 30 17:22:32 2023 -0700 s390/dasd: remove dasd_stats_generic_show() Patch series "s390: A couple of fixes for -Wmissing-prototypes". This series resolves a couple of -Wmissing-prototypes that I see in my builds of -next, even though the issues appear to be latent. This addresses issues which will be exposed by the later patch "Makefile.extrawarn: turn on missing-prototypes globally". This patch (of 2): With CONFIG_DASD_PROFILE=n, there is a warning that dasd_stats_generic_show() is missing a prototype: drivers/s390/block/dasd.c:1109:5: warning: no previous prototype for 'dasd_stats_generic_show' [-Wmissing-prototypes] 1109 | int dasd_stats_generic_show(struct seq_file *m, void *v) | ^~~~~~~~~~~~~~~~~~~~~~~ This function has been unused since its introduction in commit 4fa52aa7a82f ("[S390] dasd: add enhanced DASD statistics interface"), remove it to clear up the warning. Link: https://lkml.kernel.org/r/20231130-s390-missing-prototypes-v1-0-799d3cf07fb7@kernel.org Link: https://lkml.kernel.org/r/20231130-s390-missing-prototypes-v1-1-799d3cf07fb7@kernel.org Signed-off-by: Nathan Chancellor Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Jan Höppner Cc: Stefan Haberland Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Arnd Bergmann Signed-off-by: Andrew Morton commit 2562a3aeaa71753dcb857c1fc121d7e76300e860 Author: Nathan Chancellor Date: Thu Nov 30 15:58:32 2023 -0700 hexagon: traps: add internal prototypes for functions only called from asm Clang warns: arch/hexagon/kernel/traps.c:284:6: warning: no previous prototype for function 'do_genex' [-Wmissing-prototypes] 284 | void do_genex(struct pt_regs *regs) | ^ arch/hexagon/kernel/traps.c:284:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 284 | void do_genex(struct pt_regs *regs) | ^ | static arch/hexagon/kernel/traps.c:341:6: warning: no previous prototype for function 'do_trap0' [-Wmissing-prototypes] 341 | void do_trap0(struct pt_regs *regs) | ^ arch/hexagon/kernel/traps.c:341:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 341 | void do_trap0(struct pt_regs *regs) | ^ | static arch/hexagon/kernel/traps.c:418:6: warning: no previous prototype for function 'do_machcheck' [-Wmissing-prototypes] 418 | void do_machcheck(struct pt_regs *regs) | ^ arch/hexagon/kernel/traps.c:418:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 418 | void do_machcheck(struct pt_regs *regs) | ^ | static arch/hexagon/kernel/traps.c:428:6: warning: no previous prototype for function 'do_debug_exception' [-Wmissing-prototypes] 428 | void do_debug_exception(struct pt_regs *regs) | ^ arch/hexagon/kernel/traps.c:428:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 428 | void do_debug_exception(struct pt_regs *regs) | ^ | static These functions are only called from assembly or this translation unit, so just add prototypes right above the definitions to silence the warnings. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-19-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit d6b0180e6db1cc0699d9df8c8627aade0e2e1b80 Author: Nathan Chancellor Date: Thu Nov 30 15:58:31 2023 -0700 hexagon: traps: remove sys_syscall() Clang warns: arch/hexagon/kernel/traps.c:335:6: warning: no previous prototype for function 'sys_syscall' [-Wmissing-prototypes] 335 | long sys_syscall(void) | ^ arch/hexagon/kernel/traps.c:335:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 335 | long sys_syscall(void) | ^ | static This function is not used anywhere, so remove it. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-18-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 2212acda71d93887418146f36d5dd90fb13a2610 Author: Nathan Chancellor Date: Thu Nov 30 15:58:30 2023 -0700 hexagon: irq: add prototype for arch_do_IRQ() Clang warns: arch/hexagon/kernel/vm_events.c:83:6: warning: no previous prototype for function 'arch_do_IRQ' [-Wmissing-prototypes] 83 | void arch_do_IRQ(struct pt_regs *regs) | ^ arch/hexagon/kernel/vm_events.c:83:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 83 | void arch_do_IRQ(struct pt_regs *regs) | ^ | static This function is only called from assembly but the irq header is a reasonable place to put a prototype to silence the warning. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-17-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit d9f85d8be96900f659167a637686257e7176ce0e Author: Nathan Chancellor Date: Thu Nov 30 15:58:29 2023 -0700 hexagon: vm_events: remove unused dummy_handler() Clang warns: arch/hexagon/kernel/vm_events.c:76:6: warning: no previous prototype for function 'dummy_handler' [-Wmissing-prototypes] 76 | void dummy_handler(struct pt_regs *regs) | ^ arch/hexagon/kernel/vm_events.c:76:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 76 | void dummy_handler(struct pt_regs *regs) | ^ | static This function appears to be entirely unused, so remove it. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-16-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit d75eb3344ef1888885fcace3d34f3aceafee9aae Author: Nathan Chancellor Date: Thu Nov 30 15:58:28 2023 -0700 hexagon: vdso: include asm/elf.h for arch_setup_additional_pages() prototype Clang warns: arch/hexagon/kernel/vdso.c:49:5: warning: no previous prototype for function 'arch_setup_additional_pages' [-Wmissing-prototypes] 49 | int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) | ^ arch/hexagon/kernel/vdso.c:49:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 49 | int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp) | ^ | static 1 warning generated. Include the header that declares the prototype to clear up the warning. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-15-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 54ba0eab469d594dd1ef432a8de48724ae119336 Author: Nathan Chancellor Date: Thu Nov 30 15:58:27 2023 -0700 hexagon: process: add internal prototype for do_work_pending() Clang warns: arch/hexagon/kernel/process.c:155:5: warning: no previous prototype for function 'do_work_pending' [-Wmissing-prototypes] 155 | int do_work_pending(struct pt_regs *regs, u32 thread_info_flags) | ^ arch/hexagon/kernel/process.c:155:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 155 | int do_work_pending(struct pt_regs *regs, u32 thread_info_flags) | ^ | static This function is only referenced from assembly, so it does not technically need a prototype. Add one right above the definition anyways to clear up the warning. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-14-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit b0f731229a255112bfc82dd81f997a5f3484249e Author: Nathan Chancellor Date: Thu Nov 30 15:58:26 2023 -0700 hexagon: process: include linux/cpu.h for arch_cpu_idle() prototype Clang warns: arch/hexagon/kernel/process.c:43:6: warning: no previous prototype for function 'arch_cpu_idle' [-Wmissing-prototypes] 43 | void arch_cpu_idle(void) | ^ arch/hexagon/kernel/process.c:43:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 43 | void arch_cpu_idle(void) | ^ | static This prototype is declared in include/linux/cpu.h, include it in process.c to clear up the warning. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-13-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 9e06373780bd946d4990f84765de4f9bc168ed82 Author: Nathan Chancellor Date: Thu Nov 30 15:58:25 2023 -0700 hexagon: reset: include linux/reboot.h for prototypes Clang warns about missing prototypes that are declared in this header: arch/hexagon/kernel/reset.c:9:6: warning: no previous prototype for function 'machine_power_off' [-Wmissing-prototypes] 9 | void machine_power_off(void) | ^ arch/hexagon/kernel/reset.c:9:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 9 | void machine_power_off(void) | ^ | static arch/hexagon/kernel/reset.c:15:6: warning: no previous prototype for function 'machine_halt' [-Wmissing-prototypes] 15 | void machine_halt(void) | ^ arch/hexagon/kernel/reset.c:15:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 15 | void machine_halt(void) | ^ | static arch/hexagon/kernel/reset.c:19:6: warning: no previous prototype for function 'machine_restart' [-Wmissing-prototypes] 19 | void machine_restart(char *cmd) | ^ arch/hexagon/kernel/reset.c:19:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 19 | void machine_restart(char *cmd) | ^ | static 3 warnings generated. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-12-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit cb0085b0d694ab1269ac0c52464a48111c47161e Author: Nathan Chancellor Date: Thu Nov 30 15:58:24 2023 -0700 hexagon: signal: switch to SYSCALL_DEFINE0 for sys_rt_sigreturn() Clang warns: arch/hexagon/kernel/signal.c:223:16: warning: no previous prototype for function 'sys_rt_sigreturn' [-Wmissing-prototypes] 223 | asmlinkage int sys_rt_sigreturn(void) | ^ arch/hexagon/kernel/signal.c:223:12: note: declare 'static' if the function is not intended to be used outside of this translation unit 223 | asmlinkage int sys_rt_sigreturn(void) | ^ | static 1 warning generated. Switch to the SYSCALL_DEFINE0() macro, which automatically declares a prototype. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-11-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit d068b1237e3204ec5d4f7ddcdde54aeef2a9c30b Author: Nathan Chancellor Date: Thu Nov 30 15:58:23 2023 -0700 hexagon: time: include asm/delay.h for prototypes Clang warns about missing prototypes that are declared in this header: arch/hexagon/kernel/time.c:209:6: warning: no previous prototype for function '__delay' [-Wmissing-prototypes] 209 | void __delay(unsigned long cycles) | ^ arch/hexagon/kernel/time.c:209:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 209 | void __delay(unsigned long cycles) | ^ | static arch/hexagon/kernel/time.c:224:6: warning: no previous prototype for function '__udelay' [-Wmissing-prototypes] 224 | void __udelay(unsigned long usecs) | ^ arch/hexagon/kernel/time.c:224:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 224 | void __udelay(unsigned long usecs) | ^ | static Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-10-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 1f443caea93e76a9e4613d9e370e082354ae3b44 Author: Nathan Chancellor Date: Thu Nov 30 15:58:22 2023 -0700 hexagon: time: mark time_init_deferred() as static Clang warns: arch/hexagon/kernel/time.c:163:13: warning: no previous prototype for function 'time_init_deferred' [-Wmissing-prototypes] 163 | void __init time_init_deferred(void) | ^ arch/hexagon/kernel/time.c:163:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 163 | void __init time_init_deferred(void) | ^ | static This function is not used outside of this translation unit so mark it as static to resolve the warning. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-9-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 3279333097b22e1bab750d0f40837a097ec765fd Author: Nathan Chancellor Date: Thu Nov 30 15:58:21 2023 -0700 hexagon: time: include asm/time.h for prototypes Clang warns about missing prototypes that are declared in this header: arch/hexagon/kernel/time.c:118:6: warning: no previous prototype for function 'setup_percpu_clockdev' [-Wmissing-prototypes] 118 | void setup_percpu_clockdev(void) | ^ arch/hexagon/kernel/time.c:118:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 118 | void setup_percpu_clockdev(void) | ^ | static arch/hexagon/kernel/time.c:135:6: warning: no previous prototype for function 'ipi_timer' [-Wmissing-prototypes] 135 | void ipi_timer(void) | ^ arch/hexagon/kernel/time.c:135:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 135 | void ipi_timer(void) | ^ | static Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-8-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 0ebac3e6151c283d39d24a6bbe43f0fe14149899 Author: Nathan Chancellor Date: Thu Nov 30 15:58:20 2023 -0700 hexagon: vm_tlb: include asm/tlbflush.h for prototypes Clang warns about several missing prototypes that are declared in this header: arch/hexagon/mm/vm_tlb.c:25:6: warning: no previous prototype for function 'flush_tlb_range' [-Wmissing-prototypes] 25 | void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | ^ arch/hexagon/mm/vm_tlb.c:25:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 25 | void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, | ^ | static arch/hexagon/mm/vm_tlb.c:37:6: warning: no previous prototype for function 'flush_tlb_one' [-Wmissing-prototypes] 37 | void flush_tlb_one(unsigned long vaddr) | ^ arch/hexagon/mm/vm_tlb.c:37:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 37 | void flush_tlb_one(unsigned long vaddr) | ^ | static arch/hexagon/mm/vm_tlb.c:47:6: warning: no previous prototype for function 'tlb_flush_all' [-Wmissing-prototypes] 47 | void tlb_flush_all(void) | ^ arch/hexagon/mm/vm_tlb.c:47:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 47 | void tlb_flush_all(void) | ^ | static arch/hexagon/mm/vm_tlb.c:56:6: warning: no previous prototype for function 'flush_tlb_mm' [-Wmissing-prototypes] 56 | void flush_tlb_mm(struct mm_struct *mm) | ^ arch/hexagon/mm/vm_tlb.c:56:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 56 | void flush_tlb_mm(struct mm_struct *mm) | ^ | static arch/hexagon/mm/vm_tlb.c:66:6: warning: no previous prototype for function 'flush_tlb_page' [-Wmissing-prototypes] 66 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long vaddr) | ^ arch/hexagon/mm/vm_tlb.c:66:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 66 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long vaddr) | ^ | static arch/hexagon/mm/vm_tlb.c:78:6: warning: no previous prototype for function 'flush_tlb_kernel_range' [-Wmissing-prototypes] 78 | void flush_tlb_kernel_range(unsigned long start, unsigned long end) | ^ arch/hexagon/mm/vm_tlb.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 78 | void flush_tlb_kernel_range(unsigned long start, unsigned long end) | ^ | static 6 warnings generated. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-7-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 8126fafece234f383339bdc3713b7d793006302d Author: Nathan Chancellor Date: Thu Nov 30 15:58:19 2023 -0700 hexagon: vm_fault: include asm/vm_fault.h for prototypes Clang warns: arch/hexagon/mm/vm_fault.c:157:6: warning: no previous prototype for function 'read_protection_fault' [-Wmissing-prototypes] 157 | void read_protection_fault(struct pt_regs *regs) | ^ arch/hexagon/mm/vm_fault.c:157:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 157 | void read_protection_fault(struct pt_regs *regs) | ^ | static arch/hexagon/mm/vm_fault.c:164:6: warning: no previous prototype for function 'write_protection_fault' [-Wmissing-prototypes] 164 | void write_protection_fault(struct pt_regs *regs) | ^ arch/hexagon/mm/vm_fault.c:164:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 164 | void write_protection_fault(struct pt_regs *regs) | ^ | static arch/hexagon/mm/vm_fault.c:171:6: warning: no previous prototype for function 'execute_protection_fault' [-Wmissing-prototypes] 171 | void execute_protection_fault(struct pt_regs *regs) | ^ arch/hexagon/mm/vm_fault.c:171:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 171 | void execute_protection_fault(struct pt_regs *regs) | ^ | static The prototypes for these functions are defined in asm/vm_fault.h, so include it to pick them up and silence the warnings. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-6-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit d9d106ce60760ae020f39f5a2d783fe92d401f8f Author: Nathan Chancellor Date: Thu Nov 30 15:58:18 2023 -0700 hexagon: vm_fault: mark do_page_fault() as static Clang warns: arch/hexagon/mm/vm_fault.c:36:6: warning: no previous prototype for function 'do_page_fault' [-Wmissing-prototypes] 36 | void do_page_fault(unsigned long address, long cause, struct pt_regs *regs) | ^ arch/hexagon/mm/vm_fault.c:36:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 36 | void do_page_fault(unsigned long address, long cause, struct pt_regs *regs) | ^ | static This function is not used outside of this translation unit, so mark it as static. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-5-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit ef14250ec7d42a0e993bd341db078ecb33900a16 Author: Nathan Chancellor Date: Thu Nov 30 15:58:17 2023 -0700 hexagon: smp: mark handle_ipi() and start_secondary() as static Clang warns: arch/hexagon/kernel/smp.c:82:13: warning: no previous prototype for function 'handle_ipi' [-Wmissing-prototypes] 82 | irqreturn_t handle_ipi(int irq, void *desc) | ^ arch/hexagon/kernel/smp.c:82:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 82 | irqreturn_t handle_ipi(int irq, void *desc) | ^ | static arch/hexagon/kernel/smp.c:127:6: warning: no previous prototype for function 'start_secondary' [-Wmissing-prototypes] 127 | void start_secondary(void) | ^ arch/hexagon/kernel/smp.c:127:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 127 | void start_secondary(void) | ^ | static 2 warnings generated. These functions are not used outside of this translation unit, so mark them as static. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-4-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit bba07109f57d1299cd5551eb948ce182d711c221 Author: Nathan Chancellor Date: Thu Nov 30 15:58:16 2023 -0700 hexagon: mm: include asm/setup.h for setup_arch_memory()'s prototype Clang warns: arch/hexagon/mm/init.c:138:13: warning: no previous prototype for function 'setup_arch_memory' [-Wmissing-prototypes] 138 | void __init setup_arch_memory(void) | ^ arch/hexagon/mm/init.c:138:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 138 | void __init setup_arch_memory(void) | ^ | static The prototype is in asm/setup.h, include it to clear up the warning. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-3-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 600acbea29533db8906ed172b89eb10cd0d5413a Author: Nathan Chancellor Date: Thu Nov 30 15:58:15 2023 -0700 hexagon: mm: mark paging_init() as static Clang warns: arch/hexagon/mm/init.c:89:13: warning: no previous prototype for function 'paging_init' [-Wmissing-prototypes] 89 | void __init paging_init(void) | ^ arch/hexagon/mm/init.c:89:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 89 | void __init paging_init(void) | ^ | static This function is only used within this translation unit, so mark it static as suggested. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-2-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 014a5c107d0c45e259f87d3168f6a01e3e195637 Author: Nathan Chancellor Date: Thu Nov 30 15:58:14 2023 -0700 hexagon: uaccess: remove clear_user_hexagon() Patch series "hexagon: Fix up instances of -Wmissing-prototypes". This series fixes all the instances of -Wmissing-prototypes in arch/hexagon, as it is about to be enabled globally in a default build. This patch (of 19): Clang warns: arch/hexagon/mm/uaccess.c:39:15: warning: no previous prototype for function 'clear_user_hexagon' [-Wmissing-prototypes] 39 | unsigned long clear_user_hexagon(void __user *dest, unsigned long count) | ^ arch/hexagon/mm/uaccess.c:39:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 39 | unsigned long clear_user_hexagon(void __user *dest, unsigned long count) | ^ | static 1 warning generated. This function appears to have been unused since it was introduced in commit 7567746e1c0d ("Hexagon: Add user access functions"), so remove it. Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-0-5c34714afe9e@kernel.org Link: https://lkml.kernel.org/r/20231130-hexagon-missing-prototypes-v1-1-5c34714afe9e@kernel.org Signed-off-by: Nathan Chancellor Cc: Arnd Bergmann Cc: Brian Cain Signed-off-by: Andrew Morton commit 0f0d2871e78db648a2578abbeb9103f484f9b754 Author: Arnd Bergmann Date: Thu Nov 30 09:07:38 2023 +0100 arch: turn off -Werror for architectures with known warnings A couple of architectures enable -Werror for their own files regardless of CONFIG_WERROR but also have known warnings that fail the build with -Wmissing-prototypes enabled by default: arch/alpha/lib/memcpy.c:153:8: error: no previous prototype for 'memcpy' [-Werror=missing-prototypes] arch/alpha/kernel/irq.c:96:1: error: no previous prototype for 'handle_irq' [-Werror=missing-prototypes] arch/mips/kernel/signal.c:673:17: error: no previous prototype for ‘sys_rt_sigreturn’ [-Werror=missing-prototypes] arch/mips/kernel/signal.c:636:17: error: no previous prototype for ‘sys_sigreturn’ [-Werror=missing-prototypes] arch/mips/kernel/syscall.c:51:16: error: no previous prototype for ‘sysm_pipe’ [-Werror=missing-prototypes] arch/mips/mm/fault.c:323:17: error: no previous prototype for ‘do_page_fault’ [-Werror=missing-prototypes] arch/sparc/vdso/vma.c:246:12: warning: no previous prototype for ‘init_vdso_image’ [-Wmissing-prototypes]v arch/sparc/vdso/vdso32/../vclock_gettime.c:343:1: warning: no previous prototype for ‘__vdso_gettimeofday_stick’ [-Wmissing-prototypes] arch/sparc/vdso/vclock_gettime.c:343:1: warning: no previous prototype for ‘__vdso_gettimeofday_stick’ [-Wmissing-prototypes] arch/sparc/prom/p1275.c:52:6: warning: no previous prototype for ‘prom_cif_init’ [-Wmissing-prototypes] arch/sparc/prom/misc_64.c:165:5: warning: no previous prototype for ‘prom_get_mmu_ihandle’ [-Wmissing-prototypes] This appears to be an artifact from the times when this architecture code was better maintained that most device drivers and before CONFIG_WERROR was added. Now it just gets in the way, so remove all of these. Powerpc and x86 both still have their own Kconfig options to enable -Werror for some of their files. These architectures are better maintained than most and the options are easy to disable, so leave those untouched. Link: https://lkml.kernel.org/r/4be73872-c1f5-4c31-8201-712c19290a22@app.fastmail.com Signed-off-by: Arnd Bergmann Reported-by: Stephen Rothwell Cc: "David S. Miller" Cc: Thomas Bogendoerfer Signed-off-by: Andrew Morton commit 0311d8272406b2ec47f485bef887723cc352a489 Author: Uros Bizjak Date: Tue Nov 14 17:12:01 2023 +0100 kexec: use atomic_try_cmpxchg in crash_kexec Use atomic_try_cmpxchg instead of cmpxchg (*ptr, old, new) == old in crash_kexec(). x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg. No functional change intended. Link: https://lkml.kernel.org/r/20231114161228.108516-1-ubizjak@gmail.com Signed-off-by: Uros Bizjak Acked-by: Baoquan He Cc: Eric Biederman Signed-off-by: Andrew Morton commit 1ee918ffa6d4776a69708b013fd7e7006619158a Author: Colin Ian King Date: Wed Nov 22 10:40:37 2023 +0000 scripts/spelling.txt: add more spellings to spelling.txt Some of the more common spelling mistakes and typos that I've found while fixing up spelling mistakes in the kernel over the past couple of releases. Link: https://lkml.kernel.org/r/20231122104037.1770749-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton commit 27bbb2a0fddf70e185e800cd78f0142d45330c6c Author: Oleg Nesterov Date: Tue Nov 21 17:26:50 2023 +0100 __ptrace_unlink: kill the obsolete "FIXME" code The corner case described by the comment is no longer possible after the commit 7b3c36fc4c23 ("ptrace: fix task_join_group_stop() for the case when current is traced"), task_join_group_stop() ensures that the new thread has the correct signr in JOBCTL_STOP_SIGMASK regardless of ptrace. Link: https://lkml.kernel.org/r/20231121162650.GA6635@redhat.com Signed-off-by: Oleg Nesterov Cc: Eric Biederman Signed-off-by: Andrew Morton commit 66242cfafeea59a0199250dda3dc98736782a739 Author: Heiko Carstens Date: Mon Nov 20 19:37:19 2023 +0100 checkstack: allow to pass MINSTACKSIZE parameter The checkstack script omits all functions with a stack usage of less than 100 bytes. However the script already has support for a parameter which allows to override the default, but it cannot be set with $ make checkstack Add a MINSTACKSIZE parameter which allows to change the default. This might be useful in order to print the stack usage of all functions, or only those with large stack usage: $ make checkstack MINSTACKSIZE=0 $ make checkstack MINSTACKSIZE=800 Link: https://lkml.kernel.org/r/20231120183719.2188479-4-hca@linux.ibm.com Signed-off-by: Heiko Carstens Cc: Maninder Singh Cc: Masahiro Yamada Cc: Vaneet Narang Signed-off-by: Andrew Morton commit fe1a25eb059b215949825d4c81e26b100e6816a9 Author: Heiko Carstens Date: Mon Nov 20 19:37:18 2023 +0100 checkstack: sort output by size and function name Sort output by size and in addition by function name. This increases readability for cases where there are many functions with the same stack usage. Link: https://lkml.kernel.org/r/20231120183719.2188479-3-hca@linux.ibm.com Signed-off-by: Heiko Carstens Cc: Maninder Singh Cc: Masahiro Yamada Cc: Vaneet Narang Signed-off-by: Andrew Morton commit b454ec29225cda9ae85ed0a154f4228f1922c872 Author: Oleg Nesterov Date: Mon Nov 20 16:16:49 2023 +0100 kernel/signal.c: simplify force_sig_info_to_task(), kill recalc_sigpending_and_wake() The purpose of recalc_sigpending_and_wake() is not clear, it looks "obviously unneeded" because we are going to send the signal which can't be blocked or ignored. Add the comment to explain why we can't rely on send_signal_locked() and make this logic more simple/explicit. recalc_sigpending_and_wake() has no other users, it can die. In fact I think we don't even need signal_wake_up(), the target task must be either current or a TASK_TRACED child, otherwise the usage of siglock is not safe. But this needs another change. Link: https://lkml.kernel.org/r/20231120151649.GA15995@redhat.com Signed-off-by: Oleg Nesterov Cc: Eric Biederman Signed-off-by: Andrew Morton commit 48aa137e5a9491b491ae2bea0e0a603b330e708f Author: Ariel Miculas Date: Fri Nov 17 18:12:14 2023 +0200 docs: filesystems: document the squashfs specific mount options When SQUASHFS_CHOICE_DECOMP_BY_MOUNT is set, the "threads" mount option can be used to specify the decompression mode: single-threaded, multi-threaded, percpu or the number of threads used for decompression. When SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set, SQUASHFS_DECOMP_MULTI and SQUASHFS_MOUNT_DECOMP_THREADS are both set, the "threads" option can also be used to specify the number of threads used for decompression. This mount option is only mentioned in fs/squashfs/Kconfig, which makes it difficult to find. Another mount option available is "errors", which can be configured to panic the kernel when squashfs errors are encountered. Add both these options to the squashfs documentation, making them more noticeable. Link: https://lkml.kernel.org/r/20231117161215.140282-1-amiculas@cisco.com Signed-off-by: Ariel Miculas Reviewed-by: Bagas Sanjaya Reviewed-by: Phillip Lougher Cc: Jonathan Corbet Cc: Serge Hallyn Signed-off-by: Andrew Morton commit 71aa3419e98f6e23bddc3aca9ec4ac368836a109 Author: Sergey Senozhatsky Date: Thu Nov 9 16:51:38 2023 +0900 checkpatch: do not require an empty line before error injection ALLOW_ERROR_INJECTION macro (just like EXPORT_SYMBOL) can immediately follow a function it annotates. Link: https://lkml.kernel.org/r/20231109075147.2779461-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Joe Perches Cc: Andy Whitcroft (maintainer:CHECKPATCH) Cc: Dwaipayan Ray (reviewer:CHECKPATCH) Cc: Lukas Bulwahn Signed-off-by: Andrew Morton commit 0eb5085c38749f2a91e5bd8cbebb1ebf3398343c Author: Heiko Carstens Date: Thu Nov 16 14:36:38 2023 +0100 arch: remove ARCH_TASK_STRUCT_ON_STACK IA-64 was the only architecture which selected ARCH_TASK_STRUCT_ON_STACK. IA-64 was removed with commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"). Therefore remove support for ARCH_TASK_STRUCT_ON_STACK as well. Note: this also reveals a potential bug in powerpc code, which makes use of __init_task_data without selecting ARCH_TASK_STRUCT_ON_STACK which makes __init_task_data a no-op. This is broken since commit d11ed3ab3166 ("Expand INIT_TASK() in init/init_task.c and remove") from 2018 and needs to be addressed separately. Link: https://lkml.kernel.org/r/20231116133638.1636277-4-hca@linux.ibm.com Signed-off-by: Heiko Carstens Reviewed-by: Arnd Bergmann Cc: Michael Ellerman Cc: Nicholas Piggin Signed-off-by: Andrew Morton commit 3888750e21ccb909051c810cc79fcc0650a740f8 Author: Heiko Carstens Date: Thu Nov 16 14:36:37 2023 +0100 arch: remove ARCH_TASK_STRUCT_ALLOCATOR IA-64 was the only architecture which selected ARCH_TASK_STRUCT_ALLOCATOR. IA-64 was removed with commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"). Therefore remove support for ARCH_THREAD_STACK_ALLOCATOR as well. Link: https://lkml.kernel.org/r/20231116133638.1636277-3-hca@linux.ibm.com Signed-off-by: Heiko Carstens Reviewed-by: Arnd Bergmann Cc: Michael Ellerman Cc: Nicholas Piggin Signed-off-by: Andrew Morton commit f72709ab69430d986dfc5a08c9a86f625e3fed33 Author: Heiko Carstens Date: Thu Nov 16 14:36:36 2023 +0100 arch: remove ARCH_THREAD_STACK_ALLOCATOR Patch series "Remove unused code after IA-64 removal". While looking into something different I noticed that there are a couple of Kconfig options which were only selected by IA-64 and which are now unused. So remove them and simplify the code a bit. This patch (of 3): IA-64 was the only architecture which selected ARCH_THREAD_STACK_ALLOCATOR. IA-64 was removed with commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"). Therefore remove support for ARCH_THREAD_STACK_ALLOCATOR as well. Link: https://lkml.kernel.org/r/20231116133638.1636277-1-hca@linux.ibm.com Link: https://lkml.kernel.org/r/20231116133638.1636277-2-hca@linux.ibm.com Signed-off-by: Heiko Carstens Reviewed-by: Arnd Bergmann Cc: Michael Ellerman Cc: Nicholas Piggin Signed-off-by: Andrew Morton commit 2f0eff2054aa6894fab0e75e48649388b6f4b242 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:36 2023 +0900 nilfs2: convert nilfs_btnode_abort_change_key to use a folio Saves one call to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-21-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit c2a491f3d88a7d94fed070fe48c859dfc5c9d47c Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:35 2023 +0900 nilfs2: convert nilfs_btnode_commit_change_key to use a folio Saves one call to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-20-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 7c5c654c09c3d08ed04fb19ff0798784027eb33a Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:34 2023 +0900 nilfs2: convert nilfs_btnode_prepare_change_key to use a folio Saves three calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-19-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit cf62eb2c7a74aae8ef5bee000cf4ac1f77af6fad Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:33 2023 +0900 nilfs2: convert nilfs_btnode_delete to use a folio Saves six calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-18-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 10c6cca9c3233d6328eb192821a647dc8fdffd0e Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:32 2023 +0900 nilfs2: convert nilfs_btnode_submit_block to use a folio Saves two calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-17-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit d80cb7777e18a1c0bcd1e660e6d8fffd257862aa Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:31 2023 +0900 nilfs2: convert nilfs_btnode_create_block to use a folio Saves two calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-16-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit af01ea51488847f34b73c5dd811ede95ac027986 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:30 2023 +0900 nilfs2: convert nilfs_gccache_submit_read_data to use a folio Saves two calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-15-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 319a12c0462061e1435e32dfbdf57304938e9f90 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:29 2023 +0900 nilfs2: convert nilfs_mdt_submit_block to use a folio Saves two calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-14-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 83d9638ded878d67633b2f82dcea606b8f116b96 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:28 2023 +0900 nilfs2: convert nilfs_mdt_create_block to use a folio Saves two calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-13-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 5a5cad8cb2e3ef5427b17d01c644b4cffd32af24 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:27 2023 +0900 nilfs2: convert nilfs_page_mkwrite() to use a folio Using the new folio APIs saves seven hidden calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-12-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit ff5710c3f3c2ade105592f7964350cf637cd2b75 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:26 2023 +0900 nilfs2: convert nilfs_segctor_prepare_write to use folios Use the new folio APIs, saving 17 hidden calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-11-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 6609e235769cdb800e794d281dbe80dabe7e7834 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:25 2023 +0900 nilfs2: convert to __nilfs_clear_folio_dirty() All callers now have a folio, so convert to pass a folio. No caller uses the return value, so make it return void. Removes a couple of hidden calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-10-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 5d3b5903d46bfdff6f23767909a6b3c2a5d702f4 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:24 2023 +0900 nilfs2: convert to nilfs_clear_folio_dirty() All callers of nilfs_clear_dirty_page() now have a folio, so rename the function and pass in the folio. Saves three hidden calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-9-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 021cff9df677f108dd7cdb6c5d8189acec91682c Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:23 2023 +0900 nilfs2: convert nilfs_mdt_write_page() to use a folio Convert the incoming page to a folio. Replaces three calls to compound_head() with one. Link: https://lkml.kernel.org/r/20231114084436.2755-8-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit b7ef8d3b2d82e0040cb1c925820fb92830c1bd51 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:22 2023 +0900 nilfs2: convert nilfs_writepage() to use a folio Convert the incoming page to a folio. Replaces three calls to compound_head() with one. Link: https://lkml.kernel.org/r/20231114084436.2755-7-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 36319c0c1c6c4374949f7351a018aa922fb6ef3d Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:21 2023 +0900 nilfs2: convert to nilfs_folio_buffers_clean() All callers of nilfs_page_buffers_clean() now have a folio, so convert it to take a folio. While I'm at it, make it return a bool. Link: https://lkml.kernel.org/r/20231114084436.2755-6-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 797e25ad106b5f0c49bdbeb6ce015acae6b93b3b Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:20 2023 +0900 nilfs2: convert nilfs_forget_buffer to use a folio Save two hidden calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-5-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 3cd36212bf75e476e52a045d1fb1a4f40a5a76b0 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:19 2023 +0900 nilfs2: convert nilfs_segctor_complete_write to use folios Use the new folio APIs, saving five calls to compound_head(). This includes the last callers of nilfs_end_page_io(), so remove that too. Link: https://lkml.kernel.org/r/20231114084436.2755-4-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 50196f0081caef71090dc11eeb2b0793ff9449bc Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:18 2023 +0900 nilfs2: convert nilfs_abort_logs to use folios Use the new folio APIs, saving five hidden calls to compound_head(). Link: https://lkml.kernel.org/r/20231114084436.2755-3-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 8f46eaf6fd8454b0621b4ce07df50b2aa471c880 Author: Matthew Wilcox (Oracle) Date: Tue Nov 14 17:44:17 2023 +0900 nilfs2: add nilfs_end_folio_io() Patch series "nilfs2: Folio conversions for file paths". This series advances page->folio conversions for a wide range of nilfs2, including its file operations, block routines, and the log writer's writeback routines. It doesn't cover large folios support, but it saves a lot of hidden compound_head() calls while preserving the existing support range behavior. The original series in post [1] also covered directory-related page->folio conversions, but that was put on hold because a regression was found in testing, so this is an excerpt from the first half of the original post. [1] https://lkml.kernel.org/r/20231106173903.1734114-1-willy@infradead.org I tested this series in both 32-bit and 64-bit environments, switching between normal and small block sizes. I also reviewed all changes in all patches to ensure they do not break existing behavior. There were no problems. This patch (of 20): This is the folio counterpart of the existing nilfs_end_page_io() which is retained as a wrapper of nilfs_end_folio_io(). Replaces nine hidden calls to compound_head() with one. Link: https://lkml.kernel.org/r/20231114084436.2755-1-konishi.ryusuke@gmail.com Link: https://lkml.kernel.org/r/20231114084436.2755-2-konishi.ryusuke@gmail.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton commit 12427de9439d68b8e96ba6f50b601ef15f437612 Author: Phillip Lougher Date: Mon Nov 13 16:09:01 2023 +0000 Squashfs: fix variable overflow triggered by sysbot Sysbot reports a slab out of bounds write in squashfs_readahead(). This is ultimately caused by a file reporting an (infeasibly) large file size (1407374883553280 bytes) with the minimum block size of 4K. This causes variable overflow. Link: https://lkml.kernel.org/r/20231113160901.6444-1-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Reported-by: syzbot+604424eb051c2f696163@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000b1fda20609ede0d1@google.com/ Signed-off-by: Andrew Morton commit 44e3876d268be49ee810481ee3c95d8d650bf22e Author: Philipp Stanner Date: Tue Nov 7 07:44:16 2023 +0900 fs/nilfs2: use standard array-copy-function ioctl.c utilizes memdup_user() to copy a userspace array. An overflow check is performed manually before the function's invocation. The new function memdup_array_user() standardizes copying userspace arrays, thus, improving readability by making it more clear that an array is being copied. Additionally, it also performs an overflow check. Remove the (now redundant) manual overflow-check and replace memdup_user() with memdup_array_user(). In addition, improve the grammar of the comment above memdup_array_user(). Link: https://lkml.kernel.org/r/20231106224416.3055-1-konishi.ryusuke@gmail.com Signed-off-by: Philipp Stanner Link: https://lkml.kernel.org/r/20231103184831.99406-2-pstanner@redhat.com Signed-off-by: Ryusuke Konishi Suggested-by: Dave Airlie Signed-off-by: Andrew Morton commit 61a7a5e25fe79b6c43f1c49705a0294be113c4a5 Author: Oleg Nesterov Date: Mon Oct 30 16:57:10 2023 +0100 introduce for_other_threads(p, t) Cosmetic, but imho it makes the usage look more clear and simple, the new helper doesn't require to initialize "t". After this change while_each_thread() has only 3 users, and it is only used in the do/while loops. Link: https://lkml.kernel.org/r/20231030155710.GA9095@redhat.com Signed-off-by: Oleg Nesterov Reviewed-by: Christian Brauner Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton commit a9a1d6ad668f2ea0b5a77d0c4c7a41446d0801a8 Author: Dongmin Lee Date: Sat Nov 4 20:33:20 2023 +0900 kernel/reboot: explicitly notify if halt occurred instead of power off When kernel_can_power_off() returns false, and reboot has called with LINUX_REBOOT_CMD_POWER_OFF, kernel_halt() will be initiated instead of actual power off function. However, in this situation, Kernel never explicitly notifies user that system halted instead of requested power off. Since halt and power off perform different behavior, and user initiated reboot call with power off command, not halt, This could be unintended behavior to user, like this: ~ # poweroff -f [ 3.581482] reboot: System halted Therefore, this explicitly notifies user that poweroff is not available, and halting has been occured as an alternative behavior instead: ~ # poweroff -f [ 4.123668] reboot: Power off not available: System halted instead [akpm@linux-foundation.org: tweak comment text] Link: https://lkml.kernel.org/r/20231104113320.72440-1-ldmldm05@gmail.com Signed-off-by: Dongmin Lee Signed-off-by: Andrew Morton commit 5d4c6ac94694096cdfb528f05a3019a1a423b3a4 Author: Juntong Deng Date: Mon Nov 27 21:17:31 2023 +0000 kasan: record and report more information Record and report more information to help us find the cause of the bug and to help us correlate the error with other system events. This patch adds recording and showing CPU number and timestamp at allocation and free (controlled by CONFIG_KASAN_EXTRA_INFO). The timestamps in the report use the same format and source as printk. Error occurrence timestamp is already implicit in the printk log, and CPU number is already shown by dump_stack_lvl, so there is no need to add it. In order to record CPU number and timestamp at allocation and free, corresponding members need to be added to the relevant data structures, which will lead to increased memory consumption. In Generic KASAN, members are added to struct kasan_track. Since in most cases, alloc meta is stored in the redzone and free meta is stored in the object or the redzone, memory consumption will not increase much. In SW_TAGS KASAN and HW_TAGS KASAN, members are added to struct kasan_stack_ring_entry. Memory consumption increases as the size of struct kasan_stack_ring_entry increases (this part of the memory is allocated by memblock), but since this is configurable, it is up to the user to choose. Link: https://lkml.kernel.org/r/VI1P193MB0752BD991325D10E4AB1913599BDA@VI1P193MB0752.EURP193.PROD.OUTLOOK.COM Signed-off-by: Juntong Deng Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 73829b7134708de2ee64f8d2027cef32d27faeb3 Author: Sergey Senozhatsky Date: Tue Nov 28 17:22:07 2023 +0900 zram: use kmap_local_page() Use kmap_local_page() instead of kmap_atomic() which has been deprecated. Link: https://lkml.kernel.org/r/20231128083845.848008-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Acked-by: Minchan Kim Signed-off-by: Andrew Morton commit 664dc2189dd4327dd94959f5167a263276af6b76 Author: Dmitry Rokosov Date: Thu Nov 23 10:19:45 2023 +0300 mm: memcg: add reminder comment for the memcg v2 events To maintain the correct state, it is important to ensure that events for the memory cgroup v2 are aligned with the sample cgroup codes. Link: https://lkml.kernel.org/r/20231123071945.25811-4-ddrokosov@salutedevices.com Signed-off-by: Dmitry Rokosov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit becf6529603589c9cb8cfda398a585c0c2e01aae Author: Dmitry Rokosov Date: Thu Nov 23 10:19:44 2023 +0300 samples/cgroup: introduce memcg memory.events listener This is a simple listener for memory events that handles counter changes in runtime. It can be set up for a specific memory cgroup v2. The output example: ===== $ /tmp/memcg_event_listener test Initialized MEMCG events with counters: MEMCG events: low: 0 high: 0 max: 0 oom: 0 oom_kill: 0 oom_group_kill: 0 Started monitoring memory events from '/sys/fs/cgroup/test/memory.events'... Received event in /sys/fs/cgroup/test/memory.events: *** 1 MEMCG oom_kill event, change counter 0 => 1 Received event in /sys/fs/cgroup/test/memory.events: *** 1 MEMCG oom_kill event, change counter 1 => 2 Received event in /sys/fs/cgroup/test/memory.events: *** 1 MEMCG oom_kill event, change counter 2 => 3 Received event in /sys/fs/cgroup/test/memory.events: *** 1 MEMCG oom_kill event, change counter 3 => 4 Received event in /sys/fs/cgroup/test/memory.events: *** 2 MEMCG max events, change counter 0 => 2 Received event in /sys/fs/cgroup/test/memory.events: *** 8 MEMCG max events, change counter 2 => 10 *** 1 MEMCG oom event, change counter 0 => 1 Received event in /sys/fs/cgroup/test/memory.events: *** 1 MEMCG oom_kill event, change counter 4 => 5 ^CExiting memcg event listener... ===== Link: https://lkml.kernel.org/r/20231123071945.25811-3-ddrokosov@salutedevices.com Signed-off-by: Dmitry Rokosov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit 60433a9d038db006ca2f49e3c5f050dc46aaad3a Author: Dmitry Rokosov Date: Thu Nov 23 10:19:43 2023 +0300 samples: introduce new samples subdir for cgroup Patch series "samples: introduce cgroup events listeners", v3. To begin with, this patch series relocates the cgroup example code to the samples/cgroup directory, which is the appropriate location for such code snippets. Furthermore, a new memcg events listener is introduced. This listener is a simple yet effective tool for monitoring memory events and managing counter changes during runtime. Additionally, as per Andrew Morton's suggestion, a helpful reminder comment is included in the memcontrol implementation. This comment serves to ensure that the samples code is updated whenever new events are added. This patch (of 3): Move the cgroup_event_listener for cgroup v1 to the samples directory. This suggestion was proposed by Andrew Morton during the discussion [1]. Link: https://lore.kernel.org/all/20231106140934.3f5d4960141562fe8da53906@linux-foundation.org/ [1] Link: https://lkml.kernel.org/r/20231123071945.25811-1-ddrokosov@salutedevices.com Link: https://lkml.kernel.org/r/20231123071945.25811-2-ddrokosov@salutedevices.com Signed-off-by: Dmitry Rokosov Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit ebc20dcac4ce98f227f63cf8be0c9c1152d25cc9 Author: Muchun Song Date: Mon Nov 27 16:46:45 2023 +0800 mm: hugetlb_vmemmap: convert page to folio There are still some places where it does not be converted to folio, this patch convert all of them to folio. And this patch also does some trival cleanup to fix the code style problems. Link: https://lkml.kernel.org/r/20231127084645.27017-5-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Cc: Kefeng Wang Signed-off-by: Andrew Morton commit be035a2acf1fa03caf77daff7d8a424f395cfb4c Author: Muchun Song Date: Mon Nov 27 16:46:44 2023 +0800 mm: hugetlb_vmemmap: move PageVmemmapSelfHosted() check to split_vmemmap_huge_pmd() To check a page whether it is self-hosted needs to traverse the page table (e.g. pmd_off_k()), however, we already have done this in the next calling of vmemmap_remap_range(). Moving PageVmemmapSelfHosted() check to vmemmap_pmd_entry() could simplify the code a bit. Link: https://lkml.kernel.org/r/20231127084645.27017-4-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Cc: Kefeng Wang Signed-off-by: Andrew Morton commit fb93ed63345f67f676cd3569057e8e7c2b58aed7 Author: Muchun Song Date: Mon Nov 27 16:46:43 2023 +0800 mm: hugetlb_vmemmap: use walk_page_range_novma() to simplify the code It is unnecessary to implement a series of dedicated page table walking helpers since there is already a general one walk_page_range_novma(). So use it to simplify the code. Link: https://lkml.kernel.org/r/20231127084645.27017-3-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Mike Kravetz Cc: Kefeng Wang Signed-off-by: Andrew Morton commit b123d09304d8676ba327b72a39a6d0b79b6f604c Author: Muchun Song Date: Mon Nov 27 16:46:42 2023 +0800 mm: pagewalk: assert write mmap lock only for walking the user page tables The 8782fb61cc848 ("mm: pagewalk: Fix race between unmap and page walker") introduces an assertion to walk_page_range_novma() to make all the users of page table walker is safe. However, the race only exists for walking the user page tables. And it is ridiculous to hold a particular user mmap write lock against the changes of the kernel page tables. So only assert at least mmap read lock when walking the kernel page tables. And some users matching this case could downgrade to a mmap read lock to relief the contention of mmap lock of init_mm, it will be nicer in hugetlb (only holding mmap read lock) in the next patch. Link: https://lkml.kernel.org/r/20231127084645.27017-2-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Mike Kravetz Cc: Kefeng Wang Signed-off-by: Andrew Morton commit 829c3151f0f89f98ed2d89f0e0fc367649c1cd34 Author: Fabio M. De Francesco Date: Mon Nov 27 16:54:37 2023 +0100 mm/swapfile: replace kmap_atomic() with kmap_local_page() kmap_atomic() has been deprecated in favor of kmap_local_page(). Therefore, replace kmap_atomic() with kmap_local_page() in swapfile.c. kmap_atomic() is implemented like a kmap_local_page() which also disables page-faults and preemption (the latter only in !PREEMPT_RT kernels). The kernel virtual addresses returned by these two API are only valid in the context of the callers (i.e., they cannot be handed to other threads). With kmap_local_page() the mappings are per thread and CPU local like in kmap_atomic(); however, they can handle page-faults and can be called from any context (including interrupts). The tasks that call kmap_local_page() can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and are still valid. In mm/swapfile.c, the blocks of code between the mappings and un-mappings do not depend on the above-mentioned side effects of kmap_atomic(), so that the mere replacements of the old API with the new one is all that is required (i.e., there is no need to explicitly call pagefault_disable() and/or preempt_disable()). Link: https://lkml.kernel.org/r/20231127155452.586387-1-fabio.maria.de.francesco@linux.intel.com Signed-off-by: Fabio M. De Francesco Cc: Ira Weiny Signed-off-by: Andrew Morton commit 003ae2fb0b36803112f9b66cce8041afa5d46a83 Author: Fabio M. De Francesco Date: Mon Nov 27 16:55:21 2023 +0100 mm/zswap: replace kmap_atomic() with kmap_local_page() kmap_atomic() has been deprecated in favor of kmap_local_page(). Therefore, replace kmap_atomic() with kmap_local_page() in zswap.c. kmap_atomic() is implemented like a kmap_local_page() which also disables page-faults and preemption (the latter only in !PREEMPT_RT kernels). The kernel virtual addresses returned by these two API are only valid in the context of the callers (i.e., they cannot be handed to other threads). With kmap_local_page() the mappings are per thread and CPU local like in kmap_atomic(); however, they can handle page-faults and can be called from any context (including interrupts). The tasks that call kmap_local_page() can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and are still valid. In mm/zswap.c, the blocks of code between the mappings and un-mappings do not depend on the above-mentioned side effects of kmap_atomic(), so that the mere replacements of the old API with the new one is all that is required (i.e., there is no need to explicitly call pagefault_disable() and/or preempt_disable()). Link: https://lkml.kernel.org/r/20231127160058.586446-1-fabio.maria.de.francesco@linux.intel.com Signed-off-by: Fabio M. De Francesco Reviewed-by: Nhat Pham Acked-by: Chris Li (Google) Cc: Ira Weiny Cc: Seth Jennings Cc: Dan Streetman Signed-off-by: Andrew Morton commit 27873192ac5938bfa9d27348d79b931e5b438ba6 Author: Yong Wang Date: Thu Nov 23 18:40:18 2023 +0800 mm, oom:dump_tasks add rss detailed information printing When the system is under oom, it prints out the RSS information of each process. However, we don't know the size of rss_anon, rss_file, and rss_shmem. To distinguish the memory occupied by anonymous or file mappings or shmem, could help us identify the root cause of the oom. So this patch adds RSS details, which refers to the /proc//status[1]. It can help us know more about process memory usage. Example of oom including the new rss_* fields: [ 1630.902466] Tasks state (memory values in pages): [ 1630.902870] [ pid ] uid tgid total_vm rss rss_anon rss_file rss_shmem pgtables_bytes swapents oom_score_adj name [ 1630.903619] [ 149] 0 149 486 288 0 288 0 36864 0 0 ash [ 1630.904210] [ 156] 0 156 153531 153345 153345 0 0 1269760 0 0 mm_test [1] commit 8cee852ec53f ("mm, procfs: breakdown RSS for anon, shmem and file in /proc/pid/status"). Link: https://lkml.kernel.org/r/202311231840181856667@zte.com.cn Signed-off-by: Yong Wang Reviewed-by: Yang Yang Cc: Hugh Dickins Cc: Johannes Weiner Cc: Xuexin Jiang Cc: Michal Hocko Signed-off-by: Andrew Morton commit 7679e14098c9c3c8118a7130d6e1e9cfe2565c04 Author: Andy Shevchenko Date: Thu Nov 23 19:23:17 2023 +0200 mm: list_lru: Update kernel documentation to follow the requirements kernel-doc is not happy about documentation in list_lru.h: list_lru.h:90: warning: Function parameter or member 'lru' not described in 'list_lru_add' list_lru.h:90: warning: Excess function parameter 'list_lru' description in 'list_lru_add' list_lru.h:90: warning: No description found for return value of 'list_lru_add' list_lru.h:103: warning: Function parameter or member 'lru' not described in 'list_lru_del' list_lru.h:103: warning: Excess function parameter 'list_lru' description in 'list_lru_del' list_lru.h:103: warning: No description found for return value of 'list_lru_del' list_lru.h:116: warning: No description found for return value of 'list_lru_count_one' list_lru.h:168: warning: No description found for return value of 'list_lru_walk_one' list_lru.h:185: warning: No description found for return value of 'list_lru_walk_one_irq' Fix the documentation accordingly. While at it, fix the references to the parameters in functions inside the long descriptions, on which the above script is not complaining (yet?). Link: https://lkml.kernel.org/r/20231123172320.2434780-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Cc: Rasmus Villemoes Signed-off-by: Andrew Morton commit e9119fb65761f124b31743b598ce04b8f15a6fe3 Author: Peter Xu Date: Thu Nov 23 13:02:22 2023 -0500 mm/gup: fix follow_devmap_p[mu]d() on page==NULL handling This is a bug found not by any report but only by code observations. When GUP sees a devpmd/devpud and if page==NULL is returned, it means a fault is probably required. Here falling through when page==NULL can cause unexpected behavior. Fix both cases by catching the page==NULL cases with no_page_table(). Link: https://lkml.kernel.org/r/20231123180222.1048297-1-peterx@redhat.com Fixes: 3565fce3a659 ("mm, x86: get_user_pages() for dax mappings") Fixes: 080dbb618b4b ("mm/follow_page_mask: split follow_page_mask to smaller functions.") Signed-off-by: Peter Xu Acked-by: David Hildenbrand Cc: Dan Williams Cc: Mel Gorman Cc: Matthew Wilcox Cc: Aneesh Kumar K.V Cc: Christoph Hellwig Signed-off-by: Andrew Morton commit ac3f3b0a55518056bc80ed32a41931c99e1f7d81 Author: Charan Teja Kalla Date: Fri Nov 24 16:27:25 2023 +0530 mm: page_alloc: unreserve highatomic page blocks before oom __alloc_pages_direct_reclaim() is called from slowpath allocation where high atomic reserves can be unreserved after there is a progress in reclaim and yet no suitable page is found. Later should_reclaim_retry() gets called from slow path allocation to decide if the reclaim needs to be retried before OOM kill path is taken. should_reclaim_retry() checks the available(reclaimable + free pages) memory against the min wmark levels of a zone and returns: a) true, if it is above the min wmark so that slow path allocation will do the reclaim retries. b) false, thus slowpath allocation takes oom kill path. should_reclaim_retry() can also unreserves the high atomic reserves **but only after all the reclaim retries are exhausted.** In a case where there are almost none reclaimable memory and free pages contains mostly the high atomic reserves but allocation context can't use these high atomic reserves, makes the available memory below min wmark levels hence false is returned from should_reclaim_retry() leading the allocation request to take OOM kill path. This can turn into a early oom kill if high atomic reserves are holding lot of free memory and unreserving of them is not attempted. (early)OOM is encountered on a VM with the below state: [ 295.998653] Normal free:7728kB boost:0kB min:804kB low:1004kB high:1204kB reserved_highatomic:8192KB active_anon:4kB inactive_anon:0kB active_file:24kB inactive_file:24kB unevictable:1220kB writepending:0kB present:70732kB managed:49224kB mlocked:0kB bounce:0kB free_pcp:688kB local_pcp:492kB free_cma:0kB [ 295.998656] lowmem_reserve[]: 0 32 [ 295.998659] Normal: 508*4kB (UMEH) 241*8kB (UMEH) 143*16kB (UMEH) 33*32kB (UH) 7*64kB (UH) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 7752kB Per above log, the free memory of ~7MB exist in the high atomic reserves is not freed up before falling back to oom kill path. Fix it by trying to unreserve the high atomic reserves in should_reclaim_retry() before __alloc_pages_direct_reclaim() can fallback to oom kill path. Link: https://lkml.kernel.org/r/1700823445-27531-1-git-send-email-quic_charante@quicinc.com Fixes: 0aaa29a56e4f ("mm, page_alloc: reserve pageblocks for high-order atomic allocations on demand") Signed-off-by: Charan Teja Kalla Reported-by: Chris Goldsworthy Suggested-by: Michal Hocko Acked-by: Michal Hocko Acked-by: David Rientjes Cc: Chris Goldsworthy Cc: David Hildenbrand Cc: Johannes Weiner Cc: Mel Gorman Cc: Pavankumar Kondeti Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 9cd20f3fe045af95a8fe7a12328b21bfd2f3b8bf Author: Charan Teja Kalla Date: Fri Nov 24 16:35:53 2023 +0530 mm: page_alloc: enforce minimum zone size to do high atomic reserves Highatomic reserves are set to roughly 1% of zone for maximum and a pageblock size for minimum. Encountered a system with the below configuration: Normal free:7728kB boost:0kB min:804kB low:1004kB high:1204kB reserved_highatomic:8192KB managed:49224kB On such systems, even a single pageblock makes highatomic reserves are set to ~8% of the zone memory. This high value can easily exert pressure on the zone. Per discussion with Michal and Mel, it is not much useful to reserve the memory for highatomic allocations on such small systems[1]. Since the minimum size for high atomic reserves is always going to be a pageblock size and if 1% of zone managed pages is going to be below pageblock size, don't reserve memory for high atomic allocations. Thanks Michal for this suggestion[2]. Since no memory is being reserved for high atomic allocations and if respective allocation failures are seen, this patch can be reverted. [1] https://lore.kernel.org/linux-mm/20231117161956.d3yjdxhhm4rhl7h2@techsingularity.net/ [2] https://lore.kernel.org/linux-mm/ZVYRJMUitykepLRy@tiehlicka/ Link: https://lkml.kernel.org/r/c3a2a48e2cfe08176a80eaf01c110deb9e918055.1700821416.git.quic_charante@quicinc.com Signed-off-by: Charan Teja Kalla Acked-by: David Rientjes Cc: David Hildenbrand Cc: Johannes Weiner Cc: Mel Gorman Cc: Michal Hocko Cc: Pavankumar Kondeti Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit d68e39fc45f70e35eb74df2128d315c1d91e4dc4 Author: Charan Teja Kalla Date: Fri Nov 24 16:35:52 2023 +0530 mm: page_alloc: correct high atomic reserve calculations Patch series "mm: page_alloc: fixes for high atomic reserve caluculations", v3. The state of the system where the issue exposed shown in oom kill logs: [ 295.998653] Normal free:7728kB boost:0kB min:804kB low:1004kB high:1204kB reserved_highatomic:8192KB active_anon:4kB inactive_anon:0kB active_file:24kB inactive_file:24kB unevictable:1220kB writepending:0kB present:70732kB managed:49224kB mlocked:0kB bounce:0kB free_pcp:688kBlocal_pcp:492kB free_cma:0kB [ 295.998656] lowmem_reserve[]: 0 32 [ 295.998659] Normal: 508*4kB (UMEH) 241*8kB (UMEH) 143*16kB (UMEH) 33*32kB (UH) 7*64kB (UH) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 7752kB From the above, it is seen that ~16MB of memory reserved for high atomic reserves against the expectation of 1% reserves which is fixed in the 1st patch. Don't reserve the high atomic page blocks if 1% of zone memory size is below a pageblock size. This patch (of 2): reserve_highatomic_pageblock() aims to reserve the 1% of the managed pages of a zone, which is used for the high order atomic allocations. It uses the below calculation to reserve: static void reserve_highatomic_pageblock(struct page *page, ....) { ....... max_managed = (zone_managed_pages(zone) / 100) + pageblock_nr_pages; if (zone->nr_reserved_highatomic >= max_managed) goto out; zone->nr_reserved_highatomic += pageblock_nr_pages; set_pageblock_migratetype(page, MIGRATE_HIGHATOMIC); move_freepages_block(zone, page, MIGRATE_HIGHATOMIC, NULL); out: .... } Since we are always appending the 1% of zone managed pages count to pageblock_nr_pages, the minimum it is turning into 2 pageblocks as the nr_reserved_highatomic is incremented/decremented in pageblock sizes. Encountered a system(actually a VM running on the Linux kernel) with the below zone configuration: Normal free:7728kB boost:0kB min:804kB low:1004kB high:1204kB reserved_highatomic:8192KB managed:49224kB The existing calculations making it to reserve the 8MB(with pageblock size of 4MB) i.e. 16% of the zone managed memory. Reserving such high amount of memory can easily exert memory pressure in the system thus may lead into unnecessary reclaims till unreserving of high atomic reserves. Since high atomic reserves are managed in pageblock size granules, as MIGRATE_HIGHATOMIC is set for such pageblock, fix the calculations for high atomic reserves as, minimum is pageblock size , maximum is approximately 1% of the zone managed pages. Link: https://lkml.kernel.org/r/cover.1700821416.git.quic_charante@quicinc.com Link: https://lkml.kernel.org/r/1660034138397b82a0a8b6ae51cbe96bd583d89e.1700821416.git.quic_charante@quicinc.com Signed-off-by: Charan Teja Kalla Acked-by: Mel Gorman Acked-by: David Rientjes Cc: David Hildenbrand Cc: Johannes Weiner Cc: Michal Hocko Cc: Pavankumar Kondeti Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit cddba0af0b7919e93134469f6fdf29a7d362768a Author: Peter Xu Date: Fri Nov 24 10:19:02 2023 -0500 fs/Kconfig: make hugetlbfs a menuconfig Hugetlb vmemmap default option (HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON) is a sub-option to hugetlbfs, but it shows in the same level as hugetlbfs itself, under "Pesudo filesystems". Make the vmemmap option a sub-option to hugetlbfs, by changing hugetlbfs into a menuconfig. When moving it, fix a typo 'v' spot by Randy. Link: https://lkml.kernel.org/r/20231124151902.1075697-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Muchun Song Cc: Mike Kravetz Cc: Randy Dunlap Signed-off-by: Andrew Morton commit 01846c6c70257efc0969c0394e496673040627ec Author: Serge Semin Date: Wed Nov 22 21:24:04 2023 +0300 mm/mm_init.c: append newline to the unavailable ranges log-message Based on the init_unavailable_range() method and it's callee semantics no multi-line info messages are intended to be printed to the console. Thus append the '\n' symbol to the respective info string. Link: https://lkml.kernel.org/r/20231122182419.30633-7-fancer.lancer@gmail.com Signed-off-by: Serge Semin Reviewed-by: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit ecf5dd1ffe84ede52d8a6c9fb72d8aad04ff8160 Author: Serge Semin Date: Wed Nov 22 21:24:03 2023 +0300 mm/mm_init.c: extend init unavailable range doc info Besides of the already described reasons the pages backended memory holes might be persistent due to having memory mapped IO spaces behind those ranges in the framework of flatmem kernel config. Add such note to the init_unavailable_range() method kdoc in order to point out to one more reason of having the function executed for such regions. [fancer.lancer@gmail.com: update per Mike] Link: https://lkml.kernel.org/r/20231202111855.18392-1-fancer.lancer@gmail.com Link: https://lkml.kernel.org/r/20231122182419.30633-6-fancer.lancer@gmail.com Signed-off-by: Serge Semin Reviewed-by: Mike Rapoport (IBM) Signed-off-by: Andrew Morton commit f7dd74ac239aad5ef7575ea03c45fd7956e00285 Author: Alexander Gordeev Date: Tue Nov 21 20:43:50 2023 +0100 pgtable: rename ptdesc _refcount field to __page_refcount Rename ptdesc _refcount field to __page_refcount similar to the other unused page fields. Link: https://lkml.kernel.org/r/982bdc652ba79a606c3d01c905766e7e076b3315.1700594815.git.agordeev@linux.ibm.com Signed-off-by: Alexander Gordeev Suggested-by: Vishal Moola Cc: Gerald Schaefer Cc: Heiko Carstens Signed-off-by: Andrew Morton commit 38ca8a185389716e9f7566bce4bb0085f71da61d Author: Alexander Gordeev Date: Tue Nov 21 20:43:49 2023 +0100 pgtable: fix s390 ptdesc field comments Patch series "minor ptdesc updates", v3. This patch (of 2): Since commit d08d4e7cd6bf ("s390/mm: use full 4KB page for 2KB PTE") there is no fragmented page tracking on s390. Fix the corresponding comments. Link: https://lkml.kernel.org/r/cover.1700594815.git.agordeev@linux.ibm.com Link: https://lkml.kernel.org/r/2eead241f3a45bed26c7911cf66bded1e35670b8.1700594815.git.agordeev@linux.ibm.com Signed-off-by: Alexander Gordeev Suggested-by: Heiko Carstens Cc: Gerald Schaefer Cc: Vishal Moola (Oracle) Signed-off-by: Andrew Morton commit 50668b53f8c9cdb2f6a7f7e3ff0a5d0bd85cc932 Author: SeongJae Park Date: Sun Nov 19 17:15:29 2023 +0000 mm/damon/core-test: test damon_split_region_at()'s access rate copying damon_split_region_at() should set access rate related fields of the resulting regions same. It may forgotten, and actually there was the mistake before. Test it with the unit test case for the function. Link: https://lkml.kernel.org/r/20231119171529.66863-2-sj@kernel.org Signed-off-by: SeongJae Park Cc: Brendan Higgins Cc: David Gow Signed-off-by: Andrew Morton commit a5989d4ed40cef0cadede2393c714a1ff9179f65 Author: Juntong Deng Date: Mon Nov 20 04:46:29 2023 +0800 kasan: improve free meta storage in Generic KASAN Currently free meta can only be stored in object if the object is not smaller than free meta. After the improvement, when the object is smaller than free meta and SLUB DEBUG is not enabled, it is possible to store part of the free meta in the object, reducing the increased size of the red zone. Example: free meta size: 16 bytes alloc meta size: 16 bytes object size: 8 bytes optimal redzone size (object_size <= 64): 16 bytes Before improvement: actual redzone size = alloc meta size + free meta size = 32 bytes After improvement: actual redzone size = alloc meta size + (free meta size - object size) = 24 bytes [juntong.deng@outlook.com: make kasan_metadata_size() adapt to the improved free meta storage] Link: https://lkml.kernel.org/r/VI1P193MB0752675D6E0A2D16CE656F8299BAA@VI1P193MB0752.EURP193.PROD.OUTLOOK.COM Link: https://lkml.kernel.org/r/VI1P193MB0752DE2CCD9046B5FED0AA8E99B5A@VI1P193MB0752.EURP193.PROD.OUTLOOK.COM Signed-off-by: Juntong Deng Suggested-by: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit f542b8e582abd93df092c4a2763679e380f14645 Author: Fabio M. De Francesco Date: Mon Nov 20 15:28:23 2023 +0100 mm/page_poison: replace kmap_atomic() with kmap_local_page() kmap_atomic() has been deprecated in favor of kmap_local_page(). Therefore, replace kmap_atomic() with kmap_local_page(). kmap_atomic() is implemented like a kmap_local_page() which also disables page-faults and preemption (the latter only in !PREEMPT_RT kernels). The kernel virtual addresses returned by these two API are only valid in the context of the callers (i.e., they cannot be handed to other threads). With kmap_local_page() the mappings are per thread and CPU local like in kmap_atomic(); however, they can handle page-faults and can be called from any context (including interrupts). The tasks that call kmap_local_page() can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and are still valid. The code blocks between the mappings and un-mappings do not rely on the above-mentioned side effects of kmap_atomic(), so that mere replacements of the old API with the new one is all that they require (i.e., there is no need to explicitly call pagefault_disable() and/or preempt_disable()). Link: https://lkml.kernel.org/r/20231120142836.7219-1-fabio.maria.de.francesco@linux.intel.com Signed-off-by: Fabio M. De Francesco Cc: Ira Weiny Signed-off-by: Andrew Morton commit f2bcc99a5e901a13b754648d1dbab60f4adf9375 Author: Fabio M. De Francesco Date: Mon Nov 20 15:26:31 2023 +0100 mm/mempool: replace kmap_atomic() with kmap_local_page() kmap_atomic() has been deprecated in favor of kmap_local_page(). Therefore, replace kmap_atomic() with kmap_local_page(). kmap_atomic() is implemented like a kmap_local_page() which also disables page-faults and preemption (the latter only in !PREEMPT_RT kernels). The kernel virtual addresses returned by these two API are only valid in the context of the callers (i.e., they cannot be handed to other threads). With kmap_local_page() the mappings are per thread and CPU local like in kmap_atomic(); however, they can handle page-faults and can be called from any context (including interrupts). The tasks that call kmap_local_page() can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and are still valid. The code blocks between the mappings and un-mappings don't rely on the above-mentioned side effects of kmap_atomic(), so that mere replacements of the old API with the new one is all that they require (i.e., there is no need to explicitly call pagefault_disable() and/or preempt_disable()). Link: https://lkml.kernel.org/r/20231120142640.7077-1-fabio.maria.de.francesco@linux.intel.com Signed-off-by: Fabio M. De Francesco Cc: Ira Weiny Signed-off-by: Andrew Morton commit 24d2613a6356f9c4a0b1b8e17f125562f6c8e11b Author: Fabio M. De Francesco Date: Mon Nov 20 15:24:05 2023 +0100 mm/memory: use kmap_local_page() in __wp_page_copy_user() kmap_atomic() has been deprecated in favor of kmap_local_{folio,page}. Therefore, replace kmap_atomic() with kmap_local_page in __wp_page_copy_user(). kmap_atomic() disables preemption in !PREEMPT_RT kernels and unconditionally disables also page-faults. My limited knowledge of the implementation of __wp_page_copy_user() makes me think that the latter side effect is still needed here, but kmap_local_page() is implemented not to disable page-faults. So, in addition to the conversion to local mapping, add explicit pagefault_disable() / pagefault_enable() between mapping and un-mapping. Link: https://lkml.kernel.org/r/20231120142418.6977-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Cc: Ira Weiny Signed-off-by: Andrew Morton commit b33519896664f66358cec60f6b308d80a60d1c96 Author: Fabio M. De Francesco Date: Mon Nov 20 15:18:44 2023 +0100 mm/ksm: use kmap_local_page() in calc_checksum() kmap_atomic() has been deprecated in favor of kmap_local_page(). Therefore, replace kmap_atomic() with kmap_local_page() in calc_checksum(). kmap_atomic() is implemented like a kmap_local_page() which also disables page-faults and preemption (the latter only in !PREEMPT_RT kernels). The kernel virtual addresses returned by these two API are only valid in the context of the callers (i.e., they cannot be handed to other threads). With kmap_local_page() the mappings are per thread and CPU local like in kmap_atomic(); however, they can handle page-faults and can be called from any context (including interrupts). The tasks that call kmap_local_page() can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and are still valid. In calc_checksum(), the block of code between the mapping and un-mapping does not depend on the above-mentioned side effects of kmap_aatomic(), so that a mere replacements of the old API with the new one is all that is required (i.e., there is no need to explicitly call pagefault_disable() and/or preempt_disable()). Link: https://lkml.kernel.org/r/20231120141855.6761-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Cc: Ira Weiny Signed-off-by: Andrew Morton commit 2f7537620f383de121eaeb25f3e073a27831d086 Author: Fabio De Francesco Date: Mon Nov 20 15:15:27 2023 +0100 mm/util: use kmap_local_page() in memcmp_pages() kmap_atomic() has been deprecated in favor of kmap_local_page(). Therefore, replace kmap_atomic() with kmap_local_page() in memcmp_pages(). kmap_atomic() is implemented like a kmap_local_page() which also disables page-faults and preemption (the latter only in !PREEMPT_RT kernels). The kernel virtual addresses returned by these two API are only valid in the context of the callers (i.e., they cannot be handed to other threads). With kmap_local_page() the mappings are per thread and CPU local like in kmap_atomic(); however, they can handle page-faults and can be called from any context (including interrupts). The tasks that call kmap_local_page() can be preempted and, when they are scheduled to run again, the kernel virtual addresses are restored and are still valid. In memcmp_pages(), the block of code between the mapping and un-mapping does not depend on the above-mentioned side effects of kmap_aatomic(), so that mere replacements of the old API with the new one is all that is required (i.e., there is no need to explicitly call pagefault_disable() and/or preempt_disable()). Link: https://lkml.kernel.org/r/20231120141554.6612-1-fmdefrancesco@gmail.com Signed-off-by: Fabio M. De Francesco Cc: Ira Weiny Signed-off-by: Andrew Morton commit 95a2ac937013cc3aaaea02abcdd167b96874548d Author: Sumanth Korikkar Date: Mon Nov 20 15:53:54 2023 +0100 mm: use vmem_altmap code without CONFIG_ZONE_DEVICE vmem_altmap_free() and vmem_altmap_offset() could be utlized without CONFIG_ZONE_DEVICE enabled. For example, mm/memory_hotplug.c:__add_pages() relies on that. The altmap is no longer restricted to ZONE_DEVICE handling, but instead depends on CONFIG_SPARSEMEM_VMEMMAP. When CONFIG_SPARSEMEM_VMEMMAP is disabled, these functions are defined as inline stubs, ensuring compatibility with configurations that do not use sparsemem vmemmap. Without it, lkp reported the following: ld: arch/x86/mm/init_64.o: in function `remove_pagetable': init_64.c:(.meminit.text+0xfc7): undefined reference to `vmem_altmap_free' Link: https://lkml.kernel.org/r/20231120145354.308999-4-sumanthk@linux.ibm.com Signed-off-by: Sumanth Korikkar Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311180545.VeyRXEDq-lkp@intel.com/ Reviewed-by: Gerald Schaefer Acked-by: David Hildenbrand Cc: Alexander Gordeev Cc: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Heiko Carstens Cc: Michal Hocko Cc: Oscar Salvador Cc: Vasily Gorbik Signed-off-by: Andrew Morton commit bd9d9624b7136b69d892597b6a8cc482341e415a Author: Andrey Konovalov Date: Mon Nov 20 18:47:20 2023 +0100 lib/stackdepot: adjust DEPOT_POOLS_CAP for KMSAN KMSAN is frequently used in fuzzing scenarios and thus saves a lot of stack traces. As KMSAN does not support evicting stack traces from the stack depot, the stack depot capacity might be reached quickly with large stack records. Adjust the maximum number of stack depot pools for this case. The average size of a stack trace saved into the stack depot is ~16 frames. Thus, adjust the maximum pools number accordingly to keep the maximum number of stack traces that can be saved into the stack depot similar to the one that was allowed before the stack trace eviction changes. Link: https://lkml.kernel.org/r/301a115cf7ce8ddb42ef6de9151c2bb76ba728fc.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 773688a6cb24b0b3c2ba40354d883348a2befa38 Author: Andrey Konovalov Date: Mon Nov 20 18:47:19 2023 +0100 kasan: use stack_depot_put for Generic mode Evict alloc/free stack traces from the stack depot for Generic KASAN once they are evicted from the quaratine. For auxiliary stack traces, evict the oldest stack trace once a new one is saved (KASAN only keeps references to the last two). Also evict all saved stack traces on krealloc. To avoid double-evicting and mis-evicting stack traces (in case KASAN's metadata was corrupted), reset KASAN's per-object metadata that stores stack depot handles when the object is initialized and when it's evicted from the quarantine. Note that stack_depot_put is no-op if the handle is 0. Link: https://lkml.kernel.org/r/5cef104d9b842899489b4054fe8d1339a71acee0.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 2d5524635b00fc90016577e1a18c21682b1bb913 Author: Andrey Konovalov Date: Thu Nov 23 00:12:02 2023 +0100 slub, kasan: improve interaction of KASAN and slub_debug poisoning When both KASAN and slub_debug are enabled, when a free object is being prepared in setup_object, slub_debug poisons the object data before KASAN initializes its per-object metadata. Right now, in setup_object, KASAN only initializes the alloc metadata, which is always stored outside of the object. slub_debug is aware of this and it skips poisoning and checking that memory area. However, with the following patch in this series, KASAN also starts initializing its free medata in setup_object. As this metadata might be stored within the object, this initialization might overwrite the slub_debug poisoning. This leads to slub_debug reports. Thus, skip checking slub_debug poisoning of the object data area that overlaps with the in-object KASAN free metadata. Also make slub_debug poisoning of tail kmalloc redzones more precise when KASAN is enabled: slub_debug can still poison and check the tail kmalloc allocation area that comes after the KASAN free metadata. Link: https://lkml.kernel.org/r/20231122231202.121277-1-andrey.konovalov@linux.dev Signed-off-by: Andrey Konovalov Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Feng Tang Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f816938bff1f772ce7949e5747734be27ecf7f4d Author: Andrey Konovalov Date: Mon Nov 20 18:47:18 2023 +0100 kasan: use stack_depot_put for tag-based modes Make tag-based KASAN modes evict stack traces from the stack depot once they are evicted from the stack ring. Internally, pass STACK_DEPOT_FLAG_GET to stack_depot_save_flags (via kasan_save_stack) to increment the refcount when saving a new entry to stack ring and call stack_depot_put when removing an entry from stack ring. Link: https://lkml.kernel.org/r/b4773e5c1b0b9df6826ec0b65c1923feadfa78e5.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 7d88e4f768b0fdb85b68f0e4679bb10fdb05c808 Author: Andrey Konovalov Date: Mon Nov 20 18:47:17 2023 +0100 kasan: check object_size in kasan_complete_mode_report_info Check the object size when looking up entries in the stack ring. If the size of the object for which a report is being printed does not match the size of the object for which a stack trace has been saved in the stack ring, the saved stack trace is irrelevant. Link: https://lkml.kernel.org/r/68c6948175aadd7e7e7deea61725103d64a4528f.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit f3b5979862994089005d48ad2ce5b6a9735981fe Author: Andrey Konovalov Date: Mon Nov 20 18:47:16 2023 +0100 kasan: remove atomic accesses to stack ring entries Remove the atomic accesses to entry fields in save_stack_info and kasan_complete_mode_report_info for tag-based KASAN modes. These atomics are not required, as the read/write lock prevents the entries from being read (in kasan_complete_mode_report_info) while being written (in save_stack_info) and the try_cmpxchg prevents the same entry from being rewritten (in save_stack_info) in the unlikely case of wrapping during writing. Link: https://lkml.kernel.org/r/29f59126d9845c5257b6c29cd7ad113b16f19f47.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 108be8def46e9422f5a5abc96b0ab8fb6b3fb344 Author: Andrey Konovalov Date: Mon Nov 20 18:47:15 2023 +0100 lib/stackdepot: allow users to evict stack traces Add stack_depot_put, a function that decrements the reference counter on a stack record and removes it from the stack depot once the counter reaches 0. Internally, when removing a stack record, the function unlinks it from the hash table bucket and returns to the freelist. With this change, the users of stack depot can call stack_depot_put when keeping a stack trace in the stack depot is not needed anymore. This allows avoiding polluting the stack depot with irrelevant stack traces and thus have more space to store the relevant ones before the stack depot reaches its capacity. Link: https://lkml.kernel.org/r/1d1ad5692ee43d4fc2b3fd9d221331d30b36123f.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 410b764f89f59cce858d94fc781b68c1f27a0ca9 Author: Andrey Konovalov Date: Mon Nov 20 18:47:14 2023 +0100 lib/stackdepot: add refcount for records Add a reference counter for how many times a stack records has been added to stack depot. Add a new STACK_DEPOT_FLAG_GET flag to stack_depot_save_flags that instructs the stack depot to increment the refcount. Do not yet decrement the refcount; this is implemented in one of the following patches. Do not yet enable any users to use the flag to avoid overflowing the refcount. This is preparatory patch for implementing the eviction of stack records from the stack depot. Link: https://lkml.kernel.org/r/a3fc14a2359d019d2a008d4ff8b46a665371ffee.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 022012dcf44209074af97b6ae531a10c08736b31 Author: Andrey Konovalov Date: Mon Nov 20 18:47:13 2023 +0100 lib/stackdepot, kasan: add flags to __stack_depot_save and rename Change the bool can_alloc argument of __stack_depot_save to a u32 argument that accepts a set of flags. The following patch will add another flag to stack_depot_save_flags besides the existing STACK_DEPOT_FLAG_CAN_ALLOC. Also rename the function to stack_depot_save_flags, as __stack_depot_save is a cryptic name, Link: https://lkml.kernel.org/r/645fa15239621eebbd3a10331e5864b718839512.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 3bddc3100c20139341212acdb8c472c3f07af6a8 Author: Andrey Konovalov Date: Mon Nov 20 18:47:12 2023 +0100 kmsan: use stack_depot_save instead of __stack_depot_save Make KMSAN use stack_depot_save instead of __stack_depot_save, as it always passes true to __stack_depot_save as the last argument. Link: https://lkml.kernel.org/r/18092240699efdc6acd78b51e41ea782953e6c8d.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4805180bc165238c3d845a992a5962ee87097c15 Author: Andrey Konovalov Date: Mon Nov 20 18:47:11 2023 +0100 lib/stackdepot: use list_head for stack record links Switch stack_record to use list_head for links in the hash table and in the freelist. This will allow removing entries from the hash table buckets. This is preparatory patch for implementing the eviction of stack records from the stack depot. Link: https://lkml.kernel.org/r/4787d9a584cd33433d9ee1846b17fa3d3e1987ad.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit a6cd957021f2bbbe0f02e5c32389eb4c06aa97c8 Author: Andrey Konovalov Date: Mon Nov 20 18:47:10 2023 +0100 lib/stackdepot: use read/write lock Currently, stack depot uses the following locking scheme: 1. Lock-free accesses when looking up a stack record, which allows to have multiple users to look up records in parallel; 2. Spinlock for protecting the stack depot pools and the hash table when adding a new record. For implementing the eviction of stack traces from stack depot, the lock-free approach is not going to work anymore, as we will need to be able to also remove records from the hash table. Convert the spinlock into a read/write lock, and drop the atomic accesses, as they are no longer required. Looking up stack traces is now protected by the read lock and adding new records - by the write lock. One of the following patches will add a new function for evicting stack records, which will be protected by the write lock as well. With this change, multiple users can still look up records in parallel. This is preparatory patch for implementing the eviction of stack records from the stack depot. Link: https://lkml.kernel.org/r/9f81ffcc4bb422ebb6326a65a770bf1918634cbb.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit b29d31885814003245e2e36373bef4ea6721f114 Author: Andrey Konovalov Date: Mon Nov 20 18:47:09 2023 +0100 lib/stackdepot: store free stack records in a freelist Instead of using the global pool_offset variable to find a free slot when storing a new stack record, mainlain a freelist of free slots within the allocated stack pools. A global next_stack variable is used as the head of the freelist, and the next field in the stack_record struct is reused as freelist link (when the record is not in the freelist, this field is used as a link in the hash table). This is preparatory patch for implementing the eviction of stack records from the stack depot. Link: https://lkml.kernel.org/r/b9e4c79955c2121b69301778643b203d3fb09ccc.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit a5d21f71715a0459e5313881203f86eefbeefb3b Author: Andrey Konovalov Date: Mon Nov 20 18:47:08 2023 +0100 lib/stackdepot: store next pool pointer in new_pool Instead of using the last pointer in stack_pools for storing the pointer to a new pool (which does not yet store any stack records), use a new new_pool variable. This a purely code readability change: it seems more logical to store the pointer to a pool with a special meaning in a dedicated variable. Link: https://lkml.kernel.org/r/448bc18296c16bef95cb3167697be6583dcc8ce3.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit b6a353d3ebc2b5eea3cab81ed81764bb1dd6f4ab Author: Andrey Konovalov Date: Mon Nov 20 18:47:07 2023 +0100 lib/stackdepot: rename next_pool_required to new_pool_required Rename next_pool_required to new_pool_required. This a purely code readability change: the following patch will change stack depot to store the pointer to the new pool in a separate variable, and "new" seems like a more logical name. Link: https://lkml.kernel.org/r/fd7cd6c6eb250c13ec5d2009d75bb4ddd1470db9.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 94b7d32870298be93b67bceb0470936c54fb2007 Author: Andrey Konovalov Date: Mon Nov 20 18:47:06 2023 +0100 lib/stackdepot: rework helpers for depot_alloc_stack Split code in depot_alloc_stack and depot_init_pool into 3 functions: 1. depot_keep_next_pool that keeps preallocated memory for the next pool if required. 2. depot_update_pools that moves on to the next pool if there's no space left in the current pool, uses preallocated memory for the new current pool if required, and calls depot_keep_next_pool otherwise. 3. depot_alloc_stack that calls depot_update_pools and then allocates a stack record as before. This makes it somewhat easier to follow the logic of depot_alloc_stack and also serves as a preparation for implementing the eviction of stack records from the stack depot. Link: https://lkml.kernel.org/r/71fb144d42b701fcb46708d7f4be6801a4a8270e.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit fcccc41ecb0c96e59c471c389cd708014be2efc8 Author: Andrey Konovalov Date: Mon Nov 20 18:47:05 2023 +0100 lib/stackdepot: fix and clean-up atomic annotations Drop smp_load_acquire from next_pool_required in depot_init_pool, as both depot_init_pool and the all smp_store_release's to this variable are executed under the stack depot lock. Also simplify and clean up comments accompanying the use of atomic accesses in the stack depot code. Link: https://lkml.kernel.org/r/c118ef044d8db80248d9e1f14592c72e8429e9d9.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit fc60e0caa94dd7ca0e97a1d42527f71c9d51cd2d Author: Andrey Konovalov Date: Mon Nov 20 18:47:04 2023 +0100 lib/stackdepot: use fixed-sized slots for stack records Instead of storing stack records in stack depot pools one right after another, use fixed-sized slots. Add a new Kconfig option STACKDEPOT_MAX_FRAMES that allows to select the size of the slot in frames. Use 64 as the default value, which is the maximum stack trace size both KASAN and KMSAN use right now. Also add descriptions for other stack depot Kconfig options. This is preparatory patch for implementing the eviction of stack records from the stack depot. Link: https://lkml.kernel.org/r/dce7d030a99ff61022509665187fac45b0827298.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 83130ab2d8a49e86c70d628d1446a84c8e6ad1a4 Author: Andrey Konovalov Date: Mon Nov 20 18:47:03 2023 +0100 lib/stackdepot: add depot_fetch_stack helper Add a helper depot_fetch_stack function that fetches the pointer to a stack record. With this change, all static depot_* functions now operate on stack pools and the exported stack_depot_* functions operate on the hash table. Link: https://lkml.kernel.org/r/170d8c202f29dc8e3d5491ee074d1e9e029a46db.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 5f9ce55e020742e3c86a06941fbe9f37f9c022dd Author: Andrey Konovalov Date: Mon Nov 20 18:47:02 2023 +0100 lib/stackdepot: drop valid bit from handles Stack depot doesn't use the valid bit in handles in any way, so drop it. Link: https://lkml.kernel.org/r/34969bba2ca6e012c6ad071767197dee64dc5723.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 603c000c115b40be75063af1a1e75a3b40d3a523 Author: Andrey Konovalov Date: Mon Nov 20 18:47:01 2023 +0100 lib/stackdepot: simplify __stack_depot_save The retval local variable in __stack_depot_save has the union type handle_parts, but the function never uses anything but the union's handle field. Define retval simply as depot_stack_handle_t to simplify the code. Link: https://lkml.kernel.org/r/3b0763c8057a1cf2f200ff250a5f9580ee36a28c.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 0c5d44a8142d1ede05943845793d3d8a2f10c338 Author: Andrey Konovalov Date: Mon Nov 20 18:47:00 2023 +0100 lib/stackdepot: check disabled flag when fetching Do not try fetching a stack trace from the stack depot if the stack_depot_disabled flag is enabled. Link: https://lkml.kernel.org/r/c3bfa3b7ab00b2e48ab75a3fbb9c67555777cb08.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Marco Elver Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 4d07a037231c985f8c990c9cf1c304bbe31bb764 Author: Andrey Konovalov Date: Mon Nov 20 18:46:59 2023 +0100 lib/stackdepot: print disabled message only if truly disabled Patch series "stackdepot: allow evicting stack traces", v4. Currently, the stack depot grows indefinitely until it reaches its capacity. Once that happens, the stack depot stops saving new stack traces. This creates a problem for using the stack depot for in-field testing and in production. For such uses, an ideal stack trace storage should: 1. Allow saving fresh stack traces on systems with a large uptime while limiting the amount of memory used to store the traces; 2. Have a low performance impact. Implementing #1 in the stack depot is impossible with the current keep-forever approach. This series targets to address that. Issue #2 is left to be addressed in a future series. This series changes the stack depot implementation to allow evicting unneeded stack traces from the stack depot. The users of the stack depot can do that via new stack_depot_save_flags(STACK_DEPOT_FLAG_GET) and stack_depot_put APIs. Internal changes to the stack depot code include: 1. Storing stack traces in fixed-frame-sized slots (vs precisely-sized slots in the current implementation); the slot size is controlled via CONFIG_STACKDEPOT_MAX_FRAMES (default: 64 frames); 2. Keeping available slots in a freelist (vs keeping an offset to the next free slot); 3. Using a read/write lock for synchronization (vs a lock-free approach combined with a spinlock). This series also integrates the eviction functionality into KASAN: the tag-based modes evict stack traces when the corresponding entry leaves the stack ring, and Generic KASAN evicts stack traces for objects once those leave the quarantine. With KASAN, despite wasting some space on rounding up the size of each stack record, the total memory consumed by stack depot gets saturated due to the eviction of irrelevant stack traces from the stack depot. With the tag-based KASAN modes, the average total amount of memory used for stack traces becomes ~0.5 MB (with the current default stack ring size of 32k entries and the default CONFIG_STACKDEPOT_MAX_FRAMES of 64). With Generic KASAN, the stack traces take up ~1 MB per 1 GB of RAM (as the quarantine's size depends on the amount of RAM). However, with KMSAN, the stack depot ends up using ~4x more memory per a stack trace than before. Thus, for KMSAN, the stack depot capacity is increased accordingly. KMSAN uses a lot of RAM for shadow memory anyway, so the increased stack depot memory usage will not make a significant difference. Other users of the stack depot do not save stack traces as often as KASAN and KMSAN. Thus, the increased memory usage is taken as an acceptable trade-off. In the future, these other users can take advantage of the eviction API to limit the memory waste. There is no measurable boot time performance impact of these changes for KASAN on x86-64. I haven't done any tests for arm64 modes (the stack depot without performance optimizations is not suitable for intended use of those anyway), but I expect a similar result. Obtaining and copying stack trace frames when saving them into stack depot is what takes the most time. This series does not yet provide a way to configure the maximum size of the stack depot externally (e.g. via a command-line parameter). This will be added in a separate series, possibly together with the performance improvement changes. This patch (of 22): Currently, if stack_depot_disable=off is passed to the kernel command-line after stack_depot_disable=on, stack depot prints a message that it is disabled, while it is actually enabled. Fix this by moving printing the disabled message to stack_depot_early_init. Place it before the __stack_depot_early_init_requested check, so that the message is printed even if early stack depot init has not been requested. Also drop the stack_table = NULL assignment from disable_stack_depot, as stack_table is NULL by default. Link: https://lkml.kernel.org/r/cover.1700502145.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/73a25c5fff29f3357cd7a9330e85e09bc8da2cbe.1700502145.git.andreyknvl@google.com Fixes: e1fdc403349c ("lib: stackdepot: add support to disable stack depot") Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Oscar Salvador Cc: Vlastimil Babka Signed-off-by: Andrew Morton commit 52c5d2bc32133966974edb8d8c49bf7763101622 Author: Jim Cromie Date: Thu Nov 16 15:43:18 2023 -0700 kmemleak: add checksum to backtrace report Change /sys/kernel/debug/kmemleak report format slightly, adding "(extra info)" to the backtrace header: from: " backtrace:" to: " backtrace (crc ):" The allows a user to see recurring backtraces without detailed/careful reading of multiline stacks. So after cycling kmemleak-test a few times, I know some leaks are repeating. bash-5.2# grep backtrace /sys/kernel/debug/kmemleak | wc 62 186 1792 bash-5.2# grep backtrace /sys/kernel/debug/kmemleak | sort -u | wc 37 111 1067 syzkaller parses kmemleak for "unreferenced object" only, so is unaffected by this change. Other github repos are moribund. Link: https://lkml.kernel.org/r/20231116224318.124209-3-jim.cromie@gmail.com Signed-off-by: Jim Cromie Reviewed-by: Catalin Marinas Signed-off-by: Andrew Morton commit 88f9ee2b3040991ff40628fa9e3516ebe36dd6fa Author: Jim Cromie Date: Thu Nov 16 15:43:17 2023 -0700 kmemleak: drop (age ) from leak record Patch series "tweak kmemleak report format". These 2 patches make minor changes to the report: 1st strips "age " from output. This makes the output idempotent; unchanging until a new leak is reported. 2nd adds the backtrace.checksum to the "backtrace:" line. This lets a user see repeats without actually reading the whole backtrace. So now the backtrace line looks like this: backtrace (crc 603070071): I surveyed for un-wanted effects upon users: Syzkaller parses kmemleak in executor/common_linux.h: static void check_leaks(char** frames, int nframes) It just counts occurrences of "unreferenced object", specifically it does not look for "age", nor would it choke on "crc" being added. github has 3 repos with "kmemleak" mentioned, all are moribund. gitlab has 0 hits on "kmemleak". This patch (of 2): Displaying age is pretty, but counter-productive; it changes with current-time, so it surrenders idempotency of the output, which breaks simple hash-based cataloging of the records by the user. The trouble: sequential reads, wo new leaks, get new results: :#> sum /sys/kernel/debug/kmemleak 53439 74 /sys/kernel/debug/kmemleak :#> sum /sys/kernel/debug/kmemleak 59066 74 /sys/kernel/debug/kmemleak and age is why (nothing else changes): :#> grep -v age /sys/kernel/debug/kmemleak | sum 58894 67 :#> grep -v age /sys/kernel/debug/kmemleak | sum 58894 67 Since jiffies is already printed in the "comm" line, age adds nothing. Notably, syzkaller reads kmemleak only for "unreferenced object", and won't care about this reform of age-ism. A few moribund github repos mention it, but don't compile. Link: https://lkml.kernel.org/r/20231116224318.124209-1-jim.cromie@gmail.com Link: https://lkml.kernel.org/r/20231116224318.124209-2-jim.cromie@gmail.com Signed-off-by: Jim Cromie Reviewed-by: Catalin Marinas Signed-off-by: Andrew Morton commit af7628d6ec196999175ecb3fdb38336489b0f88a Author: Matthew Wilcox (Oracle) Date: Fri Nov 17 16:14:47 2023 +0000 fs: convert error_remove_page to error_remove_folio There were already assertions that we were not passing a tail page to error_remove_page(), so make the compiler enforce that by converting everything to pass and use a folio. Link: https://lkml.kernel.org/r/20231117161447.2461643-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit e130b6514e14e98ad1f59bf1fc0a5c0f21c6d8ab Author: Matthew Wilcox (Oracle) Date: Fri Nov 17 16:14:46 2023 +0000 memory-failure: convert truncate_error_page to truncate_error_folio Both callers now have a folio, so pass it in. Nothing downstream was expecting a tail page; that's asserted in generic_error_remove_page(), for example. Link: https://lkml.kernel.org/r/20231117161447.2461643-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit b6fd410c32f1a66a52a42d6aae1ab7b011b74547 Author: Matthew Wilcox (Oracle) Date: Fri Nov 17 16:14:45 2023 +0000 memory-failure: use a folio in me_huge_page() This function was already explicitly calling compound_head(); unfortunately the compiler can't know that and elide the redundant calls to compound_head() buried in page_mapping(), unlock_page(), etc. Switch to using a folio, which does let us elide these calls. Link: https://lkml.kernel.org/r/20231117161447.2461643-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit f7092393570f24865199d1642eb097f9e1c8f01e Author: Matthew Wilcox (Oracle) Date: Fri Nov 17 16:14:44 2023 +0000 memory-failure: convert delete_from_lru_cache() to take a folio All three callers now have a folio; pass it in instead of the page. Saves five calls to compound_head(). Link: https://lkml.kernel.org/r/20231117161447.2461643-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit 6304b531cd8f568ed2b8d680837b8ceebe175b89 Author: Matthew Wilcox (Oracle) Date: Fri Nov 17 16:14:43 2023 +0000 memory-failure: use a folio in me_pagecache_dirty() Replaces three hidden calls to compound_head() with one visible one. Link: https://lkml.kernel.org/r/20231117161447.2461643-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit 3d47e31790b784ec9a6f052fda683c536e272e4f Author: Matthew Wilcox (Oracle) Date: Fri Nov 17 16:14:42 2023 +0000 memory-failure: use a folio in me_pagecache_clean() Patch series "Convert aops->error_remove_page to ->error_remove_folio". This is a memory-failure patch series which converts a lot of uses of page APIs into folio APIs with the usual benefits. This patch (of 6): Replaces three hidden calls to compound_head() with one visible one. Fix up a few comments while I'm modifying this function. Link: https://lkml.kernel.org/r/20231117161447.2461643-1-willy@infradead.org Link: https://lkml.kernel.org/r/20231117161447.2461643-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit 2e16898d0df88e52b26e8bd110cdc4e687217426 Author: Sergey Senozhatsky Date: Wed Nov 15 11:42:13 2023 +0900 zram: tweak writeback config help Writeback is for incompressible and idle zram pages. Link: https://lkml.kernel.org/r/20231115024223.4133148-2-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Dmytro Maluka Signed-off-by: Andrew Morton commit a7a0350583ba51d8cde6180bb51d704b89a3b29e Author: Sergey Senozhatsky Date: Wed Nov 15 11:42:12 2023 +0900 zram: split memory-tracking and ac-time tracking ZRAM_MEMORY_TRACKING enables two features: - per-entry ac-time tracking - debugfs interface The latter one is the reason why memory-tracking depends on DEBUG_FS, while the former one is used far beyond debugging these days. Namely ac-time is used for fine grained writeback of idle entries (pages). Move ac-time tracking under its own config option so that it can be enabled (along with writeback) on systems without DEBUG_FS. [senozhatsky@chromium.org: ifdef fixup, per Dmytro] Link: https://lkml.kernel.org/r/20231117013543.540280-1-senozhatsky@chromium.org Link: https://lkml.kernel.org/r/20231115024223.4133148-1-senozhatsky@chromium.org Signed-off-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Dmytro Maluka Signed-off-by: Andrew Morton commit 1b5c65b64cd417c801945b26a2a50c4d4eefaec8 Author: Barry Song <21cnbao@gmail.com> Date: Tue Nov 14 16:42:02 2023 +1300 mm/page_owner: record and dump free_pid and free_tgid While investigating some complex memory allocation and free bugs especially in multi-processes and multi-threads cases, from time to time, I feel the free stack isn't sufficient as a page can be freed by processes or threads other than the one allocating it. And other processes and threads which free the page often have the exactly same free stack with the one allocating the page. We can't know who free the page only through the free stack though the current page_owner does tell us the pid and tgid of the one allocating the page. This makes the bug investigation often hard. So this patch adds free pid and tgid in page_owner, so that we can easily figure out if the freeing is crossing processes or threads. Link: https://lkml.kernel.org/r/20231114034202.73098-1-v-songbaohua@oppo.com Signed-off-by: Barry Song Cc: Audra Mitchell Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Joonsoo Kim Cc: Kassey Li Cc: Kemeng Shi Signed-off-by: Andrew Morton commit 20954c122f1bb09af095a51b66ddead13b6c6ef4 Author: Anshuman Khandual Date: Tue Nov 14 12:04:56 2023 +0530 Documentation/mm: drop pte_bad() descriptions from arch page table helpers pte_bad() never existed unlike similar helpers at PMU, PUD, and PGD level. This was added erroneously and hence should be dropped instead. Link: https://lkml.kernel.org/r/20231114063456.339652-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Rick Edgecombe Cc: Jonathan Corbet Cc: Andrew Morton Signed-off-by: Andrew Morton commit 83a6fdd6c27d4f6f51fa1092805676b24e0f8827 Author: Paul Heidekrüger Date: Thu Nov 9 15:51:00 2023 +0000 kasan: default to inline instrumentation KASan inline instrumentation can yield up to a 2x performance gain at the cost of a larger binary. Make inline instrumentation the default, as suggested in the bug report below. When an architecture does not support inline instrumentation, it should set ARCH_DISABLE_KASAN_INLINE, as done by PowerPC, for instance. Link: https://lkml.kernel.org/r/20231109155101.186028-1-paul.heidekrueger@tum.de Signed-off-by: Paul Heidekrüger Reported-by: Andrey Konovalov Reviewed-by: Marco Elver Closes: https://bugzilla.kernel.org/show_bug.cgi?id=203495 Acked-by: Andrey Konovalov Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Vincenzo Frascino Signed-off-by: Andrew Morton commit 932b59e3beaefefb1a0bd65f1bb3f9e2000d7315 Author: York Jasper Niebuhr Date: Sat Nov 11 19:48:59 2023 +0100 mm: fix process_vm_rw page counts 1. There is a "-1" missing in the page number calculation in process_vm_rw_core. While this can't break anything, it can cause unnecessary allocations in certain cases: Consider handling an iovec ranging over PVM_MAX_PP_ARRAY_COUNT pages that is also aligned to a page boundary. While pp_stack could hold references to such an amount of pinned pages, nr_pages yields (PVM_MAX_PP_ARRAY + 1) in process_vm_rw_core. Consequently, a larger buffer is allocated with kmalloc for no reason. For any page boundary aligned iovec that is a multiple of PAGE_SIZE and larger than PVM_MAX_PP_ARRAY_COUNT pages, nr_pages will be too big by 1 and thus kmalloc allocates excess space for one more pointer. 2. max_pages_per_loop is constant and there is no reason to have it as a variable. A macro does the job just fine and saves memory. 3. Replaced "sizeof(struct pages *)" with "sizeof(struct page *)" to have matching types for allocation and prevent confusion. Link: https://lkml.kernel.org/r/20231111184859.44264-1-yjnworkstation@gmail.com Signed-off-by: York Jasper Niebuhr Signed-off-by: Andrew Morton commit 69e583eaca579d50ffc699b1f4358258e75fa008 Author: Lukas Bulwahn Date: Mon Nov 13 13:47:28 2023 +0100 mmap: remove the IA64-specific vma expansion implementation With commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"), there is no need to keep the IA64-specific vma expansion. Clean up the IA64-specific vma expansion implementation. Link: https://lkml.kernel.org/r/20231113124728.3974-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Acked-by: David Hildenbrand Cc: Ard Biesheuvel Signed-off-by: Andrew Morton commit 16f5dfbc851b55b87101a20e181d4a14be3007d6 Author: Matthew Wilcox (Oracle) Date: Thu Nov 9 21:15:07 2023 +0000 gfp: include __GFP_NOWARN in GFP_NOWAIT GFP_NOWAIT callers are always prepared for their allocations to fail because they fail so frequently. Forcing the callers to remember to add __GFP_NOWARN is just annoying and leads to an endless stream of patches for the places where we forgot to add it. We can now remove __GFP_NOWARN from all the callers which specify GFP_NOWAIT, but I'd rather wait a cycle and send patches to each maintainer instead of creating a big pile of merge conflicts. Link: https://lkml.kernel.org/r/20231109211507.2262419-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 17b46e7beb8fe4e4807f70aaa615cf50a5ba9d3a Author: Brendan Jackman Date: Wed Nov 8 16:49:20 2023 +0000 mm/page_alloc: dedupe some memcg uncharging logic The duplication makes it seem like some work is required before uncharging in the !PageHWPoison case. But it isn't, so we can simplify the code a little. Note the PageMemcgKmem check is redundant, but I've left it in as it avoids an unnecessary function call. Link: https://lkml.kernel.org/r/20231108164920.3401565-1-jackmanb@google.com Signed-off-by: Brendan Jackman Reviewed-by: Yosry Ahmed Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton commit 2033c98cce666b0d125ae956613ab5111bb8d202 Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 18:28:09 2023 +0000 mm: remove invalidate_inode_page() All callers are now converted to call mapping_evict_folio(). Link: https://lkml.kernel.org/r/20231108182809.602073-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit 761d79fbad2a424a240a351b898b54eb674d3bdc Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 18:28:08 2023 +0000 mm: convert isolate_page() to mf_isolate_folio() The only caller now has a folio, so pass it in and operate on it. Saves many page->folio conversions and introduces only one folio->page conversion when calling isolate_movable_page(). Link: https://lkml.kernel.org/r/20231108182809.602073-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit 049b26048dd287d52f6f6fbe5eafa301fdca5d37 Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 18:28:07 2023 +0000 mm: convert soft_offline_in_use_page() to use a folio Replace the existing head-page logic with folio logic. Link: https://lkml.kernel.org/r/20231108182809.602073-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit 19369d866a8b89788cdc9b10c7b8c9b2777f806b Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 18:28:06 2023 +0000 mm: use mapping_evict_folio() in truncate_error_page() We already have the folio and the mapping, so replace the call to invalidate_inode_page() with mapping_evict_folio(). Link: https://lkml.kernel.org/r/20231108182809.602073-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit 01d1e0e6b7d99ebaf2e42d2205595080b7d0c271 Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 18:28:05 2023 +0000 mm: convert __do_fault() to use a folio Convert vmf->page to a folio as soon as we're going to use it. This fixes a bug if the fault handler returns a tail page with hardware poison; tail pages have an invalid page->index, so we would fail to unmap the page from the page tables. We actually have to unmap the entire folio (or mapping_evict_folio() will fail), so use unmap_mapping_folio() instead. This also saves various calls to compound_head() hidden in lock_page(), put_page(), etc. Link: https://lkml.kernel.org/r/20231108182809.602073-3-willy@infradead.org Fixes: 793917d997df ("mm/readahead: Add large folio readahead") Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit 1e12cbb9f69541181afab6b1ff358b4f1dd3e253 Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 18:28:04 2023 +0000 mm: make mapping_evict_folio() the preferred way to evict clean folios Patch series "Fix fault handler's handling of poisoned tail pages". Since introducing the ability to have large folios in the page cache, it's been possible to have a hwpoisoned tail page returned from the fault handler. We handle this situation poorly; failing to remove the affected page from use. This isn't a minimal patch to fix it, it's a full conversion of all the code surrounding it. This patch (of 6): invalidate_inode_page() does very little beyond calling mapping_evict_folio(). Move the check for mapping being NULL into mapping_evict_folio() and make it available to the rest of the MM for use in the next few patches. Link: https://lkml.kernel.org/r/20231108182809.602073-1-willy@infradead.org Link: https://lkml.kernel.org/r/20231108182809.602073-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: Naoya Horiguchi Signed-off-by: Andrew Morton commit b5612c368648a7be52411b288d09593e5945d1aa Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 20:46:05 2023 +0000 mm: return void from folio_start_writeback() and related functions Nobody now checks the return value from any of these functions, so add an assertion at the beginning of the function and return void. Link: https://lkml.kernel.org/r/20231108204605.745109-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Josef Bacik Cc: David Howells Cc: Steve French Signed-off-by: Andrew Morton commit a9540e35624d1475f47dbf6353eed8b99936d36e Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 20:46:04 2023 +0000 smb: do not test the return value of folio_start_writeback() In preparation for removing the return value entirely, stop testing it in smb. Link: https://lkml.kernel.org/r/20231108204605.745109-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: David Howells Cc: Steve French Signed-off-by: Andrew Morton commit 8525d5984b7b061ba02469cb58c17d1a1b98eb12 Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 20:46:03 2023 +0000 afs: do not test the return value of folio_start_writeback() In preparation for removing the return value entirely, stop testing it in afs. Link: https://lkml.kernel.org/r/20231108204605.745109-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: David Howells Cc: Steve French Signed-off-by: Andrew Morton commit c36f9d3d2c3e17f9eef1d2f47a63c91d51d55e87 Author: Matthew Wilcox (Oracle) Date: Wed Nov 8 20:46:02 2023 +0000 mm: remove test_set_page_writeback() Patch series "Make folio_start_writeback return void". Most of the folio flag-setting functions return void. folio_start_writeback is gratuitously different; the only two filesystems that do anything with the return value emit debug messages if it's already set, and we can (and should) do that internally without bothering the filesystem to do it. This patch (of 4): There are no more callers of this wrapper. Link: https://lkml.kernel.org/r/20231108204605.745109-1-willy@infradead.org Link: https://lkml.kernel.org/r/20231108204605.745109-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: David Howells Cc: Steve French Signed-off-by: Andrew Morton commit 78c3c11268c38c5fb5b58f6be1bb018f3f1c195e Author: Matthew Wilcox (Oracle) Date: Tue Nov 7 21:26:42 2023 +0000 gfs2: convert stuffed_readpage() to stuffed_read_folio() Use folio_fill_tail() to implement the unstuffing and folio_end_read() to simultaneously mark the folio uptodate and unlock it. Unifies a couple of code paths. Link: https://lkml.kernel.org/r/20231107212643.3490372-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Andreas Gruenbacher Cc: Andreas Dilger Cc: Darrick J. Wong Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit 6eaa266b54660f6b3654ad8902b4f7027054f55a Author: Matthew Wilcox (Oracle) Date: Tue Nov 7 21:26:41 2023 +0000 mm: add folio_fill_tail() and use it in iomap The iomap code was limited to PAGE_SIZE bytes; generalise it to cover an arbitrary-sized folio, and move it to be a common helper. [akpm@linux-foundation.org: fix folio_fill_tail(), per Andreas Gruenbacher] Link: https://lkml.kernel.org/r/20231107212643.3490372-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Andreas Gruenbacher Cc: Andreas Dilger Cc: Darrick J. Wong Cc: Theodore Ts'o Cc: Andreas Gruenbacher Signed-off-by: Andrew Morton commit a4fc4a0c45f2617c3aa8b693739de264e0c09909 Author: Matthew Wilcox (Oracle) Date: Tue Nov 7 21:26:40 2023 +0000 mm: add folio_zero_tail() and use it in ext4 Patch series "Add folio_zero_tail() and folio_fill_tail()". I'm trying to make it easier for filesystems with tailpacking / stuffing / inline data to use folios. The primary function here is folio_fill_tail(). You give it a pointer to memory where the data currently is, and it takes care of copying it into the folio at that offset. That works for gfs2 & iomap. Then There's Ext4. Rather than gin up some kind of specialist "Here's a two pointers to two blocks of memory" routine, just let it do its current thing, and let it call folio_zero_tail(), which is also called by folio_fill_tail(). Other filesystems can be converted later; these ones seemed like good examples as they're already partly or completely converted to folios. This patch (of 3): Instead of unmapping the folio after copying the data to it, then mapping it again to zero the tail, provide folio_zero_tail() to zero the tail of an already-mapped folio. [akpm@linux-foundation.org: fix kerneldoc argument ordering] Link: https://lkml.kernel.org/r/20231107212643.3490372-1-willy@infradead.org Link: https://lkml.kernel.org/r/20231107212643.3490372-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Andreas Gruenbacher Cc: Darrick J. Wong Cc: Theodore Ts'o Signed-off-by: Andrew Morton commit 600bca580579d8d8454cc8fe3290e2f8b9c01884 Author: Andrei Vagin Date: Mon Nov 6 14:09:59 2023 -0800 selftests/mm: check that PAGEMAP_SCAN returns correct categories Right now, tests read page flags from /proc/pid/pagemap files. With this change, tests will check that PAGEMAP_SCAN return correct information too. [colin.i.king@gmail.com: fix spelling mistake "succedded" -> "succeeded"] Link: https://lkml.kernel.org/r/20231121093104.1728332-1-colin.i.king@gmail.com Link: https://lkml.kernel.org/r/20231106220959.296568-2-avagin@google.com Signed-off-by: Andrei Vagin Signed-off-by: Colin Ian King Reviewed-by: Muhammad Usama Anjum Tested-by: Muhammad Usama Anjum Cc: Michał Mirosław [avagin@google.com: allow running tests on old kernels] Link: https://lkml.kernel.org/r/20231117181127.2574897-1-avagin@google.com Signed-off-by: Andrew Morton commit e6a9a2cbc13bf43e4c03f57666e93d511249d5d7 Author: Andrei Vagin Date: Mon Nov 6 14:09:58 2023 -0800 fs/proc/task_mmu: report SOFT_DIRTY bits through the PAGEMAP_SCAN ioctl The PAGEMAP_SCAN ioctl returns information regarding page table entries. It is more efficient compared to reading pagemap files. CRIU can start to utilize this ioctl, but it needs info about soft-dirty bits to track memory changes. We are aware of a new method for tracking memory changes implemented in the PAGEMAP_SCAN ioctl. For CRIU, the primary advantage of this method is its usability by unprivileged users. However, it is not feasible to transparently replace the soft-dirty tracker with the new one. The main problem here is userfault descriptors that have to be preserved between pre-dump iterations. It means criu continues supporting the soft-dirty method to avoid breakage for current users. The new method will be implemented as a separate feature. [avagin@google.com: update tools/include/uapi/linux/fs.h] Link: https://lkml.kernel.org/r/20231107164139.576046-1-avagin@google.com Link: https://lkml.kernel.org/r/20231106220959.296568-1-avagin@google.com Signed-off-by: Andrei Vagin Reviewed-by: Muhammad Usama Anjum Cc: Michał Mirosław Signed-off-by: Andrew Morton commit 8ff252663d30f5c0bcb0bb336c1a5ed7c37d9730 Author: Minjie Du Date: Tue Nov 7 10:46:34 2023 +0800 mm/filemap: increase usage of folio_next_index() helper Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using the existing helper folio_next_index() in filemap_get_folios_contig(). Link: https://lkml.kernel.org/r/20231107024635.4512-1-duminjie@vivo.com Signed-off-by: Minjie Du Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton commit 4eca0ef49af9b2b0c52ef2b58e045ab34629796b Author: Vishal Verma Date: Tue Nov 7 00:22:43 2023 -0700 dax/kmem: allow kmem to add memory with memmap_on_memory Large amounts of memory managed by the kmem driver may come in via CXL, and it is often desirable to have the memmap for this memory on the new memory itself. Enroll kmem-managed memory for memmap_on_memory semantics if the dax region originates via CXL. For non-CXL dax regions, retain the existing default behavior of hot adding without memmap_on_memory semantics. Link: https://lkml.kernel.org/r/20231107-vv-kmem_memmap-v10-3-1253ec050ed0@intel.com Signed-off-by: Vishal Verma Reviewed-by: Jonathan Cameron Reviewed-by: David Hildenbrand Reviewed-by: "Huang, Ying" Tested-by: Li Zhijian [cxl.kmem and nvdimm.kmem] Cc: Michal Hocko Cc: Oscar Salvador Cc: Dan Williams Cc: Dave Jiang Cc: Dave Hansen Cc: Aneesh Kumar K.V Cc: Fan Ni Cc: Jeff Moyer Signed-off-by: Andrew Morton commit 6b8f0798b85aa529011570369db985a788f3003f Author: Vishal Verma Date: Tue Nov 7 00:22:42 2023 -0700 mm/memory_hotplug: split memmap_on_memory requests across memblocks The MHP_MEMMAP_ON_MEMORY flag for hotplugged memory is restricted to 'memblock_size' chunks of memory being added. Adding a larger span of memory precludes memmap_on_memory semantics. For users of hotplug such as kmem, large amounts of memory might get added from the CXL subsystem. In some cases, this amount may exceed the available 'main memory' to store the memmap for the memory being added. In this case, it is useful to have a way to place the memmap on the memory being added, even if it means splitting the addition into memblock-sized chunks. Change add_memory_resource() to loop over memblock-sized chunks of memory if caller requested memmap_on_memory, and if other conditions for it are met. Teach try_remove_memory() to also expect that a memory range being removed might have been split up into memblock sized chunks, and to loop through those as needed. This does preclude being able to use PUD mappings in the direct map; a proposal to how this could be optimized in the future is laid out here[1]. [1]: https://lore.kernel.org/linux-mm/b6753402-2de9-25b2-36e9-eacd49752b19@redhat.com/ Link: https://lkml.kernel.org/r/20231107-vv-kmem_memmap-v10-2-1253ec050ed0@intel.com Signed-off-by: Vishal Verma Suggested-by: David Hildenbrand Reviewed-by: Dan Williams Reviewed-by: "Huang, Ying" Acked-by: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Dave Jiang Cc: Dave Hansen Cc: Aneesh Kumar K.V Cc: Fan Ni Cc: Jeff Moyer Cc: Jonathan Cameron Signed-off-by: Andrew Morton commit 82b8a3b49ebde4e7246319884deeb29d6dc1b0cf Author: Vishal Verma Date: Tue Nov 7 00:22:41 2023 -0700 mm/memory_hotplug: replace an open-coded kmemdup() in add_memory_resource() Patch series "mm: use memmap_on_memory semantics for dax/kmem", v10. The dax/kmem driver can potentially hot-add large amounts of memory originating from CXL memory expanders, or NVDIMMs, or other 'device memories'. There is a chance there isn't enough regular system memory available to fit the memmap for this new memory. It's therefore desirable, if all other conditions are met, for the kmem managed memory to place its memmap on the newly added memory itself. The main hurdle for accomplishing this for kmem is that memmap_on_memory can only be done if the memory being added is equal to the size of one memblock. To overcome this, allow the hotplug code to split an add_memory() request into memblock-sized chunks, and try_remove_memory() to also expect and handle such a scenario. Patch 1 replaces an open-coded kmemdup() Patch 2 teaches the memory_hotplug code to allow for splitting add_memory() and remove_memory() requests over memblock sized chunks. Patch 3 allows the dax region drivers to request memmap_on_memory semantics. CXL dax regions default this to 'on', all others default to off to keep existing behavior unchanged. This patch (of 3): A review of the memmap_on_memory modifications to add_memory_resource() revealed an instance of an open-coded kmemdup(). Replace it with kmemdup(). Link: https://lkml.kernel.org/r/20231107-vv-kmem_memmap-v10-0-1253ec050ed0@intel.com Link: https://lkml.kernel.org/r/20231107-vv-kmem_memmap-v10-1-1253ec050ed0@intel.com Signed-off-by: Vishal Verma Reviewed-by: David Hildenbrand Reviewed-by: Fan Ni Reported-by: Dan Williams Cc: Michal Hocko Cc: Oscar Salvador Cc: Aneesh Kumar K.V Cc: Dave Hansen Cc: Dave Jiang Cc: "Huang, Ying" Cc: Jeff Moyer Cc: Jonathan Cameron Signed-off-by: Andrew Morton commit ff6c3d81f2e86b63a3a530683f89ef393882782a Author: Liam Ni Date: Thu Oct 26 10:03:29 2023 +0800 NUMA: optimize detection of memory with no node id assigned by firmware Sanity check that makes sure the nodes cover all memory loops over numa_meminfo to count the pages that have node id assigned by the firmware, then loops again over memblock.memory to find the total amount of memory and in the end checks that the difference between the total memory and memory that covered by nodes is less than some threshold. Worse, the loop over numa_meminfo calls __absent_pages_in_range() that also partially traverses memblock.memory. It's much simpler and more efficient to have a single traversal of memblock.memory that verifies that amount of memory not covered by nodes is less than a threshold. Introduce memblock_validate_numa_coverage() that does exactly that and use it instead of numa_meminfo_cover_memory(). Link: https://lkml.kernel.org/r/20231026020329.327329-1-zhiguangni01@gmail.com Signed-off-by: Liam Ni Reviewed-by: Mike Rapoport (IBM) Cc: Andy Lutomirski Cc: Bibo Mao Cc: Binbin Zhou Cc: Borislav Petkov Cc: Dave Hansen Cc: Feiyang Chen Cc: "H. Peter Anvin" Cc: Huacai Chen Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: WANG Xuerui Signed-off-by: Andrew Morton commit 3027c6f8eb9d3857aef08f401aeb7de715410525 Author: Baolin Wang Date: Mon Oct 30 09:11:47 2023 +0800 mm: huge_memory: batch tlb flush when splitting a pte-mapped THP I can observe an obvious tlb flush hotspot when splitting a pte-mapped THP on my ARM64 server, and the distribution of this hotspot is as follows: - 16.85% split_huge_page_to_list + 7.80% down_write - 7.49% try_to_migrate - 7.48% rmap_walk_anon 7.23% ptep_clear_flush + 1.52% __split_huge_page The reason is that the split_huge_page_to_list() will build migration entries for each subpage of a pte-mapped Anon THP by try_to_migrate(), or unmap for file THP, and it will clear and tlb flush for each subpage's pte. Moreover, the split_huge_page_to_list() will set TTU_SPLIT_HUGE_PMD flag to ensure the THP is already a pte-mapped THP before splitting it to some normal pages. Actually, there is no need to flush tlb for each subpage immediately, instead we can batch tlb flush for the pte-mapped THP to improve the performance. After this patch, we can see the batch tlb flush can improve the latency obviously when running thpscale. k6.5-base patched Amean fault-both-1 1071.17 ( 0.00%) 901.83 * 15.81%* Amean fault-both-3 2386.08 ( 0.00%) 1865.32 * 21.82%* Amean fault-both-5 2851.10 ( 0.00%) 2273.84 * 20.25%* Amean fault-both-7 3679.91 ( 0.00%) 2881.66 * 21.69%* Amean fault-both-12 5916.66 ( 0.00%) 4369.55 * 26.15%* Amean fault-both-18 7981.36 ( 0.00%) 6303.57 * 21.02%* Amean fault-both-24 10950.79 ( 0.00%) 8752.56 * 20.07%* Amean fault-both-30 14077.35 ( 0.00%) 10170.01 * 27.76%* Amean fault-both-32 13061.57 ( 0.00%) 11630.08 * 10.96%* Link: https://lkml.kernel.org/r/431d9fb6823036369dcb1d3b2f63732f01df21a7.1698488264.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: "Huang, Ying" Reviewed-by: Yang Shi Reviewed-by: Alistair Popple Signed-off-by: Andrew Morton commit d2406291483775ecddaee929231a39c70c08fda2 Author: Peng Zhang Date: Fri Oct 27 11:38:45 2023 +0800 fork: use __mt_dup() to duplicate maple tree in dup_mmap() In dup_mmap(), using __mt_dup() to duplicate the old maple tree and then directly replacing the entries of VMAs in the new maple tree can result in better performance. __mt_dup() uses DFS pre-order to duplicate the maple tree, so it is efficient. The average time complexity of __mt_dup() is O(n), where n is the number of VMAs. The proof of the time complexity is provided in the commit log that introduces __mt_dup(). After duplicating the maple tree, each element is traversed and replaced (ignoring the cases of deletion, which are rare). Since it is only a replacement operation for each element, this process is also O(n). Analyzing the exact time complexity of the previous algorithm is challenging because each insertion can involve appending to a node, pushing data to adjacent nodes, or even splitting nodes. The frequency of each action is difficult to calculate. The worst-case scenario for a single insertion is when the tree undergoes splitting at every level. If we consider each insertion as the worst-case scenario, we can determine that the upper bound of the time complexity is O(n*log(n)), although this is a loose upper bound. However, based on the test data, it appears that the actual time complexity is likely to be O(n). As the entire maple tree is duplicated using __mt_dup(), if dup_mmap() fails, there will be a portion of VMAs that have not been duplicated in the maple tree. To handle this, we mark the failure point with XA_ZERO_ENTRY. In exit_mmap(), if this marker is encountered, stop releasing VMAs that have not been duplicated after this point. There is a "spawn" in byte-unixbench[1], which can be used to test the performance of fork(). I modified it slightly to make it work with different number of VMAs. Below are the test results. The first row shows the number of VMAs. The second and third rows show the number of fork() calls per ten seconds, corresponding to next-20231006 and the this patchset, respectively. The test results were obtained with CPU binding to avoid scheduler load balancing that could cause unstable results. There are still some fluctuations in the test results, but at least they are better than the original performance. 21 121 221 421 821 1621 3221 6421 12821 25621 51221 112100 76261 54227 34035 20195 11112 6017 3161 1606 802 393 114558 83067 65008 45824 28751 16072 8922 4747 2436 1233 599 2.19% 8.92% 19.88% 34.64% 42.37% 44.64% 48.28% 50.17% 51.68% 53.74% 52.42% [1] https://github.com/kdlucas/byte-unixbench/tree/master Link: https://lkml.kernel.org/r/20231027033845.90608-11-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Suggested-by: Liam R. Howlett Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 8e50d32c7a89bde896945e4e572ef28ccd87bbf8 Author: Peng Zhang Date: Fri Oct 27 11:38:44 2023 +0800 maple_tree: preserve the tree attributes when destroying maple tree When destroying maple tree, preserve its attributes and then turn it into an empty tree. This allows it to be reused without needing to be reinitialized. Link: https://lkml.kernel.org/r/20231027033845.90608-10-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 446e1867e6df3cbdd19af6be8f8f4ed56176adb4 Author: Peng Zhang Date: Fri Oct 27 11:38:43 2023 +0800 maple_tree: update check_forking() and bench_forking() Updated check_forking() and bench_forking() to use __mt_dup() to duplicate maple tree. Link: https://lkml.kernel.org/r/20231027033845.90608-9-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit f670fa1caadb4ea532a89012c5451e4c6789bfcc Author: Peng Zhang Date: Fri Oct 27 11:38:42 2023 +0800 maple_tree: skip other tests when BENCH is enabled Skip other tests when BENCH is enabled so that performance can be measured in user space. Link: https://lkml.kernel.org/r/20231027033845.90608-8-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 9bc1d3cdb904170214456bca96c4924f28522ab8 Author: Peng Zhang Date: Fri Oct 27 11:38:41 2023 +0800 maple_tree: update the documentation of maple tree Introduce the new interface mtree_dup() in the documentation. Link: https://lkml.kernel.org/r/20231027033845.90608-7-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit a2587a7e8d37885dc063255f5400a66299b42e48 Author: Peng Zhang Date: Fri Oct 27 11:38:40 2023 +0800 maple_tree: add test for mtree_dup() Add test for mtree_dup(). Test by duplicating different maple trees and then comparing the two trees. Includes tests for duplicating full trees and memory allocation failures on different nodes. Link: https://lkml.kernel.org/r/20231027033845.90608-6-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 46c99e26f2f86260fed226cab217d0b3ca8dca56 Author: Peng Zhang Date: Fri Oct 27 11:38:39 2023 +0800 radix tree test suite: align kmem_cache_alloc_bulk() with kernel behavior. When kmem_cache_alloc_bulk() fails to allocate, leave the freed pointers in the array. This enables a more accurate simulation of the kernel's behavior and allows for testing potential double-free scenarios. Link: https://lkml.kernel.org/r/20231027033845.90608-5-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit fd32e4e9b7646510ee9010e0d5f8b8857d48a6f7 Author: Peng Zhang Date: Fri Oct 27 11:38:38 2023 +0800 maple_tree: introduce interfaces __mt_dup() and mtree_dup() Introduce interfaces __mt_dup() and mtree_dup(), which are used to duplicate a maple tree. They duplicate a maple tree in Depth-First Search (DFS) pre-order traversal. It uses memcopy() to copy nodes in the source tree and allocate new child nodes in non-leaf nodes. The new node is exactly the same as the source node except for all the addresses stored in it. It will be faster than traversing all elements in the source tree and inserting them one by one into the new tree. The time complexity of these two functions is O(n). The difference between __mt_dup() and mtree_dup() is that mtree_dup() handles locks internally. Analysis of the average time complexity of this algorithm: For simplicity, let's assume that the maximum branching factor of all non-leaf nodes is 16 (in allocation mode, it is 10), and the tree is a full tree. Under the given conditions, if there is a maple tree with n elements, the number of its leaves is n/16. From bottom to top, the number of nodes in each level is 1/16 of the number of nodes in the level below. So the total number of nodes in the entire tree is given by the sum of n/16 + n/16^2 + n/16^3 + ... + 1. This is a geometric series, and it has log(n) terms with base 16. According to the formula for the sum of a geometric series, the sum of this series can be calculated as (n-1)/15. Each node has only one parent node pointer, which can be considered as an edge. In total, there are (n-1)/15-1 edges. This algorithm consists of two operations: 1. Traversing all nodes in DFS order. 2. For each node, making a copy and performing necessary modifications to create a new node. For the first part, DFS traversal will visit each edge twice. Let T(ascend) represent the cost of taking one step downwards, and T(descend) represent the cost of taking one step upwards. And both of them are constants (although mas_ascend() may not be, as it contains a loop, but here we ignore it and treat it as a constant). So the time spent on the first part can be represented as ((n-1)/15-1) * (T(ascend) + T(descend)). For the second part, each node will be copied, and the cost of copying a node is denoted as T(copy_node). For each non-leaf node, it is necessary to reallocate all child nodes, and the cost of this operation is denoted as T(dup_alloc). The behavior behind memory allocation is complex and not specific to the maple tree operation. Here, we assume that the time required for a single allocation is constant. Since the size of a node is fixed, both of these symbols are also constants. We can calculate that the time spent on the second part is ((n-1)/15) * T(copy_node) + ((n-1)/15 - n/16) * T(dup_alloc). Adding both parts together, the total time spent by the algorithm can be represented as: ((n-1)/15) * (T(ascend) + T(descend) + T(copy_node) + T(dup_alloc)) - n/16 * T(dup_alloc) - (T(ascend) + T(descend)) Let C1 = T(ascend) + T(descend) + T(copy_node) + T(dup_alloc) Let C2 = T(dup_alloc) Let C3 = T(ascend) + T(descend) Finally, the expression can be simplified as: ((16 * C1 - 15 * C2) / (15 * 16)) * n - (C1 / 15 + C3). This is a linear function, so the average time complexity is O(n). Link: https://lkml.kernel.org/r/20231027033845.90608-4-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Suggested-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit b2472efe4316b2687c153919c1513a098bd82c17 Author: Peng Zhang Date: Fri Oct 27 11:38:37 2023 +0800 maple_tree: introduce {mtree,mas}_lock_nested() In some cases, nested locks may be needed, so {mtree,mas}_lock_nested is introduced. For example, when duplicating maple tree, we need to hold the locks of two trees, in which case nested locks are needed. At the same time, add the definition of spin_lock_nested() in tools for testing. Link: https://lkml.kernel.org/r/20231027033845.90608-3-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 4f2267b58a22d972be98edef8e6b3c7a67c9fb91 Author: Peng Zhang Date: Fri Oct 27 11:38:36 2023 +0800 maple_tree: add mt_free_one() and mt_attr() helpers Patch series "Introduce __mt_dup() to improve the performance of fork()", v7. This series introduces __mt_dup() to improve the performance of fork(). During the duplication process of mmap, all VMAs are traversed and inserted one by one into the new maple tree, causing the maple tree to be rebalanced multiple times. Balancing the maple tree is a costly operation. To duplicate VMAs more efficiently, mtree_dup() and __mt_dup() are introduced for the maple tree. They can efficiently duplicate a maple tree. Here are some algorithmic details about {mtree,__mt}_dup(). We perform a DFS pre-order traversal of all nodes in the source maple tree. During this process, we fully copy the nodes from the source tree to the new tree. This involves memory allocation, and when encountering a new node, if it is a non-leaf node, all its child nodes are allocated at once. This idea was originally from Liam R. Howlett's Maple Tree Work email, and I added some of my own ideas to implement it. Some previous discussions can be found in [1]. For a more detailed analysis of the algorithm, please refer to the logs for patch [3/10] and patch [10/10]. There is a "spawn" in byte-unixbench[2], which can be used to test the performance of fork(). I modified it slightly to make it work with different number of VMAs. Below are the test results. The first row shows the number of VMAs. The second and third rows show the number of fork() calls per ten seconds, corresponding to next-20231006 and the this patchset, respectively. The test results were obtained with CPU binding to avoid scheduler load balancing that could cause unstable results. There are still some fluctuations in the test results, but at least they are better than the original performance. 21 121 221 421 821 1621 3221 6421 12821 25621 51221 112100 76261 54227 34035 20195 11112 6017 3161 1606 802 393 114558 83067 65008 45824 28751 16072 8922 4747 2436 1233 599 2.19% 8.92% 19.88% 34.64% 42.37% 44.64% 48.28% 50.17% 51.68% 53.74% 52.42% Thanks to Liam and Matthew for the review. This patch (of 10): Add two helpers: 1. mt_free_one(), used to free a maple node. 2. mt_attr(), used to obtain the attributes of maple tree. Link: https://lkml.kernel.org/r/20231027033845.90608-1-zhangpeng.00@bytedance.com Link: https://lkml.kernel.org/r/20231027033845.90608-2-zhangpeng.00@bytedance.com Signed-off-by: Peng Zhang Reviewed-by: Liam R. Howlett Cc: Christian Brauner Cc: Jonathan Corbet Cc: Mateusz Guzik Cc: Mathieu Desnoyers Cc: Matthew Wilcox Cc: Michael S. Tsirkin Cc: Mike Christie Cc: Nicholas Piggin Cc: Peter Zijlstra Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton commit 23e9f0138963ceef2a252d887534923a0502b2da Author: Li Zhijian Date: Fri Nov 3 11:14:50 2023 +0800 mm/vmstat: move pgdemote_* to per-node stats Demotion will migrate pages across nodes. Previously, only the global demotion statistics were accounted for. Changed them to per-node statistics, making it easier to observe where demotion occurs on each node. This will help to identify which nodes are under pressure. This patch also make pgdemote_* behind CONFIG_NUMA_BALANCING, since demotion is not available for !CONFIG_NUMA_BALANCING With this patch, here is a sample where node0 node1 are DRAM, node3 is PMEM: Global stats: $ grep demote /proc/vmstat pgdemote_kswapd 254288 pgdemote_direct 113497 pgdemote_khugepaged 0 Per-node stats: $ grep demote /sys/devices/system/node/node0/vmstat # demotion source pgdemote_kswapd 68454 pgdemote_direct 83431 pgdemote_khugepaged 0 $ grep demote /sys/devices/system/node/node1/vmstat # demotion source pgdemote_kswapd 185834 pgdemote_direct 30066 pgdemote_khugepaged 0 $ grep demote /sys/devices/system/node/node3/vmstat # demotion target pgdemote_kswapd 0 pgdemote_direct 0 pgdemote_khugepaged 0 Link: https://lkml.kernel.org/r/20231103031450.1456523-1-lizhijian@fujitsu.com Signed-off-by: Li Zhijian Acked-by: "Huang, Ying" Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton commit f7af6977621a41661696d94c0c0a20c761404476 Author: Juergen Gross Date: Sun Dec 10 07:21:38 2023 +0100 x86/paravirt: Remove no longer needed paravirt patching code Now that paravirt is using the alternatives patching infrastructure, remove the paravirt patching code. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231210062138.2417-6-jgross@suse.com commit 60bc276b129eef8113f9d9b0a5cd5ae7f4c90acb Author: Juergen Gross Date: Sun Dec 10 07:21:37 2023 +0100 x86/paravirt: Switch mixed paravirt/alternative calls to alternatives Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. Eliminate the need to be careful regarding the sequence of alternative and paravirt patching. [ bp: Touch up commit message. ] Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231210062138.2417-5-jgross@suse.com commit da0fe6e68e104f79c1fef5c62a17bdd1634ea61c Author: Juergen Gross Date: Sun Dec 10 07:21:36 2023 +0100 x86/alternative: Add indirect call patching In order to prepare replacing of paravirt patching with alternative patching, add the capability to replace an indirect call with a direct one. This is done via a new flag ALT_FLAG_CALL as the target of the CALL instruction needs to be evaluated using the value of the location addressed by the indirect call. For convenience, add a macro for a default CALL instruction. In case it is being used without the new flag being set, it will result in a BUG() when being executed. As in most cases, the feature used will be X86_FEATURE_ALWAYS so add another macro ALT_CALL_ALWAYS usable for the flags parameter of the ALTERNATIVE macros. For a complete replacement, handle the special cases of calling a nop function and an indirect call of NULL the same way as paravirt does. [ bp: Massage commit message, fixup the debug output and clarify flow more. ] Co-developed-by: Peter Zijlstra (Intel) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231210062138.2417-4-jgross@suse.com commit 236fa3873de8f1d4b0c7eaeb4c53b4d1220d55a0 Author: Dmitry Baryshkov Date: Sun Dec 3 01:13:53 2023 +0300 drm/ci: remove rebase-merge directory Gitlab runner can cache git repository, including the unfinished rebase merge status. New CI job will come as a fresh checkout, however this will not destroy the unfinished rebase, failing our build script. Destroy the unfinished rebase state. Suggested-by: David Heidelberg Signed-off-by: Dmitry Baryshkov Acked-by: Helen Koike Patchwork: https://patchwork.freedesktop.org/patch/570159/ Signed-off-by: Rob Clark commit 6e944cc68633b4882d889ded0060394833babb0f Merge: 1674110c0dd44 c71517fe7353d Author: David S. Miller Date: Sun Dec 10 19:31:42 2023 +0000 Merge branch 'rswitch-jumbo-frames' Yoshihiro Shimoda says: ==================== net: rswitch: Add jumbo frames support This patch series is based on the latest net-next.git / main branch. Changes from v3: https://lore.kernel.org/all/20231204012058.3876078-1-yoshihiro.shimoda.uh@renesas.com/ - Based on the latest net-next.git / main branch. - Modify for code consistancy in the patch 3/9. - Add a condition in the patch 3/9. - Fix usage of dma_addr in the patch 8/9. Changes from v2: https://lore.kernel.org/all/20231201054655.3731772-1-yoshihiro.shimoda.uh@renesas.com/ - Based on the latest net-next.git / main branch. - Fix using a variable in the patch 8/9. - Add Reviewed-by tag in the patch 1/9. Changes from v1: https://lore.kernel.org/all/20231127115334.3670790-1-yoshihiro.shimoda.uh@renesas.com/ - Based on the latest net-next.git / main branch. - Fix commit descriptions (s/near the future/the near future/). ==================== Signed-off-by: David S. Miller commit c71517fe7353d2cbfbf2e305b282bf23c1750e29 Author: Yoshihiro Shimoda Date: Fri Dec 8 13:10:30 2023 +0900 net: rswitch: Allow jumbo frames Allow jumbo frames by changing maximum MTU size and number of RX queues. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit d2c96b9d5f83e4327cf044d00d7f713edd7fecfd Author: Yoshihiro Shimoda Date: Fri Dec 8 13:10:29 2023 +0900 net: rswitch: Add jumbo frames handling for TX If the driver would like to transmit a jumbo frame like 2KiB or more, it should be split into multiple queues. In the near future, to support this, add handling specific descriptor types F{START,MID,END}. However, such jumbo frames will not happen yet because the maximum MTU size is still default for now. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 933416cc59b18ef82ea7895c4ca58be3d92d3b3c Author: Yoshihiro Shimoda Date: Fri Dec 8 13:10:28 2023 +0900 net: rswitch: Add jumbo frames handling for RX If this hardware receives a jumbo frame like 2KiB or more, it will be split into multiple queues. In the near future, to support this, add handling specific descriptor types F{START,MID,END}. However, such jumbo frames will not happen yet because the maximum MTU size is still default for now. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 9c90316a1170dd6ee1e620d28f6101f85bbaaa10 Author: Yoshihiro Shimoda Date: Fri Dec 8 13:10:27 2023 +0900 net: rswitch: Set GWMDNC register To support jumbo frames, set GWMDNC register with acceptable maximum values for TX and RX. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit fcff581ee43078cf23216aa7079012e935a6a078 Author: Yoshihiro Shimoda Date: Fri Dec 8 13:10:26 2023 +0900 net: rswitch: Add a setting ext descriptor function If the driver would like to transmit a jumbo frame like 2KiB or more, it should be split into multiple queues. In the near future, to support this, add a setting ext descriptor function to improve code readability. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 271e015b91535dd87fd0f5df0cc3b906c2eddef9 Author: Yoshihiro Shimoda Date: Fri Dec 8 13:10:25 2023 +0900 net: rswitch: Add unmap_addrs instead of dma address in each desc If the driver would like to transmit a jumbo frame like 2KiB or more, it should be split into multiple queues. In the near future, to support this, add unmap_addrs array to unmap dma mapping address instead of dma address in each TX descriptor because the descriptors may not have the top dma address. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 6a203cb5165d2257e8d54193b69afdb480a17f6f Author: Yoshihiro Shimoda Date: Fri Dec 8 13:10:24 2023 +0900 net: rswitch: Use build_skb() for RX If this hardware receives a jumbo frame like 2KiB or more, it will be split into multiple queues. In the near future, to support this, use build_skb() instead of netdev_alloc_skb_ip_align(). Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 8857034184538ca92b0e029f6f56e5e04f518ad2 Author: Yoshihiro Shimoda Date: Fri Dec 8 13:10:23 2023 +0900 net: rswitch: Use unsigned int for desc related array index Array index should not be negative, so use unsigned int for descriptors related array index. Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit c7e0022390d43788f63c7021ad441c1f8d9acf5f Author: Yoshihiro Shimoda Date: Fri Dec 8 13:10:22 2023 +0900 net: rswitch: Drop unused argument/return value Drop unused argument and return value of rswitch_tx_free() to simplify the code. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit 9824b00c2b58f9e1072ef3ece571a2cfc71089d4 Author: Juergen Gross Date: Wed Nov 29 14:33:29 2023 +0100 x86/paravirt: Move some functions and defines to alternative.c As a preparation for replacing paravirt patching completely by alternative patching, move some backend functions and #defines to the alternatives code and header. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231129133332.31043-3-jgross@suse.com commit a6397e63877e82528c67058e6e6e8d700682df50 Author: Rob Clark Date: Mon Nov 20 16:38:51 2023 -0800 drm/msm/gem: Convert to drm_exec Replace the ww_mutex locking dance with the drm_exec helper. v2: Error path fixes, move drm_exec_fini so we only call it once (and only if we have drm_exec_init() Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/568342/ commit 1674110c0dd44a6240f03fff9a05fd72917b3f7d Author: Justin Stitt Date: Thu Dec 7 21:57:50 2023 +0000 net: mdio_bus: replace deprecated strncpy with strscpy strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect mdiodev->modalias to be NUL-terminated based on its usage with strcmp(): | return strcmp(mdiodev->modalias, drv->name) == 0; Moreover, mdiodev->modalias is already zero-allocated: | mdiodev = kzalloc(sizeof(*mdiodev), GFP_KERNEL); ... which means the NUL-padding strncpy provides is not necessary. Considering the above, a suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Signed-off-by: David S. Miller commit f8dd2412ba66128de4325c187c9504c6da511bc8 Author: Justin Stitt Date: Thu Dec 7 21:42:22 2023 +0000 qlcnic: replace deprecated strncpy with strscpy strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect fw_info->fw_file_name to be NUL-terminated based on its use within _request_firmware_prepare() wherein `name` refers to it: | if (firmware_request_builtin_buf(firmware, name, dbuf, size)) { | dev_dbg(device, "using built-in %s\n", name); | return 0; /* assigned */ | } ... and with firmware_request_builtin() also via `name`: | if (strcmp(name, b_fw->name) == 0) { There is no evidence that NUL-padding is required. Additionally replace size macro (QLC_FW_FILE_NAME_LEN) with sizeof(fw_info->fw_file_name) to more directly tie the maximum buffer size to the destination buffer: Considering the above, a suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Signed-off-by: David S. Miller commit 378bc9a40ed8b6f1bac558a64b65d4754de89387 Author: justinstitt@google.com Date: Thu Dec 7 21:34:42 2023 +0000 net: ena: replace deprecated strncpy with strscpy `strncpy` is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. A suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. host_info allocation is done in ena_com_allocate_host_info() via dma_alloc_coherent() and is not zero initialized by alloc_etherdev_mq(). However zero initialization of the destination doesn't matter in this case, because strscpy() guarantees a NULL termination. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Acked-by: Arthur Kiyanovski Reviewed-by: Kees Cook Signed-off-by: David S. Miller commit 05d249352f1ae909230c230767ca8f4e9fdf8e7b Author: Rob Clark Date: Mon Nov 20 16:38:50 2023 -0800 drm/exec: Pass in initial # of objects In cases where the # is known ahead of time, it is silly to do the table resize dance. Signed-off-by: Rob Clark Reviewed-by: Christian König Patchwork: https://patchwork.freedesktop.org/patch/568338/ commit 3a48a40387e73e1a37428b11cb3ba56d4c108571 Author: Rob Clark Date: Mon Nov 20 16:38:49 2023 -0800 drm/msm/gem: Cleanup submit_cleanup_bo() Now that it only handles unlock duty, drop the superfluous arg and rename it. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/568333/ commit 2d7d2c4e84802485a1e765bd0732d41526dcf25c Author: Rob Clark Date: Mon Nov 20 16:38:48 2023 -0800 drm/msm/gem: Split out submit_unpin_objects() helper Untangle unpinning from unlock/unref loop. The unpin only happens in error paths so it is easier to decouple from the normal unlock path. Since we never have an intermediate state where a subset of buffers are pinned (ie. we never bail out of the pin or unpin loops) we can replace the bo state flag bit with a global flag in the submit. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/568335/ commit ceab575cafed594fb3cee1bec01a0e4ed5e2d752 Author: Rob Clark Date: Mon Nov 20 16:38:47 2023 -0800 drm/msm/gem: Don't queue job to sched in error cases We shouldn't be running the job in error cases. This also avoids having to think too hard about where the objs get unpinned (and if necessary, the resv takes over tracking that the obj is busy).. ie. error cases it always happens synchronously, and normal cases it happens from scheduler job_run() callback. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/568331/ commit 202f98c19a11e335867a1906c2fb6c53680e4603 Author: Rob Clark Date: Mon Nov 20 16:38:46 2023 -0800 drm/msm/gem: Remove submit_unlock_unpin_bo() The only point it is called is before pinning objects, so the "unpin" part of the name is fiction. Just remove it and call submit_cleanup_bo() directly. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/568330/ commit a3dec9cdf42bceccdf7a7185099a515ba0a8b29b Author: Rob Clark Date: Mon Nov 20 16:38:45 2023 -0800 drm/msm/gem: Remove "valid" tracking This was a small optimization for pre-soft-pin userspace. But mesa switched to soft-pin nearly 5yrs ago. So lets drop the optimization and simplify the code. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/568328/ commit 3e6688fd96966b6c275e95c39aa367bc0a490ccd Author: Bjorn Andersson Date: Thu Nov 30 16:26:41 2023 -0800 drm/msm/adreno: Fix A680 chip id The only A680 referenced from DeviceTree is patch level 1, which since commit '90b593ce1c9e ("drm/msm/adreno: Switch to chip-id for identifying GPU")' isn't a known chip id. Correct the chip id to allow the A680 to be recognized again. Fixes: 90b593ce1c9e ("drm/msm/adreno: Switch to chip-id for identifying GPU") Signed-off-by: Bjorn Andersson Patchwork: https://patchwork.freedesktop.org/patch/569839/ Signed-off-by: Rob Clark commit 44a88fa45665318473bfdbb832eba1da2d0a3740 Author: Connor Abbott Date: Thu Dec 7 21:30:48 2023 +0000 drm/msm: Add param for the highest bank bit This parameter is programmed by the kernel and influences the tiling layout of images. Exposing it to userspace will allow it to tile/untile images correctly without guessing what value the kernel programmed, and allow us to change it in the future without breaking userspace. Signed-off-by: Connor Abbott Patchwork: https://patchwork.freedesktop.org/patch/571181/ Signed-off-by: Rob Clark commit 8814455a0e54ca353b4b0ad5105569d3fdb945cc Author: Connor Abbott Date: Thu Dec 7 21:30:47 2023 +0000 drm/msm: Refactor UBWC config setting Split up calculating configuration parameters and programming them, so that we can expose them to userspace. Signed-off-by: Connor Abbott Patchwork: https://patchwork.freedesktop.org/patch/571180/ Signed-off-by: Rob Clark commit 772ca413537eca9010e93922699537f56db9c8c4 Author: Juergen Gross Date: Wed Nov 29 14:33:28 2023 +0100 x86/paravirt: Introduce ALT_NOT_XEN Introduce the macro ALT_NOT_XEN as a short form of ALT_NOT(X86_FEATURE_XENPV). No functional changes. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231129133332.31043-2-jgross@suse.com commit cbaf84e73811ed0ff7ff6d7f52b73fd7ed082d65 Merge: a08935fc859b2 fca9448ae2f5d Author: Rob Clark Date: Sun Dec 10 10:07:54 2023 -0800 Merge remote-tracking branch 'drm-misc/drm-misc-next' into msm-next Backmerge drm-misc-next to pick up some dependencies for drm/msm patches, in particular: https://patchwork.freedesktop.org/patch/570219/?series=127251&rev=1 https://patchwork.freedesktop.org/series/123411/ Signed-off-by: Rob Clark commit d9232785858eafde8553932f96fb7e25c2191ed2 Author: Peter Griffin Date: Sat Dec 9 23:30:49 2023 +0000 dt-bindings: soc: google: exynos-sysreg: add dedicated SYSREG compatibles to GS101 GS101 has three different SYSREG controllers, add dedicated compatibles for them to the documentation. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231209233106.147416-4-peter.griffin@linaro.org [krzysztof: move Google entries to existing enum] Signed-off-by: Krzysztof Kozlowski commit 0a910f1606384a5886a045e36b1fc80a7fa6706b Author: Peter Griffin Date: Sat Dec 9 23:30:48 2023 +0000 dt-bindings: clock: Add Google gs101 clock management unit bindings Provide dt-schema documentation for Google gs101 SoC clock controller. Currently this adds support for cmu_top, cmu_misc and cmu_apm. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231209233106.147416-3-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit fdd78ff04ccc96f628c2f93e0d48ab0a74bf34ef Author: Peter Griffin Date: Sat Dec 9 23:30:47 2023 +0000 dt-bindings: soc: samsung: exynos-pmu: Add gs101 compatible Add gs101-pmu compatible to the bindings documentation. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231209233106.147416-2-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit abc73e50b394f248aa8e7ecdfbd4dfa52f8e8355 Author: Peter Griffin Date: Sat Dec 9 23:30:53 2023 +0000 dt-bindings: pinctrl: samsung: add gs101-wakeup-eint compatible gs101 is similar to newer Exynos SoCs like Exynos850 and ExynosAutov9 where more than one pin controller can do external wake-up interrupt. So add a dedicated compatible for it. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231209233106.147416-8-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4a2006d0c338c95352bf9f06e5b3cb8afa0bc885 Author: Peter Griffin Date: Sat Dec 9 23:30:52 2023 +0000 dt-bindings: pinctrl: samsung: add google,gs101-pinctrl compatible Add the "google,gs101-pinctrl" compatible to the dt-schema bindings documentation. Reviewed-by: Sam Protsenko Signed-off-by: Peter Griffin Link: https://lore.kernel.org/r/20231209233106.147416-7-peter.griffin@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5012f9d8acd411bc86229d75c0bb9517f84a60ec Author: Linus Walleij Date: Sat Dec 9 23:01:27 2023 +0100 ASoC: wm1250-ev1: Fix uninitialized ret The GPIO descriptor conversion patch left an unitialized ret behind by mistake, fix it by getting rid of the variable altogether. Fixes: 10a366f36e2a ("ASoC: wm1250-ev1: Convert to GPIO descriptors") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312090953.DiUo3mue-lkp@intel.com/ Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231209-descriptors-sound-wlf-v1-1-5b885ce43ae1@linaro.org Signed-off-by: Mark Brown commit 8bdfa4a2fecf4d54b9157b1294970e7ff242f042 Author: Nuno Sa Date: Thu Dec 7 13:39:30 2023 +0100 iio: adc: ad9467: use the more common !val NULL check Check !val instead of directing checking for NULL (val == NULL). No functional changes intended. Reviewed-by: David Lechner Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-7-a4a33bc4d70e@analog.com Signed-off-by: Jonathan Cameron commit 6dd3fa9fcc66cb71834dc2e0a222324af0d8b95d Author: Nuno Sa Date: Thu Dec 7 13:39:29 2023 +0100 iio: adc: ad9467: use chip_info variables instead of array Instead of having an array and keeping IDs for each entry of the array, just have a chip_info struct per device. Reviewed-by: David Lechner Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-6-a4a33bc4d70e@analog.com Signed-off-by: Jonathan Cameron commit b67cc85d45d5d2894d0e2812bba27d7b23befbe6 Author: Nuno Sa Date: Thu Dec 7 13:39:28 2023 +0100 iio: adc: ad9467: use spi_get_device_match_data() Make use of spi_get_device_match_data() to simplify things. Reviewed-by: David Lechner Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-5-a4a33bc4d70e@analog.com Signed-off-by: Jonathan Cameron commit b73f08bb7fe5a0901646ca5ceaa1e7a2d5ee6293 Author: Nuno Sa Date: Thu Dec 7 13:39:27 2023 +0100 iio: adc: ad9467: fix scale setting When reading in_voltage_scale we can get something like: root@analog:/sys/bus/iio/devices/iio:device2# cat in_voltage_scale 0.038146 However, when reading the available options: root@analog:/sys/bus/iio/devices/iio:device2# cat in_voltage_scale_available 2000.000000 2100.000006 2200.000007 2300.000008 2400.000009 2500.000010 which does not make sense. Moreover, when trying to set a new scale we get an error because there's no call to __ad9467_get_scale() to give us values as given when reading in_voltage_scale. Fix it by computing the available scales during probe and properly pass the list when .read_available() is called. While at it, change to use .read_available() from iio_info. Also note that to properly fix this, adi-axi-adc.c has to be changed accordingly. Fixes: ad6797120238 ("iio: adc: ad9467: add support AD9467 ADC") Signed-off-by: Nuno Sa Reviewed-by: David Lechner Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-4-a4a33bc4d70e@analog.com Signed-off-by: Jonathan Cameron commit 737720197be445bb9eec2986101e4a386e019337 Author: Nuno Sa Date: Thu Dec 7 13:39:26 2023 +0100 iio: adc: ad9467: add mutex to struct ad9467_state When calling ad9467_set_scale(), multiple calls to ad9467_spi_write() are done which means we need to properly protect the whole operation so we are sure we will be in a sane state if two concurrent calls occur. Fixes: ad6797120238 ("iio: adc: ad9467: add support AD9467 ADC") Signed-off-by: Nuno Sa Reviewed-by: David Lechner Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-3-a4a33bc4d70e@analog.com Signed-off-by: Jonathan Cameron commit e072e149cfb827e0ab4cafb0547e9658e35393cd Author: Nuno Sa Date: Thu Dec 7 13:39:25 2023 +0100 iio: adc: ad9467: don't ignore error codes Make sure functions that return errors are not ignored. Fixes: ad6797120238 ("iio: adc: ad9467: add support AD9467 ADC") Reviewed-by: David Lechner Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-2-a4a33bc4d70e@analog.com Signed-off-by: Jonathan Cameron commit 76f028539cf360f750efd8cde560edda298e4c6b Author: Nuno Sa Date: Thu Dec 7 13:39:24 2023 +0100 iio: adc: ad9467: fix reset gpio handling The reset gpio was being handled with inverted polarity. This means that as far as gpiolib is concerned we were actually leaving the pin asserted (in theory, this would mean reset). However, inverting the polarity in devicetree made things work. Fix it by doing it the proper way and how gpiolib expects it to be done. While at it, moved the handling to it's own function and dropped 'reset_gpio' from the 'struct ad9467_state' as we only need it during probe. On top of that, refactored things so that we now request the gpio asserted (i.e in reset) and then de-assert it. Also note that we now use gpiod_set_value_cansleep() instead of gpiod_direction_output() as we already request the pin as output. Fixes: ad6797120238 ("iio: adc: ad9467: add support AD9467 ADC") Reviewed-by: David Lechner Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-1-a4a33bc4d70e@analog.com Signed-off-by: Jonathan Cameron commit 17819da62a5c7058ea0d44bd9ff711aab7a44ae3 Author: Marcus Folkesson Date: Wed Dec 6 19:39:04 2023 +0100 iio: adc: mcp3911: simplify code with guard macro Use the guard(mutex) macro for handle mutex lock/unlocks. Signed-off-by: Marcus Folkesson Link: https://lore.kernel.org/r/20231206-mcp3911-guard-v4-1-30c3c5d4340f@gmail.com Signed-off-by: Jonathan Cameron commit 6c07fd84977b605b6a4ceb03b38e6325974f06d6 Author: Masahiro Yamada Date: Sun Dec 3 19:25:23 2023 +0900 kconfig: factor out common code shared by mconf and nconf Separate out the duplicated code to mnconf-common.c. Signed-off-by: Masahiro Yamada commit d821f8a26efb6789666d70ce7a8f27df6c33c12e Author: Masahiro Yamada Date: Sun Dec 3 19:14:18 2023 +0900 sparc: vdso: use $(addprefix ) instead of $(foreach ) $(addprefix ) is slightly shorter and more intuitive. Signed-off-by: Masahiro Yamada Acked-by: Sam Ravnborg commit 918d8f94720a103a48ffb5a3ec10c0f680ba78ad Author: Masahiro Yamada Date: Sun Dec 3 19:14:17 2023 +0900 sparc: vdso: simplify obj-y addition Add objects to obj-y in a more straightforward way. Signed-off-by: Masahiro Yamada Acked-by: Sam Ravnborg commit 53c5adff34d77166ed69a4e4bdae3694fe961476 Author: Masahiro Yamada Date: Sun Dec 3 19:14:16 2023 +0900 sparc: vdso: clean up build artifacts in arch/sparc/vdso/ Currently, vdso-image-*.c, vdso*.so, vdso*.so.dbg are not cleaned because 'make clean' does not include include/config/auto.conf, resulting in $(vdso_img-y) being empty. Add the build artifacts to 'targets' unconditionally. Signed-off-by: Masahiro Yamada Acked-by: Sam Ravnborg commit c9f2b8d45aa453ee58e66a9b0e7a54e170381585 Author: Masahiro Yamada Date: Sun Dec 3 18:49:34 2023 +0900 modpost: remove unreachable code after fatal() Now compilers can recognize fatal() never returns. While GCC 4.5 dropped support for -Wunreachable-code, Clang is capable of detecting the unreachable code. $ make HOSTCC=clang HOSTCFLAGS=-Wunreachable-code-return [snip] HOSTCC scripts/mod/modpost.o scripts/mod/modpost.c:520:11: warning: 'return' will never be executed [-Wunreachable-code-return] return 0; ^ scripts/mod/modpost.c:477:10: warning: 'return' will never be executed [-Wunreachable-code-return] return 0; ^ 2 warnings generated. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 5cac96f937021de3b0fbc60cdc6d6c4ee5b2456d Author: Masahiro Yamada Date: Sun Dec 3 18:49:33 2023 +0900 modpost: remove unneeded initializer in section_rel() This initializer was added to avoid -Wmaybe-uninitialized (gcc) and -Wsometimes-uninitialized (clang) warnings. Now that compilers recognize fatal() never returns, it is unneeded. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 16a473f60edc30ffcdf355676263730a6028ec67 Author: Masahiro Yamada Date: Sun Dec 3 18:49:32 2023 +0900 modpost: inform compilers that fatal() never returns The function fatal() never returns because modpost_log() calls exit(1) when LOG_FATAL is passed. Inform compilers of this fact so that unreachable code flow can be identified at compile time. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit cc87b7c06f2a6a1fbc7e06ccf6123aada4d0b588 Author: Masahiro Yamada Date: Sun Dec 3 18:49:31 2023 +0900 modpost: move __attribute__((format(printf, 2, 3))) to modpost.h This attribute must be added to the function declaration in a header for comprehensive checking of all the callsites. Fixes: 6d9a89ea4b06 ("kbuild: declare the modpost error functions as printf like") Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit cbe826b058bb3547f195144fc018957871568320 Author: Masahiro Yamada Date: Sun Dec 3 17:05:48 2023 +0900 kbuild: determine base DTB by suffix When using the -dtbs syntax, you need to list the base first, as follows: foo-dtbs := foo_base.dtb foo_overlay1.dtbo foo_overlay2.dtbo dtb-y := foo.dtb You cannot do this arrangement: foo-dtbs := foo_overlay1.dtbo foo_overlay2.dtbo foo_base.dtb This restriction comes from $(firstword ...) in the current implementation, but it is unneeded to rely on the order in the -dtbs syntax. Instead, you can simply determine the base by the suffix because the base (*.dtb) and overlays (*.dtbo) use different suffixes. Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 53243e098397185d910c10207bc3c0c26f072383 Author: Masahiro Yamada Date: Wed Nov 29 08:53:56 2023 +0900 kbuild: deb-pkg: remove the fakeroot builds support In 2017, the dpkg suite introduced the rootless builds support with the following commits: - 2436807c87b0 ("dpkg-deb: Add support for rootless builds") - fca1bfe84068 ("dpkg-buildpackage: Add support for rootless builds") This feature is available in the default dpkg on Debian 10 and Ubuntu 20.04. Remove the old method. Signed-off-by: Masahiro Yamada commit 5b20755b7780464fea3e54af0af744258dcc2841 Author: Masahiro Yamada Date: Sun Nov 26 16:19:14 2023 +0900 init: move THIS_MODULE from to Commit f50169324df4 ("module.h: split out the EXPORT_SYMBOL into export.h") appropriately separated EXPORT_SYMBOL into because modules and EXPORT_SYMBOL are orthogonal; modules are symbol consumers, while EXPORT_SYMBOL are used by symbol providers, which may not be necessarily a module. However, that commit also relocated THIS_MODULE. As explained in the commit description, the intention was to define THIS_MODULE in a lightweight header, but I do not believe was the best location because EXPORT_SYMBOL and THIS_MODULE are unrelated. Move it to another lightweight header, . The reason for choosing is to make self-contained without relying on incorrectly including . With this adjustment, the role of becomes clearer as it only defines EXPORT_SYMBOL. Signed-off-by: Masahiro Yamada Reviewed-by: Luis Chamberlain commit 909484169a7bd935b4e56e1d77d63e8fccf6c6f1 Author: Marcus Folkesson Date: Sat Dec 2 17:59:48 2023 +0100 Input: pxrc - simplify mutex handling with guard macro Use the guard(mutex) macro for handle mutex lock/unlocks. Signed-off-by: Marcus Folkesson Link: https://lore.kernel.org/r/20231202-pxrc-guard-v3-1-2ca8bc8cf689@gmail.com Signed-off-by: Dmitry Torokhov commit 5bcbdf72df88a351642627d94b93af7c9301b6e2 Merge: 5181dc08f7958 88f6047191e69 Author: Alexei Starovoitov Date: Sat Dec 9 21:37:33 2023 -0800 Merge branch 'add-new-bpf_cpumask_weight-kfunc' David Vernet says: ==================== Add new bpf_cpumask_weight() kfunc It can be useful to query how many bits are set in a cpumask. For example, if you want to perform special logic for the last remaining core that's set in a mask. This logic is already exposed through the main kernel's cpumask header as cpumask_weight(), so it would be useful to add a new bpf_cpumask_weight() kfunc which wraps it and does the same. This patch series was built and tested on top of commit 2146f7fe6e02 ("Merge branch 'allocate-bpf-trampoline-on-bpf_prog_pack'"). ==================== Link: https://lore.kernel.org/r/20231207210843.168466-1-void@manifault.com Signed-off-by: Alexei Starovoitov commit 88f6047191e69bdd02cf1b9b5b514f7e514e8b86 Author: David Vernet Date: Thu Dec 7 15:08:43 2023 -0600 selftests/bpf: Add test for bpf_cpumask_weight() kfunc The new bpf_cpumask_weight() kfunc can be used to count the number of bits that are set in a struct cpumask* kptr. Let's add a selftest to verify its behavior. Signed-off-by: David Vernet Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231207210843.168466-3-void@manifault.com Signed-off-by: Alexei Starovoitov commit a6de18f310a511278c1ff16b96eb2d500eada725 Author: David Vernet Date: Thu Dec 7 15:08:42 2023 -0600 bpf: Add bpf_cpumask_weight() kfunc It can be useful to query how many bits are set in a cpumask. For example, if you want to perform special logic for the last remaining core that's set in a mask. Let's therefore add a new bpf_cpumask_weight() kfunc which checks how many bits are set in a mask. Signed-off-by: David Vernet Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231207210843.168466-2-void@manifault.com Signed-off-by: Alexei Starovoitov commit 5181dc08f79583c6dead80208137a97e68ff07b0 Author: Tiezhu Yang Date: Thu Dec 7 12:08:51 2023 +0800 test_bpf: Rename second ALU64_SMOD_X to ALU64_SMOD_K Currently, there are two test cases with same name "ALU64_SMOD_X: -7 % 2 = -1", the first one is right, the second one should be ALU64_SMOD_K because its code is BPF_ALU64 | BPF_MOD | BPF_K. Before: test_bpf: #170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS test_bpf: #171 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS After: test_bpf: #170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS test_bpf: #171 ALU64_SMOD_K: -7 % 2 = -1 jited:1 4 PASS Fixes: daabb2b098e0 ("bpf/tests: add tests for cpuv4 instructions") Signed-off-by: Tiezhu Yang Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231207040851.19730-1-yangtiezhu@loongson.cn Signed-off-by: Alexei Starovoitov commit 7d8ed51bcb32716a40d71043fcd01c4118858c51 Author: Andrii Nakryiko Date: Fri Dec 8 17:09:58 2023 -0800 selftests/bpf: validate fake register spill/fill precision backtracking logic Add two tests validating that verifier's precision backtracking logic handles BPF_ST_MEM instructions that produce fake register spill into register slot. This is happening when non-zero constant is written directly to a slot, e.g., *(u64 *)(r10 -8) = 123. Add both full 64-bit register spill, as well as 32-bit "sub-spill". Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20231209010958.66758-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 482d548d40b0af9af730e4869903d4433e44f014 Author: Andrii Nakryiko Date: Fri Dec 8 17:09:57 2023 -0800 bpf: handle fake register spill to stack with BPF_ST_MEM instruction When verifier validates BPF_ST_MEM instruction that stores known constant to stack (e.g., *(u64 *)(r10 - 8) = 123), it effectively spills a fake register with a constant (but initially imprecise) value to a stack slot. Because read-side logic treats it as a proper register fill from stack slot, we need to mark such stack slot initialization as INSN_F_STACK_ACCESS instruction to stop precision backtracking from missing it. Fixes: 41f6f64e6999 ("bpf: support non-r10 register spill/fill to/from stack in precision tracking") Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20231209010958.66758-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 8477fe1de9a631d634ccfda7fe147eba90f55732 Merge: 32fa058398624 06e5c999f1026 Author: Alexei Starovoitov Date: Sat Dec 9 18:12:34 2023 -0800 Merge branch 'bpf-fixes-for-maybe_wait_bpf_programs' Hou Tao says: ==================== The patch set aims to fix the problems found when inspecting the code related with maybe_wait_bpf_programs(). Patch #1 removes unnecessary invocation of maybe_wait_bpf_programs(). Patch #2 calls maybe_wait_bpf_programs() only once for batched update. Patch #3 adds the missed waiting when doing batched lookup_deletion on htab of maps. Patch #4 does wait only if the update or deletion operation succeeds. Patch #5 fixes the value of batch.count when memory allocation fails. ==================== Link: https://lore.kernel.org/r/20231208102355.2628918-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 06e5c999f10269a532304e89a6adb2fbfeb0593c Author: Hou Tao Date: Fri Dec 8 18:23:53 2023 +0800 bpf: Set uattr->batch.count as zero before batched update or deletion generic_map_{delete,update}_batch() doesn't set uattr->batch.count as zero before it tries to allocate memory for key. If the memory allocation fails, the value of uattr->batch.count will be incorrect. Fix it by setting uattr->batch.count as zero beore batched update or deletion. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231208102355.2628918-6-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 67ad2c73ff29b32bd09135ec07c26e59490dbb3b Author: Hou Tao Date: Fri Dec 8 18:23:52 2023 +0800 bpf: Only call maybe_wait_bpf_programs() when map operation succeeds There is no need to call maybe_wait_bpf_programs() if update or deletion operation fails. So only call maybe_wait_bpf_programs() if update or deletion operation succeeds. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231208102355.2628918-5-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 012772581d040607ac1f981f47f6afd2336b4580 Author: Hou Tao Date: Fri Dec 8 18:23:51 2023 +0800 bpf: Add missed maybe_wait_bpf_programs() for htab of maps When doing batched lookup and deletion operations on htab of maps, maybe_wait_bpf_programs() is needed to ensure all programs don't use the inner map after the bpf syscall returns. Instead of adding the wait in __htab_map_lookup_and_delete_batch(), adding the wait in bpf_map_do_batch() and also removing the calling of maybe_wait_bpf_programs() from generic_map_{delete,update}_batch(). Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231208102355.2628918-4-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 37ba5b59d6adfa08926acd3a833608487a18c2ef Author: Hou Tao Date: Fri Dec 8 18:23:50 2023 +0800 bpf: Call maybe_wait_bpf_programs() only once for generic_map_update_batch() Just like commit 9087c6ff8dfe ("bpf: Call maybe_wait_bpf_programs() only once from generic_map_delete_batch()"), there is also no need to call maybe_wait_bpf_programs() for each update in batched update, so only call it once in generic_map_update_batch(). Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231208102355.2628918-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit c26f2a8901393c9f81909da0a4324587092bd3a3 Author: Hou Tao Date: Fri Dec 8 18:23:49 2023 +0800 bpf: Remove unnecessary wait from bpf_map_copy_value() Both map_lookup_elem() and generic_map_lookup_batch() use bpf_map_copy_value() to lookup and copy the value, and there is no update operation in bpf_map_copy_value(), so just remove the invocation of maybe_wait_bpf_programs() from it. Fixes: 15c14a3dca42 ("bpf: Add bpf_map_{value_size, update_value, map_copy_value} functions") Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231208102355.2628918-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 0fc24a6549f9b6efc538b67a098ab577b1f9a00e Author: Eric Biggers Date: Tue Dec 5 16:21:27 2023 -0800 fscrypt: update comment for do_remove_key() Adjust a comment that was missed during commit 15baf55481de ("fscrypt: track master key presence separately from secret"). Link: https://lore.kernel.org/r/20231206002127.14790-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 33318c0e6ba64876050def6432f80387c89d0fe6 Author: Eric Biggers Date: Tue Dec 5 16:19:01 2023 -0800 fscrypt.rst: update definition of struct fscrypt_context_v2 Get the copy of the fscrypt_context_v2 definition in the documentation in sync with the actual definition, which was changed recently by commit 5b1188847180 ("fscrypt: support crypto data unit size less than filesystem block size"). Link: https://lore.kernel.org/r/20231206001901.14371-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 345586fed2e0666c8e62ab946948ca4f5e2121c0 Author: Gary Rookard Date: Thu Dec 7 20:58:27 2023 -0500 staging: rtl8192e: renamed variable IOTPeer Coding style issue, checkpatch Avoid CamelCase, rename it. IOTPeer -> iot_peer Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231208015827.21185-1-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 2d3f27b55f31876937af83096b239e87b6b177a4 Author: Gary Rookard Date: Thu Dec 7 20:55:35 2023 -0500 staging: rtl8192e: renamed variable HTIOTActIsCCDFsync Coding style issue, checkpatch Avoid CamelCase, rename it. HTIOTActIsCCDFsync -> ht_iot_act_is_ccd_fsync Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231208015536.21013-5-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit fd19bb054a66e729ec584be59f749ce133a62347 Author: Gary Rookard Date: Thu Dec 7 20:55:34 2023 -0500 staging: rtl8192e: renamed variable CCKOFDMRate Coding style issue, checkpatch avoid CamelCase, rename it. CCKOFDMRate -> cck_of_dm_rate Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231208015536.21013-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 5ca1e3c9aba0a343fe1eafae567f8c63ad0dd557 Author: Gary Rookard Date: Thu Dec 7 20:55:33 2023 -0500 staging: rtl8192e: renamed variable bCurShortGI20MHz Coding style issue, checkpatch Avoid CamelCase, rename it. bCurShortGI20MHz -> cur_short_gi_20mhz Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231208015536.21013-3-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit da811655dddb71332905a7c7f4abfa4f9ecd38c1 Author: Gary Rookard Date: Thu Dec 7 20:55:32 2023 -0500 staging: rtl8192e: renamed variable bCurShortGI40MHz Coding style issue, checkpatch Avoid CamelCase, rename it. bCurShortGI40MHz -> cur_short_gi_40mhz Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231208015536.21013-2-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 13afc9bd5349925b104cd751ea67d07d5cff9433 Author: Philipp Hortmann Date: Fri Dec 8 19:20:04 2023 +0100 staging: rtl8192e: Remove files dot11d.c and dot11d.h Remove files dot11d.c and dot11d.h as they are empty. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ed7de82ade0fde1835bbd88aafba74aeb128beed.1701989555.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2cdfd6dc0f44617652d9f58ea58b352a0c095070 Author: Philipp Hortmann Date: Fri Dec 8 19:19:57 2023 +0100 staging: rtl8192e: Remove function dot11d_channel_map() Remove function dot11d_channel_map() as it is empty. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/877c0efcf56977cbf0943b34beda4ff2ca514714.1701989555.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0c2d3ca5608402c04c673538139578f52193d7a7 Author: Philipp Hortmann Date: Fri Dec 8 19:19:51 2023 +0100 staging: rtl8192e: Remove variable dot11d_info Remove variable dot11d_info as it is unused. Remove unused struct channel_list and empty struct rt_dot11d_info. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/2438971feb0c02c5c72776f57201a4011f249190.1701989555.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5c983f61875f8372997bc678a53c8c6a734e408c Author: Philipp Hortmann Date: Fri Dec 8 19:19:45 2023 +0100 staging: rtl8192e: Remove variable channel_map Remove variable channel_map as it is initialized but not used. Remove channel_array as well as it is without channel_map unused. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/19ca762b4b9d5a3e857b31c22f0688324ca3bd9d.1701989555.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 97cb8afde7eef551cb6a546f5d77c86f05e34107 Author: Philipp Hortmann Date: Fri Dec 8 19:19:32 2023 +0100 staging: rtl8192e: Remove function rtllib_update_active_chan_map() Remove function rtllib_update_active_chan_map() as "active_channel_map" and "channel_map" have the same content. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/bae3ddeffe96e4ac7d929127ce3a72cd23fae8dd.1701989555.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 445bdee3ee88db62a0aca176724de9fcd3381a14 Author: Gary Rookard Date: Wed Dec 6 18:04:04 2023 -0500 staging: rtl8192e: renamed variable bTxEnableFwCalcDur Coding style issue, checkpatch Avoid CamelCase, rename it. bTxEnableFwCalcDur -> tx_enable_fw_calc_dur Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231206230404.1721-6-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit bc36fa00acfac1c3cc35fc03a9bd503beb91a3ad Author: Gary Rookard Date: Wed Dec 6 18:04:03 2023 -0500 staging: rtl8192e: renamed variable MPDU_Density Coding style issue, checkpatch Avoid CamelCase, rename it. MPDU_Density -> mpdu_density Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231206230404.1721-5-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 1d7ce9861b53ab4a548f178ebf5ad8f2afbd65fa Author: Gary Rookard Date: Wed Dec 6 18:04:02 2023 -0500 staging: rtl8192e: renamed variable AMPDU_Factor Coding style issue, checkpatch Avoid CamelCase, rename it. AMPDU_Factor -> ampdu_factor Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231206230404.1721-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit e97f14e92dd422cd1dd265dc086b73354293080f Author: Gary Rookard Date: Wed Dec 6 18:04:01 2023 -0500 staging: rtl8192e: renamed variable bAMPDUEnable Coding style issue, checkpatch Avoid CamelCase, rename it. bAMPDUEnable -> ampdu_enable Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231206230404.1721-3-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit cbf028b29d17ebc1ab35cc1baf0d29c6b9b693d8 Author: Gary Rookard Date: Wed Dec 6 18:04:00 2023 -0500 staging: rtl8192e: renamed variable bAMSDU_Support Coding style issue, checkpatch Avoid CamelCase, rename it. bAMSDU_Suppport -> amsdu_support Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231206230404.1721-2-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 6cb3158903c6402d7be26677becde5dc1862a48b Author: Umang Jain Date: Thu Dec 7 14:08:37 2023 +0530 staging: vc04_services: vchiq_dev: Use %p to log pointer address Solves the following Smatch warnings: vchiq_release() warn: argument 7 to %lx specifier is cast from pointer %p will print the hashed pointer to dynamic debug. In order to print the unmodified pointer address, one can use the `no_hash_pointers` via kernel parameters. Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20231207083837.153843-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 93596ac342c501db98dbd7b94bc60c12daad7569 Author: Umang Jain Date: Thu Dec 7 14:08:36 2023 +0530 staging: vc04_services: vchiq_arm: Use %p to log pointer address Solves the following Smatch warnings: service_callback() warn: argument 7 to %lx specifier is cast from pointer service_callback() warn: argument 11 to %lx specifier is cast from pointer service_callback() warn: argument 12 to %lx specifier is cast from pointer service_callback() warn: argument 13 to %lx specifier is cast from pointer %p will print the hashed pointer to dynamic debug. In order to print the unmodified pointer address, one can use the `no_hash_pointers` via kernel parameters. Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20231207083837.153843-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit f925f69e21f2a948369c331f0acd8838fc2ae90d Merge: 52c9a884c6388 8bc2a3634b87e Author: Mark Brown Date: Sat Dec 9 12:31:09 2023 +0000 spi: pxa2xx: Update documentation Merge series from Andy Shevchenko : A couple of documentation updates. commit 79c603ee43b2674fba0257803bab265147821955 Author: Borislav Petkov (AMD) Date: Fri Dec 8 22:57:33 2023 +0100 Documentation/x86: Document what /proc/cpuinfo is for This has been long overdue. Write down what x86's version of /proc/cpuinfo is and should be used for. With improvements by dhansen. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/20231129101700.28482-1-bp@alien8.de commit efa28efd9cba015f8c3d88123527c3c3cfcd13d0 Author: Laurent Pinchart Date: Sun Nov 26 03:09:48 2023 +0100 media: rkisp1: resizer: Stop manual allocation of v4l2_subdev_state Supported media bus codes on the resizer sink pad are identical to the ISP source pad. The .enum_mbus_code() handler thus delegates the enumeration to the ISP's operation. This is problematic for two reasons: - Format enumeration on the ISP source pad is dependent on the format configured on the ISP sink pad for the same subdev state (TRY or ACTIVE), while format enumeration on the resizer sink pad should return all formats supported by the resizer subdev, regardless of the ISP configuration. - Delegating the operation involves creating a fake v4l2_subdev_state on the stack to pass to the ISP .enum_mbus_code() handler. This gets in the way of evolution of both the ISP enumeration handler and, more generally, the V4L2 subdev state infrastructure. Fix those two issues by implementing format enumeration manually for the resizer. Link: https://lore.kernel.org/r/20231126020948.2700-1-laurent.pinchart@ideasonboard.com Reviewed-by: Paul Elder Reviewed-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit af58c2d9d3957a94888892afacf1c3c894e84818 Author: Paul Elder Date: Fri Dec 1 15:04:32 2023 +0100 media: rkisp1: debug: Count completed frame interrupts Add a counter to debugfs to count the number of frame-end interrupts. Link: https://lore.kernel.org/r/20231201140433.2126011-4-paul.elder@ideasonboard.com Signed-off-by: Paul Elder Reviewed-by: Alexander Stein Reviewed-by: Kieran Bingham Reviewed-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit adf1cba7c85f0be01125573fbfd83aff43464607 Author: Paul Elder Date: Fri Dec 1 15:04:31 2023 +0100 media: rkisp1: debug: Add register dump for IS Add register dump for the ISP image stabilizer module to debugfs. This helps debugging issues related to digital zoom. Link: https://lore.kernel.org/r/20231201140433.2126011-3-paul.elder@ideasonboard.com Signed-off-by: Paul Elder Tested-by: Alexander Stein Reviewed-by: Kieran Bingham Reviewed-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 02f2c7b457273495d408814eb90a01289b31b0ea Author: Paul Elder Date: Fri Dec 1 15:04:30 2023 +0100 media: rkisp1: regs: Consolidate MI interrupt wrap fields Consolidate the wraparound fields in the memory interface interrupt status registers, so that it can be more succinctly expressed by taking the stream ID (main or self) as a parameter. Link: https://lore.kernel.org/r/20231201140433.2126011-2-paul.elder@ideasonboard.com Signed-off-by: Paul Elder Reviewed-by: Kieran Bingham Reviewed-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 870565f063a58576e8a4529f122cac4325c6b395 Author: Tomi Valkeinen Date: Thu Dec 7 08:57:48 2023 +0100 media: rkisp1: Fix IRQ disable race issue In rkisp1_isp_stop() and rkisp1_csi_disable() the driver masks the interrupts and then apparently assumes that the interrupt handler won't be running, and proceeds in the stop procedure. This is not the case, as the interrupt handler can already be running, which would lead to the ISP being disabled while the interrupt handler handling a captured frame. This brings up two issues: 1) the ISP could be powered off while the interrupt handler is still running and accessing registers, leading to board lockup, and 2) the interrupt handler code and the code that disables the streaming might do things that conflict. It is not clear to me if 2) causes a real issue, but 1) can be seen with a suitable delay (or printk in my case) in the interrupt handler, leading to board lockup. Link: https://lore.kernel.org/r/20231207-rkisp-irq-fix-v3-4-358a2c871a3c@ideasonboard.com Tested-by: Adam Ford #imx8mp-beacon Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 0753874617de883c6d4da903142f334f76a75d70 Author: Tomi Valkeinen Date: Thu Dec 7 08:57:47 2023 +0100 media: rkisp1: Store IRQ lines Store the IRQ lines used by the driver for easy access. These are needed in future patches which fix IRQ race issues. Link: https://lore.kernel.org/r/20231207-rkisp-irq-fix-v3-3-358a2c871a3c@ideasonboard.com Tested-by: Adam Ford #imx8mp-beacon Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 3eb7910e1b16a2c136be26a8380f21469225b2f6 Author: Tomi Valkeinen Date: Thu Dec 7 08:57:46 2023 +0100 media: rkisp1: Fix IRQ handler return values The IRQ handler rkisp1_isr() calls sub-handlers, all of which returns an irqreturn_t value, but rkisp1_isr() ignores those values and always returns IRQ_HANDLED. Fix this by collecting the return values, and returning IRQ_HANDLED or IRQ_NONE as appropriate. Link: https://lore.kernel.org/r/20231207-rkisp-irq-fix-v3-2-358a2c871a3c@ideasonboard.com Tested-by: Adam Ford #imx8mp-beacon Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 85d2a31fe4d9be1555f621ead7a520d8791e0f74 Author: Tomi Valkeinen Date: Thu Dec 7 08:57:45 2023 +0100 media: rkisp1: Drop IRQF_SHARED In all known platforms the ISP has dedicated IRQ lines, but for some reason the driver uses IRQF_SHARED. Supporting IRQF_SHARED properly requires handling interrupts even when our device is disabled, and the driver does not handle this. To avoid adding such code, and to be sure the driver won't accidentally be used in a platform with shared interrupts, let's drop the IRQF_SHARED flag. Link: https://lore.kernel.org/r/20231207-rkisp-irq-fix-v3-1-358a2c871a3c@ideasonboard.com Tested-by: Adam Ford #imx8mp-beacon Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 688f3af3c354adc19b78d352c8c7b2006f993f2d Author: Tomi Valkeinen Date: Wed Nov 22 16:50:08 2023 +0100 media: rkisp1: Fix memory leaks in rkisp1_isp_unregister() Add missing call to v4l2_subdev_cleanup() to fix memory leak. Link: https://lore.kernel.org/r/20231122-rkisp-fixes-v2-2-78bfb63cdcf8@ideasonboard.com Fixes: 2cce0a369dbd ("media: rkisp1: isp: Use V4L2 subdev active state") Reviewed-by: Tommaso Merciai Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 452f604a4683654f4d9472b3126d8da61d748443 Author: Tomi Valkeinen Date: Wed Nov 22 16:50:07 2023 +0100 media: rkisp1: Fix media device memory leak Add missing calls to media_device_cleanup() to fix memory leak. Link: https://lore.kernel.org/r/20231122-rkisp-fixes-v2-1-78bfb63cdcf8@ideasonboard.com Fixes: d65dd85281fb ("media: staging: rkisp1: add Rockchip ISP1 base driver") Reviewed-by: Tommaso Merciai Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 25bf28b25a2afa1864b7143259443160d9163ea0 Author: Mehdi Djait Date: Wed Nov 15 17:44:07 2023 +0100 media: dt-bindings: media: rkisp1: Fix the port description for the parallel interface The bus-type belongs to the endpoint's properties and should therefore be moved. Link: https://lore.kernel.org/r/20231115164407.99876-1-mehdi.djait@bootlin.com Fixes: 6a0eaa25bf36 ("media: dt-bindings: media: rkisp1: Add port for parallel interface") Signed-off-by: Mehdi Djait Acked-by: Conor Dooley Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit d80d227eb0f69c9bf5649c9b6c1c5cead14e5813 Author: Alexander Stein Date: Thu Dec 7 12:09:18 2023 +0100 media: nxp: imx8-isi-debug: Add missing 36-Bit DMA registers to debugfs output The extended address registers are missing in the debug output register list. These are only available on 36-Bit DMA platforms. Due to the prolonged name, the output width has to be adjusted as well. Link: https://lore.kernel.org/r/20231207110918.1338524-1-alexander.stein@ew.tq-group.com Signed-off-by: Alexander Stein Tested-by: Alexander Stein Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit fb387fcb5cdd0384ba04a5d15a3605e2dccdab2a Author: Tomi Valkeinen Date: Wed Nov 22 16:21:35 2023 +0100 media: imx-mipi-csis: Drop extra clock enable at probe() The driver always enables the clocks at probe() and disables them only at remove(). It is not clear why the driver does this, as it supports runtime PM, and enables and disables the clocks in the runtime resume and suspend callbacks. Also, in the case runtime PM is not available, the driver calls the resume and suspend callbacks manually from probe() and remove(). Drop the unnecessary clock enable, thus enabling the clocks only when actually needed. Link: https://lore.kernel.org/r/20231122-imx-csis-v2-2-e44b8dc4cb66@ideasonboard.com Fixes: 7807063b862b ("media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7") Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 5705b0e0eb550ff834125a46a4ef99b62093d83d Author: Tomi Valkeinen Date: Wed Nov 22 16:21:34 2023 +0100 media: imx-mipi-csis: Fix clock handling in remove() The driver always calls mipi_csis_runtime_suspend() and mipi_csis_clk_disable() in remove(). This causes multiple WARNs from the kernel, as the clocks get disabled too many times. Fix the remove() to call mipi_csis_runtime_suspend() and mipi_csis_clk_disable() in a way that reverses what is done in probe(). Link: https://lore.kernel.org/r/20231122-imx-csis-v2-1-e44b8dc4cb66@ideasonboard.com Fixes: 7807063b862b ("media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7") Signed-off-by: Tomi Valkeinen Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 2a0ed5a3573b88e85d778e81d2be3c0fdf7a884d Author: Laurent Pinchart Date: Tue Jul 25 21:14:45 2023 +0200 media: imx: imx7-media-csi: Include headers explicitly Include all the headers that the driver needs explicitly instead of relying on indirect inclusion. While at it, drop a few unneeded headers. Signed-off-by: Laurent Pinchart Acked-by: Alexander Stein Signed-off-by: Mauro Carvalho Chehab commit 6180056b0e0c097dad5d1569dcd661eaf509ea43 Author: Ricardo Ribalda Date: Sat Oct 28 09:55:04 2023 +0200 media: uvcvideo: Fix power line control for SunplusIT camera The device does not implement the power line frequency control correctly. It is a UVC 1.5 device, but implements the control as a UVC 1.1 device. Add the corresponding control mapping override. Bus 003 Device 002: ID 2b7e:b752 SunplusIT Inc HD Camera Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.01 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x2b7e idProduct 0xb752 bcdDevice 0.04 iManufacturer 1 SunplusIT Inc iProduct 2 HD Camera iSerial 3 01.00.00 bNumConfigurations 1 Cc: Yunke Cao Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 323666d1b32315930f6f14175fc59f0853647881 Author: Laurent Pinchart Date: Fri Oct 20 00:02:46 2023 +0200 media: uvcvideo: Pick first best alternate setting insteed of last When selecting an alternate setting, the driver loops over all available alternate settings to find the one with the lowest bandwidth high enough for the selected format and resolution. While all alternate settings should have different packet sizes, some buggy devices report multiple alternate settings with the same size. The driver happens to pick the last one in this case. In theory this should work fine, but in real life we have device bugs. The Ali Corp. Newmine Camera (0402:8841) exposes four alternate settings with the same packet size. The first three seem to work fine, while selecting the last one results in lots of transmission errors. Switch to using the first best alternate setting when multiple are present. This should be safe (last famous words), as sniffing USB traffic with the faulty device shows that Windows 10 picks the first alternate setting, and devices are typically tested on Windows. Closes: https://lore.kernel.org/linux-media/Nh6D0WI--3-9@tutanota.com/ Reported-by: Karel Janda Suggested-by: Karel Janda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit dba3e701917a4cce92920f8ccb9fa4d4ee5ac07e Author: Ricardo Ribalda Date: Tue Sep 5 17:29:52 2023 +0200 media: uvcvideo: Fix power line control for a Chicony camera The device does not implement the control properly. Fixes v4l2-compliance error: info: checking control 'Power Line Frequency' (0x00980918) fail: v4l2-test-controls.cpp(552): could not set valid menu item 3 Signed-off-by: Ricardo Ribalda Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 350ab13e1382f2afcc2285041a1e75b80d771c2c Author: Hans Verkuil Date: Thu Nov 30 13:58:12 2023 +0100 media: videobuf2: request more buffers for vb2_read The vb2 read support requests 1 buffer, leaving it to the driver to increase this number to something that works. Unfortunately, drivers do not deal with this reliably, and in fact this caused problems for the bttv driver and reading from /dev/vbiX, causing every other VBI frame to be all 0. Instead, request as the number of buffers whatever is the maximum of 2 and q->min_buffers_needed+1. In order to start streaming you need at least q->min_buffers_needed queued buffers, so add 1 buffer for processing. And if that field is 0, then choose 2 (again, one buffer is being filled while the other one is being processed). This certainly makes more sense than requesting just 1 buffer, and the VBI bttv support is now working again. It turns out that the old videobuf1 behavior of bttv was to allocate 8 (video) and 4 (vbi) buffers when used with read(). After the vb2 conversion that changed to 2 for both. With this patch it is 3, which is really all you need. Signed-off-by: Hans Verkuil Fixes: b7ec3212a73a ("media: bttv: convert to vb2") Tested-by: Dr. David Alan Gilbert Signed-off-by: Mauro Carvalho Chehab commit 3f1faa154a4316b1b585a25394697504b3c24e98 Author: Hans Verkuil Date: Thu Nov 30 13:58:11 2023 +0100 media: bttv: add back vbi hack The old (now removed) videobuf framework had an optional vbi hack where the sequence number of the frame counter was copied in the last 4 bytes of the buffer. This hack was active only for the read() interface (so not for streaming I/O), and it was enabled by bttv. This allowed applications that used read() for the VBI data to match it with the corresponding video frame. When bttv was converted to vb2 this hack was forgotten, but some old applications rely on this. So add this back, but this time in the bttv driver rather than in the vb2 framework. Signed-off-by: Hans Verkuil Fixes: b7ec3212a73a ("media: bttv: convert to vb2") Tested-by: Dr. David Alan Gilbert Signed-off-by: Mauro Carvalho Chehab commit 0d75bb6ae127f5e3fd0e2239714908fd2038193d Author: Hans Verkuil Date: Thu Nov 30 13:58:10 2023 +0100 media: bttv: start_streaming should return a proper error code The start_streaming callback returned 0 or 1 instead of a proper error code. Fix that. Signed-off-by: Hans Verkuil Fixes: b7ec3212a73a ("media: bttv: convert to vb2") Signed-off-by: Mauro Carvalho Chehab commit 16e84c137919dd91c1cb1102a3d536fce2d6ee94 Author: Luca Weiss Date: Fri Dec 8 16:08:07 2023 +0100 arm64: dts: qcom: qcm6490-fairphone-fp5: Enable WiFi Now that the WPSS remoteproc is enabled, enable wifi so we can use it. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-11-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit 5ffc529fa5dfe428ab9a7866b58b964a376dd953 Author: Luca Weiss Date: Fri Dec 8 16:08:06 2023 +0100 arm64: dts: qcom: qcm6490-fairphone-fp5: Enable various remoteprocs Enable the ADSP, CDSP, MPSS and WPSS that are found on the SoC. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-10-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit df62402e5ff9df1960622b4d7bc5dd43dc8e7b75 Author: Luca Weiss Date: Fri Dec 8 16:08:05 2023 +0100 arm64: dts: qcom: sc7280: Add CDSP node Add the node for the ADSP found on the SC7280 SoC, using standard Qualcomm firmware. Remove the reserved-memory node from sc7280-chrome-common since CDSP is currently not used there. Acked-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-9-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit 3658e411efcbb4df882763b09ae49efaa86585b4 Author: Luca Weiss Date: Fri Dec 8 16:08:04 2023 +0100 arm64: dts: qcom: sc7280: Add ADSP node Add the node for the ADSP found on the SC7280 SoC, using standard Qualcomm firmware. Acked-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-8-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit 0bcbf092560cc1c163156af67176cbb4b8a327f9 Author: Luca Weiss Date: Fri Dec 8 16:08:03 2023 +0100 arm64: dts: qcom: sc7280: Use WPSS PAS instead of PIL The wpss-pil driver wants to manage too many resources that cannot be touched with standard Qualcomm firmware. Use the compatible from the PAS driver and move the ChromeOS-specific bits to sc7280-chrome-common.dtsi. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231208-sc7280-remoteprocs-v3-7-6aa394d33edf@fairphone.com Signed-off-by: Bjorn Andersson commit cad7c46ae2d75b42aa8f1e3f741b203ed796eee9 Author: Luca Weiss Date: Mon Oct 2 14:30:41 2023 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Enable UFS Enable the UFS phy and controller so that we can access the internal storage of the phone. At the same time we need to bump the minimum voltage used for UFS VCC, otherwise it doesn't initialize properly. The 2.952V is taken from the vcc-voltage-level property downstream. See also the following link for more information about the VCCQ/VCCQ2: https://gerrit-public.fairphone.software/plugins/gitiles/kernel/msm-extra/devicetree/+/1590a3739e7dc29d2597307881553236d492f188/fp5/yupik-idp-pm7250b.dtsi#207 Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231002-fp5-ufs-v2-1-e2d7de522134@fairphone.com Signed-off-by: Bjorn Andersson commit 24187868e195202c67c38bcc3ae28f9c6a663fb4 Author: Luca Weiss Date: Sat Nov 25 13:19:27 2023 +0100 arm64: dts: qcom: msm8953: Set initial address for memory The dtbs_check really doesn't like having memory without reg set. The base address depends on the amount of RAM you have: <= 2.00 GiB RAM: 0x80000000 = 3.00 GiB RAM: 0x40000000 = 3.75 GiB RAM: 0x10000000 (more does not fit into the 32-bit physical address space) So, let's pick one of the values, 0x10000000 which is used on devices with 3.75 GiB RAM. Since the bootloader will update it to what's present on the device it doesn't matter too much. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231125-msm8953-misc-fixes-v2-1-df86655841d9@z3ntu.xyz Signed-off-by: Bjorn Andersson commit fc209f869310776c437daba478246df64d82c38b Author: Luca Weiss Date: Thu Nov 30 21:35:20 2023 +0100 ARM: dts: qcom: msm8226: Add GPU The msm8226 SoC contains an Adreno 305B. Add a node to configure it. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231130-msm8226-gpu-v1-3-6bb2f1b29e49@z3ntu.xyz Signed-off-by: Bjorn Andersson commit c9c8179d0ccdf024ce467b4c9cf5de8821bc02cb Author: Bryant Mairs Date: Sun Dec 3 15:19:18 2023 +0100 ARM: dts: qcom: Disable pm8941 & pm8226 smbb charger by default Some platforms don't use the built-in charging hardware (e.g. milletwifi). As this is an optional peripheral, default it to off. Keep it enabled for all other boards that use smbb. Signed-off-by: Bryant Mairs Signed-off-by: Luca Weiss Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231203-smbb-pm8941-pm8226-v1-1-9ad75909604b@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 9b07340c55a8e918f2667fb911e9b2edc428793c Author: Nitin Rawat Date: Tue Dec 5 15:38:56 2023 +0100 arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 IDP board Add UFS host controller and PHY nodes for sc7280 IDP board. Signed-off-by: Nitin Rawat Acked-by: Manivannan Sadhasivam Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231205-sc7280-ufs-v6-3-ad6ca7796de7@fairphone.com Signed-off-by: Bjorn Andersson commit c8a074789d71c1e26920f9333125590fac84f8c7 Author: Nitin Rawat Date: Tue Dec 5 15:38:55 2023 +0100 arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc Add UFS host controller and PHY nodes for sc7280 soc. Signed-off-by: Nitin Rawat Reviewed-by: Konrad Dybcio Tested-by: Konrad Dybcio [luca: various cleanups and additions as written in the cover letter] Signed-off-by: Luca Weiss Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231205-sc7280-ufs-v6-2-ad6ca7796de7@fairphone.com Signed-off-by: Bjorn Andersson commit 362a8dba85ebedbf6939dad78bc6de398a2ef4e7 Author: Ville Syrjälä Date: Thu Sep 28 18:24:50 2023 +0300 drm/i915: Drop irqsave/restore for flip_done_handler() Since flip_done_handler() is always called from the irq handler we can skip the irqsave/restore dance. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230928152450.30109-2-ville.syrjala@linux.intel.com Reviewed-by: Arun R Murthy commit 6128becaeafa876048bd1b6a83d836329e4940c5 Author: Ville Syrjälä Date: Thu Sep 28 18:24:49 2023 +0300 drm/i915: Stop accessing crtc->state from the flip done irq Assuming crtc->state is pointing at the correct thing for the async flip commit is nonsense. If we had already queued up multiple commits this would point at the very lates crtc state even if the older commits hadn't even happened yet. Instead properly stage/arm the event like we do for async flips. Since we don't need to arm multiple of these at the same time we don't need a list like the normal vblank even processing uses. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230928152450.30109-1-ville.syrjala@linux.intel.com Reviewed-by: Arun R Murthy commit a3c205d0560f63ff02516b6d9fc3348dc34251c8 Author: Eric Dumazet Date: Thu Dec 7 20:13:22 2023 +0000 ipv6: do not check fib6_has_expires() in fib6_info_release() My prior patch went a bit too far, because apparently fib6_has_expires() could be true while f6i->gc_link is not hashed yet. fib6_set_expires_locked() can indeed set RTF_EXPIRES while f6i->fib6_table is NULL. Original syzbot reports were about corruptions caused by dangling f6i->gc_link. Fixes: 5a08d0065a91 ("ipv6: add debug checks in fib6_info_release()") Reported-by: syzbot+c15aa445274af8674f41@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Cc: Kui-Feng Lee Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20231207201322.549000-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 32fa058398624166dd04ff4af49cfef69c94abbc Author: Sergei Trofimovich Date: Fri Dec 8 21:51:00 2023 +0000 libbpf: Add pr_warn() for EINVAL cases in linker_sanity_check_elf Before the change on `i686-linux` `systemd` build failed as: $ bpftool gen object src/core/bpf/socket_bind/socket-bind.bpf.o src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o Error: failed to link 'src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o': Invalid argument (22) After the change it fails as: $ bpftool gen object src/core/bpf/socket_bind/socket-bind.bpf.o src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o libbpf: ELF section #9 has inconsistent alignment addr=8 != d=4 in src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o Error: failed to link 'src/core/bpf/socket_bind/socket-bind.bpf.unstripped.o': Invalid argument (22) Now it's slightly easier to figure out what is wrong with an ELF file. Signed-off-by: Sergei Trofimovich Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20231208215100.435876-1-slyich@gmail.com commit 09115c33e6ec4a98a0609ac5fa702b7fe566d8f9 Merge: 1720c42b90c8f a2c6380b17b63 Author: Martin KaFai Lau Date: Fri Dec 8 16:26:26 2023 -0800 Merge branch 'bpf: Expand bpf_cgrp_storage to support cgroup1 non-attach case' Yafang Shao says: ==================== In the current cgroup1 environment, associating operations between a cgroup and applications in a BPF program requires storing a mapping of cgroup_id to application either in a hash map or maintaining it in userspace. However, by enabling bpf_cgrp_storage for cgroup1, it becomes possible to conveniently store application-specific information in cgroup-local storage and utilize it within BPF programs. Furthermore, enabling this feature for cgroup1 involves minor modifications for the non-attach case, streamlining the process. However, when it comes to enabling this functionality for the cgroup1 attach case, it presents challenges. Therefore, the decision is to focus on enabling it solely for the cgroup1 non-attach case at present. If attempting to attach to a cgroup1 fd, the operation will simply fail with the error code -EBADF. Changes: - RFC -> v1: - Collect acked-by - Avoid unnecessary is_cgroup1 check (Yonghong) - Keep the code patterns consistent (Yonghong) ==================== Signed-off-by: Martin KaFai Lau commit a2c6380b17b6339bfedc98d253b6d85e7014953b Author: Yafang Shao Date: Wed Dec 6 11:53:26 2023 +0000 selftests/bpf: Add selftests for cgroup1 local storage Expanding the test coverage from cgroup2 to include cgroup1. The result as follows, Already existing test cases for cgroup2: #48/1 cgrp_local_storage/tp_btf:OK #48/2 cgrp_local_storage/attach_cgroup:OK #48/3 cgrp_local_storage/recursion:OK #48/4 cgrp_local_storage/negative:OK #48/5 cgrp_local_storage/cgroup_iter_sleepable:OK #48/6 cgrp_local_storage/yes_rcu_lock:OK #48/7 cgrp_local_storage/no_rcu_lock:OK Expanded test cases for cgroup1: #48/8 cgrp_local_storage/cgrp1_tp_btf:OK #48/9 cgrp_local_storage/cgrp1_recursion:OK #48/10 cgrp_local_storage/cgrp1_negative:OK #48/11 cgrp_local_storage/cgrp1_iter_sleepable:OK #48/12 cgrp_local_storage/cgrp1_yes_rcu_lock:OK #48/13 cgrp_local_storage/cgrp1_no_rcu_lock:OK Summary: #48 cgrp_local_storage:OK Summary: 1/13 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Yafang Shao Acked-by: Tejun Heo Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231206115326.4295-4-laoar.shao@gmail.com Signed-off-by: Martin KaFai Lau commit f4199271dae12ae407fa739e7012914ea6b3f37b Author: Yafang Shao Date: Wed Dec 6 11:53:25 2023 +0000 selftests/bpf: Add a new cgroup helper open_classid() This new helper allows us to obtain the fd of a net_cls cgroup, which will be utilized in the subsequent patch. Signed-off-by: Yafang Shao Acked-by: Tejun Heo Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231206115326.4295-3-laoar.shao@gmail.com Signed-off-by: Martin KaFai Lau commit 73d9eb340d2b95e0e86a656a7f3157c137f10129 Author: Yafang Shao Date: Wed Dec 6 11:53:24 2023 +0000 bpf: Enable bpf_cgrp_storage for cgroup1 non-attach case In the current cgroup1 environment, associating operations between cgroups and applications in a BPF program requires storing a mapping of cgroup_id to application either in a hash map or maintaining it in userspace. However, by enabling bpf_cgrp_storage for cgroup1, it becomes possible to conveniently store application-specific information in cgroup-local storage and utilize it within BPF programs. Furthermore, enabling this feature for cgroup1 involves minor modifications for the non-attach case, streamlining the process. However, when it comes to enabling this functionality for the cgroup1 attach case, it presents challenges. Therefore, the decision is to focus on enabling it solely for the cgroup1 non-attach case at present. If attempting to attach to a cgroup1 fd, the operation will simply fail with the error code -EBADF. Signed-off-by: Yafang Shao Acked-by: Tejun Heo Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231206115326.4295-2-laoar.shao@gmail.com Signed-off-by: Martin KaFai Lau commit 1720c42b90c8f14ffcb2f2f39a1abafc82a5b22e Author: Andrii Nakryiko Date: Fri Dec 8 15:30:28 2023 -0800 selftests/bpf: fix timer/test_bad_ret subtest on test_progs-cpuv4 flavor Because test_bad_ret main program is not written in assembly, we don't control instruction indices in timer_cb_ret_bad() subprog. This bites us in timer/test_bad_ret subtest, where we see difference between cpuv4 and other flavors. For now, make __msg() expectations not rely on instruction indices by anchoring them around bpf_get_prandom_u32 call. Once we have regex/glob support for __msg(), this can be expressed a bit more nicely, but for now just mitigating the problem with available means. Fixes: e02dea158dda ("selftests/bpf: validate async callback return value check correctness") Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231208233028.3412690-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 885f68fec0b05a0cc9a2d2b7c24f6986785f44a1 Merge: d685aea5e0a89 729f02ec02ae1 Author: Mark Brown Date: Sat Dec 9 00:16:04 2023 +0000 GPIO descriptor cleanup for some Wolfson codecs Merge series from Linus Walleij : This converts the remaining Wolfson ASoC codecs to use GPIO descriptors. These Wolfson codecs are mostly used with different Samsung S3C (especially Cragganmore 6410) board files, so the in-tree users are fixed up in the process. commit bf17b36ccdd5b7b9dd482d7753bcb9aff2d21d39 Author: Johannes Berg Date: Wed Dec 6 17:21:23 2023 +0100 net: sysfs: fix locking in carrier read My previous patch added a call to linkwatch_sync_dev(), but that of course needs to be called under RTNL, which I missed earlier, but now saw RCU warnings from. Fix that by acquiring the RTNL in a similar fashion to how other files do it here. Fixes: facd15dfd691 ("net: core: synchronize link-watch when carrier is queried") Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20231206172122.859df6ba937f.I9c80608bcfbab171943ff4942b52dbd5e97fe06e@changeid Signed-off-by: Jakub Kicinski commit f788893d5e2dbfb30a91dfb1f978e21cd6113026 Merge: 1b151e2435fc3 fa2bbff7b0b4e Author: Jens Axboe Date: Fri Dec 8 16:25:39 2023 -0700 Merge tag 'md-next-20231208' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-6.8/block Pull MD updates from Song: "1. Fix/Cleanup RCU usage from conf->disks[i].rdev, by Yu Kuai; 2. Fix raid5 hang issue, by Junxiao Bi; 3. Add Yu Kuai as Reviewer of the md subsystem." * tag 'md-next-20231208' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: synchronize flush io with array reconfiguration MAINTAINERS: SOFTWARE RAID: Add Yu Kuai as Reviewer md/md-multipath: remove rcu protection to access rdev from conf md/raid5: remove rcu protection to access rdev from conf md/raid1: remove rcu protection to access rdev from conf md/raid10: remove rcu protection to access rdev from conf md: remove flag RemoveSynchronized Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d" md: bypass block throttle for superblock update commit d3e09f57345f86cf5c47a89fc216f6c98f9a4a7a Author: Anshul Dalal Date: Fri Dec 8 13:20:35 2023 +0530 dt-bindings: input: gpio-mouse: Convert to json-schema Convert device tree binding documentation for GPIO attached mouse to json-schema. Signed-off-by: Anshul Dalal Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231208075037.114598-1-anshulusr@gmail.com Signed-off-by: Dmitry Torokhov commit 5a205c6a9f79d14db38006aa2d7c4f4e76b1bfc7 Author: Miguel Ojeda Date: Fri Dec 8 23:52:07 2023 +0100 clang-format: Update with v6.7-rc4's `for_each` macro list Re-run the shell fragment that generated the original list. Signed-off-by: Miguel Ojeda commit 2a0b726b0419b0c1c5a32e7c3336285e69e65fd6 Author: Elliot Berman Date: Fri Dec 8 14:08:29 2023 -0800 clang-format: Add maple tree's for_each macros Add maple tree's for_each macros so clang-format operates correctly on {mt,mas}_for_each. Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/20231208-clang-format-mt-for-each-v1-1-b4b73186b886@quicinc.com [ Sorted properly. ] Signed-off-by: Miguel Ojeda commit 50709576d81bbcbe027d22c64cd2ec934bd9087b Author: Sumit Garg Date: Tue Nov 28 12:53:52 2023 +0530 Documentation: Destage TEE subsystem documentation Add a separate documentation directory for TEE subsystem since it is a standalone subsystem which already offers devices consumed by multiple different subsystem drivers. Split overall TEE subsystem documentation modularly where: - The userspace API has been moved to Documentation/userspace-api/tee.rst. - The driver API has been moved to Documentation/driver-api/tee.rst. - The first module covers the overview of TEE subsystem. - The further modules are dedicated to different TEE implementations like: - OP-TEE - AMD-TEE - and so on for future TEE implementation support. Acked-by: Rijo Thomas Acked-by: Jens Wiklander Signed-off-by: Sumit Garg Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231128072352.866859-1-sumit.garg@linaro.org commit 7048708fec3a401f9a70e4a74e2e12aa7f88c132 Author: Johan Jonker Date: Mon Dec 4 18:39:03 2023 +0100 dt-bindings: drm: rockchip: convert inno_hdmi-rockchip.txt to yaml Convert inno_hdmi-rockchip.txt to yaml. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/49c6afec-022f-02de-99a0-d409b64da198@gmail.com Signed-off-by: Rob Herring commit e57ddc6c80d2b39381f4476d99dab09825a8d584 Author: Luca Ceresoli Date: Fri Dec 1 14:10:43 2023 +0100 docs: nvmem: remove function parameters (fixes hyperlink generation) Adding a parameter is not particularly useful here, and it is definitely not done elsewhere. It also prevents the generation of a hyperlink to the kernel-doc documentation. Removing the parameter to enable hyperlinks and make the style coherent. Signed-off-by: Luca Ceresoli Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231201-nvmem-docs-kerneldoc-v1-2-3e8f2b706ce6@bootlin.com commit 2b4ba158ae04a6bbda20c2305b35c13dbc7ced18 Author: Luca Ceresoli Date: Fri Dec 1 14:10:42 2023 +0100 docs: nvmem: generate kernel-doc API documentation This is useful on its own, and it also enables hyperlink generation for functions mentioned in ReST documentation. Signed-off-by: Luca Ceresoli Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231201-nvmem-docs-kerneldoc-v1-1-3e8f2b706ce6@bootlin.com commit 8926f57943d4352612b40e96c8232bef4cc6e362 Author: Randy Dunlap Date: Tue Dec 5 18:53:55 2023 -0800 fs: vboxsf: fix a kernel-doc warning Fix function parameters to prevent kernel-doc warnings. vboxsf_wrappers.c:132: warning: Function parameter or member 'create_parms' not described in 'vboxsf_create' vboxsf_wrappers.c:132: warning: Excess function parameter 'param' description in 'vboxsf_create' Signed-off-by: Randy Dunlap Cc: Hans de Goede Cc: Alexander Viro Cc: Christian Brauner Reviewed-by: Hans de Goede Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231206025355.31814-1-rdunlap@infradead.org commit 4af20ab9edee62aa2bb5b6f31b7f029de14e0756 Merge: 8b7b0e5fe47de 2929bfac006d8 Author: Andrii Nakryiko Date: Fri Dec 8 14:19:00 2023 -0800 Merge branch 'bpf-fix-accesses-to-uninit-stack-slots' Andrei Matei says: ==================== bpf: fix accesses to uninit stack slots Fix two related issues issues around verifying stack accesses: 1. accesses to uninitialized stack memory was allowed inconsistently 2. the maximum stack depth needed for a program was not always maintained correctly The two issues are fixed together in one commit because the code for one affects the other. V4 to V5: - target bpf-next (Alexei) V3 to V4: - minor fixup to comment in patch 1 (Eduard) - C89-style in patch 3 (Andrii) V2 to V3: - address review comments from Andrii and Eduard - drop new verifier tests in favor of editing existing tests to check for stack depth - append a patch with a bit of cleanup coming out of the previous review ==================== Link: https://lore.kernel.org/r/20231208032519.260451-1-andreimatei1@gmail.com Signed-off-by: Andrii Nakryiko commit 2929bfac006d8f8e22b307d04e0d71bcb84db698 Author: Andrei Matei Date: Thu Dec 7 22:25:19 2023 -0500 bpf: Minor cleanup around stack bounds Push the rounding up of stack offsets into the function responsible for growing the stack, rather than relying on all the callers to do it. Uncertainty about whether the callers did it or not tripped up people in a previous review. Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20231208032519.260451-4-andreimatei1@gmail.com commit 6b4a64bafd107e521c01eec3453ce94a3fb38529 Author: Andrei Matei Date: Thu Dec 7 22:25:18 2023 -0500 bpf: Fix accesses to uninit stack slots Privileged programs are supposed to be able to read uninitialized stack memory (ever since 6715df8d5) but, before this patch, these accesses were permitted inconsistently. In particular, accesses were permitted above state->allocated_stack, but not below it. In other words, if the stack was already "large enough", the access was permitted, but otherwise the access was rejected instead of being allowed to "grow the stack". This undesired rejection was happening in two places: - in check_stack_slot_within_bounds() - in check_stack_range_initialized() This patch arranges for these accesses to be permitted. A bunch of tests that were relying on the old rejection had to change; all of them were changed to add also run unprivileged, in which case the old behavior persists. One tests couldn't be updated - global_func16 - because it can't run unprivileged for other reasons. This patch also fixes the tracking of the stack size for variable-offset reads. This second fix is bundled in the same commit as the first one because they're inter-related. Before this patch, writes to the stack using registers containing a variable offset (as opposed to registers with fixed, known values) were not properly contributing to the function's needed stack size. As a result, it was possible for a program to verify, but then to attempt to read out-of-bounds data at runtime because a too small stack had been allocated for it. Each function tracks the size of the stack it needs in bpf_subprog_info.stack_depth, which is maintained by update_stack_depth(). For regular memory accesses, check_mem_access() was calling update_state_depth() but it was passing in only the fixed part of the offset register, ignoring the variable offset. This was incorrect; the minimum possible value of that register should be used instead. This tracking is now fixed by centralizing the tracking of stack size in grow_stack_state(), and by lifting the calls to grow_stack_state() to check_stack_access_within_bounds() as suggested by Andrii. The code is now simpler and more convincingly tracks the correct maximum stack size. check_stack_range_initialized() can now rely on enough stack having been allocated for the access; this helps with the fix for the first issue. A few tests were changed to also check the stack depth computation. The one that fails without this patch is verifier_var_off:stack_write_priv_vs_unpriv. Fixes: 01f810ace9ed3 ("bpf: Allow variable-offset stack access") Reported-by: Hao Sun Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231208032519.260451-3-andreimatei1@gmail.com Closes: https://lore.kernel.org/bpf/CABWLsev9g8UP_c3a=1qbuZUi20tGoUXoU07FPf-5FLvhOKOY+Q@mail.gmail.com/ commit 92e1567ee3e3f6f160e320890ac77eec50bf8e7d Author: Andrei Matei Date: Thu Dec 7 22:25:17 2023 -0500 bpf: Add some comments to stack representation Add comments to the datastructure tracking the stack state, as the mapping between each stack slot and where its state is stored is not entirely obvious. Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20231208032519.260451-2-andreimatei1@gmail.com commit 24a0b5e196cf70ccff97bc0add6fa7178ad50cc4 Author: Kees Cook Date: Tue Dec 5 10:26:17 2023 -0800 pstore: inode: Use cleanup.h for struct pstore_private Simplify error path when "private" needs to be freed. Cc: Guilherme G. Piccoli Cc: Tony Luck Cc: Link: https://lore.kernel.org/r/20231205182622.1329923-4-keescook@chromium.org Signed-off-by: Kees Cook commit b775a054e9dcd4ca20d56367b3d39b3d69e50a46 Author: Kees Cook Date: Tue Dec 5 10:26:16 2023 -0800 pstore: inode: Use __free(pstore_iput) for inode allocations Simplify error path for failures where "inode" needs to be freed. Cc: Guilherme G. Piccoli Cc: Tony Luck Cc: Link: https://lore.kernel.org/r/20231205182622.1329923-3-keescook@chromium.org Signed-off-by: Kees Cook commit e2eeddefb046dbc771a6fa426f7f98fb25adfe68 Author: Kees Cook Date: Tue Dec 5 10:26:15 2023 -0800 pstore: inode: Convert mutex usage to guard(mutex) Replace open-coded mutex handling with cleanup.h guard(mutex) and scoped_guard(mutex, ...). Cc: Guilherme G. Piccoli Cc: Tony Luck Cc: Link: https://lore.kernel.org/r/20231205182622.1329923-2-keescook@chromium.org Signed-off-by: Kees Cook commit 6ba6ee8a59a8ac673d9a9415bdf1d0a27990dc45 Author: Kees Cook Date: Tue Dec 5 10:26:14 2023 -0800 pstore: inode: Convert kfree() usage to __free(kfree) Mostly as an example to myself, replace a simple allocation pattern with the automatic kfree cleanup features now exposed by cleanup.h. Cc: Guilherme G. Piccoli Cc: Tony Luck Cc: Link: https://lore.kernel.org/r/20231205182622.1329923-1-keescook@chromium.org Signed-off-by: Kees Cook commit 86222a8fc16ec517de8da2604d904c9df3a08e5d Author: Sergey Shtylyov Date: Sun Nov 5 23:29:36 2023 +0300 pstore: ram_core: fix possible overflow in persistent_ram_init_ecc() In persistent_ram_init_ecc(), on 64-bit arches DIV_ROUND_UP() will return 64-bit value since persistent_ram_zone::buffer_size has type size_t which is derived from the 64-bit *unsigned long*, while the ecc_blocks variable this value gets assigned to has (always 32-bit) *int* type. Even if that value fits into *int* type, an overflow is still possible when calculating the size_t typed ecc_total variable further below since there's no cast to any 64-bit type before multiplication. Declaring the ecc_blocks variable as *size_t* should fix this mess... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: 9cc05ad97c57 ("staging: android: persistent_ram: refactor ecc support") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/20231105202936.25694-1-s.shtylyov@omp.ru Signed-off-by: Kees Cook commit d49270a04623ce3c0afddbf3e984cb245aa48e9c Author: Weichen Chen Date: Fri Feb 24 10:36:32 2023 +0800 pstore/ram: Fix crash when setting number of cpus to an odd number When the number of cpu cores is adjusted to 7 or other odd numbers, the zone size will become an odd number. The address of the zone will become: addr of zone0 = BASE addr of zone1 = BASE + zone_size addr of zone2 = BASE + zone_size*2 ... The address of zone1/3/5/7 will be mapped to non-alignment va. Eventually crashes will occur when accessing these va. So, use ALIGN_DOWN() to make sure the zone size is even to avoid this bug. Signed-off-by: Weichen Chen Reviewed-by: Matthias Brugger Tested-by: "Guilherme G. Piccoli" Link: https://lore.kernel.org/r/20230224023632.6840-1-weichen.chen@mediatek.com Signed-off-by: Kees Cook commit 8ed26ab8d59111c2f7b86d200d1eb97d2a458fd1 Author: Paolo Bonzini Date: Wed Oct 18 12:18:00 2023 -0400 KVM: clean up directives to compile out irqfds Keep all #ifdef CONFIG_HAVE_KVM_IRQCHIP parts of eventfd.c together, and compile out the irqfds field of struct kvm if the symbol is not defined. Signed-off-by: Paolo Bonzini commit a5d3df8ae13fada772fbce952e9ee7b3433dba16 Author: Paolo Bonzini Date: Wed Nov 8 10:34:03 2023 +0100 KVM: remove deprecated UAPIs The deprecated interfaces were removed 15 years ago. KVM's device assignment was deprecated in 4.2 and removed 6.5 years ago; the only interest might be in compiling ancient versions of QEMU, but QEMU has been using its own imported copy of the kernel headers since June 2011. So again we go into archaeology territory; just remove the cruft. Signed-off-by: Paolo Bonzini commit c5b31cc2371728ddefe9baf1d036aeb630a25d96 Author: Paolo Bonzini Date: Wed Oct 18 12:07:32 2023 -0400 KVM: remove CONFIG_HAVE_KVM_IRQFD All platforms with a kernel irqchip have support for irqfd. Unify the two configuration items so that userspace can expect to use irqfd to inject interrupts into the irqchip. Signed-off-by: Paolo Bonzini commit 8132d887a7023b212f242a51ae89281c69fde996 Author: Paolo Bonzini Date: Wed Oct 18 12:11:56 2023 -0400 KVM: remove CONFIG_HAVE_KVM_EVENTFD virt/kvm/eventfd.c is compiled unconditionally, meaning that the ioeventfds member of struct kvm is accessed unconditionally. CONFIG_HAVE_KVM_EVENTFD therefore must be defined for KVM common code to compile successfully, remove it. Signed-off-by: Paolo Bonzini commit 3814876467e7557ccb1eecc28cf7f68d029f445e Merge: 8f0b960a42bad 38dd7b72ef804 Author: Rafael J. Wysocki Date: Fri Dec 8 21:34:58 2023 +0100 Merge back earlier acpi-utils material for v6.8. commit a6a010f5def544af3efcfe21683905a712b60536 Author: Daniel Rosenberg Date: Mon Dec 4 18:38:01 2023 -0800 f2fs: Restrict max filesize for 16K f2fs Blocks are tracked by u32, so the max permitted filesize is (U32_MAX + 1) * BLOCK_SIZE. Additionally, in order to support crypto data unit sizes of 4K with a 16K block with IV_INO_LBLK_{32,64}, we must further restrict max filesize to (U32_MAX + 1) * 4096. This does not affect 4K blocksize f2fs as the natural limit for files are well below that. Fixes: d7e9a9037de2 ("f2fs: Support Block Size == Page Size") Signed-off-by: Daniel Rosenberg Signed-off-by: Jaegeuk Kim commit 75d6872907cc8827248f4d5f803c03e1175c3158 Author: Adrien Leravat Date: Sun Dec 3 12:06:04 2023 -0800 doc: rmpsg: Update with rpmsg_endpoint It seems the documentation was not updated when `rpmsg_sendto` and related switched from `rpmsg_channel` to `rpmsg_endpoint`. This change updates the proper calls, text, and the sample. Signed-off-by: Adrien Leravat Link: https://lore.kernel.org/r/20231203200606.255302-1-adrien.leravat@gmail.com Signed-off-by: Mathieu Poirier commit 52c9a884c6388171f4c6cdafd9add042a7abec53 Author: Randy Dunlap Date: Fri Dec 8 10:59:27 2023 -0800 spi: mpc52xx: explicitly include linux/platform_device.h Since linux/of_platform.h had included linux/platform_device.h and since that inclusion was removed, this driver now needs to include the latter header file explicitly to prevent build errors: drivers/spi/spi-mpc52xx.c: In function 'mpc52xx_spi_probe': drivers/spi/spi-mpc52xx.c:396:20: error: invalid use of undefined type 'struct platform_device' and more like that. Fixes: 0d18bcdebb2f ("of: Stop circularly including of_device.h and of_platform.h") Signed-off-by: Randy Dunlap Cc: Rob Herring Cc: Mark Brown Cc: linux-spi@vger.kernel.org Link: https://lore.kernel.org/r/20231208185927.14124-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 50c7cdc9a4d2d21373c1ab52c131109ab30c53f5 Author: Paul Cercueil Date: Wed Dec 6 23:15:56 2023 +0100 ARM: dts: samsung: exynos4210-i9100: Add accelerometer node Add a Device Tree node for the ST Microelectronics "K3D" accelerometer chip found in the Galaxy S2. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20231206221556.15348-4-paul@crapouillou.net [krzysztof: fix alphabetical placement of i2c_1] Signed-off-by: Krzysztof Kozlowski commit 6e73b11062b2e3e873666ba35577437502cf1dd2 Author: Paul Cercueil Date: Wed Dec 6 23:15:55 2023 +0100 ARM: dts: samsung: exynos4210-i9100: Add node for touch keys Add a Device Tree node to support the LED-backed "menu" and "back" keys. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20231206221556.15348-3-paul@crapouillou.net Signed-off-by: Krzysztof Kozlowski commit 84228d5e29dbc7a6be51e221000e1d122125826c Author: Paul Cercueil Date: Wed Dec 6 23:15:54 2023 +0100 ARM: dts: samsung: exynos4210-i9100: Unconditionally enable LDO12 The kernel hangs for a good 12 seconds without any info being printed to dmesg, very early in the boot process, if this regulator is not enabled. Force-enable it to work around this issue, until we know more about the underlying problem. Signed-off-by: Paul Cercueil Fixes: 8620cc2f99b7 ("ARM: dts: exynos: Add devicetree file for the Galaxy S2") Cc: stable@vger.kernel.org # v5.8+ Link: https://lore.kernel.org/r/20231206221556.15348-2-paul@crapouillou.net Signed-off-by: Krzysztof Kozlowski commit 172db56d90d29e47e7d0d64885d5dbd92c87ec42 Author: Kees Cook Date: Wed Dec 6 12:59:07 2023 -0800 netlink: Return unsigned value for nla_len() The return value from nla_len() is never expected to be negative, and can never be more than struct nlattr::nla_len (a u16). Adjust the prototype on the function. This will let GCC's value range optimization passes know that the return can never be negative, and can never be larger than u16. As recently discussed[1], this silences the following warning in GCC 12+: net/wireless/nl80211.c: In function 'nl80211_set_cqm_rssi.isra': net/wireless/nl80211.c:12892:17: warning: 'memcpy' specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] 12892 | memcpy(cqm_config->rssi_thresholds, thresholds, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12893 | flex_array_size(cqm_config, rssi_thresholds, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 12894 | n_thresholds)); | ~~~~~~~~~~~~~~ A future change would be to clamp the subtraction to make sure it never wraps around if nla_len is somehow less than NLA_HDRLEN, which would have the additional benefit of being defensive in the face of nlattr corruption or logic errors. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311090752.hWcJWAHL-lkp@intel.com/ [1] Cc: Johannes Berg Cc: Jeff Johnson Cc: Michael Walle Cc: Max Schulze Link: https://lore.kernel.org/r/20231202202539.it.704-kees@kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20231206205904.make.018-kees@kernel.org Signed-off-by: Jakub Kicinski commit cf02bea7c1714466dca53124797612c9e9d74994 Author: Sean Nyekjaer Date: Wed Dec 6 17:01:23 2023 +0100 net: dsa: microchip: use DSA_TAG_PROTO without _VALUE define Correct the use of define DSA_TAG_PROTO_LAN937X_VALUE to DSA_TAG_PROTO_LAN937X to improve readability. Signed-off-by: Sean Nyekjaer Reviewed-by: Andrew Lunn Acked-by: Arun Ramadoss Link: https://lore.kernel.org/r/20231206160124.1935451-1-sean@geanix.com Signed-off-by: Jakub Kicinski commit 872ee9cc0219334486e19da20e56665e612fdcb7 Author: Radhakrishna Sripada Date: Thu Dec 7 14:10:25 2023 -0800 drm/i915/mtl: Rename the link_bit_rate to clock in C20 pll_state With the cleanup of the misleading clock value to avoid extra calculations to convert between link_bit_rate and clock, use one standard "clock" field for the c20 pll which works with crtc_state->port_clock field. Cc: Clint Taylor Cc: Mika Kahola Signed-off-by: Radhakrishna Sripada Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20231207221025.2032207-4-radhakrishna.sripada@intel.com commit 1103672fd6b8486c4cc1ab69623e9a080a00e022 Author: Radhakrishna Sripada Date: Thu Dec 7 14:10:24 2023 -0800 drm/i915/mtl: Remove misleading "clock" field from C20 pll_state The field link_bit_rate serves as the actual clock value for the C20 pll_state structure. Remove the misleading clock field. The subsequent patch would rename the link_bit_rate as the clock field. Cc: Clint Taylor Cc: Mika Kahola Signed-off-by: Radhakrishna Sripada Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20231207221025.2032207-3-radhakrishna.sripada@intel.com commit 877fd09a120d0acee073fbada79fad2ab35396c2 Author: Radhakrishna Sripada Date: Thu Dec 7 14:10:23 2023 -0800 drm/i915/mtl: Use port clock compatible numbers for C20 phy In C20 pll_state link_bit_rate and clock fields are bit redundant. Since many of the helpers assume the clock values, which are different from link_bit_rate for dp2.0, convert the helpers to use the numbers that are compatible with link_bit_rate. Currently link_bit_rate is compatible with crtc_state->port_clock. The function intel_c20pll_calc_port_clock returns the number which is compatible with crtc_state->port_clock. In order to avoid extra conversions b/ween clock and link_bit_rate, remove "clock" field from the C20 pll_state and then rename "link_bit_rate" as "clock". While at it rely on crtc_state->port_clock during C20 Pll programming. Cc: Clint Taylor Cc: Mika Kahola Signed-off-by: Radhakrishna Sripada Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20231207221025.2032207-2-radhakrishna.sripada@intel.com commit 2a7f1848d9d65a4deb366726ff8f33c9c64ac43b Author: Mihai Sain Date: Mon Dec 4 09:25:37 2023 +0200 ARM: dts: microchip: sama5d27_wlsom1_ek: Remove mmc-ddr-3_3v property from sdmmc0 node On board the sdmmc0 interface is wired to a SD Card socket. According with mmc-controller bindings, the mmc-ddr-3_3v property is used for eMMC devices to enable high-speed DDR mode (3.3V I/O). Remove the mmc-ddr-3_3v property from sdmmc0 node. Signed-off-by: Mihai Sain Link: https://lore.kernel.org/r/20231204072537.2991-1-mihai.sain@microchip.com Signed-off-by: Claudiu Beznea commit 1c3c87d720cbd1ff86dc1bfc6df8ee9adce5879b Merge: 80583d0cfd8ff 1b2658e4c7091 Author: Paolo Bonzini Date: Fri Dec 8 13:49:38 2023 -0500 Merge tag 'kvm-x86-selftests-6.7-rcN' of https://github.com/kvm-x86/linux into HEAD KVM selftests fixes for 6.8 merge window: - Fix an annoying goof where the NX hugepage test prints out garbage instead of the magic token needed to run the text. - Fix build errors when a header is delete/moved due to a missing flag in the Makefile. - Detect if KVM bugged/killed a selftest's VM and print out a helpful message instead of complaining that a random ioctl() failed. - Annotate the guest printf/assert helpers with __printf(), and fix the various bugs that were lurking due to lack of said annotation. A small subset of these was included in 6.7-rc as well. commit 80583d0cfd8ff44d60a5fa76a6bf3c08eb67c328 Author: Paolo Bonzini Date: Fri Dec 8 13:46:48 2023 -0500 KVM: guest-memfd: fix unused-function warning With migration disabled, one function becomes unused: virt/kvm/guest_memfd.c:262:12: error: 'kvm_gmem_migrate_folio' defined but not used [-Werror=unused-function] 262 | static int kvm_gmem_migrate_folio(struct address_space *mapping, | ^~~~~~~~~~~~~~~~~~~~~~ Remove the #ifdef around the reference so that fallback_migrate_folio() is never used. The gmem implementation of the hook is trivial; since the gmem mapping is unmovable, the pages should not be migrated anyway. Fixes: a7800aa80ea4 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory") Reported-by: Arnd Bergmann Suggested-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 849c1816436fe359e85587fba5b69ddd3a957b31 Author: Paolo Bonzini Date: Fri Dec 8 13:46:22 2023 -0500 KVM: selftests: fix supported_flags for aarch64 KVM/Arm supports readonly memslots; fix the calculation of supported_flags in set_memory_region_test.c, otherwise the test fails. Signed-off-by: Paolo Bonzini commit d9f28735af8781d9c8c6c406c2a102090644133d Author: David Laight Date: Wed Dec 6 13:44:20 2023 +0000 Use READ/WRITE_ONCE() for IP local_port_range. Commit 227b60f5102cd added a seqlock to ensure that the low and high port numbers were always updated together. This is overkill because the two 16bit port numbers can be held in a u32 and read/written in a single instruction. More recently 91d0b78c5177f added support for finer per-socket limits. The user-supplied value is 'high << 16 | low' but they are held separately and the socket options protected by the socket lock. Use a u32 containing 'high << 16 | low' for both the 'net' and 'sk' fields and use READ_ONCE()/WRITE_ONCE() to ensure both values are always updated together. Change (the now trival) inet_get_local_port_range() to a static inline to optimise the calling code. (In particular avoiding returning integers by reference.) Signed-off-by: David Laight Reviewed-by: Eric Dumazet Reviewed-by: David Ahern Acked-by: Mat Martineau Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/4e505d4198e946a8be03fb1b4c3072b0@AcuMS.aculab.com Signed-off-by: Jakub Kicinski commit c6117b33a173717714a8dbbf9d14ca85db79725e Author: Ville Syrjälä Date: Thu Dec 7 21:34:41 2023 +0200 drm/i915/tv: Drop redundant null checks Neither 'tv_mode' or 'color_conversion' can be NULL, so drop the pointless checks. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-9-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e81f48512aa42d633015f182d2ecf91299803077 Author: Ville Syrjälä Date: Thu Dec 7 21:34:40 2023 +0200 drm/i915: s/cstate/crtc_state/ in intel_get_frame_time_us() Use standard variable name 'crtc_state' instead of 'cstate'. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7f4f756df7a0716b15176f6fa0552e3480a2b981 Author: Ville Syrjälä Date: Thu Dec 7 21:34:39 2023 +0200 drm/i915: Drop redunant null check from intel_get_frame_time_us() intel_get_frame_time_us() is never called with a NULL crtc_state so drop the redundant check. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit a599d302ae00917038777fad09107576375e2c95 Author: Ville Syrjälä Date: Thu Dec 7 21:34:38 2023 +0200 drm/i915: Drop NULL fb check from intel_fb_uses_dpt() intel_fb_uses_dpt() should not be called with a NULL fb, so drop the check. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit ed1566a982213c1a8a39cac26aa4c53d289ed4bc Author: Ville Syrjälä Date: Thu Dec 7 21:34:37 2023 +0200 drm/i915: Drop crtc NULL check from intel_crtc_active() intel_crtc_active() is never called with a NULL crtc. Drop the redundant NULL check. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit f175de44d0cf5aa688747b96bad0e596a50eaad7 Author: Ville Syrjälä Date: Thu Dec 7 21:34:36 2023 +0200 drm/i915: Drop redundant NULL check intel_bios_get_dsc_params() is only called from gen11_dsi_dsc_compute_config() and it always passes a non-NULL crtc_state in. Drop the redundant check. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e05a67fdd3c9293827d44a0dfa3618429b832d59 Author: Ville Syrjälä Date: Thu Dec 7 21:34:35 2023 +0200 drm/i915: Streamline intel_dsc_pps_read() intel_dsc_pps_read() is rather convoluted. Make it legible. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e81144106e21271c619f0c722a09e27ccb8c043d Author: Ville Syrjälä Date: Thu Dec 7 21:34:34 2023 +0200 drm/i915: Fix intel_atomic_setup_scalers() plane_state handling Since the plane_state variable is declared outside the scaler_users loop in intel_atomic_setup_scalers(), and it's never reset back to NULL inside the loop we may end up calling intel_atomic_setup_scaler() with a non-NULL plane state for the pipe scaling case. That is bad because intel_atomic_setup_scaler() determines whether we are doing plane scaling or pipe scaling based on plane_state!=NULL. The end result is that we may miscalculate the scaler mode for pipe scaling. The hardware becomes somewhat upset if we end up in this situation when scanning out a planar format on a SDR plane. We end up programming the pipe scaler into planar mode as well, and the result is a screenfull of garbage. Fix the situation by making sure we pass the correct plane_state==NULL when calculating the scaler mode for pipe scaling. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231207193441.20206-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 2c12eb36f849256f5eb00ffaee9bf99396fd3814 Author: Ville Syrjälä Date: Tue Dec 5 20:03:08 2023 +0200 drm/i915: Fix remapped stride with CCS on ADL+ On ADL+ the hardware automagically calculates the CCS AUX surface stride from the main surface stride, so when remapping we can't really play a lot of tricks with the main surface stride, or else the AUX surface stride would get miscalculated and no longer match the actual data layout in memory. Supposedly we could remap in 256 main surface tile units (AUX page(4096)/cachline(64)*4(4x1 main surface tiles per AUX cacheline)=256 main surface tiles), but the extra complexity is probably not worth the hassle. So let's just make sure our mapping stride is calculated from the full framebuffer stride (instead of the framebuffer width). This way the stride we program into PLANE_STRIDE will be the original framebuffer stride, and thus there will be no change to the AUX stride/layout. Cc: stable@vger.kernel.org Cc: Imre Deak Cc: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231205180308.7505-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 981cf568a8644161c2f15c02278ebc2834b51ba6 Author: Zhao Mengmeng Date: Tue Dec 5 21:56:05 2023 -0500 selftests/sgx: Skip non X86_64 platform When building whole selftests on arm64, rsync gives an erorr about sgx: rsync: [sender] link_stat "/root/linux-next/tools/testing/selftests/sgx/test_encl.elf" failed: No such file or directory (2) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1327) [sender=3.2.5] The root casue is sgx only used on X86_64, and shall be skipped on other platforms. Fix this by moving TEST_CUSTOM_PROGS and TEST_FILES inside the if check, then the build result will be "Skipping non-existent dir: sgx". Fixes: 2adcba79e69d ("selftests/x86: Add a selftest for SGX") Signed-off-by: Zhao Mengmeng Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/all/20231206025605.3965302-1-zhaomzhao%40126.com commit 886c5be0b12e89b2905c26c4f24d50ae91f261da Author: Jo Van Bulck Date: Thu Oct 5 17:38:54 2023 +0200 selftests/sgx: Remove incomplete ABI sanitization code in test enclave As the selftest enclave is *not* intended for production, simplify the code by not initializing CPU configuration registers as expected by the ABI on enclave entry or cleansing caller-save registers on enclave exit. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/all/da0cfb1e-e347-f7f2-ac72-aec0ee0d867d@intel.com/ Link: https://lore.kernel.org/all/20231005153854.25566-14-jo.vanbulck%40cs.kuleuven.be commit ec44ca1e34bc3a9864a8c1bf8636066ec6d5d2e5 Author: Jo Van Bulck Date: Thu Oct 5 17:38:53 2023 +0200 selftests/sgx: Discard unsupported ELF sections Building the test enclave with -static-pie may produce a dynamic symbol table, but this is not supported for enclaves and any relocations need to happen manually (e.g., as for "encl_op_array"). Thus, opportunistically discard ".dyn*" and ".gnu.hash" which the enclave loader cannot handle. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/all/20231005153854.25566-13-jo.vanbulck%40cs.kuleuven.be commit 022416496008bd51cb7b33975cc0008749329a86 Author: Jo Van Bulck Date: Thu Oct 5 17:38:52 2023 +0200 selftests/sgx: Ensure expected location of test enclave buffer The external tests manipulating page permissions expect encl_buffer to be placed at the start of the test enclave's .data section. As this is not guaranteed per the C standard, explicitly place encl_buffer in a separate section that is explicitly placed at the start of the .data segment in the linker script to avoid the compiler placing it somewhere else in .data. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Acked-by: Kai Huang Link: https://lore.kernel.org/all/20231005153854.25566-12-jo.vanbulck%40cs.kuleuven.be commit a4c39ef4ed43103caef80029cd30427a9ff342d8 Author: Jo Van Bulck Date: Thu Oct 5 17:38:51 2023 +0200 selftests/sgx: Ensure test enclave buffer is entirely preserved Attach the "used" attribute to instruct the compiler to preserve the static encl_buffer, even if it appears it is not entirely referenced in the enclave code, as expected by the external tests manipulating page permissions. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Acked-by: Kai Huang Link: https://lore.kernel.org/all/a2732938-f3db-a0af-3d68-a18060f66e79@cs.kuleuven.be/ Link: https://lore.kernel.org/all/20231005153854.25566-11-jo.vanbulck%40cs.kuleuven.be commit 9fd552ee32c6c1e27c125016b87d295bea6faea7 Author: Jo Van Bulck Date: Thu Oct 5 17:38:50 2023 +0200 selftests/sgx: Fix linker script asserts DEFINED only considers symbols, not section names. Hence, replace the check for .got.plt with the _GLOBAL_OFFSET_TABLE_ symbol and remove other (non-essential) asserts. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/all/20231005153854.25566-10-jo.vanbulck%40cs.kuleuven.be commit d06978e8e47a348c0d33462a8c2bf8f46d2b7df5 Author: Jo Van Bulck Date: Thu Oct 5 17:38:49 2023 +0200 selftests/sgx: Handle relocations in test enclave Static-pie binaries normally include a startup routine to perform any ELF relocations from .rela.dyn. Since the enclave loading process is different and glibc is not included, do the necessary relocation for encl_op_array entries manually at runtime relative to the enclave base to ensure correct function pointers. When keeping encl_op_array as a local variable on the stack, gcc without optimizations generates code that explicitly gets the right function addresses and stores them to create the array on the stack: encl_body: /* snipped */ lea do_encl_op_put_to_buf(%rip), %rax mov %rax, -0x50(%rbp) lea do_encl_op_get_from_buf(%rip), %rax mov %rax,-0x48(%rbp) lea do_encl_op_put_to_addr(%rip), %rax /* snipped */ However, gcc -Os or clang generate more efficient code that initializes encl_op_array by copying a "prepared copy" containing the absolute addresses of the functions (i.e., relative to the image base starting from 0) generated by the compiler/linker: encl_body: /* snipped */ lea prepared_copy(%rip), %rsi lea -0x48(%rsp), %rdi mov $0x10,%ecx rep movsl %ds:(%rsi),%es:(%rdi) /* snipped */ When building the enclave with -static-pie, the compiler/linker includes relocation entries for the function symbols in the "prepared copy": Relocation section '.rela.dyn' at offset 0x4000 contains 12 entries: Offset Info Type Symbol /* snipped; "prepared_copy" starts at 0x6000 */ 000000006000 000000000008 R_X86_64_RELATIVE 000000006008 000000000008 R_X86_64_RELATIVE 000000006010 000000000008 R_X86_64_RELATIVE 000000006018 000000000008 R_X86_64_RELATIVE 000000006020 000000000008 R_X86_64_RELATIVE 000000006028 000000000008 R_X86_64_RELATIVE 000000006030 000000000008 R_X86_64_RELATIVE 000000006038 000000000008 R_X86_64_RELATIVE Static-pie binaries normally include a glibc "_dl_relocate_static_pie" routine that will perform these relocations as part of the startup. However, since the enclave loading process is different and glibc is not included, we cannot rely on these relocations to be performed. Without relocations, the code would erroneously jump to the _absolute_ function address loaded from the local copy. Thus, declare "encl_op_array" as global and manually relocate the loaded function-pointer entries relative to the enclave base at runtime. This generates the following code: encl_body: /* snipped */ lea encl_op_array(%rip), %rcx lea __encl_base(%rip), %rax add (%rcx,%rdx,8),%rax jmp *%rax Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Acked-by: Kai Huang Link: https://lore.kernel.org/all/150d8ca8-2c66-60d1-f9fc-8e6279824e94@cs.kuleuven.be/ Link: https://lore.kernel.org/all/5c22de5a-4b3b-1f38-9771-409b4ec7f96d@cs.kuleuven.be/#r Link: https://lore.kernel.org/all/20231005153854.25566-9-jo.vanbulck%40cs.kuleuven.be commit f7884e732841450de36c2b1ed49b91e8e854a7d1 Author: Jo Van Bulck Date: Thu Oct 5 17:38:48 2023 +0200 selftests/sgx: Produce static-pie executable for test enclave The current combination of -static and -fPIC creates a static executable with position-dependent addresses for global variables. Use -static-pie and -fPIE to create a proper static position independent executable that can be loaded at any address without a dynamic linker. When building the original "lea (encl_stack)(%rbx), %rax" assembly code with -static-pie -fPIE, the linker complains about a relocation it cannot resolve: /usr/local/bin/ld: /tmp/cchIWyfG.o: relocation R_X86_64_32S against `.data' can not be used when making a PIE object; recompile with -fPIE collect2: error: ld returned 1 exit status Thus, since only RIP-relative addressing is legit for local symbols, use "encl_stack(%rip)" and declare an explicit "__encl_base" symbol at the start of the linker script to be able to calculate the stack address relative to the current TCS in the enclave assembly entry code. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Acked-by: Kai Huang Link: https://lore.kernel.org/all/f9c24d89-ed72-7d9e-c650-050d722c6b04@cs.kuleuven.be/ Link: https://lore.kernel.org/all/20231005153854.25566-8-jo.vanbulck%40cs.kuleuven.be commit 4f812df8f37463767c2a74c2bd77de94acdb2be6 Author: Jo Van Bulck Date: Thu Oct 5 17:38:47 2023 +0200 selftests/sgx: Remove redundant enclave base address save/restore Remove redundant push/pop pair that stores and restores the enclave base address in the test enclave, as it is never used after the pop and can anyway be easily retrieved via the __encl_base symbol. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Acked-by: Kai Huang Link: https://lore.kernel.org/all/20231005153854.25566-7-jo.vanbulck%40cs.kuleuven.be commit 304b259e63b94c4f825e0648b33b15f8962955c7 Author: Jo Van Bulck Date: Thu Oct 5 17:38:46 2023 +0200 selftests/sgx: Specify freestanding environment for enclave compilation Use -ffreestanding to assert the enclave compilation targets a freestanding environment (i.e., without "main" or standard libraries). This fixes clang reporting "undefined reference to `memset'" after erroneously optimizing away the provided memset/memcpy implementations. Still need to instruct the linker from using standard system startup functions, but drop -nostartfiles as it is implied by -nostdlib. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Acked-by: Kai Huang Link: https://lore.kernel.org/all/20231005153854.25566-6-jo.vanbulck%40cs.kuleuven.be commit f79464658d858e07af0c4c9b30f5baedeeae0c04 Author: Jo Van Bulck Date: Thu Oct 5 17:38:45 2023 +0200 selftests/sgx: Separate linker options Fixes "'linker' input unused [-Wunused-command-line-argument]" errors when compiling with clang. Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/all/20231005153854.25566-5-jo.vanbulck%40cs.kuleuven.be commit 853a57a43ebdb8c024160c1a0990bae85f4bcc2f Author: Jo Van Bulck Date: Thu Oct 5 17:38:44 2023 +0200 selftests/sgx: Include memory clobber for inline asm in test enclave Add the "memory" clobber to the EMODPE and EACCEPT asm blocks to tell the compiler the assembly code accesses to the secinfo struct. This ensures the compiler treats the asm block as a memory barrier and the write to secinfo will be visible to ENCLU. Fixes: 20404a808593 ("selftests/sgx: Add test for EPCM permission changes") Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Kai Huang Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/all/20231005153854.25566-4-jo.vanbulck%40cs.kuleuven.be commit b84fc2e0139ba4b23b8039bd7cfd242894fe8f8b Author: Jo Van Bulck Date: Thu Oct 5 17:38:43 2023 +0200 selftests/sgx: Fix uninitialized pointer dereferences in encl_get_entry Ensure sym_tab and sym_names are zero-initialized and add an early-out condition in the unlikely (erroneous) case that the enclave ELF file would not contain a symbol table. This addresses -Werror=maybe-uninitialized compiler warnings for gcc -O2. Fixes: 33c5aac3bf32 ("selftests/sgx: Test complete changing of page type flow") Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/all/20231005153854.25566-3-jo.vanbulck%40cs.kuleuven.be commit 79eba8c924f7decfa71ddf187d38cb9f5f2cd7b3 Author: Jo Van Bulck Date: Thu Oct 5 17:38:42 2023 +0200 selftests/sgx: Fix uninitialized pointer dereference in error path Ensure ctx is zero-initialized, such that the encl_measure function will not call EVP_MD_CTX_destroy with an uninitialized ctx pointer in case of an early error during key generation. Fixes: 2adcba79e69d ("selftests/x86: Add a selftest for SGX") Signed-off-by: Jo Van Bulck Signed-off-by: Dave Hansen Reviewed-by: Jarkko Sakkinen Acked-by: Kai Huang Link: https://lore.kernel.org/all/20231005153854.25566-2-jo.vanbulck%40cs.kuleuven.be commit 8bc2a3634b87e2235535b5527f83ff529df68b56 Author: Andy Shevchenko Date: Fri Dec 8 19:02:55 2023 +0200 spi: pxa2xx: Update DMA mapping and using logic in the documentation Update DMA mapping and using logic in the documentation to follow what the code does. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231208170436.3309648-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit c3aeaf2f0ec8af93189488bda3928a1ac7752388 Author: Andy Shevchenko Date: Fri Dec 8 19:02:54 2023 +0200 spi: pxa2xx: Use inclusive language Replace master/slave by host/peripheral language in the documentation. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231208170436.3309648-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 990b6c928b212d930ae8b002dd86043cc4a302ba Author: Neil Armstrong Date: Fri Dec 8 13:16:45 2023 +0100 arm64: dts: qcom: sm8650: Add DisplayPort device nodes Declare the displayport controller present on the Qualcomm SM8650 SoC and connected to the USB3/DP Combo PHY. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231208-topic-sm8650-upstream-dp-v2-1-69dab3d074e4@linaro.org Signed-off-by: Bjorn Andersson commit a1c7da5fb02c0c24e5d8b2d78d449482bce5e92b Author: Krzysztof Kozlowski Date: Fri Dec 8 13:43:32 2023 +0100 arm64: dts: qcom: pm8550: drop PWM address/size cells The address/size cells in PWM node are needed only if individual LEDs are listed. If multi-led is used, then this leads to dtc W=1 warnings: pm8550.dtsi:65.19-73.5: Warning (avoid_unnecessary_addr_size): /soc@0/spmi@c400000/pmic@1/pwm: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231208124332.48636-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 8b7b0e5fe47de90ba6c350f9abece589fb637f79 Author: David Vernet Date: Fri Dec 8 00:17:03 2023 -0600 bpf: Load vmlinux btf for any struct_ops map In libbpf, when determining whether we need to load vmlinux btf, we're currently (among other things) checking whether there is any struct_ops program present in the object. This works for most realistic struct_ops maps, as a struct_ops map is of course typically composed of one or more struct_ops programs. However, that technically need not be the case. A struct_ops interface could be defined which allows a map to be specified which one or more non-prog fields, and which provides default behavior if no struct_ops progs is actually provided otherwise. For sched_ext, for example, you technically only need to specify the name of the scheduler in the struct_ops map, with the core scheduler logic providing default behavior if no prog is actually specified. If we were to define and try to load such a struct_ops map, we would crash in libbpf when initializing it as obj->btf_vmlinux will be NULL: Reading symbols from minimal... (gdb) r Starting program: minimal_example [Thread debugging using libthread_db enabled] Using host libthread_db library "/usr/lib/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x000055555558308c in btf__type_cnt (btf=0x0) at btf.c:612 612 return btf->start_id + btf->nr_types; (gdb) bt type_name=0x5555555d99e3 "sched_ext_ops", kind=4) at btf.c:914 kind=4) at btf.c:942 type=0x7fffffffe558, type_id=0x7fffffffe548, ... data_member=0x7fffffffe568) at libbpf.c:948 kern_btf=0x0) at libbpf.c:1017 at libbpf.c:8059 So as to account for such bare-bones struct_ops maps, let's update obj_needs_vmlinux_btf() to also iterate over an obj's maps and check whether any of them are struct_ops maps. Signed-off-by: David Vernet Signed-off-by: Andrii Nakryiko Reviewed-by: Alan Maguire Link: https://lore.kernel.org/bpf/20231208061704.400463-1-void@manifault.com commit f3f6aa68640298fb966811b991c7b8efee67e181 Author: Kai Huang Date: Fri Dec 8 09:07:36 2023 -0800 x86/virt/tdx: Handle TDX interaction with sleep and hibernation TDX is incompatible with hibernation and some ACPI sleep states. Users must disable hibernation to use TDX. Users must also disable TDX if they want to use ACPI S3 sleep. This feels a bit wonky and asymmetric, but it avoids adding any new command-line parameters for now. It can be improved if users hate it too much. Long version: TDX cannot survive from S3 and deeper states. The hardware resets and disables TDX completely when platform goes to S3 and deeper. Both TDX guests and the TDX module get destroyed permanently. The kernel uses S3 to support suspend-to-ram, and S4 or deeper states to support hibernation. The kernel also maintains TDX states to track whether it has been initialized and its metadata resource, etc. After resuming from S3 or hibernation, these TDX states won't be correct anymore. Theoretically, the kernel can do more complicated things like resetting TDX internal states and TDX module metadata before going to S3 or deeper, and re-initialize TDX module after resuming, etc, but there is no way to save/restore TDX guests for now. Until TDX supports full save and restore of TDX guests, there is no big value to handle TDX module in suspend and hibernation alone. To make things simple, just choose to make TDX mutually exclusive with S3 and hibernation. Note the TDX module is initialized at runtime. To avoid having to deal with the fuss of determining TDX state at runtime, just choose TDX vs S3 and hibernation at kernel early boot. It's a bad user experience if the choice of TDX and S3/hibernation is done at runtime anyway, i.e., the user can experience being able to do S3/hibernation but later becoming unable to due to TDX being enabled. Disable TDX in kernel early boot when hibernation support is available. Currently there's no mechanism exposed by the hibernation code to allow other kernel code to disable hibernation once for all. Users that want TDX must disable hibernation, like using hibername=no on the command line. Disable ACPI S3 when TDX is enabled by the BIOS. For now the user needs to disable TDX in the BIOS to use ACPI S3. A new kernel command line can be added in the future if there's a need to let user disable TDX host via kernel command line. Alternatively, the kernel could disable TDX when ACPI S3 is supported and request the user to disable S3 to use TDX. But there's no existing kernel command line to do that, and BIOS doesn't always have an option to disable S3. [ dhansen: subject / changelog tweaks ] Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-16-dave.hansen%40intel.com commit 0b2bc38131f02d6fd38695f191bbd8c6109ecffc Author: Kai Huang Date: Fri Dec 8 09:07:35 2023 -0800 x86/virt/tdx: Initialize all TDMRs After the global KeyID has been configured on all packages, initialize all TDMRs to make all TDX-usable memory regions that are passed to the TDX module become usable. This is the last step of initializing the TDX module. Initializing TDMRs can be time consuming on large memory systems as it involves initializing all metadata entries for all pages that can be used by TDX guests. Initializing different TDMRs can be parallelized. For now to keep it simple, just initialize all TDMRs one by one. It can be enhanced in the future. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Isaku Yamahata Reviewed-by: Kirill A. Shutemov Reviewed-by: Yuan Yao Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-15-dave.hansen%40intel.com commit e56d28df2f666af9ce0c27d8d204ad813d3766f4 Author: Kai Huang Date: Fri Dec 8 09:07:34 2023 -0800 x86/virt/tdx: Configure global KeyID on all packages After the list of TDMRs and the global KeyID are configured to the TDX module, the kernel needs to configure the key of the global KeyID on all packages using TDH.SYS.KEY.CONFIG. This SEAMCALL cannot run parallel on different cpus. Loop all online cpus and use smp_call_on_cpu() to call this SEAMCALL on the first cpu of each package. To keep things simple, this implementation takes no affirmative steps to online cpus to make sure there's at least one cpu for each package. The callers (aka. KVM) can ensure success by ensuring sufficient CPUs are online for this to succeed. Intel hardware doesn't guarantee cache coherency across different KeyIDs. The PAMTs are transitioning from being used by the kernel mapping (KeyId 0) to the TDX module's "global KeyID" mapping. This means that the kernel must flush any dirty KeyID-0 PAMT cachelines before the TDX module uses the global KeyID to access the PAMTs. Otherwise, if those dirty cachelines were written back, they would corrupt the TDX module's metadata. Aside: This corruption would be detected by the memory integrity hardware on the next read of the memory with the global KeyID. The result would likely be fatal to the system but would not impact TDX security. Following the TDX module specification, flush cache before configuring the global KeyID on all packages. Given the PAMT size can be large (~1/256th of system RAM), just use WBINVD on all CPUs to flush. If TDH.SYS.KEY.CONFIG fails, the TDX module may already have "converted" some memory for TDX module use. Convert the memory back so that it can be safely used by the kernel again. Note that this is slower than it should be because of the "partial write machine check" erratum which affects TDX-capable hardware. Also refactor and introduce a new helper: tdmr_do_pamt_func(). This takes a TDMR and runs a function on its PAMT. It looks a _bit_ odd to pass a function pointer around like this, but its use is pretty narrow and it does eliminate what would otherwise be some copying and pasting. [ dhansen: * munge changelog as usual * remove weird (*pamd_func)() syntax ] Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Isaku Yamahata Reviewed-by: Kirill A. Shutemov Reviewed-by: Yuan Yao Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-14-dave.hansen%40intel.com commit 554ce1c36d1bbeaec42ba870bad75e200af204be Author: Kai Huang Date: Fri Dec 8 09:07:33 2023 -0800 x86/virt/tdx: Configure TDX module with the TDMRs and global KeyID The TDX module uses a private KeyID as the "global KeyID" for mapping things like the PAMT and other TDX metadata. This KeyID has already been reserved when detecting TDX during the kernel early boot. Now that the "TD Memory Regions" (TDMRs) are fully built, pass them to the TDX module together with the global KeyID. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Isaku Yamahata Reviewed-by: Kirill A. Shutemov Reviewed-by: Yuan Yao Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-13-dave.hansen%40intel.com commit dde3b60d572c941e2c72d22c18a08586fb67bb50 Author: Kai Huang Date: Fri Dec 8 09:07:32 2023 -0800 x86/virt/tdx: Designate reserved areas for all TDMRs As the last step of constructing TDMRs, populate reserved areas for all TDMRs. Cover all memory holes and PAMTs with a TMDR reserved area. [ dhansen: trim down chagnelog ] Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Isaku Yamahata Reviewed-by: Kirill A. Shutemov Reviewed-by: Yuan Yao Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-12-dave.hansen%40intel.com commit ac3a22088434e31dddda82aa473bee008df99b97 Author: Kai Huang Date: Fri Dec 8 09:07:31 2023 -0800 x86/virt/tdx: Allocate and set up PAMTs for TDMRs The TDX module uses additional metadata to record things like which guest "owns" a given page of memory. This metadata, referred as Physical Address Metadata Table (PAMT), essentially serves as the 'struct page' for the TDX module. PAMTs are not reserved by hardware up front. They must be allocated by the kernel and then given to the TDX module during module initialization. TDX supports 3 page sizes: 4K, 2M, and 1G. Each "TD Memory Region" (TDMR) has 3 PAMTs to track the 3 supported page sizes. Each PAMT must be a physically contiguous area from a Convertible Memory Region (CMR). However, the PAMTs which track pages in one TDMR do not need to reside within that TDMR but can be anywhere in CMRs. If one PAMT overlaps with any TDMR, the overlapping part must be reported as a reserved area in that particular TDMR. Use alloc_contig_pages() since PAMT must be a physically contiguous area and it may be potentially large (~1/256th of the size of the given TDMR). The downside is alloc_contig_pages() may fail at runtime. One (bad) mitigation is to launch a TDX guest early during system boot to get those PAMTs allocated at early time, but the only way to fix is to add a boot option to allocate or reserve PAMTs during kernel boot. It is imperfect but will be improved on later. TDX only supports a limited number of reserved areas per TDMR to cover both PAMTs and memory holes within the given TDMR. If many PAMTs are allocated within a single TDMR, the reserved areas may not be sufficient to cover all of them. Adopt the following policies when allocating PAMTs for a given TDMR: - Allocate three PAMTs of the TDMR in one contiguous chunk to minimize the total number of reserved areas consumed for PAMTs. - Try to first allocate PAMT from the local node of the TDMR for better NUMA locality. Also dump out how many pages are allocated for PAMTs when the TDX module is initialized successfully. This helps answer the eternal "where did all my memory go?" questions. [ dhansen: merge in error handling cleanup ] Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Isaku Yamahata Reviewed-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: Yuan Yao Link: https://lore.kernel.org/all/20231208170740.53979-11-dave.hansen%40intel.com commit f3338ac15931075ef8b81145f5de128158a8dc8e Author: Kai Huang Date: Fri Dec 8 09:07:30 2023 -0800 x86/virt/tdx: Fill out TDMRs to cover all TDX memory regions Start to transit out the "multi-steps" to construct a list of "TD Memory Regions" (TDMRs) to cover all TDX-usable memory regions. The kernel configures TDX-usable memory regions by passing a list of TDMRs "TD Memory Regions" (TDMRs) to the TDX module. Each TDMR contains the information of the base/size of a memory region, the base/size of the associated Physical Address Metadata Table (PAMT) and a list of reserved areas in the region. Do the first step to fill out a number of TDMRs to cover all TDX memory regions. To keep it simple, always try to use one TDMR for each memory region. As the first step only set up the base/size for each TDMR. Each TDMR must be 1G aligned and the size must be in 1G granularity. This implies that one TDMR could cover multiple memory regions. If a memory region spans the 1GB boundary and the former part is already covered by the previous TDMR, just use a new TDMR for the remaining part. TDX only supports a limited number of TDMRs. Disable TDX if all TDMRs are consumed but there is more memory region to cover. There are fancier things that could be done like trying to merge adjacent TDMRs. This would allow more pathological memory layouts to be supported. But, current systems are not even close to exhausting the existing TDMR resources in practice. For now, keep it simple. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Yuan Yao Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-10-dave.hansen%40intel.com commit 5173d3c5d018161aca17d4ac95367cf832c7fff1 Author: Kai Huang Date: Fri Dec 8 09:07:29 2023 -0800 x86/virt/tdx: Add placeholder to construct TDMRs to cover all TDX memory regions After the kernel selects all TDX-usable memory regions, the kernel needs to pass those regions to the TDX module via data structure "TD Memory Region" (TDMR). Add a placeholder to construct a list of TDMRs (in multiple steps) to cover all TDX-usable memory regions. === Long Version === TDX provides increased levels of memory confidentiality and integrity. This requires special hardware support for features like memory encryption and storage of memory integrity checksums. Not all memory satisfies these requirements. As a result, TDX introduced the concept of a "Convertible Memory Region" (CMR). During boot, the firmware builds a list of all of the memory ranges which can provide the TDX security guarantees. The list of these ranges is available to the kernel by querying the TDX module. The TDX architecture needs additional metadata to record things like which TD guest "owns" a given page of memory. This metadata essentially serves as the 'struct page' for the TDX module. The space for this metadata is not reserved by the hardware up front and must be allocated by the kernel and given to the TDX module. Since this metadata consumes space, the VMM can choose whether or not to allocate it for a given area of convertible memory. If it chooses not to, the memory cannot receive TDX protections and can not be used by TDX guests as private memory. For every memory region that the VMM wants to use as TDX memory, it sets up a "TD Memory Region" (TDMR). Each TDMR represents a physically contiguous convertible range and must also have its own physically contiguous metadata table, referred to as a Physical Address Metadata Table (PAMT), to track status for each page in the TDMR range. Unlike a CMR, each TDMR requires 1G granularity and alignment. To support physical RAM areas that don't meet those strict requirements, each TDMR permits a number of internal "reserved areas" which can be placed over memory holes. If PAMT metadata is placed within a TDMR it must be covered by one of these reserved areas. Let's summarize the concepts: CMR - Firmware-enumerated physical ranges that support TDX. CMRs are 4K aligned. TDMR - Physical address range which is chosen by the kernel to support TDX. 1G granularity and alignment required. Each TDMR has reserved areas where TDX memory holes and overlapping PAMTs can be represented. PAMT - Physically contiguous TDX metadata. One table for each page size per TDMR. Roughly 1/256th of TDMR in size. 256G TDMR = ~1G PAMT. As one step of initializing the TDX module, the kernel configures TDX-usable memory regions by passing a list of TDMRs to the TDX module. Constructing the list of TDMRs consists below steps: 1) Fill out TDMRs to cover all memory regions that the TDX module will use for TD memory. 2) Allocate and set up PAMT for each TDMR. 3) Designate reserved areas for each TDMR. Add a placeholder to construct TDMRs to do the above steps. To keep things simple, just allocate enough space to hold maximum number of TDMRs up front. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Isaku Yamahata Reviewed-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Link: https://lore.kernel.org/all/20231208170740.53979-9-dave.hansen%40intel.com commit cf72bc481634b7c4cd780b6338f222e2892b0232 Author: Kai Huang Date: Fri Dec 8 09:07:28 2023 -0800 x86/virt/tdx: Get module global metadata for module initialization The TDX module global metadata provides system-wide information about the module. TL;DR: Use the TDH.SYS.RD SEAMCALL to tell if the module is good or not. Long Version: 1) Only initialize TDX module with version 1.5 and later TDX module 1.0 has some compatibility issues with the later versions of module, as documented in the "Intel TDX module ABI incompatibilities between TDX1.0 and TDX1.5" spec. Don't bother with module versions that do not have a stable ABI. 2) Get the essential global metadata for module initialization TDX reports a list of "Convertible Memory Region" (CMR) to tell the kernel which memory is TDX compatible. The kernel needs to build a list of memory regions (out of CMRs) as "TDX-usable" memory and pass them to the TDX module. The kernel does this by constructing a list of "TD Memory Regions" (TDMRs) to cover all these memory regions and passing them to the TDX module. Each TDMR is a TDX architectural data structure containing the memory region that the TDMR covers, plus the information to track (within this TDMR): a) the "Physical Address Metadata Table" (PAMT) to track each TDX memory page's status (such as which TDX guest "owns" a given page, and b) the "reserved areas" to tell memory holes that cannot be used as TDX memory. The kernel needs to get below metadata from the TDX module to build the list of TDMRs: a) the maximum number of supported TDMRs b) the maximum number of supported reserved areas per TDMR and, c) the PAMT entry size for each TDX-supported page size. == Implementation == The TDX module has two modes of fetching the metadata: a one field at a time, or all in one blob. Use the field at a time for now. It is slower, but there just are not enough fields now to justify the complexity of extra unpacking. The err_free_tdxmem=>out_put_tdxmem goto looks wonky by itself. But it is the first of a bunch of error handling that will get stuck at its site. [ dhansen: clean up changelog and add a struct to map between the TDX module fields and 'struct tdx_tdmr_sysinfo' ] Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-8-dave.hansen%40intel.com commit abe8dbab8f9f8370c26e7b79b49ed795c1b6b70f Author: Kai Huang Date: Fri Dec 8 09:07:27 2023 -0800 x86/virt/tdx: Use all system memory when initializing TDX module as TDX memory Start to transit out the "multi-steps" to initialize the TDX module. TDX provides increased levels of memory confidentiality and integrity. This requires special hardware support for features like memory encryption and storage of memory integrity checksums. Not all memory satisfies these requirements. As a result, TDX introduced the concept of a "Convertible Memory Region" (CMR). During boot, the firmware builds a list of all of the memory ranges which can provide the TDX security guarantees. The list of these ranges is available to the kernel by querying the TDX module. CMRs tell the kernel which memory is TDX compatible. The kernel needs to build a list of memory regions (out of CMRs) as "TDX-usable" memory and pass them to the TDX module. Once this is done, those "TDX-usable" memory regions are fixed during module's lifetime. To keep things simple, assume that all TDX-protected memory will come from the page allocator. Make sure all pages in the page allocator *are* TDX-usable memory. As TDX-usable memory is a fixed configuration, take a snapshot of the memory configuration from memblocks at the time of module initialization (memblocks are modified on memory hotplug). This snapshot is used to enable TDX support for *this* memory configuration only. Use a memory hotplug notifier to ensure that no other RAM can be added outside of this configuration. This approach requires all memblock memory regions at the time of module initialization to be TDX convertible memory to work, otherwise module initialization will fail in a later SEAMCALL when passing those regions to the module. This approach works when all boot-time "system RAM" is TDX convertible memory and no non-TDX-convertible memory is hot-added to the core-mm before module initialization. For instance, on the first generation of TDX machines, both CXL memory and NVDIMM are not TDX convertible memory. Using kmem driver to hot-add any CXL memory or NVDIMM to the core-mm before module initialization will result in failure to initialize the module. The SEAMCALL error code will be available in the dmesg to help user to understand the failure. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: "Huang, Ying" Reviewed-by: Isaku Yamahata Reviewed-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Link: https://lore.kernel.org/all/20231208170740.53979-7-dave.hansen%40intel.com commit 6162b310bc219d18bac970dbd441d7743097d1b9 Author: Kai Huang Date: Fri Dec 8 09:07:26 2023 -0800 x86/virt/tdx: Add skeleton to enable TDX on demand There are essentially two steps to get the TDX module ready: 1) Get each CPU ready to run TDX 2) Set up the shared TDX module data structures Introduce and export (to KVM) the infrastructure to do both of these pieces at runtime. == Per-CPU TDX Initialization == Track the initialization status of each CPU with a per-cpu variable. This avoids failures in the case of KVM module reloads and handles cases where CPUs come online later. Generally, the per-cpu SEAMCALLs happen first. But there's actually one global call that has to happen before _any_ others (TDH_SYS_INIT). It's analogous to the boot CPU having to do a bit of extra work just because it happens to be the first one. Track if _any_ CPU has done this call and then only actually do it during the first per-cpu init. == Shared TDX Initialization == Create the global state function (tdx_enable()) as a simple placeholder. The TODO list will be pared down as functionality is added. Use a state machine protected by mutex to make sure the work in tdx_enable() will only be done once. This avoids failures if the KVM module is reloaded. A CPU must be made ready to run TDX before it can participate in initializing the shared parts of the module. Any caller of tdx_enable() need to ensure that it can never run on a CPU which is not ready to run TDX. It needs to be wary of CPU hotplug, preemption and the VMX enabling state of any CPU on which it might run. == Why runtime instead of boot time? == The TDX module can be initialized only once in its lifetime. Instead of always initializing it at boot time, this implementation chooses an "on demand" approach to initialize TDX until there is a real need (e.g when requested by KVM). This approach has below pros: 1) It avoids consuming the memory that must be allocated by kernel and given to the TDX module as metadata (~1/256th of the TDX-usable memory), and also saves the CPU cycles of initializing the TDX module (and the metadata) when TDX is not used at all. 2) The TDX module design allows it to be updated while the system is running. The update procedure shares quite a few steps with this "on demand" initialization mechanism. The hope is that much of "on demand" mechanism can be shared with a future "update" mechanism. A boot-time TDX module implementation would not be able to share much code with the update mechanism. 3) Making SEAMCALL requires VMX to be enabled. Currently, only the KVM code mucks with VMX enabling. If the TDX module were to be initialized separately from KVM (like at boot), the boot code would need to be taught how to muck with VMX enabling and KVM would need to be taught how to cope with that. Making KVM itself responsible for TDX initialization lets the rest of the kernel stay blissfully unaware of VMX. [ dhansen: completely reorder/rewrite changelog ] Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: Nikolay Borisov Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-6-dave.hansen%40intel.com commit df01f5ae07dd9ca0c755943a5cfcc4e78e480f99 Author: Kai Huang Date: Fri Dec 8 09:07:25 2023 -0800 x86/virt/tdx: Add SEAMCALL error printing for module initialization The SEAMCALLs involved during the TDX module initialization are not expected to fail. In fact, they are not expected to return any non-zero code (except the "running out of entropy error", which can be handled internally already). Add yet another set of SEAMCALL wrappers, which treats all non-zero return code as error, to support printing SEAMCALL error upon failure for module initialization. Note the TDX module initialization doesn't use the _saved_ret() variant thus no wrapper is added for it. SEAMCALL assembly can also return kernel-defined error codes for three special cases: 1) TDX isn't enabled by the BIOS; 2) TDX module isn't loaded; 3) CPU isn't in VMX operation. Whether they can legally happen depends on the caller, so leave to the caller to print error message when desired. Also convert the SEAMCALL error codes to the kernel error codes in the new wrappers so that each SEAMCALL caller doesn't have to repeat the conversion. [ dhansen: Align the register dump with show_regs(). Zero-pad the contents, split on two lines and use consistent spacing. ] Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-5-dave.hansen%40intel.com commit 1e66a7e275393055d98d2306771fe1feadeb1cd6 Author: Kai Huang Date: Fri Dec 8 09:07:24 2023 -0800 x86/virt/tdx: Handle SEAMCALL no entropy error in common code Some SEAMCALLs use the RDRAND hardware and can fail for the same reasons as RDRAND. Use the kernel RDRAND retry logic for them. There are three __seamcall*() variants. Do the SEAMCALL retry in common code and add a wrapper for each of them. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Dave Hansen Link: https://lore.kernel.org/all/20231208170740.53979-4-dave.hansen%40intel.com commit 3115cabd935ade76fbe61154d1e405158e548272 Author: Kai Huang Date: Fri Dec 8 09:07:23 2023 -0800 x86/virt/tdx: Make INTEL_TDX_HOST depend on X86_X2APIC TDX capable platforms are locked to X2APIC mode and cannot fall back to the legacy xAPIC mode when TDX is enabled by the BIOS. TDX host support requires x2APIC. Make INTEL_TDX_HOST depend on X86_X2APIC. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Dave Hansen Reviewed-by: David Hildenbrand Reviewed-by: Kirill A. Shutemov Link: https://lore.kernel.org/lkml/ba80b303-31bf-d44a-b05d-5c0f83038798@intel.com/ Link: https://lore.kernel.org/all/20231208170740.53979-3-dave.hansen%40intel.com commit d623704bb23901a25bf6d6a40aa16b43a17622eb Author: Kai Huang Date: Fri Dec 8 09:07:22 2023 -0800 x86/virt/tdx: Define TDX supported page sizes as macros TDX supports 4K, 2M and 1G page sizes. The corresponding values are defined by the TDX module spec and used as TDX module ABI. Currently, they are used in try_accept_one() when the TDX guest tries to accept a page. However currently try_accept_one() uses hard-coded magic values. Define TDX supported page sizes as macros and get rid of the hard-coded values in try_accept_one(). TDX host support will need to use them too. Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: Dave Hansen Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/all/20231208170740.53979-2-dave.hansen%40intel.com commit 765a0542fdc7aad7cbc1da3bd19bed6297b54e2c Author: Kai Huang Date: Fri Dec 8 09:07:21 2023 -0800 x86/virt/tdx: Detect TDX during kernel boot Intel Trust Domain Extensions (TDX) protects guest VMs from malicious host and certain physical attacks. A CPU-attested software module called 'the TDX module' runs inside a new isolated memory range as a trusted hypervisor to manage and run protected VMs. Pre-TDX Intel hardware has support for a memory encryption architecture called MKTME. The memory encryption hardware underpinning MKTME is also used for Intel TDX. TDX ends up "stealing" some of the physical address space from the MKTME architecture for crypto-protection to VMs. The BIOS is responsible for partitioning the "KeyID" space between legacy MKTME and TDX. The KeyIDs reserved for TDX are called 'TDX private KeyIDs' or 'TDX KeyIDs' for short. During machine boot, TDX microcode verifies that the BIOS programmed TDX private KeyIDs consistently and correctly programmed across all CPU packages. The MSRs are locked in this state after verification. This is why MSR_IA32_MKTME_KEYID_PARTITIONING gets used for TDX enumeration: it indicates not just that the hardware supports TDX, but that all the boot-time security checks passed. The TDX module is expected to be loaded by the BIOS when it enables TDX, but the kernel needs to properly initialize it before it can be used to create and run any TDX guests. The TDX module will be initialized by the KVM subsystem when KVM wants to use TDX. Detect platform TDX support by detecting TDX private KeyIDs. The TDX module itself requires one TDX KeyID as the 'TDX global KeyID' to protect its metadata. Each TDX guest also needs a TDX KeyID for its own protection. Just use the first TDX KeyID as the global KeyID and leave the rest for TDX guests. If no TDX KeyID is left for TDX guests, disable TDX as initializing the TDX module alone is useless. [ dhansen: add X86_FEATURE, replace helper function ] Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Reviewed-by: Kirill A. Shutemov Reviewed-by: Isaku Yamahata Reviewed-by: David Hildenbrand Reviewed-by: Dave Hansen Reviewed-by: Kuppuswamy Sathyanarayanan Link: https://lore.kernel.org/all/20231208170740.53979-1-dave.hansen%40intel.com commit fc1fbd13a20596564f407a96ac511bf0db808a0e Author: Arnd Bergmann Date: Thu Dec 7 15:28:06 2023 +0100 scsi: mpi3mr: Fix printk() format strings The newly introduced error messages get multiple format strings wrong: size_t must be printed using the %z modifier rather than %l and dma_addr_t must be printed by reference using the special %pad pointer type: drivers/scsi/mpi3mr/mpi3mr_app.c: In function 'mpi3mr_build_nvme_prp': include/linux/kern_levels.h:5:25: error: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=] drivers/scsi/mpi3mr/mpi3mr_app.c:949:25: note: in expansion of macro 'dprint_bsg_err' 949 | dprint_bsg_err(mrioc, | ^~~~~~~~~~~~~~ include/linux/kern_levels.h:5:25: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=] drivers/scsi/mpi3mr/mpi3mr_app.c:1112:41: note: in expansion of macro 'dprint_bsg_err' 1112 | dprint_bsg_err(mrioc, | ^~~~~~~~~~~~~~ Fixes: 9536af615dc9 ("scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-3") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20231207142813.935717-1-arnd@kernel.org Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Signed-off-by: Martin K. Petersen commit 729f02ec02ae12e5d8a53171bd37e9de56f33677 Author: Linus Walleij Date: Fri Dec 8 11:09:29 2023 +0100 ASoC: wm8996: Convert to GPIO descriptors This converts the WM8996 codec to use GPIO descriptors, an a similar way to WM5100. The driver is instantiating a GPIO chip named wm8996, and we get rid of the base address for the GPIO chip from the platform data and just use dynamic numbering. Move base and ngpio into the static gpio_chip template. Fix up the only in-tree user which is the Cragganmore 6410 module. Signed-off-by: Linus Walleij Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-5-c4dab6f521ec@linaro.org Signed-off-by: Mark Brown commit 8563cfe39ba5d00d974df25e310fb61b5b3687e1 Author: Linus Walleij Date: Fri Dec 8 11:09:28 2023 +0100 ASoC: wm5100: Convert to GPIO descriptors This converts the WM5100 codec to use GPIO descriptors, a pretty straight-forward conversion with the following peculiarities: - The driver is instantiating a GPIO chip named wm5100, and the headphone polarity detection GPIO is lifted from there. We add this to the GPIO descriptor table as well, and we can then get rid of also the base address for the GPIO chip from the platform data and just use dynamic numbering. - Fix up the only in-tree user which is the Cragganmore 6410 module. Signed-off-by: Linus Walleij Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-4-c4dab6f521ec@linaro.org Signed-off-by: Mark Brown commit 0119b2a24eb592f967a2849b772887c96617ad80 Author: Linus Walleij Date: Fri Dec 8 11:09:27 2023 +0100 ASoC: wm2200: Convert to GPIO descriptors This converts the WM2200 codec to use GPIO descriptors. This is a pretty straight-forward conversion, and it also switches over the single in-tree user in the S3C Cragganmore module for S3C 6410. This coded does not seem to get selected or be selectable through Kconfig, I had to hack another soundcard Kconfig entry to select it for compile tests. Signed-off-by: Linus Walleij Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-3-c4dab6f521ec@linaro.org Signed-off-by: Mark Brown commit 10a366f36e2a2e240d9db6da90e501fa16655282 Author: Linus Walleij Date: Fri Dec 8 11:09:26 2023 +0100 ASoC: wm1250-ev1: Convert to GPIO descriptors This converts the WM1250-EV1 codec to use GPIO descriptors. It turns out that the platform data was only used to pass some global GPIO numbers from a board file, so we get rid of this and also switch over the single in-tree user in the S3C Cragganmore module for S3C 6410. The driver obtains two GPIO lines named OSR and master and just pull them low, we leave this behaviour as it was. Signed-off-by: Linus Walleij Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-2-c4dab6f521ec@linaro.org Signed-off-by: Mark Brown commit b53d47775651aa51bb98cdeb968dedb45699d9a1 Author: Linus Walleij Date: Fri Dec 8 11:09:25 2023 +0100 ASoC: wm0010: Convert to GPIO descriptors This converts the WM0010 codec to use GPIO descriptors. It's a pretty straight-forward conversion also switching over the single in-tree user in the S3C Cragganmore module for S3C 6410. Signed-off-by: Linus Walleij Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20231208-descriptors-sound-wlf-v1-1-c4dab6f521ec@linaro.org Signed-off-by: Mark Brown commit d2423d8a38e724b28007abd76db08ccb59f56015 Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:29 2023 +0800 dt-bindings: display: mediatek: padding: Add MT8188 Padding is a new hardware module on MediaTek MT8188, add dt-bindings for it. Reviewed-by: Krzysztof Kozlowski Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231024130048.14749-5-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit ffd00b7994dd8e050ba43a49c7a8a4029a0174fd Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:28 2023 +0800 dt-bindings: display: mediatek: merge: Add compatible for MT8188 Add compatible name for MediaTek MT8188 MERGE. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231024130048.14749-4-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit f0f99f371822c48847e02e56d6e7de507e18f186 Author: Krzysztof Kozlowski Date: Tue Nov 7 09:04:36 2023 +0100 dt-bindings: cache: qcom,llcc: correct QDU1000 reg entries Qualcomm QDU1000 DTSI comes with one LLCC0 base address as pointed by dtbs_check: qdu1000-idp.dtb: system-cache-controller@19200000: reg-names:2: 'llcc2_base' was expected Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Acked-by: Mukesh Ojha Link: https://lore.kernel.org/r/20231107080436.16747-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 6a4ff5eab84323f0275b8bde36cf4cea5ff7dcb1 Author: Krzysztof Kozlowski Date: Sun Nov 12 19:44:03 2023 +0100 dt-bindings: gpu: samsung-scaler: constrain iommus and power-domains Provide specific constraints for iommus and power-domains, based on current DTS. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231112184403.3449-5-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 6ff067f3d56689aa67bf9885f4a63b5160111ae0 Author: Krzysztof Kozlowski Date: Sun Nov 12 19:44:02 2023 +0100 dt-bindings: gpu: samsung-g2d: constrain iommus and power-domains Provide specific constraints for iommus and power-domains, based on current DTS. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231112184403.3449-4-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit f1d797b6da5e4a7cacc04eb9a49fe1a421169ff3 Author: Krzysztof Kozlowski Date: Sun Nov 12 19:44:01 2023 +0100 dt-bindings: gpu: samsung: constrain clocks in top-level properties When number of clock varies between variants, the Devicetree bindings coding convention expects to have widest constraints in top-level definition of the properties and narrow them in allOf:if:then block. This is more readable and sometimes allows to spot some errors in the bindings. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231112184403.3449-3-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 6b91e0ee7fc9e5b0ec0a8150ddc5fea15786ec7e Author: Krzysztof Kozlowski Date: Sun Nov 12 19:44:00 2023 +0100 dt-bindings: gpu: samsung: re-order entries to match coding convention The Devicetree bindings coding convention, as used in most of the files and expressed in Documentation/devicetree/bindings/example-schema.yaml, expects "allOf:" block with if-statements after "required:" block. Re-order few schemas to match the convention to avoid repeating review comments for new patches using existing code as template. No functional changes. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231112184403.3449-2-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit 644977738c445c11c48152e11a1cb50c2fc4bc20 Author: Krzysztof Kozlowski Date: Sun Nov 12 19:43:59 2023 +0100 dt-bindings: gpu: samsung-rotator: drop redundant quotes Compatibles should not use quotes in the bindings. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231112184403.3449-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit e7013a3d77e28f32def43f2e20e32ffb822d86e5 Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:27 2023 +0800 dt-bindings: display: mediatek: mdp-rdma: Add compatible for MT8188 Add compatible name for MediaTek MT8188 MDP-RDMA. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231024130048.14749-3-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 9030a77742f309d6b6a30c60093f5d617f33889f Author: Hsiao Chien Sung Date: Tue Oct 24 21:00:26 2023 +0800 dt-bindings: display: mediatek: ethdr: Add compatible for MT8188 Add compatible name for MediaTek MT8188 ETHDR. Reviewed-by: AngeloGioacchino Del Regno Acked-by: Krzysztof Kozlowski Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung Link: https://patchwork.kernel.org/project/dri-devel/patch/20231024130048.14749-2-shawn.sung@mediatek.com/ Signed-off-by: Chun-Kuang Hu commit 36b0bdb6d330fe0546fc7f97d93e8cfa57421ad9 Merge: 6b4756beb18ff 61b12ebe439ad Author: David S. Miller Date: Fri Dec 8 12:12:17 2023 +0000 Merge branch 'net-selftests-unique-namespace' Hangbin Liu says: ==================== Convert net selftests to run in unique namespace (Part 2) Here is the 2nd part of converting net selftests to run in unique namespace. This part converts all bridge, vxlan, vrf tests. Here is the part 1 link: https://lore.kernel.org/netdev/20231202020110.362433-1-liuhangbin@gmail.com ==================== Signed-off-by: David S. Miller commit 61b12ebe439adfd9853c13499c2099e2a6d41771 Author: Hangbin Liu Date: Wed Dec 6 15:08:01 2023 +0800 selftests/net: convert vrf-xfrm-tests.sh to run it in unique namespace Here is the test result after conversion. ]# ./vrf-xfrm-tests.sh No qdisc on VRF device TEST: IPv4 no xfrm policy [ OK ] TEST: IPv6 no xfrm policy [ OK ] TEST: IPv4 xfrm policy based on address [ OK ] TEST: IPv6 xfrm policy based on address [ OK ] TEST: IPv6 xfrm policy with VRF in selector [ OK ] TEST: IPv4 xfrm policy with xfrm device [ OK ] TEST: IPv6 xfrm policy with xfrm device [ OK ] netem qdisc on VRF device TEST: IPv4 no xfrm policy [ OK ] TEST: IPv6 no xfrm policy [ OK ] TEST: IPv4 xfrm policy based on address [ OK ] TEST: IPv6 xfrm policy based on address [ OK ] TEST: IPv6 xfrm policy with VRF in selector [ OK ] TEST: IPv4 xfrm policy with xfrm device [ OK ] TEST: IPv6 xfrm policy with xfrm device [ OK ] Tests passed: 14 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 51f64acbe36e13e113d284fcdefc751216984c01 Author: Hangbin Liu Date: Wed Dec 6 15:08:00 2023 +0800 selftests/net: convert vrf_strict_mode_test.sh to run it in unique namespace Here is the test result after conversion. ]# ./vrf_strict_mode_test.sh ################################################################################ TEST SECTION: VRF strict_mode test on init network namespace ################################################################################ TEST: init: net.vrf.strict_mode is available [ OK ] TEST: init: strict_mode=0 by default, 0 vrfs [ OK ] ... TEST: init: check strict_mode=1 [ OK ] TEST: testns-HvoZkB: check strict_mode=0 [ OK ] Tests passed: 37 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit bedc99abcaf88df25b044fc4e3c80d69d0dbfc9b Author: Hangbin Liu Date: Wed Dec 6 15:07:59 2023 +0800 selftests/net: convert vrf_route_leaking.sh to run it in unique namespace Here is the test result after conversion. ]# ./vrf_route_leaking.sh ########################################################################### IPv4 (sym route): VRF ICMP ttl error route lookup ping ########################################################################### TEST: Basic IPv4 connectivity [ OK ] TEST: Ping received ICMP ttl exceeded [ OK ] ... TEST: Basic IPv6 connectivity [ OK ] TEST: Traceroute6 reports a hop on r1 [ OK ] Tests passed: 18 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 5ece8371747d57ae113aaf8a7b6468d6681d099f Author: Hangbin Liu Date: Wed Dec 6 15:07:58 2023 +0800 selftests/net: convert test_vxlan_vnifiltering.sh to run it in unique namespace Here is the test result after conversion. ]# ./test_vxlan_vnifiltering.sh TEST: Create traditional vxlan device [ OK ] TEST: Cannot create vnifilter device without external flag [ OK ] TEST: Creating external vxlan device with vnifilter flag [ OK ] ... TEST: VM connectivity over traditional vxlan (ipv6 default rdst) [ OK ] TEST: VM connectivity over metadata nonfiltering vxlan (ipv4 default rdst) [ OK ] Tests passed: 27 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit d6aab1f632978880660f41c48b760dd48461dcfb Author: Hangbin Liu Date: Wed Dec 6 15:07:57 2023 +0800 selftests/net: convert test_vxlan_under_vrf.sh to run it in unique namespace Here is the test result after conversion. ]# ./test_vxlan_under_vrf.sh Checking HV connectivity [ OK ] Check VM connectivity through VXLAN (underlay in the default VRF) [ OK ] Check VM connectivity through VXLAN (underlay in a VRF) [ OK ] Acked-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit d79e907b425d1dcc831f9eddbdb09682292faed0 Author: Hangbin Liu Date: Wed Dec 6 15:07:56 2023 +0800 selftests/net: convert test_vxlan_nolocalbypass.sh to run it in unique namespace Here is the test result after conversion. ]# ./test_vxlan_nolocalbypass.sh TEST: localbypass enabled [ OK ] TEST: Packet received by local VXLAN device - localbypass [ OK ] TEST: localbypass disabled [ OK ] TEST: Packet not received by local VXLAN device - nolocalbypass [ OK ] TEST: localbypass enabled [ OK ] TEST: Packet received by local VXLAN device - localbypass [ OK ] Tests passed: 6 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit a8258e64ca74314478fda85a42b1c1eb2db29c67 Author: Hangbin Liu Date: Wed Dec 6 15:07:55 2023 +0800 selftests/net: convert test_vxlan_mdb.sh to run it in unique namespace Here is the test result after conversion. ]# ./test_vxlan_mdb.sh Control path: Basic (*, G) operations - IPv4 overlay / IPv4 underlay -------------------------------------------------------------------- TEST: MDB entry addition [ OK ] ... Data path: MDB torture test - IPv6 overlay / IPv6 underlay ---------------------------------------------------------- TEST: Torture test [ OK ] Tests passed: 620 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit 312abe3d93a35f9c486a4703d39cab52457266f0 Author: Hangbin Liu Date: Wed Dec 6 15:07:54 2023 +0800 selftests/net: convert test_bridge_neigh_suppress.sh to run it in unique namespace Here is the test result after conversion. ]# ./test_bridge_neigh_suppress.sh Per-port ARP suppression - VLAN 10 ---------------------------------- TEST: arping [ OK ] TEST: ARP suppression [ OK ] ... TEST: NS suppression (VLAN 20) [ OK ] Tests passed: 148 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit 4624a78c18c62da815f3253966b7a87995f77e1b Author: Hangbin Liu Date: Wed Dec 6 15:07:53 2023 +0800 selftests/net: convert test_bridge_backup_port.sh to run it in unique namespace There is no h1 h2 actually. Remove it. Here is the test result after conversion. ]# ./test_bridge_backup_port.sh Backup port ----------- TEST: Forwarding out of swp1 [ OK ] TEST: No forwarding out of vx0 [ OK ] TEST: swp1 carrier off [ OK ] TEST: No forwarding out of swp1 [ OK ] ... Backup nexthop ID - ping ------------------------ TEST: Ping with backup nexthop ID [ OK ] TEST: Ping after disabling backup nexthop ID [ OK ] Backup nexthop ID - torture test -------------------------------- TEST: Torture test [ OK ] Tests passed: 83 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit be5bcc4be9d9d3ae294072441a66fe39b74e5bba Author: Andi Shyti Date: Wed Dec 6 19:43:22 2023 +0100 drm/i915/guc: Create the guc_to_i915() wrapper Given a reference to "guc", the guc_to_i915() returns the pointer to "i915" private data. Signed-off-by: Andi Shyti Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20231206184322.57111-1-andi.shyti@linux.intel.com commit 34880b18733efff60b68d074ff74d018ffc309a7 Author: Andrzej Hajda Date: Tue Dec 5 14:09:37 2023 +0100 drm/i915/selftests: wait for active idle event in i915_active_unlock_wait After i915_active_unlock_wait i915_active can be still non-idle due to barrier async handling in signal_irq_work. As a result one can observe following errors: bcs0: heartbeat pulse did not flush idle tasks *ERROR* pulse active pulse_active [i915]:pulse_retire [i915] *ERROR* pulse count: 0 *ERROR* pulse preallocated barriers? no To prevent it let's wait explicitly for idleness. v2: wait only in live_idle tests Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231205-selftest_wait_for_active_idle_event-v2-1-1437d0bf9829@intel.com commit ae5af710f369a4d88792bf1d9da317884156cd87 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:12 2023 +0100 tty: xtensa/iss: use u8 Switch character types to u8. To conform to characters in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Chris Zankel Cc: Max Filippov Link: https://lore.kernel.org/r/20231206073712.17776-28-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit b49d18493a0b9bb79289c5bec31acf073c34edd2 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:11 2023 +0100 tty: um: convert to u8/__u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Note we use __u8 in the userspace files. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Richard Weinberger Cc: Anton Ivanov Cc: Johannes Berg Cc: linux-um@lists.infradead.org Link: https://lore.kernel.org/r/20231206073712.17776-27-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 18977909bfba2a866f5e2cd0ce540919de5aa394 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:10 2023 +0100 tty: ttyprintk: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20231206073712.17776-26-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 14abfd0cb52f21256f4353196ddfb8e6f3c4e8b4 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:09 2023 +0100 tty: srmcons: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Link: https://lore.kernel.org/r/20231206073712.17776-25-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 475fc6e2de6fec0ff3c9a74ddcfd2b52c90adc0d Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:08 2023 +0100 tty: serdev: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. This patch converts struct serdev_device_ops hooks and its instantiations. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Rob Herring Acked-by: Johan Hovold Link: https://lore.kernel.org/r/20231206073712.17776-24-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit f2470d2bc4327c2c1a604c6e247442dbb14c90c5 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:07 2023 +0100 tty: serdev: convert to u8 and size_t in serdev_controller_ops Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. In this patch, only struct serdev_controller_ops hooks. The rest will follow. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Rob Herring Link: https://lore.kernel.org/r/20231206073712.17776-23-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5c99e2977f137cbedbd535a8884c5f3be32e738a Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:06 2023 +0100 tty: nozomi: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-22-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5655b16ea5cf00465b13942dd045cf38f1414d46 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:05 2023 +0100 tty: n_hdlc: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Note u8 is already both passed in and expected on output. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-21-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit eb7e45db2e0af233cb1dede0b16413e902068a03 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:04 2023 +0100 tty: n_gsm: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-20-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 59b943356b53312c02ec5cdb0b8dfc23e41c08fa Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:03 2023 +0100 tty: mxser: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-19-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit cb8566b9b3b18b0476f48c567275a2da4501cb2c Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:02 2023 +0100 tty: moxa: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-18-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2573f7eac04dbcdd4f24957e3a3bc891ed2dc88f Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:01 2023 +0100 tty: mmc: sdio: use u8 for flag Switch character types to u8. To conform to characters in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Link: https://lore.kernel.org/r/20231206073712.17776-17-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit ce7cbd9a6c81b5fc899bbc730072a1bddeae5d0d Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:37:00 2023 +0100 tty: mips_ejtag_fdc: use u8 for character pointers mips_ejtag_fdc_encode() and mips_ejtag_fdc_put_chan() declare arrays of pointers to characters. Switch their types from char to u8 to conform to the current tty layer types for characters. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-16-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit b7a43d0c878169037c7a08985b1d444f1e4b0629 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:59 2023 +0100 tty: m68k: nfcon: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Geert Uytterhoeven Cc: linux-m68k@lists.linux-m68k.org Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231206073712.17776-15-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2f982313279baa066f03f4816f3fa3521a4d41cb Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:58 2023 +0100 tty: ipoctal: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Vaibhav Gupta Cc: Jens Taprogge Cc: industrypack-devel@lists.sourceforge.net Link: https://lore.kernel.org/r/20231206073712.17776-14-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit f32fcbedbe9290565e4eac3fd7c4c451d5478787 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:57 2023 +0100 tty: hvc: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Amit Shah Cc: Arnd Bergmann Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linuxppc-dev@lists.ozlabs.org Cc: virtualization@lists.linux.dev Cc: linux-riscv@lists.infradead.org Link: https://lore.kernel.org/r/20231206073712.17776-13-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit f3fb7367af89457a8818bc93e35a274ccb5b9e44 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:56 2023 +0100 tty: goldfish: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-12-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0d08abb98331a56c4ec84539be7c401321a2eb0c Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:55 2023 +0100 tty: ehv_bytechan: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Laurentiu Tudor Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20231206073712.17776-11-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit e17934c1bcc1aeb6289309f300e2541d688ee0d6 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:54 2023 +0100 tty: con3270: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: linux-s390@vger.kernel.org Link: https://lore.kernel.org/r/20231206073712.17776-10-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 359bbdc0cdfc8504c617f7a00af959a17277d4f4 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:53 2023 +0100 tty: con3215: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: linux-s390@vger.kernel.org Link: https://lore.kernel.org/r/20231206073712.17776-9-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 03e5af525750d83228f7177dbe9c9ae6ccd961e6 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:52 2023 +0100 tty: bcm: convert to u8 and size_t Switch character types to u8 and sizes to size_t. To conform to characters/sizes in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Scott Branden Cc: Broadcom internal kernel review list Cc: Arnd Bergmann Link: https://lore.kernel.org/r/20231206073712.17776-8-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit fbdeead9598ca202bf30c5c4b14f3768db99ca45 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:51 2023 +0100 tty: ami: use u8 for characters and flag Switch character types to u8. To conform to characters in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231206073712.17776-7-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4e8d8878145f1478886e1630c44113ad2c2eb99d Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:50 2023 +0100 tty: core: the rest to u8 There are still last minor users in the tty core that still reference characters by the 'char' type. Switch them to u8. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-6-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3a00da027946cd08db1c1be2de4620950bbdf074 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:49 2023 +0100 tty: make tty_operations::send_xchar accept u8 char tty_operations::send_xchar is one of the last users of 'char' type for characters in the tty layer. Convert it to u8 now. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Karsten Keil Cc: Ulf Hansson Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: netdev@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: linux-bluetooth@vger.kernel.org Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231206073712.17776-5-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 49943393c9f0be61fd494a884851aa117cd72382 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:48 2023 +0100 tty: switch tty_port::xmit_* to u8 Both xmit_buf and xmit_fifo of struct tty_port should be u8. To conform to characters in the rest of the tty layer. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit e93102bea4a1935403d2aadce567fbd1b9e853e0 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:47 2023 +0100 tty: mmc: sdio_uart: switch sdio_in() to return u8 sdio_in() returns a value returned from sdio_readb(). The latter returns u8. So should the former. Therefore, switch sdio_in() return type to u8 and all its callers too. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Link: https://lore.kernel.org/r/20231206073712.17776-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit e01b5712a80d04cdb4699d6a0b3d5f6e838425d5 Author: Jiri Slaby (SUSE) Date: Wed Dec 6 08:36:46 2023 +0100 tty: goldfish: use bool for is_write parameter do_rw_io()'s is_write parameter is boolean, but typed int. Switch to the former, so that it's obvious. (And the two users too.) Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231206073712.17776-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 173ebdedcd844a39bb884afc1c1f97b74319dda6 Author: Stephan Gerhold Date: Tue Nov 28 10:43:33 2023 +0100 serial: msm: Use OPP table for DVFS support Parse the OPP table from the device tree and use dev_pm_opp_set_rate() instead of clk_set_rate() to allow making performance state votes specified in the OPP table (e.g. for power domains and interconnects). Without an OPP table in the device tree this will behave just as before this patch. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231128-serial-msm-dvfs-v1-2-4f290d20a4be@kernkonzept.com Signed-off-by: Greg Kroah-Hartman commit 692079bda7802fccbf82daeb93d47d3d92972bbf Author: Stephan Gerhold Date: Tue Nov 28 10:43:32 2023 +0100 dt-bindings: serial: qcom,msm-uartdm: Vote for shared resources Document power-domains, operating-points-v2 and interconnects to allow making performance state votes for certain clock frequencies of the UART DM controller. The interconnect path to DRAM is needed when UART DM is used together with a DMA engine. Voting for these shared resources is necessary to guarantee performance with power management enabled. Otherwise these resources might run at minimal performance state which is not sufficient for certain UART baud rates. Signed-off-by: Stephan Gerhold Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231128-serial-msm-dvfs-v1-1-4f290d20a4be@kernkonzept.com Signed-off-by: Greg Kroah-Hartman commit 1e7e56160d9ddec12093047e09abb17b0fa1a834 Author: Christophe Leroy Date: Tue Dec 5 14:16:43 2023 +0100 serial: ucc_uart: Fix multiple address space type errors sparse reports multiple problems with address space type. Most problems are linked to missing __iomem qualifier. Others are caused by dereferencing __iomem addresses. Fix all this by adding missing __iomem and using ioread32be(). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312050412.zN2PKArS-lkp@intel.com/ Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/e49deeb079391ff7273ec32f5563df94cf70bc95.1701781976.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman commit 0ec058ece2f933aed66b76bd5cb9b5e6764853c3 Author: Ayan Kumar Halder Date: Tue Dec 5 12:35:34 2023 +0000 tty: hvc: dcc: Check for TXfull condition while setting up early console Refer ARM DDI 0487I.a ID081822, D17.3.8, DBGDTRTX_EL0, "If TXfull is set to 1, set DTRRX and DTRTX to UNKNOWN" Thus one should always check for TXfull condition before hvc can be used as an early console. This is similar to what is being done today in hvc_dcc_console_init() and hvc_dcc_init(). The count 0x4000000 has been obtained from uboot (v2024.01-rc3) drivers/serial/arm_dcc.c "TIMEOUT_COUNT". It reads the dcc status and waits for 0x4000000 times for the TX Fifo to be available before returning an error. Thus, it will prevent DCC to be used as early console. Signed-off-by: Ayan Kumar Halder Link: https://lore.kernel.org/r/20231205123534.3376883-1-ayan.kumar.halder@amd.com Signed-off-by: Greg Kroah-Hartman commit b18fefd230e47f22d2ec014219bc053c5806afb9 Author: Heiko Stuebner Date: Fri Dec 1 15:05:42 2023 +0100 dt-bindings: serial: snps-dw-apb-uart: include rs485 schema The dw-apb-uart also can emulate rs485, so include the rs485 schema to allow validating rs485 properties. Signed-off-by: Heiko Stuebner Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231201140542.323564-1-heiko@sntech.de Signed-off-by: Greg Kroah-Hartman commit 093258a9963bfac043244995bff87dc2c931b9b5 Author: Théo Lebrun Date: Thu Nov 30 15:07:13 2023 +0100 tty: serial: amba: cleanup whitespace Fix whitespace in include/linux/amba/serial.h to match current kernel coding standards. Fixes about: - CHECK: spaces preferred around that '|' (ctx:VxV) - ERROR: code indent should use tabs where possible - WARNING: Unnecessary space before function pointer arguments - WARNING: please, no spaces at the start of a line Reviewed-by: Linus Walleij Reviewed-by: Ilpo Järvinen Signed-off-by: Théo Lebrun Link: https://lore.kernel.org/r/20231130-mbly-uart-v5-1-6566703a04b5@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 675bf8ef209cc8da28ffefd7d8a93c53735cc84a Author: Jiri Slaby (SUSE) Date: Thu Nov 30 12:30:01 2023 +0100 tty: virtio: drop virtio_cons_early_init() The last user of virtio_cons_early_init() was dropped in commit 7fb2b2d51244 ("s390/virtio: remove the old KVM virtio transport"). So now, drop virtio_cons_early_init() and the logic and headers behind too. Signed-off-by: Jiri Slaby (SUSE) Acked-by: Jason Wang Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Amit Shah Cc: Arnd Bergmann Cc: "Michael S. Tsirkin" Cc: Xuan Zhuo Cc: linux-alpha@vger.kernel.org Cc: virtualization@lists.linux.dev Link: https://lore.kernel.org/r/20231130113001.29154-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 78d60dae9a0c9f09aa3d6477c94047df2fe6f7b0 Author: Paul Geurts Date: Fri Nov 24 14:11:10 2023 +0100 serial: imx: fix tx statemachine deadlock When using the serial port as RS485 port, the tx statemachine is used to control the RTS pin to drive the RS485 transceiver TX_EN pin. When the TTY port is closed in the middle of a transmission (for instance during userland application crash), imx_uart_shutdown disables the interface and disables the Transmission Complete interrupt. afer that, imx_uart_stop_tx bails on an incomplete transmission, to be retriggered by the TC interrupt. This interrupt is disabled and therefore the tx statemachine never transitions out of SEND. The statemachine is in deadlock now, and the TX_EN remains low, making the interface useless. imx_uart_stop_tx now checks for incomplete transmission AND whether TC interrupts are enabled before bailing to be retriggered. This makes sure the state machine handling is reached, and is properly set to WAIT_AFTER_SEND. Fixes: cb1a60923609 ("serial: imx: implement rts delaying for rs485") Signed-off-by: Paul Geurts Tested-by: Rasmus Villemoes Tested-by: Eberhard Stoll Link: https://lore.kernel.org/r/AM0PR09MB26758F651BC1B742EB45775995B8A@AM0PR09MB2675.eurprd09.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit 6b4756beb18ffdce0be854e2ed293acfff6e90aa Merge: 09b489478383d e403cffff1a46 Author: David S. Miller Date: Fri Dec 8 10:56:26 2023 +0000 Merge branch 'ethtool_puts' Justin Stitt says: ==================== ethtool: Add ethtool_puts() This series aims to implement ethtool_puts() and send out a wave 1 of conversions from ethtool_sprintf(). There's also a checkpatch patch included to check for the cases listed below. This was sparked from recent discussion here [1] The conversions are used in cases where ethtool_sprintf() was being used with just two arguments: | ethtool_sprintf(&data, buffer[i].name); or when it's used with format string: "%s" | ethtool_sprintf(&data, "%s", buffer[i].name); which both now become: | ethtool_puts(&data, buffer[i].name); The first case commonly triggers a -Wformat-security warning with Clang due to potential problems with format flags present in the strings [3]. The second is just a bit weird with a plain-ol' "%s". Changes found with Cocci [4] and grep [5]. [1]: https://lore.kernel.org/all/202310141935.B326C9E@keescook/ [2]: https://lore.kernel.org/all/?q=dfb%3Aethtool_sprintf+AND+f%3Ajustinstitt [3]: https://lore.kernel.org/all/202310101528.9496539BE@keescook/ [4]: (script authored by Kees w/ modifications from Joe) @replace_2_args@ expression BUF; expression VAR; @@ - ethtool_sprintf(BUF, VAR) + ethtool_puts(BUF, VAR) @replace_3_args@ expression BUF; expression VAR; @@ - ethtool_sprintf(BUF, "%s", VAR) + ethtool_puts(BUF, VAR) - ethtool_sprintf(&BUF, "%s", VAR) + ethtool_puts(&BUF, VAR) [5]: $ rg "ethtool_sprintf\(\s*[^,)]+\s*,\s*[^,)]+\s*\)" Signed-off-by: Justin Stitt --- Changes in v5: - updated documentation to include info about the lack of a trailing newline (Thanks Russell) - rebased onto mainline - Link to v4: https://lore.kernel.org/r/20231102-ethtool_puts_impl-v4-0-14e1e9278496@google.com Changes in v4: - update documentation to match: https://lore.kernel.org/all/20231028192511.100001-1-andrew@lunn.ch/ - Link to v3: https://lore.kernel.org/r/20231027-ethtool_puts_impl-v3-0-3466ac679304@google.com Changes in v3: - fix force_speed_maps merge conflict + formatting (thanks Vladimir) - rebase onto net-next (thanks Andrew, Vladimir) - change subject (thanks Vladimir) - fix checkpatch formatting + implementation (thanks Joe) - Link to v2: https://lore.kernel.org/r/20231026-ethtool_puts_impl-v2-0-0d67cbdd0538@google.com Changes in v2: - wrap lines better in replacement (thanks Joe, Kees) - add --fix to checkpatch (thanks Joe) - clean up checkpatch formatting (thanks Joe, et al.) - rebase against next - Link to v1: https://lore.kernel.org/r/20231025-ethtool_puts_impl-v1-0-6a53a93d3b72@google.com ==================== Signed-off-by: David S. Miller commit e403cffff1a46ab1a95d3bc72e92634445d68328 Author: justinstitt@google.com Date: Wed Dec 6 23:16:12 2023 +0000 net: Convert some ethtool_sprintf() to ethtool_puts() This patch converts some basic cases of ethtool_sprintf() to ethtool_puts(). The conversions are used in cases where ethtool_sprintf() was being used with just two arguments: | ethtool_sprintf(&data, buffer[i].name); or when it's used with format string: "%s" | ethtool_sprintf(&data, "%s", buffer[i].name); which both now become: | ethtool_puts(&data, buffer[i].name); Signed-off-by: Justin Stitt Reviewed-by: Wei Fang Reviewed-by: Andrew Lunn Reviewed-by: Louis Peens Signed-off-by: David S. Miller commit 9b5f621cea6eff2f75b851c6c62cefbdb1673c44 Author: justinstitt@google.com Date: Wed Dec 6 23:16:11 2023 +0000 checkpatch: add ethtool_sprintf rules Add some warnings for using ethtool_sprintf() where a simple ethtool_puts() would suffice. The two cases are: 1) Use ethtool_sprintf() with just two arguments: | ethtool_sprintf(&data, driver[i].name); or 2) Use ethtool_sprintf() with a standalone "%s" fmt string: | ethtool_sprintf(&data, "%s", driver[i].name); The former may cause -Wformat-security warnings while the latter is just not preferred. Both are safely in the category of warnings, not errors. Signed-off-by: Justin Stitt Reviewed-by: Przemek Kitszel Signed-off-by: David S. Miller commit 2a48c635fd9a48699805bbfeee1e4b94b8fe819d Author: justinstitt@google.com Date: Wed Dec 6 23:16:10 2023 +0000 ethtool: Implement ethtool_puts() Use strscpy() to implement ethtool_puts(). Functionally the same as ethtool_sprintf() when it's used with two arguments or with just "%s" format specifier. Signed-off-by: Justin Stitt Reviewed-by: Przemek Kitszel Reviewed-by: Andrew Lunn Reviewed-by: Madhuri Sripada Signed-off-by: David S. Miller commit fca9448ae2f5ddebd841c727ee86136e1b5cbd86 Author: Dan Carpenter Date: Wed Dec 6 17:37:24 2023 +0300 drm/imagination: Move dereference after NULL check in pvr_mmu_backing_page_init() This code dereferences "page->pvr_dev" and then checked for NULL on the next line. Re-order it to avoid a potential NULL pointer dereference. Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Dan Carpenter Reviewed-by: Frank Binns Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/13f4278e-af9c-4092-9196-bc0e6b76f1eb@moroto.mountain commit b84135e7a5921a79e3dc0cc1bbfbe9c3c661c8d0 Author: Yang Li Date: Fri Dec 8 08:30:34 2023 +0800 drm/imagination: Remove unneeded semicolon ./drivers/gpu/drm/imagination/pvr_fw_trace.c:251:2-3: Unneeded semicolon Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7694 Signed-off-by: Yang Li Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231208003034.68339-1-yang.lee@linux.alibaba.com commit aa8ec5d7b26d820dfad2f7668e9dd9edff7ebd7d Author: Dmitry Baryshkov Date: Fri Dec 8 04:03:14 2023 +0300 drm/vkms: move wb's atomic_check from encoder to connector As the renamed drm_atomic_helper_check_wb_connector_state() now accepts drm_writeback_connector as the first argument (instead of drm_encoder), move the VKMS writeback atomic_check from drm_encoder_helper_funcs to drm_connector_helper_funcs. Also drop the vkms_wb_encoder_helper_funcs, which have become empty now. Signed-off-by: Dmitry Baryshkov Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231208010314.3395904-3-dmitry.baryshkov@linaro.org commit 66f011145b835f9a68af9d7156c8d84a6f29c331 Author: Dmitry Baryshkov Date: Fri Dec 8 04:03:13 2023 +0300 drm/atomic-helper: rename drm_atomic_helper_check_wb_encoder_state The drm_atomic_helper_check_wb_encoder_state() function doesn't use encoder for anything other than getting the drm_device instance. The function's description talks about checking the writeback connector state, not the encoder state. Moreover, there is no such thing as an encoder state, encoders generally do not have a state on their own. Rename the function to drm_atomic_helper_check_wb_connector_state() and change arguments to drm_writeback_connector and drm_atomic_state. Signed-off-by: Dmitry Baryshkov Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231208010314.3395904-2-dmitry.baryshkov@linaro.org commit e55a9482888da73eeadde5f13ef8bafce68a38ed Author: Sakari Ailus Date: Wed Dec 6 19:25:07 2023 +0200 media: ov9640: Don't set format in sub-device state For the purpose of setting old non-pad based sub-device try format as a basis for VIDIOC_TRY_FMT implementation, there is no need to set the format in the sub-device state. Drop the assignment to the state, which would result in a NULL pointer dereference. Fixes: fd17e3a9a788 ("media: i2c: Use accessors for pad config 'try_*' fields") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 843750fb85fda6111c78e5c40e5ca5bc7dde6d10 Author: Sakari Ailus Date: Wed Dec 6 19:24:11 2023 +0200 media: tw9910: Don't set format in sub-device state For the purpose of setting old non-pad based sub-device try format as a basis for VIDIOC_TRY_FMT implementation, there is no need to set the format in the sub-device state. Drop the assignment to the state, which would result in a NULL pointer dereference. Fixes: fd17e3a9a788 ("media: i2c: Use accessors for pad config 'try_*' fields") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 09aee3995f9eea712b7b372421ce85b79d5c2adb Author: Sakari Ailus Date: Wed Dec 6 19:22:43 2023 +0200 media: rj54n1cb0c: Don't set format in sub-device state For the purpose of setting old non-pad based sub-device try format as a basis for VIDIOC_TRY_FMT implementation, there is no need to set the format in the sub-device state. Drop the assignment to the state, which would result in a NULL pointer dereference. Fixes: fd17e3a9a788 ("media: i2c: Use accessors for pad config 'try_*' fields") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 72c8cb48a4cc05e8132725250b801326966c5c93 Author: Sakari Ailus Date: Wed Dec 6 19:22:03 2023 +0200 media: mt9t112: Don't set format in sub-device state For the purpose of setting old non-pad based sub-device try format as a basis for VIDIOC_TRY_FMT implementation, there is no need to set the format in the sub-device state. Drop the assignment to the state, which would result in a NULL pointer dereference. Fixes: fd17e3a9a788 ("media: i2c: Use accessors for pad config 'try_*' fields") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit dff1eebf2be36278d2669504ad9249f1d7505bc0 Author: Sakari Ailus Date: Wed Dec 6 19:20:19 2023 +0200 media: adv7183: Don't set format in sub-device state For the purpose of setting old non-pad based sub-device try format as a basis for VIDIOC_TRY_FMT implementation, there is no need to set the format in the sub-device state. Drop the assignment to the state, which would result in a NULL pointer dereference. Fixes: fd17e3a9a788 ("media: i2c: Use accessors for pad config 'try_*' fields") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit c692696fc51c5acee555b94d391d328510b557c8 Author: Sakari Ailus Date: Wed Dec 6 13:35:33 2023 +0200 media: saa6752hs: Don't set format in sub-device state For the purpose of setting old non-pad based sub-device try format as a basis for VIDIOC_TRY_FMT implementation, there is no need to set the format in the sub-device state. Drop the assignment to the state, which would result in a NULL pointer dereference. Fixes: fd17e3a9a788 ("media: i2c: Use accessors for pad config 'try_*' fields") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 91478b772fb525da8a6541231e6e0eb016f941c3 Author: Sakari Ailus Date: Wed Dec 6 12:12:13 2023 +0200 media: ccs: Select V4L2_CCI_I2C Select V4L2_CCI_I2C Kconfig option which the CCS driver now depends on. Fixes: 529322112a3b ("media: ccs: Use V4L2 CCI for accessing sensor registers") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312060941.CYiHppAp-lkp@intel.com/ Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d22f93c6a0df15b9d1f500ab57d97ecc99b3657a Author: Bartosz Golaszewski Date: Mon Dec 4 09:57:19 2023 +0100 gpio: sim: implement the dbg_show() callback Provide a custom implementation of the dbg_show() callback that prints all requested lines together with their label, direction, value and bias. This improves the code coverage of GPIOLIB. Signed-off-by: Bartosz Golaszewski commit 11a94a335a582ae2b464e233a3171475716f113c Merge: c598dc3bc41ed f8d05e276b45e Author: Bartosz Golaszewski Date: Fri Dec 8 09:37:12 2023 +0100 Merge tag 'gpio-remove-gpiochip_is_requested-for-v6.8-rc1' into gpio/for-next gpio: remove gpiochip_is_requested() - provide a safer alternative to gpiochip_is_requested() - convert all existing users - remove gpiochip_is_requested() commit 2159bd4e905704b1765b6b883ea15e51ad986a6a Author: Yuntao Wang Date: Thu Dec 7 21:10:01 2023 +0800 memblock: Return NUMA_NO_NODE instead of -1 to improve code readability When no corresponding memory region is found for the given pfn, return NUMA_NO_NODE instead of -1. This improves code readability and aligns with the existing logic of the memblock_search_pfn_nid() function's user. Signed-off-by: Yuntao Wang Link: https://lore.kernel.org/r/20231207131001.224914-1-ytcoode@gmail.com Signed-off-by: Mike Rapoport (IBM) commit f8d05e276b45e3097dfddd628fa991ce69c05c99 Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:09 2023 +0100 gpiolib: remove gpiochip_is_requested() We have no external users of gpiochip_is_requested(). Let's remove it and replace its internal calls with direct testing of the REQUESTED flag. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij commit 6fd9c9933475a3efd7eed2f80c7778908a560a1f Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:08 2023 +0100 gpiolib: use gpiochip_dup_line_label() in for_each helpers Rework for_each_requested_gpio_in_range() to use the new helper to retrieve a dynamically allocated copy of the descriptor label and free it at the end of each iteration. We need to leverage the CLASS()' destructor to make sure that the label is freed even when breaking out of the loop. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij commit 069ced2206d23e56b89ed118e17a8a71a05e0ca3 Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:07 2023 +0100 pinctrl: sppctl: use gpiochip_dup_line_label() Use the new gpiochip_dup_line_label() helper to safely retrieve the descriptor label. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij commit c73505c8a001f8ce63b8ad92c9cd0176fe3c22a4 Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:06 2023 +0100 pinctrl: baytrail: use gpiochip_dup_line_label() Use the new gpiochip_dup_line_label() helper to safely retrieve the descriptor label. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij commit caf7e135c297e6fceec0a1476da775aa458b5324 Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:05 2023 +0100 pinctrl: nomadik: use gpiochip_dup_line_label() Use the new gpiochip_dup_line_label() helper to safely retrieve the descriptor label. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij commit c76ba937f5ff9b4ee670adbd421be2404745be1f Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:04 2023 +0100 pinctrl: abx500: use gpiochip_dup_line_label() Use the new gpiochip_dup_line_label() helper to safely retrieve the descriptor label. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij commit f1b33ce48ae77a04021ea0a5dab09f67315cad44 Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:03 2023 +0100 gpio: stmpe: use gpiochip_dup_line_label() Use the new gpiochip_dup_line_label() helper to safely retrieve the descriptor label. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij commit abeec1ad51da0aa7cd33005f537e54c2422d1218 Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:02 2023 +0100 gpio: wm8994: use gpiochip_dup_line_label() Use the new gpiochip_dup_line_label() helper to safely retrieve the descriptor label. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij commit 1610cd5f7468d4d8b54a96b82109c6ae66ee24eb Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:01 2023 +0100 gpio: wm831x: use gpiochip_dup_line_label() Use the new gpiochip_dup_line_label() helper to safely retrieve the descriptor label. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij commit ee25fba76acd8324f9de6628872c8c612a684209 Author: Bartosz Golaszewski Date: Mon Dec 4 10:35:00 2023 +0100 gpiolib: provide gpiochip_dup_line_label() gpiochip_is_requested() not only has a misleading name but it returns a pointer to a string that is freed when the descriptor is released. Provide a new helper meant to replace it, which returns a copy of the label string instead. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij commit efc19c44aa442197ddcbb157c6ca54a56eba8c4e Author: Rob Herring Date: Thu Dec 7 10:33:18 2023 -0600 w1: amd_axi_w1: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231207163318.2727816-1-robh@kernel.org Signed-off-by: Krzysztof Kozlowski commit a60501d7c2d3e70b3545b9b96576628e369d8e85 Merge: 2f8d8548c3e3f 90d50b8d85834 Author: Dave Airlie Date: Fri Dec 8 16:26:20 2023 +1000 Merge tag 'drm-misc-next-2023-12-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.8: UAPI Changes: - Remove Userspace Mode-Setting ioctls - v3d: New uapi to handle jobs involving the CPU Cross-subsystem Changes: Core Changes: - atomic: Add support for FB-less planes which got reverted a bit later for lack of IGT tests and userspace code, Dump private objects state in drm_state_dump. - dma-buf: Add fence deadline support - encoder: Create per-encoder debugfs directory, move the bridge chain file to that directory Driver Changes: - Include drm_auth.h in driver that use it but don't include it, Drop drm_plane_helper.h from drivers that include it but don't use it - imagination: Plenty of small fixes - panfrost: Improve interrupt handling at poweroff - qaic: Convert to persistent DRM devices - tidss: Support for the AM62A7, a few probe improvements, some cleanups - v3d: Support for jobs involving the CPU - bridge: - Create transparent aux-bridge for DP/USB-C - lt8912b: Add suspend/resume support and power regulator support - panel: - himax-hx8394: Drop prepare, unprepare and shutdown logic, Support panel rotation - New panels: BOE BP101WX1-100, Powkiddy X55, Ampire AM8001280G, Evervision VGG644804, SDC ATNA45AF01 Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/yu5heqaufyeo4nlowzieu4s5unwqrqyx4jixbfjmzdon677rpk@t53vceua2dao commit 94fa073377db02ef0ca391f32e11e0f4649b2657 Author: Johan Hovold Date: Thu Nov 30 18:56:35 2023 +0100 arm64: dts: hisilicon: hikey970-pmic: clean up SPMI node Clean up the SPMI node by dropping the redundant status property and moving the 'reg' property after 'compatible' for consistency. Signed-off-by: Johan Hovold Signed-off-by: Wei Xu commit 44ab3ee76a5a977864ba0bb6c352dcf6206804e0 Author: Johan Hovold Date: Thu Nov 30 18:56:34 2023 +0100 arm64: dts: hisilicon: hikey970-pmic: fix regulator cells properties The Hi6421 PMIC regulator child nodes do not have unit addresses so drop the incorrect '#address-cells' and '#size-cells' properties. Fixes: 6219b20e1ecd ("arm64: dts: hisilicon: Add support for Hikey 970 PMIC") Signed-off-by: Johan Hovold Signed-off-by: Wei Xu commit e6fe33c66d69385a67b1b03f93641aa264fbb75a Author: Rob Herring Date: Wed Nov 22 16:50:58 2023 -0700 dt-bindings: hisilicon: Merge hi3620-clock into hisilicon,sysctrl binding The hi3620-clock binding is simple and always a child of the "hisilicon,sysctrl" node, so just add it into the hisilicon,sysctrl binding and drop the old txt binding. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Wei Xu commit 2f8d8548c3e3f420e478b064a53bdaa4953749de Merge: 5edfd7d94b031 10690b8a49bce Author: Dave Airlie Date: Fri Dec 8 15:06:04 2023 +1000 Merge tag 'drm-intel-next-2023-12-07' of git://anongit.freedesktop.org/drm/drm-intel into drm-next - Improve display debug msgs and other general clean-ups (Ville, Rahuul) - PSR fixes and improvements around selective fetch (Jouni, Ville) - Remove FBC restrictions for Xe2LPD displays (Vinod) - Skip some timing checks on BXT/GLK DSI transcoders (Ville) - DP MST Fixes (Ville) - Correct the input parameter on _intel_dsb_commit (heminhong) - Fix IP version of the display WAs (Bala) - DGFX uses direct VBT pin mapping (Clint) - Proper handling of bool on PIPE_CONF_CHECK macros (Jani) - Skip state verification with TBT-ALT mod (Mika Kahona) - General organization of display code for reusage with Xe (Jouni, Luca, Jani, Maarten) - Squelch a sparse warning (Jani) - Don't use "proxy" headers (Andy Shevchenko) - Use devm_gpiod_get() for all GPIOs (Hans) - Fix ADL+ tiled plane stride (Ville) - Use octal permissions in display debugfs (Jani) Signed-off-by: Dave Airlie From: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/ZXIWG6bRYaUw0w6-@intel.com commit bd50b1f5b6f38b2970841e78513c33fbd736cf40 Author: Abel Vesa Date: Tue Dec 5 11:54:02 2023 +0530 arm64: dts: qcom: x1e80100: Add Compute Reference Device Add basic support for X1E80100 CRD board dts, which allows it to boot to a shell. Signed-off-by: Abel Vesa Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231205062403.14848-5-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit af16b00578a7a1d9fb99e81282b1b22cd8d32607 Author: Rajendra Nayak Date: Tue Dec 5 11:54:01 2023 +0530 arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts Add base dtsi and QCP board (Qualcomm Compute Platform) dts file for X1E80100 SoC, describing the CPUs, GCC and RPMHCC clock controllers, geni UART, interrupt controller, TLMM, reserved memory, interconnects, SMMU and LLCC nodes. Co-developed-by: Abel Vesa Signed-off-by: Abel Vesa Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231205062403.14848-4-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 7a85cecf98ca175d11b7133f7c4e88bbcc0fe5d3 Author: Rajendra Nayak Date: Tue Dec 5 11:54:00 2023 +0530 dt-bindings: arm: qcom: Document X1E80100 SoC and boards Document the X1E80100 SoC binding and also the boards using it. Also document the new board id qcp (Qualcomm Compute Platform). Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231205062403.14848-3-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit bfea2924fc28b1b9985a208223f315992a68fc56 Author: Rajendra Nayak Date: Tue Dec 5 11:53:59 2023 +0530 dt-bindings: arm: cpus: Add qcom,oryon compatible Oryon is the custom ARM CPU core implementation used in Qualcomm's X1E80100 SoC, document it. Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20231205062403.14848-2-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 779266b127c83334cad14e1c7cbb17acad87ae9f Merge: d64254b46a179 dc84a76f054c0 Author: Bjorn Andersson Date: Thu Dec 7 20:24:09 2023 -0800 Merge branch 'icc-x1e80100' of https://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into arm64-for-6.8 Merge the X1E80100 interconnect binding to get access to the interconnect port constants. commit d64254b46a1791358021103daa5ecde1b559d9d8 Merge: 80627a5d72b6b 4c413512ed2d0 Author: Bjorn Andersson Date: Thu Dec 7 20:22:50 2023 -0800 Merge branch '20231205061002.30759-4-quic_sibis@quicinc.com' into arm64-for-6.8 Merge the X1E80100 clock bindings to get access to the clock constants. commit 874bc7be1e08bca7d47cfa2dba57164f73a30219 Author: Rajendra Nayak Date: Tue Dec 5 11:40:02 2023 +0530 clk: qcom: rpmh: Add support for X1E80100 rpmh clocks Adds the RPMH clocks present in X1E80100 SoC Co-developed-by: Neil Armstrong Signed-off-by: Neil Armstrong Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231205061002.30759-5-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 161b7c401f4bd3e9ebd351f482139d8736be990c Author: Rajendra Nayak Date: Tue Dec 5 11:40:00 2023 +0530 clk: qcom: Add Global Clock controller (GCC) driver for X1E80100 Add support for the global clock controller found on X1E80100 based devices. Co-developed-by: Abel Vesa Signed-off-by: Abel Vesa Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20231205061002.30759-3-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 12c4ffcd3b87c8b41360e1ab0cf4e87cc1a7f370 Merge: e146252ac1605 4c413512ed2d0 Author: Bjorn Andersson Date: Thu Dec 7 20:19:15 2023 -0800 Merge branch '20231205061002.30759-4-quic_sibis@quicinc.com' into clk-for-6.8 Merge the X1E80100 DeviceTree bindings through a topic branch, to allow the clock constants to be shared with the DeviceTree branch. commit 4c413512ed2d06077e93127e81780c25113d4269 Author: Rajendra Nayak Date: Tue Dec 5 11:40:01 2023 +0530 dt-bindings: clock: qcom-rpmhcc: Add RPMHCC bindings for X1E80100 Add bindings and update documentation for clock rpmh driver on X1E80100 SoCs. Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231205061002.30759-4-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 4dc7e7d2eead9abc10e2327d40ff6ca0d24cd83a Author: Rajendra Nayak Date: Tue Dec 5 11:39:59 2023 +0530 dt-bindings: clock: qcom: Add X1E80100 GCC clocks Add device tree bindings for global clock controller on X1E80100 SoCs. Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231205061002.30759-2-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit 99bd99d3e3a7f73c1c01ef510d48730b3bdd2c4a Author: Herbert Xu Date: Wed Nov 29 12:27:04 2023 +0800 crypto: algif_skcipher - Fix stream cipher chaining Unlike algif_aead which is always issued in one go (thus limiting the maximum size of the request), algif_skcipher has always allowed unlimited input data by cutting them up as necessary and feeding the fragments to the underlying algorithm one at a time. However, because of deficiencies in the API, this has been broken for most stream ciphers such as arc4 or chacha. This is because they have an internal state in addition to the IV that must be preserved in order to continue processing. Fix this by using the new skcipher state API. Signed-off-by: Herbert Xu commit 47309ea1359115125d9cab17a279c8df72b47235 Author: Herbert Xu Date: Tue Nov 28 14:52:57 2023 +0800 crypto: arc4 - Add internal state The arc4 algorithm has always had internal state. It's been buggy from day one in that the state has been stored in the shared tfm object. That means two users sharing the same tfm will end up affecting each other's output, or worse, they may end up with the same output. Fix this by declaring an internal state and storing the state there instead of within the tfm context. Signed-off-by: Herbert Xu commit 662ea18d089ba6fa02859fbd64f2aa78d88c6648 Author: Herbert Xu Date: Tue Nov 28 14:33:19 2023 +0800 crypto: skcipher - Make use of internal state This patch adds code to the skcipher/lskcipher API to make use of the internal state if present. In particular, the skcipher lskcipher wrapper will allocate a buffer for the IV/state and feed that to the underlying lskcipher algorithm. Signed-off-by: Herbert Xu commit 0ae4dcc1ebf63118364d540b84c70352e8b2b2a4 Author: Herbert Xu Date: Mon Nov 27 18:14:08 2023 +0800 crypto: skcipher - Add internal state support Unlike chaining modes such as CBC, stream ciphers other than CTR usually hold an internal state that must be preserved if the operation is to be done piecemeal. This has not been represented in the API, resulting in the inability to split up stream cipher operations. This patch adds the basic representation of an internal state to skcipher and lskcipher. In the interest of backwards compatibility, the default has been set such that existing users are assumed to be operating in one go as opposed to piecemeal. With the new API, each lskcipher/skcipher algorithm has a new attribute called statesize. For skcipher, this is the size of the buffer that can be exported or imported similar to ahash. For lskcipher, instead of providing a buffer of ivsize, the user now has to provide a buffer of ivsize + statesize. Each skcipher operation is assumed to be final as they are now, but this may be overridden with a request flag. When the override occurs, the user may then export the partial state and reimport it later. For lskcipher operations this is reversed. All operations are not final and the state will be exported unless the FINAL bit is set. However, the CONT bit still has to be set for the state to be used. Signed-off-by: Herbert Xu commit 412ac51ce0b8c5581b6ff57fff6501e905a5471f Author: Herbert Xu Date: Thu Nov 30 20:25:02 2023 +0800 crypto: cfb,ofb - Remove cfb and ofb Remove the unused algorithms CFB/OFB. Signed-off-by: Herbert Xu commit d4bd2102472c4071d0df4a948316f73390228faf Author: Herbert Xu Date: Thu Nov 30 20:23:06 2023 +0800 crypto: testmgr - Remove cfb and ofb Remove test vectors for CFB/OFB. Signed-off-by: Herbert Xu commit 1c95b5469ee313dba6fe1e0d7197b0a6544b8ed0 Author: Herbert Xu Date: Thu Nov 30 18:56:59 2023 +0800 crypto: tcrypt - Remove cfb and ofb Remove tests for CFB/OFB. Signed-off-by: Herbert Xu commit 92650f930073a0d98c8479b0b4341a613223ec10 Author: Herbert Xu Date: Thu Nov 30 18:59:47 2023 +0800 crypto: ccree - Remove ofb Remove the unused OFB implementation. Signed-off-by: Herbert Xu commit fef39f99d571554ddd2f349231cc56c23f5fe0c6 Author: Herbert Xu Date: Thu Nov 30 18:58:48 2023 +0800 crypto: bcm - Remove ofb Remove the unused OFB implementation. Signed-off-by: Herbert Xu commit 015b8e121082671f14cf2912df9afbfd139575b4 Author: Herbert Xu Date: Thu Nov 30 18:12:55 2023 +0800 crypto: starfive - Remove cfb and ofb Remove the unused CFB/OFB implementation. Signed-off-by: Herbert Xu commit 66c465c6e7b1867b8bae1194ecfb05556ac7aa07 Author: Herbert Xu Date: Thu Nov 30 18:11:51 2023 +0800 crypto: n2 - Remove cfb Remove the unused CFB implementation. Signed-off-by: Herbert Xu commit 63340c481b859154ad4486f68c9d1b01ace5650e Author: Herbert Xu Date: Thu Nov 30 18:11:07 2023 +0800 crypto: octeontx - Remove cfb Remove the unused CFB implementation. Signed-off-by: Herbert Xu commit dfe6c5d16b31bef466e49ed06092ecfe6681c036 Author: Herbert Xu Date: Thu Nov 30 18:10:21 2023 +0800 crypto: safexcel - Remove cfb and ofb Remove the unused CFB/OFB implementation. Signed-off-by: Herbert Xu commit 1c90a1b43bc34eaf9c8913238f408a1317eab43f Author: Herbert Xu Date: Thu Nov 30 18:09:24 2023 +0800 crypto: hisilicon/sec2 - Remove cfb and ofb Remove the unused CFB/OFB implementation. Signed-off-by: Herbert Xu commit 572ef735049c10d8d27185438ecff33a265a1481 Author: Herbert Xu Date: Thu Nov 30 18:08:18 2023 +0800 crypto: hifn_795x - Remove cfb and ofb Remove the unused CFB/OFB implementation. Signed-off-by: Herbert Xu commit e54f2a5ee8fca19c107f6688c2e1738aeb1d86d9 Author: Herbert Xu Date: Thu Nov 30 18:07:04 2023 +0800 crypto: ccp - Remove cfb and ofb Remove the unused CFB/OFB implementation. Signed-off-by: Herbert Xu commit f5a019f5b094fc4cedda413571ece59931932a02 Author: Herbert Xu Date: Thu Nov 30 18:06:34 2023 +0800 crypto: nitrox - Remove cfb Remove the unused CFB implementation. Signed-off-by: Herbert Xu commit 769a043bf176c6cc66f8762a08cc81c93fa1b789 Author: Herbert Xu Date: Thu Nov 30 17:59:35 2023 +0800 crypto: cpt - Remove cfb Remove the unused CFB implementation. Signed-off-by: Herbert Xu commit a16144bda9c332079b6a1db52725e9c22007114d Author: Herbert Xu Date: Sat Sep 16 17:33:56 2023 +0800 crypto: atmel - Remove cfb and ofb Remove the unused CFB/OFB implementation. Signed-off-by: Herbert Xu commit 00b05e51222337d1c3b08130f320e1a43af8f73b Author: Herbert Xu Date: Sat Sep 16 17:23:23 2023 +0800 crypto: aspeed - Remove cfb and ofb Remove the unused CFB/OFB implementation. Signed-off-by: Herbert Xu commit a9cdf13e9ba940ad5498967d60d09c6c1f020b64 Author: Herbert Xu Date: Sat Sep 16 17:21:14 2023 +0800 crypto: crypto4xx - Remove cfb and ofb Remove the unused CFB/OFB implementation. Signed-off-by: Herbert Xu commit 05bd1e2a78a453910104b0fe4aa771d08cbeccf1 Author: Herbert Xu Date: Sat Sep 16 17:16:52 2023 +0800 crypto: x86/sm4 - Remove cfb(sm4) Remove the unused CFB implementation. Signed-off-by: Herbert Xu commit 29fa12e918e5f7fe9947aab2f325a4b54f4c5d99 Author: Herbert Xu Date: Sat Sep 16 17:13:23 2023 +0800 crypto: arm64/sm4 - Remove cfb(sm4) Remove the unused CFB implementation. Signed-off-by: Herbert Xu commit d07f951903fa9922c375b8ab1ce81b18a0034e3b Author: Herbert Xu Date: Tue Nov 28 14:22:13 2023 +0800 crypto: s390/aes - Fix buffer overread in CTR mode When processing the last block, the s390 ctr code will always read a whole block, even if there isn't a whole block of data left. Fix this by using the actual length left and copy it into a buffer first for processing. Fixes: 0200f3ecc196 ("crypto: s390 - add System z hardware support for CTR mode") Cc: Reported-by: Guangwu Zhang Signed-off-by: Herbert Xu Reviewd-by: Harald Freudenberger Signed-off-by: Herbert Xu commit 2ff0ad847951d61c2d8b309e1ccefb26c57dcc7b Author: Zhiqi Song Date: Sat Dec 2 17:17:22 2023 +0800 crypto: hisilicon/zip - save capability registers in probe process Pre-store the valid value of the zip alg support related capability register in hisi_zip_qm_init(), which will be called by hisi_zip_probe(). It can reduce the number of capability register queries and avoid obtaining incorrect values in abnormal scenarios, such as reset failed and the memory space disabled. Fixes: db700974b69d ("crypto: hisilicon/zip - support zip capability") Signed-off-by: Zhiqi Song Signed-off-by: Herbert Xu commit f1115b0096c3163592e04e74f5a7548c25bda957 Author: Zhiqi Song Date: Sat Dec 2 17:17:21 2023 +0800 crypto: hisilicon/sec2 - save capability registers in probe process Pre-store the valid value of the sec alg support related capability register in sec_qm_init(), which will be called by probe process. It can reduce the number of capability register queries and avoid obtaining incorrect values in abnormal scenarios, such as reset failed and the memory space disabled. Fixes: 921715b6b782 ("crypto: hisilicon/sec - get algorithm bitmap from registers") Signed-off-by: Zhiqi Song Signed-off-by: Herbert Xu commit cf8b5156bbc8c9376f699e8d35e9464b739e33ff Author: Zhiqi Song Date: Sat Dec 2 17:17:20 2023 +0800 crypto: hisilicon/hpre - save capability registers in probe process Pre-store the valid value of hpre alg support related capability register in hpre_qm_init(), which will be called by hpre_probe(). It can reduce the number of capability register queries and avoid obtaining incorrect values in abnormal scenarios, such as reset failed and the memory space disabled. Fixes: f214d59a0603 ("crypto: hisilicon/hpre - support hpre capability") Signed-off-by: Zhiqi Song Signed-off-by: Herbert Xu commit cabe13d0bd2efb8dd50ed2310f57b33e1a69a0d4 Author: Zhiqi Song Date: Sat Dec 2 17:17:19 2023 +0800 crypto: hisilicon/qm - save capability registers in qm init process In previous capability register implementation, qm irq related values were read from capability registers dynamically when needed. But in abnormal scenario, e.g. the core is timeout and the device needs to soft reset and reset failed after disabling the MSE, the device can not be removed normally, causing the following call trace: | Call trace: | pci_irq_vector+0xfc/0x140 | hisi_qm_uninit+0x278/0x3b0 [hisi_qm] | hpre_remove+0x16c/0x1c0 [hisi_hpre] | pci_device_remove+0x6c/0x264 | device_release_driver_internal+0x1ec/0x3e0 | device_release_driver+0x3c/0x60 | pci_stop_bus_device+0xfc/0x22c | pci_stop_and_remove_bus_device+0x38/0x70 | pci_iov_remove_virtfn+0x108/0x1c0 | sriov_disable+0x7c/0x1e4 | pci_disable_sriov+0x4c/0x6c | hisi_qm_sriov_disable+0x90/0x160 [hisi_qm] | hpre_remove+0x1a8/0x1c0 [hisi_hpre] | pci_device_remove+0x6c/0x264 | device_release_driver_internal+0x1ec/0x3e0 | driver_detach+0x168/0x2d0 | bus_remove_driver+0xc0/0x230 | driver_unregister+0x58/0xdc | pci_unregister_driver+0x40/0x220 | hpre_exit+0x34/0x64 [hisi_hpre] | __arm64_sys_delete_module+0x374/0x620 [...] | Call trace: | free_msi_irqs+0x25c/0x300 | pci_disable_msi+0x19c/0x264 | pci_free_irq_vectors+0x4c/0x70 | hisi_qm_pci_uninit+0x44/0x90 [hisi_qm] | hisi_qm_uninit+0x28c/0x3b0 [hisi_qm] | hpre_remove+0x16c/0x1c0 [hisi_hpre] | pci_device_remove+0x6c/0x264 [...] The reason for this call trace is that when the MSE is disabled, the value of capability registers in the BAR space become invalid. This will make the subsequent unregister process get the wrong irq vector through capability registers and get the wrong irq number by pci_irq_vector(). So add a capability table structure to pre-store the valid value of the irq information capability register in qm init process, avoid obtaining invalid capability register value after the MSE is disabled. Fixes: 3536cc55cada ("crypto: hisilicon/qm - support get device irq information from hardware registers") Signed-off-by: Zhiqi Song Signed-off-by: Herbert Xu commit f76f0d7f20672611974d3cc705996751fc403734 Author: Wenkai Lin Date: Sat Dec 2 17:17:18 2023 +0800 crypto: hisilicon/qm - add a function to set qm algs Extract a public function to set qm algs and remove the similar code for setting qm algs in each module. Signed-off-by: Wenkai Lin Signed-off-by: Hao Fang Signed-off-by: Zhiqi Song Signed-off-by: Herbert Xu commit 78aafb3884f6bc6636efcc1760c891c8500b9922 Author: Herbert Xu Date: Sat Dec 2 09:01:54 2023 +0800 hwrng: core - Fix page fault dead lock on mmap-ed hwrng There is a dead-lock in the hwrng device read path. This triggers when the user reads from /dev/hwrng into memory also mmap-ed from /dev/hwrng. The resulting page fault triggers a recursive read which then dead-locks. Fix this by using a stack buffer when calling copy_to_user. Reported-by: Edward Adam Davis Reported-by: syzbot+c52ab18308964d248092@syzkaller.appspotmail.com Fixes: 9996508b3353 ("hwrng: core - Replace u32 in driver API with byte array") Cc: Signed-off-by: Herbert Xu commit 01d70a4bbff20ea05cadb4c208841985a7cc6596 Author: Ovidiu Panait Date: Fri Dec 1 19:06:25 2023 +0200 crypto: sahara - avoid skcipher fallback code duplication Factor out duplicated skcipher fallback handling code to a helper function sahara_aes_fallback(). Also, keep a single check if fallback is required in sahara_aes_crypt(). Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 3d5a31dff18b3bda92dc1f95d76b1289391b5d1b Author: Ovidiu Panait Date: Fri Dec 1 19:06:24 2023 +0200 crypto: sahara - remove unused error field in sahara_dev The "error" field in sahara_dev struct hasn't been needed/used since commit c0c3c89ae347 ("crypto: sahara - replace tasklets with kthread"), so remove the remaining references. Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit ee6e6f0a7f5b39d50a5ef5fcc006f4f693db18a7 Author: Ovidiu Panait Date: Fri Dec 1 19:06:23 2023 +0200 crypto: sahara - fix error handling in sahara_hw_descriptor_create() Do not call dma_unmap_sg() for scatterlists that were not mapped successfully. Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 5b8668ce3452827d27f8c34ff6ba080a8f983ed0 Author: Ovidiu Panait Date: Fri Dec 1 19:06:22 2023 +0200 crypto: sahara - fix processing requests with cryptlen < sg->length It's not always the case that the entire sg entry needs to be processed. Currently, when cryptlen is less than sg->legth, "Descriptor length" errors are encountered. The error was noticed when testing xts(sahara-ecb-aes) with arbitrary sized input data. To fix this, take the actual request size into account when populating the hw links. Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit afffcf3db98b9495114b79d5381f8cc3f69476fb Author: Ovidiu Panait Date: Fri Dec 1 19:06:21 2023 +0200 crypto: sahara - fix ahash selftest failure update() calls should not modify the result buffer, so add an additional check for "rctx->last" to make sure that only the final hash value is copied into the buffer. Fixes the following selftest failure: alg: ahash: sahara-sha256 update() used result buffer on test vector 3, cfg="init+update+final aligned buffer" Fixes: 5a2bb93f5992 ("crypto: sahara - add support for SHA1/256") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 9f10bc28c0fb676ae58aa3bfa358db8f5de124bb Author: Ovidiu Panait Date: Fri Dec 1 19:06:20 2023 +0200 crypto: sahara - fix cbc selftest failure The kernel crypto API requires that all CBC implementations update the IV buffer to contain the last ciphertext block. This fixes the following cbc selftest error: alg: skcipher: sahara-cbc-aes encryption test failed (wrong output IV) on test vector 0, cfg="in-place (one sglist)" Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 8fd183435728b139248a77978ea3732039341779 Author: Ovidiu Panait Date: Fri Dec 1 19:06:19 2023 +0200 crypto: sahara - remove FLAGS_NEW_KEY logic Remove the FLAGS_NEW_KEY logic as it has the following issues: - the wrong key may end up being used when there are multiple data streams: t1 t2 setkey() encrypt() setkey() encrypt() encrypt() <--- key from t2 is used - switching between encryption and decryption with the same key is not possible, as the hdr flags are only updated when a new setkey() is performed With this change, the key is always sent along with the cryptdata when performing encryption/decryption operations. Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.") Signed-off-by: Ovidiu Panait Signed-off-by: Herbert Xu commit 87e02063d07708cac5bfe9fd3a6a242898758ac8 Author: Nikita Zhandarovich Date: Fri Dec 1 04:49:29 2023 -0800 crypto: safexcel - Add error handling for dma_map_sg() calls Macro dma_map_sg() may return 0 on error. This patch enables checks in case of the macro failure and ensures unmapping of previously mapped buffers with dma_unmap_sg(). Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 49186a7d9e46 ("crypto: inside_secure - Avoid dma map if size is zero") Signed-off-by: Nikita Zhandarovich Reviewed-by: Antoine Tenart Signed-off-by: Herbert Xu commit 429fec81d12266e6402868672de8c68bf4d8db13 Author: Yang Yingliang Date: Fri Dec 1 16:20:48 2023 +0800 hwrng: stm32 - add missing clk_disable_unprepare() in stm32_rng_init() Add clk_disable_unprepare() in the error path in stm32_rng_init(). Fixes: 6b85a7e141cb ("hwrng: stm32 - implement STM32MP13x support") Signed-off-by: Yang Yingliang Reviewed-by: Gatien Chevallier Signed-off-by: Herbert Xu commit 040791041b68fbc06511834b225c5974daa5088b Author: Bharat Bhushan Date: Wed Nov 29 21:11:33 2023 +0530 crypto: octeontx2 - By default allocate one CPT LF per CPT VF There are limited number CPT LFs (example 64 LFs on cn10k) and these LFs are allocated/attached to CPT VF on its creation. cptpf sysfs parameter "kvf_limits" defines number of CPT LFs per CPT VF. Default "kvf_limits" is initialized to zero and if kvf_limits is zero then number of LF allocated are equal to online cpus in system. For example on 24 core system, 24 CPT LFs will be attached per VF. That means no CPT LF available when creating more than 2 CPT VFs on system which have total 64 LFs. Although VFs gets created but no LF attached to it. There seems no reason to default allocate as many LFs as many online cpus in system. This patch initializes "kvf_limits" to one to limit one LF allocated per CPT VF. "kvf_limits" can be changed in range of 1 to number-of-online-cpus via sysfs. Signed-off-by: Bharat Bhushan Signed-off-by: Herbert Xu commit a643212c9f28d09225c3792c316bc4aaf6be4a68 Author: Giovanni Cabiddu Date: Tue Nov 28 19:17:25 2023 +0000 crypto: qat - add NULL pointer check There is a possibility that the function adf_devmgr_pci_to_accel_dev() might return a NULL pointer. Add a NULL pointer check in the function rp2srv_show(). Fixes: dbc8876dd873 ("crypto: qat - add rp2svc sysfs attribute") Signed-off-by: Giovanni Cabiddu Reviewed-by: Ahsan Atta Reviewed-by: David Guckian Signed-off-by: Herbert Xu commit 487caa8d5ef9a9a27b092c5790d529a7a0c24f8b Author: Damian Muszynski Date: Tue Nov 28 18:39:30 2023 +0100 crypto: qat - fix mutex ordering in adf_rl If the function validate_user_input() returns an error, the error path attempts to unlock an unacquired mutex. Acquire the mutex before calling validate_user_input(). This is not strictly necessary but simplifies the code. Fixes: d9fb8408376e ("crypto: qat - add rate limiting feature to qat_4xxx") Signed-off-by: Damian Muszynski Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 6627f03c21cb7001ae4dbbfb7a8514516d02331c Author: Damian Muszynski Date: Tue Nov 28 18:37:32 2023 +0100 crypto: qat - fix error path in add_update_sla() The input argument `sla_in` is a pointer to a structure that contains the parameters of the SLA which is being added or updated. If this pointer is NULL, the function should return an error as the data required for the algorithm is not available. By mistake, the logic jumps to the error path which dereferences the pointer. This results in a warnings reported by the static analyzer Smatch when executed without a database: drivers/crypto/intel/qat/qat_common/adf_rl.c:871 add_update_sla() error: we previously assumed 'sla_in' could be null (see line 812) This issue was not found in internal testing as the pointer cannot be NULL. The function add_update_sla() is only called (indirectly) by the rate limiting sysfs interface implementation in adf_sysfs_rl.c which ensures that the data structure is allocated and valid. This is also proven by the fact that Smatch executed with a database does not report such error. Fix it by returning with error if the pointer `sla_in` is NULL. Fixes: d9fb8408376e ("crypto: qat - add rate limiting feature to qat_4xxx") Reported-by: Dan Carpenter Signed-off-by: Damian Muszynski Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 67b164a871af1d736f131fd6fe78a610909f06f3 Author: Herbert Xu Date: Tue Nov 28 16:25:49 2023 +0800 crypto: af_alg - Disallow multiple in-flight AIO requests Having multiple in-flight AIO requests results in unpredictable output because they all share the same IV. Fix this by only allowing one request at a time. Fixes: 83094e5e9e49 ("crypto: af_alg - add async support to algif_aead") Fixes: a596999b7ddf ("crypto: algif - change algif_skcipher to be asynchronous") Signed-off-by: Herbert Xu commit 431a2eb89cf664a9cf94f519402896f10d074db0 Author: Longfang Liu Date: Mon Nov 27 19:24:49 2023 +0800 MAINTAINERS: update SEC2/HPRE driver maintainers list Kai Ye is no longer participates in the Linux community. Zhiqi Song will be responsible for the code maintenance of the HPRE module. Therefore, the maintainers list needs to be updated. Signed-off-by: Longfang Liu Reviewed-by: Zhiqi Song Signed-off-by: Herbert Xu commit a1c95dd5bc1d6a5d7a75a376c2107421b7d6240d Author: Dinghao Liu Date: Mon Nov 27 11:47:10 2023 +0800 crypto: ccp - fix memleak in ccp_init_dm_workarea When dma_map_single() fails, wa->address is supposed to be freed by the callers of ccp_init_dm_workarea() through ccp_dm_free(). However, many of the call spots don't expect to have to call ccp_dm_free() on failure of ccp_init_dm_workarea(), which may lead to a memleak. Let's free wa->address in ccp_init_dm_workarea() when dma_map_single() fails. Fixes: 63b945091a07 ("crypto: ccp - CCP device driver and interface support") Signed-off-by: Dinghao Liu Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit 80627a5d72b6be2652920db402fe2477f086902b Author: Krzysztof Kozlowski Date: Mon Dec 4 16:57:46 2023 +0100 arm64: dts: qcom: sm8650-mtp: add WSA8845 speakers Add nodes for WSA8845 speakers on SM8650 MTP board. Cc: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231204155746.302323-5-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 6a45a90c0c475bf6bf573c4ba89e0415506c868a Author: Krzysztof Kozlowski Date: Mon Dec 4 16:57:45 2023 +0100 arm64: dts: qcom: sm8650: add Soundwire controllers Add nodes for LPASS Soundwire v2.0.0 controllers. Use labels with indices matching downstream DTS, to make any comparisons easier. Cc: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231204155746.302323-4-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 58872a54e4a858d86301b4fb802fd60c45aad3e1 Author: Krzysztof Kozlowski Date: Mon Dec 4 16:57:44 2023 +0100 arm64: dts: qcom: sm8650: add ADSP audio codec macros Add the Low Power Audio SubSystem (LPASS) / ADSP audio codec macros on Qualcomm SM8650. The nodes are very similar to SM8550. Cc: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231204155746.302323-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 2d6bc13321c90217e1ffecf50a183f20c00ec3e3 Author: Krzysztof Kozlowski Date: Mon Dec 4 16:57:43 2023 +0100 arm64: dts: qcom: sm8650: add LPASS LPI pin controller Add the Low Power Audio SubSystem Low Power Island (LPASS LPI) pin controller device node as part of audio subsystem in Qualcomm SM8650 SoC. Cc: Neil Armstrong Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231204155746.302323-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit ff28260e3d9820a22d9bf826bdf219d6efa97260 Author: Krzysztof Kozlowski Date: Mon Dec 4 16:57:42 2023 +0100 arm64: dts: qcom: sm8650: add ADSP GPR Add the ADSP Generic Packet Router (GPR) device node as part of audio subsystem in Qualcomm SM8650 SoC. Cc: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231204155746.302323-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 83c054b913cf6accd4cb31cee51729b322bde7fb Author: Neil Armstrong Date: Fri Dec 1 14:50:42 2023 +0100 arm64: dts: qcom: sm8650-qrd: enable IPA Enable IPA on the SM8650 QRD. The GSI firmware on this platform is loaded by the AP. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231201-topic-sm8650-upstream-ipa-v1-2-7e8cf7200cd2@linaro.org Signed-off-by: Bjorn Andersson commit 9fdddbd134a68843364c3e8c57fbdc5da2a7083d Author: Neil Armstrong Date: Fri Dec 1 14:50:41 2023 +0100 arm64: dts: qcom: sm8650: add IPA information Add IPA-related nodes and definitions to SM8650 dtsi, which uses IPA v5.5.1 a minor revision of v5.5 found in the SM8550 SoC. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231201-topic-sm8650-upstream-ipa-v1-1-7e8cf7200cd2@linaro.org Signed-off-by: Bjorn Andersson commit 0c5b1016b5f30eb2313f942abef5bd7a7be12ae8 Author: Neil Armstrong Date: Thu Nov 30 11:20:03 2023 +0100 arm64: dts: qcom: sm8650-qrd: add interconnect dependent device nodes Now interconnect dependent devices are added in sm8650 DTSI, now enable more devices for the Qualcomm SM8650 QRD board: - PCIe - Display - DSPs - SDCard - UFS - USB role switch with PMIC Glink - Bluetooth Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231130-topic-sm8650-upstream-dt-v5-8-b25fb781da52@linaro.org Signed-off-by: Bjorn Andersson commit deb63527ab248301adc302e21d79c0aae5a827db Author: Neil Armstrong Date: Thu Nov 30 11:20:02 2023 +0100 arm64: dts: qcom: sm8650-mtp: add interconnect dependent device nodes Now interconnect dependent devices are added in sm8650 DTSI, now enable more devices for the Qualcomm SM8650 MTP board: - PCIe - Display - DSPs - SDCard - UFS - USB role switch with PMIC Glink Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231130-topic-sm8650-upstream-dt-v5-7-b25fb781da52@linaro.org Signed-off-by: Bjorn Andersson commit 10e024671295184fe7556fcb427444b57d2e0ed5 Author: Neil Armstrong Date: Thu Nov 30 11:20:01 2023 +0100 arm64: dts: qcom: sm8650: add interconnect dependent device nodes Add Hardware nodes that depends on an interconnect property to be valid. The includes: - all QUP i2s/spi nodes - PCIe - UFS - SDHCI - Display - HWMON Acked-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231130-topic-sm8650-upstream-dt-v5-6-b25fb781da52@linaro.org Signed-off-by: Bjorn Andersson commit a834911d50c1dda9c3022141e9f9c948e707a0ff Author: Neil Armstrong Date: Thu Nov 30 11:20:00 2023 +0100 arm64: dts: qcom: sm8650: add initial SM8650 QRD dts Add initial QRD (Qualcomm Reference Device) DT, it supports boot to shell with buttons, leds and USB peripheral. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231130-topic-sm8650-upstream-dt-v5-5-b25fb781da52@linaro.org Signed-off-by: Bjorn Andersson commit 6fbdb3c1fac7d48f996098254758736e0b47f6b2 Author: Neil Armstrong Date: Thu Nov 30 11:19:59 2023 +0100 arm64: dts: qcom: sm8650: add initial SM8650 MTP dts Add initial QRD (Qualcomm Reference Device) DT, only boots to shell with USB device support. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231130-topic-sm8650-upstream-dt-v5-4-b25fb781da52@linaro.org Signed-off-by: Bjorn Andersson commit 707060bf2a3cf3329b848e12a038de4d81356579 Author: Neil Armstrong Date: Thu Nov 30 11:19:58 2023 +0100 arm64: dts: qcom: pm8550ve: make PMK8550VE SID configurable The pm8550ve can be found with a different SID on SM8650 platforms, make it configurable. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231130-topic-sm8650-upstream-dt-v5-3-b25fb781da52@linaro.org Signed-off-by: Bjorn Andersson commit d2350377997f3606d5b76ee7dc6101c148048951 Author: Neil Armstrong Date: Thu Nov 30 11:19:57 2023 +0100 arm64: dts: qcom: add initial SM8650 dtsi Add initial DTSI for the Qualcomm SM8650 platform, only contains nodes which doesn't depend on interconnect. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231130-topic-sm8650-upstream-dt-v5-2-b25fb781da52@linaro.org Signed-off-by: Bjorn Andersson commit 78804eecbe5c4d533ae8b7c3a85b278e3594ec94 Author: Neil Armstrong Date: Thu Nov 30 11:19:56 2023 +0100 dt-bindings: arm: qcom: document SM8650 and the reference boards Document the SM8650 SoC and based MTP (Mobile Test Platforms) and QRD (Qualcomm Reference Device) boards. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231130-topic-sm8650-upstream-dt-v5-1-b25fb781da52@linaro.org Signed-off-by: Bjorn Andersson commit 5ceab14eb6efb4f30b7dbe0f218ea0be6e49bf79 Merge: 40d9c6ea64c60 80abebd9bf725 Author: Bjorn Andersson Date: Thu Dec 7 19:18:08 2023 -0800 Merge branch 'icc-sm8650' of https://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into arm64-for-6.8 Merge the SM8650 interconnect binding, to gain access to the interconnect port constants. commit 40d9c6ea64c609df9ec0f3e1ce2c1b7b25677bdd Merge: 264beb3cbd0dc 873f22440338d Author: Bjorn Andersson Date: Thu Dec 7 19:16:43 2023 -0800 Merge branch '20231106-topic-sm8650-upstream-clocks-v3-5-761a6fadb4c0@linaro.org' into arm64-for-6.8 Merge the SM8650 clock bindings, to gain access to the clock constants. commit 09b489478383d9f3a04dfe5da72ae1b79af3e5f8 Merge: 2483e7f04ce0e 2f076ea86674c Author: Jakub Kicinski Date: Thu Dec 7 18:35:43 2023 -0800 Merge branch 'nfp-add-ext_ack-messages-to-supported-callbacks' Louis Peens says: ==================== nfp: add ext_ack messages to supported callbacks This is a mostly cosmetic series to add error messages to devlink and ethtool callbacks which supports them but did not have them added in the nfp driver yet. ==================== Link: https://lore.kernel.org/r/20231206151209.20296-1-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit 2f076ea86674c4f6d807a962409c823e218735a6 Author: Ryno Swart Date: Wed Dec 6 17:12:09 2023 +0200 nfp: devlink: add extended ack report messages Add descriptive error messages to common devlink failures to be more user friendly. Signed-off-by: Ryno Swart Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20231206151209.20296-3-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit b0318e28549373f50d35c099864899a235076ad6 Author: Ryno Swart Date: Wed Dec 6 17:12:08 2023 +0200 nfp: ethtool: add extended ack report messages Add descriptive error messages to common ethtool failures to be more user friendly. Update `nfp_net_coalesce_para_check` to only check one argument, which facilitates unique error messages. Additionally, three error codes are updated to `EOPNOTSUPP` to reflect that these operations are not supported. Signed-off-by: Ryno Swart Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20231206151209.20296-2-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit 2483e7f04ce0e97c69b27d28ebce7a2320b7a7a6 Merge: 87e839c82cc36 5e3f5b81de80c Author: Jakub Kicinski Date: Thu Dec 7 17:47:58 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/ethernet/stmicro/stmmac/dwmac5.c drivers/net/ethernet/stmicro/stmmac/dwmac5.h drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c drivers/net/ethernet/stmicro/stmmac/hwif.h 37e4b8df27bc ("net: stmmac: fix FPE events losing") c3f3b97238f6 ("net: stmmac: Refactor EST implementation") https://lore.kernel.org/all/20231206110306.01e91114@canb.auug.org.au/ Adjacent changes: net/ipv4/tcp_ao.c 9396c4ee93f9 ("net/tcp: Don't store TCP-AO maclen on reqsk") 7b0f570f879a ("tcp: Move TCP-AO bits from cookie_v[46]_check() to tcp_ao_syncookie().") Signed-off-by: Jakub Kicinski commit a08935fc859b22884dcb6b5126d3a986467101ce Author: Dmitry Baryshkov Date: Wed Oct 4 06:19:03 2023 +0300 drm/msm/dpu: drop MSM_ENC_VBLANK support There are no in-kernel users of MSM_ENC_VBLANK wait type. Drop it together with the corresponding wait_for_vblank callback. Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/560701/ Link: https://lore.kernel.org/r/20231004031903.518223-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit c4ac0c6c96f0985357c5866cf22fd642390409dd Author: Dan Carpenter Date: Wed Dec 6 15:02:05 2023 +0300 drm/msm/dp: Fix platform_get_irq() check The platform_get_irq() function returns negative error codes. It never returns zero. Fix the check accordingly. Fixes: 82c2a5751227 ("drm/msm/dp: tie dp_display_irq_handler() with dp driver") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570755/ Link: https://lore.kernel.org/r/c12bb69b-d676-4345-9712-48aab48f2b48@moroto.mountain Signed-off-by: Dmitry Baryshkov commit 1b2d98bdd7b7c64265732f5f0dace4c52c9ba8a8 Author: Neil Armstrong Date: Thu Dec 7 17:37:18 2023 +0100 drm/msm/dp: Add DisplayPort controller for SM8650 The Qualcomm SM8650 platform comes with a DisplayPort controller with a different base offset than the previous SM8550 SoC, add support for this in the DisplayPort driver. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/571132/ Link: https://lore.kernel.org/r/20231207-topic-sm8650-upstream-dp-v1-2-b762c06965bb@linaro.org Signed-off-by: Dmitry Baryshkov commit 157fd368561e03057e6e038fc115d1e81fa2ebf2 Author: Neil Armstrong Date: Thu Dec 7 17:37:17 2023 +0100 dt-bindings: display: msm: dp-controller: document SM8650 compatible Document the DisplayPort controller found in the Qualcomm SM8650 SoC, the Controller base addresses and layout differ and thus cannot use the SM8350 compatible as fallback. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Patchwork: https://patchwork.freedesktop.org/patch/571131/ Link: https://lore.kernel.org/r/20231207-topic-sm8650-upstream-dp-v1-1-b762c06965bb@linaro.org Signed-off-by: Dmitry Baryshkov commit 6d72283526090850274d065cd5d60af732cc5fc8 Author: Paul Durrant Date: Thu Nov 2 16:21:28 2023 +0000 KVM x86/xen: add an override for PVCLOCK_TSC_STABLE_BIT Unless explicitly told to do so (by passing 'clocksource=tsc' and 'tsc=stable:socket', and then jumping through some hoops concerning potential CPU hotplug) Xen will never use TSC as its clocksource. Hence, by default, a Xen guest will not see PVCLOCK_TSC_STABLE_BIT set in either the primary or secondary pvclock memory areas. This has led to bugs in some guest kernels which only become evident if PVCLOCK_TSC_STABLE_BIT *is* set in the pvclocks. Hence, to support such guests, give the VMM a new Xen HVM config flag to tell KVM to forcibly clear the bit in the Xen pvclocks. Signed-off-by: Paul Durrant Reviewed-by: David Woodhouse Link: https://lore.kernel.org/r/20231102162128.2353459-1-paul@xen.org Signed-off-by: Sean Christopherson commit c5a761e2fe58631e1cd0249a729ce1934a11bcbe Author: Robin Murphy Date: Thu Nov 23 13:41:12 2023 +0000 drm/mediatek: Stop using iommu_present() Remove the pointless check. If an IOMMU is providing transparent DMA API ops for any device(s) we care about, the DT code will have enforced the appropriate probe ordering already. And if the IOMMU *is* entirely absent, then attempting to go ahead with CMA and either suceeding or failing decisively seems more useful than deferring forever. Signed-off-by: Robin Murphy Reviewed-by: AngeloGioacchino Del Regno Link: https://patchwork.kernel.org/project/dri-devel/patch/fd1b62aa006556f29f37535814abfe41be63f7ae.1700746094.git.robin.murphy@arm.com/ Signed-off-by: Chun-Kuang Hu commit a7fb0423c201ba12815877a0b5a68a6a1710b23a Author: Waiman Long Date: Thu Dec 7 08:46:14 2023 -0500 cgroup: Move rcu_head up near the top of cgroup_root Commit d23b5c577715 ("cgroup: Make operations on the cgroup root_list RCU safe") adds a new rcu_head to the cgroup_root structure and kvfree_rcu() for freeing the cgroup_root. The current implementation of kvfree_rcu(), however, has the limitation that the offset of the rcu_head structure within the larger data structure must be less than 4096 or the compilation will fail. See the macro definition of __is_kvfree_rcu_offset() in include/linux/rcupdate.h for more information. By putting rcu_head below the large cgroup structure, any change to the cgroup structure that makes it larger run the risk of causing build failure under certain configurations. Commit 77070eeb8821 ("cgroup: Avoid false cacheline sharing of read mostly rstat_cpu") happens to be the last straw that breaks it. Fix this problem by moving the rcu_head structure up before the cgroup structure. Fixes: d23b5c577715 ("cgroup: Make operations on the cgroup root_list RCU safe") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/lkml/20231207143806.114e0a74@canb.auug.org.au/ Signed-off-by: Waiman Long Acked-by: Yafang Shao Reviewed-by: Yosry Ahmed Reviewed-by: Michal Koutný Signed-off-by: Tejun Heo commit bcd0f5d18b0b1134ccf9ef68e7a0cf637aab380d Author: Randy Dunlap Date: Tue Dec 5 21:54:39 2023 -0800 hwspinlock/core: fix kernel-doc warnings Correct function comments to prevent kernel-doc warnings found when using "W=1". hwspinlock_core.c:208: warning: Excess function parameter 'timeout' description in '__hwspin_lock_timeout' hwspinlock_core.c:318: warning: Excess function parameter 'bank' description in 'of_hwspin_lock_simple_xlate' hwspinlock_core.c:647: warning: Function parameter or member 'hwlock' not described in '__hwspin_lock_request' and 17 warnings like: hwspinlock_core.c:487: warning: No description found for return value of 'hwspin_lock_register' Signed-off-by: Randy Dunlap Cc: Ohad Ben-Cohen Cc: Bjorn Andersson Cc: Baolin Wang Cc: linux-remoteproc@vger.kernel.org Link: https://lore.kernel.org/r/20231206055439.671-1-rdunlap@infradead.org Signed-off-by: Bjorn Andersson commit 47c4533543af4759b7668a06c1a2ce06cdc71173 Author: shaoyunl Date: Thu Nov 23 14:52:55 2023 -0500 drm/amdgpu: Enable event log on MES 11 Enable event log through the HW specific FW API Signed-off-by: shaoyunl Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b2662d4cc4ce2db4bd55e00a528b1d35be82c6c3 Author: shaoyunl Date: Thu Nov 23 13:59:44 2023 -0500 drm/amdgpu: SW part of MES event log enablement This is the generic SW part, prepare the event log buffer and dump it through debugfs Signed-off-by: shaoyunl Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a2020be69490ee8778c59a02e7b270dfeecffbd4 Author: Mario Limonciello Date: Wed Dec 6 12:08:26 2023 -0600 drm/amd/display: Restore guard against default backlight value < 1 nit Mark reports that brightness is not restored after Xorg dpms screen blank. This behavior was introduced by commit d9e865826c20 ("drm/amd/display: Simplify brightness initialization") which dropped the cached backlight value in display code, but also removed code for when the default value read back was less than 1 nit. Restore this code so that the backlight brightness is restored to the correct default value in this circumstance. Reported-by: Mark Herbert Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3031 Cc: stable@vger.kernel.org Cc: Camille Cho Cc: Krunoslav Kovac Cc: Hamza Mahfooz Fixes: d9e865826c20 ("drm/amd/display: Simplify brightness initialization") Acked-by: Alex Deucher Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit c3dc3d079d191c9149496b3c7fe1ece909386d93 Author: Vignesh Viswanathan Date: Tue Sep 5 15:25:35 2023 +0530 hwspinlock: qcom: Remove IPQ6018 SOC specific compatible IPQ6018 has 32 tcsr_mutex hwlock registers with stride 0x1000. The compatible string qcom,ipq6018-tcsr-mutex is mapped to of_msm8226_tcsr_mutex which has 32 locks configured with stride of 0x80 and doesn't match the HW present in IPQ6018. Remove IPQ6018 specific compatible string so that it fallsback to of_tcsr_mutex data which maps to the correct configuration for IPQ6018. Fixes: 5d4753f741d8 ("hwspinlock: qcom: add support for MMIO on older SoCs") Signed-off-by: Vignesh Viswanathan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230905095535.1263113-3-quic_viswanat@quicinc.com Signed-off-by: Bjorn Andersson commit 0497ae6f8830816d9277a8d5c8d9bf5966f292e1 Author: Hamza Mahfooz Date: Tue Dec 5 14:55:04 2023 -0500 drm/amd/display: fix hw rotated modes when PSR-SU is enabled We currently don't support dirty rectangles on hardware rotated modes. So, if a user is using hardware rotated modes with PSR-SU enabled, use PSR-SU FFU for all rotated planes (including cursor planes). Cc: stable@vger.kernel.org Fixes: 30ebe41582d1 ("drm/amd/display: add FB_DAMAGE_CLIPS support") Reported-by: Kai-Heng Feng Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2952 Tested-by: Kai-Heng Feng Tested-by: Bin Li Reviewed-by: Mario Limonciello Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit df2a5f74e6eda50e1376a32bd60402a28ed51c8e Author: Dmitrii Galantsev Date: Wed Dec 6 02:04:52 2023 -0600 drm/amd/pm: fix pp_*clk_od typo Fix pp_dpm_sclk_od and pp_dpm_mclk_od typos. Those were defined as pp_*clk_od but used as pp_dpm_*clk_od instead. This change removes the _dpm part. Fixes: 8cfd6a05750c ("drm/amd/pm: Hide irrelevant pm device attributes") Signed-off-by: Dmitrii Galantsev Reviewed-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 483af466e4ee3326d150877ea0626e95c67a395e Merge: 2146f7fe6e028 1d38a9ee81570 Author: Andrii Nakryiko Date: Thu Dec 7 10:57:36 2023 -0800 Merge branch 'bpf-fix-verification-of-indirect-var-off-stack-access' Andrei Matei says: ==================== bpf: fix verification of indirect var-off stack access V4 to V5: - split the test into a separate patch V3 to V4: - include a test per Eduard's request - target bpf-next per Alexei's request (patches didn't change) V2 to V3: - simplify checks for max_off (don't call check_stack_slot_within_bounds for it) - append a commit to protect against overflow in the addition of the register and the offset V1 to V2: - fix max_off calculation for access size = 0 ==================== Link: https://lore.kernel.org/r/20231207041150.229139-1-andreimatei1@gmail.com Signed-off-by: Andrii Nakryiko commit 1d38a9ee81570c4bd61f557832dead4d6f816760 Author: Andrei Matei Date: Wed Dec 6 23:11:50 2023 -0500 bpf: Guard stack limits against 32bit overflow This patch promotes the arithmetic around checking stack bounds to be done in the 64-bit domain, instead of the current 32bit. The arithmetic implies adding together a 64-bit register with a int offset. The register was checked to be below 1<<29 when it was variable, but not when it was fixed. The offset either comes from an instruction (in which case it is 16 bit), from another register (in which case the caller checked it to be below 1<<29 [1]), or from the size of an argument to a kfunc (in which case it can be a u32 [2]). Between the register being inconsistently checked to be below 1<<29, and the offset being up to an u32, it appears that we were open to overflowing the `int`s which were currently used for arithmetic. [1] https://github.com/torvalds/linux/blob/815fb87b753055df2d9e50f6cd80eb10235fe3e9/kernel/bpf/verifier.c#L7494-L7498 [2] https://github.com/torvalds/linux/blob/815fb87b753055df2d9e50f6cd80eb10235fe3e9/kernel/bpf/verifier.c#L11904 Reported-by: Andrii Nakryiko Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231207041150.229139-4-andreimatei1@gmail.com commit e28bd359bcc8eb849aaa475f3c3f9705fba26d6e Author: Andrei Matei Date: Wed Dec 6 23:11:49 2023 -0500 bpf: Add verifier regression test for previous patch Add a regression test for var-off zero-sized reads. Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/20231207041150.229139-3-andreimatei1@gmail.com commit a833a17aeac73b33f79433d7cee68d5cafd71e4f Author: Andrei Matei Date: Wed Dec 6 23:11:48 2023 -0500 bpf: Fix verification of indirect var-off stack access This patch fixes a bug around the verification of possibly-zero-sized stack accesses. When the access was done through a var-offset stack pointer, check_stack_access_within_bounds was incorrectly computing the maximum-offset of a zero-sized read to be the same as the register's min offset. Instead, we have to take in account the register's maximum possible value. The patch also simplifies how the max offset is checked; the check is now simpler than for min offset. The bug was allowing accesses to erroneously pass the check_stack_access_within_bounds() checks, only to later crash in check_stack_range_initialized() when all the possibly-affected stack slots are iterated (this time with a correct max offset). check_stack_range_initialized() is relying on check_stack_access_within_bounds() for its accesses to the stack-tracking vector to be within bounds; in the case of zero-sized accesses, we were essentially only verifying that the lowest possible slot was within bounds. We would crash when the max-offset of the stack pointer was >= 0 (which shouldn't pass verification, and hopefully is not something anyone's code attempts to do in practice). Thanks Hao for reporting! Fixes: 01f810ace9ed3 ("bpf: Allow variable-offset stack access") Reported-by: Hao Sun Signed-off-by: Andrei Matei Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231207041150.229139-2-andreimatei1@gmail.com Closes: https://lore.kernel.org/bpf/CACkBjsZGEUaRCHsmaX=h-efVogsRfK1FPxmkgb0Os_frnHiNdw@mail.gmail.com/ commit 83a368a3fc8ae8538bccb713dc0cae9eacc04790 Author: Krzysztof Kozlowski Date: Sun Dec 3 18:46:22 2023 +0100 docs: dt-bindings: add DTS Coding Style document Document preferred coding style for Devicetree sources (DTS and DTSI), to bring consistency among all (sub)architectures and ease in reviews. Cc: Andrew Davis cc: Andrew Lunn Cc: AngeloGioacchino Del Regno Cc: Arnd Bergmann Cc: Bjorn Andersson Cc: Chen-Yu Tsai Cc: Dmitry Baryshkov Cc: Jonathan Corbet Cc: Matthias Brugger Cc: Michal Simek Cc: Neil Armstrong Cc: Nishanth Menon Cc: Olof Johansson Cc: Rafał Miłecki Acked-by: Neil Armstrong Acked-by: Heiko Stuebner Reviewed-by: Laurent Pinchart Acked-by: Konrad Dybcio Reviewed-by: Geert Uytterhoeven Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Reviewed-by: Francesco Dolcini Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231203174622.18402-1-krzysztof.kozlowski@linaro.org [robh: quote property names in order of properties section] Signed-off-by: Rob Herring commit 1b151e2435fc3a9b10c8946c6aebe9f3e1938c55 Author: Matthew Wilcox (Oracle) Date: Mon Aug 14 15:41:00 2023 +0100 block: Remove special-casing of compound pages The special casing was originally added in pre-git history; reproducing the commit log here: > commit a318a92567d77 > Author: Andrew Morton > Date: Sun Sep 21 01:42:22 2003 -0700 > > [PATCH] Speed up direct-io hugetlbpage handling > > This patch short-circuits all the direct-io page dirtying logic for > higher-order pages. Without this, we pointlessly bounce BIOs up to > keventd all the time. In the last twenty years, compound pages have become used for more than just hugetlb. Rewrite these functions to operate on folios instead of pages and remove the special case for hugetlbfs; I don't think it's needed any more (and if it is, we can put it back in as a call to folio_test_hugetlb()). This was found by inspection; as far as I can tell, this bug can lead to pages used as the destination of a direct I/O read not being marked as dirty. If those pages are then reclaimed by the MM without being dirtied for some other reason, they won't be written out. Then when they're faulted back in, they will not contain the data they should. It'll take a pretty unusual setup to produce this problem with several races all going the wrong way. This problem predates the folio work; it could for example have been triggered by mmaping a THP in tmpfs and using that as the target of an O_DIRECT read. Fixes: 800d8c63b2e98 ("shmem: add huge pages support") Cc: Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Jens Axboe commit 04c521c3bec1fa0ccb97a1fbf74f0faeda3f4a53 Author: Johan Jonker Date: Sat Dec 2 19:22:01 2023 +0100 ARM: dts: rockchip: add gpio alias for gpio dt nodes Rockchip SoC TRM, SoC datasheet and board schematics always refer to the same gpio numbers - even if not all are used for a specific board. In order to not have to re-define them for every board add the aliases to SoC dtsi files. Co-developed-by: Jianqun Xu Signed-off-by: Jianqun Xu Signed-off-by: Johan Jonker Reviewed-by: Dragan Simic Link: https://lore.kernel.org/r/89f2a229-9f14-d43f-c53d-5d4688e70456@gmail.com Signed-off-by: Heiko Stuebner commit cb46fca88d14939da2785567253d0a297f31be27 Author: Davidlohr Bueso Date: Tue Aug 29 08:20:14 2023 -0700 cxl: Add Support for Get Timestamp Add the call to the UAPI such that userspace may corelate the timestamps from the device log with system wall time, if, for example there's any sort of inaccuracy or skew in the device. Signed-off-by: Davidlohr Bueso Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/r/20230829152014.15452-1-dave@stgolabs.net Signed-off-by: Dan Williams commit 88a50c1663ffa9f6b31705c6bf7a887a2c8d9434 Merge: 18f78b5e609b1 4d8ff6b0991d5 Author: Mark Brown Date: Thu Dec 7 20:20:35 2023 +0000 spi: Add support for stacked/parallel memories Merge series from Amit Kumar Mahapatra : This patch series adds support to the SPI framework for using multiple chip selects. commit 327f7533cc596427b62f431c8852951412b6c0dc Author: Namhyung Kim Date: Tue Nov 28 09:54:41 2023 -0800 perf annotate: Get rid of local annotation options It doesn't need the option in the struct annotation which is allocated for each symbol. It can directly use the global options and save 8 bytes per symbol. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231128175441.721579-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2fa21d694c63081f26444847c916e5fc83bcefa1 Author: Namhyung Kim Date: Tue Nov 28 09:54:40 2023 -0800 perf annotate: Remove remaining usages of local annotation options So that it can get rid of the unused data. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231128175441.721579-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7f929aea21fd0be5e0d9ee5827d5b809daa69f29 Author: Namhyung Kim Date: Tue Nov 28 09:54:39 2023 -0800 perf annotate: Ensure init/exit for global options Now it only cares about the global options so it can just handle it without the argument. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231128175441.721579-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 22197fb296913f83c7182befd2a8b23bf042f279 Author: Namhyung Kim Date: Tue Nov 28 09:54:38 2023 -0800 perf ui/browser/annotate: Use global annotation_options Now it can use the global options and no need save local browser options separately. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231128175441.721579-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 41fd3cacd29f47f6b9c6474b27c5b0513786c4e9 Author: Namhyung Kim Date: Tue Nov 28 09:54:37 2023 -0800 perf annotate: Use global annotation_options Now it can directly use the global options and no need to pass it as an argument. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231128175441.721579-5-namhyung@kernel.org [ Fixup build with GTK2=1 ] Signed-off-by: Arnaldo Carvalho de Melo commit c9a21a872c69032cb9a94ebc171649c0c28141d7 Author: Namhyung Kim Date: Tue Nov 28 09:54:36 2023 -0800 perf top: Convert to the global annotation_options Use the global option and drop the local copy. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231128175441.721579-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 14953f038d6b30e3dc9d1aa4d4584ac505e5a8ec Author: Namhyung Kim Date: Tue Nov 28 09:54:35 2023 -0800 perf report: Convert to the global annotation_options Use the global option and drop the local copy. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231128175441.721579-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9d03194a36345796d4f0f8d6b72eb770a45d614e Author: Namhyung Kim Date: Tue Nov 28 09:54:34 2023 -0800 perf annotate: Introduce global annotation_options The annotation options are to control the behavior of objdump and the output. It's basically used by 'perf annotate' but 'perf report' and 'perf top' can call it on TUI dynamically. But it doesn't need to have a copy of annotation options in many places. As most of the work is done in the util/annotate.c file, add a global variable and set/use it instead of having their own copies. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231128175441.721579-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ec4e9d630a64df500641892f4e259e8149594a99 Author: Gavrilov Ilia Date: Thu Nov 23 09:25:54 2023 +0000 calipso: fix memory leak in netlbl_calipso_add_pass() If IPv6 support is disabled at boot (ipv6.disable=1), the calipso_init() -> netlbl_calipso_ops_register() function isn't called, and the netlbl_calipso_ops_get() function always returns NULL. In this case, the netlbl_calipso_add_pass() function allocates memory for the doi_def variable but doesn't free it with the calipso_doi_free(). BUG: memory leak unreferenced object 0xffff888011d68180 (size 64): comm "syz-executor.1", pid 10746, jiffies 4295410986 (age 17.928s) hex dump (first 32 bytes): 00 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<...>] kmalloc include/linux/slab.h:552 [inline] [<...>] netlbl_calipso_add_pass net/netlabel/netlabel_calipso.c:76 [inline] [<...>] netlbl_calipso_add+0x22e/0x4f0 net/netlabel/netlabel_calipso.c:111 [<...>] genl_family_rcv_msg_doit+0x22f/0x330 net/netlink/genetlink.c:739 [<...>] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] [<...>] genl_rcv_msg+0x341/0x5a0 net/netlink/genetlink.c:800 [<...>] netlink_rcv_skb+0x14d/0x440 net/netlink/af_netlink.c:2515 [<...>] genl_rcv+0x29/0x40 net/netlink/genetlink.c:811 [<...>] netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] [<...>] netlink_unicast+0x54b/0x800 net/netlink/af_netlink.c:1339 [<...>] netlink_sendmsg+0x90a/0xdf0 net/netlink/af_netlink.c:1934 [<...>] sock_sendmsg_nosec net/socket.c:651 [inline] [<...>] sock_sendmsg+0x157/0x190 net/socket.c:671 [<...>] ____sys_sendmsg+0x712/0x870 net/socket.c:2342 [<...>] ___sys_sendmsg+0xf8/0x170 net/socket.c:2396 [<...>] __sys_sendmsg+0xea/0x1b0 net/socket.c:2429 [<...>] do_syscall_64+0x30/0x40 arch/x86/entry/common.c:46 [<...>] entry_SYSCALL_64_after_hwframe+0x61/0xc6 Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with Syzkaller Fixes: cb72d38211ea ("netlabel: Initial support for the CALIPSO netlink protocol.") Signed-off-by: Gavrilov Ilia [PM: merged via the LSM tree at Jakub Kicinski request] Signed-off-by: Paul Moore commit 67a5f0ff342907ca399b77f0445b2673137cdfa5 Author: Pin-yen Lin Date: Thu Dec 7 16:17:35 2023 +0800 drm/edp-panel: Move the KDC panel to a separate group Move the KDC panel entry to make the list sorted by the vendor string. Signed-off-by: Pin-yen Lin Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231207081801.4049075-2-treapking@chromium.org commit 87e839c82cc36346a2cd183ca941316902110716 Author: duanqiangwen Date: Wed Dec 6 17:50:44 2023 +0800 net: wangxun: fix changing mac failed when running in some bonding mode, service need to change mac when netif is running. Wangxun netdev add IFF_LIVE_ADDR_CHANGE priv_flag to support it. Signed-off-by: duanqiangwen Link: https://lore.kernel.org/r/20231206095044.17844-1-duanqiangwen@net-swift.com Signed-off-by: Jakub Kicinski commit 26f4bac3d884e340fd8b061dcfc64688a8c416e1 Author: Rob Herring Date: Thu Dec 7 10:25:00 2023 -0600 drm/bridge: aux-hpd: Replace of_device.h with explicit include The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. Soon the implicit includes are going to be removed. of_device.h isn't needed, but of.h is for of_node_put(). Reported-by: Stephen Rothwell Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231207162501.2629952-1-robh@kernel.org Signed-off-by: Rob Herring commit 92184eae1d5ad804884e2c6e289d885b9e3194d1 Author: Wang Zhao Date: Fri Nov 17 20:54:49 2023 +0800 wifi: mt76: mt7921s: fix workqueue problem causes STA association fail The ieee80211_queue_work function queues work into the mac80211 local->workqueue, which is widely used for mac80211 internal work processes. In the mt76 driver, both the mt76-sido-status and mt76-sdio-net threads enqueue workers to the workqueue with this function. However, in some cases, when two workers are enqueued to the workqueue almost simultaneously, the second worker may not be scheduled immediately and may get stuck for a while. This can cause timing issues. To avoid these timing conflicts caused by worker scheduling, replace the worker with an independent thread. Fixes: 48fab5bbef40 ("mt76: mt7921: introduce mt7921s support") Signed-off-by: Wang Zhao Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit d079746455700ca1eacc25a4aac0d6323c8130c6 Author: Uwe Kleine-König Date: Fri Nov 17 10:31:03 2023 +0100 wifi: mt76: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert the three mt76 drivers from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Jeff Johnson Signed-off-by: Felix Fietkau commit 170a8969db8877252e6b6cd6e821a0ddde4b9152 Author: Lorenzo Bianconi Date: Mon Nov 13 11:16:19 2023 +0100 wifi: mt76: mt7925: remove iftype from mt7925_init_eht_caps signature Get rid of nl80211_iftype from mt7925_init_eht_caps routine signature since it is not actually used. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3d3f117a259a65353bf2714a18e25731b3ca5770 Author: StanleyYP Wang Date: Mon Nov 13 15:06:19 2023 +0800 wifi: mt76: mt7996: add PCI IDs for mt7992 Add PCI device IDs to enable mt7992 chipsets support. Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 408566db8cad2788356ccd75e946c236ba381bc2 Author: Benjamin Lin Date: Mon Nov 13 15:06:18 2023 +0800 wifi: mt76: connac: add new definition of tx descriptor Add MT_TXD6_MSDU_CNT_V2 bitfield, which is used by mt7992 chipsets. This is a preliminary patch for mt7992 chipsets support. Signed-off-by: Benjamin Lin Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 8df63a4bbe3d89ad24e07f952ccaa8702af937f2 Author: StanleyYP Wang Date: Mon Nov 13 15:06:17 2023 +0800 wifi: mt76: mt7996: adjust interface num and wtbl size for mt7992 MT7992 chipsets support up to 32 interfaces (with maximum 19 per-band) and 512 station entries. This is a preliminary patch for mt7992 chipsets support. Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 2cbbefdc5c9ccf5911b41dca43d2d1533c160f4e Author: StanleyYP Wang Date: Mon Nov 13 15:06:16 2023 +0800 wifi: mt76: mt7996: support mt7992 eeprom loading Add the default eeprom and 0x7992 check to mt7996_check_eeprom(). This is a preliminary patch for mt7992 chipsets support. Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 50fbebf6a151bc70c43ffab1f884aa510d548d7e Author: StanleyYP Wang Date: Mon Nov 13 15:06:15 2023 +0800 wifi: mt76: mt7996: rework register offsets for mt7992 Add mt7992_offs to differentiate registers that share the same definitions with mt7996 chipsets but have differnet offsets. This is a preliminary patch for mt7992 chipsets support. Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 9fe6690b8bef58848294bf5de9c6c31748e11941 Author: Benjamin Lin Date: Mon Nov 13 15:06:14 2023 +0800 wifi: mt76: mt7996: add DMA support for mt7992 Add DMA TX/RX queues and RRO init flow for mt7992 chipsets. This is a preliminary patch for mt7992 chipsets support. Co-developed-by: StanleyYP Wang Signed-off-by: StanleyYP Wang Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Signed-off-by: Benjamin Lin Signed-off-by: Felix Fietkau commit a63b75aac8468e7216930c698d5676259afb44fd Author: StanleyYP Wang Date: Mon Nov 13 15:06:13 2023 +0800 wifi: mt76: connac: add firmware support for mt7992 Support firmware download and enable related AFE PLL for mt7992 chipsets. This is a preliminary patch for mt7992 chipsets support. Co-developed-by: Benjamin Lin Signed-off-by: Benjamin Lin Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Signed-off-by: StanleyYP Wang Signed-off-by: Felix Fietkau commit 1e1e563fe3bd2ad9252a98c24d55bb3f3a06990e Author: Shayne Chen Date: Mon Nov 13 15:06:12 2023 +0800 wifi: mt76: mt7996: introduce mt7996_band_valid() Replace dbdc_support and tbtc_support with mt7996_band_valid() to support mt7996 variants with band0/band2 dual-band support. This changes reduces ambiguity when checking supported bands on different variants or new chipsets, as well as during the init configurations on DMA TX/RX queues or irq masks. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 2ee1c40daeb9a33e25c460bf87feca58e91af879 Author: Arnd Bergmann Date: Fri Nov 10 15:29:30 2023 +0100 wifi: mt76: mt7996: fix mt7996_mcu_all_sta_info_event struct packing The internal struct and union inside mt7996_mcu_all_sta_info_event is marked as being aligned, which conflicts with it being unaligned within that structure: drivers/net/wireless/mediatek/mt76/mt7996/mcu.h:165:2: error: field within 'struct mt7996_mcu_all_sta_info_event' is less aligned than 'union mt7996_mcu_all_sta_info_event::(anonymous at ../drivers/net/wireless/mediatek/mt76/mt7996/mcu.h:165:2)' and is usually due to 'struct mt7996_mcu_all_sta_info_event' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] Mark all three as being packed as well to ensure byte packing for the entire thing. Fixes: adde3eed4a75 ("wifi: mt76: mt7996: Add mcu commands for getting sta tx statistic") Signed-off-by: Arnd Bergmann Signed-off-by: Felix Fietkau commit ff434cc129d6907e6dbc89dd0ebc59fd3646d4c2 Author: StanleyYP Wang Date: Mon Nov 6 22:39:31 2023 +0000 wifi: mt76: mt7915: also MT7981 is 3T3R but nss2 on 5 GHz band Just like MT7916 also MT7981 can handle 3T3R DBDC frontend and should hence be included in the corresponding conditional expression in the driver. Add it. Fixes: 6bad146d162e ("wifi: mt76: mt7915: add support for MT7981") Signed-off-by: StanleyYP Wang Signed-off-by: Daniel Golle Signed-off-by: Felix Fietkau commit 3531c72aedb95261f4d78c47efa4b5ba7cdcddd9 Author: StanleyYP Wang Date: Mon Nov 6 22:38:53 2023 +0000 wifi: mt76: mt7915: fix EEPROM offset of TSSI flag on MT7981 The offset of the TSSI flag on the EEPROM of MT7981 devices was wrong. Set the correct offset instead. Fixes: 6bad146d162e ("wifi: mt76: mt7915: add support for MT7981") Signed-off-by: StanleyYP Wang Signed-off-by: Daniel Golle Signed-off-by: Felix Fietkau commit 2c2f50bf6407e1fd43a1a257916aeaa5ffdacd6c Author: MeiChia Chiu Date: Thu Nov 2 18:03:02 2023 +0800 wifi: mt76: connac: fix EHT phy mode check Add a BSS eht_support check before returning EHT phy mode. Without this patch, there might be an inconsistency where the softmac layer thinks the BSS is in HE mode, while the FW thinks it is in EHT mode. Signed-off-by: MeiChia Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit eb80e02b2c03141460749d3800126e2cdb674c9e Author: Allen Ye Date: Thu Nov 2 18:03:01 2023 +0800 wifi: mt76: connac: add beacon protection support for mt7996 Implement beacon protection feature for mt7996 chipsets, and also do some cleanup on the set key routine. Co-developed-by: Rudra Shahi Signed-off-by: Rudra Shahi Signed-off-by: Allen Ye Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit b769f7d8d9002a602232704505a7c593e1fa087c Author: Peter Chiu Date: Thu Nov 2 18:03:00 2023 +0800 wifi: mt76: mt7996: rework ampdu params setting Add sta_rec_ht_uni struct to pass HT ampdu params to firmware. For VHT, HE, and EHT mode, firmware will get the ampdu params by parsing the corresponding capability. Co-developed-by: Shayne Chen Signed-off-by: Shayne Chen Signed-off-by: Peter Chiu Signed-off-by: Felix Fietkau commit d58a9778f7ca0634622d2fc2e9f76163467bdf5b Author: StanleyYP Wang Date: Thu Nov 2 18:02:59 2023 +0800 wifi: mt76: mt7996: fix alignment of sta info event Fix the alignment of struct mt7996_mcu_all_sta_info_event. Fixes: adde3eed4a75 ("wifi: mt76: mt7996: Add mcu commands for getting sta tx statistic") Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit d57e1b255475957ab9280f8a2a6119853aef4d05 Author: Benjamin Lin Date: Thu Nov 2 18:02:58 2023 +0800 wifi: mt76: mt7996: switch to mcu command for TX GI report During runtime, the GI value in the WTBL is not updated in real-time. To obtain the latest results for the TX GI, switch to use an MCU command. Signed-off-by: Benjamin Lin Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 1e12f0f81f36b7470bcd7e65904ff8264fd31a5b Author: Allen Ye Date: Thu Nov 2 18:02:57 2023 +0800 wifi: mt76: use chainmask for power delta calculation The power gain value is related to total TX path, so change the calculation to use per-phy chainmask. Signed-off-by: Allen Ye Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit f75e4779d215a7dbe7eb7ab6f1ed075fe66930bc Author: Shayne Chen Date: Thu Nov 2 18:02:56 2023 +0800 wifi: mt76: mt7996: add txpower setting support Add support for setting txpower from upper layer and configuring per-rate txpower limit table. Co-developed-by: Allen Ye Signed-off-by: Allen Ye Co-developed-by: StanleyYP Wang Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 11a60bd2a590f8caa89a9079503d9e907e47d129 Author: Shayne Chen Date: Thu Nov 2 18:02:55 2023 +0800 wifi: mt76: change txpower init to per-phy Use per-phy structure for maximum txpower value initializing, since each phy may have a different chainmask, which can impact the calculation of power gain. Co-developed-by: Allen Ye Signed-off-by: Allen Ye Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 1e3f387736c744e73b5398a147b90412f82f54da Author: MeiChia Chiu Date: Mon Oct 23 23:38:54 2023 +0800 wifi: mt76: mt7996: fix rate usage of inband discovery frames For UBPR and FILS frames, the BSS_CHANGED_BEACON flag will also be set, which causes those frames to use the beacon rate in TX descriptors. Adjust the statement to fix this issue. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: MeiChia Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 22f5dc781574b0f7ce7b491165dcf14bd6151a51 Author: Peter Chiu Date: Mon Oct 23 23:38:53 2023 +0800 wifi: mt76: mt7996: align the format of fixed rate command Use the new fixed rate command format to let the fixed field function work normally. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 8c8f77e0a6569f8b82ec749c0d3ce16224aeb418 Author: Peter Chiu Date: Mon Oct 23 23:38:52 2023 +0800 wifi: mt76: mt7996: handle IEEE80211_RC_SMPS_CHANGED Make mt7996_mcu_set_fixed_field() non-static in order to handle IEEE80211_RC_SMPS_CHANGED in mt7996_mac_sta_rc_work(). Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 4ef49d1858e78da25c204e00b872cd35782cfc84 Author: Howard Hsu Date: Mon Oct 23 23:38:51 2023 +0800 wifi: mt76: connac: set fixed_bw bit in TX descriptor for fixed rate frames Always set the fixed_bw bitfield for fixed rate frames to keep it being sent with specific bandwidth. Without this change, the bw of fixed rate frames will still be decided by hardware. Reported-by: Chank Chen Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit de2a41cbfc7a78b1dd1941329b9aaf6c49829035 Author: Peter Chiu Date: Mon Oct 23 23:38:50 2023 +0800 wifi: mt76: mt7996: adjust WFDMA settings to improve performance Refactor and update dma prefetch parts and also split band 1 traffic to PCIe 1 to enhance throughput. Signed-off-by: Peter Chiu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 4aa9992674e70074fce450f65ebc95c2ba2b79ae Author: Sujuan Chen Date: Mon Oct 23 23:38:49 2023 +0800 wifi: mt76: mt7996: fix the size of struct bss_rate_tlv Align the format of struct bss_rate_tlv to the firmware. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Sujuan Chen Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 254ab81f3b82a297da5c0684a9ebf21fbc9dcb86 Author: StanleyYP Wang Date: Mon Oct 23 23:38:48 2023 +0800 wifi: mt76: connac: add beacon duplicate TX mode support for mt7996 For connac3 chipsets, setting of spe_idx is moved from TX descriptor to the fixed rate table. This patch implements the setting to support duplicate TX mode for beacon. Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 6879b2e94172ed80394dd49d410814ad427d1ca0 Author: Howard Hsu Date: Mon Oct 23 23:38:47 2023 +0800 wifi: mt76: mt7996: add thermal sensor device support This patch adds support for thermal sensor device, including the following features: - Support to read current chip temperature. - Support to set/get the trigger/restore temperature for thermal service. - Support to read current chip tx cycle. Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 21f290884bc1c911aa9a0875c1d9a1e6fb9e0308 Author: Howard Hsu Date: Mon Oct 23 23:38:46 2023 +0800 wifi: mt76: connac: add thermal protection support for mt7996 Implement thermal protection commands and support Linux cooling device control for mt7996 chipsets. Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 0afb228d9bd439088d2d1d58bae7295340000e27 Author: Howard Hsu Date: Mon Oct 23 23:38:45 2023 +0800 wifi: mt76: mt7996: add TX statistics for EHT mode in debugfs Add EHT statistics of beamforming feedback and BW320 in debugfs tx_stats command. Signed-off-by: Howard Hsu Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit af2825729b52a45d239def2c243531aa9e7bf81a Author: Shayne Chen Date: Mon Oct 23 23:38:44 2023 +0800 wifi: mt76: mt7996: add support for variants with auxiliary RX path Add support to correctly configure the rx chainmask of variants that have additional auxiliary RX path. e.g., 4T5R. The auxiliary RX path is transparent to driver, but driver needs to correctly configure it in the set channel fw command. Co-developed-by: StanleyYP Wang Signed-off-by: StanleyYP Wang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 5f9d5d4fc561e7bd3a18742f1fdb96cab98f1870 Author: Lorenzo Bianconi Date: Fri Oct 20 12:45:19 2023 +0200 wifi: mt76: mt7915: fallback to non-wed mode if platform_get_resource fails in mt7915_mmio_wed_init() mt76 assumes mt7915_mmio_wed_init can fail just after wed driver has been attached running mtk_wed_device_attach(). Fall back to non-wed mode if platform_get_resource fails in mt7915_mmio_wed_init routines. Fixes: eebb70976be5 ("wifi: mt76: mt7915: enable wed for mt7986-wmac chipset") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a5d028d668360db991e6da67cd48b9b4443198ed Author: Lorenzo Bianconi Date: Fri Oct 20 12:31:00 2023 +0200 wifi: mt76: mt7996: add wed rro delete session garbage collector Introduce the capability to clear WED rro session configured in the hw according to the event reported by the MCU firmware Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Co-developed-by: Bo Jiao Signed-off-by: Bo Jiao Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 00d2ced0deb3b75177f634b2e7c0c87dca7d747e Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:59 2023 +0200 wifi: mt76: mt7996: add wed reset support Introduce the capability to reset mt7996 chipset if requested by wed driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d4b85aff3ab32fbfde026090c47829e83a0422cc Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:58 2023 +0200 wifi: mt76: move wed reset common code in mt76 module Move WED reset code shared between mt7915 and mt7996 in common module. This is a preliminary patch to introduce WED reset support for mt7996. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 950d0abb5cd94f2b0710c5c42ac4398c91a7ff22 Author: Bo Jiao Date: Fri Oct 20 12:30:57 2023 +0200 wifi: mt76: mt7996: add wed rx support Similar to MT7915, enable Wireless Ethernet Ditpatcher for MT7996 to offload traffic received from the WLAN nic and transmitted on the LAN one Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Bo Jiao Signed-off-by: Felix Fietkau commit b8b36f47070f47dbfd3dc8eb0b674d6103306935 Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:56 2023 +0200 wifi: mt76: mt7996: use u16 for val field in mt7996_mcu_set_rro signature This is a preliminary patch to introduce WED rx support for mt7996 driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5bb7a655045ebc023f421c13c2156fcd478185bc Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:55 2023 +0200 wifi: mt76: dma: introduce __mt76_dma_queue_reset utility routine This is a preliminary patch to introduce WED support for mt7996 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 83eafc9251d6d30574b629ac637c56d168fcbdd9 Author: Sujuan Chen Date: Fri Oct 20 12:30:54 2023 +0200 wifi: mt76: mt7996: add wed tx support Similar to MT7915, enable Wireless Ethernet Ditpatcher for MT7996 to offload traffic received from the LAN nic and transmitted on the WLAN one Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sujuan Chen Signed-off-by: Felix Fietkau commit af8d2af57584762ef2727831ffca01036ca5bd40 Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:53 2023 +0200 wifi: mt76: increase MT_QFLAG_WED_TYPE size This is a preliminary patch to introduce WED support for mt7996 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2e420b88ca86e3322b36793f12d8fd2bff5ed57d Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:52 2023 +0200 wifi: mt76: introduce wed pointer in mt76_queue Introduce mtk_wed_device pointer in mt76_queue structure in order to configure WED chip. Get rid of dev parameter in Q_READ and Q_WRITE macros. Introduce wed parameter to the following routine signatures: - mt76_init_queue - mt76_init_tx_queue This is a preliminary patch to introduce WED support for mt7996 since mt7996 runs two separate WED chips. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 132d74d31e86130b4e8b8c5d7bfe05c227d989d6 Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:51 2023 +0200 wifi: mt76: introduce mt76_queue_is_wed_tx_free utility routine This is a preliminary patch to introduce WED support for mt7996 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ac4659856c22440e2ad208928a3c5911ac364a54 Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:50 2023 +0200 wifi: mt76: move mt76_net_setup_tc in common code This is a preliminary patch to introduce WED support for mt7996 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5f60735c08ce3dd368d30bb3b1addf7149cb664c Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:49 2023 +0200 wifi: mt76: move mt76_mmio_wed_offload_{enable,disable} in common code mt76_mmio_wed_offload_enable and mt76_mmio_wed_offload_disable routines will be reused by mt7996 driver for wed support. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b92158a8dc413d0facaf0d807c66f76a6865c93c Author: Lorenzo Bianconi Date: Fri Oct 20 12:30:48 2023 +0200 wifi: mt76: mmio: move mt76_mmio_wed_{init,release}_rx_buf in common code Move mt76_mmio_wed_init_rx_buf and mt76_mmio_wed_release_rx_buf routines in common code. This is a preliminary patch to introduce WED support for mt7996 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2fac91f2a1db221b070ea0fda1e2392c92386975 Author: Wu Yunchuan Date: Fri Oct 20 17:34:32 2023 +0800 wifi: mt76: Remove unnecessary (void*) conversions No need cast (void *) to (struct mt7615_phy *). Signed-off-by: Wu Yunchuan Signed-off-by: Felix Fietkau commit fdddaa52641e222ef6149d2faa7c10afe02f647e Author: Christian Marangi Date: Wed Oct 18 15:09:42 2023 +0200 wifi: mt76: permit to load precal from NVMEM cell for mt7915 Permit to load precal from NVMEM cell for mt7915. The NVMEM cell must be named "precal" to be correctly loaded. NVMEM cell must already account the correct offset and be placed after the EEPROM as the function expect the data right from the start. Tested-by: Shiji Yang Signed-off-by: Christian Marangi Signed-off-by: Felix Fietkau commit a1f57685fe851677d62d3551aa2de674c25120cf Author: Christian Marangi Date: Wed Oct 18 15:09:41 2023 +0200 wifi: mt76: permit to use alternative cell name to eeprom NVMEM load Generilize mt76_get_of_eeprom_from_nvmem to use alternative cell name by passing the cell name as an arg and expose it. Rename it to mt76_get_of_data_from_nvmem to better reflect the now more generic usage. This is to permit driver to load additional cell, like precal cell. Tested-by: Shiji Yang Signed-off-by: Christian Marangi Signed-off-by: Felix Fietkau commit 3d96764e6a22296392866e9fc6318ae912151380 Author: Christian Marangi Date: Wed Oct 18 15:09:40 2023 +0200 wifi: mt76: make mt76_get_of_eeprom static again Since mt76_get_of_eeprom is not used by mt7915 anymore, unexport it and make it static again. Also drop offset arg as it's only supported for MTD and was always set to 0, hardcode the MTD functio instead. Signed-off-by: Christian Marangi Signed-off-by: Felix Fietkau commit a6342c31ab3b2cfae92298ff91635e8b82fed792 Author: Christian Marangi Date: Wed Oct 18 15:09:39 2023 +0200 wifi: mt76: limit support of precal loading for mt7915 to MTD only Limit support for precal loading for mt7915 only to MTD. Passing data from DT doesn't support offset and NVMEM require a different cell name and doesn't support offset hence only MTD way is actually supported. Rename mt76_get_of_eeprom_from_mtd to mt76_get_of_data_from_mtd as it is now used for a more generic purpose and export it. Signed-off-by: Christian Marangi Signed-off-by: Felix Fietkau commit c33e5f4cbb9f961e66473a9ace077c4d1f29a5bb Author: Christian Marangi Date: Wed Oct 18 15:09:38 2023 +0200 wifi: mt76: fix typo in mt76_get_of_eeprom_from_nvmem function Fix typo in mt76_get_of_eeprom_from_nvmem where eeprom was misspelled as epprom. Fixes: 5bef3a406c6e ("wifi: mt76: add support for providing eeprom in nvmem cells") Signed-off-by: Christian Marangi Signed-off-by: Felix Fietkau commit e874a79250b39447765ac13272b67ac36ccf2a75 Author: Christian Marangi Date: Wed Oct 18 15:09:37 2023 +0200 wifi: mt76: fix broken precal loading from MTD for mt7915 Commit 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data") was fundamentally broken and never worked. The idea (before NVMEM support) was to expand the MTD function and pass an additional offset. For normal EEPROM load the offset would always be 0. For the purpose of precal loading, an offset was passed that was internally the size of EEPROM, since precal data is right after the EEPROM. Problem is that the offset value passed is never handled and is actually overwrite by offset = be32_to_cpup(list); ret = mtd_read(mtd, offset, len, &retlen, eep); resulting in the passed offset value always ingnored. (and even passing garbage data as precal as the start of the EEPROM is getting read) Fix this by adding to the current offset value, the offset from DT to correctly read the piece of data at the requested location. Cc: stable@vger.kernel.org Fixes: 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data") Signed-off-by: Christian Marangi Signed-off-by: Felix Fietkau commit 706e83b33103fc5dc945765ddbf6a3e879d21275 Author: Yi-Chia Hsieh Date: Thu Oct 12 15:00:26 2023 -0700 wifi: mt76: mt7996: fix uninitialized variable in parsing txfree Fix the uninitialized variable warning in mt7996_mac_tx_free. Fixes: 2461599f835e ("wifi: mt76: mt7996: get tx_retries and tx_failed from txfree") Signed-off-by: Yi-Chia Hsieh Signed-off-by: Felix Fietkau commit ce18572b7b5933ae3f97ea201d03463c320f0956 Author: Rong Yan Date: Sun Oct 1 23:02:05 2023 +0800 wifi: mt76: mt7921: support 5.9/6GHz channel config in acpi The mtcl table, configured by platform vendor, provides regulatory information for 5.9/6 GHz channels. mt792x should work on corresponding channels supported by mtcl. This patch would parse the settings in mtcl table and apply the result into chip side. Signed-off-by: Rong Yan Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Felix Fietkau commit 14cdeaf9504cd37589e8acfedf644d32fb29a429 Author: Ryder Lee Date: Fri Aug 25 01:08:37 2023 +0800 wifi: mt76: add ability to explicitly forbid LED registration with DT Add ability to explicitly forbid LED registration using DT led\status = "disabled". Tested-by: Alexey D. Filimonov Signed-off-by: Alexey D. Filimonov Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 3c1e09d533dba45af8b4681f005c9b5807f9b182 Author: Munehisa Kamata Date: Thu Dec 7 01:33:56 2023 +0000 selinux: remove the wrong comment about multithreaded process handling Since commit d9250dea3f89 ("SELinux: add boundary support and thread context assignment"), SELinux has been supporting assigning per-thread security context under a constraint and the comment was updated accordingly. However, seems like commit d84f4f992cbd ("CRED: Inaugurate COW credentials") accidentally brought the old comment back that doesn't match what the code does. Considering the ease of understanding the code, this patch just removes the wrong comment. Fixes: d84f4f992cbd ("CRED: Inaugurate COW credentials") Signed-off-by: Munehisa Kamata Signed-off-by: Paul Moore commit 017a99a966f1183e611f0b0fa6bec40160c81813 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:30 2023 +0100 KVM: nSVM: Hide more stuff under CONFIG_KVM_HYPERV/CONFIG_HYPERV 'struct hv_vmcb_enlightenments' in VMCB only make sense when either CONFIG_KVM_HYPERV or CONFIG_HYPERV is enabled. No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-17-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 5a30f97683af802c0fa24d1cfc339f87cdb6791b Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:29 2023 +0100 KVM: nVMX: Hide more stuff under CONFIG_KVM_HYPERV 'hv_evmcs_vmptr'/'hv_evmcs_map'/'hv_evmcs' fields in 'struct nested_vmx' should not be used when !CONFIG_KVM_HYPERV, hide them when !CONFIG_KVM_HYPERV. No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-16-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit c98842b26c233318bb18c77cc6e25859fe76c80e Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:28 2023 +0100 KVM: nVMX: Introduce accessor to get Hyper-V eVMCS pointer There's a number of 'vmx->nested.hv_evmcs' accesses in nested.c, introduce 'nested_vmx_evmcs()' accessor to hide them all in !CONFIG_KVM_HYPERV case. No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-15-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 453e42b0557148cc7092c72eff6677a5436e3c7c Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:27 2023 +0100 KVM: nVMX: Introduce helpers to check if Hyper-V evmptr12 is valid/set In order to get rid of raw 'vmx->nested.hv_evmcs_vmptr' accesses when !CONFIG_KVM_HYPERV, introduce a pair of helpers: nested_vmx_is_evmptr12_valid() to check that eVMPTR points to a valid address. nested_vmx_is_evmptr12_valid() to check that eVMPTR either points to a valid address or is in 'pending' port-migration state (meaning it is supposed to be valid but the exact address wasn't acquired from guest's memory yet). No functional change intended. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Link: https://lore.kernel.org/r/20231205103630.1391318-14-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit b4f69df0f65e97fec439130a0d0a8b9c7cc02df2 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:26 2023 +0100 KVM: x86: Make Hyper-V emulation optional Hyper-V emulation in KVM is a fairly big chunk and in some cases it may be desirable to not compile it in to reduce module sizes as well as the attack surface. Introduce CONFIG_KVM_HYPERV option to make it possible. Note, there's room for further nVMX/nSVM code optimizations when !CONFIG_KVM_HYPERV, this will be done in follow-up patches. Reorganize Makefile a bit so all CONFIG_HYPERV and CONFIG_KVM_HYPERV files are grouped together. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Link: https://lore.kernel.org/r/20231205103630.1391318-13-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit f97314626734deaef49564a429c6f8eee3846bd3 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:25 2023 +0100 KVM: nVMX: Move guest_cpuid_has_evmcs() to hyperv.h In preparation for making Hyper-V emulation optional, move Hyper-V specific guest_cpuid_has_evmcs() to hyperv.h. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Link: https://lore.kernel.org/r/20231205103630.1391318-12-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 225b7c1117b2f6dadbdb1d40538d37b9685e8b18 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:24 2023 +0100 KVM: selftests: Fix vmxon_pa == vmcs12_pa == -1ull nVMX testcase for !eVMCS The "vmxon_pa == vmcs12_pa == -1ull" test happens to work by accident: as Enlightened VMCS is always supported, set_default_vmx_state() adds 'KVM_STATE_NESTED_EVMCS' to 'flags' and the following branch of vmx_set_nested_state() is executed: if ((kvm_state->flags & KVM_STATE_NESTED_EVMCS) && (!guest_can_use(vcpu, X86_FEATURE_VMX) || !vmx->nested.enlightened_vmcs_enabled)) return -EINVAL; as 'enlightened_vmcs_enabled' is false. In fact, "vmxon_pa == vmcs12_pa == -1ull" is a valid state when not tainted by wrong flags so the test should aim for this branch: if (kvm_state->hdr.vmx.vmxon_pa == INVALID_GPA) return 0; Test all this properly: - Without KVM_STATE_NESTED_EVMCS in the flags, the expected return value is '0'. - With KVM_STATE_NESTED_EVMCS flag (when supported) set, the expected return value is '-EINVAL' prior to enabling eVMCS and '0' after. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-11-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 6dac1195181cb561a1ac32b92f58c92e87a91c70 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:23 2023 +0100 KVM: selftests: Make Hyper-V tests explicitly require KVM Hyper-V support In preparation for conditional Hyper-V emulation enablement in KVM, make Hyper-V specific tests skip gracefully instead of failing when KVM support for emulating Hyper-V is not there. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-10-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit b2e02f82b7f76234305c5a7fba4dbebc47ce4cb5 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:22 2023 +0100 KVM: nVMX: Split off helper for emulating VMCLEAR on Hyper-V eVMCS To avoid overloading handle_vmclear() with Hyper-V specific details and to prepare the code to making Hyper-V emulation optional, create a dedicated nested_evmcs_handle_vmclear() helper. No functional change intended. Suggested-by: Sean Christopherson Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20231205103630.1391318-9-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit af9d544a452114eb54638015544b884e1befd0fb Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:21 2023 +0100 KVM: x86: Introduce helper to handle Hyper-V paravirt TLB flush requests As a preparation to making Hyper-V emulation optional, introduce a helper to handle pending KVM_REQ_HV_TLB_FLUSH requests. No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-8-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit e7ad84db4d718e18c7a133e941ba4c7d4c6d4cbf Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:20 2023 +0100 KVM: VMX: Split off hyperv_evmcs.{ch} Some Enlightened VMCS related code is needed both by Hyper-V on KVM and KVM on Hyper-V. As a preparation to making Hyper-V emulation optional, create dedicated 'hyperv_evmcs.{ch}' files which are used by both. No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-7-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 0659262a2625ca3e4061796cd4f4935091220056 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:19 2023 +0100 KVM: x86: Introduce helper to check if vector is set in Hyper-V SynIC As a preparation to making Hyper-V emulation optional, create a dedicated kvm_hv_synic_has_vector() helper to avoid extra ifdefs in lapic.c. No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-6-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 16e880bfa6377871da233c846ecdf23db2bf1d97 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:18 2023 +0100 KVM: x86: Introduce helper to check if auto-EOI is set in Hyper-V SynIC As a preparation to making Hyper-V emulation optional, create a dedicated kvm_hv_synic_auto_eoi_set() helper to avoid extra ifdefs in lapic.c No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-5-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 50a82b0eb88c108d1ebc73a97f5b81df0d5918e0 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:17 2023 +0100 KVM: VMX: Split off vmx_onhyperv.{ch} from hyperv.{ch} hyperv.{ch} is currently a mix of stuff which is needed by both Hyper-V on KVM and KVM on Hyper-V. As a preparation to making Hyper-V emulation optional, put KVM-on-Hyper-V specific code into dedicated files. No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-4-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit cfef5af3cb0e57501dcac2816ab11a20c074866d Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:16 2023 +0100 KVM: x86: Move Hyper-V partition assist page out of Hyper-V emulation context Hyper-V partition assist page is used when KVM runs on top of Hyper-V and is not used for Windows/Hyper-V guests on KVM, this means that 'hv_pa_pg' placement in 'struct kvm_hv' is unfortunate. As a preparation to making Hyper-V emulation optional, move 'hv_pa_pg' to 'struct kvm_arch' and put it under CONFIG_HYPERV. While on it, introduce hv_get_partition_assist_page() helper to allocate partition assist page. Move the comment explaining why we use a single page for all vCPUs from VMX and expand it a bit. No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-3-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 87562052c965ba7de6dc490434e53691fe46c898 Author: Vitaly Kuznetsov Date: Tue Dec 5 11:36:15 2023 +0100 KVM: x86/xen: Remove unneeded xen context from kvm_arch when !CONFIG_KVM_XEN Saving a few bytes of memory per KVM VM is certainly great but what's more important is the ability to see where the code accesses Xen emulation context while CONFIG_KVM_XEN is not enabled. Currently, kvm_cpu_get_extint() is the only such place and it is harmless: kvm_xen_has_interrupt() always returns '0' when !CONFIG_KVM_XEN. No functional change intended. Reviewed-by: Maxim Levitsky Tested-by: Jeremi Piotrowski Signed-off-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231205103630.1391318-2-vkuznets@redhat.com Signed-off-by: Sean Christopherson commit 3310288f61357b9b54139c93fc7665d60c0288bf Author: Javier Martinez Canillas Date: Mon Nov 13 09:51:41 2023 +0100 of/platform: Disable sysfb if a simple-framebuffer node is found Some DT platforms use EFI to boot and in this case the EFI Boot Services may register a EFI_GRAPHICS_OUTPUT_PROTOCOL handle, that will later be queried by the Linux EFI stub to fill the global struct screen_info data. The data is used by the Generic System Framebuffers (sysfb) framework to add a platform device with platform data about the system framebuffer. But if there is a "simple-framebuffer" node in the DT, the OF core will also do the same and add another device for the system framebuffer. This could lead for example, to two platform devices ("simple-framebuffer" and "efi-framebuffer") to be added and matched with their corresponding drivers. So both efifb and simpledrm will be probed, leading to following: [ 0.055752] efifb: framebuffer at 0xbd58dc000, using 16000k, total 16000k [ 0.055755] efifb: mode is 2560x1600x32, linelength=10240, pages=1 [ 0.055758] efifb: scrolling: redraw [ 0.055759] efifb: Truecolor: size=2:10:10:10, shift=30:20:10:0 ... [ 3.295896] simple-framebuffer bd58dc000.framebuffer: [drm] *ERROR* could not acquire memory range [??? 0xffff79f30a29ee40-0x2a5000001a7 flags 0x0]: -16 [ 3.298018] simple-framebuffer: probe of bd58dc000.framebuffer failed with error -16 To prevent the issue, make the OF core to disable sysfb if there is a node with a "simple-framebuffer" compatible. That way only this device will be registered and sysfb would not attempt to register another one using the screen_info data even if this has been filled. This seems the correct thing to do in this case because: a) On a DT platform, the DTB is the single source of truth since is what describes the hardware topology. Even if EFI Boot Services are used to boot the machine. b) The of_platform_default_populate_init() function is called in the arch_initcall_sync() initcall level while the sysfb_init() function is called later in the subsys_initcall() initcall level. Reported-by: Andrew Worsley Closes: https://lore.kernel.org/all/20231111042926.52990-2-amworsley@gmail.com Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20231113085305.1823455-1-javierm@redhat.com Signed-off-by: Rob Herring commit 1aa77a7ed020721c6c4a3da16ea3a970f2ce4eea Author: Johan Hovold Date: Wed Dec 6 12:17:53 2023 +0100 dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Clean up example The SPMI PMIC sits on an SPMI bus which and has two address cells with no size. Clean up the example by adding a parent SPMI bus node with proper '#address-cells' and '#size-cells' properties, using a define for the second register value, dropping the unnecessary label and increasing the indentation to four spaces. Signed-off-by: Johan Hovold Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231206111754.7410-4-johan+linaro@kernel.org Signed-off-by: Lee Jones commit d5c005ff9fe33dc7c2c3e13d1bdca698f441ac86 Author: Johan Hovold Date: Wed Dec 6 12:17:52 2023 +0100 dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Fix regulator binding The regulator child nodes do not have unit addresses so drop the incorrect '#address-cells' and '#size-cells' properties from the parent 'regulators' node. Fixes: 352335a6aced ("staging: hikey9xx: hisilicon, hi6421-spmi-pmic.yaml: simplify props") Signed-off-by: Johan Hovold Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231206111754.7410-3-johan+linaro@kernel.org Signed-off-by: Lee Jones commit e23f1530eab97e8d9dfbbdd9af3802c9c1e026a4 Author: Johan Hovold Date: Wed Dec 6 12:17:51 2023 +0100 dt-bindings: mfd: hisilicon,hi6421-spmi-pmic: Fix up binding reference Fix up the SPMI PMIC binding document free text reference which erroneously referred to itself rather than the parent SPMI controller binding as intended. Fixes: 9e5917288545 ("dt: document HiSilicon SPMI controller and mfd/regulator properties") Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231206111754.7410-2-johan+linaro@kernel.org Signed-off-by: Lee Jones commit 56fdc35ef067c8dffee22038dd3a84bb3fa6d2a4 Author: Konrad Dybcio Date: Wed Nov 29 15:44:01 2023 +0100 dt-bindings: firmware: qcom,scm: Allow interconnect for everyone Every Qualcomm SoC physically has a "CRYPTO0<->DDR" interconnect lane. Allow this property to be present, no matter the SoC. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-4-4cbb567743bb@linaro.org Signed-off-by: Bjorn Andersson commit 264beb3cbd0dc6d78357aa382297d5c94ffb4a3e Author: Luka Panio Date: Sat Nov 25 23:03:15 2023 +0100 arm64: dts: qcom: sm8250-xiaomi-pipa: Add initial device tree Initial support for Xiaomi Pad 6 tablet, that have sm8250 soc. Signed-off-by: Luka Panio Acked-by: Krzysztof Kozlowski Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125220315.118922-2-lukapanio@gmail.com Signed-off-by: Bjorn Andersson commit 25bb226508a1384723b201da8bd5c16ac57f34cd Author: Luka Panio Date: Sat Nov 25 23:03:14 2023 +0100 dt-bindings: arm: qcom: Add Xiaomi Pad 6 (xiaomi-pipa) Add a compatible for Xiaomi Pad 6. Acked-by: Conor Dooley Signed-off-by: Luka Panio Link: https://lore.kernel.org/r/20231125220315.118922-1-lukapanio@gmail.com Signed-off-by: Bjorn Andersson commit 33eae059ccaf71f6243dd919add405dfefd275e7 Author: Alex Elder Date: Fri Nov 24 12:17:18 2023 -0600 arm64: dts: qcom: sm8550-qrd: enable IPA Enable IPA on the SM8550 QRD. The GSI firmware on this platform is loaded by the AP. Signed-off-by: Alex Elder Tested-by: Neil Armstrong # on SM8550-QRD Link: https://lore.kernel.org/r/20231124181718.915208-3-elder@linaro.org Signed-off-by: Bjorn Andersson commit 32c5a8b93ba543e3cc596b0272b5ed7fac82278c Author: Alex Elder Date: Fri Nov 24 12:17:17 2023 -0600 arm64: dts: qcom: sm8550: add IPA information Add IPA-related nodes and definitions to "sm8550.dtsi", which uses IPA v5.5. Signed-off-by: Alex Elder Tested-by: Neil Armstrong # on SM8550-QRD Link: https://lore.kernel.org/r/20231124181718.915208-2-elder@linaro.org Signed-off-by: Bjorn Andersson commit 696945e427e63ebbabad656893fb82da1ee2a980 Author: Sibi Sankar Date: Fri Nov 24 15:36:07 2023 +0530 dt-bindings: firmware: qcom,scm: document SCM on X1E80100 SoCs Document scm compatible for X1E80100 SoCs. Signed-off-by: Sibi Sankar Reviewed-by: Guru Das Srinagesh Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124100608.29964-5-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit ef9284a55a78bf712e0bbe12b0d72d0a8ccd005e Author: Sibi Sankar Date: Fri Nov 24 15:36:04 2023 +0530 dt-bindings: arm: qcom-soc: extend pattern matching for X1E80100 SoC Extend pattern matching to support the X1E platform name. Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124100608.29964-2-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit dd744d7d15294816bed9d66c7f815d8b24ccd22f Author: Krzysztof Kozlowski Date: Fri Nov 24 10:50:49 2023 +0100 arm64: dts: qcom: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231124095049.58618-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 6dedbd246cb694f5de49782de83c82af42a4b5d5 Author: Krzysztof Kozlowski Date: Fri Nov 24 10:50:48 2023 +0100 ARM: dts: qcom: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231124095049.58618-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 6a25e70214fde6dcf900271c819c8d7fe7b9a4b0 Author: Robert Marko Date: Thu Nov 23 13:12:54 2023 +0100 arm64: dts: qcom: ipq8074: Add QUP4 SPI node Add node to support the QUP4 SPI controller inside of IPQ8074. Some devices use this bus to communicate to a Bluetooth controller. Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20231123121324.1046164-1-robimarko@gmail.com Signed-off-by: Bjorn Andersson commit 66ec7b4f471300003c13b87a99bbd55255da5ba9 Author: Imran Shaik Date: Thu Nov 23 12:17:35 2023 +0530 arm64: dts: qcom: qdu1000: Add ECPRI clock controller Add device node for ECPRI clock controller on qcom QDU1000 and QRU1000 SoCs. Signed-off-by: Imran Shaik Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231123064735.2979802-5-quic_imrashai@quicinc.com Signed-off-by: Bjorn Andersson commit e146252ac160587f9a12cd6508d0b3e3231cd9d8 Author: Imran Shaik Date: Thu Nov 23 12:17:34 2023 +0530 clk: qcom: Add ECPRICC driver support for QDU1000 and QRU1000 Add ECPRI Clock Controller (ECPRICC) support for QDU1000 and QRU1000 SoCs. Signed-off-by: Imran Shaik Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231123064735.2979802-4-quic_imrashai@quicinc.com Signed-off-by: Bjorn Andersson commit 261625e0baa18405b057a6b3b20f839617110393 Author: Taniya Das Date: Thu Nov 23 12:17:33 2023 +0530 clk: qcom: branch: Add mem ops support for branch2 clocks Add the support for mem ops implementation to handle the sequence of enable/disable of the memories in ethernet PHY, prior to enable/disable of the respective clocks, which helps retain the respecive block's register contents. Signed-off-by: Taniya Das Signed-off-by: Imran Shaik Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231123064735.2979802-3-quic_imrashai@quicinc.com Signed-off-by: Bjorn Andersson commit cdf1c63d23721fb2ff47e5190d0f46fbae1586f6 Merge: 6ebd9a4f8b8d2 d4a599c59d2cc Author: Bjorn Andersson Date: Thu Dec 7 08:46:01 2023 -0800 Merge branch '20231123064735.2979802-2-quic_imrashai@quicinc.com' into clk-for-6.8 Merge the ECPI clock controller through a topic branch to make it possible to merge the clock constants into the DeviceTree branch as well. commit d4a599c59d2cc6f1e8a7c3debc85d7186a0caadb Author: Imran Shaik Date: Thu Nov 23 12:17:32 2023 +0530 dt-bindings: clock: qcom: Add ECPRICC clocks for QDU1000 and QRU1000 Add device tree bindings for qcom ecpri clock controller on QDU1000 and QRU1000 SoCs. Signed-off-by: Imran Shaik Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231123064735.2979802-2-quic_imrashai@quicinc.com Signed-off-by: Bjorn Andersson commit 0f2d06dd1910cc7f6591620a2070d44ca3f56551 Author: Conor Dooley Date: Thu Dec 7 16:43:29 2023 +0000 MAINTAINERS: add auto-update driver to mpfs entry Rob's scripts were broken by the lack of a maintainer for this file, while trying to fix an integration issue in linux-next. Add it to the existing entry for PolarFire SoC drivers so that when the next bug is found the contributor knows where to send it. Reported-by: Rob Herring Signed-off-by: Conor Dooley commit 6ebd9a4f8b8d2b35cf965a04849c4ba763722f13 Author: Satya Priya Kakitapalli Date: Wed Nov 22 09:58:14 2023 +0530 clk: qcom: gpucc-sm8150: Update the gpu_cc_pll1 config Update the test_ctl_hi_val and test_ctl_hi1_val of gpu_cc_pll1 as per latest HW recommendation. Fixes: 0cef71f2ccc8 ("clk: qcom: Add graphics clock controller driver for SM8150") Signed-off-by: Satya Priya Kakitapalli Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231122042814.4158076-1-quic_skakitap@quicinc.com Signed-off-by: Bjorn Andersson commit 17fc6f391932dfc8c11634667ca2d1d24c961cf5 Author: Neil Armstrong Date: Tue Nov 21 10:51:11 2023 +0100 arm64: deconfig: enable Qualcomm SM8650 SoC drivers Enable Clocks, Pinctrl and Interconnect drivers in the ARM64 defconfig for the Qualcomm SM8650 SoC to boot the SM8650 MTP (Mobile Test Platform) and QRD (Qualcomm Reference Device) boards. TCSRCC, GCC, Interconnect, and Pinctrl config are marked as builtin and not modules due to boot dependencies. Signed-off-by: Neil Armstrong Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231121-topic-sm8650-upstream-defconfig-v1-1-2500565fc21b@linaro.org Signed-off-by: Bjorn Andersson commit d50b5cb1a8f7db8ad2dc6a13f0cabedf7a7e1540 Author: Dang Huynh Date: Tue Nov 21 12:35:02 2023 +0700 soc: qcom: socinfo: Add PM8937 Power IC The PM8917 and PM8937 uses the same SUBTYPE ID. The PM8937 is found in boards with MSM8917, MSM8937 and MSM8940 and APQ variants. Signed-off-by: Dang Huynh Link: https://lore.kernel.org/r/20231121-pm8937-v2-4-b0171ab62075@riseup.net Signed-off-by: Bjorn Andersson commit d0ec3c4c11c3b30e1f2d344973b2a7bf0f986734 Author: Johan Hovold Date: Mon Nov 20 17:43:21 2023 +0100 ARM: dts: qcom: sdx55: fix USB wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Fixes: fea4b41022f3 ("ARM: dts: qcom: sdx55: Add USB3 and PHY support") Cc: stable@vger.kernel.org # 5.12 Cc: Manivannan Sadhasivam Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231120164331.8116-2-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 405820eae72f1b51a4c46a81adf3c3de320c5688 Author: Rob Herring Date: Thu Dec 7 10:14:30 2023 -0600 firmware: microchip: Replace of_device.h with explicit include The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. Soon the implicit includes are going to be removed. of_device.h isn't needed, but platform_device.h is. Reported-by: Stephen Rothwell Signed-off-by: Rob Herring Signed-off-by: Conor Dooley commit 29d91ecf530a4ef0b7f94cb8cde07ed69731e45d Author: Johan Hovold Date: Mon Nov 20 17:43:31 2023 +0100 arm64: dts: qcom: sm8550: fix USB wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Note that only triggering on rising edges can be used to detect resume events but not disconnect events. Fixes: 7f7e5c1b037f ("arm64: dts: qcom: sm8550: Add USB PHYs and controller nodes") Cc: Abel Vesa Signed-off-by: Johan Hovold Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20231120164331.8116-12-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 54524b6987d1fffe64cbf3dded1b2fa6b903edf9 Author: Johan Hovold Date: Mon Nov 20 17:43:30 2023 +0100 arm64: dts: qcom: sm8150: fix USB wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Fixes: 0c9dde0d2015 ("arm64: dts: qcom: sm8150: Add secondary USB and PHY nodes") Fixes: b33d2868e8d3 ("arm64: dts: qcom: sm8150: Add USB and PHY device nodes") Cc: stable@vger.kernel.org # 5.10 Cc: Jonathan Marek Cc: Jack Pham Signed-off-by: Johan Hovold Reviewed-by: Jack Pham Link: https://lore.kernel.org/r/20231120164331.8116-11-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 41952be6661b20f56c2c5b06c431880dd975b747 Author: Johan Hovold Date: Mon Nov 20 17:43:29 2023 +0100 arm64: dts: qcom: sm6375: fix USB wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Fixes: 59d34ca97f91 ("arm64: dts: qcom: Add initial device tree for SM6375") Cc: stable@vger.kernel.org # 6.2 Cc: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231120164331.8116-10-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 84ad9ac8d9ca29033d589e79a991866b38e23b85 Author: Johan Hovold Date: Mon Nov 20 17:43:28 2023 +0100 arm64: dts: qcom: sdm845: fix USB wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Fixes: ca4db2b538a1 ("arm64: dts: qcom: sdm845: Add USB-related nodes") Cc: stable@vger.kernel.org # 4.20 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231120164331.8116-9-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit de3b3de30999106549da4df88a7963d0ac02b91e Author: Johan Hovold Date: Mon Nov 20 17:43:27 2023 +0100 arm64: dts: qcom: sdm670: fix USB wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Fixes: 07c8ded6e373 ("arm64: dts: qcom: add sdm670 and pixel 3a device trees") Cc: stable@vger.kernel.org # 6.2 Cc: Richard Acayan Signed-off-by: Johan Hovold Acked-by: Richard Acayan Link: https://lore.kernel.org/r/20231120164331.8116-8-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 0dc0f6da3d43da8d2297105663e51ecb01b6f790 Author: Johan Hovold Date: Mon Nov 20 17:43:26 2023 +0100 arm64: dts: qcom: sc8180x: fix USB wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Fixes: b080f53a8f44 ("arm64: dts: qcom: sc8180x: Add remoteprocs, wifi and usb nodes") Cc: stable@vger.kernel.org # 6.5 Cc: Vinod Koul Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231120164331.8116-7-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 24f8aba9a7c77c7e9d814a5754798e8346c7dd28 Author: Johan Hovold Date: Mon Nov 20 17:43:25 2023 +0100 arm64: dts: qcom: sc7280: fix usb_2 wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Note that only triggering on rising edges can be used to detect resume events but not disconnect events. Fixes: bb9efa59c665 ("arm64: dts: qcom: sc7280: Add USB related nodes") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231120164331.8116-6-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit c34199d967a946e55381404fa949382691737521 Author: Johan Hovold Date: Mon Nov 20 17:43:24 2023 +0100 arm64: dts: qcom: sc7280: fix usb_1 wakeup interrupt types A recent cleanup reordering the usb_1 wakeup interrupts inadvertently switched the DP and SuperSpeed interrupt trigger types. Fixes: 4a7ffc10d195 ("arm64: dts: qcom: align DWC3 USB interrupts with DT schema") Cc: stable@vger.kernel.org # 5.19 Cc: Krzysztof Kozlowski Signed-off-by: Johan Hovold Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231120164331.8116-5-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 9b956999bf725fd62613f719c3178fdbee6e5f47 Author: Johan Hovold Date: Mon Nov 20 17:43:23 2023 +0100 arm64: dts: qcom: sc7180: fix USB wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes") Cc: stable@vger.kernel.org # 5.10 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231120164331.8116-4-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 0984bc0165f7c5203dfffe8cdb5186995f628a80 Author: Johan Hovold Date: Mon Nov 20 17:43:22 2023 +0100 arm64: dts: qcom: sa8775p: fix USB wakeup interrupt types The DP/DM wakeup interrupts are edge triggered and which edge to trigger on depends on use-case and whether a Low speed or Full/High speed device is connected. Note that only triggering on rising edges can be used to detect resume events but not disconnect events. Fixes: de1001525c1a ("arm64: dts: qcom: sa8775p: add USB nodes") Cc: Shazad Hussain Signed-off-by: Johan Hovold Reviewed-by: Andrew Halaney Link: https://lore.kernel.org/r/20231120164331.8116-3-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 12fbe58560d6f974339cc30e44c0c5452db331da Author: Nikita Travkin Date: Mon Nov 20 19:03:05 2023 +0500 arm64: dts: qcom: msm8916-longcheer-l8150: Add battery and charger Longcheer L8150 doesn't have any dedicated fuel-gauge or charger, instead making use of the pmic hardware blocks for those purposes. Add pm8916 bms and charger, as well as the battery cell description that those blocks rely on. Reviewed-by: Konrad Dybcio Signed-off-by: Nikita Travkin Link: https://lore.kernel.org/r/20231120-pm8916-dtsi-bms-lbc-v4-3-4f91056c8252@trvn.ru Signed-off-by: Bjorn Andersson commit 26b87a3dc3337315c9834aa94e01da7030ec2e6c Author: Nikita Travkin Date: Mon Nov 20 19:03:04 2023 +0500 arm64: dts: qcom: pm8916: Add BMS and charger pm8916 contains some hardware blocks for battery powered devices: - VM-BMS: Battery voltage monitoring block. - LBC: Linear battery charger. Add them to the pmic dtsi so the devices that make use of those blocks can enable them. Signed-off-by: Nikita Travkin Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231120-pm8916-dtsi-bms-lbc-v4-2-4f91056c8252@trvn.ru Signed-off-by: Bjorn Andersson commit 6a7f8c635dab30233df93b5566d4169ed956b71b Author: Konrad Dybcio Date: Mon Nov 20 13:12:55 2023 +0100 arm64: dts: qcom: sc7280: Add 0xac Adreno speed bin A643 (A635 speedbin 0xac) tops out at 812 MHz. Fill in the opp-supported-hw appropriately. Note that fuseval 0xac is referred to as speedbin 1 downstream, but that was already in use upstream, so 2 was chosen instead. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230926-topic-a643-v2-4-06fa3d899c0a@linaro.org Signed-off-by: Bjorn Andersson commit 31edad478534186a2718be9206ce7b19f2735f6e Author: Konrad Dybcio Date: Mon Nov 20 13:12:54 2023 +0100 arm64: dts: qcom: sc7280: Mark Adreno SMMU as DMA coherent The SMMUs on sc7280 are cache-coherent. APPS_SMMU is marked as such, mark the GPU one as well. Fixes: 96c471970b7b ("arm64: dts: qcom: sc7280: Add gpu support") Reviewed-by: Akhil P Oommen Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230926-topic-a643-v2-3-06fa3d899c0a@linaro.org Signed-off-by: Bjorn Andersson commit 94085049fdad7a36fe14dd55e72e712fe55d6bca Author: Konrad Dybcio Date: Mon Nov 20 13:12:53 2023 +0100 arm64: dts: qcom: sc7280: Fix up GPU SIDs GPU_SMMU SID 1 is meant for Adreno LPAC (Low Priority Async Compute). On platforms that support it (in firmware), it is necessary to describe that link, or Adreno register access will hang the board. The current settings are functionally identical, *but* due to what is likely hardcoded security policies, the secure firmware rejects them, resulting in the board hanging. To avoid that, alter the settings such that SID 0 and 1 are described separately. Fixes: 96c471970b7b ("arm64: dts: qcom: sc7280: Add gpu support") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230926-topic-a643-v2-2-06fa3d899c0a@linaro.org Signed-off-by: Bjorn Andersson commit 0ab1bef0b7c359e672cc2b8d51f0179cefa369fc Author: Konrad Dybcio Date: Mon Nov 20 13:12:52 2023 +0100 arm64: dts: qcom: sc7280: Add ZAP shader support Non-Chrome SC7280-family platforms ship a ZAP shader with the Adreno GPU. Describe that and make sure it doesn't interfere with Chrome devices. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230926-topic-a643-v2-1-06fa3d899c0a@linaro.org Signed-off-by: Bjorn Andersson commit 08105d9a5490551d86d95729bbbd3161652850dd Author: Krzysztof Kozlowski Date: Mon Nov 20 11:06:17 2023 +0100 dt-bindings: arm: qcom-soc: extend pattern for matching existing SoCs Add missing QDU, QRU and SDA platform names to the pattern matching all Qualcomm compatibles. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231120100617.47156-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit b3cf69a43502a8836b6d615c8aba05b88f00d8d8 Author: Rajendra Nayak Date: Fri Nov 17 15:23:15 2023 +0530 soc: qcom: llcc: Add configuration data for X1E80100 Add LLCC configuration data for X1E80100 SoC. Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20231117095315.2087-3-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit e9ceb595c2d30edb2879f173f8d0dbbedd5e301c Author: Rajendra Nayak Date: Fri Nov 17 15:23:14 2023 +0530 dt-bindings: cache: qcom,llcc: Add X1E80100 compatible Add the compatible for X1E80100 platforms. Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231117095315.2087-2-quic_sibis@quicinc.com Signed-off-by: Bjorn Andersson commit a8db1c061f8b4d6881253640119f651031eb3786 Author: Rohit Agarwal Date: Fri Nov 17 13:37:37 2023 +0530 arm64: dts: qcom: sdx75-idp: Enable USB3 and PHY support Enable the support for USB3 controller, QMP PHY and HS PHY on SDX75 IDP. Signed-off-by: Rohit Agarwal Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231117080737.606687-4-quic_rohiagar@quicinc.com Signed-off-by: Bjorn Andersson commit f47303a8d0b50e762930d4d09ea883fd741394ea Author: Rohit Agarwal Date: Fri Nov 17 13:37:36 2023 +0530 arm64: dts: qcom: Add USB3 and PHY support on SDX75 Add devicetree nodes for enabling USB3 controller, Qcom QMP PHY and HS PHY on SDX75. Signed-off-by: Rohit Agarwal Acked-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231117080737.606687-3-quic_rohiagar@quicinc.com Signed-off-by: Bjorn Andersson commit ea72a527bd205283db08287cd49737e889788065 Author: Rohit Agarwal Date: Fri Nov 17 13:37:35 2023 +0530 arm64: dts: qcom: Add interconnect nodes for SDX75 Add interconnect nodes to support interconnects on SDX75. Also parallely add the interconnect property for UART required so that the bootup to shell does not break with interconnects in place. Signed-off-by: Rohit Agarwal Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231117080737.606687-2-quic_rohiagar@quicinc.com Signed-off-by: Bjorn Andersson commit 3515c3172f66ad4b3f485862f858f76a3e49c659 Author: Rohit Agarwal Date: Fri Nov 17 11:28:49 2023 +0530 arm64: defconfig: Enable GCC, pinctrl and interconnect for SDX75 Enable Global Clock controller, pinctrl and interconnect framework support for Qualcomm's SDX75 SoC which is required to boot to console on sdx75-idp platform. Signed-off-by: Rohit Agarwal Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231117055849.534671-1-quic_rohiagar@quicinc.com Signed-off-by: Bjorn Andersson commit 54ee322f845c7f25fbf6e43e11147b6cae8eff56 Author: Nia Espera Date: Sat Nov 11 23:07:42 2023 +0100 arm64: dts: qcom: sm8350: Fix remoteproc interrupt type In a similar vein to https://lore.kernel.org/lkml/20220530080842.37024-3-manivannan.sadhasivam@linaro.org/, the remote processors on sm8350 fail to initialize with the 'correct' (i.e., specified in downstream) IRQ type. Change this to EDGE_RISING. Signed-off-by: Nia Espera Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231111-nia-sm8350-for-upstream-v4-4-3a638b02eea5@igalia.com Signed-off-by: Bjorn Andersson commit e70537717146b380e18f0c92669d968af4acb8a7 Author: Nia Espera Date: Sat Nov 11 23:07:41 2023 +0100 arm64: dts: qcom: pm8350k: Remove hanging whitespace pmk8350 has a random tab character inserted, so remove it. Reviewed-by: Konrad Dybcio Signed-off-by: Nia Espera Link: https://lore.kernel.org/r/20231111-nia-sm8350-for-upstream-v4-3-3a638b02eea5@igalia.com Signed-off-by: Bjorn Andersson commit 01a9e9eb6cdbce175ddea3cbe1163daed6d54344 Author: Nia Espera Date: Sat Nov 11 23:07:40 2023 +0100 arm64: dts: qcom: sm8350: Fix DMA0 address DMA0 node downstream is specified at 0x900000, so fix the typo. Without this, enabling any i2c node using DMA0 causes a hang. Fixes: bc08fbf49bc8 ("arm64: dts: qcom: sm8350: Define GPI DMA engines") Fixes: 41d6bca799b3 ("arm64: dts: qcom: sm8350: correct DMA controller unit address") Reviewed-by: Konrad Dybcio Signed-off-by: Nia Espera Link: https://lore.kernel.org/r/20231111-nia-sm8350-for-upstream-v4-2-3a638b02eea5@igalia.com Signed-off-by: Bjorn Andersson commit 7bf421f44549cd0bca32bd0b4cf6e4cfe5b4f865 Author: Nia Espera Date: Sat Nov 11 23:07:39 2023 +0100 dt-bindings: iio: adc: qcom: Add Qualcomm smb139x Bindings for a charger controller chip found on sm8350 Signed-off-by: Nia Espera Acked-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20231111-nia-sm8350-for-upstream-v4-1-3a638b02eea5@igalia.com Signed-off-by: Bjorn Andersson commit 4d8ff6b0991d5e86b17b235fc46ec62e9195cb9b Author: Amit Kumar Mahapatra Date: Sat Nov 25 14:51:30 2023 +0530 spi: Add multi-cs memories support in SPI core AMD-Xilinx GQSPI controller has two advanced mode that allows the controller to consider two flashes as one single device. One of these two mode is the parallel mode in which each byte of data is stored in both devices, the even bits in the lower flash & the odd bits in the upper flash. The byte split is automatically handled by the QSPI controller. The other mode is the stacked mode in which both the flashes share the same SPI bus but each of the device contain half of the data. In this mode, the controller does not follow CS requests but instead internally wires the two CS levels with the value of the most significant address bit. For supporting both these modes SPI core need to be updated for providing multiple CS for a single SPI device. For adding multi CS support the SPI device need to be aware of all the CS values. So, the "chip_select" member in the spi_device structure is now an array that holds all the CS values. spi_device structure now has a "cs_index_mask" member. This acts as an index to the chip_select array. If nth bit of spi->cs_index_mask is set then the driver would assert spi->chip_select[n]. In parallel mode all the chip selects are asserted/de-asserted simultaneously and each byte of data is stored in both devices, the even bits in one, the odd bits in the other. The split is automatically handled by the GQSPI controller. The GQSPI controller supports a maximum of two flashes connected in parallel mode. A SPI_CONTROLLER_MULTI_CS flag bit is added in the spi controller flags, through ctlr->flags the spi core will make sure that the controller is capable of handling multiple chip selects at once. For supporting multiple CS via GPIO the cs_gpiod member of the spi_device structure is now an array that holds the gpio descriptor for each chipselect. CS GPIO is not tested on our hardware, but it has been tested by @Stefan https://lore.kernel.org/all/005001da1efc$619ad5a0$24d080e0$@opensource.cirrus.com/ Signed-off-by: Amit Kumar Mahapatra Tested-by: Stefan Binding Link: https://lore.kernel.org/r/20231125092137.2948-4-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit f05e2f61fe88092e0d341ea27644a84e3386358d Author: Amit Kumar Mahapatra Date: Sat Nov 25 14:51:29 2023 +0530 ALSA: hda/cs35l56: Use set/get APIs to access spi->chip_select In preparation for adding multiple CS support for a device, set/get functions were introduces accessing spi->chip_select in 'commit 303feb3cc06a ("spi: Add APIs in spi core to set/get spi->chip_select and spi->cs_gpiod")'. Replace spi->chip_select with spi_get_chipselect() API. Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20231125092137.2948-3-amit.kumar-mahapatra@amd.com Signed-off-by: Mark Brown commit cdecce12d55cfd25b4b8755abc3c0b320e45d1d7 Author: Krzysztof Kozlowski Date: Sat Nov 11 21:47:25 2023 +0100 arm64: dts: qcom: sc8180x: align APSS with bindings SC8180x APSS Devicetree bindings expect qcom,sc8180x-apss-shared to use qcom,sdm845-apss-shared fallback: sc8180x-lenovo-flex-5g.dtb: mailbox@17c00000: compatible: 'oneOf' conditional failed, one must be fixed: ['qcom,sc8180x-apss-shared'] is too short Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231111204725.35707-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 0d10ac7d2d9420d143ee738abbb06a9201e611b9 Author: Krzysztof Kozlowski Date: Sat Nov 11 17:42:29 2023 +0100 arm64: dts: qcom: sm6375-pdx225: add fixed touchscreen AVDD regulator The Samsung S6SY761 touchscreen bindings expect AVDD regulator which is missing in the Sony Xperia PDX225 DTS. There is however pinctrl setting for in the touchscreen device node with similar name: "avdd", so assume author wanted to control a fixed regulator with a GPIO. This fixes dtbs_check warning: sm6375-sony-xperia-murray-pdx225.dtb: touchscreen@48: 'avdd-supply' is a required property Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231111164229.63803-6-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 67e4656f4487b95a39e45884c99235f62ebfaa47 Author: Krzysztof Kozlowski Date: Sat Nov 11 17:42:28 2023 +0100 arm64: dts: qcom: sm6125: add interrupts to DWC3 USB controller Add interrupts to SM6125 DWC3 USB controller, based on downstream/vendor code of Trinket DTSI from Xiaomi Laurel device, to fix dtbs_check warnings: sm6125-xiaomi-laurel-sprout.dtb: usb@4ef8800: 'interrupt-names' is a required property sm6125-xiaomi-laurel-sprout.dtb: usb@4ef8800: 'oneOf' conditional failed, one must be fixed: 'interrupts' is a required property 'interrupts-extended' is a required property Signed-off-by: Krzysztof Kozlowski Fixes: cff4bbaf2a2d ("arm64: dts: qcom: Add support for SM6125") Reviewed-by: Marijn Suijten Link: https://lore.kernel.org/r/20231111164229.63803-5-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit f52f11271d90b1361a8364729a63a36b7456bc89 Author: Krzysztof Kozlowski Date: Sat Nov 11 17:42:27 2023 +0100 arm64: dts: qcom: sm6115: align mem timer size cells with bindings Commit 70d1e09ebf19 ("arm64: dts: qcom: sm6115: Use 64 bit addressing") converted all addresses to 64-bit addressing, but the ARMv7 memory mapped architected timer bindings expect sizes up to 32-bit. Keep 64-bit addressing but change size of memory mapping to 32-bit (size-cells=1) and adjust the ranges to match this. This fixes dtbs_check warnings like: sm6115p-lenovo-j606f.dtb: timer@f120000: #size-cells:0:0: 1 was expected Signed-off-by: Krzysztof Kozlowski Tested-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231111164229.63803-4-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit af6f6778d34cb40e60368e288767f674cc0c5f60 Author: Krzysztof Kozlowski Date: Sat Nov 11 17:42:26 2023 +0100 arm64: dts: qcom: sm8150: use 'gpios' suffix for PCI GPIOs Linux handles both versions, but bindings expect GPIO properties to have 'gpios' suffix instead of 'gpio': sa8155p-adp.dtb: pci@1c00000: Unevaluated properties are not allowed ('perst-gpio' was unexpected) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231111164229.63803-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 9a1bd36aeb31649bc499f87671b76c7d117197e6 Author: Krzysztof Kozlowski Date: Sat Nov 11 17:42:25 2023 +0100 arm64: dts: qcom: sc8180x-primus: use 'gpios' suffix for PCI GPIOs Linux handles both versions, but bindings expect GPIO properties to have 'gpios' suffix instead of 'gpio': sc8180x-primus.dtb: pci@1c10000: Unevaluated properties are not allowed ('perst-gpio', 'wake-gpio' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231111164229.63803-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit fdff2141be44696f5cc69f2f6c20c26b9ac00760 Author: Krzysztof Kozlowski Date: Sat Nov 11 17:42:24 2023 +0100 arm64: dts: qcom: sc8180x-flex-5g: use 'gpios' suffix for PCI GPIOs Linux handles both versions, but bindings expect GPIO properties to have 'gpios' suffix instead of 'gpio': sc8180x-lenovo-flex-5g.dtb: pci@1c08000: Unevaluated properties are not allowed ('perst-gpio', 'wake-gpio' were unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231111164229.63803-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit db7fac15eaf0f09d675730d7002edabe27fe9e1d Author: Ping-Ke Shih Date: Mon Dec 4 16:07:51 2023 +0800 wifi: rtw89: mac: refine SER setting during WiFi CPU power on Don't enable firmware debug mode to prevent SER flow stuck due to fail to reset payload buffer, and clear HALT_C2H_INT to avoid handling unexpected interrupt at beginning. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231204080751.15354-6-pkshih@realtek.com commit 6f8d36552bab7dc83d8aba89311d6039c53eb6a1 Author: Chia-Yuan Li Date: Mon Dec 4 16:07:50 2023 +0800 wifi: rtw89: 8922a: dump MAC registers when SER occurs To diagnose the reason why firmware or hardware get abnormal, add to dump MAC registers related to counters and interrupt masks. With these values, people can classify problems and check if registers values are unexpected, and then correct them. However, it could possible false alarm because firmware triggers this SER event by wrong conditions that we should correct it at firmware or register settings. In field, SER might happen under special conditions, and very hard to happen again, so dump lots of registers to provide rich information to catch the problem. Signed-off-by: Chia-Yuan Li Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231204080751.15354-5-pkshih@realtek.com commit eeb8cbb58b82904442a6c05832b97d7d27b3c48b Author: Ping-Ke Shih Date: Mon Dec 4 16:07:49 2023 +0800 wifi: rtw89: 8922a: add SER IMR tables To activate SER (system error recovery) in firmware, we have to configure IMR to trigger interrupts, and then SER can check registers to know if it need to reset hardware or notify driver to re-configure whole settings. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231204080751.15354-4-pkshih@realtek.com commit 2a68a27cd27aeb09dc74d9d800758ba0b36cb230 Author: Zong-Zhe Yang Date: Mon Dec 4 16:07:48 2023 +0800 wifi: rtw89: fw: extend program counter dump for Wi-Fi 7 chip Extend FW program counter dump for Wi-Fi 7 chip. They poll different addresses. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231204080751.15354-3-pkshih@realtek.com commit c5ece8d84303c1956b18d2aba03c4b4fc856f53e Author: Zong-Zhe Yang Date: Mon Dec 4 16:07:47 2023 +0800 wifi: rtw89: 8922a: configure CRASH_TRIGGER FW feature RTL8922A FW supports CRASH_TRIGGER feature from v0.34.30.0. After it, debugfs fw_crash can accept type 1 on RTL8922A to trigger firmware crash and verify L2 recovery. Besides, RTL8922A sync address offset of reserved payload engine. And, SER (system error recovery) tweaks conversion from WCPU address to indirect access address for RTL8922A. The new conversion works for all supported chips. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231204080751.15354-2-pkshih@realtek.com commit 74eed6f467db53b9b8b7fb225f6ac475449ad073 Author: Krzysztof Kozlowski Date: Sat Nov 11 10:56:17 2023 +0100 arm64: dts: qcom: sdm845: correct Soundwire node name Soundwire Devicetree bindings expect the Soundwire controller device node to be named just "soundwire": sdm845-db845c.dtb: swm@c85: $nodename:0: 'swm@c85' does not match '^soundwire(@.*)?$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20231111095617.16496-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 0c90c75e663246203a2b7f6dd9e08a110f4c3c43 Author: Krzysztof Kozlowski Date: Sat Nov 11 10:56:16 2023 +0100 arm64: dts: qcom: sdm845-db845c: correct LED panic indicator There is no "panic-indicator" default trigger but a property with that name: sdm845-db845c.dtb: leds: led-0: Unevaluated properties are not allowed ('linux,default-trigger' was unexpected) Fixes: 3f72e2d3e682 ("arm64: dts: qcom: Add Dragonboard 845c") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231111095617.16496-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit dc6b5562acbac0285ab3b2dad23930b6434bdfc6 Author: Krzysztof Kozlowski Date: Sat Nov 11 10:46:23 2023 +0100 arm64: dts: qcom: qrb5165-rb5: correct LED panic indicator There is no "panic-indicator" default trigger but a property with that name: qrb5165-rb5.dtb: leds: led-user4: Unevaluated properties are not allowed ('linux,default-trigger' was unexpected) Fixes: b5cbd84e499a ("arm64: dts: qcom: qrb5165-rb5: Add onboard LED support") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231111094623.12476-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit c4fb7d2eac9ff9bfc35a2e4d40c7169a332416e0 Author: Johan Hovold Date: Thu Nov 9 10:31:00 2023 +0100 soc: qcom: pmic_glink_altmode: fix port sanity check The PMIC GLINK altmode driver currently supports at most two ports. Fix the incomplete port sanity check on notifications to avoid accessing and corrupting memory beyond the port array if we ever get a notification for an unsupported port. Fixes: 080b4e24852b ("soc: qcom: pmic_glink: Introduce altmode support") Cc: stable@vger.kernel.org # 6.3 Signed-off-by: Johan Hovold Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231109093100.19971-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 48307d83c998db18db6890dccb569146eb12d313 Author: Bryan O'Donoghue Date: Thu Nov 9 00:43:11 2023 +0000 arm64: dts: qcom: sm8250: Add wakeup-source to usb_1 and usb_2 To test out a different GDSC change I wanted to have a USB keypress resume a system in suspend. Adding wakeup-source to usb_1 and usb_2 "just works" for me on rb5. Consistent with qcm2290 and sa8775p add wakeup-source to the dtsi for the SoC. Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231109004311.2449566-2-bryan.odonoghue@linaro.org Signed-off-by: Bjorn Andersson commit fdcc36cda04114878f6c752083669719a3995fce Author: Steev Klimaszewski Date: Tue Nov 7 23:17:10 2023 -0600 arm64: dts: qcom: sdm850-lenovo-yoga: Add wakeup-sources The keyboard and touchpad can be used to wake the machine up from sleep, so mark them as such in the dts file. Signed-off-by: Steev Klimaszewski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231107-wakeup-source-v2-1-bf1562ef9367@kali.org Signed-off-by: Bjorn Andersson commit 81c8ec77b86fde629d5beea1ebe42caeea57c5a4 Author: Shazad Hussain Date: Tue Nov 7 17:35:02 2023 +0530 arm64: dts: qcom: sa8775p-ride: enable pmm8654au_0_pon_resin The volume down key is controlled by PMIC via the PON hardware on sa8775p platform, so enable the same for sa8775p-ride. Signed-off-by: Shazad Hussain Link: https://lore.kernel.org/r/20231107120503.28917-1-quic_shazhuss@quicinc.com Signed-off-by: Bjorn Andersson commit fabfc74f1b3ab1801d54cf32d8e44a893340be7f Author: Krzysztof Kozlowski Date: Tue Nov 7 11:35:40 2023 +0100 arm64: dts: qcom: sm8350: move DPU opp-table to its node The Qualcomm MDSS bindings expect that DPU opp-table is defined within DPU node: sm8350-hdk.dtb: display-subsystem@ae00000: Unevaluated properties are not allowed ('opp-table' was unexpected) Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231107103540.27353-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 7613e707612e50fb73bba3e9ae1b281f36eff24b Author: Krzysztof Kozlowski Date: Tue Nov 7 11:35:39 2023 +0100 arm64: dts: qcom: sc8280xp-x13s: drop sound-dai-cells from eDisplayPort Qualcomm MDSS Embedded DisplayPort bindings do not allow sound-dai-cells: sc8280xp-lenovo-thinkpad-x13s.dtb: displayport-controller@aea0000: #sound-dai-cells: False schema does not allow [[0] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231107103540.27353-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 5a71b4719be718ffd99dfc08a457cefac4070102 Author: Krzysztof Kozlowski Date: Tue Nov 7 11:35:38 2023 +0100 arm64: dts: qcom: sc8180x-primus: drop sound-dai-cells from eDisplayPort Qualcomm MDSS Embedded DisplayPort bindings do not allow sound-dai-cells: sc8180x-primus.dtb: displayport-controller@ae9a000: #sound-dai-cells: False schema does not allow [[0]] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231107103540.27353-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit c1f52fb9a128771cfe2cae528c32b302e98398f3 Author: Krzysztof Kozlowski Date: Tue Nov 7 11:21:11 2023 +0100 arm64: dts: qcom: sm8250: correct Soundwire node name Soundwire Devicetree bindings expect the Soundwire controller device node to be named just "soundwire": sm8250-xiaomi-elish-boe.dtb: soundwire-controller@3250000: $nodename:0: 'soundwire-controller@3250000' does not match '^soundwire(@.*)?$' Reported-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231107102111.16465-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 58e8fcf992831ef3642d90115ab119c19bfdd0c5 Author: Krzysztof Kozlowski Date: Tue Nov 7 11:21:10 2023 +0100 arm64: dts: qcom: sc8280xp: correct Soundwire node name Soundwire Devicetree bindings expect the Soundwire controller device node to be named just "soundwire": sc8280xp-lenovo-thinkpad-x13s.dtb: soundwire-controller@3210000: $nodename:0: 'soundwire-controller@3210000' does not match '^soundwire(@.*)?$' Reported-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231107102111.16465-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 468cf125e4796e8ef9815e2d8d018f44cf8f1225 Author: Krzysztof Kozlowski Date: Tue Nov 7 09:04:17 2023 +0100 arm64: dts: qcom: qdu1000-idp: drop unused LLCC multi-ch-bit-off There is no "multi-ch-bit-off" property in LLCC, according to bindings and Linux driver: qdu1000-idp.dtb: system-cache-controller@19200000: 'multi-ch-bit-off' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Acked-by: Mukesh Ojha Link: https://lore.kernel.org/r/20231107080417.16700-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit b0e0290bc47dd1bc8b1bd0c6b9ec0347564f3f21 Author: Krzysztof Kozlowski Date: Tue Nov 7 09:04:16 2023 +0100 arm64: dts: qcom: qdu1000: correct LLCC reg entries According to bindings and Linux driver there is no "multi_channel_register" address space for LLCC. The first "reg" entry is supposed to be llcc0_base since commit 43aa006e074c ("dt-bindings: arm: msm: Fix register regions used for LLCC banks"): qdu1000-idp.dtb: system-cache-controller@19200000: reg: [[0, 421527552, 0, 14155776], [0, 438304768, 0, 524288], [0, 572293416, 0, 4]] is too long qdu1000-idp.dtb: system-cache-controller@19200000: reg-names:0: 'llcc0_base' was expected qdu1000-idp.dtb: system-cache-controller@19200000: reg-names: ['llcc_base', 'llcc_broadcast_base', 'multi_channel_register'] is too long Signed-off-by: Krzysztof Kozlowski Acked-by: Mukesh Ojha Link: https://lore.kernel.org/r/20231107080417.16700-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 11fcb81373de52eeb1d3ff135a8d24a4b18978d3 Author: Neil Armstrong Date: Mon Nov 6 16:58:33 2023 +0100 arm64: dts: qcom: sm8450: fix soundwire controllers node name Fix the following dt bindings check: arch/arm64/boot/dts/qcom/sm8450-hdk.dtb: soundwire-controller@31f0000: $nodename:0: 'soundwire-controller@31f0000' does not match '^soundwire(@.*)?$' from schema $id: http://devicetree.org/schemas/soundwire/qcom,soundwire.yaml# Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231106-topic-sm8450-upstream-soundwire-bindings-fix-v1-1-41d4844a5a7d@linaro.org Signed-off-by: Bjorn Andersson commit 07c88da81caf0e72c3690b689d30f0d325cfeff4 Author: Neil Armstrong Date: Mon Nov 6 15:23:57 2023 +0100 arm64: dts: qcom: sm8550: fix soundwire controllers node name Fix the following dt bindings check: arch/arm64/boot/dts/qcom/sm8550-mtp.dtb: soundwire-controller@6ab0000: $nodename:0: 'soundwire-controller@6ab0000' does not match '^soundwire(@.*)?$' from schema $id: http://devicetree.org/schemas/soundwire/qcom,soundwire.yaml# Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231106-topic-sm8550-upstream-soundwire-bindings-fix-v1-1-4ded91c805a1@linaro.org Signed-off-by: Bjorn Andersson commit 1d50607335d728ed874da41b500173faf1bc2576 Author: Neil Armstrong Date: Mon Nov 6 09:26:04 2023 +0100 clk: qcom: rpmh: add clocks for SM8650 Add RPMH Clocks for the SM8650 platform. Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-11-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit 8676fd4f3874d06cdf0c897f4f306c7b11618f6a Author: Neil Armstrong Date: Mon Nov 6 09:26:03 2023 +0100 clk: qcom: add the SM8650 GPU Clock Controller driver Add Graphics Clock Controller (GPUCC) support for SM8650 platform. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-10-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit 9e939f00833844bec64f5b2db61eb77f4ebeb795 Author: Neil Armstrong Date: Mon Nov 6 09:26:02 2023 +0100 clk: qcom: add the SM8650 Display Clock Controller driver Add Display Clock Controller (DISPCC) support for SM8650 platform. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-9-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit e3388328e47c45cc91fe74b334694fa455c1c935 Author: Neil Armstrong Date: Mon Nov 6 09:26:01 2023 +0100 clk: qcom: add the SM8650 TCSR Clock Controller driver Add TCSR Clock Controller support for SM8650 platform. Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-8-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit aa381a2bdf1dfc36468f84c8d0ceba63be25b3b3 Author: Neil Armstrong Date: Mon Nov 6 09:26:00 2023 +0100 clk: qcom: add the SM8650 Global Clock Controller driver, part 2 Add Global Clock Controller (GCC) driver plumbing for the SM8650 platform. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-7-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit c58225b7e3d702e62e0e0ac1ad2c59248c60c008 Author: Neil Armstrong Date: Mon Nov 6 09:25:59 2023 +0100 clk: qcom: add the SM8650 Global Clock Controller driver, part 1 Add Global Clock Controller (GCC) tables for the SM8650 platform, the driver plumbing will be added afterwards. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-6-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit 6514b6efdd1feaa3f8c327b07cb128b96b0adb4e Merge: 8f799d304c313 873f22440338d Author: Bjorn Andersson Date: Thu Dec 7 08:08:54 2023 -0800 Merge branch '20231106-topic-sm8650-upstream-clocks-v3-5-761a6fadb4c0@linaro.org' into clk-for-6.8 Merge SM8650 GCC, TCSRCC, DISPCC, GPUCC and RPMHCC bindings through a topic branch to make it possible to also merge and use the constants in the DeviceTree branch. commit 873f22440338d84ad911c4b8373afc3d8d413587 Author: Neil Armstrong Date: Mon Nov 6 09:25:58 2023 +0100 dt-bindings: clock: qcom: Document the SM8650 RPMH Clock Controller Add bindings documentation for the SM8650 RPMH Clock Controller. Acked-by: Rob Herring Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-5-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit a0aa7fa5c3f0e74e684c667e26824fe1e28f5c27 Author: Neil Armstrong Date: Mon Nov 6 09:25:57 2023 +0100 dt-bindings: clock: qcom: document the SM8650 GPU Clock Controller Add bindings documentation for the SM8650 Graphics Clock Controller. Reviewed-by: Rob Herring Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-4-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit c1120359d4c2a1050e6a5bddd47ee1887bb0c713 Author: Neil Armstrong Date: Mon Nov 6 09:25:56 2023 +0100 dt-bindings: clock: qcom: document the SM8650 Display Clock Controller Add bindings documentation for the SM8650 Display Clock Controller. Reviewed-by: Rob Herring Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-3-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit b69d932154dcfa84540aea55dd51a74fbc88d370 Author: Neil Armstrong Date: Mon Nov 6 09:25:55 2023 +0100 dt-bindings: clock: qcom: document the SM8650 General Clock Controller Add bindings documentation for the SM8650 General Clock Controller. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-2-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit 1a3b3bd142ffea56cdfd458246b2e4da6df19da6 Author: Neil Armstrong Date: Mon Nov 6 09:25:54 2023 +0100 dt-bindings: clock: qcom: document the SM8650 TCSR Clock Controller Add bindings documentation for the SM8650 TCSR Clock Controller. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-clocks-v3-1-761a6fadb4c0@linaro.org Signed-off-by: Bjorn Andersson commit 9b413e3c07d251191410976d669260079b48e7b1 Author: Biju Das Date: Mon Dec 4 12:45:07 2023 +0000 mfd: da9062: Simplify obtaining I2C match data Simplify probe() by replacing of_device_get_match_data() and ID lookup for retrieving match data by i2c_get_match_data(). Some minor cleanups: * Remove the trailing comma in the terminator entry for the ID table making code robust against (theoretical) misrebases or other similar things where the new entry goes _after_ the termination without the compiler noticing. * Move OF table near to the user. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231204124507.124758-1-biju.das.jz@bp.renesas.com Signed-off-by: Lee Jones commit 7a280fec21fa4ca313e7aa6708f2480757501053 Author: Neil Armstrong Date: Mon Oct 30 10:45:15 2023 +0100 soc: qcom: llcc: Add configuration data for SM8650 Add Last Level Cache Controller support for the SM8650 platform. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-llcc-v2-2-f281cec608e2@linaro.org Signed-off-by: Bjorn Andersson commit 8fa41c40a1cb8bd78e3aba36865162c8d7019d94 Author: Neil Armstrong Date: Mon Oct 30 10:45:14 2023 +0100 dt-bindings: cache: qcom,llcc: Document the SM8650 Last Level Cache Controller Document the Last Level Cache Controller on the SM8650 platform. Acked-by: Rob Herring Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-llcc-v2-1-f281cec608e2@linaro.org Signed-off-by: Bjorn Andersson commit 41673c66b3d0c09915698fec5c13b24336f18dd1 Author: Kunwu Chan Date: Mon Dec 4 17:24:43 2023 +0800 mfd: syscon: Fix null pointer dereference in of_syscon_register() kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Fixes: e15d7f2b81d2 ("mfd: syscon: Use a unique name with regmap_config") Signed-off-by: Kunwu Chan Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20231204092443.2462115-1-chentao@kylinos.cn Signed-off-by: Lee Jones commit 8f799d304c313f6628c4b21cd0227ac56b581944 Author: Vincent Knecht Date: Sun Oct 29 07:19:48 2023 +0100 clk: qcom: gcc-msm8939: Add missing CSI2 related clocks When adding in the indexes for this clock-controller we missed GCC_CAMSS_CSI2_AHB_CLK, GCC_CAMSS_CSI2_CLK, GCC_CAMSS_CSI2PHY_CLK, GCC_CAMSS_CSI2PIX_CLK and GCC_CAMSS_CSI2RDI_CLK. Add them in now and rename ftbl_gcc_camss_csi0_1_clk to account for csi2 also using it. Reviewed-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20231029061948.505883-2-vincent.knecht@mailoo.org Signed-off-by: Bjorn Andersson commit 3f373de6da2c960f0630a63890dded7d53358e2a Author: Vincent Knecht Date: Sun Oct 29 07:19:47 2023 +0100 dt-bindings: clock: qcom,gcc-msm8939: Add CSI2 related clocks When adding in the indexes for this clock-controller we missed GCC_CAMSS_CSI2_AHB_CLK, GCC_CAMSS_CSI2_CLK, GCC_CAMSS_CSI2PHY_CLK, GCC_CAMSS_CSI2PIX_CLK and GCC_CAMSS_CSI2RDI_CLK. Add them in now. Reviewed-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Signed-off-by: Vincent Knecht Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231029061948.505883-1-vincent.knecht@mailoo.org Signed-off-by: Bjorn Andersson commit 9bd07f2c558f9c7d41f3761df3e93bd9ebaa0d4f Author: Bryan O'Donoghue Date: Thu Oct 26 11:53:45 2023 +0100 arm64: dts: qcom: sc8280xp: Add in CAMCC for sc8280xp Add in CAMCC for sc8280xp. The sc8280xp Camera Clock Controller looks similar to most of the sdmX, smX and now scX controllers. Signed-off-by: Bryan O'Donoghue Suggested-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231026105345.3376-5-bryan.odonoghue@linaro.org Signed-off-by: Bjorn Andersson commit ff93872a9c6168992ee41f2da9d9c3b8a6f8a8e5 Author: Bryan O'Donoghue Date: Thu Oct 26 11:53:44 2023 +0100 clk: qcom: camcc-sc8280xp: Add sc8280xp CAMCC Add the sc8280xp CAMCC driver which follows the sdm845 CAMCC lineage with additional CCI and IFE blocks and more granular clock parentage. Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20231026105345.3376-4-bryan.odonoghue@linaro.org Signed-off-by: Bjorn Andersson commit 7a56e64a56ddc2d97829ea49fa1707c2b612de6c Merge: 44b1f64cad570 206cd759fbd2f Author: Bjorn Andersson Date: Thu Dec 7 08:01:58 2023 -0800 Merge branch '20231026105345.3376-3-bryan.odonoghue@linaro.org' into arm64-for-6.8 Merge the SC8280XP Camera Clock Controller binding updates from the topic branch, to gain access to clock defines to be used in DeviceTree source. commit aa15b031854fc86fd0b9c7e6b794d57563cba60f Author: Rodrigo Vivi Date: Thu Nov 30 23:21:55 2023 -0500 drm/doc/rfc: Xe is using drm_exec, so mark as completed Nothing else to be done on this front from Xe perspective. Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231201042158.80009-6-rodrigo.vivi@intel.com Acked-by: Daniel Vetter commit 3be492cf6e13281ac60f4d686e1764d3a722488c Merge: cec1f2ffcc065 206cd759fbd2f Author: Bjorn Andersson Date: Thu Dec 7 08:00:59 2023 -0800 Merge branch '20231026105345.3376-3-bryan.odonoghue@linaro.org' into clk-for-6.8 Merge the SC8280XP Camera Clock Controller binding changes through a topic branch to allow them to be merged and used in the DeviceTree source branch as well. commit 34e64dd192071c3159c118331f87c66dffa0f9c9 Author: Rodrigo Vivi Date: Thu Nov 30 23:21:54 2023 -0500 drm/doc/rfc: Move userptr integration and vm_bind to the 'completed' section The must-have part of the documentation was already added to the existing /gpu/drm-vm-bind-async. The other extra discussion around GPUVM helpers are currently active in the community. None of those discussion should block Xe since documentation, specially around locking was completed in a community consensus. Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231201042158.80009-5-rodrigo.vivi@intel.com Acked-by: Daniel Vetter commit 206cd759fbd2fce07cadb6c73a302ecfc95ebdff Author: Bryan O'Donoghue Date: Thu Oct 26 11:53:43 2023 +0100 dt-bindings: clock: Add SC8280XP CAMCC Add device tree bindings for the camera clock controller on Qualcomm SC8280XP platform. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231026105345.3376-3-bryan.odonoghue@linaro.org Signed-off-by: Bjorn Andersson commit 16805e994bff2db40362b9007f3fcd476571a15e Author: Rodrigo Vivi Date: Thu Nov 30 23:21:53 2023 -0500 drm/doc/rfc: Move Xe 'ASYNC VM_BIND' to the 'completed' section As already indicated in this block, the consensus was already reached out and documented as: The ASYNC VM_BIND document However this was item was not moved to the completed section. Let's move and clean up the WIP block. Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231201042158.80009-4-rodrigo.vivi@intel.com Acked-by: Daniel Vetter commit 4ab1721694a07651afef97dfb150f06c267cf2c4 Author: Bryan O'Donoghue Date: Thu Oct 26 11:53:42 2023 +0100 dt-bindings: clock: Use gcc.yaml for common clock properties Various of the camcc bindings are repeated serially. We can use qcom,gcc.yaml to encapsulate the generic repeated patterns. Signed-off-by: Bryan O'Donoghue Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231026105345.3376-2-bryan.odonoghue@linaro.org Signed-off-by: Bjorn Andersson commit 0e2e6c49c1c072dff841d9dfab3b4966abb2edf1 Author: Rodrigo Vivi Date: Thu Nov 30 23:21:52 2023 -0500 drm/doc/rfc: Mark drm_scheduler as completed Current drm-xe-next doesn't have any drm/scheduler patch that is not already accepted in drm-misc-next. This completed this goal with the consensus of how the drm/scheduler fits to the fw scheduling and the relationship between drm_gpu_scheduler and drm_sched_entity. Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231201042158.80009-3-rodrigo.vivi@intel.com Acked-by: Daniel Vetter commit a85607e3cfc5032daf64efc5f6b5387f2271b073 Author: Matthew Brost Date: Thu Nov 30 23:21:51 2023 -0500 drm/doc/rfc: Mark long running workload as complete. No DRM scheduler changes required, drivers just return NULL in run_job vfunc. The rough consensus is that no helper or extra scaffolding is needed around long-running jobs and no further changes to drm-scheduler. At least for now. Other drivers that currently do long-running workloads have no plat to use drm-scheduler. Besides, the current consensus is that this solution of simply returning NULL to the run_job function should work without extra code duplication or complication. On top of that, this item was already a non-blocking one for upstreaming Xe, so let's move that to the 'Completed' section and revisit the long-running solution as a community after Xe is integrated in DRM. Signed-off-by: Matthew Brost Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231201042158.80009-2-rodrigo.vivi@intel.com Acked-by: Daniel Vetter commit cec1f2ffcc065568fea9718921698576c6d1c62d Author: Robert Marko Date: Thu Oct 26 12:18:37 2023 +0200 dt-bindings: clock: qcom,gcc-ipq6018: split to separate schema The Qualcomm IPQ6018 GCC clock controller has clock inputs, thus existing gcc-other.yaml was not describing it fully so move it to a separate schema. Fully document the allowed and required XO and sleep clock inputs, as well as update the provided example. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231026101931.695497-1-robimarko@gmail.com Signed-off-by: Bjorn Andersson commit 3e743b0fcb90551106c13837548079b91d661384 Author: Yang Li Date: Wed Apr 12 14:46:33 2023 +0800 drm/mediatek: Use devm_platform_ioremap_resource() Remove variable 'res' and convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Matthias Brugger Reviewed-by: Alexandre Mergnat Link: https://patchwork.kernel.org/project/dri-devel/patch/20230412064635.41315-1-yang.lee@linux.alibaba.com/ Link: https://patchwork.kernel.org/project/dri-devel/patch/20230412064635.41315-2-yang.lee@linux.alibaba.com/ Link: https://patchwork.kernel.org/project/dri-devel/patch/20230412064635.41315-3-yang.lee@linux.alibaba.com/ Signed-off-by: Chun-Kuang Hu commit f61319e57d89e6e3d1ad16cb916074fdb7289806 Author: Neil Armstrong Date: Mon Oct 30 10:55:20 2023 +0100 soc: qcom: socinfo: Add SM8650 SoC ID table entry Add SoC Info support for the SM8650 platform. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-socinfo-v2-2-4751e7391dc9@linaro.org Signed-off-by: Bjorn Andersson commit 216382b1555de2fe11684ffd99d598ac77a92ed8 Author: Neil Armstrong Date: Mon Oct 30 10:55:19 2023 +0100 dt-bindings: arm: qcom,ids: Add SoC ID for SM8650 Add the ID for the Qualcomm SM8650 SoC. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-socinfo-v2-1-4751e7391dc9@linaro.org Signed-off-by: Bjorn Andersson commit 769ff5283f0d7edc819743f183d51af077411107 Author: Su Hui Date: Thu Nov 30 13:11:56 2023 +0800 backlight: ili922x: Add an error code check in ili922x_write() Clang static analyzer complains that value stored to 'ret' is never read. Return the error code when spi_sync() failed. Signed-off-by: Su Hui Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20231130051155.1235972-1-suhui@nfschina.com Signed-off-by: Lee Jones commit 44b1f64cad5703c87918cc9ffbf9b79bb959418d Author: Mukesh Ojha Date: Wed Oct 25 22:36:41 2023 +0530 arm64: dts: qcom: sm8550: Enable download mode register write Enable download mode setting for sm8550 which can help collect ramdump for this SoC. Signed-off-by: Mukesh Ojha Link: https://lore.kernel.org/r/1698253601-11957-4-git-send-email-quic_mojha@quicinc.com [bjorn: Updated tcsr offset, per Mukesh correction] Signed-off-by: Bjorn Andersson commit 1accc6031d925c6045c4776d5f3646996b0b242a Author: Mukesh Ojha Date: Wed Oct 25 22:36:40 2023 +0530 arm64: dts: qcom: sm8350: Add TCSR halt register space Enable download mode for sm8350 which can help collect ramdump for this SoC. Signed-off-by: Mukesh Ojha Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1698253601-11957-3-git-send-email-quic_mojha@quicinc.com Signed-off-by: Bjorn Andersson commit d59653233e8779e3fe082eb5635b9785f2095af6 Author: Mukesh Ojha Date: Wed Oct 25 22:36:39 2023 +0530 arm64: dts: qcom: sm8250: Add TCSR halt register space Enable download mode for sm8250 which can help collect ramdump for this SoC. Signed-off-by: Mukesh Ojha Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/1698253601-11957-2-git-send-email-quic_mojha@quicinc.com Signed-off-by: Bjorn Andersson commit a427dd16e61f3d145bc24f0ed09692fc25931250 Author: Kathiravan Thirumoorthy Date: Wed Oct 25 22:12:12 2023 +0530 arm64: dts: qcom: ipq5018: add few more reserved memory regions Like all other IPQ SoCs, bootloader will collect the system RAM contents upon crash for the post morterm analysis. If we don't reserve the memory region used by bootloader, obviously linux will consume it and upon next boot on crash, bootloader will be loaded in the same region, which will lead to loose some of the data, sometimes we may miss out critical information. So lets reserve the region used by the bootloader. Similarly SBL copies some data into the reserved region and it will be used in the crash scenario. So reserve 1MB for SBL as well. While at it, enable the SMEM support along with TCSR mutex. Signed-off-by: Kathiravan Thirumoorthy Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231025-ipq5018-misc-v1-1-7d14fde97fe7@quicinc.com Signed-off-by: Bjorn Andersson commit 63a021f52f69092f17d24707cd8e81f914f8d1e6 Author: Kathiravan Thirumoorthy Date: Wed Oct 25 19:20:05 2023 +0530 arm64: dts: qcom: ipq5332: add missing properties to the GPIO LED node Add the color and function property to the GPIO LED node, which are missed out in the initial submission. Signed-off-by: Kathiravan Thirumoorthy Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231025-ipq5332-gpio-led-v1-1-0f0f52617648@quicinc.com Signed-off-by: Bjorn Andersson commit 2928212b6ef24d6a4f2af849157ac18546030b97 Author: Kathiravan Thirumoorthy Date: Wed Oct 25 19:01:25 2023 +0530 arm64: dts: qcom: ipq9574: enable GPIO based LED Add support for wlan-2g LED on GPIO64. Signed-off-by: Kathiravan Thirumoorthy Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231025-ipq9574-led-v2-1-59b2725697ad@quicinc.com Signed-off-by: Bjorn Andersson commit e0cee8dc6757f9f18718eec553be9fffa503e103 Author: Caleb Connolly Date: Wed Oct 25 12:58:00 2023 +0100 arm64: dts: qcom: qrb2210-rb1: use USB host mode The default for the QCM2290 platform that this board is based on is OTG mode, however the role detection logic is not hooked up for this board and the dwc3 driver is configured to not allow role switching from userspace. Force this board to host mode as this is the preferred usecase until we get role switching hooked up. Fixes: e18771961336 ("arm64: dts: qcom: Add initial QTI RB1 device tree") Signed-off-by: Caleb Connolly Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231025-b4-rb1-usb-host-v1-1-522616c575ef@linaro.org Signed-off-by: Bjorn Andersson commit 4db09e7b967b905ba3036a4d96e81c06b896b1bf Author: Dmitry Baryshkov Date: Wed Oct 25 14:49:30 2023 +0300 soc: qcom: pmic_glink: enable UCSI by default Now as the issue with the UCSI_GET_PDOS is worked around, enable UCSI support for all PMIC_GLINK platforms except Qualcomm SC8180X. The mentioned SoC has slightly different UCSI implementation, which I would like be tested properly before enabling it. Signed-off-by: Dmitry Baryshkov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231025115620.905538-3-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 1d103d6af241dbfc7e11eb9a46dff65db257a37f Author: Dmitry Baryshkov Date: Wed Oct 25 14:49:29 2023 +0300 usb: typec: ucsi: fix UCSI on buggy Qualcomm devices On sevral Qualcomm platforms (SC8180X, SM8350, SC8280XP) a call to UCSI_GET_PDOS for non-PD partners will cause a firmware crash with no easy way to recover from it. Since we have no easy way to determine whether the partner really has PD support, shortcut UCSI_GET_PDOS on such platforms. This allows us to enable UCSI support on such devices. Signed-off-by: Dmitry Baryshkov Acked-by: Heikki Krogerus Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231025115620.905538-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 6da02af3f910bbcdd2914050cfcab1a9d7980494 Author: Neil Armstrong Date: Wed Oct 25 09:29:17 2023 +0200 dt-bindings: firmware: qcom,scm: document SM8650 SCM Firmware Interface Document the SCM Firmware Interface on the SM8650 Platform. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231025-topic-sm8650-upstream-bindings-scm-v1-1-f687b5aa3c9e@linaro.org Signed-off-by: Bjorn Andersson commit 98e8bc43c225d77966fde6e0138e3ee307d3c208 Author: Neil Armstrong Date: Wed Oct 25 09:27:57 2023 +0200 dt-bindings: soc: qcom: pmic-glink: document SM8650 compatible Document the PMIC GLINK firmware interface on the SM8650 Platform by using the SM8550 bindings as fallback. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231025-topic-sm8650-upstream-bindings-pmic-glink-v1-1-0c2829a62565@linaro.org Signed-off-by: Bjorn Andersson commit 8c1f28ff1356dd1f0ede9b378c9dadbfa7539187 Author: Neil Armstrong Date: Wed Oct 25 09:18:27 2023 +0200 dt-bindings: soc: qcom,aoss-qmp: document the SM8560 Always-On Subsystem side channel Document the Always-On Subsystem side channel on the SM8650 Platform. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231025-topic-sm8650-upstream-bindings-aoss-qmp-v1-1-8940621d704c@linaro.org Signed-off-by: Bjorn Andersson commit 10690b8a49bceafb1badf0ad91842a359e796d8b Author: Jouni Högander Date: Thu Dec 7 10:34:51 2023 +0200 drm/i915/display: Add intel_fb_bo_framebuffer_fini Xe needs intel_fb_bo_framebuffer_fini for taking care of unpinning the fb and taking reference. In i915 this can be empty. Also move intel_frontbuffer_get to be done after intel_fb_bo_framebuffer_init to have reasonable sequences: intel_fb_bo_framebuffer_init intel_frontbuffer_get ... intel_frontbuffer_put intel_fb_bo_framebuffer_fini v2: Empty function instead of define Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20231207083451.2184562-1-jouni.hogander@intel.com commit 70b139a7af7106b59ca5ca77673a9c56982b3089 Author: Bjorn Andersson Date: Tue Dec 5 20:38:40 2023 -0800 soc: qcom: stats: Express AOSS QMP module dependency In the case that the Qualcomm Sleep stats driver is builtin and the AOSS QMP driver is built as a module, neither the implementation nor the stub functions are available during linking, resulting in the following errors: qcom_stats.c:(.text+0x33c): undefined reference to `qmp_send' qcom_stats.c:(.text+0x8a0): undefined reference to `qmp_get' Resolve this by expressing the dependency between the two modules. Fixes: e84e61bdb97c ("soc: qcom: stats: Add DDR sleep stats") Reported-by: kernel test robot Closes: https://lore.kernel.org/linux-arm-msm/202312061258.nAVYPFq2-lkp@intel.com/ Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231205-qcom_stats-aoss_qmp-dependency-v1-1-8dabe1b5c32a@quicinc.com Signed-off-by: Bjorn Andersson commit 73380e2573c34a45e01786750a4a2efafc2248bd Author: Arnd Bergmann Date: Wed Dec 6 13:37:06 2023 +0100 soc: qcom: stats: fix 64-bit division Unguarded 64-bit division is not allowed on 32-bit kernels because this is very slow. The result of trying anyway is a link failure: arm-linux-gnueabi-ld: drivers/soc/qcom/qcom_stats.o: in function `qcom_ddr_stats_show': qcom_stats.c:(.text+0x334): undefined reference to `__aeabi_uldivmod' As this function is only used for debugging and not performance critical, rewrite it to use div_u64() instead. ARCH_TIMER_FREQ is a multiple of MSEC_PER_SEC anyway, so there is no loss in precisison. Fixes: e84e61bdb97c ("soc: qcom: stats: Add DDR sleep stats") Signed-off-by: Arnd Bergmann Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231206123717.524009-1-arnd@kernel.org Signed-off-by: Bjorn Andersson commit 72cd89517fa0a33adb4764c34c7b268f4d23882b Merge: d3ddafd34bc4e 1036f69e25138 Author: Ulf Hansson Date: Thu Dec 7 15:15:02 2023 +0100 mmc: Merge branch fixes into next Merge the mmc fixes for v6.7-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.8. Signed-off-by: Ulf Hansson commit d3ddafd34bc4e353dc9fc2d193abc4c4463dc588 Author: Axe Yang Date: Thu Dec 7 14:35:35 2023 +0800 mmc: mtk-sd: Extend number of tuning steps Previously, during the MSDC calibration process, a full clock cycle actually not be covered, which in some cases didn't yield the best results and could cause CRC errors. This problem is particularly evident when MSDC is used as an SDIO host. In fact, MSDC support tuning up to a maximum of 64 steps, but by default, the step number is 32. By increase the tuning step, we are more likely to cover more parts of a clock cycle, and get better calibration result. To illustrate, when tuning 32 steps, if the obtained window has a hole near the middle, like this: 0xffc07ff (hex), then the selected delay will be the 6 (counting from right to left). (32 <- 1) 1111 1111 1100 0000 0000 0111 11(1)1 1111 However, if we tune 64 steps, the window obtained may look like this: 0xfffffffffffc07ff. The final selected delay will be 44, which is safer as it is further away from the hole: (64 <- 1) 1111 ... (1)111 1111 1111 1111 1111 1100 0000 0000 0111 1111 1111 In this case, delay 6 selected through 32 steps tuning is obviously not optimal, and this delay is closer to the hole, using it would easily cause CRC problems. As per mesaurements taken on mediatek SoC platform, the tuning phase will take: eMMC - 32 steps: ~3ms - 64 steps: ~6ms SDIO - 32 steps: ~4ms - 64 steos: ~7ms Tuning more steps won't prolong boot times by any meaningful amount of time, so for SD/SDIO the default tuning steps will be adjust to 64. But for eMMC, it is still preferred to use 32 steps tuning as otherwise there would be performance lose when accessing the RPMB partition(requiring retuning each time). You can configure property "mediatek,tuning-step" in MSDC dts node to adjust the step number. Signed-off-by: Axe Yang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231207063535.29546-3-axe.yang@mediatek.com Signed-off-by: Ulf Hansson commit ec1aaf792d9aafbe1d1ffd414c423ddc2a3d3103 Author: Axe Yang Date: Thu Dec 7 14:35:34 2023 +0800 dt-bindings: mmc: mtk-sd: add tuning steps related property Add 'mediatek,tuning-steps' setting. This property will give MSDC a chance to extend tuning steps up to 64. With more tuning steps, MSDC may achieve a more optimal calibration result, thus avoiding potential CRC issues. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Axe Yang Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231207063535.29546-2-axe.yang@mediatek.com Signed-off-by: Ulf Hansson commit 1f30f51053715af81a25d902511079aca3fdb213 Author: Randy Dunlap Date: Tue Dec 5 21:58:55 2023 -0800 mmc: sdhci-omap: don't misuse kernel-doc marker Use "/*" instead of "/**" for common C comments to prevent warnings from scripts/kernel-doc. sdhci-omap.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst sdhci-omap.c:3: warning: missing initial short description on line: * SDHCI Controller driver for TI's OMAP SoCs Signed-off-by: Randy Dunlap Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202311201117.lFxgJTK6-lkp@intel.com/ Link: https://lore.kernel.org/r/20231206055855.21092-1-rdunlap@infradead.org Signed-off-by: Ulf Hansson commit d685aea5e0a89b66679e5266320ab2ba4378c754 Author: Dan Carpenter Date: Mon Dec 4 15:42:07 2023 +0300 ASoC: audio-graph-card2: fix off by one in graph_parse_node_multi_nm() The > comparison should be >= to avoid writing one element beyond the end of the dai_link->ch_maps[] array. The dai_link->ch_maps[] array is allocated in graph_parse_node_multi() and it has "nm_max" elements. Fixes: e2de6808df4a ("ASoC: audio-graph-card2: add CPU:Codec = N:M support") Signed-off-by: Dan Carpenter Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/1032216f-902f-48f9-aa49-9d5ece8e87f2@moroto.mountain Signed-off-by: Mark Brown commit 6fc0ca179141ddb747338b38081b11e5db30966c Merge: 9463571b29bf0 e7794c14fd73e Author: Ulf Hansson Date: Thu Dec 7 14:59:57 2023 +0100 mmc: Merge branch fixes into next Merge the mmc fixes for v6.7-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.8. Signed-off-by: Ulf Hansson commit da2c1b861065b452590d75a1e2f5ee9b396fef92 Author: Benjamin Tissoires Date: Thu Dec 7 13:22:39 2023 +0100 selftests/hid: fix failing tablet button tests An overlook from commit 74452d6329be ("selftests/hid: tablets: add variants of states with buttons"), where I don't use the Enum... Fixes: 74452d6329be ("selftests/hid: tablets: add variants of states with buttons") Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231207-b4-wip-selftests-v1-1-c4e13fe04a70@kernel.org Signed-off-by: Benjamin Tissoires commit 0e63dd27f456f30c9501cf044141758db2d34fb3 Author: Kai-Heng Feng Date: Wed Nov 8 14:19:39 2023 +0200 HID: intel-ish-hid: ipc: Rework EHL OOB wakeup Since PCI core and ACPI core already handles PCI PME wake and GPE wake when the device has wakeup capability, use device_init_wakeup() to let them do the wakeup setting work. Also add a shutdown callback which uses pci_prepare_to_sleep() to let PCI and ACPI set OOB wakeup for S5. Cc: Jian Hui Lee Signed-off-by: Kai-Heng Feng Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 9463571b29bf03a0dc1114f0cb17042b179066f9 Author: Pin-yen Lin Date: Fri Dec 1 18:26:51 2023 +0800 mmc: mtk-sd: Increase the verbosity of msdc_track_cmd_data This log message is necessary for debugging, so enable it by default to debug issues that are hard to reproduce locally. Signed-off-by: Pin-yen Lin Reviewed-by: Wenbin Mei Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231201102747.3854573-1-treapking@chromium.org Signed-off-by: Ulf Hansson commit 0c679fffd67605a2c10a61a9a09890970eae11a9 Author: Andy Shevchenko Date: Thu Nov 30 16:32:06 2023 +0200 mfd: intel-lpss: Don't fail probe on success of pci_alloc_irq_vectors() The pci_alloc_irq_vectors() returns a positive number on success. Hence we have to filter the negative numbers for error condition. Update the check accordingly. Fixes: e6951fb78787 ("mfd: intel-lpss: Use PCI APIs instead of dereferencing") Reported-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Tested-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231130143206.1475831-1-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 7a29fa05aeca2c16193f00a883c56ffc7c25b6c5 Author: Peter Ujfalusi Date: Sun Oct 29 13:48:43 2023 +0200 mfd: twl6030-irq: Revert to use of_match_device() The core twl chip is probed via i2c and the dev->driver->of_match_table is NULL, causing the driver to fail to probe. This partially reverts: commit 1e0c866887f4 ("mfd: Use device_get_match_data() in a bunch of drivers") Fixes: 1e0c866887f4 ("mfd: Use device_get_match_data() in a bunch of drivers") Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231029114843.15553-1-peter.ujfalusi@gmail.com Signed-off-by: Lee Jones commit db763745626495d23b0691f3906d3d7c40110db4 Author: Charles Keepax Date: Thu Nov 30 11:57:12 2023 +0000 mfd: cs42l43: Correct order of include files to be alphabetical Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20231130115712.669180-2-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones commit 47b1b03dc56ebc302620ce43e967aa8f33516f6f Author: Charles Keepax Date: Thu Nov 30 11:57:11 2023 +0000 mfd: cs42l43: Correct SoundWire port list Two ports are missing from the port list, and the wrong port is set to 4 channels. Also the attempt to list them by function is rather misguided, there is nothing in the hardware that fixes a particular port to one function. Factor out the port properties to an actual struct, fixing the missing ports and correcting the port set to 4 channels. Fixes: ace6d1448138 ("mfd: cs42l43: Add support for cs42l43 core driver") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20231130115712.669180-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones commit 1fe13d83e2873b0aedeb5b9a299ca763bd37d75f Author: Kaihua Zhong Date: Wed Nov 29 09:55:26 2023 +0800 mfd: Fix a few spelling mistakes in PMIC header file comments Fix four comment typos in MFD PMIC header files. Reported-by: k2ci Signed-off-by: Kaihua Zhong Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20231129015526.3302865-1-zhongkaihua@kylinos.cn Signed-off-by: Lee Jones commit fd58bb8c7da3c2d4314d7ab76402ca18e9cc0afa Author: Andy Shevchenko Date: Fri Nov 24 21:31:28 2023 +0200 mfd: intel-lpss: Provide Intel LPSS PM ops structure With the help of EXPORT_NS_GPL_DEV_PM_OPS() and other *_PM_OPS() macros we may convert PM ops functions to become static. This also takes into account the PM configuration options such as CONFIG_PM and CONFIG_PM_SLEEP. This all removes a lot of ugly macros and ifdeffery in the driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231124200258.3682979-6-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 24ee97a9e816a333688141eed2fbbb2d5e60b5d1 Author: Andy Shevchenko Date: Fri Nov 24 21:31:27 2023 +0200 mfd: intel-lpss: Move exported symbols to INTEL_LPSS namespace Avoid unnecessary pollution of the global symbol namespace by moving library functions in to a specific namespace and import that into the drivers that make use of the functions. For more info: https://lwn.net/Articles/760045/ Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231124200258.3682979-5-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit a936a91718fabe9e1c8e2da4265f5088f8e300de Author: Andy Shevchenko Date: Fri Nov 24 21:31:26 2023 +0200 mfd: intel-lpss: Adjust header inclusions Adjust header inclusions to avoid "proxy" headers and explicitly include what we are using. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231124200258.3682979-4-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 9ffe4c1089f6c3097cb9184a36e912e2eeb66f4b Author: Andy Shevchenko Date: Fri Nov 24 21:31:25 2023 +0200 mfd: intel-lpss: Use device_get_match_data() Use preferred device_get_match_data() instead of acpi_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Introduce a temporary variable in PCI glue driver to be consistent with ACPI one on the same matter. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231124200258.3682979-3-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 3b6dba220e67eda42f1263403fbbba64992da3ae Author: Andy Shevchenko Date: Fri Nov 24 21:31:24 2023 +0200 mfd: intel-lpss: Revert "Add missing check for platform_get_resource" This reverts commit d918e0d5824495a75d00b879118b098fcab36fdb. The commit in question does not fix anything and only introduces a duplication in the code. The main intel_lpss_probe() performs all necessary checks. While at it and in order of avoiding similar patches to come, add a comment. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231124200258.3682979-2-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit d19e5510c84db2cfb60aa187b1cb1a25cb23df52 Author: Santhosh Kumar K Date: Fri Nov 24 10:20:19 2023 +0530 dt-bindings: mfd: ti,am3359-tscadc: Allow dmas property to be optional ADC module can function without DMA, so there may not be dma channel always associated with device. Hence, remove "dmas", "dma-names" from list of required properties. Signed-off-by: Santhosh Kumar K Reviewed-by: Miquel Raynal Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231124045019.21003-1-s-k6@ti.com Signed-off-by: Lee Jones commit 7ac5241eaec4c25dd5a78734ae3c33cb25c8bf97 Author: Nikita Travkin Date: Mon Nov 20 19:03:03 2023 +0500 dt-bindings: mfd: qcom,spmi-pmic: Add pm8916 vm-bms and lbc PM8916 (and probably some other similar pmics) have hardware blocks for battery monitoring and charging. Add patterns for respecive nodes so the devicetree for those blocks can be validated properly. Signed-off-by: Nikita Travkin Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231120-pm8916-dtsi-bms-lbc-v4-1-4f91056c8252@trvn.ru Signed-off-by: Lee Jones commit 2f7cae55831d6b1b57edadf27979efc97644844c Author: Dang Huynh Date: Tue Nov 21 12:35:00 2023 +0700 dt-bindings: mfd: qcom-spmi-pmic: Document PM8937 PMIC Add bindings for PM8937 PMIC (qcom,pm8937). This PMIC is found in boards with MSM8917, MSM8937, MSM8940 and APQ variants. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dang Huynh Link: https://lore.kernel.org/r/20231121-pm8937-v2-2-b0171ab62075@riseup.net Signed-off-by: Lee Jones commit 4773d2f1a5c73c590c0c83bf42b156532bc69cb2 Author: Dang Huynh Date: Tue Nov 21 12:34:59 2023 +0700 mfd: qcom-spmi-pmic: Add support for PM8937 Add the subtype and compatible strings for PM8937. The PM8937 is found in various SoCs, including MSM8917, MSM8937, MSM8940 and APQ variants. Reviewed-by: Caleb Connolly Signed-off-by: Dang Huynh Link: https://lore.kernel.org/r/20231121-pm8937-v2-1-b0171ab62075@riseup.net Signed-off-by: Lee Jones commit e0191f305fb18264fe1178fd4103f0efa2ce4772 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:46 2023 +0100 mfd: twl4030-audio: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-19-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 66d721ca1c40a12ab4c7dad8cc9ad0f76310d1f4 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:45 2023 +0100 mfd: tps65911-comparator: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-18-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 740ad6d1b39301960a28a5d47f5d985407bec42a Author: Uwe Kleine-König Date: Thu Nov 23 17:56:44 2023 +0100 mfd: ti_am335x_tscadc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-17-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit eea669cbcbf9b34755eed3abe842052e700c9908 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:43 2023 +0100 mfd: stm32-timers: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-16-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit c20fddf7acfb54d856c34208926701d32c25eb18 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:42 2023 +0100 mfd: sm501: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-15-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 19ea1d3953017518d85db35b69b5aea9bc64d630 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:41 2023 +0100 mfd: qcom-pm8xxx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Konrad Dybcio Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-14-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit e999021c53720d393d28f1be4aa844170566e1f4 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:40 2023 +0100 mfd: pcf50633-adc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-13-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 32c9cd0abc8a37fbcdacc4487c33bf08a0579488 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:39 2023 +0100 mfd: omap-usb-tll: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-12-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 418d1e74f8597e0b2d5d0d6e1be8f1f47e68f0a4 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:38 2023 +0100 mfd: omap-usb-host: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-11-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 795cf0ac2af2ffe3e4a39da3b8350aeed0e7a80d Author: Uwe Kleine-König Date: Thu Nov 23 17:56:37 2023 +0100 mfd: mxs-lradc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-10-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit a861a27a0e3ba6f347ccab2fab0f5c3b52ddfce0 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:36 2023 +0100 mfd: mcp-sa11x0: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-9-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 0c45dd86145067b35009345e2e69a6309a34b7f5 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:35 2023 +0100 mfd: kempld-core: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-8-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit dd28e01d39d56ba11bf0ccb08b9b73447ad51189 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:34 2023 +0100 mfd: intel-lpss-acpi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-7-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 022457cfec84c5ec7a70b5cb9bef587dc7f21681 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:33 2023 +0100 mfd: hi655x-pmic: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-6-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 7127bf6eed433dec79abc08bd98ce2c21a5e22c9 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:32 2023 +0100 mfd: fsl-imx25-tsadc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-5-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 3b257f28369be3509d2d9b66623a5cbce3f42fcb Author: Uwe Kleine-König Date: Thu Nov 23 17:56:31 2023 +0100 mfd: exynos-lpass: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-4-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 13b254c02e9b109f1bc2990b6333d47412f6f955 Author: Uwe Kleine-König Date: Thu Nov 23 17:56:30 2023 +0100 mfd: cros_ec_dev: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-3-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit fc2db185632d310d96f8d61f9f8cd4610bca790a Author: Uwe Kleine-König Date: Thu Nov 23 17:56:29 2023 +0100 mfd: ab8500-sysctrl: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Acked-by: Linus Walleij Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123165627.492259-2-u.kleine-koenig@pengutronix.de Signed-off-by: Lee Jones commit 6d461d3c68fb994d56a41b7280aada742dc71cea Author: Andre Werner Date: Tue Nov 21 07:32:59 2023 +0100 mfd: tps65086: Enable register view in debugfs Previously there was no output for the regmap's registers in debugfs due to missing "max_register" property in regmap configuration. Signed-off-by: Andre Werner Link: https://lore.kernel.org/r/20231121063259.13991-1-andre.werner@systec-electronic.com Signed-off-by: Lee Jones commit 4aedcd4aa61d536ca17e67ecd5bc5d42529164f4 Author: Neil Armstrong Date: Thu Nov 16 15:05:13 2023 +0100 mfd: rk8xx: fixup devices registration with PLATFORM_DEVID_AUTO Since commit 210f418f8ace ("mfd: rk8xx: Add rk806 support"), devices are registered with "0" as id, causing devices to not have an automatic device id and prevents having multiple RK8xx PMICs on the same system. Properly pass PLATFORM_DEVID_AUTO to devm_mfd_add_devices() and since it will ignore the cells .id with this special value, also cleanup by removing all now ignored cells .id values. Now we have the same behaviour as before rk806 introduction and rk806 retains the intended behavior. This fixes a regression while booting the Odroid Go Ultra on v6.6.1: sysfs: cannot create duplicate filename '/bus/platform/devices/rk808-clkout' CPU: 3 PID: 97 Comm: kworker/u12:2 Not tainted 6.6.1 #1 Hardware name: Hardkernel ODROID-GO-Ultra (DT) Workqueue: events_unbound deferred_probe_work_func Call trace: dump_backtrace+0x9c/0x11c show_stack+0x18/0x24 dump_stack_lvl+0x78/0xc4 dump_stack+0x18/0x24 sysfs_warn_dup+0x64/0x80 sysfs_do_create_link_sd+0xf0/0xf8 sysfs_create_link+0x20/0x40 bus_add_device+0x114/0x160 device_add+0x3f0/0x7cc platform_device_add+0x180/0x270 mfd_add_device+0x390/0x4a8 devm_mfd_add_devices+0xb0/0x150 rk8xx_probe+0x26c/0x410 rk8xx_i2c_probe+0x64/0x98 i2c_device_probe+0x104/0x2e8 really_probe+0x184/0x3c8 __driver_probe_device+0x7c/0x16c driver_probe_device+0x3c/0x10c __device_attach_driver+0xbc/0x158 bus_for_each_drv+0x80/0xdc __device_attach+0x9c/0x1ac device_initial_probe+0x14/0x20 bus_probe_device+0xac/0xb0 deferred_probe_work_func+0xa0/0xf4 process_one_work+0x1bc/0x378 worker_thread+0x1dc/0x3d4 kthread+0x104/0x118 ret_from_fork+0x10/0x20 rk8xx-i2c 0-001c: error -EEXIST: failed to add MFD devices rk8xx-i2c: probe of 0-001c failed with error -17 Fixes: 210f418f8ace ("mfd: rk8xx: Add rk806 support") Reported-by: Adam Green Signed-off-by: Neil Armstrong Reviewed-by: Sebastian Reichel Link: https://lore.kernel.org/r/20231116-topic-amlogic-upstream-fix-rk8xx-devid-auto-v2-1-3f1bad68ab9d@linaro.org Signed-off-by: Lee Jones commit 92827c1020706333f528e1ecd47145d9a426517e Author: Chen Ni Date: Mon Nov 6 20:40:52 2023 +0200 mfd: intel-lpss: Return error code received from the IRQ API platform_get_irq() returns a negative error code to indicate an error. As does pci_alloc_irq_vectors() and pci_irq_vector(). So in intel_lpss_probe() the erroneous IRQ would be better returned as is. The pci_alloc_irq_vectors() call and platform_get_irq() guarantee that IRQs will not be 0, so we'll drop that check as well. Signed-off-by: Chen Ni [andy: updated commit message] Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231106184052.1166579-3-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 6978c7d2dd81e0a3f9d30d1fbdb013a5ae5fabaf Author: Andy Shevchenko Date: Mon Nov 6 20:40:51 2023 +0200 mfd: intel-lpss: Use PCI APIs instead of dereferencing We have a few PCI APIs that may be used instead of direct dereferencing, Using them will also provide better error codes. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231106184052.1166579-2-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones commit 895243c8763e9c81cace2d526d9770fa1ad035a2 Author: Christophe JAILLET Date: Wed Nov 1 16:55:38 2023 +0100 mfd: intel-lpss: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/a63f3da5745187f5a9b1e2ec0492f2fe2e0b0b8d.1698854117.git.christophe.jaillet@wanadoo.fr Signed-off-by: Lee Jones commit 33455f8da1cf4621fc881faf0190e3671a6dc8ff Author: Mukesh Ojha Date: Wed Oct 25 22:36:38 2023 +0530 dt-bindings: mfd: qcom,tcsr: Add compatible for sm8250/sm8350 Document the compatible for both sm8250 and sm8350 SoCs. Signed-off-by: Mukesh Ojha Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1698253601-11957-1-git-send-email-quic_mojha@quicinc.com Signed-off-by: Lee Jones commit a89c3d832784cdc900153e4e1db2a4a28fc4cf9a Author: Geert Uytterhoeven Date: Wed Oct 25 12:02:34 2023 +0200 dt-bindings: mfd: ams,as3711: Convert to json-schema Convert the Austria MicroSystems AS3711 Quad Buck High Current PMIC with Charger Device Tree binding documentation to json-schema. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/56a5ebee588696f9022fa29fa8e266c8bdee6fd7.1698228043.git.geert+renesas@glider.be Signed-off-by: Lee Jones commit 4ae08845db4c1f759b8382bc7527ab8249230e7f Author: Amit Kumar Mahapatra Date: Sat Nov 25 14:51:28 2023 +0530 mfd: tps6594: Use spi_get_chipselect() API to access spi->chip_select In preparation for adding multiple CS support for a device, set/get functions were introduces accessing spi->chip_select in 'commit 303feb3cc06a ("spi: Add APIs in spi core to set/get spi->chip_select and spi->cs_gpiod")'. Replace spi->chip_select with spi_get_chipselect() API. Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20231125092137.2948-2-amit.kumar-mahapatra@amd.com Signed-off-by: Lee Jones commit 5f257922c5948c58669346d5cda371632108f266 Author: Krzysztof Kozlowski Date: Tue Dec 5 10:22:29 2023 +0100 arm64: dts: fsd: add specific compatibles for Tesla FSD Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the others it reuses several devices from older designs. Historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add Tesla FSD compatible specific to be used with an existing fallback. This will also help reviews of new code using existing DTS as template. No functional impact on Linux drivers behavior. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231205092229.19135-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit d834019f0c1762629937b7017cae642144bd2c22 Merge: 7c1156d8a719d bf1e24c5330af Author: Krzysztof Kozlowski Date: Thu Dec 7 14:32:34 2023 +0100 Merge branch 'for-v6.8/samsung-bindings-compatibles' into next/dt64 commit bf1e24c5330af06b2f7f1a166a1011d8d48e8651 Author: Krzysztof Kozlowski Date: Tue Dec 5 10:22:28 2023 +0100 dt-bindings: watchdog: samsung: add specific compatible for Tesla FSD Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the others it reuses several devices from older designs. Historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add Tesla FSD compatible specific to be used with an existing fallback. Acked-by: Rob Herring Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231205092229.19135-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 54772f1d61cd99ea1ed0febd4187bf24ef63bccd Author: Krzysztof Kozlowski Date: Tue Dec 5 10:22:27 2023 +0100 dt-bindings: samsung: exynos-pmu: add specific compatible for Tesla FSD Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the others it reuses several devices from older designs. Historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add Tesla FSD compatible specific to be used with an existing fallback. Acked-by: Rob Herring Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231205092229.19135-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 921f4f1db7f5bf6798349db8a4382c032f144b98 Author: Krzysztof Kozlowski Date: Tue Dec 5 10:22:26 2023 +0100 dt-bindings: serial: samsung: add specific compatible for Tesla FSD Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the others it reuses several devices from older designs. Historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add Tesla FSD compatible specific to be used with an existing fallback. Acked-by: Rob Herring Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231205092229.19135-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit edb32ec3cea79b518e6af841ecb01c839818f562 Author: Krzysztof Kozlowski Date: Tue Dec 5 10:22:25 2023 +0100 dt-bindings: pwm: samsung: add specific compatible for Tesla FSD Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the others it reuses several devices from older designs. Historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add Tesla FSD compatible specific to be used with an existing fallback. Acked-by: Rob Herring Acked-by: Uwe Kleine-König Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231205092229.19135-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 7677fdbc036b93a882f660ca2484a6807e72f0be Author: Krzysztof Kozlowski Date: Tue Dec 5 10:22:24 2023 +0100 dt-bindings: i2c: exynos5: add specific compatible for Tesla FSD Tesla FSD is a derivative of Samsung Exynos SoC, thus just like the others it reuses several devices from older designs. Historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add Tesla FSD compatible specific to be used with an existing fallback. Acked-by: Rob Herring Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231205092229.19135-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0ca9223fe9f75dce6e5cd306c685ee687a0bbdeb Author: Uwe Kleine-König Date: Mon Dec 4 23:05:23 2023 +0100 w1: gpio: rename pointer to driver data from pdata to ddata pdata is a relict when this was still platform data. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/f863cacc485a701268164c9734b6d4aef23dae3e.1701727212.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit deaba3d687b7cb1a2868bd514fd665ee5efcaaf3 Author: Uwe Kleine-König Date: Mon Dec 4 23:05:22 2023 +0100 w1: gpio: Drop unused enable_external_pullup from driver data This member is always NULL, so drop it. That makes the suspend and resume callbacks empty, so they can be dropped, too. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/7009fc53745c8e0336e9379022ce648a60c519f8.1701727212.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 9c0a5b3f9e55cf9a3dc85843666cae28adfdf7e3 Author: Uwe Kleine-König Date: Mon Dec 4 23:05:21 2023 +0100 w1: gpio: Don't use platform data for driver data struct device's .platform_data isn't for drivers to write to. For driver-specific data there is .driver_data instead. As there is no in-tree platform that provides w1_gpio_platform_data, drop the include file and replace it by a local struct w1_gpio_ddata. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/8f7ebe03ddaa5a5c6e2b36fecdf59da7fc373527.1701727212.git.u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 64d9799d6dd04601227f602ae961e3f3d2f1f02b Author: Randy Dunlap Date: Wed Dec 6 09:45:25 2023 -0800 backlight: ili922x: Drop kernel-doc for local macros Don't use kernel-doc notation for the local macros START_BYTE() and CHECK_FREQ_REG(). This prevents these kernel-doc warnings: ili922x.c:85: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * START_BYTE(id, rs, rw) ili922x.c:85: warning: missing initial short description on line: * START_BYTE(id, rs, rw) ili922x.c:118: warning: expecting prototype for CHECK_FREQ_REG(spi_device s, spi_transfer x)(). Prototype was for CHECK_FREQ_REG() instead Signed-off-by: Randy Dunlap Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20231206174525.14960-1-rdunlap@infradead.org Signed-off-by: Lee Jones commit 288f535951aa81ed674f5e5477ab11b9d9351b8c Author: Chengchang Tang Date: Thu Dec 7 19:42:31 2023 +0800 RDMA/hns: Fix memory leak in free_mr_init() When a reserved QP fails to be created, the memory of the remaining created reserved QPs is leaked. Fixes: 70f92521584f ("RDMA/hns: Use the reserved loopback QPs to free MR before destroying MPT") Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20231207114231.2872104-6-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit f31683a5227b1a0febae8e2a85d7fdf9514c10f1 Author: Chengchang Tang Date: Thu Dec 7 19:42:30 2023 +0800 RDMA/hns: Remove unnecessary checks for NULL in mtr_alloc_bufs() ib_umem_get() never return NULL. Fixes: 3c873161a0d7 ("RDMA/hns: Add support for addressing when hopnum is 0") Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20231207114231.2872104-5-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 7243396aaf12385ba514764b6401bcd15e1a52c7 Author: Junxian Huang Date: Thu Dec 7 19:42:29 2023 +0800 RDMA/hns: Add a max length of gid table IB-core and rdma-core restrict the sgid_index specified by users, which is uint8_t/u8 data type, to only be within the range of 0-255, so it's meaningless to support excessively large gid_table_len. On the other hand, ib-core creates as many sysfs gid files as gid_table_len, most of which are not only useless because of the reason above, but also greatly increase the traversal time of the sysfs gid files for applications. This patch limits the maximum length of gid table to 256. Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20231207114231.2872104-4-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit d3f4020a213e1cb125eed2363fca372a23f7de7a Author: Junxian Huang Date: Thu Dec 7 19:42:28 2023 +0800 RDMA/hns: Response dmac to userspace While creating AH, dmac is already resolved in kernel. Response dmac to userspace so that userspace doesn't need to resolve dmac repeatedly. Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20231207114231.2872104-3-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 95f6b40082aaf37fd0553828982402af36f81685 Author: Chengchang Tang Date: Thu Dec 7 19:42:27 2023 +0800 RDMA/hns: Rename the interrupts Now, different devices may have the same interrupt name, which makes it difficult for users to distinguish between these interrupts. Modify the naming style to be consistent with our network devices. Before: "hns-aeq-0" "hns-ceq-0" ... Now: "hns-0000:35:00.0-aeq-0" "hns-0000:35:00.0-ceq-0" ... Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20231207114231.2872104-2-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 4d0c8d0aef6355660b6775d57ccd5d4ea2e15802 Author: Avri Altman Date: Wed Nov 29 11:25:35 2023 +0200 mmc: core: Use mrq.sbc in close-ended ffu Field Firmware Update (ffu) may use close-ended or open ended sequence. Each such sequence is comprised of a write commands enclosed between 2 switch commands - to and from ffu mode. So for the close-ended case, it will be: cmd6->cmd23-cmd25-cmd6. Some host controllers however, get confused when multi-block rw is sent without sbc, and may generate auto-cmd12 which breaks the ffu sequence. I encountered this issue while testing fwupd (github.com/fwupd/fwupd) on HP Chromebook x2, a qualcomm based QC-7c, code name - strongbad. Instead of a quirk, or hooking the request function of the msm ops, it would be better to fix the ioctl handling and make it use mrq.sbc instead of issuing SET_BLOCK_COUNT separately. Signed-off-by: Avri Altman Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20231129092535.3278-1-avri.altman@wdc.com Signed-off-by: Ulf Hansson commit 5cb2f9286a31f33dc732c57540838ad9339393ab Author: Vignesh Raghavendra Date: Wed Nov 22 11:32:14 2023 +0530 mmc: sdhci_am654: Drop lookup for deprecated ti,otap-del-sel ti,otap-del-sel has been deprecated since v5.7 and there are no users of this property and no documentation in the DT bindings either. Drop the fallback code looking for this property, this makes sdhci_am654_get_otap_delay() much easier to read as all the TAP values can be handled via a single iterator loop. Signed-off-by: Vignesh Raghavendra Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20231122060215.2074799-1-vigneshr@ti.com Signed-off-by: Ulf Hansson commit e18a38660786dbe8536ecf74563df25936a3532a Author: Nathan Chancellor Date: Thu Nov 16 18:46:00 2023 -0700 mmc: sdhci-of-dwcmshc: Use logical OR instead of bitwise OR in dwcmshc_probe() Clang warns (or errors with CONFIG_WERROR=y): drivers/mmc/host/sdhci-of-dwcmshc.c:873:7: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] 873 | if ((device_property_read_bool(dev, "mmc-ddr-1_8v")) | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 874 | (device_property_read_bool(dev, "mmc-hs200-1_8v")) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | || 875 | (device_property_read_bool(dev, "mmc-hs400-1_8v"))) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mmc/host/sdhci-of-dwcmshc.c:873:7: note: cast one or both operands to int to silence this warning drivers/mmc/host/sdhci-of-dwcmshc.c:873:7: error: use of bitwise '|' with boolean operands [-Werror,-Wbitwise-instead-of-logical] 873 | if ((device_property_read_bool(dev, "mmc-ddr-1_8v")) | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | || 874 | (device_property_read_bool(dev, "mmc-hs200-1_8v")) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/mmc/host/sdhci-of-dwcmshc.c:873:7: note: cast one or both operands to int to silence this warning 2 errors generated. There is little reason for this if statement to use bitwise ORs, as the short circuiting of logical OR does not need to be avoided in this context; it would be wasteful to call device_property_read_bool() three times if the first two calls returned true. Switch to logical OR to fix the warning. While in the area, the parentheses around the calls to device_property_read_bool() are not necessary and make the if statement harder to read, so remove them. Closes: https://github.com/ClangBuiltLinux/linux/issues/1960 Signed-off-by: Nathan Chancellor Acked-by: Adrian Hunter Tested-by: Drew Fustini Link: https://lore.kernel.org/r/20231116-sdhci-of-dwcmshc-fix-wbitwise-instead-of-logical-v1-1-7e1a7f4ccaab@kernel.org Signed-off-by: Ulf Hansson commit 3e3ce6314fc0eaa91d4cf7a663f6f3a793b4988c Author: Lad Prabhakar Date: Wed Nov 15 20:32:54 2023 +0000 dt-bindings: mmc: renesas,sdhi: Document RZ/Five SoC The SDHI block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,sdhi-r9a07g043" compatible string will be used on the RZ/Five SoC so to make this clear and to keep this file consistent, update the comment to include RZ/Five SoC. No driver changes are required as generic compatible string "renesas,rcar-gen3-sdhi" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20231115203254.30544-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Ulf Hansson commit dd69bd870998648c53fb11ea152c6b960b870b0b Author: Swati Agarwal Date: Tue Nov 14 15:53:21 2023 +0530 dt-bindings: mmc: arasan,sdci: Add gate property for Xilinx platforms Add gate property in example node for Xilinx platforms which will be used to ungate the DLL clock. DLL clock is required for higher frequencies like 50MHz, 100MHz and 200MHz. DLL clock is automatically selected by the SD controller when the SD output clock frequency is more than 25 MHz. Signed-off-by: Swati Agarwal Co-developed-by: Sai Krishna Potthuri Signed-off-by: Sai Krishna Potthuri Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231114102321.1147951-1-sai.krishna.potthuri@amd.com Signed-off-by: Ulf Hansson commit 43658a542ebf13f1bb80cfaa8ae58f061d0d71b0 Author: Drew Fustini Date: Thu Nov 9 21:41:13 2023 -0800 mmc: sdhci-of-dwcmshc: Add support for T-Head TH1520 Add support for the mmc controller in the T-Head TH1520 with the new compatible "thead,th1520-dwcmshc". Implement custom sdhci_ops for set_uhs_signaling, reset, voltage_switch, and platform_execute_tuning. Acked-by: Adrian Hunter Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20231109-th1520-mmc-v5-3-018bd039cf17@baylibre.com Signed-off-by: Ulf Hansson commit 9cc811a342be78270d20d1fff3832bc0b23ef364 Author: Drew Fustini Date: Thu Nov 9 21:41:12 2023 -0800 mmc: sdhci: add __sdhci_execute_tuning() to header Expose __sdhci_execute_tuning() so that it can be called from the mmc host controller drivers. In the sdhci-of-dwcmshc driver, sdhci_dwcmshc_th1520_ops sets platform_execute_tuning to th1520_execute_tuning(). That function has to manipulate phy registers before tuning can be performed. To avoid copying the code verbatim from __sdhci_execute_tuning() into th1520_execute_tuning(), make it possible for __sdhci_execute_tuning() to be called from sdhci-of-dwcmshc. Acked-by: Adrian Hunter Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20231109-th1520-mmc-v5-2-018bd039cf17@baylibre.com Signed-off-by: Ulf Hansson commit edee955389176dfd798d29a69098ce5744d09833 Author: Drew Fustini Date: Thu Nov 9 21:41:11 2023 -0800 dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support Add compatible value for the T-Head TH1520 dwcmshc controller. Acked-by: Guo Ren Acked-by: Krzysztof Kozlowski Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20231109-th1520-mmc-v5-1-018bd039cf17@baylibre.com Signed-off-by: Ulf Hansson commit 1bcfbfd7c9aa716f61a01682345a1b329f6a6e66 Author: Christophe Kerello Date: Wed Nov 8 15:16:37 2023 +0100 mmc: mmci: stm32: add SDIO in-band interrupt mode Add the support of SDIO in-band interrupt mode for STM32 and Ux500 variants. It allows the SD I/O card to interrupt the host on SDMMC_D1 data line. It is not enabled by default on Ux500 variant as this is unstable and Ux500 users should use out-of-band IRQs. Signed-off-by: Christophe Kerello Signed-off-by: Yann Gautier Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231108141637.119497-1-yann.gautier@foss.st.com Signed-off-by: Ulf Hansson commit 37c8ceb6d92c955f5dd8223c3f6c90b277322210 Author: Avri Altman Date: Mon Oct 30 08:22:26 2023 +0200 mmc: core: Remove packed command leftovers Packed commands support was removed long time ago, but some bits got left behind. Remove them. Signed-off-by: Avri Altman Link: https://lore.kernel.org/r/20231030062226.1895692-1-avri.altman@wdc.com Signed-off-by: Ulf Hansson commit 402928b58ec62b42b11992a7b51ff2f56ed65a18 Author: Michael Ellerman Date: Wed Dec 6 22:55:48 2023 +1100 powerpc/Makefile: Auto detect cross compiler If no cross compiler is specified, try to auto detect one. Look for various combinations, matching: powerpc(64(le)?)?(-unknown)?-linux(-gnu)?- There are more possibilities, but the above is known to find a compiler on Fedora and Ubuntu (which use linux-gnu-), and also detects the kernel.org cross compilers (which use linux-). This allows cross compiling with simply: # Ubuntu $ sudo apt install gcc-powerpc-linux-gnu # Fedora $ sudo dnf install gcc-powerpc64-linux-gnu $ make ARCH=powerpc defconfig $ make ARCH=powerpc -j 4 Inspired by arch/parisc/Makefile. Acked-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://msgid.link/20231206115548.1466874-4-mpe@ellerman.id.au commit 22f17b02f88b48c01d3ac38d40d2b0b695ab2d10 Author: Michael Ellerman Date: Wed Dec 6 22:55:47 2023 +1100 powerpc/Makefile: Default to ppc64le_defconfig when cross building If the kernel is being cross compiled, there is no information from uname on which defconfig is most appropriate, so the Makefile defaults to ppc64. However these days almost all distros that support powerpc are little endian, so it's more likely that defaulting to ppc64le_defconfig will produce something useful for a user. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231206115548.1466874-3-mpe@ellerman.id.au commit 42449052c94f22e18e01d71147d8fd75cb58132a Author: Michael Ellerman Date: Wed Dec 6 22:55:46 2023 +1100 powerpc/vdso: No need to undef powerpc for 64-bit build The vdso Makefile adds -U$(ARCH) to CPPFLAGS for the vdso64.lds linker script. ARCH is always powerpc, so it becomes -Upowerpc, which means undefine the "powerpc" symbol. But the 64-bit compiler doesn't define powerpc in the first place, compare: $ gcc-5.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc -m32 -E -dM - Link: https://msgid.link/20231206115548.1466874-2-mpe@ellerman.id.au commit dc420877b5bd92db5d80df6b117c7a0f987290af Author: Michael Ellerman Date: Wed Dec 6 22:55:45 2023 +1100 powerpc/Makefile: Don't use $(ARCH) unnecessarily There's no need to use $(ARCH) for references to the arch directory in the source tree, it is always arch/powerpc. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231206115548.1466874-1-mpe@ellerman.id.au commit 4cb3e3ec23fa33a0f58ff133d5aedd26a50356ef Author: Michael Ellerman Date: Tue Dec 5 16:12:39 2023 +1100 MAINTAINERS: powerpc: Transfer PPC83XX to Christophe Christophe volunteered[1] to maintain PPC83XX. 1: https://lore.kernel.org/all/7b1bf4dc-d09d-35b8-f4df-16bf00429b6d@csgroup.eu/ Acked-by: Christophe Leroy Acked-by: Crystal Wood Signed-off-by: Michael Ellerman Link: https://msgid.link/20231205051239.737384-1-mpe@ellerman.id.au commit a59c14f6b4caad7671dfb81737beba0b313897e4 Author: Aneesh Kumar K.V (IBM) Date: Mon Dec 4 15:06:38 2023 +0530 powerpc/book3s64: Avoid __pte_protnone() check in __pte_flags_need_flush() This reverts commit 1abce0580b89 ("powerpc/64s: Fix __pte_needs_flush() false positive warning") The previous patch dropped the usage of _PAGE_PRIVILEGED with PAGE_NONE. Hence this check can be dropped. Signed-off-by: "Aneesh Kumar K.V (IBM)" Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20231204093638.71503-2-aneesh.kumar@kernel.org commit 773b93f1d1c38c5c0d5308b8c9229c7a6ec5b2a0 Author: Aneesh Kumar K.V (IBM) Date: Mon Dec 4 15:06:37 2023 +0530 powerpc/book3s/hash: Drop _PAGE_PRIVILEGED from PAGE_NONE There used to be a dependency on _PAGE_PRIVILEGED with pte_savedwrite. But that got dropped by commit 6a56ccbcf6c6 ("mm/autonuma: use can_change_(pte|pmd)_writable() to replace savedwrite") With the change in this patch numa fault pte (pte_protnone()) gets mapped as regular user pte with RWX cleared (no-access) whereas earlier it used to be mapped _PAGE_PRIVILEGED. Hash fault handling code gets some WARN_ON added in this patch because those functions are not expected to get called with _PAGE_READ cleared. commit 18061c17c8ec ("powerpc/mm: Update PROTFAULT handling in the page fault path") explains the details. Signed-off-by: "Aneesh Kumar K.V (IBM)" Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://msgid.link/20231204093638.71503-1-aneesh.kumar@kernel.org commit 180c6b072bf360b686e53d893d8dcf7dbbaec6bb Author: Jordan Niethe Date: Fri Dec 1 18:56:17 2023 +0530 KVM: PPC: Book3S HV nestedv2: Do not cancel pending decrementer exception In the nestedv2 case, if there is a pending decrementer exception, the L1 must get the L2's timebase from the L0 to see if the exception should be cancelled. This adds the overhead of a H_GUEST_GET_STATE call to the likely case in which the decrementer should not be cancelled. Avoid this logic for the nestedv2 case. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-13-vaibhav@linux.ibm.com commit 797a5af8fc7297b19e5c6b1713956ebf1e6c1cde Author: Jordan Niethe Date: Fri Dec 1 18:56:16 2023 +0530 KVM: PPC: Reduce reliance on analyse_instr() in mmio emulation Commit 709236039964 ("KVM: PPC: Reimplement non-SIMD LOAD/STORE instruction mmio emulation with analyse_instr() input") and commit 2b33cb585f94 ("KVM: PPC: Reimplement LOAD_FP/STORE_FP instruction mmio emulation with analyse_instr() input") made kvmppc_emulate_loadstore() use the results from analyse_instr() for instruction emulation. In particular the effective address from analyse_instr() is used for UPDATE type instructions and fact that op.val is all ready endian corrected is used in the STORE case. However, these changes now have some negative implications for the nestedv2 case. For analyse_instr() to determine the correct effective address, the GPRs must be loaded from the L0. This is not needed as vcpu->arch.vaddr_accessed is already set. Change back to using vcpu->arch.vaddr_accessed. In the STORE case, use kvmppc_get_gpr() value instead of the op.val. kvmppc_get_gpr() will reload from the L0 if needed in the nestedv2 case. This means if a byte reversal is needed must now be passed to kvmppc_handle_store() like in the kvmppc_handle_load() case. This means the call to kvmhv_nestedv2_reload_ptregs() can be avoided as there is no concern about op.val being stale. Drop the call to kvmhv_nestedv2_mark_dirty_ptregs() as without the call to kvmhv_nestedv2_reload_ptregs(), stale state could be marked as valid. This is fine as the required marking things dirty is already handled for the UPDATE case by the call to kvmppc_set_gpr(). For LOADs, it is handled in kvmppc_complete_mmio_load(). This is called either directly in __kvmppc_handle_load() if the load can be handled in KVM, or on the next kvm_arch_vcpu_ioctl_run() if an exit was required. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-12-vaibhav@linux.ibm.com commit db1dcfae1dae3c042f348175ac0394e2fc14b1b3 Author: Jordan Niethe Date: Fri Dec 1 18:56:15 2023 +0530 KVM: PPC: Book3S HV nestedv2: Register the VPA with the L0 In the nestedv2 case, the L1 may register the L2's VPA with the L0. This allows the L0 to manage the L2's dispatch count, as well as enable possible performance optimisations by seeing if certain resources are not being used by the L2 (such as the PMCs). Use the H_GUEST_SET_STATE call to inform the L0 of the L2's VPA address. This can not be done in the H_GUEST_VCPU_RUN input buffer. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-11-vaibhav@linux.ibm.com commit 4bc8ff6f170c78f64446c5d5f9ef6771eefd3416 Author: Jordan Niethe Date: Fri Dec 1 18:56:14 2023 +0530 KVM: PPC: Book3S HV nestedv2: Do not call H_COPY_TOFROM_GUEST H_COPY_TOFROM_GUEST is part of the nestedv1 API and so should not be called by a nestedv2 host. Do not attempt to call it. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-10-vaibhav@linux.ibm.com commit a9a3de530d7531bf6cd3f6ccda769cd94c1105a0 Author: Jordan Niethe Date: Fri Dec 1 18:56:13 2023 +0530 KVM: PPC: Book3S HV nestedv2: Avoid msr check in kvmppc_handle_exit_hv() The msr check in kvmppc_handle_exit_hv() is not needed for nestedv2 hosts, skip the check to avoid a H_GUEST_GET_STATE hcall. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-9-vaibhav@linux.ibm.com commit df938a5576f3f3b08e1f217c660385c0d58a0b91 Author: Jordan Niethe Date: Fri Dec 1 18:56:12 2023 +0530 KVM: PPC: Book3S HV nestedv2: Do not inject certain interrupts There is no need to inject an external interrupt in kvmppc_book3s_irqprio_deliver() as the test for BOOK3S_IRQPRIO_EXTERNAL in kvmhv_run_single_vcpu() before guest entry will raise LPCR_MER if needed. There is also no need to inject the decrementer interrupt as this will be raised within the L2 if needed. Avoiding these injections reduces H_GUEST_GET_STATE hcalls by the L1. Suggested-by: Nicholas Piggin Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-8-vaibhav@linux.ibm.com commit ecd10702baae5c16a91d139bde7eff84ce55daee Author: Nicholas Piggin Date: Fri Dec 1 18:56:11 2023 +0530 KVM: PPC: Book3S HV: Handle pending exceptions on guest entry with MSR_EE Commit 026728dc5d41 ("KVM: PPC: Book3S HV P9: Inject pending xive interrupts at guest entry") changed guest entry so that if external interrupts are enabled, BOOK3S_IRQPRIO_EXTERNAL is not tested for. Test for this regardless of MSR_EE. For an L1 host, do not inject an interrupt, but always use LPCR_MER. If the L0 desires it can inject an interrupt. Fixes: 026728dc5d41 ("KVM: PPC: Book3S HV P9: Inject pending xive interrupts at guest entry") Signed-off-by: Nicholas Piggin [jpn: use kvmpcc_get_msr(), write commit message] Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-7-vaibhav@linux.ibm.com commit ec0f6639fa8853cf6bfdfc3588aada7eeb7e5e37 Author: Jordan Niethe Date: Fri Dec 1 18:56:10 2023 +0530 KVM: PPC: Book3S HV nestedv2: Ensure LPCR_MER bit is passed to the L0 LPCR_MER is conditionally set during entry to a guest if there is a pending external interrupt. In the nestedv2 case, this change is not being communicated to the L0, which means it is not being set in the L2. Ensure the updated LPCR value is passed to the L0. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-6-vaibhav@linux.ibm.com commit e678748a8dca5b57041a84a66577f6168587b3f7 Author: Jordan Niethe Date: Fri Dec 1 18:56:09 2023 +0530 KVM: PPC: Book3S HV nestedv2: Get the PID only if needed to copy tofrom a guest kvmhv_copy_tofrom_guest_radix() gets the PID at the start of the function. If pid is not used, then this is a wasteful H_GUEST_GET_STATE hcall for nestedv2 hosts. Move the assignment to where pid will be used. Suggested-by: Nicholas Piggin Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-5-vaibhav@linux.ibm.com commit 63ccae78cd88b52fb1d598ae33fa8408ce067b30 Author: Jordan Niethe Date: Fri Dec 1 18:56:08 2023 +0530 KVM: PPC: Book3S HV nestedv2: Do not check msr on hcalls The check for a hcall coming from userspace is done for KVM-PR. This is not supported for nestedv2 and the L0 will directly inject the necessary exception to the L2 if userspace performs a hcall. Avoid checking the MSR and thus avoid a H_GUEST_GET_STATE hcall in the L1. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-4-vaibhav@linux.ibm.com commit e0d4acbcba3f2d63dc15bc5432c8e26fc9e19675 Author: Jordan Niethe Date: Fri Dec 1 18:56:07 2023 +0530 KVM: PPC: Book3S HV nestedv2: Avoid reloading the tb offset The kvmppc_get_tb_offset() getter reloads KVMPPC_GSID_TB_OFFSET from the L0 for nestedv2 host. This is unnecessary as the value does not change. KVMPPC_GSID_TB_OFFSET also need not be reloaded in kvmppc_{s,g}et_dec_expires(). Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-3-vaibhav@linux.ibm.com commit 7d370e1812b9a5f5cc68aaa5991bf7d31d8ff52c Author: Jordan Niethe Date: Fri Dec 1 18:56:06 2023 +0530 KVM: PPC: Book3S HV nestedv2: Invalidate RPT before deleting a guest An L0 must invalidate the L2's RPT during H_GUEST_DELETE if this has not already been done. This is a slow operation that means H_GUEST_DELETE must return H_BUSY multiple times before completing. Invalidating the tables before deleting the guest so there is less work for the L0 to do. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201132618.555031-2-vaibhav@linux.ibm.com commit 8527ecc6cf25417a1940f91eb91fca0c69a5c553 Author: Vijendar Mukunda Date: Thu Dec 7 10:25:01 2023 +0530 ASoC: amd: acp: modify config flag read logic Modify acp config flag read logic from ACP v7.0 onwards. Instead of reading from DMI table match entry, read the config flag value from BIOS ACPI table. This will remove updating DMI table when new platform support is added. Use FLAG_AMD_LEGACY_ONLY_DMIC flag as default one. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/20231207045505.1519151-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit ce17aa4cf2db7d6b95a3f854ac52d0d49881dd49 Author: Peter Ujfalusi Date: Thu Dec 7 11:54:25 2023 +0200 ASoC: SOF: Intel: hda-codec: Delay the codec device registration The current code flow is: 1. snd_hdac_device_register() 2. set parameters needed by the hdac driver 3. request_codec_module() the hdac driver is probed at this point During boot the codec drivers are not loaded when the hdac device is registered, it is going to be probed later when loading the codec module, which point the parameters are set. On module remove/insert rmmod snd_sof_pci_intel_tgl modprobe snd_sof_pci_intel_tgl The codec module remains loaded and the driver will be probed when the hdac device is created right away, before the parameters for the driver has been configured: 1. snd_hdac_device_register() the hdac driver is probed at this point 2. set parameters needed by the hdac driver 3. request_codec_module() will be a NOP as the module is already loaded Move the snd_hdac_device_register() later, to be done right before requesting the codec module to make sure that the parameters are all set before the device is created: 1. set parameters needed by the hdac driver 2. snd_hdac_device_register() 3. request_codec_module() This way at the hdac driver probe all parameters will be set in all cases. Link: https://github.com/thesofproject/linux/issues/4731 Fixes: a0575b4add21 ("ASoC: hdac_hda: Conditionally register dais for HDMI and Analog") Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231207095425.19597-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit d16f1096b320d42e41ad9dee4d4098afd140d3e1 Author: Daniel Danzberger Date: Tue Dec 5 17:42:31 2023 +0100 net: dsa: microchip: move ksz_chip_id enum to platform include With the ksz_chip_id enums moved to the platform include file for ksz switches, platform code that instantiates a device can now use these to set ksz_platform_data::chip_id. Signed-off-by: Daniel Danzberger Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3bc05faf37876f99e2a7baffa9c66fdcfb11d1f7 Author: Vladimir Oltean Date: Tue Dec 5 17:42:30 2023 +0100 net: dsa: microchip: properly support platform_data probing The ksz driver has bits and pieces of platform_data probing support, but it doesn't work. The conventional thing to do is to have an encapsulating structure for struct dsa_chip_data that gets put into dev->platform_data. This driver expects a struct ksz_platform_data, but that doesn't contain a struct dsa_chip_data as first element, which will obviously not work with dsa_switch_probe() -> dsa_switch_parse(). Pointing dev->platform_data to a struct dsa_chip_data directly is in principle possible, but that doesn't work either. The driver has ksz_switch_detect() to read the device ID from hardware, followed by ksz_check_device_id() to compare it against a predetermined expected value. This protects against early errors in the SPI/I2C communication. With platform_data, the mechanism in ksz_check_device_id() doesn't work and even leads to NULL pointer dereferences, since of_device_get_match_data() doesn't work in that probe path. So obviously, the platform_data support is actually missing, and the existing handling of struct ksz_platform_data is bogus. Complete the support by adding a struct dsa_chip_data as first element, and fixing up ksz_check_device_id() to pick up the platform_data instead of the unavailable of_device_get_match_data(). The early dev->chip_id assignment from ksz_switch_register() is also bogus, because ksz_switch_detect() sets it to an initial value. So remove it. Also, ksz_platform_data :: enabled_ports isn't used anywhere, delete it. Link: https://lore.kernel.org/netdev/20231204154315.3906267-1-dd@embedd.com/ Signed-off-by: Vladimir Oltean Signed-off-by: Daniel Danzberger Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 284f17ac13fe34ae9eecbe57bb91553374d9b855 Author: Vlastimil Babka Date: Fri Nov 3 20:24:51 2023 +0100 mm/slub: handle bulk and single object freeing separately Currently we have a single function slab_free() handling both single object freeing and bulk freeing with necessary hooks, the latter case requiring slab_free_freelist_hook(). It should be however better to distinguish the two use cases for the following reasons: - code simpler to follow for the single object case - better code generation - although inlining should eliminate the slab_free_freelist_hook() for single object freeing in case no debugging options are enabled, it seems it's not perfect. When e.g. KASAN is enabled, we're imposing additional unnecessary overhead for single object freeing. - preparation to add percpu array caches in near future Therefore, simplify slab_free() for the single object case by dropping unnecessary parameters and calling only slab_free_hook() instead of slab_free_freelist_hook(). Rename the bulk variant to slab_free_bulk() and adjust callers accordingly. While at it, flip (and document) slab_free_hook() return value so that it returns true when the freeing can proceed, which matches the logic of slab_free_freelist_hook() and is not confusingly the opposite. Additionally we can simplify a bit by changing the tail parameter of do_slab_free() when freeing a single object - instead of NULL we can set it equal to head. bloat-o-meter shows small code reduction with a .config that has KASAN etc disabled: add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-118 (-118) Function old new delta kmem_cache_alloc_bulk 1203 1196 -7 kmem_cache_free 861 835 -26 __kmem_cache_free 741 704 -37 kmem_cache_free_bulk 911 863 -48 Reviewed-by: Chengming Zhou Signed-off-by: Vlastimil Babka commit 520a688a2edfddba97968bf9e133b9a3d7c78059 Author: Vlastimil Babka Date: Thu Nov 2 16:34:39 2023 +0100 mm/slub: introduce __kmem_cache_free_bulk() without free hooks Currently, when __kmem_cache_alloc_bulk() fails, it frees back the objects that were allocated before the failure, using kmem_cache_free_bulk(). Because kmem_cache_free_bulk() calls the free hooks (KASAN etc.) and those expect objects that were processed by the post alloc hooks, slab_post_alloc_hook() is called before kmem_cache_free_bulk(). This is wasteful, although not a big concern in practice for the rare error path. But in order to efficiently handle percpu array batch refill and free in the near future, we will also need a variant of kmem_cache_free_bulk() that avoids the free hooks. So introduce it now and use it for the failure path. In case of failure we however still need to perform memcg uncharge so handle that in a new memcg_slab_alloc_error_hook(). Thanks to Chengming Zhou for noticing the missing uncharge. As a consequence, __kmem_cache_alloc_bulk() no longer needs the objcg parameter, remove it. Reviewed-by: Chengming Zhou Signed-off-by: Vlastimil Babka commit 6f3dd2c31d7d703a814c59f60daf95c57fa6a4c2 Author: Vlastimil Babka Date: Mon Aug 7 20:50:44 2023 +0200 mm/slub: fix bulk alloc and free stats The SLUB sysfs stats enabled CONFIG_SLUB_STATS have two deficiencies identified wrt bulk alloc/free operations: - Bulk allocations from cpu freelist are not counted. Add the ALLOC_FASTPATH counter there. - Bulk fastpath freeing will count a list of multiple objects with a single FREE_FASTPATH inc. Add a stat_add() variant to count them all. Reviewed-by: Chengming Zhou Signed-off-by: Vlastimil Babka commit cf9cb028ac56696ff879af1154c4b2f0b12701fd Author: Tvrtko Ursulin Date: Fri Dec 1 12:21:09 2023 +0000 drm/i915: Use internal class when counting engine resets Commit 503579448db9 ("drm/i915/gsc: Mark internal GSC engine with reserved uabi class") made the GSC0 engine not have a valid uabi class and so broke the engine reset counting, which in turn was made class based in cb823ed9915b ("drm/i915/gt: Use intel_gt as the primary object for handling resets"). Despite the title and commit text of the latter is not mentioning it (and has left the storage array incorrectly sized), tracking by class, despite it adding aliasing in hypthotetical multi-tile systems, is handy for virtual engines which for instance do not have a valid engine->id. Therefore we keep that but just change it to use the internal class which is always valid. We also add a helper to increment the count, which aligns with the existing getter. What was broken without this fix were out of bounds reads every time a reset would happen on the GSC0 engine, or during selftests when storing and cross-checking the counts in igt_live_test_begin and igt_live_test_end. Signed-off-by: Tvrtko Ursulin Fixes: dfed6b58d54f ("drm/i915/gsc: Mark internal GSC engine with reserved uabi class") [tursulin: fixed Fixes tag] Reported-by: Alan Previn Teres Alexis Cc: Daniele Ceraolo Spurio Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20231201122109.729006-2-tvrtko.ursulin@linux.intel.com commit 0647ece3819b018cb62a71c3bcb7c2c3243e78ac Author: Tvrtko Ursulin Date: Fri Dec 1 12:21:08 2023 +0000 drm/i915/selftests: Fix engine reset count storage for multi-tile Engine->id namespace is per-tile so struct igt_live_test->reset_engine[] needs to be two-dimensional so engine reset counts from all tiles can be stored with no aliasing. With aliasing, if we had a real multi-tile platform, the reset counts would be incorrect for same engine instance on different tiles. Signed-off-by: Tvrtko Ursulin Fixes: 0c29efa23f5c ("drm/i915/selftests: Consider multi-gt instead of to_gt()") Reported-by: Alan Previn Teres Alexis Cc: Tejas Upadhyay Cc: Andi Shyti Cc: Daniele Ceraolo Spurio Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231201122109.729006-1-tvrtko.ursulin@linux.intel.com commit 7054b551de18e9875fbdf8d4f3baade428353545 Author: Maarten Lankhorst Date: Wed Oct 25 12:11:31 2023 +0200 drm/i915/display: Use i915_gem_object_get_dma_address to get dma address Works better for xe like that. obj is no longer const. Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20231204134946.16219-1-maarten.lankhorst@linux.intel.com Reviewed-by: Jouni Högander commit f270b7087dc8369d21018541157a270a023e7f21 Author: Jani Nikula Date: Tue Dec 5 15:41:43 2023 +0200 drm/i915: use octal permissions in display debugfs Octal permissions are preferred over the symbolics ones. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231205134143.2427661-3-jani.nikula@intel.com commit 77bdb83f0dbc8dd64c07bba08ecd2ac83030a508 Author: Jani Nikula Date: Tue Dec 5 15:41:42 2023 +0200 drm/i915: pass struct intel_connector to connector debugfs fops Prefer struct intel_connector over struct drm_connector, and unify the declarations in the fops. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231205134143.2427661-2-jani.nikula@intel.com commit 922181a52de923a2220998a26d84d94889dd6e97 Author: Jani Nikula Date: Tue Dec 5 15:41:41 2023 +0200 drm/i915: use intel_connector in intel_connector_debugfs_add() Prefer struct intel_connector over struct drm_connector. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231205134143.2427661-1-jani.nikula@intel.com commit 261200eb7030dc796f08c1ad778bd0b18b19451b Author: Jani Nikula Date: Tue Dec 5 14:15:45 2023 +0200 drm/i915/rpm: add rpm_to_i915() helper around container_of() Reduce the duplication. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231205121545.2338665-1-jani.nikula@intel.com commit 76385d493c2137460ee7735a5d3a494099c35188 Author: Marek Szyprowski Date: Tue Dec 5 14:06:31 2023 +0100 drm/debugfs: fix potential NULL pointer dereference encoder->funcs entry might be NULL, so check it first before calling its methods. This fixes NULL pointer dereference observed on Rasberry Pi 3b/4b boards. Fixes: caf525ed45b4 ("drm/encoder: register per-encoder debugfs dir") Signed-off-by: Marek Szyprowski Tested-by: Nishanth Menon Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231205130631.3456986-1-m.szyprowski@samsung.com commit 812cc1da7ffd9e178ef66b8a22113be10fba466c Author: Nathan Chancellor Date: Tue Dec 5 13:13:36 2023 -0700 drm/bridge: Return NULL instead of plain 0 in drm_dp_hpd_bridge_register() stub sparse complains: drivers/usb/typec/tcpm/qcom/qcom_pmic_typec.c: note: in included file: include/drm/bridge/aux-bridge.h:29:16: sparse: sparse: Using plain integer as NULL pointer Return NULL to clear up the warning. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312060025.BdeqZrWx-lkp@intel.com/ Fixes: e560518a6c2e ("drm/bridge: implement generic DP HPD bridge") Signed-off-by: Nathan Chancellor Reviewed-by: Bryan O'Donoghue Reviewed-by: Guenter Roeck Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231205-drm_aux_bridge-fixes-v1-3-d242a0ae9df4@kernel.org commit 03c0343bdf8d43fee6dfe92a7b66308b60e9e77c Author: Nathan Chancellor Date: Tue Dec 5 13:13:35 2023 -0700 usb: typec: qcom-pmic-typec: Only select DRM_AUX_HPD_BRIDGE with OF CONFIG_DRM_AUX_HPD_BRIDGE depends on CONFIG_OF but that dependency is not included when CONFIG_TYPEC_QCOM_PMIC selects it, resulting in a Kconfig warning when CONFIG_OF is disabled: WARNING: unmet direct dependencies detected for DRM_AUX_HPD_BRIDGE Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n] Selected by [m]: - TYPEC_QCOM_PMIC [=m] && USB_SUPPORT [=y] && TYPEC [=m] && TYPEC_TCPM [=m] && (ARCH_QCOM || COMPILE_TEST [=y]) && (DRM [=m] || DRM [=m]=n) && DRM_BRIDGE [=y] Only select CONFIG_DRM_AUX_HPD_BRIDGE with both CONFIG_DRM_BRIDGE and CONFIG_OF to clear up the warning. Fixes: 7d9f1b72b296 ("usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE") Signed-off-by: Nathan Chancellor Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Reviewed-by: Bryan O'Donoghue Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231205-drm_aux_bridge-fixes-v1-2-d242a0ae9df4@kernel.org commit 5908cbe82ef77f6019349c450d7f1c8b3c29bb0e Author: Nathan Chancellor Date: Tue Dec 5 13:13:34 2023 -0700 usb: typec: nb7vpq904m: Only select DRM_AUX_BRIDGE with OF CONFIG_DRM_AUX_BRIDGE depends on CONFIG_OF but that dependency is not included when CONFIG_TYPEC_MUX_NB7VPQ904M selects it, resulting in a Kconfig warning when CONFIG_OF is disabled: WARNING: unmet direct dependencies detected for DRM_AUX_BRIDGE Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && OF [=n] Selected by [y]: - TYPEC_MUX_NB7VPQ904M [=y] && USB_SUPPORT [=y] && TYPEC [=y] && I2C [=y] && (DRM [=y] || DRM [=y]=n) && DRM_BRIDGE [=y] Only select CONFIG_DRM_AUX_BRIDGE with both CONFIG_DRM_BRIDGE and CONFIG_OF to clear up the warning. Fixes: c5d296bad640 ("usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE") Signed-off-by: Nathan Chancellor Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231205-drm_aux_bridge-fixes-v1-1-d242a0ae9df4@kernel.org commit d5449d59f10eb74a55947b95436172f8739cc57c Merge: b8dbbbc535a95 9f19a4ebc80af Author: David S. Miller Date: Thu Dec 7 10:22:09 2023 +0000 Merge branch 'dsa-microchip-rmii-reference' Ante Knezic says: ==================== net: dsa: microchip: enable setting rmii reference KSZ88X3 devices can select between internal and external RMII reference clock. This patch series introduces new device tree property for setting reference clock to internal. --- V5: - move rmii-clk-internal to be a port device tree property. V4: - remove rmii_clk_internal from ksz_device, as its not needed any more - move rmii clk config as well as ksz8795_cpu_interface_select to ksz8_config_cpu_port V3: - move ksz_cfg from global switch config to port config as suggested by Vladimir Oltean - reverse patch order as suggested by Vladimir Oltean - adapt dt schema as suggested by Conor Dooley V2: - don't rely on default register settings - enforce set/clear property as suggested by Andrew Lunn - enforce dt schema as suggested by Conor Dooley ==================== Signed-off-by: David S. Miller commit 9f19a4ebc80af64bddda1cbfb9bf574b689222c0 Author: Ante Knezic Date: Tue Dec 5 11:03:39 2023 +0100 net: dsa: microchip: add property to select internal RMII reference clock Microchip KSZ8863/KSZ8873 have the ability to select between internal and external RMII reference clock. By default, reference clock needs to be provided via REFCLKI_3 pin. If required, device can be setup to provide RMII clock internally so that REFCLKI_3 pin can be left unconnected. Add a new "microchip,rmii-clk-internal" property which will set RMII clock reference to internal. If property is not set, reference clock needs to be provided externally. While at it, move the ksz8795_cpu_interface_select() to ksz8_config_cpu_port() to get a cleaner call path for cpu port. Signed-off-by: Ante Knezic Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8e3bfaab2ad956aa551a3cf8f7108f4b2c3b18d0 Author: Ante Knezic Date: Tue Dec 5 11:03:38 2023 +0100 dt-bindings: net: microchip,ksz: document microchip,rmii-clk-internal Add documentation for selecting reference rmii clock on KSZ88X3 devices Signed-off-by: Ante Knezic Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 6783f10a1d076297a66b5b57e0a96d8c8363271b Author: Jiri Slaby (SUSE) Date: Tue Dec 5 12:15:15 2023 +0100 wifi: ath5k: remove unused ath5k_eeprom_info::ee_antenna clang-struct [1] found that ee_antenna in struct ath5k_eeprom_info is unused. The commit 1048643ea94d ("ath5k: Clean up eeprom parsing and add missing calibration data") added it, but did not use it in any way. Neither, there is a later user. So remove that unused member. [1] https://github.com/jirislaby/clang-struct Signed-off-by: Jiri Slaby (SUSE) Cc: Felix Fietkau Cc: Nick Kossifidis Cc: Luis Chamberlain Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231205111515.21470-1-jirislaby@kernel.org commit 63b896629353157e8ca77cabdfab340b5c69ca59 Author: James Prestwood Date: Tue Dec 5 17:15:36 2023 +0200 wifi: ath10k: add support to allow broadcast action frame RX Broadcast action frames are needed for the Device Provisioning Protocol (DPP) for Presence and PKEX Exchange requests. Currently just ath9k has this capability so this is being enabled for ath10k (for at least one hardware variant). Add a new capability flag in ath10k_hw_params to indicate support for receiving multicast action frames. This bit is then checked when configuring the RX filter and (if set) multicast action frame registration is enabled. Until more hardware can be tested only the "qca6174 hw3.2" variant is enabling this feature. Note: I went ahead and removed the 'changed_flags' mask operation since it had no effect, that parameter was not being used anywhere. Tested-on: QCA6174 hw3.2 WLAN.RM.4.4.1-00288- Signed-off-by: James Prestwood Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231116173246.40458-1-prestwoj@gmail.com commit dcdf1bbe82f4b2a301a3692a0b1942c3fda70644 Author: Luca Coelho Date: Fri Dec 1 12:00:32 2023 +0200 drm/i915: handle uncore spinlock when not available The uncore code may not always be available (e.g. when we build the display code with Xe), so we can't always rely on having the uncore's spinlock. To handle this, split the spin_lock/unlock_irqsave/restore() into spin_lock/unlock() followed by a call to local_irq_save/restore() and create wrapper functions for locking and unlocking the uncore's spinlock. In these functions, we have a condition check and only actually try to lock/unlock the spinlock when I915 is defined, and thus uncore is available. This keeps the ifdefs contained in these new functions and all such logic inside the display code. Cc: Tvrtko Ursulin Cc: Jani Nikula Cc: Ville Syrjala Cc: Rodrigo Vivi Signed-off-by: Luca Coelho Reviewed-by: Jouni Högander Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20231201100032.1367589-1-luciano.coelho@intel.com commit 583b5273a624e7d87b7038404cb1524450abdfbc Author: Andy Shevchenko Date: Mon Dec 4 17:56:36 2023 +0200 pinctrl: nuvoton: Convert to use struct pingroup and PINCTRL_PINGROUP() The pin control header provides struct pingroup and PINCTRL_PINGROUP() macro. Utilize them instead of open coded variants in the driver. Reviewed-by: Jonathan Neuschäfer Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231204160033.1872569-6-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 3859a6fdf0edd54e05d0a35a2b418dbf85d43dc1 Author: Andy Shevchenko Date: Mon Dec 4 17:56:35 2023 +0200 pinctrl: keembay: Convert to use struct pingroup The pin control header provides struct pingroup. Utilize it instead of open coded variants in the driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231204160033.1872569-5-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit be1d5f57366c3181b3df4b818caa2cd8a5c95490 Author: Andy Shevchenko Date: Mon Dec 4 17:56:34 2023 +0200 pinctrl: equilibrium: Convert to use struct pingroup The pin control header provides struct pingroup. Utilize it instead of open coded variants in the driver. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231204160033.1872569-4-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit d98d73855f48e9f97f8f08d2376fb925ffc58c3f Author: Andy Shevchenko Date: Mon Dec 4 17:56:33 2023 +0200 pinctrl: core: Make pins const unsigned int pointer in struct group_desc It's unclear why it's not a const unsigned int pointer from day 1. Make the pins member const unsigned int pointer in struct group_desc. Update necessary APIs. Reviewed-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231204160033.1872569-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 731b30f6aab7c45bb89372c3c05b711cee362b69 Author: Andy Shevchenko Date: Mon Dec 4 17:56:32 2023 +0200 pinctrl: renesas: Mark local variable with const in ->set_mux() We are not going to change pins in the ->set_mux() callback. Mark the local variable with a const qualifier. While at it, make it also unsigned. Signed-off-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231204160033.1872569-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 18793e050504288345eb455a471677b57117bcc6 Author: Christoph Hellwig Date: Mon Dec 4 21:07:19 2023 +0100 xfs: move xfs_ondisk.h to libxfs/ Move xfs_ondisk.h to libxfs so that we can do the struct sanity checks in userspace libxfs as well. This should allow us to retire the somewhat fragile xfs/122 test on xfstests. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Carlos Maiolino Signed-off-by: Chandan Babu R commit c12c50393c1f6f7d7e45c7f55da9c013c0cc0522 Author: Christoph Hellwig Date: Mon Dec 4 21:07:18 2023 +0100 xfs: use static_assert to check struct sizes and offsets Use the compiler-provided static_assert built-in from C11 instead of the kernel-specific BUILD_BUG_ON_MSG for the structure size and offset checks in xfs_ondisk. This not only gives slightly nicer error messages in case things go south, but can also be trivially used as-is in userspace. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Reviewed-by: Carlos Maiolino Signed-off-by: Chandan Babu R commit fd45ddb9dd606b3eaddf26e13f64340636955986 Author: Zhang Tianci Date: Tue Dec 5 13:59:00 2023 +0800 xfs: extract xfs_da_buf_copy() helper function This patch does not modify logic. xfs_da_buf_copy() will copy one block from src xfs_buf to dst xfs_buf, and update the block metadata in dst directly. Signed-off-by: Zhang Tianci Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R commit 5759aa4f956034b289b0ae2c99daddfc775442e1 Author: Zhang Tianci Date: Tue Dec 5 13:58:59 2023 +0800 xfs: update dir3 leaf block metadata after swap xfs_da3_swap_lastblock() copy the last block content to the dead block, but do not update the metadata in it. We need update some metadata for some kinds of type block, such as dir3 leafn block records its blkno, we shall update it to the dead block blkno. Otherwise, before write the xfs_buf to disk, the verify_write() will fail in blk_hdr->blkno != xfs_buf->b_bn, then xfs will be shutdown. We will get this warning: XFS (dm-0): Metadata corruption detected at xfs_dir3_leaf_verify+0xa8/0xe0 [xfs], xfs_dir3_leafn block 0x178 XFS (dm-0): Unmount and run xfs_repair XFS (dm-0): First 128 bytes of corrupted metadata buffer: 00000000e80f1917: 00 80 00 0b 00 80 00 07 3d ff 00 00 00 00 00 00 ........=....... 000000009604c005: 00 00 00 00 00 00 01 a0 00 00 00 00 00 00 00 00 ................ 000000006b6fb2bf: e4 44 e3 97 b5 64 44 41 8b 84 60 0e 50 43 d9 bf .D...dDA..`.PC.. 00000000678978a2: 00 00 00 00 00 00 00 83 01 73 00 93 00 00 00 00 .........s...... 00000000b28b247c: 99 29 1d 38 00 00 00 00 99 29 1d 40 00 00 00 00 .).8.....).@.... 000000002b2a662c: 99 29 1d 48 00 00 00 00 99 49 11 00 00 00 00 00 .).H.....I...... 00000000ea2ffbb8: 99 49 11 08 00 00 45 25 99 49 11 10 00 00 48 fe .I....E%.I....H. 0000000069e86440: 99 49 11 18 00 00 4c 6b 99 49 11 20 00 00 4d 97 .I....Lk.I. ..M. XFS (dm-0): xfs_do_force_shutdown(0x8) called from line 1423 of file fs/xfs/xfs_buf.c. Return address = 00000000c0ff63c1 XFS (dm-0): Corruption of in-memory data detected. Shutting down filesystem XFS (dm-0): Please umount the filesystem and rectify the problem(s) >From the log above, we know xfs_buf->b_no is 0x178, but the block's hdr record its blkno is 0x1a0. Fixes: 24df33b45ecf ("xfs: add CRC checking to dir2 leaf blocks") Signed-off-by: Zhang Tianci Suggested-by: Dave Chinner Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit e6af9c98cbf0164a619d95572136bfb54d482dd6 Author: Jiachen Zhang Date: Tue Dec 5 13:58:58 2023 +0800 xfs: ensure logflagsp is initialized in xfs_bmap_del_extent_real In the case of returning -ENOSPC, ensure logflagsp is initialized by 0. Otherwise the caller __xfs_bunmapi will set uninitialized illegal tmp_logflags value into xfs log, which might cause unpredictable error in the log recovery procedure. Also, remove the flags variable and set the *logflagsp directly, so that the code should be more robust in the long run. Fixes: 1b24b633aafe ("xfs: move some more code into xfs_bmap_del_extent_real") Signed-off-by: Jiachen Zhang Reviewed-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 08e54ca42d6a0d88709a1be38eb95843142b5101 Author: Christoph Hellwig Date: Mon Dec 4 18:40:57 2023 +0100 xfs: clean up xfs_fsops.h Use struct types instead of typedefs so that the header can be included with pulling in the headers that define the typedefs, and remove the pointless externs. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 646ddf0c4df5181a7057ecccd29e535baaf034b2 Author: Christoph Hellwig Date: Mon Dec 4 18:40:56 2023 +0100 xfs: clean up the xfs_reserve_blocks interface xfs_reserve_blocks has a very odd interface that can only be explained by it directly deriving from the IRIX fcntl handler back in the day. Split reporting out the reserved blocks out of xfs_reserve_blocks into the only caller that cares. This means that the value reported from XFS_IOC_SET_RESBLKS isn't atomically sampled in the same critical section as when it was set anymore, but as the values could change right after setting them anyway that does not matter. It does provide atomic sampling of both values for XFS_IOC_GET_RESBLKS now, though. Also pass a normal scalar integer value for the requested value instead of the pointless pointer. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit c2c2620de7577db66a859b934715e98e4501e4f4 Author: Christoph Hellwig Date: Mon Dec 4 18:40:55 2023 +0100 xfs: clean up the XFS_IOC_FSCOUNTS handler Split XFS_IOC_FSCOUNTS out of the main xfs_file_ioctl function, and merge the xfs_fs_counts helper into the ioctl handler. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 64f08b152a3bc171f4651271bfe973ad3d085ab6 Author: Christoph Hellwig Date: Mon Dec 4 18:40:54 2023 +0100 xfs: clean up the XFS_IOC_{GS}ET_RESBLKS handler The XFS_IOC_GET_RESBLKS and XFS_IOC_SET_RESBLKS already share a fair amount of code, and will share even more soon. Move the logic for both of them out of the main xfs_file_ioctl function into a xfs_ioctl_getset_resblocks helper to share the code and prepare for additional changes. Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit 011f129fee4bd064a3db30ca1a0139548a619482 Author: Bagas Sanjaya Date: Wed Nov 29 19:39:47 2023 +0700 Documentation: xfs: consolidate XFS docs into its own subdirectory XFS docs are currently in upper-level Documentation/filesystems. Although these are currently 4 docs, they are already outstanding as a group and can be moved to its own subdirectory. Consolidate them into Documentation/filesystems/xfs/. Signed-off-by: Bagas Sanjaya Reviewed-by: Bill O'Donnell Reviewed-by: "Darrick J. Wong" Signed-off-by: Chandan Babu R commit fa422b353d212373fb2b2857a5ea5a6fa4876f9c Author: Shiyang Ruan Date: Mon Oct 23 15:20:46 2023 +0800 mm, pmem, xfs: Introduce MF_MEM_PRE_REMOVE for unbind Now, if we suddenly remove a PMEM device(by calling unbind) which contains FSDAX while programs are still accessing data in this device, e.g.: ``` $FSSTRESS_PROG -d $SCRATCH_MNT -n 99999 -p 4 & # $FSX_PROG -N 1000000 -o 8192 -l 500000 $SCRATCH_MNT/t001 & echo "pfn1.1" > /sys/bus/nd/drivers/nd_pmem/unbind ``` it could come into an unacceptable state: 1. device has gone but mount point still exists, and umount will fail with "target is busy" 2. programs will hang and cannot be killed 3. may crash with NULL pointer dereference To fix this, we introduce a MF_MEM_PRE_REMOVE flag to let it know that we are going to remove the whole device, and make sure all related processes could be notified so that they could end up gracefully. This patch is inspired by Dan's "mm, dax, pmem: Introduce dev_pagemap_failure()"[1]. With the help of dax_holder and ->notify_failure() mechanism, the pmem driver is able to ask filesystem on it to unmap all files in use, and notify processes who are using those files. Call trace: trigger unbind -> unbind_store() -> ... (skip) -> devres_release_all() -> kill_dax() -> dax_holder_notify_failure(dax_dev, 0, U64_MAX, MF_MEM_PRE_REMOVE) -> xfs_dax_notify_failure() `-> freeze_super() // freeze (kernel call) `-> do xfs rmap ` -> mf_dax_kill_procs() ` -> collect_procs_fsdax() // all associated processes ` -> unmap_and_kill() ` -> invalidate_inode_pages2_range() // drop file's cache `-> thaw_super() // thaw (both kernel & user call) Introduce MF_MEM_PRE_REMOVE to let filesystem know this is a remove event. Use the exclusive freeze/thaw[2] to lock the filesystem to prevent new dax mapping from being created. Do not shutdown filesystem directly if configuration is not supported, or if failure range includes metadata area. Make sure all files and processes(not only the current progress) are handled correctly. Also drop the cache of associated files before pmem is removed. [1]: https://lore.kernel.org/linux-mm/161604050314.1463742.14151665140035795571.stgit@dwillia2-desk3.amr.corp.intel.com/ [2]: https://lore.kernel.org/linux-xfs/169116275623.3187159.16862410128731457358.stg-ugh@frogsfrogsfrogs/ Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Reviewed-by: Dan Williams Signed-off-by: Chandan Babu R commit f556aa957df8cb3e98af0f54bf1fa65f59ae47a3 Author: Benjamin Tissoires Date: Wed Dec 6 11:46:06 2023 +0100 selftests/hid: fix ruff linter complains rename ambiguous variables l, r, and m, and ignore the return values of uhdev.get_evdev() and uhdev.get_slot() Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-15-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit ed5bc56cedca19ac429533aa527bce5287ab0a5a Author: Benjamin Tissoires Date: Wed Dec 6 11:46:05 2023 +0100 selftests/hid: fix mypy complains No code change, only typing information added/ignored Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-14-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit ab9b82909e9baa5b559d6457487525cfd4df2738 Author: Benjamin Tissoires Date: Wed Dec 6 11:46:04 2023 +0100 selftests/hid: tablets: be stricter for some transitions To accommodate for legacy devices, we rely on the last state of a transition to be valid: for example when we test PEN_IS_OUT_OF_RANGE to PEN_IS_IN_CONTACT, any "normal" device that reports an InRange bit would insert a PEN_IS_IN_RANGE state between the 2. This is of course valid, but this solution prevents to detect false releases emitted by some firmware: when pressing an "eraser mode" button, they might send an extra PEN_IS_OUT_OF_RANGE that we may want to filter. So define 2 sets of transitions: one that is the ideal behavior, and one that is OK, it won't break user space, but we have serious doubts if we are doing the right thing. And depending on the test, either ask only for valid transitions, or tolerate weird ones. Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-13-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit 76df1f72fb258cc7da6eff5dd8db95f4e2856517 Author: Benjamin Tissoires Date: Wed Dec 6 11:46:03 2023 +0100 selftests/hid: tablets: add a secondary barrel switch test Some tablets report 2 barrel switches. We better test those too. Use the same transistions description from the primary button tests. Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-12-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit 1f01537ef17efec97a8936c62e4ffa704cab7c06 Author: Benjamin Tissoires Date: Wed Dec 6 11:46:02 2023 +0100 selftests/hid: tablets: convert the primary button tests We get more descriptive in what we are doing, and also get more information of what is actually being tested. Instead of having a non exhaustive button changes that are semi-randomly done, we can describe all the states we want to test. Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-11-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit 74452d6329be73dd2f5562005e5eef2c7bda7c5b Author: Benjamin Tissoires Date: Wed Dec 6 11:46:01 2023 +0100 selftests/hid: tablets: add variants of states with buttons Turns out that there are transitions that are unlikely to happen: for example, having both the tip switch and a button being changed at the same time (in the same report) would require either a very talented and precise user or a very bad hardware with a very low sampling rate. So instead of manually building the button test by hand and forgetting about some cases, let's reuse the state machine and transitions we have. This patch only adds the states and the valid transitions. The actual tests will be replaced later. Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-10-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit 83912f83fabcb5086613e6382756750390ed48aa Author: Benjamin Tissoires Date: Wed Dec 6 11:46:00 2023 +0100 selftests/hid: tablets: define the elements of PenState This introduces a little bit more readability by not using the raw values but a dedicated Enum Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-9-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit e08e493ff9619daab9c11e61a80c604895a4d671 Author: Benjamin Tissoires Date: Wed Dec 6 11:45:59 2023 +0100 selftests/hid: tablets: set initial data for tilt/twist Avoids getting a null event when these usages are set Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-8-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit d8d7aa2266a7957e24cf05392b2b899be1031ed4 Author: Benjamin Tissoires Date: Wed Dec 6 11:45:58 2023 +0100 selftests/hid: tablets: do not set invert when the eraser is used Turns out that the chart from Microsoft is not exactly what I got here: when the rubber is used, and is touching the surface, invert can (should) be set to 0... [0] https://learn.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-pen-states Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-7-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit 881ccc36b42670ebbd5fb32a79b239ce1136e84d Author: Benjamin Tissoires Date: Wed Dec 6 11:45:57 2023 +0100 selftests/hid: tablets: move move_to function to PenDigitizer We can easily subclass PenDigitizer for introducing firmware bugs when subclassing Pen is harder. Move move_to from Pen to PenDigitizer so we get that ability Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-6-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit d52f52069fed639113b1014cde5eff8902d3064d Author: Benjamin Tissoires Date: Wed Dec 6 11:45:56 2023 +0100 selftests/hid: tablets: move the transitions to PenState Those transitions have nothing to do with `Pen`, so migrate them to `PenState`. The hidden agenda is to remove `Pen` and integrate it into `PenDigitizer` so that we can tweak the events in each state to emulate firmware bugs. Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-5-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit b5edacf79c8e1990200f9392e6354583298e8765 Author: Benjamin Tissoires Date: Wed Dec 6 11:45:55 2023 +0100 selftests/hid: tablets: remove unused class Looks like this is a leftover Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-4-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit 110292a77f7c8d11eaa472e65f6a2084b25be2db Author: Benjamin Tissoires Date: Wed Dec 6 11:45:54 2023 +0100 selftests/hid: base: allow for multiple skip_if_uhdev We can actually have multiple occurences of `skip_if_uhdev` if we follow the information from the pytest doc[0]. This is not immediately used, but can be if we need multiple conditions on a given test. [0] https://docs.pytest.org/en/latest/historical-notes.html#update-marker-code Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-3-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit 46bc0277c2507338d98e166826afec330962309e Author: Benjamin Tissoires Date: Wed Dec 6 11:45:53 2023 +0100 selftests/hid: vmtest.sh: allow finer control on the build steps vmtest.sh works great for a one shot test, but not so much for CI where I want to build (with different configs) the bzImage in a separate job than the one I am running it. Add a "build_only" option to specify whether we need to boot the currently built kernel in the vm. Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-2-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit 887f8094b3352127d1bc68f768774e97acf4e7fa Author: Benjamin Tissoires Date: Wed Dec 6 11:45:52 2023 +0100 selftests/hid: vmtest.sh: update vm2c and container boot2container is now on an official project, so let's use that. The container image is now the same I use for the CI, so let's keep to it. Reviewed-by: Peter Hutterer Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-1-c0350c2f5986@kernel.org Signed-off-by: Benjamin Tissoires commit 49391d1349da4cd752437a8aab77d3304be75d9b Merge: dec0224bae8b9 3f3cec031099c Author: Chandan Babu R Date: Thu Dec 7 14:18:33 2023 +0530 Merge tag 'repair-auto-reap-space-reservations-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeA xfs: reserve disk space for online repairs Online repair fixes metadata structures by writing a new copy out to disk and atomically committing the new structure into the filesystem. For this to work, we need to reserve all the space we're going to need ahead of time so that the atomic commit transaction is as small as possible. We also require the reserved space to be freed if the system goes down, or if we decide not to commit the repair, or if we reserve too much space. To keep the atomic commit transaction as small as possible, we would like to allocate some space and simultaneously schedule automatic reaping of the reserved space, even on log recovery. EFIs are the mechanism to get us there, but we need to use them in a novel manner. Once we allocate the space, we want to hold on to the EFI (relogging as necessary) until we can commit or cancel the repair. EFIs for written committed blocks need to go away, but unwritten or uncommitted blocks can be freed like normal. Earlier versions of this patchset directly manipulated the log items, but Dave thought that to be a layering violation. For v27, I've modified the defer ops handling code to be capable of pausing a deferred work item. Log intent items are created as they always have been, but paused items are pushed onto a side list when finishing deferred work items, and pushed back onto the transaction after that. Log intent done item are not created for paused work. The second part adds a "stale" flag to the EFI so that the repair reservation code can dispose of an EFI the normal way, but without the space actually being freed. This has been lightly tested with fstests. Enjoy! Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'repair-auto-reap-space-reservations-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: force small EFIs for reaping btree extents xfs: log EFIs for all btree blocks being used to stage a btree xfs: implement block reservation accounting for btrees we're staging xfs: remove unused fields from struct xbtree_ifakeroot xfs: automatic freeing of freshly allocated unwritten space xfs: remove __xfs_free_extent_later xfs: allow pausing of pending deferred work items xfs: don't append work items to logged xfs_defer_pending objects commit dec0224bae8b9285749ac450dcb538a6f1d97838 Merge: 9f334526ee0a3 3f113c2739b1b Author: Chandan Babu R Date: Thu Dec 7 14:15:26 2023 +0530 Merge tag 'scrub-livelock-prevention-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeA xfs: prevent livelocks in xchk_iget Prevent scrub from live locking in xchk_iget if there's a cycle in the inobt by allocating an empty transaction. This has been lightly tested with fstests. Enjoy! Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R Signed-off-by: Chandan Babu R * tag 'scrub-livelock-prevention-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: make xchk_iget safer in the presence of corrupt inode btrees commit 9f334526ee0a3e43328663306315929ebff5390e Merge: 47c460efc4675 9c07bca793b4f Author: Chandan Babu R Date: Thu Dec 7 14:10:55 2023 +0530 Merge tag 'defer-elide-create-done-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeA xfs: elide defer work ->create_done if no intent Christoph pointed out that the defer ops machinery doesn't need to call ->create_done if the deferred work item didn't generate a log intent item in the first place. Let's clean that up and save an indirect call in the non-logged xattr update call path. This has been lightly tested with fstests. Enjoy! Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'defer-elide-create-done-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: elide ->create_done calls for unlogged deferred work xfs: document what LARP means commit c598dc3bc41ed079408633d7d66eefa440e15a12 Author: Bartosz Golaszewski Date: Tue Dec 5 16:54:30 2023 +0100 gpio: sim: fix the email address in MODULE_AUTHOR() Fix unterminated angle brackets in the email address in MODULE_AUTHOR(). Signed-off-by: Bartosz Golaszewski commit 47c460efc4675433c523e61a58ffb41d1af946df Merge: 34d3866668193 e14293803f4e8 Author: Chandan Babu R Date: Thu Dec 7 14:03:11 2023 +0530 Merge tag 'fix-rtmount-overflows-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeA xfs: fix realtime geometry integer overflows While reading through the realtime geometry support code in xfsprogs, I noticed a discrepancy between the sb_rextslog computation used when writing out the superblock during mkfs and the validation code used in xfs_repair. This discrepancy would lead to system failure for a runt rt volume having more than 1 rt block but zero rt extents in length. Most people aren't going to configure a 1M extent size for their 360k rt floppy disk volume, but I did! In the process of studying that code, it occurred to me that there is a second bug in the computation -- the use of highbit32 for a 64-bit value means that the upper 32 bits are not considered in the search for a high bit. This causes the creation of a realtime summary file that is the wrong length. If rextents is a multiple of U32_MAX then this will appear to work fine because highbit32 returns -1 for an input of 0; but for all other cases the rt summary is undersized, leading to failures. Fix the first problem by standardizing the computation with a helper in libxfs; and the second problem by correcting the computation. This will cause any existing rt volumes larger than 2^32 blocks to fail validation but they probably were already crashing anyway. This has been lightly tested with fstests. Enjoy! Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'fix-rtmount-overflows-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: don't allow overly small or large realtime volumes xfs: fix 32-bit truncation in xfs_compute_rextslog xfs: make rextslog computation consistent with mkfs commit 1ccffc2f760a960372093106558411e644b89c57 Author: Pierre-Louis Bossart Date: Mon Dec 4 15:27:10 2023 -0600 ASoC: SOF: Intel: pci-mtl: add HDA_ARL PCI support Add yet another PCI ID - the hardware shares the same descriptors as MTL but we use a dedicated firmware binary file to allow for different signature keys. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Acked-by: Mark Brown Link: https://lore.kernel.org/r/20231204212710.185976-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit a00be6dc9bb80796244196033aa5eb258b6af47a Author: Pierre-Louis Bossart Date: Mon Dec 4 15:27:09 2023 -0600 ASoC: SOF: Intel: pci-mtl: fix ARL-S definitions The initial copy/paste from MTL was incorrect, the hardware is different and requires different descriptors along with a dedicated firmware binary. Fixes: 3851831f529e ("ASoC: SOF: Intel: pci-mtl: use ARL specific firmware definitions") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Acked-by: Mark Brown Link: https://lore.kernel.org/r/20231204212710.185976-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 7a9d6bbe8a663c817080be55d9fecf19a4a8fd8f Author: Pierre-Louis Bossart Date: Mon Dec 4 15:27:08 2023 -0600 ALSA: hda: intel-dspcfg: add filters for ARL-S and ARL Same usual filters, SOF is required for DMIC and/or SoundWire support. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Acked-by: Mark Brown Link: https://lore.kernel.org/r/20231204212710.185976-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit a31014ebad617868c246d3985ff80d891f03711e Author: Pierre-Louis Bossart Date: Mon Dec 4 15:27:07 2023 -0600 ALSA: hda: Intel: add HDA_ARL PCI ID support Yet another PCI ID. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Acked-by: Mark Brown Link: https://lore.kernel.org/r/20231204212710.185976-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 5ec42bf04d72fd6d0a6855810cc779e0ee31dfd7 Author: Pierre-Louis Bossart Date: Mon Dec 4 15:27:06 2023 -0600 PCI: add INTEL_HDA_ARL to pci_ids.h The PCI ID insertion follows the increasing order in the table, but this hardware follows MTL (MeteorLake). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Péter Ujfalusi Reviewed-by: Kai Vehmanen Acked-by: Mark Brown Link: https://lore.kernel.org/r/20231204212710.185976-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 34d3866668193b58c0442c0582a53fd118983c74 Merge: 6b4ffe97e9139 a49c708f9a445 Author: Chandan Babu R Date: Thu Dec 7 13:58:08 2023 +0530 Merge tag 'reconstruct-defer-cleanups-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeA xfs: continue removing defer item boilerplate Now that we've restructured log intent item recovery to reconstruct the incore deferred work state, apply further cleanups to that code to remove boilerplate that is duplicated across all the _item.c files. Having done that, collapse a bunch of trivial helpers to reduce the overall call chain. That enables us to refactor the relog code so that the ->relog_item implementations only have to know how to format the implementation-specific data encoded in an intent item and don't themselves have to handle the log item juggling. This has been lightly tested with fstests. Enjoy! Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'reconstruct-defer-cleanups-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: move ->iop_relog to struct xfs_defer_op_type xfs: collapse the ->create_done functions xfs: hoist xfs_trans_add_item calls to defer ops functions xfs: clean out XFS_LI_DIRTY setting boilerplate from ->iop_relog xfs: use xfs_defer_create_done for the relogging operation xfs: hoist ->create_intent boilerplate to its callsite xfs: collapse the ->finish_item helpers xfs: hoist intent done flag setting to ->finish_item callsite xfs: don't set XFS_TRANS_HAS_INTENT_DONE when there's no ATTRD log item commit 6c826061c5ee42fe547d1ac4792b30125fa8cb13 Author: Randy Dunlap Date: Tue Dec 5 19:05:23 2023 -0800 gpio: max730x: don't use kernel-doc marker for regular comment Use a common C comment (/*) instead of kernel-doc notation to prevent warnings from scripts/kernel-doc. gpio-max730x.c:3: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst gpio-max730x.c:3: warning: missing initial short description on line: * Copyright (C) 2006 Juergen Beisert, Pengutronix Signed-off-by: Randy Dunlap Signed-off-by: Bartosz Golaszewski commit 6b4ffe97e9139be74eb0e35bc689cdeec7a50142 Merge: 33cc938e65a98 db7ccc0bac2ad Author: Chandan Babu R Date: Thu Dec 7 13:50:54 2023 +0530 Merge tag 'reconstruct-defer-work-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.8-mergeA xfs: log intent item recovery should reconstruct defer work state Long Li reported a KASAN report from a UAF when intent recovery fails: ================================================================== BUG: KASAN: slab-use-after-free in xfs_cui_release+0xb7/0xc0 Read of size 4 at addr ffff888012575e60 by task kworker/u8:3/103 CPU: 3 PID: 103 Comm: kworker/u8:3 Not tainted 6.4.0-rc7-next-20230619-00003-g94543a53f9a4-dirty #166 Workqueue: xfs-cil/sda xlog_cil_push_work Call Trace: dump_stack_lvl+0x50/0x70 print_report+0xc2/0x600 kasan_report+0xb6/0xe0 xfs_cui_release+0xb7/0xc0 xfs_cud_item_release+0x3c/0x90 xfs_trans_committed_bulk+0x2d5/0x7f0 xlog_cil_committed+0xaba/0xf20 xlog_cil_push_work+0x1a60/0x2360 process_one_work+0x78e/0x1140 worker_thread+0x58b/0xf60 kthread+0x2cd/0x3c0 ret_from_fork+0x1f/0x30 Allocated by task 531: kasan_save_stack+0x22/0x40 kasan_set_track+0x25/0x30 __kasan_slab_alloc+0x55/0x60 kmem_cache_alloc+0x195/0x5f0 xfs_cui_init+0x198/0x1d0 xlog_recover_cui_commit_pass2+0x133/0x5f0 xlog_recover_items_pass2+0x107/0x230 xlog_recover_commit_trans+0x3e7/0x9c0 xlog_recovery_process_trans+0x140/0x1d0 xlog_recover_process_ophdr+0x1a0/0x3d0 xlog_recover_process_data+0x108/0x2d0 xlog_recover_process+0x1f6/0x280 xlog_do_recovery_pass+0x609/0xdb0 xlog_do_log_recovery+0x84/0xe0 xlog_do_recover+0x7d/0x470 xlog_recover+0x25f/0x490 xfs_log_mount+0x2dd/0x6f0 xfs_mountfs+0x11ce/0x1e70 xfs_fs_fill_super+0x10ec/0x1b20 get_tree_bdev+0x3c8/0x730 vfs_get_tree+0x89/0x2c0 path_mount+0xecf/0x1800 do_mount+0xf3/0x110 __x64_sys_mount+0x154/0x1f0 do_syscall_64+0x39/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 531: kasan_save_stack+0x22/0x40 kasan_set_track+0x25/0x30 kasan_save_free_info+0x2b/0x40 __kasan_slab_free+0x114/0x1b0 kmem_cache_free+0xf8/0x510 xfs_cui_item_free+0x95/0xb0 xfs_cui_release+0x86/0xc0 xlog_recover_cancel_intents.isra.0+0xf8/0x210 xlog_recover_finish+0x7e7/0x980 xfs_log_mount_finish+0x2bb/0x4a0 xfs_mountfs+0x14bf/0x1e70 xfs_fs_fill_super+0x10ec/0x1b20 get_tree_bdev+0x3c8/0x730 vfs_get_tree+0x89/0x2c0 path_mount+0xecf/0x1800 do_mount+0xf3/0x110 __x64_sys_mount+0x154/0x1f0 do_syscall_64+0x39/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff888012575dc8 which belongs to the cache xfs_cui_item of size 432 The buggy address is located 152 bytes inside of freed 432-byte region [ffff888012575dc8, ffff888012575f78) The buggy address belongs to the physical page: page:ffffea0000495d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888012576208 pfn:0x12574 head:ffffea0000495d00 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x1fffff80010200(slab|head|node=0|zone=1|lastcpupid=0x1fffff) page_type: 0xffffffff() raw: 001fffff80010200 ffff888012092f40 ffff888014570150 ffff888014570150 raw: ffff888012576208 00000000001e0010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888012575d00: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ffff888012575d80: fc fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb >ffff888012575e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888012575e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888012575f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc ================================================================== "If process intents fails, intent items left in AIL will be delete from AIL and freed in error handling, even intent items that have been recovered and created done items. After this, uaf will be triggered when done item committed, because at this point the released intent item will be accessed. xlog_recover_finish xlog_cil_push_work ---------------------------- --------------------------- xlog_recover_process_intents xfs_cui_item_recover//cui_refcount == 1 xfs_trans_get_cud xfs_trans_commit xfs_cui_item_recover xlog_recover_cancel_intents xfs_cui_release //cui_refcount == 0 xfs_cui_item_free //free cui xlog_force_shutdown //shutdown <...> xlog_cil_committed xfs_cud_item_release xfs_cui_release // UAF "Intent log items are created with a reference count of 2, one for the creator, and one for the intent done object. Log recovery explicitly drops the creator reference after it is inserted into the AIL, but it then processes the log item as if it also owns the intent-done reference. "The code in ->iop_recovery should assume that it passes the reference to the done intent, we can remove the intent item from the AIL after creating the done-intent, but if that code fails before creating the done-intent then it needs to release the intent reference by log recovery itself. "That way when we go to cancel the intent, the only intents we find in the AIL are the ones we know have not been processed yet and hence we can safely drop both the creator and the intent done reference from xlog_recover_cancel_intents(). "Hence if we remove the intent from the list of intents that need to be recovered after we have done the initial recovery, we acheive two things: "1. the tail of the log can be moved forward with the commit of the done intent or new intent to continue the operation, and "2. We avoid the problem of trying to determine how many reference counts we need to drop from intent recovery cancelling because we never come across intents we've actually attempted recovery on." Restated: The cause of the UAF is that xlog_recover_cancel_intents thinks that it owns the refcount on any intent item in the AIL, and that it's always safe to release these intent items. This is not true after the recovery function creates an log intent done item and points it at the log intent item because releasing the done item always releases the intent item. The runtime defer ops code avoids all this by tracking both the log intent and the intent done items, and releasing only the intent done item if both have been created. Long Li proposed fixing this by adding state flags, but I have a more comprehensive fix. First, observe that the latter half of the intent _recover functions are nearly open-coded versions of the corresponding _finish_one function that uses an onstack deferred work item to single-step through the item. Second, notice that the recover function is not an exact match because of the odd behavior that unfinished recovered work items are relogged with separate log intent items instead of a single new log intent item, which is what the defer ops machinery does. Dave and I have long suspected that recovery should be reconstructing the defer work state from what's in the recovered intent item. Now we finally have an excuse to refactor the code to do that. This series starts by fixing a resource leak in LARP recovery. We fix the bug that Long Li reported by switching the intent recovery code to construct chains of xfs_defer_pending objects and then using the defer pending objects to track the intent/done item ownership. Finally, we clean up the code to reconstruct the exact incore state, which means we can remove all the opencoded _recover code, which makes maintaining log items much easier. v2: minor changes per review comments v3: pick up more rvb tags, fix build errors This has been lightly tested with fstests. Enjoy! Signed-off-by: Darrick J. Wong Signed-off-by: Chandan Babu R * tag 'reconstruct-defer-work-6.8_2023-12-06' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux: xfs: move ->iop_recover to xfs_defer_op_type xfs: use xfs_defer_finish_one to finish recovered work items xfs: dump the recovered xattri log item if corruption happens xfs: recreate work items when recovering intent items xfs: transfer recovered intent item ownership in ->iop_recover xfs: pass the xfs_defer_pending object to iop_recover xfs: use xfs_defer_pending objects to recover intent items xfs: don't leak recovered attri intent items commit db71a7f5cbb8d41beed8352b2313f9079371cd98 Author: Michael Tretter Date: Fri Oct 13 13:00:34 2023 +0200 media: rockchip: rga: add NV12M support Add support for the multi-planar variants of NV12. The RGA is now able to exchange DMABUFs with other devices that only support multi-planar NV12, for example the Hantro JPEG encoder. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit a61ff67ffb9d6e6506bd563fa078d98bc8033a9e Author: Michael Tretter Date: Fri Oct 13 13:00:33 2023 +0200 media: rockchip: rga: rework buffer handling for multi-planar formats Multi-planar formats may have multiple planes that must be handled and correctly mapped into a continuous buffer for the RGA by using the DMA descriptors. The plane offsets in the continuous mapping may now start at page boundaries and the previous calculation based on the frame sizes is only valid for planar buffers in a single memory. Therefore, the offsets must be detected and set while creating the mapping. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 0148bcd77d0a2a381818d4d1a8f445217fdbcae8 Author: Michael Tretter Date: Fri Oct 13 13:00:32 2023 +0200 media: rockchip: rga: switch to multi-planar API Switch to the multi-planar API, which allows to handle buffers with separate planes. The RGA driver doesn't expose multi-planar formats, yet. The existing contiguous planar formats can be used with the multi-planar API as well, but the multi-planar API is required for multi-planar formats. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 2addee7aeff25260f35e688f7ced057b8651c1c5 Author: Michael Tretter Date: Fri Oct 13 13:00:31 2023 +0200 media: rockchip: rga: use macros for testing buffer type Use the provided V4L2_TYPE_IS_{OUTPUT,CAPTURE} macros to check if the buffer or queue is OUTPUT or CAPTURE. The macros work also work for the _MPLANE buffer and queue types and make it easier to switch to the multi-planar API. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 4e4dd24e309dbd9a3cac7a228b62991a8dfe8390 Author: Michael Tretter Date: Fri Oct 13 13:00:30 2023 +0200 media: rockchip: rga: add local variable for pix_format The local variable allows to simplify the accessed to the format and makes it easier to change the type of the format. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 012602c560b43a6de4c82a463bb4f282d50c38b4 Author: Michael Tretter Date: Fri Oct 13 13:00:29 2023 +0200 media: rockchip: rga: use pixelformat to find format Use the pixelformat instead of the v4l2_format to find the rga_fmt. This avoids knowing the structure and type of v4l2_format in rga_fmt_find and simplifies the function. Also cleanup the users of the function. In try_fmt always return the found pixel format to make sure that the pixel format is always set. Thus, we can be sure that we will find the rga_fmt in s_fmt and can drop the check if a given format has been found. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 60faf2b82b52ffc3f75ad7ddc28691ce3c367d82 Author: Michael Tretter Date: Fri Oct 13 13:00:28 2023 +0200 media: rockchip: rga: use clamp() to clamp size to limits The try_fmt should limit the width and height to the know limits of the RGA. Use the clamp() helper instead of open coding the clamping. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit ec9ef8dda2a24ce1c13904f0d46867c0aa6b4ee7 Author: Michael Tretter Date: Fri Oct 13 13:00:27 2023 +0200 media: rockchip: rga: set dma mask to 32 bits The RGA DMA descriptor list contains only 32-bit addresses. Set the dma_mask to only allocate memory that is addressable by the descriptors. This prevents errors when preparing vb2 buffers that were allocated by the RGA. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 25783e2a984eadd7718f4fcdf1d82ee7e088d52d Author: Michael Tretter Date: Fri Oct 13 13:00:26 2023 +0200 media: rockchip: rga: pre-calculate plane offsets Calculate the plane offsets and store them with the video buffer while creating the buffer mapping. This allows the driver to more freely handle the memory of the DMA mapping as the offsets and the mapping can be kept in sync. The driver still has to update the offsets to respect the configured cropping and rotation, but this calculation is now separated from the calculation of the plane offsets. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 558c248f930e6829bd7af160d4a9451a15dbee41 Author: Michael Tretter Date: Fri Oct 13 13:00:25 2023 +0200 media: rockchip: rga: split src and dst buffer setup Split the register setup for the source and destination video buffers into separate functions. This is a cleanup to make the code more readable by separating the offset calculation for the different buffers and prepares the driver for using pre-calculated offsets of planes. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 6040702ade234c8212dcfdef85e2f5549aa2f0f5 Author: Michael Tretter Date: Fri Oct 13 13:00:24 2023 +0200 media: rockchip: rga: allocate DMA descriptors per buffer The RGA driver allocates two buffers for the DMA descriptors of the input and output buffers. Whenever a new job is processed, the descriptor list is updated for the current buffers. By updating the descriptor list during buf_prepare, it is possible to correctly fail DMABUF imports if the buffers that shall be imported are not within the 32 bit address range that can be addressed by the RGA. Managing the DMA descriptor list with the buffer also makes it easier to track the buffer mapping and the plane offsets into this mapping. The cost is that the driver now requires DMA coherent memory per buffer for the descriptor list. However, the size scales with the size of the video buffers and is not allocated if the RGA is not used. While at it, use dma_alloc_coherent to allocate the descriptors and get rid of the virt_to_phys calls to get the physical addresses. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 77f2e2b255ce05b9d63566e5290ac66c49913abd Author: Michael Tretter Date: Fri Oct 13 13:00:23 2023 +0200 media: rockchip: rga: extract helper to fill descriptors The IOMMU of the RGA is programmed with a list of DMA descriptors that contain an 32 bit address per 4k page in the video buffers. The address in the descriptor points to the start address of the page. Introduce 'struct rga_dma_desc' to make the handling of the DMA descriptors explicit instead of hiding them behind standard types. While at it, use provided helpers for iterating the sg_table instead of manually calculating the DMA addresses. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 9e7dc39260edac180c206bb6149595a40eabae3e Author: Michael Tretter Date: Fri Oct 13 13:00:22 2023 +0200 media: rockchip: rga: fix swizzling for RGB formats When using 32 bit RGB formats, the RGA on the rk3568 produces wrong colors as the wrong color channels are read or written. The reason is that the format description for the channel swizzeling is wrong and the wrong bits are configured. For example, when converting ARGB32 to NV12, the alpha channel is used as blue channel.. This doesn't happen if the color format is the same on both sides. Fix the color_swap settings of the formats to correctly handle 32 bit RGB formats. For RGA_COLOR_FMT_XBGR8888, the RGA_COLOR_ALPHA_SWAP bit doesn't have an effect. Thus, it isn't possible to handle the V4L2_PIX_FMT_XRGB32. Thus, it is removed from the list of supported formats. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil commit 8016943b5947cd485078e23899945c51e818aa63 Author: Bryan O'Donoghue Date: Thu Nov 23 17:03:07 2023 +0000 media: qcom: camss: Add sm8250 named power-domain support Declare power-domain names "top", "ife0" and "ife1" eponymously for the power-domains TITAN_TOP_GDSC, IFE_0_GDSC and IFE_1_GDSC respectively. Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Hans Verkuil commit 801ca0e7f9be141ae8a7b17e47d6af588768ae49 Author: Matti Lehtimäki Date: Thu Nov 23 17:03:06 2023 +0000 media: qcom: camss: Flag CSID-lites to support more CSIDs Some platforms such as SC7280 have 3 CSIDs and 2 CSID-lites but current code has hardcoded 2 as the maximum number of CSIDs. Remove the hardcoded maximum number of VFEs to handle all possible combinations of CSIDs and CSID-lites. Signed-off-by: Matti Lehtimäki Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Hans Verkuil commit 6997278ae5f0ad09400750977ddc08aa5543ff86 Author: Matti Lehtimäki Date: Thu Nov 23 17:03:05 2023 +0000 media: qcom: camss: Flag VFE-lites to support more VFEs Some platforms such as SC7280 have three VFEs and two VFE-lites. Current code has hard-coded two as the maximum number of VFEs. Remove the hard-coded maximum number of VFEs to handle all possible combinations of VFEs and VFE-lites. Signed-off-by: Matti Lehtimäki Reviewed-by: Konrad Dybcio Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311200405.h6G4L9oe-lkp@intel.com Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit d89751c61279f692684fe82a416dffef7f243cbe Author: Bryan O'Donoghue Date: Wed Dec 6 13:25:00 2023 +0100 media: qcom: camss: Add support for named power-domains Right now we use fixed indexes to assign power-domains, with a requirement for the TOP GDSC to come last in the list. Adding support for named power-domains means the declaration in the dtsi can come in any order. After this change we continue to support the old indexing - if a SoC resource declaration or the in-use dtb doesn't declare power-domain names we fall back to the default legacy indexing. From this point on though new SoC additions should contain named power-domains, eventually we will drop support for legacy indexing. Tested-by: Matti Lehtimäki Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit 23aa4f0cd3273b269560a9236c48b43a3982ac13 Author: Bryan O'Donoghue Date: Thu Nov 23 17:03:03 2023 +0000 media: qcom: camss: Move VFE power-domain specifics into vfe.c Moving the location of the hooks to VFE power domains has several advantages. 1. Separation of concerns and functional decomposition. vfe.c should be responsible for and know best how manage power-domains for a VFE, excising from camss.c follows this principle. 2. Embedding a pointer to genpd in struct camss_vfe{} meas that we can dispense with a bunch of kmalloc array inside of camss.c. 3. Splitting up titan top gdsc from vfe/ife gdsc provides a base for breaking up magic indexes in dtsi. Suggested-by: Matti Lehtimäki Tested-by: Matti Lehtimäki Signed-off-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Hans Verkuil commit eb73facec2c261c92ad271e87ee37894e0bef9a8 Author: Bryan O'Donoghue Date: Thu Nov 23 17:03:02 2023 +0000 media: qcom: camss: Use common VFE pm_domain_on/pm_domain_off where applicable For the various versions of VFE we have a boiler-plate pm_domain_on/pm_domain_off callback pair of the general form. - Error check. Not always done but applicable to all. - device_link_add (DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE); - Error check returning -EINVAL on error. - Return 0 Reduce the pattern down to a common callback. VFE 4.1 is a special case which to me also indicates that it is worthwhile maintaining an indirection for the vfe_pm_domain_{on|off} for now. Otherwise lets chuck out a bunch of needlessly replicated code. Reviewed-by: Konrad Dybcio Suggested-by: Matti Lehtimäki Tested-by: Matti Lehtimäki Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit a409b3f08dbed4b866cffeee48cce703290c300b Author: Bryan O'Donoghue Date: Thu Nov 23 17:03:01 2023 +0000 media: qcom: camss: Convert to per-VFE pointer for power-domain linkages Right now we use the top-level camss structure to provide pointers via VFE id index back to genpd linkages. In effect this hard-codes VFE indexes to power-domain indexes in the dtsi and mandates a very particular ordering of power domains in the dtsi, which bears no relationship to a real hardware dependency. As a first step to rationalising the VFE power-domain code and breaking the magic indexing in dtsi use per-VFE pointers to genpd linkages. The top-level index in msm_vfe_subdev_init is still used to attain the initial so no functional or logical change arises from this change. Reviewed-by: Konrad Dybcio Tested-by: Matti Lehtimäki Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit ac6494e0ca444d82ff9dc0df87fcfca1d91c5cd2 Author: Bryan O'Donoghue Date: Thu Nov 23 17:03:00 2023 +0000 media: qcom: camss: Flag which VFEs require a power-domain At the moment we have some complex code for determining if a VFE requires a power-domain attachment. Particularly discordant in this scheme is the subtle reliance on VFE and VFE Lite declaration ordering in our resources. VFE id is used to determine if a VFE is lite or not and consequently if a VFE requires power-domain attachment. VFE Lite though is not a correct delineation between power-domain and non power-domain state since early SoCs have neither VFE Lite nor power-domains attached to VFEs. Introduce has_pd to the VFE resource structure to allow the CAMSS code to understand if it needs to try to attach a power-domain for a given VFE. As a side-effect from this we no longer need to care about VFE Lite or non-Lite or the id number associated with either and which order the VFE/VFE Lite was declared in. Reviewed-by: Konrad Dybcio Tested-by: Matti Lehtimäki Signed-off-by: Bryan O'Donoghue Signed-off-by: Hans Verkuil commit b3695e86d25aafbe175dd51f6aaf6f68d341d590 Author: Ghanshyam Agrawal Date: Sat Nov 25 14:32:36 2023 +0530 media: stk1160: Fixed high volume of stk1160_dbg messages The function stk1160_dbg gets called too many times, which causes the output to get flooded with messages. Since stk1160_dbg uses printk, it is now replaced with printk_ratelimited. Suggested-by: Phillip Potter Signed-off-by: Ghanshyam Agrawal Signed-off-by: Hans Verkuil commit 5d3c8990e2bbf929cb211563dadd70708f42e4e6 Author: Zhipeng Lu Date: Fri Dec 1 21:22:55 2023 +0800 media: cx231xx: fix a memleak in cx231xx_init_isoc The dma_q->p_left_data alloced by kzalloc should be freed in all the following error handling paths. However, it hasn't been freed in the allocation error paths of dev->video_mode.isoc_ctl.urb and dev->video_mode.isoc_ctl.transfer_buffer. On the other hand, the dma_q->p_left_data did be freed in the error-handling paths after that of dev->video_mode.isoc_ctl.urb and dev->video_mode.isoc_ctl.transfer_buffer, by calling cx231xx_uninit_isoc(dev). So the same free operation should be done in error-handling paths of those two allocation. Fixes: 64fbf4445526 ("[media] cx231xx: Added support for Carraera, Shelby, RDx_253S and VIDEO_GRABBER") Signed-off-by: Zhipeng Lu Signed-off-by: Hans Verkuil commit b58253793f4fe7495af3157d7f29cf0919183009 Author: Geert Uytterhoeven Date: Tue Nov 28 19:31:53 2023 +0100 staging: media: VIDEO_STARFIVE_CAMSS should depend on ARCH_STARFIVE The StarFive Camera Subsystem is only present on the StarFive JH7110 SoC. Hence add a dependency on ARCH_STARFIVE, to prevent asking the user about this driver when configuring a kernel without StarFive SoC support. Fixes: bba185d141b1 ("media: staging: media: starfive: camss: Add core driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Changhuang Liang Signed-off-by: Hans Verkuil commit 15dfed5b4933564470d608705c1630b6ad822160 Author: Geert Uytterhoeven Date: Tue Nov 28 19:26:36 2023 +0100 media: chips-media: wave5: VIDEO_WAVE_VPU should depend on ARCH_K3 The Chips&Media Wave 5 Series multi-standard codec IP is currently only supported on Texas Instruments K3 architecture. Hence add a dependency on ARCH_K3, to prevent asking the user about this driver when configuring a kernel without Texas Instruments K3 Multicore SoC support. Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer") Signed-off-by: Geert Uytterhoeven Reviewed-by: Nishanth Menon Signed-off-by: Hans Verkuil [hverkuil: small update in commit log, and reformatted the Fixes tag] commit fca4797af415bd346c4b2737eee7bbbc4bf1866c Author: Dan Carpenter Date: Tue Nov 28 17:40:14 2023 +0300 media: staging: starfive: camss: fix off by one in isp_enum_mbus_code() These > comparisons should be >=. The formats->fmts[] array is either a pointer to isp_formats_sink[] or isp_formats_source[] respectively. Fixes: e57854628f58 ("media: staging: media: starfive: camss: Add ISP driver") Signed-off-by: Dan Carpenter Reviewed-by: Changhuang Liang Signed-off-by: Hans Verkuil commit 608ca5a60ee47b48fec210aeb7a795a64eb5dcee Author: Michael Grzeschik Date: Thu Nov 23 23:32:05 2023 +0100 media: videobuf2-dma-sg: fix vmap callback For dmabuf import users to be able to use the vaddr from another videobuf2-dma-sg source, the exporter needs to set a proper vaddr on vb2_dma_sg_dmabuf_ops_vmap callback. This patch adds vmap on map if buf->vaddr was not set. Cc: stable@kernel.org Fixes: 7938f4218168 ("dma-buf-map: Rename to iosys-map") Signed-off-by: Michael Grzeschik Acked-by: Tomasz Figa Signed-off-by: Hans Verkuil commit 357547b87673ca88455c40aafffeea161207a52a Author: Detlev Casanova Date: Thu Nov 23 10:52:26 2023 -0500 doc: media: visl: Add AV1 support Add AV1 information in visl documentation. Reviewed-by: Daniel Almeida Signed-off-by: Detlev Casanova Signed-off-by: Hans Verkuil commit 98b3cd0bfc5c07809166421e8b8f82bf74ee8970 Author: Detlev Casanova Date: Thu Nov 23 10:52:25 2023 -0500 media: visl: Add AV1 support Let the visl test driver accept the AV1 pixel format. Reviewed-by: Daniel Almeida Tested-by: Daniel Almeida Signed-off-by: Detlev Casanova Signed-off-by: Hans Verkuil commit 9f0f0013d3d9395d535d91c623ecb0e82ce4c020 Author: Lukas Bulwahn Date: Thu Nov 23 11:38:08 2023 +0100 media: exynos-gsc: remove unused improper CONFIG definition Defines prefixed with "CONFIG" should be limited to proper Kconfig options, that are introduced in a Kconfig file. In the driver code, there is a define for CONFIG_VB2_GSC_DMA_CONTIG, but this is not used anywhere in the code. Just remove this unused definition. No functional change. Signed-off-by: Lukas Bulwahn Reviewed-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil commit 52e1fc9aa8282d783f6cfedd79b79db98259900c Author: AngeloGioacchino Del Regno Date: Thu Oct 5 12:49:05 2023 +0200 media: platform: mtk-mdp3: Use devicetree phandle to retrieve SCP Instead of walking the entire parent node for something that has the right compatible, use the scp_get() function provided by the MediaTek SCP remoteproc driver to retrieve a handle to mtk_scp through the devicetree "mediatek,scp" (phandle) property. In case of multi-core SCP, this also allows to select a specific core. Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat Signed-off-by: Hans Verkuil commit a60577cef7de982166baa132a8423f413b617b63 Author: AngeloGioacchino Del Regno Date: Thu Oct 5 12:49:04 2023 +0200 media: dt-bindings: mediatek: Add phandle to mediatek,scp on MDP3 RDMA The MDP3 RDMA needs to communicate with the SCP remote processor: allow specifying a phandle to a SCP core. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Conor Dooley Reviewed-by: Alexandre Mergnat Signed-off-by: Hans Verkuil commit 90d50b8d85834e73536fdccd5aa913b30494fef0 Author: Tomi Valkeinen Date: Thu Sep 21 13:50:32 2023 +0300 drm/mipi-dsi: Fix detach call without attach It's been reported that DSI host driver's detach can be called without the attach ever happening: https://lore.kernel.org/all/20230412073954.20601-1-tony@atomide.com/ After reading the code, I think this is what happens: We have a DSI host defined in the device tree and a DSI peripheral under that host (i.e. an i2c device using the DSI as data bus doesn't exhibit this behavior). The host driver calls mipi_dsi_host_register(), which causes (via a few functions) mipi_dsi_device_add() to be called for the DSI peripheral. So now we have a DSI device under the host, but attach hasn't been called. Normally the probing of the devices continues, and eventually the DSI peripheral's driver will call mipi_dsi_attach(), attaching the peripheral. However, if the host driver's probe encounters an error after calling mipi_dsi_host_register(), and before the peripheral has called mipi_dsi_attach(), the host driver will do cleanups and return an error from its probe function. The cleanups include calling mipi_dsi_host_unregister(). mipi_dsi_host_unregister() will call two functions for all its DSI peripheral devices: mipi_dsi_detach() and mipi_dsi_device_unregister(). The latter makes sense, as the device exists, but the former may be wrong as attach has not necessarily been done. To fix this, track the attached state of the peripheral, and only detach from mipi_dsi_host_unregister() if the peripheral was attached. Note that I have only tested this with a board with an i2c DSI peripheral, not with a "pure" DSI peripheral. However, slightly related, the unregister machinery still seems broken. E.g. if the DSI host driver is unbound, it'll detach and unregister the DSI peripherals. After that, when the DSI peripheral driver unbound it'll call detach either directly or using the devm variant, leading to a crash. And probably the driver will crash if it happens, for some reason, to try to send a message via the DSI bus. But that's another topic. Tested-by: H. Nikolaus Schaller Acked-by: Maxime Ripard Reviewed-by: Sebastian Reichel Tested-by: Tony Lindgren Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230921-dsi-detach-fix-v1-1-d0de2d1621d9@ideasonboard.com commit 32bd29b619638256c5b75fb021d6d9f12fc4a984 Author: Tomi Valkeinen Date: Fri Nov 3 15:14:06 2023 +0200 drm/bridge: tc358767: Fix return value on error case If the hpd_pin is invalid, the driver returns 'ret'. But 'ret' contains 0, instead of an error value. Return -EINVAL instead. Fixes: f25ee5017e4f ("drm/bridge: tc358767: add IRQ and HPD support") Acked-by: Maxime Ripard Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20231103-uninit-fixes-v2-4-c22b2444f5f5@ideasonboard.com commit 155d6fb61270dd297f128731cd155080deee8f3a Author: Tomi Valkeinen Date: Fri Nov 3 15:14:05 2023 +0200 drm/bridge: cdns-mhdp8546: Fix use of uninitialized variable 'ret' could be uninitialized at the end of the function, although it's not clear if that can happen in practice. Fixes: 6a3608eae6d3 ("drm: bridge: cdns-mhdp8546: Enable HDCP") Acked-by: Maxime Ripard Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20231103-uninit-fixes-v2-3-c22b2444f5f5@ideasonboard.com commit f9af8f0c1dc567a5a6a6318ff324c45d80d4a60f Author: Tomi Valkeinen Date: Fri Nov 3 15:14:04 2023 +0200 drm/framebuffer: Fix use of uninitialized variable smatch reports: drivers/gpu/drm/drm_framebuffer.c:654 drm_mode_getfb2_ioctl() error: uninitialized symbol 'ret'. 'ret' is possibly not set when there are no errors, causing the error above. I can't say if that ever happens in real-life, but in any case I think it is good to initialize 'ret' to 0. Reviewed-by: Laurent Pinchart Acked-by: Maxime Ripard Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20231103-uninit-fixes-v2-2-c22b2444f5f5@ideasonboard.com commit 1d3062fad9c7313fff9970a88e0538a24480ffb8 Author: Tomi Valkeinen Date: Fri Nov 3 15:14:03 2023 +0200 drm/drm_file: fix use of uninitialized variable smatch reports: drivers/gpu/drm/drm_file.c:967 drm_show_memory_stats() error: uninitialized symbol 'supported_status'. 'supported_status' is only set in one code path. I'm not familiar with the code to say if that path will always be ran in real life, but whether that is the case or not, I think it is good to initialize 'supported_status' to 0 to silence the warning (and possibly fix a bug). Reviewed-by: Laurent Pinchart Acked-by: Maxime Ripard Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20231103-uninit-fixes-v2-1-c22b2444f5f5@ideasonboard.com commit be2f78a8a638e71bbbc2109bc052524143e8f42a Author: Huisong Li Date: Fri Dec 1 11:45:34 2023 +0800 soc: hisilicon: kunpeng_hccs: Support the platform with PCC type3 and interrupt ack Support the platform with PCC type3 and interrupt ack. And a version specific structure is introduced to handle the difference between the device in the code. Signed-off-by: Huisong Li Reviewed-by: Jonathan Cameron Signed-off-by: Wei Xu commit a07d8fc358af5f297b41b2182a5fce710e3c9bd7 Author: Huisong Li Date: Fri Dec 1 11:45:33 2023 +0800 doc: kunpeng_hccs: Fix incorrect email domain name The email domain name in Contact is wrong. So this patch has to modify it. Signed-off-by: Huisong Li Signed-off-by: Wei Xu commit a079f3244563a4c4dc32b0a9bfa0e3e519f3c9ed Author: Huisong Li Date: Fri Dec 1 11:45:32 2023 +0800 soc: hisilicon: kunpeng_hccs: Remove an unused blank line Remove an unused blank line. Signed-off-by: Huisong Li Reviewed-by: Jonathan Cameron Signed-off-by: Wei Xu commit e1e720f3f2c50a6f3440b3684decd7b7c046e111 Author: Huisong Li Date: Fri Dec 1 11:45:31 2023 +0800 soc: hisilicon: kunpeng_hccs: Add failure log for no _CRS method Driver gets the PCC channel id by using the PCC GAS in _CRS. But, currently, if the firmware has no _CRS method on platform, there is not any failure log. So this patch adds the log for this. Signed-off-by: Huisong Li Reviewed-by: Jonathan Cameron Signed-off-by: Wei Xu commit 734add1a278f05db2d5a0b9d280a8bce94ce5eeb Author: Huisong Li Date: Fri Dec 1 11:45:30 2023 +0800 soc: hisilicon: kunpeng_hccs: Fix some incorrect format strings Fix some incorrect format strings. Signed-off-by: Huisong Li Reviewed-by: Jonathan Cameron Signed-off-by: Wei Xu commit b8dbbbc535a95acd66035cf75872cd7524c0b12f Author: Johannes Berg Date: Tue Dec 5 17:00:11 2023 +0100 net: rtnetlink: remove local list in __linkwatch_run_queue() Due to linkwatch_forget_dev() (and perhaps others?) checking for list_empty(&dev->link_watch_list), we must have all manipulations of even the local on-stack list 'wrk' here under spinlock, since even that list can be reached otherwise via dev->link_watch_list. This is already the case, but makes this a bit counter-intuitive, often local lists are used to _not_ have to use locking for their local use. Remove the local list as it doesn't seem to serve any purpose. While at it, move a variable declaration into the loop using it. Reviewed-by: Jiri Pirko Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20231205170011.56576dcc1727.I698b72219d9f6ce789bd209b8f6dffd0ca32a8f2@changeid Signed-off-by: Jakub Kicinski commit 5a08d0065a915ccf325563d7ca57fa8b4897881c Author: Eric Dumazet Date: Tue Dec 5 17:32:50 2023 +0000 ipv6: add debug checks in fib6_info_release() Some elusive syzbot reports are hinting to fib6_info_release(), with a potential dangling f6i->gc_link anchor. Add debug checks so that syzbot can catch the issue earlier eventually. BUG: KASAN: slab-use-after-free in __hlist_del include/linux/list.h:990 [inline] BUG: KASAN: slab-use-after-free in hlist_del_init include/linux/list.h:1016 [inline] BUG: KASAN: slab-use-after-free in fib6_clean_expires_locked include/net/ip6_fib.h:533 [inline] BUG: KASAN: slab-use-after-free in fib6_purge_rt+0x986/0x9c0 net/ipv6/ip6_fib.c:1064 Write of size 8 at addr ffff88802805a840 by task syz-executor.1/10057 CPU: 1 PID: 10057 Comm: syz-executor.1 Not tainted 6.7.0-rc2-syzkaller-00029-g9b6de136b5f0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 __hlist_del include/linux/list.h:990 [inline] hlist_del_init include/linux/list.h:1016 [inline] fib6_clean_expires_locked include/net/ip6_fib.h:533 [inline] fib6_purge_rt+0x986/0x9c0 net/ipv6/ip6_fib.c:1064 fib6_del_route net/ipv6/ip6_fib.c:1993 [inline] fib6_del+0xa7a/0x1750 net/ipv6/ip6_fib.c:2038 __ip6_del_rt net/ipv6/route.c:3866 [inline] ip6_del_rt+0xf7/0x200 net/ipv6/route.c:3881 ndisc_router_discovery+0x295b/0x3560 net/ipv6/ndisc.c:1372 ndisc_rcv+0x3de/0x5f0 net/ipv6/ndisc.c:1856 icmpv6_rcv+0x1470/0x19c0 net/ipv6/icmp.c:979 ip6_protocol_deliver_rcu+0x170/0x13e0 net/ipv6/ip6_input.c:438 ip6_input_finish+0x14f/0x2f0 net/ipv6/ip6_input.c:483 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip6_input+0xa1/0xc0 net/ipv6/ip6_input.c:492 ip6_mc_input+0x48b/0xf40 net/ipv6/ip6_input.c:586 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ipv6_rcv+0x24e/0x380 net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core+0x115/0x180 net/core/dev.c:5529 __netif_receive_skb+0x1f/0x1b0 net/core/dev.c:5643 netif_receive_skb_internal net/core/dev.c:5729 [inline] netif_receive_skb+0x133/0x700 net/core/dev.c:5788 tun_rx_batched+0x429/0x780 drivers/net/tun.c:1579 tun_get_user+0x29e3/0x3bc0 drivers/net/tun.c:2002 tun_chr_write_iter+0xe8/0x210 drivers/net/tun.c:2048 call_write_iter include/linux/fs.h:2020 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x64f/0xdf0 fs/read_write.c:584 ksys_write+0x12f/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f38e387b82f Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48 RSP: 002b:00007f38e45c9090 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f38e399bf80 RCX: 00007f38e387b82f RDX: 00000000000003b6 RSI: 0000000020000680 RDI: 00000000000000c8 RBP: 00007f38e38c847a R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000003b6 R11: 0000000000000293 R12: 0000000000000000 R13: 000000000000000b R14: 00007f38e399bf80 R15: 00007f38e3abfa48 Allocated by task 10044: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:383 kasan_kmalloc include/linux/kasan.h:198 [inline] __do_kmalloc_node mm/slab_common.c:1007 [inline] __kmalloc+0x59/0x90 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] fib6_info_alloc+0x40/0x160 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x337/0x1e70 net/ipv6/route.c:3749 ip6_route_add+0x26/0x150 net/ipv6/route.c:3843 rt6_add_route_info+0x2e7/0x4b0 net/ipv6/route.c:4316 rt6_route_rcv+0x76c/0xbf0 net/ipv6/route.c:985 ndisc_router_discovery+0x138b/0x3560 net/ipv6/ndisc.c:1529 ndisc_rcv+0x3de/0x5f0 net/ipv6/ndisc.c:1856 icmpv6_rcv+0x1470/0x19c0 net/ipv6/icmp.c:979 ip6_protocol_deliver_rcu+0x170/0x13e0 net/ipv6/ip6_input.c:438 ip6_input_finish+0x14f/0x2f0 net/ipv6/ip6_input.c:483 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip6_input+0xa1/0xc0 net/ipv6/ip6_input.c:492 ip6_mc_input+0x48b/0xf40 net/ipv6/ip6_input.c:586 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ipv6_rcv+0x24e/0x380 net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core+0x115/0x180 net/core/dev.c:5529 __netif_receive_skb+0x1f/0x1b0 net/core/dev.c:5643 netif_receive_skb_internal net/core/dev.c:5729 [inline] netif_receive_skb+0x133/0x700 net/core/dev.c:5788 tun_rx_batched+0x429/0x780 drivers/net/tun.c:1579 tun_get_user+0x29e3/0x3bc0 drivers/net/tun.c:2002 tun_chr_write_iter+0xe8/0x210 drivers/net/tun.c:2048 call_write_iter include/linux/fs.h:2020 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x64f/0xdf0 fs/read_write.c:584 ksys_write+0x12f/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Freed by task 5123: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] __kmem_cache_free+0xc0/0x180 mm/slub.c:3822 rcu_do_batch kernel/rcu/tree.c:2158 [inline] rcu_core+0x819/0x1680 kernel/rcu/tree.c:2431 __do_softirq+0x21a/0x8de kernel/softirq.c:553 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 __call_rcu_common.constprop.0+0x9a/0x7a0 kernel/rcu/tree.c:2681 fib6_info_release include/net/ip6_fib.h:332 [inline] fib6_info_release include/net/ip6_fib.h:329 [inline] rt6_route_rcv+0xa4e/0xbf0 net/ipv6/route.c:997 ndisc_router_discovery+0x138b/0x3560 net/ipv6/ndisc.c:1529 ndisc_rcv+0x3de/0x5f0 net/ipv6/ndisc.c:1856 icmpv6_rcv+0x1470/0x19c0 net/ipv6/icmp.c:979 ip6_protocol_deliver_rcu+0x170/0x13e0 net/ipv6/ip6_input.c:438 ip6_input_finish+0x14f/0x2f0 net/ipv6/ip6_input.c:483 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip6_input+0xa1/0xc0 net/ipv6/ip6_input.c:492 ip6_mc_input+0x48b/0xf40 net/ipv6/ip6_input.c:586 dst_input include/net/dst.h:461 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ipv6_rcv+0x24e/0x380 net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core+0x115/0x180 net/core/dev.c:5529 __netif_receive_skb+0x1f/0x1b0 net/core/dev.c:5643 netif_receive_skb_internal net/core/dev.c:5729 [inline] netif_receive_skb+0x133/0x700 net/core/dev.c:5788 tun_rx_batched+0x429/0x780 drivers/net/tun.c:1579 tun_get_user+0x29e3/0x3bc0 drivers/net/tun.c:2002 tun_chr_write_iter+0xe8/0x210 drivers/net/tun.c:2048 call_write_iter include/linux/fs.h:2020 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x64f/0xdf0 fs/read_write.c:584 ksys_write+0x12f/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Second to last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 __kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492 insert_work+0x38/0x230 kernel/workqueue.c:1647 __queue_work+0xcdc/0x11f0 kernel/workqueue.c:1803 call_timer_fn+0x193/0x590 kernel/time/timer.c:1700 expire_timers kernel/time/timer.c:1746 [inline] __run_timers+0x585/0xb20 kernel/time/timer.c:2022 run_timer_softirq+0x58/0xd0 kernel/time/timer.c:2035 __do_softirq+0x21a/0x8de kernel/softirq.c:553 The buggy address belongs to the object at ffff88802805a800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 64 bytes inside of freed 512-byte region [ffff88802805a800, ffff88802805aa00) The buggy address belongs to the physical page: page:ffffea0000a01600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x28058 head:ffffea0000a01600 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888013041c80 ffffea0001e02600 dead000000000002 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 18706, tgid 18699 (syz-executor.2), ts 999991973280, free_ts 996884464281 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab mm/slub.c:2017 [inline] new_slab+0x283/0x3c0 mm/slub.c:2070 ___slab_alloc+0x979/0x1500 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] __kmem_cache_alloc_node+0x131/0x310 mm/slub.c:3517 __do_kmalloc_node mm/slab_common.c:1006 [inline] __kmalloc+0x49/0x90 mm/slab_common.c:1020 kmalloc include/linux/slab.h:604 [inline] kzalloc include/linux/slab.h:721 [inline] copy_splice_read+0x1ac/0x8f0 fs/splice.c:338 vfs_splice_read fs/splice.c:992 [inline] vfs_splice_read+0x2ea/0x3b0 fs/splice.c:962 splice_direct_to_actor+0x2a5/0xa30 fs/splice.c:1069 do_splice_direct+0x1af/0x280 fs/splice.c:1194 do_sendfile+0xb3e/0x1310 fs/read_write.c:1254 __do_sys_sendfile64 fs/read_write.c:1322 [inline] __se_sys_sendfile64 fs/read_write.c:1308 [inline] __x64_sys_sendfile64+0x1d6/0x220 fs/read_write.c:1308 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page_list+0xe6/0xb40 mm/page_alloc.c:2533 release_pages+0x32a/0x14f0 mm/swap.c:1042 tlb_batch_pages_flush+0x9a/0x190 mm/mmu_gather.c:98 tlb_flush_mmu_free mm/mmu_gather.c:293 [inline] tlb_flush_mmu mm/mmu_gather.c:300 [inline] tlb_finish_mmu+0x14b/0x6f0 mm/mmu_gather.c:392 exit_mmap+0x38b/0xa70 mm/mmap.c:3321 __mmput+0x12a/0x4d0 kernel/fork.c:1349 mmput+0x62/0x70 kernel/fork.c:1371 exit_mm kernel/exit.c:567 [inline] do_exit+0x9ad/0x2ae0 kernel/exit.c:858 do_group_exit+0xd4/0x2a0 kernel/exit.c:1021 get_signal+0x23be/0x2790 kernel/signal.c:2904 arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:309 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x121/0x240 kernel/entry/common.c:204 irqentry_exit_to_user_mode+0xa/0x40 kernel/entry/common.c:309 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 Signed-off-by: Eric Dumazet Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20231205173250.2982846-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 3f3cec031099c37513727efc978a12b6346e326d Author: Darrick J. Wong Date: Wed Dec 6 18:41:00 2023 -0800 xfs: force small EFIs for reaping btree extents Introduce the concept of a defer ops barrier to separate consecutively queued pending work items of the same type. With a barrier in place, the two work items will be tracked separately, and receive separate log intent items. The goal here is to prevent reaping of old metadata blocks from creating unnecessarily huge EFIs that could then run the risk of overflowing the scrub transaction. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 6bb9ea8ecd2c58a66324cb799838e7d49d78a877 Author: Darrick J. Wong Date: Wed Dec 6 18:41:00 2023 -0800 xfs: log EFIs for all btree blocks being used to stage a btree We need to log EFIs for every extent that we allocate for the purpose of staging a new btree so that if we fail then the blocks will be freed during log recovery. Use the autoreaping mechanism provided by the previous patch to attach paused freeing work to the scrub transaction. We can then mark the EFIs stale if we decide to commit the new btree, or we can unpause the EFIs if we decide to abort the repair. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit be408417630427984a1fddd069f30b245793234c Author: Darrick J. Wong Date: Wed Dec 6 18:40:59 2023 -0800 xfs: implement block reservation accounting for btrees we're staging Create a new xrep_newbt structure to encapsulate a fake root for creating a staged btree cursor as well as to track all the blocks that we need to reserve in order to build that btree. As for the particular choice of lowspace thresholds and btree block slack factors -- at this point one could say that the thresholds in online repair come from bulkload_estimate_ag_slack in xfs_repair[1]. But that's not the entire story, since the offline btree rebuilding code in xfs_repair was merged as a retroport of the online btree code in this patchset! Before xfs_btree_staging.[ch] came along, xfs_repair determined the slack factor (aka the number of slots to leave unfilled in each new btree block) via open-coded logic in repair/phase5.c[2]. At that point the slack factors were arbitrary quantities per btree. The rmapbt automatically left 10 slots free; everything else left zero. That had a noticeable effect on performance straight after mounting because adding records to /any/ btree would result in splits. A few years ago when this patch was first written, Dave and I decided that repair should generate btree blocks that were 75% full unless space was tight, in which case it should try to fill the blocks to nearly full. We defined tight as ~10% free to avoid repair failures but settled on 3/32 (~9%) to avoid div64. IOWs, we mostly pulled the thresholds out of thin air. We've been QAing with those geometry numbers ever since. ;) Link: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/tree/repair/bulkload.c?h=v6.5.0#n114 Link: https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git/tree/repair/phase5.c?h=v4.19.0#n1349 Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 4c8ecd1cfdd01fb727121035014d9f654a30bdf2 Author: Darrick J. Wong Date: Wed Dec 6 18:40:58 2023 -0800 xfs: remove unused fields from struct xbtree_ifakeroot Remove these unused fields since nobody uses them. They should have been removed years ago in a different cleanup series from Christoph Hellwig. Fixes: daf83964a3681 ("xfs: move the per-fork nextents fields into struct xfs_ifork") Fixes: f7e67b20ecbbc ("xfs: move the fork format fields into struct xfs_ifork") Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit e3042be36c343207b7af249a09f50b4e37e9fda4 Author: Darrick J. Wong Date: Wed Dec 6 18:40:57 2023 -0800 xfs: automatic freeing of freshly allocated unwritten space As mentioned in the previous commit, online repair wants to allocate space to write out a new metadata structure, and it also wants to hedge against system crashes during repairs by logging (and later cancelling) EFIs to free the space if we crash before committing the new data structure. Therefore, create a trio of functions to schedule automatic reaping of freshly allocated unwritten space. xfs_alloc_schedule_autoreap creates a paused EFI representing the space we just allocated. Once the allocations are made and the autoreaps scheduled, we can start writing to disk. If the writes succeed, xfs_alloc_cancel_autoreap marks the EFI work items as stale and unpauses the pending deferred work item. Assuming that's done in the same transaction that commits the new structure into the filesystem, we guarantee that either the new object is fully visible, or that all the space gets reclaimed. If the writes succeed but only part of an extent was used, repair must call the same _cancel_autoreap function to kill the first EFI and then log a new EFI to free the unused space. The first EFI is already committed, so it cannot be changed. For full extents that aren't used, xfs_alloc_commit_autoreap will unpause the EFI, which results in the space being freed during the next _defer_finish cycle. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 4c88fef3af4a51c2cdba6a28237e98da4873e8dc Author: Darrick J. Wong Date: Wed Dec 6 18:40:57 2023 -0800 xfs: remove __xfs_free_extent_later xfs_free_extent_later is a trivial helper, so remove it to reduce the amount of thinking required to understand the deferred freeing interface. This will make it easier to introduce automatic reaping of speculative allocations in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 4dffb2cbb4839fd6f9bbac0b3fd06cc9015cbb9b Author: Darrick J. Wong Date: Wed Dec 6 18:40:56 2023 -0800 xfs: allow pausing of pending deferred work items Traditionally, all pending deferred work attached to a transaction is finished when one of the xfs_defer_finish* functions is called. However, online repair wants to be able to allocate space for a new data structure, format a new metadata structure into the allocated space, and commit that into the filesystem. As a hedge against system crashes during repairs, we also want to log some EFI items for the allocated space speculatively, and cancel them if we elect to commit the new data structure. Therefore, introduce the idea of pausing a pending deferred work item. Log intent items are still created for paused items and relogged as necessary. However, paused items are pushed onto a side list before we start calling ->finish_item, and the whole list is reattach to the transaction afterwards. New work items are never attached to paused pending items. Modify xfs_defer_cancel to clean up pending deferred work items holding a log intent item but not a log intent done item, since that is now possible. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 6b126139401a2284402d7c38fe3168d5a26da41d Author: Darrick J. Wong Date: Wed Dec 6 18:40:55 2023 -0800 xfs: don't append work items to logged xfs_defer_pending objects When someone tries to add a deferred work item to xfs_defer_add, it will try to attach the work item to the most recently added xfs_defer_pending object attached to the transaction. However, it doesn't check if the pending object has a log intent item attached to it. This is incorrect behavior because we cannot add more work to an object that has already been committed to the ondisk log. Therefore, change the behavior not to append to pending items with a non null dfp_intent. In practice this has not been an issue because the only way xfs_defer_add gets called after log intent items have been committed is from the defer ops ->finish_item functions themselves, and the @dop_pending isolation in xfs_defer_finish_noroll protects the pending items that have already been logged. However, the next patch will add the ability to pause a deferred extent free object during online btree rebuilding, and any new extfree work items need to have their own pending event. While we're at it, hoist the predicate to its own static inline function for readability. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 3f113c2739b1b068854c7ffed635c2bd790d1492 Author: Darrick J. Wong Date: Wed Dec 6 18:40:54 2023 -0800 xfs: make xchk_iget safer in the presence of corrupt inode btrees When scrub is trying to iget an inode, ensure that it won't end up deadlocked on a cycle in the inode btree by using an empty transaction to store all the buffers. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 9c07bca793b4ff9f0b7871e2a928a1b28b8fa4e3 Author: Darrick J. Wong Date: Mon Dec 4 12:21:06 2023 -0800 xfs: elide ->create_done calls for unlogged deferred work Extended attribute updates use the deferred work machinery to manage state across a chain of smaller transactions. All previous deferred work users have employed log intent items and log done items to manage restarting of interrupted operations, which means that ->create_intent sets dfp_intent to a log intent item and ->create_done uses that item to create a log intent done item. However, xattrs have used the INCOMPLETE flag to deal with the lack of recovery support for an interrupted transaction chain. Log items are optional if the xattr update caller didn't set XFS_DA_OP_LOGGED to require a restartable sequence. In other words, ->create_intent can return NULL to say that there's no log intent item. If that's the case, no log intent done item should be created. Clean up xfs_defer_create_done not to do this, so that the ->create_done functions don't have to check for non-null dfp_intent themselves. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e14293803f4e84eb23a417b462b56251033b5a66 Author: Darrick J. Wong Date: Fri Dec 1 09:24:18 2023 -0800 xfs: don't allow overly small or large realtime volumes Don't allow realtime volumes that are less than one rt extent long. This has been broken across 4 LTS kernels with nobody noticing, so let's just disable it. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a49c708f9a445457f6a5905732081871234f61c6 Author: Darrick J. Wong Date: Thu Nov 30 12:31:30 2023 -0800 xfs: move ->iop_relog to struct xfs_defer_op_type The only log items that need relogging are the ones created for deferred work operations, and the only part of the code base that relogs log items is the deferred work machinery. Move the function pointers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 94da54d582e6866a9613514b59f326456e88446d Author: Darrick J. Wong Date: Mon Dec 4 12:13:26 2023 -0800 xfs: document what LARP means Christoph requested a blurb somewhere explaining exactly what LARP means. I don't know of a good place other than the source code (debug knobs aren't covered in Documentation/), so here it is. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit cf8f0e6c1429be7652869059ea44696b72d5b726 Author: Darrick J. Wong Date: Sun Dec 3 09:19:44 2023 -0800 xfs: fix 32-bit truncation in xfs_compute_rextslog It's quite reasonable that some customer somewhere will want to configure a realtime volume with more than 2^32 extents. If they try to do this, the highbit32() call will truncate the upper bits of the xfs_rtbxlen_t and produce the wrong value for rextslog. This in turn causes the rsumlevels to be wrong, which results in a realtime summary file that is the wrong length. Fix that. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a6a38f309afc4a7ede01242b603f36c433997780 Author: Darrick J. Wong Date: Fri Dec 1 09:17:40 2023 -0800 xfs: make rextslog computation consistent with mkfs There's a weird discrepancy in xfsprogs dating back to the creation of the Linux port -- if there are zero rt extents, mkfs will set sb_rextents and sb_rextslog both to zero: sbp->sb_rextslog = (uint8_t)(rtextents ? libxfs_highbit32((unsigned int)rtextents) : 0); However, that's not the check that xfs_repair uses for nonzero rtblocks: if (sb->sb_rextslog != libxfs_highbit32((unsigned int)sb->sb_rextents)) The difference here is that xfs_highbit32 returns -1 if its argument is zero. Unfortunately, this means that in the weird corner case of a realtime volume shorter than 1 rt extent, xfs_repair will immediately flag a freshly formatted filesystem as corrupt. Because mkfs has been writing ondisk artifacts like this for decades, we have to accept that as "correct". TBH, zero rextslog for zero rtextents makes more sense to me anyway. Regrettably, the superblock verifier checks created in commit copied xfs_repair even though mkfs has been writing out such filesystems for ages. Fix the superblock verifier to accept what mkfs spits out; the userspace version of this patch will have to fix xfs_repair as well. Note that the new helper leaves the zeroday bug where the upper 32 bits of sb_rextents is ripped off and fed to highbit32. This leads to a seriously undersized rt summary file, which immediately breaks mkfs: $ hugedisk.sh foo /dev/sdc $(( 0x100000080 * 4096))B $ /sbin/mkfs.xfs -f /dev/sda -m rmapbt=0,reflink=0 -r rtdev=/dev/mapper/foo meta-data=/dev/sda isize=512 agcount=4, agsize=1298176 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=0 bigtime=1 inobtcount=1 nrext64=1 data = bsize=4096 blocks=5192704, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=16384, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =/dev/mapper/foo extsz=4096 blocks=4294967424, rtextents=4294967424 Discarding blocks...Done. mkfs.xfs: Error initializing the realtime space [117 - Structure needs cleaning] The next patch will drop support for rt volumes with fewer than 1 or more than 2^32-1 rt extents, since they've clearly been broken forever. Fixes: f8e566c0f5e1f ("xfs: validate the realtime geometry in xfs_validate_sb_common") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 8a9aa763e17c5490d3526cbf4c9484d76ecbbe39 Author: Darrick J. Wong Date: Thu Nov 30 12:17:37 2023 -0800 xfs: collapse the ->create_done functions Move the meat of the ->create_done function helpers into ->create_done to reduce the amount of boilerplate. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit b28852a5bd08654634e4e32eb072fba14c5fae26 Author: Darrick J. Wong Date: Thu Nov 30 12:06:08 2023 -0800 xfs: hoist xfs_trans_add_item calls to defer ops functions Remove even more repeated boilerplate. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 3e0958be2156d90ef908a1a547b4e27a3ec38da9 Author: Darrick J. Wong Date: Thu Nov 30 11:47:45 2023 -0800 xfs: clean out XFS_LI_DIRTY setting boilerplate from ->iop_relog Hoist this dirty flag setting to the ->iop_relog callsite to reduce boilerplate. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit bd3a88f6b71c7509566b44b7021581191cc11ae3 Author: Darrick J. Wong Date: Thu Nov 30 11:44:56 2023 -0800 xfs: use xfs_defer_create_done for the relogging operation Now that we have a helper to handle creating a log intent done item and updating all the necessary state flags, use it to reduce boilerplate in the ->iop_relog implementations. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit f3fd7f6fce1cc9b8eb59705b27f823330207b7c9 Author: Darrick J. Wong Date: Thu Nov 30 10:58:37 2023 -0800 xfs: hoist ->create_intent boilerplate to its callsite Hoist the dirty flag setting code out of each ->create_intent implementation up to the callsite to reduce boilerplate further. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e6e5299fcbf0b18cad45cd58f99787549c790857 Author: Darrick J. Wong Date: Thu Nov 30 10:23:19 2023 -0800 xfs: collapse the ->finish_item helpers Each log item's ->finish_item function sets up a small amount of state and calls another function to do the work. Collapse that other function into ->finish_item to reduce the call stack height. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit db7ccc0bac2add5a41b66578e376b49328fc99d0 Author: Darrick J. Wong Date: Wed Nov 22 13:39:25 2023 -0800 xfs: move ->iop_recover to xfs_defer_op_type Finish off the series by moving the intent item recovery function pointer to the xfs_defer_op_type struct, since this is really a deferred work function now. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 3dd75c8db1c1675a26d3e228bab349c1fc065867 Author: Darrick J. Wong Date: Thu Nov 30 10:45:28 2023 -0800 xfs: hoist intent done flag setting to ->finish_item callsite Each log intent item's ->finish_item call chain inevitably includes some code to set the dirty flag of the transaction. If there's an associated log intent done item, it also sets the item's dirty flag and the transaction's INTENT_DONE flag. This is repeated throughout the codebase. Reduce the LOC by moving all that to xfs_defer_finish_one. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e5f1a5146ec35f3ed5d7f5ac7807a10c0062b6b8 Author: Darrick J. Wong Date: Wed Nov 22 11:25:45 2023 -0800 xfs: use xfs_defer_finish_one to finish recovered work items Get rid of the open-coded calls to xfs_defer_finish_one. This also means that the recovery transaction takes care of cleaning up the dfp, and we have solved (I hope) all the ownership issues in recovery. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 172538beba82e7b65d3d7c84cb558f287381cd7a Author: Darrick J. Wong Date: Thu Nov 30 10:27:10 2023 -0800 xfs: don't set XFS_TRANS_HAS_INTENT_DONE when there's no ATTRD log item XFS_TRANS_HAS_INTENT_DONE is a flag to the CIL that we've added a log intent done item to the transaction. This enables an optimization wherein we avoid writing out log intent and log intent done items if they would have ended up in the same checkpoint. This reduces writes to the ondisk log and speeds up recovery as a result. However, callers can use the defer ops machinery to modify xattrs without using the log items. In this situation, there won't be an intent done item, so we do not need to set the flag. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a51489e140d302c7afae763eacf882a23513f7e4 Author: Darrick J. Wong Date: Thu Nov 30 09:57:42 2023 -0800 xfs: dump the recovered xattri log item if corruption happens If xfs_attri_item_recover receives a corruption error when it tries to finish a recovered log intent item, it should dump the log item for debugging, just like all the other log intent items. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e70fb328d5277297ea2d9169a3a046de6412d777 Author: Darrick J. Wong Date: Wed Nov 22 11:13:03 2023 -0800 xfs: recreate work items when recovering intent items Recreate work items for each xfs_defer_pending object when we are recovering intent items. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit deb4cd8ba87f17b12c72b3827820d9c703e9fd95 Author: Darrick J. Wong Date: Wed Nov 22 10:47:10 2023 -0800 xfs: transfer recovered intent item ownership in ->iop_recover Now that we pass the xfs_defer_pending object into the intent item recovery functions, we know exactly when ownership of the sole refcount passes from the recovery context to the intent done item. At that point, we need to null out dfp_intent so that the recovery mechanism won't release it. This should fix the UAF problem reported by Long Li. Note that we still want to recreate the full deferred work state. That will be addressed in the next patches. Fixes: 2e76f188fd90 ("xfs: cancel intents immediately if process_intents fails") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a050acdfa8003a44eae4558fddafc7afb1aef458 Author: Darrick J. Wong Date: Wed Nov 22 10:38:10 2023 -0800 xfs: pass the xfs_defer_pending object to iop_recover Now that log intent item recovery recreates the xfs_defer_pending state, we should pass that into the ->iop_recover routines so that the intent item can finish the recreation work. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 03f7767c9f6120ac933378fdec3bfd78bf07bc11 Author: Darrick J. Wong Date: Wed Nov 22 10:23:23 2023 -0800 xfs: use xfs_defer_pending objects to recover intent items One thing I never quite got around to doing is porting the log intent item recovery code to reconstruct the deferred pending work state. As a result, each intent item open codes xfs_defer_finish_one in its recovery method, because that's what the EFI code did before xfs_defer.c even existed. This is a gross thing to have left unfixed -- if an EFI cannot proceed due to busy extents, we end up creating separate new EFIs for each unfinished work item, which is a change in behavior from what runtime would have done. Worse yet, Long Li pointed out that there's a UAF in the recovery code. The ->commit_pass2 function adds the intent item to the AIL and drops the refcount. The one remaining refcount is now owned by the recovery mechanism (aka the log intent items in the AIL) with the intent of giving the refcount to the intent done item in the ->iop_recover function. However, if something fails later in recovery, xlog_recover_finish will walk the recovered intent items in the AIL and release them. If the CIL hasn't been pushed before that point (which is possible since we don't force the log until later) then the intent done release will try to free its associated intent, which has already been freed. This patch starts to address this mess by having the ->commit_pass2 functions recreate the xfs_defer_pending state. The next few patches will fix the recovery functions. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 07bcbdf020c9fd3c14bec51c50225a2a02707b94 Author: Darrick J. Wong Date: Thu Nov 23 09:48:09 2023 -0800 xfs: don't leak recovered attri intent items If recovery finds an xattr log intent item calling for the removal of an attribute and the file doesn't even have an attr fork, we know that the removal is trivially complete. However, we can't just exit the recovery function without doing something about the recovered log intent item -- it's still on the AIL, and not logging an attrd item means it stays there forever. This has likely not been seen in practice because few people use LARP and the runtime code won't log the attri for a no-attrfork removexattr operation. But let's fix this anyway. Also we shouldn't really be testing the attr fork presence until we've taken the ILOCK, though this doesn't matter much in recovery, which is single threaded. Fixes: fdaf1bb3cafc ("xfs: ATTR_REPLACE algorithm with LARP enabled needs rework") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 386a766c4169006d0e9df44823849930b8995e32 Author: Wentong Wu Date: Mon Dec 4 08:55:44 2023 +0800 mei: Add MEI hardware support for IVSC device The protocol used for the IVSC device to communicate with HOST is MEI. The MEI hardware interfaces for the IVSC device are implemented. The APIs are exposed by MEI framework to mei clients, e.g. mei_csi and mei_ace. Signed-off-by: Wentong Wu Reviewed-by: Alexander Usyskin Reviewed-by: Sakari Ailus Tested-by: Hao Yao Acked-by: Tomas Winkler Link: https://lore.kernel.org/r/1701651344-20723-3-git-send-email-wentong.wu@intel.com Signed-off-by: Greg Kroah-Hartman commit 566f5ca9768075e453b7b51a397733968df4287d Author: Wentong Wu Date: Mon Dec 4 08:55:43 2023 +0800 mei: Add transport driver for IVSC device The Intel visual sensing controller (IVSC) device is designed to control the camera sharing between host IPU for media usage and IVSC for context sensing (face detection). IVSC is exposed to HOST as an SPI device and the message protocol over the SPI BUS for communicating with the IVSC device is implemented. This is the backend of mei framework for IVSC device, which usually handles the hardware data transfer. The mei_csi and mei_ace are the clients of IVSC mei framework. The firmware downloading for the IVSC device is implemented as well. Signed-off-by: Wentong Wu Reviewed-by: Sakari Ailus Tested-by: Hao Yao Acked-by: Tomas Winkler Link: https://lore.kernel.org/r/1701651344-20723-2-git-send-email-wentong.wu@intel.com Signed-off-by: Greg Kroah-Hartman commit 55e23aa95b10731c08ab207a42d868aaff3bd2a5 Author: Umang Jain Date: Tue Dec 5 14:11:57 2023 +0530 staging: vc04_services: Drop vchiq_log_debug() in favour of dev_dbg Drop vchiq_log_debug() macro which wraps dev_dbg(). Introduce the usage of dev_dbg() directly. Meanwhile at it, drop the usage of __func__ from the logs. Dynamic debug supports this via the 'f' decorator flag. Remove the entry from TODO regarding custom logging. VC04 is now aligned according to the standard kernel logging mechanisms. Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20231205084157.73819-5-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 078666d7ee6d3cccc1717212b24562649906a30f Author: Umang Jain Date: Tue Dec 5 14:11:56 2023 +0530 staging: vc04_services: Drop vchiq_log_trace() in favour of dev_dbg Drop vchiq_log_trace() macro which wraps dev_dbg(). Introduce the usage of dev_dbg() directly. Meanwhile at it, drop the usage of __func__ from the logs. Dynamic debug supports this via the 'f' decorator flag. Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20231205084157.73819-4-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 085bb4131e0f251c9f369273026828f7ad9ef17a Author: Umang Jain Date: Tue Dec 5 14:11:55 2023 +0530 staging: vc04_services: Drop vchiq_log_warning() in favour of dev_warn Drop vchiq_log_warning() macro which wraps dev_dbg(). Introduce the usage of dev_warn() directly. Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20231205084157.73819-3-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit e70f17ed997cb7ee6c34089f2cdc2a9edc886503 Author: Umang Jain Date: Tue Dec 5 14:11:54 2023 +0530 staging: vc04_services: Drop vchiq_log_error() in favour of dev_err Drop vchiq_log_error() macro which wraps dev_dbg(). Introduce the usage of dev_err() directly. Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20231205084157.73819-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit d0a665b48876867a5cab9d86f28df05f0697c454 Author: Gary Rookard Date: Tue Dec 5 18:16:23 2023 -0500 staging: rtl8192e: renamed variable nAMSDU_MaxSize Coding style issue, checkpatch Avoid CamelCase, rename it nAMSDU_MaxSize -> amsdu_max_size Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231205231623.23070-6-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 41c93322313d9db23d42cf578c9826e55ee16fc6 Author: Gary Rookard Date: Tue Dec 5 18:16:22 2023 -0500 staging: rtl8192e: renamed variable bRegSuppCCK Coding style issue, checkpatch Avoid CamelCase, rename it bRegSuppCCK -> reg_supp_cck Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231205231623.23070-5-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit c4dc2c60ce94a28008e17819c18a29ad45f18eca Author: Gary Rookard Date: Tue Dec 5 18:16:21 2023 -0500 staging: rtl8192e: renamed variable bRegBW40MHz Coding style issue, checkpatch Avoid CamelCase, rename it bRegBW40MHz -> reg_bw_40mhz Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231205231623.23070-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 0e3a51520632b9b5f38a98b993e05d6b5d783163 Author: Gary Rookard Date: Tue Dec 5 18:16:20 2023 -0500 staging: rtl8192e: renamed variable bRegShortGI40MHz Coding style issue, checkpatch Avoid CamelCase, rename it bRegShortGI40MHz -> reg_short_gi_40mhz Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231205231623.23070-3-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit f538d35a782e56d6d7722ea9c1d8b44899de88c8 Author: Gary Rookard Date: Tue Dec 5 18:16:19 2023 -0500 staging: rtl8192e: renamed variable bRegShortGI20MHz Coding style issue, checkpatch Avoid CamelCase, rename it bRegShortGI20MHz -> reg_short_gi_20mhz Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231205231623.23070-2-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 7c41da586e9f45bf8842b4dca08681df8d586ebb Author: Uwe Kleine-König Date: Wed Nov 22 10:33:33 2023 +0100 driver core: Emit reason for pending deferred probe Ending a boot log with platform 3f202000.mmc: deferred probe pending is already a nice hint about the problem. Sometimes there is a more detailed error indicator available, add that to the output. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231122093332.274145-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 055467378bf14d6cc6d17e52dcfc76313b531bd7 Author: Saravana Kannan Date: Mon Nov 13 14:09:47 2023 -0800 driver core: Enable fw_devlink=rpm by default fw_devlink=on has stabilized and is working correctly. Let's start using device links created by fw_devlink to also enforce runtime PM ordering. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20231113220948.80089-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 3babbf614ae66018fa4f97865a7e3a3b8a590fb0 Author: Sakari Ailus Date: Thu Nov 9 12:10:10 2023 +0200 device property: fwnode_property_get_reference_args allows NULL args now All three fwnode_property_get_reference_args() implemantations now allow args argument to be NULL. Document this. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231109101010.1329587-4-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1eaea4b3604eb9ca7d9a1e73d88fc121bb4061f5 Author: Sakari Ailus Date: Thu Nov 9 12:10:09 2023 +0200 software node: Let args be NULL in software_node_get_reference_args fwnode_get_property_reference_args() may not be called with args argument NULL and while OF already supports this. Add the missing NULL check. The purpose is to be able to count the references. Fixes: b06184acf751 ("software node: Add software_node_get_reference_args()") Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231109101010.1329587-3-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bef52aa0f3de1b7d8c258c13b16e577361dabf3a Author: Sakari Ailus Date: Thu Nov 9 12:10:08 2023 +0200 acpi: property: Let args be NULL in __acpi_node_get_property_reference fwnode_get_property_reference_args() may not be called with args argument NULL on ACPI, OF already supports this. Add the missing NULL checks and document this. The purpose is to be able to count the references. Fixes: 977d5ad39f3e ("ACPI: Convert ACPI reference args to generic fwnode reference args") Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231109101010.1329587-2-sakari.ailus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4c095734d92a46c243eca79b86ff3237fcce9a57 Author: Christophe JAILLET Date: Wed Nov 1 10:36:04 2023 +0100 software node: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/c7cdc3566c783d106138698b1e1923351fabace8.1698831275.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit b17b70212dbf3f60ab95eb563dc165d235e75336 Author: Mukesh Ojha Date: Mon Oct 30 15:51:14 2023 +0530 fs/sysfs/dir.c : Fix typo in comment Typo correction kboject => kobject Signed-off-by: Mukesh Ojha Link: https://lore.kernel.org/r/1698661274-32540-1-git-send-email-quic_mojha@quicinc.com Signed-off-by: Greg Kroah-Hartman commit 48b5928e18dc27e05cab3dc4c78cd8a15baaf1e5 Author: Gregory Price Date: Mon Oct 30 00:42:39 2023 -0400 base/node.c: initialize the accessor list before registering The current code registers the node as available in the node array before initializing the accessor list. This makes it so that anything which might access the accessor list as a result of allocations will cause an undefined memory access. In one example, an extension to access hmat data during interleave caused this undefined access as a result of a bulk allocation that occurs during node initialization but before the accessor list is initialized. Initialize the accessor list before making the node generally available to the global system. Fixes: 08d9dbe72b1f ("node: Link memory nodes to their compute nodes") Signed-off-by: Gregory Price Link: https://lore.kernel.org/r/20231030044239.971756-1-gregory.price@memverge.com Signed-off-by: Greg Kroah-Hartman commit 5bb03d0dd76700a830243776a99275575cbb2ee1 Author: Christophe JAILLET Date: Wed Nov 1 10:33:33 2023 +0100 base: soc: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f0ef849446c9b3df7d6b16b1a58d089b4c17276c.1698831191.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 5dac2a98f6542ae1ce78b702374ea4be3f5ee07d Author: Jay Buddhabhatti Date: Wed Nov 29 03:27:13 2023 -0800 firmware: zynqmp: Add support to handle IPI CRC failure Added new PM error code XST_PM_INVALID_CRC to handle CRC validation failure during IPI communication. Co-developed-by: Naman Trivedi Manojbhai Signed-off-by: Naman Trivedi Manojbhai Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231129112713.22718-6-jay.buddhabhatti@amd.com Signed-off-by: Greg Kroah-Hartman commit 8c016c807a90535432543204dbbb032e4a709009 Author: Jay Buddhabhatti Date: Wed Nov 29 03:27:12 2023 -0800 drivers: soc: xilinx: Fix error message on SGI registration failure Failure to register SGI for firmware event notification is non-fatal error when feature is not supported by other modules such as Xen and TF-A. Add _info level log message for such special case. Also add XST_PM_INVALID_VERSION error code and map it to -EOPNOSUPP Linux kernel error code. If feature is not supported or EEMI API version is mismatch, firmware can return XST_PM_INVALID_VERSION = 4 or XST_PM_NO_FEATURE = 19 error code. Co-developed-by: Tanmay Shah Signed-off-by: Tanmay Shah Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231129112713.22718-5-jay.buddhabhatti@amd.com Signed-off-by: Greg Kroah-Hartman commit a9d061840010df64aad2a3e5b308e663d6a36e2f Author: Jay Buddhabhatti Date: Wed Nov 29 03:27:11 2023 -0800 firmware: xilinx: Register event manager driver Use family code in order to register event manager driver for Versal and Versal NET platforms, instead of using compatible string. Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231129112713.22718-4-jay.buddhabhatti@amd.com Signed-off-by: Greg Kroah-Hartman commit f689a0ca45fcdf4139727a3a02a49efbb1902306 Author: Jay Buddhabhatti Date: Wed Nov 29 03:27:10 2023 -0800 firmware: xilinx: Expand feature check to support all PLM modules To support feature check for all modules, append the module id of the API that is being checked to the feature check API so it could be routed to the target module for processing. There is no need to check compatible string because the board information is taken via firmware interface. Co-developed-by: Saeed Nowshadi Signed-off-by: Saeed Nowshadi Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231129112713.22718-3-jay.buddhabhatti@amd.com Signed-off-by: Greg Kroah-Hartman commit f922b16aa5fad7284e2b7fd7c22bab13c0e418b6 Author: Jay Buddhabhatti Date: Wed Nov 29 03:27:09 2023 -0800 firmware: xilinx: Update firmware call interface to support additional args System-level platform management layer (do_fw_call()) has support for maximum of 5 arguments as of now (1 EEMI API ID + 4 command arguments). In order to support new EEMI PM_IOCTL IDs (Secure Read/Write), this support must be extended to support one additional argument, which results in a configuration of - 1 EEMI API ID + 5 command arguments. Update zynqmp_pm_invoke_fn() and do_fw_call() with this new definition containing variable arguments. As a result, update all the references to pm invoke function with the updated definition. Co-developed-by: Izhar Ameer Shaikh Signed-off-by: Izhar Ameer Shaikh Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231129112713.22718-2-jay.buddhabhatti@amd.com Signed-off-by: Greg Kroah-Hartman commit 431c03095d6021bc3dae6502678c53093d2f6182 Author: Heiner Kallweit Date: Thu Nov 16 15:31:59 2023 +0100 eeprom: ee1004: Add support for multiple i2c busses There are systems with more than 8 memory slots where the i2c bus for SPD is multiplexed. i2c_register_spd() isn't used yet on such systems, but it's planned. So we need to extend ee1004 accordingly. With this extension a maximum of 8 i2c busses is supported. I don't have such a system for testing, therefore I just verified that the driver still works on a system with a single i2c bus. For the sake of simplicity the extension uses the existing global mutex to protect access on all busses. This could be improved, but we support 8 busses only, and SPD data is small and rarely accessed, so it shouldn't be a problem. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/f1a216a8-e77c-49f2-8838-561349b30ab8@gmail.com Signed-off-by: Greg Kroah-Hartman commit ad66d503052d51ff9efeab487f41a39816ffc11c Author: Christophe JAILLET Date: Fri Nov 24 22:14:36 2023 +0100 parport: Save a few bytes of memory Most of parport_register_dev_model() callers pass a 'name' that is a constant string. So kstrdup_const() can be used to save the duplication of this string when it is not needed. This saves a few bytes of memory. Use kfree_const() accordingly when this string is freed. Signed-off-by: Christophe JAILLET Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/0eba5f2ddd142ab0f577f67e482d1152b40ee720.1700860416.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 190015a4bb016e0263297fa5ad20744b8ce98b50 Author: Christophe JAILLET Date: Wed Nov 1 10:41:17 2023 +0100 ipack: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Acked-by: Vaibhav Gupta Link: https://lore.kernel.org/r/435bd17b8a5ddb2fc3e42e2796117ee02263d02a.1698831664.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit a070830096e44ddaa64931d831f07e944d920c79 Author: Philipp Stanner Date: Fri Nov 3 12:29:33 2023 +0100 drivers/comedi: use standard array-copy-function comedi_fops.c utilizes memdup_user() to copy a userspace array. The new function memdup_array_user() provides a standardized way to copy userspace-arrays. It makes it easier to see that an array is being copied and, additionally, performs a generic overflow-check which might help make the code more robust in case of changes in the future. Replace memdup_user() with memdup_array_user(). Suggested-by: Dave Airlie Signed-off-by: Philipp Stanner Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/20231103112932.75795-2-pstanner@redhat.com Signed-off-by: Greg Kroah-Hartman commit 437cd966d3c6fb65add251e6db537c14dd953b8a Author: Michal Simek Date: Mon Oct 30 11:23:01 2023 +0530 firmware: xilinx: Use proper indentation in kernel-doc Use tab for zynqmp_pm_load_pdi() arguments doc indentation. No functional change. Signed-off-by: Michal Simek Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1698645181-2874487-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Greg Kroah-Hartman commit 21528c69a0d8483f7c6345b1a0bc8d8975e9a172 Author: Stefan Berger Date: Sun Nov 19 20:12:48 2023 -0500 rootfs: Fix support for rootfstype= when root= is given Documentation/filesystems/ramfs-rootfs-initramfs.rst states: If CONFIG_TMPFS is enabled, rootfs will use tmpfs instead of ramfs by default. To force ramfs, add "rootfstype=ramfs" to the kernel command line. This currently does not work when root= is provided since then saved_root_name contains a string and rootfstype= is ignored. Therefore, ramfs is currently always chosen when root= is provided. The current behavior for rootfs's filesystem is: root= | rootfstype= | chosen rootfs filesystem ------------+-------------+-------------------------- unspecified | unspecified | tmpfs unspecified | tmpfs | tmpfs unspecified | ramfs | ramfs provided | ignored | ramfs rootfstype= should be respected regardless whether root= is given, as shown below: root= | rootfstype= | chosen rootfs filesystem ------------+-------------+-------------------------- unspecified | unspecified | tmpfs (as before) unspecified | tmpfs | tmpfs (as before) unspecified | ramfs | ramfs (as before) provided | unspecified | ramfs (compatibility with before) provided | tmpfs | tmpfs (new) provided | ramfs | ramfs (new) This table represents the new behavior. Fixes: 6e19eded3684 ("initmpfs: use initramfs if rootfstype= or root= specified") Cc: Signed-off-by: Rob Landley Link: https://lore.kernel.org/lkml/8244c75f-445e-b15b-9dbf-266e7ca666e2@landley.net/ Reviewed-and-Tested-by: Mimi Zohar Signed-off-by: Stefan Berger Link: https://lore.kernel.org/r/20231120011248.396012-1-stefanb@linux.ibm.com Signed-off-by: Greg Kroah-Hartman commit 2146f7fe6e028a3905f0658a1a0d8ef7c115d6c1 Merge: 7065eefb38f16 3ba026fca8786 Author: Alexei Starovoitov Date: Wed Dec 6 17:17:21 2023 -0800 Merge branch 'allocate-bpf-trampoline-on-bpf_prog_pack' Song Liu says: ==================== Allocate bpf trampoline on bpf_prog_pack This set enables allocating bpf trampoline from bpf_prog_pack on x86. The majority of this work, however, is the refactoring of trampoline code. This is needed because we need to handle 4 archs and 2 users (trampoline and struct_ops). 1/7 through 6/7 refactors trampoline code. A few helpers are added. 7/7 finally let bpf trampoline on x86 use bpf_prog_pack. Changes in v7: 1. Use kvmalloc for rw_image in x86/arch_prepare_bpf_trampoline. (Alexei) 2. Add comment to explain why we cannot use kvmalloc in x86/arch_bpf_trampoline_size. (Alexei) Changes in v6: 1. Rebase. 2. Add Acked-by and Tested-by from Jiri Olsa and Björn Töpel. Changes in v5: 1. Adjust size of trampoline ksym. (Jiri) 2. Use "unsigned int size" arg in image management helpers.(Daniel) Changes in v4: 1. Dropped 1/8 in v3, which is already merged in bpf-next. 2. Add Reviewed-by from Björn Töpel. Changes in v3: 1. Fix bug in s390. (Thanks to Ilya Leoshkevich). 2. Fix build error in riscv. (kernel test robot). Changes in v2: 1. Add missing changes in net/bpf/bpf_dummy_struct_ops.c. 2. Reduce one dry run in arch_prepare_bpf_trampoline. (Xu Kuohai) 3. Other small fixes. ==================== Link: https://lore.kernel.org/r/20231206224054.492250-1-song@kernel.org Signed-off-by: Alexei Starovoitov commit 3ba026fca8786161b0c4d75be396e61d6816e0a1 Author: Song Liu Date: Wed Dec 6 14:40:54 2023 -0800 x86, bpf: Use bpf_prog_pack for bpf trampoline There are three major changes here: 1. Add arch_[alloc|free]_bpf_trampoline based on bpf_prog_pack; 2. Let arch_prepare_bpf_trampoline handle ROX input image, this requires arch_prepare_bpf_trampoline allocating a temporary RW buffer; 3. Update __arch_prepare_bpf_trampoline() to handle a RW buffer (rw_image) and a ROX buffer (image). This part is similar to the image/rw_image logic in bpf_int_jit_compile(). Signed-off-by: Song Liu Acked-by: Ilya Leoshkevich Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20231206224054.492250-8-song@kernel.org Signed-off-by: Alexei Starovoitov commit 26ef208c209a0e6eed8942a5d191b39dccfa6e38 Author: Song Liu Date: Wed Dec 6 14:40:53 2023 -0800 bpf: Use arch_bpf_trampoline_size Instead of blindly allocating PAGE_SIZE for each trampoline, check the size of the trampoline with arch_bpf_trampoline_size(). This size is saved in bpf_tramp_image->size, and used for modmem charge/uncharge. The fallback arch_alloc_bpf_trampoline() still allocates a whole page because we need to use set_memory_* to protect the memory. struct_ops trampoline still uses a whole page for multiple trampolines. With this size check at caller (regular trampoline and struct_ops trampoline), remove arch_bpf_trampoline_size() from arch_prepare_bpf_trampoline() in archs. Also, update bpf_image_ksym_add() to handle symbol of different sizes. Signed-off-by: Song Liu Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich # on s390x Acked-by: Jiri Olsa Acked-by: Björn Töpel Tested-by: Björn Töpel # on riscv Link: https://lore.kernel.org/r/20231206224054.492250-7-song@kernel.org Signed-off-by: Alexei Starovoitov commit 96d1b7c081c0c96cbe8901045f4ff15a2e9974a2 Author: Song Liu Date: Wed Dec 6 14:40:52 2023 -0800 bpf: Add arch_bpf_trampoline_size() This helper will be used to calculate the size of the trampoline before allocating the memory. arch_prepare_bpf_trampoline() for arm64 and riscv64 can use arch_bpf_trampoline_size() to check the trampoline fits in the image. OTOH, arch_prepare_bpf_trampoline() for s390 has to call the JIT process twice, so it cannot use arch_bpf_trampoline_size(). Signed-off-by: Song Liu Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich # on s390x Acked-by: Jiri Olsa Acked-by: Björn Töpel Tested-by: Björn Töpel # on riscv Link: https://lore.kernel.org/r/20231206224054.492250-6-song@kernel.org Signed-off-by: Alexei Starovoitov commit 38b8b58ae776bf748bd1bd7a24c3fd1d10f76f45 Author: Song Liu Date: Wed Dec 6 14:40:51 2023 -0800 bpf, x86: Adjust arch_prepare_bpf_trampoline return value x86's implementation of arch_prepare_bpf_trampoline() requires BPF_INSN_SAFETY buffer space between end of program and image_end. OTOH, the return value does not include BPF_INSN_SAFETY. This doesn't cause any real issue at the moment. However, "image" of size retval is not enough for arch_prepare_bpf_trampoline(). This will cause confusion when we introduce a new helper arch_bpf_trampoline_size(). To avoid future confusion, adjust the return value to include BPF_INSN_SAFETY. Signed-off-by: Song Liu Acked-by: Ilya Leoshkevich Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20231206224054.492250-5-song@kernel.org Signed-off-by: Alexei Starovoitov commit 82583daa2efc2e336962b231a46bad03a280b3e0 Author: Song Liu Date: Wed Dec 6 14:40:50 2023 -0800 bpf: Add helpers for trampoline image management As BPF trampoline of different archs moves from bpf_jit_[alloc|free]_exec() to bpf_prog_pack_[alloc|free](), we need to use different _alloc, _free for different archs during the transition. Add the following helpers for this transition: void *arch_alloc_bpf_trampoline(unsigned int size); void arch_free_bpf_trampoline(void *image, unsigned int size); void arch_protect_bpf_trampoline(void *image, unsigned int size); void arch_unprotect_bpf_trampoline(void *image, unsigned int size); The fallback version of these helpers require size <= PAGE_SIZE, but they are only called with size == PAGE_SIZE. They will be called with size < PAGE_SIZE when arch_bpf_trampoline_size() helper is introduced later. Signed-off-by: Song Liu Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich # on s390x Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20231206224054.492250-4-song@kernel.org Signed-off-by: Alexei Starovoitov commit 7a3d9a159b178e87306a6e989071ed9a114a1a31 Author: Song Liu Date: Wed Dec 6 14:40:49 2023 -0800 bpf: Adjust argument names of arch_prepare_bpf_trampoline() We are using "im" for "struct bpf_tramp_image" and "tr" for "struct bpf_trampoline" in most of the code base. The only exception is the prototype and fallback version of arch_prepare_bpf_trampoline(). Update them to match the rest of the code base. We mix "orig_call" and "func_addr" for the argument in different versions of arch_prepare_bpf_trampoline(). s/orig_call/func_addr/g so they match. Signed-off-by: Song Liu Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich # on s390x Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20231206224054.492250-3-song@kernel.org Signed-off-by: Alexei Starovoitov commit f08a1c658257c73697a819c4ded3a84b6f0ead74 Author: Song Liu Date: Wed Dec 6 14:40:48 2023 -0800 bpf: Let bpf_prog_pack_free handle any pointer Currently, bpf_prog_pack_free only can only free pointer to struct bpf_binary_header, which is not flexible. Add a size argument to bpf_prog_pack_free so that it can handle any pointer. Signed-off-by: Song Liu Acked-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich # on s390x Reviewed-by: Björn Töpel Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20231206224054.492250-2-song@kernel.org Signed-off-by: Alexei Starovoitov commit 7065eefb38f16c91e9ace36fb7c873e4c9857c27 Author: Andrii Nakryiko Date: Wed Dec 6 11:09:20 2023 -0800 bpf: rename MAX_BPF_LINK_TYPE into __MAX_BPF_LINK_TYPE for consistency To stay consistent with the naming pattern used for similar cases in BPF UAPI (__MAX_BPF_ATTACH_TYPE, etc), rename MAX_BPF_LINK_TYPE into __MAX_BPF_LINK_TYPE. Also similar to MAX_BPF_ATTACH_TYPE and MAX_BPF_REG, add: #define MAX_BPF_LINK_TYPE __MAX_BPF_LINK_TYPE Not all __MAX_xxx enums have such #define, so I'm not sure if we should add it or not, but I figured I'll start with a completely backwards compatible way, and we can drop that, if necessary. Also adjust a selftest that used MAX_BPF_LINK_TYPE enum. Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231206190920.1651226-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 14b4b5fd3d7aac2f17800b821a0fac30d705a25d Author: Venkata Prasad Potturu Date: Wed Dec 6 16:36:18 2023 +0530 ASoC: amd: acp: Set bclk as source to set pll for rt5682s codec Some platforms doesn't have reference mclk pin to codec, so set bclk as a clk source for rt5682s codec pll in tdm mode. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20231206110620.1695591-7-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 2fcd3ab398260a113fd4434b4d72929066c73121 Author: Guixin Liu Date: Tue Dec 5 15:37:40 2023 +0800 nvme-fabrics: check ioccsz and iorcsz Make sure that ioccsz and iorcsz returned by target are correct before use it. Per 2.0a base NVMe spec: I/O Queue Command Capsule Supported Size (IOCCSZ): This field defines the maximum I/O command capsule size in 16 byte units. The minimum value that shall be indicated is 4 corresponding to 64 bytes. Signed-off-by: Guixin Liu Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 68999d1dd23a71b991a36201db29c8787f35a23f Author: Guixin Liu Date: Tue Dec 5 15:37:39 2023 +0800 nvme: introduce nvme_check_ctrl_fabric_info helper Inroduce nvme_check_ctrl_fabric_info helper to check fabric controller info returned by target. Signed-off-by: Guixin Liu Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 18dfb0e4c3c3cd5654182833bcf3dfdcef754e6e Author: Rafael J. Wysocki Date: Tue Dec 5 13:26:59 2023 +0100 thermal: sysfs: Rework the reading of trip point attributes Rework the _show() callback functions for the trip point temperature, hysteresis and type attributes to avoid copying the values of struct thermal_trip fields that they do not use and make them carry out the same validation checks as the corresponding _store() callback functions. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Daniel Lezcano commit be0a3600aa1ebe9d23243c91d41ab1a2d5091a9b Author: Rafael J. Wysocki Date: Tue Dec 5 13:24:08 2023 +0100 thermal: sysfs: Rework the handling of trip point updates Both trip_point_temp_store() and trip_point_hyst_store() use thermal_zone_set_trip() to update a given trip point, but none of them actually needs to change more than one field in struct thermal_trip representing it. However, each of them effectively calls __thermal_zone_get_trip() twice in a row for the same trip index value, once directly and once via thermal_zone_set_trip(), which is not particularly efficient, and the way in which thermal_zone_set_trip() carries out the update is not particularly straightforward. Moreover, input processing need not be done under the thermal zone lock in any of these functions. Rework trip_point_temp_store() and trip_point_hyst_store() to address the above, move the part of thermal_zone_set_trip() that is still useful to a new function called thermal_zone_trip_updated() and drop the rest of it. While at it, make trip_point_hyst_store() reject negative hysteresis values. Signed-off-by: Rafael J. Wysocki Reviewed-by: Daniel Lezcano commit 0713ab3bd169da82c35eefd012b07b715e4ebcf7 Author: Ian Rogers Date: Wed Dec 6 10:35:33 2023 -0800 perf stat: Exit perf stat if parse groups fails Metrics were added by a callback but commit a4b8cfcabb1d90ec ("perf stat: Delay metric parsing") postponed this to allow optimizations based on the CPU configuration. In doing so it stopped errors in metric parsing from causing 'perf stat' termination. This change adds the termination for bad metric names back in. Fixes: a4b8cfcabb1d90ec ("perf stat: Delay metric parsing") Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Closes: https://lore.kernel.org/lkml/ZXByT1K6enTh2EHT@kernel.org/ Link: https://lore.kernel.org/r/20231206183533.972028-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e17768691dd8d0664413de3123621daa0504054c Author: Bokun Zhang Date: Wed Nov 29 19:11:22 2023 -0500 drm/amd/amdgpu: SRIOV full reset issue with VCN - After a full reset, VF's FB will be cleaned. This includes the VCN's fw_shared memory. However, there is no suspend-resume routine for SRIOV VF. Therefore, the data in the fw_shared memory will be lost forever and it causes engine hang later on. We must repopulate the data in fw_shared during SRIOV hw_init Signed-off-by: Bokun Zhang Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit c03581986234044f2eeae308b7840e0083981034 Author: Alex Deucher Date: Wed Nov 29 15:44:25 2023 -0500 drm/amdgpu: fix buffer funcs setting order on suspend We need to disable this after the last eviction call, but before we disable the SDMA IP. Fixes: b70438004a14 ("drm/amdgpu: move buffer funcs setting up a level") Link: https://lore.kernel.org/r/87edgv4x3i.fsf@vps.thesusis.net Reviewed-by: Luben Tuikov Tested-by: Phillip Susi Signed-off-by: Alex Deucher Cc: Phillip Susi Cc: Luben Tuikov commit b12fb2953915b092aaef956f6e80783fa70b9f40 Author: Lijo Lazar Date: Thu Nov 30 16:35:58 2023 +0530 drm/amdgpu: Avoid querying DRM MGCG status MP0 v13.0.6 SOCs don't support DRM MGCG. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 828afefd4b0636d92386d4b2c1f53fff87505aba Author: Lijo Lazar Date: Thu Nov 30 15:58:21 2023 +0530 drm/amdgpu: Update HDP 4.4.2 clock gating flags HDP 4.4.2 clockgating is enabled by default, update the flags accordingly. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 6146081d58e3dd0c50ceb5a70a6906640727ff96 Author: Lijo Lazar Date: Wed Nov 29 12:37:34 2023 +0530 drm/amdgpu: Add NULL checks for function pointers Check if function is implemented before making the call. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 44f3356e36c2082f0f91c4f6b8859c577cee14a4 Author: Tom St Denis Date: Fri Nov 24 08:32:06 2023 -0500 drm/amd/amdgpu: Add SMUIO headers for 10.0.2 These were requested by a UMR user for debugging purposes. Signed-off-by: Tom St Denis Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 28c28d7f77c06ac2c0b8f9c82bc04eba22912b3b Author: Zhipeng Lu Date: Mon Dec 4 18:21:54 2023 +0800 drm/radeon/trinity_dpm: fix a memleak in trinity_parse_power_table The rdev->pm.dpm.ps allocated by kcalloc should be freed in every following error-handling path. However, in the error-handling of rdev->pm.power_state[i].clock_info the rdev->pm.dpm.ps is not freed, resulting in a memleak in this function. Fixes: d70229f70447 ("drm/radeon/kms: add dpm support for trinity asics") Signed-off-by: Zhipeng Lu Signed-off-by: Alex Deucher commit 0737df9ed0997f5b8addd6e2b9699a8c6edba2e4 Author: Zhipeng Lu Date: Mon Dec 4 16:57:56 2023 +0800 drm/radeon/dpm: fix a memleak in sumo_parse_power_table The rdev->pm.dpm.ps allocated by kcalloc should be freed in every following error-handling path. However, in the error-handling of rdev->pm.power_state[i].clock_info the rdev->pm.dpm.ps is not freed, resulting in a memleak in this function. Fixes: 80ea2c129c76 ("drm/radeon/kms: add dpm support for sumo asics (v2)") Signed-off-by: Zhipeng Lu Signed-off-by: Alex Deucher commit 4657b3e45683223b5d982ec13a6e2cd367004bb6 Author: Lijo Lazar Date: Wed Nov 29 18:06:55 2023 +0530 drm/amdgpu: Restrict extended wait to PSP v13.0.6 Only PSPv13.0.6 SOCs take a longer time to reach steady state. Other PSPv13 based SOCs don't need extended wait. Also, reduce PSPv13.0.6 wait time. Cc: stable@vger.kernel.org Fixes: fc5988907156 ("drm/amdgpu: update retry times for psp vmbx wait") Fixes: d8c1925ba8cd ("drm/amdgpu: update retry times for psp BL wait") Link: https://lore.kernel.org/amd-gfx/34dd4c66-f7bf-44aa-af8f-c82889dd652c@amd.com/ Signed-off-by: Lijo Lazar Reviewed-by: Asad Kamal Reviewed-by: Mario Limonciello Signed-off-by: Alex Deucher commit 3b35dd87c5969637ab5aa6666bbab6e6929c9e16 Author: Aurabindo Pillai Date: Thu Nov 30 16:53:21 2023 -0500 drm/amd: Add a DC debug mask for DML2 [Why&How] To enable testing/development of DML2, expose a new debug mask for future use. Signed-off-by: Aurabindo Pillai Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 650f0487d6cd95c4e07a41d3a464d0f60a983a15 Author: Lijo Lazar Date: Sat Oct 7 19:52:11 2023 +0530 drm/amdgpu: Read aquavanjaram USR register state Add support to read state of USR links in aquavanjaram SOC. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 13ac7c0e30e87e006cfad67ce4337268f65d4333 Author: Lijo Lazar Date: Sat Oct 7 16:53:24 2023 +0530 drm/amdgpu: Read aquavanjaram WAFL register state Add support to read state of WAFL links in aquavanjaram SOC. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 72ada8603e36291ad91e4f40f10ef742ef79bc4e Author: Alex Deucher Date: Thu Nov 30 17:34:07 2023 -0500 drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml Does the same thing as: commit 6740ec97bcdb ("drm/amd/display: Increase frame warning limit with KASAN or KCSAN in dml2") Reviewed-by: Harry Wentland Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311302107.hUDXVyWT-lkp@intel.com/ Fixes: 67e38874b85b ("drm/amd/display: Increase num voltage states to 40") Signed-off-by: Alex Deucher Cc: Alvin Lee Cc: Hamza Mahfooz Cc: Samson Tam Cc: Harry Wentland commit 7a2464fac80d42f6f8819fed97a553e9c2f43310 Author: Yang Yingliang Date: Thu Nov 30 15:50:16 2023 +0800 drm/radeon: check the alloc_workqueue return value in radeon_crtc_init() check the alloc_workqueue return value in radeon_crtc_init() to avoid null-ptr-deref. Fixes: fa7f517cb26e ("drm/radeon: rework page flip handling v4") Signed-off-by: Yang Yingliang Signed-off-by: Alex Deucher commit 04a71f110446eb6ffdaaa13407b4c1bf286db760 Author: Yang Wang Date: Mon Dec 4 10:44:32 2023 +0800 drm/amdgpu: optimize the printing order of error data sort error data list to optimize the printing order. Signed-off-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 71a9d7a2a1034e72074335ac2aff4f9b8013ae6c Author: Hawking Zhang Date: Mon Nov 20 10:43:02 2023 +0800 drm/amdgpu: Update fw version for boot time error query Boot time error query is not available until fw a10109 Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 0d65efcbe350f1e9e96f24905df4929188e80d56 Author: Yang Wang Date: Mon Dec 4 10:17:57 2023 +0800 drm/amd/pm: support new mca smu error code decoding support new mca smu error code decoding from smu 85.86.0 for smu v13.0.6 Signed-off-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 24d29d5b189590497947510046eb685e5e2452b6 Author: Li Ma Date: Tue Nov 14 16:17:51 2023 +0800 drm/amd/swsmu: update smu v14_0_0 driver if version and metrics table Increment the driver if version and add new mems to the mertics table. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Signed-off-by: Alex Deucher commit c0c22ed7c9fd6e6d50f61ed7347e60342e958e6f Author: Aric Cyr Date: Fri Dec 1 06:25:43 2023 -0700 drm/amd/display: 3.2.263 This version brings along following fixes: * Enable writeback. * Add multiple fixes for DML2 and DCN35. * Introduce small code style adjustments. Acked-by: Rodrigo Siqueira Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher commit 107d678f6aecb4421975a25127b6bf521504b39e Author: Rodrigo Siqueira Date: Fri Dec 1 06:25:42 2023 -0700 drm/amd/display: Update code comment to be more accurate Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d3e78612e949e16088b6ee83647b28499c24954d Author: Rodrigo Siqueira Date: Fri Dec 1 06:25:41 2023 -0700 drm/amd/display: Adjust code style This simple commit adjusts part of the code style in some of the dc bios files. Tested-by: Daniel Wheeler Reviewed-by: Aurabindo Pillai Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 514a1cc940c264007805c02173dd5490c0a59f48 Author: Roman Li Date: Fri Dec 1 06:25:40 2023 -0700 drm/amd/display: Fix array-index-out-of-bounds in dml2 [Why] UBSAN errors observed in dmesg. array-index-out-of-bounds in dml2/display_mode_core.c [How] Fix the index. Tested-by: Daniel Wheeler Acked-by: Rodrigo Siqueira Signed-off-by: Roman Li Signed-off-by: Alex Deucher commit 87ce0e62694115cfe4210a17c269d6855d2a139b Author: Alex Hung Date: Fri Dec 1 06:25:39 2023 -0700 drm/amd/display: Disable DWB frame capture to emulate oneshot [WHY] drm_writeback requires to capture exact one frame in each writeback call. [HOW] frame_capture is disabled after each writeback is completed. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 50ad10cba6cd1c7f0ac9049f2c2c6b7589b510d0 Author: Alex Hung Date: Fri Dec 1 06:25:38 2023 -0700 drm/amd/display: Add new set_fc_enable to struct dwbc_funcs [WHAT] Add a function to enable and disable DWB's frame captures. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit fdf43d25e38f9e6e6a3cdb15335c198fb6d5dcb9 Author: Alex Hung Date: Fri Dec 1 06:25:37 2023 -0700 drm/amd/display: Setup for mmhubbub3_warmup_mcif with big buffer [WHY] Hardware may require different warmup approaches - big buffer or individual buffers. [HOW] Setup warmup for big buffer when it is required by specific hardware. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit f872e2f5f0beabd34c03799a5c597f6ba47b51cc Author: Alex Hung Date: Fri Dec 1 06:25:36 2023 -0700 drm/amd/display: Add writeback enable field (wb_enabled) [WHAT] Add a new field to keep track whether a crtc is previously writeback-enabled. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit ab37b88ed9de9de8d582683f7ea17059f1251a7f Author: Alex Hung Date: Fri Dec 1 06:25:35 2023 -0700 drm/amd/display: Fix writeback_info is not removed [WHY] Counter j was not updated to present the num of writeback_info when writeback pipes are removed. [HOW] update j (num of writeback info) under the correct condition. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 86ecd796a88e26e025f184ff6a2e8872a6dc9ac7 Author: Alex Hung Date: Fri Dec 1 06:25:34 2023 -0700 drm/amd/display: Validate hw_points_num before using it [WHAT] hw_points_num is 0 before ogam LUT is programmed; however, function "dwb3_program_ogam_pwl" assumes hw_points_num is always greater than 0, i.e. substracting it by 1 as an array index. [HOW] Check hw_points_num is not equal to 0 before using it. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit c09919e6ea5fefd49d8b7b54aa5b222937163108 Author: Alex Hung Date: Fri Dec 1 06:25:33 2023 -0700 drm/amd/display: Fix writeback_info never got updated [WHY] wb_enabled field is set to false before it is used, and the following code will never be executed. [HOW] Setting wb_enable to false after all removal work is completed. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit f772f902b28662188636faba88e2a10bdb08e128 Author: Alex Hung Date: Fri Dec 1 06:25:32 2023 -0700 drm/amd/display: Add writeback enable/disable in dc [WHAT] The enable and disable writeback calls need to be included in the coressponding functions in dc_stream. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit c81e13b929df2fd16dce87ac36672978f10eae1c Author: Alex Hung Date: Fri Dec 1 06:25:31 2023 -0700 drm/amd/display: Hande writeback request from userspace [WHAT] Handle writeback requests and fill in the required information for DWB programming and setup. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 1fb9d7b975baba081724be8ff6370b1a71a8aea4 Author: Harry Wentland Date: Fri Dec 1 06:25:30 2023 -0700 drm/amd/display: Create fake sink and stream for writeback connector [WHAT] Writeback connectors don't have a physical sink but DC still needs a sink to function. Create a fake sink and stream for writeback connectors Tested-by: Daniel Wheeler Reviewed-by: Alex Hung Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit ff73d4cdde18bc4607ff10c53351715ee1164be0 Author: Harry Wentland Date: Fri Dec 1 06:25:29 2023 -0700 drm/amd/display: Create amdgpu_dm_wb_connector [WHY] We need to track the dc_link and it would get confusing if re-using the amdgpu_dm_connector. [HOW] Creating new amdgpu_dm_wb_connector. Tested-by: Daniel Wheeler Reviewed-by: Alex Hung Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit dbf5d3d02987faa0eec3710dd687cd912362d7b5 Author: Alex Hung Date: Fri Dec 1 06:25:28 2023 -0700 drm/amd/display: Check writeback connectors in create_validate_stream_for_sink [WHY & HOW] This is to check connector type to avoid unhandled null pointer for writeback connectors. Tested-by: Daniel Wheeler Fixes: 60e034f28600 ("drm/amd/display: Revert "drm/amd/display: Use drm_connector in create_validate_stream_for_sink"") Signed-off-by: Alex Hung Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 3e094a2875260543ca74838decc0c995d3765096 Author: Harry Wentland Date: Fri Dec 1 06:25:27 2023 -0700 drm/amd/display: Use drm_connector in create_stream_for_sink [WHAT] We need to use this function for both amdgpu_dm_connectors and drm_writeback_connectors. Modify it to operate on a drm_connector as a common base. Tested-by: Daniel Wheeler Reviewed-by: Alex Hung Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 748b091d641638e68330b1b24195eaba9aadf997 Author: Harry Wentland Date: Fri Dec 1 06:25:26 2023 -0700 drm/amd/display: Return drm_connector from find_first_crtc_matching_connector [WHY] We will be dealing with two types of connector: amdgpu_dm_connector and drm_writeback_connector. [HOW] We want to find both and then cast to the appriopriate type afterwards. Tested-by: Daniel Wheeler Reviewed-by: Alex Hung Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 7db7ade270ae8e177cc8bd09753745e7c2dc92e7 Author: Harry Wentland Date: Fri Dec 1 06:25:25 2023 -0700 drm/amd/display: Skip writeback connector when we get amdgpu_dm_connector [WHY] Writeback connectors are based on a different object: drm_writeback_connector, and are therefore different from amdgpu_dm_connector. We need to be careful to ensure code designed for amdgpu_dm_connector doesn't inadvertently try to operate on a drm_writeback_connector. [HOW] Skip them when connector type is DRM_MODE_CONNECTOR_WRITEBACK. Tested-by: Daniel Wheeler Reviewed-by: Alex Hung Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit dfc03588cf8ce2af8ef810cd226dc98ee4fbac38 Author: Alex Hung Date: Fri Dec 1 06:25:24 2023 -0700 drm/amd/display: Initialize writeback connector [WHAT] Create a drm_writeback_connector when connector signal equals SIGNAL_TYPE_VIRTUAL. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 198891fd2902fba155fe23f8ad27c9cf8cd8286d Author: Harry Wentland Date: Fri Dec 1 06:25:23 2023 -0700 drm/amd/display: Create one virtual connector in DC [WHAT] Prepare a virtual connector for writeback. Tested-by: Daniel Wheeler Reviewed-by: Alex Hung Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 80af8859b46d1fa386871f71bad95db9ff50ad62 Author: Harry Wentland Date: Fri Dec 1 06:25:22 2023 -0700 drm/amd/display: Skip entire amdgpu_dm build if !CONFIG_DRM_AMD_DC [WHY] Previously this only excluded build for a few amdgpu_dm binaries which makes no sense. [HOW] Wrap the entire Makefile in "ifneq ($(CONFIG_DRM_AMD_DC),)" Tested-by: Daniel Wheeler Reviewed-by: Alex Hung Signed-off-by: Harry Wentland Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit b6411638c026fde33046f5515a5a7d37af1da146 Author: Alex Hung Date: Fri Dec 1 06:25:21 2023 -0700 drm/amd/display: Avoid virtual stream encoder if not explicitly requested Virtual stream encoder should not be a free match for thunderbolt or usbc, and thus should be avoided. Tested-by: Daniel Wheeler Reviewed-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Hung Signed-off-by: Alex Deucher commit 08a32addf17317b9fac55be9b31275cbf6e41fb7 Author: Wenjing Liu Date: Fri Dec 1 06:25:20 2023 -0700 drm/amd/display: add support for DTO genarated dscclk Current implementation will choose to use refclk as dscclk. This is not recommended by hardware team as refclk is a fixed value which could cause unnecessary power consumption or it could be not enough for large DSC timings. So we are adding new interfaces so we could switch to use dynamically generated DSCCLK by DTO. So DSCCLK is programmable based on current pixel clock and dispclk. Tested-by: Daniel Wheeler Reviewed-by: Chaitanya Dhere Acked-by: Rodrigo Siqueira Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit dd5c6362ddcd8bdb07704faff8648593885ecfa1 Author: Dennis Chan Date: Fri Dec 1 06:25:19 2023 -0700 drm/amd/display: Fix Replay Desync Error IRQ handler In previous case, Replay didn't identify the IRQ type, This commit fixes the issues for the interrupt. Tested-by: Daniel Wheeler Reviewed-by: Robin Chen Acked-by: Rodrigo Siqueira Signed-off-by: Dennis Chan Signed-off-by: Alex Deucher commit abd26a3252cbd1a3ae4e46d37596d176fe50b41a Author: Dillon Varone Date: Fri Dec 1 06:25:18 2023 -0700 drm/amd/display: Add dml2 copy functions Add function to handle deep copying dml2 context. Tested-by: Daniel Wheeler Reviewed-by: Chaitanya Dhere Acked-by: Rodrigo Siqueira Signed-off-by: Dillon Varone Signed-off-by: Alex Deucher commit cfa96a14e89d8341a7308acc4c6168991d4fdac0 Author: Yihan Zhu Date: Fri Dec 1 06:25:17 2023 -0700 drm/amd/display: add MPC MCM 1D LUT clock gating programming Missing clock gating programming blocks memory power on from boot up. Tested-by: Daniel Wheeler Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Yihan Zhu Signed-off-by: Alex Deucher commit 21afc872fbc29cd68cfde816d1df4d55848c3f61 Author: Ivan Lipski Date: Fri Dec 1 06:25:16 2023 -0700 drm/amd/display: Add monitor patch for specific eDP [WHY] Some eDP panels's ext caps don't write initial value cause the value of dpcd_addr(0x317) is random. It means that sometimes the eDP will clarify it is OLED, miniLED...etc cause the backlight control interface is incorrect. [HOW] Add a new panel patch to remove sink ext caps(HDR,OLED...etc) Tested-by: Daniel Wheeler Reviewed-by: Sun peng Li Acked-by: Rodrigo Siqueira Signed-off-by: Ivan Lipski Signed-off-by: Alex Deucher commit 2ce156482a6fef349d2eba98e5070c412d3af662 Author: Nicholas Susanto Date: Fri Dec 1 06:25:15 2023 -0700 drm/amd/display: Fix disable_otg_wa logic [Why] When switching to another HDMI mode, we are unnecesarilly disabling/enabling FIFO causing both HPO and DIG registers to be set at the same time when only HPO is supposed to be set. This can lead to a system hang the next time we change refresh rates as there are cases when we don't disable OTG/FIFO but FIFO is enabled when it isn't supposed to be. [How] Removing the enable/disable FIFO entirely. Tested-by: Daniel Wheeler Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Susanto Signed-off-by: Alex Deucher commit d3586c707b8f64cbe5b778cfe59ac4b8a4be0d3b Author: Charlene Liu Date: Fri Dec 1 06:25:14 2023 -0700 drm/amd/display: keep domain24 power on if eDP not exist This is w/a: we need to keep domain 24 power up in driver side, and let dmubfw handle it for S0i3. For last display unplugged, if OTG in PG, no interrupt call back coming. Tested-by: Daniel Wheeler Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Charlene Liu Signed-off-by: Alex Deucher commit 43484c4bdb6eb2f74cec61e4e7cfcb6ce8e69e2f Author: Relja Vojvodic Date: Fri Dec 1 06:25:13 2023 -0700 drm/amd/display: Added delay to DPM log HW registers were being read to quickly, causing incorrect values to be logged after a clock frequency was changed Tested-by: Daniel Wheeler Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Relja Vojvodic Signed-off-by: Alex Deucher commit e6ae4c47e8f8941fde115434fd8884e4e972cf6b Author: Nicholas Kazlauskas Date: Fri Dec 1 06:25:12 2023 -0700 drm/amd/display: Pass debug watermarks through to DCN35 DML2 [Why] The DC debug options currently do not function for dynamically adjusting our watermarks. [How] Hook them up before passing them to DML2. Also make sure we're using dc->bb_overrides since dc->debug isn't populated during dc_construct. Tested-by: Daniel Wheeler Reviewed-by: Michael Strauss Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit c59397eff9439bbc8b9a9835142e99ea0abf9cde Author: Charlene Liu Date: Fri Dec 1 06:25:11 2023 -0700 drm/amd/display: revert removing otg toggle w/a back when no active display w/a use case: - dual display, compliance, toggling between the displays - switching between 120Hz 420 -> 144Hz 444 and vice versa - switching between 144Hz -> 60Hz TMDS or vice versa It'd typically involve TMDS in some capacity since that's the only link signal we leave the OTG running but DIO/PHY off you can hit this in cases where you have multiple displays as well it syncs with the first active OTG, so if you had OTG[0] mapped and FIFO off you'd hit it even if OTG[1] was mapped and had FIFO Tested-by: Daniel Wheeler Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Charlene Liu Signed-off-by: Alex Deucher commit d218291579de53fad8242ad1ae732604de25b635 Author: Chris Park Date: Fri Dec 1 06:25:10 2023 -0700 drm/amd/display: Update BIOS FW info table revision [Why] BIOS FW info version 3.5 is introduced to support new ASICs, but it's content is currently same as 3.4. [How] Include minor version 5 in parsing to enable support. Tested-by: Daniel Wheeler Reviewed-by: Dillon Varone Acked-by: Rodrigo Siqueira Signed-off-by: Chris Park Signed-off-by: Alex Deucher commit d24e50e1005fd584e0fea138aa153349e13b4d94 Author: George Shen Date: Fri Dec 1 06:25:09 2023 -0700 drm/amd/display: Skip DPIA-specific DP LL automation flag for non-DPIA links [Why] The is_automated flag logic only applies to USB4 DPIA links during DP LL compliance test automation. The flag should not be set for non-DPIA cases. [How] Add check for DPIA link endpoint type before setting the flag. Also, rename is_automated to skip_fallback_on_link_loss for clarity. Tested-by: Daniel Wheeler Reviewed-by: Meenakshikumar Somasundaram Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira Signed-off-by: George Shen Signed-off-by: Alex Deucher commit 2cbed167d2698f10a67f47f14aaac7d498f6dfb7 Author: Johnson Chen Date: Fri Dec 1 06:25:08 2023 -0700 drm/amd/display: Fix null pointer Add guard for NULL pointer access Tested-by: Daniel Wheeler Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Johnson Chen Signed-off-by: Alex Deucher commit 823423b8ec7b56e22dad83e171c9ca6418679169 Author: Alvin Lee Date: Fri Dec 1 06:25:07 2023 -0700 drm/amd/display: Use channel_width = 2 for vram table 3.0 VBIOS has suggested to use channel_width=2 for any ASIC that uses vram info 3.0. This is because channel_width in the vram table no longer represents the memory width Tested-by: Daniel Wheeler Reviewed-by: Samson Tam Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 94bbf802efd0a8f13147d6664af6e653637340a8 Author: Ilya Bakoulin Date: Fri Dec 1 06:25:06 2023 -0700 drm/amd/display: Fix MST PBN/X.Y value calculations Changing PBN calculation to be more in line with spec. We don't need to inflate PBN_NATIVE value by the 1.006 margin, since that is already taken care of in the get_pbn_per_slot function. Tested-by: Daniel Wheeler Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira Signed-off-by: Ilya Bakoulin Signed-off-by: Alex Deucher commit 23cf5a5cd33a518b6bdbe9966dc49f1cf6bfe532 Author: Charlene Liu Date: Fri Dec 1 06:25:05 2023 -0700 drm/amd/display: insert drv-pmfw log + rollback to new context Rollback to new context for active display: this was previous tested sequence. Avoid to do OTG master toggle is no active display at all, this w/a was for fifo err. Tested-by: Daniel Wheeler Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Charlene Liu Signed-off-by: Alex Deucher commit ab779466166348eecf17d20f620aa9a47965c934 Author: Josip Pavic Date: Fri Dec 1 06:25:04 2023 -0700 drm/amd/display: Increase scratch buffer size [Why] Larger data blocks are expected to be transferred between driver and FW in the future. [How] Embiggen the scratch buffer to a cromulent size. Tested-by: Daniel Wheeler Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Josip Pavic Signed-off-by: Alex Deucher commit d5df648ec830cfd775bdacb3a3640c1e16de90f2 Author: Krunoslav Kovac Date: Fri Dec 1 06:25:03 2023 -0700 drm/amd/display: Change dither policy for 10bpc to round We use spatial dither by default for all output bpc (6/8/10). While it makes some sense for FP16, for ARGB2101010 surfaces it makes little sense as even if we skip color pipeline to preserve bit accuracy, spatial dither adds random noise so a few percent pixels are 1 bit off. This commit chages the 10bpc out dither policy to rounding. Also, in Polaris/Vega times, policy used to be round for 10bpc out; it looks like it got inadvertently changed for Navi. Difference is only detectable with capture cards. Tested-by: Daniel Wheeler Reviewed-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Krunoslav Kovac Signed-off-by: Alex Deucher commit b17ef04bf3a4346d66404454d6a646343ddc9749 Author: Lewis Huang Date: Fri Dec 1 06:25:02 2023 -0700 drm/amd/display: Pass pwrseq inst for backlight and ABM [Why] OTG inst and pwrseq inst mapping is not align therefore we cannot use otg_inst as pwrseq inst to get DCIO register. [How] 1. Pass the correct pwrseq instance to dmub when set abm pipe. 2. LVTMA control index change from panel_inst to pwrseq_inst. Tested-by: Daniel Wheeler Reviewed-by: Phil Hsieh Acked-by: Rodrigo Siqueira Signed-off-by: Lewis Huang Signed-off-by: Alex Deucher commit 62fbfdbbe3a1f188a6310d9418956b918840cd33 Author: Daniel Miess Date: Fri Dec 1 06:25:01 2023 -0700 drm/amd/display: Add missing dcn35 RCO registers [Why] Some registers needed for root clock gating in dcn35 are not defined in the dccg header. [How] Add the needed registers and temporarily disable some register writes that are now taking place successfully until the registers can be properly enabled. Tested-by: Daniel Wheeler Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Daniel Miess Signed-off-by: Alex Deucher commit a546a27684407942604bccdf3b62f0765c0f6399 Author: Xiaogang Chen Date: Fri Dec 1 23:38:12 2023 -0600 drm/amdkfd: Use partial migrations/mapping for GPU/CPU page faults in SVM This patch implements partial migration/mapping for gpu/cpu page faults in SVM according to migration granularity(default 2MB). A svm range may include pages from both system ram and vram of one gpu now. These chagnes are expected to improve migration performance and reduce mmu callback and TLB flush workloads. Signed-off-by: Xiaogang Chen Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit fa745b554733ff0ed9ff918a0a53267300444c88 Author: Michael Strauss Date: Fri Dec 1 06:25:00 2023 -0700 drm/amd/display: Only enumerate top local sink as DP2 output [WHY] Many DCN generations only have two HPO link encoders and therefore only support driving a max of two DP2 PHYs. DP2 MST hubs currently can not pass 3x display validation as each downstream sink is enumerated as separate DP2 output. [HOW] Count MST hubs once by treating only 1st remote sink in topology as an encoder. Tested-by: Daniel Wheeler Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Michael Strauss Signed-off-by: Alex Deucher commit dd2c5fac91d46df9dc1bf025ef23eff4704bd85f Author: Relja Vojvodic Date: Fri Dec 1 06:24:59 2023 -0700 drm/amd/display: Add ODM check during pipe split/merge validation [why] When querying DML for a vlevel after pipes have been split or merged the ODM policy would revert to a default policy, which could cause the query to use the incorrect ODM status. In this case ODM 2to1 was validated, but the last DML query would assume no ODM and return the incorrect vlevel. [how] Added ODM check to apply the correct ODM policy before querying DML. Tested-by: Daniel Wheeler Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Relja Vojvodic Signed-off-by: Alex Deucher commit 885c71ad791c1709f668a37f701d33e6872a902f Author: Charlene Liu Date: Fri Dec 1 06:24:58 2023 -0700 drm/amd/display: initialize all the dpm level's stutter latency Fix issue when override level bigger than default. Levels 5, 6, and 7 had zero stutter latency, this is because override level being initialized after stutter latency inits. Tested-by: Daniel Wheeler Reviewed-by: Syed Hassan Reviewed-by: Allen Pan Acked-by: Rodrigo Siqueira Signed-off-by: Charlene Liu Signed-off-by: Alex Deucher commit e57cd73f971194e94bc42d57b9fcb184c93a8754 Author: Alvin Lee Date: Fri Dec 1 06:24:57 2023 -0700 drm/amd/display: Optimize fast validation cases Optimize fast validation cases to only validate the highest voltage level. This works because during fast validation we only care if the mode can be supported or not (at any vlevel). Tested-by: Daniel Wheeler Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit d5e78f1c2611e22204490b679d962d8f51762969 Author: Bokun Zhang Date: Wed Nov 29 19:02:57 2023 -0500 drm/amd/amdgpu: Move vcn4 fw_shared init to a single function - Move VCN4's fw_shared initialization to a separated function. This way, the function can be reused at different locations. Signed-off-by: Bokun Zhang Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit fd2ef5fa3556549c565f5b7a07776d899a8ed8b7 Author: Jiadong Zhu Date: Fri Dec 1 08:38:15 2023 +0800 drm/amdgpu: disable MCBP by default Disable MCBP(mid command buffer preemption) by default as old Mesa hangs with it. We shall not enable the feature that breaks old usermode driver. Fixes: 50a7c8765ca6 ("drm/amdgpu: enable mcbp by default on gfx9") Signed-off-by: Jiadong Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 72d9b9747e78979510e9aafdd32eb99c7aa30dd1 Author: Prarit Bhargava Date: Mon Dec 4 13:00:37 2023 -0500 ACPI: extlog: fix NULL pointer dereference check The gcc plugin -fanalyzer [1] tries to detect various patterns of incorrect behaviour. The tool reports: drivers/acpi/acpi_extlog.c: In function ‘extlog_exit’: drivers/acpi/acpi_extlog.c:307:12: warning: check of ‘extlog_l1_addr’ for NULL after already dereferencing it [-Wanalyzer-deref-before-check] | | 306 | ((struct extlog_l1_head *)extlog_l1_addr)->flags &= ~FLAG_OS_OPTIN; | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~ | | | | | (1) pointer ‘extlog_l1_addr’ is dereferenced here | 307 | if (extlog_l1_addr) | | ~ | | | | | (2) pointer ‘extlog_l1_addr’ is checked for NULL here but it was already dereferenced at (1) | Fix the NULL pointer dereference check in extlog_exit(). Link: https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Static-Analyzer-Options.html # [1] Signed-off-by: Prarit Bhargava Signed-off-by: Rafael J. Wysocki commit e2ffcda1629012a2c1a3706432bc45fdc899a584 Author: Rafael J. Wysocki Date: Wed Nov 29 14:50:54 2023 +0100 ACPI: OSL: Allow Notify () handlers to run on all CPUs Notify () handlers, like GPE handlers, are only allowed to run on CPU0 now out of the concern that they might trigger an SMM trap leading to memory corruption. Namely, in some cases, SMM code might corrupt memory if not run on CPU0. However, Notify () handlers are registered by kernel code and they are not likely to evaluate AML that would trigger an SMM trap. In fact, many of them don't even evaluate any AML at all and even if they do, that AML may as well be evaluated in other code paths. In other words, they are not special from the AML evaluation perspective, so there is no real reason to treat them in any special way. Accordingly, allow Notify () handlers, unlike GPE handlers, to be executed by all CPUs in the system. Also adjust the allocation of the "notify" workqueue to allow multiple handlers to be executed at the same time, because they need not be serialized. Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko commit 3f3a2599374ede5ac47ca89981ff8dd8f304d915 Author: Rafael J. Wysocki Date: Wed Nov 29 14:48:22 2023 +0100 ACPI: OSL: Rearrange workqueue selection in acpi_os_execute() Replace the 3-branch if () statement used for selecting the target workqueue in acpi_os_execute() with a switch () one that is more suitable for this purpose and carry out the work item initialization before it to avoid code duplication. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko commit 392829ede37f36efa2e0f034631594786a9c8139 Author: Rafael J. Wysocki Date: Wed Nov 29 14:46:51 2023 +0100 ACPI: OSL: Rework error handling in acpi_os_execute() Reduce the number of checks and goto labels related to error handling in acpi_os_execute() and drop the status local variable, which turns out to be redundant, from it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko commit cf0573939d3f4ce822ceb742a8179f38697b1953 Author: Borislav Petkov (AMD) Date: Tue Nov 28 15:20:49 2023 +0100 Documentation: Begin a RAS section Add some initial RAS documentation. The expectation is for this to collect, among others, all the user-visible features for interaction with the RAS features of the kernel. Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231128142049.GTZWX3QQTSaQk/+u53@fat_crate.local commit ba3f5058db437d919f8468db50483dd9028ff688 Author: Dmitry Antipov Date: Tue Nov 28 05:52:10 2023 +0300 PNP: ACPI: fix fortify warning When compiling with gcc version 14.0.0 20231126 (experimental) and CONFIG_FORTIFY_SOURCE=y, I've noticed the following: In file included from ./include/linux/string.h:295, from ./include/linux/bitmap.h:12, from ./include/linux/cpumask.h:12, from ./arch/x86/include/asm/paravirt.h:17, from ./arch/x86/include/asm/cpuid.h:62, from ./arch/x86/include/asm/processor.h:19, from ./arch/x86/include/asm/cpufeature.h:5, from ./arch/x86/include/asm/thread_info.h:53, from ./include/linux/thread_info.h:60, from ./arch/x86/include/asm/preempt.h:9, from ./include/linux/preempt.h:79, from ./include/linux/spinlock.h:56, from ./include/linux/mmzone.h:8, from ./include/linux/gfp.h:7, from ./include/linux/slab.h:16, from ./include/linux/resource_ext.h:11, from ./include/linux/acpi.h:13, from drivers/pnp/pnpacpi/rsparser.c:11: In function 'fortify_memcpy_chk', inlined from 'pnpacpi_parse_allocated_vendor' at drivers/pnp/pnpacpi/rsparser.c:158:3, inlined from 'pnpacpi_allocated_resource' at drivers/pnp/pnpacpi/rsparser.c:249:3: ./include/linux/fortify-string.h:588:25: warning: call to '__read_overflow2_field' declared with attribute warning: detected read beyond size of field (2nd parameter); maybe use struct_group()? [-Wattribute-warning] 588 | __read_overflow2_field(q_size_field, size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ According to the comments in include/linux/fortify-string.h, 'memcpy()', 'memmove()' and 'memset()' must not be used beyond individual struct members to ensure that the compiler can enforce protection against buffer overflows, and, IIUC, this also applies to partial copies from the particular member ('vendor->byte_data' in this case). So it should be better (and safer) to do both copies at once (and 'byte_data' of 'struct acpi_resource_vendor_typed' seems to be a good candidate for '__counted_by(byte_length)' as well). Signed-off-by: Dmitry Antipov Reviewed-by: Kees Cook Signed-off-by: Rafael J. Wysocki commit 143176a46bdd3bfbe9ba2462bf94458e80d65ebf Author: Yuluo Qiu Date: Sun Nov 26 21:59:13 2023 +0800 ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop The Colorful X15 AT 23 ACPI video-bus device report spurious ACPI_VIDEO_NOTIFY_CYCLE events resulting in spurious KEY_SWITCHVIDEOMODE events being reported to userspace (and causing trouble there) when an external screen plugged in. 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. Signed-off-by: Yuluo Qiu Co-developed-by: Celeste Liu Signed-off-by: Celeste Liu Signed-off-by: Rafael J. Wysocki commit 310293a2b94197f3d75e65ab22672287a7938a00 Author: Srikar Srimath Tirumala Date: Thu Nov 23 17:44:33 2023 +0530 ACPI: processor: reduce CPUFREQ thermal reduction pctg for Tegra241 Current implementation of processor_thermal performs software throttling in fixed steps of "20%" which can be too coarse for some platforms. We observed some performance gain after reducing the throttle percentage. Change the CPUFREQ thermal reduction percentage and maximum thermal steps to be configurable. Also, update the default values of both for Nvidia Tegra241 (Grace) SoC. The thermal reduction percentage is reduced to "5%" and accordingly the maximum number of thermal steps are increased as they are derived from the reduction percentage. Signed-off-by: Srikar Srimath Tirumala Co-developed-by: Sumit Gupta Signed-off-by: Sumit Gupta Acked-by: Sudeep Holla Acked-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 4b3805daaacb2168665c6222f261e68accb120dc Author: Yuntao Wang Date: Mon Nov 20 19:41:43 2023 +0800 ACPI: tables: Correct and clean up the logic of acpi_parse_entries_array() The original intention of acpi_parse_entries_array() is to return the number of all matching entries on success. This number may be greater than the value of the max_entries parameter. When this happens, the function will output a warning message, indicating that `count - max_entries` matching entries remain unprocessed and have been ignored. However, commit 4ceacd02f5a1 ("ACPI / table: Always count matched and successfully parsed entries") changed this logic to return the number of entries successfully processed by the handler. In this case, when the max_entries parameter is not zero, the number of entries successfully processed can never be greater than the value of max_entries. In other words, the expression `count > max_entries` will always evaluate to false. This means that the logic in the final if statement will never be executed. Commit 99b0efd7c886 ("ACPI / tables: do not report the number of entries ignored by acpi_parse_entries()") mentioned this issue, but it tried to fix it by removing part of the warning message. This is meaningless because the pr_warn statement will never be executed in the first place. Commit 8726d4f44150 ("ACPI / tables: fix acpi_parse_entries_array() so it traverses all subtables") introduced an errs variable, which is intended to make acpi_parse_entries_array() always traverse all of the subtables, calling as many of the callbacks as possible. However, it seems that the commit does not achieve this goal. For example, when a handler returns an error, none of the handlers will be called again in the subsequent iterations. This result appears to be no different from before the change. This patch corrects and cleans up the logic of acpi_parse_entries_array(), making it return the number of all matching entries, rather than the number of entries successfully processed by handlers. Additionally, if an error occurs when executing a handler, the function will return -EINVAL immediately. This patch should not affect existing users of acpi_parse_entries_array(). Signed-off-by: Yuntao Wang Reviewed-by: Dave Jiang Signed-off-by: Rafael J. Wysocki commit 3232e7aad11e541da86bbb1fa5ea5737b30bd006 Author: Waiman Long Date: Tue Dec 5 17:21:14 2023 -0500 cgroup/cpuset: Include isolated cpuset CPUs in cpu_is_isolated() check Currently, the cpu_is_isolated() function checks only the statically isolated CPUs specified via the "isolcpus" and "nohz_full" kernel command line options. This function is used by vmstat and memcg to reduce interference with isolated CPUs by not doing stat flushing or scheduling works on those CPUs. Workloads running on isolated CPUs within isolated cpuset partitions should receive the same treatment to reduce unnecessary interference. This patch introduces a new cpuset_cpu_is_isolated() function to be called by cpu_is_isolated() so that the set of dynamically created cpuset isolated CPUs will be included in the check. Assuming that testing a bit in a cpumask is atomic, no synchronization primitive is currently used to synchronize access to the cpuset's isolated_cpus mask. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit ff5a698c0ffb08eee9c1ce0dfc79c91f273122d5 Author: Venkata Prasad Potturu Date: Wed Dec 6 16:36:18 2023 +0530 ASoC: amd: acp: Set bclk as source to set pll for rt5682s codec Some platforms doesn't have reference mclk pin to codec, so set bclk as a clk source for rt5682s codec pll in tdm mode. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20231206110620.1695591-7-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit e249839bf33f3f9727d6220536ed5c7d4f5bc31d Author: Venkata Prasad Potturu Date: Wed Dec 6 16:36:17 2023 +0530 ASoC: amd: acp: Enable dpcm_capture for MAX98388 codec Enable dpcm_capture for amplifier codec MAX98388 for reference stream capture in smart amplifier case. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20231206110620.1695591-6-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit e6a382cf7a69cc80e57978bbf0c7a674dfb09621 Author: Venkata Prasad Potturu Date: Wed Dec 6 16:36:16 2023 +0530 ASoC: amd: acp: Add i2s bt support for nau8821-max card Add i2s bt support for sof-nau8821-max sound card. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20231206110620.1695591-5-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 671dd2ffbd8b92e2228fa84ea4274a051b704dec Author: Venkata Prasad Potturu Date: Wed Dec 6 16:36:15 2023 +0530 ASoC: amd: acp: Add new cpu dai and dailink creation for I2S BT instance Add sof_bt cpu id and create dailink for i2s bt instance in acp common machine driver. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20231206110620.1695591-4-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit e12678141835c539fc17a2318ec4017a845935bd Author: Venkata Prasad Potturu Date: Wed Dec 6 16:36:14 2023 +0530 ASoC: amd: Remove extra dmi parameter Remove extra dmi_product_family entry in amd config entry table. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20231206110620.1695591-3-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit f18818eb0dbe0339c0efd02a34a3f5651749cb84 Author: Venkata Prasad Potturu Date: Wed Dec 6 16:36:13 2023 +0530 ASoC: amd: vangogh: Add condition check for acp config flag Add condition check for acp config flag to load legacy driver only. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20231206110620.1695591-2-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit c3ab23a10771bbe06300e5374efa809789c65455 Author: Venkata Prasad Potturu Date: Wed Dec 6 16:36:12 2023 +0530 ASoC: amd: Add new dmi entries for acp5x platform Add sys_vendor and product_name dmi entries for acp5x platform. Signed-off-by: Venkata Prasad Potturu Link: https://lore.kernel.org/r/20231206110620.1695591-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown commit 18f78b5e609b19b56237f0dae47068d44b8b0ecd Merge: 5cb475174cce1 07d33c2810bb5 Author: Mark Brown Date: Wed Dec 6 19:06:16 2023 +0000 spi: axi-spi-engine: improvements round 2 Merge series from David Lechner : We are working towards adding support for the offload feature [1] of the AXI SPI Engine IP core. Before we can do that, we want to make some general fixes and improvements to the driver. In order to avoid a giant series with 35+ patches, we are splitting this up into a few smaller series. This is a continuation of the work started in [2] which has been applied to spi/for-6.8 [3]. This series must be applied on top of that series to apply cleanly. Once this series is applied, we will follow up with the 3rd series that implements the offload support. The offload support will also involve the IIO subsystem (a new IIO driver will depend on the new SPI offload feature), so I'm mentioning this now in case we want to do anything ahead of time to prepare for that (e.g. putting all of these changes on a separate branch). [1]: https://wiki.analog.com/resources/fpga/peripherals/spi_engine/offload [2]: https://lore.kernel.org/linux-spi/20231117-axi-spi-engine-series-1-v1-0-cc59db999b87@baylibre.com/ [3]: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git/log/?h=for-6.8 commit c35919dcce2855d68cf45ffa427b8ea78e4f7c68 Merge: 3aee2bf9c49be 36fb94944b350 Author: Alexei Starovoitov Date: Wed Dec 6 10:03:00 2023 -0800 Merge branch 'bpf-token-and-bpf-fs-based-delegation' Andrii Nakryiko says: ==================== BPF token and BPF FS-based delegation This patch set introduces an ability to delegate a subset of BPF subsystem functionality from privileged system-wide daemon (e.g., systemd or any other container manager) through special mount options for userns-bound BPF FS to a *trusted* unprivileged application. Trust is the key here. This functionality is not about allowing unconditional unprivileged BPF usage. Establishing trust, though, is completely up to the discretion of respective privileged application that would create and mount a BPF FS instance with delegation enabled, as different production setups can and do achieve it through a combination of different means (signing, LSM, code reviews, etc), and it's undesirable and infeasible for kernel to enforce any particular way of validating trustworthiness of particular process. The main motivation for this work is a desire to enable containerized BPF applications to be used together with user namespaces. This is currently impossible, as CAP_BPF, required for BPF subsystem usage, cannot be namespaced or sandboxed, as a general rule. E.g., tracing BPF programs, thanks to BPF helpers like bpf_probe_read_kernel() and bpf_probe_read_user() can safely read arbitrary memory, and it's impossible to ensure that they only read memory of processes belonging to any given namespace. This means that it's impossible to have a mechanically verifiable namespace-aware CAP_BPF capability, and as such another mechanism to allow safe usage of BPF functionality is necessary.BPF FS delegation mount options and BPF token derived from such BPF FS instance is such a mechanism. Kernel makes no assumption about what "trusted" constitutes in any particular case, and it's up to specific privileged applications and their surrounding infrastructure to decide that. What kernel provides is a set of APIs to setup and mount special BPF FS instanecs and derive BPF tokens from it. BPF FS and BPF token are both bound to its owning userns and in such a way are constrained inside intended container. Users can then pass BPF token FD to privileged bpf() syscall commands, like BPF map creation and BPF program loading, to perform such operations without having init userns privileged. This version incorporates feedback and suggestions ([3]) received on v3 of this patch set, and instead of allowing to create BPF tokens directly assuming capable(CAP_SYS_ADMIN), we instead enhance BPF FS to accept a few new delegation mount options. If these options are used and BPF FS itself is properly created, set up, and mounted inside the user namespaced container, user application is able to derive a BPF token object from BPF FS instance, and pass that token to bpf() syscall. As explained in patch #3, BPF token itself doesn't grant access to BPF functionality, but instead allows kernel to do namespaced capabilities checks (ns_capable() vs capable()) for CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN, and CAP_SYS_ADMIN, as applicable. So it forms one half of a puzzle and allows container managers and sys admins to have safe and flexible configuration options: determining which containers get delegation of BPF functionality through BPF FS, and then which applications within such containers are allowed to perform bpf() commands, based on namespaces capabilities. Previous attempt at addressing this very same problem ([0]) attempted to utilize authoritative LSM approach, but was conclusively rejected by upstream LSM maintainers. BPF token concept is not changing anything about LSM approach, but can be combined with LSM hooks for very fine-grained security policy. Some ideas about making BPF token more convenient to use with LSM (in particular custom BPF LSM programs) was briefly described in recent LSF/MM/BPF 2023 presentation ([1]). E.g., an ability to specify user-provided data (context), which in combination with BPF LSM would allow implementing a very dynamic and fine-granular custom security policies on top of BPF token. In the interest of minimizing API surface area and discussions this was relegated to follow up patches, as it's not essential to the fundamental concept of delegatable BPF token. It should be noted that BPF token is conceptually quite similar to the idea of /dev/bpf device file, proposed by Song a while ago ([2]). The biggest difference is the idea of using virtual anon_inode file to hold BPF token and allowing multiple independent instances of them, each (potentially) with its own set of restrictions. And also, crucially, BPF token approach is not using any special stateful task-scoped flags. Instead, bpf() syscall accepts token_fd parameters explicitly for each relevant BPF command. This addresses main concerns brought up during the /dev/bpf discussion, and fits better with overall BPF subsystem design. This patch set adds a basic minimum of functionality to make BPF token idea useful and to discuss API and functionality. Currently only low-level libbpf APIs support creating and passing BPF token around, allowing to test kernel functionality, but for the most part is not sufficient for real-world applications, which typically use high-level libbpf APIs based on `struct bpf_object` type. This was done with the intent to limit the size of patch set and concentrate on mostly kernel-side changes. All the necessary plumbing for libbpf will be sent as a separate follow up patch set kernel support makes it upstream. Another part that should happen once kernel-side BPF token is established, is a set of conventions between applications (e.g., systemd), tools (e.g., bpftool), and libraries (e.g., libbpf) on exposing delegatable BPF FS instance(s) at well-defined locations to allow applications take advantage of this in automatic fashion without explicit code changes on BPF application's side. But I'd like to postpone this discussion to after BPF token concept lands. [0] https://lore.kernel.org/bpf/20230412043300.360803-1-andrii@kernel.org/ [1] http://vger.kernel.org/bpfconf2023_material/Trusted_unprivileged_BPF_LSFMM2023.pdf [2] https://lore.kernel.org/bpf/20190627201923.2589391-2-songliubraving@fb.com/ [3] https://lore.kernel.org/bpf/20230704-hochverdient-lehne-eeb9eeef785e@brauner/ v11->v12: - enforce exact userns match in bpf_token_capable() and bpf_token_allow_cmd() checks, for added strictness (Christian); v10->v11: - fix BPF FS root check to disallow using bind-mounted subdirectory of BPF FS instance (Christian); - further restrict BPF_TOKEN_CREATE command to be executed from inside exactly the same user namespace as the one used to create BPF FS instance (Christian); v9->v10: - slight adjustments in LSM parts (Paul); - setting delegate_xxx options require capable(CAP_SYS_ADMIN) (Christian); - simplify BPF_TOKEN_CREATE UAPI by accepting BPF FS FD directly (Christian); v8->v9: - fix issue in selftests due to sys/mount.h header (Jiri); - fix warning in doc comments in LSM hooks (kernel test robot); v7->v8: - add bpf_token_allow_cmd and bpf_token_capable hooks (Paul); - inline bpf_token_alloc() into bpf_token_create() to prevent accidental divergence with security_bpf_token_create() hook (Paul); v6->v7: - separate patches to refactor bpf_prog_alloc/bpf_map_alloc LSM hooks, as discussed with Paul, and now they also accept struct bpf_token; - added bpf_token_create/bpf_token_free to allow LSMs (SELinux, specifically) to set up security LSM blob (Paul); - last patch also wires bpf_security_struct setup by SELinux, similar to how it's done for BPF map/prog, though I'm not sure if that's enough, so worst case it's easy to drop this patch if more full fledged SELinux implementation will be done separately; - small fixes for issues caught by code reviews (Jiri, Hou); - fix for test_maps test that doesn't use LIBBPF_OPTS() macro (CI); v5->v6: - fix possible use of uninitialized variable in selftests (CI); - don't use anon_inode, instead create one from BPF FS instance (Christian); - don't store bpf_token inside struct bpf_map, instead pass it explicitly to map_check_btf(). We do store bpf_token inside prog->aux, because it's used during verification and even can be checked during attach time for some program types; - LSM hooks are left intact pending the conclusion of discussion with Paul Moore; I'd prefer to do LSM-related changes as a follow up patch set anyways; v4->v5: - add pre-patch unifying CAP_NET_ADMIN handling inside kernel/bpf/syscall.c (Paul Moore); - fix build warnings and errors in selftests and kernel, detected by CI and kernel test robot; v3->v4: - add delegation mount options to BPF FS; - BPF token is derived from the instance of BPF FS and associates itself with BPF FS' owning userns; - BPF token doesn't grant BPF functionality directly, it just turns capable() checks into ns_capable() checks within BPF FS' owning user; - BPF token cannot be pinned; v2->v3: - make BPF_TOKEN_CREATE pin created BPF token in BPF FS, and disallow BPF_OBJ_PIN for BPF token; v1->v2: - fix build failures on Kconfig with CONFIG_BPF_SYSCALL unset; - drop BPF_F_TOKEN_UNKNOWN_* flags and simplify UAPI (Stanislav). ==================== Link: https://lore.kernel.org/r/20231130185229.2688956-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 36fb94944b35062db15ab3059f4123048cac658c Author: Andrii Nakryiko Date: Thu Nov 30 10:52:29 2023 -0800 bpf,selinux: allocate bpf_security_struct per BPF token Utilize newly added bpf_token_create/bpf_token_free LSM hooks to allocate struct bpf_security_struct for each BPF token object in SELinux. This just follows similar pattern for BPF prog and map. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-18-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit dc5196fac40c2cb96330bcb98eef868a7fd225b3 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:28 2023 -0800 selftests/bpf: add BPF token-enabled tests Add a selftest that attempts to conceptually replicate intended BPF token use cases inside user namespaced container. Child process is forked. It is then put into its own userns and mountns. Child creates BPF FS context object. This ensures child userns is captured as the owning userns for this instance of BPF FS. Given setting delegation mount options is privileged operation, we ensure that child cannot set them. This context is passed back to privileged parent process through Unix socket, where parent sets up delegation options, creates, and mounts it as a detached mount. This mount FD is passed back to the child to be used for BPF token creation, which allows otherwise privileged BPF operations to succeed inside userns. We validate that all of token-enabled privileged commands (BPF_BTF_LOAD, BPF_MAP_CREATE, and BPF_PROG_LOAD) work as intended. They should only succeed inside the userns if a) BPF token is provided with proper allowed sets of commands and types; and b) namespaces CAP_BPF and other privileges are set. Lacking a) or b) should lead to -EPERM failures. Based on suggested workflow by Christian Brauner ([0]). [0] https://lore.kernel.org/bpf/20230704-hochverdient-lehne-eeb9eeef785e@brauner/ Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-17-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 1571740a9ba036f26cc5211a86021199987219e8 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:27 2023 -0800 libbpf: add BPF token support to bpf_prog_load() API Wire through token_fd into bpf_prog_load(). Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-16-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 1a8df7fa00aac35aff9ef1941c5334b3a01d09e4 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:26 2023 -0800 libbpf: add BPF token support to bpf_btf_load() API Allow user to specify token_fd for bpf_btf_load() API that wraps kernel's BPF_BTF_LOAD command. This allows loading BTF from unprivileged process as long as it has BPF token allowing BPF_BTF_LOAD command, which can be created and delegated by privileged process. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-15-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 37891cea6699200fb83eae464ebe1c0f73040474 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:25 2023 -0800 libbpf: add BPF token support to bpf_map_create() API Add ability to provide token_fd for BPF_MAP_CREATE command through bpf_map_create() API. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-14-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit ecd435143eb03611e25694141bf59d1c04ad5b9e Author: Andrii Nakryiko Date: Thu Nov 30 10:52:24 2023 -0800 libbpf: add bpf_token_create() API Add low-level wrapper API for BPF_TOKEN_CREATE command in bpf() syscall. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-13-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d734ca7b33dbf60eb15dcf7c44f3da7073356777 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:23 2023 -0800 bpf,lsm: add BPF token LSM hooks Wire up bpf_token_create and bpf_token_free LSM hooks, which allow to allocate LSM security blob (we add `void *security` field to struct bpf_token for that), but also control who can instantiate BPF token. This follows existing pattern for BPF map and BPF prog. Also add security_bpf_token_allow_cmd() and security_bpf_token_capable() LSM hooks that allow LSM implementation to control and negate (if necessary) BPF token's delegation of a specific bpf_cmd and capability, respectively. Acked-by: Paul Moore Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-12-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 66d636d70a79c1d37e3eea67ab50969e6aaef983 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:22 2023 -0800 bpf,lsm: refactor bpf_map_alloc/bpf_map_free LSM hooks Similarly to bpf_prog_alloc LSM hook, rename and extend bpf_map_alloc hook into bpf_map_create, taking not just struct bpf_map, but also bpf_attr and bpf_token, to give a fuller context to LSMs. Unlike bpf_prog_alloc, there is no need to move the hook around, as it currently is firing right before allocating BPF map ID and FD, which seems to be a sweet spot. But like bpf_prog_alloc/bpf_prog_free combo, make sure that bpf_map_free LSM hook is called even if bpf_map_create hook returned error, as if few LSMs are combined together it could be that one LSM successfully allocated security blob for its needs, while subsequent LSM rejected BPF map creation. The former LSM would still need to free up LSM blob, so we need to ensure security_bpf_map_free() is called regardless of the outcome. Acked-by: Paul Moore Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-11-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c3dd6e94df7193f33f45d33303f5e85afb2a72dc Author: Andrii Nakryiko Date: Thu Nov 30 10:52:21 2023 -0800 bpf,lsm: refactor bpf_prog_alloc/bpf_prog_free LSM hooks Based on upstream discussion ([0]), rework existing bpf_prog_alloc_security LSM hook. Rename it to bpf_prog_load and instead of passing bpf_prog_aux, pass proper bpf_prog pointer for a full BPF program struct. Also, we pass bpf_attr union with all the user-provided arguments for BPF_PROG_LOAD command. This will give LSMs as much information as we can basically provide. The hook is also BPF token-aware now, and optional bpf_token struct is passed as a third argument. bpf_prog_load LSM hook is called after a bunch of sanity checks were performed, bpf_prog and bpf_prog_aux were allocated and filled out, but right before performing full-fledged BPF verification step. bpf_prog_free LSM hook is now accepting struct bpf_prog argument, for consistency. SELinux code is adjusted to all new names, types, and signatures. Note, given that bpf_prog_load (previously bpf_prog_alloc) hook can be used by some LSMs to allocate extra security blob, but also by other LSMs to reject BPF program loading, we need to make sure that bpf_prog_free LSM hook is called after bpf_prog_load/bpf_prog_alloc one *even* if the hook itself returned error. If we don't do that, we run the risk of leaking memory. This seems to be possible today when combining SELinux and BPF LSM, as one example, depending on their relative ordering. Also, for BPF LSM setup, add bpf_prog_load and bpf_prog_free to sleepable LSM hooks list, as they are both executed in sleepable context. Also drop bpf_prog_load hook from untrusted, as there is no issue with refcount or anything else anymore, that originally forced us to add it to untrusted list in c0c852dd1876 ("bpf: Do not mark certain LSM hook arguments as trusted"). We now trigger this hook much later and it should not be an issue anymore. [0] https://lore.kernel.org/bpf/9fe88aef7deabbe87d3fc38c4aea3c69.paul@paul-moore.com/ Acked-by: Paul Moore Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 8062fb12de99b2da33754c6a3be1bfc30d9a35f4 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:20 2023 -0800 bpf: consistently use BPF token throughout BPF verifier logic Remove remaining direct queries to perfmon_capable() and bpf_capable() in BPF verifier logic and instead use BPF token (if available) to make decisions about privileges. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 4cbb270e115bc197ff2046aeb54cc951666b16ec Author: Andrii Nakryiko Date: Thu Nov 30 10:52:19 2023 -0800 bpf: take into account BPF token when fetching helper protos Instead of performing unconditional system-wide bpf_capable() and perfmon_capable() calls inside bpf_base_func_proto() function (and other similar ones) to determine eligibility of a given BPF helper for a given program, use previously recorded BPF token during BPF_PROG_LOAD command handling to inform the decision. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit e1cef620f598853a90f17701fcb1057a6768f7b8 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:18 2023 -0800 bpf: add BPF token support to BPF_PROG_LOAD command Add basic support of BPF token to BPF_PROG_LOAD. Wire through a set of allowed BPF program types and attach types, derived from BPF FS at BPF token creation time. Then make sure we perform bpf_token_capable() checks everywhere where it's relevant. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit ee54b1a910e4d49c9a104f31ae3f5b979131adf8 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:17 2023 -0800 bpf: add BPF token support to BPF_BTF_LOAD command Accept BPF token FD in BPF_BTF_LOAD command to allow BTF data loading through delegated BPF token. BTF loading is a pretty straightforward operation, so as long as BPF token is created with allow_cmds granting BPF_BTF_LOAD command, kernel proceeds to parsing BTF data and creating BTF object. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 688b7270b3cb75e8ac78123d719967db40336e5b Author: Andrii Nakryiko Date: Thu Nov 30 10:52:16 2023 -0800 bpf: add BPF token support to BPF_MAP_CREATE command Allow providing token_fd for BPF_MAP_CREATE command to allow controlled BPF map creation from unprivileged process through delegated BPF token. Wire through a set of allowed BPF map types to BPF token, derived from BPF FS at BPF token creation time. This, in combination with allowed_cmds allows to create a narrowly-focused BPF token (controlled by privileged agent) with a restrictive set of BPF maps that application can attempt to create. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 4527358b76861dfd64ee34aba45d81648fbc8a61 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:15 2023 -0800 bpf: introduce BPF token object Add new kind of BPF kernel object, BPF token. BPF token is meant to allow delegating privileged BPF functionality, like loading a BPF program or creating a BPF map, from privileged process to a *trusted* unprivileged process, all while having a good amount of control over which privileged operations could be performed using provided BPF token. This is achieved through mounting BPF FS instance with extra delegation mount options, which determine what operations are delegatable, and also constraining it to the owning user namespace (as mentioned in the previous patch). BPF token itself is just a derivative from BPF FS and can be created through a new bpf() syscall command, BPF_TOKEN_CREATE, which accepts BPF FS FD, which can be attained through open() API by opening BPF FS mount point. Currently, BPF token "inherits" delegated command, map types, prog type, and attach type bit sets from BPF FS as is. In the future, having an BPF token as a separate object with its own FD, we can allow to further restrict BPF token's allowable set of things either at the creation time or after the fact, allowing the process to guard itself further from unintentionally trying to load undesired kind of BPF programs. But for now we keep things simple and just copy bit sets as is. When BPF token is created from BPF FS mount, we take reference to the BPF super block's owning user namespace, and then use that namespace for checking all the {CAP_BPF, CAP_PERFMON, CAP_NET_ADMIN, CAP_SYS_ADMIN} capabilities that are normally only checked against init userns (using capable()), but now we check them using ns_capable() instead (if BPF token is provided). See bpf_token_capable() for details. Such setup means that BPF token in itself is not sufficient to grant BPF functionality. User namespaced process has to *also* have necessary combination of capabilities inside that user namespace. So while previously CAP_BPF was useless when granted within user namespace, now it gains a meaning and allows container managers and sys admins to have a flexible control over which processes can and need to use BPF functionality within the user namespace (i.e., container in practice). And BPF FS delegation mount options and derived BPF tokens serve as a per-container "flag" to grant overall ability to use bpf() (plus further restrict on which parts of bpf() syscalls are treated as namespaced). Note also, BPF_TOKEN_CREATE command itself requires ns_capable(CAP_BPF) within the BPF FS owning user namespace, rounding up the ns_capable() story of BPF token. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 40bba140c60fbb3ee8df6203c82fbd3de9f19d95 Author: Andrii Nakryiko Date: Thu Nov 30 10:52:14 2023 -0800 bpf: add BPF token delegation mount options to BPF FS Add few new mount options to BPF FS that allow to specify that a given BPF FS instance allows creation of BPF token (added in the next patch), and what sort of operations are allowed under BPF token. As such, we get 4 new mount options, each is a bit mask - `delegate_cmds` allow to specify which bpf() syscall commands are allowed with BPF token derived from this BPF FS instance; - if BPF_MAP_CREATE command is allowed, `delegate_maps` specifies a set of allowable BPF map types that could be created with BPF token; - if BPF_PROG_LOAD command is allowed, `delegate_progs` specifies a set of allowable BPF program types that could be loaded with BPF token; - if BPF_PROG_LOAD command is allowed, `delegate_attachs` specifies a set of allowable BPF program attach types that could be loaded with BPF token; delegate_progs and delegate_attachs are meant to be used together, as full BPF program type is, in general, determined through both program type and program attach type. Currently, these mount options accept the following forms of values: - a special value "any", that enables all possible values of a given bit set; - numeric value (decimal or hexadecimal, determined by kernel automatically) that specifies a bit mask value directly; - all the values for a given mount option are combined, if specified multiple times. E.g., `mount -t bpf nodev /path/to/mount -o delegate_maps=0x1 -o delegate_maps=0x2` will result in a combined 0x3 mask. Ideally, more convenient (for humans) symbolic form derived from corresponding UAPI enums would be accepted (e.g., `-o delegate_progs=kprobe|tracepoint`) and I intend to implement this, but it requires a bunch of UAPI header churn, so I postponed it until this feature lands upstream or at least there is a definite consensus that this feature is acceptable and is going to make it, just to minimize amount of wasted effort and not increase amount of non-essential code to be reviewed. Attentive reader will notice that BPF FS is now marked as FS_USERNS_MOUNT, which theoretically makes it mountable inside non-init user namespace as long as the process has sufficient *namespaced* capabilities within that user namespace. But in reality we still restrict BPF FS to be mountable only by processes with CAP_SYS_ADMIN *in init userns* (extra check in bpf_fill_super()). FS_USERNS_MOUNT is added to allow creating BPF FS context object (i.e., fsopen("bpf")) from inside unprivileged process inside non-init userns, to capture that userns as the owning userns. It will still be required to pass this context object back to privileged process to instantiate and mount it. This manipulation is important, because capturing non-init userns as the owning userns of BPF FS instance (super block) allows to use that userns to constraint BPF token to that userns later on (see next patch). So creating BPF FS with delegation inside unprivileged userns will restrict derived BPF token objects to only "work" inside that intended userns, making it scoped to a intended "container". Also, setting these delegation options requires capable(CAP_SYS_ADMIN), so unprivileged process cannot set this up without involvement of a privileged process. There is a set of selftests at the end of the patch set that simulates this sequence of steps and validates that everything works as intended. But careful review is requested to make sure there are no missed gaps in the implementation and testing. This somewhat subtle set of aspects is the result of previous discussions ([0]) about various user namespace implications and interactions with BPF token functionality and is necessary to contain BPF token inside intended user namespace. [0] https://lore.kernel.org/bpf/20230704-hochverdient-lehne-eeb9eeef785e@brauner/ Acked-by: Christian Brauner Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 909fa05dd3c181e5b403912889057f7cdbf3906c Author: Andrii Nakryiko Date: Thu Nov 30 10:52:13 2023 -0800 bpf: align CAP_NET_ADMIN checks with bpf_capable() approach Within BPF syscall handling code CAP_NET_ADMIN checks stand out a bit compared to CAP_BPF and CAP_PERFMON checks. For the latter, CAP_BPF or CAP_PERFMON are checked first, but if they are not set, CAP_SYS_ADMIN takes over and grants whatever part of BPF syscall is required. Similar kind of checks that involve CAP_NET_ADMIN are not so consistent. One out of four uses does follow CAP_BPF/CAP_PERFMON model: during BPF_PROG_LOAD, if the type of BPF program is "network-related" either CAP_NET_ADMIN or CAP_SYS_ADMIN is required to proceed. But in three other cases CAP_NET_ADMIN is required even if CAP_SYS_ADMIN is set: - when creating DEVMAP/XDKMAP/CPU_MAP maps; - when attaching CGROUP_SKB programs; - when handling BPF_PROG_QUERY command. This patch is changing the latter three cases to follow BPF_PROG_LOAD model, that is allowing to proceed under either CAP_NET_ADMIN or CAP_SYS_ADMIN. This also makes it cleaner in subsequent BPF token patches to switch wholesomely to a generic bpf_token_capable(int cap) check, that always falls back to CAP_SYS_ADMIN if requested capability is missing. Cc: Jakub Kicinski Acked-by: Yafang Shao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231130185229.2688956-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 9f4e9ffee97414d882889a943e550c53b5fa1d5c Author: Jonathan Cameron Date: Thu Nov 16 19:27:11 2023 +0000 iio: light: pa1203001: Drop ACPI_PTR() protection. The extra cost of always including the acpi_device_id table is trivial vs the complexity of adding guards or __maybe_unused markings so just stop using the ACPI_PTR() macro. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311160851.FDA4CDVE-lkp@intel.com/ Link: https://lore.kernel.org/r/20231116192711.366441-1-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 90ae7ed9bae5d7832adeba0dd574790fac65cbbf Author: Johan Hovold Date: Thu Nov 30 18:16:28 2023 +0100 dt-bindings: iio/adc: qcom,spmi-vadc: clean up examples Clean up the VADC examples by dropping a comment, dropping unnecessary labels and adding newline separators. Signed-off-by: Johan Hovold Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231130171628.12257-7-johan+linaro@kernel.org Signed-off-by: Jonathan Cameron commit 482aa83e3d836461f1b819715217ce4327ea70f7 Author: Johan Hovold Date: Thu Nov 30 18:16:27 2023 +0100 dt-bindings: iio/adc: qcom,spmi-vadc: fix example node names The VADC is a child of an SPMI PMIC, which in turn sits on an SPMI bus. Fixes: 74e903461b17 ("dt-bindings: iio: adc: qcom,spmi-vadc: extend example") Fixes: 5a471662b5d9 ("iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format") Signed-off-by: Johan Hovold Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231130171628.12257-6-johan+linaro@kernel.org Signed-off-by: Jonathan Cameron commit adb2af792bfb0378791a2cda74aa90f1648daa20 Author: Johan Hovold Date: Thu Nov 30 18:16:26 2023 +0100 dt-bindings: iio/adc: qcom,spmi-rradc: clean up example Clean up the RRADC example by dropping an unnecessary label and removing stray white space. Signed-off-by: Johan Hovold Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231130171628.12257-5-johan+linaro@kernel.org Signed-off-by: Jonathan Cameron commit 9b2b96a0f91a61d7a40790a795dbbb6d5696de03 Author: Johan Hovold Date: Thu Nov 30 18:16:25 2023 +0100 dt-bindings: iio/adc: qcom,spmi-iadc: clean up example Clean up the IADC example by adding a newline separator, dropping an unnecessary label and removing stray white space. Signed-off-by: Johan Hovold Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231130171628.12257-4-johan+linaro@kernel.org Signed-off-by: Jonathan Cameron commit 9751b00dbfc725d7e1f57ed023557449cb10eaa0 Author: Johan Hovold Date: Thu Nov 30 18:16:24 2023 +0100 dt-bindings: iio/adc: qcom,spmi-iadc: fix example node name The IADC is a child of an SPMI PMIC, which in turn sits on an SPMI bus. Fixes: a4e6bf69418c ("dt-bindings:iio:adc:qcom,spmi-iadc: txt to yaml format conversion.") Signed-off-by: Johan Hovold Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231130171628.12257-3-johan+linaro@kernel.org Signed-off-by: Jonathan Cameron commit a163854af7c3f3351fa8c2a31cfe9f3b0bc1e51a Author: Johan Hovold Date: Thu Nov 30 18:16:23 2023 +0100 dt-bindings: iio/adc: qcom,spmi-iadc: fix reg description The IADC register is just the base address in the SPMI PMIC and does not include any length. Signed-off-by: Johan Hovold Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231130171628.12257-2-johan+linaro@kernel.org Signed-off-by: Jonathan Cameron commit 4347f5114ab776c60727f94a7ab19538401c9ee1 Author: Marek Vasut Date: Mon Nov 27 22:26:53 2023 +0100 iio: light: isl76682: Add ISL76682 driver The ISL76682 is very basic ALS which only supports ALS or IR mode in four ranges, 1k/4k/16k/64k LUX. There is no IRQ support or any other fancy functionality. Reviewed-by: Andy Shevchenko Reviewed-by: Matti Vaittinen Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20231127212726.77707-2-marex@denx.de Signed-off-by: Jonathan Cameron commit 38dd7b72ef8046a3009ef384b711d4509de3d427 Author: Raag Jadav Date: Thu Nov 23 15:36:17 2023 +0530 perf: arm_cspmu: drop redundant acpi_dev_uid_to_integer() Now that we have _UID matching support for integer types, we can use acpi_dev_hid_uid_match() for it. Signed-off-by: Raag Jadav Acked-by: Will Deacon Signed-off-by: Rafael J. Wysocki commit 9e93507da2cf57068ec5d3496185fe0236844ae9 Author: Raag Jadav Date: Thu Nov 23 15:36:16 2023 +0530 efi: dev-path-parser: use acpi_dev_uid_match() for matching _UID Now that we have _UID matching support for integer types, we can use acpi_dev_uid_match() for it. Signed-off-by: Raag Jadav Reviewed-by: Ard Biesheuvel Signed-off-by: Rafael J. Wysocki commit 5ecdb287be126172ce7f4d61af5c6402b0fc9e61 Author: Raag Jadav Date: Thu Nov 23 15:36:15 2023 +0530 ACPI: LPSS: use acpi_dev_uid_match() for matching _UID Now that we have _UID matching support for integer types, we can use acpi_dev_uid_match() for it. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit b2b32a1738815155d4a0039bb7a6092d40f23e81 Author: Raag Jadav Date: Thu Nov 23 15:36:14 2023 +0530 ACPI: bus: update acpi_dev_hid_uid_match() to support multiple types Now that we have _UID matching support for both integer and string types, we can support them into acpi_dev_hid_uid_match() helper as well. Signed-off-by: Raag Jadav Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit 57b8543ceee82ea72be1745a6dc3a9111d55a151 Author: Raag Jadav Date: Thu Nov 23 15:36:13 2023 +0530 ACPI: bus: update acpi_dev_uid_match() to support multiple types According to the ACPI specification, a _UID object can evaluate to either a numeric value or a string. Update acpi_dev_uid_match() to support _UID matching for both integer and string types. Suggested-by: Mika Westerberg Signed-off-by: Raag Jadav [ rjw: Rename auxiliary macros, relocate kerneldoc comment ] Signed-off-by: Rafael J. Wysocki commit 9ea6b7dfff2c782954e90da5f49e539104e9d27a Merge: 2cc14f52aeb78 95d516f3eb96b Author: Arnd Bergmann Date: Wed Dec 6 17:27:48 2023 +0100 Merge tag 'renesas-dts-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/dt Renesas DTS updates for v6.8 - Add FLASH support for the Renesas Marzen and Blanche development boards, - Add 4-bit TX support for the QSPI FLASHes on the RZ/G2L, RZ/G2LC, and RZ/V2L SMARC SoMs, - Add SDHI support for the RZ/G3S SMARC development kit, - Add LCD support for the Atmark Techno Armadillo-800-EVA development board, which requires switching from the legacy frame buffer device driver to the DRM driver, - Miscellaneous fixes and improvements. * tag 'renesas-dts-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: renesas: r9a06g032: Add missing space in compatible arm64: dts: renesas: r9a09g011: Add missing space in compatible ARM: dts: renesas: armadillo800eva: Add LCD panel ARM: dts: renesas: r8a7740: Add LCDC nodes ARM: shmobile: defconfig: Switch to DRM_SHMOBILE arm64: dts: renesas: draak: Move HDMI bus properties to correct node arm64: dts: renesas: draak: Make HDMI the default video input arm64: dts: renesas: rzg3s-smarc: Enable SDHI1 arm64: dts: renesas: rzg3s-smarc-som: Enable SDHI2 arm64: dts: renesas: rzg2lc-smarc-som: Enable 4-bit tx support arm64: dts: renesas: rzg2l-smarc-som: Enable 4-bit tx support ARM: dts: renesas: marzen: Rename keyboard nodes ARM: dts: renesas: iwg22d-sodimm: Fix stmpe node names arm64: dts: renesas: Add missing ADV751[13] power supply properties ARM: dts: renesas: Add missing ADV751[13] power supply properties ARM: dts: renesas: rcar-gen2: Fix I2C bus demux node names riscv: dts: renesas: Convert isa detection to new properties ARM: dts: renesas: blanche: Add FLASH node ARM: dts: renesas: marzen: Add FLASH node Link: https://lore.kernel.org/r/cover.1701433489.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 01261d8a0f082b1a926d14ecb3ae05e52c477c74 Author: Ian Rogers Date: Mon Nov 27 14:08:26 2023 -0800 perf thread: Add missing RC_CHK_EQUAL Comparing pointers without RC_CHK_ACCESS means the indirect object will be compared rather than the underlying maps when REFCNT_CHECKING is enabled. Fix by adding missing RC_CHK_EQUAL. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231127220902.1315692-15-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 0f6ab6a3fb7e380a1277f8288f315724ed517114 Author: Ian Rogers Date: Mon Nov 27 14:08:25 2023 -0800 perf maps: Move symbol maps functions to maps.c Move the find and certain other symbol maps__* functions to maps.c for better abstraction. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231127220902.1315692-14-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9fa688ea341231837915f996b61f6e0a330d3b38 Author: Ian Rogers Date: Mon Nov 27 14:08:24 2023 -0800 perf map: Simplify map_ip/unmap_ip and make 'struct map' smaller When mapping an IP it is either an identity mapping or a DSO relative mapping, so a single bit is required in the struct to identify this. The current code uses function pointers, adding 2 pointers per map and also pushing the size of a map beyond 1 cache line. Switch to using a byte to identify the mapping type (as well as priv and erange_warned), to avoid any masking. Change struct maps's layout to avoid holes. Before: ``` struct map { u64 start; /* 0 8 */ u64 end; /* 8 8 */ _Bool erange_warned:1; /* 16: 0 1 */ _Bool priv:1; /* 16: 1 1 */ /* XXX 6 bits hole, try to pack */ /* XXX 3 bytes hole, try to pack */ u32 prot; /* 20 4 */ u64 pgoff; /* 24 8 */ u64 reloc; /* 32 8 */ u64 (*map_ip)(const struct map *, u64); /* 40 8 */ u64 (*unmap_ip)(const struct map *, u64); /* 48 8 */ struct dso * dso; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ refcount_t refcnt; /* 64 4 */ u32 flags; /* 68 4 */ /* size: 72, cachelines: 2, members: 12 */ /* sum members: 68, holes: 1, sum holes: 3 */ /* sum bitfield members: 2 bits, bit holes: 1, sum bit holes: 6 bits */ /* last cacheline: 8 bytes */ }; ``` After: ``` struct map { u64 start; /* 0 8 */ u64 end; /* 8 8 */ u64 pgoff; /* 16 8 */ u64 reloc; /* 24 8 */ struct dso * dso; /* 32 8 */ refcount_t refcnt; /* 40 4 */ u32 prot; /* 44 4 */ u32 flags; /* 48 4 */ enum mapping_type mapping_type:8; /* 52: 0 4 */ /* Bitfield combined with next fields */ _Bool erange_warned; /* 53 1 */ _Bool priv; /* 54 1 */ /* size: 56, cachelines: 1, members: 11 */ /* padding: 1 */ /* last cacheline: 56 bytes */ }; ``` Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231127220902.1315692-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 407a3898d72ee0020b8cc9dd28b88c8eb8d68214 Author: Ian Rogers Date: Tue Dec 5 08:49:24 2023 -0800 perf test shell diff: Skip test if test_loop symbol is missing in the perf binary The diff test depends on finding the symbol test_loop in perf and will fail if perf has been stripped and no debug object is available. In that case, skip the test instead. Suggested-by: Adrian Hunter Signed-off-by: Ian Rogers Tested-by: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231205164924.835682-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7698622fbcf4fef2ec7e2fcbae35eb5e503dfddf Author: Joao Paulo Goncalves Date: Tue Dec 5 19:46:05 2023 +0100 arm64: dts: ti: Add verdin am62 mallow board Add Toradex Verdin AM62 Mallow carrier board support. Mallow is a low-cost carrier board in the Verdin family with a small form factor and build for volume production making it ideal for industrial and embedded applications. https://www.toradex.com/products/carrier-board/mallow-carrier-board Signed-off-by: Joao Paulo Goncalves Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20231205184605.35225-4-francesco@dolcini.it Signed-off-by: Nishanth Menon commit f9b5aae471dca94de2ea525136a59927e9b1d7cf Author: Joao Paulo Goncalves Date: Tue Dec 5 19:46:04 2023 +0100 dt-bindings: arm: ti: Add verdin am62 mallow board Add Mallow carrier board for wifi and nonwifi variants of Toradex Verdin AM62 SoM. Mallow is a low-cost carrier board in the Verdin family with a small form factor and build for volume production making it ideal for industrial and embedded applications. https://www.toradex.com/products/carrier-board/mallow-carrier-board Acked-by: Krzysztof Kozlowski Signed-off-by: Joao Paulo Goncalves Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20231205184605.35225-3-francesco@dolcini.it Signed-off-by: Nishanth Menon commit a6b5f50fefe93676af8798ecc1f633581d1702f8 Author: Fabio Estevam Date: Wed Dec 6 08:30:47 2023 -0300 ASoC: dt-bindings: fsl,xcvr: Adjust the number of interrupts Unlike i.MX8MP, i.MX93 has two XCVR interrupts. Describe the two interrupts for the i.MX93 to fix the following dt-schema warning: imx93-11x11-evk.dtb: xcvr@42680000: interrupts: [[0, 203, 4], [0, 204, 4]] is too long from schema $id: http://devicetree.org/schemas/sound/fsl,xcvr.yaml# Signed-off-by: Fabio Estevam Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231206113047.2240055-1-festevam@gmail.com Signed-off-by: Mark Brown commit a351940d61e608c363c86462f2355e3896e1636d Merge: cb6c44e020925 fc540426f7baa Author: Arnd Bergmann Date: Wed Dec 6 16:50:53 2023 +0100 Merge tag 'bus-platform-remove-void' of https://git.pengutronix.de/git/ukl/linux into soc/drivers This series converts all drivers below drivers/bus to struct platform_driver::remove_new(). See commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") for an extended explanation and the eventual goal. After the initial simplification in commit 864acca58000 ("bus: fsl-mc: Drop if block with always false condition") all conversations are trivial because the remove callbacks all return zero unconditionally. * tag 'bus-platform-remove-void' of https://git.pengutronix.de/git/ukl/linux: bus: ts-nbus: Convert to platform remove callback returning void bus: ti-sysc: Convert to platform remove callback returning void bus: ti-pwmss: Convert to platform remove callback returning void bus: tegra-gmi: Convert to platform remove callback returning void bus: tegra-aconnect: Convert to platform remove callback returning void bus: sunxi-rsb: Convert to platform remove callback returning void bus: sun50i-de2: Convert to platform remove callback returning void bus: simple-pm-bus: Convert to platform remove callback returning void bus: qcom-ssc-block-bus: Convert to platform remove callback returning void bus: omap_l3_smx: Convert to platform remove callback returning void bus: omap-ocp2scp: Convert to platform remove callback returning void bus: hisi_lpc: Convert to platform remove callback returning void bus: fsl-mc: Convert to platform remove callback returning void bus: fsl-mc: Drop if block with always false condition Link: https://lore.kernel.org/r/20231128174927.m46dgp4juig2omci@pengutronix.de Signed-off-by: Arnd Bergmann commit cb6c44e02092500a7fc1ea7f87b16758ada8ba0f Merge: 2cc14f52aeb78 4dae8c047a703 Author: Arnd Bergmann Date: Wed Dec 6 16:50:05 2023 +0100 Merge tag 'asahi-soc-mailbox-6.8' of https://github.com/AsahiLinux/linux into soc/drivers Apple SoC mailbox updates for 6.8 This moves the mailbox driver out of the mailbox subsystem and into SoC, next to its only consumer (RTKit). It has been cooking in linux-next for a long while, so it's time to pull it in. * tag 'asahi-soc-mailbox-6.8' of https://github.com/AsahiLinux/linux: soc: apple: mailbox: Add explicit include of platform_device.h soc: apple: mailbox: Rename config symbol to APPLE_MAILBOX mailbox: apple: Delete driver soc: apple: rtkit: Port to the internal mailbox driver soc: apple: mailbox: Add ASC/M3 mailbox driver soc: apple: rtkit: Get rid of apple_rtkit_send_message_wait Link: https://lore.kernel.org/r/6e64472e-c55d-4499-9a61-da59cfd28021@marcan.st Signed-off-by: Arnd Bergmann commit 542b667fe9ee139d8c36e41fa25460f0d67b20ac Merge: e88b859cab4b8 7c77368b6c42e Author: Arnd Bergmann Date: Wed Dec 6 16:49:04 2023 +0100 Merge tag 'renesas-arm-defconfig-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig Renesas ARM defconfig updates for v6.8 - Enable support for the Renesas VersaClock 3 clock generator in the arm64 defconfig, - Enable support for the Renesas EtherAVB module in the arm multi_v7 defconfig, - Refresh shmobile_defconfig for v6.7-rc1. * tag 'renesas-arm-defconfig-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: defconfig: Refresh for v6.7-rc1 ARM: multi_v7_defconfig: Enable CONFIG_RAVB arm64: defconfig: Enable Renesas VersaClock 3 clock generator config Link: https://lore.kernel.org/r/cover.1701433487.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit e88b859cab4b8decd9e545678a66aecb2506d106 Author: Etienne Carriere Date: Fri Nov 3 09:54:00 2023 +0100 ARM: multi_v7_defconfig: Add SCMI reset support SCMI reset controllers are used in the ARMv7 STMicroelectronics stm32mp boards: - for STM32MP13: stm32mp135f-dk - for STM32MP15 boards with SCMI variant, introduced by commit 5b7e58313a77 ("ARM: dts: stm32: Add SCMI version of STM32 boards (DK1/DK2/ED1/EV1)") * stm32mp157c-ev1-scmi * stm32mp157c-ed1-scmi * stm32mp157c-dk2-scmi * stm32mp157a-dk1-scmi Cc: Arnd Bergmann Cc: Alexandre Torgue Signed-off-by: Etienne Carriere Link: https://lore.kernel.org/r/20231103085400.2924282-1-etienne.carriere@foss.st.com Signed-off-by: Arnd Bergmann commit 15bece7bec0df91a8ed1c185483d67708425ca8e Author: Zenghui Yu Date: Fri Nov 24 20:16:15 2023 +0800 cpu/hotplug: Remove unused CPU hotplug states There are unused hotplug states which either have never been used or the removal of the usage did not remove the state constant. Drop them to reduce the size of the cpuhp_hp_states array. Signed-off-by: Zenghui Yu Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231124121615.1604-1-yuzenghui@huawei.com commit 28d3d0696688154cc04983f343011d07bf0508e4 Author: Dan Carpenter Date: Wed Dec 6 18:05:15 2023 +0300 drm/bridge: nxp-ptn3460: simplify some error checking The i2c_master_send/recv() functions return negative error codes or they return "len" on success. So the error handling here can be written as just normal checks for "if (ret < 0) return ret;". No need to complicate things. Btw, in this code the "len" parameter can never be zero, but even if it were, then I feel like this would still be the best way to write it. Fixes: 914437992876 ("drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking") Suggested-by: Neil Armstrong Signed-off-by: Dan Carpenter Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/04242630-42d8-4920-8c67-24ac9db6b3c9@moroto.mountain commit 2eab57b131bd9ef22377e09de43beb45a650a752 Author: Konrad Dybcio Date: Wed Nov 29 15:41:02 2023 +0100 interconnect: qcom: Add SM6115 interconnect provider driver Add a driver for managing NoC providers on SM6115. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-6115icc-v3-2-bd8907b8cfd7@linaro.org Signed-off-by: Georgi Djakov commit 658902913c7044ac5d56b14cea54e735a071fe41 Author: Konrad Dybcio Date: Wed Nov 29 15:41:01 2023 +0100 dt-bindings: interconnect: Add Qualcomm SM6115 NoC Add bindings for Qualcomm SM6115 Network-On-Chip interconnect. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231125-topic-6115icc-v3-1-bd8907b8cfd7@linaro.org Signed-off-by: Georgi Djakov commit fcb335934c5132f6f0646475ece5db729fcfbf84 Author: Joao Paulo Goncalves Date: Tue Dec 5 19:46:03 2023 +0100 arm64: dts: ti: verdin-am62: Improve spi1 chip-select pinctrl Verdin SPI_1 interface has a dedicated hardware controlled chip select that is currently configured in the same pinctrl group as MISO/MOSI/CLK, however it is possible that it can be used only as a standard GPIO be it a chip select or not. To maximize flexibility and avoid duplication in the carrier board dts files move the SPI_1 CS in a dedicated pinctrl and also adds an additional pinctrl to simplify using SPI_1 CS as a GPIO. Signed-off-by: Joao Paulo Goncalves Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20231205184605.35225-2-francesco@dolcini.it Signed-off-by: Nishanth Menon commit fecdf6de7e47849504d0edaaff55fa0baadef420 Author: Garrett Giordano Date: Mon Dec 4 14:28:11 2023 -0800 arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Remove HDMI Reset Line Name The GPIO Expander has a line name defined as GPIO0_HDMI_RST. This line is no longer associated with the HDMI Reset so we removed it. Signed-off-by: Garrett Giordano Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20231204222811.2344460-3-ggiordano@phytec.com Signed-off-by: Nishanth Menon commit bac441710306a84c52f0f9a561aa9839b91caa14 Author: Garrett Giordano Date: Mon Dec 4 14:28:10 2023 -0800 arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Add HDMI support The DSS outputs DPI signals via its second video port (VP2). The DPI output from DSS is 24 bits (RGB888) and is forwarded to an HDMI transmitter (SIL9022) on the board. Add pinmux for DSS DPI output and HDMI Interrupt. Add DT nodes for SIL9022 HDMI transmitter (TX), and the HDMI connector on the phyBOARD-Lyra. Additionally, connect the output of DSS (VP2) with input of the HDMI TX, and the output of HDMI TX to the input of the HDMI connector. Signed-off-by: Garrett Giordano Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20231204222811.2344460-2-ggiordano@phytec.com Signed-off-by: Nishanth Menon commit 9c316d58c238e58d6346458462e8b0fd308e7332 Author: Garrett Giordano Date: Mon Dec 4 14:28:09 2023 -0800 arm64: dts: ti: k3-am625-phyboard-lyra-rdk: Lower I2C1 frequency The gpio-expander on i2c-1 has a maximum frequency of 100kHz. Update our main_i2c1 frequency to allow the nxp,pcf8574 gpio-expander to function properly. Signed-off-by: Garrett Giordano Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20231204222811.2344460-1-ggiordano@phytec.com Signed-off-by: Nishanth Menon commit 5709a6809a6869970ef47bbad7451d32e9081ce1 Author: Garrett Giordano Date: Mon Dec 4 13:23:04 2023 -0800 arm64: dts: ti: phycore-am64: Add R5F DMA Region and Mailboxes Communication between the R5F subsystem and Linux takes place using DMA memory regions and mailboxes. Here we add DT nodes for the memory regions and mailboxes to facilitate communication between the R5 clusters and Linux as remoteproc will fail to start if no memory regions or mailboxes are provided. Fixes: c48ac0efe6d7 ("arm64: dts: ti: Add support for phyBOARD-Electra-AM642") Signed-off-by: Garrett Giordano Reviewed-by: Wadim Egorov Link: https://lore.kernel.org/r/20231204212304.1736306-1-ggiordano@phytec.com Signed-off-by: Nishanth Menon commit 3ba080bf46e4a9039d0d41356f4a2515e00bf747 Author: Neha Malcom Francis Date: Mon Oct 16 15:46:08 2023 +0530 soc: ti: k3-socinfo: Revamp driver to accommodate different rev structs k3-socinfo.c driver assumes silicon revisions for every platform are incremental and one-to-one, corresponding to JTAG_ID's variant field: 1.0, 2.0 etc. This assumption is wrong for SoCs such as J721E, where the variant field to revision mapping is 1.0, 1.1. Further, there are SoCs such as AM65x where the sub-variant version requires custom decoding of other registers. Address this by using conditional handling per JTAG ID that requires an exception with J721E as the first example. To facilitate this conversion, use macros to identify the JTAG_ID part number and map them to predefined string array. Signed-off-by: Neha Malcom Francis Co-developed-by: Thejasvi Konduru Signed-off-by: Thejasvi Konduru Link: https://lore.kernel.org/r/20231016101608.993921-4-n-francis@ti.com Signed-off-by: Nishanth Menon commit 652483bfbc45137e8dce556c9ddbd4458dad4452 Author: Konstantin Komarov Date: Tue Nov 28 11:17:20 2023 +0300 fs/ntfs3: Fix c/mtime typo Signed-off-by: Konstantin Komarov commit aaab47f204aaf47838241d57bf8662c8840de60a Author: Konstantin Komarov Date: Tue Nov 28 11:09:34 2023 +0300 fs/ntfs3: Add NULL ptr dereference checking at the end of attr_allocate_frame() It is preferable to exit through the out: label because internal debugging functions are located there. Signed-off-by: Konstantin Komarov commit d6ca2d253900b9b0a3a1ad77541d606010f5e5eb Author: Konstantin Komarov Date: Tue Nov 28 11:08:00 2023 +0300 fs/ntfs3: Add and fix comments Signed-off-by: Konstantin Komarov commit 97ec56d390a3a0077b36cb38627f671c72dddce6 Author: Konstantin Komarov Date: Fri Nov 24 12:21:12 2023 +0300 fs/ntfs3: ntfs3_forced_shutdown use int instead of bool Signed-off-by: Konstantin Komarov commit 6c3684e703837d2116b5cf4beb37aa7145a66b60 Author: Konstantin Komarov Date: Fri Nov 24 12:19:37 2023 +0300 fs/ntfs3: Implement super_operations::shutdown Signed-off-by: Konstantin Komarov commit e50f9560b8168a625703a3e7fe1fde9fa53f0837 Author: Konstantin Komarov Date: Fri Nov 24 12:17:46 2023 +0300 fs/ntfs3: Drop suid and sgid bits as a part of fpunch Signed-off-by: Konstantin Komarov commit 4dea9cd522424d3002894c20b729c6fbfb6fc22b Author: Konstantin Komarov Date: Fri Nov 24 12:16:49 2023 +0300 fs/ntfs3: Add file_modified Signed-off-by: Konstantin Komarov commit a40b73f608e7de2120fdb9ddc8970421b3c50bc9 Author: Konstantin Komarov Date: Fri Nov 24 12:08:36 2023 +0300 fs/ntfs3: Correct use bh_read Signed-off-by: Konstantin Komarov commit d155617006ebc172a80d3eb013c4b867f9a8ada4 Author: Konstantin Komarov Date: Fri Nov 24 11:47:30 2023 +0300 fs/ntfs3: Fix detected field-spanning write (size 8) of single field "le->name" Signed-off-by: Konstantin Komarov commit a8b0c9fc3a2dba07f697ef7825e04363ff12f071 Author: Konstantin Komarov Date: Fri Nov 24 11:46:16 2023 +0300 fs/ntfs3: Fix multithreaded stress test Signed-off-by: Konstantin Komarov commit 865e7a7700d930d34895a70f8af2eb4e778a5b0e Author: Konstantin Komarov Date: Fri Nov 24 11:42:04 2023 +0300 fs/ntfs3: Reduce stack usage Signed-off-by: Konstantin Komarov commit 85ba2a75faee759809a7e43b4c103ac59bac1026 Author: Konstantin Komarov Date: Fri Nov 24 11:34:24 2023 +0300 fs/ntfs3: Print warning while fixing hard links count Signed-off-by: Konstantin Komarov commit 1918c10e137eae266b8eb0ab1cc14421dcb0e3e2 Author: Konstantin Komarov Date: Fri Nov 24 11:26:31 2023 +0300 fs/ntfs3: Correct hard links updating when dealing with DOS names Signed-off-by: Konstantin Komarov commit 6a799c928b78b14999b7705c4cca0f88e297fe96 Author: Konstantin Komarov Date: Fri Nov 24 11:24:33 2023 +0300 fs/ntfs3: Improve ntfs_dir_count Signed-off-by: Konstantin Komarov commit 22457c047ed971f2f2e33be593ddfabd9639a409 Author: Konstantin Komarov Date: Fri Nov 24 11:17:07 2023 +0300 fs/ntfs3: Modified fix directory element type detection Unfortunately reparse attribute is used for many purposes (several dozens). It is not possible here to know is this name symlink or not. To get exactly the type of name we should to open inode (read mft). getattr for opened file (fstat) correctly returns symlink. Signed-off-by: Konstantin Komarov commit c39de951282df9a60ef70664e4378d88006b2670 Author: Konstantin Komarov Date: Fri Nov 24 11:04:53 2023 +0300 fs/ntfs3: Improve alternative boot processing Signed-off-by: Konstantin Komarov commit 07d33c2810bb5fe67747d11f76980ed68602e287 Author: David Lechner Date: Mon Dec 4 11:33:35 2023 -0600 spi: axi-spi-engine: add watchdog timer If there is an issue with the AXI SPI Engine hardware a scheduled transfer might never be completed and spi_sync() will block forever. This due to the uninterruptible wait for completion waiting for the spi_finalize_current_message() that never comes. Add a watchdog timer that will abort a transfer 5 seconds after it has been started. This will potentially leave the hardware in a broken state but it allows software to recover and allow to better diagnose the underlying issue. Co-developed-by: Lars-Peter Clausen Signed-off-by: Lars-Peter Clausen Signed-off-by: David Lechner Acked-by: Michael Hennerich Acked-by: Nuno Sa Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-9-063672323fce@baylibre.com Signed-off-by: Mark Brown commit 0db60d821e485a1c9b8080dbec1ba9871efb6a65 Author: David Lechner Date: Mon Dec 4 11:33:34 2023 -0600 spi: axi-spi-engine: remove delay from CS assertion Now that the AXI SPI Engine driver has support for the various CS delays requested through struct spi_message, we don't need to add a separate delay to the CS assertion instruction. Otherwise, we end up with longer than requested delays. Signed-off-by: David Lechner Acked-by: Michael Hennerich Acked-by: Nuno Sa Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-8-063672323fce@baylibre.com Signed-off-by: Mark Brown commit 3106edac599f59e1298b034a19a43e7da002fccc Author: David Lechner Date: Mon Dec 4 11:33:33 2023 -0600 spi: axi-spi-engine: restore clkdiv at end of message This modifies the ADI AXI SPI Engine driver to restore the clkdiv configuration register at the end of a SPI message. Having the clkdiv in a known state is needed to be able to add a new command in the future that only performs a delay without any SPI transfers. Furthermore having that state be the smallest possible divider will allow these delays to have the highest possible precision. Changing the initial value of clk_div from -1 to 1 is now possible because we know the function will always be called with a known clkdiv config register state. Making this change will also have the effect of not emitting a clkdiv configuration register instruction in cases where the maximum sclk rate is used. Having one less instruction to process reduces delays on the bus which will be beneficial when we implement offload support to enable reading data from devices at very high rates. Signed-off-by: David Lechner Acked-by: Michael Hennerich Acked-by: Nuno Sa Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-7-063672323fce@baylibre.com Signed-off-by: Mark Brown commit 125a8390995df1a350e9e16e6da11d010e1e7f76 Author: David Lechner Date: Mon Dec 4 11:33:32 2023 -0600 spi: axi-spi-engine: implement xfer->cs_change_delay This adds handling of xfer->cs_change_delay to the AXI SPI Engine driver. Signed-off-by: David Lechner Acked-by: Michael Hennerich Acked-by: Nuno Sa Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-6-063672323fce@baylibre.com Signed-off-by: Mark Brown commit e006c181dd9ab006d7b0982d35ef7951fbffe825 Author: David Lechner Date: Mon Dec 4 11:33:31 2023 -0600 spi: axi-spi-engine: remove xfer arg from spi_engine_gen_sleep() This replaces the xfer parameter of spi_engine_gen_sleep() in the AXI SPI Engine driver with parameters for the delay in nanoseconds and the SPI SCLK rate. This will allow this function to be used by callers in the future that do not have a spi_transfer struct. Signed-off-by: David Lechner Acked-by: Michael Hennerich Acked-by: Nuno Sa Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-5-063672323fce@baylibre.com Signed-off-by: Mark Brown commit be9070bcf67057b7b03c5acc1980d3897448ad20 Author: David Lechner Date: Mon Dec 4 11:33:30 2023 -0600 spi: axi-spi-engine: fix sleep ticks calculation This fixes the sleep ticks calculation when generating sleep instructions in the AXI SPI Engine driver. The previous calculation was ignoring delays less than one microsecond and missed a microsecond to second conversion factor. This fixes the first issue by not rounding to microseconds. Now that xfer->effective_speed_hz is guaranteed to be set correctly, we can use that to simplify the calculation. This new calculation replaces the old incorrect math. Also add unit suffix to the delay variable for clarity while we are touching this. Signed-off-by: David Lechner Acked-by: Michael Hennerich Acked-by: Nuno Sa Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-4-063672323fce@baylibre.com Signed-off-by: Mark Brown commit 1fc8dc5721bbc7a21cb4cc60c35eb8031942542b Author: David Lechner Date: Mon Dec 4 11:33:29 2023 -0600 spi: axi-spi-engine: remove spi_engine_get_clk_div() Now that host->max_speed_hz and xfer->effective_speed_hz are properly set, we can use them instead of having to do more complex calculations to get the clock divider for each transfer. This removes the spi_engine_get_clk_div() function and replaces it with just dividing the two clock rates. Since the hardware register value is the divider minus one, we need to subtract one. Subtracting one was previously done in the spi_engine_get_clk_div() function. Signed-off-by: David Lechner Acked-by: Michael Hennerich Acked-by: Nuno Sa Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-3-063672323fce@baylibre.com Signed-off-by: Mark Brown commit 9d023ecc31859c7f7c8ca27b5fec52b2dbb8086f Author: David Lechner Date: Mon Dec 4 11:33:28 2023 -0600 spi: axi-spi-engine: populate xfer->effective_speed_hz This adds a new spi_engine_precompile_message() function to the ADI AXI SPI Engine driver to populate the xfer->effective_speed_hz field since the SPI core doesn't/can't do this for us. This driver is already using spi_delay_to_ns() which depends on effective_speed_hz to get an accurate value in some cases. Having an effective_speed_hz value can also be used in future changes to simplify other code. Signed-off-by: David Lechner Acked-by: Michael Hennerich Acked-by: Nuno Sa Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-2-063672323fce@baylibre.com Signed-off-by: Mark Brown commit 2e0d75f8dd9e31b3fb175f780494dd7dd988ceae Author: David Lechner Date: Mon Dec 4 11:33:27 2023 -0600 spi: axi-spi-engine: return void from spi_engine_compile_message() In the AXI SPI Engine driver, the spi_engine_compile_message() function does not return any error and none of the callers check the return value. So we can change the return type to void and drop the return 0. Signed-off-by: David Lechner Acked-by: Michael Hennerich Acked-by: Nuno Sa Link: https://lore.kernel.org/r/20231204-axi-spi-engine-series-2-v1-1-063672323fce@baylibre.com Signed-off-by: Mark Brown commit a70af69ce4d0173e30c4ea2a0100d594a90eb54a Merge: 615d903ab095b ebd12b2ca6145 Author: Mark Brown Date: Wed Dec 6 13:16:21 2023 +0000 ASoC: SOF: topology cleanups Merge series from Pierre-Louis Bossart : Header alignment with firmware, addition of new token and partial match filters. commit 615d903ab095b22d70bc8c23ddee475d40f465ca Merge: 138a4e2a26ec7 70a6b66d6e8e7 Author: Mark Brown Date: Wed Dec 6 13:16:10 2023 +0000 ASoC: Intel: machine driver updates Merge series from Pierre-Louis Bossart : Minor cleanups for machine drivers. commit 16e5ac127d8d18adf85fe5ba847d77b58d1ed418 Author: Naresh Solanki Date: Tue Dec 5 16:22:04 2023 +0530 regulator: event: Add regulator netlink event support This commit introduces netlink event support to the regulator subsystem. Changes: - Introduce event.c and regnl.h for netlink event handling. - Implement reg_generate_netlink_event to broadcast regulator events. - Update Makefile to include the new event.c file. Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20231205105207.1262928-1-naresh.solanki@9elements.com Signed-off-by: Mark Brown commit 2506c1de4081249b1df9c9a7dbd3d038e691e4e5 Author: Naresh Solanki Date: Tue Dec 5 16:22:04 2023 +0530 regulator: event: Add regulator netlink event support This commit introduces netlink event support to the regulator subsystem. Changes: - Introduce event.c and regnl.h for netlink event handling. - Implement reg_generate_netlink_event to broadcast regulator events. - Update Makefile to include the new event.c file. Signed-off-by: Naresh Solanki Link: https://lore.kernel.org/r/20231205105207.1262928-1-naresh.solanki@9elements.com Signed-off-by: Mark Brown commit 4b83b783ad778f7e69312fa61d1bee8e76e2156f Author: Arnd Bergmann Date: Mon Dec 4 08:32:10 2023 +0100 drm/imagination: move update_logtype() into ifdef section This function is only used when debugfs is enabled, and otherwise causes a build warning: drivers/gpu/drm/imagination/pvr_fw_trace.c:135:1: error: 'update_logtype' defined but not used [-Werror=unused-function] Move the #ifdef check to include this function as well. Fixes: cb56cd610866 ("drm/imagination: Add firmware trace to debugfs") Acked-by: Frank Binns Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20231204073231.1164163-1-arnd@kernel.org Signed-off-by: Maxime Ripard commit e9d5ae8a9e7e32d0b1bc582996de4f7180cb2ff2 Author: Donald Robson Date: Mon Dec 4 15:13:37 2023 +0000 drm/imagination: Removed unused functions in pvr_fw_trace Fixing the warning below due to an unused file level vtable. Removing only this causes additional warnings for the now unused functions, so I've removed those too. >> drivers/gpu/drm/imagination/pvr_fw_trace.c:205:37: warning: 'pvr_fw_trace_group_mask_fops' defined but not used [-Wunused-const-variable=] 205 | static const struct file_operations pvr_fw_trace_group_mask_fops = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Changes since v1: - Corrected hash in Fixes tag. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311302054.MVYPxFCE-lkp@intel.com/ Fixes: cb56cd610866 ("drm/imagination: Add firmware trace to debugfs") Signed-off-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231204151337.60930-1-donald.robson@imgtec.com commit d0acce68285e8645038a72c6792483160ca36e5a Author: Chengen Du Date: Thu Nov 30 21:57:23 2023 +0800 perf symbols: Parse NOTE segments until the build id is found In the ELF file, multiple NOTE segments may exist. To locate the build id, the process shall persist in parsing NOTE segments until the build id is found. Signed-off-by: Chengen Du Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231130135723.17562-1-chengen.du@canonical.com Signed-off-by: Arnaldo Carvalho de Melo commit 030ac3cad28992ae9099a857848861053273cc8f Author: Ian Rogers Date: Mon Nov 27 14:08:20 2023 -0800 perf record: Be lazier in allocating lost samples buffer Wait until a lost sample occurs to allocate the lost samples buffer, often the buffer isn't necessary. This saves a 64kb allocation and 5.3kb of peak memory consumption. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231127220902.1315692-9-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit eb2eac0c7b6180332ced94d2979f3d3c7d22aaff Author: Ian Rogers Date: Mon Nov 20 16:04:20 2023 -0800 perf evsel: Fallback to "task-clock" when not system wide When the "cycles" event isn't available evsel will fallback to the "cpu-clock" software event. "task-clock" is similar to "cpu-clock" but only runs when the process is running. Falling back to "cpu-clock" when not system wide leads to confusion, by falling back to "task-clock" it is hoped the confusion is less. Pass the target to determine if "task-clock" is more appropriate. Update a nearby comment and debug string for the change. Signed-off-by: Ian Rogers Tested-by: Athira Rajeev Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Ajay Kaher Cc: Alexander Shishkin Cc: Alexey Makhalov Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Yang Jihong Link: https://lore.kernel.org/r/20231121000420.368075-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 074ac38d5b955a6b2241c2b483470501f318a6f1 Author: Pavan Nikhilesh Date: Tue Dec 5 11:22:41 2023 +0530 octeontx2-af: cn10k: Increase outstanding LMTST transactions Currently the number of outstanding store transactions issued by AP as a part of LMTST operation is set to 1 i.e default value. This patch set to max supported value to increase the performance. Signed-off-by: Pavan Nikhilesh Signed-off-by: Geetha sowjanya Link: https://lore.kernel.org/r/20231205055241.26355-1-gakula@marvell.com Signed-off-by: Paolo Abeni commit 0678df8271820bcf8fb4f877129f05d68a237de4 Author: Conor Dooley Date: Fri Oct 20 14:18:44 2023 +0100 riscv: dts: microchip: add the mpfs' system controller qspi & associated flash The system controller's flash can be accessed via an MSS-exposed QSPI controller sitting, which sits between the mailbox's control & data registers. On Icicle, it has an MT25QL01GBBB8ESF connected to it. The system controller and MSS both have separate QSPI controllers, both of which can access the flash, although the system controller takes priority. Unfortunately, on engineering sample silicon, such as that on Icicle kits, the MSS' QSPI controller cannot write to the flash due to a bug. As a workaround, a QSPI controller can be implemented in the FPGA fabric and the IO routing modified to connect it to the flash in place of the "hard" controller in the MSS. Signed-off-by: Conor Dooley commit ec5b0f1193ad461e53d083edad8fab0298fe68e3 Author: Conor Dooley Date: Fri Oct 20 14:18:43 2023 +0100 firmware: microchip: add PolarFire SoC Auto Update support Add support for Auto Update reprogramming of the FPGA fabric on PolarFire SoC, using the fw_upload mechanism a la the intel-m10-bmc-sec-update driver. This driver only writes the image to the spi flash & performs validation on it, as the entire FPGA becomes unusable during the actual reprogramming of a bitstream. To initiate the reprogramming itself, a device reset is required. The SBI SRST extension's "cold reboot" can trigger such a device reset, provided corresponding support has been enabled in the HSS (Hart Software Services), the provider of SBI runtime services on PolarFire SoC. While this is a driver responsible for the reprogramming of an FPGA, there is no dynamic discovery of devices involved, as runtime reconfiguration is not possible due to the device reset requirements. Therefore FPGA manager subsystem is not used by this driver and the FPGA subsystem maintainers were unwilling to accept it there. Signed-off-by: Conor Dooley commit fad13b5b73e0689d19316e5d62341d8396bb261e Author: Conor Dooley Date: Fri Oct 20 14:18:42 2023 +0100 soc: microchip: mpfs: add auto-update subdev to system controller The PolarFire SoC's system controller offers the ability to re-program the FPGA from a user application via two, related, mechanisms. In-Application Programming (IAP) is not ideal for use in Linux, as it will immediately take down the system when requested. Auto Update is preferred, as it will only take affect at device power up*, allowing the OS (and potential applications in AMP) to be shut down gracefully. * Auto Update occurs at device initialisation, which can also be triggered by device reset - possible with the v2023.02 version of the Hart Software Services (HSS) and reference design. Signed-off-by: Conor Dooley commit a8f00589be7b9dfeae801bd3087ec7da57c1913e Author: Conor Dooley Date: Fri Oct 20 14:18:41 2023 +0100 soc: microchip: mpfs: print service status in warning message Now that resp_status is set for failed services, print the status in the error path's warning. Signed-off-by: Conor Dooley commit 742aa6c563d29c367edbf0ef7236a7a853ed9be4 Author: Conor Dooley Date: Fri Oct 20 14:18:40 2023 +0100 soc: microchip: mpfs: enable access to the system controller's flash The system controller has a flash that contains images used to reprogram the FPGA using IAP (In-Application Programming). Introduce a function that allows a driver with a reference to the system controller to get one to a flash device attached to it. Signed-off-by: Conor Dooley commit 98d62e97c39f9b54143d504290481bed96b9bab2 Author: Conor Dooley Date: Fri Oct 20 14:18:39 2023 +0100 dt-bindings: soc: microchip: add a property for system controller flash The system controller "shares" a SPI flash device with a QSPI controller in the MSS. This flash is used to store FPGA bitstreams & other metadata. IAP and Auto Upgrade both write images to this flash that the System Controller will use to re-program the FPGA. Add a phandle property signifying which flash device is connected to the system controller. Reviewed-by: Rob Herring Signed-off-by: Conor Dooley commit ecf9a253ce120082ce0a8aff806c4de4865cfcc5 Author: Vlastimil Babka Date: Fri Oct 27 12:34:18 2023 +0200 mm/slub: optimize free fast path code layout Inspection of kmem_cache_free() disassembly showed we could make the fast path smaller by providing few more hints to the compiler, and splitting the memcg_slab_free_hook() into an inline part that only checks if there's work to do, and an out of line part doing the actual uncharge. bloat-o-meter results: add/remove: 2/0 grow/shrink: 0/3 up/down: 286/-554 (-268) Function old new delta __memcg_slab_free_hook - 270 +270 __pfx___memcg_slab_free_hook - 16 +16 kfree 828 665 -163 kmem_cache_free 1116 948 -168 kmem_cache_free_bulk.part 1701 1478 -223 Checking kmem_cache_free() disassembly now shows the non-fastpath cases are handled out of line, which should reduce instruction cache usage. Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 3450a0e5a6fc4cdbd70853f12c0c332dd24c1349 Author: Vlastimil Babka Date: Mon Nov 13 18:04:05 2023 +0100 mm/slub: optimize alloc fastpath code layout With allocation fastpaths no longer divided between two .c files, we have better inlining, however checking the disassembly of kmem_cache_alloc() reveals we can do better to make the fastpaths smaller and move the less common situations out of line or to separate functions, to reduce instruction cache pressure. - split memcg pre/post alloc hooks to inlined checks that use likely() to assume there will be no objcg handling necessary, and non-inline functions doing the actual handling - add some more likely/unlikely() to pre/post alloc hooks to indicate which scenarios should be out of line - change gfp_allowed_mask handling in slab_post_alloc_hook() so the code can be optimized away when kasan/kmsan/kmemleak is configured out bloat-o-meter shows: add/remove: 4/2 grow/shrink: 1/8 up/down: 521/-2924 (-2403) Function old new delta __memcg_slab_post_alloc_hook - 461 +461 kmem_cache_alloc_bulk 775 791 +16 __pfx_should_failslab.constprop - 16 +16 __pfx___memcg_slab_post_alloc_hook - 16 +16 should_failslab.constprop - 12 +12 __pfx_memcg_slab_post_alloc_hook 16 - -16 kmem_cache_alloc_lru 1295 1023 -272 kmem_cache_alloc_node 1118 817 -301 kmem_cache_alloc 1076 772 -304 kmalloc_node_trace 1149 838 -311 kmalloc_trace 1102 789 -313 __kmalloc_node_track_caller 1393 1080 -313 __kmalloc_node 1397 1082 -315 __kmalloc 1374 1059 -315 memcg_slab_post_alloc_hook 464 - -464 Note that gcc still decided to inline __memcg_pre_alloc_hook(), but the code is out of line. Forcing noinline did not improve the results. As a result the fastpaths are shorter and overal code size is reduced. Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 49378a05ce7f01a203550eb7c2ef772f6d24565c Author: Vlastimil Babka Date: Thu Oct 26 17:45:42 2023 +0200 mm/slub: remove slab_alloc() and __kmem_cache_alloc_lru() wrappers slab_alloc() is a thin wrapper around slab_alloc_node() with only one caller. Replace with direct call of slab_alloc_node(). __kmem_cache_alloc_lru() itself is a thin wrapper with two callers, so replace it with direct calls of slab_alloc_node() and trace_kmem_cache_alloc(). This also makes sure _RET_IP_ has always the expected value and not depending on inlining decisions. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 4862caa5cba027bf7de925e05e4d1a64c89d81d6 Author: Vlastimil Babka Date: Tue Oct 3 16:57:59 2023 +0200 mm/slab: move kmalloc() functions from slab_common.c to slub.c This will eliminate a call between compilation units through __kmem_cache_alloc_node() and allow better inlining of the allocation fast path. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 5a9d31d980cbc9cefcee18e186bd4c5d51f3cba2 Author: Vlastimil Babka Date: Mon Nov 13 12:02:02 2023 +0100 mm/slab: move kmalloc_slab() to mm/slab.h In preparation for the next patch, move the kmalloc_slab() function to the header, as it will have callers from two files, and make it inline. To avoid unnecessary bloat, remove all size checks/warnings from kmalloc_slab() as they just duplicate those in callers, especially after recent changes to kmalloc_size_roundup(). We just need to adjust handling of zero size in __do_kmalloc_node(). Also we can stop handling NULL result from kmalloc_slab() there as that now cannot happen (unless called too early during boot). The size_index array becomes visible so rename it to a more specific kmalloc_size_index. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit b774d3e326d30fc8ef841101c399e44bdac2aa48 Author: Vlastimil Babka Date: Tue Oct 3 15:27:11 2023 +0200 mm/slab: move kfree() from slab_common.c to slub.c This should result in better code. Currently kfree() makes a function call between compilation units to __kmem_cache_free() which does its own virt_to_slab(), throwing away the struct slab pointer we already had in kfree(). Now it can be reused. Additionally kfree() can now inline the whole SLUB freeing fastpath. Also move over free_large_kmalloc() as the only callsites are now in slub.c, and make it static. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit b52ef56e9b324b172053b03d8c775ef4708fbc23 Author: Vlastimil Babka Date: Tue Oct 3 14:57:49 2023 +0200 mm/slab: move struct kmem_cache_node from slab.h to slub.c The declaration and associated helpers are not used anywhere else anymore. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 0bedcc66d2a43a50ab660273842f4737a293dd8a Author: Vlastimil Babka Date: Tue Oct 3 14:52:47 2023 +0200 mm/slab: move memcg related functions from slab.h to slub.c We don't share those between SLAB and SLUB anymore, so most memcg related functions can be moved to slub.c proper. Reviewed-by: Kees Cook Acked-by: Michal Hocko Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 6011be59910fb12b757f9d37793d21763268b4a1 Author: Vlastimil Babka Date: Tue Oct 3 11:57:45 2023 +0200 mm/slab: move pre/post-alloc hooks from slab.h to slub.c We don't share the hooks between two slab implementations anymore so they can be moved away from the header. As part of the move, also move should_failslab() from slab_common.c as the pre_alloc hook uses it. This means slab.h can stop including fault-inject.h and kmemleak.h. Fix up some files that were depending on the includes transitively. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 89c2d061bfa7fe2b5bcb1393a7a79bb5db8d4140 Author: Vlastimil Babka Date: Tue Oct 3 11:15:54 2023 +0200 mm/slab: consolidate includes in the internal mm/slab.h The #include's are scattered at several places of the file, but it does not seem this is needed to prevent any include loops (anymore?) so consolidate them at the top. Also move the misplaced kmem_cache_init() declaration away from the top. Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 19975f83412fbb9b1458f3dfbf16ca043a57788a Author: Vlastimil Babka Date: Tue Oct 3 09:59:48 2023 +0200 mm/slab: move the rest of slub_def.h to mm/slab.h mm/slab.h is the only place to include include/linux/slub_def.h which has allowed switching between SLAB and SLUB. Now we can simply move the contents over and remove slub_def.h. Use this opportunity to fix up some whitespace (alignment) issues. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 7ef08ae8277c66657127844179912214c67fb4bc Author: Vlastimil Babka Date: Tue Oct 3 09:54:15 2023 +0200 mm/slab: move struct kmem_cache_cpu declaration to slub.c Nothing outside SLUB itself accesses the struct kmem_cache_cpu fields so it does not need to be declared in slub_def.h. This allows also to move enum stat_item. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 16a1d968358aa9e897ce995fa45cb15d55a0e83d Author: Vlastimil Babka Date: Mon Oct 2 20:43:43 2023 +0200 mm/slab: remove mm/slab.c and slab_def.h Remove the SLAB implementation. Update CREDITS. Also update and properly sort the SLOB entry there. RIP SLAB allocator (1996 - 2024) Reviewed-by: Kees Cook Acked-by: Christoph Lameter Acked-by: David Rientjes Tested-by: David Rientjes Acked-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 88f29324042752a28245ec0ab285d71c7f4d9c6a Author: Johannes Berg Date: Thu Nov 30 22:50:58 2023 +0100 wifi: cfg80211: make RX assoc data const This is just a collection of data and we only read it, so make it const. Signed-off-by: Johannes Berg commit ccf7dd94c7a710a095a56e786a5e0e819618c597 Author: Johannes Berg Date: Thu Nov 30 22:39:41 2023 +0100 wifi: nl80211: refactor nl80211_send_mlme_event() arguments This function has so many arguments already, before adding yet another one, refactor it to take a struct instead. Signed-off-by: Johannes Berg commit 7d7a252842ecafb9b4541dc8470907e97bc6df62 Author: Hans de Goede Date: Sat Dec 2 23:46:14 2023 +0100 HID: i2c-hid: Renumber I2C_HID_QUIRK_ defines The quirks variable and the I2C_HID_QUIRK_ defines are never used / exported outside of the i2c-hid code renumber them to start at BIT(0) again. Reviewed-by: Douglas Anderson Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit bd008acdac45011f2246ec2518ef19c2da9e6008 Author: Hans de Goede Date: Sat Dec 2 23:46:13 2023 +0100 HID: i2c-hid: Remove I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV quirk Re-trying the power-on command on failure on all devices should not be a problem, drop the I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV quirk and simply retry power-on on all devices. Reviewed-by: Douglas Anderson Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 7bcf9ebb50f2afc84b33b06edfd20d47218af758 Author: Hans de Goede Date: Sat Dec 2 23:46:12 2023 +0100 HID: i2c-hid: Turn missing reset ack into a warning On all i2c-hid devices seen sofar the reset-ack either works, or the hw is somehow buggy and does not (always) ack the reset properly, yet it still works fine. Lower the very long reset timeout to 1 second which should be plenty and change the reset not getting acked from an error into a warning. This results in a bit cleaner code and avoids the need to add more I2C_HID_QUIRK_NO_IRQ_AFTER_RESET quirks in the future. Reviewed-by: Douglas Anderson Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit af93a167eda90192563bce64c4bb989836afac1f Author: Hans de Goede Date: Sat Dec 2 23:46:11 2023 +0100 HID: i2c-hid: Move i2c_hid_finish_hwreset() to after reading the report-descriptor A recent bug made me look at Microsoft's i2c-hid docs again and I noticed the following: """ 4. Issue a RESET (Host Initiated Reset) to the Device. 5. Retrieve report descriptor from the device. Note: Steps 4 and 5 may be done in parallel to optimize for time on I²C. Since report descriptors are (a) static and (b) quite long, Windows 8 may issue a request for 5 while it is waiting for a response from the device on 4. """ Which made me think that maybe on some touchpads the reset ack is delayed till after the report descriptor is read ? Testing a T-BAO Tbook Air 12.5 with a 0911:5288 (SIPODEV SP1064?) touchpad, for which the I2C_HID_QUIRK_NO_IRQ_AFTER_RESET quirk was first introduced, shows that reading the report descriptor before waiting for the reset helps with the missing reset IRQ. Now the reset does get acked properly, but the ack sometimes still does not happen unfortunately. Still moving the wait for ack to after reading the report-descriptor, is probably a good idea, both to make i2c-hid's behavior closer to Windows as well as to speed up probing i2c-hid devices. While at it drop the dbg_hid() for a malloc failure, malloc failures already get logged extensively by malloc itself. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2247751 Signed-off-by: Hans de Goede Reviewed-by: Douglas Anderson Signed-off-by: Jiri Kosina commit aa69d6974185e9f7a552ba982540a38e34f69690 Author: Hans de Goede Date: Sat Dec 2 23:46:10 2023 +0100 HID: i2c-hid: Switch i2c_hid_parse() to goto style error handling Switch i2c_hid_parse() to goto style error handling. This is a preparation patch for removing the need for I2C_HID_QUIRK_NO_IRQ_AFTER_RESET by making i2c-hid behave more like Windows. Note this changes the descriptor read error path to propagate the actual i2c_hid_read_register() error code (which is always negative) instead of hardcoding a -EIO return. Reviewed-by: Douglas Anderson Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 96d3098db835d58649b73a5788898bd7672a319b Author: Hans de Goede Date: Sat Dec 2 23:46:09 2023 +0100 HID: i2c-hid: Split i2c_hid_hwreset() in start() and finish() functions Split i2c_hid_hwreset() into: i2c_hid_start_hwreset() which sends the PWR_ON and reset commands; and i2c_hid_finish_hwreset() which actually waits for the reset to complete. This is a preparation patch for removing the need for I2C_HID_QUIRK_NO_IRQ_AFTER_RESET by making i2c-hid behave more like Windows. No functional changes intended. Reviewed-by: Douglas Anderson Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit f023605d1de6f150d9266747a2630f029956041f Author: Hans de Goede Date: Sat Dec 2 23:46:08 2023 +0100 HID: i2c-hid: Fold i2c_hid_execute_reset() into i2c_hid_hwreset() i2c_hid_hwreset() is the only caller of i2c_hid_execute_reset(), fold the latter into the former. This is a preparation patch for removing the need for I2C_HID_QUIRK_NO_IRQ_AFTER_RESET by making i2c-hid behave more like Windows. No functional changes intended. Reviewed-by: Douglas Anderson Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 42a244be36cda2da571c72feb5d1d2b45866735f Author: Even Xu Date: Tue Dec 5 09:50:33 2023 +0800 platform/chrome: cros_ec_ishtp: use helper functions for connection Use helper functions ishtp_cl_establish_connection() and ishtp_cl_destroy_connection() to establish and destroy connection respectively. These functions are used during initialization, reset and deinitialization flows. No functional changes are expected. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Acked-by: Tzung-Bi Shih Signed-off-by: Jiri Kosina commit 09b57d983e0d85d223e11e1e69de4d3f0b675bf1 Author: Even Xu Date: Tue Dec 5 09:50:32 2023 +0800 HID: intel-ish-hid: ishtp-fw-loader: use helper functions for connection Use helper functions ishtp_cl_establish_connection() and ishtp_cl_destroy_connection() to establish and destroy connection respectively. These functions are used during initialization, reset and deinitialization flows. No functional changes are expected. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit f645a90e8ff732c48dd9f18815baef08c44ac8a0 Author: Even Xu Date: Tue Dec 5 09:50:31 2023 +0800 HID: intel-ish-hid: ishtp-hid-client: use helper functions for connection Use helper functions ishtp_cl_establish_connection() and ishtp_cl_destroy_connection() to establish and destroy connection respectively. These functions are used during initialization, reset and deinitialization flows. No functional changes are expected. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit a3a44d2d3a5c5ff6e73c711db5b1911b5a676bb0 Author: Even Xu Date: Tue Dec 5 09:50:30 2023 +0800 HID: Intel-ish-hid: Ishtp: Add helper functions for client connection For every ishtp client driver during initialization state, the flow is: 1 - Allocate an ISHTP client instance 2 - Reserve a host id and link the client instance 3 - Search a firmware client using UUID and get related client information 4 - Bind firmware client id to the ISHTP client instance 5 - Set the state the ISHTP client instance to CONNECTING 6 - Send connect request to firmware 7 - Register event callback for messages from the firmware During deinitizalization state, the flow is: 9 - Set the state the ISHTP client instance to ISHTP_CL_DISCONNECTING 10 - Issue disconnect request to firmware 11 - Unlike the client instance 12 - Flush message queue 13 - Free ISHTP client instance Step 2-7 are identical to the steps of client driver initialization and driver reset flow, but reallocation of the RX/TX ring buffers can be avoided in reset flow. Also for step 9-12, they are identical to the steps of client driver failure handling after connect request, driver reset flow and driver removing. So, add two helper functions to simplify client driver code. ishtp_cl_establish_connection() ishtp_cl_destroy_connection() No functional changes are expected. Signed-off-by: Even Xu Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 4a23d0f9814c38308dc82b6dbc466666a400b27d Author: Ashish Mhetre Date: Tue Dec 5 11:30:45 2023 +0530 memory: tegra: Protect SID override call under CONFIG_IOMMU_API tegra186_mc_client_sid_override() is protected under CONFIG_IOMMU_API. Call to this function is being made from tegra186_mc_resume() without any protection which is leading to build failure when CONFIG_IOMMU_API is not set. Fix this by protecting SID override function call from tegra186_mc_resume() under CONFIG_IOMMU_API. Fixes: fe3b082a6eb8 ("memory: tegra: Add SID override programming for MC clients") Signed-off-by: Ashish Mhetre Reported-by: Randy Dunlap Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20231205060045.7985-1-amhetre@nvidia.com Signed-off-by: Krzysztof Kozlowski commit aa5d7cf88bdebe5376970d79878f16d28536f7e2 Author: Thomas Zimmermann Date: Mon Dec 4 10:07:53 2023 +0100 drm/xlnx: Do not include Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231204090852.1650-9-tzimmermann@suse.de commit 81b32f4393cde612e022ff35b556b28001350d3b Author: Thomas Zimmermann Date: Mon Dec 4 10:07:52 2023 +0100 drm/simpledrm: Do not include Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng Reviewed-by: Javier Martinez Canillas Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231204090852.1650-8-tzimmermann@suse.de commit 7e661a06998e06455563b2ff6198c7f3efe31cf2 Author: Thomas Zimmermann Date: Mon Dec 4 10:07:51 2023 +0100 drm/ofdrm: Do not include Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231204090852.1650-7-tzimmermann@suse.de commit 9e8f373e8a77c5192532bab6ea267b329fe66b77 Author: Thomas Zimmermann Date: Mon Dec 4 10:07:50 2023 +0100 drm/solomon: Do not include Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Geert Uytterhoeven Reviewed-by: Javier Martinez Canillas Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231204090852.1650-6-tzimmermann@suse.de commit 2887875256d486c0cbb544e67932526bd681e209 Author: Thomas Zimmermann Date: Mon Dec 4 10:07:49 2023 +0100 drm/shmobile: Do not include Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Geert Uytterhoeven Reviewed-by: Alex Deucher Acked-by: Geert Uytterhoeven Link: https://patchwork.freedesktop.org/patch/msgid/20231204090852.1650-5-tzimmermann@suse.de commit 85ddae2392b5673aa4bda3c7d14d205d1ed069fe Author: Thomas Zimmermann Date: Mon Dec 4 10:07:48 2023 +0100 drm/loongson: Do not include Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng Reviewed-by: Alex Deucher Tested-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231204090852.1650-4-tzimmermann@suse.de commit bb8532601260209d1ee40c52d15e98578b703e47 Author: Thomas Zimmermann Date: Mon Dec 4 10:07:47 2023 +0100 drm/amdgpu: Do not include Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher Reviewed-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/20231204090852.1650-3-tzimmermann@suse.de commit a0fce84cb1b3b88d3d5853f7ac5f1a3ef7e38620 Author: Thomas Zimmermann Date: Mon Dec 4 10:07:46 2023 +0100 drm/plane-helper: Move drm_plane_helper_atomic_check() into udl The udl driver is the only caller of drm_plane_helper_atomic_check(). Move the function into the driver. No functional changes. v2: * fix documenation (Sui) Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher Acked-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231204090852.1650-2-tzimmermann@suse.de commit c692ba6de1c5b4dc8cad0ba70281ba4cf9d2fdac Author: Fabio Estevam Date: Sat Nov 25 14:35:29 2023 +0200 mtd: spi-nor: micron-st: Add support for mt25qu01g Add support for the MT25QU01G 128MB Micron Serial NOR Flash Memory model. Link: https://www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-b/mt25q_qlkt_u_01g_bbb_0.pdf Signed-off-by: Fabio Estevam [ta: introduce die erase] Link: https://lore.kernel.org/r/20231125123529.55686-6-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 06de1257aae787fe3af14d03b9ceb0b9f6af9e1f Author: Tudor Ambarus Date: Sat Nov 25 14:35:28 2023 +0200 mtd: spi-nor: remove NO_CHIP_ERASE flag There's no flash using it and we'd like to rely instead on SFDP data, thus remove it. Tested-by: Fabio Estevam Link: https://lore.kernel.org/r/20231125123529.55686-5-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 53919a968b43648822f2d35b6cafacd3950238cc Author: Tudor Ambarus Date: Sat Nov 25 14:35:27 2023 +0200 mtd: spi-nor: micron-st: enable die erase for multi die flashes Enable die erase for multi die flashes, it will speed the erase time. Unfortunately, Micron does not provide a 4-byte opcode equivalent for the die erase. The SFDP 4BAIT table fails to consider the die erase too, the standard can be improved. Thus we're forced to enter in the 4 byte address mode in order to benefit of the die erase. Tested on n25q00. This flash defines the 4BAIT SFDP table, thus it will use the 4BAIT opcodes for reads, page programs or erases, with the exception that it will use the die erase command in the 4 byte address mode. Link: https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/n25q/n25q_1gb_3v_65nm.pdf?rev=b6eba74759984f749f8c039bc5bc47b7 Link: https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-b/mt25q_qlkt_l_02g_cbb_0.pdf?rev=43f7f66fc8da4d7d901b35fa51284c8f Link: https://lore.kernel.org/r/20231125123529.55686-4-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 461d0babb54462188c98818b472e6a3d5a91fd60 Author: Tudor Ambarus Date: Sat Nov 25 14:35:26 2023 +0200 mtd: spi-nor: spansion: enable die erase for multi die flashes Enable die erase for spansion multi die flashes. Tested-by: Takahiro Kuwano Link: https://lore.kernel.org/r/20231125123529.55686-3-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit ebd6292926d88c1b2614f809b51367ee3dc8955e Author: Fabio Estevam Date: Tue Dec 5 11:47:13 2023 -0300 ARM: dts: imx23/28: Remove undocumented "fsl,clkctrl" Per imx23-clock.yaml and imx28-clock.yaml, fsl,clkctrl is not a valid compatible string. Remove it to fix the following dt-schema warning: imx28-evk.dtb: clkctrl@80040000: compatible: ['fsl,imx28-clkctrl', 'fsl,clkctrl'] is too long from schema $id: http://devicetree.org/schemas/clock/imx28-clock.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 9641423174d05da32543e96ced66bb30cebcce16 Author: Tudor Ambarus Date: Sat Nov 25 14:35:25 2023 +0200 mtd: spi-nor: add erase die (chip) capability JESD216 mentions die erase, but does not provide an opcode for it. Check BFPT dword 11, bits 30:24, "Chip Erase, Typical time", it says: "Typical time to erase one chip (die). User must poll device busy to determine if the operation has completed. For a device consisting of multiple dies, that are individually accessed, the time is for each die to which a chip erase command is applied." So when a flash consists of a single die, this is the erase time for the full chip (die) erase, and when it consists of multiple dies, it's the die erase time. Chip and die are the same thing. Add support for die erase. For now, benefit of the die erase when addr and len are aligned with die size. This could be improved however for the uniform and non-uniform erases cases to use the die erase when possible. For example if one requests that an erase of a 2 die device starting from the last 64KB of the first die to the end of the flash size, we could use just 2 commands, a 64KB erase and a die erase. This improvement is left as an exercise for the reader. Tested-by: Fabio Estevam Link: https://lore.kernel.org/r/20231125123529.55686-2-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit e843ca2f30e630675e2d2a75c96f4844f2854430 Author: Dmitry Baryshkov Date: Sun Dec 3 03:24:37 2023 +0300 drm/msm/dpu: correct clk bit for WB2 block On sc7280 there are two clk bits for WB2: vbif_cli and clk_ctrl. While programming the VBIF params of WB, the driver should be toggling the former bit, while the sc7180_mdp, sc7280_mdp and sm8250_mdp structs list the latter one. Correct that to ensure proper programming sequence for WB2 on these platforms. Fixes: 255f056181ac ("drm/msm/dpu: sc7180: add missing WB2 clock control") Fixes: 3ce166380567 ("drm/msm/dpu: add writeback support for sc7280") Fixes: 53324b99bd7b ("drm/msm/dpu: add writeback blocks to the sm8250 DPU catalog") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Paloma Arellano Patchwork: https://patchwork.freedesktop.org/patch/570185/ Link: https://lore.kernel.org/r/20231203002437.1291595-1-dmitry.baryshkov@linaro.org commit 94f8f319cbcbddce8f82bfaf8ed39eb57efdd457 Author: Thomas Zimmermann Date: Wed Nov 22 13:09:43 2023 +0100 drm: Remove Kconfig option for legacy support (CONFIG_DRM_LEGACY) Remove CONFIG_DRM_LEGACY from Kconfig. Nothing depends on the option. Signed-off-by: Thomas Zimmermann Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-15-tzimmermann@suse.de commit 87be41f09ac92cee6d0124636f49fac21dfd445e Author: Thomas Zimmermann Date: Wed Nov 22 13:09:42 2023 +0100 char/agp: Remove frontend code The AGP subsystem supports a user-space interface via /dev/agpgart. It is only enabled with DRM support for mode setting in user space. (i.e., CONFIG_DRM_LEGACY). All of that DRM code has been removed and the option will go away. Hence remove the AGP frontend. Modern DRM drivers with kernel mode setting handle AGP support internally. Signed-off-by: Thomas Zimmermann Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-14-tzimmermann@suse.de commit 2504c7ec728b7a2b6ca067e2a908fd1af2aad57c Author: Thomas Zimmermann Date: Wed Nov 22 13:09:41 2023 +0100 drm: Remove source code for non-KMS drivers Remove all remaining source code for non-KMS drivers. These drivers have been removed in v6.3 and won't comeback. Signed-off-by: Thomas Zimmermann Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-13-tzimmermann@suse.de commit 2798ffcc1d6a788b5769b1fbcf0750dfc06ae98a Author: Thomas Zimmermann Date: Wed Nov 22 13:09:40 2023 +0100 drm: Remove locking for legacy ioctls and DRM_UNLOCKED Modern DRM drivers acquire ioctl locks by themselves. Legacy ioctls for user-space mode setting used to acquire drm_global_mutex. After removing the ioctl entry points, also remove the locking code. The only legacy ioctl without global locking was VBLANK_WAIT, which has been removed as well. Hence remove the related DRM_UNLOCKED flag. Signed-off-by: Thomas Zimmermann Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-12-tzimmermann@suse.de commit 2722ac1ce1c1f3e6a3a0c59f0072b2f9ba136551 Author: Thomas Zimmermann Date: Wed Nov 22 13:09:39 2023 +0100 drm: Remove support for legacy drivers Remove all hooks and calls into code for user-space mode setting from the DRM core. Without the drivers and ioctl entry points, none of this is required any longer. Signed-off-by: Thomas Zimmermann Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-11-tzimmermann@suse.de commit 6bb0814be42e109555dd63e59e6eabf968b9b016 Author: Thomas Zimmermann Date: Wed Nov 22 13:09:38 2023 +0100 drm: Remove the legacy DRM_IOCTL_MODESET_CTL ioctl DRM drivers with user-space mode setting have been removed in Linux v6.3. [1] Now remove the ioctl entry points for these drivers. Invoking any of the ioctl ops will unconditionally return -EINVAL to user space. Invoking DRM_IOCTL_MODESET_CTL is different from the other legacy ioctl ops as it returns 0 even without CONFIG_DRM_LEGACY set. From the original commit 29935554b384 ("drm: Disallow DRM_IOCTL_MODESET_CTL for KMS drivers") it is not apparent how or why the operation differs from the others. It is likely just an oversight in commit 61ae227032e7 ("drm: allow removal of legacy codepaths (v4.1)"), which allowed disabling leagacy ioctls in the first place. Still keep this removal separate from the other ioctls to allow an easy revert, if necessary. Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/series/111602/ # [1] Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-10-tzimmermann@suse.de commit 184dcdc251420929bf195f99f0b9fb6960788b6d Author: Thomas Zimmermann Date: Wed Nov 22 13:09:37 2023 +0100 drm: Remove entry points for legacy ioctls DRM drivers with user-space mode setting have been removed in Linux v6.3. [1] Now remove the ioctl entry points for these drivers. Invoking any of the ioctl ops will unconditionally return -EINVAL to user space. This has already been the behavior for kernels without CONFIG_DRM_LEGACY set. Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/series/111602/ # [1] Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-9-tzimmermann@suse.de commit c45a1e0a2e9d3f6b37d27e636ba905678c84a41a Author: Thomas Zimmermann Date: Wed Nov 22 13:09:36 2023 +0100 drm/radeon: Do not include Including is not required by radeon. Signed-off-by: Thomas Zimmermann Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: amd-gfx@lists.freedesktop.org Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-8-tzimmermann@suse.de commit 9f4db4495b6fa551f18a892f32c71899a20f4923 Author: Thomas Zimmermann Date: Wed Nov 22 13:09:35 2023 +0100 drm: Include Include in drm_ioc32.c. Resolves a depenency on , which will be removed. Signed-off-by: Thomas Zimmermann Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-7-tzimmermann@suse.de commit 64c39a93ef6c45447bc093e34e02afeb4c063579 Author: Thomas Zimmermann Date: Wed Nov 22 13:09:34 2023 +0100 accel: Include One of the source files includes via , which will be removed. Include drm_auth.h directly. Signed-off-by: Thomas Zimmermann Cc: Oded Gabbay Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-6-tzimmermann@suse.de commit 786b96d01919f8876187d75a6a995ac5783ed0f5 Author: Thomas Zimmermann Date: Wed Nov 22 13:09:33 2023 +0100 drm/i915: Include One of the source files includes via , which will be removed. Include drm_auth.h directly. Signed-off-by: Thomas Zimmermann Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-5-tzimmermann@suse.de commit 972c45e892448f698047f312763eb984c0b8d7c3 Author: Thomas Zimmermann Date: Wed Nov 22 13:09:32 2023 +0100 drm: Include One of the source files includes via , which will be removed. Include drm_auth.h directly. Signed-off-by: Thomas Zimmermann Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-4-tzimmermann@suse.de commit 9cf5ca1f485cae406968947a92bf304603999fa1 Author: Thomas Zimmermann Date: Wed Nov 22 13:09:31 2023 +0100 drm: Fix TODO list mentioning non-KMS drivers Non-KMS drivers have been removed from DRM. Update the TODO list accordingly. Signed-off-by: Thomas Zimmermann Fixes: a276afc19eec ("drm: Remove some obsolete drm pciids(tdfx, mga, i810, savage, r128, sis, via)") Cc: Cai Huoqing Cc: Daniel Vetter Cc: Dave Airlie Cc: Thomas Zimmermann Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Jonathan Corbet Cc: dri-devel@lists.freedesktop.org Cc: # v6.3+ Cc: linux-doc@vger.kernel.org Reviewed-by: David Airlie Reviewed-by: Daniel Vetter Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231122122449.11588-3-tzimmermann@suse.de commit c4a5118a3ae1eadc687d84eef9431f9e13eb015c Author: Alexandra Diupina Date: Tue Dec 5 18:12:20 2023 +0300 cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() devm_of_clk_add_hw_provider() may return an errno, so add a return value check Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 8410e7f3b31e ("cpufreq: scmi: Fix OPP addition failure with a dummy clock provider") Signed-off-by: Alexandra Diupina Signed-off-by: Viresh Kumar commit 021b0c952f226236f2edf89c737efb9a28d1422d Merge: 2f57dd94bdef0 5858036ca0565 Author: Jakub Kicinski Date: Tue Dec 5 20:49:53 2023 -0800 Merge branch 'ionic-more-driver-fixes' Shannon Nelson says: ==================== ionic: more driver fixes These are a few code cleanup items that appeared first in a separate net patchset, https://lore.kernel.org/netdev/20231201000519.13363-1-shannon.nelson@amd.com/ but are now aimed for net-next. ==================== Link: https://lore.kernel.org/r/20231204210936.16587-1-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 5858036ca05658051ec61551e6699cca9c7d3369 Author: Brett Creeley Date: Mon Dec 4 13:09:36 2023 -0800 ionic: Re-arrange ionic_intr_info struct for cache perf dim_coal_hw is accessed in the hotpath along with other values from the first cacheline of ionic_intr_info. So, re-arrange the structure so the hot path variables are on the first cacheline. Before: struct ionic_intr_info { char name[32]; /* 0 32 */ unsigned int index; /* 32 4 */ unsigned int vector; /* 36 4 */ u64 rearm_count; /* 40 8 */ unsigned int cpu; /* 48 4 */ /* XXX 4 bytes hole, try to pack */ cpumask_t affinity_mask; /* 56 1024 */ /* --- cacheline 16 boundary (1024 bytes) was 56 bytes ago --- */ u32 dim_coal_hw; /* 1080 4 */ /* size: 1088, cachelines: 17, members: 7 */ /* sum members: 1080, holes: 1, sum holes: 4 */ /* padding: 4 */ }; After: struct ionic_intr_info { char name[32]; /* 0 32 */ u64 rearm_count; /* 32 8 */ unsigned int index; /* 40 4 */ unsigned int vector; /* 44 4 */ unsigned int cpu; /* 48 4 */ u32 dim_coal_hw; /* 52 4 */ cpumask_t affinity_mask; /* 56 1024 */ /* size: 1080, cachelines: 17, members: 7 */ /* last cacheline: 56 bytes */ }; Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Florian Fainelli Reviewed-by: Rahul Rameshbabu Link: https://lore.kernel.org/r/20231204210936.16587-6-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit ab807e9183425ddf6dd85ca622a51fe4cad2c577 Author: Brett Creeley Date: Mon Dec 4 13:09:35 2023 -0800 ionic: Make the check for Tx HW timestamping more obvious Currently the checks are: [1] unlikely(q->features & IONIC_TXQ_F_HWSTAMP) [2] !unlikely(q->features & IONIC_TXQ_F_HWSTAMP) [1] is clear enough, but [2] isn't exactly obvious to the reader because !unlikely reads as likely. However, that's not what this means. [2] means that it's unlikely that the q has IONIC_TXQ_F_HWSTAMP enabled. Write an inline helper function to hide the unlikely optimization to make these checks more readable. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Florian Fainelli Reviewed-by: Rahul Rameshbabu Link: https://lore.kernel.org/r/20231204210936.16587-5-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 2d0b80c3a550f7828f26dba029c2b9346be789af Author: Brett Creeley Date: Mon Dec 4 13:09:34 2023 -0800 ionic: Don't check null when calling vfree() vfree() checks for null internally, so there's no need to check in the caller. So, always vfree() on variables allocated with valloc(). If the variables are never alloc'd vfree() is still safe. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Florian Fainelli Reviewed-by: Rahul Rameshbabu Link: https://lore.kernel.org/r/20231204210936.16587-4-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 46ca79d28fd7f2bbccf226fc0be59c2bd8d63dfe Author: Shannon Nelson Date: Mon Dec 4 13:09:33 2023 -0800 ionic: set ionic ptr before setting up ethtool ops Set the lif->ionic value that is used in some ethtool callbacks before setting ethtool ops. There really shouldn't be any race issues before this change since the netdev hasn't been registered yet, but this seems more correct. Signed-off-by: Shannon Nelson Reviewed-by: Brett Creeley Reviewed-by: Florian Fainelli Reviewed-by: Rahul Rameshbabu Link: https://lore.kernel.org/r/20231204210936.16587-3-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 15e54faa5d5e4840974de7fb5cd737c2179a309a Author: Brett Creeley Date: Mon Dec 4 13:09:32 2023 -0800 ionic: Use cached VF attributes Each time a VF attribute is set via iproute a call to get the VF configuration is also made. This is currently problematic because for each VF configuration call there are multiple commands sent to the device. Unfortunately, this doesn't scale well. Fix this by reporting the cached VF attributes. The original change to query the device for getting the VF attributes f16f5be31009 ("ionic: Query FW when getting VF info via ndo_get_vf_config") was made to remain consistent with device set VF attributes. However, after further investigation there is no need to query the device. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Reviewed-by: Florian Fainelli Reviewed-by: Rahul Rameshbabu Link: https://lore.kernel.org/r/20231204210936.16587-2-shannon.nelson@amd.com Signed-off-by: Jakub Kicinski commit 2f57dd94bdef083855366138646b26b05f410d99 Author: Yan Zhai Date: Mon Dec 4 11:33:28 2023 -0800 packet: add a generic drop reason for receive Commit da37845fdce2 ("packet: uses kfree_skb() for errors.") switches from consume_skb to kfree_skb to improve error handling. However, this could bring a lot of noises when we monitor real packet drops in kfree_skb[1], because in tpacket_rcv or packet_rcv only packet clones can be freed, not actual packets. Adding a generic drop reason to allow distinguish these "clone drops". [1]: https://lore.kernel.org/netdev/CABWYdi00L+O30Q=Zah28QwZ_5RU-xcxLFUK2Zj08A8MrLk9jzg@mail.gmail.com/ Fixes: da37845fdce2 ("packet: uses kfree_skb() for errors.") Suggested-by: Eric Dumazet Suggested-by: Willem de Bruijn Signed-off-by: Yan Zhai Reviewed-by: Eric Dumazet Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/ZW4piNbx3IenYnuw@debian.debian Signed-off-by: Jakub Kicinski commit 19b707c3f23a7923ab40732521123d9b59965cc4 Author: Coco Li Date: Mon Dec 4 22:07:28 2023 +0000 Documentations: fix net_cachelines documentation build warning Original errors: Documentation/networking/net_cachelines/index.rst:3: WARNING: Explicit markup ends without a blank line; unexpected unindent. Documentation/networking/net_cachelines/inet_connection_sock.rst:3: WARNING: Explicit markup ends without a blank line; unexpected unindent. Documentation/networking/net_cachelines/inet_sock.rst:3: WARNING: Explicit markup ends without a blank line; unexpected unindent. Documentation/networking/net_cachelines/net_device.rst:3: WARNING: Explicit markup ends without a blank line; unexpected unindent. Documentation/networking/net_cachelines/netns_ipv4_sysctl.rst:3: WARNING: Explicit markup ends without a blank line; unexpected unindent. Documentation/networking/net_cachelines/snmp.rst:3: WARNING: Explicit markup ends without a blank line; unexpected unindent. Documentation/networking/net_cachelines/tcp_sock.rst:3: WARNING: Explicit markup ends without a blank line; unexpected unindent. Fixes: 14006f1d8fa2 ("Documentations: Analyze heavily used Networking related structs") Signed-off-by: Coco Li Link: https://lore.kernel.org/r/20231204220728.746134-1-lixiaoyan@google.com Signed-off-by: Jakub Kicinski commit facd15dfd69122042502d99ab8c9f888b48ee994 Author: Johannes Berg Date: Mon Dec 4 21:47:07 2023 +0100 net: core: synchronize link-watch when carrier is queried There are multiple ways to query for the carrier state: through rtnetlink, sysfs, and (possibly) ethtool. Synchronize linkwatch work before these operations so that we don't have a situation where userspace queries the carrier state between the driver's carrier off->on transition and linkwatch running and expects it to work, when really (at least) TX cannot work until linkwatch has run. I previously posted a longer explanation of how this applies to wireless [1] but with this wireless can simply query the state before sending data, to ensure the kernel is ready for it. [1] https://lore.kernel.org/all/346b21d87c69f817ea3c37caceb34f1f56255884.camel@sipsolutions.net/ Signed-off-by: Johannes Berg Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20231204214706.303c62768415.I1caedccae72ee5a45c9085c5eb49c145ce1c0dd5@changeid Signed-off-by: Jakub Kicinski commit faf4cf7495431d396147d5c73a84ccfddc458c9d Merge: 5aa00e9e41f27 d5fed5addb2b6 Author: Jakub Kicinski Date: Tue Dec 5 20:16:08 2023 -0800 Merge branch 'reorganize-remaining-patch-of-networking-struct-cachelines' Coco Li says: ==================== Reorganize remaining patch of networking struct cachelines Rebase patches to top-of-head in https://lwn.net/Articles/951321/ to ensure the results of the cacheline savings are still accurate. ==================== Link: https://lore.kernel.org/r/20231204201232.520025-1-lixiaoyan@google.com Signed-off-by: Jakub Kicinski commit d5fed5addb2b6bc13035de4338b7ea2052a2e006 Author: Coco Li Date: Mon Dec 4 20:12:31 2023 +0000 tcp: reorganize tcp_sock fast path variables The variables are organized according in the following way: - TX read-mostly hotpath cache lines - TXRX read-mostly hotpath cache lines - RX read-mostly hotpath cache lines - TX read-write hotpath cache line - TXRX read-write hotpath cache line - RX read-write hotpath cache line Fastpath cachelines end after rcvq_space. Cache line boundaries are enforced only between read-mostly and read-write. That is, if read-mostly tx cachelines bleed into read-mostly txrx cachelines, we do not care. We care about the boundaries between read and write cachelines because we want to prevent false sharing. Fast path variables span cache lines before change: 12 Fast path variables span cache lines after change: 8 Suggested-by: Eric Dumazet Reviewed-by: Wei Wang Signed-off-by: Coco Li Reviewed-by: Eric Dumazet Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20231204201232.520025-3-lixiaoyan@google.com Signed-off-by: Jakub Kicinski commit 43a71cd66b9c0a4af3d15d8644359fde35bdbed0 Author: Coco Li Date: Mon Dec 4 20:12:30 2023 +0000 net-device: reorganize net_device fast path variables Reorganize fast path variables on tx-txrx-rx order Fastpath variables end after npinfo. Below data generated with pahole on x86 architecture. Fast path variables span cache lines before change: 12 Fast path variables span cache lines after change: 4 Suggested-by: Eric Dumazet Signed-off-by: Coco Li Reviewed-by: Eric Dumazet Reviewed-by: David Ahern Link: https://lore.kernel.org/r/20231204201232.520025-2-lixiaoyan@google.com Signed-off-by: Jakub Kicinski commit 5aa00e9e41f2742223fe4ca89d94410d2477118d Author: Shinas Rasheed Date: Mon Dec 4 07:49:39 2023 -0800 octeon_ep: control net API framework to support offloads Inquire firmware on supported offloads, as well as convey offloads enabled dynamically to firmware. New control net API functionality is required for the above. Implement control net API framework for offloads. Additionally, fetch/insert offload metadata from hardware RX/TX buffer respectively during receive/transmit. Currently supported offloads include checksum and TSO. Signed-off-by: Shinas Rasheed Link: https://lore.kernel.org/r/20231204154940.2583140-1-srasheed@marvell.com Signed-off-by: Jakub Kicinski commit 93df7cc6d39600ca65f0e0dc6b16d2c042a129b5 Merge: f3c928008ab21 eb6a6605ff5a2 Author: Jakub Kicinski Date: Tue Dec 5 20:10:16 2023 -0800 Merge branch 'net-mvmdio-performance-related-improvements' Tobias Waldekranz says: ==================== net: mvmdio: Performance related improvements Observations of the XMDIO bus on a CN9130-based system during a firmware download showed a very low bus utilization, which stemmed from the 150us (10x the average access time) sleep which would take place when the first poll did not succeed. With this series in place, bus throughput increases by about 10x, multiplied by whatever gain you are able to extract from running the MDC at a higher frequency (hardware dependent). ==================== Link: https://lore.kernel.org/r/20231204100811.2708884-1-tobias@waldekranz.com Signed-off-by: Jakub Kicinski commit eb6a6605ff5a2b2ad2ceada49bba2464f6ad26a4 Author: Tobias Waldekranz Date: Mon Dec 4 11:08:11 2023 +0100 net: mvmdio: Support setting the MDC frequency on XSMI controllers Support the standard "clock-frequency" attribute to set the generated MDC frequency. If not specified, the driver will leave the divisor untouched. Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn Link: https://lore.kernel.org/r/20231204100811.2708884-4-tobias@waldekranz.com Signed-off-by: Jakub Kicinski commit 7dd12fe34686d89c332b1a05104d18d728591f0a Author: Tobias Waldekranz Date: Mon Dec 4 11:08:10 2023 +0100 net: mvmdio: Avoid excessive sleeps in polled mode Before this change, when operating in polled mode, i.e. no IRQ is available, every individual C45 access would be hit with a 150us sleep after the bus access. For example, on a board with a CN9130 SoC connected to an MV88X3310 PHY, a single C45 read would take around 165us: root@infix:~$ mdio f212a600.mdio-mii mmd 4:1 bench 0xc003 Performed 1000 reads in 165ms By replacing the long sleep with a tighter poll loop, we observe a 10x increase in bus throughput: root@infix:~$ mdio f212a600.mdio-mii mmd 4:1 bench 0xc003 Performed 1000 reads in 15ms Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Tested-by: Andrew Lunn Link: https://lore.kernel.org/r/20231204100811.2708884-3-tobias@waldekranz.com Signed-off-by: Jakub Kicinski commit f3c928008ab218055e26917ffdbdaf429e8e616a Author: Jakub Kicinski Date: Sat Dec 2 13:12:25 2023 -0800 tools: ynl: move private definitions to a separate header ynl.h has a growing amount of "internal" stuff, which may confuse users who try to take a look at the external API. Currently the internals are at the bottom of the file with a banner in between, but this arrangement makes it hard to add external APIs / inline helpers which need internal definitions. Move internals to a separate header. Link: https://lore.kernel.org/r/20231202211225.342466-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit f2d4d9ad809a1c7173ce66c47cd45e11184a554c Author: Jakub Kicinski Date: Sat Dec 2 13:13:10 2023 -0800 tools: ynl: use strerror() if no extack of note provided If kernel didn't give use any meaningful error - print a strerror() to the ynl error message. Reviewed-by: Nicolas Dichtel Link: https://lore.kernel.org/r/20231202211310.342716-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit e136735f0c263b8bb9572ff8d35d8d5bc9fd9b66 Author: Jakub Kicinski Date: Sat Dec 2 13:10:05 2023 -0800 tools: pynl: make flags argument optional for do() Commit 1768d8a767f8 ("tools/net/ynl: Add support for create flags") added support for setting legacy netlink CRUD flags on netlink messages (NLM_F_REPLACE, _EXCL, _CREATE etc.). Most of genetlink won't need these, don't force callers to pass in an empty argument to each do() call. Reviewed-by: Donald Hunter Link: https://lore.kernel.org/r/20231202211005.341613-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit bce493439736c606dc72e9824d01c43bd8a258d4 Merge: 2ff46b9eca2bb a06041e2f4aeb Author: Jakub Kicinski Date: Tue Dec 5 19:51:14 2023 -0800 Merge branch 'net-convert-to-platform-remove-callback-returning-void' Uwe Kleine-König says: ==================== net*: Convert to platform remove callback returning void (implicit) v1 of this series can be found at https://lore.kernel.org/netdev/20231117095922.876489-1-u.kleine-koenig@pengutronix.de. Changes since then: - Dropped patch #1 as Alex objected. Patch #1 (was #2 before) now converts ipa to remove_new() and introduces an error message in the error path that failed before. ==================== Link: https://lore.kernel.org/r/cover.1701713943.git.u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit a06041e2f4aeb4d903e57c16812dfe72cdfc3efb Author: Uwe Kleine-König Date: Mon Dec 4 19:30:47 2023 +0100 net: wwan: qcom_bam_dmux: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Sergey Ryazanov Link: https://lore.kernel.org/r/20231117095922.876489-9-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/49795ee930be6a9a24565e5e7133e6f8383ab532.1701713943.git.u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit 2d859085875333ee5e74f51e35f3f66f68da89f5 Author: Uwe Kleine-König Date: Mon Dec 4 19:30:46 2023 +0100 net: wan/ixp4xx_hss: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231117095922.876489-8-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Acked-by: Linus Walleij Link: https://lore.kernel.org/r/b0488fa6181a47668e5737905ae7adc8d7cd055e.1701713943.git.u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit 2d0c06fd39be2edb222dafa3aeb51770fca45263 Author: Uwe Kleine-König Date: Mon Dec 4 19:30:45 2023 +0100 net: wan/fsl_ucc_hdlc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231117095922.876489-7-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/8c9ffca75ea24810f9ba05a514d5ad59847cc4fe.1701713943.git.u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit bb1afee984663d66c3d1c062179e1684a46a6ce6 Author: Uwe Kleine-König Date: Mon Dec 4 19:30:44 2023 +0100 net: sfp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231117095922.876489-6-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/7c1d50d559c0e0e36a20eb3e410f6e9d3f884b6f.1701713943.git.u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit e36dc85c245f2416c4404e2d4416de798c0733e5 Author: Uwe Kleine-König Date: Mon Dec 4 19:30:43 2023 +0100 net: pcs: rzn1-miic: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231117095922.876489-5-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/82b728e14a68c421e269eff3b8083d9d6e62d956.1701713943.git.u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit 2ce19934a4dc1f7ca4f73041c64c816605c5d756 Author: Uwe Kleine-König Date: Mon Dec 4 19:30:42 2023 +0100 net: fjes: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231117095922.876489-4-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/4889ac6a7ffa9b02fa5cdd2d3212e739741f80b8.1701713943.git.u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit a92dbb9cdf0465d56c7e0fc5d674e6834f7c6a79 Author: Uwe Kleine-König Date: Mon Dec 4 19:30:41 2023 +0100 net: ipa: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231117095922.876489-3-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/c43193b9a002e88da36b111bb44ce2973ecde722.1701713943.git.u.kleine-koenig@pengutronix.de Signed-off-by: Jakub Kicinski commit 00bf4641201092fc06aa51f7dcf45d1ea4d3d4f7 Author: Russell King (Oracle) Date: Tue Nov 21 13:45:37 2023 +0000 riscv: convert to use arch_cpu_is_hotpluggable() Convert riscv to use the arch_cpu_is_hotpluggable() helper rather than arch_register_cpu(). Acked-by: Palmer Dabbelt Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Samuel Holland Tested-by: Samuel Holland # On HiFive Unmatched Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R4L-00Ct0d-To@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 96cf2036514acec9bee7c25ca61badc64820d734 Author: James Morse Date: Tue Nov 21 13:45:32 2023 +0000 riscv: Switch over to GENERIC_CPU_DEVICES Now that GENERIC_CPU_DEVICES calls arch_register_cpu(), which can be overridden by the arch code, switch over to this to allow common code to choose when the register_cpu() call is made. This allows topology_init() to be removed. This is an intermediate step to the logic being moved to drivers/acpi, where GENERIC_CPU_DEVICES will do the work when booting with acpi=off. This patch also has the effect of moving the registration of CPUs from subsys to driver core initialisation, prior to any initcalls running. Signed-off-by: James Morse Reviewed-by: Jonathan Cameron Acked-by: Palmer Dabbelt Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Samuel Holland Tested-by: Samuel Holland Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R4G-00Ct0M-PS@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 13f9f0361c2e64f0dadb7964bfad11bf0a6fb7ab Author: Russell King (Oracle) Date: Tue Nov 21 13:45:27 2023 +0000 LoongArch: convert to use arch_cpu_is_hotpluggable() Convert loongarch to use the arch_cpu_is_hotpluggable() helper rather than arch_register_cpu(). Also remove the export as nothing should be using arch_register_cpu() outside of the core kernel/acpi code. Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R4B-00Ct0G-Kk@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 0d122fb60046cd888877a6029cc23863d4a1b9e3 Author: James Morse Date: Tue Nov 21 13:45:22 2023 +0000 LoongArch: Use the __weak version of arch_unregister_cpu() LoongArch provides its own arch_unregister_cpu(). This clears the hotpluggable flag, then unregisters the CPU. It isn't necessary to clear the hotpluggable flag when unregistering a cpu. unregister_cpu() writes NULL to the percpu cpu_sys_devices pointer, meaning cpu_is_hotpluggable() will return false, as get_cpu_device() has returned NULL. Remove arch_unregister_cpu() and use the __weak version. Signed-off-by: James Morse Reviewed-by: Jonathan Cameron Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R46-00Ct0A-GJ@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit db3ba29a8315d89736b8af5c1ad945c9967d7655 Author: James Morse Date: Tue Nov 21 13:45:17 2023 +0000 LoongArch: Switch over to GENERIC_CPU_DEVICES Now that GENERIC_CPU_DEVICES calls arch_register_cpu(), which can be overridden by the arch code, switch over to this to allow common code to choose when the register_cpu() call is made. This allows topology_init() to be removed. This is an intermediate step to the logic being moved to drivers/acpi, where GENERIC_CPU_DEVICES will do the work when booting with acpi=off. This is a subtle change. Originally: - on boot, topology_init() would have marked present CPUs that io_master() is true for as hotplug-incapable. - if a CPU is hotplugged that is an io_master(), it can later be hot-unplugged. The new behaviour is that any CPU that io_master() is true for will now always be marked as hotplug-incapable, thus even if it was hotplugged, it can no longer be hot-unplugged. This patch also has the effect of moving the registration of CPUs from subsys to driver core initialisation, prior to any initcalls running. Signed-off-by: James Morse Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R41-00Ct04-Bg@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit e850a5c406450ae040d09c7b4161d6e75eff2a25 Author: Russell King (Oracle) Date: Tue Nov 21 13:45:12 2023 +0000 x86/topology: convert to use arch_cpu_is_hotpluggable() Convert x86 to use the arch_cpu_is_hotpluggable() helper rather than arch_register_cpu(). Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3w-00Cszy-6k@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit b0b26bc580de555a504d7eed3866fca607bf1c1f Author: Russell King (Oracle) Date: Tue Nov 21 13:45:07 2023 +0000 x86/topology: use weak version of arch_unregister_cpu() Since the x86 version of arch_unregister_cpu() is the same as the weak version, drop the x86 specific version. Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3r-00Cszs-2R@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 5b95f94c3b9f12adf27e970d411e8a744e95cabf Author: James Morse Date: Tue Nov 21 13:45:01 2023 +0000 x86/topology: Switch over to GENERIC_CPU_DEVICES Now that GENERIC_CPU_DEVICES calls arch_register_cpu(), which can be overridden by the arch code, switch over to this to allow common code to choose when the register_cpu() call is made. x86's struct cpus come from struct x86_cpu, which has no other members or users. Remove this and use the version defined by common code. This is an intermediate step to the logic being moved to drivers/acpi, where GENERIC_CPU_DEVICES will do the work when booting with acpi=off. This patch also has the effect of moving the registration of CPUs from subsys to driver core initialisation, prior to any initcalls running. ---- Changes since RFC: * Fixed the second copy of arch_register_cpu() used for non-hotplug Changes since RFC v2: * Remove duplicate of the weak generic arch_register_cpu(), spotted by Jonathan Cameron. Add note about initialisation order change. Changes since RFC v3: * Adapt to removal of EXPORT_SYMBOL()s Signed-off-by: James Morse Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3l-00Cszm-UA@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 092cfbc6b51143fd216bd55f8811f427d2ef0a0f Author: Russell King (Oracle) Date: Tue Nov 21 13:44:56 2023 +0000 arm64: convert to arch_cpu_is_hotpluggable() Convert arm64 to use the arch_cpu_is_hotpluggable() helper rather than arch_register_cpu(). Reviewed-by: Shaoqin Huang Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3g-00Cszg-PP@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit d127db1a23c94a876557b5bf8ca8bea49e8debb6 Author: James Morse Date: Tue Nov 21 13:44:51 2023 +0000 arm64: setup: Switch over to GENERIC_CPU_DEVICES using arch_register_cpu() To allow ACPI's _STA value to hide CPUs that are present, but not available to online right now due to VMM or firmware policy, the register_cpu() call needs to be made by the ACPI machinery when ACPI is in use. This allows it to hide CPUs that are unavailable from sysfs. Switching to GENERIC_CPU_DEVICES is an intermediate step to allow all five ACPI architectures to be modified at once. Switch over to GENERIC_CPU_DEVICES, and provide an arch_register_cpu() that populates the hotpluggable flag. arch_register_cpu() is also the interface the ACPI machinery expects. The struct cpu in struct cpuinfo_arm64 is never used directly, remove it to use the one GENERIC_CPU_DEVICES provides. This changes the CPUs visible in sysfs from possible to present, but on arm64 smp_prepare_cpus() ensures these are the same. This patch also has the effect of moving the registration of CPUs from subsys to driver core initialisation, prior to any initcalls running. Signed-off-by: James Morse Reviewed-by: "Russell King (Oracle)" Reviewed-by: Shaoqin Huang Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3b-00Csza-Ku@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit ca00f7d999a61383c3e5b2c66537a8e769dd7327 Author: James Morse Date: Tue Nov 21 13:44:46 2023 +0000 drivers: base: Print a warning instead of panic() when register_cpu() fails loongarch, mips, parisc, riscv and sh all print a warning if register_cpu() returns an error. Architectures that use GENERIC_CPU_DEVICES call panic() instead. Errors in this path indicate something is wrong with the firmware description of the platform, but the kernel is able to keep running. Downgrade this to a warning to make it easier to debug this issue. This will allow architectures that switching over to GENERIC_CPU_DEVICES to drop their warning, but keep the existing behaviour. Signed-off-by: James Morse Reviewed-by: "Russell King (Oracle)" Reviewed-by: Shaoqin Huang Signed-off-by: "Russell King (Oracle)" Reviewed-by: Gavin Shan Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3W-00CszU-GM@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit d631a881f1ab0091de35ae09ba48193a543666b5 Author: James Morse Date: Tue Nov 21 13:44:41 2023 +0000 drivers: base: Move cpu_dev_init() after node_dev_init() NUMA systems require the node descriptions to be ready before CPUs are registered. This is so that the node symlinks can be created in sysfs. Currently no NUMA platform uses GENERIC_CPU_DEVICES, meaning that CPUs are registered by arch code, instead of cpu_dev_init(). Move cpu_dev_init() after node_dev_init() so that NUMA architectures can use GENERIC_CPU_DEVICES. Signed-off-by: James Morse Signed-off-by: "Russell King (Oracle)" Reviewed-by: Gavin Shan Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3R-00CszO-C0@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit bb5e44fb3be685ecb3feb120aca4269a92cc84cf Author: Russell King (Oracle) Date: Tue Nov 21 13:44:36 2023 +0000 drivers: base: add arch_cpu_is_hotpluggable() The differences between architecture specific implementations of arch_register_cpu() are down to whether the CPU is hotpluggable or not. Rather than overriding the weak version of arch_register_cpu(), provide a function that can be used to provide this detail instead. Reviewed-by: Shaoqin Huang Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Gavin Shan Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3M-00CszH-6r@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 866ec3008691ff205b171413c52c5f1f328a2f8b Author: James Morse Date: Tue Nov 21 13:44:31 2023 +0000 drivers: base: Implement weak arch_unregister_cpu() Add arch_unregister_cpu() to allow the ACPI machinery to call unregister_cpu(). This is enough for arm64, riscv and loongarch, but needs to be overridden by x86 and ia64 who need to do more work. CC: Jean-Philippe Brucker Signed-off-by: James Morse Reviewed-by: Shaoqin Huang Signed-off-by: "Russell King (Oracle)" Reviewed-by: Gavin Shan Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3H-00CszC-2n@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 0949dd96dffec39683c6066cf8d0877cebc321ec Author: James Morse Date: Tue Nov 21 13:44:25 2023 +0000 drivers: base: Allow parts of GENERIC_CPU_DEVICES to be overridden Architectures often have extra per-cpu work that needs doing before a CPU is registered, often to determine if a CPU is hotpluggable. To allow the ACPI architectures to use GENERIC_CPU_DEVICES, move the cpu_register() call into arch_register_cpu(), which is made __weak so architectures with extra work can override it. This aligns with the way x86, ia64 and loongarch register hotplug CPUs when they become present. Signed-off-by: James Morse Reviewed-by: Shaoqin Huang Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R3B-00Csz6-Uh@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit b0c69e1214bc20960c2ca68317b968e2a2057ed5 Author: James Morse Date: Tue Nov 21 13:44:20 2023 +0000 drivers: base: Use present CPUs in GENERIC_CPU_DEVICES Three of the five ACPI architectures create sysfs entries using register_cpu() for present CPUs, whereas arm64, riscv and all GENERIC_CPU_DEVICES do this for possible CPUs. Registering a CPU is what causes them to show up in sysfs. It makes very little sense to register all possible CPUs. Registering a CPU is what triggers the udev notifications allowing user-space to react to newly added CPUs. To allow all five ACPI architectures to use GENERIC_CPU_DEVICES, change it to use for_each_present_cpu(). Making the ACPI architectures use GENERIC_CPU_DEVICES is a pre-requisite step to centralise their register_cpu() logic, before moving it into the ACPI processor driver. When we add support for register CPUs from ACPI in a later patch, we will avoid registering CPUs in this path. Of the ACPI architectures that register possible CPUs, arm64 and riscv do not support making possible CPUs present as they use the weak 'always fails' version of arch_register_cpu(). Only two of the eight architectures that use GENERIC_CPU_DEVICES have a distinction between present and possible CPUs. The following architectures use GENERIC_CPU_DEVICES but are not SMP, so possible == present: * m68k * microblaze * nios2 The following architectures use GENERIC_CPU_DEVICES and consider possible == present: * csky: setup_smp() * processor_probe() sets possible for all CPUs and present for all CPUs except the boot cpu, which will have been done by init/main.c::start_kernel(). um appears to be a subarchitecture of x86. The remaining architecture using GENERIC_CPU_DEVICES are: * openrisc and hexagon: where smp_init_cpus() makes all CPUs < NR_CPUS possible, whereas smp_prepare_cpus() only makes CPUs < setup_max_cpus present. After this change, openrisc and hexagon systems that use the max_cpus command line argument would not see the other CPUs present in sysfs. This should not be a problem as these CPUs can't be brought online as _cpu_up() checks cpu_present(). After this change, only CPUs which are present appear in sysfs. Signed-off-by: James Morse Reviewed-by: Jonathan Cameron Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R36-00Csz0-Px@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit a02f66bb3cf475947b58dd3851b987b8ccd998c1 Author: James Morse Date: Tue Nov 21 13:44:15 2023 +0000 ACPI: Move ACPI_HOTPLUG_CPU to be disabled on arm64 and riscv Neither arm64 nor riscv support physical hotadd of CPUs that were not present at boot. For arm64 much of the platform description is in static tables which do not have update methods. arm64 does support HOTPLUG_CPU, which is backed by a firmware interface to turn CPUs on and off. acpi_processor_hotadd_init() and acpi_processor_remove() are for adding and removing CPUs that were not present at boot. arm64 systems that do this are not supported as there is currently insufficient information in the platform description. (e.g. did the GICR get removed too?) arm64 currently relies on the MADT enabled flag check in map_gicc_mpidr() to prevent CPUs that were not described as present at boot from being added to the system. Similarly, riscv relies on the same check in map_rintc_hartid(). Both architectures also rely on the weak 'always fails' definitions of acpi_map_cpu() and arch_register_cpu(). Subsequent changes will redefine ACPI_HOTPLUG_CPU as making possible CPUs present. Neither arm64 nor riscv support this. Disable ACPI_HOTPLUG_CPU for arm64 and riscv by removing 'default y' and selecting it on the other three ACPI architectures. This allows the weak definitions of some symbols to be removed. Signed-off-by: James Morse Reviewed-by: Shaoqin Huang Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R31-00Csyt-Jq@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 29d93102fd1e19024fce90995040fb3a46fd91c1 Author: Russell King (Oracle) Date: Tue Nov 21 13:44:10 2023 +0000 Loongarch: remove arch_*register_cpu() exports arch_register_cpu() and arch_unregister_cpu() are not used by anything that can be a module - they are used by drivers/base/cpu.c and drivers/acpi/acpi_processor.c, neither of which can be a module. Remove the exports. Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R2w-00Csyn-E2@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 9aa9b4fcc311ede18adfe55e721115f7c59e60be Author: Russell King (Oracle) Date: Tue Nov 21 13:44:05 2023 +0000 x86/topology: remove arch_*register_cpu() exports arch_register_cpu() and arch_unregister_cpu() are not used by anything that can be a module - they are used by drivers/base/cpu.c and drivers/acpi/acpi_processor.c, neither of which can be a module. Remove the exports. Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R2r-00Csyh-7B@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit d87c49377d5bbf3f5e5729c67f3892e1d2e6f661 Author: James Morse Date: Tue Nov 21 13:44:00 2023 +0000 x86: intel_epb: Don't rely on link order intel_epb_init() is called as a subsys_initcall() to register cpuhp callbacks. The callbacks make use of get_cpu_device() which will return NULL unless register_cpu() has been called. register_cpu() is called from topology_init(), which is also a subsys_initcall(). This is fragile. Moving the register_cpu() to a different subsys_initcall() leads to a NULL dereference during boot. Make intel_epb_init() a late_initcall(), user-space can't provide a policy before this point anyway. Signed-off-by: James Morse Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Acked-by: "Rafael J. Wysocki" Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R2m-00Csyb-2S@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit c72bbf200162a3b4b9e1baedec9008d8d710b427 Author: James Morse Date: Tue Nov 21 13:43:54 2023 +0000 arch_topology: Make register_cpu_capacity_sysctl() tolerant to late CPUs register_cpu_capacity_sysctl() adds a property to sysfs that describes the CPUs capacity. This is done from a subsys_initcall() that assumes all possible CPUs are registered. With CPU hotplug, possible CPUs aren't registered until they become present, (or for arm64 enabled). This leads to messages during boot: | register_cpu_capacity_sysctl: too early to get CPU1 device! and once these CPUs are added to the system, the file is missing. Move this to a cpuhp callback, so that the file is created once CPUs are brought online. This covers CPUs that are added late by mechanisms like hotplug. One observable difference is the file is now missing for offline CPUs. Signed-off-by: James Morse Reviewed-by: Gavin Shan Signed-off-by: "Russell King (Oracle)" Reviewed-by: Jonathan Cameron Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/E1r5R2g-00CsyV-Ss@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman commit 522c35e08b53f157ad3e51848caa861b258001e4 Author: Stefan Wahren Date: Tue Dec 5 21:05:31 2023 +0100 ARM: dts: bcm2711: Add BCM2711 xHCI support The BCM2711 SoC also has a mostly generic xHCI. The USB port is currently only usable on the Compute Module 4 (e.g. via IO board). Because DWC2 and xHCI share the same PHY, we let the bootloader enable it on demand. Signed-off-by: Stefan Wahren Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20231205200531.8232-4-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 95e71986fc1b9a2e1de30bca8e7a5fab12817cdd Author: Stefan Wahren Date: Tue Dec 5 21:05:30 2023 +0100 usb: xhci: xhci-plat: Add support for BCM2711 With the introduction of a BCM2711 specific compatible, this also needs to be added to the xHCI driver. Signed-off-by: Stefan Wahren Tested-by: Florian Fainelli Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20231205200531.8232-3-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit b3f8e6ae30bd7ade3a96c9beb2a17167d55492a5 Author: Stefan Wahren Date: Tue Dec 5 21:05:29 2023 +0100 dt-bindings: usb: xhci: Add support for BCM2711 The xHCI IP on the BCM2711 SoC is compatible to "brcm,xhci-brcm-v2", but also requires a power domain. So introduce a new compatible and the specific constraints. Since the key allOf can only occur once, merge the reference below. Signed-off-by: Stefan Wahren Reviewed-by: Conor Dooley Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20231205200531.8232-2-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 855d75cf8311fee156fabb5639bb53757ca83dd4 Author: Hardik Gajjar Date: Tue Dec 5 19:18:29 2023 +0100 usb: hub: Add quirk to decrease IN-ep poll interval for Microchip USB491x hub There is a potential delay in notifying Linux USB drivers of downstream USB bus activity when connecting a high-speed or superSpeed device via the Microchip USB491x hub. This delay is due to the fixed bInterval value of 12 in the silicon of the Microchip USB491x hub. Microchip requested to ignore the device descriptor and decrease that value to 9 as it was too late to modify that in silicon. This patch speeds up the USB enummeration process that helps to pass Apple Carplay certifications and improve the User experience when utilizing the USB device via Microchip Multihost USB491x Hub. A new hub quirk HUB_QUIRK_REDUCE_FRAME_INTR_BINTERVAL speeds up the notification process for Microchip USB491x hub by limiting the maximum bInterval value to 9. Signed-off-by: Hardik Gajjar Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20231205181829.127353-2-hgajjar@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit 6666ea93d2c422ebeb8039d11e642552da682070 Author: Hardik Gajjar Date: Tue Dec 5 19:18:28 2023 +0100 usb: hub: Replace hardcoded quirk value with BIT() macro This patch replaces the hardcoded quirk value in the macro with BIT(). Signed-off-by: Hardik Gajjar Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20231205181829.127353-1-hgajjar@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit 2ff46b9eca2bb86c364942e86fd0145d56b62e40 Author: Arnd Bergmann Date: Mon Dec 4 09:57:21 2023 +0100 net: hns3: reduce stack usage in hclge_dbg_dump_tm_pri() This function exceeds the stack frame warning limit: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c: In function 'hclge_dbg_dump_tm_pri': drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c:1039:1: error: the frame size of 1408 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Use dynamic allocation for the largest stack object instead. It would be nice to rewrite this file to completely avoid the extra buffer and just use the one that was already allocated by debugfs, but that is a much larger change. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20231204085735.4112882-1-arnd@kernel.org Signed-off-by: Jakub Kicinski commit c8705471b94d0d869e2e3ac80c0d960f0215474f Author: Fabio Estevam Date: Tue Dec 5 11:47:12 2023 -0300 ARM: mxs: Do not search for "fsl,clkctrl" The "fsl,clkctrl" compatible string is not documented. It is used only to find the base address of the clock controller. Instead of searching for an undocumented compatible string, search for "fsl,imx23-clkctrl" and "fsl,imx28-clkctrl". Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 287e256c1a6e2b92da938efc87a34e3c008d8319 Author: Fabio Estevam Date: Tue Dec 5 10:18:38 2023 -0300 ARM: dts: imx28-lwe: Pass device_type to the memory node Per memory.yaml, 'device_type' is a required property. Pass it to fix the following dt-schema warning: imx28-xea.dtb: /: memory@40000000: 'device_type' is a required property from schema $id: http://devicetree.org/schemas/memory.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 844542b0fcec8f4db4a714fab96d4d99a1122ed7 Author: Fabio Estevam Date: Tue Dec 5 09:57:31 2023 -0300 ARM: dts: imx23/28: Remove unneeded "fsl,mxs-gpio" According to gpio-mxs.yaml, only "fsl,imx23-gpio" or "fsl,imx28-gpio" are valid compatible strings. This fixes the following dt-schema warnings: imx23-evk.dtb: pinctrl@80018000: gpio@0:compatible: ['fsl,imx23-gpio', 'fsl,mxs-gpio'] is too long from schema $id: http://devicetree.org/schemas/gpio/gpio-mxs.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 620360bf7dbfe3c61bdbf3a88535a0030ff787b5 Author: Fabio Estevam Date: Tue Dec 5 11:53:35 2023 -0300 ARM: dts: imx28-tx28: Pass #sound-dai-cells Per sgtl5000.yaml, '#sound-dai-cells' is a required property. Pass it to fix the following dt-schema warning: imx28-tx28.dtb: sgtl5000@a: '#sound-dai-cells' is a required property from schema $id: http://devicetree.org/schemas/sound/sgtl5000.yaml# Signed-off-by: Fabio Estevam Reviewed-by: Stefan Wahren Signed-off-by: Shawn Guo commit c0ac4eb8b8e9d351d3e546ed0b120926ceebdc30 Author: David Heidelberg Date: Sat Dec 2 23:29:01 2023 +0100 arm64: dts: imx8mq-phanbell: make dts use gpio-fan matrix instead of array No functional changes. Adjust to comply with dt-schema requirements and make possible to validate values. Signed-off-by: David Heidelberg Signed-off-by: Shawn Guo commit 12f2486ebe70098944444057f7b5b592fe325870 Author: Joao Paulo Goncalves Date: Fri Dec 1 16:39:29 2023 +0100 arm64: dts: freescale: verdin-imx8mp: add support to mallow board Add Toradex Verdin IMX8MP Mallow carrier board support. Mallow is a low-cost carrier board in the Verdin family with a small form factor and build for volume production making it ideal for industrial and embedded applications. https://www.toradex.com/products/carrier-board/mallow-carrier-board Signed-off-by: Joao Paulo Goncalves Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit eb9348865fabe4e0bc0b0453813dba8ecbfd9deb Author: Joao Paulo Goncalves Date: Fri Dec 1 16:07:33 2023 +0100 arm64: dts: freescale: verdin-imx8mm: add support to mallow board Add Toradex Verdin IMX8MM Mallow carrier board support. Mallow is a low-cost carrier board in the Verdin family with a small form factor and build for volume production making it ideal for industrial and embedded applications. https://www.toradex.com/products/carrier-board/mallow-carrier-board Signed-off-by: Joao Paulo Goncalves Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit e3873abfe0f7f65bff320ca9d97fe6a7410746f7 Author: Fabio Estevam Date: Thu Nov 30 19:52:42 2023 -0300 arm64: dts: imx8mm-venice-gw7: Adjust PCI Ethernet nodes As per Rob Herring's feedback: "The ethernet device should have a node name of 'ethernet'. The 'pcie' node name and 'device_type = "pci"' is for PCI buses/bridges only." Do it as suggested. Fixes: d61c5068729a ("arm64: dts: imx8mm-venice-gw7: Fix pci sub-nodes") Suggested-by: Rob Herring Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 63ff54dfa832695263e60215c07768adad98f573 Author: Joao Paulo Goncalves Date: Fri Dec 1 16:39:28 2023 +0100 dt-bindings: arm: fsl: add verdin imx8mp mallow board Add Mallow carrier board for wifi and nonwifi variants of Toradex Verdin IMX8MP SoM. Mallow is a low-cost carrier board in the Verdin family with a small form factor and build for volume production making it ideal for industrial and embedded applications. https://www.toradex.com/products/carrier-board/mallow-carrier-board Signed-off-by: Joao Paulo Goncalves Signed-off-by: Francesco Dolcini Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit ffce67b61108aaab6061f122b5cffe6c4e59fee2 Author: Joao Paulo Goncalves Date: Fri Dec 1 16:07:32 2023 +0100 dt-bindings: arm: fsl: add verdin imx8mm mallow board Add Mallow carrier board for wifi and nonwifi variants of Toradex Verdin IMX8MM SoM. Mallow is a low-cost carrier board in the Verdin family with a small form factor and build for volume production making it ideal for industrial and embedded applications. https://www.toradex.com/products/carrier-board/mallow-carrier-board Signed-off-by: Joao Paulo Goncalves Signed-off-by: Francesco Dolcini Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit e78e59acfb6972aba9c3da86099760ca662054e7 Merge: e84d34372eb6c 6ff482eeebe57 Author: Martin K. Petersen Date: Tue Dec 5 21:54:06 2023 -0500 Merge patch series "scsi: Convert to platform remove callback returning" void Uwe Kleine-König says: Hello, this series converts all drivers below drivers/scsi to struct platform_driver::remove_new(). See commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") for an extended explanation and the eventual goal. All conversations are trivial, because all .remove() callbacks returned zero unconditionally. Best regards Uwe Link: https://lore.kernel.org/r/cover.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 6ff482eeebe57ee7becee66f7de4b864dcc4175d Author: Uwe Kleine-König Date: Sun Dec 3 17:05:59 2023 +0100 scsi: sun_esp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/1d385231c23c2a1e6e7dc1968eb111327386d1f6.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit e84bd0bb30689023410f3cd5090c8ed11937096f Author: Uwe Kleine-König Date: Sun Dec 3 17:05:58 2023 +0100 scsi: sun3x_esp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/5010d1a4f3d77eaa1114fa254c343c4f23313901.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 15b016b2d023e4ba3603daa21aa346033c486930 Author: Uwe Kleine-König Date: Sun Dec 3 17:05:57 2023 +0100 scsi: sun3: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/84239a68fe06143d1d6fed6c9aaae6a4680ead71.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 357a7fd2434e857bc3911cfbb02285f8b25e8d24 Author: Uwe Kleine-König Date: Sun Dec 3 17:05:56 2023 +0100 scsi: sni_53c710: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/2f4b7366ca00a107a9595514795e909e632980da.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 358987af1bda5c0b6a9aacc0644a108e711266b6 Author: Uwe Kleine-König Date: Sun Dec 3 17:05:55 2023 +0100 scsi: sgiwd93: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/92114604fd1274073915e515cae15003ff07aa4a.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit e26eec9a4d25752404b35e7700f84834002ee75e Author: Uwe Kleine-König Date: Sun Dec 3 17:05:54 2023 +0100 scsi: qlogicpti: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/8242c07f617fc946aab857c9357f540598fe964e.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit f0baf76a22049d55a4901c1a933e479c638af94c Author: Uwe Kleine-König Date: Sun Dec 3 17:05:53 2023 +0100 scsi: mvme16x: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/1d16e93a498831abd64df8b8cf54fd8872cdd1cd.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 69b43bf38b11cf361a1372281aa0ffe0c5cb2d32 Author: Uwe Kleine-König Date: Sun Dec 3 17:05:52 2023 +0100 scsi: mac: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/89ce161dad52d99df07135531512ccecb7f25d14.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 0b649224f712cdfb90c8e9c22929dcb55868fc8f Author: Uwe Kleine-König Date: Sun Dec 3 17:05:51 2023 +0100 scsi: mac_esp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/9013c84059b8ccd6a5c8305aa35cfdfa314ba74c.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit c71ef3d1fb39ee4503b5d3f5e358c6588c071520 Author: Uwe Kleine-König Date: Sun Dec 3 17:05:50 2023 +0100 scsi: jazz_esp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/f71efbe17973c97fd2a1e78f8d7fcf456644510b.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 51a41ec6d36e586e978785709d33b22cc8ee455c Author: Uwe Kleine-König Date: Sun Dec 3 17:05:49 2023 +0100 scsi: bvme6000: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/63294479a4e745210c078859afa88904fa0b3be8.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 3becb4cdf1c1250b880d04f00506f185b614c5af Author: Uwe Kleine-König Date: Sun Dec 3 17:05:48 2023 +0100 scsi: atari: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/27a2b133b1b88a9baf51353c511e93a5027f9602.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 688bbe398ca63bace6b8fb40b9dbc605c5add034 Author: Uwe Kleine-König Date: Sun Dec 3 17:05:47 2023 +0100 scsi: a4000t: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/c15ffc57efebc5da3f7e6dd558d69181e129cafe.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit 5854cdd04163ea7aa454b619708f710cef9e04e8 Author: Uwe Kleine-König Date: Sun Dec 3 17:05:46 2023 +0100 scsi: a3000: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/811d180950b76c2d95cd080e3c251757ca011380.1701619134.git.u.kleine-koenig@pengutronix.de Signed-off-by: Martin K. Petersen commit e84d34372eb6c7d33d1f39267c2f91102654959c Merge: f200dad9f34d2 d0a60e3edaa4a Author: Martin K. Petersen Date: Tue Dec 5 21:46:32 2023 -0500 Merge branch '6.8/s/mpi3mr2' into 6.8/scsi-staging Two driver updates from Chandrakanth patil at Broadcom: scsi: mpi3mr: Update driver version to 8.5.1.0.0 scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-3 scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-2 scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-1 scsi: mpi3mr: Fetch correct device dev handle for status reply descriptor scsi: mpi3mr: Block PEL Enable Command on Controller Reset and Unrecoverable State scsi: mpi3mr: Clean up block devices post controller reset scsi: mpi3mr: Refresh sdev queue depth after controller reset Signed-off-by: Martin K. Petersen commit d0a60e3edaa4a12e52fe8ea1d8b125f0405934cf Author: Chandrakanth patil Date: Wed Dec 6 00:46:30 2023 +0530 scsi: mpi3mr: Update driver version to 8.5.1.0.0 Update driver version to 8.5.1.0.0 Signed-off-by: Chandrakanth patil Link: https://lore.kernel.org/r/20231205191630.12201-5-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit 9536af615dc9ded0357341e8bd0efc8b34b2b484 Author: Chandrakanth patil Date: Wed Dec 6 00:46:29 2023 +0530 scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-3 The driver acquires the required NVMe SGLs from the pre-allocated pool. Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Signed-off-by: Chandrakanth patil Link: https://lore.kernel.org/r/20231205191630.12201-4-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit fb231d7deffb41fd445929a3b79815277b883fec Author: Chandrakanth patil Date: Wed Dec 6 00:46:28 2023 +0530 scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-2 The driver acquires the required SGLs from the pre-allocated pool. Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Signed-off-by: Chandrakanth patil Link: https://lore.kernel.org/r/20231205191630.12201-3-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit c432e167523939e64ff882c86cdbf28e279a56ab Author: Chandrakanth patil Date: Wed Dec 6 00:46:27 2023 +0530 scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-1 The driver now supports SGLs for BSG data transfer. Upon loading, the driver pre-allocates SGLs in chunks of 8k, results in a total of 256 * 8k, equal to 2MB. These pre-allocated SGLs are reserved for handling BSG commands and are deallocated during driver unload. Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Signed-off-by: Chandrakanth patil Link: https://lore.kernel.org/r/20231205191630.12201-2-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit 07ac6adda4d3daa9410d716e96ffaa3192b6ac04 Author: Chandrakanth patil Date: Sun Nov 26 11:01:34 2023 +0530 scsi: mpi3mr: Fetch correct device dev handle for status reply descriptor The current dev handle for the status reply is 0xFFFF, which is invalid. So fetch the correct value. Co-developed-by: Sumit Saxena Signed-off-by: Sumit Saxena Signed-off-by: Chandrakanth patil Link: https://lore.kernel.org/r/20231126053134.10133-5-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit f8fb3f39148e8010479e4b2003ba4728818ec661 Author: Chandrakanth patil Date: Sun Nov 26 11:01:33 2023 +0530 scsi: mpi3mr: Block PEL Enable Command on Controller Reset and Unrecoverable State If a controller reset is underway or the controller is in an unrecoverable state, the PEL enable management command will be returned as EAGAIN or EFAULT. Cc: # v6.1+ Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Signed-off-by: Chandrakanth patil Link: https://lore.kernel.org/r/20231126053134.10133-4-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit c01d515687e358b22aa8414d6dac60d7defa6eb9 Author: Chandrakanth patil Date: Sun Nov 26 11:01:32 2023 +0530 scsi: mpi3mr: Clean up block devices post controller reset After a controller reset, if the firmware changes the state of devices to "hide", then remove those devices from the OS. Cc: # v6.6+ Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Signed-off-by: Chandrakanth patil Link: https://lore.kernel.org/r/20231126053134.10133-3-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit e5aab848dfdf7996d20ece4d28d2733c732c5e5a Author: Chandrakanth patil Date: Sun Nov 26 11:01:31 2023 +0530 scsi: mpi3mr: Refresh sdev queue depth after controller reset After a controller reset, the firmware may modify the device queue depth. Therefore, update the device queue depth accordingly. Cc: # v5.15+ Co-developed-by: Sathya Prakash Signed-off-by: Sathya Prakash Signed-off-by: Chandrakanth patil Link: https://lore.kernel.org/r/20231126053134.10133-2-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen commit f200dad9f34d21a168d5e1286db2f96bfef5644d Merge: aef6ac123609c be40572c22cc7 Author: Martin K. Petersen Date: Tue Dec 5 21:33:05 2023 -0500 Merge patch series "libfc: fixup command abort handling" Hannes Reinecke says: Hi all, when testing command timeout with the help of XDP I found that scsi_try_to_abort_cmd() would always return 'SUCCESS' for FCoE, even if no commands could be sent over the wire. Which is not only surprising, but also can lead to data corruption as commands were never aborted. Root cause was that aborts had been sent twice, once from FC error recovery and once from SCSI EH, with the former inducing the latter to assume that the command was already aborted. As usual, comments and reviews are welcome. Link: https://lore.kernel.org/r/20231129165832.224100-1-hare@kernel.org Signed-off-by: Martin K. Petersen commit be40572c22cc734f5836b4faec8a60340dc7ab67 Author: Hannes Reinecke Date: Wed Nov 29 17:58:32 2023 +0100 scsi: libfc: Map FC_TIMED_OUT to DID_TIME_OUT When an exchange is completed with FC_TIMED_OUT we should map it to DID_TIME_OUT to inform the SCSI midlayer that this was a command timeout; DID_BUS_BUSY implies that the command was never sent which is not the case here. Signed-off-by: Hannes Reinecke Link: https://lore.kernel.org/r/20231129165832.224100-4-hare@kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 53122a49f49796beb2c4a1bb702303b66347e29f Author: Hannes Reinecke Date: Wed Nov 29 17:58:31 2023 +0100 scsi: libfc: Fix up timeout error in fc_fcp_rec_error() We should set the status to FC_TIMED_OUT when a timeout error is passed to fc_fcp_rec_error(). Signed-off-by: Hannes Reinecke Link: https://lore.kernel.org/r/20231129165832.224100-3-hare@kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit b57c4db5d23b9df0118a25e2441c9288edd73710 Author: Hannes Reinecke Date: Wed Nov 29 17:58:30 2023 +0100 scsi: libfc: Don't schedule abort twice The current FC error recovery is sending up to three REC (recovery) frames in 10 second intervals, and as a final step sending an ABTS after 30 seconds for the command itself. Unfortunately sending an ABTS is also the action for the SCSI abort handler, and the default timeout for SCSI commands is also 30 seconds. This causes two ABTS to be scheduled, with the libfc one slightly earlier. The ABTS scheduled by SCSI EH then sees the command to be already aborted, and will always return with a 'GOOD' status irrespective on the actual result from the first ABTS. This causes the SCSI EH abort handler to always succeed, and SCSI EH never to be engaged. Fix this by not issuing an ABTS when a SCSI command is present for the exchange, but rather wait for the abort scheduled from SCSI EH. And warn if an abort is already scheduled to avoid similar errors in the future. Signed-off-by: Hannes Reinecke Link: https://lore.kernel.org/r/20231129165832.224100-2-hare@kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit aef6ac123609c4365f0270ec689ef215d13c3061 Author: Su Hui Date: Fri Dec 1 10:59:56 2023 +0800 scsi: aic7xxx: Return negative error codes in aic7770_probe() aic7770_config() returns both negative and positive error codes. It's better to make aic7770_probe() only return negative error codes. A previous commit made ahc_linux_register_host() return negative error codes, which makes sure aic7770_probe() returns negative error codes. Signed-off-by: Su Hui Link: https://lore.kernel.org/r/20231201025955.1584260-4-suhui@nfschina.com Reviewed-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 70dfaf84ec777c0590316a8785df22ca5e97bf10 Author: Su Hui Date: Fri Dec 1 10:59:55 2023 +0800 scsi: aic7xxx: Return ahc_linux_register_host()'s value rather than zero ahc_linux_register_host() can return an error code in case of failure. So ahc_linux_pci_dev_probe() should return the value of ahc_linux_register_host() rather than zero. An earlier commit made ahc_linux_register_host() return negative error codes, which makes sure ahc_linux_pci_dev_probe() returns negative error codes. Signed-off-by: Su Hui Link: https://lore.kernel.org/r/20231201025955.1584260-3-suhui@nfschina.com Reviewed-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 573eb4a3410a9d4e0612cca50e2c67a46c3824f0 Author: Su Hui Date: Fri Dec 1 10:59:54 2023 +0800 scsi: aic7xxx: Return negative error codes in ahc_linux_register_host() ahc_linux_register_host() returns both positive and negative error codes. It's better to make this function only return negative error codes. Signed-off-by: Su Hui Link: https://lore.kernel.org/r/20231201025955.1584260-2-suhui@nfschina.com Reviewed-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit a0deedcc0cf0631c7856c16109ee6f08845956c0 Author: Adam Ford Date: Mon Nov 27 22:54:15 2023 -0600 arm64: dts: imx8mm: Slow default video_pll1 clock rate Since commit 8208181fe536 ("clk: imx: composite-8m: Add imx8m_divider_determine_rate") the lcdif controller has had the ability to set the lcdif_pixel rate which propagates up the tree and sets the video_pll1 rate automatically. By setting this value low, it will force the recalculation of video_pll1 to the lowest rate needed by lcdif instead of dividing a larger clock down to the desired clock speed. This has the advantage of being able to lower the video_pll1 rate from 594MHz to 148.5MHz when operating at 1080p. It can go even lower when operating at lower resolutions and refresh rates. Signed-off-by: Adam Ford Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf # Kontron BL i.MX8MM Signed-off-by: Shawn Guo commit 5b28b39dda772e7acc52f02c907aa5497c93e280 Author: Adam Ford Date: Mon Nov 27 22:54:14 2023 -0600 arm64: dts: imx8mm: Remove video_pll1 clock rate from clk node There are two clock-rate assignments for video_pll1, and the only one it should really have belongs inside the lcdif node, since it's the only consumer of this clock. Remove it from the clk node. Signed-off-by: Adam Ford Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf # Kontron BL i.MX8MM Signed-off-by: Shawn Guo commit b918ab2616115c1ea441e00b054ba8d1bb912ac8 Author: Adam Ford Date: Mon Nov 27 22:54:13 2023 -0600 arm64: dts: imx8mm: Simplify mipi_dsi clocks The device tree clock structure for the mipi_dsi is unnecessarily redundant. The default clock parent of IMX8MM_CLK_DSI_PHY_REF is already IMX8MM_CLK_24M, so there is no need to set the parent-child relationship between them. The default clock rates for IMX8MM_SYS_PLL1_266M and IMX8MM_CLK_24M are already defined to be 266MHz and 24MHz respectively, so there is no need to define those clock rates. On i.MX8M[MNP] the samsung,pll-clock-frequency is not necessary, because the driver will read it from sclk_mipi which is also already set to 24MHz making it also redundant. Signed-off-by: Adam Ford Reviewed-by: Frieder Schrempf Tested-by: Frieder Schrempf # Kontron BL i.MX8MM Signed-off-by: Shawn Guo commit 25cba909ade2a24f7356dc547dc417042bcef722 Author: Artem Chernyshev Date: Tue Nov 28 15:11:59 2023 +0300 scsi: isci: Remove redundant check in isci_task_request_build() sci_task_request_construct_ssp() has invariant return. Change this function to void and get rid of unnecessary checks. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artem Chernyshev Link: https://lore.kernel.org/r/20231128121159.2373975-1-artem.chernyshev@red-soft.ru Signed-off-by: Martin K. Petersen commit 3a306eacda02e87fc4582947f1c0b81de5c35cb7 Author: Philipp Zabel Date: Mon Nov 27 17:15:01 2023 +0100 ARM: dts: imx7s: Add on-chip memory Add the 128 KiB on-chip SRAM at address 0x900000. Signed-off-by: Philipp Zabel Signed-off-by: Roland Hieber Signed-off-by: Shawn Guo commit 84e46978b91f387d5d153f7f76ddc87471f4a52c Author: Michael Ellerman Date: Mon Nov 27 22:17:40 2023 +1100 scsi: ipr: Remove obsolete check for old CPUs The IPR driver has a routine to check whether it's running on certain CPU versions and if so whether the adapter is supported on that CPU. But none of the CPUs it checks for are supported by Linux anymore. The most recent CPU it checks for is Power4+ which was removed in commit 471d7ff8b51b ("powerpc/64s: Remove POWER4 support"). So drop the check. That makes the "testmode" module parameter unused, so remove it as well. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20231127111740.1288463-1-mpe@ellerman.id.au Acked-by: Brian King Signed-off-by: Martin K. Petersen commit edbbae7fba495284f72f05768696572691231558 Author: Marco Felsch Date: Mon Nov 27 17:12:29 2023 +0100 ARM: dts: imx7: add MIPI-DSI support This adds the device tree support for the MIPI-DSI block. The block can be used as encoder for the parallel signals coming from the lcdif block. Signed-off-by: Marco Felsch Signed-off-by: Roland Hieber Signed-off-by: Shawn Guo commit 712b3f43ba0e5f86db69cf601ffb06085c606642 Author: Justin Stitt Date: Mon Oct 30 20:40:48 2023 +0000 scsi: ibmvscsi: Replace deprecated strncpy() with strscpy() strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect partition_name to be NUL-terminated based on its usage with format strings: | dev_info(hostdata->dev, "host srp version: %s, " | "host partition %s (%d), OS %d, max io %u\n", | hostdata->madapter_info.srp_version, | hostdata->madapter_info.partition_name, | be32_to_cpu(hostdata->madapter_info.partition_number), | be32_to_cpu(hostdata->madapter_info.os_type), | be32_to_cpu(hostdata->madapter_info.port_max_txu[0])); ... | len = snprintf(buf, PAGE_SIZE, "%s\n", | hostdata->madapter_info.partition_name); Moreover, NUL-padding is not required as madapter_info is explicitly memset to 0: | memset(&hostdata->madapter_info, 0x00, | sizeof(hostdata->madapter_info)); Considering the above, a suitable replacement is strscpy() [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20231030-strncpy-drivers-scsi-ibmvscsi-ibmvscsi-c-v1-1-f8b06ae9e3d5@google.com Reviewed-by: Kees Cook Tested-by: Michael Ellerman Signed-off-by: Martin K. Petersen commit a9baa16b4fc11d07953b65298b05d5ee707f093a Author: Justin Stitt Date: Mon Oct 30 19:04:33 2023 +0000 scsi: ibmvfc: Replace deprecated strncpy() with strscpy() strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect these fields to be NUL-terminated as the property names from which they are derived are also NUL-terminated. Moreover, NUL-padding is not required as our destination buffers are already NUL-allocated and any future NUL-byte assignments are redundant (like the ones that strncpy() does). ibmvfc_probe() -> | struct ibmvfc_host *vhost; | struct Scsi_Host *shost; ... | shost = scsi_host_alloc(&driver_template, sizeof(*vhost)); ... **side note: is this a bug? Looks like a type to me ^^^^^** ... | vhost = shost_priv(shost); ... where shost_priv() is: | static inline void *shost_priv(struct Scsi_Host *shost) | { | return (void *)shost->hostdata; | } .. and: scsi_host_alloc() -> | shost = kzalloc(sizeof(struct Scsi_Host) + privsize, GFP_KERNEL); And for login_info->..., NUL-padding is also not required as it is explicitly memset to 0: | memset(login_info, 0, sizeof(*login_info)); Considering the above, a suitable replacement is strscpy() [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20231030-strncpy-drivers-scsi-ibmvscsi-ibmvfc-c-v1-1-5a4909688435@google.com Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit 0d224b1088afef95f7069b7ca907cb199a5802ff Author: Kees Cook Date: Thu Nov 30 12:41:00 2023 -0800 scsi: zfcp: Replace strlcpy() with strscpy() strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). Overflow should be impossible here, but actually check for buffer sizes being identical with BUILD_BUG_ON(), and include a run-time check as well. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Cc: Martin K. Petersen Cc: James E.J. Bottomley Cc: Steffen Maier Cc: Benjamin Block Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: Azeem Shaikh Cc: Cc: Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20231130204056.it.978-kees@kernel.org Acked-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 28c58f8a0947f70ddee275b90fe45431146bb2cc Author: Benjamin Coddington Date: Wed Nov 29 11:13:54 2023 -0500 scsi: target: Enable READ CAPACITY for PR EARO SBC-4, Table 13 allows READ CAPACITY for all PR types. Signed-off-by: Benjamin Coddington Link: https://lore.kernel.org/r/ad095388dbc550c5b199a1dfa71bcbfc575a7abe.1701272679.git.bcodding@redhat.com Reviewed-by: Mike Christie Signed-off-by: Martin K. Petersen commit f5f27a332a14f43463aa0075efa3a0c662c0f4a8 Author: Artem Chernyshev Date: Tue Nov 28 14:10:08 2023 +0300 scsi: fnic: Return error if vmalloc() failed In fnic_init_module() exists redundant check for return value from fnic_debugfs_init(), because at moment it only can return zero. It make sense to process theoretical vmalloc() failure. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 9730ddfb123d ("scsi: fnic: remove redundant assignment of variable rc") Signed-off-by: Artem Chernyshev Link: https://lore.kernel.org/r/20231128111008.2280507-1-artem.chernyshev@red-soft.ru Reviewed-by: Karan Tilak Kumar Signed-off-by: Martin K. Petersen commit af85d689ae08860e4f9648f05e09f1de868091f4 Author: Ziqi Chen Date: Tue Nov 28 12:07:47 2023 +0800 scsi: ufs: dt-bindings: Add msi-parent for UFS MCQ The Message Signaled Interrupts (MSI) support has been introduced in UFSHCI version 4.0 (JESD223E). The MSI is the recommended interrupt approach for MCQ. If choose to use MSI, in UFS DT, we need to provide msi-parent property that point to the hardware entity which serves as the MSI controller for this UFS controller. Acked-by: Krzysztof Kozlowski Acked-by: Conor Dooley Signed-off-by: Ziqi Chen Link: https://lore.kernel.org/r/1701144469-1018-1-git-send-email-quic_ziqichen@quicinc.com Reviewed-by: Manivannan Sadhasivam Signed-off-by: Martin K. Petersen commit 0b6b2650b7c6c718421b393984054c61c3f50930 Author: Linus Walleij Date: Mon Nov 27 16:55:20 2023 +0100 ARM: dts: nxp: Fix some common switch mistakes Fix some errors in the Marvell MV88E6xxx switch descriptions: - switch0@0 is not OK, should be ethernet-switch@0 - ports should be ethernet-ports - port should be ethernet-port - phy should be ethernet-phy Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Shawn Guo commit ff2dbdf6175408108370b4d2ac6672dd13bf6d85 Author: Krzysztof Kozlowski Date: Fri Nov 24 10:51:04 2023 +0100 arm64: dts: freescale: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit d3e94d202ca2d05793005fca76fcf18a7b3e908d Author: Xu Yang Date: Mon Nov 20 17:33:17 2023 +0800 arm64: dts: imx8dxl-ss-ddr: change ddr_pmu0 compatible i.MX8DXL's ddr pmu has port/channel filter capabilities, but it still is compatible with "fsl,imx8-ddr-pmu". This will change the compatible. Signed-off-by: Xu Yang Signed-off-by: Shawn Guo commit 0548761f8ed8613d8ab6266391c9285503b62a75 Author: Alexander Stein Date: Fri Nov 17 08:59:57 2023 +0100 arm64: dts: tqma8mpql: Remove invalid/unused property 'dr_mode' is part of the USB DWC3 core, not the glue layer. Remove the property from glue layer. Fixes the dtbs_check warning: arch/arm64/boot/dts/freescale/imx8mp-tqma8mpql-mba8mpxl.dtb: usb@32f10108: 'dr_mode' does not match any of the regexes: '^usb@[0-9a-f]+$', 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/usb/fsl,imx8mp-dwc3.yaml# Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit adf8745db47488bff78b1b9b33efc9b9e24d9256 Author: Fabio Estevam Date: Mon Nov 13 20:20:16 2023 -0300 arm64: dts: imx8-ss-audio: Remove unexistent'shared-interrupt' The 'shared-interrupt' property is not documented nor used anywhere. Remove it. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit edef8f1a0127870577e8f3e4d6b23d2da8534dd5 Author: Fabio Estevam Date: Mon Nov 13 20:20:15 2023 -0300 arm64: dts: imx93: Remove unexistent 'shared-interrupt' The 'shared-interrupt' property is not documented nor used anywhere. Remove it. This fixes the following schema warning: imx93-11x11-evk.dtb: dma-controller@42000000: Unevaluated properties are not allowed ('shared-interrupt' was unexpected) from schema $id: http://devicetree.org/schemas/dma/fsl,edma.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 58efd84f73d96ffa2573204a7d591ad08ff1d633 Author: Fabio Estevam Date: Mon Nov 13 20:12:29 2023 -0300 arm64: dts: imx8qxp-mek: Fix gpio-sbu-mux compatible Per gpio-sbu-mux.yaml, the compatible entry is incomplete. The imx8qxp-mek board uses a CBDTU02043, so complete the gpio-sbu-mux compatible accordingly. This fixes the following schema warning: imx8qxp-mek.dtb: gpio-sbu-mux: compatible:0: 'gpio-sbu-mux' is not one of ['onnn,fsusb43l10x', 'pericom,pi3usb102'] from schema $id: http://devicetree.org/schemas/usb/gpio-sbu-mux.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 190efda73985767e6408e5a15577d428b9c80b27 Author: Fabio Estevam Date: Mon Nov 13 20:04:00 2023 -0300 arm64: dts: imx8mp-debix-model-a: Use phy-mode The property 'phy-connection-type' can be used to describe the interface type between the Ethernet device and the Ethernet PHY device. However, snps,dwmac.yaml gives the following warning: imx8mp-debix-model-a.dtb: ethernet@30bf0000: 'phy-mode' is a required property from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml# To avoid the warning, switch to the more commonly used, 'phy-mode' property instead. Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit 1a95c9090bbc1fbf74c03ef01eb51bd2902025b2 Author: Fabio Estevam Date: Mon Nov 13 17:25:21 2023 -0300 arm64: dts: imx8mm-nitrogen-r2: Fix I2C mux subnode name Per i2c-mux-pca954x.yaml, the I2C subnodes should follow the 'i2c@' format. Change it to fix the following schema warning: imx8mm-nitrogen-r2.dtb: i2c-mux@70: Unevaluated properties are not allowed ('i2c3@0' was unexpected) from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit f29c19a6e488154713a55db727bb90d85e4aaa6b Author: Fabio Estevam Date: Mon Nov 13 16:35:48 2023 -0300 arm64: dts: imx8dxl-ss-conn: Fix Ethernet interrupt-names order Per snps,dwmac.yaml, the interrupt-names entries should be in the following order: "macirq", "eth_wake_irq"; Change it to fix the following schema warnings. imx8dxl-evk.dtb: ethernet@5b050000: interrupt-names:0: 'macirq' was expected from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml# imx8dxl-evk.dtb: ethernet@5b050000: interrupt-names:1: 'macirq' is not one of ['eth_wake_irq', 'eth_lpi'] from schema $id: http://devicetree.org/schemas/net/snps,dwmac.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 7c1d1944e6372a9ea5a35f82c0362111c5504964 Author: Fabio Estevam Date: Mon Nov 13 16:26:49 2023 -0300 arm64: dts: imx8mm-emcon-avari: Fix gpio-cells Per nxp,pcf8575.yaml, #gpio-cells should be 2. Change it to fix the following schema warning: imx8mm-emcon-avari.dtb: gpio@3a: #gpio-cells:0:0: 2 was expected from schema $id: http://devicetree.org/schemas/gpio/nxp,pcf8575.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 5a8e9b022e569f9f8fdb5106c3c6e0636ad3ebcf Author: Fabio Estevam Date: Mon Nov 13 16:21:39 2023 -0300 arm64: dts: imx8qm-ss-dma: Pass lpuart dma-names Per fsl-lpuart.yaml, when the 'dmas' property is used 'dma-names' should also be present. Pass the lpuart 'dma-names' property to fix the following schema warnings: imx8dxl-evk.dtb: serial@5a060000: dma-names:0: 'rx' was expected from schema $id: http://devicetree.org/schemas/serial/fsl-lpuart.yaml# imx8dxl-evk.dtb: serial@5a060000: dma-names:1: 'tx' was expected from schema $id: http://devicetree.org/schemas/serial/fsl-lpuart.yaml# imx8dxl-evk.dtb: serial@5a060000: Unevaluated properties are not allowed ('dma-names' was unexpected) from schema $id: http://devicetree.org/schemas/serial/fsl-lpuart.yaml# Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 6d382d51d9799d3610fccc451dd69c842710c364 Author: Oleksij Rempel Date: Mon Nov 13 12:38:55 2023 +0100 arm64: dts: freescale: Add SKOV IMX8MP CPU revB board Add Skov i.MX8MP based climate controller. Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit c8e6e06edec287ef7fd9b034d93be51e27497853 Author: Hugo Villeneuve Date: Tue Nov 7 10:50:40 2023 -0500 arm64: dts: imx8mn-var-som-symphony: add vcc supply for PCA9534 The following warning is shown when probing device: pca953x 1-0020: supply vcc not found, using dummy regulator Define a new fixed 3.3v regulator for carrier board peripherals, enabled by mosfet switch Q2 after the SOM_3V3 supply rises (no software control). Add this new regulator as vcc supply to the PCA9534 to silence the warning. Signed-off-by: Hugo Villeneuve Signed-off-by: Shawn Guo commit 67275c2f3d9ba6106e7195fb8f0f4b355138b8a5 Author: Hugo Villeneuve Date: Tue Dec 5 10:08:14 2023 -0500 arm64: dts: freescale: introduce rve-gateway board The RVE gateway board is based on a Variscite VAR-SOM-NANO, with a NXP MX8MN nano CPU. Signed-off-by: Hugo Villeneuve Signed-off-by: Shawn Guo commit 4168df27f54a37bd661b363459e4e28ea4e6242f Author: Kieran Bingham Date: Mon Nov 27 12:40:34 2023 +0000 arm64: dts: freescale: debix-som-a-bmb-08: Add CSI Power Regulators Provide the 1.8 and 3.3 volt regulators that are utilised on the Debix SOM BMB-08 base board. Facilitate this by also supplying the pin control used to enable the regulators on the second MIPI CSI port. Reviewed-by: Marco Felsch Signed-off-by: Kieran Bingham Signed-off-by: Shawn Guo commit dfd3647c13b98478bd4b725ed95ea72e1e577cf6 Author: Andrejs Cainikovs Date: Fri Oct 20 17:30:21 2023 +0200 arm64: dts: imx8-apalis: add can power-up delay on ixora board Newer variants of Ixora boards require a power-up delay when powering up the CAN transceiver of up to 1ms. Signed-off-by: Andrejs Cainikovs Signed-off-by: Shawn Guo commit 2f05cd74fe2be3138c30aa1b7109c33ae0a245ed Author: Hugo Villeneuve Date: Mon Oct 30 11:19:20 2023 -0400 arm64: dts: imx8mn-var-som: add fixed 3.3V regulator for EEPROM When the EEPROM is probed, we have this warning: at24 0-0052: supply vcc not found, using dummy regulator Add fixed 3.3v regulator to silence the warning. Signed-off-by: Hugo Villeneuve Signed-off-by: Shawn Guo commit 31e2689b9985e5226ef866dd9842c7c14c69a6d2 Author: Fabio Estevam Date: Mon Oct 30 15:32:13 2023 -0300 arm64: dts: imx8mm-venice-gw7: Fix pci sub-nodes Several schema warnings are seen when running: make dtbs_check DT_SCHEMA_FILES=pci-bus.yaml Fix them. Signed-off-by: Fabio Estevam Acked-by: Tim Harvey Signed-off-by: Shawn Guo commit 010dc015b811a4e715a25273df2e357fa099de24 Author: Alexander Stein Date: Wed Oct 25 09:28:32 2023 +0200 arm64: dts: imx8mp: Disable dsp reserved memory by default Even if the 'dsp' node is disabled the memory intended to be used by the DSP is reserved. This limits the memory range suitable for CMA allocation. Thus disable the dsp_reserved node. DSP users need to enable it in parallel to the 'dsp' node. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 4bedc468b725d55655dc8c9f5528932f4d77ccb0 Author: Adam Ford Date: Sun Oct 22 11:19:10 2023 -0500 arm64: dts: imx8mp: Add NPU Node The NPU is based on the Vivante GC8000 and its power-domain is controlled my pgc_mlmix. Since the power-domain uses some of these clocks, setup the clock parent and rates inside the power-domain, and add the NPU node. The data sheet states the CLK_ML_AHB should be 300MHz for nominal, but 800MHz clock will divide down to 266 instead. Boards which operate in over-drive mode should update the clocks on their boards accordingly. When the driver loads, the NPU numerates as: etnaviv-gpu 38500000.npu: model: GC8000, revision: 8002 Signed-off-by: Adam Ford Reviewed-by: Alexander Stein Signed-off-by: Shawn Guo commit 949208664fe8255f092ffcd75a2d93509f666ba9 Author: Kieran Bingham Date: Wed Nov 1 10:43:04 2023 +0000 arm64: dts: freescale: debix-som: Add heartbeat LED Map the 'RUN' LED present on the Debix-SOM as a heartbeat. Reviewed-by: Marco Felsch Signed-off-by: Kieran Bingham Signed-off-by: Shawn Guo commit 3eb1b39b2415bcb29077c4cbaf4a0cb489b9a50e Author: Alexander Stein Date: Fri Oct 20 15:07:55 2023 +0200 arm64: dts: freescale: Add dual-channel LVDS overlay for TQMa8MPxL This adds an overlay for the supported LVDS display AUO G133HAN01. Configure the video PLL frequency to exactly match typical pixel clock of 141.200 MHz. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 85e51f62a38b5d83454dc30c74d5b19c29aa49b8 Author: Tim Harvey Date: Wed Oct 18 11:10:28 2023 -0700 arm64: dts: imx8mp-venice-gw74xx: remove unecessary propreties in tpm node Remove unnecessary #address-cells and #size-cells from tpm node. Fixes: 531936b218d8 ("arm64: dts: imx8mp-venice-gw74xx: update to revB PCB") Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit 60ae7e9e91641de9d517c4c09f4b87d71afce6f6 Author: Krzysztof Kozlowski Date: Fri Nov 24 10:51:03 2023 +0100 ARM: dts: nxp: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit d53314dd068e782ba0fa808405026f37dbedeb1e Author: Hiago De Franco Date: Mon Nov 20 21:58:18 2023 +0100 ARM: dts: imx7d-colibri-emmc: Add usdhc aliases Add mmc aliases to ensure a consistent mmc device naming across the Toradex SoM family, with this commit mmc0 is the on-module eMMC boot device and the not available mmc interfaces are removed. Signed-off-by: Hiago De Franco Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 265f56542a936fa2edac21ee2cd45f0d331707a6 Author: Hiago De Franco Date: Mon Nov 20 21:58:17 2023 +0100 ARM: dts: imx6qdl-colibri: Add usdhc aliases Add mmc aliases to ensure a consistent mmc device naming across the Toradex SoM family, with this commit mmc0 is the on-module eMMC boot device and the not available mmc interfaces are removed. Signed-off-by: Hiago De Franco Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit cdb7389abe3065be80e70e8112afb1f625e7a770 Author: Hiago De Franco Date: Mon Nov 20 21:58:16 2023 +0100 ARM: dts: imx6qdl-apalis: Add usdhc aliases Add mmc aliases to ensure a consistent mmc device naming across the Toradex SoM family, with this commit mmc0 is the on-module eMMC boot device and the not available mmc interfaces are removed. Signed-off-by: Hiago De Franco Signed-off-by: Francesco Dolcini Signed-off-by: Shawn Guo commit 32596b101f6cd87ab1f6e6a1c2a44c70546dde48 Author: Lech Perczak Date: Sat Nov 18 00:23:52 2023 +0100 ARM: dts: nxp: imx7d-pico: add cpu-supply nodes The PICO-IMX7D SoM has the usual power supply configuration using output sw1a of PF3000 PMIC, which was defined in downstream derivative of linux-imx (see link) in the sources for "Android Things" devkit. It is required to support CPU frequency scaling. Map the respective "cpu-supply" nodes of each core to sw1a of the PMIC. Enabling them causes cpufreq-dt, and imx-thermal drivers to probe successfully, and CPU frequency scaling to function. Link: https://android.googlesource.com/platform/hardware/bsp/kernel/nxp/imx-v4.1/+/o-iot-preview-5/arch/arm/boot/dts/imx7d-pico.dtsi#849 Cc: Fabio Estevam Cc: Shawn Guo Cc: Sascha Hauer Signed-off-by: Lech Perczak Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit d99cfab43cbd5206ac3eb79fec0fda817dd8f536 Author: Rob Herring Date: Wed Nov 15 15:03:18 2023 -0600 ARM: imx: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Signed-off-by: Shawn Guo commit 37dbc39776db525e1738ed5d67251f30ad5e6f19 Author: Oleksij Rempel Date: Mon Nov 13 12:38:54 2023 +0100 dt-bindings: arm: Add compatible for SKOV i.MX8MP RevB board Add DT compatible string for a SKOV i.MX8MP RevB climate controller board. Signed-off-by: Oleksij Rempel Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit bb405e8b5336344c02a80d10979e17ff7629541c Author: Hugo Villeneuve Date: Tue Dec 5 10:08:13 2023 -0500 dt-bindings: arm: fsl: add RVE gateway board Add DT compatible string for RVE gateway board based on a Variscite VAR-SOM-NANO with a NXP MX8MN nano CPU. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Hugo Villeneuve Signed-off-by: Shawn Guo commit 29b560a4e37ed70d6c233a50ecad84097d50b816 Author: Hugo Villeneuve Date: Tue Dec 5 10:08:12 2023 -0500 dt-bindings: vendor-prefixes: add rve Add vendor prefix for Recharge Véhicule Électrique (RVE), which manufactures electric vehicle chargers infrastructure components. Acked-by: Krzysztof Kozlowski Signed-off-by: Hugo Villeneuve Signed-off-by: Shawn Guo commit 96d1d578dec1e69ed086dd67f7e5974875d981b3 Author: Randy Dunlap Date: Tue Dec 5 14:53:18 2023 -0800 android: binder: fix a kernel-doc enum warning Add kernel-doc notation for @LOOP_END to prevent a kernel-doc warning. binder_alloc_selftest.c:76: warning: Enum value 'LOOP_END' not described in enum 'buf_end_align_type' Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Arve Hjønnevåg Cc: Todd Kjos Cc: Martijn Coenen Cc: Joel Fernandes Cc: Christian Brauner Cc: Carlos Llamas Cc: Suren Baghdasaryan Acked-by: Carlos Llamas Link: https://lore.kernel.org/r/20231205225324.32362-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit dadc77c93b6e8ca8edd1e290fc1702dc5cef18e3 Author: Rafał Miłecki Date: Wed Nov 22 15:42:08 2023 +0100 ARM: dts: broadcom: Add BCM63138's high speed UART It's designed for hardwiring Bluetooth devices to it. Signed-off-by: Rafał Miłecki Link: https://lore.kernel.org/r/20231122144208.21114-2-zajec5@gmail.com Signed-off-by: Florian Fainelli commit 3aee2bf9c49be2144460d7267560232e3d45d367 Merge: 5ffb260f754bf 064e0bea19b35 Author: Alexei Starovoitov Date: Tue Dec 5 13:40:21 2023 -0800 Merge branch 'complete-bpf-verifier-precision-tracking-support-for-register-spills' Andrii Nakryiko says: ==================== Complete BPF verifier precision tracking support for register spills Add support to BPF verifier to track and support register spill/fill to/from stack regardless if it was done through read-only R10 register (which is the only form supported today), or through a general register after copying R10 into it, while also potentially modifying offset. Once we add register this generic spill/fill support to precision backtracking, we can take advantage of it to stop doing eager STACK_ZERO conversion on register spill. Instead we can rely on (im)precision of spilled const zero register to improve verifier state pruning efficiency. This situation of using const zero register to initialize stack slots is very common with __builtin_memset() usage or just zero-initializing variables on the stack, and it causes unnecessary state duplication, as that STACK_ZERO knowledge is often not necessary for correctness, as those zero values are never used in precise context. Thus, relying on register imprecision helps tremendously, especially in real-world BPF programs. To make spilled const zero register behave completely equivalently to STACK_ZERO, we need to improve few other small pieces, which is done in the second part of the patch set. See individual patches for details. There are also two small bug fixes spotted during STACK_ZERO debugging. The patch set consists of logically three changes: - patch #1 (and corresponding tests in patch #2) is fixing/impoving precision propagation for stack spills/fills. This can be landed as a stand-alone improvement; - patches #3 through #9 is improving verification scalability by utilizing register (im)precision instead of eager STACK_ZERO. These changes depend on patch #1. - patch #10 is a memory efficiency improvement to how instruction/jump history is tracked and maintained. It depends on patch #1, but is not strictly speaking required, even though I believe it's a good long-term solution to have a path-dependent per-instruction information. Kind of like a path-dependent counterpart to path-agnostic insn_aux array. v3->v3: - fixed up Fixes tag (Alexei); - fixed few more selftests to not use BPF_ST instruction in inline asm directly, checked with CI, it was happy (CI); v2->v3: - BPF_ST instruction workaround (Eduard); - force dereference in added tests to catch problems (Eduard); - some commit message massaging (Alexei); v1->v2: - clean ups, WARN_ONCE(), insn_flags helpers added (Eduard); - added more selftests for STACK_ZERO/STACK_MISC cases (Eduard); - a bit more detailed explanation of effect of avoiding STACK_ZERO in favor of register spill in patch #8 commit (Alexei); - global shared instruction history refactoring moved to be the last patch in the series to make it easier to revert it, if applied (Alexei). ==================== Link: https://lore.kernel.org/r/20231205184248.1502704-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 064e0bea19b356c5d5f48a4549d80a3c03ce898b Author: Andrii Nakryiko Date: Tue Dec 5 10:42:47 2023 -0800 selftests/bpf: validate precision logic in partial_stack_load_preserves_zeros Enhance partial_stack_load_preserves_zeros subtest with detailed precision propagation log checks. We know expect fp-16 to be spilled, initially imprecise, zero const register, which is later marked as precise even when partial stack slot load is performed, even if it's not a register fill (!). Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231205184248.1502704-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 18a433b62061e3d787bfc3e670fa711fecbd7cb4 Author: Andrii Nakryiko Date: Tue Dec 5 10:42:46 2023 -0800 bpf: track aligned STACK_ZERO cases as imprecise spilled registers Now that precision backtracing is supporting register spill/fill to/from stack, there is another oportunity to be exploited here: minimizing precise STACK_ZERO cases. With a simple code change we can rely on initially imprecise register spill tracking for cases when register spilled to stack was a known zero. This is a very common case for initializing on the stack variables, including rather large structures. Often times zero has no special meaning for the subsequent BPF program logic and is often overwritten with non-zero values soon afterwards. But due to STACK_ZERO vs STACK_MISC tracking, such initial zero initialization actually causes duplication of verifier states as STACK_ZERO is clearly different than STACK_MISC or spilled SCALAR_VALUE register. The effect of this (now) trivial change is huge, as can be seen below. These are differences between BPF selftests, Cilium, and Meta-internal BPF object files relative to previous patch in this series. You can see improvements ranging from single-digit percentage improvement for instructions and states, all the way to 50-60% reduction for some of Meta-internal host agent programs, and even some Cilium programs. For Meta-internal ones I left only the differences for largest BPF object files by states/instructions, as there were too many differences in the overall output. All the differences were improvements, reducting number of states and thus instructions validated. Note, Meta-internal BPF object file names are not printed below. Many copies of balancer_ingress are actually many different configurations of Katran, so they are different BPF programs, which explains state reduction going from -16% all the way to 31%, depending on BPF program logic complexity. I also tooked a closer look at a few small-ish BPF programs to validate the behavior. Let's take bpf_iter_netrlink.bpf.o (first row below). While it's just 8 vs 5 states, verifier log is still pretty long to include it here. But the reduction in states is due to the following piece of C code: unsigned long ino; ... sk = s->sk_socket; if (!sk) { ino = 0; } else { inode = SOCK_INODE(sk); bpf_probe_read_kernel(&ino, sizeof(ino), &inode->i_ino); } BPF_SEQ_PRINTF(seq, "%-8u %-8lu\n", s->sk_drops.counter, ino); return 0; You can see that in some situations `ino` is zero-initialized, while in others it's unknown value filled out by bpf_probe_read_kernel(). Before this change code after if/else branches have to be validated twice. Once with (precise) ino == 0, due to eager STACK_ZERO logic, and then again for when ino is just STACK_MISC. But BPF_SEQ_PRINTF() doesn't care about precise value of ino, so with the change in this patch verifier is able to prune states from after one of the branches, reducing number of total states (and instructions) required for successful validation. Similar principle applies to bigger real-world applications, just at a much larger scale. SELFTESTS ========= File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) --------------------------------------- ----------------------- --------- --------- --------------- ---------- ---------- ------------- bpf_iter_netlink.bpf.linked3.o dump_netlink 148 104 -44 (-29.73%) 8 5 -3 (-37.50%) bpf_iter_unix.bpf.linked3.o dump_unix 8474 8404 -70 (-0.83%) 151 147 -4 (-2.65%) bpf_loop.bpf.linked3.o stack_check 560 324 -236 (-42.14%) 42 24 -18 (-42.86%) local_storage_bench.bpf.linked3.o get_local 120 77 -43 (-35.83%) 9 6 -3 (-33.33%) loop6.bpf.linked3.o trace_virtqueue_add_sgs 10167 9868 -299 (-2.94%) 226 206 -20 (-8.85%) pyperf600_bpf_loop.bpf.linked3.o on_event 4872 3423 -1449 (-29.74%) 322 229 -93 (-28.88%) strobemeta.bpf.linked3.o on_event 180697 176036 -4661 (-2.58%) 4780 4734 -46 (-0.96%) test_cls_redirect.bpf.linked3.o cls_redirect 65594 65401 -193 (-0.29%) 4230 4212 -18 (-0.43%) test_global_func_args.bpf.linked3.o test_cls 145 136 -9 (-6.21%) 10 9 -1 (-10.00%) test_l4lb.bpf.linked3.o balancer_ingress 4760 2612 -2148 (-45.13%) 113 102 -11 (-9.73%) test_l4lb_noinline.bpf.linked3.o balancer_ingress 4845 4877 +32 (+0.66%) 219 221 +2 (+0.91%) test_l4lb_noinline_dynptr.bpf.linked3.o balancer_ingress 2072 2087 +15 (+0.72%) 97 98 +1 (+1.03%) test_seg6_loop.bpf.linked3.o __add_egr_x 12440 9975 -2465 (-19.82%) 364 353 -11 (-3.02%) test_tcp_hdr_options.bpf.linked3.o estab 2558 2572 +14 (+0.55%) 179 180 +1 (+0.56%) test_xdp_dynptr.bpf.linked3.o _xdp_tx_iptunnel 645 596 -49 (-7.60%) 26 24 -2 (-7.69%) test_xdp_noinline.bpf.linked3.o balancer_ingress_v6 3520 3516 -4 (-0.11%) 216 216 +0 (+0.00%) xdp_synproxy_kern.bpf.linked3.o syncookie_tc 82661 81241 -1420 (-1.72%) 5073 5155 +82 (+1.62%) xdp_synproxy_kern.bpf.linked3.o syncookie_xdp 84964 82297 -2667 (-3.14%) 5130 5157 +27 (+0.53%) META-INTERNAL ============= Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) -------------------------------------- --------- --------- ----------------- ---------- ---------- --------------- balancer_ingress 27925 23608 -4317 (-15.46%) 1488 1482 -6 (-0.40%) balancer_ingress 31824 27546 -4278 (-13.44%) 1658 1652 -6 (-0.36%) balancer_ingress 32213 27935 -4278 (-13.28%) 1689 1683 -6 (-0.36%) balancer_ingress 32213 27935 -4278 (-13.28%) 1689 1683 -6 (-0.36%) balancer_ingress 31824 27546 -4278 (-13.44%) 1658 1652 -6 (-0.36%) balancer_ingress 38647 29562 -9085 (-23.51%) 2069 1835 -234 (-11.31%) balancer_ingress 38647 29562 -9085 (-23.51%) 2069 1835 -234 (-11.31%) balancer_ingress 40339 30792 -9547 (-23.67%) 2193 1934 -259 (-11.81%) balancer_ingress 37321 29055 -8266 (-22.15%) 1972 1795 -177 (-8.98%) balancer_ingress 38176 29753 -8423 (-22.06%) 2008 1831 -177 (-8.81%) balancer_ingress 29193 20910 -8283 (-28.37%) 1599 1422 -177 (-11.07%) balancer_ingress 30013 21452 -8561 (-28.52%) 1645 1447 -198 (-12.04%) balancer_ingress 28691 24290 -4401 (-15.34%) 1545 1531 -14 (-0.91%) balancer_ingress 34223 28965 -5258 (-15.36%) 1984 1875 -109 (-5.49%) balancer_ingress 35481 26158 -9323 (-26.28%) 2095 1806 -289 (-13.79%) balancer_ingress 35481 26158 -9323 (-26.28%) 2095 1806 -289 (-13.79%) balancer_ingress 35868 26455 -9413 (-26.24%) 2140 1827 -313 (-14.63%) balancer_ingress 35868 26455 -9413 (-26.24%) 2140 1827 -313 (-14.63%) balancer_ingress 35481 26158 -9323 (-26.28%) 2095 1806 -289 (-13.79%) balancer_ingress 35481 26158 -9323 (-26.28%) 2095 1806 -289 (-13.79%) balancer_ingress 34844 29485 -5359 (-15.38%) 2036 1918 -118 (-5.80%) fbflow_egress 3256 2652 -604 (-18.55%) 218 192 -26 (-11.93%) fbflow_ingress 1026 944 -82 (-7.99%) 70 63 -7 (-10.00%) sslwall_tc_egress 8424 7360 -1064 (-12.63%) 498 458 -40 (-8.03%) syar_accept_protect 15040 9539 -5501 (-36.58%) 364 220 -144 (-39.56%) syar_connect_tcp_v6 15036 9535 -5501 (-36.59%) 360 216 -144 (-40.00%) syar_connect_udp_v4 15039 9538 -5501 (-36.58%) 361 217 -144 (-39.89%) syar_connect_connect4_protect4 24805 15833 -8972 (-36.17%) 756 480 -276 (-36.51%) syar_lsm_file_open 167772 151813 -15959 (-9.51%) 1836 1667 -169 (-9.20%) syar_namespace_create_new 14805 9304 -5501 (-37.16%) 353 209 -144 (-40.79%) syar_python3_detect 17531 12030 -5501 (-31.38%) 391 247 -144 (-36.83%) syar_ssh_post_fork 16412 10911 -5501 (-33.52%) 405 261 -144 (-35.56%) syar_enter_execve 14728 9227 -5501 (-37.35%) 345 201 -144 (-41.74%) syar_enter_execveat 14728 9227 -5501 (-37.35%) 345 201 -144 (-41.74%) syar_exit_execve 16622 11121 -5501 (-33.09%) 376 232 -144 (-38.30%) syar_exit_execveat 16622 11121 -5501 (-33.09%) 376 232 -144 (-38.30%) syar_syscalls_kill 15288 9787 -5501 (-35.98%) 398 254 -144 (-36.18%) syar_task_enter_pivot_root 14898 9397 -5501 (-36.92%) 357 213 -144 (-40.34%) syar_syscalls_setreuid 16678 11177 -5501 (-32.98%) 429 285 -144 (-33.57%) syar_syscalls_setuid 16678 11177 -5501 (-32.98%) 429 285 -144 (-33.57%) syar_syscalls_process_vm_readv 14959 9458 -5501 (-36.77%) 364 220 -144 (-39.56%) syar_syscalls_process_vm_writev 15757 10256 -5501 (-34.91%) 390 246 -144 (-36.92%) do_uprobe 15519 10018 -5501 (-35.45%) 373 229 -144 (-38.61%) edgewall 179715 55783 -123932 (-68.96%) 12607 3999 -8608 (-68.28%) bictcp_state 7570 4131 -3439 (-45.43%) 496 269 -227 (-45.77%) cubictcp_state 7570 4131 -3439 (-45.43%) 496 269 -227 (-45.77%) tcp_rate_skb_delivered 447 272 -175 (-39.15%) 29 18 -11 (-37.93%) kprobe__bbr_set_state 4566 2615 -1951 (-42.73%) 209 124 -85 (-40.67%) kprobe__bictcp_state 4566 2615 -1951 (-42.73%) 209 124 -85 (-40.67%) inet_sock_set_state 1501 1337 -164 (-10.93%) 93 85 -8 (-8.60%) tcp_retransmit_skb 1145 981 -164 (-14.32%) 67 59 -8 (-11.94%) tcp_retransmit_synack 1183 951 -232 (-19.61%) 67 55 -12 (-17.91%) bpf_tcptuner 1459 1187 -272 (-18.64%) 99 80 -19 (-19.19%) tw_egress 801 776 -25 (-3.12%) 69 66 -3 (-4.35%) tw_ingress 795 770 -25 (-3.14%) 69 66 -3 (-4.35%) ttls_tc_ingress 19025 19383 +358 (+1.88%) 470 465 -5 (-1.06%) ttls_nat_egress 490 299 -191 (-38.98%) 33 20 -13 (-39.39%) ttls_nat_ingress 448 285 -163 (-36.38%) 32 21 -11 (-34.38%) tw_twfw_egress 511127 212071 -299056 (-58.51%) 16733 8504 -8229 (-49.18%) tw_twfw_ingress 500095 212069 -288026 (-57.59%) 16223 8504 -7719 (-47.58%) tw_twfw_tc_eg 511113 212064 -299049 (-58.51%) 16732 8504 -8228 (-49.18%) tw_twfw_tc_in 500095 212069 -288026 (-57.59%) 16223 8504 -7719 (-47.58%) tw_twfw_egress 12632 12435 -197 (-1.56%) 276 260 -16 (-5.80%) tw_twfw_ingress 12631 12454 -177 (-1.40%) 278 261 -17 (-6.12%) tw_twfw_tc_eg 12595 12435 -160 (-1.27%) 274 259 -15 (-5.47%) tw_twfw_tc_in 12631 12454 -177 (-1.40%) 278 261 -17 (-6.12%) tw_xdp_dump 266 209 -57 (-21.43%) 9 8 -1 (-11.11%) CILIUM ========= File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) ------------- -------------------------------- --------- --------- ---------------- ---------- ---------- -------------- bpf_host.o cil_to_netdev 6047 4578 -1469 (-24.29%) 362 249 -113 (-31.22%) bpf_host.o handle_lxc_traffic 2227 1585 -642 (-28.83%) 156 103 -53 (-33.97%) bpf_host.o tail_handle_ipv4_from_netdev 2244 1458 -786 (-35.03%) 163 106 -57 (-34.97%) bpf_host.o tail_handle_nat_fwd_ipv4 21022 10479 -10543 (-50.15%) 1289 670 -619 (-48.02%) bpf_host.o tail_handle_nat_fwd_ipv6 15433 11375 -4058 (-26.29%) 905 643 -262 (-28.95%) bpf_host.o tail_ipv4_host_policy_ingress 2219 1367 -852 (-38.40%) 161 96 -65 (-40.37%) bpf_host.o tail_nodeport_nat_egress_ipv4 22460 19862 -2598 (-11.57%) 1469 1293 -176 (-11.98%) bpf_host.o tail_nodeport_nat_ingress_ipv4 5526 3534 -1992 (-36.05%) 366 243 -123 (-33.61%) bpf_host.o tail_nodeport_nat_ingress_ipv6 5132 4256 -876 (-17.07%) 241 219 -22 (-9.13%) bpf_host.o tail_nodeport_nat_ipv6_egress 3702 3542 -160 (-4.32%) 215 205 -10 (-4.65%) bpf_lxc.o tail_handle_nat_fwd_ipv4 21022 10479 -10543 (-50.15%) 1289 670 -619 (-48.02%) bpf_lxc.o tail_handle_nat_fwd_ipv6 15433 11375 -4058 (-26.29%) 905 643 -262 (-28.95%) bpf_lxc.o tail_ipv4_ct_egress 5073 3374 -1699 (-33.49%) 262 172 -90 (-34.35%) bpf_lxc.o tail_ipv4_ct_ingress 5093 3385 -1708 (-33.54%) 262 172 -90 (-34.35%) bpf_lxc.o tail_ipv4_ct_ingress_policy_only 5093 3385 -1708 (-33.54%) 262 172 -90 (-34.35%) bpf_lxc.o tail_ipv6_ct_egress 4593 3878 -715 (-15.57%) 194 151 -43 (-22.16%) bpf_lxc.o tail_ipv6_ct_ingress 4606 3891 -715 (-15.52%) 194 151 -43 (-22.16%) bpf_lxc.o tail_ipv6_ct_ingress_policy_only 4606 3891 -715 (-15.52%) 194 151 -43 (-22.16%) bpf_lxc.o tail_nodeport_nat_ingress_ipv4 5526 3534 -1992 (-36.05%) 366 243 -123 (-33.61%) bpf_lxc.o tail_nodeport_nat_ingress_ipv6 5132 4256 -876 (-17.07%) 241 219 -22 (-9.13%) bpf_overlay.o tail_handle_nat_fwd_ipv4 20524 10114 -10410 (-50.72%) 1271 638 -633 (-49.80%) bpf_overlay.o tail_nodeport_nat_egress_ipv4 22718 19490 -3228 (-14.21%) 1475 1275 -200 (-13.56%) bpf_overlay.o tail_nodeport_nat_ingress_ipv4 5526 3534 -1992 (-36.05%) 366 243 -123 (-33.61%) bpf_overlay.o tail_nodeport_nat_ingress_ipv6 5132 4256 -876 (-17.07%) 241 219 -22 (-9.13%) bpf_overlay.o tail_nodeport_nat_ipv6_egress 3638 3548 -90 (-2.47%) 209 203 -6 (-2.87%) bpf_overlay.o tail_rev_nodeport_lb4 4368 3820 -548 (-12.55%) 248 215 -33 (-13.31%) bpf_overlay.o tail_rev_nodeport_lb6 2867 2428 -439 (-15.31%) 167 140 -27 (-16.17%) bpf_sock.o cil_sock6_connect 1718 1703 -15 (-0.87%) 100 99 -1 (-1.00%) bpf_xdp.o tail_handle_nat_fwd_ipv4 12917 12443 -474 (-3.67%) 875 849 -26 (-2.97%) bpf_xdp.o tail_handle_nat_fwd_ipv6 13515 13264 -251 (-1.86%) 715 702 -13 (-1.82%) bpf_xdp.o tail_lb_ipv4 39492 36367 -3125 (-7.91%) 2430 2251 -179 (-7.37%) bpf_xdp.o tail_lb_ipv6 80441 78058 -2383 (-2.96%) 3647 3523 -124 (-3.40%) bpf_xdp.o tail_nodeport_ipv6_dsr 1038 901 -137 (-13.20%) 61 55 -6 (-9.84%) bpf_xdp.o tail_nodeport_nat_egress_ipv4 13027 12096 -931 (-7.15%) 868 809 -59 (-6.80%) bpf_xdp.o tail_nodeport_nat_ingress_ipv4 7617 5900 -1717 (-22.54%) 522 413 -109 (-20.88%) bpf_xdp.o tail_nodeport_nat_ingress_ipv6 7575 7395 -180 (-2.38%) 383 374 -9 (-2.35%) bpf_xdp.o tail_rev_nodeport_lb4 6808 6739 -69 (-1.01%) 403 396 -7 (-1.74%) bpf_xdp.o tail_rev_nodeport_lb6 16173 15847 -326 (-2.02%) 1010 990 -20 (-1.98%) Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231205184248.1502704-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit add1cd7f22e61756987865ada9fe95cd86569025 Author: Andrii Nakryiko Date: Tue Dec 5 10:42:45 2023 -0800 selftests/bpf: validate zero preservation for sub-slot loads Validate that 1-, 2-, and 4-byte loads from stack slots not aligned on 8-byte boundary still preserve zero, when loading from all-STACK_ZERO sub-slots, or when stack sub-slots are covered by spilled register with known constant zero value. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231205184248.1502704-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit e322f0bcb8d371f4606eaf141c7f967e1a79bcb7 Author: Andrii Nakryiko Date: Tue Dec 5 10:42:44 2023 -0800 bpf: preserve constant zero when doing partial register restore Similar to special handling of STACK_ZERO, when reading 1/2/4 bytes from stack from slot that has register spilled into it and that register has a constant value zero, preserve that zero and mark spilled register as precise for that. This makes spilled const zero register and STACK_ZERO cases equivalent in their behavior. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231205184248.1502704-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit b33ceb6a3d2ee07fdd836373383a6d4783581324 Author: Andrii Nakryiko Date: Tue Dec 5 10:42:43 2023 -0800 selftests/bpf: validate STACK_ZERO is preserved on subreg spill Add tests validating that STACK_ZERO slots are preserved when slot is partially overwritten with subregister spill. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231205184248.1502704-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit eaf18febd6ebc381aeb61543705148b3e28c7c47 Author: Andrii Nakryiko Date: Tue Dec 5 10:42:42 2023 -0800 bpf: preserve STACK_ZERO slots on partial reg spills Instead of always forcing STACK_ZERO slots to STACK_MISC, preserve it in situations where this is possible. E.g., when spilling register as 1/2/4-byte subslots on the stack, all the remaining bytes in the stack slot do not automatically become unknown. If we knew they contained zeroes, we can preserve those STACK_ZERO markers. Add a helper mark_stack_slot_misc(), similar to scrub_spilled_slot(), but that doesn't overwrite either STACK_INVALID nor STACK_ZERO. Note that we need to take into account possibility of being in unprivileged mode, in which case STACK_INVALID is forced to STACK_MISC for correctness, as treating STACK_INVALID as equivalent STACK_MISC is only enabled in privileged mode. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231205184248.1502704-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit ab125ed3ec1c10ccc36bc98c7a4256ad114a3dae Author: Andrii Nakryiko Date: Tue Dec 5 10:42:41 2023 -0800 bpf: fix check for attempt to corrupt spilled pointer When register is spilled onto a stack as a 1/2/4-byte register, we set slot_type[BPF_REG_SIZE - 1] (plus potentially few more below it, depending on actual spill size). So to check if some stack slot has spilled register we need to consult slot_type[7], not slot_type[0]. To avoid the need to remember and double-check this in the future, just use is_spilled_reg() helper. Fixes: 27113c59b6d0 ("bpf: Check the other end of slot_type for STACK_SPILL") Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231205184248.1502704-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 876301881c436bf38e83a2c0d276a24b642e4aab Author: Andrii Nakryiko Date: Tue Dec 5 10:42:40 2023 -0800 selftests/bpf: add stack access precision test Add a new selftests that validates precision tracking for stack access instruction, using both r10-based and non-r10-based accesses. For non-r10 ones we also make sure to have non-zero var_off to validate that final stack offset is tracked properly in instruction history information inside verifier. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231205184248.1502704-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 41f6f64e6999a837048b1bd13a2f8742964eca6b Author: Andrii Nakryiko Date: Tue Dec 5 10:42:39 2023 -0800 bpf: support non-r10 register spill/fill to/from stack in precision tracking Use instruction (jump) history to record instructions that performed register spill/fill to/from stack, regardless if this was done through read-only r10 register, or any other register after copying r10 into it *and* potentially adjusting offset. To make this work reliably, we push extra per-instruction flags into instruction history, encoding stack slot index (spi) and stack frame number in extra 10 bit flags we take away from prev_idx in instruction history. We don't touch idx field for maximum performance, as it's checked most frequently during backtracking. This change removes basically the last remaining practical limitation of precision backtracking logic in BPF verifier. It fixes known deficiencies, but also opens up new opportunities to reduce number of verified states, explored in the subsequent patches. There are only three differences in selftests' BPF object files according to veristat, all in the positive direction (less states). File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) -------------------------------------- ------------- --------- --------- ------------- ---------- ---------- ------------- test_cls_redirect_dynptr.bpf.linked3.o cls_redirect 2987 2864 -123 (-4.12%) 240 231 -9 (-3.75%) xdp_synproxy_kern.bpf.linked3.o syncookie_tc 82848 82661 -187 (-0.23%) 5107 5073 -34 (-0.67%) xdp_synproxy_kern.bpf.linked3.o syncookie_xdp 85116 84964 -152 (-0.18%) 5162 5130 -32 (-0.62%) Note, I avoided renaming jmp_history to more generic insn_hist to minimize number of lines changed and potential merge conflicts between bpf and bpf-next trees. Notice also cur_hist_entry pointer reset to NULL at the beginning of instruction verification loop. This pointer avoids the problem of relying on last jump history entry's insn_idx to determine whether we already have entry for current instruction or not. It can happen that we added jump history entry because current instruction is_jmp_point(), but also we need to add instruction flags for stack access. In this case, we don't want to entries, so we need to reuse last added entry, if it is present. Relying on insn_idx comparison has the same ambiguity problem as the one that was fixed recently in [0], so we avoid that. [0] https://patchwork.kernel.org/project/netdevbpf/patch/20231110002638.4168352-3-andrii@kernel.org/ Acked-by: Eduard Zingerman Reported-by: Tao Lyu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231205184248.1502704-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit a69badad736c0f460401080a67e6208e25ab25e2 Author: Andy Shevchenko Date: Mon Nov 20 16:10:48 2023 +0200 EDAC, pnd2: Sort headers alphabetically Sort the headers in alphabetic order in order to ease the maintenance for this part. Signed-off-by: Andy Shevchenko Reviewed-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit f1b0b1167f8bf139afa76e795d06fb814067d53e Author: Andy Shevchenko Date: Mon Nov 20 16:10:47 2023 +0200 EDAC, pnd2: Correct misleading error message in mk_region_mask() The mask parameter is expected to be of a sequence of the set bits. It does not mean it must be power of two (only single bit set). Correct misleading error message. Suggested-by: Qiuxu Zhuo Signed-off-by: Andy Shevchenko Signed-off-by: Tony Luck commit 530258f872138a9c5db5ace73313c9c88a31c96e Author: Andy Shevchenko Date: Mon Nov 20 16:10:46 2023 +0200 EDAC, pnd2: Apply bit macros and helpers where it makes sense Apply bit macros (BIT()/BIT_ULL()/GENMASK()/etc) and helpers (for_each_set_bit()/etc) where it makes sense. Signed-off-by: Andy Shevchenko Reviewed-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit a50cc8de9995640d3c8062c13bffb67c01782674 Author: Andy Shevchenko Date: Mon Nov 20 16:10:45 2023 +0200 EDAC, pnd2: Replace custom definition by one from sizes.h The sizes.h provides a set of common size definitions, use it. Signed-off-by: Andy Shevchenko Reviewed-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit 2719675fa8111a8d7a060133e1dd4797d20c9754 Author: Srinivas Pandruvada Date: Mon Nov 20 10:59:42 2023 -0800 cpufreq: intel_pstate: Prioritize firmware-provided balance performance EPP The platform firmware can provide a balance performance EPP value by enabling HWP and programming the EPP to the desired value. However, currently this only takes effect for processors listed in intel_epp_balance_perf[], so in order to enable a new processor model to utilize this mechanism, that table needs to be updated. It arguably should not be necessary to modify the kernel to work properly with every new generation of processors, though, and distributions that don't always ship the most recent kernels should be able to run reasonably well on new hardware without code changes. For this reason, move the check to avoid updating the EPP when the balance performance EPP is unmodified from the power-up default of 0x80 after the check that allows the firmware-provided balance performance EPP value to be retrieved. This will cause the code to always look for the firmware- provided value before consulting intel_epp_balance_perf[] and the handling of new hardware will not depend on whether or not that thable has been updated yet. Signed-off-by: Srinivas Pandruvada [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit b0044823a6607e535fdb083c89f487fbf183b171 Author: Jai Luthra Date: Fri Dec 1 10:39:24 2023 +0530 arm64: dts: ti: Use OF_ALL_DTBS for combined blobs Combined dtb builds are only useful for making sure that the overlay applies cleanly on the base dtb. So we move all such combined blobs under a `dtb- +=` section that is only built when CONFIG_OF_ALL_DTBS is enabled. Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20231201-csi_dts-v3-9-9f06f31080fe@ti.com Signed-off-by: Nishanth Menon commit 4111db03dc05c49ded2d9ec21b52c0ca45b59303 Author: Jai Luthra Date: Fri Dec 1 10:39:23 2023 +0530 arm64: dts: ti: k3-am62x: Add overlay for IMX219 RPi v2 Camera (IMX219) is an 8MP camera that can be used with SK-AM62A through the 22-pin CSI-RX connector. Same overlay can be used across SK-AM62* boards that have a 15/22-pin FFC connector, so we name it with the k3-am62x- prefix. Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20231201-csi_dts-v3-8-9f06f31080fe@ti.com Signed-off-by: Nishanth Menon commit 00d7f8f9efdbdf551e92683f5cd274145dce2c4b Author: Jai Luthra Date: Fri Dec 1 10:39:22 2023 +0530 arm64: dts: ti: k3-am62a7-sk: Enable camera peripherals Enable I2C-2 as it is used to control CSI based sensors. Also enable IO-EXP-2 as it controls the mux between different CSI-2 connectors. Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20231201-csi_dts-v3-7-9f06f31080fe@ti.com Signed-off-by: Nishanth Menon commit 635ed97151945a7fdf104ef1227d86f0a9e3678e Author: Jai Luthra Date: Fri Dec 1 10:39:21 2023 +0530 arm64: dts: ti: k3-am62x: Add overlays for OV5640 Three different OV5640 modules are supported using the 15-pin FFC connector on SK-AM62: - Digilent PCam 5C - ALINX AN5641 - TEVI-OV5640-*-RPI The Digilent and ALINX modules supply a 12Mhz XCLK to the sensor, while the TEVI module supplies a 24Mhz XCLK, thus requiring a separate overlay. These overlays can be used on other boards of the SK-AM62* family that have a 15/22-pin FFC connector, so we name the overlays with the prefix k3-am62x-. Tested-by: Martyn Welch Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20231201-csi_dts-v3-6-9f06f31080fe@ti.com Signed-off-by: Nishanth Menon commit fed1e53ecf9f0ecf04bd931428287fd1002899ef Author: Jai Luthra Date: Fri Dec 1 10:39:20 2023 +0530 arm64: dts: ti: k3-am62x-sk: Enable camera peripherals CSI cameras are controlled using I2C, on SK-AM62 and derivative boards this is routed to I2C-2, so enable that bus. Specific sensor connected to this bus will be described in the DT overlay for each sensor. Tested-by: Martyn Welch Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20231201-csi_dts-v3-5-9f06f31080fe@ti.com Signed-off-by: Nishanth Menon commit defa1438c5b34af13fb56c7faefaeec648805530 Author: Jai Luthra Date: Fri Dec 1 10:39:19 2023 +0530 arm64: dts: ti: k3-am625-beagleplay: Add overlays for OV5640 Three different OV5640 modules are supported using the FFC connector on BeaglePlay: - Digilent PCam 5C - ALINX AN5641 - TEVI-OV5640-*-RPI The Digilent and ALINX modules supply a 12Mhz XCLK to the sensor, while the TEVI module supplies a 24Mhz XCLK, thus requiring a separate overlay. Reviewed-by: Andrew Davis Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20231201-csi_dts-v3-4-9f06f31080fe@ti.com Signed-off-by: Nishanth Menon commit c45e3b54ad1e84f59b3193abc6f451a8cdf7d69f Author: Jai Luthra Date: Fri Dec 1 10:39:18 2023 +0530 arm64: dts: ti: k3-am62a-main: Enable CSI2-RX Add nodes for Cadence DPHY, CSI2RX and TI's pixel-grabbing wrapper. AM62A uses a dedicated BCDMA instance for CSI-RX traffic, so enable that as well. Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20231201-csi_dts-v3-3-9f06f31080fe@ti.com Signed-off-by: Nishanth Menon commit 2017f5a610a998cd414c7d9e8b19051014f3126b Author: Jai Luthra Date: Fri Dec 1 10:39:17 2023 +0530 arm64: dts: ti: k3-am62-main: Enable CSI2-RX The CSI2RX subsystem can be used to capture video frames from CSI-2 cameras. Add nodes for the CSI core, SHIM layer, and the DPHY. Tested-by: Martyn Welch Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20231201-csi_dts-v3-2-9f06f31080fe@ti.com Signed-off-by: Nishanth Menon commit bd62d91f42d015e173809214badaf750b75be2d1 Author: Jai Luthra Date: Fri Dec 1 10:39:16 2023 +0530 arm64: defconfig: Enable J721E CSI2RX AM62 and other K3 based SoCs use Cadence DPHY and CSI-RX bridge drivers, along with a DMA wrapper CSI IP for the camera pipeline. Enable the same to get camera functionality on AM62x-SK, BeaglePlay and AM62Ax SK among other platforms. Tested-by: Martyn Welch Signed-off-by: Jai Luthra Link: https://lore.kernel.org/r/20231201-csi_dts-v3-1-9f06f31080fe@ti.com Signed-off-by: Nishanth Menon commit fcb97d190c3ca411b37d8dd0b2650fa1378f08d4 Author: Andrew Davis Date: Tue Dec 5 10:23:58 2023 -0600 arm64: dts: ti: k3-am65: Add AM652 dtsi file The AM652 is basically a AM654 but with 2 cores instead of 4. Add a DTSI file for AM652 matching AM654 except this core difference. This removes the need to remove the extra cores from AM654 manually in DT files for boards that use the AM652 variant. Do that for the IOT2050 boards here. Signed-off-by: Andrew Davis Reviewed-by: Bryan Brattlof Link: https://lore.kernel.org/r/20231205162358.23904-1-afd@ti.com Signed-off-by: Nishanth Menon commit 1ccd91963bd48b8da4148c128a946c2312407243 Author: Jaegeuk Kim Date: Sat Dec 2 10:16:24 2023 -0800 f2fs: let's finish or reset zones all the time In order to limit # of open zones, let's finish or reset zones given # of valid blocks per section and its zone condition. Reviewed-by: Daeho Jeong Signed-off-by: Jaegeuk Kim commit cd42c56d9c0bb6007939408b4fbc62bbeccc9037 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:45 2023 +0300 drm/msm/dpu: use drmm-managed allocation for dpu_encoder_virt It is incorrect to use devm-managed memory allocations for DRM data structures exposed to userspace. They should use drmm_ allocations. Change struct dpu_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on encoder destruction. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570053/ Link: https://lore.kernel.org/r/20231201211845.1026967-14-dmitry.baryshkov@linaro.org commit 3285f4acb23c6ea611583fe32c4ad231daf15a08 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:44 2023 +0300 drm/msm/dpu: drop dpu_encoder_phys_ops::destroy Drop the dpu_encoder_phys_ops' destroy() callback. No phys backend implements it anymore, so it is useless. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570058/ Link: https://lore.kernel.org/r/20231201211845.1026967-13-dmitry.baryshkov@linaro.org commit 73169b45e1ed296b4357a694f5fa586ac0643ac1 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:43 2023 +0300 drm/msm/dpu: use drmm-managed allocation for dpu_encoder_phys Change struct allocation of encoder's phys backend data to use drmm_kzalloc(). This removes the need to perform any actions on encoder destruction. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570051/ Link: https://lore.kernel.org/r/20231201211845.1026967-12-dmitry.baryshkov@linaro.org commit 3637af92de2b1f51a4ecd5e21ada2d62d3a5a6b5 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:42 2023 +0300 drm/msm/dpu: use drmm-managed allocation for dpu_crtc Change struct dpu_crtc allocation to use drmm_crtc_alloc_with_planes(). This removes the need to perform any actions on CRTC destruction. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570054/ Link: https://lore.kernel.org/r/20231201211845.1026967-11-dmitry.baryshkov@linaro.org commit 0e00f9af95bbce1f1d2f193d08e80b446329dd57 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:41 2023 +0300 drm/msm/dpu: use drmm-managed allocation for dpu_plane Change struct dpu_plane allocation to use drmm_universal_plane_alloc(). This removes the need to perform any actions on plane destruction. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570042/ Link: https://lore.kernel.org/r/20231201211845.1026967-10-dmitry.baryshkov@linaro.org commit bcc54a4c063a823cb75b71116762673b380a1ef6 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:40 2023 +0300 drm/msm/dpu: remove QoS teardown on plane destruction There is little point in disabling QoS on plane destruction: it happens during DPU device destruction process, after which there will be no running planes. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570049/ Link: https://lore.kernel.org/r/20231201211845.1026967-9-dmitry.baryshkov@linaro.org commit b0311c1c4e069e2e15f2e2a32bccbcf628be42ec Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:39 2023 +0300 drm/msm/dpu: drop unused dpu_plane::lock The field dpu_plane::lock was never used for protecting any kind of data. Drop it now. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570043/ Link: https://lore.kernel.org/r/20231201211845.1026967-8-dmitry.baryshkov@linaro.org commit a106ed98af6848ef5810b12f5c9e2e0566f1d9c4 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:38 2023 +0300 drm/msm/dpu: use devres-managed allocation for HW blocks Use devm_kzalloc to create HW block structure. This allows us to remove corresponding kfree and drop all dpu_hw_*_destroy() functions as well as dpu_rm_destroy(), which becomes empty afterwards. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570041/ Link: https://lore.kernel.org/r/20231201211845.1026967-7-dmitry.baryshkov@linaro.org commit 1e897dcc4c673b9d585c09ddcdbe7fab0934e64f Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:37 2023 +0300 drm/msm/dpu: use devres-managed allocation for MDP TOP Use devm_kzalloc to create MDP TOP structure. This allows us to remove corresponding kfree and drop dpu_hw_mdp_destroy() function. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570047/ Link: https://lore.kernel.org/r/20231201211845.1026967-6-dmitry.baryshkov@linaro.org commit bdfa47d9b17a2335666a741a98857f9e5e482dc8 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:36 2023 +0300 drm/msm/dpu: use devres-managed allocation for VBIF data Use devm_kzalloc to create VBIF data structure. This allows us to remove corresponding kfree and drop dpu_hw_vbif_destroy() function. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570040/ Link: https://lore.kernel.org/r/20231201211845.1026967-5-dmitry.baryshkov@linaro.org commit b19e6f7dd2e7cc47bed565064fd7ff52f9424e52 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:35 2023 +0300 drm/msm/dpu: use devres-managed allocation for interrupts data Use devm_kzalloc to create interrupts data structure. This allows us to remove corresponding kfree and drop dpu_hw_intr_destroy() function. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570038/ Link: https://lore.kernel.org/r/20231201211845.1026967-4-dmitry.baryshkov@linaro.org commit b830b06f008755526646bb1d12500c8ccd8be335 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:34 2023 +0300 drm/msm/dpu: remove IS_ERR_OR_NULL for dpu_hw_intr_init() error handling Using IS_ERR_OR_NULL() together with PTR_ERR() is a typical mistake. If the value is NULL, then the function will return 0 instead of a proper return code. Replace IS_ERR_OR_NULL() with IS_ERR() in the dpu_hw_intr_init() error check. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570036/ Link: https://lore.kernel.org/r/20231201211845.1026967-3-dmitry.baryshkov@linaro.org commit 134c78c962279e423f5d699e3d3b379cbf4885c8 Author: Dmitry Baryshkov Date: Sat Dec 2 00:18:33 2023 +0300 drm/msm/dpu: cleanup dpu_kms_hw_init error path It was noticed that dpu_kms_hw_init()'s error path contains several labels which point to the same code path. Replace all of them with a single label. Suggested-by: Konrad Dybcio Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570035/ Link: https://lore.kernel.org/r/20231201211845.1026967-2-dmitry.baryshkov@linaro.org commit 6807434ff0449ff9b3fc18fb40d1ab1c5ff3b708 Author: Qiuxu Zhuo Date: Mon Nov 13 16:53:18 2023 +0800 EDAC/igen6: Add Intel Meteor Lake-P SoCs support Add Intel Meteor Lake-P SoC compute die IDs for EDAC support. These Meteor Lake-P SoCs share similar IBECC registers with Alder Lake-P SoCs. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit 3c77090c1247d963f2559e77810a5d48efeeb7d6 Author: Qiuxu Zhuo Date: Mon Nov 13 16:53:17 2023 +0800 EDAC/igen6: Add Intel Meteor Lake-PS SoCs support Add Intel Meteor Lake-PS SoC compute die IDs for EDAC support. These SoCs share similar IBECC registers with Alder Lake-P SoCs. The only difference is that IBECC presence is detected through an MMIO-mapped register instead of the capability register in the PCI configuration space. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit d23627a7688fabff0096a7beaff1a93de76afaad Author: Qiuxu Zhuo Date: Mon Nov 13 16:53:16 2023 +0800 EDAC/igen6: Add Intel Raptor Lake-P SoCs support Add Intel Raptor Lake-P SoC compute die IDs for EDAC support. These Raptor Lake-P SoCs share similar IBECC registers with Alder Lake-P SoCs but extend the most significant bit of the error address logged in IBECC from bit 38 to bit 45. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit c4a5398991fd2ad3011c486571300574495bc834 Author: Qiuxu Zhuo Date: Mon Nov 13 16:53:15 2023 +0800 EDAC/igen6: Add Intel Alder Lake-N SoCs support Add Intel Alder Lake-N SoC compute die IDs for EDAC support. Alder Lake-N, with one memory controller, is a reduced version of Alder Lake-P, which has two memory controllers. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit a264f715ecb3e6dac7c4d7135db74eb2379cb086 Author: Qiuxu Zhuo Date: Mon Nov 13 16:53:14 2023 +0800 EDAC/igen6: Make get_mchbar() helper function Make get_mchbar() helper function to retrieve the BAR address of the memory controller. No function changes. Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck commit 018b04248543f49d677011d4615f243a39a155a8 Author: Colin Ian King Date: Fri Jun 30 09:00:29 2023 +0100 perf bench sched-seccomp-notify: Fix spelling mistake "synchronious" -> "synchronous" There is a spelling mistake in an option description. Fix it. Signed-off-by: Colin Ian King Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: https://lore.kernel.org/r/20230630080029.15614-1-colin.i.king@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 144081ef78c36e255c08b74da86ef68e6cf0a221 Author: Ian Rogers Date: Mon Nov 20 11:04:08 2023 -0800 perf test: Add basic 'perf diff' test There are some old bug reports on perf diff crashing: https://rhaas.blogspot.com/2012/06/perf-good-bad-ugly.html Happening across them I was prompted to add two very basic tests that will give some 'perf diff' coverage. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Jajeev Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231120190408.281826-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a4320085a6c694326dd8db46f563d52d1a826f07 Author: Kan Liang Date: Tue Nov 28 12:39:40 2023 -0800 perf mem: Fix error on hybrid related to availability of mem event in a PMU The below error can be triggered on a hybrid machine. $ perf mem record -t load sleep 1 event syntax error: 'breakpoint/mem-loads,ldlat=30/P' \___ Bad event or PMU Unable to find PMU or event on a PMU of 'breakpoint' In the perf_mem_events__record_args(), the current perf never checks the availability of a mem event on a given PMU. All the PMUs will be added to the perf mem event list. Perf errors out for the unsupported PMU. Extend perf_mem_event__supported() and take a PMU into account. Check the mem event for each PMU before adding it to the perf mem event list. Optimize the perf_mem_events__init() a little bit. The function is to check whether the mem events are supported in the system. It doesn't need to scan all PMUs. Just return with the first supported PMU is good enough. Fixes: 5752c20f3787c9bc ("perf mem: Scan all PMUs instead of just core ones") Reported-by: Ammy Yi Signed-off-by: Kan Liang Tested-by: Ammy Yi Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/20231128203940.3964287-1-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9eef41014fe01287dae79fe208b9b433b13040bb Author: Athira Rajeev Date: Thu Nov 23 21:31:10 2023 +0530 perf vendor events powerpc: Update datasource event name to fix duplicate events Running "perf list" on powerpc fails with segfault as below: $ ./perf list Segmentation fault (core dumped) $ This happens because of duplicate events in the JSON list. The powerpc JSON event list contains some event with same event name, but different event code. They are: - PM_INST_FROM_L3MISS (Present in datasource and frontend) - PM_MRK_DATA_FROM_L2MISS (Present in datasource and marked) - PM_MRK_INST_FROM_L3MISS (Present in datasource and marked) - PM_MRK_DATA_FROM_L3MISS (Present in datasource and marked) pmu_events_table__num_events() uses the value from table_pmu->num_entries which includes duplicate events as well. This causes issue during "perf list" and results in a segmentation fault. Since both event codes are valid, append _DSRC to the Data Source events (datasource.json), so that they would have a unique name. Also add PM_DATA_FROM_L2MISS_DSRC and PM_DATA_FROM_L3MISS_DSRC events. With the fix, 'perf list' works as expected. Fixes: fc143580753348c6 ("perf vendor events power10: Update JSON/events") Signed-off-by: Athira Jajeev Tested-by: Disha Goel Cc: Adrian Hunter Cc: Disha Goel Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: linuxppc-dev@lists.ozlabs.org Cc: Madhavan Srinivasan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231123160110.94090-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 7d723ef83b8070ab2304df22ed952dc627385406 Author: Ian Rogers Date: Wed Nov 29 13:34:28 2023 -0800 perf test: Add basic 'perf list --json" test Test that JSON output produces valid JSON. Reviewed-by: Athira Jajeev Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Jajeev Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231129213428.2227448-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8226e4a3b35f525d11934484ee5979399ff8b7dc Author: Ian Rogers Date: Wed Nov 29 13:34:27 2023 -0800 perf test: Use common python setup library Avoid replicated logic by having a common library to set the PYTHON environment variable. Reviewed-by: Athira Jajeev Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231129213428.2227448-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b809fc656e763296f227b9b31e8f225e5977a8af Author: Ian Rogers Date: Wed Nov 29 13:34:25 2023 -0800 perf build: Shellcheck support for OUTPUT directory Migrate Makefile.tests to Build so that variables like rule_mkdir are defined via Makefile.build (needed so the output directory can be created). This requires SHELLCHECK being exported and the clean rule tweaking to remove the files in find. Change find "-perm -o=x" as it was failing on my Debian based Linux kernel tree, switch to using "-executable". Adding a filename prefix of "." to the shellcheck log files is a pain and error prone in make, remove this prefix and just add the shellcheck log files to .gitignore. Fix the command echo so that running the test is displayed. Fixes: 1638b11ef8156c85 ("perf tools: Add perf binary dependent rule for shellcheck log in Makefile.perf") Reviewed-by: Athira Jajeev Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231129213428.2227448-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 16438b652b464ef7d0a877d31e93ab54338f6b0a Author: Ilkka Koskinen Date: Thu Nov 30 18:15:50 2023 -0800 perf vendor events arm64 AmpereOneX: Add core PMU events and metrics Add JSON files for AmpereOneX core PMU events and metrics. Reviewed-by: Ian Rogers Signed-off-by: Ilkka Koskinen Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20231201021550.1109196-4-ilkka@os.amperecomputing.com Signed-off-by: Arnaldo Carvalho de Melo commit 10a149e4b4a9187940adbfff0f216ccb5a15aa41 Author: Ilkka Koskinen Date: Thu Nov 30 18:15:49 2023 -0800 perf vendor events arm64 AmpereOne: Rename BPU_FLUSH_MEM_FAULT to GPC_FLUSH_MEM_FAULT The documentation wrongly called the event as BPU_FLUSH_MEM_FAULT and now has been fixed. Correct the name in the perf tool as well. Fixes: a9650b7f6fc09d16 ("perf vendor events arm64: Add AmpereOne core PMU events") Reviewed-by: Ian Rogers Signed-off-by: Ilkka Koskinen Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ilkka Koskinen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20231201021550.1109196-3-ilkka@os.amperecomputing.com Signed-off-by: Arnaldo Carvalho de Melo commit f7c0e362a25f99fafa73d62a2e8c3da00cf1fc0e Author: Jakub Kicinski Date: Sat Dec 2 13:17:59 2023 -0800 tools: ynl: remove generated user space code from git The ynl-generated user space C code is already above 25kLoC and is growing. The initial reason to commit these files was to make reviewing changes to the generator easier. Unfortunately, it has the opposite effect on reviewing changes to specs, and we get far more changes to specs than to the generator. Uncommit those fails, as they are generated on the fly as needed. netdev patchwork now runs a script on each series to create a diff of generated code on the fly, for the rare cases when looking at it is helpful: https://github.com/kuba-moo/nipa/blob/master/tests/series/ynl/ynl.sh Suggested-by: Paolo Abeni Acked-by: Chuck Lever Signed-off-by: Jakub Kicinski commit 4900e0396e59be233cfa636369d4eec6b40dbeca Author: Pin-yen Lin Date: Tue Dec 5 20:35:35 2023 +0800 drm/edp-panel: Sort the panel entries Move the order of CMN 0x14e5 to make the list sorted. Signed-off-by: Pin-yen Lin Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231205123630.988663-3-treapking@chromium.org commit 8ebb1fc2e69ab8b89a425e402c7bd85e053b7b01 Author: Abel Vesa Date: Mon Dec 4 10:54:25 2023 +0200 drm/panel-edp: Add SDC ATNA45AF01 Add support for the SDC ATNA45AF01 panel. Signed-off-by: Abel Vesa Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231201-x1e80100-drm-panel-edp-v2-1-b0173484631a@linaro.org commit 01a39f1c4f1220a4e6a25729fae87ff5794cbc52 Author: Ville Syrjälä Date: Mon Dec 4 22:24:43 2023 +0200 drm/i915: Fix ADL+ tiled plane stride when the POT stride is smaller than the original plane_view_scanout_stride() currently assumes that we had to pad the mapping stride with dummy pages in order to align it. But that is not the case if the original fb stride exceeds the aligned stride used to populate the remapped view, which is calculated from the user specified framebuffer width rather than the user specified framebuffer stride. Ignore the original fb stride in this case and just stick to the POT aligned stride. Getting this wrong will cause the plane to fetch the wrong data, and can lead to fault errors if the page tables at the bogus location aren't even populated. TODO: figure out if this is OK for CCS, or if we should instead increase the width of the view to cover the entire user specified fb stride instead... Cc: Imre Deak Cc: Juha-Pekka Heikkila Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231204202443.31247-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak Reviewed-by: Juha-Pekka Heikkila commit 1dfc86af06131d65be5b6ffb749c5dbceafb6d00 Author: Bjorn Helgaas Date: Tue Nov 21 12:36:43 2023 -0600 x86/pci: Reorder pci_mmcfg_arch_map() definition before calls The typical style is to define functions before calling them. Move pci_mmcfg_arch_map() and pci_mmcfg_arch_unmap() earlier so they're defined before they're called. No functional change intended. Link: https://lore.kernel.org/r/20231121183643.249006-10-helgaas@kernel.org Tested-by: Tomasz Pala Signed-off-by: Bjorn Helgaas commit f12659832612dac746bd57e20956aabb373a00e7 Author: Bjorn Helgaas Date: Tue Nov 21 12:36:42 2023 -0600 x86/pci: Return pci_mmconfig_add() failure early If pci_mmconfig_alloc() fails, return the failure early so it's obvious that the failure is the exception, and the success is the normal case. No functional change intended. Link: https://lore.kernel.org/r/20231121183643.249006-9-helgaas@kernel.org Tested-by: Tomasz Pala Signed-off-by: Bjorn Helgaas commit f284dff47b6d00efe1f774d25e9d74874e78c600 Author: Bjorn Helgaas Date: Tue Nov 21 12:36:41 2023 -0600 x86/pci: Comment pci_mmconfig_insert() obscure MCFG dependency In pci_mmconfig_insert(), there's no reference to "addr" between locking pci_mmcfg_lock and testing "addr", so it *looks* like we should move the test before the lock. But 07f9b61c3915 ("x86/PCI: MMCONFIG: Check earlier for MMCONFIG region at address zero") did that, which broke things by returning -EINVAL when "addr" is zero instead of -EEXIST. So 07f9b61c3915 was reverted by 67d470e0e171 ("Revert "x86/PCI: MMCONFIG: Check earlier for MMCONFIG region at address zero""). Add a comment about this issue to prevent it from happening again. Link: https://lore.kernel.org/r/20231121183643.249006-8-helgaas@kernel.org Tested-by: Tomasz Pala Signed-off-by: Bjorn Helgaas commit d26e7fc3d907db19f7e25126476cb416f0527592 Author: Bjorn Helgaas Date: Tue Nov 21 12:36:40 2023 -0600 x86/pci: Rename pci_mmcfg_check_reserved() to pci_mmcfg_reserved() "pci_mmcfg_check_reserved()" doesn't give a hint about what the boolean return value means. Rename it to pci_mmcfg_reserved() so testing "if (pci_mmcfg_reserved())" makes sense. Update callers to treat the return value as boolean instead of comparing with 0. Link: https://lore.kernel.org/r/20231121183643.249006-7-helgaas@kernel.org Tested-by: Tomasz Pala Signed-off-by: Bjorn Helgaas commit 9ad67912d0d019791f0ed6bbf46374fce8a3656e Author: Bjorn Helgaas Date: Tue Nov 21 12:36:39 2023 -0600 x86/pci: Rename acpi_mcfg_check_entry() to acpi_mcfg_valid_entry() "acpi_mcfg_check_entry()" doesn't give a hint about what the return value means. Rename it to "acpi_mcfg_valid_entry()", convert the return value to bool, and update the return values and callers to match so testing "if (acpi_mcfg_valid_entry())" makes sense. Link: https://lore.kernel.org/r/20231121183643.249006-6-helgaas@kernel.org Tested-by: Tomasz Pala Signed-off-by: Bjorn Helgaas commit 704891033b9714f4c9813bf9ffd888fc69ae3948 Author: Bjorn Helgaas Date: Tue Nov 21 12:36:38 2023 -0600 x86/pci: Rename 'MMCONFIG' to 'ECAM', use pr_fmt The "MMCONFIG" term is not used in PCI/PCIe specs. Replace it with "ECAM", the term used in PCIe r6.0, sec 7.2.2. Define pr_fmt() instead of repeating PREFIX in every log message. Link: https://lore.kernel.org/r/20231121183643.249006-5-helgaas@kernel.org Tested-by: Tomasz Pala Signed-off-by: Bjorn Helgaas commit 286ae88c9e40b261d7860b367c36346434ffeaa3 Author: Bjorn Helgaas Date: Tue Nov 21 12:36:37 2023 -0600 x86/pci: Add MCFG debug logging MCFG handling is a frequent source of problems. Add more logging to aid in debugging. Enable the logging with CONFIG_DYNAMIC_DEBUG=y and the kernel boot parameter 'dyndbg="file arch/x86/pci +p"'. Link: https://lore.kernel.org/r/20231121183643.249006-4-helgaas@kernel.org Tested-by: Tomasz Pala Signed-off-by: Bjorn Helgaas commit e1fad9dd25ea36ae3655c5f4d505d57ab6d4bcc3 Author: Bjorn Helgaas Date: Tue Nov 21 12:36:36 2023 -0600 x86/pci: Reword ECAM EfiMemoryMappedIO logging to avoid 'reserved' fd3a8cff4d4a ("x86/pci: Treat EfiMemoryMappedIO as reservation of ECAM space") added the concept of using the EFI memory map to help decide whether ECAM space mentioned in the MCFG table is valid. Unfortunately it described that EfiMemoryMappedIO space as "reserved", but it is actually not *reserved* by the EFI memory map. EfiMemoryMappedIO only means the firmware requested that the OS map this space for use by firmware runtime services. Change the dmesg logging to describe it as simply "EfiMemoryMappedIO", not as "reserved as EfiMemoryMappedIO". A previous commit actually *does* reserve the space if ACPI PNP0C01/02 devices haven't done so: - PCI: ECAM at [mem 0xe0000000-0xefffffff] reserved as EfiMemoryMappedIO + PCI: ECAM at [mem 0xe0000000-0xefffffff] is EfiMemoryMappedIO; assuming valid PCI: ECAM [mem 0xe0000000-0xefffffff] reserved to work around lack of ACPI motherboard _CRS Link: https://lore.kernel.org/r/20231121183643.249006-3-helgaas@kernel.org Tested-by: Tomasz Pala Signed-off-by: Bjorn Helgaas commit 070909e56a7d65fd0b4aad6e808966b7c634befe Author: Bjorn Helgaas Date: Tue Nov 21 12:36:35 2023 -0600 x86/pci: Reserve ECAM if BIOS didn't include it in PNP0C02 _CRS Tomasz, Sebastian, and some Proxmox users reported problems initializing ixgbe NICs. I think the problem is that ECAM space described in the ACPI MCFG table is not reserved via a PNP0C02 _CRS method as required by the PCI Firmware spec (r3.3, sec 4.1.2), but it *is* included in the PNP0A03 host bridge _CRS as part of the MMIO aperture. If we allocate space for a PCI BAR, we're likely to allocate it from that ECAM space, which obviously cannot work. This could happen for any device, but in the ixgbe case it happens because it's an SR-IOV device and the BIOS didn't allocate space for the VF BARs, so Linux reallocated the bridge window leading to ixgbe and put it on top of the ECAM space. From Tomasz' system: PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem 0x80000000-0x8fffffff] (base 0x80000000) PCI: MMCONFIG at [mem 0x80000000-0x8fffffff] not reserved in ACPI motherboard resources pci_bus 0000:00: root bus resource [mem 0x80000000-0xfbffffff window] pci 0000:00:01.1: PCI bridge to [bus 02-03] pci 0000:00:01.1: bridge window [mem 0xfb900000-0xfbbfffff] pci 0000:02:00.0: [8086:10fb] type 00 class 0x020000 # ixgbe pci 0000:02:00.0: reg 0x10: [mem 0xfba80000-0xfbafffff 64bit] pci 0000:02:00.0: VF(n) BAR0 space: [mem 0x00000000-0x000fffff 64bit] (contains BAR0 for 64 VFs) pci 0000:02:00.0: BAR 7: no space for [mem size 0x00100000 64bit] # VF BAR 0 pci_bus 0000:00: No. 2 try to assign unassigned res pci 0000:00:01.1: resource 14 [mem 0xfb900000-0xfbbfffff] released pci 0000:00:01.1: BAR 14: assigned [mem 0x80000000-0x806fffff] pci 0000:02:00.0: BAR 0: assigned [mem 0x80000000-0x8007ffff 64bit] pci 0000:02:00.0: BAR 7: assigned [mem 0x80204000-0x80303fff 64bit] # VF BAR 0 Fixes: 07eab0901ede ("efi/x86: Remove EfiMemoryMappedIO from E820 map") Fixes: fd3a8cff4d4a ("x86/pci: Treat EfiMemoryMappedIO as reservation of ECAM space") Reported-by: Tomasz Pala Link: https://bugzilla.kernel.org/show_bug.cgi?id=218050 Reported-by: Sebastian Manciulea Link: https://bugzilla.kernel.org/show_bug.cgi?id=218107 Link: https://forum.proxmox.com/threads/proxmox-8-kernel-6-2-16-4-pve-ixgbe-driver-fails-to-load-due-to-pci-device-probing-failure.131203/ Link: https://lore.kernel.org/r/20231121183643.249006-2-helgaas@kernel.org Tested-by: Tomasz Pala Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v6.2+ commit 5ab500d6f9f50d8246865a2ead85d0e88ea30004 Merge: fb70136ded2e1 d82afc800c1e3 Author: Jakub Kicinski Date: Tue Dec 5 07:45:45 2023 -0800 Merge branch 'sfc-implement-ndo_hwtstamp_-get-set' Alex Austin says: ==================== sfc: Implement ndo_hwtstamp_(get|set) Implement ndo_hwtstamp_get and ndo_hwtstamp_set for sfc and sfc-siena. ==================== Link: https://lore.kernel.org/r/20231130135826.19018-1-alex.austin@amd.com Signed-off-by: Jakub Kicinski commit d82afc800c1e385205da9618f75369843e856e7a Author: Alex Austin Date: Thu Nov 30 13:58:26 2023 +0000 sfc-siena: Implement ndo_hwtstamp_(get|set) Update efx->ptp_data to use kernel_hwtstamp_config and implement ndo_hwtstamp_(get|set). Remove SIOCGHWTSTAMP and SIOCSHWTSTAMP from efx_ioctl. Signed-off-by: Alex Austin Acked-by: Martin Habets Reviewed-by: Edward Cree Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20231130135826.19018-3-alex.austin@amd.com Signed-off-by: Jakub Kicinski commit 1ac23674a971d8596648695f72168815c3f52e11 Author: Alex Austin Date: Thu Nov 30 13:58:25 2023 +0000 sfc: Implement ndo_hwtstamp_(get|set) Update efx->ptp_data to use kernel_hwtstamp_config and implement ndo_hwtstamp_(get|set). Remove SIOCGHWTSTAMP and SIOCSHWTSTAMP from efx_ioctl. Signed-off-by: Alex Austin Acked-by: Martin Habets Reviewed-by: Edward Cree Link: https://lore.kernel.org/r/20231130135826.19018-2-alex.austin@amd.com Signed-off-by: Jakub Kicinski commit 138a4e2a26ec73197e22fe64ee3957b1594eabb3 Author: Richard Fitzgerald Date: Tue Dec 5 13:50:01 2023 +0000 ASoC: Intel: sof_sdw_cs_amp: Connect outputs to a speaker widget Hookup the CS35L56 DAPM_OUTPUT widgets to a DAPM_SPK widget so that there is a complete logical path to a speaker. There is no particular reason to use multiple speaker widgets. The CS35L56 are designed to work together as a set so they have all been connected to a single speaker widget. Instead of a hardcoded list of codec widget names, the code walks through all the codecs on the dailink and for every cs35l56 it uses its name prefix to construct the source end of the route. This adds a small amount of overhead during probe but has the benefit that it isn't dependent on every system using the same prefixes. Signed-off-by: Richard Fitzgerald Acked-by: Pierre-Louis Bossart Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20231205135001.2506070-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit c8a5f34ad811743d1b3aeb5c54198eebd413bc6d Author: Karthikeyan Periyasamy Date: Fri Dec 1 07:07:35 2023 +0530 wifi: ath12k: avoid repeated wiphy access from hw Currently repeated access of wiphy data from mac80211 hw structure is happen inside the mac80211 registration helper functions. So optimize these helper functions by storing wiphy data locally and accessing it directly. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231201013735.2292313-1-quic_periyasa@quicinc.com commit ed7e818a7b501012038d6bc6fedadaf7375a380a Author: Kang Yang Date: Fri Dec 1 18:09:48 2023 +0200 wifi: ath12k: fix and enable AP mode for WCN7850 For AP mode, the peer is created earlier in ath12k_mac_op_add_interface() but ath12k_mac_op_assign_vif_chanctx() will try to create peer again. Then an error will return which makes AP mode startup fail. Kernel log: [ 5017.665006] ath12k_pci 0000:04:00.0: failed to create peer after vdev start delay: -22 wpa_supplicant log: Failed to set beacon parameters Interface initialization failed wls1: interface state UNINITIALIZED->DISABLED wls1: AP-DISABLED wls1: Unable to setup interface. Failed to initialize AP interface wls1: interface state DISABLED->DISABLED wls1: AP-DISABLED So fix this check and enable AP mode for WCN7850, as now AP mode works normally. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231121022459.17209-1-quic_kangyang@quicinc.com commit a3012f206d07fa62b5c2e384cbc3a81a4dbba3c9 Author: Kang Yang Date: Fri Dec 1 18:09:48 2023 +0200 wifi: ath12k: set IRQ affinity to CPU0 in case of one MSI vector With VT-d disabled on Intel platform, ath12k gets only one MSI vector. In that case, ath12k does not free IRQ when doing suspend, hence the kernel has to migrate it to CPU0 (if it was affine to other CPUs) and allocates a new MSI vector. However, ath12k has no chance to reconfig it to HW srngs during this phase, thus ath12k fails to resume. This issue can be fixed by setting IRQ affinity to CPU0 before request_irq is called. With such affinity, migration will not happen and thus the vector keeps unchanged during suspend/resume. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231121021304.12966-8-quic_kangyang@quicinc.com commit 08d52ba2967898723bf6fc57a9fb5dc0018cc5bc Author: Kang Yang Date: Fri Dec 1 18:09:47 2023 +0200 wifi: ath12k: do not restore ASPM in case of single MSI vector Current code enables ASPM by default, it allows MHI to enter M2 state. In case of one MSI vector, system hang is observed if ath12k does MHI register reading in this state. The workaround here is to prevent MHI from entering M2 state, this can be done by disabling ASPM if only one MSI vector is used. When using 32 vectors ASPM is enabled as before. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231121021304.12966-7-quic_kangyang@quicinc.com commit 8398654398c2a97d28a3f0cc97e9a1f2e99113b9 Author: Kang Yang Date: Fri Dec 1 18:09:47 2023 +0200 wifi: ath12k: add support one MSI vector On some platforms it's not possible to allocate 32 MSI vectors for various reasons, maybe kernel configuration, VT-d disabled, buggy BIOS etc. So ath12k was not able to use WCN7850 PCI devices on those platforms. Add support for one MSI vector to solve that. In case of one MSI vector, interrupt migration needs to be disabled. This is because when interrupt migration happens, the msi_data may change. However, msi_data is already programmed to rings during initial phase and ath12k has no way to know that msi_data is changed during run time and reprogram again. In case of one MSI vector, MHI subsystem should not use IRQF_NO_SUSPEND as WCN7850 doesn't set this flag too. Ath12k doesn't need to leave IRQ enabled in suspend state. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231121021304.12966-6-quic_kangyang@quicinc.com commit 6711b2a80b9a9bf7d10042a526b1f92a5ba69362 Author: Kang Yang Date: Fri Dec 1 18:09:47 2023 +0200 wifi: ath12k: refactor multiple MSI vector implementation This is to prepare for one MSI vector support. IRQ enable and disable of CE and DP are done only in case of multiple MSI vectors. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231121021304.12966-5-quic_kangyang@quicinc.com commit 1f1f7d548a00ebe50808cb1f580df9693e194a7c Author: Kang Yang Date: Fri Dec 1 18:09:47 2023 +0200 wifi: ath12k: use ATH12K_PCI_IRQ_DP_OFFSET for DP IRQ Like ATH12K_PCI_IRQ_CE0_OFFSET, define ATH12K_PCI_IRQ_DP_OFFSET for DP to save the IRQ instead of base_vector from MSI config. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231121021304.12966-4-quic_kangyang@quicinc.com commit 604308a34487eaa382c50fcdb4396c435030b4fa Author: Kang Yang Date: Fri Dec 1 18:09:47 2023 +0200 wifi: ath12k: add CE and ext IRQ flag to indicate irq_handler Add two flags to indicate whether IRQ handler for CE and DP can be called. This is because in one MSI vector case, interrupt is not disabled in hif_stop and hif_irq_disable. So if interrupt is disabled, MHI interrupt is disabled too. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231121021304.12966-3-quic_kangyang@quicinc.com commit 1b66601d14161f8128760742236eb26324f04fb9 Author: Kang Yang Date: Fri Dec 1 18:09:47 2023 +0200 wifi: ath12k: get msi_data again after request_irq is called The reservation mode of interrupts in kernel assigns a dummy vector when the interrupt is allocated and assigns a real vector when the request_irq is called. The reservation mode helps to ease vector pressure when devices with a large amount of queues/interrupts are initialized, but only a minimal subset of those queues/interrupts is actually used. So on reservation mode, the msi_data may change after request_irq is called, then it will lead to spurious interrupt. But when VT-d in BIOS is enabled and ath12k can get 32 MSI vectors, ath12k always get the same msi_data before and after request_irq. So in case of one MSI vector, ath12k need read msi_data again after request_irq is called, and then the correct msi_data is programmed into WCN7850 hardware components. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 Signed-off-by: Kang Yang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231121021304.12966-2-quic_kangyang@quicinc.com commit 365b1900c93a6a4860fce8c429e2d8b6e154a107 Author: Tsung-Han Lin Date: Sun Dec 3 09:18:04 2023 +0800 Documentation/arch/arm64: Fix typo Should be 'if' here. Signed-off-by: Tsung-Han Lin Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20231203011804.27694-1-tsunghan.tw@gmail.com Signed-off-by: Will Deacon commit 75b5e0bf90bffaca4b1f19114065dc59f5cc161f Author: Huang Shijie Date: Fri Nov 24 11:15:13 2023 +0800 arm64: irq: set the correct node for VMAP stack In current code, init_irq_stacks() will call cpu_to_node(). The cpu_to_node() depends on percpu "numa_node" which is initialized in: arch_call_rest_init() --> rest_init() -- kernel_init() --> kernel_init_freeable() --> smp_prepare_cpus() But init_irq_stacks() is called in init_IRQ() which is before arch_call_rest_init(). So in init_irq_stacks(), the cpu_to_node() does not work, it always return 0. In NUMA, it makes the node 1 cpu accesses the IRQ stack which is in the node 0. This patch fixes it by: 1.) export the early_cpu_to_node(), and use it in the init_irq_stacks(). 2.) change init_irq_stacks() to __init function. Reviewed-by: Catalin Marinas Signed-off-by: Huang Shijie Link: https://lore.kernel.org/r/20231124031513.81548-1-shijie@os.amperecomputing.com Signed-off-by: Will Deacon commit 8fd7588fd4eefe2e474b433f930eba99415ece9e Author: Masahiro Yamada Date: Mon Nov 27 00:10:45 2023 +0900 arm64: replace with Commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost") deprecated , which is now a wrapper of . Replace #include with #include . Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20231126151045.1556686-1-masahiroy@kernel.org Signed-off-by: Will Deacon commit 46fe448ec3b7a10253fcca7fe7e0d8f01a2b38e4 Author: Xu Yang Date: Mon Nov 20 17:33:16 2023 +0800 perf: fsl_imx8_ddr: Add driver support for i.MX8DXL DDR Perf Add driver support for i.MX8DXL DDR Perf, which supports AXI ID PORT CHANNEL filter. Signed-off-by: Xu Yang Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20231120093317.2652866-4-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit 2fe44e7dcb86601f0e12735621ed1113536eb392 Author: Xu Yang Date: Mon Nov 20 17:33:15 2023 +0800 dt-bindings: perf: fsl-imx-ddr: Add i.MX8DXL compatible Add a compatible for i.MX8DXL which is compatile with "fsl,imx8-ddr-pmu". Acked-by: Krzysztof Kozlowski Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20231120093317.2652866-3-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit 9745295358f44cc5da4145b2a5ca3e2921d70841 Author: Xu Yang Date: Mon Nov 20 17:33:14 2023 +0800 docs/perf: Add explanation for DDR_CAP_AXI_ID_PORT_CHANNEL_FILTER quirk Add explanation for DDR_CAP_AXI_ID_PORT_CHANNEL_FILTER quirk. Signed-off-by: Xu Yang Link: https://lore.kernel.org/r/20231120093317.2652866-2-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit afd83967e7bb9b41ee71153b868dcf94e43c2d7a Author: Xu Yang Date: Mon Nov 20 17:33:13 2023 +0800 perf: fsl_imx8_ddr: Add AXI ID PORT CHANNEL filter support This is the extension of AXI ID filter. Filter is defined with 2 configuration registers per counter 1-3 (counter 0 is not used for filtering and lacks these registers). * Counter N MASK COMP register - AXI_ID and AXI_MASKING. * Counter N MUX CNTL register - AXI CHANNEL and AXI PORT. -- 0: address channel -- 1: data channel This filter is exposed to userspace as an additional (channel, port) pair. The definition of axi_channel is inverted in userspace, and it will be reverted in driver automatically. AXI filter of Perf Monitor in DDR Subsystem, only a single port0 exist, so axi_port is reserved which should be 0. e.g. perf stat -a -e imx8_ddr0/axid-read,axi_mask=0xMMMM,axi_id=0xDDDD,axi_channel=0xH/ cmd perf stat -a -e imx8_ddr0/axid-write,axi_mask=0xMMMM,axi_id=0xDDDD,axi_channel=0xH/ cmd Signed-off-by: Xu Yang Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20231120093317.2652866-1-xu.yang_2@nxp.com Signed-off-by: Will Deacon commit 5ffb260f754bf838507fe0c23d05254b33e2bf3d Author: Stanislav Fomichev Date: Mon Dec 4 09:44:23 2023 -0800 selftests/bpf: Make sure we trigger metadata kfuncs for dst 8080 xdp_metadata test is flaky sometimes: verify_xsk_metadata:FAIL:rx_hash_type unexpected rx_hash_type: actual 8 != expected 0 Where 8 means XDP_RSS_TYPE_L4_ANY and is exported from veth driver only when 'skb->l4_hash' condition is met. This makes me think that the program is triggering again for some other packet. Let's have a filter, similar to xdp_hw_metadata, where we trigger XDP kfuncs only for UDP packets destined to port 8080. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231204174423.3460052-1-sdf@google.com commit 5c399ae080ae507954f6f2efefc7349f8ed0e051 Author: Stanislav Fomichev Date: Mon Dec 4 09:42:31 2023 -0800 xsk: Add missing SPDX to AF_XDP TX metadata documentation Not sure how I missed that. I even acknowledged it explicitly in the changelog [0]. Add the tag for real now. [0] https://lore.kernel.org/bpf/20231127190319.1190813-1-sdf@google.com/ Fixes: 11614723af26 ("xsk: Add option to calculate TX checksum in SW") Suggested-by: Simon Horman Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231204174231.3457705-1-sdf@google.com commit 1b4c7e20bfd6cfe0efbc51756d930a9406d41ea7 Author: Dave Marchevsky Date: Mon Dec 4 13:17:22 2023 -0800 selftests/bpf: Test bpf_kptr_xchg stashing of bpf_rb_root There was some confusion amongst Meta sched_ext folks regarding whether stashing bpf_rb_root - the tree itself, rather than a single node - was supported. This patch adds a small test which demonstrates this functionality: a local kptr with rb_root is created, a node is created and added to the tree, then the tree is kptr_xchg'd into a mapval. Signed-off-by: Dave Marchevsky Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20231204211722.571346-1-davemarchevsky@fb.com commit 144f1b70ea9ebebd21390bfcc78ba3192f12b0c1 Author: Peng Fan Date: Tue Nov 21 14:34:45 2023 +0800 dt-bindings: clock: support i.MX93 ANATOP clock module Support i.MX93 ANATOP module which contains PLL and OSC for Clock Controller Module Reviewed-by: Conor Dooley Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/20231121063446.155300-1-peng.fan@oss.nxp.com [abel.vesa@linaro.org: renamed to ANATOP instead of Analog] Signed-off-by: Abel Vesa commit f31c166a5027e927e5c032d40ef2e484d9ecd612 Author: Rander Wang Date: Mon Dec 4 15:44:07 2023 -0600 ASoC: SOF: Intel: lnl: add core get and set support for dsp core Driver uses get and set ops to change the power state of dsp core. Closes: https://github.com/thesofproject/sof/issues/8478 Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214407.208528-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0be9595d8a1170474867b8ee2caf14394db45d8b Author: Colin Ian King Date: Tue Dec 5 10:17:40 2023 +0000 ASoC: cs4271: Fix spelling mistake "retrieveing" -> "retrieving" There is a spelling mistake in a dev_err_probe error message. Fix it. Signed-off-by: Colin Ian King Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20231205101740.2820813-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit 6da9a662154c8d55fd39820ca882d0646d526e53 Author: Chao Song Date: Mon Dec 4 15:37:21 2023 -0600 ASoC: rt722-sdca: Set lane_control_support for multilane The RT722 SDCA codec supports 3 data lanes, lane_control_support property has to be set to use additional two lanes. Reviewed-by: Jack Yu Reviewed-by: Rander Wang Signed-off-by: Chao Song Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204213721.197785-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fb70136ded2e1ea3cde27d0393cfadab4240a141 Author: Zhengchao Shao Date: Sat Dec 2 21:04:38 2023 +0800 ipvlan: implement .parse_protocol hook function in ipvlan_header_ops The .parse_protocol hook function in the ipvlan_header_ops structure is not implemented. As a result, when the AF_PACKET family is used to send packets, skb->protocol will be set to 0. Ipvlan is a device of type ARPHRD_ETHER (ether_setup). Therefore, use eth_header_parse_protocol function to obtain the protocol. Signed-off-by: Zhengchao Shao Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20231202130438.2266343-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni commit cb297cc5e194a2ea3cb8aaf722005286ee42b011 Author: Zhengchao Shao Date: Sat Dec 2 21:06:58 2023 +0800 macvlan: implement .parse_protocol hook function in macvlan_hard_header_ops The .parse_protocol hook function in the macvlan_header_ops structure is not implemented. As a result, when the AF_PACKET family is used to send packets, skb->protocol will be set to 0. Macvlan is a device of type ARPHRD_ETHER (ether_setup). Therefore, use eth_header_parse_protocol function to obtain the protocol. Suggested-by: Eric Dumazet Signed-off-by: Zhengchao Shao Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20231202130658.2266526-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni commit 118eb89b1e7f6807776c012cffc5c9b07fd26164 Author: Anshuman Khandual Date: Wed Nov 15 14:58:05 2023 +0530 drivers: perf: arm_pmu: Drop 'pmu_lock' element from 'struct pmu_hw_events' As 'pmu_lock' element is not being used in any ARM PMU implementation, just drop this from 'struct pmu_hw_events'. 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 Link: https://lore.kernel.org/r/20231115092805.737822-3-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 5cd7da19cb9714adbf56054e0a0bd044f49e2a8e Author: Anshuman Khandual Date: Wed Nov 15 14:58:04 2023 +0530 arm: perf: Remove PMU locking Currently the 32-bit arm PMU drivers use the pmu_hw_events::lock spinlock in their arm_pmu::{start,stop,enable,disable}() callbacks to protect hardware state and event data. This locking is not necessary as the perf core code already provides mutual exclusion, disabling interrupts to serialize against the IRQ handler, and using perf_event_context::lock to protect against concurrent modifications of events cross-cpu. The locking was removed from the arm64 (now PMUv3) PMU driver in commit: 2a0e2a02e4b7 ("arm64: perf: Remove PMU locking") ... and the same reasoning applies to all the 32-bit PMU drivers. Remove the locking from the 32-bit PMU drivers. Cc: Mark Rutland Cc: Will Deacon Cc: Russell King Cc: linux-perf-users@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20231115092805.737822-2-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 38bbef7240b8c5f2dc4493eec356e2efbf2da5f4 Author: Junhao He Date: Mon Dec 4 19:04:25 2023 +0800 drivers/perf: hisi: Fix some event id for HiSilicon UC pmu Some event id of HiSilicon uncore UC PMU driver is incorrect, fix them. Fixes: 312eca95e28d ("drivers/perf: hisi: Add support for HiSilicon UC PMU driver") Signed-off-by: Junhao He Reviewed-by: Yicong Yang Link: https://lore.kernel.org/r/20231204110425.20354-1-hejunhao3@huawei.com Signed-off-by: Will Deacon commit ca6f537e459e2da4b331fe8928d1a0b0f9301f42 Author: Mark Rutland Date: Mon Dec 4 11:58:47 2023 +0000 drivers/perf: pmuv3: don't expose SW_INCR event in sysfs The SW_INCR event is somewhat unusual, and depends on the specific HW counter that it is programmed into. When programmed into PMEVCNTR, SW_INCR will count any writes to PMSWINC_EL0 with bit n set, ignoring writes to SW_INCR with bit n clear. Event rotation means that there's no fixed relationship between perf_events and HW counters, so this isn't all that useful. Further, we program PMUSERENR.{SW,EN}=={0,0}, which causes EL0 writes to PMSWINC_EL0 to be trapped and handled as UNDEFINED, resulting in a SIGILL to userspace. Given that, it's not a good idea to expose SW_INCR in sysfs. Hide it as we did for CHAIN back in commit: 4ba2578fa7b55701 ("arm64: perf: don't expose CHAIN event in sysfs") Signed-off-by: Mark Rutland Cc: Will Deacon Link: https://lore.kernel.org/r/20231204115847.2993026-1-mark.rutland@arm.com Signed-off-by: Will Deacon commit 877806b9b41ea371defaaf58d815320f1a76384f Author: Anshuman Khandual Date: Tue Nov 14 11:46:56 2023 +0530 drivers: perf: arm_pmuv3: Add new macro PMUV3_INIT_MAP_EVENT() This further compacts all remaining PMU init procedures requiring specific map_event functions via a new macro PMUV3_INIT_MAP_EVENT(). While here, it also changes generated init function names to match to those generated via the other macro PMUV3_INIT_SIMPLE(). This does not cause functional change. Cc: Will Deacon Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: James Clark Signed-off-by: Anshuman Khandual Link: https://lore.kernel.org/r/20231114061656.337231-1-anshuman.khandual@arm.com Signed-off-by: Will Deacon commit 590f23b092401f29e410fd4ca67128fcc45192fc Author: Robin Murphy Date: Thu Nov 23 11:58:13 2023 +0000 perf/arm-cmn: Fix HN-F class_occup_id events A subtle copy-paste error managed to slip through the reorganisation of these patches in development, and not only give some HN-F events the wrong type, but use that wrong type before the subsequent patch defined it. Too late to fix history, but we can at least fix the bug. Fixes: b1b7dc38e482 ("perf/arm-cmn: Refactor HN-F event selector macros") Reported-by: Jing Zhang Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/5a22439de84ff188ef76674798052448eb03a3e1.1700740693.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit c9d4affbe60a9597ca9df878b5c02bdb9a636e3c Author: João Rodrigues Date: Thu Nov 2 23:11:30 2023 +0100 ARM: dts: imx: tqma7: add lm75a sensor (rev. 01xxx) TQMa7x (revision 01xxx) uses a LM75A temperature sensor. The two sensors use different I2C addresses, so we can set both sensors simultaneously. Signed-off-by: João Rodrigues Reviewed-by: Bruno Thomsen Signed-off-by: Shawn Guo commit d6e81532b10d8deb2bc30f7b44f09534876893e3 Author: Linus Walleij Date: Wed Nov 15 14:28:15 2023 +0100 Hexagon: Make pfn accessors statics inlines Making virt_to_pfn() a static inline taking a strongly typed (const void *) makes the contract of a passing a pointer of that type to the function explicit and exposes any misuse of the macro virt_to_pfn() acting polymorphic and accepting many types such as (void *), (unitptr_t) or (unsigned long) as arguments without warnings. For symmetry do the same with pfn_to_virt(). For compiletime resolution of __pa() we need PAGE_OFFSET which was not available to __pa() and resolved by the preprocessor wherever __pa() was used. Fix this by explicitly including where required, following the pattern of the architectures page.h file. Acked-by: Brian Cain Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann commit da4382a7207e7d2243b860146442243a8daf33de Author: Linus Walleij Date: Wed Nov 15 14:28:14 2023 +0100 ARC: mm: Make virt_to_pfn() a static inline Making virt_to_pfn() a static inline taking a strongly typed (const void *) makes the contract of a passing a pointer of that type to the function explicit and exposes any misuse of the macro virt_to_pfn() acting polymorphic and accepting many types such as (void *), (unitptr_t) or (unsigned long) as arguments without warnings. In order to do this we move the virt_to_phys() and below the definition of the __pa() and __va() macros so it compiles. The macro version was also able to do recursive symbol resolution. Signed-off-by: Linus Walleij Signed-off-by: Arnd Bergmann commit 235a59c373b15e84df1a254c96066fc5fc47ae41 Author: Arnd Bergmann Date: Mon Dec 4 12:57:06 2023 +0100 mips: remove extraneous asm-generic/iomap.h include When this file is included before defining readq(), it misses the declarations for a couple of functions that now become unusable: lib/iomap.c:156:5: warning: no previous prototype for 'ioread64_lo_hi' [-Wmissing-prototypes] lib/iomap.c:163:5: warning: no previous prototype for 'ioread64_hi_lo' [-Wmissing-prototypes] lib/iomap.c:170:5: warning: no previous prototype for 'ioread64be_lo_hi' [-Wmissing-prototypes] lib/iomap.c:178:5: warning: no previous prototype for 'ioread64be_hi_lo' [-Wmissing-prototypes] lib/iomap.c:264:6: warning: no previous prototype for 'iowrite64_lo_hi' [-Wmissing-prototypes] lib/iomap.c:272:6: warning: no previous prototype for 'iowrite64_hi_lo' [-Wmissing-prototypes] lib/iomap.c:280:6: warning: no previous prototype for 'iowrite64be_lo_hi' [-Wmissing-prototypes] lib/iomap.c:288:6: warning: no previous prototype for 'iowrite64be_hi_lo' [-Wmissing-prototypes] The file is included again later from asm-generic/io.h, so dropping the initial include statement makes it do the right thing, both for avoiding the warning and for actually providing these functions. Link: https://lkml.kernel.org/r/20231204115710.2247097-17-arnd@kernel.org Signed-off-by: Arnd Bergmann Cc: Stephen Rothwell Cc: Thomas Bogendoerfer commit 103423ad7e56d6c756738823c332c414b07899e6 Author: Marc Zyngier Date: Wed Nov 22 13:37:54 2023 +0000 arm64: Get rid of ARM64_HAS_NO_HW_PREFETCH Back in 2016, it was argued that implementations lacking a HW prefetcher could be helped by sprinkling a number of PRFM instructions in strategic locations. In 2023, the one platform that presumably needed this hack is no longer in active use (let alone maintained), and an quick experiment shows dropping this hack only leads to a 0.4% drop on a full kernel compilation (tested on a MT30-GS0 48 CPU system). Given that this is pretty much in the noise department and that it may give odd ideas to other implementers, drop the hack for good. Suggested-by: Will Deacon Suggested-by: Mark Rutland Signed-off-by: Marc Zyngier Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20231122133754.1240687-1-maz@kernel.org Signed-off-by: Will Deacon commit 76ca21676533736323f08367660ef9f816d60a13 Merge: 333f339616045 0f4765d0b48d9 Author: Paolo Abeni Date: Tue Dec 5 13:00:58 2023 +0100 Merge branch 'conver-net-selftests-to-run-in-unique-namespace-part-1' Hangbin Liu says: ==================== Conver net selftests to run in unique namespace (Part 1) As Guillaume pointed, many selftests create namespaces with very common names (like "client" or "server") or even (partially) run directly in init_net. This makes these tests prone to failure if another namespace with the same name already exists. It also makes it impossible to run several instances of these tests in parallel. This patch set intend to conver all the net selftests to run in unique namespace, so we can update the selftest freamwork to run all tests in it's own namespace in parallel. After update, we only need to wait for the test which need longest time. As the total patch set is too large. I break it to severl parts. This is the first part. v2 -> v3: - Convert all ip netns del to cleanup_ns (Justin Iurman) v1 -> v2: - Split the large patch set to small parts for easy review (Paolo Abeni) - Move busywait from forwarding/lib.sh to net/lib.sh directly (Petr Machata) - Update setup_ns/cleanup_ns struct (Petr Machata) - Remove default trap in lib.sh (Petr Machata) ==================== Link: https://lore.kernel.org/r/20231202020110.362433-1-liuhangbin@gmail.com Signed-off-by: Paolo Abeni commit 0f4765d0b48d90ede9788c7edb2e072eee20f88e Author: Hangbin Liu Date: Sat Dec 2 10:01:10 2023 +0800 selftests/net: convert unicast_extensions.sh to run it in unique namespace Here is the test result after conversion. # ./unicast_extensions.sh /usr/bin/which: no nettest in (/root/.local/bin:/root/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin) ########################################################################### Unicast address extensions tests (behavior of reserved IPv4 addresses) ########################################################################### TEST: assign and ping within 240/4 (1 of 2) (is allowed) [ OK ] TEST: assign and ping within 240/4 (2 of 2) (is allowed) [ OK ] TEST: assign and ping within 0/8 (1 of 2) (is allowed) [ OK ] ... TEST: assign and ping class D address (is forbidden) [ OK ] TEST: routing using class D (is forbidden) [ OK ] TEST: routing using 127/8 (is forbidden) [ OK ] Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 90e271f65ee428ae5a75e783f5ba50a10dece09d Author: Hangbin Liu Date: Sat Dec 2 10:01:09 2023 +0800 selftests/net: convert sctp_vrf.sh to run it in unique namespace Here is the test result after conversion. ]# ./sctp_vrf.sh Testing For SCTP VRF: TEST 01: nobind, connect from client 1, l3mdev_accept=1, Y [PASS] ... TEST 12: bind vrf-2 & 1 in server, connect from client 1 & 2, N [PASS] ***v6 Tests Done*** Acked-by: David Ahern Reviewed-by: Xin Long Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 3e05fc0c56bbbd1470a80f63b156be52f1101c64 Author: Hangbin Liu Date: Sat Dec 2 10:01:08 2023 +0800 selftests/net: convert ndisc_unsolicited_na_test.sh to run it in unique namespace Here is the test result after conversion. ]# ./ndisc_unsolicited_na_test.sh TEST: test_unsolicited_na: drop_unsolicited_na=0 accept_untracked_na=1 forwarding=1 [ OK ] TEST: test_unsolicited_na: drop_unsolicited_na=0 accept_untracked_na=0 forwarding=0 [ OK ] TEST: test_unsolicited_na: drop_unsolicited_na=0 accept_untracked_na=0 forwarding=1 [ OK ] TEST: test_unsolicited_na: drop_unsolicited_na=0 accept_untracked_na=1 forwarding=0 [ OK ] TEST: test_unsolicited_na: drop_unsolicited_na=1 accept_untracked_na=0 forwarding=0 [ OK ] TEST: test_unsolicited_na: drop_unsolicited_na=1 accept_untracked_na=0 forwarding=1 [ OK ] TEST: test_unsolicited_na: drop_unsolicited_na=1 accept_untracked_na=1 forwarding=0 [ OK ] TEST: test_unsolicited_na: drop_unsolicited_na=1 accept_untracked_na=1 forwarding=1 [ OK ] Tests passed: 8 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 4affb17c0d0e3708cd0088e81564af51e7e4d693 Author: Hangbin Liu Date: Sat Dec 2 10:01:07 2023 +0800 selftests/net: convert l2tp.sh to run it in unique namespace Here is the test result after conversion. ]# ./l2tp.sh TEST: IPv4 basic L2TP tunnel [ OK ] TEST: IPv4 route through L2TP tunnel [ OK ] TEST: IPv6 basic L2TP tunnel [ OK ] TEST: IPv6 route through L2TP tunnel [ OK ] TEST: IPv4 basic L2TP tunnel - with IPsec [ OK ] TEST: IPv4 route through L2TP tunnel - with IPsec [ OK ] TEST: IPv6 basic L2TP tunnel - with IPsec [ OK ] TEST: IPv6 route through L2TP tunnel - with IPsec [ OK ] TEST: IPv4 basic L2TP tunnel [ OK ] TEST: IPv4 route through L2TP tunnel [ OK ] TEST: IPv6 basic L2TP tunnel - with IPsec [ OK ] TEST: IPv6 route through L2TP tunnel - with IPsec [ OK ] TEST: IPv4 basic L2TP tunnel - after IPsec teardown [ OK ] TEST: IPv4 route through L2TP tunnel - after IPsec teardown [ OK ] TEST: IPv6 basic L2TP tunnel - after IPsec teardown [ OK ] TEST: IPv6 route through L2TP tunnel - after IPsec teardown [ OK ] Tests passed: 16 Tests failed: 0 Acked-by: David Ahern Reviewed-by: James Chapman Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 2ab1ee827e976d411fd140225016c2e532e4df12 Author: Hangbin Liu Date: Sat Dec 2 10:01:06 2023 +0800 selftests/net: convert ioam6.sh to run it in unique namespace Here is the test result after conversion. ]# ./ioam6.sh -------------------------------------------------------------------------- OUTPUT tests -------------------------------------------------------------------------- TEST: Unknown IOAM namespace (inline mode) [ OK ] TEST: Unknown IOAM namespace (encap mode) [ OK ] TEST: Missing trace room (inline mode) [ OK ] TEST: Missing trace room (encap mode) [ OK ] TEST: Trace type with bit 0 only (inline mode) [ OK ] ... TEST: Full supported trace (encap mode) [ OK ] -------------------------------------------------------------------------- GLOBAL tests -------------------------------------------------------------------------- TEST: Forward - Full supported trace (inline mode) [ OK ] TEST: Forward - Full supported trace (encap mode) [ OK ] - Tests passed: 88 - Tests failed: 0 Acked-by: David Ahern Reviewed-by: Justin Iurman Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 80b74bd33421ddde1b716563e2e6e0da5edc5d9b Author: Hangbin Liu Date: Sat Dec 2 10:01:05 2023 +0800 sleftests/net: convert icmp.sh to run it in unique namespace Here is the test result after conversion. ]# ./icmp.sh OK Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit c1516b3563aca82a35277dc8999370868cf20175 Author: Hangbin Liu Date: Sat Dec 2 10:01:04 2023 +0800 selftests/net: convert icmp_redirect.sh to run it in unique namespace Here is the test result after conversion. # ./icmp_redirect.sh ########################################################################### Legacy routing ########################################################################### TEST: IPv4: redirect exception [ OK ] ... TEST: IPv4: mtu exception plus redirect [ OK ] TEST: IPv6: mtu exception plus redirect [ OK ] Tests passed: 40 Tests failed: 0 Tests xfailed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit baf37f213c88ae9e620195f34509a9a4be7ffccd Author: Hangbin Liu Date: Sat Dec 2 10:01:03 2023 +0800 selftests/net: convert traceroute.sh to run it in unique namespace Here is the test result after conversion. ]# ./traceroute.sh TEST: IPV6 traceroute [ OK ] TEST: IPV4 traceroute [ OK ] Tests passed: 2 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 0d8b488792e4f2e26f54248f8a0380b73e1ff992 Author: Hangbin Liu Date: Sat Dec 2 10:01:02 2023 +0800 selftests/net: convert drop_monitor_tests.sh to run it in unique namespace Here is the test result after conversion. ]# ./drop_monitor_tests.sh Software drops test TEST: Capturing active software drops [ OK ] TEST: Capturing inactive software drops [ OK ] Hardware drops test TEST: Capturing active hardware drops [ OK ] TEST: Capturing inactive hardware drops [ OK ] Tests passed: 4 Tests failed: 0 Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 7c16d485fec5d0010b992e75ad996e7382950879 Author: Hangbin Liu Date: Sat Dec 2 10:01:01 2023 +0800 selftests/net: convert cmsg tests to make them run in unique namespace Here is the test result after conversion. ]# ./cmsg_ipv6.sh OK ]# ./cmsg_so_mark.sh OK ]# ./cmsg_time.sh OK Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 3a0f3367006f7cb4203e8eecc77ce7d63190a1df Author: Hangbin Liu Date: Sat Dec 2 10:01:00 2023 +0800 selftests/net: convert arp_ndisc_untracked_subnets.sh to run it in unique namespace Here is the test result after conversion. 2 tests also failed without this patch ]# ./arp_ndisc_untracked_subnets.sh TEST: test_arp: accept_arp=0 [ OK ] TEST: test_arp: accept_arp=1 [ OK ] TEST: test_arp: accept_arp=2 same_subnet=0 [ OK ] TEST: test_arp: accept_arp=2 same_subnet=1 [ OK ] TEST: test_ndisc: accept_untracked_na=0 [ OK ] TEST: test_ndisc: accept_untracked_na=1 [ OK ] TEST: test_ndisc: accept_untracked_na=2 same_subnet=0 [ OK ] TEST: test_ndisc: accept_untracked_na=2 same_subnet=1 [ OK ] Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 7f770d28f2e5abfd442ad689ba1129dd66593529 Author: Hangbin Liu Date: Sat Dec 2 10:00:59 2023 +0800 selftests/net: specify the interface when do arping When do arping, the interface need to be specified. Or we will get error: Interface "lo" is not ARPable. And the test failed. ]# ./arp_ndisc_untracked_subnets.sh TEST: test_arp: accept_arp=0 [ OK ] TEST: test_arp: accept_arp=1 [FAIL] TEST: test_arp: accept_arp=2 same_subnet=0 [ OK ] TEST: test_arp: accept_arp=2 same_subnet=1 [FAIL] After fix: ]# ./arp_ndisc_untracked_subnets.sh TEST: test_arp: accept_arp=0 [ OK ] TEST: test_arp: accept_arp=1 [ OK ] TEST: test_arp: accept_arp=2 same_subnet=0 [ OK ] TEST: test_arp: accept_arp=2 same_subnet=1 [ OK ] Fixes: 0ea7b0a454ca ("selftests: net: arp_ndisc_untracked_subnets: test for arp_accept and accept_untracked_na") Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 64227511ad57796fac514ad8df6f2830cc887563 Author: Hangbin Liu Date: Sat Dec 2 10:00:58 2023 +0800 selftests/net: convert arp_ndisc_evict_nocarrier.sh to run it in unique namespace Here is the test result after conversion. ]# ./arp_ndisc_evict_nocarrier.sh run arp_evict_nocarrier=1 test ok run arp_evict_nocarrier=0 test ok run all.arp_evict_nocarrier=0 test ok run ndisc_evict_nocarrier=1 test ok run ndisc_evict_nocarrier=0 test ok run all.ndisc_evict_nocarrier=0 test ok Acked-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 25ae948b447881bf689d459cd5bd4629d9c04b20 Author: Hangbin Liu Date: Sat Dec 2 10:00:57 2023 +0800 selftests/net: add lib.sh Add a lib.sh for net selftests. This file can be used to define commonly used variables and functions. Some commonly used functions can be moved from forwarding/lib.sh to this lib file. e.g. busywait(). Add function setup_ns() for user to create unique namespaces with given prefix name. Reviewed-by: Petr Machata Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 730651268664070dbd582d7d0338b47d066d6323 Author: Amir Goldstein Date: Thu Nov 30 16:16:24 2023 +0200 fs: use do_splice_direct() for nfsd/ksmbd server-side-copy nfsd/ksmbd call vfs_copy_file_range() with flag COPY_FILE_SPLICE to perform kernel copy between two files on any two filesystems. Splicing input file, while holding file_start_write() on the output file which is on a different sb, posses a risk for fanotify related deadlocks. We only need to call splice_file_range() from within the context of ->copy_file_range() filesystem methods with file_start_write() held. To avoid the possible deadlocks, always use do_splice_direct() instead of splice_file_range() for the kernel copy fallback in vfs_copy_file_range() without holding file_start_write(). Reported-and-tested-by: Bert Karwatzki Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231130141624.3338942-4-amir73il@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit a099bec7a81052a324d07c9be7c24dc92fbd8ad1 Author: Masahiro Yamada Date: Fri Nov 17 21:56:19 2023 +0900 arm64: vdso32: rename 32-bit debug vdso to vdso32.so.dbg 'make vdso_install' renames arch/arm64/kernel/vdso32/vdso.so.dbg to vdso32.so during installation, which allows 64-bit and 32-bit vdso files to be installed in the same directory. However, arm64 is the only architecture that requires this renaming. To simplify the vdso_install logic, rename the in-tree vdso file so its base name matches the installed file name. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20231117125620.1058300-1-masahiroy@kernel.org Signed-off-by: Will Deacon commit 89320c9785e8429155f8dfa44a183b509866e852 Author: Mark-PK Tsai Date: Thu Oct 19 14:38:16 2023 +0100 ARM: 9329/1: kasan: Use memblock_alloc_try_nid_raw for shadow page kasan_pte_populate fill KASAN_SHADOW_INIT in the newly allocated shadow page, so it's unnecessary to use memblock_alloc_try_nid, which always zero the new allocated memory. Use memblock_alloc_try_nid_raw instead of memblock_alloc_try_nid like arm64 does which can make kasan init faster. Signed-off-by: Mark-PK Tsai Signed-off-by: Russell King (Oracle) commit c16af1212479570454752671a170a1756e11fdfb Author: Wang Kefeng Date: Thu Oct 19 12:21:35 2023 +0100 ARM: 9328/1: mm: try VMA lock-based page fault handling first Attempt VMA lock-based page fault handling first, and fall back to the existing mmap_lock-based handling if that fails, the ebizzy benchmark shows 25% improvement on qemu with 2 cpus. Signed-off-by: Kefeng Wang Signed-off-by: Russell King (Oracle) commit f54e8634d1366926c807e2af6125b33cff555fa7 Author: Randy Dunlap Date: Tue Nov 7 01:36:03 2023 +0100 ARM: 9330/1: davinci: also select PINCTRL kconfig warns when PINCTRL_SINGLE is selected but PINCTRL is not set, so also set PINCTRL for ARCH_DAVINCI. This prevents a kconfig/build warning: WARNING: unmet direct dependencies detected for PINCTRL_SINGLE Depends on [n]: PINCTRL [=n] && OF [=y] && HAS_IOMEM [=y] Selected by [y]: - ARCH_DAVINCI [=y] && ARCH_MULTI_V5 [=y] Closes: lore.kernel.org/r/202311070548.0f6XfBrh-lkp@intel.com Fixes: f962396ce292 ("ARM: davinci: support multiplatform build for ARM v5") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Bartosz Golaszewski Cc: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org Cc: patches@armlinux.org.uk Signed-off-by: Russell King (Oracle) commit fd7c3c3767c38dbbf2f5c993c6fd42a71846e7e0 Author: Mark-PK Tsai Date: Thu Oct 19 09:35:22 2023 +0100 ARM: 9327/1: vfp: Add missing VFP instructions to neon_support_hook Add the missing "Unconditional Advanced SIMD and floating-point instructions" in [1] to the VFP undef hook. This commit addresses the issue reported in [2], where executing the vudot instruction on a platform with FEAT_DotProd support resulted in an undefined instruction error. Link: https://developer.arm.com/documentation/ddi0597/2023-06/?lang=en [1] Link: https://lore.kernel.org/lkml/20230920083907.30479-1-mark-pk.tsai@mediatek.com/ [2] Signed-off-by: Mark-PK Tsai Tested-by: Xuewen Yan Signed-off-by: Russell King (Oracle) commit f35c32ca6839f5777862dbe2138d02bf50b3dfa7 Author: Marc Zyngier Date: Mon Dec 4 14:36:06 2023 +0000 arm64: Rename reserved values for CTR_EL0.L1Ip We now have *two* values for CTR_EL0.L1Ip that are reserved. Which makes things a bit awkward. In order to lift the ambiguity, rename RESERVED (0b01) to RESERVED_AIVIVT, and VPIPT (0b00) to RESERVED_VPIPT. This makes it clear which of these meant what, and I'm sure archeologists will find it useful... Reviewed-by: Zenghui Yu Signed-off-by: Marc Zyngier Reviewed-by: Anshuman Khandual Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20231204143606.1806432-4-maz@kernel.org Signed-off-by: Will Deacon commit d8e12a0d3715fbcc26fb2baac979bd07ba4c08d0 Author: Marc Zyngier Date: Mon Dec 4 14:36:05 2023 +0000 arm64: Kill detection of VPIPT i-cache policy Since the kernel will never run on a system with the VPIPT i-cache policy, drop the detection code altogether. Reviewed-by: Zenghui Yu Reviewed-by: Anshuman Khandual Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20231204143606.1806432-3-maz@kernel.org Signed-off-by: Will Deacon commit ced242ba9d7cb3571f6e0f165f643cb832d52148 Author: Marc Zyngier Date: Mon Dec 4 14:36:04 2023 +0000 KVM: arm64: Remove VPIPT I-cache handling We have some special handling for VPIPT I-cache in critical parts of the cache and TLB maintenance. Remove it. Reviewed-by: Zenghui Yu Reviewed-by: Anshuman Khandual Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20231204143606.1806432-2-maz@kernel.org Signed-off-by: Will Deacon commit c8fa1cc07759dde17c97796f41696a0da35c6ea7 Author: Dmitry Baryshkov Date: Sun Dec 3 03:05:28 2023 +0300 drm/atomic: add private obj state to state dump The drm_atomic_print_new_state() already prints private object state via drm_atomic_private_obj_print_state(). Add private object state dumping to __drm_state_dump(), so that it is also included into drm_state_dump() output and into debugfs/dri/N/state file. Reviewed-by: Rob Clark Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231203000532.1290480-2-dmitry.baryshkov@linaro.org commit 9fd7874c0e5c89d7da0b4442271696ec0f8edcba Author: Jens Axboe Date: Mon Dec 4 10:47:50 2023 -0700 iov_iter: replace import_single_range() with import_ubuf() With the removal of the 'iov' argument to import_single_range(), the two functions are now fully identical. Convert the import_single_range() callers to import_ubuf(), and remove the former fully. Signed-off-by: Jens Axboe Link: https://lore.kernel.org/r/20231204174827.1258875-3-axboe@kernel.dk Signed-off-by: Christian Brauner commit 6ac805d13870925c787a28e3fe5cc73610cacd03 Author: Jens Axboe Date: Mon Dec 4 10:47:49 2023 -0700 iov_iter: remove unused 'iov' argument from import_single_range() It is entirely unused, just get rid of it. Signed-off-by: Jens Axboe Link: https://lore.kernel.org/r/20231204174827.1258875-2-axboe@kernel.dk Signed-off-by: Christian Brauner commit c50a291d621aa7abaa27b05f56d450a388b64948 Author: Boris Brezillon Date: Mon Dec 4 16:14:06 2023 +0100 drm/gpuvm: Let drm_gpuvm_bo_put() report when the vm_bo object is destroyed Some users need to release resources attached to the vm_bo object when it's destroyed. In Panthor's case, we need to release the pin ref so BO pages can be returned to the system when all GPU mappings are gone. This could be done through a custom drm_gpuvm::vm_bo_free() hook, but this has all sort of locking implications that would force us to expose a drm_gem_shmem_unpin_locked() helper, not to mention the fact that having a ::vm_bo_free() implementation without a ::vm_bo_alloc() one seems odd. So let's keep things simple, and extend drm_gpuvm_bo_put() to report when the object is destroyed. Signed-off-by: Boris Brezillon Reviewed-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231204151406.1977285-1-boris.brezillon@collabora.com commit 333f339616045a084e57d727a3e8ecd10a498842 Merge: 4aee43f3e0fa7 a39dd252d552a Author: Paolo Abeni Date: Tue Dec 5 11:40:15 2023 +0100 Merge branch 'intel-wired-lan-driver-updates-2023-12-01-ice' Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-12-01 (ice) This series contains updates to ice driver only. Konrad provides temperature reporting via hwmon. Arkadiusz adds reporting of Clock Generation Unit (CGU) information via devlink info. Pawel adjusts error messaging for ntuple filters to account for additional possibility for encountering an error. Karol ensures that all timestamps occurring around reset are processed and renames some E822 functions to convey additional usage for E823 devices. Jake provides mechanism to ensure that all timestamps on E822 devices are processed. The following are changes since commit 15bc81212f593fbd7bda787598418b931842dc14: octeon_ep: set backpressure watermark for RX queues and are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 100GbE ==================== Link: https://lore.kernel.org/r/20231201180845.219494-1-anthony.l.nguyen@intel.com Signed-off-by: Paolo Abeni commit a39dd252d552ab3212fea55330081ee64a9e5573 Author: Karol Kolacinski Date: Fri Dec 1 10:08:44 2023 -0800 ice: Rename E822 to E82X When code is applicable for both E822 and E823 devices, rename it from E822 to E82X. ICE_PHY_PER_NAC_E822 was unused, so just remove it. Signed-off-by: Karol Kolacinski Reviewed-by: Przemek Kitszel Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen Signed-off-by: Paolo Abeni commit 712e876371f8350c446a33577cf4a0aedcd4742a Author: Jacob Keller Date: Fri Dec 1 10:08:43 2023 -0800 ice: periodically kick Tx timestamp interrupt The E822 hardware for Tx timestamping keeps track of how many outstanding timestamps are still in the PHY memory block. It will not generate a new interrupt to the MAC until all of the timestamps in the region have been read. If somehow all the available data is not read, but the driver has exited its interrupt routine already, the PHY will not generate a new interrupt even if new timestamp data is captured. Because no interrupt is generated, the driver never processes the timestamp data. This state results in a permanent failure for all future Tx timestamps. It is not clear how the driver and hardware could enter this state. However, if it does, there is currently no recovery mechanism. Add a recovery mechanism via the periodic PTP work thread which invokes ice_ptp_periodic_work(). Introduce a new check, ice_ptp_maybe_trigger_tx_interrupt() which checks the PHY timestamp ready bitmask. If any bits are set, trigger a software interrupt by writing to PFINT_OICR. Once triggered, the main timestamp processing thread will read through the PHY data and clear the outstanding timestamp data. Once cleared, new data should trigger interrupts as expected. This should allow recovery from such a state rather than leaving the device in a state where we cannot process Tx timestamps. It is possible that this function checks for timestamp data simultaneously with the interrupt, and it might trigger additional unnecessary interrupts. This will cause a small amount of additional processing. Signed-off-by: Jacob Keller Signed-off-by: Karol Kolacinski Reviewed-by: Andrii Staikov Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Paolo Abeni commit 1cc5b6eaad92d69fe4d84bbee5c12ee297d56296 Author: Karol Kolacinski Date: Fri Dec 1 10:08:42 2023 -0800 ice: Re-enable timestamping correctly after reset During reset, TX_TSYN interrupt should be processed as it may process timestamps in brief moments before and after reset. Timestamping should be enabled on VSIs at the end of reset procedure. On ice_get_phy_tx_tstamp_ready error, interrupt should not be rearmed because error only happens on resets. Reviewed-by: Jesse Brandeburg Signed-off-by: Karol Kolacinski Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Paolo Abeni commit e9fd08a9a7fb98000757ca1971271ec846ea3065 Author: Pawel Kaminski Date: Fri Dec 1 10:08:41 2023 -0800 ice: Improve logs for max ntuple errors Supported number of ntuple filters affect also maximum location value that can be provided to ethtool command. Update error message to provide info about max supported value. Fix double spaces in the error messages. Reviewed-by: Jesse Brandeburg Signed-off-by: Pawel Kaminski Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Paolo Abeni commit b86455a1cbef6829e8da3f93d37a233be2616569 Author: Arkadiusz Kubalewski Date: Fri Dec 1 10:08:40 2023 -0800 ice: add CGU info to devlink info callback If Clock Generation Unit is present on NIC board user shall know its details. Provide the devlink info callback with a new: - fixed type object (cgu.id) indicating hardware variant of onboard CGU, - running type object (fw.cgu) consisting of CGU id, config and firmware versions. These information shall be known for debugging purposes. Test (on NIC board with CGU) $ devlink dev info / | grep cgu cgu.id 36 fw.cgu 8032.16973825.6021 Test (on NIC board without CGU) $ devlink dev info / | grep cgu -c 0 Reviewed-by: Larysa Zaremba Signed-off-by: Arkadiusz Kubalewski Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Paolo Abeni commit 4da71a77fc3be1fcb680c8d78e1a1fb8017905ad Author: Konrad Knitter Date: Fri Dec 1 10:08:39 2023 -0800 ice: read internal temperature sensor Since 4.30 firmware exposes internal thermal sensor reading via admin queue commands. Expose those readouts via hwmon API when supported. Datasheet: Get Sensor Reading Command (Opcode: 0x0632) +--------------------+--------+--------------------+-------------------------+ | Name | Bytes | Value | Remarks | +--------------------+--------+--------------------+-------------------------+ | Flags | 1-0 | | | | Opcode | 2-3 | 0x0632 | Command opcode | | Datalen | 4-5 | 0 | No external buffer. | | Return value | 6-7 | | Return value. | | Cookie High | 8-11 | Cookie | | | Cookie Low | 12-15 | Cookie | | | Sensor | 16 | | 0x00: Internal temp | | | | | 0x01-0xFF: Reserved. | | Format | 17 | Requested response | Only 0x00 is supported. | | | | format | 0x01-0xFF: Reserved. | | Reserved | 18-23 | | | | Data Address high | 24-27 | Response buffer | | | | | address | | | Data Address low | 28-31 | Response buffer | | | | | address | | +--------------------+--------+--------------------+-------------------------+ Get Sensor Reading Response (Opcode: 0x0632) +--------------------+--------+--------------------+-------------------------+ | Name | Bytes | Value | Remarks | +--------------------+--------+--------------------+-------------------------+ | Flags | 1-0 | | | | Opcode | 2-3 | 0x0632 | Command opcode | | Datalen | 4-5 | 0 | No external buffer | | Return value | 6-7 | | Return value. | | | | | EINVAL: Invalid | | | | | parameters | | | | | ENOENT: Unsupported | | | | | sensor | | | | | EIO: Sensor access | | | | | error | | Cookie High | 8-11 | Cookie | | | Cookie Low | 12-15 | Cookie | | | Sensor Reading | 16-23 | | Format of the reading | | | | | is dependent on request | | Data Address high | 24-27 | Response buffer | | | | | address | | | Data Address low | 28-31 | Response buffer | | | | | address | | +--------------------+--------+--------------------+-------------------------+ Sensor Reading for Sensor 0x00 (Internal Chip Temperature): +--------------------+--------+--------------------+-------------------------+ | Name | Bytes | Value | Remarks | +--------------------+--------+--------------------+-------------------------+ | Thermal Sensor | 0 | | Reading in degrees | | reading | | | Celsius. Signed int8 | | Warning High | 1 | | Warning High threshold | | threshold | | | in degrees Celsius. | | | | | Unsigned int8. | | | | | 0xFF when unsupported | | Critical High | 2 | | Critical High threshold | | threshold | | | in degrees Celsius. | | | | | Unsigned int8. | | | | | 0xFF when unsupported | | Fatal High | 3 | | Fatal High threshold | | threshold | | | in degrees Celsius. | | | | | Unsigned int8. | | | | | 0xFF when unsupported | | Reserved | 4-7 | | | +--------------------+--------+--------------------+-------------------------+ Driver provides current reading from HW as well as device specific thresholds for thermal alarm (Warning, Critical, Fatal) events. $ sensors Output ========================================================= ice-pci-b100 Adapter: PCI adapter temp1: +62.0°C (high = +95.0°C, crit = +105.0°C) (emerg = +115.0°C) Tested on Intel Corporation Ethernet Controller E810-C for SFP Co-developed-by: Marcin Domagala Signed-off-by: Marcin Domagala Co-developed-by: Eric Joyner Signed-off-by: Eric Joyner Reviewed-by: Marcin Szycik Reviewed-by: Przemek Kitszel Signed-off-by: Konrad Knitter Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Paolo Abeni commit 157ad4ccff0754d9eb57d3a4fa31264ee6e9716b Author: AngeloGioacchino Del Regno Date: Mon Dec 4 12:42:15 2023 +0100 drm/panfrost: Synchronize and disable interrupts before powering off To make sure that we don't unintentionally perform any unclocked and/or unpowered R/W operation on GPU registers, before turning off clocks and regulators we must make sure that no GPU, JOB or MMU ISR execution is pending: doing that requires to add a mechanism to synchronize the interrupts on suspend. Add functions panfrost_{gpu,job,mmu}_suspend_irq() which will perform interrupts masking and ISR execution synchronization, and then call those in the panfrost_device_runtime_suspend() handler in the exact sequence of job (may require mmu!) -> mmu -> gpu. As a side note, JOB and MMU suspend_irq functions needed some special treatment: as their interrupt handlers will unmask interrupts, it was necessary to add an `is_suspended` bitmap which is used to address the possible corner case of unintentional IRQ unmasking because of ISR execution after a call to synchronize_irq(). At resume, clear each is_suspended bit in the reset path of JOB/MMU to allow unmasking the interrupts. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Boris Brezillon Tested-by: Marek Szyprowski Reviewed-by: Steven Price Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20231204114215.54575-4-angelogioacchino.delregno@collabora.com commit b98e9a84d38ac88f9fd2accbcd45b656eeea7a04 Author: AngeloGioacchino Del Regno Date: Mon Dec 4 12:42:14 2023 +0100 drm/panfrost: Add gpu_irq, mmu_irq to struct panfrost_device In preparation for adding a IRQ synchronization mechanism for PM suspend, add gpu_irq and mmu_irq variables to struct panfrost_device and change functions panfrost_gpu_init() and panfrost_mmu_init() to use those. Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Signed-off-by: AngeloGioacchino Del Regno Tested-by: Marek Szyprowski Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20231204114215.54575-3-angelogioacchino.delregno@collabora.com commit a4f5892914ca7709ea6d191f0edace93a5935966 Author: AngeloGioacchino Del Regno Date: Mon Dec 4 12:42:13 2023 +0100 drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq Some SoCs may be equipped with a GPU containing two core groups and this is exactly the case of Samsung's Exynos 5422 featuring an ARM Mali-T628 MP6 GPU: the support for this GPU in Panfrost is partial, as this driver currently supports using only one core group and that's reflected on all parts of it, including the power on (and power off, previously to this patch) function. The issue with this is that even though executing the soft reset operation should power off all cores unconditionally, on at least one platform we're seeing a crash that seems to be happening due to an interrupt firing which may be because we are calling power transition only on the first core group, leaving the second one unchanged, or because ISR execution was pending before entering the panfrost_gpu_power_off() function and executed after powering off the GPU cores, or all of the above. Finally, solve this by: - Avoid to enable the power transition interrupt on reset; and - Ignoring the core_mask and ask the GPU to poweroff both core groups Fixes: 22aa1a209018 ("drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off()") Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Signed-off-by: AngeloGioacchino Del Regno Tested-by: Marek Szyprowski Signed-off-by: Boris Brezillon Link: https://patchwork.freedesktop.org/patch/msgid/20231204114215.54575-2-angelogioacchino.delregno@collabora.com commit 8c20b29db5087684c2d46ca5a33b504b0743c85e Author: Vlastimil Babka Date: Mon Oct 2 18:54:46 2023 +0200 mm/mempool/dmapool: remove CONFIG_DEBUG_SLAB ifdefs CONFIG_DEBUG_SLAB is going away with CONFIG_SLAB, so remove dead ifdefs in mempool and dmapool code. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit a9e0b9f27266d46ed6e73aac8d0844602cd0cb93 Author: Vlastimil Babka Date: Mon Oct 2 17:43:38 2023 +0200 mm/slab: remove CONFIG_SLAB code from slab common code In slab_common.c and slab.h headers, we can now remove all code behind CONFIG_SLAB and CONFIG_DEBUG_SLAB ifdefs, and remove all CONFIG_SLUB ifdefs. Reviewed-by: Kees Cook Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 70da1d01edf6da3fde1df98b2125a77083a0fb82 Author: Vlastimil Babka Date: Mon Oct 2 16:36:55 2023 +0200 cpu/hotplug: remove CPUHP_SLAB_PREPARE hooks The CPUHP_SLAB_PREPARE hooks are only used by SLAB which is removed. SLUB defines them as NULL, so we can remove those altogether. Acked-by: Thomas Gleixner Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit bc3dcb850f1818528fcafb10dd38a4590d9119e3 Author: Vlastimil Babka Date: Mon Oct 2 16:33:43 2023 +0200 mm/memcontrol: remove CONFIG_SLAB #ifdef guards With SLAB removed, these are never true anymore so we can clean up. Reviewed-by: Kees Cook Acked-by: Michal Hocko Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit a745b067db0f0711974063deb78c6639c24ec5bf Author: Vlastimil Babka Date: Mon Oct 2 16:28:44 2023 +0200 KFENCE: cleanup kfence_guarded_alloc() after CONFIG_SLAB removal Some struct slab fields are initialized differently for SLAB and SLUB so we can simplify with SLUB being the only remaining allocator. Reviewed-by: Kees Cook Reviewed-by: Marco Elver Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 72786c0a3dc5d4151469f512909049a0b17ada3d Author: Vlastimil Babka Date: Mon Oct 2 16:17:16 2023 +0200 KASAN: remove code paths guarded by CONFIG_SLAB With SLAB removed and SLUB the only remaining allocator, we can clean up some code that was depending on the choice. Reviewed-by: Kees Cook Reviewed-by: Marco Elver Reviewed-by: Andrey Konovalov Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 4aee43f3e0fa77a1f79f9302ebd4787e6988b277 Merge: 030033d47788d f9bfc8eb1342c Author: Paolo Abeni Date: Tue Dec 5 11:15:10 2023 +0100 Merge branch 'net-sched-act_api-contiguous-action-arrays' Pedro Tammela says: ==================== net/sched: act_api: contiguous action arrays When dealing with action arrays in act_api it's natural to ask if they are always contiguous (no NULL pointers in between). Yes, they are in all cases so far, so make use of the already present tcf_act_for_each_action macro to explicitly document this assumption. There was an instance where it was not, but it was refactorable (patch 2) to make the array contiguous. v1->v2: - Respin - Added Jamal's acked-by ==================== Link: https://lore.kernel.org/r/20231201175015.214214-1-pctammela@mojatatu.com Signed-off-by: Paolo Abeni commit f9bfc8eb1342c7ddbe1b7be9d1ebd5bc80fb72b0 Author: Pedro Tammela Date: Fri Dec 1 14:50:15 2023 -0300 net/sched: act_api: use tcf_act_for_each_action in tcf_idr_insert_many The actions array is contiguous, so stop processing whenever a NULL is found. This is already the assumption for tcf_action_destroy[1], which is called from tcf_actions_init. [1] https://elixir.bootlin.com/linux/v6.7-rc3/source/net/sched/act_api.c#L1115 Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Acked-by: Marcelo Ricardo Leitner Signed-off-by: Paolo Abeni commit e09ac779f736e75eab501b77f2a4f13d245f0a6d Author: Pedro Tammela Date: Fri Dec 1 14:50:14 2023 -0300 net/sched: act_api: stop loop over ops array on NULL in tcf_action_init The ops array is contiguous, so stop processing whenever a NULL is found Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Acked-by: Marcelo Ricardo Leitner Signed-off-by: Paolo Abeni commit a0e947c9ccffe47d45aca793d9e7fe4f4494e381 Author: Pedro Tammela Date: Fri Dec 1 14:50:13 2023 -0300 net/sched: act_api: avoid non-contiguous action array In tcf_action_add, when putting the reference for the bound actions it assigns NULLs to just created actions passing a non contiguous array to tcf_action_put_many. Refactor the code so the actions array is always contiguous. Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Acked-by: Marcelo Ricardo Leitner Signed-off-by: Paolo Abeni commit 3872347e0a16876279bb21642e03842f283f0e38 Author: Pedro Tammela Date: Fri Dec 1 14:50:12 2023 -0300 net/sched: act_api: use tcf_act_for_each_action Use the auxiliary macro tcf_act_for_each_action in all the functions that expect a contiguous action array Suggested-by: Marcelo Ricardo Leitner Acked-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Acked-by: Marcelo Ricardo Leitner Signed-off-by: Paolo Abeni commit 2a19be61a65157b9c6c25e831392cdefbd0a8940 Author: Vlastimil Babka Date: Mon Oct 2 15:43:03 2023 +0200 mm/slab: remove CONFIG_SLAB from all Kconfig and Makefile Remove CONFIG_SLAB, CONFIG_DEBUG_SLAB, CONFIG_SLAB_DEPRECATED and everything in Kconfig files and mm/Makefile that depends on those. Since SLUB is the only remaining allocator, remove the allocator choice, make CONFIG_SLUB a "def_bool y" for now and remove all explicit dependencies on SLUB or SLAB as it's now always enabled. Make every option's verbose name and description refer to "the slab allocator" without refering to the specific implementation. Do not rename the CONFIG_ option names yet. Everything under #ifdef CONFIG_SLAB, and mm/slab.c is now dead code, all code under #ifdef CONFIG_SLUB is now always compiled. Reviewed-by: Kees Cook Reviewed-by: Christoph Lameter Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 0445ee000498ec1a5b1ed31bf35816cbeaef5e1e Author: Vlastimil Babka Date: Mon Nov 20 17:11:10 2023 +0100 mm/slab, docs: switch mm-api docs generation from slab.c to slub.c The SLAB implementation is going to be removed, and mm-api.rst currently uses mm/slab.c to obtain kerneldocs for some API functions. Switch it to mm/slub.c and move the relevant kerneldocs of exported functions from one to the other. The rest of kerneldocs in slab.c is for static SLAB implementation-specific functions that don't have counterparts in slub.c and thus can be simply removed with the implementation. Acked-by: David Rientjes Tested-by: David Rientjes Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 030033d47788d14b56f02391bb22eaf3c2ed7f87 Merge: 36638d372a1ce d2afc2cd7f1f4 Author: Paolo Abeni Date: Tue Dec 5 10:48:03 2023 +0100 Merge branch 'doc-update-bridge-doc' Hangbin Liu says: ==================== Doc: update bridge doc The current bridge kernel doc is too old. It only pointed to the linuxfoundation wiki page which lacks of the new features. Here let's start the new bridge document and put all the bridge info so new developers and users could catch up the last bridge status soon. v3 -> v4: - Patch01: Reference and borrow definitions from the IEEE 802.1Q-2022 standard for bridge (Stephen Hemminger) - Patch04: Remind that kAPI is unstable. Add back sysfs part, but only note that sysfs is deprecated. (Stephen Hemminger, Florian Fainelli) - Patch05: Mention the RSTP and IEEE 802.1D developing info. (Stephen Hemminger) - Some other grammar fixes. v2 -> v3: - Split the bridge doc update and adding kAPI/uAPI field to 2 part (Nikolay Aleksandrov) - Update bridge and bridge enum descriptions (Nikolay Aleksandrov) - Add user space stp help for STP doc (Vladimir Oltean) v1 -> v2: - Update bridge and bridge port enum descriptions (Vladimir Oltean) RFCv3 -> v1: - Fix up various typos, grammar and technical issues (Nikolay Aleksandrov) RFCv2 -> RFCv3: - Update netfilter part (Florian Westphal) - Break the one large patch in to multiparts for easy reviewing. Please tell me if I break it too much.. (Nikolay Aleksandrov) - Update the description of each enum and doc (Nikolay Aleksandrov) - Add more descriptions for STP/Multicast/VLAN. RFCv1 -> RFCv2: - Drop the python tool that generate iproute man page from kernel doc ==================== Link: https://lore.kernel.org/r/20231201081951.1623069-1-liuhangbin@gmail.com Signed-off-by: Paolo Abeni commit d2afc2cd7f1f46500e7ca830c453266f365ee43d Author: Hangbin Liu Date: Fri Dec 1 16:19:50 2023 +0800 docs: bridge: add other features Add some features that are not appropriate for the existing section to the "Others" part of the bridge document. Acked-by: Nikolay Aleksandrov Reviewed-by: Florian Fainelli Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 1b1a4c7e82aeebef6bd68c94b0531aa72531f60c Author: Hangbin Liu Date: Fri Dec 1 16:19:49 2023 +0800 docs: bridge: add netfilter doc Add netfilter part for bridge document. Reviewed-by: Florian Westphal Reviewed-by: Florian Fainelli Acked-by: Nikolay Aleksandrov Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 3c37f17d6ca9a2153486e2893f996a9f1525c410 Author: Hangbin Liu Date: Fri Dec 1 16:19:48 2023 +0800 docs: bridge: add switchdev doc Add switchdev part for bridge document. Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Acked-by: Nikolay Aleksandrov Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 75ceac88efb84c72b684d73a16c37842ca08fb14 Author: Hangbin Liu Date: Fri Dec 1 16:19:47 2023 +0800 docs: bridge: add multicast doc Add multicast part for bridge document. Acked-by: Nikolay Aleksandrov Reviewed-by: Florian Fainelli Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 041a6ac4bf792eaf4c5898b3a744e98cfdc43a7a Author: Hangbin Liu Date: Fri Dec 1 16:19:46 2023 +0800 docs: bridge: add VLAN doc Add VLAN part for bridge document. Acked-by: Nikolay Aleksandrov Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: Hangbin Liu Signed-off-by: Paolo Abeni commit 567d2608209ffd694b19ee2c602d02aeae7fd16d Author: Hangbin Liu Date: Fri Dec 1 16:19:45 2023 +0800 docs: bridge: add STP doc Add STP part for bridge document. Reviewed-by: Florian Fainelli Signed-off-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit bcc1f84e4d3480636d8ff7458bfdda9ff908a3d7 Author: Hangbin Liu Date: Fri Dec 1 16:19:44 2023 +0800 docs: bridge: Add kAPI/uAPI fields Add kAPI/uAPI field for bridge doc. Update struct net_bridge_vlan comments to fix doc build warning. Reviewed-by: Florian Fainelli Signed-off-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 8c4bafdb01cc7809903aced4981f563e3708ea37 Author: Hangbin Liu Date: Fri Dec 1 16:19:43 2023 +0800 net: bridge: add document for IFLA_BRPORT enum Add document for IFLA_BRPORT enum so we can use it in Documentation/networking/bridge.rst. Signed-off-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 8ebe06611666a399162de31cdd6f2f48ffa87748 Author: Hangbin Liu Date: Fri Dec 1 16:19:42 2023 +0800 net: bridge: add document for IFLA_BR enum Add document for IFLA_BR enum so we can use it in Documentation/networking/bridge.rst. Signed-off-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit e8a4195d843fe81a86a97db9ce830c78bfd3f19b Author: Hangbin Liu Date: Fri Dec 1 16:19:41 2023 +0800 docs: bridge: update doc format to rst The current bridge kernel doc is too old. It only pointed to the linuxfoundation wiki page which lacks of the new features. Here let's start the new bridge document and put all the bridge info so new developers and users could catch up the last bridge status soon. In this patch, Convert the doc to rst format. Add bridge brief introduction, FAQ and contact info. Reviewed-by: Florian Fainelli Signed-off-by: Hangbin Liu Acked-by: Nikolay Aleksandrov Signed-off-by: Paolo Abeni commit 721bf080f249ab2adcc4337abe164230bfb8594f Author: Chris Morgan Date: Mon Dec 4 12:57:16 2023 -0600 clk: rockchip: rk3568: Mark pclk_usb as critical In the reference manual under "2.8.6 NIU Clock gating reliance" it is stated that pclk_usb_niu has a dependency on hclk_usb_niu. While the manual does not state that this is a bi-directional relationship it was noted that the sdmmc2 failed to operate for me in mmc mode if the pclk_usb was not marked as critical. The parent clock of the hclk_sdmmc2 is hclk_usb. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20231204185719.569021-8-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 685da6972647b486980c0cc8fd6bb5d3863fd6b7 Author: Chris Morgan Date: Mon Dec 4 12:57:17 2023 -0600 clk: rockchip: rk3568: Add PLL rate for 126.4MHz Add support for a PLL rate of 126.4MHz so that the Powkiddy X55 panel can run at a requested 60hz. I have confirmed this rate fits with all the constraints listed in the TRM for the VPLL (as an integer PLL) in Part 1 "Chapter 2 Clock & Reset Unit (CRU)." Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20231204185719.569021-9-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 31bda717d7777b8b6cf542af2730651ad6bb4839 Author: Chengming Zhou Date: Thu Nov 2 03:23:30 2023 +0000 slub: Update frozen slabs documentations in the source The current updated scheme (which this series implemented) is: - node partial slabs: PG_Workingset && !frozen - cpu partial slabs: !PG_Workingset && !frozen - cpu slabs: !PG_Workingset && frozen - full slabs: !PG_Workingset && !frozen The most important change is that "frozen" bit is not set for the cpu partial slabs anymore, __slab_free() will grab node list_lock then check by !PG_Workingset that it's not on a node partial list. And the "frozen" bit is still kept for the cpu slabs for performance, since we don't need to grab node list_lock to check whether the PG_Workingset is set or not if the "frozen" bit is set in __slab_free(). Update related documentations and comments in the source. Signed-off-by: Chengming Zhou Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Acked-by: Christoph Lameter (Ampere) Signed-off-by: Vlastimil Babka commit 21316fdc799932ff43fa00a6d6a45b16dbd77844 Author: Chengming Zhou Date: Thu Nov 2 03:23:29 2023 +0000 slub: Rename all *unfreeze_partials* functions to *put_partials* Since all partial slabs on the CPU partial list are not frozen anymore, we don't unfreeze when moving cpu partial slabs to node partial list, it's better to rename these functions. Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 00eb60c28815e22690834b2e3951ded0cd300b8d Author: Chengming Zhou Date: Thu Nov 2 03:23:28 2023 +0000 slub: Optimize deactivate_slab() Since the introduce of unfrozen slabs on cpu partial list, we don't need to synchronize the slab frozen state under the node list_lock. The caller of deactivate_slab() and the caller of __slab_free() won't manipulate the slab list concurrently. So we can get node list_lock in the last stage if we really need to manipulate the slab list in this path. Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 1319f2178bdf1898a76ea8c4f00d57b240bbc5fd Author: Michael Walle Date: Thu Nov 23 11:24:04 2023 +0100 drm/panel-simple: add Evervision VGG644804 panel entry Timings taken from the datasheet, although sometimes there are just typical values and it's not clear if they are no min and max values or if you must use the typical value exactly. To make things worse, there is no back porch but only a combined sync and back porch length. Unfortunately, there is not public datasheet. Therefore, here are the relevant timings: | min | typ | max | -----------------+-----+--------+-----+ CLK frequency | - | 25.175 | - | HS period | - | 800 | - | HS pulse width | 5 | 30 | - | HS-DEN time | 112 | 144 | 175 | DEN pulse width | - | 640 | - | VS pulse width | 1 | 3 | 5 | VS-DEN time | - | 35 | - | VS period | - | 525 | - | Signed-off-by: Michael Walle Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231123102404.2022201-2-mwalle@kernel.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231123102404.2022201-2-mwalle@kernel.org commit 2a5244a04e751c8617d5e7707550d97a83b1102d Author: Michael Walle Date: Thu Nov 23 11:24:03 2023 +0100 dt-bindings: display: simple: add Evervision VGG644804 panel Add Evervision VGG644804 5.7" 640x480 LVDS panel compatible string. Signed-off-by: Michael Walle Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231123102404.2022201-1-mwalle@kernel.org Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231123102404.2022201-1-mwalle@kernel.org commit 2748848ceaf32671927c3b19672ba3104a1dba7e Author: Philipp Zabel Date: Thu Nov 23 18:08:06 2023 +0100 drm/panel: ilitek-ili9881c: Add Ampire AM8001280G LCD panel Add support for Ampire AM8001280G LCD panels. Signed-off-by: Philipp Zabel Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231123-drm-panel-ili9881c-am8001280g-v1-3-fdf4d624c211@pengutronix.de Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231123-drm-panel-ili9881c-am8001280g-v1-3-fdf4d624c211@pengutronix.de commit 7ff02f82c3e9ddd5dd81957c8659d350261196ae Author: Philipp Zabel Date: Thu Nov 23 18:08:05 2023 +0100 dt-bindings: ili9881c: Add Ampire AM8001280G LCD panel Document the compatible value for Ampire AM8001280G LCD panels. Signed-off-by: Philipp Zabel Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231123-drm-panel-ili9881c-am8001280g-v1-2-fdf4d624c211@pengutronix.de Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231123-drm-panel-ili9881c-am8001280g-v1-2-fdf4d624c211@pengutronix.de commit 68c193c8d4a403222ce51c8b08bd1715f8b74274 Author: Marco Felsch Date: Thu Nov 23 18:08:04 2023 +0100 drm/panel: ilitek-ili9881c: make use of prepare_prev_first The panel.prepare() call requires an initialized MIPI-DSI host, so set the prepare_prev_first flag to indicate that the host must be initialized first. Signed-off-by: Marco Felsch Signed-off-by: Philipp Zabel Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231123-drm-panel-ili9881c-am8001280g-v1-1-fdf4d624c211@pengutronix.de Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231123-drm-panel-ili9881c-am8001280g-v1-1-fdf4d624c211@pengutronix.de commit 33898f21283b5ab995e3e65fabae167168288399 Author: Alex Bee Date: Sat Dec 2 14:05:07 2023 +0100 ARM: dts: rockchip: Move uart aliases to SoC dtsi for RK3128 SoC TRM, SoC datasheet and board schematics always refer to the same uart numbers - even if not all are used for a specific board. In order to not have to re-define them for every board move the aliases to SoC dtsi for RK3128 like it's being done for all other Rockchip ARM SoCs. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231202130506.66738-5-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 697b39733df961910755f49284f87c0b2a9e5ad3 Author: Alex Bee Date: Sat Dec 2 14:05:06 2023 +0100 ARM: dts: rockchip: Move i2c aliases to SoC dtsi for RK3128 SoC TRM, SoC datasheet and board schematics always refer to the same i2c numbers - even if not all are used for a specific board. In order to not have to re-define them for every board move the aliases to SoC dtsi for RK3128 like it's being done for all other Rockchip ARM SoCs. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231202130506.66738-4-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 5ca860fb438bafdf8501567b320239ea99910748 Author: Alex Bee Date: Sat Dec 2 14:05:05 2023 +0100 ARM: dts: rockchip: Move gpio aliases to SoC dtsi for RK3128 SoC TRM, SoC datasheet and board schematics always refer to the same gpio numbers - even if not all are used for a specific board. In order to not have to re-define them for every board move the aliases to SoC dtsi for RK3128 like it's being done for most other Rockchip ARM SoCs. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231202130506.66738-3-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 5d7d06e7c0700388dfd1f59ac9f5d6ac0870bd2e Author: Tim Lunn Date: Sun Dec 3 23:40:03 2023 +1100 ARM: dts: rockchip: Add Sonoff iHost Smart Home Hub Sonoff iHost is gateway device designed to provide a Smart Home Hub, it is based on Rockchip RV1126. There is also a version with 2GB RAM based off the RV1109 dual core SoC. Features: - Rockchip RV1126 - 4GB DDR4 - 8GB eMMC - microSD slot - RMII Ethernet PHY - 1x USB 2.0 Host - 1x USB 2.0 OTG - Realtek RTL8723DS WiFi/BT - EFR32MG21 Silabs Zigbee radio - Speaker/Microphone This patch adds the initial device tree for this device, it is largely based off the device trees for mainline Edgeble Neu2 and downstream Rockchip rv1126-evb-v13 configs. It has been adapted with relevant peripheral and GPIO pins for the iHost. Signed-off-by: Tim Lunn Link: https://lore.kernel.org/r/20231203124004.2676174-8-tim@feathertop.org Signed-off-by: Heiko Stuebner commit 56bde00f7d151d90c66dada007f13f92b95b0d05 Author: Tim Lunn Date: Sun Dec 3 23:40:04 2023 +1100 dt-bindings: arm: rockchip: Add Sonoff iHost Sonoff iHost is a smart home hub with built in radios for wifi/bt and Zigbee. It is based off the Rockchip RV1126 (or RV1109) SoC. Signed-off-by: Tim Lunn Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231203124004.2676174-9-tim@feathertop.org Signed-off-by: Heiko Stuebner commit 36ad2e479f69d93a27bc0721308e90a4c1101e70 Author: Tim Lunn Date: Sun Dec 3 23:40:02 2023 +1100 ARM: dts: rockchip: Add rv1109 SoC The Rockchip rv1109 SoC is a dual core version of the rv1126. It is otherwise identical and shares the same device tree config. This patch introduces a dtsi file to drop the additional cpu nodes. Taken from Rockchip BSP kernel. Signed-off-by: Tim Lunn Link: https://lore.kernel.org/r/20231203124004.2676174-7-tim@feathertop.org Signed-off-by: Heiko Stuebner commit 32de939ae49d541a7892f77da8fe78bc6fe73f13 Author: Tim Lunn Date: Sun Dec 3 23:40:01 2023 +1100 ARM: dts: rockchip: Split up rgmii1 pinctrl on rv1126 Split up the pinctrl definitions for rgmii1 so it can be shared with devices using an RMII PHY. Signed-off-by: Tim Lunn Link: https://lore.kernel.org/r/20231203124004.2676174-6-tim@feathertop.org Signed-off-by: Heiko Stuebner commit b1ed25667f5f88531bcb51f3683029693e7a9b8c Author: Tim Lunn Date: Sun Dec 3 23:40:00 2023 +1100 ARM: dts: rockchip: Add i2c2 node to rv1126 Add i2c2 node and i2c2_xfer pinctrl for Rockchip RV1126 Signed-off-by: Tim Lunn Link: https://lore.kernel.org/r/20231203124004.2676174-5-tim@feathertop.org Signed-off-by: Heiko Stuebner commit 9f35b08ab08b913abf65cc4ff8d2655ad7912d77 Author: Tim Lunn Date: Sun Dec 3 23:39:58 2023 +1100 ARM: dts: rockchip: Serial aliases for rv1126 Add serial aliases for uart nodes so that serial devices are created Signed-off-by: Tim Lunn Link: https://lore.kernel.org/r/20231203124004.2676174-3-tim@feathertop.org Signed-off-by: Heiko Stuebner commit 2d93f9dc42623f0812f66f7cdc1d66cc9f263e34 Author: Tim Lunn Date: Sun Dec 3 23:39:57 2023 +1100 ARM: dts: rockchip: Add alternate UART pins to rv1126 Add uart3m2_xfer and uart4m2_xfer pins for Rockchip RV1126. These are used as serial ports for the indicator and Zigbee radio on the iHost. Signed-off-by: Tim Lunn Link: https://lore.kernel.org/r/20231203124004.2676174-2-tim@feathertop.org Signed-off-by: Heiko Stuebner commit d85a7e34565f331579730b67a0977fd3373b8077 Author: Alex Bee Date: Mon Dec 4 16:35:47 2023 +0100 ARM: dts: rockchip: Enable GPU for XPI-3128 Add the supply and enable gpu node for XPI-3128 board. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231204153547.97877-4-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 9ca8b8f880f2ebfe87780d553ca73fd2825a8988 Author: Alex Bee Date: Mon Dec 4 16:35:46 2023 +0100 ARM: dts: rockchip: Add GPU node for RK3128 RK3128 SoCs have Mali400 MP2 GPU. Add the respective device tree node and the correspondending opp-table. The frequencies and voltages of the opp-table have been taken from downstream kernel. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231204153547.97877-3-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit edc4802d5a72bae467f7781e184b6687eb833de5 Author: Alex Bee Date: Mon Dec 4 16:35:45 2023 +0100 ARM: dts: rockchip: Add power-controller for RK3128 Add power controller and qos nodes for RK3128 in order to use them as powerdomains. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231204153547.97877-2-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 38db985966d2f0f89f7e1891253489a16936fc5e Author: Chris Morgan Date: Mon Dec 4 12:57:15 2023 -0600 drm/panel: himax-hx8394: Add Support for Powkiddy X55 panel Add support for the Powkiddy X55 panel as used on the Powkiddy X55 handheld gaming console. This panel uses a Himax HX8394 display controller and requires a vendor provided init sequence. The display resolution is 720x1280 and is 67mm by 121mm as measured with calipers. Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231204185719.569021-7-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231204185719.569021-7-macroalpha82@gmail.com commit 00830a0d8f0d820335e7beb26e251069d90f2574 Author: Chris Morgan Date: Mon Dec 4 12:57:14 2023 -0600 dt-bindings: display: himax-hx8394: Add Powkiddy X55 panel Add compatible string for the Powkiddy X55 panel. Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231204185719.569021-6-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231204185719.569021-6-macroalpha82@gmail.com commit a695a5009c8fd239a98d98209489997ff5397d2b Author: Chris Morgan Date: Mon Dec 4 12:57:13 2023 -0600 drm/panel: himax-hx8394: Add Panel Rotation Support Add support for setting the rotation property for the Himax HX8394 panel. Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231204185719.569021-5-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231204185719.569021-5-macroalpha82@gmail.com commit be478bc7ab08127473ce9ed893378cc2a8762611 Author: Chris Morgan Date: Mon Dec 4 12:57:12 2023 -0600 dt-bindings: display: Document Himax HX8394 panel rotation Document panel rotation for Himax HX8394 display panel. Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231204185719.569021-4-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231204185719.569021-4-macroalpha82@gmail.com commit e4f53a4d921eba6187a2599cf184a3beeb604fe2 Author: Chris Morgan Date: Mon Dec 4 12:57:11 2023 -0600 drm/panel: himax-hx8394: Drop shutdown logic The driver shutdown is duplicate as it calls drm_unprepare and drm_disable which are called anyway when associated drivers are shutdown/removed. Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231204185719.569021-3-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231204185719.569021-3-macroalpha82@gmail.com commit 8c2c5d1d33f0725b7995f44f87a81311d13a441d Author: Chris Morgan Date: Mon Dec 4 12:57:10 2023 -0600 drm/panel: himax-hx8394: Drop prepare/unprepare tracking Drop the panel specific prepare/unprepare logic. This is now tracked by the DRM stack [1]. [1] commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel") Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231204185719.569021-2-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231204185719.569021-2-macroalpha82@gmail.com commit eeaddab4c14beb02157db5ca8f9e074066759bfd Author: Tony Lindgren Date: Mon Nov 27 07:15:44 2023 +0200 drm/panel: simple: Add BOE BP101WX1-100 panel This panel is found on Motorola mapphone tablets from mz615 to mz617. Signed-off-by: Tony Lindgren Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231127051547.15023-2-tony@atomide.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231127051547.15023-2-tony@atomide.com commit 4777dded21717c31d2d8471bccaf7c0ff58feaa4 Author: Tony Lindgren Date: Mon Nov 27 07:15:43 2023 +0200 dt-bindings: display: simple: Add boe,bp101wx1-100 panel This panel is found on Motorola mapphone tablets mz615 to mz617. Signed-off-by: Tony Lindgren Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231127051547.15023-1-tony@atomide.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231127051547.15023-1-tony@atomide.com commit b76bbf835d8945080b22b52fc1e6f41cde06865d Author: Andrejs Cainikovs Date: Fri Oct 20 17:30:22 2023 +0200 ARM: dts: imx6q-apalis: add can power-up delay on ixora board Newer variants of Ixora boards require a power-up delay when powering up the CAN transceiver of up to 1ms. Cc: stable@vger.kernel.org Signed-off-by: Andrejs Cainikovs Signed-off-by: Shawn Guo commit 36638d372a1ce27e4fe03b3c02cbbf344ddc33cb Merge: be5fc78a00844 9e95505fecb6b Author: Jakub Kicinski Date: Mon Dec 4 18:37:40 2023 -0800 Merge branch 'net-stmmac-est-implementation' Rohan G Thomas says: ==================== net: stmmac: EST implementation This patchset extends EST interrupt handling support to DWXGMAC IP followed by refactoring of EST implementation. Added a separate module for EST and moved all EST related functions to the new module. Also added support for EST cycle-time-extension. ==================== Link: https://lore.kernel.org/r/20231201055252.1302-1-rohan.g.thomas@intel.com Signed-off-by: Jakub Kicinski commit 9e95505fecb6b5a25b5230eb49c4d5b9e18077d0 Author: Rohan G Thomas Date: Fri Dec 1 13:52:52 2023 +0800 net: stmmac: Add support for EST cycle-time-extension Add support for cycle-time-extension. TER GCL-register needs to be updated with the cycle-time-extension. Width of TER register is EST time interval width + 7 bits. Signed-off-by: Rohan G Thomas Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231201055252.1302-4-rohan.g.thomas@intel.com Signed-off-by: Jakub Kicinski commit c3f3b97238f6fd87b9d90b9a995ee5e69f751a74 Author: Rohan G Thomas Date: Fri Dec 1 13:52:51 2023 +0800 net: stmmac: Refactor EST implementation Refactor EST implementation by moving common code for DWMAC4 and DWXGMAC IPs into a separate EST module. EST implementation for DWMAC4 and DWXGMAC differs only for CSR base address, PTOV field offset width, and PTOV clock multiplier value. Thanks, Serge Semin and Jakub Kicinski for the suggestions on refactoring EST implementation into a separate EST module. Signed-off-by: Rohan G Thomas Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231201055252.1302-3-rohan.g.thomas@intel.com Signed-off-by: Jakub Kicinski commit 58f3240b3b93f880cae759ec2ff6ccfbf11903b7 Author: Rohan G Thomas Date: Fri Dec 1 13:52:50 2023 +0800 net: stmmac: xgmac: EST interrupts handling Enabled the following EST related interrupts: 1) Constant Gate Control Error (CGCE) 2) Head-of-Line Blocking due to Scheduling (HLBS) 3) Head-of-Line Blocking due to Frame Size (HLBF) 4) Base Time Register error (BTRE) 5) Switch to S/W owned list Complete (SWLC) Also, add EST errors into the ethtool statistic. The commit e49aa315cb01 ("net: stmmac: EST interrupts handling and error reporting") and commit 9f298959191b ("net: stmmac: Add EST errors into ethtool statistic") add EST interrupts handling and error reporting support to DWMAC4 core. This patch enables the same support for XGMAC. Signed-off-by: Rohan G Thomas Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231201055252.1302-2-rohan.g.thomas@intel.com Signed-off-by: Jakub Kicinski commit be5fc78a0084472dcc392cbea75f86202467437c Author: Ravi Gunasekaran Date: Fri Dec 1 18:50:33 2023 +0530 net: ethernet: ti: davinci_mdio: Update K3 SoCs list for errata i2329 The errata i2329 affects all the currently available silicon revisions of AM62x, AM64x, AM65x, J7200, J721E and J721S2. So remove the revision string from the SoC list. The silicon revisions affected by the errata i2329 can be found under the MDIO module in the "Advisories by Modules" section of each SoC errata document listed below AM62x: https://www.ti.com/lit/er/sprz487c/sprz487c.pdf AM64X: https://www.ti.com/lit/er/sprz457g/sprz457g.pdf AM65X: https://www.ti.com/lit/er/sprz452i/sprz452i.pdf J7200: https://www.ti.com/lit/er/sprz491d/sprz491d.pdf J721E: https://www.ti.com/lit/er/sprz455d/sprz455d.pdf J721S2: https://www.ti.com/lit/er/sprz530b/sprz530b.pdf Signed-off-by: Ravi Gunasekaran Reviewed-by: Nishanth Menon Link: https://lore.kernel.org/r/20231201132033.29576-1-r-gunasekaran@ti.com Signed-off-by: Jakub Kicinski commit 5edfd7d94b0310b74136b666551f1d23711ed445 Merge: a13fee31f5644 b719a9c15d52d Author: Dave Airlie Date: Tue Dec 5 12:11:41 2023 +1000 Merge tag 'amd-drm-next-6.8-2023-12-01' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-6.8-2023-12-01: amdgpu: - Add new 64 bit sequence number infrastructure. This will ultimately be used for user queue synchronization. - GPUVM updates - Misc code cleanups - RAS updates - DCN 3.5 updates - Rework PCIe link speed handling - Document GPU reset types - DMUB fixes - eDP fixes - NBIO 7.9 updates - NBIO 7.11 updates - SubVP updates - DCN 3.1.4 fixes - ABM fixes - AGP aperture fix - DCN 3.1.5 fix - Fix some potential error path memory leaks - Enable PCIe PMEs - Add XGMI, PCIe state dumping for aqua vanjaram - GFX11 golden register updates - Misc display fixes amdkfd: - Migrate TLB flushing logic to amdgpu - Trap handler fixes - Fix restore workers handling on suspend and reset - Fix possible memory leak in pqm_uninit() radeon: - Fix some possible overflows in command buffer checking - Check for errors in ring_lock From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20231201181743.5313-1-alexander.deucher@amd.com Signed-off-by: Dave Airlie commit a90d56049acc45802f67cd7d4c058ac45b1bc26f Merge: 3706f141e5639 e3b57ffdb3256 Author: Jakub Kicinski Date: Mon Dec 4 18:04:08 2023 -0800 Merge branch 'introduce-queue-and-napi-support-in-netdev-genl-was-introduce-napi-queues-support' Amritha Nambiar says: ==================== Introduce queue and NAPI support in netdev-genl (Was: Introduce NAPI queues support) Add the capability to export the following via netdev-genl interface: - queue information supported by the device - NAPI information supported by the device Introduce support for associating queue and NAPI instance. Extend the netdev_genl generic netlink family for netdev with queue and NAPI data. The queue parameters exposed are: - queue index - queue type - ifindex - NAPI id associated with the queue Additional rx and tx queue parameters can be exposed in follow up patches by stashing them in netdev queue structures. XDP queue type can also be supported in future. The NAPI fields exposed are: - NAPI id - NAPI device ifindex - Interrupt number associated with the NAPI instance - PID for the NAPI thread This series only supports 'get' ability for retrieving certain queue and NAPI attributes. The 'set' ability for configuring queue and associated NAPI instance via netdev-genl will be submitted as a separate patch series. Previous discussion at: https://lore.kernel.org/netdev/c8476530638a5f4381d64db0e024ed49c2db3b02.camel@gmail.com/T/#m00999652a8b4731fbdb7bf698d2e3666c65a60e7 $ ./cli.py --spec netdev.yaml --do queue-get --json='{"ifindex": 12, "id": 0, "type": 0}' {'id': 0, 'ifindex': 12, 'napi-id': 593, 'type': 'rx'} $ ./cli.py --spec netdev.yaml --do queue-get --json='{"ifindex": 12, "id": 0, "type": 1}' {'id': 0, 'ifindex': 12, 'napi-id': 593, 'type': 'tx'} $ ./cli.py --spec netdev.yaml --dump queue-get --json='{"ifindex": 12}' [{'id': 0, 'ifindex': 12, 'napi-id': 593, 'type': 'rx'}, {'id': 1, 'ifindex': 12, 'napi-id': 594, 'type': 'rx'}, {'id': 2, 'ifindex': 12, 'napi-id': 595, 'type': 'rx'}, {'id': 3, 'ifindex': 12, 'napi-id': 596, 'type': 'rx'}, {'id': 0, 'ifindex': 12, 'napi-id': 593, 'type': 'tx'}, {'id': 1, 'ifindex': 12, 'napi-id': 594, 'type': 'tx'}, {'id': 2, 'ifindex': 12, 'napi-id': 595, 'type': 'tx'}, {'id': 3, 'ifindex': 12, 'napi-id': 596, 'type': 'tx'}] $ ./cli.py --spec netdev.yaml --do napi-get --json='{"id": 593}' {'id': 593, 'ifindex': 12, 'irq': 291, 'pid': 3727} $ ./cli.py --spec netdev.yaml --dump napi-get --json='{"ifindex": 12}' [{'id': 596, 'ifindex': 12, 'irq': 294, 'pid': 3724}, {'id': 595, 'ifindex': 12, 'irq': 293, 'pid': 3725}, {'id': 594, 'ifindex': 12, 'irq': 292, 'pid': 3726}, {'id': 593, 'ifindex': 12, 'irq': 291, 'pid': 3727}] ==================== Link: https://lore.kernel.org/r/170147307026.5260.9300080745237900261.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit e3b57ffdb3256e4ff2cf83be0dc076c4b07f92b9 Author: Jakub Kicinski Date: Fri Dec 1 15:29:23 2023 -0800 eth: bnxt: link NAPI instances to queues and IRQs Make bnxt compatible with the newly added netlink queue GET APIs. Signed-off-by: Amritha Nambiar Reviewed-by: Michael Chan Link: https://lore.kernel.org/r/170147336340.5260.6773000274196548907.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit db4704f4e4dfce835e934609fca735a648ce26e8 Author: Amritha Nambiar Date: Fri Dec 1 15:29:18 2023 -0800 netdev-genl: Add PID for the NAPI thread In the threaded NAPI mode, expose the PID of the NAPI thread. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147335818.5260.10253384006102593087.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit 8481a249a0eaf0000dbb18f7689ccd50ea9835cd Author: Amritha Nambiar Date: Fri Dec 1 15:29:13 2023 -0800 netdev-genl: spec: Add PID in netdev netlink YAML spec Add support in netlink spec(netdev.yaml) for PID of the NAPI thread. Add code generated from the spec. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147335301.5260.11872351477120434501.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit 26793bfb5d6072326d1465343e7cbf6156abca4f Author: Amritha Nambiar Date: Fri Dec 1 15:29:07 2023 -0800 net: Add NAPI IRQ support Add support to associate the interrupt vector number for a NAPI instance. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147334728.5260.13221803396905901904.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit 5a5131d66fe02337de0b1b2e021b58f0f55c6df5 Author: Amritha Nambiar Date: Fri Dec 1 15:29:02 2023 -0800 netdev-genl: spec: Add irq in netdev netlink YAML spec Add support in netlink spec(netdev.yaml) for interrupt number among the NAPI attributes. Add code generated from the spec. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147334210.5260.18178387869057516983.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit 27f91aaf49b3a50e5a02ad5fa27b7c453d029a72 Author: Amritha Nambiar Date: Fri Dec 1 15:28:56 2023 -0800 netdev-genl: Add netlink framework functions for napi Implement the netdev netlink framework functions for napi support. The netdev structure tracks all the napi instances and napi fields. The napi instances and associated parameters can be retrieved this way. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147333637.5260.14807433239805550815.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit ff9991499fb53575c45eb92cd064bcd7141bb572 Author: Amritha Nambiar Date: Fri Dec 1 15:28:51 2023 -0800 netdev-genl: spec: Extend netdev netlink spec in YAML for NAPI Add support in netlink spec(netdev.yaml) for napi related information. Add code generated from the spec. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147333119.5260.7050639053080529108.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit 6b6171db7fc8f7a6d0f0f0acb7aff16cecf14f42 Author: Amritha Nambiar Date: Fri Dec 1 15:28:46 2023 -0800 netdev-genl: Add netlink framework functions for queue Implement the netdev netlink framework functions for exposing queue information. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147332603.5260.7982559672617639065.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit 91fdbce7e8d69be255b45bfeb52092629a50e267 Author: Amritha Nambiar Date: Fri Dec 1 15:28:40 2023 -0800 ice: Add support in the driver for associating queue with napi After the napi context is initialized, map the napi instance with the queue/queue-set on the corresponding irq line. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147332060.5260.13310934657151560599.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit 2a502ff0c4e42a739b5aa550c901bf3852795532 Author: Amritha Nambiar Date: Fri Dec 1 15:28:34 2023 -0800 net: Add queue and napi association Add the napi pointer in netdev queue for tracking the napi instance for each queue. This achieves the queue<->napi mapping. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147331483.5260.15723438819994285695.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit bc877956272f0521fef107838555817112a450dc Author: Amritha Nambiar Date: Fri Dec 1 15:28:29 2023 -0800 netdev-genl: spec: Extend netdev netlink spec in YAML for queue Add support in netlink spec(netdev.yaml) for queue information. Add code generated from the spec. Note: The "queue-type" attribute takes values 0 and 1 for rx and tx queue type respectively. Signed-off-by: Amritha Nambiar Reviewed-by: Sridhar Samudrala Link: https://lore.kernel.org/r/170147330963.5260.2576294626647300472.stgit@anambiarhost.jf.intel.com Signed-off-by: Jakub Kicinski commit ce3c49da11d77aa7d53cd549d308eb5f7fed8576 Merge: 153de60e8bfb4 e3dd40828534a Author: Alexei Starovoitov Date: Mon Dec 4 17:50:27 2023 -0800 Merge branch 'bpf-fix-the-release-of-inner-map' Hou Tao says: ==================== bpf: Fix the release of inner map From: Hou Tao Hi, The patchset aims to fix the release of inner map in map array or map htab. The release of inner map is different with normal map. For normal map, the map is released after the bpf program which uses the map is destroyed, because the bpf program tracks the used maps. However bpf program can not track the used inner map because these inner map may be updated or deleted dynamically, and for now the ref-counter of inner map is decreased after the inner map is remove from outer map, so the inner map may be freed before the bpf program, which is accessing the inner map, exits and there will be use-after-free problem as demonstrated by patch #6. The patchset fixes the problem by deferring the release of inner map. The freeing of inner map is deferred according to the sleepable attributes of the bpf programs which own the outer map. Patch #1 fixes the warning when running the newly-added selftest under interpreter mode. Patch #2 adds more parameters to .map_fd_put_ptr() to prepare for the fix. Patch #3 fixes the incorrect value of need_defer when freeing the fd array. Patch #4 fixes the potential use-after-free problem by using call_rcu_tasks_trace() and call_rcu() to wait for one tasks trace RCU GP and one RCU GP unconditionally. Patch #5 optimizes the free of inner map by removing the unnecessary RCU GP waiting. Patch #6 adds a selftest to demonstrate the potential use-after-free problem. Patch #7 updates a selftest to update outer map in syscall bpf program. Please see individual patches for more details. And comments are always welcome. Change Log: v5: * patch #3: rename fd_array_map_delete_elem_with_deferred_free() to __fd_array_map_delete_elem() (Alexei) * patch #5: use atomic64_t instead of atomic_t to prevent potential overflow (Alexei) * patch #7: use ptr_to_u64() helper instead of force casting to initialize pointers in bpf_attr (Alexei) v4: https://lore.kernel.org/bpf/20231130140120.1736235-1-houtao@huaweicloud.com * patch #2: don't use "deferred", use "need_defer" uniformly * patch #3: newly-added, fix the incorrect value of need_defer during fd array free. * patch #4: doesn't consider the case in which bpf map is not used by any bpf program and only use sleepable_refcnt to remove unnecessary tasks trace RCU GP (Alexei) * patch #4: remove memory barriers added due to cautiousness (Alexei) v3: https://lore.kernel.org/bpf/20231124113033.503338-1-houtao@huaweicloud.com * multiple variable renamings (Martin) * define BPF_MAP_RCU_GP/BPF_MAP_RCU_TT_GP as bit (Martin) * use call_rcu() and its variants instead of synchronize_rcu() (Martin) * remove unnecessary mask in bpf_map_free_deferred() (Martin) * place atomic_or() and the related smp_mb() together (Martin) * add patch #6 to demonstrate that updating outer map in syscall program is dead-lock free (Alexei) * update comments about the memory barrier in bpf_map_fd_put_ptr() * update commit message for patch #3 and #4 to describe more details v2: https://lore.kernel.org/bpf/20231113123324.3914612-1-houtao@huaweicloud.com * defer the invocation of ops->map_free() instead of bpf_map_put() (Martin) * update selftest to make it being reproducible under JIT mode (Martin) * remove unnecessary preparatory patches v1: https://lore.kernel.org/bpf/20231107140702.1891778-1-houtao@huaweicloud.com ==================== Link: https://lore.kernel.org/r/20231204140425.1480317-1-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit e3dd40828534a67931e0dd00fcd35846271fd4e8 Author: Hou Tao Date: Mon Dec 4 22:04:25 2023 +0800 selftests/bpf: Test outer map update operations in syscall program Syscall program is running with rcu_read_lock_trace being held, so if bpf_map_update_elem() or bpf_map_delete_elem() invokes synchronize_rcu_tasks_trace() when operating on an outer map, there will be dead-lock, so add a test to guarantee that it is dead-lock free. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231204140425.1480317-8-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 1624918be84a8bcc4f592e55635bc4fe4a96460a Author: Hou Tao Date: Mon Dec 4 22:04:24 2023 +0800 selftests/bpf: Add test cases for inner map Add test cases to test the race between the destroy of inner map due to map-in-map update and the access of inner map in bpf program. The following 4 combinations are added: (1) array map in map array + bpf program (2) array map in map array + sleepable bpf program (3) array map in map htab + bpf program (4) array map in map htab + sleepable bpf program Before applying the fixes, when running `./test_prog -a map_in_map`, the following error was reported: ================================================================== BUG: KASAN: slab-use-after-free in array_map_update_elem+0x48/0x3e0 Read of size 4 at addr ffff888114f33824 by task test_progs/1858 CPU: 1 PID: 1858 Comm: test_progs Tainted: G O 6.6.0+ #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) ...... Call Trace: dump_stack_lvl+0x4a/0x90 print_report+0xd2/0x620 kasan_report+0xd1/0x110 __asan_load4+0x81/0xa0 array_map_update_elem+0x48/0x3e0 bpf_prog_be94a9f26772f5b7_access_map_in_array+0xe6/0xf6 trace_call_bpf+0x1aa/0x580 kprobe_perf_func+0xdd/0x430 kprobe_dispatcher+0xa0/0xb0 kprobe_ftrace_handler+0x18b/0x2e0 0xffffffffc02280f7 RIP: 0010:__x64_sys_getpgid+0x1/0x30 ...... Allocated by task 1857: kasan_save_stack+0x26/0x50 kasan_set_track+0x25/0x40 kasan_save_alloc_info+0x1e/0x30 __kasan_kmalloc+0x98/0xa0 __kmalloc_node+0x6a/0x150 __bpf_map_area_alloc+0x141/0x170 bpf_map_area_alloc+0x10/0x20 array_map_alloc+0x11f/0x310 map_create+0x28a/0xb40 __sys_bpf+0x753/0x37c0 __x64_sys_bpf+0x44/0x60 do_syscall_64+0x36/0xb0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 Freed by task 11: kasan_save_stack+0x26/0x50 kasan_set_track+0x25/0x40 kasan_save_free_info+0x2b/0x50 __kasan_slab_free+0x113/0x190 slab_free_freelist_hook+0xd7/0x1e0 __kmem_cache_free+0x170/0x260 kfree+0x9b/0x160 kvfree+0x2d/0x40 bpf_map_area_free+0xe/0x20 array_map_free+0x120/0x2c0 bpf_map_free_deferred+0xd7/0x1e0 process_one_work+0x462/0x990 worker_thread+0x370/0x670 kthread+0x1b0/0x200 ret_from_fork+0x3a/0x70 ret_from_fork_asm+0x1b/0x30 Last potentially related work creation: kasan_save_stack+0x26/0x50 __kasan_record_aux_stack+0x94/0xb0 kasan_record_aux_stack_noalloc+0xb/0x20 __queue_work+0x331/0x950 queue_work_on+0x75/0x80 bpf_map_put+0xfa/0x160 bpf_map_fd_put_ptr+0xe/0x20 bpf_fd_array_map_update_elem+0x174/0x1b0 bpf_map_update_value+0x2b7/0x4a0 __sys_bpf+0x2551/0x37c0 __x64_sys_bpf+0x44/0x60 do_syscall_64+0x36/0xb0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231204140425.1480317-7-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit af66bfd3c8538ed21cf72af18426fc4a408665cf Author: Hou Tao Date: Mon Dec 4 22:04:23 2023 +0800 bpf: Optimize the free of inner map When removing the inner map from the outer map, the inner map will be freed after one RCU grace period and one RCU tasks trace grace period, so it is certain that the bpf program, which may access the inner map, has exited before the inner map is freed. However there is no need to wait for one RCU tasks trace grace period if the outer map is only accessed by non-sleepable program. So adding sleepable_refcnt in bpf_map and increasing sleepable_refcnt when adding the outer map into env->used_maps for sleepable program. Although the max number of bpf program is INT_MAX - 1, the number of bpf programs which are being loaded may be greater than INT_MAX, so using atomic64_t instead of atomic_t for sleepable_refcnt. When removing the inner map from the outer map, using sleepable_refcnt to decide whether or not a RCU tasks trace grace period is needed before freeing the inner map. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231204140425.1480317-6-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 876673364161da50eed6b472d746ef88242b2368 Author: Hou Tao Date: Mon Dec 4 22:04:22 2023 +0800 bpf: Defer the free of inner map when necessary When updating or deleting an inner map in map array or map htab, the map may still be accessed by non-sleepable program or sleepable program. However bpf_map_fd_put_ptr() decreases the ref-counter of the inner map directly through bpf_map_put(), if the ref-counter is the last one (which is true for most cases), the inner map will be freed by ops->map_free() in a kworker. But for now, most .map_free() callbacks don't use synchronize_rcu() or its variants to wait for the elapse of a RCU grace period, so after the invocation of ops->map_free completes, the bpf program which is accessing the inner map may incur use-after-free problem. Fix the free of inner map by invoking bpf_map_free_deferred() after both one RCU grace period and one tasks trace RCU grace period if the inner map has been removed from the outer map before. The deferment is accomplished by using call_rcu() or call_rcu_tasks_trace() when releasing the last ref-counter of bpf map. The newly-added rcu_head field in bpf_map shares the same storage space with work field to reduce the size of bpf_map. Fixes: bba1dc0b55ac ("bpf: Remove redundant synchronize_rcu.") Fixes: 638e4b825d52 ("bpf: Allows per-cpu maps and map-in-map in sleepable programs") Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231204140425.1480317-5-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 79d93b3c6ffd79abcd8e43345980aa1e904879c4 Author: Hou Tao Date: Mon Dec 4 22:04:21 2023 +0800 bpf: Set need_defer as false when clearing fd array during map free Both map deletion operation, map release and map free operation use fd_array_map_delete_elem() to remove the element from fd array and need_defer is always true in fd_array_map_delete_elem(). For the map deletion operation and map release operation, need_defer=true is necessary, because the bpf program, which accesses the element in fd array, may still alive. However for map free operation, it is certain that the bpf program which owns the fd array has already been exited, so setting need_defer as false is appropriate for map free operation. So fix it by adding need_defer parameter to bpf_fd_array_map_clear() and adding a new helper __fd_array_map_delete_elem() to handle the map deletion, map release and map free operations correspondingly. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231204140425.1480317-4-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 20c20bd11a0702ce4dc9300c3da58acf551d9725 Author: Hou Tao Date: Mon Dec 4 22:04:20 2023 +0800 bpf: Add map and need_defer parameters to .map_fd_put_ptr() map is the pointer of outer map, and need_defer needs some explanation. need_defer tells the implementation to defer the reference release of the passed element and ensure that the element is still alive before the bpf program, which may manipulate it, exits. The following three cases will invoke map_fd_put_ptr() and different need_defer values will be passed to these callers: 1) release the reference of the old element in the map during map update or map deletion. The release must be deferred, otherwise the bpf program may incur use-after-free problem, so need_defer needs to be true. 2) release the reference of the to-be-added element in the error path of map update. The to-be-added element is not visible to any bpf program, so it is OK to pass false for need_defer parameter. 3) release the references of all elements in the map during map release. Any bpf program which has access to the map must have been exited and released, so need_defer=false will be OK. These two parameters will be used by the following patches to fix the potential use-after-free problem for map-in-map. Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231204140425.1480317-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 169410eba271afc9f0fb476d996795aa26770c6d Author: Hou Tao Date: Mon Dec 4 22:04:19 2023 +0800 bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers These three bpf_map_{lookup,update,delete}_elem() helpers are also available for sleepable bpf program, so add the corresponding lock assertion for sleepable bpf program, otherwise the following warning will be reported when a sleepable bpf program manipulates bpf map under interpreter mode (aka bpf_jit_enable=0): WARNING: CPU: 3 PID: 4985 at kernel/bpf/helpers.c:40 ...... CPU: 3 PID: 4985 Comm: test_progs Not tainted 6.6.0+ #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) ...... RIP: 0010:bpf_map_lookup_elem+0x54/0x60 ...... Call Trace: ? __warn+0xa5/0x240 ? bpf_map_lookup_elem+0x54/0x60 ? report_bug+0x1ba/0x1f0 ? handle_bug+0x40/0x80 ? exc_invalid_op+0x18/0x50 ? asm_exc_invalid_op+0x1b/0x20 ? __pfx_bpf_map_lookup_elem+0x10/0x10 ? rcu_lockdep_current_cpu_online+0x65/0xb0 ? rcu_is_watching+0x23/0x50 ? bpf_map_lookup_elem+0x54/0x60 ? __pfx_bpf_map_lookup_elem+0x10/0x10 ___bpf_prog_run+0x513/0x3b70 __bpf_prog_run32+0x9d/0xd0 ? __bpf_prog_enter_sleepable_recur+0xad/0x120 ? __bpf_prog_enter_sleepable_recur+0x3e/0x120 bpf_trampoline_6442580665+0x4d/0x1000 __x64_sys_getpgid+0x5/0x30 ? do_syscall_64+0x36/0xb0 entry_SYSCALL_64_after_hwframe+0x6e/0x76 Signed-off-by: Hou Tao Link: https://lore.kernel.org/r/20231204140425.1480317-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 4bc736f890cec126246a1d65d3b556763670a8d4 Author: Danilo Krummrich Date: Wed Nov 29 23:08:01 2023 +0100 drm/imagination: vm: make use of GPUVM's drm_exec helper Make use of GPUVM's drm_exec helper functions preventing direct access to GPUVM internal data structures, such as the external object list. This is especially important to ensure following the locking rules around the GPUVM external object list. Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Reviewed-by: Donald Robson Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231129220835.297885-3-dakr@redhat.com commit e759f2ca29d918d3db57a61cdf838025beb03465 Author: Danilo Krummrich Date: Wed Nov 29 23:08:00 2023 +0100 drm/gpuvm: fall back to drm_exec_lock_obj() Fall back to drm_exec_lock_obj() if num_fences is zero for the drm_gpuvm_prepare_* function family. Otherwise dma_resv_reserve_fences() would actually allocate slots even though num_fences is zero. Cc: Christian König Acked-by: Donald Robson Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231129220835.297885-2-dakr@redhat.com commit aca90eea8a90b1abc844504109b6f919dfbd4259 Author: Jaegeuk Kim Date: Sat Dec 2 11:15:41 2023 -0800 f2fs: check write pointers when checkpoint=disable Even if f2fs was rebooted as staying checkpoint=disable, let's match the write pointers all the time. Reviewed-by: Daeho Jeong Signed-off-by: Jaegeuk Kim commit 9dad4d964291295ef48243d4e03972b85138bc9f Author: Jaegeuk Kim Date: Sat Dec 2 00:08:57 2023 -0800 f2fs: fix write pointers on zoned device after roll forward 1. do roll forward recovery 2. update current segments pointers 3. fix the entire zones' write pointers 4. do checkpoint Reviewed-by: Daeho Jeong Signed-off-by: Jaegeuk Kim commit 15a76c8014f932af7db38ae267ae0e3e4d089d9e Author: Jaegeuk Kim Date: Fri Dec 1 17:18:56 2023 -0800 f2fs: allocate new section if it's not new If fsck can allocate a new zone, it'd be better to use that instead of allocating a new one. And, it modifies kernel messages. Reviewed-by: Daeho Jeong Signed-off-by: Jaegeuk Kim commit a55c8ff252d374acb6f78b979cadc38073ce95e8 Author: Dmitry Baryshkov Date: Sun Dec 3 01:42:47 2023 +0300 drm/msm/mdss: Handle the reg bus ICC path Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there's another path that needs to be handled to ensure MDSS functions properly, namely the "reg bus", a.k.a the CPU-MDSS interconnect. Gating that path may have a variety of effects, from none to otherwise inexplicable DSI timeouts. Provide a way for MDSS driver to vote on this bus. A note regarding vote values. Newer platforms have corresponding bandwidth values in the vendor DT files. For the older platforms there was a static vote in the mdss_mdp and rotator drivers. I choose to be conservative here and choose this value as a default. Co-developed-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/570164/ Link: https://lore.kernel.org/r/20231202224247.1282567-5-dmitry.baryshkov@linaro.org commit 7323694e118a24ab954d3a16fe59a68b311cb462 Author: Dmitry Baryshkov Date: Sun Dec 3 01:42:46 2023 +0300 drm/msm/mdss: inline msm_mdss_icc_request_bw() There are just two places where we set the bandwidth: in the resume and in the suspend paths. Drop the wrapping function msm_mdss_icc_request_bw() and call icc_set_bw() directly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/570168/ Link: https://lore.kernel.org/r/20231202224247.1282567-4-dmitry.baryshkov@linaro.org commit fabaf176322d687b91a4acf1630c0d0a7d097faa Author: Konrad Dybcio Date: Sun Dec 3 01:42:45 2023 +0300 drm/msm/mdss: Rename path references to mdp_path The DPU1 driver needs to handle all MDPn<->DDR paths, as well as CPU<->SLAVE_DISPLAY_CFG. The former ones share how their values are calculated, but the latter one has static predefines spanning all SoCs. In preparation for supporting the CPU<->SLAVE_DISPLAY_CFG path, rename the path-related struct members to include "mdp_". Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/570163/ Link: https://lore.kernel.org/r/20231202224247.1282567-3-dmitry.baryshkov@linaro.org commit ded61d7dc5a0f8cfe7390aba33187c862d09b177 Author: Dmitry Baryshkov Date: Sun Dec 3 01:42:44 2023 +0300 drm/msm/mdss: switch mdss to use devm_of_icc_get() Stop using hand-written reset function for ICC release, use devm_of_icc_get() instead. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/570161/ Link: https://lore.kernel.org/r/20231202224247.1282567-2-dmitry.baryshkov@linaro.org commit d03a7005d9688bed5f20ab1b6ec9601455d98ef5 Author: Lukas Funke Date: Wed Nov 22 09:07:48 2023 +0100 extcon: usbc-tusb320: Set interrupt polarity based on device-tree Remove 'IRQF_TRIGGER_FALLING' request which is not allowed on every interrupt controller (i.e. arm64 GIC). Replace flag by a request that depends on the actual device-tree setting. Link: https://lore.kernel.org/all/02a701da2717$48abf150$da03d3f0$@samsung.com/ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311221355.yxYpTIw3-lkp@intel.com/ Signed-off-by: Lukas Funke Signed-off-by: Chanwoo Choi commit fec254cc752d0449714c026f021d3043abda15e5 Author: Neil Armstrong Date: Mon Oct 30 11:36:30 2023 +0100 drm/msm: dsi: add support for DSI 2.8.0 Add DSI Controller version 2.8.0 support for the SM8650 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/564977/ Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-mdss-v2-8-43f1887c82b8@linaro.org Signed-off-by: Dmitry Baryshkov commit 3a73e376cff31c6cbc99f0e44068db3a769684d8 Author: Neil Armstrong Date: Mon Oct 30 11:36:29 2023 +0100 drm/msm: dsi: add support for DSI-PHY on SM8650 Add DSI PHY support for the SM8650 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/564976/ Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-mdss-v2-7-43f1887c82b8@linaro.org Signed-off-by: Dmitry Baryshkov commit e6488c2a354103b6a3212f2fffa854e235d8a80e Author: Neil Armstrong Date: Mon Oct 30 11:36:28 2023 +0100 drm/msm: mdss: add support for SM8650 Add Mobile Display Subsystem (MDSS) support for the SM8650 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/564980/ Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-mdss-v2-6-43f1887c82b8@linaro.org Signed-off-by: Dmitry Baryshkov commit b94747f7d8c77e1b261afba8b8cdc9a56e35c9a3 Author: Neil Armstrong Date: Mon Oct 30 11:36:27 2023 +0100 drm/msm/dpu: add support for SM8650 DPU Add DPU version 10.0 support for the SM8650 platform. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/564975/ Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-mdss-v2-5-43f1887c82b8@linaro.org Signed-off-by: Dmitry Baryshkov commit cbcef056fa40e7e00f470e5d0873a906d0170470 Author: Neil Armstrong Date: Mon Oct 30 11:36:26 2023 +0100 dt-bindings: display: msm: document the SM8650 Mobile Display Subsystem Document the Mobile Display Subsystem (MDSS) on the SM8650 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/564982/ Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-mdss-v2-4-43f1887c82b8@linaro.org Signed-off-by: Dmitry Baryshkov commit 3e135a7700f9d3a2a606d01934c53315fcedf5ac Author: Neil Armstrong Date: Mon Oct 30 11:36:25 2023 +0100 dt-bindings: display: msm: document the SM8650 DPU Document the DPU Display Controller on the SM8650 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/564974/ Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-mdss-v2-3-43f1887c82b8@linaro.org Signed-off-by: Dmitry Baryshkov commit 8adc26fcebaedd6d9a61d7f17793569a90669142 Author: Neil Armstrong Date: Mon Oct 30 11:36:24 2023 +0100 dt-bindings: display: msm-dsi-controller-main: document the SM8650 DSI Controller Document the DSI Controller on the SM8650 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/564972/ Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-mdss-v2-2-43f1887c82b8@linaro.org Signed-off-by: Dmitry Baryshkov commit 0014a4ad6c084dd3af972d44f2b0d0146b65760d Author: Neil Armstrong Date: Mon Oct 30 11:36:23 2023 +0100 dt-bindings: display: msm-dsi-phy-7nm: document the SM8650 DSI PHY Document the DSI PHY on the SM8650 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Patchwork: https://patchwork.freedesktop.org/patch/564970/ Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-mdss-v2-1-43f1887c82b8@linaro.org Signed-off-by: Dmitry Baryshkov commit e140b7e496b73c116454b0a0265bec4cacc9ca40 Author: Richard Acayan Date: Mon Oct 16 22:18:12 2023 -0400 drm/msm/dpu: Add hw revision 4.1 (SDM670) The Snapdragon 670 uses similar clocks (with one frequency added) to the Snapdragon 845 but reports DPU revision 4.1. Add support for this DPU with configuration from the Pixel 3a downstream kernel. Since revision 4.0 is SDM845, reuse some configuration from its catalog entry. Link: https://android.googlesource.com/kernel/msm/+/368478b0ae76566927a2769a2bf24dfe7f38bb78/arch/arm64/boot/dts/qcom/sdm670-sde.dtsi Signed-off-by: Richard Acayan Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/562965/ Link: https://lore.kernel.org/r/20231017021805.1083350-14-mailingradian@gmail.com Signed-off-by: Dmitry Baryshkov commit 3c13a56e435348ffc094ff5a3b3133311673390e Author: Richard Acayan Date: Mon Oct 16 22:18:11 2023 -0400 drm/msm: mdss: add support for SDM670 Add support for the MDSS block on the SDM670 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Richard Acayan Patchwork: https://patchwork.freedesktop.org/patch/562963/ Link: https://lore.kernel.org/r/20231017021805.1083350-13-mailingradian@gmail.com Signed-off-by: Dmitry Baryshkov commit c965007970ed918203a375e55bca874956c67d68 Author: Richard Acayan Date: Mon Oct 16 22:18:10 2023 -0400 dt-bindings: display: msm: Add SDM670 MDSS Add documentation for the SDM670 display subsystem, adapted from the SDM845 and SM6125 documentation. Reviewed-by: Rob Herring Signed-off-by: Richard Acayan Patchwork: https://patchwork.freedesktop.org/patch/562961/ Link: https://lore.kernel.org/r/20231017021805.1083350-12-mailingradian@gmail.com Signed-off-by: Dmitry Baryshkov commit 0e1af3ec823bdb99007aedffa41e711573378839 Author: Richard Acayan Date: Mon Oct 16 22:18:09 2023 -0400 dt-bindings: display/msm: sdm845-dpu: Describe SDM670 The SDM670 display controller has the same requirements as the SDM845 display controller, despite having distinct properties as described in the catalog. Add the compatible for SDM670 to the SDM845 controller. Acked-by: Rob Herring Signed-off-by: Richard Acayan Patchwork: https://patchwork.freedesktop.org/patch/562959/ Link: https://lore.kernel.org/r/20231017021805.1083350-11-mailingradian@gmail.com Signed-off-by: Dmitry Baryshkov commit bf5a806953118e02accfcaa6f56b1c8b488a0396 Author: Richard Acayan Date: Mon Oct 16 22:18:08 2023 -0400 dt-bindings: display/msm: dsi-controller-main: add SDM670 compatible The SDM670 has DSI ports. Add the compatible for the controller. Acked-by: Rob Herring Signed-off-by: Richard Acayan Patchwork: https://patchwork.freedesktop.org/patch/562958/ Link: https://lore.kernel.org/r/20231017021805.1083350-10-mailingradian@gmail.com Signed-off-by: Dmitry Baryshkov commit 223fb06fbc26e42f9cdf0ca80fb575916548d74b Author: Dmitry Baryshkov Date: Sat Dec 2 01:40:34 2023 +0200 drm/msm/gpu: drop duplicating VIG feature masks After folding QSEED3LITE and QSEED4 feature bits into QSEED3_COMPATIBLE several VIG feature masks became equal. Drop these duplicates. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/570107/ Link: https://lore.kernel.org/r/20231201234234.2065610-11-dmitry.baryshkov@linaro.org commit 193838acc1111a7001c9fc99af0a248f284ea79d Author: Dmitry Baryshkov Date: Sat Dec 2 01:40:33 2023 +0200 drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4 Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these three feature bits into QSEED3_COMPATIBLE bin. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/570114/ Link: https://lore.kernel.org/r/20231201234234.2065610-10-dmitry.baryshkov@linaro.org commit 2b98aa1d65581a34919ac159cbdc9c2a1b37a258 Author: Dmitry Baryshkov Date: Sat Dec 2 01:40:32 2023 +0200 drm/msm/dpu: rewrite scaler and CSC presense checks In order to check whether the SSPP block has scaler and CSC subblocks the funcion dpu_plane_atomic_check_pipe() uses macros which enumerate all possible scaler and CSC features. Replace those checks with the scaler and CSC subblock length checks in order to be able to drop those two macros. Suggested-by: Abhinav Kumar Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570113/ Link: https://lore.kernel.org/r/20231201234234.2065610-9-dmitry.baryshkov@linaro.org commit aa83fa5bf6c78f77873954e757a2fd2dd1018c30 Author: Dmitry Baryshkov Date: Sat Dec 2 01:40:31 2023 +0200 drm/msm/dpu: drop DPU_HW_SUBBLK_INFO macro As the subblock info is now mostly gone, inline and drop the macro DPU_HW_SUBBLK_INFO. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570106/ Link: https://lore.kernel.org/r/20231201234234.2065610-8-dmitry.baryshkov@linaro.org commit 0fd205412e1ee1f60f549269838119969f0883ad Author: Dmitry Baryshkov Date: Sat Dec 2 01:40:30 2023 +0200 drm/msm/dpu: deduplicate some (most) of SSPP sub-blocks As we have dropped the variadic parts of SSPP sub-blocks declarations, deduplicate them now, reducing memory cruft. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570112/ Link: https://lore.kernel.org/r/20231201234234.2065610-7-dmitry.baryshkov@linaro.org commit 01fc6c012fad314290af5cc9a8de3fb612ca67c4 Author: Dmitry Baryshkov Date: Sat Dec 2 01:40:29 2023 +0200 drm/msm/dpu: drop the `smart_dma_priority' field from struct dpu_sspp_sub_blks In preparation to deduplicating SSPP subblocks, drop the (unused) `smart_dma_priority' field from struct dpu_sspp_sub_blks. If it is needed later (e.g. for SmartDMA v1), it should be added to the SSPP declarations themselves. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570103/ Link: https://lore.kernel.org/r/20231201234234.2065610-6-dmitry.baryshkov@linaro.org commit 6876059d7edfcce3d8946f5a49d65ba9b38b1bab Author: Dmitry Baryshkov Date: Sat Dec 2 01:40:28 2023 +0200 drm/msm/dpu: drop the `id' field from DPU_HW_SUBBLK_INFO The field `id' is not used for subblocks. The handling code usually knows, which sub-block it is now looking at. Drop the field completely. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570100/ Link: https://lore.kernel.org/r/20231201234234.2065610-5-dmitry.baryshkov@linaro.org commit 88fc981f8ef232848fb60f77660a27826ea518ef Author: Marijn Suijten Date: Sat Dec 2 01:40:27 2023 +0200 drm/msm/dpu: Drop unused qseed_type from catalog dpu_caps The SSPP scaler subblk is responsible for reporting its version (via the .id field, feature bits on the parent SSPP block, and since recently also from reading a register to supersede a read-but-unset version field in the catalog), leaving this global qseed_type field logically unused. Remove this dead code to lighten the catalog and bringup-overhead. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570109/ Link: https://lore.kernel.org/r/20231201234234.2065610-4-dmitry.baryshkov@linaro.org commit 07b852c91cbe2c9985d218ab7e2dd1ba51beb9e6 Author: Marijn Suijten Date: Sat Dec 2 01:40:26 2023 +0200 drm/msm/dpu: Drop unused get_scaler_ver callback from SSPP This pointer callback is never used and should be removed. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov [DB: dropped the helpers completely, which are unused now] Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570096/ Link: https://lore.kernel.org/r/20231201234234.2065610-3-dmitry.baryshkov@linaro.org commit 46b1f1b839cad600de3ad7ed999bd0155c528746 Author: Dmitry Baryshkov Date: Sat Dec 2 01:40:25 2023 +0200 drm/msm/dpu: populate SSPP scaler block version The function _dpu_hw_sspp_setup_scaler3() passes and dpu_hw_setup_scaler3() uses scaler_blk.version to determine in which way the scaler (QSEED3) block should be programmed. However up to now we were not setting this field. Set it now, splitting the vig_sblk data which has different version fields. Reported-by: Marijn Suijten Fixes: 9b6f4fedaac2 ("drm/msm/dpu: Add SM6125 support") Fixes: 27f0df03f3ff ("drm/msm/dpu: Add SM6375 support") Fixes: 3186acba5cdc ("drm/msm/dpu: Add SM6350 support") Fixes: efcd0107727c ("drm/msm/dpu: add support for SM8550") Fixes: 4a352c2fc15a ("drm/msm/dpu: Introduce SC8280XP") Fixes: 0e91bcbb0016 ("drm/msm/dpu: Add SM8350 to hw catalog") Fixes: 100d7ef6995d ("drm/msm/dpu: add support for SM8450") Fixes: 3581b7062cec ("drm/msm/disp/dpu1: add support for display on SM6115") Fixes: dabfdd89eaa9 ("drm/msm/disp/dpu1: add inline rotation support for sc7280") Fixes: f3af2d6ee9ab ("drm/msm/dpu: Add SC8180x to hw catalog") Fixes: 94391a14fc27 ("drm/msm/dpu1: Add MSM8998 to hw catalog") Fixes: af776a3e1c30 ("drm/msm/dpu: add SM8250 to hw catalog") Fixes: 386fced3f76f ("drm/msm/dpu: add SM8150 to hw catalog") Fixes: b75ab05a3479 ("msm:disp:dpu1: add scaler support on SC7180 display") Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570098/ Link: https://lore.kernel.org/r/20231201234234.2065610-2-dmitry.baryshkov@linaro.org commit 7710e2cca32e7f3958480e8bd44f50e29d0c2509 Author: Carlos Llamas Date: Fri Dec 1 17:21:57 2023 +0000 binder: switch alloc->mutex to spinlock_t The alloc->mutex is a highly contended lock that causes performance issues on Android devices. When a low-priority task is given this lock and it sleeps, it becomes difficult for the task to wake up and complete its work. This delays other tasks that are also waiting on the mutex. The problem gets worse when there is memory pressure in the system, because this increases the contention on the alloc->mutex while the shrinker reclaims binder pages. Switching to a spinlock helps to keep the waiters running and avoids the overhead of waking up tasks. This significantly improves the transaction latency when the problematic scenario occurs. The performance impact of this patchset was measured by stress-testing the binder alloc contention. In this test, several clients of different priorities send thousands of transactions of different sizes to a single server. In parallel, pages get reclaimed using the shinker's debugfs. The test was run on a Pixel 8, Pixel 6 and qemu machine. The results were similar on all three devices: after: | sched | prio | average | max | min | |--------+------+---------+-----------+---------| | fifo | 99 | 0.135ms | 1.197ms | 0.022ms | | fifo | 01 | 0.136ms | 5.232ms | 0.018ms | | other | -20 | 0.180ms | 7.403ms | 0.019ms | | other | 19 | 0.241ms | 58.094ms | 0.018ms | before: | sched | prio | average | max | min | |--------+------+---------+-----------+---------| | fifo | 99 | 0.350ms | 248.730ms | 0.020ms | | fifo | 01 | 0.357ms | 248.817ms | 0.024ms | | other | -20 | 0.399ms | 249.906ms | 0.020ms | | other | 19 | 0.477ms | 297.756ms | 0.022ms | The key metrics above are the average and max latencies (wall time). These improvements should roughly translate to p95-p99 latencies on real workloads. The response time is up to 200x faster in these scenarios and there is no penalty in the regular path. Note that it is only possible to convert this lock after a series of changes made by previous patches. These mainly include refactoring the sections that might_sleep() and changing the locking order with the mmap_lock amongst others. Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-29-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit e50f4e6cc9bfaca655d3b6a3506d27cf2caa1d40 Author: Carlos Llamas Date: Fri Dec 1 17:21:56 2023 +0000 binder: reverse locking order in shrinker callback The locking order currently requires the alloc->mutex to be acquired first followed by the mmap lock. However, the alloc->mutex is converted into a spinlock in subsequent commits so the order needs to be reversed to avoid nesting the sleeping mmap lock under the spinlock. The shrinker's callback binder_alloc_free_page() is the only place that needs to be reordered since other functions have been refactored and no longer nest these locks. Some minor cosmetic changes are also included in this patch. Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-28-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 162c79731448a5a052e93af7753df579dfe0bf7a Author: Carlos Llamas Date: Fri Dec 1 17:21:55 2023 +0000 binder: avoid user addresses in debug logs Prefer logging vma offsets instead of addresses or simply drop the debug log altogether if not useful. Note this covers the instances affected by the switch to store addresses as unsigned long. However, there are other sections in the driver that could do the same. Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-27-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit f07b83a48e944c8a1cc1e9f6703fae5e34df2ba4 Author: Carlos Llamas Date: Fri Dec 1 17:21:54 2023 +0000 binder: refactor binder_delete_free_buffer() Skip the freelist call immediately as needed, instead of continuing the pointless checks. Also, drop the debug logs that we don't really need. Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-26-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 8e905217c4543af9cf1754809846157a7dbbb261 Author: Carlos Llamas Date: Fri Dec 1 17:21:53 2023 +0000 binder: collapse print_binder_buffer() into caller The code in print_binder_buffer() is quite small so it can be collapsed into its single caller binder_alloc_print_allocated(). No functional change in this patch. Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-25-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 67dcc880780569ec40391cae4d8299adc1e7a44e Author: Carlos Llamas Date: Fri Dec 1 17:21:52 2023 +0000 binder: document the final page calculation The code to determine the page range for binder_lru_freelist_del() is quite obscure. It leverages the buffer_size calculated before doing an oversized buffer split. This is used to figure out if the last page is being shared with another active buffer. If so, the page gets trimmed out of the range as it has been previously removed from the freelist. This would be equivalent to getting the start page of the next in-use buffer explicitly. However, the code for this is much larger as we can see in binder_free_buf_locked() routine. Instead, lets settle on documenting the tricky step and using better names for now. I believe an ideal solution would be to count the binder_page->users to determine when a page should be added or removed from the freelist. However, this is a much bigger change than what I'm willing to risk at this time. Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-24-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit ea9cdbf0c7273b55e251b2ed8f85794cfadab5d5 Author: Carlos Llamas Date: Fri Dec 1 17:21:51 2023 +0000 binder: rename lru shrinker utilities Now that the page allocation step is done separately we should rename the binder_free_page_range() and binder_allocate_page_range() functions to provide a more accurate description of what they do. Lets borrow the freelist concept used in other parts of the kernel for this. No functional change here. Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-23-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit de0e6573125f8ea7a01a9b05a45b0c73116c73b2 Author: Carlos Llamas Date: Fri Dec 1 17:21:50 2023 +0000 binder: make oversized buffer code more readable The sections in binder_alloc_new_buf_locked() dealing with oversized buffers are scattered which makes them difficult to read. Instead, consolidate this code into a single block to improve readability. No functional change here. Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-22-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 258ce20ede33c551002705fa1488864fb287752c Author: Carlos Llamas Date: Fri Dec 1 17:21:49 2023 +0000 binder: remove redundant debug log The debug information in this statement is already logged earlier in the same function. We can get rid of this duplicate log. Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-21-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 37ebbb4f73a0d299fa0c7dd043932a2f5fbbb779 Author: Carlos Llamas Date: Fri Dec 1 17:21:48 2023 +0000 binder: perform page installation outside of locks Split out the insertion of pages to be outside of the alloc->mutex in a separate binder_install_buffer_pages() routine. Since this is no longer serialized, we must look at the full range of pages used by the buffers. The installation is protected with mmap_sem in write mode since multiple tasks might race to install the same page. Besides avoiding unnecessary nested locking this helps in preparation of switching the alloc->mutex into a spinlock_t in subsequent patches. Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-20-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 68aef12d094e4c96d972790f1620415460a4f3cf Author: Carlos Llamas Date: Fri Dec 1 17:21:47 2023 +0000 binder: initialize lru pages in mmap callback Rather than repeatedly initializing some of the binder_lru_page members during binder_alloc_new_buf(), perform this initialization just once in binder_alloc_mmap_handler(), after the pages have been created. Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-19-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit c7ac30fad18231a1637d38aa8a97d6b4788ed8ad Author: Carlos Llamas Date: Fri Dec 1 17:21:46 2023 +0000 binder: malloc new_buffer outside of locks Preallocate new_buffer before acquiring the alloc->mutex and hand it down to binder_alloc_new_buf_locked(). The new buffer will be used in the vast majority of requests (measured at 98.2% in field data). The buffer is discarded otherwise. This change is required in preparation for transitioning alloc->mutex into a spinlock in subsequent commits. Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-18-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit ea2735ce19c1c6ce0f6011f813a1eea0272c231d Author: Carlos Llamas Date: Fri Dec 1 17:21:45 2023 +0000 binder: refactor page range allocation Instead of looping through the page range twice to first determine if the mmap lock is required, simply do it per-page as needed. Split out all this logic into a separate binder_install_single_page() function. Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-17-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit cbc174a64b8d0ab542752c167dc1334b52b88624 Author: Carlos Llamas Date: Fri Dec 1 17:21:44 2023 +0000 binder: relocate binder_alloc_clear_buf() Move this function up along with binder_alloc_get_page() so that their prototypes aren't necessary. No functional change in this patch. Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-16-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit c13500eaabd2343aa4cbb76b54ec624cb0c0ef8d Author: Carlos Llamas Date: Fri Dec 1 17:21:43 2023 +0000 binder: relocate low space calculation Move the low async space calculation to debug_low_async_space_locked(). This logic not only fits better here but also offloads some of the many tasks currently done in binder_alloc_new_buf_locked(). No functional change in this patch. Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-15-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 9409af24e4503d14093b27db9425f7c99e64fef4 Author: Carlos Llamas Date: Fri Dec 1 17:21:42 2023 +0000 binder: separate the no-space debugging logic Move the no-space debugging logic into a separate function. Lets also mark this branch as unlikely in binder_alloc_new_buf_locked() as most requests will fit without issue. Also add a few cosmetic changes and suggestions from checkpatch. Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-14-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 89f71743bf42217dd4092fda703a8e4f6f4e55ac Author: Carlos Llamas Date: Fri Dec 1 17:21:41 2023 +0000 binder: remove pid param in binder_alloc_new_buf() Binder attributes the buffer allocation to the current->tgid everytime. There is no need to pass this as a parameter so drop it. Also add a few touchups to follow the coding guidelines. No functional changes are introduced in this patch. Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-13-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 377e1684db7a1e23261f3c3ebf76523c0554d512 Author: Carlos Llamas Date: Fri Dec 1 17:21:40 2023 +0000 binder: do unlocked work in binder_alloc_new_buf() Extract non-critical sections from binder_alloc_new_buf_locked() that don't require holding the alloc->mutex. While we are here, consolidate the checks for size overflow and zero-sized padding into a separate sanitized_size() helper function. Also add a few touchups to follow the coding guidelines. Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-12-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 0d35bf3bf2da8d43fd12fea7699dc936999bf96e Author: Carlos Llamas Date: Fri Dec 1 17:21:39 2023 +0000 binder: split up binder_update_page_range() The binder_update_page_range() function performs both allocation and freeing of binder pages. However, these two operations are unrelated and have no common logic. In fact, when a free operation is requested, the allocation logic is skipped entirely. This behavior makes the error path unnecessarily complex. To improve readability of the code, this patch splits the allocation and freeing operations into separate functions. No functional changes are introduced by this patch. Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-11-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit df9aabead791d7a3d59938abe288720f5c1367f7 Author: Carlos Llamas Date: Fri Dec 1 17:21:38 2023 +0000 binder: keep vma addresses type as unsigned long The vma addresses in binder are currently stored as void __user *. This requires casting back and forth between the mm/ api which uses unsigned long. Since we also do internal arithmetic on these addresses we end up having to cast them _again_ to an integer type. Lets stop all the unnecessary casting which kills code readability and store the virtual addresses as the native unsigned long from mm/. Note that this approach is preferred over uintptr_t as Linus explains in [1]. Opportunistically add a few cosmetic touchups. Link: https://lore.kernel.org/all/CAHk-=wj2OHy-5e+srG1fy+ZU00TmZ1NFp6kFLbVLMXHe7A1d-g@mail.gmail.com/ [1] Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-10-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit da483f8b390546fbe36abd72f58d612a8032e2a8 Author: Carlos Llamas Date: Fri Dec 1 17:21:37 2023 +0000 binder: remove extern from function prototypes The kernel coding style does not require 'extern' in function prototypes in .h files, so remove them from drivers/android/binder_alloc.h as they are not needed. No functional changes in this patch. Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-9-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit e1090371e02b601cbfcea175c2a6cc7c955fa830 Author: Carlos Llamas Date: Fri Dec 1 17:21:36 2023 +0000 binder: fix comment on binder_alloc_new_buf() return value Update the comments of binder_alloc_new_buf() to reflect that the return value of the function is now ERR_PTR(-errno) on failure. No functional changes in this patch. Cc: stable@vger.kernel.org Fixes: 57ada2fb2250 ("binder: add log information for binder transaction failures") Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-8-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 122a3c1cb0ff304c2b8934584fcfea4edb2fe5e3 Author: Carlos Llamas Date: Fri Dec 1 17:21:35 2023 +0000 binder: fix trivial typo of binder_free_buf_locked() Fix minor misspelling of the function in the comment section. No functional changes in this patch. Cc: stable@vger.kernel.org Fixes: 0f966cba95c7 ("binder: add flag to clear buffer on txn complete") Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-7-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit c6d05e0762ab276102246d24affd1e116a46aa0c Author: Carlos Llamas Date: Fri Dec 1 17:21:34 2023 +0000 binder: fix unused alloc->free_async_space Each transaction is associated with a 'struct binder_buffer' that stores the metadata about its buffer area. Since commit 74310e06be4d ("android: binder: Move buffer out of area shared with user space") this struct is no longer embedded within the buffer itself but is instead allocated on the heap to prevent userspace access to this driver-exclusive info. Unfortunately, the space of this struct is still being accounted for in the total buffer size calculation, specifically for async transactions. This results in an additional 104 bytes added to every async buffer request, and this area is never used. This wasted space can be substantial. If we consider the maximum mmap buffer space of SZ_4M, the driver will reserve half of it for async transactions, or 0x200000. This area should, in theory, accommodate up to 262,144 buffers of the minimum 8-byte size. However, after adding the extra 'sizeof(struct binder_buffer)', the total number of buffers drops to only 18,724, which is a sad 7.14% of the actual capacity. This patch fixes the buffer size calculation to enable the utilization of the entire async buffer space. This is expected to reduce the number of -ENOSPC errors that are seen on the field. Fixes: 74310e06be4d ("android: binder: Move buffer out of area shared with user space") Signed-off-by: Carlos Llamas Reviewed-by: Alice Ryhl Link: https://lore.kernel.org/r/20231201172212.1813387-6-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 3091c21d3e9322428691ce0b7a0cfa9c0b239eeb Author: Carlos Llamas Date: Fri Dec 1 17:21:33 2023 +0000 binder: fix async space check for 0-sized buffers Move the padding of 0-sized buffers to an earlier stage to account for this round up during the alloc->free_async_space check. Fixes: 74310e06be4d ("android: binder: Move buffer out of area shared with user space") Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-5-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 9a9ab0d963621d9d12199df9817e66982582d5a5 Author: Carlos Llamas Date: Fri Dec 1 17:21:32 2023 +0000 binder: fix race between mmput() and do_exit() Task A calls binder_update_page_range() to allocate and insert pages on a remote address space from Task B. For this, Task A pins the remote mm via mmget_not_zero() first. This can race with Task B do_exit() and the final mmput() refcount decrement will come from Task A. Task A | Task B ------------------+------------------ mmget_not_zero() | | do_exit() | exit_mm() | mmput() mmput() | exit_mmap() | remove_vma() | fput() | In this case, the work of ____fput() from Task B is queued up in Task A as TWA_RESUME. So in theory, Task A returns to userspace and the cleanup work gets executed. However, Task A instead sleep, waiting for a reply from Task B that never comes (it's dead). This means the binder_deferred_release() is blocked until an unrelated binder event forces Task A to go back to userspace. All the associated death notifications will also be delayed until then. In order to fix this use mmput_async() that will schedule the work in the corresponding mm->async_put_work WQ instead of Task A. Fixes: 457b9a6f09f0 ("Staging: android: add binder driver") Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-4-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 3f489c2067c5824528212b0fc18b28d51332d906 Author: Carlos Llamas Date: Fri Dec 1 17:21:31 2023 +0000 binder: fix use-after-free in shinker's callback The mmap read lock is used during the shrinker's callback, which means that using alloc->vma pointer isn't safe as it can race with munmap(). As of commit dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap") the mmap lock is downgraded after the vma has been isolated. I was able to reproduce this issue by manually adding some delays and triggering page reclaiming through the shrinker's debug sysfs. The following KASAN report confirms the UAF: ================================================================== BUG: KASAN: slab-use-after-free in zap_page_range_single+0x470/0x4b8 Read of size 8 at addr ffff356ed50e50f0 by task bash/478 CPU: 1 PID: 478 Comm: bash Not tainted 6.6.0-rc5-00055-g1c8b86a3799f-dirty #70 Hardware name: linux,dummy-virt (DT) Call trace: zap_page_range_single+0x470/0x4b8 binder_alloc_free_page+0x608/0xadc __list_lru_walk_one+0x130/0x3b0 list_lru_walk_node+0xc4/0x22c binder_shrink_scan+0x108/0x1dc shrinker_debugfs_scan_write+0x2b4/0x500 full_proxy_write+0xd4/0x140 vfs_write+0x1ac/0x758 ksys_write+0xf0/0x1dc __arm64_sys_write+0x6c/0x9c Allocated by task 492: kmem_cache_alloc+0x130/0x368 vm_area_alloc+0x2c/0x190 mmap_region+0x258/0x18bc do_mmap+0x694/0xa60 vm_mmap_pgoff+0x170/0x29c ksys_mmap_pgoff+0x290/0x3a0 __arm64_sys_mmap+0xcc/0x144 Freed by task 491: kmem_cache_free+0x17c/0x3c8 vm_area_free_rcu_cb+0x74/0x98 rcu_core+0xa38/0x26d4 rcu_core_si+0x10/0x1c __do_softirq+0x2fc/0xd24 Last potentially related work creation: __call_rcu_common.constprop.0+0x6c/0xba0 call_rcu+0x10/0x1c vm_area_free+0x18/0x24 remove_vma+0xe4/0x118 do_vmi_align_munmap.isra.0+0x718/0xb5c do_vmi_munmap+0xdc/0x1fc __vm_munmap+0x10c/0x278 __arm64_sys_munmap+0x58/0x7c Fix this issue by performing instead a vma_lookup() which will fail to find the vma that was isolated before the mmap lock downgrade. Note that this option has better performance than upgrading to a mmap write lock which would increase contention. Plus, mmap_write_trylock() has been recently removed anyway. Fixes: dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap") Cc: stable@vger.kernel.org Cc: Liam Howlett Cc: Minchan Kim Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-3-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit 6ac061db9c58ca5b9270b1b3940d2464fb3ff183 Author: Carlos Llamas Date: Fri Dec 1 17:21:30 2023 +0000 binder: use EPOLLERR from eventpoll.h Use EPOLLERR instead of POLLERR to make sure it is cast to the correct __poll_t type. This fixes the following sparse issue: drivers/android/binder.c:5030:24: warning: incorrect type in return expression (different base types) drivers/android/binder.c:5030:24: expected restricted __poll_t drivers/android/binder.c:5030:24: got int Fixes: f88982679f54 ("binder: check for binder_thread allocation failure in binder_poll()") Cc: stable@vger.kernel.org Cc: Eric Biggers Reviewed-by: Alice Ryhl Signed-off-by: Carlos Llamas Link: https://lore.kernel.org/r/20231201172212.1813387-2-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman commit b7a2768a1cc3de8947b1fe4b1084de2f5464c606 Author: Guoqing Jiang Date: Sun Dec 3 17:26:55 2023 +0800 RDMA/siw: Call orq_get_current if possible Use orq_get_current() in siw_orq_empty(). Link: https://lore.kernel.org/r/20231203092655.28102-5-guoqing.jiang@linux.dev Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Signed-off-by: Jason Gunthorpe commit 0b988c1bee28b48f7e4f264ff17d0d3e8817aa69 Author: Guoqing Jiang Date: Sun Dec 3 17:26:54 2023 +0800 RDMA/siw: Set qp_state in siw_query_qp Run test_query_rc_qp against siw failed since siw didn't set qp_state accordingly. To address it, introduce siw_qp_state_to_ib_qp_state which convert SIW_QP_STATE_IDLE to IB_QPS_INIT which is similar as in cxgb4. rdma-core# ./build/bin/run_tests.py --dev siw0 tests.test_qp.QPTest.test_query_rc_qp -v test_query_rc_qp (tests.test_qp.QPTest) Queries an RC QP after creation. Verifies that its properties are as ... FAIL ====================================================================== FAIL: test_query_rc_qp (tests.test_qp.QPTest) Queries an RC QP after creation. Verifies that its properties are as ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/gjiang/rdma-core/tests/test_qp.py", line 284, in test_query_rc_qp self.query_qp_common_test(e.IBV_QPT_RC) File "/home/gjiang/rdma-core/tests/test_qp.py", line 265, in query_qp_common_test self.verify_qp_attrs(caps, e.IBV_QPS_INIT, qp_init_attr, qp_attr) File "/home/gjiang/rdma-core/tests/test_qp.py", line 239, in verify_qp_attrs self.assertEqual(state, attr.qp_state) AssertionError: != 0 ---------------------------------------------------------------------- Ran 1 test in 0.057s FAILED (failures=1) Link: https://lore.kernel.org/r/20231203092655.28102-4-guoqing.jiang@linux.dev Signed-off-by: Guoqing Jiang Acked-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit 51ac45a6636221d94e0b840cb8dd3d08b3622d64 Author: Guoqing Jiang Date: Sun Dec 3 17:26:53 2023 +0800 RDMA/siw: Reduce memory usage of struct siw_rx_stream We can reduce the memory of the struct by move some of it's member. Before, /* size: 144, cachelines: 3, members: 17 */ /* sum members: 124, holes: 3, sum holes: 12 */ /* sum bitfield members: 7 bits (0 bytes) */ /* padding: 7 */ /* bit_padding: 1 bits */ After /* size: 128, cachelines: 2, members: 17 */ /* padding: 3 */ /* bit_padding: 1 bits */ Link: https://lore.kernel.org/r/20231203092655.28102-3-guoqing.jiang@linux.dev Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Signed-off-by: Jason Gunthorpe commit 84de14baf81675a98dc0fe617a93eacf9a417de3 Author: Guoqing Jiang Date: Sun Dec 3 17:26:52 2023 +0800 RDMA/siw: Move tx_cpu ahead We can reduce one cacheline for the usage of struct siw_qp. Before, /* size: 1928, cachelines: 31, members: 38 */ /* sum members: 1920, holes: 2, sum holes: 8 */ /* paddings: 4, sum paddings: 13 */ /* forced alignments: 3 */ after /* size: 1920, cachelines: 30, members: 38 */ /* paddings: 4, sum paddings: 13 */ /* forced alignments: 3 */ Link: https://lore.kernel.org/r/20231203092655.28102-2-guoqing.jiang@linux.dev Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Signed-off-by: Jason Gunthorpe commit be587cb5293ec9eb228f529d46f5dd2c55b1512c Merge: b85ea95d08647 5f9e29b9159a4 Author: Stephen Boyd Date: Mon Dec 4 15:59:50 2023 -0800 Merge tag 'renesas-clk-for-v6.8-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 EtherNet TSN and PCIe clocks on the Renesas R-Car V4H SoC - Reuse reset functionality in the Renesas RZ/G2L clock driver * tag 'renesas-clk-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rzg2l-cpg: Reuse code in rzg2l_cpg_reset() clk: renesas: r8a779g0: Add PCIe clocks clk: renesas: r8a779g0: Add EtherTSN clock commit 3706f141e5639d3034bd83448e929b8462362651 Merge: 91051f0039484 2012a6abc8765 Author: Jakub Kicinski Date: Mon Dec 4 15:12:50 2023 -0800 Merge branch 'bnxt_en-support-new-5760x-p7-devices' Michael Chan says: ==================== bnxt_en: Support new 5760X P7 devices This series completes the basic support for the new 5760X P7 devices with new PCI IDs added in the last patch. Thie first patch fixes a backing store issue introduced in the last patchset last week. The 2nd patch is the new firmware interface required to support the new chips. The next few patches are doorbell changes, refactoring, and new hardware interface structures. New changes to support packet reception including TPA are added in patch 10. The next 4 patches are ethernet link related changes to support the new chip. ==================== Link: https://lore.kernel.org/r/20231201223924.26955-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 2012a6abc87657c6c8171bb5ff13dd9bafb241bf Author: Michael Chan Date: Fri Dec 1 14:39:24 2023 -0800 bnxt_en: Add 5760X (P7) PCI IDs Now with basic support for the new chip family, add the PCI IDs of the new devices. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-16-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 047a2d38e40cf37d75548554d6811cb2a305faae Author: Michael Chan Date: Fri Dec 1 14:39:23 2023 -0800 bnxt_en: Report the new ethtool link modes in the new firmware interface Add new look up entries to convert the new supported speeds, advertised speeds, etc to ethtool link modes. Reviewed-by: Damodharam Ammepalli Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-15-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 7b60cf2b641a0de8117714dd6653e19a05ab4fda Author: Michael Chan Date: Fri Dec 1 14:39:22 2023 -0800 bnxt_en: Support force speed using the new HWRM fields Modify bnxt_force_link_speed() to support the new speeds stored in link_info->support_speeds2, including the new 400G speed. Reviewed-by: Ajit Khaparde Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-14-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 30c0bb63c2ea0d7b8a9057afff2317d7b40846b1 Author: Michael Chan Date: Fri Dec 1 14:39:21 2023 -0800 bnxt_en: Support new firmware link parameters Newer firmware supporting PAM4 112Gbps speeds use new parameters in firmware message structures. Detect the new firmware capability and add basic logic to report and store these new fields. Reviewed-by: Hongguang Gao Reviewed-by: Damodharam Ammepalli Reviewed-by: Ajit Khaparde Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-13-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit cf47fa5ca5bb095c3d7b8222b959f54d952cf9e5 Author: Michael Chan Date: Fri Dec 1 14:39:20 2023 -0800 bnxt_en: Refactor ethtool speeds logic Add helper functions to refactor the logic that converts firmware speed masks to ethtool speeds. Pass the phy_flags to bnxt_get_ethtool_speeds() and the call chain. The refactoring and the phy_flags will be needed when adding support for the new speeds in the next patches. Reviewed-by: Ajit Khaparde Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-12-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit a7445d69809fe33619c451a8bf68d6b9cf335909 Author: Michael Chan Date: Fri Dec 1 14:39:19 2023 -0800 bnxt_en: Add support for new RX and TPA_START completion types for P7 These new completion types are supported on the new P7 chips. These new types have commonalities with the legacy types. After the refactoring, we mainly have to add new functions to handle the the new meta data formats and the RX hash information in the new types. Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-11-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 39b2e62be3704d358c2c82eb326ae4b82a23ce1a Author: Michael Chan Date: Fri Dec 1 14:39:18 2023 -0800 bnxt_en: Refactor and refine bnxt_tpa_start() and bnxt_tpa_end(). Refactor bnxt_tpa_start() by adding bnxt_tpa_metadata() to gather the metadata from the TPA_START completion. This makes it easier to support the new P7 chip which has a modified TPA_START completion structure with different metadata formats. We also add vlan_valid and cfa_code_valid fields to the bnxt_tpa_info structure so that the VLAN and VF rep logic can be common for all chips. The VLAN metadata is now collected in bnxt_tpa_start() only when it is valid and the vlan_valid field will be set. bnxt_tpa_end() can now use common VLAN logic for all chips. Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-10-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit c2f8063309da9be81679e27cabd4a9dbf9be43cc Author: Michael Chan Date: Fri Dec 1 14:39:17 2023 -0800 bnxt_en: Refactor RX VLAN acceleration logic. Refactor the logic in the RX path that checks for the accelerated VLAN tag by adding a new function. This will make it easier to support the new receive logic on P7 chips. Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-9-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 13d2d3d381ee9844f89bd436ab0f44204660027e Author: Michael Chan Date: Fri Dec 1 14:39:16 2023 -0800 bnxt_en: Add new P7 hardware interface definitions Add new RX, TX, and TPA hardware interface structures and macros for the P7 chips. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-8-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 8243345bfaec1cdcfd34f83700a19aa241685398 Author: Ajit Khaparde Date: Fri Dec 1 14:39:15 2023 -0800 bnxt_en: Refactor RSS capability fields Add a new rss_cap field in the per device struct bnxt and move all the RSS capability fields there. It will be easier to add new RSS capabilities for the new P7 chips. Signed-off-by: Ajit Khaparde Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-7-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit d846992e6387fa1f2142952fe94a4bff5ee61d30 Author: Michael Chan Date: Fri Dec 1 14:39:14 2023 -0800 bnxt_en: Implement the new toggle bit doorbell mechanism on P7 chips The new chip family passes the Toggle bits to the driver in the NQE notification. The driver now stores this value and sends it back to hardware when it re-arms the RX and TX CQs. Together with the earlier patch that guarantees the driver will only re-arm the CQ at the end of NAPI polling if it has seen a new NQE, this method allows the hardware to detect any dropped doorbells. Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-6-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit d3c16475dc06641a52251bc9948c1d3002ea4388 Author: Hongguang Gao Date: Fri Dec 1 14:39:13 2023 -0800 bnxt_en: Consolidate DB offset calculation The doorbell offset on P5 chips is hard coded. On the new P7 chips, it is returned by the firmware. Simplify the logic that determines this offset and store it in a new db_offset field in struct bnxt. Also, provide this offset to the RoCE driver in struct bnxt_en_dev. Reviewed-by: Kalesh AP Signed-off-by: Hongguang Gao Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-5-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit a432a45bdba4387b7c511dbbda11ab84b8e767b7 Author: Michael Chan Date: Fri Dec 1 14:39:12 2023 -0800 bnxt_en: Define basic P7 macros Repurpose the BNXT_FLAG_CHIP_SR2 flag by renaming it to BNXT_FLAG_CHIP_P7 since the SR2 chip never went to production. The SR2 statictics structure is also renamed for the P7 chip. Define the basic P7 doorbell bits (Epoch. Toggle, etc) and implement the Epoch bit logic. The next higher bit beyond the legal doorbell mask is the Epoch bit used for doorbells on P7 chips. This bit is used by the chip to detect dropped doorbells. The 57608 chip ID belonging to the P7 family is also defined. Note that the PCI ID is not added until the last patch in the series. Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 397d44bf17216f7da6ea7c703e9124c065a61697 Author: Michael Chan Date: Fri Dec 1 14:39:11 2023 -0800 bnxt_en: Update firmware interface to 1.10.3.15 This updated interface supports the new 5760X P7 chip family. It has the changes to support the new link speeds/modes and other changes for the basic L2 features. Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 08b386b132c61e06e573d6523a8c0c17b90fb8da Author: Michael Chan Date: Fri Dec 1 14:39:10 2023 -0800 bnxt_en: Fix backing store V2 logic The current code determines the last backing store valid type during bnxt_hwrm_func_backing_store_qcaps_v2(). In effect, the last type is determined based on what firmware advertises. The more correct way is to determine it based on what the driver is configuring. The driver may not configure all the backing store types advertised by firmware. Move the logic to determine the last type to bnxt_backing_store_cfg_v2(). We need to pass the legacy enable flags to the function in case only the legacy types are being configured. Fixes: 236e237f8ffe ("bnxt_en: Add support for HWRM_FUNC_BACKING_STORE_CFG_V2 firmware calls") Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231201223924.26955-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 91051f003948432f83b5d2766eeb83b2b4993649 Author: Guillaume Nault Date: Fri Dec 1 15:49:52 2023 +0100 tcp: Dump bound-only sockets in inet_diag. Walk the hashinfo->bhash2 table so that inet_diag can dump TCP sockets that are bound but haven't yet called connect() or listen(). The code is inspired by the ->lhash2 loop. However there's no manual test of the source port, since this kind of filtering is already handled by inet_diag_bc_sk(). Also, a maximum of 16 sockets are dumped at a time, to avoid running with bh disabled for too long. There's no TCP state for bound but otherwise inactive sockets. Such sockets normally map to TCP_CLOSE. However, "ss -l", which is supposed to only dump listening sockets, actually requests the kernel to dump sockets in either the TCP_LISTEN or TCP_CLOSE states. To avoid dumping bound-only sockets with "ss -l", we therefore need to define a new pseudo-state (TCP_BOUND_INACTIVE) that user space will be able to set explicitly. With an IPv4, an IPv6 and an IPv6-only socket, bound respectively to 40000, 64000, 60000, an updated version of iproute2 could work as follow: $ ss -t state bound-inactive Recv-Q Send-Q Local Address:Port Peer Address:Port Process 0 0 0.0.0.0:40000 0.0.0.0:* 0 0 [::]:60000 [::]:* 0 0 *:64000 *:* Reviewed-by: Eric Dumazet Signed-off-by: Guillaume Nault Reviewed-by: Kuniyuki Iwashima Link: https://lore.kernel.org/r/b3a84ae61e19c06806eea9c602b3b66e8f0cfc81.1701362867.git.gnault@redhat.com Signed-off-by: Jakub Kicinski commit e4b5e96d9c197524543bd522b3d5714d1eebcefb Merge: 8ad55b1e73c4e 99ac4cbcc2a50 Author: Jakub Kicinski Date: Mon Dec 4 14:43:56 2023 -0800 Merge branch 'net-phy-micrel-additional-clock-handling' Heiko Stuebner says: ==================== net: phy: micrel: additional clock handling Some Micrel phys define a specific rmii-ref clock (added in 2014) while the generic phy binding specifies an unnamed clock for ethernet phys. This allows Micrel phys to use both, so as to keep the phys not using the named rmii-ref clock to conform to the generic binding while allowing them to enable a supplying clock, when the phy is not supplied by a dedicated oscillator. ==================== Link: https://lore.kernel.org/r/20231201150131.326766-1-heiko@sntech.de Signed-off-by: Jakub Kicinski commit 99ac4cbcc2a50ecc86ffacc7b4b42ba4259a90d4 Author: Heiko Stuebner Date: Fri Dec 1 16:01:31 2023 +0100 net: phy: micrel: allow usage of generic ethernet-phy clock The generic ethernet-phy binding allows describing an external clock since commit 350b7a258f20 ("dt-bindings: net: phy: Document support for external PHY clk") for cases where the phy is not supplied by an oscillator but instead by a clock from the host system. And the old named "rmii-ref" clock from 2014 is only specified for phys of the KSZ8021, KSZ8031, KSZ8081, KSZ8091 types. So allow retrieving and enabling the optional generic clock on phys that do not provide a rmii-ref clock. Signed-off-by: Heiko Stuebner Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231201150131.326766-3-heiko@sntech.de Signed-off-by: Jakub Kicinski commit 9853294627237b73a6b765162d9c0485b0697db5 Author: Heiko Stuebner Date: Fri Dec 1 16:01:30 2023 +0100 net: phy: micrel: use devm_clk_get_optional_enabled for the rmii-ref clock While the external clock input will most likely be enabled, it's not guaranteed and clk_get_rate in some suppliers will even just return valid results when the clock is running. So use devm_clk_get_optional_enabled to retrieve and enable the clock in one go. Signed-off-by: Heiko Stuebner Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231201150131.326766-2-heiko@sntech.de Signed-off-by: Jakub Kicinski commit 8ad55b1e73c4e77656e2bea68fa2b484f33a6425 Author: Jiri Pirko Date: Fri Dec 1 19:01:54 2023 +0100 docs: netlink: add NLMSG_DONE message format for doit actions In case NLMSG_DONE message is sent as a reply to doit action, multiple kernel implementation do not send anything else than struct nlmsghdr. Add this note to the Netlink intro documentation. Signed-off-by: Jiri Pirko Reviewed-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20231201180154.864007-1-jiri@resnulli.us Signed-off-by: Jakub Kicinski commit dce94061f0d02f5ab355390a6e63d3dbea938b72 Author: Harshit Mogalapalli Date: Mon Dec 4 04:21:01 2023 -0800 drm/v3d: Fix missing error code in v3d_submit_cpu_ioctl() Smatch warns: drivers/gpu/drm/v3d/v3d_submit.c:1222 v3d_submit_cpu_ioctl() warn: missing error code 'ret' When there is no job type or job is submitted with wrong number of BOs it is an error path, ret is zero at this point which is incorrect return. Fix this by changing it to -EINVAL. Fixes: aafc1a2bea67 ("drm/v3d: Add a CPU job submission") Signed-off-by: Harshit Mogalapalli Reviewed-by: Melissa Wen Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20231204122102.181298-1-harshit.m.mogalapalli@oracle.com commit ebd12b2ca6145550a7e42cd2320870db02dd0f3c Author: Curtis Malainey Date: Mon Dec 4 15:47:13 2023 -0600 ASoC: SOF: Wire up buffer flags Buffer flags have been in firmware for ages but were never fully implemented in the topology/kernel system. This commit finishes off the implementation. Reviewed-by: Ranjani Sridharan Signed-off-by: Curtis Malainey Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214713.208951-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8ec56af3da4dad008ab10115eb4cec34836afc04 Author: Baofeng Tian Date: Mon Dec 4 15:47:12 2023 -0600 ASoC: SOF: add alignment for topology header file struct definition sof header file requires these struct with 4 byte aligned, so add same alignment in sof driver definition. Signed-off-by: Baofeng Tian Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214713.208951-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6c4df324d78ceb6a3ebb0d42243d131a424c85c3 Author: Baofeng Tian Date: Mon Dec 4 15:47:11 2023 -0600 ASoC: SOF: align topology header file with sof topology header Add missed definition and align variable names with sof topology header file. Signed-off-by: Baofeng Tian Reviewed-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214713.208951-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2f03970198d6438d95b96f69041254bd39aafed0 Author: Bard Liao Date: Mon Dec 4 15:47:10 2023 -0600 ASoC: SOF: topology: Use partial match for disconnecting DAI link and DAI widget We use partial match for connecting DAI link and DAI widget. We need to use partial match for disconnecting, too. Fixes: fe88788779fc ("ASoC: SOF: topology: Use partial match for connecting DAI link and DAI widget") Reviewed-by: Ranjani Sridharan Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214713.208951-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 70a6b66d6e8e70966274cab2fc9ee75fd60e36bf Author: Bard Liao Date: Mon Dec 4 15:42:00 2023 -0600 ASoC: Intel: sof_sdw_rt_sdca_jack_common: check ctx->headset_codec_dev instead of playback 'if (!playback)' will not work if the dai is only on capture dai link or is on more than one playback dai links. Check 'if (ctx->headset_codec_dev)' instead. Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214200.203100-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e38e252dbceeef7d2f848017132efd68e9ae1416 Author: Bard Liao Date: Mon Dec 4 15:41:59 2023 -0600 ASoC: Intel: sof_sdw_rt_sdca_jack_common: ctx->headset_codec_dev = NULL sof_sdw_rt_sdca_jack_exit() are used by different codecs, and some of them use the same dai name. For example, rt712 and rt713 both use "rt712-sdca-aif1" and sof_sdw_rt_sdca_jack_exit(). As a result, sof_sdw_rt_sdca_jack_exit() will be called twice by mc_dailink_exit_loop(). Set ctx->headset_codec_dev = NULL; after put_device(ctx->headset_codec_dev); to avoid ctx->headset_codec_dev being put twice. Fixes: 5360c6704638 ("ASoC: Intel: sof_sdw: add rt712 support") Reviewed-by: Péter Ujfalusi Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214200.203100-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 486ede0df82dd74472c6f5651e38ff48f7f766c1 Author: Brent Lu Date: Mon Dec 4 15:41:58 2023 -0600 ASoC: Intel: glk_rt5682_max98357a: fix board id mismatch The drv_name in enumeration table for ALC5682I-VS codec does not match the board id string in machine driver. Modify the entry of "10EC5682" to enumerate "RTL5682" as well and remove invalid entry. Fixes: 88b4d77d6035 ("ASoC: Intel: glk_rt5682_max98357a: support ALC5682I-VS codec") Reported-by: Curtis Malainey Reviewed-by: Curtis Malainey Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214200.203100-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 996727aad856e55f6e65fdc6093281e51f0534da Author: Brent Lu Date: Mon Dec 4 15:41:57 2023 -0600 ASoC: Intel: sof_nau8825: board id cleanup for rpl boards Many board configs are duplicated since codec and amplifier type are removed from board quirk. Introduce "rpl_nau8825_def" board to reduce the number of rpl board configs. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214200.203100-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 528ee84f0fe08788b2e72aad7bc8a13dd2a169ca Author: Brent Lu Date: Mon Dec 4 15:41:56 2023 -0600 ASoC: Intel: sof_nau8825: board id cleanup for adl boards Many board configs are duplicated since codec and amplifier type are removed from board quirk. Introduce "adl_nau8825_def" board to reduce the number of adl board configs. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231204214200.203100-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 946cff255dfaa204cd7b7f05e3bb4b5b3466c6e7 Merge: 0d9bacfa61531 2e7c6feb4ef52 160912fc3d4ae Author: Alex Williamson Date: Mon Dec 4 14:42:54 2023 -0700 Merge branches 'v6.8/vfio/debugfs', 'v6.8/vfio/pds' and 'v6.8/vfio/type1-account' into v6.8/vfio/next commit 160912fc3d4ae492954c25cd78b90083869f0011 Author: Pasha Tatashin Date: Thu Nov 30 20:09:00 2023 +0000 vfio/type1: account iommu allocations iommu allocations should be accounted in order to allow admins to monitor and limit the amount of iommu memory. Signed-off-by: Pasha Tatashin Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231130200900.2320829-1-pasha.tatashin@soleen.com Signed-off-by: Alex Williamson commit 2e7c6feb4ef5257189819359e754625ccf5a1d6c Author: Brett Creeley Date: Thu Nov 16 16:12:07 2023 -0800 vfio/pds: Add multi-region support Only supporting a single region/range is limiting, wasteful, and in some cases broken (i.e. when there are large gaps in the iova memory ranges). Fix this by adding support for multiple regions based on what the device tells the driver it can support. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20231117001207.2793-7-brett.creeley@amd.com Signed-off-by: Alex Williamson commit 0c320f223ee6892a413428051f35bebf85fe83d3 Author: Brett Creeley Date: Thu Nov 16 16:12:06 2023 -0800 vfio/pds: Move seq/ack bitmaps into region struct Since the host seq/ack bitmaps are part of a region move them into struct pds_vfio_region. Also, make use of the bmp_bytes value for validation purposes. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20231117001207.2793-6-brett.creeley@amd.com Signed-off-by: Alex Williamson commit 87bdf9807ed70f5d3a0f852f9d04ceb1c99ad9f6 Author: Brett Creeley Date: Thu Nov 16 16:12:05 2023 -0800 vfio/pds: Pass region info to relevant functions A later patch in the series implements multi-region support. That will require specific regions to be passed to relevant functions. Prepare for that change by passing the region structure to relevant functions. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20231117001207.2793-5-brett.creeley@amd.com Signed-off-by: Alex Williamson commit 3f5898133a706402180908b671d5e781fc48f548 Author: Brett Creeley Date: Thu Nov 16 16:12:04 2023 -0800 vfio/pds: Move and rename region specific info An upcoming change in this series will add support for multiple regions. To prepare for that, move region specific information into struct pds_vfio_region and rename the members for readability. This will reduce the size of the patch that actually implements multiple region support. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20231117001207.2793-4-brett.creeley@amd.com Signed-off-by: Alex Williamson commit 3b8f7a24d1fe79cc3fa1da9be5610b9c3aedbc2a Author: Brett Creeley Date: Thu Nov 16 16:12:03 2023 -0800 vfio/pds: Only use a single SGL for both seq and ack Since the seq/ack operations never happen in parallel there is no need for multiple scatter gather lists per region. The current implementation is wasting memory. Fix this by only using a single scatter-gather list for both the seq and ack operations. Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20231117001207.2793-3-brett.creeley@amd.com Signed-off-by: Alex Williamson commit 4004497cec3093d7b0087bc70709b45969fa07b6 Author: Brett Creeley Date: Thu Nov 16 16:12:02 2023 -0800 vfio/pds: Fix calculations in pds_vfio_dirty_sync The incorrect check is being done for comparing the iova/length being requested to sync. This can cause the dirty sync operation to fail. Fix this by making sure the iova offset added to the requested sync length doesn't exceed the region_size. Also, the region_start is assumed to always be at 0. This can cause dirty tracking to fail because the device/driver bitmap offset always starts at 0, however, the region_start/iova may not. Fix this by determining the iova offset from region_start to determine the bitmap offset. Fixes: f232836a9152 ("vfio/pds: Add support for dirty page tracking") Signed-off-by: Brett Creeley Signed-off-by: Shannon Nelson Link: https://lore.kernel.org/r/20231117001207.2793-2-brett.creeley@amd.com Signed-off-by: Alex Williamson commit 0d9bacfa615310e88bae385d64ca065953cb95ac Author: Longfang Liu Date: Mon Nov 6 15:22:25 2023 +0800 MAINTAINERS: Add vfio debugfs interface doc link After adding the debugfs function to the vfio driver, a new debugfs-vfio file was added. Signed-off-by: Longfang Liu Link: https://lore.kernel.org/r/20231106072225.28577-4-liulongfang@huawei.com Signed-off-by: Alex Williamson commit 7b994177805f4ef05913c3f242840b262ecf2fa1 Author: Longfang Liu Date: Mon Nov 6 15:22:24 2023 +0800 Documentation: add debugfs description for vfio Add an debugfs document description file to help users understand how to use the accelerator live migration driver's debugfs. Signed-off-by: Longfang Liu Reviewed-by: Cédric Le Goater Link: https://lore.kernel.org/r/20231106072225.28577-3-liulongfang@huawei.com Signed-off-by: Alex Williamson commit 2202844e4468c7539dba0c0b06577c93735af952 Author: Longfang Liu Date: Mon Nov 6 15:22:23 2023 +0800 vfio/migration: Add debugfs to live migration driver There are multiple devices, software and operational steps involved in the process of live migration. An error occurred on any node may cause the live migration operation to fail. This complex process makes it very difficult to locate and analyze the cause when the function fails. In order to quickly locate the cause of the problem when the live migration fails, I added a set of debugfs to the vfio live migration driver. +-------------------------------------------+ | | | | | QEMU | | | | | +---+----------------------------+----------+ | ^ | ^ | | | | | | | | v | v | +---------+--+ +---------+--+ |src vfio_dev| |dst vfio_dev| +--+---------+ +--+---------+ | ^ | ^ | | | | v | | | +-----------+----+ +-----------+----+ |src dev debugfs | |dst dev debugfs | +----------------+ +----------------+ The entire debugfs directory will be based on the definition of the CONFIG_DEBUG_FS macro. If this macro is not enabled, the interfaces in vfio.h will be empty definitions, and the creation and initialization of the debugfs directory will not be executed. vfio | +--- | +---migration | +--state | +--- +---migration +--state debugfs will create a public root directory "vfio" file. then create a dev_name() file for each live migration device. First, create a unified state acquisition file of "migration" in this device directory. Then, create a public live migration state lookup file "state". Signed-off-by: Longfang Liu Reviewed-by: Cédric Le Goater Link: https://lore.kernel.org/r/20231106072225.28577-2-liulongfang@huawei.com Signed-off-by: Alex Williamson commit 28b01743ca752cea5ab182297d8b912b22f2a2d1 Author: Veronika Molnarova Date: Fri Dec 1 20:46:17 2023 +0100 perf test record user-regs: Fix mask for vg register The 'vg' register for arm64 shows up in --user_regs as available when masking the variable AT_HWCAP with 1 << 22 returns '1' as done in perf_regs.c. However, in subtests for support of SVE, the check for the 'vg' register is done by masking the variable AT_HWCAP with the value 0x200000 which is equals to 1 << 21 instead of 1 << 22. This results in inconsistencies on certain systems where the test expects that the 'vg' register is not operational when it is, and vice-versa. During the testing on a machine that the test expected not to have the 'vg' register available, 'perf record' with the option --user-regs showed records for the 'vg' register together with all of the others, which means that the mask for the subtest of perf_event_attr is off by one. Change the value of the mask from 0x200000 to 0x400000 to correct it. Fixes: 9440ebdc333dd12e ("perf test arm64: Add attr tests for new VG register") Reviewed-by: Leo Yan Signed-off-by: Veronika Molnarova Cc: James Clark Cc: Michael Petlan Link: https://lore.kernel.org/r/20231201194617.13012-1-vmolnaro@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 4acef67646f35e14d202d5f534c0fd68d7691b22 Author: Arnaldo Carvalho de Melo Date: Fri Dec 1 17:07:34 2023 -0300 perf env: Cache the arch specific strerrno function in perf_env__arch_strerrno() So that we don't have to go thru the series of strcmp(arch) calls for each id -> string translation. Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: David Laight Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/20231201203046.486596-3-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 54373b5d53c1f6aa6164ee5bea4761abb16b351c Author: Arnaldo Carvalho de Melo Date: Fri Dec 1 14:52:00 2023 -0300 perf env: Introduce perf_env__arch_strerrno() That will cache the arch specific function translating error numbers to strings. Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: David Laight Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/20231201203046.486596-2-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 801207c18834e289960c515bc41d243aa623763b Author: Harshit Mogalapalli Date: Mon Dec 4 09:13:14 2023 -0800 drm/msm/dp: add a missing unlock in dp_hpd_plug_handle() When pm_runtime_resume_and_get() fails, unlock before returning. Fixes: 5814b8bf086a ("drm/msm/dp: incorporate pm_runtime framework into DP driver") Signed-off-by: Harshit Mogalapalli Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570395/ Link: https://lore.kernel.org/r/20231204171317.192427-1-harshit.m.mogalapalli@oracle.com Signed-off-by: Dmitry Baryshkov commit e17999750649c4bd4ba945419b406d1d1a3e92e2 Author: Bard Liao Date: Mon Dec 4 13:56:14 2023 +0000 ASoC: Intel: soc-acpi-intel-tgl-match: add cs42l43 and cs35l56 support This is a test configuration for UpExtreme with Cirrus Logic CS35L56-EIGHT-C board. The codec layout is configured as: - Link3: CS42L43 Jack - Link0: 2x CS35L56 Speaker (amps 1 and 2) - Link1: 2x CS35L56 Speaker (amps 7 and 8) Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Signed-off-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20231204135614.2169624-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 90422201f8f2b4e26ab7bd43b92786a11c1ffebf Author: Dmitry Baryshkov Date: Mon Dec 4 15:13:54 2023 +0200 Revert "drm: Introduce pixel_source DRM plane property" This reverts commit e50e5fed41c7eed2db4119645bf3480ec43fec11. Although the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled. Acked-by: Simon Ser Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231204131455.19023-8-dmitry.baryshkov@linaro.org commit e5fba1ada1c1d676438138d815acd8f427a1eaf0 Author: Dmitry Baryshkov Date: Mon Dec 4 15:13:53 2023 +0200 Revert "drm: Introduce solid fill DRM plane property" This reverts commit 85863a4e16e77079ee14865905ddc3ef9483a640. Although the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled. Acked-by: Simon Ser Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231204131455.19023-7-dmitry.baryshkov@linaro.org commit 5fb1ad3f5725c5c4d1a0c24ba4f82f239dc6878d Author: Dmitry Baryshkov Date: Mon Dec 4 15:13:52 2023 +0200 Revert "drm: Add solid fill pixel source" This reverts commit 4b64167042927531f4cfaf035b8f88c2f7a05f06. Although the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled. Acked-by: Simon Ser Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231204131455.19023-6-dmitry.baryshkov@linaro.org commit fe28421d4fedb90cadcef4932be0e8364f79283d Author: Dmitry Baryshkov Date: Mon Dec 4 15:13:51 2023 +0200 Revert "drm/atomic: Add pixel source to plane state dump" This reverts commit 8283ac7871a959848e09fc6593b8c12b8febfee6. Although the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled. Acked-by: Simon Ser Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231204131455.19023-5-dmitry.baryshkov@linaro.org commit a513f095b941e9e96196f04f11f253d763310c08 Author: Dmitry Baryshkov Date: Mon Dec 4 15:13:50 2023 +0200 Revert "drm/atomic: Add solid fill data to plane state dump" This reverts commit e86413f5442ee094e66b3e75f2d3419ed0df9520. Although the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled. Acked-by: Simon Ser Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231204131455.19023-4-dmitry.baryshkov@linaro.org commit b881ba8faa5c7689eb1cb487ad891c46dbbed0e8 Author: Dmitry Baryshkov Date: Mon Dec 4 15:13:49 2023 +0200 Revert "drm/atomic: Move framebuffer checks to helper" This reverts commit 4ba6b7a646321e740c7f2d80c90505019c4e8fce. Although the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled. Acked-by: Simon Ser Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231204131455.19023-3-dmitry.baryshkov@linaro.org commit 1c0a80f160965c88f16e73ff69015db2f044c486 Author: Dmitry Baryshkov Date: Mon Dec 4 15:13:48 2023 +0200 Revert "drm/atomic: Loosen FB atomic checks" This reverts commit f1e75da5364e780905d9cd6043f9c74cdcf84073. Although the Solid Fill planes patchset got all reviews and acknowledgements, it doesn't fulfill requirements for the new uABI. It has neither corresponding open-source userspace implementation nor the IGT tests coverage. Reverting this patchset until userspace obligations are fulfilled. Acked-by: Simon Ser Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231204131455.19023-2-dmitry.baryshkov@linaro.org commit 8ea082584cf16c6c29b3e1c7061cbf4a1b9fbf51 Merge: d0ae9dc48e24f 7650862f4e72d Author: Mark Brown Date: Mon Dec 4 19:31:56 2023 +0000 ASoC: Intel: bytcht_es8316: Determine Merge series from Hans de Goede : This takes some of the work done to auto-configure quirks/routing for ESS83xx codecs by getting the info from ACPI from: https://github.com/thesofproject/linux/pull/4112 And then builds on top of this to add auto-configuration to the bytcht_es8316 board driver. Note compared to the pull-request, which deals with the ES8336, this series deals with the ES8316 (for which I have several devices to test on) and this moves handling of the _DSM from the codec driver to the board driver since with the ES8316 the board driver takes care of setting up various routes for things like the mic and speakers. After this series audio now works properly on a CHT Chuwi Hi12 tablet without needing to add an extra quirk for that model. This has also been tested on the following devices, where things are unchanged from before (the ACPI autoconfiguration gives the same results as the old defaults) : Onda V80 plus (CHT) GP-electronic T701 (BYT) I also tested this on a Nanote UMPC-01, here the _DSM result for PLATFORM_SPK_TYPE_ARG wrongly returns 1 (mono) while the device actually has 2 speakers, so this model needs to keep its DMI quirk. I don't have an IRBIS NB41 nor a TECLAST X98 Plus II, so the DMI quirks for those are left in place too on a better safe then sorry basis. commit 7bb7d31d9e454fc0b13cb0df44c2b4d953b4a152 Author: Francesco Dolcini Date: Fri Dec 1 20:57:32 2023 +0100 arm64: defconfig: Increase SERIAL_8250_NR_UARTS Increase CONFIG_SERIAL_8250_NR_UARTS from 4 to 8, the current legacy value is not adequate for embedded systems that use SoCs where it's common to have a large number of serial ports. No need to change CONFIG_SERIAL_8250_RUNTIME_UARTS, see commit 9d86719f8769 ("serial: 8250: Allow using ports higher than SERIAL_8250_RUNTIME_UARTS"). The need to increase this value was noticed while working with Toradex Verdin AM62, this board has 4 serial UART instances available to the user plus an internal one that is connected to a Bluetooth module. Without this change the fifth UART connected to the BT module is not instantiated and BT is not working. Instead of increasing the number to the bare minimum (5) that would be required to solve this specific issue, we increase this to 8 which seems a more reasonable number to have in the defconfig and should cover more valid use cases. With this change the kernel image size increases by ~3.2kB. bloat-o-meter summary: add/remove: 1/1 grow/shrink: 7/0 up/down: 3220/-8 (3212) Cc: Tony Lindgren Reviewed-by: Tony Lindgren Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20231201195732.4931-1-francesco@dolcini.it Signed-off-by: Nishanth Menon commit 649e121f9301a4d275b68323a9807b762618e516 Author: Andrew Davis Date: Mon Nov 27 13:36:02 2023 -0600 arm64: dts: ti: k3-am625-beagleplay: Use UART name in pinmux name The main_uart0 may not always be the console, but it will always be the UART0 in MAIN domain. Name the pinmux node to match. This makes it consistent with all other TI SoC based boards. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231127193602.151499-1-afd@ti.com Signed-off-by: Nishanth Menon commit e57ba268254bda25a3ddca8b7971d6ad8277e2d8 Author: Aradhya Bhatia Date: Thu Nov 9 00:46:52 2023 +0530 arm64: dts: ti: k3-am62a7-sk: Add interrupt support for IO Expander The Hot Plug Detect (HPD) signal for the HDMI display travels from the on-board HDMI connector, through the IO Expander 1, and finally to the main_gpio1 GPIO 23, of the SoC. Add interrupt information for the IO Expander 1 (exp1) along with the relevant pinmux. Signed-off-by: Aradhya Bhatia Reviewed-by: Jai Luthra Link: https://lore.kernel.org/r/20231108191652.1118155-1-a-bhatia1@ti.com Signed-off-by: Nishanth Menon commit 26e0124683c000c2a197204e0fdc68e553298bff Author: Parth Pancholi Date: Tue Nov 21 17:04:36 2023 +0100 arm64: dts: ti: k3-am625-verdin: Enable Verdin UART2 Enable UART2 for AM62 based SOM's Verdin carrier boards Dahlia, Development and Yavia. Earlier Verdin UART2 was reserved by R5 DM firmware which can be now configured using boardcfg during U-boot compilation. In a default config, no one writes to this UART. Signed-off-by: Parth Pancholi Reviewed-by: Francesco Dolcini Link: https://lore.kernel.org/r/20231121160436.1032364-1-parth105105@gmail.com Signed-off-by: Nishanth Menon commit ba78573abba7eb20190b2bb55e5cb5b55a8854fc Author: Ronald Wahl Date: Mon Nov 27 12:26:57 2023 +0100 arm64: dts: ti: k3-am62-main: Add gpio-ranges properties On the AM62 platform we have no single 1:1 relation regarding index of gpio and pin controller. Actually there are some linear ranges with small holes inbetween. These ranges can be represented with the gpio-ranges device tree property. They have been extracted manually from the AM62x datasheet (Table 6-1. Pin Attributes). Signed-off-by: Ronald Wahl Link: https://lore.kernel.org/r/20231127112657.2692103-1-rwahl@gmx.de Signed-off-by: Nishanth Menon commit 3b6345e3fcf4c93a79f396121cd0e6f98f04da13 Author: Andrew Davis Date: Fri Nov 17 10:33:39 2023 -0600 arm64: dts: ti: k3-am64: Enable SDHCI nodes at the board level SDHCI nodes defined in the top-level AM64 SoC dtsi files are incomplete and will not be functional unless they are extended. As the attached SD/eMMC is only known about at the board integration level, these nodes should only be enabled when provided with this information. Disable the SDHCI nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231117163339.89952-2-afd@ti.com Signed-off-by: Nishanth Menon commit 006d93519db2e0eacbaeac20cf9d55a4d842a006 Author: Andrew Davis Date: Fri Nov 17 10:33:38 2023 -0600 arm64: dts: ti: k3-am65: Enable SDHCI nodes at the board level SDHCI nodes defined in the top-level AM65 SoC dtsi files are incomplete and will not be functional unless they are extended. As the attached SD/eMMC is only known about at the board integration level, these nodes should only be enabled when provided with this information. Disable the SDHCI nodes in the dtsi files and only enable the ones that are actually pinned out on a given board. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231117163339.89952-1-afd@ti.com Signed-off-by: Nishanth Menon commit 1a4402e14fa8fa166cd4afd435b903c7867eb7d5 Author: Andrew Davis Date: Fri Nov 17 08:14:33 2023 -0600 arm64: dts: ti: k3-am65: Add full compatible to dss-oldi-io-ctrl node This matches the binding for this register region which fixes a couple DTS check warnings. While here trim the leading 0s from the "reg" definition. Signed-off-by: Andrew Davis Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231117141433.9461-1-afd@ti.com Signed-off-by: Nishanth Menon commit 3dc5bd24181af7eb90ad764c3b303f697ebf5e87 Author: Andrew Davis Date: Fri Nov 17 08:09:07 2023 -0600 arm64: dts: ti: k3-j784s4: Add chipid node to wkup_conf bus Like in other K3 SoCs the chipid register is inside the wakeup configuration space. Move the chipid node under a new bus to better represent this topology and match other similar SoCs. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231117140910.8747-2-afd@ti.com Signed-off-by: Nishanth Menon commit 1026355c21ebe9f7af3bb0a9422bc572c9f4ac91 Author: Andrew Davis Date: Fri Nov 17 08:09:08 2023 -0600 arm64: dts: ti: k3-j721s2: Add chipid node to wkup_conf bus Like in other K3 SoCs the chipid register is inside the wakeup configuration space. Move the chipid node under a new bus to better represent this topology and match other similar SoCs. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231117140910.8747-3-afd@ti.com Signed-off-by: Nishanth Menon commit 27e5b7330fe31d0aae196f26cf251254f2b923bb Author: Andrew Davis Date: Fri Nov 17 08:09:10 2023 -0600 arm64: dts: ti: k3-j721e: Add chipid node to wkup_conf bus Like in other K3 SoCs the chipid register is inside the wakeup configuration space. Move the chipid node under a new bus to better represent this topology and match other similar SoCs. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231117140910.8747-5-afd@ti.com Signed-off-by: Nishanth Menon commit 82277ed7db29296a2907eab91934c26c405db604 Author: Andrew Davis Date: Fri Nov 17 08:09:06 2023 -0600 arm64: dts: ti: k3-j7200: Add chipid node to wkup_conf bus Like in other K3 SoCs the chipid register is inside the wakeup configuration space. Move the chipid node under a new bus to better represent this topology and match other similar SoCs. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231117140910.8747-1-afd@ti.com Signed-off-by: Nishanth Menon commit 8121e93102b0e09ff1d9589659a823b2271acf62 Author: Andrew Davis Date: Fri Nov 17 08:09:09 2023 -0600 arm64: dts: ti: k3-am65: Add chipid node to wkup_conf bus Like in other K3 SoCs the chipid register is inside the wakeup configuration space. Move the chipid node under a new bus to better represent this topology and match other similar SoCs. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231117140910.8747-4-afd@ti.com Signed-off-by: Nishanth Menon commit 9fba6a55d2ff449e1d796fbda16520715158b1ee Author: MD Danish Anwar Date: Tue Nov 28 14:15:37 2023 +0530 arm64: defconfig: Enable TI_ICSSG_PRUETH The Programmable Real-time Unit and Industrial Communication Subsystem Gigabit (PRU_ICSSG) is a low-latency microcontroller subsystem in the TI K3 SoCs such as AM654x, AM64x. This subsystem is provided for the use cases like implementation of custom peripheral interfaces, offloading of tasks from the other processor cores of the SoC, etc. Currently AM654x-EVM uses ICSSG driver. Signed-off-by: MD Danish Anwar Reviewed-by: Ravi Gunasekaran Link: https://lore.kernel.org/r/20231128084537.3946895-1-danishanwar@ti.com Signed-off-by: Nishanth Menon commit 21a1989963b4c2d8530af9be41c4cc2f7d3b2ee8 Author: Aradhya Bhatia Date: Mon Oct 30 20:58:34 2023 +0530 arm64: defconfig: Enable Toshiba TC358767 bridge Siemens' SIMATIC IOT2050 platform[0], based on Texas Instruments' AM65x SoC[1], uses Toshiba TC358767[2] to convert DPI video to DisplayPort (DP) video output. The original DPI signals are generated by AM65x's Display SubSystem (DSS). Toshiba TC358767 is also capable of other video format conversions, viz, DPI to (e)DP, DSI to (e)DP, and DSI to DPI. Enable the video bridge Toshiba TC358767. [0]: https://www.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html [1]: https://www.ti.com/product/AM6548 [2]: https://toshiba.semicon-storage.com/info/datasheet_en_20230731.pdf?did=36657 Signed-off-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231030152834.18450-1-a-bhatia1@ti.com Signed-off-by: Nishanth Menon commit 7650862f4e72d2533356ec001b8ea8d5839aced0 Author: Hans de Goede Date: Sat Dec 2 13:39:46 2023 +0100 ASoC: Intel: bytcht_es8316: Determine quirks/routing with codec-dev ACPI DSM Add support for querying the same ACPI Device-Specific-Method (DSM) as Windows uses to determine things like speaker and mic routing. This avoids the need to add DMI quirks for each new ESS8316 tablet model. This has been tested on the following devices: 1. Chuwi Hi12 CHT with stereo speakers and IN2-mic-map, this avoids the need to add a DMI quirk for this model. 2. Nanote UMPC-01 CHT with stereo speakers and IN1-mic-map, the existing DMI quirk is still necessary because of a bug in the DSM return values for the speakers (it returns mono). 3. Onda V80 plus CHT with mono speaker and IN1-mic-map, DSM set quirks match the previously used defaults. 4. GP-electronic T701 BYT with mono speaker and IN2-mic-map, DSM set quirks match the previously used defaults. Signed-off-by: Hans de Goede Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231202123946.54347-5-hdegoede@redhat.com Signed-off-by: Mark Brown commit e8acf91a4013202934313f3c2968e6962daaffff Author: Hans de Goede Date: Sat Dec 2 13:39:45 2023 +0100 ASoC: Intel: bytcht_es8316: Add is_bytcr helper variable Add a is_bytcr helper variable to probe(). This is a preparation patch for determining the quirks through querying the ACPI Device-Specific-Method (DSM) on the codec-device. Signed-off-by: Hans de Goede Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231202123946.54347-4-hdegoede@redhat.com Signed-off-by: Mark Brown commit b71e1d3789946a20e0e34349f4a874604ac65c3e Author: Pierre-Louis Bossart Date: Sat Dec 2 13:39:44 2023 +0100 ASoC: Intel: bytcht_es8316: Dump basic _DSM information Instead of adding DMI quirks for each new tablet model which uses the ESS8316 codec, the plan is to switch to querying the same ACPI Device-Specific-Method (DSM) as Windows uses to determine things like speaker and mic routing. Call the new es83xx_dsm_dump() helper which logs various basic settings which can be queried through the ACPI DSM method on the codec ACPI device, this is intended to help with developing a DSM based solution to replace most DMI quirks. Signed-off-by: Pierre-Louis Bossart [hdegoede@redhat.com: improve commit message] Signed-off-by: Hans de Goede Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231202123946.54347-3-hdegoede@redhat.com Signed-off-by: Mark Brown commit 9c8bec3b63255ca04e5dad87471a35790aec06dc Author: Pierre-Louis Bossart Date: Sat Dec 2 13:39:43 2023 +0100 ASoC: es83xx: add ACPI DSM helper module Most of the ES83xx codec configuration is exposed in the DSDT table and accessible via a _DSM method. Start adding basic definitions and helpers to dump the information. Reviewed-by: Mauro Carvalho Chehab Co-developed-by: David Yang Signed-off-by: David Yang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Hans de Goede Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231202123946.54347-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit d0ae9dc48e24f5f704abcbb2dca3e4651bf0ff59 Author: Chen-Yu Tsai Date: Mon Dec 4 11:35:47 2023 +0800 ASoC: SOF: Move sof_of_machine_select() to core.c from sof-of-dev.c Commit 014fdeb0d747 ("ASoC: SOF: Move sof_of_machine_select() to sof-of-dev.c from sof-audio.c") caused a circular dependency between the snd_sof and snd_sof_of modules: depmod: ERROR: Cycle detected: snd_sof -> snd_sof_of -> snd_sof depmod: ERROR: Found 2 modules in dependency cycles! Move the function back with sof_machine_select(). Fixes: 014fdeb0d747 ("ASoC: SOF: Move sof_of_machine_select() to sof-of-dev.c from sof-audio.c") Signed-off-by: Chen-Yu Tsai Acked-by: Peter Ujfalusi Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/20231204033549.2020289-1-wenst@chromium.org Signed-off-by: Mark Brown commit 8cd3fa428b56352beaa38df756c1d3f1556f5514 Author: Chengming Zhou Date: Thu Nov 2 03:23:27 2023 +0000 slub: Delay freezing of partial slabs Now we will freeze slabs when moving them out of node partial list to cpu partial list, this method needs two cmpxchg_double operations: 1. freeze slab (acquire_slab()) under the node list_lock 2. get_freelist() when pick used in ___slab_alloc() Actually we don't need to freeze when moving slabs out of node partial list, we can delay freezing to when use slab freelist in ___slab_alloc(), so we can save one cmpxchg_double(). And there are other good points: - The moving of slabs between node partial list and cpu partial list becomes simpler, since we don't need to freeze or unfreeze at all. - The node list_lock contention would be less, since we don't need to freeze any slab under the node list_lock. We can achieve this because there is no concurrent path would manipulate the partial slab list except the __slab_free() path, which is now serialized by slab_test_node_partial() under the list_lock. Since the slab returned by get_partial() interfaces is not frozen anymore and no freelist is returned in the partial_context, so we need to use the introduced freeze_slab() to freeze it and get its freelist. Similarly, the slabs on the CPU partial list are not frozen anymore, we need to freeze_slab() on it before use. We can now delete acquire_slab() as it became unused. Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 213094b5d1af7e6ab294a6d8f3b50cafb72642ae Author: Chengming Zhou Date: Thu Nov 2 03:23:26 2023 +0000 slub: Introduce freeze_slab() We will have unfrozen slabs out of the node partial list later, so we need a freeze_slab() function to freeze the partial slab and get its freelist. Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 422e7d54375889484b66962d1dcbc392a6bd9e7a Author: Chengming Zhou Date: Thu Nov 2 03:23:25 2023 +0000 slub: Prepare __slab_free() for unfrozen partial slab out of node partial list Now the partially empty slub will be frozen when taken out of node partial list, so the __slab_free() will know from "was_frozen" that the partially empty slab is not on node partial list and is a cpu or cpu partial slab of some cpu. But we will change this, make partial slabs leave the node partial list with unfrozen state, so we need to change __slab_free() to use the new slab_test_node_partial() we just introduced. Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 4de77156a2acdec0014fa89fc1766a7410d726ff Author: Hans de Goede Date: Fri Dec 1 17:11:30 2023 +0100 drm/i915/dsi: Use devm_gpiod_get() for all GPIOs soc_gpio_set_value() already uses devm_gpiod_get(), lets be consistent and use devm_gpiod_get() for all GPIOs. This allows removing the intel_dsi_vbt_gpio_cleanup() function, which only function was to put the GPIO-descriptors. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231201161130.23976-1-hdegoede@redhat.com commit 153de60e8bfb4501e1462a2f74cb787c137b996c Author: Colin Ian King Date: Mon Dec 4 09:39:40 2023 +0000 selftests/bpf: Fix spelling mistake "get_signaure_size" -> "get_signature_size" There is a spelling mistake in an ASSERT_GT message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231204093940.2611954-1-colin.i.king@gmail.com commit 5bd90cdc65ef9ef5e13c9ff23620079db5c608a0 Author: Andrei Matei Date: Sun Dec 3 20:12:48 2023 -0500 bpf: Minor logging improvement One place where we were logging a register was only logging the variable part, not also the fixed part. Signed-off-by: Andrei Matei Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231204011248.2040084-1-andreimatei1@gmail.com commit 35ddd61cf023b5deb2b7e9f1627abef053281c0a Author: Dan Carpenter Date: Mon Dec 4 15:29:29 2023 +0300 platform/x86: x86-android-tablets: Fix an IS_ERR() vs NULL check in probe The spi_new_device() function returns NULL on error, it doesn't return error pointers. Fixes: 70505ea6de24 ("platform/x86: x86-android-tablets: Add support for SPI device instantiation") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/4b1b2395-c7c5-44a4-b0b0-6d091c7f46a2@moroto.mountain Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8c82e9e3766b8a7e6a4c633dab5b652333ada78f Author: Marek Vasut Date: Mon Nov 27 22:26:52 2023 +0100 dt-bindings: iio: light: isl76682: Document ISL76682 The ISL76682 is very basic ALS which only supports ALS or IR mode in four ranges, 1k/4k/16k/64k LUX. There is no IRQ support or any other fancy functionality. Document it as trivial device. Acked-by: Conor Dooley Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20231127212726.77707-1-marex@denx.de Signed-off-by: Jonathan Cameron commit 253bad7f0436284ee0413b1c615a1d4be96893de Author: Krzysztof Kozlowski Date: Wed Nov 29 16:57:38 2023 +0100 dt-bindings: pinctrl: qcom,sm8550-lpass-lpi: add X1E80100 LPASS LPI Document the Qualcomm X1E80100 SoC Low Power Audio SubSystem Low Power Island (LPASS LPI) pin controller, compatible with earlier SM8550 model. Cc: Abel Vesa Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20231129155738.167030-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit e24b623d95207735226a57dc0a0019b7da12ad6b Author: Thomas Richard Date: Tue Nov 28 16:35:00 2023 +0100 pinctrl: pinctrl-single: add ti,j7200-padconf compatible On j7200, during suspend to ram pinctrl contexts are lost. To save and restore contexts during suspend/resume, the flag PCS_CONTEXT_LOSS_OFF shall be set. Signed-off-by: Thomas Richard Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20231128-j7200-pinctrl-s2r-v1-2-704e7dc24460@bootlin.com Signed-off-by: Linus Walleij commit aa587ff2abdb773db74e4bf5856631d274b73466 Author: Thomas Richard Date: Tue Nov 28 16:34:59 2023 +0100 dt-bindings: pinctrl: pinctrl-single: add ti,j7200-padconf compatible Add the "ti,j7200-padconf" compatible to support suspend to ram on j7200. Signed-off-by: Thomas Richard Reviewed-by: Tony Lindgren Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231128-j7200-pinctrl-s2r-v1-1-704e7dc24460@bootlin.com Signed-off-by: Linus Walleij commit 27030ff7877262b0555a2870b0e401ebbc0e72c3 Author: Richard Acayan Date: Mon Nov 27 21:02:04 2023 -0500 pinctrl: qcom: fail to retrieve configuration from invalid pin groups The pinconf-groups debugfs file dumps each valid configuration item of all pin groups. Some platforms and devices may have pin groups which cannot be accessed, according to commit 691bf5d5a7bf ("pinctrl: qcom: Don't allow protected pins to be requested"). Fail for each configuration item of an invalid pin group by checking the GPIO chip's valid mask. The validity of the pin group cannot be checked in the generic pinconf dump (function "pinconf_generic_dump_one"), as it does not directly interact with the gpiochip or the pinmux callbacks (which would give it access to the request callback). Instead, an entry contains the ID and name of the pingroup with no properties when all items fail. Signed-off-by: Richard Acayan Link: https://lore.kernel.org/r/20231128020202.728156-3-mailingradian@gmail.com Signed-off-by: Linus Walleij commit 142173c4ad5a981ce2c7b97ecc283885e7e778b6 Author: Andy Shevchenko Date: Wed Nov 22 16:46:35 2023 +0200 pinctrl: mediatek: Switch to use no-IRQ PM helpers Since pm.h provides a helper for system no-IRQ PM callbacks, switch the driver to use it instead of open coded variant. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231122144744.2222207-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 7cc4e6b0e4ddf610477fcec8e3d2a9caae7e8a6c Author: Andy Shevchenko Date: Wed Nov 29 18:06:46 2023 +0200 pinctrl: Convert unsigned to unsigned int Simple type conversion with no functional change implied. While at it, adjust indentation where it makes sense. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231129161459.1002323-24-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit d0b3c318e04cc6c4e2a3c30ee0f6f619aa8d0db5 Author: Dmitry Baryshkov Date: Sun Dec 3 14:53:14 2023 +0300 drm/bridge: migrate bridge_chains to per-encoder file Instead of having a single file with all bridge chains, list bridges under a corresponding per-encoder debugfs directory. While we are at it, also slightly improve the formatting of the bridge data: split a single line entry into multiple lines, include the symbol name of the bridge funcs and add the textual representation of the bridge ops. Example of the listing: $ cat /sys/kernel/debug/dri/0/encoder-0/bridges bridge[0]: dsi_mgr_bridge_funcs type: [0] Unknown ops: [0] bridge[1]: lt9611uxc_bridge_funcs type: [11] HDMI-A OF: /soc@0/geniqup@9c0000/i2c@994000/hdmi-bridge@2b:lontium,lt9611uxc ops: [7] detect edid hpd Reviewed-by: Neil Armstrong Reviewed-by: Tomi Valkeinen Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231203115315.1306124-3-dmitry.baryshkov@linaro.org commit caf525ed45b4960b450cbd4e811d9b247bc2586c Author: Dmitry Baryshkov Date: Sun Dec 3 14:53:13 2023 +0300 drm/encoder: register per-encoder debugfs dir Each of connectors and CRTCs used by the DRM device provides debugfs directory, which is used by several standard debugfs files and can further be extended by the driver. Add such generic debugfs directories for encoder. Reviewed-by: Neil Armstrong Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231203115315.1306124-2-dmitry.baryshkov@linaro.org commit 7d9f1b72b29698e3030c2b163522cf4aa91b47e9 Author: Dmitry Baryshkov Date: Sun Dec 3 14:43:33 2023 +0300 usb: typec: qcom-pmic-typec: switch to DRM_AUX_HPD_BRIDGE Use the freshly defined DRM_AUX_HPD_BRIDGE instead of open-coding the same functionality for the DRM bridge chain termination. Acked-by: Bryan O'Donoghue Reviewed-by: Heikki Krogerus Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231203114333.1305826-7-dmitry.baryshkov@linaro.org commit 2bcca96abfbf89d26fc10fc92e40532bb2ae8891 Author: Dmitry Baryshkov Date: Sun Dec 3 14:43:32 2023 +0300 soc: qcom: pmic-glink: switch to DRM_AUX_HPD_BRIDGE Use the freshly defined DRM_AUX_HPD_BRIDGE instead of open-coding the same functionality for the DRM bridge chain termination. Reviewed-by: Bjorn Andersson Acked-by: Bjorn Andersson Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231203114333.1305826-6-dmitry.baryshkov@linaro.org commit e560518a6c2e60f1566473c146fddcff3281f617 Author: Dmitry Baryshkov Date: Sun Dec 3 14:43:31 2023 +0300 drm/bridge: implement generic DP HPD bridge Several USB-C controllers implement a pretty simple DRM bridge which implements just the HPD notification operations. Add special helper for creating such simple bridges. Acked-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231203114333.1305826-5-dmitry.baryshkov@linaro.org commit c5d296bad640b190c52ef7508114d70e971a4bba Author: Dmitry Baryshkov Date: Sun Dec 3 14:43:30 2023 +0300 usb: typec: nb7vpq904m: switch to DRM_AUX_BRIDGE Switch to using the new DRM_AUX_BRIDGE helper to create the transparent DRM bridge device instead of handcoding corresponding functionality. Reviewed-by: Heikki Krogerus Acked-by: Greg Kroah-Hartman Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231203114333.1305826-4-dmitry.baryshkov@linaro.org commit 35921910bbd0b6ab595cead16d0c8faadbf2fd94 Author: Dmitry Baryshkov Date: Sun Dec 3 14:43:29 2023 +0300 phy: qcom: qmp-combo: switch to DRM_AUX_BRIDGE Switch to using the new DRM_AUX_BRIDGE helper to create the transparent DRM bridge device instead of handcoding corresponding functionality. Acked-by: Vinod Koul Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231203114333.1305826-3-dmitry.baryshkov@linaro.org commit 2a04739139b2b2761571e18937e2400e71eff664 Author: Dmitry Baryshkov Date: Sun Dec 3 14:43:28 2023 +0300 drm/bridge: add transparent bridge helper Define a helper for creating simple transparent bridges which serve the only purpose of linking devices into the bridge chain up to the last bridge representing the connector. This is especially useful for DP/USB-C bridge chains, which can span across several devices, but do not require any additional functionality from the intermediate bridges. Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231203114333.1305826-2-dmitry.baryshkov@linaro.org commit 3b82f43238aecd73464aeacc9c73407079511533 Author: Javier Carrasco Date: Mon Nov 27 18:34:30 2023 +0100 iio: light: add VEML6075 UVA and UVB light sensor driver The Vishay VEMl6075 is a low power, 16-bit resolution UVA and UVB light sensor with I2C interface and noise compensation (visible and infrarred). Every UV channel generates an output signal measured in counts per integration period, where the integration time is configurable. This driver adds support for both UV channels and the ultraviolet index (UVI) inferred from them according to the device application note with open-air (no teflon) coefficients. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20231110-veml6075-v3-3-6ee46775b422@gmail.com Signed-off-by: Jonathan Cameron commit 249f27ac71f428e5028a20d764e66c663f8e8a52 Author: Javier Carrasco Date: Mon Nov 27 18:34:29 2023 +0100 dt-bindings: iio: light: add support for Vishay VEML6075 The Vishay VEML6075 is a 16-bit digital UVA and UVB sensor with I2C interface. Add bindings and an example for the Vishay VEML6075. Signed-off-by: Javier Carrasco Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231110-veml6075-v3-2-6ee46775b422@gmail.com Signed-off-by: Jonathan Cameron commit b89710bd215e650f0aaf8ffe7104413d46d44392 Author: Javier Carrasco Date: Mon Nov 27 18:34:28 2023 +0100 iio: add modifiers for A and B ultraviolet light Currently there are only two modifiers for ultraviolet light: a generic one for any ultraviolet light (IIO_MOD_LIGHT_UV) and one for deep ultraviolet (IIO_MOD_LIGHT_DUV), which is also referred as ultraviolet C (UV-C) band and covers short-wave ultraviolet. There are still no modifiers for the long-wave and medium-wave ultraviolet bands. These two bands are the main components used to obtain the UV index on the Earth's surface. Add modifiers for the ultraviolet A (UV-A) and ultraviolet B (UV-B) bands. Signed-off-by: Javier Carrasco Link: https://lore.kernel.org/r/20231110-veml6075-v3-1-6ee46775b422@gmail.com Signed-off-by: Jonathan Cameron commit 6e79648553818bb21021ccf72ae27f4508844818 Author: David E. Box Date: Wed Nov 29 14:21:32 2023 -0800 platform/x86/intel/pmc: Show Die C6 counter on Meteor Lake Expose the Die C6 counter on Meteor Lake. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-21-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 3621df43b07d9a32e18309de569f43a8b6453966 Author: David E. Box Date: Wed Nov 29 14:21:31 2023 -0800 platform/x86/intel/pmc: Add debug attribute for Die C6 counter Add a "die_c6_us_show" debugfs attribute. Reads the counter value using Intel Platform Monitoring Technology (PMT) driver API. This counter is useful for determining the idle residency of CPUs in the compute tile. Also adds a missing forward declaration for punit_ep which was declared in an earlier upstream commit but only used for the first time in this one. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-20-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 935b8211a31a52c82150b2b83c8428859393860d Author: Xi Pardee Date: Wed Nov 29 14:21:30 2023 -0800 platform/x86/intel/pmc: Read low power mode requirements for MTL-M and MTL-P Add support to read the low power mode requirements for Meteor Lake M and Meteor Lake P. Signed-off-by: Xi Pardee Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-19-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 4d621c3f02ba71cb8ed48b7c32ecb0910000cc28 Author: Xi Pardee Date: Wed Nov 29 14:21:29 2023 -0800 platform/x86/intel/pmc: Retrieve LPM information using Intel PMT On supported platforms, the low power mode (LPM) requirements for entering each idle substate are described in Platform Monitoring Technology (PMT) telemetry entries. Provide a function for platform code to attempt to find and read the requirements from the telemetry entries. Signed-off-by: Xi Pardee Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-18-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 0f601dec1856d675a1251e25e858d8f1cb0b8026 Author: Rajvi Jingar Date: Wed Nov 29 14:21:28 2023 -0800 platform/x86/intel/pmc: Display LPM requirements for multiple PMCs Update the substate_requirements attribute to display the requirements for all the PMCs on a package. Signed-off-by: Rajvi Jingar Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-17-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 104f74943f4830f3a65fb96565b89014c882db85 Author: David E. Box Date: Wed Nov 29 14:21:27 2023 -0800 platform/x86/intel/pmc: Find and register PMC telemetry entries The PMC SSRAM device contains counters that are structured in Intel Platform Monitoring Technology (PMT) telemetry regions. Look for and register these telemetry regions from the driver so that they may be read using the Intel PMT ABI. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-16-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 642dd26f58d91f4bb2e2fcaaf178bbc35369b73a Author: David E. Box Date: Wed Nov 29 14:21:26 2023 -0800 platform/x86/intel/pmc/mtl: Use return value from pmc_core_ssram_init() Instead of checking for a NULL regbase, use the return value from pmc_core_ssram_init() to check if PMC discovery was successful. If not, use the legacy enumeration method (which only works for the primary PMC). Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-15-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit a01486dc4bb17de976c6d0a4b1ad5f8106525dfb Author: David E. Box Date: Wed Nov 29 14:21:25 2023 -0800 platform/x86/intel/pmc: Cleanup SSRAM discovery Clean up the code handling SSRAM discovery. Handle all resource allocation and cleanup in pmc_core_ssram_get_pmc(). Return the error status from this function but only fail the init if we fail to discover the primary PMC. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-14-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 9512920a6be57af191ab2849b3ec393b8e92530a Author: David E. Box Date: Wed Nov 29 14:21:24 2023 -0800 platform/x86/intel/pmc: Allow pmc_core_ssram_init to fail Currently, if the PMC SSRAM initialization fails, no error is returned and the only indication is that a PMC device has not been created. Instead, allow an error to be returned and handled directly by the caller. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-13-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 2e35e3aa9f10ea430468207c3dd9dc33ba1afc33 Author: Xi Pardee Date: Wed Nov 29 14:21:23 2023 -0800 platform/x86:intel/pmc: Call pmc_get_low_power_modes from platform init In order to setup a table of low power mode requirements for Meteor Lake, pmc_core_get_low_power_modes() will need to be run from platform init code so that the enabled modes are known, allowing the use of the pmc_for_each_mode helper. Make the function global and call it from the platform init code. Signed-off-by: Xi Pardee Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-12-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 416eeb2e1fc7b60ab0c7ced26ab966dd7733357d Author: David E. Box Date: Wed Nov 29 14:21:22 2023 -0800 platform/x86/intel/pmt: telemetry: Export API to read telemetry Export symbols to allow access to Intel PMT Telemetry data on available devices. Provides APIs to search, register, and read telemetry using a kref managed pointer that serves as a handle to a telemetry endpoint. To simplify searching for present devices, have the IDA start at 1 instead of 0 so that 0 can be used to indicate end of search. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-11-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 4d1b7efee3fc703c64bacc37c4824888c5f26e8b Author: David E. Box Date: Wed Nov 29 14:21:21 2023 -0800 platform/x86/intel/pmt: Add header to struct intel_pmt_entry The PMT header is passed to several functions. Instead, store the header in struct intel_pmt_entry which is also passed to these functions and shorten the argument list. This simplifies the calls in preparation for later changes. While here also perform a newline cleanup. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-10-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit e97ec7f621fbfdce07bf1b98a26883ee19281747 Author: David E. Box Date: Wed Nov 29 14:21:20 2023 -0800 platform/x86/intel/vsec: Add base address field Some devices may emulate PCI VSEC capabilities in MMIO. In such cases the BAR is not readable from a config space. Provide a field for drivers to indicate the base address to be used. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-9-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 4edbd117ba3f7beacfb439aad60e8a5de77114b4 Author: Gayatri Kammela Date: Wed Nov 29 14:21:19 2023 -0800 platform/x86/intel/vsec: Add intel_vsec_register Add and export intel_vsec_register() to allow the registration of Intel extended capabilities from other drivers. Add check to look for memory conflicts before registering a new capability. Since the vsec provider may not be a PCI device, add a parent field to intel_vsec_platform_info() to allow specifying the parent device for device managed cleanup. Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-8-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 6dfc2514acee37e30ce59f1f25b1f8f6aa7c1b08 Author: David E. Box Date: Wed Nov 29 14:21:18 2023 -0800 platform/x86/intel/vsec: Assign auxdev parent by argument Instead of checking for a NULL parent argument in intel_vsec_add_aux() and then assigning it to the probed device, remove this check and just pass the device in the call. Since this function is exported, return -EINVAL if the parent is not specified. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-7-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 1d1b4770d4b661ecdf899c314ce406b9840c0c22 Author: David E. Box Date: Wed Nov 29 14:21:17 2023 -0800 platform/x86/intel/vsec: Use cleanup.h Use cleanup.h helpers to handle cleanup of resources in intel_vsec_add_dev() after failures. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-6-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 0a0a52abaa65b844afde3d7229c209a8cddc5a07 Author: David E. Box Date: Wed Nov 29 14:21:16 2023 -0800 platform/x86/intel/vsec: remove platform_info from vsec device structure In preparation for exporting an API to register Intel Vendor Specific Extended Capabilities (VSEC) from other drivers, remove the pointer to platform_info from intel_vsec_device. This prevents a potential page fault when auxiliary drivers probe and attempt to dereference this pointer to access the needed quirks field. Instead, just add the quirks to intel_vsec_device. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-5-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit dbc01b0c86a7b23ffd06e14a84591500b04591ed Author: David E. Box Date: Wed Nov 29 14:21:15 2023 -0800 platform/x86/intel/vsec: Move structures to header In preparation for exporting an API to register Intel Vendor Specific Extended Capabilities (VSEC) from other drivers, move needed structures to the header file. Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-4-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit ace7b6f00870cea56460df335606e35ace3c07ac Author: David E. Box Date: Wed Nov 29 14:21:14 2023 -0800 platform/x86/intel/vsec: Remove unnecessary return In intel_vsec_add_aux(), just return from the last call to devm_add_action_or_reset() instead of checking its return value. Suggested-by: Ilpo Järvinen Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-3-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 225a36b96359aceaa9a6399f2dff99627397e637 Author: Jens Wiklander Date: Tue Nov 14 10:52:17 2023 +0100 optee: allocate shared memory with alloc_pages_exact() Allocate memory to share with the secure world using alloc_pages_exact() instead of alloc_pages() for more efficient memory usage. Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit aa041111311d35cb311543f43bc60b825b8cd109 Author: Frank Binns Date: Mon Dec 4 13:28:47 2023 +0000 MAINTAINERS: Document Imagination PowerVR driver patches go via drm-misc This is the tree used by nearly all other DRM drivers, so use it for the PowerVR driver as well. Signed-off-by: Frank Binns Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231204132847.1307340-1-frank.binns@imgtec.com commit 69724b3eac9894853e9b044b65e0add009fc88b5 Author: Jens Wiklander Date: Tue Nov 14 10:52:16 2023 +0100 optee: add page list to kernel private shared memory Until now has kernel private shared memory allocated as dynamic shared memory (not from the static shared memory pool) been returned without a list of physical pages on allocations via RPC. To support allocations larger than one page add a list of physical pages. Reviewed-by: Sumit Garg Signed-off-by: Jens Wiklander commit 5e4c8814a431d21bfaf20b464134f40f2f81e152 Author: RD Babiera Date: Tue Nov 21 20:38:48 2023 +0000 usb: typec: tcpci: add vconn over current fault handling to maxim_core Add TCPC_FAULT_STATUS_VCONN_OC constant and corresponding mask definition. Maxim TCPC is capable of detecting VConn over current faults, so add fault to alert mask. When a Vconn over current fault is triggered, put the port in an error recovery state via tcpm_port_error_recovery. Signed-off-by: RD Babiera Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231121203845.170234-6-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman commit db9e54709895241dda23f9347f619afb15291353 Author: RD Babiera Date: Tue Nov 21 20:38:47 2023 +0000 usb: typec: tcpm: add tcpm_port_error_recovery symbol Add tcpm_port_error_recovery symbol and corresponding event that runs in tcpm_pd_event handler to set the port to the ERROR_RECOVERY state. tcpci drivers can use the symbol to reset the port when tcpc faults affect port functionality. Signed-off-by: RD Babiera Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231121203845.170234-5-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman commit 9f802703fde29011aa9003cb1c5a418623a944ca Author: Javier Carrasco Date: Thu Nov 23 16:37:02 2023 +0100 dt-bindings: usb: tps6598x: add reset-gpios property The TPS6598x device family provides a high-level reset pin. It can be either grounded or used to reinitialize all device settings. Document the reset GPIO as an optional property and add it to the existing example. Signed-off-by: Javier Carrasco Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230912-topic-tps6598x_reset-v3-2-0c2873070a77@wolfvision.net Signed-off-by: Greg Kroah-Hartman commit 6a4d4a27f986ac19338da8f18d73eed80ce28fca Author: Javier Carrasco Date: Thu Nov 23 16:37:01 2023 +0100 usb: typec: tps6598x: add reset gpio support The TPS6598x PD controller provides an active-high hardware reset input that reinitializes all device settings. If it is not grounded by design, the driver must be able to de-assert it in order to initialize the device. The PD controller is not ready for registration right after the reset de-assertion and a delay must be introduced in that case. According to TI, the delay can reach up to 1000 ms [1], which is in line with the experimental results obtained with a TPS65987D. Add a GPIO descriptor for the reset signal and basic reset management for initialization and suspend/resume. [1] https://e2e.ti.com/support/power-management-group/power-management/ f/power-management-forum/1269856/tps65987d-tps65987d-reset-de-assert- to-normal-operation/4809389#4809389 Signed-off-by: Javier Carrasco Reviewed-by: Bryan O'Donoghue Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20230912-topic-tps6598x_reset-v3-1-0c2873070a77@wolfvision.net Signed-off-by: Greg Kroah-Hartman commit aa4f2b3e418e8673e55145de8b8016a7a9920306 Author: Douglas Anderson Date: Fri Dec 1 10:29:52 2023 -0800 r8152: Choose our USB config with choose_configuration() rather than probe() If you deauthorize the r8152 device (by writing 0 to the "authorized" field in sysfs) and then reauthorize it (by writing a 1) then it no longer works. This is because when you do the above we lose the special configuration that we set in rtl8152_cfgselector_probe(). Deauthorizing causes the config to be set to -1 and then reauthorizing runs the default logic for choosing the best config. I made an attempt to fix it so that the config is kept across deauthorizing / reauthorizing [1] but it was a bit ugly. Let's instead use the new USB core feature to override choose_configuration(). This patch relies upon the patches ("usb: core: Don't force USB generic_subclass drivers to define probe()") and ("usb: core: Allow subclassed USB drivers to override usb_choose_configuration()") [1] https://lore.kernel.org/r/20231130154337.1.Ie00e07f07f87149c9ce0b27ae4e26991d307e14b@changeid Fixes: ec51fbd1b8a2 ("r8152: add USB device driver for config selection") Suggested-by: Alan Stern Signed-off-by: Douglas Anderson Reviewed-by: Grant Grundler Link: https://lore.kernel.org/r/20231201102946.v2.3.Ie00e07f07f87149c9ce0b27ae4e26991d307e14b@changeid Signed-off-by: Greg Kroah-Hartman commit a87b8e3be926af0fc3b9b1af42b1127bd1ff077c Author: Douglas Anderson Date: Fri Dec 1 10:29:51 2023 -0800 usb: core: Allow subclassed USB drivers to override usb_choose_configuration() For some USB devices we might want to do something different for usb_choose_configuration(). One example here is the r8152 driver where we want to end up using the vendor driver with the preferred interface. The r8152 driver tried to make things work by implementing a USB generic_subclass driver and then overriding the normal config selection after it happened. This is less than ideal and also caused breakage if someone deauthorized and re-authorized the USB device because the USB core ended up going back to it's default logic for choosing the best config. I made an attempt to fix this [1] but it was a bit ugly. Let's do this better and allow USB generic_subclass drivers to override usb_choose_configuration(). [1] https://lore.kernel.org/r/20231130154337.1.Ie00e07f07f87149c9ce0b27ae4e26991d307e14b@changeid Suggested-by: Alan Stern Signed-off-by: Douglas Anderson Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20231201102946.v2.2.Iade5fa31997f1a0ca3e1dec0591633b02471df12@changeid Signed-off-by: Greg Kroah-Hartman commit c2d95fcff0f01fa00d9683dddeeea6732b74c779 Author: Douglas Anderson Date: Fri Dec 1 10:29:50 2023 -0800 usb: core: Don't force USB generic_subclass drivers to define probe() There's no real reason that subclassed USB drivers _need_ to define probe() since they might want to subclass for some other reason. Make it optional to define probe() if we're a generic_subclass. Signed-off-by: Douglas Anderson Reviewed-by: Grant Grundler Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20231201102946.v2.1.I7ea0dd55ee2acdb48b0e6d28c1a704ab2c29206f@changeid Signed-off-by: Greg Kroah-Hartman commit dadc0f0f7afc0273ff680b504ed830d0c307dea3 Author: Lee Jones Date: Thu Nov 30 10:54:39 2023 +0000 usb: gadget: f_tcm: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() Since snprintf() has the documented, but still rather strange trait of returning the length of the data that *would have been* written to the array if space were available, rather than the arguably more useful length of data *actually* written, it is usually considered wise to use something else instead in order to avoid confusion. In the case of sysfs call-backs, new wrappers exist that do just that. This patch replaces just one use of snprintf() found in the sysfs .show() call-back with the new sysfs_emit() helper. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Greg Kroah-Hartman Cc: "Martin K. Petersen" Cc: Dmitry Bogdanov Cc: linux-usb@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231130105459.3208986-6-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 38168e2de320b9c12132eb72cf1f1d3d411fe38c Author: Lee Jones Date: Thu Nov 30 10:54:38 2023 +0000 usb: gadget: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() Since snprintf() has the documented, but still rather strange trait of returning the length of the data that *would have been* written to the array if space were available, rather than the arguably more useful length of data *actually* written, it is usually considered wise to use something else instead in order to avoid confusion. In the case of sysfs call-backs, new wrappers exist that do just that. This patch replaces just one use of snprintf() found in the sysfs .show() call-back with the new sysfs_emit() helper. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231130105459.3208986-5-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7d7f794482b74e39d8c0cd830333eb40fc0234d4 Author: Lee Jones Date: Thu Nov 30 10:54:37 2023 +0000 usb: fotg210-hcd: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. The uses in this file both seem to assume that data *has been* written! Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Linus Walleij Cc: Greg Kroah-Hartman Cc: Yuan-Hsin Chen Cc: Feng-Hsin Chiang Cc: Po-Yu Chuang Cc: linux-usb@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231130105459.3208986-4-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit b385ef088c7aab20a2c0dc20d390d69a6620f0f3 Author: Lee Jones Date: Thu Nov 30 10:54:36 2023 +0000 usb: cdnsp: Replace snprintf() with the safer scnprintf() variant There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. The uses in this file all seem to assume that data *has been* written! Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Pawel Laszczak Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231130105459.3208986-3-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit 36d8aef52d0562b5b1dc2e54d0fad1dee07182c2 Author: Lee Jones Date: Thu Nov 30 10:54:35 2023 +0000 usb: atm: Remove snprintf() from sysfs call-backs and replace with sysfs_emit() Since snprintf() has the documented, but still rather strange trait of returning the length of the data that *would have been* written to the array if space were available, rather than the arguably more useful length of data *actually* written, it is usually considered wise to use something else instead in order to avoid confusion. In the case of sysfs call-backs, new wrappers exist that do just that. This patch replaces the 2 uses of snprintf() found in the sysfs .show() call-backs with the new sysfs_emit() helpers. Whist we're at it, let's replace the sprintf()s as well. For no other reason than consistency. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Matthieu CASTET Cc: Stanislaw Gruszka Cc: Greg Kroah-Hartman Cc: Damien Bergamini Cc: linux-usb@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20231130105459.3208986-2-lee@kernel.org Signed-off-by: Greg Kroah-Hartman commit ad662c6dbd7aee3ecece6d604a93d8e84851ea17 Author: Linus Walleij Date: Tue Nov 28 23:56:32 2023 +0100 iio: proximity: irsd200: Drop unused include The driver includes the legacy GPIO header but doesn't use any symbols from it. Drop it. Signed-off-by: Linus Walleij Reviewed-by: Waqar Hameed Link: https://lore.kernel.org/r/20231128-descriptors-iio-v1-1-da1e94755db6@linaro.org Signed-off-by: Jonathan Cameron commit a61b9a40d67cfe7b79525ad3c3cff19938c5416f Author: Rob Herring Date: Tue Nov 28 15:48:02 2023 -0600 dt-bindings: iio/adc: ti,palmas-gpadc: Drop incomplete example The example for the TI Palmas ADC is incomplete as the binding is the full PMIC, not just the sub-functions. It is preferred for MFD examples to be complete in the top-level MFD device binding rather than piecemeal in each sub-function binding. This also fixes an undocumented (by schema) compatible warning for '"ti,twl6035-pmic", "ti,palmas-pmic"'. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231128214803.3975542-1-robh@kernel.org Signed-off-by: Jonathan Cameron commit e737d495b207592106b38449cc9f402133456062 Author: Michael Hennerich Date: Wed Nov 29 14:03:53 2023 +0100 iio: dac: ad5791: Add support for controlling RBUF via devicetree This patch adds support for an external amplifier to be connected in a gain of two configuration. Signed-off-by: Michael Hennerich Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20231129-ad5791-michael-stuff-v3-2-48e192b00909@analog.com Signed-off-by: Jonathan Cameron commit d49f69425d0db21c80c11ee537220658262bb7f4 Author: Michael Hennerich Date: Wed Nov 29 14:03:52 2023 +0100 dt-bindings: adi,ad5791: Add support for controlling RBUF Added new property to support an external amplifier to be connected in a gain of two configuration. Signed-off-by: Michael Hennerich Acked-by: Krzysztof Kozlowski Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20231129-ad5791-michael-stuff-v3-1-48e192b00909@analog.com Signed-off-by: Jonathan Cameron commit 8cbcc1dbf8a62c730fadd60de761e0658547a589 Author: David E. Box Date: Wed Nov 29 14:21:13 2023 -0800 platform/x86/intel/vsec: Fix xa_alloc memory leak Commit 936874b77dd0 ("platform/x86/intel/vsec: Add PCI error recovery support to Intel PMT") added an xarray to track the list of vsec devices to be recovered after a PCI error. But it did not provide cleanup for the list leading to a memory leak that was caught by kmemleak. Do xa_alloc() before devm_add_action_or_reset() so that the list may be cleaned up with xa_erase() in the release function. Fixes: 936874b77dd0 ("platform/x86/intel/vsec: Add PCI error recovery support to Intel PMT") Signed-off-by: David E. Box Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231129222132.2331261-2-david.e.box@linux.intel.com [hdegoede@redhat.com: Add missing xa_erase() on error-exit Signed-off-by: Hans de Goede commit 914437992876838662c968cb416f832110fb1093 Author: Dan Carpenter Date: Mon Dec 4 15:29:00 2023 +0300 drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking The i2c_master_send/recv() functions return negative error codes or the number of bytes that were able to be sent/received. This code has two problems. 1) Instead of checking if all the bytes were sent or received, it checks that at least one byte was sent or received. 2) If there was a partial send/receive then we should return a negative error code but this code returns success. Fixes: a9fe713d7d45 ("drm/bridge: Add PTN3460 bridge driver") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/0cdc2dce-ca89-451a-9774-1482ab2f4762@moroto.mountain commit f6d8a80f1d10ff01cff3ac26e242165a270bbbad Author: Stefan Eichenberger Date: Wed Nov 15 13:13:38 2023 +0100 drm/bridge: lt8912b: Add power supplies Add supplies to the driver that can be used to turn the Lontium lt8912b on and off. It can have up to 7 independent supplies, we add them all and enable/disable them with bulk_enable/disable. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20231115121338.22959-4-francesco@dolcini.it commit f168c7f7d1a0cb12a4888af9f3f907139372f137 Author: Stefan Eichenberger Date: Wed Nov 15 13:13:37 2023 +0100 dt-bindings: display: bridge: lt8912b: Add power supplies Add Lontium lt8912b power supplies. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Acked-by: Conor Dooley Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20231115121338.22959-3-francesco@dolcini.it commit 0b82a2b70f890e8dd7a46dfbfcce00bd7e434762 Author: Stefan Eichenberger Date: Wed Nov 15 13:13:36 2023 +0100 drm/bridge: lt8912b: Add suspend/resume support Add support for suspend and resume. The lt8912b will power off when going into suspend and power on when resuming. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20231115121338.22959-2-francesco@dolcini.it commit e66523c72c9aae0ff0dae6859eb77b04de1e8e5f Author: Yaxiong Tian Date: Fri Nov 24 09:49:13 2023 +0800 extcon: fix possible name leak in extcon_dev_register() In the error path after calling dev_set_name(), the device name is leaked. To fix this, moving dev_set_name() after the error path and before device_register. Link: https://lore.kernel.org/lkml/TYZPR01MB4784ADCD3E951E0863F3DB72D5B8A@TYZPR01MB4784.apcprd01.prod.exchangelabs.com/ Signed-off-by: Yaxiong Tian Signed-off-by: Chanwoo Choi commit d9cd21d441c8c7c22ef448d23f1d6f5fa698b7f0 Author: Henry Shi Date: Fri Nov 24 15:03:34 2023 -0500 platform/x86: Add Silicom Platform Driver Add Silicom platform (silicom-platform) Linux driver for Swisscom Business Box (Swisscom BB) as well as Cordoba family products. This platform driver provides support for various functions via the Linux LED framework, GPIO framework, Hardware Monitoring (HWMON) and device attributes. Signed-off-by: Henry Shi Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231124200334.5318-1-henryshi2018@gmail.com Signed-off-by: Hans de Goede commit 5cb475174cce1bfedf1025b6e235e2c43d81144f Author: Yang Yingliang Date: Wed Nov 29 16:11:47 2023 +0800 spi: cadence-quadspi: add missing clk_disable_unprepare() in cqspi_probe() cqspi_jh7110_clk_init() is called after clk_prepare_enable(cqspi->clk), if it fails, it should goto label 'probe_reset_failed' to disable cqspi->clk. In the error path after calling cqspi_jh7110_clk_init(), cqspi_jh7110_disable_clk() need be called. Fixes: 33f1ef6d4eb6 ("spi: cadence-quadspi: Add clock configuration for StarFive JH7110 QSPI") Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20231129081147.628004-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit 06891af2709b5dfa4081ff1f07b9f4c2743834b7 Merge: 7a030abc0185b 9b2ef250b31d4 Author: Mark Brown Date: Mon Dec 4 12:31:42 2023 +0000 spi: spl022: fix sleeping in interrupt context Merge series from Nam Cao : While running the spl022, I got the following warning: BUG: sleeping function called from invalid context at drivers/spi/spi.c:1428 This is because between spi transfers, spi_transfer_delay_exec() (who may sleep if the delay is >10us) is called in interrupt context. This is a problem for anyone who runs this driver and need more than 10us delay. Patch 1 adds an error reporting mechanism, needed by patch 2 who switch to use the default spi_transfer_one_message(), which fix the problem. The series is tested with polling transfer mode and interrupt transfer mode. I can't test the DMA mode, so some help testing here is very appreciated. commit e183130c9a87cc57c73ecc9c251e10d07b658530 Author: Uwe Kleine-König Date: Thu Jul 13 09:52:35 2023 +0200 sparc: Use $(kecho) to announce kernel images being ready My build test setup compiles allmodconfig all various architectures (arm64 m68k powerpc riscv s390 sparc64 x86_64) using make -s. If there is no warning, the only output is kernel: arch/sparc/boot/image is ready kernel: arch/sparc/boot/zImage is ready from the sparc64 build. Copy the incantation from x86 which is silent when building with make -s and also mentions a version indication. Signed-off-by: Uwe Kleine-König Acked-by: Sam Ravnborg Signed-off-by: Arnd Bergmann commit f2dd716cb44ad97fcaa757687ebd8d66cced7536 Author: Krzysztof Kozlowski Date: Wed Nov 29 12:10:41 2023 +0100 dt-bindings: iio: honeywell,mprls0025pa: drop ref from pressure properties The dtschema treats now properties with '-pascal' suffix as standard one and already defines $ref for them, thus the $ref should be dropped from the bindings. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231129111041.26782-1-krzysztof.kozlowski@linaro.org Signed-off-by: Jonathan Cameron commit 21f49681658dba6a9d9f0b7945af348600768d78 Merge: 8470e4368b0f3 df094d8fe886b Author: David S. Miller Date: Mon Dec 4 11:06:46 2023 +0000 Merge branch 'octeontx2-multicast-mirror-offload' Suman Ghosh says: ==================== octeontx2: Multicast/mirror offload changes This patchset includes changes to support TC multicast/mirror offload. Patch #1: Adds changes to support new mailbox to offload multicast/mirror offload. Patch #2: Adds TC related changes which uses the newly added mailboxes to offload multicast/mirror rules. ==================== Signed-off-by: David S. Miller commit df094d8fe886b31e7c648cca8bf401062ef1c049 Author: Suman Ghosh Date: Thu Nov 30 09:13:24 2023 +0530 octeontx2-pf: TC flower offload support for mirror This patch extends TC flower offload support for mirroring ingress traffic to a different PF/VF. Below is an example command, 'tc filter add dev eth1 ingress protocol ip flower src_ip skip_sw action mirred ingress mirror dev eth2' Signed-off-by: Suman Ghosh Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 51b2804c19cd79e9e4ee384a37796a1d243b8f3d Author: Suman Ghosh Date: Thu Nov 30 09:13:23 2023 +0530 octeontx2-af: Add new mbox to support multicast/mirror offload A new mailbox is added to support offloading of multicast/mirror functionality. The mailbox also supports dynamic updation of the multicast/mirror list. Signed-off-by: Suman Ghosh Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 3c8260ce76634291aed877032a41e373884d69e4 Author: David Regan Date: Fri Nov 24 17:24:38 2023 -0800 mtd: rawnand: brcmnand: exec_op implementation exec_op implementation for Broadcom STB, Broadband and iProc SoC This adds exec_op and removes the legacy interface. Based on changes proposed by Boris Brezillon. Link: https://github.com/bbrezillon/linux/commit/4ec6f8d8d83f5aaca5d1877f02d48da96d41fcba Link: https://github.com/bbrezillon/linux/commit/11b4acffd761c4928652d7028d19fcd6f45e4696 Signed-off-by: David Regan [Miquel Raynal: Misc style fixes] Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231125012438.15191-4-dregan@broadcom.com commit c86b63b82fde4f96ee94dde827a5f28ff5adeb57 Author: David Regan Date: Fri Nov 24 17:24:37 2023 -0800 mtd: rawnand: brcmnand: pass host struct to bcmnand_ctrl_poll_status Pass host struct to bcmnand_ctrl_poll_status instead of ctrl struct since real time status requires host, and ctrl is a member of host. Real time status is required for low level commands vs cached status since the NAND controller will not do an automatic status read at the end of a low level command as it would with a high level command. Signed-off-by: David Regan Reviewed-by: Florian Fainelli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231125012438.15191-3-dregan@broadcom.com commit 68cce21e3cc5fea8d955a62394454149270c98bc Author: David Regan Date: Fri Nov 24 17:24:36 2023 -0800 mtd: rawnand: NAND controller write protect Allow NAND controller to be responsible for write protect pin handling during fast path and exec_op destructive operation when controller_wp flag is set. Signed-off-by: David Regan Reviewed-by: Florian Fainelli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231125012438.15191-2-dregan@broadcom.com commit 578dc962ff2000ba4bf52d50717aea0819615634 Author: Boris Brezillon Date: Fri Nov 24 17:24:35 2023 -0800 mtd: rawnand: Add destructive operation Erase and program operations need the write protect (wp) pin to be de-asserted to take effect. Add the concept of destructive operation and pass the information to exec_op() so controllers know when they should de-assert this pin without having to decode the command opcode. Signed-off-by: Boris Brezillon Signed-off-by: David Regan Reviewed-by: Florian Fainelli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231125012438.15191-1-dregan@broadcom.com commit e4256751df4a0a3860f181588ee730dd19cb0c30 Author: Khaled Almahallawy Date: Thu Nov 30 15:15:10 2023 -0800 drm/display/dp: Add the remaining Square PHY patterns DPCD register definitions DP2.1 Specs added new DPCDs definitions for square pattern configs[1] These new definitions are used for UHBR Source Transmitter Equalizations tests[2]. Add the 3 new values for square pattern. v2: rebase [1]: DP2.1 Specs - 2.12.3.6.5 Square Pattern [2]: DP2.1 PHY CTS specs - 4.3 UHBR Source Transmitter Equalization Cc: Jani Nikula Cc: Imre Deak Cc: Lee Shawn C Signed-off-by: Khaled Almahallawy Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231130231510.221143-1-khaled.almahallawy@intel.com commit bec3db03911bd85da29c1c8ee556162153002c9a Author: Sebastian Reichel Date: Mon Nov 13 23:57:24 2023 +0100 media: v4l: async: Drop useless list move operation v4l2_async_unbind_subdev_one(), which is called in the line following the list_move() operation contains list_move_tail() for the same entry and overrides anything list_move() did. Thus it can be removed. Signed-off-by: Sebastian Reichel Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 3de6ee94aae701fa949cd3b5df6b6a440ddfb8f2 Author: Sebastian Reichel Date: Mon Nov 13 23:57:23 2023 +0100 media: v4l: async: Fix duplicated list deletion The list deletion call dropped here is already called from the helper function in the line before. Having a second list_del() call results in either a warning (with CONFIG_DEBUG_LIST=y): list_del corruption, c46c8198->next is LIST_POISON1 (00000100) If CONFIG_DEBUG_LIST is disabled the operation results in a kernel error due to NULL pointer dereference. Fixes: 28a1295795d8 ("media: v4l: async: Allow multiple connections between entities") Signed-off-by: Sebastian Reichel Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 2112f3a28e8d9d1e2faaa32d124b450bde055b72 Author: Laurent Pinchart Date: Mon Oct 23 21:19:22 2023 +0300 media: v4l2-subdev: Fix indentation in v4l2-subdev.h Fix a simple indentation issue in the v4l2-subdev.h header. Fixes: f57fa2959244 ("media: v4l2-subdev: Add new ioctl for client capabilities") Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 529322112a3bcce5906ad8f26b7a7c51e93d0e5f Author: Sakari Ailus Date: Tue Nov 7 12:46:42 2023 +0200 media: ccs: Use V4L2 CCI for accessing sensor registers Use V4L2 CCI for accessing device's registers. The 8-bit compatibility read option is removed but this is supported by regmap through other means. Also the CCS register definitions are re-generated with V4L2 CCI definitions. The older SMIA++ register definitions have been manually converted. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit d180509cca583146f5e6386cbc28c4297d1d7aad Author: Sakari Ailus Date: Tue Nov 7 11:37:21 2023 +0200 media: ccs: Better separate CCS static data access Separate CCS static data read-only register access in ccs-reg-access.c by naming them differently. The code in this file generally deals with reading and writing registers where as static data (when it comes to ccs_static_data_read_ro_reg()) contains the read-only register values but no hardware registers are accessed in that case. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 5d6ce399d986dcf40d331d825fb2e4f8d0329865 Author: Sakari Ailus Date: Tue Nov 7 11:32:46 2023 +0200 media: ccs: Generate V4L2 CCI compliant register definitions Generate register definitions that are fit for use with V4L2 CCI. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit cd93cc245dfe334c38da98c14b34f9597e1b4ea6 Author: Sakari Ailus Date: Tue Nov 7 17:42:40 2023 +0200 media: v4l: cci: Add macros to obtain register width and address Add CCI_REG_WIDTH() macro to obtain register width in bits and similarly, CCI_REG_WIDTH_BYTES() to obtain it in bytes. Also add CCI_REG_ADDR() macro to obtain the address of a register. Use both macros in v4l2-cci.c, too. Signed-off-by: Sakari Ailus Reviewed-by: Hans de Goede Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 94ed00981b5167e22f66fd5bfedcc7cc7fd72551 Author: Sakari Ailus Date: Tue Nov 7 11:31:13 2023 +0200 media: v4l: cci: Add driver-private bit definitions Provide a few bits for drivers to store private information on register definitions. Signed-off-by: Sakari Ailus Reviewed-by: Hans de Goede Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit eba5058633b4d11e2a4d65eae9f1fce0b96365d9 Author: Sakari Ailus Date: Tue Nov 7 10:45:30 2023 +0200 media: v4l: cci: Include linux/bits.h linux/bits.h is needed for GENMASK(). Include it. Signed-off-by: Sakari Ailus Reviewed-by: Hans de Goede Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil commit 9641e8019ae8349c7a487e5165469240257410cd Author: Laurent Pinchart Date: Fri Oct 27 12:16:43 2023 +0300 media: microchip-isc: Remove dead code in pipeline validation The isc_try_fse() function, called from isc_validate(), takes two parameters, an isc_device pointer, and a v4l2_subdev_state pointer. The isc_device is accessed but not modified by the function. The state is modified, including the struct v4l2_subdev_pad_config array it points to, but they are then never used by the caller. Furthermore, the V4L2 subdev operation called by isc_try_fse() doesn't modify the subdev it is called on. The isc_try_fse() function has thus no effect, and can just be dropped. Signed-off-by: Laurent Pinchart Reviewed-by: Eugen Hristev Tested-by: Eugen Hristev [Sakari Ailus: Resolve conflicts due to API changes.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 6a6e49f89297cdf2c8c4deec54395179643b4a05 Author: Sakari Ailus Date: Wed Nov 1 10:00:05 2023 +0200 media: Documentation: Initialisation finishes before subdev registration Document that sub-device initialisation needs to complete before the async sub-device is registered as there is no further driver action needed before the sensor becomes accessible via the UAPI. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0e7f68fe16022fc424fc7244287fe23c7c2fe862 Author: Sakari Ailus Date: Wed Nov 1 10:22:20 2023 +0200 media: imx319: Enable runtime PM before registering async sub-device As the sensor may be accessible right after its async sub-device is registered, enable runtime PM before doing so. Signed-off-by: Sakari Ailus Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil commit ff0fcda15feb4cc1815656fecbe15bd33f37c4f2 Author: Sakari Ailus Date: Fri Oct 27 11:44:05 2023 +0300 media: ccs: Print ireal and float limits converted to integers A number of CCS register value limits are in ireal or float format. Also convert them to integers for easier interpretation. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit e242e9c144050ed120cf666642ba96b7c4462a4c Author: Bingbu Cao Date: Wed Nov 22 17:46:09 2023 +0800 media: ov9734: Enable runtime PM before registering async sub-device As the sensor device maybe accessible right after its async sub-device is registered, such as ipu-bridge will try to power up sensor by sensor's client device's runtime PM from the async notifier callback, if runtime PM is not enabled, it will fail. So runtime PM should be ready before its async sub-device is registered and accessible by others. Fixes: d3f863a63fe4 ("media: i2c: Add ov9734 image sensor driver") Cc: stable@vger.kernel.org Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7b0454cfd8edb3509619407c3b9f78a6d0dee1a5 Author: Bingbu Cao Date: Wed Nov 22 17:46:08 2023 +0800 media: ov13b10: Enable runtime PM before registering async sub-device As the sensor device maybe accessible right after its async sub-device is registered, such as ipu-bridge will try to power up sensor by sensor's client device's runtime PM from the async notifier callback, if runtime PM is not enabled, it will fail. So runtime PM should be ready before its async sub-device is registered and accessible by others. Fixes: 7ee850546822 ("media: Add sensor driver support for the ov13b10 camera.") Cc: stable@vger.kernel.org Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 47a78052db51b16e8045524fbf33373b58f1323b Author: Bingbu Cao Date: Wed Nov 22 17:46:07 2023 +0800 media: ov01a10: Enable runtime PM before registering async sub-device As the sensor device maybe accessible right after its async sub-device is registered, such as ipu-bridge will try to power up sensor by sensor's client device's runtime PM from the async notifier callback, if runtime PM is not enabled, it will fail. So runtime PM should be ready before its async sub-device is registered and accessible by others. It also sets the runtime PM status to active as the sensor was turned on by i2c-core. Fixes: 0827b58dabff ("media: i2c: add ov01a10 image sensor driver") Cc: stable@vger.kernel.org Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit efa5fe19c0a9199f49e36e1f5242ed5c88da617d Author: Bingbu Cao Date: Wed Nov 22 17:46:06 2023 +0800 media: imx355: Enable runtime PM before registering async sub-device As the sensor device maybe accessible right after its async sub-device is registered, such as ipu-bridge will try to power up sensor by sensor's client device's runtime PM from the async notifier callback, if runtime PM is not enabled, it will fail. So runtime PM should be ready before its async sub-device is registered and accessible by others. Fixes: df0b5c4a7ddd ("media: add imx355 camera sensor driver") Cc: stable@vger.kernel.org Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 1116efbff3b106ec131e833f0e78f35c923d0104 Author: Andy Shevchenko Date: Wed Nov 29 16:01:28 2023 +0200 drm/i915/display: Don't use "proxy" headers The driver uses math.h and not util_macros.h. Signed-off-by: Andy Shevchenko Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231129140129.699767-1-andriy.shevchenko@linux.intel.com commit 687eb09b1d76d01401dd9b22efb34931c3f1e21d Author: Jani Nikula Date: Wed Nov 29 19:35:06 2023 +0200 drm/i915/syncmap: squelch a sparse warning The code is fine, really, but tweak it to get rid of the sparse warning: drivers/gpu/drm/i915/selftests/i915_syncmap.c:80:54: warning: dubious: x | !y Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231129173506.1194437-1-jani.nikula@intel.com commit 28e0f37722965fa150af31d82101c95fd21aef60 Author: Hugues Fruchet Date: Mon Nov 27 18:08:17 2023 +0100 media: stm32-dcmipp: STM32 DCMIPP camera interface driver This V4L2 subdev driver enables Digital Camera Memory Interface Pixel Processor(DCMIPP) of STMicroelectronics STM32 SoC series. Signed-off-by: Hugues Fruchet Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil [hverkuil: remove empty line at end of source] commit fa0f34188a916bf1c0e1299405d394431bf5a3b2 Author: Alain Volmat Date: Mon Nov 27 18:08:16 2023 +0100 media: MAINTAINERS: add entry for STM32 DCMIPP driver Add the entry related to the STM32 MEDIA DCMIPP driver within the MAINTAINERS file. Add myself as maintainer of the DCMI driver as well. Signed-off-by: Alain Volmat Reviewed-by: Laurent Pinchart [Sakari Ailus: Arrange files alphabetically.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c7387b069e602b710471bddc627c15473b32f8d1 Author: Alain Volmat Date: Mon Nov 27 18:08:15 2023 +0100 dt-bindings: media: add bindings for stm32 dcmipp Add the yaml binding for the ST Microelectronics STM32 DCMIPP (Digital Camera Memory Interface Pixel Processor) Signed-off-by: Alain Volmat Reviewed-by: Conor Dooley Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 998ba665e16e651715d80d1795044c02fa4eb35d Author: Alain Volmat Date: Mon Nov 27 14:51:12 2023 +0100 media: i2c: st-vgxy61: add v4l2_fwnode ctrls parse and addition Allow parsing of the v4l2_fwnode properties from the DT and addition of those properties (such as orientation, rotation). Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit b4c4f8b81694f16b602e5e7b6d308d5ec69e6207 Author: Alain Volmat Date: Mon Nov 27 14:51:11 2023 +0100 media: i2c: st-vgxy61: Add V4L2_SUBDEV_FL_HAS_EVENTS and subscribe hooks Any V4L2 subdevice that implements controls and declares V4L2_SUBDEV_FL_HAS_DEVNODE should also declare V4L2_SUBDEV_FL_HAS_EVENTS and implement subscribe_event and unsubscribe_event hooks. With that done, v4l2-compliance testing is now ok. Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 2cc0f07718f244d128bd8f38ad4e41f5c67222c1 Author: Alain Volmat Date: Sat Nov 25 19:20:55 2023 +0100 media: i2c: st-mipid02: add Y8 format support Add support of MEDIA_BUS_FMT_Y8_1X8. Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 248b6248eaea4ee62f9c54feafff204ee2b98d66 Author: Alain Volmat Date: Sat Nov 25 19:20:54 2023 +0100 media: i2c: st-mipid02: removal of unused link_frequency variable link_frequency variable within struct mipid02_dev seems to have never been used hence remove it. Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 290f9b3406d748eda5a20562df4a2c45a9c1b0dd Author: Alain Volmat Date: Sat Nov 25 19:20:53 2023 +0100 media: i2c: st-mipid02: use mipi-csi macro for data-type Use MIPI data-type macros. Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 04d170b288b3404924282086b065a01f3b8d0795 Author: Alain Volmat Date: Sat Nov 25 19:20:52 2023 +0100 media: i2c: st-mipid02: use active state to store pad formats Store formats information within pad allowing to simplify further more the driver (mutex / format store within the driver structure no more necessary). Signed-off-by: Alain Volmat [Sakari Ailus: Address init_cfg -> init_state API change.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 6223dafa3c9111d17c546b4ca5bbe26057f913ce Author: Alain Volmat Date: Sat Nov 25 19:20:51 2023 +0100 media: i2c: st-mipid02: use cci_* helpers for register access. Use cci_read & cci_write functions for accessing registers. Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c26eb0f323419abc9ca94d2c56546511e23692bb Author: Alain Volmat Date: Sat Nov 25 19:20:50 2023 +0100 media: i2c: st-mipid02: don't keep track of streaming status As explained in the following series, subdev do not have to keep track of their streaming status: https://lore.kernel.org/linux-media/20230914181704.4811-1-laurent.pinchart@ideasonboard.com/ Signed-off-by: Alain Volmat [Sakari Ailus: Remove redundant local variable in mipid02_set_fmt.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 046ee0e2a4d602268a49be0d77df8c85559015e3 Author: Alain Volmat Date: Sat Nov 25 19:20:49 2023 +0100 media: i2c: st-mipid02: add usage of v4l2_get_link_freq Use the helper v4l2_get_link_freq instead of performing manually check of the LINK_FREQ or PIXELRATE ctrls. Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit b33cb0cbe2893b96ecbfa16254407153f4b55d16 Author: Alain Volmat Date: Mon Nov 13 15:57:30 2023 +0100 media: i2c: st-mipid02: correct format propagation Use a copy of the struct v4l2_subdev_format when propagating format from the sink to source pad in order to avoid impacting the sink format returned to the application. Thanks to Jacopo Mondi for pointing the issue. Fixes: 6c01e6f3f27b ("media: st-mipid02: Propagate format from sink to source pad") Signed-off-by: Alain Volmat Cc: stable@vger.kernel.org Reviewed-by: Jacopo Mondi Reviewed-by: Daniel Scally Reviewed-by: Benjamin Mugnier Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c9e3e84963a79bc50791ad99bcd06920ee2f28c7 Author: Sakari Ailus Date: Tue Oct 31 20:22:37 2023 +0200 media: v4l: fwnode: Parse MIPI DisCo for Imaging properties Parse MIPI DisCo for Imaging properties "mipi-img-lens-focus" and "mipi-img-flash-leds" for VCMs and flash LEDs. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 5755be5f15d9e651ed433e5dbf7b7b968efb3064 Author: Laurent Pinchart Date: Mon Nov 27 11:07:44 2023 +0200 media: v4l2-subdev: Rename .init_cfg() operation to .init_state() The subdev .init_cfg() operation is affected by two issues: - It has long been extended to initialize a whole v4l2_subdev_state instead of just a v4l2_subdev_pad_config, but its name has stuck around. - Despite operating on a whole subdev state and not being directly exposed to the subdev users (either in-kernel or through the userspace API), .init_cfg() is categorized as a subdev pad operation. This participates in making the subdev API confusing for new developers. Fix it by renaming the operation to .init_state(), and make it a subdev internal operation. Signed-off-by: Laurent Pinchart Acked-by: Michael Riesch # for imx415 Acked-by: Shuah Khan # for vimc Reviewed-by: Philipp Zabel Reviewed-by: Tomi Valkeinen [Sakari Ailus: Resolved a conflict in Renesas vsp1 driver.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 7a52ab415b43f3b4680b69f6652ba2ec6716e55f Author: Paul Elder Date: Fri Nov 24 16:26:25 2023 +0200 media: i2c: Add driver for THine THP7312 The THP7312 is an external camera ISP from THine. Add a V4L2 subdev driver for it. Signed-off-by: Paul Elder Co-developed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart [Sakari Ailus: squash a patch to fix missing mutex_unlock by Laurent.] Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0d9e32a8075a6cccbab294f98ccf7d33821d9b1c Author: Laurent Pinchart Date: Fri Nov 24 16:26:24 2023 +0200 media: uapi: Add controls for the THP7312 ISP The THP7312 is an external ISP from THine. As such, it implements a large number of parameters to control all aspects of the image processing. Many of those controls are already standard in V4L2, but some are fairly device-specific. Reserve a range of 32 controls for the device. The driver will implement 4 device-specific controls to start with, define and document them. 28 additional device-specific controls should be enough for future development. Co-developed-by: Paul Elder Signed-off-by: Paul Elder Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit cba1ec57b33127ed810d3ab14645086a07e050a6 Author: Paul Elder Date: Fri Nov 24 16:26:23 2023 +0200 dt-bindings: media: Add bindings for THine THP7312 ISP The THP7312 is an external ISP from THine. Add DT bindings for it. Signed-off-by: Paul Elder Co-developed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit a9c8c738066b7ba9e208cfc3200a6f60593982b4 Author: Sakari Ailus Date: Mon Nov 6 09:31:41 2023 +0200 device property: Add fwnode_name_eq() Add fwnode_name_eq() to implement the functionality of of_node_name_eq() on fwnode property API. The same convention of ending the comparison at '@' (besides NUL) is applied on also both ACPI and swnode. The function is intended for comparing unit address-less node names on DT and firmware or swnodes compliant with DT bindings. Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Acked-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 03cc7fefbb09dd70f3b21d127784879fac0bbf00 Author: Alain Volmat Date: Wed Nov 22 08:51:49 2023 +0100 media: i2c: gc2145: Galaxy Core GC2145 sensor support Addition of support for the Galaxy Core GC2145 XVGA sensor. The sensor supports both DVP and CSI-2 interfaces however for the time being only CSI-2 is implemented. Configurations are currently based on initialization scripts coming from Galaxy Core and so for that purpose only 3 static resolutions are supported: - 640x480 - 1280x720 - 1600x1200 Signed-off-by: Alain Volmat Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 0d32f666bedc2685b7006ec01002069b08e376d1 Author: Alain Volmat Date: Wed Nov 22 08:51:48 2023 +0100 dt-bindings: media: i2c: add galaxycore,gc2145 dt-bindings Introduction of the Galaxy Core GC2145 XVGA CMOS camera sensor. Signed-off-by: Alain Volmat Reviewed-by: Conor Dooley Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit c12251898fbd4e0455ce22108aeada6a98d128aa Author: Alain Volmat Date: Wed Nov 22 08:51:47 2023 +0100 dt-bindings: vendor-prefixes: Add prefix for GalaxyCore Inc. Add a vendor prefix entry for galaxycore (https://www.gcoreinc.com) Signed-off-by: Alain Volmat Acked-by: Krzysztof Kozlowski Reviewed-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 30d187cd74874aaf24e1b4a2dd2a64dc850c6b14 Author: Laurent Pinchart Date: Sun Nov 26 03:37:15 2023 +0200 media: renesas: vsp1: Fix references to pad config V4L2 subdev operations have moved from operating on a v4l2_subdev_pad_config to a v4l2_subdev_state a long time ago. Fix remaining incorrect references to pad config in function and variable names. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit b1dba0b13c0aa93d22f8ef8cb082a4f32e5ab1f6 Author: heminhong Date: Fri Nov 10 13:50:31 2023 +0800 drm/qxl: remove unused declaration Some functions are never used by the driver, removing the functions declaration, it can be reducing program size, and improving code readability and maintainability. Signed-off-by: heminhong Link: https://lore.kernel.org/r/20231110055031.57360-1-heminhong@kylinos.cn Signed-off-by: Maxime Ripard commit 5f8dec200923a76dc57187965fd59c1136f5d085 Author: Dmitry Baryshkov Date: Sun Dec 3 01:55:52 2023 +0300 drm/drv: propagate errors from drm_modeset_register_all() In case the drm_modeset_register_all() function fails, its error code will be ignored. Instead make the drm_dev_register() bail out in case of such an error. Fixes: 79190ea2658a ("drm: Add callbacks for late registering") Reviewed-by: Neil Armstrong Signed-off-by: Dmitry Baryshkov Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231202225552.1283638-1-dmitry.baryshkov@linaro.org commit 72ef65ab246e55847097d68e0964fbcdfff4366c Author: Donald Robson Date: Thu Nov 30 16:00:17 2023 +0000 drm/imagination: Removed unused function to_pvr_vm_gpuva() This function is now unused, hence it causes a compiler warning. drivers/gpu/drm/imagination/pvr_vm.c:112:22: warning: unused function 'to_pvr_vm_gpuva' [-Wunused-function] 112 | struct pvr_vm_gpuva *to_pvr_vm_gpuva(struct drm_gpuva *gpuva) | ^ Remove the function for now. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311242159.hh8MWiAm-lkp@intel.com/ Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231130160017.259902-5-donald.robson@imgtec.com commit e8878b8043a25a19d0b405a29652a0cb94f56cdb Author: Donald Robson Date: Thu Nov 30 16:00:16 2023 +0000 drm/imagination: pvr_gpuvm_free() now static The function below is used only within this source file, but is not static. drivers/gpu/drm/imagination/pvr_vm.c:542:6: error: no previous prototype for 'pvr_gpuvm_free' [-Werror=missing-prototypes] 542 | void pvr_gpuvm_free(struct drm_gpuvm *gpuvm) Make it static. Reported-by: Arnd Bergmann Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311242159.hh8MWiAm-lkp@intel.com/ Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Donald Robson Link: https://lore.kernel.org/r/20231130160017.259902-4-donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 7620c6bd76b1076b104926b78da8d6ff17cfef5d Author: Donald Robson Date: Thu Nov 30 16:00:15 2023 +0000 drm/imagination: pvr_device_process_active_queues now static The function below is used only within this source file, but is not static. >> drivers/gpu/drm/imagination/pvr_device.c:129:6: warning: no previous prototype for function 'pvr_device_process_active_queues' [-Wmissing-prototypes] 129 | void pvr_device_process_active_queues(struct pvr_device *pvr_dev) | ^ drivers/gpu/drm/imagination/pvr_device.c:129:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 129 | void pvr_device_process_active_queues(struct pvr_device *pvr_dev) | ^ | static 1 warning generated. Make it static. Reported-by: Arnd Bergmann Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311250632.giVEx7MU-lkp@intel.com/ Fixes: eaf01ee5ba28 ("drm/imagination: Implement job submission and scheduling") Signed-off-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231130160017.259902-3-donald.robson@imgtec.com commit 0ffe9eb826f1391d52089ba8056a3778688da57d Author: Donald Robson Date: Thu Nov 30 16:00:14 2023 +0000 drm/imagination: Fixed missing header in pvr_fw_meta A missing header causes the compiler to warn that the function below is not forward declared. >> drivers/gpu/drm/imagination/pvr_fw_meta.c:33:1: warning: no previous prototype for function 'pvr_meta_cr_read32' [-Wmissing-prototypes] 33 | pvr_meta_cr_read32(struct pvr_device *pvr_dev, u32 reg_addr, u32 *reg_value_out) | ^ drivers/gpu/drm/imagination/pvr_fw_meta.c:32:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 32 | int | ^ | static 1 warning generated. Include the correct header. Reported-by: Arnd Bergmann Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311250226.Da2yiSKp-lkp@intel.com/ Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support") Signed-off-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231130160017.259902-2-donald.robson@imgtec.com commit 51097ef14d4e555c532ae535d24f97cc19c8c5a6 Author: Donald Robson Date: Thu Nov 30 16:00:13 2023 +0000 drm/imagination: Fixed warning due to implicit cast to bool This line appears to confuse the compiler and had been noticed previously in clang-tidy output. There isn't anything fundamentally wrong that I can see. I suspect that it just looks like a mistake - hence the first note. By making the second operand an actual bool result, const correctness can be preserved while silencing the warning. >> drivers/gpu/drm/imagination/pvr_device_info.c:230:47: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] 230 | } else if (features_size == mapping_max_size && (mapping_max & 63)) { | ^ ~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/imagination/pvr_device_info.c:230:47: note: use '&' for a bitwise operation 230 | } else if (features_size == mapping_max_size && (mapping_max & 63)) { | ^~ | & drivers/gpu/drm/imagination/pvr_device_info.c:230:47: note: remove constant to silence this warning 230 | } else if (features_size == mapping_max_size && (mapping_max & 63)) { | ~^~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311241752.3iLyyFcA-lkp@intel.com/ Fixes: f99f5f3ea7ef ("drm/imagination: Add GPU ID parsing and firmware loading") Signed-off-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231130160017.259902-1-donald.robson@imgtec.com commit 93032ae634d409e621c68a2fb7d6930e7eebb1d9 Author: Marco Pagani Date: Thu Nov 30 18:14:16 2023 +0100 drm/test: add a test suite for GEM objects backed by shmem This patch introduces an initial KUnit test suite for GEM objects backed by shmem buffers. Suggested-by: Javier Martinez Canillas Signed-off-by: Marco Pagani v5: - using __drm_kunit_helper_alloc_drm_device() to avoid local struct v4: - Add missing MMU dependency for DRM_GEM_SHMEM_HELPER (kernel test robot) v3: - Explicitly cast pointers in the helpers - Removed unused pointer to parent dev in struct fake_dev - Test entries reordering in Kconfig and Makefile sent as a separate patch v2: - Improved description of test cases - Cleaner error handling using KUnit actions - Alphabetical order in Kconfig and Makefile Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231130171417.74162-1-marpagan@redhat.com commit 52816298bd2a1e8c6fb3d9311730c00ef03c1f03 Author: Heiko Stuebner Date: Fri Dec 1 15:08:40 2023 +0100 dt-bindings: gpio: rockchip: add a pattern for gpio hogs Allow validating gpio-hogs defined inside the gpio controller node. Signed-off-by: Heiko Stuebner Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 149261d378d0ca441b16de6c1a250a350df66598 Author: Umang Jain Date: Wed Nov 29 01:49:22 2023 +0530 staging: vc04_services: Do not pass NULL to vchiq_log_error() vchiq_add_connected_callback() logs using vchiq_log_error() macro, but passes NULL instead of a struct device pointer. Fix it. vchiq_add_connected_callback() is not used anywhere in the vc04_services as of now. It will be used when we add new drivers(VC shared memory and bcm2835-isp), hence it kept as it is for now. Fixes: 1d8915cf8899 ("staging: vc04: Convert vchiq_log_error() to use dynamic debug") Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20231128201926.489269-2-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit f9c42898830383aff4fdc723828fa93a6abec02d Author: Umang Jain Date: Wed Nov 29 01:48:45 2023 +0530 staging: vc04_services: vchiq_core: Log through struct vchiq_instance The handle_to_service() helper can return NULL, so `service` pointer can indeed be set to NULL. So, do not log through service pointer (which can cause NULL-deference), instead, use the vchiq_instance function argument to get access to the struct device. Fixes: f67af5940d6d ("staging: vc04: Convert(and rename) vchiq_log_info() to use dynamic debug") Reviewed-by: Ricardo B. Marliere Signed-off-by: Umang Jain Link: https://lore.kernel.org/r/20231128201845.489237-1-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit ad96610acc0eb81f0342fa688e6d42fd530c328b Author: Gary Rookard Date: Tue Nov 28 13:17:27 2023 -0500 staging: rtl8192e: renamed variable nDataRate Coding style issue, checkpatch Avoid CamelCase, rename it nDataRate -> data-rate. Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231128181727.19504-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 213702c8b61bfc37b9a78a977fb1c4871fee938c Author: Gary Rookard Date: Tue Nov 28 13:17:26 2023 -0500 staging: rtl8192e: renamed variable bCurBW40MHz Coding style issue, checkpatch Avoid CamelCase, rename it bCurBW40MHz -> cur_bw_40mhz. Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231128181727.19504-3-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit d9443ac5e3ba1991863c61a4e89f04f67f104eca Author: Gary Rookard Date: Tue Nov 28 13:17:25 2023 -0500 staging: rtl8192e: renamed variable nMcsRate Coding style issue, checkpatch Avoid CamelCase, rename it nMcsRate -> mcs_rate. Signed-off-by: Gary Rookard Link: https://lore.kernel.org/r/20231128181727.19504-2-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit e2e2aacf042f52854c92775b7800ba668e0bdfe4 Author: Mathias Nyman Date: Fri Dec 1 17:06:47 2023 +0200 xhci: fix possible null pointer deref during xhci urb enqueue There is a short gap between urb being submitted and actually added to the endpoint queue (linked). If the device is disconnected during this time then usb core is not yet aware of the pending urb, and device may be freed just before xhci_urq_enqueue() continues, dereferencing the freed device. Freeing the device is protected by the xhci spinlock, so make sure we take and keep the lock while checking that device exists, dereference it, and add the urb to the queue. Remove the unnecessary URB check, usb core checks it before calling xhci_urb_enqueue() Suggested-by: Kuen-Han Tsai Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-20-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e34900f46cd69b2859b9894275415134a0988d9d Author: Mathias Nyman Date: Fri Dec 1 17:06:46 2023 +0200 xhci: Reconfigure endpoint 0 max packet size only during endpoint reset The max packet size for full speed control endpoint 0 may vary. It is defined in the device descriptor, which is read using the same endpoint. Usb core sets a temporary max packet size value until the real value is read. xhci driver needs to reconfigure the endpoint context seen by the controller if the max packet size changes. It makes more sense to do this reconfiguration in xhci_endpoint_reset() instead of urb enqueue as usb core will call endpoint reset during enumeration if the max packet values differ. Max packet size adjustment for endpoint 0 can only happen once per device enumeration. Previously the max packet size was checked during every urb enqueue. This is an additional check for every enqueued urb, and also turned out to have locking issues as urbs may be queued in any context while xhci max packet size reconfiguration requires memory allocation, locking, and sleeping. Tested with a full speed device using both old and new scheme enumeration and an intentionally incorrect preliminary max packet size value. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-19-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 36b24ebf9a04f19f1fe47ec0b50e5ca1d30dd1bc Author: Niklas Neronin Date: Fri Dec 1 17:06:45 2023 +0200 xhci: minor coding style cleanup in 'xhci_try_enable_msi()' Remove extra spaces/indentation and add spaces where required. This commit does not change any functionality. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-18-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9831960df237855ea3333e08c26cc9405a7ed440 Author: Niklas Neronin Date: Fri Dec 1 17:06:44 2023 +0200 xhci: rework 'xhci_try_enable_msi()' MSI and MSI-X setup code Simplify 'xhci_try_enable_msi()' and reduce unnecessary function calls. xHCI driver first tries to allocate 'num_online_cpu()' number of MSI-X vectors, if that fails it falls back to a single MSI vector. There is no good reason for this, we currently only support a primary interrupter. However, we are still interested in knowing if there are more vectors available, which will be utilized once we get secondary interrupter support. Call 'pci_alloc_irq_vectors()' once (with MSI-X and MSI flag), instead of separately for MSI-X and MSI. And accept any number of MSI-X or MSI vectors between 1 and 'num_online_cpu()'. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-17-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit dfbf4441f2d31d21e0a98c5fcff6dae8b57b79dd Author: Niklas Neronin Date: Fri Dec 1 17:06:43 2023 +0200 xhci: change 'msix_count' to encompass MSI or MSI-X vectors Instead of variable 'msix_count' containing the number of MSI-X vectors, now it can contains MSI or MSI-X vector amount. Because both interrupt methods allow several vectors. Thus, 'msix_count' is renamed to 'nvecs'. Additionally, instead of storing the maximum possible vector amount, now it stores the amount of successfully allocated vectors, or negative integer on allocation failure. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-16-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a795f708b2844054a7d12aae72397bf51d0f87b3 Author: Niklas Neronin Date: Fri Dec 1 17:06:42 2023 +0200 xhci: refactor static MSI function The current way the xhci driver sets up MSI interrupts is overly complex and messy. The whole MSI setup can be done in one simple function. Continue refactoring MSI/MSI-X setup by incorporating 'xhci_setup_msi()' into 'xhci_try_enable_msi()'. Now all interrupt enabling is contained in one function, which should make it easier to rework. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-15-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 74554e9c227679a6fc5eb4d968d31c2ca4df853e Author: Niklas Neronin Date: Fri Dec 1 17:06:41 2023 +0200 xhci: refactor static MSI-X function The current way the xhci driver sets up MSI/MSI-X interrupts is overly complex and messy. The whole MSI/MSI-X setup can be done in one simple function. Start refactoring this by incorporating 'xhci_setup_msix()' into 'xhci_try_enable_msi()'. 'xhci_setup_msix()' is a static function which is only called by 'xhci_try_enable_msi()'. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-14-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f977f4c9301c8a67c367946a08c4ce940b42c299 Author: Niklas Neronin Date: Fri Dec 1 17:06:40 2023 +0200 xhci: add handler for only one interrupt line Current xHCI driver only supports one "interrupter", meaning we will only use one MSI/MSI-X interrupt line. Thus, add handler only to the first interrupt line. Signed-off-by: Niklas Neronin Co-developed-by: Mathias Nyman Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-13-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5080ef2d373ada6fba2e7b86a56a93c8da909a46 Author: Niklas Neronin Date: Fri Dec 1 17:06:39 2023 +0200 xhci: check if legacy irq is available before using it as fallback Move the error check "No MSI-X/MSI found and no IRQ in BIOS" inside 'goto legacy'. It is better to check if the IRQ interrupt is available, before trying to add a handler. Additionally the aforementioned error message is much more clear. Signed-off-by: Niklas Neronin Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-12-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit cdcaa870c7be7e421de5c33257d1b3cc074dc802 Author: Andy Shevchenko Date: Fri Dec 1 17:06:38 2023 +0200 xhci: dbc: Add missing headers Don't inherit headers "by chances" from asm/bug.h, asm/io.h, etc... Include the needed headers explicitly. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-11-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 311902d4cc4c13c0f1b4e79ee7eb9e04642f3d0b Author: Andy Shevchenko Date: Fri Dec 1 17:06:37 2023 +0200 xhci: dbc: Use sizeof(*pointer) instead of sizeof(type) It is preferred to use sizeof(*pointer) instead of sizeof(type). The type of the variable can change and one needs not change the former (unlike the latter). No functional change intended. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-10-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 84637512e09c51929e36647a151d26cd1efa1b31 Author: Andy Shevchenko Date: Fri Dec 1 17:06:36 2023 +0200 xhci: dbc: Use sizeof_field() where it makes sense Instead of doing custom calculations, use sizeof_field() macro. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b28718717b10befac6f43eb5a1e075ee4fb4ef02 Author: Andy Shevchenko Date: Fri Dec 1 17:06:35 2023 +0200 xhci: dbc: Replace custom return value with proper Linux error code Replace the custom return value with proper Linux error code. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 89cd6362e6ad4aa8663c41ac960f223a761385b4 Author: Andy Shevchenko Date: Fri Dec 1 17:06:34 2023 +0200 xhci: dbc: Don't shadow error codes in store() functions kstrtox() along with regmap API can return different error codes based on the circumstances. Don't shadow them when returning to the caller. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 24352d170b5fcab1d7724dd20257e0b73cbdb453 Author: Andy Shevchenko Date: Fri Dec 1 17:06:33 2023 +0200 xhci: dbc: Check for errors first in xhci_dbc_stop() The usual pattern is to check for errors and then continue if none. Apply that pattern to xhci_dbc_stop() code. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e3be8fb7d012d1e9a1d1b753ca50ff057bbb12b2 Author: Andy Shevchenko Date: Fri Dec 1 17:06:32 2023 +0200 xhci: dbc: Use ATTRIBUTE_GROUPS() Embrace ATTRIBUTE_GROUPS() to avoid boiler plate code. This should not introduce any functional changes. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a230f1a74866802b9a87ce7aa8dbd81d22831ab3 Author: Andy Shevchenko Date: Fri Dec 1 17:06:31 2023 +0200 xhci: dbc: Use sysfs_emit() to instead of scnprintf() Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 601fbf65b2a0af126268da22500c24e8616ade5a Author: Andy Shevchenko Date: Fri Dec 1 17:06:30 2023 +0200 xhci: dbc: Convert to use sysfs_streq() It's standard approach to parse values from user space by using sysfs_streq(). Make driver use it. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 35a1743f4598e09524ae39651bc42733ec9749de Author: Andy Shevchenko Date: Fri Dec 1 17:06:29 2023 +0200 xhci: dbc: Drop duplicate checks for dma_free_coherent() dma_free_coherent() is NULL-aware, not necessary to check for the parameter twice. Drop duplicate conditionals in the caller. Signed-off-by: Andy Shevchenko Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20231201150647.1307406-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5f449ed05da8bb2a470b17962978f0347ba399d2 Author: Jouni Högander Date: Sun Dec 3 13:48:40 2023 +0200 drm/i915/display: Split i915 specific code away from intel_fb.c We are preparing for Xe driver. Backing object implementation is differing between i915 and Xe. Split i915 specific code into separate source file built only for i915. v9: - Use ERR_CAST v8: - return original error code from intel_fb_bo_lookup_valid_bo on failure v7: - drop #include - s/user_mode_cmd/mode_cmd/ - Use passed i915 pointer instead of to_i915(obj->base.dev) v6: Add missing intel_fb_bo.[ch] v5: - Keep drm_any_plane_has_format check in intel_fb.c - Use mode_cmd instead of user_mode_cmd for intel_fb_bo_lookup_valid_bo v4: Move drm_any_plane_has_format check into intel_fb_bo.c v3: Fix failure handling in intel_framebuffer_init v2: Couple of fixes to error value handling Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231203114840.841311-5-jouni.hogander@intel.com commit ae424921a5ca763fef4be46f900065db0b0870ae Author: Jouni Högander Date: Sun Dec 3 13:48:39 2023 +0200 drm/i915/display: Handle invalid fb_modifier in intel_fb_modifier_to_tiling Lookup_modifier is returning INTEL_PLANE_CAP_TILING_4 on invalid fb_modifier value. Use lookup_modifier_or_null in intel_fb_modifier_to_tiling and return I915_TILING_NONE in case lookup_modifier_or_null returns null. Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231203114840.841311-4-jouni.hogander@intel.com commit 6383f69bd2ccd4765b22d60f12576891daa36c1a Author: Jouni Högander Date: Sun Dec 3 13:48:38 2023 +0200 drm/i915/display: Convert intel_fb_modifier_to_tiling as non-static We are about to split i915 specific code from intel_fb.c. Convert intel_fb_modifier_to_tiling as non-static to allow calling it from split code. Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231203114840.841311-3-jouni.hogander@intel.com commit 72207699ff76d4392244c8d9850aaef0160dc6b4 Author: Jouni Högander Date: Sun Dec 3 13:48:37 2023 +0200 drm/i915/display: use intel_bo_to_drm_bo in intel_fb.c We are preparing for Xe driver. I915 and Xe object implementation are differing. Do not use i915_gem_object->base directly. Instead use intel_bo_to_drm_bo. Also use drm_gem_object_put instead of i915_gem_object_put. This should be ok as i915_gem_object_put is really just doing __drm_gem_object_put. Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231203114840.841311-2-jouni.hogander@intel.com commit e84e61bdb97c14cf989094394c6e6a6dcb1a3381 Author: Konrad Dybcio Date: Thu Nov 30 15:58:22 2023 +0100 soc: qcom: stats: Add DDR sleep stats Add DDR sleep stats that include: - the available RAM low power states - per-state residency information - per-frequency residency information (for some freqs only, it seems) - DDR vote information (AB/IB) and some magic thing that we're yet to decode. Based on the msm-5.4 downstream implementation, debugged with some help from Qualcomm's Maulik Shah. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231130-topic-ddr_sleep_stats-v1-2-5981c2e764b6@linaro.org [bjorn: Add missing bitfield.h include] Signed-off-by: Bjorn Andersson commit 9f1b26b4ba71388d7e11f5d9741bc9bd2e7f5003 Merge: 97817a8275a1e 8677233e59137 Author: Bjorn Andersson Date: Sun Dec 3 18:59:40 2023 -0800 Merge tag 'qcom-dts-for-6.7-2' into arm32-for-6.8 Below pull request for ARM32 DeviceTree updates for v6.7 was posted to late to make it into v6.7, merge it into the branch for v6.8. More Qualcomm Arm32 DeviceTree updates for v6.7 This introduces new DeviceTree source for Microsoft Lumia 640, Microsoft Lumia 640 XL, Nokia Lumia 735, and Nokia Lumia 830, built on MSM8226 and MSM8926. A few stylistic issues are corrected on MSM8974. commit 97817a8275a1ec06773016c13c6f009535b53a6f Author: Luca Weiss Date: Sat Nov 25 13:05:35 2023 +0100 ARM: dts: qcom: Add support for HTC One Mini 2 Add support for this smartphone based on the MSM8926 SoC, codenamed "memul". Supported functionality: * Power & volume buttons * ADSP * Magnetometer * Accelerometer * Touchscreen * Vibrator * SD card * Charger * USB Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231125-htc-memul-v3-3-e8f4c5839e23@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 556bed5c6d4167f9ffb5c8648cdd3c8e39aefec7 Author: Arnaldo Carvalho de Melo Date: Thu Nov 30 18:46:36 2023 -0300 perf beauty: Don't use 'find ... -printf' as it isn't available in busybox Namhyung reported: I'm seeing a build error on my Alpine linux image which uses busybox + musl libc: In file included from trace/beauty/arch_errno_names.c:1, from builtin-trace.c:899: /build/trace/beauty/generated/arch_errno_name_array.c: In function 'arch_syscalls__strerrno': /build/trace/beauty/generated/arch_errno_name_array.c:142:49: error: unused parameter 'arch' [-Werror=unused-parameter] 142 | const char *arch_syscalls__strerrno(const char *arch, int err) It looks like busybox find command doesn't have -printf option find: unrecognized: -printf , Yesterday 9:16 PM , BusyBox v1.36.1 (2023-07-27 17:12:24 UTC) multi-call binary. Usage: find [-HL] [PATH]... [OPTIONS] [ACTIONS] Search for files and perform actions on them. First failed action stops processing of current file. Defaults: PATH is current directory, action is '-print' So just remove it and pipe find's entry to a basename loop to produce the same result. Then use an alternative loop that relies on the shell to avoid needless forks and execs. The discussion about it generated the impetus to stop doing strcmps to find the right table at each errno to string translation but instead do this just once and then use a function pointer to the right arch specific table. Suggested-by: David Laight Reported-by: Namhyung Kim Cc: Adrian Hunter Cc: Hendrik Brueckner Cc: Ian Rogers Cc: Jiri Olsa Cc: Michael Petlan Cc: Thomas Richter Signed-off-by: Arnaldo Carvalho de Melo commit 072b6ad7cac6a868e56dec5f48a2e67d9ab8cb6e Author: Nick Forrington Date: Thu Nov 2 16:11:16 2023 +0000 perf docs: Fix man page formatting for 'perf lock' This makes "CONTENTION" a top level section (rather than a subsection of "INFO"). Fixes: 79079f21f50a501f ("perf lock: Add -k and -F options to 'contention' subcommand") Reviewed-by: James Clark Signed-off-by: Nick Forrington Tested-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231102161117.49533-1-nick.forrington@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit f730e7adfd69d7ac859d8fe4d67e980cbad1e445 Author: Abhinav Kumar Date: Tue Sep 19 10:48:12 2023 -0700 drm: remove drm_bridge_hpd_disable() from drm_bridge_connector_destroy() drm_bridge_hpd_enable()/drm_bridge_hpd_disable() callbacks call into the respective driver's hpd_enable()/hpd_disable() ops. These ops control the HPD enable/disable logic which in some cases like MSM can be a dedicate hardware block to control the HPD. During probe_defer cases, a connector can be initialized and then later destroyed till the probe is retried. During connector destroy in these cases, the hpd_disable() callback gets called without a corresponding hpd_enable() leading to an unbalanced state potentially causing even a crash. This can be avoided by the respective drivers maintaining their own state logic to ensure that a hpd_disable() without a corresponding hpd_enable() just returns without doing anything. However, to have a generic fix it would be better to avoid the hpd_disable() callback from the connector destroy path and let the hpd_enable() / hpd_disable() balance be maintained by the corresponding drm_bridge_connector_enable_hpd() / drm_bridge_connector_disable_hpd() APIs which should get called by drm_kms_helper_disable_hpd(). changes in v2: - minor change in commit text (Dmitry) Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Reviewed-by: Laurent Pinchart Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20230919174813.26958-1-quic_abhinavk@quicinc.com commit a5b2dcb96d6acb286459612a142371b0d74543bf Author: Abhinav Kumar Date: Wed Sep 20 13:13:58 2023 -0700 drm: improve the documentation of connector hpd ops While making the changes in [1], it was noted that the documentation of the enable_hpd() and disable_hpd() does not make it clear that these ops should not try to do hpd state maintenance and should only enable/disable hpd related hardware for the connector. The state management of these calls to make sure these calls are balanced is handled by the DRM core and we should keep it that way to minimize the overhead in the drivers which implement these ops. [1]: https://patchwork.freedesktop.org/patch/558387/ Signed-off-by: Abhinav Kumar Suggested-by: Laurent Pinchart Reviewed-by: Laurent Pinchart Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20230920201358.27597-1-quic_abhinavk@quicinc.com commit 073249b87615b8a05506e51f9bc231b4d8e9b77d Merge: 3b8551e73271f 33cc938e65a98 Author: Hans Verkuil Date: Sun Dec 3 16:35:17 2023 +0100 Merge tag 'v6.7-rc4' into media_stage Linux 6.7-rc4 This is needed for a vsp1 fix that upcoming media patches depend on. Signed-off-by: Hans Verkuil commit 9c21ea53e6bd1104c637b80a0688040f184cc761 Author: Borislav Petkov (AMD) Date: Fri Dec 1 14:35:06 2023 +0100 x86/microcode/intel: Set new revision only after a successful update This was meant to be done only when early microcode got updated successfully. Move it into the if-branch. Also, make sure the current revision is read unconditionally and only once. Fixes: 080990aa3344 ("x86/microcode: Rework early revisions reporting") Reported-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Tested-by: Ashok Raj Link: https://lore.kernel.org/r/ZWjVt5dNRjbcvlzR@a4bf019067fa.jf.intel.com commit 6262afa10ef7cc8fdf39b81a36f9546b68810431 Author: Masahiro Yamada Date: Sun Nov 26 01:35:59 2023 +0900 kconfig: default to zero if int/hex symbol lacks default property When a default property is missing in an int or hex symbol, it defaults to an empty string, which is not a valid symbol value. It results in an incorrect .config, and can also lead to an infinite loop in scripting. Use "0" for int and "0x0" for hex as a default value. Signed-off-by: Masahiro Yamada Reviewed-by: Yoann Congal commit 4e244c10eab345a735c5052688e4a55bddce5bf7 Author: Masahiro Yamada Date: Sun Nov 26 01:35:58 2023 +0900 kconfig: remove unneeded symbol_empty variable This is used only for initializing other variables. Use the empty string "" directly. Please note newval.tri is unused for S_INT/HEX/STRING. Signed-off-by: Masahiro Yamada commit 0df8e97085946dd79c06720678a845778b6d6bf8 Author: Masahiro Yamada Date: Fri Nov 24 23:09:08 2023 +0900 scripts: clean up IA-64 code A little more janitorial work after commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"). Signed-off-by: Masahiro Yamada Reviewed-by: Nicolas Schier commit 92ef432f027cffe0ff91ff2cbe9258d89ca53968 Author: Masahiro Yamada Date: Thu Nov 23 18:05:40 2023 +0900 kbuild: support W=c and W=e shorthands for Kconfig KCONFIG_WARN_UNKNOWN_SYMBOLS=1 and KCONFIG_WERROR=1 are descriptive and suitable in scripting, but typing them from the command line can be tedious. Associate them with KBUILD_EXTRA_WARN (and the W= shorthand). Support a new letter 'c' to enable extra checks in Kconfig. You can still manage compiler warnings (W=1) and Kconfig warnings (W=c) independently. Reuse the letter 'e' to turn Kconfig warnings into errors. As usual, you can combine multiple letters in KCONFIG_EXTRA_WARN. $ KCONFIG_WARN_UNKNOWN_SYMBOLS=1 KCONFIG_WERROR=1 make defconfig can be shortened to: $ KBUILD_EXTRA_WARN=ce make defconfig or, even shorter: $ make W=ce defconfig Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit 5b84bb2b8d86595544fc8272364b0f1a34b68a4f Author: Douglas Anderson Date: Mon Nov 6 14:43:35 2023 -0800 arm64: dts: qcom: sm6350: Make watchdog bark interrupt edge triggered As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change. Fixes: 5f82b9cda61e ("arm64: dts: qcom: Add SM6350 device tree") Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20231106144335.v2.8.Ic1d4402e99c70354d501ccd98105e908a902f671@changeid Signed-off-by: Bjorn Andersson commit 6c4a9c7ea486da490400c84ba2768c90d228c283 Author: Douglas Anderson Date: Mon Nov 6 14:43:34 2023 -0800 arm64: dts: qcom: sc8280xp: Make watchdog bark interrupt edge triggered As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change. Fixes: 152d1faf1e2f ("arm64: dts: qcom: add SC8280XP platform") Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20231106144335.v2.7.I1c8ab71570f6906fd020decb80675f05fbe1fe74@changeid Signed-off-by: Bjorn Andersson commit 48d5cf4772ec6268853158d9ffc54612e988ebe6 Author: Douglas Anderson Date: Mon Nov 6 14:43:33 2023 -0800 arm64: dts: qcom: sa8775p: Make watchdog bark interrupt edge triggered As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change. Fixes: 09b701b89a76 ("arm64: dts: qcom: sa8775p: add the watchdog node") Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20231106144335.v2.6.I909b7c4453d7b7fb0db4b6e49aa21666279d827d@changeid Signed-off-by: Bjorn Andersson commit 735d80e2e8e5d073ae8b1fff8b1589ea284aa5af Author: Douglas Anderson Date: Mon Nov 6 14:43:32 2023 -0800 arm64: dts: qcom: sm8250: Make watchdog bark interrupt edge triggered As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change. Fixes: 46a4359f9156 ("arm64: dts: qcom: sm8250: Add watchdog bark interrupt") Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20231106144335.v2.5.I2910e7c10493d896841e9785c1817df9b9a58701@changeid Signed-off-by: Bjorn Andersson commit 9204e9a4099212c850e1703c374ef4538080825b Author: Douglas Anderson Date: Mon Nov 6 14:43:31 2023 -0800 arm64: dts: qcom: sm8150: Make watchdog bark interrupt edge triggered As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change. Fixes: b094c8f8dd2a ("arm64: dts: qcom: sm8150: Add watchdog bark interrupt") Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20231106144335.v2.4.I23d0aa6c8f1fec5c26ad9b3c610df6f4c5392850@changeid Signed-off-by: Bjorn Andersson commit 263b348499454f38d36b9442c3cf9279c571bb54 Author: Douglas Anderson Date: Mon Nov 6 14:43:30 2023 -0800 arm64: dts: qcom: sdm845: Make watchdog bark interrupt edge triggered As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change. Fixes: 36c436b03c58 ("arm64: dts: qcom: sdm845: Add watchdog bark interrupt") Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20231106144335.v2.3.I16675ebe5517c68453a1bd7f4334ff885f806c03@changeid Signed-off-by: Bjorn Andersson commit 6897fac411db7b43243f67d4fd4d3f95abf7f656 Author: Douglas Anderson Date: Mon Nov 6 14:43:29 2023 -0800 arm64: dts: qcom: sc7280: Make watchdog bark interrupt edge triggered As described in the patch ("arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered"), the Qualcomm watchdog timer's bark interrupt should be configured as edge triggered. Make the change. Fixes: 0e51f883daa9 ("arm64: dts: qcom: sc7280: Add APSS watchdog node") Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20231106144335.v2.2.I11f77956d2492c88aca0ef5462123f225caf4fb4@changeid Signed-off-by: Bjorn Andersson commit 7ac90b4cf107a3999b30844d7899e0331686b33b Author: Douglas Anderson Date: Mon Nov 6 14:43:28 2023 -0800 arm64: dts: qcom: sc7180: Make watchdog bark interrupt edge triggered On sc7180 when the watchdog timer fires your logs get filled with: watchdog0: pretimeout event watchdog0: pretimeout event watchdog0: pretimeout event ... watchdog0: pretimeout event If you're using console-ramoops to debug crashes the above gets quite annoying since it blows away any other log messages that might have been there. The issue is that the "bark" interrupt (AKA the "pretimeout" interrupt) remains high until the watchdog is pet. Since we've got things configured as "level" triggered we'll keep getting interrupted over and over. Let's switch to edge triggered. Now we'll get one interrupt when the "bark" interrupt goes off and won't get another one until the "bark" interrupt is cleared and asserts again. This matches how many older Qualcomm SoCs have things configured. Fixes: 28cc13e4060c ("arm64: dts: qcom: sc7180: Add watchdog bark interrupt") Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20231106144335.v2.1.Ic7577567baff921347d423b722de8b857602efb1@changeid Signed-off-by: Bjorn Andersson commit 2c21e5a84524381977b4744e906fb31862ac5809 Author: Krzysztof Kozlowski Date: Sun Nov 12 19:44:30 2023 +0100 arm64: dts: qcom: sc8180x: drop duplicated PCI iommus property The IOMMUs for PCI controller on SC8180x are defined in iommu-map, so drop duplicared iommus: sc8180x-lenovo-flex-5g.dtb: pci@1c08000: Unevaluated properties are not allowed ('iommus' was unexpected) Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231112184430.3495-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit bfccc195192ea6ae72a4a49a85c94f1ad8ee7a13 Author: Luca Weiss Date: Sat Nov 25 13:05:34 2023 +0100 dt-bindings: arm: qcom: Add HTC One Mini 2 Document the compatible for the MSM8926-based HTC One Mini 2 smartphone. Acked-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231125-htc-memul-v3-2-e8f4c5839e23@z3ntu.xyz Signed-off-by: Bjorn Andersson commit d69e34675a8be0affe8c55dbf50f795dac521933 Author: Luca Weiss Date: Sat Nov 25 13:05:33 2023 +0100 dt-bindings: vendor-prefixes: document HTC Corporation Add the vendor prefix for HTC (https://www.htc.com/). Acked-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231125-htc-memul-v3-1-e8f4c5839e23@z3ntu.xyz Signed-off-by: Bjorn Andersson commit ead0f132fc494b46fcd94788456f9b264fd631bb Author: Krzysztof Kozlowski Date: Wed Nov 29 15:05:37 2023 +0100 arm64: dts: qcom: sm8550: correct TX Soundwire clock The TX Soundwire controller should take clock from TX macro codec, not VA macro codec clock, otherwise the clock stays disabled. This looks like a copy-paste issue, because the SC8280xp code uses here correctly clock from TX macro. The VA macro clock is already consumed by TX macro codec, thus it won't be disabled by this change. Fixes: 61b006389bb7 ("arm64: dts: qcom: sm8550: add Soundwire controllers") Reported-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231129140537.161720-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 20e886590a310665244a354e3b693b881544edec Author: Krzysztof Kozlowski Date: Wed Nov 29 15:05:36 2023 +0100 arm64: dts: qcom: sm8450: correct TX Soundwire clock The TX Soundwire controller should take clock from TX macro codec, not VA macro codec clock, otherwise the clock stays disabled. This looks like a copy-paste issue, because the SC8280xp code uses here correctly clock from TX macro. The VA macro clock is already consumed by TX macro codec, thus it won't be disabled by this change. Fixes: 14341e76dbc7 ("arm64: dts: qcom: sm8450: add Soundwire and LPASS") Reported-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Reviewed-by: Neil Armstrong Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231129140537.161720-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 1aaa08e8de365cce59203541cafadb5053b1ec1a Author: Bjorn Andersson Date: Thu Nov 30 16:11:10 2023 -0800 arm64: dts: qcom: sc8180x-primus: Fix HALL_INT polarity The hall sensor interrupt on the Primus is active low, which means that with the current configuration the device attempts to suspend when the LID is open. Fix the polarity of the HALL_INT GPIO to avoid this. Fixes: 2ce38cc1e8fe ("arm64: dts: qcom: sc8180x: Introduce Primus") Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231130-sc8180x-primus-lid-polarity-v1-1-da917b59604b@quicinc.com Signed-off-by: Bjorn Andersson commit 663affdb12b3e26c77d103327cf27de720c8117e Author: Johan Hovold Date: Mon Oct 16 10:06:58 2023 +0200 arm64: dts: qcom: sc8280xp-crd: fix eDP phy compatible The sc8280xp Display Port PHYs can be used in either DP or eDP mode and this is configured using the devicetree compatible string which defaults to DP mode in the SoC dtsi. Override the default compatible string for the CRD eDP PHY node so that the eDP settings are used. Fixes: 4a883a8d80b5 ("arm64: dts: qcom: sc8280xp-crd: Enable EDP") Cc: stable@vger.kernel.org # 6.3 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231016080658.6667-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 2dee68e77cb5322d7cfe44f3c84ff8ae2eaf4aee Author: Luca Weiss Date: Sun Oct 15 22:06:56 2023 +0200 arm64: dts: qcom: sdm632-fairphone-fp3: Enable LPASS Enable the LPASS/ADSP found on the phone. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231015-fp3-lpass-v1-1-4d46a399a035@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 50891bc7f1e9e65fa260c442efa7fa24b3523c96 Author: Raymond Hackley Date: Tue Oct 17 13:00:11 2023 +0000 arm64: dts: qcom: msm8916-acer-a1-724: Add notification LED Acer Iconia Talk S A1-724 uses KTD2026 LED driver. However, there is no blue LED on it. Add it to the device tree. Signed-off-by: Raymond Hackley Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231017125848.84311-1-raymondhackley@protonmail.com Signed-off-by: Bjorn Andersson commit 83afcf14edb9217e58837eb119da96d734a4b3b1 Author: Robert Marko Date: Sat Oct 21 14:00:07 2023 +0200 arm64: dts: qcom: ipq6018: use CPUFreq NVMEM IPQ6018 comes in multiple SKU-s and some of them dont support all of the OPP-s that are current set, so lets utilize CPUFreq NVMEM to allow only supported OPP-s based on the SoC dynamically. As an example, IPQ6018 is generaly rated at 1.8GHz but some silicon only goes up to 1.5GHz and is marked as such via an eFuse. Signed-off-by: Robert Marko Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231021120048.231239-1-robimarko@gmail.com Signed-off-by: Bjorn Andersson commit cff9a76f306bfb6262153c0da2029071036b9a04 Author: Lukas Walter Date: Sat Oct 21 16:30:25 2023 +0200 arm64: dts: qcom: msm8939-huawei-kiwi: Add initial device tree This dts adds support for Huawei Honor 5X / GR5 (2016) smartphone released in 2015. Add device tree with initial support for: - GPIO keys - Hall sensor - SDHCI (internal and external storage) - WCNSS (BT/WIFI) - Sensors (accelerometer and proximity) - Vibrator - Touchscreen Signed-off-by: Raymond Hackley Signed-off-by: Lukas Walter Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231021143025.77088-2-lukas.walter@aceart.de Signed-off-by: Bjorn Andersson commit 01a3c3739183003640f8468ecf75d7eeb15f808a Author: Lukas Walter Date: Sat Oct 21 16:30:24 2023 +0200 dt-bindings: arm: qcom: Add Huawei Honor 5X / GR5 (2016) Add a compatible for Huawei Honor 5X / GR5 (2016). Acked-by: Krzysztof Kozlowski Signed-off-by: Lukas Walter Link: https://lore.kernel.org/r/20231021143025.77088-1-lukas.walter@aceart.de Signed-off-by: Bjorn Andersson commit 2e0dcbf164fb02d2558bd08b9609a30ef5935912 Author: Luca Weiss Date: Sat Nov 25 13:19:28 2023 +0100 arm64: dts: qcom: msm8953: Use non-deprecated qcom,domain in LPASS Use the qcom,domain property instead of the deprecated qcom,apr-domain, which in turn also fixes a bunch of dtbs_checks warnings. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231125-msm8953-misc-fixes-v2-2-df86655841d9@z3ntu.xyz Signed-off-by: Bjorn Andersson commit b6a56a5a25d6273729b2b5139d58e3d390318ed2 Author: Dmitry Baryshkov Date: Wed Nov 29 15:44:09 2023 +0100 arm64: dts: qcom: qrb2210-rb1: add wifi variant property The RB1 platform doesn't have board-specific board-id programmed, it uses generic 0xff. Thus add the property with the 'variant' of the calibration data. Note: the driver will check for the calibration data for the following IDs, so existing board-2.bin files will continue to work. - 'bus=snoc,qmi-board-id=ff,qmi-chip-id=120,variant=Thundercomm_RB1' - 'bus=snoc,qmi-board-id=ff,qmi-chip-id=120' - 'bus=snoc,qmi-board-id=ff' For the reference, the board is identified by the driver in the following way: ath10k_snoc c800000.wifi: qmi chip_id 0x120 chip_family 0x4007 board_id 0xff soc_id 0x40670000 ath10k_snoc c800000.wifi: qmi fw_version 0x337302d3 fw_build_timestamp 2023-01-06 01:50 fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.3.3.7.c2-00723-QCAHLSWMTPLZ-1 ath10k_snoc c800000.wifi: wcn3990 hw1.0 target 0x00000008 chip_id 0x00000000 sub 0000:0000 ath10k_snoc c800000.wifi: kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0 ath10k_snoc c800000.wifi: firmware ver api 5 features wowlan,mgmt-tx-by-reference,non-bmi crc32 b3d4b790 ath10k_snoc c800000.wifi: htt-ver 3.114 wmi-op 4 htt-op 3 cal file max-sta 32 raw 0 hwcrypto 1 Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-12-4cbb567743bb@linaro.org Signed-off-by: Bjorn Andersson commit 252bc7ad359478dba8d77bce9502f2cc7bb547a3 Author: Konrad Dybcio Date: Wed Nov 29 15:44:08 2023 +0100 arm64: dts: qcom: qrb2210-rb1: Enable CAN bus controller Enable the Microchip mcp2518fd hosted on the SPI5 bus. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-11-4cbb567743bb@linaro.org Signed-off-by: Bjorn Andersson commit 616eda24edd48b8b56516886c51d211fbfd2679b Author: Konrad Dybcio Date: Wed Nov 29 15:44:07 2023 +0100 arm64: dts: qcom: qrb2210-rb1: Set up HDMI Add the required nodes to support display output via the HDMI port. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-10-4cbb567743bb@linaro.org Signed-off-by: Bjorn Andersson commit 5b970ff0193d67da4a8d2d5fda50dd8ddb50a71e Author: Konrad Dybcio Date: Wed Nov 29 15:44:06 2023 +0100 arm64: dts: qcom: qcm2290: Hook up interconnects Add interconnect provider nodes and hook up interconnects to consumer devices, including bwmon. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-9-4cbb567743bb@linaro.org Signed-off-by: Bjorn Andersson commit a2b32096709dbf4af02675d98356a9d3ad86ff05 Author: Konrad Dybcio Date: Wed Nov 29 15:44:05 2023 +0100 arm64: dts: qcom: qcm2290: Add display nodes Add the required nodes to support display on QCM2290. Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-8-4cbb567743bb@linaro.org Signed-off-by: Bjorn Andersson commit c657056d99878c8a8ea84d5d4a9101bcb90b47f2 Author: Konrad Dybcio Date: Wed Nov 29 15:44:04 2023 +0100 arm64: dts: qcom: sc7280: Add the missing MDSS icc path MDSS, aside from the MDP-MEM path, also requires the CPU-DISP_CFG one. Failing to provide it may result in register accesses failing and that's never good. Add the missing path. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-7-4cbb567743bb@linaro.org Signed-off-by: Bjorn Andersson commit 8786398f8686d1a4267ab52f830b25f17e6d62fc Author: Konrad Dybcio Date: Wed Nov 29 15:44:03 2023 +0100 arm64: dts: qcom: sc7180: Add the missing MDSS icc path MDSS, aside from the MDP-MEM path, also requires the CPU-DISP_CFG one. Failing to provide it may result in register accesses failing and that's never good. Add the missing path. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-6-4cbb567743bb@linaro.org Signed-off-by: Bjorn Andersson commit bcaa71f13cc7160f2d5f9a401e9c58215612f79e Author: Konrad Dybcio Date: Thu Nov 30 15:58:23 2023 +0100 arm64: dts: qcom: sc8280xp: Add QMP handle to RPMh stats When a handle to QMP is accessible, we can query even more internal power management stats. Add it. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231130-topic-ddr_sleep_stats-v1-3-5981c2e764b6@linaro.org Signed-off-by: Bjorn Andersson commit fa78d0280fdc984d3dc1209b8c7c7a22ec9735de Author: Konrad Dybcio Date: Thu Nov 30 15:58:21 2023 +0100 dt-bindings: soc: qcom: stats: Add QMP handle The stats can be expanded by poking the Always-On Subsystem through QMP. Allow passing a QMP handle for configurations that support it. Signed-off-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231130-topic-ddr_sleep_stats-v1-1-5981c2e764b6@linaro.org Signed-off-by: Bjorn Andersson commit 69652787279d64b0b0cc350fdfb34c503e40653c Author: Jianhua Lu Date: Sun Nov 26 10:28:49 2023 +0800 arm64: dts: qcom: sm8250-xiaomi-elish: Add pm8150b type-c node and enable usb otg Add type-c node to feature otg function and set usb-role-switch property for usb_1_dwc3 to enable usb otg. Reviewed-by: Konrad Dybcio Signed-off-by: Jianhua Lu Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20231126022849.14273-2-lujianhua000@gmail.com Signed-off-by: Bjorn Andersson commit 608168b4d6079f2c43944bdfd64fd6c405d9a767 Author: Jianhua Lu Date: Sun Nov 26 10:28:48 2023 +0800 arm64: dts: qcom: sm8250-xiaomi-elish: Fix typos There are two typos in this dtsi, so fix it. classis -> chassis. 80700000 -> 80600000 Reviewed-by: Konrad Dybcio Signed-off-by: Jianhua Lu Link: https://lore.kernel.org/r/20231126022849.14273-1-lujianhua000@gmail.com Signed-off-by: Bjorn Andersson commit fbe0870c48ac84f117860096048055a4f078a976 Author: André Apitzsch Date: Sun Nov 26 22:46:20 2023 +0100 arm64: dts: qcom: msm8939-longcheer-l9100: Add proximity-near-level Consider an object near to the sensor when their distance is about 4 cm or below. Reviewed-by: Konrad Dybcio Signed-off-by: André Apitzsch Link: https://lore.kernel.org/r/20231126-bqm5_prox-v2-1-b7defc3979ac@apitzsch.eu Signed-off-by: Bjorn Andersson commit cab60b166575dd6db4c85487e87a9b677e04c153 Author: Konrad Dybcio Date: Mon Nov 27 12:23:28 2023 +0100 arm64: dts: qcom: qrb4210-rb2: Enable bluetooth Enable the QCA bluetooth on RB2. It identifies like the following: Bluetooth: hci0: QCA Product ID :0x0000000a Bluetooth: hci0: QCA SOC Version :0x40020150 Bluetooth: hci0: QCA ROM Version :0x00000201 Bluetooth: hci0: QCA Patch Version:0x00000001 Bluetooth: hci0: QCA controller version 0x01500201 Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231120-topic-rb2_bt-v2-2-4bbf266258ef@linaro.org Signed-off-by: Bjorn Andersson commit ba5f5610841fad3b15c69c6949ed6e19bd5b466e Author: Konrad Dybcio Date: Mon Nov 27 12:23:27 2023 +0100 arm64: dts: qcom: sm6115: Add UART3 Hook up UART3, usually used for communicating with a Bluetooth module. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231120-topic-rb2_bt-v2-1-4bbf266258ef@linaro.org Signed-off-by: Bjorn Andersson commit 5b006a82a2bbc0ce18bc6b084fc8d8d9cc110001 Author: Luca Weiss Date: Mon Nov 27 22:55:38 2023 +0100 arm64: dts: qcom: sdm632-fairphone-fp3: Enable WiFi/Bluetooth Configure and enable the WCNSS which provides WiFi and Bluetooth on this device using the WCN3680B chip. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231127-fp3-wcnss-v2-1-a5154fae4768@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 3c3fcac8d3b1b0f242845c3b3c3263bd38b3b92f Author: Stephen Boyd Date: Tue Nov 28 19:04:41 2023 -0800 dt-bindings: arm: qcom: Fix html link This link got broken by commit e790a4ce5290 ("arm: docs: Move Arm documentation to Documentation/arch/") when the doc moved from arm/ to arch/arm/. Fix the link so that it can continue to be followed. Fixes: e790a4ce5290 ("arm: docs: Move Arm documentation to Documentation/arch/") Cc: Alexandre TORGUE Cc: Yanteng Si Cc: Jonathan Corbet Reviewed-by: Douglas Anderson Acked-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231129030443.2753833-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 04cf333afc757d8fd3c674c6c3f5f86c7755b4d4 Author: Komal Bajaj Date: Wed Nov 29 12:28:16 2023 +0530 arm64: dts: qcom: Add base qcs6490-rb3gen2 board dts Add DTS for Qualcomm qcs6490-rb3gen2 board which uses QCS6490 SoC. This adds debug uart and usb support along with regulators found on this board. Co-developed-by: Naina Mehta Signed-off-by: Naina Mehta Signed-off-by: Komal Bajaj Reviewed-by: Konrad Dybcio Reviewed-by: Caleb Connolly Link: https://lore.kernel.org/r/20231129065816.26409-4-quic_kbajaj@quicinc.com Signed-off-by: Bjorn Andersson commit 9af6a9f32ad0023b1d682af213a0c8c2aa1dce29 Author: Komal Bajaj Date: Wed Nov 29 12:28:15 2023 +0530 arm64: dts: qcom: Add base qcm6490 idp board dts Add DTS for Qualcomm IDP platform using QCM6490 SoC. This adds debug uart, eMMC and usb support along with regulators found on this board. Signed-off-by: Komal Bajaj Reviewed-by: Konrad Dybcio Reviewed-by: Caleb Connolly Link: https://lore.kernel.org/r/20231129065816.26409-3-quic_kbajaj@quicinc.com Signed-off-by: Bjorn Andersson commit 06fd1dd1efde4a0bcc874de03558f6e0ba3817eb Author: Komal Bajaj Date: Wed Nov 29 12:28:14 2023 +0530 dt-bindings: arm: qcom: Add QCM6490 IDP and QCS6490 RB3Gen2 board Document the qcom,qcm6490-idp and qcs6490-rb3gen2 boards. qcm6490-idp based off qcm6490 SoC derived from sc7280 meant for various form factor including IoT and qcs6490-rb3gen2 based off qcs6490 SoC derivative of qcm6490 without internal modem. Co-developed by: Naina Mehta Signed-off by: Naina Mehta Signed-off-by: Komal Bajaj Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231129065816.26409-2-quic_kbajaj@quicinc.com Signed-off-by: Bjorn Andersson commit 6e28e70f00756275151ffb02534c6d2318229416 Author: Tengfei Fan Date: Wed Nov 29 18:33:24 2023 +0800 arm64: dts: qcom: sm4450-qrd: mark QRD4450 reserved gpios Some gpios are reserved for other subsystems, so mark these reserved gpios. Suggested-by: Can Guo Signed-off-by: Tengfei Fan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231129103325.24854-6-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit b6fbe1112e40109b8a0013d19b2d97f01438482d Author: Tengfei Fan Date: Wed Nov 29 18:33:23 2023 +0800 arm64: dts: qcom: sm4450-qrd: add QRD4450 uart support Add uart support for QRD4450 for enable uart console. Reviewed-by: Konrad Dybcio Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20231129103325.24854-5-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 980679261b061da92fc441fa4e2fdb7ef8baadb2 Author: Tengfei Fan Date: Wed Nov 29 18:33:22 2023 +0800 arm64: dts: qcom: sm4450: add uart console support Add base description of UART and TLMM nodes which helps SM4450 boot to shell with console on boards with this SoC. Reviewed-by: Konrad Dybcio Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20231129103325.24854-4-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 483fa5552d352f3bfe835a3156e6cf037c4cf77f Author: Tengfei Fan Date: Wed Nov 29 18:33:21 2023 +0800 arm64: dts: qcom: sm4450: Add RPMH and Global clock Add device node for RPMH and Global clock controller on Qualcomm SM4450 platform. Reviewed-by: Konrad Dybcio Signed-off-by: Ajit Pandey Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20231129103325.24854-3-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 924645058d31bde9788d6b493adefc6f113b3272 Author: Ajit Pandey Date: Wed Nov 29 18:33:20 2023 +0800 arm64: dts: qcom: sm4450: Add apps_rsc and cmd_db node Add apps_rsc node and cmd_db memory region for sm4450. Reviewed-by: Konrad Dybcio Signed-off-by: Ajit Pandey Signed-off-by: Tengfei Fan Link: https://lore.kernel.org/r/20231129103325.24854-2-quic_tengfan@quicinc.com Signed-off-by: Bjorn Andersson commit 591da388c344f934601548cb44f54eab012c6c94 Author: Robert Marko Date: Fri Oct 13 18:39:34 2023 +0200 arm64: dts: qcom: ipq8074: pass QMP PCI PHY PIPE clocks to GCC Pass QMP PCI PHY PIPE clocks to the GCC controller so it does not have to find them by matching globaly by name. If not passed directly, driver maintains backwards compatibility by then falling back to global lookup. Signed-off-by: Robert Marko Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231013164025.3541606-2-robimarko@gmail.com Signed-off-by: Bjorn Andersson commit afc4f14be33c50f066392f1e9671473419ba7ded Author: Robert Marko Date: Fri Oct 13 18:39:33 2023 +0200 dt-bindings: clocks: qcom,gcc-ipq8074: allow QMP PCI PHY PIPE clocks QMP PCI PHY PIPE clocks are inputs for the GCC clock controller. In order to describe this in DTS, allow passing them as the inputs to GCC. This has a benefit that it avoids doing a global matching by name. Signed-off-by: Robert Marko Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231013164025.3541606-1-robimarko@gmail.com Signed-off-by: Bjorn Andersson commit be69109e93c78cb3b9c191a21fc2b54291a711da Author: Gianluca Boiano Date: Fri Oct 13 13:05:31 2023 +0200 arm64: dts: qcom: msm8953: add SPI interfaces This change add spi_3, spi_5 and spi_6 interfaces to MSM8953 devices. Signed-off-by: Gianluca Boiano Acked-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231013110531.84140-1-morf3089@gmail.com Signed-off-by: Bjorn Andersson commit ae1122c375707a36c8fecebba745421a1e0ff93f Author: Luca Weiss Date: Fri Oct 13 10:09:56 2023 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Add PM7325 thermals Configure the thermals for the QUIET_THERM, CAM_FLASH_THERM, MSM_THERM and RFC_CAM_THERM thermistors connected to PM7325. With this PMIC the software communication to the ADC is going through PMK7325 (= PMK8350). Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231013-fp5-thermals-v1-4-f14df01922e6@fairphone.com Signed-off-by: Bjorn Andersson commit 46a2f77e1eb81990d303a94ab62f1bf79d0c9926 Author: Luca Weiss Date: Fri Oct 13 10:09:55 2023 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Add PMK7325 thermals Configure the thermals for the XO_THERM line connected to PMK7325 (named in software PMK8350). Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231013-fp5-thermals-v1-3-f14df01922e6@fairphone.com Signed-off-by: Bjorn Andersson commit 4c343fe9b68adeca1aa3a851bd06e62ecdaed180 Author: Luca Weiss Date: Fri Oct 13 10:09:54 2023 +0200 arm64: dts: qcom: qcm6490-fairphone-fp5: Add PM7250B thermals Configure the thermals for the CHARGER_SKIN_THERM and USB_CONN_THERM thermistors connected to PM7250B. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231013-fp5-thermals-v1-2-f14df01922e6@fairphone.com Signed-off-by: Bjorn Andersson commit 18c74d56fe6070c7c38058d7b43ccf2102abebcd Author: Luca Weiss Date: Fri Oct 13 10:09:53 2023 +0200 iio: adc: Add PM7325 PMIC7 ADC bindings Add the defines for the ADC channels found on the PM7325. The list is taken from downstream msm-5.4 and adjusted for mainline. Signed-off-by: Luca Weiss Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20231013-fp5-thermals-v1-1-f14df01922e6@fairphone.com Signed-off-by: Bjorn Andersson commit 725be1d6318e4ea7e3947fd4242a14cf589cfebf Author: Manivannan Sadhasivam Date: Thu Oct 12 22:51:29 2023 +0530 arm64: dts: qcom: sm8250: Add OPP table support to UFSHC UFS host controller, when scaling gears, should choose appropriate performance state of RPMh power domain controller along with clock frequency. So let's add the OPP table support to specify both clock frequency and RPMh performance states replacing the old "freq-table-hz" property. Reviewed-by: Dmitry Baryshkov Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231012172129.65172-6-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit ec987b5efd59fdea4178d824d8ec4bbdf3019bdf Author: Krzysztof Kozlowski Date: Thu Oct 12 22:51:28 2023 +0530 arm64: dts: qcom: sdm845: Add OPP table support to UFSHC UFS host controller, when scaling gears, should choose appropriate performance state of RPMh power domain controller along with clock frequency. So let's add the OPP table support to specify both clock frequency and RPMh performance states replacing the old "freq-table-hz" property. Reviewed-by: Dmitry Baryshkov Signed-off-by: Krzysztof Kozlowski [mani: Splitted pd change and used rpmhpd_opp_low_svs] Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231012172129.65172-5-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 95053f6bc8ffca438a261400d7c06bd74e3f106e Author: Matti Lehtimäki Date: Wed Oct 11 18:33:15 2023 +0200 ARM: dts: qcom: msm8974: Add watchdog node Add watchdog for MSM8974 platform. Signed-off-by: Matti Lehtimäki Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231011-msm8226-msm8974-watchdog-v1-3-2c472818fbce@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 14259fcdaf72d3ce93ad9c2b12cc0e96ed5a0c4e Author: Sridharan S N Date: Wed Sep 27 15:01:30 2023 +0530 dt-bindings: arm: qcom: drop the IPQ board types IPQ bootloaders do not need these information to select the the DTB blob. So dropping the board names from board section. Signed-off-by: Sridharan S N Acked-by: Rob Herring Link: https://lore.kernel.org/r/20230927093130.4098385-1-quic_sridsn@quicinc.com Signed-off-by: Bjorn Andersson commit 3e4b53e04281ed3d9c7a4329c027097265c04d54 Author: Gokul Sriram Palanisamy Date: Mon Sep 25 15:58:26 2023 +0530 arm64: dts: qcom: ipq5018: enable the CPUFreq support Add the APCS, A53 PLL, cpu-opp-table nodes to set the CPU frequency at 800MHz (idle) or 1.008GHz. Co-developed-by: Sricharan Ramabadhran Signed-off-by: Sricharan Ramabadhran Signed-off-by: Gokul Sriram Palanisamy Reviewed-by: Dmitry Baryshkov Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230925102826.405446-4-quic_gokulsri@quicinc.com Signed-off-by: Bjorn Andersson commit 50492f929486c044b43cb3e2c0e040aa9b61ea2b Author: Gokul Sriram Palanisamy Date: Mon Sep 25 15:58:25 2023 +0530 clk: qcom: apss-ipq-pll: add support for IPQ5018 IPQ5018 APSS PLL is of type Stromer. Reuse Stromer Plus PLL offsets, add configuration values and the compatible. Co-developed-by: Sricharan Ramabadhran Signed-off-by: Sricharan Ramabadhran Signed-off-by: Gokul Sriram Palanisamy Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230925102826.405446-3-quic_gokulsri@quicinc.com Signed-off-by: Bjorn Andersson commit 4d45d56e17348c6b6bb2bce126a4a5ea97b19900 Author: Gokul Sriram Palanisamy Date: Mon Sep 25 15:58:24 2023 +0530 dt-bindings: clock: qcom,a53pll: add IPQ5018 compatible Add IPQ5018 compatible to A53 PLL bindings. Signed-off-by: Gokul Sriram Palanisamy Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230925102826.405446-2-quic_gokulsri@quicinc.com Signed-off-by: Bjorn Andersson commit a900ad783f507cb396e402827052e70c0c565ae9 Author: Krzysztof Kozlowski Date: Sun Sep 24 20:31:03 2023 +0200 ARM: dts: qcom: sdx65: correct SPMI node name Node names should not have vendor prefixes: qcom-sdx65-mtp.dtb: qcom,spmi@c440000: $nodename:0: 'qcom,spmi@c440000' does not match '^spmi@.* Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230924183103.49487-3-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit f64f653df2ef713359178c731bc8f89ff54014b1 Author: Krzysztof Kozlowski Date: Sun Sep 24 20:31:02 2023 +0200 ARM: dts: qcom: sdx65: add missing GCC clocks The SDX65 GCC clock controller expects two required clocks: pcie_pipe_clk and usb3_phy_wrapper_gcc_usb30_pipe_clk. The first one is provided by existing phy node, but second is not yet implemented. qcom-sdx65-mtp.dtb: clock-controller@100000: clocks: [[11, 0], [11, 1], [12]] is too short qcom-sdx65-mtp.dtb: clock-controller@100000: clock-names: ['bi_tcxo', 'bi_tcxo_ao', 'sleep_clk'] is too short Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230924183103.49487-2-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 94da379dba88c4cdd562bad21c9ba5656e5ed5df Author: Krzysztof Kozlowski Date: Sun Sep 24 20:31:01 2023 +0200 ARM: dts: qcom: sdx65: correct PCIe EP phy-names Qualcomm PCIe endpoint bindings expect phy-names to be "pciephy": arch/arm/boot/dts/qcom/qcom-sdx65-mtp.dtb: pcie-ep@1c00000: phy-names:0: 'pciephy' was expected Fixes: 9c0bb38414a4 ("ARM: dts: qcom: sdx65: Add support for PCIe EP") Reviewed-by: Konrad Dybcio Signed-off-by: Krzysztof Kozlowski Reviewed-by: Manivannan Sadhasivam Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230924183103.49487-1-krzysztof.kozlowski@linaro.org Signed-off-by: Bjorn Andersson commit 6ab502bc1cf3147ea1d8540d04b83a7a4cb6d1f1 Author: Konrad Dybcio Date: Tue Jun 20 13:43:21 2023 +0200 drm/msm/dsi: Enable runtime PM Some devices power the DSI PHY/PLL through a power rail that we model as a GENPD. Enable runtime PM to make it suspendable. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/543352/ Link: https://lore.kernel.org/r/20230620-topic-dsiphy_rpm-v2-2-a11a751f34f0@linaro.org Signed-off-by: Dmitry Baryshkov commit 3d07a411b4faaf2b498760ccf12888f8de529de0 Author: Konrad Dybcio Date: Tue Jun 20 13:43:20 2023 +0200 drm/msm/dsi: Use pm_runtime_resume_and_get to prevent refcnt leaks This helper has been introduced to avoid programmer errors (missing _put calls leading to dangling refcnt) when using pm_runtime_get, use it. While at it, start checking the return value. Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Fixes: 5c8290284402 ("drm/msm/dsi: Split PHY drivers to separate files") Patchwork: https://patchwork.freedesktop.org/patch/543350/ Link: https://lore.kernel.org/r/20230620-topic-dsiphy_rpm-v2-1-a11a751f34f0@linaro.org Signed-off-by: Dmitry Baryshkov commit 7cc2621f16b644bb7af37987cb471311641a9e56 Author: Bjorn Andersson Date: Thu Nov 30 16:35:01 2023 -0800 drm/msm/dpu: Add missing safe_lut_tbl in sc8180x catalog Similar to SC8280XP, the misconfigured SAFE logic causes rather significant delays in __arm_smmu_tlb_sync(), resulting in poor performance for things such as USB. Introduce appropriate SAFE values for SC8180X to correct this. Fixes: f3af2d6ee9ab ("drm/msm/dpu: Add SC8180x to hw catalog") Signed-off-by: Bjorn Andersson Reported-by: Anton Bambura Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/569840/ Link: https://lore.kernel.org/r/20231130-sc8180x-dpu-safe-lut-v1-1-a8a6bbac36b8@quicinc.com Signed-off-by: Dmitry Baryshkov commit 9cad81143ef000695b32e92048d8ec0481e5ea3d Author: Paloma Arellano Date: Thu Nov 30 14:47:37 2023 -0800 drm/msm/dpu: Capture dpu snapshot when frame_done_timer timeouts Trigger a devcoredump to dump dpu registers and capture the drm atomic state when the frame_done_timer timeouts. v2: Optimize the format in which frame_done_timeout_cnt is incremented v3: Describe parameter frame_done_timeout_cnt in dpu_encoder_virt Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202312010225.2OJWLKmA-lkp@intel.com/ Reviewed-by: Dmitry Baryshkov Signed-off-by: Paloma Arellano Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/569834/ Link: https://lore.kernel.org/r/20231130224740.24383-1-quic_parellan@quicinc.com Signed-off-by: Dmitry Baryshkov commit 0b414c731432917c83353c446e60ee838c9a9cfd Author: Rob Clark Date: Thu Nov 30 11:21:18 2023 -0800 drm/msm/dpu: Correct UBWC settings for sc8280xp The UBWC settings need to match between the display and GPU. When we updated the GPU settings, we forgot to make the corresponding update on the display side. Reported-by: Steev Klimaszewski Fixes: 07e6de738aa6 ("drm/msm/a690: Fix reg values for a690") Signed-off-by: Rob Clark Tested-by: Steev Klimaszewski Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/569817/ Link: https://lore.kernel.org/r/20231130192119.32538-1-robdclark@gmail.com Signed-off-by: Dmitry Baryshkov commit e2969ee302522b0b29506a9d17cebb5b02b5ce5c Author: Kuogee Hsieh Date: Fri Dec 1 15:19:49 2023 -0800 drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe() Currently eDP population is done at msm_dp_modeset_init() which happen at binding time. Move eDP population to be done at display probe time so that probe deferral cases can be handled effectively. wait_for_hpd_asserted callback is added during drm_dp_aux_init() to ensure eDP's HPD is up before proceeding eDP population. Changes in v5: -- inline dp_display_auxbus_population() and delete it Changes in v4: -- delete duplicate initialize code to dp_aux before drm_dp_aux_register() -- delete of_get_child_by_name(dev->of_node, "aux-bus") and inline the function -- not initialize rc = 0 Changes in v3: -- add done_probing callback into devm_of_dp_aux_populate_bus() Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570074/ Link: https://lore.kernel.org/r/1701472789-25951-8-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit 2b3aabc9caa2452653ef22bdfd15af65f0dff164 Author: Kuogee Hsieh Date: Fri Dec 1 15:19:48 2023 -0800 drm/msm/dp: delete EV_HPD_INIT_SETUP EV_HPD_INIT_SETUP flag is used to trigger the initialization of external DP host controller. Since external DP host controller initialization had been incorporated into pm_runtime_resume(), this flag became obsolete. msm_dp_irq_postinstall() which triggers EV_HPD_INIT_SETUP event is obsoleted accordingly. Changes in v4: -- reworded commit text -- drop EV_HPD_INIT_SETUP -- drop msm_dp_irq_postinstall() Changes in v3: -- drop EV_HPD_INIT_SETUP and msm_dp_irq_postinstall() Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570075/ Link: https://lore.kernel.org/r/1701472789-25951-7-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit 5814b8bf086a1402a7fab4021aa58d4b84246db5 Author: Kuogee Hsieh Date: Fri Dec 1 15:19:47 2023 -0800 drm/msm/dp: incorporate pm_runtime framework into DP driver Currently DP driver is executed independent of PM runtime framework. This leads msm eDP panel can not being detected by edp_panel driver during generic_edp_panel_probe() due to AUX DPCD read failed at edp panel driver. Incorporate PM runtime framework into DP driver so that host controller's power and clocks are enable/disable through PM runtime mechanism. Once PM runtime framework is incorporated into DP driver, waking up device from power up path is not necessary. Hence remove it. After incorporating pm_runtime framework into eDP/DP driver, dp_pm_suspend() to handle power off both DP phy and controller during suspend and dp_pm_resume() to handle power on both DP phy and controller during resume are not necessary. Therefore both dp_pm_suspend() and dp_pm_resume() are dropped and replace with dp_pm_runtime_suspend() and dp_pm_runtime_resume() respectively. Changes in v9: -- silent compiler warning message at dp_power_init() and dp_power_deinit() with W1 flag Changes in v7: -- add comments to dp_pm_runtime_resume() -- add comments to dp_bridge_hpd_enable() -- delete dp->hpd_state = ST_DISCONNECTED from dp_bridge_hpd_notify() Changes in v6: -- delete dp_power_client_deinit(dp->power); -- remove if (!dp->dp_display.is_edp) condition checkout at plug_handle() -- remove if (!dp->dp_display.is_edp) condition checkout at unplug_handle() -- add IRQF_NO_AUTOEN to devm_request_irq() -- add enable_irq() and disable_irq() to pm_runtime_resume()/suspend() -- del dp->hpd_state = ST_DISCONNECTED from dp_bridge_hpd_disable() Changes in v5: -- remove pm_runtime_put_autosuspend feature, use pm_runtime_put_sync() -- squash add pm_runtime_force_suspend()/resume() patch into this patch Changes in v4: -- reworded commit text to explain why pm_framework is required for edp panel -- reworded commit text to explain autosuspend is choiced -- delete EV_POWER_PM_GET and PM_EV_POWER_PUT from changes #3 -- delete dp_display_pm_get() and dp_display_pm_Put() from changes #3 -- return value from pm_runtime_resume_and_get() directly -- check return value of devm_pm_runtime_enable() -- delete pm_runtime_xxx from dp_display_remove() -- drop dp_display_host_init() from EV_HPD_INIT_SETUP -- drop both dp_pm_prepare() and dp_pm_compete() from this change -- delete ST_SUSPENDED state -- rewording commit text to add more details regrading the purpose of this change Changes in v3: -- incorporate removing pm_runtime_xx() from dp_pwer.c to this patch -- use pm_runtime_resume_and_get() instead of pm_runtime_get() -- error checking pm_runtime_resume_and_get() return value -- add EV_POWER_PM_GET and PM_EV_POWER_PUT to handle HPD_GPIO case -- replace dp_pm_suspend() with pm_runtime_force_suspend() -- replace dp_pm_resume() with pm_runtime_force_resume() Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570073/ Link: https://lore.kernel.org/r/1701472789-25951-6-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit 9179fd9596a47de3ff2947101751315ea00bd7ef Author: Kuogee Hsieh Date: Fri Dec 1 15:19:46 2023 -0800 drm/msm/dp: move parser->parse() and dp_power_client_init() to probe Original both parser->parse() and dp_power_client_init() are done at dp_display_bind() since eDP population is done at binding time. In the preparation of having eDP population done at probe() time, move both function from dp_display_bind() to dp_display_probe(). Changes in v6: -- move dp_power_client_deinit() to remove() Changes in v5: -- explain why parser->parse() and dp_power_client_init() are moved to probe time -- tear down sub modules if failed Changes in v4: -- split this patch out of "incorporate pm_runtime framework into DP driver" patch Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570065/ Link: https://lore.kernel.org/r/1701472789-25951-5-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit e467e0bde881a667ccde9c7963f1042c01818059 Author: Kuogee Hsieh Date: Fri Dec 1 15:19:45 2023 -0800 drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Currently DP driver use drm_helper_hpd_irq_event(), bypassing drm bridge framework, to report HPD status changes to user space frame work. Replace it with drm_bridge_hpd_notify() since DP driver is part of drm bridge. Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570067/ Link: https://lore.kernel.org/r/1701472789-25951-4-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit aa1131204e587535b9b48ed6d1b9187942bc939e Author: Kuogee Hsieh Date: Fri Dec 1 15:19:44 2023 -0800 drm/msm/dp: rename is_connected with link_ready The is_connected flag is set to true after DP mainlink successfully finishes link training to enter into ST_MAINLINK_READY state rather than being set after the DP dongle is connected. Rename the is_connected flag with link_ready flag to match the state of DP driver's state machine. Changes in v5: -- reworded commit text according to review comments from change #4 Changes in v4: -- reworded commit text Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570063/ Link: https://lore.kernel.org/r/1701472789-25951-3-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit 82c2a5751227056a643455d080a389a4b0bfe184 Author: Kuogee Hsieh Date: Fri Dec 1 15:19:43 2023 -0800 drm/msm/dp: tie dp_display_irq_handler() with dp driver Currently the dp_display_request_irq() is executed at msm_dp_modeset_init() which ties irq registering to the DPU device's life cycle, while depending on resources that are released as the DP device is torn down. Move register DP driver irq handler to dp_display_probe() to have dp_display_irq_handler() IRQ tied with DP device. In addition, use platform_get_irq() to retrieve irq number from platform device directly. Changes in v5: -- reworded commit text as review comments at change #4 -- tear down component if failed at dp_display_request_irq() Changes in v4: -- delete dp->irq check at dp_display_request_irq() Changes in v3: -- move calling dp_display_irq_handler() to probe Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/570069/ Link: https://lore.kernel.org/r/1701472789-25951-2-git-send-email-quic_khsieh@quicinc.com Signed-off-by: Dmitry Baryshkov commit a1ed5860efd39cb6c7766a94badff0c7616df6f5 Author: Konrad Dybcio Date: Wed Nov 29 15:43:59 2023 +0100 dt-bindings: display: msm: Add reg bus and rotator interconnects Apart from the already handled data bus (MAS_MDP_Pn<->DDR), there are other connection paths: - a path that connects rotator block to the DDR. - a path that needs to be handled to ensure MDSS register access functions properly, namely the "reg bus", a.k.a the CPU-MDSS CFG interconnect. Describe these paths to allow using them in device trees and in the driver. [Konrad: rework for one vs two MDP paths, update examples] Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/569480/ Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-2-4cbb567743bb@linaro.org Signed-off-by: Dmitry Baryshkov commit 25daacc60394d1c82b14b13ebfb87544e14a5f36 Author: Konrad Dybcio Date: Wed Nov 29 15:43:58 2023 +0100 dt-bindings: display: msm: qcm2290-mdss: Use the non-deprecated DSI compat The "qcom,dsi-ctrl-6g-qcm2290" has been deprecated in commit 0c0f65c6dd44 ("dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC"), but the example hasn't been updated to reflect that. Fix that. Fixes: 0c0f65c6dd44 ("dt-bindings: msm: dsi-controller-main: Add compatible strings for every current SoC") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/569478/ Link: https://lore.kernel.org/r/20231125-topic-rb1_feat-v3-1-4cbb567743bb@linaro.org Signed-off-by: Dmitry Baryshkov commit c6721b3c6423d8a348ae885a0f4c85e14f9bf85c Author: Dmitry Baryshkov Date: Tue Nov 28 00:54:01 2023 +0300 drm/msm/mdp4: flush vblank event on disable Flush queued events when disabling the crtc. This avoids timeouts when we come back and wait for dependencies (like the previous frame's flip_done). Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/569127/ Link: https://lore.kernel.org/r/20231127215401.4064128-1-dmitry.baryshkov@linaro.org commit 1cd83dfe9a584a0db2f9a7dc617d710123169feb Author: Krzysztof Kozlowski Date: Sat Nov 11 15:20:17 2023 +0100 dt-bindings: display/msm: qcom, sm8150-mdss: correct DSI PHY compatible Qualcomm SM8150 MDSS comes with a bit different 7nm DSI PHY with its own compatible. DTS already use it: sa8155p-adp.dtb: display-subsystem@ae00000: phy@ae94400:compatible:0: 'qcom,dsi-phy-7nm' was expected Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Patchwork: https://patchwork.freedesktop.org/patch/567178/ Link: https://lore.kernel.org/r/20231111142017.51922-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Baryshkov commit 52e36770b174948126416ecddbcb0da817bc3cfc Author: Krzysztof Kozlowski Date: Tue Nov 7 11:36:00 2023 +0100 dt-bindings: display/msm: qcom, sm8250-mdss: add DisplayPort controller node Document the DisplayPort controller node in MDSS binding, already used in DTS: sm8250-xiaomi-elish-boe.dtb: display-subsystem@ae00000: Unevaluated properties are not allowed ('displayport-controller@ae90000' was unexpected) Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Patchwork: https://patchwork.freedesktop.org/patch/566297/ Link: https://lore.kernel.org/r/20231107103600.27424-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Baryshkov commit 2c24668cc068fc69bf3ffb32234c7e6e91184a82 Author: Dmitry Baryshkov Date: Sat Jul 8 04:04:05 2023 +0300 drm/msm/mdp4: use drmm-managed allocation for mdp4_lcdc_encoder Change struct mdp4_lcdc_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on this encoder destruction. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546176/ Link: https://lore.kernel.org/r/20230708010407.3871346-16-dmitry.baryshkov@linaro.org commit 93d6e1b82b93df1a7e58cd511663197f1208a8b0 Author: Dmitry Baryshkov Date: Sat Jul 8 04:04:04 2023 +0300 drm/msm/mdp4: use drmm-managed allocation for mdp4_dtv_encoder Change struct mdp4_dtv_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on this encoder destruction. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546178/ Link: https://lore.kernel.org/r/20230708010407.3871346-15-dmitry.baryshkov@linaro.org commit e79571e8708bdcbd12c85ec0fdef3c6b99e34e0f Author: Dmitry Baryshkov Date: Sat Jul 8 04:04:03 2023 +0300 drm/msm/mdp4: use drmm-managed allocation for mdp4_dsi_encoder Change struct mdp4_dsi_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on this encoder destruction. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546180/ Link: https://lore.kernel.org/r/20230708010407.3871346-14-dmitry.baryshkov@linaro.org commit 783ad6e6312fe28a005a3378128cdbbaab211527 Author: Dmitry Baryshkov Date: Sat Jul 8 04:04:02 2023 +0300 drm/msm/mdp4: use drmm-managed allocation for mdp4_crtc Change struct mdp4_crtc allocation to use drmm_crtc_alloc(). This removes the need to perform any actions on CRTC destruction. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546184/ Link: https://lore.kernel.org/r/20230708010407.3871346-13-dmitry.baryshkov@linaro.org commit 54f1fbcb47d45bbd9737cd0115e44fd80acf4073 Author: Dmitry Baryshkov Date: Sat Jul 8 04:04:01 2023 +0300 drm/msm/mdp4: use bulk regulators API for LCDC encoder Switch mdp4_lcdc_encoder to using regulator_bulk_* API instead of enumerating regulators by hand. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546173/ Link: https://lore.kernel.org/r/20230708010407.3871346-12-dmitry.baryshkov@linaro.org commit 669afee4a17ebb758889b1470b993efe9c66d5eb Author: Dmitry Baryshkov Date: Sat Jul 8 04:03:59 2023 +0300 drm/msm/mdp5: use drmm-managed allocation for mdp5_encoder Change struct mdp5_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on encoder destruction. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546164/ Link: https://lore.kernel.org/r/20230708010407.3871346-10-dmitry.baryshkov@linaro.org commit 6f235e3d6b1894a808cefdf32e45998a6459794f Author: Dmitry Baryshkov Date: Sat Jul 8 04:03:58 2023 +0300 drm/msm/mdp5: use drmm-managed allocation for mdp5_crtc Change struct mdp5_crtc allocation to use drmm_crtc_alloc(). This removes the need to perform any actions on CRTC destruction. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546169/ Link: https://lore.kernel.org/r/20230708010407.3871346-9-dmitry.baryshkov@linaro.org commit 6de8288bf668ef4eba1258a523faf32a8d406d9e Author: Dmitry Baryshkov Date: Sat Jul 8 04:03:57 2023 +0300 drm/msm/mdp5: use devres-managed allocation for INTF data Use devm_kzalloc to create INTF data structure. This allows us to remove corresponding kfree() call. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546163/ Link: https://lore.kernel.org/r/20230708010407.3871346-8-dmitry.baryshkov@linaro.org commit 531d5313d934325c10721e1d22e352dc4c4a236e Author: Dmitry Baryshkov Date: Sat Jul 8 04:03:56 2023 +0300 drm/msm/mdp5: use devres-managed allocation for SMP data Use devm_kzalloc to create SMP data structure. This allows us to remove corresponding kfree and drop mdp5_smp_destroy() function. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546172/ Link: https://lore.kernel.org/r/20230708010407.3871346-7-dmitry.baryshkov@linaro.org commit 323e9a18d6e195f44eaaa3d3fe92fce9073fe298 Author: Dmitry Baryshkov Date: Sat Jul 8 04:03:55 2023 +0300 drm/msm/mdp5: use devres-managed allocation for pipe data Use devm_kzalloc to create pipe data structure. This allows us to remove corresponding kfree and drop mdp5_pipe_destroy() function. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546171/ Link: https://lore.kernel.org/r/20230708010407.3871346-6-dmitry.baryshkov@linaro.org commit 1ad175c2c884a8ee56fb669648ef655a5d3f22fe Author: Dmitry Baryshkov Date: Sat Jul 8 04:03:54 2023 +0300 drm/msm/mdp5: use devres-managed allocation for mixer data Use devm_kzalloc to create mixer data structure. This allows us to remove corresponding kfree and drop mdp5_mixer_destroy() function. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546166/ Link: https://lore.kernel.org/r/20230708010407.3871346-5-dmitry.baryshkov@linaro.org commit 4c1f4c1f1b43dbe399b93cf712ce31cc0b5181e6 Author: Dmitry Baryshkov Date: Sat Jul 8 04:03:53 2023 +0300 drm/msm/mdp5: use devres-managed allocation for CTL manager data Use devm_kzalloc to create CTL manager data structure. This allows us to remove corresponding kfree and drop mdp5_ctlm_destroy() function. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546159/ Link: https://lore.kernel.org/r/20230708010407.3871346-4-dmitry.baryshkov@linaro.org commit 062aeadeba1d3822b1704235de9a0a0024a78683 Author: Dmitry Baryshkov Date: Sat Jul 8 04:03:52 2023 +0300 drm/msm/mdp5: use devres-managed allocation for configuration data Use devm_kzalloc to create configuration data structure. This allows us to remove corresponding kfree and drop mdp5_cfg_destroy() function. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/546156/ Link: https://lore.kernel.org/r/20230708010407.3871346-3-dmitry.baryshkov@linaro.org commit ab8420418c2e67c81549ce483ff6a472c6dc2833 Author: Dmitry Baryshkov Date: Thu Oct 19 13:44:19 2023 +0300 drm/msm/dp: cleanup debugfs handling Currently there are two subdirs for DP debugfs files, e.g. DP-1, created by the drm core for the connector, and the msm_dp-DP-1, created by the DP driver itself. Merge those two, so that there are no extraneous connector-related subdirs. Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/563523/ Link: https://lore.kernel.org/r/20231019104419.1032329-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit 8470e4368b0f3ba788814f3b3c1142ce51d87e21 Merge: 7453d7a633d02 18fd64d254229 Author: David S. Miller Date: Sat Dec 2 22:24:37 2023 +0000 Merge branch 'net-cacheline-optimizations' Coco Li says: ==================== Analyze and Reorganize core Networking Structs to optimize cacheline consumption Currently, variable-heavy structs in the networking stack is organized chronologically, logically and sometimes by cacheline access. This patch series attempts to reorganize the core networking stack variables to minimize cacheline consumption during the phase of data transfer. Specifically, we looked at the TCP/IP stack and the fast path definition in TCP. For documentation purposes, we also added new files for each core data structure we considered, although not all ended up being modified due to the amount of existing cacheline they span in the fast path. In the documentation, we recorded all variables we identified on the fast path and the reasons. We also hope that in the future when variables are added/modified, the document can be referred to and updated accordingly to reflect the latest variable organization. Tested: Our tests were run with neper tcp_rr using tcp traffic. The tests have $cpu number of threads and variable number of flows (see below). Tests were run on 6.5-rc1 Efficiency is computed as cpu seconds / throughput (one tcp_rr round trip). The following result shows efficiency delta before and after the patch series is applied. On AMD platforms with 100Gb/s NIC and 256Mb L3 cache: IPv4 Flows with patches clean kernel Percent reduction 30k 0.0001736538065 0.0002741191042 -36.65% 20k 0.0001583661752 0.0002712559158 -41.62% 10k 0.0001639148817 0.0002951800751 -44.47% 5k 0.0001859683866 0.0003320642536 -44.00% 1k 0.0002035190546 0.0003152056382 -35.43% IPv6 Flows with patches clean kernel Percent reduction 30k 0.000202535503 0.0003275329163 -38.16% 20k 0.0002020654777 0.0003411304786 -40.77% 10k 0.0002122427035 0.0003803674705 -44.20% 5k 0.0002348776729 0.0004030403953 -41.72% 1k 0.0002237384583 0.0002813646157 -20.48% On Intel platforms with 200Gb/s NIC and 105Mb L3 cache: IPv6 Flows with patches clean kernel Percent reduction 30k 0.0006296537873 0.0006370427753 -1.16% 20k 0.0003451029365 0.0003628016076 -4.88% 10k 0.0003187646958 0.0003346835645 -4.76% 5k 0.0002954676348 0.000311807592 -5.24% 1k 0.0001909169342 0.0001848069709 3.31% v8 changes: 1. Update net_device_read_txrx cache group maximum 2. Update MAINTAINERS for documentations 3. Skip __cache_group variables in scripts/kernel-doc ==================== Signed-off-by: David S. Miller commit 18fd64d2542292713b0322e6815be059bdee440c Author: Coco Li Date: Wed Nov 29 07:27:54 2023 +0000 netns-ipv4: reorganize netns_ipv4 fast path variables Reorganize fast path variables on tx-txrx-rx order. Fastpath cacheline ends after sysctl_tcp_rmem. There are only read-only variables here. (write is on the control path and not considered in this case) Below data generated with pahole on x86 architecture. Fast path variables span cache lines before change: 4 Fast path variables span cache lines after change: 2 Suggested-by: Eric Dumazet Reviewed-by: Wei Wang Reviewed-by: David Ahern Signed-off-by: Coco Li Reviewed-by: Eric Dumazet Reviewed-by: Shakeel Butt Signed-off-by: David S. Miller commit aeb9ce058d7c6193dc41e06b3a5b29d22c446b14 Author: Coco Li Date: Wed Nov 29 07:27:53 2023 +0000 cache: enforce cache groups Set up build time warnings to safeguard against future header changes of organized structs. Warning includes: 1) whether all variables are still in the same cache group 2) whether all the cache groups have the sum of the members size (in the maximum condition, including all members defined in configs) The __cache_group* variables are ignored in kernel-doc check in the various header files they appear in to enforce the cache groups. Suggested-by: Daniel Borkmann Acked-by: Daniel Borkmann Signed-off-by: Coco Li Reviewed-by: Eric Dumazet Reviewed-by: Shakeel Butt Signed-off-by: David S. Miller commit 14006f1d8fa24a2320781ad503ca1cba92e940d2 Author: Coco Li Date: Wed Nov 29 07:27:52 2023 +0000 Documentations: Analyze heavily used Networking related structs Analyzed a few structs in the networking stack by looking at variables within them that are used in the TCP/IP fast path. Fast path is defined as TCP path where data is transferred from sender to receiver unidirectionally. It doesn't include phases other than TCP_ESTABLISHED, nor does it look at error paths. We hope to re-organizing variables that span many cachelines whose fast path variables are also spread out, and this document can help future developers keep networking fast path cachelines small. Optimized_cacheline field is computed as (Fastpath_Bytes/L3_cacheline_size_x86), and not the actual organized results (see patches to come for these). Investigation is done on 6.5 Name Struct_Cachelines Cur_fastpath_cache Fastpath_Bytes Optimized_cacheline tcp_sock 42 (2664 Bytes) 12 396 8 net_device 39 (2240 bytes) 12 234 4 inet_sock 15 (960 bytes) 14 922 14 Inet_connection_sock 22 (1368 bytes) 18 1166 18 Netns_ipv4 (sysctls) 12 (768 bytes) 4 77 2 linux_mib 16 (1060) 6 104 2 Note how there isn't much improvement space for inet_sock and Inet_connection_sock because sk and icsk_inet respectively takes up so much of the struct that rest of the variables become a small portion of the struct size. So, we decided to reorganize tcp_sock, net_device, netns_ipv4 Suggested-by: Eric Dumazet Signed-off-by: Coco Li Reviewed-by: Eric Dumazet Reviewed-by: Shakeel Butt Signed-off-by: David S. Miller commit ac7110d883ff2a25d2b0ae45c909c02d598c33af Author: Gustavo A. R. Silva Date: Tue Oct 10 06:46:50 2023 -0600 atags_proc: Add __counted_by for struct buffer and use struct_size() Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). While there, use struct_size() helper, instead of the open-coded version, to calculate the size for the allocation of the whole flexible structure, including of course, the flexible-array member. This code was found with the help of Coccinelle, and audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Reviewed-by: Justin Stitt Link: https://lore.kernel.org/r/ZSVHurzo/4aFQcT3@work Signed-off-by: Kees Cook commit 90679706d486d3cb202d1b377a230f1f22edaf00 Merge: 6685aadcab8f1 81eff2e36481c Author: Alexei Starovoitov Date: Sat Dec 2 11:36:51 2023 -0800 Merge branch 'bpf-verifier-retval-logic-fixes' Andrii Nakryiko says: ==================== BPF verifier retval logic fixes This patch set fixes BPF verifier logic around validating and enforcing return values for BPF programs that have specific range of expected return values. Both sync and async callbacks have similar logic and are fixes as well. A few tests are added that would fail without the fixes in this patch set. Also, while at it, we update retval checking logic to use smin/smax range instead of tnum, avoiding future potential issues if expected range cannot be represented precisely by tnum (e.g., [0, 2] is not representable by tnum and is treated as [0, 3]). There is a little bit of refactoring to unify async callback and program exit logic to avoid duplication of checks as much as possible. v4->v5: - fix timer_bad_ret test on no-alu32 flavor (CI); v3->v4: - add back bpf_func_state rearrangement patch; - simplified patch #4 as suggested (Shung-Hsi); v2->v3: - more carefullly switch from umin/umax to smin/smax; v1->v2: - drop tnum from retval checks (Eduard); - use smin/smax instead of umin/umax (Alexei). ==================== Link: https://lore.kernel.org/r/20231202175705.885270-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 81eff2e36481c5cf4a2ac906ae56c3fbd3e6f305 Author: Andrii Nakryiko Date: Sat Dec 2 09:57:05 2023 -0800 bpf: simplify tnum output if a fully known constant Emit tnum representation as just a constant if all bits are known. Use decimal-vs-hex logic to determine exact format of emitted constant value, just like it's done for register range values. For that move tnum_strn() to kernel/bpf/log.c to reuse decimal-vs-hex determination logic and constants. Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-12-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 5c19e1d05e9e71b42d8e779f41959254239709da Author: Andrii Nakryiko Date: Sat Dec 2 09:57:04 2023 -0800 selftests/bpf: adjust global_func15 test to validate prog exit precision Add one more subtest to global_func15 selftest to validate that verifier properly marks r0 as precise and avoids erroneous state pruning of the branch that has return value outside of expected [0, 1] value. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-11-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit e02dea158ddaebe6e725be715e0009923b96ec8e Author: Andrii Nakryiko Date: Sat Dec 2 09:57:03 2023 -0800 selftests/bpf: validate async callback return value check correctness Adjust timer/timer_ret_1 test to validate more carefully verifier logic of enforcing async callback return value. This test will pass only if return result is marked precise and read. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit eabe518de533a4291996020977054a7a7b78c7d3 Author: Andrii Nakryiko Date: Sat Dec 2 09:57:02 2023 -0800 bpf: enforce precision of R0 on program/async callback return Given we enforce a valid range for program and async callback return value, we must mark R0 as precise to avoid incorrect state pruning. Fixes: b5dc0163d8fd ("bpf: precise scalar_value tracking") Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 0ef24c8dfae24a4b8aa2e92eac20faecdc5502e5 Author: Andrii Nakryiko Date: Sat Dec 2 09:57:01 2023 -0800 bpf: unify async callback and program retval checks Use common logic to verify program return values and async callback return values. This allows to avoid duplication of any extra steps necessary, like precision marking, which will be added in the next patch. Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c871d0e00f0e8c207ce8ff89025e35cc49a8a3c3 Author: Andrii Nakryiko Date: Sat Dec 2 09:57:00 2023 -0800 bpf: enforce precise retval range on program exit Similarly to subprog/callback logic, enforce return value of BPF program using more precise smin/smax range. We need to adjust a bunch of tests due to a changed format of an error message. Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 60a6b2c78c62d0a99ccb7ad5edc950f79e56306a Author: Andrii Nakryiko Date: Sat Dec 2 09:56:59 2023 -0800 selftests/bpf: add selftest validating callback result is enforced BPF verifier expects callback subprogs to return values from specified range (typically [0, 1]). This requires that r0 at exit is both precise (because we rely on specific value range) and is marked as read (otherwise state comparison will ignore such register as unimportant). Add a simple test that validates that all these conditions are enforced. Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 8fa4ecd49b81ccd9d1d87f1c8b2260e218644878 Author: Andrii Nakryiko Date: Sat Dec 2 09:56:58 2023 -0800 bpf: enforce exact retval range on subprog/callback exit Instead of relying on potentially imprecise tnum representation of expected return value range for callbacks and subprogs, validate that smin/smax range satisfy exact expected range of return values. E.g., if callback would need to return [0, 2] range, tnum can't represent this precisely and instead will allow [0, 3] range. By checking smin/smax range, we can make sure that subprog/callback indeed returns only valid [0, 2] range. Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 0acd03a5bd188b0c501d285d938439618bd855c4 Author: Andrii Nakryiko Date: Sat Dec 2 09:56:57 2023 -0800 bpf: enforce precision of R0 on callback return Given verifier checks actual value, r0 has to be precise, so we need to propagate precision properly. r0 also has to be marked as read, otherwise subsequent state comparisons will ignore such register as unimportant and precision won't really help here. Fixes: 69c087ba6225 ("bpf: Add bpf_for_each_map_elem() helper") Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 5fad52bee30414270104525e3a0266327a6e9d11 Author: Andrii Nakryiko Date: Sat Dec 2 09:56:56 2023 -0800 bpf: provide correct register name for exception callback retval check bpf_throw() is checking R1, so let's report R1 in the log. Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 45b5623f2d721c25d1a2fdc8c4600fb4b7b61c75 Author: Andrii Nakryiko Date: Sat Dec 2 09:56:55 2023 -0800 bpf: rearrange bpf_func_state fields to save a bit of memory It's a trivial rearrangement saving 8 bytes. We have 4 bytes of padding at the end which can be filled with another field without increasing struct bpf_func_state. copy_func_state() logic remains correct without any further changes. BEFORE ====== struct bpf_func_state { struct bpf_reg_state regs[11]; /* 0 1320 */ /* --- cacheline 20 boundary (1280 bytes) was 40 bytes ago --- */ int callsite; /* 1320 4 */ u32 frameno; /* 1324 4 */ u32 subprogno; /* 1328 4 */ u32 async_entry_cnt; /* 1332 4 */ bool in_callback_fn; /* 1336 1 */ /* XXX 7 bytes hole, try to pack */ /* --- cacheline 21 boundary (1344 bytes) --- */ struct tnum callback_ret_range; /* 1344 16 */ bool in_async_callback_fn; /* 1360 1 */ bool in_exception_callback_fn; /* 1361 1 */ /* XXX 2 bytes hole, try to pack */ int acquired_refs; /* 1364 4 */ struct bpf_reference_state * refs; /* 1368 8 */ int allocated_stack; /* 1376 4 */ /* XXX 4 bytes hole, try to pack */ struct bpf_stack_state * stack; /* 1384 8 */ /* size: 1392, cachelines: 22, members: 13 */ /* sum members: 1379, holes: 3, sum holes: 13 */ /* last cacheline: 48 bytes */ }; AFTER ===== struct bpf_func_state { struct bpf_reg_state regs[11]; /* 0 1320 */ /* --- cacheline 20 boundary (1280 bytes) was 40 bytes ago --- */ int callsite; /* 1320 4 */ u32 frameno; /* 1324 4 */ u32 subprogno; /* 1328 4 */ u32 async_entry_cnt; /* 1332 4 */ struct tnum callback_ret_range; /* 1336 16 */ /* --- cacheline 21 boundary (1344 bytes) was 8 bytes ago --- */ bool in_callback_fn; /* 1352 1 */ bool in_async_callback_fn; /* 1353 1 */ bool in_exception_callback_fn; /* 1354 1 */ /* XXX 1 byte hole, try to pack */ int acquired_refs; /* 1356 4 */ struct bpf_reference_state * refs; /* 1360 8 */ struct bpf_stack_state * stack; /* 1368 8 */ int allocated_stack; /* 1376 4 */ /* size: 1384, cachelines: 22, members: 13 */ /* sum members: 1379, holes: 1, sum holes: 1 */ /* padding: 4 */ /* last cacheline: 40 bytes */ }; Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231202175705.885270-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit b47c0b9ed3eb31c8efb8f8be3bca32d6ced5fd52 Author: Alex Bee Date: Sat Dec 2 13:41:59 2023 +0100 ARM: dts: rockchip: Enable gmac for XPI-3128 Add the required properties and enable the gmac node for XPI-3128 board. The minimum reset timing requirements for the phy have been taken from DP83848J's datasheet [0] [0] https://www.ti.com/lit/ds/symlink/dp83848j.pdf Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231202124158.65615-4-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 3d880c31d40d30328cb550523adadf1466e7c686 Author: Alex Bee Date: Sat Dec 2 13:41:58 2023 +0100 ARM: dts: rockchip: Add gmac node for RK3128 RK3128's gmac is based on Synopsys Ethernet GMAC IP core. Add it to the devicetree. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231202124158.65615-3-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 5d86c15c3171c3ecebd84d53e30d9812b5591c84 Author: Alex Bee Date: Sat Dec 2 13:51:42 2023 +0100 dt-bindings: gpu: mali-utgard: Add Rockchip RK3128 compatible Rockchip RK312x SoC family has a Mali400 MP2. Add a compatible for it. Signed-off-by: Alex Bee Acked-by: Krzysztof Kozlowski Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231202125144.66052-4-knaerzche@gmail.com commit 2c9f398ef19ebc6540aa15dea851c22e162bb83b Merge: 172c48caed91a ccd45faf49737 Author: Rafael J. Wysocki Date: Sat Dec 2 15:19:53 2023 +0100 Merge back earlier ACPI backlight driver changes for v6.8. commit 3799b5d2323dffde5e2ba60b5bfbd8e6d4bea28e Author: Edson Juliano Drosdeck Date: Mon Oct 16 16:13:49 2023 -0300 platform/x86: asus-laptop: remove redundant braces in if statements Adhere to Linux kernel coding style. Reported by checkpatch: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Edson Juliano Drosdeck Link: https://lore.kernel.org/r/20231016191349.3856-1-edson.drosdeck@gmail.com Signed-off-by: Hans de Goede commit 446dd8efa94ca80a8b91fbe907364001ed1b3d85 Author: SungHwan Jung Date: Fri Nov 24 18:41:19 2023 +0900 platform/x86: acer-wmi: add fan speed monitoring for Predator PHN16-71 Support CPU and GPU fan speed monitoring through WMI for Predator PHN16-71. Signed-off-by: SungHwan Jung Link: https://lore.kernel.org/r/20231124094122.100707-3-onenowy@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit c0ff2c397e84795816816ae8a32fd1104156d0f6 Author: SungHwan Jung Date: Fri Nov 24 18:41:20 2023 +0900 platform/x86: acer-wmi: Depend on ACPI_VIDEO instead of selecting it "select ACPI_VIDEO" cause recursive dependency when "depends on HWMON" is added: drivers/hwmon/Kconfig:6:error: recursive dependency detected! drivers/hwmon/Kconfig:6: symbol HWMON is selected by EEEPC_LAPTOP drivers/platform/x86/Kconfig:326: symbol EEEPC_LAPTOP depends on ACPI_VIDEO drivers/acpi/Kconfig:208: symbol ACPI_VIDEO is selected by ACER_WMI drivers/platform/x86/Kconfig:173: symbol ACER_WMI depends on HWMON Replace the select with depends on to avoid this problem when the next patch in this series adds "depends on HWMON". There is a stub defined for the used acpi_video_get_backlight_type() function when ACPI_VIDEO is not set, so use: depends on ACPI_VIDEO || ACPI_VIDEO = n Signed-off-by: SungHwan Jung Link: https://lore.kernel.org/r/20231124094122.100707-4-onenowy@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6bb5153dfbaf88fa4b40ef50b706d2fb186ed92e Author: SungHwan Jung Date: Fri Nov 24 18:41:18 2023 +0900 platform/x86: acer-wmi: Add platform profile and mode key support for Predator PHN16-71 The Acer Predator PHN16-71 has the mode key that is used to rotate thermal modes or toggle turbo mode with predator sense app (ver. 4) on windows. This patch includes platform profile and the mode key support for the device and also includes a small fix for "WMI_gaming_execute_u64" function. Signed-off-by: SungHwan Jung Link: https://lore.kernel.org/r/20231124094122.100707-2-onenowy@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 7453d7a633d020d2481cfedbcfcab6dab89ee194 Author: Yinjun Zhang Date: Wed Nov 29 10:04:13 2023 +0200 nfp: ethtool: expose transmit SO_TIMESTAMPING capability NFP always supports software time stamping of tx, now expose the capability through ethtool ops. Signed-off-by: Yinjun Zhang Signed-off-by: Louis Peens Link: https://lore.kernel.org/r/20231129080413.83789-1-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit 078e07570359b77655d7e54a05153873f1d20648 Author: Niklas Söderlund Date: Wed Nov 29 12:11:42 2023 +0100 net: ethernet: renesas: rcar_gen4_ptp: Depend on PTP_1588_CLOCK When breaking out the Gen4 gPTP support to its own module the dependency on the PTP_1588_CLOCK framework was left as optional and only stated for the driver using the module. This leads to issues when doing COMPILE_TEST of RENESAS_GEN4_PTP separately and PTP_1588_CLOCK is built as a module and the other as a built-in. Add an explicit depend on PTP_1588_CLOCK. While at it remove the optional support for PTP_1588_CLOCK from RENESAS_ETHER_SWITCH as the driver unconditionally calls the Gen4 gPTP module and thus also requires the PTP_1588_CLOCK framework. Reported-by: Arnd Bergmann Fixes: 8c1c66235e03 ("net: ethernet: renesas: rcar_gen4_ptp: Break out to module") Signed-off-by: Niklas Söderlund Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20231129111142.3322667-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Jakub Kicinski commit a10859384256cdfab37601239ec1640a982a67e2 Author: Neil Armstrong Date: Wed Nov 29 18:22:58 2023 +0100 dt-bindings: net: qcom,ipa: document SM8650 compatible Document the IPA on the SM8650 Platform which uses version 5.5.1, which is a minor revision of v5.5 found on SM8550, thus we can use the SM8550 bindings as fallback since it shares the same register mappings. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231129-topic-sm8650-upstream-bindings-ipa-v1-1-ca21eb2dfb14@linaro.org Signed-off-by: Jakub Kicinski commit 4f09947abf248c9aa3479c1335ea69851af4b5d6 Author: Nithin Dabilpuram Date: Thu Nov 30 11:37:03 2023 +0530 octeontx2-af: debugfs: update CQ context fields This patch update the CQ structure fields to support the feature added in new silicons and also dump these fields in debugfs. Signed-off-by: Nithin Dabilpuram Signed-off-by: Geetha sowjanya Link: https://lore.kernel.org/r/20231130060703.16769-1-gakula@marvell.com Signed-off-by: Jakub Kicinski commit cc124ad39288ef8366d1f731567115d077e612a1 Author: Maxime Chevallier Date: Thu Nov 30 20:13:59 2023 +0100 Documentation: networking: add missing PLCA messages from the message list Physical Layer Collision Avoidance messages are correctly documented but were left-out of the global list of ethnl messages, add them to the list. Signed-off-by: Maxime Chevallier Link: https://lore.kernel.org/r/20231130191400.817948-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski commit b32e8fbeace6117b00b072eef3f1726149fe0298 Author: Eric Dumazet Date: Thu Nov 30 18:41:35 2023 +0000 tcp: tcp_gro_dev_warn() cleanup Use DO_ONCE_LITE_IF() and __cold attribute to put tcp_gro_dev_warn() out of line. This also allows the message to be printed again after a "echo 1 > /sys/kernel/debug/clear_warn_once" Also add a READ_ONCE() when reading device mtu, as it could be changed concurrently. Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20231130184135.4130860-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 527d2cd8b852e06c25c129fe400832bf88d2b5b0 Author: Donald Hunter Date: Thu Nov 30 21:49:53 2023 +0000 doc/netlink: Add bitfield32, s8, s16 to the netlink-raw schema The netlink-raw schema was not updated when bitfield32 was added to the genetlink-legacy schema. It is needed for rtnetlink families. s8 and s16 were also missing. Signed-off-by: Donald Hunter Link: https://lore.kernel.org/r/20231130214959.27377-2-donald.hunter@gmail.com Signed-off-by: Jakub Kicinski commit 847c5bcdfb41704e52930783b028302f415a3209 Author: Kundan Kumar Date: Fri Nov 24 00:33:31 2023 +0530 block: skip QUEUE_FLAG_STATS and rq-qos for passthrough io Write-back throttling (WBT) enables QUEUE_FLAG_STATS on the request queue. But WBT does not make sense for passthrough io, so skip QUEUE_FLAG_STATS processing. Also skip rq_qos_issue/done for passthrough io. Overall, the change gives ~11% hike in peak performance. Signed-off-by: Kundan Kumar Signed-off-by: Kanchan Joshi Link: https://lore.kernel.org/r/20231123190331.7934-1-kundan.kumar@samsung.com Signed-off-by: Jens Axboe commit 8fadb86d4ced8b8349a3b227d6d66736ff150819 Author: Keith Busch Date: Thu Nov 30 13:53:09 2023 -0800 io_uring: remove uring_cmd cookie No more users of this field. Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20231130215309.2923568-5-kbusch@meta.com Signed-off-by: Jens Axboe commit e5da71f1e373f36c7506ffa9a60ef7ec6e84674d Author: Keith Busch Date: Thu Nov 30 13:53:08 2023 -0800 iouring: remove IORING_URING_CMD_POLLED No more users of this flag. Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20231130215309.2923568-4-kbusch@meta.com Signed-off-by: Jens Axboe commit d6aacee9255e7fc10654d867f077d7b0e381eeec Author: Keith Busch Date: Thu Nov 30 13:53:07 2023 -0800 nvme: use bio_integrity_map_user Map user metadata buffers directly. Now that the bio tracks the metadata, nvme doesn't need special metadata handling and tracking with callbacks and additional fields in the pdu. Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20231130215309.2923568-3-kbusch@meta.com Signed-off-by: Jens Axboe commit 492c5d455969fc2e829f26ed4c83487b068f0dd7 Author: Keith Busch Date: Thu Nov 30 13:53:06 2023 -0800 block: bio-integrity: directly map user buffers Passthrough commands that utilize metadata currently need to bounce the user space buffer through the kernel. Add support for mapping user space directly so that we can avoid this costly overhead. This is similar to how the normal bio data payload utilizes user addresses with bio_map_user_iov(). If the user address can't directly be used for reason, like too many segments or address unalignement, fallback to a copy of the user vec while keeping the user address pinned for the IO duration so that it can safely be copied on completion in any process context. Signed-off-by: Keith Busch Link: https://lore.kernel.org/r/20231130215309.2923568-2-kbusch@meta.com [axboe: fold in fix from Kanchan Joshi] Signed-off-by: Jens Axboe commit 6685aadcab8f170ae3e4d508989a85c1b8a58dba Merge: b6a3451e0847d 1030e9154258b Author: Alexei Starovoitov Date: Fri Dec 1 16:21:03 2023 -0800 Merge branch 'bpf-file-verification-with-lsm-and-fsverity' Song Liu says: ==================== bpf: File verification with LSM and fsverity Changes v14 => v15: 1. Fix selftest build without CONFIG_FS_VERITY. (Alexei) 2. Add Acked-by from KP. Changes v13 => v14: 1. Add "static" for bpf_fs_kfunc_set. 2. Add Acked-by from Christian Brauner. Changes v12 => v13: 1. Only keep 4/9 through 9/9 of v12, as the first 3 patches already applied; 2. Use new macro __bpf_kfunc_[start|end]_defs(). Changes v11 => v12: 1. Fix typo (data_ptr => sig_ptr) in bpf_get_file_xattr(). Changes v10 => v11: 1. Let __bpf_dynptr_data() return const void *. (Andrii) 2. Optimize code to reuse output from __bpf_dynptr_size(). (Andrii) 3. Add __diag_ignore_all("-Wmissing-declarations") for kfunc definition. 4. Fix an off indentation. (Andrii) Changes v9 => v10: 1. Remove WARN_ON_ONCE() from check_reg_const_str. (Alexei) Changes v8 => v9: 1. Fix test_progs kfunc_dynptr_param/dynptr_data_null. Changes v7 => v8: 1. Do not use bpf_dynptr_slice* in the kernel. Add __bpf_dynptr_data* and use them in ther kernel. (Andrii) Changes v6 => v7: 1. Change "__const_str" annotation to "__str". (Alexei, Andrii) 2. Add KF_TRUSTED_ARGS flag for both new kfuncs. (KP) 3. Only allow bpf_get_file_xattr() to read xattr with "user." prefix. 4. Add Acked-by from Eric Biggers. Changes v5 => v6: 1. Let fsverity_init_bpf() return void. (Eric Biggers) 2. Sort things in alphabetic orders. (Eric Biggers) Changes v4 => v5: 1. Revise commit logs. (Alexei) Changes v3 => v4: 1. Fix error reported by CI. 2. Update comments of bpf_dynptr_slice* that they may return error pointer. Changes v2 => v3: 1. Rebase and resolve conflicts. Changes v1 => v2: 1. Let bpf_get_file_xattr() use const string for arg "name". (Alexei) 2. Add recursion prevention with allowlist. (Alexei) 3. Let bpf_get_file_xattr() use __vfs_getxattr() to avoid recursion, as vfs_getxattr() calls into other LSM hooks. 4. Do not use dynptr->data directly, use helper insteadd. (Andrii) 5. Fixes with bpf_get_fsverity_digest. (Eric Biggers) 6. Add documentation. (Eric Biggers) 7. Fix some compile warnings. (kernel test robot) This set enables file verification with BPF LSM and fsverity. In this solution, fsverity is used to provide reliable and efficient hash of files; and BPF LSM is used to implement signature verification (against asymmetric keys), and to enforce access control. This solution can be used to implement access control in complicated cases. For example: only signed python binary and signed python script and access special files/devices/ports. Thanks, Song ==================== Link: https://lore.kernel.org/r/20231129234417.856536-1-song@kernel.org Signed-off-by: Alexei Starovoitov commit 1030e9154258b54e3c7dc07c39e7b6dcf24bc3d2 Author: Song Liu Date: Wed Nov 29 15:44:17 2023 -0800 selftests/bpf: Add test that uses fsverity and xattr to sign a file This selftests shows a proof of concept method to use BPF LSM to enforce file signature. This test is added to verify_pkcs7_sig, so that some existing logic can be reused. This file signature method uses fsverity, which provides reliable and efficient hash (known as digest) of the file. The file digest is signed with asymmetic key, and the signature is stored in xattr. At the run time, BPF LSM reads file digest and the signature, and then checks them against the public key. Note that this solution does NOT require FS_VERITY_BUILTIN_SIGNATURES. fsverity is only used to provide file digest. The signature verification and access control is all implemented in BPF LSM. Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231129234417.856536-7-song@kernel.org Signed-off-by: Alexei Starovoitov commit 341f06fdddf72cd60a10945152f69f0f1d614519 Author: Song Liu Date: Wed Nov 29 15:44:16 2023 -0800 selftests/bpf: Add tests for filesystem kfuncs Add selftests for two new filesystem kfuncs: 1. bpf_get_file_xattr 2. bpf_get_fsverity_digest These tests simply make sure the two kfuncs work. Another selftest will be added to demonstrate how to use these kfuncs to verify file signature. CONFIG_FS_VERITY is added to selftests config. However, this is not sufficient to guarantee bpf_get_fsverity_digest works. This is because fsverity need to be enabled at file system level (for example, with tune2fs on ext4). If local file system doesn't have this feature enabled, just skip the test. Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231129234417.856536-6-song@kernel.org Signed-off-by: Alexei Starovoitov commit 6b0ae4566aba566a2ab4a2de9c59ab3d7f4b43c2 Author: Song Liu Date: Wed Nov 29 15:44:15 2023 -0800 selftests/bpf: Sort config in alphabetic order Move CONFIG_VSOCKETS up, so the CONFIGs are in alphabetic order. Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231129234417.856536-5-song@kernel.org Signed-off-by: Alexei Starovoitov commit 0de267d9ec6574536ec5ea2f2242df5c92bcdd4b Author: Song Liu Date: Wed Nov 29 15:44:14 2023 -0800 Documentation/bpf: Add documentation for filesystem kfuncs Add a brief introduction for file system kfuncs: bpf_get_file_xattr() bpf_get_fsverity_digest() The documentation highlights the strategy to avoid recursions of these kfuncs. Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231129234417.856536-4-song@kernel.org Signed-off-by: Alexei Starovoitov commit 67814c00de3161181cddd06c77aeaf86ac4cc584 Author: Song Liu Date: Wed Nov 29 15:44:13 2023 -0800 bpf, fsverity: Add kfunc bpf_get_fsverity_digest fsverity provides fast and reliable hash of files, namely fsverity_digest. The digest can be used by security solutions to verify file contents. Add new kfunc bpf_get_fsverity_digest() so that we can access fsverity from BPF LSM programs. This kfunc is added to fs/verity/measure.c because some data structure used in the function is private to fsverity (fs/verity/fsverity_private.h). To avoid recursion, bpf_get_fsverity_digest is only allowed in BPF LSM programs. Signed-off-by: Song Liu Acked-by: Eric Biggers Link: https://lore.kernel.org/r/20231129234417.856536-3-song@kernel.org Signed-off-by: Alexei Starovoitov commit ac9c05e0e453cfcab2866f6d28f257590e4f66e5 Author: Song Liu Date: Wed Nov 29 15:44:12 2023 -0800 bpf: Add kfunc bpf_get_file_xattr It is common practice for security solutions to store tags/labels in xattrs. To implement similar functionalities in BPF LSM, add new kfunc bpf_get_file_xattr(). The first use case of bpf_get_file_xattr() is to implement file verifications with asymmetric keys. Specificially, security applications could use fsverity for file hashes and use xattr to store file signatures. (kfunc for fsverity hash will be added in a separate commit.) Currently, only xattrs with "user." prefix can be read with kfunc bpf_get_file_xattr(). As use cases evolve, we may add a dedicated prefix for bpf_get_file_xattr(). To avoid recursion, bpf_get_file_xattr can be only called from LSM hooks. Signed-off-by: Song Liu Acked-by: Christian Brauner Acked-by: KP Singh Link: https://lore.kernel.org/r/20231129234417.856536-2-song@kernel.org Signed-off-by: Alexei Starovoitov commit f1e75da5364e780905d9cd6043f9c74cdcf84073 Author: Jessica Zhang Date: Fri Oct 27 15:32:57 2023 -0700 drm/atomic: Loosen FB atomic checks Loosen the requirements for atomic and legacy commit so that, in cases where pixel_source != FB, the commit can still go through. This includes adding framebuffer NULL checks in other areas to account for FB being NULL when non-FB pixel sources are enabled. To disable a plane, the pixel_source must be NONE or the FB must be NULL if pixel_source == FB. Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231027-solid-fill-v7-7-780188bfa7b2@quicinc.com commit 4ba6b7a646321e740c7f2d80c90505019c4e8fce Author: Jessica Zhang Date: Fri Oct 27 15:32:56 2023 -0700 drm/atomic: Move framebuffer checks to helper Currently framebuffer checks happen directly in drm_atomic_plane_check(). Move these checks into their own helper method. Reviewed-by: Dmitry Baryshkov Acked-by: Harry Wentland Acked-by: Sebastian Wick Signed-off-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231027-solid-fill-v7-6-780188bfa7b2@quicinc.com commit e86413f5442ee094e66b3e75f2d3419ed0df9520 Author: Jessica Zhang Date: Fri Oct 27 15:32:55 2023 -0700 drm/atomic: Add solid fill data to plane state dump Add solid_fill property data to the atomic plane state dump. Reviewed-by: Dmitry Baryshkov Acked-by: Harry Wentland Acked-by: Sebastian Wick Signed-off-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231027-solid-fill-v7-5-780188bfa7b2@quicinc.com commit 8283ac7871a959848e09fc6593b8c12b8febfee6 Author: Jessica Zhang Date: Fri Oct 27 15:32:54 2023 -0700 drm/atomic: Add pixel source to plane state dump Add pixel source to the atomic plane state dump Reviewed-by: Dmitry Baryshkov Acked-by: Harry Wentland Acked-by: Sebastian Wick Signed-off-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231027-solid-fill-v7-4-780188bfa7b2@quicinc.com commit 4b64167042927531f4cfaf035b8f88c2f7a05f06 Author: Jessica Zhang Date: Fri Oct 27 15:32:53 2023 -0700 drm: Add solid fill pixel source Add "SOLID_FILL" as a valid pixel source. If the pixel_source property is set to "SOLID_FILL", it will display data from the drm_plane "solid_fill" blob property. Reviewed-by: Dmitry Baryshkov Acked-by: Pekka Paalanen Acked-by: Harry Wentland Acked-by: Sebastian Wick Signed-off-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231027-solid-fill-v7-3-780188bfa7b2@quicinc.com commit 85863a4e16e77079ee14865905ddc3ef9483a640 Author: Jessica Zhang Date: Fri Oct 27 15:32:52 2023 -0700 drm: Introduce solid fill DRM plane property Document and add support for solid_fill property to drm_plane. In addition, add support for setting and getting the values for solid_fill. To enable solid fill planes, userspace must assign a property blob to the "solid_fill" plane property containing the following information: struct drm_mode_solid_fill { u32 r, g, b, pad; }; Acked-by: Harry Wentland Acked-by: Sebastian Wick Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231027-solid-fill-v7-2-780188bfa7b2@quicinc.com commit e50e5fed41c7eed2db4119645bf3480ec43fec11 Author: Jessica Zhang Date: Fri Oct 27 15:32:51 2023 -0700 drm: Introduce pixel_source DRM plane property Add support for pixel_source property to drm_plane and related documentation. In addition, force pixel_source to DRM_PLANE_PIXEL_SOURCE_FB in DRM_IOCTL_MODE_SETPLANE as to not break legacy userspace. This enum property will allow user to specify a pixel source for the plane. Possible pixel sources will be defined in the drm_plane_pixel_source enum. Currently, the only pixel sources are DRM_PLANE_PIXEL_SOURCE_FB (the default value) and DRM_PLANE_PIXEL_SOURCE_NONE. Acked-by: Dmitry Baryshkov Acked-by: Pekka Paalanen Acked-by: Harry Wentland Acked-by: Sebastian Wick Acked-by: Simon Ser Signed-off-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20231027-solid-fill-v7-1-780188bfa7b2@quicinc.com commit fa2bbff7b0b4e211fec5e5686ef96350690597b5 Author: Yu Kuai Date: Wed Nov 29 10:02:34 2023 +0800 md: synchronize flush io with array reconfiguration Currently rcu is used to protect iterating rdev from submit_flushes(): submit_flushes remove_and_add_spares synchronize_rcu pers->hot_remove_disk() rcu_read_lock() rdev_for_each_rcu if (rdev->raid_disk >= 0) rdev->radi_disk = -1; atomic_inc(&rdev->nr_pending) rcu_read_unlock() bi = bio_alloc_bioset() bi->bi_end_io = md_end_flush bi->private = rdev submit_bio // issue io for removed rdev Fix this problem by grabbing 'acive_io' before iterating rdev, make sure that remove_and_add_spares() won't concurrent with submit_flushes(). Fixes: a2826aa92e2e ("md: support barrier requests on all personalities.") Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231129020234.1586910-1-yukuai1@huaweicloud.com commit 96ab215b2d5edc39310c00f50b33d8ab72ac3fe3 Author: Arnd Bergmann Date: Mon Oct 16 22:04:03 2023 +0200 drm/msm/a6xx: add QMP dependency When QMP is in a loadable module, the A6xx GPU driver fails to link as built-in: x86_64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gmu.o: in function `a6xx_gmu_resume': a6xx_gmu.c:(.text+0xd62): undefined reference to `qmp_send' Add the usual dependency that still allows compiling without QMP but otherwise avoids the broken combination of options. Fixes: 88a0997f2f949 ("drm/msm/a6xx: Send ACD state to QMP at GMU resume") Signed-off-by: Arnd Bergmann Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/562945/ Link: https://lore.kernel.org/r/20231016200415.791090-1-arnd@kernel.org Signed-off-by: Dmitry Baryshkov commit 921e32bf6c0c86f774226577cb743d654f9bcfd9 Author: Abhinav Kumar Date: Fri Sep 8 12:33:13 2023 -0700 drm/msm/dpu: enable smartdma on sm8350 To support high resolutions on sm8350, enable smartdma in its catalog. Signed-off-by: Abhinav Kumar Tested-by: Dmitry Baryshkov Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/556561/ Link: https://lore.kernel.org/r/20230908193314.27008-1-quic_abhinavk@quicinc.com [DB: rebased on top of msm-next] Signed-off-by: Dmitry Baryshkov commit a9bd555de5e9042fdf8ab8d6080b86f45c68ddf6 Author: Dmitry Baryshkov Date: Mon Oct 9 19:56:27 2023 +0300 drm/msm/dpu: enable SmartDMA on SM8450 Enable the SmartDMA / multirect support on the SM8450 platform to support higher resoltion modes. Reviewed-by: Abhinav Kumar Patchwork: https://patchwork.freedesktop.org/patch/561590/ Link: https://lore.kernel.org/r/20231009165627.2691015-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov commit e6c0de5f445091d250b75dabc4c60dd2643b8c98 Author: Abhinav Kumar Date: Mon Sep 11 15:16:27 2023 -0700 drm/msm/dpu: try multirect based on mdp clock limits It's certainly possible that for large resolutions a single DPU SSPP cannot process the image without exceeding the MDP clock limits but it can still process it in multirect mode because the source rectangles will get divided and can fall within the MDP clock limits. If the SSPP cannot process the image even in multirect mode, then it will be rejected in dpu_plane_atomic_check_pipe(). Hence try using multirect for resolutions which cannot be processed by a single SSPP without exceeding the MDP clock limits. changes in v2: - use crtc_state's adjusted_mode instead of mode - fix the UBWC condition to check maxlinewidth Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/556817/ Link: https://lore.kernel.org/r/20230911221627.9569-2-quic_abhinavk@quicinc.com Signed-off-by: Dmitry Baryshkov commit 70e67aaec2f4706df0006423eebca813b00f5840 Author: Rob Clark Date: Wed Aug 23 14:54:56 2023 -0700 dma-buf/sw_sync: Add fence deadline support This consists of simply storing the most recent deadline, and adding an ioctl to retrieve the deadline. This can be used in conjunction with the SET_DEADLINE ioctl on a fence fd for testing. Ie. create various sw_sync fences, merge them into a fence-array, set deadline on the fence-array and confirm that it is propagated properly to each fence. v2: Switch UABI to express deadline as u64 v3: More verbose UAPI docs, show how to convert from timespec v4: Better comments, track the soonest deadline, as a normal fence implementation would, return an error if no deadline set. Signed-off-by: Rob Clark Reviewed-by: Christian König Acked-by: Pekka Paalanen Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20230823215458.203366-4-robdclark@gmail.com commit 63ee44540205d993854f143a5ab1d7d9e63ffcf1 Author: Rob Clark Date: Wed Aug 23 14:54:55 2023 -0700 dma-buf/sync_file: Add SET_DEADLINE ioctl The initial purpose is for igt tests, but this would also be useful for compositors that wait until close to vblank deadline to make decisions about which frame to show. The igt tests can be found at: https://gitlab.freedesktop.org/robclark/igt-gpu-tools/-/commits/fence-deadline v2: Clarify the timebase, add link to igt tests v3: Use u64 value in ns to express deadline. v4: More doc Signed-off-by: Rob Clark Acked-by: Pekka Paalanen Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20230823215458.203366-3-robdclark@gmail.com commit 8570c27932e132d2663e8120311891deb2a853de Author: Rob Clark Date: Wed Aug 23 14:54:54 2023 -0700 drm/syncobj: Add deadline support for syncobj waits Add a new flag to let userspace provide a deadline as a hint for syncobj and timeline waits. This gives a hint to the driver signaling the backing fences about how soon userspace needs it to compete work, so it can adjust GPU frequency accordingly. An immediate deadline can be given to provide something equivalent to i915 "wait boost". v2: Use absolute u64 ns value for deadline hint, drop cap and driver feature flag in favor of allowing count_handles==0 as a way for userspace to probe kernel for support of new flag v3: More verbose comments about UAPI v4: Fix negative zero, s/deadline_ns/deadline_nsec/ for consistency with existing ioctl struct fields v5: Comment/description typo fixes Signed-off-by: Rob Clark Reviewed-by: Tvrtko Ursulin [DB: fixed checkpatch warnings] Signed-off-by: Dmitry Baryshkov Link: https://patchwork.freedesktop.org/patch/msgid/20230823215458.203366-2-robdclark@gmail.com commit 0d481ff35c9a85d775e5544bb2e331e7d5eb6c3c Author: Ilpo Järvinen Date: Fri Nov 24 10:59:24 2023 +0200 x86/pci: Clean up open-coded PCIBIOS return code mangling Per PCI Firmware spec r3.3, sec 2.5.2, 2.6.2, and 2.7, the return code for these PCI BIOS interfaces is in 8 bits of the EAX register. Previously it was extracted by open-coded masks and shifting. Name the return code bits with a #define and add pcibios_get_return_code() to extract the return code to improve code readability. In addition, replace zero test with PCIBIOS_SUCCESSFUL. No functional changes intended. Link: https://lore.kernel.org/r/20231124085924.13830-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas commit 420ac76610d76b09aebc0bfc722c7af9c6daf36a Author: Ilpo Järvinen Date: Fri Nov 24 11:09:16 2023 +0200 scsi: lpfc: Use PCI_HEADER_TYPE_MFD instead of literal Replace literal 0x80 with PCI_HEADER_TYPE_MFD. Link: https://lore.kernel.org/r/20231124090919.23687-4-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas commit 4978d3f8e9e2fcc96142234b76131f7ee0a8c2e3 Merge: fdcaecfc71e2f 9c16cfe42d9fb Author: Mark Brown Date: Fri Dec 1 22:16:41 2023 +0000 ASoC: Convert Cirrus codecs to GPIO descriptors Merge series from Linus Walleij : This series walks over the Cirrus Logic ASoC drivers and clean out the use of legacy GPIO numbers and legacy GPIO APIs. The CS4271 affects an ASoC driver for EP93xx which Nikita is actively working on moving over to device tree, so I don't know about that patch specifically, but I think the collision would be max "the file was deleted". Signed-off-by: Linus Walleij --- Changes in v2: - Add explicit include in the cs35l36 driver, apparently the driver useeed this implicitly through the include. - Fix commit messages "gpios" -> "reset" on two patches. - Test builds OK - Link to v1: https://lore.kernel.org/r/20231129-descriptors-sound-cirrus-v1-0-31aa74425ff8@linaro.org --- Linus Walleij (10): ASoC: cs35l32: Drop legacy include ASoC: cs35l33: Fix GPIO name and drop legacy include ASoC: cs35l34: Fix GPIO name and drop legacy include ASoC: cs35l35: Drop legacy includes ASoC: cs35l36: Drop legacy includes ASoC: cs4271: Convert to GPIO descriptors ASoC: cirrus: edb93xx: Drop legacy include ASoC: cs42l42: Drop legacy include ASoC: cs43130: Drop legacy includes ASoC: cs4349: Drop legacy include arch/arm/mach-ep93xx/edb93xx.c | 32 +++++++++++++++++++++++++---- arch/arm/mach-ep93xx/vision_ep9307.c | 12 ++++++++++- include/sound/cs4271.h | 1 - sound/soc/cirrus/edb93xx.c | 1 - sound/soc/codecs/cs35l32.c | 1 - sound/soc/codecs/cs35l33.c | 4 +--- sound/soc/codecs/cs35l34.c | 4 +--- sound/soc/codecs/cs35l35.c | 2 -- sound/soc/codecs/cs35l36.c | 3 +-- sound/soc/codecs/cs4271.c | 39 ++++++++++++------------------------ sound/soc/codecs/cs42l42.c | 1 - sound/soc/codecs/cs42l42.h | 2 +- sound/soc/codecs/cs43130.c | 2 -- sound/soc/codecs/cs4349.c | 1 - 14 files changed, 56 insertions(+), 49 deletions(-) --- base-commit: 267aea213ae042f779a8054401a8a5f301518605 change-id: 20231129-descriptors-sound-cirrus-522d9061808e Best regards, -- Linus Walleij commit 3773343dd8906118fa0bbfd4c84051122da49e99 Author: Ilpo Järvinen Date: Fri Nov 24 11:09:14 2023 +0200 powerpc/fsl-pci: Use PCI_HEADER_TYPE_MASK instead of literal Replace 0x7f literals with PCI_HEADER_TYPE_MASK. Link: https://lore.kernel.org/r/20231124090919.23687-2-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas commit 197e0da1f1a3445b9b266f83d5d037b4709dae2e Author: Ilpo Järvinen Date: Fri Nov 24 11:09:13 2023 +0200 x86/pci: Use PCI_HEADER_TYPE_* instead of literals Replace 0x7f and 0x80 literals with PCI_HEADER_TYPE_* defines. Link: https://lore.kernel.org/r/20231124090919.23687-1-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen Signed-off-by: Bjorn Helgaas commit fdcaecfc71e2f4ab70ce9469f14dd64c23bf401a Author: Krzysztof Kozlowski Date: Fri Dec 1 14:53:32 2023 +0100 ASoC: qcom: sc8280xp: Add support for SM8450 and SM8550 Add compatibles for sound card on Qualcomm SM8450 and SM8550 boards. The compatibles were already documented. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231201135332.154017-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 625ed9457de50d7726ccb3f2bc4e01e543ceb126 Author: Krzysztof Kozlowski Date: Fri Dec 1 14:53:31 2023 +0100 ASoC: qcom: sc8280xp: set card driver name from match data Sound machine drivers for all newer Qualcomm SoC platforms are the exactly same, therefore it makes sense to use same machine driver for newer platforms as well. Choice of sound topology and user-space Alsa UCM files depends however on card driver name, which must be customized per each board. Allow such customization by using driver match data as sound card driver name. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231201135332.154017-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 29215a7d43c77466f2d7e6c264942e6bc8e06cd8 Author: Jaegeuk Kim Date: Fri Dec 1 10:38:35 2023 -0800 f2fs: allow checkpoint=disable for zoned block device Let's allow checkpoint=disable back for zoned block device. It's very risky as the feature relies on fsck or runtime recovery which matches the write pointers again if the device rebooted while disabling the checkpoint. Signed-off-by: Jaegeuk Kim commit 8a3750ecf8104de55c569ffbe844a85aa9d5deaa Author: Kees Cook Date: Thu Nov 30 12:56:08 2023 -0800 tracing/uprobe: Replace strlcpy() with strscpy() strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). The negative return value is already handled by this code so no new handling is needed here. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Cc: Steven Rostedt Cc: Masami Hiramatsu Cc: linux-trace-kernel@vger.kernel.org Acked-by: "Masami Hiramatsu (Google)" Link: https://lore.kernel.org/r/20231130205607.work.463-kees@kernel.org Signed-off-by: Kees Cook commit 1f693ef550f051ef6a95dbfadfa4fbd600769a81 Author: Ashok Raj Date: Wed Nov 29 13:56:43 2023 -0800 x86/microcode/intel: Remove redundant microcode late updated message After successful update, the late loading routine prints an update summary similar to: microcode: load: updated on 128 primary CPUs with 128 siblings microcode: revision: 0x21000170 -> 0x21000190 Remove the redundant message in the Intel side of the driver. [ bp: Massage commit message. ] Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/ZWjYhedNfhAUmt0k@a4bf019067fa.jf.intel.com commit b5e3f86a47d34f7b8af899f8cc70520f6daf8b53 Author: Andy Shevchenko Date: Mon Nov 20 17:11:46 2023 +0200 params: Fix multi-line comment style The multi-line comment style in the file is rather arbitrary. Make it follow the standard one. Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231120151419.1661807-6-andriy.shevchenko@linux.intel.com Signed-off-by: Kees Cook commit a05f096c2c0ca52e8fd34740c7d4b53ab3e7123e Author: Andy Shevchenko Date: Mon Nov 20 17:11:45 2023 +0200 params: Sort headers Sort the headers in alphabetic order in order to ease the maintenance for this part. Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231120151419.1661807-5-andriy.shevchenko@linux.intel.com Signed-off-by: Kees Cook commit 0fc79cbc937f2a754a302a710a94b68c61d0a89a Author: Andy Shevchenko Date: Mon Nov 20 17:11:44 2023 +0200 params: Use size_add() for kmalloc() Prevent allocations from integer overflow by using size_add(). Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231120151419.1661807-4-andriy.shevchenko@linux.intel.com Signed-off-by: Kees Cook commit fd0cd057a1b7351604daa6ffc91dfe28adf7225d Author: Andy Shevchenko Date: Mon Nov 20 17:11:43 2023 +0200 params: Do not go over the limit when getting the string length We can use strnlen() even on early stages and it prevents from going over the string boundaries in case it's already too long. Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231120151419.1661807-3-andriy.shevchenko@linux.intel.com Signed-off-by: Kees Cook commit 12cd3cd8c797e07afcc47bc4afa760e4ec75e9d7 Author: Andy Shevchenko Date: Mon Nov 20 17:11:42 2023 +0200 params: Introduce the param_unknown_fn type Introduce a new type for the callback to parse an unknown argument. This unifies function prototypes which takes that as a parameter. Reviewed-by: Luis Chamberlain Reviewed-by: Kees Cook Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231120151419.1661807-2-andriy.shevchenko@linux.intel.com Signed-off-by: Kees Cook commit aabf7c37dfbce3e5fe24f0c86a34bc8f2f63cee8 Author: Stephen Boyd Date: Wed Nov 29 13:44:04 2023 -0800 lkdtm: Add kfence read after free crash type Add the ability to allocate memory from kfence and trigger a read after free on that memory to validate that kfence is working properly. This is used by ChromeOS integration tests to validate that kfence errors can be collected on user devices and parsed properly. Cc: Alexander Potapenko Acked-by: Marco Elver Cc: Dmitry Vyukov Cc: Andrew Morton Cc: kasan-dev@googlegroups.com Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20231129214413.3156334-1-swboyd@chromium.org Signed-off-by: Kees Cook commit e5a4975ca463e91c2009f5950e0156f0b857eb10 Author: Justin Stitt Date: Thu Oct 19 21:34:35 2023 +0000 nvme-fc: replace deprecated strncpy with strscpy strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. Let's instead use strscpy() [2] as it guarantees NUL-termination on the destination buffer. Moreover, there is no need to use: | min(FCNVME_ASSOC_HOSTNQN_LEN, NVMF_NQN_SIZE)); I imagine this was originally done to make sure the destination buffer is NUL-terminated by ensuring we copy a number of bytes less than the size of our destination, thus leaving some NUL-bytes at the end. However, with strscpy(), we no longer need to do this and we can instead opt for the more idiomatic strscpy() usage of: | strscpy(dest, src, sizeof(dest)) Also, no NUL-padding is required as lsop is zero-allocated: | lsop = kzalloc((sizeof(*lsop) + | sizeof(*assoc_rqst) + sizeof(*assoc_acc) + | ctrl->lport->ops->lsrqst_priv_sz), GFP_KERNEL); ... and assoc_rqst points to a field in lsop: | assoc_rqst = (struct fcnvme_ls_cr_assoc_rqst *)&lsop[1]; Therefore, any additional NUL-byte assignments (like the ones that strncpy() makes) are redundant. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Similar-to: https://lore.kernel.org/all/20231018-strncpy-drivers-nvme-host-fabrics-c-v1-1-b6677df40a35@google.com/ Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20231019-strncpy-drivers-nvme-host-fc-c-v1-1-5805c15e4b49@google.com Signed-off-by: Kees Cook commit ab7e8bb6e077a55ae5ac1a4bb4ebba85470d47e5 Author: Justin Stitt Date: Thu Oct 19 17:54:15 2023 +0000 nvdimm/btt: replace deprecated strncpy with strscpy Found with grep. strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect super->signature to be NUL-terminated based on its usage with memcmp against a NUL-term'd buffer: btt_devs.c: 253 | if (memcmp(super->signature, BTT_SIG, BTT_SIG_LEN) != 0) btt.h: 13 | #define BTT_SIG "BTT_ARENA_INFO\0" NUL-padding is not required as `super` is already zero-allocated: btt.c: 985 | super = kzalloc(sizeof(struct btt_sb), GFP_NOIO); ... rendering any additional NUL-padding superfluous. Considering the above, a suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Let's also use the more idiomatic strscpy usage of (dest, src, sizeof(dest)) instead of (dest, src, XYZ_LEN) for buffers that the compiler can determine the size of. This more tightly correlates the destination buffer to the amount of bytes copied. Side note, this pattern of memcmp() on two NUL-terminated strings should really be changed to just a strncmp(), if i'm not mistaken? I see multiple instances of this pattern in this system: | if (memcmp(super->signature, BTT_SIG, BTT_SIG_LEN) != 0) | return false; where BIT_SIG is defined (weirdly) as a double NUL-terminated string: | #define BTT_SIG "BTT_ARENA_INFO\0" Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20231019-strncpy-drivers-nvdimm-btt-c-v2-1-366993878cf0@google.com Signed-off-by: Kees Cook commit 576b75f93b3d3c408235808f689453f1ed891486 Author: Justin Stitt Date: Wed Oct 18 22:48:49 2023 +0000 nvme-fabrics: replace deprecated strncpy with strscpy strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect both data->subsysnqn and data->hostnqn to be NUL-terminated based on their usage with format specifier ("%s"): fabrics.c: 322: dev_err(ctrl->device, 323: "%s, subsysnqn \"%s\"\n", 324: inv_data, data->subsysnqn); ... 349: dev_err(ctrl->device, 350: "Connect for subsystem %s is not allowed, hostnqn: %s\n", 351: data->subsysnqn, data->hostnqn); Moreover, there's no need to NUL-pad since `data` is zero-allocated already in fabrics.c: 383: data = kzalloc(sizeof(*data), GFP_KERNEL); ... therefore any further NUL-padding is rendered useless. Considering the above, a suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. I opted not to switch NVMF_NQN_SIZE to sizeof(data->xyz) because the size is defined as: | /* NQN names in commands fields specified one size */ | #define NVMF_NQN_FIELD_LEN 256 ... while NVMF_NQN_SIZE is defined as: | /* However the max length of a qualified name is another size */ | #define NVMF_NQN_SIZE 223 Since 223 seems pretty magic, I'm not going to touch it. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20231018-strncpy-drivers-nvme-host-fabrics-c-v1-1-b6677df40a35@google.com Signed-off-by: Kees Cook commit 3b2894c967377a49be084b9b39b21b2315bd9b2c Author: Justin Stitt Date: Mon Oct 16 22:38:20 2023 +0000 drm/modes: replace deprecated strncpy with strscpy_pad `strncpy` is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We should NUL-pad as there are full struct copies happening in places: | struct drm_mode_modeinfo umode; | | ... | struct drm_property_blob *blob; | | drm_mode_convert_to_umode(&umode, mode); | blob = drm_property_create_blob(crtc->dev, | sizeof(umode), &umode); A suitable replacement is `strscpy_pad` due to the fact that it guarantees both NUL-termination and NUL-padding on the destination buffer. Additionally, replace size macro `DRM_DISPLAY_MODE_LEN` with sizeof() to more directly tie the maximum buffer size to the destination buffer: | struct drm_display_mode { | ... | char name[DRM_DISPLAY_MODE_LEN]; Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Cc: Xu Panda Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20231016-strncpy-drivers-gpu-drm-drm_modes-c-v2-1-d0b60686e1c6@google.com Signed-off-by: Kees Cook commit 446425648c5d19ff7564923863538e9fae93e916 Author: Gustavo A. R. Silva Date: Tue Oct 10 06:59:44 2023 -0600 afs: Add __counted_by for struct afs_acl and use struct_size() Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). While there, use struct_size() helper, instead of the open-coded version, to calculate the size for the allocation of the whole flexible structure, including of course, the flexible-array member. This code was found with the help of Coccinelle, and audited and fixed manually. Signed-off-by: "Gustavo A. R. Silva" Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/ZSVKwBmxQ1amv47E@work Signed-off-by: Kees Cook commit 97f3880a33cd4a0c916242fd296aed975ad512d3 Author: Christophe JAILLET Date: Sat Oct 7 16:32:34 2023 +0200 VMCI: Annotate struct vmci_handle_arr with __counted_by Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time checking via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). Signed-off-by: Christophe JAILLET Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/56bef519d982218176b59bbba64a3a308d8733d5.1696689091.git.christophe.jaillet@wanadoo.fr Signed-off-by: Kees Cook commit 77070eeb882124614a40616f01bfe60947be5778 Author: Waiman Long Date: Thu Nov 30 15:43:27 2023 -0500 cgroup: Avoid false cacheline sharing of read mostly rstat_cpu The rstat_cpu and also rstat_css_list of the cgroup structure are read mostly variables. However, they may share the same cacheline as the subsequent rstat_flush_next and *bstat variables which can be updated frequently. That will slow down the cgroup_rstat_cpu() call which is called pretty frequently in the rstat code. Add a CACHELINE_PADDING() line in between them to avoid false cacheline sharing. A parallel kernel build on a 2-socket x86-64 server is used as the benchmarking tool for measuring the lock hold time. Below were the lock hold time frequency distribution before and after the patch: Run time Before patch After patch -------- ------------ ----------- 0-01 us 9,928,562 9,820,428 01-05 us 110,151 50,935 05-10 us 270 93 10-15 us 273 146 15-20 us 135 76 20-25 us 0 2 25-30 us 1 0 It can be seen that the patch further pushes the lock hold time towards the lower end. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit d499fd418fa15949d86d28bb5442ab88203fc513 Author: Waiman Long Date: Thu Nov 30 15:43:26 2023 -0500 cgroup/rstat: Optimize cgroup_rstat_updated_list() The current design of cgroup_rstat_cpu_pop_updated() is to traverse the updated tree in a way to pop out the leaf nodes first before their parents. This can cause traversal of multiple nodes before a leaf node can be found and popped out. IOW, a given node in the tree can be visited multiple times before the whole operation is done. So it is not very efficient and the code can be hard to read. With the introduction of cgroup_rstat_updated_list() to build a list of cgroups to be flushed first before any flushing operation is being done, we can optimize the way the updated tree nodes are being popped by pushing the parents first to the tail end of the list before their children. In this way, most updated tree nodes will be visited only once with the exception of the subtree root as we still need to go back to its parent and popped it out of its updated_children list. This also makes the code easier to read. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 5f0a0ebca2b98eeda10715433c7d9418ef2e6d01 Author: Carl Vanderlip Date: Fri Nov 17 10:43:37 2023 -0700 accel/qaic: Expand DRM device lifecycle Currently the QAIC DRM device registers itself when the MHI QAIC_CONTROL channel becomes available. This is when the device is able to process workloads. However, the DRM driver also provides the debugfs interface bootlog for the device. If the device fails to boot to the QSM (which brings up the MHI QAIC_CONTROL channel), the bootlog won't be available for debugging why it failed to boot. Change when the DRM device registers itself from when QAIC_CONTROL is available to when the card is first probed on the PCI bus. Additionally, make the DRM driver persist through reset/error cases so the driver doesn't have to be reloaded to access the card again. Send KOBJ_ONLINE/OFFLINE uevents so userspace can know when DRM device is ready to handle requests. Signed-off-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Reviewed-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20231117174337.20174-3-quic_jhugo@quicinc.com commit 44df9a2a13211955ae98f8650e4dc04065e8ec0b Author: Carl Vanderlip Date: Fri Nov 17 10:43:36 2023 -0700 accel/qaic: Increase number of in_reset states 'in_reset' holds the state of the device. As part of bringup, the device needs to be queried to check if it's in a valid state. Add a new state that indicates that the device is coming up, but not ready for users yet. Rename to 'dev_state' to better describe the variable. Signed-off-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Reviewed-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20231117174337.20174-2-quic_jhugo@quicinc.com commit 9c16cfe42d9fbfd258a3928b4a054d6b3ef932b0 Author: Linus Walleij Date: Fri Dec 1 14:20:39 2023 +0100 ASoC: cs4349: Drop legacy include This driver includes the legacy GPIO API but does not use any symbols from it. Drop the include. Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-10-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit c6324cafd8370c2254f90a33b7327c45e7a58bbd Author: Linus Walleij Date: Fri Dec 1 14:20:38 2023 +0100 ASoC: cs43130: Drop legacy includes This driver includes the legacy GPIO APIs and but does not use any symbols from any of them. Drop the includes. Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-9-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit 0ec65e8e2219a91987cbb041387d94d40cab38b2 Author: Linus Walleij Date: Fri Dec 1 14:20:37 2023 +0100 ASoC: cs42l42: Drop legacy include This driver includes the legacy GPIO API but does not use any symbols from it. Drop the include. Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-8-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit b191a524b225a3acd7528c3fa8ebeb15302c979b Author: Linus Walleij Date: Fri Dec 1 14:20:36 2023 +0100 ASoC: cirrus: edb93xx: Drop legacy include This driver includes the legacy GPIO API but does not use any symbols from it. Drop the include. Reviewed-by: Alexander Sverdlin Link: https://patchwork.kernel.org/project/alsa-devel/patch/20231122-ep93xx-v5-38-d59a76d5df29@maquefel.me/ Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-7-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit 42d1178d223ba9498c1ed40a5fc243a43d35ec97 Author: Linus Walleij Date: Fri Dec 1 14:20:35 2023 +0100 ASoC: cs4271: Convert to GPIO descriptors This converts the Cirrus CS4271 ASoC codec driver to use GPIO descriptors. It turns out that there are two in-kernel users of the platform data passing mechanism so these are switched over as well. One locally defined GPIO "gpio_disabled" is declared in the state struct but completely unused in the driver, so we delete it. Reviewed-by: Alexander Sverdlin Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-6-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit 194ef700d4e255686173a03b65e15cac637cc15a Author: Linus Walleij Date: Fri Dec 1 14:20:34 2023 +0100 ASoC: cs35l36: Drop legacy includes This driver includes the legacy GPIO APIs and but does not use any symbols from any of them. Drop the includes. Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-5-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit 490d2d9f190a9a6125495ac4d833fa0af41763d0 Author: Linus Walleij Date: Fri Dec 1 14:20:33 2023 +0100 ASoC: cs35l35: Drop legacy includes This driver includes the legacy GPIO APIs and but does not use any symbols from any of them. Drop the includes. Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-4-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit a6122b0b4211d132934ef99e7b737910e6d54d2f Author: Linus Walleij Date: Fri Dec 1 14:20:32 2023 +0100 ASoC: cs35l34: Fix GPIO name and drop legacy include This driver includes the legacy GPIO APIs and but does not use any symbols from any of them. Drop the includes. Further the driver is requesting "reset-gpios" rather than just "reset" from the GPIO framework. This is wrong because the gpiolib core will add "-gpios" before processing the request from e.g. device tree. Drop the suffix. The last problem means that the optional RESET GPIO has never been properly retrieved and used even if it existed, but nobody noticed. Fixes: c1124c09e103 ("ASoC: cs35l34: Initial commit of the cs35l34 CODEC driver.") Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-3-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit 50678d339d670a92658e5538ebee30447c88ccb3 Author: Linus Walleij Date: Fri Dec 1 14:20:31 2023 +0100 ASoC: cs35l33: Fix GPIO name and drop legacy include This driver includes the legacy GPIO APIs and but does not use any symbols from any of them. Drop the includes. Further the driver is requesting "reset-gpios" rather than just "reset" from the GPIO framework. This is wrong because the gpiolib core will add "-gpios" before processing the request from e.g. device tree. Drop the suffix. The last problem means that the optional RESET GPIO has never been properly retrieved and used even if it existed, but nobody noticed. Fixes: 3333cb7187b9 ("ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.") Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-2-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit f8dd1f89bd5ecbfcc547ee5b222a4b9ddb0a0160 Author: Linus Walleij Date: Fri Dec 1 14:20:30 2023 +0100 ASoC: cs35l32: Drop legacy include This driver includes the legacy GPIO API but does not use any symbols from it. Drop the include. Acked-by: Charles Keepax Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231201-descriptors-sound-cirrus-v2-1-ee9f9d4655eb@linaro.org Signed-off-by: Mark Brown commit 7b91eb6000104c450ebd7af5771ac305691b6fee Author: Josh Don Date: Thu Nov 30 16:52:03 2023 -0800 cgroup: Fix documentation for cpu.idle Two problems: - cpu.idle cgroups show up with 0 weight, correct the documentation to indicate this. - cpu.idle has no entry describing it. Signed-off-by: Josh Don Signed-off-by: Tejun Heo commit b5efc28a754d2e90b9d52ba5aaa051cc24a5c85d Author: Cristian Marussi Date: Fri Dec 1 13:58:58 2023 +0000 firmware: arm_scmi: Add protocol versioning checks Platform and agent supported protocols versions do not necessarily match. When talking to an older SCMI platform, supporting only older protocol versions, the kernel SCMI agent will downgrade the version of the used protocol to match the platform and avoid compatibility issues. In the case where the kernel/OSPM agent happens to communicate with a newer platform which can support newer protocol versions unknown to the agent, and potentially backward incompatible, the agent currently carries on, silently, in a best-effort approach. Note that the SCMI specification doesn't provide means to explicitly detect the protocol versions used by the agents, neither it is required to support multiple, older, protocol versions. Add an explicit protocol version check to let the agent detect when this version mismatch happens and warn the user about this condition. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20231201135858.2367651-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 1b2658e4c709135fe1910423d3216632f641baf9 Author: Sean Christopherson Date: Wed Nov 29 14:49:16 2023 -0800 KVM: selftests: Annotate guest ucall, printf, and assert helpers with __printf() Annotate guest printf helpers with __printf() so that the compiler will warn about incorrect formatting at compile time (see git log for how easy it is to screw up with the formatting). Suggested-by: Maxim Levitsky Link: https://lore.kernel.org/r/20231129224916.532431-5-seanjc@google.com Signed-off-by: Sean Christopherson commit f813e6d41baf2bbdd1624f9f01ac4f365eb78891 Author: Sean Christopherson Date: Wed Nov 29 14:49:15 2023 -0800 KVM: selftests: Fix broken assert messages in Hyper-V features test Swap the ordering of parameters to guest asserts related to {RD,WR}MSR success/failure in the Hyper-V features test. As is, the output will be mangled and broken due to passing an integer as a string and vice versa. Opportunistically fix a benign %u vs. %lu issue as well. Link: https://lore.kernel.org/r/20231129224916.532431-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 4d53dcc5d0bc2c445e29cb14df6d2cf93091731f Author: Sean Christopherson Date: Wed Nov 29 14:49:14 2023 -0800 KVM: selftests: Fix benign %llx vs. %lx issues in guest asserts Convert %llx to %lx as appropriate in guest asserts. The guest printf implementation treats them the same as KVM selftests are 64-bit only, but strictly adhering to the correct format will allow annotating the underlying helpers with __printf() without introducing new warnings in the build. Link: https://lore.kernel.org/r/20231129224916.532431-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 1af3bf2befc07c7198100949dd1bece02a7dbded Author: Sean Christopherson Date: Wed Nov 29 14:49:13 2023 -0800 KVM: selftests: Fix MWAIT error message when guest assertion fails Print out the test and vector as intended when a guest assert fails an assertion regarding MONITOR/MWAIT faulting. Unfortunately, the guest printf support doesn't detect such issues at compile-time, so the bug manifests as a confusing error message, e.g. in the most confusing case, the test complains that it got vector "0" instead of expected vector "0". Fixes: 0f52e4aaa614 ("KVM: selftests: Convert the MONITOR/MWAIT test to use printf guest asserts") Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20231107182159.404770-1-seanjc@google.com Link: https://lore.kernel.org/r/20231129224916.532431-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 8cc18a70913fcdc8ac06796ca91304df0a51b6b5 Author: Uwe Kleine-König Date: Fri Nov 17 10:31:01 2023 +0100 wifi: wcn36xx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117093056.873834-12-u.kleine-koenig@pengutronix.de commit b5418d170b7cf9af89245319935cfe7bf45a151c Author: Uwe Kleine-König Date: Fri Nov 17 10:30:59 2023 +0100 wifi: ath5k: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117093056.873834-10-u.kleine-koenig@pengutronix.de commit 940b57fd0e77109874a99de8b304d672599d1acb Author: Karthikeyan Periyasamy Date: Tue Nov 21 05:28:12 2023 +0530 wifi: ath12k: avoid repeated hw access from ar Currently, the helper functions are accessing mac80211 hw data from the radio (ar) structure repeatedly. So optimize these helper functions by storing mac80211 hw data locally and accessing it directly. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231120235812.2602198-3-quic_periyasa@quicinc.com commit 842addae02089fce4731be1c8d7d539449d4d009 Author: Karthikeyan Periyasamy Date: Tue Nov 21 05:28:11 2023 +0530 wifi: ath12k: Optimize the mac80211 hw data access Currently mac80211 hw data is accessed by convert the hw to radio (ar) structure and then radio to hw structure which is not necessary in some places where mac80211 hw data is already present. So in that kind of places avoid the conversion and directly access the mac80211 hw data. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231120235812.2602198-2-quic_periyasa@quicinc.com commit 37a0dd6137ecfbd25d6ce84b65ad23de4f06b779 Author: Muna Sinada Date: Thu Nov 30 19:09:51 2023 +0200 wifi: ath12k: add 320 MHz bandwidth enums Add 320 MHz bandwidth as a new bandwidth enum for ATH12k driver. This is extending existing bandwidth related enums to include 320 MHz. This is a precursor to supporting 320 MHz in the future. Sanity test performed to confirm that there was no impact in existing bandwidths. Additionally update QuIC copyright to include 2023 in hal_rx.h. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1 Signed-off-by: Muna Sinada Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231116221839.1303170-1-quic_msinada@quicinc.com commit 1f829359c8c37f77a340575957686ca8c4bca317 Author: Philipp Stanner Date: Thu Nov 2 19:15:26 2023 +0100 KVM: Harden copying of userspace-array against overflow kvm_main.c utilizes vmemdup_user() and array_size() to copy a userspace array. Currently, this does not check for an overflow. Use the new wrapper vmemdup_array_user() to copy the array more safely. Note, KVM explicitly checks the number of entries before duplicating the array, i.e. adding the overflow check should be a glorified nop. Suggested-by: Dave Airlie Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20231102181526.43279-4-pstanner@redhat.com [sean: call out that KVM pre-checks the number of entries] Signed-off-by: Sean Christopherson commit 8c4976772d9b5858b8b456e84783e089c6cfa66e Author: Philipp Stanner Date: Thu Nov 2 19:15:25 2023 +0100 KVM: s390: Harden copying of userspace-array against overflow guestdbg.c utilizes memdup_user() to copy a userspace array. This, currently, does not check for an overflow. Use the new wrapper memdup_array_user() to copy the array more safely. Note, KVM explicitly checks the number of entries before duplicating the array, i.e. adding the overflow check should be a glorified nop. Suggested-by: Dave Airlie Signed-off-by: Philipp Stanner Acked-by: Claudio Imbrenda Acked-by: Christian Borntraeger Link: https://lore.kernel.org/r/20231102181526.43279-3-pstanner@redhat.com [sean: call out that KVM pre-checks the number of entries] Signed-off-by: Sean Christopherson commit e59f75de4e501e87de7743fec29dd247a6ae6cd3 Author: Paolo Bonzini Date: Sat Nov 25 03:34:00 2023 -0500 KVM: x86/mmu: fix comment about mmu_unsync_pages_lock Fix the comment about what can and cannot happen when mmu_unsync_pages_lock is not help. The comment correctly mentions "clearing sp->unsync", but then it talks about unsync going from 0 to 1. Signed-off-by: Paolo Bonzini Link: https://lore.kernel.org/r/20231125083400.1399197-5-pbonzini@redhat.com Signed-off-by: Sean Christopherson commit 250ce1b4d21a94f910c3df5141ff6434ea92524e Author: Paolo Bonzini Date: Sat Nov 25 03:33:59 2023 -0500 KVM: x86/mmu: always take tdp_mmu_pages_lock It is cheap to take tdp_mmu_pages_lock in all write-side critical sections. We already do it all the time when zapping with read_lock(), so it is not a problem to do it from the kvm_tdp_mmu_zap_all() path (aka kvm_arch_flush_shadow_all(), aka VM destruction and MMU notifier release). Signed-off-by: Paolo Bonzini Link: https://lore.kernel.org/r/20231125083400.1399197-4-pbonzini@redhat.com Signed-off-by: Sean Christopherson commit 484dd27c0602e01cb49db362ad42b95e70912d43 Author: Paolo Bonzini Date: Sat Nov 25 03:33:58 2023 -0500 KVM: x86/mmu: remove unnecessary "bool shared" argument from iterators The "bool shared" argument is more or less unnecessary in the for_each_*_tdp_mmu_root_yield_safe() macros. Many users check for the lock before calling it; all of them either call small functions that do the check, or end up calling tdp_mmu_set_spte_atomic() and tdp_mmu_iter_set_spte(). Add a few assertions to make up for the lost check in for_each_*_tdp_mmu_root_yield_safe(), but even this is probably overkill and mostly for documentation reasons. Signed-off-by: Paolo Bonzini Link: https://lore.kernel.org/r/20231125083400.1399197-3-pbonzini@redhat.com Signed-off-by: Sean Christopherson commit 5f3c8c9187b6fa8675951f9fad5b99b11fed21f6 Author: Paolo Bonzini Date: Sat Nov 25 03:33:57 2023 -0500 KVM: x86/mmu: remove unnecessary "bool shared" argument from functions Neither tdp_mmu_next_root nor kvm_tdp_mmu_put_root need to know if the lock is taken for read or write. Either way, protection is achieved via RCU and tdp_mmu_pages_lock. Remove the argument and just assert that the lock is taken. Reviewed-by: Maxim Levitsky Signed-off-by: Paolo Bonzini Link: https://lore.kernel.org/r/20231125083400.1399197-2-pbonzini@redhat.com Signed-off-by: Sean Christopherson commit 45a61ebb221117748d3567a86908618f431ac824 Author: David Matlack Date: Fri Oct 27 10:26:39 2023 -0700 KVM: x86/mmu: Check for leaf SPTE when clearing dirty bit in the TDP MMU Re-check that the given SPTE is still a leaf and present SPTE after a failed cmpxchg in clear_dirty_gfn_range(). clear_dirty_gfn_range() intends to only operate on present leaf SPTEs, but that could change after a failed cmpxchg. A check for present was added in commit 3354ef5a592d ("KVM: x86/mmu: Check for present SPTE when clearing dirty bit in TDP MMU") but the check for leaf is still buried in tdp_root_for_each_leaf_pte() and does not get rechecked on retry. Fixes: a6a0b05da9f3 ("kvm: x86/mmu: Support dirty logging for the TDP MMU") Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20231027172640.2335197-3-dmatlack@google.com Signed-off-by: Sean Christopherson commit 1aa4bb916808503bf6fedd00f50f2077f91cebaa Author: David Matlack Date: Fri Oct 27 10:26:38 2023 -0700 KVM: x86/mmu: Fix off-by-1 when splitting huge pages during CLEAR Fix an off-by-1 error when passing in the range of pages to kvm_mmu_try_split_huge_pages() during CLEAR_DIRTY_LOG. Specifically, end is the last page that needs to be split (inclusive) so pass in `end + 1` since kvm_mmu_try_split_huge_pages() expects the `end` to be non-inclusive. At worst this will cause a huge page to be write-protected instead of eagerly split, which is purely a performance issue, not a correctness issue. But even that is unlikely as it would require userspace pass in a bitmap where the last page is the only 4K page on a huge page that needs to be split. Reported-by: Vipin Sharma Fixes: cb00a70bd4b7 ("KVM: x86/mmu: Split huge pages mapped by the TDP MMU during KVM_CLEAR_DIRTY_LOG") Signed-off-by: David Matlack Link: https://lore.kernel.org/r/20231027172640.2335197-2-dmatlack@google.com Signed-off-by: Sean Christopherson commit c52391fafcefe4c562bdac62088a2735c185b942 Author: Rob Herring Date: Wed Nov 15 15:02:44 2023 -0600 auxdisplay: img-ascii-lcd: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Cc: Paul Burton Link: https://lore.kernel.org/r/20231115210245.3744589-1-robh@kernel.org [ As discussed, used `dev` and moved call to `cfg`'s initialization. ] Signed-off-by: Miguel Ojeda commit c952bf11ace50b03fce14dbc15a092fdc9a6d2c8 Author: Jouni Högander Date: Wed Nov 15 11:07:19 2023 +0200 drm/i915/display: use intel_bo_to_drm_bo in intel_fbdev We are preparing for Xe driver. I915 and Xe object implementation are differing. Do not use i915_gem_object->base directly. Instead use intel_bo_to_drm_bo. Signed-off-by: Jouni Högander Signed-off-by: Maarten Lankhorst Reviewed-by: Vinod Govindapillai Link: https://patchwork.freedesktop.org/patch/msgid/20231115090719.3210079-3-jouni.hogander@intel.com commit 80d20fd99124800749d605c733911a8d9da78e2b Author: Jouni Högander Date: Wed Nov 15 11:07:18 2023 +0200 drm/i915/display: split i915 specific code from intel_fbdev Split out code from intel_fbdev that can not be share between i915 and xe. Create new i915 specific source/header file intel_fbdev_fb.[ch] which contains this code. Signed-off-by: Jouni Högander Reviewed-by: Vinod Govindapillai Link: https://patchwork.freedesktop.org/patch/msgid/20231115090719.3210079-2-jouni.hogander@intel.com commit b6a3451e0847d5d70fb5fa2b2a80ab9f80bf2c7b Author: Jeroen van Ingen Schenau Date: Thu Nov 30 13:03:53 2023 +0100 selftests/bpf: Fix erroneous bitmask operation xdp_synproxy_kern.c is a BPF program that generates SYN cookies on allowed TCP ports and sends SYNACKs to clients, accelerating synproxy iptables module. Fix the bitmask operation when checking the status of an existing conntrack entry within tcp_lookup() function. Do not AND with the bit position number, but with the bitmask value to check whether the entry found has the IPS_CONFIRMED flag set. Fixes: fb5cd0ce70d4 ("selftests/bpf: Add selftests for raw syncookie helpers") Signed-off-by: Jeroen van Ingen Schenau Signed-off-by: Daniel Borkmann Tested-by: Minh Le Hoang Link: https://lore.kernel.org/xdp-newbies/CAAi1gX7owA+Tcxq-titC-h-KPM7Ri-6ZhTNMhrnPq5gmYYwKow@mail.gmail.com/T/#u Link: https://lore.kernel.org/bpf/20231130120353.3084-1-jeroen.vaningenschenau@novoserve.com commit ff3670877e7c73d06c2a835d9abb62efcae0145c Author: Uwe Kleine-König Date: Thu Jul 6 11:27:31 2023 +0200 drm/imx/lcdc: Fix double-free of driver data The struct imx_lcdc driver data is allocated using devm_drm_dev_alloc() so it must not be explicitly kfree()d. Also drm_kms_helper_poll_fini() should not be called as there is no matching drm_kms_helper_poll_init(). So drop the release function completely. Fixes: c87e859cdeb5 ("drm/imx/lcdc: Implement DRM driver for imx25") Signed-off-by: Uwe Kleine-König Reviewed-by: Philipp Zabel Signed-off-by: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/20230706092731.2630232-1-u.kleine-koenig@pengutronix.de commit 26ea8229e7adb508133b078790990486c1657cc7 Author: Andy Shevchenko Date: Wed Nov 29 18:06:28 2023 +0200 pinctrl: imx: Use temporary variable to hold pins The pins are allocated from the heap, but in order to pass them as constant object, we need to use non-constant pointer. Achieve this by using a temporary variable. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231129161459.1002323-6-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 271e6a04775d867c9d59cb3c493bebc7970b128e Author: Andy Shevchenko Date: Wed Nov 29 18:06:27 2023 +0200 pinctrl: equilibrium: Use temporary variable to hold pins The pins are allocated from the heap, but in order to pass them as constant object, we need to use non-constant pointer. Achieve this by using a temporary variable. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231129161459.1002323-5-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit c82c03819b92df0e6472d4c3424e9fd614dde8ad Author: Andy Shevchenko Date: Wed Nov 29 18:06:26 2023 +0200 pinctrl: equilibrium: Unshadow error code of of_property_count_u32_elems() of_property_count_u32_elems() might return an error code in some cases. It's naturally better to assign what it's returned to the err variable and supply the real code to the upper layer(s). Besides that, it's a common practice to avoid assignments for the data in cases when we know that the error condition happened. Refactor the code accordingly. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231129161459.1002323-4-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 9e863d276876e085910f33b1b45d4bc8125e179a Author: Andy Shevchenko Date: Wed Nov 29 18:06:25 2023 +0200 pinctrl: qcom: lpass-lpi: Remove unused member in struct lpi_pingroup The group is not used anywhere, remove it. And if needed, it should be struct pingroup anyway. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231129161459.1002323-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 2cd57cbd5671fb54377ece8e5dbd2c948449b06d Author: Andy Shevchenko Date: Wed Nov 29 18:06:24 2023 +0200 pinctrl: qcom: lpass-lpi: Replace kernel.h with what is being used Replace kernel.h with what exactly is being used, i.e. array_size.h. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231129161459.1002323-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit a8fcd99924914af10d538ad5ff82aa9a3b1e42cb Merge: 5f0dedcc9decb dc99d4c8ac46b Author: Linus Walleij Date: Fri Dec 1 14:21:45 2023 +0100 Merge tag 'renesas-pinctrl-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v6.8 - Add support for interrupt affinity to the RZ/G2L GPIO driver, - Drop unneeded quotes in the RZ/A2 Pin controller DT bindings. Signed-off-by: Linus Walleij commit 209e8d2695ee7a67a5b0487bbd1aa75e290d0f41 Author: Maíra Canal Date: Thu Nov 30 13:40:40 2023 -0300 drm/v3d: Create a CPU job extension for the copy performance query job A CPU job is a type of job that performs operations that requires CPU intervention. A copy performance query job is a job that copy the complete or partial result of a query to a buffer. In order to copy the result of a performance query to a buffer, we need to get the values from the performance monitors. So, create a user extension for the CPU job that enables the creation of a copy performance query job. This user extension will allow the creation of a CPU job that copy the results of a performance query to a BO with the possibility to indicate the availability with a availability bit. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-19-mcanal@igalia.com commit bae7cb5d68001a8d4ceec5964dda74bb9aab7220 Author: Maíra Canal Date: Thu Nov 30 13:40:39 2023 -0300 drm/v3d: Create a CPU job extension for the reset performance query job A CPU job is a type of job that performs operations that requires CPU intervention. A reset performance query job is a job that resets the performance queries by resetting the values of the perfmons. Moreover, we also reset the syncobjs related to the availability of the query. So, create a user extension for the CPU job that enables the creation of a reset performance job. This user extension will allow the creation of a CPU job that resets the perfmons values and resets the availability syncobj. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-18-mcanal@igalia.com commit 6745f3e44a20ac18e7e5a40a3c7f62225983d544 Author: Maíra Canal Date: Thu Nov 30 13:40:38 2023 -0300 drm/v3d: Create a CPU job extension to copy timestamp query to a buffer A CPU job is a type of job that performs operations that requires CPU intervention. A copy timestamp query job is a job that copy the complete or partial result of a query to a buffer. As V3D doesn't provide any mechanism to obtain a timestamp from the GPU, it is a job that needs CPU intervention. So, create a user extension for the CPU job that enables the creation of a copy timestamp query job. This user extension will allow the creation of a CPU job that copy the results of a timestamp query to a BO with the possibility to indicate the timestamp availability with a availability bit. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-17-mcanal@igalia.com commit 756b31203d482d2dd1aa6c208978b0410dc7530f Author: Chih-Kang Chang Date: Wed Nov 29 15:00:46 2023 +0800 wifi: rtw89: fix misbehavior of TX beacon in concurrent mode In concurrent mode, when STA interface is scanning, it causes AP interface TX beacon on wrong channel. We modified it to scan with the operating channel when one of the interfaces is already connected. Additionally, STA interface need to stop scan when AP interface is starting to avoid TX beacon on wrong channel. Finally, AP interface need to stop TX beacon when STA interface is scanning and switching to non-OP channel,This prevent other device to get beacons on wrong channel. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231129070046.18443-5-pkshih@realtek.com commit e46987ce819d9c531b3389d487ae135fc54da494 Author: Chih-Kang Chang Date: Wed Nov 29 15:00:45 2023 +0800 wifi: rtw89: refine remain on channel flow to improve P2P connection We add a scanning check to avoid entering IPS after ROC (remain on channel) during scanning. Additionally, When P2P scanning, the flow is `1. p2p_listen step` and `2. configure filter` and `3. p2p_scan starts` in wpas, but in kernel, cfg80211 uses another workqueue to notify driver the filter change, so sometimes we see (1 > 3 > 2), that will cause Rx filter related to scan to be cleared. Therefore, we add a scanning check when configure filter to avoid scan results to be filtered. Finally, we cancel the ROC delayed workqueue before entering ROC to avoid entering twice, which might cause leaving ROC too early. Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231129070046.18443-4-pkshih@realtek.com commit 2f3eaccc662122704f70bfef1d02a78239033b85 Author: Po-Hao Huang Date: Wed Nov 29 15:00:44 2023 +0800 wifi: rtw89: Refine active scan behavior in 6 GHz The interval between sending each probe request is regulated. Before this patch, some packets are not sent out properly because of our HW limit. Extend the 6 GHz channel dwell time to cope with this. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231129070046.18443-3-pkshih@realtek.com commit 0052b3c401cdf39d3c3d12a0c3852175bc9a39c7 Author: Po-Hao Huang Date: Wed Nov 29 15:00:43 2023 +0800 wifi: rtw89: fix not entering PS mode after AP stops The attempt to enter power save mode might fail if there are still beacons pending in the queue. This sometimes happens after stopping P2P GO or AP mode. Extend stop AP function and flush all beacons to resolve this. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231129070046.18443-2-pkshih@realtek.com commit 34a101e64296c736b14ce27e647fcebd70cb7bf8 Author: Maíra Canal Date: Thu Nov 30 13:40:37 2023 -0300 drm/v3d: Create a CPU job extension for the reset timestamp job A CPU job is a type of job that performs operations that requires CPU intervention. A reset timestamp job is a job that resets the timestamp queries based on the value offset of the first query. As V3D doesn't provide any mechanism to obtain a timestamp from the GPU, it is a job that needs CPU intervention. So, create a user extension for the CPU job that enables the creation of a reset timestamp job. This user extension will allow the creation of a CPU job that resets the timestamp value in the timestamp BO and resets the availability syncobj. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-16-mcanal@igalia.com commit 62ad3b976cd7f1cc75458c7df34afb4349ae2429 Author: Stanislaw Gruszka Date: Sun Nov 26 20:53:58 2023 +0100 wifi: rt2x00: make watchdog param per device We can run PCI/MMIO devices together with USB devices in the system. Make watchdog parameter per device to avoid situation when plugin USB device change modparam_watchdog for PCI/MMIO device. Signed-off-by: Stanislaw Gruszka Tested-by: Shiji Yang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231126195358.500259-1-stf_xl@wp.pl commit 9ba0ff3e083f6a4a0b6698f06bfff74805fefa5f Author: Maíra Canal Date: Thu Nov 30 13:40:36 2023 -0300 drm/v3d: Create a CPU job extension for the timestamp query job A CPU job is a type of job that performs operations that requires CPU intervention. A timestamp query job is a job that calculates the query timestamp and updates the query availability by signaling a syncobj. As V3D doesn't provide any mechanism to obtain a timestamp from the GPU, it is a job that needs CPU intervention. So, create a user extension for the CPU job that enables the creation of a timestamp query job. This user extension will allow the creation of a CPU job that performs the timestamp query calculation and updates the timestamp BO with the proper value. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-15-mcanal@igalia.com commit 874a0eda000dbdf2f6c6aa52c0f617333aaf3e37 Author: Ilpo Järvinen Date: Fri Nov 24 10:47:25 2023 +0200 wifi: rtlwifi: Remove bridge vendor/device ids Neither vendorid nor deviceid in the struct mp_adapter is used so remove them. Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-11-ilpo.jarvinen@linux.intel.com commit 217fbc032eaaaa7bdfcaae0f1680cc0fbb0f3b68 Author: Ilpo Järvinen Date: Fri Nov 24 10:47:24 2023 +0200 wifi: rtlwifi: Remove unused PCI related defines and struct The rtlwifi driver comes with a number of PCI related defines that are unused and many would be provided by PCI core anyway if they'd be needed again. Similarly, the struct rtl_pci_capabilities_header is unused and no driver should come up their own way to access PCI Capabilities anyway. Remove the unused/duplicated PCI related defines and struct. Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-10-ilpo.jarvinen@linux.intel.com commit 05b311a3f9153226b5603e33831aec34fd38e228 Author: Ilpo Järvinen Date: Fri Nov 24 10:47:23 2023 +0200 wifi: rtlwifi: rtl8821ae: Access full PMCS reg and use pci_regs.h _rtl8821ae_clear_pci_pme_status() accesses the upper byte of the Power Management Control/Status register (PMCS) with literal 5 offset. Access the entire PMCS register using defines from pci_regs.h to improve code readability. While at it, remove the obvious comment and tweak debug prints slightly to not sound misleading. Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-9-ilpo.jarvinen@linux.intel.com commit 7bd350d2ac915e66d9a23c60fd2fdf41c4233980 Author: Ilpo Järvinen Date: Fri Nov 24 10:47:22 2023 +0200 wifi: rtlwifi: rtl8821ae: Add pdev into _rtl8821ae_clear_pci_pme_status() Add local variable pdev to shorten rtlpci->pdev. Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-8-ilpo.jarvinen@linux.intel.com commit 9dcc75e0b7d05069d257108d21080d6c5abb43d6 Author: Ilpo Järvinen Date: Fri Nov 24 10:47:21 2023 +0200 wifi: rtlwifi: rtl8821ae: Use pci_find_capability() Instead of open coding the capability structure search, find the PM Capability using pci_find_capability(). While at it, rename the generic 'cap_pointer' to 'pm_cap' which makes the intent of the code more obvious. Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-7-ilpo.jarvinen@linux.intel.com commit 760bfed91201299a135049f9219fd3ec8845f525 Author: Ilpo Järvinen Date: Fri Nov 24 10:47:20 2023 +0200 wifi: rtlwifi: rtl8821ae: Reverse PM Capability exists check Check if PM Capability does not exists and return early which follows the usual error handling pattern. Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-6-ilpo.jarvinen@linux.intel.com commit 6e071ae899f10d1b8a75639349c226b8e777de26 Author: Ilpo Järvinen Date: Fri Nov 24 10:47:19 2023 +0200 wifi: rtlwifi: rtl8821ae: Remove unnecessary PME_Status bit set BIT(7) (PME_Status) is first checked and then set unnecessarily. Remove the unnecessary setting for the bit that is already on and adjust the comment related to it. Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-5-ilpo.jarvinen@linux.intel.com commit a4fcac11a25ac3f3336a4324b497a16ae1ae5e53 Author: Ilpo Järvinen Date: Fri Nov 24 10:47:18 2023 +0200 wifi: rtlwifi: Convert to use PCIe capability accessors The rtlwifi driver accesses PCIe capabilities through custom config offsets. Convert the accesses to use the normal PCIe capability accessors. Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-4-ilpo.jarvinen@linux.intel.com commit 5894d0089cbc146063dcc0239a78ede0a8142efb Author: Ilpo Järvinen Date: Fri Nov 24 10:47:17 2023 +0200 wifi: rtlwifi: Convert LNKCTL change to PCIe cap RMW accessors The rtlwifi driver comes with custom code to write into PCIe Link Control register. RMW access for the Link Control register requires locking that is already provided by the standard PCIe capability accessors. Convert the custom RMW code writing into LNKCTL register to standard RMW capability accessors. The accesses are changed to cover the full LNKCTL register instead of touching just a single byte of the register. Fixes: 0c8173385e54 ("rtl8192ce: Add new driver") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-3-ilpo.jarvinen@linux.intel.com commit b3943b3c2971444364e03224cfc828c5789deada Author: Ilpo Järvinen Date: Fri Nov 24 10:47:16 2023 +0200 wifi: rtlwifi: Remove bogus and dangerous ASPM disable/enable code Ever since introduction in the commit 0c8173385e54 ("rtl8192ce: Add new driver") the rtlwifi code has, according to comments, attempted to disable/enable ASPM of the upstream bridge by writing into its LNKCTL register. However, the code has never been correct because it performs the writes to the device instead of the upstream bridge. Worse yet, the offset where the PCIe capabilities reside is derived from the offset of the upstream bridge. As a result, the write will use an offset on the device that does not relate to the LNKCTL register making the ASPM disable/enable code outright dangerous. Because of those problems, there is no indication that the driver needs disable/enable ASPM on the upstream bridge. As the Capabilities offset is not correctly calculated for the write to target device's LNKCTL register, the code is not disabling/enabling device's ASPM either. Therefore, just remove the upstream bridge related ASPM disable/enable code entirely. The upstream bridge related ASPM code was the only user of the struct mp_adapter members num4bytes, pcibridge_pciehdr_offset, and pcibridge_linkctrlreg so those are removed as well. Note: This change does not remove the code related to changing the device's ASPM on purpose (which is independent of this flawed code related to upstream bridge's ASPM). Suggested-by: Bjorn Helgaas Fixes: 0c8173385e54 ("rtl8192ce: Add new driver") Fixes: 886e14b65a8f ("rtlwifi: Eliminate raw reads and writes from PCIe portion") Cc: stable@vger.kernel.org Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124084725.12738-2-ilpo.jarvinen@linux.intel.com commit 00384f565a91c08c4bedae167f749b093d10e3fe Author: Martin Blumenstingl Date: Mon Nov 20 12:57:26 2023 +0100 wifi: rtw88: sdio: Honor the host max_req_size in the RX path Lukas reports skb_over_panic errors on his Banana Pi BPI-CM4 which comes with an Amlogic A311D (G12B) SoC and a RTL8822CS SDIO wifi/Bluetooth combo card. The error he observed is identical to what has been fixed in commit e967229ead0e ("wifi: rtw88: sdio: Check the HISR RX_REQUEST bit in rtw_sdio_rx_isr()") but that commit didn't fix Lukas' problem. Lukas found that disabling or limiting RX aggregation works around the problem for some time (but does not fully fix it). In the following discussion a few key topics have been discussed which have an impact on this problem: - The Amlogic A311D (G12B) SoC has a hardware bug in the SDIO controller which prevents DMA transfers. Instead all transfers need to go through the controller SRAM which limits transfers to 1536 bytes - rtw88 chips don't split incoming (RX) packets, so if a big packet is received this is forwarded to the host in it's original form - rtw88 chips can do RX aggregation, meaning more multiple incoming packets can be pulled by the host from the card with one MMC/SDIO transfer. This Depends on settings in the REG_RXDMA_AGG_PG_TH register (BIT_RXDMA_AGG_PG_TH limits the number of packets that will be aggregated, BIT_DMA_AGG_TO_V1 configures a timeout for aggregation and BIT_EN_PRE_CALC makes the chip honor the limits more effectively) Use multiple consecutive reads in rtw_sdio_read_port() and limit the number of bytes which are copied by the host from the card in one MMC/SDIO transfer. This allows receiving a buffer that's larger than the hosts max_req_size (number of bytes which can be transferred in one MMC/SDIO transfer). As a result of this the skb_over_panic error is gone as the rtw88 driver is now able to receive more than 1536 bytes from the card (either because the incoming packet is larger than that or because multiple packets have been aggregated). In case of an receive errors (-EILSEQ has been observed by Lukas) we need to drain the remaining data from the card's buffer, otherwise the card will return corrupt data for the next rtw_sdio_read_port() call. Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets") Reported-by: Lukas F. Hartmann Closes: https://lore.kernel.org/linux-wireless/CAFBinCBaXtebixKbjkWKW_WXc5k=NdGNaGUjVE8NCPNxOhsb2g@mail.gmail.com/ Suggested-by: Ping-Ke Shih Signed-off-by: Martin Blumenstingl Reviewed-by: Ulf Hansson Acked-by: Ping-Ke Shih Tested-by: Lukas F. Hartmann Reported-by: Lukas F. Hartmann Signed-off-by: Martin Blumenstingl Reviewed-by: Ulf Hansson Acked-by: Ping-Ke Shih Tested-by: Lukas F. Hartmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231120115726.1569323-1-martin.blumenstingl@googlemail.com commit 18b8413b25b7070fa2e55858a2c808e6909581d0 Author: Maíra Canal Date: Thu Nov 30 13:40:35 2023 -0300 drm/v3d: Create a CPU job extension for a indirect CSD job A CPU job is a type of job that performs operations that requires CPU intervention. An indirect CSD job is a job that, when executed in the queue, will map the indirect buffer, read the dispatch parameters, and submit a regular dispatch. Therefore, it is a job that needs CPU intervention. So, create a user extension for the CPU job that enables the creation of an indirect CSD. This user extension will allow the creation of a CSD job linked to a CPU job. The CPU job will wait for the indirect CSD job dependencies and, once they are signaled, it will update the CSD job parameters. Co-developed-by: Melissa Wen Signed-off-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-14-mcanal@igalia.com commit 1dd1dc262afacb99e66ebdc174e7b11f51a816ab Author: Ping-Ke Shih Date: Fri Nov 24 15:17:03 2023 +0800 wifi: rtw89: mac: functions to configure hardware engine and quota for WiFi 7 chips Add functions to configure HCI, DMAC (data MAC), DLE (data link engine), HFC (HCI flow control), PLE (payload engine) and etc for WiFi 7 chips. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124071703.132549-9-pkshih@realtek.com commit 39e9b5691921a886e19c80be47f492efef14d00f Author: Ping-Ke Shih Date: Fri Nov 24 15:17:02 2023 +0800 wifi: rtw89: mac: use pointer to access functions of hardware engine and quota To share flow with WiFi 7 chips, abstract functions related hardware engines and their quota, so use pointer to access them. This doesn't change logic at all. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124071703.132549-8-pkshih@realtek.com commit 0d16d8fbffb3fec128ec563b6f8cd512ebcec315 Author: Ping-Ke Shih Date: Fri Nov 24 15:17:01 2023 +0800 wifi: rtw89: mac: move code related to hardware engine to individual functions WiFi 7 chips will use the same functionalities but different registers to control hardware components, so move these stuff into functions, and then we can implement these for WiFi 7 chips later. This patch doesn't change logic. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124071703.132549-7-pkshih@realtek.com commit 27ea6be913f42ebeecac43916be3ed43025b2dca Author: Zong-Zhe Yang Date: Fri Nov 24 15:17:00 2023 +0800 wifi: rtw89: mac: check queue empty according to chip gen This function, currently called by WoWLAN flow, polls until specific HW queues are empty. The polling bit definitions are not totally the same between WiFi 6 and 7 chips. In addition, the check conditions are also a little different. So, we differentiate the implementations according to chip gen. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124071703.132549-6-pkshih@realtek.com commit 2706cb25028dd27471e25047bcc3e5df73644a4a Author: Zong-Zhe Yang Date: Fri Nov 24 15:16:59 2023 +0800 wifi: rtw89: refine element naming used by queue empty check In queue empty check, one group contains 32 queues. And, the two elements, wde_qempty_acq_num and wde_qempty_mgq_sel, are number of group and select of group. To avoid confusing them with queue number and queue selection, we refine their naming. (don't change logic at all) Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124071703.132549-5-pkshih@realtek.com commit aabe741e2d18a3a28b0f08c53b7a81374c0690b0 Author: Ping-Ke Shih Date: Fri Nov 24 15:16:58 2023 +0800 wifi: rtw89: add reserved size as factor of DLE used size DLE stands for Double Link Engine that is used to maintain buffer page. To avoid linking to wrong pages, we check the used page size during initialization and stop driver probe if the used size is unexpected. Currently, we check the page size used by PLE (payload engine) and WDE (WiFi descriptor engine). For coming WiFi 7 chips, additional reserved size is added for BB as buffer to run LA mode, so add and check the reserved size as well. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124071703.132549-4-pkshih@realtek.com commit cecf1643145a3a5980aff221e7b5ca8f90efa1cf Author: Ping-Ke Shih Date: Fri Nov 24 15:16:57 2023 +0800 wifi: rtw89: mac: add to get DLE reserved quota The reserved quota of DLE (data link engine) is used for processing next packet. Add this to get quota number, and then WiFi 7 chips can use them. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124071703.132549-3-pkshih@realtek.com commit fdb3bb0af2599f780ea7dd04a13b610b70d65a3f Author: Ping-Ke Shih Date: Fri Nov 24 15:16:56 2023 +0800 wifi: rtw89: 8922a: extend and add quota number Define 8922A buffer quota that are used by HCI control flow, payload engine, descriptor engine and etc for operation modes, such as SCC (single channel concurrence) and download firmware. Since WiFi 7 chips has more buffer classifications, add fields and struct according to design. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124071703.132549-2-pkshih@realtek.com commit 70582e26f5d9a94b373f925186c03455849fd3db Author: Justin Stitt Date: Thu Oct 19 17:44:59 2023 +0000 wifi: iwlwifi: fw: replace deprecated strncpy with strscpy_pad strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. Based on the deliberate `sizeof(dest) ... - 1` pattern we can see that both dump_info->dev_human_readable and dump_info->bus_human_readable are intended to be NUL-terminated. Moreover, since this seems to cross the file boundary let's NUL-pad to ensure no behavior change. strscpy_pad() covers both the NUL-termination and NUL-padding, let's use it. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231019-strncpy-drivers-net-wireless-intel-iwlwifi-fw-dbg-c-v2-1-179b211a374b@google.com commit 7c13132c4073628b5fe23b5188ac583a2882a6b0 Author: Maíra Canal Date: Thu Nov 30 13:40:34 2023 -0300 drm/v3d: Enable BO mapping For the indirect CSD CPU job, we will need to access the internal contents of the BO with the dispatch parameters. Therefore, create methods to allow the mapping and unmapping of the BO. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-13-mcanal@igalia.com commit 369b05961731925e4a43608ea1e7884df200f0bd Author: Melissa Wen Date: Thu Nov 30 13:40:33 2023 -0300 drm/v3d: Detach the CSD job BO setup Detach CSD job setup from CSD submission ioctl to reuse it in CPU submission ioctl for indirect CSD job. Signed-off-by: Melissa Wen Co-developed-by: Maíra Canal Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-12-mcanal@igalia.com commit 1fe0879efc8f623816c7a825d853d2140c88cb2d Author: Maíra Canal Date: Thu Nov 30 13:40:32 2023 -0300 drm/v3d: Create tracepoints to track the CPU job Create tracepoints to track the three major events of a CPU job lifetime: 1. Submission of a `v3d_submit_cpu` IOCTL 2. Beginning of the execution of a CPU job 3. Ending of the execution of a CPU job Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-11-mcanal@igalia.com commit c5195d001f4c122032a9ce90c6b88d772673fa35 Author: Maíra Canal Date: Thu Nov 30 13:40:31 2023 -0300 drm/v3d: Use v3d_get_extensions() to parse CPU job data Currently, v3d_get_extensions() only parses multisync data and assigns it to the `struct v3d_submit_ext`. But, to implement the CPU job with user extensions, we want v3d_get_extensions() to be able to parse CPU job data and assign it to the `struct v3d_cpu_job`. Therefore, allow the function v3d_get_extensions() to use `struct v3d_cpu_job *` as a parameter. If the `struct v3d_cpu_job *` is assigned to NULL, it means that the job is a GPU job and CPU job extensions should be rejected. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-10-mcanal@igalia.com commit aafc1a2bea67460c41a289e8bb1e4dc6d016fe11 Author: Melissa Wen Date: Thu Nov 30 13:40:30 2023 -0300 drm/v3d: Add a CPU job submission Create a new type of job, a CPU job. A CPU job is a type of job that performs operations that requires CPU intervention. The overall idea is to use user extensions to enable different types of CPU job, allowing the CPU job to perform different operations according to the type of user extension. The user extension ID identify the type of CPU job that must be dealt. Having a CPU job is interesting for synchronization purposes as a CPU job has a queue like any other V3D job and can be synchoronized by the multisync extension. Signed-off-by: Melissa Wen Co-developed-by: Maíra Canal Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-9-mcanal@igalia.com commit 464c61e76de851a216e667c91332172c68ffed54 Author: Maíra Canal Date: Thu Nov 30 13:40:29 2023 -0300 drm/v3d: Decouple job allocation from job initiation We want to allow the IOCTLs to allocate the job without initiating it. This will be useful for the CPU job submission IOCTL, as the CPU job has the need to use information from the user extensions. Currently, the user extensions are parsed before the job allocation, making it impossible to fill the CPU job when parsing the user extensions. Therefore, decouple the job allocation from the job initiation. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-8-mcanal@igalia.com commit 6893deb881ab7da1691bd05045ffcc0c806319b9 Author: Maíra Canal Date: Thu Nov 30 13:40:28 2023 -0300 drm/v3d: Don't allow two multisync extensions in the same job Currently, two multisync extensions can be added to the same job and only the last multisync extension will be used. To avoid this vulnerability, don't allow two multisync extensions in the same job. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-7-mcanal@igalia.com commit 8288faaa8b3817c2fcdbacc720527bb8df2b57b1 Author: Melissa Wen Date: Thu Nov 30 13:40:27 2023 -0300 drm/v3d: Simplify job refcount handling Instead of checking if the job is NULL every time we call the function, check it inside the function. Signed-off-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-6-mcanal@igalia.com commit 9032d5f633ed7b5c726971dc7e2372045bf27f40 Author: Melissa Wen Date: Thu Nov 30 13:40:26 2023 -0300 drm/v3d: Detach job submissions IOCTLs to a new specific file We will include a new job submission type, the CPU job submission. For readability and maintability, separate the job submission IOCTLs and related operations from v3d_gem.c. Minor fix in the CSD submission kernel doc: CSD (texture formatting) -> CSD (compute shader). Signed-off-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-5-mcanal@igalia.com commit a8ad9d63a160f6b93f6958a5a0ded1a6abb15815 Author: Melissa Wen Date: Thu Nov 30 13:40:25 2023 -0300 drm/v3d: Move wait BO ioctl to the v3d_bo file IOCTLs related to BO operations reside on the file v3d_bo.c. The wait BO ioctl is the only IOCTL regarding BOs that is placed in a different file. So, move it to the v3d_bo.c file. Signed-off-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-4-mcanal@igalia.com commit 780b9463ce66a9efb18e3b5d35cd011fb918d741 Author: Melissa Wen Date: Thu Nov 30 13:40:24 2023 -0300 drm/v3d: Remove unused function header v3d_mmu_get_offset header was added but the function was never defined. Just remove it. Signed-off-by: Melissa Wen Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Link: https://patchwork.freedesktop.org/patch/msgid/20231130164420.932823-3-mcanal@igalia.com commit 15bc81212f593fbd7bda787598418b931842dc14 Author: Shinas Rasheed Date: Tue Nov 28 21:31:31 2023 -0800 octeon_ep: set backpressure watermark for RX queues Set backpressure watermark for hardware RX queues. Backpressure gets triggered when the available buffers of a hardware RX queue falls below the set watermark. This backpressure will propagate to packet processing pipeline in the OCTEON card, so that the host receives fewer packets and prevents packet dropping at host. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit ab47505ce45b869ab649024dc932e981fcdd6e5f Author: Flavio Suligoi Date: Wed Nov 29 17:45:14 2023 +0100 backlight: mp3309c: Fix uninitialized local variable In the function "pm3309c_parse_dt_node", when the dimming analog control mode (by I2C messages) is enabled, the local variable "prop_levels" is tested without any initialization, as indicated by the following smatch warning: drivers/video/backlight/mp3309c.c:279 pm3309c_parse_dt_node() error: uninitialized symbol 'prop_levels'. To avoid any problem in case of undefined behavior, we need to initialize it to "NULL". Reported-by: Dan Carpenter Closes: https://lore.kernel.org/dri-devel/af0a1870-693b-442f-9b11-0503cfcd944a@moroto.mountain/ Fixes: 2e914516a58c ("backlight: mp3309c: Add support for MPS MP3309C") Signed-off-by: Flavio Suligoi Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20231129164514.2772719-1-f.suligoi@asem.it Signed-off-by: Lee Jones commit 0cd523ee864243c9bdb9d52776613e62b992f6bf Author: Dan Carpenter Date: Tue Nov 28 16:13:19 2023 +0300 octeon_ep: Fix error code in probe() Set the error code if octep_ctrl_net_get_mtu() fails. Currently the code returns success. Fixes: 0a5f8534e398 ("octeon_ep: get max rx packet length from firmware") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Signed-off-by: Dan Carpenter Reviewed-by: Sathesh B Edara Signed-off-by: David S. Miller commit da40448ce4eb4de18eb7b0db61dddece32677939 Author: Amir Goldstein Date: Thu Nov 30 16:16:23 2023 +0200 fs: move file_start_write() into direct_splice_actor() The callers of do_splice_direct() hold file_start_write() on the output file. This may cause file permission hooks to be called indirectly on an overlayfs lower layer, which is on the same filesystem of the output file and could lead to deadlock with fanotify permission events. To fix this potential deadlock, move file_start_write() from the callers into the direct_splice_actor(), so file_start_write() will not be held while splicing from the input file. Suggested-by: Josef Bacik Link: https://lore.kernel.org/r/20231128214258.GA2398475@perftesting/ Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231130141624.3338942-3-amir73il@gmail.com Signed-off-by: Christian Brauner commit 488e8f685207e0758398963d6834f81e5e61c162 Author: Amir Goldstein Date: Thu Nov 30 16:16:22 2023 +0200 fs: fork splice_file_range() from do_splice_direct() In preparation of calling do_splice_direct() without file_start_write() held, create a new helper splice_file_range(), to be called from context of ->copy_file_range() methods instead of do_splice_direct(). Currently, the only difference is that splice_file_range() does not take flags argument and that it asserts that file_start_write() is held, but we factor out a common helper do_splice_direct_actor() that will be used later. Use the new helper from __ceph_copy_file_range(), that was incorrectly passing to do_splice_direct() the copy flags argument as splice flags. The value of copy flags in ceph is always 0, so it is a smenatic bug fix. Move the declaration of both helpers to linux/splice.h. Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231130141624.3338942-2-amir73il@gmail.com Acked-by: Jeff Layton Signed-off-by: Christian Brauner commit 3fde49c5dd8b1a65c44e2d6861899ccfa9c11197 Author: Michal Simek Date: Thu Nov 30 10:15:38 2023 +0100 dt-bindings: gpio: modepin: Describe label property Describe optional label property which can be used for better gpio identification. Signed-off-by: Michal Simek Acked-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit a51749ab34d9e5dec548fe38ede7e01e8bb26454 Author: Jann Horn Date: Thu Nov 30 21:48:17 2023 +0100 locking/mutex: Document that mutex_unlock() is non-atomic I have seen several cases of attempts to use mutex_unlock() to release an object such that the object can then be freed by another task. This is not safe because mutex_unlock(), in the MUTEX_FLAG_WAITERS && !MUTEX_FLAG_HANDOFF case, accesses the mutex structure after having marked it as unlocked; so mutex_unlock() requires its caller to ensure that the mutex stays alive until mutex_unlock() returns. If MUTEX_FLAG_WAITERS is set and there are real waiters, those waiters have to keep the mutex alive, but we could have a spurious MUTEX_FLAG_WAITERS left if an interruptible/killable waiter bailed between the points where __mutex_unlock_slowpath() did the cmpxchg reading the flags and where it acquired the wait_lock. ( With spinlocks, that kind of code pattern is allowed and, from what I remember, used in several places in the kernel. ) Document this, such a semantic difference between mutexes and spinlocks is fairly unintuitive. [ mingo: Made the changelog a bit more assertive, refined the comments. ] Signed-off-by: Jann Horn Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20231130204817.2031407-1-jannh@google.com commit 561322c3bc14bb59f26120a9135eabc140284f86 Author: Mika Kahola Date: Wed Nov 29 14:22:21 2023 +0200 drm/i915/display: Skip state verification with TBT-ALT mode With TBT-ALT mode we are not programming C20 chip PLL's and hence we don't need to check state verification. We don't need to program DP link signal levels i.e.pre-emphasis and voltage swing either. This patch fixes dmesg errors like this one "[drm] ERROR PHY F Write 0c06 failed after 3 retries." Signed-off-by: Mika Kahola Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20231129122221.1109084-1-mika.kahola@intel.com commit 27951e1d8274e9f9a2925b069e4492939a3f2099 Author: Nathan Lynch Date: Tue Nov 14 11:01:55 2023 -0600 powerpc/pseries/memhp: Log more error conditions in add path When an add operation for multiple LMBs fails, there is currently little indication from the kernel of what went wrong. Be a little more verbose about error conditions in the add paths. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231114-pseries-memhp-fixes-v1-3-fb8f2bb7c557@linux.ibm.com commit bd68ffce69f6cf8ddd3a3c32549d1d2275e49fc5 Author: Nathan Lynch Date: Tue Nov 14 11:01:53 2023 -0600 powerpc/pseries/memhp: Fix access beyond end of drmem array dlpar_memory_remove_by_index() may access beyond the bounds of the drmem lmb array when the LMB lookup fails to match an entry with the given DRC index. When the search fails, the cursor is left pointing to &drmem_info->lmbs[drmem_info->n_lmbs], which is one element past the last valid entry in the array. The debug message at the end of the function then dereferences this pointer: pr_debug("Failed to hot-remove memory at %llx\n", lmb->base_addr); This was found by inspection and confirmed with KASAN: pseries-hotplug-mem: Attempting to hot-remove LMB, drc index 1234 ================================================================== BUG: KASAN: slab-out-of-bounds in dlpar_memory+0x298/0x1658 Read of size 8 at addr c000000364e97fd0 by task bash/949 dump_stack_lvl+0xa4/0xfc (unreliable) print_report+0x214/0x63c kasan_report+0x140/0x2e0 __asan_load8+0xa8/0xe0 dlpar_memory+0x298/0x1658 handle_dlpar_errorlog+0x130/0x1d0 dlpar_store+0x18c/0x3e0 kobj_attr_store+0x68/0xa0 sysfs_kf_write+0xc4/0x110 kernfs_fop_write_iter+0x26c/0x390 vfs_write+0x2d4/0x4e0 ksys_write+0xac/0x1a0 system_call_exception+0x268/0x530 system_call_vectored_common+0x15c/0x2ec Allocated by task 1: kasan_save_stack+0x48/0x80 kasan_set_track+0x34/0x50 kasan_save_alloc_info+0x34/0x50 __kasan_kmalloc+0xd0/0x120 __kmalloc+0x8c/0x320 kmalloc_array.constprop.0+0x48/0x5c drmem_init+0x2a0/0x41c do_one_initcall+0xe0/0x5c0 kernel_init_freeable+0x4ec/0x5a0 kernel_init+0x30/0x1e0 ret_from_kernel_user_thread+0x14/0x1c The buggy address belongs to the object at c000000364e80000 which belongs to the cache kmalloc-128k of size 131072 The buggy address is located 0 bytes to the right of allocated 98256-byte region [c000000364e80000, c000000364e97fd0) ================================================================== pseries-hotplug-mem: Failed to hot-remove memory at 0 Log failed lookups with a separate message and dereference the cursor only when it points to a valid entry. Signed-off-by: Nathan Lynch Fixes: 51925fb3c5c9 ("powerpc/pseries: Implement memory hotplug remove in the kernel") Signed-off-by: Michael Ellerman Link: https://msgid.link/20231114-pseries-memhp-fixes-v1-1-fb8f2bb7c557@linux.ibm.com commit 4a74197b65e69c46fe6e53f7df2f4d6ce9ffe012 Author: Randy Dunlap Date: Thu Nov 30 21:51:59 2023 -0800 powerpc/44x: select I2C for CURRITUCK Fix build errors when CURRITUCK=y and I2C is not builtin (=m or is not set). Fixes these build errors: powerpc-linux-ld: arch/powerpc/platforms/44x/ppc476.o: in function `avr_halt_system': ppc476.c:(.text+0x58): undefined reference to `i2c_smbus_write_byte_data' powerpc-linux-ld: arch/powerpc/platforms/44x/ppc476.o: in function `ppc47x_device_probe': ppc476.c:(.init.text+0x18): undefined reference to `i2c_register_driver' Fixes: 2a2c74b2efcb ("IBM Akebono: Add the Akebono platform") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Closes: lore.kernel.org/r/202312010820.cmdwF5X9-lkp@intel.com Signed-off-by: Michael Ellerman Link: https://msgid.link/20231201055159.8371-1-rdunlap@infradead.org commit a9e1e4d6e8c77c732e8084b03bae0c78cafdceb0 Author: Dario Binacchi Date: Fri Nov 24 11:02:37 2023 +0100 powerpc/85xx: Fix typo in code comment s/singals/signals/ Signed-off-by: Dario Binacchi Signed-off-by: Michael Ellerman Link: https://msgid.link/20231124100241.660374-1-dario.binacchi@amarulasolutions.com commit e12d8e2602d2bcd26022eff3e2519d25925e760c Author: Zhao Ke Date: Wed Nov 29 15:58:45 2023 +0800 powerpc: Add PVN support for HeXin C2000 processor HeXin Tech Co. has applied for a new PVN from the OpenPower Community for its new processor C2000. The OpenPower has assigned a new PVN and this newly assigned PVN is 0x0066, add pvr register related support for this PVN. Signed-off-by: Zhao Ke Link: https://discuss.openpower.foundation/t/how-to-get-a-new-pvr-for-processors-follow-power-isa/477/10 Signed-off-by: Michael Ellerman Link: https://msgid.link/20231129075845.57976-1-ke.zhao@shingroup.cn commit f8d3555355653848082c351fa90775214fb8a4fa Author: Michael Ellerman Date: Thu Nov 30 22:44:33 2023 +1100 powerpc: Fix build error due to is_valid_bugaddr() With CONFIG_GENERIC_BUG=n the build fails with: arch/powerpc/kernel/traps.c:1442:5: error: no previous prototype for ‘is_valid_bugaddr’ [-Werror=missing-prototypes] 1442 | int is_valid_bugaddr(unsigned long addr) | ^~~~~~~~~~~~~~~~ The prototype is only defined, and the function is only needed, when CONFIG_GENERIC_BUG=y, so move the implementation under that. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231130114433.3053544-2-mpe@ellerman.id.au commit d8c3f243d4db24675b653f0568bb65dae34e6455 Author: Michael Ellerman Date: Thu Nov 30 22:44:32 2023 +1100 powerpc/mm: Fix build failures due to arch_reserved_kernel_pages() With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with: arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes] 1739 | unsigned long __init arch_reserved_kernel_pages(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ The prototype for arch_reserved_kernel_pages() is in include/linux/mm.h, but it's guarded by __HAVE_ARCH_RESERVED_KERNEL_PAGES. The powerpc headers define __HAVE_ARCH_RESERVED_KERNEL_PAGES in asm/mmzone.h, which is not included into the generic headers when NUMA=n. Move the definition of __HAVE_ARCH_RESERVED_KERNEL_PAGES into asm/mmu.h which is included regardless of NUMA=n. Additionally the ifdef around __HAVE_ARCH_RESERVED_KERNEL_PAGES needs to also check for CONFIG_PRESERVE_FA_DUMP. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231130114433.3053544-1-mpe@ellerman.id.au commit ca89b69734f92021e25899dff3e433b1904f5832 Author: Tomi Valkeinen Date: Thu Nov 9 09:38:04 2023 +0200 drm/tidss: Use DRM_PLANE_COMMIT_ACTIVE_ONLY At the moment the driver does not use DRM_PLANE_COMMIT_ACTIVE_ONLY, but still checks for crtc->state->active in tidss_crtc_atomic_flush(), and skips the flush if the crtc is not active. The exact reason why DRM_PLANE_COMMIT_ACTIVE_ONLY is not used has been lost in history. DRM_PLANE_COMMIT_ACTIVE_ONLY does also affect the plane updates, and I think the issue was related to multi-display systems and moving planes between the displays. However, it is possible the issue was only present on the older DSS hardware, handled by the omapdrm driver (on which the tidss driver is loosely based). Reviewing the code related to DRM_PLANE_COMMIT_ACTIVE_ONLY does not show any issues, and testing on J7 EVM with two displays works fine. Change the driver to use DRM_PLANE_COMMIT_ACTIVE_ONLY. Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-11-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit 95d4b471953411854f9c80b568da7fcf753f3801 Author: Tomi Valkeinen Date: Thu Nov 9 09:38:03 2023 +0200 drm/tidss: Fix atomic_flush check tidss_crtc_atomic_flush() checks if the crtc is enabled, and if not, returns immediately as there's no reason to do any register changes. However, the code checks for 'crtc->state->enable', which does not reflect the actual HW state. We should instead look at the 'crtc->state->active' flag. This causes the tidss_crtc_atomic_flush() to proceed with the flush even if the active state is false, which then causes us to hit the WARN_ON(!crtc->state->event) check. Fix this by checking the active flag, and while at it, fix the related debug print which had "active" and "needs modeset" wrong way. Cc: Fixes: 32a1795f57ee ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-10-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit d4652187367bc55983139401d0ee41d6e565b13d Author: Tomi Valkeinen Date: Thu Nov 9 09:38:02 2023 +0200 drm/tidss: IRQ code cleanup The IRQ setup code is overly complex. All we really need to do is initialize the related fields in struct tidss_device, and request the IRQ. We can drop all the HW accesses, as they are pointless: the driver will set the IRQs correctly when it needs any of the IRQs, and at probe time we have done a reset, so we know that all the IRQs are masked by default in the hardware. Thus we can combine the tidss_irq_preinstall() and tidss_irq_postinstall() into the tidss_irq_install() function, drop the HW accesses, and drop the use of spinlock, as this is done at init time and there can be no races. We can also drop the HW access from the tidss_irq_uninstall(), as the driver will anyway disable and suspend the hardware at remove time. Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-9-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit bc288a927815efcf9d7f4a54d4d89c5df478c635 Author: Tomi Valkeinen Date: Thu Nov 9 09:38:01 2023 +0200 drm/tidss: Fix dss reset The probe function calls dispc_softreset() before runtime PM is enabled and without enabling any of the DSS clocks. This happens to work by luck, and we need to make sure the DSS HW is active and the fclk is enabled. To fix the above, add a new function, dispc_init_hw(), which does: - pm_runtime_set_active() - clk_prepare_enable(fclk) - dispc_softreset(). This ensures that the reset can be successfully accomplished. Note that we use pm_runtime_set_active(), not the normal pm_runtime_get(). The reason for this is that at this point we haven't enabled the runtime PM yet and also we don't want the normal resume callback to be called: the dispc resume callback does some initial HW setup, and it expects that the HW was off (no video ports are streaming). If the bootloader has enabled the DSS and has set up a boot time splash-screen, the DSS would be enabled and streaming which might lead to issues with the normal resume callback. Fixes: c9b2d923befd ("drm/tidss: Soft Reset DISPC on startup") Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-8-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit 576d96c5c896221b5bc8feae473739469a92e144 Author: Tomi Valkeinen Date: Thu Nov 9 09:38:00 2023 +0200 drm/tidss: Add simple K2G manual reset K2G display controller does not support soft reset, but we can do the most important steps manually: mask the IRQs and disable the VPs. Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-7-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit 151825150cf9c2e9fb90763d35b9dff3783628ac Author: Tomi Valkeinen Date: Thu Nov 9 09:37:59 2023 +0200 drm/tidss: Check for K2G in in dispc_softreset() K2G doesn't have softreset feature. Instead of having every caller of dispc_softreset() check for K2G, move the check into dispc_softreset(), and make dispc_softreset() return 0 in case of K2G. Reviewed-by: Laurent Pinchart Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-6-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit aceafbb5035c4bfc75a321863ed1e393d644d2d2 Author: Tomi Valkeinen Date: Thu Nov 9 09:37:58 2023 +0200 drm/tidss: Return error value from from softreset Return an error value from dispc_softreset() so that the caller can handle the errors. Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-5-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit 36d1e0852680aa038e2428d450673390111b165c Author: Tomi Valkeinen Date: Thu Nov 9 09:37:57 2023 +0200 drm/tidss: Move reset to the end of dispc_init() We do a DSS reset in the middle of the dispc_init(). While that happens to work now, we should really make sure that e..g the fclk, which is acquired only later in the function, is enabled when doing a reset. This will be handled in a later patch, but for now, let's move the dispc_softreset() call to the end of dispc_init(), which is a sensible place for it anyway. Reviewed-by: Laurent Pinchart Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-4-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit c2746e4d278be8f71ef0dbcd00fcc8ba46c678ef Author: Tomi Valkeinen Date: Thu Nov 9 09:37:56 2023 +0200 drm/tidss: Drop useless variable init No need to initialize the ret to 0 in dispc_softreset(). Reviewed-by: Laurent Pinchart Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-3-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit 4b0bdf9383a999498b88df4c1a1e3f0910b86d53 Author: Tomi Valkeinen Date: Thu Nov 9 09:37:55 2023 +0200 drm/tidss: Use PM autosuspend Use runtime PM autosuspend feature, with 1s timeout, to avoid unnecessary suspend-resume cycles when, e.g. the userspace temporarily turns off the crtcs when configuring the outputs. Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-2-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit a0a9e7b4690b1d78f146fbc8c78a630856ed3015 Author: Tomi Valkeinen Date: Thu Nov 9 09:37:54 2023 +0200 drm/tidss: Use pm_runtime_resume_and_get() Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync(), which will handle error situations better. Also fix the return, as there should be no reason for the current complex return. Reviewed-by: Laurent Pinchart Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231109-tidss-probe-v2-1-ac91b5ea35c0@ideasonboard.com Signed-off-by: Tomi Valkeinen commit 5cc5ea7b6d7b0649b74df1e0f2d1875e683704d9 Author: Aradhya Bhatia Date: Wed Nov 8 22:46:19 2023 +0530 drm/tidss: Add support for AM62A7 DSS Add support for the DSS controller on TI's AM62A7 SoC in the tidss driver. This controller has 2 video pipelines that can render 2 video planes on over a screen, using the overlay managers. The output of the DSS comes from video port 2 (VP2) in the form of RGB88 DPI signals, while the VP1 is tied off inside the SoC. Also add and use a new type of VP, DISPC_VP_TIED_OFF, for the tied-off VP1 of AM62A DSS. Signed-off-by: Aradhya Bhatia Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20231108171619.978438-3-a-bhatia1@ti.com Signed-off-by: Tomi Valkeinen commit 7959ceb767e4b6c8ced7cb8aaa1c6439cfca890c Author: Aradhya Bhatia Date: Wed Nov 8 22:46:18 2023 +0530 dt-bindings: display: ti: Add support for am62a7 dss The DSS controller on TI's AM62A7 SoC is an update from that on TI's AM625 SoC. Like the DSS in AM625, the DSS in this SoC has 2 video pipelines, but unlike the former, the latter only has one output port on VP2 to service DPI display sinks. Add the new controller's compatible. Signed-off-by: Aradhya Bhatia Reviewed-by: Krzysztof Kozlowski Reviewed-by: Tomi Valkeinen Link: https://lore.kernel.org/r/20231108171619.978438-2-a-bhatia1@ti.com Signed-off-by: Tomi Valkeinen commit f8cc37c59731c88c8c2c62222482dddf071a0600 Author: Andrew Davis Date: Mon Nov 13 14:55:01 2023 -0600 drm/omapdrm: Improve check for contiguous buffers While a scatter-gather table having only 1 entry does imply it is contiguous, it is a logic error to assume the inverse. Tables can have more than 1 entry and still be contiguous. Use a proper check here. Signed-off-by: Andrew Davis Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20231113205501.616927-1-afd@ti.com commit ce852f1308ac738e61c5b2502517deea593a1554 Author: Chen Ni Date: Mon Nov 27 02:03:01 2023 +0000 crypto: sa2ul - Return crypto_aead_setkey to transfer the error Return crypto_aead_setkey() in order to transfer the error if it fails. Fixes: d2c8ac187fc9 ("crypto: sa2ul - Add AEAD algorithm support") Signed-off-by: Chen Ni Signed-off-by: Herbert Xu commit a10d17a4a6190c442d4b1448a23c5674f94eb46b Author: Weili Qian Date: Sat Nov 25 19:50:11 2023 +0800 crypto: hisilicon/qm - add comments and remove redundant array element 1. Remove redundant array element, prevent the size obtained by ARRAY_SIZE() from qm_log_hw_error is greater than actual size. 2. Add comments in function qm_set_vf_mse() and qm_cq_ctx_cfg() to make it easier to understand. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit c66272a4c9932d6c585eef99039747617d48d662 Author: Weili Qian Date: Sat Nov 25 19:50:10 2023 +0800 crypto: hisilicon/qm - simplify the status of qm The 'QM_INIT' and 'QM_CLOSE' status of qm and 'QP_INIT' and 'QP_CLOSE' status of queue are not actually used. Currently, driver only needs to switch status when the device or queue is enabled or stopped, Therefore, remove unneeded status to simplify driver. In addition, rename'QM_START to'QM_WORK' for ease to understand. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit fb4ac519c6caf5fdfcc30ef838cae55dbc919e2e Author: Weili Qian Date: Sat Nov 25 19:50:09 2023 +0800 crypto: hisilicon/sgl - small cleanups for sgl.c 1. Remove unnecessary brackets in function hisi_acc_create_sgl_pool(). 2. Modify local variable type, ensure that the variable type is consistent with the variable type to be compared. 3. Because the function clear_hw_sgl_sge() is in the task process, obtain the value of le16_to_cpu(hw_sgl->entry_sum_in_sgl) before loop execting to shorten the loop execution time. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit a9864bae1806499ebf3757a9e71dddde5b9c48c6 Author: Chenghai Huang Date: Fri Nov 24 13:49:24 2023 +0800 crypto: hisilicon/zip - add zip comp high perf mode configuration To meet specific application scenarios, the function of switching between the high performance mode and the high compression mode is added. Use the perf_mode=0/1 configuration to set the compression high perf mode, 0(default, high compression mode), 1(high performance mode). These two modes only apply to the compression direction and are compatible with software algorithm in both directions. Signed-off-by: Chenghai Huang Signed-off-by: Herbert Xu commit aaa03fdb56c781db4a4831dd5d6ec8817918c726 Author: Gustavo A. R. Silva Date: Tue Nov 21 12:52:44 2023 -0600 crypto: p10-aes-gcm - Avoid -Wstringop-overflow warnings The compiler doesn't know that `32` is an offset into the Hash table: 56 struct Hash_ctx { 57 u8 H[16]; /* subkey */ 58 u8 Htable[256]; /* Xi, Hash table(offset 32) */ 59 }; So, it legitimately complains about a potential out-of-bounds issue if `256 bytes` are accessed in `htable` (this implies going `32 bytes` beyond the boundaries of `Htable`): arch/powerpc/crypto/aes-gcm-p10-glue.c: In function 'gcmp10_init': arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: error: 'gcm_init_htable' accessing 256 bytes in a region of size 224 [-Werror=stringop-overflow=] 120 | gcm_init_htable(hash->Htable+32, hash->H); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 1 of type 'unsigned char[256]' arch/powerpc/crypto/aes-gcm-p10-glue.c:120:9: note: referencing argument 2 of type 'unsigned char[16]' arch/powerpc/crypto/aes-gcm-p10-glue.c:40:17: note: in a call to function 'gcm_init_htable' 40 | asmlinkage void gcm_init_htable(unsigned char htable[256], unsigned char Xi[16]); | ^~~~~~~~~~~~~~~ Address this by avoiding specifying the size of `htable` in the function prototype; and just for consistency, do the same for parameter `Xi`. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20231121131903.68a37932@canb.auug.org.au/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Herbert Xu commit d71fdd0f3c278c7f132c3a522645ebf9157edd6d Author: Damian Muszynski Date: Tue Nov 21 18:02:23 2023 +0100 crypto: qat - add sysfs_added flag for rate limiting The qat_rl sysfs attribute group is registered within the adf_dev_start() function, alongside other driver components. If any of the functions preceding the group registration fails, the adf_dev_start() function returns, and the caller, to undo the operation, invokes adf_dev_stop() followed by adf_dev_shutdown(). However, the current flow lacks information about whether the registration of the qat_rl attribute group was successful or not. In cases where this condition is encountered, an error similar to the following might be reported: 4xxx 0000:6b:00.0: Starting device qat_dev0 4xxx 0000:6b:00.0: qat_dev0 started 9 acceleration engines 4xxx 0000:6b:00.0: Failed to send init message 4xxx 0000:6b:00.0: Failed to start device qat_dev0 sysfs group 'qat_rl' not found for kobject '0000:6b:00.0' ... sysfs_remove_groups+0x2d/0x50 adf_sysfs_rl_rm+0x44/0x70 [intel_qat] adf_rl_stop+0x2d/0xb0 [intel_qat] adf_dev_stop+0x33/0x1d0 [intel_qat] adf_dev_down+0xf1/0x150 [intel_qat] ... 4xxx 0000:6b:00.0: qat_dev0 stopped 9 acceleration engines 4xxx 0000:6b:00.0: Resetting device qat_dev0 To prevent attempting to remove attributes from a group that has not been added yet, a flag named 'sysfs_added' is introduced. This flag is set to true upon the successful registration of the attribute group. Fixes: d9fb8408376e ("crypto: qat - add rate limiting feature to qat_4xxx") Signed-off-by: Damian Muszynski Reviewed-by: Giovanni Cabiddu Reviewed-by: Ahsan Atta Signed-off-by: Herbert Xu commit 65089000ba8c2ae713ccac6603319143f3e1c08b Author: Damian Muszynski Date: Tue Nov 21 17:59:45 2023 +0100 crypto: qat - add sysfs_added flag for ras The qat_ras sysfs attribute group is registered within the adf_dev_start() function, alongside other driver components. If any of the functions preceding the group registration fails, the adf_dev_start() function returns, and the caller, to undo the operation, invokes adf_dev_stop() followed by adf_dev_shutdown(). However, the current flow lacks information about whether the registration of the qat_ras attribute group was successful or not. In cases where this condition is encountered, an error similar to the following might be reported: 4xxx 0000:6b:00.0: Starting device qat_dev0 4xxx 0000:6b:00.0: qat_dev0 started 9 acceleration engines 4xxx 0000:6b:00.0: Failed to send init message 4xxx 0000:6b:00.0: Failed to start device qat_dev0 sysfs group 'qat_ras' not found for kobject '0000:6b:00.0' ... sysfs_remove_groups+0x29/0x50 adf_sysfs_stop_ras+0x4b/0x80 [intel_qat] adf_dev_stop+0x43/0x1d0 [intel_qat] adf_dev_down+0x4b/0x150 [intel_qat] ... 4xxx 0000:6b:00.0: qat_dev0 stopped 9 acceleration engines 4xxx 0000:6b:00.0: Resetting device qat_dev0 To prevent attempting to remove attributes from a group that has not been added yet, a flag named 'sysfs_added' is introduced. This flag is set to true upon the successful registration of the attribute group. Fixes: 532d7f6bc458 ("crypto: qat - add error counters") Signed-off-by: Damian Muszynski Reviewed-by: Giovanni Cabiddu Reviewed-by: Ahsan Atta Signed-off-by: Herbert Xu commit 2d37b3649c412b3bcecfea932cb677f7a5775b15 Author: Jia Jie Ho Date: Mon Nov 20 23:11:21 2023 +0800 hwrng: starfive - Fix dev_err_probe return error Current dev_err_probe will return 0 instead of proper error code if driver failed to get irq number. Fix the return err code. Signed-off-by: Jia Jie Ho Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202311160649.3GhKCfhd-lkp@intel.com/ Signed-off-by: Herbert Xu commit fed93fb62e05c38152b0fc1dc9609639e63eed76 Author: Gonglei (Arei) Date: Mon Nov 20 11:49:45 2023 +0000 crypto: virtio - Handle dataq logic with tasklet Doing ipsec produces a spinlock recursion warning. This is due to crypto_finalize_request() being called in the upper half. Move virtual data queue processing of virtio-crypto driver to tasklet. Fixes: dbaf0624ffa57 ("crypto: add virtio-crypto driver") Reported-by: Halil Pasic Signed-off-by: wangyangxin Signed-off-by: Gonglei Signed-off-by: Herbert Xu commit 8a0d929b53c383ba678ed65742e4a8982f71d5c0 Author: Jia Jie Ho Date: Mon Nov 20 11:12:42 2023 +0800 crypto: starfive - Pad adata with zeroes Aad requires padding with zeroes up to 15 bytes in some cases. This patch increases the allocated buffer size for aad and prevents the driver accessing uninitialized memory region. v1->v2: Specify reason for alloc size change in descriptions. Signed-off-by: Jia Jie Ho Signed-off-by: Herbert Xu commit 30ad1938326bf9303ca38090339d948975a626f5 Author: Amir Goldstein Date: Thu Nov 30 18:56:19 2023 +0200 fanotify: allow "weak" fsid when watching a single filesystem So far, fanotify returns -ENODEV or -EXDEV when trying to set a mark on a filesystem with a "weak" fsid, namely, zero fsid (e.g. fuse), or non-uniform fsid (e.g. btrfs non-root subvol). When group is watching inodes all from the same filesystem (or subvol), allow adding inode marks with "weak" fsid, because there is no ambiguity regarding which filesystem reports the event. The first mark added to a group determines if this group is single or multi filesystem, depending on the fsid at the path of the added mark. If the first mark added has a "strong" fsid, marks with "weak" fsid cannot be added and vice versa. If the first mark added has a "weak" fsid, following marks must have the same "weak" fsid and the same sb as the first mark. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Message-Id: <20231130165619.3386452-3-amir73il@gmail.com> commit 7232522e6cafdf466ed7649c14546fd07ccc1978 Author: Amir Goldstein Date: Thu Nov 30 18:56:18 2023 +0200 fanotify: store fsid in mark instead of in connector Some filesystems like fuse and nfs have zero or non-unique fsid. We would like to avoid reporting ambiguous fsid in events, so we need to avoid marking objects with same fsid and different sb. To make this easier to enforce, store the fsid in the marks of the group instead of in the shared conenctor. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara Message-Id: <20231130165619.3386452-2-amir73il@gmail.com> commit 9a9429b9ce975bcc97b45824bdd153bee5bad46c Author: Linus Walleij Date: Wed Nov 29 23:37:41 2023 +0100 gpio: ixp4xx: Handle clock output on pin 14 and 15 This makes it possible to provide basic clock output on pins 14 and 15. The clocks are typically used by random electronics, not modeled in the device tree, so they just need to be provided on request. In order to not disturb old systems that require that the hardware defaults are kept in the clock setting bits, we only manipulate these if either device tree property is present. Once we know a device needs one of the clocks we can set it in the device tree. Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit c46172c905f8b64ba490a8a30bf678be82c56eb6 Author: Siddharth Vadapalli Date: Wed Nov 15 14:29:13 2023 +0530 arm64: dts: ti: k3-am68-sk-base-board: Add alias for MCU CPSW2G Add alias for the MCU CPSW2G port to enable Linux to fetch MAC Address for the port directly from U-Boot. Signed-off-by: Siddharth Vadapalli Reviewed-by: Ravi Gunasekaran Link: https://lore.kernel.org/r/20231115085913.3585740-1-s-vadapalli@ti.com Signed-off-by: Nishanth Menon commit 9f82f1655fdbaf598a0106f7268ff99a606be434 Author: Jani Nikula Date: Wed Nov 29 19:33:17 2023 +0200 drm/i915: add bool type checks in PIPE_CONF_CHECK_* Avoid bool/int mismatches in state checker macros. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231129173317.1192269-2-jani.nikula@intel.com commit 00cb022753e29a1c5993fa7d291378750377bd70 Author: Jani Nikula Date: Wed Nov 29 19:33:16 2023 +0200 drm/i915: use PIPE_CONF_CHECK_BOOL() for bool members Don't treat bools as integers. v2: Rebase Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231129173317.1192269-1-jani.nikula@intel.com commit 73b4e471cd573e7597cfbd59b882a6cf6408791a Author: Jan Kiszka Date: Sat Nov 4 09:52:19 2023 +0100 arm64: dts: ti: iot2050: Add icssg-prueth nodes for PG2 devices Add the required nodes to enable ICSSG SR2.0 based prueth networking. As the driver still needs to be extended for SR1.0 support, keep related nodes disabled on PG1 devices. Signed-off-by: Jan Kiszka Link: https://lore.kernel.org/r/565d31a5fd29c4dd0cf28e347049a1247a6e446c.1699087938.git.jan.kiszka@siemens.com Signed-off-by: Nishanth Menon commit 6c183a881100144e990f23fbd0f3262e93e8191d Author: Su Bao Cheng Date: Sat Nov 4 09:52:18 2023 +0100 arm64: dts: ti: iot2050: Refactor the m.2 and minipcie power pin Make the m.2 power control pin also available on miniPCIE variants. This can fix some miniPCIE card hang issue, by forcing a power on reset during boot. Signed-off-by: Baocheng Su Signed-off-by: Jan Kiszka Link: https://lore.kernel.org/r/8b2f8c1698421b8d0694eb337ad7ea2320d76aa6.1699087938.git.jan.kiszka@siemens.com Signed-off-by: Nishanth Menon commit e6a53facc8ade138089a64adb4980a1622e7f75f Author: Benedikt Niedermayr Date: Sat Nov 4 09:52:17 2023 +0100 arm64: dts: ti: iot2050: Definitions for runtime pinmuxing Add multiple device tree nodes in order to support runtime pinmuxing via debugfs. All nodes are added to the pinctrl device node, since they are now belonging to multiple interfaces now. Note: Pinconf is also handled by debugfs-pinmux. This is possible since pinconf and pinmux accessing the same 32-Bit register and setting the function mask to 32-Bit allows writes to the whole register. Signed-off-by: Benedikt Niedermayr [Jan: fix node name style] Signed-off-by: Jan Kiszka Link: https://lore.kernel.org/r/3f90f3e521758622aa9b10f030cf0de1e68e77a4.1699087938.git.jan.kiszka@siemens.com Signed-off-by: Nishanth Menon commit 95fd0767ef961d906f0722b5848276e566a46a4c Author: Jan Kiszka Date: Sat Nov 4 09:52:16 2023 +0100 arm64: dts: ti: iot2050: Drop unused ecap0 PWM In fact, this was never used by the final device, only dates back to first prototypes. Signed-off-by: Jan Kiszka Link: https://lore.kernel.org/r/6131d44e0505ca3efbb9039e5f2b637a3e139312.1699087938.git.jan.kiszka@siemens.com Signed-off-by: Nishanth Menon commit ad8edf4ff37ab157f6547da173aedc9f4e5c4015 Author: Jan Kiszka Date: Sat Nov 4 09:52:15 2023 +0100 arm64: dts: ti: iot2050: Re-add aliases Lost while dropping them from the common dtsi. Fixes: ffc449e016e2 ("arm64: dts: ti: k3-am65: Drop aliases") Signed-off-by: Jan Kiszka Link: https://lore.kernel.org/r/1edbc1b56ed4ff2256d7afb7db3cab4b3a423692.1699087938.git.jan.kiszka@siemens.com Signed-off-by: Nishanth Menon commit 5582b1c623a6d62d3aff62c070173c9f1eb8fabd Author: Vignesh Raghavendra Date: Fri Nov 10 18:55:08 2023 +0530 arm64: dts: ti: k3-am62x-sk-common: Mark mcu gpio and mcu_gpio_intr as reserved These are typically under MCU Firmware usage. Hence mark them reserved. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20231110132508.3137454-3-vigneshr@ti.com Signed-off-by: Nishanth Menon commit 1b3014a65adb491ec5a777c988f0dd85094d78bd Author: Vignesh Raghavendra Date: Fri Nov 10 18:55:07 2023 +0530 arm64: dts: ti: k3-am62p5-sk: Mark mcu gpio and mcu_gpio_intr as reserved These are typically under MCU Firmware usage. Hence mark them reserved. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20231110132508.3137454-2-vigneshr@ti.com Signed-off-by: Nishanth Menon commit 26abae3d840b8b83413c6222725db1104fe4811d Author: Vignesh Raghavendra Date: Fri Nov 10 18:55:06 2023 +0530 arm64: dts: ti: k3-am642-evm/sk: Mark mcu_gpio_intr as reserved Similar to MCU GPIO, mark the MCU GPIO router also as reserved for MCU domain firmware usage. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20231110132508.3137454-1-vigneshr@ti.com Signed-off-by: Nishanth Menon commit 2897596e3793ce4d58654c56dcc531e853c3ca5a Author: Andrew Davis Date: Fri Nov 17 10:20:59 2023 -0600 arm64: dts: ti: k3-am64-main: Fix typo in epwm_tbclk node name The node name has @4140 but the reg is at 4130, fix this here. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231117162059.88633-1-afd@ti.com Signed-off-by: Nishanth Menon commit b57160859263c083c49482b0d083a586b1517f78 Author: Tomi Valkeinen Date: Mon Nov 6 11:57:48 2023 +0200 arm64: dts: ti: k3-am65-main: Fix DSS irq trigger type DSS irq trigger type is set to IRQ_TYPE_EDGE_RISING in the DT file, but the TRM says it is level triggered. For some reason triggering on rising edge results in double the amount of expected interrupts, e.g. for normal page flipping test the number of interrupts per second is 2 * fps. It is as if the IRQ triggers on both edges. There are no other side effects to this issue than slightly increased CPU & power consumption due to the extra interrupt. Switching to IRQ_TYPE_LEVEL_HIGH is correct and fixes the issue, so let's do that. Fixes: fc539b90eda2 ("arm64: dts: ti: am654: Add DSS node") Signed-off-by: Tomi Valkeinen Reviewed-by: Aradhya Bhatia Link: https://lore.kernel.org/r/20231106-am65-dss-clk-edge-v1-1-4a959fec0e1e@ideasonboard.com Signed-off-by: Nishanth Menon commit 7dc4af358cc382c5d20bd5b726e53ef0f526eb6d Author: Nitin Yadav Date: Fri Oct 27 12:29:30 2023 +0530 arm64: dts: ti: k3-am62a-main: Fix GPIO pin count in DT nodes Fix number of gpio pins in main_gpio0 & main_gpio1 DT nodes according to AM62A7 datasheet[0]. [0] https://www.ti.com/lit/gpn/am62a3 Section: 6.3.10 GPIO (Page No. 52-55) Fixes: 5fc6b1b62639 ("arm64: dts: ti: Introduce AM62A7 family of SoCs") Signed-off-by: Nitin Yadav Link: https://lore.kernel.org/r/20231027065930.1187405-1-n-yadav@ti.com Signed-off-by: Nishanth Menon commit 31937546bef19d1d5be1157ceb68fb5c23b47f0c Author: Krzysztof Kozlowski Date: Fri Nov 24 10:50:00 2023 +0100 arm64: dts: ti: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124095000.58487-2-krzysztof.kozlowski@linaro.org Signed-off-by: Nishanth Menon commit 86b889657a54899442b5742a8d7c85f29668a981 Merge: e8c780a570606 0fbb5a54f9416 Author: Jakub Kicinski Date: Thu Nov 30 23:22:19 2023 -0800 Merge branch 'selftests-tc-testing-more-tdc-updates' Pedro Tammela says: ==================== selftests: tc-testing: more tdc updates Follow-up on a feedback from Jakub and random cleanups from related net/sched patches ==================== Link: https://lore.kernel.org/r/20231129222424.910148-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 0fbb5a54f9416953fa8a3857425a62ea6b1efd5c Author: Pedro Tammela Date: Wed Nov 29 19:24:24 2023 -0300 selftests: tc-testing: remove filters/tests.json Remove this generic file and move the tests to their appropriate files Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231129222424.910148-5-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 7de8b2efafeb770e3f2113d506c31be7f4c9618e Author: Pedro Tammela Date: Wed Nov 29 19:24:23 2023 -0300 selftests: tc-testing: rename concurrency.json to flower.json All tests in this file pertain to flower, so name it appropriately Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231129222424.910148-4-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 74f7e7eeb1d2c1b00f1a8fa1a6666a509f274da8 Author: Pedro Tammela Date: Wed Nov 29 19:24:22 2023 -0300 selftests: tc-testing: remove spurious './' from Makefile Patchwork CI didn't like the extra './', so remove it. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231129222424.910148-3-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit f7580f00cc6e5bf57256d61c223d3ac6b4001ae7 Author: Pedro Tammela Date: Wed Nov 29 19:24:21 2023 -0300 selftests: tc-testing: remove spurious nsPlugin usage Tests using DEV2 should not be run in a dedicated net namespace, and in parallel, as this device cannot be shared. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231129222424.910148-2-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit e8c780a5706066eba210e4c514968d95ba29e052 Author: Jakub Kicinski Date: Tue Nov 28 20:14:27 2023 -0800 docs: netlink: link to family documentations from spec info To increase the chances of people finding the rendered docs add a link to specs.rst and index.rst. Add a label in the generated index.rst and while at it adjust the title a little bit. Reviewed-by: Breno Leitao Reviewed-by: Donald Hunter Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20231129041427.2763074-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 981239ee35bcc3c37055bb0023eb6685ab4073ac Merge: 000db9e9ad42e 068b2b649fc1f Author: Jakub Kicinski Date: Thu Nov 30 23:17:06 2023 -0800 Merge branch 'support-octeon-cn98-devices' Shinas Rasheed says: ==================== support OCTEON CN98 devices Implement device unload control net API required for CN98 devices and add support in driver for the same. V1: https://lore.kernel.org/all/20231127162135.2529363-1-srasheed@marvell.com/ ==================== Link: https://lore.kernel.org/r/20231129045348.2538843-1-srasheed@marvell.com Signed-off-by: Jakub Kicinski commit 068b2b649fc1fa340b53114350457d40b31aeedb Author: Shinas Rasheed Date: Tue Nov 28 20:53:48 2023 -0800 octeon_ep: support OCTEON CN98 devices Add PCI Endpoint NIC support for Octeon CN98 devices. CN98 devices are part of Octeon 9 family products with similar PCI NIC characteristics to CN93, already supported driver. Add CN98 card to the device id table, as well as support differences in the register fields and certain usage scenarios such as unload. Signed-off-by: Shinas Rasheed Link: https://lore.kernel.org/r/20231129045348.2538843-3-srasheed@marvell.com Signed-off-by: Jakub Kicinski commit b77e23f1b03e4e9a5940bb52d0480a5098a44c1d Author: Shinas Rasheed Date: Tue Nov 28 20:53:47 2023 -0800 octeon_ep: implement device unload control net API Device unload control net function should inform firmware of driver unload to let it take necessary actions to cleanup. Signed-off-by: Shinas Rasheed Link: https://lore.kernel.org/r/20231129045348.2538843-2-srasheed@marvell.com Signed-off-by: Jakub Kicinski commit 000db9e9ad42e135c7d92a56a66116542ae2b6c3 Author: Andy Shevchenko Date: Tue Nov 28 19:48:13 2023 +0200 net/sched: cbs: Use units.h instead of the copy of a definition BYTES_PER_KBIT is defined in units.h, use that definition. Signed-off-by: Andy Shevchenko Acked-by: Vinicius Costa Gomes Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20231128174813.394462-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit df16c1c51d8166958f533c0c886766f7ee9dd50f Author: Andrew Halaney Date: Mon Nov 27 15:41:10 2023 -0600 net: phy: mdio_device: Reset device only when necessary Currently the phy reset sequence is as shown below for a devicetree described mdio phy on boot: 1. Assert the phy_device's reset as part of registering 2. Deassert the phy_device's reset as part of registering 3. Deassert the phy_device's reset as part of phy_probe 4. Deassert the phy_device's reset as part of phy_hw_init The extra two deasserts include waiting the deassert delay afterwards, which is adding unnecessary delay. This applies to both possible types of resets (reset controller reference and a reset gpio) that can be used. Here's some snipped tracing output using the following command line params "trace_event=gpio:* trace_options=stacktrace" illustrating the reset handling and where its coming from: /* Assert */ systemd-udevd-283 [002] ..... 6.780434: gpio_value: 544 set 0 systemd-udevd-283 [002] ..... 6.783849: => gpiod_set_raw_value_commit => gpiod_set_value_nocheck => gpiod_set_value_cansleep => mdio_device_reset => mdiobus_register_device => phy_device_register => fwnode_mdiobus_phy_device_register => fwnode_mdiobus_register_phy => __of_mdiobus_register => stmmac_mdio_register => stmmac_dvr_probe => stmmac_pltfr_probe => devm_stmmac_pltfr_probe => qcom_ethqos_probe => platform_probe /* Deassert */ systemd-udevd-283 [002] ..... 6.802480: gpio_value: 544 set 1 systemd-udevd-283 [002] ..... 6.805886: => gpiod_set_raw_value_commit => gpiod_set_value_nocheck => gpiod_set_value_cansleep => mdio_device_reset => phy_device_register => fwnode_mdiobus_phy_device_register => fwnode_mdiobus_register_phy => __of_mdiobus_register => stmmac_mdio_register => stmmac_dvr_probe => stmmac_pltfr_probe => devm_stmmac_pltfr_probe => qcom_ethqos_probe => platform_probe /* Deassert */ systemd-udevd-283 [002] ..... 6.882601: gpio_value: 544 set 1 systemd-udevd-283 [002] ..... 6.886014: => gpiod_set_raw_value_commit => gpiod_set_value_nocheck => gpiod_set_value_cansleep => mdio_device_reset => phy_probe => really_probe => __driver_probe_device => driver_probe_device => __device_attach_driver => bus_for_each_drv => __device_attach => device_initial_probe => bus_probe_device => device_add => phy_device_register => fwnode_mdiobus_phy_device_register => fwnode_mdiobus_register_phy => __of_mdiobus_register => stmmac_mdio_register => stmmac_dvr_probe => stmmac_pltfr_probe => devm_stmmac_pltfr_probe => qcom_ethqos_probe => platform_probe /* Deassert */ NetworkManager-477 [000] ..... 7.023144: gpio_value: 544 set 1 NetworkManager-477 [000] ..... 7.026596: => gpiod_set_raw_value_commit => gpiod_set_value_nocheck => gpiod_set_value_cansleep => mdio_device_reset => phy_init_hw => phy_attach_direct => phylink_fwnode_phy_connect => __stmmac_open => stmmac_open There's a lot of paths where the device is getting its reset asserted and deasserted. Let's track the state and only actually do the assert/deassert when it changes. Reported-by: Sagar Cheluvegowda Signed-off-by: Andrew Halaney Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231127-net-phy-reset-once-v2-1-448e8658779e@redhat.com Signed-off-by: Jakub Kicinski commit 6353ed6f311b9daab93df4d968d72ddf2070fe7f Author: Lukas Bulwahn Date: Wed Nov 15 11:44:34 2023 +0100 MAINTAINERS: add omap bus drivers to OMAP2+ SUPPORT While doing some code cleanup in drivers/bus/, I noticed that the files drivers/bus/omap*.[ch] have no maintainer. As far as I see from the git history, important changes to those files went through Tony Lindgren. Further, the inclusion of those drivers depend on the config ARCH_OMAP2PLUS being enabled. This suggests these drivers are part of the section OMAP2+ SUPPORT. Add the omap bus drivers to OMAP2+ SUPPORT. Signed-off-by: Lukas Bulwahn Message-ID: <20231115104434.25796-1-lukas.bulwahn@gmail.com> Signed-off-by: Tony Lindgren commit ac10d6c3c5f9b85e780ec5cfaf0608ae048c5205 Author: Andreas Kemnade Date: Mon Nov 20 22:56:35 2023 +0100 ARM: omap2plus_defconfig: enable I2C devcies of bt200 Enable all available I2C drivers needed for the Epson Moverio BT200, that are: - LED - Subdevs of the TWL6032 PMIC - IMU sensors Signed-off-by: Andreas Kemnade Message-ID: <20231120215635.4187399-1-andreas@kemnade.info> Signed-off-by: Tony Lindgren commit 10dfde4bec529aa1d78e4b3acce7882a312880b7 Author: Andreas Kemnade Date: Wed Oct 4 09:03:09 2023 +0200 ARM: dts: omap4-embt2ws: Add Bluetooth Since the required clock is now available, add bluetooth. Note: Firmware (bts file) from device vendor reroutes tx for some time during initialisation and later put it back, producing timeouts in bluetooth initialisation but ignoring that command leads to proper initialisation. Signed-off-by: Andreas Kemnade Message-ID: <20231004070309.2408745-1-andreas@kemnade.info> Reviewed-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren commit 753c8608f3e579307493a63b9242667aee35a751 Merge: 975f2d73a99f3 f690ff9122d2c Author: Jakub Kicinski Date: Thu Nov 30 16:56:09 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2023-11-30 We've added 30 non-merge commits during the last 7 day(s) which contain a total of 58 files changed, 1598 insertions(+), 154 deletions(-). The main changes are: 1) Add initial TX metadata implementation for AF_XDP with support in mlx5 and stmmac drivers. Two types of offloads are supported right now, that is, TX timestamp and TX checksum offload, from Stanislav Fomichev with stmmac implementation from Song Yoong Siang. 2) Change BPF verifier logic to validate global subprograms lazily instead of unconditionally before the main program, so they can be guarded using BPF CO-RE techniques, from Andrii Nakryiko. 3) Add BPF link_info support for uprobe multi link along with bpftool integration for the latter, from Jiri Olsa. 4) Use pkg-config in BPF selftests to determine ld flags which is in particular needed for linking statically, from Akihiko Odaki. 5) Fix a few BPF selftest failures to adapt to the upcoming LLVM18, from Yonghong Song. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (30 commits) bpf/tests: Remove duplicate JSGT tests selftests/bpf: Add TX side to xdp_hw_metadata selftests/bpf: Convert xdp_hw_metadata to XDP_USE_NEED_WAKEUP selftests/bpf: Add TX side to xdp_metadata selftests/bpf: Add csum helpers selftests/xsk: Support tx_metadata_len xsk: Add option to calculate TX checksum in SW xsk: Validate xsk_tx_metadata flags xsk: Document tx_metadata_len layout net: stmmac: Add Tx HWTS support to XDP ZC net/mlx5e: Implement AF_XDP TX timestamp and checksum offload tools: ynl: Print xsk-features from the sample xsk: Add TX timestamp and TX checksum offload support xsk: Support tx_metadata_len selftests/bpf: Use pkg-config for libelf selftests/bpf: Override PKG_CONFIG for static builds selftests/bpf: Choose pkg-config for the target bpftool: Add support to display uprobe_multi links selftests/bpf: Add link_info test for uprobe_multi link selftests/bpf: Use bpf_link__destroy in fill_link_info tests ... ==================== Conflicts: Documentation/netlink/specs/netdev.yaml: 839ff60df3ab ("net: page_pool: add nlspec for basic access to page pools") 48eb03dd2630 ("xsk: Add TX timestamp and TX checksum offload support") https://lore.kernel.org/all/20231201094705.1ee3cab8@canb.auug.org.au/ While at it also regen, tree is dirty after: 48eb03dd2630 ("xsk: Add TX timestamp and TX checksum offload support") looks like code wasn't re-rendered after "render-max" was removed. Link: https://lore.kernel.org/r/20231130145708.32573-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 975f2d73a99f35b57ffa2ad7bff8562225cdcfcb Merge: f9893fdac319b 6172a5180fcc6 Author: Jakub Kicinski Date: Thu Nov 30 16:10:40 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. No conflicts. Signed-off-by: Jakub Kicinski commit 130a83879954a9fed35cf4474d223b4fcfd479fa Author: Atul Kumar Pant Date: Mon Nov 6 23:40:05 2023 +0530 selftests: sched: Remove initialization to 0 for a static variable Fixes following checkpatch.pl issue: ERROR: do not initialise statics to 0 Signed-off-by: Atul Kumar Pant Signed-off-by: Shuah Khan commit 49360d978411eeaeffb96938edb53ee75ba471bc Author: Swarup Laxman Kotiaklapudi Date: Sat Nov 11 23:08:06 2023 +0530 selftests: capabilities: namespace create varies for root and normal user This patchset fixes TODO: "If we're already root, we could skip creating the userns." Change namespace creation for root and non-root user differently in create_and_enter_ns() function in this file: tools/testing/selftests/capabilities/test_execve.c Test result with root user: $sudo make TARGETS="capabilities" kselftest ... TAP version 13 1..1 timeout set to 45 selftests: capabilities: test_execve TAP version 13 1..12 [RUN] +++ Tests with uid == 0 +++ [NOTE] Using global UIDs for tests [RUN] Root => ep ... ok 12 Passed Totals: pass:12 fail:0 xfail:0 xpass:0 skip:0 error:0 ================================================== TAP version 13 1..9 [RUN] +++ Tests with uid != 0 +++ [NOTE] Using global UIDs for tests [RUN] Non-root => no caps ... ok 9 Passed Totals: pass:9 fail:0 xfail:0 xpass:0 skip:0 error:0 Test result without root or normal user: $make TARGETS="capabilities" kselftest ... timeout set to 45 selftests: capabilities: test_execve TAP version 13 1..12 [RUN] +++ Tests with uid == 0 +++ [NOTE] Using a user namespace for tests [RUN] Root => ep validate_cap:: Capabilities after execve were correct ok 1 Passed Check cap_ambient manipulation rules ok 2 PR_CAP_AMBIENT_RAISE failed on non-inheritable cap ok 3 PR_CAP_AMBIENT_RAISE failed on non-permitted cap ok 4 PR_CAP_AMBIENT_RAISE worked ok 5 Basic manipulation appears to work [RUN] Root +i => eip validate_cap:: Capabilities after execve were correct ok 6 Passed [RUN] UID 0 +ia => eipa validate_cap:: Capabilities after execve were correct ok 7 Passed ok 8 # SKIP SUID/SGID tests (needs privilege) Planned tests != run tests (12 != 8) Totals: pass:7 fail:0 xfail:0 xpass:0 skip:1 error:0 ================================================== TAP version 13 1..9 [RUN] +++ Tests with uid != 0 +++ [NOTE] Using a user namespace for tests [RUN] Non-root => no caps validate_cap:: Capabilities after execve were correct ok 1 Passed Check cap_ambient manipulation rules ok 2 PR_CAP_AMBIENT_RAISE failed on non-inheritable cap ok 3 PR_CAP_AMBIENT_RAISE failed on non-permitted cap ok 4 PR_CAP_AMBIENT_RAISE worked ok 5 Basic manipulation appears to work [RUN] Non-root +i => i validate_cap:: Capabilities after execve were correct ok 6 Passed [RUN] UID 1 +ia => eipa validate_cap:: Capabilities after execve were correct ok 7 Passed ok 8 # SKIP SUID/SGID tests (needs privilege) Planned tests != run tests (9 != 8) Totals: pass:7 fail:0 xfail:0 xpass:0 skip:1 error:0 Signed-off-by: Swarup Laxman Kotiaklapudi Signed-off-by: Shuah Khan commit d837813ff42ef86dac8596dd491bf6869ac7a0e8 Author: Osama Muhammad Date: Sun Aug 20 19:13:54 2023 +0500 selftests: prctl: Add prctl test for PR_GET_NAME This patch covers the testing of PR_GET_NAME by reading it's value from proc/self/task/pid/comm and matching it with the value returned by PR_GET_NAME. If the values are matched then it's successful, otherwise it fails. changes since v1: - Handled fscanf,fopen error checking. - Defined MAX_PATH_LEN. Signed-off-by: Osama Muhammad Signed-off-by: Shuah Khan commit b719a9c15d52d4f56bdea8241a5d90fd9197ce99 Author: Mario Limonciello Date: Tue Nov 28 18:35:09 2023 -0600 drm/amd/display: Fix NULL pointer dereference at hibernate During hibernate sequence the source context might not have a clk_mgr. So don't use it to look for DML2 support. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2980 Fixes: 7966f319c66d ("drm/amd/display: Introduce DML2") Reviewed-by: Harry Wentland Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 71225e1c930942cb1e042fc08c5cc0c4ef30e95e Author: Nikita Zhandarovich Date: Tue Aug 8 11:04:16 2023 -0700 drm/radeon: check return value of radeon_ring_lock() In the unlikely event of radeon_ring_lock() failing, its errno return value should be processed. This patch checks said return value and prints a debug message in case of an error. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 48c0c902e2e6 ("drm/radeon/kms: add support for CP setup on SI") Signed-off-by: Nikita Zhandarovich Signed-off-by: Alex Deucher commit b5c5baa458faa5430c445acd9a17481274d77ccf Author: Nikita Zhandarovich Date: Wed Nov 29 07:22:12 2023 -0800 drm/radeon/r100: Fix integer overflow issues in r100_cs_track_check() It may be possible, albeit unlikely, to encounter integer overflow during the multiplication of several unsigned int variables, the result being assigned to a variable 'size' of wider type. Prevent this potential behaviour by converting one of the multiples to unsigned long. Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 0242f74d29df ("drm/radeon: clean up CS functions in r100.c") Signed-off-by: Nikita Zhandarovich Signed-off-by: Alex Deucher commit 39c960bbf9d9ea862398759e75736cfb68c3446f Author: Nikita Zhandarovich Date: Wed Nov 29 07:22:30 2023 -0800 drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg() While improbable, there may be a chance of hitting integer overflow when the result of radeon_get_ib_value() gets shifted left. Avoid it by casting one of the operands to larger data type (u64). Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: 1729dd33d20b ("drm/radeon/kms: r600 CS parser fixes") Signed-off-by: Nikita Zhandarovich Signed-off-by: Alex Deucher commit f875f61b1fd626a4223a5bdf0339b5372c689e13 Author: Yang Wang Date: Thu Nov 30 18:39:03 2023 +0800 drm/amdgpu: enable mca debug mode on APU by default enable MCA debug mode on APU device by default. Signed-off-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9596ffe1cc99dd699e595ea971a2c8ccd2735e21 Author: Likun Gao Date: Wed Nov 29 10:59:53 2023 +0800 drm/amdgpu: distinguish rlc fw for different SKU For some SKU, rlc firmware should use different one compared with the normal rlc firmware. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 00f9d49bce844e8196e0c2ea298f9a41a11129d9 Author: Yang Wang Date: Thu Nov 30 12:58:14 2023 +0800 drm/amdgpu: Fix missing mca debugfs node Use amdgpu_ip_version() helper function to check ip version. The ip version contains other information, use the helper function to avoid reading wrong value. Reviewed-by: Lijo Lazar Signed-off-by: Yang Wang Signed-off-by: Alex Deucher commit 04fcc3fec5dbd316b0b1fb2b9f8a39bfbe07af50 Author: ZhenGuo Yin Date: Thu Nov 23 16:47:33 2023 +0800 drm/amdgpu: Skip access gfx11 golden registers under SRIOV [Why] Golden registers are PF-only registers on gfx11. RLCG interface will return "out-of-range" under SRIOV VF. [How] Skip access gfx11 golden registers under SRIOV. Reviewed-by: Horace Chen Signed-off-by: ZhenGuo Yin Signed-off-by: Alex Deucher commit f8846a1a3c54a53f1c30836a2b7143cfa5da223d Author: Ian Rogers Date: Mon Nov 27 14:08:17 2023 -0800 tools api fs: Avoid reading whole file for a 1 byte bool sysfs__read_bool() used the first byte from a fully read file into a string. It then looked at the first byte's value. Avoid doing this and just read the first byte. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231127220902.1315692-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit b6a15269cee255dc5fe75c249c701e3956d892cb Author: Ian Rogers Date: Mon Nov 27 14:08:16 2023 -0800 tools api fs: Switch filename__read_str to use io.h filename__read_str() has its own string reading code that allocates memory before reading into it. The memory allocated is sized at BUFSIZ that is 8kb. Most strings are short and so most of this 8kb is wasted. Refactor io__getline(), as io__getdelim(), so that the newline character can be configurable and ignored in the case of filename__read_str(). Code like build_caches_for_cpu() in perf's header.c will read many strings and hold them in a data structure, in this case multiple strings per cache level per CPU. Using io.h's io__getline() avoids the wasted memory as strings are temporarily read into a buffer on the stack before being copied to a buffer that grows 128 bytes at a time and is never sized larger than the string. For a 16 hyperthread system the memory consumption of "perf record true" is reduced by 180kb, primarily through saving memory when reading the cache information. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231127220902.1315692-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 366efbff58092fac48421fa34018bb34c326088e Author: Ian Rogers Date: Mon Nov 27 14:08:14 2023 -0800 libperf: Lazily allocate/size mmap event copy The event copy in the mmap is used to have storage to read an event. Not all users of mmaps read the events, such as perf record. The amount of buffer was also statically set to PERF_SAMPLE_MAX_SIZE rather than the amount necessary from the header's event size. Switch to a model where the event_copy is reallocated if too small to the event's size. This adds the potential for the event to move, so if a copy of the event pointer were stored it could be broken. All the current users do: while(event = perf_mmap__read_event()) { ... } and so they would be broken due to the event being overwritten if they had stored the pointer. Manual inspection and address sanitizer testing also shows the event pointer not being stored. Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Guilherme Amadio Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231127220902.1315692-3-irogers@google.com [ Replace two lines with equivalent zfree(&map->event_copy) ] Signed-off-by: Arnaldo Carvalho de Melo commit af76b2dec0984a079d8497bfa37d29a9b55932e1 Author: Arnaldo Carvalho de Melo Date: Thu Nov 30 14:11:45 2023 -0300 libapi: Add missing linux/types.h header to get the __u64 type on io.h There are functions using __u64, so we need to have the linux/types.h header otherwise we'll break when its not included before api/io.h. Fixes: e95770af4c4a280f ("tools api: Add a lightweight buffered reading api") Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZWjDPL+IzPPsuC3X@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 706785c19fe92186815bdb9ae0148c4ba7262669 Author: John Harrison Date: Mon Nov 13 17:00:16 2023 -0800 drm/i915/guc: Add a selftest for FAST_REQUEST errors There is a mechanism for reporting errors from fire and forget H2G messages. This is the only way to find out about almost any error in the GuC backend submission path. So it would be useful to know that it is working. v2: Fix some dumb over-complications and a couple of typos - review feedback from Daniele. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20231114010016.234570-3-John.C.Harrison@Intel.com commit b7d2a4da38fb558832b70c6f45929649a9d114a3 Author: John Harrison Date: Mon Nov 13 17:00:15 2023 -0800 drm/i915/guc: Fix for potential false positives in GuC hang selftest Noticed that the hangcheck selftest is submitting a non-preemptoble spinner. That means that even if the GuC does not die, the heartbeat will still kick in and trigger a reset. Which is rather defeating the purpose of the test - to verify that the heartbeat will kick in if the GuC itself has died. The test is deliberately killing the GuC, so it should never hit the case of a non-dead GuC. But it is not impossible that the kill might fail at some future point due to other driver re-work. So, make the spinner pre-emptible. That way the heartbeat can get through if the GuC is alive and context switching. Thus a reset only happens if the GuC dies. Thus, if the kill should stop working the test will now fail rather than claim to pass. Signed-off-by: John Harrison Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20231114010016.234570-2-John.C.Harrison@Intel.com commit 25cfe960a858dd345176253088a8e56538007c22 Author: Mark Brown Date: Thu Nov 23 10:45:49 2023 +0000 kselftest/vDSO: Use ksft_print_msg() rather than printf in vdso_test_abi There are a couple of raw printf() calls in vdso_test_abi which result in non KTAP conforment output such as [vDSO kselftest] VDSO_VERSION: LINUX_2.6 Convert them to use ksft_print_msg() so that they don't cause confusion for parsers. Signed-off-by: Mark Brown Signed-off-by: Shuah Khan commit e63e1354125f923f1f5a393dd63c074427382e7e Author: Mark Brown Date: Thu Nov 23 10:45:48 2023 +0000 kselftest/vDSO: Fix message formatting for clock_id logging When logging the ID of the currently tested clock vdso_test_clock() puts a spurious newline at the start of the format string resulting in output such as # clock_id: CLOCK_BOOTTIME which is a valid but empty KTAP informational message followed by a non conferment output line. Remove the initial newline to create a more KTAP friendly # clock_id: CLOCK_BOOTTIME Signed-off-by: Mark Brown Signed-off-by: Shuah Khan commit 60e76e7ac088c5146d647cc5cc3f345b54489915 Author: Mark Brown Date: Thu Nov 23 10:45:47 2023 +0000 kselftest/vDSO: Make test name reporting for vdso_abi_test tooling friendly The test results from vdso_abi_test are all formatted using a series of macros: #define VDSO_TEST_PASS_MSG() "\n%s(): PASS\n", __func__ #define VDSO_TEST_FAIL_MSG(x) "\n%s(): %s FAIL\n", __func__, x #define VDSO_TEST_SKIP_MSG(x) "\n%s(): SKIP: Could not find %s\n", __func__, x which don't play nicely with automated KTAP parsers since the actual KTAP lines are in the form ok 1 with no test name and we get an additional log line such as vdso_test_gettimeofday(): PASS with no preceeding # as KTAP requires. The lack of a test name means that many automation systems will have a hard time distinguishing between the different tests or correlating results between runs, the lack of # is less severe but could potentially cause confusion. Fix these issues by rewriting all the result reporting to include both the vDSO function name being tested and (where there is one) the name of the clock being tested in the main KTAP line. Since we have tests both with and without a specific clock we abandon the helper macros and just put the format strings used directly in the ksft_ API calls. When we fail to look up the relevant vDSO symbol we add a separate print statement explaining why the skip is being done. This gives output such as: ok 1 __vdso_gettimeofday # clock_id: CLOCK_REALTIME # The time is 1700673118.58091596 ok 2 __vdso_clock_gettime CLOCK_REALTIME which is much easier for test automation to work with. Signed-off-by: Mark Brown Signed-off-by: Shuah Khan commit da2e08d4630ab04ee5b61515fe423c582b5c3be2 Author: Kees Cook Date: Tue Oct 3 16:18:38 2023 -0700 i40e: Annotate struct i40e_qvlist_info with __counted_by Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct i40e_qvlist_info. Cc: Tony Nguyen Cc: Shiraz Saleem Cc: Jakub Kicinski Cc: Jesse Brandeburg Cc: Gurucharan G Cc: "Gustavo A. R. Silva" Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci [1] Reviewed-by: "Gustavo A. R. Silva" Link: https://lore.kernel.org/r/20231003231838.work.510-kees@kernel.org Signed-off-by: Kees Cook commit d4011f6817ae85e42874af705fec866fec7c4ecf Author: Justin Stitt Date: Tue Oct 3 21:01:58 2023 +0000 HID: uhid: replace deprecated strncpy with strscpy `strncpy` is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. A suitable replacement is `strscpy` [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Furthermore, let's make sure `hid->xyz` and `ev->u.create2.xyz` are the same size at compile time to prevent silent truncation. With these changes, it is abundantly clear what the intent and behavior of the code is -- We are getting a string to string copy with NUL-termination and no truncation. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20231003-strncpy-drivers-hid-uhid-c-v2-1-6a501402581e@google.com Signed-off-by: Kees Cook commit 9686e7f59b142095ac6ad0763312ec68fc34c51a Author: angquan yu Date: Tue Nov 28 21:36:15 2023 -0600 selftests:x86: Fix Format String Warnings in lam.c This commit addresses compiler warnings in lam.c related to the usage of non-literal format strings without format arguments in the 'run_test' function. Warnings fixed: - Resolved warnings indicating that 'ksft_test_result_skip' and 'ksft_test_result' were called with 't->msg' as a format string without accompanying format arguments. Changes made: - Modified the calls to 'ksft_test_result_skip' and 'ksft_test_result' to explicitly include a format specifier ("%s") for 't->msg'. - This ensures that the string is safely treated as a format argument, adhering to safer coding practices and resolving the compiler warnings. Signed-off-by: angquan yu Signed-off-by: Shuah Khan commit 5e551899788b0731761052f21febdfef668e511f Author: angquan yu Date: Tue Nov 28 15:48:54 2023 -0600 selftests/breakpoints: Fix format specifier in ksft_print_msg in step_after_suspend_test.c In the function 'tools/testing/selftests/breakpoints/run_test' within step_after_suspend_test.c, the ksft_print_msg function call incorrectly used '$s' as a format specifier. This commit corrects this typo to use the proper '%s' format specifier, ensuring the error message from waitpid() is correctly displayed. The issue manifested as a compilation warning (too many arguments for format [-Wformat-extra-args]), potentially obscuring actual runtime errors and complicating debugging processes. This fix enhances the clarity of error messages during test failures and ensures compliance with standard C format string conventions. Signed-off-by: angquan yu Signed-off-by: Shuah Khan commit e1c0b9ef26e5e46fd5c2df9e7f9686e786723f53 Author: angquan yu Date: Tue Nov 28 21:57:26 2023 -0600 selftests:breakpoints: Fix Format String Warning in breakpoint_test This commit resolves a compiler warning regardingthe use of non-literal format strings in breakpoint_test.c. The functions `ksft_test_result_pass` and `ksft_test_result_fail` were previously called with a variable `msg` directly, which could potentially lead to format string vulnerabilities. Changes made: - Modified the calls to `ksft_test_result_pass` and `ksft_test_result_fail` by adding a "%s" format specifier. This explicitly declares `msg` as a string argument, adhering to safer coding practices and resolving the compiler warning. This change does not affect the functional behavior of the code but ensures better code safety and compliance with recommended C programming standards. The previous warning is "breakpoint_test.c:287:17: warning: format not a string literal and no format arguments [-Wformat-security] 287 | ksft_test_result_pass(msg); | ^~~~~~~~~~~~~~~~~~~~~ breakpoint_test.c:289:17: warning: format not a string literal and no format arguments [-Wformat-security] 289 | ksft_test_result_fail(msg); | " Signed-off-by: angquan yu Signed-off-by: Shuah Khan commit 573cc0e5cf142d9992d2de3502800890fc717bc0 Author: Philipp Stanner Date: Thu Nov 2 19:15:24 2023 +0100 KVM: x86: Harden copying of userspace-array against overflow cpuid.c utilizes vmemdup_user() and array_size() to copy two userspace arrays. This, currently, does not check for an overflow. Use the new wrapper vmemdup_array_user() to copy the arrays more safely, as vmemdup_user() doesn't check for overflow. Note, KVM explicitly checks the number of entries before duplicating the array, i.e. adding the overflow check should be a glorified nop. Suggested-by: Dave Airlie Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20231102181526.43279-2-pstanner@redhat.com [sean: call out that KVM pre-checks the number of entries] Signed-off-by: Sean Christopherson commit 63912245c19d3a4179da44beefd017eb9270f207 Author: Wei Wang Date: Wed Mar 15 18:16:06 2023 +0800 KVM: move KVM_CAP_DEVICE_CTRL to the generic check KVM_CAP_DEVICE_CTRL allows userspace to check if the kvm_device framework (e.g. KVM_CREATE_DEVICE) is supported by KVM. Move KVM_CAP_DEVICE_CTRL to the generic check for the two reasons: 1) it already supports arch agnostic usages (i.e. KVM_DEV_TYPE_VFIO). For example, userspace VFIO implementation may needs to create KVM_DEV_TYPE_VFIO on x86, riscv, or arm etc. It is simpler to have it checked at the generic code than at each arch's code. 2) KVM_CREATE_DEVICE has been added to the generic code. Link: https://lore.kernel.org/all/20221215115207.14784-1-wei.w.wang@intel.com Signed-off-by: Wei Wang Reviewed-by: Sean Christopherson Acked-by: Anup Patel (riscv) Reviewed-by: Oliver Upton Acked-by: Michael Ellerman (powerpc) Link: https://lore.kernel.org/r/20230315101606.10636-1-wei.w.wang@intel.com Signed-off-by: Sean Christopherson commit fd89499a5151d197ba30f7b801f6d8f4646cf446 Author: Sean Christopherson Date: Fri Nov 3 16:05:41 2023 -0700 KVM: x86/pmu: Track emulated counter events instead of previous counter Explicitly track emulated counter events instead of using the common counter value that's shared with the hardware counter owned by perf. Bumping the common counter requires snapshotting the pre-increment value in order to detect overflow from emulation, and the snapshot approach is inherently flawed. Snapshotting the previous counter at every increment assumes that there is at most one emulated counter event per emulated instruction (or rather, between checks for KVM_REQ_PMU). That's mostly holds true today because KVM only emulates (branch) instructions retired, but the approach will fall apart if KVM ever supports event types that don't have a 1:1 relationship with instructions. And KVM already has a relevant bug, as handle_invalid_guest_state() emulates multiple instructions without checking KVM_REQ_PMU, i.e. could miss an overflow event due to clobbering pmc->prev_counter. Not checking KVM_REQ_PMU is problematic in both cases, but at least with the emulated counter approach, the resulting behavior is delayed overflow detection, as opposed to completely lost detection. Tracking the emulated count fixes another bug where the snapshot approach can signal spurious overflow due to incorporating both the emulated count and perf's count in the check, i.e. if overflow is detected by perf, then KVM's emulation will also incorrectly signal overflow. Add a comment in the related code to call out the need to process emulated events *after* pausing the perf event (big kudos to Mingwei for figuring out that particular wrinkle). Cc: Mingwei Zhang Cc: Roman Kagan Cc: Jim Mattson Cc: Dapeng Mi Cc: Like Xu Reviewed-by: Mingwei Zhang Link: https://lore.kernel.org/r/20231103230541.352265-7-seanjc@google.com Signed-off-by: Sean Christopherson commit 89acf1237b81802328beaa094b1139dbb2561883 Author: Sean Christopherson Date: Fri Nov 3 16:05:40 2023 -0700 KVM: x86/pmu: Update sample period in pmc_write_counter() Update a PMC's sample period in pmc_write_counter() to deduplicate code across all callers of pmc_write_counter(). Opportunistically move pmc_write_counter() into pmc.c now that it's doing more work. WRMSR isn't such a hot path that an extra CALL+RET pair will be problematic, and the order of function definitions needs to be changed anyways, i.e. now is a convenient time to eat the churn. Reviewed-by: Dapeng Mi Link: https://lore.kernel.org/r/20231103230541.352265-6-seanjc@google.com Signed-off-by: Sean Christopherson commit ec61b2306dfd117ba5db93dfb54808523ea2b5e0 Author: Sean Christopherson Date: Fri Nov 3 16:05:39 2023 -0700 KVM: x86/pmu: Remove manual clearing of fields in kvm_pmu_init() Remove code that unnecessarily clears event_count and need_cleanup in kvm_pmu_init(), the entire kvm_pmu is zeroed just a few lines earlier. Vendor code doesn't set event_count or need_cleanup during .init(), and if either VMX or SVM did set those fields it would be a flagrant bug. Reviewed-by: Dapeng Mi Link: https://lore.kernel.org/r/20231103230541.352265-5-seanjc@google.com Signed-off-by: Sean Christopherson commit f2f63f7ec6fd13d2d5d5c6d90ea438fbb5a36adc Author: Sean Christopherson Date: Fri Nov 3 16:05:38 2023 -0700 KVM: x86/pmu: Stop calling kvm_pmu_reset() at RESET (it's redundant) Drop kvm_vcpu_reset()'s call to kvm_pmu_reset(), the call is performed only for RESET, which is really just the same thing as vCPU creation, and kvm_arch_vcpu_create() *just* called kvm_pmu_init(), i.e. there can't possibly be any work to do. Unlike Intel, AMD's amd_pmu_refresh() does fill all_valid_pmc_idx even if guest CPUID is empty, but everything that is at all dynamic is guaranteed to be '0'/NULL, e.g. it should be impossible for KVM to have already created a perf event. Reviewed-by: Dapeng Mi Link: https://lore.kernel.org/r/20231103230541.352265-4-seanjc@google.com Signed-off-by: Sean Christopherson commit 1647b52757d59131fe30cf73fa36fac834d4367f Author: Sean Christopherson Date: Fri Nov 3 16:05:37 2023 -0700 KVM: x86/pmu: Reset the PMU, i.e. stop counters, before refreshing Stop all counters and release all perf events before refreshing the vPMU, i.e. before reconfiguring the vPMU to respond to changes in the vCPU model. Clear need_cleanup in kvm_pmu_reset() as well so that KVM doesn't prematurely stop counters, e.g. if KVM enters the guest and enables counters before the vCPU is scheduled out. Cc: stable@vger.kernel.org Reviewed-by: Dapeng Mi Link: https://lore.kernel.org/r/20231103230541.352265-3-seanjc@google.com Signed-off-by: Sean Christopherson commit cbb359d81a2695bb5e63ec9de06fcbef28518891 Author: Sean Christopherson Date: Fri Nov 3 16:05:36 2023 -0700 KVM: x86/pmu: Move PMU reset logic to common x86 code Move the common (or at least "ignored") aspects of resetting the vPMU to common x86 code, along with the stop/release helpers that are no used only by the common pmu.c. There is no need to manually handle fixed counters as all_valid_pmc_idx tracks both fixed and general purpose counters, and resetting the vPMU is far from a hot path, i.e. the extra bit of overhead to the PMC from the index is a non-issue. Zero fixed_ctr_ctrl in common code even though it's Intel specific. Ensuring it's zero doesn't harm AMD/SVM in any way, and stopping the fixed counters via all_valid_pmc_idx, but not clearing the associated control bits, would be odd/confusing. Make the .reset() hook optional as SVM no longer needs vendor specific handling. Cc: stable@vger.kernel.org Reviewed-by: Dapeng Mi Link: https://lore.kernel.org/r/20231103230541.352265-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 15223c4f973a6120665ece9ce1ad17aec0be0e6c Author: Uros Bizjak Date: Tue Oct 31 08:52:40 2023 +0100 KVM: SVM,VMX: Use %rip-relative addressing to access kvm_rebooting Instruction with %rip-relative address operand is one byte shorter than its absolute address counterpart and is also compatible with position independent executable (-fpie) build. No functional changes intended. Cc: Sean Christopherson Cc: Paolo Bonzini Signed-off-by: Uros Bizjak Link: https://lore.kernel.org/r/20231031075312.47525-1-ubizjak@gmail.com Signed-off-by: Sean Christopherson commit 72046d0a077a8f70d4d1e5bdeed324c1a310da8c Author: Sean Christopherson Date: Wed Oct 18 12:20:21 2023 -0700 KVM: SVM: Don't intercept IRET when injecting NMI and vNMI is enabled When vNMI is enabled, rely entirely on hardware to correctly handle NMI blocking, i.e. don't intercept IRET to detect when NMIs are no longer blocked. KVM already correctly ignores svm->nmi_masked when vNMI is enabled, so the effect of the bug is essentially an unnecessary VM-Exit. KVM intercepts IRET for two reasons: - To track NMI masking to be able to know at any point of time if NMI is masked. - To track NMI windows (to inject another NMI after the guest executes IRET, i.e. unblocks NMIs) When vNMI is enabled, both cases are handled by hardware: - NMI masking state resides in int_ctl.V_NMI_BLOCKING and can be read by KVM at will. - Hardware automatically "injects" pending virtual NMIs when virtual NMIs become unblocked. However, even though pending a virtual NMI for hardware to handle is the most common way to synthesize a guest NMI, KVM may still directly inject an NMI via when KVM is handling two "simultaneous" NMIs (see comments in process_nmi() for details on KVM's simultaneous NMI handling). Per AMD's APM, hardware sets the BLOCKING flag when software directly injects an NMI as well, i.e. KVM doesn't need to manually mark vNMIs as blocked: If Event Injection is used to inject an NMI when NMI Virtualization is enabled, VMRUN sets V_NMI_MASK in the guest state. Note, it's still possible that KVM could trigger a spurious IRET VM-Exit. When running a nested guest, KVM disables vNMI for L2 and thus will enable IRET interception (in both vmcb01 and vmcb02) while running L2 reason. If a nested VM-Exit happens before L2 executes IRET, KVM can end up running L1 with vNMI enable and IRET intercepted. This is also a benign bug, and even less likely to happen, i.e. can be safely punted to a future fix. Fixes: fa4c027a7956 ("KVM: x86: Add support for SVM's Virtual NMI") Link: https://lore.kernel.org/all/ZOdnuDZUd4mevCqe@google.como Cc: Santosh Shukla Cc: Maxim Levitsky Tested-by: Santosh Shukla Link: https://lore.kernel.org/r/20231018192021.1893261-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 770d6aa2e416fd26f0356e258c77a37574ad9b8c Author: Sean Christopherson Date: Wed Oct 18 12:36:17 2023 -0700 KVM: SVM: Explicitly require FLUSHBYASID to enable SEV support Add a sanity check that FLUSHBYASID is available if SEV is supported in hardware, as SEV (and beyond) guests are bound to a single ASID, i.e. KVM can't "flush" by assigning a new, fresh ASID to the guest. If FLUSHBYASID isn't supported for some bizarre reason, KVM would completely fail to do TLB flushes for SEV+ guests (see pre_svm_run() and pre_sev_run()). Cc: Tom Lendacky Link: https://lore.kernel.org/r/20231018193617.1895752-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 176bfc5b17fee327585583a427e2857d9dfd8f68 Author: Sean Christopherson Date: Wed Oct 18 12:41:04 2023 -0700 KVM: nSVM: Advertise support for flush-by-ASID Advertise support for FLUSHBYASID when nested SVM is enabled, as KVM can always emulate flushing TLB entries for a vmcb12 ASID, e.g. by running L2 with a new, fresh ASID in vmcb02. Some modern hypervisors, e.g. VMWare Workstation 17, require FLUSHBYASID support and will refuse to run if it's not present. Punt on proper support, as "Honor L1's request to flush an ASID on nested VMRUN" is one of the TODO items in the (incomplete) list of issues that need to be addressed in order for KVM to NOT do a full TLB flush on every nested SVM transition (see nested_svm_transition_tlb_flush()). Reported-by: Stefan Sterz Closes: https://lkml.kernel.org/r/b9915c9c-4cf6-051a-2d91-44cc6380f455%40proxmox.com Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20231018194104.1896415-3-seanjc@google.com Signed-off-by: Sean Christopherson commit a484755ab2526ebdbe042397cdd6e427eb4b1a68 Author: Sean Christopherson Date: Wed Oct 18 12:41:03 2023 -0700 Revert "nSVM: Check for reserved encodings of TLB_CONTROL in nested VMCB" Revert KVM's made-up consistency check on SVM's TLB control. The APM says that unsupported encodings are reserved, but the APM doesn't state that VMRUN checks for a supported encoding. Unless something is called out in "Canonicalization and Consistency Checks" or listed as MBZ (Must Be Zero), AMD behavior is typically to let software shoot itself in the foot. This reverts commit 174a921b6975ef959dd82ee9e8844067a62e3ec1. Fixes: 174a921b6975 ("nSVM: Check for reserved encodings of TLB_CONTROL in nested VMCB") Reported-by: Stefan Sterz Closes: https://lkml.kernel.org/r/b9915c9c-4cf6-051a-2d91-44cc6380f455%40proxmox.com Cc: stable@vger.kernel.org Reviewed-by: Maxim Levitsky Link: https://lore.kernel.org/r/20231018194104.1896415-2-seanjc@google.com Signed-off-by: Sean Christopherson commit c52ffadc65e28ab461fd055e9991e8d8106a0056 Author: Sean Christopherson Date: Wed Oct 18 12:56:38 2023 -0700 KVM: x86: Don't unnecessarily force masterclock update on vCPU hotplug Don't force a masterclock update when a vCPU synchronizes to the current TSC generation, e.g. when userspace hotplugs a pre-created vCPU into the VM. Unnecessarily updating the masterclock is undesirable as it can cause kvmclock's time to jump, which is particularly painful on systems with a stable TSC as kvmclock _should_ be fully reliable on such systems. The unexpected time jumps are due to differences in the TSC=>nanoseconds conversion algorithms between kvmclock and the host's CLOCK_MONOTONIC_RAW (the pvclock algorithm is inherently lossy). When updating the masterclock, KVM refreshes the "base", i.e. moves the elapsed time since the last update from the kvmclock/pvclock algorithm to the CLOCK_MONOTONIC_RAW algorithm. Synchronizing kvmclock with CLOCK_MONOTONIC_RAW is the lesser of evils when the TSC is unstable, but adds no real value when the TSC is stable. Prior to commit 7f187922ddf6 ("KVM: x86: update masterclock values on TSC writes"), KVM did NOT force an update when synchronizing a vCPU to the current generation. commit 7f187922ddf6b67f2999a76dcb71663097b75497 Author: Marcelo Tosatti Date: Tue Nov 4 21:30:44 2014 -0200 KVM: x86: update masterclock values on TSC writes When the guest writes to the TSC, the masterclock TSC copy must be updated as well along with the TSC_OFFSET update, otherwise a negative tsc_timestamp is calculated at kvm_guest_time_update. Once "if (!vcpus_matched && ka->use_master_clock)" is simplified to "if (ka->use_master_clock)", the corresponding "if (!ka->use_master_clock)" becomes redundant, so remove the do_request boolean and collapse everything into a single condition. Before that, KVM only re-synced the masterclock if the masterclock was enabled or disabled Note, at the time of the above commit, VMX synchronized TSC on *guest* writes to MSR_IA32_TSC: case MSR_IA32_TSC: kvm_write_tsc(vcpu, msr_info); break; which is why the changelog specifically says "guest writes", but the bug that was being fixed wasn't unique to guest write, i.e. a TSC write from the host would suffer the same problem. So even though KVM stopped synchronizing on guest writes as of commit 0c899c25d754 ("KVM: x86: do not attempt TSC synchronization on guest writes"), simply reverting commit 7f187922ddf6 is not an option. Figuring out how a negative tsc_timestamp could be computed requires a bit more sleuthing. In kvm_write_tsc() (at the time), except for KVM's "less than 1 second" hack, KVM snapshotted the vCPU's current TSC *and* the current time in nanoseconds, where kvm->arch.cur_tsc_nsec is the current host kernel time in nanoseconds: ns = get_kernel_ns(); ... if (usdiff < USEC_PER_SEC && vcpu->arch.virtual_tsc_khz == kvm->arch.last_tsc_khz) { ... } else { /* * We split periods of matched TSC writes into generations. * For each generation, we track the original measured * nanosecond time, offset, and write, so if TSCs are in * sync, we can match exact offset, and if not, we can match * exact software computation in compute_guest_tsc() * * These values are tracked in kvm->arch.cur_xxx variables. */ kvm->arch.cur_tsc_generation++; kvm->arch.cur_tsc_nsec = ns; kvm->arch.cur_tsc_write = data; kvm->arch.cur_tsc_offset = offset; matched = false; pr_debug("kvm: new tsc generation %llu, clock %llu\n", kvm->arch.cur_tsc_generation, data); } ... /* Keep track of which generation this VCPU has synchronized to */ vcpu->arch.this_tsc_generation = kvm->arch.cur_tsc_generation; vcpu->arch.this_tsc_nsec = kvm->arch.cur_tsc_nsec; vcpu->arch.this_tsc_write = kvm->arch.cur_tsc_write; Note that the above creates a new generation and sets "matched" to false! But because kvm_track_tsc_matching() looks for matched+1, i.e. doesn't require the vCPU that creates the new generation to match itself, KVM would immediately compute vcpus_matched as true for VMs with a single vCPU. As a result, KVM would skip the masterlock update, even though a new TSC generation was created: vcpus_matched = (ka->nr_vcpus_matched_tsc + 1 == atomic_read(&vcpu->kvm->online_vcpus)); if (vcpus_matched && gtod->clock.vclock_mode == VCLOCK_TSC) if (!ka->use_master_clock) do_request = 1; if (!vcpus_matched && ka->use_master_clock) do_request = 1; if (do_request) kvm_make_request(KVM_REQ_MASTERCLOCK_UPDATE, vcpu); On hardware without TSC scaling support, vcpu->tsc_catchup is set to true if the guest TSC frequency is faster than the host TSC frequency, even if the TSC is otherwise stable. And for that mode, kvm_guest_time_update(), by way of compute_guest_tsc(), uses vcpu->arch.this_tsc_nsec, a.k.a. the kernel time at the last TSC write, to compute the guest TSC relative to kernel time: static u64 compute_guest_tsc(struct kvm_vcpu *vcpu, s64 kernel_ns) { u64 tsc = pvclock_scale_delta(kernel_ns-vcpu->arch.this_tsc_nsec, vcpu->arch.virtual_tsc_mult, vcpu->arch.virtual_tsc_shift); tsc += vcpu->arch.this_tsc_write; return tsc; } Except the "kernel_ns" passed to compute_guest_tsc() isn't the current kernel time, it's the masterclock snapshot! spin_lock(&ka->pvclock_gtod_sync_lock); use_master_clock = ka->use_master_clock; if (use_master_clock) { host_tsc = ka->master_cycle_now; kernel_ns = ka->master_kernel_ns; } spin_unlock(&ka->pvclock_gtod_sync_lock); if (vcpu->tsc_catchup) { u64 tsc = compute_guest_tsc(v, kernel_ns); if (tsc > tsc_timestamp) { adjust_tsc_offset_guest(v, tsc - tsc_timestamp); tsc_timestamp = tsc; } } And so when KVM skips the masterclock update after a TSC write, i.e. after a new TSC generation is started, the "kernel_ns-vcpu->arch.this_tsc_nsec" is *guaranteed* to generate a negative value, because this_tsc_nsec was captured after ka->master_kernel_ns. Forcing a masterclock update essentially fudged around that problem, but in a heavy handed way that introduced undesirable side effects, i.e. unnecessarily forces a masterclock update when a new vCPU joins the party via hotplug. Note, KVM forces masterclock updates in other weird ways that are also likely unnecessary, e.g. when establishing a new Xen shared info page and when userspace creates a brand new vCPU. But the Xen thing is firmly a separate mess, and there are no known userspace VMMs that utilize kvmclock *and* create new vCPUs after the VM is up and running. I.e. the other issues are future problems. Reported-by: Dongli Zhang Closes: https://lore.kernel.org/all/20230926230649.67852-1-dongli.zhang@oracle.com Fixes: 7f187922ddf6 ("KVM: x86: update masterclock values on TSC writes") Cc: David Woodhouse Reviewed-by: Dongli Zhang Tested-by: Dongli Zhang Link: https://lore.kernel.org/r/20231018195638.1898375-1-seanjc@google.com Signed-off-by: Sean Christopherson commit c3f17d5f89fc72d7b170beaf393a8687ae938b19 Author: Sibi Sankar Date: Wed Nov 29 12:27:48 2023 +0530 firmware: arm_scmi: Increase the maximum opp count in the perf protocol The number of opps on certain variants of the X1E80100 SoC are greater than current maximum of 16, so increase the MAX_OPP count to 32 (next power of 2) to accommodate that. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20231129065748.19871-4-quic_sibis@quicinc.com Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 80c883db87d9ffe2d685e91ba07a087b1c246c78 Author: Jim Mattson Date: Mon Oct 23 17:16:36 2023 -0700 KVM: x86: Use a switch statement and macros in __feature_translate() Use a switch statement with macro-generated case statements to handle translating feature flags in order to reduce the probability of runtime errors due to copy+paste goofs, to make compile-time errors easier to debug, and to make the code more readable. E.g. the compiler won't directly generate an error for duplicate if statements if (x86_feature == X86_FEATURE_SGX1) return KVM_X86_FEATURE_SGX1; else if (x86_feature == X86_FEATURE_SGX2) return KVM_X86_FEATURE_SGX1; and so instead reverse_cpuid_check() will fail due to the untranslated entry pointing at a Linux-defined leaf, which provides practically no hint as to what is broken arch/x86/kvm/reverse_cpuid.h:108:2: error: call to __compiletime_assert_450 declared with 'error' attribute: BUILD_BUG_ON failed: x86_leaf == CPUID_LNX_4 BUILD_BUG_ON(x86_leaf == CPUID_LNX_4); ^ whereas duplicate case statements very explicitly point at the offending code: arch/x86/kvm/reverse_cpuid.h:125:2: error: duplicate case value '361' KVM_X86_TRANSLATE_FEATURE(SGX2); ^ arch/x86/kvm/reverse_cpuid.h:124:2: error: duplicate case value '360' KVM_X86_TRANSLATE_FEATURE(SGX1); ^ And without macros, the opposite type of copy+paste goof doesn't generate any error at compile-time, e.g. this yields no complaints: case X86_FEATURE_SGX1: return KVM_X86_FEATURE_SGX1; case X86_FEATURE_SGX2: return KVM_X86_FEATURE_SGX1; Note, __feature_translate() is forcibly inlined and the feature is known at compile-time, so the code generation between an if-elif sequence and a switch statement should be identical. Signed-off-by: Jim Mattson Link: https://lore.kernel.org/r/20231024001636.890236-2-jmattson@google.com [sean: use a macro, rewrite changelog] Signed-off-by: Sean Christopherson commit 40b2519d7566266d7eafd3c5232c73a497640bca Author: Kees Cook Date: Thu Nov 16 11:15:10 2023 -0800 samples: Replace strlcpy() with strscpy() strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Cc: Masami Hiramatsu Cc: Valentin Schneider Cc: "Steven Rostedt (Google)" Cc: Chuck Lever Cc: Geliang Tang Cc: Greg Kroah-Hartman Cc: Christophe JAILLET Cc: Thomas Gleixner Cc: Arnd Bergmann Acked-by: "Steven Rostedt (Google)" Link: https://lore.kernel.org/r/20231116191510.work.550-kees@kernel.org Signed-off-by: Kees Cook commit cb6d2fd30dddd00499333e9475f8b11bbd84f37c Author: Kees Cook Date: Tue Nov 14 09:54:18 2023 -0800 SUNRPC: Replace strlcpy() with strscpy() strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). Explicitly handle the truncation case by returning the size of the resulting string. If "nodename" was ever longer than sizeof(clnt->cl_nodename) - 1, this change will fix a bug where clnt->cl_nodelen would end up thinking there were more characters in clnt->cl_nodename than there actually were, which might have lead to kernel memory content exposures. Cc: Trond Myklebust Cc: Anna Schumaker Cc: Chuck Lever Cc: Jeff Layton Cc: Neil Brown Cc: Olga Kornievskaia Cc: Dai Ngo Cc: Tom Talpey Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-nfs@vger.kernel.org Cc: netdev@vger.kernel.org Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Co-developed-by: Azeem Shaikh Signed-off-by: Azeem Shaikh Reviewed-by: NeilBrown Link: https://lore.kernel.org/r/20231114175407.work.410-kees@kernel.org Signed-off-by: Kees Cook commit 3717194f249227a3dfd8433bd9374cc7e0cf823d Author: Tony Lindgren Date: Wed Nov 29 13:06:15 2023 +0200 Input: gpio-keys - add system suspend support for dedicated wakeirqs Some SoCs have a separate dedicated wake-up interrupt controller that can be used to wake up the system from deeper idle states. We already support configuring a separate interrupt for a gpio-keys button to be used with a gpio line. However, we are lacking support system suspend for cases where a separate interrupt needs to be used in deeper sleep modes. Because of it's nature, gpio-keys does not know about the runtime PM state of the button gpios, and may have several gpio buttons configured for each gpio-keys device instance. Implementing runtime PM support for gpio-keys does not help, and we cannot use drivers/base/power/wakeirq.c support. We need to implement custom wakeirq support for gpio-keys. For handling a dedicated wakeirq for system suspend, we enable and disable it with gpio_keys_enable_wakeup() and gpio_keys_disable_wakeup() that we already use based on device_may_wakeup(). Some systems may have a dedicated wakeirq that can also be used as the main interrupt, this is already working for gpio-keys. Let's add some wakeirq related comments while at it as the usage with a gpio line and separate interrupt line may not be obvious. Tested-by: Dhruva Gole Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20231129110618.27551-2-tony@atomide.com Signed-off-by: Dmitry Torokhov commit d2ff98b7926e0956c0b92f7d5066cd8a65e7dfef Author: Tony Lindgren Date: Wed Nov 29 13:06:14 2023 +0200 dt-bindings: input: gpio-keys: Allow optional dedicated wakeirq Allow configuring an optional dedicated wakeirq for gpio-keys that some SoCs have. Let's use the common interrupt naming "irq" and "wakeup" that we already have in use for some drivers and subsystems like i2c framework. Note that the gpio-keys interrupt property is optional. If only a gpio property is specified, the driver tries to translate the gpio into an interrupt. Reviewed-by: Rob Herring Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20231129110618.27551-1-tony@atomide.com Signed-off-by: Dmitry Torokhov commit eefe5e6682099445f77f2d97d4c525f9ac9d9b07 Author: Jim Mattson Date: Mon Oct 23 17:16:35 2023 -0700 KVM: x86: Advertise CPUID.(EAX=7,ECX=2):EDX[5:0] to userspace The low five bits {INTEL_PSFD, IPRED_CTRL, RRSBA_CTRL, DDPD_U, BHI_CTRL} advertise the availability of specific bits in IA32_SPEC_CTRL. Since KVM dynamically determines the legal IA32_SPEC_CTRL bits for the underlying hardware, the hard work has already been done. Just let userspace know that a guest can use these IA32_SPEC_CTRL bits. The sixth bit (MCDT_NO) states that the processor does not exhibit MXCSR Configuration Dependent Timing (MCDT) behavior. This is an inherent property of the physical processor that is inherited by the virtual CPU. Pass that information on to userspace. Signed-off-by: Jim Mattson Reviewed-by: Chao Gao Link: https://lore.kernel.org/r/20231024001636.890236-1-jmattson@google.com Signed-off-by: Sean Christopherson commit 75bedc1ee90bd54ae8c5ab8be72506f8c5959584 Author: Sean Christopherson Date: Wed Oct 18 08:19:06 2023 -0700 KVM: x86: Turn off KVM_WERROR by default for all configs Don't enable KVM_WERROR by default for x86-64 builds as KVM's one-off -Werror enabling is *mostly* superseded by the kernel-wide WERROR, and enabling KVM_WERROR by default can cause problems for developers working on other subsystems. E.g. subsystems that have a "zero W=1 regressions" rule can inadvertently build KVM with -Werror and W=1, and end up with build failures that are completely uninteresting to the developer (W=1 is prone to false positives, especially on older compilers). Keep KVM_WERROR as there are combinations where enabling WERROR isn't feasible, e.g. the default FRAME_WARN=1024 on i386 builds generates a non-zero number of warnings and thus errors, and there are far too many warnings throughout the kernel to enable WERROR with W=1 (building KVM with -Werror is desirable (with a sane compiler) as W=1 does generate useful warnings). Opportunistically drop the dependency on !COMPILE_TEST as it's completely meaningless (it was copied from i195's -Werror Kconfig), as the kernel's WERROR is explicitly *enabled* for COMPILE_TEST=y kernel's, i.e. enabling -Werror is obviosly not dependent on COMPILE_TEST=n. Reported-by: Jakub Kicinski Link: https://lore.kernel.org/all/20231006205415.3501535-1-kuba@kernel.org Link: https://lore.kernel.org/r/20231018151906.1841689-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 9f4dee32b783955f35b74609241db76f625f2ec3 Author: Ping-Ke Shih Date: Wed Nov 22 14:04:58 2023 +0800 wifi: rtw89: debug: remove wrapper of rtw89_debug() The wrapper of rtw89_debug() is unnecessary, so just remove it. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231122060458.30878-5-pkshih@realtek.com commit d371c3aa35fd2dc8d77d4be6db2e3d573f4a9704 Author: Ping-Ke Shih Date: Wed Nov 22 14:04:57 2023 +0800 wifi: rtw89: debug: add debugfs entry to disable dynamic mechanism A dynamic mechanism is usually an algorithm to adjust registers to adapt to different environment every two seconds. In field, it could get unexpected result, so we need to stop it and adjust registers manually, and then fine tune the algorithm. To stop mechanisms to assist debugging, add a debugfs entry shown as Disabled DM: 0x1 [0] DYNAMIC_EDCCA: X Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231122060458.30878-4-pkshih@realtek.com commit 0bb185257de6043857498d29fd5c7aae3acb1d45 Author: Yi-Chen Chen Date: Wed Nov 22 14:04:56 2023 +0800 wifi: rtw89: phy: dynamically adjust EDCCA threshold Add dynamic mechanism EDCCA (Energy Detection Clear Channel Assessment) in track work. Using a fixed-value threshold will make EDCCA particularly sensitive and cause failure to transmit under certain circumstances. Therefore, the threshold is dynamically adjusted to make EDCCA suitable for any situation. However, in some cases, we will adjust the EDCCA threshold to the highest level so that urgent transmissions can be performed successfully, such as scanning. Finally, in order to observe the EDCCA report in time, add the EDCCA perIC register macro and EDCCA HW report analysis. EDCCA logs can be displayed by using the EDCCA debug mask. Signed-off-by: Yi-Chen Chen Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231122060458.30878-3-pkshih@realtek.com commit 77abbabaafe5d14ed033adb6969c54d42faf67f0 Author: Ping-Ke Shih Date: Wed Nov 22 14:04:55 2023 +0800 wifi: rtw89: debug: add to check if debug mask is enabled The coming dynamic mechanism of EDCCA adjustment will add a function to dump registers to reflect status. However, if we are not debugging the mechanism, we don't print anything, so avoid reading registers by checking debug mask to reduce IO. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231122060458.30878-2-pkshih@realtek.com commit bc8263083af60e7e57c6120edbc1f75d6c909a35 Author: Su Hui Date: Mon Nov 27 09:35:13 2023 +0800 wifi: rtlwifi: rtl8821ae: phy: fix an undefined bitwise shift behavior Clang static checker warns: drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c:184:49: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'u32'. [core.UndefinedBinaryOperatorResult] If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined.[1][2] For example, when using different gcc's compilation optimization options (-O0 or -O2), the result of '(u32)data << 32' is different. One is 0, the other is old value of data. Let _rtl8821ae_phy_calculate_bit_shift()'s return value less than 32 to fix this problem. Warn if bitmask is zero. [1] https://stackoverflow.com/questions/11270492/what-does-the-c-standard-say-about-bitshifting-more-bits-than-the-width-of-type [2] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf Fixes: 21e4b0726dc6 ("rtlwifi: rtl8821ae: Move driver from staging to regular tree") Signed-off-by: Su Hui Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231127013511.26694-2-suhui@nfschina.com commit cda37445718d917c22fe1f2cf7ab1f501e6f84b2 Author: Su Hui Date: Mon Nov 27 09:35:11 2023 +0800 wifi: rtlwifi: rtl8821ae: phy: remove some useless code Clang static checker warns: Value stored to 'v1' is never read [deadcode.DeadStores] Value stored to 'channel' is never read [deadcode.DeadStores] Remove them to save some place. Signed-off-by: Su Hui Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231127013511.26694-1-suhui@nfschina.com commit ac586b8401c911df24019532a28b69a4257e53d5 Author: Ilpo Järvinen Date: Fri Nov 24 11:09:18 2023 +0200 bcma: Use PCI_HEADER_TYPE_MASK instead of literal Replace literal 0x7f with PCI_HEADER_TYPE_MASK. Signed-off-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231124090919.23687-6-ilpo.jarvinen@linux.intel.com commit 18814f723f92826d83fef40e19fc8cb130367868 Author: Lukas Bulwahn Date: Wed Nov 22 09:30:47 2023 +0100 wifi: libertas: fix config name in dependency for SDIO support Commit 4b478bf6bdd8 ("wifi: libertas: drop 16-bit PCMCIA support") reworks the dependencies for config LIBERTAS, and adds alternative dependencies for USB, SDIO and SPI. The config option SDIO however does not exist in the kernel tree. It was probably intended to refer to the config option MMC, which represents "MMC/SD/SDIO card support" and is used as dependency by various other drivers that use SDIO. Fix the dependency to the config option MMC for declaring the requirement on provision of SDIO support. Fixes: 4b478bf6bdd8 ("wifi: libertas: drop 16-bit PCMCIA support") Signed-off-by: Lukas Bulwahn Reviewed-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231122083047.12774-1-lukas.bulwahn@gmail.com commit 1da42060128469e0ff13ff2ff69d8db916b16c6a Author: Ping-Ke Shih Date: Wed Nov 22 14:14:29 2023 +0800 wifi: rtw88: debug: remove wrapper of rtw_dbg() Remove unnecessary wrapper of rtw_dbg(), and just call it directly. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231122061429.34487-1-pkshih@realtek.com commit afb154426bf13a9d5cdc71f5d89d7416a6c2da10 Author: Uwe Kleine-König Date: Fri Nov 17 10:31:02 2023 +0100 wifi: brcmfmac: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117093056.873834-13-u.kleine-koenig@pengutronix.de commit cda398fcb488a89628033df90680c8d5f2fc6d0c Author: Yang Li Date: Wed Nov 15 09:00:17 2023 +0800 wifi: rt2x00: Simplify bool conversion ./drivers/net/wireless/ralink/rt2x00/rt2800lib.c:1331:47-52: WARNING: conversion to bool not needed here ./drivers/net/wireless/ralink/rt2x00/rt2800lib.c:1332:47-52: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7531 Signed-off-by: Yang Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231115010017.112081-1-yang.lee@linux.alibaba.com commit f9893fdac319bb2817e5e7818870264d7fb2eb02 Author: Eric Dumazet Date: Thu Nov 30 09:22:59 2023 +0000 net: page_pool: fix general protection fault in page_pool_unlist syzbot was able to trigger a crash [1] in page_pool_unlist() page_pool_list() only inserts a page pool into a netdev page pool list if a netdev was set in params. Even if the kzalloc() call in page_pool_create happens to initialize pool->user.list, I chose to be more explicit in page_pool_list() adding one INIT_HLIST_NODE(). We could test in page_pool_unlist() if netdev was set, but since netdev can be changed to lo, it seems more robust to check if pool->user.list is hashed before calling hlist_del(). [1] Illegal XDP return value 4294946546 on prog (id 2) dev N/A, expect packet loss! general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 PID: 5064 Comm: syz-executor391 Not tainted 6.7.0-rc2-syzkaller-00533-ga379972973a8 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 RIP: 0010:__hlist_del include/linux/list.h:988 [inline] RIP: 0010:hlist_del include/linux/list.h:1002 [inline] RIP: 0010:page_pool_unlist+0xd1/0x170 net/core/page_pool_user.c:342 Code: df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 90 00 00 00 4c 8b a3 f0 06 00 00 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 <80> 3c 02 00 75 68 48 85 ed 49 89 2c 24 74 24 e8 1b ca 07 f9 48 8d RSP: 0018:ffffc900039ff768 EFLAGS: 00010246 RAX: dffffc0000000000 RBX: ffff88814ae02000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff88814ae026f0 RBP: 0000000000000000 R08: 0000000000000000 R09: fffffbfff1d57fdc R10: ffffffff8eabfee3 R11: ffffffff8aa0008b R12: 0000000000000000 R13: ffff88814ae02000 R14: dffffc0000000000 R15: 0000000000000001 FS: 000055555717a380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000002555398 CR3: 0000000025044000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __page_pool_destroy net/core/page_pool.c:851 [inline] page_pool_release+0x507/0x6b0 net/core/page_pool.c:891 page_pool_destroy+0x1ac/0x4c0 net/core/page_pool.c:956 xdp_test_run_teardown net/bpf/test_run.c:216 [inline] bpf_test_run_xdp_live+0x1578/0x1af0 net/bpf/test_run.c:388 bpf_prog_test_run_xdp+0x827/0x1530 net/bpf/test_run.c:1254 bpf_prog_test_run kernel/bpf/syscall.c:4041 [inline] __sys_bpf+0x11bf/0x4920 kernel/bpf/syscall.c:5402 __do_sys_bpf kernel/bpf/syscall.c:5488 [inline] __se_sys_bpf kernel/bpf/syscall.c:5486 [inline] __x64_sys_bpf+0x78/0xc0 kernel/bpf/syscall.c:5486 Fixes: 083772c9f972 ("net: page_pool: record pools per netdev") Reported-and-tested-by: syzbot+f9f8efb58a4db2ca98d0@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Tested-by: Andrew Lunn Link: https://lore.kernel.org/r/20231130092259.3797753-1-edumazet@google.com Signed-off-by: Jakub Kicinski commit 62e31362033e900a231a119a02ddcef553f11b78 Author: Uwe Kleine-König Date: Fri Nov 17 10:30:58 2023 +0100 wifi: ath11k: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117093056.873834-9-u.kleine-koenig@pengutronix.de commit 5082b3e3027eae393a4e86874bffb4ce3f83c26e Author: Baochen Qiang Date: Fri Nov 17 08:39:19 2023 +0800 wifi: ath11k: fix race due to setting ATH11K_FLAG_EXT_IRQ_ENABLED too early We are seeing below error randomly in the case where only one MSI vector is configured: kernel: ath11k_pci 0000:03:00.0: wmi command 16387 timeout The reason is, currently, in ath11k_pcic_ext_irq_enable(), ATH11K_FLAG_EXT_IRQ_ENABLED is set before NAPI is enabled. This results in a race condition: after ATH11K_FLAG_EXT_IRQ_ENABLED is set but before NAPI enabled, CE interrupt breaks in. Since IRQ is shared by CE and data path, ath11k_pcic_ext_interrupt_handler() is also called where we call disable_irq_nosync() to disable IRQ. Then napi_schedule() is called but it does nothing because NAPI is not enabled at that time, meaning ath11k_pcic_ext_grp_napi_poll() will never run, so we have no chance to call enable_irq() to enable IRQ back. Finally we get above error. Fix it by setting ATH11K_FLAG_EXT_IRQ_ENABLED after all NAPI and IRQ work are done. With the fix, we are sure that by the time ATH11K_FLAG_EXT_IRQ_ENABLED is set, NAPI is enabled. Note that the fix above also introduce some side effects: if ath11k_pcic_ext_interrupt_handler() breaks in after NAPI enabled but before ATH11K_FLAG_EXT_IRQ_ENABLED set, nothing will be done by the handler this time, the work will be postponed till the next time the IRQ fires. Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23 Signed-off-by: Baochen Qiang Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117003919.26218-1-quic_bqiang@quicinc.com commit f20eb4cb93240c4da4c7a3563b4063047bef3a7b Author: Jeff Johnson Date: Mon Nov 27 08:14:49 2023 -0800 wifi: ath11k: remove ath11k_htc_record::pauload[] The misspelled pauload member of struct ath11k_htc_record is unused, so remove it. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231127-flexarray-htc_record-v1-3-6be1f36126fd@quicinc.com commit 7b4df59fced034c88c012231361f94662d2487dc Author: Jeff Johnson Date: Mon Nov 27 08:14:48 2023 -0800 wifi: ath10k: Use DECLARE_FLEX_ARRAY() for ath10k_htc_record Transform the zero-length arrays in ath10k_htc_record into proper flexible arrays via the DECLARE_FLEX_ARRAY() macro. This helps with ongoing efforts to globally enable -Warray-bounds. Signed-off-by: Jeff Johnson Reviewed-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231127-flexarray-htc_record-v1-2-6be1f36126fd@quicinc.com commit c7876faa91ab01b314b81ea8e5a0ccdeb186f483 Author: Jeff Johnson Date: Mon Nov 27 08:14:47 2023 -0800 wifi: ath10k: remove ath10k_htc_record::pauload[] The misspelled pauload member of struct ath10k_htc_record is unused, so remove it. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231127-flexarray-htc_record-v1-1-6be1f36126fd@quicinc.com commit b1dc0ba41431147e55407140962c76f3e7a06753 Author: Jeff Johnson Date: Wed Nov 29 13:39:28 2023 +0200 wifi: ath10k: Update Qualcomm Innovation Center, Inc. copyrights Update the copyright for all ath10k files modified on behalf of Qualcomm Innovation Center, Inc. in 2021 through 2023. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231128-ath12kcopyrights-v1-3-be0b7408cbac@quicinc.com commit ea77e9398b326d65b052096840b883271f8a7a48 Author: Jeff Johnson Date: Wed Nov 29 13:39:23 2023 +0200 wifi: ath11k: Update Qualcomm Innovation Center, Inc. copyrights Update the copyright for all ath11k files modified on behalf of Qualcomm Innovation Center, Inc. in 2021 through 2023. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231128-ath12kcopyrights-v1-2-be0b7408cbac@quicinc.com commit 05205b9576615fca5da91cdae5a3f89f2ad32703 Author: Jeff Johnson Date: Tue Nov 28 07:19:25 2023 -0800 wifi: ath12k: Update Qualcomm Innovation Center, Inc. copyrights Update the copyright for all ath12k files modified on behalf of Qualcomm Innovation Center, Inc. in 2023. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231128-ath12kcopyrights-v1-1-be0b7408cbac@quicinc.com commit 3f978d9889a2531e48d97cef7f5126f4104ee69c Author: Uwe Kleine-König Date: Thu Nov 23 22:17:01 2023 +0100 remoteproc: k3-dsp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). There is no change in behaviour as .remove() already returned zero unconditionally. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123211657.518181-8-u.kleine-koenig@pengutronix.de Signed-off-by: Mathieu Poirier commit cfd0b5c4fd1d23d1c68f704dcd74c1dbdfd7c144 Author: Uwe Kleine-König Date: Thu Nov 23 22:17:00 2023 +0100 remoteproc: k3-dsp: Use symbolic error codes in error messages The error message failed to send mailbox message (-EINVAL) is (for a human) more useful than failed to send mailbox message, status = -22 Adapt all error messages to use the symbolic names instead of the numeric constants. The error paths in .probe() make use of dev_err_probe() which automatically handles EPROBE_DEFER. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123211657.518181-7-u.kleine-koenig@pengutronix.de> Signed-off-by: Mathieu Poirier commit bddae3e7ae70586b3805fdbce193760f13b4d73e Author: Uwe Kleine-König Date: Thu Nov 23 22:16:59 2023 +0100 remoteproc: k3-dsp: Suppress duplicate error message in .remove() When the remove callback returns non-zero, the driver core emits an error message about the error value being ignored. As the driver already emits an error message already, return zero. This has no effect apart from suppressing the core's message. The platform device gets unbound irrespective of the return value. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231123211657.518181-6-u.kleine-koenig@pengutronix.de Signed-off-by: Mathieu Poirier commit 207022d39d3b158ca3581e321212f799fa5e7e24 Author: Harald Freudenberger Date: Thu Nov 9 11:24:20 2023 +0100 s390/ap: handle outband SE bind state change This patch addresses some weird scenarios where an outband manipulation of the SE bind state of a queue assigned and maybe in use by an SE guest with AP pass-through support took place. So for example when the guest has bound and associated a queue and then this domain has been zeroed on the service element. Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Signed-off-by: Alexander Gordeev commit d4c53ae8e4948f7f733f24cd863da31c8e9379a7 Author: Harald Freudenberger Date: Sat Nov 4 10:04:31 2023 +0100 s390/ap: store TAPQ hwinfo in struct ap_card As of now the AP card struct held only part of the queue's hwinfo (that is the GR2 register content returned with an TAPQ invocation). This patch reworks struct ap_card to hold the whole hwinfo now. As there is a nice bit field union on top of this ap_tapq_hwinfo struct, all the ugly bit checkings can now get replaced by simple evaluations of the required bit field. Suggested-by: Ingo Franzki Signed-off-by: Harald Freudenberger Reviewed-by: Holger Dengler Signed-off-by: Alexander Gordeev commit a0d8f4eeb7c4ffaee21702bcc91a09b3988c5b7a Author: Tony Krowiak Date: Wed Nov 8 15:11:30 2023 -0500 s390/vfio-ap: fix sysfs status attribute for AP queue devices The 'status' attribute for AP queue devices bound to the vfio_ap device driver displays incorrect status when the mediated device is attached to a guest, but the queue device is not passed through. In the current implementation, the status displayed is 'in_use' which is not correct; it should be 'assigned'. This can happen if one of the queue devices associated with a given adapter is not bound to the vfio_ap device driver. For example: Queues listed in /sys/bus/ap/drivers/vfio_ap: 14.0005 14.0006 14.000d 16.0006 16.000d Queues listed in /sys/devices/vfio_ap/matrix/$UUID/matrix 14.0005 14.0006 14.000d 16.0005 16.0006 16.000d Queues listed in /sys/devices/vfio_ap/matrix/$UUID/guest_matrix 14.0005 14.0006 14.000d The reason no queues for adapter 0x16 are listed in the guest_matrix is because queue 16.0005 is not bound to the vfio_ap device driver, so no queue associated with the adapter is passed through to the guest; therefore, each queue device for adapter 0x16 should display 'assigned' instead of 'in_use', because those queues are not in use by a guest, but only assigned to the mediated device. Let's check the AP configuration for the guest to determine whether a queue device is passed through before displaying a status of 'in_use'. Signed-off-by: Tony Krowiak Acked-by: Halil Pasic Acked-by: Harald Freudenberger Link: https://lore.kernel.org/r/20231108201135.351419-1-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit c44ce579240d8025da74c6328295aa0a75a581a3 Author: Tony Krowiak Date: Thu Nov 9 11:44:22 2023 -0500 s390/vfio-ap: improve reaction to response code 07 from PQAP(AQIC) command Let's improve the vfio_ap driver's reaction to reception of response code 07 from the PQAP(AQIC) command when enabling interrupts on behalf of a guest: * Unregister the guest's ISC before the pages containing the notification indicator bytes are unpinned. * Capture the return code from the kvm_s390_gisc_unregister function and log a DBF warning if it fails. Suggested-by: Matthew Rosato Signed-off-by: Tony Krowiak Reviewed-by: Matthew Rosato Link: https://lore.kernel.org/r/20231109164427.460493-4-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit 3746d48c55aced92c8fc1cbb432600da3e47344c Author: Anthony Krowiak Date: Thu Nov 9 11:44:21 2023 -0500 s390/vfio-ap: set status response code to 06 on gisc registration failure The interception handler for the PQAP(AQIC) command calls the kvm_s390_gisc_register function to register the guest ISC with the channel subsystem. If that call fails, the status response code 08 - indicating Invalid ZONE/GISA designation - is returned to the guest. This response code is not valid because setting the ZONE/GISA values is the responsibility of the hypervisor controlling the guest and there is nothing that can be done from the guest perspective to correct that problem. The likelihood of GISC registration failure is nil and there is no status response code to indicate an invalid ISC value, so let's set the response code to 06 indicating 'Invalid address of AP-queue notification byte'. While this is not entirely accurate, it is better than setting a response code which makes no sense for the guest. Signed-off-by: Anthony Krowiak Suggested-by: Halil Pasic Reviewed-by: Halil Pasic Reviewed-by: Harald Freudenberger Link: https://lore.kernel.org/r/20231109164427.460493-3-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit 7b2d039da622daa9ba259ac6f38701d542b237c3 Author: Anthony Krowiak Date: Thu Nov 9 11:44:20 2023 -0500 s390/vfio-ap: unpin pages on gisc registration failure In the vfio_ap_irq_enable function, after the page containing the notification indicator byte (NIB) is pinned, the function attempts to register the guest ISC. If registration fails, the function sets the status response code and returns without unpinning the page containing the NIB. In order to avoid a memory leak, the NIB should be unpinned before returning from the vfio_ap_irq_enable function. Co-developed-by: Janosch Frank Signed-off-by: Janosch Frank Signed-off-by: Anthony Krowiak Reviewed-by: Matthew Rosato Fixes: 783f0a3ccd79 ("s390/vfio-ap: add s390dbf logging to the vfio_ap_irq_enable function") Cc: Link: https://lore.kernel.org/r/20231109164427.460493-2-akrowiak@linux.ibm.com Signed-off-by: Alexander Gordeev commit 59730241647287c0ab64bf0bc7449308392b7ea4 Author: Rafael J. Wysocki Date: Wed Nov 29 14:36:07 2023 +0100 thermal: trip: Drop a redundant check from thermal_zone_set_trip() After recent changes in the thermal framework, a trip points array is required for registering a thermal zone that is not tripless, so the tz->trips pointer in thermal_zone_set_trip() is never NULL and the check involving it is redundant. Drop that check. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukasz Luba Acked-by: Daniel Lezcano commit fdd041028f2294228e10610b4fca6a1a83ac683d Author: Alexander Antonov Date: Mon Nov 27 10:52:46 2023 -0800 perf/x86/intel/uncore: Factor out topology_gidnid_map() The same code is used for retrieving package ID procedure from GIDNIDMAP register. Factor out topology_gidnid_map() to avoid code duplication. Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Link: https://lore.kernel.org/r/20231127185246.2371939-3-alexander.antonov@linux.intel.com commit 1692cf434ba13ee212495b5af795b6a07e986ce4 Author: Alexander Antonov Date: Mon Nov 27 10:52:45 2023 -0800 perf/x86/intel/uncore: Fix NULL pointer dereference issue in upi_fill_topology() Get logical socket id instead of physical id in discover_upi_topology() to avoid out-of-bound access on 'upi = &type->topology[nid][idx];' line that leads to NULL pointer dereference in upi_fill_topology() Fixes: f680b6e6062e ("perf/x86/intel/uncore: Enable UPI topology discovery for Icelake Server") Reported-by: Kyle Meyer Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Tested-by: Kyle Meyer Link: https://lore.kernel.org/r/20231127185246.2371939-2-alexander.antonov@linux.intel.com commit 7a36b901a6eb0e9945341db71ed3c45c7721cfa9 Author: Rafael J. Wysocki Date: Mon Nov 27 20:57:43 2023 +0100 ACPI: OSL: Use a threaded interrupt handler for SCI In the current arrangement, all of the acpi_ev_sci_xrupt_handler() code is run as an interrupt handler for the SCI, in interrupt context. Among other things, this causes it to run with local interrupts off which can be problematic if many GPEs are enabled and they are located in the I/O address space, for example (because in that case local interrupts will be off for the duration of all of the GPE hardware accesses carried out while handling an SCI combined and that may be quite a bit of time in extreme scenarios). However, there is no particular reason why the code in question really needs to run in interrupt context and in particular, it has no specific reason to run with local interrupts off. The only real requirement is to prevent multiple instences of it from running in parallel with each other, but that can be achieved regardless. For this reason, use request_threaded_irq() instead of request_irq() for the ACPI SCI and pass IRQF_ONESHOT to it in flags to indicate that the interrupt needs to be masked while its handling thread is running so as to prevent it from re-triggering while it is being handled (and in particular until the final handled/not handled outcome is determined). While at it, drop a redundant local variable from acpi_irq(). Signed-off-by: Rafael J. Wysocki Tested-by: Mario Limonciello Tested-by: Mika Westerberg commit 3d1ff9dfdc168722f570144aba0ce29d28d7f483 Author: Ramesh Errabolu Date: Wed Nov 22 10:05:56 2023 -0600 dma-buf: Correct the documentation of name and exp_name symbols Fix the documentation of struct dma_buf members name and exp_name as to how these members are to be used and accessed. Signed-off-by: Ramesh Errabolu Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20231122160556.24948-1-Ramesh.Errabolu@amd.com Signed-off-by: Christian König commit 637cb4b61b01c40058a51b5638210757a59ad3a9 Merge: b85ea95d08647 2c36b0cfb408e Author: Conor Dooley Date: Thu Nov 30 12:40:38 2023 +0000 Merge patch series "Add Huashan Pi board support" Inochi Amaoto says: Huashan Pi board is an embedded development platform based on the CV1812H chip. Add minimal device tree files for this board. Currently, it can boot to a basic shell. NOTE: this series is based on the Jisheng's Milk-V Duo patch. Link: https://en.sophgo.com/product/introduce/huashan.html Link: https://en.sophgo.com/product/introduce/cv181xH.html Link: https://lore.kernel.org/linux-riscv/20231006121449.721-1-jszhang@kernel.org/ Signed-off-by: Conor Dooley commit 2c36b0cfb408e47402792439e3ebfb862ea5b6dc Author: Inochi Amaoto Date: Thu Oct 19 07:18:54 2023 +0800 riscv: dts: sophgo: add Huashan Pi board device tree Add initial device tree files for the Huashan Pi board. Note: The boot of CV1812H chip needs a rtos firmware for coprocessor to function properly. To make the soc happy, reserved the last 2M memory for the rtos firmware. Signed-off-by: Inochi Amaoto Link: https://en.sophgo.com/product/introduce/huashan.html Link: https://en.sophgo.com/product/introduce/cv181xH.html Link: https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/cv181x/cv1812h_wevb_0007a_emmc_huashan/memmap.py#L15 Reviewed-by: Jisheng Zhang Acked-by: Chen Wang Signed-off-by: Conor Dooley commit 681ec684a741ed3ac2c6b283b56245effa7a2c9d Author: Inochi Amaoto Date: Thu Oct 19 07:18:53 2023 +0800 riscv: dts: sophgo: add initial CV1812H SoC device tree Add initial device tree for the CV1812H RISC-V SoC by SOPHGO. Signed-off-by: Inochi Amaoto Acked-by: Chen Wang Signed-off-by: Conor Dooley commit dd791b45c866b735601605b8dbceed4ab147db38 Author: Inochi Amaoto Date: Thu Oct 19 07:18:52 2023 +0800 riscv: dts: sophgo: cv18xx: Add gpio devices Add common GPIO devices for the CV180x and CV181x soc. Signed-off-by: Inochi Amaoto Reviewed-by: Jisheng Zhang Acked-by: Chen Wang Signed-off-by: Conor Dooley commit 5b5dce3951b23e265e053970828ce7a8471d268d Author: Inochi Amaoto Date: Thu Oct 19 07:18:51 2023 +0800 riscv: dts: sophgo: Separate compatible specific for CV1800B soc As CV180x and CV181x have the identical layouts, it is OK to use the cv1800b basic device tree for the whole series. For CV1800B soc specific compatible, just move them out of the common file. Signed-off-by: Inochi Amaoto Acked-by: Chen Wang Signed-off-by: Conor Dooley commit d7b92027834e92a47f254d846483968d29ce2360 Author: Inochi Amaoto Date: Thu Oct 19 07:18:50 2023 +0800 dt-bindings: riscv: Add SOPHGO Huashan Pi board compatibles Document the compatible strings for the SOPHGO Huashan Pi board which uses the SOPHGO CV1812H SoC. Signed-off-by: Inochi Amaoto Link: https://en.sophgo.com/product/introduce/huashan.html Link: https://en.sophgo.com/product/introduce/cv181xH.html Acked-by: Chen Wang Acked-by: Krzysztof Kozlowski Reviewed-by: Jisheng Zhang Signed-off-by: Conor Dooley commit 06ea2a1968a92a2a8a03c91b4989bda2b0a8a578 Author: Inochi Amaoto Date: Thu Oct 19 07:18:49 2023 +0800 dt-bindings: timer: Add SOPHGO CV1812H clint Add compatible string for the SOPHGO CV1812H clint. Signed-off-by: Inochi Amaoto Acked-by: Krzysztof Kozlowski Reviewed-by: Jisheng Zhang Signed-off-by: Conor Dooley commit 21a34e63afcc4328bd3f62289dafd796ae95550b Author: Inochi Amaoto Date: Thu Oct 19 07:18:48 2023 +0800 dt-bindings: interrupt-controller: Add SOPHGO CV1812H plic Add compatible string for SOPHGO CV1812H plic. Signed-off-by: Inochi Amaoto Acked-by: Krzysztof Kozlowski Reviewed-by: Jisheng Zhang Signed-off-by: Conor Dooley commit 7a030abc0185b30a3fd19a7431347c6f5a82c588 Author: Chia-Lin Kao (AceLan) Date: Wed Nov 29 14:43:11 2023 +0800 mtd: spi-nor: Stop reporting warning message when soft reset is not suported When the software reset command isn't supported, we now stop reporting the warning message to avoid unnecessary warnings and potential confusion. Reviewed-by: Dhruva Gole Reviewed-by: Michael Walle Reviewed-by: Mika Westerberg Acked-by: Pratyush Yadav Signed-off-by: "Chia-Lin Kao (AceLan)" Reviewed-by: Miquel Raynal Acked-by: Tudor Ambarus Link: https://lore.kernel.org/r/20231129064311.272422-2-acelan.kao@canonical.com Signed-off-by: Mark Brown commit cff49d58f57e5667c10a0db85d7461790bb85cf8 Author: Chia-Lin Kao (AceLan) Date: Wed Nov 29 14:43:10 2023 +0800 spi: Unify error codes by replacing -ENOTSUPP with -EOPNOTSUPP This commit updates the SPI subsystem, particularly affecting "SPI MEM" drivers and core parts, by replacing the -ENOTSUPP error code with -EOPNOTSUPP. The key motivations for this change are as follows: 1. The spi-nor driver currently uses EOPNOTSUPP, whereas calls to spi-mem might return ENOTSUPP. This update aims to unify the error reporting within the SPI subsystem for clarity and consistency. 2. The use of ENOTSUPP has been flagged by checkpatch as inappropriate, mainly being reserved for NFS-related errors. To align with kernel coding standards and recommendations, this change is being made. 3. By using EOPNOTSUPP, we provide more specific context to the error, indicating that a particular operation is not supported. This helps differentiate from the more generic ENOTSUPP error, allowing drivers to better handle and respond to different error scenarios. Risks and Considerations: While this change is primarily intended as a code cleanup and error code unification, there is a minor risk of breaking user-space applications that rely on specific return codes for unsupported operations. However, this risk is considered low, as such use-cases are unlikely to be common or critical. Nevertheless, developers and users should be aware of this change, especially if they have scripts or tools that specifically handle SPI error codes. This commit does not introduce any functional changes to the SPI subsystem or the affected drivers. Signed-off-by: "Chia-Lin Kao (AceLan)" Acked-by: Tudor Ambarus Reviewed-by: Mika Westerberg Acked-by: Miquel Raynal Acked-by: Michael Walle Link: https://lore.kernel.org/r/20231129064311.272422-1-acelan.kao@canonical.com Signed-off-by: Mark Brown commit 288fde659ec6992552c4467534e15247b7445530 Author: Andreas Kemnade Date: Mon Nov 27 21:04:30 2023 +0100 ARM: dts: omap: logicpd-torpedo: do not disguise GNSS device https://support.logicpd.com/DesktopModules/Bring2mind/DMX/Download.aspx?portalid=0&EntryId=649 clearly specifies the availability of GPS, so let's not disguise it and name the node accordingly. Signed-off-by: Andreas Kemnade Message-ID: <20231127200430.143231-1-andreas@kemnade.info> Acked-by: Adam Ford Signed-off-by: Tony Lindgren commit b1a041afb41083d9741db11061c49c6572c383ca Author: Andreas Kemnade Date: Sat Sep 16 12:05:15 2023 +0200 ARM: dts: omap4-embt2ws: enable 32K clock on WLAN WLAN did only work if clock was left enabled by the original system, so make it fully enable the needed resources itself. Signed-off-by: Andreas Kemnade Message-ID: <20230916100515.1650336-6-andreas@kemnade.info> Signed-off-by: Tony Lindgren commit 3a40640ded577bd1e05c78508270f6e825463799 Author: Alexander Stein Date: Mon Jul 24 12:39:09 2023 +0200 ARM: dts: ti/omap: Replace deprecated extcon-usb-gpio id-gpio/vbus-gpio properties Use id-gpios and vbus-gpios instead. Signed-off-by: Alexander Stein Message-ID: <20230724103914.1779027-3-alexander.stein@ew.tq-group.com> Signed-off-by: Tony Lindgren commit d6296525f128efdd8c82bd3cbd3a83d306031d15 Author: Rob Herring Date: Tue Oct 10 16:19:25 2023 -0500 arm: dts: omap: Apply am57xx-idk overlays to base dtbs DT overlays in tree need to be applied to a base DTB to validate they apply, to run schema checks on them, and to catch any errors at compile time. Signed-off-by: Rob Herring Message-ID: <20231010211925.1629653-1-robh@kernel.org> Acked-by: Andrew Davis Signed-off-by: Tony Lindgren commit 7e0222686316f5506e51182f02c1d83ecc34c471 Merge: 04447185dadbb 7ec1bb2ce64ba Author: Paolo Abeni Date: Thu Nov 30 13:04:15 2023 +0100 Merge branch 'net-ethernet-convert-to-platform-remove-callback-returning-void' Uwe Kleine-König says: ==================== net: ethernet: Convert to platform remove callback returning void in (implicit) v1 of this series (https://lore.kernel.org/netdev/20231117091655.872426-1-u.kleine-koenig@pengutronix.de) I tried to address the resource leaks in the three cpsw drivers. However this is hard to get right without being able to test the changes. So here comes a series that just converts all drivers below drivers/net/ethernet to use .remove_new() and adds a comment about the potential leaks for someone else to fix the problem. See commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") for an extended explanation and the eventual goal. The TL;DR; is to prevent bugs like the three noticed here. Note this series results in no change of behaviour apart from improving the error message for the three cpsw drivers from remove callback returned a non-zero value. This will be ignored. to Failed to resume device (-ESOMETHING) ==================== Link: https://lore.kernel.org/r/20231128173823.867512-1-u.kleine-koenig@pengutronix.de Signed-off-by: Paolo Abeni commit 7ec1bb2ce64ba9528b1f67bf489dd5f6147d1f64 Author: Uwe Kleine-König Date: Tue Nov 28 18:38:28 2023 +0100 net: ethernet: ezchip: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Paolo Abeni commit a76772e2fd83e97a8d1bd363e986fc842ad31446 Author: Uwe Kleine-König Date: Tue Nov 28 18:38:27 2023 +0100 net: ethernet: ti: cpsw-new: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Replace the error path returning a non-zero value by an error message and a comment that there is more to do. With that this patch results in no change of behaviour in this driver apart from improving the error message. Signed-off-by: Uwe Kleine-König Reviewed-by: Roger Quadros Signed-off-by: Paolo Abeni commit 7ac3f867a35833a228b1bd9645a1581c808a5900 Author: Uwe Kleine-König Date: Tue Nov 28 18:38:26 2023 +0100 net: ethernet: ti: cpsw: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Replace the error path returning a non-zero value by an error message and a comment that there is more to do. With that this patch results in no change of behaviour in this driver apart from improving the error message. Signed-off-by: Uwe Kleine-König Reviewed-by: Roger Quadros Signed-off-by: Paolo Abeni commit 7234dc5ccba6e57b6b6ad19f7078e57afc40c9db Author: Uwe Kleine-König Date: Tue Nov 28 18:38:25 2023 +0100 net: ethernet: ti: am65-cpsw: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Replace the error path returning a non-zero value by an error message and a comment that there is more to do. With that this patch results in no change of behaviour in this driver apart from improving the error message. Signed-off-by: Uwe Kleine-König Reviewed-by: Roger Quadros Signed-off-by: Paolo Abeni commit 9b2ef250b31d46f7ef522bd1bd84942f998bb3f9 Author: Nam Cao Date: Wed Nov 29 17:31:56 2023 +0100 spi: spl022: switch to use default spi_transfer_one_message() Except for polling mode, this driver's transfer_one_message() makes use of interrupt handler and tasklet. This is problematic because spi_transfer_delay_exec(), who may sleep, is called in interrupt handler and tasklet. This causes the following warning: BUG: sleeping function called from invalid context at drivers/spi/spi.c:1428 Switch to use the default spi_transfer_one_message() instead, which calls spi_transfer_delay_exec() appropriately. Signed-off-by: Nam Cao Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/ae1940abd6ff6a9e77b4373cff60007c641a0c6c.1701274975.git.namcao@linutronix.de Signed-off-by: Mark Brown commit 39cefd85098d12439586824c39f8e1948fac186d Author: Nam Cao Date: Wed Nov 29 17:31:55 2023 +0100 spi: introduce SPI_TRANS_FAIL_IO for error reporting The default message transfer implementation - spi_transfer_one_message - invokes the specific device driver's transfer_one(), then waits for completion. However, there is no mechanism for the device driver to report failure in the middle of the transfer. Introduce SPI_TRANS_FAIL_IO for drivers to report transfer failure. Signed-off-by: Nam Cao Acked-by: Linus Walleij Link: https://lore.kernel.org/r/4b420dac528e60f122adde16851da88e4798c1ea.1701274975.git.namcao@linutronix.de Signed-off-by: Mark Brown commit 04447185dadbb2dfab2b5a3c73c76cbaccd8fbe1 Merge: e35174263f2c6 9b2348e2d6c94 Author: Paolo Abeni Date: Thu Nov 30 12:31:39 2023 +0100 Merge branch 'devlink-warn-about-existing-entities-during-reload-reinit' Jiri Pirko says: ==================== devlink: warn about existing entities during reload-reinit Recently there has been a couple of attempts from drivers to block devlink reload in certain situations. Turned out, the drivers do not properly tear down ports and related netdevs during reload. To address this, add couple of checks to be done during devlink reload reinit action. Also, extend documentation to be more explicit. ==================== Link: https://lore.kernel.org/r/20231128115255.773377-1-jiri@resnulli.us Signed-off-by: Paolo Abeni commit 9b2348e2d6c94146f50b68d7d2067146e7339ac5 Author: Jiri Pirko Date: Tue Nov 28 12:52:55 2023 +0100 devlink: warn about existing entities during reload-reinit During reload-reinit, all entities except for params, resources, regions and health reporter should be removed and re-added. Add a warning to be triggered in case the driver behaves differently. Signed-off-by: Jiri Pirko Reviewed-by: Przemek Kitszel Signed-off-by: Paolo Abeni commit 15d74e6588a158e481f38858de34011034957152 Author: Jiri Pirko Date: Tue Nov 28 12:52:54 2023 +0100 Documentation: devlink: extend reload-reinit description Be more explicit about devlink entities that may stay and that have to be removed during reload reinit action. Signed-off-by: Jiri Pirko Reviewed-by: Przemek Kitszel Signed-off-by: Paolo Abeni commit ef6069f3f6577b2e5bdf223d2f6d09f23bed8c6c Merge: 15c7fab0e0477 6c393ebbd74ad Author: Mark Brown Date: Thu Nov 30 11:23:17 2023 +0000 ASoC: SOF: IPC path handling and fallback support Merge series from Peter Ujfalusi : The main aim of the series is to provide a mechanism to fallback to 'older' IPC versions in case the desired one is missing either a firmware or topology file. It is going to make the life of users and distributions if we are going to start transition existing IPC3 platforms to IPC4 (CAVS2.5) and we might have missed some topology file to convert for example. In that case the kernel will fallback to IPC3 without audio regression. To be able to support this we needed to change the probe sequence to know the topology filename earlier and check if it is present in the filesystem. No functional changes for now, the default IPC versions have not been changed. commit f690ff9122d2ca8e38769f3bcf217bd3df681a36 Author: Yujie Liu Date: Thu Nov 30 11:40:18 2023 +0800 bpf/tests: Remove duplicate JSGT tests It seems unnecessary that JSGT is tested twice (one before JSGE and one after JSGE) since others are tested only once. Remove the duplicate JSGT tests. Fixes: 0bbaa02b4816 ("bpf/tests: Add tests to check source register zero-extension") Signed-off-by: Yujie Liu Signed-off-by: Daniel Borkmann Acked-by: Johan Almbladh Link: https://lore.kernel.org/bpf/20231130034018.2144963-1-yujie.liu@intel.com commit 833811353f701421c389f5c4d4bdf06e052fd649 Author: Uwe Kleine-König Date: Fri Nov 24 09:06:33 2023 +0100 pmdomain: xilinx/zynqmp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Michal Simek Link: https://lore.kernel.org/r/20231124080623.564924-10-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson commit 4b7599a5e847d4263e25f7e5d7d381792fcb5726 Author: Uwe Kleine-König Date: Fri Nov 24 09:06:32 2023 +0100 pmdomain: qcom-cpr: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231124080623.564924-9-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson commit 673c09bc6e134e6277b58e24caf29ed0746ea08a Author: Uwe Kleine-König Date: Fri Nov 24 09:06:31 2023 +0100 pmdomain: imx93-pd: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231124080623.564924-8-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson commit 77647eb5546c01cee08c4716a3a5717f6016b086 Author: Uwe Kleine-König Date: Fri Nov 24 09:06:30 2023 +0100 pmdomain: imx93-blk-ctrl: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231124080623.564924-7-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson commit 7476ddfd36ac65d2944b40373467c1c8eb0bc467 Author: Uwe Kleine-König Date: Fri Nov 24 09:06:29 2023 +0100 pmdomain: imx8mp-blk-ctrl: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231124080623.564924-6-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson commit eeba351945b72da4bc58d842ff9d4a90a39aaf9d Author: Uwe Kleine-König Date: Fri Nov 24 09:06:28 2023 +0100 pmdomain: imx8m-blk-ctrl: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231124080623.564924-5-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson commit 697bc6c8ab0af49b6ff0244f8ae8380a42898521 Author: Uwe Kleine-König Date: Fri Nov 24 09:06:27 2023 +0100 pmdomain: imx-gpcv2: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231124080623.564924-4-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson commit da07c5871d18157608a0d0702cb093168d79080a Author: Uwe Kleine-König Date: Fri Nov 24 09:06:26 2023 +0100 pmdomain: imx-gpc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231124080623.564924-3-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson commit b3dff2e97c614c1b60083898ffb42010ca16992e Author: Uwe Kleine-König Date: Fri Nov 24 09:06:25 2023 +0100 pmdomain: imx-pgc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231124080623.564924-2-u.kleine-koenig@pengutronix.de Signed-off-by: Ulf Hansson commit 6341e97b52b6238ed06dddc7ec22d025a9346a1e Author: Neil Armstrong Date: Thu Nov 23 17:17:42 2023 +0100 pmdomain: amlogic: meson-ee-pwrc: add support for G12A ISP power domain Add entries for the ISP power domain found in the Amlogic G12B SoC Signed-off-by: Neil Armstrong Reviewed-by: Daniel Scally Tested-by: Daniel Scally Link: https://lore.kernel.org/r/20231123-topic-amlogic-upstream-isp-pmdomain-v2-2-61f2fcf709e5@linaro.org Signed-off-by: Ulf Hansson commit e22fd8d5ca4a22126b1387b8b0bd2f5ff11925cf Merge: 034c9ec5d5b6c f32f977fa8ab1 Author: Ulf Hansson Date: Thu Nov 30 12:01:46 2023 +0100 pmdomain: Merge branch dt into next Merge the immutable branch dt into next, to allow the DT bindings to be tested together with changes that are targeted for v6.7. Signed-off-by: Ulf Hansson commit f32f977fa8ab1d2fde0cd7136e0d0393fce31d84 Author: Neil Armstrong Date: Thu Nov 23 17:17:41 2023 +0100 dt-bindings: power: meson-g12a-power: document ISP power domain Add MIPI ISP power domain ID to the G12A Power domains bindings header Signed-off-by: Neil Armstrong Reviewed-by: Daniel Scally Tested-by: Daniel Scally Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231123-topic-amlogic-upstream-isp-pmdomain-v2-1-61f2fcf709e5@linaro.org Signed-off-by: Ulf Hansson commit ad6bcdad2b6724e113f191a12f859a9e8456b26d Author: Babis Chalios Date: Wed May 31 11:51:19 2023 +0200 vmgenid: emit uevent when VMGENID updates We receive an ACPI notification every time the VM Generation ID changes and use the new ID as fresh randomness added to the entropy pool. This commits emits a uevent every time we receive the ACPI notification, as a means to notify the user space that it now is in a new VM. Signed-off-by: Babis Chalios Reviewed-by: Alexander Graf Reviewed-by: Lennart Poettering Link: https://lore.kernel.org/r/20230531095119.11202-2-bchalios@amazon.es Signed-off-by: Greg Kroah-Hartman commit 11e5ea5242e38d44fcede879473566bb6d68f954 Author: Ard Biesheuvel Date: Tue Nov 28 15:04:01 2023 +0100 KVM: arm64: Use helpers to classify exception types reported via ESR Currently, we rely on the fact that exceptions can be trivially classified by applying a mask/value pair to the syndrome value reported via the ESR register, but this will no longer be true once we enable support for 5 level paging. So introduce a couple of helpers that encapsulate this mask/value pair matching, and wire them up in the code. No functional change intended, the actual handling of translation level -1 will be added in a subsequent patch. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: Oliver Upton Cc: Ryan Roberts Signed-off-by: Ard Biesheuvel Acked-by: Mark Rutland [maz: folded in changes suggested by Mark] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231128140400.3132145-2-ardb@google.com commit ede66cd22441820cbd399936bf84fdc4294bc7fa Author: Michael Ellerman Date: Thu Nov 30 00:19:19 2023 +1100 powerpc/64s: Fix CONFIG_NUMA=n build due to create_section_mapping() With CONFIG_NUMA=n the build fails with: arch/powerpc/mm/book3s64/pgtable.c:275:15: error: no previous prototype for ‘create_section_mapping’ [-Werror=missing-prototypes] 275 | int __meminit create_section_mapping(unsigned long start, unsigned long end, | ^~~~~~~~~~~~~~~~~~~~~~ That happens because the prototype for create_section_mapping() is in asm/mmzone.h, but asm/mmzone.h is only included by linux/mmzone.h when CONFIG_NUMA=y. In fact the prototype is only needed by arch/powerpc/mm code, so move the prototype into arch/powerpc/mm/mmu_decl.h, which also fixes the build error. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231129131919.2528517-5-mpe@ellerman.id.au commit 3cc12bb83e6794de7f50799ce43d85c7a3d55828 Author: Sibi Sankar Date: Wed Nov 29 12:27:46 2023 +0530 firmware: arm_scmi: Fix NULL pointer dereference during fastchannel init The scmi_perf_domain_lookup requires the protocol handle to have the private data set, which is yet to happen during the fastchannel init scenario. This results in a NULL pointer dereference. Fix this by using the pre-populated perf_dom_info to pass on the required information instead. | scmi_perf_protocol_init+0x434/0x678 | scmi_get_protocol_instance+0x168/0x29c | scmi_devres_protocol_instance_get+0x50/0xa0 | scmi_devm_protocol_get+0x20/0x50 | scmi_cpufreq_probe+0x34/0xd4 | scmi_dev_probe+0x28/0x3c | really_probe+0x148/0x2ac | __driver_probe_device+0x78/0x12c | driver_probe_device+0x40/0x160 | __device_attach_driver+0xb8/0x134 | bus_for_each_drv+0x80/0xdc | __device_attach+0xa8/0x1b0 | device_initial_probe+0x14/0x20 | bus_probe_device+0xa8/0xac | device_add+0x5cc/0x778 | device_register+0x20/0x30 | __scmi_device_create.part.0+0xec/0x1cc | scmi_device_create+0x180/0x1c4 | scmi_create_protocol_devices+0x4c/0xb0 | scmi_probe+0x660/0x738 | platform_probe+0x68/0xdc | really_probe+0x148/0x2ac | __driver_probe_device+0x78/0x12c | driver_probe_device+0x40/0x160 | __device_attach_driver+0xb8/0x134 | bus_for_each_drv+0x80/0xdc | __device_attach+0xa8/0x1b0 | device_initial_probe+0x14/0x20 | bus_probe_device+0xa8/0xac | deferred_probe_work_func+0x88/0xc0 | process_one_work+0x13c/0x264 | worker_thread+0x32c/0x438 | kthread+0x118/0x11c | ret_from_fork+0x10/0x20 Fixes: 619bc6e034f3 ("firmware: arm_scmi: Populate fastchannel info only if set operations are allowed") Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20231129065748.19871-2-quic_sibis@quicinc.com Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 2082b6956ce95b66b03983f3059744f559493d98 Author: Arseniy Krasnov Date: Thu Nov 9 08:39:53 2023 +0300 mtd: rawnand: meson: handle OOB buffer according OOB layout In case of MTD_OPS_AUTO_OOB mode, MTD/NAND layer fills/reads OOB buffer according current OOB layout so we need to follow it in the driver. Signed-off-by: Arseniy Krasnov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231109053953.3863664-1-avkrasnov@salutedevices.com commit 55b0f4a7c37680428d640aeada96d62888366c56 Author: Dan Carpenter Date: Thu Nov 30 10:27:15 2023 +0300 drm/imagination: fix off by one in pvr_vm_mips_init() error handling If the call to vmap() fails the "page_nr" is one element beyond the end of the mips_data->pt_dma_addr[] and mips_data->pt_pages[] arrays. The way that this is traditionally written is that we clean up the partial loop iteration before the goto and then we can say while (--i >= 0). At that point we know that all the elements thus far are initialized so we don't need to have NULL checks. Fixes: 927f3e0253c1 ("drm/imagination: Implement MIPS firmware processor and MMU support") Signed-off-by: Dan Carpenter Reviewed-by: Frank Binns Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/a2d3210b-290f-4397-9c3e-efdcca94d8ac@moroto.mountain commit 78a509fba9c9b1fcb77f95b7c6be30da3d24823a Author: Jun'ichi Nomura Date: Wed Nov 29 15:44:49 2023 -0500 x86/boot: Ignore NMIs during very early boot When there are two racing NMIs on x86, the first NMI invokes NMI handler and the 2nd NMI is latched until IRET is executed. If panic on NMI and panic kexec are enabled, the first NMI triggers panic and starts booting the next kernel via kexec. Note that the 2nd NMI is still latched. During the early boot of the next kernel, once an IRET is executed as a result of a page fault, then the 2nd NMI is unlatched and invokes the NMI handler. However, NMI handler is not set up at the early stage of boot, which results in a boot failure. Avoid such problems by setting up a NOP handler for early NMIs. [ mingo: Refined the changelog. ] Signed-off-by: Jun'ichi Nomura Signed-off-by: Derek Barbosa Signed-off-by: Ingo Molnar Cc: Kees Cook Cc: Linus Torvalds Cc: Paul E. McKenney Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Peter Zijlstra commit 5225952d74d43e4c054731c74b8afd700b23a94a Author: Nathan Chancellor Date: Wed Nov 29 15:17:43 2023 -0700 x86/tools: Remove chkobjdump.awk This check is superfluous now that the minimum version of binutils to build the kernel is 2.25. This also fixes an error seen with llvm-objdump because it does not support '-v' prior to LLVM 13: llvm-objdump: error: unknown argument '-v' Signed-off-by: Nathan Chancellor Signed-off-by: Ingo Molnar Tested-by: Kees Cook Reviewed-by: Kees Cook Link: https://github.com/llvm/llvm-project/commit/dde24a87c55f82d8c7b3bf3eafb10f2b9b2b9a01 Link: https://lore.kernel.org/r/20231129-objdump-reformat-llvm-v3-3-0d855e79314d@kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/1362 commit f4570ebd836363dc7722b8eb8d099b311021af13 Author: Samuel Zeter Date: Wed Nov 29 15:17:42 2023 -0700 x86/tools: objdump_reformat.awk: Allow for spaces GNU objdump and LLVM objdump have differing output formats. Specifically, GNU objump will format its output as: address:hex, whereas LLVM objdump displays its output as address:hex. objdump_reformat.awk incorrectly handles this discrepancy due to the unexpected space and as a result insn_decoder_test fails, as its input is garbled. The instruction line being tokenized now handles a space and colon, or tab delimiter. Signed-off-by: Samuel Zeter Signed-off-by: Nathan Chancellor Signed-off-by: Ingo Molnar Tested-by: Nathan Chancellor Tested-by: Kees Cook Reviewed-by: Kees Cook Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20231129-objdump-reformat-llvm-v3-2-0d855e79314d@kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/1364 commit 60c2ea7c89e375804171552d8ea53d9084ec3269 Author: Samuel Zeter Date: Wed Nov 29 15:17:41 2023 -0700 x86/tools: objdump_reformat.awk: Ensure regex matches fwait If there is "wait" mnemonic in the line being parsed, it is incorrectly handled by the script, and an extra line of "fwait" in objdump_reformat's output is inserted. As insn_decoder_test relies upon the formatted output, the test fails. This is reproducible when disassembling with llvm-objdump: Pre-processed lines: ffffffff81033e72: 9b wait ffffffff81033e73: 48 c7 c7 89 50 42 82 movq After objdump_reformat.awk: ffffffff81033e72: 9b fwait ffffffff81033e72: wait ffffffff81033e73: 48 c7 c7 89 50 42 82 movq The regex match now accepts spaces or tabs, along with the "fwait" instruction. Signed-off-by: Samuel Zeter Signed-off-by: Nathan Chancellor Signed-off-by: Ingo Molnar Tested-by: Nathan Chancellor Tested-by: Kees Cook Reviewed-by: Kees Cook Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20231129-objdump-reformat-llvm-v3-1-0d855e79314d@kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/1364 commit 0f9e0d7928d8e88d57b1482effab70edb9741ce1 Author: Namhyung Kim Date: Thu Nov 30 11:52:46 2023 +0530 perf/x86/amd: Reject branch stack for IBS events The AMD IBS PMU doesn't handle branch stacks, so it should not accept events with brstack. Signed-off-by: Namhyung Kim Signed-off-by: Ravi Bangoria Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20231130062246.290-1-ravi.bangoria@amd.com commit 9ee33dc47772724ff583b060bb37c62b92b2d9c4 Author: Dan Carpenter Date: Thu Nov 30 10:27:01 2023 +0300 drm/imagination: Fix IS_ERR() vs NULL bug in pvr_request_firmware() The pvr_build_firmware_filename() function returns NULL on error. It doesn't return error pointers. Fixes: f99f5f3ea7ef ("drm/imagination: Add GPU ID parsing and firmware loading") Signed-off-by: Dan Carpenter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/384288de-a779-46c7-869d-b3c63462e12b@moroto.mountain commit 03219a3aa6c89f1cbb6624907f32d6939a1ffeb0 Author: Dan Carpenter Date: Thu Nov 30 10:26:29 2023 +0300 drm/imagination: Fix error codes in pvr_device_clk_init() There is a cut and paste error so this code returns the wrong variable. Fixes: 1f88f017e649 ("drm/imagination: Get GPU resources") Signed-off-by: Dan Carpenter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1649c66b-3eea-40d2-9687-592124f968cf@moroto.mountain commit b77f5ef8ebe4d8ee3a712a216415d7f4d4d0acf2 Author: Youngmin Nam Date: Sun Nov 26 18:46:18 2023 +0900 pinctrl: samsung: add irq_set_affinity() for non wake up external gpio interrupt To support affinity setting for non wake up external gpio interrupt, add irq_set_affinity callback using irq number from pinctrl driver data. Before this patch, changing the irq affinity of gpio interrupt is not possible: # cat /proc/irq/418/smp_affinity 3ff # echo 00f > /proc/irq/418/smp_affinity # cat /proc/irq/418/smp_affinity 3ff # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 ... 418: 3631 0 0 0 ... With this patch applied, it's possible to change irq affinity of gpio interrupt: # cat /proc/irq/418/smp_affinity 3ff # echo 00f > /proc/irq/418/smp_affinity # cat /proc/irq/418/smp_affinity 00f # cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 ... 418: 3893 201 181 188 ... Signed-off-by: Youngmin Nam Reviewed-by: Sam Protsenko Tested-by: Sam Protsenko Link: https://lore.kernel.org/r/20231126094618.2545116-1-youngmin.nam@samsung.com Signed-off-by: Krzysztof Kozlowski commit e35174263f2c671603e8ccc997a16334087b782c Merge: f422544118cbd 8e7bab6b9652c Author: Jakub Kicinski Date: Wed Nov 29 20:16:42 2023 -0800 Merge branch 'clean-up-and-refactor-cookie_v46_check' Kuniyuki Iwashima says: ==================== tcp: Clean up and refactor cookie_v[46]_check(). This is a preparation series for upcoming arbitrary SYN Cookie support with BPF. [0] There are slight differences between cookie_v[46]_check(). Such a discrepancy caused an issue in the past, and BPF SYN Cookie support will add more churn. The primary purpose of this series is to clean up and refactor cookie_v[46]_check() to minimise such discrepancies and make the BPF series easier to review. [0]: https://lore.kernel.org/netdev/20231121184245.69569-1-kuniyu@amazon.com/ v2: https://lore.kernel.org/netdev/20231125011638.72056-1-kuniyu@amazon.com/ v1: https://lore.kernel.org/netdev/20231123012521.62841-1-kuniyu@amazon.com/ ==================== Link: https://lore.kernel.org/r/20231129022924.96156-1-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 8e7bab6b9652cd07a05ee0380b623c0e00e3eb00 Author: Kuniyuki Iwashima Date: Tue Nov 28 18:29:24 2023 -0800 tcp: Factorise cookie-dependent fields initialisation in cookie_v[46]_check() We will support arbitrary SYN Cookie with BPF, and then kfunc at TC will preallocate reqsk and initialise some fields that should not be overwritten later by cookie_v[46]_check(). To simplify the flow in cookie_v[46]_check(), we move such fields' initialisation to cookie_tcp_reqsk_alloc() and factorise non-BPF SYN Cookie handling into cookie_tcp_check(), where we validate the cookie and allocate reqsk, as done by kfunc later. Note that we set ireq->ecn_ok in two steps, the latter of which will be shared by the BPF case. As cookie_ecn_ok() is one-liner, now it's inlined. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231129022924.96156-9-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit de5626b95e13a054aa80f890f2a774d2fc18d855 Author: Kuniyuki Iwashima Date: Tue Nov 28 18:29:23 2023 -0800 tcp: Factorise cookie-independent fields initialisation in cookie_v[46]_check(). We will support arbitrary SYN Cookie with BPF, and then some reqsk fields are initialised in kfunc, and others are done in cookie_v[46]_check(). This patch factorises the common part as cookie_tcp_reqsk_init() and calls it in cookie_tcp_reqsk_alloc() to minimise the discrepancy between cookie_v[46]_check(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231129022924.96156-8-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 7b0f570f879adecf12329ecd60485e7e6b4783c1 Author: Kuniyuki Iwashima Date: Tue Nov 28 18:29:22 2023 -0800 tcp: Move TCP-AO bits from cookie_v[46]_check() to tcp_ao_syncookie(). We initialise treq->af_specific in cookie_tcp_reqsk_alloc() so that we can look up a key later in tcp_create_openreq_child(). Initially, that change was added for MD5 by commit ba5a4fdd63ae ("tcp: make sure treq->af_specific is initialized"), but it has not been used since commit d0f2b7a9ca0a ("tcp: Disable header prediction for MD5 flow."). Now, treq->af_specific is used only by TCP-AO, so, we can move that initialisation into tcp_ao_syncookie(). In addition to that, l3index in cookie_v[46]_check() is only used for tcp_ao_syncookie(), so let's move it as well. While at it, we move down tcp_ao_syncookie() in cookie_v4_check() so that it will be called after security_inet_conn_request() to make functions order consistent with cookie_v6_check(). Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231129022924.96156-7-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit efce3d1fdff53ef45b11ff407f16bc2f6f292b93 Author: Kuniyuki Iwashima Date: Tue Nov 28 18:29:21 2023 -0800 tcp: Don't initialise tp->tsoffset in tcp_get_cookie_sock(). When we create a full socket from SYN Cookie, we initialise tcp_sk(sk)->tsoffset redundantly in tcp_get_cookie_sock() as the field is inherited from tcp_rsk(req)->ts_off. cookie_v[46]_check |- treq->ts_off = 0 `- tcp_get_cookie_sock |- tcp_v[46]_syn_recv_sock | `- tcp_create_openreq_child | `- newtp->tsoffset = treq->ts_off `- tcp_sk(child)->tsoffset = tsoff Let's initialise tcp_rsk(req)->ts_off with the correct offset and remove the second initialisation of tcp_sk(sk)->tsoffset. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231129022924.96156-6-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 7577bc8249c3fc86096ef1b1c9a8f4b6232231e7 Author: Kuniyuki Iwashima Date: Tue Nov 28 18:29:20 2023 -0800 tcp: Don't pass cookie to __cookie_v[46]_check(). tcp_hdr(skb) and SYN Cookie are passed to __cookie_v[46]_check(), but none of the callers passes cookie other than ntohl(th->ack_seq) - 1. Let's fetch it in __cookie_v[46]_check() instead of passing the cookie over and over. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231129022924.96156-5-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 50468cddd6bc27e75e7377e376674d40fd1b1d73 Author: Kuniyuki Iwashima Date: Tue Nov 28 18:29:19 2023 -0800 tcp: Clean up goto labels in cookie_v[46]_check(). We will support arbitrary SYN Cookie with BPF, and then reqsk will be preallocated before cookie_v[46]_check(). Depending on how validation fails, we send RST or just drop skb. To make the error handling easier, let's clean up goto labels. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231129022924.96156-4-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 45c28509fee6b4c867374b83c5b9e10dac245988 Author: Kuniyuki Iwashima Date: Tue Nov 28 18:29:18 2023 -0800 tcp: Cache sock_net(sk) in cookie_v[46]_check(). sock_net(sk) is used repeatedly in cookie_v[46]_check(). Let's cache it in a variable. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231129022924.96156-3-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit 34efc9cfe7c6d11ccc438ca03b59a1bf43cc60ec Author: Kuniyuki Iwashima Date: Tue Nov 28 18:29:17 2023 -0800 tcp: Clean up reverse xmas tree in cookie_v[46]_check(). We will grow and cut the xmas tree in cookie_v[46]_check(). This patch cleans it up to make later patches tidy. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231129022924.96156-2-kuniyu@amazon.com Signed-off-by: Jakub Kicinski commit f422544118cbdfc3bba7b7c5189e18147acb9047 Author: Colin Ian King Date: Tue Nov 28 09:53:04 2023 +0000 net: mana: Fix spelling mistake "enforecement" -> "enforcement" There is a spelling mistake in struct field hc_tx_err_sqpdid_enforecement. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Shradha Gupta Link: https://lore.kernel.org/r/20231128095304.515492-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski commit 4b86d7c64e8f69824b9b2cc0e9b72842ac2d0e62 Author: Andy Shevchenko Date: Tue Nov 28 19:50:27 2023 +0200 net: dsa: sja1105: Use units.h instead of the copy of a definition BYTES_PER_KBIT is defined in units.h, use that definition. Signed-off-by: Andy Shevchenko Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20231128175027.394754-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jakub Kicinski commit 5de7796dffcde224eba00d05fe030e2b99d286fa Merge: 3d6d7549042cb 9369777c29395 Author: Jakub Kicinski Date: Wed Nov 29 20:10:27 2023 -0800 Merge branch 'mptcp-more-selftest-coverage-and-code-cleanup-for-net-next' Mat Martineau says: ==================== mptcp: More selftest coverage and code cleanup for net-next Patches 1-5 and 7-8 add selftest coverage (and an associated subflow counter in the kernel) to validate the recently-updated handling of subflows with ID 0. Patch 6 renames a label in the userspace path manager for clarity. Patches 9-11 and 13-15 factor out common selftest code by moving certain functions to mptcp_lib.sh Patch 12 makes sure the random data file generated for selftest payloads has the intended size. v3: https://lore.kernel.org/r/20231115-send-net-next-2023107-v3-0-1ef58145a882@kernel.org v2: https://lore.kernel.org/r/20231114-send-net-next-2023107-v2-0-b650a477362c@kernel.org v1: https://lore.kernel.org/r/20231027-send-net-next-2023107-v1-0-03eff9452957@kernel.org ==================== Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-0-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 9369777c29395730cec967e7d0f48aed872b7110 Author: Geliang Tang Date: Tue Nov 28 15:18:59 2023 -0800 selftests: mptcp: add mptcp_lib_wait_local_port_listen To avoid duplicated code in different MPTCP selftests, we can add and use helpers defined in mptcp_lib.sh. wait_local_port_listen() helper is defined in diag.sh, mptcp_connect.sh, mptcp_join.sh and simult_flows.sh, export it into mptcp_lib.sh and rename it with mptcp_lib_ prefix. Use this new helper in all these scripts. Note: We only have IPv4 connections in this helper, not looking at IPv6 (tcp6) but that's OK because we only have IPv4 connections here in diag.sh. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-15-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 9d9095bbc24df4432b38fb33a3cf59ea1e9213d0 Author: Geliang Tang Date: Tue Nov 28 15:18:58 2023 -0800 selftests: mptcp: add mptcp_lib_check_transfer To avoid duplicated code in different MPTCP selftests, we can add and use helpers defined in mptcp_lib.sh. check_transfer() and print_file_err() helpers are defined both in mptcp_connect.sh and mptcp_sockopt.sh, export them into mptcp_lib.sh and rename them with mptcp_lib_ prefix. And use them in all scripts. Note: In mptcp_sockopt.sh it is OK to drop 'ret=1' in check_transfer() because it will be set in run_tests() anyway. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-14-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 3a96dea9f88763cfa29e15f681f95fca8952ec77 Author: Geliang Tang Date: Tue Nov 28 15:18:57 2023 -0800 selftests: mptcp: add mptcp_lib_make_file To avoid duplicated code in different MPTCP selftests, we can add and use helpers defined in mptcp_lib.sh. make_file() helper in mptcp_sockopt.sh and userspace_pm.sh are the same. Export it into mptcp_lib.sh and rename it as mptcp_lib_kill_wait(). Use it in both mptcp_connect.sh and mptcp_join.sh. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-13-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 119931cc88ce7073b9a289c13abaf2348d55fdfa Author: Geliang Tang Date: Tue Nov 28 15:18:56 2023 -0800 selftests: mptcp: add missing oflag=append In mptcp_connect.sh we are missing something like "oflag=append" because this will write "${rem}" bytes at the beginning of the file where there is already some random bytes. It should write that at the end. This patch adds this missing 'oflag=append' flag for 'dd' command in make_file(). Suggested-by: Matthieu Baerts Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-12-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 61c131f5d4d2b79904af2fdcb2839a9db8e7c55c Author: Geliang Tang Date: Tue Nov 28 15:18:55 2023 -0800 selftests: mptcp: add mptcp_lib_get_counter To avoid duplicated code in different MPTCP selftests, we can add and use helpers defined in mptcp_lib.sh. The helper get_counter() in mptcp_join.sh and get_mib_counter() in mptcp_connect.sh have the same functionality, export get_counter() into mptcp_lib.sh and rename it as mptcp_lib_get_counter(). Use this new helper instead of get_counter() and get_mib_counter(). Use this helper in test_prio() in userspace_pm.sh too instead of open-coding. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-11-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit b850f2c7dd85ecd14a333685c4ffd23f12665e94 Author: Geliang Tang Date: Tue Nov 28 15:18:54 2023 -0800 selftests: mptcp: add mptcp_lib_is_v6 To avoid duplicated code in different MPTCP selftests, we can add and use helpers defined in mptcp_lib.sh. is_v6() helper is defined in mptcp_connect.sh, mptcp_join.sh and mptcp_sockopt.sh, so export it into mptcp_lib.sh and rename it as mptcp_lib_is_v6(). Use this new helper in all scripts. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-10-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit bdbef0a6ff10603895b0ba39f56bf874cb2b551a Author: Geliang Tang Date: Tue Nov 28 15:18:53 2023 -0800 selftests: mptcp: add mptcp_lib_kill_wait To avoid duplicated code in different MPTCP selftests, we can add and use helpers defined in mptcp_lib.sh. Export kill_wait() helper in userspace_pm.sh into mptcp_lib.sh and rename it as mptcp_lib_kill_wait(). It can be used to instead of kill_wait() in mptcp_join.sh. Use the new helper in both scripts. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-9-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit b9fb176081fb216c43d923888f0d53d9e3a5965b Author: Geliang Tang Date: Tue Nov 28 15:18:52 2023 -0800 selftests: mptcp: userspace pm send RM_ADDR for ID 0 This patch adds a selftest for userspace PM to remove id 0 address. Use userspace_pm_add_addr() helper to add an id 10 address, then use userspace_pm_rm_addr() helper to remove id 0 address. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-8-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit e3b47e460b4bd0c61d0082f1ac02650dcb79e5d1 Author: Geliang Tang Date: Tue Nov 28 15:18:51 2023 -0800 selftests: mptcp: userspace pm remove initial subflow This patch adds a selftest for userspace PM to remove the initial subflow. Use userspace_pm_add_sf() to add a subflow, and pass initial IP address to userspace_pm_rm_sf() to remove the initial subflow. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-7-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit b3ac570aae6b73eb810207583af0693adca30543 Author: Geliang Tang Date: Tue Nov 28 15:18:50 2023 -0800 mptcp: userspace pm rename remove_err to out The value of 'err' will not be only '-EINVAL', but can be '0' in some cases. So it's better to rename the label 'remove_err' to 'out' to avoid confusions. Suggested-by: Matthieu Baerts Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-6-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit b2e2248f365a7ef0687fe048c335fe1a32f98b36 Author: Geliang Tang Date: Tue Nov 28 15:18:49 2023 -0800 selftests: mptcp: userspace pm create id 0 subflow This patch adds a selftest to create id 0 subflow. Pass id 0 to the helper userspace_pm_add_sf() to create id 0 subflow. chk_mptcp_info shows one subflow but chk_subflows_total shows two subflows in each namespace. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-5-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 757c828ce94905a2975873d5e90a376c701b2b90 Author: Geliang Tang Date: Tue Nov 28 15:18:48 2023 -0800 selftests: mptcp: update userspace pm test helpers This patch adds a new argument namespace to userspace_pm_add_addr() and userspace_pm_add_sf() to make these two helper more versatile. Add two more versatile helpers for userspace pm remove subflow or address: userspace_pm_rm_addr() and userspace_pm_rm_sf(). The original test helpers userspace_pm_rm_sf_addr_ns1() and userspace_pm_rm_sf_addr_ns2() can be replaced by these new helpers. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-4-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 80775412882e273b8ef62124fae861cde8e6fb3d Author: Geliang Tang Date: Tue Nov 28 15:18:47 2023 -0800 selftests: mptcp: add chk_subflows_total helper This patch adds a new helper chk_subflows_total(), in it use the newly added counter mptcpi_subflows_total to get the "correct" amount of subflows, including the initial one. To be compatible with old 'ss' or kernel versions not supporting this counter, get the total subflows by listing TCP connections that are MPTCP subflows: ss -ti state state established state syn-sent state syn-recv | grep -c tcp-ulp-mptcp. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-3-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 06848c0f341ee3f9226ed01e519c72e4d2b6f001 Author: Geliang Tang Date: Tue Nov 28 15:18:46 2023 -0800 selftests: mptcp: add evts_get_info helper This patch adds a new helper get_info_value(), using 'sed' command to parse the value of the given item name in the line with the given keyword, to make chk_mptcp_info() and pedit_action_pkts() more readable. Also add another helper evts_get_info() to use get_info_value() to parse the output of 'pm_nl_ctl events' command, to make all the userspace pm selftests more readable, both in mptcp_join.sh and userspace_pm.sh. Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-2-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 6ebf6f90ab4ac09a76172a6d387e8819d3259595 Author: Geliang Tang Date: Tue Nov 28 15:18:45 2023 -0800 mptcp: add mptcpi_subflows_total counter If the initial subflow has been removed, we cannot know without checking other counters, e.g. ss -ti | grep -c tcp-ulp-mptcp or getsockopt(SOL_MPTCP, MPTCP_FULL_INFO, ...) (or others except MPTCP_INFO of course) and then check mptcp_subflow_data->num_subflows to get the total amount of subflows. This patch adds a new counter mptcpi_subflows_total in mptcpi_flags to store the total amount of subflows, including the initial one. A new helper __mptcp_has_initial_subflow() is added to check whether the initial subflow has been removed or not. With this helper, we can then compute the total amount of subflows from mptcp_info by doing something like: mptcpi_subflows_total = mptcpi_subflows + __mptcp_has_initial_subflow(msk). Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/428 Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-1-8d6b94150f6b@kernel.org Signed-off-by: Jakub Kicinski commit 3d6d7549042cbadf252fa32ee1561b5bd2f402ea Merge: 7edce370d87a2 69f289e9c72af Author: Jakub Kicinski Date: Wed Nov 29 20:03:27 2023 -0800 Merge branch 'mlxsw-support-cff-flood-mode' Petr Machata says: ==================== mlxsw: Support CFF flood mode The registers to configure to initialize a flood table differ between the controlled and CFF flood modes. In therefore needs to be an op. Add it, hook up the current init to the existing families, and invoke the op. PGT is an in-HW table that maps addresses to sets of ports. Then when some HW process needs a set of ports as an argument, instead of embedding the actual set in the dynamic configuration, what gets configured is the address referencing the set. The HW then works with the appropriate PGT entry. Among other allocations, the PGT currently contains two large blocks for bridge flooding: one for 802.1q and one for 802.1d. Within each of these blocks are three tables, for unknown-unicast, multicast and broadcast flooding: . . . | 802.1q | 802.1d | . . . | UC | MC | BC | UC | MC | BC | \______ _____/ \_____ ______/ v v FID flood vectors Thus each FID (which corresponds to an 802.1d bridge or one VLAN in an 802.1q bridge) uses three flood vectors spread across a fairly large region of PGT. This way of organizing the flood table (called "controlled") is not very flexible. E.g. to decrease a bridge scale and store more IP MC vectors, one would need to completely rewrite the bridge PGT blocks, or resort to hacks such as storing individual MC flood vectors into unused part of the bridge table. In order to address these shortcomings, Spectrum-2 and above support what is called CFF flood mode, for Compressed FID Flooding. In CFF flood mode, each FID has a little table of its own, with three entries adjacent to each other, one for unknown-UC, one for MC, one for BC. This allows for a much more fine-grained approach to PGT management, where bits of it are allocated on demand. . . . | FID | FID | FID | FID | FID | . . . |U|M|B|U|M|B|U|M|B|U|M|B|U|M|B| \_____________ _____________/ v FID flood vectors Besides the FID table organization, the CFF flood mode also impacts Router Subport (RSP) table. This table contains flood vectors for rFIDs, which are FIDs that reference front panel ports or LAGs. The RSP table contains two entries per front panel port and LAG, one for unknown-UC traffic, and one for everything else. Currently, the FW allocates and manages the table in its own part of PGT. rFIDs are marked with flood_rsp bit and managed specially. In CFF mode, rFIDs are managed as all other FIDs. The driver therefore has to allocate and maintain the flood vectors. Like with bridge FIDs, this is more work, but increases flexibility of the system. The FW currently supports both the controlled and CFF flood modes. To shed complexity, in the future it should only support CFF flood mode. Hence this patchset, which adds CFF flood mode support to mlxsw. Since mlxsw needs to maintain both the controlled mode as well as CFF mode support, we will keep the layout as compatible as possible. The bridge tables will stay in the same overall shape, just their inner organization will change from flood mode -> FID to FID -> flood mode. Likewise will RSP be kept as a contiguous block of PGT memory, as was the case when the FW maintained it. - The way FIDs get configured under the CFF flood mode differs from the currently used controlled mode. The simple approach of having several globally visible arrays for spectrum.c to statically choose from no longer works. Patch #1 thus privatizes all FID initialization and finalization logic, and exposes it as ops instead. - Patch #2 renames the ops that are specific to the controlled mode, to make room in the namespace for the CFF variants. Patch #3 extracts a helper to compute flood table base out of mlxsw_sp_fid_flood_table_mid(). - The op fid_setup configured fid_offset, i.e. the number of this FID within its family. For rFIDs in CFF mode, to determine this number, the driver will need to do fallible queries. Thus in patch #4, make the FID setup operation fallible as well. - Flood mode initialization routine differs between the controlled and CFF flood modes. The controlled mode needs to configure flood table layout, which the CFF mode does not need to do. In patch #5, move mlxsw_sp_fid_flood_table_init() up so that the following patch can make use of it. In patch #6, add an op to be invoked per table (if defined). - The current way of determining PGT allocation size depends on the number of FIDs and number of flood tables. RFIDs however have PGT footprint depending not on number of FIDs, but on number of ports and LAGs, because which ports an rFID should flood to does not depend on the FID itself, but on the port or LAG that it references. Therefore in patch #7, add FID family ops for determining PGT allocation size. - As elaborated above, layout of PGT will differ between controlled and CFF flood modes. In CFF mode, it will further differ between rFIDs and other FIDs (as described at previous patch). The way to pack the SFMR register to configure a FID will likewise differ from controlled to CFF. Thus in patches #8 and #9 add FID family ops to determine PGT base address for a FID and to pack SFMR. - Patches #10 and #11 add more bits for RSP support. In patch #10, add a new traffic type enumerator, for non-UC traffic. This is a combination of BC and MC traffic, but the way that mlxsw maps these mnemonic names to actual traffic type configurations requires that we have a new name to describe this class of traffic. Patch #11 then adds hooks necessary for RSP table maintenance. As ports come and go, and join and leave LAGs, it is necessary to update flood vectors that the rFIDs use. These new hooks will make that possible. - Patches #12, #13 and #14 introduce flood profiles. These have been implicit so far, but the way that CFF flood mode works with profile IDs requires that we make them explicit. Thus in patch #12, introduce flood profile objects as a set of flood tables that FID families then refer to. The FID code currently only uses a single flood profile. In patch #13, add a flood profile ID to flood profile objects. In patch #14, when in CFF mode, configure SFFP according to the existing flood profiles (or the one that exists as of that point). - Patches #15 and #16 add code to implement, respectively, bridge FIDs and RSP FIDs in CFF mode. - In patch #17, toggle flood_mode_prefer_cff on Spectrum-2 and above, which makes the newly-added code live. ==================== Link: https://lore.kernel.org/r/cover.1701183891.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 69f289e9c72afc8439b5ad83dd8c46803a097657 Author: Petr Machata Date: Tue Nov 28 16:50:50 2023 +0100 mlxsw: spectrum: Use CFF mode where available Mark all Spectrum>2 systems as preferring CFF flood mode if supported by the firmware. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/8a3d2ad96b943f7e3f53f998bd333a14e19cd641.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 72a4cedb3760ff66446a1a4d006315aad79d573f Author: Petr Machata Date: Tue Nov 28 16:50:49 2023 +0100 mlxsw: spectrum_fid: Add support for rFID family in CFF flood mode In this patch, add the artifacts for the rFID family that works in CFF flood mode. The same that was said about PGT organization and lookup in bridge FID families applies for the rFID family as well. The main difference lies in the fact that in the controlled flood mode, the FW was taking care of maintaining the PGT tables for rFIDs. In CFF mode, the responsibility shifts to the driver. All rFIDs are based off either a front panel port, or a LAG port. For those based off ports, we need to maintain at worst one PGT block for each port, for those based off LAGs, one PGT block per LAG. This reflects in the pgt_size callback, which determines the PGT footprint based on number of ports and the LAG capacity. A number of FIDs may end up using the same PGT base. Unlike with bridges, where membership of a port in a given FID is highly dynamic, an rFID based of a port will just always need to flood to that port. Both the port and the LAG subtables need to be actively maintained. To that end, the CFF rFID family implements fid_port_init and fid_port_fini callbacks, which toggle the necessary bits. Both FID-MID translation and SFMR packing then point into either the port or the LAG subtable, to the block that corresponds to a given port or a given LAG, depending on what port the RIF bound to the rFID uses. As in the previous patch, the way CFF flood mode organizes PGT accesses allows for much more smarts and dynamism. As in the previous patch, we rather aim to keep things simple and static. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/962deb4367585d38250e80c685a34735c0c7f3ad.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit db3e541b59e2a9d7e57b23451a6e59f395aa1258 Author: Petr Machata Date: Tue Nov 28 16:50:48 2023 +0100 mlxsw: spectrum_fid: Add a family for bridge FIDs in CFF flood mode In this patch, add the artifacts for 802.1d and 802.1q FID families that work in CFF flood mode. In CFF flood mode, the way flood vectors are looked up changes: there's a per-FID PGT base, to which a small offset is added depending on type of traffic. Thus each FID occupies a small contiguous block of PGT memory, whereas in the controlled flood mode, flood vectors for a given FID were spread across the PGT. The term "flood table" as used by the spectrum_fid module, borrows from controlled flood mode way of organizing the PGT table. There flood tables were actual tables, contiguous in the PGT. In the CFF flood mode, they are more abstract: a flood table becomes a collection of e.g. all first rows of the per-FID PGT blocks. Nonetheless we retain the nomenclature. FIDs are still configured through the SFMR register, but there are different fields to set under CFF mode: PGT base and profile. Thus register packing gets a dedicated op overload as well. The new organization of PGT makes it possible to treat the PGT as a block of an ordinary memory, allocate and deallocate on demand, and achieve better flexibility. Here instead, we aim to keep the code as close as possible to the previous controlled flood mode, support for which we need to retain for Spectrum-1 and older FW versions anyway. Thus the PGT footprint of the individual families is the same as before, just the internal organization of the per-family PGT region differs. Hence the pgt_size callback is reused between the controlled and CFF flood modes. Since the dummy family has no flood tables in either the CTL mode or in CFF mode, the existing one can be reused for the CFF family array. Users should not notice any changes between the controlled and CFF flood modes. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/ca40b8163e6d6a21f63ef299619acee953cf9519.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit d79b70dbb76001e51a287d0f7430009068e1e55e Author: Petr Machata Date: Tue Nov 28 16:50:47 2023 +0100 mlxsw: spectrum_fid: Initialize flood profiles in CFF mode In CFF flood mode, the way flood vectors are looked up changes: there's a per-FID PGT base, to which a small offset is added depending on type of traffic. Thus each FID occupies a small contiguous block of PGT memory, whereas in the controlled flood mode, flood vectors for a given FID were spread across the PGT. Each FID is associated with one of a handful of profiles. The profile and the traffic type are then used as keys to look up the PGT offset. This offset is then added to the per-FID PGT base. The profile / type / offset mapping needs to be configured by the driver, and is only relevant in CFF flood mode. In this patch, add the SFFP initialization code. Only initialize the one profile currently explicitly used. As follow-up patch add more profiles, this code will pick them up and initialize as well. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/2c4733ed72d439444218969c032acad22cd4ed88.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit af1e696fdf1e588ac0153cc8dff70b5a10a2e220 Author: Petr Machata Date: Tue Nov 28 16:50:46 2023 +0100 mlxsw: spectrum_fid: Add profile_id to flood profile In the CFF mode, flood profiles are identified by a unique numerical identifier. This is used for configuration of FIDs and for configuration of traffic-type to PGT offset rules. In both cases, the numerical identifier serves as a handle for the flood profile. Add the identifier to the flood profile structure. There is currently only one flood profile in use explicitly, the one used for all bridging. Eventually three will be necessary in total: one for bridges, one for rFIDs, one for NVE underlay. A total of four profiles are supported by the HW. Start allocating at 1, because 0 is currently used for underlay NVE flood. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/19ea9c35ba8b522fa5f7eb6fd7bc1b68f0f66b41.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 5e6146e34b9c3b198f1681dc0da40df8bf05bfe4 Author: Petr Machata Date: Tue Nov 28 16:50:45 2023 +0100 mlxsw: spectrum_fid: Add an object to keep flood profiles A flood profile is a mapping from traffic type to an offset at which a flood vector should be looked up. In mlxsw so far, a flood profile was somewhat implicitly represented by flood table array. When the CFF flood mode will be introduced, the flood profile will become more explicit: each will get a number and the profile ID / traffic-type / offset mapping will actually need to be initialized in the hardware. Therefore it is going to be handy to have a structure that keeps all the components that compose a flood profile. Add this structure, currently with just the flood table array bits. In the FID families that flood at all, reference the flood profile instead of just the table array. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/15e113de114d3f41ce3fd2a14a2fa6a1b1d7e8f2.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 315702e09bed79f0c9f8d198f3268a2a1fc4d5ca Author: Petr Machata Date: Tue Nov 28 16:50:44 2023 +0100 mlxsw: spectrum_fid: Add hooks for RSP table maintenance In the CFF flood mode, the driver has to allocate a table within PGT, which holds flood vectors for router subport FIDs. For LAGs, these flood vectors have to obviously be maintained dynamically as port membership in a LAG changes. But even for physical ports, the flood vectors have to be kept valid, and may not contain enabled bits corresponding to non-existent ports. It is therefore not possible to precompute the port part of the RSP table, it has to be maintained as ports come and go due to splits. To support the RSP table maintenance, add to FID ops two new ops: fid_port_init and fid_port_fini, for when a port comes to existence, or joins a lag, and vice versa. Invoke these ops from mlxsw_sp_port_fids_init() and mlxsw_sp_port_fids_fini(), which are called when port is added and removed, respectively. Also add two new hooks for LAG maintenance, mlxsw_sp_fid_port_join_lag() / _leave_lag() which transitively call into the same ops. Later patches will actually add the op implementations themselves, this just adds the scaffolding. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/234398a23540317abb25f74f920a5c8121faecf0.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit a59316ffd92e62f0660a066aa4011378f0c857bd Author: Petr Machata Date: Tue Nov 28 16:50:43 2023 +0100 mlxsw: spectrum_fid: Add a not-UC packet type In CFF flood mode, the rFID family will allocate two tables. One for unknown UC traffic, one for everything else. Add a traffic type for the everything else traffic. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/8fb968b2d1cc37137cd0110c98cdeb625b03ca99.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit f6454316c8b9b247403b7dadc1c5b6e6f5163f0c Author: Petr Machata Date: Tue Nov 28 16:50:42 2023 +0100 mlxsw: spectrum_fid: Add an op for packing SFMR The way SFMR is packed differs between the controlled and CFF flood modes. Add an op to dispatch it dynamically. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/f12fe7879a7086ee86343ee4db02c859f78f0534.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit e917a789594cab0621b19ab33cae298f2bce2ea3 Author: Petr Machata Date: Tue Nov 28 16:50:41 2023 +0100 mlxsw: spectrum_fid: Add an op to get PGT address of a FID In the CFF flood mode, the way to determine a PGT address where a given FID / flood table resides is different from the controlled flood mode, which mlxsw currently uses. Furthermore, this will differ between rFID family and bridge families. The operation therefore needs to be dynamically dispatched. To that end, add an op to FID-family ops. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: Amit Cohen Link: https://lore.kernel.org/r/00e8f6ad79009a9a77a5c95d596ea9574776dc95.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 1686b8d902fd4f1486b21304a62d469fd3713019 Author: Petr Machata Date: Tue Nov 28 16:50:40 2023 +0100 mlxsw: spectrum_fid: Add an op to get PGT allocation size In the CFF flood mode, the PGT allocation size of RFID family will not depend on number of FIDs, but rather number of ports and LAGs. Therefore introduce a FID family operation to calculate the PGT allocation size. The way that size is calculated in the CFF mode depends on calling fallible functions. Thus express the op as returning an int, with the size returned via a pointer argument. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/1174651b7160fcedbef50010ae4b68201112fe6f.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 80638da22e11164e6833f8697ad94136e0a6cdd5 Author: Petr Machata Date: Tue Nov 28 16:50:39 2023 +0100 mlxsw: spectrum_fid: Add an op for flood table initialization In controlled flood mode, for each bridge FID family (i.e., 802.1Q and 802.1D) and packet type (i.e., UUC/MC/BC), the hardware needs to be told which PGT address to use as the base address for the flood table and how to determine the offset from the base for each FID. The above is not needed in CFF mode where each FID has its own flood table instead of the FID family itself. Therefore, create a new FID family operation for the above configuration and only implement it for the 802.1Q and 802.1D families in controlled flood mode. No functional changes intended. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/06f71415eec75811585ec597e1dd101b6dff77e7.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 1d0791168ef7a31780c5f9dc65cbdb044b7e859c Author: Petr Machata Date: Tue Nov 28 16:50:38 2023 +0100 mlxsw: spectrum_fid: Move mlxsw_sp_fid_flood_table_init() up Move the function to the point where it will need to be to be visible for the 802.1d ops. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/aef09e26b0c2dd077531e665d7135b300bdaf0a8.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 17eda112b0d8e282e310f720aed2acda4fbd3317 Author: Petr Machata Date: Tue Nov 28 16:50:37 2023 +0100 mlxsw: spectrum_fid: Make mlxsw_sp_fid_ops.setup return an int This operation will be fallible for rFIDs in CFF mode, which will be introduced in follow-up patches. Have it return an int, and handle the failures in the caller. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/75f1b85c0cb86bea5501fcc8657042f221a78b32.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 82ff7a196d76a04cf437ac0469ac9e9b84110b13 Author: Petr Machata Date: Tue Nov 28 16:50:36 2023 +0100 mlxsw: spectrum_fid: Split a helper out of mlxsw_sp_fid_flood_table_mid() In future patches, for CFF flood mode support, we will need a way to determine a PGT base dynamically, as an op. Therefore, for symmetry, split out a helper, mlxsw_sp_fid_pgt_base_ctl(), that determines a PGT base in the controlled mode as well. Now that the helper is available, use it in mlxsw_sp_fid_flood_table_init() which currently invokes the FID->MID helper to that end. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/fd41c66a1df4df6499d3da34f40e7b9efa15bc3e.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit ab68bd743af8d4e9efd21c570acb7bee65bb47ce Author: Petr Machata Date: Tue Nov 28 16:50:35 2023 +0100 mlxsw: spectrum_fid: Rename FID ops, families, arrays Currently, mlxsw always uses a "controlled" flood mode on all Nvidia Spectrum generations. The following patches will however introduce a possibility to run a "CFF" (for Compressed FID Flooding) mode on newer machines, if the FW supports it. To reflect that, label all FID ops, FID families and FID family arrays with a _ctl suffix. This will make it clearer what is what when the CFF families are introduced in later patches. Keep the dummy family intact. Since the dummy family has no flood tables in either CTL or CFF mode, there are no flood-mode-specific callbacks. Additionally, add a remark at two fields that they are only relevant when flood mode is not CFF. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/96b6da5439bb662fa86e795bbcec9dc3ccfa59fd.1701183892.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 01de00f439ab4989feec68c193c87479d7f1202a Author: Petr Machata Date: Tue Nov 28 16:50:34 2023 +0100 mlxsw: spectrum_fid: Privatize FID families Currently, mlxsw always uses a "controlled" flood mode on all Nvidia Spectrum generations. The following patches will however introduce a possibility to run a "CFF" (for Compressed FID Flooding) mode on newer machines, if the FW supports it. Several operations will differ between how they need to be done in controlled mode vs. CFF mode. Thus the per-FID-family ops will differ between controlled and CFF, thus the FID family array as such will differ depending on whether the mode negotiated with FW is controlled or CFF. The simple approach of having several globally visible arrays for spectrum.c to statically choose from no longer works. Instead privatize all FID initialization and finalization logic, and expose it as ops instead. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/d3fa390d97cf3dbd2f7a28741be69b311e2059e4.1701183891.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 7edce370d87a23e8ed46af5b76a9fef1e341b67b Author: Christian Marangi Date: Tue Nov 28 14:59:28 2023 +0100 net: phy: aquantia: drop wrong endianness conversion for addr and CRC On further testing on BE target with kernel test robot, it was notice that the endianness conversion for addr and CRC in fw_load_memory was wrong. Drop the cpu_to_le32 conversion for addr load as it's not needed. Use get_unaligned_le32 instead of get_unaligned for FW data word load to correctly convert data in the correct order to follow system endian. Also drop the cpu_to_be32 for CRC calculation as it's wrong and would cause different CRC on BE system. The loaded word is swapped internally and MAILBOX calculates the CRC on the swapped word. To correctly calculate the CRC to be later matched with the one from MAILBOX, use an u8 struct and swap the word there to keep the same order on both LE and BE for crc_ccitt_false function. Also add additional comments on how the CRC verification for the loaded section works. CRC is calculated as we load the section and verified with the MAILBOX only after the entire section is loaded to skip additional slowdown by loop the section data again. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311210414.sEJZjlcD-lkp@intel.com/ Fixes: e93984ebc1c8 ("net: phy: aquantia: add firmware load support") Tested-by: Robert Marko # ipq8072 LE device Signed-off-by: Christian Marangi Link: https://lore.kernel.org/r/20231128135928.9841-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski commit cb2f01b856eaef26ba2263f8c3b87ab5e1ea587d Author: Vincent Whitchurch Date: Mon Nov 27 16:31:39 2023 +0100 net: phy: adin: allow control of Fast Link Down Add support to allow Fast Link Down (aka "Enhanced link detection") to be controlled via the ETHTOOL_PHY_FAST_LINK_DOWN tunable. These PHYs have this feature enabled by default. Signed-off-by: Vincent Whitchurch Acked-by: Nuno Sa Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20231127-adin-fld-v1-1-797f6423fd48@axis.com Signed-off-by: Jakub Kicinski commit 127532cd0f060ebc3c4cbca81b6438728ad5896e Author: Heiner Kallweit Date: Mon Nov 27 18:20:11 2023 +0100 r8169: improve handling task scheduling If we know that the task is going to be a no-op, don't even schedule it. And remove the check for netif_running() in the worker function, the check for flag RTL_FLAG_TASK_ENABLED is sufficient. Note that we can't remove the check for flag RTL_FLAG_TASK_ENABLED in the worker function because we have no guarantee when it will be executed. Signed-off-by: Heiner Kallweit Reviewed-by: Przemek Kitszel Link: https://lore.kernel.org/r/c65873a3-7394-4107-99a7-83f20030779c@gmail.com Signed-off-by: Jakub Kicinski commit ee7546390aedf12856ff4a35fa654889130a3fe3 Merge: 6afb936f73cf5 017ca9c9f3105 Author: Jakub Kicinski Date: Wed Nov 29 19:37:23 2023 -0800 Merge branch 'create-a-binding-for-the-marvell-mv88e6xxx-dsa-switches' Linus Walleij says: ==================== Create a binding for the Marvell MV88E6xxx DSA switches The Marvell switches are lacking DT bindings. I need proper schema checking to add LED support to the Marvell switch. Just how it is, it can't go on like this. Some Device Tree fixes are included in the series, these remove the major and most annoying warnings fallout noise: some warnings remain, and these are of more serious nature, such as missing phy-mode. They can be applied individually, or to the networking tree with the rest of the patches. Thanks to Andrew Lunn, Vladimir Oltean and Russell King for excellent review and feedback! This latest version employs special compatibles in the odd ABI device trees. v8: https://lore.kernel.org/r/20231114-marvell-88e6152-wan-led-v8-0-50688741691b@linaro.org v7: https://lore.kernel.org/r/20231024-marvell-88e6152-wan-led-v7-0-2869347697d1@linaro.org v6: https://lore.kernel.org/r/20231024-marvell-88e6152-wan-led-v6-0-993ab0949344@linaro.org v5: https://lore.kernel.org/r/20231023-marvell-88e6152-wan-led-v5-0-0e82952015a7@linaro.org v4: https://lore.kernel.org/r/20231018-marvell-88e6152-wan-led-v4-0-3ee0c67383be@linaro.org v3: https://lore.kernel.org/r/20231016-marvell-88e6152-wan-led-v3-0-38cd449dfb15@linaro.org v2: https://lore.kernel.org/r/20231014-marvell-88e6152-wan-led-v2-0-7fca08b68849@linaro.org v1: https://lore.kernel.org/r/20231013-marvell-88e6152-wan-led-v1-0-0712ba99857c@linaro.org ==================== Link: https://lore.kernel.org/r/20231127-marvell-88e6152-wan-led-v9-0-272934e04681@linaro.org Signed-off-by: Jakub Kicinski commit 017ca9c9f31051bf6118e8557c78fe6471cca6fc Author: Linus Walleij Date: Mon Nov 27 16:43:08 2023 +0100 dt-bindings: marvell: Add Marvell MV88E6060 DSA schema The Marvell MV88E6060 is one of the oldest DSA switches from Marvell, and it has DT bindings used in the wild. Let's define them properly. It is different enough from the rest of the MV88E6xxx switches that it deserves its own binding. Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231127-marvell-88e6152-wan-led-v9-5-272934e04681@linaro.org Signed-off-by: Jakub Kicinski commit 43915b2f4bb9fc0e098fa703d508027b58f442fa Author: Linus Walleij Date: Mon Nov 27 16:43:07 2023 +0100 dt-bindings: marvell: Rewrite MV88E6xxx in schema This is an attempt to rewrite the Marvell MV88E6xxx switch bindings in YAML schema. The current text binding says: WARNING: This binding is currently unstable. Do not program it into a FLASH never to be changed again. Once this binding is stable, this warning will be removed. Well that never happened before we switched to YAML markup, we can't have it like this, what about fixing the mess? Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20231127-marvell-88e6152-wan-led-v9-4-272934e04681@linaro.org Signed-off-by: Jakub Kicinski commit f45c197465ed92c72c1af7ac773ca5050bd9535a Author: Linus Walleij Date: Mon Nov 27 16:43:06 2023 +0100 dt-bindings: net: ethernet-switch: Accept special variants Accept special node naming variants for Marvell switches with special node names as ABI. This is maybe not the prettiest but it avoids special-casing the Marvell MV88E6xxx bindings by copying a lot of generic binding code down into that one binding just to special-case these unfixable nodes. Reviewed-by: Rob Herring Reviewed-by: Andrew Lunn Signed-off-by: Linus Walleij Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20231127-marvell-88e6152-wan-led-v9-3-272934e04681@linaro.org Signed-off-by: Jakub Kicinski commit a6e44f3028e7d582da625a611ef17908844d0e82 Author: Linus Walleij Date: Mon Nov 27 16:43:05 2023 +0100 dt-bindings: net: mvusb: Fix up DSA example When adding a proper schema for the Marvell mx88e6xxx switch, the scripts start complaining about this embedded example: dtschema/dtc warnings/errors: net/marvell,mvusb.example.dtb: switch@0: ports: '#address-cells' is a required property from schema $id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6xxx.yaml# net/marvell,mvusb.example.dtb: switch@0: ports: '#size-cells' is a required property from schema $id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6xxx.yaml# Fix this up by extending the example with those properties in the ports node. While we are at it, rename "ports" to "ethernet-ports" and rename "switch" to "ethernet-switch" as this is recommended practice. Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231127-marvell-88e6152-wan-led-v9-2-272934e04681@linaro.org Signed-off-by: Jakub Kicinski commit fbb7033b76eb0639a6f24d48e59f28407a4dee64 Author: Linus Walleij Date: Mon Nov 27 16:43:04 2023 +0100 dt-bindings: net: dsa: Require ports or ethernet-ports Bindings using dsa.yaml#/$defs/ethernet-ports specify that a DSA switch node need to have a ports or ethernet-ports subnode, and that is actually required, so add requirements using oneOf. Suggested-by: Rob Herring Acked-by: Florian Fainelli Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20231127-marvell-88e6152-wan-led-v9-1-272934e04681@linaro.org Signed-off-by: Jakub Kicinski commit b90ad501715f2feb1b0bf97aa700adb39c78deb3 Author: Michael Ellerman Date: Thu Nov 30 00:19:18 2023 +1100 powerpc/44x: Make ppc44x_idle_init() static The 44x/fsp2_defconfig build fails with: arch/powerpc/platforms/44x/idle.c:30:12: error: no previous prototype for ‘ppc44x_idle_init’ [-Werror=missing-prototypes] 30 | int __init ppc44x_idle_init(void) | ^~~~~~~~~~~~~~~~ Fix it by making ppc44x_idle_init() static. Reviewed-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://msgid.link/20231129131919.2528517-4-mpe@ellerman.id.au commit 10feb8f9612239b665815807e950bcd999a75dd2 Author: Michael Ellerman Date: Thu Nov 30 00:19:17 2023 +1100 powerpc/512x: Fix missing prototype warnings The mpc512x_defconfig build fails with: arch/powerpc/platforms/512x/mpc5121_ads_cpld.c:142:1: error: no previous prototype for ‘mpc5121_ads_cpld_map’ [-Werror=missing-prototypes] 142 | mpc5121_ads_cpld_map(void) | ^~~~~~~~~~~~~~~~~~~~ arch/powerpc/platforms/512x/mpc5121_ads_cpld.c:157:1: error: no previous prototype for ‘mpc5121_ads_cpld_pic_init’ [-Werror=missing-prototypes] 157 | mpc5121_ads_cpld_pic_init(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ There are prototypes for these functions but the header they are in is not included by mpc5121_ads_cpld.c. Include it to fix the build error. Reviewed-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://msgid.link/20231129131919.2528517-3-mpe@ellerman.id.au commit 24afc61990de29dd47be7642c196a173f6cc21fc Author: Michael Ellerman Date: Thu Nov 30 00:19:16 2023 +1100 powerpc/512x: Make pdm360ng_init() static The mpc512x_defconfig config fails with: arch/powerpc/platforms/512x/pdm360ng.c:104:13: error: no previous prototype for ‘pdm360ng_init’ [-Werror=missing-prototypes] 104 | void __init pdm360ng_init(void) | ^~~~~~~~~~~~~ Fix it by making pdm360ng_init() static. Reviewed-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://msgid.link/20231129131919.2528517-2-mpe@ellerman.id.au commit 360f051d82ee0cc580edfffe9e8c0b93011ab86d Author: Michael Ellerman Date: Thu Nov 30 00:19:15 2023 +1100 powerpc/suspend: Add prototype for do_after_copyback() With HIBERNATION=y the build breaks with: arch/powerpc/kernel/swsusp_64.c:14:6: error: no previous prototype for ‘do_after_copyback’ [-Werror=missing-prototypes] 14 | void do_after_copyback(void) | ^~~~~~~~~~~~~~~~~ do_after_copyback() is only called from asm, so there is no prototype, nor any header where it makes sense to place one. Just add a prototype in the C file to fix the build error. Reviewed-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://msgid.link/20231129131919.2528517-1-mpe@ellerman.id.au commit 6afb936f73cf54e2afe966594fa3fd566d345ed8 Merge: 987b71f86c69f a115b9279f489 Author: Jakub Kicinski Date: Wed Nov 29 16:07:02 2023 -0800 Merge branch 'tools-ynl-fixes-for-the-page-pool-sample-and-the-generation-process' Jakub Kicinski says: ==================== tools: ynl: fixes for the page-pool sample and the generation process Minor fixes to the new sample and the Makefiles. ==================== Link: https://lore.kernel.org/r/20231129193622.2912353-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit a115b9279f4897b8afdfbc30035b1382c047fc26 Author: Jakub Kicinski Date: Wed Nov 29 11:36:22 2023 -0800 tools: ynl: don't skip regeneration from make targets Commit 2b7ac0c87d98 ("tools: ynl-gen: don't touch the output file if content is the same") is working too well. It was added so that ynl-regen -f doesn't make us rebuild half of the kernel, if there are no actual changes in any generated code. When ynl-gen-c is called by make, however, we're better off trusting make's tracking and overwrite the file. Otherwise if output is identical we won't update file timestamps and make will retry code gen on every invocation. Link: https://lore.kernel.org/r/20231129193622.2912353-5-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 9cf9b57082411ad42d6d12c7b857e60add673877 Author: Jakub Kicinski Date: Wed Nov 29 11:36:21 2023 -0800 tools: ynl: order building samples after generated code Parallel builds of ynl: make -C tools/net/ynl/ -j 4 don't work correctly right now. samples get handled before generated, so build of samples does not notice that protos.a has changed. Order samples to be last. Link: https://lore.kernel.org/r/20231129193622.2912353-4-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 929003723f6d1998155bf0472f97d6c75c3db93f Author: Jakub Kicinski Date: Wed Nov 29 11:36:20 2023 -0800 tools: ynl: make sure we use local headers for page-pool Building samples generates the following warning: In file included from page-pool.c:11: generated/netdev-user.h:21:45: warning: ‘enum netdev_xdp_rx_metadata’ declared inside parameter list will not be visible outside of this definition or declaration 21 | const char *netdev_xdp_rx_metadata_str(enum netdev_xdp_rx_metadata value); | ^~~~~~~~~~~~~~~~~~~~~~ Our magic way of including uAPI headers assumes the sample name matches the family name. We need to copy the flags over. Fixes: 637567e4a3ef ("tools: ynl: add sample for getting page-pool information") Link: https://lore.kernel.org/r/20231129193622.2912353-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ee1eb9de81dbdbf078df659062e4df256a009627 Author: Jakub Kicinski Date: Wed Nov 29 11:36:19 2023 -0800 tools: ynl: fix build of the page-pool sample The name of the "destroyed" field in the reply was not changed in the sample after we started calling it "detach_time". page-pool.c: In function ‘main’: page-pool.c:84:33: error: ‘struct ’ has no member named ‘destroyed’ 84 | if (pp->_present.destroyed) | ^ Fixes: 637567e4a3ef ("tools: ynl: add sample for getting page-pool information") Link: https://lore.kernel.org/r/20231129193622.2912353-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 698e19da2914a0021a088b2b5d101d1854862315 Author: Zhanjun Dong Date: Mon Nov 13 14:49:53 2023 -0800 drm/i915: Skip pxp init if gt is wedged The gt wedged could be triggered by missing guc firmware file, HW not working, etc. Once triggered, it means all gt usage is dead, therefore we can't enable pxp under this fatal error condition. v2: Updated commit message. v3: Updated return code check. Signed-off-by: Zhanjun Dong Reviewed-by: Alan Previn Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20231113224953.378534-1-zhanjun.dong@intel.com commit b101d08451de6eaebd1a840e4885ce7ce73656ad Author: Yuran Pereira Date: Fri Nov 17 02:22:00 2023 +0530 drm/nouveau: Removes unnecessary args check in nouveau_uvmm_sm_prepare Checking `args` after calling `op_map_prepare` is unnecessary since if `op_map_prepare` was to be called with NULL args, it would lead to a NULL pointer dereference, thus never hitting that check. Hence remove the check and add a note to remind users of this function to ensure that args != NULL when calling this function for a map operation as it was suggested by Danilo [1]. [1] https://lore.kernel.org/lkml/6a1ebcef-bade-45a0-9bd9-c05f0226eb88@redhat.com Suggested-by: Danilo Krummrich Signed-off-by: Yuran Pereira Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/GV1PR10MB65637F4BAABFE2D8E261E1DCE8B0A@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM commit 0eec708ec3c2cb4076cd239605eb6d51e7c23e77 Author: Alan Previn Date: Wed Nov 22 11:15:23 2023 -0800 drm/i915/pxp: Add drm_dbgs for critical PXP events. Debugging PXP issues can't even begin without understanding precedding sequence of important events. Add drm_dbg into the most important PXP events. v5 : - rebase. v4 : - rebase. v3 : - move gt_dbg to after mutex block in function i915_gsc_proxy_component_bind. (Vivaik) v2 : - remove __func__ since drm_dbg covers that (Jani). - add timeout dbg of the restart from front-end (Alan). Signed-off-by: Alan Previn Reviewed-by: Vivaik Balasubrawmanian Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20231122191523.58379-1-alan.previn.teres.alexis@intel.com commit b5145153a7f33e33f729ee67a11a8901a5609064 Merge: 40d0eb0259ae7 60523115c1b10 Author: Alexei Starovoitov Date: Wed Nov 29 14:59:41 2023 -0800 Merge branch 'xsk-tx-metadata' Stanislav Fomichev says: ==================== xsk: TX metadata This series implements initial TX metadata (offloads) for AF_XDP. See patch #2 for the main implementation and mlx5/stmmac ones for the example on how to consume the metadata on the device side. Starting with two types of offloads: - request TX timestamp (and write it back into the metadata area) - request TX checksum offload Changes since v5: - preserve xsk_tx_metadata flags across tx and completion by moving them out of 'request' union (Jesper) - fix xdp_metadata checksum failure in big endian (Alexei) - add SPDX to xdp-rx-metadata.rst (Simon) v5: https://lore.kernel.org/bpf/20231102225837.1141915-1-sdf@google.com/ Performance (mlx5): I've implemented a small xskgen tool to try to saturate single tx queue: https://github.com/fomichev/xskgen/tree/master Here are the performance numbers with some analysis. 1. Baseline. Running with commit eb62e6aef940 ("Merge branch 'bpf: Support bpf_get_func_ip helper in uprobes'"), nothing from this series: - with 1400 bytes of payload: 98 gbps, 8 mpps ./xskgen -s 1400 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 116960000000 bits, took 1.189130 sec, 98.357623 gbps 8.409509 mpps - with 200 bytes of payload: 49 gbps, 23 mpps ./xskgen -s 200 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000064 packets 20960134144 bits, took 0.422235 sec, 49.640921 gbps 23.683645 mpps 2. Adding single commit that supports reserving tx_metadata_len changes nothing numbers-wise. - baseline for 1400 ./xskgen -s 1400 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 116960000000 bits, took 1.189247 sec, 98.347946 gbps 8.408682 mpps - baseline for 200 ./xskgen -s 200 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 20960000000 bits, took 0.421248 sec, 49.756913 gbps 23.738985 mpps 3. Adding -M flag causes xskgen to reserve the metadata and fill it, but doesn't set XDP_TX_METADATA descriptor option. - new baseline for 1400 (with only filling the metadata) ./xskgen -M -s 1400 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 116960000000 bits, took 1.188767 sec, 98.387657 gbps 8.412077 mpps - new baseline for 200 (with only filling the metadata) ./xskgen -M -s 200 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 20960000000 bits, took 0.410213 sec, 51.095407 gbps 24.377579 mpps (the numbers go sligtly up here, not really sure why, maybe some cache-related side-effects? 4. Next, I'm running the same test but with the commit that adds actual general infra to parse XDP_TX_METADATA (but no driver support). Essentially applying "xsk: add TX timestamp and TX checksum offload support" from this series. Numbers are the same. - fill metadata for 1400 ./xskgen -M -s 1400 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 116960000000 bits, took 1.188430 sec, 98.415557 gbps 8.414463 mpps - fill metadata for 200 ./xskgen -M -s 200 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 20960000000 bits, took 0.411559 sec, 50.928299 gbps 24.297853 mpps - request metadata for 1400 ./xskgen -m -s 1400 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 116960000000 bits, took 1.188723 sec, 98.391299 gbps 8.412389 mpps - request metadata for 200 ./xskgen -m -s 200 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000064 packets 20960134144 bits, took 0.411240 sec, 50.968131 gbps 24.316856 mpps 5. Now, for the most interesting part, I'm adding mlx5 driver support. The mpps for 200 bytes case goes down from 23 mpps to 19 mpps, but _only_ when I enable the metadata. This looks like a side effect of me pushing extra metadata pointer via mlx5e_xdpi_fifo_push. Hence, this part is wrapped into 'if (xp_tx_metadata_enabled)' to not affect the existing non-metadata use-cases. Since this is not regressing existing workloads, I'm not spending any time trying to optimize it more (and leaving it up to mlx owners to purse if they see any good way to do it). - same baseline ./xskgen -s 1400 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 116960000000 bits, took 1.189434 sec, 98.332484 gbps 8.407360 mpps ./xskgen -s 200 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000128 packets 20960268288 bits, took 0.425254 sec, 49.288821 gbps 23.515659 mpps - fill metadata for 1400 ./xskgen -M -s 1400 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 116960000000 bits, took 1.189528 sec, 98.324714 gbps 8.406696 mpps - fill metadata for 200 ./xskgen -M -s 200 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000128 packets 20960268288 bits, took 0.519085 sec, 40.379260 gbps 19.264914 mpps - request metadata for 1400 ./xskgen -m -s 1400 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000000 packets 116960000000 bits, took 1.189329 sec, 98.341165 gbps 8.408102 mpps - request metadata for 200 ./xskgen -m -s 200 -b eth3 10:70:fd:48:10:77 10:70:fd:48:10:87 fe80::1270:fdff:fe48:1077 fe80::1270:fdff:fe48:1087 1 1 sent 10000128 packets 20960268288 bits, took 0.519929 sec, 40.313713 gbps 19.233642 mpps Acked-by: Magnus Karlsson Acked-by: Jakub Kicinski ==================== Link: https://lore.kernel.org/r/20231127190319.1190813-1-sdf@google.com Signed-off-by: Alexei Starovoitov commit 60523115c1b10c8855492d84c1ba88af452e221c Author: Stanislav Fomichev Date: Mon Nov 27 11:03:19 2023 -0800 selftests/bpf: Add TX side to xdp_hw_metadata When we get a packet on port 9091, we swap src/dst and send it out. At this point we also request the timestamp and checksum offloads. Checksum offload is verified by looking at the tcpdump on the other side. The tool prints pseudo-header csum and the final one it expects. The final checksum actually matches the incoming packets checksum because we only flip the src/dst and don't change the payload. Some other related changes: - switched to zerocopy mode by default; new flag can be used to force old behavior - request fixed tx_metadata_len headroom - some other small fixes (umem size, fill idx+i, etc) mvbz3:~# ./xdp_hw_metadata eth3 ... xsk_ring_cons__peek: 1 0x19546f8: rx_desc[0]->addr=80100 addr=80100 comp_addr=80100 rx_hash: 0x80B7EA8B with RSS type:0x2A rx_timestamp: 1697580171852147395 (sec:1697580171.8521) HW RX-time: 1697580171852147395 (sec:1697580171.8521), delta to User RX-time sec:0.2797 (279673.082 usec) XDP RX-time: 1697580172131699047 (sec:1697580172.1317), delta to User RX-time sec:0.0001 (121.430 usec) 0x19546f8: ping-pong with csum=3b8e (want d862) csum_start=54 csum_offset=6 0x19546f8: complete tx idx=0 addr=8 tx_timestamp: 1697580172056756493 (sec:1697580172.0568) HW TX-complete-time: 1697580172056756493 (sec:1697580172.0568), delta to User TX-complete-time sec:0.0852 (85175.537 usec) XDP RX-time: 1697580172131699047 (sec:1697580172.1317), delta to User TX-complete-time sec:0.0102 (10232.983 usec) HW RX-time: 1697580171852147395 (sec:1697580171.8521), delta to HW TX-complete-time sec:0.2046 (204609.098 usec) 0x19546f8: complete rx idx=128 addr=80100 mvbz4:~# nc -Nu -q1 ${MVBZ3_LINK_LOCAL_IP}%eth3 9091 mvbz4:~# tcpdump -vvx -i eth3 udp tcpdump: listening on eth3, link-type EN10MB (Ethernet), snapshot length 262144 bytes 12:26:09.301074 IP6 (flowlabel 0x35fa5, hlim 127, next-header UDP (17) payload length: 11) fe80::1270:fdff:fe48:1087.55807 > fe80::1270:fdff:fe48:1077.9091: [bad udp cksum 0x3b8e -> 0xde7e!] UDP, length 3 0x0000: 6003 5fa5 000b 117f fe80 0000 0000 0000 0x0010: 1270 fdff fe48 1087 fe80 0000 0000 0000 0x0020: 1270 fdff fe48 1077 d9ff 2383 000b 3b8e 0x0030: 7864 70 12:26:09.301976 IP6 (flowlabel 0x35fa5, hlim 127, next-header UDP (17) payload length: 11) fe80::1270:fdff:fe48:1077.9091 > fe80::1270:fdff:fe48:1087.55807: [udp sum ok] UDP, length 3 0x0000: 6003 5fa5 000b 117f fe80 0000 0000 0000 0x0010: 1270 fdff fe48 1077 fe80 0000 0000 0000 0x0020: 1270 fdff fe48 1087 2383 d9ff 000b de7e 0x0030: 7864 70 Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-14-sdf@google.com Signed-off-by: Alexei Starovoitov commit 12b4b7963d3cca253db3c31aa7611b988699e30f Author: Stanislav Fomichev Date: Mon Nov 27 11:03:18 2023 -0800 selftests/bpf: Convert xdp_hw_metadata to XDP_USE_NEED_WAKEUP This is the recommended way to run AF_XDP, so let's use it in the test. Also, some unrelated changes to now blow up the log too much: - change default mode to zerocopy and add -c to use copy mode - small fixes for the flags/sizes/prints - add print_tstamp_delta to print timestamp + reference Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-13-sdf@google.com Signed-off-by: Alexei Starovoitov commit 40808a237d9c8fcaa3eaeefe2ac59e4733907478 Author: Stanislav Fomichev Date: Mon Nov 27 11:03:17 2023 -0800 selftests/bpf: Add TX side to xdp_metadata Request TX timestamp and make sure it's not empty. Request TX checksum offload (SW-only) and make sure it's resolved to the correct one. Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-12-sdf@google.com Signed-off-by: Alexei Starovoitov commit f6642de0c3e94d3ef6f44e127d11fcf4138873f7 Author: Stanislav Fomichev Date: Mon Nov 27 11:03:16 2023 -0800 selftests/bpf: Add csum helpers Checksum helpers will be used to calculate pseudo-header checksum in AF_XDP metadata selftests. The helpers are mirroring existing kernel ones: - csum_tcpudp_magic : IPv4 pseudo header csum - csum_ipv6_magic : IPv6 pseudo header csum - csum_fold : fold csum and do one's complement Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-11-sdf@google.com Signed-off-by: Alexei Starovoitov commit df3ed0003ec4994ce8ed4818c435c481281df89e Author: Stanislav Fomichev Date: Mon Nov 27 11:03:15 2023 -0800 selftests/xsk: Support tx_metadata_len Add new config field and propagate to UMEM registration setsockopt. Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-10-sdf@google.com Signed-off-by: Alexei Starovoitov commit 11614723af26e7c32fcb704d8f30fdf60c1122dc Author: Stanislav Fomichev Date: Mon Nov 27 11:03:14 2023 -0800 xsk: Add option to calculate TX checksum in SW For XDP_COPY mode, add a UMEM option XDP_UMEM_TX_SW_CSUM to call skb_checksum_help in transmit path. Might be useful to debugging issues with real hardware. I also use this mode in the selftests. Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-9-sdf@google.com Signed-off-by: Alexei Starovoitov commit ce59f9686e0eca19431571c7403394a6c36371e2 Author: Stanislav Fomichev Date: Mon Nov 27 11:03:13 2023 -0800 xsk: Validate xsk_tx_metadata flags Accept only the flags that the kernel knows about to make sure we can extend this field in the future. Note that only in XDP_COPY mode we propagate the error signal back to the user (via sendmsg). For zerocopy mode we silently skip the metadata for the descriptors that have wrong flags (since we process the descriptors deep in the driver). Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-8-sdf@google.com Signed-off-by: Alexei Starovoitov commit 9620e956d5b592d305728144931e89d780a598aa Author: Stanislav Fomichev Date: Mon Nov 27 11:03:12 2023 -0800 xsk: Document tx_metadata_len layout - how to use - how to query features - pointers to the examples Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-7-sdf@google.com Signed-off-by: Alexei Starovoitov commit 1347b419318d6afa1c86d7865d82ca0a6cdf30ce Author: Song Yoong Siang Date: Mon Nov 27 11:03:11 2023 -0800 net: stmmac: Add Tx HWTS support to XDP ZC This patch enables transmit hardware timestamp support to XDP zero copy via XDP Tx metadata framework. This patchset is tested with tools/testing/selftests/bpf/xdp_hw_metadata on Intel Tiger Lake platform. Below are the test steps and results. Command on DUT: sudo ./xdp_hw_metadata sudo hwstamp_ctl -i -t 1 -r 1 Command on Link Partner: echo -n xdp | nc -u -q1 9091 Result: xsk_ring_cons__peek: 1 0x55bbbf08b6d0: rx_desc[2]->addr=8c100 addr=8c100 comp_addr=8c100 EoP No rx_hash err=-95 rx_timestamp: 1677762688429141540 (sec:1677762688.4291) HW RX-time: 1677762688429141540 (sec:1677762688.4291) delta to User RX-time sec:0.0003 (250.665 usec) XDP RX-time: 1677762688429375597 (sec:1677762688.4294) delta to User RX-time sec:0.0000 (16.608 usec) 0x55bbbf08b6d0: ping-pong with csum=561c (want f488) csum_start=34 csum_offset=6 0x55bbbf08b6d0: complete tx idx=2 addr=2008 tx_timestamp: 1677762688431127273 (sec:1677762688.4311) HW TX-complete-time: 1677762688431127273 (sec:1677762688.4311) delta to User TX-complete-time sec:0.0083 (8331.655 usec) XDP RX-time: 1677762688429375597 (sec:1677762688.4294) delta to User TX-complete-time sec:0.0101 (10083.331 usec) HW RX-time: 1677762688429141540 (sec:1677762688.4291) delta to HW TX-complete-time sec:0.0020 (1985.733 usec) 0x55bbbf08b6d0: complete rx idx=130 addr=8c100 Signed-off-by: Song Yoong Siang Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-6-sdf@google.com Signed-off-by: Alexei Starovoitov commit ec706a860eba99bf934d59f74b5db90af44e882e Author: Stanislav Fomichev Date: Mon Nov 27 11:03:10 2023 -0800 net/mlx5e: Implement AF_XDP TX timestamp and checksum offload TX timestamp: - requires passing clock, not sure I'm passing the correct one (from cq->mdev), but the timestamp value looks convincing TX checksum: - looks like device does packet parsing (and doesn't accept custom start/offset), so I'm ignoring user offsets Cc: Saeed Mahameed Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127190319.1190813-5-sdf@google.com Signed-off-by: Alexei Starovoitov commit 9276009d35d3f65e083b95d30a4f967baaae0fc6 Author: Stanislav Fomichev Date: Mon Nov 27 11:03:09 2023 -0800 tools: ynl: Print xsk-features from the sample In a similar fashion we do for the other bit masks. Fix mask parsing (>= vs >) while we are it. Signed-off-by: Stanislav Fomichev Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/r/20231127190319.1190813-4-sdf@google.com Signed-off-by: Alexei Starovoitov commit 48eb03dd26304c24f03bdbb9382e89c8564e71df Author: Stanislav Fomichev Date: Mon Nov 27 11:03:08 2023 -0800 xsk: Add TX timestamp and TX checksum offload support This change actually defines the (initial) metadata layout that should be used by AF_XDP userspace (xsk_tx_metadata). The first field is flags which requests appropriate offloads, followed by the offload-specific fields. The supported per-device offloads are exported via netlink (new xsk-flags). The offloads themselves are still implemented in a bit of a framework-y fashion that's left from my initial kfunc attempt. I'm introducing new xsk_tx_metadata_ops which drivers are supposed to implement. The drivers are also supposed to call xsk_tx_metadata_request/xsk_tx_metadata_complete in the right places. Since xsk_tx_metadata_{request,_complete} are static inline, we don't incur any extra overhead doing indirect calls. The benefit of this scheme is as follows: - keeps all metadata layout parsing away from driver code - makes it easy to grep and see which drivers implement what - don't need any extra flags to maintain to keep track of what offloads are implemented; if the callback is implemented - the offload is supported (used by netlink reporting code) Two offloads are defined right now: 1. XDP_TXMD_FLAGS_CHECKSUM: skb-style csum_start+csum_offset 2. XDP_TXMD_FLAGS_TIMESTAMP: writes TX timestamp back into metadata area upon completion (tx_timestamp field) XDP_TXMD_FLAGS_TIMESTAMP is also implemented for XDP_COPY mode: it writes SW timestamp from the skb destructor (note I'm reusing hwtstamps to pass metadata pointer). The struct is forward-compatible and can be extended in the future by appending more fields. Reviewed-by: Song Yoong Siang Signed-off-by: Stanislav Fomichev Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20231127190319.1190813-3-sdf@google.com Signed-off-by: Alexei Starovoitov commit 341ac980eab90ac1f6c22ee9f9da83ed9604d899 Author: Stanislav Fomichev Date: Mon Nov 27 11:03:07 2023 -0800 xsk: Support tx_metadata_len For zerocopy mode, tx_desc->addr can point to an arbitrary offset and carry some TX metadata in the headroom. For copy mode, there is no way currently to populate skb metadata. Introduce new tx_metadata_len umem config option that indicates how many bytes to treat as metadata. Metadata bytes come prior to tx_desc address (same as in RX case). The size of the metadata has mostly the same constraints as XDP: - less than 256 bytes - 8-byte aligned (compared to 4-byte alignment on xdp, due to 8-byte timestamp in the completion) - non-zero This data is not interpreted in any way right now. Reviewed-by: Song Yoong Siang Signed-off-by: Stanislav Fomichev Reviewed-by: Jakub Kicinski Link: https://lore.kernel.org/r/20231127190319.1190813-2-sdf@google.com Signed-off-by: Alexei Starovoitov commit e29f5d0c3c7c055b36ef55f9e92100450b2506a3 Author: Sean Christopherson Date: Tue Aug 15 15:00:30 2023 -0700 KVM: selftests: Remove x86's so called "MMIO warning" test Remove x86's mmio_warning_test, as it is unnecessarily complex (there's no reason to fork, spawn threads, initialize srand(), etc..), unnecessarily restrictive (triggering triple fault is not unique to Intel CPUs without unrestricted guest), and provides no meaningful coverage beyond what basic fuzzing can achieve (running a vCPU with garbage is fuzzing's bread and butter). That the test has *all* of the above flaws is not coincidental, as the code was copy+pasted almost verbatim from the syzkaller reproducer that originally found the KVM bug (which has long since been fixed). Cc: Michal Luczaj Link: https://groups.google.com/g/syzkaller/c/lHfau8E3SOE Link: https://lore.kernel.org/r/20230815220030.560372-1-seanjc@google.com Signed-off-by: Sean Christopherson commit 1b78d474ce4ecbf15a4a8b08994b8ed8ceec0dab Author: Sean Christopherson Date: Tue Nov 7 17:09:53 2023 -0800 KVM: selftests: Add logic to detect if ioctl() failed because VM was killed Add yet another macro to the VM/vCPU ioctl() framework to detect when an ioctl() failed because KVM killed/bugged the VM, i.e. when there was nothing wrong with the ioctl() itself. If KVM kills a VM, e.g. by way of a failed KVM_BUG_ON(), all subsequent VM and vCPU ioctl()s will fail with -EIO, which can be quite misleading and ultimately waste user/developer time. Use KVM_CHECK_EXTENSION on KVM_CAP_USER_MEMORY to detect if the VM is dead and/or bug, as KVM doesn't provide a dedicated ioctl(). Using a heuristic is obviously less than ideal, but practically speaking the logic is bulletproof barring a KVM change, and any such change would arguably break userspace, e.g. if KVM returns something other than -EIO. Without the detection, tearing down a bugged VM yields a cryptic failure when deleting memslots: ==== Test Assertion Failure ==== lib/kvm_util.c:689: !ret pid=45131 tid=45131 errno=5 - Input/output error 1 0x00000000004036c3: __vm_mem_region_delete at kvm_util.c:689 2 0x00000000004042f0: kvm_vm_free at kvm_util.c:724 (discriminator 12) 3 0x0000000000402929: race_sync_regs at sync_regs_test.c:193 4 0x0000000000401cab: main at sync_regs_test.c:334 (discriminator 6) 5 0x0000000000416f13: __libc_start_call_main at libc-start.o:? 6 0x000000000041855f: __libc_start_main_impl at ??:? 7 0x0000000000401d40: _start at ??:? KVM_SET_USER_MEMORY_REGION failed, rc: -1 errno: 5 (Input/output error) Which morphs into a more pointed error message with the detection: ==== Test Assertion Failure ==== lib/kvm_util.c:689: false pid=80347 tid=80347 errno=5 - Input/output error 1 0x00000000004039ab: __vm_mem_region_delete at kvm_util.c:689 (discriminator 5) 2 0x0000000000404660: kvm_vm_free at kvm_util.c:724 (discriminator 12) 3 0x0000000000402ac9: race_sync_regs at sync_regs_test.c:193 4 0x0000000000401cb7: main at sync_regs_test.c:334 (discriminator 6) 5 0x0000000000418263: __libc_start_call_main at libc-start.o:? 6 0x00000000004198af: __libc_start_main_impl at ??:? 7 0x0000000000401d90: _start at ??:? KVM killed/bugged the VM, check the kernel log for clues Suggested-by: Michal Luczaj Cc: Oliver Upton Cc: Colton Lewis Link: https://lore.kernel.org/r/20231108010953.560824-3-seanjc@google.com Signed-off-by: Sean Christopherson commit 6542a00369284c951185be8fa2ed45cf423cce06 Author: Sean Christopherson Date: Tue Nov 7 17:09:52 2023 -0800 KVM: selftests: Drop the single-underscore ioctl() helpers Drop _kvm_ioctl(), _vm_ioctl(), and _vcpu_ioctl(), as they are no longer used by anything other than the no-underscores variants (and may have never been used directly). The single-underscore variants were never intended to be a "feature", they were a stopgap of sorts to ease the conversion to pretty printing ioctl() names when reporting errors. Opportunistically add a comment explaining when to use __KVM_IOCTL_ERROR() versus KVM_IOCTL_ERROR(). The single-underscore macros were subtly ensuring that the name of the ioctl() was printed on error, i.e. it's all too easy to overlook the fact that using __KVM_IOCTL_ERROR() is intentional. Link: https://lore.kernel.org/r/20231108010953.560824-2-seanjc@google.com Signed-off-by: Sean Christopherson commit 562f33836f519a235e5c5e71bcc723ab1faccd2f Author: Clint Taylor Date: Tue Nov 28 11:03:29 2023 -0800 drm/i915/dgfx: DGFX uses direct VBT pin mapping DDC pin mapping for DGFX cards uses direct VBT pin mapping Cc: Lucas De Marchi Cc: Matt Roper Signed-off-by: Clint Taylor Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20231128190329.1335562-1-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi commit 0277022a77a56f8251e8cf8d25e9308478e79ea5 Author: Sean Christopherson Date: Wed Oct 18 12:23:25 2023 -0700 KVM: x86/mmu: Declare flush_remote_tlbs{_range}() hooks iff HYPERV!=n Declare the kvm_x86_ops hooks used to wire up paravirt TLB flushes when running under Hyper-V if and only if CONFIG_HYPERV!=n. Wrapping yet more code with IS_ENABLED(CONFIG_HYPERV) eliminates a handful of conditional branches, and makes it super obvious why the hooks *might* be valid. Cc: Vitaly Kuznetsov Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/20231018192325.1893896-1-seanjc@google.com Signed-off-by: Sean Christopherson commit fc6543bb55d4077c44e577c321bbf158446c8000 Author: David Woodhouse Date: Sat Oct 28 20:34:53 2023 +0100 KVM: selftests: add -MP to CFLAGS Using -MD without -MP causes build failures when a header file is deleted or moved. With -MP, the compiler will emit phony targets for the header files it lists as dependencies, and the Makefiles won't refuse to attempt to rebuild a C unit which no longer includes the deleted header. Signed-off-by: David Woodhouse Link: https://lore.kernel.org/r/9fc8b5395321abbfcaf5d78477a9a7cd350b08e4.camel@infradead.org Signed-off-by: Sean Christopherson commit 36fd9969fa53c40e8a58192714d9a3624cbe04e3 Author: Lijo Lazar Date: Tue Nov 28 16:47:14 2023 +0530 drm/amdgpu: Use another offset for GC 9.4.3 remap The legacy region at 0x7F000 maps to valid registers in GC 9.4.3 SOCs. Use 0x1A000 offset instead as MMIO register remap region. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 92e508eaf337d465f0574dda18d805bb4df138bc Author: Lijo Lazar Date: Sat Oct 7 15:41:27 2023 +0530 drm/amdgpu: Read aquavanjaram XGMI register state Add support to read state of XGMI links in aquavanjaram SOC. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 081a6eda2b25092e1466f09eb46d829488b75730 Author: Lijo Lazar Date: Fri Oct 6 14:20:45 2023 +0530 drm/amdgpu: Read aquavanjaram PCIE register state Add support to read aqua vanjaram PCIE register state Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit af39e6f4d8032b101907cc2ac12a21a778da568d Author: Lijo Lazar Date: Fri Oct 6 13:49:03 2023 +0530 drm/amdgpu: Add reg_state sysfs attribute Add reg_state attribute to fetch the register snapshot of different IPs like XGMI, WAFL,PCIE and USR. To get a snapshot for a particular IP 1) Open the sysfs file 2) Seek to the offset as defined in amdgpu_sysfs_reg_offset 3) Read Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9a5095e785c38ab8d9f3d91f4ee76f4f73ec4adc Author: Alex Deucher Date: Wed Sep 13 12:00:44 2023 -0400 drm/amdgpu: add amdgpu_reg_state.h This header defines the reg state structures exposed via sysfs for umr debugging. v2: add content type Signed-off-by: Alex Deucher Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang commit 70378005378a23fbfe0d4c44dac4187cad07da94 Author: Aric Cyr Date: Sun Nov 19 23:02:26 2023 -0500 drm/amd/display: Promote DAL to 3.2.262 This version brings along following fixes: - Add DSC granular throughput adjustment - Allow DTBCLK disable for DCN35 - Update Fixed VS/PE Retimer Sequence - Block dcn315 dynamic crb allocation when unintended - Update dcn315 lpddr pstate latency - Fix some HostVM parameters in DML Reviewed-by: Tom Chung Acked-by: Tom Chung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 33a6e409165cd23d1dc580031cb749550ca18517 Author: Taimur Hassan Date: Fri Nov 10 10:24:20 2023 -0500 drm/amd/display: Fix some HostVM parameters in DML [Why] A number of DML parameters related to HostVM were either missing or being set incorrectly, which may cause inaccuracies in calculating margins and determining BW limitations. [How] Correct these values where needed and populate the missing values. Cc: stable@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Taimur Hassan Signed-off-by: Roman Li Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5290ed0a8b261115fe4965a6d95a642b0742d159 Author: Ilya Bakoulin Date: Thu Nov 16 15:28:53 2023 -0500 drm/amd/display: Add DSC granular throughput adjustment [Why/How] Update DSC DPCD parsing to take granular throughput adjustment into consideration. Reviewed-by: Wenjing Liu Acked-by: Tom Chung Signed-off-by: Ilya Bakoulin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d581ceab26a1be9fe94befe2604cbe99eadf1acc Author: ZhenGuo Yin Date: Mon Nov 6 18:07:51 2023 +0800 drm/amdkfd: Free gang_ctx_bo and wptr_bo in pqm_uninit [Why] Memory leaks of gang_ctx_bo and wptr_bo. [How] Free gang_ctx_bo and wptr_bo in pqm_uninit. v2: add a common function pqm_clean_queue_resource to free queue's resources. v3: reset pdd->pqd.num_gws when destorying GWS queue. Reviewed-by: Felix Kuehling Signed-off-by: ZhenGuo Yin Signed-off-by: Alex Deucher commit ca0ad76089a8171d7a075e50b7beecf092f8fd0c Author: Candice Li Date: Fri Nov 24 09:33:47 2023 +0800 drm/amdgpu: Update EEPROM I2C address for smu v13_0_0 Check smu v13_0_0 SKU type to select EEPROM I2C address. Signed-off-by: Candice Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 061a5bf210cd7b941627092309ff6035a017cda3 Author: Nicholas Kazlauskas Date: Tue Nov 14 11:22:09 2023 -0500 drm/amd/display: Allow DTBCLK disable for DCN35 [Why] DTBCLK is enabled on idle and it will burn power. [How] There's a few issues here: - Always enabling DTBCLK on clock manager init - Setting refclk when DTBCLK is supposed to be disabled - Not applying the correct calculated version refclk, but instead the base value which might be zero On dtbclk_en change we'll message PMFW to enable or disable the clock accordingly. The DTBDTO will be then based on refclk, but it will be set to the default fixed value if there was nothing calculated in DML despite the clock being considered enabled. Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 1919fd6bb09f61015549b9e5a5af1541b41f45d9 Author: Anthony Koo Date: Sat Nov 18 14:39:40 2023 -0500 drm/amd/display: [FW Promotion] Release 0.0.194.0 - Add a new dmub command in enum dmub_cmd_cab_type Reviewed-by: Tom Chung Acked-by: Tom Chung Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9a1c1339abf972477aeef4ea037e650f49c5892d Author: Felix Kuehling Date: Fri Oct 27 18:21:55 2023 -0400 drm/amdkfd: Run restore_workers on freezable WQs Make restore workers freezable so we don't have to explicitly flush them in suspend and GPU reset code paths, and we don't accidentally try to restore BOs while the GPU is suspended. Not having to flush restore_work also helps avoid lock/fence dependencies in the GPU reset case where we're not allowed to wait for fences. A side effect of this is, that we can now have multiple concurrent threads trying to signal the same eviction fence. Rework eviction fence signaling and replacement to account for that. The GPU reset path can no longer rely on restore_process_worker to resume queues because evict/restore workers can run independently of it. Instead call a new restore_process_helper directly. This is an RFC and request for testing. v2: - Reworked eviction fence signaling - Introduced restore_process_helper v3: - Handle unsignaled eviction fences in restore_process_bos Signed-off-by: Felix Kuehling Acked-by: Christian König Tested-by: Emily Deng Signed-off-by: Alex Deucher commit 4fc26c2f912b5d9232dc4432fb1b7bfd6f016be6 Author: Michael Strauss Date: Fri Oct 13 12:13:28 2023 -0400 drm/amd/display: Update Fixed VS/PE Retimer Sequence [WHY/HOW] Add a new AUX sequence provided by vendor to improve interop with specific display configurations. Reviewed-by: Wenjing Liu Acked-by: Tom Chung Signed-off-by: Michael Strauss Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2e583200907cc43f062321bf751fe4b0960dbecf Author: Dmytro Laktyushkin Date: Mon Nov 13 13:12:44 2023 -0500 drm/amd/display: block dcn315 dynamic crb allocation when unintended [WHY/HOW] Limit the dynamic crb to dual stream configs that include eDP Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bd1f6a31e7762ebc99b97f3eda5e5ea3708fa792 Author: Mario Limonciello Date: Fri Nov 24 09:56:32 2023 -0600 drm/amd: Enable PCIe PME from D3 When dGPU is put into BOCO it may be in D3cold but still able send PME on display hotplug event. For this to work it must be enabled as wake source from D3. When runpm is enabled use pci_wake_from_d3() to mark wakeup as enabled by default. Cc: stable@vger.kernel.org # 6.1+ Signed-off-by: Mario Limonciello Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7b194fdccb8458779687063e582cf218a0920c29 Author: Lu Yao Date: Thu Nov 23 09:22:34 2023 +0800 drm/amdgpu: Fix cat debugfs amdgpu_regs_didt causes kernel null pointer For 'AMDGPU_FAMILY_SI' family cards, in 'si_common_early_init' func, init 'didt_rreg' and 'didt_wreg' to 'NULL'. But in func 'amdgpu_debugfs_regs_didt_read/write', using 'RREG32_DIDT' 'WREG32_DIDT' lacks of relevant judgment. And other 'amdgpu_ip_block_version' that use these two definitions won't be added for 'AMDGPU_FAMILY_SI'. So, add null pointer judgment before calling. Reviewed-by: Christian König Signed-off-by: Lu Yao Signed-off-by: Alex Deucher commit b0e5c88d8a88bdcc9834409387e10a5ae1b2753e Author: Dinghao Liu Date: Thu Nov 23 15:33:22 2023 +0800 drm/amd/pm: fix a memleak in aldebaran_tables_init When kzalloc() for smu_table->ecc_table fails, we should free the previously allocated resources to prevent memleak. Fixes: edd794208555 ("drm/amd/pm: add message smu to get ecc_table v2") Signed-off-by: Dinghao Liu Signed-off-by: Alex Deucher commit ca0b006939f9701ab2e14a08ed9ef77a8014d2c5 Author: Alex Deucher Date: Fri Nov 10 09:39:18 2023 -0500 drm/amdgpu: fix AGP addressing when GART is not at 0 This worked by luck if the GART aperture ended up at 0. When we ended up moving GART on some chips, the GART aperture ended up offsetting the AGP address since the resource->start is a GART offset, not an MC address. Fix this by moving the AGP address setup into amdgpu_bo_gpu_offset_no_check(). v2: check mem_type before checking agp v3: check if the ttm bo has a ttm_tt allocated yet Fixes: 67318cb84341 ("drm/amdgpu/gmc11: set gart placement GC11") Tested-by: Mario Limonciello Reported-by: Jesse Zhang Reported-by: Yifan Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: christian.koenig@amd.com Cc: mario.limonciello@amd.com commit bcdbd6f607bacb51743ac73f13f40d015cb9de53 Author: RutingZhang Date: Tue Nov 21 12:36:20 2023 +0800 drm/amd/display: remove unnecessary braces to fix coding style checkpatch complains that: WARNING: braces {} are not necessary for single statement blocks + if (pool->base.irqs != NULL) { + dal_irq_service_destroy(&pool->base.irqs); + } Fixed it by removing unnecessary braces to fix the coding style issue. Signed-off-by: RutingZhang Reviewed-by: Dongliang Mu Signed-off-by: Alex Deucher commit 01a1526ac4c8d9342d3d8b703751f3fc5ce487ba Author: Dmytro Laktyushkin Date: Fri Nov 3 14:55:37 2023 -0400 drm/amd/display: update dcn315 lpddr pstate latency [WHY/HOW] Increase the pstate latency to improve ac/dc transition Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by: Dmytro Laktyushkin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7a6931a476d30f0d6bf70b01a925f76f92d23940 Author: Hamza Mahfooz Date: Wed Nov 22 14:50:34 2023 -0500 drm/amd/display: fix ABM disablement On recent versions of DMUB firmware, if we want to completely disable ABM we have to pass ABM_LEVEL_IMMEDIATE_DISABLE as the requested ABM level to DMUB. Otherwise, LCD eDP displays are unable to reach their maximum brightness levels. So, to fix this whenever the user requests an ABM level of 0 pass ABM_LEVEL_IMMEDIATE_DISABLE to DMUB instead. Also, to keep the user's experience consistent map ABM_LEVEL_IMMEDIATE_DISABLE to 0 when a user tries to read the requested ABM level. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Harry Wentland Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit 201761b5eb57c3fad810cde555795c3b5721a031 Author: Lijo Lazar Date: Thu Nov 9 10:50:38 2023 +0530 drm/amdgpu: Move mca debug mode decision to ras Refactor code such that ras block decides the default mca debug mode, and not swsmu block. By default mca debug mode is set to false. v2: squash in uninitialized value fix (Alex) Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit db4616f7667c9d1f733ec360a754a4d7fd32c28e Author: Aric Cyr Date: Mon Nov 13 09:07:22 2023 -0500 drm/amd/display: 3.2.261 This version brings along the following: - DCN314 fixes - DCN32 fixes - DCN35 fixes - DML2 fixes - eDP fixes - HDR fixes - MST fixes - Replay fixes - SubVP support for more configs Acked-by: Hamza Mahfooz Signed-off-by: Aric Cyr Signed-off-by: Alex Deucher commit 641220b2a53c64efb8327ffbbc3bfcf96b5a613f Author: Anthony Koo Date: Sat Nov 11 22:47:50 2023 -0500 drm/amd/display: [FW Promotion] Release 0.0.193.0 - Add a tracing framework, to measure duration, execution count and longest duration of main loop/vsync interrupt work GPINT command is used to start/stop the measurements. Acked-by: Hamza Mahfooz Signed-off-by: Anthony Koo Signed-off-by: Alex Deucher commit 2d1c884a535fcca74814553132d41c15dc9831ef Author: Sung Joon Kim Date: Fri Nov 10 11:33:45 2023 -0500 drm/amd/display: Fix black screen on video playback with embedded panel [why] We have dynamic power control in driver but should be ignored when power is forced on. [how] Bypass any power control when it's forced on. Cc: stable@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Sung Joon Kim Signed-off-by: Alex Deucher commit 22136ff27c4e01fae81f6588033363a46c72ed8c Author: Taimur Hassan Date: Fri Nov 10 10:15:28 2023 -0500 drm/amd/display: Fix conversions between bytes and KB [Why] There are a number of instances where we convert HostVMMinPageSize or GPUVMMinPageSize from bytes to KB by dividing (rather than multiplying) and vice versa. Additionally, in some cases, a parameter is passed through DML in KB but later checked as if it were in bytes. Cc: stable@vger.kernel.org Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Taimur Hassan Signed-off-by: Alex Deucher commit fbd2076c31e3281dea7b475d80211b7a6f1500da Author: Mukul Joshi Date: Wed Nov 22 15:17:22 2023 -0500 drm/amdkfd: Use common function for IP version check KFD_GC_VERSION was recently updated to use a new function for IP version checks. As a result, use KFD_GC_VERSION as the common function for all IP version checks in KFD. Signed-off-by: Mukul Joshi Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit f19c115d9c3c4f386c4662cc7b02ae1ffc2374af Author: Taimur Hassan Date: Fri Nov 10 10:06:09 2023 -0500 drm/amd/display: Remove config update [Why] Prevent overwrite of dc->config.use_default_clock_table, as it should be pre-configured. Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Taimur Hassan Signed-off-by: Alex Deucher commit 5fcf74e002f152db0c39a7cdafa082c952cc5640 Author: Nicholas Kazlauskas Date: Fri Nov 3 18:07:11 2023 -0400 drm/amd/display: Update DCN35 clock table policy [Why] The new table doesn't have an implicit mapping between Fclk SOC voltage and MemClk and it currently builds the table off of number of Fclk states rather than DcfClock states. The DML table in use is not correct for functionality or power and does not align with our existing policies for DCN3x. [How] Build the table based on DcfClock with the following assumptions: 1. Raising Soc voltage is the most expensive operation, so assume that running at max DispClock or DppClock is preferable. 2. Assume that we can run at max Fclk / MemClk at any state, but restrict the maximum state to the very last entry in the table as the worst case scenario. 3. Assume that Fclk always has a 2x multiplier on DcfClock unless the table specifies something lower. Reviewed-by: Taimur Hassan Acked-by: Hamza Mahfooz Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 3d0fe49454652117522f60bfbefb978ba0e5300b Author: Parandhaman K Date: Thu Nov 9 15:52:17 2023 +0530 drm/amd/display: Refactor OPTC into component folder [why] Move all optc files to unique folder optc. [how] creating optc repo in dc, and moved the dcnxx_optc.c and .h files into corresponding new folders inside the optc and cleared the linkage errors by adding relative paths in the Makefile.template. Reviewed-by: Martin Leung Acked-by: Hamza Mahfooz Signed-off-by: Parandhaman K Signed-off-by: Alex Deucher commit 5a9a2cc8ae1889c4002850b00fd4fd9691dfac4e Author: Zhongwei Date: Wed Nov 8 16:34:36 2023 +0800 drm/amd/display: force toggle rate wa for first link training for a retimer [WHY] Handover from DMUB to driver does not perform link rate toggle. It might cause link training failure for boot up. [HOW] Force toggle rate wa for first link train. link->vendor_specific_lttpr_link_rate_wa should be zero then. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Michael Strauss Acked-by: Hamza Mahfooz Signed-off-by: Zhongwei Signed-off-by: Alex Deucher commit f4233efedf75572e49efd08202b1a07196949b4a Author: Alvin Lee Date: Thu Nov 9 18:08:17 2023 -0500 drm/amd/display: If P-State is supported try SubVP for smaller vlevel [Description] - To reduce vlevel further, we can try to apply subvp on configs that already support p-state since the natural p-state support may not allow for DPM0. - Add code to try subvp to reduce UCLK DPM level further if already supported, but don't use subvp if it does not optimize the DPM level even lower Reviewed-by: Samson Tam Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 0e6a12884ca72520b195d95f1fa1bf790678cd6c Author: Prike Liang Date: Wed Nov 8 14:38:29 2023 +0800 drm/amdgpu: correct the amdgpu runtime dereference usage count Fix the amdgpu runpm dereference usage count. Signed-off-by: Prike Liang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a5e90392fdda05ce842810bb749f3d210c3ffc65 Author: Gabe Teeger Date: Thu Nov 9 17:53:49 2023 -0500 Revert "drm/amd/display: Enable CM low mem power optimization" This reverts commit fcfc6ceec3ebb725a0d6381a1120e7cd546e1df4. [why] Flickering observed. Regression search pointed to this being the offending commit. Reviewed-by: Charlene Liu Reviewed-by: Yihan Zhu Acked-by: Hamza Mahfooz Signed-off-by: Gabe Teeger Signed-off-by: Alex Deucher commit d642b0100bf8c95e88e8396b7191b35807dabb4c Author: Nicholas Kazlauskas Date: Wed Nov 8 10:59:00 2023 -0500 drm/amd/display: Update min Z8 residency time to 2100 for DCN314 [Why] Some panels with residency period of 2054 exhibit flickering with Z8 at the end of the frame. [How] As a workaround, increase the limit to block these panels. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Syed Hassan Acked-by: Hamza Mahfooz Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit fcd94ef1b3e78f7dc76309c9611915018d2d62a3 Author: Nicholas Kazlauskas Date: Wed Nov 8 10:55:53 2023 -0500 drm/amd/display: Remove min_dst_y_next_start check for Z8 [Why] Flickering occurs on DRR supported panels when engaged in DRR due to min_dst_y_next becoming larger than the frame size itself. [How] In general, we should be able to enter Z8 when this is engaged but it might be a net power loss even if the calculation wasn't bugged. Don't support enabling Z8 during the DRR region. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Syed Hassan Acked-by: Hamza Mahfooz Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit c4b8394e76adba4f50a3c2696c75b214a291e24a Author: Meenakshikumar Somasundaram Date: Thu Nov 9 00:04:36 2023 -0500 drm/amd/display: Fix tiled display misalignment [Why] When otg workaround is applied during clock update, otgs of tiled display went out of sync. [How] To call dc_trigger_sync() after clock update to sync otgs again. Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Meenakshikumar Somasundaram Signed-off-by: Alex Deucher commit 88f4b10a793262c4d6cf2566b1d210ec76f87867 Author: Tim Huang Date: Tue Nov 21 11:06:51 2023 +0800 drm/amdgpu: fix memory overflow in the IB test Fix a memory overflow issue in the gfx IB test for some ASICs. At least 20 bytes are needed for the IB test packet. v2: correct code indentation errors. (Christian) Signed-off-by: Tim Huang Reviewed-by: Yifan Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ee95135bfeecf67b313b5573054b03aa6dbc76f8 Author: Li Ma Date: Tue Nov 21 16:54:59 2023 +0800 drm/amdgpu: add init_registers for nbio v7.11 enable init_registers callback func for nbio v7.11. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8f3656ce65d6d550247a85fdb5c54a5b65cc2252 Author: Alvin Lee Date: Thu Nov 9 10:50:30 2023 -0500 drm/amd/display: Enable SubVP on 1080p60 displays [Description] - Previously SubVP would never be selected on 1080p60 displays because it has too much vactive margin. However, implement a change to allow it like how 1440p60 is allowed. - Add a new struct such that we have a list of allowed modes for enabling subvp with vactive margin (currently 1080p60 and 1440p60) - Also ensure to block drr + vblank cases to prevent unexpected enablement of new display configs - Update SW cursor fallback for these new potential cases as well Reviewed-by: Samson Tam Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 5f2a404cbccec0c8d6635f0997cea2ac226d25d4 Author: Dennis Chan Date: Tue Oct 31 10:09:02 2023 +0800 drm/amd/display: Disable Timing sync check in Full-Screen Video Case [why] If Panel max link off frame count is low, it will cause low residency for Replay, then Disabled timing sync check in Full screen Video Case. Reviewed-by: Robin Chen Acked-by: Hamza Mahfooz Signed-off-by: Dennis Chan Signed-off-by: Alex Deucher commit 83a79dd6f4fb54c8cfe3ecbd378817047687a9b2 Author: Wayne Lin Date: Mon Aug 7 15:34:39 2023 +0800 drm/amd/display: adjust flow for deallocation mst payload [Why] MST relevant variables are maintained at drm side. As the result, we still have to call drm_dp_remove_payload_part2() to update the relevant values regardless the link is under mst mode or not. We used to have a workaround patch to tackle this: commit 3d8fcc6740c9 ("drm/amd/display: Extract temp drm mst deallocation wa into its own function") Now it's time to remove the workaround and adjust the flow. [How] During deallocate_mst_payload(), source actually doesn't send out ALLOCATE_PAYLOAD at the end as like the flow in allocate_mst_payload(). Call function dm_helpers_dp_mst_send_payload_allocation() at the end of deallocate_mst_payload() is a bit confusing. Separate dm_helpers_dp_mst_send_payload_allocation() into 2 functions. Have a new function dm_helpers_dp_mst_update_mst_mgr_for_deallocation() to replace dm_helpers_dp_mst_send_payload_allocation() for payload deallocation. Cc: Ville Syrjälä Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher commit 43b8ac4b34ec239bccf4a692c1227ef51a95a4d2 Author: Camille Cho Date: Fri Nov 3 12:08:42 2023 +0800 drm/amd/display: Simplify brightness initialization [Why] Remove the brightness cache in DC. It uses a single value to represent the brightness for both SDR and HDR mode. This leads to flash in HDR on/off. It also unconditionally programs brightness as in HDR mode. This may introduce garbage on SDR mode in miniLED panel. [How] Simplify the initialization flow by removing the DC cache and taking what panel has as default. Expand the mechanism for PWM to DPCD Aux to restore cached brightness value generally. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Krunoslav Kovac Acked-by: Hamza Mahfooz Signed-off-by: Camille Cho Signed-off-by: Alex Deucher commit 37f4382b64a2b01109a0ed5c05f58d3f86385e10 Author: Max Tseng Date: Wed Nov 8 11:31:50 2023 +0800 drm/amd/display: replay: Augment Frameupdate Command [Why] Sending certain Frameupdate number for Replay Power Evaluation Reviewed-by: Dennis Chan Acked-by: Hamza Mahfooz Signed-off-by: Max Tseng Signed-off-by: Alex Deucher commit 75a3371e8ffdab2e504f4326daab60f8fb15fdf1 Author: Alvin Lee Date: Wed Nov 8 17:16:28 2023 -0500 drm/amd/display: Increase num voltage states to 40 [Description] If during driver init stage there are greater than 20 intermediary voltage states while constructing the SOC BB we could hit issues because we will index outside of the clock_limits array and start overwriting data. Increase the total number of states to 40 to avoid this issue. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Samson Tam Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit 220db802cb505e6ec3b3e0018ac0233205632a72 Author: Michael Strauss Date: Fri Oct 27 14:12:51 2023 -0400 drm/amd/display: Do not read DPREFCLK spread info from LUT on DCN35 [WHY] Currently DCN35 does not spread DPREFCLK [HOW] Remove hardcoded table with nonzero caps Reviewed-by: Nicholas Kazlauskas Acked-by: Hamza Mahfooz Signed-off-by: Michael Strauss Signed-off-by: Alex Deucher commit c77b0008591094d454c1f340d1e82b5ebe2d918d Author: Max Tseng Date: Tue Nov 7 15:00:03 2023 +0800 drm/amd/display: replay: generalize the send command function usage Augment the function to allow send different format data in different use case. Reviewed-by: Dennis Chan Acked-by: Hamza Mahfooz Signed-off-by: Max Tseng Signed-off-by: Alex Deucher commit 6c22fb07e0c2935d97a86509f16f755ab895f2c8 Author: Bhuvana Chandra Pinninti Date: Wed Oct 18 19:16:17 2023 +0530 drm/amd/display: Refactor DSC into component folder [why] To refactor DSC and make DSC files unit testable. [how] moved the dcnxx_dsc.c and .h files into corresponding dcn folders inside the dsc and cleared the linkage errors. Reviewed-by: Wenjing Liu Acked-by: Hamza Mahfooz Signed-off-by: Bhuvana Chandra Pinninti Signed-off-by: Alex Deucher commit 40436ce7ccfec5c616e2e48d0ec2c905637c7397 Author: Alvin Lee Date: Tue Nov 7 17:01:49 2023 -0500 drm/amd/display: Use DRAM speed from validation for dummy p-state [Description] When choosing which dummy p-state latency to use, we need to use the DRAM speed from validation. The DRAMSpeed DML variable can change because we use different input params to DML when populating watermarks set B. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Samson Tam Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit a953cd8cac6be69fba0b66e6fb46d1324d797af4 Author: Ilya Bakoulin Date: Tue Nov 7 15:07:56 2023 -0500 drm/amd/display: Fix MPCC 1DLUT programming [Why] Wrong function is used to translate LUT values to HW format, leading to visible artifacting in some cases. [How] Use the correct cm3_helper function. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Krunoslav Kovac Acked-by: Hamza Mahfooz Signed-off-by: Ilya Bakoulin Signed-off-by: Alex Deucher commit 251027968a7230f18c353e25634cc7e25d9ab953 Author: Nicholas Kazlauskas Date: Tue Nov 7 11:15:16 2023 -0500 drm/amd/display: Feed SR and Z8 watermarks into DML2 for DCN35 [Why] We've updated the table but the values aren't being reflected in DML2 calculation. [How] Pass them into the bbox overrides. Reviewed-by: Jun Lei Acked-by: Hamza Mahfooz Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 20b07b0cb3a0a2fb3a6daf00f645925be77ec80c Author: Alex Sierra Date: Mon Nov 20 11:31:32 2023 -0600 drm/amdgpu: Force order between a read and write to the same address Setting register to force ordering to prevent read/write or write/read hazards for un-cached modes. Signed-off-by: Alex Sierra Acked-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4b8251e019ea17037667e6d61aa5e66d5b4f51d2 Author: Hawking Zhang Date: Mon Nov 20 10:14:21 2023 +0800 drm/amdgpu: Do not issue gpu reset from nbio v7_9 bif interrupt In nbio v7_9, host driver should not issu gpu reset Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Signed-off-by: Alex Deucher commit 80061d6b58a99f1fffb97a7f3592234a5fe0a3fe Author: Nicholas Kazlauskas Date: Tue Nov 7 11:12:45 2023 -0500 drm/amd/display: Add Z8 watermarks for DML2 bbox overrides [Why] We can override SR watermarks but not Z8 ones. [How] Add new parameters for Z8 matching the SR ones and feed them into the states. These also weren't being applied to every state, so make sure that we loop over and update all SOC states if given an override. Reviewed-by: Jun Lei Acked-by: Hamza Mahfooz Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 1290183db494641772c18d063c34e9c8f720c61c Author: Wenjing Liu Date: Thu Nov 2 15:02:42 2023 -0400 drm/amd/display: always use mpc factor of 2 for stereo timings [why] In the new pipe resource management logic, the special handling for stereo timings is missing. This commit implements the same stereo timings handling as old pipe resource management code. Reviewed-by: Chaitanya Dhere Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit cfab803884f426b36b58dbe1f86f99742767c208 Author: Wenjing Liu Date: Thu Nov 2 14:59:13 2023 -0400 drm/amd/display: update pixel clock params after stream slice count change in context [why] When ODM slice count is changed, otg master pipe's pixel clock params is no longer valid as the value is dependent on ODM slice count. Reviewed-by: Chaitanya Dhere Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit 2e9b152325f649923b9324fa8ea5f1a5289145bb Author: Perry Yuan Date: Tue Aug 1 10:37:41 2023 -0400 drm/amdgpu: optimize RLC powerdown notification on Vangogh The smu needs to get the rlc power down message to sync the rlc state with smu, the rlc state updating message need to be sent at while smu begin suspend sequence , otherwise SMU will crash while RLC state is not notified by driver, and rlc state probally changed after that notification, so it needs to notify rlc state to smu at the end of the suspend sequence in amdgpu_device_suspend() that can make sure the rlc state is correctly set to SMU. [ 101.000590] amdgpu 0000:03:00.0: amdgpu: SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x0000001E SMN_C2PMSG_82:0x00000000 [ 101.000598] amdgpu 0000:03:00.0: amdgpu: Failed to disable gfxoff! [ 110.838026] amdgpu 0000:03:00.0: amdgpu: SMU: I'm not done with your previous command: SMN_C2PMSG_66:0x0000001E SMN_C2PMSG_82:0x00000000 [ 110.838035] amdgpu 0000:03:00.0: amdgpu: Failed to disable smu features. [ 110.838039] amdgpu 0000:03:00.0: amdgpu: Fail to disable dpm features! [ 110.838040] [drm:amdgpu_device_ip_suspend_phase2 [amdgpu]] *ERROR* suspend of IP block failed -62 [ 110.884394] PM: suspend of devices aborted after 21213.620 msecs [ 110.884402] PM: start suspend of devices aborted after 21213.882 msecs [ 110.884405] PM: Some devices failed to suspend, or early wake event detected Reviewed-by: Yifan Zhang Signed-off-by: Perry Yuan Signed-off-by: Alex Deucher commit 702e2fb579e000382c219c58dacef4f733511a36 Author: Hawking Zhang Date: Mon Nov 20 11:04:45 2023 +0800 drm/amdgpu: Retire query/reset_ras_err_status from gfx_v9_4_3 Not needed anymore. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Signed-off-by: Alex Deucher commit 613a81995575889753ca44d70d33e84a1d21bae5 Author: Wenjing Liu Date: Mon Nov 6 16:47:19 2023 -0500 drm/amd/display: fix a pipe mapping error in dcn32_fpu [why] In dcn32 DML pipes are ordered the same as dc pipes but only for used pipes. For example, if dc pipe 1 and 2 are used, their dml pipe indices would be 0 and 1 respectively. However update_pipe_slice_table_with_split_flags doesn't skip indices for free pipes. This causes us to not reference correct dml pipe output when building pipe topology. [how] Use two variables to iterate dc and dml pipes respectively and only increment dml pipe index when current dc pipe is not free. Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Chaitanya Dhere Acked-by: Hamza Mahfooz Signed-off-by: Wenjing Liu Signed-off-by: Alex Deucher commit c4290449f8fbecc55013c6125b50908b5359a8fd Author: Ian Chen Date: Mon Nov 6 15:46:19 2023 +0800 drm/amd/display: add skip_implict_edp_power_control flag for dce110 If the link requests to skip implicit eDP power control, we should honor that request. Reviewed-by: Robin Chen Acked-by: Hamza Mahfooz Signed-off-by: Ian Chen Signed-off-by: Alex Deucher commit 76c5d6900908439386b0045a6130150150079300 Author: Nicholas Kazlauskas Date: Mon Nov 6 17:29:33 2023 -0500 drm/amd/display: Update DCN35 watermarks [Why & How] Update to the new values per HW team request. Affects both stutter and z8. Reviewed-by: Charlene Liu Acked-by: Hamza Mahfooz Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 35c425f5cc251417ad681475dc9901ab6d3244ea Author: Jonathan Kim Date: Thu Nov 16 13:57:07 2023 -0500 drm/amdgpu: update xgmi num links info post gc9.4.2 GC IP 9.4.2 and up support TA reporting of the number of xGMI links between peers. Tested-by: Vignesh Chander Signed-off-by: Jonathan Kim Reviewed-by: Mukul Joshi Signed-off-by: Alex Deucher commit a2d3c69261178df7d4c1350d5ef67375d399acd3 Author: David Yat Sin Date: Fri Nov 17 05:16:59 2023 +0000 drm/amdkfd: Copy HW exception data to user event Fixes issue where user events of type KFD_EVENT_TYPE_HW_EXCEPTION do not have valid data Signed-off-by: David Yat Sin Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 3f3b08be58834339b00f28d19c20d684cdec704f Author: Nicholas Kazlauskas Date: Fri Nov 3 10:01:01 2023 -0400 drm/amd/display: Add z-state support policy for dcn35 [Why] DML2 means that the dcn3x policy for calculating z-state support no longer runs from validate_bandwidth. This means we are unconditionally allowing Z8, the hardware default. [How] Port the policy over to DCN35, but with a few modifications: - Don't use min_dst_y_next_start as a check for Z8/Z10 allow - Add support for overriding the Z10 stutter period per ASIC - Cleanup the code to make the policy assignment more clear Reviewed-by: Charlene Liu Acked-by: Hamza Mahfooz Signed-off-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 1c22d6ce53280763bcb4cb24d4f71111fff4a526 Author: Alvin Lee Date: Mon Nov 6 11:20:15 2023 -0500 drm/amd/display: Include udelay when waiting for INBOX0 ACK When waiting for the ACK for INBOX0 message, we have to ensure to include the udelay for proper wait time Cc: stable@vger.kernel.org # 6.1+ Reviewed-by: Samson Tam Acked-by: Hamza Mahfooz Signed-off-by: Alvin Lee Signed-off-by: Alex Deucher commit cee6de122461de699aaa7932b33466c6d259eabb Author: Dennis Chan Date: Fri Oct 27 11:00:36 2023 +0800 drm/amd/display: Add new Replay command and Disabled Replay Timing Resync [why] To support dynamic switching for Replay timing sync mechanism. Reviewed-by: ChunTao Tso Acked-by: Hamza Mahfooz Signed-off-by: Dennis Chan Signed-off-by: Alex Deucher commit 223aad1be34e1169ee7210bce05726cc5ef1fd66 Author: Lijo Lazar Date: Fri Sep 29 11:56:49 2023 +0530 drm/amd/pm: Add sysfs attribute to get pm metrics Add sysfs attribute to read power management metrics. A snapshot is captured to the buffer when the attribute is read. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit f9a45b76a1883b081fbe15466b11d0264e85d372 Author: Lijo Lazar Date: Fri Sep 29 11:35:19 2023 +0530 drm/amd/pm: Add pm metrics support to SMU v13.0.6 Add support to fetch PM metrics sample from SMU v13.0.6 Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 12c2d3b5f5bc4ecb470a4bc06424914c145e8c03 Author: Lijo Lazar Date: Fri Sep 29 10:51:02 2023 +0530 drm/amd/pm: Add support to fetch pm metrics sample Add API support to fetch a snapshot of power management metrics from PMFW. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 534eee82356c220649dc9c2ea90099f39fb1cb62 Author: Srinivasan Shanmugam Date: Sun Nov 12 09:30:51 2023 +0530 drm/amd/display: Remove redundant DRM device struct in amdgpu_dm_, mst_types.c Declaration of 'struct drm_device *dev' is redundant, as 'connector->dev' & 'dev_get_drvdata(kdev)' can be directly passed to 'drm_to_adev', without any intermediate DRM device 'dev' variable Cc: Roman Li Cc: Hamza Mahfooz Cc: Harry Wentland Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit 613ecd6563d2716192e69624105fe1939d104663 Author: André Almeida Date: Fri Nov 10 12:23:28 2023 -0500 drm/amd: Document device reset methods Document what each amdgpu driver reset method does. Signed-off-by: André Almeida Signed-off-by: Alex Deucher commit a42b4bd51b2aec77fb38f1ce0f41846055a8d33c Author: Rob Herring Date: Tue Nov 28 15:48:16 2023 -0600 dt-bindings: input: mediatek,pmic-keys: Drop incomplete example The example for the Mediatek PMIC keys is incomplete as the binding is the full PMIC, not just the sub-functions. It is preferred for MFD examples to be complete in the top-level MFD device binding rather than piecemeal in each sub-function binding. This also fixes an undocumented (by schema) compatible warning for "mediatek,mt6397". Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231128214816.3975893-1-robh@kernel.org Signed-off-by: Dmitry Torokhov commit 11baacb2fd9b1c6e759ad54ca13f259fa1769c73 Author: Rob Herring Date: Tue Nov 28 15:48:09 2023 -0600 dt-bindings: input: sprd,sc27xx-vibrator: Drop incomplete example The example for the Spreadtrum SC27xx PMIC vibrator is incomplete as the binding is the full PMIC, not just the sub-functions. It is preferred for MFD examples to be complete in the top-level MFD device binding rather than piecemeal in each sub-function binding. This also fixes an undocumented (by schema) compatible warning for "sprd,sc2731". Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231128214809.3975719-1-robh@kernel.org Signed-off-by: Dmitry Torokhov commit 72a2a0a494ec9aefbca4ad64f46b8e3370809993 Author: Likhitha Korrapati Date: Sun Nov 26 02:09:14 2023 -0500 perf test record+probe_libc_inet_pton: Fix call chain match on powerpc The perf test "probe libc's inet_pton & backtrace it with ping" fails on powerpc as below: # perf test -v "probe libc's inet_pton & backtrace it with ping" 85: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 96028 ping 96056 [002] 127271.101961: probe_libc:inet_pton: (7fffa1779a60) 7fffa1779a60 __GI___inet_pton+0x0 (/usr/lib64/glibc-hwcaps/power10/libc.so.6) 7fffa172a73c getaddrinfo+0x121c (/usr/lib64/glibc-hwcaps/power10/libc.so.6) FAIL: expected backtrace entry "gaih_inet.*\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib64/glibc-hwcaps/power10/libc.so.6\)$" got "7fffa172a73c getaddrinfo+0x121c (/usr/lib64/glibc-hwcaps/power10/libc.so.6)" test child finished with -1 ---- end ---- probe libc's inet_pton & backtrace it with ping: FAILED! This test installs a probe on libc's inet_pton function, which will use uprobes and then uses perf trace on a ping to localhost. It gets 3 levels deep backtrace and checks whether it is what we expected or not. The test started failing from RHEL 9.4 where as it works in previous distro version (RHEL 9.2). Test expects gaih_inet function to be part of backtrace. But in the glibc version (2.34-86) which is part of distro where it fails, this function is missing and hence the test is failing. From nm and ping command output we can confirm that gaih_inet function is not present in the expected backtrace for glibc version glibc-2.34-86 [root@xxx perf]# nm /usr/lib64/glibc-hwcaps/power10/libc.so.6 | grep gaih_inet 00000000001273e0 t gaih_inet_serv 00000000001cd8d8 r gaih_inet_typeproto [root@xxx perf]# perf script -i /tmp/perf.data.6E8 ping 104048 [000] 128582.508976: probe_libc:inet_pton: (7fff83779a60) 7fff83779a60 __GI___inet_pton+0x0 (/usr/lib64/glibc-hwcaps/power10/libc.so.6) 7fff8372a73c getaddrinfo+0x121c (/usr/lib64/glibc-hwcaps/power10/libc.so.6) 11dc73534 [unknown] (/usr/bin/ping) 7fff8362a8c4 __libc_start_call_main+0x84 (/usr/lib64/glibc-hwcaps/power10/libc.so.6) FAIL: expected backtrace entry "gaih_inet.*\+0x[[:xdigit:]]+[[:space:]]\(/usr/lib64/glibc-hwcaps/power10/libc.so.6\)$" got "7fff9d52a73c getaddrinfo+0x121c (/usr/lib64/glibc-hwcaps/power10/libc.so.6)" With version glibc-2.34-60 gaih_inet function is present as part of the expected backtrace. So we cannot just remove the gaih_inet function from the backtrace. [root@xxx perf]# nm /usr/lib64/glibc-hwcaps/power10/libc.so.6 | grep gaih_inet 0000000000130490 t gaih_inet.constprop.0 000000000012e830 t gaih_inet_serv 00000000001d45e4 r gaih_inet_typeproto [root@xxx perf]# ./perf script -i /tmp/perf.data.b6S ping 67906 [000] 22699.591699: probe_libc:inet_pton_3: (7fffbdd80820) 7fffbdd80820 __GI___inet_pton+0x0 (/usr/lib64/glibc-hwcaps/power10/libc.so.6) 7fffbdd31160 gaih_inet.constprop.0+0xcd0 (/usr/lib64/glibc-hwcaps/power10/libc.so.6) 7fffbdd31c7c getaddrinfo+0x14c (/usr/lib64/glibc-hwcaps/power10/libc.so.6) 1140d3558 [unknown] (/usr/bin/ping) This patch solves this issue by doing a conditional skip. If there is a gaih_inet function present in the libc then it will be added to the expected backtrace else the function will be skipped from being added to the expected backtrace. Output with the patch [root@xxx perf]# ./perf test -v "probe libc's inet_pton & backtrace it with ping" 83: probe libc's inet_pton & backtrace it with ping : --- start --- test child forked, pid 102662 ping 102692 [000] 127935.549973: probe_libc:inet_pton: (7fff93379a60) 7fff93379a60 __GI___inet_pton+0x0 (/usr/lib64/glibc-hwcaps/power10/libc.so.6) 7fff9332a73c getaddrinfo+0x121c (/usr/lib64/glibc-hwcaps/power10/libc.so.6) 11ef03534 [unknown] (/usr/bin/ping) test child finished with 0 ---- end ---- probe libc's inet_pton & backtrace it with ping: Ok Reported-by: Disha Goel Reviewed-by: Athira Jajeev Reviewed-by: Ian Rogers Signed-off-by: Likhitha Korrapati Tested-by: Disha Goel Cc: Adrian Hunter Cc: Disha Goel Cc: James Clark Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20231126070914.175332-1-likhitha@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 650e0bde43f35bb675e87e30f679a57cfa22e0e5 Author: Arnaldo Carvalho de Melo Date: Wed Nov 29 12:47:18 2023 -0300 perf tests sigtrap: Skip if running on a kernel with sleepable spinlocks There are issues as reported that need some more investigation on the RT kernel front, till that is addressed, skip this test. This test is already skipped for multiple hardware architectures where the tested kernel feature is not supported. Acked-by: Marco Elver Cc: Adrian Hunter Cc: Clark Williams Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Juri Lelli Cc: Kate Carcia Cc: Marco Elver Cc: Mike Galbraith Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lore.kernel.org/all/e368f2c848d77fbc8d259f44e2055fe469c219cf.camel@gmx.de/ Link: https://lore.kernel.org/r/20231129154718.326330-3-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a472ee42e6f60c8714e2306385687922afcba8c4 Author: Arnaldo Carvalho de Melo Date: Wed Nov 29 12:47:17 2023 -0300 perf test sigtrap: Generalize the BTF routine to reuse it in this test Move the part that loads the BTF info to a "btf__available()" that will lazy load the BTF info so that if we need it for some other test, which we will in the following cset, we can reuse it. At some point this will move from this specific 'perf test' entry to be used in other parts of perf, do it when needed. Cc: Adrian Hunter Cc: Clark Williams Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kate Carcia Cc: Namhyung Kim Cc: Thomas Gleixner Link: https://lore.kernel.org/r/20231129154718.326330-2-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e185a24eeab3efd667176aef60f88d27ce641cd7 Author: Krzysztof Kozlowski Date: Fri Nov 24 10:21:21 2023 +0100 dt-bindings: correct white-spaces in examples Use only one and exactly one space around '=' in DTS example. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Mathieu Poirier Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Acked-by: Serge Semin Acked-by: Ulf Hansson # For MMC Acked-by: Jonathan Cameron #for-iio Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20231124092121.16866-1-krzysztof.kozlowski@linaro.org Signed-off-by: Rob Herring commit dad19630c476f4c3d88f222c60f254f13e6245ed Author: Thomas Hellström Date: Wed Nov 29 10:06:37 2023 +0100 Documentation/gpu: VM_BIND locking document Add the first version of the VM_BIND locking document which is intended to be part of the xe driver upstreaming agreement. The document describes and discuss the locking used during exec- functions, evicton and for userptr gpu-vmas. Intention is to be using the same nomenclature as the drm-vm-bind-async.rst. v2: - s/gvm/gpu_vm/g (Rodrigo Vivi) - Clarify the userptr seqlock with a pointer to mm/mmu_notifier.c (Rodrigo Vivi) - Adjust commit message accordingly. - Add SPDX license header. v3: - Large update to align with the drm_gpuvm manager locking - Add "Efficient userptr gpu_vma exec function iteration" section - Add "Locking at bind- and unbind time" section. v4: - Fix tabs vs space errors by untabifying (Rodrigo Vivi) - Minor style fixes and typos (Rodrigo Vivi) - Clarify situations where stale GPU mappings are occurring and how access through these mappings are blocked. (Rodrigo Vivi) - Insert into the toctree in implementation_guidelines.rst v5: - Add a section about recoverable page-faults. - Use local references to other documentation where possible (Bagas Sanjaya) - General documentation fixes and typos (Danilo Krummrich and Boris Brezillon) - Improve the documentation around locks that need to be grabbed from the dm-fence critical section (Boris Brezillon) - Add more references to the DRM GPUVM helpers (Danilo Krummrich and Boriz Brezillon) - Update the rfc/xe.rst document. v6: - Rework wording to improve readability (Boris Brezillon, Rodrigo Vivi, Bagas Sanjaya) - Various minor fixes across the document (Boris Brezillon) Cc: Rodrigo Vivi Signed-off-by: Thomas Hellström Reviewed-by: Boris Brezillon Reviewed-by: Rodrigo Vivi Reviewed-by: Danilo Krummrich Acked-by: John Hubbard # Documentation/core-api/pin_user_pages.rst changes Link: https://patchwork.freedesktop.org/patch/msgid/20231129090637.2629-1-thomas.hellstrom@linux.intel.com commit 0f82a1b94862da255ac791e11f2c3610f5ad5f26 Author: Balasubramani Vivekanandan Date: Tue Nov 28 15:54:51 2023 +0530 drm/i915/display: Fix IP version of the WAs WAs 14011508470, 14011503030 were applied on IP versions beyond which they are applicable. Fixed the IP version checks for these workarounds. Signed-off-by: Balasubramani Vivekanandan Reviewed-by: Gustavo Sousa Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20231128102451.825242-1-balasubramani.vivekanandan@intel.com commit 15c7fab0e0477d7d7185eac574ca43c15b59b015 Author: Krzysztof Kozlowski Date: Tue Nov 28 17:56:38 2023 +0100 ASoC: qcom: Move Soundwire runtime stream alloc to soundcards Currently the Qualcomm Soundwire controller in its DAI startup op allocates the Soundwire stream runtime. This works fine for existing designs, but has limitations for stream runtimes with multiple controllers, like upcoming Qualcomm X1E80100 SoC with four WSA8840 speakers on two Soundwire controllers. When two Soundwire controllers are added to sound card codecs, Soundwire startup() is called twice, one for each Soundwire controller, and second execution overwrites what was set before. During shutdown() this causes double free. It is expected to have only one Soundwire stream runtime, thus it should be allocated from SoC soundcard context startup(), not from each Soundwire startup(). Such way will properly handle both cases: one and two Soundwire controllers in the stream runtime. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231128165638.757665-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit d32bac9cb09cce4dc3131ec5d0b6ba3c277502ac Author: Krzysztof Kozlowski Date: Tue Nov 28 17:56:37 2023 +0100 ASoC: qcom: Add helper for allocating Soundwire stream runtime Newer Qualcomm SoC soundcards will need to allocate Soundwire stream runtime in their startup op. The code will be exactly the same for all soundcards, so add a helper for that. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231128165638.757665-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit ef32c3cc9c62252986f09e06b4e525742cd91529 Author: heminhong Date: Tue Nov 14 10:43:41 2023 +0800 drm/i915: correct the input parameter on _intel_dsb_commit() Current, the dewake_scanline variable is defined as unsigned int, an unsigned int variable that is always greater than or equal to 0. when _intel_dsb_commit function is called by intel_dsb_commit function, the dewake_scanline variable may have an int value. So the dewake_scanline variable is necessary to defined as an int. Fixes: f83b94d23770 ("drm/i915/dsb: Use DEwake to combat PkgC latency") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310052201.AnVbpgPr-lkp@intel.com/ Cc: Ville Syrjälä Cc: Uma Shankar Signed-off-by: heminhong Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231114024341.14524-1-heminhong@kylinos.cn commit fd2096500acb8b57a66a75ec7985049a5650cff1 Author: Rahul Rameshbabu Date: Sun Nov 26 21:42:01 2023 +0000 drm/i915/irq: Improve error logging for unexpected DE Misc interrupts Dump the iir value in hex when the interrupt is unexpected. Link: https://gitlab.freedesktop.org/drm/intel/-/issues/9652#note_2178501 Cc: Jani Nikula Signed-off-by: Rahul Rameshbabu Reviewed-by: Chaitanya Kumar Borah Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231126214142.102106-1-sergeantsagara@protonmail.com commit 987b71f86c69fa4b8922f1c7065a9fa39b7b6b56 Merge: bed7b22e1316c 71cd5ce7e2f39 Author: Jakub Kicinski Date: Wed Nov 29 08:38:36 2023 -0800 Merge branch 'fine-tune-flow-control-and-speed-configurations-in-microchip-ksz8xxx-dsa-driver' Oleksij Rempel says: ==================== Fine-Tune Flow Control and Speed Configurations in Microchip KSZ8xxx DSA Driver This patch set focuses on enhancing the configurability of flow control, speed, and duplex settings in the Microchip KSZ8xxx DSA driver. The first patch allows more granular control over the CPU port's flow control, speed, and duplex settings. The second patch introduces a method for port configurations for port with integrated PHYs, primarily concerning flow control based on duplex mode. ==================== Link: https://lore.kernel.org/r/20231127145101.3039399-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 71cd5ce7e2f390de105b118a330ffe40a3417bdc Author: Oleksij Rempel Date: Mon Nov 27 15:51:01 2023 +0100 net: dsa: microchip: make phylink_mac_link_up() not optional Last part of the driver do now support phylink_mac_link_up(). So, make it not optional. Signed-off-by: Oleksij Rempel Reviewed-by: Florian Fainelli Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20231127145101.3039399-4-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 2f58148c41e23e11f16e79308455d82ab9342607 Author: Oleksij Rempel Date: Mon Nov 27 15:51:00 2023 +0100 net: dsa: microchip: ksz8: Add function to configure ports with integrated PHYs This patch introduces the function 'ksz8_phy_port_link_up' to the Microchip KSZ8xxx driver. This function is responsible for setting up flow control and duplex settings for the ports that are integrated with PHYs. The KSZ8795 switch supports asymmetric pause control, which can't be fully utilized since a single bit controls both RX and TX pause. Despite this, the flow control can be adjusted based on the auto-negotiation process, taking into account the capabilities of both link partners. On the other hand, the KSZ8873's PORT_FORCE_FLOW_CTRL bit can be set by the hardware bootstrap, which ignores the auto-negotiation result. Therefore, even in auto-negotiation mode, we need to ensure that this bit is correctly set. When auto-negotiation isn't in use, we enforce symmetric pause control for the KSZ8795 switch. Please note, forcing flow control disable on a port while still advertising pause support isn't possible. While this scenario might not be practical or desired, it's important to be aware of this limitation when working with the KSZ8873 and similar devices. Signed-off-by: Oleksij Rempel Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20231127145101.3039399-3-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 87f062ed853ce75f9f71fd2f7aa9887ee7e8ba65 Author: Oleksij Rempel Date: Mon Nov 27 15:50:59 2023 +0100 net: dsa: microchip: ksz8: Make flow control, speed, and duplex on CPU port configurable Allow flow control, speed, and duplex settings on the CPU port to be configurable. Previously, the speed and duplex relied on default switch values, which limited flexibility. Additionally, flow control was hardcoded and only functional in duplex mode. This update enhances the configurability of these parameters. Signed-off-by: Oleksij Rempel Reviewed-by: Simon Horman Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20231127145101.3039399-2-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit bed7b22e1316cf8714db5a6805368e66237bdf31 Merge: f1be1e04c76bb da7d4b42caf1b Author: Jakub Kicinski Date: Wed Nov 29 08:32:38 2023 -0800 Merge branch 'gve-add-support-for-non-4k-page-sizes' John Fraker says: ==================== gve: Add support for non-4k page sizes. This patch series adds support for non-4k page sizes to the driver. Prior to this patch series, the driver assumes a 4k page size in many small ways, and will crash in a kernel compiled for a different page size. This changeset aims to be a minimal changeset that unblocks certain arm platforms with large page sizes. ==================== Link: https://lore.kernel.org/r/20231128002648.320892-1-jfraker@google.com Signed-off-by: Jakub Kicinski commit da7d4b42caf1b4d6ba3447bfd9ed185479fb0fe4 Author: John Fraker Date: Mon Nov 27 16:26:48 2023 -0800 gve: Remove dependency on 4k page size. Prior to this change, gve crashes when attempting to run in kernels with page sizes other than 4k. This change removes unnecessary references to PAGE_SIZE and replaces them with more meaningful constants. Signed-off-by: Jordan Kimbrough Signed-off-by: John Fraker Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20231128002648.320892-6-jfraker@google.com Signed-off-by: Jakub Kicinski commit 513072fb4bf816686473eec897194ce6a28e53db Author: John Fraker Date: Mon Nov 27 16:26:47 2023 -0800 gve: Add page size register to the register_page_list command. This register is required on platforms with page sizes greater than 4k. This is because the tx side of the driver vmaps the entire queue page list of pages into a single flat address space, then uses the entire space. Without communicating the guest page size to the backend, the backend will only access the first 4k of each page in the queue page list. Signed-off-by: Jordan Kimbrough Signed-off-by: John Fraker Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20231128002648.320892-5-jfraker@google.com Signed-off-by: Jakub Kicinski commit ce260cb114bbf65d53834c712729429b2233f5fd Author: John Fraker Date: Mon Nov 27 16:26:46 2023 -0800 gve: Remove obsolete checks that rely on page size. These checks are safe to remove as they are no longer enforced by the backend. Retaining them would require updating them to work differently with page sizes larger than 4k. Signed-off-by: Jordan Kimbrough Signed-off-by: John Fraker Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20231128002648.320892-4-jfraker@google.com Signed-off-by: Jakub Kicinski commit 8ae980d24195f25d639e9f05421fcf80c5c64b3f Author: John Fraker Date: Mon Nov 27 16:26:45 2023 -0800 gve: Deprecate adminq_pfn for pci revision 0x1. adminq_pfn assumes a page size of 4k, causing this mechanism to break in kernels compiled with different page sizes. A new PCI device revision was needed for the device to be able to communicate with the driver how to set up the admin queue prior to having access to the admin queue. Signed-off-by: Jordan Kimbrough Signed-off-by: John Fraker Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20231128002648.320892-3-jfraker@google.com Signed-off-by: Jakub Kicinski commit 955f4d3bf0a454bc76c6393d74d844556d61b520 Author: John Fraker Date: Mon Nov 27 16:26:44 2023 -0800 gve: Perform adminq allocations through a dma_pool. This allows the adminq to be smaller than a page, paving the way for non 4k page support. This is to support platforms where PAGE_SIZE is not 4k, such as some ARM platforms. Signed-off-by: Jordan Kimbrough Signed-off-by: John Fraker Reviewed-by: Willem de Bruijn Link: https://lore.kernel.org/r/20231128002648.320892-2-jfraker@google.com Signed-off-by: Jakub Kicinski commit fd2a9b29dc9c4c35def91d5d1c5b470843539de6 Author: Tatsunosuke Tobita Date: Wed Nov 15 08:57:29 2023 +0900 HID: wacom: Remove AES power_supply after extended inactivity Even if a user does not use their AES pen for an extended period, the battery power supply attributes continue to exist. This results in the desktop showing battery status for a pen that is no longer in use and which may in fact be in a different state (e.g. the user may be charging the pen). To avoid confusion and ensure userspace has an accurate view of the battery state, this patch automatically removes the power_supply after 30 minutes of inactivity. Signed-off-by: Tatsunosuke Tobita Reviewed-by: Jason Gerecke Reviewed-by: Aaron Skomra Reviewed-by: Josh Dickens Link: https://lore.kernel.org/r/20231114235729.6867-1-tatsunosuke.wacom@gmail.com Signed-off-by: Benjamin Tissoires commit 8dfce5f3095b79236b585bfa0e291b77ba4b6dbd Author: Ville Syrjälä Date: Mon Nov 27 16:50:28 2023 +0200 drm/i915: Clean up some DISPLAY_VER checks Use the >= and < operators for the DISPLAY_VER checks everywhere. This is what most of the code does, but especially recently random pieces of code have started doing this differently for no good reason. Conversion done with the following cocci: @find@ expression i915; constant ver; @@ ( DISPLAY_VER(i915) <= ver | DISPLAY_VER(i915) > ver ) @script:python inc@ old_ver << find.ver; new_ver; @@ coccinelle.new_ver = str(int(old_ver) + 1) @@ expression find.i915; constant find.ver; identifier inc.new_ver; @@ ( - DISPLAY_VER(i915) <= ver + DISPLAY_VER(i915) < new_ver | - DISPLAY_VER(i915) > ver + DISPLAY_VER(i915) >= new_ver ) Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231127145028.4899-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 9c058492b16f90bb772cb0dad567e8acc68e155d Author: Ville Syrjälä Date: Mon Nov 27 16:50:27 2023 +0200 drm/i915/mst: Reject modes that require the bigjoiner We have no bigjoiner support in the MST code, so .mode_valid() pretending otherwise is just going to result black screens for users. Reject any mode that needs the joiner. Cc: stable@vger.kernel.org Cc: Stanislav Lisovskiy Fixes: d51f25eb479a ("drm/i915: Add DSC support to MST path") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231127145028.4899-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c1799032d2ef6616113b733428dfaa2199a5604b Author: Ville Syrjälä Date: Mon Nov 27 16:50:26 2023 +0200 drm/i915/mst: Fix .mode_valid_ctx() return values .mode_valid_ctx() returns an errno, not the mode status. Fix the code to do the right thing. Cc: stable@vger.kernel.org Cc: Stanislav Lisovskiy Fixes: d51f25eb479a ("drm/i915: Add DSC support to MST path") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231127145028.4899-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e0ef2daa8ca8ce4dbc2fd0959e383b753a87fd7d Author: Ville Syrjälä Date: Mon Nov 27 16:50:25 2023 +0200 drm/i915: Skip some timing checks on BXT/GLK DSI transcoders Apparently some BXT/GLK systems have DSI panels whose timings don't agree with the normal cpu transcoder hblank>=32 limitation. This is perhaps fine as there are no specific hblank/etc. limits listed for the BXT/GLK DSI transcoders. Move those checks out from the global intel_mode_valid() into into connector specific .mode_valid() hooks, skipping BXT/GLK DSI connectors. We'll leave the basic [hv]display/[hv]total checks in intel_mode_valid() as those seem like sensible upper limits regardless of the transcoder used. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9720 Fixes: 8f4b1068e7fc ("drm/i915: Check some transcoder timing minimum limits") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231127145028.4899-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit fcebbe2fa3443e400657d71182610219750d1c1e Author: Ville Syrjälä Date: Fri Nov 24 10:27:31 2023 +0200 drm/i915/psr: Include some basic PSR information in the state dump Currently no one can figure out what the PSR code is doing since we're including any of it in the basic state dump. Add at least the bare minimum there. v2: Also dump has_panel_replay (Jouni) Cc: Jouni Högander Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231124082735.25470-1-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit edc8fc01f608108b0b7580cb2c29dfb5135e5f0e Author: Peter Zijlstra Date: Wed Nov 15 10:13:23 2023 -0500 x86: Fix CPUIDLE_FLAG_IRQ_ENABLE leaking timer reprogram intel_idle_irq() re-enables IRQs very early. As a result, an interrupt may fire before mwait() is eventually called. If such an interrupt queues a timer, it may go unnoticed until mwait returns and the idle loop handles the tick re-evaluation. And monitoring TIF_NEED_RESCHED doesn't help because a local timer enqueue doesn't set that flag. The issue is mitigated by the fact that this idle handler is only invoked for shallow C-states when, presumably, the next tick is supposed to be close enough. There may still be rare cases though when the next tick is far away and the selected C-state is shallow, resulting in a timer getting ignored for a while. Fix this with using sti_mwait() whose IRQ-reenablement only triggers upon calling mwait(), dealing with the race while keeping the interrupt latency within acceptable bounds. Fixes: c227233ad64c (intel_idle: enable interrupts before C1 on Xeons) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20231115151325.6262-3-frederic@kernel.org commit 7d09a052a3bdb62de9a86d43359d6c22eeaf105a Author: Frederic Weisbecker Date: Wed Nov 15 10:13:22 2023 -0500 x86: Add a comment about the "magic" behind shadow sti before mwait Add a note to make sure we never miss and break the requirements behind it. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20231115151325.6262-2-frederic@kernel.org commit 5431fdd2c181dd2eac218e45b44deb2925fa48f0 Author: Peter Zijlstra Date: Sun Sep 17 13:24:21 2023 +0200 ptrace: Convert ptrace_attach() to use lock guards Created as testing for the conditional guard infrastructure. Specifically this makes use of the following form: scoped_cond_guard (mutex_intr, return -ERESTARTNOINTR, &task->signal->cred_guard_mutex) { ... } ... return 0; Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Oleg Nesterov Link: https://lkml.kernel.org/r/20231102110706.568467727%40infradead.org commit 418146e39891ef1fb2284dee4cabbfe616cd21cf Author: Elliot Berman Date: Mon Nov 20 09:36:32 2023 -0800 freezer,sched: Clean saved_state when restoring it during thaw Clean saved_state after using it during thaw. Cleaning the saved_state allows us to avoid some unnecessary branches in ttwu_state_match. Signed-off-by: Elliot Berman Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231120-freezer-state-multiple-thaws-v1-2-f2e1dd7ce5a2@quicinc.com commit 5068d84054b766efe7c6202fc71b2350d1c326f1 Author: Yiwei Lin Date: Fri Nov 17 16:01:06 2023 +0800 sched/fair: Update min_vruntime for reweight_entity() correctly Since reweight_entity() may have chance to change the weight of cfs_rq->curr entity, we should also update_min_vruntime() if this is the case Fixes: eab03c23c2a1 ("sched/eevdf: Fix vruntime adjustment on reweight") Signed-off-by: Yiwei Lin Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Abel Wu Link: https://lore.kernel.org/r/20231117080106.12890-1-s921975628@gmail.com commit 9cce9c4806a89439ea34aad2e382150d68c7ea95 Author: Arnd Bergmann Date: Wed Nov 29 12:31:17 2023 +0100 ASoC: fsl_rpmsg: update Kconfig dependencies SND_SOC_IMX_RPMSG gained a new dependency and gets selected by SND_SOC_FSL_RPMSG, which as a result needs to have the same dependency, or produce a build failure based on that: WARNING: unmet direct dependencies detected for SND_SOC_IMX_RPMSG Depends on [n]: SOUND [=y] && SND [=y] && SND_SOC [=y] && SND_IMX_SOC [=y] && RPMSG [=y] && OF [=y] && I2C [=n] Selected by [y]: - SND_SOC_FSL_RPMSG [=y] && SOUND [=y] && SND [=y] && SND_SOC [=y] && COMMON_CLK [=y] && RPMSG [=y] && (SND_IMX_SOC [=y] || SND_IMX_SOC [=y]=n) && SND_IMX_SOC [=y]!=n x86_64-linux-ld: sound/soc/fsl/imx-rpmsg.o: in function `imx_rpmsg_late_probe': imx-rpmsg.c:(.text+0x11e): undefined reference to `i2c_find_device_by_fwnode' Fixes: f83d38def6b1 ("ASoC: imx-rpmsg: SND_SOC_IMX_RPMSG should depend on OF and I2C") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20231129113204.2869356-1-arnd@kernel.org Signed-off-by: Mark Brown commit 8f464a410944650adc8d75c7711d7d56c5506da0 Author: Baofeng Tian Date: Wed Nov 29 14:22:34 2023 +0200 ASoC: SOF: ipc4-topology: Add module ID print during module set up This module ID will be used for module performance automatic analysis for different modules, module name, module ID and module instance ID will be combined as a new generated ID for current module, this ID will be further used by analysis tools to identify current module. Take below case as example: 0x030006 gain.11.1 3 is module instance ID, 6 is module ID and gain.11.1 is module name. For pipeline widget print, keep as it is. Signed-off-by: Baofeng Tian Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Péter Ujfalusi Reviewed-by: Chao Song Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231129122234.14515-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e9a92dfc8d4fde6f7adb978fb13d0b0834567cc5 Author: Colin Ian King Date: Wed Nov 29 09:09:58 2023 +0000 ASoC: core: Fix a handful of spelling mistakes. There is a spelling mistake in a dev_err message and several spelling mistakes in comments. Fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20231129090958.815775-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit 729bb2cd2e0601ac6d52c53535a543b9db196fad Author: Peter Ujfalusi Date: Wed Nov 29 14:28:05 2023 +0200 ASoC: SOF: ipc4: Move window offset configuration earlier With the added exception handling support if the firmware fails to boot up we are trying to do a panic dump from the telemetry slot. The slot offsets would have been configured only after receiving the FW_READY message which makes this panic dump unusable for early boot failures. With IPC4 the DSP window offsets are at standard places unlike IPC3 where the offsets needs to be queried from the FW_READY message. Move the offset configuration to sof_ipc4_init from the fw_ready handler. Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231129122805.10635-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2bd512626f8ea3957c981cadd2ebf75feff737dd Author: Bard Liao Date: Wed Nov 29 14:20:21 2023 +0200 ASoC: SOF: ipc4: check return value of snd_sof_ipc_msg_data snd_sof_ipc_msg_data could return error. Signed-off-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231129122021.679-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 6c393ebbd74ad341bcfb4e2d0091b2655fad45d0 Author: Peter Ujfalusi Date: Wed Nov 29 14:53:27 2023 +0200 ASoC: SOF: core: Implement IPC version fallback if firmware files are missing If a firmware file is missing for the selected IPC type then try to switch to other supported IPC type and check if that one can be used instead. If for example a platform is changed to IPC4 as default version but the given machine does not yet have the needed topology file created then we will fall back to IPC3 which should have all the needed files. Relocate the sof_init_environment() to be done at a later phase, in sof_probe_continue(). This will only have changes in behavior if CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE is enabled (Intel HDA platforms) by not failing the module probe, but it is not going to be different case compared to for example failed firmware booting or topology loading error. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-14-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9b6896538ea71b7c24da1ecb38738a311176f6a8 Author: Peter Ujfalusi Date: Wed Nov 29 14:53:26 2023 +0200 ASoC: SOF: Intel: Do not use resource managed allocation for ipc4_data Manage the ipc4_data allocation in code instead of devm since the ops_init might be called more than once due to IPC type fallback. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-13-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit a5a65437b02df8b842c4620b0b776bcd91ce200a Author: Peter Ujfalusi Date: Wed Nov 29 14:53:25 2023 +0200 ASoC: SOF: core: Add helper for initialization of paths, ops Add sof_init_environment() as a helper function to contain path and ops initialization. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 8a83f180abb5b95f524fc9b5eb2291f0e39bed30 Author: Peter Ujfalusi Date: Wed Nov 29 14:53:24 2023 +0200 ASoC: SOF: sof-pci-dev: Rely on core to create the file paths The core is now using the information from ipc_file_profile_base to create the paths for the loadable files, no need to set it in here anymore. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 8616168928f278723fdc3f4d7cd3d611dcdae8f8 Author: Peter Ujfalusi Date: Wed Nov 29 14:53:23 2023 +0200 ASoC: SOF: sof-of-dev: Rely on core to create the file paths The core is now using the information from ipc_file_profile_base to create the paths for the loadable files, no need to set it in here anymore. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit b2b0bba36f0a81743e7143a8801ca75d2238bdac Author: Peter Ujfalusi Date: Wed Nov 29 14:53:22 2023 +0200 ASoC: SOF: sof-acpi-dev: Rely on core to create the file paths The core is now using the information from ipc_file_profile_base to create the paths for the loadable files, no need to set it in here anymore. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit b1a4ee9fd5a2dfb0f23abe58377f816915ec14ba Author: Peter Ujfalusi Date: Wed Nov 29 14:53:21 2023 +0200 ASoC: SOF: core: Implement firmware, topology path setup in core Use the information stored in ipc_file_profile_base by platforms to construct the paths, filenames that are going to be used to load the firmware and topology files. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 59ddeae037b81303063bcf62b70fb33841b3f89e Author: Peter Ujfalusi Date: Wed Nov 29 14:53:20 2023 +0200 ASoC: SOF: sof-pci-dev: Save the default IPC type and path overrides Store the default IPC type and the overrides to ipc_file_profile_base Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 396016d56da4ad30fe9ff736e44d9e1457484805 Author: Peter Ujfalusi Date: Wed Nov 29 14:53:19 2023 +0200 ASoC: SOF: sof-of-dev: Save the default IPC type and path overrides Store the default IPC type and the firmware and topology path overrides to ipc_file_profile_base Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit a07625dcaf994ab3c5a6a456624719df05ed8ad6 Author: Peter Ujfalusi Date: Wed Nov 29 14:53:18 2023 +0200 ASoC: SOF: sof-acpi-dev: Save the default IPC type and path overrides Store the default IPC type and the firmware and topology path overrides to ipc_file_profile_base Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1162d267eabd6392d0d07bc88b75056e88042fc0 Author: Peter Ujfalusi Date: Wed Nov 29 14:53:17 2023 +0200 ASoC: SOF: Add placeholder for platform IPC type and path overrides Add a struct sof_loadable_file_profile which can be filled by platforms (sof-acpi-dev.c, sof-of-dev.c and sof-acpi-dev.c) to be able to use common, generic code to handle path customization. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3bc3477915587440035f192c89a1bf9a4360abb3 Author: Peter Ujfalusi Date: Wed Nov 29 14:53:16 2023 +0200 ASoC: SOF: Move sof_machine_* functions from sof-audio.c to core.c Relocate the machine handling functions from sof-audio.c to core.c to maintain code separation. While doing the move, drop the redundant IS_ERR_OR_NULL(plat_data->pdev_mach) check from sof_machine_unregister() Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 014fdeb0d747304111cfecf93df4407c1a0c80db Author: Peter Ujfalusi Date: Wed Nov 29 14:53:15 2023 +0200 ASoC: SOF: Move sof_of_machine_select() to sof-of-dev.c from sof-audio.c Move the sof_of_machine_select() function to sof-of-dev.c file and provide an inline stub in case of non OF builds. Signed-off-by: Peter Ujfalusi Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20231129125327.23708-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 2adc886244dff60f948497b59affb6c6ebb3c348 Author: Minsuk Kang Date: Wed Nov 22 20:31:04 2023 +0200 wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus() Fix an array-index-out-of-bounds read in ath9k_htc_txstatus(). The bug occurs when txs->cnt, data from a URB provided by a USB device, is bigger than the size of the array txs->txstatus, which is HTC_MAX_TX_STATUS. WARN_ON() already checks it, but there is no bug handling code after the check. Make the function return if that is the case. Found by a modified version of syzkaller. UBSAN: array-index-out-of-bounds in htc_drv_txrx.c index 13 is out of range for type '__wmi_event_txstatus [12]' Call Trace: ath9k_htc_txstatus ath9k_wmi_event_tasklet tasklet_action_common __do_softirq irq_exit_rxu sysvec_apic_timer_interrupt Signed-off-by: Minsuk Kang Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231113065756.1491991-1-linuxlovemin@yonsei.ac.kr commit d6e71dd1e49e740d4bb0725cd802dab9008cd394 Author: Wu Yunchuan Date: Wed Nov 22 20:31:03 2023 +0200 wifi: ath9k: Remove unnecessary (void*) conversions No need cast (void *) to (struct owl_ctx *), (struct ath_hw *), (struct cmd_buf *) or other types. Signed-off-by: Wu Yunchuan Reviewed-by: Jeff Johnson Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20230919045226.524544-1-yunchuan@nfschina.com commit 9f1eebf0454dc97512cdd74b9be38330734a0f86 Author: Karthikeyan Periyasamy Date: Wed Nov 22 20:31:02 2023 +0200 wifi: ath12k: refactor DP Rxdma ring structure Currently data path Rxdma ring structure store the IDR buffer and lock. These IDR handling is needed only for SW cookie conversion and not needed for HW cookie conversion. REO Rxdma ring use the HW cookie conversion and monitor Rxdma ring use the SW cookie conversion. Since idr not needed for REO Rxdma ring, remove the IDR data entity from the data path Rxdma ring structure. Introduce the new data path ring structure for monitor rxmda rings since it need IDR data entity. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231111043934.20485-5-quic_periyasa@quicinc.com commit 4d922ce983cbb9d8f57335acb62d67697ac45202 Author: Karthikeyan Periyasamy Date: Wed Nov 22 20:31:02 2023 +0200 wifi: ath12k: avoid explicit HW conversion argument in Rxdma replenish Currently Rxdma replenish require HW conversion argument which is unnecessary argument since ath12k driver configures the Rxdma only in HW conversion. To optimize the rx data path per packet, avoid the explicit unnecessary argument and condition check in the rx replenish. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231111043934.20485-4-quic_periyasa@quicinc.com commit d457f9fe863df2e15ea1815dfe836020d436ea29 Author: Karthikeyan Periyasamy Date: Wed Nov 22 20:31:02 2023 +0200 wifi: ath12k: avoid explicit RBM id argument in Rxdma replenish Currently all Rxdma replenish callers pass the same return buffer manager id argument, so make it implicitly. To optimize the rx data path per packet, avoid the explicit unnecessary argument in Rxdma replenish function. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231111043934.20485-3-quic_periyasa@quicinc.com commit d281a574f1332ad185faebe433f790abf4eb3b58 Author: Karthikeyan Periyasamy Date: Wed Nov 22 20:31:02 2023 +0200 wifi: ath12k: avoid explicit mac id argument in Rxdma replenish Currently all Rxdma replenish callers pass zero for the mac id argument, so make it as zero implicitly. To optimize the rx data path per packet, avoid the explicit unnecessary argument in Rxdma replenish function. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231111043934.20485-2-quic_periyasa@quicinc.com commit 898d8b3e1414cd900492ee6a0b582f8095ba4a1a Author: Karthikeyan Periyasamy Date: Wed Nov 22 20:31:02 2023 +0200 wifi: ath12k: fix the error handler of rfkill config When the core rfkill config throws error, it should free the allocated resources. Currently it is not freeing the core pdev create resources. Avoid this issue by calling the core pdev destroy in the error handler of core rfkill config. Found this issue in the code review and it is compile tested only. Fixes: 004ccbc0dd49 ("wifi: ath12k: add support for hardware rfkill for WCN7850") Signed-off-by: Karthikeyan Periyasamy Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231111040107.18708-1-quic_periyasa@quicinc.com commit c7b4f54112e188359844016e982c4d14d95a00ae Author: James Prestwood Date: Mon Nov 13 07:35:44 2023 -0800 wifi: ath12k: use select for CRYPTO_MICHAEL_MIC Let ath12k select this option automatically which makes building more intuitive if the user enables this driver (rather than the driver not building unless CRYPTO_MICHAEL_MIC is explicitly enabled). Further investigation shows that ath11k and ath12k are the only who use 'depends on' with CRYPTO_MICHAEL_MIC: ./drivers/net/wireless/intel/ipw2x00/Kconfig: select CRYPTO_MICHAEL_MIC ./drivers/net/wireless/intersil/hostap/Kconfig: select CRYPTO_MICHAEL_MIC ./drivers/net/wireless/intersil/orinoco/Kconfig: select CRYPTO_MICHAEL_MIC ./drivers/net/wireless/ath/ath11k/Kconfig: depends on CRYPTO_MICHAEL_MIC ./drivers/net/wireless/ath/ath12k/Kconfig: depends on CRYPTO_MICHAEL_MIC ./drivers/staging/rtl8192e/Kconfig: select CRYPTO_MICHAEL_MIC ./drivers/staging/ks7010/Kconfig: select CRYPTO_MICHAEL_MIC Signed-off-by: James Prestwood Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231113153544.282461-2-prestwoj@gmail.com commit a466027abe4af3a39bf1d450e8cacd34a63b7edf Author: James Prestwood Date: Mon Nov 13 07:35:43 2023 -0800 wifi: ath11k: use select for CRYPTO_MICHAEL_MIC Let ath11k select this option automatically which makes building more intuitive if the user enables this driver (rather than the driver not building unless CRYPTO_MICHAEL_MIC is explicitly enabled). Further investigation shows that ath11k and ath12k are the only who use 'depends on' with CRYPTO_MICHAEL_MIC: ./drivers/net/wireless/intel/ipw2x00/Kconfig: select CRYPTO_MICHAEL_MIC ./drivers/net/wireless/intersil/hostap/Kconfig: select CRYPTO_MICHAEL_MIC ./drivers/net/wireless/intersil/orinoco/Kconfig: select CRYPTO_MICHAEL_MIC ./drivers/net/wireless/ath/ath11k/Kconfig: depends on CRYPTO_MICHAEL_MIC ./drivers/net/wireless/ath/ath12k/Kconfig: depends on CRYPTO_MICHAEL_MIC ./drivers/staging/rtl8192e/Kconfig: select CRYPTO_MICHAEL_MIC ./drivers/staging/ks7010/Kconfig: select CRYPTO_MICHAEL_MIC Signed-off-by: James Prestwood Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231113153544.282461-1-prestwoj@gmail.com commit 8813e86f6d82a7931446c3cbc5d596f77d0f1ba6 Author: Thomas Zimmermann Date: Mon Nov 27 14:16:01 2023 +0100 fbdev: Remove default file-I/O implementations Drop the default implementations for file read, write and mmap operations. Each fbdev driver must now provide an implementation and select any necessary helpers. If no implementation has been set, fbdev returns an errno code to user space. The code is the same as if the operation had not been set in the file_operations struct. This change makes the fbdev helpers for I/O memory optional. Most systems only use system-memory framebuffers via DRM's fbdev emulation. v2: * warn once if I/O callbacks are missing (Javier) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-33-tzimmermann@suse.de commit b3e8813773c568fd2d65e9752abfda27442e502e Author: Thomas Zimmermann Date: Mon Nov 27 14:16:00 2023 +0100 fbdev: Warn on incorrect framebuffer access Test in framebuffer read, write and drawing helpers if FBINFO_VIRTFB has been set correctly. Framebuffers in I/O memory should only be accessed with the architecture's respective helpers. Framebuffers in system memory should be accessed with the regular load and store operations. Presumably not all drivers get this right, so we now warn about it. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-32-tzimmermann@suse.de commit 33253d9e01d40542f07aaf718a655893cd2949e5 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:59 2023 +0100 fbdev: Move default fb_mmap code into helper function Move the default fb_mmap code for I/O address spaces into the helper function fb_io_mmap(). The helper can either be called via struct fb_ops.fb_mmap or as the default if no fb_mmap has been set. Also set the new helper in __FB_DEFAULT_IOMEM_OPS_MMAP. In the mid-term, fb_io_mmap() is supposed to become optional. Fbdev drivers will initialize their struct fb_ops.fb_mmap to the helper and select a corresponding Kconfig token. The helper can then be made optional at compile time. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-31-tzimmermann@suse.de commit 76f92201b821dd2f442ebe37ec9b52b525855bac Author: Thomas Zimmermann Date: Mon Nov 27 14:15:58 2023 +0100 fbdev: Push pgprot_decrypted() into mmap implementations If a driver sets struct fb_ops.fb_mmap, the fbdev core automatically calls pgprot_decrypted(). But the default fb_mmap code doesn't handle pgprot_decrypted(). Move the call to pgprot_decrypted() into each drivers' fb_mmap function. This only concerns fb_mmap functions for system and DMA memory. For I/O memory, which is the default case, nothing changes. The fb_mmap for I/O-memory can later be moved into a helper as well. DRM's fbdev emulation handles pgprot_decrypted() internally via the Prime helpers. Fbdev doesn't have to do anything in this case. In cases where DRM uses deferred I/O, this patch updates fb_mmap correctly. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-30-tzimmermann@suse.de commit 23dad7b95fea68426311405a0627b90c06c3fc34 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:57 2023 +0100 fbdev: Remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-29-tzimmermann@suse.de commit 27ad64eac10fcb25fcbfb813921f4d30b3458e13 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:56 2023 +0100 fbdev: Rename FB_SYS_FOPS token to FB_SYSMEM_FOPS Rename the token to harmonize naming among various helpers. For example, I/O-memory helpers use FB_IOMEM_FOPS. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-28-tzimmermann@suse.de commit dc0ad215e5d8524bd72180206e042d904fcc1d4f Author: Thomas Zimmermann Date: Mon Nov 27 14:15:55 2023 +0100 staging/sm750fb: Initialize fb_ops with fbdev macros Initialize all instances of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Cc: Sudip Mukherjee Cc: Teddy Wang Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Reviewed-by: Javier Martinez Canillas Acked-by: Greg Kroah-Hartman Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-27-tzimmermann@suse.de commit f7c8a046577e09d8f88213c985d102604e73ed4c Author: Thomas Zimmermann Date: Mon Nov 27 14:15:54 2023 +0100 staging/sm750fb: Declare fb_ops as constant Split up lynxfb_ops and declare each as constant. The fb_ops instance used to be modified while initializing the driver. It is now constant and the driver picks the correct instance, depending on the settings for acceleration and cursor support. Signed-off-by: Thomas Zimmermann Cc: Sudip Mukherjee Cc: Teddy Wang Cc: Greg Kroah-Hartman Cc: linux-staging@lists.linux.dev Acked-by: Javier Martinez Canillas Acked-by: Greg Kroah-Hartman Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-26-tzimmermann@suse.de commit e0f05e643eb1ff9588d38c46ad12ff74efb09959 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:53 2023 +0100 fbdev/cyber2000fb: Initialize fb_ops with fbdev macros Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-25-tzimmermann@suse.de commit 11754a5046080a02ecf8a78bd80644e0dae56362 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:52 2023 +0100 fbdev/wm8505fb: Initialize fb_ops to fbdev I/O-memory helpers Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in DMA-able address space. This explictily sets the read/write, draw and mmap callbacks to the correct default implementation. Also select the necessary helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requireing the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Set the callbacks via macros. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-24-tzimmermann@suse.de commit 63a11adaceb8b77d70bcce0890197fa9462ce160 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:51 2023 +0100 fbdev/vt8500lcdfb: Initialize fb_ops with fbdev macros Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in DMA-able virtual address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-23-tzimmermann@suse.de commit dec2d60923dbda7c26a6194a0ed9fff9dc20cd69 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:50 2023 +0100 fbdev/clps711x-fb: Initialize fb_ops with fbdev macros Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. The driver previously selected drawing ops for system memory although it operates on I/O memory. Fixed now. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-22-tzimmermann@suse.de commit bff13b8f2c5a38f7216ea9ce40aae88694a2b196 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:49 2023 +0100 media/ivtvfb: Initialize fb_ops to fbdev I/O-memory helpers Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in I/O address space. This explictily sets the read/write, draw and mmap callbacks to the correct default implementation. Fbdev drivers sometimes rely on the callbacks being NULL for a default implementation to be invoked; hence requireing the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Set the callbacks via macros. No functional changes. Signed-off-by: Thomas Zimmermann Cc: Andy Walls Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Reviewed-by: Javier Martinez Canillas Reviewed-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-21-tzimmermann@suse.de commit 741effeab963073c257ad1bcfac6c355d0eca966 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:48 2023 +0100 fbdev/ps3fb: Initialize fb_ops with fbdev macros Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in virtual address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-20-tzimmermann@suse.de commit cccc934a74487dcf1407918a0739d0923a3c4cc0 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:47 2023 +0100 fbdev/ps3fb: Set FBINFO_VIRTFB flag The ps3fb driver operates on system memory. Mark the framebuffer accordingly. Helpers operating on the framebuffer memory will test for the presence of this flag. Signed-off-by: Thomas Zimmermann Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-19-tzimmermann@suse.de commit dfc3052256e024057ea8a6fbfa2691bb87fea343 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:46 2023 +0100 fbdev/au1200fb: Initialize fb_ops with fbdev macros Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in DMA-able virtual address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-18-tzimmermann@suse.de commit cb99b486a5bcc9b9a0c869774137fe40c48cf2f4 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:45 2023 +0100 fbdev/au1200fb: Set FBINFO_VIRTFB flag The au1200fb driver operates on DMA-able system memory. Mark the framebuffer accordingly. Helpers operating on the framebuffer memory will test for the presence of this flag. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-17-tzimmermann@suse.de commit c9496954c138b96964a2fa24bccbe5a4c3ad796f Author: Thomas Zimmermann Date: Mon Nov 27 14:15:44 2023 +0100 fbdev/udlfb: Select correct helpers The driver uses deferred I/O. Select the correct helpers via FB_SYSMEM_HELPERS_DEFERRED in the Kconfig file. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-16-tzimmermann@suse.de commit 133a2ca22e11041f891e6fbbf398d0dfd8b07c0c Author: Thomas Zimmermann Date: Mon Nov 27 14:15:43 2023 +0100 fbdev/smscufx: Select correct helpers The driver uses deferred I/O. Select the correct helpers via FB_SYSMEM_HELPERS_DEFERRED in the Kconfig file. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-15-tzimmermann@suse.de commit 01f4fbb3bd265167cdd20ed5ff8250199a0d189e Author: Thomas Zimmermann Date: Mon Nov 27 14:15:42 2023 +0100 fbdev/sh_mobile_lcdcfb: Initialize fb_ops with fbdev macros Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in DMA-able virtual address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. The driver uses a mixture of DMA helpers and deferred I/O. That probably needs fixing by a driver maintainer. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-14-tzimmermann@suse.de commit 46b655ceeed09363b810712525dc63b533e5cd0b Author: Thomas Zimmermann Date: Mon Nov 27 14:15:41 2023 +0100 fbdev/sh_mobile_lcdcfb: Set FBINFO_VIRTFB flag The sh_mobile_lcdcfb driver operates on DMA-able system memory. Mark the framebuffer accordingly. Helpers operating on the framebuffer memory will test for the presence of this flag. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-13-tzimmermann@suse.de commit bc4e90771c886086572c6bfabd57f7a6b492f52e Author: Thomas Zimmermann Date: Mon Nov 27 14:15:40 2023 +0100 hid/picolcd_fb: Set FBINFO_VIRTFB flag The picolcd_fb driver operates on system memory. Mark the framebuffer accordingly. Helpers operating on the framebuffer memory will test for the presence of this flag. Signed-off-by: Thomas Zimmermann Cc: "Bruno Prémont" Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Reviewed-by: Javier Martinez Canillas Acked-by: Bruno Prémont Acked-by: Jiri Kosina Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-12-tzimmermann@suse.de commit df558d53139f8adc7058b3dc17f01ae03c18a440 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:39 2023 +0100 auxdisplay/ht16k33: Initialize fb_ops with fbdev macros Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in virtual address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Cc: Miguel Ojeda Cc: Robin van der Gracht Reviewed-by: Javier Martinez Canillas Acked-by: Miguel Ojeda Reviewed-by: Robin van der Gracht Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-11-tzimmermann@suse.de commit 1d6796547a44fb44252c83b36609d0ae6624cd7c Author: Thomas Zimmermann Date: Mon Nov 27 14:15:38 2023 +0100 auxdisplay/ht16k33: Set FBINFO_VIRTFB flag The ht16k33 driver operates on system memory. Mark the framebuffer accordingly. Helpers operating on the framebuffer memory will test for the presence of this flag. Signed-off-by: Thomas Zimmermann Cc: Miguel Ojeda Cc: Robin van der Gracht Reviewed-by: Javier Martinez Canillas Acked-by: Miguel Ojeda Acked-by: Robin van der Gracht Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-10-tzimmermann@suse.de commit 36e6cacdb095e35f2389ba8829db12603133d61d Author: Thomas Zimmermann Date: Mon Nov 27 14:15:37 2023 +0100 auxdisplay/cfag12864bfb: Initialize fb_ops with fbdev macros Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in virtual address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Cc: Miguel Ojeda Reviewed-by: Javier Martinez Canillas Acked-by: Miguel Ojeda Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-9-tzimmermann@suse.de commit eba1418968264cb3f83ff1ce78270ccc9a729c22 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:36 2023 +0100 auxdisplay/cfag12864bfb: Set FBINFO_VIRTFB flag The cfag12864bfb driver operates on system memory. Mark the framebuffer accordingly. Helpers operating on the framebuffer memory will test for the presence of this flag. Signed-off-by: Thomas Zimmermann Cc: Miguel Ojeda Reviewed-by: Javier Martinez Canillas Acked-by: Miguel Ojeda Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-8-tzimmermann@suse.de commit 28f57d03f5a73ad7c5b07fd1414d816f15f7fb1d Author: Thomas Zimmermann Date: Mon Nov 27 14:15:35 2023 +0100 fbdev/arcfb: Use generator macros for deferred I/O Implement the driver's fops with the generator macros for deferred I/O. Only requires per-driver code for the on-scren scanout buffer. The generated helpers implement reading, writing and drawing on top of that. Also update the selected Kconfig tokens accordingly. Actual support for deferred I/O is missing from the driver. So writing to memory-mapped pages does not automatically update the scanout buffer. Signed-off-by: Thomas Zimmermann Cc: Jaya Kumar Acked-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-7-tzimmermann@suse.de commit 30b72c0bde93ae3001736b596cf94bfb47c5e159 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:34 2023 +0100 fbdev/arcfb: Set FBINFO_VIRTFB flag The arcfb driver operates on system memory. Mark the framebuffer accordingly. Helpers operating on the framebuffer memory will test for the presence of this flag. Signed-off-by: Thomas Zimmermann Cc: Jaya Kumar Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-6-tzimmermann@suse.de commit 853767b6b94630ac6388aa8e7893d3df26be53be Author: Thomas Zimmermann Date: Mon Nov 27 14:15:33 2023 +0100 fbdev/vfb: Initialize fb_ops with fbdev macros Initialize the instance of struct fb_ops with fbdev initializer macros for framebuffers in virtual address space. Set the read/write, draw and mmap callbacks to the correct implementation and avoid implicit defaults. Also select the necessary helpers in Kconfig. Fbdev drivers sometimes rely on the callbacks being NULL for a default I/O-memory-based implementation to be invoked; hence requiring the I/O helpers to be built in any case. Setting all callbacks in all drivers explicitly will allow to make the I/O helpers optional. This benefits systems that do not use these functions. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-5-tzimmermann@suse.de commit 63994d486c9fb5e780dabb0571c607c25d485421 Author: Thomas Zimmermann Date: Mon Nov 27 14:15:32 2023 +0100 fbdev/vfb: Set FBINFO_VIRTFB flag The vfb driver operates on system memory. Mark the framebuffer accordingly. Helpers operating on the framebuffer memory will test for the presence of this flag. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-4-tzimmermann@suse.de commit 12d55c013a09a2d490f004a324c20800e4ff35ec Author: Thomas Zimmermann Date: Mon Nov 27 14:15:31 2023 +0100 fbdev/sm712fb: Use correct initializer macros for struct fb_ops Only initialize mmap and draw helpers with macros; leave read/write callbacks to driver implementations. Fixes the following warnings: CC [M] drivers/video/fbdev/sm712fb.o sm712fb.c:1355:25: warning: initialized field overwritten [-Woverride-init] 1355 | .fb_fillrect = cfb_fillrect, | ^~~~~~~~~~~~ sm712fb.c:1355:25: note: (near initialization for 'smtcfb_ops.fb_fillrect') sm712fb.c:1356:25: warning: initialized field overwritten [-Woverride-init] 1356 | .fb_imageblit = cfb_imageblit, | ^~~~~~~~~~~~~ sm712fb.c:1356:25: note: (near initialization for 'smtcfb_ops.fb_imageblit') sm712fb.c:1357:25: warning: initialized field overwritten [-Woverride-init] 1357 | .fb_copyarea = cfb_copyarea, | ^~~~~~~~~~~~ sm712fb.c:1357:25: note: (near initialization for 'smtcfb_ops.fb_copyarea') sm712fb.c:1358:25: warning: initialized field overwritten [-Woverride-init] 1358 | .fb_read = smtcfb_read, | ^~~~~~~~~~~ sm712fb.c:1358:25: note: (near initialization for 'smtcfb_ops.fb_read') sm712fb.c:1359:25: warning: initialized field overwritten [-Woverride-init] 1359 | .fb_write = smtcfb_write, | ^~~~~~~~~~~~ sm712fb.c:1359:25: note: (near initialization for 'smtcfb_ops.fb_write') Signed-off-by: Thomas Zimmermann Fixes: 586132cf1d38 ("fbdev/sm712fb: Initialize fb_ops to fbdev I/O-memory helpers") Cc: Thomas Zimmermann Cc: Javier Martinez Canillas Cc: Sudip Mukherjee Cc: Teddy Wang Cc: Sam Ravnborg Cc: Helge Deller Cc: Arnd Bergmann Cc: linux-fbdev@vger.kernel.org Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-3-tzimmermann@suse.de commit b48807788e7a2bd93044fe84cfe8ff64b85ec15e Author: Thomas Zimmermann Date: Mon Nov 27 14:15:30 2023 +0100 fbdev/acornfb: Fix name of fb_ops initializer macro Fix build by using the correct name for the initializer macro for struct fb_ops. Signed-off-by: Thomas Zimmermann Fixes: 9037afde8b9d ("fbdev/acornfb: Use fbdev I/O helpers") Cc: Thomas Zimmermann Cc: Sam Ravnborg Cc: Helge Deller Cc: Javier Martinez Canillas Cc: Arnd Bergmann Cc: # v6.6+ Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231127131655.4020-2-tzimmermann@suse.de commit 05f5f73936fa4c1bc0a852702edf53789398d278 Author: Borislav Petkov (AMD) Date: Fri Nov 3 23:40:48 2023 +0100 x86/CPU/AMD: Drop now unused CPU erratum checking function Bye bye. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-14-bp@alien8.de commit 794c68b20408bb6899f90314e36e256924cc85a1 Author: Borislav Petkov (AMD) Date: Fri Nov 3 23:21:56 2023 +0100 x86/CPU/AMD: Get rid of amd_erratum_1485[] No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-13-bp@alien8.de commit b3ffbbd282d4eb79f489853a171242c2a06bd8b8 Author: Borislav Petkov (AMD) Date: Fri Nov 3 23:20:11 2023 +0100 x86/CPU/AMD: Get rid of amd_erratum_400[] Setting X86_BUG_AMD_E400 in init_amd() is early enough. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-12-bp@alien8.de commit 1709528f73d475d3c9ec514bc0dee0b41cadd871 Author: Borislav Petkov (AMD) Date: Fri Nov 3 19:58:53 2023 +0100 x86/CPU/AMD: Get rid of amd_erratum_383[] Set it in init_amd_gh() unconditionally as that is the F10h init function. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-11-bp@alien8.de commit 54c33e23f75d5c9925495231c57d3319336722ef Author: Borislav Petkov (AMD) Date: Fri Nov 3 19:53:49 2023 +0100 x86/CPU/AMD: Get rid of amd_erratum_1054[] No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-10-bp@alien8.de commit bfff3c6692ce64fa9d86eb829d18229c307a0855 Author: Borislav Petkov (AMD) Date: Wed Nov 1 12:52:01 2023 +0100 x86/CPU/AMD: Move the DIV0 bug detection to the Zen1 init function No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-9-bp@alien8.de commit f69759be251dce722942594fbc62e53a40822a82 Author: Borislav Petkov (AMD) Date: Wed Nov 1 12:38:35 2023 +0100 x86/CPU/AMD: Move Zenbleed check to the Zen2 init function Prefix it properly so that it is clear which generation it is dealing with. No functional changes. Signed-off-by: Borislav Petkov (AMD) Link: http://lore.kernel.org/r/20231120104152.13740-8-bp@alien8.de commit 7c81ad8e8bc28a1847e87c5afe1bae6bffb2f73e Author: Borislav Petkov (AMD) Date: Wed Nov 1 12:34:29 2023 +0100 x86/CPU/AMD: Rename init_amd_zn() to init_amd_zen_common() Call it from all Zen init functions. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-7-bp@alien8.de commit cfbf4f992bfce1fa9f2f347a79cbbea0368e7971 Author: Borislav Petkov (AMD) Date: Wed Nov 1 11:20:01 2023 +0100 x86/CPU/AMD: Call the spectral chicken in the Zen2 init function No functional change. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-6-bp@alien8.de commit 0da91912fc150d6d321b15e648bead202ced1a27 Author: Borislav Petkov (AMD) Date: Wed Nov 1 12:31:44 2023 +0100 x86/CPU/AMD: Move erratum 1076 fix into the Zen1 init function No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-5-bp@alien8.de commit affc66cb96f865b3763a8e18add52e133d864f04 Author: Borislav Petkov (AMD) Date: Wed Nov 1 11:28:31 2023 +0100 x86/CPU/AMD: Move the Zen3 BTC_NO detection to the Zen3 init function No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-4-bp@alien8.de commit a7c32a1ae9ee43abfe884f5af376877c4301d166 Author: Borislav Petkov (AMD) Date: Wed Nov 1 11:14:59 2023 +0100 x86/CPU/AMD: Carve out the erratum 1386 fix Call it on the affected CPU generations. No functional changes. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Link: http://lore.kernel.org/r/20231120104152.13740-3-bp@alien8.de commit 30fa92832f405d5ac9f263e99f62445fa3084008 Author: Borislav Petkov (AMD) Date: Tue Oct 31 23:30:59 2023 +0100 x86/CPU/AMD: Add ZenX generations flags Add X86_FEATURE flags for each Zen generation. They should be used from now on instead of checking f/m/s. Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Nikolay Borisov Acked-by: Thomas Gleixner Link: http://lore.kernel.org/r/20231120104152.13740-2-bp@alien8.de commit c3c46acd5be9a3351c163d2869045cab4d5342dc Author: Rob Herring Date: Tue Nov 28 15:47:58 2023 -0600 dt-bindings: reset: hisilicon,hi3660-reset: Drop providers and consumers from example Binding examples should generally only cover what the binding covers. A provider binding doesn't need to show consumers and vice-versa. The hisilicon,hi3660-reset binding example has both, so let's drop them. This also fixes an undocumented (by schema) compatible warning for "hisilicon,hi3660-iomcu". Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231128214759.3975428-1-robh@kernel.org Signed-off-by: Philipp Zabel commit 12f230c07a95d925d6af754485952515e7975127 Author: Muralidhara M K Date: Thu Nov 2 11:42:25 2023 +0000 EDAC/amd64: Add support for family 0x19, models 0x90-9f devices AMD Models 90h-9fh are APUs. They have built-in HBM3 memory. ECC support is enabled by default. APU models have a single Data Fabric (DF) per Package. Each DF is visible to the OS in the same way as chiplet-based systems like Zen2 CPUs and later. However, the Unified Memory Controllers (UMCs) are arranged in the same way as GPU-based MI200 devices rather than CPU-based systems. Use the existing gpu_ops for hetergeneous systems to support enumeration of nodes and memory topology with few fixups. [ bp: Massage comments. ] Signed-off-by: Muralidhara M K Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231102114225.2006878-5-muralimk@amd.com commit e3af7053de3f685c96158373bc234b2feca1f160 Author: Xin Ji Date: Mon Nov 20 17:10:37 2023 +0800 drm/bridge: anx7625: Fix Set HPD irq detect window to 2ms Polling firmware HPD GPIO status, set HPD irq detect window to 2ms after firmware HPD GPIO initial done Signed-off-by: Xin Ji Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20231120091038.284825-2-xji@analogixsemi.com commit af3145aa142c92409d3b123ff87ff0b5fd0bf849 Author: Xin Ji Date: Mon Nov 20 17:10:36 2023 +0800 Revert "drm/bridge: Add 200ms delay to wait FW HPD status stable" This reverts commit 330140d7319fcc4ec68bd924ea212e476bf12275 200ms delay will cause panel display image later than backlight turn on, revert this patch. Fixes: 330140d7319fcc ("drm/bridge: Add 200ms delay to wait FW HPD status stable") Signed-off-by: Xin Ji Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20231120091038.284825-1-xji@analogixsemi.com commit 791beae7335caa8d8579d201d7f9b18b4d8898e1 Author: Ilpo Järvinen Date: Fri Nov 24 11:09:15 2023 +0200 xtensa: Use PCI_HEADER_TYPE_MFD instead of literal Replace literal 0x80 with PCI_HEADER_TYPE_MFD. While at it, convert found_multi into boolean. Signed-off-by: Ilpo Järvinen Message-Id: <20231124090919.23687-3-ilpo.jarvinen@linux.intel.com> Signed-off-by: Max Filippov commit 6d638ab8c3df7a4674b4cd2e4cc9d4051587c729 Author: Masahiro Yamada Date: Mon Nov 27 00:12:22 2023 +0900 xtensa: replace with Commit ddb5cdbafaaa ("kbuild: generate KSYMTAB entries by modpost") deprecated , which is now a wrapper of . Replace #include with #include . Signed-off-by: Masahiro Yamada Message-Id: <20231126151222.1556761-1-masahiroy@kernel.org> Signed-off-by: Max Filippov commit 4ea6babbdd49d15c36665013e740f2e604d8841d Author: Yujie Liu Date: Wed Nov 29 17:13:37 2023 +0800 xtensa: fix variants path in the Kconfig help The directory in the path should be "variants" instead of "variant". Fixes: 420ae9518404 ("xtensa: simplify addition of new core variants") Signed-off-by: Yujie Liu Message-Id: <20231129091337.2084747-1-yujie.liu@intel.com> Signed-off-by: Max Filippov commit b844c6bae2b89b4a4e102eb326e35c632308dd85 Author: Vinod Govindapillai Date: Fri Nov 10 11:32:25 2023 +0200 drm/i915/xe2lpd: remove the FBC restriction if PSR2 is enabled In earlier versions, FBC was restricted if PSR2 is enabled. From xe2lpd onwards no such restrictions are needed anymore. HSD: 14014305387 Signed-off-by: Vinod Govindapillai Reviewed-by: Mika Kahola Signed-off-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20231110093225.39573-2-vinod.govindapillai@intel.com commit 40d0eb0259ae77ace3e81d7454d1068c38bc95c2 Merge: d4e7dd4842b19 8998a479fd96b Author: Andrii Nakryiko Date: Tue Nov 28 22:15:29 2023 -0800 Merge branch 'selftests-bpf-use-pkg-config-to-determine-ld-flags' Akihiko Odaki says: ==================== selftests/bpf: Use pkg-config to determine ld flags When linking statically, libraries may require other dependencies to be included to ld flags. In particular, libelf may require libzstd. Use pkg-config to determine such dependencies. V4 -> V5: Introduced variables LIBELF_CFLAGS and LIBELF_LIBS. (Daniel Borkmann) Added patch "selftests/bpf: Choose pkg-config for the target". V3 -> V4: Added "2> /dev/null". V2 -> V3: Added missing "echo". V1 -> V2: Implemented fallback, referring to HOSTPKG_CONFIG. ==================== Link: https://lore.kernel.org/r/20231125084253.85025-1-akihiko.odaki@daynix.com Signed-off-by: Andrii Nakryiko commit 8998a479fd96b0b209dcb2feb468eba7eddb4ddb Author: Akihiko Odaki Date: Sat Nov 25 17:42:52 2023 +0900 selftests/bpf: Use pkg-config for libelf When linking statically, libraries may require other dependencies to be included to ld flags. In particular, libelf may require libzstd. Use pkg-config to determine such dependencies. Signed-off-by: Akihiko Odaki Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231125084253.85025-4-akihiko.odaki@daynix.com commit 18f6f9de98d1d0f7040e6e6c39fce8939f55520f Author: Akihiko Odaki Date: Sat Nov 25 17:42:51 2023 +0900 selftests/bpf: Override PKG_CONFIG for static builds A library may need to depend on additional archive files for static builds so pkg-config should be instructed to list them. Signed-off-by: Akihiko Odaki Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231125084253.85025-3-akihiko.odaki@daynix.com commit 2ce344b6891618063c0bebe22d9cdf9c086e0aa8 Author: Akihiko Odaki Date: Sat Nov 25 17:42:50 2023 +0900 selftests/bpf: Choose pkg-config for the target pkg-config is used to build sign-file executable. It should use the library for the target instead of the host as it is called during tests. Signed-off-by: Akihiko Odaki Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231125084253.85025-2-akihiko.odaki@daynix.com commit d4e7dd4842b190e87a5b7179a460f54b13da3ac4 Merge: cf9791631027a a7795698f8b6c Author: Andrii Nakryiko Date: Tue Nov 28 21:50:10 2023 -0800 Merge branch 'bpf-add-link_info-support-for-uprobe-multi-link' Jiri Olsa says: ==================== bpf: Add link_info support for uprobe multi link hi, this patchset adds support to get bpf_link_info details for uprobe_multi links and adding support for bpftool link to display them. v4 changes: - move flags field up in bpf_uprobe_multi_link [Andrii] - include zero terminating byte in path_size [Andrii] - return d_path error directly [Yonghong] - use SEC(".probes") for semaphores [Yonghong] - fix ref_ctr_offsets leak in test [Yonghong] - other smaller fixes [Yonghong] thanks, jirka --- ==================== Link: https://lore.kernel.org/r/20231125193130.834322-1-jolsa@kernel.org Signed-off-by: Andrii Nakryiko commit a7795698f8b6c48283fa4334eb313bc1350b2864 Author: Jiri Olsa Date: Sat Nov 25 20:31:30 2023 +0100 bpftool: Add support to display uprobe_multi links Adding support to display details for uprobe_multi links, both plain: # bpftool link -p ... 24: uprobe_multi prog 126 uprobe.multi path /home/jolsa/bpf/test_progs func_cnt 3 pid 4143 offset ref_ctr_offset cookies 0xd1f88 0xf5d5a8 0xdead 0xd1f8f 0xf5d5aa 0xbeef 0xd1f96 0xf5d5ac 0xcafe and json: # bpftool link -p [{ ... },{ "id": 24, "type": "uprobe_multi", "prog_id": 126, "retprobe": false, "path": "/home/jolsa/bpf/test_progs", "func_cnt": 3, "pid": 4143, "funcs": [{ "offset": 860040, "ref_ctr_offset": 16111016, "cookie": 57005 },{ "offset": 860047, "ref_ctr_offset": 16111018, "cookie": 48879 },{ "offset": 860054, "ref_ctr_offset": 16111020, "cookie": 51966 } ] } ] Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Reviewed-by: Quentin Monnet Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20231125193130.834322-7-jolsa@kernel.org commit 147c69307bcf67f1f01246f9acb794da9837f299 Author: Jiri Olsa Date: Sat Nov 25 20:31:29 2023 +0100 selftests/bpf: Add link_info test for uprobe_multi link Adding fill_link_info test for uprobe_multi link. Setting up uprobes with bogus ref_ctr_offsets and cookie values to test all the bpf_link_info::uprobe_multi fields. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20231125193130.834322-6-jolsa@kernel.org commit 1703612885723869064f18e8816c6f3f87987748 Author: Jiri Olsa Date: Sat Nov 25 20:31:28 2023 +0100 selftests/bpf: Use bpf_link__destroy in fill_link_info tests The fill_link_info test keeps skeleton open and just creates various links. We are wrongly calling bpf_link__detach after each test to close them, we need to call bpf_link__destroy. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Acked-by: Yafang Shao Link: https://lore.kernel.org/bpf/20231125193130.834322-5-jolsa@kernel.org commit e56fdbfb06e26a7066b070967badef4148528df2 Author: Jiri Olsa Date: Sat Nov 25 20:31:27 2023 +0100 bpf: Add link_info support for uprobe multi link Adding support to get uprobe_link details through bpf_link_info interface. Adding new struct uprobe_multi to struct bpf_link_info to carry the uprobe_multi link details. The uprobe_multi.count is passed from user space to denote size of array fields (offsets/ref_ctr_offsets/cookies). The actual array size is stored back to uprobe_multi.count (allowing user to find out the actual array size) and array fields are populated up to the user passed size. All the non-array fields (path/count/flags/pid) are always set. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20231125193130.834322-4-jolsa@kernel.org commit 4930b7f53a298533bc31d7540b6ea8b79a000331 Author: Jiri Olsa Date: Sat Nov 25 20:31:26 2023 +0100 bpf: Store ref_ctr_offsets values in bpf_uprobe array We will need to return ref_ctr_offsets values through link_info interface in following change, so we need to keep them around. Storing ref_ctr_offsets values directly into bpf_uprobe array. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20231125193130.834322-3-jolsa@kernel.org commit 48f0dfd8d3e212ab27b6db147ed10407ff6aaa88 Author: Jiri Olsa Date: Sat Nov 25 20:31:25 2023 +0100 libbpf: Add st_type argument to elf_resolve_syms_offsets function We need to get offsets for static variables in following changes, so making elf_resolve_syms_offsets to take st_type value as argument and passing it to elf_sym_iter_new. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20231125193130.834322-2-jolsa@kernel.org commit f1be1e04c76bb9c44789d3575bba4418cf0ea359 Merge: cd04b44bf055c 95260816b4895 Author: Jakub Kicinski Date: Tue Nov 28 20:10:30 2023 -0800 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-11-27 (i40e, iavf) This series contains updates to i40e and iavf drivers. Ivan Vecera performs more cleanups on i40e and iavf drivers; removing unused fields, defines, and unneeded fields. Petr Oros utilizes iavf_schedule_aq_request() helper to replace open coded equivalents. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: iavf: use iavf_schedule_aq_request() helper iavf: Remove queue tracking fields from iavf_adminq_ring i40e: Remove queue tracking fields from i40e_adminq_ring i40e: Remove AQ register definitions for VF types i40e: Delete unused and useless i40e_pf fields ==================== Link: https://lore.kernel.org/r/20231127211037.1135403-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit cd04b44bf055c4cd6bcee2ebfa6932fb20ef369d Author: Heiner Kallweit Date: Mon Nov 27 21:16:10 2023 +0100 r8169: remove multicast filter limit Once upon a time, when r8169 was new, the multicast filter limit code was copied from RTL8139 driver. There the filter limit is even user-configurable. The filtering is hash-based and we don't have perfect filtering. Actually the mc filtering on RTL8125 still seems to be the same as used on 8390/NE2000. So it's not clear to me which benefit it should bring when switching to all-multi mode once a certain number of filter bits is set. More the opposite: Filtering out at least some unwanted mc traffic is better than no filtering. Also the available chip documentation doesn't mention any restriction. Therefore remove the filter limit. Signed-off-by: Heiner Kallweit Link: https://lore.kernel.org/r/57076c05-3730-40d1-ab9a-5334b263e41a@gmail.com Signed-off-by: Jakub Kicinski commit 1bc9d12e1c924b76fb71da97db8818eaae5c30a1 Author: Dan Carpenter Date: Mon Nov 27 15:59:17 2023 +0300 ice: fix error code in ice_eswitch_attach() Set the "err" variable on this error path. Fixes: fff292b47ac1 ("ice: add VF representors one by one") Signed-off-by: Dan Carpenter Reviewed-by: Wojciech Drewek Link: https://lore.kernel.org/r/e0349ee5-76e6-4ff4-812f-4aa0d3f76ae7@moroto.mountain Signed-off-by: Jakub Kicinski commit 4540c29ab9cc06d9c910e98ff9b13a06f7a3fd21 Author: Yu Xiao Date: Mon Nov 27 07:51:16 2023 +0200 nfp: ethtool: support TX/RX pause frame on/off Add support for ethtool -A tx on/off and rx on/off. Signed-off-by: Yu Xiao Signed-off-by: Louis Peens Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20231127055116.6668-1-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit 2d2cffdbbc21586b213e5e371680f9d934d3813b Author: Jean Delvare Date: Mon Nov 13 12:55:08 2023 +0100 drm/loongson: Add platform dependency Only offer the Loongson DRM driver as an option on platforms where it makes sense. Signed-off-by: Jean Delvare Cc: Sui Jingfeng Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Sui Jingfeng Signed-off-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231113125508.4dc755e8@endymion.delvare commit 183bdd161c2b773a62f01d1c030f5a3a5b7c33b5 Author: Binbin Wu Date: Wed Sep 13 20:42:24 2023 +0800 KVM: x86: Use KVM-governed feature framework to track "LAM enabled" Use the governed feature framework to track if Linear Address Masking (LAM) is "enabled", i.e. if LAM can be used by the guest. Using the framework to avoid the relative expensive call guest_cpuid_has() during cr3 and vmexit handling paths for LAM. No functional change intended. Signed-off-by: Binbin Wu Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-14-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit 703d794cb8cb28c07b22c1c845f5c4d4c419aff7 Author: Robert Hoo Date: Wed Sep 13 20:42:23 2023 +0800 KVM: x86: Advertise and enable LAM (user and supervisor) LAM is enumerated by CPUID.7.1:EAX.LAM[bit 26]. Advertise the feature to userspace and enable it as the final step after the LAM virtualization support for supervisor and user pointers. SGX LAM support is not advertised yet. SGX LAM support is enumerated in SGX's own CPUID and there's no hard requirement that it must be supported when LAM is reported in CPUID leaf 0x7. Signed-off-by: Robert Hoo Signed-off-by: Binbin Wu Reviewed-by: Jingqi Liu Reviewed-by: Chao Gao Reviewed-by: Kai Huang Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-13-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit 3098e6eca88e543ea0d190d1fa72b1c047bb3e7d Author: Robert Hoo Date: Wed Sep 13 20:42:22 2023 +0800 KVM: x86: Virtualize LAM for user pointer Add support to allow guests to set the new CR3 control bits for Linear Address Masking (LAM) and add implementation to get untagged address for user pointers. LAM modifies the canonical check for 64-bit linear addresses, allowing software to use the masked/ignored address bits for metadata. Hardware masks off the metadata bits before using the linear addresses to access memory. LAM uses two new CR3 non-address bits, LAM_U48 (bit 62) and LAM_U57 (bit 61), to configure LAM for user pointers. LAM also changes VMENTER to allow both bits to be set in VMCS's HOST_CR3 and GUEST_CR3 for virtualization. When EPT is on, CR3 is not trapped by KVM and it's up to the guest to set any of the two LAM control bits. However, when EPT is off, the actual CR3 used by the guest is generated from the shadow MMU root which is different from the CR3 that is *set* by the guest, and KVM needs to manually apply any active control bits to VMCS's GUEST_CR3 based on the cached CR3 *seen* by the guest. KVM manually checks guest's CR3 to make sure it points to a valid guest physical address (i.e. to support smaller MAXPHYSADDR in the guest). Extend this check to allow the two LAM control bits to be set. After check, LAM bits of guest CR3 will be stripped off to extract guest physical address. In case of nested, for a guest which supports LAM, both VMCS12's HOST_CR3 and GUEST_CR3 are allowed to have the new LAM control bits set, i.e. when L0 enters L1 to emulate a VMEXIT from L2 to L1 or when L0 enters L2 directly. KVM also manually checks VMCS12's HOST_CR3 and GUEST_CR3 being valid physical address. Extend such check to allow the new LAM control bits too. Note, LAM doesn't have a global control bit to turn on/off LAM completely, but purely depends on hardware's CPUID to determine it can be enabled or not. That means, when EPT is on, even when KVM doesn't expose LAM to guest, the guest can still set LAM control bits in CR3 w/o causing problem. This is an unfortunate virtualization hole. KVM could choose to intercept CR3 in this case and inject fault but this would hurt performance when running a normal VM w/o LAM support. This is undesirable. Just choose to let the guest do such illegal thing as the worst case is guest being killed when KVM eventually find out such illegal behaviour and that the guest is misbehaving. Suggested-by: Sean Christopherson Signed-off-by: Robert Hoo Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Kai Huang Reviewed-by: Chao Gao Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-12-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit 93d1c9f498a7505e0e0a0198f3b3d7f97fcc5fa6 Author: Robert Hoo Date: Wed Sep 13 20:42:21 2023 +0800 KVM: x86: Virtualize LAM for supervisor pointer Add support to allow guests to set the new CR4 control bit for LAM and add implementation to get untagged address for supervisor pointers. LAM modifies the canonicality check applied to 64-bit linear addresses for data accesses, allowing software to use of the untranslated address bits for metadata and masks the metadata bits before using them as linear addresses to access memory. LAM uses CR4.LAM_SUP (bit 28) to configure and enable LAM for supervisor pointers. It also changes VMENTER to allow the bit to be set in VMCS's HOST_CR4 and GUEST_CR4 to support virtualization. Note CR4.LAM_SUP is allowed to be set even not in 64-bit mode, but it will not take effect since LAM only applies to 64-bit linear addresses. Move CR4.LAM_SUP out of CR4_RESERVED_BITS, its reservation depends on vcpu supporting LAM or not. Leave it intercepted to prevent guest from setting the bit if LAM is not exposed to guest as well as to avoid vmread every time when KVM fetches its value, with the expectation that guest won't toggle the bit frequently. Set CR4.LAM_SUP bit in the emulated IA32_VMX_CR4_FIXED1 MSR for guests to allow guests to enable LAM for supervisor pointers in nested VMX operation. Hardware is not required to do TLB flush when CR4.LAM_SUP toggled, KVM doesn't need to emulate TLB flush based on it. There's no other features or vmx_exec_controls connection, and no other code needed in {kvm,vmx}_set_cr4(). Skip address untag for instruction fetches (which includes branch targets), operand of INVLPG instructions, and implicit system accesses, all of which are not subject to untagging. Note, get_untagged_addr() isn't invoked for implicit system accesses as there is no reason to do so, but check the flag anyways for documentation purposes. Signed-off-by: Robert Hoo Co-developed-by: Binbin Wu Signed-off-by: Binbin Wu Reviewed-by: Chao Gao Reviewed-by: Kai Huang Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-11-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit b39bd520a60c667a339e315ce7a3de2f7178f6e3 Author: Binbin Wu Date: Wed Sep 13 20:42:20 2023 +0800 KVM: x86: Untag addresses for LAM emulation where applicable Stub in vmx_get_untagged_addr() and wire up calls from the emulator (via get_untagged_addr()) and "direct" calls from various VM-Exit handlers in VMX where LAM untagging is supposed to be applied. Defer implementing the guts of vmx_get_untagged_addr() to future patches purely to make the changes easier to consume. LAM is active only for 64-bit linear addresses and several types of accesses are exempted. - Cases need to untag address (handled in get_vmx_mem_address()) Operand(s) of VMX instructions and INVPCID. Operand(s) of SGX ENCLS. - Cases LAM doesn't apply to (no change needed) Operand of INVLPG. Linear address in INVPCID descriptor. Linear address in INVVPID descriptor. BASEADDR specified in SECS of ECREATE. Note: - LAM doesn't apply to write to control registers or MSRs - LAM masking is applied before walking page tables, i.e. the faulting linear address in CR2 doesn't contain the metadata. - The guest linear address saved in VMCS doesn't contain metadata. Signed-off-by: Binbin Wu Reviewed-by: Chao Gao Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-10-binbin.wu@linux.intel.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit 37a41847b770c722e98ace72f3851fb49b360c08 Author: Binbin Wu Date: Wed Sep 13 20:42:19 2023 +0800 KVM: x86: Introduce get_untagged_addr() in kvm_x86_ops and call it in emulator Introduce a new interface get_untagged_addr() to kvm_x86_ops to untag the metadata from linear address. Call the interface in linearization of instruction emulator for 64-bit mode. When enabled feature like Intel Linear Address Masking (LAM) or AMD Upper Address Ignore (UAI), linear addresses may be tagged with metadata that needs to be dropped prior to canonicality checks, i.e. the metadata is ignored. Introduce get_untagged_addr() to kvm_x86_ops to hide the vendor specific code, as sadly LAM and UAI have different semantics. Pass the emulator flags to allow vendor specific implementation to precisely identify the access type (LAM doesn't untag certain accesses). Signed-off-by: Binbin Wu Reviewed-by: Chao Gao Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-9-binbin.wu@linux.intel.com [sean: massage changelog] Signed-off-by: Sean Christopherson commit 9c8021d4ae85f1531230fc33653e06e9f1fdb7f1 Author: Binbin Wu Date: Wed Sep 13 20:42:18 2023 +0800 KVM: x86: Remove kvm_vcpu_is_illegal_gpa() Remove kvm_vcpu_is_illegal_gpa() and use !kvm_vcpu_is_legal_gpa() instead. The "illegal" helper actually predates the "legal" helper, the only reason the "illegal" variant wasn't removed by commit 4bda0e97868a ("KVM: x86: Add a helper to check for a legal GPA") was to avoid code churn. Now that CR3 has a dedicated helper, there are fewer callers, and so the code churn isn't that much of a deterrent. No functional change intended. Signed-off-by: Binbin Wu Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-8-binbin.wu@linux.intel.com [sean: provide a bit of history in the changelog] Signed-off-by: Sean Christopherson commit 2c49db455ee27c72a680c9e4fad1c12433902ee3 Author: Binbin Wu Date: Wed Sep 13 20:42:17 2023 +0800 KVM: x86: Add & use kvm_vcpu_is_legal_cr3() to check CR3's legality Add and use kvm_vcpu_is_legal_cr3() to check CR3's legality to provide a clear distinction between CR3 and GPA checks. This will allow exempting bits from kvm_vcpu_is_legal_cr3() without affecting general GPA checks, e.g. for upcoming features that will use high bits in CR3 for feature enabling. No functional change intended. Signed-off-by: Binbin Wu Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-7-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit a130066f74008858ac425b7497d231742474a0ea Author: Binbin Wu Date: Wed Sep 13 20:42:16 2023 +0800 KVM: x86/mmu: Drop non-PA bits when getting GFN for guest's PGD Drop non-PA bits when getting GFN for guest's PGD with the maximum theoretical mask for guest MAXPHYADDR. Do it unconditionally because it's harmless for 32-bit guests, querying 64-bit mode would be more expensive, and for EPT the mask isn't tied to guest mode. Using PT_BASE_ADDR_MASK would be technically wrong (PAE paging has 64-bit elements _except_ for CR3, which has only 32 valid bits), it wouldn't matter in practice though. Opportunistically use GENMASK_ULL() to define __PT_BASE_ADDR_MASK. Signed-off-by: Binbin Wu Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-6-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit 538ac9a92d669c4ccfc64739a32efab2793cea1d Author: Binbin Wu Date: Wed Sep 13 20:42:15 2023 +0800 KVM: x86: Add X86EMUL_F_INVLPG and pass it in em_invlpg() Add an emulation flag X86EMUL_F_INVLPG, which is used to identify an instruction that does TLB invalidation without true memory access. Only invlpg & invlpga implemented in emulator belong to this kind. invlpga doesn't need additional information for emulation. Just pass the flag to em_invlpg(). Linear Address Masking (LAM) and Linear Address Space Separation (LASS) don't apply to addresses that are inputs to TLB invalidation. The flag will be consumed to support LAM/LASS virtualization. Signed-off-by: Binbin Wu Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-5-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit 3963c52df42231f72277cd138994ac94f1183d2b Author: Binbin Wu Date: Wed Sep 13 20:42:14 2023 +0800 KVM: x86: Add an emulation flag for implicit system access Add an emulation flag X86EMUL_F_IMPLICIT to identify implicit system access in instruction emulation. Don't bother wiring up any usage at this point, as Linear Address Space Separation (LASS) will be the first "real" consumer of the flag and LASS support will require dedicated hooks, i.e. there aren't any existing calls where passing X86EMUL_F_IMPLICIT is meaningful. Add the IMPLICIT flag even though there's no imminent usage so that Linear Address Masking (LAM) support can reference the flag to document that addresses for implicit accesses aren't untagged. Signed-off-by: Binbin Wu Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-4-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit 7b0dd9430cf0c1ae19645d2a6608a5fb57faffe4 Author: Binbin Wu Date: Wed Sep 13 20:42:12 2023 +0800 KVM: x86: Consolidate flags for __linearize() Consolidate @write and @fetch of __linearize() into a set of flags so that additional flags can be added without needing more/new boolean parameters, to precisely identify the access type. No functional change intended. Signed-off-by: Binbin Wu Reviewed-by: Chao Gao Acked-by: Kai Huang Tested-by: Xuelian Guo Link: https://lore.kernel.org/r/20230913124227.12574-2-binbin.wu@linux.intel.com Signed-off-by: Sean Christopherson commit 3b99d46a1170754a06f379a83be8101c5f6bfc46 Author: angquan yu Date: Tue Nov 28 16:11:05 2023 -0600 KVM: selftests: Actually print out magic token in NX hugepages skip message Pass MAGIC_TOKEN to __TEST_REQUIRE() when printing the help message about needing to pass a magic value to manually run the NX hugepages test, otherwise the help message will contain garbage. In file included from x86_64/nx_huge_pages_test.c:15: x86_64/nx_huge_pages_test.c: In function ‘main’: include/test_util.h:40:32: error: format ‘%d’ expects a matching ‘int’ argument [-Werror=format=] 40 | ksft_exit_skip("- " fmt "\n", ##__VA_ARGS__); \ | ^~~~ x86_64/nx_huge_pages_test.c:259:9: note: in expansion of macro ‘__TEST_REQUIRE’ 259 | __TEST_REQUIRE(token == MAGIC_TOKEN, | ^~~~~~~~~~~~~~ Signed-off-by: angquan yu Link: https://lore.kernel.org/r/20231128221105.63093-1-angquan21@gmail.com [sean: rewrite shortlog+changelog] Signed-off-by: Sean Christopherson commit c9d99c73940e47692fa982cf7508581f5c55e363 Author: Uwe Kleine-König Date: Thu Nov 23 18:54:27 2023 +0100 drm/bridge: ti-sn65dsi86: Simplify using pm_runtime_resume_and_get() pm_runtime_resume_and_get() already drops the runtime PM usage counter in the error case. So a call to pm_runtime_put_sync() can be dropped. Signed-off-by: Uwe Kleine-König Reviewed-by: Laurent Pinchart Reviewed-by: Neil Armstrong Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231123175425.496956-2-u.kleine-koenig@pengutronix.de commit fb3f43d50d9b22946702085d1fa2139c8741283d Author: Hsin-Yi Wang Date: Fri Nov 17 13:46:34 2023 -0800 drm/panel-edp: Avoid adding multiple preferred modes If a non generic edp-panel is under aux-bus, the mode read from edid would still be selected as preferred and results in multiple preferred modes, which is ambiguous. If both hard-coded mode and edid exists, only add mode from hard-coded. Signed-off-by: Hsin-Yi Wang Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231117215056.1883314-4-hsinyi@chromium.org commit 70e0d5550f5cec301ad116703b840a539fe985dc Author: Hsin-Yi Wang Date: Fri Nov 17 13:46:33 2023 -0800 drm/panel-edp: Add auo_b116xa3_mode Add auo_b116xa3_mode to override the original modes parsed from edid of the panels 0x405c B116XAK01.0 and 0x615c B116XAN06.1 which result in glitches on panel. Signed-off-by: Hsin-Yi Wang Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231117215056.1883314-3-hsinyi@chromium.org commit 9f7843b515811aea6c56527eb195b622e9c01f12 Author: Hsin-Yi Wang Date: Fri Nov 17 13:46:32 2023 -0800 drm/panel-edp: Add override_edid_mode quirk for generic edp Generic edp gets mode from edid. However, some panels report incorrect mode in this way, resulting in glitches on panel. Introduce a new quirk additional_mode to the generic edid to pick a correct hardcoded mode. Signed-off-by: Hsin-Yi Wang Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231117215056.1883314-2-hsinyi@chromium.org commit eec4954b81c3d9a38b99e78afb553c359db40093 Author: Greg Kroah-Hartman Date: Tue Nov 28 10:28:15 2023 +0000 driver core: make device_is_dependent() static The function device_is_dependent() is only called by the driver core internally and should not, at this time, be called by anyone else outside of it, so mark it as static so as not to give driver authors the wrong idea. Cc: Saravana Kannan Acked-by: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/2023112815-faculty-thud-add8@gregkh Signed-off-by: Greg Kroah-Hartman commit 012e3208ab8d1456379d047d88d69ab7e074a520 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:57 2023 +0100 drm/tilcdc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. There is one error path in tilcdc_pdev_remove() that potentially could yield a non-zero return code. In this case an error message describing the failure is emitted now instead of remove callback returned a non-zero value. This will be ignored. before. Otherwise there is no difference. Also note that currently tilcdc_get_external_components() doesn't return negative values. Signed-off-by: Uwe Kleine-König Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-34-u.kleine-koenig@pengutronix.de Reviewed-by: Tomi Valkeinen Tested-by: Jyri Sarha commit d804987153e7bedf503f8e4ba649afe52cfd7f6d Author: Vamshi Gajjela Date: Sun Nov 26 21:34:20 2023 +0530 serial: 8250_dw: Decouple DLF register check from UCV Designware UART has an optional feature to enable Fractional Baud Rate Divisor (DLF) through the FRACTIONAL_BAUD_DIVISOR_EN configuration parameter, and it is not dependent on ADDITIONAL_FEATURES. dw8250_setup_port() checks DLF to determine dlf_size only when UART Component Version (UCV) is non-zero. As mentioned above DLF and UCV are independent features. Move the logic corresponding to DLF size calculation ahead of the UCV check to prevent early return. Otherwise, dlf_size will be zero and driver will not be able to use the controller's fractional baud rate divisor (DLF) feature. Signed-off-by: Vamshi Gajjela Link: https://lore.kernel.org/r/20231126160420.2442330-1-vamshigajjela@google.com Signed-off-by: Greg Kroah-Hartman commit 67f7a63ecc712dbc307c04a1a7fbf32d1aa864df Author: Rob Herring Date: Wed Nov 22 15:44:32 2023 -0700 dt-bindings: arm/calxeda: drop unneeded quotes Drop unneeded quotes over simple string values to fix a soon to be enabled yamllint warning: [error] string value is redundantly quoted with any quotes (quoted-strings) Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231122224432.2809781-1-robh@kernel.org Signed-off-by: Rob Herring commit 9e7f72d452477819977f047bddfbec7f66489f3b Author: Rob Herring Date: Wed Nov 22 15:44:19 2023 -0700 dt-bindings: fsl,dpaa2-console: drop unneeded quotes Drop unneeded quotes over simple string values to fix a soon to be enabled yamllint warning: [error] string value is redundantly quoted with any quotes (quoted-strings) Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231122224419.2809361-1-robh@kernel.org Signed-off-by: Rob Herring commit daa9249408fcb4985351d91f166fc0e27d255014 Author: Sibi Sankar Date: Fri Nov 24 15:36:08 2023 +0530 dt-bindings: interrupt-controller: qcom,pdc: document pdc on X1E80100 The X1E80100 SoC includes a PDC, document it. Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124100608.29964-6-quic_sibis@quicinc.com Signed-off-by: Rob Herring commit c1c647f604a55e73c6980046cc56df574402e362 Author: Neil Armstrong Date: Wed Oct 25 09:27:36 2023 +0200 dt-bindings: qcom,pdc: document the SM8650 Power Domain Controller Document the Power Domain Controller on the SM8650 Platform. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231025-topic-sm8650-upstream-bindings-pdc-v1-1-42f62cc9858c@linaro.org Signed-off-by: Rob Herring commit ca41ae8f445e0bb88fa84584b451bfbf39b2e7f1 Author: Rohit Agarwal Date: Fri Nov 17 13:58:29 2023 +0530 dt-bindings: interrupt-controller: Add SDX75 PDC compatible Add device tree bindings for PDC on SDX75 SOC. Signed-off-by: Rohit Agarwal Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231117082829.609882-1-quic_rohiagar@quicinc.com Signed-off-by: Rob Herring commit 068ab2135b3fe0d8957f099a5b860117457825ec Author: Jiri Slaby (SUSE) Date: Mon Nov 27 13:37:13 2023 +0100 tty: srmcons: remove 'str_cr' and use string directly 'str_cr' contains a single character: \r. There is no need to declare it as array. Instead, pass the character (as a string) to callback_puts() directly. This ensures the string is in proper .rodata (const) section and makes the code more obvious. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231127123713.14504-5-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2ea2ac84ef357dcaf11a80b303d391fb6c2510d8 Author: Jiri Slaby (SUSE) Date: Mon Nov 27 13:37:12 2023 +0100 tty: srmcons: switch need_cr to bool 'need_cr' is a flag, so type it properly to be a 'bool'. Move the declaration into the loop too. That ensures the variable is initialized properly even if the code was moved somehow. Signed-off-by: "Jiri Slaby (SUSE)" Reviewed-by: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231127123713.14504-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit ad1885559249fa2530cb0659b758583873dc906f Author: Jiri Slaby (SUSE) Date: Mon Nov 27 13:37:11 2023 +0100 tty: srmcons: use 'count' directly in srmcons_do_write() Similarly to 'buf' in the previous patch, there is no need to have a separate counter ('remaining') in srmcons_do_write(). 'count' can be used directly which simplifies the code a bit. Note that the type of the current count ('c') is changed from 'long' to 'size_t' so that: 1) it is prepared for the upcoming change of 'count's type, and 2) is unsigned. Signed-off-by: "Jiri Slaby (SUSE)" Reviewed-by: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231127123713.14504-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit ff4b8c3a8be98fee16a8ab7751a5834088e60b23 Author: Jiri Slaby (SUSE) Date: Mon Nov 27 13:37:10 2023 +0100 tty: srmcons: make srmcons_do_write() return void The return value of srmcons_do_write() is ignored as all characters are pushed. So make srmcons_do_write() to return void. Signed-off-by: "Jiri Slaby (SUSE)" Reviewed-by: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231127123713.14504-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit a3db64c575ca201c9783f100c70b82d52bd78a93 Author: Jiri Slaby (SUSE) Date: Mon Nov 27 13:37:09 2023 +0100 tty: make tty const in tty_get_baud_rate() After commit 87888fb9ac0c ("tty: Remove baudrate dead code & make ktermios params const"), the 'tty' parameter is only read in tty_get_baud_rate(). Therefore, we can make 'tty' accepted in the function 'const' for clarity. The "the terminal bit flags may be updated." part of the tty_get_baud_rate()'s kernel-doc is dropped as it is no longer true. Because of the same commit above. And it was misplaced anyway. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Ilpo Järvinen Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231127123713.14504-1-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit f92a39ae47076ea123c7980fb85e6e33313f372e Author: Bert Karwatzki Date: Mon Nov 27 17:09:55 2023 +0100 drm/sched: Partial revert of "Qualify drm_sched_wakeup() by drm_sched_entity_is_ready()" Commit f3123c2590005c, in combination with the use of work queues by the GPU scheduler, leads to random lock-ups of the GUI. This is a partial revert of of commit f3123c2590005c since drm_sched_wakeup() still needs its entity argument to pass it to drm_sched_can_queue(). Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2994 Link: https://lists.freedesktop.org/archives/dri-devel/2023-November/431606.html Signed-off-by: Bert Karwatzki Link: https://patchwork.freedesktop.org/patch/msgid/20231127160955.87879-1-spasswolf@web.de Link: https://lore.kernel.org/r/36bece178ff5dc705065e53d1e5e41f6db6d87e4.camel@web.de Fixes: f3123c2590005c ("drm/sched: Qualify drm_sched_wakeup() by drm_sched_entity_is_ready()") Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit b9873755a6c8ccfce79094c4dce9efa3ecb1a749 Author: Alexander Graf Date: Wed Oct 11 21:35:22 2023 +0000 misc: Add Nitro Secure Module driver When running Linux inside a Nitro Enclave, the hypervisor provides a special virtio device called "Nitro Security Module" (NSM). This device has 3 main functions: 1) Provide attestation reports 2) Modify PCR state 3) Provide entropy This patch adds a driver for NSM that exposes a /dev/nsm device node which user space can issue an ioctl on this device with raw NSM CBOR formatted commands to request attestation documents, influence PCR states, read entropy and enumerate status of the device. In addition, the driver implements a hwrng backend. Originally-by: Petre Eftime Signed-off-by: Alexander Graf Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20231011213522.51781-1-graf@amazon.com Signed-off-by: Greg Kroah-Hartman commit 110684d58bdb715032bc7fc92ebdb554ae7deeb6 Author: Lukas Bulwahn Date: Fri Nov 10 12:44:00 2023 +0100 vgacon: drop IA64 reference in VGA_CONSOLE dependency list Commit e9e3300b6e77 ("vgacon: rework Kconfig dependencies") turns the dependencies into a positive list of supported architectures, which includes the IA64 architecture, but in the meantime, this architecture is removed in commit cf8e8658100d ("arch: Remove Itanium (IA-64) architecture"). Drop the reference to IA64 architecture in the dependency list of the VGA_CONSOLE config definition. Signed-off-by: Lukas Bulwahn Acked-by: Arnd Bergmann Reviewed-by: Javier Martinez Canillas Link: https://lore.kernel.org/r/20231110114400.30882-1-lukas.bulwahn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 736dfbde3a842422b3e1fe0f881ef2c82b04f269 Author: Uwe Kleine-König Date: Sun Nov 12 01:00:30 2023 +0100 platform/goldfish: goldfish_pipe: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231112000029.151117-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit d346fa09abff46988de9267b67b6900d9913d5a2 Author: Chao Yu Date: Wed Nov 22 22:47:15 2023 +0800 f2fs: sysfs: support discard_io_aware It gives a way to enable/disable IO aware feature for background discard, so that we can tune background discard more precisely based on undiscard condition. e.g. force to disable IO aware if there are large number of discard extents, and discard IO may always be interrupted by frequent common IO. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8e9cf55ef89c775fdaaa7c6212dbb691420a4673 Author: Chao Yu Date: Tue Nov 28 17:31:30 2023 +0800 f2fs: show i_mode in trace_f2fs_new_inode() This patch supports to show i_mode field in trace_f2fs_new_inode(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5f23ffdf17e805218e56a9796bdc67497ab11bac Author: Chao Yu Date: Tue Nov 28 17:31:29 2023 +0800 f2fs: introduce tracepoint for f2fs_rename() This patch adds tracepoints for f2fs_rename(). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 53edb549565f55ccd0bdf43be3d66ce4c2d48b28 Author: Chao Yu Date: Tue Nov 28 17:25:16 2023 +0800 f2fs: fix to avoid dirent corruption As Al reported in link[1]: f2fs_rename() ... if (old_dir != new_dir && !whiteout) f2fs_set_link(old_inode, old_dir_entry, old_dir_page, new_dir); else f2fs_put_page(old_dir_page, 0); You want correct inumber in the ".." link. And cross-directory rename does move the source to new parent, even if you'd been asked to leave a whiteout in the old place. [1] https://lore.kernel.org/all/20231017055040.GN800259@ZenIV/ With below testcase, it may cause dirent corruption, due to it missed to call f2fs_set_link() to update ".." link to new directory. - mkdir -p dir/foo - renameat2 -w dir/foo bar [ASSERT] (__chk_dots_dentries:1421) --> Bad inode number[0x4] for '..', parent parent ino is [0x3] [FSCK] other corrupted bugs [Fail] Fixes: 7e01e7ad746b ("f2fs: support RENAME_WHITEOUT") Cc: Jan Kara Reported-by: Al Viro Signed-off-by: Chao Yu Reviewed-by: Jan Kara Signed-off-by: Jaegeuk Kim commit 63513f8574c5ef481cd6a85b8c71f6f40f7d7957 Author: Christian Brauner Date: Mon Nov 27 12:51:31 2023 +0100 super: don't bother with WARN_ON_ONCE() We hold our own active reference and we've checked it above. Link: https://lore.kernel.org/r/20231127-vfs-super-massage-wait-v1-2-9ab277bfd01a@kernel.org Signed-off-by: Christian Brauner commit b30850c58b5b9b7008eb6fc4a65bfb003a0714a7 Author: Christian Brauner Date: Mon Nov 27 12:51:30 2023 +0100 super: massage wait event mechanism We're currently using two separate helpers wait_born() and wait_dead() when we can just all do it in a single helper super_load_flags(). We're also acquiring the lock before we check whether this superblock is even a viable candidate. If it's already dying we don't even need to bother with the lock. Link: https://lore.kernel.org/r/20231127-vfs-super-massage-wait-v1-1-9ab277bfd01a@kernel.org Signed-off-by: Christian Brauner commit 3cc808e3239cf566b3d3b15cf2beee066b60f241 Author: Donald Robson Date: Tue Nov 28 17:35:07 2023 +0000 drm/imagination: Numerous documentation fixes. Some reported by Stephen Rothwell. The rest were found by running the kernel-doc build script. Some indentation fixes. Reported-by: Stephen Rothwell Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311241526.Y2WZeUau-lkp@intel.com/ Signed-off-by: Donald Robson Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231128173507.95119-1-donald.robson@imgtec.com commit 15da990f8dd7e9d0e1fd0275730f6fed6f6a8a57 Author: Song Liu Date: Mon Nov 27 19:58:07 2023 -0800 MAINTAINERS: SOFTWARE RAID: Add Yu Kuai as Reviewer Add Yu Kuai as reviewer for md/raid subsystem. Signed-off-by: Song Liu Acked-by: Yu Kuai Link: https://lore.kernel.org/r/20231128035807.3191738-1-song@kernel.org commit fc540426f7baa0c7d4b477e80435d075659092a2 Author: Uwe Kleine-König Date: Thu Nov 9 21:28:42 2023 +0100 bus: ts-nbus: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231109202830.4124591-13-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 999f052e9ccc0cbfbaa44545774ee944a8a2a9cf Author: Uwe Kleine-König Date: Thu Nov 9 21:28:41 2023 +0100 bus: ti-sysc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20231109202830.4124591-12-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 2754f6157d65c92185a2c18be103f2ca85f590c6 Author: Uwe Kleine-König Date: Thu Nov 9 21:28:40 2023 +0100 bus: ti-pwmss: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231109202830.4124591-11-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 812c0c38a85ee66f41a6d9cf7499c08f904fce26 Author: Uwe Kleine-König Date: Thu Nov 9 21:28:39 2023 +0100 bus: tegra-gmi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231109202830.4124591-10-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit f54ba5ef85eb1af777335170c19e5b5900f52af6 Author: Uwe Kleine-König Date: Thu Nov 9 21:28:38 2023 +0100 bus: tegra-aconnect: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231109202830.4124591-9-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 88807ae1f9b3a1cd7841d75afd59a4845201584b Author: Uwe Kleine-König Date: Thu Nov 9 21:28:37 2023 +0100 bus: sunxi-rsb: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20231109202830.4124591-8-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 8b763a224970896d6a252dc9bdf8c17dfeb83921 Author: Uwe Kleine-König Date: Thu Nov 9 21:28:36 2023 +0100 bus: sun50i-de2: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Jernej Skrabec Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20231109202830.4124591-7-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit f52dfffbb6d40e6d97ef750066b50b75281a24d6 Author: Uwe Kleine-König Date: Thu Nov 9 21:28:35 2023 +0100 bus: simple-pm-bus: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231109202830.4124591-6-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit ea7964a660aee352f6dedaea28e1eb05c8b51efe Author: Uwe Kleine-König Date: Thu Nov 9 21:28:34 2023 +0100 bus: qcom-ssc-block-bus: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231109202830.4124591-5-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 8c7d255dd2b4b246dceaf830f4f4ffd49f43f67b Author: Uwe Kleine-König Date: Thu Nov 9 21:28:33 2023 +0100 bus: omap_l3_smx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20231109202830.4124591-4-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 854f89a5b56354ba4135e0e1f0e57ab2caee59ee Author: Uwe Kleine-König Date: Thu Nov 9 21:28:32 2023 +0100 bus: omap-ocp2scp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231109202830.4124591-3-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit ce0ca865822637a91c03b1791ef02ff57c034a0f Author: Uwe Kleine-König Date: Thu Nov 9 21:28:31 2023 +0100 bus: hisi_lpc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Link: https://lore.kernel.org/r/20231109202830.4124591-2-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 0734f5c7eb15f9d3bbdacffe501eabdb8b1c01d2 Merge: d67a308ac5de5 7192ad2adde82 Author: Arnd Bergmann Date: Tue Nov 28 18:25:37 2023 +0100 Merge branch 'asm-generic-prototypes' into asm-generic As part of my quest to enable -Wmissing-prototypes by default, these patches clean up some of the prototypes that are needed by all architectures but are handled inconsistently. The duplicate prototypes are moved into common code, which helps both to clean up the existing warnings and simplifies the logic. * asm-generic-prototypes: arm64: vdso32: Define BUILD_VDSO32_64 to correct prototypes csky: fix arch_jump_label_transform_static override arch: add do_page_fault prototypes arch: add missing prepare_ftrace_return() prototypes arch: vdso: consolidate gettime prototypes arch: include linux/cpu.h for trap_init() prototype arch: fix asm-offsets.c building with -Wmissing-prototypes arch: consolidate arch_irq_work_raise prototypes commit 5940a20a186bd74efd6d0dc0b2b7c77d891895d9 Author: Ian Rogers Date: Thu Nov 2 10:56:46 2023 -0700 perf mmap: Lazily initialize zstd streams to save memory when not using it Zstd streams create dictionaries that can require significant RAM, especially when there is one per-CPU. Tools like 'perf record' won't use the streams without the -z option, and so the creation of the streams is pure overhead. Switch to creating the streams on first use. Committer notes: ssize_t comes from sys/types.h, size_t from stddef.h. This worked on glibc as stdlib.h includes both, but not on musl libc. So do what 'man size_t' says and include sys/types.h and stddef.h instead of stdlib.h Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu (Google) Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231102175735.2272696-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7192ad2adde8213ad7c7f3b1ff974cccebae4d60 Author: Nathan Chancellor Date: Tue Nov 28 09:52:48 2023 -0700 arm64: vdso32: Define BUILD_VDSO32_64 to correct prototypes After commit 42874e4eb35b ("arch: vdso: consolidate gettime prototypes"), there are a couple of errors when building the 32-bit compat vDSO for arm64: arch/arm64/kernel/vdso32/vgettimeofday.c:10:5: error: conflicting types for '__vdso_clock_gettime'; have 'int(clockid_t, struct old_timespec32 *)' {aka 'int(int, struct old_timespec32 *)'} 10 | int __vdso_clock_gettime(clockid_t clock, | ^~~~~~~~~~~~~~~~~~~~ In file included from arch/arm64/kernel/vdso32/vgettimeofday.c:8: include/vdso/gettime.h:16:5: note: previous declaration of '__vdso_clock_gettime' with type 'int(clockid_t, struct __kernel_timespec *)' {aka 'int(int, struct __kernel_timespec *)'} 16 | int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts); | ^~~~~~~~~~~~~~~~~~~~ arch/arm64/kernel/vdso32/vgettimeofday.c:28:5: error: conflicting types for '__vdso_clock_getres'; have 'int(clockid_t, struct old_timespec32 *)' {aka 'int(int, struct old_timespec32 *)'} 28 | int __vdso_clock_getres(clockid_t clock_id, | ^~~~~~~~~~~~~~~~~~~ include/vdso/gettime.h:15:5: note: previous declaration of '__vdso_clock_getres' with type 'int(clockid_t, struct __kernel_timespec *)' {aka 'int(int, struct __kernel_timespec *)'} 15 | int __vdso_clock_getres(clockid_t clock, struct __kernel_timespec *res); | ^~~~~~~~~~~~~~~~~~~ The type of the second parameter in __vdso_clock_getres() and __vdso_clock_gettime() changes based on whether compiling for 32-bit vs. 64-bit, which is controlled by CONFIG_64BIT or the preprocessor macro BUILD_VDSO32_64, which denotes a 32-bit vDSO is being built for a 64-bit architecture. Since this situation is the latter case, define BUILD_VDSO32_64 before the inclusion of include/vdso/gettime.h to clear up the warning Fixes: 42874e4eb35b ("arch: vdso: consolidate gettime prototypes") Reported-by: Naresh Kamboju Closes: https://lore.kernel.org/CA+G9fYtV6X=c3JVTTAX89_=wc+uqLpzggnsbGSx-98m_5yd5yw@mail.gmail.com/ Reported-by: Mark Brown Closes: https://lore.kernel.org/ZWCRWArzbTYUjvon@finisterre.sirena.org.uk/ Signed-off-by: Nathan Chancellor Signed-off-by: Arnd Bergmann commit d60469d7c0e5c4e8de10699377d2ba79004236a4 Author: Namhyung Kim Date: Thu Nov 9 15:59:51 2023 -0800 perf dwarf-aux: Add die_find_variable_by_addr() The die_find_variable_by_addr() is to find a variables in the given DIE using given (PC-relative) address. Global variables will have a location expression with DW_OP_addr which has an address so can simply compare it with the address. <1><143a7>: Abbrev Number: 2 (DW_TAG_variable) <143a8> DW_AT_name : loops_per_jiffy <143ac> DW_AT_type : <0x1cca> <143b0> DW_AT_external : 1 <143b0> DW_AT_decl_file : 193 <143b1> DW_AT_decl_line : 213 <143b2> DW_AT_location : 9 byte block: 3 b0 46 41 82 ff ff ff ff (DW_OP_addr: ffffffff824146b0) Note that the type-offset should be calculated from the base address of the global variable. Signed-off-by: Namhyung Kim Acked-by: Masami Hiramatsu (Google) Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-33-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 72108c0b9c0e004d7dfc2fc88b02c30b12711325 Author: Yang Jihong Date: Tue Oct 31 10:55:23 2023 +0000 perf tools: Add --debug-file option to redirect debug output Currently, debug messages is output to stderr, add --debug-file option to support redirection to a specified file. Some test scenarios: # perf --list-opts --help --version --exec-path --html-path --paginate --no-pager --debugfs-dir --buildid-dir --list-cmds --list-opts --debug --debug-file # perf --debug-file No path given for --debug-file. Usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS] # perf --debug-file /sys/perf.log record -v true Open debug file '/sys/perf.log' failed: Permission denied Usage: perf [--version] [--help] [OPTIONS] COMMAND [ARGS] # perf --debug-file /tmp/perf.log record -v true [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.013 MB perf.data (26 samples) ] # cat /tmp/perf.log DEBUGINFOD_URLS= Using CPUID GenuineIntel-6-3E-4 nr_cblocks: 0 affinity: SYS mmap flush: 1 comp level: 0 mmap size 528384B Control descriptor is not initialized mmap size 528384B Looking at the vmlinux_path (8 entries long) Using /proc/kcore for kernel data Using /proc/kallsyms for symbols symbol:unmap_start file:(null) line:0 offset:0 return:0 lazy:(null) symbol:unmap_complete file:(null) line:0 offset:0 return:0 lazy:(null) symbol:map_start file:(null) line:0 offset:0 return:0 lazy:(null) symbol:map_complete file:(null) line:0 offset:0 return:0 lazy:(null) symbol:reloc_start file:(null) line:0 offset:0 return:0 lazy:(null) symbol:reloc_complete file:(null) line:0 offset:0 return:0 lazy:(null) symbol:init_start file:(null) line:0 offset:0 return:0 lazy:(null) symbol:init_complete file:(null) line:0 offset:0 return:0 lazy:(null) symbol:lll_lock_wait_private file:(null) line:0 offset:0 return:0 lazy:(null) symbol:lll_lock_wait file:(null) line:0 offset:0 return:0 lazy:(null) symbol:setjmp file:(null) line:0 offset:0 return:0 lazy:(null) symbol:longjmp file:(null) line:0 offset:0 return:0 lazy:(null) symbol:longjmp_target file:(null) line:0 offset:0 return:0 lazy:(null) failed to write feature HYBRID_TOPOLOGY Signed-off-by: Yang Jihong Acked-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231031105523.1472558-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 877c737db9355acaa1ec2fd2b8dbdaff82605df7 Author: Waiman Long Date: Mon Nov 27 14:51:05 2023 -0500 cgroup/cpuset: Expose cpuset.cpus.isolated The root-only cpuset.cpus.isolated control file shows the current set of isolated CPUs in isolated partitions. This control file is currently exposed only with the cgroup_debug boot command line option which also adds the ".__DEBUG__." prefix. This is actually a useful control file if users want to find out which CPUs are currently in an isolated state by the cpuset controller. Remove CFTYPE_DEBUG flag for this control file and make it available by default without any prefix. The test_cpuset_prs.sh test script and the cgroup-v2.rst documentation file are also updated accordingly. Minor code change is also made in test_cpuset_prs.sh to avoid false test failure when running on debug kernel. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 58bfaaac03284d82a55a724bfe2d97e19f3a11d0 Author: Bartosz Golaszewski Date: Mon Nov 27 20:37:15 2023 +0100 gpio: sysfs: fix forward declaration of struct gpio_device The forward declaration for struct gpio_device should be provided for both branches of the #ifdef. Fixes: 08a149c40bdb ("gpiolib: Clean up headers") Signed-off-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko commit e4916e791fb637a87c0ad5a0cd7ee824b817b27f Author: Rob Herring Date: Wed Nov 22 15:44:04 2023 -0700 dt-bindings: reset: imx-src: Simplify compatible schema and drop unneeded quotes The compatible schema can be simplified to a single enum for all the cases with "fsl,imx51-src" fallback compatible. In addition, the compatible strings are redundantly quoted. Drop unneeded quotes over simple string values to fix a soon to be enabled yamllint warning: [error] string value is redundantly quoted with any quotes (quoted-strings) Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231122224404.2808838-1-robh@kernel.org Signed-off-by: Philipp Zabel commit e530fc87259b02d4a12ef0db7cf736e5b54687d2 Author: Rob Herring Date: Wed Nov 22 15:43:52 2023 -0700 dt-bindings: reset: qcom: drop unneeded quotes Drop unneeded quotes over simple string values to fix a soon to be enabled yamllint warning: [error] string value is redundantly quoted with any quotes (quoted-strings) Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231122224352.2808435-1-robh@kernel.org Signed-off-by: Philipp Zabel commit 1240070d4e045e37823df46314fcaeea3dfe623c Author: Lad Prabhakar Date: Wed Nov 15 21:18:29 2023 +0000 dt-bindings: reset: renesas,rzg2l-usbphy-ctrl: Document RZ/Five SoC The USBPHY Control Device on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-usbphy-ctrl" compatible string will be used on the RZ/Five SoC so to make this clear and to keep this file consistent, update the comment to include RZ/Five SoC. No driver changes are required as generic compatible string "renesas,rzg2l-usbphy-ctrl" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231115211829.32542-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Philipp Zabel commit c1d884118f9b1544b39744f2c148fc87050488c1 Author: Rob Herring Date: Wed Nov 15 14:58:48 2023 -0600 reset: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20231115205848.3732609-1-robh@kernel.org Signed-off-by: Philipp Zabel commit 41df5d7d5e99fa9b15e9f7fec7f9a7f092a1440e Author: Zelong Dong Date: Thu Sep 14 14:40:17 2023 +0800 reset: reset-meson: add support for Amlogic C3 SoC Reset Controller Add a new compatible string to support for the reset controller on the C3 SoC. The count and offset for C3 Soc RESET registers are same as S4 Soc. Signed-off-by: Zelong Dong Reviewed-by: Dmitry Rokosov Reviewed-by: Martin Blumenstingl Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230914064018.18790-3-zelong.dong@amlogic.com Signed-off-by: Philipp Zabel commit 0c0ea61c9b3a9e4df9cf029971f973cb12ccfef9 Author: Zelong Dong Date: Thu Sep 14 14:40:16 2023 +0800 dt-bindings: reset: Add compatible and DT bindings for Amlogic C3 Reset Controller Add new compatible and DT bindings for Amlogic C3 Reset Controller Signed-off-by: Zelong Dong Acked-by: Krzysztof Kozlowski Reviewed-by: Dmitry Rokosov Reviewed-by: Rob Herring Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230914064018.18790-2-zelong.dong@amlogic.com Signed-off-by: Philipp Zabel commit c645481229689c62ba6e36f1708dc06d9cfc3f60 Author: Yangtao Li Date: Tue Jul 4 20:02:11 2023 +0800 reset: uniphier-glue: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230704120211.38122-7-frank.li@vivo.com Signed-off-by: Philipp Zabel commit 5d587019fccaabf84103b9e83a4acc4d6937ec87 Author: Yangtao Li Date: Tue Jul 4 20:02:10 2023 +0800 reset: sunplus: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230704120211.38122-6-frank.li@vivo.com Signed-off-by: Philipp Zabel commit ac53e621d8024848ad8ab16e56aee763eeabe233 Author: Yangtao Li Date: Tue Jul 4 20:02:09 2023 +0800 reset: simple: Convert to devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230704120211.38122-5-frank.li@vivo.com Signed-off-by: Philipp Zabel commit 49994d704d39bca20f15b4af125441c59520e887 Author: Yangtao Li Date: Tue Jul 4 20:02:08 2023 +0800 reset: qcom: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230704120211.38122-4-frank.li@vivo.com Signed-off-by: Philipp Zabel commit 3d471cfbf26c9865d228c5988daf10f00e3ed770 Author: Yangtao Li Date: Tue Jul 4 20:02:07 2023 +0800 reset: qcom-aoss: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20230704120211.38122-3-frank.li@vivo.com Signed-off-by: Philipp Zabel commit 66a1f3929a522482b735e68a43d243b0545c17b6 Author: Yangtao Li Date: Tue Jul 4 20:02:06 2023 +0800 reset: meson-audio-arb: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20230704120211.38122-2-frank.li@vivo.com Signed-off-by: Philipp Zabel commit 1750ec40593399dd0e8b62a4d23e1b9e55068afd Author: Yangtao Li Date: Tue Jul 4 20:02:05 2023 +0800 reset: brcmstb: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20230704120211.38122-1-frank.li@vivo.com Signed-off-by: Philipp Zabel commit 325b71e820b67569048c621227266783442b75ed Author: Liu Ying Date: Thu Nov 23 13:18:07 2023 +0800 drm/bridge: imx93-mipi-dsi: Fix a couple of building warnings Fix a couple of building warnings on used uninitialized 'best_m' and 'best_n' local variables by initializing 'best_m' to zero and 'best_n' to UINT_MAX. This makes compiler happy only. No functional change. Fixes: ce62f8ea7e3f ("drm/bridge: imx: Add i.MX93 MIPI DSI support") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311151746.f7u7dzbZ-lkp@intel.com/ Signed-off-by: Liu Ying Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20231123051807.3818342-1-victor.liu@nxp.com commit 97137bd3ffc5c5972ef3e27d145250c1750f8dc4 Author: Matt Roper Date: Mon Nov 27 11:00:44 2023 -0800 drm/i915/dg2: Drop Wa_22014600077 This workaround has been dropped from all DG2 variants in the latest workaround database update. Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20231127190043.4099109-2-matthew.d.roper@intel.com commit 288b039db225676e0c520c981a1b5a2562d893a3 Author: Dario Binacchi Date: Fri Nov 24 10:42:30 2023 +0100 drm/bridge: Fix typo in post_disable() description s/singals/signals/ Fixes: 199e4e967af4 ("drm: Extract drm_bridge.h") Signed-off-by: Dario Binacchi Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20231124094253.658064-1-dario.binacchi@amarulasolutions.com commit 9a5f580c1c71b6aedba696c4898a7a7184cef8ad Author: Muralidhara M K Date: Thu Nov 2 11:42:24 2023 +0000 EDAC/mc: Add support for HBM3 memory type AMD MI300A models use HBM3 (High Bandwidth Memory Gen 3) memory. HBM is a high-speed computer memory interface for 3D-stacked synchronous dynamic random-access memory (SDRAM). Signed-off-by: Muralidhara M K Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231102114225.2006878-4-muralimk@amd.com commit 47b744ea5e3cf855087951a74ba9f89180fa1ba5 Author: Muralidhara M K Date: Thu Nov 2 11:42:23 2023 +0000 x86/MCE/AMD: Add new MA_LLC, USR_DP, and USR_CP bank types Add HWID and McaType values for new SMCA bank types. Signed-off-by: Muralidhara M K Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231102114225.2006878-3-muralimk@amd.com commit 83dc1029dcf50b5b849b26679a1b3f860b85d79c Author: Thomas Zimmermann Date: Thu Nov 16 10:59:29 2023 +0100 drm/ast: Move detection code into PCI probe helper Detect device type and config mode in the PCI probe helper, but leave DRM device initialization where it is. Structures the driver probe and setup code into a detection and an initialization phase. A later patch can add branching to the device-initialization code. Each chip type can have it own initializer function, if necessary. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-11-tzimmermann@suse.de commit 51412f869337682d0e9e640c5b424ffb8295d353 Author: Thomas Zimmermann Date: Thu Nov 16 10:59:28 2023 +0100 drm/ast: Detect ast device type and config mode without ast device Return the ast chip and config in the detection function's parameters instead of storing them directly in the ast device instance. v2: * add break statements to switch default branches (Jocelyn) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-10-tzimmermann@suse.de commit 9f3ebec843b0f48ea2c22b7e85c34040aa7c9ee8 Author: Thomas Zimmermann Date: Thu Nov 16 10:59:27 2023 +0100 drm/ast: Add enum ast_config_mode The config mode used to be a field in struct ast_device. Turn it into a named type. We'll need this for device detection. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-9-tzimmermann@suse.de commit 83ab91faf20c1aed982ca5949ce5d83b34b7f546 Author: Thomas Zimmermann Date: Thu Nov 16 10:59:26 2023 +0100 drm/ast: Partially implement POST without ast device instance We'll have to do some of the GPU POSTing for detecting the ast device type. Make this work without an instance of the ast device. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-8-tzimmermann@suse.de commit 66f843d6703513b9ee8d3d10694a21931feb32c7 Author: Thomas Zimmermann Date: Thu Nov 16 10:59:25 2023 +0100 drm/ast: Enable MMIO without ast device instance We'll have to enable the MMIO access for detecting the ast device type. Make this work without an instance of the ast device. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-7-tzimmermann@suse.de commit 73b05bb4c0539d89111ed2f9c5a2eac1b577f83d Author: Thomas Zimmermann Date: Thu Nov 16 10:59:24 2023 +0100 drm/ast: Enable VGA without ast device instance We'll have to enable the VGA functionality for detecting the ast device type. Make this work without an instance of the ast device. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-6-tzimmermann@suse.de commit cdac0cd459cf282ccdc4f28f838a2375e5cf61f7 Author: Thomas Zimmermann Date: Thu Nov 16 10:59:23 2023 +0100 drm/ast: Add I/O helpers without ast device Implement I/O access in helpers that do not use an ast device instance, but the raw pointer to the I/O memory. We'll later need these helpers to detect the device type before allocating the ast device instance. v3: * fix typo in commit message (Sui) Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-5-tzimmermann@suse.de commit b45efcfc94e8043d08344094a305bb4b8030c7df Author: Thomas Zimmermann Date: Thu Nov 16 10:59:22 2023 +0100 drm/ast: Retrieve I/O-memory ranges without ast device Read the I/O-memory ranges into local variables before setting them in the ast device instanace. We'll later need this to split detecting the device type from the creation of the ast device instance. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-4-tzimmermann@suse.de commit 0ccaa3dde97bd30ae615c66fc20080e920ec9b4e Author: Thomas Zimmermann Date: Thu Nov 16 10:59:21 2023 +0100 drm/ast: Rework I/O register setup There are three different ways of retrieving the I/O-memory ranges for AST devices: either from PCI BAR 1, from PCI BAR 2 or from PCI BAR 1 by 'guessing'. Make the respective code more readable by making each case self- contained. Also add error checking against the length of the PCI BARs. v2: * fix I/O range length to 128 bytes * fix length test for PCI BAR 2 Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-3-tzimmermann@suse.de commit c350a08ac7ec933f1dc8a143ebab60164ed4d90b Author: Thomas Zimmermann Date: Thu Nov 16 10:59:20 2023 +0100 drm/ast: Turn ioregs_lock to modeset_lock The lock for the I/O registers is only relevant during mode-setting operations. It protects the registers from concurrent access from reading EDID information. Reduce lock coverage to mode setting, rename the lock and move it entirely into the mode-setting code. No functional changes, as the I/O lock was never used for anything else than mode setting. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231116100240.22975-2-tzimmermann@suse.de commit 401888e7206778db54b79e6b3c25a2f1461413e6 Author: Lukasz Luba Date: Wed Oct 25 20:22:25 2023 +0100 thermal: gov_power_allocator: Rearrange initialization of local variables Rearrange the initialization of local variables in allocate_power() so as to improve code clarity and the visibility of the initial values. This change is not expected to alter the general functionality. Signed-off-by: Lukasz Luba [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 0458d536ae97c5107b81810778d050da04d83fa2 Author: Lukasz Luba Date: Wed Oct 25 20:22:24 2023 +0100 thermal: gov_power_allocator: Remove excessive local variables Local variable 'ret' in allocate_power() is only used in the return statement, so drop it. Local variable 'trip_max' in allocate_power() is only used for caching the params->trip_max value which may as well be accessed directly as needed, so drop it either. This change is not expected to alter the general functionality. Signed-off-by: Lukasz Luba [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 30e1178c100df8c8560f4d338fdb6f4fcd27e676 Author: Lukasz Luba Date: Wed Oct 25 20:22:23 2023 +0100 thermal: gov_power_allocator: Use shorter paths to access data when possible The 'cdev' pointer in allow_maximum_power() is valid, so there is no need to use 'instance->cdev' instead of it. This change is not expected to alter the general functionality. Signed-off-by: Lukasz Luba [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 499cc391b41c8ccf5f5eae4c85e1725a037f138f Author: Lukasz Luba Date: Wed Oct 25 20:22:22 2023 +0100 thermal: gov_power_allocator: Rearrange local variables Rearrange the order of local variable definitions in multiple functions so as to follow the kernel coding style in that respect. Also, move local variable definitions located in nested code blocks to the beginning of each function to improve the visibility of all local variables in use. This change is not expected to alter the general functionality. Signed-off-by: Lukasz Luba [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit c7568e78411a67b28fe23acda934cd26d9dc42a3 Author: Lukasz Luba Date: Wed Oct 25 20:22:21 2023 +0100 thermal: gov_power_allocator: Check the cooling devices only for trip_max The throttling logic only cares about the last passive trip point and the cooling devices attached to it. Therefore, there is no need to bail out if other trip points have cooling devices which are not a supported by the IPA. Check the cooling devices only for 'trip_max' during the binding. Signed-off-by: Lukasz Luba [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit e83747c2f8e3cc5e284e37a8921099f1901d79d8 Author: Lukasz Luba Date: Wed Oct 25 20:22:20 2023 +0100 thermal: gov_power_allocator: Set up trip points earlier Set up the trip points at the beginning of the binding function. This simplifies the code a bit and allows for further cleanups. Also add a check to fail the binding if the last passive trip point is not found. Signed-off-by: Lukasz Luba [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 4e6d4687f7645e3b4a83d915974e8749c24bf2e2 Author: Lukasz Luba Date: Wed Oct 25 20:22:19 2023 +0100 thermal: gov_power_allocator: Rename trip_max_desired_temperature Refactor the code and rename the last passive trip point field. There is a comment describing the field properly. Use shorter field name so as to allow to clarify the code. This change is not expected to alter the general functionality. Signed-off-by: Lukasz Luba [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit a379972973a80924b1d03443e20f113ff76a94c7 Merge: a214724554aee 637567e4a3ef6 Author: Paolo Abeni Date: Tue Nov 28 15:48:42 2023 +0100 Merge branch 'net-page_pool-add-netlink-based-introspection' Jakub Kicinski says: ==================== net: page_pool: add netlink-based introspection We recently started to deploy newer kernels / drivers at Meta, making significant use of page pools for the first time. We immediately run into page pool leaks both real and false positive warnings. As Eric pointed out/predicted there's no guarantee that applications will read / close their sockets so a page pool page may be stuck in a socket (but not leaked) forever. This happens a lot in our fleet. Most of these are obviously due to application bugs but we should not be printing kernel warnings due to minor application resource leaks. Conversely the page pool memory may get leaked at runtime, and we have no way to detect / track that, unless someone reconfigures the NIC and destroys the page pools which leaked the pages. The solution presented here is to expose the memory use of page pools via netlink. This allows for continuous monitoring of memory used by page pools, regardless if they were destroyed or not. Sample in patch 15 can print the memory use and recycling efficiency: $ ./page-pool eth0[2] page pools: 10 (zombies: 0) refs: 41984 bytes: 171966464 (refs: 0 bytes: 0) recycling: 90.3% (alloc: 656:397681 recycle: 89652:270201) v4: - use dev_net(netdev)->loopback_dev - extend inflight doc v3: https://lore.kernel.org/all/20231122034420.1158898-1-kuba@kernel.org/ - ID is still here, can't decide if it matters - rename destroyed -> detach-time, good enough? - fix build for netsec v2: https://lore.kernel.org/r/20231121000048.789613-1-kuba@kernel.org - hopefully fix build with PAGE_POOL=n v1: https://lore.kernel.org/all/20231024160220.3973311-1-kuba@kernel.org/ - The main change compared to the RFC is that the API now exposes outstanding references and byte counts even for "live" page pools. The warning is no longer printed if page pool is accessible via netlink. RFC: https://lore.kernel.org/all/20230816234303.3786178-1-kuba@kernel.org/ ==================== Link: https://lore.kernel.org/r/20231126230740.2148636-1-kuba@kernel.org Signed-off-by: Paolo Abeni commit 637567e4a3ef6f6a5ffa48781207d270265f7e68 Author: Jakub Kicinski Date: Sun Nov 26 15:07:40 2023 -0800 tools: ynl: add sample for getting page-pool information Regenerate the tools/ code after netdev spec changes. Add sample to query page-pool info in a concise fashion: $ ./page-pool eth0[2] page pools: 10 (zombies: 0) refs: 41984 bytes: 171966464 (refs: 0 bytes: 0) recycling: 90.3% (alloc: 656:397681 recycle: 89652:270201) Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit be0096676e230b43730b8936ac393d155b4e3262 Author: Jakub Kicinski Date: Sun Nov 26 15:07:39 2023 -0800 net: page_pool: mute the periodic warning for visible page pools Mute the periodic "stalled pool shutdown" warning if the page pool is visible to user space. Rolling out a driver using page pools to just a few hundred hosts at Meta surfaces applications which fail to reap their broken sockets. Obviously it's best if the applications are fixed, but we don't generally print warnings for application resource leaks. Admins can now depend on the netlink interface for getting page pool info to detect buggy apps. While at it throw in the ID of the pool into the message, in rare cases (pools from destroyed netns) this will make finding the pool with a debugger easier. Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit d49010adae737638447369a4eff8f1aab736b076 Author: Jakub Kicinski Date: Sun Nov 26 15:07:38 2023 -0800 net: page_pool: expose page pool stats via netlink Dump the stats into netlink. More clever approaches like dumping the stats per-CPU for each CPU individually to see where the packets get consumed can be implemented in the future. A trimmed example from a real (but recently booted system): $ ./cli.py --no-schema --spec netlink/specs/netdev.yaml \ --dump page-pool-stats-get [{'info': {'id': 19, 'ifindex': 2}, 'alloc-empty': 48, 'alloc-fast': 3024, 'alloc-refill': 0, 'alloc-slow': 48, 'alloc-slow-high-order': 0, 'alloc-waive': 0, 'recycle-cache-full': 0, 'recycle-cached': 0, 'recycle-released-refcnt': 0, 'recycle-ring': 0, 'recycle-ring-full': 0}, {'info': {'id': 18, 'ifindex': 2}, 'alloc-empty': 66, 'alloc-fast': 11811, 'alloc-refill': 35, 'alloc-slow': 66, 'alloc-slow-high-order': 0, 'alloc-waive': 0, 'recycle-cache-full': 1145, 'recycle-cached': 6541, 'recycle-released-refcnt': 0, 'recycle-ring': 1275, 'recycle-ring-full': 0}, {'info': {'id': 17, 'ifindex': 2}, 'alloc-empty': 73, 'alloc-fast': 62099, 'alloc-refill': 413, ... Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 69cb4952b6f6a226c1c0a7ca400398aaa8f75cf2 Author: Jakub Kicinski Date: Sun Nov 26 15:07:37 2023 -0800 net: page_pool: report when page pool was destroyed Report when page pool was destroyed. Together with the inflight / memory use reporting this can serve as a replacement for the warning about leaked page pools we currently print to dmesg. Example output for a fake leaked page pool using some hacks in netdevsim (one "live" pool, and one "leaked" on the same dev): $ ./cli.py --no-schema --spec netlink/specs/netdev.yaml \ --dump page-pool-get [{'id': 2, 'ifindex': 3}, {'id': 1, 'ifindex': 3, 'destroyed': 133, 'inflight': 1}] Tested-by: Dragos Tatulea Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 7aee8429eedd0970d8add2fb5b856bfc5f5f1fc1 Author: Jakub Kicinski Date: Sun Nov 26 15:07:36 2023 -0800 net: page_pool: report amount of memory held by page pools Advanced deployments need the ability to check memory use of various system components. It makes it possible to make informed decisions about memory allocation and to find regressions and leaks. Report memory use of page pools. Report both number of references and bytes held. Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit d2ef6aa077bdd0b3495dba5dcae6d3f19579b20b Author: Jakub Kicinski Date: Sun Nov 26 15:07:35 2023 -0800 net: page_pool: add netlink notifications for state changes Generate netlink notifications about page pool state changes. Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 950ab53b77ab829defeb22bc98d40a5e926ae018 Author: Jakub Kicinski Date: Sun Nov 26 15:07:34 2023 -0800 net: page_pool: implement GET in the netlink API Expose the very basic page pool information via netlink. Example using ynl-py for a system with 9 queues: $ ./cli.py --no-schema --spec netlink/specs/netdev.yaml \ --dump page-pool-get [{'id': 19, 'ifindex': 2, 'napi-id': 147}, {'id': 18, 'ifindex': 2, 'napi-id': 146}, {'id': 17, 'ifindex': 2, 'napi-id': 145}, {'id': 16, 'ifindex': 2, 'napi-id': 144}, {'id': 15, 'ifindex': 2, 'napi-id': 143}, {'id': 14, 'ifindex': 2, 'napi-id': 142}, {'id': 13, 'ifindex': 2, 'napi-id': 141}, {'id': 12, 'ifindex': 2, 'napi-id': 140}, {'id': 11, 'ifindex': 2, 'napi-id': 139}, {'id': 10, 'ifindex': 2, 'napi-id': 138}] Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 839ff60df3ab92b81034ea3b859ab984eaa0c84c Author: Jakub Kicinski Date: Sun Nov 26 15:07:33 2023 -0800 net: page_pool: add nlspec for basic access to page pools Add a Netlink spec in YAML for getting very basic information about page pools. Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 7cc9e6d77f85fb5faa9ffa26c645c821430c7095 Author: Jakub Kicinski Date: Sun Nov 26 15:07:32 2023 -0800 eth: link netdev to page_pools in drivers Link page pool instances to netdev for the drivers which already link to NAPI. Unless the driver is doing something very weird per-NAPI should imply per-netdev. Add netsec as well, Ilias indicates that it fits the mold. Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 02b3de80c5f879f92e5f4bb3f535d172e0fc0ea0 Author: Jakub Kicinski Date: Sun Nov 26 15:07:31 2023 -0800 net: page_pool: stash the NAPI ID for easier access To avoid any issues with race conditions on accessing napi and having to think about the lifetime of NAPI objects in netlink GET - stash the napi_id to which page pool was linked at creation time. Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit 083772c9f972dcc248913b52a0dec1025baa1e16 Author: Jakub Kicinski Date: Sun Nov 26 15:07:30 2023 -0800 net: page_pool: record pools per netdev Link the page pools with netdevs. This needs to be netns compatible so we have two options. Either we record the pools per netns and have to worry about moving them as the netdev gets moved. Or we record them directly on the netdev so they move with the netdev without any extra work. Implement the latter option. Since pools may outlast netdev we need a place to store orphans. In time honored tradition use loopback for this purpose. Reviewed-by: Mina Almasry Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Signed-off-by: Paolo Abeni commit f17c69649c698e4df3cfe0010b7bbf142dec3e40 Author: Jakub Kicinski Date: Sun Nov 26 15:07:29 2023 -0800 net: page_pool: id the page pools To give ourselves the flexibility of creating netlink commands and ability to refer to page pool instances in uAPIs create IDs for page pools. Reviewed-by: Ilias Apalodimas Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Reviewed-by: Shakeel Butt Signed-off-by: Paolo Abeni commit 23cfaf67ba5d2f013d2576b8a9173c45a4a7f895 Author: Jakub Kicinski Date: Sun Nov 26 15:07:28 2023 -0800 net: page_pool: factor out uninit We'll soon (next change in the series) need a fuller unwind path in page_pool_create() so create the inverse of page_pool_init(). Reviewed-by: Ilias Apalodimas Reviewed-by: Eric Dumazet Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski Reviewed-by: Shakeel Butt Signed-off-by: Paolo Abeni commit a2f99fbae4513ce4871e71ba88cd9d75fe5019e6 Author: Abhinav Singh Date: Tue Nov 28 19:47:03 2023 +0530 EDAC/{sb,i7core}_edac: Do not use a plain integer for a NULL pointer Sparse warns about the use of the integer constant 0 as a NULL pointer with the -Wnon-pointer-null switch. Even though the C standard requires that 0 == NULL and type conversion rules turn an integer constant 0 into a NULL pointer when cast to a void * type, Linus notes that this is a very poor situation from a type safety angle and a pointer should be initialized with a pointer type - not an integer constant. See https://www.spinics.net/lists/linux-sparse/msg10066.html for more info. [ bp: Rewrite commit message, drop useless comments in the code. ] Signed-off-by: Abhinav Singh Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231128141703.614605-1-singhabhinav9051571833@gmail.com commit 26b9a880d24cf94342ae2b259e2a220338559789 Merge: 0d3abd456be45 a13fee31f5644 Author: Thomas Zimmermann Date: Tue Nov 28 15:32:24 2023 +0100 Merge drm/drm-next into drm-misc-next Backmerging to get commit 8d6ef26501b9 ("drm/ast: Disconnect BMC if physical connector is connected") into drm-misc-next. Signed-off-by: Thomas Zimmermann commit 8c91ca76f44804868d12aed20ebdbc2f89aa7d60 Author: Kamil Duljas Date: Thu Nov 16 23:01:03 2023 +0100 ASoC: SOF: icp3-dtrace: Fix wrong kfree() usage trace_filter_parse() allocs memory for *out and when -ENOMEM is returned, caller function, dfsentry_trace_filter_write() trying to freed this memory. After this patch, the memory is freed in trace_filter_parse() before -EINVAL returned. In caller function removed kfree(elms) from error label Signed-off-by: Kamil Duljas Link: https://lore.kernel.org/r/20231116220102.2097-2-kamil.duljas@gmail.com Signed-off-by: Mark Brown commit 9f988030e85fafa2b03910d467302853ad29a300 Author: Muralidhara M K Date: Thu Nov 2 11:42:22 2023 +0000 EDAC/mce_amd: Remove SMCA Extended Error code descriptions On AMD systems with Scalable MCA each machine check error of a SMCA bank type has an associated bit position in the bank's control (CTL) register. An error's bit position in the CTL register is used during error decoding for offsetting into the corresponding bank's error description structure. As new errors are being added in newer AMD systems for existing SMCA bank types, the underlying SMCA architecture guarantees that the bit positions of existing errors are not altered. However, on some AMD systems some of the existing bit definitions in the CTL register of SMCA bank type are reassigned without defining new HWID and McaType. Consequently, the errors whose bit definitions have been reassigned in the CTL register are being erroneously decoded. Remove SMCA Extended Error Code descriptions, this avoids decoding issues for incorrectly reassigned bits, and avoids the related maintenance burden in the kernel. But the bank type and Extended Error Code value for an error will continue to be printed as a convenience. The decoding of SMCA Extended Error Code description can be done by referring to AMD documentation or use external tools such as rasdaemon. Offline decoding can be done using below option in rasdaemon. For example: $ rasdaemon -p --status --ipid --smca Also, the user can pass particular family and model to decode the error string. $ rasdaemon -p --status --ipid --smca --family --model --bank Refer to the rasdaemon commit for details: https://github.com/mchehab/rasdaemon/commit/932118b04a04104dfac6b8536 Signed-off-by: Muralidhara M K Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Yazen Ghannam Link: https://lore.kernel.org/r/20231102114225.2006878-2-muralimk@amd.com commit 055ca83559912f2cfd91c9441427bac4caf3c74e Author: Jann Horn Date: Fri Nov 24 16:08:22 2023 +0100 fs/pipe: Fix lockdep false-positive in watchqueue pipe_write() When you try to splice between a normal pipe and a notification pipe, get_pipe_info(..., true) fails, so splice() falls back to treating the notification pipe like a normal pipe - so we end up in iter_file_splice_write(), which first locks the input pipe, then calls vfs_iter_write(), which locks the output pipe. Lockdep complains about that, because we're taking a pipe lock while already holding another pipe lock. I think this probably (?) can't actually lead to deadlocks, since you'd need another way to nest locking a normal pipe into locking a watch_queue pipe, but the lockdep annotations don't make that clear. Bail out earlier in pipe_write() for notification pipes, before taking the pipe lock. Reported-and-tested-by: Closes: https://syzkaller.appspot.com/bug?extid=011e4ea1da6692cf881c Fixes: c73be61cede5 ("pipe: Add general notification queue support") Signed-off-by: Jann Horn Link: https://lore.kernel.org/r/20231124150822.2121798-1-jannh@google.com Signed-off-by: Christian Brauner commit 12c1b632d970c0138b4c5c65a1065e7d0604d272 Author: Christian Brauner Date: Wed Nov 22 13:44:40 2023 +0100 fs: reformat idmapped mounts entry Reformat idmapped mounts to clearly mark where it belongs. Link: https://lore.kernel.org/r/20231122-vfs-mnt_idmap-v1-4-dae4abdde5bd@kernel.org Signed-off-by: Christian Brauner commit 783822e44594639848b78d4bb61dde26fba04e05 Author: Christian Brauner Date: Wed Nov 22 13:44:39 2023 +0100 mnt_idmapping: decouple from namespaces There's no reason we need to couple mnt idmapping to namespaces in the way we currently do. Copy the idmapping when an idmapped mount is created and don't take any reference on the namespace at all. We also can't easily refcount struct uid_gid_map because it needs to stay the size of a cacheline otherwise we risk performance regressions (Ignoring for a second that right now struct uid_gid_map isn't actually 64 byte but 72 but that's a fix for another patch series.). Link: https://lore.kernel.org/r/20231122-vfs-mnt_idmap-v1-3-dae4abdde5bd@kernel.org Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit 90fbd8b175ee75ee3d37d748b92bc317660b586d Author: Christian Brauner Date: Wed Nov 22 13:44:38 2023 +0100 mnt_idmapping: remove nop check All mounts default to nop_mnt_idmap and we don't allow creating idmapped mounts that reuse the idmapping of the filesystem. So unless someone passes a non-superblock namespace to these helpers this check will always be false. Remove it and replace it with a simple check for nop_mnt_idmap. Link: https://lore.kernel.org/r/20231122-vfs-mnt_idmap-v1-2-dae4abdde5bd@kernel.org Signed-off-by: Christian Brauner commit e65a29f0235a438ece414d2d99bbf0d31aa97d04 Author: Christian Brauner Date: Wed Nov 22 13:44:37 2023 +0100 mnt_idmapping: remove check_fsmapping() The helper is a bit pointless. Just open-code the check. Link: https://lore.kernel.org/r/20231122-vfs-mnt_idmap-v1-1-dae4abdde5bd@kernel.org Signed-off-by: Christian Brauner commit 71eb6b6b0ba93b1467bccff57b5de746b09113d2 Author: Kent Overstreet Date: Wed Nov 22 18:42:53 2023 -0500 fs/aio: obey min_nr when doing wakeups I've been observing workloads where IPIs due to wakeups in aio_complete() are ~15% of total CPU time in the profile. Most of those wakeups are unnecessary when completion batching is in use in io_getevents(). This plumbs min_nr through via the wait eventry, so that aio_complete() can avoid doing unnecessary wakeups. Signed-off-by: Kent Overstreet Link: https://lore.kernel.org/r/20231122234257.179390-1-kent.overstreet@linux.dev Cc: Benjamin LaHaise Cc: Christian Brauner Cc: Cc: Signed-off-by: Christian Brauner commit b7638ad0c7802ea854599ce753d0e6d20690f7e2 Author: Christian Brauner Date: Wed Nov 22 13:48:25 2023 +0100 eventfd: make eventfd_signal{_mask}() void No caller care about the return value. Link: https://lore.kernel.org/r/20231122-vfs-eventfd-signal-v2-4-bd549b14ce0c@kernel.org Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 120ae58593630819209a011a3f9c89f73bcc9894 Author: Christian Brauner Date: Wed Nov 22 13:48:24 2023 +0100 eventfd: simplify eventfd_signal_mask() The eventfd_signal_mask() helper was introduced for io_uring and similar to eventfd_signal() it always passed 1 for @n. So don't bother with that argument at all. Link: https://lore.kernel.org/r/20231122-vfs-eventfd-signal-v2-3-bd549b14ce0c@kernel.org Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 3652117f854819a148ff0fbe4492587d3520b5e5 Author: Christian Brauner Date: Wed Nov 22 13:48:23 2023 +0100 eventfd: simplify eventfd_signal() Ever since the eventfd type was introduced back in 2007 in commit e1ad7468c77d ("signal/timer/event: eventfd core") the eventfd_signal() function only ever passed 1 as a value for @n. There's no point in keeping that additional argument. Link: https://lore.kernel.org/r/20231122-vfs-eventfd-signal-v2-2-bd549b14ce0c@kernel.org Acked-by: Xu Yilun Acked-by: Andrew Donnellan # ocxl Acked-by: Eric Farman # s390 Reviewed-by: Jan Kara Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 0d3abd456be45369235dd75793ce26f07900044c Author: Danilo Krummrich Date: Sat Nov 25 00:36:38 2023 +0100 drm/imagination: vm: fix drm_gpuvm reference count The driver specific reference count indicates whether the VM should be teared down, whereas GPUVM's reference count indicates whether the VM structure can finally be freed. Hence, free the VM structure in pvr_gpuvm_free() and drop the last GPUVM reference after tearing down the VM. Generally, this prevents lifetime issues such as the VM being freed as long as drm_gpuvm_bo structures still hold references to the VM. Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Danilo Krummrich Reviewed-by: Donald Robson Tested-by: Frank Binns Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231124233650.152653-4-dakr@redhat.com commit 4550d66d08b2257a1b2d3ce339d68ca33177f4b9 Author: Danilo Krummrich Date: Sat Nov 25 00:36:37 2023 +0100 drm/imagination: vm: check for drm_gpuvm_range_valid() Extend pvr_device_addr_and_size_are_valid() by the corresponding GPUVM sanity checks. This includes a, previously missing, overflow check for the base address and size of the requested mapping. Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Danilo Krummrich Reviewed-by: Donald Robson Tested-by: Frank Binns Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231124233650.152653-3-dakr@redhat.com commit 4aa89e8644d3b8879191911edea0b6a63ea9d6e2 Author: Danilo Krummrich Date: Sat Nov 25 00:36:36 2023 +0100 drm/imagination: vm: prevent duplicate drm_gpuvm_bo instances Use drm_gpuvm_bo_obtain() instead of drm_gpuvm_bo_create(). The latter should only be used in conjunction with drm_gpuvm_bo_obtain_prealloc(). drm_gpuvm_bo_obtain() re-uses existing instances of a given VM and BO combination, whereas drm_gpuvm_bo_create() would always create a new instance of struct drm_gpuvm_bo and hence leave us with duplicates. Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code") Signed-off-by: Danilo Krummrich Reviewed-by: Donald Robson Tested-by: Frank Binns Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231124233650.152653-2-dakr@redhat.com commit 3519d77293fb74786a45811fa6b600db26c1b0be Author: Yang Li Date: Mon Nov 27 09:04:30 2023 +0800 drm/imagination: Remove unneeded semicolon ./drivers/gpu/drm/imagination/pvr_free_list.c:258:2-3: Unneeded semicolon Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7635 Signed-off-by: Yang Li Reviewed-by: Frank Binns Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231127010430.119666-1-yang.lee@linux.alibaba.com commit 737077b873e32254959bc6f8c3e63cc67ba1f44c Author: Colin Ian King Date: Fri Nov 24 16:39:17 2023 +0000 drm/imagination: Fix a couple of spelling mistakes in literal strings There are a couple of spelling mistakes in literal strings in the stid_fmts array. Fix these. Signed-off-by: Colin Ian King Reviewed-by: Frank Binns Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231124163917.300685-1-colin.i.king@gmail.com commit c64545594daf748422fa083389b062d0a16fb477 Author: Lukas Bulwahn Date: Tue Nov 28 10:00:16 2023 +0100 x86/Kconfig: Remove obsolete config X86_32_SMP Commit 0f08c3b22996 ("x86/smp: Reduce code duplication") removed the only use of CONFIG_X86_32_SMP. Remove the now obsolete config X86_32_SMP too. Signed-off-by: Lukas Bulwahn Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231128090016.29676-1-lukas.bulwahn@gmail.com commit ef858b61945a3f5fa3a158e795abf4b7c6e6739d Merge: 4775073b90450 ed99878462ccc Author: Mark Brown Date: Tue Nov 28 12:24:50 2023 +0000 ASoC: Intel: Soundwire related board and match updates Merge series from Peter Ujfalusi : A small update for SDW machine support: Small fixes for sof_sdw machine driver Support for rt722 New TGL/MTL and LNL match for new configurations commit 4775073b90450cb581ba60be5cb6c587985a4152 Merge: b2b6b2d8f49b7 8fa1116e1cae4 Author: Mark Brown Date: Tue Nov 28 12:24:41 2023 +0000 ASoC: Intel: Link handling rework and fixes Merge series from Peter Ujfalusi : SOF board updates for 6.8 including few small fix and the majority is to add generic helpers for codec, amp, BT offload, HDMI-In and DAI link generation among various machine drivers. commit a13fee31f56449fc600d9e064c7b32302f92dcef Merge: 221d6546bd16e 2cc14f52aeb78 Author: Daniel Vetter Date: Tue Nov 28 11:52:51 2023 +0100 Merge v6.7-rc3 into drm-next Thomas Zimermann needs 8d6ef26501 ("drm/ast: Disconnect BMC if physical connector is connected") for further ast work in -next. Minor conflicts in ivpu between 3de6d9597892 ("accel/ivpu: Pass D0i3 residency time to the VPU firmware") and 3f7c0634926d ("accel/ivpu/37xx: Fix hangs related to MMIO reset") changing adjacent lines. Signed-off-by: Daniel Vetter commit 9be4feb768b86c25da336a6c0f3e3caefd16f1e4 Author: Nathan Lynch Date: Mon Nov 27 18:40:09 2023 -0600 powerpc/rtas_pci: rename and properly expose config access APIs The rtas_read_config() and rtas_write_config() functions in kernel/rtas_pci.c have external linkage and two users in arch/powerpc: the rtas_pci code itself and the pseries platform's "enhanced error handling" (EEH) support code. The prototypes for these functions in asm/ppc-pci.h have until now been guarded by CONFIG_EEH since the only external caller is the pseries EEH code. However, this presumably has always generated warnings when built with !CONFIG_EEH and -Wmissing-prototypes: arch/powerpc/kernel/rtas_pci.c:46:5: error: no previous prototype for function 'rtas_read_config' [-Werror,-Wmissing-prototypes] 46 | int rtas_read_config(struct pci_dn *pdn, int where, int size, u32 *val) arch/powerpc/kernel/rtas_pci.c:98:5: error: no previous prototype for function 'rtas_write_config' [-Werror,-Wmissing-prototypes] 98 | int rtas_write_config(struct pci_dn *pdn, int where, int size, u32 val) The introduction of commit c6345dfa6e3e ("Makefile.extrawarn: turn on missing-prototypes globally") forces the issue. The efika and chrp platform code have (static) functions with the same names but different signatures. We may as well eliminate the potential for conflicts and confusion by renaming the globally visible versions as their prototypes get moved out of the CONFIG_EEH-guarded region; their current names are too generic anyway. Since they operate on objects of the type 'struct pci_dn *', give them the slightly more verbose prefix "rtas_pci_dn_" and fix up all the call sites. Fixes: c6345dfa6e3e ("Makefile.extrawarn: turn on missing-prototypes globally") Reported-by: Linux Kernel Functional Testing Closes: https://lore.kernel.org/linuxppc-dev/CA+G9fYt0LLXtjSz+Hkf3Fhm-kf0ZQanrhUS+zVZGa3O+Wt2+vg@mail.gmail.com/ Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231127-rtas-pci-rw-config-v1-1-385d29ace3df@linux.ibm.com commit 19cc8b1819a40410c50a3efab6cf27b73298deb5 Author: Viresh Kumar Date: Tue Nov 28 12:31:38 2023 +0530 OPP: Check for invalid OPP in dev_pm_opp_find_level_ceil() _find_key_ceil() may return an error and that must be checked before passing the same to dev_pm_opp_put(). Fixes: 41907aa4ae37 ("OPP: Level zero is valid") Reported-by: Dan Carpenter Signed-off-by: Viresh Kumar commit 925141432fa4d8325b7156e88e53d740b12d0b0e Author: Viresh Kumar Date: Thu Nov 16 15:59:35 2023 +0530 OPP: Don't set OPP recursively for a parent genpd Like other frameworks (clk, regulator, etc.) genpd core too takes care of propagation to performance state to parent genpds. The OPP core shouldn't attempt the same, or it may result in undefined behavior. Add checks at various places to take care of the same. Reviewed-by: Ulf Hansson Tested-by: Stephan Gerhold Signed-off-by: Viresh Kumar commit e37440e7e2c2760475d60c5556b59c8880a7fd63 Author: Viresh Kumar Date: Fri Oct 27 14:17:48 2023 +0530 OPP: Call dev_pm_opp_set_opp() for required OPPs Configuring the required OPP was never properly implemented, we just took an exception for genpds and configured them directly, while leaving out all other required OPP types. Now that a standard call to dev_pm_opp_set_opp() takes care of configuring the opp->level too, the special handling for genpds can be avoided by simply calling dev_pm_opp_set_opp() for the required OPPs, which shall eventually configure the corresponding level for genpds. This also makes it possible for us to configure other type of required OPPs (no concrete users yet though), via the same path. This is how other frameworks take care of parent nodes, like clock, regulators, etc, where we recursively call the same helper. In order to call dev_pm_opp_set_opp() for the virtual genpd devices, they must share the OPP table of the genpd. Call _add_opp_dev() for them to get that done. This commit also extends the struct dev_pm_opp_config to pass required devices, for non-genpd cases, which can be used to call dev_pm_opp_set_opp() for the non-genpd required devices. Reviewed-by: Ulf Hansson Tested-by: Stephan Gerhold Signed-off-by: Viresh Kumar commit 6d366d0e544676bf608769b9520644e3f654ff99 Author: Viresh Kumar Date: Thu Oct 12 15:45:21 2023 +0530 OPP: Use _set_opp_level() for single genpd case There are two genpd (as required-opp) cases that we need to handle, devices with a single genpd and ones with multiple genpds. The multiple genpds case is clear, where the OPP core calls dev_pm_domain_attach_by_name() for them and uses the virtual devices returned by this helper to call dev_pm_domain_set_performance_state() later to change the performance state. The single genpd case however requires special handling as we need to use the same `dev` structure (instead of a virtual one provided by genpd core) for setting the performance state via dev_pm_domain_set_performance_state(). As we move towards more generic code to take care of the required OPPs, where we will recursively call dev_pm_opp_set_opp() for all the required OPPs, the above special case becomes a problem. It doesn't make sense for a device's DT entry to have both "opp-level" and single "required-opps" entry pointing to a genpd's OPP, as that would make the OPP core call dev_pm_domain_set_performance_state() for two different values for the same device structure. And so we can reuse the 'opp->level" field in such a case and call _set_opp_level() for the device. Reviewed-by: Ulf Hansson Tested-by: Stephan Gerhold Signed-off-by: Viresh Kumar commit 073d3d2ca7d462afc8159ca0175675b9b7b4f162 Author: Viresh Kumar Date: Fri Oct 27 12:40:04 2023 +0530 OPP: Level zero is valid The level zero can be used by some OPPs to drop performance state vote for the device. It is perfectly fine to allow the same. _set_opp_level() considers it as an invalid value currently and returns early. In order to support this properly, initialize the level field with U32_MAX, which denotes unused level field. Reported-by: Stephan Gerhold Reviewed-by: Ulf Hansson Tested-by: Stephan Gerhold Signed-off-by: Viresh Kumar commit 2e9b4e598d287c152261ac614b9517b68241b0d7 Author: Jagan Teki Date: Sat Nov 25 19:59:14 2023 +0530 arm64: dts: rockchip: Use NCM6A-IO board for edgeble-neu6b Edgeble AI 6TOPS board topology is now changed in final revisions as a compatible IO board, NCM6A-IO, is made available for both variants of SoM: NCM6A and NCM6B. With this change, 6b-io is not as available and 6a; 6b SoM's have the same compatible IO board as 6a-io. This change is due to the common optimised design of the IO board made available now in final revisions, which was not the case in initial revisions. So, use the NCM6A-IO compatible for NCM6B SoM based IO dts. Signed-off-by: Jagan Teki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231125142914.57459-2-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit b685460632d51d7307bbba3d173c0dd6dbf38fa8 Author: Jagan Teki Date: Sat Nov 25 19:59:13 2023 +0530 dt-bindings: arm: rockchip: Update edgeble-neu6 bindings Current binding has following compatible combination for SoM, IO board - NCM6A: edgeble,neural-compute-module-6a, edgeble,neural-compute-module-6a-io - NCM6B: edgeble,neural-compute-module-6b, edgeble,neural-compute-module-6b-io This board topology now changes in final revisions, so a common compatible IO board, NCM6A-IO, is made available for both variants of SoM: NCM6A and NCM6B, produced by Edgeble AI. With this change, 6b-io is not as available and 6a; 6b SoM's have the same compatible IO board as 6a-io. This change is due to the common optimised design of the IO board made available now in final revisions, which was not the case in initial revisions. Update the dt-bindings with this new change. Signed-off-by: Jagan Teki Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231125142914.57459-1-jagan@edgeble.ai Signed-off-by: Heiko Stuebner commit 9ecf44fedc17ff267968b5fff589bf6793fc7ddd Author: Jimmy Hon Date: Sun Nov 26 14:08:45 2023 -0600 arm64: dts: rockchip: add USB3 host on rk3588s-orangepi-5 Enable USB3 host controller for the Orange Pi 5. Signed-off-by: Jimmy Hon Link: https://lore.kernel.org/r/20231126200845.1192-1-honyuenkwun@gmail.com Signed-off-by: Heiko Stuebner commit 55d50ace6b88eb273a10963160cadbadccfcdd64 Author: Bard Liao Date: Mon Nov 27 20:44:05 2023 +0800 soundwire: generic_bandwidth_allocation use bus->params.max_dr_freq bus->params.max_dr_freq is calculated and set in sdw_bus_master_add(). We can use it directly instead of calculating it again. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20231127124405.2080431-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 94bd4a6e6e6bd79c7214bab4a739db8c493b792f Author: Tony Lindgren Date: Sat Nov 25 11:24:56 2023 +0200 ARM: dts: motorola-mapphone: Add basic support for mz609 and mz617 The Motorola mapphone tablets are similar to the mapphone phones, but with different display and without some phone related peripherals. Let's add a new motorola-mapphone-mz607-mz617.dtsi and basic files for xyboard mz609 and mz617. All the tablets from mz607 to mz617 are quite similar so let's use motorola-mapphone-mz607-mz617.dtsi naming for the common file. Note that the tc358765 lcd bridge needs driver changes before it can be added. Signed-off-by: Tony Lindgren commit 1b5115d655a791a6ae95f789d195c8d211acdaea Author: Tony Lindgren Date: Sat Nov 25 11:24:56 2023 +0200 ARM: dts: motorola-mapphone: Move handset devices to a common file The mapphone tablets do not have same peripherals as the mapphone handsets. Let's move the handset specific devices into a common motorola-mapphone-handset.dtsi file. Signed-off-by: Tony Lindgren commit 662f20c4c450f882c97e9ae3b5801cff243a2c8b Author: Tony Lindgren Date: Sat Nov 25 11:24:56 2023 +0200 ARM: dts: motorola-mapphone: Move LCD to common file for xt875 and xt894 The LCD regulator and backlight are specific only to droid bionic xt875 and droid4 xt894. On droid razr xt910 and xt912, the LCD regulator and backlight are different. The LCD and backlight are also different on the the mz609 tablets. Let's add a common motorola-mapphone-xt8xx.dtsi to make it easy to add support for xt910 and xt912 and the mz609 to mz617 tablets. While at it, let's also move aliases to the board specific dts files where they belong. And let's move the omap4-droid4-xt894.dts compatible to the top. Signed-off-by: Tony Lindgren commit 9de586a0a1c58c935bd86b3432f6bf571c3ff24c Author: Tony Lindgren Date: Sat Nov 25 11:24:56 2023 +0200 dt-bindings: omap: Add Motorola mapphone mz609 and mz617 tablets Let's add compatibles for some xyboard tablets, these are similar to the mapphone devices already listed but with different peripherals. Acked-by: Rob Herring Signed-off-by: Tony Lindgren commit 95d516f3eb96bac466a6bfec28a1e55b8ed5160b Author: Niklas Söderlund Date: Sun Nov 26 00:33:27 2023 +0100 ARM: dts: renesas: r9a06g032: Add missing space in compatible Add missing space in compatible property and align style with rest of the file. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231125233327.238575-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit d74d8cdefcdcb8acf3be63eca6c5b5cefd534a8c Author: Niklas Söderlund Date: Sun Nov 26 00:32:42 2023 +0100 arm64: dts: renesas: r9a09g011: Add missing space in compatible Add missing space in compatible property and align style with rest of the file. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231125233242.237660-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 726a9b67e9fb9a8e5c955b3d7d591becb23c47ee Merge: bed9e27baf52a 7ecab28c3b2c2 Author: Song Liu Date: Mon Nov 27 15:49:57 2023 -0800 Merge branch 'md-next-rcu-cleanup' into md-next From Yu Kuai: md: remove rcu protection to access rdev from conf The lifetime of rdev: 1. md_import_device() generate a rdev based on underlying disk; mddev_lock() rdev = kzalloc(); rdev->bdev = blkdev_get_by_dev(); mddev_unlock() 2. bind_rdev_to_array() add this rdev to mddev->disks; mddev_lock() kobject_add(&rdev->kobj, &mddev->kobj, ...); list_add_rcu(&rdev->same_set, &mddev->disks); mddev_unlock() 3. remove_and_add_spares() add this rdev to conf; mddev_lock() rdev_addable(); pers->hot_add_disk(); rcu_assign_pointer(conf->rdev, rdev); mddev_unlock() 4. Use this array with rdev; 5. remove_and_add_spares() remove rdev from conf; // triggered by sysfs/ioctl mddev_lock() rdev_removeable(); pers->hot_remove_disk(); rcu_assign_pointer(conf->rdev, NULL); synchronize_rcu(); mddev_unlock() // triggered by daemon mddev_lock() rdev_removeable(); synchronize_rcu(); -> this can't protect accessing rdev from conf pers->hot_remove_disk(); rcu_assign_pointer(conf->rdev, NULL); mddev_unlock() 6. md_kick_rdev_from_array() remove rdev from mddev->disks; mddev_lock() list_del_rcu(&rdev->same_set); synchronize_rcu(); list_add(&rdev->same_set, &mddev->deleting) mddev_unlock() export_rdev There are two separate rcu protection for rdev, and this pathset remove the protection of conf(step 3 and 5), because it's safe to access rdev from conf in following cases: - If 'reconfig_mutex' is held, because rdev can't be added or rmoved to conf; - If there is normal IO inflight, because mddev_suspend() will wait for IO to be done and prevent rdev to be added or removed to conf; - If sync thread is running, because remove_and_add_spares() can only be called from daemon thread when sync thread is done, and 'MD_RECOVERY_RUNNING' is also checked for ioctl/sysfs; - if any spinlock or rcu_read_lock() is held, because synchronize_rcu() from step 6 prevent rdev to be freed until spinlock is released or rcu_read_unlock(); commit a214724554aee8f6a5953dccab51ceff448c08cd Merge: 2df6bde352be5 0cc3f50f42d26 Author: Jakub Kicinski Date: Mon Nov 27 18:43:27 2023 -0800 Merge tag 'wireless-next-2023-11-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Kalle Valo says: ==================== wireless-next patches for v6.8 The first features pull request for v6.8. Not so big in number of commits but we removed quite a few ancient drivers: libertas 16-bit PCMCIA support, atmel, hostap, zd1201, orinoco, ray_cs, wl3501 and rndis_wlan. Major changes: cfg80211/mac80211 - extend support for scanning while Multi-Link Operation (MLO) connected * tag 'wireless-next-2023-11-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (68 commits) wifi: nl80211: Documentation update for NL80211_CMD_PORT_AUTHORIZED event wifi: mac80211: Extend support for scanning while MLO connected wifi: cfg80211: Extend support for scanning while MLO connected wifi: ieee80211: fix PV1 frame control field name rfkill: return ENOTTY on invalid ioctl MAINTAINERS: update iwlwifi maintainers wifi: rtw89: 8922a: read efuse content from physical map wifi: rtw89: 8922a: read efuse content via efuse map struct from logic map wifi: rtw89: 8852c: read RX gain offset from efuse for 6GHz channels wifi: rtw89: mac: add to access efuse for WiFi 7 chips wifi: rtw89: mac: use mac_gen pointer to access about efuse wifi: rtw89: 8922a: add 8922A basic chip info wifi: rtlwifi: drop unused const_amdpci_aspm wifi: mwifiex: mwifiex_process_sleep_confirm_resp(): remove unused priv variable wifi: rtw89: regd: update regulatory map to R65-R44 wifi: rtw89: regd: handle policy of 6 GHz according to BIOS wifi: rtw89: acpi: process 6 GHz band policy from DSM wifi: rtlwifi: simplify rtl_action_proc() and rtl_tx_agg_start() wifi: rtw89: pci: update interrupt mitigation register for 8922AE wifi: rtw89: pci: correct interrupt mitigation register for 8852CE ... ==================== Link: https://lore.kernel.org/r/20231127180056.0B48DC433C8@smtp.kernel.org Signed-off-by: Jakub Kicinski commit ef6609adf1ecc4c0797a894d4dd365dbbc4903f9 Author: Masahiro Yamada Date: Thu Nov 23 16:18:24 2023 +0900 kbuild: remove the last use of old cmd_src_tar rule in packaging The rpm-pkg and deb-pkg targets have transitioned to using 'git archive' for tarball creation. Although the old cmd_src_tar is still used by snap-pkg, there is no need to pack and unpack a tarball solely for passing the source to snapcraft. Instead, you can use 'source-type: local' to tell the source location to snapcraft. Signed-off-by: Masahiro Yamada commit b28d6ca1c9cbb64b0c8e435c0ff34d8c5d52812c Author: Petr Vorel Date: Tue Nov 21 12:58:55 2023 +0100 kbuild: buildtar: always make modules_install It is done for the same reasons as 4243afdb9326 does it for builddeb: always runs make modules to install modules.builtin* files, which are needed for e.g. initramfs-tools or LTP testing tool. Signed-off-by: Petr Vorel Signed-off-by: Masahiro Yamada commit 884f55f152cb028056bf9efe557a2d7346e932f5 Author: Petr Vorel Date: Tue Nov 21 12:58:54 2023 +0100 kbuild: buildtar: Remove unused $dirs The shell variable $dirs is not used any more since 1fc9095846cc ("kbuild: tar-pkg: use tar rules in scripts/Makefile.package"), therefore remove it". Fixes: 1fc9095846cc ("kbuild: tar-pkg: use tar rules in scripts/Makefile.package") Signed-off-by: Petr Vorel Signed-off-by: Masahiro Yamada commit 48ab6c9c9256003a4f2d737ccdcba81e01ba4e68 Author: Masahiro Yamada Date: Sat Nov 18 16:59:12 2023 +0900 kconfig: massage the loop in conf_read_simple() Make the while-loop code a little more readable. The gain is that "CONFIG_FOO" without '=' is warned as unexpected data. Signed-off-by: Masahiro Yamada commit 4aced3ec84a848bd64bfd725e81c54eb31bf8b24 Author: Masahiro Yamada Date: Sat Nov 18 16:59:11 2023 +0900 kconfig: require an exact match for "is not set" to disable CONFIG option Currently, any string starting "is not set" disables a CONFIG option. For example, "# CONFIG_FOO is not settled down" is accepted as valid input, functioning the same as "# CONFIG_FOO is not set". It is a long-standing oddity. Check the line against the exact pattern "is not set". Signed-off-by: Masahiro Yamada commit 9925d6b7d12f5019d2a6c465ae72093101edbfd4 Author: Masahiro Yamada Date: Sat Nov 18 16:59:10 2023 +0900 kconfig: introduce getline_stripped() helper Currently, newline characters are stripped away in multiple places on the caller. Doing that in the callee is helpful for further cleanups. Signed-off-by: Masahiro Yamada commit d854b4b21de684a16a7d6163c7b0e9c5ff8a09d3 Author: Masahiro Yamada Date: Sat Nov 18 16:59:09 2023 +0900 kconfig: deduplicate code in conf_read_simple() Kconfig accepts both "# CONFIG_FOO is not set" and "CONFIG_FOO=n" as a valid input, but conf_read_simple() duplicates similar code to handle them. Factor out the common code. Signed-off-by: Masahiro Yamada commit 92d4fe0a48f1ab6cf20143dd0b376f4fe842854b Author: Masahiro Yamada Date: Sat Nov 18 16:59:08 2023 +0900 kconfig: remove unused code for S_DEF_AUTO in conf_read_simple() The 'else' arm here is unreachable in practical use cases. include/config/auto.conf does not include "# CONFIG_... is not set" line unless it is manually hacked. Signed-off-by: Masahiro Yamada commit 4d137ab0107ead0f2590fc0314e627431e3b9e3f Author: Masahiro Yamada Date: Sat Nov 18 16:59:07 2023 +0900 kconfig: require a space after '#' for valid input Currently, when an input line starts with '#', (line + 2) is passed to memcmp() without checking line[1]. It means that line[1] can be any arbitrary character. For example, "#KCONFIG_FOO is not set" is accepted as valid input, functioning the same as "# CONFIG_FOO is not set". More importantly, this can potentially lead to a buffer overrun if line[1] == '\0'. It occurs if the input only contains '#', as (line + 2) points to an uninitialized buffer. Check line[1], and skip the line if it is not a space. Signed-off-by: Masahiro Yamada commit 61e3e3c21a9599f7f2c6f15f7e4b099cf6ea290e Author: Masahiro Yamada Date: Sat Nov 18 15:18:36 2023 +0900 kconfig: remove error check for xrealloc() xrealloc() never returns NULL as it is checked in the callee. This is a left-over of commit d717f24d8c68 ("kconfig: add xrealloc() helper"). Signed-off-by: Masahiro Yamada commit 259b8bd13db5f61fcc60192d4f73eb2eac9c426f Author: Dmitrii Bundin Date: Mon Nov 6 00:56:22 2023 +0300 kbuild: deb-pkg: apply short -R and -j options The long version --rules-file and --jobs are available since 1.18.8 while their short analogues -R and -j have been added since 1.14.7. The option --rules-file the way it works currently was introduced in the commit 5cd52673aabdf5eaa58181972119a41041fc85f2 of dpkg dated 23.07.18 with the following changelog entry: * Fix dpkg-buildpackage option --rules-file parsing. It was trying to parse it as --rules-target, which due to the ordering was a no-op. The current behavior of the long version --rules-file is guaranteed to be in use starting 1.19.1 and might cause build failures for some versions newer than 1.18.8 even in spite of being documented that way. Signed-off-by: Dmitrii Bundin Signed-off-by: Masahiro Yamada commit ce1fc9345a59c55d3a46dd7da872791cae41324e Author: Masahiro Yamada Date: Mon Nov 6 03:10:47 2023 +0900 kconfig: do not clear SYMBOL_DEF_USER when the value is out of range When a user-supplied value is out of range, (NEW) and an incorrect default value are shown. [Test Kconfig] config FOO int "foo" range 10 20 [Test .config] CONFIG_FOO=30 [Result without this fix] $ make config * * Main menu * foo (FOO) [10] (NEW) [Result with this fix] $ make config * * Main menu * foo (FOO) [20] Currently, the SYMBOL_DEF_USER is cleared if the user input does not reside within the range. Kconfig forgets the initial value 30, and prints (NEW) and an incorrect default [10]. Kconfig should remember the user's input. The default should be [20] because the user's input, 30, is closer to the upper limit of the range. Please note it will not show up in "make oldconfig" because it is no longer considered as a new symbol. It also fixes the inconsistent behavior in listnewconfig/helpnewconfig. Signed-off-by: Masahiro Yamada commit 96a29581e735bcf3b4e5a4f2daad9f445025f510 Author: Masahiro Yamada Date: Sun Nov 5 16:52:18 2023 +0900 genksyms: use getopt_long() unconditionally getopt_long() is used by various tools in the kernel (e.g. Kconfig). It should be fine to use it all the time. Signed-off-by: Masahiro Yamada commit a19937d829fbe3103e4596c8810a3e5cb372c6d4 Author: Masahiro Yamada Date: Sun Nov 5 16:52:17 2023 +0900 genksyms: remove the remnant of the -s option Commit 74d931716151 ("genksyms: remove symbol prefix support") removed the -s (--symbol-prefix) option. Clean up the left-over. Signed-off-by: Masahiro Yamada commit 2df6bde352be531b6cde442500899d89fc990c65 Merge: cae0de45c8fd6 ed346fccfc403 Author: Jakub Kicinski Date: Mon Nov 27 18:15:44 2023 -0800 Merge branch 'selftests-tc-testing-updates-and-cleanups-for-tdc' Pedro Tammela says: ==================== selftests: tc-testing: updates and cleanups for tdc Address the recommendations from the previous series and cleanup some leftovers. ==================== Link: https://lore.kernel.org/r/20231124154248.315470-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit ed346fccfc40364888601a2ec75dd94f4dca23bd Author: Pedro Tammela Date: Fri Nov 24 12:42:48 2023 -0300 selftests: tc-testing: remove unused import Remove this leftover from the times we pre-allocated everything Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231124154248.315470-6-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 501679f5d4a433144ae755dd2e5f757b1ce5a152 Author: Pedro Tammela Date: Fri Nov 24 12:42:47 2023 -0300 selftests: tc-testing: cleanup on Ctrl-C Cleanup net namespaces and other resources if we get a SIGINT (Ctrl-C). As user visible resources are allocated on a per test basis, it's only required to catch this condition when (possibly) running tests. So far calling post_suite is enough to free up anything that might linger. A missing keyword replacement for nsPlugin is also included. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231124154248.315470-5-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 56e16bc69bb7d36a931111d8abdcd44b939751c4 Author: Pedro Tammela Date: Fri Nov 24 12:42:46 2023 -0300 selftests: tc-testing: prefix iproute2 functions with "ipr2" As suggested by Simon, prefix the functions that operate on iproute2 commands in contrast with the "nl" netlink prefix. Cc: Simon Horman Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231124154248.315470-4-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 8059e68b99280cc9a224593f3142f9368229c6ee Author: Pedro Tammela Date: Fri Nov 24 12:42:45 2023 -0300 selftests: tc-testing: remove unnecessary time.sleep This operation is redundant and it's not stabilizing nor waiting for anything. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231124154248.315470-3-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit a79d8ba734bdbd2574ad16dd1b96506e5f642c4a Author: Pedro Tammela Date: Fri Nov 24 12:42:44 2023 -0300 selftests: tc-testing: remove buildebpf plugin As tdc only tests loading/deleting and anything more complicated is better left to the ebpf test suite, provide a pre-compiled version of 'action.c' and don't bother compiling it in kselftests or on the fly at all. Cc: Davide Caratti Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231124154248.315470-2-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit cae0de45c8fd62612e1ee429134fd82c2c0e335e Merge: e1df5202e879b 7a1f9a17ee99a Author: Jakub Kicinski Date: Mon Nov 27 18:04:17 2023 -0800 Merge branch 'net-phylink-improve-phy-validation' Russell King says: ==================== net: phylink: improve PHY validation One of the issues which has concerned me about the rate matching implenentation that we have is that phy_get_rate_matching() returns whether rate matching will be used for a particular interface, and we enquire only for one interface. Aquantia PHYs can be programmed with the rate matching and interface mode settings on a per-media speed basis using the per-speed vendor 1 global configuration registers. Thus, it is possible for the PHY to be configured to use rate matching for 10G, 5G, 2.5G with 10GBASE-R, and then SGMII for the remaining speeds. Therefore, it clearly doesn't make sense to enquire about rate matching for just one interface mode. Also, PHYs that change their interfaces are handled sub-optimally, in that we validate all the interface modes that the host supports, rather than the interface modes that the PHY will use. This patch series changes the way we validate PHYs, but in order to do so, we need to know exactly which interface modes will be used by the PHY. So that phylib can convey this information, we add "possible_interfaces" to struct phy_device. possible_interfaces is to be filled in by a phylib driver once the PHY is configured (in other words in the PHYs .config_init method) with the interface modes that it will switch between. This then allows users of phylib to know which interface modes will be used by the PHY. This allows us to solve both these issues: where possible_interfaces is provided, we can validate which ethtool link modes can be supported by looking at which interface modes that both the PHY and host support, and request rate matching information for each mode. This should improve the accuracy of the validation. Sending this out again without RFC as Jie Luo will need it for the QCA8084 changes. No changes except to add the attributations already received. Thanks! ==================== Link: https://lore.kernel.org/r/ZWCWn+uNkVLPaQhn@shell.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 7a1f9a17ee99a3c27577465ce0f6c5f56cf1aacf Author: Russell King (Oracle) Date: Fri Nov 24 12:28:39 2023 +0000 net: phylink: use the PHY's possible_interfaces if populated Some PHYs such as Aquantia, Broadcom 84881, and Marvell 88X33x0 can switch between a set of interface types depending on the negotiated media speed, or can use rate adaption for some or all of these interface types. We currently assume that these are Clause 45 PHYs that are configured not to use a specific set of interface modes, which has worked so far, but is just a work-around. In this workaround, we validate using all interfaces that the MAC supports, which can lead to extra modes being advertised that can not be supported. To properly address this, switch to using the newly introduced PHY possible_interfaces bitmap which indicates which interface modes will be used by the PHY as configured. We calculate the union of the PHY's possible interfaces and MACs supported interfaces, checking that is non-empty. If the PHY is on a SFP, we further reduce the set by those which can be used on a SFP module, again checking that is non-empty. Finally, we validate the subset of interfaces, taking account of whether rate matching will be used for each individual interface mode. This becomes independent of whether the PHY is clause 22 or clause 45. It is encouraged that all PHYs that switch interface modes or use rate matching should populate phydev->possible_interfaces. Tested-by: Luo Jie Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1r6VIV-00DDMF-Pi@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 2c62ff83ee14da698bf52e723b704304b59455bb Author: Russell King (Oracle) Date: Fri Nov 24 12:28:34 2023 +0000 net: phylink: split out PHY validation from phylink_bringup_phy() When bringing up a PHY, we need to work out which ethtool link modes it should support and advertise. Clause 22 PHYs operate in a single interface mode, which can be easily dealt with. However, clause 45 PHYs tend to switch interface mode depending on the media. We need more flexible validation at this point, so this patch splits out that code in preparation to changing it. Tested-by: Luo Jie Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1r6VIQ-00DDM9-LK@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit b7014f9ece5075755105bafbeeb2c17ed0dace11 Author: Russell King (Oracle) Date: Fri Nov 24 12:28:29 2023 +0000 net: phylink: pass PHY into phylink_validate_mask() Pass the phy (if any) into phylink_validate_mask() so that we can validate each interface with its rate matching setting. Tested-by: Luo Jie Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1r6VIL-00DDM3-HJ@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 385e72b4003482bfe17c17a9f4005d2850b5e8e0 Author: Russell King (Oracle) Date: Fri Nov 24 12:28:24 2023 +0000 net: phylink: pass PHY into phylink_validate_one() Pass the phy (if any) into phylink_validate_one() so that we can validate each interface with its rate matching setting. Tested-by: Luo Jie Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1r6VIG-00DDLx-Cb@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 5f492a04506e5d93d5462238f7f899836ba3d421 Author: Russell King (Oracle) Date: Fri Nov 24 12:28:19 2023 +0000 net: phylink: split out per-interface validation Split out the internals of phylink_validate_mask() to make the code easier to read. Tested-by: Luo Jie Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1r6VIB-00DDLr-7g@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 01972fa9ab7dc1af073dd994380f3e603eb0654e Author: Russell King (Oracle) Date: Fri Nov 24 12:28:14 2023 +0000 net: phy: aquantia: fill in possible_interfaces for AQR113C Fill in the possible_interfaces bitmap for AQR113C so phylink knows which interface modes will be used by the PHY. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1r6VI6-00DDLl-2D@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit a22583338e535ba2512283da4aee893163a4b78d Author: Russell King (Oracle) Date: Fri Nov 24 12:28:08 2023 +0000 net: phy: bcm84881: fill in possible_interfaces Fill in the possible_interfaces member. This PHY driver only supports a single configuration found on SFPs. Reviewed-by: Florian Fainelli Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1r6VI0-00DDLf-Tb@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 82f2e76b660a490ae226db80d495b7c785e00d7a Author: Russell King (Oracle) Date: Fri Nov 24 12:28:03 2023 +0000 net: phy: marvell10g: fill in possible_interfaces Fill in the possible_interfaces member according to the selected mactype mode. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1r6VHv-00DDLZ-OL@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 2cb6d63b30c6fbc7cf5f671279be4a94049e141f Author: Russell King (Oracle) Date: Fri Nov 24 12:27:58 2023 +0000 net: phy: marvell10g: table driven mactype decode Replace the code-based mactype decode with a table driven approach. This will allow us to fill in the possible_interfaces cleanly. Signed-off-by: Russell King (Oracle) Link: https://lore.kernel.org/r/E1r6VHq-00DDLT-In@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit 243ad8df7a1bd24c2e01bd99d9f0bb88844dae91 Author: Russell King (Oracle) Date: Fri Nov 24 12:27:52 2023 +0000 net: phy: add possible interfaces Add a possible_interfaces member to struct phy_device to indicate which interfaces a clause 45 PHY may switch between depending on the media. This must be populated by the PHY driver by the time the .config_init() method completes according to the PHYs host-side configuration. For example, the Marvell 88x3310 PHY can switch between 10GBASE-R, 5GBASE-R, 2500BASE-X, and SGMII on the host side depending on the media side speed, so all these interface modes are set in the possible_interfaces member. This allows phylib users (such as phylink) to know in advance which interface modes to expect, which allows them to appropriately restrict the advertised link modes according to the capabilities of other parts of the link. Tested-by: Luo Jie Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1r6VHk-00DDLN-I7@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski commit cf9791631027a476f7cdb0e1b3ac6add16eff264 Author: Stanislav Fomichev Date: Mon Nov 27 10:20:57 2023 -0800 selftests/bpf: update test_offload to use new orphaned property - filter orphaned programs by default - when trying to query orphaned program, don't expect bpftool failure Cc: netdev@vger.kernel.org Signed-off-by: Stanislav Fomichev Link: https://lore.kernel.org/r/20231127182057.1081138-2-sdf@google.com Signed-off-by: Martin KaFai Lau commit 876843ce1e4897e8ceade50bfa3d9a4ec483abf3 Author: Stanislav Fomichev Date: Mon Nov 27 10:20:56 2023 -0800 bpftool: mark orphaned programs during prog show Commit ef01f4e25c17 ("bpf: restore the ebpf program ID for BPF_AUDIT_UNLOAD and PERF_BPF_EVENT_PROG_UNLOAD") stopped removing program's id from idr when the offloaded/bound netdev goes away. I was supposed to take a look and check in [0], but apparently I did not. Martin points out it might be useful to keep it that way for observability sake, but we at least need to mark those programs as unusable. Mark those programs as 'orphaned' and keep printing the list when we encounter ENODEV. 0: unspec tag 0000000000000000 xlated 0B not jited memlock 4096B orphaned [0]: https://lore.kernel.org/all/CAKH8qBtyR20ZWAc11z1-6pGb3Hd47AQUTbE_cfoktG59TqaJ7Q@mail.gmail.com/ v3: * use two spaces for " orphaned" (Quentin) Cc: netdev@vger.kernel.org Fixes: ef01f4e25c17 ("bpf: restore the ebpf program ID for BPF_AUDIT_UNLOAD and PERF_BPF_EVENT_PROG_UNLOAD") Signed-off-by: Stanislav Fomichev Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20231127182057.1081138-1-sdf@google.com Signed-off-by: Martin KaFai Lau commit 7ecab28c3b2c26c1a51154d997433e8432eb49ba Author: Yu Kuai Date: Sat Nov 25 16:16:04 2023 +0800 md/md-multipath: remove rcu protection to access rdev from conf Because it's safe to accees rdev from conf: - If any spinlock is held, because synchronize_rcu() from md_kick_rdev_from_array() will prevent 'rdev' to be freed until spinlock is released; - If there is normal IO inflight, because mddev_suspend() will prevent rdev to be added or removed from array; And these will cover all the scenarios in md-multipath. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231125081604.3939938-6-yukuai1@huaweicloud.com commit ad8606702f268903b26795e6b93605646fd1a6a8 Author: Yu Kuai Date: Sat Nov 25 16:16:03 2023 +0800 md/raid5: remove rcu protection to access rdev from conf Because it's safe to accees rdev from conf: - If any spinlock is held, because synchronize_rcu() from md_kick_rdev_from_array() will prevent 'rdev' to be freed until spinlock is released; - If 'reconfig_lock' is held, because rdev can't be added or removed from array; - If there is normal IO inflight, because mddev_suspend() will prevent rdev to be added or removed from array; - If there is sync IO inflight, because 'MD_RECOVERY_RUNNING' is checked in remove_and_add_spares(). And these will cover all the scenarios in raid456. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231125081604.3939938-5-yukuai1@huaweicloud.com commit 2d32777d60de81aa020a2431567020af26564c71 Author: Yu Kuai Date: Sat Nov 25 16:16:02 2023 +0800 md/raid1: remove rcu protection to access rdev from conf Because it's safe to accees rdev from conf: - If any spinlock is held, because synchronize_rcu() from md_kick_rdev_from_array() will prevent 'rdev' to be freed until spinlock is released; - If 'reconfig_lock' is held, because rdev can't be added or removed from array; - If there is normal IO inflight, because mddev_suspend() will prevent rdev to be added or removed from array; - If there is sync IO inflight, because 'MD_RECOVERY_RUNNING' is checked in remove_and_add_spares(). And these will cover all the scenarios in raid1. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231125081604.3939938-4-yukuai1@huaweicloud.com commit a448af25becf4b555660b5ba2618c7ed3c4de6da Author: Yu Kuai Date: Sat Nov 25 16:16:01 2023 +0800 md/raid10: remove rcu protection to access rdev from conf Because it's safe to accees rdev from conf: - If any spinlock is held, because synchronize_rcu() from md_kick_rdev_from_array() will prevent 'rdev' to be freed until spinlock is released; - If 'reconfig_lock' is held, because rdev can't be added or removed from array; - If there is normal IO inflight, because mddev_suspend() will prevent rdev to be added or removed from array; - If there is sync IO inflight, because 'MD_RECOVERY_RUNNING' is checked in remove_and_add_spares(). And these will cover all the scenarios in raid10. This patch also cleanup the code to handle the case that replacement replace rdev while IO is still inflight. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231125081604.3939938-3-yukuai1@huaweicloud.com commit c891f1fd90e66e584bb1353e1859cef7c9eb36f8 Author: Yu Kuai Date: Sat Nov 25 16:16:00 2023 +0800 md: remove flag RemoveSynchronized rcu is not used correctly here, because synchronize_rcu() is called before replacing old value, for example: remove_and_add_spares // other path synchronize_rcu // called before replacing old value set_bit(RemoveSynchronized) rcu_read_lock() rdev = conf->mirros[].rdev pers->hot_remove_disk conf->mirros[].rdev = NULL; if (!test_bit(RemoveSynchronized)) synchronize_rcu /* * won't be called, and won't wait * for concurrent readers to be done. */ // access rdev after remove_and_add_spares() rcu_read_unlock() Fortunately, there is a separate rcu protection to prevent such rdev to be freed: md_kick_rdev_from_array //other path rcu_read_lock() rdev = conf->mirros[].rdev list_del_rcu(&rdev->same_set) rcu_read_unlock() /* * rdev can be removed from conf, but * rdev won't be freed. */ synchronize_rcu() free rdev Hence remove this useless flag and prepare to remove rcu protection to access rdev from 'conf'. Signed-off-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231125081604.3939938-2-yukuai1@huaweicloud.com commit bed9e27baf52a09b7ba2a3714f1e24e17ced386d Author: Junxiao Bi Date: Wed Nov 8 10:22:16 2023 -0800 Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d" This reverts commit 5e2cf333b7bd5d3e62595a44d598a254c697cd74. That commit introduced the following race and can cause system hung. md_write_start: raid5d: // mddev->in_sync == 1 set "MD_SB_CHANGE_PENDING" // running before md_write_start wakeup it waiting "MD_SB_CHANGE_PENDING" cleared >>>>>>>>> hung wakeup mddev->thread ... waiting "MD_SB_CHANGE_PENDING" cleared >>>> hung, raid5d should clear this flag but get hung by same flag. The issue reverted commit fixing is fixed by last patch in a new way. Fixes: 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d") Cc: stable@vger.kernel.org # v5.19+ Signed-off-by: Junxiao Bi Reviewed-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231108182216.73611-2-junxiao.bi@oracle.com commit d6e035aad6c09991da1c667fb83419329a3baed8 Author: Junxiao Bi Date: Wed Nov 8 10:22:15 2023 -0800 md: bypass block throttle for superblock update commit 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d") introduced a hung bug and will be reverted in next patch, since the issue that commit is fixing is due to md superblock write is throttled by wbt, to fix it, we can have superblock write bypass block layer throttle. Fixes: 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d") Cc: stable@vger.kernel.org # v5.19+ Suggested-by: Yu Kuai Signed-off-by: Junxiao Bi Reviewed-by: Logan Gunthorpe Reviewed-by: Yu Kuai Signed-off-by: Song Liu Link: https://lore.kernel.org/r/20231108182216.73611-1-junxiao.bi@oracle.com commit e17049148678725248a57ecbf9c21df0fde3b434 Author: Rob Herring Date: Fri Oct 20 07:52:13 2023 -0500 drm: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data in a single step. With this, adjust the includes to explicitly include the correct headers. That also serves as preparation to remove implicit includes within the DT headers (of_device.h in particular). Reviewed-by: Tomi Valkeinen Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20231020125214.2930329-1-robh@kernel.org Signed-off-by: Rob Herring commit 24af68a0ed53629bdde7b53ef8c2be72580d293b Author: Frieder Schrempf Date: Mon Nov 27 12:22:26 2023 +0100 usb: misc: onboard_usb_hub: Add support for Cypress CY7C6563x The Cypress CY7C6563x is a 2/4-port USB 2.0 hub. Add support for this hub in the driver in order to bring up reset, supply or clock dependencies. There is no reset pulse width given in the datasheet so we expect a minimal value of 1us to be enough. This hasn't been tested though due to lack of hardware which has the reset connected to a GPIO. Signed-off-by: Frieder Schrempf Link: https://lore.kernel.org/r/20231127112234.109073-3-frieder@fris.de Signed-off-by: Greg Kroah-Hartman commit 65e62b8a955adebee8634804d8f72599213c2774 Author: Frieder Schrempf Date: Mon Nov 27 12:22:25 2023 +0100 usb: misc: onboard_usb_hub: Add support for clock input Most onboard USB hubs have a dedicated crystal oscillator but on some boards the clock signal for the hub is provided by the SoC. In order to support this, we add the possibility of specifying a clock in the devicetree that gets enabled/disabled when the hub is powered up/down. Signed-off-by: Frieder Schrempf Link: https://lore.kernel.org/r/20231127112234.109073-2-frieder@fris.de Signed-off-by: Greg Kroah-Hartman commit ea3ba10f2961f08155bb66c0b1b8088652ca5f28 Author: Frieder Schrempf Date: Mon Nov 27 12:22:24 2023 +0100 usb: misc: onboard_usb_hub: Print symbolic error names Instead of printing the decimal error codes, let's use the more human-readable symbolic error names provided by the %pe printk format specifier. Signed-off-by: Frieder Schrempf Link: https://lore.kernel.org/r/20231127112234.109073-1-frieder@fris.de Signed-off-by: Greg Kroah-Hartman commit 08973307d28311505b85216d724826e2ca21759e Author: Namhyung Kim Date: Wed Oct 11 20:50:25 2023 -0700 perf annotate: Check if operand has multiple regs It needs to check all possible information in an instruction. Let's add a field indicating if the operand has multiple registers. I'll be used to search type information like in an array access on x86 like: mov 0x10(%rax,%rbx,8), %rcx ------------- here Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231012035111.676789-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ffa96259ca5f02bbcecd2c45831e7632cd6d3485 Author: James Clark Date: Mon Nov 13 10:23:24 2023 +0000 perf test: Use existing config value for objdump path There is already an existing config value for changing the objdump path, so instead of having two values that do the same thing, make 'perf test' use annotate.objdump as well. Signed-off-by: James Clark Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Fangrui Song Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Peter Zijlstra Cc: Yang Jihong Cc: Yonghong Song Link: https://lore.kernel.org/r/ZU5Cx4LTrB5q0sIG@kernel.org Link: https://lore.kernel.org/r/20231113102327.695386-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 7340c6df49df1b261892d287444c255d0a378063 Author: Inochi Amaoto Date: Wed Nov 22 20:41:06 2023 +0800 perf vendor events riscv: add T-HEAD C9xx JSON file Add JSON file of T-HEAD C9xx series events. The event idx (raw value) is summary as following: event id range | support cpu 0x01 - 0x2a | c906,c910,c920 The event ids are based on the public document of T-HEAD and cover the c900 series. These events are the max that c900 series support. Since T-HEAD let manufacturers decide whether events are usable, the final support of the perf events is determined by the pmu node of the soc dtb. Signed-off-by: Inochi Amaoto Tested-by: Guo Ren Acked-by: Palmer Dabbelt Cc: Adrian Hunter Cc: Albert Ou Cc: Alexander Shishkin Cc: Chen Wang Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Jisheng Zhang Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Wei Fu Cc: linux-riscv@lists.infradead.org Link: https://lore.kernel.org/r/IA1PR20MB495325FCF603BAA841E29281BBBAA@IA1PR20MB4953.namprd20.prod.outlook.com Signed-off-by: Arnaldo Carvalho de Melo commit 19dd49c9337a482325d4dd7000e328dac11f6b5c Author: Ian Rogers Date: Thu Nov 9 15:27:32 2023 -0800 perf vendor events: Add skx, clx, icx and spr upi bandwidth metric Add upi_data_receive_bw metric for skylakex, cascadelakex, icelakex and sapphirerapids. The metric was added to perfmon metrics in: https://github.com/intel/perfmon/pull/119 Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Caleb Biggers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Perry Taylor Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231109232732.2973015-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 124bf6360ad8fe9267017d10b5dd465d4af73247 Author: Adrian Hunter Date: Thu Nov 23 09:58:48 2023 +0200 perf tests: Skip data symbol test if buf1 symbol is missing perf data symbol test depends on finding symbol buf1 in perf, and fails if perf has been stripped and no debug object is available. In that case, skip the test instead. Example: Before: $ strip tools/perf/perf $ tools/perf/perf buildid-cache -p `realpath tools/perf/perf` $ tools/perf/perf test -v 'data symbol' 113: Test data symbol : --- start --- test child forked, pid 125646 Recording workload... [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 0.577 MB /tmp/__perf_test.perf.data.Jhbdp (7794 samples) ] Cleaning up files... test child finished with -1 ---- end ---- Test data symbol: FAILED! After: $ tools/perf/perf test -v 'data symbol' 113: Test data symbol : --- start --- test child forked, pid 125747 perf does not have symbol 'buf1' perf is missing symbols - skipping test test child finished with -2 ---- end ---- Test data symbol: Skip Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: German Gomez Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231123075848.9652-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3b24b15cf6fb2dbe1d009a52c9ddcb7721503d8f Author: Adrian Hunter Date: Thu Nov 23 09:58:47 2023 +0200 perf tests: Make data symbol test wait for perf to start The perf data symbol test waits 1 second for perf to run and collect data, which may be too little if perf takes a long time to start up, which has been noticed on systems with many CPUs. Use existing wait_for_perf_to_start helper to wait for perf to start. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: German Gomez Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231123075848.9652-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit fcfb5a6189f55669c931dce9fec85280655c515f Author: Adrian Hunter Date: Thu Nov 23 09:58:46 2023 +0200 perf tests: Skip branch stack sampling test if brstack_bench symbol is missing The test "Check branch stack sampling" depends on finding symbol brstack_bench (and several others) in perf, and fails if perf has been stripped and no debug object is available. In that case, skip the test instead. Example: Before: $ strip tools/perf/perf $ tools/perf/perf buildid-cache -p `realpath tools/perf/perf` $ tools/perf/perf test -v 'branch stack sampling' 112: Check branch stack sampling : --- start --- test child forked, pid 123741 Testing user branch stack sampling + grep -E -m1 ^brstack_bench\+[^ ]*/brstack_foo\+[^ ]*/IND_CALL/.*$ /tmp/__perf_test.program.5Dz1U/perf.script + cleanup + rm -rf /tmp/__perf_test.program.5Dz1U test child finished with -1 ---- end ---- Check branch stack sampling: FAILED! After: $ tools/perf/perf test -v 'branch stack sampling' 112: Check branch stack sampling : --- start --- test child forked, pid 125157 perf does not have symbol 'brstack_bench' perf is missing symbols - skipping test test child finished with -2 ---- end ---- Check branch stack sampling: Skip Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: German Gomez Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231123075848.9652-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit fc1de29a8b8ad46b590b2d389b53b4ecf9758273 Author: Adrian Hunter Date: Thu Nov 23 09:58:45 2023 +0200 perf tests: Skip Arm64 callgraphs test if leafloop symbol is missing The test "Check Arm64 callgraphs are complete in fp mode" depends on finding symbol leafloop in perf, and fails if perf has been stripped and no debug object is available. In that case, skip the test instead. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: German Gomez Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231123075848.9652-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3c489dbe69c155c86c4460491d11520cf8ec3637 Author: Adrian Hunter Date: Thu Nov 23 09:58:44 2023 +0200 perf tests: Skip record test if test_loop symbol is missing perf record test depends on finding symbol test_loop in perf, and fails if perf has been stripped and no debug object is available. In that case, skip the test instead. Example: Note, building with perl support adds option -Wl,-E which causes the linker to add all (global) symbols to the dynamic symbol table. So the test_loop symbol, being global, does not get stripped unless NO_LIBPERL=1 Before: $ make NO_LIBPERL=1 -C tools/perf >/dev/null 2>&1 $ strip tools/perf/perf $ tools/perf/perf buildid-cache -p `realpath tools/perf/perf` $ tools/perf/perf test -v 'record tests' 91: perf record tests : --- start --- test child forked, pid 118750 Basic --per-thread mode test Per-thread record [Failed missing output] Register capture test Register capture test [Success] Basic --system-wide mode test System-wide record [Skipped not supported] Basic target workload test Workload record [Failed missing output] test child finished with -1 ---- end ---- perf record tests: FAILED! After: $ tools/perf/perf test -v 'record tests' 91: perf record tests : --- start --- test child forked, pid 120025 perf does not have symbol 'test_loop' perf is missing symbols - skipping test test child finished with -2 ---- end ---- perf record tests: Skip Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: German Gomez Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231123075848.9652-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c9526a735082bba57da322332cbcef1bbdff5698 Author: Adrian Hunter Date: Thu Nov 23 09:58:43 2023 +0200 perf tests: Skip pipe test if noploop symbol is missing perf pipe recording and injection test depends on finding symbol noploop in perf, and fails if perf has been stripped and no debug object is available. In that case, skip the test instead. Example: Before: $ strip tools/perf/perf $ tools/perf/perf buildid-cache -p `realpath tools/perf/perf` $ tools/perf/perf test -v pipe 86: perf pipe recording and injection test : --- start --- test child forked, pid 47734 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] 47741 47741 -1 |perf [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.000 MB - ] cannot find noploop function in pipe #1 test child finished with -1 ---- end ---- perf pipe recording and injection test: FAILED! After: $ tools/perf/perf test -v pipe 86: perf pipe recording and injection test : --- start --- test child forked, pid 48996 perf does not have symbol 'noploop' perf is missing symbols - skipping test test child finished with -2 ---- end ---- perf pipe recording and injection test: Skip Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: German Gomez Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231123075848.9652-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 96ba5999e8d86138cea90422f8c00309a7eedd3b Author: Adrian Hunter Date: Thu Nov 23 09:58:42 2023 +0200 perf tests lib: Add perf_has_symbol.sh Some shell tests depend on finding symbols for perf itself, and fail if perf has been stripped and no debug object is available. Add helper functions to check if perf has a needed symbol. This is preparation for amending the tests themselves to be skipped if a needed symbol is not found. The functions make use of the "Symbols" test which reads and checks symbols from a dso, perf itself by default. Note the "Symbols" test will find symbols using the same method as other perf tests, including, for example, looking in the buildid cache. An alternative would be to prevent the needed symbols from being stripped, which seems to work with gcc's externally_visible attribute, but that attribute is not supported by clang. Another alternative would be to use option -Wl,-E (which is already used when perf is built with perl support) which causes the linker to add all (global) symbols to the dynamic symbol table. Then the required symbols need only be made global in scope to avoid being strippable. However that goes beyond what is needed. Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: German Gomez Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231123075848.9652-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 70df07838fc1c0acfab3325ae79014e241a88bdf Author: Adrian Hunter Date: Thu Nov 23 09:58:41 2023 +0200 perf header: Fix segfault on build_mem_topology() error path Do not increase the node count unless a node has been successfully read, because it can lead to a segfault if an error occurs. For example, if perf exceeds the open file limit in memory_node__read(), which, on a test system, could be made to happen by setting the file limit to exactly 32: Before: $ ulimit -n 32 $ perf mem record --all-user -- sleep 1 [ perf record: Woken up 1 times to write data ] failed: can't open memory sysfs data perf: Segmentation fault Obtained 14 stack frames. perf(sighandler_dump_stack+0x48) [0x55f4b1f59558] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f4ba1c42520] /lib/x86_64-linux-gnu/libc.so.6(free+0x1e) [0x7f4ba1ca53fe] perf(+0x178ff4) [0x55f4b1f48ff4] perf(+0x179a70) [0x55f4b1f49a70] perf(+0x17ef5d) [0x55f4b1f4ef5d] perf(+0x85c0b) [0x55f4b1e55c0b] perf(cmd_record+0xe1d) [0x55f4b1e5920d] perf(cmd_mem+0xc96) [0x55f4b1e80e56] perf(+0x130460) [0x55f4b1f00460] perf(main+0x689) [0x55f4b1e427d9] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f4ba1c29d90] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f4ba1c29e40] perf(_start+0x25) [0x55f4b1e42a25] Segmentation fault (core dumped) $ After: $ ulimit -n 32 $ perf mem record --all-user -- sleep 1 [ perf record: Woken up 1 times to write data ] failed: can't open memory sysfs data [ perf record: Captured and wrote 0.005 MB perf.data (11 samples) ] $ Fixes: f8e502b9d1b3b197 ("perf header: Ensure bitmaps are freed") Signed-off-by: Adrian Hunter Acked-by: Ian Rogers Cc: German Gomez Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231123075848.9652-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8aa1e6e29a21f6bb99dcaa64d11e97a21f0f9dc1 Author: Thomas Richter Date: Wed Nov 22 10:27:03 2023 +0100 perf report: Remove warning on missing raw data for s390 Command # ./perf report -i /tmp/111 -D > /dev/null emits an error message when a sample for event CRYPTO_ALL in the perf.data file does not contain any raw data. This is ok. Do not trigger this warning when the sample in the perf.data files does not contain any raw data at all. Check for availability of raw data for all events and return if none is available. Output before: # ./perf report -i /tmp/111 -D > /dev/null Invalid CRYPTO_ALL raw data encountered Invalid CRYPTO_ALL raw data encountered Invalid CRYPTO_ALL raw data encountered # Output after: # ./perf report -i /tmp/111 -D > /dev/null # Fixes: b539deafbadb2fc6 ("perf report: Add s390 raw data interpretation for PAI counters") Signed-off-by: Thomas Richter Acked-by: Namhyung Kim Acked-by: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Thomas Richter Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20231122092703.3163191-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit d254d263f6c89107a5accf5b24bc3d120ead113f Author: Borislav Petkov (AMD) Date: Wed Nov 15 18:03:30 2023 +0100 docs: submitting-patches: improve the base commit explanation After receiving a second patchset this week without knowing which tree it applies on and trying to apply it on the obvious ones and failing, make sure the base tree information which needs to be supplied in the 0th message of the patchset is spelled out more explicitly. Also, make the formulations stronger as this really is a requirement and not only a useful thing anymore. Signed-off-by: "Borislav Petkov (AMD)" change-id: base-commit: Reviewed-by: Kees Cook Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231115170330.16626-1-bp@alien8.de commit c7dd2c42f1bccf993a80a032e2106b3ecb1ec1ed Author: Yanteng Si Date: Mon Nov 20 18:02:25 2023 +0800 docs/zh_CN: Update process index to 6.7-rc2 Update to commit f1477dbfa562 ("docs: add backporting and conflict resolution document") Signed-off-by: Yanteng Si Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/7f79015d251b3ad88d6ea596508e39832623db9d.1700474235.git.siyanteng@loongson.cn commit a4f6a16370095aae38f47d3ea4977bcfa0c0a9d7 Author: Yanteng Si Date: Mon Nov 20 18:02:24 2023 +0800 docs/zh_CN: Adjust the number of characters per line in magic-number.rst to less than 40 The current lines are too long and unfriendly to developers who use vim to read documents, especially on small monitors, so let's adjust to less than 40 characters. In addition, some translations were modified incidentally. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/b3c1b55a442280c583518c45495e5540d6797548.1700474235.git.siyanteng@loongson.cn commit 87ef333c0c046b6d07914c80611cf5cc31790e72 Author: Yanteng Si Date: Mon Nov 20 18:02:23 2023 +0800 docs/zh_CN: add process maintainer-pgp-guide tanslation Translate process/maintainer-pgp-guide.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Reviewed-by: Konstantin Ryabitsev Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/7c7f24f653468c9a2c7e3909a7a390ea36eec879.1700474235.git.siyanteng@loongson.cn commit b4af096b5df5dd131ab796c79cedc7069d8f4882 Author: Chen Ni Date: Wed Nov 8 07:36:27 2023 +0000 KEYS: encrypted: Add check for strsep Add check for strsep() in order to transfer the error. Fixes: cd3bc044af48 ("KEYS: encrypted: Instantiate key with user-provided decrypted data") Signed-off-by: Chen Ni Signed-off-by: Mimi Zohar commit f17167bea279d07314ee2629e7ce2dd5a754fec7 Author: Eric Snowberg Date: Mon Nov 6 18:06:26 2023 -0500 ima: Remove EXPERIMENTAL from Kconfig Remove the EXPERIMENTAL from the IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY Kconfig now that digitalSignature usage enforcement is set. Signed-off-by: Eric Snowberg link: https://lore.kernel.org/all/20230508220708.2888510-4-eric.snowberg@oracle.com/ Acked-by: Jarkko Sakkinen Reviewed-by: Mimi Zohar Signed-off-by: Mimi Zohar commit bdf1abd17ed209ccbb24f15002f32ef21145da91 Author: Eric Snowberg Date: Mon Nov 6 18:06:25 2023 -0500 ima: Reword IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY When the machine keyring is enabled, it may be used as a trust source for the .ima keyring. Add a reference to this in IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY. Signed-off-by: Eric Snowberg Signed-off-by: Mimi Zohar commit 95260816b489509c1f5b0141d0ae7b65be3c1d39 Author: Petr Oros Date: Tue Nov 14 23:35:22 2023 +0100 iavf: use iavf_schedule_aq_request() helper Use the iavf_schedule_aq_request() helper when we need to schedule a watchdog task immediately. No functional change. Signed-off-by: Petr Oros Reviewed-by: Wojciech Drewek Tested-by: Rafal Romanowski Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen commit 3d66f21552df25cf56f7f800a8d7687c88771761 Author: Ivan Vecera Date: Thu Oct 26 10:39:32 2023 +0200 iavf: Remove queue tracking fields from iavf_adminq_ring Fields 'head', 'tail', 'len', 'bah' and 'bal' in iavf_adminq_ring are used to store register offsets. These offsets are initialized and remains constant so there is no need to store them in the iavf_adminq_ring structure. Remove these fields from iavf_adminq_ring and use register offset constants instead. Remove iavf_adminq_init_regs() that originally stores these constants into these fields. Finally improve iavf_check_asq_alive() that assumes that non-zero value of hw->aq.asq.len indicates fully initialized AdminQ send queue. Replace it by check for non-zero value of field hw->aq.asq.count that is non-zero when the sending queue is initialized and is zeroed during shutdown of the queue. Signed-off-by: Ivan Vecera Reviewed-by: Przemek Kitszel Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen commit b2b6b2d8f49b7e169765d283f394eb6b67d65c51 Merge: 9b3cd8ebb19ed 792846d9daa87 Author: Mark Brown Date: Mon Nov 27 17:33:11 2023 +0000 ASoC: makes CPU/Codec channel connection map more Merge series from Kuninori Morimoto : Current ASoC is supporting CPU/Codec = N:M (N < M) connection by using ch_map idea. This patch-set expands it that all connection uses this idea, and no longer N < M limit [1][2]. Link: https://lore.kernel.org/r/87fs6wuszr.wl-kuninori.morimoto.gx@renesas.com [1] Link: https://lore.kernel.org/r/878r7yqeo4.wl-kuninori.morimoto.gx@renesas.com [2] ASoC core code ([PATCH 1/5]) is same as v6 and it was tested by Pierre-Louis, and Jerome. Big change on v7 is basically for Audio-Graph-Card2. commit 4a95ce2407dadc4343759f96411442fdaa5467e4 Author: Ivan Vecera Date: Thu Oct 26 10:38:52 2023 +0200 i40e: Remove queue tracking fields from i40e_adminq_ring Fields 'head', 'tail', 'len', 'bah' and 'bal' in i40e_adminq_ring are used to store register offsets. These offsets are initialized and remains constant so there is no need to store them in the i40e_adminq_ring structure. Remove these fields from i40e_adminq_ring and use register offset constants instead. Remove i40e_adminq_init_regs() that originally stores these constants into these fields. Finally improve i40e_check_asq_alive() that assumes that non-zero value of hw->aq.asq.len indicates fully initialized AdminQ send queue. Replace it by check for non-zero value of field hw->aq.asq.count that is non-zero when the sending queue is initialized and is zeroed during shutdown of the queue. Signed-off-by: Ivan Vecera Reviewed-by: Przemek Kitszel Reviewed-by: Wojciech Drewek Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 64c0aad13bb8cea0a5a30c8912bb268dce9b317a Author: Ivan Vecera Date: Thu Oct 26 10:38:22 2023 +0200 i40e: Remove AQ register definitions for VF types The i40e driver does not handle its VF device types so there is no need to keep AdminQ register definitions for such device types. Remove them. Signed-off-by: Ivan Vecera Reviewed-by: Przemek Kitszel Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman Signed-off-by: Tony Nguyen commit 9e08ac1b5e3bb7837aa23b67a97f08b80384e9d2 Author: Rob Herring Date: Fri Oct 13 14:03:42 2023 -0500 EDAC/armada_xp: Explicitly include correct DT includes The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result, there's a pretty much random mix of those include files used throughout the tree. In order to detangle these headers and replace the implicit includes with struct declarations, users need to explicitly include the correct includes. Signed-off-by: Rob Herring Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Jan Luebbe Link: https://lore.kernel.org/r/20231013190342.246973-1-robh@kernel.org commit e620d2450636a0d90c341a73c64d4ba10b6e4dd1 Author: Ivan Vecera Date: Wed Oct 25 16:59:37 2023 +0200 i40e: Delete unused and useless i40e_pf fields Removed fields: .fc_autoneg_status Since commit c56999f94876 ("i40e/i40evf: Add set_fc and init of FC settings") write-only and otherwise unused .eeprom_version Write-only and otherwise unused .atr_sample_rate Has only one possible value (I40E_DEFAULT_ATR_SAMPLE_RATE). Remove it and replace its occurrences by I40E_DEFAULT_ATR_SAMPLE_RATE .adminq_work_limit Has only one possible value (I40E_AQ_WORK_LIMIT). Remove it and replace its occurrences by I40E_AQ_WORK_LIMIT .tx_sluggish_count Unused, never written .pf_seid Used to store VSI downlink seid and it is referenced only once in the same codepath. There is no need to save it into i40e_pf. Remove it and use downlink_seid directly in the mentioned log message. .instance Write only. Remove it as well as ugly static local variable 'pfs_found' in i40e_probe. .int_policy .switch_kobj .ptp_pps_work .ptp_extts1_work .ptp_pps_start .pps_delay .ptp_pin .override_q_count All these unused at all Prior the patch: pahole -Ci40e_pf drivers/net/ethernet/intel/i40e/i40e.ko | tail -5 /* size: 5368, cachelines: 84, members: 127 */ /* sum members: 5297, holes: 20, sum holes: 71 */ /* paddings: 6, sum paddings: 19 */ /* last cacheline: 56 bytes */ }; After the patch: pahole -Ci40e_pf drivers/net/ethernet/intel/i40e/i40e.ko | tail -5 /* size: 4976, cachelines: 78, members: 112 */ /* sum members: 4905, holes: 17, sum holes: 71 */ /* paddings: 6, sum paddings: 19 */ /* last cacheline: 48 bytes */ }; Signed-off-by: Ivan Vecera Reviewed-by: Przemek Kitszel Reviewed-by: Wojciech Drewek Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen commit 8fa1116e1cae4858ab69d31da36f1fae9113c29d Author: Brent Lu Date: Mon Nov 27 17:26:54 2023 +0200 ASoC: Intel: sof_rt5682: use common module for DAI link generation Use intel_board module to generate DAI link array and update num_links field in snd_soc_card structure. Signed-off-by: Brent Lu Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-28-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 5da85a3523b5acd3a00347cae32ae2ffe4f4ac8a Author: Brent Lu Date: Mon Nov 27 17:26:53 2023 +0200 ASoC: Intel: sof_nau8825: use common module for DAI link generation Use intel_board module to generate DAI link array and update num_links field in snd_soc_card structure. Signed-off-by: Brent Lu Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-27-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit a6881210f175ae309721b3c76f54eebc8a258339 Author: Brent Lu Date: Mon Nov 27 17:26:52 2023 +0200 ASoC: Intel: board_helpers: support DAI link array generation Add a helper function for machine drivers to initialize dai_link and num_links of a snd_soc_card structure. Machine driver needs to initialize sof_card_private structure in driver probe function then board_helpers module will create entire DAI link array for this board. Signed-off-by: Brent Lu Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-26-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ee2486d5219e9f724372084d5926070697e84836 Author: Brent Lu Date: Mon Nov 27 17:26:51 2023 +0200 ASoC: Intel: sof_ssp_amp: use common module for HDMI-In link Use intel_board module for HDMI-In DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Balamurugan C Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-25-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 426cbd0de2da2553de9c8a2366f956807f94d5b4 Author: Brent Lu Date: Mon Nov 27 17:26:50 2023 +0200 ASoC: Intel: sof_rt5682: use common module for HDMI-In link Use intel_board module for HDMI-In DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Balamurugan C Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-24-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f7c015add5b1a6a94fb39420ac0a885c8d7b63ad Author: Brent Lu Date: Mon Nov 27 17:26:49 2023 +0200 ASoC: Intel: board_helpers: support HDMI-In link initialization Add a helper function for machine drivers to initialize HDMI-In DAI link. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Balamurugan C Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-23-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9fadbf3f11c378fa307517f20bd793eb9773a15e Author: Brent Lu Date: Mon Nov 27 17:26:48 2023 +0200 ASoC: Intel: sof_ssp_amp: simplify HDMI-In quirks Use bit mask to handle SSP port number of HDMI-In devices to simplify the code. No functional change in this patch. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Balamurugan C Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-22-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit dc3d7dcb04eae6af5b9c882dc30eede75bbd7fe7 Author: Brent Lu Date: Mon Nov 27 17:26:47 2023 +0200 ASoC: Intel: sof_ssp_amp: use common module for BT offload link Use intel_board module for BT offload DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-21-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3d5b77b9bee016cd1363f3856a3616eaed9026b8 Author: Brent Lu Date: Mon Nov 27 17:26:46 2023 +0200 ASoC: Intel: sof_rt5682: use common module for BT offload link Use intel_board module for BT offload DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-20-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 87ddfdc9dc37032492704b51ab468bda1262d155 Author: Brent Lu Date: Mon Nov 27 17:26:45 2023 +0200 ASoC: Intel: sof_nau8825: use common module for BT offload link Use intel_board module for BT offload DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-19-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 117445d7655945b0a601a1247842029d0325c7e4 Author: Brent Lu Date: Mon Nov 27 17:26:44 2023 +0200 ASoC: Intel: sof_cs42l42: use common module for BT offload link Use intel_board module for BT offload DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-18-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 53d8df6d3f0a1d6fd520865fb12c11868fe6cf81 Author: Brent Lu Date: Mon Nov 27 17:26:43 2023 +0200 ASoC: Intel: board_helpers: support BT offload link initialization Add a helper function for machine drivers to initialize BT offload DAI link. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-17-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 823404815fcdf32950b2223ed2c665f077d6b98f Author: Brent Lu Date: Mon Nov 27 17:26:42 2023 +0200 ASoC: Intel: sof_ssp_amp: rename function parameter Rename the parameter 'ssp_codec' of sof_card_dai_links_create() since it's the port number of speaker amplifier. No functional change in this commit. Signed-off-by: Brent Lu Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-16-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 5cdc7a82594eaad27e98dcd6fbd72592edbc0f39 Author: Brent Lu Date: Mon Nov 27 17:26:41 2023 +0200 ASoC: Intel: sof_ssp_amp: use common module for amp link Use intel_board module for speaker amplifier DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-15-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e45cd972a50d2212ad232af33de970fb6923aaf6 Author: Brent Lu Date: Mon Nov 27 17:26:40 2023 +0200 ASoC: Intel: sof_rt5682: use common module for amp link Use intel_board module for speaker amplifier DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-14-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit adf711655ba21c5d54d52b79aa8df87fbb39df6b Author: Brent Lu Date: Mon Nov 27 17:26:39 2023 +0200 ASoC: Intel: sof_nau8825: use common module for amp link Use intel_board module for speaker amplifier DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-13-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 8739841805744bd1a1d12e2485dc5d0f1d880f64 Author: Brent Lu Date: Mon Nov 27 17:26:38 2023 +0200 ASoC: Intel: sof_cs42l42: use common module for amp link Use intel_board module for speaker amplifier DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-12-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ba0c7c328762d78573d3cac4adad9ea9e695f244 Author: Brent Lu Date: Mon Nov 27 17:26:37 2023 +0200 ASoC: Intel: board_helpers: support amp link initialization Add a helper function for machine drivers to initialize speaker amplifier DAI link. The function will initialize common fields and let caller to initialize codec-specific fields like codec, init, exit, and ops fields. Signed-off-by: Brent Lu Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-11-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 84c280af16b72fc202fbd9dcecadb6e256956c41 Author: Brent Lu Date: Mon Nov 27 17:26:36 2023 +0200 ASoC: Intel: sof_rt5682: use common module for codec link Use intel_board module for headphone codec DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-10-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 99f7422805c96d56a093dbe71beca658b793d0cb Author: Brent Lu Date: Mon Nov 27 17:26:35 2023 +0200 ASoC: Intel: sof_nau8825: use common module for codec link Use intel_board module for headphone codec DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-9-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f46f07fe264a26daf8d6a5e16535229ee48108a7 Author: Brent Lu Date: Mon Nov 27 17:26:34 2023 +0200 ASoC: Intel: sof_cs42l42: use common module for codec link Use intel_board module for headphone codec DAI link initialization. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit e111dece012f29707da634c341d3f3277bd94528 Author: Brent Lu Date: Mon Nov 27 17:26:33 2023 +0200 ASoC: Intel: board_helpers: support codec link initialization Add a helper function for machine drivers to initialize headphone codec DAI links. The function will initialize common fields and let caller to initialize codec-specific fields like codec, init, exit, and ops fields. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 93f74ebf3d7623b8b647d2ce5f2e23545f9702df Author: Brent Lu Date: Mon Nov 27 17:26:32 2023 +0200 ASoC: Intel: ssp-common: get codec name function Add a helper function to get codec name string from codec type enum value. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 65b2df10a1e6264dd199c88623a9e4bbf8849c9b Author: Chao Song Date: Mon Nov 27 17:26:31 2023 +0200 ASoC: Intel: cht_bsw_rt5672: check return value Set codec sysclk could fail and return error, add error check for it. Signed-off-by: Chao Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 007d9a638b877f71a0ef28a906525904e44f6aa2 Author: Bard Liao Date: Mon Nov 27 17:26:30 2023 +0200 ASoC: Intel: sof_maxim_common: check return value snd_soc_dai_set_tdm_slot() could return error. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 06dea47be6d3d0ad3ef5f7c9dd0947d1c825e0ff Author: Bard Liao Date: Mon Nov 27 17:26:29 2023 +0200 ASoC: Intel: sof_maxim_common: add else between 2 if test if (!strcmp(codec_dai->component->name, MAX_98373_DEV0_NAME)) and if (!strcmp(codec_dai->component->name, MAX_98373_DEV1_NAME)) can't be true at the same time. Add an else to clarify it. Signed-off-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 9425039741e84120fc936fbb5a9a7a1410fd9409 Author: Brent Lu Date: Mon Nov 27 17:26:28 2023 +0200 ASoC: Intel: sof_ssp_amp: remove dead code This patch fixes a dead code problem when calculating BE ID for each HDMI-In link. Signed-off-by: Brent Lu Reviewed-by: Balamurugan C Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127152654.28204-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit ed99878462ccc143395987faebda33c50529b116 Author: Chao Song Date: Mon Nov 27 15:34:48 2023 +0200 ASoC: Intel: soc-acpi-intel-mtl-match: Add rt722 support This patch adds match table for rt722 codec on link 0. RT722 is a multi-function codec, three endpoints are created for its headset, amp and dmic functions. Signed-off-by: Chao Song Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127133448.18449-8-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f8ccb133c9866b17a44f8e1a2478beb1631a366d Author: Cezary Rojewski Date: Fri Nov 17 13:06:10 2023 +0100 ASoC: Intel: avs: Unhardcode HDAudio BE DAI drivers description To not expose more than in fact is supported by the codec, update CPU DAI initialization procedure to rely on codec capabilities instead of hardcoding them. This includes subformat which is currently ignored. As capabilities for HDMI streams are initialized on PCM open, leave it as is for now. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-17-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit c93c604e93af7f6085df5b7cad4d96f538ece68d Author: Cezary Rojewski Date: Fri Nov 17 13:06:09 2023 +0100 ASoC: Intel: avs: Kill S24_LE format Eliminate all occurrences of S24_LE within PCM code, both HOST and LINK side. Replace those with MSBITS subformats to allow for granular selection when S32_LE is the format of choice. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-16-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit dfd6ba6813dd0fdea54de58e7b80ca304ce3fca5 Author: Cezary Rojewski Date: Fri Nov 17 13:06:08 2023 +0100 ALSA: hda: Drop snd_hdac_calc_stream_format() There are no users of the function. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-15-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 615d13cb4f3e499fb5c270a7db66917286f7d0ec Author: Cezary Rojewski Date: Fri Nov 17 13:06:07 2023 +0100 ASoC: Intel: avs: Switch to new stream-format interface To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-14-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 176d13881137b064dc65e282e2c19821c11e60a2 Author: Cezary Rojewski Date: Fri Nov 17 13:06:06 2023 +0100 ASoC: SOF: Intel: Switch to new stream-format interface To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-13-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 71fd0fbaf61e6d1a0ae63dc1845a1d7a193cd32b Author: Cezary Rojewski Date: Fri Nov 17 13:06:05 2023 +0100 ASoC: Intel Skylake: Switch to new stream-format interface To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-12-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit cbc4ebb346162376377ee0a1074fc72d39cfbb51 Author: Cezary Rojewski Date: Fri Nov 17 13:06:04 2023 +0100 ASoC: codecs: hdac_hdmi: Switch to new stream-format interface To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-11-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 0bb0af123b0dbae3e3fad2166122777cf40abae4 Author: Cezary Rojewski Date: Fri Nov 17 13:06:03 2023 +0100 ASoC: codecs: hdac_hda: Switch to new stream-format interface To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-10-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit d5c00ab2f508176e8d8bd976d8b2207c5f0a932b Author: Cezary Rojewski Date: Fri Nov 17 13:06:02 2023 +0100 ASoC: codecs: hda: Switch to new stream-format interface To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. While at it, complete PCM stream initialization with subformat options. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-9-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 0d41f0c07f19de7fb5790cbe462dddb68af60fa8 Author: Cezary Rojewski Date: Fri Nov 17 13:06:01 2023 +0100 ALSA: hda/ca0132: Switch to new stream-format interface To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-8-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 67ea58daab010ea7a622a89392cc9a6190f8b9c1 Author: Cezary Rojewski Date: Fri Nov 17 13:06:00 2023 +0100 ALSA: hda/hdmi: Switch to new stream-format interface To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-7-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 61b52df4b64fa1c8860cdfbc548cd0bbe7310082 Author: Cezary Rojewski Date: Fri Nov 17 13:05:59 2023 +0100 ALSA: hda: Switch to new stream-format interface To provide option for selecting different bit-per-sample than just the maximum one, use the new format calculation mechanism. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-6-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit d24f1a090d3f2a5c86a8782afeda71c2d2539966 Author: Cezary Rojewski Date: Fri Nov 17 13:05:58 2023 +0100 ALSA: hda: Upgrade stream-format infrastructure Introduce a set of functions that ultimately facilite SDxFMT-related calculations in atomic manner: First, introduce snd_pcm_subformat_width() and snd_pcm_hw_params_bits() helpers that separate the base functionality from the HDAudio-specific one. snd_hdac_format_normalize() - format converter. S20_LE, S24_LE and their unsigned and BE friends are invalid from HDAudio perspective but still can be specified as function argument due to compatibility reasons. snd_hdac_stream_format_bits() - obtain just the bits-per-sample value. Does not ignore subformat and msbits parameters. snd_hdac_stream_format() and snd_hdac_spdif_stream_format() - obtain the SDxFMT value given the audio format parameters. The former is stripped away of spdif-related information. Useful for users that do not care about them. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-5-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 4a6ba09e892aab49fda8464e4f9b244a17fd75b2 Author: Cezary Rojewski Date: Fri Nov 17 13:05:57 2023 +0100 ASoC: pcm: Honor subformat when configuring runtime Subformat options are ignored when setting up hardware parameters and assigning PCM stream capabilities. Account for them to allow for granular format selection. As there is only one user currently (format S32_LE), subformat is represented by a simple u32 and stores flags only for that one user alone. Such approach allows for alloc/free-less code until there are more users on the horizon. Acked-by: Mark Brown Signed-off-by: Cezary Rojewski Acked-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20231117120610.1755254-4-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit a7fc8b862fd5952be791a870ef8ef56016e83ff4 Author: Cezary Rojewski Date: Fri Nov 17 13:05:56 2023 +0100 ALSA: hda: Honor subformat when querying PCMs Update mechanism for querying supported PCMs to allow for granular format selection when container size is 32 bits. Currently always the highest bit depth is selected, regardless of how many actual formats codec in question supports. Acked-by: Mark Brown Co-developed-by: Jaroslav Kysela Signed-off-by: Jaroslav Kysela Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20231117120610.1755254-3-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 2112aa034907c428785e1a5730927181276ee45b Author: Jaroslav Kysela Date: Fri Nov 17 13:05:55 2023 +0100 ALSA: pcm: Introduce MSBITS subformat interface Improve granularity of format selection for S32/U32 formats by adding constants representing 20, 24 and MAX most significant bits. The MAX means the maximum number of significant bits which can the physical format hold. For 32-bit formats, MAX is related to 32 bits. For 8-bit formats, MAX is related to 8 bits etc. As there is only one user currently (format S32_LE), subformat is represented by a simple u32 and stores flags only for that one user alone. The approach of subformat being part of struct snd_pcm_hardware is a compromise between ALSA and ASoC allowing for hw_params-intersection code to be alloc/free-less while not adding any new responsibilities to ASoC runtime structures. Acked-by: Mark Brown Signed-off-by: Jaroslav Kysela Co-developed-by: Cezary Rojewski Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20231117120610.1755254-2-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai commit 668bfeeabb5e402e3b36992f7859c284cc6e594d Author: Christoph Hellwig Date: Mon Nov 27 08:20:02 2023 +0100 block: move a few definitions out of CONFIG_BLK_DEV_ZONED Allow using a few symbols with IS_ENABLED instead of #idef by moving the declarations out of #idef CONFIG_BLK_DEV_ZONED, and move bdev_nr_zones into the remaining #idef CONFIG_BLK_DEV_ZONED, #else block below. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231127072002.1332685-1-hch@lst.de Signed-off-by: Jens Axboe commit 70d85bec8f4c0d003db505bf35a3ec87bb1f627f Author: Supriti Singh Date: Fri Nov 24 22:34:22 2023 +0100 block/rnbd: use %pe to print errors While printing error, replace %ld by %pe. %pe prints a string whereas %ld would print an error code. Signed-off-by: Supriti Singh Signed-off-by: Jack Wang Signed-off-by: Grzegorz Prajsner Signed-off-by: Md Haris Iqbal Link: https://lore.kernel.org/r/20231124213422.113449-3-haris.iqbal@ionos.com Signed-off-by: Jens Axboe commit fadf3dffe54fe10e0d86232f0a7576eccc04d537 Author: Santosh Pradhan Date: Fri Nov 24 22:34:21 2023 +0100 block/rnbd: add support for REQ_OP_WRITE_ZEROES Remove REQ_OP_WRITE_SAME in favour of REQ_OP_WRITE_ZEROES. Signed-off-by: Santosh Pradhan Reviewed-by: Md Haris Iqbal Signed-off-by: Grzegorz Prajsner Signed-off-by: Md Haris Iqbal Link: https://lore.kernel.org/r/20231124213422.113449-2-haris.iqbal@ionos.com Signed-off-by: Jens Axboe commit 034c9ec5d5b6c608578776fa99f47060388e81c9 Merge: 62b14b9e86a1c 0cb19e50a911a Author: Ulf Hansson Date: Mon Nov 27 16:28:51 2023 +0100 pmdomain: Merge branch fixes into next Merge the pmdomain fixes for v6.7-rc[n] into the next branch, to allow them to get tested together with the changes that are targeted for v6.8. Signed-off-by: Ulf Hansson commit b1366d21daaebb8e474e4169c5e557fbb37bfdc0 Author: Ryan Roberts Date: Mon Nov 27 11:17:30 2023 +0000 arm64: Add ARM64_HAS_LPA2 CPU capability Expose FEAT_LPA2 as a capability so that we can take advantage of alternatives patching in the hypervisor. Although FEAT_LPA2 presence is advertised separately for stage1 and stage2, the expectation is that in practice both stages will either support or not support it. Therefore, we combine both into a single capability, allowing us to simplify the implementation. KVM requires support in both stages in order to use LPA2 since the same library is used for hyp stage 1 and guest stage 2 pgtables. Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-6-ryan.roberts@arm.com commit 10a0cc3b688fcf753ff3f6518bb15e7a6809e908 Author: Ryan Roberts Date: Mon Nov 27 11:17:37 2023 +0000 KVM: selftests: arm64: Support P52V48 4K and 16K guest_modes Add support for VM_MODE_P52V48_4K and VM_MODE_P52V48_16K guest modes by using the FEAT_LPA2 pte format for stage1, when FEAT_LPA2 is available. Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-13-ryan.roberts@arm.com commit e477c8c483913de92c9cc00b34459dc4d695529b Author: Anshuman Khandual Date: Mon Nov 27 11:17:29 2023 +0000 arm64/mm: Add FEAT_LPA2 specific ID_AA64MMFR0.TGRAN[2] PAGE_SIZE support is tested against possible minimum and maximum values for its respective ID_AA64MMFR0.TGRAN field, depending on whether it is signed or unsigned. But then FEAT_LPA2 implementation needs to be validated for 4K and 16K page sizes via feature specific ID_AA64MMFR0.TGRAN values. Hence it adds FEAT_LPA2 specific ID_AA64MMFR0.TGRAN[2] values per ARM ARM (0487G.A). Acked-by: Catalin Marinas Signed-off-by: Anshuman Khandual Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-5-ryan.roberts@arm.com commit 72324ac52ddddb168d8008e36d6a617b9b74f6c1 Author: Ryan Roberts Date: Mon Nov 27 11:17:36 2023 +0000 KVM: selftests: arm64: Determine max ipa size per-page size We are about to add 52 bit PA guest modes for 4K and 16K pages when the system supports LPA2. In preparation beef up the logic that parses mmfr0 to also tell us what the maximum supported PA size is for each page size. Max PA size = 0 implies the page size is not supported at all. Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-12-ryan.roberts@arm.com commit c910f2b65518538b5072cb51760c8ef749e455d0 Author: Ryan Roberts Date: Mon Nov 27 11:17:28 2023 +0000 arm64/mm: Update tlb invalidation routines for FEAT_LPA2 FEAT_LPA2 impacts tlb invalidation in 2 ways; Firstly, the TTL field in the non-range tlbi instructions can now validly take a 0 value as a level hint for the 4KB granule (this is due to the extra level of translation) - previously TTL=0b0100 meant no hint and was treated as 0b0000. Secondly, The BADDR field of the range-based tlbi instructions is specified in 64KB units when LPA2 is in use (TCR.DS=1), whereas it is in page units otherwise. Changes are required for tlbi to continue to operate correctly when LPA2 is in use. Solve the first problem by always adding the level hint if the level is between [0, 3] (previously anything other than 0 was hinted, which breaks in the new level -1 case from kvm). When running on non-LPA2 HW, 0 is still safe to hint as the HW will fall back to non-hinted. While we are at it, we replace the notion of 0 being the non-hinted sentinel with a macro, TLBI_TTL_UNKNOWN. This means callers won't need updating if/when translation depth increases in future. The second issue is more complex: When LPA2 is in use, use the non-range tlbi instructions to forward align to a 64KB boundary first, then use range-based tlbi from there on, until we have either invalidated all pages or we have a single page remaining. If the latter, that is done with non-range tlbi. We determine whether LPA2 is in use based on lpa2_is_enabled() (for kernel calls) or kvm_lpa2_is_enabled() (for kvm calls). Reviewed-by: Catalin Marinas Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-4-ryan.roberts@arm.com commit d782ac5b2ceebee5d374e13e990655d1a140d3a6 Author: Ryan Roberts Date: Mon Nov 27 11:17:35 2023 +0000 KVM: arm64: Allow guests with >48-bit IPA size on FEAT_LPA2 systems With all the page-table infrastructure in place, we can finally increase the maximum permisable IPA size to 52-bits on 4KB and 16KB page systems that have FEAT_LPA2. Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-11-ryan.roberts@arm.com commit 936a4ec28141fa9369b6af4d6401f0be9f7e304c Author: Ryan Roberts Date: Mon Nov 27 11:17:27 2023 +0000 arm64/mm: Add lpa2_is_enabled() kvm_lpa2_is_enabled() stubs Add stub functions which is initially always return false. These provide the hooks that we need to update the range-based TLBI routines, whose operands are encoded differently depending on whether lpa2 is enabled or not. The kernel and kvm will enable the use of lpa2 asynchronously in future, and part of that enablement will involve fleshing out their respective hook to advertise when it is using lpa2. Since the kernel's decision to use lpa2 relies on more than just whether the HW supports the feature, it can't just use the same static key as kvm. This is another reason to use separate functions. lpa2_is_enabled() is already implemented as part of Ard's kernel lpa2 series. Since kvm will make its decision solely based on HW support, kvm_lpa2_is_enabled() will be defined as system_supports_lpa2() once kvm starts using lpa2. Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-3-ryan.roberts@arm.com commit 0abc1b11a032199bb134fd25cd7ee0cdb26b7b03 Author: Ryan Roberts Date: Mon Nov 27 11:17:34 2023 +0000 KVM: arm64: Support up to 5 levels of translation in kvm_pgtable FEAT_LPA2 increases the maximum levels of translation from 4 to 5 for the 4KB page case, when IA is >48 bits. While we can still use 4 levels for stage2 translation in this case (due to stage2 allowing concatenated page tables for first level lookup), the same kvm_pgtable library is used for the hyp stage1 page tables and stage1 does not support concatenation. Therefore, modify the library to support up to 5 levels. Previous patches already laid the groundwork for this by refactoring code to work in terms of KVM_PGTABLE_FIRST_LEVEL and KVM_PGTABLE_LAST_LEVEL. So we just need to change these macros. The hardware sometimes encodes the new level differently from the others: One such place is when reading the level from the FSC field in the ESR_EL2 register. We never expect to see the lowest level (-1) here since the stage 2 page tables always use concatenated tables for first level lookup and therefore only use 4 levels of lookup. So we get away with just adding a comment to explain why we are not being careful about decoding level -1. For stage2 VTCR_EL2.SL2 is introduced to encode the new start level. However, since we always use concatenated page tables for first level look up at stage2 (and therefore we will never need the new extra level) we never touch this new field. Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-10-ryan.roberts@arm.com commit e2768b798a197318736f00c506633cb78ff77012 Author: Ryan Roberts Date: Mon Nov 27 11:17:26 2023 +0000 arm64/mm: Modify range-based tlbi to decrement scale In preparation for adding support for LPA2 to the tlb invalidation routines, modify the algorithm used by range-based tlbi to start at the highest 'scale' and decrement instead of starting at the lowest 'scale' and incrementing. This new approach makes it possible to maintain 64K alignment as we work through the range, until the last op (at scale=0). This is required when LPA2 is enabled. (This part will be added in a subsequent commit). This change is separated into its own patch because it will also impact non-LPA2 systems, and I want to make it easy to bisect in case it leads to performance regression (see below for benchmarks that suggest this should not be a problem). The original commit (d1d3aa98 "arm64: tlb: Use the TLBI RANGE feature in arm64") stated this as the reason for _incrementing_ scale: However, in most scenarios, the pages = 1 when flush_tlb_range() is called. Start from scale = 3 or other proper value (such as scale =ilog2(pages)), will incur extra overhead. So increase 'scale' from 0 to maximum. But pages=1 is already special cased by the non-range invalidation path, which will take care of it the first time through the loop (both in the original commit and in my change), so I don't think switching to decrement scale should have any extra performance impact after all. Indeed benchmarking kernel compilation, a TLBI-heavy workload, suggests that this new approach actually _improves_ performance slightly (using a virtual machine on Apple M2): Table shows time to execute kernel compilation workload with 8 jobs, relative to baseline without this patch (more negative number is bigger speedup). Repeated 9 times across 3 system reboots: | counter | mean | stdev | |:----------|-----------:|----------:| | real-time | -0.6% | 0.0% | | kern-time | -1.6% | 0.5% | | user-time | -0.4% | 0.1% | Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-2-ryan.roberts@arm.com commit 419edf48d79f6fb2cc3fa090131864e95b321d41 Author: Ryan Roberts Date: Mon Nov 27 11:17:33 2023 +0000 KVM: arm64: Convert translation level parameter to s8 With the introduction of FEAT_LPA2, the Arm ARM adds a new level of translation, level -1, so levels can now be in the range [-1;3]. 3 is always the last level and the first level is determined based on the number of VA bits in use. Convert level variables to use a signed type in preparation for supporting this new level -1. Since the last level is always anchored at 3, and the first level varies to suit the number of VA/IPA bits, take the opportunity to replace KVM_PGTABLE_MAX_LEVELS with the 2 macros KVM_PGTABLE_FIRST_LEVEL and KVM_PGTABLE_LAST_LEVEL. This removes the assumption from the code that levels run from 0 to KVM_PGTABLE_MAX_LEVELS - 1, which will soon no longer be true. Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-9-ryan.roberts@arm.com commit bd412e2a310cbc43b424198b0065086b0f462625 Author: Ryan Roberts Date: Mon Nov 27 11:17:32 2023 +0000 KVM: arm64: Use LPA2 page-tables for stage2 and hyp stage1 Implement a simple policy whereby if the HW supports FEAT_LPA2 for the page size we are using, always use LPA2-style page-tables for stage 2 and hyp stage 1 (assuming an nvhe hyp), regardless of the VMM-requested IPA size or HW-implemented PA size. When in use we can now support up to 52-bit IPA and PA sizes. We use the previously created cpu feature to track whether LPA2 is supported for deciding whether to use the LPA2 or classic pte format. Note that FEAT_LPA2 brings support for bigger block mappings (512GB with 4KB, 64GB with 16KB). We explicitly don't enable these in the library because stage2_apply_range() works on batch sizes of the largest used block mapping, and increasing the size of the batch would lead to soft lockups. See commit 5994bc9e05c2 ("KVM: arm64: Limit stage2_apply_range() batch size to largest block"). With the addition of LPA2 support in the hypervisor, the PA size supported by the HW must be capped with a runtime decision, rather than simply using a compile-time decision based on PA_BITS. For example, on a system that advertises 52 bit PA but does not support FEAT_LPA2, A 4KB or 16KB kernel compiled with LPA2 support must still limit the PA size to 48 bits. Therefore, move the insertion of the PS field into TCR_EL2 out of __kvm_hyp_init assembly code and instead do it in cpu_prepare_hyp_mode() where the rest of TCR_EL2 is prepared. This allows us to figure out PS with kvm_get_parange(), which has the appropriate logic to ensure the above requirement. (and the PS field of VTCR_EL2 is already populated this way). Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-8-ryan.roberts@arm.com commit d4fbbb26da520e00d87c8187dc3de9eacee66c1c Author: Ryan Roberts Date: Mon Nov 27 11:17:31 2023 +0000 KVM: arm64: Add new (V)TCR_EL2 field definitions for FEAT_LPA2 As per Arm ARM (0487I.a), (V)TCR_EL2.DS fields control whether 52 bit input and output addresses are supported on 4K and 16K page size configurations when FEAT_LPA2 is known to have been implemented. This adds these field definitions which will be used by KVM when FEAT_LPA2 is enabled. Acked-by: Catalin Marinas Reviewed-by: Oliver Upton Signed-off-by: Ryan Roberts Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20231127111737.1897081-7-ryan.roberts@arm.com commit 1638b11ef8156c8551f5aaa5799069633593c5fe Author: Athira Rajeev Date: Thu Nov 23 21:32:32 2023 +0530 perf tools: Add perf binary dependent rule for shellcheck log in Makefile.perf Add rule in new Makefile "tests/Makefile.tests" for running shellcheck on shell test scripts. This automates below shellcheck into the build. $ for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done Condition for shellcheck is added in Makefile.perf to avoid build breakage in the absence of shellcheck binary. Update Makefile.perf to contain new rule for "SHELLCHECK_TEST" which is for making shellcheck test as a dependency on perf binary. Added "tests/Makefile.tests" to run shellcheck on shellscripts in tests/shell. The make rule "SHLLCHECK_RUN" ensures that, every time during make, shellcheck will be run only on modified files during subsequent invocations. By this, if any newly added shell scripts or fixes in existing scripts breaks coding/formatting style, it will get captured during the perf build. Example build failure by modifying probe_vfs_getname.sh in tests/shell: In tests/shell/probe_vfs_getname.sh line 8: . $(dirname $0)/lib/probe.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting. For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... make[3]: *** [/root/athira/perf-tools-next/tools/perf/tests/Makefile.tests:18: tests/shell/.probe_vfs_getname.sh.shellcheck_log] Error 1 make[2]: *** [Makefile.perf:686: SHELLCHECK_TEST] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile.perf:244: sub-make] Error 2 make: *** [Makefile:70: all] Error 2 Here, like other files which gets created during compilation (ex: .builtin-bench.o.cmd or .perf.o.cmd ), create .shellcheck_log also as a hidden file. Example: tests/shell/.probe_vfs_getname.sh.shellcheck_log shellcheck is re-run if any of the script gets modified based on its dependency of this log file. After this, for testing, changed "tests/shell/trace+probe_vfs_getname.sh" to break shellcheck format. In the next make run, it is also captured: In tests/shell/probe_vfs_getname.sh line 8: . $(dirname $0)/lib/probe.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting. For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... make[3]: *** [/root/athira/perf-tools-next/tools/perf/tests/Makefile.tests:18: tests/shell/.probe_vfs_getname.sh.shellcheck_log] Error 1 make[3]: *** Waiting for unfinished jobs.... In tests/shell/trace+probe_vfs_getname.sh line 14: . $(dirname $0)/lib/probe.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting. For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... make[3]: *** [/root/athira/perf-tools-next/tools/perf/tests/Makefile.tests:18: tests/shell/.trace+probe_vfs_getname.sh.shellcheck_log] Error 1 make[2]: *** [Makefile.perf:686: SHELLCHECK_TEST] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile.perf:244: sub-make] Error 2 make: *** [Makefile:70: all] Error 2 Failure log can be found in the stdout of make itself. This is reported at build time. To be able to go ahead with the build or disable shellcheck even though it is known that some test is broken, add a "NO_SHELLCHECK" option. Example: make NO_SHELLCHECK=1 INSTALL libsubcmd_headers INSTALL libsymbol_headers INSTALL libapi_headers INSTALL libperf_headers INSTALL libbpf_headers LINK perf Note: This is tested on RHEL and also SLES. Use below check: "$(shell which shellcheck 2> /dev/null)" to look for presence of shellcheck binary. The approach "shell command -v" is not used here. In some of the distros(RHEL), command is available as executable file (/usr/bin/command). But in some distros(SLES), it is a shell builtin and not available as executable file. Committer testing: $ type shellcheck shellcheck is hashed (/usr/bin/shellcheck) $ rpm -qf /usr/bin/shellcheck ShellCheck-0.9.0-2.fc38.x86_64 $ $ alias m $ git diff diff --git a/tools/perf/tests/shell/probe_vfs_getname.sh b/tools/perf/tests/shell/probe_vfs_getname.sh index 554e12e83c55fd56..dbc14634678e2bf6 100755 --- a/tools/perf/tests/shell/probe_vfs_getname.sh +++ b/tools/perf/tests/shell/probe_vfs_getname.sh @@ -5,7 +5,7 @@ # Arnaldo Carvalho de Melo , 2017 # shellcheck source=lib/probe.sh -. "$(dirname $0)"/lib/probe.sh +. $(dirname $0)/lib/probe.sh skip_if_no_perf_probe || exit 2 alias m='rm -rf ~/libexec/perf-core/ ; make -k CORESIGHT=1 O=/tmp/build/$(basename $PWD) -C tools/perf install-bin && perf test python' $ m make: Entering directory '/home/acme/git/perf-tools-next/tools/perf' BUILD: Doing 'make -j32' parallel build INSTALL libbpf_headers In tests/shell/probe_vfs_getname.sh line 8: . $(dirname $0)/lib/probe.sh ^-----------^ SC2046 (warning): Quote this to prevent word splitting. For more information: https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt... make[3]: *** [/home/acme/git/perf-tools-next/tools/perf/tests/Makefile.tests:18: tests/shell/.probe_vfs_getname.sh.shellcheck_log] Error 1 make[2]: *** [Makefile.perf:686: SHELLCHECK_TEST] Error 2 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile.perf:244: sub-make] Error 2 make: *** [Makefile:113: install-bin] Error 2 make: Leaving directory '/home/acme/git/perf-tools-next/tools/perf' $ Reviewed-by: James Clark Signed-off-by: Athira Jajeev Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Disha Goel Cc: Ian Rogers Cc: Jiri Olsa Cc: Kajol Jain Cc: Madhavan Srinivasan Cc: Namhyung Kim Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20231123160232.94253-1-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 5ebe2f4bf0a8fe8cceb5664a7dea4c17e2cf8477 Author: Ji Sheng Teoh Date: Wed Nov 22 11:09:08 2023 +0800 perf vendor events riscv: Add StarFive Dubhe-90 JSON file Similar to StarFive's Dubhe-80, Dubhe-90 supports raw event id 0x00 - 0x22. Reuse Dubhe-80 firmware and common json file. The raw events are enabled through PMU node of DT binding. Besides raw event, add standard RISC-V firmware events to support monitoring of firmware event. Example of PMU DT node: pmu { compatible = "riscv,pmu"; riscv,raw-event-to-mhpmcounters = /* Event ID 1-31 */ <0x00 0x00 0xFFFFFFFF 0xFFFFFFE0 0x00007FF8>, /* Event ID 32-33 */ <0x00 0x20 0xFFFFFFFF 0xFFFFFFFE 0x00007FF8>, /* Event ID 34 */ <0x00 0x22 0xFFFFFFFF 0xFFFFFF22 0x00007FF8>; }; 'perf stat' output: [root@user]# perf stat -a \ -e access_mmu_stlb \ -e miss_mmu_stlb \ -e access_mmu_pte_c \ -e rob_flush \ -e btb_prediction_miss \ -e itlb_miss \ -e sync_del_fetch_g \ -e icache_miss \ -e bpu_br_retire \ -e bpu_br_miss \ -e ret_ins_retire \ -e ret_ins_miss \ -- openssl speed rsa2048 Doing 2048 bits private rsa's for 10s: 39 2048 bits private RSA's in 10.03s Doing 2048 bits public rsa's for 10s: 1469 2048 bits public RSA's in 9.47s version: 3.0.10 built on: Tue Aug 1 13:47:24 2023 UTC options: bn(64,64) CPUINFO: N/A sign verify sign/s verify/s rsa 2048 bits 0.257179s 0.006447s 3.9 155.1 Performance counter stats for 'system wide': 3112882 access_mmu_stlb 10550 miss_mmu_stlb 18251 access_mmu_pte_c 274765 rob_flush 22470560 btb_prediction_miss 3035839 itlb_miss 643549060 sync_del_fetch_g 133013 icache_miss 62982796 bpu_br_retire 287548 bpu_br_miss 8935910 ret_ins_retire 8308 ret_ins_miss 20.656182600 seconds time elapsed Reviewed-by: Ley Foon Tan Signed-off-by: Ji Sheng Teoh Cc: Adrian Hunter Cc: Albert Ou Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Nikita Shubin Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: linux-riscv@lists.infradead.org Link: https://lore.kernel.org/r/20231122030908.2981502-1-jisheng.teoh@starfivetech.com Signed-off-by: Arnaldo Carvalho de Melo commit 581ff5b66c94a8133d1c77ed42334623fadc968c Author: zhujun2 Date: Tue Nov 14 22:42:55 2023 -0800 perf tests coresight: Remove unused variables These variables are never referenced in the code, just remove them. Reviewed-by: James Clark Signed-off-by: zhujun2 Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Link: https://lore.kernel.org/r/20231115064255.11057-1-zhujun2@cmss.chinamobile.com Signed-off-by: Arnaldo Carvalho de Melo commit faca26b6ca90b220cba787ff7c6a05e99528731c Author: Chao Song Date: Mon Nov 27 15:34:46 2023 +0200 ASoC: Intel: soc-acpi: add Gen4.1 SDCA board support for LNL RVP This patch adds support for LNL RVP with Realtek Gen4.1 SDCA codec board, the codec layout is: SDW0: RT711 Headphone SDW1: RT714 DMIC SDW2: RT1316 Speaker SDW3: RT1316 Speaker Signed-off-by: Chao Song Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127133448.18449-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 817178e7674bd8ca35344b2212a3105ed75559e5 Author: Mac Chiang Date: Mon Nov 27 15:34:45 2023 +0200 ASoC: Intel: soc-acpi: rt713+rt1316, no sdw-dmic config This is additional HW board: rt713+rt1316 without rt713-dmic configuration: SDW0: rt713 audio jack SDW1: rt1316 spk_amp_l SDW2: rt1316 spk_amp_r Signed-off-by: Mac Chiang Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127133448.18449-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit def127feaa8a9d8684ac41139638b079e6e637e2 Author: Chao Song Date: Mon Nov 27 15:34:44 2023 +0200 ASoC: Intel: sof_sdw: Add rt722 support RT722 is a multi-function codec which supports headset, amp, and dmic functions. Each function provides a DAI which can be used in different dailinks. The RT711 supports up to 3 SoundWire lanes, but that should not have any impact in the machine driver: the lanes are allocated and controlled by the manager and bandwidth allocation algorithm. Signed-off-by: Chao Song Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127133448.18449-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit fd8ff49d35f917c65383642c8f8f20656734f3ad Author: Chao Song Date: Mon Nov 27 15:34:43 2023 +0200 ASoC: Intel: sof_sdw: remove unused function declaration The functions sof_sdw_rt712_sdca_init() and sof_sdw_rt712_sdca_exit() declared in header file are never implemented and used, remove them. Signed-off-by: Chao Song Reviewed-by: Bard Liao Reviewed-by: Péter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127133448.18449-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 5c0e047ab629bcb5efa94de63fcdc75c9fe69516 Author: Peter Ujfalusi Date: Mon Nov 27 15:34:42 2023 +0200 ASoC: Intel: sof_sdw: Make use of dev_err_probe() The devm_snd_soc_register_card() can return with -EPROBE_DEFER and in that case the driver should not print an error message. Closes: https://github.com/thesofproject/linux/issues/4668 Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Chao Song Link: https://lore.kernel.org/r/20231127133448.18449-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 19b4c60ce8660a0e3a2cebd3e4dc0691928d015d Author: Luben Tuikov Date: Sat Nov 25 14:06:08 2023 -0500 drm/sched: Fix compilation issues with DRM priority rename Fix compilation issues with DRM scheduler priority rename MIN to LOW. Signed-off-by: Luben Tuikov Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311252109.WgbJsSkG-lkp@intel.com/ Cc: Danilo Krummrich Cc: Frank Binns Cc: Donald Robson Cc: Matt Coster Cc: Direct Rendering Infrastructure - Development Fixes: fe375c74806dbd ("drm/sched: Rename priority MIN to LOW") Fixes: 38f922a563aac3 ("drm/sched: Reverse run-queue priority enumeration") Fixes: 5f03a507b29e44 ("drm/nouveau: implement 1:1 scheduler - entity relationship") Link: https://patchwork.freedesktop.org/patch/msgid/20231125192246.87268-2-ltuikov89@gmail.com Reviewed-by: Christian König Link: https://lore.kernel.org/r/7429262c-6dea-4dcc-bf7e-54d2277dabf1@amd.com commit d488759416ed3adf542abe15a530243bb74dd882 Author: Tree Davies Date: Sun Nov 26 21:43:05 2023 -0800 Staging: rtl8192e: Rename variable TsCommonInfo Rename variable TsCommonInfo to ts_common_info to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-16-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit db099efcb25ceb7b2d5cae7cffeb9ac1b1a6852d Author: Tree Davies Date: Sun Nov 26 21:43:04 2023 -0800 Staging: rtl8192e: Rename variable pAdmittedBA Rename variable pAdmittedBA to admitted_ba to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-15-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit cc6c66a6d41f6b28fbe5f11c3552381f529a9867 Author: Tree Davies Date: Sun Nov 26 21:43:03 2023 -0800 Staging: rtl8192e: Rename variable pBaTimeoutVal Rename variable pBaTimeoutVal to ba_timeout_value to fix checkpatch warning Avoid CamelCase, and make the name consistent with variables of same name/type. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-14-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 60b280a3470e1bf6bddd0756e27a7a783c14e5dc Author: Tree Davies Date: Sun Nov 26 21:43:02 2023 -0800 Staging: rtl8192e: Rename variable pBaParamSet Rename variable pBaParamSet to ba_param_set to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-13-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 30b4c01ccc95eff657f4859d7c29b37e848e18c6 Author: Tree Davies Date: Sun Nov 26 21:43:01 2023 -0800 Staging: rtl8192e: Rename variable DelbaParamSet Rename variable DelbaParamSet to del_ba_param_set to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-12-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 536b207c45479e92269e1a112e2bd4125d12be91 Author: Tree Davies Date: Sun Nov 26 21:43:00 2023 -0800 Staging: rtl8192e: Rename variable TsAddBaTimer Rename variable TsAddBaTimer to ts_add_ba_timer to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-11-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 27236dcfed95d9aed6b1f491ccc4cb85a7656c6b Author: Tree Davies Date: Sun Nov 26 21:42:59 2023 -0800 Staging: rtl8192e: Rename variable TxCurSeq Rename variable TxCurSeq to tx_cur_seq to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-10-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 5732a2aa5f4bbd7c898c0bc18bdc73696991feff Author: Tree Davies Date: Sun Nov 26 21:42:58 2023 -0800 Staging: rtl8192e: Rename variable pTsCommonInfo Rename variable pTsCommonInfo to ts_common_info to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-9-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit c831d3f629fe98adf6c25974851208e123033fed Author: Tree Davies Date: Sun Nov 26 21:42:57 2023 -0800 Staging: rtl8192e: Rename variable pDialogToken Rename variable pDialogToken to dialog_token to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-8-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 11fe57bef57ad57837b06d2d2404653d73a30a3c Author: Tree Davies Date: Sun Nov 26 21:42:56 2023 -0800 Staging: rtl8192e: Rename variable TxPendingBARecord Rename variable TxPendingBARecord to tx_pending_ba_record to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 56c5fa92de764af083ca88d9ff4e9c466b466f09 Author: Tree Davies Date: Sun Nov 26 21:42:55 2023 -0800 Staging: rtl8192e: Rename variable TxAdmittedBARecord Rename variable TxAdmittedBARecord to tx_admitted_ba_record to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit b35fe92f84c92b773592da73d95915960baafa75 Author: Tree Davies Date: Sun Nov 26 21:42:54 2023 -0800 Staging: rtl8192e: Rename variable TSpec Rename variable TSpec to tspec to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 1628dd0f12c699fbd2e306650836c3e2ac63ecfe Author: Tree Davies Date: Sun Nov 26 21:42:53 2023 -0800 Staging: rtl8192e: Rename variable Delba Rename variable Delba to del_ba to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 896578ae2c51233742baf3becc9e6753a6e9039a Author: Tree Davies Date: Sun Nov 26 21:42:52 2023 -0800 Staging: rtl8192e: Rename variable BAReq Rename variable BAReq to ba_req to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit c2535e954f502c3d2c46094dce2894c0fbe9f3a1 Author: Tree Davies Date: Sun Nov 26 21:42:51 2023 -0800 Staging: rtl8192e: Rename variable pTxTs Rename variable pTxTs to ts to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Link: https://lore.kernel.org/r/20231127054305.148276-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit b16904fd9f01b580db357ef2b1cc9e86d89576c2 Author: Yonghong Song Date: Sun Nov 26 21:03:42 2023 -0800 bpf: Fix a few selftest failures due to llvm18 change With latest upstream llvm18, the following test cases failed: $ ./test_progs -j #13/2 bpf_cookie/multi_kprobe_link_api:FAIL #13/3 bpf_cookie/multi_kprobe_attach_api:FAIL #13 bpf_cookie:FAIL #77 fentry_fexit:FAIL #78/1 fentry_test/fentry:FAIL #78 fentry_test:FAIL #82/1 fexit_test/fexit:FAIL #82 fexit_test:FAIL #112/1 kprobe_multi_test/skel_api:FAIL #112/2 kprobe_multi_test/link_api_addrs:FAIL [...] #112 kprobe_multi_test:FAIL #356/17 test_global_funcs/global_func17:FAIL #356 test_global_funcs:FAIL Further analysis shows llvm upstream patch [1] is responsible for the above failures. For example, for function bpf_fentry_test7() in net/bpf/test_run.c, without [1], the asm code is: 0000000000000400 : 400: f3 0f 1e fa endbr64 404: e8 00 00 00 00 callq 0x409 409: 48 89 f8 movq %rdi, %rax 40c: c3 retq 40d: 0f 1f 00 nopl (%rax) ... and with [1], the asm code is: 0000000000005d20 : 5d20: e8 00 00 00 00 callq 0x5d25 5d25: c3 retq ... and is called instead of and this caused test failures for #13/#77 etc. except #356. For test case #356/17, with [1] (progs/test_global_func17.c)), the main prog looks like: 0000000000000000 : 0: b4 00 00 00 2a 00 00 00 w0 = 0x2a 1: 95 00 00 00 00 00 00 00 exit ... which passed verification while the test itself expects a verification failure. Let us add 'barrier_var' style asm code in both places to prevent function specialization which caused selftests failure. [1] https://github.com/llvm/llvm-project/pull/72903 Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231127050342.1945270-1-yonghong.song@linux.dev commit bc1183a63057839b18e955b6d68abbb20d37b0f1 Author: Li kunyu Date: Mon Nov 13 09:52:29 2023 +0800 misc: ocxl: main: Remove unnecessary ‘0’ values from rc rc is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li kunyu Acked-by: Andrew Donnellan Link: https://lore.kernel.org/r/20231113015229.12074-1-kunyu@nfschina.com Signed-off-by: Greg Kroah-Hartman commit 29eb0dc7bd1efe8f35e8d55b0308091ed2f70b86 Author: Li zeming Date: Mon Nov 13 09:45:33 2023 +0800 misc: ocxl: link: Remove unnecessary (void*) conversions The link pointer does not need to cast the type. Signed-off-by: Li zeming Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Link: https://lore.kernel.org/r/20231113014533.11064-1-zeming@nfschina.com Signed-off-by: Greg Kroah-Hartman commit 0e425d703c30cddea913e5cc73b2528fba628c90 Author: Li zeming Date: Mon Nov 13 09:22:02 2023 +0800 misc: ocxl: afu_irq: Remove unnecessary (void*) conversions The irq pointer does not need to cast the type. Signed-off-by: Li zeming Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Link: https://lore.kernel.org/r/20231113012202.7887-1-zeming@nfschina.com Signed-off-by: Greg Kroah-Hartman commit 62df29a542f9ba8e884fcd470843b620d3f067fc Author: Li zeming Date: Mon Nov 13 09:15:43 2023 +0800 misc: ocxl: context: Remove unnecessary (void*) conversions The ctx pointer does not need to cast the type. Signed-off-by: Li zeming Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Link: https://lore.kernel.org/r/20231113011543.6940-1-zeming@nfschina.com Signed-off-by: Greg Kroah-Hartman commit 8e6a43961f24cf841d3c0d199521d0b284d948b9 Author: Andrew Davis Date: Fri Nov 17 10:10:05 2023 -0600 spi: sprd: adi: Use devm_register_restart_handler() Use device life-cycle managed register function to simplify probe error path and eliminate need for explicit remove function. Signed-off-by: Andrew Davis Link: https://lore.kernel.org/r/20231117161006.87734-5-afd@ti.com Signed-off-by: Mark Brown commit 9b3cd8ebb19edd92300932b68fd6941eaf1852d0 Author: Peter Ujfalusi Date: Mon Nov 27 12:43:13 2023 +0200 ASoC: SOF: Intel: Use existing helpers to change GPROCEN and PIE bits Instead of directly changing the GPROCEN/PIE bits in PPCTL we should use the existing helper hda_dsp_ctrl_ppcap_enable() and hda_dsp_ctrl_ppcap_int_enable() helpers for clarity. Reviewed-by: Ranjani Sridharan Signed-off-by: Peter Ujfalusi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231127104313.16661-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit d5070d0c10326e09276c34568b9a19fb9a727b6e Author: Yong Zhi Date: Mon Nov 27 12:52:35 2023 +0200 ASoC: SOF: Intel: mtl: call dsp dump when boot retry fails Call snd_sof_dsp_dbg_dump() with the same flags/dump_msg as used in function hda_loader.c/cl_dsp_init(). Reviewed-by: Péter Ujfalusi Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20231127105235.30071-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 076357cd57c294fb185ac452b9ce5536b2853839 Author: Christophe JAILLET Date: Sun Nov 19 19:19:14 2023 +0100 ASoC: sh: convert not to use dma_request_slave_channel() dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/1a837f96f056fa3dcb02a77afa5892d40b354cb1.1700417934.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 792846d9daa876186196b66dc496a2ba8ddd7535 Author: Kuninori Morimoto Date: Mon Nov 13 01:31:04 2023 +0000 ASoC: audio-graph-card2-custom-sample: add CPU/Codec = N:M sample Now ASoC is supporting CPU/Codec = N:M connection, add its sample settings. One note here is that it has many type of samples, it reached to maximum of sound minor number. Therefore, new sample is disabled so far. If you want to try it, you need to disable some other one instead. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o7fy4ey0.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a706366f93c37c6649acfe15a1ef9a80e25bace4 Author: Kuninori Morimoto Date: Mon Nov 13 01:30:09 2023 +0000 ASoC: audio-graph-card2-custom-sample: Add connection image Audio Graph Card2 is supporting many type of Sound connections, but thus it is very difficult to understand how these are connected. To support well understanding, adds each connection images and indicates each settings are for where. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pm0e4ezi.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e2de6808df4ad5faa6106f7a80617921fdf5dff5 Author: Kuninori Morimoto Date: Mon Nov 13 01:29:23 2023 +0000 ASoC: audio-graph-card2: add CPU:Codec = N:M support Now ASoC is supporting CPU:Codec = N:M support. This patch enables it on Audio Graph Card2. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r0ku4f0t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 912eb415631140c93ff5f05378411fec8e6a537f Author: Kuninori Morimoto Date: Mon Nov 13 01:28:58 2023 +0000 ASoC: audio-graph-card2: use better image for Multi connection 1st port on Multi ports is for paired CPU/Codec, and the 2nd or later port are for Multi Elements. This patch indicates its image to easy to understand. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sf5a4f1i.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 45cc50d13433a62f23b7b4af380497aae5e8ddc7 Author: Kuninori Morimoto Date: Mon Nov 13 01:28:27 2023 +0000 ASoC: makes CPU/Codec channel connection map more generic Current ASoC CPU:Codec = N:M connection is using connection mapping idea, but it is used for N < M case only. We want to use it for any case. By this patch, not only N:M connection, but all existing connection (1:1, 1:N, N:N) will use same connection mapping. Then, because it will use default mapping, no conversion patch is needed to exising drivers. More over, CPU:Codec = N:M (N > M) also supported in the same time. ch_maps array will has CPU/Codec index by this patch. Image CPU0 <---> Codec0 CPU1 <-+-> Codec1 CPU2 <-/ ch_map ch_map[0].cpu = 0 ch_map[0].codec = 0 ch_map[1].cpu = 1 ch_map[1].codec = 1 ch_map[2].cpu = 2 ch_map[2].codec = 1 Link: https://lore.kernel.org/r/87fs6wuszr.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/878r7yqeo4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Reviewed-by: Bard Liao Tested-by: Pierre-Louis Bossart Tested-by: Jerome Brunet Link: https://lore.kernel.org/r/87ttpq4f2c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4a18ab467820b75436ea9ddd42ee7cb10efa491c Author: zhaimingbing Date: Fri Nov 24 17:26:57 2023 +0800 perf lock: Fix a memory leak on an error path if a strdup-ed string is NULL,the allocated memory needs freeing. Signed-off-by: zhaimingbing Acked-by: Ingo Molnar Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Li Dong Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sean Christopherson Link: https://lore.kernel.org/r/20231124092657.10392-1-zhaimingbing@cmss.chinamobile.com Signed-off-by: Arnaldo Carvalho de Melo commit a24d9d9dc096fc0d0bd85302c9a4fe4fe3b1107b Author: Ian Rogers Date: Wed Nov 22 20:29:22 2023 -0800 perf parse-events: Make legacy events lower priority than sysfs/JSON The perf tool has previously made legacy events the priority so with or without a PMU the legacy event would be opened: $ perf stat -e cpu-cycles,cpu/cpu-cycles/ true Using CPUID GenuineIntel-6-8D-1 intel_pt default config: tsc,mtc,mtc_period=3,psb_period=3,pt,branch Attempting to add event pmu 'cpu' with 'cpu-cycles,' that may result in non-fatal errors After aliases, add event pmu 'cpu' with 'cpu-cycles,' that may result in non-fatal errors Control descriptor is not initialized ------------------------------------------------------------ perf_event_attr: type 0 (PERF_TYPE_HARDWARE) size 136 config 0 (PERF_COUNT_HW_CPU_CYCLES) sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 enable_on_exec 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid 833967 cpu -1 group_fd -1 flags 0x8 = 3 ------------------------------------------------------------ perf_event_attr: type 0 (PERF_TYPE_HARDWARE) size 136 config 0 (PERF_COUNT_HW_CPU_CYCLES) sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 enable_on_exec 1 exclude_guest 1 ------------------------------------------------------------ ... Fixes to make hybrid/BIG.little PMUs behave correctly, ie as core PMUs capable of opening legacy events on each, removing hard coded "cpu_core" and "cpu_atom" Intel PMU names, etc. caused a behavioral difference on Apple/ARM due to latent issues in the PMU driver reported in: https://lore.kernel.org/lkml/08f1f185-e259-4014-9ca4-6411d5c1bc65@marcan.st/ As part of that report Mark Rutland requested that legacy events not be higher in priority when a PMU is specified reversing what has until this change been perf's default behavior. With this change the above becomes: $ perf stat -e cpu-cycles,cpu/cpu-cycles/ true Using CPUID GenuineIntel-6-8D-1 Attempt to add: cpu/cpu-cycles=0/ ..after resolving event: cpu/event=0x3c/ Control descriptor is not initialized ------------------------------------------------------------ perf_event_attr: type 0 (PERF_TYPE_HARDWARE) size 136 config 0 (PERF_COUNT_HW_CPU_CYCLES) sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 enable_on_exec 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid 827628 cpu -1 group_fd -1 flags 0x8 = 3 ------------------------------------------------------------ perf_event_attr: type 4 (PERF_TYPE_RAW) size 136 config 0x3c sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 enable_on_exec 1 exclude_guest 1 ------------------------------------------------------------ ... So the second event has become a raw event as /sys/devices/cpu/events/cpu-cycles exists. A fix was necessary to config_term_pmu in parse-events.c as check_alias expansion needs to happen after config_term_pmu, and config_term_pmu may need calling a second time because of this. config_term_pmu is updated to not use the legacy event when the PMU has such a named event (either from JSON or sysfs). The bulk of this change is updating all of the parse-events test expectations so that if a sysfs/JSON event exists for a PMU the test doesn't fail - a further sign, if it were needed, that the legacy event priority was a known and tested behavior of the perf tool. Reported-by: Hector Martin Signed-off-by: Ian Rogers Tested-by: Hector Martin Tested-by: Marc Zyngier Acked-by: Mark Rutland Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231123042922.834425-1-irogers@google.com [ Initialize the 'alias_rewrote_terms' variable to false to address a clang warning ] Signed-off-by: Arnaldo Carvalho de Melo commit a4271827e609d30b7255aa7e4c453a8f3fe36a7b Author: Leo Yan Date: Sat Oct 14 15:45:13 2023 +0800 perf cs-etm: Enable itrace option 'T' Prior to Armv8.4, the feature FEAT_TRF is not supported by Arm CPUs. Consequently, the sysfs node 'ts_source' will not be set as 1 by the CoreSight ETM driver. On the other hand, the perf tool relies on the 'ts_source' node to determine whether the kernel timestamp is traced. Since the 'ts_source' is not set for Arm CPUs prior to Armv8.4, platforms in this case cannot utilize the traced timestamp as the kernel time. This patch enables the 'T' itrace option, which forcibly utilizes the traced timestamp as the kernel time. If users are aware that their working platform's Arm CoreSight shares the same counter with the kernel time, they can specify 'T' option to decode the traced timestamp as the kernel time. An usage example is: # perf record -e cs_etm// -- test_program # perf script --itrace=i10ibT # perf report --itrace=i10ibT Reviewed-by: James Clark Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20231014074513.1668000-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 26218331f49c858d52e60418cf3cef4c3fa6cf2e Author: Leo Yan Date: Sat Oct 14 15:45:12 2023 +0800 perf auxtrace: Add 'T' itrace option for timestamp trace An AUX trace can contain timestamp, but in some situations, the hardware trace module (e.g. Arm CoreSight) cannot decide the traced timestamp is the same source with CPU's time, thus the decoder can not use the timestamp trace for samples. This patch introduces 'T' itrace option. If users know the platforms they are working on have the same time counter with CPUs, users can use this new option to tell a decoder for using timestamp trace as kernel time. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: Will Deacon Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20231014074513.1668000-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 2dbba30fd69b604802a9535b74bddb5bcca23793 Author: James Clark Date: Fri Sep 1 14:37:15 2023 +0100 perf cs-etm: Bump minimum OpenCSD version to ensure a bugfix is present Since commit d927ef5004ef ("perf cs-etm: Add exception level consistency check"), the exception that was added to Perf will be triggered unless the following bugfix from OpenCSD is present: - _Version 1.2.1_: - __Bugfix__: ETM4x / ETE - output of context elements to client can in some circumstances be delayed until after subsequent atoms have been processed leading to incorrect memory decode access via the client callbacks. Fixed to flush context elements immediately they are committed. Rather than remove the assert and silently fail, just increase the minimum version requirement to avoid hard to debug issues and regressions. Reviewed-by: Ian Rogers Signed-off-by: James Clark Tested-by: Leo Yan Cc: John Garry Cc: Mike Leach Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230901133716.677499-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 697579629f850d8f863147351e12e74c50114a8a Author: Kan Liang Date: Tue Nov 7 10:40:20 2023 -0800 perf test: Basic branch counter support Add a basic test for the branch counter feature. The test verifies that - The new filter can be successfully applied on the supported platforms. - The counter value can be outputted via the perf report -D Signed-off-by: Kan Liang Tested-by: Ian Rogers Cc: Adrian Hunter Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Tinghao Zhang Link: https://lore.kernel.org/r/20231107184020.1497571-1-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit cd38d6b5fa2dfc3beb7311f0b373e3141620c76b Author: zhaimingbing Date: Mon Nov 20 19:23:56 2023 +0800 perf script perl: Fail check on dynamic allocation Return ENOMEM when dynamic allocation failed. Reviewed-by: Ian Rogers Signed-off-by: zhaimingbing Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Li Dong Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sean Christopherson Link: https://lore.kernel.org/r/20231120112356.8652-1-zhaimingbing@cmss.chinamobile.com Signed-off-by: Arnaldo Carvalho de Melo commit b457c526072aa8ab312517010837b06d38b9bb66 Author: Paran Lee Date: Tue Nov 21 07:32:19 2023 +0900 perf script python: Fail check on dynamic allocation Add PyList_New() Fail check in get_field_numeric_entry() function and dynamic allocation checking for set_regs_in_dict(), python_start_script(). Reviewed-by: Adrian Hunter Reviewed-by: MichelleJin Signed-off-by: Paran Lee Cc: Alexander Shishkin Cc: Austin Kim Cc: Honggyu Kim Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Li Dong Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sean Christopherson Link: https://lore.kernel.org/r/20231120223218.9036-1-p4ranlee@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 72b4ca7e993e94f09bcf6d19fc385a2e8060c71f Author: Nick Forrington Date: Thu Nov 2 16:22:24 2023 +0000 perf test: Remove atomics from test_loop to avoid test failures The current use of atomics can lead to test failures, as tests (such as tests/shell/record.sh) search for samples with "test_loop" as the top-most stack frame, but find frames related to the atomic operation (e.g. __aarch64_ldadd4_relax). This change simply removes the "count" variable, as it is not necessary. Fixes: 1962ab6f6e0b39e4 ("perf test workload thloop: Make count increments atomic") Reviewed-by: James Clark Signed-off-by: Nick Forrington Acked-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Link: https://lore.kernel.org/r/20231102162225.50028-1-nick.forrington@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 7f6f9e0def00cfaeb1d034fd13dbd84470aeccbd Author: Rohit Agarwal Date: Fri Nov 17 11:45:01 2023 +0530 phy: qcom-qmp-usb: Add Qualcomm SDX75 USB3 PHY support Add support for USB3 QMP PHY found in SDX75 platform. Signed-off-by: Rohit Agarwal Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231117061501.537529-1-quic_rohiagar@quicinc.com Signed-off-by: Vinod Koul commit 62ff41017e147472b07de6125c3be82ce02a8dd7 Author: Alex Bee Date: Sun Nov 19 13:13:37 2023 +0100 phy: phy-rockchip-inno-usb2: Add RK3128 support Add registers to support the 2-port usb2 phy found in RK312x SoC familiy. Signed-off-by: Alex Bee Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20231119121340.109025-3-knaerzche@gmail.com Signed-off-by: Vinod Koul commit 2fda59099462ee700e424ba3ac928d13ad6389a8 Author: Alex Bee Date: Sun Nov 19 13:13:36 2023 +0100 phy: rockchip-inno-usb2: Split ID interrupt phy registers Commit 51a9b2c03dd3 ("phy: rockchip-inno-usb2: Handle ID IRQ") added ID detection interrupt registers. However the current implementation assumes that falling and rising edge interrupt are always enabled in registers spanning over subsequent bits. That is not the case for RK3128's version of the phy and this implementation can't be used as-is, since there are bits with different purpose in between. This splits up the register definitions for id_det_en, id_det_en and id_det_clr registers in rising and falling edge variants. It's required as preparation to support RK3128's Innosilicon usb2 phy as well in this driver and matches pretty much to what the vendor does, so I'm not expecting issues for other SoCs with that change. Signed-off-by: Alex Bee Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20231119121340.109025-2-knaerzche@gmail.com Signed-off-by: Vinod Koul commit e1df5202e879bce09845ac62bae30206e1edfb80 Author: Shradha Gupta Date: Fri Nov 24 05:02:30 2023 -0800 net :mana :Add remaining GDMA stats for MANA to ethtool Extend performance counter stats in 'ethtool -S ' for MANA VF to include all GDMA stat counter. Tested-on: Ubuntu22 Testcases: 1. LISA testcase: PERF-NETWORK-TCP-THROUGHPUT-MULTICONNECTION-NTTTCP-Synthetic 2. LISA testcase: PERF-NETWORK-TCP-THROUGHPUT-MULTICONNECTION-NTTTCP-SRIOV Signed-off-by: Shradha Gupta Link: https://lore.kernel.org/r/1700830950-803-1-git-send-email-shradhagupta@linux.microsoft.com Signed-off-by: Paolo Abeni commit ff03ff328fbd0a2b3a43e8b9bbc2a1d84265e77e Author: Yazen Ghannam Date: Sat Nov 18 13:32:32 2023 -0600 x86/mce/amd, EDAC/mce_amd: Move long names to decoder module The long names of the SMCA banks are only used by the MCE decoder module. Move them out of the arch code and into the decoder module. [ bp: Name the long names array "smca_long_names", drop local ptr in decode_smca_error(), constify arrays. ] Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231118193248.1296798-5-yazen.ghannam@amd.com commit 0d555b57ee660d8a871781c0eebf006e855e918d Author: Stephen Rothwell Date: Mon Nov 27 13:28:09 2023 +1100 powerpc: pmd_move_must_withdraw() is only needed for CONFIG_TRANSPARENT_HUGEPAGE The linux-next build of powerpc64 allnoconfig fails with: arch/powerpc/mm/book3s64/pgtable.c:557:5: error: no previous prototype for 'pmd_move_must_withdraw' 557 | int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl, | ^~~~~~~~~~~~~~~~~~~~~~ Caused by commit: c6345dfa6e3e ("Makefile.extrawarn: turn on missing-prototypes globally") Fix it by moving the function definition under CONFIG_TRANSPARENT_HUGEPAGE like the prototype. The function is only called when CONFIG_TRANSPARENT_HUGEPAGE=y. Signed-off-by: Stephen Rothwell [mpe: Flesh out change log from linux-next patch] Signed-off-by: Michael Ellerman Link: https://msgid.link/20231127132809.45c2b398@canb.auug.org.au commit 8f9abaa6d7de0a70fc68acaedce290c1f96e2e59 Author: Naveen N Rao Date: Thu Nov 23 12:47:05 2023 +0530 powerpc/lib: Validate size for vector operations Some of the fp/vmx code in sstep.c assume a certain maximum size for the instructions being emulated. The size of those operations however is determined separately in analyse_instr(). Add a check to validate the assumption on the maximum size of the operations, so as to prevent any unintended kernel stack corruption. Signed-off-by: Naveen N Rao Reviewed-by: Gustavo A. R. Silva Build-tested-by: Gustavo A. R. Silva Signed-off-by: Michael Ellerman Link: https://msgid.link/20231123071705.397625-1-naveen@kernel.org commit fa50920b4f82993941e0aac349eb8081ce11e38f Author: Michael Walle Date: Thu Nov 23 14:37:47 2023 +0100 dt-bindings: phy: add compatible for Mediatek MT8195 Add the compatible string for MediaTek MT8195 SoC, using the same MIPI D-PHY block as the MT8183. Signed-off-by: Michael Walle Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231123133749.2030661-3-mwalle@kernel.org Signed-off-by: Vinod Koul commit df99da19c6c24ab65052ae1bc0904f99069478d9 Author: Michael Ellerman Date: Tue Nov 21 10:54:36 2023 +1100 powerpc/lib: Avoid array bounds warnings in vec ops Building with GCC with -Warray-bounds enabled there are several warnings in sstep.c along the lines of: In function ‘do_byte_reverse’, inlined from ‘do_vec_load’ at arch/powerpc/lib/sstep.c:691:3, inlined from ‘emulate_loadstore’ at arch/powerpc/lib/sstep.c:3439:9: arch/powerpc/lib/sstep.c:289:23: error: array subscript 2 is outside array bounds of ‘u8[16]’ {aka ‘unsigned char[16]’} [-Werror=array-bounds=] 289 | up[2] = byterev_8(up[1]); | ~~~~~~^~~~~~~~~~~~~~~~~~ arch/powerpc/lib/sstep.c: In function ‘emulate_loadstore’: arch/powerpc/lib/sstep.c:681:11: note: at offset 16 into object ‘u’ of size 16 681 | } u = {}; | ^ do_byte_reverse() supports a size up to 32 bytes, but in these cases the caller is only passing a 16 byte buffer. In practice there is no bug, do_vec_load() is only called from the LOAD_VMX case in emulate_loadstore(). That in turn is only reached when analyse_instr() recognises VMX ops, and in all cases the size is no greater than 16: $ git grep -w LOAD_VMX arch/powerpc/lib/sstep.c arch/powerpc/lib/sstep.c: op->type = MKOP(LOAD_VMX, 0, 1); arch/powerpc/lib/sstep.c: op->type = MKOP(LOAD_VMX, 0, 2); arch/powerpc/lib/sstep.c: op->type = MKOP(LOAD_VMX, 0, 4); arch/powerpc/lib/sstep.c: op->type = MKOP(LOAD_VMX, 0, 16); Similarly for do_vec_store(). Although the warning is incorrect, the code would be safer if it clamped the size from the caller to the known size of the buffer. Do that using min_t(). Reported-by: Bagas Sanjaya Closes: https://lore.kernel.org/linuxppc-dev/YpbUcPrm61RLIiZF@debian.me/ Reported-by: Jan-Benedict Glaw Closes: https://lore.kernel.org/linuxppc-dev/20221212215117.aa7255t7qd6yefk4@lug-owl.de/ Reported-by: "Gustavo A. R. Silva" Closes: https://lore.kernel.org/linuxppc-dev/6a8bf78c-aedb-4d5a-b0aa-82a51a17b884@embeddedor.com/ Reviewed-by: "Gustavo A. R. Silva" Build-tested-by: "Gustavo A. R. Silva" Signed-off-by: Michael Ellerman Link: https://msgid.link/20231120235436.1569255-1-mpe@ellerman.id.au commit 45b1ba7e5d1f6881050d558baf9bc74a2ae13930 Author: Kunwu Chan Date: Wed Nov 22 11:06:51 2023 +0800 powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan Signed-off-by: Michael Ellerman Link: https://msgid.link/20231122030651.3818-1-chentao@kylinos.cn commit 1b1e38002648819c04773647d5242990e2824264 Author: Masahiro Yamada Date: Tue Nov 21 08:23:32 2023 +0900 powerpc: add crtsavres.o to always-y instead of extra-y crtsavres.o is linked to modules. However, as explained in commit d0e628cd817f ("kbuild: doc: clarify the difference between extra-y and always-y"), 'make modules' does not build extra-y. For example, the following command fails: $ make ARCH=powerpc LLVM=1 KBUILD_MODPOST_WARN=1 mrproper ps3_defconfig modules [snip] LD [M] arch/powerpc/platforms/cell/spufs/spufs.ko ld.lld: error: cannot open arch/powerpc/lib/crtsavres.o: No such file or directory make[3]: *** [scripts/Makefile.modfinal:56: arch/powerpc/platforms/cell/spufs/spufs.ko] Error 1 make[2]: *** [Makefile:1844: modules] Error 2 make[1]: *** [/home/masahiro/workspace/linux-kbuild/Makefile:350: __build_one_by_one] Error 2 make: *** [Makefile:234: __sub-make] Error 2 Signed-off-by: Masahiro Yamada Fixes: baa25b571a16 ("powerpc/64: Do not link crtsavres.o in vmlinux") Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://msgid.link/20231120232332.4100288-1-masahiroy@kernel.org commit c8a1634145c23a5a979a7166a12b99871812a6ab Author: Michael Ellerman Date: Mon Nov 13 16:19:29 2023 +1100 powerpc/32: Drop unused grackle_set_stg() The call to grackle_set_stg() ("Store Gathering") has always been inside an #ifdef 0, since the code was first merged in v2.3.43pre7. Apparently it was suspected of causing problems on some hardware so was disabled. No one has ever proved otherwise so drop the code as unused for now. Reported-by: kernel test robot Reported-by: Bjorn Helgaas Closes: https://lore.kernel.org/all/20231031145600.GA9161@bhelgaas/ Signed-off-by: Michael Ellerman Link: https://msgid.link/20231113051929.1952351-1-mpe@ellerman.id.au commit 6f2a9e0e0ae5fb0697dd1660ede7e609be25ff6f Author: Michael Ellerman Date: Mon Nov 13 15:39:47 2023 +1100 powerpc: Remove orphaned reg_a2.h Commit fb5a515704d7 ("powerpc: Remove platforms/wsp and associated pieces") removed the A2 CPU support, but missed removal of reg_a2.h. None of the defines contained in it are used, with the exception of the SPRN_TEN* values, but they are also defined in reg_booke.h. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231113043947.1931831-1-mpe@ellerman.id.au commit 98eb30fe4c69a9b602f29e406317c49b5580352a Author: Michael Ellerman Date: Wed Oct 25 12:24:52 2023 +1100 powerpc: Make cpu_spec __ro_after_init The cpu_spec is a struct holding various information about the CPU the kernel is executing on. It's populated early in boot and must not change after that. In particular the cpu_features and mmu_features hold the set of discovered CPU/MMU features and are used to set static keys for each feature, and do binary patching of assembly. So any change to the cpu_features/mmu_features later in boot will not be reflected in the state of the static keys or patched code. There is already logic to check that cpu_features/mmu_features don't change, see check_features() in feature-fixups.c. But as another layer of protection the entire cpu_spec should be read only after init, annotate it as such. Signed-off-by: Michael Ellerman Link: https://msgid.link/20231025012452.1985680-1-mpe@ellerman.id.au commit 183bc0c640c785a710885a10b614193f114fe760 Author: Michael Ellerman Date: Tue Oct 24 22:27:25 2023 +1100 powerpc/configs/64s: Enable CONFIG_MEM_SOFT_DIRTY Enable CONFIG_MEM_SOFT_DIRTY to get some test coverage. Distros enable it, and it has been broken previously. See commit 66b2ca086210 ("powerpc/64s/radix: Fix soft dirty tracking"). Signed-off-by: Michael Ellerman Link: https://msgid.link/20231024112726.1819795-1-mpe@ellerman.id.au commit 29685ea5754f04c84ad443fd7c6869c68f636c26 Author: Li kunyu Date: Mon Nov 13 09:52:29 2023 +0800 misc: ocxl: main: Remove unnecessary ‘0’ values from rc rc is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li kunyu Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://msgid.link/20231113015229.12074-1-kunyu@nfschina.com commit 220f3ced8e42b1efe9c6b84778fb0c77c0c56611 Author: Li zeming Date: Mon Nov 13 09:45:33 2023 +0800 misc: ocxl: link: Remove unnecessary (void*) conversions The link pointer does not need to cast the type. Signed-off-by: Li zeming Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://msgid.link/20231113014533.11064-1-zeming@nfschina.com commit 84ba5d3675e23e6fa824a2268c5b6a04b52dde4d Author: Li zeming Date: Mon Nov 13 09:22:02 2023 +0800 misc: ocxl: afu_irq: Remove unnecessary (void*) conversions The irq pointer does not need to cast the type. Signed-off-by: Li zeming Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://msgid.link/20231113012202.7887-1-zeming@nfschina.com commit 82d30723d58fccbd2d7d707fab7649b541fafa1b Author: Li zeming Date: Mon Nov 13 09:15:43 2023 +0800 misc: ocxl: context: Remove unnecessary (void*) conversions The ctx pointer does not need to cast the type. Signed-off-by: Li zeming Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://msgid.link/20231113011543.6940-1-zeming@nfschina.com commit 5f4a9a66f8a7582e90311fa8251da33a8d2111d7 Author: Neil Armstrong Date: Fri Nov 24 09:41:15 2023 +0100 dt-bindings: phy: amlogic,g12a-mipi-dphy-analog: drop unneeded reg property and example The amlogic,g12a-mipi-dphy-analog is a feature of the simple-mfd amlogic,meson-axg-hhi-sysctrl system control register zone which is an intermixed registers zone, thus it's very hard to define clear ranges for each SoC controlled features even if possible. The amlogic,g12a-mipi-dphy-analog was wrongly documented as an independent register range, which is not the reality, thus fix the bindings by dropping the reg property now it's referred from amlogic,meson-gx-hhi-sysctrl.yaml and documented as a subnode of amlogic,meson-axg-hhi-sysctrl. Also drop the unnecessary example, the top level bindings example should be enough. Fixes: 76ab79f9726c ("dt-bindings: phy: add Amlogic G12A Analog MIPI D-PHY bindings") Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231124-amlogic-v6-4-upstream-dsi-ccf-vim3-v9-4-95256ed139e6@linaro.org Signed-off-by: Vinod Koul commit 130601d488fa06447283767e447909ce9e975e43 Author: Neil Armstrong Date: Fri Nov 24 09:41:14 2023 +0100 dt-bindings: phy: amlogic,meson-axg-mipi-pcie-analog: drop text about parent syscon and drop example Since this bindings is referred from amlogic,meson-gx-hhi-sysctrl.yaml, drop the now useless description about the parent node and also drop the unnecessary example. Acked-by: Conor Dooley Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231124-amlogic-v6-4-upstream-dsi-ccf-vim3-v9-3-95256ed139e6@linaro.org Signed-off-by: Vinod Koul commit 61f054f3c8a6d6081e078e93aba144760aed17c9 Merge: 87639e01e05c7 e378c7de74620 Author: Joerg Roedel Date: Mon Nov 27 11:23:54 2023 +0100 Merge branch 'iommu/fixes' into core commit 60732292a135e8b8152858f219a563c05e9569e9 Author: Sven Peter Date: Sun Nov 26 17:20:09 2023 +0100 iommu/apple-dart: Use readl instead of readl_relaxed for consistency While the readl_relaxed in apple_dart_suspend is correct the rest of the driver uses the non-relaxed variants everywhere and the single readl_relaxed is inconsistent and possibly confusing. Signed-off-by: Sven Peter Acked-by: Hector Martin Reviewed-by: Neal Gompa Link: https://lore.kernel.org/r/20231126162009.17934-1-sven@svenpeter.dev Signed-off-by: Joerg Roedel commit 863c092323ab17a5bc4b2f3185d4136f9e57bbe3 Author: Sven Peter Date: Sun Nov 26 16:17:01 2023 +0100 iommu/apple-dart: Add support for t8103 USB4 DART This variant of the regular t8103 DART is used for the two USB4/Thunderbolt PCIe controllers. It supports 64 instead of 16 streams which requires a slightly different MMIO layout. Acked-by: Hector Martin Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20231126151701.16534-4-sven@svenpeter.dev Signed-off-by: Joerg Roedel commit c58a17a99753749aabd979bc62babb2243266dcc Author: Sven Peter Date: Sun Nov 26 16:17:00 2023 +0100 iommu/apple-dart: Write to all DART_T8020_STREAM_SELECT We're about to add support for a DART variant that use more than 16 streams and requires writing to two separate stream select registers when issuing TLB flushes. Acked-by: Hector Martin Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20231126151701.16534-3-sven@svenpeter.dev Signed-off-by: Joerg Roedel commit a08bd8df97b7549fe0edc53d087322314a0c4dfe Author: Sven Peter Date: Sun Nov 26 16:16:59 2023 +0100 dt-bindings: iommu: dart: Add t8103-usb4-dart compatible This DART variant is found in the t8103 (M1) SoCs and used for the USB4/Thunderbolt PCIe ports. Unlike the regular t8103 DART these support up to 64 SIDs and require a slightly different MMIO layout. Acked-by: Hector Martin Acked-by: Rob Herring Signed-off-by: Sven Peter Link: https://lore.kernel.org/r/20231126151701.16534-2-sven@svenpeter.dev Signed-off-by: Joerg Roedel commit c9a0ed13382660c9f080ca657616b0a83ad25a66 Author: Geert Uytterhoeven Date: Wed Nov 22 17:12:43 2023 +0100 ARM: dts: renesas: armadillo800eva: Add LCD panel Describe the 5" WVGA TFT LCD panel on the Armadillo-800-EVA development board, and enable the LCD controller that drives it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/278339322dcaaedc0d68fc67f1f1272d880084d7.1700669207.git.geert+renesas@glider.be commit dc99d4c8ac46bf533b9519a53795c4cd6ff0fa39 Author: Rob Herring Date: Wed Nov 22 15:44:08 2023 -0700 dt-bindings: pinctrl: renesas: Drop unneeded quotes Drop unneeded quotes over simple string values to fix a soon to be enabled yamllint warning: [error] string value is redundantly quoted with any quotes (quoted-strings) Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231122224409.2808999-1-robh@kernel.org Signed-off-by: Geert Uytterhoeven commit e4c3a81ab88f3230713f4678deb9dd3cb8d0382c Author: Lad Prabhakar Date: Wed Oct 11 20:59:23 2023 +0100 pinctrl: renesas: rzg2l: Enhance driver to support interrupt affinity setting Implement irq_set_affinity callback so that we can set affinity for GPIO IRQs. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231011195923.67404-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 87639e01e05c716d8fd5d63846b6d9a8b0a2e79a Author: Boris Brezillon Date: Fri Nov 24 15:24:34 2023 +0100 iommu: Extend LPAE page table format to support custom allocators We need that in order to implement the VM_BIND ioctl in the GPU driver targeting new Mali GPUs. VM_BIND is about executing MMU map/unmap requests asynchronously, possibly after waiting for external dependencies encoded as dma_fences. We intend to use the drm_sched framework to automate the dependency tracking and VM job dequeuing logic, but this comes with its own set of constraints, one of them being the fact we are not allowed to allocate memory in the drm_gpu_scheduler_ops::run_job() to avoid this sort of deadlocks: - VM_BIND map job needs to allocate a page table to map some memory to the VM. No memory available, so kswapd is kicked - GPU driver shrinker backend ends up waiting on the fence attached to the VM map job or any other job fence depending on this VM operation. With custom allocators, we will be able to pre-reserve enough pages to guarantee the map/unmap operations we queued will take place without going through the system allocator. But we can also optimize allocation/reservation by not free-ing pages immediately, so any upcoming page table allocation requests can be serviced by some free page table pool kept at the driver level. I might also be valuable for other aspects of GPU and similar use-cases, like fine-grained memory accounting and resource limiting. Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20231124142434.1577550-3-boris.brezillon@collabora.com Signed-off-by: Joerg Roedel commit 17b226dcf80ce79d02f4f0b08813d8848885b986 Author: Boris Brezillon Date: Fri Nov 24 15:24:33 2023 +0100 iommu: Allow passing custom allocators to pgtable drivers This will be useful for GPU drivers who want to keep page tables in a pool so they can: - keep freed page tables in a free pool and speed-up upcoming page table allocations - batch page table allocation instead of allocating one page at a time - pre-reserve pages for page tables needed for map/unmap operations, to ensure map/unmap operations don't try to allocate memory in paths they're allowed to block or fail It might also be valuable for other aspects of GPU and similar use-cases, like fine-grained memory accounting and resource limiting. We will extend the Arm LPAE format to support custom allocators in a separate commit. Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20231124142434.1577550-2-boris.brezillon@collabora.com Signed-off-by: Joerg Roedel commit 5f9e29b9159a41fcf6733c3b59fa46a90ce3ae20 Author: Claudiu Beznea Date: Mon Nov 20 09:00:11 2023 +0200 clk: renesas: rzg2l-cpg: Reuse code in rzg2l_cpg_reset() Code in rzg2l_cpg_reset() is equivalent with the combined code of rzg2l_cpg_assert() and rzg2l_cpg_deassert(). There is no need to have different versions thus re-use rzg2l_cpg_assert() and rzg2l_cpg_deassert(). Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231120070024.4079344-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 138588e9fa237f9742c691369c023b246f5b0b88 Author: Geert Uytterhoeven Date: Wed Nov 22 17:12:42 2023 +0100 ARM: dts: renesas: r8a7740: Add LCDC nodes Add device nodes for the two LCD Controllers (LCDC) on the R-Mobile A1 SoC, and for the two optional external LCDL clock inputs. Note that the HDMI clock for LCDC1 is not added, as this clock is not yet supported. Based on a patch by Laurent Pinchart adding the first LCDC device node. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/12dcec10e6fb3b55c39f6221349d35d6d6f17a5d.1700669207.git.geert+renesas@glider.be commit ea17f751318639c9348f2fc62c865d688f70a53e Author: Geert Uytterhoeven Date: Wed Nov 22 17:12:41 2023 +0100 ARM: shmobile: defconfig: Switch to DRM_SHMOBILE Now the DRM driver for the SH-Mobile LCD Controller supports DT, replace the legacy frame buffer device driver by the DRM driver. Disable frame buffer device drivers, as this was the last frame buffer device driver for Renesas ARM systems. Enable CONFIG_DRM_FBDEV_EMULATION and CONFIG_FB_DEVICE, as these are no longer auto-enabled since commit bb6c4507fe825f1b ("drm: fix up fbdev Kconfig defaults"). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/3d17d8418ddabeb84ff5fa1cdd16439ddc84286f.1700669207.git.geert+renesas@glider.be commit 25d324331a17e423642ad717e9c21635531f70fa Author: Niklas Söderlund Date: Sun Oct 22 20:19:10 2023 +0200 arm64: dts: renesas: draak: Move HDMI bus properties to correct node The bus properties for HDMI capture are defined on the incorrect node for the VIN driver to be able to consume them. They are described on the HDMI video source but they should be described on the VIN capture node, move them. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231022181910.898040-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 7ccd37fbecf31d610adf9aa01667632a418e06d6 Author: Niklas Söderlund Date: Sun Oct 22 20:19:09 2023 +0200 arm64: dts: renesas: draak: Make HDMI the default video input Most Gen3 R-Car devices have HDMI as the default video input source, align Draak with them and make HDMI the default. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231022181910.898040-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit e7080665c977ea1aafb8547a9c7bd08b199311d6 Author: Robin Murphy Date: Tue Nov 21 18:04:03 2023 +0000 iommu: Clean up open-coded ownership checks Some drivers already implement their own defence against the possibility of being given someone else's device. Since this is now taken care of by the core code (and via a slightly different path from the original fwspec-based idea), let's clean them up. Acked-by: Will Deacon Reviewed-by: Jason Gunthorpe Reviewed-by: Jerry Snitselaar Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/58a9879ce3f03562bb061e6714fe6efb554c3907.1700589539.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 17de3f5fdd35676b0e3d41c7c9bf4e3032eb3673 Author: Robin Murphy Date: Tue Nov 21 18:04:02 2023 +0000 iommu: Retire bus ops With the rest of the API internals converted, it's time to finally tackle probe_device and how we bootstrap the per-device ops association to begin with. This ends up being disappointingly straightforward, since fwspec users are already doing it in order to find their of_xlate callback, and it works out that we can easily do the equivalent for other drivers too. Then shuffle the remaining awareness of iommu_ops into the couple of core headers that still need it, and breathe a sigh of relief. Ding dong the bus ops are gone! CC: Rafael J. Wysocki Acked-by: Christoph Hellwig Acked-by: Greg Kroah-Hartman Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Jerry Snitselaar Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/a59011ef65b4b6657cb0b7a388d786b779b61305.1700589539.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 01bf81af85458c0427a70ae3bf90b375d038c95b Author: Robin Murphy Date: Tue Nov 21 18:04:01 2023 +0000 iommu/arm-smmu: Don't register fwnode for legacy binding When using the legacy binding we bypass the of_xlate mechanism, so avoid registering the instance fwnodes which act as keys for that. This will help __iommu_probe_device() to retrieve the registered ops the same way as for x86 etc. when no fwspec has previously been set up by of_xlate. Acked-by: Will Deacon Reviewed-by: Jason Gunthorpe Reviewed-by: Jerry Snitselaar Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/18b0f812a42a74dd6924aea24e68ab409d6e1b52.1700589539.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit b4c0497169d54e08346678dbc79ded7809dae5b7 Author: Robin Murphy Date: Tue Nov 21 18:04:00 2023 +0000 iommu: Decouple iommu_domain_alloc() from bus ops As the final remaining piece of bus-dependent API, iommu_domain_alloc() can now take responsibility for the "one iommu_ops per bus" rule for itself. It turns out we can't safely make the internal allocation call any more group-based or device-based yet - that will have to wait until the external callers can pass the right thing - but we can at least get as far as deriving "bus ops" based on which driver is actually managing devices on the given bus, rather than whichever driver won the race to register first. This will then leave us able to convert the last of the core internals over to the IOMMU-instance model, allow multiple drivers to register and actually coexist (modulo the above limitation for unmanaged domain users in the short term), and start trying to solve the long-standing iommu_probe_device() mess. Reviewed-by: Jason Gunthorpe Reviewed-by: Jerry Snitselaar Signed-off-by: Robin Murphy Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/6c7313009aae0e39ae2855920990ebf85af4662f.1700589539.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit a9c362db39207c4934c9125e56ed730c5297c37c Author: Robin Murphy Date: Tue Nov 21 18:03:59 2023 +0000 iommu: Validate that devices match domains Before we can allow drivers to coexist, we need to make sure that one driver's domain ops can't misinterpret another driver's dev_iommu_priv data. To that end, add a token to the domain so we can remember how it was allocated - for now this may as well be the device ops, since they still correlate 1:1 with drivers. We can trust ourselves for internal default domain attachment, so add checks to cover all the public attach interfaces. Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Jerry Snitselaar Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/097c6f30480e4efe12195d00ba0e84ea4837fb4c.1700589539.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 1d8d43bb984b9cfa7ff63dbd0e2f6e5775ff1fdb Author: Robin Murphy Date: Tue Nov 21 18:03:58 2023 +0000 iommu: Decouple iommu_present() from bus ops Much as I'd like to remove iommu_present(), the final remaining users are proving stubbornly difficult to clean up, so kick that can down the road and just rework it to preserve the current behaviour without depending on bus ops. Since commit 57365a04c921 ("iommu: Move bus setup to IOMMU device registration"), any registered IOMMU instance is already considered "present" for every entry in iommu_buses, so it's simply a case of validating the bus and checking we have at least once IOMMU. Reviewed-by: Jason Gunthorpe Reviewed-by: Lu Baolu Reviewed-by: Jerry Snitselaar Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/caa93680bb9d35a8facbcd8ff46267ca67335229.1700589539.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 48ed12788ed8aa099e463c2febcd3f06fb71c68c Author: Robin Murphy Date: Tue Nov 21 18:03:57 2023 +0000 iommu: Factor out some helpers The pattern for picking the first device out of the group list is repeated a few times now, so it's clearly worth factoring out, which also helps hide the iommu_group_dev detail from places that don't need to know. Similarly, the safety check for dev_iommu_ops() at certain public interfaces starts looking a bit repetitive, and might not be completely obvious at first glance, so let's factor that out for clarity as well, in preparation for more uses of both. Reviewed-by: Lu Baolu Reviewed-by: Jason Gunthorpe Reviewed-by: Jerry Snitselaar Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/566cbd161546caa6aed49662c9b3e8f09dc9c3cf.1700589539.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 7c77368b6c42ec87aed9976288a9b50bccb272a6 Author: Geert Uytterhoeven Date: Wed Nov 22 17:01:21 2023 +0100 ARM: shmobile: defconfig: Refresh for v6.7-rc1 Refresh the defconfig for Renesas ARM systems: - Disable CONFIG_SERIAL_8250_EXAR (auto-enabled since commit 5939ff7ffae095ac ("tty: serial: 8250_exar: Does not use anything from 8250_pci")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/b9bdb0fe3635a7eb51a7eca9a06e8146d6ad82db.1700667824.git.geert+renesas@glider.be commit 528db5d82783fb25d812f30ec744a364f94d18f3 Author: Claudiu Beznea Date: Mon Nov 20 09:00:24 2023 +0200 ARM: multi_v7_defconfig: Enable CONFIG_RAVB The Renesas Ethernet AVB driver is used by various iWave RZ/G1 development boards. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231120070024.4079344-15-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 6f01a732608f294a853f0d1cc963772bac12f1e9 Author: Niklas Schnelle Date: Mon Nov 20 15:51:57 2023 +0100 iommu/virtio: Add ops->flush_iotlb_all and enable deferred flush Add ops->flush_iotlb_all operation to enable virtio-iommu for the dma-iommu deferred flush scheme. This results in a significant increase in performance in exchange for a window in which devices can still access previously IOMMU mapped memory when running with CONFIG_IOMMU_DEFAULT_DMA_LAZY. The previous strict behavior can be achieved with iommu.strict=1 on the kernel command line or CONFIG_IOMMU_DEFAULT_DMA_STRICT. Link: https://lore.kernel.org/lkml/20230802123612.GA6142@myrica/ Signed-off-by: Niklas Schnelle Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20231120-viommu-sync-map-v3-2-50a57ecf78b5@linux.ibm.com Signed-off-by: Joerg Roedel commit 00271ca5cbcd36d01f3c58a05378304ba9dd6a2a Author: Niklas Schnelle Date: Mon Nov 20 15:51:56 2023 +0100 iommu/virtio: Make use of ops->iotlb_sync_map Pull out the sync operation from viommu_map_pages() by implementing ops->iotlb_sync_map. This allows the common IOMMU code to map multiple elements of an sg with a single sync (see iommu_map_sg()). Link: https://lore.kernel.org/lkml/20230726111433.1105665-1-schnelle@linux.ibm.com/ Signed-off-by: Niklas Schnelle Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20231120-viommu-sync-map-v3-1-50a57ecf78b5@linux.ibm.com Signed-off-by: Joerg Roedel commit ac2453d06c768b0604e231d6effabc1c405bd802 Author: Biju Das Date: Thu Aug 24 09:30:06 2023 +0100 arm64: defconfig: Enable Renesas VersaClock 3 clock generator config Enable the config for the Renesas VersaClock 3 programmable clock generator, as it is populated on RZ/{G2L,G2LC} and RZ/V2L SMARC EVKs. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20230824083006.88944-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 9abe6c55354db38f0906fcaf4e1c1644c26cd624 Author: Kunwu Chan Date: Mon Nov 20 17:53:42 2023 +0800 iommu/amd: Set variable amd_dirty_ops to static Fix the followng warning: drivers/iommu/amd/iommu.c:67:30: warning: symbol 'amd_dirty_ops' was not declared. Should it be static? This variable is only used in its defining file, so it should be static. Signed-off-by: Kunwu Chan Reviewed-by: Joao Martins Reviewed-by: Vasant Hegde Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20231120095342.1102999-1-chentao@kylinos.cn Signed-off-by: Joerg Roedel commit b0a7ce53d494c94dfacb5a877fc0668f2a688652 Author: Rajneesh Bhardwaj Date: Sat Nov 11 08:08:56 2023 -0500 drm/ttm: Schedule delayed_delete worker closer Try to allocate system memory on the NUMA node the device is closest to and try to run delayed_delete workers on a CPU of this node as well. To optimize the memory clearing operation when a TTM BO gets freed by the delayed_delete worker, scheduling it closer to a NUMA node where the memory was initially allocated helps avoid the cases where the worker gets randomly scheduled on the CPU cores that are across interconnect boundaries such as xGMI, PCIe etc. This change helps USWC GTT allocations on NUMA systems (dGPU) and AMD APU platforms such as GFXIP9.4.3. Signed-off-by: Rajneesh Bhardwaj Acked-by: Felix Kuehling Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20231111130856.1168304-1-rajneesh.bhardwaj@amd.com Signed-off-by: Christian König commit 3396b3372e61f8b579395e32c53212612b14daff Merge: 6acba0345b687 2cc14f52aeb78 Author: Greg Kroah-Hartman Date: Mon Nov 27 09:23:49 2023 +0000 Merge 6.7-rc3 into usb-next We need the USB/PHY/Thunderbolt fixes in here as well for later patches to build on top of. Signed-off-by: Greg Kroah-Hartman commit f1aad9df93f39267e890836a28d22511f23474e1 Author: Laurentiu Tudor Date: Tue Sep 26 18:26:00 2023 +0300 iommu: Map reserved memory as cacheable if device is coherent Check if the device is marked as DMA coherent in the DT and if so, map its reserved memory as cacheable in the IOMMU. This fixes the recently added IOMMU reserved memory support which uses IOMMU_RESV_DIRECT without properly building the PROT for the mapping. Fixes: a5bf3cfce8cb ("iommu: Implement of_iommu_get_resv_regions()") Signed-off-by: Laurentiu Tudor Reviewed-by: Jason Gunthorpe Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20230926152600.8749-1-laurentiu.tudor@nxp.com Signed-off-by: Joerg Roedel commit 18caaedaf4c3712ab6821f292598a8f86e6d7972 Author: Christophe JAILLET Date: Sun Nov 26 09:56:29 2023 +0100 locking/lockdep: Slightly reorder 'struct lock_class' to save some memory Based on pahole, 2 holes can be combined in the 'struct lock_class'. This saves 8 bytes in the structure on my x86_64. On a x86_64 configured with allmodconfig, this saves ~64kb of memory in 'kernel/locking/lockdep.o': text data bss dec filename Before: 102,501 1,912,490 11,531,636 13,546,627 kernel/locking/lockdep.o After: 102,181 1,912,490 11,466,100 13,480,771 kernel/locking/lockdep.o because of: struct lock_class lock_classes[MAX_LOCKDEP_KEYS]; After the reorder, pahole gives: struct lock_class { struct hlist_node hash_entry; /* 0 16 */ struct list_head lock_entry; /* 16 16 */ struct list_head locks_after; /* 32 16 */ struct list_head locks_before; /* 48 16 */ /* --- cacheline 1 boundary (64 bytes) --- */ const struct lockdep_subclass_key * key; /* 64 8 */ lock_cmp_fn cmp_fn; /* 72 8 */ lock_print_fn print_fn; /* 80 8 */ unsigned int subclass; /* 88 4 */ unsigned int dep_gen_id; /* 92 4 */ long unsigned int usage_mask; /* 96 8 */ const struct lock_trace * usage_traces[10]; /* 104 80 */ /* --- cacheline 2 boundary (128 bytes) was 56 bytes ago --- */ const char * name; /* 184 8 */ /* --- cacheline 3 boundary (192 bytes) --- */ int name_version; /* 192 4 */ u8 wait_type_inner; /* 196 1 */ u8 wait_type_outer; /* 197 1 */ u8 lock_type; /* 198 1 */ /* XXX 1 byte hole, try to pack */ long unsigned int contention_point[4]; /* 200 32 */ long unsigned int contending_point[4]; /* 232 32 */ /* size: 264, cachelines: 5, members: 18 */ /* sum members: 263, holes: 1, sum holes: 1 */ /* last cacheline: 8 bytes */ }; Signed-off-by: Christophe JAILLET Signed-off-by: Ingo Molnar Acked-by: Waiman Long Link: https://lore.kernel.org/r/801258371fc4101f96495a5aaecef638d6cbd8d3.1700988869.git.christophe.jaillet@wanadoo.fr commit 28a9466d75a861c26ba57b64a0a9a436a7c61e77 Author: Christophe JAILLET Date: Sun Nov 26 10:00:59 2023 +0100 MAINTAINERS: Add include/linux/lockdep*.h Have lockdep_api.h and lockdep_types.h match as well. Signed-off-by: Christophe JAILLET Signed-off-by: Ingo Molnar Acked-by: Waiman Long Link: https://lore.kernel.org/r/e722abd043e5de64d2acd28d581e4a952994a94e.1700989248.git.christophe.jaillet@wanadoo.fr commit d8385d7433f9c7d718448465e30d6b8c1207b59f Author: Evgeny Bachinin Date: Wed Nov 8 15:56:04 2023 +0300 firmware: meson-sm: unmap out_base shmem in error path When SM driver was introduced in [1], the code flow did not require to unmap out_base shmem in case of errors inside probe(). During [2], the additional error path appeared, which requires unmap. Patch adds iounmap() missed. Links: [1] https://lore.kernel.org/linux-amlogic/1466339944-602-2-git-send-email-carlo@caione.org/ [2] https://lore.kernel.org/linux-amlogic/1532613556-5398-1-git-send-email-narmstrong@baylibre.com/ Fixes: 0789724f86a5 ("firmware: meson_sm: Add serial number sysfs entry") Signed-off-by: Evgeny Bachinin Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20231108125604.162383-3-EABachinin@salutedevices.com Signed-off-by: Neil Armstrong commit d397965e584e0f2c6193b927c1e7693d514a6738 Author: Evgeny Bachinin Date: Wed Nov 8 15:56:03 2023 +0300 firmware: meson_sm: refactor serial sysfs entry via dev_groups attrs Introduce just another way to register sysfs serial entry: the less code, the better in the absence of extra error-paths Signed-off-by: Evgeny Bachinin Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20231108125604.162383-2-EABachinin@salutedevices.com Signed-off-by: Neil Armstrong commit bee505184fd5543b9e901a37523e39fd1db06860 Author: Viacheslav Bocharov Date: Thu Nov 2 09:12:33 2023 +0300 arm64: dts: meson-axg: jethub-jxx add support for EEPROM Add dts node for EEPROM placed on baseboard in JetHub D1+ devices. Signed-off-by: Viacheslav Bocharov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231102061233.3113249-1-adeep@lexina.in Signed-off-by: Neil Armstrong commit be18d53c32b2bbb211f4be599cafdb9d9ecab040 Author: Arseniy Krasnov Date: Thu Nov 9 12:45:04 2023 +0300 arm64: dts: amlogic: meson-axg: pinctrl node for NAND Add pinctrl node for the Meson NAND controller. Signed-off-by: Arseniy Krasnov Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231109094504.131265-1-avkrasnov@salutedevices.com Signed-off-by: Neil Armstrong commit 35b47cefe8955f4c34fe45e5a06cb3376d6a8aa6 Author: Krzysztof Kozlowski Date: Fri Nov 24 10:47:00 2023 +0100 arm64: dts: amlogic: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Viacheslav Bocharov Link: https://lore.kernel.org/r/20231124094700.58071-1-krzysztof.kozlowski@linaro.org Signed-off-by: Neil Armstrong commit 2d66f91208d1174eb8ad29706e8bdfb587a34d5c Author: Huqiang Qin Date: Fri Oct 27 18:43:58 2023 +0800 arm64: dts: Add watchdog node for Amlogic S4 SoCs Add watchdog device. Signed-off-by: Huqiang Qin Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231027104358.342861-4-huqiang.qin@amlogic.com Signed-off-by: Neil Armstrong commit a30c7a73b0ad50c40c01811fa23e74764c3ba007 Author: Huqiang Qin Date: Fri Oct 27 18:43:57 2023 +0800 arm64: dts: Add watchdog node for Amlogic C3 SoCs Add watchdog device. Signed-off-by: Huqiang Qin Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231027104358.342861-3-huqiang.qin@amlogic.com Signed-off-by: Neil Armstrong commit beb9c30ba4188e481991d91124c554f61a7ec121 Author: Neil Armstrong Date: Fri Nov 24 09:41:13 2023 +0100 dt-bindings: soc: amlogic,meson-gx-hhi-sysctrl: add example covering meson-axg-hhi-sysctrl Add a third example covering the meson-axg-hhi-sysctrl variant and more importantly the phy subnode. Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231124-amlogic-v6-4-upstream-dsi-ccf-vim3-v9-2-95256ed139e6@linaro.org Signed-off-by: Neil Armstrong commit a4f477e6ac171ccdea38556437493c3c5222bbe5 Author: Jouni Högander Date: Mon Nov 20 10:26:06 2023 +0200 drm/i915/psr: Add proper handling for disabling sel fetch for planes Currently we are enabling selective fetch for all planes that are visible. This is suboptimal as we might be fetching for memory for planes that are not part of selective update. Fix this by adding proper handling for disabling plane selective fetch: If plane previously part of selective update is now not part of update: Add it into updated planes and let the plane configuration to disable selective fetch for it. v3: Checkpatch warnings fixed v2: - Add setting sel_fetch_area->y1/y2 to -1 - Remove setting again local sel_fetch_area variable Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231120082606.3156488-3-jouni.hogander@intel.com commit b1f5279b5981f9ed851163ee661692f42397982f Author: Jouni Högander Date: Mon Nov 20 10:26:05 2023 +0200 drm/i915/psr: Move plane sel fetch configuration into plane source files Currently selective fetch configuration for planes is implemented in psr code. More suitable place for this code is where everything else is configured for planes -> move it into skl_universal_plane.c and intel_cursor.c. This also allows us to drop hooks for cursor handling. v3: Checkpatch warnings fixed v2: Removed setting sel_fetch_area->y1/y2 as -1 Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231120082606.3156488-2-jouni.hogander@intel.com commit fcefbb49ebb7ad9f06ecee33ae87e4d7075728ff Author: Rob Herring Date: Wed Oct 25 11:12:21 2023 -0500 bus: imx-weim: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Signed-off-by: Shawn Guo commit fb72b877a6c95d1c758e878b521406913362bcae Author: Alexander Stein Date: Mon Oct 23 11:46:12 2023 +0200 ARM: dts: imx7s: Add DMA channels for CSPI peripherals This adds the rx/tx DMA channels for CSPI peripherals. Channel numbers are taken from i.MX7D RM Rev1 01/2018. Peripheral types ID (7) is selected according to fsl,imx-sdma.yaml and is similar to i.MX6 and i.MX8M platforms. Same goes for transfer priority ID (last number). Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 5016f22028e4ef00f19dedff1115dcd3b96d34a5 Author: Tim Harvey Date: Wed Oct 18 11:09:22 2023 -0700 arm64: dts: imx8mp-venice-gw72xx: add TPM device Add the TPM device found on the GW72xx revision F PCB. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit 2854d8cd032c5588f563d65a3c739a01317a8e3c Author: Tim Harvey Date: Wed Oct 18 11:08:38 2023 -0700 arm64: dts: imx8mm-venice-gw72xx: add TPM device Add the TPM device found on the GW72xx revision F PCB. Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit d68b9a66ae82a0bbaa6746e4286a7bd777084203 Author: Peng Fan Date: Wed Oct 25 15:22:42 2023 +0800 arm64: dts: imx93: update anatop node The anatop module produces PLL and OSC for Clock Controller Module. Since the binding doc has been updated to clock-controller for this module, Let's also update the device tree node. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 47a34668179f6df2832e817db2083f0f02d65256 Author: Haibo Chen Date: Tue Oct 17 14:50:48 2023 +0800 arm64: dts: imx93-11x11-evk: add 12 ms delay to make sure the VDD_SD power off To support SD3.0 mode, according to the SD spec, a clean power off for the VDD_SD is keep the VDD_SD lower than 0.5V for at least 1ms. On imx93 board, gate off the VDD_SD, it will cost about 10ms to see the voltage change from 3.3v to 0.5v. So at least need to dealy 11ms to make sure a clean power off and power on. Here add 12ms dealy. Signed-off-by: Haibo Chen Signed-off-by: Shawn Guo commit 6783971e88f68470dbce46da856382fb12bf20f1 Author: Haibo Chen Date: Tue Oct 17 14:50:47 2023 +0800 arm64: dts: imx93: change tuning start to get a large scan range for standard tuning For original setting, the start point is 20, after the SION setting, ERR052021 can be workaround, but start point from 20 is too large, especially for the LD 133MHz case. Set the tuning start point as 1, tuning step as 2, so that, for the 40 times tuning logic, it can cover 1~81, its large and safe enough for all different devices like eMMC/SD/SDIO. Signed-off-by: Haibo Chen Signed-off-by: Shawn Guo commit bb89601282fc660d2bd312ac6e2baab0fe9e922c Author: Haibo Chen Date: Tue Oct 17 14:50:46 2023 +0800 arm64: dts: imx93-11x11-evk: set SION for cmd and data pad of USDHC imx93 pad integrate has one issue, refer to ERR052021: ERR052021 uSDHC: Sometimes uSDHC does not work under VDD_SOC low drive mode and nominal mode Description: uSDHC PADs have one integration issue. When CMD/DATA lines direction change from output to input, uSDHC controller begin sampling, the integration issue will make input enable signal from uSDHC propagated to the PAD with a long delay, thus the new input value on the pad comes to uSDHC lately. The uSDHC sampled the old input value and the sampling result is wrong. Workaround: Set uSDHC CMD/DATA PADs iomux register SION bit to 1, then PADs will propagate input to uSDHC with no delay, so correct value is sampled. This issue will wrongly trigger the start bit when sample the USDHC command response, cause the USDHC trigger command CRC/index/endbit error, which will finally impact the tuning pass window, espically will impact the standard tuning logic, and can't find a correct delay cell to get the best timing. Signed-off-by: Haibo Chen Signed-off-by: Shawn Guo commit f6862104ff3a56656edefd003bf1be6d89fabda4 Author: Marek Vasut Date: Sun Oct 15 22:01:24 2023 +0200 arm64: dts: imx8mp: Describe M24C32-D write-lockable page in DH i.MX8MP DHCOM DT The i.MX8MP DHCOM SoM production rev.200 is populated with M24C32-D EEPROMs which have Additional Write lockable page at separate I2C address. Describe the page in DT to make it available. Signed-off-by: Marek Vasut Signed-off-by: Shawn Guo commit 43a116148fdd17df511829d9f542483075988bd5 Author: Markus Niebel Date: Fri Oct 13 15:40:00 2023 +0200 ARM: dts: imx6ul: mba6ulx: fix typo in comments Replace 'SPPEED' with 'SPEED' Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit beaf2e34dad561cfe465db5348f759b0d65c5441 Author: Markus Niebel Date: Fri Oct 13 15:39:59 2023 +0200 ARM: dts: imx6qdl: mba6: fix typo in comments Replace 'SPPEED' with 'SPEED' Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 5946b71eacf7fae680887c7de6bbc4f470108280 Author: Adam Ford Date: Thu Oct 12 20:41:17 2023 -0500 arm64: dts: imx8mp-beacon-kit: Enable DSI to HDMI Bridge The baseboard of the Beacon i.MX8M Plus development kit has an ADV7535 DSI to HDMI bridge capable of stereo sound. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 4f776504a9ab719e8ea997e9d0321883c6e29aaf Author: Alexander Stein Date: Thu Oct 12 10:31:23 2023 +0200 arm64: dts: imx8mm: Add CCM interrupts Add both CCM interrupts as mentioned in RM. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit ba6f55e3691974d063a5671447f49f58c4d35146 Author: Alexander Stein Date: Thu Oct 12 10:31:22 2023 +0200 arm64: dts: imx8mn: Add CCM interrupts Add both CCM interrupts as mentioned in RM. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 71f9f77f273644bbc6671927db68ff44018db758 Author: Alexander Stein Date: Thu Oct 12 10:31:21 2023 +0200 arm64: dts: imx8mp: Add CCM interrupts Add both CCM interrupts as mentioned in RM. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit cbad7024a7a9295fdf79b58aa4c2e52f5d014d60 Author: Alexander Stein Date: Thu Oct 12 10:15:56 2023 +0200 ARM: dts: imx7s: Add missing #thermal-sensor-cells imx-thermal.yaml is referencing thermal-sensor.yaml, thus this property is required. Fixes the dtbs_check warning: arch/arm/boot/dts/nxp/imx/imx7d-mba7.dtb: tempmon: '#thermal-sensor-cells' is a required property from schema $id: http://devicetree.org/schemas/thermal/imx-thermal.yaml# Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 4aadb841ed49bada1415c48c44d21f5b69e01299 Author: Alexander Stein Date: Thu Oct 12 10:15:55 2023 +0200 ARM: dts: imx7s: Fix nand-controller #size-cells nand-controller.yaml bindings says #size-cells shall be set to 0. Fixes the dtbs_check warning: arch/arm/boot/dts/nxp/imx/imx7s-mba7.dtb: nand-controller@33002000: #size-cells:0:0: 0 was expected from schema $id: http://devicetree.org/schemas/mtd/gpmi-nand.yaml# Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 5f55da4cc37051cda600ea870ce8cf29f1297715 Author: Alexander Stein Date: Thu Oct 12 10:15:54 2023 +0200 ARM: dts: imx7s: Fix lcdif compatible imx7d-lcdif is compatible to imx6sx-lcdif. MXSFB_V6 supports overlay by using LCDC_AS_CTRL register. This registers used by overlay plane: * LCDC_AS_CTRL * LCDC_AS_BUF * LCDC_AS_NEXT_BUF are listed in i.MX7D RM as well. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 0d4ac04fa7c3f6dc263dba6f575a2ec7a2d4eca8 Author: Alexander Stein Date: Thu Oct 12 10:15:53 2023 +0200 ARM: dts: imx7d: Fix coresight funnel ports imx7d uses two ports for 'in-ports', so the syntax port@ has to be used. imx7d has both port and port@1 nodes present, raising these error: funnel@30041000: in-ports: More than one condition true in oneOf schema funnel@30041000: Unevaluated properties are not allowed ('in-ports' was unexpected) Fix this by also using port@0 for imx7s as well. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 6a04248799fd87abadbf73ba24139a25d33f4406 Author: Alexander Stein Date: Thu Oct 12 09:42:36 2023 +0200 arm64: dts: freescale: add initial device tree for MBa93xxCA starter kit This adds support for TQMa93xx module and MBa93xxCA starterkit mainboard. TQMa93xx is a SOM using i.MX93 SOC. The SOM features PMIC, RAM, e-MMC and some optional peripherals like SPI-NOR, RTC, EEPROM, gyroscope and secure element. TQMa93xxLA is a solder on type SOM and can be used on MBa93XXCA using an adapter. TQMa93xxCA is a feature compatible, socketable type SOM. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit d9b07915fc3137c46a78b5b092ba3d8f2bd73121 Author: Alexander Stein Date: Thu Oct 12 09:42:35 2023 +0200 arm64: dts: freescale: tqma9352-mba93xxla: add 'chassis-type' property Add the chassis-type property to tqma9352-mba93xxla. Signed-off-by: Alexander Stein Signed-off-by: Shawn Guo commit 54303e555df10ea4482fa52784070f216e3c8750 Author: Chancel Liu Date: Wed Nov 22 18:19:58 2023 +0800 arm64: dts: imx93: Configure clock rate for audio PLL Configure clock rate for audio PLL. There's one audio PLL on i.MX93. It is used as parent clock for clocks that are multiple of 8kHz. Signed-off-by: Chancel Liu Signed-off-by: Shawn Guo commit 1c4a4f7362fd3ff691b43cf2997ab68c2344976d Author: Chancel Liu Date: Wed Nov 22 18:19:57 2023 +0800 arm64: dts: imx93: Add audio device nodes Add audio devices nodes including SAI, MICFIL, XCVR and MQS. Signed-off-by: Chancel Liu Signed-off-by: Shawn Guo commit 44482310b7f8ac4cd8fa7be4cee8c1b260ea5ee9 Author: Jagath Jog J Date: Wed Nov 8 09:28:31 2023 +0530 iio: imu: bmi323: Make the local structures static Make the local structures static within their respective driver files. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311070530.qKhLTz1Y-lkp@intel.com/ Signed-off-by: Jagath Jog J Link: https://lore.kernel.org/r/20231108035831.5889-1-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron commit 00799564bafdd73db1bb0482eefbe1aba7d5e15f Author: Shreeya Patel Date: Wed Nov 8 00:50:05 2023 +0530 iio: light: ltrf216a: Return floating point values For better precision of input light intesity, return floating point values through sysfs instead of an integer value Signed-off-by: Shreeya Patel Link: https://lore.kernel.org/r/20231107192005.285534-1-shreeya.patel@collabora.com Signed-off-by: Jonathan Cameron commit 39dac9d0511ff735a4937c5aded7c84aed55f57e Author: Su Hui Date: Mon Oct 30 10:07:53 2023 +0800 iio: imu: inv_mpu6050: return callee's error code rather than -EINVAL regmap_bulk_write()/regmap_bulk_read() return zero or negative error code, return the callee's error code is better than '-EINVAL'. Signed-off-by: Su Hui Link: https://lore.kernel.org/r/20231030020752.67630-1-suhui@nfschina.com Signed-off-by: Jonathan Cameron commit ed73c4f13d5b63acce2b6f8c5e73c465479c4940 Author: Ana-Maria Cusco Date: Mon Nov 13 12:25:34 2023 +0200 iio: amplifiers: hmc425a: add support for ADRF5740 Attenuator This adds support for the Analog Devices ADRF5740 2 dB LSB, 4-Bit, Silicon Digital Attenuator, 10 MHz to 60 GHz. The default (maximum) gain is also set at probe time, with GPIO lines driven high to achieve maximum gain, in contrast to other devices where GPIOs need to be driven low. Signed-off-by: Ana-Maria Cusco Link: https://lore.kernel.org/r/20231113102535.51074-2-anamaria.cuscoo@gmail.com Signed-off-by: Jonathan Cameron commit 79f2ff6461e7dab9d85051498a32bcbd758fe708 Author: Ana-Maria Cusco Date: Mon Nov 13 12:25:35 2023 +0200 dt-bindings: iio: hmc425a: add entry for ADRF5740 Attenuator The ADRF5740 is a silicon, 4-bit digital attenuator with 22 dB attenuation control range in 2 dB steps. Signed-off-by: Ana-Maria Cusco Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231113102535.51074-3-anamaria.cuscoo@gmail.com Signed-off-by: Jonathan Cameron commit 0257e5a3c26b3810831359d39c0821397af8bf29 Author: Wenyu Huang Date: Sat Nov 25 02:05:27 2023 +0000 sched/doc: Update documentation after renames and synchronize Chinese version Update the documentation after these changes, which didn't entirely propagate the changes: e23edc86b09d ("sched/fair: Rename check_preempt_curr() to wakeup_preempt()") 03b7fad167ef ("sched: Add task_struct pointer to sched_class::set_curr_task") 2f88c8e802c8 ("sched/eevdf/doc: Modify the documented knob to base_slice_ns as well") [ mingo: Reworked the changelog. ] Signed-off-by: Wenyu Huang Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org commit dba1b8a7ab6853a84bf3afdbeac1c2f2370d3444 Author: Jesper Dangaard Brouer Date: Fri Nov 24 11:16:52 2023 +0100 mm/page_pool: catch page_pool memory leaks Pages belonging to a page_pool (PP) instance must be freed through the PP APIs in-order to correctly release any DMA mappings and release refcnt on the DMA device when freeing PP instance. When PP release a page (page_pool_release_page) the page->pp_magic value is cleared. This patch detect a leaked PP page in free_page_is_bad() via unexpected state of page->pp_magic value being PP_SIGNATURE. We choose to report and treat it as a bad page. It would be possible to release the page via returning it to the PP instance as the page->pp pointer is likely still valid. Notice this code is only activated when either compiled with CONFIG_DEBUG_VM or boot cmdline debug_pagealloc=on, and CONFIG_PAGE_POOL. Reduced example output of leak with PP_SIGNATURE = dead000000000040: BUG: Bad page state in process swapper/4 pfn:141fa6 page:000000006dbf8062 refcount:0 mapcount:0 mapping:0000000000000000 index:0x141fa6000 pfn:0x141fa6 flags: 0x2fffff80000000(node=0|zone=2|lastcpupid=0x1fffff) page_type: 0xffffffff() raw: 002fffff80000000 dead000000000040 ffff88814888a000 0000000000000000 raw: 0000000141fa6000 0000000000000001 00000000ffffffff 0000000000000000 page dumped because: page_pool leak [...] Call Trace: dump_stack_lvl+0x32/0x50 bad_page+0x70/0xf0 free_unref_page_prepare+0x263/0x430 free_unref_page+0x34/0x130 mlx5e_free_rx_mpwqe+0x190/0x1c0 [mlx5_core] mlx5e_post_rx_mpwqes+0x1ac/0x280 [mlx5_core] mlx5e_napi_poll+0x12b/0x710 [mlx5_core] ? skb_free_head+0x4f/0x90 __napi_poll+0x2b/0x1c0 net_rx_action+0x27b/0x360 The advantage is the Call Trace directly points to the function leaking the PP page, which in this case is an on purpose bug introduced into the mlx5 driver to test this code change. Currently PP will periodically in page_pool_release_retry() printk warning "stalled pool shutdown" which cannot be directly corrolated to leaking and might as well be a false positive due to SKBs being stuck on a socket for an extended period. After this patch we should be able to remove this printk. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 956ec671870506c7e05f4acee6f3fc81bf3575d1 Author: Philipp Hortmann Date: Fri Nov 24 22:31:27 2023 +0100 staging: rtl8192e: Remove function rtl92e_update_rx_pkt_timestamp() mac_time and last_rx_desc_tsf are only used in rtl92e_update_rx_pkt_timestamp(). Depending on a condition one is equal to the other or vice versa. But since those are not used anywhere else the function rtl92e_update_rx_pkt_timestamp() is just dead code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/89a21fa17b32d66e07514bfad5b604d5d4835e25.1700860759.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6ae22b8c5f07e31d2b8d48bc4fb2d56e5db13674 Author: Philipp Hortmann Date: Fri Nov 24 22:31:21 2023 +0100 staging: rtl8192e: Remove unused function HTConstructInfoElement() Remove unused function HTConstructInfoElement(). Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ed49162367b03a848895638adcdfe3594d4219b3.1700860759.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7e0ea2ea439fc2876247ea2ac7a6741e9021d1a4 Author: Philipp Hortmann Date: Fri Nov 24 22:31:15 2023 +0100 staging: rtl8192e: Remove unused function rtllib_probe_resp() Remove unused function rtllib_probe_resp(). Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/be709ffea087df6f960075a51c0eab89f86ef8b2.1700860759.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 55003c4d6ac5346bc04e70a96f294a577cfb3fb4 Author: Philipp Hortmann Date: Fri Nov 24 22:31:08 2023 +0100 staging: rtl8192e: Remove unused function rtllib_get_beacon_() Remove unused function rtllib_get_beacon_(). Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ed825d5fb1946530c310afca1d3f27e46da35f06.1700860759.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 270f40cf35ce8438ffed8b2d3ba6318c50fdf85e Author: Philipp Hortmann Date: Fri Nov 24 22:31:01 2023 +0100 staging: rtl8192e: Remove unused function rtllib_send_beacon() Remove unused function rtllib_send_beacon(). Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/fca983a276ae67dc9cd124e236fe9d210fd997d3.1700860759.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit d7f0b9c251fd6de57170ee922f75ea6e88566f7e Author: Philipp Hortmann Date: Fri Nov 24 22:30:47 2023 +0100 staging: rtl8192e: Remove unused timer beacon_timer Driver does not support AP Mode therefore no beacons need to be send. Remove unused timer beacon_timer. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/b16b6b4525ede8e2a218cb39d23f9ef2a3a745a9.1700860759.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 786b6f5764fffee0da0e8e6d0580278bbb903c11 Author: Philipp Hortmann Date: Fri Nov 24 22:30:39 2023 +0100 staging: rtl8192e: Remove unused function rtllib_get_beacon() Remove unused function rtllib_get_beacon(). Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d76eeb7e273f4fcfec4ae8879e56d237363ebde2.1700860758.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit eca8285c01e1c30e49685bd241bfbb1f7622c927 Author: Philipp Hortmann Date: Fri Nov 24 22:30:23 2023 +0100 staging: rtl8192e: Remove unused interrupt for IMR_BcnInt Driver does not support AP Mode therefore no beacons need to be send. Remove unused interrupt for IMR_BcnInt. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/64a1f672dbe2ed2c6a660fa1044bd058fe3ba91a.1700860758.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 32992c40e2852afc488cfa6512da69ef49dfab43 Author: Gary Rookard Date: Thu Nov 23 09:43:37 2023 -0500 staging: rtl8192e: renamed variable HTIOTActIsMgntUseCCK6M Renamed from Pascal/CamelCase to Snake case the variable HTIOTActIsMgntUseCCK6M. HTIOTActIsMgntUseCCK6M -> ht_iot_act_is_mgnt_use_cck_6m Linux kernel coding style (cleanup), checkpatch Avoid CamelCase. Driver/module rtl8192e compiles. Signed-off-by: Gary Rookard Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231123144337.13112-6-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit d6171fe96f9507be97d9ec8ec41cce5a1b7deca3 Author: Gary Rookard Date: Thu Nov 23 09:43:36 2023 -0500 staging: rtl8192e: renamed variable HTIOTPeerDetermine Renamed from Pascal/CamelCase to Snake case the variable HTIOTPeerDetermine. HTIOTPeerDetermine -> ht_iot_peer_determine Linux kernel coding style (cleanup), checkpatch Avoid CamelCase. Driver/module rtl8192e compiles. Signed-off-by: Gary Rookard Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231123144337.13112-5-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit ea6df150dd4a30d260df6a583e78ec641e023ce7 Author: Gary Rookard Date: Thu Nov 23 09:43:35 2023 -0500 staging: rtl8192e: renamed variable IsHTHalfNmodeAPs Renamed from Pascal/CamelCase to Snake case the variable IsHTHalfNmodeAPs. ISHTHalfNmodeAPs -> is_ht_half_nmode_aps Linux kernel coding style (cleanup), checkpatch Avoid CamelCase. Driver/module rtl8192e compiles. Signed-off-by: Gary Rookard Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231123144337.13112-4-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 55401b86e04a1b0a5cb89556d58297e9040597a3 Author: Gary Rookard Date: Thu Nov 23 09:43:34 2023 -0500 staging: rtl8192e: renamed variable TXCountToDataRate Renamed from Pascal/CamelCase to Snake case the variable TXCountToDataRate. TXCountToDataRate -> tx_count_to_data_rate Linux kernel coding style (cleanup), checkpatch Avoid CamelCase. Driver/module rtl8192e compiles. Signed-off-by: Gary Rookard Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231123144337.13112-3-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit f0a8eb60836cd23b72ae83aa7c3b03a5af8e9191 Author: Gary Rookard Date: Thu Nov 23 09:43:33 2023 -0500 staging: rtl8192e: renamed variable HTMcsToDataRate Renamed variable from Pascal/CamelCase to Snake case the variable HTMcsToDataRate. HTMcsToDataRate -> ht_mcs_to_data_rate Linux Kernel coding style (cleanup), checkpatch Avoid CamelCase. Driver/module rtl8192e compiles. Signed-off-by: Gary Rookard Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231123144337.13112-2-garyrookard@fastmail.org Signed-off-by: Greg Kroah-Hartman commit 50af5d12f7e24b85fc10270d7700f4aa1b20b8e4 Author: Jack Wang Date: Tue Nov 21 14:03:16 2023 +0100 RDMA/IPoIB: Add tx timeout work to recover queue stop situation As we sometime run into TX timeout from IPoIB, queue seems stopped and can't recover. Diff with Mellanox OFED show Mellanox driver has timeout work to recover in such case. Add TX timeout work/NAPI work to recover such case. Also increase the watchdog_timeo to 10 seconds, so more tolerant to error. Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20231121130316.126364-3-jinpu.wang@ionos.com Signed-off-by: Leon Romanovsky commit 753fff78f430704548f45eda52d6d55371a52c0f Author: Jack Wang Date: Tue Nov 21 14:03:15 2023 +0100 RDMA/IPoIB: Fix error code return in ipoib_mcast_join Return the error code in case of ib_sa_join_multicast fail. Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20231121130316.126364-2-jinpu.wang@ionos.com Signed-off-by: Leon Romanovsky commit 1cba275017352ba887058934d23b5c76a3de62ae Author: John Johansen Date: Sun Nov 26 01:02:48 2023 -0800 apparmor: cleanup network hook comments Drop useless partial kernel doc style comments. Finish/update kerneldoc comment where there is useful information Signed-off-by: John Johansen commit 9f1f6111fd5d553ec175c4e81d7ebf6932aaeca0 Author: Ido Schimmel Date: Thu Nov 23 13:01:35 2023 +0100 mlxsw: pci: Fix missing error checking I accidentally removed the error checking after issuing the reset. Restore it. Fixes: f257c73e5356 ("mlxsw: pci: Add support for new reset flow") Reported-by: Coverity Scan Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 2f3ce7a56c6e02bc0b258507f3a82b7511f62f9e Author: Marek Behún Date: Tue Nov 21 18:20:24 2023 +0100 net: sfp: rework the RollBall PHY waiting code RollBall SFP modules allow the access to PHY registers only after a certain time has passed. Until then, the registers read 0xffff. Currently we have quirks for modules where we need to wait either 25 seconds or 4 seconds, but recently I got hands on another module where the wait is even shorter. Instead of hardcoding different wait times, lets rework the code: - increase the PHY retry count to 25 - when RollBall module is detected, increase the PHY retry time from 50ms to 1s Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 07e6de738aa6f0e873463e9ca88bdb7081c4bfd4 Author: Danylo Piliaiev Date: Sat Nov 25 11:11:51 2023 -0800 drm/msm/a690: Fix reg values for a690 KGSL doesn't support a690 so all reg values were the same as on a660. Now we know the values and they are different from the windows driver. This fixes hangs on D3D12 games and some CTS tests. Signed-off-by: Danylo Piliaiev Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/568931/ commit cf1aaa7d4a719f0bdd9c246c0fac8247cb54ddd7 Author: Danylo Piliaiev Date: Sat Nov 25 11:11:50 2023 -0800 drm/msm/a6xx: Add missing BIT(7) to REG_A6XX_UCHE_CLIENT_PF Downstream always set BIT(7) Signed-off-by: Danylo Piliaiev Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/568930/ commit 6ed18323c7d0748883ad74b3f819fb156753bbc9 Author: Lukas Bulwahn Date: Wed Nov 22 08:56:29 2023 +0100 MAINTAINERS: improve section MICROCHIP MCP3564 ADC DRIVER Commit 33ec3e5fc1ea ("iio: adc: adding support for MCP3564 ADC") adds a new iio driver and corresponding MAINTAINERS section. It however uses spaces instead of a single tab for all the entries in that MAINTAINERS section. Although, the get_maintainer.pl script handles spaces instead of tabs silently, the MAINTAINERS will quickly get into a messy state with different indentations throughout the file. So, the checkpatch.pl script complains when spaces instead of a single tab are used. Fix this recently added section using tabs instead of spaces. Further, add the driver's ABI documentation file to this section as well. Fixes: 33ec3e5fc1ea ("iio: adc: adding support for MCP3564 ADC") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20231122075629.21411-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Cameron commit e73fa11a356ca0905c3cc648eaacc6f0f2d2c8b3 Author: Jia Zhu Date: Mon Nov 20 12:14:22 2023 +0800 cachefiles: add restore command to recover inflight ondemand read requests Previously, in ondemand read scenario, if the anonymous fd was closed by user daemon, inflight and subsequent read requests would return EIO. As long as the device connection is not released, user daemon can hold and restore inflight requests by setting the request flag to CACHEFILES_REQ_NEW. Suggested-by: Gao Xiang Signed-off-by: Jia Zhu Signed-off-by: Xin Yin Link: https://lore.kernel.org/r/20231120041422.75170-6-zhujia.zj@bytedance.com Reviewed-by: Jingbo Xu Reviewed-by: David Howells Signed-off-by: Christian Brauner commit b817e22b2e91257ace32a6768c3c003faeaa1c5c Author: Jia Zhu Date: Mon Nov 20 12:14:21 2023 +0800 cachefiles: narrow the scope of triggering EPOLLIN events in ondemand mode Don't trigger EPOLLIN when there are only reopening read requests in xarray. Suggested-by: Xin Yin Signed-off-by: Jia Zhu Link: https://lore.kernel.org/r/20231120041422.75170-5-zhujia.zj@bytedance.com Reviewed-by: Jingbo Xu Reviewed-by: David Howells Signed-off-by: Christian Brauner commit 0a7e54c1959c0feb2de23397ec09c7692364313e Author: Jia Zhu Date: Mon Nov 20 12:14:20 2023 +0800 cachefiles: resend an open request if the read request's object is closed When an anonymous fd is closed by user daemon, if there is a new read request for this file comes up, the anonymous fd should be re-opened to handle that read request rather than fail it directly. 1. Introduce reopening state for objects that are closed but have inflight/subsequent read requests. 2. No longer flush READ requests but only CLOSE requests when anonymous fd is closed. 3. Enqueue the reopen work to workqueue, thus user daemon could get rid of daemon_read context and handle that request smoothly. Otherwise, the user daemon will send a reopen request and wait for itself to process the request. Signed-off-by: Jia Zhu Link: https://lore.kernel.org/r/20231120041422.75170-4-zhujia.zj@bytedance.com Reviewed-by: Jingbo Xu Reviewed-by: David Howells Signed-off-by: Christian Brauner commit 3c5ecfe16e7699011c12c2d44e55437415331fa3 Author: Jia Zhu Date: Mon Nov 20 12:14:19 2023 +0800 cachefiles: extract ondemand info field from cachefiles_object We'll introduce a @work_struct field for @object in subsequent patches, it will enlarge the size of @object. As the result of that, this commit extracts ondemand info field from @object. Signed-off-by: Jia Zhu Link: https://lore.kernel.org/r/20231120041422.75170-3-zhujia.zj@bytedance.com Reviewed-by: Jingbo Xu Reviewed-by: David Howells Signed-off-by: Christian Brauner commit 357a18d033143617e9c7d420c8f0dd4cbab5f34d Author: Jia Zhu Date: Mon Nov 20 12:14:18 2023 +0800 cachefiles: introduce object ondemand state Previously, @ondemand_id field was used not only to identify ondemand state of the object, but also to represent the index of the xarray. This commit introduces @state field to decouple the role of @ondemand_id and adds helpers to access it. Signed-off-by: Jia Zhu Link: https://lore.kernel.org/r/20231120041422.75170-2-zhujia.zj@bytedance.com Reviewed-by: Jingbo Xu Reviewed-by: David Howells Signed-off-by: Christian Brauner commit 74fc96e8d4b3a4f3ceb8d14c99f3e0ef70a0c381 Merge: 29b0b68f25ae6 0ff23d4607186 Author: Mark Brown Date: Sat Nov 25 10:37:48 2023 +0000 ASoC: SOF: ipc4: Add support for control change Merge series from Peter Ujfalusi : This series adds support for handling control (switch/enum) change notifications sent by the firmware. The use case is similar to what is already used by IPC3 version: the firmware can update the value of an enum or switch and sends notification to the kernel, which in turn will notify the user space of a change. commit a8b0026847b8c43445c921ad2c85521c92eb175f Author: Al Viro Date: Mon Nov 20 20:02:11 2023 -0500 rename(): avoid a deadlock in the case of parents having no common ancestor ... and fix the directory locking documentation and proof of correctness. Holding ->s_vfs_rename_mutex *almost* prevents ->d_parent changes; the case where we really don't want it is splicing the root of disconnected tree to somewhere. In other words, ->s_vfs_rename_mutex is sufficient to stabilize "X is an ancestor of Y" only if X and Y are already in the same tree. Otherwise it can go from false to true, and one can construct a deadlock on that. Make lock_two_directories() report an error in such case and update the callers of lock_rename()/lock_rename_child() to handle such errors. And yes, such conditions are not impossible to create ;-/ Reviewed-by: Jan Kara Signed-off-by: Al Viro commit dbd4540df2b2857a91593754275c02f3e415fc30 Author: Al Viro Date: Sun Nov 19 22:21:00 2023 -0500 kill lock_two_inodes() There's only one caller left (lock_two_nondirectories()), and it needs less complexity. Fold lock_two_inodes() in there and simplify. Reviewed-by: Jan Kara Signed-off-by: Al Viro commit 22e111ed6c83dcde3037fc81176012721bc34c0b Author: Al Viro Date: Sun Nov 19 20:25:58 2023 -0500 rename(): fix the locking of subdirectories We should never lock two subdirectories without having taken ->s_vfs_rename_mutex; inode pointer order or not, the "order" proposed in 28eceeda130f "fs: Lock moved directories" is not transitive, with the usual consequences. The rationale for locking renamed subdirectory in all cases was the possibility of race between rename modifying .. in a subdirectory to reflect the new parent and another thread modifying the same subdirectory. For a lot of filesystems that's not a problem, but for some it can lead to trouble (e.g. the case when short directory contents is kept in the inode, but creating a file in it might push it across the size limit and copy its contents into separate data block(s)). However, we need that only in case when the parent does change - otherwise ->rename() doesn't need to do anything with .. entry in the first place. Some instances are lazy and do a tautological update anyway, but it's really not hard to avoid. Amended locking rules for rename(): find the parent(s) of source and target if source and target have the same parent lock the common parent else lock ->s_vfs_rename_mutex lock both parents, in ancestor-first order; if neither is an ancestor of another, lock the parent of source first. find the source and target. if source and target have the same parent if operation is an overwriting rename of a subdirectory lock the target subdirectory else if source is a subdirectory lock the source if target is a subdirectory lock the target lock non-directories involved, in inode pointer order if both source and target are such. That way we are guaranteed that parents are locked (for obvious reasons), that any renamed non-directory is locked (nfsd relies upon that), that any victim is locked (emptiness check needs that, among other things) and subdirectory that changes parent is locked (needed to protect the update of .. entries). We are also guaranteed that any operation locking more than one directory either takes ->s_vfs_rename_mutex or locks a parent followed by its child. Cc: stable@vger.kernel.org Fixes: 28eceeda130f "fs: Lock moved directories" Reviewed-by: Jan Kara Signed-off-by: Al Viro commit 7deee77b993a2234acb123b8ec477bd56f2e3be3 Author: Jan Kara Date: Thu Oct 12 23:14:23 2023 +0200 f2fs: Avoid reading renamed directory if parent does not change The VFS will not be locking moved directory if its parent does not change. Change f2fs rename code to avoid reading renamed directory if its parent does not change. Having it uninlined while we are reading it would cause trouble and we won't be able to rely upon ->i_rwsem on the directory being renamed in cases that do not alter its parent. Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 40dbd071f4b19d9630353c3cd45c2d6adb6799d4 Author: Al Viro Date: Tue Oct 17 14:55:42 2023 -0400 ext4: don't access the source subdirectory content on same-directory rename We can't really afford locking the source on same-directory rename; currently vfs_rename() tries to do that, but it will have to be changed. The logics in ext4 is lazy and goes looking for ".." in source even in same-directory case. It's not hard to get rid of that, leaving that behaviour only for cross-directory case; that VFS can get locks safely (and will keep doing that after the coming changes). Reviewed-by: Jan Kara Signed-off-by: Al Viro commit 7307b73fa5a82661808b5541972176c344978789 Author: Jan Kara Date: Thu Oct 12 23:14:22 2023 +0200 ext2: Avoid reading renamed directory if parent does not change The VFS will not be locking moved directory if its parent does not change. Change ext2 rename code to avoid reading renamed directory if its parent does not change. Although it is currently harmless it is a bad practice to read directory contents without inode->i_rwsem. Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 9d35cebb794bb7be93db76c3383979c7deacfef9 Author: Al Viro Date: Tue Oct 17 14:44:23 2023 -0400 udf_rename(): only access the child content on cross-directory rename We can't really afford locking the source on same-directory rename; currently vfs_rename() tries to do that, but it will have to be changed. The logics in udf_rename() is lazy and goes looking for ".." in source even in same-directory case. It's not hard to get rid of that, leaving that behaviour only for cross-directory case; that VFS can get locks safely (and will keep doing that after the coming changes). Reviewed-by: Jan Kara Signed-off-by: Al Viro commit 9d618d19b29c2943527e3a43da0a35aea91062fc Author: Jan Kara Date: Thu Oct 12 23:14:21 2023 +0200 ocfs2: Avoid touching renamed directory if parent does not change The VFS will not be locking moved directory if its parent does not change. Change ocfs2 rename code to avoid touching renamed directory if its parent does not change as without locking that can corrupt the filesystem. Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 49db9b1b86a82448dfaf3fcfefcf678dee56c8ed Author: Jan Kara Date: Thu Oct 12 23:14:20 2023 +0200 reiserfs: Avoid touching renamed directory if parent does not change The VFS will not be locking moved directory if its parent does not change. Change reiserfs rename code to avoid touching renamed directory if its parent does not change as without locking that can corrupt the filesystem. Signed-off-by: Jan Kara Signed-off-by: Al Viro commit 1b6ae9f6e6c3e3c35aad0f11b116a81780b8aa03 Author: Vegard Nossum Date: Mon Nov 6 14:44:17 2023 +0100 dcache: remove unnecessary NULL check in dget_dlock() dget_dlock() requires dentry->d_lock to be held when called, yet contains a NULL check for dentry. An audit of all calls to dget_dlock() shows that it is never called with a NULL pointer (as spin_lock()/spin_unlock() would crash in these cases): $ git grep -W '\' arch/powerpc/platforms/cell/spufs/inode.c- spin_lock(&dentry->d_lock); arch/powerpc/platforms/cell/spufs/inode.c- if (simple_positive(dentry)) { arch/powerpc/platforms/cell/spufs/inode.c: dget_dlock(dentry); fs/autofs/expire.c- spin_lock_nested(&child->d_lock, DENTRY_D_LOCK_NESTED); fs/autofs/expire.c- if (simple_positive(child)) { fs/autofs/expire.c: dget_dlock(child); fs/autofs/root.c: dget_dlock(active); fs/autofs/root.c- spin_unlock(&active->d_lock); fs/autofs/root.c: dget_dlock(expiring); fs/autofs/root.c- spin_unlock(&expiring->d_lock); fs/ceph/dir.c- if (!spin_trylock(&dentry->d_lock)) fs/ceph/dir.c- continue; [...] fs/ceph/dir.c: dget_dlock(dentry); fs/ceph/mds_client.c- spin_lock(&alias->d_lock); [...] fs/ceph/mds_client.c: dn = dget_dlock(alias); fs/configfs/inode.c- spin_lock(&dentry->d_lock); fs/configfs/inode.c- if (simple_positive(dentry)) { fs/configfs/inode.c: dget_dlock(dentry); fs/libfs.c: found = dget_dlock(d); fs/libfs.c- spin_unlock(&d->d_lock); fs/libfs.c: found = dget_dlock(child); fs/libfs.c- spin_unlock(&child->d_lock); fs/libfs.c: child = dget_dlock(d); fs/libfs.c- spin_unlock(&d->d_lock); fs/ocfs2/dcache.c: dget_dlock(dentry); fs/ocfs2/dcache.c- spin_unlock(&dentry->d_lock); include/linux/dcache.h:static inline struct dentry *dget_dlock(struct dentry *dentry) After taking out the NULL check, dget_dlock() becomes almost identical to __dget_dlock(); the only difference is that dget_dlock() returns the dentry that was passed in. These are static inline helpers, so we can rely on the compiler to discard unused return values. We can therefore also remove __dget_dlock() and replace calls to it by dget_dlock(). Also fix up and improve the kerneldoc comments while we're at it. Al Viro pointed out that we can also clean up some of the callers to make use of the returned value and provided a bit more info for the kerneldoc. While preparing v2 I also noticed that the tabs used in the kerneldoc comments were causing the kerneldoc to get parsed incorrectly so I also fixed this up (including for d_unhashed, which is otherwise unrelated). Testing: x86 defconfig build + boot; make htmldocs for the kerneldoc warning. objdump shows there are code generation changes. Link: https://lore.kernel.org/all/20231022164520.915013-1-vegard.nossum@oracle.com/ Cc: Alexander Viro Cc: Christian Brauner Cc: linux-fsdevel@vger.kernel.org Cc: Nick Piggin Cc: Waiman Long Cc: linux-doc@vger.kernel.org Signed-off-by: Vegard Nossum Signed-off-by: Al Viro commit 1b327b5ac57cf83e3d015de45d0142852f475375 Author: Al Viro Date: Fri Nov 10 14:07:43 2023 -0500 kill DCACHE_MAY_FREE With the new ordering in __dentry_kill() it has become redundant - it's set if and only if both DCACHE_DENTRY_KILLED and DCACHE_SHRINK_LIST are set. We set it in __dentry_kill(), after having set DCACHE_DENTRY_KILLED with the only condition being that DCACHE_SHRINK_LIST is there; all of that is done without dropping ->d_lock and the only place that checks that flag (shrink_dentry_list()) does so under ->d_lock, after having found the victim on its shrink list. Since DCACHE_SHRINK_LIST is set only when placing dentry into shrink list and removed only by shrink_dentry_list() itself, a check for DCACHE_DENTRY_KILLED in there would be equivalent to check for DCACHE_MAY_FREE. Signed-off-by: Al Viro commit 119dcc73a9c2df0da002054cdb2296cb32b7cb93 Merge: ef69f0506d8f3 6367b491c17a3 Author: Al Viro Date: Sat Nov 25 02:51:35 2023 -0500 Merge branches 'work.dcache-misc' and 'work.dcache2' into work.dcache commit ef69f0506d8f3a250ac5baa96746e17ae22c67b5 Author: Al Viro Date: Thu Nov 23 18:11:00 2023 -0500 __d_unalias() doesn't use inode argument ... and hasn't since 2015. Signed-off-by: Al Viro commit f9f677c5f723394170fa838b856602476150948d Author: Al Viro Date: Sun Nov 12 00:38:02 2023 -0500 d_alloc_parallel(): in-lookup hash insertion doesn't need an RCU variant We only search in the damn thing under hlist_bl_lock(); RCU variant of insertion was, IIRC, pretty much cargo-culted - mea culpa... Signed-off-by: Al Viro commit 57851607326a2beef21e67f83f4f53a90df8445a Author: Al Viro Date: Sun Nov 12 21:38:48 2023 -0500 get rid of DCACHE_GENOCIDE ... now that we never call d_genocide() other than from kill_litter_super() Signed-off-by: Al Viro commit 8a54b38f3e5ced6cc4b246b8e54bd0f50deceaa8 Author: Al Viro Date: Sat Nov 11 16:01:27 2023 -0500 d_genocide(): move the extern into fs/internal.h Signed-off-by: Al Viro commit 715cd66aabf96b6cf423590954326799312c6dfa Author: Al Viro Date: Sat Nov 11 15:56:55 2023 -0500 simple_fill_super(): don't bother with d_genocide() on failure Failing ->fill_super() will be followed by ->kill_sb(), which should include kill_litter_super() if the call of simple_fill_super() had been asked to create anything besides the root dentry. So there's no need to empty the partially populated tree - it will be trimmed by inevitable kill_litter_super(). Signed-off-by: Al Viro commit f9453a1ad1fadae29fd7db5ad8ea16f35e737276 Merge: fb7945b484b8a 4a0b33f771db2 Author: Al Viro Date: Sat Nov 25 02:49:52 2023 -0500 Merge branch 'merged-selinux' into work.dcache-misc commit fb7945b484b8a3c1e204c36eb9e4cf99f32141ee Author: Al Viro Date: Sat Nov 18 16:50:29 2023 -0500 nsfs: use d_make_root() Normally d_make_root() is used to create the root dentry of superblock; here we use it for a different purpose, but... idiomatic or not, we need the same operation. Signed-off-by: Al Viro commit 9024b4c96576162a13e58003b0d58e93ebe3ac33 Author: Al Viro Date: Sun Nov 12 00:04:46 2023 -0500 d_alloc_pseudo(): move setting ->d_op there from the (sole) caller Signed-off-by: Al Viro commit f2824db1b49f947ba6e208ddf02edf4b1391480a Author: Al Viro Date: Sat Nov 18 16:42:43 2023 -0500 kill d_instantate_anon(), fold __d_instantiate_anon() into remaining caller now that the only user of d_instantiate_anon() is gone... [braino fix folded - kudos to Dan Carpenter] Signed-off-by: Al Viro commit 6367b491c17a34b28aece294bddfda1a36ec0377 Author: Al Viro Date: Thu Nov 23 17:33:21 2023 -0500 retain_dentry(): introduce a trimmed-down lockless variant fast_dput() contains a small piece of code, preceded by scary comments about 5 times longer than it. What is actually done there is a trimmed-down subset of retain_dentry() - in some situations we can tell that retain_dentry() would have returned true without ever needing ->d_lock and that's what that code checks. If these checks come true fast_dput() can declare that we are done, without bothering with ->d_lock; otherwise it has to take the lock and do full variant of retain_dentry() checks. Trimmed-down variant of the checks is hard to follow and it's asking for trouble - if we ever decide to change the rules in retain_dentry(), we'll have to remember to update that code. It turns out that an equivalent variant of these checks more obviously parallel to retain_dentry() is not just possible, but easy to unify with retain_dentry() itself, passing it a new boolean argument ('locked') to distinguish between the full semantics and trimmed down one. Note that in lockless case true is returned only when locked variant would have returned true without ever needing the lock; false means "punt to the locking path and recheck there". Signed-off-by: Al Viro commit 1c18edd1b7a068e07fed7f00e059f22ed67c04c9 Author: Al Viro Date: Tue Nov 7 16:14:08 2023 -0500 __dentry_kill(): new locking scheme Currently we enter __dentry_kill() with parent (along with the victim dentry and victim's inode) held locked. Then we mark dentry refcount as dead call ->d_prune() remove dentry from hash remove it from the parent's list of children unlock the parent, don't need it from that point on detach dentry from inode, unlock dentry and drop the inode (via ->d_iput()) call ->d_release() regain the lock on dentry check if it's on a shrink list (in which case freeing its empty husk has to be left to shrink_dentry_list()) or not (in which case we can free it ourselves). In the former case, mark it as an empty husk, so that shrink_dentry_list() would know it can free the sucker. drop the lock on dentry ... and usually the caller proceeds to drop a reference on the parent, possibly retaking the lock on it. That is painful for a bunch of reasons, starting with the need to take locks out of order, but not limited to that - the parent of positive dentry can change if we drop its ->d_lock, so getting these locks has to be done with care. Moreover, as soon as dentry is out of the parent's list of children, shrink_dcache_for_umount() won't see it anymore, making it appear as if the parent is inexplicably busy. We do work around that by having shrink_dentry_list() decrement the parent's refcount first and put it on shrink list to be evicted once we are done with __dentry_kill() of child, but that may in some cases lead to ->d_iput() on child called after the parent got killed. That doesn't happen in cases where in-tree ->d_iput() instances might want to look at the parent, but that's brittle as hell. Solution: do removal from the parent's list of children in the very end of __dentry_kill(). As the result, the callers do not need to lock the parent and by the time we really need the parent locked, dentry is negative and is guaranteed not to be moved around. It does mean that ->d_prune() will be called with parent not locked. It also means that we might see dentries in process of being torn down while going through the parent's list of children; those dentries will be unhashed, negative and with refcount marked dead. In practice, that's enough for in-tree code that looks through the list of children to do the right thing as-is. Out-of-tree code might need to be adjusted. Calling conventions: __dentry_kill(dentry) is called with dentry->d_lock held, along with ->i_lock of its inode (if any). It either returns the parent (locked, with refcount decremented to 0) or NULL (if there'd been no parent or if refcount decrement for parent hadn't reached 0). lock_for_kill() is adjusted for new requirements - it doesn't touch the parent's ->d_lock at all. Callers adjusted. Note that for dput() we don't need to bother with fast_dput() for the parent - we just need to check retain_dentry() for it, since its ->d_lock is still held since the moment when __dentry_kill() had taken it to remove the victim from the list of children. The kludge with early decrement of parent's refcount in shrink_dentry_list() is no longer needed - shrink_dcache_for_umount() sees the half-killed dentries in the list of children for as long as they are pinning the parent. They are easily recognized and accounted for by select_collect(), so we know we are not done yet. As the result, we always have the expected ordering for ->d_iput()/->d_release() vs. __dentry_kill() of the parent, no exceptions. Moreover, the current rules for shrink lists (one must make sure that shrink_dcache_for_umount() won't happen while any dentries from the superblock in question are on any shrink lists) are gone - shrink_dcache_for_umount() will do the right thing in all cases, taking such dentries out. Their empty husks (memory occupied by struct dentry itself + its external name, if any) will remain on the shrink lists, but they are no obstacles to filesystem shutdown. And such husks will get freed as soon as shrink_dentry_list() of the list they are on gets to them. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit b4cc0734d25746d402db3baa6082d19109bca951 Author: Al Viro Date: Fri Nov 3 14:46:14 2023 -0400 d_prune_aliases(): use a shrink list Instead of dropping aliases one by one, restarting, etc., just collect them into a shrink list and kill them off in one pass. We don't really need the restarts - one alias can't pin another (directory has only one alias, and couldn't be its own ancestor anyway), so collecting everything that is not busy and taking it out would take care of everything evictable that had been there as we entered the function. And new aliases added while we'd been dropping old ones could just as easily have appeared right as we return to caller... Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit f5c8a8a4b6c90f2160de6b580fa672b4afc15061 Author: Al Viro Date: Mon Oct 30 21:07:34 2023 -0400 switch select_collect{,2}() to use of to_shrink_list() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit c2e5e29f3fdaff6f57795be068ce525c60954fd0 Author: Al Viro Date: Mon Oct 30 01:06:06 2023 -0400 to_shrink_list(): call only if refcount is 0 The only thing it does if refcount is not zero is d_lru_del(); no point, IMO, seeing that plain dput() does nothing of that sort... Note that 2 of 3 current callers are guaranteed that refcount is 0. Acked-by: Christian Brauner Signed-off-by: Al Viro commit 5e7a5c8d17d94216aed205cb0f20cd32adfd4487 Author: Al Viro Date: Tue Oct 31 01:41:22 2023 -0400 fold dentry_kill() into dput() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 339e9e13530ba750fe0868c5e51bc23be07fd1f1 Author: Al Viro Date: Tue Oct 31 01:23:47 2023 -0400 don't try to cut corners in shrink_lock_dentry() That is to say, do *not* treat the ->d_inode or ->d_parent changes as "it's hard, return false; somebody must have grabbed it, so even if has zero refcount, we don't need to bother killing it - final dput() from whoever grabbed it would've done everything". First of all, that is not guaranteed. It might have been dropped by shrink_kill() handling of victim's parent, which would've found it already on a shrink list (ours) and decided that they don't need to put it on their shrink list. What's more, dentry_kill() is doing pretty much the same thing, cutting its own set of corners (it assumes that dentry can't go from positive to negative, so its inode can change but only once and only in one direction). Doing that right allows to get rid of that not-quite-duplication and removes the only reason for re-incrementing refcount before the call of dentry_kill(). Replacement is called lock_for_kill(); called under rcu_read_lock and with ->d_lock held. If it returns false, dentry has non-zero refcount and the same locks are held. If it returns true, dentry has zero refcount and all locks required by __dentry_kill() are taken. Part of __lock_parent() had been lifted into lock_parent() to allow its reuse. Now it's called with rcu_read_lock already held and dentry already unlocked. Note that this is not the final change - locking requirements for __dentry_kill() are going to change later in the series and the set of locks taken by lock_for_kill() will be adjusted. Both lock_parent() and __lock_parent() will be gone once that happens. Signed-off-by: Al Viro commit f05441c7e16e6a720cf24e08999661a76ff77478 Author: Al Viro Date: Tue Oct 31 00:45:40 2023 -0400 fold the call of retain_dentry() into fast_dput() Calls of retain_dentry() happen immediately after getting false from fast_dput() and getting true from retain_dentry() is treated the same way as non-zero refcount would be treated by fast_dput() - unlock dentry and bugger off. Doing that in fast_dput() itself is simpler. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 2f42f1eb9093834b635991c70d0273fbe249eabf Author: Al Viro Date: Mon Oct 30 01:09:50 2023 -0400 Call retain_dentry() with refcount 0 Instead of bumping it from 0 to 1, calling retain_dentry(), then decrementing it back to 0 (with ->d_lock held all the way through), just leave refcount at 0 through all of that. It will have a visible effect for ->d_delete() - now it can be called with refcount 0 instead of 1 and it can no longer play silly buggers with dropping/regaining ->d_lock. Not that any in-tree instances tried to (it's pretty hard to get right). Any out-of-tree ones will have to adjust (assuming they need any changes). Note that we do not need to extend rcu-critical area here - we have verified that refcount is non-negative after having grabbed ->d_lock, so nobody will be able to free dentry until they get into __dentry_kill(), which won't happen until they manage to grab ->d_lock. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit b06c684d3984ef64e792ec3e89889c96cab97b5e Author: Al Viro Date: Tue Oct 31 00:23:35 2023 -0400 dentry_kill(): don't bother with retain_dentry() on slow path We have already checked it and dentry used to look not worthy of keeping. The only hard obstacle to evicting dentry is non-zero refcount; everything else is advisory - e.g. memory pressure could evict any dentry found with refcount zero. On the slow path in dentry_kill() we had dropped and regained ->d_lock; we must recheck the refcount, but everything else is not worth bothering with. Note that filesystem can not count upon ->d_delete() being called for dentry - not even once. Again, memory pressure (as well as d_prune_aliases(), or attempted rmdir() of ancestor, or...) will not call ->d_delete() at all. So from the correctness point of view we are fine doing the check only once. And it makes things simpler down the road. Signed-off-by: Al Viro commit ee0c82503dcd0d14cc1ad53da18d32a04f612c4c Author: Al Viro Date: Sun Oct 29 18:38:27 2023 -0400 __dentry_kill(): get consistent rules for victim's refcount Currently we call it with refcount equal to 1 when called from dentry_kill(); all other callers have it equal to 0. Make it always be called with zero refcount; on this step we just decrement it before the calls in dentry_kill(). That is safe, since all places that care about the value of refcount either do that under ->d_lock or hold a reference to dentry in question. Either is sufficient to prevent observing a dentry immediately prior to __dentry_kill() getting called from dentry_kill(). Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit e9d130d05077e71b1224ad96e419f5f5512b8574 Author: Al Viro Date: Sun Oct 29 19:09:11 2023 -0400 make retain_dentry() neutral with respect to refcounting retain_dentry() used to decrement refcount if and only if it returned true. Lift those decrements into the callers. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 6511f6be777f3b06e904c7407fd9f2a39dae8b67 Author: Al Viro Date: Mon Oct 30 00:43:48 2023 -0400 __dput_to_list(): do decrement of refcount in the callers ... and rename it to to_shrink_list(), seeing that it no longer does dropping any references Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 15f23734a1def3b22ba790bbf9f0d01949aae231 Author: Al Viro Date: Mon Oct 30 00:11:58 2023 -0400 fast_dput(): new rules for refcount By now there is only one place in entire fast_dput() where we return false; that happens after refcount had been decremented and found (under ->d_lock) to be zero. In that case, just prior to returning false to caller, fast_dput() forcibly changes the refcount from 0 to 1. Lift that resetting refcount to 1 into the callers; later in the series it will be massaged out of existence. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 504e08cebe1d4e1efe25f915234f646e74a364a8 Author: Al Viro Date: Wed Nov 1 01:08:54 2023 -0400 fast_dput(): handle underflows gracefully If refcount is less than 1, we should just warn, unlock dentry and return true, so that the caller doesn't try to do anything else. Taking care of that leaves the rest of "lockref_put_return() has failed" case equivalent to "decrement refcount and rejoin the normal slow path after the point where we grab ->d_lock". NOTE: lockref_put_return() is strictly a fastpath thing - unlike the rest of lockref primitives, it does not contain a fallback. Caller (and it looks like fast_dput() is the only legitimate one in the entire kernel) has to do that itself. Reasons for lockref_put_return() failures: * ->d_lock held by somebody * refcount <= 0 * ... or an architecture not supporting lockref use of cmpxchg - sparc, anything non-SMP, config with spinlock debugging... We could add a fallback, but it would be a clumsy API - we'd have to distinguish between: (1) refcount > 1 - decremented, lock not held on return (2) refcount < 1 - left alone, probably no sense to hold the lock (3) refcount is 1, no cmphxcg - decremented, lock held on return (4) refcount is 1, cmphxcg supported - decremented, lock *NOT* held on return. We want to return with no lock held in case (4); that's the whole point of that thing. We very much do not want to have the fallback in case (3) return without a lock, since the caller might have to retake it in that case. So it wouldn't be more convenient than doing the fallback in the caller and it would be very easy to screw up, especially since the test coverage would suck - no way to test (3) and (4) on the same kernel build. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 15220fbf187100e1cc1ad553b7d21633bdc27e76 Author: Al Viro Date: Mon Oct 30 00:02:14 2023 -0400 fast_dput(): having ->d_delete() is not reason to delay refcount decrement ->d_delete() is a way for filesystem to tell that dentry is not worth keeping cached. It is not guaranteed to be called every time a dentry has refcount drop down to zero; it is not guaranteed to be called before dentry gets evicted. In other words, it is not suitable for any kind of keeping track of dentry state. None of the in-tree filesystems attempt to use it that way, fortunately. So the contortions done by fast_dput() (as well as dentry_kill()) are not warranted. fast_dput() certainly should treat having ->d_delete() instance as "can't assume we'll be keeping it", but that's not different from the way we treat e.g. DCACHE_DONTCACHE (which is rather similar to making ->d_delete() returns true when called). Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit cd9f84f35c2eaaf4da7e111021b604662326d8aa Author: Al Viro Date: Mon Oct 30 13:57:12 2023 -0400 shrink_dentry_list(): no need to check that dentry refcount is marked dead ... we won't see DCACHE_MAY_FREE on anything that is *not* dead and checking d_flags is just as cheap as checking refcount. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 3fcf535626a44e107e2d536a2c43da0fb5bde121 Author: Al Viro Date: Tue Nov 7 15:21:33 2023 -0500 centralize killing dentry from shrink list new helper unifying identical bits of shrink_dentry_list() and shring_dcache_for_umount() Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit da549bdd15c295c24b2ee7ffe7ad0f3877fa8a87 Author: Al Viro Date: Tue Nov 7 02:00:39 2023 -0500 dentry: switch the lists of children to hlist Saves a pointer per struct dentry and actually makes the things less clumsy. Cleaned the d_walk() and dcache_readdir() a bit by use of hlist_for_... iterators. A couple of new helpers - d_first_child() and d_next_sibling(), to make the expressions less awful. Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit b31559f8e471f402cd71117f35b9cde52d192138 Author: Al Viro Date: Tue Nov 7 12:35:37 2023 -0500 coda_flag_children(): cope with dentries turning negative ->d_lock on parent does not stabilize ->d_inode of child. We don't do much with that inode in there, but we need at least to avoid struct inode getting freed under us... [rcu_read_lock() is not needed here, since parent's ->d_lock provides an rcu-critical area] Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit ab58841ab9fca536e5579312d7b46cbc4822e29c Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:54 2023 +0100 tty: srmcons: use 'buf' directly in srmcons_do_write() There is no need to have a separate iterator ('cur') through 'buf' in srmcons_do_write(). 'buf' can be used directly which simplifies the code a bit. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: linux-alpha@vger.kernel.org Reviewed-by: Richard Henderson Link: https://lore.kernel.org/r/20231121092258.9334-14-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2bf93a48ccaace03e29b87cc92e369cade23d15a Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:53 2023 +0100 tty: nozomi: remove unused debugging DUMP() DUMP()'s only use is commented out. Remove the macro completely along with this unused use. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231121092258.9334-13-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7588b0820354694f4e3a2fbadc4d39176ee221aa Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:52 2023 +0100 tty: hvc_console: use flexible array for outbuf This means: * move outbuf to the end of struct hvc_struct and convert from pointer to flexible array (the structure is smaller now) * use struct_size() at the allocation site * align outbuf in the struct instead of ALIGN() at kzalloc() And apart from the above, use u8 instead of char (which are the same thanks to -funsigned-char). The former is now preferred over the latter. It makes the code easier to understand. Signed-off-by: "Jiri Slaby (SUSE)" Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20231121092258.9334-12-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4ccef1f142effe765a130c7b020c36eec6bd2a31 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:51 2023 +0100 tty: hso: don't initialize global serial_table 'serial_table' is global, so there is no need to initialize it to NULLs at the module load. Drop this unneeded for loop. Signed-off-by: "Jiri Slaby (SUSE)" Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-usb@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20231121092258.9334-11-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit e4b3cd3b6a0d79857d561af999451fc958457dee Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:50 2023 +0100 tty: hso: don't emit load/unload info to the log It's preferred NOT to emit anything during the module load and unload (in case the un/load was successful). So drop these prints from hso along with global 'version'. It even contains no version after all. Signed-off-by: "Jiri Slaby (SUSE)" Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: linux-usb@vger.kernel.org Cc: netdev@vger.kernel.org Acked-by: Jakub Kicinski Link: https://lore.kernel.org/r/20231121092258.9334-10-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7cf61de7f748e6f2b6091e3b35a4ddb307193fa8 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:49 2023 +0100 tty: goldfish: drop unneeded temporary variables We can pass 'buf' directly to goldfish_tty_rw() using simple (unsigned long) cast. There is no need to obfuscate the code by another variable with double casts. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231121092258.9334-9-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9d3e3301ae9958809b4d96787eaf76221c704ed6 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:48 2023 +0100 tty: ehv_bytecha: use memcpy_and_pad() in local_ev_byte_channel_send() There is a helper for memcpy(buffer)+memset(the_rest). Use it for simplicity. And add a comment why we are doing the copy in the first place. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Laurentiu Tudor Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20231121092258.9334-8-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 73b2ed3675697f1b20d5fa3408397c65a2cbc13e Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:47 2023 +0100 tty: amiserial: use bool and rename overrun flag in receive_chars() 'oe' is a yes-no flag, switch it to boolean. And rename to overrun. All for the code to be more obvious. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231121092258.9334-7-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit c35e6ec1f3138c15cfd746f61feb8d789d1e8fb1 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:46 2023 +0100 tty: amiserial: return from receive_chars() without goto The 'out' label is just before 'return'. So return immediately and drop both the label and the return. This makes the code more straightforward. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231121092258.9334-6-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 239123e7e8ec4d35c8591c48f5de44925a88391d Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:45 2023 +0100 tty: move locking docs out of Returns for functions in tty.h Both tty_kref_get() and tty_get_baud_rate() note about locking in their Return kernel-doc clause. Extract this info into a separate "Locking" paragraph -- the same as we do for other tty functions. Signed-off-by: "Jiri Slaby (SUSE)" Suggested-by: Ilpo Järvinen Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231121092258.9334-5-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit d22d53ad8ae8414c547c24de0b828a622fc45ea1 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:43 2023 +0100 tty: remove unneeded mbz from tiocsti() 'mbz' in tiocsti() is used only to pass TTY_NORMAL to tty_ldisc_ops::receive_buf(). But that can be achieved easier by simply passing NULL to ::receive_buf(). So drop this 'mbz'. Signed-off-by: "Jiri Slaby (SUSE)" Link: https://lore.kernel.org/r/20231121092258.9334-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4c74253b831e5a8eb87d4d8d4a0eae40c331e682 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:42 2023 +0100 tty: deprecate tty_write_message() tty_write_message() has only one user: quotas. In particular, there the use depends on CONFIG_PRINT_QUOTA_WARNING. And that is deprecated and marked as BROKEN already too. So make tty_write_message() dependent on that very config option. This action in fact drops tty_write_message() from the vmlinux binary. Good riddance. Signed-off-by: "Jiri Slaby (SUSE)" Cc: Jan Kara Acked-by: Jan Kara Link: https://lore.kernel.org/r/20231121092258.9334-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 358779dd18c1e8531bd6d78c19ed802958d7c677 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 10:22:44 2023 +0100 tty: fix tty_operations types in documentation Commits 95713967ba52 ("tty: make tty_operations::write()'s count size_t") and dcaafbe6ee3b ("tty: propagate u8 data to tty_operations::put_char()") changed types of characters to u8, but omitted to fix the documentation. Fix the latter now. Signed-off-by: Jiri Slaby (SUSE) Link: https://lore.kernel.org/r/20231121092258.9334-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1be5f0819c1adc8308ecdc248314c5f30c994452 Author: Hugo Villeneuve Date: Wed Nov 22 12:59:56 2023 -0500 serial: max310x: change confusing comment about Tx FIFO The comment wording can be confusing, as txlen will return the number of bytes available in the FIFO, which can be less than the maximum theoretical Tx FIFO size. Change the comment so that it is unambiguous. Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231122175957.3875102-1-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit fffa35a25b4ced5ec89b1c12cf6a4f1d9541d3cb Author: Hugo Villeneuve Date: Wed Nov 22 12:58:59 2023 -0500 serial: sc16is7xx: change confusing comment about Tx FIFO The comment wording can be confusing, as txlen will return the number of bytes available in the FIFO, which can be less than the maximum theoretical Tx FIFO size. Change the comment so that it is unambiguous. Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231122175859.3874753-1-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 45a3a8ef81291b63a2b50a1a145857dd9fc05e89 Author: Tony Lindgren Date: Mon Nov 13 10:07:53 2023 +0200 serial: core: Revert checks for tx runtime PM state This reverts commit 81a61051e0ce5fd7e09225c0d5985da08c7954a7. With tty and serdev controller moved to be children of the serial core port device, runtime PM usage count of the serdev controller now propagates to the serial hardware controller parent device as expected. Cc: Maximilian Luz Cc: Rob Herring Signed-off-by: Tony Lindgren Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231113080758.30346-2-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit b286f4e87e325b76789f30337c98ba72e00532e2 Author: Tony Lindgren Date: Mon Nov 13 10:07:52 2023 +0200 serial: core: Move tty and serdev to be children of serial core port device Let's move tty and serdev controller to be children of the serial core port device. This way the runtime PM usage count of a child device propagates to the serial hardware device. The tty and serdev devices are associated with a specific serial port of a serial hardware controller device, and we now have serial core hierarchy of controllers and ports. The tty device moves happily with just a change of the parent device and update of device_find_child() handling. The serdev device init needs some changes to separate the serial hardware controller device from the parent device. With this change the tty devices move under sysfs similar to this x86_64 qemu example of a diff of "find /sys -name ttyS*": /sys/class/tty/ttyS0 /sys/class/tty/ttyS3 /sys/class/tty/ttyS1 -/sys/devices/pnp0/00:04/tty/ttyS0 -/sys/devices/platform/serial8250/tty/ttyS2 -/sys/devices/platform/serial8250/tty/ttyS3 -/sys/devices/platform/serial8250/tty/ttyS1 +/sys/devices/pnp0/00:04/00:04:0/00:04:0.0/tty/ttyS0 +/sys/devices/platform/serial8250/serial8250:0/serial8250:0.3/tty/ttyS3 +/sys/devices/platform/serial8250/serial8250:0/serial8250:0.1/tty/ttyS1 +/sys/devices/platform/serial8250/serial8250:0/serial8250:0.2/tty/ttyS2 If a serdev device is used instead of a tty, it moves in a similar way. Suggested-by: Johan Hovold Cc: Maximilian Luz Cc: Rob Herring Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20231113080758.30346-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit 39ff20f5fd4481c9acf3b75c7b705b1ec6604588 Author: Tomas Mudrunka Date: Mon Nov 20 12:14:51 2023 +0100 /proc/sysrq-trigger: accept multiple keys at once This way we can do: `echo _reisub > /proc/sysrq-trigger` Instead of: `for i in r e i s u b; do echo "$i" > /proc/sysrq-trigger; done;` This can be very useful when trying to execute sysrq combo remotely or from userspace. When sending keys in multiple separate writes, userspace (eg. bash or ssh) can be killed before whole combo is completed. Therefore putting all keys in single write is more robust approach. Signed-off-by: Tomas Mudrunka Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20231120111451.527952-1-tomas.mudrunka@gmail.com Signed-off-by: Greg Kroah-Hartman commit 01c33b813864ca15a9dec22045ce1a5bb09d5e74 Author: Manikanta Guntupalli Date: Thu Nov 16 19:10:03 2023 +0530 serial: uartlite: Use dynamic allocation for major number when uart ports > 4 Device number 204 has a range of minors on major number. uart_register_driver is failing due to lack of minor numbers when more number of uart ports used. So, to avoid minor number limitation on 204 major number use dynamic major allocation when more than 4 uart ports used otherwise use static major allocation. https://docs.kernel.org/arch/arm/sa1100/serial_uart.html Signed-off-by: Manikanta Guntupalli Link: https://lore.kernel.org/r/20231116134003.3762725-3-manikanta.guntupalli@amd.com Signed-off-by: Greg Kroah-Hartman commit 0be916a68c8ada0c98d4c14058717175a367ee87 Author: Manikanta Guntupalli Date: Thu Nov 16 19:10:02 2023 +0530 Documentation: devices.txt: Update ttyUL major number allocation details Describe when uartlite driver uses static/dynamic allocation for major number based on maximum number of uartlite serial ports. Signed-off-by: Manikanta Guntupalli Link: https://lore.kernel.org/r/20231116134003.3762725-2-manikanta.guntupalli@amd.com Signed-off-by: Greg Kroah-Hartman commit e651faa2fba4d387aa00b3c02e9c10232852d2ef Author: Philipp Stanner Date: Fri Nov 3 12:12:08 2023 +0100 drivers/tty/vt: use standard array-copy-functions tty/vt currently uses memdup_user() and vmemdup_array_user() to copy userspace arrays. Whereas there is no danger of overflowing, the call to vmemdup_user() currently utilizes array_size() to calculate the array size nevertheless. This is not useful because array_size() would return SIZE_MAX and pass it to vmemdup_user() in case of (the impossible) overflow. string.h from the core-API now provides the wrappers memdup_array_user() and vmemdup_array_user() to copy userspace arrays in a standardized manner. Additionally, they also perform generic overflow-checks. Use these wrappers to make it more obvious and readable that arrays are being copied. As we are at it, remove two unnecessary empty lines. Suggested-by: Dave Airlie Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20231103111207.74621-2-pstanner@redhat.com Signed-off-by: Greg Kroah-Hartman commit 727e08b1a56a60ee9b68ae5c7539cbcfe2cfe552 Author: Uwe Kleine-König Date: Fri Nov 17 11:12:37 2023 +0100 serial: xilinx_uartps: Fix kernel doc about .remove()'s return code Since the driver was converted to use .remove_new() the return function doesn't return a value any more. So remove the obsolete documentation about the return value. Reported-by: Michal Simek Signed-off-by: Uwe Kleine-König Acked-by: Michal Simek Link: https://lore.kernel.org/r/20231117101236.878008-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 38f922a563aac3148ac73e73689805917f034cb5 Author: Luben Tuikov Date: Wed Nov 22 22:08:48 2023 -0500 drm/sched: Reverse run-queue priority enumeration Reverse run-queue priority enumeration such that the higest priority is now 0, and for each consecutive integer the prioirty diminishes. Run-queues correspond to priorities. To an external observer a scheduler created with a single run-queue, and another created with DRM_SCHED_PRIORITY_COUNT number of run-queues, should always schedule sched->sched_rq[0] with the same "priority", as that index run-queue exists in both schedulers, i.e. a scheduler with one run-queue or many. This patch makes it so. In other words, the "priority" of sched->sched_rq[n], n >= 0, is the same for any scheduler created with any allowable number of run-queues (priorities), 0 to DRM_SCHED_PRIORITY_COUNT. Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Danilo Krummrich Cc: Alex Deucher Cc: Christian König Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Luben Tuikov Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20231124052752.6915-6-ltuikov89@gmail.com commit fe375c74806dbd30b00ec038a80a5b7bf4653ab7 Author: Luben Tuikov Date: Tue Nov 14 20:40:58 2023 -0500 drm/sched: Rename priority MIN to LOW Rename DRM_SCHED_PRIORITY_MIN to DRM_SCHED_PRIORITY_LOW. This mirrors DRM_SCHED_PRIORITY_HIGH, for a list of DRM scheduler priorities in ascending order, DRM_SCHED_PRIORITY_LOW, DRM_SCHED_PRIORITY_NORMAL, DRM_SCHED_PRIORITY_HIGH, DRM_SCHED_PRIORITY_KERNEL. Cc: Rob Clark Cc: Abhinav Kumar Cc: Dmitry Baryshkov Cc: Danilo Krummrich Cc: Alex Deucher Cc: Christian König Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Luben Tuikov Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20231124052752.6915-5-ltuikov89@gmail.com commit 2bbe6ab2be53858507f11f99f856846d04765ae3 Author: Luben Tuikov Date: Wed Nov 22 23:58:53 2023 -0500 drm/sched: Fix bounds limiting when given a malformed entity If we're given a malformed entity in drm_sched_entity_init()--shouldn't happen, but we verify--with out-of-bounds priority value, we set it to an allowed value. Fix the expression which sets this limit. Signed-off-by: Luben Tuikov Fixes: 56e449603f0ac5 ("drm/sched: Convert the GPU scheduler to variable number of run-queues") Link: https://patchwork.freedesktop.org/patch/msgid/20231123122422.167832-2-ltuikov89@gmail.com Reviewed-by: Christian König Link: https://lore.kernel.org/r/dbb91dbe-ef77-4d79-aaf9-2adb171c1d7a@amd.com commit 6bae38ddd3a8dffbc35d6c637f58c3710f65d54e Merge: f38d4eda25e29 56610811cccd0 Author: Martin K. Petersen Date: Fri Nov 24 21:24:38 2023 -0500 Merge patch series "scsi: arcmsr: support Areca ARC-1688 Raid controller" Driver update from ching Huang . Signed-off-by: Martin K. Petersen commit 56610811cccd04c94c9d347f271cdff63c9dc19d Author: ching Huang Date: Mon Oct 2 17:54:20 2023 +0800 scsi: arcmsr: Update driver version to v1.51.00.14-20230915 Signed-off-by: ching Huang Link: https://lore.kernel.org/r/514898a472dfdf0502afe27d127ed5145a1fb915.camel@areca.com.tw Signed-off-by: Martin K. Petersen commit 41c8a1a1e90fa4721f856bf3cf71211fd16d6434 Author: ching Huang Date: Mon Oct 2 17:50:27 2023 +0800 scsi: arcmsr: Support new PCI device IDs 1883 and 1886 Add support for Areca RAID controllers with PCI device IDs 1883 and 1886. Signed-off-by: ching Huang Link: https://lore.kernel.org/r/7732e743eaad57681b1552eec9c6a86c76dbe459.camel@areca.com.tw Signed-off-by: Martin K. Petersen commit 14ef4b001ae77bd6bf8c22b3de255701c23591eb Author: ching Huang Date: Mon Oct 2 17:42:19 2023 +0800 scsi: arcmsr: Support new RAID controller ARC-1688 Add support for new Areca RAID controller ARC-1688 Signed-off-by: ching Huang Link: https://lore.kernel.org/r/110bdc873497d3d5e090b908fb159b6155bb3a2b.camel@areca.com.tw Signed-off-by: Martin K. Petersen commit 53775da0b4768cd7e603d7ac1ad706c383c6f61e Merge: 3a767b482cacd a066f906ba396 Author: Jakub Kicinski Date: Fri Nov 24 18:09:19 2023 -0800 Merge branch 'firmware_loader' Kory says: ==================== This patch was initially submitted as part of a net patch series. Conor expressed interest in using it in a different subsystem. https://lore.kernel.org/netdev/20231116-feature_poe-v1-7-be48044bf249@bootlin.com/ Consequently, I extracted it from the series and submitted it separately. I first tried to send it to driver-core but it seems also not the best choice: https://lore.kernel.org/lkml/2023111720-slicer-exes-7d9f@gregkh/ ==================== Signed-off-by: Jakub Kicinski commit a066f906ba396ab00d4af19fc5fad42b2605582a Author: Kory Maincent Date: Wed Nov 22 14:52:43 2023 +0100 firmware_loader: Expand Firmware upload error codes with firmware invalid error No error code are available to signal an invalid firmware content. Drivers that can check the firmware content validity can not return this specific failure to the user-space Expand the firmware error code with an additional code: - "firmware invalid" code which can be used when the provided firmware is invalid Sync lib/test_firmware.c file accordingly. Acked-by: Luis Chamberlain Acked-by: Greg Kroah-Hartman Signed-off-by: Kory Maincent Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20231122-feature_firmware_error_code-v3-1-04ec753afb71@bootlin.com Signed-off-by: Jakub Kicinski commit f38d4eda25e29f4690545200f79bee202cc05626 Author: Abhinav Singh Date: Fri Nov 10 03:20:49 2023 +0530 scsi: dc395x: Fix warning using plain integer as NULL Sparse static analysis tool generates a warning with this message "Using plain integer as NULL pointer". Fix it. Signed-off-by: Abhinav Singh Link: https://lore.kernel.org/r/20231109215049.1466431-1-singhabhinav9051571833@gmail.com Signed-off-by: Martin K. Petersen commit 130fbf45f4be43944975b2e76988dbb0ff2c82d3 Merge: db80df77025ee b4d94164ff321 Author: Martin K. Petersen Date: Fri Nov 24 20:55:24 2023 -0500 Merge patch series "mpi3mr: Add support for Broadcom SAS5116 IO/RAID controllers" Sumit Saxena says: These patches add support for Broadcom's SAS5116 IO/RAID controllers in mpi3mr driver. Link: https://lore.kernel.org/r/20231123160132.4155-1-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit b4d94164ff321f271c9c2d6c07676ce58f0a2c28 Author: Sumit Saxena Date: Thu Nov 23 21:31:32 2023 +0530 scsi: mpi3mr: driver version upgrade to 8.5.0.0.50 Update driver version to 8.5.0.0.50. Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20231123160132.4155-6-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit 1193a89d2b6d2673fc2d1f27f8873f02e91e2aab Author: Sumit Saxena Date: Thu Nov 23 21:31:31 2023 +0530 scsi: mpi3mr: Add support for status reply descriptor Inform controller firmware that driver supports status reply descriptor. Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20231123160132.4155-5-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit cb5b60894602b12a63d3e08be88eaf26b2603c19 Author: Sumit Saxena Date: Thu Nov 23 21:31:30 2023 +0530 scsi: mpi3mr: Increase maximum number of PHYs to 64 from 32 SAS5116 controllers supports maximum 48 physical PHYs. Modify driver to accommodate up to 64 PHYs (though current need is to support 48 PHYs). Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20231123160132.4155-4-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit c9260ff28ee561fca5f96425c9328a9698e8427b Author: Sumit Saxena Date: Thu Nov 23 21:31:29 2023 +0530 scsi: mpi3mr: Add PCI checks where SAS5116 diverges from SAS4116 Add PCI IDs checks for the cases where SAS5116 diverges from SAS4116 in behavior. Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20231123160132.4155-3-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit 6fa21eab82be57a3ad2470fac27b982793805336 Author: Sumit Saxena Date: Thu Nov 23 21:31:28 2023 +0530 scsi: mpi3mr: Add support for SAS5116 PCI IDs Add support for Broadcom's SAS5116 IO/RAID controllers PCI IDs. Signed-off-by: Sumit Saxena Link: https://lore.kernel.org/r/20231123160132.4155-2-sumit.saxena@broadcom.com Signed-off-by: Martin K. Petersen commit db80df77025ee0a5e6e089cc2f2b0c4b97867bea Author: Bart Van Assche Date: Wed Nov 15 11:33:47 2023 -0800 scsi: ufs: core: Warn if the request tag is truncated ufshcd_prepare_utp_scsi_cmd_upiu() only uses the lowest eight bits of lrbp->task_tag. Issue a runtime warning if this results in truncation. Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20231115193359.2262044-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 10b53db2db8dfda84b25833043f2b63123572af6 Author: Bart Van Assche Date: Wed Nov 15 11:33:43 2023 -0800 scsi: core: Add a precondition check in scsi_eh_scmd_add() Calling scsi_eh_scmd_add() may cause the error handler never to be woken up because this may result in shost->host_failed to become larger than scsi_host_busy(shost). Hence complain if scsi_eh_scmd_add() is called after SCMD_STATE_INFLIGHT has been cleared. Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Mike Christie Cc: John Garry Cc: Ming Lei Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20231115193343.2262013-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 0349be31e4ffc79723e46e2e373569567b06347b Author: Bart Van Assche Date: Wed Nov 15 11:33:38 2023 -0800 scsi: bfa: Use the proper data type for BLIST flags Fix the following sparse warning: drivers/scsi/bfa/bfad_bsg.c:2553:50: sparse: sparse: incorrect type in initializer (different base types) Fixes: 2e5a6c3baccd ("scsi: bfa: Convert bfad_reset_sdev_bflags() from a macro into a function") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311031255.lmSPisIk-lkp@intel.com/ Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20231115193338.2261972-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen commit 045da3077bc57e587d0ab4cfc8945b76af03d72d Author: Akinobu Mita Date: Sat Nov 18 21:44:43 2023 +0900 scsi: ufs: core: Make fault injection dynamically configurable per HBA The UFS driver has two driver-specific fault injection mechanisms (trigger_eh and timeout). Each fault injection configuration can only be specified by a module parameter and cannot be reconfigured without reloading the driver. Also, each configuration is common to all HBAs. This change adds the following subdirectories for each UFS HBA when debugfs is enabled: /sys/kernel/debug/ufshcd//timeout_inject /sys/kernel/debug/ufshcd//trigger_eh_inject Each fault injection attribute can be dynamically set per HBA by a corresponding file in these directories. This is tested with QEMU UFS devices. Signed-off-by: Akinobu Mita Link: https://lore.kernel.org/r/20231118124443.1007116-1-akinobu.mita@gmail.com Reviewed-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit edbc78a1b74c3d31dabaf3280bcee0356e744ca9 Author: Stanley Jhu Date: Fri Nov 17 18:38:10 2023 +0800 scsi: ufs: mediatek: Change the maintainer for MediaTek UFS hooks Change the maintainer of MediaTek UFS hooks to Peter Wang. The original maintainer, Stanley Chu, who could previously be reached at stanley.chu@mediatek.com, has left MediaTek. Update the email address accordingly and list Stanley as reviewer. Cc: Stanley Chu Reviewed-by: Peter Wang Reviewed-by: Macpaul Lin Signed-off-by: Stanley Jhu Link: https://lore.kernel.org/r/20231117103810.527-1-chu.stanley@gmail.com Signed-off-by: Martin K. Petersen commit 5f0dedcc9decbe8e8655373a34c87a076502b6db Author: Bartosz Golaszewski Date: Wed Nov 15 17:50:01 2023 +0100 pinctrl: don't include GPIOLIB private header gpio_to_desc() is declared in linux/gpio.h so there's no need to include gpiolib.h directly. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231115165001.2932350-4-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 524fc108b8958683da9fb1c94b445ab9e07819ab Author: Bartosz Golaszewski Date: Wed Nov 15 17:50:00 2023 +0100 pinctrl: stop using gpiod_to_chip() Don't dereference struct gpio_chip directly, use dedicated gpio_device getters instead. Signed-off-by: Bartosz Golaszewski Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231115165001.2932350-3-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 16048722db8614285bee59b5cd5d8af9e2e539f1 Merge: c3c63e66527c1 d1f7728259ef0 Author: Linus Walleij Date: Sat Nov 25 00:27:25 2023 +0100 Merge tag 'gpio-device-get-label-for-v6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpiolib: provide gpio_device_get_label() Signed-off-by: Linus Walleij commit 46990918f35c1bf6e367cf8e0423e7344fec9fcb Author: Danilo Krummrich Date: Tue Nov 14 01:27:25 2023 +0100 drm/nouveau: enable dynamic job-flow control Make use of the scheduler's credit limit and scheduler job's credit count to account for the actual size of a job, such that we fill up the ring efficiently. Signed-off-by: Danilo Krummrich Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20231114002728.3491-2-dakr@redhat.com commit 5f03a507b29e44a848f315c7240c19894dd8be4f Author: Danilo Krummrich Date: Tue Nov 14 01:27:24 2023 +0100 drm/nouveau: implement 1:1 scheduler - entity relationship Recent patches to the DRM scheduler [1][2] allow for a variable number of run-queues and add support for (shared) workqueues rather than dedicated kthreads per scheduler. This allows us to create a 1:1 relationship between a GPU scheduler and a scheduler entity, in order to properly support firmware schedulers being able to handle an arbitrary amount of dynamically allocated command ring buffers. This perfectly matches Nouveau's needs, hence make use of it. Topology wise we create one scheduler instance per client (handling VM_BIND jobs) and one scheduler instance per channel (handling EXEC jobs). All channel scheduler instances share a workqueue, but every client scheduler instance has a dedicated workqueue. The latter is required to ensure that for VM_BIND job's free_job() work and run_job() work can always run concurrently and hence, free_job() work can never stall run_job() work. For EXEC jobs we don't have this requirement, since EXEC job's free_job() does not require to take any locks which indirectly or directly are held for allocations elsewhere. [1] https://lore.kernel.org/all/8f53f7ef-7621-4f0b-bdef-d8d20bc497ff@redhat.com/T/ [2] https://lore.kernel.org/all/20231031032439.1558703-1-matthew.brost@intel.com/T/ Signed-off-by: Danilo Krummrich Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20231114002728.3491-1-dakr@redhat.com commit 9b3eae3486c86304e047829cfe0073b66dc02b36 Author: Tudor Ambarus Date: Fri Nov 24 20:49:02 2023 +0200 docs: mtd: spi-nor: drop obsolete info The architecture description is obsolete, it no longer applies to the current SPI NOR framework state, remove it. Reviewed-by: Michael Walle Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20231124184902.1194235-3-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit bb1f9e39c1bf7349405a48d2c77087dff6cea32b Author: Tudor Ambarus Date: Fri Nov 24 20:49:01 2023 +0200 docs: mtd: spi-nor: add sections about flash additions and testing Add sections about how to propose a new flash addition and about the minimum testing requirements. Reviewed-by: Michael Walle Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20231124184902.1194235-2-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit 014f831abcb82738e57c0b00db66dfef0798ed67 Author: Danilo Krummrich Date: Mon Nov 13 23:12:00 2023 +0100 drm/nouveau: use GPUVM common infrastructure GPUVM provides common infrastructure to track external and evicted GEM objects as well as locking and validation helpers. Especially external and evicted object tracking is a huge improvement compared to the current brute force approach of iterating all mappings in order to lock and validate the GPUVM's GEM objects. Hence, make us of it. Signed-off-by: Danilo Krummrich Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20231113221202.7203-1-dakr@redhat.com commit 0cc3f50f42d262d6175ee2834aeb56e98934cfcc Author: Vinayak Yadawad Date: Thu Nov 9 12:03:44 2023 +0530 wifi: nl80211: Documentation update for NL80211_CMD_PORT_AUTHORIZED event Drivers supporting 4-way handshake offload for AP/P2p-GO and STA/P2P-client should use this event to indicate that port has been authorized and open for regular data traffic, sending this event on completion of successful 4-way handshake. Signed-off-by: Vinayak Yadawad Link: https://lore.kernel.org/r/f746b59f41436e9df29c24688035fbc6eb91ab06.1699510229.git.vinayak.yadawad@broadcom.com [rewrite it all to not use the term 'GC' that we don't use in place of P2P-client] Signed-off-by: Johannes Berg commit e6d71c7878bc6140d1b0b527116af8fd8376d3d5 Author: Rob Herring Date: Wed Nov 22 15:44:24 2023 -0700 dt-bindings: gpio: brcmstb: drop unneeded quotes Drop unneeded quotes over simple string values to fix a soon to be enabled yamllint warning: [error] string value is redundantly quoted with any quotes (quoted-strings) Signed-off-by: Rob Herring Acked-by: Florian Fainelli Reviewed-by: Krzysztof Kozlowski Signed-off-by: Bartosz Golaszewski commit 68e3b071b88d2712b3d8b6bfcfbcd0635653d5a5 Merge: d652049e118ff d1f7728259ef0 Author: Bartosz Golaszewski Date: Fri Nov 24 20:30:00 2023 +0100 Merge branch 'gpio/device_get_label_for_pinctrl' into gpio/for-next Pull in the immutable branch between GPIO and pinctrl adding a new getter allowing to retrieve the label of a GPIO device. commit d1f7728259ef02ac20b7afb6e7eb5a9eb1696c25 Author: Bartosz Golaszewski Date: Wed Nov 15 17:49:59 2023 +0100 gpiolib: provide gpio_device_get_label() Provide a getter for the GPIO device label string so that users don't have to dereference struct gpio_chip directly. Signed-off-by: Bartosz Golaszewski commit cb4a6ccf35839895da63fcf6134d6fbd13224805 Author: Kan Liang Date: Fri Nov 17 08:39:39 2023 -0800 perf/x86/intel/uncore: Support Sierra Forest and Grand Ridge The same as Granite Rapids, the Sierra Forest and Grand Ridge also supports the discovery table feature and the same type of the uncore units. The difference of the available units and counters can be retrieved from the discovery table automatically. Just add the CPU model ID. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Ammy Yi Link: https://lore.kernel.org/r/20231117163939.2468007-5-kan.liang@linux.intel.com commit 388d76175bd9bbad52bbff25c88361d9e5c6615e Author: Kan Liang Date: Fri Nov 17 08:39:38 2023 -0800 perf/x86/intel/uncore: Support IIO free-running counters on GNR The free-running counters for IIO uncore blocks on Granite Rapids are similar to Sapphire Rapids. The key difference is the offset of the registers. The number of the IIO uncore blocks can also be retrieved from the discovery table. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Ammy Yi Link: https://lore.kernel.org/r/20231117163939.2468007-4-kan.liang@linux.intel.com commit 632c4bf6d007862307440b177d9fee829857e8bb Author: Kan Liang Date: Fri Nov 17 08:39:37 2023 -0800 perf/x86/intel/uncore: Support Granite Rapids The same as Sapphire Rapids, Granite Rapids also supports the discovery table feature. All the basic uncore PMON information can be retrieved from the discovery table which resides in the BIOS. There are 4 new units are added on Granite Rapids, b2cmi, b2cxl, ubox, and mdf_sbo. The layout of the counters is exactly the same as the generic uncore counters. Only add a name for the new units. All the details can be retrieved from the discovery table. The description of the new units can be found at https://www.intel.com/content/www/us/en/secure/content-details/772943/content-details.html The other units, e.g., cha, iio, irp, pcu, and imc, are the same as Sapphire Rapids. Ignore the upi and b2upi units in the discovery table, which are broken for now. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Ammy Yi Link: https://lore.kernel.org/r/20231117163939.2468007-3-kan.liang@linux.intel.com commit b560e0cd882b11921c84307efe139f1247434c5e Author: Kan Liang Date: Fri Nov 17 08:39:36 2023 -0800 perf/x86/uncore: Use u64 to replace unsigned for the uncore offsets array The current perf doesn't save the complete address of an uncore unit. The complete address of each unit is calculated by the base address + offset. The type of the base address is u64, while the type of offset is unsigned. In the old platforms (without the discovery table method), the base address and offset are hard coded in the driver. Perf can always use the lowest address as the base address. Everything works well. In the new platforms (starting from SPR), the discovery table provides a complete address for all uncore units. To follow the current framework/codes, when parsing the discovery table, the complete address of the first box is stored as a base address. The offset of the following units is calculated by the complete address of the unit minus the base address (the address of the first unit). On GNR, the latter units may have a lower address compared to the first unit. So the offset is a negative value. The upper 32 bits are lost when casting a negative u64 to an unsigned type. Use u64 to replace unsigned for the uncore offsets array to correct the above case. There is no functional change. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Ammy Yi Link: https://lore.kernel.org/r/20231117163939.2468007-2-kan.liang@linux.intel.com commit cf35791476fcb3230b98a42241a56242d60ebdd3 Author: Kan Liang Date: Fri Nov 17 08:39:35 2023 -0800 perf/x86/intel/uncore: Generic uncore_get_uncores and MMIO format of SPR Factor out SPR_UNCORE_MMIO_COMMON_FORMAT which can be reused by Granite Rapids in the following patch. Granite Rapids have more uncore units than Sapphire Rapids. Add new parameters to support adjustable uncore units. No functional change. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Ammy Yi Link: https://lore.kernel.org/r/20231117163939.2468007-1-kan.liang@linux.intel.com commit cbde0b49f276c43efca6b5d5193f2d26f51afbfa Author: Ilan Peer Date: Mon Nov 13 11:35:01 2023 +0200 wifi: mac80211: Extend support for scanning while MLO connected - If the scan request includes a link ID, validate that it is one of the active links. Otherwise, if the scan request doesn't include a valid link ID, select one of the active links. - When reporting the TSF for a BSS entry, use the link ID information from the Rx status or the scan request to set the parent BSSID. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20231113112844.68564692c404.Iae9605cbb7f9d52e00ce98260b3559a34cf18341@changeid Signed-off-by: Johannes Berg commit 6285ee30caa1a0fbd9537496578085c143127eee Author: Ilan Peer Date: Mon Nov 13 11:35:00 2023 +0200 wifi: cfg80211: Extend support for scanning while MLO connected To extend the support of TSF accounting in scan results for MLO connections, allow to indicate in the scan request the link ID corresponding to the BSS whose TSF should be used for the TSF accounting. Signed-off-by: Ilan Peer Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20231113112844.d4490bcdefb1.I8fcd158b810adddef4963727e9153096416b30ce@changeid Signed-off-by: Johannes Berg commit d3ca4ab4f16eb81dc3e7721251adcba49b229d54 Author: Liam Kearney Date: Wed Oct 25 11:27:55 2023 +1100 wifi: ieee80211: fix PV1 frame control field name Update PV1 frame control field TODS to FROMDS to match 802.11 standard Signed-off-by: Liam Kearney Reviewed-by: Jeff Johnson Link: https://lore.kernel.org/r/20231025002755.1752983-1-liam.kearney@morsemicro.com Signed-off-by: Johannes Berg commit f52c8fba984c7ca1ee687504862a4f8b3c5ef854 Author: Thomas Weißschuh Date: Wed Nov 1 20:41:38 2023 +0100 rfkill: return ENOTTY on invalid ioctl For unknown ioctls the correct error is ENOTTY "Inappropriate ioctl for device". ENOSYS as returned before should only be used to indicate that a syscall is not available at all. Signed-off-by: Thomas Weißschuh Reviewed-by: Przemek Kitszel Link: https://lore.kernel.org/r/20231101-rfkill-ioctl-enosys-v1-1-5bf374fabffe@weissschuh.net [in theory this breaks userspace API, but it was discussed and researched, and nothing found relying on the current behaviour] Signed-off-by: Johannes Berg commit ea5f49061d1ddbe7c066c3f28ecb106a479154af Author: Gregory Greenman Date: Mon Nov 6 12:07:59 2023 +0200 MAINTAINERS: update iwlwifi maintainers Add Miri as a maintainer for iwlwifi driver. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20231106100759.1226662-1-gregory.greenman@intel.com Signed-off-by: Johannes Berg commit c1170c1d04d5bfbd9b38cb968d45b77e6bda2098 Author: Krzysztof Kozlowski Date: Fri Nov 24 10:49:59 2023 +0100 ARM: dts: ti: keystone: minor whitespace cleanup around '=' The DTS code coding style expects exactly one space before and after '=' sign. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124095000.58487-1-krzysztof.kozlowski@linaro.org Signed-off-by: Nishanth Menon commit 964946b88887089f447a9b6a28c39ee97dc76360 Author: Christophe JAILLET Date: Mon Oct 30 11:12:26 2023 +0100 firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create() The ending NULL is not taken into account by strncat(), so switch to snprintf() to correctly build 'debug_name'. Using snprintf() also makes the code more readable. Fixes: aa276781a64a ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol") Signed-off-by: Christophe JAILLET Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/7158db0a4d7b19855ddd542ec61b666973aad8dc.1698660720.git.christophe.jaillet@wanadoo.fr Signed-off-by: Nishanth Menon commit b14b2d56168c1bcf00fccb5a2fe746e64ed970cc Author: Arnd Bergmann Date: Thu Nov 23 07:59:57 2023 +0100 ACPI: thermal_lib: include "internal.h" for function prototypes The newly added functions are declared in a header that is not included before the definition: drivers/acpi/thermal_lib.c:46:5: error: no previous prototype for 'acpi_active_trip_temp' [-Werror=missing-prototypes] 46 | int acpi_active_trip_temp(struct acpi_device *adev, int id, int *ret_temp) | ^~~~~~~~~~~~~~~~~~~~~ drivers/acpi/thermal_lib.c:57:5: error: no previous prototype for 'acpi_passive_trip_temp' [-Werror=missing-prototypes] 57 | int acpi_passive_trip_temp(struct acpi_device *adev, int *ret_temp) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/acpi/thermal_lib.c:63:5: error: no previous prototype for 'acpi_hot_trip_temp' [-Werror=missing-prototypes] 63 | int acpi_hot_trip_temp(struct acpi_device *adev, int *ret_temp) | ^~~~~~~~~~~~~~~~~~ drivers/acpi/thermal_lib.c:69:5: error: no previous prototype for 'acpi_critical_trip_temp' [-Werror=missing-prototypes] 69 | int acpi_critical_trip_temp(struct acpi_device *adev, int *ret_temp) | ^~~~~~~~~~~~~~~~~~~~~~~ Fixes: 6908097aa5a7 ("ACPI: thermal_lib: Add functions returning temperature in deci-Kelvin") Signed-off-by: Arnd Bergmann Signed-off-by: Rafael J. Wysocki commit 5205628ab0bfe64952974d476ee001f6c7e0ef7f Author: Neil Armstrong Date: Tue Nov 14 11:14:45 2023 +0100 clk: meson: g12a: add CSI & ISP gates clocks Add the gates entries for the CSI ISP domain and CSI PHYs. [jbrunet: fixed checkpatch spelling warning] Signed-off-by: Neil Armstrong Reviewed-by: Daniel Scally Tested-by: Daniel Scally Link: https://lore.kernel.org/r/20231114-topic-amlogic-upstream-isp-clocks-v1-3-223958791501@linaro.org Signed-off-by: Jerome Brunet commit 773e4e98730845dddab6b4accef03d03b6ff25ce Author: Neil Armstrong Date: Tue Nov 14 11:14:44 2023 +0100 clk: meson: g12a: add MIPI ISP clocks Add the MIPI ISP gate, divider and mux used to feed the MIPI CSI ISP (Image Signal Processor) IP on the Amlogic G12B SoC. Signed-off-by: Neil Armstrong Reviewed-by: Daniel Scally Tested-by: Daniel Scally Link: https://lore.kernel.org/r/20231114-topic-amlogic-upstream-isp-clocks-v1-2-223958791501@linaro.org Signed-off-by: Jerome Brunet commit 67c55b4615ca5df7f8a3458bf61ccc6ae1ca9b00 Merge: 5de4e8353e321 439d3404addf1 Author: Jerome Brunet Date: Fri Nov 24 18:08:09 2023 +0100 Merge branch 'v6.8/dt-bindings' into v6.8/drivers * v6.8/dt-bindings: dt-bindings: clock: g12a-clkc: add MIPI ISP & CSI PHY clock ids commit 439d3404addf1a1ee8ba6dc6becd555bce7faf98 Author: Neil Armstrong Date: Tue Nov 14 11:14:43 2023 +0100 dt-bindings: clock: g12a-clkc: add MIPI ISP & CSI PHY clock ids Add MIPI ISP & CSI PHY clock ids to G12A clock bindings header Signed-off-by: Neil Armstrong Acked-by: Conor Dooley Reviewed-by: Daniel Scally Tested-by: Daniel Scally Link: https://lore.kernel.org/r/20231114-topic-amlogic-upstream-isp-clocks-v1-1-223958791501@linaro.org Signed-off-by: Jerome Brunet commit 5de4e8353e321c9b91be4233ab99527c4930bfe9 Author: Neil Armstrong Date: Fri Nov 24 09:41:17 2023 +0100 clk: meson: g12a: add CTS_ENCL & CTS_ENCL_SEL clocks Add new CTS_ENCL & CTS_ENCL_SEL clocks for the G12A compatible SoCs, they are used to feed the VPU LCD Pixel encoder used for DSI display purposes. Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231124-amlogic-v6-4-upstream-dsi-ccf-vim3-v9-6-95256ed139e6@linaro.org Signed-off-by: Jerome Brunet commit bd5ef3f21d17a80d4e5b9c8e18bad20c8fb53c95 Author: Neil Armstrong Date: Fri Nov 24 09:41:12 2023 +0100 dt-bindings: clk: g12a-clkc: add CTS_ENCL clock ids Add new CLK ids for the CTS_ENCL and CTS_ENCL_SEL clocks on G12A compatible SoCs. Acked-by: Conor Dooley Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231124-amlogic-v6-4-upstream-dsi-ccf-vim3-v9-1-95256ed139e6@linaro.org Signed-off-by: Jerome Brunet commit 0ff23d460718641c80c8054425256391dca1ac7d Author: Peter Ujfalusi Date: Fri Nov 24 17:08:53 2023 +0200 ASoC: SOF: ipc4: Handle ALSA kcontrol change notification from firmware The control change notification is sent as module notification with a standardized event_id (higher 16 bit is 0xA15A). Add generic code to handle the module notification and invoke the control update callback if the notification is an ALSA kcontrol change message. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231124150853.18648-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit f5eb9945cf9c17eb016aa64c7de13875f259ea07 Author: Peter Ujfalusi Date: Fri Nov 24 17:08:52 2023 +0200 ASoC: SOF: ipc4-control: Implement control update for switch/enum controls Implement the sof_ipc_tplg_control_ops.update function to support a control change notification from the firmware on switch or enum control types. Based on the module notification message content, look up the swidget, then the scontrol which was the source of the notification then if the message contains the changed values update the cached values. If only a notification without values received, marked the control as dirty and on next read access fetch the new values from the firmware. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231124150853.18648-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 1a307538c9cc274b3191b9a1380bbceece262626 Author: Peter Ujfalusi Date: Fri Nov 24 17:08:51 2023 +0200 ASoC: SOF: ipc4: Add data struct for module notification message from firmware With the module notification message the information about the notification is provided via the mailbox with the sof_ipc4_notify_module_data struct. It contains the module and instance id of the sender of the notification, the event_id and optionally additional data which is module and event specific. At the same time add definitions to identify ALSA kcontrol change notification. These notifications use standardized event_id, modules must follow this if they support such notifications: upper 16 bit: 0xA15A as a magic identification value lower 16 bit: param_id of the changed control Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231124150853.18648-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 5980bda0a998a6ee6afd83b97a482a40c1c68076 Author: Peter Ujfalusi Date: Fri Nov 24 17:08:50 2023 +0200 ASoC: SOF: ipc4-topology: Helper to find an swidget by module/instance id The sof_ipc4_find_swidget_by_ids() can be used to find the swidget of a module instance. The lookup parameters are the module_id and the instance_id. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231124150853.18648-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown commit 3a767b482cacd9bfeac786837fcac419af315995 Author: Heiner Kallweit Date: Thu Nov 23 10:53:26 2023 +0100 r8169: remove not needed check in rtl_fw_write_firmware This check can never be true for a firmware file with a correct format. Existing checks in rtl_fw_data_ok() are sufficient, no problems with invalid firmware files are known. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 30c90200153430915a4c4aaaca7437d2592e6ed2 Author: Jakub Kicinski Date: Wed Nov 22 19:10:50 2023 -0800 tools: ynl-gen: use enum name from the spec The enum name used for id-to-str table does not handle the enum-name override in the spec correctly. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 19ed9b3d7a77c6ac3927fe05f4eacfa056b43a48 Author: Jakub Kicinski Date: Wed Nov 22 19:08:44 2023 -0800 tools: ynl-get: use family c-name If a new family is ever added with a dash in the name the C codegen will break. Make sure we use the "safe" form of the name consistently. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 486058f42a4728053ae69ebbf78e9731d8ce6f8b Author: Zhengchao Shao Date: Thu Nov 23 09:55:15 2023 +0800 bonding: remove print in bond_verify_device_path As suggested by Paolo in link[1], if the memory allocation fails, the mm layer will emit a lot warning comprising the backtrace, so remove the print. [1] https://lore.kernel.org/all/20231118081653.1481260-1-shaozhengchao@huawei.com/ Suggested-by: Paolo Abeni Signed-off-by: Zhengchao Shao Reviewed-by: Hangbin Liu Signed-off-by: David S. Miller commit e7bed88e0530c70c1693af886a5905a3c00760fa Author: Li RongQing Date: Thu Nov 23 09:45:37 2023 +0800 net/smc: remove unneeded atomic operations in smc_tx_sndbuf_nonempty The commit dcd2cf5f2fc0 ("net/smc: add autocorking support") adds an atomic variable tx_pushing in smc_connection to make sure only one can send to let it cork more and save CDC slot. since smc_tx_pending can be called in the soft IRQ without checking sock_owned_by_user() at that time, which would cause a race condition because bh_lock_sock() did not honor sock_lock() After commit 6b88af839d20 ("net/smc: don't send in the BH context if sock_owned_by_user"), the transmission is deferred to when sock_lock() is held by the user. Therefore, we no longer need tx_pending to hold message. So remove atomic variable tx_pushing and its operation, and smc_tx_sndbuf_nonempty becomes a wrapper of __smc_tx_sndbuf_nonempty, so rename __smc_tx_sndbuf_nonempty back to smc_tx_sndbuf_nonempty Suggested-by: Alexandra Winter Co-developed-by: Dust Li Signed-off-by: Dust Li Signed-off-by: Li RongQing Reviewed-by: Alexandra Winter diff v4: remove atomic variable tx_pushing diff v3: improvements in the commit body and comments diff v2: fix a typo in commit body and add net-next subject-prefix net/smc/smc.h | 1 - net/smc/smc_tx.c | 30 +----------------------------- 2 files changed, 1 insertion(+), 30 deletions(-) Signed-off-by: David S. Miller commit 8e3707975e04e432f132955652fc77e9ff82f31d Author: Jakub Kicinski Date: Wed Nov 22 09:33:23 2023 -0800 tools: ynl-gen: always append ULL/LL to range types 32bit builds generate the following warning when we use a u32-max in range validation: warning: decimal constant 4294967295 is between LONG_MAX and ULONG_MAX. For C99 that means long long, C90 compilers are very likely to produce unsigned long (and a warning) here The range values are u64, slap ULL/LL on all of them just to avoid such noise. There's currently no code using full range validation, but it will matter in the upcoming page-pool introspection. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6c18005d8fabe8a6835fc0f96102d4269199e05b Author: Javier Martinez Canillas Date: Thu Nov 23 23:13:04 2023 +0100 drm/todo: Add entry about implementing buffer age for damage tracking Currently, only damage tracking for frame damage is supported. If a driver needs to do buffer damage (e.g: the framebuffer attached to plane's state has changed since the last page-flip), the damage helpers just fallback to a full plane update. Add en entry in the TODO about implementing buffer age or any other damage accumulation algorithm for buffer damage handling. Suggested-by: Simon Ser Signed-off-by: Javier Martinez Canillas Reviewed-by: Simon Ser Reviewed-by: Thomas Zimmermann Reviewed-by: Zack Rusin Acked-by: Sima Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20231123221315.3579454-6-javierm@redhat.com commit 017bdf8fa20175b9cccbc746122256432a599845 Author: Javier Martinez Canillas Date: Thu Nov 23 23:13:03 2023 +0100 drm/plane: Extend damage tracking kernel-doc The "Damage Tracking Properties" section in the documentation doesn't have info about the two type of damage handling: frame damage vs buffer damage. Add it to the section and mention that helpers only support frame damage, and how drivers handling buffer damage can indicate that the damage clips should be ignored. Also add references to further documentation about the two damage types. Suggested-by: Simon Ser Signed-off-by: Javier Martinez Canillas Reviewed-by: Simon Ser Reviewed-by: Thomas Zimmermann Reviewed-by: Zack Rusin Acked-by: Sima Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20231123221315.3579454-5-javierm@redhat.com commit b83b2a80d662cc8ba9d78db64fb70fbb5a481d9c Author: Javier Martinez Canillas Date: Thu Nov 23 23:13:02 2023 +0100 drm/vmwgfx: Disable damage clipping if FB changed since last page-flip The driver does per-buffer uploads and needs to force a full plane update if the plane's attached framebuffer has change since the last page-flip. Suggested-by: Sima Vetter Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Reviewed-by: Zack Rusin Acked-by: Sima Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20231123221315.3579454-4-javierm@redhat.com commit 0240db231dfe5ee5b7a3a03cba96f0844b7a673d Author: Javier Martinez Canillas Date: Thu Nov 23 23:13:01 2023 +0100 drm/virtio: Disable damage clipping if FB changed since last page-flip The driver does per-buffer uploads and needs to force a full plane update if the plane's attached framebuffer has change since the last page-flip. Fixes: 01f05940a9a7 ("drm/virtio: Enable fb damage clips property for the primary plane") Cc: # v6.4+ Reported-by: nerdopolis Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218115 Suggested-by: Sima Vetter Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Reviewed-by: Zack Rusin Acked-by: Sima Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20231123221315.3579454-3-javierm@redhat.com commit 35ed38d58257336c1df26b14fd5110b026e2adde Author: Javier Martinez Canillas Date: Thu Nov 23 23:13:00 2023 +0100 drm: Allow drivers to indicate the damage helpers to ignore damage clips It allows drivers to set a struct drm_plane_state .ignore_damage_clips in their plane's .atomic_check callback, as an indication to damage helpers such as drm_atomic_helper_damage_iter_init() that the damage clips should be ignored. To be used by drivers that do per-buffer (e.g: virtio-gpu) uploads (rather than per-plane uploads), since these type of drivers need to handle buffer damages instead of frame damages. That way, these drivers could force a full plane update if the framebuffer attached to a plane's state has changed since the last update (page-flip). Fixes: 01f05940a9a7 ("drm/virtio: Enable fb damage clips property for the primary plane") Cc: # v6.4+ Reported-by: nerdopolis Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218115 Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas Reviewed-by: Thomas Zimmermann Reviewed-by: Zack Rusin Acked-by: Sima Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20231123221315.3579454-2-javierm@redhat.com commit 5f57b717ccce747e95ecbbcdcfd321e5c8d2d4e2 Author: Ilpo Järvinen Date: Fri Nov 24 11:09:17 2023 +0200 EDAC/pci_sysfs: Use PCI_HEADER_TYPE_MASK instead of literals Replace literal 0x7f with PCI_HEADER_TYPE_MASK. No functional changes: $ sha1sum drivers/edac/edac_pci_sysfs.o.* 805b33a090d8019d8b3b348191f630c72c748c9c drivers/edac/edac_pci_sysfs.o.before 805b33a090d8019d8b3b348191f630c72c748c9c drivers/edac/edac_pci_sysfs.o.after Signed-off-by: Ilpo Järvinen Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231124090919.23687-5-ilpo.jarvinen@linux.intel.com commit 306f5df81fcc89b462fbeb9dbe26d9a8ad7c7582 Author: Hector Martin Date: Sun Oct 29 18:07:04 2023 +0100 dmaengine: apple-admac: Keep upper bits of REG_BUS_WIDTH For RX channels, REG_BUS_WIDTH seems to default to a value of 0xf00, and macOS preserves the upper bits when setting the configuration in the lower ones. If we reset the upper bits to 0, this causes framing errors on suspend/resume (the data stream "tears" and channels get swapped around). Keeping the upper bits untouched, like the macOS driver does, fixes this issue. Signed-off-by: Hector Martin Reviewed-by: Martin Povišer Signed-off-by: Martin Povišer Link: https://lore.kernel.org/r/20231029170704.82238-1-povik+lin@cutebit.org Signed-off-by: Vinod Koul commit 375ff42c4c9825c19a53b9095ae4b3337cc83442 Author: Neil Armstrong Date: Wed Oct 25 10:23:04 2023 +0200 dt-bindings: dma: qcom,gpi: document the SM8650 GPI DMA Engine Document the GPI DMA Engine on the SM8650 Platform. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231025-topic-sm8650-upstream-bindings-gpi-v2-1-4de85293d730@linaro.org Signed-off-by: Vinod Koul commit 3b8551e73271fc375b15c887db54ad31686eb2ea Author: Deborah Brouwer Date: Thu Nov 23 14:08:41 2023 -0800 media: wave5: add OF and V4L_MEM2MEM_DRIVERS dependencies Fix compile warning when CONFIG_OF=n: drivers/media/platform/chips-media/wave5/wave5-vpu.c:274:34: warning: 'wave5_dt_ids' defined but not used [-Wunused-const-variable=] 274 | static const struct of_device_id wave5_dt_ids[] = { | Signed-off-by: Deborah Brouwer Signed-off-by: Hans Verkuil [hverkuil: added commit log text] commit ead0e402e50d1101939e4af67891d5b2fa9678b3 Author: Uwe Kleine-König Date: Sun Nov 5 10:34:20 2023 +0100 dmaengine: uniphier-xdmac: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). There is an error path that has the above mentioned problem. This patch only adds a more drastic error message. To properly fix it, dmaengine_terminate_sync() must be known to have succeeded (or that it's safe to not call it as other drivers seem to assume). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231105093415.3704633-10-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 5d4304a8d5646c268d73383fbc179db53f85b921 Author: Uwe Kleine-König Date: Sun Nov 5 10:34:19 2023 +0100 dmaengine: uniphier-mdmac: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). There is an error path that has the above mentioned problem. This patch only adds a more drastic error message. To properly fix it, dmaengine_terminate_sync() must be known to have succeeded (or that it's safe to not call it as other drivers seem to assume). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231105093415.3704633-9-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 47ee210011ddb8b366c7dcf9c1a9c3818573df29 Author: Uwe Kleine-König Date: Sun Nov 5 10:34:18 2023 +0100 dmaengine: milbeaut-xdmac: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). There is an error path that has the above mentioned problem. This patch only adds a more drastic error message. To properly fix it, dmaengine_terminate_sync() must be known to have succeeded (or that it's safe to not call it as other drivers seem to assume). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231105093415.3704633-8-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 0fdd1c4ea99e188dfa8ab7bafbe4004cc72dca30 Author: Uwe Kleine-König Date: Sun Nov 5 10:34:17 2023 +0100 dmaengine: milbeaut-hdmac: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). There is an error path that has the above mentioned problem. This patch only adds a more drastic error message. To properly fix it, dmaengine_terminate_sync() must be known to have succeeded (or that it's safe to not call it as other drivers seem to assume). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231105093415.3704633-7-u.kleine-koenig@pengutronix.de Signed-off-by: Vinod Koul commit 5bfa0e45e9e7212b87fe1564ab45f146c7d56e5f Author: James Morse Date: Fri Nov 24 09:38:53 2023 +0000 x86/cpu/intel_epb: Don't rely on link order intel_epb_init() is called as a subsys_initcall() to register cpuhp callbacks. The callbacks make use of get_cpu_device() which will return NULL unless register_cpu() has been called. register_cpu() is called from topology_init(), which is also a subsys_initcall(). This is fragile. Moving the register_cpu() to a different subsys_initcall() leads to a NULL dereference during boot. Make intel_epb_init() a late_initcall(), user-space can't provide a policy before this point anyway. Signed-off-by: James Morse Signed-off-by: Russell King (Oracle) Signed-off-by: Ingo Molnar Reviewed-by: Gavin Shan Acked-by: Rafael J. Wysocki commit 56d02cfa3fbfca7466ccd68f4db78b0297f5c01f Author: Lad Prabhakar Date: Thu Nov 2 20:39:22 2023 +0000 dt-bindings: dma: rz-dmac: Document RZ/Five SoC The DMAC block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-dmac" compatible string will be used on the RZ/Five SoC so to make this clear, update the comment to include RZ/Five SoC. No driver changes are required as generic compatible string "renesas,rz-dmac" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231102203922.548353-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit 6191e49de389f57a2d34fdfe2c5df7fca2a1f246 Author: Andy Shevchenko Date: Wed Nov 22 19:50:39 2023 +0200 pinctrl: baytrail: Simplify code with cleanup helpers Use macros defined in linux/cleanup.h to automate resource lifetime control in the driver. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 078d83033a76ddbb030e87ed2a56eb28a57a7b34 Author: Andy Shevchenko Date: Wed Nov 22 19:50:38 2023 +0200 pinctrl: baytrail: Move default strength assignment to a switch-case When ->pin_config_set() is called from the GPIO library (assumed GpioIo() ACPI resource), the argument can be 1, when, for example, PullDefault is provided. In such case we supply sane default in the driver. Move that default assingment to a switch-case, so it will be consolidated in one place. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 5398a0e23cf82e2a69088d7080bc588bc07f4284 Author: Andy Shevchenko Date: Wed Nov 22 19:50:37 2023 +0200 pinctrl: baytrail: Factor out byt_gpio_force_input_mode() There is a piece of code that it being used at least twice. Factor it out. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 1a856a22e6036c5f0d6da7568b4550270f989038 Author: Andy Shevchenko Date: Wed Nov 22 19:50:36 2023 +0200 pinctrl: baytrail: Fix types of config value in byt_pin_config_set() When unpacked, the config value is split to two of different types. Fix the types accordingly. Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 9580ba25c5daf49f693ae84dc2e18cd64f210cae Author: Andy Shevchenko Date: Wed Nov 22 19:54:44 2023 +0200 pinctrl: lynxpoint: Simplify code with cleanup helpers Use macros defined in linux/cleanup.h to automate resource lifetime control in the driver. Acked-by: Mika Westerberg Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit 228fe713795f5abade1eb0551f47ce6fbb89f4f7 Author: Raag Jadav Date: Thu Nov 23 19:32:12 2023 +0530 pinctrl: tangier: simplify locking using cleanup helpers Use lock guards from cleanup.h to simplify locking. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit d1d3470a4e4bd58e4a3a0bd62273a14d9ca9b24b Merge: bab6c864b3535 7c59294076204 Author: David S. Miller Date: Fri Nov 24 12:18:55 2023 +0000 Merge branch 'net-ipa-v5.5' Alex Elder says: ==================== net: ipa: add IPA v5.5 support This series adds IPA support for the Qualcomm SM8550 SoC, which uses IPA v5.5. The first patch adds a new compatible string for the SM8550. The second cleans up "ipa_reg.h" a bit for consistency. The third patch adds definitions and some minor code changes related to IPA v5.5. The fourth defines IPA register offsets and fields used for IPA v5.0; most--but not all--register definitions are the same as used in IPA v5.0. The final patch adds configuration data used for IPA v5.5 (here again this mostly duplicates IPA v5.0 definitions). ==================== Signed-off-by: David S. Miller commit 7c59294076204cc8f51f794b6c2e7675c8ad12cd Author: Alex Elder Date: Wed Nov 22 17:09:09 2023 -0600 net: ipa: add IPA v5.5 configuration data Add the configuration data required for IPA v5.5, which is used in the Qualcomm SM8550 SoC. With that, the driver supports IPA v5.5. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 1bfeafabcd5e95424cf1ce910f04507f26b14702 Author: Alex Elder Date: Wed Nov 22 17:09:08 2023 -0600 net: ipa: add IPA v5.5 register definitions GSI register definitions for IPA v5.5 are the same as those used for IPA v5.0. Update ipa_reg_id_valid() to reflect that IPA v5.0+ supports source and destination resource groups 4 through 7. Add the definitions of IPA register offsets and fields for IPA v5.5. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit b00e190cc2000aea4622202d8f081d28ab4bbe41 Author: Alex Elder Date: Wed Nov 22 17:09:07 2023 -0600 net: ipa: prepare for IPA v5.5 For IPA v5.5+, the QTIME_TIMESTAMP_CFG register no longer defines two fields in the DPL timestamp. Make the code referencing those fields in ipa_qtime_config() conditional based on IPA version. IPA v5.0+ supports the IPA_MEM_AP_V4_FILTER and IPA_MEM_AP_V6_FILTER memory regions. Update ipa_mem_id_valid() to reflect that. IPA v5.5 no longer supports a few register fields, adds some others, and removes support for a few IPA interrupt types. Update "ipa_reg.h" to include information about IPA v5.5. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit b134b10cf5bbe82f10b9d6e14098e98c2782fcd0 Author: Alex Elder Date: Wed Nov 22 17:09:06 2023 -0600 net: ipa: update IPA version comments in "ipa_reg.h" Some definitions in "ipa_reg.h" are only valid for certain versions of IPA. In such cases a comment indicates a version or range of versions where the definition is (or is not) valid. Almost all such cases look like "IPA vX.Y", but a few don't include the "IPA" tag. Update these so they all consistently include "IPA". And replace a few lines that talk about "the next bit" in the definition of the ipa_irq_id enumerated type with a more concise comment using the "IPA vX.Y" convention. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit dd043b393c8536574a95c567c49d237c4c604699 Author: Alex Elder Date: Wed Nov 22 17:09:05 2023 -0600 dt-bindings: net: qcom,ipa: add SM8550 compatible Add support for SM8550, which uses IPA v5.5. Signed-off-by: Alex Elder Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit bab6c864b3535f6ee533f42a85b5956ce1c45fe1 Merge: 1ad04b795cc30 0a5f8534e3986 Author: David S. Miller Date: Fri Nov 24 12:16:18 2023 +0000 Merge branch 'octeon_ep-max-rx' Shinas Rasheed says: ==================== Get max rx packet length and solve Patchsets which resolve observed style issues in control net source files, and also implements get mtu control net api to fetch max mtu value from firmware Changes: V2: - Introduced a patch to resolve style issues as mentioned in V1 - Removed OCTEP_MAX_MTU macro, as it is redundant. V1: https://lore.kernel.org/all/20231121191224.2489474-1-srasheed@marvell.com/ ==================== Signed-off-by: David S. Miller commit 0a5f8534e3986b636570f4d6d32e22af7d868d45 Author: Shinas Rasheed Date: Wed Nov 22 10:34:35 2023 -0800 octeon_ep: get max rx packet length from firmware Max receive packet length can vary across SoCs, so this needs to be queried from respective firmware and filled by driver. A control net get mtu api should be implemented to do the same. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit e40f4c4e50fc81ebdeab5dacabd4e14d9fba5a1b Author: Shinas Rasheed Date: Wed Nov 22 10:34:34 2023 -0800 octeon_ep: Solve style issues in control net files Solve observed style issues for kernel documentation and structure declarations in control net API definitions. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 66fb6eb6fab63ee80fd26cd5bdd9164aead0d207 Author: Sibi Sankar Date: Fri Nov 24 15:36:06 2023 +0530 dt-bindings: dma: qcom: gpi: add compatible for X1E80100 The Qualcomm X1E80100 uses GPI DMA for its GENI interface. Add a compatible string for it in the documentation by using the SM6350 as fallback. Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124100608.29964-4-quic_sibis@quicinc.com Signed-off-by: Vinod Koul commit 1ad04b795cc30a17936f0efbca5e924a43fa2b76 Merge: a8d4879d5f1fa 1f2c9dd73f0a2 Author: David S. Miller Date: Fri Nov 24 12:13:15 2023 +0000 Merge branch 'smc-sysctl' Guangguan Wang says: =================== add two sysctl for SMC-R v2.1 This patch set add two sysctl for SMC-R v2.1: net.smc.smcr_max_links_per_lgr is used to control the max links per lgr. net.smc.smcr_max_conns_per_lgr is used to control the max connections per lgr. ==================== Signed-off-by: David S. Miller commit 1f2c9dd73f0a279214f9b3c382b3f1df272b3253 Author: Guangguan Wang Date: Wed Nov 22 21:52:58 2023 +0800 net/smc: add sysctl for max conns per lgr for SMC-R v2.1 Add a new sysctl: net.smc.smcr_max_conns_per_lgr, which is used to control the preferred max connections per lgr for SMC-R v2.1. The default value of this sysctl is 255, and the acceptable value ranges from 16 to 255. Signed-off-by: Guangguan Wang Reviewed-by: Dust Li Signed-off-by: David S. Miller commit f8e80fc4acebab0447567e77d6abc30fb44250cc Author: Guangguan Wang Date: Wed Nov 22 21:52:57 2023 +0800 net/smc: add sysctl for max links per lgr for SMC-R v2.1 Add a new sysctl: net.smc.smcr_max_links_per_lgr, which is used to control the preferred max links per lgr for SMC-R v2.1. The default value of this sysctl is 2, and the acceptable value ranges from 1 to 2. Signed-off-by: Guangguan Wang Reviewed-by: Dust Li Signed-off-by: David S. Miller commit a8d4879d5f1fac060719567d1a8e8f8e68a127fc Author: Geetha sowjanya Date: Wed Nov 22 17:11:42 2023 +0530 octeontx2-pf: TC flower offload support for ICMP type and code Adds tc offload support for matching on ICMP type and code. Example usage: To enable adding tc ingress rules tc qdisc add dev eth0 ingress TC rule drop the ICMP echo reply: tc filter add dev eth0 protocol ip parent ffff: \ flower ip_proto icmp type 8 code 0 skip_sw action drop TC rule to drop ICMPv6 echo reply: tc filter add dev eth0 protocol ipv6 parent ffff: flower \ indev eth0 ip_proto icmpv6 type 128 code 0 action drop Signed-off-by: Geetha sowjanya Signed-off-by: David S. Miller commit 4653f9d014117f78813cae7b022c15b899c77d7b Author: Michael Banack Date: Mon Oct 23 09:46:13 2023 +0200 drm: Introduce documentation for hotspot properties To clarify the intent and reasoning behind the hotspot properties introduce userspace documentation that goes over cursor handling in para-virtualized environments. The documentation is generic enough to not special case for any specific hypervisor and should apply equally to all. Signed-off-by: Zack Rusin Acked-by: Pekka Paalanen Reviewed-by: Javier Martinez Canillas Signed-off-by: Michael Banack Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-10-aesteve@redhat.com commit 9724ed6c1b1212d138e63f5e80647dc8b6b86696 Author: Zack Rusin Date: Mon Oct 23 09:46:12 2023 +0200 drm: Introduce DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT Virtualized drivers place additional restrictions on the cursor plane which breaks the contract of universal planes. To allow atomic modesettings with virtualized drivers the clients need to advertise that they're capable of dealing with those extra restrictions. To do that introduce DRM_CLIENT_CAP_CURSOR_PLANE_HOTSPOT which lets DRM know that the client is aware of and capable of dealing with the extra restrictions on the virtual cursor plane. Setting this option to true makes DRM expose the cursor plane on virtualized drivers. The userspace is expected to set the hotspots and handle mouse events on that plane. Signed-off-by: Zack Rusin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Acked-by: Pekka Paalanen Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-9-aesteve@redhat.com commit bce3dab7eb6ee596388699e8a052a7d58954c472 Author: Zack Rusin Date: Mon Oct 23 09:46:11 2023 +0200 drm: Remove legacy cursor hotspot code Atomic modesetting supports mouse cursor offsets via the hotspot properties that are created on cursor planes. All drivers which support hotspots are atomic and the legacy code has been implemented in terms of the atomic properties as well. Due to the above the lagacy cursor hotspot code is no longer used or needed and can be removed. Signed-off-by: Zack Rusin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-8-aesteve@redhat.com commit cc6c535967ed07fd75f54a26a70091826daf691e Author: Zack Rusin Date: Mon Oct 23 09:46:10 2023 +0200 drm/virtio: Use the hotspot properties from cursor planes Atomic modesetting got support for mouse hotspots via the hotspot properties. Port the legacy kms hotspot handling to the new properties on cursor planes. Signed-off-by: Zack Rusin Reviewed-by: Gerd Hoffmann Cc: David Airlie Cc: Gurchetan Singh Cc: Chia-I Wu Cc: Daniel Vetter Cc: virtualization@lists.linux-foundation.org Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-7-aesteve@redhat.com commit 44d877a1de912fa24d1af8f76433a914e6816057 Author: Zack Rusin Date: Mon Oct 23 09:46:09 2023 +0200 drm/vboxvideo: Use the hotspot properties from cursor planes Atomic modesetting got support for mouse hotspots via the hotspot properties. Port the legacy kms hotspot handling to the new properties on cursor planes. Signed-off-by: Zack Rusin Cc: Hans de Goede Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-6-aesteve@redhat.com commit 305b391d8f84a46119b5554a7a7af775266ce382 Author: Zack Rusin Date: Mon Oct 23 09:46:08 2023 +0200 drm/qxl: Use the hotspot properties from cursor planes Atomic modesetting got support for mouse hotspots via the hotspot properties. Port the legacy kms hotspot handling to the new properties on cursor planes. Signed-off-by: Zack Rusin Reviewed-by: Gerd Hoffmann Cc: Dave Airlie Cc: Daniel Vetter Cc: virtualization@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-5-aesteve@redhat.com commit cd5499429237b7ba3f5bfd3efb488688886c82fe Author: Zack Rusin Date: Mon Oct 23 09:46:07 2023 +0200 drm/vmwgfx: Use the hotspot properties from cursor planes Atomic modesetting got support for mouse hotspots via the hotspot properties. Port the legacy kms hotspot handling to the new properties on cursor planes. Signed-off-by: Zack Rusin Cc: Maaz Mombasawala Reviewed-by: Javier Martinez Canillas Reviewed-by: Martin Krastev Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-4-aesteve@redhat.com commit 8f7179a1027d89bf949b0b80c388a544a5e096f2 Author: Zack Rusin Date: Mon Oct 23 09:46:06 2023 +0200 drm/atomic: Add support for mouse hotspots Atomic modesetting code lacked support for specifying mouse cursor hotspots. The legacy kms DRM_IOCTL_MODE_CURSOR2 had support for setting the hotspot but the functionality was not implemented in the new atomic paths. Due to the lack of hotspots in the atomic paths userspace compositors completely disable atomic modesetting for drivers that require it (i.e. all paravirtualized drivers). This change adds hotspot properties to the atomic codepaths throughtout the DRM core and will allow enabling atomic modesetting for virtualized drivers in the userspace. Signed-off-by: Zack Rusin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Javier Martinez Canillas Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-3-aesteve@redhat.com commit 4e3b70da64a53784683cfcbac2deda5d6e540407 Author: Zack Rusin Date: Mon Oct 23 09:46:05 2023 +0200 drm: Disable the cursor plane on atomic contexts with virtualized drivers Cursor planes on virtualized drivers have special meaning and require that the clients handle them in specific ways, e.g. the cursor plane should react to the mouse movement the way a mouse cursor would be expected to and the client is required to set hotspot properties on it in order for the mouse events to be routed correctly. This breaks the contract as specified by the "universal planes". Fix it by disabling the cursor planes on virtualized drivers while adding a foundation on top of which it's possible to special case mouse cursor planes for clients that want it. Disabling the cursor planes makes some kms compositors which were broken, e.g. Weston, fallback to software cursor which works fine or at least better than currently while having no effect on others, e.g. gnome-shell or kwin, which put virtualized drivers on a deny-list when running in atomic context to make them fallback to legacy kms and avoid this issue. Signed-off-by: Zack Rusin Fixes: 681e7ec73044 ("drm: Allow userspace to ask for universal plane list (v2)") Cc: # v5.4+ Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Hans de Goede Cc: Gurchetan Singh Cc: Chia-I Wu Cc: dri-devel@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org Acked-by: Pekka Paalanen Reviewed-by: Javier Martinez Canillas Acked-by: Simon Ser Signed-off-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231023074613.41327-2-aesteve@redhat.com commit c3c63e66527c18b598bbf9d77f0849852cd32ff9 Author: Andrew Davis Date: Thu Nov 16 16:30:45 2023 -0600 pinctrl: as3722: Use devm_gpiochip_add_data() to simplify remove path Use devm version of gpiochip add function to handle removal for us. Signed-off-by: Andrew Davis Reviewed-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231116223045.274211-1-afd@ti.com Signed-off-by: Linus Walleij commit 05e4941d97ef05ddaa742a57301daab8a2f7db5b Author: Rajendra Nayak Date: Fri Nov 17 15:09:21 2023 +0530 pinctrl: qcom: Add X1E80100 pinctrl driver Add initial pinctrl driver to support pin configuration with pinctrl framework for X1E80100 SoC. Co-developed-by: Abel Vesa Signed-off-by: Abel Vesa Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231117093921.31968-3-quic_sibis@quicinc.com Signed-off-by: Linus Walleij commit 5180f4fa499eb78f45e2d4ee0883c6483884f4df Author: Rajendra Nayak Date: Fri Nov 17 15:09:20 2023 +0530 dt-bindings: pinctrl: qcom: Add X1E80100 pinctrl Add device tree binding Documentation details for Qualcomm X1E80100 TLMM device. Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Bjorn Andersson Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231117093921.31968-2-quic_sibis@quicinc.com Signed-off-by: Linus Walleij commit a6059c8603bc90746bf0df930ff78013b4c789fe Author: Tomer Maimon Date: Wed Nov 15 13:12:09 2023 -0800 pinctrl: npcm7xx: prevent glitch when setting the GPIO to output high Enable GPIO output after setting the output value to prevent a glitch when pinctrl driver sets gpio pin to output high and the pin is in the default state (high->low->high). Signed-off-by: Tomer Maimon Signed-off-by: William A. Kennington III Link: https://lore.kernel.org/r/20231115211209.1683449-1-william@wkennington.com Signed-off-by: Linus Walleij commit 5a002bf206508169dd9d8c002d6326e51f53b42c Author: Sergey Shtylyov Date: Wed Nov 15 23:34:53 2023 +0300 pinctrl: stm32: return errors from stm32_gpio_direction_output() In the STMicroelectronics STM32 driver, stm32_gpio_direction_output() ignores the result of pinctrl_gpio_direction_output() for no good reason. Let's propagate errors from pinctrl_gpio_direction_output() upstream... Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool. Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/5ce023a8-db0c-13a9-be42-09e3348ca44d@omp.ru Signed-off-by: Linus Walleij commit 29b0b68f25ae6f9454c3e1c31b054595af0a80fc Author: Krzysztof Kozlowski Date: Fri Nov 24 09:38:03 2023 +0100 ASoC: dt-bindings: correct white-spaces in examples Use only one and exactly one space around '=' in DTS example. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124083803.12773-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit 52be2c4926831f7858c25701950afe9c1879f71f Author: Maciej Strozek Date: Fri Nov 24 09:50:30 2023 +0000 ASoC: cs43130: Allow configuration of bit clock and frame inversion Signed-off-by: Maciej Strozek Link: https://lore.kernel.org/r/20231124095030.24539-1-mstrozek@opensource.cirrus.com Signed-off-by: Mark Brown commit cc03a934c5da764b369979752cd3ade3bd4f5823 Author: Rafał Miłecki Date: Thu Nov 16 19:06:41 2023 +0100 dt-bindings: crypto: convert Inside Secure SafeXcel to the json-schema This helps validating DTS files. Cc: Antoine Tenart Signed-off-by: Rafał Miłecki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit ba6e3ee4f5d6c13e984f8cb5fb1706ca39ff4a0e Author: Jia Jie Ho Date: Wed Nov 15 01:12:14 2023 +0800 crypto: starfive - RSA poll csr for done status Hardware could not clear irq status without resetting the entire module. Driver receives irq immediately when mask bit is cleared causing intermittent errors in RSA calculations. Switch to use csr polling for done status instead. Signed-off-by: Jia Jie Ho Signed-off-by: Herbert Xu commit 29ce1bce3a713a8031a88f80224b72696813447d Author: Jia Jie Ho Date: Wed Nov 15 01:12:13 2023 +0800 crypto: starfive - Update driver dependencies Change AMBA_PL08X to required dependency as the hash ops depends on it for data transfer. Signed-off-by: Jia Jie Ho Signed-off-by: Herbert Xu commit e8a339b5235e294f29153149ea7cf26a9a87dbea Author: Andrii Nakryiko Date: Thu Nov 23 19:59:37 2023 -0800 selftests/bpf: Add lazy global subprog validation tests Add a few test that validate BPF verifier's lazy approach to validating global subprogs. We check that global subprogs that are called transitively through another global subprog is validated. We also check that invalid global subprog is not validated, if it's not called from the main program. And we also check that main program is always validated first, before any of the subprogs. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Eduard Zingerman Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231124035937.403208-4-andrii@kernel.org commit 2afae08c9dcb8ac648414277cec70c2fe6a34d9e Author: Andrii Nakryiko Date: Thu Nov 23 19:59:36 2023 -0800 bpf: Validate global subprogs lazily Slightly change BPF verifier logic around eagerness and order of global subprog validation. Instead of going over every global subprog eagerly and validating it before main (entry) BPF program is verified, turn it around. Validate main program first, mark subprogs that were called from main program for later verification, but otherwise assume it is valid. Afterwards, go over marked global subprogs and validate those, potentially marking some more global functions as being called. Continue this process until all (transitively) callable global subprogs are validated. It's a BFS traversal at its heart and will always converge. This is an important change because it allows to feature-gate some subprograms that might not be verifiable on some older kernel, depending on supported set of features. E.g., at some point, global functions were allowed to accept a pointer to memory, which size is identified by user-provided type. Unfortunately, older kernels don't support this feature. With BPF CO-RE approach, the natural way would be to still compile BPF object file once and guard calls to this global subprog with some CO-RE check or using .rodata variables. That's what people do to guard usage of new helpers or kfuncs, and any other new BPF-side feature that might be missing on old kernels. That's currently impossible to do with global subprogs, unfortunately, because they are eagerly and unconditionally validated. This patch set aims to change this, so that in the future when global funcs gain new features, those can be guarded using BPF CO-RE techniques in the same fashion as any other new kernel feature. Two selftests had to be adjusted in sync with these changes. test_global_func12 relied on eager global subprog validation failing before main program failure is detected (unknown return value). Fix by making sure that main program is always valid. verifier_subprog_precision's parent_stack_slot_precise subtest relied on verifier checkpointing heuristic to do a checkpoint at instruction #5, but that's no longer true because we don't have enough jumps validated before reaching insn #5 due to global subprogs being validated later. Other than that, no changes, as one would expect. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Eduard Zingerman Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231124035937.403208-3-andrii@kernel.org commit 491dd8edecbc5027ee317f3f1e7e9800fb66d88f Author: Andrii Nakryiko Date: Thu Nov 23 19:59:35 2023 -0800 bpf: Emit global subprog name in verifier logs We have the name, instead of emitting just func#N to identify global subprog, augment verifier log messages with actual function name to make it more user-friendly. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Eduard Zingerman Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231124035937.403208-2-andrii@kernel.org commit 21b32e6a0ab5b174fa1ca2fb4c212577cf405d83 Author: Amir Goldstein Date: Wed Nov 22 14:27:15 2023 +0200 fs: create {sb,file}_write_not_started() helpers Create new helpers {sb,file}_write_not_started() that can be used to assert that sb_start_write() is not held. This is needed for fanotify "pre content" events. Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-17-amir73il@gmail.com Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit 3d5cd4911e04683df8f4439fddd788e00a2510a8 Author: Amir Goldstein Date: Wed Nov 22 14:27:14 2023 +0200 fs: create file_write_started() helper Convenience wrapper for sb_write_started(file_inode(inode)->i_sb)), which has a single occurrence in the code right now. Document the false negatives of those helpers, which makes them unusable to assert that sb_start_write() is not held. Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-16-amir73il@gmail.com Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit 8802e580ee643e3f63c6b39ff64e7c7baa4a55ba Author: Amir Goldstein Date: Wed Nov 22 14:27:13 2023 +0200 fs: create __sb_write_started() helper Similar to sb_write_started() for use by other sb freeze levels. Unlike the boolean sb_write_started(), this helper returns a tristate to distiguish the cases of lockdep disabled or unknown lock state. This is needed for fanotify "pre content" events. Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-15-amir73il@gmail.com Reviewed-by: Josef Bacik Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 6ae654392bb516a0baa47fed1f085d84e8cad739 Author: Amir Goldstein Date: Wed Nov 22 14:27:12 2023 +0200 fs: move kiocb_start_write() into vfs_iocb_iter_write() In vfs code, sb_start_write() is usually called after the permission hook in rw_verify_area(). vfs_iocb_iter_write() is an exception to this rule, where kiocb_start_write() is called by its callers. Move kiocb_start_write() from the callers into vfs_iocb_iter_write() after the rw_verify_area() checks, to make them "start-write-safe". The semantics of vfs_iocb_iter_write() is changed, so that the caller is responsible for calling kiocb_end_write() on completion only if async iocb was queued. The completion handlers of both callers were adapted to this semantic change. This is needed for fanotify "pre content" events. Suggested-by: Jan Kara Suggested-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-14-amir73il@gmail.com Reviewed-by: Josef Bacik Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit b8e1425bae856b189e2365ff795e30fdd9e77049 Author: Amir Goldstein Date: Sun Jul 16 14:47:14 2023 +0300 fs: move permission hook out of do_iter_read() We recently moved fsnotify hook, rw_verify_area() and other checks from do_iter_write() out to its two callers. for consistency, do the same thing for do_iter_read() - move the rw_verify_area() checks and fsnotify hook to the callers vfs_iter_read() and vfs_readv(). This aligns those vfs helpers with the pattern used in vfs_read() and vfs_iocb_iter_read() and the vfs write helpers, where all the checks are in the vfs helpers and the do_* or call_* helpers do the work. This is needed for fanotify "pre content" events. Suggested-by: Jan Kara Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-13-amir73il@gmail.com Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Signed-off-by: Christian Brauner commit 1c8aa833034a00617866ea4738a40491e3e23902 Author: Amir Goldstein Date: Sun Jul 16 14:47:14 2023 +0300 fs: move permission hook out of do_iter_write() In many of the vfs helpers, the rw_verity_area() checks are called before taking sb_start_write(), making them "start-write-safe". do_iter_write() is an exception to this rule. do_iter_write() has two callers - vfs_iter_write() and vfs_writev(). Move rw_verify_area() and other checks from do_iter_write() out to its callers to make them "start-write-safe". Move also the fsnotify_modify() hook to align with similar pattern used in vfs_write() and other vfs helpers. This is needed for fanotify "pre content" events. Suggested-by: Jan Kara Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-12-amir73il@gmail.com Reviewed-by: Jan Kara Signed-off-by: Amir Goldstein Signed-off-by: Christian Brauner commit 269aed7014b3db9acdbc5a5e163d8a6c62e0e770 Author: Amir Goldstein Date: Wed Nov 22 14:27:09 2023 +0200 fs: move file_start_write() into vfs_iter_write() All the callers of vfs_iter_write() call file_start_write() just before calling vfs_iter_write() except for target_core_file's fd_do_rw(). Move file_start_write() from the callers into vfs_iter_write(). fd_do_rw() calls vfs_iter_write() with a non-regular file, so file_start_write() is a no-op. This is needed for fanotify "pre content" events. Suggested-by: Jan Kara Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-11-amir73il@gmail.com Signed-off-by: Christian Brauner commit d7aaccd3beb1ec34b04b13fa236f50efb77c8d6c Author: Vignesh Raghavendra Date: Fri Nov 24 10:27:22 2023 +0530 dt-bindings: dma: ti: k3-udma: Describe cfg register regions Unified DMA (UDMA) module on K3 SoCs have TX and RX channel cfg and RX flow cfg register regions which are usually configured by a Device Management firmware. But certain entities such as bootloader (like U-Boot) may have to access them directly. Describe this region in the binding documentation for completeness of module description. Keep the binding compatible with existing DTS files by requiring first four regions to be present at least. Signed-off-by: Vignesh Raghavendra Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124045722.191817-5-vigneshr@ti.com Signed-off-by: Vinod Koul commit 8d75e0e5eed23e4f8ced5eacae3255e498a1c304 Author: Vignesh Raghavendra Date: Fri Nov 24 10:27:21 2023 +0530 dt-bindings: dma: ti: k3-pktdma: Describe cfg register regions Packet DMA (PKTDMA) module on K3 SoCs have ring cfg, TX and RX channel cfg and RX flow cfg register regions which are usually configured by a Device Management firmware. But certain entities such as bootloader (like U-Boot) may have to access them directly. Describe this region in the binding documentation for completeness of module description. Keep the binding compatible with existing DTS files by requiring first four regions to be present at least. Signed-off-by: Vignesh Raghavendra Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124045722.191817-4-vigneshr@ti.com Signed-off-by: Vinod Koul commit f04470678132c2d044b92befab39a933ac4d106c Author: Vignesh Raghavendra Date: Fri Nov 24 10:27:20 2023 +0530 dt-bindings: dma: ti: k3-bcdma: Describe cfg register regions Block copy DMA(BCDMA)module on K3 SoCs have ring, BCHAN, TX and RX channel cfg register regions which are usually configured by a Device Management firmware. But certain entities such as bootloader (like U-Boot) may have to access them directly. Describe this region in the binding documentation for completeness of module description. Keep the binding compatible with existing DTS files by requiring first five regions to be present at least. Signed-off-by: Vignesh Raghavendra Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124045722.191817-3-vigneshr@ti.com Signed-off-by: Vinod Koul commit aaf7b392347bc4b32ffcab11c414d983a782e651 Author: Vignesh Raghavendra Date: Fri Nov 24 10:27:19 2023 +0530 dt-bindings: dma: ti: k3-*: Add descriptions for register regions In preparation for introducing more register regions, add description for existing register regions so that its easier to map reg-names to that of SoC Documentations/TRMs. Signed-off-by: Vignesh Raghavendra Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231124045722.191817-2-vigneshr@ti.com Signed-off-by: Vinod Koul commit e389b76a7ee1b62392ab52c22f9ba81f23145824 Author: Amir Goldstein Date: Wed Nov 22 14:27:08 2023 +0200 coda: change locking order in coda_file_write_iter() The coda host file is a backing file for the coda inode on a different filesystem than the coda inode. Change the locking order to take the coda inode lock before taking the backing host file freeze protection, same as in ovl_write_iter() and in network filesystems that use cachefiles. Link: https://lore.kernel.org/r/CAOQ4uxjcnwuF1gMxe64WLODGA_MyAy8x-DtqkCUxqVQKk3Xbng@mail.gmail.com/ Acked-by: Jan Harkes Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-10-amir73il@gmail.com Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit 2f4d8ad82511a336f8a805e3759c5189a25bb286 Author: Amir Goldstein Date: Wed Nov 22 14:27:07 2023 +0200 btrfs: move file_start_write() to after permission hook In vfs code, file_start_write() is usually called after the permission hook in rw_verify_area(). btrfs_ioctl_encoded_write() in an exception to this rule. Move file_start_write() to after the rw_verify_area() check in encoded write to make the permission hook "start-write-safe". This is needed for fanotify "pre content" events. Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-9-amir73il@gmail.com Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 0b5263d12aed0437c1bdb7ba0be27437fc12c274 Author: Amir Goldstein Date: Wed Nov 22 14:27:06 2023 +0200 remap_range: move file_start_write() to after permission hook In vfs code, file_start_write() is usually called after the permission hook in rw_verify_area(). vfs_dedupe_file_range_one() is an exception to this rule. In vfs_dedupe_file_range_one(), move file_start_write() to after the the rw_verify_area() checks to make them "start-write-safe". This is needed for fanotify "pre content" events. Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-8-amir73il@gmail.com Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit dfad37051ade6ac0d404ef4913f3bd01954ee51c Author: Amir Goldstein Date: Wed Nov 22 14:27:05 2023 +0200 remap_range: move permission hooks out of do_clone_file_range() In many of the vfs helpers, file permission hook is called before taking sb_start_write(), making them "start-write-safe". do_clone_file_range() is an exception to this rule. do_clone_file_range() has two callers - vfs_clone_file_range() and overlayfs. Move remap_verify_area() checks from do_clone_file_range() out to vfs_clone_file_range() to make them "start-write-safe". Overlayfs already has calls to rw_verify_area() with the same security permission hooks as remap_verify_area() has. The rest of the checks in remap_verify_area() are irrelevant for overlayfs that calls do_clone_file_range() offset 0 and positive length. This is needed for fanotify "pre content" events. Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-7-amir73il@gmail.com Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit d53471ba6f7ae97a4e223539029528108b705af1 Author: Amir Goldstein Date: Thu Nov 23 18:51:44 2023 +0100 splice: remove permission hook from iter_file_splice_write() All the callers of ->splice_write(), (e.g. do_splice_direct() and do_splice()) already check rw_verify_area() for the entire range and perform all the other checks that are in vfs_write_iter(). Instead of creating another tiny helper for special caller, just open-code it. This is needed for fanotify "pre content" events. Suggested-by: Jan Kara Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-6-amir73il@gmail.com Signed-off-by: Christian Brauner commit b70d8e2b8ce56c79d9d18d20955e6de1631e9509 Author: Amir Goldstein Date: Wed Nov 22 14:27:03 2023 +0200 splice: move permission hook out of splice_file_to_pipe() vfs_splice_read() has a permission hook inside rw_verify_area() and it is called from splice_file_to_pipe(), which is called from do_splice() and do_sendfile(). do_sendfile() already has a rw_verify_area() check for the entire range. do_splice() has a rw_verify_check() for the splice to file case, not for the splice from file case. Add the rw_verify_area() check for splice from file case in do_splice() and use a variant of vfs_splice_read() without rw_verify_area() check in splice_file_to_pipe() to avoid the redundant rw_verify_area() checks. This is needed for fanotify "pre content" events. Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-5-amir73il@gmail.com Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit feebea75bdf499aefd11d0df7b02d384a9f92fc1 Author: Amir Goldstein Date: Wed Nov 22 14:27:02 2023 +0200 splice: move permission hook out of splice_direct_to_actor() vfs_splice_read() has a permission hook inside rw_verify_area() and it is called from do_splice_direct() -> splice_direct_to_actor(). The callers of do_splice_direct() (e.g. vfs_copy_file_range()) already call rw_verify_area() for the entire range, but the other caller of splice_direct_to_actor() (nfsd) does not. Add the rw_verify_area() checks in nfsd_splice_read() and use a variant of vfs_splice_read() without rw_verify_area() check in splice_direct_to_actor() to avoid the redundant rw_verify_area() checks. This is needed for fanotify "pre content" events. Acked-by: Chuck Lever Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-4-amir73il@gmail.com Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 2a33e2ddc6ebf9b5468091aded8a38f57de9a580 Author: Amir Goldstein Date: Wed Nov 22 14:27:01 2023 +0200 splice: remove permission hook from do_splice_direct() All callers of do_splice_direct() have a call to rw_verify_area() for the entire range that is being copied, e.g. by vfs_copy_file_range() or do_sendfile() before calling do_splice_direct(). The rw_verify_area() check inside do_splice_direct() is redundant and is called after sb_start_write(), so it is not "start-write-safe". Remove this redundant check. This is needed for fanotify "pre content" events. Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-3-amir73il@gmail.com Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit ca7ab482401cf0a7497dad05f4918dc64115538b Author: Amir Goldstein Date: Wed Nov 22 14:27:00 2023 +0200 ovl: add permission hooks outside of do_splice_direct() The main callers of do_splice_direct() also call rw_verify_area() for the entire range that is being copied, e.g. by vfs_copy_file_range() or do_sendfile() before calling do_splice_direct(). The only caller that does not have those checks for entire range is ovl_copy_up_file(). In preparation for removing the checks inside do_splice_direct(), add rw_verify_area() call in ovl_copy_up_file(). For extra safety, perform minimal sanity checks from rw_verify_area() for non negative offsets also in the copy up do_splice_direct() loop without calling the file permission hooks. This is needed for fanotify "pre content" events. Reviewed-by: Josef Bacik Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231122122715.2561213-2-amir73il@gmail.com Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 0db1d53937fafa8bb96e077375691e16902f4899 Author: Amir Goldstein Date: Thu Nov 23 11:20:00 2023 +0200 scsi: target: core: add missing file_{start,end}_write() The callers of vfs_iter_write() are required to hold file_start_write(). file_start_write() is a no-op for the S_ISBLK() case, but it is really needed when the backing file is a regular file. We are going to move file_{start,end}_write() into vfs_iter_write(), but we need to fix this first, so that the fix could be backported to stable kernels. Suggested-by: Christoph Hellwig Link: https://lore.kernel.org/r/ZV8ETIpM+wZa33B5@infradead.org/ Cc: Signed-off-by: Amir Goldstein Link: https://lore.kernel.org/r/20231123092000.2665902-1-amir73il@gmail.com Acked-by: Martin K. Petersen Reviewed-by: Christoph Hellwig Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 7c1156d8a719d5fca39e0e40e4465e4cbd765e89 Author: Krzysztof Kozlowski Date: Wed Nov 22 21:04:07 2023 +0100 arm64: dts: exynosautov9: use Exynos7 fallbacks for pin wake-up controller ExynosAutov9 pin controller capable of wake-ups is still compatible with Exynos7, however it does not mux interrupts. Add Exynos7 compatible fallback to annotate that compatibility and match the bindings. Link: https://lore.kernel.org/r/20231122200407.423264-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 2d8f82dd322fbaafc9c1a70d70efb6efe42c973b Author: Krzysztof Kozlowski Date: Wed Nov 22 21:04:06 2023 +0100 arm64: dts: exynos850: use Exynos7 fallbacks for pin wake-up controllers Exynos850 pin controller capable of wake-ups is still compatible with Exynos7, however it does not mux interrupts. Add Exynos7 compatible fallback to annotate that compatibility and match the bindings. Link: https://lore.kernel.org/r/20231122200407.423264-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit b90fccfb5cde406365c33aa21ee87da83bbfca02 Author: Ville Syrjälä Date: Wed Nov 22 11:31:37 2023 +0200 drm/i915: Move the SDP split debug spew to the correct place Adding ad-hoc debug prints all over the place is not good. Move the SDP split debug spew into the proper place (state dumper). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231122093137.1509-4-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit 904140fa45533f6d05071e24492013da16c46b7f Author: Krzysztof Kozlowski Date: Wed Nov 22 21:04:05 2023 +0100 dt-bindings: pinctrl: samsung: use Exynos7 fallbacks for newer wake-up controllers Older ARM8 SoCs like Exynos5433, Exynos7 and Exynos7885 have the pin controller with wake-up interrupts muxed, thus the wake-up interrupt controller device node has interrupts property, while its pin banks might not (because they are muxed by the wake-up controller). Newer SoCs like Exynos850 and ExynosAutov9 do not used muxed wake-up interrupts: 1. Wake-up interrupt controller device node has no interrupts, 2. Its pin banks have interrupts (since there is no muxing). Their programming interface is however still compatible with Exynos7, thus change the bindings to express this: retain compatibility with Exynos7 and add new compatibility fallback of Exynos850 in newer designs. No driver changes are needed. This is necessary only to properly describe DTS. Acked-by: Conor Dooley Acked-by: Jaewon Kim Link: https://lore.kernel.org/r/20231122200407.423264-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 58046e6cf811464b8a6f269dc6a40a8cb91a8a68 Author: Ville Syrjälä Date: Wed Nov 22 11:31:36 2023 +0200 drm/i915: Stop printing pipe name as hex Print the pipe name in ascii rather than hex. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231122093137.1509-3-ville.syrjala@linux.intel.com Reviewed-by: Jouni Högander commit a7ae05ef356162c2a7ff108a7ff154d7d0dcd6aa Author: Srinivas Kandagatla Date: Thu Nov 23 10:53:32 2023 +0000 soundwire: qcom: set controller id to hw master id Qualcomm Soundwire Controllers IP version after 1.3 have a dedicated master id register which will provide a unique id value for each controller instance. Use this value instead of artificially generated value from idr. Versions 1.3 and below only have one instance of soundwire controller which does no have this register, so let them use value from idr. Signed-off-by: Srinivas Kandagatla Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231123105332.102167-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 8a8a9ac8a4972ee69d3dd3d1ae43963ae39cee18 Author: Krzysztof Kozlowski Date: Tue Oct 17 11:09:33 2023 -0500 soundwire: fix initializing sysfs for same devices on different buses If same devices with same device IDs are present on different soundwire buses, the probe fails due to conflicting device names and sysfs entries: sysfs: cannot create duplicate filename '/bus/soundwire/devices/sdw:0:0217:0204:00:0' The link ID is 0 for both devices, so they should be differentiated by the controller ID. Add the controller ID so, the device names and sysfs entries look like: sdw:1:0:0217:0204:00:0 -> ../../../devices/platform/soc@0/6ab0000.soundwire-controller/sdw-master-1-0/sdw:1:0:0217:0204:00:0 sdw:3:0:0217:0204:00:0 -> ../../../devices/platform/soc@0/6b10000.soundwire-controller/sdw-master-3-0/sdw:3:0:0217:0204:00:0 [PLB changes: use bus->controller_id instead of bus->id] Fixes: 7c3cd189b86d ("soundwire: Add Master registration") Cc: stable@vger.kernel.org Reviewed-by: Bard Liao Reviewed-by: Vijendar Mukunda Co-developed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Signed-off-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Acked-by: Mark Brown Tested-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231017160933.12624-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 6543ac13c623f906200dfd3f1c407d8d333b6995 Author: Pierre-Louis Bossart Date: Tue Oct 17 11:09:32 2023 -0500 soundwire: bus: introduce controller_id The existing SoundWire support misses a clear Controller/Manager hiearchical definition to deal with all variants across SOC vendors. a) Intel platforms have one controller with 4 or more Managers. b) AMD platforms have two controllers with one Manager each, but due to BIOS issues use two different link_id values within the scope of a single controller. c) QCOM platforms have one or more controller with one Manager each. This patch adds a 'controller_id' which can be set by higher levels. If assigned to -1, the controller_id will be set to the system-unique IDA-assigned bus->id. The main change is that the bus->id is no longer used for any device name, which makes the definition completely predictable and not dependent on any enumeration order. The bus->id is only used to insert the Managers in the stream rt context. Reviewed-by: Bard Liao Reviewed-by: Vijendar Mukunda Signed-off-by: Pierre-Louis Bossart Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/stable/20231017160933.12624-2-pierre-louis.bossart%40linux.intel.com Tested-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231017160933.12624-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit aadbd27f9674d7f5457331fe0248b370d5c1f25d Author: Christian Marangi Date: Tue Nov 21 14:53:32 2023 +0100 net: phy: correctly check soft_reset ret ONLY if defined for PHY Introduced by commit 6e2d85ec0559 ("net: phy: Stop with excessive soft reset"). soft_reset call for phy_init_hw had multiple revision across the years and the implementation goes back to 2014. Originally was a simple call to write the generic PHY reset BIT, it was then moved to a dedicated function. It was then added the option for PHY driver to define their own special way to reset the PHY. Till this change, checking for ret was correct as it was always filled by either the generic reset or the custom implementation. This changed tho with commit 6e2d85ec0559 ("net: phy: Stop with excessive soft reset"), as the generic reset call to PHY was dropped but the ret check was never made entirely optional and dependent whether soft_reset was defined for the PHY driver or not. Luckly nothing was ever added before the soft_reset call so the ret check (in the case where a PHY didn't had soft_reset defined) although wrong, never caused problems as ret was init 0 at the start of phy_init_hw. To prevent any kind of problem and to make the function cleaner and more robust, correctly move the ret check if the soft_reset section making it optional and needed only with the function defined. Signed-off-by: Christian Marangi Reviewed-by: Larysa Zaremba Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit f061c9f7d058ffc32de66f2efb3e1c368e305423 Author: Breno Leitao Date: Tue Nov 21 03:48:31 2023 -0800 Documentation: Document each netlink family This is a simple script that parses the Netlink YAML spec files (Documentation/netlink/specs/), and generates RST files to be rendered in the Network -> Netlink Specification documentation page. Create a python script that is invoked during 'make htmldocs', reads the YAML specs input file and generate the correspondent RST file. Create a new Documentation/networking/netlink_spec index page, and reference each Netlink RST file that was processed above in this main index.rst file. In case of any exception during the parsing, dump the error and skip the file. Do not regenerate the RST files if the input files (YAML) were not changed in-between invocations. Suggested-by: Jakub Kicinski Signed-off-by: Breno Leitao ---- Changelog: V3: * Do not regenerate the RST files if the input files were not changed. In order to do it, a few things changed: - Rely on Makefile more to find what changed, and trigger individual file processing - The script parses file by file now (instead of batches) - Create a new option to generate the index file V2: * Moved the logic from a sphinx extension to a external script * Adjust some formatting as suggested by Donald Hunter and Jakub * Auto generating all the rsts instead of having stubs * Handling error gracefully Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit ecd3439595d3a7ecb729f509afae91f34f18af93 Merge: 70ad2111d0494 9f196772841e8 Author: Georgi Djakov Date: Fri Nov 24 00:27:30 2023 +0200 Merge branch 'icc-x1e80100' into icc-next * icc-x1e80100 dt-bindings: interconnect: document the RPMh Network-On-Chip Interconnect in Qualcomm SM8650 SoC interconnect: qcom: introduce RPMh Network-On-Chip Interconnect on SM8650 SoC dt-bindings: interconnect: qcom-bwmon: document SM8650 BWMONs This series adds interconnect support for the Qualcomm X1E80100 platform, aka Snapdragon X Elite. Our v1 post of the patchsets adding support for Snapdragon X Elite SoC had the part number sc8380xp which is now updated to the new part number x1e80100 based on the new branding scheme and refers to the exact same SoC. Release Link: https://www.qualcomm.com/news/releases/2023/10/qualcomm-unleashes-snapdragon-x-elite--the-ai-super-charged-plat Link: https://lore.kernel.org/r/20231123135028.29433-1-quic_sibis@quicinc.com Signed-off-by: Georgi Djakov commit 9f196772841e8a344303f42da9b4e596a3554771 Author: Rajendra Nayak Date: Thu Nov 23 19:20:28 2023 +0530 interconnect: qcom: Add X1E80100 interconnect provider driver Add driver for the Qualcomm interconnect buses found in X1E80100 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. Co-developed-by: Abel Vesa Signed-off-by: Abel Vesa Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20231123135028.29433-3-quic_sibis@quicinc.com Signed-off-by: Georgi Djakov commit dc84a76f054c01cc1d769a86ffa3a7e13867915a Author: Rajendra Nayak Date: Thu Nov 23 19:20:27 2023 +0530 dt-bindings: interconnect: Add Qualcomm X1E80100 SoC The Qualcomm X1E80100 SoC has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand. Co-developed-by: Abel Vesa Signed-off-by: Abel Vesa Signed-off-by: Rajendra Nayak Co-developed-by: Sibi Sankar Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231123135028.29433-2-quic_sibis@quicinc.com Signed-off-by: Georgi Djakov commit 70ad2111d04940a506850e9f64fda25d349b2fa1 Merge: 45db9b84164b5 b73326b60fddf Author: Georgi Djakov Date: Fri Nov 24 00:21:12 2023 +0200 Merge branch 'icc-platform-remove' into icc-next * icc-platform-remove interconnect: qcom: Make qnoc_remove return void interconnect: imx8mm: Convert to platform remove callback returning void interconnect: imx8mn: Convert to platform remove callback returning void interconnect: imx8mp: Convert to platform remove callback returning void interconnect: imx8mq: Convert to platform remove callback returning void interconnect: qcom/msm8974: Convert to platform remove callback returning void interconnect: qcom/osm-l3: Convert to platform remove callback returning void interconnect: qcom/smd-rpm: Convert to platform remove callback returning void interconnect: exynos: Convert to platform remove callback returning void This series converts all platform drivers below drivers/interconnect to use .remove_new(). Compared to the traditional .remove() callback .remove_new() returns no value. This is a good thing because the driver core doesn't (and cannot) cope for errors during remove. The only effect of a non-zero return value in .remove() is that the driver core emits a warning. The device is removed anyhow and an early return from .remove() usually yields resource leaks and/or use-after-free bugs. See commit 5c5a7680e67b ("platform: Provide a remove callback that returns no value") for an extended explanation and the eventual goal. All drivers converted here already returned zero unconditionally in .remove(), so they are converted here trivially. The imx drivers could be slightly simplified, because the remove callback only called a single function with the same prototype as .remove_new(). Link: https://lore.kernel.org/r/20231031222851.3126434-11-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit 45db9b84164b5923417c25d1aa078dfe923c645d Merge: b85ea95d08647 0403ae6f165ba Author: Georgi Djakov Date: Fri Nov 24 00:19:29 2023 +0200 Merge branch 'icc-sm8650' into icc-next * icc-sm8650 dt-bindings: interconnect: document the RPMh Network-On-Chip Interconnect in Qualcomm SM8650 SoC interconnect: qcom: introduce RPMh Network-On-Chip Interconnect on SM8650 SoC dt-bindings: interconnect: qcom-bwmon: document SM8650 BWMONs This covers the RPMh Network-On-Chip Interconnect bindings and driver for the interconnect framework. As reported for earlier Interconnect drivers, the IDs for multi-rsc voting has been removed from this driver so the proper solution can be developed without having to remove entries later on. Link: https://lore.kernel.org/r/20231123-topic-sm8650-upstream-interconnect-v2-0-7e050874f59b@linaro.org Signed-off-by: Georgi Djakov commit 0403ae6f165ba51c185f22aa98fa397da4619fc7 Author: Neil Armstrong Date: Wed Oct 25 09:24:39 2023 +0200 dt-bindings: interconnect: qcom-bwmon: document SM8650 BWMONs Document SM8650 BWMONs which has - just like SM8550 - a BWMONv4 for CPU-LLCC and a BWMONv5 for DDR-LLCC paths. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231025-topic-sm8650-upstream-bindings-bwmon-v1-1-11efcdd8799e@linaro.org Signed-off-by: Georgi Djakov commit c062bcab592475697d71806edf8cb936b27d4f66 Author: Neil Armstrong Date: Thu Nov 23 14:32:13 2023 +0100 interconnect: qcom: introduce RPMh Network-On-Chip Interconnect on SM8650 SoC Add RPMh Network-On-Chip Interconnect support for the SM8650 platform. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231123-topic-sm8650-upstream-interconnect-v2-2-7e050874f59b@linaro.org Signed-off-by: Georgi Djakov commit 80abebd9bf72516a3a6ed50f69908b9dbbf72a93 Author: Neil Armstrong Date: Thu Nov 23 14:32:12 2023 +0100 dt-bindings: interconnect: document the RPMh Network-On-Chip Interconnect in Qualcomm SM8650 SoC Document the RPMh Network-On-Chip Interconnect of the SM8650 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231123-topic-sm8650-upstream-interconnect-v2-1-7e050874f59b@linaro.org Signed-off-by: Georgi Djakov commit b8d78cb2e24d92352878a9f6525aec002c891528 Author: Eduard Zingerman Date: Thu Nov 23 02:04:39 2023 +0200 libbpf: Start v1.4 development cycle Bump libbpf.map to v1.4.0 to start a new libbpf version cycle. Signed-off-by: Eduard Zingerman Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20231123000439.12025-1-eddyz87@gmail.com commit 45c226dde742a92e22dcd65b96bf7e02620a9c19 Merge: c5b9f4792ea6b d3fa86b1a7b4c Author: Jakub Kicinski Date: Thu Nov 23 12:19:49 2023 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. Conflicts: drivers/net/ethernet/intel/ice/ice_main.c c9663f79cd82 ("ice: adjust switchdev rebuild path") 7758017911a4 ("ice: restore timestamp configuration after device reset") https://lore.kernel.org/all/20231121211259.3348630-1-anthony.l.nguyen@intel.com/ Adjacent changes: kernel/bpf/verifier.c bb124da69c47 ("bpf: keep track of max number of bpf_loop callback iterations") 5f99f312bd3b ("bpf: add register bounds sanity checks and sanitization") Signed-off-by: Jakub Kicinski commit abdea7209becf633d96a71ea3b99062ae7012229 Author: Chester Lin Date: Thu Nov 16 07:57:32 2023 +0800 dt-bindings: serial: fsl-linflexuart: change the maintainer email address I am leaving SUSE so the current email address will be disabled soon. will be my new address for handling emails, patches and pull requests from upstream and communities. Cc: Chester Lin Cc: NXP S32 Linux Team Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Signed-off-by: Chester Lin Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231115235732.13633-1-clin@suse.com Signed-off-by: Greg Kroah-Hartman commit f1c7f92ee9ec38aa5e6526257a8a9f1fffc52511 Author: Christophe JAILLET Date: Sun Nov 19 19:00:58 2023 +0100 serial: sh-sci: convert not to use dma_request_slave_channel() dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d6773b9bd88dbbbea06bc6d5cd59aa117b1ee2ee.1700416841.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit b49c36e4b2ff4d5c8b8a0495f660707ae7dfdda9 Author: Christophe JAILLET Date: Sun Nov 19 17:22:20 2023 +0100 serial: mxs-auart: convert not to use dma_request_slave_channel() dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/94812f7063e4db5590254ec45fe9bb3c6569509e.1700410918.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit e6cc39486ae74271673742fe86ee6fb8d1eba16c Author: Christophe JAILLET Date: Sun Nov 19 15:52:39 2023 +0100 serial: amba-pl011: convert not to use dma_request_slave_channel() dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/6f76e22f77d776d6c1f176d56e7ee341314d8554.1700405529.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 5b05206b05ba98bce4c8f15200b407569fae270e Author: Christophe JAILLET Date: Sun Nov 19 17:12:48 2023 +0100 serial: imx: convert not to use dma_request_slave_channel() dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/a46b493c6b5cfa09417e3e138e304fd01b61e748.1700410346.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit ec9fc2cffa8d2ff150918baadb07b115c544e8ea Author: Christophe JAILLET Date: Sun Nov 19 16:55:15 2023 +0100 serial: atmel: convert not to use dma_request_slave_channel() dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f2e9790d8b49aeba8b43ce018d30a35b837ac1eb.1700409299.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 3837a0379533aabb9e4483677077479f7c6aa910 Author: Hugo Villeneuve Date: Mon Oct 30 17:14:47 2023 -0400 serial: sc16is7xx: improve regmap debugfs by using one regmap per port With this current driver regmap implementation, it is hard to make sense of the register addresses displayed using the regmap debugfs interface, because they do not correspond to the actual register addresses documented in the datasheet. For example, register 1 is displayed as registers 04 thru 07: $ cat /sys/kernel/debug/regmap/spi0.0/registers 04: 10 -> Port 0, register offset 1 05: 10 -> Port 1, register offset 1 06: 00 -> Port 2, register offset 1 -> invalid 07: 00 -> port 3, register offset 1 -> invalid ... The reason is that bits 0 and 1 of the register address correspond to the channel (port) bits, so the register address itself starts at bit 2, and we must 'mentally' shift each register address by 2 bits to get its real address/offset. Also, only channels 0 and 1 are supported by the chip, so channel mask combinations of 10b and 11b are invalid, and the display of these registers is useless. This patch adds a separate regmap configuration for each port, similar to what is done in the max310x driver, so that register addresses displayed match the register addresses in the chip datasheet. Also, each port now has its own debugfs entry. Example with new regmap implementation: $ cat /sys/kernel/debug/regmap/spi0.0-port0/registers 1: 10 2: 01 3: 00 ... $ cat /sys/kernel/debug/regmap/spi0.0-port1/registers 1: 10 2: 01 3: 00 As an added bonus, this also simplifies some operations (read/write/modify) because it is no longer necessary to manually shift register addresses. Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231030211447.974779-1-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 55cb57ac75093e9e19d69ae5754a74805a05ca48 Author: Hugo Villeneuve Date: Mon Oct 30 17:22:40 2023 -0400 serial: sunsab: remove trailing whitespaces Fix coding style. No functional changes. Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231030212240.975885-1-hugo@hugovil.com Signed-off-by: Greg Kroah-Hartman commit 17fabec94d61c27d7efdc66301f1508dc223e291 Author: Samuel Holland Date: Sun Nov 12 18:31:19 2023 -0800 serial: sifive: Declare PM operations as static They are only used within this file, so they should have static linkage. Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20231113023122.1185407-1-samuel.holland@sifive.com Signed-off-by: Greg Kroah-Hartman commit aa46b225ebbfa7ff96aef431879e8bbc159071e5 Author: Uwe Kleine-König Date: Sun Nov 5 22:44:09 2023 +0100 tty: hvc: hvc_opal: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Nicholas Piggin Link: https://lore.kernel.org/r/20231105214406.3765906-6-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 7f30c19caf94b98a1f672376e85a6968d756c25e Author: Uwe Kleine-König Date: Sun Nov 5 22:44:08 2023 +0100 tty: hvc: Make hvc_remove() return no value The function hvc_remove() returns zero unconditionally. Make it return void instead to make it obvious that the caller doesn't need to do any error handling. Accordingly drop the error handling from hvc_opal_remove(). Signed-off-by: Uwe Kleine-König Reviewed-by: Nicholas Piggin Link: https://lore.kernel.org/r/20231105214406.3765906-5-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 221d6546bd16e08a4b18d67698e624459dab1795 Merge: b26ca735195bd deac453244d30 Author: Daniel Vetter Date: Thu Nov 23 20:24:34 2023 +0100 Merge tag 'drm-intel-next-2023-11-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 feature pull for v6.8: Features and functionality: - Major DP MST improvements on bandwidth management, DSC (Imre, Stan, Ville) - DP panel replay enabling (Animesh, Jouni) - MTL C20 phy state verification (Mika) - MTL DP DSC fractional bpp support (Ankit, Vandita, Swati, Imre) - Audio fastset support (Ville) Refactoring and cleanups: - Use dma fence interfaces instead of i915_sw_fence (Jouni) - Separate gem and display code (Jouni, Juha-Pekka) - AUX register macro refactoring (Jani) - Separate display module/device parameters from the rest (Jouni) - Move display capabilities debugfs under display (Vinod) - Makefile cleanup (Jani) - Register cleanups (Ville) - Enginer iterator cleanups (Tvrtko) - Move display lock inits under display/ (Jani) - VLV/CHV DPIO PHY register and interface refactoring (Jani) - DSI VBT sequence refactoring (Jani, Andy Shevchenko) - C10/C20 PHY PLL hardware readout and calculation abstractions (Lucas) - DPLL code cleanups (Ville) - Cleanup PXP plane protection checks (Jani) Fixes: - Replace VLV/CHV DSI GPIO direct access with proper GPIO API usage (Andy Shevchenko) - Fix VLV/CHV DSI GPIO wrong initial value (Hans de Goede) - Fix UHBR data, link M/N/TU and PBN values (Imre) - Fix HDCP state on an enable/disable cycle (Suraj) - Fix DP MST modeset sequence to be according to spec (Ville) - Improved atomicity for multi-pipe commits (Ville) - Update URLs in i915 MAINTAINERS entry and code (Jani) - Check for VGA converter presence in eDP probe (Ville) - Fix surface size checks (Ville) - Fix LNL port/phy assignment (Lucas) - Reset C10/C20 message bus harder to avoid sporadic failures (Mika) - Fix bogus VBT HDMI level shift on BDW (Ville) - Add workaround for LNL underruns when enabling FBC (Vinod) - DSB refactoring (Animesh) - DPT refactoring (Juha-Pekka) - Disable DSC on DP MST on ICL (Imre) - Fix PSR VSC packet setup timing (Mika) - Fix LUT rounding and conversions (Ville) DRM core display changes: - DP MST fixes, helpers, refactoring to support bandwidth management (Imre) - DP MST PBN divider value refactoring and fixes (Imre) - DPCD register definitions (Ankit, Imre) - Add helper to get DSC bpp precision (Ankit) - Fix color LUT rounding (Ville) From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87v89sl2ao.fsf@intel.com [sima: Some conflicts in the amdgpu dp mst code] Signed-off-by: Daniel Vetter commit 9c8c269b4ae9c1b7f00350cec4777d17154049c0 Author: Lad Prabhakar Date: Wed Nov 15 21:24:31 2023 +0000 dt-bindings: serial: renesas,sci: Document RZ/Five SoC The SCI block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-sci" compatible string will be used on the RZ/Five SoC so to make this clear and to keep this file consistent, update the comment to include RZ/Five SoC. No driver changes are required as generic compatible string "renesas,sci" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231115212431.32872-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit dd6ffc9c57f69c2708f7c14dd7da5901b7d24b98 Author: Sean Anderson Date: Mon Nov 6 10:24:28 2023 -0500 tty: serial: uartlite: Document uartlite_data in kernel-doc style Use @ and - to conform with kernel-doc style. Reported-by: kernel test robot Signed-off-by: Sean Anderson Reviewed-by: Randy Dunlap Reviewed-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/20231106152428.3641883-1-sean.anderson@seco.com Signed-off-by: Greg Kroah-Hartman commit 50d371a9c5babf54bbcd267a09a2786b6a44a194 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 11:36:26 2023 +0100 tty: serial_cs: remove unused struct serial_cfg_mem clang-struct [1] found struct serial_cfg_mem's members unused. In fact, the whole structure is unused since commit 6ae3b84d9793 ("serial_cs: use pcmcia_loop_config() and pre-determined values"). Drop it completely. [1] https://github.com/jirislaby/clang-struct Signed-off-by: "Jiri Slaby (SUSE)" Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231121103626.17772-7-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit d0b2b1efbdd29662896591791f1c38477d78d483 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 11:36:25 2023 +0100 tty: rp2: remove unused rp2_uart_port::ignore_rx clang-struct [1] found rp2_uart_port::ignore_rx unused. It was actually never used. Not even in introductory commit 7d9f49afa451 ("serial: rp2: New driver for Comtrol RocketPort 2 cards"). [1] https://github.com/jirislaby/clang-struct Signed-off-by: "Jiri Slaby (SUSE)" Cc: Kevin Cernekee Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231121103626.17772-6-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit e1d64e153aee72097db1174766ed7adec08724ea Author: Jiri Slaby (SUSE) Date: Tue Nov 21 11:36:24 2023 +0100 tty: jsm: remove unused struct jsm_board members clang-struct [1] found jsm_board::type and ::jsm_board_entry unused. ::jsm_board_entry is unused since 614a7d6a76b7 ("fix up newly added jsm driver") ::type was never used as far as I can tell. Even when the driver was introduced in the pre-git era. Remove them both. [1] https://github.com/jirislaby/clang-struct Signed-off-by: "Jiri Slaby (SUSE)" Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231121103626.17772-5-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 79b18e51226e5d99c597a0ed8fee3df1dd595c99 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 11:36:23 2023 +0100 tty: jsm: remove unused members from struct board_ops clang-struct [1] found board_ops::get_uart_bytes_left() and ::send_immediate_char() unused. Both are only set but never called. And it has been like that since the git history, so drop both the members along with the cls+neo implementations. [1] https://github.com/jirislaby/clang-struct Signed-off-by: "Jiri Slaby (SUSE)" Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231121103626.17772-4-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5bd8ad372398e64c8a33cb3a0c2a5f823c997ef7 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 11:36:22 2023 +0100 tty: ipwireless: remove unused ipw_dev::attribute_memory clang-struct [1] found ipw_dev::attribute_memory unused. As far as I can see it was never used since the driver merge. Drop it. [1] https://github.com/jirislaby/clang-struct Signed-off-by: "Jiri Slaby (SUSE)" Cc: Jiri Kosina Cc: David Sterba Acked-by: David Sterba Acked-by: Jiri Kosina Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231121103626.17772-3-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5592d7e87f239708dc90011d9cf35726657be861 Author: Jiri Slaby (SUSE) Date: Tue Nov 21 11:36:21 2023 +0100 tty: con3215: drop raw3215_info::ubuffer clang-struct [1] found raw3215_info::ubuffer unused. It's actually not used since 2004 when we switched to kernel buffers. [1] https://github.com/jirislaby/clang-struct Signed-off-by: "Jiri Slaby (SUSE)" Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Alexander Gordeev Cc: Christian Borntraeger Cc: Sven Schnelle Cc: linux-s390@vger.kernel.org Acked-by: Alexander Gordeev Reviewed-by: Ilpo Järvinen Link: https://lore.kernel.org/r/20231121103626.17772-2-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0ea163e23552f51603f9a412812c753cdef1d94d Author: Uwe Kleine-König Date: Fri Nov 10 16:30:20 2023 +0100 serial: xilinx_uartps: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-53-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 0e1ff92834b78cc434cd7099680c57f7aa87aff8 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:19 2023 +0100 serial: ucc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-52-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 2a0e8be950b9f945e526c600f9e6f4d265752497 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:18 2023 +0100 serial: uartlite: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-51-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 7d8ffee1f41dd74f3484417188da1c439d49d840 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:17 2023 +0100 serial: timbuart: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-50-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 5e29d46f411d3b799182416c8bd939ffd79b87c8 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:16 2023 +0100 serial: tegra-tcu: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-49-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 84f74fd3002fb620d46c24694c6d4e320b39ffb2 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:15 2023 +0100 serial: sunzilog: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-48-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 499dd0b5b0cbc1cb07b111f36d4bd69b5f050255 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:14 2023 +0100 serial: sunsu: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-47-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 78767116e28c536ecbba46e25a278b13106eb34b Author: Uwe Kleine-König Date: Fri Nov 10 16:30:13 2023 +0100 serial: sunsab: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-46-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 3f51b27c9ada772c6888e26586247e6ba1a2c1a1 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:12 2023 +0100 serial: sunplus: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-45-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 3cfff33ae8788b06dd9d4ae1eaa23fc6f1dfb13b Author: Uwe Kleine-König Date: Fri Nov 10 16:30:11 2023 +0100 serial: sunhv: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-44-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 2cf562441b51bc0dc2cd179d34b83f79293e0fea Author: Uwe Kleine-König Date: Fri Nov 10 16:30:10 2023 +0100 serial: stm32: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-43-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 338bc8f964b8b00f1224eebd89f84f59a6fee703 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:09 2023 +0100 serial: st-asc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-42-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ef2a86440e7d48e09eeb7f6a48359194603d5bdc Author: Uwe Kleine-König Date: Fri Nov 10 16:30:08 2023 +0100 serial: sprd: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Chunyan Zhang Link: https://lore.kernel.org/r/20231110152927.70601-41-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 0a208f3d58c76445379eb89cc8660d1ff6d7f988 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:07 2023 +0100 serial: sifive: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Samuel Holland Link: https://lore.kernel.org/r/20231110152927.70601-40-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 5fc247bf758522258e4cba750e80cc5558ff66e5 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:06 2023 +0100 serial: sh-sci: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231110152927.70601-39-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit f785faa8cdd412b35e9264085f0df4a4fd6cd8f6 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:05 2023 +0100 serial: txx9: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-38-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit d388186258436b3feaffa592fc8c8842ab37f09c Author: Uwe Kleine-König Date: Fri Nov 10 16:30:04 2023 +0100 serial: tegra: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-37-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 2512ae09b86f93f0278ebcdec766b2b67bbe5686 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:03 2023 +0100 serial: sccnxp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-36-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 77772addc1f110a3afc36a8883173f746361edb1 Author: Uwe Kleine-König Date: Fri Nov 10 16:30:02 2023 +0100 serial: samsung: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231110152927.70601-35-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 1158e40b26d2fc5f7554c795ec0d8e8a42484f7f Author: Uwe Kleine-König Date: Fri Nov 10 16:30:01 2023 +0100 serial: sa1100: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-34-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit b9fd3145c962d4f37e5e321c0f589d2da74109eb Author: Uwe Kleine-König Date: Fri Nov 10 16:30:00 2023 +0100 serial: rda: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-33-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit dd4d4497be8ff2a72e4345c3c1b6450cadfa75d6 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:59 2023 +0100 serial: qcom_geni: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-32-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 915fd7f32d25365a076176af71e9a4787772f2cc Author: Uwe Kleine-König Date: Fri Nov 10 16:29:58 2023 +0100 serial: pic32: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-31-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 8e94fc93762a5999053f35de99306360d9ce5dda Author: Uwe Kleine-König Date: Fri Nov 10 16:29:57 2023 +0100 serial: owl: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-30-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 065503963113df1c2d64d37da01490c33e89178c Author: Uwe Kleine-König Date: Fri Nov 10 16:29:56 2023 +0100 serial: omap: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-29-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 23f6a4d9afc1eddfbe586a6c96b5d9ef87b8138b Author: Uwe Kleine-König Date: Fri Nov 10 16:29:55 2023 +0100 serial: mxs-auart: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-28-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit a63e5a49d596fab1524ec2fc9b0e683c37901bb4 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:54 2023 +0100 serial: msm: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-27-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 4cf1dabec96f8a36e1170954b890bb295de89dbe Author: Uwe Kleine-König Date: Fri Nov 10 16:29:53 2023 +0100 serial: mpc52xx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-26-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit abf11a4b4501a09ea1a24f2c9f04459cc24d3ec4 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:52 2023 +0100 serial: milbeaut_usio: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-25-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit c4a5b26291710032caf41503ab984431c5e4537b Author: Uwe Kleine-König Date: Fri Nov 10 16:29:51 2023 +0100 serial: meson: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-24-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit cd1d7071f5c172205fc3a916347aa60a84a16424 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:50 2023 +0100 serial: mcf: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-23-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit cec346ec4649bb9d741a52da1632db4e6fd13947 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:49 2023 +0100 serial: ma35d1: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-22-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 2c1a68b59894f6b18058e0718d58011b28bfa6f1 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:48 2023 +0100 serial: lpc32xx_hs: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-21-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 2d1c01d4cf26710920c37468ed49d6c41e11944c Author: Uwe Kleine-König Date: Fri Nov 10 16:29:47 2023 +0100 serial: liteuart: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Gabriel Somlo Link: https://lore.kernel.org/r/20231110152927.70601-20-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 04300219c8a826a55f73e5dc7634edfe7ab1128b Author: Uwe Kleine-König Date: Fri Nov 10 16:29:46 2023 +0100 serial: lantiq: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-19-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit c066f87314b7fbbf4d72d38957436a98e7b7e503 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:45 2023 +0100 serial: imx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-18-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 6b02503f37e86aca945adc2ece51cda03a497757 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:44 2023 +0100 serial: fsl_lpuart: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-17-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 77533490f4df4e000be3b2fcadbb1b3fdcfa9257 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:43 2023 +0100 serial: fsl_linflexuart: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-16-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit de2f50b74db7f4d476df928f8deca4052160bf81 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:42 2023 +0100 serial: esp32: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-15-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 505cc4b418ac209cf0534eeeb370cf9442c364d7 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:41 2023 +0100 serial: esp32_acm: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-14-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit e9b09d9c26fed6a5e1a9a829f749496bffb25f71 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:40 2023 +0100 serial: digicolor: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-13-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit d19993c40ca126889f622e9ec73e329798f41012 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:39 2023 +0100 serial: cpm: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-12-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 47cfe5464350b668dec1562a286be132aa1e0aec Author: Uwe Kleine-König Date: Fri Nov 10 16:29:38 2023 +0100 serial: clps711x: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-11-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 69b1a03921a49c9a9ea18f21ab3792e1ac1ed2ee Author: Uwe Kleine-König Date: Fri Nov 10 16:29:37 2023 +0100 serial: bcm63xx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20231110152927.70601-10-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 144b47cd555bc70459962547e6b6079e52f6ba9e Author: Uwe Kleine-König Date: Fri Nov 10 16:29:36 2023 +0100 serial: atmel: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Acked-by: Richard Genoud Link: https://lore.kernel.org/r/20231110152927.70601-9-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit d3b84c16fde084ff4fc21f0ee0a66865775bf0fb Author: Uwe Kleine-König Date: Fri Nov 10 16:29:35 2023 +0100 serial: ar933x: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-8-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 788f501a817a0eb45fe179c4430420fb1516f550 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:34 2023 +0100 serial: amba-pl011: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-7-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit b0f698b80bbc2b6f15e69b16dd7ee2d68ec769f5 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:33 2023 +0100 serial: altera: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Tobias Klauser Link: https://lore.kernel.org/r/20231110152927.70601-6-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit c1f5edac27fbcaa9c5e4b63d17a2ec39ab648043 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:32 2023 +0100 serial: altera_jtaguart: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Tobias Klauser Link: https://lore.kernel.org/r/20231110152927.70601-5-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 7e1efdf8fce4b09d9d22befaa2c36906eff5dc37 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:31 2023 +0100 serial: 8250: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Geert Uytterhoeven Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Andi Shyti Reviewed-by: Florian Fainelli # 8250_bcm* Link: https://lore.kernel.org/r/20231110152927.70601-4-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 7635d71e6a4bef6751d85bf3014ed135a83fe352 Author: Uwe Kleine-König Date: Fri Nov 10 16:29:30 2023 +0100 serial: sccnxp: Improve error message if regulator_disable() fails Returning an error code from .remove() makes the driver core emit the little helpful error message: remove callback returned a non-zero value. This will be ignored. and then remove the device anyhow. So replace the error return (and with it the little helpful error message) by a more useful error message. Fixes: 31815c08fc90 ("serial: sccnxp: Replace pdata.init/exit with regulator API") Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231110152927.70601-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit ad90d0358bd3b4554f243a425168fc7cebe7d04e Author: Uwe Kleine-König Date: Fri Nov 10 16:29:29 2023 +0100 serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed Returning an error code from .remove() makes the driver core emit the little helpful error message: remove callback returned a non-zero value. This will be ignored. and then remove the device anyhow. So all resources that were not freed are leaked in this case. Skipping serial8250_unregister_port() has the potential to keep enough of the UART around to trigger a use-after-free. So replace the error return (and with it the little helpful error message) by a more useful error message and continue to cleanup. Fixes: e3f0c638f428 ("serial: 8250: omap: Fix unpaired pm_runtime_put_sync() in omap8250_remove()") Signed-off-by: Uwe Kleine-König Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20231110152927.70601-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit a00b3f296eac3d43328615c3113e1a74143fc67a Author: Yunfei Dong Date: Mon Oct 23 11:06:40 2023 +0800 media: mediatek: vcodec: Set the supported vp9 profile for each platform Set the maximum VP9 codec profile for each platform. The various mediatek platforms support different profiles for decoding, the profile of the codec limits the capabilities for decoding. Signed-off-by: Yunfei Dong Reviewed-by: Sebastian Fricke Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 6147bdd895df0e209110684c760c9463dadc7822 Author: Yunfei Dong Date: Mon Oct 23 11:06:39 2023 +0800 media: mediatek: vcodec: Set the supported vp9 level for each platform Set the maximum VP9 codec level for each platform. The various mediatek platforms support different levels for decoding, the level of the codec limits among others the maximum resolution, bit rate, frame rate and compression rate for the decoder. Signed-off-by: Yunfei Dong Reviewed-by: Sebastian Fricke Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 3572c870e91b9a7a5174de27a42996029133787e Author: Yunfei Dong Date: Mon Oct 23 11:06:38 2023 +0800 media: mediatek: vcodec: Set the supported h265 profile for each platform Set the maximum H265 codec profile for each platform. The various mediatek platforms support different profiles for decoding, the profile of the codec limits the capabilities for decoding. Signed-off-by: Yunfei Dong Reviewed-by: Sebastian Fricke Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit c3caa86b43f5df80d311e1207a8e02300b18d75f Author: Yunfei Dong Date: Mon Oct 23 11:06:37 2023 +0800 media: mediatek: vcodec: Set the supported h264 profile for each platform Set the maximum H264 codec profile for each platform. The various mediatek platforms support different profiles for decoding, the profile of the codec limits the capabilities for decoding. Signed-off-by: Yunfei Dong Reviewed-by: Sebastian Fricke Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 23ad34b8b019dc606f4fb4cfd183d2b2f7858ff4 Author: Yunfei Dong Date: Mon Oct 23 11:06:36 2023 +0800 media: mediatek: vcodec: Set the supported h265 level for each platform Set the maximum H265 codec level for each platform. The various mediatek platforms support different levels for decoding, the level of the codec limits among others the maximum resolution, bit rate and frame rate for the decoder. Signed-off-by: Yunfei Dong Reviewed-by: Sebastian Fricke Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit b1b37f6f23c2691245e71ea38c71a249e01e7b6e Author: Yunfei Dong Date: Mon Oct 23 11:06:35 2023 +0800 media: mediatek: vcodec: Set the supported h264 level for each platform Set the maximum H264 codec level for each platform. The various mediatek platforms support different levels for decoding, the level of the codec limits among others the maximum resolution, bit rate and frame rate for the decoder. Signed-off-by: Yunfei Dong Reviewed-by: Sebastian Fricke Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 8830bf13af87f69755df0ffca6d0169ed45ac1ee Author: Yunfei Dong Date: Mon Oct 23 11:06:34 2023 +0800 media: mediatek: vcodec: Get the chip name for each platform Store the name of the chip in the context of the driver in order to be able to choose the correct configuration values for the different codecs. Use a enum value instead of an integer to store a more descriptive name. Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Sebastian Fricke Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 3591c53ae9eccafbeffa9ae2d1899873a5076a87 Author: Sakari Ailus Date: Wed Oct 25 12:22:56 2023 +0200 media: v4l: subdev: Return NULL from pad access functions on error Return NULL from sub-device pad state access functions (v4l2_subdev_state_get_{format,crop,compose}) for non-existent pads. While this behaviour differs from older set of pad state information access functions, we've had a WARN_ON() there for a long time and callers also do validate the pad index nowadays. Therefore problems are not expected. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 34dfd1dd52660dc85d43c92c2cb8029efb2bb8f3 Author: Sakari Ailus Date: Fri Oct 13 10:09:21 2023 +0200 media: v4l: subdev: Remove stream-unaware sub-device state access Remove stream-unaware sub-device state access functions and macros. These are no longer used. [Sakari Ailus: Resolve a minor conflict in removed code.] Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit bc0e8d91feec72b19199298dca470c5816a52105 Author: Sakari Ailus Date: Fri Oct 13 09:37:10 2023 +0200 media: v4l: subdev: Switch to stream-aware state functions Switch all drivers accessing sub-device state to use the stream-aware functions. We will soon remove the old ones. This patch has been generated using the following Coccinelle script: ---------8<------------ @@ expression E1, E2, E3; @@ - v4l2_subdev_get_pad_format(E1, E2, E3) + v4l2_subdev_state_get_format(E2, E3) @@ expression E1, E2, E3; @@ - v4l2_subdev_get_pad_crop(E1, E2, E3) + v4l2_subdev_state_get_crop(E2, E3) @@ expression E1, E2, E3; @@ - v4l2_subdev_get_pad_compose(E1, E2, E3) + v4l2_subdev_state_get_compose(E2, E3) @@ expression E1, E2, E3; @@ - v4l2_subdev_get_try_format(E1, E2, E3) + v4l2_subdev_state_get_format(E2, E3) @@ expression E1, E2, E3; @@ - v4l2_subdev_get_try_crop(E1, E2, E3) + v4l2_subdev_state_get_crop(E2, E3) @@ expression E1, E2, E3; @@ - v4l2_subdev_get_try_compose(E1, E2, E3) + v4l2_subdev_state_get_compose(E2, E3) ---------8<------------ Additionally drivers/media/i2c/s5k5baf.c and drivers/media/platform/samsung/s3c-camif/camif-capture.c have been manually changed as Coccinelle didn't. Further local variables have been removed as they became unused as a result of the other changes. Also Coccinelle introduced indentation by space in files drivers/media/i2c/st-mipid02.c and drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c. This has been also corrected. The diff from Coccinelle-generated changes are: > diff --git b/drivers/media/i2c/imx319.c a/drivers/media/i2c/imx319.c > index e549692ff478..420984382173 100644 > --- b/drivers/media/i2c/imx319.c > +++ a/drivers/media/i2c/imx319.c > @@ -2001,7 +2001,6 @@ static int imx319_do_get_pad_format(struct imx319 *imx319, > struct v4l2_subdev_format *fmt) > { > struct v4l2_mbus_framefmt *framefmt; > - struct v4l2_subdev *sd = &imx319->sd; > > if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { > framefmt = v4l2_subdev_state_get_format(sd_state, fmt->pad); > diff --git b/drivers/media/i2c/imx355.c a/drivers/media/i2c/imx355.c > index 96bdde685d65..e1b1d2fc79dd 100644 > --- b/drivers/media/i2c/imx355.c > +++ a/drivers/media/i2c/imx355.c > @@ -1299,7 +1299,6 @@ static int imx355_do_get_pad_format(struct imx355 *imx355, > struct v4l2_subdev_format *fmt) > { > struct v4l2_mbus_framefmt *framefmt; > - struct v4l2_subdev *sd = &imx355->sd; > > if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { > framefmt = v4l2_subdev_state_get_format(sd_state, fmt->pad); > diff --git b/drivers/media/i2c/ov08x40.c a/drivers/media/i2c/ov08x40.c > index ca799bbcfdb7..abbb0b774d43 100644 > --- b/drivers/media/i2c/ov08x40.c > +++ a/drivers/media/i2c/ov08x40.c > @@ -2774,7 +2774,6 @@ static int ov08x40_do_get_pad_format(struct ov08x40 *ov08x, > struct v4l2_subdev_format *fmt) > { > struct v4l2_mbus_framefmt *framefmt; > - struct v4l2_subdev *sd = &ov08x->sd; > > if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { > framefmt = v4l2_subdev_state_get_format(sd_state, fmt->pad); > diff --git b/drivers/media/i2c/ov13858.c a/drivers/media/i2c/ov13858.c > index 7816d9787c61..09387e335d80 100644 > --- b/drivers/media/i2c/ov13858.c > +++ a/drivers/media/i2c/ov13858.c > @@ -1316,7 +1316,6 @@ static int ov13858_do_get_pad_format(struct ov13858 *ov13858, > struct v4l2_subdev_format *fmt) > { > struct v4l2_mbus_framefmt *framefmt; > - struct v4l2_subdev *sd = &ov13858->sd; > > if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { > framefmt = v4l2_subdev_state_get_format(sd_state, fmt->pad); > diff --git b/drivers/media/i2c/ov13b10.c a/drivers/media/i2c/ov13b10.c > index 268cd4b03f9c..c06411d5ee2b 100644 > --- b/drivers/media/i2c/ov13b10.c > +++ a/drivers/media/i2c/ov13b10.c > @@ -1001,7 +1001,6 @@ static int ov13b10_do_get_pad_format(struct ov13b10 *ov13b, > struct v4l2_subdev_format *fmt) > { > struct v4l2_mbus_framefmt *framefmt; > - struct v4l2_subdev *sd = &ov13b->sd; > > if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { > framefmt = v4l2_subdev_state_get_format(sd_state, fmt->pad); > diff --git b/drivers/media/i2c/s5c73m3/s5c73m3-core.c a/drivers/media/i2c/s5c73m3/s5c73m3-core.c > index 47605e36bc60..8f9b5713daf7 100644 > --- b/drivers/media/i2c/s5c73m3/s5c73m3-core.c > +++ a/drivers/media/i2c/s5c73m3/s5c73m3-core.c > @@ -819,7 +819,6 @@ static void s5c73m3_oif_try_format(struct s5c73m3 *state, > struct v4l2_subdev_format *fmt, > const struct s5c73m3_frame_size **fs) > { > - struct v4l2_subdev *sd = &state->sensor_sd; > u32 code; > > switch (fmt->pad) { > diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c > index 67da2045f543..03ccfb0e1e11 100644 > --- a/drivers/media/i2c/s5k5baf.c > +++ b/drivers/media/i2c/s5k5baf.c > @@ -1472,14 +1472,11 @@ static int s5k5baf_set_selection(struct v4l2_subdev *sd, > > if (sel->which == V4L2_SUBDEV_FORMAT_TRY) { > rects = (struct v4l2_rect * []) { > - &s5k5baf_cis_rect, > - v4l2_subdev_get_try_crop(sd, sd_state, > - PAD_CIS), > - v4l2_subdev_get_try_compose(sd, sd_state, > - PAD_CIS), > - v4l2_subdev_get_try_crop(sd, sd_state, > - PAD_OUT) > - }; > + &s5k5baf_cis_rect, > + v4l2_subdev_state_get_crop(sd_state, PAD_CIS), > + v4l2_subdev_state_get_compose(sd_state, PAD_CIS), > + v4l2_subdev_state_get_crop(sd_state, PAD_OUT) > + }; > s5k5baf_set_rect_and_adjust(rects, rtype, &sel->r); > return 0; > } > diff --git b/drivers/media/platform/samsung/s3c-camif/camif-capture.c a/drivers/media/platform/samsung/s3c-camif/camif-capture.c > index 295e083f38e8..be58260ea67e 100644 > --- b/drivers/media/platform/samsung/s3c-camif/camif-capture.c > +++ a/drivers/media/platform/samsung/s3c-camif/camif-capture.c > @@ -1216,7 +1216,7 @@ static int s3c_camif_subdev_get_fmt(struct v4l2_subdev *sd, > struct v4l2_mbus_framefmt *mf = &fmt->format; > > if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { > - mf = v4l2_subdev_get_try_format(sd, sd_state, fmt->pad); > + mf = v4l2_subdev_state_get_format(sd_state, fmt->pad); > fmt->format = *mf; > return 0; > } > @@ -1305,7 +1305,7 @@ static int s3c_camif_subdev_set_fmt(struct v4l2_subdev *sd, > __camif_subdev_try_format(camif, mf, fmt->pad); > > if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { > - mf = v4l2_subdev_get_try_format(sd, sd_state, fmt->pad); > + mf = v4l2_subdev_state_get_format(sd_state, fmt->pad); > *mf = fmt->format; > mutex_unlock(&camif->lock); > return 0; > diff --git b/drivers/media/platform/ti/cal/cal-camerarx.c a/drivers/media/platform/ti/cal/cal-camerarx.c > index cea454ed9c20..61433744c6c4 100644 > --- b/drivers/media/platform/ti/cal/cal-camerarx.c > +++ a/drivers/media/platform/ti/cal/cal-camerarx.c > @@ -621,8 +621,6 @@ static int cal_camerarx_sd_enum_mbus_code(struct v4l2_subdev *sd, > struct v4l2_subdev_state *state, > struct v4l2_subdev_mbus_code_enum *code) > { > - struct cal_camerarx *phy = to_cal_camerarx(sd); > - > /* No transcoding, source and sink codes must match. */ > if (cal_rx_pad_is_source(code->pad)) { > struct v4l2_mbus_framefmt *fmt; > diff --git b/drivers/staging/media/imx/imx-ic-prp.c a/drivers/staging/media/imx/imx-ic-prp.c > index dd558fac6477..61d69f19657e 100644 > --- b/drivers/staging/media/imx/imx-ic-prp.c > +++ a/drivers/staging/media/imx/imx-ic-prp.c > @@ -82,8 +82,6 @@ static struct v4l2_mbus_framefmt * > __prp_get_fmt(struct prp_priv *priv, struct v4l2_subdev_state *sd_state, > unsigned int pad, enum v4l2_subdev_format_whence which) > { > - struct imx_ic_priv *ic_priv = priv->ic_priv; > - > if (which == V4L2_SUBDEV_FORMAT_TRY) > return v4l2_subdev_state_get_format(sd_state, pad); > else > diff --git b/drivers/staging/media/imx/imx-ic-prpencvf.c a/drivers/staging/media/imx/imx-ic-prpencvf.c > index 02db7dbb884b..ec73c901079e 100644 > --- b/drivers/staging/media/imx/imx-ic-prpencvf.c > +++ a/drivers/staging/media/imx/imx-ic-prpencvf.c > @@ -790,8 +790,6 @@ static struct v4l2_mbus_framefmt * > __prp_get_fmt(struct prp_priv *priv, struct v4l2_subdev_state *sd_state, > unsigned int pad, enum v4l2_subdev_format_whence which) > { > - struct imx_ic_priv *ic_priv = priv->ic_priv; > - > if (which == V4L2_SUBDEV_FORMAT_TRY) > return v4l2_subdev_state_get_format(sd_state, pad); > else > diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c > index 9c9361354c00..b08a249b5fdd 100644 > --- a/drivers/media/i2c/st-mipid02.c > +++ b/drivers/media/i2c/st-mipid02.c > @@ -751,7 +751,7 @@ static void mipid02_set_fmt_source(struct v4l2_subdev *sd, > format->format = bridge->fmt; > else > format->format = *v4l2_subdev_state_get_format(sd_state, > - MIPID02_SINK_0); > + MIPID02_SINK_0); > > /* but code may need to be converted */ > format->format.code = serial_to_parallel_code(format->format.code); > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c > index 117912d3bfbd..96353648c032 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c > @@ -319,7 +319,7 @@ static void rkisp1_isp_start(struct rkisp1_isp *isp, > rkisp1_write(rkisp1, RKISP1_CIF_ISP_CTRL, val); > > src_fmt = v4l2_subdev_state_get_format(sd_state, > - RKISP1_ISP_PAD_SOURCE_VIDEO); > + RKISP1_ISP_PAD_SOURCE_VIDEO); > src_info = rkisp1_mbus_info_get_by_code(src_fmt->code); > > if (src_info->pixel_enc != V4L2_PIXEL_ENC_BAYER) > @@ -475,9 +475,9 @@ static void rkisp1_isp_set_src_fmt(struct rkisp1_isp *isp, > sink_fmt = v4l2_subdev_state_get_format(sd_state, > RKISP1_ISP_PAD_SINK_VIDEO); > src_fmt = v4l2_subdev_state_get_format(sd_state, > - RKISP1_ISP_PAD_SOURCE_VIDEO); > + RKISP1_ISP_PAD_SOURCE_VIDEO); > src_crop = v4l2_subdev_state_get_crop(sd_state, > - RKISP1_ISP_PAD_SOURCE_VIDEO); > + RKISP1_ISP_PAD_SOURCE_VIDEO); > > /* > * Media bus code. The ISP can operate in pass-through mode (Bayer in, Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 981e0d4c724fae1fbc281b3b25b18b041b793f4d Author: Sakari Ailus Date: Fri Nov 10 08:10:26 2023 +0100 media: v4l: subdev: Always compile sub-device state access functions Compile sub-device state information access functions v4l2_subdev_state_get_{format,crop,compose} unconditionally as they are now also used by plain V4L2 drivers. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 791765b426df4d2a1b1be0617c2c0bf2248bfaba Author: Sakari Ailus Date: Mon Oct 23 12:26:34 2023 +0200 media: v4l: subdev: Make stream argument optional in state access functions The sub-device state access functions take three arguments: sub-device state, pad and stream. The stream is not relevant for the majority of drivers and having to specify 0 for the stream is considered a nuisance. Provide a two-argument macros for these state access functions to cover the needs of stream-unaware users. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 8824170e95d72d7583bd8e897246685d3856455a Author: Sakari Ailus Date: Fri Oct 13 10:54:24 2023 +0200 media: v4l: subdev: v4l2_subdev_state_get_format always returns format now Now that v4l2_subdev_state_get_format() always returns format, don't call alternative v4l2_subdev_get_pad_format() anymore. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit d0fde6aae2bacdc024fff43461ba0f325375fa97 Author: Sakari Ailus Date: Fri Oct 13 10:16:06 2023 +0200 media: v4l: subdev: Rename sub-device state information access functions Rename the sub-devices state information access functions, removing "_stream" from them and replacing "format" by "ffmt". This makes them shorter and so more convenient to use. No other sets of functions will be needed to access this information. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 049fa16b81c276f25a09abaa4e8f743470c3cdc8 Author: Sakari Ailus Date: Fri Oct 13 09:31:37 2023 +0200 media: v4l: subdev: Also return pads array information on stream functions There are two sets of functions that return information from sub-device state, one for stream-unaware users and another for stream-aware users. Add support for stream-aware functions to return format, crop and compose information from pad-based array that are functionally equivalent to the old, stream-unaware ones. Also check state is non-NULL, in order to guard against old drivers potentially calling this with NULL state for active formats or selection rectangles. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 52c2575db8faa1d93227a92a32deb2cd66b96614 Author: Sakari Ailus Date: Fri Oct 13 09:15:48 2023 +0200 media: v4l: subdev: Store the sub-device in the sub-device state Store the sub-device in the sub-device state. This will be needed in e.g. validating pad number when retrieving information for non-stream-aware users. There are expected to be more needs for this in the future. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit aeb18af18828f65eebb3dc475c62faab9cc8e9b6 Author: Laurent Pinchart Date: Fri Oct 27 11:58:52 2023 +0200 media: i2c: Fix references to pad config V4L2 subdev operations have moved from operating on a v4l2_subdev_pad_config to a v4l2_subdev_state a long time ago. Fix the few remaining incorrect references to pad config in the I2C drivers. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cde7093bd239e2aa9eaafc33ed621bf3525f507c Author: Laurent Pinchart Date: Fri Oct 27 11:58:51 2023 +0200 media: ti: omap4iss: Fix references to pad config V4L2 subdev operations have moved from operating on a v4l2_subdev_pad_config to a v4l2_subdev_state a long time ago. Fix remaining incorrect references to pad config in comments. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit bb118e86dfcc096b8a3889c1a5c88f214e1f65fa Author: Laurent Pinchart Date: Fri Oct 27 11:58:50 2023 +0200 media: ti: omap3isp: Fix references to pad config V4L2 subdev operations have moved from operating on a v4l2_subdev_pad_config to a v4l2_subdev_state a long time ago. Fix remaining incorrect references to pad config in comments. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c1d9681407be6484055980e1bec068522d9bc36f Author: Laurent Pinchart Date: Fri Oct 27 11:58:48 2023 +0200 media: qcom: camss: Fix references to pad config V4L2 subdev operations have moved from operating on a v4l2_subdev_pad_config to a v4l2_subdev_state a long time ago. Fix remaining incorrect references to pad config in comments. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c1ac5298867b955e8551bc4a93fcd739ea5db85a Author: Laurent Pinchart Date: Fri Oct 27 11:58:47 2023 +0200 media: v4l2-subdev: Fix references to pad config V4L2 subdev operations have moved from operating on a v4l2_subdev_pad_config to a v4l2_subdev_state a long time ago. Fix the few remaining incorrect references to pad config in the documentation. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e5c51f0bb2e4f68218e49167c63b85f3adcbebfa Author: Laurent Pinchart Date: Fri Oct 27 11:58:46 2023 +0200 media: xilinx: csi2rxss: Drop comment blocks for subdev op handlers The V4L2 subdev operation handlers have short documentation blocks that merely duplicates information from the V4L2 subdev API documentation. They offer no value, and are prone to bit-rotting as shown by the ixcsi2rxss_set_format() documentation being incorrect. Drop them. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 274ee48e4ca9d031a6a957f5f33116049d02a284 Author: Laurent Pinchart Date: Fri Oct 27 11:58:45 2023 +0200 media: ipu3-cio2: Drop comment blocks for subdev op handlers The V4L2 subdev .get_fmt() and .set_fmt() pad operation handlers have a short documentation block that merely duplicates information from the V4L2 subdev API documentation. They offer no value, and are prone to bit-rotting as shown by the @cfg parameter documentation being outdated. Drop them. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6078b2b803dba5f3fa62f652d931120fc1f0137d Author: Laurent Pinchart Date: Tue Oct 24 00:17:12 2023 +0200 media: v4l2-subdev: Drop outdated comment for v4l2_subdev_pad_config The v4l2_subdev_pad_config structure is not passed to subdev operations anymore. Drop an outdated comment to refers to that old mechanism. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 36f2cd3bd496348a4ff8e1de9b23955bd641ce42 Author: Laurent Pinchart Date: Mon Oct 23 23:40:11 2023 +0200 media: v4l2-subdev: Rename pad config 'try_*' fields The try_fmt, try_crop and try_compose fields of the v4l2_subdev_pad_config structure are misnamed (for historical reason) as they also store data for the subdev active configuration. Rename them to format, crop and compose respectively and update the accessor helpers. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit fd17e3a9a7886ec949ce269a396b67875b51ff45 Author: Laurent Pinchart Date: Mon Oct 23 23:40:10 2023 +0200 media: i2c: Use accessors for pad config 'try_*' fields The 'try_*' fields of the v4l2_subdev_pad_config structure are meant to be accessed through helper functions. Replace direct access with usage of the v4l2_subdev_get_pad_format(), v4l2_subdev_get_pad_crop() and v4l2_subdev_get_pad_compose() helpers. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 0623979d8352efe18f83c4fad95a2e61df17b3e7 Author: Laurent Pinchart Date: Mon Oct 23 23:40:09 2023 +0200 media: tegra-video: Use accessors for pad config 'try_*' fields The 'try_*' fields of the v4l2_subdev_pad_config structure are meant to be accessed through helper functions. Replace direct access with usage of the v4l2_subdev_get_pad_format(), v4l2_subdev_get_pad_crop() and v4l2_subdev_get_pad_compose() helpers. Signed-off-by: Laurent Pinchart Reviewed-by: Luca Ceresoli Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9295e7e0cc38be1e99e330a0ccefa90569ffc91d Author: Laurent Pinchart Date: Mon Oct 23 23:40:08 2023 +0200 media: atomisp: Use accessors for pad config 'try_*' fields The 'try_*' fields of the v4l2_subdev_pad_config structure are meant to be accessed through helper functions. Replace direct access with usage of the v4l2_subdev_get_pad_format(), v4l2_subdev_get_pad_crop() and v4l2_subdev_get_pad_compose() helpers. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f4b7c07dc19f70ba8fb3f290f76f6199e8090795 Author: Laurent Pinchart Date: Mon Oct 23 23:40:07 2023 +0200 media: atmel-isc: Use accessors for pad config 'try_*' fields The 'try_*' fields of the v4l2_subdev_pad_config structure are meant to be accessed through helper functions. Replace direct access with usage of the v4l2_subdev_get_pad_format(), v4l2_subdev_get_pad_crop() and v4l2_subdev_get_pad_compose() helpers. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 098a1eed5daeb62e2c974f6c37d3b0d582c5586e Author: Laurent Pinchart Date: Mon Oct 23 23:40:06 2023 +0200 media: microchip-isc: Use accessors for pad config 'try_*' fields The 'try_*' fields of the v4l2_subdev_pad_config structure are meant to be accessed through helper functions. Replace direct access with usage of the v4l2_subdev_get_pad_format(), v4l2_subdev_get_pad_crop() and v4l2_subdev_get_pad_compose() helpers. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit f9c12d6783580f22f283bfc733fdd6c41a0c690d Author: Laurent Pinchart Date: Mon Oct 23 23:40:05 2023 +0200 media: atmel-isi: Use accessors for pad config 'try_*' fields The 'try_*' fields of the v4l2_subdev_pad_config structure are meant to be accessed through helper functions. Replace direct access with usage of the v4l2_subdev_get_pad_format(), v4l2_subdev_get_pad_crop() and v4l2_subdev_get_pad_compose() helpers. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b26ca735195bd2ffd57539b4ac5565cd40a1fffd Merge: c79b972eb88b0 815d8b0425ad1 Author: Daniel Vetter Date: Thu Nov 23 18:10:39 2023 +0100 Merge tag 'drm-misc-next-2023-11-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.8: UAPI Changes: Cross-subsystem Changes: Core Changes: - Drop deprecated drm_kms_helper.edid_firmware module parameter Driver Changes: - Convert platform drivers remove callback to return void - imagination: Introduction of the Imagination GPU Support - rockchip: - rk3066_hdmi: Convert to atomic - vop2: Support NV20 and NV30 - panel: - elida-kd35t133: PM reworks - New panels: Powkiddy RK2023 Signed-off-by: Daniel Vetter From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/drzvrbsej2txf6a6npc4ukkpadj3wio7edkjbgsfdm4l33szpe@fgwtdy5z5ev7 commit 475c58e1a471e9b873e3e39958c64a2d278275c8 Author: Arnd Bergmann Date: Wed Nov 22 23:19:53 2023 +0100 EDAC/thunderx: Fix possible out-of-bounds string access Enabling -Wstringop-overflow globally exposes a warning for a common bug in the usage of strncat(): drivers/edac/thunderx_edac.c: In function 'thunderx_ocx_com_threaded_isr': drivers/edac/thunderx_edac.c:1136:17: error: 'strncat' specified bound 1024 equals destination size [-Werror=stringop-overflow=] 1136 | strncat(msg, other, OCX_MESSAGE_SIZE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... 1145 | strncat(msg, other, OCX_MESSAGE_SIZE); ... 1150 | strncat(msg, other, OCX_MESSAGE_SIZE); ... Apparently the author of this driver expected strncat() to behave the way that strlcat() does, which uses the size of the destination buffer as its third argument rather than the length of the source buffer. The result is that there is no check on the size of the allocated buffer. Change it to strlcat(). [ bp: Trim compiler output, fixup commit message. ] Fixes: 41003396f932 ("EDAC, thunderx: Add Cavium ThunderX EDAC driver") Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20231122222007.3199885-1-arnd@kernel.org commit 62b14b9e86a1c94b1a2f41a52adcfda822a9863e Author: Sudeep Holla Date: Thu Nov 23 12:08:47 2023 +0000 firmware: arm_scpi: Move power-domain driver to the pmdomain dir To simplify with maintenance let's move the Arm SCPI power-domain driver to the new pmdomain directory. Note this is different from and precedes the new Arm SCMI protocol. Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20231123120847.2825444-2-sudeep.holla@arm.com Signed-off-by: Ulf Hansson commit 820cec125970b37cbbd0fa026b314c5e6094fcbf Author: Sudeep Holla Date: Thu Nov 23 12:08:46 2023 +0000 pmdomain: arm_scmi: Move Kconfig options to the pmdomain subsystem The Kconfig options belongs closer to the corresponding implementations, hence let's move them from the firmware to the pmdomain subsystem. Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20231123120847.2825444-1-sudeep.holla@arm.com Signed-off-by: Ulf Hansson commit e60b6c183e1d2925c94987d2754ae1378c0181b7 Author: Sibi Sankar Date: Thu Nov 23 15:30:21 2023 +0530 pmdomain: qcom: rpmhpd: Update part number to X1E80100 There was a recent part number update from SC8380XP to X1E80100 and as a result of which SC8380xp prefix introduced in the rpmhpd driver is no longer correct. Update it to X1E80100, to reflect the bindings change. Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231123100021.10918-3-quic_sibis@quicinc.com Signed-off-by: Ulf Hansson commit 3d123f513af055b4c085b555f9c856bbd7390536 Author: Sibi Sankar Date: Thu Nov 23 15:30:20 2023 +0530 dt-bindings: power: rpmpd: Update part number to X1E80100 There was a recent part number update from SC8380XP to X1E80100 and as a result of which the SC8380xp rpmpd bindings introduced is no longer correct. Given that it currently has no users, it was agreed that it can be updated to the correct part number (X1E80100) without causing any binding breakage. Signed-off-by: Sibi Sankar Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231123100021.10918-2-quic_sibis@quicinc.com Signed-off-by: Ulf Hansson commit e4d983acffff270ccee417445a69b9ed198658b1 Author: Simon Ser Date: Wed Nov 22 13:19:40 2023 -0300 drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP This new kernel capability indicates whether async page-flips are supported via the atomic uAPI. DRM clients can use it to check for support before feeding DRM_MODE_PAGE_FLIP_ASYNC to the kernel. Make it clear that DRM_CAP_ASYNC_PAGE_FLIP is for legacy uAPI only. Signed-off-by: Simon Ser Reviewed-by: André Almeida Reviewed-by: Alex Deucher Signed-off-by: André Almeida Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20231122161941.320564-4-andrealmeid@igalia.com commit 4b4af74ab9719d17538a97f43137e93296ec7437 Author: Simon Ser Date: Wed Nov 22 13:19:39 2023 -0300 drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits If the driver supports it, allow user-space to supply the DRM_MODE_PAGE_FLIP_ASYNC flag to request an async page-flip. Set drm_crtc_state.async_flip accordingly. Document that drivers will reject atomic commits if an async flip isn't possible. This allows user-space to fall back to something else. For instance, Xorg falls back to a blit. Another option is to wait as close to the next vblank as possible before performing the page-flip to reduce latency. Signed-off-by: Simon Ser Reviewed-by: Alex Deucher Co-developed-by: André Almeida Signed-off-by: André Almeida Link: https://patchwork.freedesktop.org/patch/msgid/20231122161941.320564-3-andrealmeid@igalia.com commit 0e26cc72c71cb98e951716a6596060cd04b0ba6b Author: André Almeida Date: Wed Nov 22 13:19:38 2023 -0300 drm: Refuse to async flip with atomic prop changes Given that prop changes may lead to modesetting, which would defeat the fast path of the async flip, refuse any atomic prop change for async flips in atomic API. The only exception is the framebuffer ID to flip to. Currently the only plane type supported is the primary one. Signed-off-by: André Almeida Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20231122161941.320564-2-andrealmeid@igalia.com commit 58793f263abc8e5233fabf7466219202db09d048 Author: Alexander Stein Date: Fri Nov 17 13:06:25 2023 +0100 backlight: pwm_bl: Use dev_err_probe Use dev_err_probe to simplify error paths. Also let dev_err_probe handle the -EPROBE_DEFER case and add an entry to /sys/kernel/debug/devices_deferred when deferred. Signed-off-by: Alexander Stein Reviewed-by: Uwe Kleine-König Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20231117120625.2398417-1-alexander.stein@ew.tq-group.com Signed-off-by: Lee Jones commit 388a1fb7da6aaa1970c7e2a7d7fcd983a87a8484 Author: Peter Zijlstra Date: Wed Nov 22 11:07:56 2023 +0100 perf: Fix the nr_addr_filters fix Thomas reported that commit 652ffc2104ec ("perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file") made the entire attribute group vanish, instead of only the nr_addr_filters attribute. Additionally a stray return. Insufficient coffee was involved with both writing and merging the patch. Fixes: 652ffc2104ec ("perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file") Reported-by: Thomas Richter Signed-off-by: Peter Zijlstra (Intel) Tested-by: Thomas Richter Link: https://lkml.kernel.org/r/20231122100756.GP8262@noisy.programming.kicks-ass.net commit 2e914516a58cf86bd0e42c7d3e25c81d44ec2ab8 Author: Flavio Suligoi Date: Thu Nov 16 11:53:19 2023 +0100 backlight: mp3309c: Add support for MPS MP3309C The Monolithic Power (MPS) MP3309C is a WLED step-up converter, featuring a programmable switching frequency to optimize efficiency. The brightness can be controlled either by I2C commands (called "analog" mode) or by a PWM input signal (PWM mode). This driver supports both modes. For DT configuration details, please refer to: - Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml The datasheet is available at: - https://www.monolithicpower.com/en/mp3309c.html Signed-off-by: Flavio Suligoi Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20231116105319.957600-3-f.suligoi@asem.it Signed-off-by: Lee Jones commit 87f33a1b8f7e3d223fc331fe54fd8ec337dc9cb9 Author: Flavio Suligoi Date: Thu Nov 16 11:53:18 2023 +0100 dt-bindings: backlight: mp3309c: Remove two required properties The two properties: - max-brightness - default brightness are not really required, so they can be removed from the "required" section. The "max-brightness" is no longer used in the current version of the driver (it was used only in the first version). The "default-brightness", if omitted in the DT, is managed by the device driver, using a default value. This value depends on the dimming mode used: - for the "analog mode", via I2C commands, this value is fixed by hardware (=31) - while in case of pwm mode the default used is the last value of the brightness-levels array. Also the brightness-levels array is not required: - in "analog mode", via I2C commands, the brightness-level array is fixed by hardware (0..31).; - in pwm dimming mode, the driver uses a default array of 0..255 and the "default-brightness" is the last one, which is "255" NOTE: there are no compatibility problems with the previous version, since the device driver has not yet been included in any kernel. Only this dt-binding yaml file is already included in the current v6.7.0-rc1 kernel version. No developer may have used it. Other changes: - improve the backlight working mode description, in the "description" section - update the example, removing the "max-brightness" and introducing the "brightess-levels" property Signed-off-by: Flavio Suligoi Acked-by: Conor Dooley Reviewed-by: Daniel Thompson Link: https://lore.kernel.org/r/20231116105319.957600-2-f.suligoi@asem.it Signed-off-by: Lee Jones commit 280b4e4a9e8009affd8f20ec2d467cb4deb05c1c Author: Benjamin Gray Date: Tue Sep 12 16:07:59 2023 +1000 perf tools: Address python 3.6 DeprecationWarning for string scapes Python 3.6 introduced a DeprecationWarning for invalid escape sequences. This is upgraded to a SyntaxWarning in Python 3.12, and will eventually be a syntax error. Fix these now to get ahead of it before it's an error. Signed-off-by: Benjamin Gray Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andrii Nakryiko Cc: Hartley Sweeten Cc: Ian Abbott Cc: Ian Rogers Cc: Ingo Molnar Cc: Jan Kiszka Cc: Jiri Olsa Cc: Jonathan Corbet Cc: Kieran Bingham Cc: Mark Rutland Cc: Mykola Lysenko Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Shuah Khan Cc: Todd E Brandt Cc: Tom Rix Cc: linux-doc@vger.kernel.org Cc: linux-ia64@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230912060801.95533-6-bgray@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit b43d958fbc2359e68d97cc0ce9f05cb4a0b23cbc Author: Stefan Wahren Date: Sun Oct 29 13:48:37 2023 +0100 staging: vchiq_arm: move state dump to debugfs Besides the IOCTL interface the VCHIQ character device also provides a state dump of the whole VCHIQ driver via read. Moving the state dump function to debugfs has a lot advantages: - following changes on state dump doesn't break userspace ABI - debug doesn't depend on VCHIQ_CDEV - dump code simplifies a lot and reduce the chance of buffer overflows Signed-off-by: Stefan Wahren Tested-by: "Ricardo B. Marliere" Link: https://lore.kernel.org/r/20231029124837.119832-4-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 20b68a673a6bd346685f3ae980c457cb6e1794ca Author: Stefan Wahren Date: Sun Oct 29 13:48:36 2023 +0100 staging: vchiq_core: Shorten bulk TX/RX pending dump The calculation for the bulk TX/RX pending is complex and reaches 99 chars per line. So move the size determination below the pending calculation and get the rid of the ternary operator. Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20231029124837.119832-3-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit 9996f0044f344a64377abafec252a753380d3098 Author: Stefan Wahren Date: Sun Oct 29 13:48:35 2023 +0100 staging: vchiq_core: Make vchiq_dump_service_state static The function vchiq_dump_service_state() is only used by vchiq_dump_state() within vchiq_core.c. So move the definition of vchiq_dump_state() below vchiq_dump_service_state() in order to make it static. Suggested-by: Laurent Pinchart Signed-off-by: Stefan Wahren Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20231029124837.119832-2-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman commit deac453244d309ad7a94d0501eb5e0f9d8d1f1df Author: Ville Syrjälä Date: Fri Oct 13 16:14:02 2023 +0300 drm/i915: Fix glk+ degamma LUT conversions The current implementation of change_lut_val_precision() is just a convoluted way of shifting by 8. Implement the proper rounding by just using drm_color_lut_extract() and intel_color_lut_pack() like everyone else does. And as the uapi can't handle >=1.0 values but the hardware can we need to clamp the results appropriately in the readout path. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231013131402.24072-5-ville.syrjala@linux.intel.com Reviewed-by: Chaitanya Kumar Borah Reviewed-by: Jani Nikula commit 5d76c8163f09cfee7dbc1870a1154c2ca443528b Author: Ville Syrjälä Date: Fri Oct 13 16:14:01 2023 +0300 drm/i915: s/clamp()/min()/ in i965_lut_11p6_max_pack() Use min() instead of clamp() since the color values involved are unsigned. No functional changes. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231013131402.24072-4-ville.syrjala@linux.intel.com Reviewed-by: Chaitanya Kumar Borah Reviewed-by: Jani Nikula commit edc2b74a535a87110a70757ff535aaa47c34e66d Author: Ville Syrjälä Date: Fri Oct 13 16:14:00 2023 +0300 drm/i915: Adjust LUT rounding rules drm_color_lut_extract() rounding was changed to follow the OpenGL int<->float conversion rules. Adjust intel_color_lut_pack() to match. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231013131402.24072-3-ville.syrjala@linux.intel.com Reviewed-by: Chaitanya Kumar Borah Reviewed-by: Jani Nikula commit c6fbb6bca10838485b820e8a26c23996f77ce580 Author: Ville Syrjälä Date: Fri Oct 13 16:13:59 2023 +0300 drm: Fix color LUT rounding The current implementation of drm_color_lut_extract() generates weird results. Eg. if we go through all the values for 16->8bpc conversion we see the following pattern: in out (count) 0 - 7f -> 0 (128) 80 - 17f -> 1 (256) 180 - 27f -> 2 (256) 280 - 37f -> 3 (256) ... fb80 - fc7f -> fc (256) fc80 - fd7f -> fd (256) fd80 - fe7f -> fe (256) fe80 - ffff -> ff (384) So less values map to 0 and more values map 0xff, which doesn't seem particularly great. To get just the same number of input values to map to the same output values we'd just need to drop the rounding entrirely. But perhaps a better idea would be to follow the OpenGL int<->float conversion rules, in which case we get the following results: in out (count) 0 - 80 -> 0 (129) 81 - 181 -> 1 (257) 182 - 282 -> 2 (257) 283 - 383 -> 3 (257) ... fc7c - fd7c -> fc (257) fd7d - fe7d -> fd (257) fe7e - ff7e -> fe (257) ff7f - ffff -> ff (129) Note that since the divisor is constant the compiler is able to optimize away the integer division in most cases. The only exception is the _ULL() case on 32bit architectures since that gets emitted as inline asm via do_div() and thus the compiler doesn't get to optimize it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231013131402.24072-2-ville.syrjala@linux.intel.com Reviewed-by: Chaitanya Kumar Borah Reviewed-by: Jani Nikula Acked-by: Maxime Ripard commit 85884871921000b9bca2184077b1159771e50047 Author: Christian Brauner Date: Wed Nov 22 13:48:22 2023 +0100 i915: make inject_virtual_interrupt() void The single caller of inject_virtual_interrupt() ignores the return value anyway. This allows us to simplify eventfd_signal() in follow-up patches. Link: https://lore.kernel.org/r/20231122-vfs-eventfd-signal-v2-1-bd549b14ce0c@kernel.org Reviewed-by: Jan Kara Reviewed-by: Zhenyu Wang Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit f033c87fda47e272bb4f75dc7b03677261d91158 Author: Alexander Stein Date: Tue Nov 7 08:15:21 2023 +0100 media: amphion: Fix VPU core alias name Starting with commit f6038de293f2 ("arm64: dts: imx8qm: Fix VPU core alias name") the alias for VPU cores uses dashes instead of underscores. Adjust the alias stem accordingly. Fixes the errors: amphion-vpu-core 2d040000.vpu-core: can't get vpu core id amphion-vpu-core 2d050000.vpu-core: can't get vpu core id Fixes: f6038de293f2 ("arm64: dts: imx8qm: Fix VPU core alias name") Signed-off-by: Alexander Stein Reviewed-by: Ming Qian Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e3234e547a4db0572e271e490d044bdb4cb7233b Author: Heiner Kallweit Date: Wed Nov 8 07:42:37 2023 +0100 media: exynos4-is: fimc-is-i2c: remove I2C_CLASS_SPD support This I2C bus is used by the firmware only and it seems I2C_CLASS_SPD device auto-detection has never been used. So we can safely remove it. That's one further step towards removing I2C_CLASS_SPD completely. Signed-off-by: Heiner Kallweit Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1fb7b5ab62113b29ce331464048d8c39e58fd08a Author: Paul Kocialkowski Date: Thu Nov 9 21:16:40 2023 +0100 media: rkvdec: Hook the (TRY_)DECODER_CMD stateless ioctls The (TRY_)DECODER_CMD ioctls are used to support flushing when holding capture buffers is supported. This is the case of this driver but the ioctls were never hooked to the ioctl ops. Add them to correctly support flushing. Fixes: ed7bb87d3d03 ("media: rkvdec: Enable capture buffer holding for H264") Signed-off-by: Paul Kocialkowski Reviewed-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6c0d9e12b1d12bbd95484e4b99f63feeb423765f Author: Paul Kocialkowski Date: Thu Nov 9 21:16:39 2023 +0100 media: verisilicon: Hook the (TRY_)DECODER_CMD stateless ioctls The (TRY_)DECODER_CMD ioctls are used to support flushing when holding capture buffers is supported. This is the case of this driver but the ioctls were never hooked to the ioctl ops. Add them to correctly support flushing. Fixes: 340ce50f75a6 ("media: hantro: Enable HOLD_CAPTURE_BUF for H.264") Signed-off-by: Paul Kocialkowski Reviewed-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3907f6ef8e0d55a88cdb0f7238363d24e26790ca Author: Paul Kocialkowski Date: Thu Nov 9 21:16:38 2023 +0100 media: visl: Hook the (TRY_)DECODER_CMD stateless ioctls The (TRY_)DECODER_CMD ioctls are used to support flushing when holding capture buffers is supported. This is the case of this driver but the ioctls were never hooked to the ioctl ops. Add them to correctly support flushing. Fixes: 0c078e310b6d ("media: visl: add virtual stateless decoder driver") Signed-off-by: Paul Kocialkowski Reviewed-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 12b7142e679f8184b42de6750e44a4fc67ebc4e4 Author: Juha-Pekka Heikkila Date: Thu Nov 16 17:02:25 2023 +0200 drm/i915/display: In intel_framebuffer_init switch to use intel_bo_to_drm_bo We are preparing for Xe driver. I915 and Xe object implementation are differing. Use intel_bo_to_drm_bo instead of &obj->base. Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Jouni Högander Reviewed-by: Uma Shankar Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20231116150225.204233-3-juhapekka.heikkila@gmail.com commit 185b24883e278ba298c073164d1e1abacc986d9f Author: Juha-Pekka Heikkila Date: Thu Nov 16 17:02:24 2023 +0200 drm/i915/display: in skl_surf_address check for dpt-vma touch dpt_vma->node only if dpt-vma is not NULL Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Jouni Högander Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20231116150225.204233-2-juhapekka.heikkila@gmail.com commit 1aba67132cbc46856dfa8f904cd7021a75b1806d Author: Juha-Pekka Heikkila Date: Thu Nov 16 17:02:23 2023 +0200 drm/i915/display: Separate xe and i915 common dpt code into own file Here created intel_dpt_common.c to hold intel_dpt_configure which is needed for both xe and i915. Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Jouni Högander Signed-off-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20231116150225.204233-1-juhapekka.heikkila@gmail.com commit b000ef3ca57a495deac01578f6c328b85090ecb9 Author: Bagas Sanjaya Date: Mon Nov 13 16:38:38 2023 +0700 drivers: staging: vme_user: Describe VME_BUS and VME_TSI148 Help description for both options only tells users to enable them without description of what VME bridge and TSI148 device are. Briefly describe them. Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20231113093839.7687-1-bagasdotme@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2a4033b2d4c998d03cabe5799ae7de99f4f3254b Author: Dan Carpenter Date: Tue Oct 31 11:59:34 2023 +0300 staging: vc04_services: remove unnecessary NULL check We ensured that "service" as non-NULL in the previous if statement so there is no need to check again here. Signed-off-by: Dan Carpenter Reviewed-by: Umang Jain Link: https://lore.kernel.org/r/1dff4d9b-d067-4525-95e0-ffdc1185cccd@moroto.mountain Signed-off-by: Greg Kroah-Hartman commit 84353aeeb5502fb2f4b2022c5062c09f4936bc4e Author: Pavan Bobba Date: Tue Oct 31 11:04:34 2023 +0530 staging: vt6655: Type encoding info dropped from variable name "apTailTD" variable name "apTailTD" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/482553f089fe86dc7ebecd96c9397cfaa9c7bdf9.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3ca35c28163a39e38e36386a7cc8889a30f3be53 Author: Pavan Bobba Date: Tue Oct 31 11:04:33 2023 +0530 staging: vt6655: Type encoding info dropped from variable name "pCurrTD" variable name "pCurrTD" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/06dc61ae807dcaa1dd8fdbf18686f0f4c20be634.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit 157327d09977ea91dfa110b78908596d7b92ae57 Author: Pavan Bobba Date: Tue Oct 31 11:04:32 2023 +0530 staging: vt6655: Type encoding info dropped from function name "CARDvSafeResetTx" function name "CARDvSafeResetTx" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/785a163ab01555bd0a7ed87484d727560d22cd95.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit ac491ce137218fe4ebb6333b46658a5bf4bfc2b9 Author: Pavan Bobba Date: Tue Oct 31 11:04:31 2023 +0530 staging: vt6655: Type encoding info dropped from function name "CARDbRadioPowerOff" function name "CARDbRadioPowerOff" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/5b264db5a6d5ac936e02f0a7f465e648504a049e.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit 862aa279cf3d7eb24d95740ea97cfe159bbca0c1 Author: Pavan Bobba Date: Tue Oct 31 11:04:30 2023 +0530 staging: vt6655: Type encoding info dropped from function name "CARDqGetNextTBTT" function name "CARDqGetNextTBTT" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/8e142b33245e6933fb178080b0b14371939a84e6.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4ef985fa1faf8c7659404d25db950989d33a6097 Author: Pavan Bobba Date: Tue Oct 31 11:04:29 2023 +0530 staging: vt6655: Type encoding info dropped from variable name "qwNextTBTT" variable name "qwTSFOffset" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/6b1fe342f7577c46a980cdc1bee0c7f560f05d87.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit 272b281abdf6fc5b86b916e52ce305b783c06c43 Author: Pavan Bobba Date: Tue Oct 31 11:04:28 2023 +0530 staging: vt6655: Type encoding info dropped from variable name "wBeaconInterval" variable name "wBeaconInterval" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/a8aa6227fb8dadfdebb0a6ab74cff9730358c765.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit b6f0032e047a015e9d7eb9cab652f54664ec7cc8 Author: Pavan Bobba Date: Tue Oct 31 11:04:27 2023 +0530 staging: vt6655: Type encoding info dropped from function name "CARDbSetBeaconPeriod" function name "CARDbSetBeaconPeriod" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/8d4c10ac86f80bb46d5cb1f18079276c3326e5dd.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit 314b805e699b2b12355b944830b3735bfe92eb5b Author: Pavan Bobba Date: Tue Oct 31 11:04:26 2023 +0530 staging: vt6655: Type encoding info dropped from function name "CARDqGetTSFOffset" function name "CARDqGetTSFOffset" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/b6b86bd65669cae59ca10171ecee8aa4a13c4a26.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit efafcb553e9effaa2907378da44839efb166ed92 Author: Pavan Bobba Date: Tue Oct 31 11:04:25 2023 +0530 staging: vt6655: Type encoding info dropped from variable name "qwTSFOffset" variable name "qwTSFOffset" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/035b910c92233a7252a4b312e0cfe5adbcbbae79.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit 89abfc0ab58228728c6e3fec9fb5be3064459bd9 Author: Pavan Bobba Date: Tue Oct 31 11:04:24 2023 +0530 staging: vt6655: Type encoding info dropped from variable name "qwBSSTimestamp" variable name "qwBSSTimestamp" updated like below: a.type encoding info dropped from name b.camelcase name replaced by snakecase Issue found by checkpatch Signed-off-by: Pavan Bobba Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/977e5e538610d28dce6a02a6d475ee336fc0899c.1698730318.git.opensource206@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6025bef95f6c7426b14a22ca91b18d6dd7833392 Author: Philipp Hortmann Date: Sun Nov 19 23:16:05 2023 +0100 staging: rtl8192e: Remove unused variable bss_start_channel Remove unused variable bss_start_channel. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/a13a8421d43ef1baa2077af1d4955059eba52d79.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c9f0347799f5ceb3fc347f79e1eea30bf2ae145 Author: Philipp Hortmann Date: Sun Nov 19 23:15:53 2023 +0100 staging: rtl8192e: Remove unused struct chnl_txpow_triple Remove unused struct chnl_txpow_triple. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/f66c7cd95ae460ccb376e9edce11b2b955c908cc.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 30df513356a70b34ea6c937f8e7b6e413b257214 Author: Philipp Hortmann Date: Sun Nov 19 23:15:47 2023 +0100 staging: rtl8192e: Remove unused function dot11d_init() The variable dot11d_info->channel_map is initialized in dot11d_init() and in dot11d_channel_map(). dot11d_init() is called only once just before dot11d_channel_map(). Therefore dot11d_init() can be removed. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/d2e8d81ec9eefc7b7eeb9f6fd6a28b28db6b40f0.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1e8d81e8c9ec127a54e21f0370ba40540dcd0ad1 Author: Philipp Hortmann Date: Sun Nov 19 23:15:39 2023 +0100 staging: rtl8192e: Remove unused variable global_domain global_domain is initialized to false and then never used. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/5e7a0753ed9d6d934203fe29ab8ecef41090f055.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit cc0a157ecf3ea5a91a42a0e9e256675e6390d6dd Author: Philipp Hortmann Date: Sun Nov 19 23:15:32 2023 +0100 staging: rtl8192e: Remove unused variable country_watchdog country_watchdog is initialized to 0 and then never changed. Remove related macros and functions. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/958f2ebbedb51e71e11479f734b4df27484160e1.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit cea57157fa7af3eba8f386642937f4964df4ce90 Author: Philipp Hortmann Date: Sun Nov 19 23:15:26 2023 +0100 staging: rtl8192e: Remove unused variables from struct rt_dot11d_info Remove unused variables country_len, country_buffer, country_src_addr and max_tx_power_list. Remove comments about usage as well. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/eeb9915d68c353554973e1056893371d15381f88.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 49dd5a89cc35f2b2e0e3f4f1390cd000819a052a Author: Philipp Hortmann Date: Sun Nov 19 23:15:21 2023 +0100 staging: rtl8192e: Remove unused variable dot11d_info->state Remove unused variable dot11d_info->state. Remove unused enum dot11d_state as well. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/2f1d4851a7a370c5ef367568c2b098bb9fbf0ce7.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8d0a43cb658de4dfb8f5729419760b6bef9c8358 Author: Philipp Hortmann Date: Sun Nov 19 23:15:15 2023 +0100 staging: rtl8192e: Remove unused function copy_mac_addr() Remove unused function copy_mac_addr(). Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/d157456121388489784ce34e5f3daf91126f80d7.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 788c6a2e7b39ded3322734284312022e88306f2c Author: Philipp Hortmann Date: Sun Nov 19 23:15:10 2023 +0100 staging: rtl8192e: Remove unused macros IS_EQUAL_CIE_SRC and friends Remove unused macros IS_EQUAL_CIE_SRC, UPDATE_CIE_WATCHDOG, UPDATE_CIE_SRC and IS_COUNTRY_IE_VALID. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/6d514e946983fb8ef4a3d7d3cb2774261a593d2f.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae5bac7425fd7387c1787198d2b9bf8df6de60f4 Author: Philipp Hortmann Date: Sun Nov 19 23:15:02 2023 +0100 staging: rtl8192e: Remove unused function dot11d_reset() Remove unused function dot11d_reset(). Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/09306a7f674e0cf1244c47ef8ddfc5ae147124f8.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2ce570f8d5dcb5cd6d2e92d14a6dd2182c04c719 Author: Philipp Hortmann Date: Sun Nov 19 23:14:56 2023 +0100 staging: rtl8192e: Remove unused function dot11d_scan_complete() Remove unused function dot11d_scan_complete(). Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/065a8223b80730360ee3223067ee612737e777a7.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b7bba314def8f4fb6c4ced6f25083e852146a5d3 Author: Philipp Hortmann Date: Sun Nov 19 23:14:51 2023 +0100 staging: rtl8192e: Remove IS_DOT11D_ENABLE(ieee) Variable "enabled" is initialized to false and never changed. Therefore IS_DOT11D_ENABLE(ieee) returns always false. Remove dead code. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/9e737b2246e0b73c3ad84a4ee09f5e94bf778b3c.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit f6b64c978890ec0f1951b55f1cbfd9f64fdf79fa Author: Philipp Hortmann Date: Sun Nov 19 23:14:42 2023 +0100 staging: rtl8192e: Remove unused function dot11d_update_country() Remove unused function dot11d_update_country(). Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/364462eae2271f3925b362a439ec27d50dd899ef.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit db295ab87c909a32f416b29194a36f1cab538b38 Author: Philipp Hortmann Date: Sun Nov 19 23:14:36 2023 +0100 staging: rtl8192e: Remove unexecuted rtllib_extract_country_ie() Variable "enabled" is initialized to false and never changed. Therefore IS_DOT11D_ENABLE(ieee) returns always false. Because of this all code in rtllib_extract_country_ie() is never executed. Signed-off-by: Philipp Hortmann Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/7b88c62d3cc5c3fb670b5448c7381c7c099b3518.1700431464.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit bcccdf447e7edc373e48426518cf6ad65a48d234 Author: Philipp Hortmann Date: Sat Nov 18 09:52:08 2023 +0100 staging: rtl8192e: Remove constant index from channel_array[] Used index of channel_array[] is always COUNTRY_CODE_WORLD_WIDE_13. Remove index and store only used entry in channel_array. This shortens the code and increases readability. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/379293f2b48d176aaafb023d36aac9bb057f67c7.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0bdd71630a51b4f230a0df86ad9f76a63f713f59 Author: Philipp Hortmann Date: Sat Nov 18 09:52:01 2023 +0100 staging: rtl8192e: Remove switch for a constant in dot11d_channel_map() Remove switch for a constant in dot11d_channel_map() as the result will always be the same. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d81caa0894bdaaca471010cb3512f3459a2e7df4.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7e655d4a801d7bc0eb146c061dc784a8747bf82e Author: Philipp Hortmann Date: Sat Nov 18 09:51:54 2023 +0100 staging: rtl8192e: Remove check if channel_array[channel_plan].len != 0 channel_plan is constant COUNTRY_CODE_WORLD_WIDE_13. Remove equation to check length of array as it is always not 0. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0cfcc32a06033908c469ef0273de2485dbfd6b82.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 89d132c7b0463ee5a704aae787cb66bdd08d03ec Author: Philipp Hortmann Date: Sat Nov 18 09:51:48 2023 +0100 staging: rtl8192e: Remove equation to check limits of channel channel_plan is constant COUNTRY_CODE_WORLD_WIDE_13. Remove equation to check limits of channel as those are always in limit. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/1f91cf8145b304b09b37734a2a504da394833378.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit d77ceba0a411e52b18c5b28b3783d11683753365 Author: Philipp Hortmann Date: Sat Nov 18 09:51:42 2023 +0100 staging: rtl8192e: Remove unused variable eeprom_chnl_plan Remove unused variable eeprom_chnl_plan. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/ffc592edd61332d2d8f9b0da68fc956d76e68fe0.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit b6806a4b17a1bd77626c24ab050dfabe82ed170d Author: Philipp Hortmann Date: Sat Nov 18 09:51:34 2023 +0100 staging: rtl8192e: Remove constant variable chnl_plan Remove constant variable chnl_plan and replace it with its constant. Remove equation that limits maximum value of chnl_plan as it is always false. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/e46f16227877fe9853c9d15992e7fd27a0ceeae6.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 589599d4e91763cff1e58b2526c3e1aa05895bde Author: Philipp Hortmann Date: Sat Nov 18 09:51:25 2023 +0100 staging: rtl8192e: Remove equation that results in constant for chnl_plan Remove equation for chnl_plan as the last line sets chnl_plan to a constant. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/d6fbe3d2297d1d5502b183785f14df51a81e3331.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7260ce3cee8cf13ffa0f526e7e4e6a7c2db8ec1e Author: Philipp Hortmann Date: Sat Nov 18 09:51:18 2023 +0100 staging: rtl8192e: Unwind pointer to pointer to rtl92e_set_channel() Replace pointer to function to pointer to rtl92e_set_channel() with pointer to rtl92e_set_channel(). This increases readability of the code. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/a96bac1f34e669a3b2fc4940a0a2d850564a5975.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 468403351369de2615a7690b378aff2fc7aa4350 Author: Philipp Hortmann Date: Sat Nov 18 09:51:11 2023 +0100 staging: rtl8192e: Change parameter "ch" of set_chan() to u8 Change parameter "ch" of set_chan() to u8 to combine functions in the following patch. Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/4a76c0e2384d67410d383fdf860d0e0859555d1e.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0d1bf38752afef6e46f73eef1ad32d47e8019962 Author: Philipp Hortmann Date: Sat Nov 18 09:51:05 2023 +0100 staging: rtl8192e: Remove unused return value of rtl92e_set_channel() Remove unused return value of rtl92e_set_channel(). Signed-off-by: Philipp Hortmann Link: https://lore.kernel.org/r/0c0e7c72a10731ae7ed49c8161136b0f0b63d7a0.1700296319.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman commit 23c2c8cf4f90fa1709febe4d543be000ff69f4e8 Author: Tree Davies Date: Mon Nov 13 11:59:10 2023 -0800 Staging: rtl8192e: Rename variable bDisable_AddBa Rename variable bDisable_AddBa to disable_add_ba to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231113195910.8423-8-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 4c4fdf26594a5eaf752832ef2150861c17f3b7db Author: Tree Davies Date: Mon Nov 13 11:59:09 2023 -0800 Staging: rtl8192e: Rename variable bOverwritePending Rename variable bOverwritePending to overwrite_pending to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231113195910.8423-7-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 5ed1ffa35545b437fdfb4b9118dd94f95c252c5c Author: Tree Davies Date: Mon Nov 13 11:59:08 2023 -0800 Staging: rtl8192e: Rename variable bUsingBa Rename variable bUsingBa to using_ba to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231113195910.8423-6-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 88b1b5ef720f397e5836157dfd38510d10682f08 Author: Tree Davies Date: Mon Nov 13 11:59:07 2023 -0800 Staging: rtl8192e: Rename variable bAddBaReqDelayed Rename variable bAddBaReqDelayed to add_ba_req_delayed to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231113195910.8423-5-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 5989b863c682ac14f7c49e56a7031b1f12825ab6 Author: Tree Davies Date: Mon Nov 13 11:59:06 2023 -0800 Staging: rtl8192e: Rename variable bAddBaReqInProgress Rename variable bAddBaReqInProgress to add_ba_req_in_progress to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231113195910.8423-4-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit c1d2dc030365c7ce6641420a604f6fe734138da6 Author: Tree Davies Date: Mon Nov 13 11:59:05 2023 -0800 Staging: rtl8192e: Rename variable bCurrentAMPDUEnable Rename variable bCurrentAMPDUEnable to current_ampdu_enable to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231113195910.8423-3-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 0428f6bda29d86fc49881bf8de80e806df045811 Author: Tree Davies Date: Mon Nov 13 11:59:04 2023 -0800 Staging: rtl8192e: Rename variable bSendDELBA Rename variable bSendDELBA to send_del_ba to fix checkpatch warning Avoid CamelCase. Signed-off-by: Tree Davies Tested-by: Philipp Hortmann Link: https://lore.kernel.org/r/20231113195910.8423-2-tdavies@darkphysics.net Signed-off-by: Greg Kroah-Hartman commit 984f20a0217df3b570a67bf2c0a457f5a128b884 Author: Bagas Sanjaya Date: Thu Nov 23 15:34:03 2023 +0700 MAINTAINERS: Mark VME subsystem as orphan Martyn Welch lost his access to VME hardware [1]; and Manohar Vanga has been MIA since early January 2014 (his last message was [2]). Martyn admitted that the subsystem is basically orphan, so mark it as such. As a bonus, add CREDITS entries for the former subsystem maintainers. Link: https://lore.kernel.org/r/fe8ac0db-d6cc-41bc-b926-484b418e1720@collabora.com/ [1] Link: https://lore.kernel.org/r/CAEktxaFL=3cmU4vZS2akiAR2vG-3d+9HwTZvBvf5JXuThHoOKg@mail.gmail.com/ [2] Cc: Martyn Welch Signed-off-by: Bagas Sanjaya Acked-by: Martyn Welch Link: https://lore.kernel.org/r/20231123083406.12129-2-bagasdotme@gmail.com Signed-off-by: Greg Kroah-Hartman commit fa91703dc2e010e48a230dc92967cb5ae23f8680 Author: Maciej Strozek Date: Thu Nov 23 09:06:58 2023 +0000 ASoC: cs43130: Allow driver to work without IRQ connection Add a polling mechanism that will keep the driver operational even in absence of physical IRQ connection. If IRQ line is detected, the driver will continue working as usual, in case of missing IRQ line it will fallback to the polling mechanism introduced in this change. This will support users which choose not to connect an IRQ line as it is not critical to part's operation. Signed-off-by: Maciej Strozek Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20231123090658.10418-1-mstrozek@opensource.cirrus.com Signed-off-by: Mark Brown commit deaf6b0ad8aede8ca32361a98031585fb5a96758 Author: Paul Kocialkowski Date: Thu Nov 9 21:16:37 2023 +0100 media: vicodec: Disable (TRY_)DECODER_CMD for the stateless case The (TRY_)DECODER_CMD ioctls are only useful for stateful decoders and for stateless decoders that support holding capture buffers (which is not the case for this driver). Disable them when registering the stateless decoder. Signed-off-by: Paul Kocialkowski Reviewed-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ebc733e54a1a79ea2dde2ba5121ae73a188e20d4 Author: Ken Lin Date: Wed Nov 22 02:24:43 2023 +0100 media: platform: cros-ec: Add Dexi to the match table The Google Dexi device uses the same approach as the Google Brask which enables the HDMI CEC via the cros-ec-cec driver. Signed-off-by: Ken Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 71025ec7f77674125cb126f88305776151e11d25 Author: Paul Kocialkowski Date: Tue Nov 7 21:06:28 2023 +0100 media: cedrus: Update TODO with future rework plans The current TODO list of the cedrus driver is now outdated as most of the points it mentions were already tackled. In addition it is no longer considered relevant to wait for a stateless encoder driver to move it out of staging. The hantro/verisilicon driver was already unstaged without this condition. However the driver suffers from a bad initial design that showed to be very limiting. It was also not a very good fit for a video codec driver either. Since a rework of the driver was already carried out for the purpose of adding encoding support, update the TODO list with a description of the rework. This reworked driver will be published soon and transitional commits from the current driver will be submitted upstreamer after that. It seems best to wait for the rework to land upstream before unstaging the driver, since a major rework is best operated on a staging driver instead of a fully upstream one. Signed-off-by: Paul Kocialkowski Acked-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 197f6e6cbf979c05aecceee2ba9b9ed7d7c275b8 Author: Rob Herring Date: Wed Nov 15 21:59:04 2023 +0100 media: stm32-dcmi: Drop unnecessary of_match_device() call If probe is reached, we've already matched the device and in the case of DT matching, the struct device_node pointer will be set. Therefore, there is no need to call of_match_device() in probe. Signed-off-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 38e1857933def4b3fafc28cc34ff3bbc84cad2c3 Author: Zheng Wang Date: Mon Nov 6 15:48:11 2023 +0100 media: mtk-jpeg: Fix timeout schedule error in mtk_jpegdec_worker. In mtk_jpegdec_worker, if error occurs in mtk_jpeg_set_dec_dst, it will start the timeout worker and invoke v4l2_m2m_job_finish at the same time. This will break the logic of design for there should be only one function to call v4l2_m2m_job_finish. But now the timeout handler and mtk_jpegdec_worker will both invoke it. Fix it by start the worker only if mtk_jpeg_set_dec_dst successfully finished. Fixes: da4ede4b7fd6 ("media: mtk-jpeg: move data/code inside CONFIG_OF blocks") Signed-off-by: Zheng Wang Signed-off-by: Dmitry Osipenko Cc: stable@vger.kernel.org Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 206c857dd17d4d026de85866f1b5f0969f2a109e Author: Zheng Wang Date: Mon Nov 6 15:48:10 2023 +0100 media: mtk-jpeg: Fix use after free bug due to error path handling in mtk_jpeg_dec_device_run In mtk_jpeg_probe, &jpeg->job_timeout_work is bound with mtk_jpeg_job_timeout_work. In mtk_jpeg_dec_device_run, if error happens in mtk_jpeg_set_dec_dst, it will finally start the worker while mark the job as finished by invoking v4l2_m2m_job_finish. There are two methods to trigger the bug. If we remove the module, it which will call mtk_jpeg_remove to make cleanup. The possible sequence is as follows, which will cause a use-after-free bug. CPU0 CPU1 mtk_jpeg_dec_... | start worker | |mtk_jpeg_job_timeout_work mtk_jpeg_remove | v4l2_m2m_release | kfree(m2m_dev); | | | v4l2_m2m_get_curr_priv | m2m_dev->curr_ctx //use If we close the file descriptor, which will call mtk_jpeg_release, it will have a similar sequence. Fix this bug by starting timeout worker only if started jpegdec worker successfully. Then v4l2_m2m_job_finish will only be called in either mtk_jpeg_job_timeout_work or mtk_jpeg_dec_device_run. Fixes: b2f0d2724ba4 ("[media] vcodec: mediatek: Add Mediatek JPEG Decoder Driver") Signed-off-by: Zheng Wang Signed-off-by: Dmitry Osipenko Cc: stable@vger.kernel.org Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d8212c5c87c143ca01b78f6bf61244af07e0058e Author: Zheng Wang Date: Mon Nov 6 15:48:09 2023 +0100 media: mtk-jpeg: Remove cancel worker in mtk_jpeg_remove to avoid the crash of multi-core JPEG devices This patch reverts commit c677d7ae8314 ("media: mtk-jpeg: Fix use after free bug due to uncanceled work"). The job_timeout_work is initialized only for the single-core JPEG device so it will cause the crash for multi-core JPEG devices. Fix it by removing the cancel_delayed_work_sync function. Fixes: c677d7ae8314 ("media: mtk-jpeg: Fix use after free bug due to uncanceled work") Signed-off-by: Zheng Wang Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c411b39df8b84945e6d93e8c5ea586eaa5466f2a Author: Hans Verkuil Date: Thu Nov 2 15:04:05 2023 +0100 media: ivtv: don't call s_stream(0) if not streaming Recently a WARN_ON was added in v4l2-subdev.c to warn if s_stream was called unnecessarily. The ivtv driver hits this once when it is loaded for the first time. Add a bool to avoid this warning. [hverkuil: added a comment for the sd_video_is_streaming field] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 074728523dd18da4226d43db6756ae9128d6a2f0 Author: Uwe Kleine-König Date: Thu Oct 26 23:47:40 2023 +0200 media: staging: media: tegra-video: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert the three tegra-video drivers from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ded85b0c0edd8f45fec88783d7555a5b982449c1 Author: Ricardo B. Marliere Date: Fri Oct 13 01:09:12 2023 +0200 media: pvrusb2: fix use after free on context disconnection Upon module load, a kthread is created targeting the pvr2_context_thread_func function, which may call pvr2_context_destroy and thus call kfree() on the context object. However, that might happen before the usb hub_event handler is able to notify the driver. This patch adds a sanity check before the invalid read reported by syzbot, within the context disconnection call stack. Reported-and-tested-by: syzbot+621409285c4156a009b3@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/000000000000a02a4205fff8eb92@google.com/ Fixes: e5be15c63804 ("V4L/DVB (7711): pvrusb2: Fix race on module unload") Signed-off-by: Ricardo B. Marliere Acked-by: Mike Isely Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0cb8c9482501c46854ddb3d43b1bc05d771b9624 Author: Dan Carpenter Date: Thu Oct 12 11:42:33 2023 +0200 media: qcom: camss: clean up a check Imagine that "->vfe_num" is zero, then the subtraction will underflow to UINT_MAX. Plus it's just cleaner to use >= instead. Signed-off-by: Dan Carpenter Acked-by: Bryan O'Donoghue Reviewed-by: Konrad Dybcio Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ce122258ed8678d0a32b825ba3d7dd3cc16052df Author: Marvin Lin Date: Wed Oct 11 09:30:03 2023 +0200 media: nuvoton: npcm-video: Fix sleeping in atomic context Change to use mutex instead of spinlock for buffer list lock to fix sleeping in atomic context warnings reported by the Smatch tool. Fixes: 70721089985c ("media: nuvoton: Add driver for NPCM video capture and encoding engine") Reported-by: Dan Carpenter Signed-off-by: Marvin Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aebe6f055d9f0e82a61ffb7c5c45f6c3af54b76b Author: Christophe JAILLET Date: Sat Oct 7 15:50:02 2023 +0200 media: vde: Use struct_size() Use struct_size() which is much more common than this offsetof(). Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 07e823c0fd991565106eff6f03892c5d645cd690 Author: Ville Syrjälä Date: Tue Nov 21 07:43:24 2023 +0200 drm/i915: Implement audio fastset There's no real reason why we'd need a full modeset for audio changes. So let's allow audio to be toggled during fastset. In case the ELD changes while has_audio isn't changing state we force both audio disable and enable so the new ELD gets propagated to the audio driver. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-12-ville.syrjala@linux.intel.com commit 109e1e898abd2c68ceb02058c56db7cf6b9c18d7 Author: Ville Syrjälä Date: Tue Nov 21 07:43:23 2023 +0200 drm/i915: Push audio_{enable,disable}() to the pre/post pane update stage Relocate the audio enable/disable from the full modeset hooks into the common pre/post plane update stage of the commit. Audio fastset is within easy reach now. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-11-ville.syrjala@linux.intel.com commit cff742cc6851f469ae1192877a308884a6439005 Author: Ville Syrjälä Date: Tue Nov 21 07:43:22 2023 +0200 drm/i915: Hoist the encoder->audio_{enable,disable}() calls higher up Push the encoder->audio_{enable,disable}() calls out from the encoder->{enable,disable}() hooks. Moving towards audio fastset. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-10-ville.syrjala@linux.intel.com commit 3654a48ab16c243519c40849a61b617828a4a61e Author: Ville Syrjälä Date: Tue Nov 21 07:43:21 2023 +0200 drm/i915: Convert audio enable/disable into encoder vfuncs Add encoder vfuncs for audio enable/disable. This will allow audio to be enabled/disabled during fastsets. An encoder hook is necessary as on pre-hsw platforms different encoder types implement audio in different ways. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-9-ville.syrjala@linux.intel.com commit 4645e8980479a0cbfa99bdd07c562cec1597e9cd Author: Ville Syrjälä Date: Tue Nov 21 07:43:20 2023 +0200 drm/i915: Split g4x+ HDMI audio presence detect from port enable Follow the hsw+ approach toggle the audio presence detect when we set up the ELD, instead of doing it when turning the port on/off. This will facilitate audio enable/disable to happen during fastsets instead of requiring a full modeset. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-8-ville.syrjala@linux.intel.com commit 0195e381b14fc8b16f359cbf45193bcdaaf5cd27 Author: Ville Syrjälä Date: Tue Nov 21 07:43:19 2023 +0200 drm/i915: Split g4x+ DP audio presence detect from port enable Follow the hsw+ approach toggle the audio presence detect when we set up the ELD, instead of doing it when turning the port on/off. This will facilitate audio enable/disable to happen during fastsets instead of requiring a full modeset. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-7-ville.syrjala@linux.intel.com commit ceb53adad7e3cb4806d5fadcd583eade32a6b915 Author: Ville Syrjälä Date: Tue Nov 21 07:43:18 2023 +0200 drm/i915: Wrap g4x+ DP/HDMI audio enable/disable Put a wrapper around the intel_audio_codec_{enable,disable}() calls in the g4x+ DP/HDMI code. We shall move the presence detect enable/disable into the wrappers later. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-6-ville.syrjala@linux.intel.com commit 7966a93a27cfea1d9ceae3be1298be06184f5afe Author: Ville Syrjälä Date: Tue Nov 21 07:43:17 2023 +0200 drm/i915: Push audio enable/disable further out Push the audio enable/disable to be the last/first thing respectively that is done in the encoder enable/disable hooks. The goal is to move it further out of these encoder hooks entirely. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-5-ville.syrjala@linux.intel.com commit e4fb7f894ed48f6fb5b1ca61ade44a92c425444b Author: Ville Syrjälä Date: Tue Nov 21 07:43:16 2023 +0200 drm/i915: Polish some RMWs Doing the if-else around RMWs is kinda silly. Just set/clear the apporiate bits with a single RMW. Also unify the coding style a bit icl_wa_cursorclkgating() while at it. Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-4-ville.syrjala@linux.intel.com commit e0d5ce11ed0a21bb2bf328ad82fd261783c7ad88 Author: Ville Syrjälä Date: Tue Nov 21 07:43:15 2023 +0200 drm/i915: Call intel_pre_plane_updates() also for pipes getting enabled We used to call intel_pre_plane_updates() for any pipe going through a modeset whether the pipe was previously enabled or not. This in fact needed to apply all the necessary clock gating workarounds/etc. Restore the correct behaviour. Fixes: 39919997322f ("drm/i915: Disable all planes before modesetting any pipes") Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-3-ville.syrjala@linux.intel.com commit bc53c4d56eb24dbe56cd2c66ef4e9fc9393b1533 Author: Ville Syrjälä Date: Tue Nov 21 07:43:14 2023 +0200 drm/i915: Check pipe active state in {planes,vrr}_{enabling,disabling}() {planes,vrr}_{enabling,disabling}() are supposed to indicate whether the specific hardware feature is supposed to be enabling or disabling. That can only makes sense if the pipe is active overall. So check for that before we go poking at the hardware. I think we're semi-safe currently on due to: - intel_pre_plane_update() doesn't get called when the pipe was not-active prior to the commit, but this is actually a bug. This saves vrr_disabling(), and vrr_enabling() is called from deeper down where we have already checked hw.active. - active_planes mirrors the crtc's hw.active Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231121054324.9988-2-ville.syrjala@linux.intel.com commit 6acba0345b68772830582ca1ca369a2f45631275 Author: Jayant Chowdhary Date: Mon Nov 20 06:20:25 2023 +0000 usb:gadget:uvc Do not use worker thread to pump isoc usb requests When we use an async work queue to perform the function of pumping usb requests to the usb controller, it is possible that amongst other factors, thread scheduling affects at what cadence we're able to pump requests. This could mean isoc usb requests miss their uframes - resulting in video stream flickers on the host device. To avoid this, we make the async_wq thread only produce isoc usb_requests with uvc buffers encoded into them. The process of queueing to the endpoint is done by the uvc_video_complete() handler. In case no usb_requests are ready with encoded information, we just queue a zero length request to the endpoint from the complete handler. For bulk endpoints the async_wq thread still queues usb requests to the endpoint. Signed-off-by: Michael Grzeschik Signed-off-by: Jayant Chowdhary Suggested-by: Avichal Rakesh Suggested-by: Alan Stern Link: https://lore.kernel.org/r/20231120062026.3759463-1-jchowdhary@google.com Signed-off-by: Greg Kroah-Hartman commit da324ffce34c521b239f319d4051260444a3eb4a Author: Avichal Rakesh Date: Wed Nov 8 16:41:04 2023 -0800 usb: gadget: uvc: Fix use-after-free for inflight usb_requests Currently, the uvc gadget driver allocates all uvc_requests as one array and deallocates them all when the video stream stops. This includes de-allocating all the usb_requests associated with those uvc_requests. This can lead to use-after-free issues if any of those de-allocated usb_requests were still owned by the usb controller. This is patch 2 of 2 in fixing the use-after-free issue. It adds a new flag to uvc_video to track when frames and requests should be flowing. When disabling the video stream, the flag is tripped and, instead of de-allocating all uvc_requests and usb_requests, the gadget driver only de-allocates those usb_requests that are currently owned by it (as present in req_free). Other usb_requests are left untouched until their completion handler is called which takes care of freeing the usb_request and its corresponding uvc_request. Now that uvc_video does not depends on uvc->state, this patch removes unnecessary upates to uvc->state that were made to accommodate uvc_video logic. This should ensure that uvc gadget driver never accidentally de-allocates a usb_request that it doesn't own. Link: https://lore.kernel.org/7cd81649-2795-45b6-8c10-b7df1055020d@google.com Reviewed-by: Daniel Scally Reviewed-by: Michael Grzeschik Suggested-by: Michael Grzeschik Tested-by: Michael Grzeschik Signed-off-by: Avichal Rakesh Link: https://lore.kernel.org/r/20231109004104.3467968-4-arakesh@google.com Signed-off-by: Greg Kroah-Hartman commit 2079b60bda3257146a4e8ed7525513865f7e6b3e Author: Avichal Rakesh Date: Wed Nov 8 16:41:03 2023 -0800 usb: gadget: uvc: move video disable logic to its own function This patch refactors the video disable logic in uvcg_video_enable into its own separate function 'uvcg_video_disable'. This function is now used anywhere uvcg_video_enable(video, 0) was used. Reviewed-by: Daniel Scally Suggested-by: Michael Grzeschik Signed-off-by: Avichal Rakesh Link: https://lore.kernel.org/r/20231109004104.3467968-3-arakesh@google.com Signed-off-by: Greg Kroah-Hartman commit aeb686a98a9e9743c4c0338957e59643a2708146 Author: Avichal Rakesh Date: Wed Nov 8 16:41:02 2023 -0800 usb: gadget: uvc: Allocate uvc_requests one at a time Currently, the uvc gadget driver allocates all uvc_requests as one array and deallocates them all when the video stream stops. This includes de-allocating all the usb_requests associated with those uvc_requests. This can lead to use-after-free issues if any of those de-allocated usb_requests were still owned by the usb controller. This patch is 1 of 2 patches addressing the use-after-free issue. Instead of bulk allocating all uvc_requests as an array, this patch allocates uvc_requests one at a time, which should allows for similar granularity when deallocating the uvc_requests. This patch has no functional changes other than allocating each uvc_request separately, and similarly freeing each of them separately. Link: https://lore.kernel.org/7cd81649-2795-45b6-8c10-b7df1055020d@google.com Reviewed-by: Daniel Scally Reviewed-by: Michael Grzeschik Suggested-by: Michael Grzeschik Tested-by: Michael Grzeschik Signed-off-by: Avichal Rakesh Link: https://lore.kernel.org/r/20231109004104.3467968-2-arakesh@google.com Signed-off-by: Greg Kroah-Hartman commit 991544dc579b636e69defa3eec486fd6f6191e59 Author: Avichal Rakesh Date: Wed Nov 8 16:41:01 2023 -0800 usb: gadget: uvc: prevent use of disabled endpoint Currently the set_alt callback immediately disables the endpoint and queues the v4l2 streamoff event. However, as the streamoff event is processed asynchronously, it is possible that the video_pump thread attempts to queue requests to an already disabled endpoint. This change moves disabling usb endpoint to the end of streamoff event callback. As the endpoint's state can no longer be used, video_pump is now guarded by uvc->state as well. To be consistent with the actual streaming state, uvc->state is now toggled between CONNECTED and STREAMING from the v4l2 event callback only. Link: https://lore.kernel.org/20230615171558.GK741@pendragon.ideasonboard.com/ Link: https://lore.kernel.org/20230531085544.253363-1-dan.scally@ideasonboard.com/ Reviewed-by: Daniel Scally Reviewed-by: Michael Grzeschik Tested-by: Michael Grzeschik Signed-off-by: Avichal Rakesh Link: https://lore.kernel.org/r/20231109004104.3467968-1-arakesh@google.com Signed-off-by: Greg Kroah-Hartman commit 5a1ccf0c72cf917ff3ccc131d1bb8d19338ffe52 Author: Hardik Gajjar Date: Fri Oct 27 17:20:29 2023 +0200 usb: new quirk to reduce the SET_ADDRESS request timeout This patch introduces a new USB quirk, USB_QUIRK_SHORT_SET_ADDRESS_REQ_TIMEOUT, which modifies the timeout value for the SET_ADDRESS request. The standard timeout for USB request/command is 5000 ms, as recommended in the USB 3.2 specification (section 9.2.6.1). However, certain scenarios, such as connecting devices through an APTIV hub, can lead to timeout errors when the device enumerates as full speed initially and later switches to high speed during chirp negotiation. In such cases, USB analyzer logs reveal that the bus suspends for 5 seconds due to incorrect chirp parsing and resumes only after two consecutive timeout errors trigger a hub driver reset. Packet(54) Dir(?) Full Speed J(997.100 us) Idle( 2.850 us) _______| Time Stamp(28 . 105 910 682) _______|_____________________________________________________________Ch0 Packet(55) Dir(?) Full Speed J(997.118 us) Idle( 2.850 us) _______| Time Stamp(28 . 106 910 632) _______|_____________________________________________________________Ch0 Packet(56) Dir(?) Full Speed J(399.650 us) Idle(222.582 us) _______| Time Stamp(28 . 107 910 600) _______|_____________________________________________________________Ch0 Packet(57) Dir Chirp J( 23.955 ms) Idle(115.169 ms) _______| Time Stamp(28 . 108 532 832) _______|_____________________________________________________________Ch0 Packet(58) Dir(?) Full Speed J (Suspend)( 5.347 sec) Idle( 5.366 us) _______| Time Stamp(28 . 247 657 600) _______|_____________________________________________________________Ch0 This 5-second delay in device enumeration is undesirable, particularly in automotive applications where quick enumeration is crucial (ideally within 3 seconds). The newly introduced quirks provide the flexibility to align with a 3-second time limit, as required in specific contexts like automotive applications. By reducing the SET_ADDRESS request timeout to 500 ms, the system can respond more swiftly to errors, initiate rapid recovery, and ensure efficient device enumeration. This change is vital for scenarios where rapid smartphone enumeration and screen projection are essential. To use the quirk, please write "vendor_id:product_id:p" to /sys/bus/usb/drivers/hub/module/parameter/quirks For example, echo "0x2c48:0x0132:p" > /sys/bus/usb/drivers/hub/module/parameters/quirks" Signed-off-by: Hardik Gajjar Reviewed-by: Alan Stern Link: https://lore.kernel.org/r/20231027152029.104363-2-hgajjar@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit a769154c7cac037914ba375ae88aae55b2c853e0 Author: Hardik Gajjar Date: Fri Oct 27 17:20:28 2023 +0200 usb: xhci: Add timeout argument in address_device USB HCD callback - The HCD address_device callback now accepts a user-defined timeout value in milliseconds, providing better control over command execution times. - The default timeout value for the address_device command has been set to 5000 ms, aligning with the USB 3.2 specification. However, this timeout can be adjusted as needed. - The xhci_setup_device function has been updated to accept the timeout value, allowing it to specify the maximum wait time for the command operation to complete. - The hub driver has also been updated to accommodate the newly added timeout parameter during the SET_ADDRESS request. Signed-off-by: Hardik Gajjar Reviewed-by: Mathias Nyman Link: https://lore.kernel.org/r/20231027152029.104363-1-hgajjar@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit d1dbd6987ee10f44a06c46bcfade69cdbb56a5cd Author: Krzysztof Kozlowski Date: Sat Nov 11 15:19:53 2023 +0100 dt-bindings: usb: qcom,dwc3: adjust number of interrupts on SM6125 Qualcomm SM6125 DWC3 USB controller comes with two interrupts (verified with downstream/vendor code of Trinket DTSI from Xiaomi Laurel device). Move the qcom,sm6125-dwc3 to appropriate place in allOf:if:then blocks constraining interrupts. Signed-off-by: Krzysztof Kozlowski Acked-by: Conor Dooley Reviewed-by: Marijn Suijten Link: https://lore.kernel.org/r/20231111141953.51841-1-krzysztof.kozlowski@linaro.org Signed-off-by: Greg Kroah-Hartman commit e0cc05d52ad310cced029449bcda0f9fc847097c Author: Guan-Yu Lin Date: Thu Nov 16 16:32:16 2023 +0800 usb: typec: tcpm: skip checking port->send_discover in PD3.0 The original Collison Avoidance mechanism, port->send_discover, avoids the conflict when port partners start AMS almost the same time. However, this mechanism is replaced by SINK_TX_OK and SINK_TX_NG. Skip the check in PD3.0 to avoid the deadlock when source is requesting DR_SWAP where sink is requesting DISCOVER_IDENTITY. Signed-off-by: Guan-Yu Lin Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20231116083221.1201892-1-guanyulin@google.com Signed-off-by: Greg Kroah-Hartman commit 9768af12edb3b23cfa1f7c05e019115b73f9490c Author: Stefan Eichenberger Date: Fri Oct 27 14:29:55 2023 +0200 usb: phy: generic: add suspend support for regulator Disable the vcc regulator on suspend and enable it on resume. Signed-off-by: Stefan Eichenberger Signed-off-by: Francesco Dolcini Link: https://lore.kernel.org/r/20231027122955.22123-1-francesco@dolcini.it Signed-off-by: Greg Kroah-Hartman commit c5b9f4792ea6b9abfcfb9486ba256f55e296aaa7 Author: Niklas Söderlund Date: Tue Nov 21 19:37:38 2023 +0100 dt-bindings: net: renesas,ethertsn: Add Ethernet TSN Add bindings for Renesas R-Car Ethernet TSN End-station IP. The RTSN device provides Ethernet network. Signed-off-by: Niklas Söderlund Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231121183738.656192-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Paolo Abeni commit 26846dda3eca07cbb8dd481421ae52b31ef232d5 Author: Hans Verkuil Date: Tue Nov 14 11:50:36 2023 +0100 media: videodev.h: add missing p_hdr10_* pointers The HDR10 standard compound controls were missing the corresponding pointers in videodev2.h. Add these and document them. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 70be8a84017a4454429abc40dec40a1f845c7827 Author: Hans Verkuil Date: Tue Nov 14 11:39:44 2023 +0100 media: videodev2.h: add missing __user to p_h264_pps The p_h264_pps pointer in struct v4l2_ext_control was missing the __user annotation. Add this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 26cb92f7f7c409c2674c019e5f4e44119209dd24 Author: Hans Verkuil Date: Fri Nov 10 09:53:00 2023 +0100 media: drop CONFIG_MEDIA_CONTROLLER_REQUEST_API This config option was added during the development of the Request API to make it easy to disable it. The Request API is now stable so it is time to drop this option altogether. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ed5000fe5ac48980bf0b2a707c64bba184dd83d2 Author: Deborah Brouwer Date: Thu Nov 9 20:16:43 2023 +0100 media: v4l2-mem2mem.h: fix typo in comment The comment describing the function v4l2_m2m_last_src_buf() says that this function returns the last destination buffer when it actually returns the last source buffer. Fix the comment so that it is accurate. Signed-off-by: Deborah Brouwer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dd4229fa7b6e5b4e12575a0165131874a233f7bc Author: Paul Kocialkowski Date: Tue Nov 7 21:05:09 2023 +0100 media: v4l2-dev: Check that g/s_selection are valid before selecting crop The cropcap and g/s_crop ioctls are automatically marked as valid whenever the g/s_selection ops are filled. The rationale is to auto-enable these legacy cropcap and g/s_crop ioctls that rely on g/s_selection. However it's possible that the ops are filled but explicitly disabled with calls to v4l2_disable_ioctl. In this situation the legacy ioctls should not be enabled. Add a check on the video device's valid ioctls field before auto-selecting them to honor the driver's choice. Note that the meaning of the bitfield stored in the video device is the opposite of what the name suggests as v4l2_disable_ioctl will set the bits. Their meaning will be reversed at the end of the function. Signed-off-by: Paul Kocialkowski Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 57e3f1cfc23ffdbfd7c8fcee5406930cc7f85eed Author: Jacopo Mondi Date: Tue Nov 7 18:29:16 2023 +0100 media: v4l2-common: Add 10bpp RGB formats info Video4Linux2 defines 3 RGB formats with 10 bits per color components plus two optional alpha bits such that a pixel is then stored in a 4 bytes word. Add a format info for the 3 10-bits RGB formats to the v4l2_format_info() table in v4l2-common.c. Signed-off-by: Jacopo Mondi Reviewed-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6aa210d27b5feaf81634973f28b896e208166f4c Author: Hans Verkuil Date: Thu Oct 26 13:54:01 2023 +0200 media: core: v4l2-ioctl: check if ioctl is known to avoid NULL name When ioctl debugging is turned on, the v4l_printk_ioctl() is used to log the ioctl that is called. It uses an array of ioctl information to log the ioctl name and it correctly checks for out-of-bound indexing of that array. However, the array may have holes since not all ioctl numbers are used. In that case the name of the ioctl is NULL. It is harmless (printk handles NULL pointers), but not intended. Instead use the v4l2_is_known_ioctl() function to determine if the ioctl information is available or not. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 632b8b044a940e415c6d9bd5235778b0db28add1 Author: Hans Verkuil Date: Wed Oct 11 10:17:59 2023 +0200 media: cec: core: count low-drive, error and arb-lost conditions Count how many Low Drive, Error and Arbitration Lost transmit status errors occurred, and expose that in debugfs. Also log the first 8 transmits that result in Low Drive or Error conditions. That really should not happen with well-behaved CEC devices and good HDMI cables. This is useful to detect and debug HDMI cable issues. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bbd267daf4fc831f58bf4a2530a8b64881779e6a Author: Benjamin Gaignard Date: Thu Nov 9 17:35:06 2023 +0100 media: verisilicon: vp9: Allow to change resolution while streaming Remove all checks that prohibit to set a new format while streaming. This allow to change dynamically the resolution if the pixel format remains the same. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Ezequiel Garcia CC: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3eeaee737dcee3c32e256870dbc2687a2a6fe970 Author: Benjamin Gaignard Date: Thu Nov 9 17:35:05 2023 +0100 media: verisilicon: g2: Use common helpers to compute chroma and mv offsets HEVC and VP9 are running on the same hardware and share the same chroma and motion vectors offset constraint. Create common helpers functions for these computation. Source and destination buffer height may not be the same because alignment constraint are different so use destination height to compute chroma offset because we target this buffer as hardware output. To be able to use the helpers in both VP9 HEVC code remove dec_params and use context->bit_depth instead. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Ezequiel Garcia CC: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 545bf944f978b7468d3a6bd668d9ff6953bc542e Author: Benjamin Gaignard Date: Thu Nov 9 17:35:04 2023 +0100 media: verisilicon: Store chroma and motion vectors offset Store computed values of chroma and motion vectors offset because they depends on width and height values which change if the resolution change. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Ezequiel Garcia CC: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 26711491a807ab3b1a04afad839ca48b6d34e63e Author: Benjamin Gaignard Date: Thu Nov 9 17:35:03 2023 +0100 media: verisilicon: Refactor postprocessor to store more buffers Since vb2 queue can store more than VB2_MAX_FRAME buffers, the postprocessor buffer storage must be capable to store more buffers too. Change static dec_q array to allocated array to be capable to store up to queue 'max_num_buffers'. Keep allocating queue 'num_buffers' at queue setup time but also allows to allocate postprocessors buffers on the fly. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Ezequiel Garcia CC: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7e8b591d50dc6b63f32fbd591fa80c70679115da Author: Benjamin Gaignard Date: Thu Nov 9 17:35:02 2023 +0100 media: test-drivers: vicodec: Increase max supported capture queue buffers Allow to allocated up to 64 buffers on capture queue. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cea70ed416b428f8214be196d62cc7ffaa11f1b8 Author: Benjamin Gaignard Date: Thu Nov 9 17:35:01 2023 +0100 media: test-drivers: vivid: Increase max supported buffers for capture queues Change the maximum number of buffers of some capture queues in order to test max_num_buffers field. Allow to allocate up to: - 64 buffers for video capture queue. - 1024 buffers for sdr capture queue. - 32768 buffers for vbi capture queue. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d055a76c006540defd4eb80dcdea217cee0a141a Author: Benjamin Gaignard Date: Thu Nov 9 17:35:00 2023 +0100 media: core: Report the maximum possible number of buffers for the queue Use one of the struct v4l2_create_buffers reserved bytes to report the maximum possible number of buffers for the queue. V4l2 framework set V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS flags in queue capabilities so userland can know when the field is valid. Does the same change in v4l2_create_buffers32 structure. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c838530d230bc638d79b78737fc4488ffc28c1ee Author: Benjamin Gaignard Date: Thu Nov 9 17:34:59 2023 +0100 media: media videobuf2: Be more flexible on the number of queue stored buffers Add 'max_num_buffers' field in vb2_queue struct to let drivers decide how many buffers could be stored in a queue. This require 'bufs' array to be allocated at queue init time and freed when releasing the queue. By default VB2_MAX_FRAME remains the limit. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4545ca51dd5bd1a652d514a5de9e8ec97579a5b1 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:58 2023 +0100 media: usb: usbtv: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7e17d44d61921cab8e52cb30cc082e3ee96abddd Author: Benjamin Gaignard Date: Thu Nov 9 17:34:57 2023 +0100 media: usb: hackrf: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Antti Palosaari Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ca44d57a7020a45086c5a947eb72a33b2c1081ef Author: Benjamin Gaignard Date: Thu Nov 9 17:34:56 2023 +0100 media: usb: cx231xx: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 912472fd07da4be0de80b49d61b8cb4fb1b0835b Author: Benjamin Gaignard Date: Thu Nov 9 17:34:55 2023 +0100 media: usb: airspy: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ff2560f0263ab30e8ed4bec13495dce050e5d8cc Author: Benjamin Gaignard Date: Thu Nov 9 17:34:54 2023 +0100 media: ti: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: "Lad, Prabhakar" Reviewed-by: Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 36e3faf99f825fd9d975ae0bf96d93e4da1d732f Author: Benjamin Gaignard Date: Thu Nov 9 17:34:53 2023 +0100 media: renesas: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Fabrizio Castro Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d6855e4b086538ba513aff280f461971d6c26796 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:52 2023 +0100 media: nuvoton: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Joseph Liu CC: Marvin Lin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e1d2fcf99d7ab03e8928391abc9156d79d60dedd Author: Benjamin Gaignard Date: Thu Nov 9 17:34:51 2023 +0100 media: cedrus: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. While at it, check the return value of vb2_get_buffer(). Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Acked-by: Paul Kocialkowski CC: Maxime Ripard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 88d9ce34a6aa19620911c4e149d99d40307b9f72 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:50 2023 +0100 media: sample: v4l: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11678528576e5e9ac857e0faa656fa2b00cda0d3 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:49 2023 +0100 media: touchscreen: sur40: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Acked-by: Dmitry Torokhov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8858adab5004d3e7d2370d822621d23b07aaa371 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:48 2023 +0100 media: meson: vdec: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9d5ffd498dcb94cdf42cadd4b8e97e86ca7abb12 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:47 2023 +0100 media: imx: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Steve Longerbeam CC: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 46cbe0cd4cfbbab4673411230c8de260fe67c064 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:46 2023 +0100 media: test-drivers: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. If 'min_buffers_needed' is set remove useless checks in queue setup functions. Signed-off-by: Benjamin Gaignard CC: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f661dc7e779bbd51acd20b2cecf9acb430774a0 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:45 2023 +0100 media: verisilicon: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3f9ea948f1690a6bfa6e8730c74b325d38f8ce26 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:44 2023 +0100 media: nxp: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Rui Miguel Silva CC: Laurent Pinchart CC: Martin Kepplinger Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit efd7ae5d95caac9ece5b2dfac0d90a574111d3bf Author: Benjamin Gaignard Date: Thu Nov 9 17:34:43 2023 +0100 media: coda: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit da53f4e6fa861bc8d454db3551f807b4a86bbb02 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:42 2023 +0100 media: i2c: video-i2c: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Fix the number of buffers computation at the same time. Signed-off-by: Benjamin Gaignard CC: Matt Ranostay Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 70ab9ec9166db90ab8980aff4f7083512ecddd1f Author: Benjamin Gaignard Date: Thu Nov 9 17:34:41 2023 +0100 media: pci: tw68: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard CC: Fabrizio Castro Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 26fb87ffa9d90fb16ca1b2b262f38d93bdcee934 Author: Steffen Eiden Date: Mon Nov 6 13:49:22 2023 +0100 s390/uvdevice: Report additional-data length for attestation Additional data length in the attestation request is an in/out variable. Software provides the capacity of the buffer. Upon successful request, firmware reports the actual bytes written to the additional data in that field. This information is lost, as the length field was not copied back to userspace before. Attestation might fail, if user space did not specify the exact amount of needed bytes required, as this length is part of the attestation measurement. Signed-off-by: Steffen Eiden Reviewed-by: Claudio Imbrenda Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20231106124922.3032370-1-seiden@linux.ibm.com Message-Id: <20231106124922.3032370-1-seiden@linux.ibm.com> Signed-off-by: Janosch Frank commit 58415c7e52a6d6245f0afa679e8ec8b78da1523c Author: Benjamin Gaignard Date: Thu Nov 9 17:34:40 2023 +0100 media: pci: netup_unidvb: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Sergey Kozlov CC: Abylay Ospan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ad3d85a1359bcc67fd57edffb3bc367b38045592 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:39 2023 +0100 media: pci: cx18: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Sergey Kozlov CC: Abylay Ospan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ba53e3b9bd8d829616523aed13ced6052de517b6 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:38 2023 +0100 media: pci: tw686x: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf605a01f03e0aae9ee5df5ab5acaf2877b62e3f Author: Benjamin Gaignard Date: Thu Nov 9 17:34:37 2023 +0100 media: pci: dt3155: Remove useless check min_buffers_needed is already set to 2 so remove this useless check. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 595f445b8f061d1cde2acdef8dfe59c832c20939 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:36 2023 +0100 media: dvb-frontends: rtl2832: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Antti Palosaari Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b3b5d2e2297216d5184560583f01f078ce631b75 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:35 2023 +0100 media: dvb-core: Do not initialize twice queue num_buffer field The above memset already zeroed all the ctx fields, it is useless to do it here again. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7dc866df40127dceac9ba83ae16c0c11e7d1666f Author: Benjamin Gaignard Date: Thu Nov 9 17:34:34 2023 +0100 media: dvb-core: Use vb2_get_buffer() instead of directly access to buffers array Use vb2_get_buffer() instead of direct access to the vb2_queue bufs array. This allows us to change the type of the bufs in the future. After each call to vb2_get_buffer() we need to be sure that we get a valid pointer so check the return value of all of them. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 53963fb12fd43176dff4b33d937fb7575b0bf4fb Author: Benjamin Gaignard Date: Thu Nov 9 17:34:33 2023 +0100 media: atomisp: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Hans de Goede CC: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 202de2b5d1b6ba12ab95fe3d6ea2a428888e59b4 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:32 2023 +0100 media: atomisp: Use vb2_get_buffer() instead of directly access to buffers array Use vb2_get_buffer() instead of direct access to the vb2_queue bufs array. This allows us to change the type of the bufs in the future. No need to check the result of vb2_get_buffer, vb2_ioctl_dqbuf() already checked that it is valid. Signed-off-by: Benjamin Gaignard Reviewed-by: Hans de Goede CC: Sakari Ailus Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 73aea586d6c58f55799f6130e19321ff7b574c3d Author: Benjamin Gaignard Date: Thu Nov 9 17:34:31 2023 +0100 media: visl: Use vb2_get_buffer() instead of directly access to buffers array Use vb2_get_buffer() instead of direct access to the vb2_queue bufs array. This allows us to change the type of the bufs in the future. After each call to vb2_get_buffer() we need to be sure that we get a valid pointer so check the return value of all of them. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7490a42020bb1648337ebf04bf6e1ff9d8883f6b Merge: 750011e239a50 8c1c66235e035 Author: Paolo Abeni Date: Thu Nov 23 12:02:52 2023 +0100 Merge branch 'net-ethernet-renesas-rcar_gen4_ptp-add-v4h-support' Niklas Söderlund says: ==================== net: ethernet: renesas: rcar_gen4_ptp: Add V4H support This small series prepares the rcar_gen4_ptp to be useable both on both R-Car S4 and V4H. The only in-tree driver that make use of this is rswtich on S4. A new Ethernet (R-Car Ethernet TSN) driver for V4H is on it's way that also will make use of rcar_gen4_ptp functionality. Patch 1-2 are small improvements to the existing driver. While patch 3-4 adds V4H support. Finally patch 5 turns rcar_gen4_ptp into a separate module to allow the gPTP functionality to be shared between the two users without having to duplicate the code in each. See each patch for changelog. ==================== Link: https://lore.kernel.org/r/20231121155306.515446-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Paolo Abeni commit 8c1c66235e0354fbe8c2159656947fad048d374d Author: Niklas Söderlund Date: Tue Nov 21 16:53:06 2023 +0100 net: ethernet: renesas: rcar_gen4_ptp: Break out to module The Gen4 gPTP support will be shared between the existing Renesas Ethernet Switch driver and the upcoming Renesas Ethernet-TSN driver. In preparation for this break out the gPTP support to its own module. Signed-off-by: Niklas Söderlund Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit be5f81d37f7971abbad8547624453a1d4f033457 Author: Niklas Söderlund Date: Tue Nov 21 16:53:05 2023 +0100 net: ethernet: renesas: rcar_gen4_ptp: Get clock increment from clock rate Instead of using hard coded clock increment values for each SoC derive the clock increment from the module clock. This is done in preparation to support a second platform, R-Car V4H that uses a 200Mhz clock compared with the 320Mhz clock used on R-Car S4. Tested on both SoCs, S4 reports a clock of 320000000Hz which gives a value of 0x19000000. Documentation says a 320Mhz clock is used and the correct increment for that clock is 0x19000000. V4H reports a clock of 199999992Hz which gives a value of 0x2800001a. Documentation says a 200Mhz clock is used and the correct increment for that clock is 0x28000000. Suggested-by: Geert Uytterhoeven Signed-off-by: Niklas Söderlund Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit 46c361a04635a9f431fec56a75076cbb5262fb93 Author: Niklas Söderlund Date: Tue Nov 21 16:53:04 2023 +0100 net: ethernet: renesas: rcar_gen4_ptp: Prepare for shared register layout All known R-Car Gen4 SoC share the same register layout, rename the R-Car S4 specific identifiers so they can be shared with the upcoming R-Car V4H support. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit 9f3995707e355a2f9b2da06f6dee685cca974fc4 Author: Niklas Söderlund Date: Tue Nov 21 16:53:03 2023 +0100 net: ethernet: renesas: rcar_gen4_ptp: Fail on unknown register layout Instead of printing a warning and proceeding with an unknown register layout return an error. The only call site is already prepared to propagate the error. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit d73dcff9eb0d30956e9caa86d0d94d4c8e402037 Author: Niklas Söderlund Date: Tue Nov 21 16:53:02 2023 +0100 net: ethernet: renesas: rcar_gen4_ptp: Remove incorrect comment The comments intent was to indicates which function uses the enum. While upstreaming rcar_gen4_ptp the function was renamed but this comment was left with the old function name. Instead of correcting the comment remove it, it adds little value. Signed-off-by: Niklas Söderlund Reviewed-by: Wolfram Sang Reviewed-by: Simon Horman Signed-off-by: Paolo Abeni commit 7bce685bc017295e96aa3ad5edcf3906208685f3 Author: Benjamin Gaignard Date: Thu Nov 9 17:34:30 2023 +0100 media: sti: hva: Remove useless check Remove index range test since it is done by vb2_get_buffer(). vb2_get_buffer() can return a NULL pointer so we need the return value. Signed-off-by: Benjamin Gaignard CC: Jean-Christophe Trotin Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a24d5d8553bcf64ef3e3fb592efec1fb476a641e Author: Benjamin Gaignard Date: Thu Nov 9 17:34:29 2023 +0100 media: mediatek: vcodec: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Bin Liu CC: Matthias Brugger Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 066f7c4199acbefeed419ca1d3b70405753d0cef Author: Benjamin Gaignard Date: Thu Nov 9 17:29:24 2023 +0100 media: mediatek: vdec: Remove useless loop Simplify code by removing useless loop by using video buffer index. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Bin Liu CC: Matthias Brugger Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a6e86185188c87465402c282fcc612b204602008 Author: Benjamin Gaignard Date: Thu Nov 9 17:29:23 2023 +0100 media: mediatek: jpeg: Use vb2_get_buffer() instead of directly access to buffers array Use vb2_get_buffer() instead of direct access to the vb2_queue bufs array. This allows us to change the type of the bufs in the future. After each call to vb2_get_buffer() we need to be sure that we get a valid pointer so check the return value of all of them. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Bin Liu CC: Matthias Brugger Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1be718477f29b524becd577f71c815b98fc40788 Author: Benjamin Gaignard Date: Thu Nov 9 17:29:22 2023 +0100 media: amphion: Stop direct calls to queue num_buffers field Use vb2_get_num_buffers() to avoid using queue num_buffers field directly. This allows us to change how the number of buffers is computed in the future. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Ming Qian CC: Zhou Peng Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e03bcb28989154de1f8998a9bdd62e9aaaed98d7 Author: Benjamin Gaignard Date: Thu Nov 9 17:29:21 2023 +0100 media: amphion: Use vb2_get_buffer() instead of directly access to buffers array Use vb2_get_buffer() instead of direct access to the vb2_queue bufs array. This allows us to change the type of the bufs in the future. After each call to vb2_get_buffer() we need to be sure that we get a valid pointer so check the return value of all of them. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz CC: Ming Qian CC: Zhou Peng Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit da8fc26b0b7d6c0cf46695ef717458fa248a71fb Author: Benjamin Gaignard Date: Thu Nov 9 17:29:20 2023 +0100 media: videobuf2: Use vb2_get_num_buffers() helper Stop using queue num_buffers field directly, instead use vb2_get_num_buffers(). This prepares for the future 'delete buffers' feature where there are holes in the buffer indices. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 741d0f6b51032a35446ac72ee8a04fcfa938ee2e Author: Benjamin Gaignard Date: Thu Nov 9 17:29:19 2023 +0100 media: videobuf2: Add helper to get queue number of buffers In the future a side effect of introducing DELETE_BUFS ioctl is the create of 'holes' (i.e. unused buffers) in bufs arrays. To know which entries of the bufs arrays are used a bitmap will be added in struct vb2_queue. That will also mean that the number of buffers will be computed given the number of bit set in this bitmap. To smoothly allow this evolution all drives must stop using directly num_buffers field from struct vb2_queue. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5287f48952e0e03be919e04d25cb832207d9661a Author: Benjamin Gaignard Date: Thu Nov 9 17:29:18 2023 +0100 media: videobuf2: Remove duplicated index vs q->num_buffers check vb2_get_buffer() already checks if the requested index is valid. Stop duplicating this kind of check everywhere. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6ea001f94ab571e5e7f8a187dad261710e58563b Author: Benjamin Gaignard Date: Thu Nov 9 17:29:17 2023 +0100 media: videobuf2: Access vb2_queue bufs array through helper functions This patch adds 2 helpers functions to add and remove vb2 buffers from a queue. With these 2 and vb2_get_buffer(), bufs field of struct vb2_queue becomes like a private member of the structure. After each call to vb2_get_buffer() we need to be sure that we get a valid pointer in preparation for when buffers can be deleted. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3c147c29310b838fb79a84f01448e34fbcbf0334 Author: Benjamin Gaignard Date: Thu Nov 9 17:29:16 2023 +0100 media: videobuf2: Use vb2_buffer instead of index Directly use vb2_buffer pointer instead of index inside queue array. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1d33df98b111e358fe21d6282fc98c8d3c66cdce Author: Benjamin Gaignard Date: Thu Nov 9 17:29:15 2023 +0100 media: videobuf2: Stop spamming kernel log with all queue counter Only report unbalanced queue counters do avoid spamming kernel log with useless information. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3431e32cb585f3159ffd4ccceffa0d570bdd5744 Author: Benjamin Gaignard Date: Thu Nov 9 17:29:14 2023 +0100 media: videobuf2: Rework offset 'cookie' encoding pattern Change how offset 'cookie' field value is computed to make possible to use more buffers. The maximum number of buffers depends of PAGE_SHIFT value and can go up to 0x7fff when PAGE_SHIFT = 12. With this encoding pattern we know the maximum number that a queue could store so we can check it at queue init time. It also make easier and faster to find buffer and plane from using the offset field. Change __find_plane_by_offset() prototype to return the video buffer itself rather than it index. Signed-off-by: Benjamin Gaignard Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ca8e45c8048a2c9503c74751d25414601f730580 Author: Arnd Bergmann Date: Mon Nov 6 22:02:59 2023 +0100 csky: fix arch_jump_label_transform_static override The arch_jump_label_transform_static() function in csky was originally meant to override the generic __weak function, but that got changed to an #ifndef check. This showed up as a missing-prototype warning: arch/csky/kernel/jump_label.c:43:6: error: no previous prototype for 'arch_jump_label_transform_static' [-Werror=missing-prototypes] Change the method to use the new method of having a #define and a prototype for the global function. Fixes: 7e6b9db27de9 ("jump_label: make initial NOP patching the special case") Fixes: 4e8bb4ba5a55 ("csky: Add jump-label implementation") Reviewed-by: Guo Ren Signed-off-by: Arnd Bergmann commit 23f8c1823bd4041064ab557283dbb37657549c5b Author: Arnd Bergmann Date: Mon Nov 6 12:20:13 2023 +0100 arch: add do_page_fault prototypes do_page_fault() is missing a declaration on a couple of architectures: arch/alpha/mm/fault.c:85:1: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/csky/mm/fault.c:187:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/mips/mm/fault.c:323:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/nios2/mm/fault.c:43:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] arch/sh/mm/fault.c:389:27: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes] Since the calling conventions are architecture specific here, add separate prototypes for each one. Signed-off-by: Arnd Bergmann commit 1d6571a8794ba276a078a8ca9d84ccc157f8b6c3 Author: Arnd Bergmann Date: Wed Aug 9 12:07:56 2023 +0200 arch: add missing prepare_ftrace_return() prototypes The prototype for prepare_ftrace_return() is architecture specific and can't be in a global header. Since it's normally called from assembly, it doesn't really need a prototype, but we get a warning if it's missing: arch/csky/kernel/ftrace.c:147:6: error: no previous prototype for 'prepare_ftrace_return' [-Werror=missing-prototypes] arch/microblaze/kernel/ftrace.c:22:6: error: no previous prototype for 'prepare_ftrace_return' [-Werror=missing-prototypes] arch/mips/kernel/ftrace.c:305:6: error: no previous prototype for 'prepare_ftrace_return' [-Werror=missing-prototypes] Add the prototypes for the three architectures that don't already have one in asm/ftrace.h. Signed-off-by: Arnd Bergmann commit 42874e4eb35bdfc54f8514685e50434098ba4f6c Author: Arnd Bergmann Date: Wed Nov 8 13:58:36 2023 +0100 arch: vdso: consolidate gettime prototypes The VDSO functions are defined as globals in the kernel sources but intended to be called from userspace, so there is no need to declare them in a kernel side header. Without a prototype, this now causes warnings such as arch/mips/vdso/vgettimeofday.c:14:5: error: no previous prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes] arch/mips/vdso/vgettimeofday.c:28:5: error: no previous prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes] arch/mips/vdso/vgettimeofday.c:36:5: error: no previous prototype for '__vdso_clock_getres' [-Werror=missing-prototypes] arch/mips/vdso/vgettimeofday.c:42:5: error: no previous prototype for '__vdso_clock_gettime64' [-Werror=missing-prototypes] arch/sparc/vdso/vclock_gettime.c:254:1: error: no previous prototype for '__vdso_clock_gettime' [-Werror=missing-prototypes] arch/sparc/vdso/vclock_gettime.c:282:1: error: no previous prototype for '__vdso_clock_gettime_stick' [-Werror=missing-prototypes] arch/sparc/vdso/vclock_gettime.c:307:1: error: no previous prototype for '__vdso_gettimeofday' [-Werror=missing-prototypes] arch/sparc/vdso/vclock_gettime.c:343:1: error: no previous prototype for '__vdso_gettimeofday_stick' [-Werror=missing-prototypes] Most architectures have already added workarounds for these by adding declarations somewhere, but since these are all compatible, we should really just have one copy, with an #ifdef check for the 32-bit vs 64-bit variant and use that everywhere. Unfortunately, the sparc an um versions are currently incompatible since they never added support for __vdso_clock_gettime64() in 32-bit userland. For the moment, I'm leaving this one out, as I can't easily test it and it requires a larger rework. Reviewed-by: Vincenzo Frascino Signed-off-by: Arnd Bergmann commit f717a8d1643d6515c7179cf32408f7d5a0e2e33b Author: Arnd Bergmann Date: Mon Nov 6 10:44:55 2023 +0100 arch: include linux/cpu.h for trap_init() prototype some architectures run into a -Wmissing-prototypes warning for trap_init() arch/microblaze/kernel/traps.c:21:6: warning: no previous prototype for 'trap_init' [-Wmissing-prototypes] Include the right header to avoid this consistently, removing the extra declarations on m68k and x86 that were added as local workarounds already. Signed-off-by: Arnd Bergmann commit 4d86896793dd6eeacdf32b85af1ef130349db4be Author: Arnd Bergmann Date: Wed Nov 8 13:58:30 2023 +0100 arch: fix asm-offsets.c building with -Wmissing-prototypes When -Wmissing-prototypes is enabled, the some asm-offsets.c files fail to build, even when this warning is disabled in the Makefile for normal files: arch/sparc/kernel/asm-offsets.c:22:5: error: no previous prototype for 'sparc32_foo' [-Werror=missing-prototypes] arch/sparc/kernel/asm-offsets.c:48:5: error: no previous prototype for 'foo' [-Werror=missing-prototypes] Address this by making use of the same trick as x86, marking these functions as 'static __used' to avoid the need for a prototype by not drop them in dead-code elimination. Suggested-by: Masahiro Yamada Reviewed-by: Sam Ravnborg Link: https://lore.kernel.org/lkml/CAK7LNARfEmFk0Du4Hed19eX_G6tUC5wG0zP+L1AyvdpOF4ybXQ@mail.gmail.com/ Signed-off-by: Arnd Bergmann commit 64bac5ea17d527872121adddfee869c7a0618f8f Author: Arnd Bergmann Date: Wed Nov 8 13:58:29 2023 +0100 arch: consolidate arch_irq_work_raise prototypes The prototype was hidden in an #ifdef on x86, which causes a warning: kernel/irq_work.c:72:13: error: no previous prototype for 'arch_irq_work_raise' [-Werror=missing-prototypes] Some architectures have a working prototype, while others don't. Fix this by providing it in only one place that is always visible. Reviewed-by: Alexander Gordeev Acked-by: Catalin Marinas Acked-by: Palmer Dabbelt Acked-by: Guo Ren Signed-off-by: Arnd Bergmann commit f12560779f9d734446508f3df17f5632e9aaa2c8 Author: Vincent Guittot Date: Wed Nov 22 14:39:04 2023 +0100 sched/cpufreq: Rework iowait boost Use the max value that has already been computed inside sugov_get_util() to cap the iowait boost and remove dependency with uclamp_rq_util_with() which is not used anymore. Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20231122133904.446032-3-vincent.guittot@linaro.org commit 9c0b4bb7f6303c9c4e2e34984c46f5a86478f84d Author: Vincent Guittot Date: Wed Nov 22 14:39:03 2023 +0100 sched/cpufreq: Rework schedutil governor performance estimation The current method to take into account uclamp hints when estimating the target frequency can end in a situation where the selected target frequency is finally higher than uclamp hints, whereas there are no real needs. Such cases mainly happen because we are currently mixing the traditional scheduler utilization signal with the uclamp performance hints. By adding these 2 metrics, we loose an important information when it comes to select the target frequency, and we have to make some assumptions which can't fit all cases. Rework the interface between the scheduler and schedutil governor in order to propagate all information down to the cpufreq governor. effective_cpu_util() interface changes and now returns the actual utilization of the CPU with 2 optional inputs: - The minimum performance for this CPU; typically the capacity to handle the deadline task and the interrupt pressure. But also uclamp_min request when available. - The maximum targeting performance for this CPU which reflects the maximum level that we would like to not exceed. By default it will be the CPU capacity but can be reduced because of some performance hints set with uclamp. The value can be lower than actual utilization and/or min performance level. A new sugov_effective_cpu_perf() interface is also available to compute the final performance level that is targeted for the CPU, after applying some cpufreq headroom and taking into account all inputs. With these 2 functions, schedutil is now able to decide when it must go above uclamp hints. It now also has a generic way to get the min performance level. The dependency between energy model and cpufreq governor and its headroom policy doesn't exist anymore. eenv_pd_max_util() asks schedutil for the targeted performance after applying the impact of the waking task. [ mingo: Refined the changelog & C comments. ] Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20231122133904.446032-2-vincent.guittot@linaro.org commit 07cb30216d31bee8e4250549ebb4086ba5951887 Author: Benjamin Gaignard Date: Thu Nov 9 17:29:13 2023 +0100 media: videobuf2: Rename offset parameter Rename 'off' parameter to 'offset' to clarify the code. Signed-off-by: Benjamin Gaignard Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 50181c0cff31281b9f1071575ffba8a102375ece Author: Vincent Guittot Date: Wed Nov 22 15:01:19 2023 +0100 sched/pelt: Avoid underestimation of task utilization Lukasz Luba reported that a thread's util_est can significantly decrease as a result of sharing the CPU with other threads. The use case can be easily reproduced with a periodic task TA that runs 1ms and sleeps 100us. When the task is alone on the CPU, its max utilization and its util_est is around 888. If another similar task starts to run on the same CPU, TA will have to share the CPU runtime and its maximum utilization will decrease around half the CPU capacity (512) then TA's util_est will follow this new maximum trend which is only the result of sharing the CPU with others tasks. Such situation can be detected with runnable_avg wich is close or equal to util_avg when TA is alone, but increases above util_avg when TA shares the CPU with other threads and wait on the runqueue. [ We prefer an util_est that overestimate rather than under estimate because in 1st case we will not provide enough performance to the task which will remain under-provisioned, whereas in the other case we will create some idle time which will enable to reduce contention and as a result reduces the util_est so the overestimate will be transient whereas the underestimate will remain. ] [ mingo: Refined the changelog, added comments from the LKML discussion. ] Reported-by: Lukasz Luba Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/lkml/CAKfTPtDd-HhF-YiNTtL9i5k0PfJbF819Yxu4YquzfXgwi7voyw@mail.gmail.com/#t Link: https://lore.kernel.org/r/20231122140119.472110-1-vincent.guittot@linaro.org Cc: Hongyan Xia commit 4dae8c047a70307d83d912afbda2e2c94de155b6 Author: Rob Herring Date: Mon Oct 30 09:26:21 2023 -0500 soc: apple: mailbox: Add explicit include of platform_device.h The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other and pull in various other headers. In preparation to fix this, adjust the includes for what is actually needed. platform_device.h is implicitly included by of_platform.h, but that's going to be removed. Signed-off-by: Rob Herring Reviewed-by: Neal Gompa Signed-off-by: Hector Martin commit c84292d9d253706267889cf2614400712f15d689 Author: Hector Martin Date: Tue Mar 28 20:38:26 2023 +0900 soc: apple: mailbox: Rename config symbol to APPLE_MAILBOX With the original owner of APPLE_MAILBOX removed, let's rename the new APPLE_MBOX to the old name. This avoids .config churn for downstream users, and leaves us with an identical config symbol and module name as before. Acked-by: Eric Curtin Acked-by: Neal Gompa Acked-by: Alyssa Rosenzweig Signed-off-by: Hector Martin commit 143897c4fa976d02bfafe5ae32b9ffc60dc6145a Author: Hector Martin Date: Tue Mar 14 19:47:32 2023 +0900 mailbox: apple: Delete driver This driver is now orphaned and superseded by drivers/soc/apple/mailbox.c. Acked-by: Eric Curtin Acked-by: Neal Gompa Acked-by: Alyssa Rosenzweig Signed-off-by: Hector Martin commit bb538effdc71397f2d08bb98df6b326d3b5b2333 Author: Hector Martin Date: Tue Mar 14 19:46:47 2023 +0900 soc: apple: rtkit: Port to the internal mailbox driver Now that we have a mailbox driver in drivers/soc/apple, port the RTKit code to it. This mostly just entails replacing calls through the mailbox subsystem with direct calls into the driver. Acked-by: Eric Curtin Acked-by: Neal Gompa Acked-by: Alyssa Rosenzweig Signed-off-by: Hector Martin commit 6e1457fcad3ff6b1885e64f5e393db5ff5ec2a42 Author: Hector Martin Date: Tue Mar 14 19:45:45 2023 +0900 soc: apple: mailbox: Add ASC/M3 mailbox driver This new driver is based on the existing apple-mailbox driver, but replaces the usage of the mailbox subsystem with directly exported symbols. As part of this refactor, this adds support for using the hardware FIFOs (not supported in mailbox) and implicitly fixes a bunch of bugs caused by bad interactions with the mailbox subsystem. It also adds runtime-PM support. The new config symbol is APPLE_MBOX, while the module name remains identical ("apple-mailbox"). The configs are mutually exclusive in Kconfig, to avoid conflicts. Acked-by: Eric Curtin Acked-by: Neal Gompa Acked-by: Alyssa Rosenzweig Signed-off-by: Hector Martin commit 57b79ac9f43dc71fc8b55af51d1c9f469cb7a0de Author: Hector Martin Date: Thu May 5 01:25:16 2022 +0900 soc: apple: rtkit: Get rid of apple_rtkit_send_message_wait It is fundamentally broken and has no users. Just remove it. Acked-by: Eric Curtin Acked-by: Neal Gompa Acked-by: Alyssa Rosenzweig Signed-off-by: Hector Martin commit 5e1c8a47fc6ec6251ddd126f4245279fc072f1c0 Author: Adrian Huang Date: Thu Nov 23 12:13:37 2023 +0800 x86/ioapic: Remove unfinished sentence from comment [ mingo: Refine changelog. ] Signed-off-by: Adrian Huang Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org commit 03f111710af9ea9cd5a08ecc98e456d1cc0c2284 Author: Yuntao Wang Date: Thu Nov 23 11:49:11 2023 +0800 x86/io: Remove the unused 'bw' parameter from the BUILDIO() macro Commit 1e8f93e18379 ("x86: Consolidate port I/O helpers") moved some port I/O helpers to , which caused the 'bw' parameter in the BUILDIO() macro to become unused. Remove it. Signed-off-by: Yuntao Wang Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20231123034911.217791-1-ytcoode@gmail.com commit 0181f7a307fe9796018f61334c3c4e6c1784ebb6 Merge: 3c9202e88ffad 98b1cc82c4aff Author: Mauro Carvalho Chehab Date: Thu Nov 23 10:50:46 2023 +0100 Merge tag 'v6.7-rc2' into media_stage Linux 6.7-rc2 * tag 'v6.7-rc2': (325 commits) Linux 6.7-rc2 prctl: Disable prctl(PR_SET_MDWE) on parisc parisc/power: Fix power soft-off when running on qemu parisc: Replace strlcpy() with strscpy() NFSD: Fix checksum mismatches in the duplicate reply cache NFSD: Fix "start of NFS reply" pointer passed to nfsd_cache_update() NFSD: Update nfsd_cache_append() to use xdr_stream nfsd: fix file memleak on client_opens_release dm-crypt: start allocating with MAX_ORDER dm-verity: don't use blocking calls from tasklets dm-bufio: fix no-sleep mode dm-delay: avoid duplicate logic dm-delay: fix bugs introduced by kthread mode dm-delay: fix a race between delay_presuspend and delay_bio drm/amdgpu/gmc9: disable AGP aperture drm/amdgpu/gmc10: disable AGP aperture drm/amdgpu/gmc11: disable AGP aperture drm/amdgpu: add a module parameter to control the AGP aperture drm/amdgpu/gmc11: fix logic typo in AGP check drm/amd/display: Fix encoder disable logic ... Signed-off-by: Mauro Carvalho Chehab commit d67a308ac5de5b24b678ee90759a3b2e4283c11e Merge: 280ac17856ec4 3cd944590da9b Author: Arnd Bergmann Date: Thu Nov 23 10:39:13 2023 +0100 Merge branch 'asm-generic-io.h-cleanup' into asm-generic MIPS is the last architecture that is yet to start using asm-generic/io.h, so Baoquan He converts it, which allows the other changes to remove code duplication, and it will allow further cleanups in the future. * asm-generic-io.h-cleanup: asm/io: remove unnecessary xlate_dev_mem_ptr() and unxlate_dev_mem_ptr() mips: io: remove duplicated codes arch/*/io.h: remove ioremap_uc in some architectures mips: add including commit 280ac17856ec438757810c9123ddf2294b07c46f Author: Thomas Huth Date: Thu Oct 26 13:31:14 2023 +0200 hexagon: Remove CONFIG_HEXAGON_ARCH_VERSION from uapi header uapi headers should not expose CONFIG switches since they are not available in userspace. Fix it in arch/hexagon/include/uapi/asm/user.h by always defining the cs0 and cs1 entries instead of pad values. Suggested-by: Arnd Bergmann Signed-off-by: Thomas Huth Signed-off-by: Arnd Bergmann commit 3cd944590da9b9840c9f14bfc6581bec308c7c71 Author: Kefeng Wang Date: Sat Nov 18 18:08:27 2023 +0800 asm/io: remove unnecessary xlate_dev_mem_ptr() and unxlate_dev_mem_ptr() The asm-generic/io.h already has default definition, remove unnecessary arch's defination. Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Russell King Cc: Brian Cain Cc: "James E.J. Bottomley" Cc: Nicholas Piggin Cc: Christophe Leroy Cc: Yoshinori Sato Cc: Rich Felker Cc: "David S. Miller" Cc: Stanislav Kinsburskii Signed-off-by: Kefeng Wang Signed-off-by: Arnd Bergmann commit aea72963608c733c85b8610f493d074d46c4ae68 Author: Baoquan He Date: Thu Sep 21 19:04:24 2023 +0800 mips: io: remove duplicated codes By adding support, the duplicated phys_to_virt can be removed to use the default version in . Meanwhile move isa_bus_to_virt() down below including to fix the compiling error of missing phys_to_virt definition. Signed-off-by: Baoquan He Acked-by: Arnd Bergmann Acked-by: Thomas Bogendoerfer Cc: Thomas Bogendoerfer Cc: Geert Uytterhoeven Cc: Helge Deller Cc: Serge Semin Cc: Florian Fainelli Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-mips@vger.kernel.org Signed-off-by: Arnd Bergmann commit 026246f114d925b2ab97a60e8b4a5506bd035e9c Author: Baoquan He Date: Thu Sep 21 19:04:23 2023 +0800 arch/*/io.h: remove ioremap_uc in some architectures ioremap_uc() is only meaningful on old x86-32 systems with the PAT extension, and on ia64 with its slightly unconventional ioremap() behavior. So remove the ioremap_uc() definition in architecutures other than x86 and ia64. These architectures all have asm-generic/io.h included and will have the default ioremap_uc() definition which returns NULL. This changes the existing behaviour, while no need to worry about any breakage because in the only callsite of ioremap_uc(), code has been adjusted to eliminate the impact. Please see atyfb_setup_generic() of drivers/video/fbdev/aty/atyfb_base.c. If any new invocation of ioremap_uc() need be added, please consider using ioremap() intead or adding a ARCH specific version if necessary. Signed-off-by: Baoquan He Acked-by: Geert Uytterhoeven Acked-by: Michael Ellerman (powerpc) Acked-by: Helge Deller # parisc Acked-by: Arnd Bergmann Acked-by: Thomas Bogendoerfer Acked-by: John Paul Adrian Glaubitz (SuperH) Cc: linux-alpha@vger.kernel.org Cc: linux-hexagon@vger.kernel.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mips@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-sh@vger.kernel.org Cc: sparclinux@vger.kernel.org Signed-off-by: Arnd Bergmann commit 4bfb53e7d317c01f296b2feb2fae7c421c1d52dc Author: Jiaxun Yang Date: Thu Sep 21 19:04:22 2023 +0800 mips: add including With the adding, some default ioremap_xx methods defined in asm-generic/io.h can be used. E.g the default ioremap_uc() returning NULL. We also massaged various headers to avoid nested includes. Signed-off-by: Baoquan He Signed-off-by: Jiaxun Yang [jiaxun.yang@flygoat.com: Massage more headers, fix ioport defines] Reviewed-by: Arnd Bergmann Acked-by: Thomas Bogendoerfer Cc: Thomas Bogendoerfer Cc: Huacai Chen Cc: linux-mips@vger.kernel.org Cc: linux-arch@vger.kernel.org Signed-off-by: Arnd Bergmann commit 815d8b0425ad1164e45953ac3d56a9f6f63792cc Author: Sarah Walker Date: Wed Nov 22 16:34:41 2023 +0000 drm/imagination: Add driver documentation Add documentation for the UAPI. Changes since v5: - Remove obsolete VM documentation Co-developed-by: Matt Coster Signed-off-by: Matt Coster Co-developed-by: Donald Robson Signed-off-by: Donald Robson Signed-off-by: Sarah Walker Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/76a7b18cfbe93066efcee3311ae795176ce7c65d.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit cb56cd61086645e46cc54d1837de803b1c471df6 Author: Sarah Walker Date: Wed Nov 22 16:34:40 2023 +0000 drm/imagination: Add firmware trace to debugfs Firmware trace is exposed at /sys/debug/dri//pvr_fw/trace_0. Trace is enabled via the group mask at /sys/debug/dri//pvr_params/fw_trace_mask. Changes since v8: - Corrected license identifiers Changes since v3: - Use drm_dev_{enter,exit} Co-developed-by: Matt Coster Signed-off-by: Matt Coster Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Link: https://lore.kernel.org/r/009cf9fee347fa96c8a665dc368fc54a5ffceff0.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 6b17baabf6d306f85021b9a081dcd0a1a5c6f846 Author: Sarah Walker Date: Wed Nov 22 16:34:39 2023 +0000 drm/imagination: Add firmware trace header Changes since v8: - Corrected license identifiers Changes since v5: - Split up header commit due to size Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Link: https://lore.kernel.org/r/c0fc28b2df394584afe3cc1b320140b01e17b322.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit eaf01ee5ba28b97f96a3d3eec4c5fbfb37ee4cde Author: Sarah Walker Date: Wed Nov 22 16:34:38 2023 +0000 drm/imagination: Implement job submission and scheduling Implement job submission ioctl. Job scheduling is implemented using drm_sched. Jobs are submitted in a stream format. This is intended to allow the UAPI data format to be independent of the actual FWIF structures in use, which vary depending on the GPU in use. The stream formats are documented at: https://gitlab.freedesktop.org/mesa/mesa/-/blob/f8d2b42ae65c2f16f36a43e0ae39d288431e4263/src/imagination/csbgen/rogue_kmd_stream.xml Changes since v8: - Updated for upstreamed DRM scheduler changes - Removed workaround code for the pending_list previously being updated after run_job() returned - Fixed null deref in pvr_queue_cleanup_fw_context() for bad stream ptr given to create_context ioctl - Corrected license identifiers Changes since v7: - Updated for v8 "DRM scheduler changes for XE" patchset Changes since v6: - Fix fence handling in pvr_sync_signal_array_add() - Add handling for SUBMIT_JOB_FRAG_CMD_DISABLE_PIXELMERGE flag - Fix missing dma_resv locking in job submit path Changes since v5: - Fix leak in job creation error path Changes since v4: - Use a regular workqueue for job scheduling Changes since v3: - Support partial render jobs - Add job timeout handler - Split sync handling out of job code - Use drm_dev_{enter,exit} Changes since v2: - Use drm_sched for job scheduling Co-developed-by: Boris Brezillon Signed-off-by: Boris Brezillon Co-developed-by: Donald Robson Signed-off-by: Donald Robson Signed-off-by: Sarah Walker Link: https://lore.kernel.org/r/c98dab7a5f5fb891fbed7e4990d19b5d13964365.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit d2d79d29bb98a32c511f7339a8e93b47544fdeac Author: Sarah Walker Date: Wed Nov 22 16:34:37 2023 +0000 drm/imagination: Implement context creation/destruction ioctls Implement ioctls for the creation and destruction of contexts. Contexts are used for job submission and each is associated with a particular job type. Changes since v8: - Fixed one error path in pvr_stream_process_1() - Corrected license identifiers Changes since v5: - Fix context release in final error path in pvr_context_create() Changes since v3: - Use drm_dev_{enter,exit} Co-developed-by: Boris Brezillon Signed-off-by: Boris Brezillon Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Link: https://lore.kernel.org/r/ac474a1f7dda2582d290798e4837140a2989aa2a.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 6eedddab733b350886571f98b810108b13bf74ae Author: Sarah Walker Date: Wed Nov 22 16:34:36 2023 +0000 drm/imagination: Implement free list and HWRT create and destroy ioctls Implement ioctls to create and destroy free lists and HWRT datasets. Free lists are used for GPU-side memory allocation during geometry processing. HWRT datasets are the FW-side structures representing render targets. Changes since v8: - Corrected license identifiers Changes since v6: - Fix out-of-bounds shift in get_cr_multisamplectl_val() Changes since v4: - Remove use of drm_gem_shmem_get_pages() Changes since v3: - Support free list grow requests from FW - Use drm_dev_{enter,exit} Co-developed-by: Boris Brezillon Signed-off-by: Boris Brezillon Co-developed-by: Donald Robson Signed-off-by: Donald Robson Signed-off-by: Sarah Walker Link: https://lore.kernel.org/r/919358c5887a7628da588c455a5bb7e3ea4b47ae.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 927f3e0253c11276f0237ca1a14e77c48957c069 Author: Sarah Walker Date: Wed Nov 22 16:34:35 2023 +0000 drm/imagination: Implement MIPS firmware processor and MMU support Add support for the MIPS firmware processor, used in the Series AXE GPU. The MIPS firmware processor uses a separate MMU to the rest of the GPU, so this patch adds support for that as well. Changes since v8: - Corrected license identifiers Changes since v6: - Fix integer overflow in VM map error path Changes since v5: - Use alloc_page() when allocating MIPS pagetable Changes since v3: - Get regs resource (removed from GPU resources commit) Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Link: https://lore.kernel.org/r/a114f7b3e97cb07460c7f2842901716a9207b0c4.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit cc1aeedb98ad347c06ff59e991b2f94dfb4c565d Author: Sarah Walker Date: Wed Nov 22 16:34:34 2023 +0000 drm/imagination: Implement firmware infrastructure and META FW support The infrastructure includes parsing of the firmware image, initialising FW-side structures, handling the kernel and firmware command ringbuffers and starting & stopping the firmware processor. This patch also adds the necessary support code for the META firmware processor. Changes since v8: - Fix documentation for pvr_fwccb_process() - Corrected license identifiers Changes since v6: - Add a minimum retry count to pvr_kccb_reserve_slot_sync() Changes since v5: - Add workaround for BRN 71242 - Attempt to recover GPU on MMU flush command failure Changes since v4: - Remove use of drm_gem_shmem_get_pages() - Remove interrupt resource name Changes since v3: - Hard reset FW processor on watchdog timeout - Switch to threaded IRQ - Rework FW object creation/initialisation to aid hard reset - Added MODULE_FIRMWARE() - Use drm_dev_{enter,exit} Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Link: https://lore.kernel.org/r/bb52a8dc84f296b37dc6668dfe8fbaf2ba551139.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 727538a4bbff07736ecfd704efd7e21718fca3e4 Author: Sarah Walker Date: Wed Nov 22 16:34:33 2023 +0000 drm/imagination: Implement power management Add power management to the driver, using runtime pm. The power off sequence depends on firmware commands which are not implemented in this patch. Changes since v8: - Corrected license identifiers Changes since v5: - Use RUNTIME_PM_OPS() to declare PM callbacks - Add Kconfig dependency on CONFIG_PM Changes since v4: - Suspend runtime PM before unplugging device on rmmod Changes since v3: - Don't power device when calling pvr_device_gpu_fini() - Documentation for pvr_dev->lost has been improved - pvr_power_init() renamed to pvr_watchdog_init() - Use drm_dev_{enter,exit} Changes since v2: - Use runtime PM - Implement watchdog Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/e09af4ef1ff514e1d6d7f97c7c5032c643c56f9c.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit ff5f643de0bf27874c4033cd57a0bd034b5c7d11 Author: Donald Robson Date: Wed Nov 22 16:34:32 2023 +0000 drm/imagination: Add GEM and VM related code Add a GEM implementation based on drm_gem_shmem, and support code for the PowerVR GPU MMU. The GPU VA manager is used for address space management. Changes since v8: - Updated for changes to drm_gpuvm - Switched to dma_resv locking for vm ops - Removed linked lists for collecting BOs in vm_context and for freeing after ops. This is now done internally in drm_gpuvm - Corrected license identifiers Changes since v7: - kernel-doc fixes - Remove prefixes from DRM_PVR_BO_* flags - CREATE_BO ioctl now returns an error if provided size isn't page aligned - Optimised MMU flushes Changes since v6: - Don't initialise kernel_vm_ctx when using MIPS firmware processor - Rename drm_gpuva_manager uses to drm_gpuvm - Sync GEM object to device on creation Changes since v5: - Use WRITE_ONCE() when writing to page tables - Add memory barriers to page table insertion - Fixed double backing page alloc on page table objects - Fix BO mask checks in DRM_IOCTL_PVR_CREATE_BO handler - Document use of pvr_page_table_*_idx when preallocing page table objs - Remove pvr_vm_gpuva_mapping_init() - Remove NULL check for unmap op in remap function - Protect gem object with mutex during drm_gpuva_link/unlink - Defer free or release of page table pages until after TLB flush - Use drm_gpuva_op_remap_get_unmap_range() helper Changes since v4: - Correct sync function in vmap/vunmap function documentation - Update for upstream GPU VA manager - Fix missing frees when unmapping drm_gpuva objects - Always zero GEM BOs on creation Changes since v3: - Split MMU and VM code - Register page table allocations with kmemleak - Use drm_dev_{enter,exit} Changes since v2: - Use GPU VA manager - Use drm_gem_shmem Co-developed-by: Matt Coster Signed-off-by: Matt Coster Co-developed-by: Donald Robson Signed-off-by: Donald Robson Signed-off-by: Sarah Walker Link: https://lore.kernel.org/r/3c96dd170efe759b73897e3675d7310a7c4b06d0.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit f99f5f3ea7efd54ba0529c4f2d7c72712918a522 Author: Sarah Walker Date: Wed Nov 22 16:34:31 2023 +0000 drm/imagination: Add GPU ID parsing and firmware loading Read the GPU ID register at probe time and select the correct features/quirks/enhancements. Use the GPU ID to form the firmware file name and load the firmware. The features/quirks/enhancements arrays are currently hardcoded in the driver for the supported GPUs. We are looking at moving this information to the firmware image. Changes since v8: - Corrected license identifiers Changes since v7: - Fix kerneldoc for pvr_device_info_set_enhancements() Changes since v5: - Add BRN 71242 to device info Changes since v4: - Retrieve device information from firmware header - Pull forward firmware header parsing from FW infrastructure patch - Use devm_add_action_or_reset to release firmware Changes since v3: - Use drm_dev_{enter,exit} Co-developed-by: Frank Binns Signed-off-by: Frank Binns Co-developed-by: Matt Coster Signed-off-by: Matt Coster Co-developed-by: Donald Robson Signed-off-by: Donald Robson Signed-off-by: Sarah Walker Link: https://lore.kernel.org/r/1ff76f7a5b45c742279c78910f8491b8a5e7f6e6.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit a26f067feac1f6142c3ccbaeaee8f84078bca9d4 Author: Sarah Walker Date: Wed Nov 22 16:34:30 2023 +0000 drm/imagination: Add FWIF headers Changes since v8: - Corrected license identifiers Changes since v7: - Add padding to struct rogue_fwif_ccb_ctl to place read and write offsets in different cache lines Changes since v5: - Split up header commit due to size - Add BRN 71242 to device info Changes since v4: - Add FW header device info Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/aa681533a02bd2d46af17a6a6010f4d6048fbb0a.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 7900e00434eda5ebe7e0c6c995f8528929a8182c Author: Sarah Walker Date: Wed Nov 22 16:34:29 2023 +0000 drm/imagination: Add firmware and MMU related headers Changes since v8: - Corrected license identifiers Changes since v5: - Split up header commit due to size Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/23ee233dfbe6f2239328f8201fd6d8c1017cea58.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit b41ae495207eaab1363ac3d424e67f3f354ca2ce Author: Sarah Walker Date: Wed Nov 22 16:34:28 2023 +0000 drm/imagination: Add GPU register headers Changes since v8: - Corrected license identifiers Changes since v5: - Split up header commit due to size Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/9f1fbf6c18e9644ac10712e05893701f06aee6ae.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 1f88f017e6499261f46d3468befac7b1cdc96e52 Author: Sarah Walker Date: Wed Nov 22 16:34:27 2023 +0000 drm/imagination: Get GPU resources Acquire clock and register resources, and enable/map as appropriate. Changes since v8: - Corrected license identifiers Changes since v3: - Remove regulator resource (not used on supported platform) - Use devm helpers - Use devm_clk_get_optional() for optional clocks - Don't prepare clocks on resource acquisition - Drop pvr_device_clk_core_get_freq() helper - Drop pvr_device_reg_fini() - Drop NULLing of clocks in pvr_device_clk_init() - Use dev_err_probe() on clock acquisition failure - Remove PVR_CR_READ/WRITE helper macros - Improve documentation for GPU clocks - Remove regs resource (not used in this commit) Co-developed-by: Frank Binns Signed-off-by: Frank Binns Co-developed-by: Matt Coster Signed-off-by: Matt Coster Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/579027bd5be4eb3218c9784050ded2326ecbc352.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 4babef0708656c54e67ee0ee3994ee98898f51d1 Author: Sarah Walker Date: Wed Nov 22 16:34:26 2023 +0000 drm/imagination: Add skeleton PowerVR driver This adds the basic skeleton of the driver. The driver registers itself with DRM on probe. Ioctl handlers are currently implemented as stubs. Changes since v8: - Corrected license identifiers Changes since v5: - Update compatible string & description to match marketing name - Checkpatch fixes in to/from_pvr_device/file macros Changes since v3: - Clarify supported GPU generations in driver description - Use drm_dev_unplug() when removing device - Change from_* and to_* functions to macros - Fix IS_PTR/PTR_ERR confusion in pvr_probe() - Remove err_out labels in favour of direct returning - Remove specific am62 compatible match string - Drop MODULE_FIRMWARE() Co-developed-by: Frank Binns Signed-off-by: Frank Binns Co-developed-by: Matt Coster Signed-off-by: Matt Coster Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Reviewed-by: Maxime Ripard Link: https://lore.kernel.org/r/fed8a77e29620a61aed2684f802339759082cf1b.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 1088d89e551530a9f5128770d74a1516090f1e41 Author: Sarah Walker Date: Wed Nov 22 16:34:25 2023 +0000 drm/imagination/uapi: Add PowerVR driver UAPI Add the UAPI implementation for the PowerVR driver. Changes from v8: - Fixed documentation for unmapping, which previously suggested the size was not used - Corrected license identifier Changes from v7: - Remove prefixes from DRM_PVR_BO_* flags - Improve struct drm_pvr_ioctl_create_hwrt_dataset_args documentation - Remove references to static area carveouts - CREATE_BO ioctl now returns an error if provided size isn't page aligned - Clarify documentation for DRM_PVR_STATIC_DATA_AREA_EOT Changes from v6: - Add padding to struct drm_pvr_dev_query_gpu_info - Improve BYPASS_CACHE flag documentation - Add SUBMIT_JOB_FRAG_CMD_DISABLE_PIXELMERGE flag Changes from v4: - Remove CREATE_ZEROED flag for BO creation (all buffers are now zeroed) Co-developed-by: Frank Binns Signed-off-by: Frank Binns Co-developed-by: Boris Brezillon Signed-off-by: Boris Brezillon Co-developed-by: Matt Coster Signed-off-by: Matt Coster Co-developed-by: Donald Robson Signed-off-by: Donald Robson Signed-off-by: Sarah Walker Reviewed-by: Faith Ekstrand Link: https://lore.kernel.org/r/8c95a3a1d685e2b44d361b95a19eae5a478fb9d1.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 6a85c3b14728f0d5cb59ca0d38894db2a9839fce Author: Sarah Walker Date: Wed Nov 22 16:34:24 2023 +0000 dt-bindings: gpu: Add Imagination Technologies PowerVR/IMG GPU Add the device tree binding documentation for the IMG AXE GPU used in TI AM62 SoCs. Co-developed-by: Frank Binns Signed-off-by: Frank Binns Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Reviewed-by: Maxime Ripard Reviewed-by: Linus Walleij Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/deb0a4659423a3b8a74addee7178b6df7679575d.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit a191f73d85484f804284674c14f2d9f572c18adb Author: Donald Robson Date: Wed Nov 22 16:34:23 2023 +0000 drm/gpuvm: Helper to get range of unmap from a remap op. Determining the start and range of the unmap stage of a remap op is a common piece of code currently implemented by multiple drivers. Add a helper for this. Changes since v7: - Renamed helper to drm_gpuva_op_remap_to_unmap_range() - Improved documentation Changes since v6: - Remove use of __always_inline Signed-off-by: Donald Robson Signed-off-by: Sarah Walker Reviewed-by: Danilo Krummrich Link: https://lore.kernel.org/r/8a0a5b5eeec459d3c60fcdaa5a638ad14a18a59e.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 66b73e9a402d822723b3af5263eb12d735628eac Author: Matt Coster Date: Wed Nov 22 16:34:22 2023 +0000 sizes.h: Add entries between SZ_32G and SZ_64T sizes.h has a gap in defines between SZ_32G and SZ_64T. Add the missing defines so they can be used in drivers. Signed-off-by: Matt Coster Signed-off-by: Sarah Walker Signed-off-by: Donald Robson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/58b227d96f27859b453caf0ceaaac81a6616304b.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard commit 8a9fd9ecc4f1f72839c94cc2ec6846d6d9a71987 Author: Jouni Högander Date: Mon Nov 20 15:02:14 2023 +0200 drm/i915/display: Do not check psr2 if psr/panel replay is not supported Do not continue to psr2 checks if psr or panel replay is not supported. Cc: Animesh Manna Fixes: b8cf5b5d266e ("drm/i915/panelreplay: Initializaton and compute config for panel replay") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9670 Signed-off-by: Jouni Högander Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20231120130214.3332726-1-jouni.hogander@intel.com commit 21f4c443731fdb064c0dd31a743aafd0b075156c Author: Krzysztof Kozlowski Date: Mon Nov 20 18:47:20 2023 +0100 soundwire: stream: constify sdw_port_config when adding devices sdw_stream_add_master() and sdw_stream_add_slave() do not modify contents of passed sdw_port_config, so it can be made const for code safety and as documentation of expected usage. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231120174720.239610-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 5bdc61ef45007908df9d8587111c7a5a552bdd46 Author: Krzysztof Kozlowski Date: Mon Nov 20 20:07:40 2023 +0100 soundwire: qcom: move sconfig in qcom_swrm_stream_alloc_ports() out of critical section Setting members of local variable "sconfig" in qcom_swrm_stream_alloc_ports() does not depend on any earlier code in this function, so can be moved up before the critical section. This makes the code a bit easier to follow because critical section is smaller. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231120190740.339350-2-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 5c68b66d4d7eff8cdb6f508f8537faa30c5faa6d Author: Krzysztof Kozlowski Date: Mon Nov 20 20:07:39 2023 +0100 soundwire: qcom: drop unneeded qcom_swrm_stream_alloc_ports() cleanup The cleanup in "err" goto label clears bits from pconfig array which is a local variable. This does not have any effect outside of this function, so drop this useless code. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231120190740.339350-1-krzysztof.kozlowski@linaro.org Signed-off-by: Vinod Koul commit 2bb7a27bd7c311c4928d6a8b5edf4b2aaa948ea8 Author: Mika Kahola Date: Thu Nov 16 11:05:12 2023 +0200 drm/i915/display: Use int type for entry_setup_frames entry_setup_frames variable is defined as u8. However, the function call intel_psr_entry_setup_frames() can return negative error code. There is a type mismatch here, so let's switch to use int here as well. Fixes: 2b981d57e480 ("drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier") Signed-off-by: Mika Kahola Reviewed-by: Vinod Govindapillai Link: https://patchwork.freedesktop.org/patch/msgid/20231116090512.480373-1-mika.kahola@intel.com commit 90f1015dfee3d33f8ca7bfe03296d100d465e385 Author: Zqiang Date: Fri Nov 3 15:26:39 2023 +0800 rcutorture: Add fqs_holdoff check before fqs_task is created For rcutorture tests on RCU implementations that support force-quiescent-state operations and that set the fqs_duration module parameter greater than zero, the fqs_task kthread will be created. However, if the fqs_holdoff module parameter is not set, then its default value of zero will cause fqs_task enter a long-term busy loop until stopped by kthread_stop(). This commit therefore adds a fqs_holdoff check before the fqs_task is created, making sure that whenever the fqs_task is created, the fqs_holdoff will be greater than zero. Signed-off-by: Zqiang Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit af19a2526cba92082723b98fcf191a595054a952 Author: Paul E. McKenney Date: Wed Nov 1 10:30:56 2023 -0700 rcutorture: Add mid-sized stall to TREE07 There is code in rcu_implicit_dynticks_qs() that checks for the current grace period being halfway to the RCU CPU stall timeout, but rcutorture currently does not test this code. This commit therefore adds a 14-second stall to the TREE07 scenario in order to test this code given the default RCU CPU stall warning timeout of 21 seconds. Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 454723b1615f7423fcba0b8f722cef4992a1846f Author: Thomas Weißschuh Date: Mon Oct 16 00:25:14 2023 +0200 rcutorture: add nolibc init support for mips, ppc and rv64 Use nolibc for all support architectures. Signed-off-by: Thomas Weißschuh Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 69dcbbd80421a5d8230c178e01869f8e2edb2317 Author: Paul E. McKenney Date: Tue Oct 10 09:52:19 2023 -0700 locktorture: Increase Hamming distance between call_rcu_chain and rcu_call_chains One letter difference is really not enough, so this commit changes call_rcu_chain to call_rcu_chain_list. Reported-by: Dan Carpenter Signed-off-by: Paul E. McKenney Signed-off-by: Neeraj Upadhyay (AMD) commit 4c58e9d85c24b5281a2d39a3e6510b5f3b7fc687 Author: Rob Herring Date: Wed Nov 1 09:45:00 2023 -0500 opp: ti: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. As this driver only does DT based matching, of_match_device() will never return NULL if we've gotten to probe(). Therefore, the NULL check and error return for it can be dropped. Signed-off-by: Rob Herring Signed-off-by: Viresh Kumar commit f4814c20d14ca168382e8887c768f290e4a2a861 Author: Arnd Bergmann Date: Wed Nov 22 23:18:29 2023 +0100 drm/rockchip: rk3066_hdmi: include drm/drm_atomic.h Without this header, the newly added code fails to build: drivers/gpu/drm/rockchip/rk3066_hdmi.c: In function 'rk3066_hdmi_encoder_enable': drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:22: error: implicit declaration of function 'drm_atomic_get_new_connector_state'; did you mean 'drm_atomic_helper_connector_reset'? [-Werror=implicit-function-declaration] 397 | conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | drm_atomic_helper_connector_reset drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:20: error: assignment to 'struct drm_connector_state *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] 397 | conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector); | ^ drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:22: error: implicit declaration of function 'drm_atomic_get_new_crtc_state'; did you mean 'drm_atomic_helper_swap_state'? [-Werror=implicit-function-declaration] 401 | crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | drm_atomic_helper_swap_state drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:20: error: assignment to 'struct drm_crtc_state *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] 401 | crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc); | ^ Fixes: ae3436a5e7c2 ("drm/rockchip: rk3066_hdmi: Switch encoder hooks to atomic") Signed-off-by: Arnd Bergmann Acked-by: Randy Dunlap Tested-by: Randy Dunlap # build-tested Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231122221838.3164349-1-arnd@kernel.org commit 1080b5c0c1a62a36dc29eb6e4dfedf7c9eaf8679 Author: Johan Hovold Date: Fri Nov 17 18:16:28 2023 +0100 of: fix recursion typo in kernel doc Fix a typo in the kernel doc for the of_platform_depopulate() functions, which remove children "recursively". Signed-off-by: Johan Hovold Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20231117171628.20139-1-johan+linaro@kernel.org Signed-off-by: Rob Herring commit b3c5a7de9aeb51cb19160f3f61343ed87487abde Author: Yang Li Date: Wed Nov 22 08:49:26 2023 +0800 drm/nouveau/fifo: Remove duplicated include in chan.c ./drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c: chid.h is included more than once. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7603 Signed-off-by: Yang Li Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20231122004926.84933-1-yang.lee@linux.alibaba.com commit 56d2eeda87995245300836ee4dbd13b002311782 Author: Nikita Kiryushin Date: Thu Nov 9 21:08:59 2023 +0300 ACPI: LPIT: Avoid u32 multiplication overflow In lpit_update_residency() there is a possibility of overflow in multiplication, if tsc_khz is large enough (> UINT_MAX/1000). Change multiplication to mul_u32_u32(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: eeb2d80d502a ("ACPI / LPIT: Add Low Power Idle Table (LPIT) support") Signed-off-by: Nikita Kiryushin Signed-off-by: Rafael J. Wysocki commit 51516d9842a35809cb8b9238d61b07355a61f0ec Author: Jeff Johnson Date: Mon Nov 6 10:26:06 2023 -0800 wifi: ath12k: Consolidate WMI peer flags Currently wmi.h has two separate set of definitions for peer flags. One set of flags is defined in enum wmi_tlv_peer_flags, and, except for the last three, are named WMI_TLV_PEER_*. The other set of flags are defined as macros, and are named WMI_PEER_*. The last three macros have the same name as the last three wmi_tlv_peer_flags enumerators. The code only uses the WMI_PEER_* names; the WMI_TLV_PEER_* names are unused. So as a first step in consolidation, remove all the WMI_TLV_PEER_* names. But since having an enum to define all the flags is actually a good thing since that provides a handle by which to refer to the entire set of flags, recast the WMI_PEER_* macros into enumerators. Compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231106-ath-peer-flags-v1-4-781e83b7e8e8@quicinc.com commit 7d4a70201204def2d771571518efcbe37ee6b85d Author: Jeff Johnson Date: Mon Nov 6 10:26:05 2023 -0800 wifi: ath11k: Consolidate WMI peer flags Currently wmi.h has two separate set of definitions for peer flags. One set of flags is defined in enum wmi_tlv_peer_flags, and, except for the last three, are named WMI_TLV_PEER_*. The other set of flags are defined as macros, and are named WMI_PEER_*. The last three macros have the same name as the last three wmi_tlv_peer_flags enumerators. The code only uses the WMI_PEER_* names; the WMI_TLV_PEER_* names are unused. So as a first step in consolidation, remove all the WMI_TLV_PEER_* names. But since having an enum to define all the flags is actually a good thing since that provides a handle by which to refer to the entire set of flags, recast the WMI_PEER_* macros into enumerators. Compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231106-ath-peer-flags-v1-3-781e83b7e8e8@quicinc.com commit 69bc79faa616c7e7258a06b1141b7b4cffb7823c Author: Jeff Johnson Date: Mon Nov 6 10:26:04 2023 -0800 wifi: ath12k: Remove obsolete struct wmi_peer_flags_map *peer_flags Currently both struct ath12k_wmi_pdev and struct ath12k_wmi_base define: const struct wmi_peer_flags_map *peer_flags; But that member is not used, and in fact, struct wmi_peer_flags_map is not defined within ath12k; these are obsolete remnants inherited from ath11k. So remove them. Compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231106-ath-peer-flags-v1-2-781e83b7e8e8@quicinc.com commit 53bcb41d9eda23123924d25fc2a024b85b3adc0e Author: Jeff Johnson Date: Mon Nov 6 10:26:03 2023 -0800 wifi: ath11k: Remove obsolete struct wmi_peer_flags_map *peer_flags Currently both struct ath11k_pdev_wmi and struct ath11k_wmi_base define: const struct wmi_peer_flags_map *peer_flags; But that member is not used, and in fact, struct wmi_peer_flags_map is not defined within ath11k; these are obsolete remnants inherited from ath10k. So remove them. Compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231106-ath-peer-flags-v1-1-781e83b7e8e8@quicinc.com commit 3b6ec0409fe8c95e74fa64ee717fb7c7e6e9b32f Author: Jeff Johnson Date: Mon Nov 6 10:21:05 2023 -0800 wifi: ath12k: Remove struct ath12k::ops Currently struct ath12k defines the following member: struct ieee80211_ops *ops; This is being flagged by checkpatch.pl: WARNING: struct ieee80211_ops should normally be const The original plan was to add the const qualifier. However, it turns out this is actually unused, so remove it. No functional changes, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231106-ath12k-remove-ieee80211_ops-v1-2-d72cef1a855b@quicinc.com commit 199a78565cc2bf3fee530cade297e309de5a1f3a Author: Jeff Johnson Date: Mon Nov 6 10:21:04 2023 -0800 wifi: ath11k: Remove struct ath11k::ops Currently struct ath11k defines the following member: struct ieee80211_ops *ops; This is being flagged by checkpatch.pl: WARNING: struct ieee80211_ops should normally be const The original plan was to add the const qualifier. However, it turns out this is actually unused, so remove it. No functional changes, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231106-ath12k-remove-ieee80211_ops-v1-1-d72cef1a855b@quicinc.com commit 2bc76fef1a9a649e11b2dac6205bb8177128fc21 Author: Jeff Johnson Date: Fri Nov 3 15:05:36 2023 -0700 wifi: ath10k: Remove unused struct ath10k_htc_frame struct ath10k_htc_frame is unused, and since it illogically contains two consecutive flexible arrays, it could never be used, so remove it. No functional changes, compile tested only. Signed-off-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231103-ath10k_htc_frame-v1-1-ff00b38a9630@quicinc.com commit 08500f6eaa914019d36861a1e1f868d3ccd73781 Author: Dmitry Antipov Date: Thu Nov 2 14:54:52 2023 +0300 wifi: ath10k: simplify __ath10k_htt_tx_txq_recalc() Since 'ieee80211_txq_get_depth()' allows NULL for 2nd and 3rd arguments, simplify '__ath10k_htt_tx_txq_recalc()' by dropping unused 'frame_cnt'. Compile tested only. Signed-off-by: Dmitry Antipov Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231102115459.69791-1-dmantipov@yandex.ru commit 6175b407756b22e7fdc771181b7d832ebdedef5c Author: Yazen Ghannam Date: Sat Nov 18 13:32:29 2023 -0600 x86/mce/inject: Clear test status value AMD systems generally allow MCA "simulation" where MCA registers can be written with valid data and the full MCA handling flow can be tested by software. However, the platform on Scalable MCA systems, can prevent software from writing data to the MCA registers. There is no architectural way to determine this configuration. Therefore, the MCE injection module will check for this behavior by writing and reading back a test status value. This is done during module init, and the check can run on any CPU with any valid MCA bank. If MCA_STATUS writes are ignored by the platform, then there are no side effects on the hardware state. If the writes are not ignored, then the test status value will remain in the hardware MCA_STATUS register. It is likely that the value will not be overwritten by hardware or software, since the tested CPU and bank are arbitrary. Therefore, the user may see a spurious, synthetic MCA error reported whenever MCA is polled for this CPU. Clear the test value immediately after writing it. It is very unlikely that a valid MCA error is logged by hardware during the test. Errors that cause an #MC won't be affected. Fixes: 891e465a1bd8 ("x86/mce: Check whether writes to MCA_STATUS are getting ignored") Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231118193248.1296798-2-yazen.ghannam@amd.com commit f52ffea0745943bb6af674f30f4243b3721b7cd6 Author: Andy Shevchenko Date: Fri Nov 3 22:18:31 2023 +0200 drm/i915/iosf: Drop unused APIs Drop unused vlv_iosf_sb_read() and vlv_iosf_sb_write(). Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-17-andriy.shevchenko@linux.intel.com commit 08c3d1f91f41d930f7cca3672d9aa1eec68e2c4b Author: Andy Shevchenko Date: Fri Nov 3 22:18:30 2023 +0200 drm/i915/dsi: Combine checks in mipi_exec_gpio() For a couple of cases the branches call the same bxt_gpio_set_value(). As Ville suggested they can be combined by dropping the DISPLAY_VER() check from Gen 11 to Gen 9. Do it that way. Suggested-by: Ville Syrjälä Signed-off-by: Andy Shevchenko Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-16-andriy.shevchenko@linux.intel.com commit a23e60938a7dfdac11bbacf1f5da4a99c46432e1 Author: Andy Shevchenko Date: Fri Nov 3 22:18:29 2023 +0200 drm/i915/dsi: Replace poking of CHV GPIOs behind the driver's back It's a dirty hack in the driver that pokes GPIO registers behind the driver's back. Moreoever it might be problematic as simultaneous I/O may hang the system, see the commit 0bd50d719b00 ("pinctrl: cherryview: prevent concurrent access to GPIO controllers") for the details. Taking all this into consideration replace the hack with proper GPIO APIs being used. Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-15-andriy.shevchenko@linux.intel.com commit bd079b19b417d835a671649a27271918700f2fd9 Author: Andy Shevchenko Date: Fri Nov 3 22:18:28 2023 +0200 drm/i915/dsi: Prepare soc_gpio_set_value() to distinguish GPIO communities Currently soc_gpio_set_value() supports only a single indexing for GPIO pin. For CHV case, for example, we will need to distinguish community based index from the one that VBT is using. Introduce an additional parameter to soc_gpio_set_value() and its callers. Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-14-andriy.shevchenko@linux.intel.com commit 8241b55f1ded100295ea95d72fd2e95e69776923 Author: Andy Shevchenko Date: Fri Nov 3 22:18:27 2023 +0200 drm/i915/dsi: Replace poking of VLV GPIOs behind the driver's back It's a dirty hack in the driver that pokes GPIO registers behind the driver's back. Moreoever it might be problematic as simultaneous I/O may hang the system, see the commit 40ecab551232 ("pinctrl: baytrail: Really serialize all register accesses") for the details. Taking all this into consideration replace the hack with proper GPIO APIs being used. Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-13-andriy.shevchenko@linux.intel.com commit 47ab0203946a57e3451b4b3e2b23634b27e32440 Author: Andy Shevchenko Date: Fri Nov 3 22:18:26 2023 +0200 drm/i915/dsi: Extract common soc_gpio_set_value() helper Extract a common soc_gpio_set_value() helper that may be used by a few SoCs. Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-12-andriy.shevchenko@linux.intel.com commit 61442d610f771ec4c45c3882c006644bee2cf38c Author: Hans de Goede Date: Fri Nov 3 22:18:25 2023 +0200 drm/i915/dsi: Fix wrong initial value for GPIOs in bxt_gpio_set_value() Fix wrong initial value for GPIOs in bxt_gpio_set_value(). Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-11-andriy.shevchenko@linux.intel.com commit e2a97a08ce179ee2ac33a0e24b890fb0638ac3f5 Author: Hans de Goede Date: Fri Nov 3 22:18:24 2023 +0200 drm/i915/dsi: Remove GPIO lookup table at the end of intel_dsi_vbt_gpio_init() To properly deal with GPIOs used in MIPI panel sequences a temporary GPIO lookup will be used. Since there can only be 1 GPIO lookup table for the "0000:00:02.0" device this will not work if the GPIO lookup table used by intel_dsi_vbt_gpio_init() is still registered. After getting the "backlight" and "panel" GPIOs the lookup table registered by intel_dsi_vbt_gpio_init() is no longer necessary, remove it so that another temporary lookup-table for the "0000:00:02.0" device can be added. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-10-andriy.shevchenko@linux.intel.com commit 246bcae104475136cd3eb87793726b5cc4320ad1 Author: Andy Shevchenko Date: Fri Nov 3 22:18:23 2023 +0200 drm/i915/dsi: Replace check with a (missing) MIPI sequence name Names of the MIPI sequence steps are sequential and defined, no need to check for the gaps. However in seq_name the MIPI_SEQ_END is missing. Add it there, and drop unneeded NULL check in sequence_name(). Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-9-andriy.shevchenko@linux.intel.com commit a1f763fe869c6875a6649bb0c145e589e08087a0 Author: Andy Shevchenko Date: Fri Nov 3 22:18:22 2023 +0200 drm/i915/dsi: Get rid of redundant 'else' In the snippets like the following if (...) return / goto / break / continue ...; else ... the 'else' is redundant. Get rid of it. Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-8-andriy.shevchenko@linux.intel.com commit 1c8953b27d11269c9a9fa2d1bbd62bf3415749c0 Author: Andy Shevchenko Date: Fri Nov 3 22:18:21 2023 +0200 drm/i915/dsi: Replace while(1) with one with clear exit condition Move existing condition to while(), so it will be clear on what circumstances the loop is successfully finishing. Reviewed-by: Andi Shyti Signed-off-by: Andy Shevchenko Acked-by: Jani Nikula Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-7-andriy.shevchenko@linux.intel.com commit acc06840fb9e22e3f7febec1ec1a976a04929cde Author: Jani Nikula Date: Fri Nov 3 22:18:20 2023 +0200 drm/i915/dsi: bxt/icl GPIO set value do not need gpio source Drop the unused parameter. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko Tested-by: Hans de Goede Reviewed-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-6-andriy.shevchenko@linux.intel.com commit ba24d15859e0277f036266bacdde031625c2dd8a Author: Jani Nikula Date: Fri Nov 3 22:18:19 2023 +0200 drm/i915/dsi: rename platform specific *_exec_gpio() to *_gpio_set_value() The lowest level functions are about setting GPIO values, not about executing any sequences anymore. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko Tested-by: Hans de Goede Reviewed-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-5-andriy.shevchenko@linux.intel.com commit 703a7d2b77f74e5f53545a6d0788cd1b9d0167d6 Author: Jani Nikula Date: Fri Nov 3 22:18:18 2023 +0200 drm/i915/dsi: clarify GPIO exec sequence With the various sequence versions and pointer increments interleaved, it's a bit hard to decipher what's going on. Add separate paths for different sequence versions. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko Tested-by: Hans de Goede Reviewed-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-4-andriy.shevchenko@linux.intel.com commit 03930e3d97565b6640a3a552d2b41252aae33f25 Author: Jani Nikula Date: Fri Nov 3 22:18:17 2023 +0200 drm/i915/dsi: switch mipi_exec_gpio() from dev_priv to i915 Follow the contemporary conventions. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko Tested-by: Hans de Goede Reviewed-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-3-andriy.shevchenko@linux.intel.com commit 211ed0b3ac9a29aa228d3cbb5f2a4d6c7ddadcaf Author: Jani Nikula Date: Fri Nov 3 22:18:16 2023 +0200 drm/i915/dsi: assume BXT gpio works for non-native GPIO Purely a guess. Drop the nop function. Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Jani Nikula Signed-off-by: Andy Shevchenko Tested-by: Hans de Goede Reviewed-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20231103201831.1037416-2-andriy.shevchenko@linux.intel.com commit 202595663905384c4c629afd7b897af63a1563b5 Merge: 49277a5b76373 4a6c5607d4502 Author: Tejun Heo Date: Wed Nov 22 06:18:49 2023 -1000 Merge branch 'for-6.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq into for-6.8 cgroup/for-6.8 is carrying two workqueue changes to allow cpuset to restrict the CPUs used by unbound workqueues. Unfortunately, this conflicts with a new bug fix in wq/for-6.7-fixes. The conflict is contextual but can be a bit confusing to resolve. Pull the fix branch to resolve the conflict. Signed-off-by: Tejun Heo commit 80b4ff1d2c9bc7e20b82d18535a27fa32dffa1dd Author: Paul Moore Date: Wed Nov 22 11:02:44 2023 -0500 selftests: remove the LSM_ID_IMA check in lsm/lsm_list_modules_test The IMA LSM ID token was removed as IMA isn't yet a proper LSM, but we forgot to remove the check from the selftest. Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202311221047.a9Dww3vY-lkp@intel.com/ Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 52471877a2e7211603f57c74102e8ba2aa06fe48 Author: Ping-Ke Shih Date: Fri Nov 17 10:40:29 2023 +0800 wifi: rtw89: 8922a: read efuse content from physical map The calibration values of thermal and bias are programmed in invariable physical map. Read them into driver and will set them to registers later. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117024029.113845-7-pkshih@realtek.com commit c7ccb2402ebb567016b09bf50e225066c72a9c09 Author: Ping-Ke Shih Date: Fri Nov 17 10:40:28 2023 +0800 wifi: rtw89: 8922a: read efuse content via efuse map struct from logic map Define efuse map struct of RTW89_EFUSE_BLOCK_RF block, and read needed data from efuse logic map into driver. Also, with efuse power-on state, read MAC address via register interface according to HCI interface. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117024029.113845-6-pkshih@realtek.com commit e102ff4b3579016361f092027782f1a3a7fa2055 Author: Ping-Ke Shih Date: Fri Nov 17 10:40:27 2023 +0800 wifi: rtw89: 8852c: read RX gain offset from efuse for 6GHz channels Read calibration values of RX gain offset from efuse, and set them to registers to normalize RX gain for all hardware modules. Then, PHY dynamic mechanism can get expected values to adjust hardware parameters to yield expected performance. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117024029.113845-5-pkshih@realtek.com commit f28eab6ae4ff016d01226364c9099d4eacffbb1a Author: Ping-Ke Shih Date: Fri Nov 17 10:40:26 2023 +0800 wifi: rtw89: mac: add to access efuse for WiFi 7 chips MAC address, hardware type, calibration values and etc are stored in efuse, so we read them at probe stage and use them as capabilities to register hardware. There are two physical efuse -- one is the main efuse for digital hardware part, and the other is for analog part. Because they are very similar, we only describe the main efuse below. The main efuse is split into two regions -- one is for logic map, and the other is for physical map. For both regions, we use the same method to read data, but need additional parser to get logic map. To allow reading operation, we need to convert power state to active, and turn to idle state after reading. For WiFi 7 chips, we introduce efuse blocks to define feature group easier, and these blocks are discontinue. For example, RF block is from 0x1_0000 ~ 0x1_0240, and the next block PCIE_SDIO is starting from 0x2_0000. Comparing to old one used by WiFi 6 chips, there is only single one logic map, it would be a little hard to add an new field to a group if we don't reserve a room in advance. The relationship between efuse, region and block is shown as below: (logical map) +------------+ +---------------+ +-----------------+ | main efuse | | region 1 | | block 0x1_0000~ | | (digital) | |(to logcal map)| +-----------------+ | | | | => +-----------------+ | | => | | | block 0x2_0000~ | | | | | +-----------------+ | | |---------------| : | | | region 2 | +------------+ +---------------+ +------------+ +-----------------+ | 2nd efuse | ======================> | block 0x7_0000~ | | (analog) | +-----------------+ +------------+ The parser converting from raw data to logic map is to decode block page, block page offset, and word_en bits. Each word_en bit indicates two following bytes as data of logic map, so total four word_en bits can represent eight bytes. Thus, block page offset is 8-byte alignment. The layout of a tuple is shown as below +--------+--------+--------+--------+--------+--------+ | fixed 3 byte header | | | | | | | | | | [19:17] block_page | | | ... | | [16:4] block_page_offset| | | | | [3:0] word_en | ^ | ^ | | +----|---+--------+--------+---|----+----|---+--------+ | | | +-------------------------+---------+ a word_en bit indicates two bytes as data For example, block_page = 0x3 block_page_offset = 0x80 (must 8-byte alignment) word_en = 0x6 (b'0110; 0 means data is presented) following 4 bytes = 34 56 78 90 Then, 0x3_0080 = 34 56 0x3_0086 = 78 90 A special block page is RTW89_EFUSE_BLOCK_ADIE (7) that uses different but similar format, because its real efuse size is smaller than main efuse. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117024029.113845-4-pkshih@realtek.com commit 88e6a923bbfbdd4fd2e92ff50902251884927dac Author: Ping-Ke Shih Date: Fri Nov 17 10:40:25 2023 +0800 wifi: rtw89: mac: use mac_gen pointer to access about efuse Use function pointers to abstract efuse access, and introduce an new function to convert efuse power state that is needed by WiFi 7 chips. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117024029.113845-3-pkshih@realtek.com commit c0a04552e36e1bac2bdf862342ddfbbfd65aae52 Author: Ping-Ke Shih Date: Fri Nov 17 10:40:24 2023 +0800 wifi: rtw89: 8922a: add 8922A basic chip info 8922A is a 802.11be chip that can support 2/5/6 GHz bands 160MHz bandwidth. Introduce the basic info such as firmware file name, some hardware address and size, supported spatial stream, TX descriptor and so on, and then we can add more attributes by later patches. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231117024029.113845-2-pkshih@realtek.com commit f60df12aaaddc865a38480a48e8dba756dffb2b2 Author: Bjorn Helgaas Date: Thu Nov 16 12:05:29 2023 -0600 wifi: rtlwifi: drop unused const_amdpci_aspm Remove the unused "const_amdpci_aspm" member of struct rtl_pci and struct rtl_ps_ctl. Signed-off-by: Bjorn Helgaas Acked-by: Ping-Ke Shih Reviewed-by: Ilpo Järvinen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231116180529.52752-1-helgaas@kernel.org commit a85198c9f068baeef6d4a56c389b11a2035a8ea3 Author: Su Hui Date: Wed Nov 15 17:23:29 2023 +0800 wifi: mwifiex: mwifiex_process_sleep_confirm_resp(): remove unused priv variable Clang static analyzer complains that value stored to 'priv' is never read. 'priv' is useless, so remove it to save space. Signed-off-by: Su Hui Acked-by: Brian Norris Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231115092328.1048103-1-suhui@nfschina.com commit c212abfbd19fe5ca43fa80981d86e9d7a49f5d45 Author: Zong-Zhe Yang Date: Tue Nov 14 17:13:59 2023 +0800 wifi: rtw89: regd: update regulatory map to R65-R44 Sync Realtek Regulatory R44 and Realtek Channel Plan R65. Configure 6 GHz field of Realtek regd on SG, TW, GD. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231114091359.50664-4-pkshih@realtek.com commit b2774a916ab95f678c2a365b276870bb68bf3b01 Author: Zong-Zhe Yang Date: Tue Nov 14 17:13:58 2023 +0800 wifi: rtw89: regd: handle policy of 6 GHz according to BIOS According to BIOS configuration of Realtek ACPI DSM function 4, RTW89_ACPI_DSM_FUNC_6G_BP, we handle the regd policy of 6 GHz. Policy defines two modes as below. 1. `BLOCK` mode: The countries in configured list are blocked. 2. `ALLOW` mode: _Only_ the countries in configured list are allowed. (i.e. others are all blocked.) Then, when receiving regulatory notification at runtime, if 6 GHz is blocked on the country, 6 GHz channels will be disabled. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231114091359.50664-3-pkshih@realtek.com commit 665ecff7dd1481c97d36d7761c0eab3b1dde3d22 Author: Zong-Zhe Yang Date: Tue Nov 14 17:13:57 2023 +0800 wifi: rtw89: acpi: process 6 GHz band policy from DSM Realtek ACPI DSM func 4, RTW89_ACPI_DSM_FUNC_6G_BP, accepts a configuration via ACPI buffer as below. | index | description | ------------------------- | [0-2] | signature | | [3] | reserved | | [4] | policy mode | | [5] | country count | | [6-] | country list | Through this function, BIOS can indicate to allow/block 6 GHz on some specific countries. Still, driver should follow regd first before taking this configuration into account. Besides, add a bit in debug mask for ACPI. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231114091359.50664-2-pkshih@realtek.com commit df25461119d987b8c81d232cfe4411e91dcabe66 Author: Daniel Stodden Date: Tue Nov 21 20:23:16 2023 -0800 PCI: switchtec: Fix stdev_release() crash after surprise hot remove A PCI device hot removal may occur while stdev->cdev is held open. The call to stdev_release() then happens during close or exit, at a point way past switchtec_pci_remove(). Otherwise the last ref would vanish with the trailing put_device(), just before return. At that later point in time, the devm cleanup has already removed the stdev->mmio_mrpc mapping. Also, the stdev->pdev reference was not a counted one. Therefore, in DMA mode, the iowrite32() in stdev_release() will cause a fatal page fault, and the subsequent dma_free_coherent(), if reached, would pass a stale &stdev->pdev->dev pointer. Fix by moving MRPC DMA shutdown into switchtec_pci_remove(), after stdev_kill(). Counting the stdev->pdev ref is now optional, but may prevent future accidents. Reproducible via the script at https://lore.kernel.org/r/20231113212150.96410-1-dns@arista.com Link: https://lore.kernel.org/r/20231122042316.91208-2-dns@arista.com Signed-off-by: Daniel Stodden Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe Reviewed-by: Dmitry Safonov commit 4c2ba6a0ed1944c17b957157bd1e686be4ea968a Author: Rafael J. Wysocki Date: Thu Sep 21 14:58:02 2023 +0200 ACPI: processor: Provide empty stub of acpi_proc_quirk_mwait_check() Commit 0a0e2ea642f6 ("ACPI: processor: Move MWAIT quirk out of acpi_processor.c") added acpi_proc_quirk_mwait_check() that is only defined for x86 and is unlikely to be defined for any other architectures, so put it under #ifdef CONFIG_X86 and provide an empty stub implementation of it for the other cases. This is kind of orthogonal to [1], because if any architectures other than x86 decide to use the processor _OSC, they will see the reported build error. Link: https://lore.kernel.org/lkml/c7a05a44-c0be-46c2-a21d-b242524d482b@roeck-us.net Link: https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?h=remove-ia64&id=a0334bf78b95532cec54f56b53e8ae1bfe7e1ca1 # [1] Signed-off-by: Rafael J. Wysocki commit 2c4e9acbe3a50ab4a1a2fb5eb8258befda1764cb Author: Dmitry Antipov Date: Mon Nov 13 17:47:30 2023 +0300 wifi: rtlwifi: simplify rtl_action_proc() and rtl_tx_agg_start() Since 'drv_priv' is an in-place member allocated at the end of 'struct ieee80211_sta', it can't be NULL and so relevant checks in 'rtl_action_proc()' and 'rtl_tx_agg_start()' may be dropped. Compile tested only. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231113144734.197359-2-dmantipov@yandex.ru commit 8a399e2f60037ed07a55278e39b20e43dea4f0c2 Author: Chengming Zhou Date: Thu Nov 2 03:23:24 2023 +0000 slub: Keep track of whether slub is on the per-node partial list Now we rely on the "frozen" bit to see if we should manipulate the slab->slab_list, which will be changed in the following patch. Instead we introduce another way to keep track of whether slub is on the per-node partial list, here we reuse the PG_workingset bit. We have to use the atomic set_bit() and clear_bit() variants and change slab_unlock() to bit_spin_unlock() because when cmpxchg is not available and PG_lock is used, there may be concurrent operations on the two bits. Thanks to Mark Brown for reporting a hang and testing of a previous version where the non-atomic operations were used. Suggested-by: Matthew Wilcox Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit b1cea462a79316bd619173f1ded8b28202b5ce3a Author: Michael Ellerman Date: Wed Nov 22 17:27:11 2023 +1100 ASoC: fsl: mpc8610_hpcd: Remove unused driver The mpc8610_hpcd.c driver depends on CONFIG_MPC8610_HPCD which was removed in commit 248667f8bbde ("powerpc: drop HPCD/MPC8610 evaluation platform support"). That makes the driver unbuildable and unusable, so remove it. Depends-on: 248667f8bbde ("powerpc: drop HPCD/MPC8610 evaluation platform support") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20231122062712.2250426-1-mpe@ellerman.id.au Signed-off-by: Mark Brown commit e58e519b80ba79cd73abb1d631d429b7322ac9cb Author: Raag Jadav Date: Wed Nov 22 16:24:01 2023 +0530 pinctrl: intel: use the correct _PM_OPS() export macro Since we don't have runtime PM handles here, we should be using EXPORT_NS_GPL_DEV_SLEEP_PM_OPS() macro, so that the compiler can discard it in case CONFIG_PM_SLEEP=n. Fixes: b10a74b5c0c1 ("pinctrl: intel: Provide Intel pin control wide PM ops structure") Signed-off-by: Raag Jadav Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit b73326b60fddf2ea134c2d9d621f441fa2cee532 Author: Uwe Kleine-König Date: Tue Oct 31 23:29:01 2023 +0100 interconnect: exynos: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231031222851.3126434-20-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit c9ead908d72f32e026253fae648d0d94a713047d Author: Uwe Kleine-König Date: Tue Oct 31 23:29:00 2023 +0100 interconnect: qcom/smd-rpm: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231031222851.3126434-19-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit 237e1edaec6b4ba9c63f23aa2d7b6a4fa146cd0a Author: Uwe Kleine-König Date: Tue Oct 31 23:28:59 2023 +0100 interconnect: qcom/osm-l3: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231031222851.3126434-18-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit 9d960441db354033c944345efaf33765e3122c31 Author: Uwe Kleine-König Date: Tue Oct 31 23:28:58 2023 +0100 interconnect: qcom/msm8974: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231031222851.3126434-17-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit 653959e373610817475519f6b519a80547f6381e Author: Uwe Kleine-König Date: Tue Oct 31 23:28:57 2023 +0100 interconnect: imx8mq: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231031222851.3126434-16-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit 12384b76f0c247c6916060b31ec462802e99e9cb Author: Uwe Kleine-König Date: Tue Oct 31 23:28:56 2023 +0100 interconnect: imx8mp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231031222851.3126434-15-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit 1841d085e3939625f62c7212540cad99ef38e7d4 Author: Uwe Kleine-König Date: Tue Oct 31 23:28:55 2023 +0100 interconnect: imx8mn: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231031222851.3126434-14-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit 57f6b2caf1c610565067dc47d8519b68bd1f2ce6 Author: Uwe Kleine-König Date: Tue Oct 31 23:28:54 2023 +0100 interconnect: imx8mm: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231031222851.3126434-13-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit 772f88907d92484232f60c51c5c5e792a86d37ac Author: Uwe Kleine-König Date: Tue Oct 31 23:28:53 2023 +0100 interconnect: qcom: Make qnoc_remove return void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Several interconnect/qcom drivers use qnoc_remove() as remove callback. Make this function return void (instead of unconditionally zero) and adapt the drivers using this function accordingly. Signed-off-by: Uwe Kleine-König Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231031222851.3126434-12-u.kleine-koenig@pengutronix.de Signed-off-by: Georgi Djakov commit a2ee7581afd59015b8f9ae01fad131aed9f26f01 Author: Jeff Brasen Date: Fri Nov 10 00:03:21 2023 +0530 ACPI: thermal: Add Thermal fast Sampling Period (_TFP) support Add support of "Thermal fast Sampling Period (_TFP)" for passive cooling. As per the ACPI specification (ACPI 6.5, Section 11.4.17 "_TFP (Thermal fast Sampling Period)", _TFP overrides _TSP ("Thermal Sampling Period" if both are present in a Thermal zone. Signed-off-by: Jeff Brasen Co-developed-by: Sumit Gupta Signed-off-by: Sumit Gupta [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit a89299c40911ee29c6ec4fb66f9c598cd947265b Author: Arnd Bergmann Date: Wed Nov 8 13:58:25 2023 +0100 time: Make sysfs_get_uname() function visible in header This function is defined globally in clocksource.c and used conditionally in clockevent.c, which the declaration hidden when clockevent support is disabled. This causes a harmless warning in the definition: kernel/time/clocksource.c:1324:9: warning: no previous prototype for 'sysfs_get_uname' [-Wmissing-prototypes] 1324 | ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt) Move the declaration out of the #ifdef so it is always visible. Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231108125843.3806765-5-arnd@kernel.org commit 65f8780e2d70257200547b5a7654974aa7c37ce1 Author: Alexander Gordeev Date: Sun Jul 16 10:56:00 2023 +0200 s390/boot: always align vmalloc area on segment boundary The size of vmalloc area depends from various factors on boot and could be set to: 1. Default size as determined by VMALLOC_DEFAULT_SIZE macro; 2. One half of the virtual address space not occupied by modules and fixed mappings; 3. The size provided by user with vmalloc= kernel command line parameter; In cases [1] and [2] the vmalloc area base address is aligned on Region3 table type boundary, while in case [3] in might get aligned on page boundary. Limit the waste of page tables and always align vmalloc area size and base address on segment boundary. Acked-by: Heiko Carstens Signed-off-by: Alexander Gordeev commit d12292fdea21f9f4ae5865fd41b730c5e32d45a9 Author: Vasily Gorbik Date: Wed Jan 19 23:44:32 2022 +0100 s390/sysinfo: add variable capacity information If available, add machine variable capacity information to /proc/sysinfo Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Alexander Gordeev commit 5389b5d74efb6da22b01cdd91105bffc5f71dbdc Author: Neil Armstrong Date: Mon Oct 30 10:41:59 2023 +0100 dt-bindings: usb: qcom,dwc3: document the SM8560 SuperSpeed DWC3 USB controller Document the SuperSpeed DWC3 USB controller on the SM8650 Platform. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-bindings-dwc3-v2-1-60c0824fb835@linaro.org Signed-off-by: Greg Kroah-Hartman commit 68a1317412e19cdbc0cbbb9474013adfa1aa986f Author: Andrey Konovalov Date: Mon Oct 30 23:31:58 2023 +0100 usb: raw-gadget: update documentation A recent patch added reporting of more event types to Raw Gadget. Update the documentation to reflect that this feature has been implemented. Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/20231030223158.36636-1-andrey.konovalov@linux.dev Signed-off-by: Greg Kroah-Hartman commit 7836be3b100cfc6db3db7ddeb985254bfe1775e4 Author: Frank Li Date: Fri Oct 27 14:39:19 2023 -0400 usb: cdns3: skip set TRB_IOC when usb_request: no_interrupt is true No completion irq is needed if no_interrupt is true. Needn't set TRB_IOC at this case. Check usb_request: no_interrupt and set/skip TRB_IOC in cdns3_ep_run_transfer(). Signed-off-by: Frank Li Acked-by: Peter Chen Link: https://lore.kernel.org/r/20231027183919.664271-1-Frank.Li@nxp.com Signed-off-by: Greg Kroah-Hartman commit a776452debdcad6d6e6f8f89fb26496038c86074 Author: Piyush Mehta Date: Thu Nov 2 12:36:03 2023 +0530 usb: chipidea: udc: Add revision check of 2.20[CI_REVISION_22] Issue: Adding a dTD to a Primed Endpoint May Not Get Recognized with revision 2.20a. There is an issue with the add dTD tripwire semaphore (ATDTW bit in USBCMD register) that can cause the controller to ignore a dTD that is added to a primed endpoint. When this happens, the software can read the tripwire bit and the status bit at '1' even though the endpoint is unprimed. This issue observed with the Windows host machine. Workaround: The software must implement a periodic cycle, and check for each dTD pending on execution (Active = 1), if the endpoint is primed. It can do this by reading the corresponding bits in the ENDPTPRIME and ENDPTSTAT registers. If these bits are read at 0, the software needs to re-prime the endpoint by writing 1 to the corresponding bit in the ENDPTPRIME register. Added conditional revision check of 2.20[CI_REVISION_22] along with 2.40. Signed-off-by: Piyush Mehta Acked-by: Peter Chen Link: https://lore.kernel.org/r/20231102070603.777313-1-piyush.mehta@amd.com Signed-off-by: Greg Kroah-Hartman commit 6437760accfbaf1160342adeaea1a73dcd278799 Author: Chen Ni Date: Thu Nov 2 07:51:13 2023 +0000 usb: misc: eud: Add IRQ check for platform_get_irq() The function eud_probe() should check the return value of platform_get_irq() for errors so as to not pass a negative value to the devm_request_threaded_irq(). Signed-off-by: Chen Ni Reviewed-by: Caleb Connolly Link: https://lore.kernel.org/r/20231102075113.1043358-1-nichen@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit d990e227741692079872a8336d961ef4ab9e8aaf Author: Lad Prabhakar Date: Wed Nov 15 21:14:07 2023 +0000 dt-bindings: usb: renesas,usbhs: Document RZ/Five SoC The USBHS IP block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,usbhs-r9a07g043" compatible string will be used on the RZ/Five SoC so to make this clear and to keep this file consistent, update the comment to include RZ/Five SoC. No driver changes are required as generic compatible string "renesas,rza2-usbhs" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Acked-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20231115211407.32067-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman commit 2d1803ada2e021b9333b8a784c55fe828ab2b985 Author: Kees Cook Date: Thu Nov 16 11:14:52 2023 -0800 usb: gadget: f_midi: Replace strlcpy() with strscpy() strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). In the unlikely (impossible?) case where opts->id was larger than PAGE_SIZE, this will now correctly report truncation errors. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Cc: Greg Kroah-Hartman Cc: Will McVicker Cc: "Gustavo A. R. Silva" Cc: Peter Chen Cc: Davidlohr Bueso Cc: Zhang Qilong Cc: Linyu Yuan Cc: John Keeping Cc: Azeem Shaikh Cc: linux-usb@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20231116191452.work.902-kees@kernel.org Signed-off-by: Greg Kroah-Hartman commit 725d1f1e338bfa0c133e38989d795484534fb9ac Author: Uwe Kleine-König Date: Mon Nov 20 22:58:36 2023 +0100 usb: gadget: pxa25x_udc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231120215830.71071-6-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 5d888fee4adefbc24bad8eb1091238090ac35e26 Author: Uwe Kleine-König Date: Mon Nov 20 22:58:35 2023 +0100 usb: gadget: lpc32xx_udc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231120215830.71071-5-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit c45b52f71c4b3b826c18d7a5c7a40c139e8312fb Author: Uwe Kleine-König Date: Mon Nov 20 22:58:34 2023 +0100 usb: gadget: gr_udc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231120215830.71071-4-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 103081ef40b6738d3052a41f419705517a0f9436 Author: Uwe Kleine-König Date: Mon Nov 20 22:58:33 2023 +0100 usb: gadget: fsl_udc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231120215830.71071-3-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit cbd1b152519a581bfe14fb6b14ea6e57cca426c1 Author: Uwe Kleine-König Date: Mon Nov 20 22:58:32 2023 +0100 usb: gadget: at91_udc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). In the error path emit an error message replacing the (less useful) message by the core. Apart from the improved error message there is no change in behaviour. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231120215830.71071-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit b9a24821c7f7f8f8fbc9fc8539de96b60422d817 Author: Uwe Kleine-König Date: Fri Nov 3 18:14:29 2023 +0100 USB: usbip: vudc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231103171428.3636570-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit f9cdf40ed66b7abc4fc03c5b47725583e5dc1072 Author: Colin Ian King Date: Sat Nov 11 20:26:56 2023 +0000 USB: misc: iowarrior: remove redundant assignment to variable io_res The variable io_res is being assigned a value that is never read, it is either being re-assigned a new value that is read later or it's not used depending on the cases in the following switch statement. The assignment is redundant and can be removed. Cleans up clang scan build warning: drivers/usb/misc/iowarrior.c:504:2: warning: Value stored to 'io_res' is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20231111202656.339103-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0d5701dc9cd653ae757cc06e39b3a39272863395 Author: Emil Renner Berthing Date: Tue Oct 31 15:14:44 2023 +0100 soc: sifive: ccache: Add StarFive JH7100 support This adds support for the StarFive JH7100 SoC which also features this SiFive cache controller. The JH7100 has non-coherent DMAs but predate the standard RISC-V Zicbom exension, so instead we need to use this cache controller for non-standard cache management operations. Unfortunately the interrupt for uncorrected data is broken on the JH7100 and fires continuously, so add a quirk to not register a handler for it. Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 3d70b9853b44d3f034acaf5e3be7d5228daddef4 Author: Emil Renner Berthing Date: Tue Oct 31 15:14:43 2023 +0100 dt-bindings: cache: sifive,ccache0: Add StarFive JH7100 compatible This cache controller is also used on the StarFive JH7100 SoC. Unfortunately it needs a quirk to work properly, so add dedicated compatible string to be able to match it. Signed-off-by: Emil Renner Berthing Signed-off-by: Conor Dooley commit 971f128bb2d9314203d365b7f163a5c35167bb6b Author: Conor Dooley Date: Thu Oct 12 10:22:09 2023 +0100 soc: sifive: shunt ccache driver to drivers/cache Move the ccache driver over to drivers/cache, out of the drivers/soc dumping ground, to this new collection point for cache controller drivers. Reviewed-by: Samuel Holland Tested-by: Samuel Holland Signed-off-by: Conor Dooley commit 640233258e5b61fed10b382af691b6a852f00392 Author: Supriti Singh Date: Mon Nov 20 16:41:46 2023 +0100 RDMA/rtrs: Use %pe to print errors While printing error, replace %ld by %pe. %pe prints a string whereas %ld would print an error code. Signed-off-by: Supriti Singh Signed-off-by: Jack Wang Signed-off-by: Grzegorz Prajsner Signed-off-by: Md Haris Iqbal Link: https://lore.kernel.org/r/20231120154146.920486-10-haris.iqbal@ionos.com Signed-off-by: Leon Romanovsky commit e76f514dc9fdacf8522e6efcabf883514e5299e5 Author: Supriti Singh Date: Mon Nov 20 16:41:45 2023 +0100 RDMA/rtrs-clt: Use %pe to print errors While printing error, replace %ld by %pe. %pe prints a string whereas %ld would print an error code. Signed-off-by: Supriti Singh Signed-off-by: Jack Wang Signed-off-by: Grzegorz Prajsner Signed-off-by: Md Haris Iqbal Link: https://lore.kernel.org/r/20231120154146.920486-9-haris.iqbal@ionos.com Signed-off-by: Leon Romanovsky commit 9996cd782a602f2542e110e2a4035dd6627bd520 Author: Chancel Liu Date: Wed Nov 22 18:19:59 2023 +0800 ASoC: dt-bindings: fsl,mqs: Convert format to json-schema Convert NXP medium quality sound (MQS) device tree binding documentation to json-schema. Signed-off-by: Chancel Liu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231122101959.30264-4-chancel.liu@nxp.com Signed-off-by: Mark Brown commit 750011e239a50873251c16207b0fe78eabf8577e Author: Gan, Yi Fang Date: Tue Nov 21 13:38:42 2023 +0800 net: stmmac: Add support for HW-accelerated VLAN stripping Current implementation supports driver level VLAN tag stripping only. The features is always on if CONFIG_VLAN_8021Q is enabled in kernel config and is not user configurable. This patch add support to MAC level VLAN tag stripping and can be configured through ethtool. If the rx-vlan-offload is off, the VLAN tag will be stripped by driver. If the rx-vlan-offload is on, the VLAN tag will be stripped by MAC. Command: ethtool -K rx-vlan-offload off | on Signed-off-by: Lai Peter Jun Ann Signed-off-by: Gan, Yi Fang Signed-off-by: David S. Miller commit 36b20fcdd9663ced36d3aef96f0eff8eb79de4b8 Author: Murali Karicheri Date: Tue Nov 21 11:07:53 2023 +0530 net: hsr: Add support for MC filtering at the slave device When MC (multicast) list is updated by the networking layer due to a user command and as well as when allmulti flag is set, it needs to be passed to the enslaved Ethernet devices. This patch allows this to happen by implementing ndo_change_rx_flags() and ndo_set_rx_mode() API calls that in turns pass it to the slave devices using existing API calls. Signed-off-by: Murali Karicheri Signed-off-by: Ravi Gunasekaran Reviewed-by: Wojciech Drewek Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 3c9202e88ffad78f57a418bace2d25f7824a7e4b Author: Sakari Ailus Date: Mon Oct 16 10:38:43 2023 +0300 media: ivsc: csi: Check number of lanes on source, too The IVSC has two CSI-2 ports, one receiver and one transmitter, for passing through the CSI-2 image data. Both have the same number of lanes and this information should be also present in firmware. Check this. Signed-off-by: Sakari Ailus Tested-by: Wentong Wu Signed-off-by: Hans Verkuil commit 096bc4f14956c9e963419b292fc28f0dd4e52908 Author: Sakari Ailus Date: Mon Oct 16 10:32:27 2023 +0300 media: ivsc: csi: Don't mask v4l2_fwnode_endpoint_parse return value v4l2_fwnode_endpoint_parse already returns an error value, don't set return value to -EINVAL. Signed-off-by: Sakari Ailus Tested-by: Wentong Wu Signed-off-by: Hans Verkuil commit 623017a4bb042777edf65bb8ea233ce5f06e0760 Author: Sakari Ailus Date: Mon Oct 16 10:30:53 2023 +0300 media: ivsc: csi: Clean up parsing firmware and setting up async notifier Set up async notifier right after obtaining the local endpoint. This makes error handling straightforward. Signed-off-by: Sakari Ailus Tested-by: Wentong Wu Signed-off-by: Hans Verkuil commit a6a42fada1e5ee0bcc1ce534ea196625d271dfd8 Author: Sakari Ailus Date: Mon Oct 16 10:27:34 2023 +0300 media: ivsc: csi: Clean up notifier set-up Use v4l2_async_nf_add_fwnode_remote() to add an async fwnode remote sub-device sub-device to the notifier. This avoids dealing with remote endpoints. Signed-off-by: Sakari Ailus Tested-by: Wentong Wu Signed-off-by: Hans Verkuil commit e34660972b88e8d27f17e220fe13609b5cd52ec2 Author: Sakari Ailus Date: Mon Oct 16 10:23:22 2023 +0300 media: ivsc: csi: Clean up V4L2 async notifier on error Clean up the V4L2 async notifier in error handling path, and add label to unify handling. Signed-off-by: Sakari Ailus Tested-by: Wentong Wu Signed-off-by: Hans Verkuil commit 153cbfc8bdc55642578d0b513c04496ee27b6430 Author: Sakari Ailus Date: Mon Oct 16 10:18:29 2023 +0300 media: ivsc: csi: Don't parse remote endpoints The driver parsed, besides its own endpoint on the sink, the remote upstream endpoint that most likely is a sensor, and took the number of lanes from that. Instead obtain the number of lanes from the local endpoint. Signed-off-by: Sakari Ailus Tested-by: Wentong Wu Signed-off-by: Hans Verkuil commit a274f4d1e5af404fcc7b5554521913590c9d7b08 Author: Sakari Ailus Date: Sat Oct 14 20:56:00 2023 +0300 media: ccs: Ensure control handlers have been set up after probe If the sensor remains powered on after probe when it is needed again and the runtime PM usage_count is incremented, the control handler setup for neither control handler is run. As this is, in most cases, a needless operation in probe, track the status of sensor power handling after probe and set up control handlers even if the device was already active right after probe. Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil commit 9bb6362652f3f4d74a87d572a91ee1b38e673ef6 Author: Andrzej Hajda Date: Wed Oct 25 23:39:07 2023 +0200 debugobjects: Stop accessing objects after releasing hash bucket lock After release of the hashbucket lock the tracking object can be modified or freed by a concurrent thread. Using it in such a case is error prone, even for printing the object state: 1. T1 tries to deactivate destroyed object, debugobjects detects it, hash bucket lock is released. 2. T2 preempts T1 and frees the tracking object. 3. The freed tracking object is allocated and initialized for a different to be tracked kernel object. 4. T1 resumes and reports error for wrong kernel object. Create a local copy of the tracking object before releasing the hash bucket lock and use the local copy for reporting and fixups to prevent this. Signed-off-by: Andrzej Hajda Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231025-debugobjects_fix-v3-1-2bc3bf7084c2@intel.com commit 9c6894320f49c146270623bb37cd700db7cf13df Author: Richard Acayan Date: Tue Nov 21 19:54:59 2023 -0500 fbdev/simplefb: Suppress error on missing power domains When the power domains are missing, the call to of_count_phandle_with_args fails with -ENOENT. The power domains are not required and there are some device trees that do not specify them. Suppress this error to fix devices without power domains attached to simplefb. Fixes: 92a511a568e4 ("fbdev/simplefb: Add support for generic power-domains") Closes: https://lore.kernel.org/linux-fbdev/ZVwFNfkqjrvhFHM0@radian Signed-off-by: Richard Acayan Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20231122005457.330066-3-mailingradian@gmail.com commit 53475287dad9b314ef477fc9a27b48b6999da053 Merge: 340bf2dbb11b4 3cbbf9192abdc Author: Jakub Kicinski Date: Tue Nov 21 17:52:49 2023 -0800 Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2023-11-21 We've added 85 non-merge commits during the last 12 day(s) which contain a total of 63 files changed, 4464 insertions(+), 1484 deletions(-). The main changes are: 1) Huge batch of verifier changes to improve BPF register bounds logic and range support along with a large test suite, and verifier log improvements, all from Andrii Nakryiko. 2) Add a new kfunc which acquires the associated cgroup of a task within a specific cgroup v1 hierarchy where the latter is identified by its id, from Yafang Shao. 3) Extend verifier to allow bpf_refcount_acquire() of a map value field obtained via direct load which is a use-case needed in sched_ext, from Dave Marchevsky. 4) Fix bpf_get_task_stack() helper to add the correct crosstask check for the get_perf_callchain(), from Jordan Rome. 5) Fix BPF task_iter internals where lockless usage of next_thread() was wrong. The rework also simplifies the code, from Oleg Nesterov. 6) Fix uninitialized tail padding via LIBBPF_OPTS_RESET, and another fix for certain BPF UAPI structs to fix verifier failures seen in bpf_dynptr usage, from Yonghong Song. 7) Add BPF selftest fixes for map_percpu_stats flakes due to per-CPU BPF memory allocator not being able to allocate per-CPU pointer successfully, from Hou Tao. 8) Add prep work around dynptr and string handling for kfuncs which is later going to be used by file verification via BPF LSM and fsverity, from Song Liu. 9) Improve BPF selftests to update multiple prog_tests to use ASSERT_* macros, from Yuran Pereira. 10) Optimize LPM trie lookup to check prefixlen before walking the trie, from Florian Lehner. 11) Consolidate virtio/9p configs from BPF selftests in config.vm file given they are needed consistently across archs, from Manu Bretelle. 12) Small BPF verifier refactor to remove register_is_const(), from Shung-Hsi Yu. * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (85 commits) selftests/bpf: Replaces the usage of CHECK calls for ASSERTs in vmlinux selftests/bpf: Replaces the usage of CHECK calls for ASSERTs in bpf_obj_id selftests/bpf: Replaces the usage of CHECK calls for ASSERTs in bind_perm selftests/bpf: Replaces the usage of CHECK calls for ASSERTs in bpf_tcp_ca selftests/bpf: reduce verboseness of reg_bounds selftest logs bpf: bpf_iter_task_next: use next_task(kit->task) rather than next_task(kit->pos) bpf: bpf_iter_task_next: use __next_thread() rather than next_thread() bpf: task_group_seq_get_next: use __next_thread() rather than next_thread() bpf: emit frameno for PTR_TO_STACK regs if it differs from current one bpf: smarter verifier log number printing logic bpf: omit default off=0 and imm=0 in register state log bpf: emit map name in register state if applicable and available bpf: print spilled register state in stack slot bpf: extract register state printing bpf: move verifier state printing code to kernel/bpf/log.c bpf: move verbose_linfo() into kernel/bpf/log.c bpf: rename BPF_F_TEST_SANITY_STRICT to BPF_F_TEST_REG_INVARIANTS bpf: Remove test for MOVSX32 with offset=32 selftests/bpf: add iter test requiring range x range logic veristat: add ability to set BPF_F_TEST_SANITY_STRICT flag with -r flag ... ==================== Link: https://lore.kernel.org/r/20231122000500.28126-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit 340bf2dbb11b4d2d44055fa5851d75fd335e3d45 Merge: 46e208e70a848 1c7fd6ee2fe4e Author: Jakub Kicinski Date: Tue Nov 21 17:32:51 2023 -0800 Merge branch 'bnxt_en-prepare-to-support-new-p7-chips' Michael Chan says: ==================== bnxt_en: Prepare to support new P7 chips This patchset is to prepare the driver to support the new P7 chips by refactoring and modifying the code. The P7 chip is built on the P5 chip and many code paths can be modified to support both chips. The whole patchset to have basic support for P7 chips is about 20 patches so a follow-on patchset will complete the support and add the new PCI IDs. The first 8 patches are changes to the backing store logic to support both chips with mostly common code paths and datastructures. Both chips require host backing store memory but the relevant firmware APIs have been modified to make it easier to support new backing store memory types. The next 4 patches are changes to TX and RX ring indexing logic and NAPI logic. The main changes are to increment the TX and RX producers unbounded and to do any masking only when needed. These changes are needed to support the P7 chips which require additional higher bits in these producer indices. The NAPI logic is also slightly modifed. The last patch is a rename of BNXT_FLAG_CHIP_P5 to BNXT_FLAG_P5_PLUS and other related macro changes to make it clear that the P5_PLUS macro applies to P5 and newer chips. ==================== Link: https://lore.kernel.org/r/20231120234405.194542-1-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 1c7fd6ee2fe4ec6b808d10c8757fb1c76efa4a52 Author: Randy Schacher Date: Mon Nov 20 15:44:05 2023 -0800 bnxt_en: Rename some macros for the P5 chips In preparation to support a new P7 chip which has a lot of similarities with the P5 chip, rename the BNXT_FLAG_CHIP_P5 flag to BNXT_FLAG_CHIP_P5_PLUS. This will make it clear that the flag is for P5 and newer chips. Also, since there are no additional P5 variants in production, rename BNXT_FLAG_CHIP_P5_THOR() to BNXT_FLAG_CHIP_P5() to keep the naming more simple. Reviewed-by: Andy Gospodarek Reviewed-by: Ajit Khaparde Signed-off-by: Randy Schacher Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-14-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit f94471f3ce74a5fbe2dc5d9687748d9127174eca Author: Michael Chan Date: Mon Nov 20 15:44:04 2023 -0800 bnxt_en: Modify the NAPI logic for the new P7 chips Modify the NAPI logic for the new doorbell mechanism on P7 chips. These changes are compatible with the current P5 chips. In the current logic, bnxt_poll_p5() services 1 or more CQs for each MSIX. Each MSIX has an associated NQ and each NQ has 1 or more associated CQs. If any CQ reaches NAPI budget, we'll stay in polling mode and will unconditionally check and service all CQs until we exit polling. We always re-arm all CQs when we exit polling. To be compatible with the new Toggle bit mechanism in P7 chips, we need to modify the logic so that we service and re-arm the CQ only if we receive an NQE notification for work for that CQ. We add a new had_nqe_notify bit to the cp_ring_info structure and it gets set when we see the NQE notification for that CQ anytime during polling. We'll service and re-arm only the CQs with the had_nqe_notify bits set. Reviewed-by: Somnath Kotur Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-13-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit c09d22674b9420abaaaf946bab471c63369c6509 Author: Michael Chan Date: Mon Nov 20 15:44:03 2023 -0800 bnxt_en: Modify RX ring indexing logic. Modify the RX indexing logic for both RX ring and RX aggregation ring just like the TX logic. Change it so that the index increments unbounded and mask it only when needed. Modify the existing RX macros so that the index is not masked. Add new macros RING_RX()/RING_RX_AGG() to mask it only when needed to get the index of rxr->rx_buf_ring[] and rxr->rx_agg_ring[]. Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-12-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 6d1add95536bafe585c500ad8114af7ed4225a0f Author: Michael Chan Date: Mon Nov 20 15:44:02 2023 -0800 bnxt_en: Modify TX ring indexing logic. Change the TX ring logic so that the index increments unbounded and mask it only when needed. Modify the existing macros so that the index is not masked. Add a new macro RING_TX() to mask it only when needed to get the index of txr->tx_buf_ring[]. Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-11-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit b9e0c47ee2ec588fa0d0527e62c0405b15ecdb25 Author: Michael Chan Date: Mon Nov 20 15:44:01 2023 -0800 bnxt_en: Add db_ring_mask and related macro to bnxt_db_info struct. This allows the doorbell related logic to mask the doorbell index to the proper range before writing the doorbell. The current code masks the doorbell index immediately to keep it in the legal ranges for the most part. Subsequent patches will change the logic so that the index increments unbounded and it only gets masked before use. This is preparation work for the new chip that requires an additional Epoch bit in the doorbell that needs to toggle when the index has wrapped around. This patch just adds the basic infrastructure and the logic is largely unchanged. We now replace RING_CMP() with the new DB_RING_IDX() at appropriate places where we mask the completion ring index before writing the doorbell. Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-10-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 236e237f8ffe77c704cee1e63beb9578922bcc5c Author: Michael Chan Date: Mon Nov 20 15:44:00 2023 -0800 bnxt_en: Add support for HWRM_FUNC_BACKING_STORE_CFG_V2 firmware calls Newer chips starting with 57600 will use this new firmware HWRM call to configure backing store memory. Add this new call if it is supported by the firmware. Reviewed-by: Hongguang Gao Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-9-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 6a4d0774f02d61f8c75ffe2e38a8553410fe52e9 Author: Michael Chan Date: Mon Nov 20 15:43:59 2023 -0800 bnxt_en: Add support for new backing store query firmware API Use the new v2 firmware API if supported by the firmware. We now have the infrastructure to support the v2 API. Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-8-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit b098dc5a3357e5791dd397716737cd8bdfd9a8f5 Author: Michael Chan Date: Mon Nov 20 15:43:58 2023 -0800 bnxt_en: Add bnxt_setup_ctxm_pg_tbls() helper function In bnxt_alloc_ctx_mem(), the logic to set up the context memory entries and to allocate the context memory tables is done repetitively. Add a helper function to simplify the code. The setup of the Fast Path TQM entries relies on some information from the Slow Path TQM entries. Copy the SP_TQM entries to the FP_TQM entries to simplify the logic. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-7-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 2ad67aea11f256c7ad7bdc66c0521d7ff71dd8da Author: Michael Chan Date: Mon Nov 20 15:43:57 2023 -0800 bnxt_en: Use the pg_info field in bnxt_ctx_mem_type struct Use the newly added pg_info field in bnxt_ctx_mem_type struct and remove the standalone page info structures in bnxt_ctx_mem_info. This now completes the reorganization of the context memory structures to work better with the new and more flexible firmware interface for newer chips. Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-6-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 035c57615982897da32bdbf311cd025001468f90 Author: Michael Chan Date: Mon Nov 20 15:43:56 2023 -0800 bnxt_en: Add page info to struct bnxt_ctx_mem_type This will further improve the organization of the bnxt_ctx_mem_info structure by moving the standalone page info structures into the bnxt_ctx_mem_type array. Add the allocation and free logic first and the next patch will migrate to use the new infrastructure. Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-5-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 76087d997a849618935c46a23fa16363be89da68 Author: Michael Chan Date: Mon Nov 20 15:43:55 2023 -0800 bnxt_en: Restructure context memory data structures The current code uses a flat bnxt_ctx_mem_info structure to store 8 types of context memory for the NIC. All the context memory types are very similar and have similar parameters. They can all share a common structure to improve the organization. Also, new firmware interface will provide a new API to retrieve each type of context memory by calling the API repeatedly. This patch reorganizes the bnxt_ctx_mem_info structure to fit better with the new firmware interface. It will also work with the legacy firmware interface. The flat fields in bnxt_ctx_mem_info are replaced by the bnxt_ctx_mem_type array. The bnxt_mem_init array info will no longer be needed. Reviewed-by: Somnath Kotur Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-4-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit e50dc4c2206e3eeed10c799db37bb51bc545f28a Author: Michael Chan Date: Mon Nov 20 15:43:54 2023 -0800 bnxt_en: Free bp->ctx inside bnxt_free_ctx_mem() We always free bp->ctx right after calling bnxt_free_ctx_mem(), so just free it at the end of that function to make things simpler. Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-3-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit aa8460bacf49e06d5024bb26c591b5fda91ca6c1 Author: Michael Chan Date: Mon Nov 20 15:43:53 2023 -0800 bnxt_en: The caller of bnxt_alloc_ctx_mem() should always free bp->ctx bnxt_alloc_ctx_mem() calls bnxt_hwrm_func_backing_store_qcaps() to allocate the memory for bp->ctx. Initialize bp->ctx with the allocated memory and let the caller free it during unwind. The unwind logic is already there, we just need to always set bp->ctx to the allocated memory so the caller will always free it. This simplifies the logic and makes it easier to expand on the backing store logic. Reviewed-by: Pavan Chebbi Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan Link: https://lore.kernel.org/r/20231120234405.194542-2-michael.chan@broadcom.com Signed-off-by: Jakub Kicinski commit 46e208e70a848a828b35d1e4052313f3b34516d6 Merge: 3a17ea77da31e 2da0cac1e9494 Author: Jakub Kicinski Date: Tue Nov 21 17:22:37 2023 -0800 Merge branch 'net-page_pool-add-netlink-based-introspection-part1' Jakub Kicinski says: ==================== net: page_pool: plit the page_pool_params into fast and slow Small refactoring in prep for adding more page pool params which won't be needed on the fast path. v1: https://lore.kernel.org/all/20231024160220.3973311-1-kuba@kernel.org/ RFC: https://lore.kernel.org/all/20230816234303.3786178-1-kuba@kernel.org/ ==================== Link: https://lore.kernel.org/r/20231121000048.789613-1-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 2da0cac1e9494f34c5a3438e5c4c7e662e1b7445 Author: Jakub Kicinski Date: Mon Nov 20 16:00:35 2023 -0800 net: page_pool: avoid touching slow on the fastpath To fully benefit from previous commit add one byte of state in the first cache line recording if we need to look at the slow part. The packing isn't all that impressive right now, we create a 7B hole. I'm expecting Olek's rework will reshuffle this, anyway. Acked-by: Jesper Dangaard Brouer Reviewed-by: Ilias Apalodimas Reviewed-by: Mina Almasry Link: https://lore.kernel.org/r/20231121000048.789613-3-kuba@kernel.org Signed-off-by: Jakub Kicinski commit 5027ec19f1049a07df5b0a37b1f462514cf2724b Author: Jakub Kicinski Date: Mon Nov 20 16:00:34 2023 -0800 net: page_pool: split the page_pool_params into fast and slow struct page_pool is rather performance critical and we use 16B of the first cache line to store 2 pointers used only by test code. Future patches will add more informational (non-fast path) attributes. It's convenient for the user of the API to not have to worry which fields are fast and which are slow path. Use struct groups to split the params into the two categories internally. Acked-by: Jesper Dangaard Brouer Reviewed-by: Mina Almasry Reviewed-by: Ilias Apalodimas Link: https://lore.kernel.org/r/20231121000048.789613-2-kuba@kernel.org Signed-off-by: Jakub Kicinski commit ae254858ce0745aba25d107159b580ab5fdada5b Author: Ondrej Mosnacek Date: Tue Nov 14 16:51:16 2023 +0100 selinux: introduce an initial SID for early boot processes Currently, SELinux doesn't allow distinguishing between kernel threads and userspace processes that are started before the policy is first loaded - both get the label corresponding to the kernel SID. The only way a process that persists from early boot can get a meaningful label is by doing a voluntary dyntransition or re-executing itself. Reusing the kernel label for userspace processes is problematic for several reasons: 1. The kernel is considered to be a privileged domain and generally needs to have a wide range of permissions allowed to work correctly, which prevents the policy writer from effectively hardening against early boot processes that might remain running unintentionally after the policy is loaded (they represent a potential extra attack surface that should be mitigated). 2. Despite the kernel being treated as a privileged domain, the policy writer may want to impose certain special limitations on kernel threads that may conflict with the requirements of intentional early boot processes. For example, it is a good hardening practice to limit what executables the kernel can execute as usermode helpers and to confine the resulting usermode helper processes. However, a (legitimate) process surviving from early boot may need to execute a different set of executables. 3. As currently implemented, overlayfs remembers the security context of the process that created an overlayfs mount and uses it to bound subsequent operations on files using this context. If an overlayfs mount is created before the SELinux policy is loaded, these "mounter" checks are made against the kernel context, which may clash with restrictions on the kernel domain (see 2.). To resolve this, introduce a new initial SID (reusing the slot of the former "init" initial SID) that will be assigned to any userspace process started before the policy is first loaded. This is easy to do, as we can simply label any process that goes through the bprm_creds_for_exec LSM hook with the new init-SID instead of propagating the kernel SID from the parent. To provide backwards compatibility for existing policies that are unaware of this new semantic of the "init" initial SID, introduce a new policy capability "userspace_initial_context" and set the "init" SID to the same context as the "kernel" SID unless this capability is set by the policy. Another small backwards compatibility measure is needed in security_sid_to_context_core() for before the initial SELinux policy load - see the code comment for explanation. Signed-off-by: Ondrej Mosnacek Reviewed-by: Stephen Smalley [PM: edited comments based on feedback/discussion] Signed-off-by: Paul Moore commit 1957b92aaff0fa71621e61bbd0257b9c3bb9baf2 Author: Hugo Villeneuve Date: Tue Nov 21 18:09:00 2023 -0500 regmap: fix regmap_noinc_write() description Change "Write data from" -> "Write data to". Signed-off-by: Hugo Villeneuve Link: https://lore.kernel.org/r/20231121230900.3754785-1-hugo@hugovil.com Signed-off-by: Mark Brown commit 3a17ea77da31ef0b5ab04111583bfcd38f56fcba Merge: dd891b5b106fa f7ebb4023765e Author: Jakub Kicinski Date: Tue Nov 21 14:53:11 2023 -0800 Merge branch 'mlxsw-preparations-for-support-of-cff-flood-mode' Petr Machata says: ==================== mlxsw: Preparations for support of CFF flood mode PGT is an in-HW table that maps addresses to sets of ports. Then when some HW process needs a set of ports as an argument, instead of embedding the actual set in the dynamic configuration, what gets configured is the address referencing the set. The HW then works with the appropriate PGT entry. Among other allocations, the PGT currently contains two large blocks for bridge flooding: one for 802.1q and one for 802.1d. Within each of these blocks are three tables, for unknown-unicast, multicast and broadcast flooding: . . . | 802.1q | 802.1d | . . . | UC | MC | BC | UC | MC | BC | \______ _____/ \_____ ______/ v v FID flood vectors Thus each FID (which corresponds to an 802.1d bridge or one VLAN in an 802.1q bridge) uses three flood vectors spread across a fairly large region of PGT. This way of organizing the flood table (called "controlled") is not very flexible. E.g. to decrease a bridge scale and store more IP MC vectors, one would need to completely rewrite the bridge PGT blocks, or resort to hacks such as storing individual MC flood vectors into unused part of the bridge table. In order to address these shortcomings, Spectrum-2 and above support what is called CFF flood mode, for Compressed FID Flooding. In CFF flood mode, each FID has a little table of its own, with three entries adjacent to each other, one for unknown-UC, one for MC, one for BC. This allows for a much more fine-grained approach to PGT management, where bits of it are allocated on demand. . . . | FID | FID | FID | FID | FID | . . . |U|M|B|U|M|B|U|M|B|U|M|B|U|M|B| \_____________ _____________/ v FID flood vectors Besides the FID table organization, the CFF flood mode also impacts Router Subport (RSP) table. This table contains flood vectors for rFIDs, which are FIDs that reference front panel ports or LAGs. The RSP table contains two entries per front panel port and LAG, one for unknown-UC traffic, and one for everything else. Currently, the FW allocates and manages the table in its own part of PGT. rFIDs are marked with flood_rsp bit and managed specially. In CFF mode, rFIDs are managed as all other FIDs. The driver therefore has to allocate and maintain the flood vectors. Like with bridge FIDs, this is more work, but increases flexibility of the system. The FW currently supports both the controlled and CFF flood modes. To shed complexity, in the future it should only support CFF flood mode. Hence this patchset, which is the first in series of two to add CFF flood mode support to mlxsw. There are FW versions out there that do not support CFF flood mode, and on Spectrum-1 in particular, there is no plan to support it at all. mlxsw will therefore have to support both controlled flood mode as well as CFF. Another aspect is that at least on Spectrum-1, there are FW versions out there that claim to support CFF flood mode, but then reject or ignore configurations enabling the same. The driver thus has to have a say in whether an attempt to configure CFF flood mode should even be made. Much like with the LAG mode, the feature is therefore expressed in terms of "does the driver prefer CFF flood mode?", and "what flood mode the PCI module managed to configure the FW with". This gives to the driver a chance to determine whether CFF flood mode configuration should be attempted. In this patchset, we lay the ground with new definitions, registers and their fields, and some minor code shaping. The next patchset will be more focused on introducing necessary abstractions and implementation. - Patches #1 and #2 add CFF-related items to the command interface. - Patch #3 adds a new resource, for maximum number of flood profiles supported. (A flood profile is a mapping between traffic type and offset in the per-FID flood vector table.) - Patches #4 to #8 adjust reg.h. The SFFP register is added, which is used for configuring the abovementioned traffic-type-to-offset mapping. The SFMR, register, which serves for FID configuration, is extended with fields specific to CFF mode. And other minor adjustments. - Patches #9 and #10 add the plumbing for CFF mode: a way to request that CFF flood mode be configured, and a way to query the flood mode that was actually configured. - Patch #11 removes dead code. - Patches #12 and #13 add helpers that the next patchset will make use of. Patch #14 moves RIF setup ahead so that FID code can make use of it. ==================== Link: https://lore.kernel.org/r/cover.1700503643.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit f7ebb4023765e728a984c628fb6b929db2a3f76b Author: Petr Machata Date: Mon Nov 20 19:25:31 2023 +0100 mlxsw: spectrum_router: Call RIF setup before obtaining FID For subport RIFs, the setup initializes, among other things, RIF port and LAG numbers. Those are important to determine where in the PGT the RIF FID will be stored. Therefore, call the RIF setup before fid_get. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/f24d8cad7e4748b8e8e0e16894ca6a20704dea32.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 27851dfaa3d608ae13557a2684a0bd5e2aa5bff1 Author: Petr Machata Date: Mon Nov 20 19:25:30 2023 +0100 mlxsw: spectrum_router: Add a helper to get subport number from a RIF In the CFF flood mode, responsibility for management of the PGT entries for rFIDs is moved from FW to the driver. All rFIDs are based off either a front panel port, or a LAG port. The flood vectors for port-based rFIDs enable just the port itself, the ones for LAG-based rFIDs enable all member ports of the LAG in question. Since all rFIDs based off the same port have the same flood vector, and similarly for LAG-based rFIDs, the flood entries are shared. The PGT address of the flood vector is therefore determined based on the port (or LAG) number of the RIF connected with the rFID. Add a helper to determine subport number given a RIF, to be used in these calculations. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/d7ab43cf5b021f785f363f236e4b6780d10eea93.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 2b7bccd1f167aa056206cc2551514b35c9fd30ab Author: Petr Machata Date: Mon Nov 20 19:25:29 2023 +0100 mlxsw: spectrum_fid: Extract SFMR packing into a helper Both mlxsw_sp_fid_op() and mlxsw_sp_fid_edit_op() pack the core of SFMR the same way. Extract the common code into a helper and call that. Extract out of that a wrapper that just calls mlxsw_reg_sfmr_pack(), because it will be useful for the dummy family later on. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/31f32b4d767183f6cb197148d0792feab2efadba.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit b51c876c2297f8b32ca579712e3ab1490114d1ee Author: Petr Machata Date: Mon Nov 20 19:25:28 2023 +0100 mlxsw: spectrum_fid: Drop unnecessary conditions The caller already only calls mlxsw_sp_fid_flood_tables_init() and mlxsw_sp_fid_flood_tables_fini() if (fid_family->flood_tables). There is no configuration where the pointer is non-NULL, but the number of tables is zero. So drop the conditions. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/897c6841bc756ac632b797bf67ac83c6a66ba359.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 9aad19a363f68470ac5af677cda7120393e94a06 Author: Petr Machata Date: Mon Nov 20 19:25:27 2023 +0100 mlxsw: pci: Permit enabling CFF mode There are FW versions out there that do not support CFF flood mode, and on Spectrum-1 in particular, there is no plan to support it at all. mlxsw will therefore have to support both controlled flood mode as well as CFF. There are also FW versions out there that claim to support CFF flood mode, but then reject or ignore configurations enabling the same. The driver thus has to have a say in whether an attempt to configure CFF flood mode should even be made, and what to use as a fallback. Hence express the feature in terms of "does the driver prefer CFF flood mode?", and "what flood mode the PCI module managed to configure the FW with". This gives to the driver a chance to determine whether CFF flood mode configuration should be attempted. The latter bit was added in previous patches. In this patch, add the bit that allows the driver to determine whether CFF enablement should be attempted, and the enablement code itself. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/41640a0ee58e0a9538f820f7b601a0e35f6449e4.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 09591595686750b68c6d40c5349e737d78f6da47 Author: Petr Machata Date: Mon Nov 20 19:25:26 2023 +0100 mlxsw: core, pci: Add plumbing related to CFF mode CFF mode, for Compressed FID Flooding, is a way of organizing flood vectors in the PGT table. The bus module determines whether CFF is supported, can configure flood mode to CFF if it is, and knows what flood mode has been configured. Therefore add a bus callback to determine the configured flood mode. Also add to core an API to query it. Since after this patch, we rely on mlxsw_pci->flood_mode being set, it becomes a coding error if a driver invokes this function with a set of fields that misses the initialization. Warn and bail out in that case. The CFF mode is not used as of this patch. The code to actually use it will be added later. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/889d58759dd40f5037f2206b9fc4a78a9240da80.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 6b10371c386c381651e2ea42ae11be6c35004b55 Author: Petr Machata Date: Mon Nov 20 19:25:25 2023 +0100 mlxsw: reg: Add to SFMR register the fields related to CFF flood mode Add the field cff_mid_base, which specifies at which point in PGT the per-FID flood table is stored. Add cff_prf_id, the profile ID, which determines on which row of the flood table a flood vector can be found for a given traffic type. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/3ad7ae38cf6534bedcd876f16090d109a814b3e3.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 446bc1e9dec63b419751b8bdecba06fee631672e Author: Petr Machata Date: Mon Nov 20 19:25:24 2023 +0100 mlxsw: reg: Extract flood-mode specific part of mlxsw_reg_sfmr_pack() In CFF mode, it is necessary to set a different set of SFMR fields. Leave in mlxsw_reg_sfmr_pack() only the common bits, and move the parts relevant to controlled flood mode directly to the call site. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/6f29639ebc3ca0722272e6c644ca910096469413.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 642d6a2033d85797e0f8807d0e48bb007d5e73ca Author: Petr Machata Date: Mon Nov 20 19:25:23 2023 +0100 mlxsw: reg: Drop unnecessary writes from mlxsw_reg_sfmr_pack() The MLXSW_REG_ZERO at the beginning of the function wipes the whole payload. There's no need to set vtfp and vv to false explicitly. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/04a51ea7cf31eea0ef7707311d8e864e2d9ef307.1700503644.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 7eb902954b624ee338303ad735235429e036b31b Author: Petr Machata Date: Mon Nov 20 19:25:22 2023 +0100 mlxsw: reg: Mark SFGC & some SFMR fields as reserved in CFF mode Some existing fields and the whole register of SFGC are reserved in CFF mode. Backport the reservation note to these fields. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/e1d5977a8cb778227e4ea2fd1515529957ce5de7.1700503643.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit e1e4ce6c6d54ff206e55bd8c89c00bfee891458c Author: Petr Machata Date: Mon Nov 20 19:25:21 2023 +0100 mlxsw: reg: Add Switch FID Flooding Profiles Register The SFFP register populates the fid flooding profile tables used for the NVE flooding and Compressed-FID Flooding (CFF). Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/ca42eb67763bd0c7cf035afc62ef73632f3f61a6.1700503643.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 2d19da9277199ec69b555ca32042be2a7cd493c6 Author: Petr Machata Date: Mon Nov 20 19:25:20 2023 +0100 mlxsw: resources: Add max_cap_nve_flood_prf max_cap_nve_flood_prf describes maximum number of NVE flooding profiles. The same value then applies for flooding profiles for flooding in CFF mode. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/064a2e013d879e5f5494167a6c120c4bb85a2204.1700503643.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 50ee67789b823ffb052f3be20349c05c30bee2e6 Author: Petr Machata Date: Mon Nov 20 19:25:19 2023 +0100 mlxsw: cmd: Add MLXSW_CMD_MBOX_CONFIG_PROFILE_FLOOD_MODE_CFF PGT, a port-group table is an in-HW block of specialized memory that holds sets of ports. Allocated within the PGT are series of flood tables that describe to which ports traffic of various types (unknown UC, BC, MC) should be flooded from which FID. The hitherto-used layout of these flood tables is being replaced with a more flexible scheme, called compressed FID flooding (CFF). CFF can be configured through CONFIG_PROFILE.flood_mode. In this patch, add MLXSW_CMD_MBOX_CONFIG_PROFILE_FLOOD_MODE_CFF, the value to use to enable the CFF mode. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/fc2e063742856492f8f22b0b87abf431ea6d53d0.1700503643.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit 8405d6626289160fcd21b0f0c827144556be52be Author: Petr Machata Date: Mon Nov 20 19:25:18 2023 +0100 mlxsw: cmd: Add cmd_mbox.query_fw.cff_support PGT, a port-group table is an in-HW block of specialized memory that holds sets of ports. Allocated within the PGT are series of flood tables that describe to which ports traffic of various types (unknown UC, BC, MC) should be flooded from which FID. The hitherto-used layout of these flood tables is being replaced with a more flexible scheme, called compressed FID flooding (CFF). CFF can be configured through CONFIG_PROFILE.flood_mode. cff_support determines whether CONFIG_PROFILE.flood_mode can be set to CFF. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen Reviewed-by: Ido Schimmel Link: https://lore.kernel.org/r/af727d0e1095e30fa45c7e60404637cdc491aeec.1700503643.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski commit dd891b5b106fa7346d75b3ee3448fa0071422f3d Author: Jakub Kicinski Date: Mon Nov 20 10:41:40 2023 -0800 net: do not send a MOVE event when netdev changes netns Networking supports changing netdevice's netns and name at the same time. This allows avoiding name conflicts and having to rename the interface in multiple steps. E.g. netns1={eth0, eth1}, netns2={eth1} - we want to move netns1:eth1 to netns2 and call it eth0 there. If we can't rename "in flight" we'd need to (1) rename eth1 -> $tmp, (2) change netns, (3) rename $tmp -> eth0. To rename the underlying struct device we have to call device_rename(). The rename()'s MOVE event, however, doesn't "belong" to either the old or the new namespace. If there are conflicts on both sides it's actually impossible to issue a real MOVE (old name -> new name) without confusing user space. And Daniel reports that such confusions do in fact happen for systemd, in real life. Since we already issue explicit REMOVE and ADD events manually - suppress the MOVE event completely. Move the ADD after the rename, so that the REMOVE uses the old name, and the ADD the new one. If there is no rename this changes the picture as follows: Before: old ns | KERNEL[213.399289] remove /devices/virtual/net/eth0 (net) new ns | KERNEL[213.401302] add /devices/virtual/net/eth0 (net) new ns | KERNEL[213.401397] move /devices/virtual/net/eth0 (net) After: old ns | KERNEL[266.774257] remove /devices/virtual/net/eth0 (net) new ns | KERNEL[266.774509] add /devices/virtual/net/eth0 (net) If there is a rename and a conflict (using the exact eth0/eth1 example explained above) we get this: Before: old ns | KERNEL[224.316833] remove /devices/virtual/net/eth1 (net) new ns | KERNEL[224.318551] add /devices/virtual/net/eth1 (net) new ns | KERNEL[224.319662] move /devices/virtual/net/eth0 (net) After: old ns | KERNEL[333.033166] remove /devices/virtual/net/eth1 (net) new ns | KERNEL[333.035098] add /devices/virtual/net/eth0 (net) Note that "in flight" rename is only performed when needed. If there is no conflict for old name in the target netns - the rename will be performed separately by dev_change_name(), as if the rename was a different command, and there will still be a MOVE event for the rename: Before: old ns | KERNEL[194.416429] remove /devices/virtual/net/eth0 (net) new ns | KERNEL[194.418809] add /devices/virtual/net/eth0 (net) new ns | KERNEL[194.418869] move /devices/virtual/net/eth0 (net) new ns | KERNEL[194.420866] move /devices/virtual/net/eth1 (net) After: old ns | KERNEL[71.917520] remove /devices/virtual/net/eth0 (net) new ns | KERNEL[71.919155] add /devices/virtual/net/eth0 (net) new ns | KERNEL[71.920729] move /devices/virtual/net/eth1 (net) If deleting the MOVE event breaks some user space we should insert an explicit kobject_uevent(MOVE) after the ADD, like this: @@ -11192,6 +11192,12 @@ int __dev_change_net_namespace(struct net_device *dev, struct net *net, kobject_uevent(&dev->dev.kobj, KOBJ_ADD); netdev_adjacent_add_links(dev); + /* User space wants an explicit MOVE event, issue one unless + * dev_change_name() will get called later and issue one. + */ + if (!pat || new_name[0]) + kobject_uevent(&dev->dev.kobj, KOBJ_MOVE); + /* Adapt owner in case owning user namespace of target network * namespace is different from the original one. */ Reported-by: Daniel Gröber Link: https://lore.kernel.org/all/20231010121003.x3yi6fihecewjy4e@House.clients.dxld.at/ Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/all/20231120184140.578375-1-kuba@kernel.org/ Signed-off-by: Jakub Kicinski commit d2689b6a86b9d23574bd4b654bf770b6034e2c7e Author: Jose Ignacio Tornos Martinez Date: Mon Nov 20 13:11:41 2023 +0100 net: usb: ax88179_178a: avoid two consecutive device resets The device is always reset two consecutive times (ax88179_reset is called twice), one from usbnet_probe during the device binding and the other from usbnet_open. Remove the non-necessary reset during the device binding and let the reset operation from open to keep the normal behavior (tested with generic ASIX Electronics Corp. AX88179 Gigabit Ethernet device). Reported-by: Herb Wei Tested-by: Herb Wei Signed-off-by: Jose Ignacio Tornos Martinez Link: https://lore.kernel.org/r/20231120121239.54504-1-jtornosm@redhat.com Signed-off-by: Jakub Kicinski commit cca974daeb6c43ea971f8ceff5a7080d7d49ee30 Author: Manas Ghandat Date: Wed Oct 11 20:09:37 2023 +0530 jfs: fix shift-out-of-bounds in dbJoin Currently while joining the leaf in a buddy system there is shift out of bound error in calculation of BUDSIZE. Added the required check to the BUDSIZE and fixed the documentation as well. Reported-by: syzbot+411debe54d318eaed386@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=411debe54d318eaed386 Signed-off-by: Manas Ghandat Signed-off-by: Dave Kleikamp commit e0e1958f4c365e380b17ccb35617345b31ef7bf3 Author: Edward Adam Davis Date: Tue Oct 31 13:39:04 2023 +0800 jfs: fix uaf in jfs_evict_inode When the execution of diMount(ipimap) fails, the object ipimap that has been released may be accessed in diFreeSpecial(). Asynchronous ipimap release occurs when rcu_core() calls jfs_free_node(). Therefore, when diMount(ipimap) fails, sbi->ipimap should not be initialized as ipimap. Reported-and-tested-by: syzbot+01cf2dbcbe2022454388@syzkaller.appspotmail.com Signed-off-by: Edward Adam Davis Signed-off-by: Dave Kleikamp commit 74ecdda68242b174920fe7c6133a856fb7d8559b Author: Manas Ghandat Date: Tue Oct 17 17:33:56 2023 +0530 jfs: fix array-index-out-of-bounds in dbAdjTree Currently there is a bound check missing in the dbAdjTree while accessing the dmt_stree. To add the required check added the bool is_ctl which is required to determine the size as suggest in the following commit. https://lore.kernel.org/linux-kernel-mentees/f9475918-2186-49b8-b801-6f0f9e75f4fa@oracle.com/ Reported-by: syzbot+39ba34a099ac2e9bd3cb@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=39ba34a099ac2e9bd3cb Signed-off-by: Manas Ghandat Signed-off-by: Dave Kleikamp commit fa5492ee89463a7590a1449358002ff7ef63529f Author: Manas Ghandat Date: Wed Oct 25 11:39:07 2023 +0530 jfs: fix slab-out-of-bounds Read in dtSearch Currently while searching for current page in the sorted entry table of the page there is a out of bound access. Added a bound check to fix the error. Dave: Set return code to -EIO Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202310241724.Ed02yUz9-lkp@intel.com/ Signed-off-by: Manas Ghandat Signed-off-by: Dave Kleikamp commit 27e56f59bab5ddafbcfe69ad7a4a6ea1279c1b16 Author: Osama Muhammad Date: Sat Oct 14 00:10:28 2023 +0500 UBSAN: array-index-out-of-bounds in dtSplitRoot Syzkaller reported the following issue: oop0: detected capacity change from 0 to 32768 UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dtree.c:1971:9 index -2 is out of range for type 'struct dtslot [128]' CPU: 0 PID: 3613 Comm: syz-executor270 Not tainted 6.0.0-syzkaller-09423-g493ffd6605b2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1b1/0x28e lib/dump_stack.c:106 ubsan_epilogue lib/ubsan.c:151 [inline] __ubsan_handle_out_of_bounds+0xdb/0x130 lib/ubsan.c:283 dtSplitRoot+0x8d8/0x1900 fs/jfs/jfs_dtree.c:1971 dtSplitUp fs/jfs/jfs_dtree.c:985 [inline] dtInsert+0x1189/0x6b80 fs/jfs/jfs_dtree.c:863 jfs_mkdir+0x757/0xb00 fs/jfs/namei.c:270 vfs_mkdir+0x3b3/0x590 fs/namei.c:4013 do_mkdirat+0x279/0x550 fs/namei.c:4038 __do_sys_mkdirat fs/namei.c:4053 [inline] __se_sys_mkdirat fs/namei.c:4051 [inline] __x64_sys_mkdirat+0x85/0x90 fs/namei.c:4051 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fcdc0113fd9 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffeb8bc67d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000102 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcdc0113fd9 RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000003 RBP: 00007fcdc00d37a0 R08: 0000000000000000 R09: 00007fcdc00d37a0 R10: 00005555559a72c0 R11: 0000000000000246 R12: 00000000f8008000 R13: 0000000000000000 R14: 00083878000000f8 R15: 0000000000000000 The issue is caused when the value of fsi becomes less than -1. The check to break the loop when fsi value becomes -1 is present but syzbot was able to produce value less than -1 which cause the error. This patch simply add the change for the values less than 0. The patch is tested via syzbot. Reported-and-tested-by: syzbot+d4b1df2e9d4ded6488ec@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=d4b1df2e9d4ded6488ec Signed-off-by: Osama Muhammad Signed-off-by: Dave Kleikamp commit 9862ec7ac1cbc6eb5ee4a045b5d5b8edbb2f7e68 Author: Osama Muhammad Date: Wed Oct 11 23:46:37 2023 +0500 FS:JFS:UBSAN:array-index-out-of-bounds in dbAdjTree Syzkaller reported the following issue: UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:2867:6 index 196694 is out of range for type 's8[1365]' (aka 'signed char[1365]') CPU: 1 PID: 109 Comm: jfsCommit Not tainted 6.6.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0x11c/0x150 lib/ubsan.c:348 dbAdjTree+0x474/0x4f0 fs/jfs/jfs_dmap.c:2867 dbJoin+0x210/0x2d0 fs/jfs/jfs_dmap.c:2834 dbFreeBits+0x4eb/0xda0 fs/jfs/jfs_dmap.c:2331 dbFreeDmap fs/jfs/jfs_dmap.c:2080 [inline] dbFree+0x343/0x650 fs/jfs/jfs_dmap.c:402 txFreeMap+0x798/0xd50 fs/jfs/jfs_txnmgr.c:2534 txUpdateMap+0x342/0x9e0 txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline] jfs_lazycommit+0x47a/0xb70 fs/jfs/jfs_txnmgr.c:2732 kthread+0x2d3/0x370 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 ================================================================================ Kernel panic - not syncing: UBSAN: panic_on_warn set ... CPU: 1 PID: 109 Comm: jfsCommit Not tainted 6.6.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 panic+0x30f/0x770 kernel/panic.c:340 check_panic_on_warn+0x82/0xa0 kernel/panic.c:236 ubsan_epilogue lib/ubsan.c:223 [inline] __ubsan_handle_out_of_bounds+0x13c/0x150 lib/ubsan.c:348 dbAdjTree+0x474/0x4f0 fs/jfs/jfs_dmap.c:2867 dbJoin+0x210/0x2d0 fs/jfs/jfs_dmap.c:2834 dbFreeBits+0x4eb/0xda0 fs/jfs/jfs_dmap.c:2331 dbFreeDmap fs/jfs/jfs_dmap.c:2080 [inline] dbFree+0x343/0x650 fs/jfs/jfs_dmap.c:402 txFreeMap+0x798/0xd50 fs/jfs/jfs_txnmgr.c:2534 txUpdateMap+0x342/0x9e0 txLazyCommit fs/jfs/jfs_txnmgr.c:2664 [inline] jfs_lazycommit+0x47a/0xb70 fs/jfs/jfs_txnmgr.c:2732 kthread+0x2d3/0x370 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304 Kernel Offset: disabled Rebooting in 86400 seconds.. The issue is caused when the value of lp becomes greater than CTLTREESIZE which is the max size of stree. Adding a simple check solves this issue. Dave: As the function returns a void, good error handling would require a more intrusive code reorganization, so I modified Osama's patch at use WARN_ON_ONCE for lack of a cleaner option. The patch is tested via syzbot. Reported-by: syzbot+39ba34a099ac2e9bd3cb@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=39ba34a099ac2e9bd3cb Signed-off-by: Osama Muhammad Signed-off-by: Dave Kleikamp commit 22fca621bd1bbc5366e9cd941eb1c07c0963d984 Author: Avadhut Naik Date: Thu Nov 16 16:47:25 2023 -0600 ACPI: APEI: EINJ: Add support for vendor defined error types Vendor-Defined Error types are supported by the platform apart from standard error types if bit 31 is set in the output of GET_ERROR_TYPE Error Injection Action.[1] While the errors themselves and the length of their associated "OEM Defined data structure" might vary between vendors, the physical address of this structure can be computed through vendor_extension and length fields of "SET_ERROR_TYPE_WITH_ADDRESS" and "Vendor Error Type Extension" Structures respectively.[2][3] Currently, however, the einj module only computes the physical address of Vendor Error Type Extension Structure. Neither does it compute the physical address of OEM Defined structure nor does it establish the memory mapping required for injecting Vendor-defined errors. Consequently, userspace tools have to establish the very mapping through /dev/mem, nopat kernel parameter and system calls like mmap/munmap initially before injecting Vendor-defined errors. Circumvent the issue by computing the physical address of OEM Defined data structure and establishing the required mapping with the structure. Create a new file "oem_error", if the system supports Vendor-defined errors, to export this mapping, through debugfs_create_blob(). Userspace tools can then populate their respective OEM Defined structure instances and just write to the file as part of injecting Vendor-defined Errors. Similarly, the tools can also read from the file if the system firmware provides some information through the OEM defined structure after error injection. [1] ACPI specification 6.5, section 18.6.4 [2] ACPI specification 6.5, Table 18.31 [3] ACPI specification 6.5, Table 18.32 Suggested-by: Yazen Ghannam Signed-off-by: Avadhut Naik Reviewed-by: Tony Luck Reviewed-by: Borislav Petkov (AMD) Signed-off-by: Rafael J. Wysocki commit 0706526ec7704dcd046239078ac175d11a88a95e Author: Avadhut Naik Date: Thu Nov 16 16:47:24 2023 -0600 platform/chrome: cros_ec_debugfs: Fix permissions for panicinfo The debugfs_create_blob() function has been used to create read-only binary blobs in debugfs. The function filters out permissions, other than S_IRUSR, S_IRGRP and S_IROTH, provided while creating the blobs. The very behavior though is being changed through previous patch in the series (fs: debugfs: Add write functionality to debugfs blobs) which makes the binary blobs writable by owners. Thus, all permissions provided while creating the blobs, except S_IRUSR,S_IWUSR, S_IRGRP, S_IROTH, will be filtered by debugfs_create_blob(). As such, rectify the permissions of panicinfo file since the S_IFREG flag was anyways being filtered out by debugfs_create_blob(). Moreover, the very flag will always be set be set for the panicinfo file through __debugfs_create_file(). Signed-off-by: Avadhut Naik Reviewed-by: Greg Kroah-Hartman Reviewed-by: Tony Luck Signed-off-by: Rafael J. Wysocki commit 71cd3c636404ceb08226b5095ca36a04eb578ca1 Author: Avadhut Naik Date: Thu Nov 16 16:47:23 2023 -0600 fs: debugfs: Add write functionality to debugfs blobs Currently, debugfs_create_blob() creates read-only debugfs binary blob files. In some cases, however, userspace tools need to write variable length data structures into predetermined memory addresses. An example is when injecting Vendor-defined error types through the einj module. In such cases, the functionality to write to these blob files in debugfs would be desired since the mapping aspect can be handled within the modules with userspace tools only needing to write into the blob files. Implement a write callback to enable writing to these blob files, created in debugfs, by owners only. Signed-off-by: Avadhut Naik Reviewed-by: Alexey Kardashevskiy Reviewed-by: Greg Kroah-Hartman Reviewed-by: Tony Luck Signed-off-by: Rafael J. Wysocki commit 709f3cbd652e50e96a9d9c62a300313b636e3f6f Author: Avadhut Naik Date: Thu Nov 16 16:47:22 2023 -0600 ACPI: APEI: EINJ: Refactor available_error_type_show() OSPM can discover the error injection capabilities of the platform by executing GET_ERROR_TYPE error injection action.[1] The action returns a DWORD representing a bitmap of platform supported error injections.[2] The available_error_type_show() function determines the bits set within this DWORD and provides a verbose output, from einj_error_type_string array, through /sys/kernel/debug/apei/einj/available_error_type file. The function however, assumes one to one correspondence between an error's position in the bitmap and its array entry offset. Consequently, some errors like Vendor Defined Error Type fail this assumption and will incorrectly be shown as not supported, even if their corresponding bit is set in the bitmap and they have an entry in the array. Navigate around the issue by converting einj_error_type_string into an array of structures with a predetermined mask for all error types corresponding to their bit position in the DWORD returned by GET_ERROR_TYPE action. The same breaks the aforementioned assumption resulting in all supported error types by a platform being outputted through the above available_error_type file. [1] ACPI specification 6.5, Table 18.25 [2] ACPI specification 6.5, Table 18.30 Suggested-by: Alexey Kardashevskiy Signed-off-by: Avadhut Naik Reviewed-by: Borislav Petkov (AMD) Reviewed-by: Tony Luck Signed-off-by: Rafael J. Wysocki commit ccd45faf4973746c4f30ea41eec864e5cf191099 Author: Nikita Kiryushin Date: Thu Nov 9 16:49:25 2023 +0300 ACPI: video: check for error while searching for backlight device parent If acpi_get_parent() called in acpi_video_dev_register_backlight() fails, for example, because acpi_ut_acquire_mutex() fails inside acpi_get_parent), this can lead to incorrect (uninitialized) acpi_parent handle being passed to acpi_get_pci_dev() for detecting the parent pci device. Check acpi_get_parent() result and set parent device only in case of success. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 9661e92c10a9 ("acpi: tie ACPI backlight devices to PCI devices if possible") Signed-off-by: Nikita Kiryushin Signed-off-by: Rafael J. Wysocki commit 3cbbf9192abdc9183eb215b5e8b06c778e5c2214 Merge: 57b97ecb40cae 3ece0e85f679c Author: Andrii Nakryiko Date: Tue Nov 21 10:43:03 2023 -0800 Merge branch 'selftests-bpf-update-multiple-prog_tests-to-use-assert_-macros' Yuran Pereira says: ==================== selftests/bpf: Update multiple prog_tests to use ASSERT_ macros Multiple files/programs in `tools/testing/selftests/bpf/prog_tests/` still heavily use the `CHECK` macro, even when better `ASSERT_` alternatives are available. As it was already pointed out by Yonghong Song [1] in the bpf selftests the use of the ASSERT_* series of macros is preferred over the CHECK macro. This patchset replaces the usage of `CHECK(` macros to the equivalent `ASSERT_` family of macros in the following prog_tests: - bind_perm.c - bpf_obj_id.c - bpf_tcp_ca.c - vmlinux.c [1] https://lore.kernel.org/lkml/0a142924-633c-44e6-9a92-2dc019656bf2@linux.dev Changes in v3: - Addressed the following points mentioned by Yonghong Song - Improved `bpf_map_lookup_elem` assertion in bpf_tcp_ca. - Replaced assertion introduced in v2 with one that checks `thread_ret` instead of `pthread_join`. This ensures that `server`'s return value (thread_ret) is the one being checked, as oposed to `pthread_join`'s return value, since the latter one is less likely to fail. Changes in v2: - Fixed pthread_join assertion that broke the previous test Previous version: v2 - https://lore.kernel.org/lkml/GV1PR10MB6563AECF8E94798A1E5B36A4E8B6A@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM v1 - https://lore.kernel.org/lkml/GV1PR10MB6563FCFF1C5DEBE84FEA985FE8B0A@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM ==================== Link: https://lore.kernel.org/r/GV1PR10MB6563BEFEA4269E1DDBC264B1E8BBA@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM Signed-off-by: Andrii Nakryiko commit 3ece0e85f679c23d2a5128993846c58a2f5f890e Author: Yuran Pereira Date: Tue Nov 21 05:40:41 2023 +0530 selftests/bpf: Replaces the usage of CHECK calls for ASSERTs in vmlinux vmlinux.c uses the `CHECK` calls even though the use of ASSERT_ series of macros is preferred in the bpf selftests. This patch replaces all `CHECK` calls for equivalent `ASSERT_` macro calls. Signed-off-by: Yuran Pereira Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/GV1PR10MB6563ED1023A2A3AEF30BDA5DE8BBA@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM commit f125d09b99fc0ee43f865810390f10b8f23a2c98 Author: Yuran Pereira Date: Tue Nov 21 05:39:25 2023 +0530 selftests/bpf: Replaces the usage of CHECK calls for ASSERTs in bpf_obj_id bpf_obj_id uses the `CHECK` calls even though the use of ASSERT_ series of macros is preferred in the bpf selftests. This patch replaces all `CHECK` calls for equivalent `ASSERT_` macro calls. Signed-off-by: Yuran Pereira Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/GV1PR10MB65639AA3A10B4BBAA79952C7E8BBA@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM commit 3ec1114a97457398077e45b231d502d1cc30439d Author: Yuran Pereira Date: Tue Nov 21 05:37:43 2023 +0530 selftests/bpf: Replaces the usage of CHECK calls for ASSERTs in bind_perm bind_perm uses the `CHECK` calls even though the use of ASSERT_ series of macros is preferred in the bpf selftests. This patch replaces all `CHECK` calls for equivalent `ASSERT_` macro calls. Signed-off-by: Yuran Pereira Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/GV1PR10MB656314F467E075A106CA02BFE8BBA@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM commit b0e2a0395312f4e53504ae84eeb5902e5518d1d7 Author: Yuran Pereira Date: Tue Nov 21 05:35:39 2023 +0530 selftests/bpf: Replaces the usage of CHECK calls for ASSERTs in bpf_tcp_ca bpf_tcp_ca uses the `CHECK` calls even though the use of ASSERT_ series of macros is preferred in the bpf selftests. This patch replaces all `CHECK` calls for equivalent `ASSERT_` macro calls. Signed-off-by: Yuran Pereira Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/GV1PR10MB6563F180C0F2BB4F6CFA5130E8BBA@GV1PR10MB6563.EURPRD10.PROD.OUTLOOK.COM commit 5032c607e886e0c40749a05d37b835c1757d38ff Author: Haridhar Kalvala Date: Mon Nov 20 17:07:31 2023 +0530 drm/i915: ATS-M device ID update ATS-M device ID update. BSpec: 44477 Signed-off-by: Haridhar Kalvala Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20231120113731.1570589-1-haridhar.kalvala@intel.com commit 67c7666fe808c3a7af3cc6f9d0a3dd3acfd26115 Author: Cristian Ciocaltea Date: Tue Nov 21 14:07:51 2023 +0200 ASoC: doc: Fix undefined SND_SOC_DAPM_NOPM argument The virtual widget example makes use of an undefined SND_SOC_DAPM_NOPM argument passed to SND_SOC_DAPM_MIXER(). Replace with the correct SND_SOC_NOPM definition. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20231121120751.77355-1-cristian.ciocaltea@collabora.com Signed-off-by: Mark Brown commit e9e60c82fe391d04db55a91c733df4a017c28b2f Author: Paolo Bonzini Date: Tue Nov 21 11:24:08 2023 -0500 selftests/kvm: fix compilation on non-x86_64 platforms MEM_REGION_SLOT and MEM_REGION_GPA are not really needed in test_invalid_memory_region_flags; the VM never runs and there are no other slots, so it is okay to use slot 0 and place it at address zero. This fixes compilation on architectures that do not define them. Fixes: 5d74316466f4 ("KVM: selftests: Add a memory region subtest to validate invalid flags") Signed-off-by: Paolo Bonzini commit 5a7d6d26af7714718b673e40bdc97f9f207e265a Author: Andrew Cooper Date: Thu Nov 2 12:26:21 2023 +0000 x86/apic: Drop struct local_apic This type predates recorded history in tglx/history.git, making it older than Feb 5th 2002. This structure is literally old enough to drink in most juristictions in the world, and has not been used once in that time. Lay it to rest in /dev/null. Signed-off-by: Andrew Cooper Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20231102-x86-apic-v1-3-bf049a2a0ed6@citrix.com commit 49277a5b76373e630075ff7d32fc0f9f51294f24 Author: Waiman Long Date: Mon Nov 20 21:18:40 2023 -0500 workqueue: Move workqueue_set_unbound_cpumask() and its helpers inside CONFIG_SYSFS Commit fe28f631fa94 ("workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask") makes workqueue_set_unbound_cpumask() static as it is not used elsewhere in the kernel. However, this triggers a kernel test robot warning about 'workqueue_set_unbound_cpumask' defined but not used when CONFIG_SYS isn't defined. It happens that workqueue_set_unbound_cpumask() is only called when CONFIG_SYS is defined. Move workqueue_set_unbound_cpumask() and its helpers inside the CONFIG_SYSFS compilation block to avoid the warning. There is no functional change. Fixes: fe28f631fa94 ("workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311130831.uh0AoCd1-lkp@intel.com/ Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 855da7cdf974f3902397e5bf9423c7442bdfd75f Author: Andrew Cooper Date: Thu Nov 2 12:26:20 2023 +0000 x86/apic: Drop enum apic_delivery_modes The type is not used any more. Replace the constants with plain defines so they can live outside of an __ASSEMBLY__ block, allowing for more cleanup in subsequent changes. Signed-off-by: Andrew Cooper Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20231102-x86-apic-v1-2-bf049a2a0ed6@citrix.com commit 07e8f88568f558fb0f9529f49b3ab120cbe750fe Author: Andrew Cooper Date: Thu Nov 2 12:26:19 2023 +0000 x86/apic: Drop apic::delivery_mode This field is set to APIC_DELIVERY_MODE_FIXED in all cases, and is read exactly once. Fold the constant in uv_program_mmr() and drop the field. Searching for the origin of the stale HyperV comment reveals commit a31e58e129f7 ("x86/apic: Switch all APICs to Fixed delivery mode") which notes: As a consequence of this change, the apic::irq_delivery_mode field is now pointless, but this needs to be cleaned up in a separate patch. 6 years is long enough for this technical debt to have survived. [ bp: Fold in https://lore.kernel.org/r/20231121123034.1442059-1-andrew.cooper3@citrix.com ] Signed-off-by: Andrew Cooper Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Steve Wahl Link: https://lore.kernel.org/r/20231102-x86-apic-v1-1-bf049a2a0ed6@citrix.com commit 26257869672fd4a06a60c2da841e15fb2cb47bbe Author: Takashi Iwai Date: Tue Nov 21 16:41:25 2023 +0100 ALSA: hda: Refer to correct stream index at loops In a couple of loops over the all streams, we check the bitmap against the loop counter. A more correct reference would be, however, the index of each stream, instead. This patch corrects the check of bitmaps to the stream index. Note that this change doesn't fix anything for now; all existing drivers set up the stream indices properly, hence the loop count is always equal with the stream index. That said, this change is only for consistency. Link: https://lore.kernel.org/r/20231121154125.4888-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5d9f746ca64c3ebfba3b650dbc4b0de705c83f3b Author: Chancel Liu Date: Tue Nov 21 13:25:12 2023 +0800 ASoC: imx-rpmsg: Force codec power on in low power audio mode Low power audio mode requires binding codec still power on while Acore enters into suspend so Mcore can continue playback music. ASoC machine driver acquires DAPM endpoints through reading "ignore-suspend-widgets" property from DT and then forces the path between these endpoints ignoring suspend. If the rpmsg sound card is in low power audio mode, the suspend/resume callback of binding codec is overridden to disable the suspend/resume. Signed-off-by: Chancel Liu Link: https://lore.kernel.org/r/20231121052512.20235-2-chancel.liu@nxp.com Signed-off-by: Mark Brown commit 27c69d7da1084af0b8b3a20ef9ff01e9eda5270c Author: Chancel Liu Date: Tue Nov 21 13:25:11 2023 +0800 ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend Add a property to list audio sound widgets which are marked ignoring system suspend. Paths between these endpoints are still active over suspend of the main application processor that the current operating system is running. Signed-off-by: Chancel Liu Link: https://lore.kernel.org/r/20231121052512.20235-1-chancel.liu@nxp.com Signed-off-by: Mark Brown commit 297c76d94c8911b5d7b58afc51cfde715dd155fe Author: Imre Deak Date: Thu Nov 16 15:18:41 2023 +0200 drm/i915/dp: Reuse intel_dp_{max,effective}_data_rate in intel_link_compute_m_n() Reuse intel_dp_max_data_rate() and intel_dp_effective_data_rate() in intel_link_compute_m_n(), instead of open-coding the equivalent. Note the kbit/sec -> kByte/sec unit change in the M/N values, but this not reducing the precision, as the link rate value is based anyway on a less precise 10 kbit/sec value. Suggested-by: Jani Nikula Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231116131841.1588781-12-imre.deak@intel.com commit b9de01d85a62ddc4fce8f28eeba64b5682431158 Author: Imre Deak Date: Thu Nov 16 15:18:40 2023 +0200 drm/i915/dp: Simplify intel_dp_max_data_rate() Simplify intel_dp_max_data_rate() using drm_dp_bw_channel_coding_efficiency() to calculate the max data rate for both DP1.4 and UHBR link rates. This trades a redundant multiply/divide for readability. Cc: Jani Nikula Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231116131841.1588781-11-imre.deak@intel.com commit 5ee4badb4b195bd871ba6d5a2d43aac03587230a Author: Imre Deak Date: Thu Nov 16 15:18:39 2023 +0200 drm/i915/dp: Report a rounded-down value as the maximum data rate Callers of intel_dp_max_data_rate() use the return value as an upper bound for the BW a given mode requires. As such the rounding shouldn't result in a bigger value than the actual upper bound. Use round-down instead of -closest accordingly. Cc: Jani Nikula Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231116131841.1588781-10-imre.deak@intel.com commit 9069b77545ca5afc222effa994c65a64ac5e6462 Author: Imre Deak Date: Fri Nov 17 17:09:29 2023 +0200 drm/i915/dp_mst: Fix PBN / MTP_TU size calculation for UHBR rates Atm the allocated MST PBN value is calculated from the TU size (number of allocated MTP slots) as PBN = TU * pbn_div pbn_div being the link BW for each MTP slot. For DP 1.4 link rates this worked, as pbn_div there is guraranteed to be an integer number, however on UHBR this isn't the case. To get a PBN, TU pair where TU is a properly rounded-up value covering all the BW corresponding to PBN, calculate first PBN and from PBN the TU value. Calculate PBN directly from the effective pixel data rate, instead of calculating it indirectly from the corresponding TU and pbn_div values (which are in turn derived from the pixel data rate and BW overhead). Add a helper function to calculate the effective data rate, also adding a note that callers of intel_dp_link_required() may also need to check the effective data rate (vs. the data rate w/o the BW overhead). While at it add a note to check if WA#14013163432 is applicable. v2: - Fix PBN calculation, deriving it from the effective data rate directly instead of using the indirect TU and pbn_div values for this. - Add a note about WA#14013163432. (Arun) v3: - Fix rounding up quotient while calculating remote_tu. (Ville) Cc: Ville Syrjälä Reviewed-by: Arun R Murthy (v1) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231117150929.1767227-3-imre.deak@intel.com commit e86fb4dcfb3c4e9da8855312ada0f22629423b00 Author: Imre Deak Date: Thu Nov 16 15:18:37 2023 +0200 drm/i915/dp_mst: Calculate the BW overhead in intel_dp_mst_find_vcpi_slots_for_bpp() The next patch will calculate the PBN value directly from the pixel data rate and the BW allocation overhead, not requiring the data, link M/N and TU values for this. To prepare for that move the calculation of BW overheads from intel_dp_mst_compute_m_n() to intel_dp_mst_find_vcpi_slots_for_bpp(). While at it store link_bpp in a .4 fixed point format. Reviewed-by: Arun R Murthy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231116131841.1588781-8-imre.deak@intel.com commit 7e17537719107e7b3b942d76919d020f8c779271 Author: Imre Deak Date: Thu Nov 16 15:18:36 2023 +0200 drm/i915/dp: Fix UHBR link M/N values The link M/N ratio is the data rate / link symbol clock rate, fix things up accordingly. On DP 1.4 this ratio was correct as the link symbol clock rate in that case matched the link data rate (in bytes/sec units, the symbol size being 8 bits), however it wasn't correct for UHBR rates where the symbol size is 32 bits. Kudos to Arun noticing in Bspec the incorrect use of link data rate in the ratio's N value. Reviewed-by: Arun R Murthy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231116131841.1588781-7-imre.deak@intel.com commit c7ae0978f71222641059c20b2b025de0d8e989c7 Author: Imre Deak Date: Thu Nov 16 15:18:35 2023 +0200 drm/i915/dp: Account for channel coding efficiency on UHBR links Apply the correct BW allocation overhead and channel coding efficiency on UHBR link rates, similarly to DP1.4 link rates. Reviewed-by: Arun R Murthy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231116131841.1588781-6-imre.deak@intel.com commit 3c460872d2a3e6915a475e6c04cb30fcb2b87115 Author: Imre Deak Date: Thu Nov 16 15:18:34 2023 +0200 drm/i915/dp: Replace intel_dp_is_uhbr_rate() with drm_dp_is_uhbr_rate() Replace intel_dp_is_uhbr_rate() with the recently added drm_dp_is_uhbr_rate(). Reviewed-by: Arun R Murthy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231116131841.1588781-5-imre.deak@intel.com commit 94c80946ee27c9c56eb4ba3e6c024ba13ad06b9e Author: Imre Deak Date: Mon Nov 20 14:52:56 2023 +0200 drm/dp_mst: Add kunit tests for drm_dp_get_vc_payload_bw() Add kunit test cases for drm_dp_get_vc_payload_bw() with all the DP1.4 and UHBR link configurations. v2: - List test cases in decreasing rate,lane count order matching the corresponding DP Standard tables. (Ville) - Add references to the DP Standard tables. v3: - Sort the testcases properly. v4: - Avoid 'stack frame size x exceeds limit y in drm_test_dp_mst_calc_pbn_div()' compiler warn. (LKP) Cc: Ville Syrjälä Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Cc: kernel test robot Acked-by: Daniel Vetter Acked-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä (v3) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231120125256.2433782-1-imre.deak@intel.com commit d389989ed530b3d8944974b7ee866b089720bc9c Author: Imre Deak Date: Fri Nov 17 17:09:27 2023 +0200 drm/dp_mst: Fix PBN divider calculation for UHBR rates The current way of calculating the pbn_div value, the link BW per each MTP slot, worked only for DP 1.4 link rates. Fix things up for UHBR rates calculating with the correct channel coding efficiency based on the link rate. v2: - Return the fractional pbn_div value from drm_dp_get_vc_payload_bw(). v3: - Fix rounding up quotient while calculating req_slots. (Ville) Cc: Ville Syrjälä Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Reviewed-by: Ville Syrjälä Acked-by: Daniel Vetter Acked-by: Maarten Lankhorst Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231117150929.1767227-1-imre.deak@intel.com commit 191dc43935d1ece82bc6c9653463b3b1cd8198fb Author: Imre Deak Date: Thu Nov 16 15:18:31 2023 +0200 drm/dp_mst: Store the MST PBN divider value in fixed point format On UHBR links the PBN divider is a fractional number, accordingly store it in fixed point format. For now drm_dp_get_vc_payload_bw() always returns a whole number and all callers will use only the integer part of it which should preserve the current behavior. The next patch will fix drm_dp_get_vc_payload_bw() for UHBR rates returning a fractional number for those (also accounting for the channel coding efficiency correctly). Cc: Lyude Paul Cc: Harry Wentland Cc: Alex Deucher Cc: Wayne Lin Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Ville Syrjälä Acked-by: Daniel Vetter Acked-by: Maarten Lankhorst [Rebased changes in dm_helpers_construct_old_payload() on drm-intel-next] Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231116131841.1588781-2-imre.deak@intel.com commit cb21746b179c7c64faeb777a8d1d901f7d680a28 Author: Sakari Ailus Date: Tue Nov 21 09:08:26 2023 +0200 ACPI: scan: Fix an error message in DisCo for Imaging support The recently merged DisCo for Imaging support used a wrong printk specifier in printing a message. Fix it by using %zu instead of %lu. Also use "bits" instead of "bytes" as these are indeed bytes. Fixes: a6cb0a611273 ("ACPI: scan: Extract MIPI DisCo for Imaging data into swnodes") Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki commit 9c8647224e9fabb765019193aa43c054a638f808 Author: Rafael J. Wysocki Date: Tue Oct 17 22:12:33 2023 +0200 ACPI: thermal: Use library functions to obtain trip point temperature values Modify the ACPI thermal driver to use functions from the ACPI thermal library to obtain trip point temperature values instead of duplicating them locally. Among other things, this requires the functions in question to be exported to it, because it can be built as a module. It effectively changes the behavior of the driver to treat temperature values out of the reasonable range (-55 centigrade to 175 centigrade) as invalid, but there is no other expected functional impact. Signed-off-by: Rafael J. Wysocki commit 6908097aa5a7bd0c66c0b7ae9dd994b6ef62be8c Author: Rafael J. Wysocki Date: Tue Oct 17 22:06:52 2023 +0200 ACPI: thermal_lib: Add functions returning temperature in deci-Kelvin Because the ACPI thermal driver generally operates temperature values in deci-Kelvin, it needs the library functions returning temperature for various trip point types to use deci-Kelvin too. To address that, arrange the ACPI thermal library code in three levels of functions where the high-level ones will return temperature in milli-Celsius, as needed by the thermal core and the majority of thermal drivers, the mid-level ones will return temperature in deci-Kelvin and will be called internally by the corresponding high- level functions, and all of the mid-level functions will call the same low-level one, acpi_trip_temp(), to actually evaluate ACPI objects to retrieve themperature values from the platform firmware. Going forward, this will allow the ACPI thermal driver to use the mid-level functions to provide temperature values needed by it, so as to reduce code duplication related to evaluating trip temperature ACPI control methods. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit f47507988145185aef5d0e7a0e28dbf6e7776f29 Author: Rafael J. Wysocki Date: Tue Oct 17 22:05:23 2023 +0200 thermal: ACPI: Move the ACPI thermal library to drivers/acpi/ The ACPI thermal library contains functions that can be used to retrieve trip point temperature values through the platform firmware for various types of trip points. Each of these functions basically evaluates a specific ACPI object, checks if the value produced by it is reasonable and returns it (or THERMAL_TEMP_INVALID if anything fails). It made sense to hold it in drivers/thermal/ so long as it was only used by the code in that directory, but since it is also going to be used by the ACPI thermal driver located in drivers/acpi/, move it to the latter in order to keep the code related to evaluating ACPI objects defined in the specification proper together. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 9a7308232a118b3837800337381bb1cbae30ae1d Author: Ben Wolsieffer Date: Thu Nov 2 15:37:22 2023 -0400 ARM: dts: stm32: add SPI support on STM32F746 Add device tree nodes for the STM32F746 SPI controllers. Signed-off-by: Ben Wolsieffer Signed-off-by: Alexandre Torgue commit 86f15a5a6c13e1f01fd15975274f8e47458c185a Author: Ben Wolsieffer Date: Wed Nov 1 11:51:54 2023 -0400 ARM: dts: stm32: add STM32F746 syscfg clock The syscfg syscon was missing its clock, therefore any attempt to read/write it after clk_disable_unused() silently failed. This was preventing external pin interrupts from working if they were initialized after this point. Signed-off-by: Ben Wolsieffer Signed-off-by: Alexandre Torgue commit 646477fc47905157a8440cdc45aad22901b5b3ce Author: Nathan Lynch Date: Mon Nov 6 07:42:59 2023 -0600 powerpc/rtas: Remove 'extern' from function declarations in rtas.h This header occasionally gains new function declarations without the leading extern in accordance with current style rules. Leaving the legacy externs in place is making the header more difficult to read over time because of the inconsistency. Remove them. Signed-off-by: Nathan Lynch [mpe: Add names to rtas_call() parameters] Signed-off-by: Michael Ellerman Link: https://msgid.link/20231106-rtas-trivial-v1-7-61847655c51f@linux.ibm.com commit 1e4d3001f59fb7a9917cb746544b65e616b5f809 Author: Peter Zijlstra Date: Mon Nov 20 15:33:46 2023 +0100 x86/entry: Harden return-to-user Make the CONFIG_DEBUG_ENTRY=y check that validates CS is a user segment unconditional and move it nearer to IRET. PRE: 140,026,608 cycles:k ( +- 0.01% ) 236,696,176 instructions:k # 1.69 insn per cycle ( +- 0.00% ) POST: 139,957,681 cycles:k ( +- 0.01% ) 236,681,819 instructions:k # 1.69 insn per cycle ( +- 0.00% ) (this is with --repeat 100 and the run-to-run variance is bigger than the difference shown) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20231120143626.753200755@infradead.org commit c516213726fb572700cce4a5909aa8d82b77192a Author: Peter Zijlstra Date: Mon Nov 20 15:33:45 2023 +0100 x86/entry: Optimize common_interrupt_return() The code in common_interrupt_return() does a bunch of unconditional work that is really only needed on PTI kernels. Specifically it unconditionally copies the IRET frame back onto the entry stack, swizzles onto the entry stack and does IRET from there. However, without PTI we can simply IRET from whatever stack we're on. ivb-ep, mitigations=off, gettid-1m: PRE: 140,118,538 cycles:k ( +- 0.01% ) 236,692,878 instructions:k # 1.69 insn per cycle ( +- 0.00% ) POST: 140,026,608 cycles:k ( +- 0.01% ) 236,696,176 instructions:k # 1.69 insn per cycle ( +- 0.00% ) (this is with --repeat 100 and the run-to-run variance is bigger than the difference shown) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Linus Torvalds Link: https://lore.kernel.org/r/20231120143626.638107480@infradead.org commit 4137f324cb29a689e8519d8f7f52d3443bac934b Author: Michael Walle Date: Tue Nov 21 13:21:34 2023 +0100 MAINTAINERS: spi-nor: add myself as maintainer After being a reviewer for a while, add myself as a maintainer for the spi-nor subsystem. Signed-off-by: Michael Walle Acked-by: Richard Weinberger Acked-by: Miquel Raynal Link: https://lore.kernel.org/r/20231121122134.1952738-1-michael@walle.cc Signed-off-by: Tudor Ambarus commit 335662889f5a5f4d5668ed6c8b5fd58913d91d15 Author: Russell King (Oracle) Date: Sun Nov 19 21:07:43 2023 +0000 net: phylink: use for_each_set_bit() Use for_each_set_bit() rather than open coding the for() test_bit() loop. Reviewed-by: Andrew Lunn Signed-off-by: Russell King (Oracle) Reviewed-by: Wojciech Drewek Link: https://lore.kernel.org/r/E1r4p15-00Cpxe-C7@rmk-PC.armlinux.org.uk Signed-off-by: Paolo Abeni commit 79a4f4dfa69a8379ab34675be976c2f866c77403 Author: Baruch Siach Date: Sun Nov 19 07:39:41 2023 +0200 net: stmmac: reduce dma ring display code duplication The code to show extended descriptor is identical to normal one. Consolidate the code to remove duplication. Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/a2a5c5ce9338bdea60ec71d7eeb00fe757281557.1700372381.git.baruch@tkos.co.il Signed-off-by: Paolo Abeni commit 7911deba293da98353569c9d19464a440b418ad0 Author: Baruch Siach Date: Sun Nov 19 07:39:40 2023 +0200 net: stmmac: remove extra newline from descriptors display One newline per line should be enough. Reduce the verbosity of descriptors dump. Reviewed-by: Serge Semin Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/444f3b1dd409fdb14ed2a1ae7679a86b110dadcd.1700372381.git.baruch@tkos.co.il Signed-off-by: Paolo Abeni commit 60e5f23dc5d68ec01e6dae8f4311230c7d2ccb8a Author: Junhao He Date: Tue Nov 14 21:33:46 2023 +0800 coresight: ultrasoc-smb: Use guards to cleanup Use guards to reduce gotos and simplify control flow. Signed-off-by: Junhao He Reviewed-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231114133346.30489-5-hejunhao3@huawei.com commit d6b83f1e3707c4d60acfa58afd3515e17e5d5384 Author: Zhengchao Shao Date: Sat Nov 18 16:16:53 2023 +0800 bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk If failed to allocate "tags" or could not find the final upper device from start_dev's upper list in bond_verify_device_path(), only the loopback detection of the current upper device should be affected, and the system is no need to be panic. So return -ENOMEM in alb_upper_dev_walk to stop walking, print some warn information when failed to allocate memory for vlan tags in bond_verify_device_path. I also think that the following function calls netdev_walk_all_upper_dev_rcu ---->>>alb_upper_dev_walk ---------->>>bond_verify_device_path From this way, "end device" can eventually be obtained from "start device" in bond_verify_device_path, IS_ERR(tags) could be instead of IS_ERR_OR_NULL(tags) in alb_upper_dev_walk. Signed-off-by: Zhengchao Shao Acked-by: Jay Vosburgh Link: https://lore.kernel.org/r/20231118081653.1481260-1-shaozhengchao@huawei.com Signed-off-by: Paolo Abeni commit 600f111ef51dc2cbdb330b09d09f1856efa64912 Author: Matthew Wilcox (Oracle) Date: Fri Nov 17 21:58:23 2023 +0000 fs: Rename mapping private members It is hard to find where mapping->private_lock, mapping->private_list and mapping->private_data are used, due to private_XXX being a relatively common name for variables and structure members in the kernel. To fit with other members of struct address_space, rename them all to have an i_ prefix. Tested with an allmodconfig build. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20231117215823.2821906-1-willy@infradead.org Acked-by: Darrick J. Wong Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner commit a4dea9a06f72c7885f8d4dccedec7e477878d798 Author: Jani Nikula Date: Tue Nov 14 17:14:06 2023 +0200 drm/edid/firmware: drop drm_kms_helper.edid_firmware backward compat Since the edid_firmware module parameter was moved from drm_kms_helper.ko to drm.ko in v4.15, we've had a backwards compatibility helper in place, with a DRM_NOTE() suggesting to migrate to drm.edid_firmware. This was added in commit ac6c35a4d8c7 ("drm: add backwards compatibility support for drm_kms_helper.edid_firmware"). More than five years and 30+ kernel releases later, drop the backward compatibility. v2: Drop the warnings too Acked-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231114151406.61230-1-jani.nikula@intel.com commit 0807dc76f3bf500f9a22465eedd2290da7357efb Author: Shinas Rasheed Date: Fri Nov 17 02:38:10 2023 -0800 octeon_ep: support Octeon CN10K devices Add PCI Endpoint NIC support for Octeon CN10K devices. CN10K devices are part of Octeon 10 family products with similar PCI NIC characteristics. These include: - CN10KA - CNF10KA - CNF10KB - CN10KB Update supported device list in Documentation Signed-off-by: Shinas Rasheed Link: https://lore.kernel.org/r/20231117103817.2468176-1-srasheed@marvell.com Signed-off-by: Paolo Abeni commit 38360bf96d816e175bc602c4ee76953cd303b71d Author: Tomi Valkeinen Date: Tue Sep 19 10:12:50 2023 +0300 drm/tilcdc: Fix irq free on unload The driver only frees the reserved irq if priv->irq_enabled is set to true. However, the driver mistakenly sets priv->irq_enabled to false, instead of true, in tilcdc_irq_install(), and thus the driver never frees the irq, causing issues on loading the driver a second time. Fixes: b6366814fa77 ("drm/tilcdc: Convert to Linux IRQ interfaces") Cc: Thomas Zimmermann Reviewed-by: Aradhya Bhatia Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230919-lcdc-v1-1-ba60da7421e1@ideasonboard.com commit 0d6c918011ce4764ed277de4726a468b7ffe5fed Author: Ashish Mhetre Date: Tue Nov 7 16:57:13 2023 +0530 memory: tegra: Skip SID programming if SID registers aren't set There are few MC clients where SID security and override register offsets are not specified like "sw_cluster0" in tegra234. Don't program SID override for such clients because it leads to access to invalid addresses. Signed-off-by: Ashish Mhetre Link: https://lore.kernel.org/r/20231107112713.21399-2-amhetre@nvidia.com Signed-off-by: Krzysztof Kozlowski commit fe3b082a6eb8b1526ed7397c849d6b2a6baeb6a1 Author: Ashish Mhetre Date: Tue Nov 7 16:57:12 2023 +0530 memory: tegra: Add SID override programming for MC clients For some devices the bootloader/firmware may set up the device in bypass. Memory clients like display needs kernel to program SID after resume because bootloader/firmware programs the SID of display device to bypass. In order to make sure that kernel IOMMU mappings for these devices work after resume, add SID override programming support for all memory clients on memory controller resume. This partially reverts 'commit ef86b2c2807f ("memory: tegra: Remove clients SID override programming")' Signed-off-by: Ashish Mhetre Link: https://lore.kernel.org/r/20231107112713.21399-1-amhetre@nvidia.com Signed-off-by: Krzysztof Kozlowski commit 2682468671aa0b4d52ae09779b48212a80d71b91 Author: Hamish Martin Date: Wed Oct 25 16:55:14 2023 +1300 HID: mcp2221: Handle reads greater than 60 bytes When a user requests more than 60 bytes of data the MCP2221 must chunk the data in chunks up to 60 bytes long (see command/response code 0x40 in the datasheet). In order to signal that the device has more data the (undocumented) byte at byte index 2 of the Get I2C Data response uses the value 0x54. This contrasts with the case for the final data chunk where the value returned is 0x55 (MCP2221_I2C_READ_COMPL). The fact that 0x55 was not returned in the response was interpreted by the driver as a failure meaning that all reads of more than 60 bytes would fail. Add support for reads that are split over multiple chunks by looking for the response code indicating that more data is expected and continuing the read as the code intended. Some timing delays are required to ensure the chip has time to refill its FIFO as data is read in from the I2C bus. This timing has been tested in my system when configured for bus speeds of 50KHz, 100KHz, and 400KHz and operates well. Signed-off-by: Hamish Martin Signed-off-by: Jiri Kosina commit 02a46753601a24e1673d9c28173121055e8e6cc9 Author: Hamish Martin Date: Wed Oct 25 16:55:13 2023 +1300 HID: mcp2221: Don't set bus speed on every transfer Since the initial commit of this driver the I2C bus speed has been reconfigured for every single transfer. This is despite the fact that we never change the speed and it is never "lost" by the chip. Upon investigation we find that what was really happening was that the setting of the bus speed had the side effect of cancelling a previous failed command if there was one, thereby freeing the bus. This is the part that was actually required to keep the bus operational in the face of failed commands. Instead of always setting the speed, we now correctly cancel any failed commands as they are detected. This means we can just set the bus speed at probe time and remove the previous speed sets on each transfer. This has the effect of improving performance and reducing the number of commands required to complete transfers. Signed-off-by: Hamish Martin Signed-off-by: Jiri Kosina commit d9786159d229cdc1f579f7cf3abf464efb453e40 Author: Hamish Martin Date: Wed Oct 25 16:55:12 2023 +1300 HID: mcp2221: Set ACPI companion In scenarios where an I2C device tree is defined in ACPI and exists off the MCP2221 I2C bus, the devices could not be instantiated. Mark the USB port that the MCP2221 is connected to as its ACPI companion so that the USB device can be bound to the ACPI tree when enumerated. With this change the downstream I2C tree devices can be instantiated on ACPI systems. Signed-off-by: Hamish Martin Signed-off-by: Jiri Kosina commit 740329d7120f8608ead64b0f3417c02ca1d6b32f Author: Johannes Roith Date: Thu Sep 21 18:49:28 2023 +0200 HID: mcp2200: added driver for GPIOs of MCP2200 Added a gpiochip compatible driver to control the 8 GPIOs of the MCP2200 by using the HID interface. Using GPIOs with alternative functions (GP0<->SSPND, GP1<->USBCFG, GP6<->RXLED, GP7<->TXLED) will reset the functions, if set (unset by default). The driver was tested while also using the UART of the chip. Setting and reading the GPIOs has no effect on the UART communication. However, a reset is triggered after the CONFIGURE command. If the GPIO Direction is constantly changed, this will affect the communication at low baud rates. This is a hardware problem of the MCP2200 and is not caused by the driver. Signed-off-by: Johannes Roith Reviewed-by: Rahul Rameshbabu Signed-off-by: Jiri Kosina commit 16b01df3c5db447e05cff60c2f612d76c0cd7baf Author: Uwe Kleine-König Date: Thu Nov 2 17:56:56 2023 +0100 drm/sprd: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert the sprd drm drivers from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann Reviewed-by: Jyri Sarha Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-33-u.kleine-koenig@pengutronix.de commit 0fa2db3bc7498d7b88e6742571cb832f749d625f Author: Uwe Kleine-König Date: Thu Nov 2 17:56:55 2023 +0100 drm/nouveau: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann Reviewed-by: Jyri Sarha Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-32-u.kleine-koenig@pengutronix.de commit ac96555768099bf3e87b59abe9f156bb6fffbbd4 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:54 2023 +0100 drm/meson: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-31-u.kleine-koenig@pengutronix.de commit 30b749adb13db8e672d1a53266876732b8a2edb8 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:53 2023 +0100 drm/mediatek: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-30-u.kleine-koenig@pengutronix.de commit 8c67c9a4e4582c30408308cfdfd8719180075f9a Author: Uwe Kleine-König Date: Thu Nov 2 17:56:52 2023 +0100 drm/kmb: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann Reviewed-by: Jyri Sarha Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-29-u.kleine-koenig@pengutronix.de commit a7e43c0a1a70e0d71fdda5d315927e1b3bc7e8d4 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:51 2023 +0100 drm/imx: lcdc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-28-u.kleine-koenig@pengutronix.de commit 60096f0a77600ac2cc92b82fee279d1905576950 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:50 2023 +0100 drm/imx/dcss: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann Reviewed-by: Jyri Sarha Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-27-u.kleine-koenig@pengutronix.de commit d437dab5b06e3dc73f6a58a6c9fd0b13d1ed80e1 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:48 2023 +0100 drm/etnaviv: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert the etnaviv drm driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann Reviewed-by: Jyri Sarha Signed-off-by: Uwe Kleine-König Reviewed-by: Christian Gmeiner Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-25-u.kleine-koenig@pengutronix.de commit 3cdbe59868ef5228b561bb30bde13cc1021ee8a0 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:47 2023 +0100 drm/bridge: tpd12s015: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-24-u.kleine-koenig@pengutronix.de commit 3438cf177ae51f11255d36a94b17939b06ce1717 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:46 2023 +0100 drm/bridge: cdns-mhdp8546: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-23-u.kleine-koenig@pengutronix.de commit be79252e7c83885bd0043168954b8400a42153ed Author: Uwe Kleine-König Date: Thu Nov 2 17:56:45 2023 +0100 drm/bridge: cdns-mhdp8546: Improve error reporting in remove callback Replace the generic error message issued by the driver core when the remove callback returns non-zero ("remove callback returned a non-zero value. This will be ignored.") by a message that tells the actual problem. Also simplify a bit by checking the return value of wait_event_timeout a bit later. Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-22-u.kleine-koenig@pengutronix.de commit b47914741a80f59483cba0b59c43a92c01bc4b2f Author: Uwe Kleine-König Date: Thu Nov 2 17:56:44 2023 +0100 drm/armada: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert the armada drm drivers from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann Reviewed-by: Jyri Sarha Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-21-u.kleine-koenig@pengutronix.de commit da20c383de2aa6bfa4c36ed4311e16051aaeab43 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:43 2023 +0100 drm/arcpgu: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: Thomas Zimmermann Reviewed-by: Jyri Sarha Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-20-u.kleine-koenig@pengutronix.de commit ce3e112e7ae854249d8755906acc5f27e1542114 Author: Uwe Kleine-König Date: Thu Nov 2 17:56:42 2023 +0100 drm/bridge: tpd12s015: Drop buggy __exit annotation for remove function With tpd12s015_remove() marked with __exit this function is discarded when the driver is compiled as a built-in. The result is that when the driver unbinds there is no cleanup done which results in resource leakage or worse. Fixes: cff5e6f7e83f ("drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter") Signed-off-by: Uwe Kleine-König Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20231102165640.3307820-19-u.kleine-koenig@pengutronix.de commit 6c15808d9b7640c3209d53cd2d8d56cfbf9f7175 Author: Rob Clark Date: Tue Oct 24 10:08:05 2023 -0700 drm/msm/gem: Demote allocations to __GFP_NOWARN For allocations with userspace controlled size, we should not warn on allocation failure. Fixes KASAN splat: WARNING: CPU: 6 PID: 29557 at mm/page_alloc.c:5398 __alloc_pages+0x160c/0x2204 Modules linked in: bridge stp llc hci_vhci tun veth xt_cgroup uinput xt_MASQUERADE rfcomm ip6table_nat fuse 8021q r8153_ecm cdc_ether usbnet r8152 mii venus_enc venus_dec uvcvideo algif_hash algif_skcipher af_alg qcom_spmi_adc_tm5 qcom_spmi_adc5 qcom_vadc_common qcom_spmi_temp_alarm cros_ec_typec typec hci_uart btqca qcom_stats snd_soc_sc7180 venus_core ath10k_snoc ath10k_core ath coresight_tmc coresight_replicator coresight_etm4x coresight_funnel snd_soc_lpass_sc7180 mac80211 coresight bluetooth ecdh_generic ecc cfg80211 cros_ec_sensorhub lzo_rle lzo_compress zram joydev CPU: 6 PID: 29557 Comm: syz-executor Not tainted 5.15.110-lockdep-19320-g89d010b0a9df #1 45bdd400697a78353f2927c116615abba810e5dd Hardware name: Google Kingoftown (DT) pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __alloc_pages+0x160c/0x2204 lr : __alloc_pages+0x58/0x2204 sp : ffffffc0214176c0 x29: ffffffc0214178a0 x28: ffffff801f7b4000 x27: 0000000000000000 x26: ffffff808a4fa000 x25: 1ffffff011290781 x24: ffffff808a59c000 x23: 0000000000000010 x22: ffffffc0080e6980 x21: 0000000000000010 x20: 0000000000000000 x19: 00000000080001f8 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000020000500 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000001 x11: 0000000000000000 x10: 1ffffff804282f06 x9 : 0000000000000000 x8 : ffffffc021417848 x7 : 0000000000000000 x6 : ffffffc0082ac788 x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000010 x2 : 0000000000000008 x1 : 0000000000000000 x0 : ffffffc021417830 Call trace: __alloc_pages+0x160c/0x2204 kmalloc_order+0x50/0xf4 kmalloc_order_trace+0x38/0x18c __kmalloc+0x300/0x45c msm_ioctl_gem_submit+0x284/0x5988 drm_ioctl_kernel+0x270/0x418 drm_ioctl+0x5e0/0xbf8 __arm64_sys_ioctl+0x154/0x1d0 invoke_syscall+0x98/0x278 el0_svc_common+0x214/0x274 do_el0_svc+0x9c/0x19c el0_svc+0x5c/0xc0 el0t_64_sync_handler+0x78/0x108 el0t_64_sync+0x1a4/0x1a8 Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/564191/ commit b2acb89af1a400be721bcb14f137aa22b509caba Author: Rob Clark Date: Tue Oct 24 10:08:04 2023 -0700 drm/msm/gem: Demote userspace errors to DRM_UT_DRIVER Error messages resulting from incorrect usage of the kernel uabi should not spam dmesg by default. But it is useful to enable them to debug userspace. So demote to DRM_UT_DRIVER. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/564189/ commit 9902cb999e4e913d98e8afe4b36c08e4a793e1ce Author: Rob Clark Date: Mon Nov 6 10:50:26 2023 -0800 drm/msm/gem: Add metadata The EXT_external_objects extension is a bit awkward as it doesn't pass explicit modifiers, leaving the importer to guess with incomplete information. In the case of vk (turnip) exporting and gl (freedreno) importing, the "OPTIMAL_TILING_EXT" layout depends on VkImageCreateInfo flags (among other things), which the importer does not know. Which unfortunately leaves us with the need for a metadata back-channel. The contents of the metadata are defined by userspace. The EXT_external_objects extension is only required to work between compatible versions of gl and vk drivers, as defined by device and driver UUIDs. v2: add missing metadata kfree v3: Rework to move copy_from/to_user out from under gem obj lock to avoid angering lockdep about deadlocks against fs-reclaim Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/566157/ commit d1912f6972b857e63577e8094f5f1242d9fe3c7d Author: Rob Clark Date: Mon Nov 6 10:50:25 2023 -0800 drm/msm: Small uabi fixes Correct the minor version exposed and error return value for MSM_INFO_GET_NAME. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/566155/ commit f6afe4f09f6605b725b39670b3568ab2927c9b43 Author: Dmitry Baryshkov Date: Tue Oct 10 08:54:25 2023 +0300 drm/msm: don't create GPU-related debugfs files with no GPU present If there is no GPU present, skip creation of the GPU-related debugfs files, making the MSM's debugfs more usable. Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/561742/ Signed-off-by: Rob Clark commit 31c54867fdea452023cc5faba939a6afec1b9d7e Author: Lorenzo Bianconi Date: Fri Nov 17 17:42:59 2023 +0100 net: ethernet: mtk_wed: add support for devices with more than 4GB of dram Introduce WED offloading support for boards with more than 4GB of memory. Co-developed-by: Sujuan Chen Signed-off-by: Sujuan Chen Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/1c7efdf5d384ea7af3c0209723e40b2ee0f956bf.1700239272.git.lorenzo@kernel.org Signed-off-by: Jakub Kicinski commit 4da325cc6143f499b809bd4363d65d67b79b6c27 Merge: b1711d4310c24 4968afa0143db Author: Jakub Kicinski Date: Mon Nov 20 18:06:38 2023 -0800 Merge branch 'selftests-tc-testing-more-updates-to-tdc' Pedro Tammela says: ==================== selftests: tc-testing: more updates to tdc Address the issues making tdc timeout on downstream CIs like lkp and tuxsuite. ==================== Link: https://lore.kernel.org/r/20231117171208.2066136-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 4968afa0143dbff8a84b5ce3c302dd7d0bdcfa48 Author: Pedro Tammela Date: Fri Nov 17 14:12:08 2023 -0300 selftests: tc-testing: report number of workers in use Report the number of workers in use to process the test batches. Since the number is now subject to a limit, avoid users getting confused. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231117171208.2066136-7-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 4b480cfb1066a8394017697ff4a58a970641e9b7 Author: Pedro Tammela Date: Fri Nov 17 14:12:07 2023 -0300 selftests: tc-testing: timeout on unbounded loops In the spirit of failing early, timeout on unbounded loops that take longer than 20 ticks to complete. Such loops are to ensure that objects created are already visible so tests can proceed without any issues. If a test setup takes more than 20 ticks to see an object, there's definetely something wrong. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231117171208.2066136-6-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 3f2d94a4ff489ebbc6b66cc33f9775cb33c00533 Author: Pedro Tammela Date: Fri Nov 17 14:12:06 2023 -0300 selftests: tc-testing: leverage -all in suite ns teardown Instead of listing lingering ns pinned files and delete them one by one, leverage '-all' from iproute2 to do it in a single process fork. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231117171208.2066136-5-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 3d5026fc5adbc796a0547fcef19d997786e0bb31 Author: Pedro Tammela Date: Fri Nov 17 14:12:05 2023 -0300 selftests: tc-testing: use netns delete from pyroute2 When pyroute2 is available, use the native netns delete routine instead of calling iproute2 to do it. As forks are expensive with some kernel configs, minimize its usage to avoid kselftests timeouts. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231117171208.2066136-4-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 50a5988a7a540fb1ad4e620e1bbf11cc646e3dc7 Author: Pedro Tammela Date: Fri Nov 17 14:12:04 2023 -0300 selftests: tc-testing: move back to per test ns setup Surprisingly in kernel configs with most of the debug knobs turned on, pre-allocating the test resources makes tdc run much slower overall than when allocating resources on a per test basis. As these knobs are used in kselftests in downstream CIs, let's go back to the old way of doing things to avoid kselftests timeouts. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202311161129.3b45ed53-oliver.sang@intel.com Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231117171208.2066136-3-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 025de7b6a6dd44e78d0d45b4f3b4f104ed54b0fd Author: Pedro Tammela Date: Fri Nov 17 14:12:03 2023 -0300 selftests: tc-testing: cap parallel tdc to 4 cores We have observed a lot of lock contention and test instability when running with >8 cores. Enough to actually make the tests run slower than with fewer cores. Cap the maximum cores of parallel tdc to 4 which showed in testing to be a reasonable number for efficiency and stability in different kernel config scenarios. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231117171208.2066136-2-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit b1711d4310c24f6f668e2282e827434f9473c8bd Merge: 21612f52e4291 c38fb3dcd53db Author: Jakub Kicinski Date: Mon Nov 20 18:04:32 2023 -0800 Merge branch 'nfp-add-flow-steering-support' Louis Peens says: ==================== nfp: add flow-steering support This short series adds flow steering support for the nfp driver. The first patch adds the part to communicate with ethtool but stubs out the HW offload parts. The second patch implements the HW communication and offloads flow steering. After this series the user can now use 'ethtool -N/-n' to configure and display rx classification rules. ==================== Link: https://lore.kernel.org/r/20231117071114.10667-1-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit c38fb3dcd53dbfc68eb429e8ecb0ec795f0d6ba1 Author: Yinjun Zhang Date: Fri Nov 17 09:11:14 2023 +0200 nfp: offload flow steering to the nfp This is the second part to implement flow steering. Mailbox is used for the communication between driver and HW. Signed-off-by: Yinjun Zhang Signed-off-by: Louis Peens Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20231117071114.10667-3-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit 9eb03bb1c035ff6e2c3a34046419446588253dda Author: Yinjun Zhang Date: Fri Nov 17 09:11:13 2023 +0200 nfp: add ethtool flow steering callbacks This is the first part to implement flow steering. The communication between ethtool and driver is done. User can use following commands to display and set flows: ethtool -n ethtool -N flow-type ... Signed-off-by: Yinjun Zhang Signed-off-by: Louis Peens Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20231117071114.10667-2-louis.peens@corigine.com Signed-off-by: Jakub Kicinski commit 21612f52e429174394219a028ff20523117f53bc Merge: a0bc96c0cd6e6 6a91b846af85a Author: Jakub Kicinski Date: Mon Nov 20 17:52:24 2023 -0800 Merge branch 'net-axienet-introduce-dmaengine' Radhey Shyam Pandey says: ==================== net: axienet: Introduce dmaengine The axiethernet driver can use the dmaengine framework to communicate with the xilinx DMAengine driver(AXIDMA, MCDMA). The inspiration behind this dmaengine adoption is to reuse the in-kernel xilinx dma engine driver[1] and remove redundant dma programming sequence[2] from the ethernet driver. This simplifies the ethernet driver and also makes it generic to be hooked to any complaint dma IP i.e AXIDMA, MCDMA without any modification. The dmaengine framework was extended for metadata API support during the axidma RFC[3] discussion. However, it still needs further enhancements to make it well suited for ethernet usecases. Comments, suggestions, thoughts to implement remaining functional features are very welcome! [1]: https://github.com/torvalds/linux/blob/master/drivers/dma/xilinx/xilinx_dma.c [2]: https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/xilinx/xilinx_axienet_main.c#L238 [3]: http://lkml.iu.edu/hypermail/linux/kernel/1804.0/00367.html [4]: https://lore.kernel.org/all/20221124102745.2620370-1-sarath.babu.naidu.gaddam@amd.com ==================== Link: https://lore.kernel.org/r/1700074613-1977070-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Jakub Kicinski commit 6a91b846af85a24241decd686269e8e038eb13d1 Author: Radhey Shyam Pandey Date: Thu Nov 16 00:26:53 2023 +0530 net: axienet: Introduce dmaengine support Add dmaengine framework to communicate with the xilinx DMAengine driver(AXIDMA). Axi ethernet driver uses separate channels for transmit and receive. Add support for these channels to handle TX and RX with skb and appropriate callbacks. Also add axi ethernet core interrupt for dmaengine framework support. The dmaengine framework was extended for metadata API support. However it still needs further enhancements to make it well suited for ethernet usecases. The ethernet features i.e ethtool set/get of DMA IP properties, ndo_poll_controller,(mentioned in TODO) are not supported and it requires follow-up discussions. dmaengine support has a dependency on xilinx_dma as it uses xilinx_vdma_channel_set_config() API to reset the DMA IP which internally reset MAC prior to accessing MDIO. Benchmark with netperf: xilinx-zcu102-20232:~$ netperf -H 192.168.10.20 -t TCP_STREAM MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.10.20 () port 0 AF_INET Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 131072 16384 16384 10.02 886.69 xilinx-zcu102-20232:~$ netperf -H 192.168.10.20 -t UDP_STREAM MIGRATED UDP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.10.20 () port 0 AF_INET Socket Message Elapsed Messages Size Size Time Okay Errors Throughput bytes bytes secs # # 10^6bits/sec 212992 65507 10.00 15851 0 830.66 212992 10.00 15851 830.66 Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1700074613-1977070-4-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Jakub Kicinski commit 6b1b40f704fc39db70098a1908ab2309b29831b6 Author: Sarath Babu Naidu Gaddam Date: Thu Nov 16 00:26:52 2023 +0530 net: axienet: Preparatory changes for dmaengine support The axiethernet driver has inbuilt dma programming. In order to add dmaengine support and make it's integration seamless the current axidma inbuilt programming code is put under use_dmaengine check. It also performs minor code reordering to minimize conditional use_dmaengine checks and there is no functional change. It uses "dmas" property to identify whether it should use a dmaengine framework or inbuilt axidma programming. Signed-off-by: Sarath Babu Naidu Gaddam Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1700074613-1977070-3-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Jakub Kicinski commit 5e63c5ef7a99d4cc13ddb4964bdeaff45c0364a0 Author: Radhey Shyam Pandey Date: Thu Nov 16 00:26:51 2023 +0530 dt-bindings: net: xlnx,axi-ethernet: Introduce DMA support Xilinx 1G/2.5G Ethernet Subsystem provides 32-bit AXI4-Stream buses to move transmit and receive Ethernet data to and from the subsystem. These buses are designed to be used with an AXI Direct Memory Access(DMA) IP or AXI Multichannel Direct Memory Access (MCDMA) IP core, AXI4-Stream Data FIFO, or any other custom logic in any supported device. Primary high-speed DMA data movement between system memory and stream target is through the AXI4 Read Master to AXI4 memory-mapped to stream (MM2S) Master, and AXI stream to memory-mapped (S2MM) Slave to AXI4 Write Master. AXI DMA/MCDMA enables channel of data movement on both MM2S and S2MM paths in scatter/gather mode. AXI DMA has two channels where as MCDMA has 16 Tx and 16 Rx channels. To uniquely identify each channel use 'chan' suffix. Depending on the usecase AXI ethernet driver can request any combination of multichannel DMA channels using generic dmas, dma-names properties. Example: dma-names = tx_chan0, rx_chan0, tx_chan1, rx_chan1; Signed-off-by: Radhey Shyam Pandey Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1700074613-1977070-2-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Jakub Kicinski commit a0bc96c0cd6e61fcaebff34432791a4b5118fc68 Author: Willem de Bruijn Date: Thu Nov 16 15:34:43 2023 -0500 selftests: net: verify fq per-band packet limit Commit 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling") introduces multiple traffic bands, and per-band maximum packet count. Per-band limits ensures that packets in one class cannot fill the entire qdisc and so cause DoS to the traffic in the other classes. Verify this behavior: 1. set the limit to 10 per band 2. send 20 pkts on band A: verify that 10 are queued, 10 dropped 3. send 20 pkts on band A: verify that 0 are queued, 20 dropped 4. send 20 pkts on band B: verify that 10 are queued, 10 dropped Packets must remain queued for a period to trigger this behavior. Use SO_TXTIME to store packets for 100 msec. The test reuses existing upstream test infra. The script is a fork of cmsg_time.sh. The scripts call cmsg_sender. The test extends cmsg_sender with two arguments: * '-P' SO_PRIORITY There is a subtle difference between IPv4 and IPv6 stack behavior: PF_INET/IP_TOS sets IP header bits and sk_priority PF_INET6/IPV6_TCLASS sets IP header bits BUT NOT sk_priority * '-n' num pkts Send multiple packets in quick succession. I first attempted a for loop in the script, but this is too slow in virtualized environments, causing flakiness as the 100ms timeout is reached and packets are dequeued. Also do not wait for timestamps to be queued unless timestamps are requested. Signed-off-by: Willem de Bruijn Reviewed-by: Simon Horman Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20231116203449.2627525-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski commit 45933b2db91b9ee7c812b03f455316a1a61f7985 Author: Vishvambar Panth S Date: Thu Nov 16 11:13:50 2023 +0530 net: microchip: lan743x : bidirectional throughput improvement The LAN743x/PCI11xxx DMA descriptors are always 4 dwords long, but the device supports placing the descriptors in memory back to back or reserving space in between them using its DMA_DESCRIPTOR_SPACE (DSPACE) configurable hardware setting. Currently DSPACE is unnecessarily set to match the host's L1 cache line size, resulting in space reserved in between descriptors in most platforms and causing a suboptimal behavior (single PCIe Mem transaction per descriptor). By changing the setting to DSPACE=16 many descriptors can be packed in a single PCIe Mem transaction resulting in a massive performance improvement in bidirectional tests without any negative effects. Tested and verified improvements on x64 PC and several ARM platforms (typical data below) Test setup 1: x64 PC with LAN7430 ---> x64 PC iperf3 UDP bidirectional with DSPACE set to L1 CACHE Size: - - - - - - - - - - - - - - - - - - - - - - - - - [ ID][Role] Interval Transfer Bitrate [ 5][TX-C] 0.00-10.00 sec 170 MBytes 143 Mbits/sec sender [ 5][TX-C] 0.00-10.04 sec 169 MBytes 141 Mbits/sec receiver [ 7][RX-C] 0.00-10.00 sec 1.02 GBytes 876 Mbits/sec sender [ 7][RX-C] 0.00-10.04 sec 1.02 GBytes 870 Mbits/sec receiver iperf3 UDP bidirectional with DSPACE set to 16 Bytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID][Role] Interval Transfer Bitrate [ 5][TX-C] 0.00-10.00 sec 1.11 GBytes 956 Mbits/sec sender [ 5][TX-C] 0.00-10.04 sec 1.11 GBytes 951 Mbits/sec receiver [ 7][RX-C] 0.00-10.00 sec 1.10 GBytes 948 Mbits/sec sender [ 7][RX-C] 0.00-10.04 sec 1.10 GBytes 942 Mbits/sec receiver Test setup 2 : RK3399 with LAN7430 ---> x64 PC RK3399 Spec: The SOM-RK3399 is ARM module designed and developed by FriendlyElec. Cores: 64-bit Dual Core Cortex-A72 + Quad Core Cortex-A53 Frequency: Cortex-A72(up to 2.0GHz), Cortex-A53(up to 1.5GHz) PCIe: PCIe x4, compatible with PCIe 2.1, Dual operation mode iperf3 UDP bidirectional with DSPACE set to L1 CACHE Size: - - - - - - - - - - - - - - - - - - - - - - - - - [ ID][Role] Interval Transfer Bitrate [ 5][TX-C] 0.00-10.00 sec 534 MBytes 448 Mbits/sec sender [ 5][TX-C] 0.00-10.05 sec 534 MBytes 446 Mbits/sec receiver [ 7][RX-C] 0.00-10.00 sec 1.12 GBytes 961 Mbits/sec sender [ 7][RX-C] 0.00-10.05 sec 1.11 GBytes 946 Mbits/sec receiver iperf3 UDP bidirectional with DSPACE set to 16 Bytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID][Role] Interval Transfer Bitrate [ 5][TX-C] 0.00-10.00 sec 966 MBytes 810 Mbits/sec sender [ 5][TX-C] 0.00-10.04 sec 965 MBytes 806 Mbits/sec receiver [ 7][RX-C] 0.00-10.00 sec 1.11 GBytes 956 Mbits/sec sender [ 7][RX-C] 0.00-10.04 sec 1.07 GBytes 919 Mbits/sec receiver Signed-off-by: Vishvambar Panth S Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Reviewed-by: Jacob Keller Link: https://lore.kernel.org/r/20231116054350.620420-1-vishvambarpanth.s@microchip.com Signed-off-by: Jakub Kicinski commit 1712ed62153125e62d4d1e0ca68d35387e6a6993 Author: Jacob Satterfield Date: Fri Nov 3 17:29:51 2023 +0000 selinux: refactor avtab_node comparisons In four separate functions within avtab, the same comparison logic is used. The only difference is how the result is handled or whether there is a unique specifier value to be checked for or used. Extracting this functionality into the avtab_node_cmp() function unifies the comparison logic between searching and insertion and gets rid of duplicative code so that the implementation is easier to maintain. Signed-off-by: Jacob Satterfield Reviewed-by: Stephen Smalley Signed-off-by: Paul Moore commit 12578c075f89d6bd1b8af21751fbc2e1f78d2ce0 Author: Rob Clark Date: Fri Nov 17 07:24:28 2023 -0800 drm/msm/gpu: Skip retired submits in recover worker If we somehow raced with submit retiring, either while waiting for worker to have a chance to run or acquiring the gpu lock, then the recover worker should just bail. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/568034/ commit 4bea53b9c7c72fd12a0ceebe88a71723c0a514b8 Author: Rob Clark Date: Fri Nov 17 07:14:19 2023 -0800 drm/msm: Reduce fallout of fence signaling vs reclaim hangs Until various PM devfreq/QoS and interconnect patches land, we could potentially trigger reclaim from gpu scheduler thread, and under enough memory pressure that could trigger a sort of deadlock. Eventually the wait will timeout and we'll move on to consider other GEM objects. But given that there is still a potential for deadlock/stalling, we should reduce the timeout to contain the damage. Signed-off-by: Rob Clark Patchwork: https://patchwork.freedesktop.org/patch/568031/ commit 548b61a8ce18dec8757fcc112eac5bd125161408 Author: Rob Clark Date: Wed Nov 15 14:44:09 2023 -0800 drm/msm/gpu: Move gpu devcore's to gpu device The dpu devcore's are already associated with the dpu device. So we should associate the gpu devcore's with the gpu device, for easier classification. Signed-off-by: Rob Clark Reviewed-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/567738/ commit 5f35a624c1e30b5bae5023b3c256e94e0ad4f806 Author: Abhinav Singh Date: Tue Nov 14 00:43:03 2023 +0530 drm/nouveau/fence:: fix warning directly dereferencing a rcu pointer Fix a sparse warning with this message "warning:dereference of noderef expression". In this context it means we are dereferencing a __rcu tagged pointer directly. We should not be directly dereferencing a rcu pointer. To get a normal (non __rcu tagged pointer) from a __rcu tagged pointer we are using the function unrcu_pointer(...). The non __rcu tagged pointer then can be dereferenced just like a normal pointer. I tested with qemu with this command qemu-system-x86_64 \ -m 2G \ -smp 2 \ -kernel bzImage \ -append "console=ttyS0 root=/dev/sda earlyprintk=serial net.ifnames=0" \ -drive file=bullseye.img,format=raw \ -net user,host=10.0.2.10,hostfwd=tcp:127.0.0.1:10021-:22 \ -net nic,model=e1000 \ -enable-kvm \ -nographic \ -pidfile vm.pid \ 2>&1 | tee vm.log with lockdep enabled. Fixes: 0ec5f02f0e2c ("drm/nouveau: prevent stale fence->channel pointers, and protect with rcu") Signed-off-by: Abhinav Singh Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231113191303.3277733-1-singhabhinav9051571833@gmail.com commit 19773eda86e289526b7f08fa56c92e75cd7796f6 Author: Nathan Lynch Date: Mon Nov 6 07:42:58 2023 -0600 powerpc/rtas: Remove trailing space Use scripts/cleanfile to remove instances of trailing space in the core RTAS code and header. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231106-rtas-trivial-v1-6-61847655c51f@linux.ibm.com commit 010862d235c9fab4f0f9dd169efc72df94110758 Author: Nathan Lynch Date: Mon Nov 6 07:42:57 2023 -0600 powerpc/rtas: Move post_mobility_fixup() declaration to pseries This is a pseries-specific function declaration that doesn't belong in rtas.h. Move it to the pseries platform code and adjust pseries/suspend.c accordingly. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231106-rtas-trivial-v1-5-61847655c51f@linux.ibm.com commit 1d8faf1f41b550eb7ab7ac841ebd70f205840dde Author: Nathan Lynch Date: Mon Nov 6 07:42:56 2023 -0600 powerpc/rtas: Remove unused rtas_service_present() rtas_service_present() has no more users. rtas_function_implemented() is now the appropriate API for determining whether a given RTAS function is available to call. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231106-rtas-trivial-v1-4-61847655c51f@linux.ibm.com commit 981d1c997fbc5e193b282f3a325a0230bf697363 Author: Nathan Lynch Date: Mon Nov 6 07:42:55 2023 -0600 powerpc/rtas: Drop declaration of undefined call_rtas() function The call_rtas() function has never been a part of arch/powerpc, and its implementation was removed from arch/ppc by 0a26b1364f14 ("ppc: Remove CHRP, POWER3 and POWER4 support from arch/ppc"). Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://msgid.link/20231106-rtas-trivial-v1-3-61847655c51f@linux.ibm.com commit afb36ac386783d2ef2ed839293c03fd06f470be0 Author: Arnd Bergmann Date: Wed Nov 8 13:58:40 2023 +0100 powerpc/powermac: mark smp_psurge_{give,take}_timebase static These functions are only called locally and should be static like the other corresponding functions are: arch/powerpc/platforms/powermac/smp.c:416:13: error: no previous prototype for 'smp_psurge_take_timebase' [-Werror=missing-prototypes] 416 | void __init smp_psurge_take_timebase(void) | ^~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/platforms/powermac/smp.c:432:13: error: no previous prototype for 'smp_psurge_give_timebase' [-Werror=missing-prototypes] 432 | void __init smp_psurge_give_timebase(void) | ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://msgid.link/20231108125843.3806765-20-arnd@kernel.org commit 0c9a768de64d24e38e27652b8c273725ccc31916 Author: Arnd Bergmann Date: Wed Nov 8 13:58:39 2023 +0100 powerpc/pasemi: mark pas_shutdown() static Allmodconfig builds show a warning about one function that is accidentally marked global: arch/powerpc/platforms/pasemi/setup.c:67:6: error: no previous prototype for 'pas_shutdown' [-Werror=missing-prototypes] Fixes: 656fdf3ad8e0 ("powerpc/pasemi: Add Nemo board device init code.") Signed-off-by: Arnd Bergmann Signed-off-by: Michael Ellerman Link: https://msgid.link/20231108125843.3806765-19-arnd@kernel.org commit 04c40eed3f7ac48ddaf20104489510e743a53c47 Author: Arnd Bergmann Date: Wed Nov 8 13:58:38 2023 +0100 powerpc/ps3: move udbg_shutdown_ps3gelic prototype Allmodconfig kernels produce a missing-prototypes warning: arch/powerpc/platforms/ps3/gelic_udbg.c:239:6: error: no previous prototype for 'udbg_shutdown_ps3gelic' [-Werror=missing-prototypes] Move the declaration from a local header to asm/ps3.h where it can be seen from both the caller and the definition. Signed-off-by: Arnd Bergmann Signed-off-by: Geoff Levand Acked-by: Jakub Kicinski [mpe: Drop CONFIG_PS3GELIC_UDBG to fix build error] Signed-off-by: Michael Ellerman Link: https://msgid.link/20231108125843.3806765-18-arnd@kernel.org commit d7802b734fe33e781437151033032d28291b809b Author: Christian Brauner Date: Tue Nov 21 00:15:55 2023 +0100 fs: add missing @mp parameter documentation Fix the W=1 build warning: ../fs/namespace.c:3050: warning: Function parameter or member 'mp' not described in 'can_move_mount_beneath' Signed-off-by: Christian Brauner commit 3171e46d677a668eed3086da78671f1e4f5b8405 Author: Andy Shevchenko Date: Mon Oct 30 13:42:18 2023 +0200 PCI: Avoid potential out-of-bounds read in pci_dev_for_each_resource() Coverity complains that pointer in the pci_dev_for_each_resource() may be wrong, i.e., might be used for the out-of-bounds read. There is no actual issue right now because we have another check afterwards and the out-of-bounds read is not being performed. In any case it's better code with this fixed, hence the proposed change. As Jonas pointed out "It probably makes the code slightly less performant as res will now be checked for being not NULL (which will always be true), but I doubt it will be significant (or in any hot paths)." Fixes: 09cc90063240 ("PCI: Introduce pci_dev_for_each_resource()") Reported-by: Bjorn Helgaas Closes: https://lore.kernel.org/r/20230509182122.GA1259567@bhelgaas Suggested-by: Jonas Gorski Link: https://lore.kernel.org/r/20231030114218.2752236-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Signed-off-by: Bjorn Helgaas commit 0c7c7ba0c7215de44410e9c4acce28d762dd907a Author: Uwe Kleine-König Date: Fri Oct 13 12:04:23 2023 +0200 EDAC/fsl_ddr: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). fsl_mc_err_remove() is used as callback in two drivers. So these have to be converted together to the void returning remove callback. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231013100422.1382040-2-u.kleine-koenig@pengutronix.de commit ec886cf8813bbfd4dd3f7aba3f660edd5f0a69d8 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:54 2023 +0200 EDAC/zynqmp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Acked-by: Michal Simek Link: https://lore.kernel.org/r/20231004131254.2673842-22-u.kleine-koenig@pengutronix.de commit 9441e5ca3ad3a4f7ae81fda5a1247d03098caf2c Author: Uwe Kleine-König Date: Wed Oct 4 15:12:53 2023 +0200 EDAC/xgene: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-21-u.kleine-koenig@pengutronix.de commit 8312b2bbddb6aceebc6815f34b9a3f97722901e7 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:52 2023 +0200 EDAC/ti: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-20-u.kleine-koenig@pengutronix.de commit f30e2fac7da30f7f8bb683f3a3ad7db5dc4cffc4 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:51 2023 +0200 EDAC/synopsys: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-19-u.kleine-koenig@pengutronix.de commit bfee05aa3806e5d37090e450989efbe0109ebd70 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:50 2023 +0200 EDAC/qcom: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-18-u.kleine-koenig@pengutronix.de commit 58758ffa11a79834d69d560448e5fa965cc80248 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:49 2023 +0200 EDAC/ppc4xx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-17-u.kleine-koenig@pengutronix.de commit e585a37e5061f6d5060517aed1ca4ccb2e56a34c Author: Guilherme G. Piccoli Date: Mon Nov 20 13:04:36 2023 -0300 PCI: Only override AMD USB controller if required By running a Van Gogh device (Steam Deck), the following message was noticed in the kernel log: pci 0000:04:00.3: PCI class overridden (0x0c03fe -> 0x0c03fe) so dwc3 driver can claim this instead of xhci Effectively this means the quirk executed but changed nothing, since the class of this device was already the proper one (likely adjusted by newer firmware versions). Check and perform the override only if necessary. Link: https://lore.kernel.org/r/20231120160531.361552-1-gpiccoli@igalia.com Signed-off-by: Guilherme G. Piccoli Signed-off-by: Bjorn Helgaas Cc: Huang Rui Cc: Vicki Pfau commit 524d3e56fb5e01b80f80b86e8d7d452413a2f9b6 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:48 2023 +0200 EDAC/octeon-pci: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/20231004131254.2673842-16-u.kleine-koenig@pengutronix.de commit a92dd68e163a244f828d0124a5c3dde6d4e1088e Author: Uwe Kleine-König Date: Wed Oct 4 15:12:47 2023 +0200 EDAC/octeon-pc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/20231004131254.2673842-15-u.kleine-koenig@pengutronix.de commit c2a962933c761e4c046f4d519530e78757eff682 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:46 2023 +0200 EDAC/octeon-lmc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/20231004131254.2673842-14-u.kleine-koenig@pengutronix.de commit 01314f277299f45c5758166d2ad3c195719187a6 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:45 2023 +0200 EDAC/octeon-l2c: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Philippe Mathieu-Daudé Link: https://lore.kernel.org/r/20231004131254.2673842-13-u.kleine-koenig@pengutronix.de commit 9a000a72af75886e5de13f4edef7f0d788622e7d Author: Tadeusz Struk Date: Mon Nov 13 19:03:25 2023 +0100 PCI/P2PDMA: Remove reference to pci_p2pdma_map_sg() Update Documentation/driver-api/pci/p2pdma.rst doc and remove references to obsolete p2pdma mapping functions. Fixes: 0d06132fc84b ("PCI/P2PDMA: Remove pci_p2pdma_[un]map_sg()") Link: https://lore.kernel.org/r/20231113180325.444692-1-tstruk@gmail.com Signed-off-by: Tadeusz Struk Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe Cc: stable@kernel.org commit d9dcdb4531fe39ce48919ef8c2c9369ee49f3ad2 Author: Uwe Kleine-König Date: Fri Oct 20 11:21:07 2023 +0200 PCI: host-generic: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. pci_host_common_remove() returned zero unconditionally. With that converted to return void instead, the generic pci host driver can be switched to .remove_new() trivially. Link: https://lore.kernel.org/r/20231020092107.2148311-1-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König Signed-off-by: Bjorn Helgaas Acked-by: Will Deacon commit 8510e004d5d50fa193e96d22de84c0d625193a15 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:44 2023 +0200 EDAC/npcm: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-12-u.kleine-koenig@pengutronix.de commit afe576a62062cf944372fff2b6510b621ec454f2 Author: Paul Moore Date: Mon Nov 20 16:45:38 2023 -0500 MAINTAINERS: add an entry for the lockdown LSM While lockdown has been present in the kernel for a while, it is missing a MAINTAINERS entry for some reason. Signed-off-by: Matthew Garrett Signed-off-by: Paul Moore commit 1baf49724e8dac791351509828b377b5c002322e Author: Uwe Kleine-König Date: Wed Oct 4 15:12:43 2023 +0200 EDAC/mpc85xx: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-11-u.kleine-koenig@pengutronix.de commit cae0e61beb7acb1c54a17e5418978f096d66def6 Author: Iuliana Prodan Date: Fri Oct 13 18:27:31 2023 +0300 arm64: dts: imx8mp: Add reserve-memory nodes for DSP Add the reserve-memory nodes used by DSP when the rpmsg feature is enabled. Signed-off-by: Iuliana Prodan Acked-by: Alexander Stein Link: https://lore.kernel.org/r/20231013152731.23471-3-iuliana.prodan@oss.nxp.com Signed-off-by: Mathieu Poirier commit 81b3e87411ebf3cc27fc15655ef1555b8c853acf Author: Uwe Kleine-König Date: Wed Oct 4 15:12:42 2023 +0200 EDAC/highbank_mc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20231004131254.2673842-10-u.kleine-koenig@pengutronix.de commit 7aca2e9b7bc464e90481568359ab975b199d8213 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:41 2023 +0200 EDAC/highbank_l2: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20231004131254.2673842-9-u.kleine-koenig@pengutronix.de commit d27cb32e00eff60d8fa94de265a8d84c63ef059c Author: Uwe Kleine-König Date: Wed Oct 4 15:12:40 2023 +0200 EDAC/dmc520: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-8-u.kleine-koenig@pengutronix.de commit fb49b6f65a699b3463f5b2f16815340bbd3dabeb Author: Iuliana Prodan Date: Fri Oct 13 18:27:30 2023 +0300 remoteproc: imx_dsp_rproc: Add mandatory find_loaded_rsc_table op Add the .find_loaded_rsc_table operation for i.MX DSP. We need it for inter-process communication between DSP and main core. This callback is used to find the resource table (defined in remote processor linker script) where the address of the vrings along with the other allocated resources (carveouts etc) are stored. If this is not found, the vrings are not allocated and the IPC between cores will not work. Signed-off-by: Iuliana Prodan Reviewed-by: Daniel Baluta Link: https://lore.kernel.org/r/20231013152731.23471-2-iuliana.prodan@oss.nxp.com Signed-off-by: Mathieu Poirier commit 0576ded05b33dd460082b29d900e2f17a56c5a6b Author: Uwe Kleine-König Date: Wed Oct 4 15:12:39 2023 +0200 EDAC/cpc925: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-7-u.kleine-koenig@pengutronix.de commit 57b97ecb40caeb116c22451bbdaaa9a1d12c0b43 Author: Andrii Nakryiko Date: Mon Nov 20 10:04:52 2023 -0800 selftests/bpf: reduce verboseness of reg_bounds selftest logs Reduce verboseness of test_progs' output in reg_bounds set of tests with two changes. First, instead of each different operator (<, <=, >, ...) being it's own subtest, combine all different ops for the same (x, y, init_t, cond_t) values into single subtest. Instead of getting 6 subtests, we get one generic one, e.g.: #192/53 reg_bounds_crafted/(s64)[0xffffffffffffffff; 0] (s64) 0xffffffff00000000:OK Second, for random generated test cases, treat all of them as a single test to eliminate very verbose output with random values in them. So now we'll just get one line per each combination of (init_t, cond_t), instead of 6 x 25 = 150 subtests before this change: #225 reg_bounds_rand_consts_s32_s32:OK Given we reduce verboseness so much, it makes sense to do a bit more random testing, so we also bump default number of random tests to 100, up from 25. This doesn't increase runtime significantly, especially in parallelized mode. With all the above changes we still make sure that we have all the information necessary for reproducing test case if it happens to fail. That includes reporting random seed and specific operator that is failing. Those will only be printed to console if related test/subtest fails, so it doesn't have any added verboseness implications. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231120180452.145849-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d8d9f99fd03322519066f97eac982c464404f221 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:38 2023 +0200 EDAC/cell: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-6-u.kleine-koenig@pengutronix.de commit a5347591eb6fa1263bb0902714c3c8f07dd4748b Author: Uwe Kleine-König Date: Wed Oct 4 15:12:37 2023 +0200 EDAC/bluefield: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-5-u.kleine-koenig@pengutronix.de commit 2546fffd91299e60e0b1558b61448d054f37274b Author: Uwe Kleine-König Date: Wed Oct 4 15:12:36 2023 +0200 EDAC/aspeed: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-4-u.kleine-koenig@pengutronix.de commit 5aafd02da7e29acc0b16fb178f140214eb6ea5a7 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:35 2023 +0200 EDAC/armada_xp: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-3-u.kleine-koenig@pengutronix.de commit b73e11c87339cac6a701cfed19a26c90f5fa0581 Author: Uwe Kleine-König Date: Wed Oct 4 15:12:34 2023 +0200 EDAC/altera: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231004131254.2673842-2-u.kleine-koenig@pengutronix.de commit 4c3ff31a85e39d7e216e86934b694b6846433435 Merge: d3bb2cb0f1769 d861b417e1893 Author: Mark Brown Date: Mon Nov 20 17:40:18 2023 +0000 spi: axi-spi-engine improvements Merge series from David Lechner : We are working towards adding support for the offload feature[1] of the AXI SPI Engine IP core. Before we can do that, we want to make some general fixes and improvements to the driver. In order to avoid a giant series with 35+ patches, we are splitting this up into a few smaller series. This first series mostly doing some housekeeping: * Convert device tree bindings to yaml. * Add a MAINTAINERS entry. * Clean up probe and remove using devm. * Separate message state from driver state. * Add support for cs_off and variable word size. Once this series is applied, we will follow up with a second series of general improvements, and then finally a 3rd series that implements the offload support. The offload support will also involve the IIO subsystem (a new IIO driver will depend on the new SPI offload feature), so I'm mentioning this now in case we want to do anything ahead of time to prepare for that (e.g. putting all of these changes on a separate branch). [1]: https://wiki.analog.com/resources/fpga/peripherals/spi_engine/offload commit af524e9dcb43f5914cecb3a3f4b79081d2e3f7f8 Author: David Lin Date: Mon Nov 20 16:42:28 2023 +0800 ASoC: nau8810: Fix incorrect type in assignment and cast to restricted __be16 This issue is reproduced when W=1 build in compiler gcc-12. The following are sparse warnings: sound/soc/codecs/nau8810.c:183:25: sparse: warning: incorrect type in assignment sound/soc/codecs/nau8810.c:183:25: sparse: expected int sound/soc/codecs/nau8810.c:183:25: sparse: got restricted __be16 sound/soc/codecs/nau8810.c:219:25: sparse: warning: cast to restricted __be16 sound/soc/codecs/nau8810.c:219:25: sparse: warning: cast to restricted __be16 sound/soc/codecs/nau8810.c:219:25: sparse: warning: cast to restricted __be16 sound/soc/codecs/nau8810.c:219:25: sparse: warning: cast to restricted __be16 This issue is not still actively checked by kernel test robot. Actually, it is same with nau8822's sparse warnings issue. Signed-off-by: David Lin Link: https://lore.kernel.org/r/20231120084227.1766633-1-CTLIN0@nuvoton.com Signed-off-by: Mark Brown commit ae3436a5e7c2ef4f92938133bd99f92fc47ea34e Author: Johan Jonker Date: Thu Nov 2 14:42:04 2023 +0100 drm/rockchip: rk3066_hdmi: Switch encoder hooks to atomic The rk3066_hdmi encoder still uses the non atomic variants of enable and disable. Convert to their atomic equivalents. In atomic mode there is no need to save the adjusted mode, so remove the mode_set function. Signed-off-by: Johan Jonker Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/034c3446-d619-f4c3-3aaa-ab51dc19d07f@gmail.com commit 1044f4a31734eef000f42cdaaf35bb2f76286be5 Author: Johan Jonker Date: Thu Nov 2 14:41:48 2023 +0100 drm/rockchip: rk3066_hdmi: Remove useless mode_fixup The mode_fixup implementation doesn't do anything, so we can simply remove it. Signed-off-by: Johan Jonker Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/5649ac03-db92-42a9-d86a-76dfa1af7c64@gmail.com commit 5fc6aa7db080fd90ef00846aac04e8a211088132 Author: Jonas Karlman Date: Wed Oct 25 21:32:46 2023 +0000 drm/rockchip: vop2: Add NV20 and NV30 support Add support for the 10-bit 4:2:2 and 4:4:4 formats NV20 and NV30. These formats can be tested using modetest [1]: modetest -P @:1920x1080@ e.g. on a ROCK 3 Model A (rk3568): modetest -P 43@67:1920x1080@NV20 -F tiles,tiles modetest -P 43@67:1920x1080@NV30 -F smpte,smpte [1] https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/329 Signed-off-by: Jonas Karlman Reviewed-by: Christopher Obbard Tested-by: Christopher Obbard Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20231025213248.2641962-1-jonas@kwiboo.se commit 482543590fc9d405697b01b1b11af8a97ffd553a Author: Dario Binacchi Date: Wed Nov 8 14:44:06 2023 +0100 ARM: dts: stm32: use the same 3v3 for SD and DSI nodes on stm32f469-disco In the board schematic, the power supply for the SD card is the same 3.3 volts used to power the LCD panel and other peripherals. By generalizing the name of the voltage regulator, it simplifies the device tree and makes it more readable. Link: https://www.st.com/en/evaluation-tools/32f469idiscovery.html#cad-resources Signed-off-by: Dario Binacchi Signed-off-by: Alexandre Torgue commit bbd3efed3383e332191c665786c61653826d2ac3 Author: Jaegeuk Kim Date: Mon Nov 13 18:51:57 2023 -0800 f2fs: skip adding a discard command if exists When recovering zoned UFS, sometimes we add the same zone to discard multiple times. Simple workaround is to bypass adding it. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6d392d8daa7514a431678521c2af8be10fc31bc1 Author: Mika Westerberg Date: Tue Nov 14 14:06:11 2023 +0200 ACPI: Run USB4 _OSC() first with query bit set The platform can deny certain tunneling from the OS and it does that by clearing the control bits it does not want the OS to get and returning with OSC_CAPABILITIES_MASK_ERROR bit set. Currently we do not handle this properly so if this happens, for example when the platform denies PCIe tunneling, we just fail the whole negotiation and revert back to what the Thunderbolt driver is doing to figure out whether the controller is running firmware connection manager or not. However, we should honor what the platform returns. For this reason run the USB4 _OSC() first with query bit set, and then use the returned control double word (that may contain some of the bits cleared by the platform) and run it second time with query bit clear. While there, remove an extra space from the assignment of the control double word. Reported-by: NaamaX Shachar Signed-off-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit c7add369b4cc599db336ca67578a052c5b0f0891 Author: Hans de Goede Date: Wed Nov 15 18:48:11 2023 +0100 ACPI: video: Drop should_check_lcd_flag() Since commit 3dbc80a3e4c5 ("ACPI: video: Make backlight class device registration a separate step (v2)") acpi_video# backlights are no longer automatically registered. Instead they now only get registered when the GPU/KMS driver calls acpi_video_register_backlight() which it only does when it has detected an internal LCD panel. This fixes the issue of sometimes a non-working acpi_video# backlight showing up on Desktops / HDMI-sticks without an internal LCD display in a more complete and robust manner then the LCD flag check which gets enabled by the should_check_lcd_flag() helper does. Therefor the should_check_lcd_flag() helper is no longer necessary. The lcd_only flag itself is still necessary to only register a single backlight device (for the right output) on the ESPRIMO Mobile M9410 which has 2 ACPI video connector nodes with a _BCM control method, which is the issue for which the flag was originally introduced in commit e50b9be14ab0 ("ACPI / video: only register backlight for LCD device"). Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 52304886ea49ee662589aff05925ef226c17a6a6 Author: Hans de Goede Date: Thu Oct 26 15:53:03 2023 +0200 ACPI: video: Add comment about acpi_video_backlight_use_native() usage Add a comment explaining that acpi_video_backlight_use_native() MUST only be used by GPU drivers and that it must NOT be used on other places. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit a32324280474b8279ac28aee672f45de6ab755a5 Author: Kees Cook Date: Thu Nov 16 11:14:10 2023 -0800 dma-buf: Replace strlcpy() with strscpy() strlcpy() reads the entire source buffer first. This read may exceed the destination size limit. This is both inefficient and can lead to linear read overflows if a source string is not NUL-terminated[1]. Additionally, it returns the size of the source string, not the resulting size of the destination string. In an effort to remove strlcpy() completely[2], replace strlcpy() here with strscpy(). Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy [1] Link: https://github.com/KSPP/linux/issues/89 [2] Cc: Sumit Semwal Cc: "Christian König" Cc: Azeem Shaikh Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Kees Cook Reviewed-by: T.J. Mercier Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20231116191409.work.634-kees@kernel.org Signed-off-by: Christian König commit 44844db91397d3d94589f3c0c855be02daeebdb3 Author: Rafael J. Wysocki Date: Thu Nov 9 16:01:48 2023 +0100 thermal: core: Add trip thresholds for trip crossing detection The trip crossing detection in handle_thermal_trip() does not work correctly in the cases when a trip point is crossed on the way up and then the zone temperature stays above its low temperature (that is, its temperature decreased by its hysteresis). The trip temperature may be passed by the zone temperature subsequently in that case, even multiple times, but that does not count as the trip crossing as long as the zone temperature does not fall below the trip's low temperature or, in other words, until the trip is crossed on the way down. |-----------low--------high------------| |<--------->| | hyst | | | | -|--> crossed on the way up | <---|-- crossed on the way down However, handle_thermal_trip() will invoke thermal_notify_tz_trip_up() every time the trip temperature is passed by the zone temperature on the way up regardless of whether or not the trip has been crossed on the way down yet. Moreover, it will not call thermal_notify_tz_trip_down() if the last zone temperature was between the trip's temperature and its low temperature, so some "trip crossed on the way down" events may not be reported. To address this issue, introduce trip thresholds equal to either the temperature of the given trip, or its low temperature, such that if the trip's threshold is passed by the zone temperature on the way up, its value will be set to the trip's low temperature and thermal_notify_tz_trip_up() will be called, and if the trip's threshold is passed by the zone temperature on the way down, its value will be set to the trip's temperature (high) and thermal_notify_tz_trip_down() will be called. Accordingly, if the threshold is passed on the way up, it cannot be passed on the way up again until its passed on the way down and if it is passed on the way down, it cannot be passed on the way down again until it is passed on the way up which guarantees correct triggering of trip crossing notifications. If the last temperature of the zone is invalid, the trip's threshold will be set depending of the zone's current temperature: If that temperature is above the trip's temperature, its threshold will be set to its low temperature or otherwise its threshold will be set to its (high) temperature. Because the zone temperature is initially set to invalid and tz->last_temperature is only updated by update_temperature(), this is sufficient to set the correct initial threshold values for all trips. Link: https://lore.kernel.org/all/20220718145038.1114379-4-daniel.lezcano@linaro.org Signed-off-by: Rafael J. Wysocki commit 4cd57d6d527c3570827a6eb8bd790ae216a78ed9 Author: Sakari Ailus Date: Mon Nov 6 17:31:18 2023 +0100 ACPI: property: Replicate DT-aligned u32 properties from DisCo for Imaging MIPI DisCo for Imaging defines properties for camera sensors that functionally align with DT equivalents. Replicate these properties in the ACPI device swnodes so the code using the corresponding DT properties already does not need to be updated to deal with their MIPI counterparts directly. The replicated properties are: "mipi-img-clock-frequency" -> "clock-frequency" "mipi-img-led-max-current" -> "led-max-microamp" "mipi-img-flash-max-current" -> "flash-max-microamp" "mipi-img-flash-max-timeout" -> "flash-max-timeout-us" Signed-off-by: Sakari Ailus [ rjw: Changelog edits, removal of redundant braces ] Signed-off-by: Rafael J. Wysocki Tested-by: Sakari Ailus commit f533e43a2a3117cc59886cbcd66ca32e42cf1ea9 Author: Sakari Ailus Date: Mon Nov 6 17:28:40 2023 +0100 ACPI: property: Dig "rotation" property for devices with CSI2 _CRS Find the "rotation" property value for devices with _CRS CSI-2 resource descriptors and use it to add the "rotation" property to the software nodes representing the CSI-2 connection graph. That value typically comes from the _PLD (Physical Location of Device) object if it is present for the given device. This way, camera sensor drivers that know the "rotation" property do not need to care about _PLD on systems using ACPI. Signed-off-by: Sakari Ailus [ rjw: Changelog edits, file rename ] Signed-off-by: Rafael J. Wysocki Tested-by: Sakari Ailus commit a6cb0a611273767683d50fb908173b6f88052ce5 Author: Rafael J. Wysocki Date: Tue Nov 7 20:19:42 2023 +0100 ACPI: scan: Extract MIPI DisCo for Imaging data into swnodes Add information extracted from the MIPI DisCo for Imaging device properties to software nodes created during the CSI-2 connection graph discovery. Link: https://www.mipi.org/specifications/mipi-disco-imaging Co-developed-by: Sakari Ailus Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki Tested-by: Sakari Ailus commit 48c9996f1dfe92bd7318472651c9ad538d6d53b5 Author: Sakari Ailus Date: Mon Nov 6 17:16:37 2023 +0100 device property: Add SOFTWARE_NODE() macro for defining software nodes Add SOFTWARE_NODE() macro in order to make defining software nodes look nicer. This is analogous to different PROPERTY_ENTRY_*() macros for defining properties. Signed-off-by: Sakari Ailus Reviewed-by: Andy Shevchenko Reviewed-by: Heikki Krogerus Tested-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki commit 693c667b32ee1dd312000d4656b3383fffb3af2d Author: Rafael J. Wysocki Date: Mon Nov 6 17:16:26 2023 +0100 ACPI: scan: Extract _CRS CSI-2 connection information into swnodes Use the connection information extracted from the _CRS CSI-2 resource descriptors for all devices that have them to populate port names and the "reg", "bus-type" and "remote-endpoint" properties in the software nodes representing the CSI-2 connection graph. Link: https://uefi.org/specs/ACPI/6.5/06_Device_Configuration.html#camera-serial-interface-csi-2-connection-resource-descriptor Co-developed-by: Sakari Ailus Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki Tested-by: Sakari Ailus commit bd721b934323e4dcde892013a97e0e5674f4c884 Author: Rafael J. Wysocki Date: Mon Nov 6 17:09:01 2023 +0100 ACPI: scan: Extract CSI-2 connection graph from _CRS Find ACPI CSI-2 resource descriptors defined since ACPI 6.4 (for CSI-2 and camera configuration) in _CRS for all device objects in the given scope of the ACPI namespace that have them, identify the corresponding "remote endpoint" device objects for them and allocate memory for software nodes needed to create a DT-like data structure representing the CSI-2 connection graph for drivers. The code needed to populate these software nodes will be added by subsequent change sets. Link: https://uefi.org/specs/ACPI/6.5/06_Device_Configuration.html#camera-serial-interface-csi-2-connection-resource-descriptor Co-developed-by: Sakari Ailus Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki Tested-by: Sakari Ailus commit 9880702d123f202369fb674ae62bae25be27475c Author: Rafael J. Wysocki Date: Mon Nov 6 17:06:27 2023 +0100 ACPI: property: Support using strings in reference properties In order to allow referencing data nodes directly, which is not possible currently, add support for representing references in device properties as strings (relative or absolute name paths). For example, after this change, the "mipi-img-flash-leds" property in the ASL snippet below will be treated as a proper reference to the LED0 object under LEDD. Package () { "mipi-img-flash-leds", "\\_SB.PCI0.I2C2.LEDD.LED0", } Device (LEDD) { Name (_DSD, Package () // _DSD: Device-Specific Data { ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */, Package () { Package () { "mipi-img-flash-led-0", "LED0", } }, }) Name (LED0, Package () // _DSD: Device-Specific Data { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties */, Package () { Package () { "mipi-img-max-current", 1000000, } } }) } Also remove the mechanism allowing data nodes to be referenced indirectly, with the help of an object reference pointing to the "ancestor" device and a path relative to it (this mechanism is not expected to be in use in any production platform firmware in the field). Note that this change allows also using strings for referencing device objects, in addition to object references that have been supported already. While at it, add pr_fmt() macro to prefix printouts and update copyright. Co-developed-by: Sakari Ailus Signed-off-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki Tested-by: Sakari Ailus commit 6f672f7b3b9676853c3b074151ff0a156cdd7b07 Author: YangXin Date: Sat Nov 18 21:21:36 2023 +0800 fs: namei: Fix spelling mistake "Retuns" to "Returns" There are two spelling mistake in comments. Fix it. Signed-off-by: YangXin Link: https://lore.kernel.org/r/20231118132136.3084-1-yx.0xffff@gmail.com Signed-off-by: Christian Brauner commit fd610e604837936440ef7c64ab6998b004631647 Author: Alex Bee Date: Sun Nov 19 13:13:40 2023 +0100 ARM: dts: rockchip: Make usbphy the parent of SCLK_USB480M for RK3128 Without setting the parent for SCLK_USB480M the clock will use xin24m as it's default parent. While this is generally not an issue for the usb blocks to work, it becomes an issue for RK3128 since SCLK_USB480M can be a parent for other HW blocks (GPU, VPU, VIO), but they will never chose it, since it is currently always running at OSC frequency which is to slow for their needs. This sets the usb2 phy's output as SCLK_USB480M's parent and it's users can chose it if desired. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231119121340.109025-6-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 4b12245e59efea81e19d1aa118f6f835b3e27b3a Author: Alex Bee Date: Sun Nov 19 13:13:39 2023 +0100 ARM: dts: rockchip: Add dwc2 otg fifo siztes for RK3128 The driver currently won't probe correctly if those values are missing. They have been taken from dowstream kernel and match those of other Rockchip SoCs. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231119121340.109025-5-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 759d6bd9ef94f0e658202947d44b939c6e3ed363 Author: Alex Bee Date: Sun Nov 19 13:13:38 2023 +0100 ARM: dts: rockchip: Add USB host clocks for RK3128 Add the required AHB clocks for both the ehci and ohci controller. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231119121340.109025-4-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 6135ac43309f5ef91ad60c688931027226779fed Author: Alex Bee Date: Sun Nov 19 14:03:55 2023 +0100 ARM: dts: rockchip: Add Geniatech XPI-3128 RK3128 board XPI-3128 is RK3128 based SBC form Geniatec in RPi form factor Specs: - Rockchip RK3128 - 512MB/1 GB DDR3 DRAM - 8/16 GB eMMC - TF card slot - 100 MBit ethernet / RJ45 (TI DP83848C phy) - optional Marvell 88W8897 (USB version) - 3 x USB host (onboard GL852G hub connected to SoC ehci host) - 1 x USB otg - 1 x Type-C (solely for powering the board) - HDMI 1.4 out - ADC button - IR receiver - Artasie AM1805 RTC - 40 pin header Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231119130351.112261-8-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit cdc86eeebbd26c60bcee1c81598ecf684852a733 Author: Alex Bee Date: Sun Nov 19 14:03:53 2023 +0100 ARM: dts: rockchip: Add sdmmc_det pinctrl for RK3128 The pincontrol for sd card detection is currently missing. Add it. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20231119130351.112261-6-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit e5fc1f038355634087f6a178454341dcfd50b89b Author: Alex Bee Date: Sun Nov 19 14:03:51 2023 +0100 dt-bindings: arm: rockchip: Add Geniatech XPI-3128 Add Geniatech XPI-3128, a RK3128 based single board computer. Signed-off-by: Alex Bee Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231119130351.112261-4-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit e926380ea2a2b10d01069917e6d678ca818f6ad8 Author: Chris Morgan Date: Fri Nov 17 14:25:36 2023 -0600 arm64: dts: rockchip: Add Powkiddy RK2023 Add support for the Powkiddy RK2023. The Powkiddy RK2023 is a handheld gaming device with a 3.5 inch screen powered by the Rockchip RK3566 SoC. The device looks physically different from the Powkiddy RGB30, but is functionally identical except for the panel. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20231117202536.1387815-7-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 46d84ceb7eec85b60e8a5eb0dfb2fae6a1bf4166 Author: Chris Morgan Date: Fri Nov 17 14:25:35 2023 -0600 arm64: dts: rockchip: Update powkiddy,rgb30 include to rk2023 DTSI The Powkiddy RGB30 device is similar to the Anbernic RGxx3 series, however there are several differences which require deleting nodes in order to properly define the hardware. This was deemed unacceptable for the RK2023, so instead create a common include file for the Powkiddy RGB30 and the Powkiddy RK2023. The only notable difference between these Powkiddy devices are the panel in use, the device name, and the PLL_VPLL frequency necessary to support the different panels. Since the RK2023 was released on the market first, name the common include file after it. Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20231117202536.1387815-6-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 213615d742f0c039ab73f8946ae18000cf2c7b65 Author: Chris Morgan Date: Fri Nov 17 14:25:34 2023 -0600 dt-bindings: arm: rockchip: Add Powkiddy RK2023 The Powkiddy RK2023 is a handheld gaming device made by Powkiddy and powered by the Rockchip RK3566 SoC. Group the Powkiddy RK3566 based devices together as they are both extremely similar. Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231117202536.1387815-5-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 2c3ef4f89ced1a9d3a6fd4f6457be5c440c89362 Author: Amir Goldstein Date: Mon Nov 20 15:43:34 2023 +0200 ovl: initialize ovl_copy_up_ctx.destname inside ovl_do_copy_up() The ->destname member of struct ovl_copy_up_ctx is initialized inside ovl_copy_up_one() to ->d_name of the overlayfs dentry being copied up and then it may be overridden by index name inside ovl_do_copy_up(). ovl_inode_lock() in ovl_copy_up_start() and ovl_copy_up() in ovl_rename() effectively stabilze ->d_name of the overlayfs dentry being copied up, but ovl_inode_lock() is not held when ->d_name is being read. It is not a correctness bug, because if ovl_do_copy_up() races with ovl_rename() and ctx.destname is freed, we will not end up calling ovl_do_copy_up() with the dead name reference. The code becomes much easier to understand and to document if the initialization of c->destname is always done inside ovl_do_copy_up(), either to the index entry name, or to the overlay dentry ->d_name. Signed-off-by: Amir Goldstein commit f1dfb517cc5731b10aab3309629bfe80596a0d49 Author: Ville Syrjälä Date: Fri Nov 17 19:18:33 2023 +0200 drm/i915/fbc: Bump ivb FBC max surface size to 4kx4k IVB Bspec says: "Frame Buffer Compression is only supported with memory surfaces of 4096 lines or less and pipe source sizes of 4096 pixels by 2048 lines or less. " so seems like we should be able to bump the offset+size limit to at least 4kx4k. Make it so. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231117171833.25816-3-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 5c38280cb73ef351c4f92ea06e0fa65847f87185 Author: Ville Syrjälä Date: Fri Nov 17 19:18:32 2023 +0200 drm/i915/fbc: Bump max surface size to 8kx4k on icl+ FBC on icl+ should supposedly be fine with surface sizes up to 8kx4k. Bump up the limit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231117171833.25816-2-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 7521c8a657ba5c48ccd39cde7102a001fb0d9c70 Author: Ville Syrjälä Date: Fri Nov 17 19:18:31 2023 +0200 drm/i915/fbc: Split plane size vs. surface size checks apart Do separate checks for the visible plane size vs. the surface size (which I take to mean offset+size). For now both use the same max w/h, but we can relax the surface size limits as a followup. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231117171833.25816-1-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit fcd479a79120bf0cd507d85f898297a3b868dda6 Author: Ville Syrjälä Date: Tue Nov 14 16:23:33 2023 +0200 drm/i915: Also check for VGA converter in eDP probe Unfortunately even the HPD based detection added in commit cfe5bdfb27fa ("drm/i915: Check HPD live state during eDP probe") fails to detect that the VBT's eDP/DDI-A is a ghost on Asus B360M-A (CFL+CNP). On that board eDP/DDI-A has its HPD asserted despite nothing being actually connected there :( The straps/fuses also indicate that the eDP port is present. So if one boots with a VGA monitor connected the eDP probe will mistake the DP->VGA converter hooked to DDI-E for an eDP panel on DDI-A. As a last resort check what kind of DP device we've detected, and if it looks like a DP->VGA converter then conclude that the eDP port should be ignored. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9636 Fixes: cfe5bdfb27fa ("drm/i915: Check HPD live state during eDP probe") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231114142333.15799-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d861b417e1893a46c63cef2cb46d3587da1e5b15 Author: David Lechner Date: Fri Nov 17 14:13:05 2023 -0600 spi: axi-spi-engine: add support for any word size The AXI SPI Engine IP supports any word size from 1 to 32 bits. This adds support for this by setting the bits_per_word_mask and emitting the appropriate instruction to the SPI Engine each time a transfer requires a new word size. The functions that transfer tx/rx buffers from/to the SPI Engine registers (spi_engine_write_{tx,rx}_fifo()) as well as the function that creates the transfer instruction (spi_engine_gen_xfer()) also have to be modified to take into account the word size since xfer->len is the size of the buffers in bytes rather than words. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-14-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit 145bb2aedb9f78f290c2b5503b553894a6ec53fe Author: David Lechner Date: Fri Nov 17 14:13:04 2023 -0600 spi: axi-spi-engine: add support for cs_off This adds support for the spi_transfer::cs_off flag to the AXI SPI Engine driver. The logic is copied from the generic spi_transfer_one_message() in spi.c. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-13-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit 4e991445478c6404a6846928093837249c52694a Author: David Lechner Date: Fri Nov 17 14:13:03 2023 -0600 spi: axi-spi-engine: remove struct spi_engine::msg In the AXI SPI Engine driver, the struct spi_engine::msg member was used to keep track of the current message being processed. The SPI core is already keeping track of this, so we don't need to duplicate the effort. In most cases, we already have a pointer to the current message, so we can pass it directly to the functions that need it. In the one case where we don't have a pointer to the current message, we can get it from struct spi_controller::cur_msg. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-12-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit 4a074ddeb90f5e81738b401643651b2dea257f57 Author: David Lechner Date: Fri Nov 17 14:13:02 2023 -0600 spi: axi-spi-engine: remove completed_id from driver state In the AXI SPI Engine driver, the completed_id field in the driver state is only used in one function and the value does not need to persist between function calls. Therefore, it can be removed from the driver state and made a local variable in the function where it is used. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-11-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit 0c74de5c6853b0e83413ad237867a37ba30ef3f9 Author: David Lechner Date: Fri Nov 17 14:13:01 2023 -0600 spi: axi-spi-engine: use message_prepare/unprepare This modifies the AXI SPI Engine driver to make use of the message_prepare and message_unprepare callbacks. This separates the concerns of allocating and freeing the message state from the transfer_one_message callback. The main benfit of this is so that future callers of spi_finalize_current_message() will not have to do manual cleanup of the state. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-10-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit 7f970ecb77b6759d37ee743fc36fc0daba960e75 Author: David Lechner Date: Fri Nov 17 14:13:00 2023 -0600 spi: axi-spi-engine: move msg state to new struct This moves the message state in the AXI SPI Engine driver to a new struct spi_engine_msg_state. Previously, the driver state contained various pointers that pointed to memory owned by a struct spi_message. However, it did not set any of these pointers to NULL when a message was completed. This could lead to use after free bugs. Example of how this could happen: 1. SPI core calls into spi_engine_transfer_one_message() with msg1. 2. Assume something was misconfigured and spi_engine_tx_next() is not called enough times in interrupt callbacks for msg1 such that spi_engine->tx_xfer is never set to NULL before the msg1 completes. 3. SYNC interrupt is received and spi_finalize_current_message() is called for msg1. spi_engine->msg is set to NULL but no other message-specific state is reset. 4. Caller that sent msg1 is notified of the completion and frees msg1 and the associated xfers and tx/rx buffers. 4. SPI core calls into spi_engine_transfer_one_message() with msg2. 5. When spi_engine_tx_next() is called for msg2, spi_engine->tx_xfer is still be pointing to an xfer from msg1, which was already freed. spi_engine_xfer_next() tries to access xfer->transfer_list of one of the freed xfers and we get a segfault or undefined behavior. To avoid issues like this, instead of putting per-message state in the driver state struct, we can make use of the struct spi_message::state field to store a pointer to a new struct spi_engine_msg_state. This way, all of the state that belongs to specific message stays with that message and we don't have to remember to manually reset all aspects of the message state when a message is completed. Rather, a new state is allocated for each message. Most of the changes are just renames where the state is accessed. One place where this wasn't straightforward was the sync_id member. This has been changed to use ida_alloc_range() since we needed to separate the per-message sync_id from the per-controller next available sync_id. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-9-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit e6d5eb85e84aeace5e231b951ece86b20df9f63a Author: David Lechner Date: Fri Nov 17 14:12:59 2023 -0600 spi: axi-spi-engine: check for valid clock rate This adds a check for a valid SCLK rate in the axi-spi-engine driver during probe. A valid rate is required to get accurate timing for delays and by not allowing 0 we can avoid divide by zero errors later without additional checks. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-8-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit e16e71e3f3c4b73b20f8c79f7ce8465542a337e9 Author: David Lechner Date: Fri Nov 17 14:12:58 2023 -0600 spi: axi-spi-engine: use devm_spi_register_controller() This replaces spi_register_controller() with devm_spi_register_controller() in the AXI SPI Engine driver. This saves us from having to call spi_unregister_controller() in the remove function. The remove function is also removed since it is no longer needed. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-7-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit 076f32d5db73f16c95b38149f9168210cf267b33 Author: David Lechner Date: Fri Nov 17 14:12:57 2023 -0600 spi: axi-spi-engine: use devm_request_irq() This replaces request_irq() with devm_request_irq() in the AXI SPI Engine driver. This simplifies the error path and removes the need to call free_irq() in the remove function. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-6-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit e094de13ae78035c5642d5dfc65b07301765eebc Author: David Lechner Date: Fri Nov 17 14:12:56 2023 -0600 spi: axi-spi-engine: use devm action to reset hw on remove This moves the reset of the hardware to a devm action in the AXI SPI Engine driver. This will allow us to use devm on later calls in the probe function while preserving the order during cleanup. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-5-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit e12cd96e8e93044646fdf4b2c9a1de62cfa01e7c Author: David Lechner Date: Fri Nov 17 14:12:55 2023 -0600 spi: axi-spi-engine: use devm_spi_alloc_host() This modifies the AXI SPI Engine driver to use devm_spi_alloc_host() instead of spi_alloc_host() to simplify the code a bit. In addition to simplifying the error paths in the probe function, we can also remove spi_controller_get/put() calls in the remove function since devm_spi_alloc_host() sets a flag to no longer decrement the controller reference count in the spi_unregister_controller() function. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-4-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit 9e4ce5220eedea2cc440f3961dec1b5122e815b2 Author: David Lechner Date: Fri Nov 17 14:12:54 2023 -0600 spi: axi-spi-engine: simplify driver data allocation This simplifies the private data allocation in the AXI SPI Engine driver by making use of the feature built into the spi_alloc_host() function instead of doing it manually. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-3-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit 68539d1803476b4ecd403c126aa74b9f25b45f2b Author: David Lechner Date: Fri Nov 17 14:12:53 2023 -0600 MAINTAINERS: add entry for AXI SPI Engine The AXI SPI Engine driver has been in the kernel for many years but has lacked a proper maintainers entry. This adds a new entry for the driver and the devicetree bindings. Signed-off-by: David Lechner Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-2-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit 252eafe11ffc032579a56c7a29faa8431785a91e Author: David Lechner Date: Fri Nov 17 14:12:52 2023 -0600 dt-bindings: spi: axi-spi-engine: convert to yaml This converts the axi-spi-engine binding to yaml. There are a few minor fixes in the conversion: * Added maintainers. * Added descriptions for the clocks. * Fixed the double "@" in the example. * Added a comma between the clocks in the example. Signed-off-by: David Lechner Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231117-axi-spi-engine-series-1-v1-1-cc59db999b87@baylibre.com Signed-off-by: Mark Brown commit d652049e118ffe9227155f7b9b85faf15fc91f8f Author: Bartosz Golaszewski Date: Wed Nov 15 17:29:01 2023 +0100 gpio: mockup: initialize a managed pointer in place The preferred pattern for autopointers is to initialize them when they're declared unless it doesn't make sense. Move the declaration of the managed device pointer to where it's initialized. Signed-off-by: Bartosz Golaszewski commit d3bb2cb0f1769cb3424f3102ebcde51d18065424 Author: Christophe JAILLET Date: Sun Nov 19 11:59:50 2023 +0100 spi: ingenic: convert not to use dma_request_slave_channel() dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/1c88236b5d6bff0af902492ea9e066c8cb0dfef5.1700391566.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit cac15dc25f416972f8dd0b6a8d74daa79dc3a998 Author: Lucas Tanure Date: Sun Nov 19 10:45:14 2023 +0000 ASoC: fsl_mqs: Remove duplicate linux/of.h header Remove linux/of.h as is included more than once. Reported by make includecheck. Signed-off-by: Lucas Tanure Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20231119104514.25536-1-tanure@linux.com Signed-off-by: Mark Brown commit 3ecb4d85461a34323a849769030841533fcd0395 Author: Christophe JAILLET Date: Sun Nov 12 08:44:15 2023 +0100 platform/x86/dell: alienware-wmi: Use kasprintf() Use kasprintf() instead of hand writing it. This saves the need of an intermediate buffer. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/f2b2c9e5d80550e480a627c1b2139d5cc9472ffa.1699775015.git.christophe.jaillet@wanadoo.fr Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 93ec6f222c680cef282a2e94fc42a130d34179b2 Author: Hans de Goede Date: Sat Nov 4 21:58:28 2023 +0100 platform/x86: x86-android-tablets: Fix backlight ctrl for Lenovo Yoga Tab 3 Pro YT3-X90F Fix the maximum brightness being much too low on the Yoga Tab 3 Pro. The LP8557 backlight controller can either be configured to multiply its PWM input and the I2C register set level (requiring both to be at 100% for 100% output); or to only take the I2C register set level into account. Multiplying the 2 levels is useful because this will turn off the backlight when the panel goes off and turns off its PWM output. But on the YT3-X90F the panel's PWM output defaults to a duty-cycle of much less then 100%, severely limiting max brightness. In this case the LP8557 should be configured to only take the I2C register into account and the i915 driver must turn off the backlight separately using a VBT MIPI sequence to turn off the backlight. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20231104205828.63139-4-hdegoede@redhat.com commit 115779bf6abef3161c72311614a16d06d7216213 Author: Hans de Goede Date: Sat Nov 4 21:58:27 2023 +0100 platform/x86: x86-android-tablets: Add audio codec info for Lenovo Yoga Tab 3 Pro YT3-X90F The SPI attached WM5102 codec on the Lenovo Yoga Tab 3 Pro YT3-X90F is not described in the ACPI tables. Add info to instantiate the SPI device for the codec manually. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20231104205828.63139-3-hdegoede@redhat.com commit 70505ea6de24093136103cedcf2deeb85891ed6c Author: Hans de Goede Date: Sat Nov 4 21:58:26 2023 +0100 platform/x86: x86-android-tablets: Add support for SPI device instantiation Some x86 Android tablets have SPI devices which are not properly described in their DSDT. Add support for instantiating SPI devices. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20231104205828.63139-2-hdegoede@redhat.com commit 8d437a0b68c175ed591322e53b7e1f91094abfd5 Author: Hans de Goede Date: Sat Nov 4 21:58:25 2023 +0100 ACPI: scan: Add LNXVIDEO HID to ignore_serial_bus_ids[] The I2C-core already has filtering to skip i2c_client instantiation for LNXVIDEO acpi_device-s with I2cSerialBus resources, since LNXVIDEO devices are not i2c_client-s and are handled by the acpi_video driver. This filtering was added to i2c-core-acpi.c in commit 3a4991a9864c ("i2c: acpi: Do not create i2c-clients for LNXVIDEO ACPI devices"). Now a similar problem has shown up where the SPI-core is instantiating an unwanted SPI-device for a SpiSerialBus resource under a LNXVIDEO acpi_device. On a Lenovo Yoga Tab 3 YT3-X90F this unwanted SPI-device instanstantiation causes the SPI-device instanstantiation for the WM5102 audio codec to fail with: [ 21.988441] pxa2xx-spi 8086228E:00: chipselect 0 already in use Instead of duplicating the I2C-core filtering in the SPI-core code, push the filtering of SerialBus resources under LNXVIDEO acpi_device-s up into the ACPI-core by adding the LNXVIDEO HID to ignore_serial_bus_ids[]. Note the filtering in the I2C-core i2c_acpi_do_lookup() function is still necessary because this not only impacts i2c_client instantiation but it also makes the I2C-core ignore the I2cSerialBus resource when checking what the maximum speed is the I2C bus supports, which is still necessary. Acked-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20231104205828.63139-1-hdegoede@redhat.com commit 57eb82ff34e3e3dfa95a80c40ef5a4764c833ec6 Author: Jules Irenge Date: Fri Nov 3 23:54:08 2023 +0000 platform/mellanox: mlxbf-tmfifo: Remove unnecessary bool conversion This commit fixes coccinelle warning in macro function IS_VRING_DROP() which complains conversion to bool not needed here. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/ZUWIIKbz4vukl8qb@octinomon Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 2340f12023efa7dc256f496d85d2411ca47cb9a2 Author: Armin Wolf Date: Fri Nov 3 19:25:26 2023 +0100 platform/x86/intel/wmi: thunderbolt: Use bus-based WMI interface Currently, the driver still uses the legacy GUID-based interface to invoke WMI methods. Use the modern bus-based interface instead. Tested on a Lenovo E51-80. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231103182526.3524-4-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 75c487fcb69c981f9bd21f91e6e3b8b2080d7ab0 Author: Armin Wolf Date: Fri Nov 3 19:25:25 2023 +0100 platform/x86: intel-wmi-sbl-fw-update: Use bus-based WMI interface Currently, the driver was still using the deprecated GUID-based interface to query/set data blocks. Use the modern bus-based interface for this. Tested with a custom SSDT from the Intel Slim Bootloader project. Reviewed-by: Jithu Joseph Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231103182526.3524-3-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 7275bf3e09578e1761157e7683f2e898c5c235a6 Author: Armin Wolf Date: Fri Nov 3 19:25:24 2023 +0100 platform/x86: wmi: Add to_wmi_device() helper macro Add a helper macro for WMI drivers to cast a device to the corresponding WMI device. This should replace some boilerplate code. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231103182526.3524-2-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit f25d34646bd01505a0989ca67bc9a37390cae755 Author: Armin Wolf Date: Fri Nov 3 19:25:23 2023 +0100 platform/x86: wmi: Add wmidev_block_set() Currently, WMI drivers have to use the deprecated GUID-based interface when setting data blocks. This prevents those drivers from fully moving away from this interface. Provide wmidev_block_set() so drivers using wmi_set_block() can fully migrate to the modern bus-based interface. Tested with a custom SSDT from the Intel Slim Bootloader project. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20231103182526.3524-1-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5a77457232fa0453da4d3d5a7d530129944aeeb5 Author: Philipp Stanner Date: Thu Nov 2 20:03:10 2023 +0100 ALSA: wavefront: copy userspace array safely wavefront_fx.c utilizes memdup_user() to copy a userspace array. This does not check for an overflow. Use the new wrapper memdup_array_user() to copy the array more safely. Suggested-by: Dave Airlie Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20231102190309.50891-2-pstanner@redhat.com Signed-off-by: Takashi Iwai commit 5e4e06e4087eb91b0e5405ed42e792415d055e45 Author: Andrzej Hajda Date: Mon Oct 30 18:40:13 2023 +0100 drm/i915: Track gt pm wakerefs Track every intel_gt_pm_get() until its corresponding release in intel_gt_pm_put() by returning a cookie to the caller for acquire that must be passed by on released. When there is an imbalance, we can see who either tried to free a stale wakeref, or who forgot to free theirs. v2: track recently added calls in gen8_ggtt_bind_get_ce and destroyed_worker_func Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231030-ref_tracker_i915-v1-2-006fe6b96421@intel.com commit b49e894c3fd83f67aae2a4778b98ea3838e41020 Author: Andrzej Hajda Date: Mon Oct 30 18:40:12 2023 +0100 drm/i915: Replace custom intel runtime_pm tracker with ref_tracker library Beside reusing existing code, the main advantage of ref_tracker is tracking per instance of wakeref. It allows also to catch double put. On the other side we lose information about the first acquire and the last release, but the advantages outweigh it. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231030-ref_tracker_i915-v1-1-006fe6b96421@intel.com commit 92fc925f838660eec25862a7fa7e6ef79d22f3ea Author: Raag Jadav Date: Sat Nov 18 12:50:37 2023 +0530 gpio: tangier: simplify locking using cleanup helpers Use lock guards from cleanup.h to simplify locking. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit dfed6b58d54f3a5d7e6bc1fb060e2c936330eba2 Author: Tvrtko Ursulin Date: Thu Nov 16 08:44:56 2023 +0000 drm/i915/gsc: Mark internal GSC engine with reserved uabi class The GSC CS is not exposed to the user, so we skipped assigning a uabi class number for it. However, the trace logs use the uabi class and instance to identify the engine, so leaving uabi class unset makes the GSC CS show up as the RCS in those logs. Given that the engine is not exposed to the user, we can't add a new case in the uabi enum, so we insted internally define a kernel internal class as -1. At the same time remove special handling for the name and complete the uabi_classes array so internal class is automatically correctly assigned. Engine will show as 65535:0 other0 in the logs/traces which should be unique enough. v2: * Fix uabi class u8 vs u16 type confusion. Signed-off-by: Tvrtko Ursulin Fixes: 194babe26bdc ("drm/i915/mtl: don't expose GSC command streamer to the user") Cc: Daniele Ceraolo Spurio Cc: Alan Previn Cc: Matt Roper Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20231116084456.291533-1-tvrtko.ursulin@linux.intel.com commit e31b380741bfa27d274a9f9610fd732e1204ea24 Author: Tvrtko Ursulin Date: Mon Nov 13 08:54:57 2023 +0000 drm/i915: Add __rcu annotation to cursor when iterating client objects __rcu annotation is needed to avoid the sparse warnings such as: .../i915_drm_client.c:92:9: sparse: sparse: incompatible types in comparison expression (different address spaces): .../i915_drm_client.c:92:9: sparse: struct list_head [noderef] __rcu * .../i915_drm_client.c:92:9: sparse: struct list_head * Signed-off-by: Tvrtko Ursulin Fixes: 968853033d8a ("drm/i915: Implement fdinfo memory stats printing") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311110610.h0m6ydI5-lkp@intel.com/ Cc: Andi Shyti Cc: Aravind Iddamsetty Reviewed-by: Jani Nikula Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231113085457.199053-2-tvrtko.ursulin@linux.intel.com commit 44eea8d08078bbce4d0f76c16706ab57ec38da62 Author: Tvrtko Ursulin Date: Mon Nov 13 08:54:56 2023 +0000 drm/i915: Remove return type from i915_drm_client_remove_object There is no need to return anything in the version which was merged and also the implementation of the !CONFIG_PROC_FS wasn't returning anything, causing a build failure there. Signed-off-by: Tvrtko Ursulin Fixes: e4ae85e364fc ("drm/i915: Add ability for tracking buffer objects per client") Cc: Aravind Iddamsetty Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311110104.8TlHVxUI-lkp@intel.com/ Reviewed-by: Jani Nikula Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231113085457.199053-1-tvrtko.ursulin@linux.intel.com commit 83fcf26b00d77e4a0ec920524fe85350a27e9c05 Author: Miquel Raynal Date: Wed Sep 27 20:12:14 2023 +0200 ieee802154: Give the user the association list Upon request, we must be able to provide to the user the list of associations currently in place. Let's add a new netlink command and attribute for this purpose. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-12-miquel.raynal@bootlin.com commit 1e2a45f1f854ce63c114b42298ea686dce9ae4fd Author: Miquel Raynal Date: Wed Sep 27 20:12:13 2023 +0200 mac802154: Handle disassociation notifications from peers Peers may decided to disassociate from us, their coordinator, in this case they will send a disassociation notification which we must acknowledge. If we don't, the peer device considers itself disassociated anyway. We also need to drop the reference to this child from our internal structures. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-11-miquel.raynal@bootlin.com commit 80f8bf9a2a7f603662e08f7663643a58087a2cd4 Author: Miquel Raynal Date: Wed Sep 27 20:12:12 2023 +0200 mac802154: Follow the number of associated devices Track the count of associated devices. Limit the number of associations using the value provided by the user if any. If we reach the maximum number of associations, we tell the device we are at capacity. If the user do not want to accept any more associations, it may specify the value 0 to the maximum number of associations, which will lead to an access denied error status returned to the peers trying to associate. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-10-miquel.raynal@bootlin.com commit ce93b9378c306e6bcc4e0bd817acf4195b4a0288 Author: Miquel Raynal Date: Wed Sep 27 20:12:11 2023 +0200 ieee802154: Add support for limiting the number of associated devices Coordinators may refuse associations. We need a user input for that. Let's add a new netlink command which can provide a maximum number of devices we accept to associate with as a first step. Later, we could also forward the request to userspace and check whether the association should be accepted or not. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-9-miquel.raynal@bootlin.com commit 601f160b61b2152ef84a663f856350d5dd9e752a Author: Miquel Raynal Date: Wed Sep 27 20:12:10 2023 +0200 mac802154: Handle association requests from peers Coordinators may have to handle association requests from peers which want to join the PAN. The logic involves: - Acknowledging the request (done by hardware) - If requested, a random short address that is free on this PAN should be chosen for the device. - Sending an association response with the short address allocated for the peer and expecting it to be ack'ed. If anything fails during this procedure, the peer is considered not associated. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-8-miquel.raynal@bootlin.com commit 9860d9be89f420f3793fb798faadea11c723e08a Author: Miquel Raynal Date: Wed Sep 27 20:12:09 2023 +0200 mac802154: Handle disassociations Devices may decide to disassociate from their coordinator for different reasons (device turning off, coordinator signal strength too low, etc), the MAC layer just has to send a disassociation notification. If the ack of the disassociation notification is not received, the device may consider itself disassociated anyway. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-7-miquel.raynal@bootlin.com commit 7b18313e84eb62c3e4071f9679480159d8da5107 Author: Miquel Raynal Date: Wed Sep 27 20:12:08 2023 +0200 ieee802154: Add support for user disassociation requests A device may decide at some point to disassociate from a PAN, let's introduce a netlink command for this purpose. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-6-miquel.raynal@bootlin.com commit fefd19807fe9c65002366c749e809996a1ca4e68 Author: Miquel Raynal Date: Wed Sep 27 20:12:07 2023 +0200 mac802154: Handle associating Joining a PAN officially goes by associating with a coordinator. This coordinator may have been discovered thanks to the beacons it sent in the past. Add support to the MAC layer for these associations, which require: - Sending an association request - Receiving an association response The association response contains the association status, eventually a reason if the association was unsuccessful, and finally a short address that we should use for intra-PAN communication from now on, if we required one (which is the default, and not yet configurable). Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-5-miquel.raynal@bootlin.com commit 05db59a0619969a47ab87050985344177c662cab Author: Miquel Raynal Date: Wed Sep 27 20:12:06 2023 +0200 ieee802154: Add support for user association requests Users may decide to associate with a peer, which becomes our parent coordinator. Let's add the necessary netlink support for this. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-4-miquel.raynal@bootlin.com commit 2e7ed75e92fc493ff5484f61aed6489262c78f3e Author: Miquel Raynal Date: Wed Sep 27 20:12:05 2023 +0200 ieee802154: Internal PAN management Introduce structures to describe peer devices in a PAN as well as a few related helpers. We basically care about: - Our unique parent after associating with a coordinator. - Peer devices, children, which successfully associated with us. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-3-miquel.raynal@bootlin.com commit 5260adf86b6732c75136fc1b159bb370062ddfa8 Author: Miquel Raynal Date: Wed Sep 27 20:12:04 2023 +0200 ieee802154: Let PAN IDs be reset Soon association and disassociation will be implemented, which will require to be able to either change the PAN ID from 0xFFFF to a real value when association succeeded, or to reset the PAN ID to 0xFFFF upon disassociation. Let's allow to do that manually for now. Signed-off-by: Miquel Raynal Acked-by: Stefan Schmidt Acked-by: Alexander Aring Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-2-miquel.raynal@bootlin.com commit 9d4ccdefcb3e0dfbe3af029015cccb437785070f Author: Uwe Kleine-König Date: Fri Nov 17 10:59:33 2023 +0100 ieee802154: hwsim: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Stefan Schmidt Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-wpan/20231117095922.876489-11-u.kleine-koenig@pengutronix.de commit 99d8a4a283c92bc9976674adce456dab1715c48a Author: Uwe Kleine-König Date: Fri Nov 17 10:59:32 2023 +0100 ieee802154: fakelb: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Acked-by: Stefan Schmidt Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-wpan/20231117095922.876489-10-u.kleine-koenig@pengutronix.de commit acb1fd579efbcac26ce8f9c4fc8bd82f7eaa56e9 Author: Arseniy Krasnov Date: Mon Nov 20 09:42:39 2023 +0300 mtd: rawnand: meson: initialize clock register Clock register must be also initialized during controller probing. If this is not performed (for example by bootloader before) - controller will not work. Signed-off-by: Arseniy Krasnov Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231120064239.3304108-1-avkrasnov@salutedevices.com commit 923fb6238cb3ac529aa2bf13b3b1e53762186a8b Author: Ronald Monthero Date: Sat Nov 18 18:31:51 2023 +1000 mtd: rawnand: Increment IFC_TIMEOUT_MSECS for nand controller response Under heavy load it is likely that the controller is done with its own task but the thread unlocking the wait is not scheduled in time. Increasing IFC_TIMEOUT_MSECS allows the controller to respond within allowable timeslice of 1 sec. fsl,ifc-nand 7e800000.nand: Controller is not responding [<804b2047>] (nand_get_device) from [<804b5335>] (nand_write_oob+0x1b/0x4a) [<804b5335>] (nand_write_oob) from [<804a3585>] (mtd_write+0x41/0x5c) [<804a3585>] (mtd_write) from [<804c1d47>] (ubi_io_write+0x17f/0x22c) [<804c1d47>] (ubi_io_write) from [<804c047b>] (ubi_eba_write_leb+0x5b/0x1d0) Fixes: 82771882d960 ("NAND Machine support for Integrated Flash Controller") Reviewed-by: Miquel Raynal Reviewed-by: Andy Shevchenko Signed-off-by: Ronald Monthero Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231118083156.776887-1-debug.penguin32@gmail.com commit 4e15b91c5b7919c530c27f39c7f2d392bf0a95e3 Author: Borislav Petkov (AMD) Date: Mon Nov 13 14:52:52 2023 +0100 x86/mtrr: Document missing function parameters in kernel-doc Add text explaining what they do. No functional changes. Closes: https://lore.kernel.org/oe-kbuild-all/202311130104.9xKAKzke-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/202311130104.9xKAKzke-lkp@intel.com commit 1b09892962048a66ab46bf489c2b1264c1ae99ee Author: Rob Herring Date: Wed Nov 15 15:02:01 2023 -0600 EDAC/altera: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231115210201.3743564-1-robh@kernel.org commit c79b972eb88b077d2765e7790d0902b3dc94d55c Merge: 98b1cc82c4aff 3b434a3445fff Author: Daniel Vetter Date: Mon Nov 20 09:50:08 2023 +0100 Merge tag 'drm-misc-next-2023-11-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 6.8: UAPI Changes: - drm: Introduce CLOSE_FB ioctl - drm/dp-mst: Documentation for the PATH property - fdinfo: Do not align to a MB if the size is larger than 1MiB - virtio-gpu: add explicit virtgpu context debug name Cross-subsystem Changes: - dma-buf: Add dma_fence_timestamp helper Core Changes: - client: Do not acquire module reference - edid: split out drm_eld, add SAD helpers - format-helper: Cache format conversion buffers - sched: Move from a kthread to a workqueue, rename some internal functions to make it clearer, implement dynamic job-flow control - gpuvm: Provide more features to handle GEM objects - tests: Remove slow kunit tests Driver Changes: - ivpu: Update FW API, new debugfs file, a new NOP job submission test mode, improve suspend/resume, PM improvements, MMU PT optimizations, firmware profiling frequency support, support for uncached buffers, switch to gem shmem helpers, replace kthread with threaded interrupts - panfrost: PM improvements - qaic: Allow to run with a single MSI, support host/device time synchronization, misc improvements - simplefb: Support memory-regions, support power-domains - ssd130x: Unitialized variable fixes - omapdrm: dma-fence lockdep annotation fix - tidss: dma-fence lockdep annotation fix - v3d: Support BCM2712 (RaspberryPi5), Support fdinfo and gputop - panel: - edp: Support AUO B116XTN02, BOE NT116WHM-N21,836X2, NV116WHM-N49 V8.0, plus a whole bunch of panels used on Mediatek chromebooks. Note that the one missing s-o-b for 0da611a87021 ("dma-buf: add dma_fence_timestamp helper") has been supplied here, and rebasing the entire tree with upsetting committers didn't seem worth the trouble: https://lore.kernel.org/dri-devel/ce94020e-a7d4-4799-b87d-fbea7b14a268@gmail.com/ Signed-off-by: Daniel Vetter From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/y4awn5vcfy2lr2hpauo7rc4nfpnc6kksr7btmnwaz7zk63pwoi@gwwef5iqpzva commit 9f5ac1969df6dc0c2282454b147138c32d065b41 Author: Chris Morgan Date: Fri Nov 17 13:44:05 2023 -0600 drm/panel-elida-kd35t133: Drop prepare/unprepare logic Drop the prepare/unprepare logic, as this is now tracked elsewhere since this commit [1]. [1] commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel") Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231117194405.1386265-6-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231117194405.1386265-6-macroalpha82@gmail.com commit 5dea0c3fedee65413271a5700e653eff633e9a7f Author: Chris Morgan Date: Fri Nov 17 13:44:04 2023 -0600 drm/panel-elida-kd35t133: Drop shutdown logic The driver shutdown is duplicate as it calls drm_unprepare and drm_disable which are called anyway when associated drivers are shutdown/removed. Signed-off-by: Chris Morgan Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20231117194405.1386265-5-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231117194405.1386265-5-macroalpha82@gmail.com commit 3fc828b8ce2362982237f46a7cd46677f9094a8e Author: Chris Morgan Date: Fri Nov 17 13:44:03 2023 -0600 drm/panel-elida-kd35t133: drop drm_connector_set_orientation_from_panel Stop calling drm_connector_set_orientation_from_panel() as its now called by the panel bridge directly when it is initialized. Signed-off-by: Chris Morgan Reviewed-by: Jessica Zhang Link: https://lore.kernel.org/r/20231117194405.1386265-4-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231117194405.1386265-4-macroalpha82@gmail.com commit 03c5b2a5f6c39fe4e090346536cf1c14ee18b61e Author: Chris Morgan Date: Fri Nov 17 13:44:02 2023 -0600 drm/panel-elida-kd35t133: hold panel in reset for unprepare For devices like the Anbernic RG351M and RG351P the panel is wired to an always on regulator. When the device suspends and wakes up, there are some slight artifacts on the screen that go away over time. If instead we hold the panel in reset status after it is unprepared, this does not happen. Fixes: 5b6603360c12 ("drm/panel: add panel driver for Elida KD35T133 panels") Signed-off-by: Chris Morgan Reviewed-by: Jessica Zhang Link: https://lore.kernel.org/r/20231117194405.1386265-3-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231117194405.1386265-3-macroalpha82@gmail.com commit c18b1b49764a1db824ed74286338b6283b619286 Author: Chris Morgan Date: Fri Nov 17 13:44:01 2023 -0600 drm/panel-elida-kd35t133: trival: update panel size from 5.5 to 3.5 The comments at the top of the driver state the panel size incorrectly as 5.5" instead of 3.5". Signed-off-by: Chris Morgan Reviewed-by: Jessica Zhang Link: https://lore.kernel.org/r/20231117194405.1386265-2-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231117194405.1386265-2-macroalpha82@gmail.com commit 0aa1cfa3d287930cbecc52cd2b38683a4bf98463 Author: Chris Morgan Date: Fri Nov 17 14:25:33 2023 -0600 drm/panel: nv3051d: Add Powkiddy RK2023 Panel Support Refactor the driver to add support for the powkiddy,rk2023-panel panel. This panel is extremely similar to the rg353p-panel but requires a smaller vertical back porch and isn't as tolerant of higher speeds. Note that while all of these panels are identical in size (70x57) it is possible future panels may not be. Tested on my RG351V, RG353P, RG353V, and RK2023. Signed-off-by: Chris Morgan Reviewed-by: Jessica Zhang Link: https://lore.kernel.org/r/20231117202536.1387815-4-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231117202536.1387815-4-macroalpha82@gmail.com commit 697ebc319b942403a6fee894607fd2cd47cca069 Author: Chris Morgan Date: Fri Nov 17 14:25:32 2023 -0600 drm/panel: nv3051d: Hold panel in reset for unprepare Improve the panel's ability to restore from suspend by holding the panel in suspend after unprepare. Fixes: b1d39f0f4264 ("drm/panel: Add NewVision NV3051D MIPI-DSI LCD panel") Signed-off-by: Chris Morgan Reviewed-by: Jessica Zhang Link: https://lore.kernel.org/r/20231117202536.1387815-3-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231117202536.1387815-3-macroalpha82@gmail.com commit 8bcac1be55e188e5bac3353b550c9cddb70fbbed Author: Chris Morgan Date: Fri Nov 17 14:25:31 2023 -0600 dt-bindings: display: nv3051d: Update NewVision NV3051D compatibles Update the NewVision NV3051D compatible strings by adding a new panel, the powkiddy,rk2023-panel, and removing another entry, the anbernic,rg353v-panel. The rk2023-panel is similar to the rg353p-panel but has slightly different timings so it needs a new string. The rg353v-panel is duplicate to the rg353p-panel, so remove it. No current devices use it and changes to the driver mean it is no longer valid as a compatible string. Signed-off-by: Chris Morgan Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231117202536.1387815-2-macroalpha82@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20231117202536.1387815-2-macroalpha82@gmail.com commit 993a207c114e137159c8d255576badfcd9defba8 Author: Claudiu Beznea Date: Mon Oct 16 13:53:44 2023 +0300 arm64: dts: renesas: rzg3s-smarc: Enable SDHI1 Add SDHI1 to RZ/G3S Smarc Carrier-II board. This is connected to a uSD interface. Although Vccq doesn't cross the boundary of SoM it has been added to RZ/G3S Smarc Carrier-II dtsi to have all the bits related to SDHI1 in a single place. At the moment SoM is used only with RZ/G3S Smarc Carrier-II board. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231016105344.294096-3-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 00cbba479142a3c962a44b127db4ab6cdc2b2b70 Author: Claudiu Beznea Date: Mon Oct 16 13:53:43 2023 +0300 arm64: dts: renesas: rzg3s-smarc-som: Enable SDHI2 Add SDHI2 to RZ/G3S Smarc SoM. SDHI2 pins are multiplexed with SCIF1, SSI0, IRQ0, IRQ1. The selection b/w SDHI2 and SCIF1, SSI0, IRQ0, IRQ1 is done with a switch button. To be able to select b/w these a compilation flag has been added (SW_SD2_EN) at the moment being instantiated to select SDHI2. Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231016105344.294096-2-claudiu.beznea.uj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 5ab16198b431ca4885dbcc3433527fdf5b66be3c Author: Yoshihiro Shimoda Date: Tue Nov 14 21:22:52 2023 +0900 clk: renesas: r8a779g0: Add PCIe clocks Add the PCIe module clocks, which are used by the PCIe modules on the Renesas R-Car V4H (R8A779G0) SoC. Note that the following descriptions in the hardware manual Rev.0.81 about the PCIe module clocks are incorrect: 9.2.1.7 Software Reset Register 6 (SRCR6) 9.2.1.12 Software Reset Register 11 (SRCR11) 9.2.3.7 Module Stop Control Register 6 (MSTPCR6) Please refer to Figures 104.3[ab] instead. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231114122252.2266799-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit f154ef08ca637c26178cb7a5c8e7b75952a47ab1 Author: Niklas Söderlund Date: Tue Oct 31 15:57:39 2023 +0100 clk: renesas: r8a779g0: Add EtherTSN clock Add the TSN module clock, which is used by the EtherTSN module on the Renesas R-Car V4H (R8A779G0) SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231031145739.657638-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 02d70090e0e020eff440dbe51e93fe2fc94d9835 Author: Amir Goldstein Date: Sun Nov 19 20:55:00 2023 +0200 ovl: remove redundant ofs->indexdir member When the index feature is disabled, ofs->indexdir is NULL. When the index feature is enabled, ofs->indexdir has the same value as ofs->workdir and takes an extra reference. This makes the code harder to understand when it is not always clear that ofs->indexdir in one function is the same dentry as ofs->workdir in another function. Remove this redundancy, by referencing ofs->workdir directly in index helpers and by using the ovl_indexdir() accessor in generic code. Signed-off-by: Amir Goldstein commit e04d24c4e8062b5ed0bee7a871423a454d24ffed Author: Luben Tuikov Date: Thu Nov 16 22:44:53 2023 -0500 drm/print: Handle NULL drm device in __drm_printk() drm_{err,warn,...}() use __drm_printk() which takes a drm device pointer and uses the embedded device pointer to print the device. This facility handles NULL device pointer, but not NULL drm device pointer. This patch makes __drm_printk() also handle a NULL drm device pointer. The printed output is identical to if drm->dev had been NULL. Signed-off-by: Luben Tuikov Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231117035427.68125-2-ltuikov89@gmail.com commit 804901fdd637c7af8b767c329fd84aa0d3d617ec Author: Christophe JAILLET Date: Sat Nov 18 09:42:07 2023 +0100 ata: pata_pxa: convert not to use dma_request_slave_channel() dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. While at it, also propagate the error code that is now available. Signed-off-by: Christophe JAILLET Reviewed-by: Sergey Shtylyov Signed-off-by: Damien Le Moal commit 94c81c62668954269ec852ab0284256db20ed9b4 Author: Lorenzo Bianconi Date: Fri Nov 17 17:39:22 2023 +0100 net: ethernet: mtk_wed: rely on __dev_alloc_page in mtk_wed_tx_buffer_alloc Simplify the code and use __dev_alloc_page() instead of __dev_alloc_pages() with order 0 in mtk_wed_tx_buffer_alloc routine Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 69d5ee8c1291c3e45ef12d531f28907bfbdbd9da Merge: ac40916a3f724 ebd7bf60e21c5 Author: David S. Miller Date: Sun Nov 19 19:46:40 2023 +0000 Merge branch 'am65-cpsw-ethtool-mac-stats' Roger Quadros says: =================== net: eth: am65-cpsw: add ethtool MAC stats Gets 'ethtool -S eth0 --groups eth-mac' command to work. Also set default TX channels to maximum available and does cleanup in am65_cpsw_nuss_common_open() error path. Changelog: v2: - add __iomem to *stats, to prevent sparse warning - clean up RX descriptors and free up SKB in error handling of am65_cpsw_nuss_common_open() - Re-arrange some funcitons to avoid forward declaration ==================== Signed-off-by: David S. Miller commit ebd7bf60e21c567a7fbe0e2a7bc4be8406ff8093 Author: Roger Quadros Date: Fri Nov 17 14:17:55 2023 +0200 net: ethernet: ti: am65-cpsw: Fix error handling in am65_cpsw_nuss_common_open() k3_udma_glue_enable_rx/tx_chn returns error code on failure. Bail out on error while enabling TX/RX channel. In the error path, clean up the RX descriptors and SKBs. Get rid of kmemleak_not_leak() as it seems unnecessary now. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Roger Quadros Signed-off-by: David S. Miller commit be397ea3473d24ce596f3aaa22a55af9b004fed8 Author: Roger Quadros Date: Fri Nov 17 14:17:54 2023 +0200 net: ethernet: am65-cpsw: Set default TX channels to maximum am65-cpsw supports 8 TX hardware queues. Set this as default. The rationale is that some am65-cpsw devices can have up to 4 ethernet ports. If the number of TX channels have to be changed then all interfaces have to be brought down and up as the old default of 1 TX channel is too restrictive for any mqprio/taprio usage. Another reason for this change is to allow testing using kselftest:net/forwarding:ethtool_mm.sh out of the box. Signed-off-by: Roger Quadros Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ac099466961b27ee069c5fd606f228c3df7303e8 Author: Roger Quadros Date: Fri Nov 17 14:17:53 2023 +0200 net: ethernet: ti: am65-cpsw: Re-arrange functions to avoid forward declaration Re-arrange am65_cpsw_nuss_rx_cleanup(), am65_cpsw_nuss_xmit_free() and am65_cpsw_nuss_tx_cleanup() to avoid forward declaration. No functional change. Signed-off-by: Roger Quadros Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 67372d7a85fcdb9761194f70c88aa3fab0ce1449 Author: Roger Quadros Date: Fri Nov 17 14:17:52 2023 +0200 net: ethernet: am65-cpsw: Add standard Ethernet MAC stats to ethtool Gets 'ethtool -S eth0 --groups eth-mac' command to work. Signed-off-by: Roger Quadros Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3e124aa6cb5e74308f5997f63ebd3e5badb5c4e7 Merge: 16b3129e14bf2 ac8148d957f50 Author: Alexei Starovoitov Date: Sun Nov 19 11:43:45 2023 -0800 Merge branch 'bpf-kernel-bpf-task_iter-c-don-t-abuse-next_thread' Oleg Nesterov says: ==================== bpf: kernel/bpf/task_iter.c: don't abuse next_thread() Compile tested. Every lockless usage of next_thread() was wrong, bpf/task_iter.c is the last user and is no exception. ==================== Link: https://lore.kernel.org/r/20231114163211.GA874@redhat.com Signed-off-by: Alexei Starovoitov commit ac8148d957f50434411a0c15a2e4f352b5bb4ff2 Author: Oleg Nesterov Date: Tue Nov 14 17:32:39 2023 +0100 bpf: bpf_iter_task_next: use next_task(kit->task) rather than next_task(kit->pos) This looks more clear and simplifies the code. While at it, remove the unnecessary initialization of pos/task at the start of bpf_iter_task_new(). Note that we can even kill kit->task, we can just use pos->group_leader, but I don't understand the BUILD_BUG_ON() checks in bpf_iter_task_new(). Signed-off-by: Oleg Nesterov Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231114163239.GA903@redhat.com Signed-off-by: Alexei Starovoitov commit 5a34f9dabd9aa567e2d37e1aa27a67f80acfaa1c Author: Oleg Nesterov Date: Tue Nov 14 17:32:37 2023 +0100 bpf: bpf_iter_task_next: use __next_thread() rather than next_thread() Lockless use of next_thread() should be avoided, kernel/bpf/task_iter.c is the last user and the usage is wrong. bpf_iter_task_next() can loop forever, "kit->pos == kit->task" can never happen if kit->pos execs. Change this code to use __next_thread(). With or without this change the usage of kit->pos/task and next_task() doesn't look nice, see the next patch. Signed-off-by: Oleg Nesterov Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231114163237.GA897@redhat.com Signed-off-by: Alexei Starovoitov commit 2d1618054f25e11c44d189dbff4a60342a4cfb4b Author: Oleg Nesterov Date: Tue Nov 14 17:32:34 2023 +0100 bpf: task_group_seq_get_next: use __next_thread() rather than next_thread() Lockless use of next_thread() should be avoided, kernel/bpf/task_iter.c is the last user and the usage is wrong. task_group_seq_get_next() can return the group leader twice if it races with mt-thread exec which changes the group->leader's pid. Change the main loop to use __next_thread(), kill "next_tid == common->pid" check. __next_thread() can't loop forever, we can also change this code to retry if next_tid == 0. Signed-off-by: Oleg Nesterov Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231114163234.GA890@redhat.com Signed-off-by: Alexei Starovoitov commit 0529e26d8b7b51da99c9d7234700f4041d20c0e4 Author: Md Haris Iqbal Date: Wed Nov 15 16:27:41 2023 +0100 RDMA/rtrs-clt: Add warning logs for RDMA events Some RDMA CM events can trigger connection close or recovery for a certain rtrs_clt_path. Such close/recovery triggers should happen after an appropriate log message, since they can lead to IO failures. Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Signed-off-by: Grzegorz Prajsner Link: https://lore.kernel.org/r/20231115152749.424301-2-haris.iqbal@ionos.com Signed-off-by: Leon Romanovsky commit eb7854d63db543caeb8cadb5c3ae5296d0cb7b8f Author: Junxian Huang Date: Tue Nov 14 20:34:49 2023 +0800 RDMA/hns: Support SW stats with debugfs Support SW stats with debugfs. Query output: $ cat /sys/kernel/debug/hns_roce/hns_0/sw_stat/sw_stat aeqe --- 3341 ceqe --- 0 cmds --- 6764 cmds_err --- 0 posted_mbx --- 3344 polled_mbx --- 3 mbx_event --- 3341 qp_create_err --- 0 qp_modify_err --- 0 cq_create_err --- 0 cq_modify_err --- 0 srq_create_err --- 0 srq_modify_err --- 0 xrcd_alloc_err --- 0 mr_reg_err --- 0 mr_rereg_err --- 0 ah_create_err --- 0 mmap_err --- 0 uctx_alloc_err --- 0 Signed-off-by: Junxian Huang Signed-off-by: Chengchang Tang Link: https://lore.kernel.org/r/20231114123449.1106162-4-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit ca7ad04cd5d2f8070cd34c2c428cea36de516afc Author: Junxian Huang Date: Tue Nov 14 20:34:48 2023 +0800 RDMA/hns: Add debugfs to hns RoCE Add debugfs to hns RoCE. This patch only adds an empty directory "hns_roce" to debugs root directory. Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20231114123449.1106162-3-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit f45b83ad39f8033e717b1eee57e81811113d5a84 Author: Junxian Huang Date: Tue Nov 14 20:34:47 2023 +0800 RDMA/hns: Fix inappropriate err code for unsupported operations EOPNOTSUPP is more situable than EINVAL for allocating XRCD while XRC is not supported and unsupported resizing SRQ. Fixes: 32548870d438 ("RDMA/hns: Add support for XRC on HIP09") Fixes: 221109e64316 ("RDMA/hns: Add interception for resizing SRQs") Signed-off-by: Junxian Huang Link: https://lore.kernel.org/r/20231114123449.1106162-2-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky commit 6dc4309df40549e20df89823e4b0212cff316eed Author: Mihai Sain Date: Thu Nov 9 15:11:49 2023 +0200 ARM: dts: microchip: sam9x60ek: Add IRQ support for ethernet PHY Add interrupt support for ethernet phy subnode. Add PB8 definition to macb0 pinctrl. Signed-off-by: Mihai Sain Link: https://lore.kernel.org/r/20231109131149.46397-3-mihai.sain@microchip.com [claudiu.beznea: s/at91/microchip in commit title to match dts directory] Signed-off-by: Claudiu Beznea commit e83bcc62287bdec9ffc9e4bf83271a0c1742d0a3 Author: Mihai Sain Date: Thu Nov 9 15:11:48 2023 +0200 ARM: dts: microchip: sam9x60_curiosity: Add IRQ support for ethernet PHY Add interrupt support for ethernet phy subnode. Add PB8 definition to macb0 pinctrl. Signed-off-by: Mihai Sain Link: https://lore.kernel.org/r/20231109131149.46397-2-mihai.sain@microchip.com [claudiu.beznea: s/at91/microchip in commit title to match dts directory] Signed-off-by: Claudiu Beznea commit aa1cfba75b77ca93ab9a0b03c2c9124a16d96479 Author: Thomas Perrot Date: Fri Oct 20 15:02:19 2023 +0200 ARM: at91: pm: set soc_pm.data.mode in at91_pm_secure_init() In non secure mode, soc_pm.data.mode is set when entering pm in at91_pm_begin(). This value is used (not only) to determine if the system is going into slow clock mode (at91_suspend_entering_slow_clock()). This function is called from various drivers to check this and act accordingly. If not set, the driver might enter an incorrect suspend mode. When using secure suspend mode, at91_pm_begin() is not called and thus soc_pm.data.mode is not set. Since when using secure suspend, only one suspend mode is supported, set this value directly in at91_pm_secure_init(). Signed-off-by: Clément Léger Signed-off-by: Thomas Perrot Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/20231020130219.1255937-1-thomas.perrot@bootlin.com Signed-off-by: Claudiu Beznea commit a7e405a2de69fe5e6657046e978a81683b140051 Author: John Johansen Date: Sun Nov 19 01:19:41 2023 -0800 apparmor: add missing params to aa_may_ptrace kernel-doc comments When the cred was explicit passed through to aa_may_ptrace() the kernel-doc comment was not properly updated. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311040508.AUhi04RY-lkp@intel.com/ Signed-off-by: John Johansen commit 735ad5d1532a811d068a731dff46fa02c2185981 Author: John Johansen Date: Sun Nov 19 01:14:10 2023 -0800 apparmor: declare nulldfa as static With the conversion to a refcounted pdb the nulldfa is now only used in security/apparmor/lsm.c so declar it as static. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311092038.lqfYnvmf-lkp@intel.com/ Signed-off-by: John Johansen commit 3c49ce0e220912406a478ac128657672608200a0 Author: John Johansen Date: Thu Nov 9 06:32:28 2023 -0800 apparmor: declare stack_msg as static stack_msg in upstream code is only used in securit/apparmor/domain.c so declare it as static. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311092251.TwKSNZ0u-lkp@intel.com/ Signed-off-by: John Johansen commit e44a4dc4b36cc087878596b937d52caca35e9b19 Author: Dimitri John Ledkov Date: Sun Oct 22 20:40:26 2023 +0100 apparmor: switch SECURITY_APPARMOR_HASH from sha1 to sha256 sha1 is insecure and has colisions, thus it is not useful for even lightweight policy hash checks. Switch to sha256, which on modern hardware is fast enough. Separately as per NIST Policy on Hash Functions, sha1 usage must be withdrawn by 2030. This config option currently is one of many that holds up sha1 usage. Signed-off-by: Dimitri John Ledkov Signed-off-by: John Johansen commit ac40916a3f7243efbe6e129ebf495b5c33a3adfe Author: Li RongQing Date: Wed Nov 15 20:01:08 2023 +0800 rtnetlink: introduce nlmsg_new_large and use it in rtnl_getlink if a PF has 256 or more VFs, ip link command will allocate an order 3 memory or more, and maybe trigger OOM due to memory fragment, the VFs needed memory size is computed in rtnl_vfinfo_size. so introduce nlmsg_new_large which calls netlink_alloc_large_skb in which vmalloc is used for large memory, to avoid the failure of allocating memory ip invoked oom-killer: gfp_mask=0xc2cc0(GFP_KERNEL|__GFP_NOWARN|\ __GFP_COMP|__GFP_NOMEMALLOC), order=3, oom_score_adj=0 CPU: 74 PID: 204414 Comm: ip Kdump: loaded Tainted: P OE Call Trace: dump_stack+0x57/0x6a dump_header+0x4a/0x210 oom_kill_process+0xe4/0x140 out_of_memory+0x3e8/0x790 __alloc_pages_slowpath.constprop.116+0x953/0xc50 __alloc_pages_nodemask+0x2af/0x310 kmalloc_large_node+0x38/0xf0 __kmalloc_node_track_caller+0x417/0x4d0 __kmalloc_reserve.isra.61+0x2e/0x80 __alloc_skb+0x82/0x1c0 rtnl_getlink+0x24f/0x370 rtnetlink_rcv_msg+0x12c/0x350 netlink_rcv_skb+0x50/0x100 netlink_unicast+0x1b2/0x280 netlink_sendmsg+0x355/0x4a0 sock_sendmsg+0x5b/0x60 ____sys_sendmsg+0x1ea/0x250 ___sys_sendmsg+0x88/0xd0 __sys_sendmsg+0x5e/0xa0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f95a65a5b70 Cc: Yunsheng Lin Signed-off-by: Li RongQing Link: https://lore.kernel.org/r/20231115120108.3711-1-lirongqing@baidu.com Signed-off-by: Jakub Kicinski commit 459a70bae4009b7a326daf38f27d9fd3ffd79531 Merge: a49296e07094b 19b39caec0622 Author: Jakub Kicinski Date: Sat Nov 18 19:46:32 2023 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== ice: one by one port representors creation Michal Swiatkowski says: Currently ice supports creating port representors only for VFs. For that use case they can be created and removed in one step. This patchset is refactoring current flow to support port representor creation also for subfunctions and SIOV. In this case port representors need to be created and removed one by one. Also, they can be added and removed while other port representors are running. To achieve that we need to change the switchdev configuration flow. Three first patches are only cosmetic (renaming, removing not used code). Next few ones are preparation for new flow. The most important one is "add VF representor one by one". It fully implements new flow. New type of port representor (for subfunction) will be introduced in follow up patchset. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: reserve number of CP queues ice: adjust switchdev rebuild path ice: add VF representors one by one ice: realloc VSI stats arrays ice: set Tx topology every time new repr is added ice: allow changing SWITCHDEV_CTRL VSI queues ice: return pointer to representor ice: make representor code generic ice: remove VF pointer reference in eswitch code ice: track port representors in xarray ice: use repr instead of vf->repr ice: track q_id in representor ice: remove unused control VSI parameter ice: remove redundant max_vsi_num variable ice: rename switchdev to eswitch ==================== Link: https://lore.kernel.org/r/20231114181449.1290117-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit a49296e07094b24f7a1eefe2b865de97e4d5df36 Merge: 516cba96e8620 069b142f58196 Author: Jakub Kicinski Date: Sat Nov 18 19:42:29 2023 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== igc: Add support for physical + free-running timers Vinicius Costa Gomes says: The objective is to allow having functionality that depends on the physical timer (taprio and ETF offloads, for example) and vclocks operating together. The "big" missing piece is the implementation of the .getcyclesx64() function in igc, as i225/i226 have multiple timers, we use one of those timers (timer 1) as a free-running (non adjustable) timer. The complication is that only implementing .getcyclesx64() and nothing else will break synchronization when using vclocks, as reading the clock will retrieve the free-running value but timnestamps will come from the adjustable timer. The solution is to modify "in one go" the timestamping code to be able to retrieve the timestamp from the correct timer (if a socket is "phc_bound" to a vclock the timestamp will come from the free-running timer). I was debating whether or not to do the adjustments for the internal latencies for the free-running timestamps, decided to do the adjustments so the path delay when using vclocks is similar to the one when using the physical clock. One future improvement is to implement the .getcrosscycles() function. * '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: igc: Add support for PTP .getcyclesx64() igc: Simplify setting flags in the TX data descriptor ==================== Link: https://lore.kernel.org/r/20231114183640.1303163-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 516cba96e86201de6b8479dc624401501c39acf5 Merge: 289354f21b2c3 54293e4d6a629 Author: Jakub Kicinski Date: Sat Nov 18 19:38:25 2023 -0800 Merge branch 'net-sched-cls_u32-use-proper-refcounts' Pedro Tammela says: ==================== net/sched: cls_u32: use proper refcounts In u32 we are open coding refcounts of hashtables with integers which is far from ideal. Update those with proper refcount and add a couple of tests to tdc that exercise the refcounts explicitly. ==================== Link: https://lore.kernel.org/r/20231114141856.974326-1-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 54293e4d6a629befb0b0d93aa416a658678f7f01 Author: Pedro Tammela Date: Tue Nov 14 11:18:56 2023 -0300 selftests/tc-testing: add hashtable tests for u32 Add tests to specifically check for the refcount interactions of hashtables created by u32. These tables should not be deleted when referenced and the flush order should respect a tree like composition. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231114141856.974326-3-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 6b78debe1c07e6aa3c91ca0b1384bf3cb8217c50 Author: Pedro Tammela Date: Tue Nov 14 11:18:55 2023 -0300 net/sched: cls_u32: replace int refcounts with proper refcounts Proper refcounts will always warn splat when something goes wrong, be it underflow, saturation or object resurrection. As these are always a source of bugs, use it in cls_u32 as a safeguard to prevent/catch issues. Another benefit is that the refcount API self documents the code, making clear when transitions to dead are expected. For such an update we had to make minor adaptations on u32 to fit the refcount API. First we set explicitly to '1' when objects are created, then the objects are alive until a 1 -> 0 happens, which is then released appropriately. The above made clear some redundant operations in the u32 code around the root_ht handling that were removed. The root_ht is created with a refcnt set to 1. Then when it's associated with tcf_proto it increments the refcnt to 2. Throughout the entire code the root_ht is an exceptional case and can never be referenced, therefore the refcnt never incremented/decremented. Its lifetime is always bound to tcf_proto, meaning if you delete tcf_proto the root_ht is deleted as well. The code made up for the fact that root_ht refcnt is 2 and did a double decrement to free it, which is not a fit for the refcount API. Even though refcount_t is implemented using atomics, we should observe a negligible control plane impact. Signed-off-by: Pedro Tammela Acked-by: Jamal Hadi Salim Link: https://lore.kernel.org/r/20231114141856.974326-2-pctammela@mojatatu.com Signed-off-by: Jakub Kicinski commit 289354f21b2c3fac93e956efd45f256a88a4d997 Author: Jakub Kicinski Date: Sat Nov 18 18:38:05 2023 -0800 net: partial revert of the "Make timestamping selectable: series Revert following commits: commit acec05fb78ab ("net_tstamp: Add TIMESTAMPING SOFTWARE and HARDWARE mask") commit 11d55be06df0 ("net: ethtool: Add a command to expose current time stamping layer") commit bb8645b00ced ("netlink: specs: Introduce new netlink command to get current timestamp") commit d905f9c75329 ("net: ethtool: Add a command to list available time stamping layers") commit aed5004ee7a0 ("netlink: specs: Introduce new netlink command to list available time stamping layers") commit 51bdf3165f01 ("net: Replace hwtstamp_source by timestamping layer") commit 0f7f463d4821 ("net: Change the API of PHY default timestamp to MAC") commit 091fab122869 ("net: ethtool: ts: Update GET_TS to reply the current selected timestamp") commit 152c75e1d002 ("net: ethtool: ts: Let the active time stamping layer be selectable") commit ee60ea6be0d3 ("netlink: specs: Introduce time stamping set command") They need more time for reviews. Link: https://lore.kernel.org/all/20231118183529.6e67100c@kernel.org/ Signed-off-by: Jakub Kicinski commit b7a14708aafeb12730ab23de8ecedd14f401a30c Author: Al Viro Date: Fri Nov 3 14:35:16 2023 -0400 switch nfsd_client_rmdir() to use of simple_recursive_removal() nfsd_client_rmdir() open-codes a subset of simple_recursive_removal(). Conversion to calling simple_recursive_removal() allows to clean things up quite a bit. While we are at it, nfsdfs_create_files() doesn't need to mess with "pick the reference to struct nfsdfs_client from the already created parent" - the caller already knows it (that's where the parent got it from, after all), so we might as well just pass it as an explicit argument. So __get_nfsdfs_client() is only needed in get_nfsdfs_client() and can be folded in there. Incidentally, the locking in get_nfsdfs_client() is too heavy - we don't need ->i_rwsem for that, ->i_lock serves just fine. Reviewed-by: Jeff Layton Tested-by: Jeff Layton Acked-by: Chuck Lever Acked-by: Christian Brauner Signed-off-by: Al Viro commit 89e00444cb894a42c33ba88738eaae788b05b924 Author: Colin Ian King Date: Mon Oct 23 14:35:02 2023 +0100 clk: sunxi-ng: nkm: remove redundant initialization of tmp_parent Variable tmp_parent is being ininitialized with a value that is never read, the initialization is redundant and can be removed. Move the initialization and move the variable to the inner loop scope. Signed-off-by: Colin Ian King Reviewed-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20231023133502.666559-1-colin.i.king@gmail.com Signed-off-by: Jernej Skrabec commit 055dd7511f675d26fa283b35bb3dadfc7f77ed97 Author: Heiner Kallweit Date: Mon Nov 13 20:13:26 2023 +0100 r8169: improve RTL8411b phy-down fixup Mirsad proposed a patch to reduce the number of spinlock lock/unlock operations and the function code size. This can be further improved because the function sets a consecutive register block. Suggested-by: Mirsad Todorovac Signed-off-by: Heiner Kallweit Reviewed-by: Simon Horman Reviewed-by: Mirsad Todorovac Signed-off-by: David S. Miller commit c505ee1eae18fb7b32d792e4470d5ef1934376bd Author: Andre Przywara Date: Fri Oct 20 15:57:06 2023 +0100 arm64: dts: allwinner: h616: add Orange Pi Zero 2W support The Orange Pi Zero 2W is a board based on the Allwinner H618 SoC. It uses the RaspberryPi Zero form factor, with an optional expansion board, connected via an FPC connector, to provide more connectors. The base board features: - Allwinner H618 SoC (quad Cortex-A53 cores, with 1MB L2 cache) - 1, 2 or 4GB of LPDDR4 DRAM - SD card socket - two USB-C sockets, one UFP, one DFP - HDMI connector - (yet unsupported) WiFi module - 16 MiB SPI flash - power supply via the UFP USB-C port The FPC connector provides access to two more USB host ports, Fast Ethernet, some GPIOs, Audio Line out and the IR receiver pin. Signed-off-by: Andre Przywara Reviewed-by: Jernej Skrabec Link: https://lore.kernel.org/r/20231020145706.705420-3-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit 3589e6d9f6e929339692585d1169f149e789d229 Author: Andre Przywara Date: Fri Oct 20 15:57:05 2023 +0100 dt-bindings: arm: sunxi: add Orange Pi Zero 2W The Orange Pi Zero 2W is a small board with an Allwinner H618 SoC. Add the compatible string to the binding documents. Signed-off-by: Andre Przywara Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231020145706.705420-2-andre.przywara@arm.com Signed-off-by: Jernej Skrabec commit b33c14c8618edfc00bf8963e3b0c8a2b19c9eaa4 Merge: 698f1e2b71736 484d4fbfdafea Author: Al Viro Date: Sat Nov 18 16:22:44 2023 -0500 Merge branch 'no-rebase-overlayfs' into work.dcache-misc commit 698f1e2b71736977b04f951e2e2ef1c9a80696ff Author: Al Viro Date: Fri Nov 10 16:19:59 2023 -0500 kill d_backing_dentry() no users left Signed-off-by: Al Viro commit 2fcd38f4de7256e2b5cb23ad22a6e3ebfea7dd18 Author: Al Viro Date: Fri Nov 10 15:24:45 2023 -0500 [software coproarchaeology] dentry.h: kill a mysterious comment there's a strange comment in front of d_lookup() declaration: /* appendix may either be NULL or be used for transname suffixes */ Looks like nobody had been curious enough to track its history; it predates git, it predates bitkeeper and if you look through the pre-BK trees, you finally arrive at this in 2.1.44-for-davem: /* appendix may either be NULL or be used for transname suffixes */ -extern struct dentry * d_lookup(struct inode * dir, struct qstr * name, - struct qstr * appendix); +extern struct dentry * d_lookup(struct dentry * dir, struct qstr * name); In other words, it refers to the third argument d_lookup() used to have back then. It had been introduced in 2.1.43-pre, on June 12 1997, along with d_lookup(), only to be removed by July 4 1997, presumably when the Cthulhu-awful thing it used to be used for (look for CONFIG_TRANS_NAMES in 2.1.43-pre, and keep a heavy-duty barfbag ready) had been, er, noticed and recognized for what it had been. Despite the appendectomy, the comment remained. Some things really need to be put out of their misery... Signed-off-by: Al Viro commit 0d486510f86eb8162022ed61e6dc424a10909a10 Author: Al Viro Date: Fri Nov 10 15:22:40 2023 -0500 dentry.h: trim externs d_instantiate_unique() had been gone for 7 years; __d_lookup...() and shrink_dcache_for_umount() are fs/internal.h fodder. Signed-off-by: Al Viro commit 8219cb58feddcf28909072015f4e17e29f68c41a Author: Al Viro Date: Fri Nov 10 14:32:05 2023 -0500 kill d_{is,set}_fallthru() Introduced in 2015 and never had any in-tree users... Signed-off-by: Al Viro commit 0bec65a80f1b1ebcda05286e539a204713b70353 Author: Al Viro Date: Fri Nov 10 12:50:29 2023 -0500 DCACHE_COOKIE: RIP the last user gone in 2021... Signed-off-by: Al Viro commit 641c3ef5cb68a1426d42e6d3aba16db9bdfbe94f Author: Al Viro Date: Fri Nov 10 12:46:30 2023 -0500 DCACHE_... ->d_flags bits: switch to BIT() For bits 20..22 (inode type cached in ->d_flags) turn the definitions into expressions like (5 << 20); everything else turns into straight use of BIT() Signed-off-by: Al Viro commit 6d73c9ce0285adff18b54a5acadfbbbf8ba40dd5 Author: Al Viro Date: Sun Oct 29 13:41:06 2023 -0400 get rid of __dget() fold into the sole remaining caller Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit acfde6e8abee6b23e53b08606f861d9124288030 Author: Al Viro Date: Sat Nov 4 00:10:18 2023 -0400 struct dentry: get rid of randomize_layout idiocy This is beyond ridiculous. There is a reason why that thing is cacheline-aligned... Reviewed-by: Christian Brauner Signed-off-by: Al Viro commit 484d4fbfdafea581fdc2fd04df6781c3a59122c9 Author: Amir Goldstein Date: Sun Nov 12 08:55:57 2023 +0200 ovl: stop using d_alloc_anon()/d_instantiate_anon() Commit f9c34674bc60 ("vfs: factor out helpers d_instantiate_anon() and d_alloc_anon()") was introduced so overlayfs could initialize a non-dir disconnected overlay dentry before overlay inode is attached to it. Since commit ("0af950f57fef ovl: move ovl_entry into ovl_inode"), all ovl_obtain_alias() can do is set DCACHE_OP_*REVALIDATE flags in ->d_flags and OVL_E_UPPER_ALIAS flag in ->d_fsdata. The DCACHE_OP_*REVALIDATE flags and OVL_E_UPPER_ALIAS flag are irrelevant for a disconnected non-dir dentry, so it is better to use d_obtain_alias() instead of open coding it. Suggested-by: Al Viro Signed-off-by: Amir Goldstein Signed-off-by: Al Viro commit 16b3129e14bf2e7505512568b11c437c840a0c19 Merge: ff8867af01daa 46862ee854b4f Author: Alexei Starovoitov Date: Sat Nov 18 11:39:59 2023 -0800 Merge branch 'bpf-verifier-log-improvements' Andrii Nakryiko says: ==================== BPF verifier log improvements This patch set moves a big chunk of verifier log related code from gigantic verifier.c file into more focused kernel/bpf/log.c. This is not essential to the rest of functionality in this patch set, so I can undo it, but it felt like it's good to start chipping away from 20K+ verifier.c whenever we can. The main purpose of the patch set, though, is in improving verifier log further. Patches #3-#4 start printing out register state even if that register is spilled into stack slot. Previously we'd get only spilled register type, but no additional information, like SCALAR_VALUE's ranges. Super limiting during debugging. For cases of register spills smaller than 8 bytes, we also print out STACK_MISC/STACK_ZERO/STACK_INVALID markers. This, among other things, will make it easier to write tests for these mixed spill/misc cases. Patch #5 prints map name for PTR_TO_MAP_VALUE/PTR_TO_MAP_KEY/CONST_PTR_TO_MAP registers. In big production BPF programs, it's important to map assembly to actual map, and it's often non-trivial. Having map name helps. Patch #6 just removes visual noise in form of ubiquitous imm=0 and off=0. They are default values, omit them. Patch #7 is probably the most controversial, but it reworks how verifier log prints numbers. For small valued integers we use decimals, but for large ones we switch to hexadecimal. From personal experience this is a much more useful convention. We can tune what consitutes "small value", for now it's 16-bit range. Patch #8 prints frame number for PTR_TO_CTX registers, if that frame is different from the "current" one. This removes ambiguity and confusion, especially in complicated cases with multiple subprogs passing around pointers. v2->v3: - adjust reg_bounds tester to parse hex form of reg state as well; - print reg->range as unsigned (Alexei); v1->v2: - use verbose_snum() for range and offset in register state (Eduard); - fixed typos and added acks from Eduard and Stanislav. ==================== Link: https://lore.kernel.org/r/20231118034623.3320920-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 46862ee854b4f5a315d63b677ca3af14a89aefeb Author: Andrii Nakryiko Date: Fri Nov 17 19:46:23 2023 -0800 bpf: emit frameno for PTR_TO_STACK regs if it differs from current one It's possible to pass a pointer to parent's stack to child subprogs. In such case verifier state output is ambiguous not showing whether register container a pointer to "current" stack, belonging to current subprog (frame), or it's actually a pointer to one of parent frames. So emit this information if frame number differs between the state which register is part of. E.g., if current state is in frame 2 and it has a register pointing to stack in grand parent state (frame #0), we'll see something like 'R1=fp[0]-16', while "local stack pointer" will be just 'R2=fp-16'. Acked-by: Eduard Zingerman Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231118034623.3320920-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 0f8dbdbc641b45a5fa31d497f9fc83ffe1174fa3 Author: Andrii Nakryiko Date: Fri Nov 17 19:46:22 2023 -0800 bpf: smarter verifier log number printing logic Instead of always printing numbers as either decimals (and in some cases, like for "imm=%llx", in hexadecimals), decide the form based on actual values. For numbers in a reasonably small range (currently, [0, U16_MAX] for unsigned values, and [S16_MIN, S16_MAX] for signed ones), emit them as decimals. In all other cases, even for signed values, emit them in hexadecimals. For large values hex form is often times way more useful: it's easier to see an exact difference between 0xffffffff80000000 and 0xffffffff7fffffff, than between 18446744071562067966 and 18446744071562067967, as one particular example. Small values representing small pointer offsets or application constants, on the other hand, are way more useful to be represented in decimal notation. Adjust reg_bounds register state parsing logic to take into account this change. Acked-by: Eduard Zingerman Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231118034623.3320920-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 1db747d75b1dbe17bf4283ed87bd3b7a92010f34 Author: Andrii Nakryiko Date: Fri Nov 17 19:46:21 2023 -0800 bpf: omit default off=0 and imm=0 in register state log Simplify BPF verifier log further by omitting default (and frequently irrelevant) off=0 and imm=0 parts for non-SCALAR_VALUE registers. As can be seen from fixed tests, this is often a visual noise for PTR_TO_CTX register and even for PTR_TO_PACKET registers. Omitting default values follows the rest of register state logic: we omit default values to keep verifier log succinct and to highlight interesting state that deviates from default one. E.g., we do the same for var_off, when it's unknown, which gives no additional information. Acked-by: Eduard Zingerman Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231118034623.3320920-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 0c95c9fdb696f35c7864785ba84cb9a50152daff Author: Andrii Nakryiko Date: Fri Nov 17 19:46:20 2023 -0800 bpf: emit map name in register state if applicable and available In complicated real-world applications, whenever debugging some verification error through verifier log, it often would be very useful to see map name for PTR_TO_MAP_VALUE register. Usually this needs to be inferred from key/value sizes and maybe trying to guess C code location, but it's not always clear. Given verifier has the name, and it's never too long, let's just emit it for ptr_to_map_key, ptr_to_map_value, and const_ptr_to_map registers. We reshuffle the order a bit, so that map name, key size, and value size appear before offset and immediate values, which seems like a more logical order. Current output: R1_w=map_ptr(map=array_map,ks=4,vs=8,off=0,imm=0) But we'll get rid of useless off=0 and imm=0 parts in the next patch. Acked-by: Eduard Zingerman Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231118034623.3320920-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 67d43dfbb42d6575304daea67733c88fbf536a1c Author: Andrii Nakryiko Date: Fri Nov 17 19:46:19 2023 -0800 bpf: print spilled register state in stack slot Print the same register state representation when printing stack state, as we do for normal registers. Note that if stack slot contains subregister spill (1, 2, or 4 byte long), we'll still emit "m0?" mask for those bytes that are not part of spilled register. While means we can get something like fp-8=0000scalar() for a 4-byte spill with other 4 bytes still being STACK_ZERO. Some example before and after, taken from the log of pyperf_subprogs.bpf.o: 49: (7b) *(u64 *)(r10 -256) = r1 ; frame1: R1_w=ctx(off=0,imm=0) R10=fp0 fp-256_w=ctx 49: (7b) *(u64 *)(r10 -256) = r1 ; frame1: R1_w=ctx(off=0,imm=0) R10=fp0 fp-256_w=ctx(off=0,imm=0) 150: (7b) *(u64 *)(r10 -264) = r0 ; frame1: R0_w=map_value_or_null(id=6,off=0,ks=192,vs=4,imm=0) R10=fp0 fp-264_w=map_value_or_null 150: (7b) *(u64 *)(r10 -264) = r0 ; frame1: R0_w=map_value_or_null(id=6,off=0,ks=192,vs=4,imm=0) R10=fp0 fp-264_w=map_value_or_null(id=6,off=0,ks=192,vs=4,imm=0) 5192: (61) r1 = *(u32 *)(r10 -272) ; frame1: R1_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=15,var_off=(0x0; 0xf)) R10=fp0 fp-272= 5192: (61) r1 = *(u32 *)(r10 -272) ; frame1: R1_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=15,var_off=(0x0; 0xf)) R10=fp0 fp-272=????scalar(smin=smin32=0,smax=umax=smax32=umax32=15,var_off=(0x0; 0xf)) While at it, do a few other simple clean ups: - skip slot if it's not scratched before detecting whether it's valid; - move taking spilled_reg pointer outside of switch (only DYNPTR has to adjust that to get to the "main" slot); - don't recalculate types_buf second time for MISC/ZERO/default case. Acked-by: Eduard Zingerman Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231118034623.3320920-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 009f5465be3636e9ce795cfbd5d3109d8978774d Author: Andrii Nakryiko Date: Fri Nov 17 19:46:18 2023 -0800 bpf: extract register state printing Extract printing register state representation logic into a separate helper, as we are going to reuse it for spilled register state printing in the next patch. This also nicely reduces code nestedness. No functional changes. Acked-by: Eduard Zingerman Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231118034623.3320920-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 42feb6620accded89cad5f455665e21281813d79 Author: Andrii Nakryiko Date: Fri Nov 17 19:46:17 2023 -0800 bpf: move verifier state printing code to kernel/bpf/log.c Move a good chunk of code from verifier.c to log.c: verifier state verbose printing logic. This is an important and very much logging/debugging oriented code. It fits the overlall log.c's focus on verifier logging, and moving it allows to keep growing it without unnecessarily adding to verifier.c code that otherwise contains a core verification logic. There are not many shared dependencies between this code and the rest of verifier.c code, except a few single-line helpers for various register type checks and a bit of state "scratching" helpers. We move all such trivial helpers into include/bpf/bpf_verifier.h as static inlines. No functional changes in this patch. Acked-by: Eduard Zingerman Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231118034623.3320920-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit db840d389bad60ce6f3aadc1079da13e7e993a16 Author: Andrii Nakryiko Date: Fri Nov 17 19:46:16 2023 -0800 bpf: move verbose_linfo() into kernel/bpf/log.c verifier.c is huge. Let's try to move out parts that are logging-related into log.c, as we previously did with bpf_log() and other related stuff. This patch moves line info verbose output routines: it's pretty self-contained and isolated code, so there is no problem with this. Acked-by: Eduard Zingerman Acked-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231118034623.3320920-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit ce30df20b495a31b5fd14a92e160447935fc7ccb Merge: 39620a35076d6 23ec6972865b5 Author: David S. Miller Date: Sat Nov 18 17:42:32 2023 +0000 Merge tag 'mlx5-updates-2023-11-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux mlx5-updates-2023-11-13 1) Cleanup patches, leftovers from previous cycle 2) Allow sync reset flow when BF MGT interface device is present 3) Trivial ptp refactorings and improvements 4) Add local loopback counter to vport rep stats Signed-off-by: David S. Miller commit 39620a35076d6014cbaab0b405824005af40765b Merge: 72a813a4252fe c3ed16a64c0b0 Author: David S. Miller Date: Sat Nov 18 17:40:34 2023 +0000 Merge tag 'batadv-next-pullrequest-20231115' of git://git.open-mesh.org/linux-merge This feature/cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - Implement new multicast packet type, including its transmission, forwarding and parsing, by Linus Lüssing (3 patches) - Switch to new headers for sprintf and array size, by Sven Eckelmann (2 patches) Signed-off-by: David S. Miller commit 72a813a4252fe622ebdfd5caa948e91a767959e6 Merge: 4dce97b19175f af51d6bd0b130 Author: David S. Miller Date: Sat Nov 18 17:38:51 2023 +0000 Merge branch 'mlxsw-new-reset-flow' Petr Machata says: ==================== mlxsw: Add support for new reset flow Ido Schimmel writes: This patchset changes mlxsw to issue a PCI reset during probe and devlink reload so that the PCI firmware could be upgraded without a reboot. Unlike the old version of this patchset [1], in this version the driver no longer tries to issue a PCI reset by triggering a PCI link toggle on its own, but instead calls the PCI core to issue the reset. The PCI APIs require the device lock to be held which is why patches Patches #7 adds reset method quirk for NVIDIA Spectrum devices. Patch #8 adds a debug level print in PCI core so that device ready delay will be printed even if it is shorter than one second. Patches #9-#11 are straightforward preparations in mlxsw. Patch #12 finally implements the new reset flow in mlxsw. Patch #13 adds PCI reset handlers in mlxsw to avoid user space from resetting the device from underneath an unaware driver. Instead, the driver is gracefully de-initialized before the PCI reset and then initialized again after it. Patch #14 adds a PCI reset selftest to make sure this code path does not regress. [1] https://lore.kernel.org/netdev/cover.1679502371.git.petrm@nvidia.com/ ==================== Signed-off-by: David S. Miller commit af51d6bd0b130b06fc58b35fee8f93b0a5c77f21 Author: Ido Schimmel Date: Wed Nov 15 13:17:23 2023 +0100 selftests: mlxsw: Add PCI reset test Test that PCI reset works correctly by verifying that only the expected reset methods are supported and that after issuing the reset the ifindex of the port changes. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5e12d0898583026581e4f0506ff7c0b15a73a1c5 Author: Ido Schimmel Date: Wed Nov 15 13:17:22 2023 +0100 mlxsw: pci: Implement PCI reset handlers Implement reset_prepare() and reset_done() handlers that are invoked by the PCI core before and after issuing a PCI reset, respectively. Specifically, implement reset_prepare() by calling mlxsw_core_bus_device_unregister() and reset_done() by calling mlxsw_core_bus_device_register(). This is the same implementation as the reload_{down,up}() devlink operations with the following differences: 1. The devlink instance is unregistered and then registered again after the reset. 2. A reset via the device's command interface (using MRSR register) is not issued during reset_done() as PCI core already issued a PCI reset. Tested: # for i in $(seq 1 10); do echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset; done Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit f257c73e53561f6c223c4bce883138e9f18b5f50 Author: Ido Schimmel Date: Wed Nov 15 13:17:21 2023 +0100 mlxsw: pci: Add support for new reset flow The driver resets the device during probe and during a devlink reload. The current reset method reloads the current firmware version or a pending one, if one was previously flashed using devlink. However, the current reset method does not result in a PCI hot reset, preventing the PCI firmware from being upgraded, unless the system is rebooted. To solve this problem, a new reset command (6) was implemented in the firmware. Unlike the current command (1), after issuing the new command the device will not start the reset immediately, but only after a PCI hot reset. Implement the new reset method by first verifying that it is supported by the current firmware version by querying the Management Capabilities Mask (MCAM) register. If supported, issue the new reset command (6) via MRSR register followed by a PCI reset by calling __pci_reset_function_locked(). Once the PCI firmware is operational, go back to the regular reset flow and wait for the entire device to become ready. That is, repeatedly read the "system_status" register from the BAR until a value of "FW_READY" (0x5E) appears. Tested: # for i in $(seq 1 10); do devlink dev reload pci/0000:01:00.0; done Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 8d9da4672f94b4914d3b9318d911bfd1fcbfc9a1 Author: Amit Cohen Date: Wed Nov 15 13:17:20 2023 +0100 mlxsw: pci: Move software reset code to a separate function In general, the existing flow of software reset in the driver is: 1. Wait for system ready status. 2. Send MRSR command, to start the reset. 3. Wait for system ready status. This flow will be extended once a new reset command is supported. As a preparation, move step #2 to a separate function. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit bdf85f3a695ff8b9709658e576299fa5a3f6326d Author: Amit Cohen Date: Wed Nov 15 13:17:19 2023 +0100 mlxsw: pci: Rename mlxsw_pci_sw_reset() In the next patches, mlxsw_pci_sw_reset() will be extended to support more reset types and will not necessarily issue a software reset. Rename the function to reflect that. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e6dbab40fa096ed5e882e25cab54c3bdad57762c Author: Amit Cohen Date: Wed Nov 15 13:17:18 2023 +0100 mlxsw: Extend MRSR pack() function to support new commands Currently mlxsw_reg_mrsr_pack() always sets 'command=1'. As preparation for support of new reset flow, pass the command as an argument to the function and add an enum for this field. For now, always pass 'command=1' to the pack() function. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 0a5ef95923e01aa93210d22e0d62d66b601238d7 Author: Ido Schimmel Date: Wed Nov 15 13:17:17 2023 +0100 PCI: Add debug print for device ready delay Currently, the time it took a PCI device to become ready after reset is only printed if it was longer than 1000ms ('PCI_RESET_WAIT'). However, for debugging purposes it is useful to know this time even if it was shorter. For example, with the device I am working on, hardware engineers asked to verify that it becomes ready on the first try (no delay). To that end, add a debug level print that can be enabled using dynamic debug. Example: # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset # dmesg -c | grep ready # echo "file drivers/pci/pci.c +p" > /sys/kernel/debug/dynamic_debug/control # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset # dmesg -c | grep ready [ 396.060335] mlxsw_spectrum4 0000:01:00.0: ready 0ms after bus reset # echo "file drivers/pci/pci.c -p" > /sys/kernel/debug/dynamic_debug/control # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset # dmesg -c | grep ready Signed-off-by: Ido Schimmel Acked-by: Bjorn Helgaas Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 3ed48c80b28d8dcd584d6ddaf00c75b7673e1a05 Author: Ido Schimmel Date: Wed Nov 15 13:17:16 2023 +0100 PCI: Add no PM reset quirk for NVIDIA Spectrum devices Spectrum-{1,2,3,4} devices report that a D3hot->D0 transition causes a reset (i.e., they advertise NoSoftRst-). However, this transition does not have any effect on the device: It continues to be operational and network ports remain up. Advertising this support makes it seem as if a PM reset is viable for these devices. Mark it as unavailable to skip it when testing reset methods. Before: # cat /sys/bus/pci/devices/0000\:03\:00.0/reset_method pm bus After: # cat /sys/bus/pci/devices/0000\:03\:00.0/reset_method bus Signed-off-by: Ido Schimmel Acked-by: Bjorn Helgaas Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 527a07e176eab0f61b1beec9e29b99c9a5ec219f Author: Ido Schimmel Date: Wed Nov 15 13:17:15 2023 +0100 devlink: Add device lock assert in reload operation Add an assert to verify that the device lock is always held throughout reload operations. Tested the following flows with netdevsim and mlxsw while lockdep is enabled: netdevsim: # echo "10 1" > /sys/bus/netdevsim/new_device # devlink dev reload netdevsim/netdevsim10 # ip netns add bla # devlink dev reload netdevsim/netdevsim10 netns bla # ip netns del bla # echo 10 > /sys/bus/netdevsim/del_device mlxsw: # devlink dev reload pci/0000:01:00.0 # ip netns add bla # devlink dev reload pci/0000:01:00.0 netns bla # ip netns del bla # echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/remove # echo 1 > /sys/bus/pci/rescan Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit bf6b200bc80d18480f8d0fb61e185bb0587e633c Author: Ido Schimmel Date: Wed Nov 15 13:17:14 2023 +0100 devlink: Acquire device lock during reload command Device drivers register with devlink from their probe routines (under the device lock) by acquiring the devlink instance lock and calling devl_register(). Drivers that support a devlink reload usually implement the reload_{down, up}() operations in a similar fashion to their remove and probe routines, respectively. However, while the remove and probe routines are invoked with the device lock held, the reload operations are only invoked with the devlink instance lock held. It is therefore impossible for drivers to acquire the device lock from their reload operations, as this would result in lock inversion. The motivating use case for invoking the reload operations with the device lock held is in mlxsw which needs to trigger a PCI reset as part of the reload. The driver cannot call pci_reset_function() as this function acquires the device lock. Instead, it needs to call __pci_reset_function_locked which expects the device lock to be held. To that end, adjust devlink to always acquire the device lock before the devlink instance lock when performing a reload. Do that when reload is explicitly triggered by user space by specifying the 'DEVLINK_NL_FLAG_NEED_DEV_LOCK' flag in the pre_doit and post_doit operations of the reload command. A previous patch already handled the case where reload is invoked as part of netns dismantle. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit d32c38256db30a2d55b849e2c77342bc70d58c6e Author: Ido Schimmel Date: Wed Nov 15 13:17:13 2023 +0100 devlink: Allow taking device lock in pre_doit operations Introduce a new private flag ('DEVLINK_NL_FLAG_NEED_DEV_LOCK') to allow netlink commands to specify that they need to acquire the device lock in their pre_doit operation and release it in their post_doit operation. The reload command will use this flag in the subsequent patch. No functional changes intended. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit c8d0a7d6152bec970552786b77626f4b4c562f4d Author: Ido Schimmel Date: Wed Nov 15 13:17:12 2023 +0100 devlink: Enable the use of private flags in post_doit operations Currently, private flags (e.g., 'DEVLINK_NL_FLAG_NEED_PORT') are only used in pre_doit operations, but a subsequent patch will need to conditionally lock and unlock the device lock in pre and post doit operations, respectively. As a preparation, enable the use of private flags in post_doit operations in a similar fashion to how it is done for pre_doit operations. No functional changes intended. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit e21c52d7814f5768f05224e773644629fe124af2 Author: Ido Schimmel Date: Wed Nov 15 13:17:11 2023 +0100 devlink: Acquire device lock during netns dismantle Device drivers register with devlink from their probe routines (under the device lock) by acquiring the devlink instance lock and calling devl_register(). Drivers that support a devlink reload usually implement the reload_{down, up}() operations in a similar fashion to their remove and probe routines, respectively. However, while the remove and probe routines are invoked with the device lock held, the reload operations are only invoked with the devlink instance lock held. It is therefore impossible for drivers to acquire the device lock from their reload operations, as this would result in lock inversion. The motivating use case for invoking the reload operations with the device lock held is in mlxsw which needs to trigger a PCI reset as part of the reload. The driver cannot call pci_reset_function() as this function acquires the device lock. Instead, it needs to call __pci_reset_function_locked which expects the device lock to be held. To that end, adjust devlink to always acquire the device lock before the devlink instance lock when performing a reload. For now, only do that when reload is triggered as part of netns dismantle. Subsequent patches will handle the case where reload is explicitly triggered by user space. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 526dd6d7877b80b1f56d87156b65b8227c69d59f Author: Ido Schimmel Date: Wed Nov 15 13:17:10 2023 +0100 devlink: Move private netlink flags to C file The flags are not used outside of the C file so move them there. Suggested-by: Jiri Pirko Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4dce97b19175fdf125584bbc350f768cec59ed34 Merge: f9672265958b1 b8291cf3d1180 Author: David S. Miller Date: Sat Nov 18 15:00:51 2023 +0000 Merge branch 'ncsi-mac-address-command' Patrick Williams says: ==================== net/ncsi: Add NC-SI 1.2 Get MC MAC Address command NC-SI 1.2 has now been published[1] and adds a new command for "Get MC MAC Address". This is often used by BMCs to get the assigned MAC address for the channel used by the BMC. This change set has been tested on a Broadcomm 200G NIC with updated firmware for NC-SI 1.2 and at least one other non-public NIC design. 1. https://www.dmtf.org/sites/default/files/standards/documents/DSP0222_1.2.0.pdf ==================== Signed-off-by: David S. Miller commit b8291cf3d1180b5b61299922f17c9441616a805a Author: Peter Delevoryas Date: Tue Nov 14 10:07:35 2023 -0600 net/ncsi: Add NC-SI 1.2 Get MC MAC Address command This change adds support for the NC-SI 1.2 Get MC MAC Address command, specified here: https://www.dmtf.org/sites/default/files/standards/documents/DSP0222_1.2.0.pdf It serves the exact same function as the existing OEM Get MAC Address commands, so if a channel reports that it supports NC-SI 1.2, we prefer to use the standard command rather than the OEM command. Verified with an invalid MAC address and 2 valid ones: [ 55.137072] ftgmac100 1e690000.ftgmac eth0: NCSI: Received 3 provisioned MAC addresses [ 55.137614] ftgmac100 1e690000.ftgmac eth0: NCSI: MAC address 0: 00:00:00:00:00:00 [ 55.138026] ftgmac100 1e690000.ftgmac eth0: NCSI: MAC address 1: fa:ce:b0:0c:20:22 [ 55.138528] ftgmac100 1e690000.ftgmac eth0: NCSI: MAC address 2: fa:ce:b0:0c:20:23 [ 55.139241] ftgmac100 1e690000.ftgmac eth0: NCSI: Unable to assign 00:00:00:00:00:00 to device [ 55.140098] ftgmac100 1e690000.ftgmac eth0: NCSI: Set MAC address to fa:ce:b0:0c:20:22 Signed-off-by: Peter Delevoryas Signed-off-by: Patrick Williams Signed-off-by: David S. Miller commit 3084b58bfd0b9e4b5e034f31f31b42977db35f12 Author: Peter Delevoryas Date: Tue Nov 14 10:07:34 2023 -0600 net/ncsi: Fix netlink major/minor version numbers The netlink interface for major and minor version numbers doesn't actually return the major and minor version numbers. It reports a u32 that contains the (major, minor, update, alpha1) components as the major version number, and then alpha2 as the minor version number. For whatever reason, the u32 byte order was reversed (ntohl): maybe it was assumed that the encoded value was a single big-endian u32, and alpha2 was the minor version. The correct way to get the supported NC-SI version from the network controller is to parse the Get Version ID response as described in 8.4.44 of the NC-SI spec[1]. Get Version ID Response Packet Format Bits +--------+--------+--------+--------+ Bytes | 31..24 | 23..16 | 15..8 | 7..0 | +-------+--------+--------+--------+--------+ | 0..15 | NC-SI Header | +-------+--------+--------+--------+--------+ | 16..19| Response code | Reason code | +-------+--------+--------+--------+--------+ |20..23 | Major | Minor | Update | Alpha1 | +-------+--------+--------+--------+--------+ |24..27 | reserved | Alpha2 | +-------+--------+--------+--------+--------+ | .... other stuff .... | The major, minor, and update fields are all binary-coded decimal (BCD) encoded [2]. The spec provides examples below the Get Version ID response format in section 8.4.44.1, but for practical purposes, this is an example from a live network card: root@bmc:~# ncsi-util 0x15 NC-SI Command Response: cmd: GET_VERSION_ID(0x15) Response: COMMAND_COMPLETED(0x0000) Reason: NO_ERROR(0x0000) Payload length = 40 20: 0xf1 0xf1 0xf0 0x00 <<<<<<<<< (major, minor, update, alpha1) 24: 0x00 0x00 0x00 0x00 <<<<<<<<< (_, _, _, alpha2) 28: 0x6d 0x6c 0x78 0x30 32: 0x2e 0x31 0x00 0x00 36: 0x00 0x00 0x00 0x00 40: 0x16 0x1d 0x07 0xd2 44: 0x10 0x1d 0x15 0xb3 48: 0x00 0x17 0x15 0xb3 52: 0x00 0x00 0x81 0x19 This should be parsed as "1.1.0". "f" in the upper-nibble means to ignore it, contributing zero. If both nibbles are "f", I think the whole field is supposed to be ignored. Major and minor are "required", meaning they're not supposed to be "ff", but the update field is "optional" so I think it can be ff. I think the simplest thing to do is just set the major and minor to zero instead of juggling some conditional logic or something. bcd2bin() from "include/linux/bcd.h" seems to assume both nibbles are 0-9, so I've provided a custom BCD decoding function. Alpha1 and alpha2 are ISO/IEC 8859-1 encoded, which just means ASCII characters as far as I can tell, although the full encoding table for non-alphabetic characters is slightly different (I think). I imagine the alpha fields are just supposed to be alphabetic characters, but I haven't seen any network cards actually report a non-zero value for either. If people wrote software against this netlink behavior, and were parsing the major and minor versions themselves from the u32, then this would definitely break their code. [1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0222_1.0.0.pdf [2] https://en.wikipedia.org/wiki/Binary-coded_decimal [2] https://en.wikipedia.org/wiki/ISO/IEC_8859-1 Signed-off-by: Peter Delevoryas Fixes: 138635cc27c9 ("net/ncsi: NCSI response packet handler") Signed-off-by: David S. Miller commit c797ce168930ce3d62a9b7fc4d7040963ee6a01e Author: Peter Delevoryas Date: Tue Nov 14 10:07:33 2023 -0600 net/ncsi: Simplify Kconfig/dts control flow Background: 1. CONFIG_NCSI_OEM_CMD_KEEP_PHY If this is enabled, we send an extra OEM Intel command in the probe sequence immediately after discovering a channel (e.g. after "Clear Initial State"). 2. CONFIG_NCSI_OEM_CMD_GET_MAC If this is enabled, we send one of 3 OEM "Get MAC Address" commands from Broadcom, Mellanox (Nvidida), and Intel in the *configuration* sequence for a channel. 3. mellanox,multi-host (or mlx,multi-host) Introduced by this patch: https://lore.kernel.org/all/20200108234341.2590674-1-vijaykhemka@fb.com/ Which was actually originally from cosmo.chou@quantatw.com: https://github.com/facebook/openbmc-linux/commit/9f132a10ec48db84613519258cd8a317fb9c8f1b Cosmo claimed that the Nvidia ConnectX-4 and ConnectX-6 NIC's don't respond to Get Version ID, et. al in the probe sequence unless you send the Set MC Affinity command first. Problem Statement: We've been using a combination of #ifdef code blocks and IS_ENABLED() conditions to conditionally send these OEM commands. It makes adding any new code around these commands hard to understand. Solution: In this patch, I just want to remove the conditionally compiled blocks of code, and always use IS_ENABLED(...) to do dynamic control flow. I don't think the small amount of code this adds to non-users of the OEM Kconfigs is a big deal. Signed-off-by: Peter Delevoryas Signed-off-by: David S. Miller commit f9672265958b1781d3e3d2a4c6d54925e51bd916 Merge: 18de1e517ed37 ee60ea6be0d3a Author: David S. Miller Date: Sat Nov 18 14:52:58 2023 +0000 Merge branch 'net-make-timestamping-selectable' Kory Maincent says: ==================== net: Make timestamping selectable Up until now, there was no way to let the user select the layer at which time stamping occurs. The stack assumed that PHY time stamping is always preferred, but some MAC/PHY combinations were buggy. This series updates the default MAC/PHY default timestamping and aims to allow the user to select the desired layer administratively. Changes in v2: - Move selected_timestamping_layer variable of the concerned patch. - Use sysfs_streq instead of strmcmp. - Use the PHY timestamp only if available. Changes in v3: - Expose the PTP choice to ethtool instead of sysfs. You can test it with the ethtool source on branch feature_ptp of: https://github.com/kmaincent/ethtool - Added a devicetree binding to select the preferred timestamp. Changes in v4: - Move on to ethtool netlink instead of ioctl. - Add a netdev notifier to allow packet trapping by the MAC in case of PHY time stamping. - Add a PHY whitelist to not break the old PHY default time-stamping preference API. Changes in v5: - Update to ndo_hwstamp_get/set. This bring several new patches. - Add few patches to make the glue. - Convert macb to ndo_hwstamp_get/set. - Add netlink specs description of new ethtool commands. - Removed netdev notifier. - Split the patches that expose the timestamping to userspace to separate the core and ethtool development. - Add description of software timestamping. - Convert PHYs hwtstamp callback to use kernel_hwtstamp_config. Changes in v6: - Few fixes from the reviews. - Replace the allowlist to default_timestamp flag to know which phy is using old API behavior. - Rename the timestamping layer enum values. - Move to a simple enum instead of the mix between enum and bitfield. - Update ts_info and ts-set in software timestamping case. Changes in v7: - Fix a temporary build error. - Link to v6: https://lore.kernel.org/r/20231019-feature_ptp_netnext-v6-0-71affc27b0e5@bootlin.com ==================== Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit ee60ea6be0d3a96e57edf07da923a9c0f27f37ce Author: Kory Maincent Date: Tue Nov 14 12:28:44 2023 +0100 netlink: specs: Introduce time stamping set command Add a new commands allowing to set the time stamping. Example usage : ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema \ --do ts-list-get \ --json '{"header":{"dev-name":"eth0"}}' {'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'ts-list-layer': b'\x02\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00'} ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do ts-set \ --json '{"header":{"dev-name":"eth0"}, "ts-layer":5}' none ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do ts-get \ --json '{"header":{"dev-name":"eth0"}}' {'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'ts-layer': 5} Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit 152c75e1d00200edc4da1beb67dd099a462ea86b Author: Kory Maincent Date: Tue Nov 14 12:28:43 2023 +0100 net: ethtool: ts: Let the active time stamping layer be selectable Now that the current timestamp is saved in a variable lets add the ETHTOOL_MSG_TS_SET ethtool netlink socket to make it selectable. Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit 091fab122869a39e1bac2cc34df9b737a6f6f36d Author: Kory Maincent Date: Tue Nov 14 12:28:42 2023 +0100 net: ethtool: ts: Update GET_TS to reply the current selected timestamp As the default selected timestamp API change we have to change also the timestamp return by ethtool. This patch return now the current selected timestamp. Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit 0f7f463d4821a4f52fa5c0a961389e651d50c384 Author: Kory Maincent Date: Tue Nov 14 12:28:41 2023 +0100 net: Change the API of PHY default timestamp to MAC Change the API to select MAC default time stamping instead of the PHY. Indeed the PHY is closer to the wire therefore theoretically it has less delay than the MAC timestamping but the reality is different. Due to lower time stamping clock frequency, latency in the MDIO bus and no PHC hardware synchronization between different PHY, the PHY PTP is often less precise than the MAC. The exception is for PHY designed specially for PTP case but these devices are not very widespread. For not breaking the compatibility I introduce a default_timestamp flag in phy_device that is set by the phy driver to know we are using the old API behavior. The phy_set_timestamp function is called at each call of phy_attach_direct. In case of MAC driver using phylink this function is called when the interface is turned up. Then if the interface goes down and up again the last choice of timestamp will be overwritten by the default choice. A solution could be to cache the timestamp status but it can bring other issues. In case of SFP, if we change the module, it doesn't make sense to blindly re-set the timestamp back to PHY, if the new module has a PHY with mediocre timestamping capabilities. Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit 51bdf3165f012827644c474a6d905baa3de3f1ea Author: Kory Maincent Date: Tue Nov 14 12:28:40 2023 +0100 net: Replace hwtstamp_source by timestamping layer Replace hwtstamp_source which is only used by the kernel_hwtstamp_config structure by the more widely use timestamp_layer structure. This is done to prepare the support of selectable timestamping source. Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit aed5004ee7a0e6f198a6b26fb6a1aa21588a9539 Author: Kory Maincent Date: Tue Nov 14 12:28:39 2023 +0100 netlink: specs: Introduce new netlink command to list available time stamping layers Add a new commands allowing to list available time stamping layers on a netdevice's link. Example usage : ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema \ --do ts-list-get \ --json '{"header":{"dev-name":"eth0"}}' {'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'ts-list-layer': b'\x01\x00\x00\x00\x05\x00\x00\x00'} Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit d905f9c753295ee5a30af265f4b724f10050e7d3 Author: Kory Maincent Date: Tue Nov 14 12:28:38 2023 +0100 net: ethtool: Add a command to list available time stamping layers Introduce a new netlink message that lists all available time stamping layers on a given interface. Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit bb8645b00ced1db036adf9ad7d9baaf1890aa2e6 Author: Kory Maincent Date: Tue Nov 14 12:28:37 2023 +0100 netlink: specs: Introduce new netlink command to get current timestamp Add a new commands allowing to get the current time stamping on a netdevice's link. Example usage : ./ynl/cli.py --spec netlink/specs/ethtool.yaml --no-schema --do ts-get \ --json '{"header":{"dev-name":"eth0"}}' {'header': {'dev-index': 3, 'dev-name': 'eth0'}, 'ts-layer': 1} Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit 11d55be06df0aedf19b05ab61c2d26b31a3c7e64 Author: Kory Maincent Date: Tue Nov 14 12:28:36 2023 +0100 net: ethtool: Add a command to expose current time stamping layer Time stamping on network packets may happen either in the MAC or in the PHY, but not both. In preparation for making the choice selectable, expose both the current layers via ethtool. In accordance with the kernel implementation as it stands, the current layer will always read as "phy" when a PHY time stamping device is present. Future patches will allow changing the current layer administratively. Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit acec05fb78abb74fdab2195bfca9a6d38a732643 Author: Kory Maincent Date: Tue Nov 14 12:28:35 2023 +0100 net_tstamp: Add TIMESTAMPING SOFTWARE and HARDWARE mask Timestamping software or hardware flags are often used as a group, therefore adding these masks will easier future use. I did not use SOF_TIMESTAMPING_SYS_HARDWARE flag as it is deprecated and not use at all. Signed-off-by: Kory Maincent Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 915d25a9d69be969c1cc6c1dd0c3861f6da7b55e Author: Kory Maincent Date: Tue Nov 14 12:28:34 2023 +0100 net: phy: micrel: fix ts_info value in case of no phc In case of no phc we should not return SOFTWARE TIMESTAMPING flags as we do not know whether the netdev supports of timestamping. Remove it from the lan8841_ts_info and simply return 0. Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit 011dd3b3f83f9c89605c640424e05845b84f2dad Author: Kory Maincent Date: Tue Nov 14 12:28:33 2023 +0100 net: Make dev_set_hwtstamp_phylib accessible Make the dev_set_hwtstamp_phylib function accessible in prevision to use it from ethtool to reset the tstamp current configuration. Reviewed-by: Florian Fainelli Signed-off-by: Kory Maincent Signed-off-by: David S. Miller commit 202cb220026e4dabb592852e7555e264656445ac Author: Kory Maincent Date: Tue Nov 14 12:28:32 2023 +0100 net: macb: Convert to ndo_hwtstamp_get() and ndo_hwtstamp_set() The hardware timestamping through ndo_eth_ioctl() is going away. Convert the macb driver to the new API before that can be removed. Signed-off-by: Kory Maincent Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b8768dc4077712915f045ba1b198f521493c7914 Author: Richard Cochran Date: Tue Nov 14 12:28:31 2023 +0100 net: ethtool: Refactor identical get_ts_info implementations. The vlan, macvlan and the bonding drivers call their "real" device driver in order to report the time stamping capabilities. Provide a core ethtool helper function to avoid copy/paste in the stack. Signed-off-by: Richard Cochran Signed-off-by: Kory Maincent Reviewed-by: Florian Fainelli Reviewed-by: Jay Vosburgh Signed-off-by: David S. Miller commit 430dc3256d5790361135c69af5de1aaa07248e8a Author: Kory Maincent Date: Tue Nov 14 12:28:30 2023 +0100 net: phy: Remove the call to phy_mii_ioctl in phy_hwstamp_get/set __phy_hwtstamp_set function were calling the phy_mii_ioctl function which will then use the ifreq pointer to call the hwtstamp callback. Now that ifreq has been removed from the hwstamp callback parameters it seems more logical to not go through the phy_mii_ioctl function and pass directly kernel_hwtstamp_config parameter to the hwtstamp callback. Lets do the same for __phy_hwtstamp_get function and return directly EOPNOTSUPP as SIOCGHWTSTAMP is not supported for now for the PHYs. Signed-off-by: Kory Maincent Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 446e2305827b76e8081057ce56bbd2703b4da8a9 Author: Kory Maincent Date: Tue Nov 14 12:28:29 2023 +0100 net: Convert PHYs hwtstamp callback to use kernel_hwtstamp_config The PHYs hwtstamp callback are still getting the timestamp config from ifreq and using copy_from/to_user. Get rid of these functions by using timestamp configuration in parameter. This also allow to move on to kernel_hwtstamp_config and be similar to net devices using the new ndo_hwstamp_get/set. This adds the possibility to manipulate the timestamp configuration from the kernel which was not possible with the copy_from/to_user. Signed-off-by: Kory Maincent Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f73f6181eb057671e358ebac8ed7f0014f12efb8 Author: Randy Dunlap Date: Wed Aug 30 09:32:15 2023 -0700 userns: eliminate many kernel-doc warnings Drop the kernel-doc "/**" notation from 8 structs or functions to prevent 22 kernel-doc warnings (samples below). user_namespace.c:239: warning: Function parameter or member 'map_up' not described in 'idmap_key' user_namespace.c:246: warning: Function parameter or member 'k' not described in 'cmp_map_id' user_namespace.c:277: warning: Function parameter or member 'extents' not described in 'map_id_range_down_max' user_namespace.c:295: warning: Function parameter or member 'extents' not described in 'map_id_range_down_base' user_namespace.c:344: warning: Function parameter or member 'extents' not described in 'map_id_up_base' user_namespace.c:364: warning: Function parameter or member 'extents' not described in 'map_id_up_max' user_namespace.c:776: warning: Function parameter or member 'map' not described in 'insert_extent' user_namespace.c:844: warning: Function parameter or member 'map' not described in 'sort_idmaps' Fixes: 6397fac4915a ("userns: bump idmap limits to 340") Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20230830163215.13193-1-rdunlap@infradead.org Cc: Eric Biederman Cc: Christian Brauner Signed-off-by: Christian Brauner commit d218569004b6f8242d176aad250ed66becc80cae Author: Bagas Sanjaya Date: Tue Oct 31 18:47:28 2023 +0700 fs: Clarify "non-RCY" in access_override_creds() comment The term is originally intended as a joke that stands for "non-racy". This trips new contributors who mistake it for RCU typo [1]. Replace the term with more-explicit wording. Link: https://lore.kernel.org/r/20231030-debatten-nachrangig-f58abcdac530@brauner/ Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20231031114728.41485-1-bagasdotme@gmail.com Signed-off-by: Christian Brauner commit 297945d9bc13a10e2ce39f0a3aad38c6812435a5 Author: Abhinav Singh Date: Wed Nov 8 10:15:50 2023 +0530 fs : Fix warning using plain integer as NULL Sparse static analysis tools generate a warning with this message "Using plain integer as NULL pointer". In this case this warning is being shown because we are trying to initialize pointer to NULL using integer value 0. Signed-off-by: Abhinav Singh Link: https://lore.kernel.org/r/20231108044550.1006555-1-singhabhinav9051571833@gmail.com Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit db3db63b1d17c98f69e894edaa2b0b364ecde7a9 Author: Mateusz Guzik Date: Sat Nov 4 23:11:17 2023 +0100 vfs: remove a redundant might_sleep in wait_on_inode wait_on_bit already does it. Signed-off-by: Mateusz Guzik Link: https://lore.kernel.org/r/20231104221117.2584708-1-mjguzik@gmail.com Signed-off-by: Christian Brauner commit afde134b5bd02a5c719336ca1d0d3cb7e4def70e Author: Jan Kara Date: Wed Nov 1 18:43:12 2023 +0100 ext4: Block writes to journal device Ask block layer to not allow other writers to open block device used for ext4 journal. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20231101174325.10596-7-jack@suse.cz Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 3584c8f48a70c1f74c7b7bab59cf22bb66224649 Author: Jan Kara Date: Wed Nov 1 18:43:11 2023 +0100 xfs: Block writes to log device Ask block layer to not allow other writers to open block devices used for xfs log and realtime devices. Reviewed-by: Darrick J. Wong Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20231101174325.10596-6-jack@suse.cz Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 6f861765464f43a71462d52026fbddfc858239a5 Author: Jan Kara Date: Wed Nov 1 18:43:10 2023 +0100 fs: Block writes to mounted block devices Ask block layer to block writes to block devices mounted by filesystems. Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20231101174325.10596-5-jack@suse.cz Reviewed-by: Christian Brauner Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit ead622674df5a3ae575b964090bee65f6b7f805f Author: Jan Kara Date: Wed Nov 1 18:43:09 2023 +0100 btrfs: Do not restrict writes to btrfs devices Btrfs device probing code needs adaptation so that it works when writes are restricted to its mounted devices. Since btrfs maintainer wants to merge these changes through btrfs tree and there are review bandwidth issues with that, let's not block all other filesystems and just not restrict writes to btrfs devices for now. CC: CC: David Sterba CC: Josef Bacik CC: Chris Mason Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20231101174325.10596-4-jack@suse.cz Acked-by: David Sterba Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit ed5cc702d311c14b653323d76062b0294effa66e Author: Jan Kara Date: Wed Nov 1 18:43:08 2023 +0100 block: Add config option to not allow writing to mounted devices Writing to mounted devices is dangerous and can lead to filesystem corruption as well as crashes. Furthermore syzbot comes with more and more involved examples how to corrupt block device under a mounted filesystem leading to kernel crashes and reports we can do nothing about. Add tracking of writers to each block device and a kernel cmdline argument which controls whether other writeable opens to block devices open with BLK_OPEN_RESTRICT_WRITES flag are allowed. We will make filesystems use this flag for used devices. Note that this effectively only prevents modification of the particular block device's page cache by other writers. The actual device content can still be modified by other means - e.g. by issuing direct scsi commands, by doing writes through devices lower in the storage stack (e.g. in case loop devices, DM, or MD are involved) etc. But blocking direct modifications of the block device page cache is enough to give filesystems a chance to perform data validation when loading data from the underlying storage and thus prevent kernel crashes. Syzbot can use this cmdline argument option to avoid uninteresting crashes. Also users whose userspace setup does not need writing to mounted block devices can set this option for hardening. Link: https://lore.kernel.org/all/60788e5d-5c7c-1142-e554-c21d709acfd9@linaro.org Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20231101174325.10596-3-jack@suse.cz Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit cd34758c5238ae6976b10fe15bba7031b409c969 Author: Jan Kara Date: Wed Nov 1 18:43:07 2023 +0100 block: Remove blkdev_get_by_*() functions blkdev_get_by_*() and blkdev_put() functions are now unused. Remove them. Acked-by: Christoph Hellwig Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20231101174325.10596-2-jack@suse.cz Reviewed-by: Christian Brauner Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 1bfdc94b28cf1c89b5b3fb062b1defe51fdba163 Author: Jan Kara Date: Wed Nov 1 18:43:06 2023 +0100 bcachefs: Convert to bdev_open_by_path() Convert bcachefs to use bdev_open_by_path() and pass the handle around. CC: Kent Overstreet CC: Brian Foster CC: Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20231101174325.10596-1-jack@suse.cz Acked-by: Kent Overstreet Reviewed-by: Jens Axboe Signed-off-by: Christian Brauner commit 7366f8b6fc6aa21c4199cb5d337b023df69745b0 Author: Christian Brauner Date: Sat Nov 4 15:00:13 2023 +0100 fs: handle freezing from multiple devices Before [1] freezing a filesystems through the block layer only worked for the main block device as the owning superblock of additional block devices could not be found. Any filesystem that made use of multiple block devices would only be freezable via it's main block device. For example, consider xfs over device mapper with /dev/dm-0 as main block device and /dev/dm-1 as external log device. Two freeze requests before [1]: (1) dmsetup suspend /dev/dm-0 on the main block device bdev_freeze(dm-0) -> dm-0->bd_fsfreeze_count++ -> freeze_super(xfs-sb) The owning superblock is found and the filesystem gets frozen. Returns 0. (2) dmsetup suspend /dev/dm-1 on the log device bdev_freeze(dm-1) -> dm-1->bd_fsfreeze_count++ The owning superblock isn't found and only the block device freeze count is incremented. Returns 0. Two freeze requests after [1]: (1') dmsetup suspend /dev/dm-0 on the main block device bdev_freeze(dm-0) -> dm-0->bd_fsfreeze_count++ -> freeze_super(xfs-sb) The owning superblock is found and the filesystem gets frozen. Returns 0. (2') dmsetup suspend /dev/dm-1 on the log device bdev_freeze(dm-0) -> dm-0->bd_fsfreeze_count++ -> freeze_super(xfs-sb) The owning superblock is found and the filesystem gets frozen. Returns -EBUSY. When (2') is called we initiate a freeze from another block device of the same superblock. So we increment the bd_fsfreeze_count for that additional block device. But we now also find the owning superblock for additional block devices and call freeze_super() again which reports -EBUSY. This can be reproduced through xfstests via: mkfs.xfs -f -m crc=1,reflink=1,rmapbt=1, -i sparse=1 -lsize=1g,logdev=/dev/nvme1n1p4 /dev/nvme1n1p3 mkfs.xfs -f -m crc=1,reflink=1,rmapbt=1, -i sparse=1 -lsize=1g,logdev=/dev/nvme1n1p6 /dev/nvme1n1p5 FSTYP=xfs export TEST_DEV=/dev/nvme1n1p3 export TEST_DIR=/mnt/test export TEST_LOGDEV=/dev/nvme1n1p4 export SCRATCH_DEV=/dev/nvme1n1p5 export SCRATCH_MNT=/mnt/scratch export SCRATCH_LOGDEV=/dev/nvme1n1p6 export USE_EXTERNAL=yes sudo ./check generic/311 Current semantics allow two concurrent freezers: one initiated from userspace via FREEZE_HOLDER_USERSPACE and one initiated from the kernel via FREEZE_HOLDER_KERNEL. If there are multiple concurrent freeze requests from either FREEZE_HOLDER_USERSPACE or FREEZE_HOLDER_KERNEL -EBUSY is returned. We need to preserve these semantics because as they are uapi via FIFREEZE and FITHAW ioctl()s. IOW, freezes don't nest for FIFREEZE and FITHAW. Other kernels consumers rely on non-nesting freezes as well. With freezes initiated from the block layer freezes need to nest if the same superblock is frozen via multiple devices. So we need to start counting the number of freeze requests. If FREEZE_MAY_NEST is passed alongside FREEZE_HOLDER_KERNEL or FREEZE_HOLDER_USERSPACE we allow the caller to nest freeze calls. To accommodate the old semantics we split the freeze counter into two counting kernel initiated and userspace initiated freezes separately. We can then also stop recording FREEZE_HOLDER_* in struct sb_writers. We also simplify freezing by making all concurrent freezers share a single active superblock reference count instead of having separate references for kernel and userspace. I don't see why we would need two active reference counts. Neither FREEZE_HOLDER_KERNEL nor FREEZE_HOLDER_USERSPACE can put the active reference as long as they are concurrent freezers anwyay. That was already true before we allowed nesting freezes. Survives various fstests runs with different options including the reproducer, online scrub, and online repair, fsfreze, and so on. Also survives blktests. Link: https://lore.kernel.org/linux-block/87bkccnwxc.fsf@debian-BULLSEYE-live-builder-AMD64 Link: https://lore.kernel.org/r/20231104-vfs-multi-device-freeze-v2-2-5b5b69626eac@kernel.org Fixes: 288d8706abfc ("bdev: implement freeze and thaw holder operations") [1] # no backport needed Tested-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Reported-by: Chandan Babu R Signed-off-by: Christian Brauner commit efa5d065b4a0790061921194019c321ad335b8db Author: Christian Brauner Date: Sat Nov 4 15:00:12 2023 +0100 fs: remove dead check Above we call super_lock_excl() which waits until the superblock is SB_BORN and since SB_BORN is never unset once set this check can never fire. Plus, we also hold an active reference at this point already so this superblock can't even be shutdown. Link: https://lore.kernel.org/r/20231104-vfs-multi-device-freeze-v2-1-5b5b69626eac@kernel.org Tested-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 5a8e94c0158f43341334e69a74b6dfa317ba3d2e Author: Jan Kara Date: Wed Nov 1 18:27:39 2023 +0100 nilfs2: simplify device handling We removed all codepaths where s_umount is taken beneath open_mutex and bd_holder_lock so don't make things more complicated than they need to be and hold s_umount over block device opening. CC: Ryusuke Konishi CC: Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20231101172739.8676-1-jack@suse.cz Acked-by: Ryusuke Konishi Signed-off-by: Christian Brauner commit 24c372d58223b83d0be5230c1a0e9370b60fb0ea Author: Christoph Hellwig Date: Fri Oct 27 08:40:01 2023 +0200 fs: streamline thaw_super_locked Add a new out_unlock label to share code that just releases s_umount and returns an error, and rename and reuse the out label that deactivates the sb for one more case. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20231027064001.GA9469@lst.de Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 218de67764e5c4682892427dd78b382e1709674c Author: Christian Brauner Date: Tue Oct 24 16:53:41 2023 +0200 ext4: simplify device handling We removed all codepaths where s_umount is taken beneath open_mutex and bd_holder_lock so don't make things more complicated than they need to be and hold s_umount over block device opening. Link: https://lore.kernel.org/r/20231024-vfs-super-rework-v1-3-37a8aa697148@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 653bee386c0875016cb36ed50f00bb0d8a7fcc7f Author: Christian Brauner Date: Tue Oct 24 16:53:40 2023 +0200 xfs: simplify device handling We removed all codepaths where s_umount is taken beneath open_mutex and bd_holder_lock so don't make things more complicated than they need to be and hold s_umount over block device opening. Link: https://lore.kernel.org/r/20231024-vfs-super-rework-v1-2-37a8aa697148@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 761c47a973441cf2a3602d2a9d0407eb0ec6ce1c Author: Christian Brauner Date: Tue Oct 24 16:53:39 2023 +0200 fs: simplify setup_bdev_super() calls There's no need to drop s_umount anymore now that we removed all sources where s_umount is taken beneath open_mutex or bd_holder_lock. Link: https://lore.kernel.org/r/20231024-vfs-super-rework-v1-1-37a8aa697148@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit e419cf3ebaee694a826ddcfb350f1b1ebaf1e599 Author: Christian Brauner Date: Tue Oct 24 15:01:16 2023 +0200 blkdev: comment fs_holder_ops Add a comment to @fs_holder_ops that @holder must point to a superblock. Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-10-599c19f4faac@kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Jan Kara Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit 01bc8e9ae23a4257e12c87f5caa0f21034e7b40b Author: Christian Brauner Date: Tue Oct 24 15:01:15 2023 +0200 porting: document block device freeze and thaw changes Link: https://lore.kernel.org/r/20230927-vfs-super-freeze-v1-7-ecc36d9ab4d9@kernel.org Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-9-599c19f4faac@kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 97cbed04e71da698d324c585f79f981b032a1bd5 Author: Christian Brauner Date: Tue Oct 24 15:01:14 2023 +0200 fs: remove unused helper The grab_super() helper is now only used by grab_super_dead(). Merge the two helpers into one. Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-8-599c19f4faac@kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 90f95dc415de23267b888f8238c4a19fa0f66b89 Author: Christian Brauner Date: Tue Oct 24 15:01:13 2023 +0200 super: remove bd_fsfreeze_sb Remove bd_fsfreeze_sb as it's now unused and can be removed. Also move bd_fsfreeze_count down to not have it weirdly placed in the middle of the holder fields. Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-7-599c19f4faac@kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Jan Kara Suggested-by: Jan Kara Suggested-by: Christoph Hellwig Signed-off-by: Christian Brauner commit 434f8d8299f2a0c97578f77ab23a70cd0ae56544 Author: Christian Brauner Date: Tue Oct 24 15:01:12 2023 +0200 fs: remove get_active_super() This function is now unused so remove it. One less function that uses the global superblock list. Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-6-599c19f4faac@kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 49ef8832fb1a9e0da0020eb17480fd286433bc13 Author: Christian Brauner Date: Wed Sep 27 15:21:16 2023 +0200 bdev: implement freeze and thaw holder operations The old method of implementing block device freeze and thaw operations required us to rely on get_active_super() to walk the list of all superblocks on the system to find any superblock that might use the block device. This is wasteful and not very pleasant overall. Now that we can finally go straight from block device to owning superblock things become way simpler. Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-5-599c19f4faac@kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit a30561a9be69d446d8d542a4f9735fe5ca9573df Author: Christian Brauner Date: Tue Oct 24 15:01:10 2023 +0200 bdev: add freeze and thaw holder operations Add block device freeze and thaw holder operations. Follow-up patches will implement block device freeze and thaw based on stuct blk_holder_ops. Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-4-599c19f4faac@kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit fbcb8f39e96d59f4ed48cbdfaa65211fa867985c Author: Christian Brauner Date: Tue Oct 24 15:01:09 2023 +0200 bdev: surface the error from sync_blockdev() When freeze_super() is called, sync_filesystem() will be called which calls sync_blockdev() and already surfaces any errors. Do the same for block devices that aren't owned by a superblock and also for filesystems that don't call sync_blockdev() internally but implicitly rely on bdev_freeze() to do it. Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-3-599c19f4faac@kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 982c3b3058433f20aba9fb032599cee5dfc17328 Author: Christian Brauner Date: Tue Oct 24 15:01:08 2023 +0200 bdev: rename freeze and thaw helpers We have bdev_mark_dead() etc and we're going to move block device freezing to holder ops in the next patch. Make the naming consistent: * freeze_bdev() -> bdev_freeze() * thaw_bdev() -> bdev_thaw() Also document the return code. Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-2-599c19f4faac@kernel.org Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit f0cd988016f679f489f0ca8498c300eaff370b28 Author: Christian Brauner Date: Tue Oct 24 15:01:07 2023 +0200 fs: massage locking helpers Multiple people have balked at the the fact that super_lock{_shared,_excluse}() return booleans and even if they return false hold s_umount. So let's change them to only hold s_umount when true is returned and change the code accordingly. Link: https://lore.kernel.org/r/20231024-vfs-super-freeze-v2-1-599c19f4faac@kernel.org Reviewed-by: Jan Kara Signed-off-by: Christian Brauner commit 56c94c626785001dbb683312725b7d87c6ec6a91 Author: Miklos Szeredi Date: Wed Oct 25 16:02:01 2023 +0200 namespace: extract show_path() helper To be used by the statmount(2) syscall as well. Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20231025140205.3586473-4-mszeredi@redhat.com Reviewed-by: Ian Kent Signed-off-by: Christian Brauner commit 2eea9ce4310d8c0f8ef1dbe7b0e7d9219ff02b97 Author: Miklos Szeredi Date: Wed Oct 25 16:02:00 2023 +0200 mounts: keep list of mounts in an rbtree When adding a mount to a namespace insert it into an rbtree rooted in the mnt_namespace instead of a linear list. The mnt.mnt_list is still used to set up the mount tree and for propagation, but not after the mount has been added to a namespace. Hence mnt_list can live in union with rb_node. Use MNT_ONRB mount flag to validate that the mount is on the correct list. This allows removing the cursor used for reading /proc/$PID/mountinfo. The mnt_id_unique of the next mount can be used as an index into the seq file. Tested by inserting 100k bind mounts, unsharing the mount namespace, and unmounting. No performance regressions have been observed. For the last mount in the 100k list the statmount() call was more than 100x faster due to the mount ID lookup not having to do a linear search. This patch makes the overhead of mount ID lookup non-observable in this range. Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20231025140205.3586473-3-mszeredi@redhat.com Reviewed-by: Ian Kent Signed-off-by: Christian Brauner commit 98d2b43081972abeb5bb5a087bc3e3197531c46e Author: Miklos Szeredi Date: Wed Oct 25 16:01:59 2023 +0200 add unique mount ID If a mount is released then its mnt_id can immediately be reused. This is bad news for user interfaces that want to uniquely identify a mount. Implementing a unique mount ID is trivial (use a 64bit counter). Unfortunately userspace assumes 32bit size and would overflow after the counter reaches 2^32. Introduce a new 64bit ID alongside the old one. Initialize the counter to 2^32, this guarantees that the old and new IDs are never mixed up. Signed-off-by: Miklos Szeredi Link: https://lore.kernel.org/r/20231025140205.3586473-2-mszeredi@redhat.com Reviewed-by: Ian Kent Signed-off-by: Christian Brauner commit 18a813a1f94abbab14248071ca551e491bbc2abe Author: Raag Jadav Date: Fri Nov 17 20:10:53 2023 +0530 spi: intel: make mem_ops comparison unique to opcode match Instead of comparing parameters for every supported mem_ops, only compare on opcode match, which is relatively more efficient. Signed-off-by: Raag Jadav Reviewed-by: Mika Westerberg Link: https://lore.kernel.org/r/20231117144053.24005-1-raag.jadav@intel.com Signed-off-by: Mark Brown commit 36c4d9a6bf657789d13e933a289520b35ff8530b Merge: 7d562ac331ddc 9158221bf2aa5 Author: Mark Brown Date: Fri Nov 17 23:18:37 2023 +0000 ASoC: cs43130: Fixes and improvements Merge series from Maciej Strozek : This patchset aims to add minor fixes (first two patches) and introduce general improvements to the driver (rest of the patches) commit 3c7a5eb700661e8905ab4e50c2d09c6568125280 Author: Radhakrishna Sripada Date: Thu Nov 16 13:25:11 2023 -0800 drm/i915/mtl: Update Wa_22018931422 Commit 78cc55e0b64c ("drm/i915/mcr: Hold GT forcewake during steering operations") introduced the workaround which was in early stages. With a valid lineage number update Workaround for future tracking. Cc: Matt Roper Signed-off-by: Radhakrishna Sripada Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20231116212511.1760446-1-radhakrishna.sripada@intel.com commit 89a410b2e416f2216b29183d6b8537abeccc7abb Author: Matt Roper Date: Wed Nov 15 10:21:18 2023 -0800 drm/i915/dg2: Wa_18028616096 now applies to all DG2 The workaround database was just updated to extend this workaround to DG2-G11 (whereas previously it applied only to G10 and G12). Signed-off-by: Matt Roper Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20231115182117.2551522-2-matthew.d.roper@intel.com commit d49af114421104ffc3378e932f474096e3f9598e Author: Vegard Nossum Date: Sun Oct 29 08:42:07 2023 +0100 Documentation: add tux logo We already have the logo, let's use it. Testing: make htmldocs Cc: Miguel Ojeda Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231029074207.297663-1-vegard.nossum@oracle.com commit 9158221bf2aa5f7bfb916452c079b2fe63ca76e8 Author: Maciej Strozek Date: Fri Nov 17 14:13:44 2023 +0000 ASoC: cs43130: Add switch to control normal and alt hp inputs Make sure these inputs are mutually exclusive as recommended by the datasheet Signed-off-by: Maciej Strozek Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20231117141344.64320-8-mstrozek@opensource.cirrus.com Signed-off-by: Mark Brown commit ce7944b73e7729dc702b6741cff2b26886bb723c Author: Maciej Strozek Date: Fri Nov 17 14:13:42 2023 +0000 ASoC: cs43130: Add handling of ACPI Signed-off-by: Maciej Strozek Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20231117141344.64320-6-mstrozek@opensource.cirrus.com Signed-off-by: Mark Brown commit 552206add94dd7977bad32c37eba16e23756a0f9 Author: Maciej Strozek Date: Fri Nov 17 14:13:41 2023 +0000 ASoC: cs43130: Store device in private struct and use it more consistently Also remove one unnecessary debug print Signed-off-by: Maciej Strozek Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20231117141344.64320-5-mstrozek@opensource.cirrus.com Signed-off-by: Mark Brown commit 86b17aaf2e887355e4f70dd9c4897f6a06fa9b32 Author: Vegard Nossum Date: Fri Oct 27 13:54:20 2023 +0200 docs: automarkup: linkify git revs There aren't a ton of references to commits in the documentation, but they do exist, and we can use automarkup to linkify them to make them easier to follow. Use something like this to find references to commits: git grep -P 'commit.*[0-9a-f]{8,}' Documentation/ Also fix a few of these to standardize on the exact format that is already used in changelogs. Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027115420.205279-1-vegard.nossum@oracle.com commit d591aefc6635694293a3088b3c7401504190bbec Merge: 7c49ca6b02138 a4f58d70f238f Author: Jonathan Corbet Date: Fri Nov 17 13:07:51 2023 -0700 Merge branch 'vegard' into docs-mw Vegard Nossum writes: This patch series replaces some instances of 'class:: toc-title' with toctree's :caption: attribute, see the last patch in the series for some more rationale/explanation. commit a4f58d70f238fd1761b4d048f512afccb5129888 Author: Vegard Nossum Date: Fri Oct 27 10:18:30 2023 +0200 docs: remove .toc-title class The "toc-title" class was introduced in commit ef88f10eb877 ("[media] doc-rst: backward compatibility with older Sphinx versions") as a workaround for Sphinx versions older than 1.4.x. However, these old versions have been deprecated since commit 31abfdda6527 ("docs: Deprecate use of Sphinx < 2.4.x"). Having now changed all the toc-title users to use the :caption: attribute, we can also remove the custom style. Note that the toc-title class is separate from the "kernel-toc" logic that was introduced in commit c404f5d4f099 ("docs: Add more information to the HTML sidebar"). Cc: Mauro Carvalho Chehab Cc: Jonathan Corbet Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-12-vegard.nossum@oracle.com commit 2b7703e15a55890664e57a7a1395589ef70182c1 Author: Vegard Nossum Date: Fri Oct 27 10:18:29 2023 +0200 docs: use toctree :caption: and move introduction The canonical way to add a heading to the ToC is to use :caption:. Do that. Let's also move the introduction to the top of the document to be consistent with most other documents. Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: Federico Vaga Cc: Alex Shi Cc: Yanteng Si Cc: Hu Haowen Cc: workflows@vger.kernel.org Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-11-vegard.nossum@oracle.com commit 58af66464440c755001a74826f185e0b4bd159db Author: Vegard Nossum Date: Fri Oct 27 10:18:28 2023 +0200 media: doc: properly format ToC headings "class:: toc-title" was a workaround for older Sphinx versions that are no longer supported. The canonical way to add a heading to the ToC is to use :caption:. Do that. Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-10-vegard.nossum@oracle.com commit 0419ee1b62f37bf9d654bfacd9a4991f588d03ad Author: Vegard Nossum Date: Fri Oct 27 10:18:27 2023 +0200 doc: misc-device: properly format ToC heading "class:: toc-title" was a workaround for older Sphinx versions that are no longer supported. The canonical way to add a heading to the ToC is to use :caption:. Do that. Cc: Greg Kroah-Hartman Cc: Julien Panis Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-9-vegard.nossum@oracle.com commit 0dfbd35ed43de622032c80c74e04fca2d1f7ec69 Author: Vegard Nossum Date: Fri Oct 27 10:18:26 2023 +0200 input: docs: properly format ToC headings "class:: toc-title" was a workaround for older Sphinx versions that are no longer supported. The canonical way to add a heading to the ToC is to use :caption:. Do that. Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-8-vegard.nossum@oracle.com commit f85f5ae45ad945270a8884261de8249431e8b5a6 Author: Vegard Nossum Date: Fri Oct 27 10:18:25 2023 +0200 docs: driver-api: properly format ToC headings "class:: toc-title" was a workaround for older Sphinx versions that are no longer supported. The canonical way to add a heading to the ToC is to use :caption:. Do that. Cc: Mauro Carvalho Chehab Cc: Richard Cochran Cc: SeongJae Park Cc: Hans de Goede Cc: Armin Wolf Cc: Iwona Winiarska Cc: Ricardo Cañuelo Cc: Tomas Winkler Cc: linux-media@vger.kernel.org Cc: Yanteng Si Cc: Alex Shi Cc: Wu XiangCheng Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-7-vegard.nossum@oracle.com commit 93f85555a89904afa215f50971eedfead0f0181b Author: Vegard Nossum Date: Fri Oct 27 10:18:24 2023 +0200 Documentation: dev-tools: properly format ToC headingss "class:: toc-title" was a workaround for older Sphinx versions that are no longer supported. The canonical way to add a heading to the ToC is to use :caption:. Do that. Cc: Mauro Carvalho Chehab Cc: gaochao Cc: Yanteng Si Cc: Wu XiangCheng Cc: Fangrui Song Cc: Wan Jiabing Cc: Alex Shi Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-6-vegard.nossum@oracle.com commit 1f821382818a0dab85dbfff698b0fa0fff18cb36 Author: Vegard Nossum Date: Fri Oct 27 10:18:23 2023 +0200 crypto: doc: properly format ToC headings "class:: toc-title" was a workaround for older Sphinx versions that are no longer supported. The canonical way to add a heading to the ToC is to use :caption:. Do that. Cc: Mauro Carvalho Chehab Cc: Stephan Mueller Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-5-vegard.nossum@oracle.com commit a37a44572fbb5c3ef65502b76705113dde6eafbf Author: Vegard Nossum Date: Fri Oct 27 10:18:22 2023 +0200 media: admin-guide: properly format ToC heading "class:: toc-title" was a workaround for older Sphinx versions that are no longer supported. The canonical way to add a heading to the ToC is to use :caption:. Do that. Cc: Mauro Carvalho Chehab Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-4-vegard.nossum@oracle.com commit 074f81506d9869d2750e3be2cecec163e8c0b1f1 Author: Vegard Nossum Date: Fri Oct 27 10:18:21 2023 +0200 doc: userspace-api: properly format ToC headings "class:: toc-title" was a workaround for older Sphinx versions that are no longer supported. The canonical way to add a heading to the ToC is to use :caption:. Do that. Cc: Rui Li Cc: Yanteng Si Cc: Wu XiangCheng Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-3-vegard.nossum@oracle.com commit eed94315555a441028238a4d05c6f86997d9e68e Author: Vegard Nossum Date: Fri Oct 27 10:18:20 2023 +0200 docs: style toctree captions as headings The rtd theme already styles toctree captions as headings, but the alabaster theme doesn't. Add this in. Cc: Mauro Carvalho Chehab Cc: Jonathan Corbet Signed-off-by: Vegard Nossum Signed-off-by: Jonathan Corbet Link: https://lore.kernel.org/r/20231027081830.195056-2-vegard.nossum@oracle.com commit ff8867af01daa7ea770bebf5f91199b7434b74e5 Author: Andrii Nakryiko Date: Fri Nov 17 09:14:04 2023 -0800 bpf: rename BPF_F_TEST_SANITY_STRICT to BPF_F_TEST_REG_INVARIANTS Rename verifier internal flag BPF_F_TEST_SANITY_STRICT to more neutral BPF_F_TEST_REG_INVARIANTS. This is a follow up to [0]. A few selftests and veristat need to be adjusted in the same patch as well. [0] https://patchwork.kernel.org/project/netdevbpf/patch/20231112010609.848406-5-andrii@kernel.org/ Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231117171404.225508-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 47fbee5f27ed9ef43340db03ba2b58a673a6e72b Author: Jeffrey Hugo Date: Fri Nov 3 09:33:02 2023 -0600 accel/qaic: Update MAX_ORDER use to be inclusive MAX_ORDER was redefined so that valid allocations to the page allocator are in the range of 0..MAX_ORDER, inclusive in the commit 23baf831a32c ("mm, treewide: redefine MAX_ORDER sanely"). We are treating MAX_ORDER as an exclusive value, and thus could be requesting larger allocations. Update our use to match the redefinition of MAX_ORDER. Signed-off-by: Jeffrey Hugo Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Carl Vanderlip Reviewed-by: Jacek Lawrynowicz Link: https://patchwork.freedesktop.org/patch/msgid/20231103153302.20642-1-quic_jhugo@quicinc.com commit 3d762e21d56370a43478b55e604b4a83dd85aafc Author: Mario Limonciello Date: Mon Nov 6 10:23:10 2023 -0600 rtc: cmos: Use ACPI alarm for non-Intel x86 systems too Intel systems > 2015 have been configured to use ACPI alarm instead of HPET to avoid s2idle issues. Having HPET programmed for wakeup causes problems on AMD systems with s2idle as well. One particular case is that the systemd "SuspendThenHibernate" feature doesn't work properly on the Framework 13" AMD model. Switching to using ACPI alarm fixes the issue. Adjust the quirk to apply to AMD/Hygon systems from 2021 onwards. This matches what has been tested and is specifically to avoid potential risk to older systems. Cc: # 6.1+ Reported-by: Reported-by: Closes: https://github.com/systemd/systemd/issues/24279 Reported-by: Kelvie Wong Closes: https://community.frame.work/t/systemd-suspend-then-hibernate-wakes-up-after-5-minutes/39392 Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20231106162310.85711-1-mario.limonciello@amd.com Signed-off-by: Alexandre Belloni commit 956fa1ddc132e028f3b7d4cf17e6bfc8cb36c7fd Author: Chao Yu Date: Thu Nov 16 14:25:56 2023 +0800 f2fs: fix to check return value of f2fs_reserve_new_block() Let's check return value of f2fs_reserve_new_block() in do_recover_data() rather than letting it fails silently. Also refactoring check condition on return value of f2fs_reserve_new_block() as below: - trigger f2fs_bug_on() only for ENOSPC case; - use do-while statement to avoid redundant codes; Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9458915036ddef536d4abdd01b9b3c067f7d7a9f Author: Chao Yu Date: Thu Nov 16 14:25:55 2023 +0800 f2fs: use shared inode lock during f2fs_fiemap() f2fs_fiemap() will only traverse metadata of inode, let's use shared inode lock for it to avoid unnecessary race on inode lock. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ff6584ac2c4b4ee8e1fca20bffaaa387d8fe2974 Author: Chao Yu Date: Thu Nov 16 14:25:54 2023 +0800 f2fs: clean up w/ dotdot_name Just cleanup, no logic changes. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e26b6d39270f5eab0087453d9b544189a38c8564 Author: Eric Biggers Date: Mon Nov 6 20:44:34 2023 -0800 f2fs: explicitly null-terminate the xattr list When setting an xattr, explicitly null-terminate the xattr list. This eliminates the fragile assumption that the unused xattr space is always zeroed. Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5e4166461cf66a26f925011d90017da74e410747 Author: Yang Hubin Date: Sat Nov 4 00:45:01 2023 -0700 f2fs: the name of a struct is wrong in a comment. The macro SUMMARY_SIZE represents the size of the struct f2fs_summary, instead of the size of the struct summary. Signed-off-by: Yang Hubin Signed-off-by: Qian Haolai Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 36062b91838753f444235842197feb7d78c87096 Author: zhangxirui Date: Sat Oct 21 06:19:07 2023 -0600 f2fs: use inode_lock_shared instead of inode_lock in f2fs_seek_block() inode_lock_shared() -> down_read(&inode->i_rwsem) inode_lock() -> down_write(&inode->i_rwsem) Inode is not updated in f2fs_seek_block(), so there is no need to hold write lock, use read lock for more efficiency. Signed-off-by: zhangxirui Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7c49ca6b021380f7be67ec9896392ff316a8ac71 Author: Yuanhsi Chung Date: Sat Nov 4 18:33:30 2023 +0800 Documentation: Fix filename typo in ftrace doc The filename for setting the cpumask should be `tracing_cpumask`, instead of `tracing_cpu_mask`. Signed-off-by: Yuanhsi Chung Signed-off-by: Jonathan Corbet Message-ID: <20231104103329.215139-1-freshliver.cys@gmail.com> commit 335bbdf01d25517ae832ac1807fd8323c1f4f3b9 Author: Hu Haowen <2023002089@link.tyut.edu.cn> Date: Mon Nov 6 22:01:40 2023 +0800 docs/zh_TW: replace my email address The Gmail address will not be used often from now on, and replace it with the email which is more frequently accessed by myself. Signed-off-by: Hu Haowen <2023002089@link.tyut.edu.cn> Signed-off-by: Jonathan Corbet Message-ID: <20231106140140.25455-1-2023002089@link.tyut.edu.cn> commit 5483cc3dfd8da2d82603cc4a18db21866d58308e Author: Brian Johannesmeyer Date: Fri Nov 3 17:21:20 2023 +0100 docs: dma-api: Fix description of the sync_sg API Fix the description of the parameters to dma_sync_sg*. They should be the same as the parameters to dma_map_sg(), not dma_map_single(). Signed-off-by: Brian Johannesmeyer Signed-off-by: Jonathan Corbet Message-ID: <20231103162120.3474026-1-bjohannesmeyer@gmail.com> commit 407434939b072a4bc14f3e2b83823ba073cf8f42 Author: Li Zhijian Date: Wed Nov 1 15:02:01 2023 +0800 docs: dma: update a reference to a moved document Documentation/DMA-API.txt has moved to Documentation/core-api/dma-api.rst Signed-off-by: Li Zhijian Message-ID: <20231101070201.4066998-1-lizhijian@fujitsu.com> Signed-off-by: Jonathan Corbet commit 4746be1d222d7cdfdbe90a71370ffd2e0baa24d0 Author: Ariel Miculas Date: Fri Oct 27 18:21:01 2023 +0300 docs: vfs: fix typo in struct xattr_handlers The structure is called struct xattr_handler, singular, not plural. Fixing the typo also makes it greppable with the whole word matching flag. Signed-off-by: Ariel Miculas Acked-by: Randy Dunlap Signed-off-by: Jonathan Corbet Message-ID: <20231027152101.226296-1-amiculas@cisco.com> commit ed23b1b201ec324f8287328e9fd7eb929b4349c3 Author: Carlos Bilbao Date: Tue Oct 31 10:13:25 2023 -0500 docs/sp_SP: Add translation of process/handling-regressions Translate Documentation/process/handling-regressions.rst into Spanish. Co-developed-by: Sergio Gonzalez Signed-off-by: Sergio Gonzalez Signed-off-by: Carlos Bilbao Signed-off-by: Jonathan Corbet Message-ID: <20231031151325.2903088-1-carlos.bilbao@amd.com> commit d0476a59de064205f4aaa8f7c6d6f32bc28a44d4 Author: Jens Wiklander Date: Thu Sep 7 13:27:42 2023 +0200 optee: ffa_abi: add asynchronous notifications Adds support for asynchronous notifications from OP-TEE in secure world when communicating via FF-A. In principle from OP-TEE and kernel driver point of view this works in the same way as for the SMC ABI based implementation. The OP-TEE FF-A ABI is expanded in OPTEE_FFA_EXCHANGE_CAPABILITIES with the capability OPTEE_FFA_SEC_CAP_ASYNC_NOTIF to indicate that OP-TEE supports asynchronous notifications. OPTEE_FFA_ENABLE_ASYNC_NOTIF is also added to tell that the driver has successfully initialized these notifications. Notification capability is negotiated while the driver is initialized. If both sides supports these notifications then they are enabled. The notification concept in this driver is merged with the FF-A concept, the lower 64 values are reserved for FF-A as asynchronous notifications while the synchronous notifications use the higher values. So a FF-A notification has to be allocated for each discrete asynchronous notification value needed. Only one asynchronous notification value is used at the moment, the "do bottom half" notification. Signed-off-by: Jens Wiklander Reviewed-by: Sumit Garg Tested-by: Sudeep Holla commit 6dea6352bec3ab9f8f71d1694ca91002844a5067 Author: Jens Wiklander Date: Thu Sep 7 12:55:58 2023 +0200 optee: provide optee_do_bottom_half() as a common function Provides optee_do_bottom_half() and optee_stop_async_notif() as common functions callable from the FF-A ABI part of the driver too. Signed-off-by: Jens Wiklander Reviewed-by: Sumit Garg commit b4da37db3e2cfc1c60875b0c10cfc556d5342a3a Author: Jarkko Nikula Date: Fri Nov 17 13:09:24 2023 +0200 i3c: master: Fix build error Fix build error caused by commit 2aac0bf4ebc8 ("i3c: Add fallback method for GETMXDS CCC") which incorrectly access the "struct i3c_ccc_cmd_dest dest" as pointer. drivers/i3c/master.c: In function ‘i3c_master_getmxds_locked’: drivers/i3c/master.c:1140:21: error: invalid type argument of ‘->’ (have ‘struct i3c_ccc_cmd_dest’) 1140 | dest->payload.len -= 3; | ^~ Fixes: 2aac0bf4ebc8 ("i3c: Add fallback method for GETMXDS CCC") Signed-off-by: Jarkko Nikula Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20231117110924.634280-1-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit 4b391c9c37646f25118355f414b9e6d9fefe782f Author: Etienne Carriere Date: Mon Oct 30 09:48:12 2023 +0100 firmware: arm_scmi: optee: use optee system invocation Changes SCMI optee transport to call tee_client_system_session() to request optee driver to provision an entry context in OP-TEE for processing OP-TEE messages. This prevents possible deadlock in case OP-TEE threads are all consumed while these may be waiting for a clock or regulator to be enable which SCMI OP-TEE service which requires a free thread context to execute. Cc: Sudeep Holla Cc: Cristian Marussi Acked-by: Sudeep Holla Reviewed-by: Sumit Garg Signed-off-by: Etienne Carriere Signed-off-by: Jens Wiklander commit 45bc2c9b5b230b95cad10f44204d7b28f52b74c0 Author: Etienne Carriere Date: Mon Oct 30 09:48:11 2023 +0100 tee: optee: support tracking system threads Adds support in the OP-TEE driver to keep track of reserved system threads. The logic allows one OP-TEE thread to be reserved to TEE system sessions. The optee_cq_*() functions are updated to handle this if enabled, that is when TEE describes how many thread context it supports and when at least 1 session has registered as a system session (using tee_client_system_session()). For sake of simplicity, initialization of call queue management is factorized into new helper function optee_cq_init(). The SMC ABI part of the driver enables this tracking, but the FF-A ABI part does not. Co-developed-by: Jens Wiklander Co-developed-by: Sumit Garg Signed-off-by: Sumit Garg Signed-off-by: Etienne Carriere Signed-off-by: Jens Wiklander commit a9214a8883ceb82df55aa90d1c49ddb85fc1e3d5 Author: Etienne Carriere Date: Mon Oct 30 09:48:10 2023 +0100 tee: system session Adds kernel client API function tee_client_system_session() for a client to request a system service entry in TEE context. This feature is needed to prevent a system deadlock when several TEE client applications invoke TEE, consuming all TEE thread contexts available in the secure world. The deadlock can happen in the OP-TEE driver for example if all these TEE threads issue an RPC call from TEE to Linux OS to access an eMMC RPMB partition (TEE secure storage) which device clock or regulator controller is accessed through an OP-TEE SCMI services. In that case, Linux SCMI driver must reach OP-TEE SCMI service without waiting until one of the consumed TEE threads is freed. Reviewed-by: Sumit Garg Co-developed-by: Jens Wiklander Signed-off-by: Etienne Carriere Signed-off-by: Jens Wiklander commit 077798da028e81ada39a256969207c91db66ebaf Author: Etienne Carriere Date: Mon Oct 30 09:48:09 2023 +0100 tee: optee: system thread call property Adds an argument to do_call_with_arg() handler to tell whether the call is a system thread call or not. This change always sets this info to false hence no functional change. This change prepares management of system invocation proposed in a later change. Reviewed-by: Sumit Garg Co-developed-by: Jens Wiklander Signed-off-by: Etienne Carriere [jw: clarified that it's system thread calls] Signed-off-by: Jens Wiklander commit 699d392903c3cebb7d2a2a3505ec9047c419dcd7 Author: Srinivasan Shanmugam Date: Sun Nov 12 10:09:44 2023 +0530 drm/amdgpu: Add function parameter 'xcc_mask' not described in 'amdgpu_vm_flush_compute_tlb' Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1373: warning: Function parameter or member 'xcc_mask' not described in 'amdgpu_vm_flush_compute_tlb' Cc: Felix Kuehling Cc: Christian König Cc: Alex Deucher Cc: "Pan, Xinhui" Signed-off-by: Srinivasan Shanmugam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 425285d39afddaf4a9dab36045b816af0cc3e400 Author: Prike Liang Date: Thu Nov 9 11:37:18 2023 +0800 drm/amdgpu: add amdgpu runpm usage trace for separate funcs Add trace for amdgpu runpm separate funcs usage and this will help debugging on the case of runpm usage missed to dereference. In the normal case the runpm usage count referred by one kind of functionality pairwise and usage should be changed from 1 to 0, otherwise there will be an issue in the amdgpu runpm usage dereference. Signed-off-by: Prike Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit a3cc7dbe9957f856b84a504687a85e22e02a49db Author: Alex Deucher Date: Thu Sep 28 15:18:16 2023 +0530 drm/amdgpu: add pm metrics structure definition Define the pm metrics structures to be exposed via sysfs. Signed-off-by: Alex Deucher Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Yang Wang commit 75fb313c55fa102f973c440f55dc63ffc61f3b54 Author: Shiwu Zhang Date: Tue Oct 31 12:32:54 2023 +0800 drm/amdgpu: expose the connected port num info through sysfs By catting the xgmi_port_num sysfs node, it prints out the info in the format of : -> : for one xgmi link. For example, in case of 4 sockets fully and evenly connected setup, it would be like as below for the first node in the hive. 01:02 -> 02:03 01:03 -> 02:02 01:07 -> 03:04 01:04 -> 03:07 01:06 -> 04:05 01:05 -> 04:06 Based on the fact that there is two xgmi links between each socket pair, "01:02 -> 02:03" means that the current socket in question use the port 2 to connect with port 3 of the second node in the hive and so on. v2: print out the src/dst node id for each xgmi link (lijo) v3: replace the current_node++ with +1 to align with dst node (le) and use the dev_err instead of pr_err (lijo) v4: fix checkpatch warning (alex) Signed-off-by: Shiwu Zhang Acked-by: Lijo Lazar Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 59e4db5375f587954eb779ac9c7888a6c81c306b Author: Aric Cyr Date: Sun Nov 5 20:22:06 2023 -0500 drm/amd/display: Promote DC to 3.2.260 - Add missing chips for HDCP - Add new command to disable replay timing resync - Fix encoder disable logic - Enable DSC Flag in MST Mode Validation - Change the DMCUB mailbox memory location from FB to inbox - Add disable timeout option - Negate IPS allow and commit bits - Enable DCN clock gating for DCN35 - Prefer currently used OTG master when acquiring free pipe - Try to acquire a free OTG master not used in cur ctx first - Clear dpcd_sink_ext_caps if not set - Enable fast plane updates on DCN3.2 and above - Add null checks for 8K60 lightup - Refactor resource into component directory - Fix DSC not Enabled on Direct MST Sink - Guard against invalid RPTR/WPTR being set - Enable CM low mem power optimization - Fix a debugfs null pointer error Acked-by: Alex Hung Signed-off-by: Aric Cyr Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d9b3a066dfcd3fe50b4dc561d8510c43c0ad8863 Author: Mario Limonciello Date: Fri Nov 10 16:34:52 2023 -0600 drm/amd: Exclude dGPUs in eGPU enclosures from DPM quirks The PCIe speed capabilities advertised by a USB4 or TBT3 link are limited to PCIe gen 1 per the USB4 spec. In reality the speed will change dynamically based on fabric conditions and other traffic. DPM is disabled when dGPUs are connected directly to Intel hosts since the PCIe root port isn't able to handle dynamic speed switching. As this limitation is specifically for PCIe root ports in the SoC, don't apply it when connected to an eGPU enclosure connected to an Intel host. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2885 Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 466a7d115326ece682c2b60d1c77d1d0b9010b4f Author: Mario Limonciello Date: Fri Nov 10 16:34:51 2023 -0600 drm/amd: Use the first non-dGPU PCI device for BW limits When bandwidth limits are looked up using pcie_bandwidth_available() virtual links such as USB4 are analyzed which might not represent the real speed. Furthermore devices may change speeds autonomously which may introduce conditional variation to the results reported in the status registers. Instead look at the capabilities of first PCI device outside of dGPU to decide upper limits that the dGPU will work at. For eGPU this effectively means that it will use the speed of the link partner. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2925#note_2145860 Link: https://www.usb.org/document-library/usb4r-specification-v20 USB4 V2 with Errata and ECN through June 2023 Section 11.2.1 Reviewed-by: Lijo Lazar Signed-off-by: Mario Limonciello Signed-off-by: Alex Deucher commit 8a2553d5c7ade00d1b508bbd418d5c4803c12fdd Author: Rodrigo Siqueira Date: Mon Nov 6 19:30:51 2023 -0700 drm/amd/display: Add missing chips for HDCP [WHAT] Add missing HDCP ID in the message id enum. Acked-by: Alex Hung Signed-off-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ed4ae8f77f2c4ff05244db99330d1eff828d9f7d Author: Anthony Koo Date: Sat Nov 4 01:53:13 2023 -0400 drm/amd/display: Add new command to disable replay timing resync [WHY & HOW] Add new command to disable replay timing resync Acked-by: Alex Hung Signed-off-by: Anthony Koo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c29085d29562990559163302d9e28d1e88223d90 Author: Fangzhi Zuo Date: Mon Oct 30 16:23:08 2023 -0400 drm/amd/display: Enable DSC Flag in MST Mode Validation [WHY & HOW] When dsc is possible, MST mode validation includes: 1. if maximum dsc compression cannot fit into end to end bw, mode pruned 2. if native bw cannot fit into end to end bw, try to enabled dsc to see whether a feasible dsc config can be found 3. if native bw can fit into end to end bw, mode supported Reviewed-by: Wayne Lin Acked-by: Alex Hung Signed-off-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c21a764a98cb59d673cad3da64f35f4dec951951 Author: Krunoslav Kovac Date: Wed Nov 1 15:59:56 2023 -0400 drm/amd/display: Send PQ bit in AMD VSIF [WHY & HOW] PB9 bit 5 was added to signal PQ EOTF in AMD vendor specific infoframe. This change sets it when appropriate. Reviewed-by: Aric Cyr Acked-by: Alex Hung Signed-off-by: Krunoslav Kovac Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit cc6201b773f12388c234aa10145322ccc429959e Author: Duncan Ma Date: Tue Oct 31 16:57:36 2023 -0400 drm/amd/display: Add disable timeout option [WHY] Driver continues running whenever there is is timeout from smu or dmcub. It is difficult to track failure state when dcn, dc or dmcub changes on root failure. [HOW] Add disable_timeout option to halt driver whenever there is a failure in response. Reviewed-by: Charlene Liu Acked-by: Alex Hung Signed-off-by: Duncan Ma Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5f70d4ff8095a2ad362d2a00eb8d9f7e20f3daa1 Author: Daniel Miess Date: Thu Oct 12 12:55:47 2023 -0400 drm/amd/display: Enable DCN clock gating for DCN35 [WHY & HOW] Enable DCN clock gating for DCN35. Disable DTBCLK gate before link training and re-enable afterwards Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Daniel Miess Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 673d6d73eba79a1205ac403b68ef63da1c823da2 Author: Wenjing Liu Date: Mon Oct 30 15:21:12 2023 -0400 drm/amd/display: Prefer currently used OTG master when acquiring free pipe [WHY & HOW] When acquiring an OTG master pipe we should prefer currently enabled OTG master pipes first. If there are no free pipes used as current OTG master pipe then we will try to acquire a currently unused free pipe as new OTG master instead of tearing down current secondary pipes from ODM or MPC combine. Reviewed-by: Alvin Lee Reviewed-by: Dillon Varone Acked-by: Alex Hung Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 68cfc5d8e459f50e5f46dca3b0f3c97a75f39975 Author: Wenjing Liu Date: Fri Oct 20 16:26:19 2023 -0400 drm/amd/display: Try to acquire a free OTG master not used in cur ctx first [WHY & HOW] The current otg master pipe allocation logic is not optimized based current resource context. We should try to acquire a free OTG master not used in cur cts first to avoid unnecessary pipe switch from current state. Acked-by: Alex Hung Signed-off-by: Wenjing Liu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8b8eed05a1c650c27e78bc47d07f7d6c9ba779e8 Author: Mounika Adhuri Date: Fri Oct 6 15:05:42 2023 +0530 drm/amd/display: Refactor resource into component directory [WHY] Move all resource files to unique folder resource. [HOW] Created resource folder in dc, moved the dcnxx_resource.c and dcnxx_resource.h files into corresponding new folders inside the resource and made appropriate changes for compilation in Makefiles. Reviewed-by: Martin Leung Acked-by: Alex Hung Signed-off-by: Mounika Adhuri Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c41028a2a16303e5a59e11338d6ef5475945c79d Author: Hamza Mahfooz Date: Thu Nov 9 16:42:32 2023 -0500 drm/amd/display: add a debugfs interface for the DMUB trace mask For features that are implemented primarily in DMUB (e.g. PSR), it is useful to be able to trace them at a DMUB level from the kernel, especially when debugging issues. So, introduce a debugfs interface that is able to read and set the DMUB trace mask dynamically at runtime and document how to use it. Cc: Alex Deucher Cc: Mario Limonciello Reviewed-by: Aurabindo Pillai Acked-by: Christian König Signed-off-by: Hamza Mahfooz Signed-off-by: Alex Deucher commit fcfc6ceec3ebb725a0d6381a1120e7cd546e1df4 Author: Yihan Zhu Date: Mon Oct 30 13:29:51 2023 -0400 drm/amd/display: Enable CM low mem power optimization [WHY & HOW] MPC MCM low mem power optimization still causes color distortion on first SCE enablement, only forces light sleep for it. DPP low memory power optimization still needs this bit to save power. Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Hung Signed-off-by: Yihan Zhu Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ef71bb4119c786f6f1d132b8863698874321798b Author: Yang Wang Date: Fri Nov 10 13:14:41 2023 +0800 drm/amdgpu: correct mca ipid die/socket/addr decode correct mca ipid die/socket/addr decode v2: squash in fix from Yang Signed-off-by: Yang Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit efb91fea652a42fcc037d2a9ef4ecd1ffc5ff4b7 Author: Aurabindo Pillai Date: Fri Oct 27 15:59:48 2023 -0400 drm/amd/display: Fix a debugfs null pointer error [WHY & HOW] Check whether get_subvp_en() callback exists before calling it. Cc: Mario Limonciello Cc: Alex Deucher Cc: stable@vger.kernel.org Reviewed-by: Alex Hung Acked-by: Alex Hung Signed-off-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f4fac4163c2f99aada9cc60292f2ea377afe6c71 Author: Laurent Morichetti Date: Wed Nov 8 16:16:18 2023 -0800 drm/amdkfd: Clear the VALU exception state in the trap handler The trap handler could be entered with pending VALU exceptions, so clear the exception state before issuing vector instructions. Reviewed-by: Jay Cornwall Acked-by: Alex Deucher Signed-off-by: Laurent Morichetti Tested-by: Lancelot Six Signed-off-by: Alex Deucher commit 8a1de314d1890793bbf9e77542574ceda007564e Author: Srinivasan Shanmugam Date: Wed Aug 2 07:49:14 2023 +0530 drm/amdgpu: Refactor 'amdgpu_connector_dvi_detect' in amdgpu_connectors.c Fixes the below: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' WARNING: Missing a blank line after declarations WARNING: Too many leading tabs - consider code refactoring + if (list_connector->connector_type != DRM_MODE_CONNECTOR_VGA) { WARNING: Too many leading tabs - consider code refactoring + if (!amdgpu_display_hpd_sense(adev, amdgpu_connector->hpd.hpd)) { Cc: Guchun Chen Cc: Christian König Cc: Alex Deucher Cc: "Pan, Xinhui" Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Signed-off-by: Srinivasan Shanmugam Acked-by: Guchun Chen Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 5ce8eccd53a357f91f2c2fe29918f9c65a1fe970 Author: Ma Jun Date: Wed Nov 8 16:00:30 2023 +0800 drm/amd/pm: Make smu_v13_0_baco_set_armd3_sequence() static smu_v13_0_baco_set_armd3_sequence is not used by other files, so make it as static type. Signed-off-by: Ma Jun Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit 857c838c782728318c581cb656fddd74faa89ad2 Author: Ma Jun Date: Fri Nov 3 09:48:06 2023 +0800 drm/amd/pm: Move some functions to smu_v13_0.c as generic code Use generic functions and remove the duplicate code Signed-off-by: Ma Jun Reviewed-by: Yang Wang Signed-off-by: Alex Deucher commit d8a3813713c3843351123138c8b191142c266521 Author: Abhinav Singh Date: Fri Nov 3 21:20:13 2023 +0530 drm/radeon: Fix warning using plain integer as NULL sparse static analysis tools generate a warning with this message "Using plain integer as NULL pointer". In this case this warning is being shown because we are trying to intialize a pointer to NULL using integer value 0. Signed-off-by: Abhinav Singh Signed-off-by: Alex Deucher commit b5a52d2afe1b75f9d51461bb235ca40735e99fe7 Author: Sam James Date: Sun Nov 5 16:06:50 2023 +0000 amdgpu: Adjust kmalloc_array calls for new -Walloc-size GCC 14 introduces a new -Walloc-size included in -Wextra which errors out on various files in drivers/gpu/drm/amd/amdgpu like: ``` amdgpu_amdkfd_gfx_v8.c:241:15: error: allocation of insufficient size ‘4’ for type ‘uint32_t[2]’ {aka ‘unsigned int[2]'} with size ‘8’ [-Werror=alloc-size] ``` This is because each HQD_N_REGS is actually a uint32_t[2]. Move the * 2 to the size argument so GCC sees we're allocating enough. Originally did 'sizeof(uint32_t) * 2' for the size but a friend suggested 'sizeof(**dump)' better communicates the intent. Link: https://lore.kernel.org/all/87wmuwo7i3.fsf@gentoo.org/ Signed-off-by: Sam James Signed-off-by: Alex Deucher commit fbbcb3f2b7c269c92218f315d22d6ab00524798a Author: Ma Jun Date: Thu Nov 2 11:19:46 2023 +0800 drm/amd/pm: Fix return value and drop redundant param Fix the return value and drop redundant parameter of get_asic_baco_capability function. Signed-off-by: Ma Jun Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 94e2dae0a8bfd456abfd866f1eee8342f0858012 Author: Felix Kuehling Date: Fri Feb 24 18:22:32 2023 -0500 drm/amdkfd: Move TLB flushing logic into amdgpu This will make it possible for amdgpu GEM ioctls to flush TLBs on compute VMs. This removes VMID-based TLB flushing and always uses PASID-based flushing. This still works because it scans the VMID-PASID mapping registers to find the right VMID. It's only slightly less efficient. This is not a production use case. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e6ed364efae39455cb1d6b1895a1d31599608a2b Author: Felix Kuehling Date: Wed Mar 16 18:46:56 2022 -0400 drm/amdgpu: update mappings not managed by KFD When restoring after an eviction, use amdgpu_vm_handle_moved to update BO VA mappings in KFD VMs that are not managed through the KFD API. This should allow using the render node API to create more flexible memory mappings in KFD VMs. v2: rebase on drm_exec changes (Alex) Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit c8031019dc95e3ab7cc0b09f1894c5f52dc0c187 Author: Arunpravin Paneer Selvam Date: Tue Oct 10 07:35:06 2023 -0700 drm/amdgpu: Implement a new 64bit sequence memory driver Developed a new driver which allocates a 64bit memory on each request in sequence order. At the moment, user queue fence memory is the main consumer of this seq64 driver. v2: Worked on review comments from Christian for the following modifications - Move driver name from "semaphore" to "seq64" - Remove unnecessary PT/PD mapping - Move enable_mes check into init/fini functions. v3: Worked on review comments from Christian - drop enable_mes check - use DECLARE_BITMAP for bit array - added kerneldoc for seq64 v4: Worked on review comments from Christian - Rename amdgpu_seq64_get name with amdgpu_seq64_alloc v5: Worked on review comments from Christian - Fix seq64 lockdep warning - move fpriv->seq64_va check into amdgpu_seq64_unmap() - make the function amdgpu_seq64_unmap() return as void. - reserve the buffers as not interruptible. v6: port to drm_exec (Alex) v7: disable for now (Arun) Signed-off-by: Arunpravin Paneer Selvam Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a24d61c609813963aacc9f6ec8343f4fcaac7243 Author: Colin Ian King Date: Thu Nov 2 17:49:01 2023 +0000 x86/lib: Fix overflow when counting digits tl;dr: The num_digits() function has a theoretical overflow issue. But it doesn't affect any actual in-tree users. Fix it by using a larger type for one of the local variables. Long version: There is an overflow in variable m in function num_digits when val is >= 1410065408 which leads to the digit calculation loop to iterate more times than required. This results in either more digits being counted or in some cases (for example where val is 1932683193) the value of m eventually overflows to zero and the while loop spins forever). Currently the function num_digits is currently only being used for small values of val in the SMP boot stage for digit counting on the number of cpus and NUMA nodes, so the overflow is never encountered. However it is useful to fix the overflow issue in case the function is used for other purposes in the future. (The issue was discovered while investigating the digit counting performance in various kernel helper functions rather than any real-world use-case). The simplest fix is to make m a long long, the overhead in multiplication speed for a long long is very minor for small values of val less than 10000 on modern processors. The alternative fix is to replace the multiplication with a constant division by 10 loop (this compiles down to an multiplication and shift) without needing to make m a long long, but this is slightly slower than the fix in this commit when measured on a range of x86 processors). [ dhansen: subject and changelog tweaks ] Fixes: 646e29a1789a ("x86: Improve the printout of the SMP bootup CPU table") Signed-off-by: Colin Ian King Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20231102174901.2590325-1-colin.i.king%40gmail.com commit f70a68bc1d18b7af52d368b80d1d0fed747ef2a9 Author: Jani Nikula Date: Tue Nov 14 12:45:34 2023 +0200 drm/i915: convert vlv_dpio_read()/write() from pipe to phy vlv_dpio_read() and vlv_dpio_write() really operate on the phy, not pipe. Passing the pipe instead of the phy as parameter is supposed to be a convenience, but when the caller has the phy, it becomes an inconvenience. See e.g. chv_dpio_cmn_power_well_enable() and assert_chv_phy_powergate(). Figure out the phy in the callers, and pass phy to the dpio functions. v2: retract one overzealous pipe->phy change (Ville) Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231114104534.4180144-3-jani.nikula@intel.com commit 9fda18c2c32a42e6c9fb68893b9628d6a5319555 Author: Jani Nikula Date: Tue Nov 14 12:45:33 2023 +0200 drm/i915: add vlv_pipe_to_phy() helper to replace DPIO_PHY() Add a helper with better typing and handing for bogus input, and better in line with vlv_dig_port_to_channel(), vlv_dig_port_to_phy(), and vlv_pipe_to_channel(). Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231114104534.4180144-2-jani.nikula@intel.com commit 9d6953335284fc37f25bf8488a15ee9444198248 Author: Jani Nikula Date: Tue Nov 14 12:45:32 2023 +0200 drm/i915: move *_crtc_clock_get() to intel_dpll.c Considering what the functions do, intel_dpll.c is a more suitable location, and lets us make some functions static while at it. This also means intel_display.c no longer does any DPIO access. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231114104534.4180144-1-jani.nikula@intel.com commit 9a626c1f36cfc409707528b53e36069c46aa5a9f Author: Jani Nikula Date: Tue Nov 14 17:55:28 2023 +0200 drm/i915/display: keep struct intel_display members sorted Like the comment says, /* Grouping using anonymous structs. Keep sorted. */ Stick to it. Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231114155528.96935-1-jani.nikula@intel.com commit 7c18e3c6b309aebc0fde38bda5ff30ea22c8a56c Author: Martin Kaiser Date: Sun Nov 12 17:52:41 2023 +0100 hwrng: virtio - remove #ifdef guards for PM functions Use pm_sleep_ptr for the freeze and restore functions instead of putting them under #ifdef CONFIG_PM_SLEEP. The resulting code is slightly simpler. pm_sleep_ptr lets the compiler see the functions but also allows removing them as unused code if !CONFIG_PM_SLEEP. Signed-off-by: Martin Kaiser Signed-off-by: Herbert Xu commit d57343022b71b9f41e731282dbe0baf0cff6ada8 Author: Chanho Park Date: Thu Nov 9 15:32:59 2023 +0900 crypto: jh7110 - Correct deferred probe return This fixes list_add corruption error when the driver is returned with -EPROBE_DEFER. It is also required to roll back the previous probe sequences in case of deferred_probe. So, this removes 'err_probe_defer" goto label and just use err_dma_init instead. Fixes: 42ef0e944b01 ("crypto: starfive - Add crypto engine support") Signed-off-by: Chanho Park Reviewed-by: Jia Jie Ho Signed-off-by: Herbert Xu commit ba5a434d5a1e799defd964537bdd406318ef5f7d Author: Eric Biggers Date: Tue Oct 31 20:18:11 2023 -0700 crypto: x86/sha256 - autoload if SHA-NI detected The x86 SHA-256 module contains four implementations: SSSE3, AVX, AVX2, and SHA-NI. Commit 1c43c0f1f84a ("crypto: x86/sha - load modules based on CPU features") made the module be autoloaded when SSSE3, AVX, or AVX2 is detected. The omission of SHA-NI appears to be an oversight, perhaps because of the outdated file-level comment. This patch fixes this, though in practice this makes no difference because SSSE3 is a subset of the other three features anyway. Indeed, sha256_ni_transform() executes SSSE3 instructions such as pshufb. Reviewed-by: Roxana Nicolescu Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 20342e3f64fb8eea86e490f57a3c0a4ace4284c1 Author: Eric Biggers Date: Tue Oct 31 20:17:24 2023 -0700 crypto: x86/sha1 - autoload if SHA-NI detected The x86 SHA-1 module contains four implementations: SSSE3, AVX, AVX2, and SHA-NI. Commit 1c43c0f1f84a ("crypto: x86/sha - load modules based on CPU features") made the module be autoloaded when SSSE3, AVX, or AVX2 is detected. The omission of SHA-NI appears to be an oversight, perhaps because of the outdated file-level comment. This patch fixes this, though in practice this makes no difference because SSSE3 is a subset of the other three features anyway. Indeed, sha1_ni_transform() executes SSSE3 instructions such as pshufb. Reviewed-by: Roxana Nicolescu Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit e53c741303a59ee1682e11f61b7772863e02526d Author: Dan Carpenter Date: Tue Oct 31 11:58:32 2023 +0300 crypto: qat - prevent underflow in rp2srv_store() The "ring" variable has an upper bounds check but nothing checks for negatives. This code uses kstrtouint() already and it was obviously intended to be declared as unsigned int. Make it so. Fixes: dbc8876dd873 ("crypto: qat - add rp2svc sysfs attribute") Signed-off-by: Dan Carpenter Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit bc197f5760025b61a33565301f4390886e0483db Author: Dimitri John Ledkov Date: Mon Oct 30 14:05:16 2023 +0200 crypto: drbg - Remove SHA1 from drbg SP800-90C 3rd draft states that SHA-1 will be removed from all specifications, including drbg by end of 2030. Given kernels built today will be operating past that date, start complying with upcoming requirements. No functional change, as SHA-256 / SHA-512 based DRBG have always been the preferred ones. Signed-off-by: Dimitri John Ledkov Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu commit dd9af7046d815a4d6ee77c2958d98de2af294309 Author: Dimitri John Ledkov Date: Mon Oct 30 14:05:15 2023 +0200 crypto: drbg - ensure drbg hmac sha512 is used in FIPS selftests Update code comment, self test & healthcheck to use HMAC SHA512, instead of HMAC SHA256. These changes are in dead-code, or FIPS enabled code-paths only and have not effect on usual kernel builds. On systems booting in FIPS mode that has the effect of switch sanity selftest to HMAC sha512 based (which has been the default DRBG). This patch updates code from 9b7b94683a ("crypto: DRBG - switch to HMAC SHA512 DRBG as default DRBG"), but is not interesting to cherry-pick for stable updates, because it doesn't affect regular builds, nor has any tangible effect on FIPS certifcation. Signed-off-by: Dimitri John Ledkov Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu commit a9dc62988600e57cabcca9b357cde4df8ee61fb5 Author: Dimitri John Ledkov Date: Mon Oct 30 14:05:14 2023 +0200 crypto: drbg - update FIPS CTR self-checks to aes256 When originally drbg was introduced FIPS self-checks for all types but CTR were using the most preferred parameters for each type of DRBG. Update CTR self-check to use aes256. This patch updates code from 541af946fe ("crypto: drbg - SP800-90A Deterministic Random Bit Generator"), but is not interesting to cherry-pick for stable updates, because it doesn't affect regular builds, nor has any tangible effect on FIPS certifcation. Signed-off-by: Dimitri John Ledkov Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu commit 7ee44f1b59df29419e1bfdfd118fbcdd83c5398c Author: Dimitri John Ledkov Date: Mon Oct 30 14:05:13 2023 +0200 crypto: drbg - ensure most preferred type is FIPS health checked drbg supports multiple types of drbg, and multiple parameters of each. Health check sanity only checks one drbg of a single type. One can enable all three types of drbg. And instead of checking the most preferred algorithm (last one wins), it is currently checking first one instead. Update ifdef to ensure that healthcheck prefers HMAC, over HASH, over CTR, last one wins, like all other code and functions. This patch updates code from 541af946fe ("crypto: drbg - SP800-90A Deterministic Random Bit Generator"), but is not interesting to cherry-pick for stable updates, because it doesn't affect regular builds, nor has any tangible effect on FIPS certifcation. Signed-off-by: Dimitri John Ledkov Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu commit d872ca165cb67112f2841ef9c37d51ef7e63d1e4 Author: Dan Carpenter Date: Mon Oct 30 12:02:59 2023 +0300 crypto: rsa - add a check for allocation failure Static checkers insist that the mpi_alloc() allocation can fail so add a check to prevent a NULL dereference. Small allocations like this can't actually fail in current kernels, but adding a check is very simple and makes the static checkers happy. Fixes: 6637e11e4ad2 ("crypto: rsa - allow only odd e and restrict value in FIPS mode") Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu commit fea845fd79b534948a707511591c059d293668c1 Author: Eric Biggers Date: Sat Oct 28 22:16:59 2023 -0700 crypto: shash - don't exclude async statuses from error stats EINPROGRESS and EBUSY have special meaning for async operations. However, shash is always synchronous, so these statuses have no special meaning for shash and don't need to be excluded when handling errors. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 84d0217336d76fc4ba5dcd71ca195f4dc71c1d4d Author: Eric Biggers Date: Sat Oct 28 21:56:13 2023 -0700 crypto: sun8i-ss - use crypto_shash_tfm_digest() in sun8i_ss_hashkey() Simplify sun8i_ss_hashkey() by using crypto_shash_tfm_digest() instead of an alloc+init+update+final sequence. This should also improve performance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit a61fb707599e8d26d1b6838021108dbde1a67ce8 Author: Weili Qian Date: Sat Oct 28 18:40:11 2023 +0800 crypto: hisilicon/qm - remove incorrect type cast The 'offset' type is unsigned long in 'struct debugfs_reg32', so type of values casts to unsigned long long is incorrect, and the values do not require type cast, remove them. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 66e6fb1eb972d93c3ab9f27f0c0901b842e1152a Author: Weili Qian Date: Sat Oct 28 18:22:44 2023 +0800 crypto: hisilicon/qm - print device abnormal information When device is abnormal and reports abnormal interrupt event to driver, the driver can print device information for error analysis. This patch adds some device error-related information output after the device reports an abnormal interrupt. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 8c20982caca4b10ca79aea8134a16ea98989ca03 Author: Herbert Xu Date: Fri Oct 27 18:44:34 2023 +0800 crypto: n2 - Silence gcc format-truncation false positive warnings The heuristics used by gcc triggers false positive truncation warnings in hifn_alg_alloc. Add checks on snprintf calls to silence these warnings, including the one for cra_driver_name even though it does not currently trigger a gcc warning. Signed-off-by: Herbert Xu commit 0501d0d14949004301012b82914791937c4fbb25 Author: Herbert Xu Date: Fri Oct 27 18:35:17 2023 +0800 crypto: marvell/cesa - Silence gcc format-truncation false positive warnings The heuristics used by gcc triggers false positive truncation warnings in hifn_alg_alloc. The warnings are false positives because nengines is at most 2. Make the buffer bigger and change the snprintf to use unsigned integers to eliminate these warnings. Signed-off-by: Herbert Xu commit 588a90ac252c7cd0434859e749eeed1f8e5a1f90 Author: Herbert Xu Date: Fri Oct 27 18:25:48 2023 +0800 crypto: ccree - Silence gcc format-truncation false positive warnings The heuristics used by gcc triggers false positive truncation warnings in hifn_alg_alloc. The warning triggered by the strings here are clearly false positives (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95755). Add checks on snprintf calls to silence these warnings, including the one for cra_driver_name even though it does not currently trigger a gcc warning. Signed-off-by: Herbert Xu commit 6d51b9ae4d5e43457f459222d9105e683ae15a0c Author: Rob Herring Date: Wed Oct 25 11:20:34 2023 -0500 hwrng: ingenic - Replace of_device.h with explicit of.h include The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other and pull in various other headers. In preparation to fix this, adjust the includes for what is actually needed. of_device.h isn't needed, but of.h is and was implicitly included by it. Signed-off-by: Rob Herring Signed-off-by: Herbert Xu commit 239e27a983316e4746e2ad45ba65fafaf3bbc15d Author: Sagar Vashnav Date: Wed Oct 25 08:57:07 2023 -0400 crypto: lib/aesgcm - Add kernel docs for aesgcm_mac Add kernel documentation for the aesgcm_mac. This function generates the authentication tag using the AES-GCM algorithm. Signed-off-by: Sagar Vashnav Signed-off-by: Herbert Xu commit 03f8f3cb6e2280866a9d53b77b6ee1c1b9ffb2a4 Author: Neil Armstrong Date: Wed Oct 25 09:28:54 2023 +0200 dt-bindings: crypto: qcom,prng: document SM8650 Document SM8650 compatible for the True Random Number Generator. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Herbert Xu commit 8c74562b7104bf46304cc6ce476631e3da8ddf74 Author: Neil Armstrong Date: Wed Oct 25 09:28:22 2023 +0200 dt-bindings: crypto: qcom-qce: document the SM8650 crypto engine Document the crypto engine on the SM8650 Platform. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Herbert Xu commit 27832a9baad58144e184fd8f38260dc9404105e7 Author: Neil Armstrong Date: Wed Oct 25 09:26:26 2023 +0200 dt-bindings: crypto: qcom,inline-crypto-engine: document the SM8650 ICE Document the Inline Crypto Engine (ICE) on the SM8650 Platform. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit bbb968696d0f3442ab823598def3b756cf4735c6 Author: Kan Liang Date: Thu Nov 16 06:22:45 2023 -0800 perf/x86/intel/cstate: Add Grand Ridge support The same as the Sierra Forest, the Grand Ridge supports core C1/C6 and module C6. But it doesn't support pkg C6 residency counter. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231116142245.1233485-4-kan.liang@linux.intel.com commit 3877d55a0db2688c2e4ab8a319614a0c81f8e2d2 Author: Kan Liang Date: Thu Nov 16 06:22:44 2023 -0800 perf/x86/intel/cstate: Add Sierra Forest support A new module C6 Residency Counter is introduced in the Sierra Forest. The scope of the new counter is module (A cluster of cores shared L2 cache). Create a brand new cstate_module PMU to profile the new counter. The only differences between the new cstate_module PMU and the existing cstate PMU are the scope and events. Regarding the choice of the new cstate_module PMU name, the current naming rule of a cstate PMU is "cstate_" + the scope of the PMU. The scope of the PMU is the cores shared L2. On SRF, Intel calls it "module", while the internal Linux sched code calls it "cluster". The "cstate_module" is used as the new PMU name, because - The Cstate PMU driver is a Intel specific driver. It doesn't impact other ARCHs. The name makes it consistent with the documentation. - The "cluster" mainly be used by the scheduler developer, while the user of cstate PMU is more likely a researcher reading HW docs and optimizing power. - In the Intel's SDM, the "cluster" has a different meaning/scope for topology. Using it will mislead the end users. Besides the module C6, the core C1/C6 and pkg C6 residency counters are supported in the Sierra Forest as well. Suggested-by: Artem Bityutskiy Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231116142245.1233485-3-kan.liang@linux.intel.com commit c3dd1995620cdcd65cf4944c4164b0dbc16e557c Author: Kan Liang Date: Thu Nov 16 06:22:43 2023 -0800 x86/smp: Export symbol cpu_clustergroup_mask() Intel cstate PMU driver will invoke the topology_cluster_cpumask() to retrieve the CPU mask of a cluster. A modpost error is triggered since the symbol cpu_clustergroup_mask is not exported. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231116142245.1233485-2-kan.liang@linux.intel.com commit 243218ca93037631f0224fdbefea045912cb761a Author: Kan Liang Date: Thu Nov 16 06:22:42 2023 -0800 perf/x86/intel/cstate: Cleanup duplicate attr_groups The events of the cstate_core and cstate_pkg PMU have the same format. They both need to create a "events" group (with empty attrs). The attr_groups can be shared. Remove the dedicated attr_groups for each cstate PMU. Use the shared cstate_attr_groups to replace. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20231116142245.1233485-1-kan.liang@linux.intel.com commit e2e13630f93d942d02f3b3f98660228a3545c60e Author: Sam James Date: Tue Nov 7 20:55:00 2023 +0000 objtool: Fix calloc call for new -Walloc-size GCC 14 introduces a new -Walloc-size included in -Wextra which errors out like: ``` check.c: In function ‘cfi_alloc’: check.c:294:33: error: allocation of insufficient size ‘1’ for type ‘struct cfi_state’ with size ‘320’ [-Werror=alloc-size] 294 | struct cfi_state *cfi = calloc(sizeof(struct cfi_state), 1); | ^~~~~~ ``` The calloc prototype is: ``` void *calloc(size_t nmemb, size_t size); ``` So, just swap the number of members and size arguments to match the prototype, as we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not doing anything wrong. Signed-off-by: Sam James Signed-off-by: Peter Zijlstra (Intel) Acked-by: Josh Poimboeuf Link: https://lore.kernel.org/r/20231107205504.1470006-1-sam@gentoo.org commit 5496fb8eedd637e1e9d87655f86dc816afd5ad68 Author: Philipp Stanner Date: Tue Nov 14 12:19:02 2023 +0100 drivers/fpga: use standard array-copy function dfl.c utilizes memdup_user() and array_size() to copy a userspace array. array_size() will likely never trigger thanks to the preceding check. Nevertheless, in the theoretical event that it would, it would return SIZE_MAX to memdup_user(), resulting in an attempt to allocate huge amounts of memory. string.h from the core-api now provides memdup_array_user() which also performs an overflow check and returns an error-pointer with -EOVERFLOW to the caller. As an additional advantage it standardizes how userspace-arrays are being copied and, thus, makes it more obvious to readers that an array is being copied. Replace memdup_user() with memdup_array_user(). Suggested-by: Dave Airlie Signed-off-by: Philipp Stanner Acked-by: Xu Yilun Link: https://lore.kernel.org/r/20231114111901.19380-2-pstanner@redhat.com Signed-off-by: Xu Yilun commit 18de1e517ed37ebaf33e771e46faf052e966e163 Author: Eric Dumazet Date: Thu Nov 16 08:57:07 2023 +0000 gve: add gve_features_check() It is suboptimal to attempt skb linearization from ndo_start_xmit() if a gso skb has pathological layout, or if host stack does not have access to the payload (TCP direct). Linearization of large skbs can also fail under memory pressure. We should instead have an ndo_features_check() so that we can fallback to GSO, which is supported even for TCP direct, and generally much more efficient (no payload copy). Signed-off-by: Eric Dumazet Cc: Bailey Forrest Cc: Willem de Bruijn Cc: Jeroen de Borst Cc: Praveen Kaligineedi Cc: Shailend Chand Cc: Ziwei Xiao Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit fedfa36d045ab78ea9a0aa2c5a3d5d74c27207d3 Author: Jiri Valek - 2N Date: Fri Nov 17 02:41:52 2023 +0000 Input: cap11xx - remove unnecessary IRQ parsing Separate IRQ parsing is not necessary, I2C core do the job. Signed-off-by: Jiri Valek - 2N Signed-off-by: Dmitry Torokhov commit 380b50ae3a04222334a3779b3787eba844b1177f Author: Marco von Rosenberg Date: Thu Nov 16 20:32:31 2023 +0100 net: phy: broadcom: Wire suspend/resume for BCM54612E The BCM54612E ethernet PHY supports IDDQ-SR. Therefore wire-up the suspend and resume callbacks to point to bcm54xx_suspend() and bcm54xx_resume(). Signed-off-by: Marco von Rosenberg Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit d580d265e9abb8c4e1e891051c7b03f3eac86055 Author: Shigeru Yoshida Date: Fri Nov 17 09:37:04 2023 +0900 tipc: Remove redundant call to TLV_SPACE() The purpose of TLV_SPACE() is to add the TLV descriptor size to the size of the TLV value passed as argument and align the resulting size to TLV_ALIGNTO. tipc_tlv_alloc() calls TLV_SPACE() on its argument. In other words, tipc_tlv_alloc() takes its argument as the size of the TLV value. So the call to TLV_SPACE() in tipc_get_err_tlv() is redundant. Let's remove this redundancy. Acked-by: Paolo Abeni Signed-off-by: Shigeru Yoshida Signed-off-by: David S. Miller commit 7c93d177d913a3a43bcb8f8edd4e2f78074a18a3 Author: Lad Prabhakar Date: Wed Nov 15 21:04:48 2023 +0000 dt-bindings: net: renesas,etheravb: Document RZ/Five SoC The Gigabit Ethernet IP block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-gbeth" compatible string will be used on the RZ/Five SoC so to make this clear and to keep this file consistent, update the comment to include RZ/Five SoC. No driver changes are required as generic compatible string "renesas,rzg2l-gbeth" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Acked-by: Conor Dooley Reviewed-by: Sergey Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit 9e6311010c4b1234b9d8319ca6a94bd798ad97ea Merge: 9a1f02f3ef96b 466b97b1871a4 Author: David S. Miller Date: Thu Nov 16 23:45:04 2023 +0000 Merge branch 'phylink-sfp-linkmode' Russell King says: ==================== net: Add linkmode_fill, use linkmode_*() in phylink/sfp code This small series adds a linkmode_fill() op, and uses it in phylink. The SFP code is also converted to use linkmode_*() ops. ==================== Signed-off-by: David S. Miller commit 466b97b1871a49c272757f7527db2f85ea6338b4 Author: Russell King (Oracle) Date: Wed Nov 15 11:39:28 2023 +0000 net: sfp: use linkmode_*() rather than open coding Use the linkmode_*() helpers rather than open coding the calls to the bitmap operators. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ba50a8d40258081325db15f5a86cbb301867a3ba Author: Russell King (Oracle) Date: Wed Nov 15 11:39:23 2023 +0000 net: phylink: use linkmode_fill() Use linkmode_fill() rather than open coding the bitmap operation. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 96fa96e198f9707285003075fbbce7db6a485112 Author: Russell King (Oracle) Date: Wed Nov 15 11:39:18 2023 +0000 net: linkmode: add linkmode_fill() helper Add a linkmode_fill() helper, which will allow us to convert phylink's open coded bitmap_fill() operations. Signed-off-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9a1f02f3ef96bd83162e94e4ee34a4f8240256ba Merge: c6e9dba3be5ef 0a8de364ff7a1 Author: David S. Miller Date: Thu Nov 16 23:35:12 2023 +0000 Merge branch 'tcp-change-reaction-to-ICMP' Eric Dumazet says: ==================== tcp: change reaction to ICMP messages ICMP[v6] messages received for a socket in TCP_SYN_SENT currently abort the connection attempt, in violation of standards. This series changes our stack to adhere to RFC 6069 and RFC 1122 (4.2.3.9) ==================== Signed-off-by: David S. Miller commit 0a8de364ff7a14558e9676f424283148110384d6 Author: Eric Dumazet Date: Tue Nov 14 17:23:41 2023 +0000 tcp: no longer abort SYN_SENT when receiving some ICMP Currently, non fatal ICMP messages received on behalf of SYN_SENT sockets do call tcp_ld_RTO_revert() to implement RFC 6069, but immediately call tcp_done(), thus aborting the connect() attempt. This violates RFC 1122 following requirement: 4.2.3.9 ICMP Messages ... o Destination Unreachable -- codes 0, 1, 5 Since these Unreachable messages indicate soft error conditions, TCP MUST NOT abort the connection, and it SHOULD make the information available to the application. This patch makes sure non 'fatal' ICMP[v6] messages do not abort the connection attempt. It enables RFC 6069 for SYN_SENT sockets as a result. Signed-off-by: Eric Dumazet Cc: David Morley Cc: Neal Cardwell Cc: Yuchung Cheng Signed-off-by: David S. Miller commit 14dd92d0a1174d3fe052bf87a3ae3a6914946170 Author: Eric Dumazet Date: Tue Nov 14 17:23:40 2023 +0000 tcp: use tp->total_rto to track number of linear timeouts in SYN_SENT state In commit ccce324dabfe ("tcp: make the first N SYN RTO backoffs linear") David used icsk->icsk_backoff field to track the number of linear timeouts. Since then, tp->total_rto has been added. This commit uses tp->total_rto instead of icsk->icsk_backoff so that tcp_ld_RTO_revert() no longer can trigger an overflow in inet_csk_rto_backoff(). Other than the potential UBSAN report, there was no issue because receiving an ICMP message currently aborts the connect(). In the following patch, we want to adhere to RFC 6069 and RFC 1122 4.2.3.9. Signed-off-by: Eric Dumazet Cc: David Morley Cc: Neal Cardwell Cc: Yuchung Cheng Signed-off-by: David S. Miller commit 2aac0bf4ebc8e09941bb2a40c0ce725437d9a82c Author: Joshua Yeong Date: Tue Nov 14 16:55:25 2023 +0800 i3c: Add fallback method for GETMXDS CCC Some I3C hardware will report error when an incorrect length is received from device. GETMXDS CCC are available in 2 formats: without turnaround time (format 1) and with turnaround time (format 2). There is no mechanics to determine which format is supported by device. So in case sending GETMXDS CCC format 2 resulted in a failure, try sending GETMXDS CCC format 1 instead. Signed-off-by: Joshua Yeong Reviewed-by: Miquel Raynal Link: https://lore.kernel.org/r/20231114085525.6271-2-joshua.yeong@starfivetech.com Signed-off-by: Alexandre Belloni commit 4afd72876942f2ab1e97e79082464a46ab40a485 Author: Jarkko Nikula Date: Thu Nov 9 15:37:08 2023 +0200 i3c: mipi-i3c-hci: Add DMA bounce buffer for private transfers Implement a local bounce buffer for private I3C SDR and I2C transfers when using DMA and the buffer attached to the transfer is not DMA safe. Otherwise the DMA transfer will fail and with following warning: [ 11.411059] i3c mipi-i3c-hci.0: rejecting DMA map of vmalloc memory [ 11.417313] WARNING: CPU: 3 PID: 357 at include/linux/dma-mapping.h:332 hci_dma_queue_xfer+0x2e2/0x300 [mipi_i3c_hci] Strictly speaking private I3C SDR transfers are expected to pass a DMA-able buffer. However I fear this requirement may easily be slipped or go unnoticed when I3C interface support is added into a existing device driver that use regmap API to read/write stack variables. For example this is the case with the commit 2660b0080bb2 ("iio: imu: st_lsm6dsx: add i3c basic support for LSM6DSO and LSM6DSR"). Buffer of an I2C message is not required to be DMA safe and the I2C core provides i2c_(get|put)_dma_safe_msg_buf() helpers for the host controllers that do DMA and that is also recommendation for the i2c_xfers() callback from the I3C core. However due to above I3C private transfers reason I decided to implement a bounce buffer for them and reuse the same code for the I2C transfers too. Since this driver is currently the only I3C host controller driver that can do DMA the implementation is done here and not in I3C core. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20231109133708.653950-5-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit f83f86e506e6b776ba5dd70f919f7e2856f9e061 Author: Jarkko Nikula Date: Thu Nov 9 15:37:07 2023 +0200 i3c: mipi-i3c-hci: Handle I3C address header error in hci_cmd_v1_daa() Handle also I3C address header error response status as the end of DAA process in hci_cmd_v1_daa(). According to MIPI I3C HCI Specification v1.1 the NACK error during DAA process comes when the device does not accept the dynamic address. Currently code uses it for successful exit from the process and fails with any other error response. I'm unsure is this MIPI I3C HCI version specific difference or specification misunderstanding but on an early MIPI I3C HCI version compatible controller responds always with I3C address header error and not with NACK error when there is no device on the bus or no more devices participating to DAA process. Handle now both response statuses as the end of DAA. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20231109133708.653950-4-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit 0be1a06c66c9522abc264bd9cb4df7e676b13ae3 Author: Jarkko Nikula Date: Thu Nov 9 15:37:06 2023 +0200 i3c: mipi-i3c-hci: Do not overallocate transfers in hci_cmd_v1_daa() Function hci_cmd_v1_daa() uses only single transfer at a time so no need to allocate two transfers and access can be simplified. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20231109133708.653950-3-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit 9e0e9e85e74e4893dc5a2c5a6da54f64cf45290e Author: Jarkko Nikula Date: Thu Nov 9 15:37:05 2023 +0200 i3c: mipi-i3c-hci: Report NACK response from CCC command to core Currently probe of mipi-i3c-hci will fail if bus doesn't have any I3C devices connected. This happens when CCC commands that are sent during i3c_master_bus_init() are not ACKed by any device and controller responds with an error status set. The controller can detect NACK both during I3C address header transmission (broadcast address 0x7e is not ACKed) and when target device address or dynamic address assignment is NACKed. Former as error status 0x4: Address Header Error and latter as 0x5: NACK. Difference between those two NACK statuses were not described explicitly until MIPI I3C HCI Specification v1.1. Earlier versions share the same error status code though. Report both of those as I3C_ERROR_M2 to I3C core code. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20231109133708.653950-2-jarkko.nikula@linux.intel.com Signed-off-by: Alexandre Belloni commit c6e9dba3be5ef3b701b29b143609561915e5d0e9 Author: Alce Lafranque Date: Tue Nov 14 11:36:57 2023 -0600 vxlan: add support for flowlabel inherit By default, VXLAN encapsulation over IPv6 sets the flow label to 0, with an option for a fixed value. This commits add the ability to inherit the flow label from the inner packet, like for other tunnel implementations. This enables devices using only L3 headers for ECMP to correctly balance VXLAN-encapsulated IPv6 packets. ``` $ ./ip/ip link add dummy1 type dummy $ ./ip/ip addr add 2001:db8::2/64 dev dummy1 $ ./ip/ip link set up dev dummy1 $ ./ip/ip link add vxlan1 type vxlan id 100 flowlabel inherit remote 2001:db8::1 local 2001:db8::2 $ ./ip/ip link set up dev vxlan1 $ ./ip/ip addr add 2001:db8:1::2/64 dev vxlan1 $ ./ip/ip link set arp off dev vxlan1 $ ping -q 2001:db8:1::1 & $ tshark -d udp.port==8472,vxlan -Vpni dummy1 -c1 [...] Internet Protocol Version 6, Src: 2001:db8::2, Dst: 2001:db8::1 0110 .... = Version: 6 .... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT) .... 0000 00.. .... .... .... .... .... = Differentiated Services Codepoint: Default (0) .... .... ..00 .... .... .... .... .... = Explicit Congestion Notification: Not ECN-Capable Transport (0) .... 1011 0001 1010 1111 1011 = Flow Label: 0xb1afb [...] Virtual eXtensible Local Area Network Flags: 0x0800, VXLAN Network ID (VNI) Group Policy ID: 0 VXLAN Network Identifier (VNI): 100 [...] Internet Protocol Version 6, Src: 2001:db8:1::2, Dst: 2001:db8:1::1 0110 .... = Version: 6 .... 0000 0000 .... .... .... .... .... = Traffic Class: 0x00 (DSCP: CS0, ECN: Not-ECT) .... 0000 00.. .... .... .... .... .... = Differentiated Services Codepoint: Default (0) .... .... ..00 .... .... .... .... .... = Explicit Congestion Notification: Not ECN-Capable Transport (0) .... 1011 0001 1010 1111 1011 = Flow Label: 0xb1afb ``` Signed-off-by: Alce Lafranque Co-developed-by: Vincent Bernat Signed-off-by: Vincent Bernat Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 3bdd9fd29cb0f136b307559a19c107210ad5c314 Author: Lucas Karpinski Date: Tue Nov 14 10:11:31 2023 -0500 selftests/net: synchronize udpgro tests' tx and rx connection The sockets used by udpgso_bench_tx aren't always ready when udpgso_bench_tx transmits packets. This issue is more prevalent in -rt kernels, but can occur in both. Replace the hacky sleep calls with a function that checks whether the ports in the namespace are ready for use. Suggested-by: Paolo Abeni Signed-off-by: Lucas Karpinski Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit e47ef9eb5bb8fdc9fafa5eaf82be7a922af89b1e Merge: 0fbe92b9fd4d3 04fd47bf70f95 Author: David S. Miller Date: Thu Nov 16 22:30:11 2023 +0000 Merge branch 'tc-testing-tdc-updates' Pedro Tammela says: ==================== selftests: tc-testing: updates to tdc - Patch 1 removes an obscure feature from tdc - Patch 2 reworks the namespace and devices setup giving a nice speed boost - Patch 3 preloads all tc modules when running kselftests - Patch 4 turns on parallel testing in kselftests ==================== Signed-off-by: David S. Miller commit 04fd47bf70f95533c2b8387c19c7e11c085945d2 Author: Pedro Tammela Date: Tue Nov 14 13:04:42 2023 -0300 selftests: tc-testing: use parallel tdc in kselftests Leverage parallel tests in kselftests using all the available cpus. We tested this in tuxsuite and locally extensively and it seems it's ready for prime time. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit bb9623c337f5d13b15d700127281c9607d1f8ec2 Author: Pedro Tammela Date: Tue Nov 14 13:04:41 2023 -0300 selftests: tc-testing: preload all modules in kselftests While running tdc tests in parallel it can race over the module loading done by tc and fail the run with random errors. So avoid this by preloading all modules before running tdc in kselftests. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit fa63d353ddfb8a2d7688220a45b84e1507d211cf Author: Pedro Tammela Date: Tue Nov 14 13:04:40 2023 -0300 selftests: tc-testing: rework namespaces and devices setup As mentioned in the TC Workshop 0x17, our recent changes to tdc broke downstream CI systems like tuxsuite. The issue is the classic problem with rcu/workqueue objects where you can miss them if not enough wall time has passed. The latter is subjective to the system and kernel config, in my machine could be nanoseconds while in another could be microseconds or more. In order to make the suite deterministic, poll for the existence of the objects in a reasonable manner. Talking netlink directly is the the best solution in order to avoid paying the cost of multiple 'fork()' calls, so introduce a netlink based setup routine using pyroute2. We leave the iproute2 one as a fallback when pyroute2 is not available. Also rework the iproute2 side to mimic the netlink routine where it creates DEV0 as the peer of DEV1 and moves DEV1 into the net namespace. This way when the namespace is deleted DEV0 is also deleted automatically, leaving no margin for resource leaks. Another bonus of this change is that our setup time sped up by a factor of 2 when using netlink. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9ffa01cab0699476be12ed4917c7d282cedc5ddf Author: Pedro Tammela Date: Tue Nov 14 13:04:39 2023 -0300 selftests: tc-testing: drop '-N' argument from nsPlugin This argument would bypass the net namespace creation and run the test in the root namespace, even if nsPlugin was specified. Drop it as it's the same as commenting out the nsPlugin from a test and adds additional complexity to the plugin code. Signed-off-by: Pedro Tammela Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 0fbe92b9fd4d3287f291e8f1b03d63dc4a2f38a4 Author: Christian Marangi Date: Tue Nov 14 15:08:44 2023 +0100 dt-bindings: Document Marvell Aquantia PHY Document bindings for Marvell Aquantia PHY. The Marvell Aquantia PHY require a firmware to work correctly and there at least 3 way to load this firmware. Describe all the different way and document the binding "firmware-name" to load the PHY firmware from userspace. Signed-off-by: Christian Marangi Reviewed-by: Conor Dooley Acked-by: Rob Herring Signed-off-by: David S. Miller commit e93984ebc1c82bd34f7a1b3391efaceee0a8ae96 Author: Robert Marko Date: Tue Nov 14 15:08:43 2023 +0100 net: phy: aquantia: add firmware load support Aquantia PHY-s require firmware to be loaded before they start operating. It can be automatically loaded in case when there is a SPI-NOR connected to Aquantia PHY-s or can be loaded from the host via MDIO. This patch adds support for loading the firmware via MDIO as in most cases there is no SPI-NOR being used to save on cost. Firmware loading code itself is ported from mainline U-boot with cleanups. The firmware has mixed values both in big and little endian. PHY core itself is big-endian but it expects values to be in little-endian. The firmware is little-endian but CRC-16 value for it is stored at the end of firmware in big-endian. It seems the PHY does the conversion internally from firmware that is little-endian to the PHY that is big-endian on using the mailbox but mailbox returns a big-endian CRC-16 to verify the written data integrity. Co-developed-by: Christian Marangi Signed-off-by: Robert Marko Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e1fbfa4a995d42e02e22b0dff2f8b4fdee1504b3 Author: Christian Marangi Date: Tue Nov 14 15:08:42 2023 +0100 net: phy: aquantia: move MMD_VEND define to header Move MMD_VEND define to header to clean things up and in preparation for firmware loading support that require some define placed in aquantia_main. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d2213db3f49bce8e7a87c8de05b9a091f78f654e Author: Christian Marangi Date: Tue Nov 14 15:08:41 2023 +0100 net: phy: aquantia: move to separate directory Move aquantia PHY driver to separate driectory in preparation for firmware loading support to keep things tidy. Signed-off-by: Christian Marangi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 470f3669d38dac3eb5e4b0db5bb9aea3a52df547 Merge: 56eddc3cb1aff dc9c02b7faa0f Author: David S. Miller Date: Thu Nov 16 21:55:06 2023 +0000 Merge branch 'octeon_ep-transmit-cleanups-and-optimizations' Shinas Rasheed says: ==================== Cleanup and optimizations to transmit code Pad small packets to ETH_ZLEN before transmit, cleanup dma sync calls, add xmit_more functionality and then further remove atomic variable usage in the prior. Changes: V3: - Stop returning NETDEV_TX_BUSY when ring is full in xmit_patch. Change to inspect early if next packet can fit in ring instead of current packet, and stop queue if not. - Add smp_mb between stopping tx queue and checking if tx queue has free entries again, in queue full check function to let reflect IQ process completions that might have happened on other cpus. - Update small packet padding patch changelog to give more info. V2: https://lore.kernel.org/all/20231024145119.2366588-1-srasheed@marvell.com/ - Added patch for padding small packets to ETH_ZLEN, part of optimization patches for transmit code missed out in V1 - Updated changelog to provide more details for dma_sync remove patch - Updated changelog to use imperative tone in add xmit_more patch V1: https://lore.kernel.org/all/20231023114449.2362147-1-srasheed@marvell.com/ ==================== Signed-off-by: David S. Miller commit dc9c02b7faa0f37a1dd52752192a665319657d14 Author: Shinas Rasheed Date: Tue Nov 14 05:45:35 2023 -0800 octeon_ep: remove atomic variable usage in Tx data path Replace atomic variable "instr_pending" which represents number of posted tx instructions pending completion, with host_write_idx and flush_index variables in the xmit and completion processing respectively. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 373d9a55ba746c579ca98222d2b4308d06978ca5 Author: Shinas Rasheed Date: Tue Nov 14 05:45:34 2023 -0800 octeon_ep: implement xmit_more in transmit Add xmit_more handling in tx datapath for octeon_ep pf. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 2fba5069959c50c0e5be95e8d67356c63909cbc2 Author: Shinas Rasheed Date: Tue Nov 14 05:45:33 2023 -0800 octeon_ep: remove dma sync in trasmit path Cleanup dma sync calls for scatter gather mappings, since they are coherent allocations and do not need explicit sync to be called. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit 5827fe2bc9c4bade6af994676c9823908e091877 Author: Shinas Rasheed Date: Tue Nov 14 05:45:32 2023 -0800 octeon_ep: add padding for small packets Pad small packets to ETH_ZLEN before transmit, as hardware cannot pad and requires software padding to ensure minimum ethernet frame length. Signed-off-by: Shinas Rasheed Signed-off-by: David S. Miller commit d3715a6471c8f0a90fb852c10a5a84948d6a1ff5 Author: Daniele Ceraolo Spurio Date: Thu Nov 9 15:54:36 2023 -0800 drm/i915/huc: Stop printing about unsupported HuC on MTL On MTL, the HuC is only supported on the media GT, so our validation check on the module parameter detects an inconsistency on the root GT (the modparams asks to enable HuC, but the support is not there) and prints the following info message: [drm] GT0: Incompatible option enable_guc=3 - HuC is not supported! This can be confusing to the user and make them think that something is wrong when it isn't, so we need to silence it. Given that any platform that supports HuC also supports GuC, if a user tries to enable HuC on a platform that really doesn't support it they'll already see a message about GuC not being supported, so instead of just silencing the HuC message on newer platforms we can just get rid of it entirely. Signed-off-by: Daniele Ceraolo Spurio Cc: John Harrison Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20231109235436.2349963-1-daniele.ceraolospurio@intel.com commit 48794cd57a67246acc53a3edfdececdbb5b98453 Author: Chris Morgan Date: Wed Oct 18 11:18:46 2023 -0500 clk: rockchip: rk3568: Add PLL rate for 115.2MHz Add support for a PLL rate of 115.2MHz so that the Powkiddy RK2023 panel can run at a requested 60hz (59.99, close enough). I have confirmed this rate fits with all the constraints listed in the TRM for the VPLL (as an integer PLL) in Part 1 "Chapter 2 Clock & Reset Unit (CRU)." Signed-off-by: Chris Morgan Link: https://lore.kernel.org/r/20231018161848.346947-4-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner commit 97c39c7a0965b3eba87baa2b7d51443a46e21b8f Author: Sebastian Reichel Date: Thu Nov 9 19:44:44 2023 +0100 arm64: dts: rockchip: add analog audio to RK3588 EVB1 Add support for the EVB1 analog audio to its devicetree. Only the headphone has been tested, since I don't have matching peripherals to test headset or speakers. I also didn't manage to record sound from the onboard microphone, but that also fails with the vendor kernel. Thus I assume the microphone on my board is fried. Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20231109184453.108676-2-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner commit e4e2fbe7d7d70ce52adeca7ef933488ebfe78f03 Author: Petr Vorel Date: Wed Nov 8 09:56:30 2023 +0100 MAINTAINERS: Remove snawrocki's git tree There is already krzk/linux.git listed, which is currently used. Signed-off-by: Petr Vorel Acked-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20231108085630.7767-1-pvorel@suse.cz Signed-off-by: Krzysztof Kozlowski commit 54a1dc08e1737552e6764f38837b19fae9548fb0 Author: Lad Prabhakar Date: Wed Nov 15 20:53:33 2023 +0000 spi: dt-bindings: renesas,rspi: Document RZ/Five SoC The RSPI block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-rspi" compatible string will be used on the RZ/Five SoC so to make this clear and to keep this file consistent, update the comment to include RZ/Five SoC. No driver changes are required as generic compatible string "renesas,rspi-rz" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231115205333.31076-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown commit 7d562ac331ddc4f798e6185a858bc98c22ee7d1b Author: Lad Prabhakar Date: Wed Nov 15 21:33:58 2023 +0000 ASoC: dt-bindings: renesas,rz-ssi: Document RZ/Five SoC The SSI block on the RZ/Five SoC is identical to one found on the RZ/G2UL SoC. "renesas,r9a07g043-ssi" compatible string will be used on the RZ/Five SoC so to make this clear and to keep this file consistent, update the comment to include RZ/Five SoC. No driver changes are required as generic compatible string "renesas,rz-ssi" will be used as a fallback on RZ/Five SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231115213358.33400-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown commit 5583e92be5c45448e6ea461e1780d46c17d14963 Author: Sam Protsenko Date: Thu Nov 9 13:09:25 2023 -0600 clk: samsung: Improve kernel-doc comments Unify and improve the style of kernel-doc comments in Samsung CCF framework. Resemble more idiomatic style described in [1] and commonly used throughout most of the kernel code. [1] Documentation/doc-guide/kernel-doc.rst Signed-off-by: Sam Protsenko Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20231109190925.2066-2-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit d1d53909bb5fbc9bf618ab78515fdbd5d6b691c6 Author: Sam Protsenko Date: Thu Nov 9 13:09:24 2023 -0600 clk: samsung: Fix kernel-doc comments Fix some issues found in kernel-doc comments in Samsung CCF framework. It makes scripts/kernel-doc happy, which can be checked with: $ find drivers/clk/samsung/ -name '*.[ch]' -exec \ scripts/kernel-doc -v -none {} \; Signed-off-by: Sam Protsenko Fixes: ddeac8d968d4 ("clk: samsung: add infrastructure to register cpu clocks") Fixes: 721c42a351b1 ("clk: samsung: add common clock framework helper functions for Samsung platforms") Fixes: 3ff6e0d8d64d ("clk: samsung: Add support to register rate_table for samsung plls") Reviewed-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lore.kernel.org/r/20231109190925.2066-1-semen.protsenko@linaro.org Signed-off-by: Krzysztof Kozlowski commit b55d073e6501dc6077edaa945a6dad8ac5c8bbab Author: Su Hui Date: Thu Nov 16 12:18:23 2023 +0800 power: supply: bq256xx: fix some problem in bq256xx_hw_init smatch complains that there is a buffer overflow and clang complains 'ret' is never read. Smatch error: drivers/power/supply/bq256xx_charger.c:1578 bq256xx_hw_init() error: buffer overflow 'bq256xx_watchdog_time' 4 <= 4 Clang static checker: Value stored to 'ret' is never read. Add check for buffer overflow and error code from regmap_update_bits(). Fixes: 32e4978bb920 ("power: supply: bq256xx: Introduce the BQ256XX charger driver") Signed-off-by: Su Hui Link: https://lore.kernel.org/r/20231116041822.1378758-1-suhui@nfschina.com Signed-off-by: Sebastian Reichel commit 6543f376ec8aa90a6c1ed44b765f4f0d6c3eb1db Author: Matti Vaittinen Date: Mon Oct 16 14:04:55 2023 +0300 iio: buffer: document known issue Add documentation explaining why the code which scans all available scan masks is checking only a single long worth of bits even though the code was intended to be supporting masks wider than single long. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/ef61c2c1e9a1c5e9f713f656871fdcb1652afdc2.1697452986.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit 2718f15403fbbff4c4116824e02537e39342986a Author: Matti Vaittinen Date: Mon Oct 16 14:04:39 2023 +0300 iio: sanity check available_scan_masks array When IIO goes through the available scan masks in order to select the best suiting one, it will just accept the first listed subset of channels which meets the user's requirements. If driver lists a mask which is a subset of some of the masks previously in the array of avaliable_scan_masks, then the latter one will never be selected. Add a warning if driver registers masks which can't be used due to the available_scan_masks-array ordering. Suggested-by: Jonathan Cameron Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/e55ef0b26a6d3b323bab24920c131c79a01ba08e.1697452986.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron commit e4cfeca8f8cb36e13a8764fc7605bb2f338be10b Author: Ramona Gradinariu Date: Fri Oct 27 17:03:58 2023 +0300 dt-bindings: adis16460: Add 'spi-cs-inactive-delay-ns' property The adis16460 device requires a stall time between SPI transactions (during which the chip select is inactive), with a minimum value equal to 16 microseconds. This commit adds 'spi-cs-inactive-delay-ns' property, which should indicate the stall time between consecutive SPI transactions. The specified minimum time may not be sufficient for all configurations. Signed-off-by: Ramona Gradinariu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231027140358.328699-4-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron commit 215960408d7fa241f980bcc9e31e8b5caf8ec268 Author: Ramona Gradinariu Date: Fri Oct 27 17:03:57 2023 +0300 dt-bindings: adis16475: Add 'spi-cs-inactive-delay-ns' property The devices supported by adis16475 driver require a stall period between SPI transactions (during which the chip select is inactive), with a minimum value equal to 16 microseconds, thus adding 'spi-cs-inactive-delay-ns' property, which should indicate the stall time between consecutive SPI transactions. The specified minimum time may not be sufficient for all configurations. Signed-off-by: Ramona Gradinariu Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231027140358.328699-3-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron commit 9405e968cfde48aecc90ff04611dab620167e1ed Author: Ramona Gradinariu Date: Fri Oct 27 17:03:56 2023 +0300 iio: imu: adis: Use spi cs inactive delay A delay is needed each time the chip selected becomes inactive, even after burst data readings are performed. Currently, there is no delay added after a burst reading and in case a new SPI transfer is performed before the needed delay, the adis device becomes unresponsive until reset. This commit is adding the needed delay directly to the spi driver, using the cs_inactive parameter, in case it is not set and is removing the additional chip select change delay present in adis APIs to remove the double delay. Signed-off-by: Ramona Gradinariu Link: https://lore.kernel.org/r/20231027140358.328699-2-ramona.gradinariu@analog.com Signed-off-by: Jonathan Cameron commit c788b9e56acd46f3a07d0fad6fc3f543c3557d2c Author: Bragatheswaran Manickavel Date: Fri Oct 27 15:14:10 2023 +0530 iio/imu: inv_icm42600: Use max() helper macros Use the standard max() helper macros instead of direct variable comparison using if/else blocks or ternary operator. Change identified using minmax.cocci Coccinelle semantic patch. Signed-off-by: Bragatheswaran Manickavel Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20231027094410.3706-1-bragathemanick0908@gmail.com Signed-off-by: Jonathan Cameron commit 3f6b9598b6df604a7c556873de18fcc97919b81c Author: Andrew Hepp Date: Wed Oct 25 16:31:53 2023 -0700 iio: temperature: Add MCP9600 thermocouple EMF converter Add support for the MCP9600 thermocouple electromotive force converter. The sensor has integrated cold junction compensation and a typical accuracy of 0.5 degrees Celsius. The driver supports a resolution of 0.0625 degrees Celsius. Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/MCP960X-Data-Sheet-20005426.pdf Signed-off-by: Andrew Hepp Link: https://lore.kernel.org/r/20231025233153.5454-2-andrew.hepp@ahepp.dev Signed-off-by: Jonathan Cameron commit d6f250b1fe8e5878823a34fa919fc7e03afb7abb Author: Andrew Hepp Date: Wed Oct 25 16:31:52 2023 -0700 dt-bindings: iio: Add MCP9600 thermocouple EMF converter Add support for the MCP9600 thermocouple electromotive force converter. The sensor has integrated cold junction compensation and a typical accuracy of 0.5 degrees Celsius. The driver supports a resolution of 0.0625 degrees Celsius. Datasheet: https://ww1.microchip.com/downloads/en/DeviceDoc/MCP960X-Data-Sheet-20005426.pdf Signed-off-by: Andrew Hepp Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231025233153.5454-1-andrew.hepp@ahepp.dev Signed-off-by: Jonathan Cameron commit 18cdaaa482121aef942585cfbb02b1a9058e553d Author: Colin Ian King Date: Mon Oct 23 09:10:54 2023 +0100 iio: imu: Fix spelling mistake "accelrometer" -> "accelerometer" There are two spelling mistakes in dev_err messages. Fix them. Signed-off-by: Colin Ian King Reviewed-by: Jagath Jog J Link: https://lore.kernel.org/r/20231023081054.617292-1-colin.i.king@gmail.com Signed-off-by: Jonathan Cameron commit b19ac45bfe503c399fe8e16a20dddeb1f4870997 Author: Angel Iglesias Date: Sun Oct 22 19:22:21 2023 +0200 iio: pressure: bmp280: Add support for BMP390 Add BMP390 device ID to the supported IDs on bmp380 sensor family Signed-off-by: Angel Iglesias Link: https://lore.kernel.org/r/d6a9e9ca4670c7401545d0d086cd3059e29044c8.1697994521.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit 33564435c8084ff29837c9ed9bb9574ec957751d Author: Angel Iglesias Date: Sun Oct 22 19:22:20 2023 +0200 iio: pressure: bmp280: Allow multiple chips id per family of devices Improve device detection in certain chip families known to have various chip IDs. When no ID matches, give a warning but follow along what device said on the firmware side and try to configure it. Signed-off-by: Angel Iglesias Link: https://lore.kernel.org/r/eade22d11e9de4405ea19fdaa5a8249143ae94df.1697994521.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit 48245f4a8c093f0c06f82b235a9e0dd766dc20df Author: Angel Iglesias Date: Sun Oct 22 19:22:19 2023 +0200 iio: pressure: bmp280: Rearrange vars in reverse xmas tree order Small cleanup reordering local variable declarations following reverse christmas tree convention. Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/bb63a996eb9c4555bf83471770f0169d2627e79c.1697994521.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit faac4dda9a91f94d96cb38676ca4177a54666d75 Author: Angel Iglesias Date: Sun Oct 22 19:22:18 2023 +0200 iio: pressure: bmp280: Use spi_get_device_match_data() Use the spi_get_device_match_data() helper instead of device_get_match_data() and the fallback match_id logic. Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/9ea8ac90b2b8a8cf45803d0435243c0bee009b37.1697994521.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit aace22e375e287ae825b3b0a8a1d70820cfe27b9 Author: Biju Das Date: Sun Oct 22 19:22:17 2023 +0200 iio: pressure: bmp280: Use i2c_get_match_data() Replace device_get_match_data() and id lookup for retrieving match data by i2c_get_match_data(). Signed-off-by: Biju Das Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/0554ddae62ba04ccacf58c2de04ec598c876665e.1697994521.git.ang.iglesiasg@gmail.com Signed-off-by: Jonathan Cameron commit 1bbc290b21c51f3a06ea66562d7abac0d6ff9995 Author: Lukas Bulwahn Date: Wed Oct 25 11:15:50 2023 +0200 MAINTAINERS: correct file entry in BOSCH SENSORTEC BMI323 IMU IIO DRIVER Commit b512c767e7bc ("iio: imu: Add driver for BMI323 IMU") adds the MAINTAINERS section BOSCH SENSORTEC BMI323 IMU IIO DRIVER and refers to a non-existing device-tree file. Probably, this mistake was introduced by copying from the BOSCH SENSORTEC BMA400 ACCELEROMETER IIO DRIVER section and missing to adjust the file entry properly. This is however easily caught, as the script ./scripts/get_maintainer.pl --self-test=patterns complains about a broken reference. The related commit 77583938740e ("dt-bindings: iio: imu: Add Bosch BMI323") adds bosch,bmi323.yaml, so refer to that intended file instead. Signed-off-by: Lukas Bulwahn Reviewed-by: Jagath Jog J Link: https://lore.kernel.org/r/20231025091550.21052-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Cameron commit 06261c6f5468eadbe1e87dbeeb877bc5c062f514 Author: Amit Dhingra Date: Thu Oct 26 04:13:44 2023 -0700 MAINTAINERS: correct file entry IIO LIGHT SENSOR GAIN-TIME_SCALE HELPERS Commit ca11e4a35154 ("MAINTAINERS: Add IIO gain-time-scale helpers"), updates the MAINTAINERS file. However the files listed do not exist. These presumably come from commit 38416c28e168 ("iio: light: Add gain-time-scale helpers") Fix the entries. Found by ./scripts/get_maintainer.pl --self-test=patterns Fixes: ca11e4a35154 ("MAINTAINERS: Add IIO gain-time-scale helpers") Signed-off-by: Amit Dhingra Acked-by: Matti Vaittinen Link: https://lore.kernel.org/r/CAO=gReFVhp7QK_XZRBO5vbv6fmFb4BdsZeQPSzWvuiz9UeQekA@mail.gmail.com Signed-off-by: Jonathan Cameron commit a6d160b21fe6f9e3ac868ab1d79194d3e7977cd5 Author: Matti Vaittinen Date: Fri Oct 20 13:53:47 2023 +0300 iio: bu27008: Add illuminance channel The RGB + IR data can be used to calculate the illuminance value (luxes). Implement the equation obtained from the ROHM HW colleagues and add a raw light data channel outputting illuminance values in (nano) Luxes. Both the read_raw and buffering values are supported, with the limitation that buffering is only allowed when a suitable scan-mask is used. (RGB+IR, no clear). The equation has been developed by ROHM HW colleagues for open air sensor. Adding any lens to the sensor is likely to impact to used c1, c2, c3 coefficients. Also, the output values have only been tested on BU27008. According to the HW colleagues, the very same equation should work on BU27010 as well. Calculate and output illuminance values from BU27008 and BU27010. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/ZTJcOxSb/WHzdN8h@dc78bmyyyyyyyyyyyyydt-3.rev.dnainternet.fi Signed-off-by: Jonathan Cameron commit a2d43f44628fe4fa9c17f0e09548cb385e772f7e Author: Li peiyu <579lpy@gmail.com> Date: Sat Oct 21 15:09:03 2023 +0800 iio: pressure: fix some word spelling errors They are appear to be spelling mistakes, drivers/iio/pressure/bmp280.h:413 endianess->endianness drivers/iio/pressure/bmp280-core.c:923 dregrees->degrees drivers/iio/pressure/bmp280-core.c:1388 reescale->rescale drivers/iio/pressure/bmp280-core.c:1415 reescale->rescale Signed-off-by: Li peiyu <579lpy@gmail.com> Link: https://lore.kernel.org/r/20231021070903.6051-1-579lpy@gmail.com Signed-off-by: Jonathan Cameron commit 4f7901bb4dea11f758bf610802216296fdf29b97 Author: Matt Ranostay Date: Sat Oct 21 08:53:17 2023 +0000 mailmap: Change email mapping from previous employers Signed-off-by: Matt Ranostay Link: https://lore.kernel.org/r/20231021085250.21431-1-matt@ranostay.sg Signed-off-by: Jonathan Cameron commit 7cd11203d9007d604316ef49d6b33a97500fcef7 Author: Andy Shevchenko Date: Tue Aug 8 19:28:00 2023 +0300 iio: proximity: sx9324: Switch to device_property_match_property_string() Replace open coded device_property_match_property_string(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230808162800.61651-7-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 2a5239b6ab8ced2ee9dce34c2d274c98b118be15 Author: Andy Shevchenko Date: Tue Aug 8 19:27:59 2023 +0300 iio: magnetometer: tmag5273: Switch to device_property_match_property_string() Replace open coded device_property_match_property_string(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230808162800.61651-6-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit f993267a723f75df0f2996c4b94e76f2db1598be Author: Andy Shevchenko Date: Tue Aug 8 19:27:58 2023 +0300 iio: frequency: admv1014: Switch to device_property_match_property_string() Replace open coded device_property_match_property_string(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230808162800.61651-5-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 7829a9d75989260744514c1d6ce598ece7804200 Author: Andy Shevchenko Date: Tue Aug 8 19:27:57 2023 +0300 iio: frequency: adf4377: Switch to device_property_match_property_string() Replace open coded device_property_match_property_string(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20230808162800.61651-4-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit fac4a535758851215d23d7d92879aeee5035f51d Author: Andy Shevchenko Date: Tue Aug 8 19:27:56 2023 +0300 device property: Add fwnode_property_match_property_string() Sometimes the users want to match the single value string property against an array of predefined strings. Create a helper for them. Signed-off-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230808162800.61651-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 086386311b3620059d0253eda511f88ca4cdeceb Author: Andy Shevchenko Date: Tue Aug 8 19:27:55 2023 +0300 device property: Use fwnode_property_string_array_count() Use fwnode_property_string_array_count() instead of open coded variant. Signed-off-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230808162800.61651-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 0300fa851f38864495e6cb107d9a24d30dcb5e19 Author: David Lechner Date: Mon Oct 16 10:43:09 2023 -0500 iio: resolver: ad2s1210: add reset gpio support This adds support for the optional reset gpio to the ad2s1210 resolver driver. If the gpio is present in the device tree, it is toggled during driver probe before the reset of the device initialization. As per the devicetree bindings, it is expected for the gpio to configured as active low. Suggested-by: Michael Hennerich Signed-off-by: David Lechner Acked-by: Michael Hennerich Link: https://lore.kernel.org/r/20231016154311.38547-1-dlechner@baylibre.com Signed-off-by: Jonathan Cameron commit f9b9ff95be8ce0e8becfd17b416b68d13915733d Author: David Lechner Date: Mon Oct 16 08:54:22 2023 -0500 iio: resolver: ad2s1210: add support for adi,fixed-mode It is possible to use the AD2S1210 with hardwired mode pins (A0 and A1). According to the devicetree bindings, in this case the adi,fixed-mode property will specify which of the 3 possible modes the mode pins are hardwired for and the gpio-modes property is not allowed. This adds support for the case where the mode pins are hardwired for config mode. In this configuration, the position and value must be read from the config register. The case of hardwired position or velocity mode is not supported as there would be no way to configure the device. Signed-off-by: David Lechner Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20231016135423.16808-1-dlechner@baylibre.com Signed-off-by: Jonathan Cameron commit 8a636db3aa57ed468b88804ecf27798df6c9c553 Author: Jagath Jog J Date: Fri Oct 13 09:18:08 2023 +0530 iio: imu: Add driver for BMI323 IMU The Bosch BMI323 is a 6-axis low-power IMU that provide measurements for acceleration, angular rate, and temperature. This sensor includes motion-triggered interrupt features, such as a step counter, tap detection, and activity/inactivity interrupt capabilities. The driver supports various functionalities, including data ready, FIFO data handling, and events such as tap detection, step counting, and activity interrupts. Signed-off-by: Jagath Jog J Link: https://lore.kernel.org/r/20231013034808.8948-3-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron commit a0357c08d4dc4edb9e241bd68d687b793dfd0ba5 Author: Jagath Jog J Date: Fri Oct 13 09:18:07 2023 +0530 dt-bindings: iio: imu: Add Bosch BMI323 Add devicetree description document for Bosch BMI323, a 6-Axis IMU. Signed-off-by: Jagath Jog J Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231013034808.8948-2-jagathjog1996@gmail.com Signed-off-by: Jonathan Cameron commit cf27775838c5b316732c7dcb539580a736f19bc6 Author: Ivan Mikhaylov Date: Sun Oct 15 00:12:54 2023 +0300 iio: adc: Add driver support for MAX34408/9 The MAX34408/MAX34409 are two- and four-channel current monitors that are configured and monitored with a standard I2C/SMBus serial interface. Each unidirectional current sensor offers precision high-side operation with a low full-scale sense voltage. The devices automatically sequence through two or four channels and collect the current-sense samples and average them to reduce the effect of impulse noise. The raw ADC samples are compared to user-programmable digital thresholds to indicate overcurrent conditions. Overcurrent conditions trigger a hardware output to provide an immediate indication to shut down any necessary external circuitry. Add as ADC driver which only supports current monitoring for now. Link: https://www.analog.com/media/en/technical-documentation/data-sheets/MAX34408-MAX34409.pdf Signed-off-by: Ivan Mikhaylov Link: https://lore.kernel.org/r/20231014211254.16719-3-fr0st61te@gmail.com Signed-off-by: Jonathan Cameron commit f0d1a9b7a0927bd074274a184d72c261292d388e Author: Ivan Mikhaylov Date: Sun Oct 15 00:12:53 2023 +0300 dt-bindings: adc: provide max34408/9 device tree binding document The hardware binding for i2c current monitoring device with overcurrent control. Signed-off-by: Ivan Mikhaylov Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231014211254.16719-2-fr0st61te@gmail.com Signed-off-by: Jonathan Cameron commit 32d9a78bb9ff9da0082ea6fdb038bc1bf81f6992 Author: Uwe Kleine-König Date: Thu Nov 16 18:33:07 2023 +0100 coresight: ultrasoc-smb: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: James Clark Signed-off-by: Uwe Kleine-König Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231116173301.708873-14-u.kleine-koenig@pengutronix.de commit 98881b34ce90c031164597f73603f3219da79658 Author: Uwe Kleine-König Date: Thu Nov 16 18:33:06 2023 +0100 coresight: trbe: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: James Clark Signed-off-by: Uwe Kleine-König Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231116173301.708873-13-u.kleine-koenig@pengutronix.de commit 3d1e99f73409499742142ca14ff00946a9e442af Author: Uwe Kleine-König Date: Thu Nov 16 18:33:05 2023 +0100 coresight: replicator: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: James Clark Signed-off-by: Uwe Kleine-König Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231116173301.708873-12-u.kleine-koenig@pengutronix.de commit 858aebb52cc0f4b3446842fb5169bdf33fc136d4 Author: Uwe Kleine-König Date: Thu Nov 16 18:33:04 2023 +0100 coresight: funnel: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: James Clark Signed-off-by: Uwe Kleine-König Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231116173301.708873-11-u.kleine-koenig@pengutronix.de commit 4445e142b4580e8fd43b67a9192a77027e6933cb Author: Uwe Kleine-König Date: Thu Nov 16 18:33:03 2023 +0100 coresight: etm4x: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: James Clark Signed-off-by: Uwe Kleine-König Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231116173301.708873-10-u.kleine-koenig@pengutronix.de commit fc041bd24f39f28f984cb7dea011b3625c298dd9 Author: Uwe Kleine-König Date: Thu Nov 16 18:33:02 2023 +0100 coresight: dummy: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Reviewed-by: James Clark Signed-off-by: Uwe Kleine-König Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231116173301.708873-9-u.kleine-koenig@pengutronix.de commit 0c08699744d20ce0bac22b9f291a646a0302e51f Author: Alexander Aring Date: Mon Nov 13 16:24:11 2023 -0500 dlm: implement EXPORT_OP_ASYNC_LOCK This patch is activating the EXPORT_OP_ASYNC_LOCK export flag to signal lockd that both filesystems are able to handle async lock requests. The cluster filesystems gfs2 and ocfs2 will redirect their lock requests to DLMs plock implementation that can handle async lock requests. Reviewed-by: Jeff Layton Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 6bd4a2bfe568d963af721cc5efa52091bf1a3746 Author: Alexander Aring Date: Mon Nov 13 16:24:10 2023 -0500 dlm: use FL_SLEEP to determine blocking vs non-blocking This patch uses the FL_SLEEP flag in struct file_lock to determine if the lock request is a blocking or non-blocking request. Before dlm was using IS_SETLKW() was being used which is not usable for lock requests coming from lockd when EXPORT_OP_SAFE_ASYNC_LOCK inside the export flags is set. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit dbee1adeb7e6d31c9afbad8e9248c15694f1cc0c Author: Alexander Aring Date: Mon Nov 13 16:24:09 2023 -0500 dlm: use fl_owner from lockd This patch is changing the fl_owner value in case of an nfs lock request to not be the pid of lockd. Instead this patch changes it to be the owner value that nfs is giving us. Currently there exists proved problems with this behaviour. One nfsd server was created to export a gfs2 filesystem mount. Two nfs clients doing a nfs mount of this export. Those two clients should conflict each other operating on the same nfs file. A small test program was written: int main(int argc, const char *argv[]) { struct flock fl = { .l_type = F_WRLCK, .l_whence = SEEK_SET, .l_start = 1L, .l_len = 1L, }; int fd; fd = open("filename", O_RDWR | O_CREAT, 0700); printf("try to lock...\n"); fcntl(fd, F_SETLKW, &fl); printf("locked!\n"); getc(stdin); return 0; } Running on both clients at the same time and don't interrupting by pressing any key. It will show that both clients are able to acquire the lock which shouldn't be the case. The issue is here that the fl_owner value is the same and the lock context of both clients should be separated. This patch lets lockd define how to deal with lock contexts and chose hopefully the right fl_owner value. A test after this patch was made and the locks conflicts each other which should be the case. Acked-by: Jeff Layton Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit e9cdebbe23f1aa9a1caea169862f479ab3fa2773 Author: Jordan Rife Date: Mon Nov 6 15:24:38 2023 -0600 dlm: use kernel_connect() and kernel_bind() Recent changes to kernel_connect() and kernel_bind() ensure that callers are insulated from changes to the address parameter made by BPF SOCK_ADDR hooks. This patch wraps direct calls to ops->connect() and ops->bind() with kernel_connect() and kernel_bind() to protect callers in such cases. Link: https://lore.kernel.org/netdev/9944248dba1bce861375fcce9de663934d933ba9.camel@redhat.com/ Fixes: d74bad4e74ee ("bpf: Hooks for sys_connect") Fixes: 4fbac77d2d09 ("bpf: Hooks for sys_bind") Cc: stable@vger.kernel.org Signed-off-by: Jordan Rife Signed-off-by: David Teigland commit 4a0b33f771db2b82fdfad08b9f34def786162865 Author: Al Viro Date: Mon Oct 16 23:08:35 2023 +0100 selinux: saner handling of policy reloads On policy reload selinuxfs replaces two subdirectories (/booleans and /class) with new variants. Unfortunately, that's done with serious abuses of directory locking. 1) lock_rename() should be done to parents, not to objects being exchanged 2) there's a bunch of reasons why it should not be done for directories that do not have a common ancestor; most of those do not apply to selinuxfs, but even in the best case the proof is subtle and brittle. 3) failure halfway through the creation of /class will leak names and values arrays. 4) use of d_genocide() is also rather brittle; it's probably not much of a bug per se, but e.g. an overmount of /sys/fs/selinuxfs/classes/shm/index with any regular file will end up with leaked mount on policy reload. Sure, don't do it, but... Let's stop messing with disconnected directories; just create a temporary (/.swapover) with no permissions for anyone (on the level of ->permission() returing -EPERM, no matter who's calling it) and build the new /booleans and /class in there; then lock_rename on root and that temporary directory and d_exchange() old and new both for class and booleans. Then unlock and use simple_recursive_removal() to take the temporary out; it's much more robust. And instead of bothering with separate pathways for freeing new (on failure halfway through) and old (on success) names/values, do all freeing in one place. With temporaries swapped with the old ones when we are past all possible failures. The only user-visible difference is that /.swapover shows up (but isn't possible to open, look up into, etc.) for the duration of policy reload. Reviewed-by: Stephen Smalley Signed-off-by: Al Viro [PM: applied some fixes from Al post merge] Signed-off-by: Paul Moore commit f5364ecfd8c3ec81cf3350caa4629d98408101e5 Author: Paul Moore Date: Wed Nov 15 11:50:29 2023 -0500 MAINTAINERS: update the SELinux entry Bring the SELinux entry up to date with the following changes: * Remove the selinuxproject.org link. The wiki located there is in read-only mode and exists primarily for historical reasons. * Add our patchwork link. I'm not sure this is of much use for anyone but the maintainer, but there is a provision for including it here so we might as well include it. * Add a bug report URI. I suspect most everyone knows to send mail to the mailing list if they hit a bug, but let's make it official. * Add a link to the SELinux tree process/management documentation. While the doc exists both in the canonical kernel.org location and the GitHub mirror, provide a link to the mirror as GitHub does a better job rendering the Markdown. * Update the source tree's git URI to use https. Signed-off-by: Paul Moore commit a67d2a14a77eed5dbdace1801bf2255962121bdb Author: Paul Moore Date: Fri Nov 10 15:46:49 2023 -0500 selinux: update filenametr_hash() to use full_name_hash() Using full_name_hash() instead of partial_name_hash() should result in cleaner and better performing code. Suggested-by: Linus Torvalds Signed-off-by: Paul Moore commit 56eddc3cb1affe014d567f8460e5a76ca079f842 Merge: 3185d57cfcd34 7475e51b87969 Author: Paolo Abeni Date: Thu Nov 16 16:05:44 2023 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Cross-merge networking fixes after downstream PR. No conflicts. Signed-off-by: Paolo Abeni commit 1865913dd590ca6d5e3207b15099a1210dd62f29 Author: Uwe Kleine-König Date: Thu Oct 26 12:18:20 2023 +0200 media: meson-ir-tx: Drop usage of platform_driver_probe() The benefit of platform_driver_probe() here is only that the probe function can be discarded after the driver is loaded. For an ARCH=arm allmodconfig that's 952 bytes, for an allnoconfig + IR_MESON_TX=y it's only 452 bytes. The downside is that the driver isn't dynamically bindable and unbindable. There are considerations to drop platform_driver_probe() as a concept that isn't relevant any more today. It comes with an added complexity that makes many users hold it wrong. (E.g. this driver didn't benefit as much as it could as of v6.6-rc1 as meson_irtx_remove() could have been marked with __exit.) The advantages are not that relevant any more today, so convert this driver to an ordinary platform driver. Signed-off-by: Uwe Kleine-König Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 9af7c980f3ea3e85418beb25dc4d34939183e436 Author: Uwe Kleine-König Date: Thu Oct 26 12:18:19 2023 +0200 media: meson-ir-tx: Simplify and improve using dev_err_probe() With dev_err_probe() the error paths can be implemented in a more condensed way with the added benefit that the error code is added to the error messages by name. Signed-off-by: Uwe Kleine-König Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 12be815fbfd4c31aae4b23491b6dcf88a1e69299 Author: Uwe Kleine-König Date: Thu Oct 26 12:18:18 2023 +0200 media: meson-ir-tx: Convert to use devm_rc_register_device() With that the remove callback can go away and also setting driver data becomes superfluous. Signed-off-by: Uwe Kleine-König Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 7d21a2df45a6718b8ff402ab8a5e6c2936ac9799 Author: Rob Herring Date: Mon Oct 9 16:13:31 2023 -0500 media: ir-hix5hd2: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Hans Verkuil commit 3b434a3445fff3149128db0169da864d67057325 Author: Jacek Lawrynowicz Date: Mon Nov 13 18:02:52 2023 +0100 accel/ivpu: Use threaded IRQ to handle JOB done messages Remove job_done thread and replace it with generic callback based mechanism. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231113170252.758137-6-jacek.lawrynowicz@linux.intel.com commit 58cde80f45a2b1683ea3c24a9a9a4b0e1005336b Author: Stanislaw Gruszka Date: Mon Nov 13 18:02:51 2023 +0100 accel/ivpu: Use dedicated work for job timeout detection Change to use work for timeout detection. Needed for thread_irq conversion. Signed-off-by: Stanislaw Gruszka Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231113170252.758137-5-jacek.lawrynowicz@linux.intel.com commit b3c10b71a61c3a0412b7c390831c88405be3d24f Author: Stanislaw Gruszka Date: Mon Nov 13 18:02:50 2023 +0100 accel/ivpu: Do not use cons->aborted for job_done_thread This allow to simplify ivpu_ipc_receive() as now we do not have to process all messages in aborted state - they will be freed in ivpu_ipc_consumer_del(). Signed-off-by: Stanislaw Gruszka Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231113170252.758137-4-jacek.lawrynowicz@linux.intel.com commit 12fbf8ac39b08f810b767e2e3dc32258907ce890 Author: Stanislaw Gruszka Date: Mon Nov 13 18:02:49 2023 +0100 accel/ivpu: Do not use irqsave in ivpu_ipc_dispatch ivpu_ipc_dispatch is always called with irqs disabled. Add lockdep assertion and remove unneeded _irqsave/_irqrestore. Signed-off-by: Stanislaw Gruszka Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231113170252.758137-3-jacek.lawrynowicz@linux.intel.com commit 043a2d5d71d87553985816065da41cff72f5f2df Author: Stanislaw Gruszka Date: Mon Nov 13 18:02:48 2023 +0100 accel/ivpu: Rename cons->rx_msg_lock Now the cons->rx_msg_lock also protects 'abort' field so rename the lock. Signed-off-by: Stanislaw Gruszka Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231113170252.758137-2-jacek.lawrynowicz@linux.intel.com commit e899505533852bf1da133f2f4c9a9655ff77f7e5 Author: Andrzej Hajda Date: Wed Nov 15 11:54:03 2023 +0100 drm/i915: do not clean GT table on error path The only task of intel_gt_release_all is to zero gt table. Calling it on error path prevents intel_gt_driver_late_release_all (called from i915_driver_late_release) to cleanup GTs, causing leakage. After i915_driver_late_release GT array is not used anymore so it does not need cleaning at all. Sample leak report: BUG i915_request (...): Objects remaining in i915_request on __kmem_cache_shutdown() ... Object 0xffff888113420040 @offset=64 Allocated in __i915_request_create+0x75/0x610 [i915] age=18339 cpu=1 pid=1454 kmem_cache_alloc+0x25b/0x270 __i915_request_create+0x75/0x610 [i915] i915_request_create+0x109/0x290 [i915] __engines_record_defaults+0xca/0x440 [i915] intel_gt_init+0x275/0x430 [i915] i915_gem_init+0x135/0x2c0 [i915] i915_driver_probe+0x8d1/0xdc0 [i915] v2: removed whole intel_gt_release_all Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8489 Fixes: bec68cc9ea42 ("drm/i915: Prepare for multiple GTs") Signed-off-by: Andrzej Hajda Reviewed-by: Tvrtko Ursulin Reviewed-by: Nirmoy Das Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231115-dont_clean_gt_on_error_path-v2-1-54250125470a@intel.com commit 57bdac8ee2998d6bba091326e16967b4e5f74ae8 Author: Andrzej Hajda Date: Wed Nov 15 13:10:33 2023 +0100 drm/i915/gt: add missing new-line to GT_TRACE Trace requires new-line at the end of message (in opposition to printk), otherwise trace dump becomes messy. Signed-off-by: Andrzej Hajda Acked-by: Janusz Krzysztofik Reviewed-by: Nirmoy Das Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231115-eols-v1-1-d47a2f52b807@intel.com commit 26dde1beb359bd7ac7b37f741ba64d11611d106a Author: Robert Beckett Date: Wed Nov 8 20:29:26 2023 +0100 media: chips-media: wave5: Add wave5 driver to maintainers file Add the Chips&Media wave5 encoder/decoder driver to the maintainers file Signed-off-by: Robert Beckett Signed-off-by: Dafna Hirschfeld Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit de4b9f7e371a53842b646aafa0b72c7467108ab2 Author: Robert Beckett Date: Wed Nov 8 20:29:25 2023 +0100 dt-bindings: media: wave5: add yaml devicetree bindings Add bindings for the wave5 chips&media codec driver Signed-off-by: Robert Beckett Signed-off-by: Dafna Hirschfeld Signed-off-by: Sebastian Fricke Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil commit 9707a6254a8a6b978bde811a44fe07d86c229d1c Author: Nas Chung Date: Wed Nov 8 20:29:24 2023 +0100 media: chips-media: wave5: Add the v4l2 layer Add the decoder and encoder implementing the v4l2 API. This patch also adds the Makefile and the VIDEO_WAVE_VPU config Signed-off-by: Sebastian Fricke Signed-off-by: Nicolas Dufresne Signed-off-by: Robert Beckett Signed-off-by: Dafna Hirschfeld Signed-off-by: Nas Chung Signed-off-by: Hans Verkuil commit 45d1a2b93277a24a90265055f5b87c7562d6acb9 Author: Nas Chung Date: Wed Nov 8 20:29:23 2023 +0100 media: chips-media: wave5: Add vpuapi layer Add the vpuapi layer of the wave5 codec driver. This layer is used to configure the hardware according to the parameters. Signed-off-by: Sebastian Fricke Signed-off-by: Nicolas Dufresne Signed-off-by: Dafna Hirschfeld Signed-off-by: Robert Beckett Signed-off-by: Nas Chung Signed-off-by: Hans Verkuil commit 02a8b425639d66c2e46f6ef4d2ff5f1d9d060ad7 Author: Sebastian Fricke Date: Wed Nov 8 20:29:22 2023 +0100 media: platform: chips-media: Move Coda to separate folder Prepare the folder structure for a second Chips&Media driver. Move the Coda driver to a sub-directory. Signed-off-by: Sebastian Fricke Signed-off-by: Hans Verkuil commit 4f61d8aa73e44614f1c59aff07274304ecdea9ad Author: Sebastian Fricke Date: Wed Nov 8 20:29:21 2023 +0100 media: v4l2: Allow M2M job queuing w/o streaming CAP queue Allow decoder drivers to enable set the ignore_streaming flag on their CAPTURE queue, to allow queuing jobs to the M2M ready queue and perform firmware sequence analysis with just a streaming OUTPUT queue and available bitstream data. Signed-off-by: Sebastian Fricke Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 103d15bc20086820ce2c2af40a651529a87c9e3c Author: Sebastian Fricke Date: Wed Nov 8 20:29:20 2023 +0100 media: v4l2: Add ignore_streaming flag Add a new flag to the `struct v4l2_m2m_dev` to toggle whether a queue must be streaming in order to allow queuing jobs to the ready queue. Currently, both queues (CAPTURE & OUTPUT) must be streaming in order to allow adding new jobs. This behavior limits the usability of M2M for some drivers, as these have to be able, to perform analysis of the sequence to ensure, that userspace prepares the CAPTURE queue correctly. Signed-off-by: Sebastian Fricke Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil commit 3fc6350fc8470d42f5e700ecd1c3d90f9dd9fd2d Author: Andy Shevchenko Date: Mon Nov 13 13:12:49 2023 +0200 treewide, spi: Get rid of SPI_MASTER_HALF_DUPLEX The SPI_MASTER_HALF_DUPLEX is the legacy name of a definition for a half duplex flag. Since all others had been replaced with the respective SPI_CONTROLLER prefix get rid of the last one as well. There is no functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman Acked-by: Ulf Hansson # For MMC Acked-by: Dmitry Torokhov # for input Acked-by: Paolo Abeni Link: https://lore.kernel.org/r/20231113111249.3982461-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 459956b17dd5cba06b0f2b75772497e46a59468b Author: Syed Saba Kareem Date: Thu Nov 16 11:03:57 2023 +0530 ASoC: amd: acp: add missing SND_SOC_AMD_ACP_LEGACY_COMMON flag for ACP70 add missing dependent SND_SOC_AMD_ACP_LEGACY_COMMON flag for ACP70 platform. Signed-off-by: Syed Saba Kareem Link: https://lore.kernel.org/r/20231116053405.2574081-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown commit a8759bd4c4fa1355a59160777e56efb3e9db966f Author: Uwe Kleine-König Date: Sat Nov 4 00:00:03 2023 +0100 bus: fsl-mc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. As fsl_mc_bus_remove() has the same type now as fsl_mc_bus_shutdown() and the only thing the latter does is to call the former, use fsl_mc_bus_remove() directly as .shutdown() callback. Link: https://lore.kernel.org/r/20231103230001.3652259-4-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit 864acca58000d9cd4cf810ddfca2815be045c748 Author: Uwe Kleine-König Date: Sat Nov 4 00:00:02 2023 +0100 bus: fsl-mc: Drop if block with always false condition The mc that belongs to a pdev is always a root dprc. In fsl_mc_bus_probe() the mc device gets assigned the platform device as parent. As dev_is_fsl_mc() is false for a platform device, fsl_mc_get_root_dprc() will always be true and so the if body is never run and it can be dropped. The motivation for this change is to get rid of an error path in .remove() that is broken (because only a part of the necessary cleanup is done resulting in leaks and/or use-after-frees and the driver core ignores the return value of .remove().) Link: https://lore.kernel.org/r/20231103230001.3652259-3-u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König commit cc0271a339cc70cae914c3ec20edc2a8058407da Author: James Clark Date: Wed Nov 1 11:52:06 2023 +0000 coresight: etm4x: Fix width of CCITMIN field CCITMIN is a 12 bit field and doesn't fit in a u8, so extend it to u16. This probably wasn't an issue previously because values higher than 255 never occurred. But since commit 4aff040bcc8d ("coresight: etm: Override TRCIDR3.CCITMIN on errata affected cpus"), a comparison with 256 was done to enable the errata, generating the following W=1 build error: coresight-etm4x-core.c:1188:24: error: result of comparison of constant 256 with expression of type 'u8' (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (drvdata->ccitmin == 256) Cc: stable@vger.kernel.org Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310302043.as36UFED-lkp@intel.com/ Reviewed-by: Mike Leach Signed-off-by: James Clark Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231101115206.70810-1-james.clark@arm.com commit c4137932d11dff5a347e3462cc52383fc333b86b Author: Tao Zhang Date: Tue Oct 24 14:19:13 2023 +0800 coresight-tpdm: Correct the property name of MSR number Correct the property name of the DSB MSR number that needs to be read in TPDM driver. The right property name is "qcom,dsb-msrs-num". Fixes: 350ba15ae187 ("coresight-tpdm: Add nodes for dsb msr support") Signed-off-by: Tao Zhang [ Fix checkpatch failure in the commit description ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1698128353-31157-1-git-send-email-quic_taozha@quicinc.com commit dabf410d8764dbb24832d18bb825fe7ba5e75d30 Author: Yicong Yang Date: Tue Oct 10 16:47:29 2023 +0800 hwtracing: hisi_ptt: Optimize the trace data committing In the current implementation, there're 4*4MiB trace buffer and hardware will fill the buffer one by one. The driver will get notified if one buffer is full and then copy data to the AUX buffer. If there's no enough room for the next trace buffer, we'll commit the AUX buffer to the perf core and try to apply a new one. In a typical configuration the AUX buffer will be 16MiB, so we'll commit the data after the whole AUX buffer is occupied. Then the driver cannot apply a new AUX buffer immediately until the committed data is consumed by userspace and then there's room in the AUX buffer again. This patch tries to optimize this by commit the data after one single trace buffer is filled. Since there's still room in the AUX buffer, driver can apply a new one without failure and don't need to wait for the userspace to consume the data. Signed-off-by: Yicong Yang Acked-by: Jonathan Cameron Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231010084731.30450-4-yangyicong@huawei.com commit 46f69b197b6cd06c709581f7ad271bc02dbedb7a Author: Yicong Yang Date: Tue Oct 10 16:47:27 2023 +0800 hwtracing: hisi_ptt: Disable interrupt after trace end On trace end we disable the hardware but leave the interrupt unmasked. Mask the interrupt to make the process reverse to the start. No actual issue since hardware should send no interrupt after disabled. Signed-off-by: Yicong Yang Acked-by: Jonathan Cameron Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20231010084731.30450-2-yangyicong@huawei.com commit 9d4408feff89f8d86b8f34339b08ceb5f8400190 Author: Bagas Sanjaya Date: Tue Oct 17 16:56:08 2023 +0700 Documentation: ABI: coresight-tpdm: Fix Bit[3] description indentation Stephen Rothwell reported htmldocs warnings when merging coresight tree: Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm:48: ERROR: Unexpected indentation. Documentation/ABI/testing/sysfs-bus-coresight-devices-tpdm:48: WARNING: Block quote ends without a blank line; unexpected unindent. Fix indentation alignment for Bit[3] list entry in dsb_mode description to silence above warnings. Fixes: 018e43ad1eee ("coresight-tpdm: Add node to set dsb programming mode") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/linux-next/20231017143324.75387a21@canb.auug.org.au/ Signed-off-by: Bagas Sanjaya Link: https://lore.kernel.org/r/20231017095608.136277-1-bagasdotme@gmail.com Signed-off-by: Suzuki K Poulose commit 350ba15ae187c118979566f1288adb5f69f24230 Author: Tao Zhang Date: Thu Sep 28 14:29:46 2023 +0800 coresight-tpdm: Add nodes for dsb msr support Add the nodes for DSB subunit MSR(mux select register) support. The TPDM MSR (mux select register) interface is an optional interface and associated bank of registers per TPDM subunit. The intent of mux select registers is to control muxing structures driving the TPDM’s’ various subunit interfaces. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-14-git-send-email-quic_taozha@quicinc.com commit 8e05f86f07a0359584ceb2715fedcc4daf29d898 Author: Tao Zhang Date: Thu Sep 28 14:29:45 2023 +0800 dt-bindings: arm: Add support for DSB MSR register Add property "qcom,dsb-msrs-num" to support DSB(Discrete Single Bit) MSR(mux select register) for TPDM. It specifies the number of MSR registers supported by the DSB TDPM. Signed-off-by: Tao Zhang Acked-by: Rob Herring Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-13-git-send-email-quic_taozha@quicinc.com commit 4c983382a29eaddd8746af23702f657258bb91cc Author: Tao Zhang Date: Thu Sep 28 14:29:44 2023 +0800 coresight-tpdm: Add nodes for timestamp request Add nodes to configure the timestamp request based on input pattern match. Each TPDM that support DSB subunit has maximum of n(n<7) TPR registers to configure value for timestamp request based on input pattern match. Eight 32 bit registers providing DSB interface timestamp request pattern match comparison. And each TPDM that support DSB subunit has maximum of m(m<7) TPMR registers to configure pattern mask for timestamp request. Eight 32 bit registers providing DSB interface timestamp request pattern match mask generation. Add nodes to enable/disable pattern timestamp and set pattern timestamp type. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-12-git-send-email-quic_taozha@quicinc.com commit a8138a9445e6d159138b7e574dc5ee7cbcc2f06a Author: Tao Zhang Date: Thu Sep 28 14:29:43 2023 +0800 coresight-tpdm: Add nodes to configure pattern match output Add nodes to configure trigger pattern and trigger pattern mask. Each DSB subunit TPDM has maximum of n(n<7) XPR registers to configure trigger pattern match output. Eight 32 bit registers providing DSB interface trigger output pattern match comparison. And each DSB subunit TPDM has maximum of m(m<7) XPMR registers to configure trigger pattern mask match output. Eight 32 bit registers providing DSB interface trigger output pattern match mask. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-11-git-send-email-quic_taozha@quicinc.com commit f376caf25f79965ab140b7a297cb4a5bb0c89523 Author: Tao Zhang Date: Thu Sep 28 14:29:42 2023 +0800 coresight-tpdm: Add nodes for dsb edge control Add the nodes to set value for DSB edge control and DSB edge control mask. Each DSB subunit TPDM has maximum of n(n<16) EDCR resgisters to configure edge control. DSB edge detection control 00: Rising edge detection 01: Falling edge detection 10: Rising and falling edge detection (toggle detection) And each DSB subunit TPDM has maximum of m(m<8) ECDMR registers to configure mask. Eight 32 bit registers providing DSB interface edge detection mask control. Add the nodes to configure DSB edge control and DSB edge control mask. Each DSB subunit TPDM maximum of 256 edge detections can be configured. The index and value sysfs files need to be paired and written to order. The index sysfs file is to set the index number of the edge detection which needs to be configured. And the value sysfs file is to set the control or mask for the edge detection. DSB edge detection control should be set as the following values. 00: Rising edge detection 01: Falling edge detection 10: Rising and falling edge detection (toggle detection) And DSB edge mask should be set as 0 or 1. Each DSB subunit TPDM has maximum of n(n<16) EDCR resgisters to configure edge control. And each DSB subunit TPDM has maximum of m(m<8) ECDMR registers to configure mask. Add the nodes to read a set of the edge control value and mask of the DSB in TPDM. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-10-git-send-email-quic_taozha@quicinc.com commit 018e43ad1eeefbb8797e4c933953c50c09e3f4f6 Author: Tao Zhang Date: Thu Sep 28 14:29:41 2023 +0800 coresight-tpdm: Add node to set dsb programming mode Add node to set and show programming mode for TPDM DSB subunit. Once the DSB programming mode is set, it will be written to the register DSB_CR. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-9-git-send-email-quic_taozha@quicinc.com commit 851b3f9c9c0838060158e288c1387d44652c54b5 Author: Tao Zhang Date: Thu Sep 28 14:29:40 2023 +0800 coresight-tpdm: Add nodes to set trigger timestamp and type The nodes are needed to set or show the trigger timestamp and trigger type. This change is to add these nodes to achieve these function. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-8-git-send-email-quic_taozha@quicinc.com commit 8fbbce11a90f345a1ff39e2a08e312ee763a1139 Author: Tao Zhang Date: Thu Sep 28 14:29:39 2023 +0800 coresight-tpdm: Add reset node to TPDM node TPDM device need a node to reset the configurations and status of it. This change provides a node to reset the configurations and disable the TPDM if it has been enabled. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-7-git-send-email-quic_taozha@quicinc.com commit f01e4948b516f073c353041328ae7cf709233303 Author: Tao Zhang Date: Thu Sep 28 14:29:38 2023 +0800 coresight-tpdm: Initialize DSB subunit configuration DSB is used for monitoring “events”. Events are something that occurs at some point in time. It could be a state decode, the act of writing/reading a particular address, a FIFO being empty, etc. This decoding of the event desired is done outside TPDM. DSB subunit need to be configured in enablement and disablement. A struct that specifics associated to dsb dataset is needed. It saves the configuration and parameters of the dsb datasets. This change is to add this struct and initialize the configuration of DSB subunit. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-6-git-send-email-quic_taozha@quicinc.com commit 57e7235aa1d11d4ea8a25dfdc009b3ee463763af Author: Tao Zhang Date: Thu Sep 28 14:29:37 2023 +0800 coresight-tpda: Add DSB dataset support Read the DSB element size from the device tree. Set the register bit that controls the DSB element size of the corresponding port. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-5-git-send-email-quic_taozha@quicinc.com commit f7f965c982f7954b46db910146a7ffe0fe1eb5e1 Author: Tao Zhang Date: Thu Sep 28 14:29:36 2023 +0800 coresight-tpdm: Introduce TPDM subtype to TPDM driver Introduce the new subtype of "CORESIGHT_DEV_SUBTYPE_SOURCE_TPDM" for TPDM components in driver. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-4-git-send-email-quic_taozha@quicinc.com commit 2a8d9b371566e798421ef877c5757e2c4a11ad6f Author: Tao Zhang Date: Thu Sep 28 14:29:35 2023 +0800 dt-bindings: arm: Add support for DSB element size Add property "qcom,dsb-elem-size" to support DSB(Discrete Single Bit) element for TPDM. The associated aggregator will read this size before it is enabled. DSB element size currently only supports 32-bit and 64-bit. Signed-off-by: Tao Zhang Acked-by: Rob Herring Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-3-git-send-email-quic_taozha@quicinc.com commit f4443ee5a38cb84bdd0515f8832117b2be0684d6 Author: Tao Zhang Date: Thu Sep 28 14:29:34 2023 +0800 coresight-tpdm: Remove the unnecessary lock Remove the unnecessary lock "CS_{UN,}LOCK" in TPDM driver. This lock is only needed while writing the data to Coresight registers. Signed-off-by: Tao Zhang Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/1695882586-10306-2-git-send-email-quic_taozha@quicinc.com commit 2373699a3505061cd21625c3f3b70dc3d03a3d8c Author: Anshuman Khandual Date: Fri Aug 18 13:51:12 2023 +0530 coresight: tmc: Make etr buffer mode user configurable from sysfs Currently TMC-ETR automatically selects the buffer mode from all available methods in the following sequentially fallback manner - also in that order. 1. FLAT mode with or without IOMMU 2. TMC-ETR-SG (scatter gather) mode when available 3. CATU mode when available But this order might not be ideal for all situations. For example if there is a CATU connected to ETR, it may be better to use TMC-ETR scatter gather method, rather than CATU. But hard coding such order changes will prevent us from testing or using a particular mode. This change provides following new sysfs tunables for the user to control TMC-ETR buffer mode explicitly, if required. This adds following new sysfs files for buffer mode selection purpose explicitly in the user space. /sys/bus/coresight/devices/tmc_etr/buf_modes_available /sys/bus/coresight/devices/tmc_etr/buf_mode_preferred $ cat buf_modes_available auto flat tmc-sg catu ------------------> Supported TMC-ETR buffer modes $ echo catu > buf_mode_preferred -------> Explicit buffer mode request But explicit user request has to be within supported ETR buffer modes only. These sysfs interface files are exclussive to ETR, and hence these are not available for other TMC devices such as ETB or ETF etc. A new auto' mode (i.e ETR_MODE_AUTO) has been added to help fallback to the existing default behaviour, when user provided preferred buffer mode fails. ETR_MODE_FLAT and ETR_MODE_AUTO are always available as preferred modes. Cc: Suzuki K Poulose Cc: Mike Leach Cc: James Clark Cc: Leo Yan Cc: Alexander Shishkin Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual [Fixup year in sysfs ABI documentation] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230818082112.554638-1-anshuman.khandual@arm.com commit e5d207b24c54af25fb763af44e2db35347a0f7ee Author: Anshuman Khandual Date: Thu Sep 21 09:06:31 2023 +0530 Documentation: coresight: Add cc_threshold tunable This updates config option to include 'cc_threshold' tunable value. Cc: Suzuki K Poulose Cc: Mike Leach Cc: James Clark Cc: Jonathan Corbet Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed by: Mike Leach Signed-off-by: Anshuman Khandual Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230921033631.1298723-4-anshuman.khandual@arm.com commit 94566c5b07744c7cf5c7cc0ad42b15996ba0b054 Author: Anshuman Khandual Date: Thu Sep 21 09:06:30 2023 +0530 coresight: etm: Make cycle count threshold user configurable When cycle counting is enabled, we use a default threshold value i.e 0x100 for the instruction trace cycle counting. This patch makes the cycle threshold user configurable via perf event attributes( 'cc_threshold' => event->attr.config3[11:0] ), falling back to the current default if unspecified. Cc: Suzuki K Poulose Cc: Mike Leach Cc: James Clark Cc: Leo Yan Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Mike Leach Signed-off-by: Anshuman Khandual Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230921033631.1298723-3-anshuman.khandual@arm.com commit 4aff040bcc8de28bead01194cbca1dc9471a5a85 Author: Anshuman Khandual Date: Thu Sep 21 09:06:29 2023 +0530 coresight: etm: Override TRCIDR3.CCITMIN on errata affected cpus This work arounds errata 1490853 on Cortex-A76, and Neoverse-N1, errata 1491015 on Cortex-A77, errata 1502854 on Cortex-X1, and errata 1619801 on Neoverse-V1, based affected cpus, where software read for TRCIDR3.CCITMIN field in ETM gets an wrong value. If software uses the value returned by the TRCIDR3.CCITMIN register field, then it will limit the range which could be used for programming the ETM. In reality, the ETM could be programmed with a much smaller value than what is indicated by the TRCIDR3.CCITMIN field and still function correctly. If software reads the TRCIDR3.CCITMIN register field, corresponding to the instruction trace counting minimum threshold, observe the value 0x100 or a minimum cycle count threshold of 256. The correct value should be 0x4 or a minimum cycle count threshold of 4. This work arounds the problem via storing 4 in drvdata->ccitmin on affected systems where the TRCIDR3.CCITMIN has been 256, thus preserving cycle count threshold granularity. These errata information has been updated in Documentation/arch/arm64/silicon-errata.rst, but without their corresponding configs because these have been implemented directly in the driver. Cc: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: Mike Leach Cc: James Clark Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Mike Leach Signed-off-by: Anshuman Khandual [ Fixed location of silicon-errata.rst in commit description ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230921033631.1298723-2-anshuman.khandual@arm.com commit 17f8b216e02654a0b37127736ce78b32ccaa867b Author: Anshuman Khandual Date: Tue Aug 29 19:24:05 2023 +0530 coresight: trbe: Enable ACPI based TRBE devices This detects and enables ACPI based TRBE devices via the dummy platform device created earlier for this purpose. Cc: Suzuki K Poulose Cc: Mike Leach Cc: Leo Yan Cc: Alexander Shishkin Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230829135405.1159449-3-anshuman.khandual@arm.com commit 4277f035d227e829133df284be7e35b7236a5b0f Author: Anshuman Khandual Date: Tue Aug 29 19:24:04 2023 +0530 coresight: trbe: Add a representative coresight_platform_data for TRBE TRBE coresight devices do not need regular connections information, as the paths get built between all percpu source and their respective percpu sink devices. Please refer 'commit 2cd87a7b293d ("coresight: core: Add support for dedicated percpu sinks")' which added support for percpu sink devices. coresight_register() expect device connections via the platform_data. TRBE devices do not have any graph connections and thus is empty. With upcoming ACPI support for TRBE, we do not get a real acpi_device and thus coresight_get_platform_dat() will end up in failures. Hence this allocates a zeroed coresight_platform_data structure and assigns that back into the device. Cc: Suzuki K Poulose Cc: Mike Leach Cc: Leo Yan Cc: Alexander Shishkin Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230829135405.1159449-2-anshuman.khandual@arm.com commit 182d44f9ce2d44a554432139c2d8026faddbe635 Author: Leo Yan Date: Mon Sep 4 17:23:11 2023 +0800 MAINTAINERS: Remove myself as a Arm CoreSight reviewer I haven't done any meaningful work for a long while on Arm CoreSight and it's unlikely I'll be able to do related work in the future. Remove myself from the Arm CoreSight "Reviewers" list. Signed-off-by: Leo Yan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20230904092311.389112-1-leo.yan@linaro.org commit 772dd70a5ed6845d87738f82c788c9ff4e37fd7f Author: Christophe JAILLET Date: Wed Nov 1 16:57:57 2023 +0100 phy: core: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d2323636c6cd2ec22f73a0ae6c2d34ac99b4abd5.1698854255.git.christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 80c1afe8c5fec68d9467c543551a0b2fddd463ff Author: Neil Armstrong Date: Mon Oct 30 10:48:23 2023 +0100 phy: qcom: qmp-combo: add QMP USB3/DP PHY tables for SM8650 Add QMP USB3/DP Combo PHY support for the SM8650 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-phy-v2-7-a543a4c4b491@linaro.org Signed-off-by: Vinod Koul commit c954b6d347e78690f053342b2d2759c650e61a43 Author: Neil Armstrong Date: Mon Oct 30 10:48:22 2023 +0100 phy: qcom: qmp-pcie: add QMP PCIe PHY tables for SM8650 Add QMP PCIe PHY support for the SM8650 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-phy-v2-6-a543a4c4b491@linaro.org Signed-off-by: Vinod Koul commit 7c4bf8cb9d40a7222bb5d641979952b196707985 Author: Neil Armstrong Date: Mon Oct 30 10:48:21 2023 +0100 phy: qcom: qmp-ufs: add QMP UFS PHY tables for SM8650 Add QMP UFS PHY support for the SM8650 platform. Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-phy-v2-5-a543a4c4b491@linaro.org Signed-off-by: Vinod Koul commit 330df15dab25931c9214bfa279319755d2201d7f Author: Neil Armstrong Date: Mon Oct 30 10:48:20 2023 +0100 dt-bindings: phy: qcom,snps-eusb2: document the SM8650 Synopsys eUSB2 PHY Document the Synopsys eUSB2 PHY on the SM8650 Platform by using the SM8550 as fallback. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-phy-v2-4-a543a4c4b491@linaro.org Signed-off-by: Vinod Koul commit 685c00ac4240c1205005f617916f68b76da78908 Author: Neil Armstrong Date: Mon Oct 30 10:48:19 2023 +0100 dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp-phy: document the SM8650 QMP USB/DP Combo PHY Document the QMP USB/DP Combo PHY on the SM8650 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-phy-v2-3-a543a4c4b491@linaro.org Signed-off-by: Vinod Koul commit 9e3f381986f6be1a7199587f8921cbb7e89a733e Author: Neil Armstrong Date: Mon Oct 30 10:48:18 2023 +0100 dt-bindings: phy: qcom,sc8280xp-qmp-pcie-phy: document the SM8650 QMP PCIe PHYs Document the QMP PCIe PHYs on the SM8650 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-phy-v2-2-a543a4c4b491@linaro.org Signed-off-by: Vinod Koul commit 8c91ef9883bfb5a6315917a7104dd1e06c85b278 Author: Neil Armstrong Date: Mon Oct 30 10:48:17 2023 +0100 dt-bindings: phy: qcom,sc8280xp-qmp-ufs-phy: document the SM8650 QMP UFS PHY Document the QMP UFS PHY on the SM8650 Platform. Signed-off-by: Neil Armstrong Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231030-topic-sm8650-upstream-phy-v2-1-a543a4c4b491@linaro.org Signed-off-by: Vinod Koul commit 3185d57cfcd34fadbe28f4ed57a6cb5122277ece Author: Tobias Klauser Date: Tue Nov 14 11:42:02 2023 +0100 indirect_call_wrapper: Fix typo in INDIRECT_CALL_$NR kerneldoc Fix a small typo in the kerneldoc comment of the INDIRECT_CALL_$NR macro. Signed-off-by: Tobias Klauser Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20231114104202.4680-1-tklauser@distanz.ch Signed-off-by: Paolo Abeni commit 7ad7d7fb3e69d8d58ffa173bfa6dc74d0a392175 Author: Jack Zhu Date: Wed Oct 25 11:14:22 2023 +0800 media: staging: media: starfive: camss: Add TODO file Add a TODO.txt file to explain what needs to be done to get them out of staging. Signed-off-by: Jack Zhu Signed-off-by: Hans Verkuil commit ac7da4a73b104589f9fbce0514ff5f84cda99d67 Author: Jack Zhu Date: Wed Oct 25 11:14:21 2023 +0800 media: staging: media: starfive: camss: Register devices Register ISP sub-device and video devices for StarFive Camera Subsystem. Signed-off-by: Jack Zhu Signed-off-by: Hans Verkuil commit 1ee1b01b97cd7da9eefba156d33db6ccf10110bb Author: Jack Zhu Date: Wed Oct 25 11:14:20 2023 +0800 media: staging: media: starfive: camss: Add interrupt handling Parse interrupt resources and register interrupt handlers. Signed-off-by: Jack Zhu Signed-off-by: Hans Verkuil commit e080f339c80aedb13ecb5de1e9bdcafdb4bb6652 Author: Jack Zhu Date: Wed Oct 25 11:14:19 2023 +0800 media: staging: media: starfive: camss: Add capture driver Add capture driver for StarFive Camera Subsystem. It contains two video devices: capture_yuv and capture_raw. Signed-off-by: Jack Zhu Signed-off-by: Hans Verkuil commit e57854628f585c2b7719433dd008f74285a57ed9 Author: Jack Zhu Date: Wed Oct 25 11:14:18 2023 +0800 media: staging: media: starfive: camss: Add ISP driver Add ISP driver for StarFive Camera Subsystem. Signed-off-by: Jack Zhu Signed-off-by: Hans Verkuil commit b7eedc7d2b9465f8c302cfd7749176bae3f1eddd Author: Jack Zhu Date: Wed Oct 25 11:14:17 2023 +0800 media: staging: media: starfive: camss: Add video driver Add video driver for StarFive Camera Subsystem. Signed-off-by: Jack Zhu Signed-off-by: Hans Verkuil commit bba185d141b1278728f53d2ebf97214ab023ed07 Author: Jack Zhu Date: Wed Oct 25 11:14:16 2023 +0800 media: staging: media: starfive: camss: Add core driver Add core driver for StarFive Camera Subsystem. The code parses the device platform resources and registers related devices. Reviewed-by: Bryan O'Donoghue Signed-off-by: Jack Zhu Signed-off-by: Hans Verkuil commit f72f80550d01060a9dda8d0a1c3a7abbf333bc77 Author: Jack Zhu Date: Wed Oct 25 11:14:15 2023 +0800 media: admin-guide: Add starfive_camss.rst for Starfive Camera Subsystem Add starfive_camss.rst file that documents the Starfive Camera Subsystem driver which is used for handing image sensor data. Signed-off-by: Jack Zhu Signed-off-by: Hans Verkuil commit f5502cd25ac0405740e98e2dcdb9dcd355866e03 Author: Jack Zhu Date: Wed Oct 25 11:14:14 2023 +0800 media: dt-bindings: Add JH7110 Camera Subsystem Add the bindings documentation for Starfive JH7110 Camera Subsystem which is used for handing image sensor data. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Laurent Pinchart Signed-off-by: Jack Zhu Signed-off-by: Hans Verkuil commit 98ed369800f79a2cd199b8415d14d82a5f2e007f Author: Animesh Manna Date: Fri Nov 10 08:55:18 2023 +0530 drm/i915/dsb: DSB code refactoring Refactor DSB implementation to be compatible with Xe driver. v1: RFC version. v2: Make intel_dsb structure opaque from external usage. [Jani] v3: Rebased on latest. v4: - Add boundary check in dsb_buffer_memset(). [Luca] - Use size_t instead of u32. [Luca] v5: WARN_ON() added for out of boudary case with some optimization. [Luca] v6: Rebased on latest and fix a rebase-miss. Cc: Jani Nikula Reviewed-by: Luca Coelho Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20231110032518.3564279-1-animesh.manna@intel.com commit bbe6a7c899e7f265c5a6d01a178336a405e98ed6 Author: Al Viro Date: Tue Nov 14 18:52:42 2023 -0500 bch2_ioctl_subvolume_destroy(): fix locking make it use user_path_locked_at() to get the normal directory protection for modifications, as well as stable ->d_parent and ->d_name in victim Signed-off-by: Al Viro commit 74d016ecc1a7974664e98d1afbf649cd4e0e0423 Author: Al Viro Date: Wed Nov 15 22:41:27 2023 -0500 new helper: user_path_locked_at() Equivalent of kern_path_locked() taking dfd/userland name. User introduced in the next commit. Signed-off-by: Al Viro commit d7b4832cbeb85075293b1211a9c89fad4fdda1f1 Author: Vinay Belgaumkar Date: Thu Nov 9 11:21:48 2023 -0800 drm/i915: Read a shadowed mmio register for ggtt flush We read RENDER_HEAD as a part of the flush. If GT is in deeper sleep states, this could lead to read errors since we are not using a forcewake. Safer to read a shadowed register instead. Cc: John Harrison Cc: Daniele Ceraolo Spurio Signed-off-by: Vinay Belgaumkar Reviewed-by: Radhakrishna Sripada Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20231109192148.475156-1-vinay.belgaumkar@intel.com commit f37669119423ca852ca855b24732f25c0737aa57 Author: Jan Palus Date: Sat Nov 11 23:17:04 2023 +0100 power: supply: cw2015: correct time_to_empty units in sysfs RRT_ALRT register holds remaining battery time in minutes therefore it needs to be scaled accordingly when exposing TIME_TO_EMPTY via sysfs expressed in seconds Fixes: b4c7715c10c1 ("power: supply: add CellWise cw2015 fuel gauge driver") Signed-off-by: Jan Palus Link: https://lore.kernel.org/r/20231111221704.5579-1-jpalus@fastmail.com Signed-off-by: Sebastian Reichel commit 054eb2377523530404fb64c24c8747feb022c5b4 Author: Uwe Kleine-König Date: Sun Nov 5 10:47:14 2023 +0100 power: reset: at91-sama5d2_shdwc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20231105094712.3706799-4-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 20cea2b59abe33b80536b936b6729c88d1de2624 Author: Uwe Kleine-König Date: Sun Nov 5 10:47:13 2023 +0100 power: reset: at91-reset: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20231105094712.3706799-3-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 0bf7207e09673144df6425b2cad8bcb015e3501a Author: Uwe Kleine-König Date: Sat Nov 4 22:15:16 2023 +0100 power: reset: tps65086-restart: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Returning an error if unregister_restart_handler() failed has no effect but triggering another error message. So converting this driver to .remove_new() has no effect but to suppress the duplicated error message. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231104211501.3676352-30-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 2973706c4160ed8c1e695b4dfef4bdb3124c5753 Author: Uwe Kleine-König Date: Sat Nov 4 22:15:15 2023 +0100 power: reset: syscon-poweroff: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231104211501.3676352-29-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 30d26d2be83de0d036f59f384b805dd3bf4bf5ef Author: Uwe Kleine-König Date: Sat Nov 4 22:15:14 2023 +0100 power: reset: rmobile-reset: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231104211501.3676352-28-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit aedd4da0aa27fe9d0b03b3fbf62376aebbfc385b Author: Uwe Kleine-König Date: Sat Nov 4 22:15:13 2023 +0100 power: reset: restart-poweroff: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231104211501.3676352-27-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 6f7be7b2f15a654a5f08b7d37df282c171b9380b Author: Uwe Kleine-König Date: Sat Nov 4 22:15:12 2023 +0100 power: reset: regulator-poweroff: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231104211501.3676352-26-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 1a0457ab2ce81d92c2077a79080141d924884c5f Author: Uwe Kleine-König Date: Sat Nov 4 22:15:11 2023 +0100 power: reset: qnap-poweroff: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231104211501.3676352-25-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 99f7fa6c7cc573ebe2529959723b71b4d12ec2f5 Author: Uwe Kleine-König Date: Sat Nov 4 22:15:10 2023 +0100 power: reset: mt6323-poweroff: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231104211501.3676352-24-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 6642b13206b2225b0d75451f5dd763574a2c8bb0 Author: Uwe Kleine-König Date: Sat Nov 4 22:15:09 2023 +0100 power: reset: ltc2952-poweroff: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231104211501.3676352-23-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 6f539f3151721f1c90fcdafa2962c19a8efc1afc Author: Uwe Kleine-König Date: Sat Nov 4 22:15:08 2023 +0100 power: reset: atc260x-poweroff: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231104211501.3676352-22-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit a31438ece3ec27057c77822b0b0bc0614798c425 Author: Uwe Kleine-König Date: Sat Nov 4 22:15:07 2023 +0100 power: reset: at91-poweroff: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20231104211501.3676352-21-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 904e582f0c7282b3d7c76c73c06f3ad3b0910335 Author: Uwe Kleine-König Date: Sat Nov 4 22:15:06 2023 +0100 power: reset: as3722-poweroff: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231104211501.3676352-20-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit dde74a5de817e0a011e4783cf26295d7f6fdca26 Author: Uwe Kleine-König Date: Sat Nov 4 22:15:05 2023 +0100 power: reset: at91-sama5d2_shdwc: Stop using module_platform_driver_probe() On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_driver_probe() is that the driver cannot be bound and unbound at runtime which is ancient and so slightly complicates testing. There are also thoughts to deprecate platform_driver_probe() because it adds some complexity in the driver core for little gain. Also many drivers don't use it correctly. This driver for example misses to mark the driver struct with __ref which is needed to suppress a (W=1) modpost warning. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20231104211501.3676352-19-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 12389c657b623da34ba9b30306e13919d0b42f3a Author: Uwe Kleine-König Date: Sat Nov 4 22:15:04 2023 +0100 power: reset: at91-reset: Stop using module_platform_driver_probe() On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_driver_probe() is that the driver cannot be bound and unbound at runtime which is ancient and so slightly complicates testing. There are also thoughts to deprecate platform_driver_probe() because it adds some complexity in the driver core for little gain. Also many drivers don't use it correctly. This driver for example misses to mark the driver struct with __ref which is needed to suppress a (W=1) modpost warning. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20231104211501.3676352-18-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit 099806de68b75a0fe114376b1ee162fdff572ecc Author: Uwe Kleine-König Date: Sat Nov 4 22:15:03 2023 +0100 power: reset: at91-poweroff: Stop using module_platform_driver_probe() On today's platforms the benefit of platform_driver_probe() isn't that relevant any more. It allows to drop some code after booting (or module loading) for .probe() and discard the .remove() function completely if the driver is built-in. This typically saves a few 100k. The downside of platform_driver_probe() is that the driver cannot be bound and unbound at runtime which is ancient and so slightly complicates testing. There are also thoughts to deprecate platform_driver_probe() because it adds some complexity in the driver core for little gain. Also many drivers don't use it correctly. This driver for example misses to mark the driver struct with __ref which is needed to suppress a (W=1) modpost warning. Signed-off-by: Uwe Kleine-König Reviewed-by: Claudiu Beznea Link: https://lore.kernel.org/r/20231104211501.3676352-17-u.kleine-koenig@pengutronix.de Signed-off-by: Sebastian Reichel commit dfcb264a01a9199e8338a548731baf5bbe77ef19 Author: Marek Vasut Date: Sat Nov 4 16:49:06 2023 +0100 power: supply: bq27xxx: Stop and start delayed work in suspend and resume This driver uses delayed work to perform periodic battery state read out. This delayed work is not stopped across suspend and resume cycle. The read out can occur early in the resume cycle. In case of an I2C variant of this hardware, that read out triggers I2C transfer. That I2C transfer may happen while the I2C controller is still suspended, which produces a WARNING in the kernel log. Fix this by introducing trivial PM ops, which stop the delayed work before the system enters suspend, and schedule the delayed work right after the system resumes. Signed-off-by: Marek Vasut Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20231104154920.68585-1-marex@denx.de Signed-off-by: Sebastian Reichel commit 5739da3e16ad0ebe99c31cabe960856b53eaaabe Author: Elliot Berman Date: Tue Oct 31 11:28:22 2023 -0700 dt-bindings: power: reset: $ref reboot-mode in nvmem-reboot-mode nvmem-reboot-mode.yaml should $ref: reboot-mode.yaml, but instead rewrites the properties. Update so it $refs instead. Signed-off-by: Elliot Berman Reviewed-by: Rob Herring Reviewed-by: Mukesh Ojha Link: https://lore.kernel.org/r/20231031-ref-nvmem-reboot-mode-v1-1-c1af9070ce52@quicinc.com Signed-off-by: Sebastian Reichel commit 160dff476f81b928ee4a4d2be95066fa32513483 Author: Elliot Berman Date: Tue Oct 31 11:27:00 2023 -0700 dt-bindings: power: reset: $ref reboot-mode in syscon-reboot-mode syscon-reboot-mode.yaml should $ref: reboot-mode.yaml, but instead rewrites the properties. Update so it $refs instead. Signed-off-by: Elliot Berman Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231031-ref-reboot-mode-v1-1-18dde4faf7e8@quicinc.com Signed-off-by: Sebastian Reichel commit b9afaa069e58939d95923c27c2fd76a0523119a7 Author: Asmaa Mnebhi Date: Mon Oct 30 16:30:58 2023 -0400 power: reset: pwr-mlxbf: support graceful reboot instead of emergency reset Replace the soft reset with a graceful reboot. An acpi event will be triggered by the irq in the pwr-mlxbf.c to trigger the graceful reboot. Signed-off-by: Asmaa Mnebhi Link: https://lore.kernel.org/r/20231030203058.8056-1-asmaa@nvidia.com Signed-off-by: Sebastian Reichel commit 07e6a553c2f1d385edfc9185081dee442a9dd38d Author: Krzysztof Kozlowski Date: Sat Jul 22 14:17:19 2023 +0200 ARM: dts: samsung: s5pv210: fix camera unit addresses/ranges The camera node has both unit address and children within the same bus mapping, thus needs proper ranges property to fix dtc W=1 warnings: Warning (unit_address_vs_reg): /soc/camera@fa600000: node has a unit name, but no reg or ranges property Warning (simple_bus_reg): /soc/camera@fa600000: missing or empty reg/ranges property Subtract 0xfa600000 from all its children nodes. No functional impact expected. Link: https://lore.kernel.org/r/20230722121719.150094-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit ba2a45a48503665f7e8eeec51f8b40456566b0cd Author: Krzysztof Kozlowski Date: Sat Jul 22 14:17:18 2023 +0200 ARM: dts: samsung: exynos4: fix camera unit addresses/ranges The camera node has both unit address and children within the same bus mapping, thus needs proper ranges property to fix dtc W=1 warnings: Warning (unit_address_vs_reg): /soc/camera@11800000: node has a unit name, but no reg or ranges property Warning (simple_bus_reg): /soc/camera@11800000: missing or empty reg/ranges property Subtract 0x11800000 from all its children nodes. No functional impact expected. Link: https://lore.kernel.org/r/20230722121719.150094-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 797bf47d8a42792762cfc74dc84109d6d893ddf2 Author: Krzysztof Kozlowski Date: Sat Jul 22 14:17:17 2023 +0200 ARM: dts: samsung: exynos4x12: replace duplicate pmu node with phandle Devicetree for the FIMC IS camera included duplicated PMU node as its child. This is not a correct representation of the hardware. Mapping the PMU (Power Management Unit) IO memory should be via syscon-like phandle (samsung,pmu-syscon, already used for other drivers), not by duplicating "pmu" Devicetree node inside the FIMC IS. The change is not compatible with older Linux kernel, which does not parse samsung,pmu-syscon property. Link: https://lore.kernel.org/r/20230722121719.150094-1-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 271c81935801d6449bb7bab5ccfc6cd38238c62b Author: Kris Chaplin Date: Tue Nov 7 10:06:52 2023 -0800 w1: Add AXI 1-wire host driver for AMD programmable logic IP core Add a host driver to support the AMD 1-Wire programmable logic IP block. This block guarantees protocol timing for driving off-board devices such as thermal sensors, proms, etc. Add file to MAINTAINERS Co-developed-by: Thomas Delev Signed-off-by: Thomas Delev Signed-off-by: Kris Chaplin Link: https://lore.kernel.org/r/20231107180814.615933-3-kris.chaplin@amd.com Signed-off-by: Krzysztof Kozlowski commit 3427fa5b32bbf54e51a2fde347a88161ff16a641 Author: Kris Chaplin Date: Tue Nov 7 10:06:51 2023 -0800 dt-bindings: w1: Add AMD AXI w1 host and MAINTAINERS entry Add YAML DT schema for the AMD AXI w1 host IP. This hardware guarantees protocol timing for driving off-board devices such as thermal sensors, proms, etc using the 1wire protocol. The IP has a register to detect hardware version and so the binding does not have an explicit version number. Add MAINTAINERS entry for DT schema. Co-developed-by: Thomas Delev Signed-off-by: Thomas Delev Signed-off-by: Kris Chaplin Reviewed-by: Conor Dooley Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231107180814.615933-2-kris.chaplin@amd.com Signed-off-by: Krzysztof Kozlowski commit 5fa201f37c2ef58a0f821e656d794af89b3a1738 Author: Puranjay Mohan Date: Fri Nov 10 17:51:50 2023 +0000 bpf: Remove test for MOVSX32 with offset=32 MOVSX32 only supports sign extending 8-bit and 16-bit operands into 32 bit operands. The "ALU_MOVSX | BPF_W" test tries to sign extend a 32 bit operand into a 32 bit operand which is equivalent to a normal BPF_MOV. Remove this test as it tries to run an invalid instruction. Fixes: daabb2b098e0 ("bpf/tests: add tests for cpuv4 instructions") Signed-off-by: Puranjay Mohan Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202310111838.46ff5b6a-oliver.sang@intel.com Acked-by: Stanislav Fomichev Acked-by: Yonghong Song Link: https://lore.kernel.org/r/20231110175150.87803-1-puranjay12@gmail.com Signed-off-by: Alexei Starovoitov commit 9cea90c01f4bddfb4cea12a9c23eef6414714503 Merge: 81427a62a2214 882e3d873c2d8 Author: Alexei Starovoitov Date: Wed Nov 15 12:03:43 2023 -0800 Merge branch 'bpf-register-bounds-range-vs-range-support' Andrii Nakryiko says: ==================== BPF register bounds range vs range support This patch set is a continuation of work started in [0]. It adds a big set of manual, auto-generated, and now also random test cases validating BPF verifier's register bounds tracking and deduction logic. First few patches generalize verifier's logic to handle conditional jumps and corresponding range adjustments in case when two non-const registers are compared to each other. Patch #1 generalizes reg_set_min_max() portion, while patch #2 does the same for is_branch_taken() part of the overall solution. Patch #3 improves equality and inequality for cases when BPF program code mixes 64-bit and 32-bit uses of the same register. Depending on specific sequence, it's possible to get to the point where u64/s64 bounds will be very generic (e.g., after signed 32-bit comparison), while we still keep pretty tight u32/s32 bounds. If in such state we proceed with 32-bit equality or inequality comparison, reg_set_min_max() might have to deal with adjusting s32 bounds for two registers that don't overlap, which breaks reg_set_min_max(). This doesn't manifest in vs cases, because if that happens reg_set_min_max() in effect will force s32 bounds to be a new "impossible" constant (from original smin32/smax32 bounds point of view). Things get tricky when we have vs adjustments, so instead of trying to somehow make sense out of such situations, it's best to detect such impossible situations and prune the branch that can't be taken in is_branch_taken() logic. This equality/inequality was the only such category of situations with auto-generated tests added later in the patch set. But when we start mixing arithmetic operations in different numeric domains and conditionals, things get even hairier. So, patch #4 adds sanity checking logic after all ALU/ALU64, JMP/JMP32, and LDX operations. By default, instead of failing verification, we conservatively reset range bounds to unknown values, reporting violation in verifier log (if verbose logs are requested). But to aid development, detection, and debugging, we also introduce a new test flag, BPF_F_TEST_SANITY_STRICT, which triggers verification failure on range sanity violation. Patch #11 sets BPF_F_TEST_SANITY_STRICT by default for test_progs and test_verifier. Patch #12 adds support for controlling this in veristat for testing with production BPF object files. Getting back to BPF verifier, patches #5 and #6 complete verifier's range tracking logic clean up. See respective patches for details. With kernel-side taken care of, we move to testing. We start with building a tester that validates existing vs verifier logic for range bounds. Patch #7 implements an initial version of such a tester. We guard millions of generated tests behind SLOW_TESTS=1 envvar requirement, but also have a relatively small number of tricky cases that came up during development and debugging of this work. Those will be executed as part of a normal test_progs run. Patch #8 simulates more nuanced JEQ/JNE logic we added to verifier in patch #3. Patch #9 adds vs "slow tests". Patch #10 is a completely new one, it adds a bunch of randomly generated cases to be run normally, without SLOW_TESTS=1 guard. This should help to get a bunch of cover, and hopefully find some remaining latent problems if verifier proactively as part of normal BPF CI runs. Finally, a tiny test which was, amazingly, an initial motivation for this whole work, is added in lucky patch #13, demonstrating how verifier is now smart enough to track actual number of elements in the array and won't require additional checks on loop iteration variable inside the bpf_for() open-coded iterator loop. [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=798308&state=* v1->v2: - use x < y => y > x property to minimize reg_set_min_max (Eduard); - fix for JEQ/JNE logic in reg_bounds.c (Eduard); - split BPF_JSET and !BPF_JSET cases handling (Shung-Hsi); - adjustments to reg_bounds.c to make it easier to follow (Alexei); - added acks (Eduard, Shung-Hsi). ==================== Link: https://lore.kernel.org/r/20231112010609.848406-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 882e3d873c2d8a2aebbc6c192aa1a2990b9d5b27 Author: Andrii Nakryiko Date: Sat Nov 11 17:06:09 2023 -0800 selftests/bpf: add iter test requiring range x range logic Add a simple verifier test that requires deriving reg bounds for one register from another register that's not a constant. This is a realistic example of iterating elements of an array with fixed maximum number of elements, but smaller actual number of elements. This small example was an original motivation for doing this whole patch set in the first place, yes. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231112010609.848406-14-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit a5c57f81eb2b5d6de4f46e47fd85be50d179bfd8 Author: Andrii Nakryiko Date: Sat Nov 11 17:06:08 2023 -0800 veristat: add ability to set BPF_F_TEST_SANITY_STRICT flag with -r flag Add a new flag -r (--test-sanity), similar to -t (--test-states), to add extra BPF program flags when loading BPF programs. This allows to use veristat to easily catch sanity violations in production BPF programs. reg_bounds tests are also enforcing BPF_F_TEST_SANITY_STRICT flag now. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231112010609.848406-13-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 8c5677f8b31e92b57be7d5d0fbb1ac66eedf4f91 Author: Andrii Nakryiko Date: Sat Nov 11 17:06:07 2023 -0800 selftests/bpf: set BPF_F_TEST_SANITY_SCRIPT by default Make sure to set BPF_F_TEST_SANITY_STRICT program flag by default across most verifier tests (and a bunch of others that set custom prog flags). There are currently two tests that do fail validation, if enforced strictly: verifier_bounds/crossing_64_bit_signed_boundary_2 and verifier_bounds/crossing_32_bit_signed_boundary_2. To accommodate them, we teach test_loader a flag negation: __flag(!) will *clear* specified flag, allowing easy opt-out. We apply __flag(!BPF_F_TEST_SANITY_STRICT) to these to tests. Also sprinkle BPF_F_TEST_SANITY_STRICT everywhere where we already set test-only BPF_F_TEST_RND_HI32 flag, for completeness. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231112010609.848406-12-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit dab16659c50e8c9c7c5d9584beacec28c769dcca Author: Andrii Nakryiko Date: Sat Nov 11 17:06:06 2023 -0800 selftests/bpf: add randomized reg_bounds tests Add random cases generation to reg_bounds.c and run them without SLOW_TESTS=1 to increase a chance of BPF CI catching latent issues. Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231112010609.848406-11-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 2b0d204e368b306d4db894749947ed591b667ec5 Author: Andrii Nakryiko Date: Sat Nov 11 17:06:05 2023 -0800 selftests/bpf: add range x range test to reg_bounds Now that verifier supports range vs range bounds adjustments, validate that by checking each generated range against every other generated range, across all supported operators (everything by JSET). We also add few cases that were problematic during development either for verifier or for selftest's range tracking implementation. Note that we utilize the same trick with splitting everything into multiple independent parallelizable tests, but init_t and cond_t. This brings down verification time in parallel mode from more than 8 hours down to less that 1.5 hours. 106 million cases were successfully validate for range vs range logic, in addition to about 7 million range vs const cases, added in earlier patch. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231112010609.848406-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 774f94c5e74d86d554c4fd1e97c517a1a7ee7fe0 Author: Andrii Nakryiko Date: Sat Nov 11 17:06:04 2023 -0800 selftests/bpf: adjust OP_EQ/OP_NE handling to use subranges for branch taken Similar to kernel-side BPF verifier logic enhancements, use 32-bit subrange knowledge for is_branch_taken() logic in reg_bounds selftests. Signed-off-by: Andrii Nakryiko Acked-by: Eduard Zingerman Link: https://lore.kernel.org/r/20231112010609.848406-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 8863238993e23ccc6d5a9d4ff9f1c043f88f692e Author: Andrii Nakryiko Date: Sat Nov 11 17:06:03 2023 -0800 selftests/bpf: BPF register range bounds tester Add test to validate BPF verifier's register range bounds tracking logic. The main bulk is a lot of auto-generated tests based on a small set of seed values for lower and upper 32 bits of full 64-bit values. Currently we validate only range vs const comparisons, but the idea is to start validating range over range comparisons in subsequent patch set. When setting up initial register ranges we treat registers as one of u64/s64/u32/s32 numeric types, and then independently perform conditional comparisons based on a potentially different u64/s64/u32/s32 types. This tests lots of tricky cases of deriving bounds information across different numeric domains. Given there are lots of auto-generated cases, we guard them behind SLOW_TESTS=1 envvar requirement, and skip them altogether otherwise. With current full set of upper/lower seed value, all supported comparison operators and all the combinations of u64/s64/u32/s32 number domains, we get about 7.7 million tests, which run in about 35 minutes on my local qemu instance without parallelization. But we also split those tests by init/cond numeric types, which allows to rely on test_progs's parallelization of tests with `-j` option, getting run time down to about 5 minutes on 8 cores. It's still something that shouldn't be run during normal test_progs run. But we can run it a reasonable time, and so perhaps a nightly CI test run (once we have it) would be a good option for this. We also add a small set of tricky conditions that came up during development and triggered various bugs or corner cases in either selftest's reimplementation of range bounds logic or in verifier's logic itself. These are fast enough to be run as part of normal test_progs test run and are great for a quick sanity checking. Let's take a look at test output to understand what's going on: $ sudo ./test_progs -t reg_bounds_crafted #191/1 reg_bounds_crafted/(u64)[0; 0xffffffff] (u64)< 0:OK ... #191/115 reg_bounds_crafted/(u64)[0; 0x17fffffff] (s32)< 0:OK ... #191/137 reg_bounds_crafted/(u64)[0xffffffff; 0x100000000] (u64)== 0:OK Each test case is uniquely and fully described by this generated string. E.g.: "(u64)[0; 0x17fffffff] (s32)< 0". This means that we initialize a register (R6) in such a way that verifier knows that it can have a value in [(u64)0; (u64)0x17fffffff] range. Another register (R7) is also set up as u64, but this time a constant (zero in this case). They then are compared using 32-bit signed < operation. Resulting TRUE/FALSE branches are evaluated (including cases where it's known that one of the branches will never be taken, in which case we validate that verifier also determines this as a dead code). Test validates that verifier's final register state matches expected state based on selftest's own reg_state logic, implemented from scratch for cross-checking purposes. These test names can be conveniently used for further debugging, and if -vv verboseness is requested we can get a corresponding verifier log (with mark_precise logs filtered out as irrelevant and distracting). Example below is slightly redacted for brevity, omitting irrelevant register output in some places, marked with [...]. $ sudo ./test_progs -a 'reg_bounds_crafted/(u32)[0; U32_MAX] (s32)< -1' -vv ... VERIFIER LOG: ======================== func#0 @0 0: R1=ctx(off=0,imm=0) R10=fp0 0: (05) goto pc+2 3: (85) call bpf_get_current_pid_tgid#14 ; R0_w=scalar() 4: (bc) w6 = w0 ; R0_w=scalar() R6_w=scalar(smin=0,smax=umax=4294967295,var_off=(0x0; 0xffffffff)) 5: (85) call bpf_get_current_pid_tgid#14 ; R0_w=scalar() 6: (bc) w7 = w0 ; R0_w=scalar() R7_w=scalar(smin=0,smax=umax=4294967295,var_off=(0x0; 0xffffffff)) 7: (b4) w1 = 0 ; R1_w=0 8: (b4) w2 = -1 ; R2=4294967295 9: (ae) if w6 < w1 goto pc-9 9: R1=0 R6=scalar(smin=0,smax=umax=4294967295,var_off=(0x0; 0xffffffff)) 10: (2e) if w6 > w2 goto pc-10 10: R2=4294967295 R6=scalar(smin=0,smax=umax=4294967295,var_off=(0x0; 0xffffffff)) 11: (b4) w1 = -1 ; R1_w=4294967295 12: (b4) w2 = -1 ; R2_w=4294967295 13: (ae) if w7 < w1 goto pc-13 ; R1_w=4294967295 R7=4294967295 14: (2e) if w7 > w2 goto pc-14 14: R2_w=4294967295 R7=4294967295 15: (bc) w0 = w6 ; [...] R6=scalar(id=1,smin=0,smax=umax=4294967295,var_off=(0x0; 0xffffffff)) 16: (bc) w0 = w7 ; [...] R7=4294967295 17: (ce) if w6 s< w7 goto pc+3 ; R6=scalar(id=1,smin=0,smax=umax=4294967295,smin32=-1,var_off=(0x0; 0xffffffff)) R7=4294967295 18: (bc) w0 = w6 ; [...] R6=scalar(id=1,smin=0,smax=umax=4294967295,smin32=-1,var_off=(0x0; 0xffffffff)) 19: (bc) w0 = w7 ; [...] R7=4294967295 20: (95) exit from 17 to 21: [...] 21: (bc) w0 = w6 ; [...] R6=scalar(id=1,smin=umin=umin32=2147483648,smax=umax=umax32=4294967294,smax32=-2,var_off=(0x80000000; 0x7fffffff)) 22: (bc) w0 = w7 ; [...] R7=4294967295 23: (95) exit from 13 to 1: [...] 1: [...] 1: (b7) r0 = 0 ; R0_w=0 2: (95) exit processed 24 insns (limit 1000000) max_states_per_insn 0 total_states 2 peak_states 2 mark_read 1 ===================== Verifier log above is for `(u32)[0; U32_MAX] (s32)< -1` use cases, where u32 range is used for initialization, followed by signed < operator. Note how we use w6/w7 in this case for register initialization (it would be R6/R7 for 64-bit types) and then `if w6 s< w7` for comparison at instruction #17. It will be `if R6 < R7` for 64-bit unsigned comparison. Above example gives a good impression of the overall structure of a BPF programs generated for reg_bounds tests. In the future, this "framework" can be extended to test not just conditional jumps, but also arithmetic operations. Adding randomized testing is another possibility. Some implementation notes. We basically have our own generics-like operations on numbers, where all the numbers are stored in u64, but how they are interpreted is passed as runtime argument enum num_t. Further, `struct range` represents a bounds range, and those are collected together into a minimal `struct reg_state`, which collects range bounds across all four numberical domains: u64, s64, u32, s64. Based on these primitives and `enum op` representing possible conditional operation (<, <=, >, >=, ==, !=), there is a set of generic helpers to perform "range arithmetics", which is used to maintain struct reg_state. We simulate what verifier will do for reg bounds of R6 and R7 registers using these range and reg_state primitives. Simulated information is used to determine branch taken conclusion and expected exact register state across all four number domains. Implementation of "range arithmetics" is more generic than what verifier is currently performing: it allows range over range comparisons and adjustments. This is the intended end goal of this patch set overall and verifier logic is enhanced in subsequent patches in this series to handle range vs range operations, at which point selftests are extended to validate these conditions as well. For now it's range vs const cases only. Note that tests are split into multiple groups by their numeric types for initialization of ranges and for comparison operation. This allows to use test_progs's -j parallelization to speed up tests, as we now have 16 groups of parallel running tests. Overall reduction of running time that allows is pretty good, we go down from more than 30 minutes to slightly less than 5 minutes running time. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Acked-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20231112010609.848406-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit cf5fe3c71c5a34ac0108afc550407c672d0a032d Author: Andrii Nakryiko Date: Sat Nov 11 17:06:02 2023 -0800 bpf: make __reg{32,64}_deduce_bounds logic more robust This change doesn't seem to have any effect on selftests and production BPF object files, but we preemptively try to make it more robust. First, "learn sign from signed bounds" comment is misleading, as we are learning not just sign, but also values. Second, we simplify the check for determining whether entire range is positive or negative similarly to other checks added earlier, using appropriate u32/u64 cast and single comparisons. As explain in comments in __reg64_deduce_bounds(), the checks are equivalent. Last but not least, smin/smax and s32_min/s32_max reassignment based on min/max of both umin/umax and smin/smax (and 32-bit equivalents) is hard to explain and justify. We are updating unsigned bounds from signed bounds, why would we update signed bounds at the same time? This might be correct, but it's far from obvious why and the code or comments don't try to justify this. Given we've added a separate deduction of signed bounds from unsigned bounds earlier, this seems at least redundant, if not just wrong. In short, we remove doubtful pieces, and streamline the rest to follow the logic and approach of the rest of reg_bounds_sync() checks. Acked-by: Shung-Hsi Yu Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231112010609.848406-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 3cf98cf594ea923b8b1e0385b580d3d8aae68c06 Author: Andrii Nakryiko Date: Sat Nov 11 17:06:01 2023 -0800 bpf: remove redundant s{32,64} -> u{32,64} deduction logic Equivalent checks were recently added in more succinct and, arguably, safer form in: - f188765f23a5 ("bpf: derive smin32/smax32 from umin32/umax32 bounds"); - 2e74aef782d3 ("bpf: derive smin/smax from umin/max bounds"). The checks we are removing in this patch set do similar checks to detect if entire u32/u64 range has signed bit set or not set, but does it with two separate checks. Further, we forcefully overwrite either smin or smax (and 32-bit equvalents) without applying normal min/max intersection logic. It's not clear why that would be correct in all cases and seems to work by accident. This logic is also "gated" by previous signed -> unsigned derivation, which returns early. All this is quite confusing and seems error-prone, while we already have at least equivalent checks happening earlier. So remove this duplicate and error-prone logic to simplify things a bit. Acked-by: Shung-Hsi Yu Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231112010609.848406-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 5f99f312bd3bedb3b266b0d26376a8c500cdc97f Author: Andrii Nakryiko Date: Sat Nov 11 17:06:00 2023 -0800 bpf: add register bounds sanity checks and sanitization Add simple sanity checks that validate well-formed ranges (min <= max) across u64, s64, u32, and s32 ranges. Also for cases when the value is constant (either 64-bit or 32-bit), we validate that ranges and tnums are in agreement. These bounds checks are performed at the end of BPF_ALU/BPF_ALU64 operations, on conditional jumps, and for LDX instructions (where subreg zero/sign extension is probably the most important to check). This covers most of the interesting cases. Also, we validate the sanity of the return register when manually adjusting it for some special helpers. By default, sanity violation will trigger a warning in verifier log and resetting register bounds to "unbounded" ones. But to aid development and debugging, BPF_F_TEST_SANITY_STRICT flag is added, which will trigger hard failure of verification with -EFAULT on register bounds violations. This allows selftests to catch such issues. veristat will also gain a CLI option to enable this behavior. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Acked-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20231112010609.848406-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit be41a203bb9e0159099e189e510388fe61962eb8 Author: Andrii Nakryiko Date: Sat Nov 11 17:05:59 2023 -0800 bpf: enhance BPF_JEQ/BPF_JNE is_branch_taken logic Use 32-bit subranges to prune some 64-bit BPF_JEQ/BPF_JNE conditions that otherwise would be "inconclusive" (i.e., is_branch_taken() would return -1). This can happen, for example, when registers are initialized as 64-bit u64/s64, then compared for inequality as 32-bit subregisters, and then followed by 64-bit equality/inequality check. That 32-bit inequality can establish some pattern for lower 32 bits of a register (e.g., s< 0 condition determines whether the bit #31 is zero or not), while overall 64-bit value could be anything (according to a value range representation). This is not a fancy quirky special case, but actually a handling that's necessary to prevent correctness issue with BPF verifier's range tracking: set_range_min_max() assumes that register ranges are non-overlapping, and if that condition is not guaranteed by is_branch_taken() we can end up with invalid ranges, where min > max. [0] https://lore.kernel.org/bpf/CACkBjsY2q1_fUohD7hRmKGqv1MV=eP2f6XK8kjkYNw7BaiF8iQ@mail.gmail.com/ Acked-by: Shung-Hsi Yu Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231112010609.848406-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 96381879a370425a30b810906946f64c0726450e Author: Andrii Nakryiko Date: Sat Nov 11 17:05:58 2023 -0800 bpf: generalize is_scalar_branch_taken() logic Generalize is_branch_taken logic for SCALAR_VALUE register to handle cases when both registers are not constants. Previously supported vs cases are a natural subset of more generic vs set of cases. Generalized logic relies on straightforward segment intersection checks. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Acked-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20231112010609.848406-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 67420501e8681ae18f9f0ea0a69cd2f432100e70 Author: Andrii Nakryiko Date: Sat Nov 11 17:05:57 2023 -0800 bpf: generalize reg_set_min_max() to handle non-const register comparisons Generalize bounds adjustment logic of reg_set_min_max() to handle not just register vs constant case, but in general any register vs any register cases. For most of the operations it's trivial extension based on range vs range comparison logic, we just need to properly pick min/max of a range to compare against min/max of the other range. For BPF_JSET we keep the original capabilities, just make sure JSET is integrated in the common framework. This is manifested in the internal-only BPF_JSET + BPF_X "opcode" to allow for simpler and more uniform rev_opcode() handling. See the code for details. This allows to reuse the same code exactly both for TRUE and FALSE branches without explicitly handling both conditions with custom code. Note also that now we don't need a special handling of BPF_JEQ/BPF_JNE case none of the registers are constants. This is now just a normal generic case handled by reg_set_min_max(). To make tnum handling cleaner, tnum_with_subreg() helper is added, as that's a common operator when dealing with 32-bit subregister bounds. This keeps the overall logic much less noisy when it comes to tnums. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Acked-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20231112010609.848406-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 23ec6972865b59d2f58a1aafd12b108b4dd6caa1 Author: Tariq Toukan Date: Mon Oct 9 09:17:44 2023 +0300 net/mlx5e: Remove early assignment to netdev->features The netdev->features is initialized to netdev->hw_features at a later point in the flow. Remove any redundant earlier assignment. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed commit b2a62e56b173ceb153cc1651189c537ebb5345cc Author: Or Har-Toov Date: Mon Oct 16 18:00:00 2023 +0300 net/mlx5e: Add local loopback counter to vport rep stats Add counter for number of unicast, multicast and broadcast packets/ octets that were loopback. Signed-off-by: Or Har-Toov Reviewed-by: Patrisious Haddad Signed-off-by: Saeed Mahameed commit 4aea6a6d61cd6e3df9ed98345638abad1b1e5276 Author: Rahul Rameshbabu Date: Thu Mar 30 15:05:38 2023 -0700 net/mlx5: Query maximum frequency adjustment of the PTP hardware clock Some mlx5 devices do not support the default advertised maximum frequency adjustment value for the PTP hardware clock that is set by the driver. These devices need to be queried when initializing the clock functionality in order to get the maximum supported frequency adjustment value. This value can be greater than the minimum supported frequency adjustment across mlx5 devices (50 million ppb). Signed-off-by: Rahul Rameshbabu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 78c1b26754d9df062c3c8e08f5d6427967e3ba4b Author: Rahul Rameshbabu Date: Thu Aug 24 20:29:50 2023 -0700 net/mlx5: Convert scaled ppm values outside the s32 range for PHC frequency adjustments Represent scaled ppm as ppb to the device when the value in scaled ppm is not representable as a 32-bit signed integer. mlx5 devices only support a 32-bit field for the frequency adjustment value in units of either scaled ppm or ppb. Since mlx5 devices only support a 32-bit field for the frequency adjustment value independent of unit used, limit the maximum frequency adjustment to S32_MAX ppb. Signed-off-by: Rahul Rameshbabu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 4395d9de4e21376dcd5592fdf9627beaa8609055 Author: Rahul Rameshbabu Date: Mon Jul 17 12:10:42 2023 -0700 net/mlx5: Initialize clock->ptp_info inside mlx5_init_timer_clock Configure the PHC inside mlx5_init_timer_clock for calling mlx5_ptp_settime later in the function. Would previously use mlx5_ptp_clock_info instance to invoke mlx5_ptp_settime to set the NIC real-time clock to be synchronized with the host system clock. Signed-off-by: Rahul Rameshbabu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 330af90c4b43bdcc2a49b221bdd996afd3a0abb6 Author: Rahul Rameshbabu Date: Mon Jul 17 11:40:21 2023 -0700 net/mlx5: Refactor real time clock operation checks for PHC Check if the MTUTC register of the NIC can be modified before attempting to execute a real-time clock operation. Previous implementation aborted the real-time clock operation pre-emptively when the MTUTC register used to control the real-time clock was not modifiable, indicating real-time clock mode was not enabled on the NIC. The original control flow was confusing since the noop-if-RTC-disabled branch looked similar to an error handling guard clause. The purpose of this patch is purely for improving readability and should lead to no functional change. Signed-off-by: Rahul Rameshbabu Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 88e928b22930343eaad8eefdcba096cdba247ef2 Author: Gal Pressman Date: Tue Oct 24 14:42:59 2023 +0300 net/mlx5e: Access array with enum values instead of magic numbers Access the headers array using pedit_cmd enum values, and don't assume anything about their values. Signed-off-by: Gal Pressman Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 10b49d0e76513a6f6890f321a10a2df0b779c761 Author: Justin Stitt Date: Wed Oct 11 21:29:57 2023 +0000 net/mlx5: simplify mlx5_set_driver_version string assignments In total, just assigning this version string takes: (1) strncpy()'s (5) strlen()'s (3) strncat()'s (1) snprintf()'s (4) max_t()'s Moreover, `strncpy` is deprecated [1] and `strncat` really shouldn't be used either [2]. With this in mind, let's simply use a single `snprintf`. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://elixir.bootlin.com/linux/v6.6-rc5/source/include/linux/fortify-string.h#L448 [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Cc: Kees Cook Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Signed-off-by: Saeed Mahameed commit 9454e56433924af11451795b67d084eb14c1027f Author: Kees Cook Date: Tue Oct 3 16:17:30 2023 -0700 net/mlx5: Annotate struct mlx5_flow_handle with __counted_by Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct mlx5_flow_handle. Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Cc: linux-rdma@vger.kernel.org Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci [1] Signed-off-by: Kees Cook Reviewed-by: Justin Stitt Reviewed-by: Gustavo A. R. Silva Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 0f452a862a9f4eef172e9e66d828343b611190ee Author: Kees Cook Date: Tue Oct 3 16:17:22 2023 -0700 net/mlx5: Annotate struct mlx5_fc_bulk with __counted_by Prepare for the coming implementation by GCC and Clang of the __counted_by attribute. Flexible array members annotated with __counted_by can have their accesses bounds-checked at run-time via CONFIG_UBSAN_BOUNDS (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family functions). As found with Coccinelle[1], add __counted_by for struct mlx5_fc_bulk. Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: netdev@vger.kernel.org Cc: linux-rdma@vger.kernel.org Link: https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci [1] Signed-off-by: Kees Cook Reviewed-by: Justin Stitt Reviewed-by: Gustavo A. R. Silva Reviewed-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 312eb3fd624495fef4f1c987e21a44a5e4fb6088 Author: Amir Tzin Date: Wed Sep 6 13:40:38 2023 +0300 net/mlx5e: Some cleanup in mlx5e_tc_stats_matchall() Function mlx5e_tc_stats_matchall() is only called from one file: drivers/net/ethernet/mellanox/mlx5/core/en/rep/tc.c Move it there and make it static as exposing it is unnecessary. Also variable cur_stats is redundant. Remove it and avoid superfluous copy. This patch does not change functionality. Reviewed-by: Patrisious Haddad Signed-off-by: Amir Tzin Signed-off-by: Saeed Mahameed commit cecf44ea1a1ffcc9158f746f391aa12fba953453 Author: Moshe Shemesh Date: Mon Jun 12 19:09:25 2023 +0300 net/mlx5: Allow sync reset flow when BF MGT interface device is present In sync reset flow, PF is checking that only devices of same device ID as itself present on the PCIe bridge, otherwise it will NACK the reset. Since the PCIe bridge connection to NIC card has to be 1 to 1, this is valid. However, the BlueField device may also expose another sub-device to the PCI called management interface, which only provides an ethernet channel between the host and the smart NIC. Allow sync reset flow also when management interface sub-device present when checking devices on the PCIe bridge. Signed-off-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 7b2bfd4ebf796ec4c5ff86b2531b26766ab2fd61 Author: Moshe Shemesh Date: Wed Sep 6 12:18:05 2023 +0300 net/mlx5: print change on SW reset semaphore returns busy While collecting crdump as part of fw_fatal health reporter dump the PF may fail to lock the SW reset semaphore. Change the print to indicate if it was due to another PF locked the semaphore already and so trying to lock the semaphore returned -EBUSY. Signed-off-by: Moshe Shemesh Reviewed-by: Shay Drory Signed-off-by: Saeed Mahameed commit acbf6de674ef7b1b5870b25e7b3c695bf84273d0 Author: Ji Sheng Teoh Date: Fri Nov 3 16:24:41 2023 +0800 perf vendor events riscv: Add StarFive Dubhe-80 JSON file StarFive's Dubhe-80 supports raw event id 0x00 - 0x22. The raw events are enabled through PMU node of DT binding. Besides raw event, add standard RISC-V firmware events to support monitoring of firmware event. Example of PMU DT node: pmu { compatible = "riscv,pmu"; riscv,raw-event-to-mhpmcounters = /* Event ID 1-31 */ <0x00 0x00 0xFFFFFFFF 0xFFFFFFE0 0x00007FF8>, /* Event ID 32-33 */ <0x00 0x20 0xFFFFFFFF 0xFFFFFFFE 0x00007FF8>, /* Event ID 34 */ <0x00 0x22 0xFFFFFFFF 0xFFFFFF22 0x00007FF8>; }; Example of 'perf stat' output: [root@user]# perf stat -a \ -e access_mmu_stlb \ -e miss_mmu_stlb \ -e access_mmu_pte_c \ -e rob_flush \ -e btb_prediction_miss \ -e itlb_miss \ -e sync_del_fetch_g \ -e icache_miss \ -e bpu_br_retire \ -e bpu_br_miss \ -e ret_ins_retire \ -e ret_ins_miss \ -- openssl speed rsa2048 Doing 2048 bits private rsa's for 10s: 39 2048 bits private RSA's in 10.14s Doing 2048 bits public rsa's for 10s: 1563 2048 bits public RSA's in 10.00s version: 3.0.11 built on: Tue Sep 19 13:02:31 2023 UTC options: bn(64,64) CPUINFO: N/A sign verify sign/s verify/s rsa 2048 bits 0.260000s 0.006398s 3.8 156.3 Performance counter stats for 'system wide': 1338350 access_mmu_stlb 1154025 miss_mmu_stlb 1162691 access_mmu_pte_c 34067 rob_flush 11212384 btb_prediction_miss 1256242 itlb_miss 652523491 sync_del_fetch_g 384465 icache_miss 64635789 bpu_br_retire 323440 bpu_br_miss 8785143 ret_ins_retire 31236 ret_ins_miss 20.760822480 seconds time elapsed Reviewed-by: Ian Rogers Signed-off-by: Ji Sheng Teoh Cc: Adrian Hunter Cc: Albert Ou Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Ley Foon Tan Cc: Mark Rutland Cc: Namhyung Kim Cc: Nikita Shubin Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Peter Zijlstra Cc: linux-riscv@lists.infradead.org Link: https://lore.kernel.org/r/20231103082441.1389842-1-jisheng.teoh@starfivetech.com Signed-off-by: Arnaldo Carvalho de Melo commit b539deafbadb2fc6ba79307a797196454b14f501 Author: Thomas Richter Date: Fri Nov 10 12:09:08 2023 +0100 perf report: Add s390 raw data interpretation for PAI counters Commit 39d62336f5c126ad ("s390/pai: add support for cryptography counters") added support for Processor Activity Instrumentation Facility (PAI) counters. These counters values are added as raw data with the perf sample during 'perf record'. Now add support to display these counters in the 'perf report' command. The counter number, its assigned name and value is now printed in addition to the hexadecimal output. Output before: # perf report -D 6 514766399626050 0x7b058 [0x48]: PERF_RECORD_SAMPLE(IP, 0x1): 303977/303977: 0 period: 1 addr: 0 ... thread: paitest:303977 ...... dso: 0x7b0a0@/root/perf.data.paicrypto [0x48]: event: 9 . . ... raw event: size 72 bytes . 0000: 00 00 00 09 00 01 00 48 00 00 00 00 00 00 00 00 .......H........ . 0010: 00 04 a3 69 00 04 a3 69 00 01 d4 2d 76 de a0 bb ...i...i...-v... . 0020: 00 00 00 00 00 01 5c 53 00 00 00 06 00 00 00 00 ......\S........ . 0030: 00 00 00 00 00 00 00 01 00 00 00 0c 00 07 00 00 ................ . 0040: 00 00 00 53 96 af 00 00 ...S.... Output after: # perf report -D 6 514766399626050 0x7b058 [0x48]: PERF_RECORD_SAMPLE(IP, 0x1): 303977/303977: 0 period: 1 addr: 0 ... thread: paitest:303977 ...... dso: 0x7b0a0@/root/perf.data.paicrypto [0x48]: event: 9 . . ... raw event: size 72 bytes . 0000: 00 00 00 09 00 01 00 48 00 00 00 00 00 00 00 00 .......H........ . 0010: 00 04 a3 69 00 04 a3 69 00 01 d4 2d 76 de a0 bb ...i...i...-v... . 0020: 00 00 00 00 00 01 5c 53 00 00 00 06 00 00 00 00 ......\S........ . 0030: 00 00 00 00 00 00 00 01 00 00 00 0c 00 07 00 00 ................ . 0040: 00 00 00 53 96 af 00 00 ...S.... Counter:007 km_aes_128 Value:0x00000000005396af <--- new Committer notes: Had to add ignore pragmas for that __packed function: +#pragma GCC diagnostic ignored "-Wpacked" +#pragma GCC diagnostic ignored "-Wattributes" Otherwise this doesn't build in things like debian experimentao cross building to mips64, etc. Signed-off-by: Thomas Richter Tested-by: Sumanth Korikkar Acked-by: Sumanth Korikkar Cc: Heiko Carstens Cc: Sven Schnelle Cc: Vasily Gorbik Link: https://lore.kernel.org/r/20231110110908.2312308-1-tmricht@linux.ibm.com [ Corrected non-existent commit referred to the right one: 39d62336f5c126ad ] Signed-off-by: Arnaldo Carvalho de Melo commit 7d646d5c50c60580530a5779bb250c3f277e8f77 Author: Fabio Estevam Date: Mon Nov 13 15:42:30 2023 -0300 dt-bindings: power: fsl,scu-pd: Document imx8dl imx8dxl also contains the SCU PD block. Add an entry for 'fsl,imx8dl-scu-pd'. Signed-off-by: Fabio Estevam Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231113184230.14413-1-festevam@gmail.com Signed-off-by: Rob Herring commit 8a5236acacb98f8d8dce1e440aa80caa9ffee29c Author: Luca Ceresoli Date: Mon Nov 6 14:03:24 2023 +0100 of: overlay: enable of_overlay_fdt_apply() kerneldoc of_overlay_fdt_apply() already has a kerneldoc-formatted documentation, except it is nor marked as such. Adding the second asterisk is enough for the documentation to take it into account correctly. Signed-off-by: Luca Ceresoli Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231106-of_overlay_fdt_apply-kerneldoc-v1-1-9a2d132bc6c1@bootlin.com Signed-off-by: Rob Herring commit 6767b6f4b461149c2f5320daf6a2ac25e36dff9e Author: Abel Vesa Date: Fri Nov 3 15:43:03 2023 -0700 dt-bindings: qcom,pdc: Add compatible for SM8550 Document the compatible for SM8550 PDC. Signed-off-by: Abel Vesa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/20231103224304.764730-1-quic_eberman@quicinc.com Signed-off-by: Rob Herring commit 7c8601aea3a5e8a829a73cc9e572309c12ce9aca Author: Imre Deak Date: Tue Nov 14 16:10:12 2023 +0200 drm/i915: Fix fractional bpp handling in intel_link_bw_reduce_bpp() Convert crtc_state->pipe_bpp to U6.4 format as expected by the rest of the function. Fixes: 59a266f068b4 ("drm/i915/display: Store compressed bpp in U6.4 format") Cc: Ankit Nautiyal Cc: Suraj Kandpal Cc: Sui Jingfeng Reviewed-by: Ankit Nautiyal Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231114141012.603960-1-imre.deak@intel.com commit 4e8714b76613e6284b263274d6dddcfac24be262 Author: Paul Moore Date: Wed Nov 15 12:09:17 2023 -0500 MAINTAINERS: update the audit entry Bring the audit subsystem entry up to date with the following changes: * Add our patchwork link. I'm not sure this is of much use for anyone but the maintainer, but there is a provision for including it here so we might as well include it. * Add a bug report URI. I suspect most everyone knows to send mail to the mailing list if they hit a bug, but let's make it official. * Add a link to the audit tree process/management documentation. While the doc exists both in the canonical kernel.org location and the GitHub mirror, provide a link to the mirror as GitHub does a better job rendering the Markdown. * Update the source tree's git URI to use https. * Aside from changes to the audit code itself, we also would like to be notified when the audit call sites are changed so we are adding an audit_XXX(...) regex to try and catch all of the callers. Signed-off-by: Paul Moore commit e246777e2a032934047ba9e106de1fb21e7a8402 Author: Paul Moore Date: Wed Nov 15 10:20:40 2023 -0500 MAINTAINERS: update the LSM entry Bring the LSM / "SECURITY SUBSYSTEM" entry up to date with the following changes: * Remove the "(suggested Cc:)" note on the mailing list. I don't really care if the LSM list is on the To: or Cc: line, I just want folks to include it when appropriate. * Remove the website link. The website isn't really maintained in any meaningful way so we're going to go ahead and remove it so we lessen the chance of conflicting or confusing information in the future. * Add our patchwork link. I'm not sure this is of much use for anyone but the maintainer, but there is a provision for including it here so we might as well include it. * Add a bug report URI. I suspect most everyone knows to send mail to the mailing list if they hit a bug, but let's make it official. * Add a link to the LSM tree process/management documentation. While the doc exists both in the canonical kernel.org location and the GitHub mirror, provide a link to the mirror as GitHub does a better job rendering the Markdown. * Update the source tree's git URI to use https. * Aside from changes to the LSM code itself, we also would like to be notified when the LSM call sites are changed so we are adding a security_XXX(...) regex to try and catch all of the callers. Signed-off-by: Paul Moore commit ccb9e9dd2a996f5814d7072b968b3d2f4b094188 Author: Krzysztof Kozlowski Date: Sat Nov 11 15:32:21 2023 +0100 dt-bindings: input: samsung,s6sy761: convert to DT schema Convert Samsung S6SY761 touchscreen controller bindings to DT schema. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20231111143221.55452-1-krzysztof.kozlowski@linaro.org Signed-off-by: Dmitry Torokhov commit 612905e13b8769caca7ec4194a8aceb24efa4d5c Author: Nikolay Borisov Date: Tue Nov 7 18:55:29 2023 +0200 x86/mce: Remove redundant check from mce_device_create() mce_device_create() is called only from mce_cpu_online() which in turn will be called iff MCA support is available. That is, at the time of mce_device_create() call it's guaranteed that MCA support is available. No need to duplicate this check so remove it. [ bp: Massage commit message. ] Signed-off-by: Nikolay Borisov Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20231107165529.407349-1-nik.borisov@suse.com commit 6a965ee1892a7a44f6d8f4a0b9fb5f775a8b4ccb Author: Tomas Henzl Date: Thu Oct 19 17:37:06 2023 +0200 scsi: mpt3sas: Suppress a warning in debug kernel The mpt3sas_ctl_exit() should be called after communication with the controller stops but currently it may cause false warnings about not released memory. Fix this by letting mpt3sas_ctl_exit() handle misc driver release per driver and release DMA in mpt3sas_ctl_release() per ioc. Signed-off-by: Tomas Henzl Link: https://lore.kernel.org/r/20231019153706.7967-1-thenzl@redhat.com Signed-off-by: Martin K. Petersen commit 4f6dd2a4bf378bc4d169296739ea7d6972c0d858 Author: Can Guo Date: Wed Nov 1 18:58:36 2023 -0700 scsi: ufs: ufs-sysfs: Expose UFS power info Having UFS power info available in sysfs makes it easier to tell the state of the link during runtime considering we have a bunch of power saving features and various combinations for backward compatibility. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Signed-off-by: Can Guo Link: https://lore.kernel.org/r/1698890324-7374-1-git-send-email-quic_cang@quicinc.com Reviewed-by: Avri Altman Signed-off-by: Martin K. Petersen commit 2aee050cefdaaab9e65ce0894e2a784aac15b70c Merge: b098cc463fa66 1f86b0d9c76c7 Author: Martin K. Petersen Date: Wed Nov 15 10:07:39 2023 -0500 Merge patch series "lpfc: Update lpfc to revision 14.2.0.16" Justin Tee says: Update lpfc to revision 14.2.0.16 This patch set contains a user input range check correction, static code analyzer fixes, refactoring of clean up code, and logging enhancements. The patches were cut against Martin's 6.7/scsi-queue tree. Link: https://lore.kernel.org/r/20231031191224.150862-1-justintee8345@gmail.com Signed-off-by: Martin K. Petersen commit b098cc463fa662f2bace293e0c6d3f5d9bcc10ab Merge: fd7090e384725 1057f44137c54 Author: Martin K. Petersen Date: Wed Nov 15 10:06:23 2023 -0500 Merge patch series "Replace deprecated strncpy() with strscpy()" A series of patches from Justin Stitt. Signed-off-by: Martin K. Petersen commit fd7090e384725edb1910a4b0a9c51007858f2c81 Merge: b85ea95d08647 e188215562727 Author: Martin K. Petersen Date: Wed Nov 15 10:04:03 2023 -0500 Merge patch series "scsi: mpt3sas: Use flexible arrays and do a few cleanups" James Seo says: Commit df8fc4e934c1 ("kbuild: Enable -fstrict-flex-arrays=3") has resulted in the only arrays that UBSAN_BOUNDS considers unbounded being trailing arrays declared with [] as the last member of a struct. Unbounded trailing arrays declared with [1] are common in mpt3sas, which is causing spurious warnings to appear in some situations, e.g. when more than one physical disk is connected: UBSAN: array-index-out-of-bounds in drivers/scsi/mpt3sas/mpt3sas_scsih.c:6810:36 index 1 is out of range for type 'MPI2_SAS_IO_UNIT0_PHY_DATA [1]' which relates to this unbounded array access: port_id = sas_iounit_pg0->PhyData[i].Port; and is just one example of 10 similar warnings currently occurring for me during boot. This series converts most trailing arrays declared with [1] in mptsas into proper C99 flexible array members. Those that are not unbounded and really are fixed-length arrays of length 1 are left alone. I didn't find any conversions that required further source edits besides changing [1] to [], and everything seems to work with my SAS2008-based add-in card, but please look things over in case I missed something subtle. Rounding out the series are some opportunistic cleanups. The only dependency is that patch 7 ("Use struct_size() for struct size calculations") depends on patches 3-5. Link: https://lore.kernel.org/r/20230806170604.16143-1-james@equiv.tech Signed-off-by: Martin K. Petersen commit 1f86b0d9c76c7e0a1a951850b9f251cc6e248279 Author: Justin Tee Date: Tue Oct 31 12:12:24 2023 -0700 scsi: lpfc: Copyright updates for 14.2.0.16 patches Update copyrights to 2023 for files modified in the 14.2.0.16 patch set. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231031191224.150862-10-justintee8345@gmail.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit c855e02b57edfc1b2fd42468e9224f9cf0de1e9e Author: Justin Tee Date: Tue Oct 31 12:12:23 2023 -0700 scsi: lpfc: Update lpfc version to 14.2.0.16 Update lpfc version to 14.2.0.16. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231031191224.150862-9-justintee8345@gmail.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit e6af45218755fa5ad29b3f0cbb37e299af723da0 Author: Justin Tee Date: Tue Oct 31 12:12:22 2023 -0700 scsi: lpfc: Enhance driver logging for selected discovery events Typically, debugging discovery issues requires the ndlp reference count, nlp flags, transport flags, and the io tag for root cause analysis. Modify important discovery log messages to include one or more of these attributes to aid in debugging and support. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231031191224.150862-8-justintee8345@gmail.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 349b1e2c1bdaf0bd00ac5065593563dbf6426fa6 Author: Justin Tee Date: Tue Oct 31 12:12:21 2023 -0700 scsi: lpfc: Refactor and clean up mailbox command memory free A lot of repeated clean up code exists when freeing mailbox commands in lpfc_mem_free_all(). Introduce a lpfc_mem_free_sli_mbox() helper routine to refactor the copy-paste code. Additionally, reinitialize the mailbox command structure context pointers to NULL in lpfc_sli4_mbox_cmd_free(). Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231031191224.150862-7-justintee8345@gmail.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 57ea41eb7fe6d6a6bf80f40de9acddb33b41eeb9 Author: Justin Tee Date: Tue Oct 31 12:12:20 2023 -0700 scsi: lpfc: Return early in lpfc_poll_eratt() when the driver is unloading Add a check in lpfc_poll_eratt() when the driver is unloading. There is no point to check for error attention events if the driver is rmmod'ed. If the driver is reloaded, as part of insmod initialization, then a fresh reset is always asserted to start clean and free of error attention events. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231031191224.150862-6-justintee8345@gmail.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit e07ac2d2aa5fce0cefe7273f6b9babec1e9a1503 Author: Justin Tee Date: Tue Oct 31 12:12:19 2023 -0700 scsi: lpfc: Eliminate unnecessary relocking in lpfc_check_nlp_post_devloss() In lpfc_check_nlp_post_devloss(), retaking of the ndlp lock in the if statement is useless because the very next line unlocks. Simply return to avoid relocking. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231031191224.150862-5-justintee8345@gmail.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 1dec1311b9b6cc9c5fd26a77b936f542f03c51d1 Author: Justin Tee Date: Tue Oct 31 12:12:18 2023 -0700 scsi: lpfc: Fix list_entry null check warning in lpfc_cmpl_els_plogi() Smatch called out a warning for null checking a ptr that is assigned by list_entry(). list_entry() does not return null and, if the list is empty, can return an invalid ptr. Thus, the !psrp check does not execute properly. drivers/scsi/lpfc/lpfc_els.c:2133 lpfc_cmpl_els_plogi() warn: list_entry() does not return NULL 'prsp' Replace list_entry() with list_get_first(), which does a list_empty() check before returning the first entry. Fixes: a3c3c0a806f1 ("scsi: lpfc: Validate ELS LS_ACC completion payload") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-scsi/01b7568f-4ab4-4d56-bfa6-9ecc5fc261fe@moroto.mountain/ Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231031191224.150862-4-justintee8345@gmail.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit f5779b529240b715f0e358489ad0ed933bf77c97 Author: Justin Tee Date: Tue Oct 31 12:12:17 2023 -0700 scsi: lpfc: Fix possible file string name overflow when updating firmware Because file_name and phba->ModelName are both declared a size 80 bytes, the extra ".grp" file extension could cause an overflow into file_name. Define a ELX_FW_NAME_SIZE macro with value 84. 84 incorporates the 4 extra characters from ".grp". file_name is changed to be declared as a char and initialized to zeros i.e. null chars. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231031191224.150862-3-justintee8345@gmail.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 2fe4b6a67730e6ffd002b2b3c4752ef262fedde4 Author: Justin Tee Date: Tue Oct 31 12:12:16 2023 -0700 scsi: lpfc: Correct maximum PCI function value for RAS fw logging Currently, the ras_fwlog_func sysfs parameter allows users to input a value greater than three when selecting a PCI function to enable RAS fw logging feature. The user's input is sanity checked in lpfc_sli4_ras_init(), but allowing an input greater than three doesn't make sense because the max number of ports per HBA is four. Change the allowable range from [0, 7] to [0, 3]. Signed-off-by: Justin Tee Link: https://lore.kernel.org/r/20231031191224.150862-2-justintee8345@gmail.com Reviewed-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 1057f44137c5484e402cc69d0ad9954e6cd7e029 Author: Justin Stitt Date: Thu Oct 26 01:53:13 2023 +0000 scsi: elx: libefc: Replace deprecated strncpy() with strscpy_pad()/memcpy() strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. To keep node->current_state_name and node->prev_state_name NUL-padded and NUL-terminated let's use strscpy_pad() as this implicitly provides both. For the swap between the two, a simple memcpy() will suffice. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20231026-strncpy-drivers-scsi-elx-libefc-efc_node-h-v2-1-5c083d0c13f4@google.com Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit 66d6143ebff038a69d875e582e536bae02b14290 Author: Andrei Coardos Date: Sun Nov 12 18:34:32 2023 -0800 gpio: sifive: remove unneeded call to platform_set_drvdata() This function call was found to be unnecessary as there is no equivalent platform_get_drvdata() call to access the private data of the driver. Also, the private data is defined in this driver, so there is no risk of it being accessed outside of this driver file. Reviewed-by: Alexandru Ardelean Signed-off-by: Andrei Coardos Reviewed-by: Andy Shevchenko Signed-off-by: Samuel Holland Signed-off-by: Bartosz Golaszewski commit 4592411784ccf83f873f98ba94aeae2482783c9a Author: Justin Stitt Date: Mon Oct 23 20:26:13 2023 +0000 scsi: csiostor: Replace deprecated strncpy() with strscpy() strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. 'hw' is kzalloc'd just before this string assignment: | hw = kzalloc(sizeof(struct csio_hw), GFP_KERNEL); ... which means any NUL-padding is redundant. Since CSIO_DRV_VERSION is a small string literal (smaller than sizeof(dest)): ... there is functionally no change in this swap from strncpy() to strscpy(). Nonetheless, let's make the change for robustness' sake -- as it will ensure that drv_version is _always_ NUL-terminated. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20231023-strncpy-drivers-scsi-csiostor-csio_init-c-v1-1-5ea445b56864@google.com Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit 9c6724abf969251af53cdae525ad8100ec78d3c2 Author: Tanmay Shah Date: Fri Oct 27 23:53:59 2023 +0530 soc: xilinx: fix unhandled SGI warning message Xen broadcasts SGI to each VM when multiple VMs run on Xen hypervisor. In such case spurious SGI is expected if one event is registered by one VM and not registered by another VM. We let users know that Unhandled SGI is not error and expected if kernel is running on Xen hypervisor. Signed-off-by: Tanmay Shah Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1698431039-2734260-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Michal Simek commit 4c0afac2dfa1e11bbea9ef69da5c3c2bfdfe4c43 Author: Michal Simek Date: Fri Oct 27 23:41:35 2023 +0530 soc: xilinx: fix quoted string split across lines Fix checkpatch warning "quoted string split across lines". No functional change. Signed-off-by: Michal Simek Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1698430295-2731040-1-git-send-email-radhey.shyam.pandey@amd.com commit dc7a7f10e673499856dd275691768df6d07a2815 Author: Justin Stitt Date: Mon Oct 23 20:20:14 2023 +0000 scsi: ch: Replace deprecated strncpy() with strscpy() strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. These labels get copied out to the user so lets make sure they are NUL-terminated and NUL-padded. vparams is already memset to 0 so we don't need to do any NUL-padding (like what strncpy() is doing). Considering the above, a suitable replacement is strscpy() [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Let's also opt to use the more idiomatic strscpy() usage of: (dest, src, sizeof(dest)) as this more closely ties the destination buffer to the length. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20231023-strncpy-drivers-scsi-ch-c-v1-1-dc67ba8075a3@google.com Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit daed80ed07580e5adc0e6d8bc79933a35154135a Author: HariBabu Gattem Date: Thu Oct 26 22:56:22 2023 -0700 soc: xilinx: Fix for call trace due to the usage of smp_processor_id() When preemption is enabled in kernel and if any task which can be preempted should not use smp_processor_id() directly, since CPU switch can happen at any time, the previous value of cpu_id differs with current cpu_id. As a result we see the below call trace during xlnx_event_manager_probe. [ 6.140197] dump_backtrace+0x0/0x190 [ 6.143884] show_stack+0x18/0x40 [ 6.147220] dump_stack_lvl+0x7c/0xa0 [ 6.150907] dump_stack+0x18/0x34 [ 6.154241] check_preemption_disabled+0x124/0x134 [ 6.159068] debug_smp_processor_id+0x20/0x2c [ 6.163453] xlnx_event_manager_probe+0x48/0x250 To protect cpu_id, It is recommended to use get_cpu()/put_cpu() to disable preemption, get the cpu_id and enable preemption respectively. (For Reference, Documentation/locking/preempt-locking.rst and Documentation/kernel-hacking/hacking.rst) Use preempt_disable()/smp_processor_id()/preempt_enable() API's to achieve the same. Signed-off-by: HariBabu Gattem Signed-off-by: Jay Buddhabhatti Link: https://lore.kernel.org/r/20231027055622.21544-1-jay.buddhabhatti@amd.com Signed-off-by: Michal Simek commit b04a2eff9e9c6f8890d25dbb073fbf5c00892a9a Author: Justin Stitt Date: Mon Oct 23 20:12:22 2023 +0000 scsi: bnx2fc: Replace deprecated strncpy() with strscpy() strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. We expect hba->chip_num to be NUL-terminated based on its usage with format strings: snprintf(fc_host_symbolic_name(lport->host), 256, "%s (QLogic %s) v%s over %s", BNX2FC_NAME, hba->chip_num, BNX2FC_VERSION, interface->netdev->name); Moreover, NUL-padding is not required as hba is zero-allocated from its callsite: hba = kzalloc(sizeof(*hba), GFP_KERNEL); Considering the above, a suitable replacement is strscpy() [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Regarding stats_addr->version, I've opted to also use strscpy() instead of strscpy_pad() as I typically see these XYZ_get_strings() pass zero-allocated data. I couldn't track all of where bnx2fc_ulp_get_stats() is used and if required, we could opt for strscpy_pad(). Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20231023-strncpy-drivers-scsi-bnx2fc-bnx2fc_fcoe-c-v1-1-a3736943cde2@google.com Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit 7936a19e944b934d21d79f1b90d478d1f7081b63 Author: Justin Stitt Date: Mon Oct 23 19:50:57 2023 +0000 scsi: 3w-sas: Replace deprecated strncpy() with strscpy() strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. This pattern of strncpy(dest, src, strlen(src)) is extremely bug-prone. This pattern basically never results in NUL-terminated destination strings unless `dest` was zero-initialized. The current implementation may be accidentally correct as tw_dev is zero-allocated via: host = scsi_host_alloc(&driver_template, sizeof(TW_Device_Extension)); ... tw_dev = shost_priv(host); ... wherein scsi_host_alloc() zero-allocates host: shost = kzalloc(sizeof(struct Scsi_Host) + privsize, GFP_KERNEL); Also, further suggesting this change is worthwhile is another strscpy() usage in 3w-9xxx.c: strscpy(tw_dev->tw_compat_info.driver_version, TW_DRIVER_VERSION, sizeof(tw_dev->tw_compat_info.driver_version)); Considering the above, a suitable replacement is strscpy() [2] due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Let's not be accidentally correct, let's be definitely correct. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Link: https://lore.kernel.org/r/20231023-strncpy-drivers-scsi-3w-sas-c-v1-1-4c40a1e99dfc@google.com Reviewed-by: Kees Cook Signed-off-by: Martin K. Petersen commit 79844118d6c1cd48bd2cfacbab67592e6bf32fe8 Author: Guoqing Jiang Date: Mon Nov 13 19:57:26 2023 +0800 RDMA/siw: Update comments for siw_qp_sq_process There is no siw_sq_work_handler in code, change it with siw_tx_thread since siw_run_sq -> siw_sq_resume -> siw_qp_sq_process. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-18-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit d9a5b48681315a5881cea24bc8f384da02828e88 Author: Guoqing Jiang Date: Mon Nov 13 19:57:25 2023 +0800 RDMA/siw: Introduce siw_destroy_cep_sock Add one helper to simplify code a bit. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310091735.oG7bTvLR-lkp@intel.com/` Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-17-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 788bbf4c2fc6e0c35bae9ed5068f484272539d3e Author: Guoqing Jiang Date: Mon Nov 13 19:57:24 2023 +0800 RDMA/siw: Only check attrs->cap.max_send_wr in siw_create_qp We can just check max_send_wr here given both max_send_wr and max_recv_wr are defined as u32 type, and we also need to ensure num_sqe (derived from max_send_wr) shouldn't be zero. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-16-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 3beced14d1998c8e0c5d3d78b2dd86255365e705 Author: Guoqing Jiang Date: Mon Nov 13 19:57:23 2023 +0800 RDMA/siw: Fix typo Replace ORRQ with ORQ. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-15-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit a410a7327870264da2a1a3eed704380053ffdf9f Author: Guoqing Jiang Date: Mon Nov 13 19:57:22 2023 +0800 RDMA/siw: Remove siw_sk_save_upcalls Let's move it into siw_sk_assign_cm_upcalls, then we only need to get sk_callback_lock once. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-14-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 77b59bd932a026b64303d313d966decb0e9225fa Author: Guoqing Jiang Date: Mon Nov 13 19:57:21 2023 +0800 RDMA/siw: Cleanup siw_accept With the initialization of rv and the two added label, we can simplifiy code a bit. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-13-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 08456d4db73bbb3fcaa0d63252ea2399c65297a4 Author: Guoqing Jiang Date: Mon Nov 13 19:57:20 2023 +0800 RDMA/siw: Introduce siw_free_cm_id Factor out a helper to simplify code. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310091656.JlrmcNXB-lkp@intel.com/ Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-12-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit b5c91543204c345f1b28af573854c4b7e699cc91 Author: Guoqing Jiang Date: Mon Nov 13 19:57:19 2023 +0800 RDMA/siw: Introduce siw_cep_set_free_and_put Add the helper which can be used in some places. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-11-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 25680c1f2614756463040f2dc03b3ec611ae3bfe Author: Guoqing Jiang Date: Mon Nov 13 19:57:18 2023 +0800 RDMA/siw: Add one parameter to siw_destroy_cpulist With that we can reuse it in siw_init_cpulist. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-10-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 6a343cc3bf2626bc0c487bf2a72c90b4519c3da4 Author: Guoqing Jiang Date: Mon Nov 13 19:57:17 2023 +0800 RDMA/siw: Introduce SIW_STAG_MAX_INDEX Add the macro to remove magic number in the code. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-9-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 60d2136db8780b080bb6d5c7bdb0522b49c4eac6 Author: Guoqing Jiang Date: Mon Nov 13 19:57:16 2023 +0800 RDMA/siw: Factor out siw_rx_data helper Remove the redundant code given they share the same logic. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-8-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 065186d228c5280d0390fde0e7ddba998e66f047 Author: Guoqing Jiang Date: Mon Nov 13 19:57:15 2023 +0800 RDMA/siw: No need to check term_info.valid before call siw_send_terminate Remove the redundate checking since siw_send_terminate check it inside. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-7-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 659da08ed83a67aec9d106e44d2d88c5963fb85a Author: Guoqing Jiang Date: Mon Nov 13 19:57:14 2023 +0800 RDMA/siw: Remove rcu from siw_qp Remove it since it is not used. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-6-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit d248960941b71ebc1b62bd3241744f8a5eadc3d7 Author: Guoqing Jiang Date: Mon Nov 13 19:57:13 2023 +0800 RDMA/siw: Remove goto lable in siw_mmap Let's remove it since the failure case only falls through to the useless label. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-5-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 2109ddf032ebc57e0cd43e4378474ea6f2a378c2 Author: Guoqing Jiang Date: Mon Nov 13 19:57:12 2023 +0800 RDMA/siw: Use iov.iov_len in kernel_sendmsg We can pass iov.iov_len here. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-4-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit a2b64565e8ea9530cce8e1c528f53ca888c0a45b Author: Guoqing Jiang Date: Mon Nov 13 19:57:11 2023 +0800 RDMA/siw: Introduce siw_update_skb_rcvd There are some places share the same logic, factor a common helper for it. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-3-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit 3a179fe34acbd55eb287377811b05fbeb749e52c Author: Guoqing Jiang Date: Mon Nov 13 19:57:10 2023 +0800 RDMA/siw: Introduce siw_get_page Add the wrapper function to get either pbl page or umem page. Acked-by: Bernard Metzler Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20231113115726.12762-2-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky commit b9a85e5eec126d6ae6c362f94b447c223e8fe6e4 Author: Leon Romanovsky Date: Mon Nov 13 11:28:02 2023 +0200 RDMA/usnic: Silence uninitialized symbol smatch warnings The patch 1da177e4c3f4: "Linux-2.6.12-rc2" from Apr 16, 2005 (linux-next), leads to the following Smatch static checker warning: drivers/infiniband/hw/mthca/mthca_cmd.c:644 mthca_SYS_EN() error: uninitialized symbol 'out'. drivers/infiniband/hw/mthca/mthca_cmd.c 636 int mthca_SYS_EN(struct mthca_dev *dev) 637 { 638 u64 out; 639 int ret; 640 641 ret = mthca_cmd_imm(dev, 0, &out, 0, 0, CMD_SYS_EN, CMD_TIME_CLASS_D); We pass out here and it gets used without being initialized. err = mthca_cmd_post(dev, in_param, out_param ? *out_param : 0, ^^^^^^^^^^ in_modifier, op_modifier, op, context->token, 1); It's the same in mthca_cmd_wait() and mthca_cmd_poll(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/533bc3df-8078-4397-b93d-d1f6cec9b636@moroto.mountain Link: https://lore.kernel.org/r/c559cb7113158c02d75401ac162652072ef1b5f0.1699867650.git.leon@kernel.org Signed-off-by: Leon Romanovsky commit e188215562727972cb49681b6ea56936455cf66e Author: James Seo Date: Sun Aug 6 10:06:04 2023 -0700 scsi: mpt3sas: Replace dynamic allocations with local variables mpt3sas_scsih.c:_scsih_scan_for_devices_after_reset() allocates and fetches a MPI2_CONFIG_PAGE_RAID_VOL_0 struct (Mpi2RaidVolPage0_t) and a MPI2_CONFIG_PAGE_RAID_VOL_1 struct (Mpi2RaidVolPage1_t), but does not include the terminal flexible array members in the struct size calculations, fetch those members, or otherwise use those members in any way. These dynamic allocations can be replaced with local variables. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-13-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit dde41e0c1cc2f81bfb5e4fc86ad66c2234c1878c Author: James Seo Date: Sun Aug 6 10:06:03 2023 -0700 scsi: mpt3sas: Replace a dynamic allocation with a local variable mpt3sas_base.c:_base_update_diag_trigger_pages() allocates and fetches a MPI2_CONFIG_PAGE_SASIOUNIT_1 struct (Mpi2SasIOUnitPage_t), but does not include the terminal flexible array member in the struct size calculation, fetch that member, or otherwise use that member in any way. This dynamic allocation can be replaced with a local variable. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-12-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit e5035459d302f4073546eed2bbd6ab55cfdfbcc8 Author: James Seo Date: Sun Aug 6 10:06:02 2023 -0700 scsi: mpt3sas: Fix typo of "TRIGGER" Change "TIGGER" to "TRIGGER" in struct names and typedefs. Reviewed-by: Kees Cook Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-11-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit 8a3db51e01d57786dcab8b9d70b3d1287d95245a Author: James Seo Date: Sun Aug 6 10:06:01 2023 -0700 scsi: mpt3sas: Fix an outdated comment May reduce confusion for users of MPI2_CONFIG_PAGE_IO_UNIT_3::GPIOVal[]. Fixes: a1c4d7741323 ("scsi: mpt3sas: Replace unnecessary dynamic allocation with a static one") Reviewed-by: Kees Cook Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-10-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit 66f2a53fc620d2db7099f85fbe6c0af061d6f63f Author: James Seo Date: Sun Aug 6 10:06:00 2023 -0700 scsi: mpt3sas: Remove the iounit_pg8 member of the per-adapter struct The per-adapter struct (struct MPT3SAS_ADAPTER) contains a MPI2_CONFIG_PAGE_IO_UNIT_8 (Mpi2IOUnitPage8_t) iounit_pg8 member that is populated by mpt3sas_base.c:_base_static_config_pages(). As the name of that function indicates, the iounit_pg8 member represents a static configuration page data structure that rarely changes, and is among several such static config pages that are currently being fetched once per adapter per init (or reset) and copied to the per-adapter struct for later use. However, unlike the other static config pages, the iounit_pg8 member is never actually used outside of _base_static_config_pages(). Also, Mpi2IOUnitPage8_t has a flexible array member, making its presence in the _middle_ of the per-adapter struct rather strange. Remove this member from the per-adapter struct and fix up the portion of _base_static_config_pages() that uses it. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-9-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit f4f76e141769d7be10d801706858e89cf299c250 Author: James Seo Date: Sun Aug 6 10:05:59 2023 -0700 scsi: mpt3sas: Use struct_size() for struct size calculations After converting terminal variable arrays into flexible array members, use the bounds-checking struct_size() helper when possible to avoid open-coded arithmetic struct size calculations. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-8-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit 1f1126609969496bec23c366f83d843db6d7854c Author: James Seo Date: Sun Aug 6 10:05:58 2023 -0700 scsi: mpt3sas: Make MPI26_CONFIG_PAGE_PIOUNIT_1::PhyData[] a flexible array This terminal 1-length variable array can be directly converted into a C99 flexible array member. As all users of MPI26_CONFIG_PAGE_PIOUNIT_1 (Mpi26PCIeIOUnitPage1_t) do not use PhyData[], no further source changes are required to accommodate its reduced sizeof(): - mpt3sas_config.c:mpt3sas_config_get_pcie_iounit_pg1() fetches a Mpi26PCIeIOUnitPage1_t into a caller-provided buffer, and may fetch and write PhyData[] into that buffer depending on its sz argument. It has one caller: - mpt3sas_base.c:_base_assign_fw_reported_qd() passes sizeof(Mpi26PCIeIOUnitPage1_t) as sz, but does not use PhyData[]. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-7-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit e249a957ce43b7da365ea0bddbeaec04e4cc3ad0 Author: James Seo Date: Sun Aug 6 10:05:57 2023 -0700 scsi: mpt3sas: Make MPI2_CONFIG_PAGE_SASIOUNIT_1::PhyData[] a flexible array This terminal 1-length variable array can be directly converted into a C99 flexible array member. As all users of MPI2_CONFIG_PAGE_SASIOUNIT_1 (Mpi2SasIOUnitPage1_t) either calculate its size without depending on its sizeof() or do not use PhyData[], no further source changes are required: - mpt3sas_config.c:mpt3sas_config_get_sas_iounit_pg1() fetches a Mpi2SasIOUnitPage1_t into a caller-provided buffer, and may fetch and write PhyData[] into that buffer depending on its sz argument. Its callers: - mpt3sas_base.c:_base_assign_fw_reported_qd() passes sizeof(Mpi2SasIOUnitPage1_t) as sz, but does not use PhyData[]. - mpt3sas_base.c:mpt3sas_base_update_missing_delay(), mpt3sas_scsih.c:_scsih_sas_host_add(), mpt3sas_transport.c:_transport_phy_enable(), and mpt3sas_transport.c:_transport_phy_speed() all calculate sz independently of sizeof(Mpi2SasIOUnitPage1_t) and allocate a suitable buffer before calling mpt3sas_config_get_sas_iounit_pg1() and using PhyData[]. - mpt3sas_config.c:mpt3sas_config_set_sas_iounit_pg1() writes the contents of a caller-provided buffer to the adapter, with the size of the write depending on its sz argument. Its callers: - mpt3sas_base.c:mpt3sas_base_update_missing_delay(), mpt3sas_transport.c:_transport_phy_enable(), and mpt3sas_transport.c:_transport_phy_speed() have all previously called mpt3sas_config_get_sas_iounit_pg1() to obtain a Mpi2SasIOUnitPage1_t, and are merely writing back this same struct with the same previously calculated sz. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-6-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit dccc1e3ed9e3c613fa9f4b335d12cab89e2273c1 Author: James Seo Date: Sun Aug 6 10:05:56 2023 -0700 scsi: mpt3sas: Make MPI2_CONFIG_PAGE_SASIOUNIT_0::PhyData[] a flexible array This terminal 1-length variable array can be directly converted into a C99 flexible array member. As all users of MPI2_CONFIG_PAGE_SASIOUNIT_0 (Mpi2SasIOUnitPage0_t) either calculate its size without depending on its sizeof() or do not use PhyData[], no further source changes are required: - mpt3sas_config.c:mpt3sas_config_get_number_hba_phys() fetches a Mpi2SasIOUnitPage0_t for itself, but does not use PhyData[]. - mpt3sas_config.c:mpt3sas_config_get_sas_iounit_pg0() fetches a Mpi2SasIOUnitPage0_t into a caller-provided buffer, and may fetch and write PhyData[] into that buffer depending on its sz argument. Its callers: - mpt3sas_scsih.c:_scsih_update_vphys_after_reset(), mpt3sas_scsih.c:_scsih_get_port_table_after_reset(), mpt3sas_scsih.c:_scsih_sas_host_refresh(), mpt3sas_scsih.c:_scsih_sas_host_add(), and mpt3sas_transport.c:_transport_phy_enable() all calculate sz independently of sizeof(Mpi2SasIOUnitPage0_t) and allocate a suitable buffer before calling mpt3sas_config_get_sas_iounit_pg0() and using PhyData[]. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-5-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit cb7c03c5d3574f9edfcb17d207d56500690ac0ad Author: James Seo Date: Sun Aug 6 10:05:55 2023 -0700 scsi: mpt3sas: Make MPI2_CONFIG_PAGE_RAID_VOL_0::PhysDisk[] a flexible array This terminal 1-length variable array can be directly converted into a C99 flexible array member. As all users of MPI2_CONFIG_PAGE_RAID_VOL_0 (Mpi2RaidVolPage0_t) either calculate its size without depending on its sizeof() or do not use PhysDisk[], no further source changes are required: - mpt3sas_config.c:mpt3sas_config_get_number_pds() fetches a Mpi2RaidVolPage0_t for itself, but does not use PhysDisk[]. - mpt3sas_config.c:mpt3sas_config_get_raid_volume_pg0() fetches a Mpi2RaidVolPage0_t into a caller-provided buffer, and may fetch and write PhysDisk[] into that buffer depending on its sz argument. Its callers: - mpt3sas_scsih.c:scsih_get_resync(), mpt3sas_scsih.c:scsih_get_state(), mpt3sas_scsih.c:_scsih_search_responding_raid_devices(), and mpt3sas_scsih.c:_scsih_scan_for_devices_after_reset() all pass sizeof(Mpi2RaidVolPage0_t) as sz, but do not use PhysDisk[]. - mpt3sas_scsih.c:_scsih_get_volume_capabilities() and mpt3sas_warpdrive.c:mpt3sas_init_warpdrive_properties() both calculate sz independently of sizeof(Mpi2RaidVolPage0_t) and allocate a suitable buffer before calling mpt3sas_config_get_raid_volume_pg0() and using PhysDisk[]. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-4-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit f7830af68eb66d1db193129918036eb98708e6a5 Author: James Seo Date: Sun Aug 6 10:05:54 2023 -0700 scsi: mpt3sas: Make MPI2_CONFIG_PAGE_IO_UNIT_8::Sensor[] a flexible array This terminal 1-length variable array can be directly converted into a C99 flexible array member. As all users of MPI2_CONFIG_PAGE_IO_UNIT_8 (Mpi2IOUnitPage8_t) do not use Sensor[], no further source changes are required to accommodate its reduced sizeof(): - mpt3sas_config.c:mpt3sas_config_get_iounit_pg8() fetches a Mpi2IOUnitPage8_t into a caller-provided buffer, assuming sizeof(Mpi2IOUnitPage8_t) as the buffer size. It has one caller: - mpt3sas_base.c:_base_static_config_pages() passes the address of the Mpi2IOUnitPage8_t iounit_pg8 member of the per-adapter struct (struct MPT3SAS_ADAPTER *ioc) as the buffer. The assumed buffer size is therefore correct. However, the only subsequent use in mpt3sas of the thus populated ioc->iounit_pg8 is a little further on in the same function, and this use does not involve ioc->iounit_pg8.Sensor[]. Note that iounit_pg8 occurs in the middle of the per-adapter struct, not at the end. The per-adapter struct is extensively used throughout mpt3sas even if its iounit_pg8 member isn't, resulting in an especially large amount of noise when comparing binary changes attributable to this commit. Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-3-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit aa4db51bbd51654e215905f384eecf22327bafa9 Author: James Seo Date: Sun Aug 6 10:05:53 2023 -0700 scsi: mpt3sas: Use flexible arrays when obviously possible These terminal 1-length variable arrays can be directly converted into C99 flexible array members without any binary changes. In most cases, they belong to unused structs, or to structs used only by unused code. The remaining few coincidentally have their sizes calculated in roundabout ways that do not depend on the sizeof() their structs. Reviewed-by: Kees Cook Signed-off-by: James Seo Link: https://lore.kernel.org/r/20230806170604.16143-2-james@equiv.tech Tested-by: Borislav Petkov (AMD) Signed-off-by: Martin K. Petersen commit ef75c25e8fedbfcf07ae4223fb7cc9ea5fb342a7 Author: Animesh Manna Date: Wed Nov 8 12:53:03 2023 +0530 drm/i915/panelreplay: Debugfs support for panel replay Add debugfs support which will print source and sink status per connector basis. Existing i915_psr_status and i915_psr_sink_status will be used to get the source and sink status of panel replay. v1: Initial version. [rb-ed by Arun] v2: Added check for DP 2.0 and connector type in connector_debugfs_add(). v3: Optimization and cosmetic changes. [Jouni] Cc: Jouni Högander Cc: Arun R Murthy Cc: Jani Nikula Reviewed-by: Arun R Murthy Signed-off-by: Animesh Manna Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20231108072303.3414118-7-animesh.manna@intel.com commit f1013d8405af0f4fe1812b5901cbac9ce4d1fb6f Author: Uwe Kleine-König Date: Mon Sep 25 11:55:31 2023 +0200 soc/xilinx: zynqmp_power: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20230925095532.1984344-41-u.kleine-koenig@pengutronix.de Signed-off-by: Michal Simek commit 312292a4ee19dddcbc7cf58349596b6a7e39fcd0 Author: Thomas Zimmermann Date: Thu Nov 2 14:08:06 2023 +0100 drm/client: Do not acquire module reference Do not acquire a reference on the module that provides a client's callback functions in drm_client_init(). The additional reference prevents the user from unloading the callback functions' module and thus creating dangling pointers. This is only necessary if there is no direct dependency between the caller of drm_client_init() and the provider of the callbacks in struct drm_client_funcs. If this case ever existed, it has been removed from the DRM code. Callers of drm_client_init() also provide the callback implementation. The lifetime of the clients is tied to the dependency chain's outer-most module, which is the hardware's DRM driver. Before client helpers could be unloaded, the driver module would have to be unloaded, which also unregisters all clients. Driver modules that set up DRM clients can now be unloaded. Signed-off-by: Thomas Zimmermann Acked-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231102131056.7256-2-tzimmermann@suse.de commit daac53df6b56ce232fab41058ed567010b99c4ee Merge: 353ff168fb99c 92b022550ae55 Author: Krzysztof Kozlowski Date: Wed Nov 15 13:49:18 2023 +0100 Merge branch 'for-v6.8/samsung-bindings-compatibles' into next/dt64 commit ffb0399437ef582b035089d1617bbb0ea174cd0c Author: Radhey Shyam Pandey Date: Tue Oct 24 15:46:48 2023 +0200 microblaze: defconfig: Enable the Marvell phy driver Enable the marvell phy driver by default as it is commonly used PHY on multiple microblaze based evaluation boards. Signed-off-by: Radhey Shyam Pandey Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/3912fb168671dd5b418da8947ea1c463b554fa86.1698155190.git.michal.simek@amd.com commit 873b074050a8028634fb3d4fc95cc9a3a70d10bb Author: Raju Kumar Pothuraju Date: Tue Oct 24 15:46:47 2023 +0200 microblaze: Enable options to mount a rootfs via NFS Enable the options to mount a rootfs over NFS for microblaze platforms and also support for automatic configuration of IP addresses during boot as needed by NFS. Signed-off-by: Raju Kumar Pothuraju Reviewed-by: Radhey Shyam Pandey Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/d7bc1c93e485e0a6ab2c234a144402b7bd5f77bb.1698155190.git.michal.simek@amd.com commit a4d511aa24cab1a3175f0421f60fd81ea4721fd1 Author: Michal Simek Date: Tue Oct 24 15:46:46 2023 +0200 microblaze: Align defconfig with latest Kconfig layout Sync up patch. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/4414109ba26433f00b4c07f600162462ab6c7a93.1698155190.git.michal.simek@amd.com commit 92b022550ae55527b4ce8f8cae7863857c7b795a Author: Jaewon Kim Date: Wed Nov 15 18:56:04 2023 +0900 dt-bindings: hwinfo: samsung,exynos-chipid: add exynosautov920 compatible Add "samsung,exynosautov920-chipid" compatible string to binding document. Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231115095609.39883-9-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit 8bd05d4a86d5e1cec35dc7b8d1a5c0d925ecde1e Author: Jaewon Kim Date: Wed Nov 15 18:56:03 2023 +0900 dt-bindings: arm: samsung: Document exynosautov920 SADK board binding Add binding for the ExynosAutov920 SADK(Samsung Automotive Development Kit) board. Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231115095609.39883-8-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit d2d9e80a0ba6b1f507c14d6d8e2b833a474744d3 Author: Jaewon Kim Date: Wed Nov 15 18:56:01 2023 +0900 dt-bindings: pwm: samsung: add exynosautov920 compatible Add samsung,exynosautov920-pwm compatible string to binding document. Signed-off-by: Jaewon Kim Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231115095609.39883-6-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit 9433b8d8d35bd0b17d6e0df76ec135dd2fe63e7c Author: Jaewon Kim Date: Wed Nov 15 18:56:00 2023 +0900 dt-bindings: serial: samsung: add exynosautov920-uart compatible Add samsung,exynosautov9-uart dedicated compatible for representing uart of ExynosAutov920 SoC. Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231115095609.39883-5-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit 7a5e832d05025a3679d0fcd60584e6e946a3e358 Author: Jaewon Kim Date: Wed Nov 15 18:55:59 2023 +0900 dt-bindings: samsung: usi: add exynosautov920-usi compatible Add samsung,exynosautov920-usi dedicated compatible for representing USI of ExynosAutoV920 SoC. Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231115095609.39883-4-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit 705672285530cd513b5549f96f92b2a9fcd63017 Author: Jaewon Kim Date: Wed Nov 15 18:55:58 2023 +0900 dt-bindings: samsung: exynos-pmu: add exynosautov920 compatible Add samsung,exynosautov920-pmu compatible for representing pmu of ExynosAutov920 SoC. Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231115095609.39883-3-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit 20862a23260a3ab76ea5b425f93967d0683b28a2 Author: Jaewon Kim Date: Wed Nov 15 18:55:57 2023 +0900 dt-bindings: samsung: exynos-sysreg: add exynosautov920 sysreg Add compatible for ExynosAutov920 sysreg controllers. Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231115095609.39883-2-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit 4f2ffb1c3ffec70fc2c84accb1bf18831cbfce39 Author: Jaewon Kim Date: Wed Nov 15 18:56:02 2023 +0900 dt-bindings: pinctrl: samsung: add exynosautov920 Add compatible string for exynosautov920 pin controller. Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231115095609.39883-7-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit beea67c7c2ef161c6ee7ef4e39d842fc0be3995c Author: Jaewon Kim Date: Wed Nov 15 18:56:05 2023 +0900 soc: samsung: exynos-chipid: add exynosautov920 SoC support Add EXYNOSAUTOV920 information to soc_ids tables. This SoC product id is "0x0A920000". Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231115095609.39883-10-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit f740f031cce7703a966ad0279d0f15973d61df16 Author: Marco Pagani Date: Wed Nov 15 11:35:36 2023 +0100 drm/test: rearrange test entries in Kconfig and Makefile Rearrange entries in Kconfig and Makefile alphabetically to make room for additional KUnit test suites. Signed-off-by: Marco Pagani Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231115103537.220760-1-marpagan@redhat.com commit 353ff168fb99cf1ff9d8556692ce18f646ae8992 Author: Jaewon Kim Date: Fri Oct 27 13:03:37 2023 +0900 arm64: dts: exynos: add gpio-key node for exynosautov9-sadk ExynosAutov9 SADK board has 3 keys to test external GPIO interrupt. To support this, add 3 gpio-key(Wakeup, Volume Down, Volume Up) node. Signed-off-by: Jaewon Kim Link: https://lore.kernel.org/r/20231027040338.63088-1-jaewon02.kim@samsung.com Signed-off-by: Krzysztof Kozlowski commit b5acc262278f679bfb7479f817423180096acb8b Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:43 2023 +0100 arm64: dts: exynosautov9: add specific compatibles to several blocks ExynosAutov9 reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to ExynosAutov9 in front of all old-SoC-like compatibles. This will also help reviews of new code using existing DTS as template. No functional impact on Linux drivers behavior. Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20231108104343.24192-18-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit bce7af250d0fe16f088b27dc9682addb0236194b Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:42 2023 +0100 arm64: dts: exynos850: add specific compatibles to several blocks Exynos850 reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to Exynos850 in front of all old-SoC-like compatibles. This will also help reviews of new code using existing DTS as template. No functional impact on Linux drivers behavior. Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20231108104343.24192-17-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 0ffc692ad83625358bf382c072f6c0af609ba157 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:41 2023 +0100 arm64: dts: exynos7885: add specific compatibles to several blocks Exynos7885 reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to Exynos7885 in front of all old-SoC-like compatibles. This will also help reviews of new code using existing DTS as template. No functional impact on Linux drivers behavior. Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20231108104343.24192-16-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit ea9875b7d4aec65d39e17980fd682b5bd9068158 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:40 2023 +0100 arm64: dts: exynos7: add specific compatibles to several blocks Exynos7 reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to Exynos7 in front of all old-SoC-like compatibles. This will also help reviews of new code using existing DTS as template. No functional impact on Linux drivers behavior. Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20231108104343.24192-15-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit c226e8c5e716d89349a8b2b0b54fd1739a575ed0 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:39 2023 +0100 arm64: dts: exynos5433: add specific compatibles to several blocks Exynos5433 reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to Exynos5433 in front of all old-SoC-like compatibles. This will also help reviews of new code using existing DTS as template. No functional impact on Linux drivers behavior. Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20231108104343.24192-14-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 622018516aa581d25e86a0c8a7d3a6d749d35d0e Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:38 2023 +0100 dt-bindings: pwm: samsung: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Acked-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231108104343.24192-13-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit cb931ee571be5eacd50628e108e81c065c9cb5f6 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:37 2023 +0100 ASoC: dt-bindings: samsung-i2s: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Acked-by: Lee Jones Acked-by: Mark Brown Link: https://lore.kernel.org/r/20231108104343.24192-12-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit b709ff4da1beaab1c92df91c9023aad7388b84c4 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:36 2023 +0100 dt-bindings: iio: samsung,exynos-adc: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231108104343.24192-11-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 416231a9e38331c870da3bc84f3535e3d67cfb92 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:35 2023 +0100 dt-bindings: gpu: arm,mali-midgard: add specific compatibles for existing Exynos SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231108104343.24192-10-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 25737c24cb06c040a342072f93a42799a28432dc Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:34 2023 +0100 dt-bindings: samsung: exynos-pmu: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231108104343.24192-9-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 5436459961da39dd4025a52e65c39e589011667c Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:33 2023 +0100 dt-bindings: serial: samsung: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Re-shuffle also the entries in compatibles, so the one-compatible-enum is the first. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231108104343.24192-8-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 1d2c16e1ab98db04af2d1215d8dddcf5c09f57c4 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:32 2023 +0100 dt-bindings: rtc: s3c-rtc: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20231108104343.24192-7-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit b833eb26b628df899f110ebc17d0767e2544c406 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:31 2023 +0100 dt-bindings: pinctrl: samsung: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20231108104343.24192-6-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit e316dd1cf1358ff9c44b37c7be273a7dc4349986 Author: Jakub Kicinski Date: Tue Nov 14 00:11:42 2023 -0500 net: don't dump stack on queue timeout The top syzbot report for networking (#14 for the entire kernel) is the queue timeout splat. We kept it around for a long time, because in real life it provides pretty strong signal that something is wrong with the driver or the device. Removing it is also likely to break monitoring for those who track it as a kernel warning. Nevertheless, WARN()ings are best suited for catching kernel programming bugs. If a Tx queue gets starved due to a pause storm, priority configuration, or other weirdness - that's obviously a problem, but not a problem we can fix at the kernel level. Bite the bullet and convert the WARN() to a print. Before: NETDEV WATCHDOG: eni1np1 (netdevsim): transmit queue 0 timed out 1975 ms WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:525 dev_watchdog+0x39e/0x3b0 [... completely pointless stack trace of a timer follows ...] Now: netdevsim netdevsim1 eni1np1: NETDEV WATCHDOG: CPU: 0: transmit queue 0 timed out 1769 ms Alternatively we could mark the drivers which syzbot has learned to abuse as "print-instead-of-WARN" selectively. Reported-by: syzbot+d55372214aff0faa1f1f@syzkaller.appspotmail.com Reviewed-by: Jiri Pirko Reviewed-by: Eric Dumazet Reviewed-by: Jamal Hadi Salim Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8d5855a5af9255e15da85388ce796052cd880113 Merge: b3d8c6050481d c1056a59aee1d Author: David S. Miller Date: Wed Nov 15 10:07:40 2023 +0000 Merge branch 'bnxt_en-tx-improvements' Michael Chan says: ==================== bnxt_en: TX path improvements All patches in this patchset are related to improving the TX path. There are 2 areas of improvements: 1. The TX interrupt logic currently counts the number of TX completions to determine the number of TX SKBs to free. We now change it so that the TX completion will now contain the hardware consumer index information. The driver will keep track of the latest hardware consumer index from the last TX completion and clean up all TX SKBs up to that index. This scheme aligns better with future chips and allows xmit_more code path to be more optimized. 2. The current driver logic requires an additional MSIX for each additional MQPRIO TX ring. This scheme uses too many MSIX vectors if the user enables a large number of MQPRIO TCs. We now use a new scheme that will use the same MSIX for all the MQPRIO TX rings for each ethtool channel. Each ethtool TX channel can have up to 8 MQPRIO TX rings and now they all will share the same MSIX. v2: Rebased v1 posted on Oct 27 2023 right before the close of net-next: https://lore.kernel.org/netdev/20231027232252.36111-1-michael.chan@broadcom.com/ ==================== Signed-off-by: David S. Miller commit c1056a59aee1d352c7113c2cba4d214bf5f195af Author: Michael Chan Date: Mon Nov 13 16:16:21 2023 -0800 bnxt_en: Optimize xmit_more TX path Now that we use the cumulative consumer index scheme for TX completion, we don't need to have one TX completion per TX packet in the xmit_more code path. Set the TX_BD_FLAGS_NO_CMPL flag if xmit_more is true. Fallback to one interrupt per packet if the ring is filled beyond bp->tx_wake_thresh. Also, move the wmb() to bnxt_txr_db_kick(). When xmit_more is true, we'll skip the bnxt_txr_db_kick() call and there is no need to call wmb() to sync. the TX BD data. Reviewed-by: Somnath Kotur Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ba098017791eb8a0782b373d4cee0d82eb2f660e Author: Michael Chan Date: Mon Nov 13 16:16:20 2023 -0800 bnxt_en: Use existing MSIX vectors for all mqprio TX rings We can now fully support sharing the same MSIX for all mqprio TX rings belonging to the same ethtool channel with the new infrastructure: 1. Allocate the proper entries for cp_ring_arr in struct bnxt_cp_ring_info to support the additional TX rings. 2. Populate the tx_ring array in struct bnxt_napi for all TX rings sharing the same NAPI. 3. bnxt_num_tx_to_cp() returns the proper NQ/completion rings to support the TX rings in the input. 4. Adjust bnxt_get_num_ring_stats() for the reduced number of ring counters with the new scheme. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f07b58801befb2a9449f9cdc6a379c707ba7a35c Author: Michael Chan Date: Mon Nov 13 16:16:19 2023 -0800 bnxt_en: Add macros related to TC and TX rings Add 3 macros that handle to conversions between TC numbers and TX ring numbers. These will help to clarify the existing logic and the new logic in the next patch. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f5b29c6afe369f5f2ee3966a332b9e8f70609933 Author: Michael Chan Date: Mon Nov 13 16:16:18 2023 -0800 bnxt_en: Add helper to get the number of CP rings required for TX rings Up until now, each TX ring always requires a completion ring/NQ/MSIX. bnxt_trim_rings() and the assignment of bp->cp_nr_rings always make this assumption. This will no longer be true in the next patches, so we refactor and add helper functions to determine the proper relationship between TX rings and the required completion ring/NQ/MSIX. This patch does not change the 1:1 relationship yet. Note that on P5 chips, each RX and TX ring still requires a completion ring. Only the number of NQs has been reduced. We should no longer call bnxt_trim_rings() to adjust the RX and TX rings on P5 chips. Replace with simple logic to check that RX + TX < CP and adjust accordingly. bnxt_check_rings() should call _bnxt_get_max_rings() to get the raw number of rings instead of bnxt_get_max_rings(). If we are about to create TCs, bnxt_get_max_rings() would not be able to calculate the max rings correctly. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0589a1ed4d334c156110f7f42ad7c39a02761438 Author: Michael Chan Date: Mon Nov 13 16:16:17 2023 -0800 bnxt_en: Support up to 8 TX rings per MSIX For each mqprio TC, we allocate a set of TX rings to map to the new hardware CoS queue. Expand the tx_ring pointer in struct bnxt_napi to an array of 8 to support up to 8 TX rings, one for each TC. Only array entry 0 is used at this time. The rest of the array entries will be used in later patches. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 877edb347323b669c5c9511cc9e097e1192dd31b Author: Michael Chan Date: Mon Nov 13 16:16:16 2023 -0800 bnxt_en: Refactor bnxt_hwrm_set_coal() Add 2 helper functions to set coalescing for each RX and TX rings. This will make it easier to expand the number of TX rings per MSIX in the next patches. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 5a3c585fa83f9172848c19b1000c6ad3c8b36129 Author: Michael Chan Date: Mon Nov 13 16:16:15 2023 -0800 bnxt_en: New encoding for the TX opaque field In order to support multiple TX rings on the same MSIX, we'll use the upper byte of the TX opaque field to store the ring index in the new tx_napi_idx field. This tx_napi_idx field is currently always 0 until more infrastructure is added in later patches. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ebf72319cef6e1c038e13bd4c9e3f0ad857e57ff Author: Michael Chan Date: Mon Nov 13 16:16:14 2023 -0800 bnxt_en: Refactor bnxt_tx_int() bnxt_tx_int() processes the only one TX ring from the bnxt_napi pointer. To prepare for more TX rings associated with the bnxt_napi structure, add a new __bnxt_tx_int() function that takes the bnxt_tx_ring_info pointer to process that one TX ring. No functional change. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 9c0b06de6fb6f3b5871011aae19305b40084e037 Author: Michael Chan Date: Mon Nov 13 16:16:13 2023 -0800 bnxt_en: Remove BNXT_RX_HDL and BNXT_TX_HDL These 2 constants were used for the one RX and one TX completion ring pointer in the cpr->cp_ring_arr fixed array. Now that we've changed to allocating the array for the exact number of entries to support more TX rings, we no longer use these constants. The array index as well as the type of completion ring (RX/TX) are now encoded in the handle for the completion ring. This will allow us to locate the completion ring during NAPI for any number of completion rings sharing the same MSIX. In the following patches, we'll be adding support for more TX rings associated with the same MSIX vector. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 7845b8dfc7136752cdffe2acde43fa892ab4f0e0 Author: Michael Chan Date: Mon Nov 13 16:16:12 2023 -0800 bnxt_en: Add completion ring pointer in TX and RX ring structures From the TX or RX ring structure, we need to find the corresponding completion ring during initialization. On P5 chips, we use the MSIX/napi entry to locate the completion ring because there is only one RX/TX ring per MSIX. To allow multiple TX rings for each MSIX, we need to add a direct pointer from the TX ring and RX ring structures. This also simplifies the existing logic. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d1eec614100c25b96b672b50d3125ba3d120b682 Author: Michael Chan Date: Mon Nov 13 16:16:11 2023 -0800 bnxt_en: Restructure cp_ring_arr in struct bnxt_cp_ring_info The cp_ring_arr is currently a fixed array of 2 pointers for the TX and RX completion rings. These pointers are allocated during ring initialization. Currntly, we support up to 2 completion rings for each MSIX. In order to support more completion rings, we change this fixed array to a pointer and allocate the required entries during ring initialization. This patch keeps the current scheme of allocating only 2 entries when needed. Later patches will expand and allocate more entries when required. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 7f0a168b0441ef7fd6b46563efb2706c58ac2a4c Author: Michael Chan Date: Mon Nov 13 16:16:10 2023 -0800 bnxt_en: Add completion ring pointer in TX and RX ring structures From the TX or RX ring structure, we need to find the corresponding completion ring during initialization. On P5 chips, we use the MSIX/napi entry to locate the completion ring because there is only one RX/TX ring per MSIX. To allow multiple TX rings for each MSIX, we need to add a direct pointer from the TX ring and RX ring structures. This also simplifies the existing logic. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 34eec1f29a5998305578fcc3e55d491a1795b56d Author: Michael Chan Date: Mon Nov 13 16:16:09 2023 -0800 bnxt_en: Put the TX producer information in the TX BD opaque field Currently, the opaque field in the TX BD is only used for debugging. The TX completion logic relies on getting one TX completion for each packet and they always complete in order. Improve this scheme by putting the producer information (ring index plus number of BDs for the packet) in the opaque field. This way, we can handle TX completion processing by looking at the last TX completion instead of counting the number of completions. Since we no longer need to count the exact number of completions, we can optimize xmit_more by disabling TX completion when the xmit_more condition is true. This will be done in later patches. This patch is only initializing the opaque field in the TX BD and is not changing the driver's TX completion logic yet. Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3bf3e21c15d4386a5f15118ec39bbc1b67ea5759 Merge: 34b98a5f7a185 b85ea95d08647 Author: Maxime Ripard Date: Wed Nov 15 10:45:19 2023 +0100 Merge drm/drm-next into drm-misc-next Let's kickstart the v6.8 release cycle. Signed-off-by: Maxime Ripard commit 652ffc2104ec1f69dd4a46313888c33527145ccf Author: Greg KH Date: Mon Jun 12 15:09:09 2023 +0200 perf/core: Fix narrow startup race when creating the perf nr_addr_filters sysfs file Signed-off-by: Greg Kroah-Hartman Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/2023061204-decal-flyable-6090@gregkh commit 5d2d4a9f603a47403395408f64b1261ca61f6d50 Merge: 33744916196b4 889c58b3155ff Author: Peter Zijlstra Date: Wed Nov 15 10:15:40 2023 +0100 Merge branch 'tip/perf/urgent' Avoid conflicts, base on fixes. Signed-off-by: Peter Zijlstra commit e4ab322fbaaaf84b23d6cb0e3317a7f68baf36dc Author: Peter Zijlstra Date: Sun Sep 17 13:22:17 2023 +0200 cleanup: Add conditional guard support Adds: - DEFINE_GUARD_COND() / DEFINE_LOCK_GUARD_1_COND() to extend existing guards with conditional lock primitives, eg. mutex_trylock(), mutex_lock_interruptible(). nb. both primitives allow NULL 'locks', which cause the lock to fail (obviously). - extends scoped_guard() to not take the body when the the conditional guard 'fails'. eg. scoped_guard (mutex_intr, &task->signal_cred_guard_mutex) { ... } will only execute the body when the mutex is held. - provides scoped_cond_guard(name, fail, args...); which extends scoped_guard() to do fail when the lock-acquire fails. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20231102110706.460851167%40infradead.org commit 194600008d5c43b5a4ba98c4b81633397e34ffad Author: Frederic Weisbecker Date: Tue Nov 14 14:38:40 2023 -0500 sched/timers: Explain why idle task schedules out on remote timer enqueue Trying to avoid that didn't bring much value after testing, add comment about this. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20231114193840.4041-3-frederic@kernel.org commit dd5403869a40595eb953f12e8cd2bb57bb88bb67 Author: Frederic Weisbecker Date: Tue Nov 14 14:38:39 2023 -0500 sched/cpuidle: Comment about timers requirements VS idle handler Add missing explanation concerning IRQs re-enablement constraints in the cpuidle path against timers. Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Acked-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20231114193840.4041-2-frederic@kernel.org commit 63ba8422f876e32ee564ea95da9a7313b13ff0a1 Author: Peter Zijlstra Date: Sat Nov 4 11:59:21 2023 +0100 sched/deadline: Introduce deadline servers Low priority tasks (e.g., SCHED_OTHER) can suffer starvation if tasks with higher priority (e.g., SCHED_FIFO) monopolize CPU(s). RT Throttling has been introduced a while ago as a (mostly debug) countermeasure one can utilize to reserve some CPU time for low priority tasks (usually background type of work, e.g. workqueues, timers, etc.). It however has its own problems (see documentation) and the undesired effect of unconditionally throttling FIFO tasks even when no lower priority activity needs to run (there are mechanisms to fix this issue as well, but, again, with their own problems). Introduce deadline servers to service low priority tasks needs under starvation conditions. Deadline servers are built extending SCHED_DEADLINE implementation to allow 2-level scheduling (a sched_deadline entity becomes a container for lower priority scheduling entities). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/4968601859d920335cf85822eb573a5f179f04b8.1699095159.git.bristot@kernel.org commit 2f7a0f58948d8231236e2facecc500f1930fb996 Author: Peter Zijlstra Date: Sat Nov 4 11:59:20 2023 +0100 sched/deadline: Move bandwidth accounting into {en,de}queue_dl_entity In preparation of introducing !task sched_dl_entity; move the bandwidth accounting into {en.de}queue_dl_entity(). Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/a86dccbbe44e021b8771627e1dae01a69b73466d.1699095159.git.bristot@kernel.org commit 9e07d45c5210f5dd6701c00d55791983db7320fa Author: Peter Zijlstra Date: Sat Nov 4 11:59:19 2023 +0100 sched/deadline: Collect sched_dl_entity initialization Create a single function that initializes a sched_dl_entity. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/51acc695eecf0a1a2f78f9a044e11ffd9b316bcf.1699095159.git.bristot@kernel.org commit c708a4dc5ab547edc3d6537233ca9e79ea30ce47 Author: Peter Zijlstra Date: Mon Nov 6 14:04:01 2023 +0100 sched: Unify more update_curr*() Now that trace_sched_stat_runtime() no longer takes a vruntime argument, the task specific bits are identical between update_curr_common() and update_curr(). Signed-off-by: Peter Zijlstra (Intel) commit 5fe6ec8f6ab549b6422e41551abb51802bd48bc7 Author: Peter Zijlstra Date: Mon Nov 6 13:41:43 2023 +0100 sched: Remove vruntime from trace_sched_stat_runtime() Tracing the runtime delta makes sense, observer can sum over time. Tracing the absolute vruntime makes less sense, inconsistent: absolute-vs-delta, but also vruntime delta can be computed from runtime delta. Removing the vruntime thing also makes the two tracepoint sites identical, allowing to unify the code in a later patch. Signed-off-by: Peter Zijlstra (Intel) commit 5d69eca542ee17c618f9a55da52191d5e28b435f Author: Peter Zijlstra Date: Sat Nov 4 11:59:18 2023 +0100 sched: Unify runtime accounting across classes All classes use sched_entity::exec_start to track runtime and have copies of the exact same code around to compute runtime. Collapse all that. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Daniel Bristot de Oliveira Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Reviewed-by: Valentin Schneider Reviewed-by: Steven Rostedt (Google) Link: https://lkml.kernel.org/r/54d148a144f26d9559698c4dd82d8859038a7380.1699095159.git.bristot@kernel.org commit ee4373dc902c0a403dd084b254ce70a78f95466f Author: Abel Wu Date: Wed Nov 15 11:36:46 2023 +0800 sched/eevdf: O(1) fastpath for task selection Since the RB-tree is now sorted by deadline, let's first try the leftmost entity which has the earliest virtual deadline. I've done some benchmarks to see its effectiveness. All the benchmarks are done inside a normal cpu cgroup in a clean environment with cpu turbo disabled, on a dual-CPU Intel Xeon(R) Platinum 8260 with 2 NUMA nodes each of which has 24C/48T. hackbench: process/thread + pipe/socket + 1/2/4/8 groups netperf: TCP/UDP + STREAM/RR + 24/48/72/96/192 threads tbench: loopback 24/48/72/96/192 threads schbench: 1/2/4/8 mthreads direct: cfs_rq has only one entity parity: RUN_TO_PARITY fast: O(1) fastpath slow: heap search (%) direct parity fast slow hackbench 92.95 2.02 4.91 0.12 netperf 68.08 6.60 24.18 1.14 tbench 67.55 11.22 20.61 0.62 schbench 69.91 2.65 25.73 1.71 The above results indicate that this fastpath really makes task selection more efficient. Signed-off-by: Abel Wu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20231115033647.80785-4-wuyun.abel@bytedance.com commit 2227a957e1d5b1941be4e4207879ec74f4bb37f8 Author: Abel Wu Date: Wed Nov 15 11:36:45 2023 +0800 sched/eevdf: Sort the rbtree by virtual deadline Sort the task timeline by virtual deadline and keep the min_vruntime in the augmented tree, so we can avoid doubling the worst case cost and make full use of the cached leftmost node to enable O(1) fastpath picking in next patch. Signed-off-by: Abel Wu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20231115033647.80785-3-wuyun.abel@bytedance.com commit 84db47ca7146d7bd00eb5cf2b93989a971c84650 Author: Raghavendra K T Date: Fri Oct 20 21:27:46 2023 +0530 sched/numa: Fix mm numa_scan_seq based unconditional scan Since commit fc137c0ddab2 ("sched/numa: enhance vma scanning logic") NUMA Balancing allows updating PTEs to trap NUMA hinting faults if the task had previously accessed VMA. However unconditional scan of VMAs are allowed during initial phase of VMA creation until process's mm numa_scan_seq reaches 2 even though current task had not accessed VMA. Rationale: - Without initial scan subsequent PTE update may never happen. - Give fair opportunity to all the VMAs to be scanned and subsequently understand the access pattern of all the VMAs. But it has a corner case where, if a VMA is created after some time, process's mm numa_scan_seq could be already greater than 2. For e.g., values of mm numa_scan_seq when VMAs are created by running mmtest autonuma benchmark briefly looks like: start_seq=0 : 459 start_seq=2 : 138 start_seq=3 : 144 start_seq=4 : 8 start_seq=8 : 1 start_seq=9 : 1 This results in no unconditional PTE updates for those VMAs created after some time. Fix: - Note down the initial value of mm numa_scan_seq in per VMA start_seq. - Allow unconditional scan till start_seq + 2. Result: SUT: AMD EPYC Milan with 2 NUMA nodes 256 cpus. base kernel: upstream 6.6-rc6 with Mels patches [1] applied. kernbench ========== base patched %gain Amean elsp-128 165.09 ( 0.00%) 164.78 * 0.19%* Duration User 41404.28 41375.08 Duration System 9862.22 9768.48 Duration Elapsed 519.87 518.72 Ops NUMA PTE updates 1041416.00 831536.00 Ops NUMA hint faults 263296.00 220966.00 Ops NUMA pages migrated 258021.00 212769.00 Ops AutoNUMA cost 1328.67 1114.69 autonumabench NUMA01_THREADLOCAL ================== Amean elsp-NUMA01_THREADLOCAL 81.79 (0.00%) 67.74 * 17.18%* Duration User 54832.73 47379.67 Duration System 75.00 185.75 Duration Elapsed 576.72 476.09 Ops NUMA PTE updates 394429.00 11121044.00 Ops NUMA hint faults 1001.00 8906404.00 Ops NUMA pages migrated 288.00 2998694.00 Ops AutoNUMA cost 7.77 44666.84 Signed-off-by: Raghavendra K T Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mel Gorman Link: https://lore.kernel.org/r/2ea7cbce80ac7c62e90cbfb9653a7972f902439f.1697816692.git.raghavendra.kt@amd.com commit d6111cf45c5787282b2e20d77bdb6b28881d516a Author: Paul E. McKenney Date: Tue Oct 31 11:12:01 2023 -0700 sched: Use WRITE_ONCE() for p->on_rq Since RCU-tasks uses READ_ONCE(p->on_rq), ensure the write-side matches with WRITE_ONCE(). Signed-off-by: "Paul E. McKenney" Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/e4896e0b-eacc-45a2-a7a8-de2280a51ecc@paulmck-laptop commit 8a4353d077788b4efb11beb8c4e3869ea7aeaff7 Author: Vinod Govindapillai Date: Sat Nov 11 13:43:20 2023 +0200 drm/i915/xe2lpd: implement WA for underruns while enabling FBC FIFO underruns are observed when FBC is enabled on plane 2 or plane 3. Recommended WA is to update the FBC enabling sequence. The plane binding register bits need to be updated separately before programming the FBC enable bit. Bspec: 74151 Reviewed-by: Mika Kahola #v3 Signed-off-by: Vinod Govindapillai Reviewed-by: Mika Kahola Signed-off-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20231111114320.87277-2-vinod.govindapillai@intel.com commit 075ede8d20f8f201900756af55c58994c6660659 Author: Tudor Ambarus Date: Wed Nov 1 14:58:48 2023 +0000 mtd: spi-nor: use kernel sized types instead of c99 types The kernel offers and prefers the kernel sized types instead of the c99 types when not in the uapi directory, use them. Link: https://lore.kernel.org/r/20231101145853.524045-2-tudor.ambarus@linaro.org Signed-off-by: Tudor Ambarus commit b3d8c6050481d42c726425fcad248faad8785347 Merge: 8fedaaca40711 3f06462b3eb8a Author: Jakub Kicinski Date: Tue Nov 14 20:06:07 2023 -0800 Merge branch 'intel-wired-lan-driver-updates-2023-11-13-i40e' Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-11-13 (i40e) This series contains updates to i40e driver only. Justin Bronder increases number of allowable descriptors for XL710 devices. Su Hui adds error check, and unroll, for RSS configuration. Andrii changes module read error message to debug and makes it more verbose. Ivan Vecera performs numerous clean-ups and refactors to driver such as removing unused defines and fields, converting use of flags to bitmaps, adding helpers, re-organizing code, etc. ==================== Link: https://lore.kernel.org/r/20231113231047.548659-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 3f06462b3eb8a49c07d9c0bc5631dd423ea5ebac Author: Ivan Vecera Date: Mon Nov 13 15:10:34 2023 -0800 i40e: Delete unused i40e_mac_info fields From commit 9eed69a9147c ("i40e: Drop FCoE code from core driver files") the field i40e_mac_info.san_addr is unused (never filled). The field i40e_mac_info.max_fcoeq is unused from the beginning. Remove both. Reviewed-by: Wojciech Drewek Co-developed-by: Michal Schmidt Signed-off-by: Michal Schmidt Signed-off-by: Ivan Vecera Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-16-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit f699a4bfc8624bf87aa2ba9327a0eef03edce43b Author: Ivan Vecera Date: Mon Nov 13 15:10:33 2023 -0800 i40e: Move inline helpers to i40e_prototype.h Move version check helper functions from i40e_type.h to i40e_prototype.h as per discussion [1]. [1] https://lore.kernel.org/all/cdcd6b97-1138-4cd7-854f-b3faa1f475f8@intel.com/#t Cc: Jacob Keller Signed-off-by: Ivan Vecera Reviewed-by: Wojciech Drewek Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-15-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit d8c6bee01caa5d16aee2be7f8feff875bb8f4fcc Author: Ivan Vecera Date: Mon Nov 13 15:10:32 2023 -0800 i40e: Remove VF MAC types The i40e_hw.mac.type cannot to be equal to I40E_MAC_VF or I40E_MAC_X722_VF so remove helper i40e_is_vf(), simplify i40e_adminq_init_regs() and remove enums for these VF MAC types. Signed-off-by: Ivan Vecera Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-14-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit e329a8b9aac4b815f3c9bbecca01962f261688ca Author: Ivan Vecera Date: Mon Nov 13 15:10:31 2023 -0800 i40e: Use helpers to check running FW and AQ API versions Use new helpers to check versions of running FW and provided AQ API to make the code more readable. Signed-off-by: Ivan Vecera Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-13-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit cf488e13221f94536db3156b35cfe6424cc6df2a Author: Ivan Vecera Date: Mon Nov 13 15:10:30 2023 -0800 i40e: Add other helpers to check version of running firmware and AQ API Add another helper functions that will be used by subsequent patch to refactor existing open-coded checks whether the version of running firmware and AdminQ API is recent enough to provide certain capabilities. Signed-off-by: Ivan Vecera Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-12-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 28c1726b2c9cab8a6e541fbf6bca63caef912fc0 Author: Ivan Vecera Date: Mon Nov 13 15:10:29 2023 -0800 i40e: Move i40e_is_aq_api_ver_ge helper Move i40e_is_aq_api_ver_ge helper function (used to check if AdminQ API version is recent enough) to header so it can be used from other .c files. Signed-off-by: Ivan Vecera Reviewed-by: Wojciech Drewek Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-11-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 8cc29564d22777724626c4ea54fbe582d0c8e7d0 Author: Ivan Vecera Date: Mon Nov 13 15:10:28 2023 -0800 i40e: Initialize hardware capabilities at single place Some i40e_hw.caps bits are set in i40e_set_hw_caps(), some of them in i40e_init_adminq() and the rest of them in i40e_sw_init(). Consolidate the initialization to single proper place i40e_set_hw_caps(). Signed-off-by: Ivan Vecera Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-10-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 0e8b9fdd40fe65b28d58ea7fa3f97aed350da69a Author: Ivan Vecera Date: Mon Nov 13 15:10:27 2023 -0800 i40e: Consolidate hardware capabilities Fields .caps in i40e_hw and .hw_features in i40e_pf both indicate capabilities provided by hardware. Move and merge i40e_pf.hw_features into i40e_hw.caps as this is more appropriate place for them and adjust their names to I40E_HW_CAP_... convention. Signed-off-by: Ivan Vecera Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-9-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit d0b1314c8b338bc053b5d266579afb79490f5f9a Author: Ivan Vecera Date: Mon Nov 13 15:10:26 2023 -0800 i40e: Use DECLARE_BITMAP for flags field in i40e_hw Convert flags field in i40e_hw from u64 to bitmap and its usage to use bit access functions and rename the field to 'caps' as this field describes capabilities that are set once on init and read many times later. Changes: - Convert "hw_ptr->flags & FLAG" to "test_bit(FLAG, ...)" - Convert "hw_ptr->flags |= FLAG" to "set_bit(FLAG, ...)" - Convert "hw_ptr->flags &= ~FLAG" to "clear_bit(FLAG, ...)" - Rename i40e_hw.flags to i40e_hw.caps - Rename i40e_set_hw_flags() to i40e_set_hw_caps() - Adjust caps names so they are prefixed by I40E_HW_CAP_ and existing _CAPABLE suffixes are stripped Signed-off-by: Ivan Vecera Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-8-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 70756d0a4727fe8fa23afaee76028299af4062dd Author: Ivan Vecera Date: Mon Nov 13 15:10:25 2023 -0800 i40e: Use DECLARE_BITMAP for flags and hw_features fields in i40e_pf Convert flags and hw_features fields from i40e_pf from u32 to bitmaps and their usage to use bit access functions. Changes: - Convert "pf_ptr->(flags|hw_features) & FL" to "test_bit(FL, ...)" - Convert "pf_ptr->(flags|hw_features) |= FL" to "set_bit(FL, ...)" - Convert "pf_ptr->(flags|hw_features) &= ~FL" to "clear_bit(FL, ...)" - Rename flag field to bitno in i40e_priv_flags and adjust ethtool callbacks to work with flags bitmap - Rename flag names where '_ENABLED'->'_ENA' and '_DISABLED'->'_DIS' like in ice driver Signed-off-by: Ivan Vecera Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-7-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit addca9175e5f74cf29e8ad918c38c09b8663b5b8 Author: Ivan Vecera Date: Mon Nov 13 15:10:24 2023 -0800 i40e: Remove _t suffix from enum type names Enum type names should not be suffixed by '_t'. Either to use 'typedef enum name name_t' to so plain 'name_t var' instead of 'enum name_t var'. Signed-off-by: Ivan Vecera Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-6-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit e8fcf58f6109cb79370ff38174dd442fbeeb756a Author: Ivan Vecera Date: Mon Nov 13 15:10:23 2023 -0800 i40e: Remove unused flags The flag I40E_FLAG_RX_CSUM_ENABLED and I40E_HW_FLAG_DROP_MODE are set and never read. Remove them. Signed-off-by: Ivan Vecera Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-5-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 2c0fa38a579f96cdee372965d6b0c06c40806cad Author: Andrii Staikov Date: Mon Nov 13 15:10:22 2023 -0800 i40e: Change user notification of non-SFP module in i40e_get_module_info() Make the driver not produce an error message on "ethtool -m ethX" command when a non-SFP module is encountered hence there is no possibility to read the EEPROM. Make the message to appear in the debug log rather than as an error string. Change the return code to -EOPNOTSUPP and the string to make it more verbose. Signed-off-by: Andrii Staikov Reviewed-by: Wojciech Drewek CC: Stefan Assmann CC: Michal Schmidt Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-4-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit add35e623e77fd48c4720d0d8cf1f0f425149ed4 Author: Su Hui Date: Mon Nov 13 15:10:21 2023 -0800 i40e: add an error code check in i40e_vsi_setup check the value of 'ret' after calling 'i40e_vsi_config_rss'. Signed-off-by: Su Hui Reviewed-by: Dan Carpenter Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-3-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit aa6908ca3bd1e713fd6cd8d7193a008f060bf7d9 Author: Justin Bronder Date: Mon Nov 13 15:10:20 2023 -0800 i40e: increase max descriptors for XL710 In Tables 8-12 and 8-22 in the X710/XXV710/XL710 datasheet, the QLEN description states that the maximum size of the descriptor queue is 8k minus 32, or 8160. Signed-off-by: Justin Bronder Reviewed-by: Jacob Keller Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Link: https://lore.kernel.org/r/20231113231047.548659-2-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 8fedaaca40711a7f3a00f3c20ecdca7c2313054a Author: Florian Fainelli Date: Mon Nov 13 08:50:30 2023 -0800 net: dsa: tag_rtl4_a: Use existing ETH_P_REALTEK constant No functional change, uses the existing ETH_P_REALTEK constant already defined in if_ether.h. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/20231113165030.2440083-1-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski commit 34b98a5f7a185c19715cc98c57d7e27b4785dfdf Author: Dmitry Osipenko Date: Sun Nov 12 01:42:36 2023 +0300 drm/virtio: Fix return value for VIRTGPU_CONTEXT_PARAM_DEBUG_NAME The strncpy_from_user() returns number of copied bytes and not zero on success. The non-zero return value of ioctl is treated as error. Return zero on success instead of the number of copied bytes. Fixes: 7add80126bce ("drm/uapi: add explicit virtgpu context debug name") Signed-off-by: Dmitry Osipenko Reviewed-by: Gurchetan Singh Link: https://patchwork.freedesktop.org/patch/msgid/20231111224236.890431-1-dmitry.osipenko@collabora.com commit 577d71544871b075a25a09e4c5aa31008850c0a8 Author: Jack Yu Date: Mon Nov 13 10:37:15 2023 +0000 ASoC: rt5682s: Add LDO output selection for dacref Add LDO output selection for dacref. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/62cad4e51c044108bad872ab349e36f8@realtek.com Signed-off-by: Mark Brown commit 5a17f863c042beef7835688fe7a9667083530df2 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:30 2023 +0100 dt-bindings: mmc: samsung,exynos-dw-mshc: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. While re-indenting the first enum, put also axis,artpec8-dw-mshc in alphabetical order. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Acked-by: Ulf Hansson Link: https://lore.kernel.org/r/20231108104343.24192-5-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit bded0924f6a424eb9bf675759aa90741940e5628 Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:09 2023 +0300 ARM: dts: qcom: mdm9615: drop qcom, prefix from SSBI node name Device tree node names should not use vendor prefix, they contain a generic name of the device. Drop the qcom, prefix from the SSBI node name. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230928110309.1212221-37-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 77c1b2b30e0f03d4e0e2f871a62d18c57fc17d10 Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:08 2023 +0300 ARM: dts: qcom: ipq8064: drop qcom, prefix from SSBI node name Device tree node names should not use vendor prefix, they contain a generic name of the device. Drop the qcom, prefix from the SSBI node name. Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230928110309.1212221-36-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 3f0533c6f2708d5851ce4852beb0dc09fc5264f3 Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:07 2023 +0300 ARM: dts: qcom: apq8060-dragonboard: rename mpp ADC channels to adc-channel Use generic `adc-channel@N' node names for board-specific ADC channels (routed to MPP pins) to follow the schema. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-35-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 61023dd0ec536d0bd62b88e1230edd46576c0dfb Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:06 2023 +0300 ARM: dts: qcom: pm8921: Disable keypad by default Since keypad is used only by some devices, disable it by default and enable explicitly. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-34-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 74eafc5f82a59568354076295688e0d9af43659f Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:05 2023 +0300 ARM: dts: qcom: msm8974: move regulators to board files The vph-pwr and boost regulators (even if they are unified by design) are not a property of SoC, so move them to board files. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-33-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 4187a3f87b95070bee5be317202b9b11b2273853 Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:04 2023 +0300 ARM: dts: qcom: msm8960: drop useless rpm regulators node The set of regulators available over the RPM requests is not a property of the SoC. The only msm8960 board file (qcom-msm8960-cdp) also defines this node together with the compatible string. Drop the useless device node. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-32-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 203cc864c95891e76ddaebb447df9b80bb603263 Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:03 2023 +0300 ARM: dts: qcom: msm8660: move RPM regulators to board files The set of regulators available over the RPM requests is not a property of the SoC. Move them to board files. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-31-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 8299cc4b6ca3c02f2b51a8bb18beb659f3c4f4c1 Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:02 2023 +0300 ARM: dts: qcom: mdm9615: move RPM regulators to board files The set of regulators available over the RPM requests is not a property of the SoC. Move them to board files. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-30-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit d25762097bc26394c8d88ebc9353497bdc67ec27 Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:01 2023 +0300 ARM: dts: qcom: apq8064: move RPM regulators to board files The set of regulators available over the RPM requests is not a property of the SoC. Move them to board files. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-29-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 69a59e9fc442c814f8b0faef32ea2cca7f592083 Author: Dmitry Baryshkov Date: Thu Sep 28 14:03:00 2023 +0300 ARM: dts: qcom: pm8058: switch to interrupts-extended Merge interrups and interrupt-parent properties into a single interrupts-extended property. Suggested-by: Konrad Dybcio Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-28-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit b721204a85d8e136252b8cffe00ba3dbb6ffce9b Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:59 2023 +0300 ARM: dts: qcom: pm8018: switch to interrupts-extended Merge interrups and interrupt-parent properties into a single interrupts-extended property. Suggested-by: Konrad Dybcio Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-27-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit bd05d27e076430326263a59bef2770da4eccce38 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:58 2023 +0300 ARM: dts: qcom: pm8921: switch to interrupts-extended Merge interrups and interrupt-parent properties into a single interrupts-extended property. Suggested-by: Konrad Dybcio Reviewed-by: Konrad DYbcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-26-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit cfe406658eb811981fd2035a20b13b9eedeeec5b Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:57 2023 +0300 ARM: dts: qcom: pm8058: use defined IRQ flags Use symbolic names for IRQ flags instead of using the numeric values. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-25-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 4181b6ce576ab8ff972ba0c7d918d9a4eae57b21 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:56 2023 +0300 ARM: dts: qcom: pm8921: move reg property Move reg property to come after compatible. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-24-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 4d6f4d391f01a90198dab3c1d1445f340f295855 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:55 2023 +0300 ARM: dts: qcom: pm8018: move reg property Move reg property to come after compatible. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-23-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 0c78700a8aa03a9eb7c0be33803e07ebf146b565 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:54 2023 +0300 ARM: dts: qcom: pm8921: reorder nodes Move pm8921 device nodes to follow the alphanumberic sorting order. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-22-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit a195fb9165205985f8e335fe88ca769f957ffbdd Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:53 2023 +0300 ARM: dts: qcom: pm8058: reorder nodes Move pm8058 device nodes to follow the alphanumberic sorting order. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-21-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit b00c86c2e9eec92159e8db20abbc0dd85835b071 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:52 2023 +0300 ARM: dts: qcom: msm8660: split PMIC to separate dtsi files The PMIC is not a part of the SoC, so move PMIC to a separate file and include it from the board files. Suggested-by: Konrad Dybcio Acked-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-20-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit e9297150225194bc68594a3241c33d28feed0d29 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:51 2023 +0300 ARM: dts: qcom: mdm9615: split PMIC to separate dtsi files The PMIC is not a part of the SoC, so move PMIC to a separate file and include it from the board files. Suggested-by: Konrad Dybcio Reviewed-by: Neil Armstrong Acked-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-19-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 2308f2df5b66c7ae5266c3d058fbb4c211de0e6a Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:50 2023 +0300 ARM: dts: qcom: apq8064: split PMICs to separate dtsi files The PMICs are not a part of the SoC, so move PMICs to separate files and include them from the board files. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-18-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 5c903b859aaced384c0cd01d515f3e43a115fd9e Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:49 2023 +0300 ARM: dts: qcom: msm8960: split PMIC to separate dtsi files The PMIC is not a part of the SoC, so move PMIC to a separate file and include it from the board files. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-17-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 31c4b7415ae4f710c59844358862483728a2b17b Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:48 2023 +0300 ARM: dts: qcom: msm8960: move PMIC interrupts to the board files The interrupt of SSBI PMICs is routed to the SoCs GPIO. As such, it is not a property of the SoC, it is a property of the particular board (even if it is standard and unified between all devices). Move these interrupt specifications to the board files. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-16-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 41cdee8a33495a4778ee534afb8ecfd524bb9c4f Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:47 2023 +0300 ARM: dts: qcom: msm8660: move PMIC interrupts to the board files The interrupt of SSBI PMICs is routed to the SoCs GPIO. As such, it is not a property of the SoC, it is a property of the particular board (even if it is standard and unified between all devices). Move these interrupt specifications to the board files. Acked-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-15-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 7661e1e7f66ee770bed744728da3e66c3900bb38 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:46 2023 +0300 ARM: dts: qcom: mdm9615: move PMIC interrupts to the board files The interrupt of SSBI PMICs is routed to the SoCs GPIO. As such, it is not a property of the SoC, it is a property of the particular board (even if it is standard and unified between all devices). Move these interrupt specifications to the board files. Acked-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-14-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 7b22923c3f504114e3509b0577bbb3a42eb0c49e Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:45 2023 +0300 ARM: dts: qcom: apq8064: move PMIC interrupts to the board files The interrupt of SSBI PMICs is routed to the SoCs GPIO. As such, it is not a property of the SoC, it is a property of the particular board (even if it is standard and unified between all devices). Move these interrupt specifications to the board files. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-13-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit a10a09f34eb80b83ca7275e23bf982dae2aa7632 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:44 2023 +0300 ARM: dts: qcom: msm8960: fix PMIC node labels Change PM8921 node labels to start with pm8921_ prefix, following other Qualcomm PMIC device nodes. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-12-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit c6d86aa8a12194d1c9c2f9108910a46c8a3ddc90 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:43 2023 +0300 ARM: dts: qcom: msm8660: fix PMIC node labels Change PM8058 node labels to start with pm8058_ prefix, following other Qualcomm PMIC device nodes. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-11-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 0e4688cd4ee6efbeae2b31f75e16961fd7f72735 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:42 2023 +0300 ARM: dts: qcom: mdm9615: fix PMIC node labels Change PM8018 node labels to start with pm8018_ prefix, following other Qualcomm PMIC device nodes. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-10-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit eba2158528b1882055b7fe2b7647820516178f06 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:41 2023 +0300 ARM: dts: qcom: apq8064: fix PMIC node labels Change PM8921 node labels to start with pm8921_ prefix, following other Qualcomm PMIC device nodes. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-9-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 455a4c46e023ab84263eae0fc7acca9a5ee8b7ac Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:40 2023 +0300 ARM: dts: qcom: strip prefix from PMIC files As the vendor DTS files were moved to per-vendor subdirs, there no need to use common prefixes. Drop the `qcom-' prefix from PMIC dtsi file. This makes 32-bit qcom/ dts files closer to arm64 ones. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-8-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 249aae3ffcfe19564946ad7b3d58ee9786d53372 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:39 2023 +0300 ARM: dts: qcom: mdm9615-wp8548-mangoh-green: group include clauses Group file inclusion to follow contemporary practice. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-7-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 0802de336a43e0de423dc35289613dc2c6eba12b Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:38 2023 +0300 ARM: dts: qcom: apq8064-nexus7: move sdcc1 node to proper place Move sdcc1 device node to follow the alphanumberic sorting order. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-6-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit a26d147f187206854f7a88197d28333c0e11f41b Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:37 2023 +0300 ARM: dts: qcom: msm8660-surf: use keypad label directly Directly use pm8058_keypad to declare keypad properties instead of referencing pm8058 top-level node. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-5-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 6b6056961a2e2fb7a788b1d40feeb91073ad4ca1 Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:36 2023 +0300 ARM: dts: qcom: msm8960: introduce label for PMIC keypad To simplify MSM8960 CDP board file, add label to PMIC keypad node. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-4-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 554557542e709e190eff8a598f0cde02647d533a Author: Dmitry Baryshkov Date: Thu Sep 28 14:02:35 2023 +0300 ARM: dts: qcom: apq8064: correct XOADC register address The XOADC is present at the address 0x197 rather than just 197. It doesn't change a lot (since the driver hardcodes all register addresses), but the DT should present correct address anyway. Fixes: c4b70883ee33 ("ARM: dts: add XOADC and IIO HWMON to APQ8064") Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230928110309.1212221-3-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 2e122362d25e1b977aa5c5c88c03956be4228e02 Author: Michał Winiarski Date: Tue Oct 24 13:07:10 2023 +0200 iosys-map: Rename locals used inside macros Widely used variable names can be used by macro users, potentially leading to name collisions. Suffix locals used inside the macros with an underscore, to reduce the collision potential. Suggested-by: Lucas De Marchi Signed-off-by: Michał Winiarski Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20231024110710.3039807-1-michal.winiarski@intel.com commit 086fdb48bc65d6fde0f0e7d42dbfb3c00ea52628 Author: Neil Armstrong Date: Fri Sep 8 12:53:49 2023 +0200 soc: qcom: add ADSP PDCharger ULOG driver The Qualcomm PMIC PDCharger ULOG driver provides access to logs of the ADSP firmware PDCharger module in charge of Battery and Power Delivery on modern systems. Implement trace events as a simple rpmsg driver with an 1s interval to retrieve the messages. The interface allows filtering the messages by subsystem and priority level, this could be implemented later on. Signed-off-by: Neil Armstrong Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230908-topic-sm8550-upstream-pdcharge-ulog-v1-1-d1b16b02ced2@linaro.org Signed-off-by: Bjorn Andersson commit d721d6b1aaa51e9c2e21183809a155a7125f94f2 Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:52 2023 +0300 ARM: dts: qcom-sdx65: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-17-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit a18bbe1cb25e699cba633f197a960e6d29c600d5 Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:51 2023 +0300 ARM: dts: qcom-sdx55: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-16-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit d6e2bc901cb71dc73cdb8a4da35ed8f43e7727d0 Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:50 2023 +0300 arm64: dts: qcom: sm8350: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-15-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 2dcb4a0058e53443c4e916c8e771691e0db0e780 Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:49 2023 +0300 arm64: dts: qcom: sm8250: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-14-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit da9a1e6569ff46e6ef135eade705987a4c104cf6 Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:48 2023 +0300 arm64: dts: qcom: sm8150: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-13-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit ca5ca568d7388b38039c8d658735fc539352b1db Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:47 2023 +0300 arm64: dts: qcom: sdm845: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-12-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit b7efebfeb2e8ad8187cdabba5f0212ba2e6c1069 Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:46 2023 +0300 arm64: dts: qcom: msm8998: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-11-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 48660cc40455b704d3478e9b197915772f056fa7 Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:45 2023 +0300 arm64: dts: qcom: msm8996: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-10-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 5e2af1902d7409fdd60d425690141e643eff583c Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:44 2023 +0300 arm64: dts: qcom: ipq8074: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-9-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 5de106ec1ea9b6106a0263cb2741ebfd7c39e820 Author: Dmitry Baryshkov Date: Fri Aug 25 00:19:43 2023 +0300 arm64: dts: qcom: ipq6018: switch USB QMP PHY to new style of bindings Change the USB QMP PHY to use newer style of QMP PHY bindings (single resource region, no per-PHY subnodes). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20230824211952.1397699-8-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 81427a62a22148cdc85db38a6fbe487d0d2044b6 Merge: 727a92d62fd6a 360769233cc9c Author: Alexei Starovoitov Date: Tue Nov 14 08:56:56 2023 -0800 Merge branch 'bpf-add-support-for-cgroup1-bpf-part' Yafang Shao says: ==================== bpf: Add support for cgroup1, BPF part This is the BPF part of the series "bpf, cgroup: Add BPF support for cgroup1 hierarchy" with adjustment in the last two patches compared to the previous one. v3->v4: - use subsys_name instead of cgrp_name in get_cgroup_hierarchy_id() (Tejun) - use local bpf_link instead of modifying the skeleton in the selftests v3: https://lwn.net/Articles/949264/ ==================== Link: https://lore.kernel.org/r/20231111090034.4248-1-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 360769233cc9c921e90ae387d167ea3cd3cbb04c Author: Yafang Shao Date: Sat Nov 11 09:00:34 2023 +0000 selftests/bpf: Add selftests for cgroup1 hierarchy Add selftests for cgroup1 hierarchy. The result as follows, $ tools/testing/selftests/bpf/test_progs --name=cgroup1_hierarchy #36/1 cgroup1_hierarchy/test_cgroup1_hierarchy:OK #36/2 cgroup1_hierarchy/test_root_cgid:OK #36/3 cgroup1_hierarchy/test_invalid_level:OK #36/4 cgroup1_hierarchy/test_invalid_cgid:OK #36/5 cgroup1_hierarchy/test_invalid_hid:OK #36/6 cgroup1_hierarchy/test_invalid_cgrp_name:OK #36/7 cgroup1_hierarchy/test_invalid_cgrp_name2:OK #36/8 cgroup1_hierarchy/test_sleepable_prog:OK #36 cgroup1_hierarchy:OK Summary: 1/8 PASSED, 0 SKIPPED, 0 FAILED Besides, I also did some stress test similar to the patch #2 in this series, as follows (with CONFIG_PROVE_RCU_LIST enabled): - Continuously mounting and unmounting named cgroups in some tasks, for example: cgrp_name=$1 while true do mount -t cgroup -o none,name=$cgrp_name none /$cgrp_name umount /$cgrp_name done - Continuously run this selftest concurrently, while true; do ./test_progs --name=cgroup1_hierarchy; done They can ran successfully without any RCU warnings in dmesg. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20231111090034.4248-7-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit bf47300b186facc8ae66a0e2aa89073565f82bb3 Author: Yafang Shao Date: Sat Nov 11 09:00:33 2023 +0000 selftests/bpf: Add a new cgroup helper get_cgroup_hierarchy_id() A new cgroup helper function, get_cgroup1_hierarchy_id(), has been introduced to obtain the ID of a cgroup1 hierarchy based on the provided cgroup name. This cgroup name can be obtained from the /proc/self/cgroup file. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20231111090034.4248-6-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit c1dcc050aa648bb3b831030d547c3fcc1c68140c Author: Yafang Shao Date: Sat Nov 11 09:00:32 2023 +0000 selftests/bpf: Add a new cgroup helper get_classid_cgroup_id() Introduce a new helper function to retrieve the cgroup ID from a net_cls cgroup directory. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20231111090034.4248-5-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit f744d35ecf46f111bf9b54bfdbc89a28ee8b928a Author: Yafang Shao Date: Sat Nov 11 09:00:31 2023 +0000 selftests/bpf: Add parallel support for classid Include the current pid in the classid cgroup path. This way, different testers relying on classid-based configurations will have distinct classid cgroup directories, enabling them to run concurrently. Additionally, we leverage the current pid as the classid, ensuring unique identification. Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20231111090034.4248-4-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 4849775587844e44d215289c425bcd70f315efe7 Author: Yafang Shao Date: Sat Nov 11 09:00:30 2023 +0000 selftests/bpf: Fix issues in setup_classid_environment() If the net_cls subsystem is already mounted, attempting to mount it again in setup_classid_environment() will result in a failure with the error code EBUSY. Despite this, tmpfs will have been successfully mounted at /sys/fs/cgroup/net_cls. Consequently, the /sys/fs/cgroup/net_cls directory will be empty, causing subsequent setup operations to fail. Here's an error log excerpt illustrating the issue when net_cls has already been mounted at /sys/fs/cgroup/net_cls prior to running setup_classid_environment(): - Before that change $ tools/testing/selftests/bpf/test_progs --name=cgroup_v1v2 test_cgroup_v1v2:PASS:server_fd 0 nsec test_cgroup_v1v2:PASS:client_fd 0 nsec test_cgroup_v1v2:PASS:cgroup_fd 0 nsec test_cgroup_v1v2:PASS:server_fd 0 nsec run_test:PASS:skel_open 0 nsec run_test:PASS:prog_attach 0 nsec test_cgroup_v1v2:PASS:cgroup-v2-only 0 nsec (cgroup_helpers.c:248: errno: No such file or directory) Opening Cgroup Procs: /sys/fs/cgroup/net_cls/cgroup.procs (cgroup_helpers.c:540: errno: No such file or directory) Opening cgroup classid: /sys/fs/cgroup/net_cls/cgroup-test-work-dir/net_cls.classid run_test:PASS:skel_open 0 nsec run_test:PASS:prog_attach 0 nsec (cgroup_helpers.c:248: errno: No such file or directory) Opening Cgroup Procs: /sys/fs/cgroup/net_cls/cgroup-test-work-dir/cgroup.procs run_test:FAIL:join_classid unexpected error: 1 (errno 2) test_cgroup_v1v2:FAIL:cgroup-v1v2 unexpected error: -1 (errno 2) (cgroup_helpers.c:248: errno: No such file or directory) Opening Cgroup Procs: /sys/fs/cgroup/net_cls/cgroup.procs #44 cgroup_v1v2:FAIL Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED - After that change $ tools/testing/selftests/bpf/test_progs --name=cgroup_v1v2 #44 cgroup_v1v2:OK Summary: 1/0 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Yafang Shao Link: https://lore.kernel.org/r/20231111090034.4248-3-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit fe977716b40cb98cf9c91a66454adf3dc2f8c59a Author: Yafang Shao Date: Sat Nov 11 09:00:29 2023 +0000 bpf: Add a new kfunc for cgroup1 hierarchy A new kfunc is added to acquire cgroup1 of a task: - bpf_task_get_cgroup1 Acquires the associated cgroup of a task whithin a specific cgroup1 hierarchy. The cgroup1 hierarchy is identified by its hierarchy ID. This new kfunc enables the tracing of tasks within a designated container or cgroup directory in BPF programs. Suggested-by: Tejun Heo Signed-off-by: Yafang Shao Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20231111090034.4248-2-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit dd99d5b1ab93e7b731dda3d39cc7caf4639f8652 Author: Imre Deak Date: Mon Nov 13 16:20:51 2023 +0200 drm/i915/dp: Tune down FEC detection timeout error message At least a Realtek DP branch device with the OUI 00-e0-4c dev-ID Dp1.4 HW-rev 1.0 SW-rev 131.1 device identification doesn't report detecting the FEC decoding start symbol. Tune down the corresponding error to a debug message. Reviewed-by: Jani Nikula Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231113142051.258864-1-imre.deak@intel.com commit 499e8d93e8c562d1c77157fcc4b747bfb374d76c Merge: b85ea95d08647 c493a2b37a9e9 Author: Bjorn Andersson Date: Tue Nov 14 09:25:34 2023 -0600 Merge tag 'qcom-arm64-for-6.7-2' into arm64-for-6.8 This merges leftover patches originally targetted for 6.7, but wasn't propagated in time. This describes the USB components on IPQ5018, and one of the SPI controllers. The IPQ9574 RDP descriptions are refactored to keep common dtsi, and the WPS button is described. GPLL0 is described as a source clock for the mailbox (APCS clock) across IPQ5332, IPQ6018, IPQ8074, and IPQ9574. On MSM8916, the asynchronous packet router (APR) is described on the DSP remoteproc, and audio services are described. Audio and modem are then enabled on a range of MSM8916- and MSM8939-based devices. GPU support is enabled on the Samsung Galaxy Tab devices, and RGB LED is added to BQ Aquaris X5 and BQ Aquaris M5. The QRB4210 RB2 is no longer hard coded to be in peripheral mode, and RPMh sleep stats are added to the SA8775P platform. Camera Control Interface (CCI) controllers are introduced on SC7280. One of the DP PHY compatibles on X13s is updated, to reflect that the it should operate in eDP mode. And missing camera LED pin configuration is added. Flash LED is described fo the SDM845-based OnePlus and Xiaomi devices. Missing description of USB PHY regulators are added to Sony Xperia 10 IV, and modem and ath10k-based WiFi are enabled. The uart for the Bluetooth controller on the SM6375 is added as well. The true rng block is added for SA8775P, SC7280, SM8450, an SM8550. commit c45860f6ee9b52b2e2f9b9255d93b9875e416cb0 Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:29 2023 +0100 dt-bindings: i2c: samsung,s3c2410-i2c: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Reviewed-by: Linus Walleij Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/20231108104343.24192-4-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 9da80ed69eb150617e8c72aeb7fdb9bfc7b97fba Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:28 2023 +0100 dt-bindings: i2c: exynos5: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Acked-by: Rob Herring Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/20231108104343.24192-3-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit 4be756fd983a0d91c258196b3206e9131e63d62d Author: Krzysztof Kozlowski Date: Wed Nov 8 11:43:27 2023 +0100 dt-bindings: hwinfo: samsung,exynos-chipid: add specific compatibles for existing SoC Samsung Exynos SoC reuses several devices from older designs, thus historically we kept the old (block's) compatible only. This works fine and there is no bug here, however guidelines expressed in Documentation/devicetree/bindings/writing-bindings.rst state that: 1. Compatibles should be specific. 2. We should add new compatibles in case of bugs or features. Add compatibles specific to each SoC in front of all old-SoC-like compatibles. Reviewed-by: Alim Akhtar Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231108104343.24192-2-krzysztof.kozlowski@linaro.org Signed-off-by: Krzysztof Kozlowski commit e4e6e8f1ad0f3d6c4d87045aa4d0fa4b7496182a Author: Cristian Marussi Date: Tue Nov 14 14:54:49 2023 +0000 firmware: arm_scmi: Add optional flags to extended names helper Some recently added SCMI protocols needs an additional flags parameter to be able to properly configure the command used to query the extended name of a resource. Modify extended_name_get helper accordingly. Signed-off-by: Cristian Marussi Link: https://lore.kernel.org/r/20231114145449.3136412-1-cristian.marussi@arm.com Signed-off-by: Sudeep Holla commit 901b277eafbd98ad327525de6c9bf3cc6abd6370 Author: Esteban Blanc Date: Wed Nov 8 11:41:24 2023 +0100 pinctrl: tps6594: Add driver for TPS6594 pinctrl and GPIOs TI TPS6594 PMIC has 11 GPIOs which can be used for different functions. This patch adds a pinctrl and GPIO drivers in order to use those functions. Signed-off-by: Esteban Blanc Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20231108104124.2818275-1-eblanc@baylibre.com Signed-off-by: Linus Walleij commit 6c370dc65374db5afbc5c6c64c662f922a2555ad Merge: b85ea95d08647 5d74316466f4a Author: Paolo Bonzini Date: Mon Nov 13 05:58:30 2023 -0500 Merge branch 'kvm-guestmemfd' into HEAD Introduce several new KVM uAPIs to ultimately create a guest-first memory subsystem within KVM, a.k.a. guest_memfd. Guest-first memory allows KVM to provide features, enhancements, and optimizations that are kludgly or outright impossible to implement in a generic memory subsystem. The core KVM ioctl() for guest_memfd is KVM_CREATE_GUEST_MEMFD, which similar to the generic memfd_create(), creates an anonymous file and returns a file descriptor that refers to it. Again like "regular" memfd files, guest_memfd files live in RAM, have volatile storage, and are automatically released when the last reference is dropped. The key differences between memfd files (and every other memory subystem) is that guest_memfd files are bound to their owning virtual machine, cannot be mapped, read, or written by userspace, and cannot be resized. guest_memfd files do however support PUNCH_HOLE, which can be used to convert a guest memory area between the shared and guest-private states. A second KVM ioctl(), KVM_SET_MEMORY_ATTRIBUTES, allows userspace to specify attributes for a given page of guest memory. In the long term, it will likely be extended to allow userspace to specify per-gfn RWX protections, including allowing memory to be writable in the guest without it also being writable in host userspace. The immediate and driving use case for guest_memfd are Confidential (CoCo) VMs, specifically AMD's SEV-SNP, Intel's TDX, and KVM's own pKVM. For such use cases, being able to map memory into KVM guests without requiring said memory to be mapped into the host is a hard requirement. While SEV+ and TDX prevent untrusted software from reading guest private data by encrypting guest memory, pKVM provides confidentiality and integrity *without* relying on memory encryption. In addition, with SEV-SNP and especially TDX, accessing guest private memory can be fatal to the host, i.e. KVM must be prevent host userspace from accessing guest memory irrespective of hardware behavior. Long term, guest_memfd may be useful for use cases beyond CoCo VMs, for example hardening userspace against unintentional accesses to guest memory. As mentioned earlier, KVM's ABI uses userspace VMA protections to define the allow guest protection (with an exception granted to mapping guest memory executable), and similarly KVM currently requires the guest mapping size to be a strict subset of the host userspace mapping size. Decoupling the mappings sizes would allow userspace to precisely map only what is needed and with the required permissions, without impacting guest performance. A guest-first memory subsystem also provides clearer line of sight to things like a dedicated memory pool (for slice-of-hardware VMs) and elimination of "struct page" (for offload setups where userspace _never_ needs to DMA from or into guest memory). guest_memfd is the result of 3+ years of development and exploration; taking on memory management responsibilities in KVM was not the first, second, or even third choice for supporting CoCo VMs. But after many failed attempts to avoid KVM-specific backing memory, and looking at where things ended up, it is quite clear that of all approaches tried, guest_memfd is the simplest, most robust, and most extensible, and the right thing to do for KVM and the kernel at-large. The "development cycle" for this version is going to be very short; ideally, next week I will merge it as is in kvm/next, taking this through the KVM tree for 6.8 immediately after the end of the merge window. The series is still based on 6.6 (plus KVM changes for 6.7) so it will require a small fixup for changes to get_file_rcu() introduced in 6.7 by commit 0ede61d8589c ("file: convert to SLAB_TYPESAFE_BY_RCU"). The fixup will be done as part of the merge commit, and most of the text above will become the commit message for the merge. Pending post-merge work includes: - hugepage support - looking into using the restrictedmem framework for guest memory - introducing a testing mechanism to poison memory, possibly using the same memory attributes introduced here - SNP and TDX support There are two non-KVM patches buried in the middle of this series: fs: Rename anon_inode_getfile_secure() and anon_inode_getfd_secure() mm: Add AS_UNMOVABLE to mark mapping as completely unmovable The first is small and mostly suggested-by Christian Brauner; the second a bit less so but it was written by an mm person (Vlastimil Babka). commit 5d74316466f4aabdd2ee1e33b45e4933c9bc3ea1 Author: Sean Christopherson Date: Mon Oct 30 17:20:49 2023 -0700 KVM: selftests: Add a memory region subtest to validate invalid flags Add a subtest to set_memory_region_test to verify that KVM rejects invalid flags and combinations with -EINVAL. KVM might or might not fail with EINVAL anyways, but we can at least try. Signed-off-by: Sean Christopherson Message-Id: <20231031002049.3915752-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e3577788de64139202d89224fe31613c0f02b790 Author: Ackerley Tng Date: Fri Oct 27 11:22:17 2023 -0700 KVM: selftests: Test KVM exit behavior for private memory/access "Testing private access when memslot gets deleted" tests the behavior of KVM when a private memslot gets deleted while the VM is using the private memslot. When KVM looks up the deleted (slot = NULL) memslot, KVM should exit to userspace with KVM_EXIT_MEMORY_FAULT. In the second test, upon a private access to non-private memslot, KVM should also exit to userspace with KVM_EXIT_MEMORY_FAULT. Intentionally don't take a requirement on KVM_CAP_GUEST_MEMFD, KVM_CAP_MEMORY_FAULT_INFO, KVM_MEMORY_ATTRIBUTE_PRIVATE, etc., as it's a KVM bug to advertise KVM_X86_SW_PROTECTED_VM without its prerequisites. Signed-off-by: Ackerley Tng [sean: call out the similarities with set_memory_region_test] Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-36-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Paolo Bonzini commit 8a89efd43423cb3005c5e641e846184e292c1465 Author: Chao Peng Date: Fri Oct 27 11:22:16 2023 -0700 KVM: selftests: Add basic selftest for guest_memfd() Add a selftest to verify the basic functionality of guest_memfd(): + file descriptor created with the guest_memfd() ioctl does not allow read/write/mmap operations + file size and block size as returned from fstat are as expected + fallocate on the fd checks that offset/length on fallocate(FALLOC_FL_PUNCH_HOLE) should be page aligned + invalid inputs (misaligned size, invalid flags) are rejected + file size and inode are unique (the innocuous-sounding anon_inode_getfile() backs all files with a single inode...) Signed-off-by: Chao Peng Co-developed-by: Ackerley Tng Signed-off-by: Ackerley Tng Co-developed-by: Paolo Bonzini Signed-off-by: Paolo Bonzini Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-35-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Paolo Bonzini commit 2feabb855df8f0889146c2e951307ba477d1f37b Author: Chao Peng Date: Fri Oct 27 11:22:15 2023 -0700 KVM: selftests: Expand set_memory_region_test to validate guest_memfd() Expand set_memory_region_test to exercise various positive and negative testcases for private memory. - Non-guest_memfd() file descriptor for private memory - guest_memfd() from different VM - Overlapping bindings - Unaligned bindings Signed-off-by: Chao Peng Co-developed-by: Ackerley Tng Signed-off-by: Ackerley Tng [sean: trim the testcases to remove duplicate coverage] Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-34-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e6f4f345b259cad178bad7e40a9d4b65cf195067 Author: Chao Peng Date: Fri Oct 27 11:22:14 2023 -0700 KVM: selftests: Add KVM_SET_USER_MEMORY_REGION2 helper Add helpers to invoke KVM_SET_USER_MEMORY_REGION2 directly so that tests can validate of features that are unique to "version 2" of "set user memory region", e.g. do negative testing on gmem_fd and gmem_offset. Provide a raw version as well as an assert-success version to reduce the amount of boilerplate code need for basic usage. Signed-off-by: Chao Peng Signed-off-by: Ackerley Tng Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-33-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Paolo Bonzini commit 43f623f350ce1c46c53b6b77f4dbe741af8c44f3 Author: Vishal Annapurve Date: Fri Oct 27 11:22:13 2023 -0700 KVM: selftests: Add x86-only selftest for private memory conversions Add a selftest to exercise implicit/explicit conversion functionality within KVM and verify: - Shared memory is visible to host userspace - Private memory is not visible to host userspace - Host userspace and guest can communicate over shared memory - Data in shared backing is preserved across conversions (test's host userspace doesn't free the data) - Private memory is bound to the lifetime of the VM Ideally, KVM's selftests infrastructure would be reworked to allow backing a single region of guest memory with multiple memslots for _all_ backing types and shapes, i.e. ideally the code for using a single backing fd across multiple memslots would work for "regular" memory as well. But sadly, support for KVM_CREATE_GUEST_MEMFD has languished for far too long, and overhauling selftests' memslots infrastructure would likely open a can of worms, i.e. delay things even further. In addition to the more obvious tests, verify that PUNCH_HOLE actually frees memory. Directly verifying that KVM frees memory is impractical, if it's even possible, so instead indirectly verify memory is freed by asserting that the guest reads zeroes after a PUNCH_HOLE. E.g. if KVM zaps SPTEs but doesn't actually punch a hole in the inode, the subsequent read will still see the previous value. And obviously punching a hole shouldn't cause explosions. Let the user specify the number of memslots in the private mem conversion test, i.e. don't require the number of memslots to be '1' or "nr_vcpus". Creating more memslots than vCPUs is particularly interesting, e.g. it can result in a single KVM_SET_MEMORY_ATTRIBUTES spanning multiple memslots. To keep the math reasonable, align each vCPU's chunk to at least 2MiB (the size is 2MiB+4KiB), and require the total size to be cleanly divisible by the number of memslots. The goal is to be able to validate that KVM plays nice with multiple memslots, being able to create a truly arbitrary number of memslots doesn't add meaningful value, i.e. isn't worth the cost. Intentionally don't take a requirement on KVM_CAP_GUEST_MEMFD, KVM_CAP_MEMORY_FAULT_INFO, KVM_MEMORY_ATTRIBUTE_PRIVATE, etc., as it's a KVM bug to advertise KVM_X86_SW_PROTECTED_VM without its prerequisites. Signed-off-by: Vishal Annapurve Co-developed-by: Ackerley Tng Signed-off-by: Ackerley Tng Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-32-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 242331dfc4959f44e706c9b09b768f312aa5e117 Author: Sean Christopherson Date: Fri Oct 27 11:22:12 2023 -0700 KVM: selftests: Add GUEST_SYNC[1-6] macros for synchronizing more data Add GUEST_SYNC[1-6]() so that tests can pass the maximum amount of information supported via ucall(), without needing to resort to shared memory. Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-31-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Paolo Bonzini commit 672eaa351015d8165c41fff644ee7d2b369cea12 Author: Sean Christopherson Date: Fri Oct 27 11:22:11 2023 -0700 KVM: selftests: Introduce VM "shape" to allow tests to specify the VM type Add a "vm_shape" structure to encapsulate the selftests-defined "mode", along with the KVM-defined "type" for use when creating a new VM. "mode" tracks physical and virtual address properties, as well as the preferred backing memory type, while "type" corresponds to the VM type. Taking the VM type will allow adding tests for KVM_CREATE_GUEST_MEMFD without needing an entirely separate set of helpers. At this time, guest_memfd is effectively usable only by confidential VM types in the form of guest private memory, and it's expected that x86 will double down and require unique VM types for TDX and SNP guests. Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-30-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 01244fce2fa22176e46609c051f6fe15cf81e188 Author: Vishal Annapurve Date: Fri Oct 27 11:22:10 2023 -0700 KVM: selftests: Add helpers to do KVM_HC_MAP_GPA_RANGE hypercalls (x86) Add helpers for x86 guests to invoke the KVM_HC_MAP_GPA_RANGE hypercall, which KVM will forward to userspace and thus can be used by tests to coordinate private<=>shared conversions between host userspace code and guest code. Signed-off-by: Vishal Annapurve [sean: drop shared/private helpers (let tests specify flags)] Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-29-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Paolo Bonzini commit f7fa67495d118f734f98b406fd46888616b4a3c3 Author: Vishal Annapurve Date: Fri Oct 27 11:22:09 2023 -0700 KVM: selftests: Add helpers to convert guest memory b/w private and shared Add helpers to convert memory between private and shared via KVM's memory attributes, as well as helpers to free/allocate guest_memfd memory via fallocate(). Userspace, i.e. tests, is NOT required to do fallocate() when converting memory, as the attributes are the single source of truth. Provide allocate() helpers so that tests can mimic a userspace that frees private memory on conversion, e.g. to prioritize memory usage over performance. Signed-off-by: Vishal Annapurve Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-28-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba commit bb2968ad6c33c0902dce48ea57d58c5bb4f3c617 Author: Sean Christopherson Date: Fri Oct 27 11:22:08 2023 -0700 KVM: selftests: Add support for creating private memslots Add support for creating "private" memslots via KVM_CREATE_GUEST_MEMFD and KVM_SET_USER_MEMORY_REGION2. Make vm_userspace_mem_region_add() a wrapper to its effective replacement, vm_mem_add(), so that private memslots are fully opt-in, i.e. don't require update all tests that add memory regions. Pivot on the KVM_MEM_PRIVATE flag instead of the validity of the "gmem" file descriptor so that simple tests can let vm_mem_add() do the heavy lifting of creating the guest memfd, but also allow the caller to pass in an explicit fd+offset so that fancier tests can do things like back multiple memslots with a single file. If the caller passes in a fd, dup() the fd so that (a) __vm_mem_region_delete() can close the fd associated with the memory region without needing yet another flag, and (b) so that the caller can safely close its copy of the fd without having to first destroy memslots. Co-developed-by: Ackerley Tng Signed-off-by: Ackerley Tng Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-27-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Paolo Bonzini commit 8d99e347c097ab3f9fb93d0f88dddf20051d7c88 Author: Sean Christopherson Date: Fri Oct 27 11:22:07 2023 -0700 KVM: selftests: Convert lib's mem regions to KVM_SET_USER_MEMORY_REGION2 Use KVM_SET_USER_MEMORY_REGION2 throughout KVM's selftests library so that support for guest private memory can be added without needing an entirely separate set of helpers. Note, this obviously makes selftests backwards-incompatible with older KVM versions from this point forward. Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-26-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Paolo Bonzini commit 335869c3f2b881bda6eeeb2df342841a1db3310b Author: Sean Christopherson Date: Fri Oct 27 11:22:06 2023 -0700 KVM: selftests: Drop unused kvm_userspace_memory_region_find() helper Drop kvm_userspace_memory_region_find(), it's unused and a terrible API (probably why it's unused). If anything outside of kvm_util.c needs to get at the memslot, userspace_mem_region_find() can be exposed to give others full access to all memory region/slot information. Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-25-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Paolo Bonzini commit 89ea60c2c7b5838bf192c50062d5720cd6ab8662 Author: Sean Christopherson Date: Fri Oct 27 11:22:05 2023 -0700 KVM: x86: Add support for "protected VMs" that can utilize private memory Add a new x86 VM type, KVM_X86_SW_PROTECTED_VM, to serve as a development and testing vehicle for Confidential (CoCo) VMs, and potentially to even become a "real" product in the distant future, e.g. a la pKVM. The private memory support in KVM x86 is aimed at AMD's SEV-SNP and Intel's TDX, but those technologies are extremely complex (understatement), difficult to debug, don't support running as nested guests, and require hardware that's isn't universally accessible. I.e. relying SEV-SNP or TDX for maintaining guest private memory isn't a realistic option. At the very least, KVM_X86_SW_PROTECTED_VM will enable a variety of selftests for guest_memfd and private memory support without requiring unique hardware. Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Message-Id: <20231027182217.3615211-24-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Signed-off-by: Paolo Bonzini commit eed52e434bc33603ddb0af62b6c4ef818948489d Author: Sean Christopherson Date: Fri Oct 27 11:22:04 2023 -0700 KVM: Allow arch code to track number of memslot address spaces per VM Let x86 track the number of address spaces on a per-VM basis so that KVM can disallow SMM memslots for confidential VMs. Confidentials VMs are fundamentally incompatible with emulating SMM, which as the name suggests requires being able to read and write guest memory and register state. Disallowing SMM will simplify support for guest private memory, as KVM will not need to worry about tracking memory attributes for multiple address spaces (SMM is the only "non-default" address space across all architectures). Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-23-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2333afa17af0f4b6651214ee17cfd5ae5f47787a Author: Sean Christopherson Date: Fri Oct 27 11:22:03 2023 -0700 KVM: Drop superfluous __KVM_VCPU_MULTIPLE_ADDRESS_SPACE macro Drop __KVM_VCPU_MULTIPLE_ADDRESS_SPACE and instead check the value of KVM_ADDRESS_SPACE_NUM. No functional change intended. Reviewed-by: Paolo Bonzini Signed-off-by: Sean Christopherson Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-22-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8dd2eee9d526c30fccfe75da7ec5365c6476e510 Author: Chao Peng Date: Fri Oct 27 11:22:02 2023 -0700 KVM: x86/mmu: Handle page fault for private memory Add support for resolving page faults on guest private memory for VMs that differentiate between "shared" and "private" memory. For such VMs, KVM_MEM_GUEST_MEMFD memslots can include both fd-based private memory and hva-based shared memory, and KVM needs to map in the "correct" variant, i.e. KVM needs to map the gfn shared/private as appropriate based on the current state of the gfn's KVM_MEMORY_ATTRIBUTE_PRIVATE flag. For AMD's SEV-SNP and Intel's TDX, the guest effectively gets to request shared vs. private via a bit in the guest page tables, i.e. what the guest wants may conflict with the current memory attributes. To support such "implicit" conversion requests, exit to user with KVM_EXIT_MEMORY_FAULT to forward the request to userspace. Add a new flag for memory faults, KVM_MEMORY_EXIT_FLAG_PRIVATE, to communicate whether the guest wants to map memory as shared vs. private. Like KVM_MEMORY_ATTRIBUTE_PRIVATE, use bit 3 for flagging private memory so that KVM can use bits 0-2 for capturing RWX behavior if/when userspace needs such information, e.g. a likely user of KVM_EXIT_MEMORY_FAULT is to exit on missing mappings when handling guest page fault VM-Exits. In that case, userspace will want to know RWX information in order to correctly/precisely resolve the fault. Note, private memory *must* be backed by guest_memfd, i.e. shared mappings always come from the host userspace page tables, and private mappings always come from a guest_memfd instance. Co-developed-by: Yu Zhang Signed-off-by: Yu Zhang Signed-off-by: Chao Peng Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-21-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 90b4fe17981e155432c4dbc490606d0c2e9c2199 Author: Chao Peng Date: Fri Oct 27 11:22:01 2023 -0700 KVM: x86: Disallow hugepages when memory attributes are mixed Disallow creating hugepages with mixed memory attributes, e.g. shared versus private, as mapping a hugepage in this case would allow the guest to access memory with the wrong attributes, e.g. overlaying private memory with a shared hugepage. Tracking whether or not attributes are mixed via the existing disallow_lpage field, but use the most significant bit in 'disallow_lpage' to indicate a hugepage has mixed attributes instead using the normal refcounting. Whether or not attributes are mixed is binary; either they are or they aren't. Attempting to squeeze that info into the refcount is unnecessarily complex as it would require knowing the previous state of the mixed count when updating attributes. Using a flag means KVM just needs to ensure the current status is reflected in the memslots. Signed-off-by: Chao Peng Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-20-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ee605e31563348f44d2ff0b6b74d33df69dd535c Author: Sean Christopherson Date: Fri Oct 27 11:22:00 2023 -0700 KVM: x86: "Reset" vcpu->run->exit_reason early in KVM_RUN Initialize run->exit_reason to KVM_EXIT_UNKNOWN early in KVM_RUN to reduce the probability of exiting to userspace with a stale run->exit_reason that *appears* to be valid. To support fd-based guest memory (guest memory without a corresponding userspace virtual address), KVM will exit to userspace for various memory related errors, which userspace *may* be able to resolve, instead of using e.g. BUS_MCEERR_AR. And in the more distant future, KVM will also likely utilize the same functionality to let userspace "intercept" and handle memory faults when the userspace mapping is missing, i.e. when fast gup() fails. Because many of KVM's internal APIs related to guest memory use '0' to indicate "success, continue on" and not "exit to userspace", reporting memory faults/errors to userspace will set run->exit_reason and corresponding fields in the run structure fields in conjunction with a a non-zero, negative return code, e.g. -EFAULT or -EHWPOISON. And because KVM already returns -EFAULT in many paths, there's a relatively high probability that KVM could return -EFAULT without setting run->exit_reason, in which case reporting KVM_EXIT_UNKNOWN is much better than reporting whatever exit reason happened to be in the run structure. Note, KVM must wait until after run->immediate_exit is serviced to sanitize run->exit_reason as KVM's ABI is that run->exit_reason is preserved across KVM_RUN when run->immediate_exit is true. Link: https://lore.kernel.org/all/20230908222905.1321305-1-amoorthy@google.com Link: https://lore.kernel.org/all/ZFFbwOXZ5uI%2Fgdaf@google.com Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-19-seanjc@google.com> Reviewed-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit a7800aa80ea4d5356b8474c2302812e9d4926fa6 Author: Sean Christopherson Date: Mon Nov 13 05:42:34 2023 -0500 KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory Introduce an ioctl(), KVM_CREATE_GUEST_MEMFD, to allow creating file-based memory that is tied to a specific KVM virtual machine and whose primary purpose is to serve guest memory. A guest-first memory subsystem allows for optimizations and enhancements that are kludgy or outright infeasible to implement/support in a generic memory subsystem. With guest_memfd, guest protections and mapping sizes are fully decoupled from host userspace mappings. E.g. KVM currently doesn't support mapping memory as writable in the guest without it also being writable in host userspace, as KVM's ABI uses VMA protections to define the allow guest protection. Userspace can fudge this by establishing two mappings, a writable mapping for the guest and readable one for itself, but that’s suboptimal on multiple fronts. Similarly, KVM currently requires the guest mapping size to be a strict subset of the host userspace mapping size, e.g. KVM doesn’t support creating a 1GiB guest mapping unless userspace also has a 1GiB guest mapping. Decoupling the mappings sizes would allow userspace to precisely map only what is needed without impacting guest performance, e.g. to harden against unintentional accesses to guest memory. Decoupling guest and userspace mappings may also allow for a cleaner alternative to high-granularity mappings for HugeTLB, which has reached a bit of an impasse and is unlikely to ever be merged. A guest-first memory subsystem also provides clearer line of sight to things like a dedicated memory pool (for slice-of-hardware VMs) and elimination of "struct page" (for offload setups where userspace _never_ needs to mmap() guest memory). More immediately, being able to map memory into KVM guests without mapping said memory into the host is critical for Confidential VMs (CoCo VMs), the initial use case for guest_memfd. While AMD's SEV and Intel's TDX prevent untrusted software from reading guest private data by encrypting guest memory with a key that isn't usable by the untrusted host, projects such as Protected KVM (pKVM) provide confidentiality and integrity *without* relying on memory encryption. And with SEV-SNP and TDX, accessing guest private memory can be fatal to the host, i.e. KVM must be prevent host userspace from accessing guest memory irrespective of hardware behavior. Attempt #1 to support CoCo VMs was to add a VMA flag to mark memory as being mappable only by KVM (or a similarly enlightened kernel subsystem). That approach was abandoned largely due to it needing to play games with PROT_NONE to prevent userspace from accessing guest memory. Attempt #2 to was to usurp PG_hwpoison to prevent the host from mapping guest private memory into userspace, but that approach failed to meet several requirements for software-based CoCo VMs, e.g. pKVM, as the kernel wouldn't easily be able to enforce a 1:1 page:guest association, let alone a 1:1 pfn:gfn mapping. And using PG_hwpoison does not work for memory that isn't backed by 'struct page', e.g. if devices gain support for exposing encrypted memory regions to guests. Attempt #3 was to extend the memfd() syscall and wrap shmem to provide dedicated file-based guest memory. That approach made it as far as v10 before feedback from Hugh Dickins and Christian Brauner (and others) led to it demise. Hugh's objection was that piggybacking shmem made no sense for KVM's use case as KVM didn't actually *want* the features provided by shmem. I.e. KVM was using memfd() and shmem to avoid having to manage memory directly, not because memfd() and shmem were the optimal solution, e.g. things like read/write/mmap in shmem were dead weight. Christian pointed out flaws with implementing a partial overlay (wrapping only _some_ of shmem), e.g. poking at inode_operations or super_operations would show shmem stuff, but address_space_operations and file_operations would show KVM's overlay. Paraphrashing heavily, Christian suggested KVM stop being lazy and create a proper API. Link: https://lore.kernel.org/all/20201020061859.18385-1-kirill.shutemov@linux.intel.com Link: https://lore.kernel.org/all/20210416154106.23721-1-kirill.shutemov@linux.intel.com Link: https://lore.kernel.org/all/20210824005248.200037-1-seanjc@google.com Link: https://lore.kernel.org/all/20211111141352.26311-1-chao.p.peng@linux.intel.com Link: https://lore.kernel.org/all/20221202061347.1070246-1-chao.p.peng@linux.intel.com Link: https://lore.kernel.org/all/ff5c5b97-acdf-9745-ebe5-c6609dd6322e@google.com Link: https://lore.kernel.org/all/20230418-anfallen-irdisch-6993a61be10b@brauner Link: https://lore.kernel.org/all/ZEM5Zq8oo+xnApW9@google.com Link: https://lore.kernel.org/linux-mm/20230306191944.GA15773@monkey Link: https://lore.kernel.org/linux-mm/ZII1p8ZHlHaQ3dDl@casper.infradead.org Cc: Fuad Tabba Cc: Vishal Annapurve Cc: Ackerley Tng Cc: Jarkko Sakkinen Cc: Maciej Szmigiero Cc: Vlastimil Babka Cc: David Hildenbrand Cc: Quentin Perret Cc: Michael Roth Cc: Wang Cc: Liam Merwick Cc: Isaku Yamahata Co-developed-by: Kirill A. Shutemov Signed-off-by: Kirill A. Shutemov Co-developed-by: Yu Zhang Signed-off-by: Yu Zhang Co-developed-by: Chao Peng Signed-off-by: Chao Peng Co-developed-by: Ackerley Tng Signed-off-by: Ackerley Tng Co-developed-by: Isaku Yamahata Signed-off-by: Isaku Yamahata Co-developed-by: Paolo Bonzini Signed-off-by: Paolo Bonzini Co-developed-by: Michael Roth Signed-off-by: Michael Roth Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-17-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Reviewed-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit 4f0b9194bc119a9850a99e5e824808e2f468c348 Author: Paolo Bonzini Date: Fri Nov 3 06:47:51 2023 -0400 fs: Rename anon_inode_getfile_secure() and anon_inode_getfd_secure() The call to the inode_init_security_anon() LSM hook is not the sole reason to use anon_inode_getfile_secure() or anon_inode_getfd_secure(). For example, the functions also allow one to create a file with non-zero size, without needing a full-blown filesystem. In this case, you don't need a "secure" version, just unique inodes; the current name of the functions is confusing and does not explain well the difference with the more "standard" anon_inode_getfile() and anon_inode_getfd(). Of course, there is another side of the coin; neither io_uring nor userfaultfd strictly speaking need distinct inodes, and it is not that clear anymore that anon_inode_create_get{file,fd}() allow the LSM to intercept and block the inode's creation. If one was so inclined, anon_inode_getfile_secure() and anon_inode_getfd_secure() could be kept, using the shared inode or a new one depending on CONFIG_SECURITY. However, this is probably overkill, and potentially a cause of bugs in different configurations. Therefore, just add a comment to io_uring and userfaultfd explaining the choice of the function. While at it, remove the export for what is now anon_inode_create_getfd(). There is no in-tree module that uses it, and the old name is gone anyway. If anybody actually needs the symbol, they can ask or they can just use anon_inode_create_getfile(), which will be exported very soon for use in KVM. Suggested-by: Christian Brauner Reviewed-by: Christian Brauner Signed-off-by: Paolo Bonzini commit 655b8af57d31e07340b023a807e43dadf81a0818 Author: Colin Ian King Date: Sat Nov 11 20:15:43 2023 +0000 thunderbolt: Remove duplicated re-assignment of pointer 'out' The pointer 'out' is initialized and then a few statements later being re-assigned the same value. The second re-assignment is redundant and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Mika Westerberg commit c5860e4a2737a8b29dc426c800d01c5be6aad811 Author: Andy Shevchenko Date: Mon Nov 13 14:28:48 2023 +0200 pinctrl: intel: Add a generic Intel pin control platform driver New generations of Intel platforms will provide better description of the pin control devices in the ACPI tables. Hence, we may provide a generic pin control platform driver to cover all of them. Currently the following Intel SoCs / platforms require this to be functional: - Lunar Lake Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 4c51ea957f08ea724e66f7b03c9091d3a5d99467 Author: Andy Shevchenko Date: Mon Nov 13 14:28:47 2023 +0200 pinctrl: intel: Revert "Unexport intel_pinctrl_probe()" In order to prepare for a new coming driver export the original intel_pinctrl_probe() again. This reverts commit 0dd519e3784b13befa1cdfeff847a0885b06650f. Signed-off-by: Andy Shevchenko commit a6865fe6fd784a8edec6bd6d396f8c054ade0de8 Author: Mika Kahola Date: Mon Nov 13 11:37:37 2023 +0200 drm/i915/display: Use int for entry setup frames At least one TGL had regression when using u8 types for entry setup frames calculation. So, let's switch to use ints instead. intel_psr_entry_setup_frames() function expects to return u8 but since in case of error the error code -ETIME is returned. This doesn't fit into u8 and hence the return value is not as expected. Fixes: 2b981d57e480 ("drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier") Signed-off-by: Mika Kahola Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20231113093737.358137-1-mika.kahola@intel.com commit 0a78bb64a49995c7377b1d716bbff7a9d92212cb Author: Ping-Ke Shih Date: Fri Nov 10 09:23:19 2023 +0800 wifi: rtw89: pci: update interrupt mitigation register for 8922AE To reduce interrupts, configure the mitigation setting of 8922AE when bringing interface up, and then check situations to decide turning on or off the function. With this, interrupt count decreases to 20,141 from 202,141 in period of 20 seconds. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231110012319.12727-8-pkshih@realtek.com commit 9f08c77b776976a6eabd9678d77ff9ab4ff4233e Author: Ping-Ke Shih Date: Fri Nov 10 09:23:18 2023 +0800 wifi: rtw89: pci: correct interrupt mitigation register for 8852CE To reduce interrupt count, configure mitigation register with thresholds of time and packet count. We missed that 8852CE uses different register address, so correct it. Then, interrupt counts down to 30,763 from 229,825 during stress test in 20 seconds. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231110012319.12727-7-pkshih@realtek.com commit d8872fb60e720ed656e03883e9bed576a72e0006 Author: Ping-Ke Shih Date: Fri Nov 10 09:23:17 2023 +0800 wifi: rtw89: 8922ae: add v2 interrupt handlers for 8922AE The handlers include three parts -- 1) configure interrupt mask; 2) enable/disable interrupt; 3) recognize (read) interrupt status. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231110012319.12727-6-pkshih@realtek.com commit aa70f76120ee4e67b1ba90a2e2ec1fea595cf108 Author: Ping-Ke Shih Date: Fri Nov 10 09:23:16 2023 +0800 wifi: rtw89: pci: generalize interrupt status bits of interrupt handlers For WiFi 7, interrupt status registers and their definitions are changed a lot, but the logic is still the same, so define fields to reuse the code. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231110012319.12727-5-pkshih@realtek.com commit 9e1aff437a560cd72cb6a60ee33fe162b0afdaf1 Author: Ping-Ke Shih Date: Fri Nov 10 09:23:15 2023 +0800 wifi: rtw89: pci: add pre_deinit to be called after probe complete At probe stage, we only do partial initialization to enable ability to download firmware and read capabilities. After that, we use this pre_deinit to disable HCI to save power. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231110012319.12727-4-pkshih@realtek.com commit d720cca762ed58a5d811b40a5525066329d3641a Author: Zong-Zhe Yang Date: Fri Nov 10 09:23:14 2023 +0800 wifi: rtw89: pci: stop/start DMA for level 1 recovery according to chip gen Level 1 recovery is to recover TX/RX rings, so it needs PCI to stop/start DMA. But, different chip gen have different implementations, either register address/mask or function flow. So, configure callback of stop/start DMA by chip gen. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231110012319.12727-3-pkshih@realtek.com commit d5d717a776405107c24a41116af18c7176197210 Author: Zong-Zhe Yang Date: Fri Nov 10 09:23:13 2023 +0800 wifi: rtw89: pci: reset BDRAM according to chip gen Configure callback of reset BDRAM (buffer descriptor RAM) by chip gen. Refine the one of 802.11ax chip gen and drop a redundant duplicate of it in 802.11ax chip gen. Then, assign right callback of rst_bdram for HCI ops which needs to do callback according to chip gen. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231110012319.12727-2-pkshih@realtek.com commit af3077af7c0754ef4609a00343d2f2a483804b48 Author: Jiapeng Chong Date: Fri Nov 10 15:36:02 2023 +0800 wifi: iwlegacy: Remove the unused variable len Variable len is not effectively used, so delete it. drivers/net/wireless/intel/iwlegacy/4965-mac.c:4234:7: warning: variable 'len' set but not used. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7223 Signed-off-by: Jiapeng Chong Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231110073602.16846-1-jiapeng.chong@linux.alibaba.com commit 50da74e1e8b682853d1e07fc8bbe3a0774ae5e09 Author: Shiji Yang Date: Thu Nov 9 12:38:51 2023 +0800 wifi: rt2x00: correct wrong BBP register in RxDCOC calibration Refer to Mediatek vendor driver RxDCOC_Calibration() function, when performing gainfreeze calibration, we should write register 140 instead of 141. This fix can reduce the total calibration time from 6 seconds to 1 second. Signed-off-by: Shiji Yang Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/TYAP286MB0315B13B89DF57B6B27BB854BCAFA@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM commit 8170b04c2c92eee52ea50b96db4c54662197e512 Author: Arnd Bergmann Date: Wed Nov 8 16:34:03 2023 +0100 wifi: libertas: stop selecting wext Libertas no longer references the iw_handler infrastructure or wext_spy, so neither of the 'select' statements are used any more. Fixes: e86dc1ca4676 ("Libertas: cfg80211 support") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231108153409.1065286-1-arnd@kernel.org commit cab4a9bc06fdd9d605d7df2665e64e5c48f2db84 Author: Sumit Garg Date: Thu Nov 2 13:00:56 2023 +0530 tee: optee: Remove redundant custom workqueue Global system workqueue is sufficient to suffice OP-TEE bus scanning work needs. So drop redundant usage of the custom workqueue. Tested-by: Jan Kiszka Tested-by: Masahisa Kojima Signed-off-by: Sumit Garg Signed-off-by: Jens Wiklander commit 5bbdcc86a481d82433e0905a548335bd3683eadf Author: Swati Sharma Date: Fri Nov 10 15:40:17 2023 +0530 drm/i915/dsc: Allow DSC only with fractional bpp when forced from debugfs If force_dsc_fractional_bpp_en is set through debugfs allow DSC iff compressed bpp is fractional. Continue if the computed compressed bpp turns out to be a integer. v2: -Use helpers for fractional, integral bits of bits_per_pixel. (Suraj) -Fix comment (Suraj) Signed-off-by: Swati Sharma Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231110101020.4067342-9-ankit.k.nautiyal@intel.com commit 680c1e31a59b223d677a22b508017d26b71a636a Author: Swati Sharma Date: Fri Nov 10 15:40:16 2023 +0530 drm/i915/dsc: Add debugfs entry to validate DSC fractional bpp DSC_Sink_BPP_Precision entry is added to i915_dsc_fec_support_show to depict sink's precision. Also, new debugfs entry is created to enforce fractional bpp. If Force_DSC_Fractional_BPP_en is set then while iterating over output bpp with fractional step size we will continue if output_bpp is computed as integer. With this approach, we will be able to validate DSC with fractional bpp. v2: Add drm_modeset_unlock to new line(Suraj) Signed-off-by: Swati Sharma Signed-off-by: Ankit Nautiyal Signed-off-by: Mitul Golani Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231110101020.4067342-8-ankit.k.nautiyal@intel.com commit dc59990efda0bc785a3c26c41880cc513f9ed09f Author: Ankit Nautiyal Date: Fri Nov 10 15:40:15 2023 +0530 drm/i915/dp: Iterate over output bpp with fractional step size This patch adds support to iterate over compressed output bpp as per the fractional step, supported by DP sink. v2: -Avoid ending up with compressed bpp, same as pipe bpp. (Stan) Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231110101020.4067342-7-ankit.k.nautiyal@intel.com commit 2df50cb46a4c64107e7a70e8b00e7ffc0806b5a3 Author: Vandita Kulkarni Date: Fri Nov 10 15:40:14 2023 +0530 drm/i915/dsc/mtl: Add support for fractional bpp Consider the fractional bpp while reading the qp values. v2: Use helpers for fractional, integral bits of bits_per_pixel. (Suraj) Signed-off-by: Vandita Kulkarni Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231110101020.4067342-6-ankit.k.nautiyal@intel.com commit 08fcb5ab7b32848b1852145baf89007a3e3c28b9 Author: Ankit Nautiyal Date: Fri Nov 10 15:40:13 2023 +0530 drm/i915/audio: Consider fractional vdsc bpp while computing tu_data MTL+ supports fractional compressed bits_per_pixel, with precision of 1/16. This compressed bpp is stored in U6.4 format. Accommodate the precision during calculation of transfer unit data for hblank_early calculation. v2: -Fix tu_data calculation while dealing with U6.4 format. (Stan) v3: -Use BPP_X16_FMT to print vdsc bpp. Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231110101020.4067342-5-ankit.k.nautiyal@intel.com commit 87c8812f4b009b5a5d38b1560b45d4a1cc4b24c5 Author: Ankit Nautiyal Date: Fri Nov 10 15:40:12 2023 +0530 drm/i915/display: Consider fractional vdsc bpp while computing m_n values MTL+ supports fractional compressed bits_per_pixel, with precision of 1/16. This compressed bpp is stored in U6.4 format. Accommodate this precision while computing m_n values. v1: Replace the computation of 'data_clock' with 'data_clock = DIV_ROUND_UP(data_clock, 16).' (Sui Jingfeng). v2: Rebase and pass bits_per_pixel in U6.4 format. Signed-off-by: Ankit Nautiyal Signed-off-by: Mitul Golani Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231110101020.4067342-4-ankit.k.nautiyal@intel.com commit 59a266f068b4f9f54c58e4066ac9ee9023ad9232 Author: Ankit Nautiyal Date: Fri Nov 10 15:40:11 2023 +0530 drm/i915/display: Store compressed bpp in U6.4 format DSC parameter bits_per_pixel is stored in U6.4 format. The 4 bits represent the fractional part of the bpp. Currently we use compressed_bpp member of dsc structure to store only the integral part of the bits_per_pixel. To store the full bits_per_pixel along with the fractional part, compressed_bpp is changed to store bpp in U6.4 formats. Intergral part is retrieved by simply right shifting the member compressed_bpp by 4. v2: -Use to_bpp_int, to_bpp_frac_dec, to_bpp_x16 helpers while dealing with compressed bpp. (Suraj) -Fix comment styling. (Suraj) v3: -Add separate file for 6.4 fixed point helper(Jani, Nikula) -Add comment for magic values(Suraj) v4: -Fix checkpatch warnings caused by renaming(Suraj) v5: -Rebase. -Use existing helpers for conversion of bpp_int to bpp_x16 and vice versa. Signed-off-by: Ankit Nautiyal Signed-off-by: Mitul Golani Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng Link: https://patchwork.freedesktop.org/patch/msgid/20231110101020.4067342-3-ankit.k.nautiyal@intel.com commit 0c2287c9652150cf659408b66c1789830822132f Author: Ankit Nautiyal Date: Fri Nov 10 15:40:10 2023 +0530 drm/display/dp: Add helper function to get DSC bpp precision Add helper to get the DSC bits_per_pixel precision for the DP sink. Signed-off-by: Ankit Nautiyal Reviewed-by: Suraj Kandpal Reviewed-by: Sui Jingfeng Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20231110101020.4067342-2-ankit.k.nautiyal@intel.com commit ce64630dca7026ed9dc880dcd005977f662c99fe Author: Thomas Zimmermann Date: Wed Nov 1 11:35:43 2023 +0100 drm: Fix flip-task docs Say that drm_flip_work_commit() is safe to call in atomic context. Turn the name into a hyperlink. Suggested-by: Daniel Vetter Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20231101103618.23806-3-tzimmermann@suse.de commit 78dfe8a0ef779159a6ff51231d71b3a65c55ccf5 Author: Thomas Zimmermann Date: Wed Nov 1 11:35:42 2023 +0100 drm: Remove struct drm_flip_task from DRM interfaces Contain struct drm_flip_task and its helper functions drm_flip_work_allocate_task() and drm_flip_work_queue_task() within drm_flip_work.c There are no callers outside of the flip-work code. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20231101103618.23806-2-tzimmermann@suse.de commit c669875041d038e91fa99766a07ec2d8bd6dcf6a Author: Thomas Zimmermann Date: Mon Oct 9 16:06:36 2023 +0200 drm/ssd130x: Preallocate format-conversion buffer in atomic_check Preallocate the format-conversion state's storage in the plane's atomic_check function if a format conversion is necessary. Allows the update to fail if no memory is available. Avoids the same allocation within atomic_update, which may not fail. v6: * update patch for ssd132x support Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231009141018.11291-8-tzimmermann@suse.de commit e7c814d305e110d6db3f440d14490a8d0d9477d9 Author: Thomas Zimmermann Date: Mon Oct 9 16:06:34 2023 +0200 drm/simpledrm: Preallocate format-conversion buffer in atomic_check Preallocate the format-conversion state's storage in the plane's atomic_check function if a format conversion is necessary. Allows the update to fail if no memory is available. Avoids the same allocation within atomic_update, which may not fail. Also inline drm_plane_helper_atomic_check() into the driver and thus return early for invisible planes. Avoids memory allocation entirely in this case. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231009141018.11291-6-tzimmermann@suse.de commit 58b184dcb3f4c52c15b6ff4fa2fa0d69d1e1313f Author: Thomas Zimmermann Date: Mon Oct 9 16:06:33 2023 +0200 drm/ofdrm: Preallocate format-conversion buffer in atomic_check Preallocate the format-conversion state's storage in the plane's atomic_check function if a format conversion is necessary. Allows the update to fail if no memory is available. Avoids the same allocation within atomic_update, which may not fail. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231009141018.11291-5-tzimmermann@suse.de commit 4cd24d4b1a9548f42cdb7f449edc6f869a8ae730 Author: Thomas Zimmermann Date: Mon Oct 9 16:06:32 2023 +0200 drm/format-helper: Pass format-conversion state to helpers Pass an instance of struct drm_format_conv_state to DRM's format conversion helpers. Update all callers. Most drivers can use the format-conversion state from their shadow- plane state. The shadow plane's destroy function releases the allocated buffer. Drivers will later be able to allocate a buffer of appropriate size in their plane's atomic_check code. The gud driver uses a separate thread for committing updates. For now, the update worker contains its own format-conversion state. Images in the format-helper tests are small. The tests preallocate a static page for the temporary buffer. Unloading the module releases the memory. v6: * update patch for ssd132x support v5: * avoid using unusupported shadow-plane state in repaper (Noralf) * fix documentation (Noralf, kernel test robot) v3: * store buffer in shadow-plane state (Javier, Maxime) * replace ARRAY_SIZE() with sizeof() (Jani) Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas # ssd130x Cc: Noralf Trønnes Cc: Javier Martinez Canillas Cc: Gerd Hoffmann Cc: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20231009141018.11291-4-tzimmermann@suse.de commit 903674588a48df25bb79b1bedbfc48450f1d5d8f Author: Thomas Zimmermann Date: Mon Oct 9 16:06:31 2023 +0200 drm/atomic-helper: Add format-conversion state to shadow-plane state Store an instance of struct drm_format_conv_state in the shadow-plane state struct drm_shadow_plane_state. Many drivers with shadow planes use DRM's format helpers to copy or convert the framebuffer data to backing storage in the scanout buffer. The shadow plane provides the necessary state and manages the conversion's intermediate buffer memory. Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Noralf Trønnes Tested-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231009141018.11291-3-tzimmermann@suse.de commit 38b2d9d385102f430eb023aee1ed0ed37d9173f5 Author: Thomas Zimmermann Date: Mon Oct 9 16:06:30 2023 +0200 drm/format-helper: Cache buffers with struct drm_format_conv_state Hold temporary memory for format conversion in an instance of struct drm_format_conv_state. Update internal helpers of DRM's format-conversion code accordingly. Drivers will later be able to maintain this cache by themselves. Besides caching, struct drm_format_conv_state will be useful to hold additional information for format conversion, such as palette data or foreground/background colors. This will enable conversion from indexed color formats to component-based formats. v5: * improve documentation (Javier, Noralf) v3: * rename struct drm_xfrm_buf to struct drm_format_conv_state (Javier) * remove managed cleanup * add drm_format_conv_state_copy() for shadow-plane support Signed-off-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Acked-by: Noralf Trønnes Tested-by: Javier Martinez Canillas Link: https://patchwork.freedesktop.org/patch/msgid/20231009141018.11291-2-tzimmermann@suse.de commit 51dad0523b1e94493c9dd8596bd4a9d0d88d8fcb Author: Biju Das Date: Wed Nov 8 17:22:32 2023 +0000 arm64: dts: renesas: rzg2lc-smarc-som: Enable 4-bit tx support Enable 4-bit tx support for sbc node. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231108172232.259301-3-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ce3adea16612a677dd50bdad6861f37f5dc878c3 Author: Biju Das Date: Wed Nov 8 17:22:31 2023 +0000 arm64: dts: renesas: rzg2l-smarc-som: Enable 4-bit tx support Enable 4-bit tx support for sbc node. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231108172232.259301-2-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 6ea5c72b04cc6f45d57a2610113ad99a6755c8aa Author: Krzysztof Kozlowski Date: Fri Oct 13 16:59:35 2023 +0200 pinctrl: qcom: lpass-lpi: allow slew rate bit in main pin config register Existing Qualcomm SoCs have the LPASS pin controller slew rate control in separate register, however this will change with upcoming Qualcomm SoCs. The slew rate will be part of the main register for pin configuration, thus second device IO address space is not needed. Prepare for supporting new SoCs by adding flag customizing the driver behavior for slew rate. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231013145935.220945-3-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 28bb7c555c7ebcc810ef49e3361d60c5acbd7b36 Author: Krzysztof Kozlowski Date: Fri Oct 13 16:59:34 2023 +0200 pinctrl: qcom: lpass-lpi: split slew rate set to separate function Setting slew rate for each pin will grow with upcoming Qualcomm SoCs, so split the code responsible for this into separate function for easier readability and maintenance. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231013145935.220945-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit c3ed16a64c0b0a5b116c9753bf48496d49daffb5 Author: Sven Eckelmann Date: Mon Nov 13 16:27:45 2023 +0100 batman-adv: Switch to linux/array_size.h The commit 3cd39bc3b11b ("kernel.h: Move ARRAY_SIZE() to a separate header") introduced a new header for the ARRAY_SIZE macro which was previously exposed via linux/kernel.h. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 69f9aff27a94ba574567d3f1c57aca53c76dd01a Author: Sven Eckelmann Date: Mon Oct 30 15:58:35 2023 +0100 batman-adv: Switch to linux/sprintf.h The commit 39ced19b9e60 ("lib/vsprintf: split out sprintf() and friends") introduced a new header for the sprintf related functions which were previously exposed via linux/kernel.h. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 2dfe644a1ce017cacd449adabd68c3bc49199e11 Author: Linus Lüssing Date: Thu Sep 7 03:09:10 2023 +0200 batman-adv: mcast: shrink tracker packet after scrubbing Remove all zero MAC address entries (00:00:00:00:00:00) from a multicast packet's tracker TVLV before transmitting it and update all headers accordingly. This way, instead of keeping the multicast packet at a constant size throughout its journey through the mesh, it will become more lightweight, smaller with every interested receiver on the way and on each splitting intersection. Which can save some valuable bandwidth. Signed-off-by: Linus Lüssing Signed-off-by: Simon Wunderlich commit 90039133221e33964ccb4a536dad7eb0a372fff7 Author: Linus Lüssing Date: Thu Sep 7 03:09:09 2023 +0200 batman-adv: mcast: implement multicast packet generation Implement the preparation of a batman-adv multicast packet and use this under certain conditions. For one thing this implements the capability to push a complete batman-adv multicast packet header, including a tracker TVLV with all originator destinations that have signaled interest in it, onto a given ethernet frame with an IP multicast packet inside. For another checks are implemented to determine if encapsulating a multicast packet in this new batman-adv multicast packet type and using it is feasible. Those checks are: 1) Have all nodes signaled that they are capable of handling the new batman-adv multicast packet type? 2) Do all active hard interfaces of all nodes, including us, have an MTU of at least 1280 bytes? 3) Does a complete multicast packet header with all its destination addresses fit onto the given multicast packet / ethernet frame and does not exceed 1280 bytes? If all checks passed then the new batman-adv multicast packet type will be used for transmission and distribution. Otherwise we fall back to one or more batman-adv unicast packet transmissions, if possible. Or if not possible we will fall back to classic flooding through a batman-adv broadcast packet. Signed-off-by: Linus Lüssing Signed-off-by: Simon Wunderlich commit 07afe1ba288c04280622fa002ed385f1ac0b6fe6 Author: Linus Lüssing Date: Thu Sep 7 03:09:08 2023 +0200 batman-adv: mcast: implement multicast packet reception and forwarding Implement functionality to receive and forward a new TVLV capable multicast packet type. The new batman-adv multicast packet type allows to contain several originator destination addresses within a TVLV. Routers on the way will potentially split the batman-adv multicast packet and adjust its tracker TVLV contents. Routing decisions are still based on the selected BATMAN IV or BATMAN V routing algorithm. So this new batman-adv multicast packet type retains the same loop-free properties. Also a new OGM multicast TVLV flag is introduced to signal to other nodes that we are capable of handling a batman-adv multicast packet and multicast tracker TVLV. And that all of our hard interfaces have an MTU of at least 1280 bytes (IPv6 minimum MTU), as a simple solution for now to avoid MTU issues while forwarding. Signed-off-by: Linus Lüssing Signed-off-by: Simon Wunderlich commit e4679a1b8a73584c5774af0fe19bcece94245487 Author: Simon Wunderlich Date: Sun Sep 24 10:04:01 2023 +0200 batman-adv: Start new development cycle This version will contain all the (major or even only minor) changes for Linux 6.8. 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 727a92d62fd6a382b4c5972008e45667e707b0e4 Author: Jordan Rome Date: Sat Nov 11 18:30:10 2023 -0800 selftests/bpf: Add assert for user stacks in test_task_stack This is a follow up to: commit b8e3a87a627b ("bpf: Add crosstask check to __bpf_get_stack"). This test ensures that the task iterator only gets a single user stack (for the current task). Signed-off-by: Jordan Rome Signed-off-by: Andrii Nakryiko Acked-by: Stanislav Fomichev Link: https://lore.kernel.org/bpf/20231112023010.144675-1-linux@jordanrome.com commit b0e396d68fef9c9c050dfbb590cc0066441f65c7 Author: Luben Tuikov Date: Fri Nov 10 20:01:57 2023 -0500 Revert "drm/sched: Define pr_fmt() for DRM using pr_*()" From Jani: The drm_print.[ch] facilities use very few pr_*() calls directly. The users of pr_*() calls do not necessarily include at all, and really don't have to. Even the ones that do include it, usually have includes first, and includes next. Notably, includes . And, of course, defines pr_fmt() itself if not already defined. No, it's encouraged not to use pr_*() at all, and prefer drm device based logging, or device based logging. This reverts commit 36245bd02e88e68ac5955c2958c968879d7b75a9. Signed-off-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/878r75wzm9.fsf@intel.com Acked-by: Javier Martinez Canillas Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231111024130.11464-2-ltuikov89@gmail.com commit 069b142f58196bd9f47b35e493255741e2c663c7 Author: Vinicius Costa Gomes Date: Thu Sep 21 18:40:49 2023 -0700 igc: Add support for PTP .getcyclesx64() Add support for using Timer 1 (i225/i226 have 4 timer registers) as a free-running clock (the "cycles" clock) in addition to Timer 0 (the default, "adjustable clock"). The objective is to allow taprio/etf offloading to coexist with PTP vclocks. Besides the implementation of .getcyclesx64() for i225/i226, to keep timestamping working when vclocks are in use, we also need to add support for TX and RX timestamping using the free running timer, when the requesting socket is bound to a vclock. On the RX side, i225/i226 can be configured to store the values of two timers in the received packet metadata area, so it's a matter of configuring the right registers and retrieving the right timestamp. The TX is a bit more involved because the hardware stores a single timestamp (with the selected timer in the TX descriptor) into one of the timestamp registers. Note some changes at how the timestamps are done for RX, the conversion and adjustment of timestamps are now done closer to the consumption of the timestamp instead of near the reception. Signed-off-by: Vinicius Costa Gomes Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit fbe567785968d5ef65e64df879c64e545ea1c984 Author: Vinicius Costa Gomes Date: Thu Sep 21 18:40:48 2023 -0700 igc: Simplify setting flags in the TX data descriptor We can re-use the IGC_SET_FLAG() macro to simplify setting some values in the TX data descriptor. With the macro it's easier to get the meaning of the operations. Signed-off-by: Vinicius Costa Gomes Tested-by: Naama Meir Signed-off-by: Tony Nguyen commit 89b212d4afef64331b08c44e661a703d2be0970b Author: Thomas Weißschuh Date: Mon Nov 13 21:16:51 2023 +0100 selftests/nolibc: don't hang on config input When the kernel code has changed the build may ask for configuration input and hang. Prevent this and instead use the default settings. Signed-off-by: Thomas Weißschuh commit fa72d143471d04ce3055d8dad9743b08c19e4060 Author: Christophe JAILLET Date: Wed Nov 1 10:39:39 2023 +0100 HSI: omap_ssi: Remove usage of the deprecated ida_simple_xx() API ida_alloc() and ida_free() should be preferred to the deprecated ida_simple_get() and ida_simple_remove(). This is less verbose. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/d72106fc9de28ef8db2ed653febe366d141362a4.1698831563.git.christophe.jaillet@wanadoo.fr Signed-off-by: Sebastian Reichel commit d3534684ada99ef8c0899eb28c62b4462483ee19 Author: Syed Saba Kareem Date: Mon Nov 13 18:03:42 2023 +0530 ASoC: amd: acp: add Kconfig options for acp7.0 based platform driver ACP7.0 based platform legacy drivers can be built by selecting necessary kernel config option. This patch enables build support of the same. Signed-off-by: Syed Saba Kareem Link: https://lore.kernel.org/r/20231113123345.2196504-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown commit a55ea47bb8743ee044550c5dfdd3cb3147602e05 Author: Mac Chiang Date: Mon Nov 13 06:59:07 2023 -0500 ASoC: Intel: sof_rt5682: add mtl_rt5650 support RT5650 is I2S codec integrated with HP and SPK. The HW board connects SoC I2S to RT5650 codec as below: I2S0: ALC5650 aif1 for Speaker I2S2: ALC5650 aif2 for Headphone Reviewed-by: Bard Liao Signed-off-by: Mac Chiang Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20231113115907.18539-1-mac.chiang@intel.com Signed-off-by: Mark Brown commit a1321811985bed1b110d224a6c7ce1b967ee7607 Author: Charles Keepax Date: Mon Nov 13 15:14:29 2023 +0000 ASoC: cs42l43: Add missing static from runtime PM ops Fixes: 2b59332ead54 ("ASoC: cs42l43: Use new-style PM runtime macros") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311091824.5z6PROGZ-lkp@intel.com/ Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20231113151429.1554139-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 19b39caec0622cc291d3ac42ec1fe4f9b6535739 Author: Michal Swiatkowski Date: Tue Oct 24 13:09:29 2023 +0200 ice: reserve number of CP queues Rebuilding CP VSI each time the PR is created drastically increase the time of maximum VFs creation. Add function to reserve number of CP queues to deal with this problem. Use the same function to decrease number of queues in case of removing VFs. Assume that caller of ice_eswitch_reserve_cp_queues() will also call ice_eswitch_attach/detach() correct number of times. Still one by one PR adding is handy for VF resetting routine. Reviewed-by: Wojciech Drewek Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit c9663f79cd82e64d5bcce3b3aafbcae15494a592 Author: Michal Swiatkowski Date: Tue Oct 24 13:09:28 2023 +0200 ice: adjust switchdev rebuild path There is no need to use specific functions for rebuilding path. Let's use current implementation by removing all representors and as the result remove switchdev environment. It will be added in devices rebuild path. For example during adding VFs, port representors for them also will be created. Rebuild control plane VSI before removing representors with INIT_VSI flag set to reinit VSI in hardware after reset. Reviewed-by: Wojciech Drewek Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit fff292b47ac19258381fea50c9dfd26091ef7fbc Author: Michal Swiatkowski Date: Tue Oct 24 13:09:27 2023 +0200 ice: add VF representors one by one Implement adding representors one by one. Always set switchdev environment when first representor is being added and clear environment when last one is being removed. Basic switchdev configuration remains the same. Code related to creating and configuring representor was changed. Instead of setting whole representors in one function handle only one representor in setup function. The same with removing representors. Stop representors when new one is being added or removed. Stop means, disabling napi, stopping traffic and removing slow path rule. It is needed because ::q_id will change after remapping, so each representor will need new rule. When representor are stopped rebuild control plane VSI with one more or one less queue. One more if new representor is being added, one less if representor is being removed. Bridge port is removed during unregister_netdev() call on PR, so there is no need to call it from driver side. After that do remap new queues to correct vector. At the end start all representors (napi enable, start queues, add slow path rule). Reviewed-by: Piotr Raczynski Reviewed-by: Wojciech Drewek Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 5995ef88e3a8c2b014f51256a88be8e336532ce7 Author: Michal Swiatkowski Date: Tue Oct 24 13:09:26 2023 +0200 ice: realloc VSI stats arrays Previously only case when queues amount is lower was covered. Implement realloc for case when queues amount is higher than previous one. Use krealloc() function and zero new allocated elements. It has to be done before ice_vsi_def_cfg(), because stats element for ring is set there. Reviewed-by: Wojciech Drewek Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 86197ad5800bf5c2653495374b857ae5096d54ac Author: Michal Swiatkowski Date: Tue Oct 24 13:09:25 2023 +0200 ice: set Tx topology every time new repr is added It is needed to track correct Tx topology. Update it every time new representor is created or remove node in case of removing corresponding representor. Still clear all node when removing switchdev mode as part of Tx topology isn't related only to representors. Also clear ::rate_note value to prevent skipping this node next time Tx topology is created. Reviewed-by: Piotr Raczynski Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 292e0154006fcd7351cda334e928b089934c6fed Author: Michal Swiatkowski Date: Tue Oct 24 13:09:24 2023 +0200 ice: allow changing SWITCHDEV_CTRL VSI queues Implement mechanism to change number of queues for SWITCHDEV_CTRL VSI type. Value from ::req_txq/rxq will be written to ::alloc_txq/rxq after calling ice_vsi_rebuild(). Reviewed-by: Piotr Raczynski Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit deb53f2030e7db0e5f9c0b1ffdfd4fa43aa10ce5 Author: Michal Swiatkowski Date: Tue Oct 24 13:09:23 2023 +0200 ice: return pointer to representor In follow up patches it will be easier to obtain created port representor pointer instead of the id. Without it the pattern from eswitch side will look like: - create PR - get PR based on the id Reviewed-by: Przemek Kitszel Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 604283e95eb0b2f4f38238e7acec4f1d68e00e2e Author: Michal Swiatkowski Date: Tue Oct 24 13:09:22 2023 +0200 ice: make representor code generic Representor code needs to be independent from specific device type, like in this case VF. Make generic add / remove representor function and specific add VF / rem VF function. New device types will follow this scheme. In bridge offload code there is a need to get representor pointer based on VSI. Implement helper function to achieve that. Reviewed-by: Piotr Raczynski Reviewed-by: Wojciech Drewek Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit e4c46abc729130d03e22ce7e54554c698df8893d Author: Michal Swiatkowski Date: Tue Oct 24 13:09:21 2023 +0200 ice: remove VF pointer reference in eswitch code Make eswitch code generic by removing VF pointer reference in functions. It is needed to support eswitch mode for other type of devices. Previously queue id used for Rx was based on VF number. Use ::q_id saved in port representor instead. After adding or removing port representor ::q_id value can change. It isn't good idea to iterate over representors list using this value. Use xa_find starting from the first one instead to get next port representor to remap. The number of port representors has to be equal to ::num_rx/tx_q. Warn if it isn't true. Reviewed-by: Przemek Kitszel Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit af41b1859024114c672c483ccd635c88b71eaf3d Author: Michal Swiatkowski Date: Tue Oct 24 13:09:20 2023 +0200 ice: track port representors in xarray Instead of assuming that each VF has pointer to port representor save it in xarray. It will allow adding port representor for other device types. Drop reference to VF where it is use only to get port representor. Get it from xarray instead. The functions will no longer by specific for VF, rename them. Track id assigned by xarray in port representor structure. The id can't be used as ::q_id, because it is fixed during port representor lifetime. ::q_id can change after adding / removing other port representors. Side effect of removing VF pointer is that we are losing VF MAC information used in unrolling. Store it in port representor as parent MAC. Reviewed-by: Piotr Raczynski Reviewed-by: Wojciech Drewek Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit 5c53c1224f241284d1945c62697e1140f2147b05 Author: Michal Swiatkowski Date: Tue Oct 24 13:09:19 2023 +0200 ice: use repr instead of vf->repr Extract repr from vf->repr as it is often use in the ice_repr_rem(). Remove meaningless clearing of q_vector and netdev pointers as kfree is called on repr pointer. Reviewed-by: Przemek Kitszel Reviewed-by: Wojciech Drewek Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Signed-off-by: Tony Nguyen commit 7c37bf99a60c990682829e71fb86f75494d02504 Author: Michal Swiatkowski Date: Tue Oct 24 13:09:18 2023 +0200 ice: track q_id in representor Previously queue index of control plane VSI used by port representor was always id of VF. If we want to allow adding port representors for different devices we have to track queue index in the port representor structure. Reviewed-by: Wojciech Drewek Reviewed-by: Piotr Raczynski Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen commit ff21a4e6193f4f752f37a9e16dd6a47074eb9076 Author: Michal Swiatkowski Date: Tue Oct 24 13:09:17 2023 +0200 ice: remove unused control VSI parameter It isn't used in ice_eswitch_release_reprs(). Probably leftover. Remove it. Commit that has removed usage of ctrl_vsi: commit c1e5da5dd465 ("ice: improve switchdev's slow-path") Reviewed-by: Wojciech Drewek Reviewed-by: Piotr Raczynski Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Signed-off-by: Tony Nguyen commit ab5fe17cbb06516877753ee1069e13967f8cc6bb Author: Michal Swiatkowski Date: Tue Oct 24 13:09:16 2023 +0200 ice: remove redundant max_vsi_num variable It is a leftover from previous implementation. Accidentally it wasn't removed. Do it now. Commit that has removed it: commit c1e5da5dd465 ("ice: improve switchdev's slow-path") Reviewed-by: Wojciech Drewek Reviewed-by: Piotr Raczynski Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Signed-off-by: Tony Nguyen commit 5a841e4eb8ed2fea91025b19af8a9ba544f63323 Author: Michal Swiatkowski Date: Tue Oct 24 13:09:15 2023 +0200 ice: rename switchdev to eswitch Eswitch is used as a prefix for related functions. Main structure storing all data related to eswitch should also be named as eswitch instead of ice_switchdev_info. Rename it. Also rename switchdev to eswitch where the context is not about eswitch mode. ::uplink_netdev was changed to netdev for simplicity. There is no other netdev in function scope so it is obvious. Reviewed-by: Wojciech Drewek Reviewed-by: Piotr Raczynski Reviewed-by: Jacob Keller Signed-off-by: Michal Swiatkowski Signed-off-by: Tony Nguyen commit e596ff4a79300423b2ae8fbd1a78a3e311f99dfe Author: Serge Hallyn Date: Mon Nov 13 10:22:22 2023 -0600 mailmap: add entries for Serge Hallyn's dead accounts Signed-off-by: Serge Hallyn Signed-off-by: Paul Moore commit 6f9da18171889fae105e1413a825c53fa5aab40c Merge: 2f2802d1a59d7 09388379b6d71 Author: Mark Brown Date: Mon Nov 13 18:15:20 2023 +0000 Add STM32F7 SPI support Merge series from Ben Wolsieffer : This series adds support for SPI on STM32F7 processors. The STM32F7 SPI peripheral is nearly identical to the STM32F4, with the only significant differences being that it supports a wider range of word sizes, and the addition of 32-bit transmit and receive FIFOs. v2: - Add missing commit body Ben Wolsieffer (5): spi: stm32: rename stm32f4_* to stm32fx_* spi: stm32: use callbacks for read_rx and write_tx dt-bindings: spi: add stm32f7-spi compatible spi: stm32: add STM32F7 support ARM: dts: stm32: add SPI support on STM32F746 .../devicetree/bindings/spi/st,stm32-spi.yaml | 1 + arch/arm/boot/dts/st/stm32f746.dtsi | 60 +++ drivers/spi/spi-stm32.c | 455 ++++++++++++------ 3 files changed, 367 insertions(+), 149 deletions(-) -- 2.42.0 commit 753e4d5c433da57da75dd4c3e1aececc8e874a62 Merge: 413cfaa7ed8b1 1e22152aa59d7 Author: Mark Brown Date: Mon Nov 13 18:15:05 2023 +0000 regulator: add under-voltage support (part 2) Merge series from Oleksij Rempel : This series add under-voltage and emergency shutdown for system critical regulators commit 413cfaa7ed8b120e7d934cbce26433e3f7b0ff76 Merge: e1eb745006ac4 40e13ae67c6fc Author: Mark Brown Date: Mon Nov 13 18:14:57 2023 +0000 Add PM8937 PMIC support Merge series from Dang Huynh : PM8937 is a power management IC. It is used in various boards with MSM8917, MSM8937, MSM8940 and APQ variants. commit 0a59f2415b5da5e0dab1fa869ba2e19e25ec1b1a Merge: 8aa49ba73384e 8a81491adbd9b Author: Mark Brown Date: Mon Nov 13 18:14:37 2023 +0000 ASoC: codecs: ES8326 Merge series from Zhu Ning : We developed a new version of the chip. 3 Three patches are used for compatibility with the old and new versions of the chip.We did tests with the new driver at version_v0 and version_v3.The test results from the test department met our expectations.Both versions work well with the new drivers. commit 50c1a36f594bb3dd33f3f9386c5d960cd12327d8 Author: Danilo Krummrich Date: Wed Nov 8 01:12:41 2023 +0100 drm/gpuvm: track/lock/validate external/evicted objects Currently the DRM GPUVM offers common infrastructure to track GPU VA allocations and mappings, generically connect GPU VA mappings to their backing buffers and perform more complex mapping operations on the GPU VA space. However, there are more design patterns commonly used by drivers, which can potentially be generalized in order to make the DRM GPUVM represent a basis for GPU-VM implementations. In this context, this patch aims at generalizing the following elements. 1) Provide a common dma-resv for GEM objects not being used outside of this GPU-VM. 2) Provide tracking of external GEM objects (GEM objects which are shared with other GPU-VMs). 3) Provide functions to efficiently lock all GEM objects dma-resv the GPU-VM contains mappings of. 4) Provide tracking of evicted GEM objects the GPU-VM contains mappings of, such that validation of evicted GEM objects is accelerated. 5) Provide some convinience functions for common patterns. Big thanks to Boris Brezillon for his help to figure out locking for drivers updating the GPU VA space within the fence signalling path. Acked-by: Christian König Reviewed-by: Boris Brezillon Reviewed-by: Thomas Hellström Suggested-by: Matthew Brost Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-12-dakr@redhat.com commit 94bc2249f08e141fb4aa120bfdc392c7a5e78211 Author: Danilo Krummrich Date: Wed Nov 8 01:12:40 2023 +0100 drm/gpuvm: add an abstraction for a VM / BO combination Add an abstraction layer between the drm_gpuva mappings of a particular drm_gem_object and this GEM object itself. The abstraction represents a combination of a drm_gem_object and drm_gpuvm. The drm_gem_object holds a list of drm_gpuvm_bo structures (the structure representing this abstraction), while each drm_gpuvm_bo contains list of mappings of this GEM object. This has multiple advantages: 1) We can use the drm_gpuvm_bo structure to attach it to various lists of the drm_gpuvm. This is useful for tracking external and evicted objects per VM, which is introduced in subsequent patches. 2) Finding mappings of a certain drm_gem_object mapped in a certain drm_gpuvm becomes much cheaper. 3) Drivers can derive and extend the structure to easily represent driver specific states of a BO for a certain GPUVM. The idea of this abstraction was taken from amdgpu, hence the credit for this idea goes to the developers of amdgpu. Cc: Christian König Acked-by: Christian König Reviewed-by: Thomas Hellström Reviewed-by: Boris Brezillon Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-11-dakr@redhat.com commit 8af72338dd81d1f8667e0240bd28f5fc98b3f20d Author: Danilo Krummrich Date: Wed Nov 8 01:12:39 2023 +0100 drm/gpuvm: reference count drm_gpuvm structures Implement reference counting for struct drm_gpuvm. Acked-by: Christian König Reviewed-by: Thomas Hellström Reviewed-by: Boris Brezillon Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-10-dakr@redhat.com commit 266f7618e761c8a6aa89dbfe43cda1b69cdbbf14 Author: Danilo Krummrich Date: Wed Nov 8 01:12:38 2023 +0100 drm/nouveau: separately allocate struct nouveau_uvmm Allocate struct nouveau_uvmm separately in preparation for subsequent commits introducing reference counting for struct drm_gpuvm. While at it, get rid of nouveau_uvmm_init() as indirection of nouveau_uvmm_ioctl_vm_init() and perform some minor cleanups. Reviewed-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-9-dakr@redhat.com commit 809ef191ee600e8bcbe2f8a769e00d2d54c16094 Author: Danilo Krummrich Date: Wed Nov 8 01:12:37 2023 +0100 drm/gpuvm: add drm_gpuvm_flags to drm_gpuvm Introduce flags for struct drm_gpuvm, this required by subsequent commits. Acked-by: Christian König Reviewed-by: Boris Brezillon Reviewed-by: Thomas Hellström Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-8-dakr@redhat.com commit 6118411428a393fb0868bad9025d71875418058b Author: Danilo Krummrich Date: Wed Nov 8 01:12:36 2023 +0100 drm/nouveau: make use of the GPUVM's shared dma-resv DRM GEM objects private to a single GPUVM can use a shared dma-resv. Make use of the shared dma-resv of GPUVM rather than a driver specific one. The shared dma-resv originates from a "root" GEM object serving as container for the dma-resv to make it compatible with drm_exec. In order to make sure the object proving the shared dma-resv can't be freed up before the objects making use of it, let every such GEM object take a reference on it. Reviewed-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-7-dakr@redhat.com commit bbe8458037e74b9887ba2f0f0b8084a13ade3a90 Author: Danilo Krummrich Date: Wed Nov 8 01:12:35 2023 +0100 drm/gpuvm: add common dma-resv per struct drm_gpuvm Provide a common dma-resv for GEM objects not being used outside of this GPU-VM. This is used in a subsequent patch to generalize dma-resv, external and evicted object handling and GEM validation. Acked-by: Christian König Reviewed-by: Boris Brezillon Reviewed-by: Thomas Hellström Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-6-dakr@redhat.com commit b41e297abd2347075ec640daf0e5da576e3d7418 Author: Danilo Krummrich Date: Wed Nov 8 01:12:34 2023 +0100 drm/nouveau: make use of drm_gpuvm_range_valid() Use drm_gpuvm_range_valid() in order to validate userspace requests. Reviewed-by: Dave Airlie Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-5-dakr@redhat.com commit 9297cfc9405bc6b60540b8b8aaf930b7e449e15a Author: Danilo Krummrich Date: Wed Nov 8 01:12:33 2023 +0100 drm/gpuvm: export drm_gpuvm_range_valid() Drivers may use this function to validate userspace requests in advance, hence export it. Acked-by: Christian König Reviewed-by: Thomas Hellström Reviewed-by: Boris Brezillon Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-4-dakr@redhat.com commit d1adea27d0c8a08031b075f1bf4c5ce6f135ad7c Author: Danilo Krummrich Date: Wed Nov 8 01:12:32 2023 +0100 drm/gpuvm: don't always WARN in drm_gpuvm_check_overflow() Don't always WARN in drm_gpuvm_check_overflow() and separate it into a drm_gpuvm_check_overflow() and a dedicated drm_gpuvm_warn_check_overflow() variant. This avoids printing warnings due to invalid userspace requests. Acked-by: Christian König Reviewed-by: Thomas Hellström Reviewed-by: Boris Brezillon Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-3-dakr@redhat.com commit 546ca4d35dccaca6613766ed36ccfb2b5bd63bfe Author: Danilo Krummrich Date: Wed Nov 8 01:12:31 2023 +0100 drm/gpuvm: convert WARN() to drm_WARN() variants Use drm_WARN() and drm_WARN_ON() variants to indicate drivers the context the failing VM resides in. Acked-by: Christian König Reviewed-by: Boris Brezillon Reviewed-by: Thomas Hellström Signed-off-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-2-dakr@redhat.com commit fb77e8a8591512449c6736fd718c33a8afab8b95 Merge: b85ea95d08647 c4a79ae280a63 Author: Andy Shevchenko Date: Mon Nov 13 18:00:19 2023 +0200 Merge patch series "Use the standard _PM_OPS() export macro in Intel Tangier GPIO driver" Raag Jadav says: This series exports pm_ops structure from Intel Tangier GPIO driver using EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() helper and reuses it into its users. Link: https://lore.kernel.org/r/20231113131600.10828-1-raag.jadav@intel.com Signed-off-by: Andy Shevchenko commit c4a79ae280a632786d6f9c7856ef27ebaa585ea7 Author: Raag Jadav Date: Mon Nov 13 18:46:00 2023 +0530 gpio: tangier: unexport suspend/resume handles Unexport suspend/resume handles for the lack of external users and while at it, make them static, so that they can be discarded by the compiler if not used (CONFIG_PM_SLEEP=n). Signed-off-by: Raag Jadav Link: https://lore.kernel.org/r/20231113131600.10828-4-raag.jadav@intel.com Signed-off-by: Andy Shevchenko commit 49d478b41268bb2419e44d876bf66bacc55135f5 Author: Raag Jadav Date: Mon Nov 13 18:45:59 2023 +0530 gpio: elkhartlake: reuse pm_ops from Intel Tangier driver Reuse tng_gpio_pm_ops from Intel Tangier driver instead of calling them through a local copy. Signed-off-by: Raag Jadav Link: https://lore.kernel.org/r/20231113131600.10828-3-raag.jadav@intel.com Signed-off-by: Andy Shevchenko commit fc84abc4a9b25da0559622c41045212175d6732f Author: Raag Jadav Date: Mon Nov 13 18:45:58 2023 +0530 gpio: tangier: use EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() helper Use EXPORT_NS_GPL_SIMPLE_DEV_PM_OPS() helper to export pm_ops to GPIO_TANGIER namespace, so that they can be reused. Signed-off-by: Raag Jadav Link: https://lore.kernel.org/r/20231113131600.10828-2-raag.jadav@intel.com Signed-off-by: Andy Shevchenko commit 22f57707fa0c17072851de60706d01f5836cd36b Author: Raag Jadav Date: Mon Nov 13 18:25:34 2023 +0530 pinctrl: intel: allow independent COMPILE_TEST Now that we have completed the transition to standard ACPI helpers for the entire Intel pinctrl tree, we can detach COMPILE_TEST from ACPI dependency. Signed-off-by: Raag Jadav Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 8f157593689fcffc2d9b18af9472fce764188b43 Author: Yang Li Date: Mon Oct 30 14:02:25 2023 +0800 wifi: ath11k: Remove unneeded semicolon ./drivers/net/wireless/ath/ath11k/fw.c:136:2-3: Unneeded semicolon Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7073 Signed-off-by: Yang Li Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231030060225.28987-1-yang.lee@linux.alibaba.com commit 2a3ec40b98b46c339adb57313d3b933ee5e7a8e8 Author: Luca Weiss Date: Fri Oct 27 08:57:18 2023 +0200 wifi: ath11k: Defer on rproc_get failure If we already have gotten the rproc_handle (meaning the "qcom,rproc" property is defined in the devicetree), it's a valid state that the remoteproc module hasn't probed yet so we should defer probing instead of just failing to probe. This resolves a race condition when the ath11k driver probes and fails before the wpss remoteproc driver has probed, like the following: [ 6.232360] ath11k 17a10040.wifi: failed to get rproc [ 6.232366] ath11k 17a10040.wifi: failed to get rproc: -22 [ 6.232478] ath11k: probe of 17a10040.wifi failed with error -22 ... [ 6.252415] remoteproc remoteproc2: 8a00000.remoteproc is available [ 6.252776] remoteproc remoteproc2: powering up 8a00000.remoteproc [ 6.252781] remoteproc remoteproc2: Booting fw image qcom/qcm6490/fairphone5/wpss.mdt, size 7188 So, defer the probe if we hit that so we can retry later once the wpss remoteproc is available. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-01264-QCAMSLSWPLZ-1.37886.3 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Luca Weiss Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231027-ath11k-rproc-defer-v1-1-f6b6a812cd18@fairphone.com commit 619bc6e034f3ec3ab88eba856f2f4ffdec26ea38 Author: Sudeep Holla Date: Mon Nov 13 14:32:52 2023 +0000 firmware: arm_scmi: Populate fastchannel info only if set operations are allowed Certain SCMI performance domains may have restrictions on the set level and/or limits operation. If the SCMI domain supports fastchannel and the set operations are not allowed, then any attempts to fetch the fastchannel information for set level and/or limits operation will result in the SCMI platform returning SCMI_ERR_SUPPORT. However, since this information about the domain is already known to the agent(OSPM here) obtained via PERF_DOMAIN_ATTRIBUTES, the agent(OSPM) can avoid calls to the firmware trying to fetch the fastchannel information for the same. Add those checks and skip querying the fastchannel information from the firmware based on the information collected during the domain enumeration stage. Link: https://lore.kernel.org/r/20231113143252.37160-1-sudeep.holla@arm.com Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 189df98777a32c17d73e116df144e22b2ac3ae6b Author: xinglong.yang Date: Thu Nov 9 16:28:55 2023 +0800 firmware: arm_scmi: Check beforehand if the perf domain set operations are allowed Certain SCMI performance domains may have restrictions on the set level and/or limits operation. If the set level/limits are performed by an agent who is not allowed to do so may get SCMI_ERR_SUPPORT. However, since this information about the domain is already known to the agent(OSPM here) obtained via PERF_DOMAIN_ATTRIBUTES, the agent(OSPM) can avoid making PERF_LEVEL_SET and PERF_LIMITS_SET calls to the firmware. Add those checks and return -ENOTSUPP to the caller without interacting with the firmware based on the information collected during the domain enumeration stage. Signed-off-by: xinglong.yang Link: https://lore.kernel.org/r/20231109082855.472681-1-xinglong.yang@cixtech.com Signed-off-by: Sudeep Holla commit 8aa49ba73384e5c2587ece090fe98d439261c388 Merge: 696e2d9bf35b6 89ef42088b3ba Author: Mark Brown Date: Mon Nov 13 14:08:49 2023 +0000 ASoC: SOF: Add support for MICFIL PDM interface Merge series from Daniel Baluta : This is used for configuring MICFIL PDM with i.MX8MPlus. Tested with 8MIC-RPI-MX8 microphone array. commit 696e2d9bf35b6e5304ab734fe47a82fb1c330e71 Merge: 82e340ca3f25d ca5abf5d2e1c3 Author: Mark Brown Date: Mon Nov 13 14:08:40 2023 +0000 ASoC: Intel: avs: Properly identify boards Merge series from Amadeusz Sławiński : Instead of using MODULE_ALIAS() to load boards, add proper device id table and use MODULE_DEVICE_TABLE() macro to create board alias. commit 82e340ca3f25dc3ddd20e88e3606ed9006f90f5d Merge: 42186bae06474 a08ee9d00e312 Author: Mark Brown Date: Mon Nov 13 14:08:33 2023 +0000 ASoC: SOF: mediatek: remove unused variables Merge series from Trevor Wu : There are some variables that are no longer being used because they were declared for the deprecated memory layout. Currently, these code sections confuse the users. Therefore, this series removes the code that was implemented for those variables. commit 42186bae0647478eadcdf0b45accae3c53a61294 Merge: 601cc04c9d73e 91d1a18b6381a Author: Mark Brown Date: Mon Nov 13 14:08:25 2023 +0000 Add DMIC slew rate controls Merge series from Seven Lee : Determine DMIC slew rate via property setup. Change: V3 -> V4: - add "maximum: 7" description. V2 -> V3: - Update description of DMIC slew rate and remove "selection" key words from property name - Corrected variable name of DMIC slew rate from c file V1 -> V2: - Corrected description of DMIC slew rate. Seven Lee (2): ASoC: dt-bindings: nau8821: Add DMIC slew rate. ASoC: nau8821: Add slew rate controls. .../devicetree/bindings/sound/nuvoton,nau8821.yaml | 9 +++++++++ sound/soc/codecs/nau8821.c | 7 +++++++ sound/soc/codecs/nau8821.h | 3 +++ 3 files changed, 19 insertions(+) -- 2.25.1 commit 22a4a9ed37d675c210d530f2de92cc6afbcf1daa Author: Neil Armstrong Date: Mon Nov 6 09:32:32 2023 +0100 pinctrl: qcom: Introduce the SM8650 Top Level Mode Multiplexer driver Add Top Level Mode Multiplexer (pinctrl) support for the SM8650 platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-tlmm-v3-3-0e179c368933@linaro.org Signed-off-by: Linus Walleij commit 76b446f5b86e93515602c3afef6ff74c7e6562de Author: Neil Armstrong Date: Mon Nov 6 09:32:31 2023 +0100 pinctrl: qcom: handle intr_target_reg wakeup_present/enable bits New platforms uses a new set of bits to control the wakeirq delivery to the PDC block. The intr_wakeup_present_bit indicates if the GPIO supports wakeirq and intr_wakeup_enable_bit enables wakeirq delivery to the PDC block. While the name seems to imply this only enables wakeup events, it is required to allow interrupts events to the PDC block. Enable this bit in the irq resource request/free if: - gpio is in wakeirq map - has the intr_wakeup_present_bit - the intr_wakeup_enable_bit is set Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-tlmm-v3-2-0e179c368933@linaro.org Signed-off-by: Linus Walleij commit d92618caf9d05e78e0f9c4c6ff9201691acfe48c Author: Neil Armstrong Date: Mon Nov 6 09:32:30 2023 +0100 dt-bindings: pinctrl: document the SM8650 Top Level Mode Multiplexer Document the Top Level Mode Multiplexer on the SM8650 Platform. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20231106-topic-sm8650-upstream-tlmm-v3-1-0e179c368933@linaro.org Signed-off-by: Linus Walleij commit c4e47673853f2b020e2390832e9df83b3a84d7b0 Author: Krzysztof Kozlowski Date: Fri Oct 27 11:36:15 2023 +0200 pinctrl: qcom: sm8650-lpass-lpi: add SM8650 LPASS Add driver for the pin controller in Low Power Audio SubSystem (LPASS) of Qualcomm SM8650 SoC. Notable differences against SM8550 LPASS pin controller: 1. Additional address space for slew rate thus driver uses LPI_FLAG_SLEW_RATE_SAME_REG and sets slew rate via different register. 2. Two new pin mux functions: qca_swr_clk and qca_swr_data Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231027093615.140656-3-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit 2220638d375a15864ef6b933b9057a92dd566c07 Author: Krzysztof Kozlowski Date: Fri Oct 27 11:36:14 2023 +0200 dt-bindings: pinctrl: qcom,sm8650-lpass-lpi-pinctrl: add SM8650 LPASS Add bindings for the pin controller in Low Power Audio SubSystem (LPASS) of Qualcomm SM8650 SoC. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20231027093615.140656-2-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij commit bf800ca415676085813ad53899264618a60db471 Author: Thierry Reding Date: Fri Sep 29 14:21:01 2023 +0200 pinctrl: tegra: Display pin function in pinconf-groups The function that a pin is muxed to can be read from the top-level pinctrl-maps debugfs file. However, this only reflects the values that were specified in device tree, so they will only show deviations from the hardware default setting. Display the current pinmux setting in the per-controller pinconf-groups debugfs file along with the rest of the per-pin configuration settings. Signed-off-by: Thierry Reding Tested-by: Luca Ceresoli Link: https://lore.kernel.org/r/20230929122101.466266-1-thierry.reding@gmail.com Signed-off-by: Linus Walleij commit 2bbaebc5a75901404715a61e5a5c304ded5eee37 Author: Geert Uytterhoeven Date: Wed Oct 25 12:04:23 2023 +0200 ARM: dts: renesas: marzen: Rename keyboard nodes make dtbs_check: arch/arm/boot/dts/renesas/r8a7779-marzen.dtb: /: keyboard-gpio: {'compatible': ['gpio-keys-polled'], 'poll-interval': [[50]], 'pinctrl-0': [[29]], 'pinctrl-names': ['default'], 'key-3': {'gpios': [[28, 19, 1]], 'linux,code': [[4]], 'label': ['SW1-3'], 'debounce-interval': [[20]]}, 'key-4': {'gpios': [[28, 20, 1]], 'linux,code': [[5]], 'label': ['SW1-4'], 'debounce-interval': [[20]]}} is not of type 'array' from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml# arch/arm/boot/dts/renesas/r8a7779-marzen.dtb: pinctrl@fffc0000: keyboard-gpio: {'pins': ['GP_0_19', 'GP_0_20'], 'bias-pull-up': True, 'phandle': [[29]]} is not of type 'array' from schema $id: http://devicetree.org/schemas/gpio/gpio-consumer.yaml# Node names ending in "-gpio" confuse the checker. Fix this by renaming the keyboards to "keypad-0" and "keypad-1", as they are not full keyboards. Signed-off-by: Geert Uytterhoeven Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/eec1ccfb75c6215428609fdcaf3a37c75fe1fc87.1698228163.git.geert+renesas@glider.be commit 788d24c59d24c446c479ecb1779eaa67325fca7c Author: Geert Uytterhoeven Date: Wed Oct 25 12:09:31 2023 +0200 ARM: dts: renesas: iwg22d-sodimm: Fix stmpe node names make dtbs_check: arch/arm/boot/dts/renesas/r8a7745-iwg22d-sodimm.dtb: stmpe811@44: 'stmpe_touchscreen' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/st,stmpe.yaml# arch/arm/boot/dts/renesas/r8a7745-iwg22d-sodimm-dbhd-ca.dtb: stmpe811@44: 'stmpe_touchscreen' does not match any of the regexes: 'pinctrl-[0-9]+' from schema $id: http://devicetree.org/schemas/mfd/st,stmpe.yaml# Fix this by using recommended node names for the STMicroelectronics Port Expander (STMPE) device node and its subnode. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/40536ce7ca01e5acc9ed1d595f0e3a720eeb78d7.1698228434.git.geert+renesas@glider.be commit 74c3bb4819071e94bfa58d13ea4825065f00587c Author: Geert Uytterhoeven Date: Mon Oct 23 15:52:17 2023 +0200 arm64: dts: renesas: Add missing ADV751[13] power supply properties make dtbs_check: arch/arm64/boot/dts/renesas/r8a77990-ebisu.dtb: hdmi-encoder@39: 'avdd-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# arch/arm64/boot/dts/renesas/r8a77990-ebisu.dtb: hdmi-encoder@39: 'dvdd-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# arch/arm64/boot/dts/renesas/r8a77990-ebisu.dtb: hdmi-encoder@39: 'pvdd-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# arch/arm64/boot/dts/renesas/r8a77990-ebisu.dtb: hdmi-encoder@39: 'dvdd-3v-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# arch/arm64/boot/dts/renesas/r8a77990-ebisu.dtb: hdmi-encoder@39: 'bgvdd-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# ... Fix this by adding the missing power supply properties. Add fixed regulators where needed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/4d58019b2f5f7ce026a5b671ac54aab79a58b278.1698068647.git.geert+renesas@glider.be commit cc75154c2f106d033f45c06412a1e432eda50634 Author: Geert Uytterhoeven Date: Mon Oct 23 15:52:16 2023 +0200 ARM: dts: renesas: Add missing ADV751[13] power supply properties make dtbs_check: arch/arm/boot/dts/renesas/r8a7791-koelsch.dtb: hdmi@39: 'avdd-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# arch/arm/boot/dts/renesas/r8a7791-koelsch.dtb: hdmi@39: 'dvdd-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# arch/arm/boot/dts/renesas/r8a7791-koelsch.dtb: hdmi@39: 'pvdd-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# arch/arm/boot/dts/renesas/r8a7791-koelsch.dtb: hdmi@39: 'dvdd-3v-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# arch/arm/boot/dts/renesas/r8a7791-koelsch.dtb: hdmi@39: 'bgvdd-supply' is a required property from schema $id: http://devicetree.org/schemas/display/bridge/adi,adv7511.yaml# ... Fix this by adding the missing power supply properties, and by adding fixed regulators where needed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/6c49fd83d327a68040f052bd9fd96fe25b0fc301.1698068647.git.geert+renesas@glider.be commit a84e0556f1347936557dabfd875b55563de52d16 Author: Geert Uytterhoeven Date: Mon Oct 23 15:52:15 2023 +0200 ARM: dts: renesas: rcar-gen2: Fix I2C bus demux node names make dtbs_check: $nodename:0: 'i2c-10' does not match '^(i2c-?)?mux' Fix this by renaming all I2C bus demultiplexer node names to "i2c-mux". Signed-off-by: Geert Uytterhoeven Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/63e97cb50282b3255ba9654f539b9baa8c621b30.1698068647.git.geert+renesas@glider.be commit bfc1d3a9011a35e673b026055194dc09e734742a Author: Conor Dooley Date: Mon Oct 9 10:37:48 2023 +0100 riscv: dts: renesas: Convert isa detection to new properties Convert the RZ/Five devicetrees to use the new properties "riscv,isa-base" & "riscv,isa-extensions". For compatibility with other projects, "riscv,isa" remains. Signed-off-by: Conor Dooley Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20231009-smog-gag-3ba67e68126b@wendy Signed-off-by: Geert Uytterhoeven commit d758ec1ceedb07607a005c7f2deb2fcbf2e170a4 Author: Geert Uytterhoeven Date: Thu Aug 31 13:52:35 2023 +0200 ARM: dts: renesas: blanche: Add FLASH node Add a device node for the Spansion S29GL512S NOR FLASH on the Blanche development board. This FLASH resides in the external address space of the Local Bus State Controller. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/7edb26bc29ad58198901ae6b6f869684473bb29d.1693481518.git.geert+renesas@glider.be commit 6ebf1725e1f0bf712f547de7d9d14066279bb546 Author: Geert Uytterhoeven Date: Thu Aug 31 13:52:34 2023 +0200 ARM: dts: renesas: marzen: Add FLASH node Add a device node for the Spansion S29GL512N NOR FLASH on the Marzen development board. This FLASH resides in the external address space of the Local Bus State Controller. Note that as the CFI-FLASH has a run-time conflict with CPU bring-up, it will only be available when booting with SMP disabled. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/440ce3bb950c34fd57071b4eec83ad9643b682e5.1693481518.git.geert+renesas@glider.be commit 59be90248b422f2924872de0be2867652214096a Author: Mika Kahola Date: Thu Nov 9 13:21:48 2023 +0200 drm/i915/mtl: C20 state verification Add state verification for C20 as we have one for C10. V2: Use abstractation of HW readout (Gustavo) Drop MPLLA/B from message for TX and CMN parameters (Gustavo) Reviewed-by: Gustavo Sousa (v1,v2) Signed-off-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20231109112148.309669-1-mika.kahola@intel.com commit a35c62ba7ae5f96f6e2683beed3f9c7ee37548cf Author: Andy Shevchenko Date: Mon Oct 30 17:59:06 2023 +0200 pinctrl: intel: Refactor intel_pinctrl_get_soc_data() Refactor intel_pinctrl_get_soc_data() to drop initial assignment of the data variable. It's only used in ACPI case and instead we may always assign it there as the ACPI ID table has the terminator entry that has driver data set to NULL. Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 6217728b38580bd3a4c6db6f65359f93c52f5901 Author: Andy Shevchenko Date: Mon Oct 30 17:54:32 2023 +0200 pinctrl: intel: Move default strength assignment to a switch-case iWhen ->pin_config_set() is called from the GPIO library (assumed GpioIo() ACPI resource), the argument can be 1, when, for example, PullDefault is provided. In such case we supply sane default in the driver. Move that default assingment to a switch-case, so it will be consolidated in one place. Signed-off-by: Andy Shevchenko commit 0a4cfed79e4f4498c5f9d76c7e149e51a32d5be5 Author: Andy Shevchenko Date: Mon Oct 30 17:53:40 2023 +0200 pinctrl: tangier: Move default strength assignment to a switch-case iWhen ->pin_config_set() is called from the GPIO library (assumed GpioIo() ACPI resource), the argument can be 1, when, for example, PullDefault is provided. In such case we supply sane default in the driver. Move that default assingment to a switch-case, so it will be consolidated in one place. Reviewed-by: Linus Walleij Reviewed-by: Raag Jadav Signed-off-by: Andy Shevchenko commit 2b9282afa8e9c34c42de42c2064a056a735fd7f0 Author: Andy Shevchenko Date: Mon Oct 30 16:14:04 2023 +0200 pinctrl: tangier: Enable 910 Ohm bias Family 7 (I2C) supports special bias value, i.e. 910 Ohm. Enable it for configuring pin. Reviewed-by: Linus Walleij Acked-by: Mika Westerberg Reviewed-by: Raag Jadav Signed-off-by: Andy Shevchenko commit fe22bc430c9d24394e541e16e0941a075f02fcb7 Author: Hou Wenlong Date: Fri Jun 9 17:45:32 2023 +0800 x86/paravirt: Make the struct paravirt_patch_site packed Similar to struct alt_instr, make the struct paravirt_patch_site packed and get rid of all the .align directives and save 2 bytes for one PARA_SITE entry on X86_64. [ bp: Massage commit message. ] Suggested-by: Nadav Amit Signed-off-by: Hou Wenlong Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/6dcb20159ded36586c5f7f2ae159e4e030256627.1686301237.git.houwenlong.hwl@antgroup.com commit 113adaf8f8ea6aa6fc3b174c68ec1c5588a2635c Merge: b85ea95d08647 649e984f5ed8c Author: Andy Shevchenko Date: Mon Nov 13 13:34:03 2023 +0200 Merge patch series "pinctrl: intel: Use NOIRQ PM helper" Andy Shevchenko says: Intel pin control drivers use NOIRQ variant of the PM callbacks. To make them smaller and less error prone against different kernel configurations (with possible defined but not used variables) switch to use NOIRQ PM helper. Link: https://lore.kernel.org/r/20231030120734.2831419-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 649e984f5ed8ca868f19a480966cc0820f76e22a Author: Andy Shevchenko Date: Mon Oct 30 14:07:34 2023 +0200 pinctrl: intel: Make PM ops functions static No more users outside of the main module. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-18-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit ee4c71f5771dc232001e055c818d2f2ea7ebf911 Author: Andy Shevchenko Date: Mon Oct 30 14:07:33 2023 +0200 pinctrl: tigerlake: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-17-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 0a327638cf4f324ff501adad922c1e7f5919c111 Author: Andy Shevchenko Date: Mon Oct 30 14:07:32 2023 +0200 pinctrl: sunrisepoint: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-16-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 4a3b7e6a27127828f21f5f4c4577684e0c16ba94 Author: Andy Shevchenko Date: Mon Oct 30 14:07:31 2023 +0200 pinctrl: meteorlake: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-15-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 5d5e83f973eddc4703efa85781329be6de87cb75 Author: Andy Shevchenko Date: Mon Oct 30 14:07:30 2023 +0200 pinctrl: lewisburg: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-14-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 8e5f001396dfb030ec10f3c4c8cdd23f7a51aa46 Author: Andy Shevchenko Date: Mon Oct 30 14:07:29 2023 +0200 pinctrl: lakefield: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-13-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 5ce3422e04135680697abb6f8ff577d38173247c Author: Andy Shevchenko Date: Mon Oct 30 14:07:28 2023 +0200 pinctrl: jasperlake: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-12-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit b70c674cf40521275676af9d8d43819f25a41946 Author: Andy Shevchenko Date: Mon Oct 30 14:07:27 2023 +0200 pinctrl: icelake: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-11-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 3f6791067ddab69589621d7efb3821adba70b4c7 Author: Andy Shevchenko Date: Mon Oct 30 14:07:26 2023 +0200 pinctrl: geminilake: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-10-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit e35ed82182f6963a2af7dfd151cdac6987133892 Author: Andy Shevchenko Date: Mon Oct 30 14:07:25 2023 +0200 pinctrl: emmitsburg: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-9-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit ec79e6e6fb069c84539efc5346c4fe687802c9f6 Author: Andy Shevchenko Date: Mon Oct 30 14:07:24 2023 +0200 pinctrl: elkhartlake: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-8-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 6dde85169a62ec71140dec3b0c85f78cd1a539e3 Author: Andy Shevchenko Date: Mon Oct 30 14:07:23 2023 +0200 pinctrl: denverton: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-7-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit a4f777ef3020c3ff39d1c3de70bfb2d95897e728 Author: Andy Shevchenko Date: Mon Oct 30 14:07:22 2023 +0200 pinctrl: cedarfork: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-6-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 020861b5ce169c6beb8f6507b926ba899c20e9f1 Author: Andy Shevchenko Date: Mon Oct 30 14:07:21 2023 +0200 pinctrl: cannonlake: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-5-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 4cc4ff1b24dd1621e6bf9a2ac69c5d7d5da4e8bf Author: Andy Shevchenko Date: Mon Oct 30 14:07:20 2023 +0200 pinctrl: broxton: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-4-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 33f1c0b0bf22c6c7922e9b49b9cbcc4e9c441640 Author: Andy Shevchenko Date: Mon Oct 30 14:07:19 2023 +0200 pinctrl: alderlake: Switch to use Intel pin control PM ops The main driver conditionally exports the PM ops structure. Switch this driver to use it instead of customly wrapped one. Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-3-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit b10a74b5c0c1497f510f91333652fbb060060b69 Author: Andy Shevchenko Date: Mon Oct 30 14:07:18 2023 +0200 pinctrl: intel: Provide Intel pin control wide PM ops structure With the help of EXPORT_NS_GPL_DEV_PM_OPS() and NOIRQ_SYSTEM_SLEEP_PM_OPS() we may convert PM ops functions to become static. This also takes into account the PM configuration options such as CONFIG_PM and CONFIG_PM_SLEEP. Hence the first step is to provide a generic PM ops structure that can be used by drivers directly. Reviewed-by: Jonathan Cameron Acked-by: Mika Westerberg Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20231030120734.2831419-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko commit 5c22c4726e4a9c6b2e182c0b21c2d3dd63f608c4 Author: Hou Wenlong Date: Fri Jun 9 17:45:31 2023 +0800 x86/paravirt: Use relative reference for the original instruction offset Similar to the alternative patching, use a relative reference for original instruction offset rather than absolute one, which saves 8 bytes for one PARA_SITE entry on x86_64. As a result, a R_X86_64_PC32 relocation is generated instead of an R_X86_64_64 one, which also reduces relocation metadata on relocatable builds. Hardcode the alignment to 4 now. [ bp: Massage commit message. ] Signed-off-by: Hou Wenlong Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/9e6053107fbaabc0d33e5d2865c5af2c67ec9925.1686301237.git.houwenlong.hwl@antgroup.com commit f52221d55d8dae7c4154116453d5fb6c544bae46 Author: Uwe Kleine-König Date: Thu Nov 2 23:02:51 2023 +0100 mtd: rawnand: txx9ndfmc: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231102220246.3336154-10-u.kleine-koenig@pengutronix.de commit 354dbdcbdd79ec417f6c35f55b1fe6310e7dd431 Author: Uwe Kleine-König Date: Thu Nov 2 23:02:50 2023 +0100 mtd: rawnand: txx9ndfmc: Drop if block with always false condition txx9ndfmc_remove() is only called after txx9ndfmc_probe() completed successfully. In this case platform_set_drvdata() was called with a non-NULL argument and so platform_get_drvdata() won't return NULL. Simplify by removing the if block with the always false condition. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231102220246.3336154-9-u.kleine-koenig@pengutronix.de commit 160c0b7f9a166d62a3aa32853883666eda896c58 Author: Uwe Kleine-König Date: Thu Nov 2 23:02:49 2023 +0100 mtd: rawnand: txx9ndfmc: Switch to module_platform_driver() While module_platform_driver_probe() offers the possibility to discard .probe() and .remove() in some situations, the handling is difficult and in today's systems the few hundred bytes that can be saved have little importance. So convert the driver to be a normal driver that can be bound and unbound at runtime as most other drivers, too. Signed-off-by: Uwe Kleine-König Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231102220246.3336154-8-u.kleine-koenig@pengutronix.de commit 215283a1a4833f441778580359aea768642c56af Author: Uwe Kleine-König Date: Thu Nov 2 23:02:48 2023 +0100 mtd: rawnand: brcmnand: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). By changing the function brcmnand_remove() to return void several drivers that use this function as remove callback can be converted to .remove_new(). Signed-off-by: Uwe Kleine-König Reviewed-by: Florian Fainelli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20231102220246.3336154-7-u.kleine-koenig@pengutronix.de commit 0003e2a414687fff6a75250d381e4abf345d663f Author: Sean Christopherson Date: Fri Oct 27 11:21:56 2023 -0700 mm: Add AS_UNMOVABLE to mark mapping as completely unmovable Add an "unmovable" flag for mappings that cannot be migrated under any circumstance. KVM will use the flag for its upcoming GUEST_MEMFD support, which will not support compaction/migration, at least not in the foreseeable future. Test AS_UNMOVABLE under folio lock as already done for the async compaction/dirty folio case, as the mapping can be removed by truncation while compaction is running. To avoid having to lock every folio with a mapping, assume/require that unmovable mappings are also unevictable, and have mapping_set_unmovable() also set AS_UNEVICTABLE. Cc: Matthew Wilcox Co-developed-by: Vlastimil Babka Signed-off-by: Vlastimil Babka Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5a475554db1e476a14216e742ea2bdb77362d5d5 Author: Chao Peng Date: Fri Oct 27 11:21:55 2023 -0700 KVM: Introduce per-page memory attributes In confidential computing usages, whether a page is private or shared is necessary information for KVM to perform operations like page fault handling, page zapping etc. There are other potential use cases for per-page memory attributes, e.g. to make memory read-only (or no-exec, or exec-only, etc.) without having to modify memslots. Introduce the KVM_SET_MEMORY_ATTRIBUTES ioctl, advertised by KVM_CAP_MEMORY_ATTRIBUTES, to allow userspace to set the per-page memory attributes to a guest memory range. Use an xarray to store the per-page attributes internally, with a naive, not fully optimized implementation, i.e. prioritize correctness over performance for the initial implementation. Use bit 3 for the PRIVATE attribute so that KVM can use bits 0-2 for RWX attributes/protections in the future, e.g. to give userspace fine-grained control over read, write, and execute protections for guest memory. Provide arch hooks for handling attribute changes before and after common code sets the new attributes, e.g. x86 will use the "pre" hook to zap all relevant mappings, and the "post" hook to track whether or not hugepages can be used to map the range. To simplify the implementation wrap the entire sequence with kvm_mmu_invalidate_{begin,end}() even though the operation isn't strictly guaranteed to be an invalidation. For the initial use case, x86 *will* always invalidate memory, and preventing arch code from creating new mappings while the attributes are in flux makes it much easier to reason about the correctness of consuming attributes. It's possible that future usages may not require an invalidation, e.g. if KVM ends up supporting RWX protections and userspace grants _more_ protections, but again opt for simplicity and punt optimizations to if/when they are needed. Suggested-by: Sean Christopherson Link: https://lore.kernel.org/all/Y2WB48kD0J4VGynX@google.com Cc: Fuad Tabba Cc: Xu Yilun Cc: Mickaël Salaün Signed-off-by: Chao Peng Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 193bbfaacc84f9ee9c281ec0a8dd2ec8e4821e57 Author: Sean Christopherson Date: Fri Oct 27 11:21:53 2023 -0700 KVM: Drop .on_unlock() mmu_notifier hook Drop the .on_unlock() mmu_notifer hook now that it's no longer used for notifying arch code that memory has been reclaimed. Adding .on_unlock() and invoking it *after* dropping mmu_lock was a terrible idea, as doing so resulted in .on_lock() and .on_unlock() having divergent and asymmetric behavior, and set future developers up for failure, i.e. all but asked for bugs where KVM relied on using .on_unlock() to try to run a callback while holding mmu_lock. Opportunistically add a lockdep assertion in kvm_mmu_invalidate_end() to guard against future bugs of this nature. Reported-by: Isaku Yamahata Link: https://lore.kernel.org/all/20230802203119.GB2021422@ls.amr.corp.intel.com Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit cec29eef0a815386d520d61c2cbe16d537931639 Author: Sean Christopherson Date: Fri Oct 27 11:21:52 2023 -0700 KVM: Add a dedicated mmu_notifier flag for reclaiming freed memory Handle AMD SEV's kvm_arch_guest_memory_reclaimed() hook by having __kvm_handle_hva_range() return whether or not an overlapping memslot was found, i.e. mmu_lock was acquired. Using the .on_unlock() hook works, but kvm_arch_guest_memory_reclaimed() needs to run after dropping mmu_lock, which makes .on_lock() and .on_unlock() asymmetrical. Use a small struct to return the tuple of the notifier-specific return, plus whether or not overlap was found. Because the iteration helpers are __always_inlined, practically speaking, the struct will never actually be returned from a function call (not to mention the size of the struct will be two bytes in practice). Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 16f95f3b95caded251a0440051e44a2fbe9e5f55 Author: Chao Peng Date: Fri Oct 27 11:21:51 2023 -0700 KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace Add a new KVM exit type to allow userspace to handle memory faults that KVM cannot resolve, but that userspace *may* be able to handle (without terminating the guest). KVM will initially use KVM_EXIT_MEMORY_FAULT to report implicit conversions between private and shared memory. With guest private memory, there will be two kind of memory conversions: - explicit conversion: happens when the guest explicitly calls into KVM to map a range (as private or shared) - implicit conversion: happens when the guest attempts to access a gfn that is configured in the "wrong" state (private vs. shared) On x86 (first architecture to support guest private memory), explicit conversions will be reported via KVM_EXIT_HYPERCALL+KVM_HC_MAP_GPA_RANGE, but reporting KVM_EXIT_HYPERCALL for implicit conversions is undesriable as there is (obviously) no hypercall, and there is no guarantee that the guest actually intends to convert between private and shared, i.e. what KVM thinks is an implicit conversion "request" could actually be the result of a guest code bug. KVM_EXIT_MEMORY_FAULT will be used to report memory faults that appear to be implicit conversions. Note! To allow for future possibilities where KVM reports KVM_EXIT_MEMORY_FAULT and fills run->memory_fault on _any_ unresolved fault, KVM returns "-EFAULT" (-1 with errno == EFAULT from userspace's perspective), not '0'! Due to historical baggage within KVM, exiting to userspace with '0' from deep callstacks, e.g. in emulation paths, is infeasible as doing so would require a near-complete overhaul of KVM, whereas KVM already propagates -errno return codes to userspace even when the -errno originated in a low level helper. Report the gpa+size instead of a single gfn even though the initial usage is expected to always report single pages. It's entirely possible, likely even, that KVM will someday support sub-page granularity faults, e.g. Intel's sub-page protection feature allows for additional protections at 128-byte granularity. Link: https://lore.kernel.org/all/20230908222905.1321305-5-amoorthy@google.com Link: https://lore.kernel.org/all/ZQ3AmLO2SYv3DszH@google.com Cc: Anish Moorthy Cc: David Matlack Suggested-by: Sean Christopherson Co-developed-by: Yu Zhang Signed-off-by: Yu Zhang Signed-off-by: Chao Peng Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Message-Id: <20231027182217.3615211-10-seanjc@google.com> Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Reviewed-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit bb58b90b1a8f753b582055adaf448214a8e22c31 Author: Sean Christopherson Date: Fri Oct 27 11:21:50 2023 -0700 KVM: Introduce KVM_SET_USER_MEMORY_REGION2 Introduce a "version 2" of KVM_SET_USER_MEMORY_REGION so that additional information can be supplied without setting userspace up to fail. The padding in the new kvm_userspace_memory_region2 structure will be used to pass a file descriptor in addition to the userspace_addr, i.e. allow userspace to point at a file descriptor and map memory into a guest that is NOT mapped into host userspace. Alternatively, KVM could simply add "struct kvm_userspace_memory_region2" without a new ioctl(), but as Paolo pointed out, adding a new ioctl() makes detection of bad flags a bit more robust, e.g. if the new fd field is guarded only by a flag and not a new ioctl(), then a userspace bug (setting a "bad" flag) would generate out-of-bounds access instead of an -EINVAL error. Cc: Jarkko Sakkinen Reviewed-by: Paolo Bonzini Reviewed-by: Xiaoyao Li Signed-off-by: Sean Christopherson Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-9-seanjc@google.com> Acked-by: Kai Huang Signed-off-by: Paolo Bonzini commit f128cf8cfbecccf95e891ae90d9c917df5117c7a Author: Sean Christopherson Date: Fri Oct 27 11:21:49 2023 -0700 KVM: Convert KVM_ARCH_WANT_MMU_NOTIFIER to CONFIG_KVM_GENERIC_MMU_NOTIFIER Convert KVM_ARCH_WANT_MMU_NOTIFIER into a Kconfig and select it where appropriate to effectively maintain existing behavior. Using a proper Kconfig will simplify building more functionality on top of KVM's mmu_notifier infrastructure. Add a forward declaration of kvm_gfn_range to kvm_types.h so that including arch/powerpc/include/asm/kvm_ppc.h's with CONFIG_KVM=n doesn't generate warnings due to kvm_gfn_range being undeclared. PPC defines hooks for PR vs. HV without guarding them via #ifdeffery, e.g. bool (*unmap_gfn_range)(struct kvm *kvm, struct kvm_gfn_range *range); bool (*age_gfn)(struct kvm *kvm, struct kvm_gfn_range *range); bool (*test_age_gfn)(struct kvm *kvm, struct kvm_gfn_range *range); bool (*set_spte_gfn)(struct kvm *kvm, struct kvm_gfn_range *range); Alternatively, PPC could forward declare kvm_gfn_range, but there's no good reason not to define it in common KVM. Acked-by: Anup Patel Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4a2e993faad3880962540ab8e3b68f22e48b18e8 Author: Sean Christopherson Date: Fri Oct 27 11:21:48 2023 -0700 KVM: PPC: Return '1' unconditionally for KVM_CAP_SYNC_MMU Advertise that KVM's MMU is synchronized with the primary MMU for all flavors of PPC KVM support, i.e. advertise that the MMU is synchronized when CONFIG_KVM_BOOK3S_HV_POSSIBLE=y but the VM is not using hypervisor mode (a.k.a. PR VMs). PR VMs, via kvm_unmap_gfn_range_pr(), do the right thing for mmu_notifier invalidation events, and more tellingly, KVM returns '1' for KVM_CAP_SYNC_MMU when CONFIG_KVM_BOOK3S_HV_POSSIBLE=n and CONFIG_KVM_BOOK3S_PR_POSSIBLE=y, i.e. KVM already advertises a synchronized MMU for PR VMs, just not when CONFIG_KVM_BOOK3S_HV_POSSIBLE=y. Suggested-by: Paolo Bonzini Signed-off-by: Sean Christopherson Message-Id: <20231027182217.3615211-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 1853d7502a19b34b2cfe4ea0698bee73323fec3a Author: Sean Christopherson Date: Fri Oct 27 11:21:47 2023 -0700 KVM: PPC: Drop dead code related to KVM_ARCH_WANT_MMU_NOTIFIER Assert that both KVM_ARCH_WANT_MMU_NOTIFIER and CONFIG_MMU_NOTIFIER are defined when KVM is enabled, and return '1' unconditionally for the CONFIG_KVM_BOOK3S_HV_POSSIBLE=n path. All flavors of PPC support for KVM select MMU_NOTIFIER, and KVM_ARCH_WANT_MMU_NOTIFIER is unconditionally defined by arch/powerpc/include/asm/kvm_host.h. Effectively dropping use of KVM_ARCH_WANT_MMU_NOTIFIER will simplify a future cleanup to turn KVM_ARCH_WANT_MMU_NOTIFIER into a Kconfig, i.e. will allow combining all of the #if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER) checks into a single #ifdef CONFIG_KVM_GENERIC_MMU_NOTIFIER without having to worry about PPC's "bare" usage of KVM_ARCH_WANT_MMU_NOTIFIER. Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Reviewed-by: Fuad Tabba Message-Id: <20231027182217.3615211-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d497a0fab8b8457214fcc9b1a39530920ea7e95e Author: Sean Christopherson Date: Fri Oct 27 11:21:46 2023 -0700 KVM: WARN if there are dangling MMU invalidations at VM destruction Add an assertion that there are no in-progress MMU invalidations when a VM is being destroyed, with the exception of the scenario where KVM unregisters its MMU notifier between an .invalidate_range_start() call and the corresponding .invalidate_range_end(). KVM can't detect unpaired calls from the mmu_notifier due to the above exception waiver, but the assertion can detect KVM bugs, e.g. such as the bug that *almost* escaped initial guest_memfd development. Link: https://lore.kernel.org/all/e397d30c-c6af-e68f-d18e-b4e3739c5389@linux.intel.com Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8569992d64b8f750e34b7858eac5d7daaf0f80fd Author: Chao Peng Date: Fri Oct 27 11:21:45 2023 -0700 KVM: Use gfn instead of hva for mmu_notifier_retry Currently in mmu_notifier invalidate path, hva range is recorded and then checked against by mmu_invalidate_retry_hva() in the page fault handling path. However, for the soon-to-be-introduced private memory, a page fault may not have a hva associated, checking gfn(gpa) makes more sense. For existing hva based shared memory, gfn is expected to also work. The only downside is when aliasing multiple gfns to a single hva, the current algorithm of checking multiple ranges could result in a much larger range being rejected. Such aliasing should be uncommon, so the impact is expected small. Suggested-by: Sean Christopherson Cc: Xu Yilun Signed-off-by: Chao Peng Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba [sean: convert vmx_set_apic_access_page_addr() to gfn-based API] Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Reviewed-by: Xu Yilun Message-Id: <20231027182217.3615211-4-seanjc@google.com> Reviewed-by: Kai Huang Signed-off-by: Paolo Bonzini commit c0db19232c1ed6bd7fcb825c28b014c52732c19e Author: Sean Christopherson Date: Fri Oct 27 11:21:44 2023 -0700 KVM: Assert that mmu_invalidate_in_progress *never* goes negative Move the assertion on the in-progress invalidation count from the primary MMU's notifier path to KVM's common notification path, i.e. assert that the count doesn't go negative even when the invalidation is coming from KVM itself. Opportunistically convert the assertion to a KVM_BUG_ON(), i.e. kill only the affected VM, not the entire kernel. A corrupted count is fatal to the VM, e.g. the non-zero (negative) count will cause mmu_invalidate_retry() to block any and all attempts to install new mappings. But it's far from guaranteed that an end() without a start() is fatal or even problematic to anything other than the target VM, e.g. the underlying bug could simply be a duplicate call to end(). And it's much more likely that a missed invalidation, i.e. a potential use-after-free, would manifest as no notification whatsoever, not an end() without a start(). Signed-off-by: Sean Christopherson Reviewed-by: Paolo Bonzini Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-3-seanjc@google.com> Reviewed-by: Kai Huang Signed-off-by: Paolo Bonzini commit e97b39c5c4362dc1cbc37a563ddac313b96c84f3 Author: Sean Christopherson Date: Fri Oct 27 11:21:43 2023 -0700 KVM: Tweak kvm_hva_range and hva_handler_t to allow reusing for gfn ranges Rework and rename "struct kvm_hva_range" into "kvm_mmu_notifier_range" so that the structure can be used to handle notifications that operate on gfn context, i.e. that aren't tied to a host virtual address. Rename the handler typedef too (arguably it should always have been gfn_handler_t). Practically speaking, this is a nop for 64-bit kernels as the only meaningful change is to store start+end as u64s instead of unsigned longs. Reviewed-by: Paolo Bonzini Reviewed-by: Xiaoyao Li Signed-off-by: Sean Christopherson Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Message-Id: <20231027182217.3615211-2-seanjc@google.com> Reviewed-by: Kai Huang Signed-off-by: Paolo Bonzini commit 04c3024560d3a14acd18d0a51a1d0a89d29b7eb5 Author: Borislav Petkov (AMD) Date: Fri Oct 27 14:24:16 2023 +0200 x86/barrier: Do not serialize MSR accesses on AMD AMD does not have the requirement for a synchronization barrier when acccessing a certain group of MSRs. Do not incur that unnecessary penalty there. There will be a CPUID bit which explicitly states that a MFENCE is not needed. Once that bit is added to the APM, this will be extended with it. While at it, move to processor.h to avoid include hell. Untangling that file properly is a matter for another day. Some notes on the performance aspect of why this is relevant, courtesy of Kishon VijayAbraham : On a AMD Zen4 system with 96 cores, a modified ipi-bench[1] on a VM shows x2AVIC IPI rate is 3% to 4% lower than AVIC IPI rate. The ipi-bench is modified so that the IPIs are sent between two vCPUs in the same CCX. This also requires to pin the vCPU to a physical core to prevent any latencies. This simulates the use case of pinning vCPUs to the thread of a single CCX to avoid interrupt IPI latency. In order to avoid run-to-run variance (for both x2AVIC and AVIC), the below configurations are done: 1) Disable Power States in BIOS (to prevent the system from going to lower power state) 2) Run the system at fixed frequency 2500MHz (to prevent the system from increasing the frequency when the load is more) With the above configuration: *) Performance measured using ipi-bench for AVIC: Average Latency: 1124.98ns [Time to send IPI from one vCPU to another vCPU] Cumulative throughput: 42.6759M/s [Total number of IPIs sent in a second from 48 vCPUs simultaneously] *) Performance measured using ipi-bench for x2AVIC: Average Latency: 1172.42ns [Time to send IPI from one vCPU to another vCPU] Cumulative throughput: 40.9432M/s [Total number of IPIs sent in a second from 48 vCPUs simultaneously] From above, x2AVIC latency is ~4% more than AVIC. However, the expectation is x2AVIC performance to be better or equivalent to AVIC. Upon analyzing the perf captures, it is observed significant time is spent in weak_wrmsr_fence() invoked by x2apic_send_IPI(). With the fix to skip weak_wrmsr_fence() *) Performance measured using ipi-bench for x2AVIC: Average Latency: 1117.44ns [Time to send IPI from one vCPU to another vCPU] Cumulative throughput: 42.9608M/s [Total number of IPIs sent in a second from 48 vCPUs simultaneously] Comparing the performance of x2AVIC with and without the fix, it can be seen the performance improves by ~4%. Performance captured using an unmodified ipi-bench using the 'mesh-ipi' option with and without weak_wrmsr_fence() on a Zen4 system also showed significant performance improvement without weak_wrmsr_fence(). The 'mesh-ipi' option ignores CCX or CCD and just picks random vCPU. Average throughput (10 iterations) with weak_wrmsr_fence(), Cumulative throughput: 4933374 IPI/s Average throughput (10 iterations) without weak_wrmsr_fence(), Cumulative throughput: 6355156 IPI/s [1] https://github.com/bytedance/kvm-utils/tree/master/microbenchmark/ipi-bench Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20230622095212.20940-1-bp@alien8.de commit 9f3b130048bfa2e44a8cfb1b616f826d9d5d8188 Author: Zhiquan Li Date: Thu Oct 26 08:39:03 2023 +0800 x86/mce: Mark fatal MCE's page as poison to avoid panic in the kdump kernel Memory errors don't happen very often, especially fatal ones. However, in large-scale scenarios such as data centers, that probability increases with the amount of machines present. When a fatal machine check happens, mce_panic() is called based on the severity grading of that error. The page containing the error is not marked as poison. However, when kexec is enabled, tools like makedumpfile understand when pages are marked as poison and do not touch them so as not to cause a fatal machine check exception again while dumping the previous kernel's memory. Therefore, mark the page containing the error as poisoned so that the kexec'ed kernel can avoid accessing the page. [ bp: Rewrite commit message and comment. ] Co-developed-by: Youquan Song Signed-off-by: Youquan Song Signed-off-by: Zhiquan Li Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Naoya Horiguchi Link: https://lore.kernel.org/r/20231014051754.3759099-1-zhiquan1.li@intel.com commit 057a30168175048be9e9b30f0cafd26f5043eb07 Author: Eric Biggers Date: Sat Oct 28 21:57:56 2023 -0700 RDMA/irdma: Use crypto_shash_digest() in irdma_ieq_check_mpacrc() Simplify irdma_ieq_check_mpacrc() by using crypto_shash_digest() instead of an init+update+final sequence. This should also improve performance. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20231029045756.153943-1-ebiggers@kernel.org Signed-off-by: Leon Romanovsky commit 9aac6c05a56289be7bb2ad4b6c34486dfa2d31eb Author: Eric Biggers Date: Sat Oct 28 21:58:39 2023 -0700 RDMA/siw: Use crypto_shash_digest() in siw_qp_prepare_tx() Simplify siw_qp_prepare_tx() by using crypto_shash_digest() instead of an init+update+final sequence. This should also improve performance. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20231029045839.154071-1-ebiggers@kernel.org Acked-by: Bernard Metzler Signed-off-by: Leon Romanovsky commit 43c4c349149c77f27c8e5801755a7b8883a70ebe Author: Chengming Zhou Date: Thu Nov 2 03:23:23 2023 +0000 slub: Change get_partial() interfaces to return slab We need all get_partial() related interfaces to return a slab, instead of returning the freelist (or object). Use the partial_context.object to return back freelist or object for now. This patch shouldn't have any functional changes. Suggested-by: Vlastimil Babka Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 24c6a097b5a270e05c6e99a99da66b91be81fd7d Author: Chengming Zhou Date: Thu Nov 2 03:23:22 2023 +0000 slub: Reflow ___slab_alloc() The get_partial() interface used in ___slab_alloc() may return a single object in the "kmem_cache_debug(s)" case, in which we will just return the "freelist" object. Move this handling up to prepare for later changes. And the "pfmemalloc_match()" part is not needed for node partial slab, since we already check this in the get_partial_node(). Signed-off-by: Chengming Zhou Reviewed-by: Vlastimil Babka Tested-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Reviewed-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Vlastimil Babka commit 48f996d4adf15a0a0af8b8184d3ec6042a684ea4 Author: Chandramohan Akula Date: Mon Oct 23 07:03:23 2023 -0700 RDMA/bnxt_re: Remove roundup_pow_of_two depth for all hardware queue resources Rounding up the queue depth to power of two is not a hardware requirement. In order to optimize the per connection memory usage, removing drivers implementation which round up to the queue depths to the power of 2. Implements a mask to maintain backward compatibility with older library. Signed-off-by: Chandramohan Akula Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1698069803-1787-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit 3a4304d82695015d0703ee0c3331458d22e3ba7c Author: Chandramohan Akula Date: Mon Oct 23 07:03:22 2023 -0700 RDMA/bnxt_re: Refactor the queue index update The queue index wrap around logic is based on power of 2 size depth. All queues are created with power of 2 depth. This increases the memory usage by the driver. This change is required for the next patches that avoids the power of 2 depth requirement for each of the queues. Update the function that increments producer index and consumer index during wrap around. Also, changes the index handling across multiple functions. Signed-off-by: Chandramohan Akula Signed-off-by: Selvin Xavier Link: https://lore.kernel.org/r/1698069803-1787-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky commit c170d4ff21a8a525d782e3d1bc58d9538d95afe6 Author: Philipp Stanner Date: Thu Nov 2 20:13:09 2023 +0100 RDMA/hfi1: Copy userspace arrays safely Currently, memdup_user() is utilized at two positions to copy userspace arrays. This is done without overflow checks. Use the new wrapper memdup_array_user() to copy the arrays more safely. Suggested-by: Dave Airlie Signed-off-by: Philipp Stanner Link: https://lore.kernel.org/r/20231102191308.52046-2-pstanner@redhat.com Acked-by: Dennis Dalessandro Signed-off-by: Leon Romanovsky commit 476b7c7e00ec3d909bacaeaf1dc53eb2b2d0c41d Author: Bernard Metzler Date: Sat Nov 4 08:56:43 2023 +0100 RDMA/siw: Use ib_umem_get() to pin user pages Abandon siw private code to pin user pages during user memory registration, but use ib_umem_get() instead. This will help maintaining the driver in case of changes to the memory subsystem. Signed-off-by: Bernard Metzler Link: https://lore.kernel.org/r/20231104075643.195186-1-bmt@zurich.ibm.com Signed-off-by: Leon Romanovsky commit f7a25cf1d4707da39b80df96a3be8a8abd07c35b Author: Yuntao Wang Date: Mon Nov 13 11:40:26 2023 +0800 x86/setup: Make relocated_ramdisk a local variable of relocate_initrd() After 0b62f6cb0773 ("x86/microcode/32: Move early loading after paging enable"), the global variable relocated_ramdisk is no longer used anywhere except for the relocate_initrd() function. Make it a local variable of that function. Signed-off-by: Yuntao Wang Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Baoquan He Link: https://lore.kernel.org/r/20231113034026.130679-1-ytcoode@gmail.com commit d131f1f3b459980d38a59adc3598c96cc3a6ad5e Author: Kuan-Wei Chiu Date: Sat Nov 11 00:53:14 2023 +0800 platform/chrome: sensorhub: Implement quickselect for median calculation The cros_ec_sensor_ring_median function currently uses an inefficient sorting algorithm (> O(n)) to find the median of an array. This patch replaces the sorting approach with the quickselect algorithm, which achieves an average time complexity of O(n). The algorithm employs the median-of-three rule to select the pivot, mitigating worst-case scenarios and reducing the expected number of necessary comparisons. This strategy enhances the algorithm's efficiency and ensures a more balanced partitioning. In the worst case, the runtime of quickselect could regress to O(n^2). To address this, alternative algorithms like median-of-medians that can guarantee O(n) even in the worst case. However, due to higher overhead and increased complexity of implementation, quickselect remains a pragmatic choice for our use case. Signed-off-by: Kuan-Wei Chiu Link: https://lore.kernel.org/r/20231110165314.1559285-1-visitorckw@gmail.com Signed-off-by: Tzung-Bi Shih commit 00eb7bd699ccd60d3e5c0ef2ca89467461c39178 Author: Paul Moore Date: Fri Nov 10 12:27:48 2023 -0500 mailmap: update/replace my old email addresses I was recently reminded by someone who was unable to reach my old email address that I really should update the kernel's .mailmap so that people looking for me in old commits can reach my current email. Signed-off-by: Paul Moore commit b1a867eeb8ab5e097178728b01cc504c6806acca Author: Paul Moore Date: Fri Nov 10 12:09:33 2023 -0500 lsm: mark the lsm_id variables are marked as static As the kernel test robot helpfully reminded us, all of the lsm_id instances defined inside the various LSMs should be marked as static. The one exception is Landlock which uses its lsm_id variable across multiple source files with an extern declaration in a header file. Reported-by: kernel test robot Suggested-by: Casey Schaufler Reviewed-by: Casey Schaufler Signed-off-by: Paul Moore commit 9ba8802c8b66fbde2ee32ab4c44cd418f9444486 Author: Paul Moore Date: Wed Nov 1 18:42:12 2023 -0400 lsm: convert security_setselfattr() to use memdup_user() As suggested by the kernel test robot, memdup_user() is a better option than the combo of kmalloc()/copy_from_user(). Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310270805.2ArE52i5-lkp@intel.com/ Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit 41793202292fd2acf99fdc09eff8323cc27c80eb Author: Paul Moore Date: Wed Nov 1 17:39:44 2023 -0400 lsm: align based on pointer length in lsm_fill_user_ctx() Using the size of a void pointer is much cleaner than BITS_PER_LONG / 8. Acked-by: Casey Schaufler Signed-off-by: Paul Moore commit d7cf3412a9f6c547e5ee443fa7644e08898aa3e2 Author: Paul Moore Date: Tue Oct 24 14:44:00 2023 -0400 lsm: consolidate buffer size handling into lsm_fill_user_ctx() While we have a lsm_fill_user_ctx() helper function designed to make life easier for LSMs which return lsm_ctx structs to userspace, we didn't include all of the buffer length safety checks and buffer padding adjustments in the helper. This led to code duplication across the different LSMs and the possibility for mistakes across the different LSM subsystems. In order to reduce code duplication and decrease the chances of silly mistakes, we're consolidating all of this code into the lsm_fill_user_ctx() helper. The buffer padding is also modified from a fixed 8-byte alignment to an alignment that matches the word length of the machine (BITS_PER_LONG / 8). Signed-off-by: Paul Moore commit fdcf699b60712ecd6e41d9fc09137279257a4bf8 Author: Paul Moore Date: Tue Oct 24 12:42:38 2023 -0400 lsm: correct error codes in security_getselfattr() We should return -EINVAL if the user specifies LSM_FLAG_SINGLE without supplying a valid lsm_ctx struct buffer. Acked-by: Casey Schaufler Reviewed-by: Mickaël Salaün Signed-off-by: Paul Moore commit dc46db78b9747f8114030982ee5c2faf2faaeddd Author: Paul Moore Date: Tue Oct 24 12:38:40 2023 -0400 lsm: cleanup the size counters in security_getselfattr() Zero out all of the size counters in the -E2BIG case (buffer too small) to help make the current code a bit more robust in the face of future code changes. Acked-by: Casey Schaufler Reviewed-by: Mickaël Salaün Signed-off-by: Paul Moore commit aab30be071f7048c9c23c61e6eddd55bba328398 Author: Roberto Sassu Date: Thu Oct 26 11:02:59 2023 +0200 lsm: don't yet account for IMA in LSM_CONFIG_COUNT calculation Since IMA is not yet an LSM, don't account for it in the LSM_CONFIG_COUNT calculation, used to limit how many LSMs can invoke security_add_hooks(). Signed-off-by: Roberto Sassu [PM: subject line tweak] Signed-off-by: Paul Moore commit edd71f8e266c7ba15eedfec338864e53ddde1c25 Author: Paul Moore Date: Wed Oct 18 17:41:41 2023 -0400 lsm: drop LSM_ID_IMA When IMA becomes a proper LSM we will reintroduce an appropriate LSM ID, but drop it from the userspace API for now in an effort to put an end to debates around the naming of the LSM ID macro. Reviewed-by: Roberto Sassu Signed-off-by: Paul Moore commit d3d929a8b0cd6deb7d70d1d8d805bccee3fbf11f Author: Casey Schaufler Date: Tue Sep 12 13:56:56 2023 -0700 LSM: selftests for Linux Security Module syscalls Add selftests for the three system calls supporting the LSM infrastructure. This set of tests is limited by the differences in access policy enforced by the existing security modules. Signed-off-by: Casey Schaufler Reviewed-by: Mickaël Salaün Tested-by: Mickaël Salaün Signed-off-by: Paul Moore commit 762c934317e6f4b576eb4aa75e5facf4968a4a8f Author: Casey Schaufler Date: Tue Sep 12 13:56:55 2023 -0700 SELinux: Add selfattr hooks Add hooks for setselfattr and getselfattr. These hooks are not very different from their setprocattr and getprocattr equivalents, and much of the code is shared. Cc: selinux@vger.kernel.org Signed-off-by: Casey Schaufler Signed-off-by: Paul Moore commit 223981db9bafb80f558162c148f261e2ff043dbe Author: Casey Schaufler Date: Tue Sep 12 13:56:54 2023 -0700 AppArmor: Add selfattr hooks Add hooks for setselfattr and getselfattr. These hooks are not very different from their setprocattr and getprocattr equivalents, and much of the code is shared. Signed-off-by: Casey Schaufler Acked-by: John Johansen [PM: forward ported beyond v6.6 due merge window changes] Signed-off-by: Paul Moore commit 38b323e5881608b5a229526d9a567df6182255ef Author: Casey Schaufler Date: Tue Sep 12 13:56:53 2023 -0700 Smack: implement setselfattr and getselfattr hooks Implement Smack support for security_[gs]etselfattr. Refactor the setprocattr hook to avoid code duplication. Signed-off-by: Casey Schaufler Reviewed-by: John Johansen Signed-off-by: Paul Moore commit e1ca7129db2c3b3c4d261702905a752e6b2710b4 Author: Casey Schaufler Date: Tue Sep 12 13:56:52 2023 -0700 LSM: Helpers for attribute names and filling lsm_ctx Add lsm_name_to_attr(), which translates a text string to a LSM_ATTR value if one is available. Add lsm_fill_user_ctx(), which fills a struct lsm_ctx, including the trailing attribute value. Both are used in module specific components of LSM system calls. Signed-off-by: Casey Schaufler Reviewed-by: John Johansen Reviewed-by: Serge Hallyn Reviewed-by: Mickaël Salaün Signed-off-by: Paul Moore commit 5f42375904b08890f2e8e7cd955c5bf0c2c0d05a Author: Casey Schaufler Date: Tue Sep 12 13:56:51 2023 -0700 LSM: wireup Linux Security Module syscalls Wireup lsm_get_self_attr, lsm_set_self_attr and lsm_list_modules system calls. Signed-off-by: Casey Schaufler Reviewed-by: Kees Cook Acked-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Cc: linux-api@vger.kernel.org Reviewed-by: Mickaël Salaün [PM: forward ported beyond v6.6 due merge window changes] Signed-off-by: Paul Moore commit ad4aff9ec25f400608283c10d634cc4eeda83a02 Author: Casey Schaufler Date: Tue Sep 12 13:56:50 2023 -0700 LSM: Create lsm_list_modules system call Create a system call to report the list of Linux Security Modules that are active on the system. The list is provided as an array of LSM ID numbers. The calling application can use this list determine what LSM specific actions it might take. That might include choosing an output format, determining required privilege or bypassing security module specific behavior. Signed-off-by: Casey Schaufler Reviewed-by: Kees Cook Reviewed-by: Serge Hallyn Reviewed-by: John Johansen Reviewed-by: Mickaël Salaün Signed-off-by: Paul Moore commit a04a1198088a1378d0389c250cc684f649bcc91e Author: Casey Schaufler Date: Tue Sep 12 13:56:49 2023 -0700 LSM: syscalls for current process attributes Create a system call lsm_get_self_attr() to provide the security module maintained attributes of the current process. Create a system call lsm_set_self_attr() to set a security module maintained attribute of the current process. Historically these attributes have been exposed to user space via entries in procfs under /proc/self/attr. The attribute value is provided in a lsm_ctx structure. The structure identifies the size of the attribute, and the attribute value. The format of the attribute value is defined by the security module. A flags field is included for LSM specific information. It is currently unused and must be 0. The total size of the data, including the lsm_ctx structure and any padding, is maintained as well. struct lsm_ctx { __u64 id; __u64 flags; __u64 len; __u64 ctx_len; __u8 ctx[]; }; Two new LSM hooks are used to interface with the LSMs. security_getselfattr() collects the lsm_ctx values from the LSMs that support the hook, accounting for space requirements. security_setselfattr() identifies which LSM the attribute is intended for and passes it along. Signed-off-by: Casey Schaufler Reviewed-by: Kees Cook Reviewed-by: Serge Hallyn Reviewed-by: John Johansen Signed-off-by: Paul Moore commit 267c068e5f8b81b68cc4247c94dbba90a21a634e Author: Casey Schaufler Date: Tue Sep 12 13:56:48 2023 -0700 proc: Use lsmids instead of lsm names for attrs Use the LSM ID number instead of the LSM name to identify which security module's attibute data should be shown in /proc/self/attr. The security_[gs]etprocattr() functions have been changed to expect the LSM ID. The change from a string comparison to an integer comparison in these functions will provide a minor performance improvement. Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Casey Schaufler Reviewed-by: Kees Cook Reviewed-by: Serge Hallyn Reviewed-by: Mickael Salaun Reviewed-by: John Johansen Signed-off-by: Paul Moore commit 9285c5ad9d00abfe0f4e2ce4039c8127e7a09738 Author: Casey Schaufler Date: Tue Sep 12 13:56:47 2023 -0700 LSM: Maintain a table of LSM attribute data As LSMs are registered add their lsm_id pointers to a table. This will be used later for attribute reporting. Determine the number of possible security modules based on their respective CONFIG options. This allows the number to be known at build time. This allows data structures and tables to use the constant. Signed-off-by: Casey Schaufler Reviewed-by: Kees Cook Reviewed-by: Serge Hallyn Reviewed-by: Mickael Salaun Reviewed-by: John Johansen Signed-off-by: Paul Moore commit f3b8788cde61b02f1e6c202f8fac4360e6adbafc Author: Casey Schaufler Date: Tue Sep 12 13:56:46 2023 -0700 LSM: Identify modules by more than name Create a struct lsm_id to contain identifying information about Linux Security Modules (LSMs). At inception this contains the name of the module and an identifier associated with the security module. Change the security_add_hooks() interface to use this structure. Change the individual modules to maintain their own struct lsm_id and pass it to security_add_hooks(). The values are for LSM identifiers are defined in a new UAPI header file linux/lsm.h. Each existing LSM has been updated to include it's LSMID in the lsm_id. The LSM ID values are sequential, with the oldest module LSM_ID_CAPABILITY being the lowest value and the existing modules numbered in the order they were included in the main line kernel. This is an arbitrary convention for assigning the values, but none better presents itself. The value 0 is defined as being invalid. The values 1-99 are reserved for any special case uses which may arise in the future. This may include attributes of the LSM infrastructure itself, possibly related to namespacing or network attribute management. A special range is identified for such attributes to help reduce confusion for developers unfamiliar with LSMs. LSM attribute values are defined for the attributes presented by modules that are available today. As with the LSM IDs, The value 0 is defined as being invalid. The values 1-99 are reserved for any special case uses which may arise in the future. Cc: linux-security-module Signed-off-by: Casey Schaufler Reviewed-by: Kees Cook Reviewed-by: Serge Hallyn Reviewed-by: Mickael Salaun Reviewed-by: John Johansen Signed-off-by: Kees Cook Nacked-by: Tetsuo Handa [PM: forward ported beyond v6.6 due merge window changes] Signed-off-by: Paul Moore commit 022732e3d846e197539712e51ecada90ded0572a Author: Chris Riches Date: Wed Oct 18 09:23:51 2023 +0000 audit: Send netlink ACK before setting connection in auditd_set When auditd_set sets the auditd_conn pointer, audit messages can immediately be put on the socket by other kernel threads. If the backlog is large or the rate is high, this can immediately fill the socket buffer. If the audit daemon requested an ACK for this operation, a full socket buffer causes the ACK to get dropped, also setting ENOBUFS on the socket. To avoid this race and ensure ACKs get through, fast-track the ACK in this specific case to ensure it is sent before auditd_conn is set. Signed-off-by: Chris Riches [PM: fix some tab vs space damage] Signed-off-by: Paul Moore commit 49e380795414039f7b3bd44c121104f31738dcf1 Author: Kuan-Wei Chiu Date: Sat Nov 11 00:52:39 2023 +0800 platform/chrome: sensorhub: Fix typos Replace 'preceeds' with 'precedes' in the comment. Replace 'porod' with 'period' in the comment. Replace 'noone' with 'no one' in the comment. Replace 'lantency' with 'latency' in the comment. Replace 'kifo' with 'kfifo' in the comment. Replace 'change' with 'chance' in the comment. Signed-off-by: Kuan-Wei Chiu Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20231110165239.1559109-1-visitorckw@gmail.com Signed-off-by: Tzung-Bi Shih commit ecea08916418a94f99f89c543303877cb6e08a11 Author: Alper Nebi Yasak Date: Wed Nov 8 21:25:13 2023 +0300 firmware: coreboot: framebuffer: Avoid invalid zero physical address On ARM64 systems coreboot defers framebuffer allocation to its payload, to be done by a libpayload function call. In this case, coreboot tables still include a framebuffer entry with display format details, but the physical address field is set to zero (as in [1], for example). Unfortunately, this field is not automatically updated when the framebuffer is initialized through libpayload, citing that doing so would invalidate checksums over the entire coreboot table [2]. This can be observed on ARM64 Chromebooks with stock firmware. On a Google Kevin (RK3399), trying to use coreboot framebuffer driver as built-in to the kernel results in a benign error. But on Google Hana (MT8173) and Google Cozmo (MT8183) it causes a hang. When the framebuffer physical address field in the coreboot table is zero, we have no idea where coreboot initialized a framebuffer, or even if it did. Instead of trying to set up a framebuffer located at zero, return ENODEV to indicate that there isn't one. [1] https://review.coreboot.org/c/coreboot/+/17109 [2] https://review.coreboot.org/c/coreboot/+/8797 Signed-off-by: Alper Nebi Yasak Reviewed-by: Julius Werner Link: https://lore.kernel.org/r/20231108182625.46563-1-alpernebiyasak@gmail.com Signed-off-by: Tzung-Bi Shih commit 4920ee6dcfaf9aec9f4bd14ce6c15a6a758a92ae Author: Christian Marangi Date: Tue Oct 24 20:30:16 2023 +0200 PM / devfreq: Convert to use sysfs_emit_at() API Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Link: https://lore.kernel.org/all/20231024183016.14648-3-ansuelsmth@gmail.com/ Signed-off-by: Christian Marangi Signed-off-by: Chanwoo Choi commit 08e23d05fa6dc4fc13da0ccf09defdd4bbc92ff4 Author: Christian Marangi Date: Tue Oct 24 20:30:15 2023 +0200 PM / devfreq: Fix buffer overflow in trans_stat_show Fix buffer overflow in trans_stat_show(). Convert simple snprintf to the more secure scnprintf with size of PAGE_SIZE. Add condition checking if we are exceeding PAGE_SIZE and exit early from loop. Also add at the end a warning that we exceeded PAGE_SIZE and that stats is disabled. Return -EFBIG in the case where we don't have enough space to write the full transition table. Also document in the ABI that this function can return -EFBIG error. Link: https://lore.kernel.org/all/20231024183016.14648-2-ansuelsmth@gmail.com/ Cc: stable@vger.kernel.org Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218041 Fixes: e552bbaf5b98 ("PM / devfreq: Add sysfs node for representing frequency transition information.") Signed-off-by: Christian Marangi Signed-off-by: Chanwoo Choi commit 2f2802d1a59d79a3d00cb429841db502c2bbc3df Author: Uwe Kleine-König Date: Sun Nov 5 18:26:50 2023 +0100 spi: spi-ti-qspi: Convert to platform remove callback returning void The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Add an error message to the error path that returned an error before to replace the core's error message with more information. Apart from the different wording of the error message, this patch doesn't introduce a semantic difference. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231105172649.3738556-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 424a8166764e462258fdccaaefbdeb07517c8b21 Author: Amit Kumar Mahapatra Date: Mon Nov 6 20:23:55 2023 +0530 spi: spi-zynqmp-gqspi: fix driver kconfig dependencies ZynqMP GQSPI driver no longer uses spi-master framework. It had been converted to use spi-mem framework. So remove driver dependency from spi-master and replace it with spi-mem. Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Amit Kumar Mahapatra Signed-off-by: Radhey Shyam Pandey Link: https://lore.kernel.org/r/1699282435-884917-1-git-send-email-radhey.shyam.pandey@amd.com Signed-off-by: Mark Brown commit dfa8121a6ca7725576f71f7b505f711e1148f151 Author: Uwe Kleine-König Date: Sun Nov 5 15:39:33 2023 +0100 spi: cadence-xspi: Drop useless assignment to NULL Static structs are initialized with zeros for unspecified fields. So there is no advantage to explicitly initialize .remove with NULL and the assignment can be dropped without side effects. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20231105143932.3722920-2-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown commit 09388379b6d7143ed12fc06900ec9db3bb82ca8f Author: Ben Wolsieffer Date: Thu Nov 2 15:37:20 2023 -0400 spi: add stm32f7-spi compatible The STM32F7 SPI peripheral is nearly identical to the STM32F4, with the only significant differences being support for a wider range of word sizes and the addition of 32-bit transmit and receive FIFOs. Signed-off-by: Ben Wolsieffer Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231102193722.3042245-4-ben.wolsieffer@hefring.com Signed-off-by: Mark Brown commit a84dcb410b5f928899a53ba79ec71108700872d6 Author: Ben Wolsieffer Date: Thu Nov 2 15:37:21 2023 -0400 spi: stm32: add STM32F7 support The STM32F7 SPI peripheral is similar to the STM32F4, except it allows arbitrary word lengths between 4 and 16 bits, and has a small 32-bit FIFO that allows two 8-bit or smaller words to be transferred with a single 16-bit read/write. Signed-off-by: Ben Wolsieffer Link: https://lore.kernel.org/r/20231102193722.3042245-5-ben.wolsieffer@hefring.com Signed-off-by: Mark Brown commit 247ba5ea058290824862902f7ee64c20a744c461 Author: Ben Wolsieffer Date: Thu Nov 2 15:37:19 2023 -0400 spi: stm32: use callbacks for read_rx and write_tx The STM32F7 will require different read and write routines, so make these functions into configurable callbacks. Signed-off-by: Ben Wolsieffer Link: https://lore.kernel.org/r/20231102193722.3042245-3-ben.wolsieffer@hefring.com Signed-off-by: Mark Brown commit adde8a55daf640515edd78b7ac5f3293c3960b8e Author: Ben Wolsieffer Date: Thu Nov 2 15:37:18 2023 -0400 spi: stm32: rename stm32f4_* to stm32fx_* The STM32F4 and STM32F7 SPI peripherals are very similar, therefore most of the driver can be shared between the two. In preparation for adding support for the F7, change all functions and defines to use a generic stm32fx prefix, except for code and registers that differ between the two devices. Signed-off-by: Ben Wolsieffer Link: https://lore.kernel.org/r/20231102193722.3042245-2-ben.wolsieffer@hefring.com Signed-off-by: Mark Brown commit e1eb745006ac484427fca14feb27d79a71c3770d Author: Jiapeng Chong Date: Thu Nov 9 15:39:25 2023 +0800 regulator: stpmic1: Fix kernel-doc notation warnings No functional modification involved. drivers/regulator/stpmic1_regulator.c:31: warning: expecting prototype for struct stpmic1. Prototype was for struct stpmic1_regulator_cfg instead. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7206 Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20231109073925.98783-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Mark Brown commit 1fc2e768ff28f096e9fb6438f0d01c3851c7cd68 Author: Colin Ian King Date: Sat Nov 11 19:53:30 2023 +0000 regulator: palmas: remove redundant initialization of pointer pdata Pointer pdata is being initialized with a value that is never read. It is being re-assigned later on with the return from a devm_kzalloc call. Remove the redundant initialization, cleans up clang scan build warning: drivers/regulator/palmas-regulator.c:1597:36: warning: Value stored to 'pdata' during its initialization is never read [deadcode.DeadStores] Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20231111195330.338324-1-colin.i.king@gmail.com Signed-off-by: Mark Brown commit 7993d3a9c34f609c02171e115fd12c10e2105ff4 Author: Rui Zhang Date: Fri Nov 3 15:42:31 2023 +0800 regulator: core: Only increment use_count when enable_count changes The use_count of a regulator should only be incremented when the enable_count changes from 0 to 1. Similarly, the use_count should only be decremented when the enable_count changes from 1 to 0. In the previous implementation, use_count was sometimes decremented to 0 when some consumer called unbalanced disable, leading to unexpected disable even the regulator is enabled by other consumers. With this change, the use_count accurately reflects the number of users which the regulator is enabled. This should make things more robust in the case where a consumer does leak references. Signed-off-by: Rui Zhang Link: https://lore.kernel.org/r/20231103074231.8031-1-zr.zhang@vivo.com Signed-off-by: Mark Brown commit c986968fe92f20f2db26fa6bce27795b2e9ebe22 Author: Javier Martinez Canillas Date: Tue Nov 7 20:09:18 2023 +0100 regulator: core: Add option to prevent disabling unused regulators This may be useful for debugging and develompent purposes, when there are drivers that depend on regulators to be enabled but do not request them. It is inspired from the clk_ignore_unused and pd_ignore_unused parameters, that are used to keep firmware-enabled clocks and power domains on even if these are not used by drivers. The parameter is not expected to be used in normal cases and should not be needed on a platform with proper driver support. Signed-off-by: Javier Martinez Canillas Reviewed-by: Brian Masney Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20231107190926.1185326-1-javierm@redhat.com Signed-off-by: Mark Brown commit 1e22152aa59d793743fc53051dd7a042f362aecb Author: Oleksij Rempel Date: Thu Oct 26 16:48:24 2023 +0200 regulator: Implement uv_survival_time for handling under-voltage events Add 'uv_survival_time' field to regulation_constraints for specifying survival time post critical under-voltage event. Update the regulator notifier call chain and Device Tree property parsing to use this new field, allowing a configurable timeout before emergency shutdown. Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20231026144824.4065145-6-o.rempel@pengutronix.de Signed-off-by: Mark Brown commit 759e2bd96971763db1cfaf6cafc07654b12aa21e Author: Oleksij Rempel Date: Thu Oct 26 16:48:23 2023 +0200 regulator: dt-bindings: Add 'regulator-uv-less-critical-window-ms' property Introduces a new devicetree property to specifies the time window (in milliseconds) following a critical under-voltage (UV) event during which less critical actions can be safely carried out by the system. Less Critical Actions: - Logging the under-voltage event for later analysis. - Saving less critical data that may be useful for diagnosing issues or for audit purposes. More Critical Actions (post the less critical window): - Initiating procedures to properly shutdown hardware to prevent damage. The 'regulator-uv-less-critical-window-ms' property is crucial for conveying board-specific hardware characteristics, not for enforcing a certain policy. The time window represented by this property is derived from the physical attributes of the hardware like the capacity of on-board capacitors, the power consumption of the components, and the time needed to safely shut down hardware to prevent damage. These attributes can significantly vary between different boards, making it a board-specific property rather than a policy directive. By providing a precise representation of the time available for less critical actions post an under-voltage event, this property enables the kernel to make informed decisions on action prioritization, ensuring that essential preventative measures are taken to avoid hardware damage while also allowing for data capture and analysis. Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231026144824.4065145-5-o.rempel@pengutronix.de Signed-off-by: Mark Brown commit 633cd1c0a9de7609f97c0c86e3ac81153e8263b0 Author: Oleksij Rempel Date: Thu Oct 26 16:48:22 2023 +0200 regulator: dt-bindings: Allow system-critical marking for fixed-regulator In certain projects, the main system regulator, composed of simple components including an under-voltage detector and capacitors, can be aptly described as a fixed regulator in the device tree. To cater to such use cases, this patch extends the fixed regulator binding to support the 'system-critical-regulator' property. This property signifies that the fixed-regulator is vital for system stability. Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231026144824.4065145-4-o.rempel@pengutronix.de Signed-off-by: Mark Brown commit 8156c7dd47b92fc4a70c9ea58e7a9e88c8bc32be Author: Oleksij Rempel Date: Thu Oct 26 16:48:21 2023 +0200 regulator: Introduce handling for system-critical under-voltage events Handle under-voltage events for crucial regulators to maintain system stability and avoid issues during power drops. Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20231026144824.4065145-3-o.rempel@pengutronix.de Signed-off-by: Mark Brown commit 0e1c8dcbdecefea93dee19419b2f67dca591dd42 Author: Oleksij Rempel Date: Thu Oct 26 16:48:20 2023 +0200 regulator: dt-bindings: Add system-critical-regulator property Introduce a new Device Tree property 'system-critical-regulator' for marking a regulator as crucial for system stability or functionality. This helps in distinguishing regulators that are vital for system operations and may require special handling in under-voltage scenarios. Signed-off-by: Oleksij Rempel Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231026144824.4065145-2-o.rempel@pengutronix.de Signed-off-by: Mark Brown commit 40e13ae67c6fc2897b49398d6f804b5d1ec63fff Author: Dang Huynh Date: Mon Nov 6 19:08:34 2023 +0700 dt-bindings: regulator: qcom,smd-rpm-regulator: Document PM8937 IC Document the pm8937 compatible string and available regulators in the QCOM SMD RPM regulator documentation. Signed-off-by: Dang Huynh Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231106-pm8937-v1-6-ec51d9eeec53@riseup.net Signed-off-by: Mark Brown commit 18cc1cd011131d878be2619b56eff7bc2a278bdf Author: Dang Huynh Date: Mon Nov 6 19:08:33 2023 +0700 regulator: qcom_smd: Add PM8937 regulators The PM8937 is found on boards with MSM8917, MSM8937, MSM8940 SoCs and APQ variants. It provides 6 SMPS (two are controlled by SPMI) and 23 LDO regulators. Signed-off-by: Dang Huynh Reviewed-by: Stephan Gerhold Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231106-pm8937-v1-5-ec51d9eeec53@riseup.net Signed-off-by: Mark Brown commit f2b003c8235e0afed60ed426e891e41dab131821 Author: Dang Huynh Date: Mon Nov 6 19:08:32 2023 +0700 dt-bindings: regulator: qcom,spmi-regulator: Document PM8937 PMIC Add support for qcom,pm8937-regulators compatible string and add relevant supplies in QCOM's SPMI regulator documentation. Signed-off-by: Dang Huynh Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231106-pm8937-v1-4-ec51d9eeec53@riseup.net Signed-off-by: Mark Brown commit c0d6b2acf78e3195a6b100a236210f2e6e42b0c0 Author: Dang Huynh Date: Mon Nov 6 19:08:31 2023 +0700 regulator: qcom_spmi: Add PM8937 SPMI regulator The PM8937 has 4 HFSMPS, 2 FTSMPS2.5 (for controlling APC voltage) and 23 LDO regulators. Add the configuration for this chip. Signed-off-by: Dang Huynh Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20231106-pm8937-v1-3-ec51d9eeec53@riseup.net Signed-off-by: Mark Brown commit d958d97848a6604d024221920d300d07869715a2 Author: Ben Wolsieffer Date: Thu Nov 2 16:30:39 2023 -0400 regmap: kunit: add noinc write test Add a test for writing to a noinc register, which verifies that the write does not touch adjacent registers. This test succeeds with [1] applied and fails without it. [1] 984a4afdc87a ("regmap: prevent noinc writes from clobbering cache") Signed-off-by: Ben Wolsieffer Link: https://lore.kernel.org/r/20231102203039.3069305-2-ben.wolsieffer@hefring.com Signed-off-by: Mark Brown commit 02e3564a344064aca49f147e8a4eecbe5d3459fc Author: Ben Wolsieffer Date: Thu Nov 2 16:30:38 2023 -0400 regmap: ram: support noinc semantics Support noinc semantics in RAM backed regmaps, for testing purposes. Add a new callback that selects registers which should have noinc behavior. Bulk writes to a noinc register will cause the last value in the buffer to be assigned to the register, while bulk reads will copy the same value repeatedly into the buffer. This patch only adds support to regmap-raw-ram, since regmap-ram does not support bulk operations. Signed-off-by: Ben Wolsieffer Link: https://lore.kernel.org/r/20231102203039.3069305-1-ben.wolsieffer@hefring.com Signed-off-by: Mark Brown commit 601cc04c9d73ed728b29eaddb29ae13b48b03ce7 Author: Dan Carpenter Date: Mon Oct 30 12:03:51 2023 +0300 ASoC: amd: acp: remove unnecessary NULL check The list iterator in a list_for_each_entry() loop can never be NULL. Remove the check and pull the code in a tab. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/e376a712-e0c6-446f-9e0b-c444dd795cbb@moroto.mountain Signed-off-by: Mark Brown commit dc29d3d253f1f3513a916f0b4271569223860c71 Author: Krzysztof Kozlowski Date: Tue Nov 7 11:16:10 2023 +0100 ASoC: dt-bindings: use "soundwire" as controller's node name in examples Soundwire Devicetree bindings expect the Soundwire controller device node to be named just "soundwire". Correct examples, so the incorrect code will not be re-used. Reported-by: Neil Armstrong Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231107101610.13728-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit c239b79315167d3e9b4b1e537b00e1ff5b87a317 Author: Krzysztof Kozlowski Date: Mon Nov 6 19:04:22 2023 +0100 ASoC: dt-bindings: qcom,sm8250: add SM8550 sound card Add sound card for SM8550, which as of now looks fully compatible with SM8450. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20231106180422.170492-1-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown commit c479f4989486b79cb92f0ee3b2ffcfc77fc3e443 Author: Sebastian Reichel Date: Thu Nov 9 19:44:43 2023 +0100 dt-bindings: es8328: convert to DT schema format Convert the binding to DT schema format. Note, that "IPVDD-supply" got fixed to be "HPVDD-supply" during the conversion. This was obviously a typo in the old binding. The old binding example, DT files, chip datasheet and Linux driver use HPVDD. Signed-off-by: Sebastian Reichel Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231109184453.108676-1-sebastian.reichel@collabora.com Signed-off-by: Mark Brown commit fc213b8d4466d1fcf39ab760979be4eac2a67635 Author: Weidong Wang Date: Thu Nov 9 17:37:07 2023 +0800 ASoC: codecs: Modify the bin file parsing method Modify the aw88395_lib file so that the bin file parsing is no longer related to the chip id of the chip. Adopt the bin file data type "prof_data_type" as the differentiation between different chip bin file parsing methods. Since the chip id macro for the aw88399 is no longer defined in aw88395_reg.h, define the chip id for the aw88399 in aw88399.h Signed-off-by: Weidong Wang Link: https://lore.kernel.org/r/20231109093708.13155-1-wangweidong.a@awinic.com Signed-off-by: Mark Brown commit 8df735701a7051825254ec7a12a661307bb7bdc1 Author: Christophe JAILLET Date: Sat Nov 11 18:37:39 2023 +0100 ASoC: tegra: convert not to use dma_request_slave_channel() dma_request_slave_channel() is deprecated. dma_request_chan() should be used directly instead. Switch to the preferred function and update the error handling accordingly. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/b78685e4103f12931ddb09c1654bc6b04b640868.1699724240.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 6d02f355c3d2fe86f503793e4df09898e9f9e703 Author: Rob Herring Date: Wed Nov 1 09:09:22 2023 -0500 ASoC: dt-bindings: Simplify port schema The use of 'definitions' is not necessary and also problematic because the dtschema tools don't process 'definitions' resulting in this spurious warning: Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: port:endpoint: Unevaluated properties are not allowed ('phandle' was unexpected) from schema $id: http://devicetree.org/schemas/sound/renesas,rsnd.yaml# Fix this by moving the port schema to #/properties/port and referencing that directly from the 'ports' schema. Really, a binding should just always use 'ports' if multiple ports are possible. There's no benefit to supporting both forms. However, it appears there are already lots of users of this one with a single 'port' node. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231101140923.16344-2-robh@kernel.org Signed-off-by: Mark Brown commit 970f88ad0026ba8427e319b1da932c161723db82 Author: Syed Saba Kareem Date: Tue Oct 31 19:29:33 2023 +0530 ASoC: amd: acp: correct the format order Correct the formats order for dai driver structures. Signed-off-by: Syed Saba Kareem Link: https://lore.kernel.org/r/20231031135949.1064581-2-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown commit 60b4a86cc6b83ccd1e4fb6a74f28a127b8025bce Author: Syed Saba Kareem Date: Tue Oct 31 19:29:32 2023 +0530 ASoC: amd: acp: Fix for indentation issue Fix indentation issue reported in acp70_pcm_resume() function. Fixes: e84db124cb21 (ASoC: amd: acp: Add pci legacy driver support for acp7.0 platform") Signed-off-by: Syed Saba Kareem Link: https://lore.kernel.org/r/20231031135949.1064581-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown commit 79323dc80318aab6c2d05abdbcf88f09b50522c5 Author: Amadeusz Sławiński Date: Thu Oct 26 13:35:49 2023 +0200 ASoC: dapm: Simplify widget clone New DAPM widgets are created based on a provided template. When cloning the data, the name and stream name also need to be cloned. Currently the data and the names are initialized in different places. Simplify the code by having entire initialization in one place. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/20231026113549.1897368-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit bb341f75a05238ccd35b1ec1eb1849a3955eebb3 Author: Keguang Zhang Date: Mon Nov 6 20:51:03 2023 +0800 ASoC: sti-uniperf: Use default pcm_config instead The sti-uniperf pcm_config is the same as the default pcm_config. Since commit 43556516fffe ("ASoC: soc-generic-dmaengine-pcm: Use default config when none is given"), passing a NULL pointer could let this driver use the default config. Signed-off-by: Keguang Zhang Link: https://lore.kernel.org/r/20231106-sti-uniperf-v1-1-b2d8749cfa2e@gmail.com Signed-off-by: Mark Brown commit a08ee9d00e3120e2e77a3fc093ba29070a3979be Author: Trevor Wu Date: Fri Nov 3 17:54:32 2023 +0800 ASoC: SOF: mediatek: remove unused variables To prevent confusion on the follow-up platform, it is necessary to remove any unused variables within the struct mtk_adsp_chip_info. Signed-off-by: Trevor Wu Reviewed-by: Yaochun Hung Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231103095433.10475-4-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit a4de5a345cf76c6f294a906e11c2fb675a46fd3d Author: Trevor Wu Date: Fri Nov 3 17:54:31 2023 +0800 ASoC: SOF: mediatek: mt8186: clean up unused code Since there are some variables that are no longer being used, we remove the code that was implemented for those variables. Signed-off-by: Trevor Wu Reviewed-by: Yaochun Hung Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231103095433.10475-3-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit ab475966455ce285c2c9978a3e3bfe97d75ff8d4 Author: Trevor Wu Date: Fri Nov 3 17:54:30 2023 +0800 ASoC: SOF: mediatek: mt8195: clean up unused code Since there are some variables that are no longer being used, we remove the code that was implemented for those variables. Signed-off-by: Trevor Wu Reviewed-by: Yaochun Hung Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20231103095433.10475-2-trevor.wu@mediatek.com Signed-off-by: Mark Brown commit 8a81491adbd9b25a648704c9825adaefb0c31868 Author: Zhu Ning Date: Wed Nov 1 15:27:02 2023 +0800 ASoC: codecs: ES8326: Changing the headset detection time The old headset detection time is not enough for the new chip version. An error occurs with the old detection time.According to tests, 400ms is the best detection time that does not trigger an error. The delay time after the trigger is reduced by 300ms to keep the whole detection time unchanged. Signed-off-by: Zhu Ning Link: https://lore.kernel.org/r/20231101072702.91316-4-zhuning0077@gmail.com Signed-off-by: Mark Brown commit fc702b2c04d778d7e3a4091ebe54a86c5d0a0d96 Author: Zhu Ning Date: Wed Nov 1 15:27:01 2023 +0800 ASoC: codecs: ES8326: Changing initialisation and broadcasting New chip versions require new initialisation and playback processes. Changing the initialisation and playback process for better results. The old chip versions are going to work well with the new sequences. We've tested this with version_v0 and version_v3 chips under the new sequence and they both pass. Signed-off-by: Zhu Ning Link: https://lore.kernel.org/r/20231101072702.91316-3-zhuning0077@gmail.com Signed-off-by: Mark Brown commit ee09084fbf9fdda6bf0179bcdca52196d0cde8a1 Author: Zhu Ning Date: Wed Nov 1 15:27:00 2023 +0800 ASoC: codecs: ES8326: Add chip version flag The new chip version requires the addition of a new clock table. We determine which clock table to choose based on the version. Newer versions of the chip have fewer processes to go through in the headset detection, so the version flag is used to skip them. Signed-off-by: Zhu Ning Link: https://lore.kernel.org/r/20231101072702.91316-2-zhuning0077@gmail.com Signed-off-by: Mark Brown commit 91d1a18b6381abd7a0137449fe345924072e4a32 Author: Seven Lee Date: Tue Nov 7 11:52:30 2023 +0800 ASoC: nau8821: Add slew rate controls. The patch supports DMIC clock slew rate controls. Signed-off-by: Seven Lee Link: https://lore.kernel.org/r/20231107035230.1241683-3-wtli@nuvoton.com Signed-off-by: Mark Brown commit 1fb1a7c4a6328aff97eeca513fe7239099c13016 Author: Seven Lee Date: Tue Nov 7 11:52:29 2023 +0800 ASoC: dt-bindings: nau8821: Add DMIC slew rate. Add input with DMIC slew rate controls. Signed-off-by: Seven Lee Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20231107035230.1241683-2-wtli@nuvoton.com Signed-off-by: Mark Brown commit ca5abf5d2e1c3860382e0e33599e969cb9c9b42b Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:12 2023 +0100 ASoC: Intel: avs: ssm4567: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-18-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit ba096fc618254918056061ecef32aa77c2fcaf84 Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:11 2023 +0100 ASoC: Intel: avs: rt5682: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-17-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 5f249523d3fcf1fe28e567a17a3053ea7ff899a0 Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:10 2023 +0100 ASoC: Intel: avs: rt5663: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-16-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 389f3c6c7ed89d53ecd83e629b7e529630cdb96c Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:09 2023 +0100 ASoC: Intel: avs: rt5514: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-15-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 3d4021f30abdb7cef51a901adc0dfc4d4ee98e9d Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:08 2023 +0100 ASoC: Intel: avs: rt298: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-14-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 027ab0cab18071fa3476ffe7bb69ade551515ce6 Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:07 2023 +0100 ASoC: Intel: avs: rt286: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-13-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 54c830fd4e38261adffa51bb22c44a2e33d803ba Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:06 2023 +0100 ASoC: Intel: avs: rt274: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-12-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 4a5403e3a75ddc24941f754c14c3299cc0e28fe8 Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:05 2023 +0100 ASoC: Intel: avs: probe: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-11-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit c94643c2b416afc473541943291e61c453846a6d Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:04 2023 +0100 ASoC: Intel: avs: nau8825: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-10-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit c3ff01859c31408eadfd607352d4f87e52096371 Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:03 2023 +0100 ASoC: Intel: avs: max98927: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-9-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 8e660f303230741ecaab561a30e123e7dc76abda Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:02 2023 +0100 ASoC: Intel: avs: max98373: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-8-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit f1e9f4f5e9e5506edbd17b33065ec8c8a9e6caab Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:01 2023 +0100 ASoC: Intel: avs: max98357a: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-7-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 8267213c54db078db091b778e904ec1af8fc6ee6 Author: Amadeusz Sławiński Date: Thu Nov 2 13:47:00 2023 +0100 ASoC: Intel: avs: i2s_test: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-6-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 9a872caede56d20564caf30d7ea7cf61b66f4060 Author: Amadeusz Sławiński Date: Thu Nov 2 13:46:59 2023 +0100 ASoC: Intel: avs: hdaudio: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-5-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 9441450e171fc90aa3fceadae9728acf8bd0726a Author: Amadeusz Sławiński Date: Thu Nov 2 13:46:58 2023 +0100 ASoC: Intel: avs: es8336: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit deb8dcad7bc3505881e2c0680d8f01f23fcbba98 Author: Amadeusz Sławiński Date: Thu Nov 2 13:46:57 2023 +0100 ASoC: Intel: avs: dmic: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 59fff33e9d923779b68fe46f39262256caba71d6 Author: Amadeusz Sławiński Date: Thu Nov 2 13:46:56 2023 +0100 ASoC: Intel: avs: da7219: Add proper id_table Add id_table and use it instead of alias to load module. Suggested-by: Krzysztof Kozlowski Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231102124712.2549327-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 89ef42088b3ba884a007ad10bd89ce8a81b9dedd Author: Daniel Baluta Date: Thu Nov 9 15:59:00 2023 +0200 ASoC: SOF: Add support for configuring PDM interface from topology Currently we only support configuration for number of channels and sample rate. Reviewed-by: Péter Ujfalusi Reviewed-by: Iuliana Prodan Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20231109135900.88310-3-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit fc85d9d0b3ba8f8934963c760af98fc38029d9da Author: Daniel Baluta Date: Thu Nov 9 15:58:59 2023 +0200 ASoC: SOF: imx8m: Add DAI driver entry for MICFIL PDM This will allow creating of PDM DAI links. Reviewed-by: Péter Ujfalusi Reviewed-by: Iuliana Prodan Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20231109135900.88310-2-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit e76d28bdf9ba5388b8c4835a5199dc427b603188 Author: Waiman Long Date: Fri Nov 3 23:13:01 2023 -0400 cgroup/rstat: Reduce cpu_lock hold time in cgroup_rstat_flush_locked() When cgroup_rstat_updated() isn't being called concurrently with cgroup_rstat_flush_locked(), its run time is pretty short. When both are called concurrently, the cgroup_rstat_updated() run time can spike to a pretty high value due to high cpu_lock hold time in cgroup_rstat_flush_locked(). This can be problematic if the task calling cgroup_rstat_updated() is a realtime task running on an isolated CPU with a strict latency requirement. The cgroup_rstat_updated() call can happen when there is a page fault even though the task is running in user space most of the time. The percpu cpu_lock is used to protect the update tree - updated_next and updated_children. This protection is only needed when cgroup_rstat_cpu_pop_updated() is being called. The subsequent flushing operation which can take a much longer time does not need that protection as it is already protected by cgroup_rstat_lock. To reduce the cpu_lock hold time, we need to perform all the cgroup_rstat_cpu_pop_updated() calls up front with the lock released afterward before doing any flushing. This patch adds a new cgroup_rstat_updated_list() function to return a singly linked list of cgroups to be flushed. Some instrumentation code are added to measure the cpu_lock hold time right after lock acquisition to after releasing the lock. Parallel kernel build on a 2-socket x86-64 server is used as the benchmarking tool for measuring the lock hold time. The maximum cpu_lock hold time before and after the patch are 100us and 29us respectively. So the worst case time is reduced to about 30% of the original. However, there may be some OS or hardware noises like NMI or SMI in the test system that can worsen the worst case value. Those noises are usually tuned out in a real production environment to get a better result. OTOH, the lock hold time frequency distribution should give a better idea of the performance benefit of the patch. Below were the frequency distribution before and after the patch: Hold time Before patch After patch --------- ------------ ----------- 0-01 us 804,139 13,738,708 01-05 us 9,772,767 1,177,194 05-10 us 4,595,028 4,984 10-15 us 303,481 3,562 15-20 us 78,971 1,314 20-25 us 24,583 18 25-30 us 6,908 12 30-40 us 8,015 40-50 us 2,192 50-60 us 316 60-70 us 43 70-80 us 7 80-90 us 2 >90 us 3 Signed-off-by: Waiman Long Reviewed-by: Yosry Ahmed Signed-off-by: Tejun Heo commit 72c6303acfa1008c542e093bc9f9916fb99e0323 Author: Waiman Long Date: Wed Oct 25 14:25:55 2023 -0400 cgroup/cpuset: Take isolated CPUs out of workqueue unbound cpumask To make CPUs in isolated cpuset partition closer in isolation to the boot time isolated CPUs specified in the "isolcpus" boot command line option, we need to take those CPUs out of the workqueue unbound cpumask so that work functions from the unbound workqueues won't run on those CPUs. Otherwise, they will interfere the user tasks running on those isolated CPUs. With the introduction of the workqueue_unbound_exclude_cpumask() helper function in an earlier commit, those isolated CPUs can now be taken out from the workqueue unbound cpumask. This patch also updates cgroup-v2.rst to mention that isolated CPUs will be excluded from unbound workqueue cpumask as well as updating test_cpuset_prs.sh to verify the correctness of the new *cpuset.cpus.isolated file, if available via cgroup_debug option. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 11e5f407b64a8fa09d1a4b336d15bd285a434c1f Author: Waiman Long Date: Wed Oct 25 14:25:54 2023 -0400 cgroup/cpuset: Keep track of CPUs in isolated partitions Add a new internal isolated_cpus mask to keep track of the CPUs that are in isolated partitions. Expose that new cpumask as a new root-only control file ".cpuset.cpus.isolated". tj: Updated patch description to reflect dropping __DEBUG__ prefix. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 14060dfc481a309e3f236127b0a77abbf249648f Author: Waiman Long Date: Wed Oct 25 14:25:53 2023 -0400 selftests/cgroup: Minor code cleanup and reorganization of test_cpuset_prs.sh Minor cleanup of test matrix and relocation of test_isolated() function to prepare for the next patch. There is no functional change. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit fe28f631fa941fba583d1c4f25895284b90af671 Author: Waiman Long Date: Wed Oct 25 14:25:52 2023 -0400 workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask When the "isolcpus" boot command line option is used to add a set of isolated CPUs, those CPUs will be excluded automatically from wq_unbound_cpumask to avoid running work functions from unbound workqueues. Recently cpuset has been extended to allow the creation of partitions of isolated CPUs dynamically. To make it closer to the "isolcpus" in functionality, the CPUs in those isolated cpuset partitions should be excluded from wq_unbound_cpumask as well. This can be done currently by explicitly writing to the workqueue's cpumask sysfs file after creating the isolated partitions. However, this process can be error prone. Ideally, the cpuset code should be allowed to request the workqueue code to exclude those isolated CPUs from wq_unbound_cpumask so that this operation can be done automatically and the isolated CPUs will be returned back to wq_unbound_cpumask after the destructions of the isolated cpuset partitions. This patch adds a new workqueue_unbound_exclude_cpumask() function to enable that. This new function will exclude the specified isolated CPUs from wq_unbound_cpumask. To be able to restore those isolated CPUs back after the destruction of isolated cpuset partitions, a new wq_requested_unbound_cpumask is added to store the user provided unbound cpumask either from the boot command line options or from writing to the cpumask sysfs file. This new cpumask provides the basis for CPU exclusion. To enable users to understand how the wq_unbound_cpumask is being modified internally, this patch also exposes the newly introduced wq_requested_unbound_cpumask as well as a wq_isolated_cpumask to store the cpumask to be excluded from wq_unbound_cpumask as read-only sysfs files. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo commit 421fc858023b839106a9c0dc42cd8947cf981d83 Author: Atul Kumar Pant Date: Mon Nov 6 23:40:34 2023 +0530 selftests: cgroup: Fixes a typo in a comment Signed-off-by: Atul Kumar Pant Signed-off-by: Tejun Heo commit 100888fb6d8a185866b1520031ee7e3182b173de Author: Yonghong Song Date: Fri Nov 10 11:36:44 2023 -0800 selftests/bpf: Fix pyperf180 compilation failure with clang18 With latest clang18 (main branch of llvm-project repo), when building bpf selftests, [~/work/bpf-next (master)]$ make -C tools/testing/selftests/bpf LLVM=1 -j The following compilation error happens: fatal error: error in backend: Branch target out of insn range ... Stack dump: 0. Program arguments: clang -g -Wall -Werror -D__TARGET_ARCH_x86 -mlittle-endian -I/home/yhs/work/bpf-next/tools/testing/selftests/bpf/tools/include -I/home/yhs/work/bpf-next/tools/testing/selftests/bpf -I/home/yhs/work/bpf-next/tools/include/uapi -I/home/yhs/work/bpf-next/tools/testing/selftests/usr/include -idirafter /home/yhs/work/llvm-project/llvm/build.18/install/lib/clang/18/include -idirafter /usr/local/include -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 --target=bpf -c progs/pyperf180.c -mcpu=v3 -o /home/yhs/work/bpf-next/tools/testing/selftests/bpf/pyperf180.bpf.o 1. parser at end of file 2. Code generation ... The compilation failure only happens to cpu=v2 and cpu=v3. cpu=v4 is okay since cpu=v4 supports 32-bit branch target offset. The above failure is due to upstream llvm patch [1] where some inlining behavior are changed in clang18. To workaround the issue, previously all 180 loop iterations are fully unrolled. The bpf macro __BPF_CPU_VERSION__ (implemented in clang18 recently) is used to avoid unrolling changes if cpu=v4. If __BPF_CPU_VERSION__ is not available and the compiler is clang18, the unrollng amount is unconditionally reduced. [1] https://github.com/llvm/llvm-project/commit/1a2e77cf9e11dbf56b5720c607313a566eebb16e Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Tested-by: Alan Maguire Link: https://lore.kernel.org/bpf/20231110193644.3130906-1-yonghong.song@linux.dev commit 7add80126bcedddd157ddc09988b032c93ed56c7 Author: Gurchetan Singh Date: Wed Oct 18 11:17:27 2023 -0700 drm/uapi: add explicit virtgpu context debug name There are two problems with the current method of determining the virtio-gpu debug name. 1) TASK_COMM_LEN is defined to be 16 bytes only, and this is a Linux kernel idiom (see PR_SET_NAME + PR_GET_NAME). Though, Android/FreeBSD get around this via setprogname(..)/getprogname(..) in libc. On Android, names longer than 16 bytes are common. For example, one often encounters a program like "com.android.systemui". The virtio-gpu spec allows the debug name to be up to 64 bytes, so ideally userspace should be able to set debug names up to 64 bytes. 2) The current implementation determines the debug name using whatever task initiated virtgpu. This is could be a "RenderThread" of a larger program, when we actually want to propagate the debug name of the program. To fix these issues, add a new CONTEXT_INIT param that allows userspace to set the debug name when creating a context. It takes a null-terminated C-string as the param value. The length of the string (excluding the terminator) **should** be <= 64 bytes. Otherwise, the debug_name will be truncated to 64 bytes. Link to open-source userspace: https://android-review.googlesource.com/c/platform/hardware/google/gfxstream/+/2787176 Signed-off-by: Gurchetan Singh Reviewed-by: Josh Simonot Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20231018181727.772-2-gurchetansingh@chromium.org commit e4178256094a76cc36d9b9aabe7482615959b26f Author: Gurchetan Singh Date: Wed Oct 18 11:17:26 2023 -0700 drm/virtio: use uint64_t more in virtio_gpu_context_init_ioctl drm_virtgpu_context_set_param defines both param and value to be u64s. Signed-off-by: Gurchetan Singh Reviewed-by: Josh Simonot Reviewed-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20231018181727.772-1-gurchetansingh@chromium.org commit f8e9325f09c778fb61d3cebd27a9f3738e6fea48 Author: Jani Nikula Date: Fri Nov 10 13:48:07 2023 +0200 drm/i915: update in-source bug filing URLs The bug filing documentation has been moved from the gitlab wiki to gitlab pages at https://drm.pages.freedesktop.org/intel-docs/. Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231110114807.3455739-2-jani.nikula@intel.com commit ff5a55a3e80eba616f4d06fa255bfe4f8b032bec Author: Jani Nikula Date: Fri Nov 10 13:48:06 2023 +0200 MAINTAINERS: update drm/i915 W: and B: entries The 01.org page has ceased to exist, and the relevant documentation is now hosted at https://drm.pages.freedesktop.org/intel-docs/ Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Signed-off-by: Jani Nikula Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231110114807.3455739-1-jani.nikula@intel.com commit 9b1c97fc0ce6090c328b5723250f4deeefc95fcd Author: Jani Nikula Date: Thu Nov 9 18:07:22 2023 +0200 drm/i915: remove excess functions from plane protection check Reduce the function calls by reusing ->decrypt. Reviewed-by: Rodrigo Vivi Reviewed-by: Suraj Kandpal Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231109160722.3372379-2-jani.nikula@intel.com commit 88a6e46cd3e33756b168c7f2366bf7029a16da56 Author: Jani Nikula Date: Thu Nov 9 18:07:21 2023 +0200 drm/i915: abstract plane protection check Centralize the conditions in a function. Reviewed-by: Rodrigo Vivi Reviewed-by: Suraj Kandpal Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231109160722.3372379-1-jani.nikula@intel.com commit b8e3a87a627b575896e448021e5c2f8a3bc19931 Author: Jordan Rome Date: Wed Nov 8 03:23:34 2023 -0800 bpf: Add crosstask check to __bpf_get_stack Currently get_perf_callchain only supports user stack walking for the current task. Passing the correct *crosstask* param will return 0 frames if the task passed to __bpf_get_stack isn't the current one instead of a single incorrect frame/address. This change passes the correct *crosstask* param but also does a preemptive check in __bpf_get_stack if the task is current and returns -EOPNOTSUPP if it is not. This issue was found using bpf_get_task_stack inside a BPF iterator ("iter/task"), which iterates over all tasks. bpf_get_task_stack works fine for fetching kernel stacks but because get_perf_callchain relies on the caller to know if the requested *task* is the current one (via *crosstask*) it was failing in a confusing way. It might be possible to get user stacks for all tasks utilizing something like access_process_vm but that requires the bpf program calling bpf_get_task_stack to be sleepable and would therefore be a breaking change. Fixes: fa28dcb82a38 ("bpf: Introduce helper bpf_get_task_stack()") Signed-off-by: Jordan Rome Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231108112334.3433136-1-jordalgo@meta.com commit 92411764e3106f38ac815d2fb1ae011e7bbe2abc Merge: 689b097a06baf aecd408b7e507 Author: Alexei Starovoitov Date: Fri Nov 10 09:02:13 2023 -0800 Merge branch 'for-6.8-bpf' of https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup into bpf-next Merge cgroup prerequisite patches. Link: https://lore.kernel.org/bpf/20231029061438.4215-1-laoar.shao@gmail.com/ Signed-off-by: Alexei Starovoitov commit 689b097a06bafb461ec162fc3b3ecc9765cea67b Author: Yafang Shao Date: Mon Nov 6 03:18:02 2023 +0000 compiler-gcc: Suppress -Wmissing-prototypes warning for all supported GCC The kernel supports a minimum GCC version of 5.1.0 for building. However, the "__diag_ignore_all" directive only suppresses the "-Wmissing-prototypes" warning for GCC versions >= 8.0.0. As a result, when building the kernel with older GCC versions, warnings may be triggered. The example below illustrates the warnings reported by the kernel test robot using GCC 7.5.0: compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 All warnings (new ones prefixed by >>): kernel/bpf/helpers.c:1893:19: warning: no previous prototype for 'bpf_obj_new_impl' [-Wmissing-prototypes] __bpf_kfunc void *bpf_obj_new_impl(u64 local_type_id__k, void *meta__ign) ^~~~~~~~~~~~~~~~ kernel/bpf/helpers.c:1907:19: warning: no previous prototype for 'bpf_percpu_obj_new_impl' [-Wmissing-prototypes] __bpf_kfunc void *bpf_percpu_obj_new_impl(u64 local_type_id__k, void *meta__ign) [...] To address this, we should also suppress the "-Wmissing-prototypes" warning for older GCC versions. "#pragma GCC diagnostic push" is supported as of GCC 4.6, and both "-Wmissing-prototypes" and "-Wmissing-declarations" are supported for all the GCC versions that we currently support. Therefore, it is reasonable to suppress these warnings for all supported GCC versions. With this adjustment, it's important to note that after implementing "__diag_ignore_all", it will effectively suppress warnings for all the supported GCC versions. In the future, if you wish to suppress warnings that are only supported on higher GCC versions, it is advisable to explicitly use "__diag_ignore" to specify the GCC version you are targeting. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311031651.A7crZEur-lkp@intel.com/ Suggested-by: Arnd Bergmann Signed-off-by: Yafang Shao Cc: Kumar Kartikeya Dwivedi Cc: Arnd Bergmann Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20231106031802.4188-1-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov commit 540527b1385fb203cc4513ca838b4de60bbbc49a Author: AngeloGioacchino Del Regno Date: Thu Nov 9 11:25:43 2023 +0100 drm/panfrost: Set regulators on/off during system sleep on MediaTek SoCs All of the MediaTek SoCs supported by Panfrost can completely cut power to the GPU during full system sleep without any user-noticeable delay in the resume operation, as shown by measurements taken on multiple MediaTek SoCs (MT8183/86/92/95). As an example, for MT8195 - a "before" with only runtime PM operations (so, without turning on/off regulators), and an "after" executing both the system sleep .resume() handler and .runtime_resume() (so the time refers to T_Resume + T_Runtime_Resume): Average Panfrost-only system sleep resume time, before: ~33500ns Average Panfrost-only system sleep resume time, after: ~336200ns Keep in mind that this additional ~308200 nanoseconds delay happens only in resume from a full system suspend, and not in runtime PM operations, hence it is acceptable. Measurements were also taken on MT8186, showing a delay of ~312000 ns. Testing of this happened on all of the aforementioned MediaTek SoCs, but: MT8183 got tested only by KernelCI with <=10 suspend/resume cycles MT8186, MT8192, MT8195 were tested manually with over 100 suspend/resume cycles with GNOME DE (Mutter + Wayland). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20231109102543.42971-7-angelogioacchino.delregno@collabora.com commit 889a2b06f823575f4e8def0fe60d294365b0e1f9 Author: AngeloGioacchino Del Regno Date: Thu Nov 9 11:25:42 2023 +0100 drm/panfrost: Implement ability to turn on/off regulators in suspend Some platforms/SoCs can power off the GPU entirely by completely cutting off power, greatly enhancing battery time during system suspend: add a new pm_feature GPU_PM_VREG_OFF to allow turning off the GPU regulators during full suspend only on selected platforms. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20231109102543.42971-6-angelogioacchino.delregno@collabora.com commit 32f175d4261a2c940fe7913f509f9f41c105b2b6 Author: AngeloGioacchino Del Regno Date: Thu Nov 9 11:25:41 2023 +0100 drm/panfrost: Set clocks on/off during system sleep on MediaTek SoCs All of the MediaTek SoCs supported by Panfrost can switch the clocks off and on during system sleep to save some power without any user experience penalty. Measurements taken on multiple MediaTek SoCs (MT8183/8186/8192/8195) show that adding this will not prolong the time that is required to resume the system in any meaningful way. As an example, for MT8195 - a "before" with only runtime PM operations (so, without turning on/off GPU clocks), and an "after" executing both the system sleep .resume() handler and .runtime_resume() (so the time refers to T_Resume + T_Runtime_Resume): Average Panfrost-only system sleep resume time, before: ~28000ns Average Panfrost-only system sleep resume time, after: ~33500ns Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20231109102543.42971-5-angelogioacchino.delregno@collabora.com commit 56e76c0179185568049913257c18069293f8bde9 Author: AngeloGioacchino Del Regno Date: Thu Nov 9 11:25:40 2023 +0100 drm/panfrost: Implement ability to turn on/off GPU clocks in suspend Currently, the GPU is being internally powered off for runtime suspend and turned back on for runtime resume through commands sent to it, but note that the GPU doesn't need to be clocked during the poweroff state, hence it is possible to save some power on selected platforms. Add suspend and resume handlers for full system sleep and then add a new panfrost_gpu_pm enumeration and a pm_features variable in the panfrost_compatible structure: BIT(GPU_PM_CLK_DIS) will be used to enable this power saving technique only on SoCs that are able to safely use it. Note that this was implemented only for the system sleep case and not for runtime PM because testing on one of my MediaTek platforms showed issues when turning on and off clocks aggressively (in PM runtime) resulting in a full system lockup. Doing this only for full system sleep never showed issues during my testing by suspending and resuming the system continuously for more than 100 cycles. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20231109102543.42971-4-angelogioacchino.delregno@collabora.com commit 4d74420ffcf4c99165908f058066dd242813dc75 Author: AngeloGioacchino Del Regno Date: Thu Nov 9 11:25:39 2023 +0100 drm/panfrost: Tighten polling for soft reset and power on In many cases, soft reset takes more than 1 microsecond, but definitely less than 10; moreover in the poweron flow, tilers, shaders and l2 will become ready (each) in less than 10 microseconds as well. Even in the cases (at least on my platforms, rarely) in which those take more than 10 microseconds, it's very unlikely to see both soft reset and poweron to take more than 70 microseconds. Shorten the polling delay to 10 microseconds to consistently reduce the runtime resume time of the GPU. As an indicative example, measurements taken on a MediaTek MT8195 SoC Average runtime resume time in nanoseconds before this commit: GDM, user selection up/down: 88435ns GDM, Text Entry (typing user/password): 91489ns GNOME Desktop, idling, GKRELLM running: 73200ns After this commit: GDM: user selection up/down: 26690ns GDM: Text Entry (typing user/password): 27917ns GNOME Desktop, idling, GKRELLM running: 25304ns Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20231109102543.42971-3-angelogioacchino.delregno@collabora.com commit 57d4e26717b030fd794df3534e6b2e806eb761e4 Author: AngeloGioacchino Del Regno Date: Thu Nov 9 11:25:38 2023 +0100 drm/panfrost: Perform hard reset to recover GPU if soft reset fails Even though soft reset should ideally never fail, during development of some power management features I managed to get some bits wrong: this resulted in GPU soft reset failures, where the GPU was never able to recover, not even after suspend/resume cycles, meaning that the only way to get functionality back was to reboot the machine. Perform a hard reset after a soft reset failure to be able to recover the GPU during runtime (so, without any machine reboot). Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20231109102543.42971-2-angelogioacchino.delregno@collabora.com commit 22aa1a209018dc2eca78745f7666db63637cd5dc Author: AngeloGioacchino Del Regno Date: Thu Nov 2 15:15:07 2023 +0100 drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off() The layout of the registers {TILER,SHADER,L2}_PWROFF_LO, used to request powering off cores, is the same as the {TILER,SHADER,L2}_PWRON_LO ones: this means that in order to request poweroff of cores, we are supposed to write a bitmask of cores that should be powered off! This means that the panfrost_gpu_power_off() function has always been doing nothing. Fix powering off the GPU by writing a bitmask of the cores to poweroff to the relevant PWROFF_LO registers and then check that the transition (from ON to OFF) has finished by polling the relevant PWRTRANS_LO registers. While at it, in order to avoid code duplication, move the core mask logic from panfrost_gpu_power_on() to a new panfrost_get_core_mask() function, used in both poweron and poweroff. Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20231102141507.73481-1-angelogioacchino.delregno@collabora.com commit c06547d02094e7eb81389e9485a45d91cc21914c Author: Namhyung Kim Date: Thu Nov 9 15:59:28 2023 -0800 perf probe: Convert to check dwarf_getcfi feature Now it has a feature check for the dwarf_getcfi(), use it and convert the code to check HAVE_DWARF_CFI_SUPPORT definition. Suggested-by: Masami Hiramatsu (Google) Signed-off-by: Namhyung Kim Acked-by: Masami Hiramatsu (Google) Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f67f2fda7d997a43e3323aec88d76f1b5e0ea5f2 Author: Namhyung Kim Date: Thu Nov 9 15:59:27 2023 -0800 perf build: Add feature check for dwarf_getcfi() The dwarf_getcfi() is available on libdw 0.142+. Instead of just checking the version number, it'd be nice to have a config item to check the feature at build time. Suggested-by: Masami Hiramatsu (Google) Signed-off-by: Namhyung Kim Acked-by: Masami Hiramatsu (Google) Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3f5928e461e394d27bc1ed7d0785b1e63c43d6a1 Author: Namhyung Kim Date: Thu Nov 9 15:59:26 2023 -0800 perf dwarf-aux: Add die_find_variable_by_reg() helper The die_find_variable_by_reg() will search for a variable or a parameter sub-DIE in the given scope DIE where the location matches to the given register. For the simplest and most common case, memory access usually happens with a base register and an offset to the field so the register holds a pointer in a variable or function parameter. Then we can find one if it has a location expression at the (instruction) address. This function only handles such a simple case for now. In this case, the expression has a DW_OP_regN operation where N < 32. If the register index (N) is greater than or equal to 32, DW_OP_regx operation with an operand which saves the value for the N would be used. It rejects expressions with more operations. Signed-off-by: Namhyung Kim Acked-by: Masami Hiramatsu (Google) Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 981620fd2776c45a514ed621a718e2a6941ad7c5 Author: Namhyung Kim Date: Thu Nov 9 15:59:25 2023 -0800 perf dwarf-aux: Add die_get_scopes() alternative to dwarf_getscopes() The die_get_scopes() returns the number of enclosing DIEs for the given address and it fills an array of DIEs like dwarf_getscopes(). But it doesn't follow the abstract origin of inlined functions as we want information of the concrete instance. This is needed to check the location of parameters and local variables properly. Users can check the origin separately if needed. Signed-off-by: Namhyung Kim Acked-by: Masami Hiramatsu (Google) Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3796eba7c137e073d1caa95b48d4a320fd2d9600 Author: Namhyung Kim Date: Thu Nov 9 15:59:24 2023 -0800 perf dwarf-aux: Move #else block of #ifdef HAVE_DWARF_GETLOCATIONS_SUPPORT code to the header file It's a usual convention that the conditional code is handled in a header file. As I'm planning to add some more of them, let's move the current code to the header first. Signed-off-by: Namhyung Kim Acked-by: Masami Hiramatsu (Google) Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a65e8c0b7855e951138eff077af4a6a8721a7ef6 Author: Namhyung Kim Date: Thu Nov 9 15:59:23 2023 -0800 perf dwarf-aux: Fix die_get_typename() for void * The die_get_typename() is to return a C-like type name from DWARF debug entry and it follows data type if the target entry is a pointer type. But I found that void pointers don't have the type attribute to follow and then the function returns an error for that case. This results in a broken type string for void pointer types. For example, the following type entries are pointer types. <1><48c>: Abbrev Number: 4 (DW_TAG_pointer_type) <48d> DW_AT_byte_size : 8 <48d> DW_AT_type : <0x481> <1><491>: Abbrev Number: 211 (DW_TAG_pointer_type) <493> DW_AT_byte_size : 8 <1><494>: Abbrev Number: 4 (DW_TAG_pointer_type) <495> DW_AT_byte_size : 8 <495> DW_AT_type : <0x49e> The first one at offset 48c and the third one at offset 494 have type information. Then they are pointer types for the referenced types. But the second one at offset 491 doesn't have the type attribute. Signed-off-by: Namhyung Kim Acked-by: Masami Hiramatsu (Google) Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6f1b6291cf73cb3223f6fb9ec16862a5fe7ed957 Author: Namhyung Kim Date: Thu Nov 9 15:59:22 2023 -0800 perf tools: Add util/debuginfo.[ch] files Split debuginfo data structure and related functions into a separate file so that it can be used by other components than the probe-finder. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu (Google) Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fb7fd2a14a503b9a23fe10303923fc0605c22288 Author: Namhyung Kim Date: Thu Nov 9 15:59:21 2023 -0800 perf annotate: Move raw_comment and raw_func_start fields out of 'struct ins_operands' Thoese two fields are used only for the jump_ops, so move them into the union to save some bytes. Also add jump__delete() callback not to free the fields as they didn't allocate new strings. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Huacai Chen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu (Google) Cc: Peter Zijlstra Cc: Stephane Eranian Cc: WANG Rui Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ded8c48497b825f15436048e8ea3a731a3f7dece Author: Namhyung Kim Date: Thu Nov 9 15:59:20 2023 -0800 perf annotate: Pass "-l" option to objdump conditionally The "-l" option is to print line numbers in the objdump output. perf annotate TUI only can show the line numbers later but it causes big slow downs for the kernel binary. Similarly, showing source code also takes a long time and it already has an option to control it. $ time objdump ... -d -S -C vmlinux > /dev/null real 0m3.474s user 0m3.047s sys 0m0.428s $ time objdump ... -d -l -C vmlinux > /dev/null real 0m1.796s user 0m1.459s sys 0m0.338s $ time objdump ... -d -C vmlinux > /dev/null real 0m0.051s user 0m0.036s sys 0m0.016s As it's not needed for data type profiling, let's make it conditional so that it can skip the unnecessary work. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Linus Torvalds Cc: Masami Hiramatsu (Google) Cc: Peter Zijlstra Cc: Stephane Eranian Cc: linux-toolchains@vger.kernel.org Cc: linux-trace-devel@vger.kernel.org Link: https://lore.kernel.org/r/20231110000012.3538610-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 968853033d8aa4dbb80fbafa6f5d9b6a0ea21272 Author: Tvrtko Ursulin Date: Tue Nov 7 10:18:06 2023 +0000 drm/i915: Implement fdinfo memory stats printing Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories. v2: * Only account against the active region. * Use DMA_RESV_USAGE_BOOKKEEP when testing for active. (Tejas) v3: * Update commit text. (Aravind) * Update to use memory regions uabi names. Signed-off-by: Tvrtko Ursulin Cc: Aravind Iddamsetty Cc: Rob Clark Cc: Andi Shyti Cc: Tejas Upadhyay Reviewed-by: Andi Shyti Reviewed-by: Aravind Iddamsetty Link: https://patchwork.freedesktop.org/patch/msgid/20231107101806.608990-6-tvrtko.ursulin@linux.intel.com commit 3b38d35157530c12c84fc02cccd469b9a0a00ae7 Author: Tvrtko Ursulin Date: Tue Nov 7 10:18:05 2023 +0000 drm/i915: Add stable memory region names At the moment memory region names are a bit too varied and too inconsistent to be used for ABI purposes, like for upcoming fdinfo memory stats. System memory can be either system or system-ttm. Local memory has the instance number appended, others do not. Not only incosistent but thi kind of implementation detail is uninteresting for intended users of fdinfo memory stats. Add a stable name always formed as $type$instance. Could have chosen a different stable scheme, but I think any consistent and stable scheme should do just fine. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Link: https://patchwork.freedesktop.org/patch/msgid/20231107101806.608990-5-tvrtko.ursulin@linux.intel.com commit dc1a2775070f0618b661500310b2ea8643592ed1 Author: Tvrtko Ursulin Date: Tue Nov 7 10:18:04 2023 +0000 drm/i915: Account ring buffer and context state storage Account ring buffers and logical context space against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Link: https://patchwork.freedesktop.org/patch/msgid/20231107101806.608990-4-tvrtko.ursulin@linux.intel.com commit 978e1a52ca1f0228eccc51ad5ed3a118bac1ad1c Author: Tvrtko Ursulin Date: Tue Nov 7 10:18:03 2023 +0000 drm/i915: Track page table backing store usage Account page table backing store against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Link: https://patchwork.freedesktop.org/patch/msgid/20231107101806.608990-3-tvrtko.ursulin@linux.intel.com commit ca02a0119f814b792484cba0c148fba292327ed6 Author: Tvrtko Ursulin Date: Tue Nov 7 10:18:02 2023 +0000 drm/i915: Record which client owns a VM To enable accounting of indirect client memory usage (such as page tables) in the following patch, lets start recording the creator of each PPGTT. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Link: https://patchwork.freedesktop.org/patch/msgid/20231107101806.608990-2-tvrtko.ursulin@linux.intel.com commit e4ae85e364fc652ea15d85b0f3a6da304c9b5ce7 Author: Tvrtko Ursulin Date: Tue Nov 7 10:18:01 2023 +0000 drm/i915: Add ability for tracking buffer objects per client In order to show per client memory usage lets add some infrastructure which enables tracking buffer objects owned by clients. We add a per client list protected by a new per client lock and to support delayed destruction (post client exit) we make tracked objects hold references to the owning client. Also, object memory region teardown is moved to the existing RCU free callback to allow safe dereference from the fdinfo RCU read section. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty Link: https://patchwork.freedesktop.org/patch/msgid/20231107101806.608990-1-tvrtko.ursulin@linux.intel.com commit dd678532f913c1a742f1a2add6adacfb7ae2b166 Author: Arnaldo Carvalho de Melo Date: Tue Nov 7 14:03:31 2023 +0530 perf header: Additional note on AMD IBS for max_precise pmu cap x86 core PMU exposes supported maximum precision level via max_precise PMU capability. Although, AMD core PMU does not support precise mode, certain core PMU events with precise_ip > 0 are allowed and forwarded to IBS OP PMU. Display a note about this in the 'perf report' header output and document the details in the perf-list man page. Signed-off-by: Ravi Bangoria Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ananth Narayan Cc: Changbin Du Cc: Huacai Chen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kan Liang Cc: Kim Phillips Cc: Mark Rutland Cc: Ming Wang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ross Zwisler Cc: Sandipan Das Cc: Santosh Shukla Cc: Yang Jihong Link: https://lore.kernel.org/r/20231107083331.901-2-ravi.bangoria@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 3257e55d3ea7e35ea76ff6ae07347b803f068068 Author: Animesh Manna Date: Wed Nov 8 12:53:02 2023 +0530 drm/i915/panelreplay: enable/disable panel replay TRANS_DP2_CTL register is programmed to enable panel replay from source and sink is enabled through panel replay dpcd configuration address. Bspec: 1407940617 v1: Initial version. v2: - Use pr_* flags instead psr_* flags. [Jouni] - Remove intel_dp_is_edp check as edp1.5 also has panel replay. [Jouni] v3: Cover letter updated and selective fetch condition check is added before updating its bit in PSR2_MAN_TRK_CTL register. [Jouni] v4: Selective fetch related PSR2_MAN_TRK_CTL programmming dropped. [Jouni] v5: Added PSR2_MAN_TRK_CTL programming as needed for Continuous Full Frame (CFF) update. v6: Rebased on latest. Note: Initial plan is to enable panel replay in full-screen live active frame update mode. In a incremental approach panel replay will be enabled in selctive update mode if there is any gap in curent implementation. Cc: Jouni Högander Cc: Arun R Murthy Cc: Jani Nikula Reviewed-by: Arun R Murthy Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20231108072303.3414118-6-animesh.manna@intel.com commit cceeaa312d390e4f8407c056ae27ba7edd50307e Author: Animesh Manna Date: Wed Nov 8 12:53:01 2023 +0530 drm/i915/panelreplay: Enable panel replay dpcd initialization for DP Due to similarity panel replay dpcd initialization got added in psr function which is specific for edp panel. This patch enables panel replay initialization for dp connector. Cc: Jouni Högander Cc: Arun R Murthy Cc: Jani Nikula Reviewed-by: Arun R Murthy Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20231108072303.3414118-5-animesh.manna@intel.com commit b8cf5b5d266ec20e1ab90f38c8d779c669c2d219 Author: Animesh Manna Date: Wed Nov 8 12:53:00 2023 +0530 drm/i915/panelreplay: Initializaton and compute config for panel replay Modify existing PSR implementation to enable panel replay feature of DP 2.0 which is similar to PSR feature of EDP panel. There is different DPCD address to check panel capability compare to PSR and vsc sdp header is different. v1: Initial version. v2: - Set source_panel_replay_support flag under HAS_PANEL_REPLAY() condition check. [Jouni] - Code restructured around intel_panel_replay_init and renamed to intel_panel_replay_init_dpcd. [Jouni] - Remove the initial code modification around has_psr2 flag. [Jouni] - Add CAN_PANEL_REPLAY() in intel_encoder_can_psr which is used to enable in intel_psr_post_plane_update. [Jouni] v3: - Initialize both psr and panel-replay. [Jouni] - Initialize both panel replay and psr if detected. [Jouni] - Refactoring psr function by introducing _psr_compute_config(). [Jouni] - Add check for !is_edp while deriving source_panel_replay_support. [Jouni] - Enable panel replay dpcd initialization in a separate patch. [Jouni] v4: - HAS_PANEL_REPLAY() check not needed during sink capability check. [Jouni] - Set either panel replay source support or psr. [Jouni] v5: - HAS_PANEL_REPLAY() removed and use HAS_DP20() instead. [Jouni] - Move psr related code to intel_psr.c. [Jani] - Reset sink_panel_replay_support flag during disconnection. [Jani] v6: return statement restored which is removed by misatke. [Jouni] v7: cosmetic changes. [Arun] Cc: Jouni Högander Cc: Arun R Murthy Cc: Jani Nikula Reviewed-by: Arun R Murthy Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20231108072303.3414118-4-animesh.manna@intel.com commit dd8f2298e34bf64f07ad5ff27c5964994783e7a7 Author: Jouni Högander Date: Wed Nov 8 12:52:59 2023 +0530 drm/i915/psr: Move psr specific dpcd init into own function This patch is preparing adding panel replay specific dpcd init. Cc: Arun R Murthy Cc: Jani Nikula Reviewed-by: Arun R Murthy Signed-off-by: Jouni Högander Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20231108072303.3414118-3-animesh.manna@intel.com commit 48d054c2d34cdc67acb8cc9cfac326d91f1470ed Author: Animesh Manna Date: Wed Nov 8 12:52:58 2023 +0530 drm/panelreplay: dpcd register definition for panelreplay Add DPCD register definition for discovering, enabling and checking status of panel replay of the sink. Cc: Jouni Högander Cc: Arun R Murthy Cc: Jani Nikula Acked-by: Maxime Ripard Reviewed-by: Arun R Murthy Signed-off-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20231108072303.3414118-2-animesh.manna@intel.com commit 155addf0814a92d08fce26a11b27e3315cdba977 Author: Yonghong Song Date: Fri Nov 3 19:49:00 2023 -0700 bpf: Use named fields for certain bpf uapi structs Martin and Vadim reported a verifier failure with bpf_dynptr usage. The issue is mentioned but Vadim workarounded the issue with source change ([1]). The below describes what is the issue and why there is a verification failure. int BPF_PROG(skb_crypto_setup) { struct bpf_dynptr algo, key; ... bpf_dynptr_from_mem(..., ..., 0, &algo); ... } The bpf program is using vmlinux.h, so we have the following definition in vmlinux.h: struct bpf_dynptr { long: 64; long: 64; }; Note that in uapi header bpf.h, we have struct bpf_dynptr { long: 64; long: 64; } __attribute__((aligned(8))); So we lost alignment information for struct bpf_dynptr by using vmlinux.h. Let us take a look at a simple program below: $ cat align.c typedef unsigned long long __u64; struct bpf_dynptr_no_align { __u64 :64; __u64 :64; }; struct bpf_dynptr_yes_align { __u64 :64; __u64 :64; } __attribute__((aligned(8))); void bar(void *, void *); int foo() { struct bpf_dynptr_no_align a; struct bpf_dynptr_yes_align b; bar(&a, &b); return 0; } $ clang --target=bpf -O2 -S -emit-llvm align.c Look at the generated IR file align.ll: ... %a = alloca %struct.bpf_dynptr_no_align, align 1 %b = alloca %struct.bpf_dynptr_yes_align, align 8 ... The compiler dictates the alignment for struct bpf_dynptr_no_align is 1 and the alignment for struct bpf_dynptr_yes_align is 8. So theoretically compiler could allocate variable %a with alignment 1 although in reallity the compiler may choose a different alignment by considering other local variables. In [1], the verification failure happens because variable 'algo' is allocated on the stack with alignment 4 (fp-28). But the verifer wants its alignment to be 8. To fix the issue, the RFC patch ([1]) tried to add '__attribute__((aligned(8)))' to struct bpf_dynptr plus other similar structs. Andrii suggested that we could directly modify uapi struct with named fields like struct 'bpf_iter_num': struct bpf_iter_num { /* opaque iterator state; having __u64 here allows to preserve correct * alignment requirements in vmlinux.h, generated from BTF */ __u64 __opaque[1]; } __attribute__((aligned(8))); Indeed, adding named fields for those affected structs in this patch can preserve alignment when bpf program references them in vmlinux.h. With this patch, the verification failure in [1] can also be resolved. [1] https://lore.kernel.org/bpf/1b100f73-7625-4c1f-3ae5-50ecf84d3ff0@linux.dev/ [2] https://lore.kernel.org/bpf/20231103055218.2395034-1-yonghong.song@linux.dev/ Cc: Vadim Fedorenko Cc: Martin KaFai Lau Suggested-by: Andrii Nakryiko Signed-off-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231104024900.1539182-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 3f6d04d742d9fbd492a79e28e7cfe4e2a97c66e5 Merge: 82ce364c6087e e9ed8df7187cf Author: Alexei Starovoitov Date: Thu Nov 9 10:45:45 2023 -0800 Merge branch 'allow-bpf_refcount_acquire-of-mapval-obtained-via-direct-ld' Dave Marchevsky says: ==================== Allow bpf_refcount_acquire of mapval obtained via direct LD Consider this BPF program: struct cgv_node { int d; struct bpf_refcount r; struct bpf_rb_node rb; }; struct val_stash { struct cgv_node __kptr *v; }; struct { __uint(type, BPF_MAP_TYPE_ARRAY); __type(key, int); __type(value, struct val_stash); __uint(max_entries, 10); } array_map SEC(".maps"); long bpf_program(void *ctx) { struct val_stash *mapval; struct cgv_node *p; int idx = 0; mapval = bpf_map_lookup_elem(&array_map, &idx); if (!mapval || !mapval->v) { /* omitted */ } p = bpf_refcount_acquire(mapval->v); /* Verification FAILs here */ /* Add p to some tree */ return 0; } Verification fails on the refcount_acquire: 160: (79) r1 = *(u64 *)(r8 +8) ; R1_w=untrusted_ptr_or_null_cgv_node(id=11,off=0,imm=0) R8_w=map_value(id=10,off=0,ks=8,vs=16,imm=0) refs=6 161: (b7) r2 = 0 ; R2_w=0 refs=6 162: (85) call bpf_refcount_acquire_impl#117824 arg#0 is neither owning or non-owning ref The above verifier dump is actually from sched_ext's scx_flatcg [0], which is the motivating usecase for this series' changes. Specifically, scx_flatcg stashes a rb_node type w/ cgroup-specific info (struct cgv_node) in a map when the cgroup is created, then later puts that cgroup's node in a rbtree in .enqueue . Making struct cgv_node refcounted would simplify the code a bit by virtue of allowing us to remove the kptr_xchg's, but "later puts that cgroups node in a rbtree" is not possible without a refcount_acquire, which suffers from the above verification failure. If we get rid of PTR_UNTRUSTED flag, and add MEM_ALLOC | NON_OWN_REF, mapval->v would be a non-owning ref and verification would succeed. Due to the most recent set of refcount changes [1], which modified bpf_obj_drop behavior to not reuse refcounted graph node's underlying memory until after RCU grace period, this is safe to do. Once mapval->v has the correct flags it _is_ a non-owning reference and verification of the motivating example will succeed. [0]: https://github.com/sched-ext/sched_ext/blob/52911e1040a0f94b9c426dddcc00be5364a7ae9f/tools/sched_ext/scx_flatcg.bpf.c#L275 [1]: https://lore.kernel.org/bpf/20230821193311.3290257-1-davemarchevsky@fb.com/ Summary of patches: * Patch 1 fixes an issue with bpf_refcount_acquire verification letting MAYBE_NULL ptrs through * Patch 2 tests Patch 1's fix * Patch 3 broadens the use of "free only after RCU GP" to all user-allocated types * Patch 4 is a small nonfunctional refactoring * Patch 5 changes verifier to mark direct LD of stashed graph node kptr as non-owning ref * Patch 6 tests Patch 5's verifier changes Changelog: v1 -> v2: https://lore.kernel.org/bpf/20231025214007.2920506-1-davemarchevsky@fb.com/ Series title changed to "Allow bpf_refcount_acquire of mapval obtained via direct LD". V1's title was mistakenly truncated. * Patch 5 ("bpf: Mark direct ld of stashed bpf_{rb,list}_node as non-owning ref") * Direct LD of percpu kptr should not have MEM_ALLOC flag (Yonghong) * Patch 6 ("selftests/bpf: Test bpf_refcount_acquire of node obtained via direct ld") * Test read from stashed value as well ==================== Link: https://lore.kernel.org/r/20231107085639.3016113-1-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 82ce364c6087e31ff9837380a4641a856284064c Author: Shung-Hsi Yu Date: Wed Nov 8 22:00:41 2023 +0800 bpf: replace register_is_const() with is_reg_const() The addition of is_reg_const() in commit 171de12646d2 ("bpf: generalize is_branch_taken to handle all conditional jumps in one place") has made the register_is_const() redundant. Give the former has more feature, plus the fact the latter is only used in one place, replace register_is_const() with is_reg_const(), and remove the definition of register_is_const. This requires moving the definition of is_reg_const() further up. And since the comment of reg_const_value() reference is_reg_const(), move it up as well. Signed-off-by: Shung-Hsi Yu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231108140043.12282-1-shung-hsi.yu@suse.com Signed-off-by: Alexei Starovoitov commit e9ed8df7187cfdce1075d0ee591544ac15d072f1 Author: Dave Marchevsky Date: Tue Nov 7 00:56:39 2023 -0800 selftests/bpf: Test bpf_refcount_acquire of node obtained via direct ld This patch demonstrates that verifier changes earlier in this series result in bpf_refcount_acquire(mapval->stashed_kptr) passing verification. The added test additionally validates that stashing a kptr in mapval and - in a separate BPF program - refcount_acquiring the kptr without unstashing works as expected at runtime. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20231107085639.3016113-7-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 27007fae704eb12547b9b5c7b1005e11640d4f19 Author: Andrii Nakryiko Date: Tue Nov 7 21:14:30 2023 -0800 veristat: add ability to filter top N results Add ability to filter top B results, both in replay/verifier mode and comparison mode. Just adding `-n10` will emit only first 10 rows, or less, if there is not enough rows. This is not just a shortcut instead of passing veristat output through `head`, though. Filtering out all the other rows influences final table formatting, as table column widths are calculated based on actual emitted test. To demonstrate the difference, compare two "equivalent" forms below, one using head and another using -n argument. TOP N FEATURE ============= [vmuser@archvm bpf]$ sudo ./veristat -C ~/baseline-results-selftests.csv ~/sanity2-results-selftests.csv -e file,prog,insns,states -s '|insns_diff|' -n10 File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) ---------------------------------------- --------------------- --------- --------- ------------ ---------- ---------- ------------- test_seg6_loop.bpf.linked3.o __add_egr_x 12440 12360 -80 (-0.64%) 364 357 -7 (-1.92%) async_stack_depth.bpf.linked3.o async_call_root_check 145 145 +0 (+0.00%) 3 3 +0 (+0.00%) async_stack_depth.bpf.linked3.o pseudo_call_check 139 139 +0 (+0.00%) 3 3 +0 (+0.00%) atomic_bounds.bpf.linked3.o sub 7 7 +0 (+0.00%) 0 0 +0 (+0.00%) bench_local_storage_create.bpf.linked3.o kmalloc 5 5 +0 (+0.00%) 0 0 +0 (+0.00%) bench_local_storage_create.bpf.linked3.o sched_process_fork 22 22 +0 (+0.00%) 2 2 +0 (+0.00%) bench_local_storage_create.bpf.linked3.o socket_post_create 23 23 +0 (+0.00%) 2 2 +0 (+0.00%) bind4_prog.bpf.linked3.o bind_v4_prog 358 358 +0 (+0.00%) 33 33 +0 (+0.00%) bind6_prog.bpf.linked3.o bind_v6_prog 429 429 +0 (+0.00%) 37 37 +0 (+0.00%) bind_perm.bpf.linked3.o bind_v4_prog 15 15 +0 (+0.00%) 1 1 +0 (+0.00%) PIPING TO HEAD ============== [vmuser@archvm bpf]$ sudo ./veristat -C ~/baseline-results-selftests.csv ~/sanity2-results-selftests.csv -e file,prog,insns,states -s '|insns_diff|' | head -n12 File Program Insns (A) Insns (B) Insns (DIFF) States (A) States (B) States (DIFF) ----------------------------------------------------- ---------------------------------------------------- --------- --------- ------------ ---------- ---------- ------------- test_seg6_loop.bpf.linked3.o __add_egr_x 12440 12360 -80 (-0.64%) 364 357 -7 (-1.92%) async_stack_depth.bpf.linked3.o async_call_root_check 145 145 +0 (+0.00%) 3 3 +0 (+0.00%) async_stack_depth.bpf.linked3.o pseudo_call_check 139 139 +0 (+0.00%) 3 3 +0 (+0.00%) atomic_bounds.bpf.linked3.o sub 7 7 +0 (+0.00%) 0 0 +0 (+0.00%) bench_local_storage_create.bpf.linked3.o kmalloc 5 5 +0 (+0.00%) 0 0 +0 (+0.00%) bench_local_storage_create.bpf.linked3.o sched_process_fork 22 22 +0 (+0.00%) 2 2 +0 (+0.00%) bench_local_storage_create.bpf.linked3.o socket_post_create 23 23 +0 (+0.00%) 2 2 +0 (+0.00%) bind4_prog.bpf.linked3.o bind_v4_prog 358 358 +0 (+0.00%) 33 33 +0 (+0.00%) bind6_prog.bpf.linked3.o bind_v6_prog 429 429 +0 (+0.00%) 37 37 +0 (+0.00%) bind_perm.bpf.linked3.o bind_v4_prog 15 15 +0 (+0.00%) 1 1 +0 (+0.00%) Note all the wasted whitespace in the "PIPING TO HEAD" variant. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231108051430.1830950-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 1b12171533a9bb23cf6fba7262b479028b65e1e8 Author: Dave Marchevsky Date: Tue Nov 7 00:56:38 2023 -0800 bpf: Mark direct ld of stashed bpf_{rb,list}_node as non-owning ref This patch enables the following pattern: /* mapval contains a __kptr pointing to refcounted local kptr */ mapval = bpf_map_lookup_elem(&map, &idx); if (!mapval || !mapval->some_kptr) { /* omitted */ } p = bpf_refcount_acquire(&mapval->some_kptr); Currently this doesn't work because bpf_refcount_acquire expects an owning or non-owning ref. The verifier defines non-owning ref as a type: PTR_TO_BTF_ID | MEM_ALLOC | NON_OWN_REF while mapval->some_kptr is PTR_TO_BTF_ID | PTR_UNTRUSTED. It's possible to do the refcount_acquire by first bpf_kptr_xchg'ing mapval->some_kptr into a temp kptr, refcount_acquiring that, and xchg'ing back into mapval, but this is unwieldy and shouldn't be necessary. This patch modifies btf_ld_kptr_type such that user-allocated types are marked MEM_ALLOC and if those types have a bpf_{rb,list}_node they're marked NON_OWN_REF as well. Additionally, due to changes to bpf_obj_drop_impl earlier in this series, rcu_protected_object now returns true for all user-allocated types, resulting in mapval->some_kptr being marked MEM_RCU. After this patch's changes, mapval->some_kptr is now: PTR_TO_BTF_ID | MEM_ALLOC | NON_OWN_REF | MEM_RCU which results in it passing the non-owning ref test, and the motivating example passing verification. Future work will likely get rid of special non-owning ref lifetime logic in the verifier, at which point we'll be able to delete the NON_OWN_REF flag entirely. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20231107085639.3016113-6-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 5d4a7aaca1ebcc7c864caec13203662a061c4f4f Author: Andrii Nakryiko Date: Tue Nov 7 21:14:29 2023 -0800 veristat: add ability to sort by stat's absolute value Add ability to sort results by absolute values of specified stats. This is especially useful to find biggest deviations in comparison mode. When comparing verifier change effect against a large base of BPF object files, it's necessary to see big changes both in positive and negative directions, as both might be a signal for regressions or bugs. The syntax is natural, e.g., adding `-s '|insns_diff|'^` will instruct veristat to sort by absolute value of instructions difference in ascending order. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231108051430.1830950-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 790ce3cfefb1b768dccd4eee324ddef0f0ce3db4 Author: Dave Marchevsky Date: Tue Nov 7 00:56:37 2023 -0800 bpf: Move GRAPH_{ROOT,NODE}_MASK macros into btf_field_type enum This refactoring patch removes the unused BPF_GRAPH_NODE_OR_ROOT btf_field_type and moves BPF_GRAPH_{NODE,ROOT} macros into the btf_field_type enum. Further patches in the series will use BPF_GRAPH_NODE, so let's move this useful definition out of btf.c. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20231107085639.3016113-5-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 7f7c43693c1b46652cfafb7af67ba31726d6ec4e Author: Yonghong Song Date: Tue Nov 7 12:15:11 2023 -0800 libbpf: Fix potential uninitialized tail padding with LIBBPF_OPTS_RESET Martin reported that there is a libbpf complaining of non-zero-value tail padding with LIBBPF_OPTS_RESET macro if struct bpf_netkit_opts is modified to have a 4-byte tail padding. This only happens to clang compiler. The commend line is: ./test_progs -t tc_netkit_multi_links Martin and I did some investigation and found this indeed the case and the following are the investigation details. Clang: clang version 18.0.0 tools/lib/bpf/libbpf_common.h: #define LIBBPF_OPTS_RESET(NAME, ...) \ do { \ memset(&NAME, 0, sizeof(NAME)); \ NAME = (typeof(NAME)) { \ .sz = sizeof(NAME), \ __VA_ARGS__ \ }; \ } while (0) #endif tools/lib/bpf/libbpf.h: struct bpf_netkit_opts { /* size of this struct, for forward/backward compatibility */ size_t sz; __u32 flags; __u32 relative_fd; __u32 relative_id; __u64 expected_revision; size_t :0; }; #define bpf_netkit_opts__last_field expected_revision In the above struct bpf_netkit_opts, there is no tail padding. prog_tests/tc_netkit.c: static void serial_test_tc_netkit_multi_links_target(int mode, int target) { ... LIBBPF_OPTS(bpf_netkit_opts, optl); ... LIBBPF_OPTS_RESET(optl, .flags = BPF_F_BEFORE, .relative_fd = bpf_program__fd(skel->progs.tc1), ); ... } Let us make the following source change, note that we have a 4-byte tailing padding now. diff --git a/tools/lib/bpf/libbpf.h b/tools/lib/bpf/libbpf.h index 6cd9c501624f..0dd83910ae9a 100644 --- a/tools/lib/bpf/libbpf.h +++ b/tools/lib/bpf/libbpf.h @@ -803,13 +803,13 @@ bpf_program__attach_tcx(const struct bpf_program *prog, int ifindex, struct bpf_netkit_opts { /* size of this struct, for forward/backward compatibility */ size_t sz; - __u32 flags; __u32 relative_fd; __u32 relative_id; __u64 expected_revision; + __u32 flags; size_t :0; }; -#define bpf_netkit_opts__last_field expected_revision +#define bpf_netkit_opts__last_field flags The clang 18 generated asm code looks like below: ; LIBBPF_OPTS_RESET(optl, 55e3: 48 8d 7d 98 leaq -0x68(%rbp), %rdi 55e7: 31 f6 xorl %esi, %esi 55e9: ba 20 00 00 00 movl $0x20, %edx 55ee: e8 00 00 00 00 callq 0x55f3 55f3: 48 c7 85 10 fd ff ff 20 00 00 00 movq $0x20, -0x2f0(%rbp) 55fe: 48 8b 85 68 ff ff ff movq -0x98(%rbp), %rax 5605: 48 8b 78 18 movq 0x18(%rax), %rdi 5609: e8 00 00 00 00 callq 0x560e 560e: 89 85 18 fd ff ff movl %eax, -0x2e8(%rbp) 5614: c7 85 1c fd ff ff 00 00 00 00 movl $0x0, -0x2e4(%rbp) 561e: 48 c7 85 20 fd ff ff 00 00 00 00 movq $0x0, -0x2e0(%rbp) 5629: c7 85 28 fd ff ff 08 00 00 00 movl $0x8, -0x2d8(%rbp) 5633: 48 8b 85 10 fd ff ff movq -0x2f0(%rbp), %rax 563a: 48 89 45 98 movq %rax, -0x68(%rbp) 563e: 48 8b 85 18 fd ff ff movq -0x2e8(%rbp), %rax 5645: 48 89 45 a0 movq %rax, -0x60(%rbp) 5649: 48 8b 85 20 fd ff ff movq -0x2e0(%rbp), %rax 5650: 48 89 45 a8 movq %rax, -0x58(%rbp) 5654: 48 8b 85 28 fd ff ff movq -0x2d8(%rbp), %rax 565b: 48 89 45 b0 movq %rax, -0x50(%rbp) ; link = bpf_program__attach_netkit(skel->progs.tc2, ifindex, &optl); At -O0 level, the clang compiler creates an intermediate copy. We have below to store 'flags' with 4-byte store and leave another 4 byte in the same 8-byte-aligned storage undefined, 5629: c7 85 28 fd ff ff 08 00 00 00 movl $0x8, -0x2d8(%rbp) and later we store 8-byte to the original zero'ed buffer 5654: 48 8b 85 28 fd ff ff movq -0x2d8(%rbp), %rax 565b: 48 89 45 b0 movq %rax, -0x50(%rbp) This caused a problem as the 4-byte value at [%rbp-0x2dc, %rbp-0x2e0) may be garbage. gcc (gcc 11.4) does not have this issue as it does zeroing struct first before doing assignments: ; LIBBPF_OPTS_RESET(optl, 50fd: 48 8d 85 40 fc ff ff leaq -0x3c0(%rbp), %rax 5104: ba 20 00 00 00 movl $0x20, %edx 5109: be 00 00 00 00 movl $0x0, %esi 510e: 48 89 c7 movq %rax, %rdi 5111: e8 00 00 00 00 callq 0x5116 5116: 48 8b 45 f0 movq -0x10(%rbp), %rax 511a: 48 8b 40 18 movq 0x18(%rax), %rax 511e: 48 89 c7 movq %rax, %rdi 5121: e8 00 00 00 00 callq 0x5126 5126: 48 c7 85 40 fc ff ff 00 00 00 00 movq $0x0, -0x3c0(%rbp) 5131: 48 c7 85 48 fc ff ff 00 00 00 00 movq $0x0, -0x3b8(%rbp) 513c: 48 c7 85 50 fc ff ff 00 00 00 00 movq $0x0, -0x3b0(%rbp) 5147: 48 c7 85 58 fc ff ff 00 00 00 00 movq $0x0, -0x3a8(%rbp) 5152: 48 c7 85 40 fc ff ff 20 00 00 00 movq $0x20, -0x3c0(%rbp) 515d: 89 85 48 fc ff ff movl %eax, -0x3b8(%rbp) 5163: c7 85 58 fc ff ff 08 00 00 00 movl $0x8, -0x3a8(%rbp) ; link = bpf_program__attach_netkit(skel->progs.tc2, ifindex, &optl); It is not clear how to resolve the compiler code generation as the compiler generates correct code w.r.t. how to handle unnamed padding in C standard. So this patch changed LIBBPF_OPTS_RESET macro to avoid uninitialized tail padding. We already knows LIBBPF_OPTS macro works on both gcc and clang, even with tail padding. So LIBBPF_OPTS_RESET is changed to be a LIBBPF_OPTS followed by a memcpy(), thus avoiding uninitialized tail padding. The below is asm code generated with this patch and with clang compiler: ; LIBBPF_OPTS_RESET(optl, 55e3: 48 8d bd 10 fd ff ff leaq -0x2f0(%rbp), %rdi 55ea: 31 f6 xorl %esi, %esi 55ec: ba 20 00 00 00 movl $0x20, %edx 55f1: e8 00 00 00 00 callq 0x55f6 55f6: 48 c7 85 10 fd ff ff 20 00 00 00 movq $0x20, -0x2f0(%rbp) 5601: 48 8b 85 68 ff ff ff movq -0x98(%rbp), %rax 5608: 48 8b 78 18 movq 0x18(%rax), %rdi 560c: e8 00 00 00 00 callq 0x5611 5611: 89 85 18 fd ff ff movl %eax, -0x2e8(%rbp) 5617: c7 85 1c fd ff ff 00 00 00 00 movl $0x0, -0x2e4(%rbp) 5621: 48 c7 85 20 fd ff ff 00 00 00 00 movq $0x0, -0x2e0(%rbp) 562c: c7 85 28 fd ff ff 08 00 00 00 movl $0x8, -0x2d8(%rbp) 5636: 48 8b 85 10 fd ff ff movq -0x2f0(%rbp), %rax 563d: 48 89 45 98 movq %rax, -0x68(%rbp) 5641: 48 8b 85 18 fd ff ff movq -0x2e8(%rbp), %rax 5648: 48 89 45 a0 movq %rax, -0x60(%rbp) 564c: 48 8b 85 20 fd ff ff movq -0x2e0(%rbp), %rax 5653: 48 89 45 a8 movq %rax, -0x58(%rbp) 5657: 48 8b 85 28 fd ff ff movq -0x2d8(%rbp), %rax 565e: 48 89 45 b0 movq %rax, -0x50(%rbp) ; link = bpf_program__attach_netkit(skel->progs.tc2, ifindex, &optl); In the above code, a temporary buffer is zeroed and then has proper value assigned. Finally, values in temporary buffer are copied to the original variable buffer, hence tail padding is guaranteed to be 0. Signed-off-by: Yonghong Song Signed-off-by: Andrii Nakryiko Tested-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20231107201511.2548645-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov commit 649924b76ab151a96bdd22a97a993fb0421f134c Author: Dave Marchevsky Date: Tue Nov 7 00:56:36 2023 -0800 bpf: Use bpf_mem_free_rcu when bpf_obj_dropping non-refcounted nodes The use of bpf_mem_free_rcu to free refcounted local kptrs was added in commit 7e26cd12ad1c ("bpf: Use bpf_mem_free_rcu when bpf_obj_dropping refcounted nodes"). In the cover letter for the series containing that patch [0] I commented: Perhaps it makes sense to move to mem_free_rcu for _all_ non-owning refs in the future, not just refcounted. This might allow custom non-owning ref lifetime + invalidation logic to be entirely subsumed by MEM_RCU handling. IMO this needs a bit more thought and should be tackled outside of a fix series, so it's not attempted here. It's time to start moving in the "non-owning refs have MEM_RCU lifetime" direction. As mentioned in that comment, using bpf_mem_free_rcu for all local kptrs - not just refcounted - is necessarily the first step towards that goal. This patch does so. After this patch the memory pointed to by all local kptrs will not be reused until RCU grace period elapses. The verifier's understanding of non-owning ref validity and the clobbering logic it uses to enforce that understanding are not changed here, that'll happen gradually in future work, including further patches in the series. [0]: https://lore.kernel.org/all/20230821193311.3290257-1-davemarchevsky@fb.com/ Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20231107085639.3016113-4-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit f460e7bdb027d1da93f0c5090b239889cd46a33d Author: Dave Marchevsky Date: Tue Nov 7 00:56:35 2023 -0800 selftests/bpf: Add test passing MAYBE_NULL reg to bpf_refcount_acquire The test added in this patch exercises the logic fixed in the previous patch in this series. Before the previous patch's changes, bpf_refcount_acquire accepts MAYBE_NULL local kptrs; after the change the verifier correctly rejects the such a call. Signed-off-by: Dave Marchevsky Link: https://lore.kernel.org/r/20231107085639.3016113-3-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit 1500a5d9f49cb66906d3ea1c9158df25cc41dd40 Author: Dave Marchevsky Date: Tue Nov 7 00:56:34 2023 -0800 bpf: Add KF_RCU flag to bpf_refcount_acquire_impl Refcounted local kptrs are kptrs to user-defined types with a bpf_refcount field. Recent commits ([0], [1]) modified the lifetime of refcounted local kptrs such that the underlying memory is not reused until RCU grace period has elapsed. Separately, verification of bpf_refcount_acquire calls currently succeeds for MAYBE_NULL non-owning reference input, which is a problem as bpf_refcount_acquire_impl has no handling for this case. This patch takes advantage of aforementioned lifetime changes to tag bpf_refcount_acquire_impl kfunc KF_RCU, thereby preventing MAYBE_NULL input to the kfunc. The KF_RCU flag applies to all kfunc params; it's fine for it to apply to the void *meta__ign param as that's populated by the verifier and is tagged __ign regardless. [0]: commit 7e26cd12ad1c ("bpf: Use bpf_mem_free_rcu when bpf_obj_dropping refcounted nodes") is the actual change to allocation behaivor [1]: commit 0816b8c6bf7f ("bpf: Consider non-owning refs to refcounted nodes RCU protected") modified verifier understanding of refcounted local kptrs to match [0]'s changes Signed-off-by: Dave Marchevsky Fixes: 7c50b1cb76ac ("bpf: Add bpf_refcount_acquire kfunc") Link: https://lore.kernel.org/r/20231107085639.3016113-2-davemarchevsky@fb.com Signed-off-by: Alexei Starovoitov commit b0d1c7294671af02369d7a4feaa5a9bb472372c6 Merge: 9b75dbeb36fcd 045edee19d591 Author: Andrii Nakryiko Date: Tue Nov 7 10:04:38 2023 -0800 Merge branch 'bpf: __bpf_dynptr_data* and __str annotation' Song Liu says: ==================== This set contains the first 3 patches of set [1]. Currently, [1] is waiting for [3] to be merged to bpf-next tree. So send these 3 patches first to unblock other works, such as [2]. This set is verified with new version of [1] in CI run [4]. Changes since v12 of [1]: 1. Reuse bpf_dynptr_slice() in __bpf_dynptr_data(). (Andrii) 2. Add Acked-by from Vadim Fedorenko. [1] https://lore.kernel.org/bpf/20231104001313.3538201-1-song@kernel.org/ [2] https://lore.kernel.org/bpf/20231031134900.1432945-1-vadfed@meta.com/ [3] https://lore.kernel.org/bpf/20231031215625.2343848-1-davemarchevsky@fb.com/ [4] https://github.com/kernel-patches/bpf/actions/runs/6779945063/job/18427926114 ==================== Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit 9b75dbeb36fcd9fc7ed51d370310d0518a387769 Author: Florian Lehner Date: Sun Nov 5 09:58:01 2023 +0100 bpf, lpm: Fix check prefixlen before walking trie When looking up an element in LPM trie, the condition 'matchlen == trie->max_prefixlen' will never return true, if key->prefixlen is larger than trie->max_prefixlen. Consequently all elements in the LPM trie will be visited and no element is returned in the end. To resolve this, check key->prefixlen first before walking the LPM trie. Fixes: b95a5c4db09b ("bpf: add a longest prefix match trie map implementation") Signed-off-by: Florian Lehner Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231105085801.3742-1-dev@der-flo.net Signed-off-by: Alexei Starovoitov commit 045edee19d591e59ed53772bf6dfc9b1ed9577eb Author: Song Liu Date: Mon Nov 6 20:57:25 2023 -0800 bpf: Introduce KF_ARG_PTR_TO_CONST_STR Similar to ARG_PTR_TO_CONST_STR for BPF helpers, KF_ARG_PTR_TO_CONST_STR specifies kfunc args that point to const strings. Annotation "__str" is used to specify kfunc arg of type KF_ARG_PTR_TO_CONST_STR. Also, add documentation for the "__str" annotation. bpf_get_file_xattr() will be the first kfunc that uses this type. Signed-off-by: Song Liu Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Acked-by: Vadim Fedorenko Link: https://lore.kernel.org/bpf/20231107045725.2278852-4-song@kernel.org Signed-off-by: Alexei Starovoitov commit f2d2c7e1b7c9e8847478769d6e1f8a76b5e91952 Author: Anders Roxell Date: Fri Nov 3 23:09:12 2023 +0100 selftests/bpf: Disable CONFIG_DEBUG_INFO_REDUCED in config.aarch64 Building an arm64 kernel and seftests/bpf with defconfig + selftests/bpf/config and selftests/bpf/config.aarch64 the fragment CONFIG_DEBUG_INFO_REDUCED is enabled in arm64's defconfig, it should be disabled in file sefltests/bpf/config.aarch64 since if its not disabled CONFIG_DEBUG_INFO_BTF wont be enabled. Signed-off-by: Anders Roxell Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231103220912.333930-1-anders.roxell@linaro.org Signed-off-by: Alexei Starovoitov commit 0b51940729150e807fc4b7767164e6bb6cf4f7dd Author: Song Liu Date: Mon Nov 6 20:57:24 2023 -0800 bpf: Factor out helper check_reg_const_str() ARG_PTR_TO_CONST_STR is used to specify constant string args for BPF helpers. The logic that verifies a reg is ARG_PTR_TO_CONST_STR is implemented in check_func_arg(). As we introduce kfuncs with constant string args, it is necessary to do the same check for kfuncs (in check_kfunc_args). Factor out the logic for ARG_PTR_TO_CONST_STR to a new check_reg_const_str() so that it can be reused. check_func_arg() ensures check_reg_const_str() is only called with reg of type PTR_TO_MAP_VALUE. Add a redundent type check in check_reg_const_str() to avoid misuse in the future. Other than this redundent check, there is no change in behavior. Signed-off-by: Song Liu Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Acked-by: Vadim Fedorenko Link: https://lore.kernel.org/bpf/20231107045725.2278852-3-song@kernel.org Signed-off-by: Alexei Starovoitov commit a46afaa03f6db8c65492302ffdafcb2e769e5667 Author: Artem Savkov Date: Fri Nov 3 09:11:26 2023 +0100 bpftool: Fix prog object type in manpage bpftool's man page lists "program" as one of possible values for OBJECT, while in fact bpftool accepts "prog" instead. Reported-by: Jerry Snitselaar Signed-off-by: Artem Savkov Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20231103081126.170034-1-asavkov@redhat.com Signed-off-by: Alexei Starovoitov commit 74523c06ae20b83c5508a98af62393ac34913362 Author: Song Liu Date: Mon Nov 6 20:57:23 2023 -0800 bpf: Add __bpf_dynptr_data* for in kernel use Different types of bpf dynptr have different internal data storage. Specifically, SKB and XDP type of dynptr may have non-continuous data. Therefore, it is not always safe to directly access dynptr->data. Add __bpf_dynptr_data and __bpf_dynptr_data_rw to replace direct access to dynptr->data. Update bpf_verify_pkcs7_signature to use __bpf_dynptr_data instead of dynptr->data. Signed-off-by: Song Liu Signed-off-by: Andrii Nakryiko Acked-by: Vadim Fedorenko Link: https://lore.kernel.org/bpf/20231107045725.2278852-2-song@kernel.org Signed-off-by: Alexei Starovoitov commit b0cf0dcde8cae24571b1f382e81328229e475604 Author: Manu Bretelle Date: Tue Oct 31 14:27:17 2023 -0700 selftests/bpf: Consolidate VIRTIO/9P configs in config.vm file Those configs are needed to be able to run VM somewhat consistently. For instance, ATM, s390x is missing the `CONFIG_VIRTIO_CONSOLE` which prevents s390x kernels built in CI to leverage qemu-guest-agent. By moving them to `config,vm`, we should have selftest kernels which are equal in term of VM functionalities when they include this file. The set of config unabled were picked using grep -h -E '(_9P|_VIRTIO)' config.x86_64 config | sort | uniq added to `config.vm` and then grep -vE '(_9P|_VIRTIO)' config.{x86_64,aarch64,s390x} as a side-effect, some config may have disappeared to the aarch64 and s390x kernels, but they should not be needed. CI will tell. Signed-off-by: Manu Bretelle Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231031212717.4037892-1-chantr4@gmail.com Signed-off-by: Alexei Starovoitov commit e3499962d836af085a621f005978fee20fc87276 Merge: cd9c127069c04 2f553b032cad4 Author: Andrii Nakryiko Date: Thu Nov 2 09:47:41 2023 -0700 Merge branch 'selftests/bpf: Fixes for map_percpu_stats test' Hou Tao says: ==================== From: Hou Tao Hi, BPF CI failed due to map_percpu_stats_percpu_hash from time to time [1]. It seems that the failure reason is per-cpu bpf memory allocator may not be able to allocate per-cpu pointer successfully and it can not refill free llist timely, and bpf_map_update_elem() will return -ENOMEM. Patch #1 fixes the size of value passed to per-cpu map update API. The problem was found when fixing the ENOMEM problem, so also post it in this patchset. Patch #2 & #3 mitigates the ENOMEM problem by retrying the update operation for non-preallocated per-cpu map. Please see individual patches for more details. And comments are always welcome. Regards, Tao [1]: https://github.com/kernel-patches/bpf/actions/runs/6713177520/job/18244865326?pr=5909 ==================== Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit cd9c127069c040d6b022f1ff32fed4b52b9a4017 Merge: bf4a64b9323f1 4621202adc5bc Author: Alexei Starovoitov Date: Thu Nov 2 08:59:05 2023 -0700 Merge branch 'bpf-register-bounds-logic-and-testing-improvements' Andrii Nakryiko says: ==================== BPF register bounds logic and testing improvements This patch set adds a big set of manual and auto-generated test cases validating BPF verifier's register bounds tracking and deduction logic. See details in the last patch. We start with building a tester that validates existing vs verifier logic for range bounds. To make all this work, BPF verifier's logic needed a bunch of improvements to handle some cases that previously were not covered. This had no implications as to correctness of verifier logic, but it was incomplete enough to cause significant disagreements with alternative implementation of register bounds logic that tests in this patch set implement. So we need BPF verifier logic improvements to make all the tests pass. This is what we do in patches #3 through #9. The end goal of this work, though, is to extend BPF verifier range state tracking such as to allow to derive new range bounds when comparing non-const registers. There is some more investigative work required to investigate and fix existing potential issues with range tracking as part of ALU/ALU64 operations, so x part of v5 patch set ([0]) is dropped until these issues are sorted out. For now, we include preparatory refactorings and clean ups, that set up BPF verifier code base to extend the logic to vs logic in subsequent patch set. Patches #10-#16 perform preliminary refactorings without functionally changing anything. But they do clean up check_cond_jmp_op() logic and generalize a bunch of other pieces in is_branch_taken() logic. [0] https://patchwork.kernel.org/project/netdevbpf/list/?series=797178&state=* v5->v6: - dropped vs patches (original patches #18 through #23) to add more register range sanity checks and fix preexisting issues; - comments improvements, addressing other feedback on first 17 patches (Eduard, Alexei); v4->v5: - added entirety of verifier reg bounds tracking changes, now handling vs cases (Alexei); - added way more comments trying to explain why deductions added are correct, hopefully they are useful and clarify things a bit (Daniel, Shung-Hsi); - added two preliminary selftests fixes necessary for RELEASE=1 build to work again, it keeps breaking. v3->v4: - improvements to reg_bounds tester (progress report, split 32-bit and 64-bit ranges, fix various verbosity output issues, etc); v2->v3: - fix a subtle little-endianness assumption inside parge_reg_state() (CI); v1->v2: - fix compilation when building selftests with llvm-16 toolchain (CI). ==================== Link: https://lore.kernel.org/r/20231102033759.2541186-1-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 2f553b032cad4993969cab356b3b0e306fcd1cd1 Author: Hou Tao Date: Wed Nov 1 11:24:55 2023 +0800 selftsets/bpf: Retry map update for non-preallocated per-cpu map BPF CI failed due to map_percpu_stats_percpu_hash from time to time [1]. It seems that the failure reason is per-cpu bpf memory allocator may not be able to allocate per-cpu pointer successfully and it can not refill free llist timely, and bpf_map_update_elem() will return -ENOMEM. So mitigate the problem by retrying the update operation for non-preallocated per-cpu map. [1]: https://github.com/kernel-patches/bpf/actions/runs/6713177520/job/18244865326?pr=5909 Signed-off-by: Hou Tao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231101032455.3808547-4-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 4621202adc5bc0d1006af37fe8b9aca131387d3c Author: Andrii Nakryiko Date: Wed Nov 1 20:37:59 2023 -0700 bpf: generalize reg_set_min_max() to handle two sets of two registers Change reg_set_min_max() to take FALSE/TRUE sets of two registers each, instead of assuming that we are always comparing to a constant. For now we still assume that right-hand side registers are constants (and make sure that's the case by swapping src/dst regs, if necessary), but subsequent patches will remove this limitation. reg_set_min_max() is now called unconditionally for any register comparison, so that might include pointer vs pointer. This makes it consistent with is_branch_taken() generality. But we currently only support adjustments based on SCALAR vs SCALAR comparisons, so reg_set_min_max() has to guard itself againts pointers. Taking two by two registers allows to further unify and simplify check_cond_jmp_op() logic. We utilize fake register for BPF_K conditional jump case, just like with is_branch_taken() part. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-18-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit b9b79553163788d3fc42e25c2662c0a46dc9a3c5 Author: Hou Tao Date: Wed Nov 1 11:24:54 2023 +0800 selftests/bpf: Export map_update_retriable() Export map_update_retriable() to make it usable for other map_test cases. These cases may only need retry for specific errno, so add a new callback parameter to let map_update_retriable() decide whether or not the errno is retriable. Signed-off-by: Hou Tao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231101032455.3808547-3-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 811476e9cc578cb6c776627ac069dc45a8431791 Author: Andrii Nakryiko Date: Wed Nov 1 20:37:58 2023 -0700 bpf: prepare reg_set_min_max for second set of registers Similarly to is_branch_taken()-related refactorings, start preparing reg_set_min_max() to handle more generic case of two non-const registers. Start with renaming arguments to accommodate later addition of second register as an input argument. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-17-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d79924ca579c647d5dc55f605899c98f7ea04d0f Author: Hou Tao Date: Wed Nov 1 11:24:53 2023 +0800 selftests/bpf: Use value with enough-size when updating per-cpu map When updating per-cpu map in map_percpu_stats test, patch_map_thread() only passes 4-bytes-sized value to bpf_map_update_elem(). The expected size of the value is 8 * num_possible_cpus(), so fix it by passing a value with enough-size for per-cpu map update. Signed-off-by: Hou Tao Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20231101032455.3808547-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov commit 4d345887d2e5a1915600cb5d37b16c4088c6ee1c Author: Andrii Nakryiko Date: Wed Nov 1 20:37:57 2023 -0700 bpf: unify 32-bit and 64-bit is_branch_taken logic Combine 32-bit and 64-bit is_branch_taken logic for SCALAR_VALUE registers. It makes it easier to see parallels between two domains (32-bit and 64-bit), and makes subsequent refactoring more straightforward. No functional changes. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-16-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit b74c2a842bba941945279027083fcee1e9aaa73f Author: Andrii Nakryiko Date: Wed Nov 1 20:37:56 2023 -0700 bpf: generalize is_branch_taken to handle all conditional jumps in one place Make is_branch_taken() a single entry point for branch pruning decision making, handling both pointer vs pointer, pointer vs scalar, and scalar vs scalar cases in one place. This also nicely cleans up check_cond_jmp_op(). Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-15-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c697289efe4ef38bc5c62f119cb74433f784b826 Author: Andrii Nakryiko Date: Wed Nov 1 20:37:55 2023 -0700 bpf: move is_branch_taken() down Move is_branch_taken() slightly down. In subsequent patched we'll need both flip_opcode() and is_pkt_ptr_branch_taken() for is_branch_taken(), but instead of sprinkling forward declarations around, it makes more sense to move is_branch_taken() lower below is_pkt_ptr_branch_taken(), and also keep it closer to very tightly related reg_set_min_max(), as they are two critical parts of the same SCALAR range tracking logic. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-14-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c31534267c180f7ed00288d239a501b554885300 Author: Andrii Nakryiko Date: Wed Nov 1 20:37:54 2023 -0700 bpf: generalize is_branch_taken() to work with two registers While still assuming that second register is a constant, generalize is_branch_taken-related code to accept two registers instead of register plus explicit constant value. This also, as a side effect, allows to simplify check_cond_jmp_op() by unifying BPF_K case with BPF_X case, for which we use a fake register to represent BPF_K's imm constant as a register. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Acked-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20231102033759.2541186-13-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c2a3ab094683ddc154879a1364fc7cb0228f96a6 Author: Andrii Nakryiko Date: Wed Nov 1 20:37:53 2023 -0700 bpf: rename is_branch_taken reg arguments to prepare for the second one Just taking mundane refactoring bits out into a separate patch. No functional changes. Signed-off-by: Andrii Nakryiko Acked-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20231102033759.2541186-12-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 9e314f5d8682e1fe6ac214fb34580a238b6fd3c4 Author: Andrii Nakryiko Date: Wed Nov 1 20:37:51 2023 -0700 bpf: drop knowledge-losing __reg_combine_{32,64}_into_{64,32} logic When performing 32-bit conditional operation operating on lower 32 bits of a full 64-bit register, register full value isn't changed. We just potentially gain new knowledge about that register's lower 32 bits. Unfortunately, __reg_combine_{32,64}_into_{64,32} logic that reg_set_min_max() performs as a last step, can lose information in some cases due to __mark_reg64_unbounded() and __reg_assign_32_into_64(). That's bad and completely unnecessary. Especially __reg_assign_32_into_64() looks completely out of place here, because we are not performing zero-extending subregister assignment during conditional jump. So this patch replaced __reg_combine_* with just a normal reg_bounds_sync() which will do a proper job of deriving u64/s64 bounds from u32/s32, and vice versa (among all other combinations). __reg_combine_64_into_32() is also used in one more place, coerce_reg_to_size(), while handling 1- and 2-byte register loads. Looking into this, it seems like besides marking subregister as unbounded before performing reg_bounds_sync(), we were also performing deduction of smin32/smax32 and umin32/umax32 bounds from respective smin/smax and umin/umax bounds. It's now redundant as reg_bounds_sync() performs all the same logic more generically (e.g., without unnecessary assumption that upper 32 bits of full register should be zero). Long story short, we remove __reg_combine_64_into_32() completely, and coerce_reg_to_size() now only does resetting subreg to unbounded and then performing reg_bounds_sync() to recover as much information as possible from 64-bit umin/umax and smin/smax bounds, set explicitly in coerce_reg_to_size() earlier. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Acked-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20231102033759.2541186-10-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d7f00873817129e62f8c70891cb13c8eafe9feef Author: Andrii Nakryiko Date: Wed Nov 1 20:37:50 2023 -0700 bpf: try harder to deduce register bounds from different numeric domains There are cases (caught by subsequent reg_bounds tests in selftests/bpf) where performing one round of __reg_deduce_bounds() doesn't propagate all the information from, say, s32 to u32 bounds and than from newly learned u32 bounds back to u64 and s64. So perform __reg_deduce_bounds() twice to make sure such derivations are propagated fully after reg_bounds_sync(). One such example is test `(s64)[0xffffffff00000001; 0] (u64)< 0xffffffff00000000` from selftest patch from this patch set. It demonstrates an intricate dance of u64 -> s64 -> u64 -> u32 bounds adjustments, which requires two rounds of __reg_deduce_bounds(). Here are corresponding refinement log from selftest, showing evolution of knowledge. REFINING (FALSE R1) (u64)SRC=[0xffffffff00000000; U64_MAX] (u64)DST_OLD=[0; U64_MAX] (u64)DST_NEW=[0xffffffff00000000; U64_MAX] REFINING (FALSE R1) (u64)SRC=[0xffffffff00000000; U64_MAX] (s64)DST_OLD=[0xffffffff00000001; 0] (s64)DST_NEW=[0xffffffff00000001; -1] REFINING (FALSE R1) (s64)SRC=[0xffffffff00000001; -1] (u64)DST_OLD=[0xffffffff00000000; U64_MAX] (u64)DST_NEW=[0xffffffff00000001; U64_MAX] REFINING (FALSE R1) (u64)SRC=[0xffffffff00000001; U64_MAX] (u32)DST_OLD=[0; U32_MAX] (u32)DST_NEW=[1; U32_MAX] R1 initially has smin/smax set to [0xffffffff00000001; -1], while umin/umax is unknown. After (u64)< comparison, in FALSE branch we gain knowledge that umin/umax is [0xffffffff00000000; U64_MAX]. That causes smin/smax to learn that zero can't happen and upper bound is -1. Then smin/smax is adjusted from umin/umax improving lower bound from 0xffffffff00000000 to 0xffffffff00000001. And then eventually umin32/umax32 bounds are drived from umin/umax and become [1; U32_MAX]. Selftest in the last patch is actually implementing a multi-round fixed-point convergence logic, but so far all the tests are handled by two rounds of reg_bounds_sync() on the verifier state, so we keep it simple for now. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-9-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c51d5ad6543cc36334ef1fcd762d0df767a0bf7e Author: Andrii Nakryiko Date: Wed Nov 1 20:37:49 2023 -0700 bpf: improve deduction of 64-bit bounds from 32-bit bounds Add a few interesting cases in which we can tighten 64-bit bounds based on newly learnt information about 32-bit bounds. E.g., when full u64/s64 registers are used in BPF program, and then eventually compared as u32/s32. The latter comparison doesn't change the value of full register, but it does impose new restrictions on possible lower 32 bits of such full registers. And we can use that to derive additional full register bounds information. Acked-by: Eduard Zingerman Signed-off-by: Andrii Nakryiko Acked-by: Shung-Hsi Yu Link: https://lore.kernel.org/r/20231102033759.2541186-8-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 6593f2e6741f03b49bffc9d55ddd4c1c47853c39 Author: Andrii Nakryiko Date: Wed Nov 1 20:37:48 2023 -0700 bpf: add special smin32/smax32 derivation from 64-bit bounds Add a special case where we can derive valid s32 bounds from umin/umax or smin/smax by stitching together negative s32 subrange and non-negative s32 subrange. That requires upper 32 bits to form a [N, N+1] range in u32 domain (taking into account wrap around, so 0xffffffff to 0x00000000 is a valid [N, N+1] range in this sense). See code comment for concrete examples. Eduard Zingerman also provided an alternative explanation ([0]) for more mathematically inclined readers: Suppose: . there are numbers a, b, c . 2**31 <= b < 2**32 . 0 <= c < 2**31 . umin = 2**32 * a + b . umax = 2**32 * (a + 1) + c The number of values in the range represented by [umin; umax] is: . N = umax - umin + 1 = 2**32 + c - b + 1 . min(N) = 2**32 + 0 - (2**32-1) + 1 = 2, with b = 2**32-1, c = 0 . max(N) = 2**32 + (2**31 - 1) - 2**31 + 1 = 2**32, with b = 2**31, c = 2**31-1 Hence [(s32)b; (s32)c] forms a valid range. [0] https://lore.kernel.org/bpf/d7af631802f0cfae20df77fe70068702d24bbd31.camel@gmail.com/ Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-7-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit c1efab6468fd5ef541d47d81dbb62cca27f8db3b Author: Andrii Nakryiko Date: Wed Nov 1 20:37:47 2023 -0700 bpf: derive subreg bounds from full bounds when upper 32 bits are constant Comments in code try to explain the idea behind why this is correct. Please check the code and comments. Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-6-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit d540517990a9d105bf0312760665964916ac044f Author: Andrii Nakryiko Date: Wed Nov 1 20:37:46 2023 -0700 bpf: derive smin32/smax32 from umin32/umax32 bounds All the logic that applies to u64 vs s64, equally applies for u32 vs s32 relationships (just taken in a smaller 32-bit numeric space). So do the same deduction of smin32/smax32 from umin32/umax32, if we can. Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 93f7378734b595fb61e89b802002fb7e3a1267d2 Author: Andrii Nakryiko Date: Wed Nov 1 20:37:45 2023 -0700 bpf: derive smin/smax from umin/max bounds Add smin/smax derivation from appropriate umin/umax values. Previously the logic was surprisingly asymmetric, trying to derive umin/umax from smin/smax (if possible), but not trying to do the same in the other direction. A simple addition to __reg64_deduce_bounds() fixes this. Added also generic comment about u64/s64 ranges and their relationship. Hopefully that helps readers to understand all the bounds deductions a bit better. Acked-by: Eduard Zingerman Acked-by: Shung-Hsi Yu Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-4-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit bf4a64b9323f181df8aba32d66cb37b9fa5df959 Author: Yuran Pereira Date: Sat Oct 28 10:54:14 2023 +0530 selftests/bpf: Add malloc failure checks in bpf_iter Since some malloc calls in bpf_iter may at times fail, this patch adds the appropriate fail checks, and ensures that any previously allocated resource is appropriately destroyed before returning the function. Signed-off-by: Yuran Pereira Acked-by: Yonghong Song Acked-by: Kui-Feng Lee Link: https://lore.kernel.org/r/DB3PR10MB6835F0ECA792265FA41FC39BE8A3A@DB3PR10MB6835.EURPRD10.PROD.OUTLOOK.COM Signed-off-by: Alexei Starovoitov commit f4c7e887324f5776eef6e6e47a90e0ac8058a7a8 Author: Andrii Nakryiko Date: Wed Nov 1 20:37:44 2023 -0700 selftests/bpf: satisfy compiler by having explicit return in btf test Some compilers complain about get_pprint_mapv_size() not returning value in some code paths. Fix with explicit return. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit fac85c291e141a67fce46bdce01f9ee33aafabfe Author: Yuran Pereira Date: Sat Oct 28 10:54:13 2023 +0530 selftests/bpf: Convert CHECK macros to ASSERT_* macros in bpf_iter As it was pointed out by Yonghong Song [1], in the bpf selftests the use of the ASSERT_* series of macros is preferred over the CHECK macro. This patch replaces all CHECK calls in bpf_iter with the appropriate ASSERT_* macros. [1] https://lore.kernel.org/lkml/0a142924-633c-44e6-9a92-2dc019656bf2@linux.dev Suggested-by: Yonghong Song Signed-off-by: Yuran Pereira Acked-by: Yonghong Song Acked-by: Kui-Feng Lee Link: https://lore.kernel.org/r/DB3PR10MB6835E9C8DFCA226DD6FEF914E8A3A@DB3PR10MB6835.EURPRD10.PROD.OUTLOOK.COM Signed-off-by: Alexei Starovoitov commit 2b62aa59d02ed281fa4fc218df3ca91b773e1e62 Author: Andrii Nakryiko Date: Wed Nov 1 20:37:43 2023 -0700 selftests/bpf: fix RELEASE=1 build for tc_opts Compiler complains about malloc(). We also don't need to dynamically allocate anything, so make the life easier by using statically sized buffer. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20231102033759.2541186-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit a78422e9dff366b3a46ae44caf6ec8ded9c9fc2f Author: Danilo Krummrich Date: Fri Nov 10 01:16:33 2023 +0100 drm/sched: implement dynamic job-flow control Currently, job flow control is implemented simply by limiting the number of jobs in flight. Therefore, a scheduler is initialized with a credit limit that corresponds to the number of jobs which can be sent to the hardware. This implies that for each job, drivers need to account for the maximum job size possible in order to not overflow the ring buffer. However, there are drivers, such as Nouveau, where the job size has a rather large range. For such drivers it can easily happen that job submissions not even filling the ring by 1% can block subsequent submissions, which, in the worst case, can lead to the ring run dry. In order to overcome this issue, allow for tracking the actual job size instead of the number of jobs. Therefore, add a field to track a job's credit count, which represents the number of credits a job contributes to the scheduler's credit limit. Signed-off-by: Danilo Krummrich Reviewed-by: Luben Tuikov Link: https://patchwork.freedesktop.org/patch/msgid/20231110001638.71750-1-dakr@redhat.com commit 36245bd02e88e68ac5955c2958c968879d7b75a9 Author: Luben Tuikov Date: Thu Nov 9 19:11:46 2023 -0500 drm/sched: Define pr_fmt() for DRM using pr_*() Define pr_fmt() as "[drm] " for DRM code using pr_*() facilities, especially when no devices are available. This makes it easier to browse kernel logs. Signed-off-by: Luben Tuikov Acked-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231110002659.113208-2-ltuikov89@gmail.com commit 4d53cf81479500d7af787fe6bc881c24ec31f005 Author: Hsin-Yi Wang Date: Tue Nov 7 12:41:53 2023 -0800 drm/panel-edp: drm/panel-edp: Add several generic edp panels Add a few generic edp panels used by mt8186 chromebooks. Signed-off-by: Hsin-Yi Wang Reviewed-by: Douglas Anderson Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231107204611.3082200-4-hsinyi@chromium.org commit 962845c090c4f85fa4f6872a5b6c89ee61f53cc0 Author: Hsin-Yi Wang Date: Tue Nov 7 12:41:52 2023 -0800 drm/panel-edp: drm/panel-edp: Fix AUO B116XTN02 name Rename AUO 0x235c B116XTN02 to B116XTN02.3 according to decoding edid. Fixes: 3db2420422a5 ("drm/panel-edp: Add AUO B116XTN02, BOE NT116WHM-N21,836X2, NV116WHM-N49 V8.0") Cc: stable@vger.kernel.org Signed-off-by: Hsin-Yi Wang Reviewed-by: Douglas Anderson Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231107204611.3082200-3-hsinyi@chromium.org commit fc6e7679296530106ee0954e8ddef1aa58b2e0b5 Author: Hsin-Yi Wang Date: Tue Nov 7 12:41:51 2023 -0800 drm/panel-edp: drm/panel-edp: Fix AUO B116XAK01 name and timing Rename AUO 0x405c B116XAK01 to B116XAK01.0 and adjust the timing of auo_b116xak01: T3=200, T12=500, T7_max = 50 according to decoding edid and datasheet. Fixes: da458286a5e2 ("drm/panel: Add support for AUO B116XAK01 panel") Cc: stable@vger.kernel.org Signed-off-by: Hsin-Yi Wang Reviewed-by: Douglas Anderson Acked-by: Maxime Ripard Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231107204611.3082200-2-hsinyi@chromium.org commit f3123c2590005c5ff631653d31428e40cd10c618 Author: Luben Tuikov Date: Thu Nov 9 18:53:26 2023 -0500 drm/sched: Qualify drm_sched_wakeup() by drm_sched_entity_is_ready() Don't "wake up" the GPU scheduler unless the entity is ready, as well as we can queue to the scheduler, i.e. there is no point in waking up the scheduler for the entity unless the entity is ready. Signed-off-by: Luben Tuikov Fixes: bc8d6a9df99038 ("drm/sched: Don't disturb the entity when in RR-mode scheduling") Reviewed-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231110000123.72565-2-ltuikov89@gmail.com commit aecd408b7e50742868b3305c24325a89024e2a30 Author: Yafang Shao Date: Sun Oct 29 06:14:32 2023 +0000 cgroup: Add a new helper for cgroup1 hierarchy A new helper is added for cgroup1 hierarchy: - task_get_cgroup1 Acquires the associated cgroup of a task within a specific cgroup1 hierarchy. The cgroup1 hierarchy is identified by its hierarchy ID. This helper function is added to facilitate the tracing of tasks within a particular container or cgroup dir in BPF programs. It's important to note that this helper is designed specifically for cgroup1 only. tj: Use irsqsave/restore as suggested by Hou Tao . Suggested-by: Tejun Heo Signed-off-by: Yafang Shao Cc: Hou Tao Signed-off-by: Tejun Heo commit 0008454e8fd30ed0017a9a35b8dd708f168931b8 Author: Yafang Shao Date: Sun Oct 29 06:14:31 2023 +0000 cgroup: Add annotation for holding namespace_sem in current_cgns_cgroup_from_root() When I initially examined the function current_cgns_cgroup_from_root(), I was perplexed by its lack of holding cgroup_mutex. However, after Michal explained the reason[0] to me, I realized that it already holds the namespace_sem. I believe this intricacy could also confuse others, so it would be advisable to include an annotation for clarification. After we replace the cgroup_mutex with RCU read lock, if current doesn't hold the namespace_sem, the root cgroup will be NULL. So let's add a WARN_ON_ONCE() for it. [0]. https://lore.kernel.org/bpf/afdnpo3jz2ic2ampud7swd6so5carkilts2mkygcaw67vbw6yh@5b5mncf7qyet Signed-off-by: Yafang Shao Cc: Michal Koutny Signed-off-by: Tejun Heo commit 9067d90006df089b9a1da0d74f0cad232a5d726a Author: Yafang Shao Date: Sun Oct 29 06:14:30 2023 +0000 cgroup: Eliminate the need for cgroup_mutex in proc_cgroup_show() The cgroup root_list is already RCU-safe. Therefore, we can replace the cgroup_mutex with the RCU read lock in some particular paths. This change will be particularly beneficial for frequent operations, such as `cat /proc/self/cgroup`, in a cgroup1-based container environment. I did stress tests with this change, as outlined below (with CONFIG_PROVE_RCU_LIST enabled): - Continuously mounting and unmounting named cgroups in some tasks, for example: cgrp_name=$1 while true do mount -t cgroup -o none,name=$cgrp_name none /$cgrp_name umount /$cgrp_name done - Continuously triggering proc_cgroup_show() in some tasks concurrently, for example: while true; do cat /proc/self/cgroup > /dev/null; done They can ran successfully after implementing this change, with no RCU warnings in dmesg. Signed-off-by: Yafang Shao Signed-off-by: Tejun Heo commit d23b5c577715892c87533b13923306acc6243f93 Author: Yafang Shao Date: Sun Oct 29 06:14:29 2023 +0000 cgroup: Make operations on the cgroup root_list RCU safe At present, when we perform operations on the cgroup root_list, we must hold the cgroup_mutex, which is a relatively heavyweight lock. In reality, we can make operations on this list RCU-safe, eliminating the need to hold the cgroup_mutex during traversal. Modifications to the list only occur in the cgroup root setup and destroy paths, which should be infrequent in a production environment. In contrast, traversal may occur frequently. Therefore, making it RCU-safe would be beneficial. Signed-off-by: Yafang Shao Signed-off-by: Tejun Heo commit 96a2b48e5e1df6698f504969f0f51dc34e52ff3d Author: Yafang Shao Date: Sun Oct 29 06:14:28 2023 +0000 cgroup: Remove unnecessary list_empty() The root hasn't been removed from the root_list, so the list can't be NULL. However, if it had been removed, attempting to destroy it once more is not possible. Let's replace this with WARN_ON_ONCE() for clarity. Signed-off-by: Yafang Shao Signed-off-by: Tejun Heo commit a399ee6773d6a0203f9bd764f8bd9d978878cef1 Author: Arnaldo Carvalho de Melo Date: Thu Nov 9 16:34:09 2023 -0300 tools: Disable __packed attribute compiler warning due to -Werror=attributes Noticed on several perf tools cross build test containers: [perfbuilder@five ~]$ grep FAIL ~/dm.log/summary 19 10.18 debian:experimental-x-mips : FAIL gcc version 12.3.0 (Debian 12.3.0-6) 20 11.21 debian:experimental-x-mips64 : FAIL gcc version 12.3.0 (Debian 12.3.0-6) 21 11.30 debian:experimental-x-mipsel : FAIL gcc version 12.3.0 (Debian 12.3.0-6) 37 12.07 ubuntu:18.04-x-arm : FAIL gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 42 11.91 ubuntu:18.04-x-riscv64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) 44 13.17 ubuntu:18.04-x-sh4 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) 45 12.09 ubuntu:18.04-x-sparc64 : FAIL gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) [perfbuilder@five ~]$ In file included from util/intel-pt-decoder/intel-pt-pkt-decoder.c:10: /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h: In function 'get_unaligned_le16': /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:13:29: error: packed attribute causes inefficient alignment for 'x' [-Werror=attributes] 13 | const struct { type x; } __packed *__pptr = (typeof(__pptr))(ptr); \ | ^ /tmp/perf-6.6.0-rc1/tools/include/asm-generic/unaligned.h:27:28: note: in expansion of macro '__get_unaligned_t' 27 | return le16_to_cpu(__get_unaligned_t(__le16, p)); | ^~~~~~~~~~~~~~~~~ This comes from the kernel, where the -Wattributes and -Wpacked isn't used, -Wpacked is already disabled, do it for the attributes as well. Fixes: a91c987254651443 ("perf tools: Add get_unaligned_leNN()") Suggested-by: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/7c5b626c-1de9-4c12-a781-e44985b4a797@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6512b6aa237db36d881a81cc312db39668e61853 Author: Ian Rogers Date: Thu Nov 2 10:56:54 2023 -0700 perf bpf: Don't synthesize BPF events when disabled If BPF sideband events are disabled on the command line, don't synthesize BPF events too. Signed-off-by: Ian Rogers Acked-by: Song Liu Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231102175735.2272696-13-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 6aad765d10c5cd8a62b258c359bae643ab2d45da Author: James Clark Date: Mon Nov 6 15:10:49 2023 +0000 perf test: Add support for setting objdump binary via perf config Add a 'perf config' variable that does the same thing as "perf test --objdump ". Also update the man page. Committer testing: # perf config test.objdump # perf test "object code reading" 26: Object code reading : Ok # perf config test.objdump=blah # perf config test.objdump test.objdump=blah # perf test "object code reading" 26: Object code reading : FAILED! # perf test -v "object code reading" 26: Object code reading : --- start --- test child forked, pid 600599 Looking at the vmlinux_path (8 entries long) Using /proc/kcore for kernel data Using /proc/kallsyms for symbols Parsing event 'cycles' Using CPUID AuthenticAMD-25-21-0 mmap size 528384B Reading object code for memory address: 0x4d9a02 File is: /home/acme/bin/perf On file address is: 0xd9a02 Objdump command is: blah -z -d --start-address=0x4d9a02 --stop-address=0x4d9a82 /home/acme/bin/perf objdump read too few bytes: 128 Bytes read differ from those read by objdump buf1 (dso): 0x48 0x85 0xff 0x74 0x29 0xe8 0x94 0xdf 0x07 0x00 0x8b 0x73 0x1c 0x48 0x8b 0x43 0x08 0xeb 0xa5 0x0f 0x1f 0x00 0x48 0x8b 0x45 0xe8 0x64 0x48 0x2b 0x04 0x25 0x28 0x00 0x00 0x00 0x75 0x0f 0x48 0x8b 0x5d 0xf8 0xc9 0xc3 0x0f 0x1f 0x00 0x48 0x8b 0x43 0x08 0xeb 0x84 0xe8 0xc5 0x3e 0xf3 0xff 0x0f 0x1f 0x44 0x00 0x00 0x55 0x48 0x89 0xe5 0x41 0x56 0x41 0x55 0x49 0x89 0xd5 0x41 0x54 0x49 0x89 0xfc 0x53 0x48 0x89 0xf3 0x48 0x83 0xec 0x30 0x48 0x8b 0x7e 0x20 0x64 0x48 0x8b 0x04 0x25 0x28 0x00 0x00 0x00 0x48 0x89 0x45 0xd8 0x31 0xc0 0x48 0x89 0x75 0xb0 0x48 0xc7 0x45 0xb8 0x00 0x00 0x00 0x00 0x48 0xc7 0x45 0xc0 0x00 0x00 0x00 0x00 0xe8 0xad 0xfa buf2 (objdump): 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 test child finished with -1 ---- end ---- Object code reading: FAILED! # perf config test.objdump=/usr/bin/objdump # perf config test.objdump test.objdump=/usr/bin/objdump # perf test "object code reading" 26: Object code reading : Ok # Signed-off-by: James Clark Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Jajeev Cc: Fangrui Song Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Tom Rix Cc: Yang Jihong Cc: Yonghong Song Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20231106151051.129440-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit 33ce9fc4f8ddba30b7040bd01cea11080f40b344 Author: James Clark Date: Mon Nov 6 15:10:48 2023 +0000 perf test: Add option to change objdump binary All of the other Perf subcommands that use objdump have an option to specify the binary, so add the same option to 'perf test'. This is useful if you have built the kernel with a different toolchain to the system one, where the system objdump may fail to disassemble vmlinux. Now this can be fixed with something like this: $ perf test --objdump llvm-objdump "object code reading" Reviewed-by: Ian Rogers Signed-off-by: James Clark Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Athira Jajeev Cc: Fangrui Song Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Tom Rix Cc: Yang Jihong Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20231106151051.129440-2-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo commit b861fd7e0efc4dc2376e7212f59a9b32d1383c00 Author: Thomas Richter Date: Mon Nov 6 10:16:27 2023 +0100 perf tests offcpu: Adjust test case perf record offcpu profiling tests for s390 On s390 using linux-next the test case: 87: perf record offcpu profiling tests fails. The root cause is this command # ./perf record --off-cpu -e dummy -- ./perf bench sched messaging -l 10 # Running 'sched/messaging' benchmark: # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 0.231 [sec] [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.077 MB perf.data (401 samples) ] # It does not generate 800+ sample entries, on s390 usually around 40[1-9], sometimes a few more, but never more than 450. The higher the number of CPUs the lower the number of samples. Looking at function chain: bench_sched_messaging() +--> group() the senders and receiver threads are created. The senders and receivers call function ready() which writes one bytes and wait for a reply using poll system() call. As context switches are counted, the function ready() will trigger a context switch when no input data is available after the write system call. The write system call does not trigger context switches when the data size is small. And writing 1000 bytes (10 iterations with 100 bytes) is not much and certainly won't block. The 400+ context switch on s390 occur when the some receiver/sender threads call ready() and wait for the response from function bench_sched_messaging() being kicked off. Lower the number of expected context switches to 400 to succeed on s390. Suggested-by: Namhyung Kim Signed-off-by: Ilya Leoshkevich Signed-off-by: Thomas Richter Acked-by: Namhyung Kim Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Co-developed-by: Ilya Leoshkevich Link: https://lore.kernel.org/r/20231106091627.2022530-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 36c70e44a37b84cbb4094bf6f5cdb01cfd6659df Author: Yang Jihong Date: Mon Oct 30 11:14:38 2023 +0000 perf tools: Add the python_ext_build directory to .gitignore `python_ext_build` is the build directory for python.so, ignore it for cleaner git status. Signed-off-by: Yang Jihong Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231030111438.1357962-2-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 4a5aaaf308b91e3da21c3b8f7e78dc5a256d9324 Author: zhaimingbing Date: Mon Oct 30 15:58:25 2023 +0800 perf tests attr: Fix spelling mistake "whic" to "which" There is a spelling mistake, Please fix it. Reviewed-by: Ian Rogers Signed-off-by: zhaimingbing Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: https://lore.kernel.org/r/20231030075825.3701-1-zhaimingbing@cmss.chinamobile.com Signed-off-by: Arnaldo Carvalho de Melo commit b753d48f53f9dcea655d359f028c8adfdd9504b5 Author: Namhyung Kim Date: Fri Nov 3 12:19:07 2023 -0700 perf annotate: Move offsets array from 'struct annotation' to 'struct annotated_source' The offsets array keeps pointers to 'struct annotation_line' entries which are available in the 'struct annotated_source'. Let's move it to there. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Christophe JAILLET Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231103191907.54531-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0aae4c99c5f8f748c6cb5ca03bb3b3ae8cfb10df Author: Namhyung Kim Date: Fri Nov 3 12:19:06 2023 -0700 perf annotate: Move some source code related fields from 'struct annotation' to 'struct annotated_source' Some fields in the 'struct annotation' are only used with 'struct annotated_source' so better to be moved there in order to reduce memory consumption for other symbols. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Christophe JAILLET Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231103191907.54531-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2b215ec71b888ec2f3ca86846ce3a7f20b0d5e4d Author: Namhyung Kim Date: Fri Nov 3 12:19:05 2023 -0700 perf annotate: Move max_coverage from 'struct annotation' to 'struct annotated_branch' The max_coverage field is only used when branch stack info is available so it'd be natural to move to 'struct annotated_branch'. Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Christophe JAILLET Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231103191907.54531-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b7f87e32590bf48eca84f729d3422be7b8dc22d3 Author: Namhyung Kim Date: Fri Nov 3 12:19:04 2023 -0700 perf annotate: Split branch stack cycles info from 'struct annotation' The cycles info is only meaningful when sample has branch stacks. To save the memory for normal cases, move those fields to a new 'struct annotated_branch' and dynamically allocate it when needed. Also move cycles_hist from annotated_source as it's related here. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Christophe JAILLET Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231103191907.54531-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit de2c7eb59c342d1a61124caaf2993e325a9becb7 Author: Namhyung Kim Date: Fri Nov 3 12:19:03 2023 -0700 perf annotate: Split branch stack cycles information out of 'struct annotation_line' The cycles info is used only when branch stack is provided. Separate them from 'struct annotation_line' into a separate struct and lazy allocate them to save some memory. Committer notes: Make annotation__compute_ipc() check if the lazy allocation works, bailing out if so, its callers already do error checking and propagation. Signed-off-by: Namhyung Kim Cc: Adrian Hunter Cc: Christophe JAILLET Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20231103191907.54531-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 89d5c48c34c8a552acd9a2e3ee504b2f06879fea Author: Namhyung Kim Date: Fri Nov 3 12:55:41 2023 -0700 perf test: Simplify "object code reading" test It tries cycles (or cpu-clock on s390) event with exclude_kernel bit to open. But other arch on a VM can fail with the hardware event and need to fallback to the software event in the same way. So let's get rid of the cpuid check and use generic fallback mechanism using an array of event candidates. Now event in the odd index excludes the kernel so use that for the return value. Reviewed-by: Adrian Hunter Signed-off-by: Namhyung Kim Tested-by: James Clark Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Thomas Richter Link: https://lore.kernel.org/r/20231103195541.67788-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9ffa6c7512ca7aaeb30e596e2c247cb1fae7123a Author: Ian Rogers Date: Thu Nov 2 10:56:47 2023 -0700 perf machine thread: Remove exited threads by default 'struct thread' values hold onto references to mmaps, DSOs, etc. When a thread exits it is necessary to clean all of this memory up by removing the thread from the machine's threads. Some tools require this doesn't happen, such as auxtrace events, 'perf report' if offcpu events exist or if a task list is being generated, so add a 'struct symbol_conf' member to make the behavior optional. When an exited thread is left in the machine's threads, mark it as exited. This change relates to commit 40826c45eb0b8856 ("perf thread: Remove notion of dead threads") . Dead threads were removed as they had a reference count of 0 and were difficult to reason about with the reference count checker. Here a thread is removed from threads when it exits, unless via symbol_conf the exited thread isn't remove and is marked as exited. Reference counting behaves as it normally does. Reviewed-by: Adrian Hunter Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Namhyung Kim Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231102175735.2272696-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 1a27fc01700fbff2f205000edf0d1d315b5f85cc Author: Ian Rogers Date: Thu Nov 2 10:56:44 2023 -0700 perf record: Lazy load kernel symbols Commit 5b7ba82a75915e73 ("perf symbols: Load kernel maps before using") changed it so that loading a kernel DSO would cause the symbols for the DSO to be eagerly loaded. For 'perf record' this is overhead as the symbols won't be used. Add a field to 'struct symbol_conf' to control the behavior and disable it for 'perf record' and 'perf inject'. Reviewed-by: Adrian Hunter Signed-off-by: Ian Rogers Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Athira Jajeev Cc: Changbin Du Cc: Colin Ian King Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Cc: German Gomez Cc: Huacai Chen Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: K Prateek Nayak Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Li Dong Cc: Liam Howlett Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Miguel Ojeda Cc: Ming Wang Cc: Nick Terrell Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: Sandipan Das Cc: Sean Christopherson Cc: Steinar H. Gunderson Cc: Vincent Whitchurch Cc: Wenyu Liu Cc: Yang Jihong Link: https://lore.kernel.org/r/20231102175735.2272696-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7ff7b7afe364af17362f2a08cccdc79905feb0bc Author: Colin Ian King Date: Tue Oct 3 08:49:11 2023 +0100 perf tools: Fix spelling mistake "parametrized" -> "parameterized" There are spelling mistakes in comments and a pr_debug message. Fix them. Reviewed-by: Athira Jajeev Reviewed-by: Ian Rogers Signed-off-by: Colin Ian King Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: https://lore.kernel.org/r/20231003074911.220216-1-colin.i.king@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 9fbb4b02302b0ae618303565025412070d32f85e Author: Kan Liang Date: Wed Oct 25 13:16:26 2023 -0700 perf tools: Add branch counter knob Add a new branch filter, "counter", for the branch counter option. It is used to mark the events which should be logged in the branch. If it is applied with the -j option, the counters of all the events should be logged in the branch. If the legacy kernel doesn't support the new branch sample type, switching off the branch counter filter. The stored counter values in each branch are displayed right after the regular branch stack information via perf report -D. Usage examples: # perf record -e "{branch-instructions,branch-misses}:S" -j any,counter Only the first event, branch-instructions, collect the LBR. Both branch-instructions and branch-misses are marked as logged events. The occurrences information of them can be found in the branch stack extension space of each branch. # perf record -e "{cpu/branch-instructions,branch_type=any/,cpu/branch-misses,branch_type=counter/}" Only the first event, branch-instructions, collect the LBR. Only the branch-misses event is marked as a logged event. Committer notes: I noticed 'perf test "Sample parsing"' failing, reported to the list and Kan provided a patch that checks if the evsel has a leader and that evsel->evlist is set, the comment in the source code further explains it. Reviewed-by: Ian Rogers Signed-off-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tinghao Zhang Link: https://lore.kernel.org/r/20231025201626.3000228-8-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f415a6078f640ab15bae34d3c6a1d8e6071363de Author: Jani Nikula Date: Tue Oct 31 12:16:43 2023 +0200 drm/eld: add helpers to modify the SADs of an ELD Occasionally it's necessary for drivers to modify the SADs of an ELD, but it's not so cool to have drivers poke at the ELD buffer directly. Using the helpers to translate between 3-byte SAD and struct cea_sad, add ELD helpers to get/set the SADs from/to an ELD. v2: s/i/sad_index/ (Mitul) Cc: Mitul Golani Signed-off-by: Jani Nikula Reviewed-by: Mitul Golani Link: https://patchwork.freedesktop.org/patch/msgid/8e9a05f2b1e0dd184132d636e1e778e8917ec25d.1698747331.git.jani.nikula@intel.com commit 8af4681189e58a51be8a0fc9f0687e615cdb82c9 Author: Jani Nikula Date: Tue Oct 31 12:16:42 2023 +0200 drm/edid: add helpers to get/set struct cea_sad from/to 3-byte sad Add helpers to pack/unpack SADs. Both ways and non-static, as follow-up work needs them. v2: Add include to get the declarations Cc: Mitul Golani Reviewed-by: Mitul Golani Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/21d657ca854ce26423b461c0bb71e7a0727ba437.1698747331.git.jani.nikula@intel.com commit e8d0b2c06fd779709baea71d5e8bfd99b2116518 Author: Jani Nikula Date: Tue Oct 31 12:16:41 2023 +0200 drm/edid: use a temp variable for sads to drop one level of dereferences Use a temporary variable struct cea_sad *, instead of using struct cea_sad ** directly with the double dereferences. It's arguably easier on the eyes, and drops a set of parenthesis too. Cc: Mitul Golani Reviewed-by: Mitul Golani Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b6e2f295ae5491c2bb0f528508f0f5fca921dc77.1698747331.git.jani.nikula@intel.com commit 439590ace7755657523a1a0230c6099cb0a6e15f Author: Jani Nikula Date: Tue Oct 31 12:16:40 2023 +0200 drm/edid: include drm_eld.h only where required Reduce the dependencies on drm_eld.h. Some files might be able to drop the dependency on drm_edid.h too with the direct inclusion of drm_eld.h. Cc: Mitul Golani Reviewed-by: Mitul Golani Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/9f5963ce900d747f3279312c0cd1da599fd83f94.1698747331.git.jani.nikula@intel.com commit 533914536bf5cb5984755244f5aa13cf93cc84d3 Author: Jani Nikula Date: Tue Oct 31 12:16:39 2023 +0200 drm/eld: replace uint8_t with u8 Unify on kernel types. Cc: Mitul Golani Reviewed-by: Chaitanya Kumar Borah Reviewed-by: Mitul Golani Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6e048fc4c8a3ebec638ce27b0b8b969a3d2fa8bc.1698747331.git.jani.nikula@intel.com commit 8eb80946ab0c18a853be5f90d6b6ccbe3fd42989 Author: Jani Nikula Date: Tue Oct 31 12:16:38 2023 +0200 drm/edid: split out drm_eld.h from drm_edid.h The drm_edid.[ch] files are starting to be a bit crowded, and with plans to add more ELD related functionality, it's perhaps cleanest to split the ELD code out to a header of its own. Include drm_eld.h from drm_edid.h for starters, and leave it to follow-up work to only include drm_eld.h where needed. Cc: Mitul Golani Reviewed-by: Mitul Golani Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/0c6d631fa1058036d72dd25d1cabc90a7c52490e.1698747331.git.jani.nikula@intel.com commit c400eb4d6f5f603f4f3f6cc4b6fdacd416ff142e Author: Maíra Canal Date: Mon Nov 6 10:41:20 2023 -0300 MAINTAINERS: Add Maira to V3D maintainers I've been contributing to V3D with improvements, reviews, testing and debugging. Therefore, add myself as a co-maintainer of the V3D driver. Signed-off-by: Maíra Canal Acked-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20231106134201.725805-1-mcanal@igalia.com commit a0a0bd3effea22d9886ee6ff98c591acd9565787 Author: Maxime Ripard Date: Wed Oct 25 15:24:28 2023 +0200 drm/todo: Add entry to clean up former seltests suites Most of those suites are undocumented and aren't really clear about what they are testing. Let's add a TODO entry as a future task to get started into KUnit and DRM. Acked-by: Daniel Vetter Link: https://lore.kernel.org/r/20231025132428.723672-2-mripard@kernel.org Signed-off-by: Maxime Ripard commit 078a5b498d6a3e9c2acb637427258eb6b3079923 Author: Maxime Ripard Date: Wed Oct 25 15:24:27 2023 +0200 drm/tests: Remove slow tests Both the drm_buddy and drm_mm tests have been converted from selftest to kunit recently. However, a significant portion of them are trying to exert some part of their API over a huge number of iterations and with random variations of their parameters. They are thus more a way to discover new bugs than actual unit tests. This is fine in itself but leads to very slow runtime (up to 25s for some drm_test_mm_reserve and drm_test_mm_insert on a Ryzen 7950x while running the tests in qemu) which make them a poor fit for kunit. Let's remove those tests from the drm_mm and drm_buddy test suites for now, and if it's ever needed we can always create proper unit tests for them later on. This made the entire DRM tests execution time (as of v6.6-rc1) come from 65s to less than .5s on a Ryzen 7950x system when running under qemu, and from 9 minutes to about 4s on a RaspberryPi4. Acked-by: Daniel Vetter Suggested-by: Daniel Vetter Link: https://lore.kernel.org/r/20231025132428.723672-1-mripard@kernel.org Signed-off-by: Maxime Ripard commit bae9fca9684335478ff147413bd69c8d77b66cf9 Author: Sam James Date: Tue Nov 7 21:55:33 2023 +0000 drm: i915: Adapt to -Walloc-size GCC 14 introduces a new -Walloc-size included in -Wextra which errors out like: ``` drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c: In function ‘eb_copy_relocations’: drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:1681:24: error: allocation of insufficient size ‘1’ for type ‘struct drm_i915_gem_relocation_entry’ with size ‘32’ [-Werror=alloc-size] 1681 | relocs = kvmalloc_array(size, 1, GFP_KERNEL); | ^ ``` So, just swap the number of members and size arguments to match the prototype, as we're initialising 1 element of size `size`. GCC then sees we're not doing anything wrong. Signed-off-by: Sam James Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231107215538.1891359-1-sam@gentoo.org commit a11d965a218f0cd95b13fe44d0bcd8a20ce134a8 Author: Shiji Yang Date: Sat Nov 4 16:58:00 2023 +0800 wifi: rt2x00: restart beacon queue when hardware reset When a hardware reset is triggered, all registers are reset, so all queues are forced to stop in hardware interface. However, mac80211 will not automatically stop the queue. If we don't manually stop the beacon queue, the queue will be deadlocked and unable to start again. This patch fixes the issue where Apple devices cannot connect to the AP after calling ieee80211_restart_hw(). Signed-off-by: Shiji Yang Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/TYAP286MB031530EB6D98DCE4DF20766CBCA4A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM commit 570beb6285fd355904b22625da20809f477096c5 Author: Shiji Yang Date: Sat Nov 4 16:57:59 2023 +0800 wifi: rt2x00: disable RTS threshold for rt2800 by default rt2800 has a lot of registers to control the RTS enable/disable status for different rates. And the driver control them via rt2800_set_rts_threshold(). When RTS was disabled in user interface, this function won't be called at all. This means that the RTS is still 'on' for CCK and OFDM rates. So we'd better to disable them by default because it should be like this. The RTS for HT20 and HT40 is already default off so we don't need to touch them. If we toggle the RTS status, these register bits will be enable/disable again by rt2800_set_rts_threshold(). Signed-off-by: Shiji Yang Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/TYAP286MB03155DDB953155B7A2DE849ABCA4A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM commit b1275cdd7456ef811747dfb4f3c46310ddd300cd Author: Shiji Yang Date: Sat Nov 4 16:57:58 2023 +0800 wifi: rt2x00: introduce DMA busy check watchdog for rt2800 When I tried to fix the watchdog of rt2800, I found that sometimes the watchdog can not reset the hung device. This is because the queue is not completely stuck, it just becomes very slow. The MTK vendor driver for the new chip MT7603/MT7612 has a DMA busy watchdog to detect device hangs by checking DMA busy status. This watchdog implementation is something similar to it. To reduce unnecessary reset, we can check the INT_SOURCE_CSR register together as I found that when the radio hung, the RX/TX coherent interrupt will always stuck at triggered state. The 'watchdog' module parameter has been extended to control all watchdogs(0=disabled, 1=hang watchdog, 2=DMA watchdog, 3=both). This new watchdog function is a slight schedule and it won't affect the transmission speed. So we can turn on it by default. Due to the INT_SOURCE_CSR register is invalid on rt2800 USB NICs, the DMA busy watchdog will be automatically disabled for them. Tested on MT7620 and RT5350. Signed-off-by: Shiji Yang Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/TYAP286MB0315D7462CE08A119A99DE34BCA4A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM commit 53ee0b3b99edc6a47096bffef15695f5a895386f Author: Chih-Kang Chang Date: Fri Nov 3 10:08:51 2023 +0800 wifi: rtw88: fix RX filter in FIF_ALLMULTI flag The broadcast packets will be filtered in the FIF_ALLMULTI flag in the original code, which causes beacon packets to be filtered out and disconnection. Therefore, we fix it. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Chih-Kang Chang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231103020851.102238-1-pkshih@realtek.com commit ed4f0c195e8fba06fa5c1072ade7feaadb91c03d Author: Dmitry Antipov Date: Thu Nov 2 14:55:55 2023 +0300 wifi: rtw88: simplify __rtw_tx_work() Since 'ieee80211_txq_get_depth()' allows NULL for 2nd and 3rd arguments, simplify '__rtw_tx_work()' by dropping unused 'byte_cnt'. Compile tested only. Signed-off-by: Dmitry Antipov Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231102115606.69838-1-dmantipov@yandex.ru commit ca76817f4c4bbf8f98268772f4eeea8382a34bcd Author: Ping-Ke Shih Date: Thu Nov 2 08:37:16 2023 +0800 wifi: rtw89: coex: use struct assignment to replace memcpy() to append TDMA content To notify firmware TDMA timeslot assignment, append TDMA parameters when sending policy H2C firmware command. However, compiler warns we do memcpy() data to val[] field of TLV struct. To avoid this, assign the struct value with simple '=' instead. Compile tested only. rtw89/coex.c: In function '_append_tdma': drivers/net/wireless/realtek/rtw89/coex.c:1585:17: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=] 1585 | memcpy(&v3->tdma, &dm->tdma, sizeof(v3->tdma)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/net/wireless/realtek/rtw89/coex.h:8, from drivers/net/wireless/realtek/rtw89/coex.c:5: drivers/net/wireless/realtek/rtw89/core.h:2703:37: note: at offset [5714, 71249] into destination object 'ver' of size 8 2703 | const struct rtw89_btc_ver *ver; | ^~~ drivers/net/wireless/realtek/rtw89/coex.c:1579:17: warning: writing 8 bytes into a region of size 0 [-Wstringop-overflow=] 1579 | memcpy(v, &dm->tdma, sizeof(*v)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/realtek/rtw89/core.h:2703:37: note: at offset [5710, 71245] into destination object 'ver' of size 8 2703 | const struct rtw89_btc_ver *ver; | ^~~ Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310301908.Wrj0diqe-lkp@intel.com/ Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231102003716.25815-1-pkshih@realtek.com commit 5cb0d6b878c375f25f1a74b4d1258561f176ea8b Author: Ping-Ke Shih Date: Wed Nov 1 15:21:49 2023 +0800 wifi: rtw89: pci: implement PCI mac_post_init for WiFi 7 chips For normal use, we do additional settings than mac_pre_init, such as more TX/RX DMA channels, interrupt mitigation and etc. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231101072149.21997-6-pkshih@realtek.com commit e24ae0f07625d51934e9367e155510c71b088a2b Author: Ping-Ke Shih Date: Wed Nov 1 15:21:48 2023 +0800 wifi: rtw89: pci: add LTR v2 for WiFi 7 chip PCI LTR (Latency Tolerance Reporting) is a capability to yield expected power consumption, and we configure the parameters according to design. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231101072149.21997-5-pkshih@realtek.com commit 2daafe9a0cb6c93379ae2099610ac4069f1e286d Author: Ping-Ke Shih Date: Wed Nov 1 15:21:47 2023 +0800 wifi: rtw89: pci: implement PCI mac_pre_init for WiFi 7 chips Call this function when doing MAC initialization at probe stage. It does partial initial registers only, because we only need basic ability to download firmware. The function to clear index is the sub-function, so set its pointer as well. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231101072149.21997-4-pkshih@realtek.com commit bfdcfee3659c6289f391d6eced54b18b244a21ea Author: Ping-Ke Shih Date: Wed Nov 1 15:21:46 2023 +0800 wifi: rtw89: pci: use gen_def pointer to configure mac_{pre,post}_init and clear PCI ring index Use gen_def pointer to call three WiFi 6 specific functions, and add _ax suffix to them. Then, we will implement functions for WiFi 7 chips later. The mac_{pre,post}_init are used to initialize PCI during doing MAC initialization, and clear PCI ring index to make index consistent between driver, firmware and hardware. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231101072149.21997-3-pkshih@realtek.com commit 07fabde630a6ce6d0ec791415d3dc3ade858f8c5 Author: Ping-Ke Shih Date: Wed Nov 1 15:21:45 2023 +0800 wifi: rtw89: pci: add PCI generation information to pci_info for each chip In order to reuse PCI initial and configuration flows, add struct rtw89_pci_gen_def to abstract the differences between WiFi 6/7 generations. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231101072149.21997-2-pkshih@realtek.com commit a2fbf9e1e8acf89de8132d1df255e1ee0b8320fe Author: Dmitry Antipov Date: Tue Oct 31 20:13:24 2023 +0300 wifi: wilc1000: simplify wilc_scan() Simplify 'wilc_scan()' assuming 'struct wilc_priv *' is the only data passed to '(*scan_result)()' callback and thus avoid typeless 'void *' pointers in related code, including 'struct wilc_user_scan_req'. Compile tested only. Signed-off-by: Dmitry Antipov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231031171330.70399-2-dmantipov@yandex.ru commit 4859b08f197b11b35932fdb4f584b89ff5243ad9 Author: Dmitry Antipov Date: Tue Oct 31 20:13:23 2023 +0300 wifi: wilc1000: cleanup struct wilc_conn_info Remove set but otherwise unused 'ch' member of 'struct wilc_conn_info' and avoid typeless 'void *' pointers in '(*conn_result)()' callback. Likewise for 'wilc_parse_join_bss_param()'. Compile tested only. Signed-off-by: Dmitry Antipov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231031171330.70399-1-dmantipov@yandex.ru commit 40018a8fa9aa63ca5b26e803502138158fb0ff96 Author: Dan Carpenter Date: Mon Oct 30 12:03:23 2023 +0300 wifi: plfxlc: check for allocation failure in plfxlc_usb_wreq_async() Check for if the usb_alloc_urb() failed. Fixes: 68d57a07bfe5 ("wireless: add plfxlc driver for pureLiFi X, XL, XC devices") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/e8d4a19a-f251-4101-a89b-607345e938cb@moroto.mountain commit 65c02404380fb328e4d1fe40318ac6de0e63327a Author: Ville Syrjälä Date: Thu Oct 12 15:24:42 2023 +0300 drm/i915/gvt: Clean up zero initializers Just use a simple {} to zero initialize arrays/structs instead of the hodgepodge of stuff we are using currently. Cc: Zhenyu Wang Cc: Zhi Wang Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231012122442.15718-7-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit c610e841f19d57233062868f2408349e9ecade91 Author: Ville Syrjälä Date: Thu Sep 7 15:25:41 2023 +0300 drm/i915: Do plane/etc. updates more atomically across pipes Perform all the intel_pre_update_crtc() stuff for all pipes first, and only then do the intel_update_crtc() vblank evasion stuff for every pipe back to back. This should make it more likely that the plane updates from multiple pipes happen on the same frame (assuming the pipes are running in sync, eg. due to bigjoiner or port sync). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230907122541.32261-4-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit c39c93578106f035218078c300db6361cf6a326c Author: Ville Syrjälä Date: Thu Sep 7 15:25:40 2023 +0300 drm/i915: Split intel_update_crtc() into two parts Split intel_update_crtc() into two parts such that the first part performs all the non-vblank evasion preparatory stuff, and the second part just does the vblank evasion stuff. For now we just call these back to back so that there is no funcitonal change. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230907122541.32261-3-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit d08361e1f66381ba615852cb6155f028a52a0fa4 Author: Ville Syrjälä Date: Thu Sep 7 15:25:39 2023 +0300 drm/i915: Drop redundant !modeset check Since commit 7de5b6b54630 ("drm/i915: Don't flag both full modeset and fastset at the same time") intel_crtc_needs_fastset() and intel_crtc_needs_modeset() have been mutually exclusive. Drop the redundant check. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230907122541.32261-2-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 8d88e4cdce4f5c56de55174a4d32ea9c06f7fa66 Author: Jacek Lawrynowicz Date: Tue Oct 31 08:31:56 2023 +0100 accel/ivpu: Use GEM shmem helper for all buffers Use struct drm_gem_shmem_object as a base for struct ivpu_bo. This cuts by 50% the buffer management code. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231031073156.1301669-5-stanislaw.gruszka@linux.intel.com commit 48d45fac3940347becd290b96b2fc6d5ad8171f7 Author: Jacek Lawrynowicz Date: Tue Oct 31 08:31:55 2023 +0100 accel/ivpu: Remove support for uncached buffers Usages of DRM_IVPU_BO_UNCACHED should be replaced by DRM_IVPU_BO_WC. There is no functional benefit from DRM_IVPU_BO_UNCACHED if these buffers are never mapped to host VM. This allows to cut the buffer handling code in the kernel driver by half. Usage of DRM_IVPU_BO_UNCACHED buffers was removed from user-space driver and will not be part of first UMD release. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231031073156.1301669-4-stanislaw.gruszka@linux.intel.com commit 48aea7f2a2efae6a1bd201061c71a81b3f3b7e55 Author: Jacek Lawrynowicz Date: Tue Oct 31 08:31:54 2023 +0100 accel/ivpu: Fix locking in ivpu_bo_remove_all_bos_from_context() ivpu_bo_remove_all_bos_from_context() could race with ivpu_bo_free() when prime buffer was closed after vpu device was closed. Move the bo_list from context to vdev and use a dedicated lock to sync it. This list is not modified when BO is added/removed from a context. Also rename ivpu_bo_free_vpu_addr() to ivpu_bo_unbind() because this function does more then just free vpu_addr. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231031073156.1301669-3-stanislaw.gruszka@linux.intel.com commit b035224134626f506c1af73ca32bbc64dd2925ad Author: Jacek Lawrynowicz Date: Tue Oct 31 08:31:53 2023 +0100 accel/ivpu: Allocate vpu_addr in gem->open() callback Use gem->open() callback to simplify the code and prepare for gem_shmem conversion. It is called during handle creation for a gem object, during prime import and in BO_CREATE ioctl. Hence can be used for vpu_addr allocation. On the way remove unused bo->user_ptr field. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231031073156.1301669-2-stanislaw.gruszka@linux.intel.com commit 99831ab9ce46b1163ac66e92a04614da2da41b1b Author: Stanislav Lisovskiy Date: Tue Oct 24 04:09:25 2023 +0300 drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp. Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH. This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable. v2: - Fix operator precedence v3: - Added debug info about compressed bpps v4: - Don't try to intersect Sink input bpp and compressed bpps. v5: - Decrease step while looking for suitable compressed bpp to accommodate. v6: - Use helper for getting min and max compressed_bpp (Ankit) v7: - Fix checkpatch warning (Ankit) Signed-off-by: Stanislav Lisovskiy Signed-off-by: Ankit Nautiyal Reviewed-by: Ankit Nautiyal Reviewed-by: Arun R Murthy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-31-imre.deak@intel.com commit 3a5f80e4ce973c6702ec31e5823502860208e030 Author: Imre Deak Date: Tue Oct 24 04:09:24 2023 +0300 drm/i915/dp_mst: Check BW limitations only after all streams are computed After the previous patch the BW limits on the whole MST topology will be checked after computing the state for all the streams in the topology. Accordingly remove the check during the stream's encoder compute config step, to prevent failing an atomic commit due to a BW limit, if this can be resolved only by reducing the BW of other streams on the same MST link. Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-30-imre.deak@intel.com commit 36f579ffc6921408fd2e466a6930463bac56b926 Author: Imre Deak Date: Tue Oct 24 04:09:23 2023 +0300 drm/i915/dp_mst: Improve BW sharing between MST streams At the moment modesetting a stream CRTC will fail if the stream's BW along with the current BW of all the other streams on the same MST link is above the total BW of the MST link. Make the BW sharing more dynamic by trying to reduce the link bpp of one or more streams on the MST link in this case. When selecting a stream to reduce the BW for, take into account which link segment in the MST topology ran out of BW and which streams go through this link segment. For instance with A,B,C streams in the same MST topology A and B may share the BW of a link segment downstream of a branch device, stream C not downstream of the branch device, hence not affecting this BW. If this link segment's BW runs out one or both of stream A/B's BW will be reduced until their total BW is within limits. While reducing the link bpp for a given stream DSC may need to be enabled for it, which requires FEC on the whole MST link. Check for this condition and recompute the state for all streams taking the FEC overhead into account (on 8b/10b links). v2: - Rebase on s/min_bpp_pipes/min_bpp_reached_pipes/ change. Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-29-imre.deak@intel.com commit e37137380931ae971e0380ba4cea6b16843da953 Author: Imre Deak Date: Tue Oct 24 04:09:22 2023 +0300 drm/i915/dp_mst: Force modeset CRTC if DSC toggling requires it Enabling / disabling DSC decompression in the branch device downstream of the source may reset the whole branch device. To avoid this while the streams are still active, force a modeset on all CRTC/ports connected to this branch device. v2: - Check the CRTC state for each connector in the topology, instead of the CRTC being checked for a modeset requirement. (Ville) - Add DocBook for the new function. v3: - Rebased on a change not to use intel_modeset_pipes_in_mask_early(). Cc: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy (v1) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231107001505.3370108-8-imre.deak@intel.com commit 1e4bd5c14e4c72fc74a985e05fdbc735d2cf7566 Author: Imre Deak Date: Tue Oct 24 04:09:21 2023 +0300 drm/i915: Factor out function to clear pipe update flags Factor out a helper to clear the pipe update flags, used by a follow-up patch to modeset an MST topology. v2: - Move the intel_crtc_needs_modeset() check to the callers. (Ville) v3 (Ville): - Rename clear_pipe_update_flags_on_modeset_crtc() to intel_crtc_flag_modeset(). - Also set crtc_state->uapi.mode_changed in the function. - Leave out the unrelated change to use intel_modeset_pipes_in_mask_early(). Cc: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy (v1) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231107001505.3370108-7-imre.deak@intel.com commit b2608c6b3212e4258379c161d8657c526bda902c Author: Imre Deak Date: Tue Oct 24 04:09:20 2023 +0300 drm/i915/dp_mst: Enable MST DSC decompression for all streams Enable DSC decompression for all streams. In particular atm if a sink is connected to a last branch device that is downstream of the first branch device connected to the source, decompression is not enabled for it. Similarly it's not enabled if the sink supports this with the last branch device passing through the compressed stream to it. Enable DSC in the above cases as well. Since last branch devices may handle the decompression for multiple ports, toggling DSC needs to be refcounted, add this using the DSC AUX device as a reference. v2: - Fix refcounting, setting/clearing connector->dp.dsc_decompression_enabled always as needed. (Stan) - Make the refcounting more uniform for the SST vs. MST case. - Add state checks for connector->dp.dsc_decompression_enabled and connector crtc. - Sanitize connector DSC decompression state during HW setup. - s/use_count/ref_count/ v3: - Remove stale TODO: comment to set the actual decompression_aux. Cc: Stanislav Lisovskiy Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231107001505.3370108-6-imre.deak@intel.com commit 751dbac1a0235ea7303e5e76fade2762e8298907 Author: Imre Deak Date: Tue Oct 24 13:22:19 2023 +0300 drm/i915/dp_mst: Enable DSC passthrough Enable passing through DSC streams to the sink in last branch devices. v2: - Fix the DPCD register address while setting/clearing the passthrough flag. Reviewed-by: Stanislav Lisovskiy Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-25-imre.deak@intel.com commit 7c4631ff6233043b71b68c80f3b9f35510cdda33 Author: Imre Deak Date: Tue Oct 24 13:22:18 2023 +0300 drm/i915/dp: Enable DSC via the connector decompression AUX Enable DSC using the DSC AUX device stored for this purpose in the connector. For clarity add separate functions to enable/disable the decompression, since these sequences will diverge more in follow-up patches that also enable/disable DSC passthrough and on MST do the actual enabling/disabling only for the first/last user of the given AUX device. As a preparation for the latter refcounting change, also pass the atomic state to the functions. While at it set/clear only the DP_DECOMPRESSION_EN flag in the DP_DSC_ENABLE DPCD register, preserving the reserved register bits. Besides preserving the reserved register bits, the behavior stays as before, as DSC is still only enabled for the first MST stream (which a follow-up patch changes, enabling it for all streams). v2: - Add a helper function setting/clearing the decompression flag, preserving the reserved register bits. v3: - Add separate functions to enable/disable decompression and pass the atomic state to these. - Add DocBook for both functions. Reviewed-by: Stanislav Lisovskiy (v2) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-24-imre.deak@intel.com commit 503611c8a08ab660c718c295d26180e585058d95 Author: Imre Deak Date: Tue Oct 24 04:09:17 2023 +0300 drm/i915/dp_mst: Enable decompression in the sink from the MST encoder hooks Enable/disable the DSC decompression in the sink/branch from the MST encoder hooks. This prepares for an upcoming patch toggling DSC for each stream as needed, but for now keeps the current behavior, as DSC is only enabled for the first MST stream. v2: - Rebased on latest drm-tip. Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231107001505.3370108-5-imre.deak@intel.com commit 55eaef164174480df6827edeac15620f3cbcd52b Author: Imre Deak Date: Tue Oct 24 04:09:16 2023 +0300 drm/i915/dp_mst: Handle the Synaptics HBlank expansion quirk The Synaptics MST hubs expose some sink EDID modes with a reduced HBLANK period, presumedly to save BW, which the hub expands before forwarding the stream to the sink. In particular a 4k mode with a standard CVT HBLANK period is exposed with either a CVT reduced blank RBv1,v2 (80, 160 pixel) or a non-CVT 56 pixel HBLANK period. The DP standard describes the above HBLANK expansion functionality, but it requires enabling this explicitly, whereas these hubs apply the expansion transparently. In some TBT docks with such a Synaptics hub (DELL WD22TB4) the above modes will work okay until DSC decompression is enabled in the hub for the given sink, but after this the same mode will not work reliably in decompressed mode. In another TBT dock (Thinkpad 40B0) the above modes will not work in uncompressed/18bpp mode (regardless of whether DSC decompression was enabled before or not). As a workaround force enable DSC for such modes. Apply the WA when the HBLANK period is 300ns or below, matching the above tested modes with a 533.25MHz dotclock and maximum 160 HBLANK pixels. OTOH DSC for these modes will only work above a certain compressed bpp threshold which depends on the link rate, so apply this limit as well in the workaround. On platforms, pipe/port configurations where DSC is not supported, for instance on ICL where DSC/MST is still work-in-progress, limit the minimum link bpp to 24. Apply the workaround only for Synaptics hubs which support the HBLANK expansion. v2: - Apply the WA whenever the HBLANK period is 300ns or below. v3: - Clarify in the commit log the failure modes of the different docks. - Handle platforms/pipe/port configurations without DSC support. Reviewed-by: Stanislav Lisovskiy (v1) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231107001505.3370108-4-imre.deak@intel.com commit 8ab5a03643fc529f0e8663bc4d5b43f8f6885922 Author: Imre Deak Date: Tue Oct 24 04:09:15 2023 +0300 drm/i915/dp: Disable FEC ready flag in the sink Disable the FEC ready flag in the sink during a disabling modeset. Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-21-imre.deak@intel.com commit 6e916b35afa8a3729b254cdd839fa12618e8591f Author: Imre Deak Date: Tue Oct 24 04:09:14 2023 +0300 drm/i915/dp: Wait for FEC detected status in the sink As required by the DP standard wait for the sink to detect the FEC decode enabling symbol sent by the source. There is a difference between SST and MST when the source enables the FEC encoding: on SST this happens only after enabling the transcoder, whereas on MST it happens already after enabling the transcoder function (before enabling the transcoder). Wait for the detected status at the earliest spot accordingly. v2: - Wait for the FEC detected status on SST after the transcoder is enabled. Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-20-imre.deak@intel.com commit 0cfdf662d4ef71569c8b9a628defd51586e102c3 Author: Imre Deak Date: Tue Oct 24 04:09:13 2023 +0300 drm/i915/dp: Rename intel_ddi_disable_fec_state() to intel_ddi_disable_fec() Rename intel_ddi_disable_fec_state() to intel_ddi_disable_fec(), for symmetry with intel_ddi_enable_fec(). Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-19-imre.deak@intel.com commit b40887f8c8a874acad4158adfa2182b73db1fb31 Author: Imre Deak Date: Tue Oct 24 04:09:12 2023 +0300 drm/i915/dp_mst: Add missing DSC compression disabling Add the missing DSC compression disabling step for MST streams, similarly to how this is done for SST outputs. Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-18-imre.deak@intel.com commit aaa80e756e1cd8eb0561d7e244a9937fc23944d2 Author: Imre Deak Date: Tue Oct 24 04:09:11 2023 +0300 drm/i915/dp: Make sure the DSC PPS SDP is disabled whenever DSC is disabled Atm the DSC PPS SDP will stay enabled after enabling and disabling DSC. This leaves an output blank after switching off DSC on it. Make sure the SDP is disabled for an uncompressed output. v2: - Disable the SDP already during output disabling. (Ville) Cc: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-17-imre.deak@intel.com commit 53f468aa90091d3a75ff17b1c2f4874a9b862b38 Author: Imre Deak Date: Tue Oct 24 04:09:10 2023 +0300 drm/i915/dp_mst: Program the DSC PPS SDP for each stream Atm the DSC PPS SDP is programmed only if the first stream is compressed and then it's programmed only for the first stream. This left all other compressed streams blank. Program the SDP for all streams. v2: - Rebase on upstream include "intel_vdsc.h" change. Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231107001505.3370108-3-imre.deak@intel.com commit 5d78cd80efdd4ac221a0ccd884082280ddef6128 Author: Imre Deak Date: Tue Oct 24 04:09:09 2023 +0300 drm/i915/dp_mst: Add atomic state for all streams on pre-tgl platforms If an MST stream is modeset, its state must be checked along all the other streams on the same MST link, for instance to resolve a BW overallocation of a non-sink MST port or to make sure that the FEC is enabled/disabled the same way for all these streams. To prepare for that this patch adds all the stream CRTCs to the atomic state and marks them for modeset similarly to tgl+ platforms. (If the state computation doesn't change the state the CRTC is switched back to fastset mode.) So far on tgl+ this was required because all streams in the topology shared the master transcoder. For older platforms this didn't apply but adding all the state is required now on all platforms based on the above. v2: - Add code and commit log comment clarifying the requirements on old/new platforms. (Stan) - Rename the function based on the new semantic. (Ville) Cc: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-15-imre.deak@intel.com commit 4e0837a8d00aa349910a73a6e14102f4c5d81ed5 Author: Imre Deak Date: Tue Oct 24 04:09:08 2023 +0300 drm/i915/dp_mst: Account for FEC and DSC overhead during BW allocation Atm, the BW allocated for an MST stream doesn't take into account the DSC control symbol (EOC) and data alignment overhead on the local (first downstream) MST link (reflected by the data M/N/TU values) and - besides the above overheads - the FEC symbol overhead on 8b/10b remote (after a downstream branch device) MST links. In addition the FEC overhead used on the local link is a fixed amount, which only applies to certain modes, but not enough for all modes; add a code comment clarifying this. Fix the above by calculating the data M/N values with the total BW overhead (not including the SSC overhead, since this isn't enabled by the source device) and using this the PBN and TU values for the local link and PBN for remote links (including SSC, since this is mandatory for links after downstream branch devices). For now keep the current fixed FEC overhead as a minimum, since this is what bspec requires for audio functionality. Calculate the effective link BW in a clearer way, applying the channel coding efficiency based on the coding type. The calculation was correct for 8b/10b, but not for 128b/132b links; this patch leaves the behavior for this unchanged, leaving the fix for a follow-up. v2: - Fix TU size programmed to the HW, making it match the payload size programmed to the payload table. v3: - Add code comment about the connection between the payload's size in the payload table and the corresponding PBN value. (Ville) - Add WARN_ON(remote_m_n.tu < dp_m_n.tu). (Ville) - Add code comment about factors not accounted for by the BW calculation in intel_dp_mst_mode_valid_ctx() (and compute config). (Ville) - Simplify calculation of PBN to remote_m_n.tu * mst_state->pbn_div. Cc: Ville Syrjälä Reviewed-by: Stanislav Lisovskiy (v1) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231107001505.3370108-2-imre.deak@intel.com commit 7ff2090c7c98644ea04be7ff8e304b74f47cf9dc Author: Imre Deak Date: Tue Oct 24 04:09:07 2023 +0300 drm/i915/dp: Pass actual BW overhead to m_n calculation A follow-up MST patch will need to specify the total BW allocation overhead, prepare for that here by passing the amount of overhead to intel_link_compute_m_n(), keeping the existing behavior. v2: - Fix passing the correct crtc_state->fec_enable param in intel_dp_mst_compute_link_config() / intel_dp_dsc_mst_compute_link_config(). Reviewed-by: Stanislav Lisovskiy (v1) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-13-imre.deak@intel.com commit 3e306daab76ac32b3496583e1db43baabe8a062e Author: Imre Deak Date: Tue Oct 24 04:09:06 2023 +0300 drm/i915/dp: Specify the FEC overhead as an increment vs. a remainder A follow-up patch will add up all the overheads on a DP link, where it makes more sense to specify each overhead factor in terms of the added overhead amount vs. the reciprocal remainder (of usable BW remaining after deducting the overhead). Prepare for that here, keeping the existing behavior. Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-12-imre.deak@intel.com commit d91680efcaaba6cc2e7cd83e4aa5e1d0f1c6f684 Author: Imre Deak Date: Tue Oct 24 04:09:05 2023 +0300 drm/i915/dp_mst: Enable FEC early once it's known DSC is needed Enable FEC in crtc_state, as soon as it's known it will be needed by DSC. This fixes the calculation of BW allocation overhead, in case DSC is enabled by falling back to it during the encoder compute config phase (vs. enabling FEC due to DSC being enabled on other streams). v2: - Enable FEC only in intel_dp_mst_find_vcpi_slots_for_bpp(), since only by that will crtc_state->port_clock be set, which in turn is needed by intel_dp_is_uhbr(). Reviewed-by: Stanislav Lisovskiy (v1) Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-11-imre.deak@intel.com commit c1d6a22b7219bd52c66e9e038a282ba79f04be1f Author: Imre Deak Date: Tue Oct 24 13:22:17 2023 +0300 drm/dp: Add helpers to calculate the link BW overhead Add helpers drivers can use to calculate the BW allocation overhead - due to SSC, FEC, DSC and data alignment on symbol cycles - and the channel coding efficiency - due to the 8b/10b, 128b/132b encoding. On 128b/132b links the FEC overhead is part of the coding efficiency, so not accounted for in the BW allocation overhead. The drivers can use these functions to calculate a ratio, controlling the stream symbol insertion rate of the source device in each SST TU or MST MTP frame. Drivers can calculate this m/n = (pixel_data_rate * drm_dp_bw_overhead()) / (link_data_rate * drm_dp_bw_channel_coding_efficiency()) ratio for a given link and pixel stream and with that the slots_per_mtp = CEIL(64 * m / n) allocated slots per MTP for the stream in a link frame and with that the pbn = slots_per_mtp * drm_mst_get_pbn_divider() allocated PBNs for the stream on the MST link path. Take drm_dp_bw_overhead() into use in drm_dp_calc_pbn_mode(), for drivers calculating the PBN value directly. v2: - Add dockbook description to drm_dp_bw_channel_coding_efficiency(). (LKP). - Clarify the way m/n ratio is calculated in the commit log. v3: - Fix compile breakage for !CONFIG_BACKLIGHT_CLASS_DEVICE. (LKP) - Account for FEC_PM overhead (+ 0.0015625 %), add comment with the formula to calculate the total FEC overhead. (Ville) v4: - Rename DRM_DP_OVERHEAD_SSC to DRM_DP_OVERHEAD_SSC_REF_CLK. (Ville) v5: - Clarify in the commit log what MTP means. - Simplify the commit log's formula to calculate PBN. Cc: Lyude Paul Cc: Ville Syrjälä Cc: kernel test robot Cc: dri-devel@lists.freedesktop.org Reviewed-by: Stanislav Lisovskiy (v2) Acked-by: Maxime Ripard Reviewed-by: Lyude Paul Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231107001505.3370108-1-imre.deak@intel.com commit a6315ec25eed0e9a70cb1cfc43cf694911546a5c Author: Imre Deak Date: Tue Oct 24 13:22:16 2023 +0300 drm/dp_mst: Add HBLANK expansion quirk for Synaptics MST hubs Add a quirk for Synaptics MST hubs, which require a workaround - at leat on i915 - for some modes, on which the hub applies HBLANK expansion. These modes will only work by enabling DSC decompression for them, a follow-up patch will do this in i915. v2: - Fix the quirk name in its DocBook description. Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Reviewed-by: Stanislav Lisovskiy Acked-by: Maxime Ripard Reviewed-by: Lyude Paul Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-9-imre.deak@intel.com commit b348150406564595cf6c1be388e9797fa97c2a5d Author: Imre Deak Date: Tue Oct 24 04:09:02 2023 +0300 drm/dp: Add DP_HBLANK_EXPANSION_CAPABLE and DSC_PASSTHROUGH_EN DPCD flags Add the DPCD flag to enable DSC passthrough in a last branch device, used in a follow-up i915 patch. Also add a flag to detect HBLANK expansion support in a branch device, used by a workaround in a follow-up i915 patch. Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Reviewed-by: Stanislav Lisovskiy Acked-by: Maxime Ripard Reviewed-by: Lyude Paul Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-8-imre.deak@intel.com commit 6f1aa39d6497d4d27f8ee132e9cb8bdbfe7c0674 Author: Imre Deak Date: Tue Oct 24 04:09:01 2023 +0300 drm/dp_mst: Allow DSC in any Synaptics last branch device The Synaptics MST branch devices support DSC decompression on all their output ports, provided that they are last branch devices (with their output ports connected to the sinks). The Thinkpad 40B0 TBT dock for instance has two such branch devices, a secondary one connected to one of the output ports of the primary; hence the decompression needs to be enabled in both branch devices to enable decompression for all the sinks. Based on the above add support for enabling decompression in last Synaptics branch devices. Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Reviewed-by: Stanislav Lisovskiy Acked-by: Maxime Ripard Reviewed-by: Lyude Paul Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-7-imre.deak@intel.com commit d075bca47c18779301fee5a9d140f146cde4b532 Author: Imre Deak Date: Tue Oct 24 04:09:00 2023 +0300 drm/dp_mst: Swap the order of checking root vs. non-root port BW limitations drm_dp_mst_atomic_check_mgr() should check for BW limitation starting from sink ports continuing towards the root port, so that drivers can use the @failing_port returned to resolve a BW overallocation in an ideal way. For instance from streams A,B,C in a topology A,B going through @failing_port and C not going through it, a BW overallocation of A,B due to a limit of the port must be resolved first before considering the limits of other ports closer to the root port. This way can avoid reducing the BW of stream C unnecessarily due to a BW limit closer to the root port. Based on the above swap the order of the BW check for the root port and the check for all the ports downstream of it (the latter going through the topology already in the sink->root port direction). Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Reviewed-by: Lyude Paul Reviewed-by: Stanislav Lisovskiy Acked-by: Maxime Ripard Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-6-imre.deak@intel.com commit 1cd0a5ea427931016c3e95b20dc20f17604937cc Author: Imre Deak Date: Tue Oct 24 04:08:59 2023 +0300 drm/dp_mst: Factor out a helper to check the atomic state of a topology manager Factor out a helper to check the atomic state for one MST topology manager, returning the MST port where the BW limit check has failed. This will be used in a follow-up patch by the i915 driver to improve the BW sharing between MST streams. Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Reviewed-by: Lyude Paul Acked-by: Maxime Ripard Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-5-imre.deak@intel.com commit 9dcf67deeab6fbc4984175278b1b2c59881dca52 Author: Imre Deak Date: Tue Oct 24 04:08:58 2023 +0300 drm/dp_mst: Add helper to determine if an MST port is downstream of another port Add drm_dp_mst_port_downstream_of_parent() required by the i915 driver in a follow-up patch to resolve a BW overallocation of MST streams going through a given MST port. Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Reviewed-by: Lyude Paul Acked-by: Maxime Ripard Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-4-imre.deak@intel.com commit 7707dd6022593f3edd8e182e7935870cf326f874 Author: Ville Syrjälä Date: Tue Oct 24 04:08:57 2023 +0300 drm/dp_mst: Fix fractional DSC bpp handling The current code does '(bpp << 4) / 16' in the MST PBN calculation, but that is just the same as 'bpp' so the DSC codepath achieves absolutely nothing. Fix it up so that the fractional part of the bpp value is actually used instead of truncated away. 64*1006 has enough zero lsbs that we can just shift that down in the dividend and thus still manage to stick to a 32bit divisor. And while touching this, let's just make the whole thing more straightforward by making the passed in bpp value .4 binary fixed point always, instead of having to pass in different things based on whether DSC is enabled or not. v2: - Fix DSC kunit test cases. Cc: Manasi Navare Cc: Lyude Paul Cc: Harry Wentland Cc: David Francis Cc: Mikita Lipski Cc: Alex Deucher Fixes: dc48529fb14e ("drm/dp_mst: Add PBN calculation for DSC modes") Signed-off-by: Ville Syrjälä [Imre: Fix kunit test cases] Acked-by: Maxime Ripard Reviewed-by: Lyude Paul Acked-by: Harry Wentland Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-3-imre.deak@intel.com commit 560ea72c76eb6d0c59f77580414e64cc09f1093d Author: Imre Deak Date: Mon Oct 30 01:13:08 2023 +0200 drm/i915/dp_mst: Fix race between connector registration and setup After drm_connector_init() is called the connector is visible to the rest of the kernel via the drm_mode_config::connector_list. Make sure that the DSC AUX device and capabilities are setup by that time. Another race condition is adding the connector to the connector list before drm_connector_helper_add() sets the connector helper functions. That's an unrelated issue, for which the fix is for a follow-up. One solution would be adding the connector to the connector list only during its registration in drm_connector_register(). Cc: Stanislav Lisovskiy Cc: Ville Syrjälä Fixes: 808b43fa7e56 ("drm/i915/dp_mst: Set connector DSC capabilities and decompression AUX") Reviewed-by: Stanislav Lisovskiy Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-2-imre.deak@intel.com commit 89d04995f76ce8318fe752feb33b1a45893b1a38 Author: Emma Anholt Date: Tue Oct 31 11:16:48 2023 -0700 MAINTAINERS: Drop Emma Anholt from all M lines. I am not active in the Linux kernel and don't want to see patches. Signed-off-by: Emma Anholt Acked-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20231031181648.48675-1-emma@anholt.net commit ef5b6a542b1dbb718226a5f8208be09ef405983d Author: Paolo Bonzini Date: Wed Nov 8 04:40:35 2023 -0500 selftests: kvm/s390x: use vm_create_barebones() This function does the same but makes it clearer why one would use the "____"-prefixed version of vm_create(). Signed-off-by: Paolo Bonzini commit bc8d6a9df99038f61adf2881ad9f717abe414e06 Author: Luben Tuikov Date: Thu Nov 2 18:17:20 2023 -0400 drm/sched: Don't disturb the entity when in RR-mode scheduling Don't call drm_sched_select_entity() in drm_sched_run_job_queue(). In fact, rename __drm_sched_run_job_queue() to just drm_sched_run_job_queue(), and let it do just that, schedule the work item for execution. The problem is that drm_sched_run_job_queue() calls drm_sched_select_entity() to determine if the scheduler has an entity ready in one of its run-queues, and in the case of the Round-Robin (RR) scheduling, the function drm_sched_rq_select_entity_rr() does just that, selects the _next_ entity which is ready, sets up the run-queue and completion and returns that entity. The FIFO scheduling algorithm is unaffected. Now, since drm_sched_run_job_work() also calls drm_sched_select_entity(), then in the case of RR scheduling, that would result in drm_sched_select_entity() having been called twice, which may result in skipping a ready entity if more than one entity is ready. This commit fixes this by eliminating the call to drm_sched_select_entity() from drm_sched_run_job_queue(), and leaves it only in drm_sched_run_job_work(). v2: Rebased on top of Tvrtko's renames series of patches. (Luben) Add fixes-tag. (Tvrtko) Signed-off-by: Luben Tuikov Fixes: f7fe64ad0f22ff ("drm/sched: Split free_job into own work item") Reviewed-by: Matthew Brost Reviewed-by: Danilo Krummrich Link: https://patchwork.freedesktop.org/patch/msgid/20231107041020.10035-2-ltuikov89@gmail.com commit 1d9e6bc97eabac150b775d91d9a656ba24e92014 Author: Gustavo Sousa Date: Mon Nov 6 17:19:59 2023 -0300 drm/i915/xelpmp: Add Wa_16021867713 This workaround applies to all steppings of Xe_LPM+. Implement the KMD part. v2: - Put the definition of VDBOX_CGCTL3F1C() in the correct sort order. (Matt) Reviewed-by: Matt Roper Signed-off-by: Gustavo Sousa Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20231106201959.156943-1-gustavo.sousa@intel.com commit 607a2c64e879580ef361af65d6052367057bee14 Author: Jani Nikula Date: Thu Nov 2 17:52:23 2023 +0200 drm/i915: move display spinlock init to display code The gem code has no business accessing i915->display directly. Signed-off-by: Jani Nikula Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20231102155223.2298316-2-jani.nikula@intel.com commit 3fef3e6ff86a405e51f4a7072109147b4b47caca Author: Jani Nikula Date: Thu Nov 2 17:52:22 2023 +0200 drm/i915: move display mutex inits to display code The core code has no business accessing i915->display directly. These could be further spread to respective files, but this is a start. Signed-off-by: Jani Nikula Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20231102155223.2298316-1-jani.nikula@intel.com commit c015fb6d01adb616fb54824feb55ce5ab18e8ca1 Author: Jacek Lawrynowicz Date: Mon Nov 6 14:08:26 2023 +0100 accel/ivpu: Fix compilation with CONFIG_PM=n Use pm_runtime_status_suspended() instead of dev->power.runtime_status field that is not available without PM. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/all/20231106130827.1600948-1-jacek.lawrynowicz@linux.intel.com commit 2b981d57e480e024cde2a0ecb6edee28a8ec39d6 Author: Mika Kahola Date: Mon Nov 6 13:42:28 2023 +0200 drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier Display driver shall read DPCD 00071h[3:1] during configuration to get PSR setup time. This register provides the setup time requirement on the VSC SDP entry packet. If setup time cannot be met with the current timings (e.g., PSR setup time + other blanking requirements > blanking time), driver should enable sending VSC SDP one frame earlier before sending the capture frame. BSpec: 69895 (PSR Entry Setup Frames 17:16) v2: Write frames before su entry to correct register (Ville, Jouni) Move frames before su entry calculation to it's own function (Ville, Jouni) Rename PSR Entry Setup Frames register to indicate Lunarlake specificity (Jouni) v3: Modify setup entry frames calculation function to return the actual frames (Ville) Match comment with actual implementation (Jouni) v4: Drop "set" from function naming (Jouni, Ville) Use i915 instead of dev_priv (Jouni) Signed-off-by: Mika Kahola Reviewed-by: Jouni Högander Link: https://patchwork.freedesktop.org/patch/msgid/20231106114228.146574-1-mika.kahola@intel.com commit ac9cd7245fffa0fc053afce3b345469e5afa533a Author: Kan Liang Date: Wed Oct 25 13:16:25 2023 -0700 perf header: Support num and width of branch counters To support the branch counters feature, the information of the maximum number of supported counters and the width of the counters is exposed in the sysfs caps folder. The perf tool can use the information to parse the logged counters in each branch. Store the information in the perf_env for later usage. Reviewed-by: Ian Rogers Signed-off-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tinghao Zhang Link: https://lore.kernel.org/r/20231025201626.3000228-7-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 76db7aab1fca6688ddf9f388157521c442e0ffb8 Author: Kan Liang Date: Wed Oct 25 13:16:24 2023 -0700 tools headers UAPI: Sync include/uapi/linux/perf_event.h header with the kernel Sync the new sample type for the branch counters feature. Signed-off-by: Kan Liang Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Bayduraev Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tinghao Zhang Link: https://lore.kernel.org/r/20231025201626.3000228-6-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 34df0a031d8f3488fe72627b041a1f82437fa6ec Author: Jonathan Cavitt Date: Thu Nov 2 10:58:31 2023 -0700 drm/i915/gt: Temporarily disable CPU caching into DMA for MTL FIXME: It is suspected that some Address Translation Service (ATS) issue on IOMMU is causing CAT errors to occur on some MTL workloads. Applying a write barrier to the ppgtt set entry functions appeared to have no effect, so we must temporarily use I915_MAP_WC in the map_pt_dma class of functions on MTL until a proper ATS solution is found. Signed-off-by: Jonathan Cavitt CC: Chris Wilson Reviewed-by: Radhakrishna Sripada Acked-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231102175831.872763-1-jonathan.cavitt@intel.com commit 27d9620e9a9a6bc27a646b464b85860d91e21af3 Author: Dario Binacchi Date: Mon Oct 23 11:05:56 2023 +0200 drm/panel: nt35510: fix typo Replace 'HFP' with 'HBP'. Fixes: 899f24ed8d3a ("drm/panel: Add driver for Novatek NT35510-based panels") Signed-off-by: Dario Binacchi Reviewed-by: Neil Armstrong Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20231023090613.1694133-1-dario.binacchi@amarulasolutions.com commit 509433d8146c64ca9e0bcc370ec910821fffe80c Author: Maíra Canal Date: Tue Sep 5 18:06:35 2023 -0300 drm/v3d: Expose the total GPU usage stats on sysfs The previous patch exposed the accumulated amount of active time per client for each V3D queue. But this doesn't provide a global notion of the GPU usage. Therefore, provide the accumulated amount of active time for each V3D queue (BIN, RENDER, CSD, TFU and CACHE_CLEAN), considering all the jobs submitted to the queue, independent of the client. This data is exposed through the sysfs interface, so that if the interface is queried at two different points of time the usage percentage of each of the queues can be calculated. Co-developed-by: Jose Maria Casanova Crespo Signed-off-by: Jose Maria Casanova Crespo Signed-off-by: Maíra Canal Acked-by: Jose Maria Casanova Crespo Reviewed-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20230905213416.1290219-3-mcanal@igalia.com commit 09a93cc4f7d1893777f6b788bffe60d64e4d5df7 Author: Maíra Canal Date: Tue Sep 5 18:06:34 2023 -0300 drm/v3d: Implement show_fdinfo() callback for GPU usage stats This patch exposes the accumulated amount of active time per client through the fdinfo infrastructure. The amount of active time is exposed for each V3D queue: BIN, RENDER, CSD, TFU and CACHE_CLEAN. In order to calculate the amount of active time per client, a CPU clock is used through the function local_clock(). The point where the jobs has started is marked and is finally compared with the time that the job had finished. Moreover, the number of jobs submitted to each queue is also exposed on fdinfo through the identifier "v3d-jobs-". Co-developed-by: Jose Maria Casanova Crespo Signed-off-by: Jose Maria Casanova Crespo Signed-off-by: Maíra Canal Acked-by: Jose Maria Casanova Crespo Reviewed-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20230905213416.1290219-3-mcanal@igalia.com commit ab67821fa9e01ff35790b8bbf256c1b65c3f628f Author: Imre Deak Date: Thu Nov 2 21:44:34 2023 +0200 drm/i915/dp_mst: Disable DSC on ICL MST outputs Enabling DSC on ICL MST outputs is broken leading to FIFO pipe / transcoder underruns and blank screen. On TGL+ platforms MST/DSC works - after fixing the known issues in [1] - however to make this work on ICL requires more work. So far DSC on MST probably didn't get enabled for users - due to an issue fixed by [2] - but after fixing that, DSC could get enabled, leading to a blank screen in ICL/MST configurations which do work atm. To prevent this disable MST/DSC on ICL for now. [1] https://lore.kernel.org/all/20231030155843.2251023-1-imre.deak@intel.com [2] https://lore.kernel.org/all/20231030155843.2251023-31-imre.deak@intel.com v2 (Ville): - Use DISPLAY_VER >= 12 instead of > 11. - Explain the ICL DSC issue in code comment. Cc: Stanislav Lisovskiy Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20231102194434.2634786-1-imre.deak@intel.com commit 5faf6e1853d30d113ebc9977e015d0152e5e1970 Author: Tvrtko Ursulin Date: Wed Sep 27 14:38:37 2023 +0100 drm: Do not round to megabytes for greater than 1MiB sizes in fdinfo stats It is better not to lose precision and not revert to 1 MiB size granularity for every size greater than 1 MiB. Sizes in KiB should not be so troublesome to read (and in fact machine parsing is I expect the norm here), they align with other api like /proc/meminfo, and they allow writing tests for the interface without having to embed drm.ko implementation knowledge into them. (Like knowing that minimum buffer size one can use for successful verification has to be 1MiB aligned, and on top account for any pre-existing memory utilisation outside of driver's control.) But probably even more importantly I think that it is just better to show the accurate sizes and not arbitrary lose precision for a little bit of a stretched use case of eyeballing fdinfo text directly. Signed-off-by: Tvrtko Ursulin Cc: Rob Clark Cc: Adrián Larumbe Cc: steven.price@arm.com Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20230927133843.247957-2-tvrtko.ursulin@linux.intel.com Signed-off-by: Maxime Ripard commit 70a3cbbe620ee66afb0c066624196077767e61b2 Author: Nirmoy Das Date: Thu Oct 26 14:56:36 2023 +0200 drm/i915/tc: Fix -Wformat-truncation in intel_tc_port_init Fix below compiler warning: intel_tc.c:1879:11: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 3 [-Werror=format-truncation=] "%c/TC#%d", port_name(port), tc_port + 1); ^~ intel_tc.c:1878:2: note: ‘snprintf’ output between 7 and 17 bytes into a destination of size 8 snprintf(tc->port_name, sizeof(tc->port_name), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "%c/TC#%d", port_name(port), tc_port + 1); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ v2: use kasprintf(Imre) v3: use const for port_name, and fix tc mem leak(Imre) Fixes: 3eafcddf766b ("drm/i915/tc: Move TC port fields to a new intel_tc_port struct") Cc: Mika Kahola Cc: Imre Deak Cc: Jani Nikula Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda Reviewed-by: Imre Deak Reviewed-by: Mika Kahola Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231026125636.5080-1-nirmoy.das@intel.com commit 22d54ab6596ce4693c8d8b38371136067310a603 Author: Tvrtko Ursulin Date: Thu Nov 2 09:32:48 2023 +0000 drm/i915: Move for_each_engine* out of i915_drv.h Iterators operate on struct intel_gt so lets move it to intel_gt.h in order to make i915_drv.h less of a dumping ground for stuff. Signed-off-by: Tvrtko Ursulin Suggested-by: Jani Nikula Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231102093248.362659-2-tvrtko.ursulin@linux.intel.com commit 15c28f0fc800a93801d56f164f1c4124b068ee58 Author: Tvrtko Ursulin Date: Thu Nov 2 09:32:47 2023 +0000 drm/i915: Remove unused for_each_uabi_class_engine Unused macro after 99919be74aa3 ("drm/i915/gem: Zap the i915_gem_object_blt code") removed some code. Signed-off-by: Tvrtko Ursulin Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231102093248.362659-1-tvrtko.ursulin@linux.intel.com commit 27b086382c22efb7e0a16442f7bdc2e120108ef3 Author: Kunwu Chan Date: Fri Nov 3 11:09:22 2023 +0000 drm/i915: Fix potential spectre vulnerability Fix smatch warning: drivers/gpu/drm/i915/gem/i915_gem_context.c:847 set_proto_ctx_sseu() warn: potential spectre issue 'pc->user_engines' [r] (local cap) Fixes: d4433c7600f7 ("drm/i915/gem: Use the proto-context to handle create parameters (v5)") Cc: # v5.15+ Signed-off-by: Kunwu Chan Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231103110922.430122-1-tvrtko.ursulin@linux.intel.com commit bda4a7ab26725081e222e71e00a98f4462247216 Author: Ville Syrjälä Date: Wed Nov 1 13:42:12 2023 +0200 drm/i915/dsi: Extract port_ctrl_reg() The code to determine the pre-ICL DSI port control register is repeated several times. Consolidate. vlv_dsi_clear_device_ready() is left with the open-coded version due to the weirdness with port A vs. C on VLV/CHV. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231101114212.9345-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit cf6e11650395fd27fabff294b95225886b7a9f8e Author: Ville Syrjälä Date: Wed Nov 1 13:42:11 2023 +0200 drm/i915/dsi: Remove dead GLK checks GLK has its own glk_dsi_clear_device_ready() so remove the dead GLK checks from vlv_dsi_clear_device_ready(). Sadly BXT still uses vlv_dsi_clear_device_ready() so the code still looks like a mess due to the difference in VLV/CHV vs. BXT port A/C shenanigans. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231101114212.9345-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit e5aaad610f296a79bc1096b73a31013ee0d43240 Author: Ville Syrjälä Date: Wed Nov 1 13:42:10 2023 +0200 drm/i915: Extract mchbar_reg() Stop repeating the same logic to determine the correct config space register for MCHBAR. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231101114212.9345-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit f18020a5bd23b5f9b5b406b70198a5e51af67df0 Author: Ville Syrjälä Date: Wed Nov 1 13:42:09 2023 +0200 drm/i915: Stop using a 'reg' variable 'reg' is a very non-descriptive name. Just get rid of the silly local variable and spell out the full register name always. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231101114212.9345-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit a379bf3d14602067812f219bd852ff89dff31133 Author: Ville Syrjälä Date: Wed Nov 1 13:42:08 2023 +0200 drm/i915: Extract hsw_chicken_trans_reg() We have the same code to determine the CHICKEN_TRANS register offset sprinkled in a dozen places. Hoover it up into a small helper. TODO: find a better home for this Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231101114212.9345-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit a12480855ecbba6c7473c170d91c7bf41701a38c Author: Jouni Högander Date: Thu Nov 2 13:22:19 2023 +0200 drm/i915/display: Use intel_bo_to_drm_bo instead of obj->base We are preparing for Xe. Xe_bo doesn't have obj->base. Due to this use intel_bo_to_drm_bo instead in intel_prepare_plane_fb. Signed-off-by: Jouni Högander Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231102112219.1039362-1-jouni.hogander@intel.com commit f12af4c461fb6cd5ed7b48f8b4d09b22eb19fcc5 Author: Tvrtko Ursulin Date: Thu Nov 2 10:55:38 2023 +0000 drm/sched: Drop suffix from drm_sched_wakeup_if_can_queue Because a) helper is exported to other parts of the scheduler and b) there isn't a plain drm_sched_wakeup to begin with, I think we can drop the suffix and by doing so separate the intimiate knowledge between the scheduler components a bit better. Signed-off-by: Tvrtko Ursulin Cc: Luben Tuikov Cc: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20231102105538.391648-6-tvrtko.ursulin@linux.intel.com Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit 35a4279d42db534ad71a3a598029a53f22856f93 Author: Tvrtko Ursulin Date: Thu Nov 2 10:55:37 2023 +0000 drm/sched: Rename drm_sched_run_job_queue_if_ready and clarify kerneldoc "If ready" is not immediately clear what it means - is the scheduler ready or something else? Drop the suffix, clarify kerneldoc, and employ the same naming scheme as in drm_sched_run_free_queue: - drm_sched_run_job_queue - enqueues if there is something to enqueue *and* scheduler is ready (can queue) - __drm_sched_run_job_queue - low-level helper to simply queue the job Signed-off-by: Tvrtko Ursulin Cc: Luben Tuikov Cc: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20231102105538.391648-5-tvrtko.ursulin@linux.intel.com Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit 67dd1d8c9f6543661720b9a89e28a25488cb8753 Author: Tvrtko Ursulin Date: Thu Nov 2 10:55:36 2023 +0000 drm/sched: Rename drm_sched_free_job_queue to be more descriptive The current name makes it sound like helper will free a queue, while what it does is it enqueues the free job worker. Rename it to drm_sched_run_free_queue to align with existing drm_sched_run_job_queue. Despite that creating an illusion there are two queues, while in reality there is only one, at least it creates a consistent naming for the two enqueuing helpers. At the same time simplify the "if done" helper by dropping the suffix and adding a double underscore prefix to the one which just enqueues. Signed-off-by: Tvrtko Ursulin Cc: Luben Tuikov Cc: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20231102105538.391648-4-tvrtko.ursulin@linux.intel.com Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit e608d9f7ac1a94a4a63d1ef2b37dd80669ad828d Author: Tvrtko Ursulin Date: Thu Nov 2 10:55:35 2023 +0000 drm/sched: Move free worker re-queuing out of the if block Whether or not there are more jobs to clean up does not depend on the existance of the current job, given both drm_sched_get_finished_job and drm_sched_free_job_queue_if_done take and drop the job list lock. Therefore it is confusing to make it read like there is a dependency. Signed-off-by: Tvrtko Ursulin Cc: Luben Tuikov Cc: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20231102105538.391648-3-tvrtko.ursulin@linux.intel.com Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit 7abbbe2694b3d4fd366dc91934f42c047a6d282d Author: Tvrtko Ursulin Date: Thu Nov 2 10:55:34 2023 +0000 drm/sched: Rename drm_sched_get_cleanup_job to be more descriptive "Get cleanup job" makes it sound like helper is returning a job which will execute some cleanup, or something, while the kerneldoc itself accurately says "fetch the next _finished_ job". So lets rename the helper to be self documenting. Signed-off-by: Tvrtko Ursulin Cc: Luben Tuikov Cc: Matthew Brost Link: https://patchwork.freedesktop.org/patch/msgid/20231102105538.391648-2-tvrtko.ursulin@linux.intel.com Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit 451eaa1a614c911f5a51078dcb68022874e4cb12 Author: Ville Syrjälä Date: Tue Oct 31 18:08:00 2023 +0200 drm/i915: Bump GLK CDCLK frequency when driving multiple pipes On GLK CDCLK frequency needs to be at least 2*96 MHz when accessing the audio hardware. Currently we bump the CDCLK frequency up temporarily (if not high enough already) whenever audio hardware is being accessed, and drop it back down afterwards. With a single active pipe this works just fine as we can switch between all the valid CDCLK frequencies by changing the cd2x divider, which doesn't require a full modeset. However with multiple active pipes the cd2x divider trick no longer works, and thus we end up blinking all displays off and back on. To avoid this let's just bump the CDCLK frequency to >=2*96MHz whenever multiple pipes are active. The downside is slightly higher power consumption, but that seems like an acceptable tradeoff. With a single active pipe we can stick to the current more optiomal (from power comsumption POV) behaviour. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9599 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231031160800.18371-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 851bbccf6b0c152d98ecf0ec83d75fc97aebf43c Author: Arnaldo Carvalho de Melo Date: Wed Oct 11 18:14:52 2023 -0300 perf build: Warn about missing libelf before warning about missing libbpf As libelf is a requirement for libbpf if it is not available, as in some container build tests where NO_LIBELF=1 is used, then better warn about the most basic library first. Ditto for libz, check its availability before libbpf too. Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZUEehyDk0FkPnvMR@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c8e3ade38bc6545faece71cc6c642ad744d4cea3 Author: Arnaldo Carvalho de Melo Date: Fri Oct 6 18:11:05 2023 -0300 perf tests make: Remove the last egrep call, use 'grep -E' instead One last case, caught while testing with amazonlinux:2, centos:stream, etc: 4 7.28 amazonlinux:2 : FAIL egrep: warning: egrep is obsolescent; using grep -E gcc version 7.3.1 20180712 (Red Hat 7.3.1-17) (GCC) 8 13.87 centos:stream : FAIL egrep: warning: egrep is obsolescent; using grep -E Reviewed-by: Guilherme Amadio Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZUEdtblE8qDAQkBK@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3b511278b6ef514b3ae3d99ff62947cddd434479 Author: Pranjal Ramajor Asha Kanojiya Date: Fri Oct 27 10:43:30 2023 -0600 accel/qaic: Support for 0 resize slice execution in BO Add support to partially execute a slice which is resized to zero. Executing a zero size slice in a BO should mean that there is no DMA transfers involved but you should still configure doorbell and semaphores. For example consider a BO of size 18K and it is sliced into 3 6K slices and user calls partial execute ioctl with resize as 10K. slice 0 - size is 6k and offset is 0, so resize of 10K will not cut short this slice hence we send the entire slice for execution. slice 1 - size is 6k and offset is 6k, so resize of 10K will cut short this slice and only the first 4k should be DMA along with configuring doorbell and semaphores. slice 2 - size is 6k and offset is 12k, so resize of 10k will cut short this slice and no DMA transfer would be involved but we should would configure doorbell and semaphores. This change begs to change the behavior of 0 resize. Currently, 0 resize partial execute ioctl behaves exactly like execute ioctl i.e. no resize. After this patch all the slice in BO should behave exactly like slice 2 in above example. Refactor copy_partial_exec_reqs() to make it more readable and less complex. Signed-off-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231027164330.11978-1-quic_jhugo@quicinc.com commit 44793c6a5b784f1f25608e3773fd40e011c63391 Author: Carl Vanderlip Date: Fri Oct 27 12:08:10 2023 -0600 accel/qaic: Quiet array bounds check on DMA abort message Current wrapper is right-sized to the message being transferred; however, this is smaller than the structure defining message wrappers since the trailing element is a union of message/transfer headers of various sizes (8 and 32 bytes on 32-bit system where issue was reported). Using the smaller header with a small message (wire_trans_dma_xfer is 24 bytes including header) ends up being smaller than a wrapper with the larger header. There are no accesses outside of the defined size, however they are possible if the larger union member is referenced. Abort messages are outside of hot-path and changing the wrapper struct would require a larger rewrite, so having the memory allocated to the message be 8 bytes too big is acceptable. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202310182253.bcb9JcyJ-lkp@intel.com/ Signed-off-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231027180810.4873-1-quic_jhugo@quicinc.com commit 5fbae6874c92eec51cdcdcb68a4bafb535c066bf Author: Dorcas AnonoLitunya Date: Fri Oct 27 20:47:45 2023 +0300 drm/i915/gt: Remove prohibited space after opening parenthesis Removes space after opening parenthesis. Fixes the checkpatch.pl error: ERROR: space prohibited after that opening parenthesis '(' Signed-off-by: Dorcas AnonoLitunya Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231027174745.4058-1-anonolitunya@gmail.com commit d581841076bc5de3c0ae72fd6bd50c59ce9f1638 Author: Jani Nikula Date: Tue Oct 31 14:45:02 2023 +0200 drm/i915: move gpu error sysfs to i915_gpu_error.c Hide gpu error specifics in i915_gpu_error.c. This is also cleaner wrt conditional compilation, as i915_gpu_error.c is only built with DRM_I915_CAPTURE_ERROR=y. With this, we can also make i915_first_error_state() static. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20231031124502.1772160-3-jani.nikula@intel.com commit 4fca51984371d930a5d9d5a8b0848b892dbfdecc Author: Jani Nikula Date: Tue Oct 31 14:45:01 2023 +0200 drm/i915: move gpu error debugfs to i915_gpu_error.c Hide gpu error specifics in i915_gpu_error.c. This is also cleaner wrt conditional compilation, as i915_gpu_error.c is only built with DRM_I915_CAPTURE_ERROR=y. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20231031124502.1772160-2-jani.nikula@intel.com commit 2efb81e587961d5d863c2ad3156f96abde4d6a8f Author: Jani Nikula Date: Tue Oct 31 14:45:00 2023 +0200 drm/i915: make some error capture functions static Not needed outside of i915_gpu_error.c. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20231031124502.1772160-1-jani.nikula@intel.com commit 6fd9487147c4f18ad77eea00bd8c9189eec74a3e Author: Iago Toral Quiroga Date: Tue Oct 31 08:38:59 2023 +0100 drm/v3d: add brcm,2712-v3d as a compatible V3D device This is required to get the V3D module to load with Raspberry Pi 5. Signed-off-by: Iago Toral Quiroga Reviewed-by: Stefan Wahren Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20231031073859.25298-5-itoral@igalia.com commit ebb2f6eea688b9ffa46527c3e7570b2c347497b8 Author: Iago Toral Quiroga Date: Tue Oct 31 08:38:58 2023 +0100 dt-bindings: gpu: v3d: Add BCM2712's compatible BCM2712, Raspberry Pi 5's SoC, contains a V3D core. So add its specific compatible to the bindings. Signed-off-by: Iago Toral Quiroga Reviewed-by: Maíra Canal Acked-by: Conor Dooley Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20231031073859.25298-4-itoral@igalia.com commit 0ad5bc1ce4634ce9b5eaf017b01399ec5e49a03d Author: Iago Toral Quiroga Date: Tue Oct 31 08:38:57 2023 +0100 drm/v3d: fix up register addresses for V3D 7.x This patch updates a number of register addresses that have been changed in Raspberry Pi 5 (V3D 7.1) and updates the code to use the corresponding registers and addresses based on the actual V3D version. Signed-off-by: Iago Toral Quiroga Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20231031073859.25298-3-itoral@igalia.com commit 1118d10f5e5ab544c489fad4da373f9988416ece Author: Iago Toral Quiroga Date: Tue Oct 31 08:38:56 2023 +0100 drm/v3d: update UAPI to match user-space for V3D 7.x V3D 7.x takes a new parameter to configure TFU jobs that needs to be provided by user space. Signed-off-by: Iago Toral Quiroga Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20231031073859.25298-2-itoral@igalia.com commit 92a511a568e44cf11681a2223cae4d576a1a515d Author: Thierry Reding Date: Wed Nov 1 18:20:17 2023 +0100 fbdev/simplefb: Add support for generic power-domains The simple-framebuffer device tree bindings document the power-domains property, so make sure that simplefb supports it. This ensures that the power domains remain enabled as long as simplefb is active. v2: - remove unnecessary call to simplefb_detach_genpds() since that's already done automatically by devres - fix crash if power-domains property is missing in DT Signed-off-by: Thierry Reding Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20231101172017.3872242-3-thierry.reding@gmail.com commit 8ddfc01ace51c85a2333fb9a9cbea34d9f87885d Author: Thierry Reding Date: Wed Nov 1 18:20:16 2023 +0100 fbdev/simplefb: Support memory-region property The simple-framebuffer bindings specify that the "memory-region" property can be used as an alternative to the "reg" property to define the framebuffer memory used by the display hardware. Implement support for this in the simplefb driver. Reviewed-by: Hans de Goede Signed-off-by: Thierry Reding Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20231101172017.3872242-2-thierry.reding@gmail.com commit d59cf7bb73f3c702112a5a07824254345b7d089f Author: Jouni Högander Date: Tue Oct 31 10:45:57 2023 +0200 drm/i915/display: Use dma_fence interfaces instead of i915_sw_fence We are preparing for Xe driver. Xe driver doesn't have i915_sw_fence implementation. Lets drop i915_sw_fence usage from display code and use dma_fence interfaces directly. For this purpose stack dma fences from related objects into new plane state. Drm_gem_plane_helper_prepare_fb can be used for fences in new fb. Separate local implementation is used for Stacking fences from old fb into new plane state. Then wait for these stacked fences during atomic commit. There is no be need for separate GPU reset handling in intel_atomic_commit_fence_wait as the fences are signaled when GPU hang is detected and GPU is being reset. v4: - Drop to_new_plane_state suffix from add_dma_resv_fences - Use dma_resv_usage_rw(false) (DMA_RESV_USAGE_WRITE) v3: - Rename add_fences and it's parameters - Remove signaled check - Remove waiting old_plane_state fences v2: - Add fences from old fb into new_plane_state->uapi.fence rather than into old_plane_state->uapi.fence Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: José Roberto de Souza Signed-off-by: Jouni Högander Reviewed-by: Maarten Lankhorst Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231031084557.1181630-1-jouni.hogander@intel.com commit 43dea469e99b10ecc967a3576e50a5d416daf13c Author: Dnyaneshwar Bhadane Date: Sat Oct 28 01:20:52 2023 +0530 drm/i915/mtl: Add Wa_14019821291 This workaround is primarily implemented by the BIOS. However if the BIOS applies the workaround it will reserve a small piece of our DSM (which should be at the top, right below the WOPCM); we just need to keep that region reserved so that nothing else attempts to re-use it. v2: Declare regs in intel_gt_regs.h (Matt Roper) v3: Shift WA implementation before calculation of *base (Matt Roper) v4: - Change condition gscpmi base to be fall in DSM range.(Matt Roper) Signed-off-by: Dnyaneshwar Bhadane Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20231027195052.3676632-1-dnyaneshwar.bhadane@intel.com commit 3c6c7ca4508b6cb1a033ac954c50a1b2c97af883 Author: Matthew Brost Date: Mon Oct 30 20:24:39 2023 -0700 drm/sched: Add a helper to queue TDR immediately Add a helper whereby a driver can invoke TDR immediately. v2: - Drop timeout args, rename function, use mod delayed work (Luben) v3: - s/XE/Xe (Luben) - present tense in commit message (Luben) - Adjust comment for drm_sched_tdr_queue_imm (Luben) v4: - Adjust commit message (Luben) Cc: Luben Tuikov Signed-off-by: Matthew Brost Reviewed-by: Luben Tuikov Link: https://lore.kernel.org/r/20231031032439.1558703-6-matthew.brost@intel.com Signed-off-by: Luben Tuikov commit 7a36dcfa16a5a7a87f65e03e1a3eb2b5e2fca812 Author: Matthew Brost Date: Mon Oct 30 20:24:38 2023 -0700 drm/sched: Add drm_sched_start_timeout_unlocked helper Also add a lockdep assert to drm_sched_start_timeout. Signed-off-by: Matthew Brost Reviewed-by: Luben Tuikov Link: https://lore.kernel.org/r/20231031032439.1558703-5-matthew.brost@intel.com Signed-off-by: Luben Tuikov commit f7fe64ad0f22ff034f8ebcfbd7299ee9cc9b57d7 Author: Matthew Brost Date: Mon Oct 30 20:24:37 2023 -0700 drm/sched: Split free_job into own work item Rather than call free_job and run_job in same work item have a dedicated work item for each. This aligns with the design and intended use of work queues. v2: - Test for DMA_FENCE_FLAG_TIMESTAMP_BIT before setting timestamp in free_job() work item (Danilo) v3: - Drop forward dec of drm_sched_select_entity (Boris) - Return in drm_sched_run_job_work if entity NULL (Boris) v4: - Replace dequeue with peek and invert logic (Luben) - Wrap to 100 lines (Luben) - Update comments for *_queue / *_queue_if_ready functions (Luben) v5: - Drop peek argument, blindly reinit idle (Luben) - s/drm_sched_free_job_queue_if_ready/drm_sched_free_job_queue_if_done (Luben) - Update work_run_job & work_free_job kernel doc (Luben) v6: - Do not move drm_sched_select_entity in file (Luben) Signed-off-by: Matthew Brost Link: https://lore.kernel.org/r/20231031032439.1558703-4-matthew.brost@intel.com Reviewed-by: Luben Tuikov Signed-off-by: Luben Tuikov commit a6149f0393699308fb00149be913044977bceb56 Author: Matthew Brost Date: Mon Oct 30 20:24:36 2023 -0700 drm/sched: Convert drm scheduler to use a work queue rather than kthread In Xe, the new Intel GPU driver, a choice has made to have a 1 to 1 mapping between a drm_gpu_scheduler and drm_sched_entity. At first this seems a bit odd but let us explain the reasoning below. 1. In Xe the submission order from multiple drm_sched_entity is not guaranteed to be the same completion even if targeting the same hardware engine. This is because in Xe we have a firmware scheduler, the GuC, which allowed to reorder, timeslice, and preempt submissions. If a using shared drm_gpu_scheduler across multiple drm_sched_entity, the TDR falls apart as the TDR expects submission order == completion order. Using a dedicated drm_gpu_scheduler per drm_sched_entity solve this problem. 2. In Xe submissions are done via programming a ring buffer (circular buffer), a drm_gpu_scheduler provides a limit on number of jobs, if the limit of number jobs is set to RING_SIZE / MAX_SIZE_PER_JOB we get flow control on the ring for free. A problem with this design is currently a drm_gpu_scheduler uses a kthread for submission / job cleanup. This doesn't scale if a large number of drm_gpu_scheduler are used. To work around the scaling issue, use a worker rather than kthread for submission / job cleanup. v2: - (Rob Clark) Fix msm build - Pass in run work queue v3: - (Boris) don't have loop in worker v4: - (Tvrtko) break out submit ready, stop, start helpers into own patch v5: - (Boris) default to ordered work queue v6: - (Luben / checkpatch) fix alignment in msm_ringbuffer.c - (Luben) s/drm_sched_submit_queue/drm_sched_wqueue_enqueue - (Luben) Update comment for drm_sched_wqueue_enqueue - (Luben) Positive check for submit_wq in drm_sched_init - (Luben) s/alloc_submit_wq/own_submit_wq v7: - (Luben) s/drm_sched_wqueue_enqueue/drm_sched_run_job_queue v8: - (Luben) Adjust var names / comments Signed-off-by: Matthew Brost Reviewed-by: Luben Tuikov Link: https://lore.kernel.org/r/20231031032439.1558703-3-matthew.brost@intel.com Signed-off-by: Luben Tuikov commit 35963cf2cd25eeea8bdb4d02853dac1e66fb13a0 Author: Matthew Brost Date: Mon Oct 30 20:24:35 2023 -0700 drm/sched: Add drm_sched_wqueue_* helpers Add scheduler wqueue ready, stop, and start helpers to hide the implementation details of the scheduler from the drivers. v2: - s/sched_wqueue/sched_wqueue (Luben) - Remove the extra white line after the return-statement (Luben) - update drm_sched_wqueue_ready comment (Luben) Cc: Luben Tuikov Signed-off-by: Matthew Brost Reviewed-by: Luben Tuikov Link: https://lore.kernel.org/r/20231031032439.1558703-2-matthew.brost@intel.com Signed-off-by: Luben Tuikov commit 08a573006d62221772bed4a079d05bb356331868 Author: Ville Syrjälä Date: Wed Oct 18 18:41:23 2023 +0300 drm/i915/mst: Always write CHICKEN_TRANS Since we're asked to disable FECSTALL_DIS_DPTSTREAM_DPTTG when the transcoder is disabled it seems prudent to also clear it when enabliing the transcoder w/o FEC, just in case someone else left it enabled by mistake. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231018154123.5479-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 817cb16e14de1fe29d4dfcd3cae8bce538f7d370 Author: Ville Syrjälä Date: Wed Oct 18 18:41:22 2023 +0300 drm/i915/mst: Clear ACT just before triggering payload allocation Follow the bspec sequence more closely and clear ACT sent just before triggering the allocation. Can't see why we'd want to deviate from the spec sequence here. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231018154123.5479-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d068fa53730b9eb79e532350cd90d50950ea79fc Author: Ville Syrjälä Date: Wed Oct 18 18:41:21 2023 +0300 drm/i915/mst: Disable transcoder before deleting the payload Bspec tells us that we should disable the transcoder before deleting the payload. Looks like this has been reversed since MST support was added. I suppose this shouldn't matter in practice since the downstream device shouldn't really do anything with the new payload until we send the ACT. But I see no compelling reason to deviate from the bspec sequence regardless. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231018154123.5479-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit d1727cdd450d70cd747a466e96c63c26c78b6b11 Author: Ville Syrjälä Date: Wed Oct 18 18:41:20 2023 +0300 drm/i915/mst: Swap TRANSCONF vs. FECSTALL_DIS_DPTSTREAM_DPTTG disable The DP modeset sequence asks us to disable TRANSCONF before clearing the FECSTALL_DIS_DPTSTREAM_DPTTG bit, although we are still asked to wait for the transcoder to stop only after both steps have been done. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231018154123.5479-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 0da611a8702101814257a7c03f6caf0574c83b98 Author: Christian König Date: Fri Sep 8 10:27:23 2023 +0200 dma-buf: add dma_fence_timestamp helper When a fence signals there is a very small race window where the timestamp isn't updated yet. sync_file solves this by busy waiting for the timestamp to appear, but on other ocassions didn't handled this correctly. Provide a dma_fence_timestamp() helper function for this and use it in all appropriate cases. Another alternative would be to grab the spinlock when that happens. v2 by teddy: add a wait parameter to wait for the timestamp to show up, in case the accurate timestamp is needed and/or the timestamp is not based on ktime (e.g. hw timestamp) v3 chk: drop the parameter again for unified handling Signed-off-by: Yunxiang Li Signed-off-by: Christian König Fixes: 1774baa64f93 ("drm/scheduler: Change scheduled fence track v2") Reviewed-by: Alex Deucher CC: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20230929104725.2358-1-christian.koenig@amd.com commit 2fc1a50fa4472301a3b262fcfc78744c841d5587 Author: Jacek Lawrynowicz Date: Sat Oct 28 17:59:36 2023 +0200 accel/ivpu: Rename VPU to NPU in product strings VPU was rebranded as NPU (Neural Processing Unit) so user facing strings have to be updated but the code remains as is and the module is still called intel_vpu.ko. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028155936.1183342-9-stanislaw.gruszka@linux.intel.com commit 0c287c27fbffa2737f155af73646a794e540e1d3 Author: Jacek Lawrynowicz Date: Sat Oct 28 17:59:35 2023 +0200 accel/ivpu: Simplify MMU SYNC command CMD_SYNC does not need any args as we poll for completion anyway. Signed-off-by: Jacek Lawrynowicz Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028155936.1183342-8-stanislaw.gruszka@linux.intel.com commit 3bcc5209ba6af1019487b54b30fc226ecf79193d Author: Karol Wachowski Date: Sat Oct 28 17:59:34 2023 +0200 accel/ivpu: Make DMA allocations for MMU600 write combined Previously using dma_alloc_wc() API we created cache coherent (mapped as write-back) mappings. Because we disable MMU600 snooping it was required to do costly page walk and cache flushes after each page table modification. With write-combined buffers it's possible to do a single write memory barrier to flush write-combined buffer to memory which simplifies the driver and significantly reduce time of map/unmap operations. Mapping time of 255 MB is reduced from 2.5 ms to 500 us. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028155936.1183342-7-stanislaw.gruszka@linux.intel.com commit e013aa9ab01b400cccc6c3e8b969b8e7f10bc6cb Author: Karol Wachowski Date: Sat Oct 28 17:59:33 2023 +0200 accel/ivpu: Print CMDQ errors after consumer timeout Add checking of error reason bits in IVPU_MMU_CMDQ_CONS register when waiting for consumer timeout occurred. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028155936.1183342-6-stanislaw.gruszka@linux.intel.com commit 1715b6359c1ae37f24d6774f0bcd73b6bf839eaa Author: Arnaldo Carvalho de Melo Date: Fri Oct 6 16:14:54 2023 -0300 perf beauty socket/prctl_option: Cope with extended regexp complaint by grep Noticed on fedora 38, the extended regexp that so far was ok for both grep and sed now gets complaints by grep, that says '/' doesn't need to be escaped with '\'. So stop using '/' in sed, use '%' instead and remove the \ before / in the common extended regexp. Link: https://x.com/SMT_Solvers/status/1710380010098344192?s=20 Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lore.kernel.org/lkml/ZUEddFPTJHVLhH%2F6@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ba6b035daac8c4fa5da1f14f262d97e0ffa45a6d Author: Stanislaw Gruszka Date: Sat Oct 28 17:59:32 2023 +0200 accel/ivpu: Abort pending rx ipc on reset Waking up process, which wait for particular condition, will go to sleep again on wake_up() if the condition is not met. Add abort flag to wake up IPC receivers, which will finish with -ECANCELED error. This is only needed for reset, run time power management prevent to suspend VPU when there is pending IPC processing or pending job. Reviewed-by: Karol Wachowski Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028155936.1183342-5-stanislaw.gruszka@linux.intel.com commit 57c7e3e4800ad65048a7044b03723cd85d9595af Author: Stanislaw Gruszka Date: Sat Oct 28 17:59:31 2023 +0200 accel/ivpu: Stop job_done_thread on suspend Stop job_done thread when going to suspend. Use kthread_park() instead of kthread_stop() to avoid memory allocation and potential failure on resume. Use separate function as thread wake up condition. Use spin lock to assure rx_msg_list is properly protected against concurrent access. This avoid race condition when the rx_msg_list list is modified and read in ivpu_ipc_recive() at the same time. Reviewed-by: Karol Wachowski Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028155936.1183342-4-stanislaw.gruszka@linux.intel.com commit a06eb9be49a66e16e0c7819c630c1267c25b36dc Author: Stanislaw Gruszka Date: Sat Oct 28 17:59:30 2023 +0200 accel/ivpu: Assure device is off if power up sequence fail We should not leave device half enabled if there is failure somewhere it power up sequence. Fix device init and resume paths. Reviewed-by: Karol Wachowski Signed-off-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Link: https://patchwork.freedesktop.org/patch/msgid/20231028155936.1183342-3-stanislaw.gruszka@linux.intel.com commit bfc87f90614523612ae7e94d06798e82bc78ade6 Author: Krystian Pradzynski Date: Sat Oct 28 17:59:29 2023 +0200 accel/ivpu/40xx: Allow to change profiling frequency Profiling freq is a debug firmware feature. It switches default clock to higher resolution for fine-grained and more accurate firmware task profiling. We already configure it during boot up of VPU4. Add debugfs knob and helpers per HW generation that allow to change it. For vpu37xx the implementation is empty as profiling frequency can only be changed on VPU4 or newer. Signed-off-by: Krystian Pradzynski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028155936.1183342-2-stanislaw.gruszka@linux.intel.com commit 9d7c8c066916f231ca0ed4e4fce6c4b58ca3e451 Author: Tomi Valkeinen Date: Wed Sep 20 15:57:17 2023 +0300 Revert "drm/omapdrm: Annotate dma-fence critical section in commit path" This reverts commit 250aa22920cd5d956a5d3e9c6a43d671c2bae217. The DMA-fence annotations cause a lockdep warning (see below). As per https://patchwork.freedesktop.org/patch/462170/ it sounds like the annotations don't work correctly. ====================================================== WARNING: possible circular locking dependency detected 6.5.0-rc2+ #2 Not tainted ------------------------------------------------------ kmstest/219 is trying to acquire lock: c4705838 (&hdmi->lock){+.+.}-{3:3}, at: hdmi5_bridge_mode_set+0x1c/0x50 but task is already holding lock: c11e1128 (dma_fence_map){++++}-{0:0}, at: omap_atomic_commit_tail+0x14/0xbc which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (dma_fence_map){++++}-{0:0}: __dma_fence_might_wait+0x48/0xb4 dma_resv_lockdep+0x1b8/0x2bc do_one_initcall+0x68/0x3b0 kernel_init_freeable+0x260/0x34c kernel_init+0x14/0x140 ret_from_fork+0x14/0x28 -> #1 (fs_reclaim){+.+.}-{0:0}: fs_reclaim_acquire+0x70/0xa8 __kmem_cache_alloc_node+0x3c/0x368 kmalloc_trace+0x28/0x58 _drm_do_get_edid+0x7c/0x35c hdmi5_bridge_get_edid+0xc8/0x1ac drm_bridge_connector_get_modes+0x64/0xc0 drm_helper_probe_single_connector_modes+0x170/0x528 drm_client_modeset_probe+0x208/0x1334 __drm_fb_helper_initial_config_and_unlock+0x30/0x548 omap_fbdev_client_hotplug+0x3c/0x6c drm_client_register+0x58/0x94 pdev_probe+0x544/0x6b0 platform_probe+0x58/0xbc really_probe+0xd8/0x3fc __driver_probe_device+0x94/0x1f4 driver_probe_device+0x2c/0xc4 __device_attach_driver+0xa4/0x11c bus_for_each_drv+0x84/0xdc __device_attach+0xac/0x20c bus_probe_device+0x8c/0x90 device_add+0x588/0x7e0 platform_device_add+0x110/0x24c platform_device_register_full+0x108/0x15c dss_bind+0x90/0xc0 try_to_bring_up_aggregate_device+0x1e0/0x2c8 __component_add+0xa4/0x174 hdmi5_probe+0x1c8/0x270 platform_probe+0x58/0xbc really_probe+0xd8/0x3fc __driver_probe_device+0x94/0x1f4 driver_probe_device+0x2c/0xc4 __device_attach_driver+0xa4/0x11c bus_for_each_drv+0x84/0xdc __device_attach+0xac/0x20c bus_probe_device+0x8c/0x90 deferred_probe_work_func+0x8c/0xd8 process_one_work+0x2ac/0x6e4 worker_thread+0x30/0x4ec kthread+0x100/0x124 ret_from_fork+0x14/0x28 -> #0 (&hdmi->lock){+.+.}-{3:3}: __lock_acquire+0x145c/0x29cc lock_acquire.part.0+0xb4/0x258 __mutex_lock+0x90/0x950 mutex_lock_nested+0x1c/0x24 hdmi5_bridge_mode_set+0x1c/0x50 drm_bridge_chain_mode_set+0x48/0x5c crtc_set_mode+0x188/0x1d0 omap_atomic_commit_tail+0x2c/0xbc commit_tail+0x9c/0x188 drm_atomic_helper_commit+0x158/0x18c drm_atomic_commit+0xa4/0xe8 drm_mode_atomic_ioctl+0x9a4/0xc38 drm_ioctl+0x210/0x4a8 sys_ioctl+0x138/0xf00 ret_fast_syscall+0x0/0x1c other info that might help us debug this: Chain exists of: &hdmi->lock --> fs_reclaim --> dma_fence_map Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(dma_fence_map); lock(fs_reclaim); lock(dma_fence_map); lock(&hdmi->lock); *** DEADLOCK *** 3 locks held by kmstest/219: #0: f1011de4 (crtc_ww_class_acquire){+.+.}-{0:0}, at: drm_mode_atomic_ioctl+0xf0/0xc38 #1: c47059c8 (crtc_ww_class_mutex){+.+.}-{3:3}, at: modeset_lock+0xf8/0x230 #2: c11e1128 (dma_fence_map){++++}-{0:0}, at: omap_atomic_commit_tail+0x14/0xbc stack backtrace: CPU: 1 PID: 219 Comm: kmstest Not tainted 6.5.0-rc2+ #2 Hardware name: Generic DRA74X (Flattened Device Tree) unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x58/0x70 dump_stack_lvl from check_noncircular+0x164/0x198 check_noncircular from __lock_acquire+0x145c/0x29cc __lock_acquire from lock_acquire.part.0+0xb4/0x258 lock_acquire.part.0 from __mutex_lock+0x90/0x950 __mutex_lock from mutex_lock_nested+0x1c/0x24 mutex_lock_nested from hdmi5_bridge_mode_set+0x1c/0x50 hdmi5_bridge_mode_set from drm_bridge_chain_mode_set+0x48/0x5c drm_bridge_chain_mode_set from crtc_set_mode+0x188/0x1d0 crtc_set_mode from omap_atomic_commit_tail+0x2c/0xbc omap_atomic_commit_tail from commit_tail+0x9c/0x188 commit_tail from drm_atomic_helper_commit+0x158/0x18c drm_atomic_helper_commit from drm_atomic_commit+0xa4/0xe8 drm_atomic_commit from drm_mode_atomic_ioctl+0x9a4/0xc38 drm_mode_atomic_ioctl from drm_ioctl+0x210/0x4a8 drm_ioctl from sys_ioctl+0x138/0xf00 sys_ioctl from ret_fast_syscall+0x0/0x1c Exception stack(0xf1011fa8 to 0xf1011ff0) 1fa0: 00466d58 be9ab510 00000003 c03864bc be9ab510 be9ab4e0 1fc0: 00466d58 be9ab510 c03864bc 00000036 00466ef0 00466fc0 00467020 00466f20 1fe0: b6bc7ef4 be9ab4d0 b6bbbb00 b6cb2cc0 Fixes: 250aa22920cd ("drm/omapdrm: Annotate dma-fence critical section in commit path") Reviewed-by: Aradhya Bhatia Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230920-dma-fence-annotation-revert-v1-2-7ebf6f7f5bf6@ideasonboard.com commit ca34d816558c3e4c3f8fe037b5a6b16c944693de Author: Tomi Valkeinen Date: Wed Sep 20 15:57:16 2023 +0300 Revert "drm/tidss: Annotate dma-fence critical section in commit path" This reverts commit 4d56a4f08391857ba93465de489707b66adad114. The DMA-fence annotations cause a lockdep warning (see below). As per https://patchwork.freedesktop.org/patch/462170/ it sounds like the annotations don't work correctly. ====================================================== WARNING: possible circular locking dependency detected 6.6.0-rc2+ #1 Not tainted ------------------------------------------------------ kmstest/733 is trying to acquire lock: ffff8000819377f0 (fs_reclaim){+.+.}-{0:0}, at: __kmem_cache_alloc_node+0x58/0x2d4 but task is already holding lock: ffff800081a06aa0 (dma_fence_map){++++}-{0:0}, at: tidss_atomic_commit_tail+0x20/0xc0 [tidss] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (dma_fence_map){++++}-{0:0}: __dma_fence_might_wait+0x5c/0xd0 dma_resv_lockdep+0x1a4/0x32c do_one_initcall+0x84/0x2fc kernel_init_freeable+0x28c/0x4c4 kernel_init+0x24/0x1dc ret_from_fork+0x10/0x20 -> #1 (mmu_notifier_invalidate_range_start){+.+.}-{0:0}: fs_reclaim_acquire+0x70/0xe4 __kmem_cache_alloc_node+0x58/0x2d4 kmalloc_trace+0x38/0x78 __kthread_create_worker+0x3c/0x150 kthread_create_worker+0x64/0x8c workqueue_init+0x1e8/0x2f0 kernel_init_freeable+0x11c/0x4c4 kernel_init+0x24/0x1dc ret_from_fork+0x10/0x20 -> #0 (fs_reclaim){+.+.}-{0:0}: __lock_acquire+0x1370/0x20d8 lock_acquire+0x1e8/0x308 fs_reclaim_acquire+0xd0/0xe4 __kmem_cache_alloc_node+0x58/0x2d4 __kmalloc_node_track_caller+0x58/0xf0 kmemdup+0x34/0x60 regmap_bulk_write+0x64/0x2c0 tc358768_bridge_pre_enable+0x8c/0x12d0 [tc358768] drm_atomic_bridge_call_pre_enable+0x68/0x80 [drm] drm_atomic_bridge_chain_pre_enable+0x50/0x158 [drm] drm_atomic_helper_commit_modeset_enables+0x164/0x264 [drm_kms_helper] tidss_atomic_commit_tail+0x58/0xc0 [tidss] commit_tail+0xa0/0x188 [drm_kms_helper] drm_atomic_helper_commit+0x1a8/0x1c0 [drm_kms_helper] drm_atomic_commit+0xa8/0xe0 [drm] drm_mode_atomic_ioctl+0x9ec/0xc80 [drm] drm_ioctl_kernel+0xc4/0x170 [drm] drm_ioctl+0x234/0x4b0 [drm] drm_compat_ioctl+0x110/0x12c [drm] __arm64_compat_sys_ioctl+0x128/0x150 invoke_syscall+0x48/0x110 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc_compat+0x1c/0x38 el0_svc_compat+0x48/0xb4 el0t_32_sync_handler+0xb0/0x138 el0t_32_sync+0x194/0x198 other info that might help us debug this: Chain exists of: fs_reclaim --> mmu_notifier_invalidate_range_start --> dma_fence_map Possible unsafe locking scenario: CPU0 CPU1 ---- ---- rlock(dma_fence_map); lock(mmu_notifier_invalidate_range_start); lock(dma_fence_map); lock(fs_reclaim); *** DEADLOCK *** 3 locks held by kmstest/733: #0: ffff800082e5bba0 (crtc_ww_class_acquire){+.+.}-{0:0}, at: drm_mode_atomic_ioctl+0x118/0xc80 [drm] #1: ffff000004224c88 (crtc_ww_class_mutex){+.+.}-{3:3}, at: modeset_lock+0xdc/0x1a0 [drm] #2: ffff800081a06aa0 (dma_fence_map){++++}-{0:0}, at: tidss_atomic_commit_tail+0x20/0xc0 [tidss] stack backtrace: CPU: 0 PID: 733 Comm: kmstest Not tainted 6.6.0-rc2+ #1 Hardware name: Toradex Verdin AM62 on Verdin Development Board (DT) Call trace: dump_backtrace+0x98/0x118 show_stack+0x18/0x24 dump_stack_lvl+0x60/0xac dump_stack+0x18/0x24 print_circular_bug+0x288/0x368 check_noncircular+0x168/0x17c __lock_acquire+0x1370/0x20d8 lock_acquire+0x1e8/0x308 fs_reclaim_acquire+0xd0/0xe4 __kmem_cache_alloc_node+0x58/0x2d4 __kmalloc_node_track_caller+0x58/0xf0 kmemdup+0x34/0x60 regmap_bulk_write+0x64/0x2c0 tc358768_bridge_pre_enable+0x8c/0x12d0 [tc358768] drm_atomic_bridge_call_pre_enable+0x68/0x80 [drm] drm_atomic_bridge_chain_pre_enable+0x50/0x158 [drm] drm_atomic_helper_commit_modeset_enables+0x164/0x264 [drm_kms_helper] tidss_atomic_commit_tail+0x58/0xc0 [tidss] commit_tail+0xa0/0x188 [drm_kms_helper] drm_atomic_helper_commit+0x1a8/0x1c0 [drm_kms_helper] drm_atomic_commit+0xa8/0xe0 [drm] drm_mode_atomic_ioctl+0x9ec/0xc80 [drm] drm_ioctl_kernel+0xc4/0x170 [drm] drm_ioctl+0x234/0x4b0 [drm] drm_compat_ioctl+0x110/0x12c [drm] __arm64_compat_sys_ioctl+0x128/0x150 invoke_syscall+0x48/0x110 el0_svc_common.constprop.0+0x40/0xe0 do_el0_svc_compat+0x1c/0x38 el0_svc_compat+0x48/0xb4 el0t_32_sync_handler+0xb0/0x138 el0t_32_sync+0x194/0x198 Fixes: 4d56a4f08391 ("drm/tidss: Annotate dma-fence critical section in commit path") Reviewed-by: Aradhya Bhatia Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20230920-dma-fence-annotation-revert-v1-1-7ebf6f7f5bf6@ideasonboard.com commit 2fb771f3b840ff59e593dad9b6289276ea545698 Author: Jonathan Cavitt Date: Thu Oct 26 20:36:29 2023 +0200 drm/i915: Set copy engine arbitration for Wa_16018031267 / Wa_16018063123 Set copy engine arbitration into round robin mode for part of Wa_16018031267 / Wa_16018063123 mitigation. Signed-off-by: Nirmoy Das Signed-off-by: Jonathan Cavitt Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231026-wabb-v6-4-4aa7d55d0a8a@intel.com commit 3a32ef21ed5497f30f2bc99074014496748533d3 Author: Andrzej Hajda Date: Thu Oct 26 20:36:28 2023 +0200 drm/i915/gt: add selftest to exercise WABB Test re-uses logic form indirect ctx BB selftest. Signed-off-by: Nirmoy Das Signed-off-by: Jonathan Cavitt Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231026-wabb-v6-3-4aa7d55d0a8a@intel.com commit 03fe4b87c6420fde29e3401f87fcdc271c960950 Author: Andrzej Hajda Date: Thu Oct 26 20:36:27 2023 +0200 drm/i915: Add WABB blit for Wa_16018031267 / Wa_16018063123 Apply WABB blit for Wa_16018031267 / Wa_16018063123. v3: drop unused enum definition v4: move selftest to separate patch, use wa only on BCS0. v5: fixed selftest caller to context_wabb Signed-off-by: Nirmoy Das Signed-off-by: Jonathan Cavitt Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231026-wabb-v6-2-4aa7d55d0a8a@intel.com commit 9bb66c179f50e61df20ba13c9b34ca17d00b05fb Author: Andrzej Hajda Date: Thu Oct 26 20:36:26 2023 +0200 drm/i915: Reserve some kernel space per vm Reserve one page in each vm for kernel space to use for things such as workarounds. v2: use real memory, do not decrease vm.total v4: reserve only one page and explain flag v5: remove allocated object on ppgtt cleanup v6: decrease vm->total by reservation size Suggested-by: Chris Wilson Signed-off-by: Andrzej Hajda Reviewed-by: Jonathan Cavitt Reviewed-by: Nirmoy Das Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231026-wabb-v6-1-4aa7d55d0a8a@intel.com commit 949113d34fb82a5dc6f5dd3ad9168001b441792b Author: Nirmoy Das Date: Wed Oct 25 12:28:26 2023 +0200 drm/i915/mtl: Apply notify_guc to all GTs Handle platforms with multiple GTs by iterate over all GTs. Add a Fixes commit so this gets propagated for MTL support. Fixes: 213c43676beb ("drm/i915/mtl: Remove the 'force_probe' requirement for Meteor Lake") Suggested-by: John Harrison Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Andi Shyti Cc: Andrzej Hajda Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20231025102826.16955-1-nirmoy.das@intel.com commit 3b9bbd79627043a9fa9dd5b01bb29882663976e0 Author: Suraj Kandpal Date: Thu Oct 26 17:41:40 2023 +0530 drm/i915/hdcp: Add more conditions to enable hdcp When we dock a monitor we end up with a enable and disable connector cycle but if hdcp content is running we get the userspace in enabled state and driver maintaining a undesired state which causes the content to stop playing and we only enable hdcp if the userspace state in desired. This patch fixes that. --v2 -Move code to intel_hdcp [Jani] Signed-off-by: Suraj Kandpal Reviewed-by: Ankit Nautiyal Signed-off-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20231026121139.987437-4-suraj.kandpal@intel.com commit 4f60f06a41f441cd5a8570c61701ba40796fa52c Author: Suraj Kandpal Date: Thu Oct 26 17:41:39 2023 +0530 drm/i915/hdcp: Convert intel_hdcp_enable to a blanket function Let's convert intel_hdcp_enable to a blanket function which just has some conditions which needs to be checked before connectors enable hdcp. This cleans up code and avoids code duplication. --v3 -Keep function name as intel_hdcp_enable() [Jani] Signed-off-by: Suraj Kandpal Reviewed-by: Jani Nikula Signed-off-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20231026121139.987437-3-suraj.kandpal@intel.com commit da36ce00997e10ed06c9fa66fbce546cad23815f Author: Suraj Kandpal Date: Thu Oct 26 17:41:38 2023 +0530 drm/i915/hdcp: Rename HCDP 1.4 enablement function Rename hdcp 1.4 enablement function from _intel_hdcp_enable to intel_hdcp1_enable to better represent what version of hdcp is being enabled Signed-off-by: Suraj Kandpal Reviewed-by: Jani Nikula Signed-off-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20231026121139.987437-2-suraj.kandpal@intel.com commit ac2f43d3d34e52b0d388b4c573ff6bbac90235b9 Author: Justin Stitt Date: Wed Oct 25 20:47:56 2023 +0300 wifi: ath10k: replace deprecated strncpy with memcpy strncpy() is deprecated [1] and we should prefer less ambiguous interfaces. In this case, arvif->u.ap.ssid has its length maintained by arvif->u.ap.ssid_len which indicates it may not need to be NUL-terminated. Make this explicit with __nonstring and use a plain old memcpy. This is also consistent with future copies into arvif->u.ap.ssid: if (changed & BSS_CHANGED_SSID && vif->type == NL80211_IFTYPE_AP) { arvif->u.ap.ssid_len = vif->cfg.ssid_len; if (vif->cfg.ssid_len) memcpy(arvif->u.ap.ssid, vif->cfg.ssid, vif->cfg.ssid_len); arvif->u.ap.hidden_ssid = info->hidden_ssid; } Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Acked-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231024-strncpy-drivers-net-wireless-ath-ath10k-mac-c-v2-1-4c1f4cd4b4df@google.com commit 56d9854bd7c6b29a65fbb4175e01196166ed61de Author: Ma Ke Date: Wed Oct 25 20:47:56 2023 +0300 wifi: ath12k: drop NULL pointer check in ath12k_update_per_peer_tx_stats() Since 'user_stats' is a fixed-size array of 'struct htt_ppdu_user_stats' in 'struct htt_ppdu_stats', any of its member can't be NULL and so relevant check may be dropped. Signed-off-by: Ma Ke Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231013074711.2202850-1-make_ruc2021@163.com commit b0462e94c964145c1962876f18e99f82fb4e6e9c Author: Ville Syrjälä Date: Thu Oct 12 15:40:33 2023 +0300 drm/i915: Move the g45 PEG band gap HPD workaround to the HPD code We are asked to reprogram PEG_BAND_GAP_DATA prior to enabling hotplug detection on the g45 HDMI/DP ports. Currently we do said reprogamming from the DP/HDMI connector initialization functions. That code should be mostly platform agnostic so clearly not the best place for this. Move the workaround to the place where we actually enable HPD detection. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231012124033.26983-1-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7880d41c55f1e177a88c275d2e3ccec4debfcb51 Author: Ville Syrjälä Date: Thu Oct 12 15:35:22 2023 +0300 drm/i915: Extract _intel_{enable,disable}_shared_dpll() We have a bit of duplicated code around the DPLL disabling. Extract that to a new function, and for symmetry also do the same for the enable direction. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231012123522.26045-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 3e7e07c4cf638b281f420be77afef7d93481a212 Author: Ville Syrjälä Date: Thu Oct 12 15:35:21 2023 +0300 drm/i915: Move the DPLL extra power domain handling up one level The extra DPLL power domain is currently handled in three places: - combo_pll_enable() - combo_pll_disable() - readout_dpll_hw_state() First two of those are low level PLL funcs, but the third is a higher level thing. So the current situation is rather inconsistent. Unify this by moving the PLL enable/disable up one level. This also means the extra power domain could be trivially be used by other platforms as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231012123522.26045-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 7e72cd6cafb166b815b7997597c09a01412da064 Author: Ville Syrjälä Date: Thu Oct 12 15:35:20 2023 +0300 drm/i915: Abstract the extra JSL/EHL DPLL4 power domain better Just include the JSL/EHL DPLL4 extra power domain in the dpll_info struct. This way the same approach could be used by other platforms as well (should the need arise), and we don't have to sprinkle platform checks all over the place. Note that I'm perhaps slightly abusing things here as power_domain==0 (which is actually POWER_DOMAIN_DISPLAY_CORE) now indicates that no extra power domain is needed. I suppose using POWER_DOMAIN_INVALID would be more correct, but then we'd have to sprinkle that to all the other DPLLs. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231012123522.26045-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit f215038f4133ea9d1b525e9bb812527fe002db2b Author: Ville Syrjälä Date: Thu Oct 12 15:35:19 2023 +0300 drm/i915: Use named initializers for DPLL info Use named initializers when populating the DPLL info. This is just more convenient and less error prone as we no longer have to keep the initializers in a specific order. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231012123522.26045-2-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 9e372744c0f24d358967a9a2bbde69dee1491b76 Author: Ville Syrjälä Date: Fri Oct 13 17:02:14 2023 +0300 drm/i915/bios: Clamp VBT HDMI level shift on BDW Apparently some BDW machines (eg. HP Pavilion 15-ab) shipped with a VBT inherited from some earlier HSW model. On HSW the HDMI level shift value could go up to 11, whereas on BDW the maximum value is 9. The DDI code does clamp the bogus value, but it does so with a WARN which we don't really want. To avoid that let's just sanitize the bogus VBT HDMI level shift value ahead of time for all BDW machines. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9461 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231013140214.1713-1-ville.syrjala@linux.intel.com Reviewed-by: Ankit Nautiyal commit 8aa519f17512da50a2d850b60472de656e2b210a Author: Dnyaneshwar Bhadane Date: Wed Oct 25 18:47:09 2023 +0530 drm/i915/mtl: Add Wa_22016670082 Implemented workaround for XeLPM+ BSpec: 51762 Signed-off-by: Dnyaneshwar Bhadane Reviewed-by: Balasubramani Vivekanandan Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20231025131709.3368517-1-dnyaneshwar.bhadane@intel.com commit bec95598b24a42adba294994ab7a5d8db417cca5 Author: Arnd Bergmann Date: Mon Oct 23 15:19:51 2023 +0200 wifi: remove orphaned rndis_wlan driver Wireless RNDIS USB is a new-style CFG80211 driver for 802.11b and 802.11g USB hardware from around 2004 to 2006. This makes it more modern than any of the others, but Kalle already classified it as "legacy" in commit 298e50ad8eb8f ("wifi: move raycs, wl3501 and rndis_wlan to legacy directory"). Jussi Kivilinna worked on this driver between 2008 and 2012, and it has only seen cosmetic updates after that. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit 238349207cd3e158df53d866abf1d42b2392aa9e Author: Arnd Bergmann Date: Mon Oct 23 15:19:50 2023 +0200 wifi: remove orphaned wl3501 driver Planet WL3501 is another PCMCIA driver for pre-802.11b interfaces (2Mbit/s) with incomplete CFG80211 support. This was marked as orphaned in 2017 but has been unmaintained for a long time before that. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit 6b9dbaff83d626e5a9cc0c01a2b302f8fe423a1a Author: Arnd Bergmann Date: Mon Oct 23 15:19:49 2023 +0200 wifi: remove orphaned ray_cs driver Aviator/Raytheon is an early PCMCIA driver, apparently predating 802.11b and only supporting wireless extensions. The driver has been orphaned since 2010 and only seen cosmetic updates long before than. Jean Tourrilhes pointed out in a 2005 changelog that he tested a change on actual hardware, which was apparently already noteworthy back then. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit 1535d5962d79b8f4bddfd480399828b8db9d7a1c Author: Arnd Bergmann Date: Mon Oct 23 15:19:48 2023 +0200 wifi: remove orphaned orinoco driver Orinoco is a PIO-only ISA/PCMCIA 802.11b device with extra bus interface connections for PCI/Cardbus/mini-PCI and a few pre-2002 Apple PowerMac variants. It supports both wireless extensions and CFG80211, but I could not tell if it requires using both. This device used to be one of the most common ones 20 years ago, but has been orphaned for most of the time since then, and the conversion to cfg80211 has stalled in 2010. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit 757a46c2a7a99a4e12f6a267e945c98324c41702 Author: Arnd Bergmann Date: Mon Oct 23 15:19:47 2023 +0200 wifi: remove orphaned zd1201 driver This is a wireless extensions style driver for 802.11b USB dongles, with partial support for cfg80211 interfaces. As these are all external dongles, there are probably few users that have not yet replaced them with cheap 802.11n devices that work better. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit d0172d5f7576ed6c3f73622ca4c16ba63c49da4e Author: Arnd Bergmann Date: Mon Oct 23 15:19:46 2023 +0200 wifi: remove obsolete hostap driver HostAP is an ISA/PCMCIA style 802.11b driver supporting only wireless extensions, and some custom ioctls (already removed). Some devices include a legacy PCI bridge but no DMA. The driver was marked obsolete in 2016 and is highly unlikely to still have any users. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit 6853c70ba5edca34f65b337a04183a6145303071 Author: Arnd Bergmann Date: Mon Oct 23 15:19:45 2023 +0200 wifi: remove orphaned cisco/aironet driver Cisco Aironet is an 802.11b PCMCIA and mini-PCI with limited support for Cardbus DMA and for CFG80211. Both PCMCIA and WEXT are deprecated, and there is little chance that anyone is still using this driver, so remove it. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit 77e49bec64144cf68c494209347ebd762c675194 Author: Arnd Bergmann Date: Mon Oct 23 15:19:44 2023 +0200 wifi: atmel: remove wext style at76c50x drivers Atmel at76c502/at76c504/at76c506 is a PIO-only (PCMCIA, mini-PCI and Cardbus) 802.11b driver with incomplete CFG80211 support. Both PCMCIA and WEXT are deprecated, and there is little chance that anyone is still using this driver, so remove it. The related at76c50x USB driver uses MAC80211 and remains. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit 4b478bf6bdd8901cb29742ec8a65c0b2b92a9e56 Author: Arnd Bergmann Date: Mon Oct 23 15:19:43 2023 +0200 wifi: libertas: drop 16-bit PCMCIA support With all the other PCMCIA WLAN adapters gone from the kernel, this is now the last remaining device with this interface, but as far as I can tell, all the actual libertas users were actually using either SDIO or USB. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit 944496bada22f1788cd3b39b542f7818a0a119d0 Author: Ping-Ke Shih Date: Fri Oct 27 09:50:59 2023 +0800 wifi: rtw89: extend PHY status parser to support WiFi 7 chips PHY status IEs is used to have more information about received packets, such as RSSI and EVM. For each PHY IE type, it has different predefined PHY IE length, and the length are changed, so add them for WiFi 7 chips accordingly. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231027015059.10032-5-pkshih@realtek.com commit e343face52b013e5d0ff6305ddf40c9838adfe75 Author: Ping-Ke Shih Date: Fri Oct 27 09:50:58 2023 +0800 wifi: rtw89: consider RX info for WiFi 7 chips For WiFi 7 chips, some fields and predefined length are changed, so add them accordingly. The mac_id field is used to identify peer that send a packet, and we can use it to know RSSI and traffic from the peer. For WiFi 7 chips, RXWD.mac_id of PPDU status packet is not set by hardware. Instead, we should fill it by rxinfo_user[].mac_id of PPDU status content. Also, filter out invalid reports to prevent warning messages keep showing. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231027015059.10032-4-pkshih@realtek.com commit 76d45f48e4fcf060675970829c7fde21e6e8a2f3 Author: Zong-Zhe Yang Date: Fri Oct 27 09:50:57 2023 +0800 wifi: rtw89: configure PPDU max user by chip Different chip can support different max user in one PPDU report. So, we now configure it in chip info. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231027015059.10032-3-pkshih@realtek.com commit 0f4aa3af137175dc5c5723781ec96e7792d5cda0 Author: Ping-Ke Shih Date: Fri Oct 27 09:50:56 2023 +0800 wifi: rtw89: set entry size of address CAM to H2C field by chip The new chips change hardware design to shrink entry size of address CAM from 0x40 to 0x20, so make this change accordingly. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231027015059.10032-2-pkshih@realtek.com commit 9beac4ee49286101e30a1de2fe58625f998bf77c Author: Justin Stitt Date: Thu Oct 26 23:19:18 2023 +0000 wifi: airo: replace deprecated strncpy with strscpy_pad strncpy() is deprecated for use on NUL-terminated destination strings [1] and as such we should prefer more robust and less ambiguous string interfaces. `extra` is clearly supposed to be NUL-terminated which is evident by the manual NUL-byte assignment as well as its immediate usage with strlen(). Moreover, let's NUL-pad since there is deliberate effort (48 instances) made elsewhere to zero-out buffers in these getters and setters: 6050 | memset(local->config.nodeName, 0, sizeof(local->config.nodeName)); 6130 | memset(local->config.rates, 0, 8); 6139 | memset(local->config.rates, 0, 8); 6414 | memset(key.key, 0, MAX_KEY_SIZE); 6497 | memset(extra, 0, 16); (to be clear, strncpy also NUL-padded -- we are matching that behavior) Considering the above, a suitable replacement is `strscpy_pad` due to the fact that it guarantees both NUL-termination and NUL-padding on the destination buffer. We can also replace the hard-coded size of "16" to IW_ESSID_MAX_SIZE because this function is a wext handler. In wext-core.c we have: static const struct iw_ioctl_description standard_ioctl[] = { ... [IW_IOCTL_IDX(SIOCGIWNICKN)] = { .header_type = IW_HEADER_TYPE_POINT, .token_size = 1, .max_tokens = IW_ESSID_MAX_SIZE, }, So the buffer size is (strangely) IW_ESSID_MAX_SIZE Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1] Link: https://github.com/KSPP/linux/issues/90 Cc: linux-hardening@vger.kernel.org Signed-off-by: Justin Stitt Reviewed-by: Jeff Johnson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231026-strncpy-drivers-net-wireless-cisco-airo-c-v2-1-413427249e47@google.com commit ebab2723d0bd47ea899d339d54e1c4ac459d18c3 Author: Dmitry Antipov Date: Thu Oct 26 17:10:12 2023 +0300 wifi: wilc1000: always release SDIO host in wilc_sdio_cmd53() Ensure 'sdio_release_host()' is always issued on return from 'wilc_sdio_cmd53()'. Compile tested only. Signed-off-by: Dmitry Antipov Acked-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231026141016.71407-2-dmantipov@yandex.ru commit a0ddf39ac6420e9b52200973ac07b261db8e7595 Author: Dmitry Antipov Date: Thu Oct 26 17:10:11 2023 +0300 wifi: wilc1000: simplify remain on channel support For 'struct wilc_remain_ch', drop set but otherwise unused 'duration' field and adjust 'expired' callback assuming that the only data passed to it is 'struct wilc_vif *', thus making 'wilc_remain_on_channel()' a bit simpler as well. Compile tested only. Signed-off-by: Dmitry Antipov Acked-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231026141016.71407-1-dmantipov@yandex.ru commit 58534b3be0ca4e73a652a4e63f9f5ee80a6cf891 Author: Ping-Ke Shih Date: Thu Oct 26 20:00:49 2023 +0800 wifi: rtw89: pci: generalize code of PCI control DMA IO for WiFi 7 The register to enable/disable PCI DMA IO has many variants, so define and use a field to control it accordingly. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231026120049.9187-5-pkshih@realtek.com commit 0dc9324206d3856a657cb076d78c8cc015fb57c8 Author: Ping-Ke Shih Date: Thu Oct 26 20:00:48 2023 +0800 wifi: rtw89: pci: add new RX ring design to determine full RX ring efficiently To make hardware efficient to determine if RX ring is full, introduce new design that checks if reading and writing indices are equal. Comparing to old design, initial indices of both reading and writing indices are 0 that means empty, and hardware checks full by "writing index + 1 == reading index". The "+1" has extra cost for hardware, so new design is to avoid this. Take ring size is 256 as an example, the initial reading and writing indices are 255 and 0 respectively; the initial values mean empty. If two indices are the same, for example 5 and 5, it means ring is full. wp rp used_cnt state 255 0 0 initial (ring is empty) 255 1 1 receive 1st packet 255 2 2 receive 2nd packet 0 2 1 driver read 1st packet 1 2 0 driver read 2nd packet (ring is empty) : 5 5 255 ring is full Note: 'rp' is hardware writing index Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231026120049.9187-4-pkshih@realtek.com commit 0b79c540b13506b727fcd2b689fec99dc4fc51c6 Author: Ping-Ke Shih Date: Thu Oct 26 20:00:47 2023 +0800 wifi: rtw89: pci: define PCI ring address for WiFi 7 chips PCI rings are used to DMA TX/RX packets. The address of WiFi 7 chips are different from previous ones, so add them according to hardware design. Another difference is that driver doesn't need to configure BD (buffer descriptor) RAM table, which is used by hardware to fetch BD ahead before fetching whole TX data. A TX ring contains numbers of TX BD (e.g. 512): TX BD (buffer descriptor; continual memory) +---+---+---+---+ +---+ | | | | | ... | | +-|-+---+---+---+ +---+ | | point to TX WD (WiFi descriptor; metadata of a skb data) v +------+ | | | | +-|----+ | | point to a skb data v +------+ | | | | +------+ Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231026120049.9187-3-pkshih@realtek.com commit 73b479fe5f4ad5391f69502930c1f782b4c6182f Author: Ping-Ke Shih Date: Thu Oct 26 20:00:46 2023 +0800 wifi: rtw89: 8922ae: add 8922AE PCI entry and basic info 8922AE is a PCIE 802.11be wireless adapter with PID 0x8922. We add basic configurations including PCI DMA mode, PCI parameters, register address to control TX/RX rings and etc. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231026120049.9187-2-pkshih@realtek.com commit e416514e309f7e25e577fee45a65f246f67b2261 Author: Dmitry Antipov Date: Tue Oct 24 17:31:33 2023 +0300 wifi: rtw89: fix timeout calculation in rtw89_roc_end() Since 'rtw89_core_tx_kick_off_and_wait()' assumes timeout (actually RTW89_ROC_TX_TIMEOUT) in milliseconds, I suppose that RTW89_ROC_IDLE_TIMEOUT is in milliseconds as well. If so, 'msecs_to_jiffies()' should be used in a call to 'ieee80211_queue_delayed_work()' from 'rtw89_roc_end()'. Compile tested only. Signed-off-by: Dmitry Antipov Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231024143137.30393-1-dmantipov@yandex.ru commit 7419d8ab35087ba2164e92e8c9f1e418bc303a06 Author: Dmitry Antipov Date: Mon Oct 23 12:17:06 2023 +0300 wifi: rtlwifi: rtl92ee_dm_dynamic_primary_cca_check(): fix typo in function name For rtl8192ee, change 'rtl92ee_dm_dynamic_primary_cca_ckeck()' to 'rtl92ee_dm_dynamic_primary_cca_check()' and so adjust 'rtl92ee_dm_watchdog()' as well. Compile tested only. Signed-off-by: Dmitry Antipov Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231023091722.52509-3-dmantipov@yandex.ru commit d1337ccb4477bf789a58ff50d858ffdb0e7998b4 Author: Dmitry Antipov Date: Mon Oct 23 12:17:05 2023 +0300 wifi: rtlwifi: cleanup struct rtl_phy Remove unused and read by otherwise unused 'h2c_box_num', 'rfpienable', 'reserve_0', 'reserve_1', 'iqk_in_progress', 'apk_done' and 'hw_rof_enable' fields of 'struct rtl_phy', adjust related code. Compile tested only. Signed-off-by: Dmitry Antipov Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231023091722.52509-2-dmantipov@yandex.ru commit d1e6b020c32d2c02c427ab2494a7f04da45fe614 Author: Dmitry Antipov Date: Mon Oct 23 12:17:04 2023 +0300 wifi: rtlwifi: cleanup struct rtl_hal Remove unused and set but otherwise unused 'bbrf_ready', 'external_pa', 'pa_mode', 'rx_tag', 'rts_en', 'wow_enable' and 'wow_enabled' fields of 'struct rtl_hal', adjust related code. Compile tested only. Signed-off-by: Dmitry Antipov Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231023091722.52509-1-dmantipov@yandex.ru commit a614f95797055dd96802202af542b04fead7274f Author: Justin Stitt Date: Tue Oct 17 20:11:29 2023 +0000 wifi: brcmsmac: replace deprecated strncpy with memcpy Let's move away from using strncpy and instead use the more obvious interface for this context. For wlc->pub->srom_ccode, we're just copying two bytes from ccode into wlc->pub->srom_ccode with no expectation that srom_ccode be NUL-terminated: wlc->pub->srom_ccode is only used in regulatory_hint(): 1193 | if (wl->pub->srom_ccode[0] && 1194 | regulatory_hint(wl->wiphy, wl->pub->srom_ccode)) 1195 | wiphy_err(wl->wiphy, "%s: regulatory hint failed\n", __func__); We can see that only index 0 and index 1 are accessed. 3307 | int regulatory_hint(struct wiphy *wiphy, const char *alpha2) 3308 | { ... | ... 3322 | request->alpha2[0] = alpha2[0]; 3323 | request->alpha2[1] = alpha2[1]; ... | ... 3332 | } Since this is just a simple byte copy with correct lengths, let's use memcpy(). There should be no functional change. In a similar boat, both wlc->country_default and wlc->autocountry_default are just simple byte copies so let's use memcpy. However, FWICT they aren't used anywhere. (they should be used or removed -- not in scope of my patch, though). Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231017-strncpy-drivers-net-wireless-broadcom-brcm80211-brcmfmac-cfg80211-c-v3-2-af780d74ae38@google.com commit 9d0d0a2070407fbeceb8700543eb78bb1560d18f Author: Justin Stitt Date: Tue Oct 17 20:11:28 2023 +0000 wifi: brcm80211: replace deprecated strncpy with strscpy Let's move away from using strncpy and instead favor a less ambiguous and more robust interface. For ifp->ndev->name, we expect ifp->ndev->name to be NUL-terminated based on its use in format strings within core.c: 67 | char *brcmf_ifname(struct brcmf_if *ifp) 68 | { 69 | if (!ifp) 70 | return ""; 71 | 72 | if (ifp->ndev) 73 | return ifp->ndev->name; 74 | 75 | return ""; 76 | } ... 288 | static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb, 289 | struct net_device *ndev) { ... 330 | brcmf_dbg(INFO, "%s: insufficient headroom (%d)\n", 331 | brcmf_ifname(ifp), head_delta); ... 336 | bphy_err(drvr, "%s: failed to expand headroom\n", 337 | brcmf_ifname(ifp)); For di->name, we expect di->name to be NUL-terminated based on its usage with format strings: | brcms_dbg_dma(di->core, | "%s: DMA64 tx doesn't have AE set\n", | di->name); Looking at its allocation we can see that it is already zero-allocated which means NUL-padding is not required: | di = kzalloc(sizeof(struct dma_info), GFP_ATOMIC); For wlc->modulecb[i].name, we expect each name in wlc->modulecb to be NUL-terminated based on their usage with strcmp(): | if (!strcmp(wlc->modulecb[i].name, name) && NUL-padding is not required as wlc is zero-allocated in: brcms_c_attach_malloc() -> | wlc = kzalloc(sizeof(struct brcms_c_info), GFP_ATOMIC); For all these cases, a suitable replacement is `strscpy` due to the fact that it guarantees NUL-termination on the destination buffer without unnecessarily NUL-padding. Signed-off-by: Justin Stitt Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20231017-strncpy-drivers-net-wireless-broadcom-brcm80211-brcmfmac-cfg80211-c-v3-1-af780d74ae38@google.com commit 76310edddf11a5716f324785e9caad01a90e128a Author: Jani Nikula Date: Mon Oct 23 18:02:56 2023 +0300 drm/i915/pmu: rearrange hrtimer pointer chasing Do the logical step of first getting from struct hrtimer to struct i915_pmu, and then from struct i915_pmu to struct drm_i915_private, instead of hrtimer->i915->pmu. Signed-off-by: Jani Nikula Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231023150256.438331-3-jani.nikula@intel.com commit cb476dd1b8b10a40f6ba6e230f0b408916365c1f Author: Jani Nikula Date: Mon Oct 23 18:02:55 2023 +0300 drm/i915/pmu: add event_to_pmu() helper It's tedious to duplicate the container_of() everywhere. Add a helper. Also do the logical steps of first getting from struct perf_event to struct i915_pmu, and then from struct i915_pmu to struct drm_i915_private if needed, instead of perf_event->i915->pmu. Not all places even need the i915 pointer. Signed-off-by: Jani Nikula Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231023150256.438331-2-jani.nikula@intel.com commit 874d6fe4a6962cc18bb0e62dfc23adbebd0abbe2 Author: Jani Nikula Date: Mon Oct 23 18:02:54 2023 +0300 drm/i915/pmu: add pmu_to_i915() helper It's tedious to duplicate the container_of() everywhere. Add a helper. Signed-off-by: Jani Nikula Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231023150256.438331-1-jani.nikula@intel.com commit b2139fb5051554a7f297e4ad584ef1bc26c76d5d Author: Steven Price Date: Fri Oct 20 11:44:05 2023 +0100 drm/panfrost: Remove incorrect IS_ERR() check sg_page_iter_page() doesn't return an error code, so the IS_ERR() check is wrong and the error path will never be executed. This also allows simplifying the code to remove the local variable 'page'. CC: Adrián Larumbe Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/376713ff-9a4f-4ea3-b097-fb5efb685d95@moroto.mountain Signed-off-by: Steven Price Reviewed-by: Adrián Larumbe Tested-by: Adrián Larumbe Link: https://patchwork.freedesktop.org/patch/msgid/20231020104405.53992-1-steven.price@arm.com commit 75658332bb1052867d31c67c93bfdbd86a5f7b2a Author: Jani Nikula Date: Thu Oct 26 13:13:33 2023 +0300 drm/i915: move Makefile display debugfs files next to display Keep the display build lists together. v2: Rebase Reviewed-by: Nirmoy Das Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231026101333.875406-2-jani.nikula@intel.com commit 0db5649e9e5962cc25f813f9fca08588f97fe5b8 Author: Jani Nikula Date: Thu Oct 26 13:13:32 2023 +0300 drm/i915: fix Makefile sort and indent Unify the line continuations and indents, and sort the build lists. Reviewed-by: Nirmoy Das Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231026101333.875406-1-jani.nikula@intel.com commit 79d94360d50fcd487edcfe118a47a2881534923f Author: Maíra Canal Date: Mon Oct 23 07:58:33 2023 -0300 drm/v3d: wait for all jobs to finish before unregistering Currently, we are only warning the user if the BIN or RENDER jobs don't finish before we unregister V3D. We must wait for all jobs to finish before unregistering. Therefore, warn the user if TFU or CSD jobs are not done by the time the driver is unregistered. Signed-off-by: Maíra Canal Reviewed-by: Iago Toral Quiroga Signed-off-by: Maíra Canal Link: https://patchwork.freedesktop.org/patch/msgid/20231023105927.101502-1-mcanal@igalia.com commit 36f27350ff745bd228ab04d7845dfbffc177a889 Author: Harshit Mogalapalli Date: Fri Oct 27 10:28:22 2023 -0700 i915/perf: Fix NULL deref bugs with drm_dbg() calls When i915 perf interface is not available dereferencing it will lead to NULL dereferences. As returning -ENOTSUPP is pretty clear return when perf interface is not available. Fixes: 2fec539112e8 ("i915/perf: Replace DRM_DEBUG with driver specific drm_dbg call") Suggested-by: Tvrtko Ursulin Signed-off-by: Harshit Mogalapalli Reviewed-by: Tvrtko Ursulin Cc: # v6.0+ Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20231027172822.2753059-1-harshit.m.mogalapalli@oracle.com [tursulin: added stable tag] commit 3198a62eb8f8411b605501cb78c2298c67ecee91 Author: Andrzej Kacprowski Date: Sat Oct 28 15:34:15 2023 +0200 accel/ivpu: Add support for delayed D0i3 entry message Currently the VPU firmware prepares for D0i3 every time the VPU is entering D0i2 Idle state. This is not optimal as we might not enter D0i3 every time we enter D0i2 Idle and this preparation is quite costly. This optimization moves D0i3 preparation to a dedicated message sent from the host driver only when the driver is about to enter D0i3 - this reduces power consumption and latency for certain workloads, for example audio workloads that submit inference every 10 ms. The VPU needs non zero time to enter IDLE state after responding to D0i3 entry message. If the driver does not wait for the VPU to enter IDLE state it could cause warm boot failures. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-12-stanislaw.gruszka@linux.intel.com commit cc19fedab8bdbe0f81d320ff9a6fdb3b5b01be83 Author: Stanislaw Gruszka Date: Sat Oct 28 15:34:14 2023 +0200 accel/ivpu/37xx: Print warning when VPUIP is not idle during power down Print warning if VPUIP is not idle during power down. Use warn log level also when we fail to enter reset state as this is not really an error but unexpected behavior. Reviewed-by: Krystian Pradzynski Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-11-stanislaw.gruszka@linux.intel.com commit 45e45362e0955fc3b0b622e8a0d788097f3de902 Author: Karol Wachowski Date: Sat Oct 28 15:34:13 2023 +0200 accel/ivpu: Introduce ivpu_ipc_send_receive_active() Split ivpu_ipc_send_receive() implementation to have a version that does not call pm_runtime_resume_and_get(). That implementation can be invoked when device is up and runtime resume is prohibited (for example at the end of boot sequence). The new function will be used for D0i3 entry IPC message addition in the separate change. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-10-stanislaw.gruszka@linux.intel.com commit 3de6d9597892ef899d7e90f589e23c9298013134 Author: Andrzej Kacprowski Date: Sat Oct 28 15:34:12 2023 +0200 accel/ivpu: Pass D0i3 residency time to the VPU firmware The firmware needs to know the time spent in D0i3/D3 to calculate telemetry data. The D0i3/D3 residency time is calculated by the driver and passed to the firmware in the boot parameters. The driver also passes VPU perf counter value captured right before entering D0i3 - this allows the VPU firmware to generate monotonic timestamps for the logs. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-9-stanislaw.gruszka@linux.intel.com commit db37a5bfe97588992c75c29c1f0e19c88d364ce5 Author: Andrzej Kacprowski Date: Sat Oct 28 15:34:11 2023 +0200 accel/ivpu/40xx: Capture D0i3 entry host and device timestamps The driver needs to capture the D0i3 entry timestamp to calculate D0i3 residency time. The D0i3 residency time and the VPU timestamp are passed to the firmware at D0i3 exit (warm boot). Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-8-stanislaw.gruszka@linux.intel.com commit 8b5cec3c2ccf0b12121cb151560c2876219d87e5 Author: Karol Wachowski Date: Sat Oct 28 15:34:10 2023 +0200 accel/ivpu: Change test_mode module param to bitmask Change meaning of test_mode module parameter from integer value to bitmask allowing setting different test features with corresponding bits. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-7-stanislaw.gruszka@linux.intel.com commit 61ab485f0eb1e5b7e2be10ec657a054d36ef5035 Author: Andrzej Kacprowski Date: Sat Oct 28 15:34:09 2023 +0200 accel/ivpu: Add support for VPU_JOB_FLAGS_NULL_SUBMISSION_MASK Add test_mode = 3 that add VPU_JOB_FLAGS_NULL_SUBMISSION_MASK flag to the job send to the VPU device. Then the VPU will process the job but won't execute commands (except the command to signal the fence). This can be used to estimate job processing overhead in the host software and VPU firmware. Unlike the null hardware mode, the null submission mode will still work even if UMD uses VPU fences to track job completion. Signed-off-by: Andrzej Kacprowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-6-stanislaw.gruszka@linux.intel.com commit bacc130d4671a9568352b8d7606cfe7a50d38a56 Author: Karol Wachowski Date: Sat Oct 28 15:34:08 2023 +0200 accel/ivpu: Remove reset from power up sequence Setting a non-zero work point resets the IP hence IP_RESET trigger is redundant. Signed-off-by: Karol Wachowski Reviewed-by: Stanislaw Gruszka Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-5-stanislaw.gruszka@linux.intel.com commit f13108fc7bae7085616805ed176b2114cdf4bd55 Author: Tomasz Rusinowicz Date: Sat Oct 28 15:34:07 2023 +0200 accel/ivpu: Add dvfs_mode file to debugfs Add new debugfs file to set dvfs_mode FW boot parameter and restart the FW to allow experimenting with DVFS (dynamic voltage & frequency scaling). Signed-off-by: Tomasz Rusinowicz Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-4-stanislaw.gruszka@linux.intel.com commit 9692b1dcefe79ea47f7d5a94acff74303c6563c6 Author: Stanislaw Gruszka Date: Sat Oct 28 15:34:06 2023 +0200 accel/ivpu: Remove unneeded drm_driver declaration Cleanup drm_driver declaration leftover. Reviewed-by: Krystian Pradzynski Reviewed-by: Jeffrey Hugo Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-3-stanislaw.gruszka@linux.intel.com commit 8c63b47412ad3f015db47b380916722299511cc3 Author: Krystian Pradzynski Date: Sat Oct 28 15:34:05 2023 +0200 accel/ivpu: Update FW API Bump boot API to 4.20 Bump JSM API to 3.15 Signed-off-by: Krystian Pradzynski Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231028133415.1169975-2-stanislaw.gruszka@linux.intel.com commit a3431650f30a94b179d419ef87c21213655c28cd Author: Chaitanya Kumar Borah Date: Wed Oct 18 17:06:22 2023 +0530 drm/i915/mtl: Support HBR3 rate with C10 phy and eDP in MTL eDP specification supports HBR3 link rate since v1.4a. Moreover, C10 phy can support HBR3 link rate for both DP and eDP. Therefore, do not clamp the supported rates for eDP at 6.75Gbps. Cc: BSpec: 70073 74224 Signed-off-by: Chaitanya Kumar Borah Reviewed-by: Mika Kahola Signed-off-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20231018113622.2761997-1-chaitanya.kumar.borah@intel.com commit 1470acbef122c7e2e588f6346ce459c26d0568a2 Author: Arnd Bergmann Date: Fri Oct 27 17:26:23 2023 +0200 accel/ivpu: avoid build failure with CONFIG_PM=n The usage count of struct dev_pm_info is an implementation detail that is only available if CONFIG_PM is enabled, so printing it in a debug message causes a build failure in configurations without PM: In file included from include/linux/device.h:15, from include/linux/pci.h:37, from drivers/accel/ivpu/ivpu_pm.c:8: drivers/accel/ivpu/ivpu_pm.c: In function 'ivpu_rpm_get_if_active': drivers/accel/ivpu/ivpu_pm.c:254:51: error: 'struct dev_pm_info' has no member named 'usage_count' 254 | atomic_read(&vdev->drm.dev->power.usage_count)); | ^ include/linux/dev_printk.h:129:48: note: in definition of macro 'dev_printk' 129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~ drivers/accel/ivpu/ivpu_drv.h:75:17: note: in expansion of macro 'dev_dbg' 75 | dev_dbg((vdev)->drm.dev, "[%s] " fmt, #type, ##args); \ | ^~~~~~~ drivers/accel/ivpu/ivpu_pm.c:253:9: note: in expansion of macro 'ivpu_dbg' 253 | ivpu_dbg(vdev, RPM, "rpm_get_if_active count %d\n", | ^~~~~~~~ The print message does not seem essential, so the easiest workaround is to just remove it. Fixes: c39dc15191c4 ("accel/ivpu: Read clock rate only if device is up") Signed-off-by: Arnd Bergmann Reviewed-by: Stanislaw Gruszka Signed-off-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231027152633.528490-1-arnd@kernel.org commit 0a0f7935740853ce2654a7750b84c3bd34756979 Author: Lucas De Marchi Date: Wed Oct 18 15:28:31 2023 -0700 drm/i915/display: Abstract C10/C20 pll calculation As done with the hw readout, properly abstract the C10/C20 phy details inside intel_cx0_phy.c. Signed-off-by: Lucas De Marchi Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20231018222831.4132968-3-lucas.demarchi@intel.com commit 685a4fffbf0fe23618f1824924e6dbb2517b446a Author: Lucas De Marchi Date: Wed Oct 18 15:28:30 2023 -0700 drm/i915/display: Abstract C10/C20 pll hw readout intel_cx0_phy.[ch] should contain the details about C10/C20, not leaking it to the rest of the driver. Start abstracting this by exporting a single PLL hw readout that handles the differences between C20 and C10 internally to that compilation unit. Signed-off-by: Lucas De Marchi Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20231018222831.4132968-2-lucas.demarchi@intel.com commit 28066f38d94f846e66f4116a8b1c409b47072011 Author: Lucas De Marchi Date: Thu Oct 26 11:40:45 2023 -0700 drm/i915/lnl: Fix check for TC phy With MTL adding PICA between the port and the real phy, the path add for DG2 stopped being followed and newer platforms are simply using the older path for TC phys. LNL is no different than MTL in this aspect, so just add it to the mess. In future the phy and port designation and deciding if it's TC should better be cleaned up. To make it just a bit better, also change intel_phy_is_snps() to show this is DG2-only. Signed-off-by: Lucas De Marchi Reviewed-by: Gustavo Sousa Link: https://patchwork.freedesktop.org/patch/msgid/20231026184045.1015655-3-lucas.demarchi@intel.com commit 10184a8a7f70d28ba6aae22142a7375a8c8c1924 Author: Lucas De Marchi Date: Thu Oct 26 11:40:44 2023 -0700 drm/i915/lnl: Extend C10/C20 phy For Lunar Lake, DDI-A is connected to C10 PHY, while TC1-TC3 are connected to C20 phy, like in Meteor Lake. Update the check in intel_is_c10phy() accordingly. This reverts the change in commit e388ae97e225 ("drm/i915/display: Eliminate IS_METEORLAKE checks") that turned that into a display engine version check. The phy <-> port connection is very SoC-specific and not related to that version. IS_LUNARLAKE() is defined to 0 in i915 as it's expected that the (upcoming) xe driver is the one defining the platform, with i915 only driving the display side. Bspec: 70818 Reviewed-by: Gustavo Sousa Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20231026184045.1015655-2-lucas.demarchi@intel.com commit 33f2af42a2019da4fecde30fe144a810b485762f Author: Gilbert Adikankwu Date: Thu Oct 26 11:56:23 2023 +0100 drm/i915/gt: Remove unncessary {} from if-else Fix checkpatch.pl error: WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Gilbert Adikankwu Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231026105623.480172-1-gilbertadikankwu@gmail.com commit 3db2420422a5912d97966e0176050bb0fc9aa63e Author: Sheng-Liang Pan Date: Fri Oct 27 11:04:56 2023 +0800 drm/panel-edp: Add AUO B116XTN02, BOE NT116WHM-N21,836X2, NV116WHM-N49 V8.0 Add panel identification entry for - AUO B116XTN02 family (product ID:0x235c) - BOE NT116WHM-N21,836X2 (product ID:0x09c3) - BOE NV116WHM-N49 V8.0 (product ID:0x0979) Signed-off-by: Sheng-Liang Pan Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20231027110435.1.Ia01fe9ec1c0953e0050a232eaa782fef2c037516@changeid commit 41cfbaa47fd7d94df5faf1c416801600f26270d8 Author: Pranjal Ramajor Asha Kanojiya Date: Mon Oct 16 11:01:14 2023 -0600 accel/qaic: Support MHI QAIC_TIMESYNC channel Use QAIC_TIMESYNC MHI channel to send UTC time to device in SBL environment. Remove support for QAIC_TIMESYNC MHI channel in AMSS environment as it is not used in that environment. Signed-off-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231016170114.5446-3-quic_jhugo@quicinc.com commit 6216fb03f8bd0b1439e9e799a306bafd5b462622 Author: Ajit Pal Singh Date: Mon Oct 16 11:01:13 2023 -0600 accel/qaic: Add support for periodic timesync Device and Host have a time synchronization mechanism that happens once during boot when device is in SBL mode. After that, in mission-mode there is no timesync. In an experiment after continuous operation, device time drifted w.r.t. host by approximately 3 seconds per day. This drift leads to mismatch in timestamp of device and Host logs. To correct this implement periodic timesync in driver. This timesync is carried out via QAIC_TIMESYNC_PERIODIC MHI channel. Signed-off-by: Ajit Pal Singh Signed-off-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231016170114.5446-2-quic_jhugo@quicinc.com commit bb8e97e26ce6437d2f57f37e8ba767a2b9cf0d65 Author: Carl Vanderlip Date: Mon Oct 16 11:00:36 2023 -0600 accel/qaic: Enable 1 MSI fallback mode Several virtualization use-cases either don't support 32 MultiMSIs (Xen/VMware) or have significant drawbacks to their use (KVM's vIOMMU, which is required to support 32 MSI, needs to allocate an alternate system memory space for each device using vIOMMU (e.g. 8GB VM mem and 2 cards => 8 + 2 * 8 = 24GB host memory required)). Support these cases by enabling a 1 MSI fallback mode. Whenever all 32 MSIs requested are not available, a second request for a single MSI is made. Its success is the initiator of single MSI mode. This mode causes all interrupts generated by the device to be directed to the 0th MSI (firmware >=v1.10 will do this as a response to the PCIe MSI capability configuration). Likewise, all interrupt handlers for the device are registered to the 0th MSI. Since the DBC interrupt handler checks if the DBC is in use or if there is any pending changes, the 'spurious' interrupts are disregarded. If there is work to be done, the standard threaded IRQ handler is dispatched. On every interrupt, the MHI handler wakes up its threaded interrupt handler, and attempts to wake any waiters for MHI state events. Performance is within +-0.6% for test cases that typify real world use. Larger differences ([-4,+132]%, avg +47%) exist for very simple tasks (e.g. addition) compiled for single NSPs. It is assumed that the small work and many interrupts typically cause contention (e.g. 16 NSPs vs 4 CPUs), as evidenced by the standard deviation between runs also decreasing (r=-0.48 between delta(Performace_test) and delta(StdDev_test/Avg_test)) Signed-off-by: Carl Vanderlip Reviewed-by: Pranjal Ramajor Asha Kanojiya Reviewed-by: Jeffrey Hugo Signed-off-by: Jeffrey Hugo Reviewed-by: Stanislaw Gruszka Link: https://patchwork.freedesktop.org/patch/msgid/20231016170036.5409-1-quic_jhugo@quicinc.com commit 88b02ebca8b6ea7457bed6809b1dd575420b7544 Author: Simon Ser Date: Mon Oct 23 20:36:39 2023 +0000 drm/doc: describe PATH format for DP MST This is already uAPI, xserver parses it. It's useful to document since user-space might want to lookup the parent connector. Additionally, people (me included) have misunderstood the PATH property for being stable across reboots, but since a KMS object ID is baked in there that's not the case. So PATH shouldn't be used as-is in config files and such. Signed-off-by: Simon Ser Reviewed-by: Dmitry Baryshkov Acked-by: Pekka Paalanen Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20231023203629.198109-1-contact@emersion.fr commit 81de3e296b10a13e5c9f13172825b0d8d9495c68 Author: Nirmoy Das Date: Wed Oct 18 11:38:15 2023 +0200 drm/i915: Flush WC GGTT only on required platforms gen8_ggtt_invalidate() is only needed for limited set of platforms where GGTT is mapped as WC. This was added as way to fix WC based GGTT in commit 0f9b91c754b7 ("drm/i915: flush system agent TLBs on SNB") and there are no reference in HW docs that forces us to use this on non-WC backed GGTT. This can also cause unwanted side-effects on XE_HP platforms where GFX_FLSH_CNTL_GEN6 is not valid anymore. v2: Add a func to detect wc ggtt detection (Ville) v3: Improve commit log and add reference commit (Daniel) Fixes: d2eae8e98d59 ("drm/i915/dg2: Drop force_probe requirement") Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Jani Nikula Cc: Jonathan Cavitt Cc: John Harrison Cc: Andi Shyti Cc: Ville Syrjälä Cc: Daniel Vetter Cc: # v6.2+ Suggested-by: Matt Roper Signed-off-by: Nirmoy Das Reviewed-by: Matt Roper Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231018093815.1349-1-nirmoy.das@intel.com commit 33744916196b4ed7a50f6f47af7c3ad46b730ce6 Author: Kan Liang Date: Wed Oct 25 13:16:23 2023 -0700 perf/x86/intel: Support branch counters logging The branch counters logging (A.K.A LBR event logging) introduces a per-counter indication of precise event occurrences in LBRs. It can provide a means to attribute exposed retirement latency to combinations of events across a block of instructions. It also provides a means of attributing Timed LBR latencies to events. The feature is first introduced on SRF/GRR. It is an enhancement of the ARCH LBR. It adds new fields in the LBR_INFO MSRs to log the occurrences of events on the GP counters. The information is displayed by the order of counters. The design proposed in this patch requires that the events which are logged must be in a group with the event that has LBR. If there are more than one LBR group, the counters logging information only from the current group (overflowed) are stored for the perf tool, otherwise the perf tool cannot know which and when other groups are scheduled especially when multiplexing is triggered. The user can ensure it uses the maximum number of counters that support LBR info (4 by now) by making the group large enough. The HW only logs events by the order of counters. The order may be different from the order of enabling which the perf tool can understand. When parsing the information of each branch entry, convert the counter order to the enabled order, and store the enabled order in the extension space. Unconditionally reset LBRs for an LBR event group when it's deleted. The logged counter information is only valid for the current LBR group. If another LBR group is scheduled later, the information from the stale LBRs would be otherwise wrongly interpreted. Add a sanity check in intel_pmu_hw_config(). Disable the feature if other counter filters (inv, cmask, edge, in_tx) are set or LBR call stack mode is enabled. (For the LBR call stack mode, we cannot simply flush the LBR, since it will break the call stack. Also, there is no obvious usage with the call stack mode for now.) Only applying the PERF_SAMPLE_BRANCH_COUNTERS doesn't require any branch stack setup. Expose the maximum number of supported counters and the width of the counters into the sysfs. The perf tool can use the information to parse the logged counters in each branch. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20231025201626.3000228-5-kan.liang@linux.intel.com commit 318c4985911245508f7e0bab5265e208a38b5f18 Author: Kan Liang Date: Wed Oct 25 13:16:22 2023 -0700 perf/x86/intel: Reorganize attrs and is_visible Some attrs and is_visible implementations are rather far away from one another which makes the whole thing hard to interpret. There are only two attribute groups which have both .attrs and .is_visible, group_default and group_caps_lbr. Move them together. No functional changes. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20231025201626.3000228-4-kan.liang@linux.intel.com commit 1f2376cd03dd3b965d130ed46a7c92769d614ba1 Author: Kan Liang Date: Wed Oct 25 13:16:21 2023 -0700 perf: Add branch_sample_call_stack Add a helper function to check call stack sample type. The later patch will invoke the function in several places. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20231025201626.3000228-3-kan.liang@linux.intel.com commit 85846b27072defc7ab3dcee7ff36563a040079dc Author: Kan Liang Date: Wed Oct 25 13:16:20 2023 -0700 perf/x86: Add PERF_X86_EVENT_NEEDS_BRANCH_STACK flag Currently, branch_sample_type !=0 is used to check whether a branch stack setup is required. But it doesn't check the sample type, unnecessary branch stack setup may be done for a counting event. E.g., perf record -e "{branch-instructions,branch-misses}:S" -j any Also, the event only with the new PERF_SAMPLE_BRANCH_COUNTERS branch sample type may not require a branch stack setup either. Add a new flag NEEDS_BRANCH_STACK to indicate whether the event requires a branch stack setup. Replace the needs_branch_stack() by checking the new flag. The counting event check is implemented here. The later patch will take the new PERF_SAMPLE_BRANCH_COUNTERS into account. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20231025201626.3000228-2-kan.liang@linux.intel.com commit 571d91dcadfa3cef499010b4eddb9b58b0da4d24 Author: Kan Liang Date: Wed Oct 25 13:16:19 2023 -0700 perf: Add branch stack counters Currently, the additional information of a branch entry is stored in a u64 space. With more and more information added, the space is running out. For example, the information of occurrences of events will be added for each branch. Two places were suggested to append the counters. https://lore.kernel.org/lkml/20230802215814.GH231007@hirez.programming.kicks-ass.net/ One place is right after the flags of each branch entry. It changes the existing struct perf_branch_entry. The later ARCH specific implementation has to be really careful to consistently pick the right struct. The other place is right after the entire struct perf_branch_stack. The disadvantage is that the pointer of the extra space has to be recorded. The common interface perf_sample_save_brstack() has to be updated. The latter is much straightforward, and should be easily understood and maintained. It is implemented in the patch. Add a new branch sample type, PERF_SAMPLE_BRANCH_COUNTERS, to indicate the event which is recorded in the branch info. The "u64 counters" may store the occurrences of several events. The information regarding the number of events/counters and the width of each counter should be exposed via sysfs as a reference for the perf tool. Define the branch_counter_nr and branch_counter_width ABI here. The support will be implemented later in the Intel-specific patch. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20231025201626.3000228-1-kan.liang@linux.intel.com commit d208d875667e2a29beeec5d475f4b6b164b632fa Author: Simon Ser Date: Fri Oct 20 10:19:45 2023 +0000 drm: introduce CLOSEFB IOCTL This new IOCTL allows callers to close a framebuffer without disabling planes or CRTCs. This takes inspiration from Rob Clark's unref_fb IOCTL [1] and DRM_MODE_FB_PERSIST [2]. User-space patch for wlroots available at [3]. IGT test available at [4]. v2: add an extra pad field just in case we want to extend this IOCTL in the future (Pekka, Sima). [1]: https://lore.kernel.org/dri-devel/20170509153654.23464-1-robdclark@gmail.com/ [2]: https://lore.kernel.org/dri-devel/20211006151921.312714-1-contact@emersion.fr/ [3]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4394 [4]: https://lists.freedesktop.org/archives/igt-dev/2023-October/063294.html Signed-off-by: Simon Ser Reviewed-by: Daniel Stone Acked-by: Pekka Paalanen Cc: Hans de Goede Cc: Dennis Filder Cc: Daniel Vetter Cc: Rob Clark Cc: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20231020101926.145327-2-contact@emersion.fr commit 0226ba393eb1a90d63955cc407340c5d506ecacf Author: Simon Ser Date: Fri Oct 20 10:19:38 2023 +0000 drm: extract closefb logic in separate function drm_mode_rmfb performs two operations: drop the FB from the file_priv->fbs list, and make sure the FB is no longer used on a plane. In the next commit an IOCTL which only does so former will be introduced, so let's split it into a separate function. No functional change, only refactoring. v2: no change Signed-off-by: Simon Ser Cc: Hans de Goede Cc: Dennis Filder Cc: Daniel Vetter Cc: Pekka Paalanen Cc: Rob Clark Cc: Sean Paul Reviewed-by: Daniel Stone Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231020101926.145327-1-contact@emersion.fr commit 80683bf48afcdbebbaf51057e71b2701aa07826d Author: Kunwu Chan Date: Fri Oct 27 10:44:59 2023 +0800 drm/atomic-helper: Fix spelling mistake "preceeding" -> "preceding" There is a typo in the kernel documentation for function drm_atomic_helper_wait_for_dependencies. Fix it. Signed-off-by: Kunwu Chan Signed-off-by: Hamza Mahfooz Link: https://patchwork.freedesktop.org/patch/msgid/20231027024459.12793-1-chentao@kylinos.cn commit 6ce33a8a45496d4eca27b45ab9b8c2436c657495 Author: Soumya Negi Date: Wed Oct 25 21:43:08 2023 -0700 drm/i915/gt: Remove {} from if-else In accordance to Linux coding style(Documentation/process/4.Coding.rst), remove unneeded braces from if-else block as all arms of this block contain single statements. Suggested-by: Andi Shyti Signed-off-by: Soumya Negi Acked-by: Karolina Stolarek Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231026044309.17213-1-soumya.negi97@gmail.com commit 9e4db199e66d427c50458f4d72734cc4f0b92948 Author: Javier Martinez Canillas Date: Sat Oct 21 00:52:57 2023 +0200 drm/ssd130x: Fix possible uninitialized usage of crtc_state variable Avoid a possible uninitialized use of the crtc_state variable in function ssd132x_primary_plane_atomic_check() and avoid the following Smatch warn: drivers/gpu/drm/solomon/ssd130x.c:921 ssd132x_primary_plane_atomic_check() error: uninitialized symbol 'crtc_state'. Fixes: fdd591e00a9c ("drm/ssd130x: Add support for the SSD132x OLED controller family") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/dri-devel/7dd6ca45-8263-44fe-a318-2fd9d761425d@moroto.mountain/ Signed-off-by: Javier Martinez Canillas Acked-by: Jocelyn Falempe Link: https://patchwork.freedesktop.org/patch/msgid/20231020225338.1686974-1-javierm@redhat.com commit 171c5f641031c0eee424ba79a3db4736c32e18ca Author: Javier Martinez Canillas Date: Sat Oct 21 00:30:17 2023 +0200 dt-bindings: display: ssd132x: Remove '-' before compatible enum This is a leftover from when the binding schema had the compatible string property enum as a 'oneOf' child and the '-' was not removed when 'oneOf' got dropped during the binding review process. Reported-by: Rob Herring Closes: https://lore.kernel.org/dri-devel/CAL_Jsq+h8DcnpKqhokQOODCc8+Qi3M0PrxRFKz_Y4v37yMJvvA@mail.gmail.com/ Signed-off-by: Javier Martinez Canillas Acked-by: Conor Dooley Reviewed-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20231020223029.1667190-1-javierm@redhat.com commit 8d68a0ac9f3f308967bbdf3af37de818a6ed321d Author: Jani Nikula Date: Wed Oct 11 23:22:59 2023 +0300 drm/i915/sprite: move sprite_name() to intel_sprite.c Move sprite_name() where its only user is, and convert it to a function, removing the implicit dev_priv usage. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20231011202259.1090131-1-jani.nikula@intel.com commit b662c19654ca7fdb1dadd304ca3e26024fc89635 Author: Mika Kahola Date: Mon Oct 16 15:55:44 2023 +0300 drm/i915/display: Reset message bus after each read/write operation Every know and then we receive the following error when running for example IGT test kms_flip. [drm] *ERROR* PHY G Read 0d80 failed after 3 retries. [drm] *ERROR* PHY G Write 0d81 failed after 3 retries. Since the error is sporadic in nature, the patch proposes to reset the message bus after every successful or unsuccessful read or write operation. v2: Add FIXME's to indicate the experimental nature of this workaround (Rodrigo) v3: Dropping the additional delay as moving reset to *_read_once() and *_write_once() functions seem unnecessary delay Signed-off-by: Mika Kahola Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20231016125544.719963-1-mika.kahola@intel.com commit ffc02c67bf8d4909bd9571fbd14104381fe36b21 Author: Nirmoy Das Date: Mon Oct 23 14:13:05 2023 +0200 drm/i915/gt: Use proper priority enum instead of 0 I915_PRIORITY_NORMAL is 0 so use that instead for better readability. Cc: John Harrison Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231023121305.12560-1-nirmoy.das@intel.com commit a1196dac2f504f89bc7941e8c63db50f1fe713f3 Author: Vinod Govindapillai Date: Wed Oct 18 13:27:23 2023 +0300 drm/i915: remove display device info from i915 capabilities Display device and display runtime info is exposed as part of i915_display_capabilities debugfs entry. Remove this information from i915_ capabilities as it is now reduntant. Signed-off-by: Vinod Govindapillai Reviewed-by: Chaitanya Kumar Borah Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231018102723.16915-3-vinod.govindapillai@intel.com commit 0520b30b219053cd789909bca45b3c486ef3ee09 Author: Arnd Bergmann Date: Mon Oct 16 22:10:04 2023 +0200 drm/i915/mtl: avoid stringop-overflow warning The newly added memset() causes a warning for some reason I could not figure out: In file included from arch/x86/include/asm/string.h:3, from drivers/gpu/drm/i915/gt/intel_rc6.c:6: In function 'rc6_res_reg_init', inlined from 'intel_rc6_init' at drivers/gpu/drm/i915/gt/intel_rc6.c:610:2: arch/x86/include/asm/string_32.h:195:29: error: '__builtin_memset' writing 16 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] 195 | #define memset(s, c, count) __builtin_memset(s, c, count) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/gt/intel_rc6.c:584:9: note: in expansion of macro 'memset' 584 | memset(rc6->res_reg, INVALID_MMIO_REG.reg, sizeof(rc6->res_reg)); | ^~~~~~ In function 'intel_rc6_init': Change it to an normal initializer and an added memcpy() that does not have this problem. Fixes: 4bb9ca7ee074 ("drm/i915/mtl: C6 residency and C state type for MTL SAMedia") Signed-off-by: Arnd Bergmann Reviewed-by: Jani Nikula Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231016201012.1022812-1-arnd@kernel.org commit 8d3265a76fcf9f5c5064ecef563ec672d60902d4 Author: Jouni Högander Date: Tue Oct 24 15:41:09 2023 +0300 drm/i915/display: Move enable_dp_mst under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-24-jouni.hogander@intel.com commit 192a4444abc88d0e95966a4bb5085d58bed03162 Author: Jouni Högander Date: Tue Oct 24 15:41:08 2023 +0300 drm/i915/display: Move nuclear_pageflip under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-23-jouni.hogander@intel.com commit f2e71d2c6bbb9ebf3e3dfdf533ba2cab413842aa Author: Jouni Högander Date: Tue Oct 24 15:41:07 2023 +0300 drm/i915/display: Move verbose_state_checks under display v2: Change device parameter permissions to 0400 Cc: Luca Coelho Cc: Jani Nikula Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-22-jouni.hogander@intel.com commit 514bec3387426f42e88a49bf62f9b0f5eb528b9e Author: Jouni Högander Date: Tue Oct 24 15:41:06 2023 +0300 drm/i915/display: Use device parameters instead of module in I915_STATE_WARN Also make module parameter as non writable. Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-21-jouni.hogander@intel.com commit d3e6d002ed203d8beb66cfdf7eed948ed963ef94 Author: Jouni Högander Date: Tue Oct 24 15:41:05 2023 +0300 drm/i915/display: Move disable_display parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-20-jouni.hogander@intel.com commit 1f3f5eb3b084e91f223d548b0646e8adeeff0779 Author: Jouni Högander Date: Tue Oct 24 15:41:04 2023 +0300 drm/i915/display: Move force_reset_modeset_test parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-19-jouni.hogander@intel.com commit 98a4784e201c22b1bab08b602ccfbe02d9108bec Author: Jouni Högander Date: Tue Oct 24 15:41:03 2023 +0300 drm/i915/display: Move load_detect_test parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-18-jouni.hogander@intel.com commit 5621e0652dc9eeb2be2f7784ceca50ddce1ff025 Author: Jouni Högander Date: Tue Oct 24 15:41:02 2023 +0300 drm/i915/display: Move enable_dpcd_backlight module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-17-jouni.hogander@intel.com commit 87706a67ad57725470a0512d26ea2aaca700e2d5 Author: Jouni Högander Date: Tue Oct 24 15:41:01 2023 +0300 drm/i915/display: Move edp_vswing module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-16-jouni.hogander@intel.com commit 5234105ea8ad0c2655b2cac398c3ae564528eff1 Author: Jouni Högander Date: Tue Oct 24 15:41:00 2023 +0300 drm/i915/display: Move invert_brightness module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-15-jouni.hogander@intel.com commit c39fc2aca32a93d88e4e90ec6f2148b3491ad88f Author: Jouni Högander Date: Tue Oct 24 15:40:59 2023 +0300 drm/i915/display: Move enable_ips module parameter under display Move enable_ips module parameter under display and change it as boolean. v2: - Change enable_ip as boolean - Fix copy paste error (i915_param -> intel_display_param) Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-14-jouni.hogander@intel.com commit bfcda58ba1555ac0596d851ae6d748cdebff1af7 Author: Jouni Högander Date: Tue Oct 24 15:40:58 2023 +0300 drm/i915/display: Move disable_power_well module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-13-jouni.hogander@intel.com commit 5067ec645ece12421d802e0dd9510e89122efcc2 Author: Jouni Högander Date: Tue Oct 24 15:40:57 2023 +0300 drm/i915/display: Move enable_sagv module parameter under display Move enable_sagv module parameter under display and change the parameter permissions to non-writblase (0400) v2: Change permissions to 0400 Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-12-jouni.hogander@intel.com commit 04da42b4cc9429d8fff854d144f80396cbdecb46 Author: Jouni Högander Date: Tue Oct 24 15:40:56 2023 +0300 drm/i915/display: Move enable_dpt module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-11-jouni.hogander@intel.com commit 0deee706f116778429d03131efb7d29273442d9c Author: Jouni Högander Date: Tue Oct 24 15:40:55 2023 +0300 drm/i915/display: Move enable_dc module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-10-jouni.hogander@intel.com commit 5fb2e673c76d27436b02cef6c6f9669e106c1b1b Author: Jouni Högander Date: Tue Oct 24 15:40:54 2023 +0300 drm/i915/display: Move vbt_sdvo_panel_type module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-9-jouni.hogander@intel.com commit 94232d1637c5675f19a434e5118d0d6718ee310a Author: Jouni Högander Date: Tue Oct 24 15:40:53 2023 +0300 drm/i915/display: Move panel_use_ssc module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-8-jouni.hogander@intel.com commit d541697e8043b7b5d8e1f39b1c046dc140406e82 Author: Jouni Högander Date: Tue Oct 24 15:40:52 2023 +0300 drm/i915/display: Move lvds_channel_mode module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-7-jouni.hogander@intel.com commit 29292bc6cc3785d3da6b733a413e387282664f71 Author: Jouni Högander Date: Tue Oct 24 15:40:51 2023 +0300 drm/i915/display: Move vbt_firmware module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-6-jouni.hogander@intel.com commit 942d654171bdaf41bc5c298857c5a342031d8154 Author: Jouni Högander Date: Tue Oct 24 15:40:50 2023 +0300 drm/i915/display: Move psr related module parameters under display Move psr related module parameters under display. Also fix error in enable_psr2_sel_fetch module parameter descrtiption. It was saying disabled by default while it's vice versa. Also psr_safest_params was missing default value in description. This is now added. v2: - Fix enable_psr2_sel_fetch description. - Add default value into psr_safest_params description. Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-5-jouni.hogander@intel.com commit 6f4f8aef7e4220a3369b40a94f694ecc014adf13 Author: Jouni Högander Date: Tue Oct 24 15:40:49 2023 +0300 drm/i915/display: Move enable_fbc module parameter under display Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-4-jouni.hogander@intel.com commit 7a61a6aa59e479ee22a859fe4054973d3aa6c640 Author: Jouni Högander Date: Tue Oct 24 15:40:48 2023 +0300 drm/i915/display: Dump also display parameters GPU error dump contained all module parameters. If we are moving display parameters to intel_display_params.[ch] they are not dumped into GPU error dump. This patch is adding moved display parameters back to GPU error dump. Display parameters are also included in i915_capabilities v2: Add parameters to i915_capabilities as well Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-3-jouni.hogander@intel.com commit 8015bee0bfec6920f2441e5adc77e6ac2b65be8b Author: Jouni Högander Date: Tue Oct 24 15:40:47 2023 +0300 drm/i915/display: Add framework to add parameters specific to display Currently all module parameters are handled by i915_param.c/h. This is a problem for display parameters when Xe driver is used. Add a mechanism to add parameters specific to the display. This is mainly copied from i915_[debugfs]_params.[ch]. Parameters are not yet moved. This is done by subsequent patches. v2: - Drop unused predefinition (dentry) - Clarify need for empty INTEL_DISPLAY_PARAMS_FOR_EACH in comment Signed-off-by: Jouni Högander Acked-by: Jani Nikula Reviewed-by: Luca Coelho Link: https://patchwork.freedesktop.org/patch/msgid/20231024124109.384973-2-jouni.hogander@intel.com commit bc725dc1a8317abb2403b3a906106dbe0d4d4422 Author: Vinod Govindapillai Date: Wed Oct 18 13:27:22 2023 +0300 drm/i915/display: debugfs entry to list display capabilities Create a separate debugfs entry to list the display capabilities IGT can rely on this debugfs entry for tests that depend on display device and display runtime info for both xe and i915 drivers. v2: rename the entry to i915_display_capabilities (Chaitanya) Signed-off-by: Vinod Govindapillai Reviewed-by: Chaitanya Kumar Borah Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20231018102723.16915-2-vinod.govindapillai@intel.com commit 31f6a06f0c543b43a38fab10f39e5fc45ad62aa2 Author: Umesh Nerlige Ramappa Date: Fri Oct 20 08:24:41 2023 -0700 drm/i915/pmu: Check if pmu is closed before stopping event When the driver unbinds, pmu is unregistered and i915->uabi_engines is set to RB_ROOT. Due to this, when i915 PMU tries to stop the engine events, it issues a warn_on because engine lookup fails. All perf hooks are taking care of this using a pmu->closed flag that is set when PMU unregisters. The stop event seems to have been left out. Check for pmu->closed in pmu_event_stop as well. Based on discussion here - https://patchwork.freedesktop.org/patch/492079/?series=105790&rev=2 v2: s/is/if/ in commit title v3: Add fixes tag and cc stable Cc: # v5.11+ Fixes: b00bccb3f0bb ("drm/i915/pmu: Handle PCI unbind") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Signed-off-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231020152441.3764850-1-umesh.nerlige.ramappa@intel.com commit 8fa1c7cd1fe9cdfc426a603e1f1eecd3f463c487 Author: Matt Roper Date: Thu Oct 19 10:02:42 2023 -0700 drm/i915/mcr: Hold GT forcewake during steering operations The steering control and semaphore registers are inside an "always on" power domain with respect to RC6. However there are some issues if higher-level platform sleep states are entering/exiting at the same time these registers are accessed. Grabbing GT forcewake and holding it over the entire lock/steer/unlock cycle ensures that those sleep states have been fully exited before we access these registers. This is expected to become a formally documented/numbered workaround soon. Note that this patch alone isn't expected to have an immediately noticeable impact on MCR (mis)behavior; an upcoming pcode firmware update will also be necessary to provide the other half of this workaround. v2: - Move the forcewake inside the Xe_LPG-specific IP version check. This should only be necessary on platforms that have a steering semaphore. Fixes: 3100240bf846 ("drm/i915/mtl: Add hardware-level lock for steering") Cc: Radhakrishna Sripada Cc: Jonathan Cavitt Signed-off-by: Matt Roper Reviewed-by: Radhakrishna Sripada Reviewed-by: Jonathan Cavitt Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231019170241.2102037-2-matthew.d.roper@intel.com commit a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0 Merge: 7eeaedf79989a 11ae5eb516b65 Author: Tvrtko Ursulin Date: Tue Oct 24 09:50:22 2023 +0100 Merge drm/drm-next into drm-intel-gt-next Work that needs to land in drm-intel-gt-next depends on two patches only present in drm-intel-next, absence of which is causing a merge conflict: 3b918f4f0c8b ("drm/i915/pxp: Optimize GET_PARAM:PXP_STATUS") ac765b7018f6 ("drm/i915/pxp/mtl: intel_pxp_init_hw needs runtime-pm inside pm-complete") Signed-off-by: Tvrtko Ursulin commit a388b41a426ebd84ecd8ab12d6aaae7e06344a5b Author: Jani Nikula Date: Wed Oct 11 19:21:02 2023 +0300 drm/i915: stop including i915_utils.h from intel_runtime_pm.h Remove an unnecessary include. Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20231011162102.1030354-1-jani.nikula@intel.com commit fa072c0d9240233a281097f1f2a965441654eaa2 Author: Jani Nikula Date: Wed Oct 11 23:15:33 2023 +0300 drm/i915/aux: rename dev_priv to i915 No reason to stick to dev_priv, rename to i915. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20231011201533.1081368-2-jani.nikula@intel.com commit 26eb4fcf2349b3dc02ee6f96925419eb7b3026d0 Author: Jani Nikula Date: Wed Oct 11 23:15:32 2023 +0300 drm/i915/aux: add separate register macros and functions for VLV/CHV Add separate macros for VLV/CHV registers without the implicit dev_priv, and with the display MMIO base baked in. A number of implicitly used dev_priv local variables can be removed. Signed-off-by: Jani Nikula Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20231011201533.1081368-1-jani.nikula@intel.com commit f17c08a6046f0c9383a61d7009216b0ad3369db4 Author: Jani Nikula Date: Wed Oct 11 17:27:04 2023 +0300 drm/i915: drop gt/intel_gt.h include from skl_universal_plane.c No longer needed after commit 94bcf876cb6a ("drm/i915/mtl: Drop Wa_14017240301"). Signed-off-by: Jani Nikula Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20231011142704.985867-1-jani.nikula@intel.com commit 3594d00b71eea66d183b310c19aa5a6bf4206e62 Author: Jouni Högander Date: Thu Oct 12 10:21:58 2023 +0300 drm/i915/display: Use intel_bo_to_drm_bo instead of obj->base Xe and i915 objects have differing implementation. Use intel_bo_to_drm_bo instead of obj->base as xe_bo doesn't have base pointer. Signed-off-by: Jouni Högander Reviewed-by: Juha-Pekka Heikkila Link: https://patchwork.freedesktop.org/patch/msgid/20231012072158.4115795-3-jouni.hogander@intel.com commit 501069dad5214fafe1b8ba38fa26a5d07df784c3 Author: Jouni Högander Date: Thu Oct 12 10:21:57 2023 +0300 drm/i915/display: Move releasing gem object away from fb tracking As a preparation for Xe we want to remove all i915_gem_object details away from frontbuffer tacking code. Due to this move releasing gem object reference to i915_gem_object_set_frontbuffer. Signed-off-by: Jouni Högander Reviewed-by: Juha-Pekka Heikkila Link: https://patchwork.freedesktop.org/patch/msgid/20231012072158.4115795-2-jouni.hogander@intel.com commit 8677233e59137f78d4d578f3d5a21557c1bab342 Author: Rayyan Ansari Date: Sat Sep 30 23:08:01 2023 +0100 ARM: dts: qcom: add device tree for Nokia Lumia 830 Add an initial device tree for the Nokia Lumia 830, codenamed "tesla". Co-developed-by: Dominik Kobinski Signed-off-by: Dominik Kobinski Co-developed-by: Ivaylo Ivanov Signed-off-by: Ivaylo Ivanov Co-developed-by: Jack Matthews Signed-off-by: Jack Matthews Signed-off-by: Rayyan Ansari Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230930221323.101289-7-rayyan@ansari.sh Signed-off-by: Bjorn Andersson commit 00400a98b2c3fd5d497635747fec4b882299bc05 Author: Rayyan Ansari Date: Sat Sep 30 23:08:00 2023 +0100 ARM: dts: qcom: add device tree for Nokia Lumia 735 Add an initial device tree for the Nokia Lumia 735, codenamed "superman-lte". Co-developed-by: Dominik Kobinski Signed-off-by: Dominik Kobinski Co-developed-by: Ivaylo Ivanov Signed-off-by: Ivaylo Ivanov Co-developed-by: Jack Matthews Signed-off-by: Jack Matthews Signed-off-by: Rayyan Ansari Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230930221323.101289-6-rayyan@ansari.sh Signed-off-by: Bjorn Andersson commit a16f3bcf867efdab422b711b18c023089fbeb96e Author: Rayyan Ansari Date: Sat Sep 30 23:07:59 2023 +0100 ARM: dts: qcom: add device tree for Microsoft Lumia 640 XL Add an initial device tree for the Microsoft Lumia 640 XL, codenamed "makepeace". Co-developed-by: Dominik Kobinski Signed-off-by: Dominik Kobinski Co-developed-by: Ivaylo Ivanov Signed-off-by: Ivaylo Ivanov Co-developed-by: Jack Matthews Signed-off-by: Jack Matthews Signed-off-by: Rayyan Ansari Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230930221323.101289-5-rayyan@ansari.sh Signed-off-by: Bjorn Andersson commit 45dbc34693e8ad30c33edfdc94acaf4672de0e24 Author: Rayyan Ansari Date: Sat Sep 30 23:07:58 2023 +0100 ARM: dts: qcom: add device tree for Microsoft Lumia 640 Add an initial device tree for the Microsoft Lumia 640, codenamed "dempsey". Co-developed-by: Dominik Kobinski Signed-off-by: Dominik Kobinski Co-developed-by: Ivaylo Ivanov Signed-off-by: Ivaylo Ivanov Co-developed-by: Jack Matthews Signed-off-by: Jack Matthews Signed-off-by: Rayyan Ansari Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230930221323.101289-4-rayyan@ansari.sh Signed-off-by: Bjorn Andersson commit 244281556a11549501eb5093e9ab0ad8a87b7d4f Author: Rayyan Ansari Date: Sat Sep 30 23:07:57 2023 +0100 ARM: dts: qcom: add common dt for MSM8x26 Lumias along with Nokia Lumia 630 Add a common device tree for Lumia phones based on the Qualcomm MSM8x26 family of chipsets. Currently supports: - Framebuffer - Touchscreen - Keys - Regulators - MMC - USB - UART Also add an initial device tree for the Nokia Lumia 630, codenamed "moneypenny". Co-developed-by: Dominik Kobinski Signed-off-by: Dominik Kobinski Co-developed-by: Ivaylo Ivanov Signed-off-by: Ivaylo Ivanov Co-developed-by: Jack Matthews Signed-off-by: Jack Matthews Signed-off-by: Rayyan Ansari Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230930221323.101289-3-rayyan@ansari.sh Signed-off-by: Bjorn Andersson commit c493a2b37a9e9b7864389d72dd9c67d1d39cfc61 Author: Rayyan Ansari Date: Sat Sep 30 23:07:56 2023 +0100 dt-bindings: arm: qcom: Document MSM8x26-based Lumia phones Document MSM8226 and MSM8926 Lumias. Signed-off-by: Rayyan Ansari Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20230930221323.101289-2-rayyan@ansari.sh Signed-off-by: Bjorn Andersson commit a21796c631734ea5cf62507e63a2479261880514 Author: André Apitzsch Date: Fri Oct 13 22:51:37 2023 +0200 arm64: dts: qcom: msm8939-longcheer-l9100: Enable RGB LED l9100 uses KTD2026 LED driver. Add it to the device tree. Signed-off-by: André Apitzsch Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231013-bq_leds-v1-2-cc374369fc56@apitzsch.eu Signed-off-by: Bjorn Andersson commit 5017b8cdb7ebeb32d7f12a05b34d58662e137dbe Author: André Apitzsch Date: Fri Oct 13 22:51:36 2023 +0200 arm64: dts: qcom: msm8916-longcheer-l8910: Enable RGB LED l8910 uses KTD2026 LED driver. Add it to the device tree. Tested-by: Stephan Gerhold Signed-off-by: André Apitzsch Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231013-bq_leds-v1-1-cc374369fc56@apitzsch.eu Signed-off-by: Bjorn Andersson commit dd5ab5d2ca722110c82459a571e367df7ee6d821 Author: Lin, Meng-Bo Date: Tue Oct 3 15:18:32 2023 +0200 arm64: dts: qcom: msm8939-samsung-a7: Add sound and modem Enable sound and modem for the Samsung A7. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except for the same differences as the MSM8916-based Samsung A2015 devices: - NXP TFA9895 codec for speaker on Quaternary MI2S - Samsung-specific audio jack detection (not supported yet) Signed-off-by: "Lin, Meng-Bo" [Stephan: Add consistent commit message, minor refactoring] Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-14-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit cf12268e1b632c6ac16185bd1230af6e1ca517fb Author: Lin, Meng-Bo Date: Tue Oct 3 15:18:31 2023 +0200 arm64: dts: qcom: msm8916-samsung-j5: Add sound and modem Enable sound and modem for the Samsung J5 smartphones. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - There is no secondary microphone, so a different "model" is used to differentiate that in the UCM configuration. - Samsung-specific audio jack detection (not supported yet) Co-developed-by: Markuss Broks Signed-off-by: Markuss Broks Signed-off-by: "Lin, Meng-Bo" [Stephan: Add consistent commit message] Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-13-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 4f6b5edbcfbaa1061c29e6259cc5653f44b673da Author: Jasper Korten Date: Tue Oct 3 15:18:30 2023 +0200 arm64: dts: qcom: msm8916-samsung-gt5: Add sound and modem Enable sound and modem for the Samsung Galaxy Tab A 2015 tablets. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Headphones/microphones via digital/analog codec in MSM8916/PM8916. Earpiece exists on samsung-gt58 only. - WWAN Internet via BAM-DMUX except: - gt510: Stereo Maxim MAX98357A codecs for speaker on Quaternary MI2S - gt58: Mono NXP TFA9895 codec for speaker on Quaternary MI2S - For some reason connected to GPIOs where no hardware I2C controller is available -> need to use i2c-gpio - Samsung-specific audio jack detection (not supported yet) Signed-off-by: Jasper Korten Co-developed-by: Siddharth Manthan Signed-off-by: Siddharth Manthan Co-developed-by: Nikita Travkin Signed-off-by: Nikita Travkin [Stephan: Add consistent commit message, minor refactoring] Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-12-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 2821c34a996b4a0991d33bead5caa84267e2dccd Author: Jonathan Albrieux Date: Tue Oct 3 15:18:29 2023 +0200 arm64: dts: qcom: msm8916-longcheer-l8910: Add sound and modem Enable sound and modem for the Longcheer L8910 (BQ Aquaris X5). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX except: - Awinic AW8738 connected to HPH_R (headphones) output of the analog codec. Note that unlike for wingtech-wt88047 there is no analog switch that would allow disabling output via the headphone jack when the speaker is enabled. Signed-off-by: Jonathan Albrieux Co-developed-by: Stephan Gerhold Signed-off-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-11-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 836d083524888069cd358776a4e6c4ceec04962e Author: Luca Weiss Date: Wed Jul 12 09:52:07 2023 +0200 ARM: dts: qcom: msm8226: provide dsi phy clocks to mmcc Some mmcc clocks have dsi0pll & dsi0pllbyte as clock parents so we should provide them in the dt, which I missed in the commit adding the mdss nodes. Fixes: d5fb01ad5eb4 ("ARM: dts: qcom: msm8226: Add mdss nodes") Signed-off-by: Luca Weiss Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230712-msm8226-dsi-clock-fixup-v1-1-71010b0b89ca@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 4960e06d386ecc5307bc2e66a77d5f06df1e2a6f Author: Luca Weiss Date: Tue Jun 27 21:45:14 2023 +0200 ARM: dts: qcom: msm8974: sort nodes by reg Some nodes weren't sorted by reg, so fix that now. Now all nodes inside /soc should be sorted correctly. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230627-msm8974-sort-v1-2-75c5800a2e09@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 207f4ce365819ac68b634153d074252338d00ef6 Author: Luca Weiss Date: Tue Jun 27 21:45:13 2023 +0200 ARM: dts: qcom: msm8974: replace incorrect indentation in interconnect The clocks definition in the interconnect nodes should use tabs (+ 1 space) for indentation instead of 9 spaces. Fix that. Signed-off-by: Luca Weiss Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230627-msm8974-sort-v1-1-75c5800a2e09@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 1ab407193d38c775261d7beccd080e88f68c7243 Author: Nikita Travkin Date: Tue Oct 3 15:18:28 2023 +0200 arm64: dts: qcom: msm8916-longcheer-l8150: Add sound and modem Enable sound and modem for the Longcheer L8150 (e.g. Wileyfox Swift). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX except: - The mpss firmware region must be relocated to a different address. This is because the wcnss firmware is not relocatable for some reason. The mpss firmware is too large to avoid overlap with wcnss when placed at the default address (0x86800000). Surprisingly the vendor kernel does not handle this. The firmware regions end up overlapping there and somehow this does not explode. We try to handle this more safely by relocating the mpss region to the first higher address that is working correctly: 0x8e800000. Signed-off-by: Nikita Travkin Co-developed-by: Stephan Gerhold Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-10-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 462cdffaa83df28d5fbd0c1771eaa85954114c77 Author: J.R. Divya Antony Date: Tue Oct 3 15:18:27 2023 +0200 arm64: dts: qcom: msm8916-asus-z00l: Add sound and modem Enable sound and modem for the ASUS Zenfone 2 Laser. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speakear/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX Signed-off-by: "J.R. Divya Antony" [Stephan: rebase and simplify, add consistent commit message] Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-9-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 5d1cec28fd4d09e82e028903423829f59a033965 Author: Vincent Knecht Date: Tue Oct 3 15:18:26 2023 +0200 arm64: dts: qcom: msm8916-alcatel-idol347: Add sound and modem Enable sound and modem for the Alcatel Idol 3 (4.7"). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - Stereo NXP TFA9890 codecs for speakers on Quaternary MI2S - These are also used as earpieces at the top/bottom. - Asahi Kasei AK4375 headphone codec on Secondary MI2S -> Primary MI2S is not used for playback Signed-off-by: Vincent Knecht [Stephan: Minor refactoring, add consistent commit message] Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-8-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 5db767ae36255c0301ede64ee8993e0909efa73f Author: Stephan Gerhold Date: Tue Oct 3 15:18:25 2023 +0200 arm64: dts: qcom: msm8916-wingtech-wt88047: Add sound and modem Enable sound and modem for the Xiaomi Redmi 2. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX except: - Speaker amplifier is connected to HPH_R (headphones) output of the analog codec. There is a separate analog switch that allows disabling playback via the headphone jack. Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-7-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 6b66abd5858e025b2715b1efb193124dd7cc17c5 Author: Stephan Gerhold Date: Tue Oct 3 15:18:24 2023 +0200 arm64: dts: qcom: msm8916-samsung-serranove: Add sound and modem Enable sound and modem for the Samsung S4 Mini Value Edition. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - Samsung-specific audio jack detection (not supported yet) Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-6-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit f276411d0f8286c7ff3e1bd6917ea7ee61152d24 Author: Stephan Gerhold Date: Tue Oct 3 15:18:23 2023 +0200 arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem Enable sound and modem for the Samsung A2015 based devices (A3, A5, E5, E7, Grand Max). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - NXP TFA9895 codec for speaker on Quaternary MI2S - Samsung-specific audio jack detection (not supported yet) [Lin: Add e2015 and grandmax] Co-developed-by: "Lin, Meng-Bo" Signed-off-by: "Lin, Meng-Bo" Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-5-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 8abbd235b2ecbfba0a445ccd400a54af8fd83bc2 Author: Stephan Gerhold Date: Tue Oct 3 15:18:22 2023 +0200 arm64: dts: qcom: msm8916: Add common msm8916-modem-qdsp6.dtsi Most MSM8916/MSM8939 devices use very similar setups for the modem, because most of the device-specific details are abstracted by the modem firmware. There are several definitions (status switches, DAI links etc) that will be exactly the same for every board. Introduce a common msm8916-modem-qdsp6.dtsi include that can be used to simplify enabling the modem for such devices. By default the digital/analog codec in the SoC/PMIC is used, but boards can define additional codecs by adding additional backend DAI links. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-4-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 0718ff7185cf42f8e817e39552feb9d6ed901aff Author: Stephan Gerhold Date: Tue Oct 3 15:18:21 2023 +0200 arm64: dts: qcom: msm8939: Add QDSP6 MSM8939 does not have a dedicated ADSP. Instead, the audio services via APR are also implemented by the modem DSP. Audio can be either routed via the modem DSP (necessary for voice call audio etc) or directly sent to the LPASS hardware (currently used by DB410c). Bypassing QDSP6 audio is only possible with special firmware (on DB410c) or when the modem DSP is completely disabled. Add the typical nodes for QDSP6 audio to msm8939.dtsi. The apr node is disabled by default to avoid changing behavior for devices like apq8039-t2 that use the bypassed audio path. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-3-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 861aa8e6829cf2f1a9c5a52dd9cebc722cf7ca44 Author: Stephan Gerhold Date: Tue Oct 3 15:18:20 2023 +0200 arm64: dts: qcom: msm8916: Add QDSP6 MSM8916 does not have a dedicated ADSP. Instead, the audio services via APR are also implemented by the modem DSP. Audio can be either routed via the modem DSP (necessary for voice call audio etc) or directly sent to the LPASS hardware (currently used by DB410c). Bypassing QDSP6 audio is only possible with special firmware (on DB410c) or when the modem DSP is completely disabled. Add the typical nodes for QDSP6 audio to msm8916.dtsi. The apr node is disabled by default to avoid changing behavior for devices like DB410c that use the bypassed audio path. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-2-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit 32f963412a2d8cb65ff2737e6763f88ed15a2efb Author: Vincent Knecht Date: Tue Oct 3 15:18:19 2023 +0200 arm64: dts: qcom: msm8939: Add BAM-DMUX WWAN BAM DMUX is used as the network interface to the modem. This is copied as-is from msm8916.dtsi. Signed-off-by: Vincent Knecht Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20231003-msm8916-modem-v2-1-61b684be55c0@gerhold.net Signed-off-by: Bjorn Andersson commit a3457cc5bc30ad053c90ae9f14e9b7723d204a98 Author: Johan Hovold Date: Tue Oct 3 11:36:47 2023 +0200 arm64: dts: qcom: sc8280xp-x13s: add missing camera LED pin config Add the missing pin configuration for the recently added camera indicator LED. Fixes: 1c63dd1c5fda ("arm64: dts: qcom: sc8280xp-x13s: Add camera activity LED") Cc: Konrad Dybcio Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20231003093647.3840-1-johan+linaro@kernel.org Signed-off-by: Bjorn Andersson commit 6cd8621758004d98f7c622c2d756c116c6888127 Author: Luca Weiss Date: Mon Oct 2 09:00:12 2023 +0200 arm64: dts: qcom: pm7250b: Use correct node name for gpios Use gpio@ instead of pinctrl@ as that's the name expected by the qcom,spmi-pmic.yaml schema. Update it to fix dt validation. Signed-off-by: Luca Weiss Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20231002-pm7250b-gpio-fixup-v2-2-debb8b599989@fairphone.com Signed-off-by: Bjorn Andersson commit 0c149ca7653286496130e872f47a4b834348ea10 Author: Luca Weiss Date: Mon Oct 2 08:55:31 2023 +0200 arm64: dts: qcom: sc7280: Add Camera Control Interface busses Add the CCI busses found on sc7280 and their pinctrl states. Reviewed-by: Bryan O'Donoghue Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20231002-sc7280-cci-v2-2-9333fda4612a@fairphone.com Signed-off-by: Bjorn Andersson commit 7eedf7d6faaf0dd0807fff2ee595433faf08d138 Author: Joel Selvaraj Date: Sun Oct 1 18:19:04 2023 +0100 arm64: dts: qcom: sdm845-xiaomi-beryllium: enable flash led Configure and enable the dual-tone on the PocoPhone F1 Signed-off-by: Joel Selvaraj Signed-off-by: Caleb Connolly Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231001-b4-sdm845-flash-dts-v1-2-275a3abb0b10@linaro.org Signed-off-by: Bjorn Andersson commit 84b160876b4d8a97dc0feccc4426fefbc396d414 Author: Caleb Connolly Date: Sun Oct 1 18:19:03 2023 +0100 arm64: dts: qcom: sdm845-oneplus: enable flash LED Both the 6 and 6T feature a dual tone flash, enable it. Signed-off-by: Caleb Connolly Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20231001-b4-sdm845-flash-dts-v1-1-275a3abb0b10@linaro.org Signed-off-by: Bjorn Andersson commit 0cd080dd6d08817c9980d2069197b066636b0f23 Author: Konrad Dybcio Date: Fri Sep 29 18:02:57 2023 +0200 arm64: dts: qcom: sc8280xp-x13s: Use the correct DP PHY compatible The DP PHY needs different settings when an eDP display is used. Make sure these apply on the X13s. FWIW I could not notice any user-facing change stemming from this commit. Fixes: f48c70b111b4 ("arm64: dts: qcom: sc8280xp-x13s: enable eDP display") Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230929-topic-x13s_edpphy-v1-1-ce59f9eb4226@linaro.org Signed-off-by: Bjorn Andersson commit b364cc485da1b769f1ead705dcd853e87b42f96e Author: Stephan Gerhold Date: Thu Sep 21 20:56:06 2023 +0200 arm64: dts: qcom: msm8916-*: Fix alphabetic node order Fix a couple of instances of incorrectly sorted nodes in the MSM8916 boards. They should be ordered alphabetically for consistency. No functional change. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20230921-msm8916-rmem-fixups-v1-3-34d2b6e721cf@gerhold.net Signed-off-by: Bjorn Andersson commit d63ae4a814a763a5d2d4d078073562698693a909 Author: Stephan Gerhold Date: Thu Sep 21 20:56:05 2023 +0200 arm64: dts: qcom: msm8939-longcheer-l9100: Enable wcnss_mem Enable &wcnss_mem for msm8939-longcheer-l9100. This is needed now to have WCNSS working. It was missed when &wcnss_mem was disabled by default because the patch with the msm8939-longcheer-l9100 device tree was not applied yet. Fixes: 0ece6438a8c0 ("arm64: dts: qcom: msm8916/39: Disable unneeded firmware reservations") Signed-off-by: Stephan Gerhold Reviewed-by: André Apitzsch Tested-by: André Apitzsch Link: https://lore.kernel.org/r/20230921-msm8916-rmem-fixups-v1-2-34d2b6e721cf@gerhold.net Signed-off-by: Bjorn Andersson commit e87cef6a035edc03b4ac98f88121c706b2843156 Author: Stephan Gerhold Date: Thu Sep 21 20:56:04 2023 +0200 arm64: dts: qcom: msm8916-samsung-gt5: Enable GPU Enable the GPU for the msm8916-samsung-gt58 and gt510 tablets now that they have display panels enabled in the device tree. This was missed when the GPU was disabled by default because the change was not applied yet. Fixes: 0ce5bb825d54 ("arm64: dts: qcom: msm8916/39: Disable GPU by default") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20230921-msm8916-rmem-fixups-v1-1-34d2b6e721cf@gerhold.net Signed-off-by: Bjorn Andersson commit da528016952bf93ca810c43fafe518c699db7fa0 Author: Kathiravan Thirumoorthy Date: Thu Sep 14 12:30:01 2023 +0530 arm64: dts: qcom: ipq5332: include the GPLL0 as clock provider for mailbox While the kernel is booting up, APSS clock / CPU clock will be running at 800MHz with GPLL0 as source. Once the cpufreq driver is available, APSS PLL will be configured to the rate based on the opp table and the source also will be changed to APSS_PLL_EARLY. So allow the mailbox to consume the GPLL0, with this inclusion, CPU Freq correctly reports that CPU is running at 800MHz rather than 24MHz. Signed-off-by: Kathiravan Thirumoorthy Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230913-gpll_cleanup-v2-11-c8ceb1a37680@quicinc.com [bjorn: Updated commit message, as requested by Kathiravan] Signed-off-by: Bjorn Andersson commit 77c726a4f3b124903db5ced7d597976d5b80dcfb Author: Kathiravan Thirumoorthy Date: Thu Sep 14 12:30:00 2023 +0530 arm64: dts: qcom: ipq9574: include the GPLL0 as clock provider for mailbox While the kernel is booting up, APSS clock / CPU clock will be running at 800MHz with GPLL0 as source. Once the cpufreq driver is available, APSS PLL will be configured to the rate based on the opp table and the source also will be changed to APSS_PLL_EARLY. So allow the mailbox to consume the GPLL0, with this inclusion, CPU Freq correctly reports that CPU is running at 800MHz rather than 24MHz. Signed-off-by: Kathiravan Thirumoorthy Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230913-gpll_cleanup-v2-10-c8ceb1a37680@quicinc.com [bjorn: Updated commit message, as requested by Kathiravan] Signed-off-by: Bjorn Andersson commit 0133c7af3aa0420778d106cb90db708cfa45f2c6 Author: Kathiravan Thirumoorthy Date: Thu Sep 14 12:29:59 2023 +0530 arm64: dts: qcom: ipq6018: include the GPLL0 as clock provider for mailbox While the kernel is booting up, APSS clock / CPU clock will be running at 800MHz with GPLL0 as source. Once the cpufreq driver is available, APSS PLL will be configured to the rate based on the opp table and the source also will be changed to APSS_PLL_EARLY. So allow the mailbox to consume the GPLL0, with this inclusion, CPU Freq correctly reports that CPU is running at 800MHz rather than 24MHz. Signed-off-by: Kathiravan Thirumoorthy Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230913-gpll_cleanup-v2-9-c8ceb1a37680@quicinc.com [bjorn: Updated commit message, as requested by Kathiravan] Signed-off-by: Bjorn Andersson commit 80ebe63329909531afc87335f1d95c7bf8414438 Author: Kathiravan Thirumoorthy Date: Thu Sep 14 12:29:58 2023 +0530 arm64: dts: qcom: ipq8074: include the GPLL0 as clock provider for mailbox While the kernel is booting up, APSS clock / CPU clock will be running at 800MHz with GPLL0 as source. Once the cpufreq driver is available, APSS PLL will be configured to the rate based on the opp table and the source also will be changed to APSS_PLL_EARLY. So allow the mailbox to consume the GPLL0, with this inclusion, CPU Freq correctly reports that CPU is running at 800MHz rather than 24MHz. Signed-off-by: Kathiravan Thirumoorthy Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230913-gpll_cleanup-v2-8-c8ceb1a37680@quicinc.com [bjorn: Updated commit message, as requested by Kathiravan] Signed-off-by: Bjorn Andersson commit b36074357baf2794c825ea1c145de1d22b15380b Author: Varadarajan Narayanan Date: Fri Oct 20 11:49:39 2023 +0530 arm64: dts: qcom: ipq9574: populate the opp table based on the eFuse IPQ95xx SoCs have different OPPs available for the CPU based on SoC variant. This can be determined from an eFuse register present in the silicon. Add support to read the eFuse and populate the OPPs based on it. Frequency 1.2GHz 1.8GHz 1.5GHz No opp-supported-hw Limit ------------------------------------------------------------ 936000000 1 1 1 1 0xf 1104000000 1 1 1 1 0xf 1200000000 1 1 1 1 0xf 1416000000 0 1 1 1 0x7 1488000000 0 1 1 1 0x7 1800000000 0 1 0 1 0x5 2208000000 0 0 0 1 0x1 ----------------------------------------------------------- Reviewed-by: Konrad Dybcio Signed-off-by: Kathiravan T Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/14ab08b7cfd904433ca6065fac798d4f221c9d95.1697781921.git.quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit 62073bc9f1ecc0d91fc260e7ae380cbadd33e9fc Author: Varadarajan Narayanan Date: Fri Oct 20 11:49:37 2023 +0530 arm64: dts: qcom: ipq5332: populate the opp table based on the eFuse IPQ53xx have different OPPs available for the CPU based on SoC variant. This can be determined through use of an eFuse register present in the silicon. Add support to read the eFuse and populate the OPPs based on it. ------------------------------------------------ Frequency BIT2 BIT1 opp-supported-hw 1.1GHz 1.5GHz ------------------------------------------------ 1100000000 1 1 0x7 1500000000 0 1 0x3 ------------------------------------------------ Signed-off-by: Kathiravan T Signed-off-by: Varadarajan Narayanan Link: https://lore.kernel.org/r/463f01759cedef3121767d2432aa415794036ce1.1697781921.git.quic_varada@quicinc.com Signed-off-by: Bjorn Andersson commit 032ff6a3b39addd54427844affaf21e1e80fabc2 Author: Richard Acayan Date: Wed Aug 16 19:04:17 2023 -0400 arm64: dts: qcom: sdm670: add specific cpufreq compatible The bindings for the CPU frequency scaling driver require a specific compatible for the SoC. Add the compatible. Fixes: 0c665213d126 ("arm64: dts: qcom: sdm670: add cpu frequency scaling") Signed-off-by: Richard Acayan Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230816230412.76862-9-mailingradian@gmail.com Signed-off-by: Bjorn Andersson commit 00c86efb0f78319958b7bca3391c532016acf39c Author: Dmitry Baryshkov Date: Fri Sep 29 05:44:01 2023 +0200 arm64: dts: qcom: sm8150: extend the size of the PDC resource Follow the example of other platforms and extend the PDC resource region to 0x30000, so that the PDC driver can read the PDC_VERSION register. Fixes: 397ad94668c1 ("arm64: dts: qcom: sm8150: Add pdc interrupt controller node") Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20230929-topic-sm8x50-upstream-pdc-ver-v5-2-800111572104@linaro.org Signed-off-by: Bjorn Andersson commit a1f42e08f0f04b72a6597f080db4bfbb3737910c Author: Robert Marko Date: Wed Oct 4 21:12:30 2023 +0200 arm64: dts: qcom: ipq5018: add QUP1 SPI controller Add the required BAM and QUP nodes for the QUP1 SPI controller on IPQ5018. Signed-off-by: Robert Marko Reviewed-by: Kathiravan Thirumoorthy Link: https://lore.kernel.org/r/20231004191303.331055-1-robimarko@gmail.com [bjorn: Padded address to 8 digits, fixed node sort order] Signed-off-by: Bjorn Andersson commit 27c2ca90e2f34cd3c4849af996e1a96a69e700d3 Author: Caleb Connolly Date: Tue Oct 10 11:46:58 2023 +0100 arm64: dts: qcom: qrb4210-rb2: don't force usb peripheral mode The rb2 only has a single USB controller, it can be switched between a type-c port and an internal USB hub via a DIP switch. Until dynamic role switching is available it's preferable to put the USB controller in host mode so that the type-A ports and ethernet are available. Signed-off-by: Caleb Connolly Reviewed-by: Vladimir Zapolskiy Fixes: eaa53a85748d ("arm64: dts: qcom: qrb4210-rb2: Enable USB node") Reviewed-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20231010-caleb-rb2-host-mode-v1-1-b057d443cd62@linaro.org Signed-off-by: Bjorn Andersson commit 4e7870360366b79f8a37ab0809895359105e5b78 Author: Priyansh Jain Date: Tue Sep 26 14:29:48 2023 +0530 arm64: dts: qcom: Enable tsens and thermal for sa8775p SoC Add tsens and thermal devicetree node for sa8775p SoC. Signed-off-by: Priyansh Jain Link: https://lore.kernel.org/r/20230926085948.23046-3-quic_priyjain@quicinc.com Signed-off-by: Bjorn Andersson commit f19a9a341d6faaf8d04bb6d9fb1f6a367ca0ed3a Author: Raghavendra Kakarla Date: Fri Sep 29 11:18:05 2023 +0530 arm64: dts: qcom: sa8775p: Add RPMh sleep stats Add device node for sleep stats driver which provides various low power mode stats. Tested-by: Andrew Halaney Signed-off-by: Raghavendra Kakarla Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230929054805.27847-1-quic_rkakarla@quicinc.com Signed-off-by: Bjorn Andersson commit 2278b16f12a9cc33b95a980e05d4d8f3f8e0abfa Author: Luca Weiss Date: Fri Sep 29 14:51:22 2023 +0200 arm64: dts: qcom: sc7280: Add ports subnodes in usb/dp qmpphy node Add the USB3+DP Combo QMP PHY port subnodes to facilitate the description of the connection between the hardware blocks. Put it in the SoC DTSI to avoid duplication in the device DTs. Reviewed-by: Konrad Dybcio Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20230929-sc7280-qmpphy-ports-v2-1-aae7e9c286b0@fairphone.com Signed-off-by: Bjorn Andersson commit 2ea7de2f804432dd17bcfa97576f0ccf2054cd6e Author: Konrad Dybcio Date: Wed Sep 27 11:21:43 2023 +0200 arm64: dts: qcom: sm6375-pdx225: Add USBPHY regulators To make dtbs_check happy and the software more aware of what's going on, describe the HSUSB PHY's regulators and tighten up VDDA_PLL to match. Signed-off-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20230927-topic-6375_stuff-v1-4-12243e36b45c@linaro.org Signed-off-by: Bjorn Andersson commit 6ffcd65f27d7d083b9bfae56c9b5fe1a0b7500f8 Author: Konrad Dybcio Date: Wed Sep 27 11:21:42 2023 +0200 arm64: dts: qcom: sm6375-pdx225: Enable ATH10K WiFi Enable the onboard QCA Wi-Fi. HW identifiers for reference: qmi chip_id 0x320 chip_family 0x4001 board_id 0xff soc_id 0x400e0000 Firmware sources: /vendor/firmware_mnt/image/wlanmdsp.bin -> qcom/.../wlanmdsp.mbn /vendor/firmware_mnt/image/bdwlan.bXX [1] -> [2] -> ath10k/.../board-2.bin [3] -> ath10k/.../firmware-5.bin Not sure where 3 comes from on the device itself, gotta investigate that.. According to [4], it's called WCN3990_STRAIT. Enable it and tighten the relevant regulators. [1] XX = board_id printed when the file is missing or by your downstream kernel firmware loader in the dmesg; if XX=ff, use bdwlan.bin [2] https://github.com/jhugo/linux/blob/5.5rc2_wifi/README [3] https://github.com/kvalo/ath10k-firmware/blob/master/WCN3990/hw1.0/HL3.1/WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1/firmware-5.bin [4] https://git.codelinaro.org/clo/la/platform/vendor/qcom-opensource/wlan/qca-wifi-host-cmn/-/blob/LA.VENDOR.1.0.r1-20700-WAIPIO.QSSI13.0/hif/src/hif_hw_version.h#L55 Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230927-topic-6375_stuff-v1-3-12243e36b45c@linaro.org Signed-off-by: Bjorn Andersson commit ea6b3c61559f647d183322fc5431f2a5e78123d3 Author: Konrad Dybcio Date: Wed Sep 27 11:21:41 2023 +0200 arm64: dts: qcom: sm6375-pdx225: Enable MSS Enable the 5G modem on the Sony Xperia 10 IV. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230927-topic-6375_stuff-v1-2-12243e36b45c@linaro.org Signed-off-by: Bjorn Andersson commit 1529f6a43cc4feeb78f6063ae3ae7d8003594de6 Author: Konrad Dybcio Date: Wed Sep 27 11:21:40 2023 +0200 arm64: dts: qcom: sm6375: Add UART1 Add UART1 node, generally used for the Bluetooth module. Signed-off-by: Konrad Dybcio Reviewed-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20230927-topic-6375_stuff-v1-1-12243e36b45c@linaro.org Signed-off-by: Bjorn Andersson commit 0e2f2c506f01abcec412ccf91ed39ddfafbda60a Author: Anusha Rao Date: Wed Sep 27 12:13:19 2023 +0530 arm64: dts: qcom: ipq9574: Enable WPS buttons Add support for wps buttons on GPIO 37. Reviewed-by: Konrad Dybcio Signed-off-by: Anusha Rao Signed-off-by: Kathiravan Thirumoorthy Link: https://lore.kernel.org/r/20230927-common-rdp-v3-2-3d07b3ff6d42@quicinc.com Signed-off-by: Bjorn Andersson commit 0e8527d076cfb3fa55777a2ece735852fcf3e850 Author: Anusha Rao Date: Wed Sep 27 12:13:18 2023 +0530 arm64: dts: qcom: ipq9574: Add common RDP dtsi file Add a dtsi file to include interfaces that are common across RDPs. Signed-off-by: Anusha Rao Signed-off-by: Kathiravan Thirumoorthy Link: https://lore.kernel.org/r/20230927-common-rdp-v3-1-3d07b3ff6d42@quicinc.com Signed-off-by: Bjorn Andersson commit 80a438775aa398751229bcaed15459f3acdb645f Author: Nitheesh Sekar Date: Mon Sep 4 12:06:35 2023 +0530 arm64: dts: qcom: ipq5018: Enable USB Enable USB2 in host mode. Reviewed-by: Dmitry Baryshkov Co-developed-by: Amandeep Singh Signed-off-by: Amandeep Singh Signed-off-by: Nitheesh Sekar Link: https://lore.kernel.org/r/20230904063635.24975-5-quic_nsekar@quicinc.com Signed-off-by: Bjorn Andersson commit e7166f2774aafefd29ff26ffbbb7f6d40ac8ea1c Author: Nitheesh Sekar Date: Mon Sep 4 12:06:34 2023 +0530 arm64: dts: qcom: ipq5018: Add USB related nodes Add USB phy and controller nodes. Co-developed-by: Amandeep Singh Signed-off-by: Amandeep Singh Signed-off-by: Nitheesh Sekar Link: https://lore.kernel.org/r/20230904063635.24975-4-quic_nsekar@quicinc.com Signed-off-by: Bjorn Andersson commit d9f33f465114b8d1ecbd5d0b5a4d5f7e709094d9 Author: Om Prakash Singh Date: Mon Oct 16 01:09:01 2023 +0530 arm64: dts: qcom: sc7280: add TRNG node The sc7280 SoC has a True Random Number Generator, add the node with the correct compatible set. Signed-off-by: Om Prakash Singh Link: https://lore.kernel.org/r/20231015193901.2344590-5-quic_omprsing@quicinc.com [bjorn: Padded address to 8 digits, moved hunk to maintain sort order] Signed-off-by: Bjorn Andersson commit 2d04f31103921b8c21756ff9eeba32e3ece1a276 Author: Om Prakash Singh Date: Mon Oct 16 01:09:00 2023 +0530 arm64: dts: qcom: sa8775p: add TRNG node The sa8775p SoC has a True Random Number Generator, add the node with the correct compatible set. Signed-off-by: Om Prakash Singh Link: https://lore.kernel.org/r/20231015193901.2344590-4-quic_omprsing@quicinc.com [bjorn: Padded address to 8 digits, moved hunk to maintain sort order] Signed-off-by: Bjorn Andersson commit c2c9fa136253daf6b3e25c3ea4952d9f2c4da8cf Author: Neil Armstrong Date: Tue Oct 3 09:10:23 2023 +0200 arm64: dts: qcom: sm8450: add TRNG node The SM8450 SoC has a True Random Number Generator, add the node with the correct compatible set. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20231003-topic-sm8550-rng-v4-5-255e4d0ba08e@linaro.org Signed-off-by: Bjorn Andersson commit 3b3ba999046e246cfd570e5399adea2f82df9312 Author: Neil Armstrong Date: Tue Oct 3 09:10:22 2023 +0200 arm64: dts: qcom: sm8550: add TRNG node Add the Qualcomm True Random Number Generator node. Reviewed-by: Konrad Dybcio Signed-off-by: Neil Armstrong Acked-by: Vinod Koul Link: https://lore.kernel.org/r/20231003-topic-sm8550-rng-v4-4-255e4d0ba08e@linaro.org Signed-off-by: Bjorn Andersson